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
5,500
JS_AddRuntimeFinalizer
bluesky950520[P]quickjs/quickjs.c
int JS_AddRuntimeFinalizer(JSRuntime *rt, JSRuntimeFinalizer *finalizer, void *arg) { JSRuntimeFinalizerState *fs = js_malloc_rt(rt, sizeof(*fs)); if (!fs) return -1; fs->next = rt->finalizers; fs->finalizer = finalizer; fs->arg = arg; rt->finalizers = fs; return 0; }
O1
c
JS_AddRuntimeFinalizer: pushq %r15 pushq %r14 pushq %rbx movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r14 pushq $0x18 popq %rsi callq 0xf005 testq %rax, %rax je 0xf2af movq 0x220(%r14), %rcx movq %rcx, (%rax) movq %r15, 0x8(%rax) movq %rbx, 0x10(%rax) movq %rax, 0x220(%r14) xorl %eax, %eax jmp 0xf2b2 pushq $-0x1 popq %rax popq %rbx popq %r14 popq %r15 retq
JS_AddRuntimeFinalizer: push r15 push r14 push rbx mov rbx, rdx mov r15, rsi mov r14, rdi push 18h pop rsi call js_malloc_rt test rax, rax jz short loc_F2AF mov rcx, [r14+220h] mov [rax], rcx mov [rax+8], r15 mov [rax+10h], rbx mov [r14+220h], rax xor eax, eax jmp short loc_F2B2 loc_F2AF: push 0FFFFFFFFFFFFFFFFh pop rax loc_F2B2: pop rbx pop r14 pop r15 retn
long long JS_AddRuntimeFinalizer(long long a1, long long a2, long long a3) { _QWORD *v4; // rax v4 = (_QWORD *)js_malloc_rt(a1, 24LL); if ( !v4 ) return -1LL; *v4 = *(_QWORD *)(a1 + 544); v4[1] = a2; v4[2] = a3; *(_QWORD *)(a1 + 544) = v4; return 0LL; }
JS_AddRuntimeFinalizer: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDX MOV R15,RSI MOV R14,RDI PUSH 0x18 POP RSI CALL 0x0010f005 TEST RAX,RAX JZ 0x0010f2af MOV RCX,qword ptr [R14 + 0x220] MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],R15 MOV qword ptr [RAX + 0x10],RBX MOV qword ptr [R14 + 0x220],RAX XOR EAX,EAX JMP 0x0010f2b2 LAB_0010f2af: PUSH -0x1 POP RAX LAB_0010f2b2: POP RBX POP R14 POP R15 RET
int8 JS_AddRuntimeFinalizer(long param_1,int8 param_2,int8 param_3) { int8 *puVar1; int8 uVar2; puVar1 = (int8 *)js_malloc_rt(param_1,0x18); if (puVar1 == (int8 *)0x0) { uVar2 = 0xffffffffffffffff; } else { *puVar1 = *(int8 *)(param_1 + 0x220); puVar1[1] = param_2; puVar1[2] = param_3; *(int8 **)(param_1 + 0x220) = puVar1; uVar2 = 0; } return uVar2; }
5,501
JS_AddRuntimeFinalizer
bluesky950520[P]quickjs/quickjs.c
int JS_AddRuntimeFinalizer(JSRuntime *rt, JSRuntimeFinalizer *finalizer, void *arg) { JSRuntimeFinalizerState *fs = js_malloc_rt(rt, sizeof(*fs)); if (!fs) return -1; fs->next = rt->finalizers; fs->finalizer = finalizer; fs->arg = arg; rt->finalizers = fs; return 0; }
O2
c
JS_AddRuntimeFinalizer: pushq %r15 pushq %r14 pushq %rbx movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r14 pushq $0x18 popq %rsi callq 0x1ac29 testq %rax, %rax je 0x1b9ed movq 0x220(%r14), %rcx movq %rcx, (%rax) movq %r15, 0x8(%rax) movq %rbx, 0x10(%rax) movq %rax, 0x220(%r14) xorl %eax, %eax jmp 0x1b9f0 pushq $-0x1 popq %rax popq %rbx popq %r14 popq %r15 retq
JS_AddRuntimeFinalizer: push r15 push r14 push rbx mov rbx, rdx mov r15, rsi mov r14, rdi push 18h pop rsi call js_malloc_rt test rax, rax jz short loc_1B9ED mov rcx, [r14+220h] mov [rax], rcx mov [rax+8], r15 mov [rax+10h], rbx mov [r14+220h], rax xor eax, eax jmp short loc_1B9F0 loc_1B9ED: push 0FFFFFFFFFFFFFFFFh pop rax loc_1B9F0: pop rbx pop r14 pop r15 retn
long long JS_AddRuntimeFinalizer(long long a1, long long a2, long long a3) { _QWORD *v4; // rax v4 = (_QWORD *)js_malloc_rt(a1, 24LL); if ( !v4 ) return -1LL; *v4 = *(_QWORD *)(a1 + 544); v4[1] = a2; v4[2] = a3; *(_QWORD *)(a1 + 544) = v4; return 0LL; }
JS_AddRuntimeFinalizer: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDX MOV R15,RSI MOV R14,RDI PUSH 0x18 POP RSI CALL 0x0011ac29 TEST RAX,RAX JZ 0x0011b9ed MOV RCX,qword ptr [R14 + 0x220] MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],R15 MOV qword ptr [RAX + 0x10],RBX MOV qword ptr [R14 + 0x220],RAX XOR EAX,EAX JMP 0x0011b9f0 LAB_0011b9ed: PUSH -0x1 POP RAX LAB_0011b9f0: POP RBX POP R14 POP R15 RET
int8 JS_AddRuntimeFinalizer(long param_1,int8 param_2,int8 param_3) { int8 *puVar1; int8 uVar2; puVar1 = (int8 *)js_malloc_rt(param_1,0x18); if (puVar1 == (int8 *)0x0) { uVar2 = 0xffffffffffffffff; } else { *puVar1 = *(int8 *)(param_1 + 0x220); puVar1[1] = param_2; puVar1[2] = param_3; *(int8 **)(param_1 + 0x220) = puVar1; uVar2 = 0; } return uVar2; }
5,502
get_charset
eloqsql/mysys/charset.c
CHARSET_INFO *get_charset(uint cs_number, myf flags) { CHARSET_INFO *cs= NULL; if (cs_number == default_charset_info->number) return default_charset_info; my_pthread_once(&charsets_initialized, init_available_charsets); if (cs_number < array_elements(all_charsets)) { MY_CHARSET_LOADER loader; my_charset_loader_init_mysys(&loader); cs= get_internal_charset(&loader, cs_number, flags); } if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)], cs_string[23]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); cs_string[0]='#'; int10_to_str(cs_number, cs_string+1, 10); my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_string, index_file); } return cs; }
O0
c
get_charset: pushq %rbp movq %rsp, %rbp subq $0x320, %rsp # imm = 0x320 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0x2fc(%rbp) movq %rsi, -0x308(%rbp) movq $0x0, -0x310(%rbp) movl -0x2fc(%rbp), %eax leaq 0x1f5b73(%rip), %rcx # 0x2f5060 movq (%rcx), %rcx cmpl (%rcx), %eax jne 0xff50a leaq 0x1f5b65(%rip), %rax # 0x2f5060 movq (%rax), %rax movq %rax, -0x2f8(%rbp) jmp 0xff5dc leaq 0xbb86a3(%rip), %rdi # 0xcb7bb4 leaq -0x548(%rip), %rsi # 0xfefd0 callq 0x2a260 cmpl $0x800, -0x2fc(%rbp) # imm = 0x800 jae 0xff555 leaq -0xb8(%rbp), %rdi callq 0xfe5f0 movl -0x2fc(%rbp), %esi movq -0x308(%rbp), %rdx leaq -0xb8(%rbp), %rdi callq 0xff620 movq %rax, -0x310(%rbp) cmpq $0x0, -0x310(%rbp) jne 0xff5ce movq -0x308(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0xff5ce leaq -0x2d0(%rbp), %rdi callq 0xfec90 movq %rax, %rdi leaq 0x84e5c(%rip), %rsi # 0x1843e2 callq 0x2a7f0 movb $0x23, -0x2f0(%rbp) movl -0x2fc(%rbp), %eax movl %eax, %edi leaq -0x2f0(%rbp), %rsi addq $0x1, %rsi movl $0xa, %edx callq 0x176d30 leaq -0x2f0(%rbp), %rdx leaq -0x2d0(%rbp), %rcx movl $0x16, %edi movl $0x4, %esi movb $0x0, %al callq 0x117840 movq -0x310(%rbp), %rax movq %rax, -0x2f8(%rbp) movq -0x2f8(%rbp), %rax movq %rax, -0x318(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xff60c movq -0x318(%rbp), %rax addq $0x320, %rsp # imm = 0x320 popq %rbp retq callq 0x2a290 nopw %cs:(%rax,%rax)
get_charset: push rbp mov rbp, rsp sub rsp, 320h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_2FC], edi mov [rbp+var_308], rsi mov [rbp+var_310], 0 mov eax, [rbp+var_2FC] lea rcx, default_charset_info mov rcx, [rcx] cmp eax, [rcx] jnz short loc_FF50A lea rax, default_charset_info mov rax, [rax] mov [rbp+var_2F8], rax jmp loc_FF5DC loc_FF50A: lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once cmp [rbp+var_2FC], 800h jnb short loc_FF555 lea rdi, [rbp+var_B8] call my_charset_loader_init_mysys mov esi, [rbp+var_2FC] mov rdx, [rbp+var_308] lea rdi, [rbp+var_B8] call get_internal_charset mov [rbp+var_310], rax loc_FF555: cmp [rbp+var_310], 0 jnz short loc_FF5CE mov rax, [rbp+var_308] and rax, 10h cmp rax, 0 jz short loc_FF5CE lea rdi, [rbp+var_2D0] call get_charsets_dir mov rdi, rax lea rsi, aIndexXml; "Index.xml" call _stpcpy mov [rbp+var_2F0], 23h ; '#' mov eax, [rbp+var_2FC] mov edi, eax lea rsi, [rbp+var_2F0] add rsi, 1 mov edx, 0Ah call int10_to_str lea rdx, [rbp+var_2F0] lea rcx, [rbp+var_2D0] mov edi, 16h mov esi, 4 mov al, 0 call my_error loc_FF5CE: mov rax, [rbp+var_310] mov [rbp+var_2F8], rax loc_FF5DC: mov rax, [rbp+var_2F8] mov [rbp+var_318], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_FF60C mov rax, [rbp+var_318] add rsp, 320h pop rbp retn loc_FF60C: call ___stack_chk_fail
void * get_charset(unsigned int a1, long long a2) { long long charsets_dir; // rax int v3; // r8d int v4; // r9d long long internal_charset; // [rsp+10h] [rbp-310h] char v8; // [rsp+30h] [rbp-2F0h] BYREF _BYTE v9[7]; // [rsp+31h] [rbp-2EFh] BYREF _BYTE v10[536]; // [rsp+50h] [rbp-2D0h] BYREF _BYTE v11[176]; // [rsp+268h] [rbp-B8h] BYREF unsigned long long v12; // [rsp+318h] [rbp-8h] v12 = __readfsqword(0x28u); internal_charset = 0LL; if ( a1 == *(_DWORD *)default_charset_info ) return default_charset_info; pthread_once(&charsets_initialized, init_available_charsets); if ( a1 < 0x800 ) { my_charset_loader_init_mysys((long long)v11); internal_charset = get_internal_charset(v11, a1, a2); } if ( !internal_charset && (a2 & 0x10) != 0 ) { charsets_dir = get_charsets_dir((long long)v10); stpcpy(charsets_dir, "Index.xml"); v8 = 35; int10_to_str(a1, v9, 10LL); my_error(22, 4, (unsigned int)&v8, (unsigned int)v10, v3, v4); } return (void *)internal_charset; }
get_charset: PUSH RBP MOV RBP,RSP SUB RSP,0x320 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x2fc],EDI MOV qword ptr [RBP + -0x308],RSI MOV qword ptr [RBP + -0x310],0x0 MOV EAX,dword ptr [RBP + -0x2fc] LEA RCX,[0x3f5060] MOV RCX,qword ptr [RCX] CMP EAX,dword ptr [RCX] JNZ 0x001ff50a LEA RAX,[0x3f5060] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x2f8],RAX JMP 0x001ff5dc LAB_001ff50a: LEA RDI,[0xdb7bb4] LEA RSI,[0x1fefd0] CALL 0x0012a260 CMP dword ptr [RBP + -0x2fc],0x800 JNC 0x001ff555 LEA RDI,[RBP + -0xb8] CALL 0x001fe5f0 MOV ESI,dword ptr [RBP + -0x2fc] MOV RDX,qword ptr [RBP + -0x308] LEA RDI,[RBP + -0xb8] CALL 0x001ff620 MOV qword ptr [RBP + -0x310],RAX LAB_001ff555: CMP qword ptr [RBP + -0x310],0x0 JNZ 0x001ff5ce MOV RAX,qword ptr [RBP + -0x308] AND RAX,0x10 CMP RAX,0x0 JZ 0x001ff5ce LEA RDI,[RBP + -0x2d0] CALL 0x001fec90 MOV RDI,RAX LEA RSI,[0x2843e2] CALL 0x0012a7f0 MOV byte ptr [RBP + -0x2f0],0x23 MOV EAX,dword ptr [RBP + -0x2fc] MOV EDI,EAX LEA RSI,[RBP + -0x2f0] ADD RSI,0x1 MOV EDX,0xa CALL 0x00276d30 LEA RDX,[RBP + -0x2f0] LEA RCX,[RBP + -0x2d0] MOV EDI,0x16 MOV ESI,0x4 MOV AL,0x0 CALL 0x00217840 LAB_001ff5ce: MOV RAX,qword ptr [RBP + -0x310] MOV qword ptr [RBP + -0x2f8],RAX LAB_001ff5dc: MOV RAX,qword ptr [RBP + -0x2f8] MOV qword ptr [RBP + -0x318],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001ff60c MOV RAX,qword ptr [RBP + -0x318] ADD RSP,0x320 POP RBP RET LAB_001ff60c: CALL 0x0012a290
int * get_charset(uint param_1,ulong param_2) { char *__dest; long in_FS_OFFSET; int *local_318; int *local_300; int1 local_2f8; int1 auStack_2f7 [31]; int1 local_2d8 [536]; int1 local_c0 [176]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_318 = (int *)0x0; if (param_1 == *(uint *)default_charset_info) { local_300 = default_charset_info; } else { pthread_once(&charsets_initialized,init_available_charsets); if (param_1 < 0x800) { my_charset_loader_init_mysys(local_c0); local_318 = (int *)get_internal_charset(local_c0,param_1,param_2); } if ((local_318 == (int *)0x0) && ((param_2 & 0x10) != 0)) { __dest = (char *)get_charsets_dir(local_2d8); stpcpy(__dest,"Index.xml"); local_2f8 = 0x23; int10_to_str(param_1,auStack_2f7,10); my_error(0x16,4,&local_2f8,local_2d8); } local_300 = local_318; } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_300; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
5,503
get_charset
eloqsql/mysys/charset.c
CHARSET_INFO *get_charset(uint cs_number, myf flags) { CHARSET_INFO *cs= NULL; if (cs_number == default_charset_info->number) return default_charset_info; my_pthread_once(&charsets_initialized, init_available_charsets); if (cs_number < array_elements(all_charsets)) { MY_CHARSET_LOADER loader; my_charset_loader_init_mysys(&loader); cs= get_internal_charset(&loader, cs_number, flags); } if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)], cs_string[23]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); cs_string[0]='#'; int10_to_str(cs_number, cs_string+1, 10); my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_string, index_file); } return cs; }
O3
c
get_charset: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x238, %rsp # imm = 0x238 movq %fs:0x28, %rax movq %rax, -0x20(%rbp) leaq 0x300b1e(%rip), %rax # 0x3ae090 movq (%rax), %r15 cmpl %edi, (%r15) je 0xad679 movq %rsi, %r14 movl %edi, %ebx leaq 0xb82a96(%rip), %rdi # 0xc30020 leaq -0x382(%rip), %rsi # 0xad20f callq 0x2a250 cmpl $0x7ff, %ebx # imm = 0x7FF ja 0xad60e leaq -0x230(%rbp), %rdi movb $0x0, (%rdi) leaq -0xb6d(%rip), %rax # 0xaca42 movq %rax, 0x80(%rdi) leaq -0xb6c(%rip), %rax # 0xaca51 movq %rax, 0x88(%rdi) leaq -0xb5f(%rip), %rax # 0xaca6c movq %rax, 0x90(%rdi) leaq 0x11f75(%rip), %rax # 0xbf54e movq %rax, 0x98(%rdi) leaq 0x300aa1(%rip), %rax # 0x3ae088 movq (%rax), %rax movq %rax, 0xa0(%rdi) leaq -0xb6e(%rip), %rax # 0xaca8a movq %rax, 0xa8(%rdi) movl %ebx, %esi movq %r14, %rdx callq 0xad69e movq %rax, %r15 jmp 0xad611 xorl %r15d, %r15d testq %r15, %r15 setne %al testb $0x10, %r14b sete %cl orb %al, %cl jne 0xad679 leaq -0x230(%rbp), %r14 movq %r14, %rdi callq 0xacfcf movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49 movq %rcx, (%rax) movw $0x6c, 0x8(%rax) leaq -0x24f(%rbp), %rsi movb $0x23, -0x1(%rsi) movl %ebx, %edi movl $0xa, %edx callq 0xf545e xorl %r15d, %r15d leaq -0x250(%rbp), %rdx movl $0x4, %esi movl $0x16, %edi movq %r14, %rcx xorl %eax, %eax callq 0xbad7b movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0xad699 movq %r15, %rax addq $0x238, %rsp # imm = 0x238 popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x2a280
get_charset: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 238h mov rax, fs:28h mov [rbp+var_20], rax lea rax, default_charset_info mov r15, [rax] cmp [r15], edi jz loc_AD679 mov r14, rsi mov ebx, edi lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once cmp ebx, 7FFh ja short loc_AD60E lea rdi, [rbp+var_230] mov byte ptr [rdi], 0 lea rax, my_once_alloc_c mov [rdi+80h], rax lea rax, my_malloc_c mov [rdi+88h], rax lea rax, my_realloc_c mov [rdi+90h], rax lea rax, my_free mov [rdi+98h], rax lea rax, my_charset_error_reporter mov rax, [rax] mov [rdi+0A0h], rax lea rax, add_collation mov [rdi+0A8h], rax mov esi, ebx mov rdx, r14 call get_internal_charset mov r15, rax jmp short loc_AD611 loc_AD60E: xor r15d, r15d loc_AD611: test r15, r15 setnz al test r14b, 10h setz cl or cl, al jnz short loc_AD679 lea r14, [rbp+var_230] mov rdi, r14 call get_charsets_dir mov rcx, 6D782E7865646E49h mov [rax], rcx mov word ptr [rax+8], 6Ch ; 'l' lea rsi, [rbp+var_24F] mov byte ptr [rsi-1], 23h ; '#' mov edi, ebx mov edx, 0Ah call int10_to_str xor r15d, r15d lea rdx, [rbp+var_250] mov esi, 4 mov edi, 16h mov rcx, r14 xor eax, eax call my_error loc_AD679: mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_AD699 mov rax, r15 add rsp, 238h pop rbx pop r14 pop r15 pop rbp retn loc_AD699: call ___stack_chk_fail
void * get_charset(unsigned int a1, long long a2) { void *internal_charset; // r15 int v3; // r8d int v4; // r9d char v6; // [rsp+0h] [rbp-250h] BYREF _BYTE v7[31]; // [rsp+1h] [rbp-24Fh] BYREF _BYTE v8[128]; // [rsp+20h] [rbp-230h] BYREF long long ( *v9)(long long); // [rsp+A0h] [rbp-1B0h] long long ( *v10)(long long); // [rsp+A8h] [rbp-1A8h] long long ( *v11)(long long, long long); // [rsp+B0h] [rbp-1A0h] long long ( *v12)(_QWORD); // [rsp+B8h] [rbp-198h] long long ( *v13)(); // [rsp+C0h] [rbp-190h] long long ( *v14)(unsigned int *); // [rsp+C8h] [rbp-188h] unsigned long long v15; // [rsp+230h] [rbp-20h] v15 = __readfsqword(0x28u); internal_charset = default_charset_info; if ( *(_DWORD *)default_charset_info != a1 ) { pthread_once(&charsets_initialized, init_available_charsets); if ( a1 > 0x7FF ) { internal_charset = 0LL; } else { v8[0] = 0; v9 = my_once_alloc_c; v10 = my_malloc_c; v11 = my_realloc_c; v12 = my_free; v13 = my_charset_error_reporter; v14 = add_collation; internal_charset = (void *)get_internal_charset(v8, a1, a2); } if ( internal_charset == 0LL && (a2 & 0x10) != 0 ) { strcpy((char *)get_charsets_dir((long long)v8), "Index.xml"); v6 = 35; int10_to_str(a1, v7, 10LL); internal_charset = 0LL; my_error(22, 4, (unsigned int)&v6, (unsigned int)v8, v3, v4); } } return internal_charset; }
get_charset: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x238 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX LEA RAX,[0x4ae090] MOV R15,qword ptr [RAX] CMP dword ptr [R15],EDI JZ 0x001ad679 MOV R14,RSI MOV EBX,EDI LEA RDI,[0xd30020] LEA RSI,[0x1ad20f] CALL 0x0012a250 CMP EBX,0x7ff JA 0x001ad60e LEA RDI,[RBP + -0x230] MOV byte ptr [RDI],0x0 LEA RAX,[0x1aca42] MOV qword ptr [RDI + 0x80],RAX LEA RAX,[0x1aca51] MOV qword ptr [RDI + 0x88],RAX LEA RAX,[0x1aca6c] MOV qword ptr [RDI + 0x90],RAX LEA RAX,[0x1bf54e] MOV qword ptr [RDI + 0x98],RAX LEA RAX,[0x4ae088] MOV RAX,qword ptr [RAX] MOV qword ptr [RDI + 0xa0],RAX LEA RAX,[0x1aca8a] MOV qword ptr [RDI + 0xa8],RAX MOV ESI,EBX MOV RDX,R14 CALL 0x001ad69e MOV R15,RAX JMP 0x001ad611 LAB_001ad60e: XOR R15D,R15D LAB_001ad611: TEST R15,R15 SETNZ AL TEST R14B,0x10 SETZ CL OR CL,AL JNZ 0x001ad679 LEA R14,[RBP + -0x230] MOV RDI,R14 CALL 0x001acfcf MOV RCX,0x6d782e7865646e49 MOV qword ptr [RAX],RCX MOV word ptr [RAX + 0x8],0x6c LEA RSI,[RBP + -0x24f] MOV byte ptr [RSI + -0x1],0x23 MOV EDI,EBX MOV EDX,0xa CALL 0x001f545e XOR R15D,R15D LEA RDX,[RBP + -0x250] MOV ESI,0x4 MOV EDI,0x16 MOV RCX,R14 XOR EAX,EAX CALL 0x001bad7b LAB_001ad679: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x001ad699 MOV RAX,R15 ADD RSP,0x238 POP RBX POP R14 POP R15 POP RBP RET LAB_001ad699: CALL 0x0012a280
int * get_charset(uint param_1,ulong param_2) { int *puVar1; int8 *puVar2; long in_FS_OFFSET; int1 local_258; int1 local_257 [31]; int1 local_238 [128]; code *local_1b8; code *local_1b0; code *local_1a8; code *local_1a0; int *local_198; code *local_190; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); puVar1 = default_charset_info; if (*(uint *)default_charset_info != param_1) { pthread_once(&charsets_initialized,init_available_charsets); if (param_1 < 0x800) { local_238[0] = 0; local_1b8 = my_once_alloc_c; local_1b0 = my_malloc_c; local_1a8 = my_realloc_c; local_1a0 = my_free; local_198 = my_charset_error_reporter; local_190 = add_collation; puVar1 = (int *)get_internal_charset(local_238,param_1,param_2); } else { puVar1 = (int *)0x0; } if ((param_2 & 0x10) != 0 && puVar1 == (int *)0x0) { puVar2 = (int8 *)get_charsets_dir(local_238); *puVar2 = 0x6d782e7865646e49; *(int2 *)(puVar2 + 1) = 0x6c; local_258 = 0x23; int10_to_str(param_1,local_257,10); puVar1 = (int *)0x0; my_error(0x16,4,&local_258,local_238); } } if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return puVar1; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
5,504
nglog::(anonymous namespace)::LogFileObject::Flush()
ng-log[P]ng-log/src/logging.cc
void LogFileObject::Flush() { std::lock_guard<std::mutex> l{mutex_}; FlushUnlocked(std::chrono::system_clock::now()); }
O1
cpp
nglog::(anonymous namespace)::LogFileObject::Flush(): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %r14 leaq 0x8(%rdi), %rbx movq %rbx, %rdi callq 0x7840 testl %eax, %eax jne 0x10948 callq 0x7070 movq %rax, %r15 movq 0x98(%r14), %rdi testq %rdi, %rdi je 0x10920 callq 0x7640 movl $0x0, 0xa4(%r14) leaq 0x211a1(%rip), %rax # 0x31ac8 movslq (%rax), %rax imulq $0x3b9aca00, %rax, %rax # imm = 0x3B9ACA00 addq %r15, %rax movq %rax, 0xb8(%r14) movq %rbx, %rdi popq %rbx popq %r14 popq %r15 jmp 0x73e0 movl %eax, %edi callq 0x7350 nop
_ZN5nglog12_GLOBAL__N_113LogFileObject5FlushEv: push r15 push r14 push rbx mov r14, rdi lea rbx, [rdi+8] mov rdi, rbx; this call _pthread_mutex_lock test eax, eax jnz short loc_10948 call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void) mov r15, rax mov rdi, [r14+98h] test rdi, rdi jz short loc_10920 call _fflush mov dword ptr [r14+0A4h], 0 loc_10920: lea rax, _ZN3fLI16FLAGS_logbufsecsE; fLI::FLAGS_logbufsecs movsxd rax, dword ptr [rax] imul rax, 3B9ACA00h add rax, r15 mov [r14+0B8h], rax mov rdi, rbx pop rbx pop r14 pop r15 jmp _pthread_mutex_unlock loc_10948: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int)
long long nglog::`anonymous namespace'::LogFileObject::Flush( nglog::_anonymous_namespace_::LogFileObject *this) { char *v2; // rbx std::chrono::_V2::system_clock *v3; // rdi int v4; // eax long long v5; // r15 long long v6; // rdi v2 = (char *)this + 8; v3 = (nglog::_anonymous_namespace_::LogFileObject *)((char *)this + 8); v4 = pthread_mutex_lock(v3); if ( v4 ) std::__throw_system_error(v4); v5 = std::chrono::_V2::system_clock::now(v3); v6 = *((_QWORD *)this + 19); if ( v6 ) { fflush(v6); *((_DWORD *)this + 41) = 0; } *((_QWORD *)this + 23) = v5 + 1000000000LL * fLI::FLAGS_logbufsecs; return pthread_mutex_unlock(v2); }
Flush: PUSH R15 PUSH R14 PUSH RBX MOV R14,RDI LEA RBX,[RDI + 0x8] MOV RDI,RBX CALL 0x00107840 TEST EAX,EAX JNZ 0x00110948 CALL 0x00107070 MOV R15,RAX MOV RDI,qword ptr [R14 + 0x98] TEST RDI,RDI JZ 0x00110920 CALL 0x00107640 MOV dword ptr [R14 + 0xa4],0x0 LAB_00110920: LEA RAX,[0x131ac8] MOVSXD RAX,dword ptr [RAX] IMUL RAX,RAX,0x3b9aca00 ADD RAX,R15 MOV qword ptr [R14 + 0xb8],RAX MOV RDI,RBX POP RBX POP R14 POP R15 JMP 0x001073e0 LAB_00110948: MOV EDI,EAX CALL 0x00107350
/* nglog::(anonymous namespace)::LogFileObject::Flush() */ void __thiscall nglog::(anonymous_namespace)::LogFileObject::Flush(LogFileObject *this) { int iVar1; long lVar2; iVar1 = pthread_mutex_lock((pthread_mutex_t *)(this + 8)); if (iVar1 == 0) { lVar2 = std::chrono::_V2::system_clock::now(); if (*(FILE **)(this + 0x98) != (FILE *)0x0) { fflush(*(FILE **)(this + 0x98)); *(int4 *)(this + 0xa4) = 0; } *(long *)(this + 0xb8) = (long)fLI::FLAGS_logbufsecs * 1000000000 + lVar2; pthread_mutex_unlock((pthread_mutex_t *)(this + 8)); return; } /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar1); }
5,505
frobenius_map_fp6
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/fp12_tower.c
static void frobenius_map_fp6(vec384fp6 ret, const vec384fp6 a, size_t n) { static const vec384x coeffs1[] = { /* (u + 1)^((P^n - 1) / 3) */ { { 0 }, { TO_LIMB_T(0xcd03c9e48671f071), TO_LIMB_T(0x5dab22461fcda5d2), TO_LIMB_T(0x587042afd3851b95), TO_LIMB_T(0x8eb60ebe01bacb9e), TO_LIMB_T(0x03f97d6e83d050d2), TO_LIMB_T(0x18f0206554638741) } }, { { TO_LIMB_T(0x30f1361b798a64e8), TO_LIMB_T(0xf3b8ddab7ece5a2a), TO_LIMB_T(0x16a8ca3ac61577f7), TO_LIMB_T(0xc26a2ff874fd029b), TO_LIMB_T(0x3636b76660701c6e), TO_LIMB_T(0x051ba4ab241b6160) } }, { { 0 }, { ONE_MONT_P } } }; static const vec384 coeffs2[] = { /* (u + 1)^((2P^n - 2) / 3) */ { TO_LIMB_T(0x890dc9e4867545c3), TO_LIMB_T(0x2af322533285a5d5), TO_LIMB_T(0x50880866309b7e2c), TO_LIMB_T(0xa20d1b8c7e881024), TO_LIMB_T(0x14e4f04fe2db9068), TO_LIMB_T(0x14e56d3f1564853a) }, { TO_LIMB_T(0xcd03c9e48671f071), TO_LIMB_T(0x5dab22461fcda5d2), TO_LIMB_T(0x587042afd3851b95), TO_LIMB_T(0x8eb60ebe01bacb9e), TO_LIMB_T(0x03f97d6e83d050d2), TO_LIMB_T(0x18f0206554638741) }, { TO_LIMB_T(0x43f5fffffffcaaae), TO_LIMB_T(0x32b7fff2ed47fffd), TO_LIMB_T(0x07e83a49a2e99d69), TO_LIMB_T(0xeca8f3318332bb7a), TO_LIMB_T(0xef148d1ea0f4c069), TO_LIMB_T(0x040ab3263eff0206) } }; frobenius_map_fp2(ret[0], a[0], n); frobenius_map_fp2(ret[1], a[1], n); frobenius_map_fp2(ret[2], a[2], n); --n; /* implied ONE_MONT_P at index 0 */ mul_fp2(ret[1], ret[1], coeffs1[n]); mul_fp(ret[2][0], ret[2][0], coeffs2[n]); mul_fp(ret[2][1], ret[2][1], coeffs2[n]); }
O3
c
frobenius_map_fp6: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, -0x30(%rbp) movq %rsi, %r12 movq %rdi, %rbx movups (%rsi), %xmm0 movups 0x10(%rsi), %xmm1 movups 0x20(%rsi), %xmm2 movups %xmm2, 0x20(%rdi) movups %xmm1, 0x10(%rdi) movups %xmm0, (%rdi) addq $0x30, %rdi addq $0x30, %rsi movl %edx, %r15d andl $0x1, %r15d leaq 0x17d2a(%rip), %r14 # 0x3fb10 movq %r15, %rdx movq %r14, %rcx callq 0x2f2c0 leaq 0x60(%rbx), %r13 movups 0x60(%r12), %xmm0 movups 0x70(%r12), %xmm1 movups 0x80(%r12), %xmm2 movups %xmm2, 0x80(%rbx) movups %xmm1, 0x70(%rbx) movups %xmm0, 0x60(%rbx) movl $0x90, %esi leaq (%rbx,%rsi), %rdi addq %r12, %rsi movq %r15, %rdx movq %r14, %rcx callq 0x2f2c0 leaq 0xc0(%rbx), %r14 movups 0xc0(%r12), %xmm0 movups 0xd0(%r12), %xmm1 movups 0xe0(%r12), %xmm2 movups %xmm2, 0xe0(%rbx) movups %xmm1, 0xd0(%rbx) movups %xmm0, 0xc0(%rbx) movl $0xf0, %eax addq %rax, %rbx addq %rax, %r12 movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx leaq 0x17c8e(%rip), %r12 # 0x3fb10 movq %r12, %rcx callq 0x2f2c0 movq -0x30(%rbp), %rax leaq (%rax,%rax,2), %r15 addq $-0x3, %r15 movq %r15, %rax shlq $0x5, %rax leaq 0x1967c(%rip), %rdx # 0x41520 addq %rax, %rdx movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD movq %r13, %rdi movq %r13, %rsi movq %r12, %rcx movq %r12, %r13 callq 0x331a0 shlq $0x4, %r15 leaq 0x19773(%rip), %r12 # 0x41640 addq %r15, %r12 movq %r14, %rdi movq %r14, %rsi movq %r12, %rdx movq %r13, %rcx movabsq $-0x760c000300030003, %r14 # imm = 0x89F3FFFCFFFCFFFD movq %r14, %r8 callq 0x344a0 movq %rbx, %rdi movq %rbx, %rsi movq %r12, %rdx movq %r13, %rcx movq %r14, %r8 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x344a0
frobenius_map_fp6: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov [rbp+var_30], rdx mov r12, rsi mov rbx, rdi movups xmm0, xmmword ptr [rsi] movups xmm1, xmmword ptr [rsi+10h] movups xmm2, xmmword ptr [rsi+20h] movups xmmword ptr [rdi+20h], xmm2 movups xmmword ptr [rdi+10h], xmm1 movups xmmword ptr [rdi], xmm0 add rdi, 30h ; '0' add rsi, 30h ; '0' mov r15d, edx and r15d, 1 lea r14, BLS12_381_P mov rdx, r15 mov rcx, r14 call cneg_mod_384 lea r13, [rbx+60h] movups xmm0, xmmword ptr [r12+60h] movups xmm1, xmmword ptr [r12+70h] movups xmm2, xmmword ptr [r12+80h] movups xmmword ptr [rbx+80h], xmm2 movups xmmword ptr [rbx+70h], xmm1 movups xmmword ptr [rbx+60h], xmm0 mov esi, 90h lea rdi, [rbx+rsi] add rsi, r12 mov rdx, r15 mov rcx, r14 call cneg_mod_384 lea r14, [rbx+0C0h] movups xmm0, xmmword ptr [r12+0C0h] movups xmm1, xmmword ptr [r12+0D0h] movups xmm2, xmmword ptr [r12+0E0h] movups xmmword ptr [rbx+0E0h], xmm2 movups xmmword ptr [rbx+0D0h], xmm1 movups xmmword ptr [rbx+0C0h], xmm0 mov eax, 0F0h add rbx, rax add r12, rax mov rdi, rbx mov rsi, r12 mov rdx, r15 lea r12, BLS12_381_P mov rcx, r12 call cneg_mod_384 mov rax, [rbp+var_30] lea r15, [rax+rax*2] add r15, 0FFFFFFFFFFFFFFFDh mov rax, r15 shl rax, 5 lea rdx, frobenius_map_fp6_coeffs1 add rdx, rax mov r8, 89F3FFFCFFFCFFFDh mov rdi, r13 mov rsi, r13 mov rcx, r12 mov r13, r12 call mul_mont_384x shl r15, 4 lea r12, frobenius_map_fp6_coeffs2 add r12, r15 mov rdi, r14 mov rsi, r14 mov rdx, r12 mov rcx, r13 mov r14, 89F3FFFCFFFCFFFDh mov r8, r14 call mul_mont_384 mov rdi, rbx mov rsi, rbx mov rdx, r12 mov rcx, r13 mov r8, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp mul_mont_384
long long frobenius_map_fp6(_OWORD *a1, __int128 *a2, long long a3) { __int128 v3; // xmm0 __int128 v4; // xmm1 long long v5; // r15 __int128 v6; // xmm0 __int128 v7; // xmm1 __int128 v8; // xmm0 __int128 v9; // xmm1 long long v10; // r15 v3 = *a2; v4 = a2[1]; a1[2] = a2[2]; a1[1] = v4; *a1 = v3; v5 = a3 & 1; cneg_mod_384(a1 + 3, a2 + 3, v5, &BLS12_381_P); v6 = a2[6]; v7 = a2[7]; a1[8] = a2[8]; a1[7] = v7; a1[6] = v6; cneg_mod_384(a1 + 9, a2 + 9, v5, &BLS12_381_P); v8 = a2[12]; v9 = a2[13]; a1[14] = a2[14]; a1[13] = v9; a1[12] = v8; cneg_mod_384(a1 + 15, a2 + 15, v5, &BLS12_381_P); mul_mont_384x(a1 + 6, a1 + 6, (char *)&frobenius_map_fp6_coeffs1 + 96 * a3 - 96, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); v10 = 16 * (3 * a3 - 3); mul_mont_384(a1 + 12, a1 + 12, (char *)&frobenius_map_fp6_coeffs2 + v10, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); return mul_mont_384(a1 + 15, a1 + 15, (char *)&frobenius_map_fp6_coeffs2 + v10, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); }
frobenius_map_fp6: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV qword ptr [RBP + -0x30],RDX MOV R12,RSI MOV RBX,RDI MOVUPS XMM0,xmmword ptr [RSI] MOVUPS XMM1,xmmword ptr [RSI + 0x10] MOVUPS XMM2,xmmword ptr [RSI + 0x20] MOVUPS xmmword ptr [RDI + 0x20],XMM2 MOVUPS xmmword ptr [RDI + 0x10],XMM1 MOVUPS xmmword ptr [RDI],XMM0 ADD RDI,0x30 ADD RSI,0x30 MOV R15D,EDX AND R15D,0x1 LEA R14,[0x13fb10] MOV RDX,R15 MOV RCX,R14 CALL 0x0012f2c0 LEA R13,[RBX + 0x60] MOVUPS XMM0,xmmword ptr [R12 + 0x60] MOVUPS XMM1,xmmword ptr [R12 + 0x70] MOVUPS XMM2,xmmword ptr [R12 + 0x80] MOVUPS xmmword ptr [RBX + 0x80],XMM2 MOVUPS xmmword ptr [RBX + 0x70],XMM1 MOVUPS xmmword ptr [RBX + 0x60],XMM0 MOV ESI,0x90 LEA RDI,[RBX + RSI*0x1] ADD RSI,R12 MOV RDX,R15 MOV RCX,R14 CALL 0x0012f2c0 LEA R14,[RBX + 0xc0] MOVUPS XMM0,xmmword ptr [R12 + 0xc0] MOVUPS XMM1,xmmword ptr [R12 + 0xd0] MOVUPS XMM2,xmmword ptr [R12 + 0xe0] MOVUPS xmmword ptr [RBX + 0xe0],XMM2 MOVUPS xmmword ptr [RBX + 0xd0],XMM1 MOVUPS xmmword ptr [RBX + 0xc0],XMM0 MOV EAX,0xf0 ADD RBX,RAX ADD R12,RAX MOV RDI,RBX MOV RSI,R12 MOV RDX,R15 LEA R12,[0x13fb10] MOV RCX,R12 CALL 0x0012f2c0 MOV RAX,qword ptr [RBP + -0x30] LEA R15,[RAX + RAX*0x2] ADD R15,-0x3 MOV RAX,R15 SHL RAX,0x5 LEA RDX,[0x141520] ADD RDX,RAX MOV R8,-0x760c000300030003 MOV RDI,R13 MOV RSI,R13 MOV RCX,R12 MOV R13,R12 CALL 0x001331a0 SHL R15,0x4 LEA R12,[0x141640] ADD R12,R15 MOV RDI,R14 MOV RSI,R14 MOV RDX,R12 MOV RCX,R13 MOV R14,-0x760c000300030003 MOV R8,R14 CALL 0x001344a0 MOV RDI,RBX MOV RSI,RBX MOV RDX,R12 MOV RCX,R13 MOV R8,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001344a0
void frobenius_map_fp6(int4 *param_1,int4 *param_2,long param_3) { int4 uVar1; int4 uVar2; int4 uVar3; int4 uVar4; int4 uVar5; int4 uVar6; int4 uVar7; int4 uVar8; int4 uVar9; int4 uVar10; int4 uVar11; int4 *puVar12; uint uVar13; long lVar14; uVar1 = *param_2; uVar2 = param_2[1]; uVar3 = param_2[2]; uVar4 = param_2[3]; uVar5 = param_2[4]; uVar6 = param_2[5]; uVar7 = param_2[6]; uVar8 = param_2[7]; uVar9 = param_2[9]; uVar10 = param_2[10]; uVar11 = param_2[0xb]; param_1[8] = param_2[8]; param_1[9] = uVar9; param_1[10] = uVar10; param_1[0xb] = uVar11; param_1[4] = uVar5; param_1[5] = uVar6; param_1[6] = uVar7; param_1[7] = uVar8; *param_1 = uVar1; param_1[1] = uVar2; param_1[2] = uVar3; param_1[3] = uVar4; uVar13 = (uint)param_3 & 1; cneg_mod_384(param_1 + 0xc,param_2 + 0xc,uVar13,BLS12_381_P); uVar1 = param_2[0x18]; uVar2 = param_2[0x19]; uVar3 = param_2[0x1a]; uVar4 = param_2[0x1b]; uVar5 = param_2[0x1c]; uVar6 = param_2[0x1d]; uVar7 = param_2[0x1e]; uVar8 = param_2[0x1f]; uVar9 = param_2[0x21]; uVar10 = param_2[0x22]; uVar11 = param_2[0x23]; param_1[0x20] = param_2[0x20]; param_1[0x21] = uVar9; param_1[0x22] = uVar10; param_1[0x23] = uVar11; param_1[0x1c] = uVar5; param_1[0x1d] = uVar6; param_1[0x1e] = uVar7; param_1[0x1f] = uVar8; param_1[0x18] = uVar1; param_1[0x19] = uVar2; param_1[0x1a] = uVar3; param_1[0x1b] = uVar4; cneg_mod_384(param_1 + 0x24,param_2 + 0x24,uVar13,BLS12_381_P); uVar1 = param_2[0x30]; uVar2 = param_2[0x31]; uVar3 = param_2[0x32]; uVar4 = param_2[0x33]; uVar5 = param_2[0x34]; uVar6 = param_2[0x35]; uVar7 = param_2[0x36]; uVar8 = param_2[0x37]; uVar9 = param_2[0x39]; uVar10 = param_2[0x3a]; uVar11 = param_2[0x3b]; param_1[0x38] = param_2[0x38]; param_1[0x39] = uVar9; param_1[0x3a] = uVar10; param_1[0x3b] = uVar11; param_1[0x34] = uVar5; param_1[0x35] = uVar6; param_1[0x36] = uVar7; param_1[0x37] = uVar8; param_1[0x30] = uVar1; param_1[0x31] = uVar2; param_1[0x32] = uVar3; param_1[0x33] = uVar4; puVar12 = param_1 + 0x3c; cneg_mod_384(puVar12,param_2 + 0x3c,uVar13,BLS12_381_P); lVar14 = param_3 * 3 + -3; mul_mont_384x(param_1 + 0x18,param_1 + 0x18,frobenius_map_fp6_coeffs1 + lVar14 * 0x20,BLS12_381_P, 0x89f3fffcfffcfffd); mul_mont_384(param_1 + 0x30,param_1 + 0x30,frobenius_map_fp6_coeffs2 + lVar14 * 0x10,BLS12_381_P, 0x89f3fffcfffcfffd); mul_mont_384(puVar12,puVar12,frobenius_map_fp6_coeffs2 + lVar14 * 0x10,BLS12_381_P, 0x89f3fffcfffcfffd); return; }
5,506
TIME_to_ulonglong
eloqsql/client/../sql-common/my_time.c
ulonglong TIME_to_ulonglong(const MYSQL_TIME *my_time) { switch (my_time->time_type) { case MYSQL_TIMESTAMP_DATETIME: return TIME_to_ulonglong_datetime(my_time); case MYSQL_TIMESTAMP_DATE: return TIME_to_ulonglong_date(my_time); case MYSQL_TIMESTAMP_TIME: return TIME_to_ulonglong_time(my_time); case MYSQL_TIMESTAMP_NONE: case MYSQL_TIMESTAMP_ERROR: return 0; default: DBUG_ASSERT(0); } return 0; }
O0
c
TIME_to_ulonglong: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movl 0x24(%rax), %eax addl $0x2, %eax movl %eax, %ecx movq %rcx, -0x18(%rbp) subl $0x4, %eax ja 0x4a06c movq -0x18(%rbp), %rax leaq 0xc55e4(%rip), %rcx # 0x10f610 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x10(%rbp), %rdi callq 0x49f40 movq %rax, -0x8(%rbp) jmp 0x4a07a movq -0x10(%rbp), %rdi callq 0x49fa0 movq %rax, -0x8(%rbp) jmp 0x4a07a movq -0x10(%rbp), %rdi callq 0x49fd0 movq %rax, -0x8(%rbp) jmp 0x4a07a movq $0x0, -0x8(%rbp) jmp 0x4a07a jmp 0x4a06e jmp 0x4a070 jmp 0x4a072 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
TIME_to_ulonglong: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov eax, [rax+24h] add eax, 2; switch 5 cases mov ecx, eax mov [rbp+var_18], rcx sub eax, 4 ja short def_4A033; jumptable 000000000004A033 default case mov rax, [rbp+var_18] lea rcx, jpt_4A033 movsxd rax, ds:(jpt_4A033 - 10F610h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_4A035: mov rdi, [rbp+var_10]; jumptable 000000000004A033 case 1 call TIME_to_ulonglong_datetime mov [rbp+var_8], rax jmp short loc_4A07A loc_4A044: mov rdi, [rbp+var_10]; jumptable 000000000004A033 case 0 call TIME_to_ulonglong_date mov [rbp+var_8], rax jmp short loc_4A07A loc_4A053: mov rdi, [rbp+var_10]; jumptable 000000000004A033 case 2 call TIME_to_ulonglong_time mov [rbp+var_8], rax jmp short loc_4A07A loc_4A062: mov [rbp+var_8], 0; jumptable 000000000004A033 cases -2,-1 jmp short loc_4A07A def_4A033: jmp short $+2; jumptable 000000000004A033 default case loc_4A06E: jmp short $+2 loc_4A070: jmp short $+2 loc_4A072: mov [rbp+var_8], 0 loc_4A07A: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
long long TIME_to_ulonglong(unsigned int *a1) { long long v2; // [rsp+18h] [rbp-8h] switch ( a1[9] ) { case 0xFFFFFFFE: case 0xFFFFFFFF: v2 = 0LL; break; case 0u: v2 = TIME_to_ulonglong_date(a1); break; case 1u: v2 = TIME_to_ulonglong_datetime(a1); break; case 2u: v2 = TIME_to_ulonglong_time(a1); break; default: v2 = 0LL; break; } return v2; }
TIME_to_ulonglong: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x24] ADD EAX,0x2 MOV ECX,EAX MOV qword ptr [RBP + -0x18],RCX SUB EAX,0x4 JA 0x0014a06c MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[0x20f610] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00149f40 MOV qword ptr [RBP + -0x8],RAX JMP 0x0014a07a caseD_0: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00149fa0 MOV qword ptr [RBP + -0x8],RAX JMP 0x0014a07a caseD_2: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00149fd0 MOV qword ptr [RBP + -0x8],RAX JMP 0x0014a07a caseD_fffffffe: MOV qword ptr [RBP + -0x8],0x0 JMP 0x0014a07a default: JMP 0x0014a06e LAB_0014a06e: JMP 0x0014a070 LAB_0014a070: JMP 0x0014a072 LAB_0014a072: MOV qword ptr [RBP + -0x8],0x0 LAB_0014a07a: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
int8 TIME_to_ulonglong(long param_1) { int8 local_10; switch(*(int4 *)(param_1 + 0x24)) { case 0: local_10 = TIME_to_ulonglong_date(param_1); break; case 1: local_10 = TIME_to_ulonglong_datetime(param_1); break; case 2: local_10 = TIME_to_ulonglong_time(param_1); break; case 0xfffffffe: case 0xffffffff: local_10 = 0; break; default: local_10 = 0; } return local_10; }
5,507
pvio_socket_shutdown
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
int pvio_socket_shutdown(MARIADB_PVIO *pvio) { if (pvio && pvio->data) { my_socket s = ((struct st_pvio_socket *)pvio->data)->socket; #ifdef _WIN32 shutdown(s, SD_BOTH); CancelIoEx((HANDLE)s, NULL); #else shutdown(s, SHUT_RDWR); #endif } return -1; }
O0
c
pvio_socket_shutdown: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0x69366 movq -0x8(%rbp), %rax cmpq $0x0, (%rax) je 0x69366 movq -0x8(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0xc(%rbp) movl -0xc(%rbp), %edi movl $0x2, %esi callq 0x375d0 movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
pvio_socket_shutdown: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi cmp [rbp+var_8], 0 jz short loc_69366 mov rax, [rbp+var_8] cmp qword ptr [rax], 0 jz short loc_69366 mov rax, [rbp+var_8] mov rax, [rax] mov eax, [rax] mov [rbp+var_C], eax mov edi, [rbp+var_C] mov esi, 2 call _shutdown loc_69366: mov eax, 0FFFFFFFFh add rsp, 10h pop rbp retn
long long pvio_socket_shutdown(_QWORD *a1) { if ( a1 && *a1 ) shutdown(*(unsigned int *)*a1, 2LL); return 0xFFFFFFFFLL; }
pvio_socket_shutdown: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI CMP qword ptr [RBP + -0x8],0x0 JZ 0x00169366 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX],0x0 JZ 0x00169366 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0xc],EAX MOV EDI,dword ptr [RBP + -0xc] MOV ESI,0x2 CALL 0x001375d0 LAB_00169366: MOV EAX,0xffffffff ADD RSP,0x10 POP RBP RET
int8 pvio_socket_shutdown(long *param_1) { if ((param_1 != (long *)0x0) && (*param_1 != 0)) { shutdown(*(int *)*param_1,2); } return 0xffffffff; }
5,508
uf_varchar2
eloqsql/storage/myisam/mi_packrec.c
static void uf_varchar2(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uchar *end __attribute__((unused))) { if (get_bit(bit_buff)) to[0]=to[1]=0; /* Zero lengths */ else { ulong length=get_bits(bit_buff,rec->space_length_bits); int2store(to,length); decode_bytes(rec,bit_buff,to+2,to+2+length); } }
O0
c
uf_varchar2: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x4(%rax) je 0xbfba7 movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x4(%rdx) movl $0x1, %edx shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax jne 0xbfbcb jmp 0xbfbdf movq -0x10(%rbp), %rdi callq 0xbe180 movq -0x10(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0xbfbdf movq -0x18(%rbp), %rax movb $0x0, 0x1(%rax) movq -0x18(%rbp), %rax movb $0x0, (%rax) jmp 0xbfc75 movq -0x10(%rbp), %rax movl 0x4(%rax), %eax movq -0x8(%rbp), %rcx cmpl 0x1c(%rcx), %eax jb 0xbfc22 movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x8(%rbp), %rcx movl 0x1c(%rcx), %esi movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx subl %esi, %ecx movl %ecx, 0x4(%rdx) shrl %cl, %eax movq -0x8(%rbp), %rcx movl 0x1c(%rcx), %ecx movl %ecx, %edx leaq 0x20ad76(%rip), %rcx # 0x2ca990 andl (%rcx,%rdx,4), %eax movl %eax, -0x34(%rbp) jmp 0xbfc35 movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x1c(%rax), %esi callq 0xbc930 movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax movl %eax, %eax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movw %ax, %cx movq -0x30(%rbp), %rax movw %cx, (%rax) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx addq $0x2, %rdx movq -0x18(%rbp), %rcx addq $0x2, %rcx addq -0x28(%rbp), %rcx callq 0xbe890 addq $0x40, %rsp popq %rbp retq nopl (%rax,%rax)
uf_varchar2_0: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_10] cmp dword ptr [rax+4], 0 jz short loc_BFBA7 mov rax, [rbp+var_10] mov eax, [rax] mov rdx, [rbp+var_10] mov ecx, [rdx+4] add ecx, 0FFFFFFFFh mov [rdx+4], ecx mov edx, 1 shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jnz short loc_BFBCB jmp short loc_BFBDF loc_BFBA7: mov rdi, [rbp+var_10] call fill_buffer_0 mov rax, [rbp+var_10] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_10] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz short loc_BFBDF loc_BFBCB: mov rax, [rbp+var_18] mov byte ptr [rax+1], 0 mov rax, [rbp+var_18] mov byte ptr [rax], 0 jmp loc_BFC75 loc_BFBDF: mov rax, [rbp+var_10] mov eax, [rax+4] mov rcx, [rbp+var_8] cmp eax, [rcx+1Ch] jb short loc_BFC22 mov rax, [rbp+var_10] mov eax, [rax] mov rcx, [rbp+var_8] mov esi, [rcx+1Ch] mov rdx, [rbp+var_10] mov ecx, [rdx+4] sub ecx, esi mov [rdx+4], ecx shr eax, cl mov rcx, [rbp+var_8] mov ecx, [rcx+1Ch] mov edx, ecx lea rcx, mask_0 and eax, [rcx+rdx*4] mov [rbp+var_34], eax jmp short loc_BFC35 loc_BFC22: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov esi, [rax+1Ch] call fill_and_get_bits_0 mov [rbp+var_34], eax loc_BFC35: mov eax, [rbp+var_34] mov eax, eax mov [rbp+var_28], rax mov rax, [rbp+var_18] mov [rbp+var_30], rax mov rax, [rbp+var_28] mov cx, ax mov rax, [rbp+var_30] mov [rax], cx mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] add rdx, 2 mov rcx, [rbp+var_18] add rcx, 2 add rcx, [rbp+var_28] call decode_bytes_0 loc_BFC75: add rsp, 40h pop rbp retn
long long uf_varchar2_0(long long a1, int *a2, _BYTE *a3) { int v3; // eax int v4; // ecx long long result; // rax unsigned int v6; // eax int v7; // ecx int bits_0; // [rsp+Ch] [rbp-34h] if ( a2[1] ) { v3 = *a2; v4 = a2[1] - 1; a2[1] = v4; if ( ((1 << v4) & v3) == 0 ) goto LABEL_6; LABEL_5: a3[1] = 0; result = (long long)a3; *a3 = 0; return result; } fill_buffer_0((long long)a2); a2[1] = 31; if ( *a2 < 0 ) goto LABEL_5; LABEL_6: if ( (unsigned int)a2[1] < *(_DWORD *)(a1 + 28) ) { bits_0 = fill_and_get_bits_0(a2, *(_DWORD *)(a1 + 28)); } else { v6 = *a2; v7 = a2[1] - *(_DWORD *)(a1 + 28); a2[1] = v7; bits_0 = mask_0[*(unsigned int *)(a1 + 28)] & (v6 >> v7); } *(_WORD *)a3 = bits_0; return decode_bytes_0(a1, (long long)a2, a3 + 2, &a3[bits_0 + 2]); }
uf_varchar2: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4],0x0 JZ 0x001bfba7 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] ADD ECX,-0x1 MOV dword ptr [RDX + 0x4],ECX MOV EDX,0x1 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JNZ 0x001bfbcb JMP 0x001bfbdf LAB_001bfba7: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001be180 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x001bfbdf LAB_001bfbcb: MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x1],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],0x0 JMP 0x001bfc75 LAB_001bfbdf: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0x1c] JC 0x001bfc22 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RCX + 0x1c] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] SUB ECX,ESI MOV dword ptr [RDX + 0x4],ECX SHR EAX,CL MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x1c] MOV EDX,ECX LEA RCX,[0x3ca990] AND EAX,dword ptr [RCX + RDX*0x4] MOV dword ptr [RBP + -0x34],EAX JMP 0x001bfc35 LAB_001bfc22: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RAX + 0x1c] CALL 0x001bc930 MOV dword ptr [RBP + -0x34],EAX LAB_001bfc35: MOV EAX,dword ptr [RBP + -0x34] MOV EAX,EAX MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] MOV CX,AX MOV RAX,qword ptr [RBP + -0x30] MOV word ptr [RAX],CX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] ADD RDX,0x2 MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x2 ADD RCX,qword ptr [RBP + -0x28] CALL 0x001be890 LAB_001bfc75: ADD RSP,0x40 POP RBP RET
void uf_varchar2(long param_1,uint *param_2,int2 *param_3) { uint uVar1; uint local_3c; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar1 = *param_2 & 0x80000000; } else { uVar1 = param_2[1]; param_2[1] = uVar1 - 1; uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 == 0) { if (param_2[1] < *(uint *)(param_1 + 0x1c)) { local_3c = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x1c)); } else { uVar1 = param_2[1] - *(int *)(param_1 + 0x1c); param_2[1] = uVar1; local_3c = *param_2 >> ((byte)uVar1 & 0x1f) & *(uint *)(mask + (ulong)*(uint *)(param_1 + 0x1c) * 4); } *param_3 = (short)local_3c; decode_bytes(param_1,param_2,param_3 + 1,(int1 *)((long)param_3 + (ulong)local_3c + 2)); } else { *(int1 *)((long)param_3 + 1) = 0; *(int1 *)param_3 = 0; } return; }
5,509
my_wc_mb_euc_kr
eloqsql/strings/ctype-euc_kr.c
static int my_wc_mb_euc_kr(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; if (s >= e) return MY_CS_TOOSMALL; if ((uint) wc < 0x80) { s[0]= (uchar) wc; return 1; } if (!(code=func_uni_ksc5601_onechar(wc))) return MY_CS_ILUNI; if (s+2>e) return MY_CS_TOOSMALL2; s[0]=code>>8; s[1]=code&0xFF; return 2; }
O3
c
my_wc_mb_euc_kr: movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0xb702a cmpl $0x7f, %esi ja 0xb702b movb %sil, (%rdx) movl $0x1, %eax retq leal -0xa1(%rsi), %eax cmpl $0xc6, %eax ja 0xb7046 movl %eax, %eax leaq 0x9d17f(%rip), %rsi # 0x1541c0 jmp 0xb713e leal -0x2c7(%rsi), %eax cmpl $0x18a, %eax # imm = 0x18A ja 0xb7061 movl %eax, %eax leaq 0x9d2f4(%rip), %rsi # 0x154350 jmp 0xb713e leal -0x2015(%rsi), %eax cmpl $0x2fd, %eax # imm = 0x2FD ja 0xb707c movl %eax, %eax leaq 0x9d5f9(%rip), %rsi # 0x154670 jmp 0xb713e leal -0x2460(%rsi), %eax cmpl $0x20d, %eax # imm = 0x20D ja 0xb7097 movl %eax, %eax leaq 0x9dbde(%rip), %rsi # 0x154c70 jmp 0xb713e leal -0x3000(%rsi), %eax cmpl $0x27f, %eax # imm = 0x27F ja 0xb70b2 movl %eax, %eax leaq 0x9dfe3(%rip), %rsi # 0x155090 jmp 0xb713e leal -0x3380(%rsi), %eax cmpl $0x5d, %eax ja 0xb70c8 movl %eax, %eax leaq 0x9e4ca(%rip), %rsi # 0x155590 jmp 0xb713e leal -0x4e00(%rsi), %eax cmpl $0x467f, %eax # imm = 0x467F ja 0xb70e0 movl %eax, %eax leaq 0x9e572(%rip), %rsi # 0x155650 jmp 0xb713e leal -0x9577(%rsi), %eax cmpl $0xa25, %eax # imm = 0xA25 ja 0xb70f8 movl %eax, %eax leaq 0xa725a(%rip), %rsi # 0x15e350 jmp 0xb713e leal -0xac00(%rsi), %eax cmpl $0x2ba3, %eax # imm = 0x2BA3 ja 0xb7110 movl %eax, %eax leaq 0xa8692(%rip), %rsi # 0x15f7a0 jmp 0xb713e leal -0xf900(%rsi), %eax cmpl $0x10b, %eax # imm = 0x10B ja 0xb7128 movl %eax, %eax leaq 0xaddca(%rip), %rsi # 0x164ef0 jmp 0xb713e leal -0xff01(%rsi), %eax cmpl $0xe5, %eax ja 0xb716e movl %eax, %eax leaq 0xadfd2(%rip), %rsi # 0x165110 leaq (%rsi,%rax,2), %rax pushq %rbp movq %rsp, %rbp movzwl (%rax), %esi testw %si, %si je 0xb716a leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0xb716c rolw $0x8, %si movw %si, (%rdx) movl $0x2, %eax jmp 0xb716c xorl %eax, %eax popq %rbp retq xorl %eax, %eax retq
my_wc_mb_euc_kr: mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short locret_B702A cmp esi, 7Fh ja short loc_B702B mov [rdx], sil mov eax, 1 locret_B702A: retn loc_B702B: lea eax, [rsi-0A1h] cmp eax, 0C6h ja short loc_B7046 mov eax, eax lea rsi, tab_uni_ksc56010 jmp loc_B713E loc_B7046: lea eax, [rsi-2C7h] cmp eax, 18Ah ja short loc_B7061 mov eax, eax lea rsi, tab_uni_ksc56011 jmp loc_B713E loc_B7061: lea eax, [rsi-2015h] cmp eax, 2FDh ja short loc_B707C mov eax, eax lea rsi, tab_uni_ksc56012 jmp loc_B713E loc_B707C: lea eax, [rsi-2460h] cmp eax, 20Dh ja short loc_B7097 mov eax, eax lea rsi, tab_uni_ksc56013 jmp loc_B713E loc_B7097: lea eax, [rsi-3000h] cmp eax, 27Fh ja short loc_B70B2 mov eax, eax lea rsi, tab_uni_ksc56014 jmp loc_B713E loc_B70B2: lea eax, [rsi-3380h] cmp eax, 5Dh ; ']' ja short loc_B70C8 mov eax, eax lea rsi, tab_uni_ksc56015 jmp short loc_B713E loc_B70C8: lea eax, [rsi-4E00h] cmp eax, 467Fh ja short loc_B70E0 mov eax, eax lea rsi, tab_uni_ksc56016 jmp short loc_B713E loc_B70E0: lea eax, [rsi-9577h] cmp eax, 0A25h ja short loc_B70F8 mov eax, eax lea rsi, tab_uni_ksc56017 jmp short loc_B713E loc_B70F8: lea eax, [rsi-0AC00h] cmp eax, 2BA3h ja short loc_B7110 mov eax, eax lea rsi, tab_uni_ksc56018 jmp short loc_B713E loc_B7110: lea eax, [rsi-0F900h] cmp eax, 10Bh ja short loc_B7128 mov eax, eax lea rsi, tab_uni_ksc56019 jmp short loc_B713E loc_B7128: lea eax, [rsi-0FF01h] cmp eax, 0E5h ja short loc_B716E mov eax, eax lea rsi, tab_uni_ksc560110 loc_B713E: lea rax, [rsi+rax*2] push rbp mov rbp, rsp movzx esi, word ptr [rax] test si, si jz short loc_B716A lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_B716C rol si, 8 mov [rdx], si mov eax, 2 jmp short loc_B716C loc_B716A: xor eax, eax loc_B716C: pop rbp retn loc_B716E: xor eax, eax retn
long long my_wc_mb_euc_kr(long long a1, unsigned int a2, _WORD *a3, unsigned long long a4) { long long result; // rax long long v5; // rax _WORD *v6; // rsi __int16 v7; // si result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { if ( a2 > 0x7F ) { LODWORD(v5) = a2 - 161; if ( a2 - 161 > 0xC6 ) { LODWORD(v5) = a2 - 711; if ( a2 - 711 > 0x18A ) { LODWORD(v5) = a2 - 8213; if ( a2 - 8213 > 0x2FD ) { LODWORD(v5) = a2 - 9312; if ( a2 - 9312 > 0x20D ) { LODWORD(v5) = a2 - 12288; if ( a2 - 12288 > 0x27F ) { LODWORD(v5) = a2 - 13184; if ( a2 - 13184 > 0x5D ) { LODWORD(v5) = a2 - 19968; if ( a2 - 19968 > 0x467F ) { LODWORD(v5) = a2 - 38263; if ( a2 - 38263 > 0xA25 ) { LODWORD(v5) = a2 - 44032; if ( a2 - 44032 > 0x2BA3 ) { LODWORD(v5) = a2 - 63744; if ( a2 - 63744 > 0x10B ) { LODWORD(v5) = a2 - 65281; if ( a2 - 65281 > 0xE5 ) return 0LL; v5 = (unsigned int)v5; v6 = &tab_uni_ksc560110; } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56019; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56018; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56017; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56016; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56015; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56014; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56013; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56012; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56011; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56010; } v7 = v6[v5]; if ( v7 ) { result = 4294967194LL; if ( (unsigned long long)(a3 + 1) <= a4 ) { *a3 = __ROL2__(v7, 8); return 2LL; } } else { return 0LL; } } else { *(_BYTE *)a3 = a2; return 1LL; } } return result; }
my_wc_mb_euc_kr: MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x001b702a CMP ESI,0x7f JA 0x001b702b MOV byte ptr [RDX],SIL MOV EAX,0x1 LAB_001b702a: RET LAB_001b702b: LEA EAX,[RSI + -0xa1] CMP EAX,0xc6 JA 0x001b7046 MOV EAX,EAX LEA RSI,[0x2541c0] JMP 0x001b713e LAB_001b7046: LEA EAX,[RSI + -0x2c7] CMP EAX,0x18a JA 0x001b7061 MOV EAX,EAX LEA RSI,[0x254350] JMP 0x001b713e LAB_001b7061: LEA EAX,[RSI + -0x2015] CMP EAX,0x2fd JA 0x001b707c MOV EAX,EAX LEA RSI,[0x254670] JMP 0x001b713e LAB_001b707c: LEA EAX,[RSI + -0x2460] CMP EAX,0x20d JA 0x001b7097 MOV EAX,EAX LEA RSI,[0x254c70] JMP 0x001b713e LAB_001b7097: LEA EAX,[RSI + -0x3000] CMP EAX,0x27f JA 0x001b70b2 MOV EAX,EAX LEA RSI,[0x255090] JMP 0x001b713e LAB_001b70b2: LEA EAX,[RSI + -0x3380] CMP EAX,0x5d JA 0x001b70c8 MOV EAX,EAX LEA RSI,[0x255590] JMP 0x001b713e LAB_001b70c8: LEA EAX,[RSI + -0x4e00] CMP EAX,0x467f JA 0x001b70e0 MOV EAX,EAX LEA RSI,[0x255650] JMP 0x001b713e LAB_001b70e0: LEA EAX,[RSI + -0x9577] CMP EAX,0xa25 JA 0x001b70f8 MOV EAX,EAX LEA RSI,[0x25e350] JMP 0x001b713e LAB_001b70f8: LEA EAX,[RSI + -0xac00] CMP EAX,0x2ba3 JA 0x001b7110 MOV EAX,EAX LEA RSI,[0x25f7a0] JMP 0x001b713e LAB_001b7110: LEA EAX,[RSI + -0xf900] CMP EAX,0x10b JA 0x001b7128 MOV EAX,EAX LEA RSI,[0x264ef0] JMP 0x001b713e LAB_001b7128: LEA EAX,[RSI + -0xff01] CMP EAX,0xe5 JA 0x001b716e MOV EAX,EAX LEA RSI,[0x265110] LAB_001b713e: LEA RAX,[RSI + RAX*0x2] PUSH RBP MOV RBP,RSP MOVZX ESI,word ptr [RAX] TEST SI,SI JZ 0x001b716a LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x001b716c ROL SI,0x8 MOV word ptr [RDX],SI MOV EAX,0x2 JMP 0x001b716c LAB_001b716a: XOR EAX,EAX LAB_001b716c: POP RBP RET LAB_001b716e: XOR EAX,EAX RET
int8 my_wc_mb_euc_kr(int8 param_1,uint param_2,ushort *param_3,ushort *param_4) { ushort uVar1; int8 uVar2; ulong uVar3; int1 *puVar4; uVar2 = 0xffffff9b; if (param_3 < param_4) { if (0x7f < param_2) { if (param_2 - 0xa1 < 199) { uVar3 = (ulong)(param_2 - 0xa1); puVar4 = tab_uni_ksc56010; } else if (param_2 - 0x2c7 < 0x18b) { uVar3 = (ulong)(param_2 - 0x2c7); puVar4 = tab_uni_ksc56011; } else if (param_2 - 0x2015 < 0x2fe) { uVar3 = (ulong)(param_2 - 0x2015); puVar4 = tab_uni_ksc56012; } else if (param_2 - 0x2460 < 0x20e) { uVar3 = (ulong)(param_2 - 0x2460); puVar4 = tab_uni_ksc56013; } else if (param_2 - 0x3000 < 0x280) { uVar3 = (ulong)(param_2 - 0x3000); puVar4 = tab_uni_ksc56014; } else if (param_2 - 0x3380 < 0x5e) { uVar3 = (ulong)(param_2 - 0x3380); puVar4 = tab_uni_ksc56015; } else if (param_2 - 0x4e00 < 0x4680) { uVar3 = (ulong)(param_2 - 0x4e00); puVar4 = tab_uni_ksc56016; } else if (param_2 - 0x9577 < 0xa26) { uVar3 = (ulong)(param_2 - 0x9577); puVar4 = tab_uni_ksc56017; } else if (param_2 - 0xac00 < 0x2ba4) { uVar3 = (ulong)(param_2 - 0xac00); puVar4 = tab_uni_ksc56018; } else if (param_2 - 0xf900 < 0x10c) { uVar3 = (ulong)(param_2 - 0xf900); puVar4 = tab_uni_ksc56019; } else { uVar3 = (ulong)(param_2 - 0xff01); if (0xe5 < param_2 - 0xff01) { return 0; } puVar4 = tab_uni_ksc560110; } uVar1 = *(ushort *)(puVar4 + uVar3 * 2); if (uVar1 == 0) { uVar2 = 0; } else { uVar2 = 0xffffff9a; if (param_3 + 1 <= param_4) { *param_3 = uVar1 << 8 | uVar1 >> 8; uVar2 = 2; } } return uVar2; } *(char *)param_3 = (char)param_2; uVar2 = 1; } return uVar2; }
5,510
CLI::Option::Option(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::function<bool (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&)>, CLI::App*)
MikePodsytnik[P]TCRtrie/build_O1/_deps/cli11-src/include/CLI/Option.hpp
Option(std::string option_name, std::string option_description, callback_t callback, App *parent) : description_(std::move(option_description)), parent_(parent), callback_(std::move(callback)) { std::tie(snames_, lnames_, pname_) = detail::get_names(detail::split_names(option_name)); }
O1
cpp
CLI::Option::Option(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::function<bool (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&)>, CLI::App*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xd8, %rsp movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, 0x20(%rsp) movq %rax, (%rdi) movl $0x6974704f, 0x10(%rdi) # imm = 0x6974704F movl $0x736e6f69, 0x13(%rdi) # imm = 0x736E6F69 movq $0x7, 0x8(%rdi) xorl %eax, %eax movb %al, 0x17(%rdi) movl $0x1000000, 0x20(%rdi) # imm = 0x1000000 addq $0x98, %rdi xorps %xmm0, %xmm0 movups %xmm0, 0x24(%rbx) movups %xmm0, 0x34(%rbx) movups %xmm0, 0x44(%rbx) movups %xmm0, 0x54(%rbx) movups %xmm0, 0x64(%rbx) movups %xmm0, 0x74(%rbx) movl $0x0, 0x84(%rbx) movq %rdi, 0x18(%rsp) movq %rdi, 0x88(%rbx) movq %rax, 0x90(%rbx) movb %al, 0x98(%rbx) leaq 0xb8(%rbx), %rdi movq %rdi, 0x10(%rsp) movq %rdi, 0xa8(%rbx) movq %rax, 0xb0(%rbx) movb %al, 0xb8(%rbx) leaq 0xd8(%rbx), %rbp movq %rbp, 0xc8(%rbx) movq (%rdx), %rdi leaq 0x10(%rdx), %rax cmpq %rax, %rdi je 0x1b8f4 movq %rdi, 0xc8(%rbx) movq (%rax), %rdi movq %rdi, 0xd8(%rbx) jmp 0x1b8fb movups (%rax), %xmm0 movups %xmm0, (%rbp) movq 0x8(%rdx), %rdi movq %rdi, 0xd0(%rbx) movq %rax, (%rdx) xorl %eax, %eax movq %rax, 0x8(%rdx) movb %al, 0x10(%rdx) leaq 0xf8(%rbx), %rdx movq %rdx, 0x8(%rsp) movq %rdx, 0xe8(%rbx) movq %rax, 0xf0(%rbx) movb %al, 0xf8(%rbx) leaq 0x118(%rbx), %r15 movq %r15, 0x108(%rbx) movq %rax, 0x110(%rbx) movb %al, 0x118(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x128(%rbx) leaq 0xdd8(%rip), %rdx # 0x1c736 movq %rdx, 0x140(%rbx) leaq 0xde2(%rip), %rdx # 0x1c74e movq %rdx, 0x138(%rbx) movups %xmm0, 0x148(%rbx) movups %xmm0, 0x158(%rbx) movaps 0x1b688(%rip), %xmm1 # 0x37010 movups %xmm1, 0x168(%rbx) leaq 0x198(%rbx), %rdx movups %xmm0, 0x1a8(%rbx) movups %xmm0, 0x178(%rbx) movups %xmm0, 0x188(%rbx) movups %xmm0, 0x198(%rbx) movq %rax, 0x1b8(%rbx) movq %rdx, 0x1a8(%rbx) movq %rdx, 0x1b0(%rbx) leaq 0x1c8(%rbx), %rdx movups %xmm0, 0x1d8(%rbx) movups %xmm0, 0x1b8(%rbx) movq %rax, 0x1e8(%rbx) movups %xmm0, 0x1c8(%rbx) movq %rdx, 0x1d8(%rbx) movq %rdx, 0x1e0(%rbx) movq %r8, 0x1f0(%rbx) leaq 0x1f8(%rbx), %r13 movups %xmm0, 0x1f8(%rbx) movq %rax, 0x208(%rbx) movq 0x18(%rcx), %rdx movq %rdx, 0x210(%rbx) cmpq %rax, 0x10(%rcx) je 0x1ba3f leaq 0x10(%rcx), %rax movups (%rcx), %xmm1 movups %xmm1, (%r13) movq 0x10(%rcx), %rcx movq %rcx, 0x208(%rbx) movups %xmm0, (%rax) leaq 0x28(%rbx), %rax movq %rax, 0x30(%rsp) leaq 0x40(%rbx), %rax movq %rax, 0x28(%rsp) leaq 0x88(%rbx), %r14 movups %xmm0, 0x238(%rbx) movups %xmm0, 0x228(%rbx) movups %xmm0, 0x218(%rbx) movq $0x0, 0x247(%rbx) leaq 0x48(%rsp), %r12 movq %r12, -0x10(%r12) movq (%rsi), %rax movq 0x8(%rsi), %rdx addq %rax, %rdx leaq 0x38(%rsp), %rdi movq %rax, %rsi callq 0x178c0 leaq 0x58(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0x1ac3d leaq 0x70(%rsp), %rdi leaq 0x58(%rsp), %rsi callq 0x1c19f leaq 0xc0(%rsp), %rdi movq %r14, (%rdi) movq 0x28(%rsp), %rax movq %rax, 0x8(%rdi) movq 0x30(%rsp), %rax movq %rax, 0x10(%rdi) leaq 0x70(%rsp), %rsi callq 0x1cf9e leaq 0xa8(%rsp), %rdi callq 0xaf62 leaq 0x90(%rsp), %rbx movq %rbx, %rdi callq 0xaf62 movq -0x20(%rbx), %rdi leaq 0x80(%rsp), %rax cmpq %rax, %rdi je 0x1bb1c movq 0x80(%rsp), %rsi incq %rsi callq 0x7430 leaq 0x58(%rsp), %rdi callq 0xaf62 movq 0x38(%rsp), %rdi cmpq %r12, %rdi je 0x1bb3d movq 0x48(%rsp), %rsi incq %rsi callq 0x7430 addq $0xd8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x1bcf5 movq %rax, (%rsp) leaq 0x58(%rsp), %rdi callq 0xaf62 jmp 0x1bb68 movq %rax, (%rsp) movq 0x38(%rsp), %rdi cmpq %r12, %rdi je 0x1bb85 movq 0x48(%rsp), %rsi incq %rsi callq 0x7430 jmp 0x1bb85 movq %rax, (%rsp) leaq 0x218(%rbx), %r12 leaq 0x230(%rbx), %rdi callq 0xaf62 movq %r12, %rdi callq 0xaf62 movq 0x208(%rbx), %rax testq %rax, %rax je 0x1bbb9 movq %r13, %rdi movq %r13, %rsi movl $0x3, %edx callq *%rax leaq 0x178(%rbx), %r12 leaq 0x190(%rbx), %r13 leaq 0x1c0(%rbx), %rdi callq 0x1dcd6 movq %r13, %rdi callq 0x1dcd6 movq %r12, %rdi callq 0x19bd8 movq 0x158(%rbx), %rax testq %rax, %rax je 0x1bc00 leaq 0x148(%rbx), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x138(%rbx), %rax testq %rax, %rax je 0x1bc1d leaq 0x128(%rbx), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x108(%rbx), %rdi cmpq %r15, %rdi je 0x1bc34 movq (%r15), %rsi incq %rsi callq 0x7430 movq 0xe8(%rbx), %rdi cmpq 0x8(%rsp), %rdi je 0x1bc52 movq 0x8(%rsp), %rax movq (%rax), %rsi incq %rsi callq 0x7430 movq 0xc8(%rbx), %rdi cmpq %rbp, %rdi je 0x1bc6a movq (%rbp), %rsi incq %rsi callq 0x7430 movq 0xa8(%rbx), %rdi cmpq 0x10(%rsp), %rdi je 0x1bc88 movq 0x10(%rsp), %rax movq (%rax), %rsi incq %rsi callq 0x7430 leaq 0x58(%rbx), %r15 leaq 0x70(%rbx), %r13 movq (%r14), %rdi cmpq 0x18(%rsp), %rdi je 0x1bcaa movq 0x18(%rsp), %rax movq (%rax), %rsi incq %rsi callq 0x7430 movq %r13, %rdi callq 0xaf62 movq %r15, %rdi callq 0x19c08 movq 0x28(%rsp), %rdi callq 0xaf62 movq 0x30(%rsp), %rdi callq 0xaf62 movq (%rbx), %rdi cmpq 0x20(%rsp), %rdi je 0x1bce8 movq 0x20(%rsp), %rax movq (%rax), %rsi incq %rsi callq 0x7430 movq (%rsp), %rdi callq 0x7780 jmp 0x1bcf5 jmp 0x1bcf5 movq %rax, %rdi callq 0xc892 nop
_ZN3CLI6OptionC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_St8functionIFbRKSt6vectorIS6_SaIS6_EEEEPNS_3AppE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0D8h mov rbx, rdi lea rax, [rdi+10h] mov [rsp+108h+var_E8], rax mov [rdi], rax mov dword ptr [rdi+10h], 6974704Fh mov dword ptr [rdi+13h], 736E6F69h mov qword ptr [rdi+8], 7 xor eax, eax mov [rdi+17h], al mov dword ptr [rdi+20h], 1000000h add rdi, 98h xorps xmm0, xmm0 movups xmmword ptr [rbx+24h], xmm0 movups xmmword ptr [rbx+34h], xmm0 movups xmmword ptr [rbx+44h], xmm0 movups xmmword ptr [rbx+54h], xmm0 movups xmmword ptr [rbx+64h], xmm0 movups xmmword ptr [rbx+74h], xmm0 mov dword ptr [rbx+84h], 0 mov [rsp+108h+var_F0], rdi mov [rbx+88h], rdi mov [rbx+90h], rax mov [rbx+98h], al lea rdi, [rbx+0B8h] mov [rsp+108h+var_F8], rdi mov [rbx+0A8h], rdi mov [rbx+0B0h], rax mov [rbx+0B8h], al lea rbp, [rbx+0D8h] mov [rbx+0C8h], rbp mov rdi, [rdx] lea rax, [rdx+10h] cmp rdi, rax jz short loc_1B8F4 mov [rbx+0C8h], rdi mov rdi, [rax] mov [rbx+0D8h], rdi jmp short loc_1B8FB loc_1B8F4: movups xmm0, xmmword ptr [rax] movups xmmword ptr [rbp+0], xmm0 loc_1B8FB: mov rdi, [rdx+8] mov [rbx+0D0h], rdi mov [rdx], rax xor eax, eax mov [rdx+8], rax mov [rdx+10h], al lea rdx, [rbx+0F8h] mov [rsp+108h+var_100], rdx mov [rbx+0E8h], rdx mov [rbx+0F0h], rax mov [rbx+0F8h], al lea r15, [rbx+118h] mov [rbx+108h], r15 mov [rbx+110h], rax mov [rbx+118h], al xorps xmm0, xmm0 movups xmmword ptr [rbx+128h], xmm0 lea rdx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEvEN3CLI6Option10type_name_MUlvE_EE9_M_invokeERKSt9_Any_data mov [rbx+140h], rdx lea rdx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEvEN3CLI6Option10type_name_MUlvE_EE10_M_managerERSt9_Any_dataRKSC_St18_Manager_operation mov [rbx+138h], rdx movups xmmword ptr [rbx+148h], xmm0 movups xmmword ptr [rbx+158h], xmm0 movaps xmm1, cs:xmmword_37010 movups xmmword ptr [rbx+168h], xmm1 lea rdx, [rbx+198h] movups xmmword ptr [rbx+1A8h], xmm0 movups xmmword ptr [rbx+178h], xmm0 movups xmmword ptr [rbx+188h], xmm0 movups xmmword ptr [rbx+198h], xmm0 mov [rbx+1B8h], rax mov [rbx+1A8h], rdx mov [rbx+1B0h], rdx lea rdx, [rbx+1C8h] movups xmmword ptr [rbx+1D8h], xmm0 movups xmmword ptr [rbx+1B8h], xmm0 mov [rbx+1E8h], rax movups xmmword ptr [rbx+1C8h], xmm0 mov [rbx+1D8h], rdx mov [rbx+1E0h], rdx mov [rbx+1F0h], r8 lea r13, [rbx+1F8h] movups xmmword ptr [rbx+1F8h], xmm0 mov [rbx+208h], rax mov rdx, [rcx+18h] mov [rbx+210h], rdx cmp [rcx+10h], rax jz short loc_1BA3F lea rax, [rcx+10h] movups xmm1, xmmword ptr [rcx] movups xmmword ptr [r13+0], xmm1 mov rcx, [rcx+10h] mov [rbx+208h], rcx movups xmmword ptr [rax], xmm0 loc_1BA3F: lea rax, [rbx+28h] mov [rsp+108h+var_D8], rax lea rax, [rbx+40h] mov [rsp+108h+var_E0], rax lea r14, [rbx+88h] movups xmmword ptr [rbx+238h], xmm0 movups xmmword ptr [rbx+228h], xmm0 movups xmmword ptr [rbx+218h], xmm0 mov qword ptr [rbx+247h], 0 lea r12, [rsp+108h+var_C0] mov [r12-10h], r12 mov rax, [rsi] mov rdx, [rsi+8] add rdx, rax lea rdi, [rsp+108h+var_D0] mov rsi, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rdi, [rsp+108h+var_B0] lea rsi, [rsp+108h+var_D0] call _ZN3CLI6detail11split_namesENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::detail::split_names(std::string) lea rdi, [rsp+108h+var_98] lea rsi, [rsp+108h+var_B0] call _ZN3CLI6detail9get_namesERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE; CLI::detail::get_names(std::vector<std::string> const&) lea rdi, [rsp+108h+var_48] mov [rdi], r14 mov rax, [rsp+108h+var_E0] mov [rdi+8], rax mov rax, [rsp+108h+var_D8] mov [rdi+10h], rax lea rsi, [rsp+108h+var_98] call _ZNSt11_Tuple_implILm0EJRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EES9_RS6_EE9_M_assignIS8_JS8_S6_EEEvOS_ILm0EJT_DpT0_EE; std::_Tuple_impl<0ul,std::vector<std::string> &,std::vector<std::string> &,std::string&>::_M_assign<std::vector<std::string>,std::vector<std::string>,std::string>(std::_Tuple_impl&&<0ul,std::vector<std::string>,std::vector<std::string>,std::string>) lea rdi, [rsp+108h+var_60] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rbx, [rsp+108h+var_78] mov rdi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, [rbx-20h]; void * lea rax, [rsp+108h+var_88] cmp rdi, rax jz short loc_1BB1C mov rsi, [rsp+108h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1BB1C: lea rdi, [rsp+108h+var_B0] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, [rsp+108h+var_D0]; void * cmp rdi, r12 jz short loc_1BB3D mov rsi, [rsp+108h+var_C0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1BB3D: add rsp, 0D8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp loc_1BCF5 mov [rsp+108h+var_108], rax lea rdi, [rsp+108h+var_B0] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_1BB68 mov [rsp+108h+var_108], rax loc_1BB68: mov rdi, [rsp+108h+var_D0]; void * cmp rdi, r12 jz short loc_1BB85 mov rsi, [rsp+108h+var_C0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_1BB85 mov [rsp+108h+var_108], rax loc_1BB85: lea r12, [rbx+218h] lea rdi, [rbx+230h] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, r12 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rax, [rbx+208h] test rax, rax jz short loc_1BBB9 mov rdi, r13 mov rsi, r13 mov edx, 3 call rax loc_1BBB9: lea r12, [rbx+178h] lea r13, [rbx+190h] lea rdi, [rbx+1C0h] call _ZNSt8_Rb_treeIPN3CLI6OptionES2_St9_IdentityIS2_ESt4lessIS2_ESaIS2_EED2Ev; std::_Rb_tree<CLI::Option *,CLI::Option *,std::_Identity<CLI::Option *>,std::less<CLI::Option *>,std::allocator<CLI::Option *>>::~_Rb_tree() mov rdi, r13 call _ZNSt8_Rb_treeIPN3CLI6OptionES2_St9_IdentityIS2_ESt4lessIS2_ESaIS2_EED2Ev; std::_Rb_tree<CLI::Option *,CLI::Option *,std::_Identity<CLI::Option *>,std::less<CLI::Option *>,std::allocator<CLI::Option *>>::~_Rb_tree() mov rdi, r12 call _ZNSt6vectorIN3CLI9ValidatorESaIS1_EED2Ev; std::vector<CLI::Validator>::~vector() mov rax, [rbx+158h] test rax, rax jz short loc_1BC00 lea rdi, [rbx+148h] mov rsi, rdi mov edx, 3 call rax loc_1BC00: mov rax, [rbx+138h] test rax, rax jz short loc_1BC1D lea rdi, [rbx+128h] mov rsi, rdi mov edx, 3 call rax loc_1BC1D: mov rdi, [rbx+108h]; void * cmp rdi, r15 jz short loc_1BC34 mov rsi, [r15] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1BC34: mov rdi, [rbx+0E8h]; void * cmp rdi, [rsp+108h+var_100] jz short loc_1BC52 mov rax, [rsp+108h+var_100] mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1BC52: mov rdi, [rbx+0C8h]; void * cmp rdi, rbp jz short loc_1BC6A mov rsi, [rbp+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1BC6A: mov rdi, [rbx+0A8h]; void * cmp rdi, [rsp+108h+var_F8] jz short loc_1BC88 mov rax, [rsp+108h+var_F8] mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1BC88: lea r15, [rbx+58h] lea r13, [rbx+70h] mov rdi, [r14]; void * cmp rdi, [rsp+108h+var_F0] jz short loc_1BCAA mov rax, [rsp+108h+var_F0] mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1BCAA: mov rdi, r13 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, r15 call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ESaIS7_EED2Ev; std::vector<std::pair<std::string,std::string>>::~vector() mov rdi, [rsp+108h+var_E0] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, [rsp+108h+var_D8] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, [rbx]; void * cmp rdi, [rsp+108h+var_E8] jz short loc_1BCE8 mov rax, [rsp+108h+var_E8] mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1BCE8: mov rdi, [rsp+108h+var_108] call __Unwind_Resume jmp short loc_1BCF5 jmp short $+2 loc_1BCF5: mov rdi, rax call __clang_call_terminate
void CLI::Option::Option(long long a1, long long a2, long long a3, long long a4, long long a5) { _OWORD *v5; // rax void *v6[2]; // [rsp+38h] [rbp-D0h] BYREF _QWORD v7[2]; // [rsp+48h] [rbp-C0h] BYREF _QWORD v8[3]; // [rsp+58h] [rbp-B0h] BYREF void *v9[2]; // [rsp+70h] [rbp-98h] BYREF long long v10; // [rsp+80h] [rbp-88h] BYREF _QWORD v11[3]; // [rsp+90h] [rbp-78h] BYREF _QWORD v12[3]; // [rsp+A8h] [rbp-60h] BYREF _QWORD v13[9]; // [rsp+C0h] [rbp-48h] BYREF *(_QWORD *)a1 = a1 + 16; strcpy((char *)(a1 + 16), "Options"); *(_QWORD *)(a1 + 8) = 7LL; *(_DWORD *)(a1 + 32) = 0x1000000; *(_OWORD *)(a1 + 36) = 0LL; *(_OWORD *)(a1 + 52) = 0LL; *(_OWORD *)(a1 + 68) = 0LL; *(_OWORD *)(a1 + 84) = 0LL; *(_OWORD *)(a1 + 100) = 0LL; *(_OWORD *)(a1 + 116) = 0LL; *(_DWORD *)(a1 + 132) = 0; *(_QWORD *)(a1 + 136) = a1 + 152; *(_QWORD *)(a1 + 144) = 0LL; *(_BYTE *)(a1 + 152) = 0; *(_QWORD *)(a1 + 168) = a1 + 184; *(_QWORD *)(a1 + 176) = 0LL; *(_BYTE *)(a1 + 184) = 0; *(_QWORD *)(a1 + 200) = a1 + 216; v5 = (_OWORD *)(a3 + 16); if ( *(_QWORD *)a3 == a3 + 16 ) { *(_OWORD *)(a1 + 216) = *v5; } else { *(_QWORD *)(a1 + 200) = *(_QWORD *)a3; *(_QWORD *)(a1 + 216) = *(_QWORD *)v5; } *(_QWORD *)(a1 + 208) = *(_QWORD *)(a3 + 8); *(_QWORD *)a3 = v5; *(_QWORD *)(a3 + 8) = 0LL; *(_BYTE *)(a3 + 16) = 0; *(_QWORD *)(a1 + 232) = a1 + 248; *(_QWORD *)(a1 + 240) = 0LL; *(_BYTE *)(a1 + 248) = 0; *(_QWORD *)(a1 + 264) = a1 + 280; *(_QWORD *)(a1 + 272) = 0LL; *(_BYTE *)(a1 + 280) = 0; *(_OWORD *)(a1 + 296) = 0LL; *(_QWORD *)(a1 + 320) = ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEvEN3CLI6Option10type_name_MUlvE_EE9_M_invokeERKSt9_Any_data; *(_QWORD *)(a1 + 312) = ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEvEN3CLI6Option10type_name_MUlvE_EE10_M_managerERSt9_Any_dataRKSC_St18_Manager_operation; *(_OWORD *)(a1 + 328) = 0LL; *(_OWORD *)(a1 + 344) = 0LL; *(_OWORD *)(a1 + 360) = xmmword_37010; *(_OWORD *)(a1 + 424) = 0LL; *(_OWORD *)(a1 + 376) = 0LL; *(_OWORD *)(a1 + 392) = 0LL; *(_OWORD *)(a1 + 408) = 0LL; *(_QWORD *)(a1 + 440) = 0LL; *(_QWORD *)(a1 + 424) = a1 + 408; *(_QWORD *)(a1 + 432) = a1 + 408; *(_OWORD *)(a1 + 472) = 0LL; *(_OWORD *)(a1 + 440) = 0LL; *(_QWORD *)(a1 + 488) = 0LL; *(_OWORD *)(a1 + 456) = 0LL; *(_QWORD *)(a1 + 472) = a1 + 456; *(_QWORD *)(a1 + 480) = a1 + 456; *(_QWORD *)(a1 + 496) = a5; *(_OWORD *)(a1 + 504) = 0LL; *(_QWORD *)(a1 + 520) = 0LL; *(_QWORD *)(a1 + 528) = *(_QWORD *)(a4 + 24); if ( *(_QWORD *)(a4 + 16) ) { *(_OWORD *)(a1 + 504) = *(_OWORD *)a4; *(_QWORD *)(a1 + 520) = *(_QWORD *)(a4 + 16); *(_OWORD *)(a4 + 16) = 0LL; } *(_OWORD *)(a1 + 568) = 0LL; *(_OWORD *)(a1 + 552) = 0LL; *(_OWORD *)(a1 + 536) = 0LL; *(_QWORD *)(a1 + 583) = 0LL; v6[0] = v7; std::string::_M_construct<char *>(v6, *(_BYTE **)a2, *(_QWORD *)a2 + *(_QWORD *)(a2 + 8)); CLI::detail::split_names((long long)v8, (long long)v6); CLI::detail::get_names(v9, v8); v13[0] = a1 + 136; v13[1] = a1 + 64; v13[2] = a1 + 40; std::_Tuple_impl<0ul,std::vector<std::string> &,std::vector<std::string> &,std::string&>::_M_assign<std::vector<std::string>,std::vector<std::string>,std::string>( v13, v9); std::vector<std::string>::~vector(v12); std::vector<std::string>::~vector(v11); if ( v9[0] != &v10 ) operator delete(v9[0], v10 + 1); std::vector<std::string>::~vector(v8); if ( v6[0] != v7 ) operator delete(v6[0], v7[0] + 1LL); }
Option: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xd8 MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RDI],RAX MOV dword ptr [RDI + 0x10],0x6974704f MOV dword ptr [RDI + 0x13],0x736e6f69 MOV qword ptr [RDI + 0x8],0x7 XOR EAX,EAX MOV byte ptr [RDI + 0x17],AL MOV dword ptr [RDI + 0x20],0x1000000 ADD RDI,0x98 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x24],XMM0 MOVUPS xmmword ptr [RBX + 0x34],XMM0 MOVUPS xmmword ptr [RBX + 0x44],XMM0 MOVUPS xmmword ptr [RBX + 0x54],XMM0 MOVUPS xmmword ptr [RBX + 0x64],XMM0 MOVUPS xmmword ptr [RBX + 0x74],XMM0 MOV dword ptr [RBX + 0x84],0x0 MOV qword ptr [RSP + 0x18],RDI MOV qword ptr [RBX + 0x88],RDI MOV qword ptr [RBX + 0x90],RAX MOV byte ptr [RBX + 0x98],AL LEA RDI,[RBX + 0xb8] MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RBX + 0xa8],RDI MOV qword ptr [RBX + 0xb0],RAX MOV byte ptr [RBX + 0xb8],AL LEA RBP,[RBX + 0xd8] MOV qword ptr [RBX + 0xc8],RBP MOV RDI,qword ptr [RDX] LEA RAX,[RDX + 0x10] CMP RDI,RAX JZ 0x0011b8f4 MOV qword ptr [RBX + 0xc8],RDI MOV RDI,qword ptr [RAX] MOV qword ptr [RBX + 0xd8],RDI JMP 0x0011b8fb LAB_0011b8f4: MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [RBP],XMM0 LAB_0011b8fb: MOV RDI,qword ptr [RDX + 0x8] MOV qword ptr [RBX + 0xd0],RDI MOV qword ptr [RDX],RAX XOR EAX,EAX MOV qword ptr [RDX + 0x8],RAX MOV byte ptr [RDX + 0x10],AL LEA RDX,[RBX + 0xf8] MOV qword ptr [RSP + 0x8],RDX MOV qword ptr [RBX + 0xe8],RDX MOV qword ptr [RBX + 0xf0],RAX MOV byte ptr [RBX + 0xf8],AL LEA R15,[RBX + 0x118] MOV qword ptr [RBX + 0x108],R15 MOV qword ptr [RBX + 0x110],RAX MOV byte ptr [RBX + 0x118],AL XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x128],XMM0 LEA RDX,[0x11c736] MOV qword ptr [RBX + 0x140],RDX LEA RDX,[0x11c74e] MOV qword ptr [RBX + 0x138],RDX MOVUPS xmmword ptr [RBX + 0x148],XMM0 MOVUPS xmmword ptr [RBX + 0x158],XMM0 MOVAPS XMM1,xmmword ptr [0x00137010] MOVUPS xmmword ptr [RBX + 0x168],XMM1 LEA RDX,[RBX + 0x198] MOVUPS xmmword ptr [RBX + 0x1a8],XMM0 MOVUPS xmmword ptr [RBX + 0x178],XMM0 MOVUPS xmmword ptr [RBX + 0x188],XMM0 MOVUPS xmmword ptr [RBX + 0x198],XMM0 MOV qword ptr [RBX + 0x1b8],RAX MOV qword ptr [RBX + 0x1a8],RDX MOV qword ptr [RBX + 0x1b0],RDX LEA RDX,[RBX + 0x1c8] MOVUPS xmmword ptr [RBX + 0x1d8],XMM0 MOVUPS xmmword ptr [RBX + 0x1b8],XMM0 MOV qword ptr [RBX + 0x1e8],RAX MOVUPS xmmword ptr [RBX + 0x1c8],XMM0 MOV qword ptr [RBX + 0x1d8],RDX MOV qword ptr [RBX + 0x1e0],RDX MOV qword ptr [RBX + 0x1f0],R8 LEA R13,[RBX + 0x1f8] MOVUPS xmmword ptr [RBX + 0x1f8],XMM0 MOV qword ptr [RBX + 0x208],RAX MOV RDX,qword ptr [RCX + 0x18] MOV qword ptr [RBX + 0x210],RDX CMP qword ptr [RCX + 0x10],RAX JZ 0x0011ba3f LEA RAX,[RCX + 0x10] MOVUPS XMM1,xmmword ptr [RCX] MOVUPS xmmword ptr [R13],XMM1 MOV RCX,qword ptr [RCX + 0x10] MOV qword ptr [RBX + 0x208],RCX MOVUPS xmmword ptr [RAX],XMM0 LAB_0011ba3f: LEA RAX,[RBX + 0x28] MOV qword ptr [RSP + 0x30],RAX LEA RAX,[RBX + 0x40] MOV qword ptr [RSP + 0x28],RAX LEA R14,[RBX + 0x88] MOVUPS xmmword ptr [RBX + 0x238],XMM0 MOVUPS xmmword ptr [RBX + 0x228],XMM0 MOVUPS xmmword ptr [RBX + 0x218],XMM0 MOV qword ptr [RBX + 0x247],0x0 LEA R12,[RSP + 0x48] MOV qword ptr [R12 + -0x10],R12 MOV RAX,qword ptr [RSI] MOV RDX,qword ptr [RSI + 0x8] ADD RDX,RAX LAB_0011ba8c: LEA RDI,[RSP + 0x38] MOV RSI,RAX CALL 0x001178c0 LAB_0011ba99: LEA RDI,[RSP + 0x58] LEA RSI,[RSP + 0x38] CALL 0x0011ac3d LAB_0011baa8: LEA RDI,[RSP + 0x70] LEA RSI,[RSP + 0x58] CALL 0x0011c19f LEA RDI,[RSP + 0xc0] MOV qword ptr [RDI],R14 MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RDI + 0x8],RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RDI + 0x10],RAX LAB_0011bad4: LEA RSI,[RSP + 0x70] CALL 0x0011cf9e LEA RDI,[RSP + 0xa8] CALL 0x0010af62 LEA RBX,[RSP + 0x90] MOV RDI,RBX CALL 0x0010af62 MOV RDI,qword ptr [RBX + -0x20] LEA RAX,[RSP + 0x80] CMP RDI,RAX JZ 0x0011bb1c MOV RSI,qword ptr [RSP + 0x80] INC RSI CALL 0x00107430 LAB_0011bb1c: LEA RDI,[RSP + 0x58] CALL 0x0010af62 MOV RDI,qword ptr [RSP + 0x38] CMP RDI,R12 JZ 0x0011bb3d MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x00107430 LAB_0011bb3d: ADD RSP,0xd8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* CLI::Option::Option(std::__cxx11::string, std::__cxx11::string, std::function<bool (std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&)>, CLI::App*) */ void __thiscall CLI::Option::Option(Option *this,long *param_2,long *param_3,int4 *param_4,int8 param_5) { long *plVar1; int4 uVar2; int4 uVar3; int4 uVar4; long lVar5; long *local_d0 [2]; long local_c0 [2]; detail local_b0 [24]; long *local_98 [2]; long local_88 [2]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_78 [24]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_60 [24]; Option *local_48; Option *local_40; Option *local_38; *(Option **)this = this + 0x10; *(int4 *)(this + 0x10) = 0x6974704f; *(int4 *)(this + 0x13) = 0x736e6f69; *(int8 *)(this + 8) = 7; this[0x17] = (Option)0x0; *(int4 *)(this + 0x20) = 0x1000000; *(int8 *)(this + 0x24) = 0; *(int8 *)(this + 0x2c) = 0; *(int8 *)(this + 0x34) = 0; *(int8 *)(this + 0x3c) = 0; *(int8 *)(this + 0x44) = 0; *(int8 *)(this + 0x4c) = 0; *(int8 *)(this + 0x54) = 0; *(int8 *)(this + 0x5c) = 0; *(int8 *)(this + 100) = 0; *(int8 *)(this + 0x6c) = 0; *(int8 *)(this + 0x74) = 0; *(int8 *)(this + 0x7c) = 0; *(int4 *)(this + 0x84) = 0; *(Option **)(this + 0x88) = this + 0x98; *(int8 *)(this + 0x90) = 0; this[0x98] = (Option)0x0; *(Option **)(this + 0xa8) = this + 0xb8; *(int8 *)(this + 0xb0) = 0; this[0xb8] = (Option)0x0; *(Option **)(this + 200) = this + 0xd8; plVar1 = param_3 + 2; if ((long *)*param_3 == plVar1) { lVar5 = param_3[3]; *(long *)(this + 0xd8) = *plVar1; *(long *)(this + 0xe0) = lVar5; } else { *(long *)(this + 200) = *param_3; *(long *)(this + 0xd8) = *plVar1; } *(long *)(this + 0xd0) = param_3[1]; *param_3 = (long)plVar1; param_3[1] = 0; *(int1 *)(param_3 + 2) = 0; *(Option **)(this + 0xe8) = this + 0xf8; *(int8 *)(this + 0xf0) = 0; this[0xf8] = (Option)0x0; *(Option **)(this + 0x108) = this + 0x118; *(int8 *)(this + 0x110) = 0; this[0x118] = (Option)0x0; *(int8 *)(this + 0x128) = 0; *(int8 *)(this + 0x130) = 0; *(code **)(this + 0x140) = std::_Function_handler<std::__cxx11::string(),CLI::Option::type_name_::{lambda()#1}>:: _M_invoke; *(code **)(this + 0x138) = std::_Function_handler<std::__cxx11::string(),CLI::Option::type_name_::{lambda()#1}>:: _M_manager; *(int8 *)(this + 0x148) = 0; *(int8 *)(this + 0x150) = 0; *(int8 *)(this + 0x158) = 0; *(int8 *)(this + 0x160) = 0; uVar4 = _UNK_0013701c; uVar3 = _UNK_00137018; uVar2 = _UNK_00137014; *(int4 *)(this + 0x168) = _DAT_00137010; *(int4 *)(this + 0x16c) = uVar2; *(int4 *)(this + 0x170) = uVar3; *(int4 *)(this + 0x174) = uVar4; *(int8 *)(this + 0x1a8) = 0; *(int8 *)(this + 0x1b0) = 0; *(int8 *)(this + 0x178) = 0; *(int8 *)(this + 0x180) = 0; *(int8 *)(this + 0x188) = 0; *(int8 *)(this + 400) = 0; *(int8 *)(this + 0x198) = 0; *(int8 *)(this + 0x1a0) = 0; *(int8 *)(this + 0x1b8) = 0; *(Option **)(this + 0x1a8) = this + 0x198; *(Option **)(this + 0x1b0) = this + 0x198; *(int8 *)(this + 0x1d8) = 0; *(int8 *)(this + 0x1e0) = 0; *(int8 *)(this + 0x1b8) = 0; *(int8 *)(this + 0x1c0) = 0; *(int8 *)(this + 0x1e8) = 0; *(int8 *)(this + 0x1c8) = 0; *(int8 *)(this + 0x1d0) = 0; *(Option **)(this + 0x1d8) = this + 0x1c8; *(Option **)(this + 0x1e0) = this + 0x1c8; *(int8 *)(this + 0x1f0) = param_5; *(int8 *)(this + 0x1f8) = 0; *(int8 *)(this + 0x200) = 0; *(int8 *)(this + 0x208) = 0; *(int8 *)(this + 0x210) = *(int8 *)(param_4 + 6); if (*(long *)(param_4 + 4) != 0) { uVar2 = param_4[1]; uVar3 = param_4[2]; uVar4 = param_4[3]; *(int4 *)(this + 0x1f8) = *param_4; *(int4 *)(this + 0x1fc) = uVar2; *(int4 *)(this + 0x200) = uVar3; *(int4 *)(this + 0x204) = uVar4; *(int8 *)(this + 0x208) = *(int8 *)(param_4 + 4); *(int8 *)(param_4 + 4) = 0; *(int8 *)(param_4 + 6) = 0; } *(int8 *)(this + 0x238) = 0; *(int8 *)(this + 0x240) = 0; *(int8 *)(this + 0x228) = 0; *(int8 *)(this + 0x230) = 0; *(int8 *)(this + 0x218) = 0; *(int8 *)(this + 0x220) = 0; *(int8 *)(this + 0x247) = 0; /* try { // try from 0011ba8c to 0011ba98 has its CatchHandler @ 0011bb81 */ local_d0[0] = local_c0; std::__cxx11::string::_M_construct<char*>(local_d0,*param_2,param_2[1] + *param_2); /* try { // try from 0011ba99 to 0011baa7 has its CatchHandler @ 0011bb64 */ detail::split_names(local_b0,local_d0); /* try { // try from 0011baa8 to 0011bab6 has its CatchHandler @ 0011bb54 */ detail::get_names((detail *)local_98,(vector *)local_b0); /* try { // try from 0011bad4 to 0011badd has its CatchHandler @ 0011bb4f */ local_48 = this + 0x88; local_40 = this + 0x40; local_38 = this + 0x28; std:: _Tuple_impl<0ul,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>&,std::__cxx11::string&> :: _M_assign<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>,std::__cxx11::string> ((_Tuple_impl<0ul,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>&,std::__cxx11::string&> *)&local_48,(_Tuple_impl *)local_98); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_60); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_78); if (local_98[0] != local_88) { operator_delete(local_98[0],local_88[0] + 1); } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_b0); if (local_d0[0] != local_c0) { operator_delete(local_d0[0],local_c0[0] + 1); } return; }
5,511
queue_insert_safe
eloqsql/mysys/queues.c
int queue_insert_safe(QUEUE *queue, uchar *element) { if (queue->elements == queue->max_elements) { if (!queue->auto_extent) return 2; if (resize_queue(queue, queue->max_elements + queue->auto_extent)) return 1; } queue_insert(queue, element); return 0; }
O0
c
queue_insert_safe: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movl 0x10(%rax), %eax movq -0x10(%rbp), %rcx cmpl 0x14(%rcx), %eax jne 0x12cb9aa movq -0x10(%rbp), %rax cmpl $0x0, 0x20(%rax) jne 0x12cb983 movl $0x2, -0x4(%rbp) jmp 0x12cb9be movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rax movl 0x14(%rax), %esi movq -0x10(%rbp), %rax addl 0x20(%rax), %esi callq 0x12cb730 cmpl $0x0, %eax je 0x12cb9a8 movl $0x1, -0x4(%rbp) jmp 0x12cb9be jmp 0x12cb9aa movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x12cb810 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
queue_insert_safe: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov eax, [rax+10h] mov rcx, [rbp+var_10] cmp eax, [rcx+14h] jnz short loc_12CB9AA mov rax, [rbp+var_10] cmp dword ptr [rax+20h], 0 jnz short loc_12CB983 mov [rbp+var_4], 2 jmp short loc_12CB9BE loc_12CB983: mov rdi, [rbp+var_10] mov rax, [rbp+var_10] mov esi, [rax+14h] mov rax, [rbp+var_10] add esi, [rax+20h] call resize_queue cmp eax, 0 jz short loc_12CB9A8 mov [rbp+var_4], 1 jmp short loc_12CB9BE loc_12CB9A8: jmp short $+2 loc_12CB9AA: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call queue_insert mov [rbp+var_4], 0 loc_12CB9BE: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long queue_insert_safe(_DWORD *a1, long long a2) { if ( a1[4] != a1[5] ) goto LABEL_6; if ( a1[8] ) { if ( (unsigned int)resize_queue((long long)a1, a1[8] + a1[5]) ) return 1; LABEL_6: queue_insert((long long)a1, a2); return 0; } return 2; }
operator++: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RDI,qword ptr [RAX] CALL 0x00859050 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX ADD RSP,0x10 POP RBP RET
/* std::_Rb_tree_iterator<std::pair<char const* const, dict_index_t*> >::TEMPNAMEPLACEHOLDERVALUE() */ void __thiscall std::_Rb_tree_iterator<std::pair<char_const*const,dict_index_t*>>::operator++ (_Rb_tree_iterator<std::pair<char_const*const,dict_index_t*>> *this) { int8 uVar1; uVar1 = std::_Rb_tree_increment(*(_Rb_tree_node_base **)this); *(int8 *)this = uVar1; return; }
5,512
trans_xa_detach(THD*)
eloqsql/sql/xa.cc
bool trans_xa_detach(THD *thd) { DBUG_ASSERT(thd->transaction->xid_state.is_explicit_XA()); if (thd->transaction->xid_state.xid_cache_element->xa_state != XA_PREPARED) return xa_trans_force_rollback(thd); else if (!thd->transaction->all.is_trx_read_write()) { thd->transaction->xid_state.set_error(ER_XA_RBROLLBACK); ha_rollback_trans(thd, true); } thd->transaction->xid_state.xid_cache_element->acquired_to_recovered(); thd->transaction->xid_state.xid_cache_element= 0; thd->transaction->cleanup(); Ha_trx_info *ha_info, *ha_info_next; for (ha_info= thd->transaction->all.ha_list; ha_info; ha_info= ha_info_next) { ha_info_next= ha_info->next(); ha_info->reset(); /* keep it conveniently zero-filled */ } thd->transaction->all.ha_list= 0; thd->transaction->all.no_2pc= 0; thd->m_transaction_psi= 0; thd->server_status&= ~(SERVER_STATUS_IN_TRANS | SERVER_STATUS_IN_TRANS_READONLY); thd->mdl_context.release_transactional_locks(thd); return false; }
O0
cpp
trans_xa_detach(THD*): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) jmp 0x805a9e movq -0x10(%rbp), %rax movq 0x3998(%rax), %rax movq 0x40(%rax), %rax cmpl $0x2, 0x8(%rax) je 0x805ac6 movq -0x10(%rbp), %rdi callq 0x804700 andb $0x1, %al movb %al, -0x1(%rbp) jmp 0x805bd7 movq -0x10(%rbp), %rax movq 0x3998(%rax), %rdi addq $0x8, %rdi callq 0x5d3520 testb $0x1, %al jne 0x805b05 movq -0x10(%rbp), %rax movq 0x3998(%rax), %rdi addq $0x40, %rdi movl $0x57a, %esi # imm = 0x57A callq 0x804360 movq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x8ddfe0 jmp 0x805b07 movq -0x10(%rbp), %rax movq 0x3998(%rax), %rax movq 0x40(%rax), %rdi callq 0x806990 movq -0x10(%rbp), %rax movq 0x3998(%rax), %rax movq $0x0, 0x40(%rax) movq -0x10(%rbp), %rax movq 0x3998(%rax), %rdi callq 0x806d30 movq -0x10(%rbp), %rax movq 0x3998(%rax), %rax movq 0x10(%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x805b78 movq -0x18(%rbp), %rdi callq 0x5d35b0 movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rdi callq 0x55b470 movq -0x20(%rbp), %rax movq %rax, -0x18(%rbp) jmp 0x805b51 movq -0x10(%rbp), %rax movq 0x3998(%rax), %rax movq $0x0, 0x10(%rax) movq -0x10(%rbp), %rax movq 0x3998(%rax), %rax movb $0x0, 0x8(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x3d18(%rax) movq -0x10(%rbp), %rax movl 0x3e64(%rax), %ecx andl $0xffffdffe, %ecx # imm = 0xFFFFDFFE movl %ecx, 0x3e64(%rax) movq -0x10(%rbp), %rdi addq $0x150, %rdi # imm = 0x150 movq -0x10(%rbp), %rsi callq 0x72a0b0 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_Z15trans_xa_detachP3THD: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi jmp short $+2 loc_805A9E: mov rax, [rbp+var_10] mov rax, [rax+3998h] mov rax, [rax+40h] cmp dword ptr [rax+8], 2 jz short loc_805AC6 mov rdi, [rbp+var_10]; THD * call _Z23xa_trans_force_rollbackP3THD; xa_trans_force_rollback(THD *) and al, 1 mov [rbp+var_1], al jmp loc_805BD7 loc_805AC6: mov rax, [rbp+var_10] mov rdi, [rax+3998h] add rdi, 8; this call _ZNK9THD_TRANS17is_trx_read_writeEv; THD_TRANS::is_trx_read_write(void) test al, 1 jnz short loc_805B05 mov rax, [rbp+var_10] mov rdi, [rax+3998h] add rdi, 40h ; '@'; this mov esi, 57Ah; unsigned int call _ZN9XID_STATE9set_errorEj; XID_STATE::set_error(uint) mov rdi, [rbp+var_10]; THD * mov esi, 1; bool call _Z17ha_rollback_transP3THDb; ha_rollback_trans(THD *,bool) loc_805B05: jmp short $+2 loc_805B07: mov rax, [rbp+var_10] mov rax, [rax+3998h] mov rdi, [rax+40h]; this call _ZN17XID_cache_element21acquired_to_recoveredEv; XID_cache_element::acquired_to_recovered(void) mov rax, [rbp+var_10] mov rax, [rax+3998h] mov qword ptr [rax+40h], 0 mov rax, [rbp+var_10] mov rdi, [rax+3998h]; this call _ZN3THD15st_transactions7cleanupEv; THD::st_transactions::cleanup(void) mov rax, [rbp+var_10] mov rax, [rax+3998h] mov rax, [rax+10h] mov [rbp+var_18], rax loc_805B51: cmp [rbp+var_18], 0 jz short loc_805B78 mov rdi, [rbp+var_18]; this call _ZNK11Ha_trx_info4nextEv; Ha_trx_info::next(void) mov [rbp+var_20], rax mov rdi, [rbp+var_18]; this call _ZN11Ha_trx_info5resetEv; Ha_trx_info::reset(void) mov rax, [rbp+var_20] mov [rbp+var_18], rax jmp short loc_805B51 loc_805B78: mov rax, [rbp+var_10] mov rax, [rax+3998h] mov qword ptr [rax+10h], 0 mov rax, [rbp+var_10] mov rax, [rax+3998h] mov byte ptr [rax+8], 0 mov rax, [rbp+var_10] mov qword ptr [rax+3D18h], 0 mov rax, [rbp+var_10] mov ecx, [rax+3E64h] and ecx, 0FFFFDFFEh mov [rax+3E64h], ecx mov rdi, [rbp+var_10] add rdi, 150h; this mov rsi, [rbp+var_10]; THD * call _ZN11MDL_context27release_transactional_locksEP3THD; MDL_context::release_transactional_locks(THD *) mov [rbp+var_1], 0 loc_805BD7: mov al, [rbp+var_1] and al, 1 add rsp, 20h pop rbp retn
char trans_xa_detach(THD::st_transactions **a1) { long long v2; // [rsp+0h] [rbp-20h] Ha_trx_info *i; // [rsp+8h] [rbp-18h] if ( *(_DWORD *)(*((_QWORD *)a1[1843] + 8) + 8LL) != 2 ) return xa_trans_force_rollback((THD *)a1) & 1; if ( (THD_TRANS::is_trx_read_write((THD::st_transactions *)((char *)a1[1843] + 8)) & 1) == 0 ) { XID_STATE::set_error((THD::st_transactions *)((char *)a1[1843] + 64), 1402); ha_rollback_trans((THD *)a1, 1); } XID_cache_element::acquired_to_recovered(*((XID_cache_element **)a1[1843] + 8)); *((_QWORD *)a1[1843] + 8) = 0LL; THD::st_transactions::cleanup(a1[1843]); for ( i = (Ha_trx_info *)*((_QWORD *)a1[1843] + 2); i; i = (Ha_trx_info *)v2 ) { v2 = Ha_trx_info::next(i); Ha_trx_info::reset(i); } *((_QWORD *)a1[1843] + 2) = 0LL; *((_BYTE *)a1[1843] + 8) = 0; a1[1955] = 0LL; *((_DWORD *)a1 + 3993) &= 0xFFFFDFFE; MDL_context::release_transactional_locks((MDL_context *)(a1 + 42), (THD *)a1); return 0; }
Item_decimal_scale: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x008bd270 ADD RSP,0x10 POP RBP RET
/* Type_handler_datetime_common::Item_decimal_scale(Item const*) const */ void __thiscall Type_handler_datetime_common::Item_decimal_scale(Type_handler_datetime_common *this,Item *param_1) { Type_handler_temporal_result::Item_decimal_scale_with_seconds ((Type_handler_temporal_result *)this,param_1); return; }
5,513
init_available_charsets
eloqsql/mysys/charset.c
static void init_available_charsets(void) { char fname[FN_REFLEN + sizeof(MY_CHARSET_INDEX)]; struct charset_info_st **cs; MY_CHARSET_LOADER loader; DBUG_ENTER("init_available_charsets"); bzero((char*) &all_charsets,sizeof(all_charsets)); bzero((char*) &my_collation_statistics, sizeof(my_collation_statistics)); my_hash_init2(key_memory_charsets, &charset_name_hash, 16, &my_charset_latin1, 64, 0, 0, get_charset_key, 0, 0, HASH_UNIQUE); init_compiled_charsets(MYF(0)); /* Copy compiled charsets */ for (cs= (struct charset_info_st**) all_charsets; cs < (struct charset_info_st**) all_charsets + array_elements(all_charsets)-1 ; cs++) { if (*cs) { DBUG_ASSERT(cs[0]->mbmaxlen <= MY_CS_MBMAXLEN); if (cs[0]->m_ctype) if (init_state_maps(*cs)) *cs= NULL; } } my_charset_loader_init_mysys(&loader); strmov(get_charsets_dir(fname), MY_CHARSET_INDEX); my_read_charset_file(&loader, fname, MYF(0)); DBUG_VOID_RETURN; }
O0
c
init_available_charsets: pushq %rbp movq %rsp, %rbp subq $0x300, %rsp # imm = 0x300 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) leaq 0x35c5b1(%rip), %rdi # 0x384420 xorl %esi, %esi movl $0x4000, %edx # imm = 0x4000 callq 0x24170 leaq 0x36060e(%rip), %rdi # 0x388490 xorl %esi, %esi movl $0x4000, %edx # imm = 0x4000 callq 0x24170 leaq 0x35c287(%rip), %rax # 0x38411c movl (%rax), %edi leaq 0x360582(%rip), %rsi # 0x388420 movl $0x10, %edx leaq 0x24a8b6(%rip), %rcx # 0x272760 movl $0x40, %r8d xorl %eax, %eax movl %eax, %r9d leaq 0x1ab4(%rip), %rax # 0x29970 movq $0x0, (%rsp) movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) movq $0x0, 0x18(%rsp) movl $0x1, 0x20(%rsp) callq 0x2a390 xorl %eax, %eax movl %eax, %edi callq 0x2f540 leaq 0x35c528(%rip), %rax # 0x384420 movq %rax, -0x2d8(%rbp) leaq 0x35c51a(%rip), %rax # 0x384420 addq $0x4000, %rax # imm = 0x4000 addq $-0x8, %rax cmpq %rax, -0x2d8(%rbp) jae 0x27f76 movq -0x2d8(%rbp), %rax cmpq $0x0, (%rax) je 0x27f60 jmp 0x27f28 jmp 0x27f2a movq -0x2d8(%rbp), %rax movq (%rax), %rax cmpq $0x0, 0x40(%rax) je 0x27f5e movq -0x2d8(%rbp), %rax movq (%rax), %rdi callq 0x294d0 cmpb $0x0, %al je 0x27f5c movq -0x2d8(%rbp), %rax movq $0x0, (%rax) jmp 0x27f5e jmp 0x27f60 jmp 0x27f62 movq -0x2d8(%rbp), %rax addq $0x8, %rax movq %rax, -0x2d8(%rbp) jmp 0x27eff leaq -0x2d0(%rbp), %rdi callq 0x27470 leaq -0x220(%rbp), %rdi callq 0x27b10 movq %rax, %rdi leaq 0x504ce(%rip), %rsi # 0x78466 callq 0x24270 leaq -0x220(%rbp), %rsi leaq -0x2d0(%rbp), %rdi xorl %eax, %eax movl %eax, %edx callq 0x299b0 jmp 0x27fb6 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x27fd1 addq $0x300, %rsp # imm = 0x300 popq %rbp retq callq 0x242a0 nopw %cs:(%rax,%rax)
init_available_charsets: push rbp mov rbp, rsp sub rsp, 300h mov rax, fs:28h mov [rbp+var_8], rax lea rdi, all_charsets xor esi, esi mov edx, 4000h call _memset lea rdi, my_collation_statistics xor esi, esi mov edx, 4000h call _memset lea rax, key_memory_charsets mov edi, [rax] lea rsi, charset_name_hash mov edx, 10h lea rcx, my_charset_latin1 mov r8d, 40h ; '@' xor eax, eax mov r9d, eax lea rax, get_charset_key mov [rsp+300h+var_300], 0 mov [rsp+300h+var_2F8], rax mov [rsp+300h+var_2F0], 0 mov [rsp+300h+var_2E8], 0 mov [rsp+300h+var_2E0], 1 call my_hash_init2 xor eax, eax mov edi, eax call init_compiled_charsets lea rax, all_charsets mov [rbp+var_2D8], rax loc_27EFF: lea rax, all_charsets add rax, 4000h add rax, 0FFFFFFFFFFFFFFF8h cmp [rbp+var_2D8], rax jnb short loc_27F76 mov rax, [rbp+var_2D8] cmp qword ptr [rax], 0 jz short loc_27F60 jmp short $+2 loc_27F28: jmp short $+2 loc_27F2A: mov rax, [rbp+var_2D8] mov rax, [rax] cmp qword ptr [rax+40h], 0 jz short loc_27F5E mov rax, [rbp+var_2D8] mov rdi, [rax] call init_state_maps cmp al, 0 jz short loc_27F5C mov rax, [rbp+var_2D8] mov qword ptr [rax], 0 loc_27F5C: jmp short $+2 loc_27F5E: jmp short $+2 loc_27F60: jmp short $+2 loc_27F62: mov rax, [rbp+var_2D8] add rax, 8 mov [rbp+var_2D8], rax jmp short loc_27EFF loc_27F76: lea rdi, [rbp+var_2D0] call my_charset_loader_init_mysys lea rdi, [rbp+var_220] call get_charsets_dir mov rdi, rax lea rsi, aIndexXml; "Index.xml" call _stpcpy lea rsi, [rbp+var_220] lea rdi, [rbp+var_2D0] xor eax, eax mov edx, eax call my_read_charset_file jmp short $+2 loc_27FB6: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_27FD1 add rsp, 300h pop rbp retn loc_27FD1: call ___stack_chk_fail
unsigned long long init_available_charsets() { long long charsets_dir; // rax _QWORD *i; // [rsp+28h] [rbp-2D8h] _BYTE v3[176]; // [rsp+30h] [rbp-2D0h] BYREF _BYTE v4[536]; // [rsp+E0h] [rbp-220h] BYREF unsigned long long v5; // [rsp+2F8h] [rbp-8h] v5 = __readfsqword(0x28u); memset(all_charsets, 0LL, sizeof(all_charsets)); memset(my_collation_statistics, 0LL, sizeof(my_collation_statistics)); my_hash_init2( key_memory_charsets, (unsigned int)&charset_name_hash, 16, (unsigned int)&my_charset_latin1, 64, 0, 0LL, (long long)get_charset_key, 0LL, 0LL, 1); init_compiled_charsets(0LL); for ( i = all_charsets; i < &all_charsets[2047]; ++i ) { if ( *i && *(_QWORD *)(*i + 64LL) ) { if ( (unsigned __int8)init_state_maps(*i) ) *i = 0LL; } } my_charset_loader_init_mysys((long long)v3); charsets_dir = get_charsets_dir((long long)v4); stpcpy(charsets_dir, "Index.xml"); my_read_charset_file(v3, v4, 0LL); return __readfsqword(0x28u); }
init_available_charsets: PUSH RBP MOV RBP,RSP SUB RSP,0x300 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX LEA RDI,[0x484420] XOR ESI,ESI MOV EDX,0x4000 CALL 0x00124170 LEA RDI,[0x488490] XOR ESI,ESI MOV EDX,0x4000 CALL 0x00124170 LEA RAX,[0x48411c] MOV EDI,dword ptr [RAX] LEA RSI,[0x488420] MOV EDX,0x10 LEA RCX,[0x372760] MOV R8D,0x40 XOR EAX,EAX MOV R9D,EAX LEA RAX,[0x129970] MOV qword ptr [RSP],0x0 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],0x0 MOV dword ptr [RSP + 0x20],0x1 CALL 0x0012a390 XOR EAX,EAX MOV EDI,EAX CALL 0x0012f540 LEA RAX,[0x484420] MOV qword ptr [RBP + -0x2d8],RAX LAB_00127eff: LEA RAX,[0x484420] ADD RAX,0x4000 ADD RAX,-0x8 CMP qword ptr [RBP + -0x2d8],RAX JNC 0x00127f76 MOV RAX,qword ptr [RBP + -0x2d8] CMP qword ptr [RAX],0x0 JZ 0x00127f60 JMP 0x00127f28 LAB_00127f28: JMP 0x00127f2a LAB_00127f2a: MOV RAX,qword ptr [RBP + -0x2d8] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x40],0x0 JZ 0x00127f5e MOV RAX,qword ptr [RBP + -0x2d8] MOV RDI,qword ptr [RAX] CALL 0x001294d0 CMP AL,0x0 JZ 0x00127f5c MOV RAX,qword ptr [RBP + -0x2d8] MOV qword ptr [RAX],0x0 LAB_00127f5c: JMP 0x00127f5e LAB_00127f5e: JMP 0x00127f60 LAB_00127f60: JMP 0x00127f62 LAB_00127f62: MOV RAX,qword ptr [RBP + -0x2d8] ADD RAX,0x8 MOV qword ptr [RBP + -0x2d8],RAX JMP 0x00127eff LAB_00127f76: LEA RDI,[RBP + -0x2d0] CALL 0x00127470 LEA RDI,[RBP + -0x220] CALL 0x00127b10 MOV RDI,RAX LEA RSI,[0x178466] CALL 0x00124270 LEA RSI,[RBP + -0x220] LEA RDI,[RBP + -0x2d0] XOR EAX,EAX MOV EDX,EAX CALL 0x001299b0 JMP 0x00127fb6 LAB_00127fb6: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00127fd1 ADD RSP,0x300 POP RBP RET LAB_00127fd1: CALL 0x001242a0
void init_available_charsets(void) { char cVar1; char *__dest; long in_FS_OFFSET; long *local_2e0; int1 local_2d8 [176]; int1 local_228 [536]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); memset(&all_charsets,0,0x4000); memset(my_collation_statistics,0,0x4000); my_hash_init2(key_memory_charsets,charset_name_hash,0x10,&my_charset_latin1,0x40,0,0, get_charset_key,0,0,1); init_compiled_charsets(0); for (local_2e0 = &all_charsets; local_2e0 < (long *)0x488418; local_2e0 = local_2e0 + 1) { if (((*local_2e0 != 0) && (*(long *)(*local_2e0 + 0x40) != 0)) && (cVar1 = init_state_maps(*local_2e0), cVar1 != '\0')) { *local_2e0 = 0; } } my_charset_loader_init_mysys(local_2d8); __dest = (char *)get_charsets_dir(local_228); stpcpy(__dest,"Index.xml"); my_read_charset_file(local_2d8,local_228,0); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return; }
5,514
init_available_charsets
eloqsql/mysys/charset.c
static void init_available_charsets(void) { char fname[FN_REFLEN + sizeof(MY_CHARSET_INDEX)]; struct charset_info_st **cs; MY_CHARSET_LOADER loader; DBUG_ENTER("init_available_charsets"); bzero((char*) &all_charsets,sizeof(all_charsets)); bzero((char*) &my_collation_statistics, sizeof(my_collation_statistics)); my_hash_init2(key_memory_charsets, &charset_name_hash, 16, &my_charset_latin1, 64, 0, 0, get_charset_key, 0, 0, HASH_UNIQUE); init_compiled_charsets(MYF(0)); /* Copy compiled charsets */ for (cs= (struct charset_info_st**) all_charsets; cs < (struct charset_info_st**) all_charsets + array_elements(all_charsets)-1 ; cs++) { if (*cs) { DBUG_ASSERT(cs[0]->mbmaxlen <= MY_CS_MBMAXLEN); if (cs[0]->m_ctype) if (init_state_maps(*cs)) *cs= NULL; } } my_charset_loader_init_mysys(&loader); strmov(get_charsets_dir(fname), MY_CHARSET_INDEX); my_read_charset_file(&loader, fname, MYF(0)); DBUG_VOID_RETURN; }
O3
c
init_available_charsets: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x300, %rsp # imm = 0x300 movq %fs:0x28, %rax movq %rax, -0x18(%rbp) leaq 0x33dc2b(%rip), %rbx # 0x3648d0 movl $0x4000, %edx # imm = 0x4000 movq %rbx, %rdi xorl %esi, %esi callq 0x24160 leaq 0x341c85(%rip), %rdi # 0x368940 movl $0x4000, %edx # imm = 0x4000 xorl %esi, %esi callq 0x24160 leaq 0x33d8fe(%rip), %rax # 0x3645cc movl (%rax), %edi xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rsp) leaq 0x10fc(%rip), %rax # 0x27ddb movq %rax, 0x8(%rsp) movl $0x1, 0x20(%rsp) movq $0x0, (%rsp) leaq 0x341bd5(%rip), %rsi # 0x3688d0 leaq 0x2eca5e(%rip), %rcx # 0x313760 movl $0x40, %r8d movl $0x10, %edx xorl %r9d, %r9d callq 0x28139 xorl %edi, %edi callq 0x2b1d4 movq $-0x8, %r14 movq 0x8(%rbx,%r14), %rdi testq %rdi, %rdi je 0x26d46 cmpq $0x0, 0x40(%rdi) je 0x26d46 callq 0x27c26 testb %al, %al je 0x26d46 movq $0x0, 0x8(%rbx,%r14) addq $0x8, %r14 cmpq $0x3ff0, %r14 # imm = 0x3FF0 jb 0x26d23 leaq -0x2e0(%rbp), %rbx movb $0x0, (%rbx) leaq -0x8ae(%rip), %rax # 0x264b6 movq %rax, 0x80(%rbx) leaq -0x8ad(%rip), %rax # 0x264c5 movq %rax, 0x88(%rbx) leaq -0x8a0(%rip), %rax # 0x264e0 movq %rax, 0x90(%rbx) leaq 0x34f0(%rip), %rax # 0x2a27e movq %rax, 0x98(%rbx) leaq 0x2c6a7c(%rip), %rax # 0x2ed818 movq (%rax), %rax movq %rax, 0xa0(%rbx) leaq -0x8af(%rip), %rax # 0x264fe movq %rax, 0xa8(%rbx) leaq -0x230(%rbp), %r14 movq %r14, %rdi callq 0x26a43 movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49 movq %rcx, (%rax) movw $0x6c, 0x8(%rax) movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x27dec movq %fs:0x28, %rax cmpq -0x18(%rbp), %rax jne 0x26dfe addq $0x300, %rsp # imm = 0x300 popq %rbx popq %r14 popq %rbp retq callq 0x242e0
init_available_charsets: push rbp mov rbp, rsp push r14 push rbx sub rsp, 300h mov rax, fs:28h mov [rbp+var_18], rax lea rbx, all_charsets mov edx, 4000h mov rdi, rbx xor esi, esi call _memset lea rdi, my_collation_statistics mov edx, 4000h xor esi, esi call _memset lea rax, key_memory_charsets mov edi, [rax] xorps xmm0, xmm0 movups [rsp+310h+var_300], xmm0 lea rax, get_charset_key mov [rsp+310h+var_308], rax mov [rsp+310h+var_2F0], 1 mov [rsp+310h+var_310], 0 lea rsi, charset_name_hash lea rcx, my_charset_latin1 mov r8d, 40h ; '@' mov edx, 10h xor r9d, r9d call my_hash_init2 xor edi, edi call init_compiled_charsets mov r14, 0FFFFFFFFFFFFFFF8h loc_26D23: mov rdi, [rbx+r14+8] test rdi, rdi jz short loc_26D46 cmp qword ptr [rdi+40h], 0 jz short loc_26D46 call init_state_maps test al, al jz short loc_26D46 mov qword ptr [rbx+r14+8], 0 loc_26D46: add r14, 8 cmp r14, 3FF0h jb short loc_26D23 lea rbx, [rbp+var_2E0] mov byte ptr [rbx], 0 lea rax, my_once_alloc_c mov [rbx+80h], rax lea rax, my_malloc_c mov [rbx+88h], rax lea rax, my_realloc_c mov [rbx+90h], rax lea rax, my_free mov [rbx+98h], rax lea rax, my_charset_error_reporter mov rax, [rax] mov [rbx+0A0h], rax lea rax, add_collation mov [rbx+0A8h], rax lea r14, [rbp+var_230] mov rdi, r14 call get_charsets_dir mov rcx, 6D782E7865646E49h mov [rax], rcx mov word ptr [rax+8], 6Ch ; 'l' mov rdi, rbx mov rsi, r14 xor edx, edx call my_read_charset_file mov rax, fs:28h cmp rax, [rbp+var_18] jnz short loc_26DFE add rsp, 300h pop rbx pop r14 pop rbp retn loc_26DFE: call ___stack_chk_fail
unsigned long long init_available_charsets() { unsigned long long v0; // r14 long long v1; // rdi _BYTE v3[128]; // [rsp+30h] [rbp-2E0h] BYREF long long ( *v4)(long long); // [rsp+B0h] [rbp-260h] long long ( *v5)(long long); // [rsp+B8h] [rbp-258h] long long ( *v6)(long long, long long); // [rsp+C0h] [rbp-250h] long long ( *v7)(); // [rsp+C8h] [rbp-248h] long long ( *v8)(); // [rsp+D0h] [rbp-240h] long long ( *v9)(unsigned int *); // [rsp+D8h] [rbp-238h] _BYTE v10[536]; // [rsp+E0h] [rbp-230h] BYREF unsigned long long v11; // [rsp+2F8h] [rbp-18h] v11 = __readfsqword(0x28u); memset(all_charsets, 0LL, sizeof(all_charsets)); memset(my_collation_statistics, 0LL, sizeof(my_collation_statistics)); my_hash_init2( key_memory_charsets, (unsigned int)&charset_name_hash, 16, (unsigned int)&my_charset_latin1, 64, 0, 0LL, (long long)get_charset_key, 0LL, 0LL, 1); init_compiled_charsets(0LL); v0 = 0x1FFFFFFFFFFFFFFFLL; do { v1 = all_charsets[v0 + 1]; if ( v1 && *(_QWORD *)(v1 + 64) && (unsigned __int8)init_state_maps(v1) ) all_charsets[v0 + 1] = 0LL; ++v0; } while ( v0 < 2046 ); v3[0] = 0; v4 = my_once_alloc_c; v5 = my_malloc_c; v6 = my_realloc_c; v7 = my_free; v8 = my_charset_error_reporter; v9 = add_collation; strcpy((char *)get_charsets_dir((long long)v10), "Index.xml"); my_read_charset_file(v3, v10, 0LL); return __readfsqword(0x28u); }
init_available_charsets: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x300 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX LEA RBX,[0x4648d0] MOV EDX,0x4000 MOV RDI,RBX XOR ESI,ESI CALL 0x00124160 LEA RDI,[0x468940] MOV EDX,0x4000 XOR ESI,ESI CALL 0x00124160 LEA RAX,[0x4645cc] MOV EDI,dword ptr [RAX] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x10],XMM0 LEA RAX,[0x127ddb] MOV qword ptr [RSP + 0x8],RAX MOV dword ptr [RSP + 0x20],0x1 MOV qword ptr [RSP],0x0 LEA RSI,[0x4688d0] LEA RCX,[0x413760] MOV R8D,0x40 MOV EDX,0x10 XOR R9D,R9D CALL 0x00128139 XOR EDI,EDI CALL 0x0012b1d4 MOV R14,-0x8 LAB_00126d23: MOV RDI,qword ptr [RBX + R14*0x1 + 0x8] TEST RDI,RDI JZ 0x00126d46 CMP qword ptr [RDI + 0x40],0x0 JZ 0x00126d46 CALL 0x00127c26 TEST AL,AL JZ 0x00126d46 MOV qword ptr [RBX + R14*0x1 + 0x8],0x0 LAB_00126d46: ADD R14,0x8 CMP R14,0x3ff0 JC 0x00126d23 LEA RBX,[RBP + -0x2e0] MOV byte ptr [RBX],0x0 LEA RAX,[0x1264b6] MOV qword ptr [RBX + 0x80],RAX LEA RAX,[0x1264c5] MOV qword ptr [RBX + 0x88],RAX LEA RAX,[0x1264e0] MOV qword ptr [RBX + 0x90],RAX LEA RAX,[0x12a27e] MOV qword ptr [RBX + 0x98],RAX LEA RAX,[0x3ed818] MOV RAX,qword ptr [RAX] MOV qword ptr [RBX + 0xa0],RAX LEA RAX,[0x1264fe] MOV qword ptr [RBX + 0xa8],RAX LEA R14,[RBP + -0x230] MOV RDI,R14 CALL 0x00126a43 MOV RCX,0x6d782e7865646e49 MOV qword ptr [RAX],RCX MOV word ptr [RAX + 0x8],0x6c MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX CALL 0x00127dec MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x00126dfe ADD RSP,0x300 POP RBX POP R14 POP RBP RET LAB_00126dfe: CALL 0x001242e0
void init_available_charsets(void) { char cVar1; int8 *puVar2; ulong uVar3; long in_FS_OFFSET; int1 local_2e8 [128]; code *local_268; code *local_260; code *local_258; code *local_250; int *local_248; code *local_240; int1 local_238 [536]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); memset(&all_charsets,0,0x4000); memset(my_collation_statistics,0,0x4000); my_hash_init2(key_memory_charsets,charset_name_hash,0x10,&my_charset_latin1,0x40,0,0, get_charset_key,0,0,1); init_compiled_charsets(0); uVar3 = 0xfffffffffffffff8; do { if ((*(long *)((long)&DAT_004648d8 + uVar3) != 0) && (*(long *)(*(long *)((long)&DAT_004648d8 + uVar3) + 0x40) != 0)) { cVar1 = init_state_maps(); if (cVar1 != '\0') { *(int8 *)((long)&DAT_004648d8 + uVar3) = 0; } } uVar3 = uVar3 + 8; } while (uVar3 < 0x3ff0); local_2e8[0] = 0; local_268 = my_once_alloc_c; local_260 = my_malloc_c; local_258 = my_realloc_c; local_250 = my_free; local_248 = my_charset_error_reporter; local_240 = add_collation; puVar2 = (int8 *)get_charsets_dir(local_238); *puVar2 = 0x6d782e7865646e49; *(int2 *)(puVar2 + 1) = 0x6c; my_read_charset_file(local_2e8,local_238,0); if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
5,515
mysql_list_processes_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_list_processes_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_list_processes, (parms->mysql), parms->mysql, MYSQL_RES *, r_ptr) }
O3
c
mysql_list_processes_start_internal: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rdi movq 0x480(%rdi), %rax movq 0x28(%rax), %rbx callq 0x5fb1d movq %rax, 0x8(%rbx) movl $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_list_processes_start_internal: push rbp mov rbp, rsp push rbx push rax mov rdi, [rdi] mov rax, [rdi+480h] mov rbx, [rax+28h] call mysql_list_processes mov [rbx+8], rax mov dword ptr [rbx], 0 add rsp, 8 pop rbx pop rbp retn
long long mysql_list_processes_start_internal(long long *a1) { long long v1; // rdi long long v2; // rbx long long result; // rax v1 = *a1; v2 = *(_QWORD *)(*(_QWORD *)(v1 + 1152) + 40LL); result = mysql_list_processes(v1); *(_QWORD *)(v2 + 8) = result; *(_DWORD *)v2 = 0; return result; }
mysql_list_processes_start_internal: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RDI,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x480] MOV RBX,qword ptr [RAX + 0x28] CALL 0x0015fb1d MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP RBP RET
void mysql_list_processes_start_internal(long *param_1) { int4 *puVar1; int8 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_list_processes(); *(int8 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
5,516
init_dynamic_array2
eloqsql/mysys/array.c
my_bool init_dynamic_array2(PSI_memory_key psi_key, DYNAMIC_ARRAY *array, uint element_size, void *init_buffer, uint init_alloc, uint alloc_increment, myf my_flags) { DBUG_ENTER("init_dynamic_array2"); if (!alloc_increment) { alloc_increment=MY_MAX((8192-MALLOC_OVERHEAD)/element_size,16); if (init_alloc > 8 && alloc_increment > init_alloc * 2) alloc_increment=init_alloc*2; } array->elements=0; array->max_element=init_alloc; array->alloc_increment=alloc_increment; array->size_of_element=element_size; array->m_psi_key= psi_key; array->malloc_flags= my_flags; DBUG_ASSERT((my_flags & MY_INIT_BUFFER_USED) == 0); if ((array->buffer= init_buffer)) { array->malloc_flags|= MY_INIT_BUFFER_USED; DBUG_RETURN(FALSE); } /* Since the dynamic array is usable even if allocation fails here malloc should not throw an error */ if (init_alloc && !(array->buffer= (uchar*) my_malloc(psi_key, element_size*init_alloc, MYF(my_flags)))) array->max_element=0; DBUG_RETURN(FALSE); }
O3
c
init_dynamic_array2: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movl %edx, %r11d movq %rsi, %rbx movq 0x10(%rbp), %r10 testl %r9d, %r9d jne 0x91967 movl $0x10, %r9d cmpl $0x1e1, %r11d # imm = 0x1E1 ja 0x91956 movw $0x1ff8, %ax # imm = 0x1FF8 xorl %edx, %edx divw %r11w movzwl %ax, %r9d cmpl $0x9, %r8d jb 0x91967 leal (%r8,%r8), %eax cmpl %eax, %r9d cmovael %eax, %r9d movl $0x0, 0x8(%rbx) movl %r8d, 0xc(%rbx) movl %r9d, 0x10(%rbx) movl %r11d, 0x14(%rbx) movl %edi, 0x18(%rbx) movq %r10, 0x20(%rbx) movq %rcx, (%rbx) testq %rcx, %rcx je 0x9199d orq $0x100, %r10 # imm = 0x100 movq %r10, 0x20(%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq testl %r8d, %r8d je 0x91994 imull %r11d, %r8d movq %r8, %rsi movq %r10, %rdx callq 0x9fd51 movq %rax, (%rbx) testq %rax, %rax jne 0x91994 movl $0x0, 0xc(%rbx) jmp 0x91994
init_dynamic_array2: push rbp mov rbp, rsp push rbx push rax mov r11d, edx mov rbx, rsi mov r10, [rbp+arg_0] test r9d, r9d jnz short loc_91967 mov r9d, 10h cmp r11d, 1E1h ja short loc_91956 mov ax, 1FF8h xor edx, edx div r11w movzx r9d, ax loc_91956: cmp r8d, 9 jb short loc_91967 lea eax, [r8+r8] cmp r9d, eax cmovnb r9d, eax loc_91967: mov dword ptr [rbx+8], 0 mov [rbx+0Ch], r8d mov [rbx+10h], r9d mov [rbx+14h], r11d mov [rbx+18h], edi mov [rbx+20h], r10 mov [rbx], rcx test rcx, rcx jz short loc_9199D or r10, 100h mov [rbx+20h], r10 loc_91994: xor eax, eax add rsp, 8 pop rbx pop rbp retn loc_9199D: test r8d, r8d jz short loc_91994 imul r8d, r11d mov rsi, r8 mov rdx, r10 call my_malloc mov [rbx], rax test rax, rax jnz short loc_91994 mov dword ptr [rbx+0Ch], 0 jmp short loc_91994
long long init_dynamic_array2( long long a1, long long a2, unsigned int a3, long long a4, unsigned int a5, unsigned int a6, long long a7) { long long v8; // rax if ( !a6 ) { a6 = 16; if ( a3 <= 0x1E1 ) a6 = 0x1FF8u / (unsigned __int16)a3; if ( a5 >= 9 && a6 >= 2 * a5 ) a6 = 2 * a5; } *(_DWORD *)(a2 + 8) = 0; *(_DWORD *)(a2 + 12) = a5; *(_DWORD *)(a2 + 16) = a6; *(_DWORD *)(a2 + 20) = a3; *(_DWORD *)(a2 + 24) = a1; *(_QWORD *)(a2 + 32) = a7; *(_QWORD *)a2 = a4; if ( a4 ) { *(_QWORD *)(a2 + 32) = a7 | 0x100; } else if ( a5 ) { v8 = my_malloc(a1, a3 * a5, a7); *(_QWORD *)a2 = v8; if ( !v8 ) *(_DWORD *)(a2 + 12) = 0; } return 0LL; }
init_dynamic_array2: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV R11D,EDX MOV RBX,RSI MOV R10,qword ptr [RBP + 0x10] TEST R9D,R9D JNZ 0x00191967 MOV R9D,0x10 CMP R11D,0x1e1 JA 0x00191956 MOV AX,0x1ff8 XOR EDX,EDX DIV R11W MOVZX R9D,AX LAB_00191956: CMP R8D,0x9 JC 0x00191967 LEA EAX,[R8 + R8*0x1] CMP R9D,EAX CMOVNC R9D,EAX LAB_00191967: MOV dword ptr [RBX + 0x8],0x0 MOV dword ptr [RBX + 0xc],R8D MOV dword ptr [RBX + 0x10],R9D MOV dword ptr [RBX + 0x14],R11D MOV dword ptr [RBX + 0x18],EDI MOV qword ptr [RBX + 0x20],R10 MOV qword ptr [RBX],RCX TEST RCX,RCX JZ 0x0019199d OR R10,0x100 MOV qword ptr [RBX + 0x20],R10 LAB_00191994: XOR EAX,EAX ADD RSP,0x8 POP RBX POP RBP RET LAB_0019199d: TEST R8D,R8D JZ 0x00191994 IMUL R8D,R11D MOV RSI,R8 MOV RDX,R10 CALL 0x0019fd51 MOV qword ptr [RBX],RAX TEST RAX,RAX JNZ 0x00191994 MOV dword ptr [RBX + 0xc],0x0 JMP 0x00191994
int8 init_dynamic_array2(int4 param_1,long *param_2,uint param_3,long param_4,uint param_5, uint param_6,ulong param_7) { long lVar1; if (param_6 == 0) { param_6 = 0x10; if (param_3 < 0x1e2) { param_6 = 0x1ff8 / (param_3 & 0xffff); } if ((8 < param_5) && (param_5 * 2 <= param_6)) { param_6 = param_5 * 2; } } *(int4 *)(param_2 + 1) = 0; *(uint *)((long)param_2 + 0xc) = param_5; *(uint *)(param_2 + 2) = param_6; *(uint *)((long)param_2 + 0x14) = param_3; *(int4 *)(param_2 + 3) = param_1; param_2[4] = param_7; *param_2 = param_4; if (param_4 == 0) { if (param_5 != 0) { lVar1 = my_malloc(param_1,param_5 * param_3,param_7); *param_2 = lVar1; if (lVar1 == 0) { *(int4 *)((long)param_2 + 0xc) = 0; } } } else { param_2[4] = param_7 | 0x100; } return 0; }
5,517
thr_upgrade_write_delay_lock
eloqsql/mysys/thr_lock.c
my_bool thr_upgrade_write_delay_lock(THR_LOCK_DATA *data, enum thr_lock_type new_lock_type, ulong lock_wait_timeout) { THR_LOCK *lock=data->lock; enum enum_thr_lock_result res; DBUG_ENTER("thr_upgrade_write_delay_lock"); mysql_mutex_lock(&lock->mutex); if (data->type == TL_UNLOCK || data->type >= TL_WRITE_LOW_PRIORITY) { mysql_mutex_unlock(&lock->mutex); DBUG_RETURN(data->type == TL_UNLOCK); /* Test if Aborted */ } check_locks(lock,"before upgrading lock", data->type, 0); /* TODO: Upgrade to TL_WRITE_CONCURRENT_INSERT in some cases */ data->type= new_lock_type; /* Upgrade lock */ /* Check if someone has given us the lock */ if (!data->cond) { if (!lock->read.data) /* No read locks */ { /* We have the lock */ /* For this function, get_status is not allowed to fail */ if (data->lock->get_status) (*data->lock->get_status)(data->status_param, 0); mysql_mutex_unlock(&lock->mutex); if (lock->start_trans) (*lock->start_trans)(data->status_param); DBUG_RETURN(0); } if (((*data->prev)=data->next)) /* remove from lock-list */ data->next->prev= data->prev; else lock->write.last=data->prev; if ((data->next=lock->write_wait.data)) /* Put first in lock_list */ data->next->prev= &data->next; else lock->write_wait.last= &data->next; data->prev= &lock->write_wait.data; lock->write_wait.data=data; check_locks(lock,"upgrading lock", new_lock_type, 0); } else { check_locks(lock,"waiting for lock", new_lock_type, 0); } res= wait_for_lock(&lock->write_wait, data, 1, lock_wait_timeout); if (res == THR_LOCK_SUCCESS && lock->start_trans) DBUG_RETURN((*lock->start_trans)(data->status_param)); DBUG_RETURN(0); }
O3
c
thr_upgrade_write_delay_lock: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r15 movl %esi, %r12d movq %rdi, %rbx movq 0x18(%rdi), %r13 leaq 0x18(%r13), %r14 cmpq $0x0, 0x58(%r13) jne 0xa3979 movq %r14, %rdi callq 0x29220 movl 0x40(%rbx), %eax testl %eax, %eax setne %cl cmpl $0xb, %eax setl %al testb %al, %cl jne 0xa3880 movq 0x58(%r13), %rdi testq %rdi, %rdi jne 0xa3992 movq %r14, %rdi callq 0x291e0 cmpl $0x0, 0x40(%rbx) sete %al jmp 0xa390d movl %r12d, 0x40(%rbx) cmpq $0x0, 0x20(%rbx) jne 0xa38f0 cmpq $0x0, 0x70(%r13) je 0xa393c leaq 0x8(%rbx), %rax movq 0x8(%rbx), %rcx movq 0x10(%rbx), %rdx movq %rcx, (%rdx) leaq 0x98(%r13), %rdx leaq 0x10(%rcx), %rsi testq %rcx, %rcx movq 0x10(%rbx), %rcx cmoveq %rdx, %rsi movq %rcx, (%rsi) leaq 0x80(%r13), %rcx movq 0x80(%r13), %rdx leaq 0x88(%r13), %rsi leaq 0x10(%rdx), %rdi testq %rdx, %rdx cmoveq %rsi, %rdi movq %rdx, 0x8(%rbx) movq %rax, (%rdi) movq %rcx, 0x10(%rbx) movq %rbx, 0x80(%r13) leaq 0x80(%r13), %rdi movq %rbx, %rsi movl $0x1, %edx movq %r15, %rcx callq 0xa39b9 testl %eax, %eax je 0xa391c xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0xd0(%r13), %rax testq %rax, %rax je 0xa390b movq 0x28(%rbx), %rdi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmpq *%rax movq 0x18(%rbx), %rax movq 0xb0(%rax), %rax testq %rax, %rax je 0xa3954 movq 0x28(%rbx), %rdi xorl %esi, %esi callq *%rax movq 0x58(%r13), %rdi testq %rdi, %rdi jne 0xa39a7 movq %r14, %rdi callq 0x291e0 movq 0xd0(%r13), %rax testq %rax, %rax je 0xa390b movq 0x28(%rbx), %rdi callq *%rax jmp 0xa390b leaq 0x38e89(%rip), %rsi # 0xdc809 movq %r14, %rdi movl $0x5a5, %edx # imm = 0x5A5 callq 0x2eb8f jmp 0xa384d leaq 0x2e2677(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0xa386c leaq 0x2e2662(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0xa395d
thr_upgrade_write_delay_lock: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r15, rdx mov r12d, esi mov rbx, rdi mov r13, [rdi+18h] lea r14, [r13+18h] cmp qword ptr [r13+58h], 0 jnz loc_A3979 mov rdi, r14 call _pthread_mutex_lock loc_A384D: mov eax, [rbx+40h] test eax, eax setnz cl cmp eax, 0Bh setl al test cl, al jnz short loc_A3880 mov rdi, [r13+58h] test rdi, rdi jnz loc_A3992 loc_A386C: mov rdi, r14 call _pthread_mutex_unlock cmp dword ptr [rbx+40h], 0 setz al jmp loc_A390D loc_A3880: mov [rbx+40h], r12d cmp qword ptr [rbx+20h], 0 jnz short loc_A38F0 cmp qword ptr [r13+70h], 0 jz loc_A393C lea rax, [rbx+8] mov rcx, [rbx+8] mov rdx, [rbx+10h] mov [rdx], rcx lea rdx, [r13+98h] lea rsi, [rcx+10h] test rcx, rcx mov rcx, [rbx+10h] cmovz rsi, rdx mov [rsi], rcx lea rcx, [r13+80h] mov rdx, [r13+80h] lea rsi, [r13+88h] lea rdi, [rdx+10h] test rdx, rdx cmovz rdi, rsi mov [rbx+8], rdx mov [rdi], rax mov [rbx+10h], rcx mov [r13+80h], rbx loc_A38F0: lea rdi, [r13+80h] mov rsi, rbx mov edx, 1 mov rcx, r15 call wait_for_lock test eax, eax jz short loc_A391C loc_A390B: xor eax, eax loc_A390D: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A391C: mov rax, [r13+0D0h] test rax, rax jz short loc_A390B mov rdi, [rbx+28h] add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp rax loc_A393C: mov rax, [rbx+18h] mov rax, [rax+0B0h] test rax, rax jz short loc_A3954 mov rdi, [rbx+28h] xor esi, esi call rax loc_A3954: mov rdi, [r13+58h] test rdi, rdi jnz short loc_A39A7 loc_A395D: mov rdi, r14 call _pthread_mutex_unlock mov rax, [r13+0D0h] test rax, rax jz short loc_A390B mov rdi, [rbx+28h] call rax jmp short loc_A390B loc_A3979: lea rsi, aWorkspaceLlm4b_23; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r14 mov edx, 5A5h call psi_mutex_lock jmp loc_A384D loc_A3992: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_A386C loc_A39A7: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_A395D
char thr_upgrade_write_delay_lock(long long a1, int a2, long long a3) { _QWORD *v5; // r13 long long v6; // rdi long long v8; // rax long long v9; // rcx _QWORD *v10; // rsi long long v11; // rdx _QWORD *v12; // rdi long long ( *v13)(_QWORD); // rax void ( *v14)(_QWORD, _QWORD); // rax long long v15; // rdi void ( *v16)(_QWORD); // rax v5 = *(_QWORD **)(a1 + 24); if ( v5[11] ) psi_mutex_lock((long long)(v5 + 3), (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x5A5u); else pthread_mutex_lock(v5 + 3); if ( *(_DWORD *)(a1 + 64) < 11 && *(_DWORD *)(a1 + 64) != 0 ) { *(_DWORD *)(a1 + 64) = a2; if ( !*(_QWORD *)(a1 + 32) ) { if ( !v5[14] ) { v14 = *(void ( **)(_QWORD, _QWORD))(*(_QWORD *)(a1 + 24) + 176LL); if ( v14 ) v14(*(_QWORD *)(a1 + 40), 0LL); v15 = v5[11]; if ( v15 ) ((void ( *)(long long))PSI_server[44])(v15); pthread_mutex_unlock(v5 + 3); v16 = (void ( *)(_QWORD))v5[26]; if ( v16 ) v16(*(_QWORD *)(a1 + 40)); return 0; } v8 = a1 + 8; v9 = *(_QWORD *)(a1 + 8); **(_QWORD **)(a1 + 16) = v9; v10 = (_QWORD *)(v9 + 16); if ( !v9 ) v10 = v5 + 19; *v10 = *(_QWORD *)(a1 + 16); v11 = v5[16]; v12 = (_QWORD *)(v11 + 16); if ( !v11 ) v12 = v5 + 17; *(_QWORD *)(a1 + 8) = v11; *v12 = v8; *(_QWORD *)(a1 + 16) = v5 + 16; v5[16] = a1; } if ( !(unsigned int)wait_for_lock(v5 + 16, a1, 1LL, a3) ) { v13 = (long long ( *)(_QWORD))v5[26]; if ( v13 ) return v13(*(_QWORD *)(a1 + 40)); } return 0; } v6 = v5[11]; if ( v6 ) ((void ( *)(long long))PSI_server[44])(v6); pthread_mutex_unlock(v5 + 3); return *(_DWORD *)(a1 + 64) == 0; }
thr_upgrade_write_delay_lock: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,RDX MOV R12D,ESI MOV RBX,RDI MOV R13,qword ptr [RDI + 0x18] LEA R14,[R13 + 0x18] CMP qword ptr [R13 + 0x58],0x0 JNZ 0x001a3979 MOV RDI,R14 CALL 0x00129220 LAB_001a384d: MOV EAX,dword ptr [RBX + 0x40] TEST EAX,EAX SETNZ CL CMP EAX,0xb SETL AL TEST CL,AL JNZ 0x001a3880 MOV RDI,qword ptr [R13 + 0x58] TEST RDI,RDI JNZ 0x001a3992 LAB_001a386c: MOV RDI,R14 CALL 0x001291e0 CMP dword ptr [RBX + 0x40],0x0 SETZ AL JMP 0x001a390d LAB_001a3880: MOV dword ptr [RBX + 0x40],R12D CMP qword ptr [RBX + 0x20],0x0 JNZ 0x001a38f0 CMP qword ptr [R13 + 0x70],0x0 JZ 0x001a393c LEA RAX,[RBX + 0x8] MOV RCX,qword ptr [RBX + 0x8] MOV RDX,qword ptr [RBX + 0x10] MOV qword ptr [RDX],RCX LEA RDX,[R13 + 0x98] LEA RSI,[RCX + 0x10] TEST RCX,RCX MOV RCX,qword ptr [RBX + 0x10] CMOVZ RSI,RDX MOV qword ptr [RSI],RCX LEA RCX,[R13 + 0x80] MOV RDX,qword ptr [R13 + 0x80] LEA RSI,[R13 + 0x88] LEA RDI,[RDX + 0x10] TEST RDX,RDX CMOVZ RDI,RSI MOV qword ptr [RBX + 0x8],RDX MOV qword ptr [RDI],RAX MOV qword ptr [RBX + 0x10],RCX MOV qword ptr [R13 + 0x80],RBX LAB_001a38f0: LEA RDI,[R13 + 0x80] MOV RSI,RBX MOV EDX,0x1 MOV RCX,R15 CALL 0x001a39b9 TEST EAX,EAX JZ 0x001a391c LAB_001a390b: XOR EAX,EAX LAB_001a390d: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001a391c: MOV RAX,qword ptr [R13 + 0xd0] TEST RAX,RAX JZ 0x001a390b MOV RDI,qword ptr [RBX + 0x28] ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP RAX LAB_001a393c: MOV RAX,qword ptr [RBX + 0x18] MOV RAX,qword ptr [RAX + 0xb0] TEST RAX,RAX JZ 0x001a3954 MOV RDI,qword ptr [RBX + 0x28] XOR ESI,ESI CALL RAX LAB_001a3954: MOV RDI,qword ptr [R13 + 0x58] TEST RDI,RDI JNZ 0x001a39a7 LAB_001a395d: MOV RDI,R14 CALL 0x001291e0 MOV RAX,qword ptr [R13 + 0xd0] TEST RAX,RAX JZ 0x001a390b MOV RDI,qword ptr [RBX + 0x28] CALL RAX JMP 0x001a390b LAB_001a3979: LEA RSI,[0x1dc809] MOV RDI,R14 MOV EDX,0x5a5 CALL 0x0012eb8f JMP 0x001a384d LAB_001a3992: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001a386c LAB_001a39a7: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001a395d
int8 thr_upgrade_write_delay_lock(long param_1,int4 param_2,int8 param_3) { pthread_mutex_t *__mutex; long lVar1; long lVar2; code *pcVar3; int iVar4; int4 extraout_var; int8 uVar5; int8 *puVar6; long *plVar7; lVar1 = *(long *)(param_1 + 0x18); __mutex = (pthread_mutex_t *)(lVar1 + 0x18); if (*(long *)(lVar1 + 0x58) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x5a5); } if (*(int *)(param_1 + 0x40) == 0 || 10 < *(int *)(param_1 + 0x40)) { if (*(long *)(lVar1 + 0x58) != 0) { (**(code **)(PSI_server + 0x160))(); } iVar4 = pthread_mutex_unlock(__mutex); return CONCAT71((int7)(CONCAT44(extraout_var,iVar4) >> 8),*(int *)(param_1 + 0x40) == 0); } *(int4 *)(param_1 + 0x40) = param_2; if (*(long *)(param_1 + 0x20) == 0) { if (*(long *)(lVar1 + 0x70) == 0) { pcVar3 = *(code **)(*(long *)(param_1 + 0x18) + 0xb0); if (pcVar3 != (code *)0x0) { (*pcVar3)(*(int8 *)(param_1 + 0x28),0); } if (*(long *)(lVar1 + 0x58) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); if (*(code **)(lVar1 + 0xd0) == (code *)0x0) { return 0; } (**(code **)(lVar1 + 0xd0))(*(int8 *)(param_1 + 0x28)); return 0; } lVar2 = *(long *)(param_1 + 8); **(long **)(param_1 + 0x10) = lVar2; puVar6 = (int8 *)(lVar2 + 0x10); if (lVar2 == 0) { puVar6 = (int8 *)(lVar1 + 0x98); } *puVar6 = *(int8 *)(param_1 + 0x10); lVar2 = *(long *)(lVar1 + 0x80); plVar7 = (long *)(lVar2 + 0x10); if (lVar2 == 0) { plVar7 = (long *)(lVar1 + 0x88); } *(long *)(param_1 + 8) = lVar2; *plVar7 = param_1 + 8; *(long *)(param_1 + 0x10) = lVar1 + 0x80; *(long *)(lVar1 + 0x80) = param_1; } iVar4 = wait_for_lock(lVar1 + 0x80,param_1,1,param_3); if ((iVar4 == 0) && (*(code **)(lVar1 + 0xd0) != (code *)0x0)) { /* WARNING: Could not recover jumptable at 0x001a393a. Too many branches */ /* WARNING: Treating indirect jump as call */ uVar5 = (**(code **)(lVar1 + 0xd0))(*(int8 *)(param_1 + 0x28)); return uVar5; } return 0; }
5,518
inline_mysql_file_write
eloqsql/include/mysql/psi/mysql_file.h
static inline size_t inline_mysql_file_write( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, const uchar *buffer, size_t count, myf flags) { size_t result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; size_t bytes_written; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_WRITE); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); result= my_write(file, buffer, count, flags); if (flags & (MY_NABP | MY_FNABP)) bytes_written= (result == 0) ? count : 0; else bytes_written= (result != MY_FILE_ERROR) ? result : 0; PSI_FILE_CALL(end_file_wait)(locker, bytes_written); return result; } #endif result= my_write(file, buffer, count, flags); return result; }
O0
c
inline_mysql_file_write: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) leaq 0x2079f0(%rip), %rax # 0x2c0238 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x88(%rbp), %rdi movl $0x7, %edx callq *%rax movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xb8957 leaq 0x2079a6(%rip), %rax # 0x2c0238 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x40(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx callq 0xf6d00 movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0xb8902 cmpq $0x0, -0x38(%rbp) jne 0xb88e7 movq -0x28(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0xb88f2 xorl %eax, %eax movq %rax, -0x98(%rbp) jmp 0xb88f2 movq -0x98(%rbp), %rax movq %rax, -0x90(%rbp) jmp 0xb892f cmpq $-0x1, -0x38(%rbp) je 0xb8916 movq -0x38(%rbp), %rax movq %rax, -0xa0(%rbp) jmp 0xb8921 xorl %eax, %eax movq %rax, -0xa0(%rbp) jmp 0xb8921 movq -0xa0(%rbp), %rax movq %rax, -0x90(%rbp) leaq 0x207902(%rip), %rax # 0x2c0238 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x40(%rbp), %rdi movq -0x90(%rbp), %rsi callq *%rax movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xb8977 movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx callq 0xf6d00 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_file_write_2: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_88] mov edx, 7 call rax mov [rbp+var_40], rax cmp [rbp+var_40], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz loc_B8957 lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_28] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] call my_write mov [rbp+var_38], rax mov rax, [rbp+var_30] and rax, 6 cmp rax, 0 jz short loc_B8902 cmp [rbp+var_38], 0 jnz short loc_B88E7 mov rax, [rbp+var_28] mov [rbp+var_98], rax jmp short loc_B88F2 loc_B88E7: xor eax, eax mov [rbp+var_98], rax jmp short $+2 loc_B88F2: mov rax, [rbp+var_98] mov [rbp+var_90], rax jmp short loc_B892F loc_B8902: cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh jz short loc_B8916 mov rax, [rbp+var_38] mov [rbp+var_A0], rax jmp short loc_B8921 loc_B8916: xor eax, eax mov [rbp+var_A0], rax jmp short $+2 loc_B8921: mov rax, [rbp+var_A0] mov [rbp+var_90], rax loc_B892F: lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_90] call rax mov rax, [rbp+var_38] mov [rbp+var_8], rax jmp short loc_B8977 loc_B8957: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] call my_write mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_B8977: mov rax, [rbp+var_8] add rsp, 0A0h pop rbp retn
long long inline_mysql_file_write_2( long long a1, unsigned int a2, unsigned int a3, long long a4, long long a5, long long a6) { long long v7; // [rsp+0h] [rbp-A0h] long long v8; // [rsp+8h] [rbp-98h] _BYTE v9[72]; // [rsp+18h] [rbp-88h] BYREF long long v10; // [rsp+60h] [rbp-40h] long long v11; // [rsp+68h] [rbp-38h] long long v12; // [rsp+70h] [rbp-30h] long long v13; // [rsp+78h] [rbp-28h] long long v14; // [rsp+80h] [rbp-20h] unsigned int v15; // [rsp+88h] [rbp-18h] unsigned int v16; // [rsp+8Ch] [rbp-14h] long long v17; // [rsp+90h] [rbp-10h] v17 = a1; v16 = a2; v15 = a3; v14 = a4; v13 = a5; v12 = a6; v10 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v9, a3, 7LL); if ( v10 ) { ((void ( *)(long long, long long, long long, _QWORD))PSI_server[66])(v10, v13, v17, v16); v11 = my_write(v15, v14, v13, v12); if ( (v12 & 6) != 0 ) { if ( v11 ) v8 = 0LL; else v8 = v13; ((void ( *)(long long, long long))PSI_server[67])(v10, v8); } else { if ( v11 == -1 ) v7 = 0LL; else v7 = v11; ((void ( *)(long long, long long))PSI_server[67])(v10, v7); } return v11; } else { return my_write(v15, v14, v13, v12); } }
inline_mysql_file_write: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x3c0238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x88] MOV EDX,0x7 CALL RAX MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001b8957 LEA RAX,[0x3c0238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001f6d00 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] AND RAX,0x6 CMP RAX,0x0 JZ 0x001b8902 CMP qword ptr [RBP + -0x38],0x0 JNZ 0x001b88e7 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x98],RAX JMP 0x001b88f2 LAB_001b88e7: XOR EAX,EAX MOV qword ptr [RBP + -0x98],RAX JMP 0x001b88f2 LAB_001b88f2: MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x90],RAX JMP 0x001b892f LAB_001b8902: CMP qword ptr [RBP + -0x38],-0x1 JZ 0x001b8916 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0xa0],RAX JMP 0x001b8921 LAB_001b8916: XOR EAX,EAX MOV qword ptr [RBP + -0xa0],RAX JMP 0x001b8921 LAB_001b8921: MOV RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0x90],RAX LAB_001b892f: LEA RAX,[0x3c0238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x90] CALL RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX JMP 0x001b8977 LAB_001b8957: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001f6d00 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_001b8977: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xa0 POP RBP RET
long inline_mysql_file_write (int8 param_1,int4 param_2,int4 param_3,int8 param_4, long param_5,ulong param_6) { long local_a8; long local_a0; long local_98; int1 local_90 [72]; long local_48; long local_40; ulong local_38; long local_30; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; long local_10; local_38 = param_6; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,7); if (local_48 == 0) { local_10 = my_write(local_20,local_28,local_30,local_38); } else { (**(code **)(PSI_server + 0x210))(local_48,local_30,local_18,local_1c); local_40 = my_write(local_20,local_28,local_30,local_38); if ((local_38 & 6) == 0) { local_a8 = local_40; if (local_40 == -1) { local_a8 = 0; } local_98 = local_a8; } else { if (local_40 == 0) { local_a0 = local_30; } else { local_a0 = 0; } local_98 = local_a0; } (**(code **)(PSI_server + 0x218))(local_48,local_98); local_10 = local_40; } return local_10; }
5,519
get_charset
eloqsql/mysys/charset.c
CHARSET_INFO *get_charset(uint cs_number, myf flags) { CHARSET_INFO *cs= NULL; if (cs_number == default_charset_info->number) return default_charset_info; my_pthread_once(&charsets_initialized, init_available_charsets); if (cs_number < array_elements(all_charsets)) { MY_CHARSET_LOADER loader; my_charset_loader_init_mysys(&loader); cs= get_internal_charset(&loader, cs_number, flags); } if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)], cs_string[23]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); cs_string[0]='#'; int10_to_str(cs_number, cs_string+1, 10); my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_string, index_file); } return cs; }
O0
c
get_charset: pushq %rbp movq %rsp, %rbp subq $0x320, %rsp # imm = 0x320 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0x2fc(%rbp) movq %rsi, -0x308(%rbp) movq $0x0, -0x310(%rbp) movl -0x2fc(%rbp), %eax leaq 0x1aa8bb(%rip), %rcx # 0x1da108 movq (%rcx), %rcx cmpl (%rcx), %eax jne 0x2f86a leaq 0x1aa8ad(%rip), %rax # 0x1da108 movq (%rax), %rax movq %rax, -0x2f8(%rbp) jmp 0x2f93c leaq 0x36a923(%rip), %rdi # 0x39a194 leaq -0x548(%rip), %rsi # 0x2f330 callq 0x25280 cmpl $0x800, -0x2fc(%rbp) # imm = 0x800 jae 0x2f8b5 leaq -0xb8(%rbp), %rdi callq 0x2e950 movl -0x2fc(%rbp), %esi movq -0x308(%rbp), %rdx leaq -0xb8(%rbp), %rdi callq 0x2f980 movq %rax, -0x310(%rbp) cmpq $0x0, -0x310(%rbp) jne 0x2f92e movq -0x308(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0x2f92e leaq -0x2d0(%rbp), %rdi callq 0x2eff0 movq %rax, %rdi leaq 0x53981(%rip), %rsi # 0x83267 callq 0x252d0 movb $0x23, -0x2f0(%rbp) movl -0x2fc(%rbp), %eax movl %eax, %edi leaq -0x2f0(%rbp), %rsi addq $0x1, %rsi movl $0xa, %edx callq 0x7c3d0 leaq -0x2f0(%rbp), %rdx leaq -0x2d0(%rbp), %rcx movl $0x16, %edi movl $0x4, %esi movb $0x0, %al callq 0x37670 movq -0x310(%rbp), %rax movq %rax, -0x2f8(%rbp) movq -0x2f8(%rbp), %rax movq %rax, -0x318(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x2f96c movq -0x318(%rbp), %rax addq $0x320, %rsp # imm = 0x320 popq %rbp retq callq 0x25330 nopw %cs:(%rax,%rax)
get_charset: push rbp mov rbp, rsp sub rsp, 320h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_2FC], edi mov [rbp+var_308], rsi mov [rbp+var_310], 0 mov eax, [rbp+var_2FC] lea rcx, default_charset_info mov rcx, [rcx] cmp eax, [rcx] jnz short loc_2F86A lea rax, default_charset_info mov rax, [rax] mov [rbp+var_2F8], rax jmp loc_2F93C loc_2F86A: lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once cmp [rbp+var_2FC], 800h jnb short loc_2F8B5 lea rdi, [rbp+var_B8] call my_charset_loader_init_mysys mov esi, [rbp+var_2FC] mov rdx, [rbp+var_308] lea rdi, [rbp+var_B8] call get_internal_charset mov [rbp+var_310], rax loc_2F8B5: cmp [rbp+var_310], 0 jnz short loc_2F92E mov rax, [rbp+var_308] and rax, 10h cmp rax, 0 jz short loc_2F92E lea rdi, [rbp+var_2D0] call get_charsets_dir mov rdi, rax lea rsi, aIndexXml; "Index.xml" call _stpcpy mov [rbp+var_2F0], 23h ; '#' mov eax, [rbp+var_2FC] mov edi, eax lea rsi, [rbp+var_2F0] add rsi, 1 mov edx, 0Ah call int10_to_str lea rdx, [rbp+var_2F0] lea rcx, [rbp+var_2D0] mov edi, 16h mov esi, 4 mov al, 0 call my_error loc_2F92E: mov rax, [rbp+var_310] mov [rbp+var_2F8], rax loc_2F93C: mov rax, [rbp+var_2F8] mov [rbp+var_318], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_2F96C mov rax, [rbp+var_318] add rsp, 320h pop rbp retn loc_2F96C: call ___stack_chk_fail
void * get_charset(unsigned int a1, long long a2) { long long charsets_dir; // rax int v3; // r8d int v4; // r9d long long internal_charset; // [rsp+10h] [rbp-310h] char v8; // [rsp+30h] [rbp-2F0h] BYREF _BYTE v9[7]; // [rsp+31h] [rbp-2EFh] BYREF _BYTE v10[536]; // [rsp+50h] [rbp-2D0h] BYREF _BYTE v11[176]; // [rsp+268h] [rbp-B8h] BYREF unsigned long long v12; // [rsp+318h] [rbp-8h] v12 = __readfsqword(0x28u); internal_charset = 0LL; if ( a1 == *(_DWORD *)default_charset_info ) return default_charset_info; pthread_once(&charsets_initialized, init_available_charsets); if ( a1 < 0x800 ) { my_charset_loader_init_mysys((long long)v11); internal_charset = get_internal_charset(v11, a1, a2); } if ( !internal_charset && (a2 & 0x10) != 0 ) { charsets_dir = get_charsets_dir((long long)v10); stpcpy(charsets_dir, "Index.xml"); v8 = 35; int10_to_str(a1, v9, 10LL); my_error(22, 4, (unsigned int)&v8, (unsigned int)v10, v3, v4); } return (void *)internal_charset; }
get_charset: PUSH RBP MOV RBP,RSP SUB RSP,0x320 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x2fc],EDI MOV qword ptr [RBP + -0x308],RSI MOV qword ptr [RBP + -0x310],0x0 MOV EAX,dword ptr [RBP + -0x2fc] LEA RCX,[0x2da108] MOV RCX,qword ptr [RCX] CMP EAX,dword ptr [RCX] JNZ 0x0012f86a LEA RAX,[0x2da108] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x2f8],RAX JMP 0x0012f93c LAB_0012f86a: LEA RDI,[0x49a194] LEA RSI,[0x12f330] CALL 0x00125280 CMP dword ptr [RBP + -0x2fc],0x800 JNC 0x0012f8b5 LEA RDI,[RBP + -0xb8] CALL 0x0012e950 MOV ESI,dword ptr [RBP + -0x2fc] MOV RDX,qword ptr [RBP + -0x308] LEA RDI,[RBP + -0xb8] CALL 0x0012f980 MOV qword ptr [RBP + -0x310],RAX LAB_0012f8b5: CMP qword ptr [RBP + -0x310],0x0 JNZ 0x0012f92e MOV RAX,qword ptr [RBP + -0x308] AND RAX,0x10 CMP RAX,0x0 JZ 0x0012f92e LEA RDI,[RBP + -0x2d0] CALL 0x0012eff0 MOV RDI,RAX LEA RSI,[0x183267] CALL 0x001252d0 MOV byte ptr [RBP + -0x2f0],0x23 MOV EAX,dword ptr [RBP + -0x2fc] MOV EDI,EAX LEA RSI,[RBP + -0x2f0] ADD RSI,0x1 MOV EDX,0xa CALL 0x0017c3d0 LEA RDX,[RBP + -0x2f0] LEA RCX,[RBP + -0x2d0] MOV EDI,0x16 MOV ESI,0x4 MOV AL,0x0 CALL 0x00137670 LAB_0012f92e: MOV RAX,qword ptr [RBP + -0x310] MOV qword ptr [RBP + -0x2f8],RAX LAB_0012f93c: MOV RAX,qword ptr [RBP + -0x2f8] MOV qword ptr [RBP + -0x318],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0012f96c MOV RAX,qword ptr [RBP + -0x318] ADD RSP,0x320 POP RBP RET LAB_0012f96c: CALL 0x00125330
int * get_charset(uint param_1,ulong param_2) { char *__dest; long in_FS_OFFSET; int *local_318; int *local_300; int1 local_2f8; int1 auStack_2f7 [31]; int1 local_2d8 [536]; int1 local_c0 [176]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_318 = (int *)0x0; if (param_1 == *(uint *)default_charset_info) { local_300 = default_charset_info; } else { pthread_once(&charsets_initialized,init_available_charsets); if (param_1 < 0x800) { my_charset_loader_init_mysys(local_c0); local_318 = (int *)get_internal_charset(local_c0,param_1,param_2); } if ((local_318 == (int *)0x0) && ((param_2 & 0x10) != 0)) { __dest = (char *)get_charsets_dir(local_2d8); stpcpy(__dest,"Index.xml"); local_2f8 = 0x23; int10_to_str(param_1,auStack_2f7,10); my_error(0x16,4,&local_2f8,local_2d8); } local_300 = local_318; } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_300; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
5,520
get_charset
eloqsql/mysys/charset.c
CHARSET_INFO *get_charset(uint cs_number, myf flags) { CHARSET_INFO *cs= NULL; if (cs_number == default_charset_info->number) return default_charset_info; my_pthread_once(&charsets_initialized, init_available_charsets); if (cs_number < array_elements(all_charsets)) { MY_CHARSET_LOADER loader; my_charset_loader_init_mysys(&loader); cs= get_internal_charset(&loader, cs_number, flags); } if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)], cs_string[23]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); cs_string[0]='#'; int10_to_str(cs_number, cs_string+1, 10); my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_string, index_file); } return cs; }
O3
c
get_charset: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x238, %rsp # imm = 0x238 movq %fs:0x28, %rax movq %rax, -0x20(%rbp) leaq 0x2cb04a(%rip), %rax # 0x2f7008 movq (%rax), %r15 cmpl %edi, (%r15) je 0x2c0c5 movq %rsi, %r14 movl %edi, %ebx leaq 0x34a55a(%rip), %rdi # 0x376530 leaq -0x382(%rip), %rsi # 0x2bc5b callq 0x242b0 cmpl $0x7ff, %ebx # imm = 0x7FF ja 0x2c05a leaq -0x230(%rbp), %rdi movb $0x0, (%rdi) leaq -0xb6d(%rip), %rax # 0x2b48e movq %rax, 0x80(%rdi) leaq -0xb6c(%rip), %rax # 0x2b49d movq %rax, 0x88(%rdi) leaq -0xb5f(%rip), %rax # 0x2b4b8 movq %rax, 0x90(%rdi) leaq -0x2677(%rip), %rax # 0x299ae movq %rax, 0x98(%rdi) leaq 0x2cafcd(%rip), %rax # 0x2f7000 movq (%rax), %rax movq %rax, 0xa0(%rdi) leaq -0xb6e(%rip), %rax # 0x2b4d6 movq %rax, 0xa8(%rdi) movl %ebx, %esi movq %r14, %rdx callq 0x2c0ea movq %rax, %r15 jmp 0x2c05d xorl %r15d, %r15d testq %r15, %r15 setne %al testb $0x10, %r14b sete %cl orb %al, %cl jne 0x2c0c5 leaq -0x230(%rbp), %r14 movq %r14, %rdi callq 0x2ba1b movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49 movq %rcx, (%rax) movw $0x6c, 0x8(%rax) leaq -0x24f(%rbp), %rsi movb $0x23, -0x1(%rsi) movl %ebx, %edi movl $0xa, %edx callq 0x5da0e xorl %r15d, %r15d leaq -0x250(%rbp), %rdx movl $0x4, %esi movl $0x16, %edi movq %r14, %rcx xorl %eax, %eax callq 0x2fcb7 movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x2c0e5 movq %r15, %rax addq $0x238, %rsp # imm = 0x238 popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x24380
get_charset: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 238h mov rax, fs:28h mov [rbp+var_20], rax lea rax, default_charset_info mov r15, [rax] cmp [r15], edi jz loc_2C0C5 mov r14, rsi mov ebx, edi lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once cmp ebx, 7FFh ja short loc_2C05A lea rdi, [rbp+var_230] mov byte ptr [rdi], 0 lea rax, my_once_alloc_c mov [rdi+80h], rax lea rax, my_malloc_c mov [rdi+88h], rax lea rax, my_realloc_c mov [rdi+90h], rax lea rax, my_free mov [rdi+98h], rax lea rax, my_charset_error_reporter mov rax, [rax] mov [rdi+0A0h], rax lea rax, add_collation mov [rdi+0A8h], rax mov esi, ebx mov rdx, r14 call get_internal_charset mov r15, rax jmp short loc_2C05D loc_2C05A: xor r15d, r15d loc_2C05D: test r15, r15 setnz al test r14b, 10h setz cl or cl, al jnz short loc_2C0C5 lea r14, [rbp+var_230] mov rdi, r14 call get_charsets_dir mov rcx, 6D782E7865646E49h mov [rax], rcx mov word ptr [rax+8], 6Ch ; 'l' lea rsi, [rbp+var_24F] mov byte ptr [rsi-1], 23h ; '#' mov edi, ebx mov edx, 0Ah call int10_to_str xor r15d, r15d lea rdx, [rbp+var_250] mov esi, 4 mov edi, 16h mov rcx, r14 xor eax, eax call my_error loc_2C0C5: mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_2C0E5 mov rax, r15 add rsp, 238h pop rbx pop r14 pop r15 pop rbp retn loc_2C0E5: call ___stack_chk_fail
void * get_charset(unsigned int a1, long long a2) { void *internal_charset; // r15 int v3; // r8d int v4; // r9d char v6; // [rsp+0h] [rbp-250h] BYREF _BYTE v7[31]; // [rsp+1h] [rbp-24Fh] BYREF _BYTE v8[128]; // [rsp+20h] [rbp-230h] BYREF long long ( *v9)(long long); // [rsp+A0h] [rbp-1B0h] long long ( *v10)(unsigned long long); // [rsp+A8h] [rbp-1A8h] long long ( *v11)(long long, unsigned long long); // [rsp+B0h] [rbp-1A0h] long long ( *v12)(long long); // [rsp+B8h] [rbp-198h] long long ( *v13)(); // [rsp+C0h] [rbp-190h] long long ( *v14)(unsigned int *); // [rsp+C8h] [rbp-188h] unsigned long long v15; // [rsp+230h] [rbp-20h] v15 = __readfsqword(0x28u); internal_charset = default_charset_info; if ( *(_DWORD *)default_charset_info != a1 ) { pthread_once(&charsets_initialized, init_available_charsets); if ( a1 > 0x7FF ) { internal_charset = 0LL; } else { v8[0] = 0; v9 = my_once_alloc_c; v10 = my_malloc_c; v11 = my_realloc_c; v12 = my_free; v13 = my_charset_error_reporter; v14 = add_collation; internal_charset = (void *)get_internal_charset(v8, a1, a2); } if ( internal_charset == 0LL && (a2 & 0x10) != 0 ) { strcpy((char *)get_charsets_dir((long long)v8), "Index.xml"); v6 = 35; int10_to_str(a1, v7, 10LL); internal_charset = 0LL; my_error(22, 4, (unsigned int)&v6, (unsigned int)v8, v3, v4); } } return internal_charset; }
get_charset: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x238 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX LEA RAX,[0x3f7008] MOV R15,qword ptr [RAX] CMP dword ptr [R15],EDI JZ 0x0012c0c5 MOV R14,RSI MOV EBX,EDI LEA RDI,[0x476530] LEA RSI,[0x12bc5b] CALL 0x001242b0 CMP EBX,0x7ff JA 0x0012c05a LEA RDI,[RBP + -0x230] MOV byte ptr [RDI],0x0 LEA RAX,[0x12b48e] MOV qword ptr [RDI + 0x80],RAX LEA RAX,[0x12b49d] MOV qword ptr [RDI + 0x88],RAX LEA RAX,[0x12b4b8] MOV qword ptr [RDI + 0x90],RAX LEA RAX,[0x1299ae] MOV qword ptr [RDI + 0x98],RAX LEA RAX,[0x3f7000] MOV RAX,qword ptr [RAX] MOV qword ptr [RDI + 0xa0],RAX LEA RAX,[0x12b4d6] MOV qword ptr [RDI + 0xa8],RAX MOV ESI,EBX MOV RDX,R14 CALL 0x0012c0ea MOV R15,RAX JMP 0x0012c05d LAB_0012c05a: XOR R15D,R15D LAB_0012c05d: TEST R15,R15 SETNZ AL TEST R14B,0x10 SETZ CL OR CL,AL JNZ 0x0012c0c5 LEA R14,[RBP + -0x230] MOV RDI,R14 CALL 0x0012ba1b MOV RCX,0x6d782e7865646e49 MOV qword ptr [RAX],RCX MOV word ptr [RAX + 0x8],0x6c LEA RSI,[RBP + -0x24f] MOV byte ptr [RSI + -0x1],0x23 MOV EDI,EBX MOV EDX,0xa CALL 0x0015da0e XOR R15D,R15D LEA RDX,[RBP + -0x250] MOV ESI,0x4 MOV EDI,0x16 MOV RCX,R14 XOR EAX,EAX CALL 0x0012fcb7 LAB_0012c0c5: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x0012c0e5 MOV RAX,R15 ADD RSP,0x238 POP RBX POP R14 POP R15 POP RBP RET LAB_0012c0e5: CALL 0x00124380
int * get_charset(uint param_1,ulong param_2) { int *puVar1; int8 *puVar2; long in_FS_OFFSET; int1 local_258; int1 local_257 [31]; int1 local_238 [128]; code *local_1b8; code *local_1b0; code *local_1a8; code *local_1a0; int *local_198; code *local_190; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); puVar1 = default_charset_info; if (*(uint *)default_charset_info != param_1) { pthread_once(&charsets_initialized,init_available_charsets); if (param_1 < 0x800) { local_238[0] = 0; local_1b8 = my_once_alloc_c; local_1b0 = my_malloc_c; local_1a8 = my_realloc_c; local_1a0 = my_free; local_198 = my_charset_error_reporter; local_190 = add_collation; puVar1 = (int *)get_internal_charset(local_238,param_1,param_2); } else { puVar1 = (int *)0x0; } if ((param_2 & 0x10) != 0 && puVar1 == (int *)0x0) { puVar2 = (int8 *)get_charsets_dir(local_238); *puVar2 = 0x6d782e7865646e49; *(int2 *)(puVar2 + 1) = 0x6c; local_258 = 0x23; int10_to_str(param_1,local_257,10); puVar1 = (int *)0x0; my_error(0x16,4,&local_258,local_238); } } if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return puVar1; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
5,521
testing::internal::FilePath::CreateDirectoriesRecursively() const
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-filepath.cc
bool FilePath::CreateDirectoriesRecursively() const { if (!this->IsDirectory()) { return false; } if (pathname_.empty() || this->DirectoryExists()) { return true; } const FilePath parent(this->RemoveTrailingPathSeparator().RemoveFileName()); return parent.CreateDirectoriesRecursively() && this->CreateFolder(); }
O0
cpp
testing::internal::FilePath::CreateDirectoriesRecursively() const: subq $0x78, %rsp movq %rdi, 0x68(%rsp) movq 0x68(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0xb7460 testb $0x1, %al jne 0xb74f6 movb $0x0, 0x77(%rsp) jmp 0xb75d2 movq 0x10(%rsp), %rdi callq 0x39260 testb $0x1, %al jne 0xb7514 movq 0x10(%rsp), %rdi callq 0xb7230 testb $0x1, %al jne 0xb7514 jmp 0xb751e movb $0x1, 0x77(%rsp) jmp 0xb75d2 movq 0x10(%rsp), %rsi leaq 0x28(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0xb7100 movq 0x8(%rsp), %rsi leaq 0x48(%rsp), %rdi callq 0xb6a80 jmp 0xb7543 leaq 0x28(%rsp), %rdi callq 0xe3490 leaq 0x48(%rsp), %rdi callq 0xb74d0 movb %al, 0x7(%rsp) jmp 0xb755d movb 0x7(%rsp), %cl xorl %eax, %eax testb $0x1, %cl movb %al, 0x6(%rsp) jne 0xb756e jmp 0xb7588 movq 0x10(%rsp), %rdi callq 0xb75f0 movb %al, 0x5(%rsp) jmp 0xb757e movb 0x5(%rsp), %al movb %al, 0x6(%rsp) jmp 0xb7588 movb 0x6(%rsp), %al andb $0x1, %al movb %al, 0x77(%rsp) leaq 0x48(%rsp), %rdi callq 0xe3490 jmp 0xb75d2 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x20(%rsp) movl %eax, 0x1c(%rsp) leaq 0x28(%rsp), %rdi callq 0xe3490 jmp 0xb75dd movq %rax, %rcx movl %edx, %eax movq %rcx, 0x20(%rsp) movl %eax, 0x1c(%rsp) leaq 0x48(%rsp), %rdi callq 0xe3490 jmp 0xb75dd movb 0x77(%rsp), %al andb $0x1, %al addq $0x78, %rsp retq movq 0x20(%rsp), %rdi callq 0x14c80 nopw (%rax,%rax)
_ZNK7testing8internal8FilePath28CreateDirectoriesRecursivelyEv: sub rsp, 78h mov [rsp+78h+var_10], rdi mov rdi, [rsp+78h+var_10]; this mov [rsp+78h+var_68], rdi call _ZNK7testing8internal8FilePath11IsDirectoryEv; testing::internal::FilePath::IsDirectory(void) test al, 1 jnz short loc_B74F6 mov [rsp+78h+var_1], 0 jmp loc_B75D2 loc_B74F6: mov rdi, [rsp+78h+var_68] call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_B7514 mov rdi, [rsp+78h+var_68]; this call _ZNK7testing8internal8FilePath15DirectoryExistsEv; testing::internal::FilePath::DirectoryExists(void) test al, 1 jnz short loc_B7514 jmp short loc_B751E loc_B7514: mov [rsp+78h+var_1], 1 jmp loc_B75D2 loc_B751E: mov rsi, [rsp+78h+var_68] lea rdi, [rsp+78h+var_50]; this mov [rsp+78h+var_70], rdi call _ZNK7testing8internal8FilePath27RemoveTrailingPathSeparatorEv; testing::internal::FilePath::RemoveTrailingPathSeparator(void) mov rsi, [rsp+78h+var_70] lea rdi, [rsp+78h+var_30]; this call _ZNK7testing8internal8FilePath14RemoveFileNameEv; testing::internal::FilePath::RemoveFileName(void) jmp short $+2 loc_B7543: lea rdi, [rsp+78h+var_50]; this call _ZN7testing8internal8FilePathD2Ev; testing::internal::FilePath::~FilePath() lea rdi, [rsp+78h+var_30]; this call _ZNK7testing8internal8FilePath28CreateDirectoriesRecursivelyEv; testing::internal::FilePath::CreateDirectoriesRecursively(void) mov [rsp+78h+var_71], al jmp short $+2 loc_B755D: mov cl, [rsp+78h+var_71] xor eax, eax test cl, 1 mov [rsp+78h+var_72], al jnz short loc_B756E jmp short loc_B7588 loc_B756E: mov rdi, [rsp+78h+var_68]; this call _ZNK7testing8internal8FilePath12CreateFolderEv; testing::internal::FilePath::CreateFolder(void) mov [rsp+78h+var_73], al jmp short $+2 loc_B757E: mov al, [rsp+78h+var_73] mov [rsp+78h+var_72], al jmp short $+2 loc_B7588: mov al, [rsp+78h+var_72] and al, 1 mov [rsp+78h+var_1], al lea rdi, [rsp+78h+var_30]; this call _ZN7testing8internal8FilePathD2Ev; testing::internal::FilePath::~FilePath() jmp short loc_B75D2 mov rcx, rax mov eax, edx mov [rsp+arg_18], rcx mov [rsp+arg_14], eax lea rdi, [rsp+arg_20]; this call _ZN7testing8internal8FilePathD2Ev; testing::internal::FilePath::~FilePath() jmp short loc_B75DD mov rcx, rax mov eax, edx mov [rsp+arg_18], rcx mov [rsp+arg_14], eax lea rdi, [rsp+arg_40]; this call _ZN7testing8internal8FilePathD2Ev; testing::internal::FilePath::~FilePath() jmp short loc_B75DD loc_B75D2: mov al, [rsp+78h+var_1] and al, 1 add rsp, 78h retn loc_B75DD: mov rdi, [rsp+arg_18] call __Unwind_Resume
char testing::internal::FilePath::CreateDirectoriesRecursively(testing::internal::FilePath *this) { char Folder; // [rsp+6h] [rbp-72h] _BYTE v3[32]; // [rsp+28h] [rbp-50h] BYREF _BYTE v4[32]; // [rsp+48h] [rbp-30h] BYREF testing::internal::FilePath *v5; // [rsp+68h] [rbp-10h] char v6; // [rsp+77h] [rbp-1h] v5 = this; if ( testing::internal::FilePath::IsDirectory(this) ) { if ( std::string::empty((long long)this) || (testing::internal::FilePath::DirectoryExists(this) & 1) != 0 ) { v6 = 1; } else { testing::internal::FilePath::RemoveTrailingPathSeparator((testing::internal::FilePath *)v3, this); testing::internal::FilePath::RemoveFileName((testing::internal::FilePath *)v4, (testing::internal::FilePath *)v3); testing::internal::FilePath::~FilePath((testing::internal::FilePath *)v3); Folder = 0; if ( (testing::internal::FilePath::CreateDirectoriesRecursively((testing::internal::FilePath *)v4) & 1) != 0 ) Folder = testing::internal::FilePath::CreateFolder(this); v6 = Folder & 1; testing::internal::FilePath::~FilePath((testing::internal::FilePath *)v4); } } else { v6 = 0; } return v6 & 1; }
CreateDirectoriesRecursively: SUB RSP,0x78 MOV qword ptr [RSP + 0x68],RDI MOV RDI,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x10],RDI CALL 0x001b7460 TEST AL,0x1 JNZ 0x001b74f6 MOV byte ptr [RSP + 0x77],0x0 JMP 0x001b75d2 LAB_001b74f6: MOV RDI,qword ptr [RSP + 0x10] CALL 0x00139260 TEST AL,0x1 JNZ 0x001b7514 MOV RDI,qword ptr [RSP + 0x10] CALL 0x001b7230 TEST AL,0x1 JNZ 0x001b7514 JMP 0x001b751e LAB_001b7514: MOV byte ptr [RSP + 0x77],0x1 JMP 0x001b75d2 LAB_001b751e: MOV RSI,qword ptr [RSP + 0x10] LEA RDI,[RSP + 0x28] MOV qword ptr [RSP + 0x8],RDI CALL 0x001b7100 MOV RSI,qword ptr [RSP + 0x8] LAB_001b7537: LEA RDI,[RSP + 0x48] CALL 0x001b6a80 JMP 0x001b7543 LAB_001b7543: LEA RDI,[RSP + 0x28] CALL 0x001e3490 LAB_001b754d: LEA RDI,[RSP + 0x48] CALL 0x001b74d0 MOV byte ptr [RSP + 0x7],AL JMP 0x001b755d LAB_001b755d: MOV CL,byte ptr [RSP + 0x7] XOR EAX,EAX TEST CL,0x1 MOV byte ptr [RSP + 0x6],AL JNZ 0x001b756e JMP 0x001b7588 LAB_001b756e: MOV RDI,qword ptr [RSP + 0x10] CALL 0x001b75f0 LAB_001b7578: MOV byte ptr [RSP + 0x5],AL JMP 0x001b757e LAB_001b757e: MOV AL,byte ptr [RSP + 0x5] MOV byte ptr [RSP + 0x6],AL JMP 0x001b7588 LAB_001b7588: MOV AL,byte ptr [RSP + 0x6] AND AL,0x1 MOV byte ptr [RSP + 0x77],AL LEA RDI,[RSP + 0x48] CALL 0x001e3490 JMP 0x001b75d2 LAB_001b75d2: MOV AL,byte ptr [RSP + 0x77] AND AL,0x1 ADD RSP,0x78 RET
/* testing::internal::FilePath::CreateDirectoriesRecursively() const */ ulong __thiscall testing::internal::FilePath::CreateDirectoriesRecursively(FilePath *this) { byte bVar1; ulong uVar2; byte local_72; FilePath local_50 [32]; FilePath local_30 [32]; FilePath *local_10; byte local_1; local_10 = this; uVar2 = IsDirectory(this); if ((uVar2 & 1) == 0) { local_1 = 0; } else { uVar2 = std::__cxx11::string::empty((string *)this); if (((uVar2 & 1) == 0) && (uVar2 = DirectoryExists(this), (uVar2 & 1) == 0)) { RemoveTrailingPathSeparator(); /* try { // try from 001b7537 to 001b7540 has its CatchHandler @ 001b759e */ RemoveFileName(); ~FilePath(local_50); /* try { // try from 001b754d to 001b7577 has its CatchHandler @ 001b75b8 */ bVar1 = CreateDirectoriesRecursively(local_30); local_72 = 0; if ((bVar1 & 1) != 0) { local_72 = CreateFolder(this); } local_1 = local_72 & 1; uVar2 = ~FilePath(local_30); } else { local_1 = 1; } } return CONCAT71((int7)(uVar2 >> 8),local_1) & 0xffffffffffffff01; }
5,522
mariadb_reconnect
eloqsql/libmariadb/libmariadb/mariadb_lib.c
my_bool STDCALL mariadb_reconnect(MYSQL *mysql) { MYSQL tmp_mysql; struct my_hook_data hook_data; struct mysql_async_context *ctxt= NULL; LIST *li_stmt= mysql->stmts; /* check if connection handler is active */ if (IS_CONNHDLR_ACTIVE(mysql)) { if (mysql->extension->conn_hdlr->plugin && mysql->extension->conn_hdlr->plugin->reconnect) return(mysql->extension->conn_hdlr->plugin->reconnect(mysql)); } if (!mysql->options.reconnect || (mysql->server_status & SERVER_STATUS_IN_TRANS) || !mysql->host_info) { /* Allow reconnect next time */ mysql->server_status&= ~SERVER_STATUS_IN_TRANS; my_set_error(mysql, CR_SERVER_GONE_ERROR, SQLSTATE_UNKNOWN, 0); return(1); } mysql_init(&tmp_mysql); tmp_mysql.free_me= 0; tmp_mysql.options=mysql->options; if (mysql->extension->conn_hdlr) { tmp_mysql.extension->conn_hdlr= mysql->extension->conn_hdlr; mysql->extension->conn_hdlr= 0; } /* don't reread options from configuration files */ tmp_mysql.options.my_cnf_group= tmp_mysql.options.my_cnf_file= NULL; if (IS_MYSQL_ASYNC_ACTIVE(mysql)) { ctxt= mysql->options.extension->async_context; hook_data.orig_mysql= mysql; hook_data.new_mysql= &tmp_mysql; hook_data.orig_pvio= mysql->net.pvio; my_context_install_suspend_resume_hook(ctxt, my_suspend_hook, &hook_data); } if (!mysql_real_connect(&tmp_mysql,mysql->host,mysql->user,mysql->passwd, mysql->db, mysql->port, mysql->unix_socket, mysql->client_flag | CLIENT_REMEMBER_OPTIONS) || mysql_set_character_set(&tmp_mysql, mysql->charset->csname)) { if (ctxt) my_context_install_suspend_resume_hook(ctxt, NULL, NULL); /* don't free options (CONC-118) */ memset(&tmp_mysql.options, 0, sizeof(struct st_mysql_options)); my_set_error(mysql, tmp_mysql.net.last_errno, tmp_mysql.net.sqlstate, tmp_mysql.net.last_error); mysql_close(&tmp_mysql); return(1); } for (;li_stmt;li_stmt= li_stmt->next) { MYSQL_STMT *stmt= (MYSQL_STMT *)li_stmt->data; if (stmt->state != MYSQL_STMT_INITTED) { stmt->state= MYSQL_STMT_INITTED; SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); } } tmp_mysql.free_me= mysql->free_me; tmp_mysql.stmts= mysql->stmts; mysql->stmts= NULL; if (ctxt) my_context_install_suspend_resume_hook(ctxt, NULL, NULL); /* Don't free options, we moved them to tmp_mysql */ memset(&mysql->options, 0, sizeof(mysql->options)); mysql->free_me=0; mysql_close(mysql); *mysql=tmp_mysql; mysql->net.pvio->mysql= mysql; #ifdef HAVE_TLS /* CONC-604: Set new connection handle */ if (mysql_get_ssl_cipher(mysql)) ma_pvio_tls_set_connection(mysql); #endif ma_net_clear(&mysql->net); mysql->affected_rows= ~(unsigned long long) 0; mysql->info= 0; return(0); }
O3
c
mariadb_reconnect: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x528, %rsp # imm = 0x528 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq 0x4c8(%rdi), %r14 movq 0x4f0(%rdi), %rax testq %rax, %rax je 0x1d149 movq (%rax), %rax testq %rax, %rax je 0x1d149 movq (%rax), %rax testq %rax, %rax je 0x1d149 movq 0x78(%rax), %rax testq %rax, %rax je 0x1d149 movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x1d462 movq %rbx, %rdi addq $0x528, %rsp # imm = 0x528 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmpq *%rax cmpb $0x0, 0x43b(%rbx) setne %cl movl 0x380(%rbx), %eax testb $0x1, %al sete %dl andb %cl, %dl cmpb $0x1, %dl jne 0x1d21a cmpq $0x0, 0x2d8(%rbx) je 0x1d21a leaq 0x390(%rbx), %r15 leaq -0x528(%rbp), %r12 movq %r12, %rdi callq 0x17920 movb $0x0, 0x48c(%r12) leaq -0x198(%rbp), %rdi movl $0xf8, %edx movq %r15, %rsi callq 0x174a0 movq 0x4f0(%rbx), %rax movq (%rax), %rax testq %rax, %rax je 0x1d1ce movq -0x38(%rbp), %rcx movq %rax, (%rcx) movq 0x4f0(%rbx), %rax movq $0x0, (%rax) xorps %xmm0, %xmm0 movups %xmm0, -0x148(%rbp) movq 0x480(%rbx), %rax testq %rax, %rax je 0x1d243 movq 0x28(%rax), %r13 testq %r13, %r13 je 0x1d243 cmpb $0x0, 0x14(%r13) je 0x1d243 leaq -0x550(%rbp), %rdx movq %rbx, (%rdx) movq %r12, 0x8(%rdx) movq (%rbx), %rax movq %rax, 0x10(%rdx) leaq 0x408f(%rip), %rsi # 0x2129f movq %r13, %rdi callq 0x32720 jmp 0x1d246 andl $-0x2, %eax movl %eax, 0x380(%rbx) leaq 0x2eb26(%rip), %rax # 0x4bd50 movq (%rax), %rdx movq %rbx, %rdi movl $0x7d6, %esi # imm = 0x7D6 xorl %ecx, %ecx xorl %eax, %eax callq 0x1cbd5 jmp 0x1d2fa xorl %r13d, %r13d movq 0x2b0(%rbx), %rsi movq 0x2b8(%rbx), %rdx movq 0x2c0(%rbx), %rcx movq 0x2e8(%rbx), %r8 movl 0x360(%rbx), %r9d movl $0x80000000, %eax # imm = 0x80000000 orq 0x368(%rbx), %rax leaq -0x528(%rbp), %rdi pushq %rax pushq 0x2c8(%rbx) callq 0x17480 addq $0x10, %rsp testq %rax, %rax je 0x1d2ac movq 0x2f0(%rbx), %rax movq 0x8(%rax), %rsi leaq -0x528(%rbp), %rdi callq 0x171a0 testl %eax, %eax je 0x1d321 testq %r13, %r13 je 0x1d2bd movq %r13, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x32720 movl $0xf8, %edx leaq -0x198(%rbp), %rdi xorl %esi, %esi callq 0x17320 leaq -0x291(%rbp), %rdx movl -0x207(%rdx), %esi leaq -0x491(%rbp), %rcx movq %rbx, %rdi xorl %eax, %eax callq 0x1cbd5 leaq -0x528(%rbp), %rdi callq 0x17100 movb $0x1, %al movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x1d462 addq $0x528, %rsp # imm = 0x528 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r13, -0x530(%rbp) movq %r15, -0x538(%rbp) testq %r14, %r14 je 0x1d3a6 leaq 0x2ea15(%rip), %rax # 0x4bd50 movq (%rax), %r12 xorl %r13d, %r13d movq 0x10(%r14), %r15 cmpl $0x0, 0x50(%r15) je 0x1d39d movl $0x0, 0x50(%r15) movl $0x7dd, 0x108(%r15) # imm = 0x7DD leaq 0x30d(%r15), %rdi movl $0x5, %edx movq %r12, %rsi callq 0x172d0 movb %r13b, 0x312(%r15) leaq 0x10c(%r15), %rdi leaq 0x2e9d8(%rip), %rax # 0x4bd60 movq 0x68(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x172d0 movb %r13b, 0x30b(%r15) movq 0x8(%r14), %r14 testq %r14, %r14 jne 0x1d341 movb 0x48c(%rbx), %al movb %al, -0x9c(%rbp) movq 0x4c8(%rbx), %rax movq %rax, -0x60(%rbp) movq $0x0, 0x4c8(%rbx) movq -0x530(%rbp), %rdi testq %rdi, %rdi je 0x1d3dd xorl %esi, %esi xorl %edx, %edx callq 0x32720 movl $0xf8, %edx movq -0x538(%rbp), %rdi xorl %esi, %esi callq 0x17320 movb $0x0, 0x48c(%rbx) movq %rbx, %rdi callq 0x17100 leaq -0x528(%rbp), %rsi movl $0x4f8, %edx # imm = 0x4F8 movq %rbx, %rdi callq 0x174a0 movq (%rbx), %rax movq %rbx, 0x40(%rax) movq (%rbx), %rax testq %rax, %rax je 0x1d43d movq 0x38(%rax), %rdi testq %rdi, %rdi je 0x1d43d callq 0x24e3e testq %rax, %rax je 0x1d43d movq %rbx, %rdi callq 0x250fa movq %rbx, %rdi callq 0x1b398 movq $-0x1, 0x338(%rbx) movq $0x0, 0x2e0(%rbx) xorl %eax, %eax jmp 0x1d2fc callq 0x17690
mariadb_reconnect: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 528h mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax mov r14, [rdi+4C8h] mov rax, [rdi+4F0h] test rax, rax jz short loc_1D149 mov rax, [rax] test rax, rax jz short loc_1D149 mov rax, [rax] test rax, rax jz short loc_1D149 mov rax, [rax+78h] test rax, rax jz short loc_1D149 mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz loc_1D462 mov rdi, rbx add rsp, 528h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp rax loc_1D149: cmp byte ptr [rbx+43Bh], 0 setnz cl mov eax, [rbx+380h] test al, 1 setz dl and dl, cl cmp dl, 1 jnz loc_1D21A cmp qword ptr [rbx+2D8h], 0 jz loc_1D21A lea r15, [rbx+390h] lea r12, [rbp+var_528] mov rdi, r12 call _mysql_init@libmariadbclient_18 mov byte ptr [r12+48Ch], 0 lea rdi, [rbp+var_198] mov edx, 0F8h mov rsi, r15 call _memcpy mov rax, [rbx+4F0h] mov rax, [rax] test rax, rax jz short loc_1D1CE mov rcx, [rbp+var_38] mov [rcx], rax mov rax, [rbx+4F0h] mov qword ptr [rax], 0 loc_1D1CE: xorps xmm0, xmm0 movups [rbp+var_148], xmm0 mov rax, [rbx+480h] test rax, rax jz short loc_1D243 mov r13, [rax+28h] test r13, r13 jz short loc_1D243 cmp byte ptr [r13+14h], 0 jz short loc_1D243 lea rdx, [rbp+var_550] mov [rdx], rbx mov [rdx+8], r12 mov rax, [rbx] mov [rdx+10h], rax lea rsi, my_suspend_hook mov rdi, r13 call my_context_install_suspend_resume_hook jmp short loc_1D246 loc_1D21A: and eax, 0FFFFFFFEh mov [rbx+380h], eax lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov rdi, rbx mov esi, 7D6h xor ecx, ecx xor eax, eax call my_set_error jmp loc_1D2FA loc_1D243: xor r13d, r13d loc_1D246: mov rsi, [rbx+2B0h] mov rdx, [rbx+2B8h] mov rcx, [rbx+2C0h] mov r8, [rbx+2E8h] mov r9d, [rbx+360h] mov eax, 80000000h or rax, [rbx+368h] lea rdi, [rbp+var_528] push rax push qword ptr [rbx+2C8h] call _mysql_real_connect@libmariadbclient_18 add rsp, 10h test rax, rax jz short loc_1D2AC mov rax, [rbx+2F0h] mov rsi, [rax+8] lea rdi, [rbp+var_528] call _mysql_set_character_set@libmariadbclient_18 test eax, eax jz short loc_1D321 loc_1D2AC: test r13, r13 jz short loc_1D2BD mov rdi, r13 xor esi, esi xor edx, edx call my_context_install_suspend_resume_hook loc_1D2BD: mov edx, 0F8h lea rdi, [rbp+var_198] xor esi, esi call _memset lea rdx, [rbp+var_291] mov esi, [rdx-207h] lea rcx, [rbp+var_491] mov rdi, rbx xor eax, eax call my_set_error lea rdi, [rbp+var_528] call _mysql_close@libmariadbclient_18 loc_1D2FA: mov al, 1 loc_1D2FC: mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz loc_1D462 add rsp, 528h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1D321: mov [rbp+var_530], r13 mov [rbp+var_538], r15 test r14, r14 jz short loc_1D3A6 lea rax, SQLSTATE_UNKNOWN mov r12, [rax] xor r13d, r13d loc_1D341: mov r15, [r14+10h] cmp dword ptr [r15+50h], 0 jz short loc_1D39D mov dword ptr [r15+50h], 0 mov dword ptr [r15+108h], 7DDh lea rdi, [r15+30Dh] mov edx, 5 mov rsi, r12 call _strncpy mov [r15+312h], r13b lea rdi, [r15+10Ch] lea rax, client_errors mov rsi, [rax+68h] mov edx, 200h call _strncpy mov [r15+30Bh], r13b loc_1D39D: mov r14, [r14+8] test r14, r14 jnz short loc_1D341 loc_1D3A6: mov al, [rbx+48Ch] mov [rbp+var_9C], al mov rax, [rbx+4C8h] mov [rbp+var_60], rax mov qword ptr [rbx+4C8h], 0 mov rdi, [rbp+var_530] test rdi, rdi jz short loc_1D3DD xor esi, esi xor edx, edx call my_context_install_suspend_resume_hook loc_1D3DD: mov edx, 0F8h mov rdi, [rbp+var_538] xor esi, esi call _memset mov byte ptr [rbx+48Ch], 0 mov rdi, rbx call _mysql_close@libmariadbclient_18 lea rsi, [rbp+var_528] mov edx, 4F8h mov rdi, rbx call _memcpy mov rax, [rbx] mov [rax+40h], rbx mov rax, [rbx] test rax, rax jz short loc_1D43D mov rdi, [rax+38h] test rdi, rdi jz short loc_1D43D call ma_pvio_tls_cipher test rax, rax jz short loc_1D43D mov rdi, rbx call ma_pvio_tls_set_connection loc_1D43D: mov rdi, rbx call ma_net_clear mov qword ptr [rbx+338h], 0FFFFFFFFFFFFFFFFh mov qword ptr [rbx+2E0h], 0 xor eax, eax jmp loc_1D2FC loc_1D462: call ___stack_chk_fail
char mariadb_reconnect(_QWORD *a1, long long a2, long long a3) { long long v3; // r14 long long **v4; // rax long long *v5; // rax long long v6; // rax long long ( *v7)(_QWORD *, long long, long long, unsigned long long); // rax int v9; // eax long long v10; // rax long long v11; // rax long long v12; // r13 long long v13; // rcx long long v14; // r8 long long v15; // r9 char *v16; // r12 long long v17; // r15 _QWORD *v18; // [rsp+0h] [rbp-550h] _BYTE *v19; // [rsp+8h] [rbp-548h] long long v20; // [rsp+10h] [rbp-540h] _BYTE v21[144]; // [rsp+28h] [rbp-528h] BYREF int v22; // [rsp+B8h] [rbp-498h] char v23[512]; // [rsp+BFh] [rbp-491h] BYREF _BYTE v24[249]; // [rsp+2BFh] [rbp-291h] BYREF _BYTE v25[80]; // [rsp+3B8h] [rbp-198h] BYREF __int128 v26; // [rsp+408h] [rbp-148h] char v27; // [rsp+4B4h] [rbp-9Ch] long long v28; // [rsp+4F0h] [rbp-60h] _QWORD *v29; // [rsp+518h] [rbp-38h] unsigned long long v30; // [rsp+520h] [rbp-30h] v30 = __readfsqword(0x28u); v3 = a1[153]; v4 = (long long **)a1[158]; if ( v4 ) { v5 = *v4; if ( v5 ) { v6 = *v5; if ( v6 ) { v7 = *(long long ( **)(_QWORD *, long long, long long, unsigned long long))(v6 + 120); if ( v7 ) return v7(a1, a2, a3, __readfsqword(0x28u)); } } } v9 = *((_DWORD *)a1 + 224); if ( *((_BYTE *)a1 + 1083) == 0 || (v9 & 1) != 0 || !a1[91] ) { *((_DWORD *)a1 + 224) = v9 & 0xFFFFFFFE; my_set_error((long long)a1, 2006, (long long)SQLSTATE_UNKNOWN, 0LL); return 1; } mysql_init_libmariadbclient_18(v21); v27 = 0; memcpy(v25, a1 + 114, 248LL); v10 = *(_QWORD *)a1[158]; if ( v10 ) { *v29 = v10; *(_QWORD *)a1[158] = 0LL; } v26 = 0LL; v11 = a1[144]; if ( v11 && (v12 = *(_QWORD *)(v11 + 40)) != 0 && *(_BYTE *)(v12 + 20) ) { v18 = a1; v19 = v21; v20 = *a1; ((void ( *)(long long, long long ( *)()))my_context_install_suspend_resume_hook)( v12, my_suspend_hook); } else { v12 = 0LL; } if ( !mysql_real_connect_libmariadbclient_18( (unsigned int)v21, a1[86], a1[87], a1[88], a1[93], *((_DWORD *)a1 + 216), a1[89], a1[109] | 0x80000000LL) || (unsigned int)mysql_set_character_set_libmariadbclient_18(v21, *(_QWORD *)(a1[94] + 8LL)) ) { if ( v12 ) my_context_install_suspend_resume_hook(v12, 0LL, 0LL, v13, v14, v15, v18, v19, v20); memset(v25, 0LL, 248LL); my_set_error((long long)a1, v22, (long long)v24, v23); mysql_close_libmariadbclient_18(v21); return 1; } if ( v3 ) { v16 = SQLSTATE_UNKNOWN; do { v17 = *(_QWORD *)(v3 + 16); if ( *(_DWORD *)(v17 + 80) ) { *(_DWORD *)(v17 + 80) = 0; *(_DWORD *)(v17 + 264) = 2013; strncpy(v17 + 781, v16, 5LL); *(_BYTE *)(v17 + 786) = 0; strncpy(v17 + 268, client_errors[13], 512LL); *(_BYTE *)(v17 + 779) = 0; } v3 = *(_QWORD *)(v3 + 8); } while ( v3 ); } v27 = *((_BYTE *)a1 + 1164); v28 = a1[153]; a1[153] = 0LL; if ( v12 ) my_context_install_suspend_resume_hook(v12, 0LL, 0LL, v13, v14, v15, v18, v19, v20); memset(a1 + 114, 0LL, 248LL); *((_BYTE *)a1 + 1164) = 0; mysql_close_libmariadbclient_18(a1); memcpy(a1, v21, 1272LL); *(_QWORD *)(*a1 + 64LL) = a1; if ( *a1 && *(_QWORD *)(*a1 + 56LL) && ma_pvio_tls_cipher() ) ma_pvio_tls_set_connection(a1); ma_net_clear(a1); a1[103] = -1LL; a1[92] = 0LL; return 0; }
mariadb_reconnect: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x528 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R14,qword ptr [RDI + 0x4c8] MOV RAX,qword ptr [RDI + 0x4f0] TEST RAX,RAX JZ 0x0011d149 MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x0011d149 MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x0011d149 MOV RAX,qword ptr [RAX + 0x78] TEST RAX,RAX JZ 0x0011d149 MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x0011d462 MOV RDI,RBX ADD RSP,0x528 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP RAX LAB_0011d149: CMP byte ptr [RBX + 0x43b],0x0 SETNZ CL MOV EAX,dword ptr [RBX + 0x380] TEST AL,0x1 SETZ DL AND DL,CL CMP DL,0x1 JNZ 0x0011d21a CMP qword ptr [RBX + 0x2d8],0x0 JZ 0x0011d21a LEA R15,[RBX + 0x390] LEA R12,[RBP + -0x528] MOV RDI,R12 CALL 0x00117920 MOV byte ptr [R12 + 0x48c],0x0 LEA RDI,[RBP + -0x198] MOV EDX,0xf8 MOV RSI,R15 CALL 0x001174a0 MOV RAX,qword ptr [RBX + 0x4f0] MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x0011d1ce MOV RCX,qword ptr [RBP + -0x38] MOV qword ptr [RCX],RAX MOV RAX,qword ptr [RBX + 0x4f0] MOV qword ptr [RAX],0x0 LAB_0011d1ce: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBP + -0x148],XMM0 MOV RAX,qword ptr [RBX + 0x480] TEST RAX,RAX JZ 0x0011d243 MOV R13,qword ptr [RAX + 0x28] TEST R13,R13 JZ 0x0011d243 CMP byte ptr [R13 + 0x14],0x0 JZ 0x0011d243 LEA RDX,[RBP + -0x550] MOV qword ptr [RDX],RBX MOV qword ptr [RDX + 0x8],R12 MOV RAX,qword ptr [RBX] MOV qword ptr [RDX + 0x10],RAX LEA RSI,[0x12129f] MOV RDI,R13 CALL 0x00132720 JMP 0x0011d246 LAB_0011d21a: AND EAX,0xfffffffe MOV dword ptr [RBX + 0x380],EAX LEA RAX,[0x14bd50] MOV RDX,qword ptr [RAX] MOV RDI,RBX MOV ESI,0x7d6 XOR ECX,ECX XOR EAX,EAX CALL 0x0011cbd5 JMP 0x0011d2fa LAB_0011d243: XOR R13D,R13D LAB_0011d246: MOV RSI,qword ptr [RBX + 0x2b0] MOV RDX,qword ptr [RBX + 0x2b8] MOV RCX,qword ptr [RBX + 0x2c0] MOV R8,qword ptr [RBX + 0x2e8] MOV R9D,dword ptr [RBX + 0x360] MOV EAX,0x80000000 OR RAX,qword ptr [RBX + 0x368] LEA RDI,[RBP + -0x528] PUSH RAX PUSH qword ptr [RBX + 0x2c8] CALL 0x00117480 ADD RSP,0x10 TEST RAX,RAX JZ 0x0011d2ac MOV RAX,qword ptr [RBX + 0x2f0] MOV RSI,qword ptr [RAX + 0x8] LEA RDI,[RBP + -0x528] CALL 0x001171a0 TEST EAX,EAX JZ 0x0011d321 LAB_0011d2ac: TEST R13,R13 JZ 0x0011d2bd MOV RDI,R13 XOR ESI,ESI XOR EDX,EDX CALL 0x00132720 LAB_0011d2bd: MOV EDX,0xf8 LEA RDI,[RBP + -0x198] XOR ESI,ESI CALL 0x00117320 LEA RDX,[RBP + -0x291] MOV ESI,dword ptr [RDX + -0x207] LEA RCX,[RBP + -0x491] MOV RDI,RBX XOR EAX,EAX CALL 0x0011cbd5 LEA RDI,[RBP + -0x528] CALL 0x00117100 LAB_0011d2fa: MOV AL,0x1 LAB_0011d2fc: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x0011d462 ADD RSP,0x528 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011d321: MOV qword ptr [RBP + -0x530],R13 MOV qword ptr [RBP + -0x538],R15 TEST R14,R14 JZ 0x0011d3a6 LEA RAX,[0x14bd50] MOV R12,qword ptr [RAX] XOR R13D,R13D LAB_0011d341: MOV R15,qword ptr [R14 + 0x10] CMP dword ptr [R15 + 0x50],0x0 JZ 0x0011d39d MOV dword ptr [R15 + 0x50],0x0 MOV dword ptr [R15 + 0x108],0x7dd LEA RDI,[R15 + 0x30d] MOV EDX,0x5 MOV RSI,R12 CALL 0x001172d0 MOV byte ptr [R15 + 0x312],R13B LEA RDI,[R15 + 0x10c] LEA RAX,[0x14bd60] MOV RSI,qword ptr [RAX + 0x68] MOV EDX,0x200 CALL 0x001172d0 MOV byte ptr [R15 + 0x30b],R13B LAB_0011d39d: MOV R14,qword ptr [R14 + 0x8] TEST R14,R14 JNZ 0x0011d341 LAB_0011d3a6: MOV AL,byte ptr [RBX + 0x48c] MOV byte ptr [RBP + -0x9c],AL MOV RAX,qword ptr [RBX + 0x4c8] MOV qword ptr [RBP + -0x60],RAX MOV qword ptr [RBX + 0x4c8],0x0 MOV RDI,qword ptr [RBP + -0x530] TEST RDI,RDI JZ 0x0011d3dd XOR ESI,ESI XOR EDX,EDX CALL 0x00132720 LAB_0011d3dd: MOV EDX,0xf8 MOV RDI,qword ptr [RBP + -0x538] XOR ESI,ESI CALL 0x00117320 MOV byte ptr [RBX + 0x48c],0x0 MOV RDI,RBX CALL 0x00117100 LEA RSI,[RBP + -0x528] MOV EDX,0x4f8 MOV RDI,RBX CALL 0x001174a0 MOV RAX,qword ptr [RBX] MOV qword ptr [RAX + 0x40],RBX MOV RAX,qword ptr [RBX] TEST RAX,RAX JZ 0x0011d43d MOV RDI,qword ptr [RAX + 0x38] TEST RDI,RDI JZ 0x0011d43d CALL 0x00124e3e TEST RAX,RAX JZ 0x0011d43d MOV RDI,RBX CALL 0x001250fa LAB_0011d43d: MOV RDI,RBX CALL 0x0011b398 MOV qword ptr [RBX + 0x338],-0x1 MOV qword ptr [RBX + 0x2e0],0x0 XOR EAX,EAX JMP 0x0011d2fc LAB_0011d462: CALL 0x00117690
int8 mariadb_reconnect(long *param_1) { long *plVar1; code *UNRECOVERED_JUMPTABLE; int *__src; int iVar2; int8 uVar3; long lVar4; long lVar5; long lVar6; long in_FS_OFFSET; int1 local_530 [144]; int4 local_4a0; int1 local_499 [512]; int1 local_299 [249]; int1 local_1a0 [80]; int8 local_150; int8 uStack_148; int1 local_a4; long local_68; long *local_40; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); lVar5 = param_1[0x99]; if (((((long *)param_1[0x9e] != (long *)0x0) && (plVar1 = *(long **)param_1[0x9e], plVar1 != (long *)0x0)) && (lVar6 = *plVar1, lVar6 != 0)) && (UNRECOVERED_JUMPTABLE = *(code **)(lVar6 + 0x78), UNRECOVERED_JUMPTABLE != (code *)0x0)) { if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { /* WARNING: Could not recover jumptable at 0x0011d147. Too many branches */ /* WARNING: Treating indirect jump as call */ uVar3 = (*UNRECOVERED_JUMPTABLE)(param_1); return uVar3; } goto LAB_0011d462; } if (((*(uint *)(param_1 + 0x70) & 1) == 0 && *(char *)((long)param_1 + 0x43b) != '\0') && (param_1[0x5b] != 0)) { mysql_init(local_530); local_a4 = 0; memcpy(local_1a0,param_1 + 0x72,0xf8); if (*(long *)param_1[0x9e] != 0) { *local_40 = *(long *)param_1[0x9e]; *(int8 *)param_1[0x9e] = 0; } local_150 = 0; uStack_148 = 0; if (((param_1[0x90] == 0) || (lVar6 = *(long *)(param_1[0x90] + 0x28), lVar6 == 0)) || (*(char *)(lVar6 + 0x14) == '\0')) { lVar6 = 0; } else { my_context_install_suspend_resume_hook(lVar6,my_suspend_hook); } lVar4 = mysql_real_connect(local_530,param_1[0x56],param_1[0x57],param_1[0x58],param_1[0x5d], (int)param_1[0x6c],param_1[0x59],param_1[0x6d] | 0x80000000); if ((lVar4 == 0) || (iVar2 = mysql_set_character_set(local_530), __src = SQLSTATE_UNKNOWN, iVar2 != 0)) { if (lVar6 != 0) { my_context_install_suspend_resume_hook(lVar6,0,0); } memset(local_1a0,0,0xf8); my_set_error(param_1,local_4a0,local_299,local_499); mysql_close(local_530); goto LAB_0011d2fa; } for (; lVar5 != 0; lVar5 = *(long *)(lVar5 + 8)) { lVar4 = *(long *)(lVar5 + 0x10); if (*(int *)(lVar4 + 0x50) != 0) { *(int4 *)(lVar4 + 0x50) = 0; *(int4 *)(lVar4 + 0x108) = 0x7dd; strncpy((char *)(lVar4 + 0x30d),__src,5); *(int1 *)(lVar4 + 0x312) = 0; strncpy((char *)(lVar4 + 0x10c),PTR_s_Lost_connection_to_server_during_0014bdc8,0x200); *(int1 *)(lVar4 + 0x30b) = 0; } } local_a4 = *(int1 *)((long)param_1 + 0x48c); local_68 = param_1[0x99]; param_1[0x99] = 0; if (lVar6 != 0) { my_context_install_suspend_resume_hook(lVar6,0,0); } memset(param_1 + 0x72,0,0xf8); *(int1 *)((long)param_1 + 0x48c) = 0; mysql_close(param_1); memcpy(param_1,local_530,0x4f8); *(long **)(*param_1 + 0x40) = param_1; if (((*param_1 != 0) && (*(long *)(*param_1 + 0x38) != 0)) && (lVar5 = ma_pvio_tls_cipher(), lVar5 != 0)) { ma_pvio_tls_set_connection(param_1); } ma_net_clear(param_1); param_1[0x67] = -1; param_1[0x5c] = 0; uVar3 = 0; } else { *(uint *)(param_1 + 0x70) = *(uint *)(param_1 + 0x70) & 0xfffffffe; my_set_error(param_1,0x7d6,SQLSTATE_UNKNOWN,0); LAB_0011d2fa: uVar3 = 1; } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar3; } LAB_0011d462: /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
5,523
string_format[abi:cxx11](char const*, ...)
monkey531[P]llama/common/common.cpp
std::string string_format(const char * fmt, ...) { va_list ap; va_list ap2; va_start(ap, fmt); va_copy(ap2, ap); int size = vsnprintf(NULL, 0, fmt, ap); GGML_ASSERT(size >= 0 && size < INT_MAX); // NOLINT std::vector<char> buf(size + 1); int size2 = vsnprintf(buf.data(), size + 1, fmt, ap2); GGML_ASSERT(size2 == size); va_end(ap2); va_end(ap); return std::string(buf.data(), size); }
O2
cpp
string_format[abi:cxx11](char const*, ...): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x110, %rsp # imm = 0x110 movq %rsi, %r14 movq %rdi, %rbx leaq 0x60(%rsp), %rsi movq %rdx, 0x10(%rsi) movq %rcx, 0x18(%rsi) movq %r8, 0x20(%rsi) movq %r9, 0x28(%rsi) testb %al, %al je 0x53a56 movaps %xmm0, 0x90(%rsp) movaps %xmm1, 0xa0(%rsp) movaps %xmm2, 0xb0(%rsp) movaps %xmm3, 0xc0(%rsp) movaps %xmm4, 0xd0(%rsp) movaps %xmm5, 0xe0(%rsp) movaps %xmm6, 0xf0(%rsp) movaps %xmm7, 0x100(%rsp) movabsq $0x3000000010, %rax # imm = 0x3000000010 leaq 0x40(%rsp), %rcx movq %rax, (%rcx) leaq 0x140(%rsp), %rax movq %rax, 0x8(%rcx) movq %rsi, 0x10(%rcx) movq %rsi, 0x20(%rsp) movq (%rcx), %rax movq %rax, 0x10(%rsp) movq 0x8(%rcx), %rax movq %rax, 0x18(%rsp) xorl %edi, %edi xorl %esi, %esi movq %r14, %rdx callq 0x24200 cmpl $0x7fffffff, %eax # imm = 0x7FFFFFFF jae 0x53b0e movl %eax, %r15d leal 0x1(%r15), %r12d leaq 0x28(%rsp), %r13 leaq 0xf(%rsp), %rdx movq %r13, %rdi movq %r12, %rsi callq 0x58906 movq (%r13), %rdi leaq 0x10(%rsp), %rcx movq %r12, %rsi movq %r14, %rdx callq 0x24200 cmpl %r15d, %eax jne 0x53b2f movq 0x28(%rsp), %rsi movl %r15d, %edx leaq 0x10(%rbx), %rax movq %rax, (%rbx) addq %rsi, %rdx movq %rbx, %rdi callq 0x27ac0 leaq 0x28(%rsp), %rdi callq 0x3efe0 movq %rbx, %rax addq $0x110, %rsp # imm = 0x110 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq leaq 0x5f10c(%rip), %rdi # 0xb2c21 leaq 0x5c2fe(%rip), %rdx # 0xafe1a leaq 0x5f14a(%rip), %rcx # 0xb2c6d movl $0x1b2, %esi # imm = 0x1B2 xorl %eax, %eax callq 0x23ef0 leaq 0x5f0eb(%rip), %rdi # 0xb2c21 leaq 0x5c2dd(%rip), %rdx # 0xafe1a leaq 0x5f145(%rip), %rcx # 0xb2c89 movl $0x1b5, %esi # imm = 0x1B5 xorl %eax, %eax callq 0x23ef0 jmp 0x53b52 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x3efe0 movq %rbx, %rdi callq 0x23fc0
_Z13string_formatB5cxx11PKcz: push r15 push r14 push r13 push r12 push rbx sub rsp, 110h mov r14, rsi mov rbx, rdi lea rsi, [rsp+138h+var_D8] mov [rsi+10h], rdx mov [rsi+18h], rcx mov [rsi+20h], r8 mov [rsi+28h], r9 test al, al jz short loc_53A56 movaps [rsp+138h+var_A8], xmm0 movaps [rsp+138h+var_98], xmm1 movaps [rsp+138h+var_88], xmm2 movaps [rsp+138h+var_78], xmm3 movaps [rsp+138h+var_68], xmm4 movaps [rsp+138h+var_58], xmm5 movaps [rsp+138h+var_48], xmm6 movaps [rsp+138h+var_38], xmm7 loc_53A56: mov rax, 3000000010h lea rcx, [rsp+138h+var_F8] mov [rcx], rax lea rax, [rsp+138h+arg_0] mov [rcx+8], rax mov [rcx+10h], rsi mov [rsp+138h+var_118], rsi mov rax, [rcx] mov [rsp+138h+var_128], rax mov rax, [rcx+8] mov [rsp+138h+var_120], rax xor edi, edi xor esi, esi mov rdx, r14 call vsnprintf cmp eax, 7FFFFFFFh jnb short loc_53B0E mov r15d, eax lea r12d, [r15+1] lea r13, [rsp+138h+var_110] lea rdx, [rsp+138h+var_129] mov rdi, r13 mov rsi, r12 call _ZNSt6vectorIcSaIcEEC2EmRKS0_; std::vector<char>::vector(ulong,std::allocator<char> const&) mov rdi, [r13+0] lea rcx, [rsp+138h+var_128] mov rsi, r12 mov rdx, r14 call vsnprintf cmp eax, r15d jnz short loc_53B2F mov rsi, [rsp+138h+var_110] mov edx, r15d lea rax, [rbx+10h] mov [rbx], rax add rdx, rsi mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+138h+var_110] call _ZNSt12_Vector_baseIcSaIcEED2Ev; std::_Vector_base<char>::~_Vector_base() mov rax, rbx add rsp, 110h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_53B0E: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSize0SizeIntMa; "size >= 0 && size < INT_MAX" mov esi, 1B2h xor eax, eax call _ggml_abort loc_53B2F: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSize2Size; "size2 == size" mov esi, 1B5h xor eax, eax call _ggml_abort jmp short $+2 loc_53B52: mov rbx, rax lea rdi, [rsp+138h+var_110] call _ZNSt12_Vector_baseIcSaIcEED2Ev; std::_Vector_base<char>::~_Vector_base() mov rdi, rbx call __Unwind_Resume
_QWORD * string_format[abi:cxx11]( _QWORD *a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { unsigned int v15; // eax unsigned int v16; // r15d long long v17; // r12 _BYTE *v18; // rsi long long v20; // rax char v21; // [rsp+Fh] [rbp-129h] BYREF _QWORD v22[3]; // [rsp+10h] [rbp-128h] BYREF _QWORD v23[3]; // [rsp+28h] [rbp-110h] BYREF _QWORD v24[4]; // [rsp+40h] [rbp-F8h] BYREF _BYTE v25[16]; // [rsp+60h] [rbp-D8h] BYREF long long v26; // [rsp+70h] [rbp-C8h] long long v27; // [rsp+78h] [rbp-C0h] long long v28; // [rsp+80h] [rbp-B8h] long long v29; // [rsp+88h] [rbp-B0h] __m128 v30; // [rsp+90h] [rbp-A8h] __m128 v31; // [rsp+A0h] [rbp-98h] __m128 v32; // [rsp+B0h] [rbp-88h] __m128 v33; // [rsp+C0h] [rbp-78h] __m128 v34; // [rsp+D0h] [rbp-68h] __m128 v35; // [rsp+E0h] [rbp-58h] __m128 v36; // [rsp+F0h] [rbp-48h] __m128 v37; // [rsp+100h] [rbp-38h] v30 = a7; v31 = a8; v32 = a9; v33 = a10; v34 = a11; v35 = a12; v36 = a13; v37 = a14; v26 = a3; v27 = a4; v28 = a5; v29 = a6; v24[0] = 0x3000000010LL; v24[1] = &a15; v24[2] = v25; v22[2] = v25; v22[0] = 0x3000000010LL; v22[1] = &a15; v15 = vsnprintf(0LL, 0LL, a2, v24); if ( v15 >= 0x7FFFFFFF ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp", 434LL, "GGML_ASSERT(%s) failed", "size >= 0 && size < INT_MAX"); LABEL_5: v20 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp", 437LL, "GGML_ASSERT(%s) failed", "size2 == size"); std::_Vector_base<char>::~_Vector_base((long long)v23); _Unwind_Resume(v20); } v16 = v15; v17 = v15 + 1; std::vector<char>::vector(v23, v17, &v21); if ( (unsigned int)vsnprintf(v23[0], v17, a2, v22) != v16 ) goto LABEL_5; v18 = (_BYTE *)v23[0]; *a1 = a1 + 2; std::string::_M_construct<char const*>((long long)a1, v18, (long long)&v18[v16]); std::_Vector_base<char>::~_Vector_base((long long)v23); return a1; }
string_format[abi:cxx11]: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x110 MOV R14,RSI MOV RBX,RDI LEA RSI,[RSP + 0x60] MOV qword ptr [RSI + 0x10],RDX MOV qword ptr [RSI + 0x18],RCX MOV qword ptr [RSI + 0x20],R8 MOV qword ptr [RSI + 0x28],R9 TEST AL,AL JZ 0x00153a56 MOVAPS xmmword ptr [RSP + 0x90],XMM0 MOVAPS xmmword ptr [RSP + 0xa0],XMM1 MOVAPS xmmword ptr [RSP + 0xb0],XMM2 MOVAPS xmmword ptr [RSP + 0xc0],XMM3 MOVAPS xmmword ptr [RSP + 0xd0],XMM4 MOVAPS xmmword ptr [RSP + 0xe0],XMM5 MOVAPS xmmword ptr [RSP + 0xf0],XMM6 MOVAPS xmmword ptr [RSP + 0x100],XMM7 LAB_00153a56: MOV RAX,0x3000000010 LEA RCX,[RSP + 0x40] MOV qword ptr [RCX],RAX LEA RAX,[RSP + 0x140] MOV qword ptr [RCX + 0x8],RAX MOV qword ptr [RCX + 0x10],RSI MOV qword ptr [RSP + 0x20],RSI MOV RAX,qword ptr [RCX] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RCX + 0x8] MOV qword ptr [RSP + 0x18],RAX XOR EDI,EDI XOR ESI,ESI MOV RDX,R14 CALL 0x00124200 CMP EAX,0x7fffffff JNC 0x00153b0e MOV R15D,EAX LEA R12D,[R15 + 0x1] LEA R13,[RSP + 0x28] LEA RDX,[RSP + 0xf] MOV RDI,R13 MOV RSI,R12 CALL 0x00158906 MOV RDI,qword ptr [R13] LEA RCX,[RSP + 0x10] MOV RSI,R12 MOV RDX,R14 CALL 0x00124200 CMP EAX,R15D JNZ 0x00153b2f MOV RSI,qword ptr [RSP + 0x28] MOV EDX,R15D LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX ADD RDX,RSI LAB_00153ae8: MOV RDI,RBX CALL 0x00127ac0 LAB_00153af0: LEA RDI,[RSP + 0x28] CALL 0x0013efe0 MOV RAX,RBX ADD RSP,0x110 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_00153b0e: LEA RDI,[0x1b2c21] LEA RDX,[0x1afe1a] LEA RCX,[0x1b2c6d] MOV ESI,0x1b2 XOR EAX,EAX CALL 0x00123ef0 LAB_00153b2f: LEA RDI,[0x1b2c21] LEA RDX,[0x1afe1a] LEA RCX,[0x1b2c89] MOV ESI,0x1b5 XOR EAX,EAX CALL 0x00123ef0
/* string_format[abi:cxx11](char const*, ...) */ char * string_format_abi_cxx11_(char *param_1,...) { char in_AL; uint uVar1; uint uVar2; int8 in_RCX; int8 in_RDX; char *in_RSI; int8 in_R8; int8 in_R9; int8 in_XMM0_Qa; int8 in_XMM1_Qa; int8 in_XMM2_Qa; int8 in_XMM3_Qa; int8 in_XMM4_Qa; int8 in_XMM5_Qa; int8 in_XMM6_Qa; int8 in_XMM7_Qa; allocator local_129; int8 local_128; int1 *local_120; int1 *local_118; char *local_110 [3]; int8 local_f8; int1 *local_f0; int1 *local_e8; int1 local_d8 [16]; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_b0; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; local_118 = local_d8; if (in_AL != '\0') { local_a8 = in_XMM0_Qa; local_98 = in_XMM1_Qa; local_88 = in_XMM2_Qa; local_78 = in_XMM3_Qa; local_68 = in_XMM4_Qa; local_58 = in_XMM5_Qa; local_48 = in_XMM6_Qa; local_38 = in_XMM7_Qa; } local_f8 = 0x3000000010; local_120 = &stack0x00000008; local_128 = 0x3000000010; local_f0 = local_120; local_e8 = local_118; local_c8 = in_RDX; local_c0 = in_RCX; local_b8 = in_R8; local_b0 = in_R9; uVar1 = vsnprintf((char *)0x0,0,in_RSI,&local_f8); if (uVar1 < 0x7fffffff) { std::vector<char,std::allocator<char>>::vector ((vector<char,std::allocator<char>> *)local_110,(ulong)(uVar1 + 1),&local_129); uVar2 = vsnprintf(local_110[0],(ulong)(uVar1 + 1),in_RSI,&local_128); if (uVar2 == uVar1) { *(char **)param_1 = param_1 + 0x10; /* try { // try from 00153ae8 to 00153aef has its CatchHandler @ 00153b50 */ std::__cxx11::string::_M_construct<char_const*>(param_1,local_110[0],local_110[0] + uVar1); std::_Vector_base<char,std::allocator<char>>::~_Vector_base ((_Vector_base<char,std::allocator<char>> *)local_110); return param_1; } /* try { // try from 00153b2f to 00153b4f has its CatchHandler @ 00153b52 */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x1b5, "GGML_ASSERT(%s) failed","size2 == size"); } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x1b2, "GGML_ASSERT(%s) failed","size >= 0 && size < INT_MAX"); }
5,524
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_comment()
llama.cpp/common/json.hpp
bool scan_comment() { switch (get()) { // single-line comments skip input until a newline or EOF is read case '/': { while (true) { switch (get()) { case '\n': case '\r': case char_traits<char_type>::eof(): case '\0': return true; default: break; } } } // multi-line comments skip input until */ is read case '*': { while (true) { switch (get()) { case char_traits<char_type>::eof(): case '\0': { error_message = "invalid comment; missing closing '*/'"; return false; } case '*': { switch (get()) { case '/': return true; default: { unget(); continue; } } } default: continue; } } } // unexpected character after reading '/' default: { error_message = "invalid comment; expecting '/' or '*' after '/'"; return false; } } }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_comment(): pushq %rbp pushq %rbx pushq %rax movq %rdi, %rbx callq 0x1e9d6 cmpl $0x2f, %eax je 0x655f1 cmpl $0x2a, %eax jne 0x6560e movq %rbx, %rdi callq 0x1e9d6 leal 0x1(%rax), %ecx cmpl $0x2, %ecx jb 0x65617 cmpl $0x2a, %eax jne 0x655c5 movq %rbx, %rdi callq 0x1e9d6 cmpl $0x2f, %eax je 0x6560a movq %rbx, %rdi callq 0x65e80 jmp 0x655c5 movl $0x4803, %ebp # imm = 0x4803 movq %rbx, %rdi callq 0x1e9d6 incl %eax cmpl $0xf, %eax jae 0x655f6 btl %eax, %ebp jae 0x655f6 movb $0x1, %al jmp 0x65624 leaq 0x649f9(%rip), %rax # 0xca00e jmp 0x6561e leaq 0x649ca(%rip), %rax # 0xc9fe8 movq %rax, 0x70(%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_commentEv: push rbp push rbx push rax mov rbx, rdi call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; 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(void) cmp eax, 2Fh ; '/' jz short loc_655F1 cmp eax, 2Ah ; '*' jnz short loc_6560E loc_655C5: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; 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(void) lea ecx, [rax+1] cmp ecx, 2 jb short loc_65617 cmp eax, 2Ah ; '*' jnz short loc_655C5 mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; 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(void) cmp eax, 2Fh ; '/' jz short loc_6560A mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; 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>>>::unget(void) jmp short loc_655C5 loc_655F1: mov ebp, 4803h loc_655F6: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; 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(void) inc eax cmp eax, 0Fh jnb short loc_655F6 bt ebp, eax jnb short loc_655F6 loc_6560A: mov al, 1 jmp short loc_65624 loc_6560E: lea rax, aInvalidComment; "invalid comment; expecting '/' or '*' a"... jmp short loc_6561E loc_65617: lea rax, aInvalidComment_0; "invalid comment; missing closing '*/'" loc_6561E: mov [rbx+70h], rax xor eax, eax loc_65624: add rsp, 8 pop rbx pop rbp retn
char nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_comment( __m128i *a1) { int v1; // eax int v2; // eax int v3; // ebp unsigned int v4; // eax const char *v6; // rax v1 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1); if ( v1 == 47 ) { v3 = 18435; do { do v4 = 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(a1) + 1; while ( v4 >= 0xF ); } while ( !_bittest(&v3, v4) ); return 1; } else { if ( v1 == 42 ) { while ( 1 ) { v2 = 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(a1); if ( (unsigned int)(v2 + 1) < 2 ) break; if ( v2 == 42 ) { if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 47 ) return 1; 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>>>::unget(a1); } } v6 = "invalid comment; missing closing '*/'"; } else { v6 = "invalid comment; expecting '/' or '*' after '/'"; } a1[7].m128i_i64[0] = (long long)v6; return 0; } }
scan_comment: PUSH RBP PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x0011e9d6 CMP EAX,0x2f JZ 0x001655f1 CMP EAX,0x2a JNZ 0x0016560e LAB_001655c5: MOV RDI,RBX CALL 0x0011e9d6 LEA ECX,[RAX + 0x1] CMP ECX,0x2 JC 0x00165617 CMP EAX,0x2a JNZ 0x001655c5 MOV RDI,RBX CALL 0x0011e9d6 CMP EAX,0x2f JZ 0x0016560a MOV RDI,RBX CALL 0x00165e80 JMP 0x001655c5 LAB_001655f1: MOV EBP,0x4803 LAB_001655f6: MOV RDI,RBX CALL 0x0011e9d6 INC EAX CMP EAX,0xf JNC 0x001655f6 BT EBP,EAX JNC 0x001655f6 LAB_0016560a: MOV AL,0x1 JMP 0x00165624 LAB_0016560e: LEA RAX,[0x1ca00e] JMP 0x0016561e LAB_00165617: LEA RAX,[0x1c9fe8] LAB_0016561e: MOV qword ptr [RBX + 0x70],RAX XOR EAX,EAX LAB_00165624: ADD RSP,0x8 POP RBX POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::scan_comment() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::scan_comment(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { int iVar1; int8 uVar2; char *pcVar3; iVar1 = get(this); if (iVar1 == 0x2f) { do { do { iVar1 = get(this); } while (0xe < iVar1 + 1U); } while ((0x4803U >> (iVar1 + 1U & 0x1f) & 1) == 0); LAB_0016560a: uVar2 = 1; } else { if (iVar1 == 0x2a) { while (iVar1 = get(this), 1 < iVar1 + 1U) { if (iVar1 == 0x2a) { iVar1 = get(this); if (iVar1 == 0x2f) goto LAB_0016560a; unget(this); } } pcVar3 = "invalid comment; missing closing \'*/\'"; } else { pcVar3 = "invalid comment; expecting \'/\' or \'*\' after \'/\'"; } *(char **)(this + 0x70) = pcVar3; uVar2 = 0; } return uVar2; }
5,525
nlohmann::json_abi_v3_11_3::detail::iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::end() const
monkey531[P]llama/common/./json.hpp
iteration_proxy_value<IteratorType> end() const noexcept { return iteration_proxy_value<IteratorType>(container->end()); }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::end() const: pushq %rbx subq $0x20, %rsp movq %rdi, %rbx movq (%rsi), %rax movq %rax, (%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rsp) movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 movq %rcx, 0x18(%rsp) movzbl (%rax), %ecx cmpl $0x2, %ecx je 0xe8498 cmpl $0x1, %ecx jne 0xe84a7 movq 0x8(%rax), %rax movq 0x8(%rax), %rax movq %rax, 0x8(%rsp) jmp 0xe84b0 movq 0x8(%rax), %rax movq 0x8(%rax), %rax movq %rax, 0x10(%rsp) jmp 0xe84b0 movq $0x1, 0x18(%rsp) movq %rsp, %rsi movq %rbx, %rdi xorl %edx, %edx callq 0xb2200 movq %rbx, %rax addq $0x20, %rsp popq %rbx retq
_ZNK8nlohmann16json_abi_v3_11_36detail15iteration_proxyINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3endEv: push rbx sub rsp, 20h mov rbx, rdi mov rax, [rsi] mov [rsp+28h+var_28], rax xorps xmm0, xmm0 movups [rsp+28h+var_20], xmm0 mov rcx, 8000000000000000h mov [rsp+28h+var_10], rcx movzx ecx, byte ptr [rax] cmp ecx, 2 jz short loc_E8498 cmp ecx, 1 jnz short loc_E84A7 mov rax, [rax+8] mov rax, [rax+8] mov qword ptr [rsp+28h+var_20], rax jmp short loc_E84B0 loc_E8498: mov rax, [rax+8] mov rax, [rax+8] mov qword ptr [rsp+28h+var_20+8], rax jmp short loc_E84B0 loc_E84A7: mov [rsp+28h+var_10], 1 loc_E84B0: mov rsi, rsp mov rdi, rbx xor edx, edx call _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESH_m; nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,ulong) mov rax, rbx add rsp, 20h pop rbx retn
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end( long long a1, unsigned __int8 **a2) { unsigned __int8 *v2; // rax int v3; // ecx unsigned __int8 *v5; // [rsp+0h] [rbp-28h] BYREF __int128 v6; // [rsp+8h] [rbp-20h] long long v7; // [rsp+18h] [rbp-10h] v2 = *a2; v5 = v2; v6 = 0LL; v7 = 0x8000000000000000LL; v3 = *v2; if ( v3 == 2 ) { *((_QWORD *)&v6 + 1) = *(_QWORD *)(*((_QWORD *)v2 + 1) + 8LL); } else if ( v3 == 1 ) { *(_QWORD *)&v6 = *(_QWORD *)(*((_QWORD *)v2 + 1) + 8LL); } else { v7 = 1LL; } nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::iteration_proxy_value( a1, (__int128 *)&v5, 0LL); return a1; }
end: PUSH RBX SUB RSP,0x20 MOV RBX,RDI MOV RAX,qword ptr [RSI] MOV qword ptr [RSP],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x8],XMM0 MOV RCX,-0x8000000000000000 MOV qword ptr [RSP + 0x18],RCX MOVZX ECX,byte ptr [RAX] CMP ECX,0x2 JZ 0x001e8498 CMP ECX,0x1 JNZ 0x001e84a7 MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RAX JMP 0x001e84b0 LAB_001e8498: MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RAX JMP 0x001e84b0 LAB_001e84a7: MOV qword ptr [RSP + 0x18],0x1 LAB_001e84b0: MOV RSI,RSP MOV RDI,RBX XOR EDX,EDX CALL 0x001b2200 MOV RAX,RBX ADD RSP,0x20 POP RBX RET
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > >::end() const */ void nlohmann::json_abi_v3_11_3::detail:: iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::end(void) { iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::iteration_proxy_value(); return; }
5,526
mi_base_info_write
eloqsql/storage/myisam/mi_open.c
uint mi_base_info_write(File file, MI_BASE_INFO *base) { uchar buff[MI_BASE_INFO_SIZE], *ptr=buff; mi_sizestore(ptr,base->keystart); ptr +=8; mi_sizestore(ptr,base->max_data_file_length); ptr +=8; mi_sizestore(ptr,base->max_key_file_length); ptr +=8; mi_rowstore(ptr,base->records); ptr +=8; mi_rowstore(ptr,base->reloc); ptr +=8; mi_int4store(ptr,base->mean_row_length); ptr +=4; mi_int4store(ptr,base->reclength); ptr +=4; mi_int4store(ptr,base->pack_reclength); ptr +=4; mi_int4store(ptr,base->min_pack_length); ptr +=4; mi_int4store(ptr,base->max_pack_length); ptr +=4; mi_int4store(ptr,base->min_block_length); ptr +=4; mi_int4store(ptr,base->fields); ptr +=4; mi_int4store(ptr,base->pack_fields); ptr +=4; *ptr++=base->rec_reflength; *ptr++=base->key_reflength; *ptr++=base->keys; *ptr++=base->auto_key; mi_int2store(ptr,base->pack_bits); ptr +=2; mi_int2store(ptr,base->blobs); ptr +=2; mi_int2store(ptr,base->max_key_block_length); ptr +=2; mi_int2store(ptr,base->max_key_length); ptr +=2; mi_int2store(ptr,base->extra_alloc_bytes); ptr +=2; *ptr++= base->extra_alloc_procent; bzero(ptr,13); ptr +=13; /* extra */ return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0; }
O3
c
mi_base_info_write: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0xc0, %rsp movl %edi, %ebx movq %fs:0x28, %rax movq %rax, -0x18(%rbp) movq (%rsi), %rax bswapq %rax movq %rax, -0x80(%rbp) movq 0x8(%rsi), %rax bswapq %rax movq %rax, -0x78(%rbp) movq 0x10(%rsi), %rax bswapq %rax movq %rax, -0x70(%rbp) movq 0x20(%rsi), %rax bswapq %rax movq %rax, -0x68(%rbp) movq 0x28(%rsi), %rax bswapq %rax movq %rax, -0x60(%rbp) movl 0x30(%rsi), %eax bswapl %eax movl %eax, -0x58(%rbp) movl 0x38(%rsi), %eax bswapl %eax movl %eax, -0x54(%rbp) movl 0x40(%rsi), %eax bswapl %eax movl %eax, -0x50(%rbp) movl 0x48(%rsi), %eax bswapl %eax movl %eax, -0x4c(%rbp) movl 0x50(%rsi), %eax bswapl %eax movl %eax, -0x48(%rbp) movl 0x58(%rsi), %eax bswapl %eax movl %eax, -0x44(%rbp) movl 0x60(%rsi), %eax bswapl %eax movl %eax, -0x40(%rbp) movl 0x68(%rsi), %eax bswapl %eax movl %eax, -0x3c(%rbp) movdqu 0x70(%rsi), %xmm0 pand 0x6dd78(%rip), %xmm0 # 0x10d670 packuswb %xmm0, %xmm0 packuswb %xmm0, %xmm0 movd %xmm0, -0x38(%rbp) movzwl 0x84(%rsi), %eax rolw $0x8, %ax movw %ax, -0x34(%rbp) movzwl 0x80(%rsi), %eax rolw $0x8, %ax movw %ax, -0x32(%rbp) movzwl 0x88(%rsi), %eax rolw $0x8, %ax movw %ax, -0x30(%rbp) movzwl 0x8c(%rsi), %eax rolw $0x8, %ax movw %ax, -0x2e(%rbp) movzwl 0x90(%rsi), %eax rolw $0x8, %ax movw %ax, -0x2c(%rbp) movb 0x94(%rsi), %al movb %al, -0x2a(%rbp) xorl %eax, %eax movq %rax, -0x29(%rbp) movq %rax, -0x24(%rbp) leaq 0x31929e(%rip), %rax # 0x3b8c08 movq (%rax), %rax leaq -0xd0(%rbp), %rdi movl %ebx, %esi movl $0x7, %edx callq *0x158(%rax) testq %rax, %rax jne 0x9f9c3 leaq -0x80(%rbp), %rsi movl $0x64, %edx movl $0x4, %ecx movl %ebx, %edi callq 0x32935 movq %rax, %rcx xorl %eax, %eax testq %rcx, %rcx setne %cl movq %fs:0x28, %rdx cmpq -0x18(%rbp), %rdx jne 0x9f9e0 movb %cl, %al addq $0xc0, %rsp popq %rbx popq %r14 popq %rbp retq leaq -0x80(%rbp), %rdx leaq -0x88(%rbp), %r14 movq %rax, %rdi movl %ebx, %esi movq %r14, %rcx callq 0x30f59 movq (%r14), %rcx jmp 0x9f99e callq 0x2b280
mi_base_info_write: push rbp mov rbp, rsp push r14 push rbx sub rsp, 0C0h mov ebx, edi mov rax, fs:28h mov [rbp+var_18], rax mov rax, [rsi] bswap rax mov [rbp+var_80], rax mov rax, [rsi+8] bswap rax mov [rbp+var_78], rax mov rax, [rsi+10h] bswap rax mov [rbp+var_70], rax mov rax, [rsi+20h] bswap rax mov [rbp+var_68], rax mov rax, [rsi+28h] bswap rax mov [rbp+var_60], rax mov eax, [rsi+30h] bswap eax mov [rbp+var_58], eax mov eax, [rsi+38h] bswap eax mov [rbp+var_54], eax mov eax, [rsi+40h] bswap eax mov [rbp+var_50], eax mov eax, [rsi+48h] bswap eax mov [rbp+var_4C], eax mov eax, [rsi+50h] bswap eax mov [rbp+var_48], eax mov eax, [rsi+58h] bswap eax mov [rbp+var_44], eax mov eax, [rsi+60h] bswap eax mov [rbp+var_40], eax mov eax, [rsi+68h] bswap eax mov [rbp+var_3C], eax movdqu xmm0, xmmword ptr [rsi+70h] pand xmm0, cs:xmmword_10D670 packuswb xmm0, xmm0 packuswb xmm0, xmm0 movd [rbp+var_38], xmm0 movzx eax, word ptr [rsi+84h] rol ax, 8 mov [rbp+var_34], ax movzx eax, word ptr [rsi+80h] rol ax, 8 mov [rbp+var_32], ax movzx eax, word ptr [rsi+88h] rol ax, 8 mov [rbp+var_30], ax movzx eax, word ptr [rsi+8Ch] rol ax, 8 mov [rbp+var_2E], ax movzx eax, word ptr [rsi+90h] rol ax, 8 mov [rbp+var_2C], ax mov al, [rsi+94h] mov [rbp+var_2A], al xor eax, eax mov [rbp+var_29], rax mov [rbp+var_29+5], rax lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_D0] mov esi, ebx mov edx, 7 call qword ptr [rax+158h] test rax, rax jnz short loc_9F9C3 lea rsi, [rbp+var_80] mov edx, 64h ; 'd' mov ecx, 4 mov edi, ebx call my_write mov rcx, rax loc_9F99E: xor eax, eax test rcx, rcx setnz cl mov rdx, fs:28h cmp rdx, [rbp+var_18] jnz short loc_9F9E0 mov al, cl add rsp, 0C0h pop rbx pop r14 pop rbp retn loc_9F9C3: lea rdx, [rbp+var_80] lea r14, [rbp+var_88] mov rdi, rax mov esi, ebx mov rcx, r14 call mi_base_info_write_cold_1 mov rcx, [r14] jmp short loc_9F99E loc_9F9E0: call ___stack_chk_fail
bool mi_base_info_write(unsigned int a1, const __m128i *a2) { __m128i v2; // xmm0 __m128i v3; // xmm0 long long v4; // rax long long v5; // rcx _BYTE v8[72]; // [rsp+0h] [rbp-D0h] BYREF long long v9; // [rsp+48h] [rbp-88h] BYREF _QWORD v10[5]; // [rsp+50h] [rbp-80h] BYREF unsigned __int32 v11; // [rsp+78h] [rbp-58h] unsigned __int32 v12; // [rsp+7Ch] [rbp-54h] unsigned __int32 v13; // [rsp+80h] [rbp-50h] unsigned __int32 v14; // [rsp+84h] [rbp-4Ch] unsigned __int32 v15; // [rsp+88h] [rbp-48h] unsigned __int32 v16; // [rsp+8Ch] [rbp-44h] unsigned __int32 v17; // [rsp+90h] [rbp-40h] unsigned __int32 v18; // [rsp+94h] [rbp-3Ch] int v19; // [rsp+98h] [rbp-38h] __int16 v20; // [rsp+9Ch] [rbp-34h] __int16 v21; // [rsp+9Eh] [rbp-32h] __int16 v22; // [rsp+A0h] [rbp-30h] __int16 v23; // [rsp+A2h] [rbp-2Eh] __int16 v24; // [rsp+A4h] [rbp-2Ch] __int8 v25; // [rsp+A6h] [rbp-2Ah] _QWORD v26[5]; // [rsp+A7h] [rbp-29h] *(_QWORD *)((char *)&v26[2] + 1) = __readfsqword(0x28u); v10[0] = _byteswap_uint64(a2->m128i_i64[0]); v10[1] = _byteswap_uint64(a2->m128i_u64[1]); v10[2] = _byteswap_uint64(a2[1].m128i_u64[0]); v10[3] = _byteswap_uint64(a2[2].m128i_u64[0]); v10[4] = _byteswap_uint64(a2[2].m128i_u64[1]); v11 = _byteswap_ulong(a2[3].m128i_u32[0]); v12 = _byteswap_ulong(a2[3].m128i_u32[2]); v13 = _byteswap_ulong(a2[4].m128i_u32[0]); v14 = _byteswap_ulong(a2[4].m128i_u32[2]); v15 = _byteswap_ulong(a2[5].m128i_u32[0]); v16 = _byteswap_ulong(a2[5].m128i_u32[2]); v17 = _byteswap_ulong(a2[6].m128i_u32[0]); v18 = _byteswap_ulong(a2[6].m128i_u32[2]); v2 = _mm_and_si128(_mm_loadu_si128(a2 + 7), (__m128i)xmmword_10D670); v3 = _mm_packus_epi16(v2, v2); v19 = _mm_cvtsi128_si32(_mm_packus_epi16(v3, v3)); v20 = __ROL2__(a2[8].m128i_i16[2], 8); v21 = __ROL2__(a2[8].m128i_i16[0], 8); v22 = __ROL2__(a2[8].m128i_i16[4], 8); v23 = __ROL2__(a2[8].m128i_i16[6], 8); v24 = __ROL2__(a2[9].m128i_i16[0], 8); v25 = a2[9].m128i_i8[4]; v26[0] = 0LL; *(_QWORD *)((char *)v26 + 5) = 0LL; v4 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v8, a1, 7LL); if ( v4 ) { mi_base_info_write_cold_1(v4, a1, (long long)v10, &v9); v5 = v9; } else { v5 = my_write(a1, (long long)v10, 100LL, 4LL); } return v5 != 0; }
mi_base_info_write: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0xc0 MOV EBX,EDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RSI] BSWAP RAX MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RSI + 0x8] BSWAP RAX MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RSI + 0x10] BSWAP RAX MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RSI + 0x20] BSWAP RAX MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RSI + 0x28] BSWAP RAX MOV qword ptr [RBP + -0x60],RAX MOV EAX,dword ptr [RSI + 0x30] BSWAP EAX MOV dword ptr [RBP + -0x58],EAX MOV EAX,dword ptr [RSI + 0x38] BSWAP EAX MOV dword ptr [RBP + -0x54],EAX MOV EAX,dword ptr [RSI + 0x40] BSWAP EAX MOV dword ptr [RBP + -0x50],EAX MOV EAX,dword ptr [RSI + 0x48] BSWAP EAX MOV dword ptr [RBP + -0x4c],EAX MOV EAX,dword ptr [RSI + 0x50] BSWAP EAX MOV dword ptr [RBP + -0x48],EAX MOV EAX,dword ptr [RSI + 0x58] BSWAP EAX MOV dword ptr [RBP + -0x44],EAX MOV EAX,dword ptr [RSI + 0x60] BSWAP EAX MOV dword ptr [RBP + -0x40],EAX MOV EAX,dword ptr [RSI + 0x68] BSWAP EAX MOV dword ptr [RBP + -0x3c],EAX MOVDQU XMM0,xmmword ptr [RSI + 0x70] PAND XMM0,xmmword ptr [0x0020d670] PACKUSWB XMM0,XMM0 PACKUSWB XMM0,XMM0 MOVD dword ptr [RBP + -0x38],XMM0 MOVZX EAX,word ptr [RSI + 0x84] ROL AX,0x8 MOV word ptr [RBP + -0x34],AX MOVZX EAX,word ptr [RSI + 0x80] ROL AX,0x8 MOV word ptr [RBP + -0x32],AX MOVZX EAX,word ptr [RSI + 0x88] ROL AX,0x8 MOV word ptr [RBP + -0x30],AX MOVZX EAX,word ptr [RSI + 0x8c] ROL AX,0x8 MOV word ptr [RBP + -0x2e],AX MOVZX EAX,word ptr [RSI + 0x90] ROL AX,0x8 MOV word ptr [RBP + -0x2c],AX MOV AL,byte ptr [RSI + 0x94] MOV byte ptr [RBP + -0x2a],AL XOR EAX,EAX MOV qword ptr [RBP + -0x29],RAX MOV qword ptr [RBP + -0x24],RAX LEA RAX,[0x4b8c08] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0xd0] MOV ESI,EBX MOV EDX,0x7 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0019f9c3 LEA RSI,[RBP + -0x80] MOV EDX,0x64 MOV ECX,0x4 MOV EDI,EBX CALL 0x00132935 MOV RCX,RAX LAB_0019f99e: XOR EAX,EAX TEST RCX,RCX SETNZ CL MOV RDX,qword ptr FS:[0x28] CMP RDX,qword ptr [RBP + -0x18] JNZ 0x0019f9e0 MOV AL,CL ADD RSP,0xc0 POP RBX POP R14 POP RBP RET LAB_0019f9c3: LEA RDX,[RBP + -0x80] LEA R14,[RBP + -0x88] MOV RDI,RAX MOV ESI,EBX MOV RCX,R14 CALL 0x00130f59 MOV RCX,qword ptr [R14] JMP 0x0019f99e LAB_0019f9e0: CALL 0x0012b280
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ bool mi_base_info_write(int4 param_1,ulong *param_2) { uint uVar1; ulong uVar2; char cVar3; short sVar7; short sVar8; short sVar9; long lVar10; long in_FS_OFFSET; ushort uVar11; short sVar12; ushort uVar15; ushort uVar16; ushort uVar17; ushort uVar18; ushort uVar19; ushort uVar20; ushort uVar21; int1 local_d8 [72]; long local_90; ulong local_88; ulong local_80; ulong local_78; ulong local_70; ulong local_68; uint local_60; uint local_5c; uint local_58; uint local_54; uint local_50; uint local_4c; uint local_48; uint local_44; int4 local_40; ushort local_3c; ushort local_3a; ushort local_38; ushort local_36; ushort local_34; int1 local_32; int5 local_31; int3 uStack_2c; int5 uStack_29; long local_20; char cVar4; char cVar5; char cVar6; int4 uVar13; int6 uVar14; local_20 = *(long *)(in_FS_OFFSET + 0x28); uVar2 = *param_2; local_88 = uVar2 >> 0x38 | (uVar2 & 0xff000000000000) >> 0x28 | (uVar2 & 0xff0000000000) >> 0x18 | (uVar2 & 0xff00000000) >> 8 | (uVar2 & 0xff000000) << 8 | (uVar2 & 0xff0000) << 0x18 | (uVar2 & 0xff00) << 0x28 | uVar2 << 0x38; uVar2 = param_2[1]; local_80 = uVar2 >> 0x38 | (uVar2 & 0xff000000000000) >> 0x28 | (uVar2 & 0xff0000000000) >> 0x18 | (uVar2 & 0xff00000000) >> 8 | (uVar2 & 0xff000000) << 8 | (uVar2 & 0xff0000) << 0x18 | (uVar2 & 0xff00) << 0x28 | uVar2 << 0x38; uVar2 = param_2[2]; local_78 = uVar2 >> 0x38 | (uVar2 & 0xff000000000000) >> 0x28 | (uVar2 & 0xff0000000000) >> 0x18 | (uVar2 & 0xff00000000) >> 8 | (uVar2 & 0xff000000) << 8 | (uVar2 & 0xff0000) << 0x18 | (uVar2 & 0xff00) << 0x28 | uVar2 << 0x38; uVar2 = param_2[4]; local_70 = uVar2 >> 0x38 | (uVar2 & 0xff000000000000) >> 0x28 | (uVar2 & 0xff0000000000) >> 0x18 | (uVar2 & 0xff00000000) >> 8 | (uVar2 & 0xff000000) << 8 | (uVar2 & 0xff0000) << 0x18 | (uVar2 & 0xff00) << 0x28 | uVar2 << 0x38; uVar2 = param_2[5]; local_68 = uVar2 >> 0x38 | (uVar2 & 0xff000000000000) >> 0x28 | (uVar2 & 0xff0000000000) >> 0x18 | (uVar2 & 0xff00000000) >> 8 | (uVar2 & 0xff000000) << 8 | (uVar2 & 0xff0000) << 0x18 | (uVar2 & 0xff00) << 0x28 | uVar2 << 0x38; uVar1 = (uint)param_2[6]; local_60 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18; uVar1 = (uint)param_2[7]; local_5c = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18; uVar1 = (uint)param_2[8]; local_58 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18; uVar1 = (uint)param_2[9]; local_54 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18; uVar1 = (uint)param_2[10]; local_50 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18; uVar1 = (uint)param_2[0xb]; local_4c = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18; uVar1 = (uint)param_2[0xc]; local_48 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18; uVar1 = (uint)param_2[0xd]; local_44 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18; uVar11 = (ushort)param_2[0xe] & _DAT_0020d670; uVar15 = *(ushort *)((long)param_2 + 0x72) & _UNK_0020d672; uVar16 = *(ushort *)((long)param_2 + 0x74) & _UNK_0020d674; uVar17 = *(ushort *)((long)param_2 + 0x76) & _UNK_0020d676; uVar18 = (ushort)param_2[0xf] & _UNK_0020d678; uVar19 = *(ushort *)((long)param_2 + 0x7a) & _UNK_0020d67a; uVar20 = *(ushort *)((long)param_2 + 0x7c) & _UNK_0020d67c; uVar21 = *(ushort *)((long)param_2 + 0x7e) & _UNK_0020d67e; cVar3 = (0 < (short)uVar11) * ((short)uVar11 < 0x100) * (char)uVar11 - (0xff < (short)uVar11); sVar12 = CONCAT11((0 < (short)uVar15) * ((short)uVar15 < 0x100) * (char)uVar15 - (0xff < (short)uVar15),cVar3); cVar4 = (0 < (short)uVar16) * ((short)uVar16 < 0x100) * (char)uVar16 - (0xff < (short)uVar16); uVar13 = CONCAT13((0 < (short)uVar17) * ((short)uVar17 < 0x100) * (char)uVar17 - (0xff < (short)uVar17),CONCAT12(cVar4,sVar12)); cVar5 = (0 < (short)uVar18) * ((short)uVar18 < 0x100) * (char)uVar18 - (0xff < (short)uVar18); uVar14 = CONCAT15((0 < (short)uVar19) * ((short)uVar19 < 0x100) * (char)uVar19 - (0xff < (short)uVar19),CONCAT14(cVar5,uVar13)); cVar6 = (0 < (short)uVar20) * ((short)uVar20 < 0x100) * (char)uVar20 - (0xff < (short)uVar20); sVar7 = (short)((uint)uVar13 >> 0x10); sVar8 = (short)((uint6)uVar14 >> 0x20); sVar9 = (short)(CONCAT17((0 < (short)uVar21) * ((short)uVar21 < 0x100) * (char)uVar21 - (0xff < (short)uVar21),CONCAT16(cVar6,uVar14)) >> 0x30); local_40 = CONCAT13((0 < sVar9) * (sVar9 < 0x100) * cVar6 - (0xff < sVar9), CONCAT12((0 < sVar8) * (sVar8 < 0x100) * cVar5 - (0xff < sVar8), CONCAT11((0 < sVar7) * (sVar7 < 0x100) * cVar4 - (0xff < sVar7), (0 < sVar12) * (sVar12 < 0x100) * cVar3 - (0xff < sVar12)))) ; local_3c = *(ushort *)((long)param_2 + 0x84) << 8 | *(ushort *)((long)param_2 + 0x84) >> 8; local_3a = (ushort)param_2[0x10] << 8 | (ushort)param_2[0x10] >> 8; local_38 = (ushort)param_2[0x11] << 8 | (ushort)param_2[0x11] >> 8; local_36 = *(ushort *)((long)param_2 + 0x8c) << 8 | *(ushort *)((long)param_2 + 0x8c) >> 8; local_34 = (ushort)param_2[0x12] << 8 | (ushort)param_2[0x12] >> 8; local_32 = *(int1 *)((long)param_2 + 0x94); local_31 = 0; uStack_2c = 0; uStack_29 = 0; lVar10 = (**(code **)(PSI_server + 0x158))(local_d8,param_1,7); if (lVar10 == 0) { local_90 = my_write(param_1,&local_88,100,4); } else { mi_base_info_write_cold_1(lVar10,param_1,&local_88,&local_90); } if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return local_90 != 0; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
5,527
LefDefParser::defiSlot::addPolygon(LefDefParser::defiGeometries*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiSlot.cpp
void defiSlot::addPolygon(defiGeometries* geom) { struct defiPoints* p; int x, y; int i; if (numPolys_ == polysAllocated_) { struct defiPoints** poly; polysAllocated_ = (polysAllocated_ == 0) ? 2 : polysAllocated_ * 2; poly = (struct defiPoints**)malloc(sizeof(struct defiPoints*) * polysAllocated_); for (i = 0; i < numPolys_; i++) poly[i] = polygons_[i]; if (polygons_) free((char*)(polygons_)); polygons_ = poly; } p = (struct defiPoints*)malloc(sizeof(struct defiPoints)); p->numPoints = geom->numPoints(); p->x = (int*)malloc(sizeof(int)*p->numPoints); p->y = (int*)malloc(sizeof(int)*p->numPoints); for (i = 0; i < p->numPoints; i++) { geom->points(i, &x, &y); p->x[i] = x; p->y[i] = y; } polygons_[numPolys_] = p; numPolys_ += 1; }
O3
cpp
LefDefParser::defiSlot::addPolygon(LefDefParser::defiGeometries*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %r12 movq %rdi, %r14 movl 0x40(%rdi), %ebx cmpl 0x44(%rdi), %ebx jne 0x2fa18 leal (%rbx,%rbx), %eax testq %rbx, %rbx movl $0x2, %ecx cmovnel %eax, %ecx movl %ecx, 0x44(%r14) movslq %ecx, %rdi shlq $0x3, %rdi callq 0x7270 movq %rax, %r15 movq 0x48(%r14), %rdi testl %ebx, %ebx jle 0x2fa07 xorl %eax, %eax movq (%rdi,%rax,8), %rcx movq %rcx, (%r15,%rax,8) incq %rax cmpq %rax, %rbx jne 0x2f9f1 leaq 0x48(%r14), %rbx jmp 0x2fa10 leaq 0x48(%r14), %rbx testq %rdi, %rdi je 0x2fa15 callq 0x7220 movq %r15, (%rbx) movq %r14, 0x10(%rsp) movl $0x18, %edi callq 0x7270 movq %rax, %rbp movq %r12, %rdi callq 0x1bcb6 movl %eax, (%rbp) movslq %eax, %r14 leaq (,%r14,4), %r15 movq %r15, %rdi callq 0x7270 movq %r12, %rbx movq %rax, %r12 movq %rax, 0x8(%rbp) movq %r15, %rdi callq 0x7270 movq %rbp, 0x8(%rsp) movq %rax, 0x10(%rbp) testl %r14d, %r14d jle 0x2fa9a movq %rax, %r13 xorl %ebp, %ebp movq %rsp, %r15 movq %rbx, %rdi movl %ebp, %esi leaq 0x4(%rsp), %rdx movq %r15, %rcx callq 0x1bcba movl 0x4(%rsp), %eax movl %eax, (%r12,%rbp,4) movl (%rsp), %eax movl %eax, (%r13,%rbp,4) incq %rbp cmpq %r14, %rbp jl 0x2fa70 movq 0x10(%rsp), %rdx movq 0x48(%rdx), %rax movslq 0x40(%rdx), %rcx movq 0x8(%rsp), %rsi movq %rsi, (%rax,%rcx,8) leal 0x1(%rcx), %eax movl %eax, 0x40(%rdx) addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN12LefDefParser8defiSlot10addPolygonEPNS_14defiGeometriesE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12, rsi mov r14, rdi mov ebx, [rdi+40h] cmp ebx, [rdi+44h] jnz short loc_2FA18 lea eax, [rbx+rbx] test rbx, rbx mov ecx, 2 cmovnz ecx, eax mov [r14+44h], ecx movsxd rdi, ecx shl rdi, 3 call _malloc mov r15, rax mov rdi, [r14+48h] test ebx, ebx jle short loc_2FA07 xor eax, eax loc_2F9F1: mov rcx, [rdi+rax*8] mov [r15+rax*8], rcx inc rax cmp rbx, rax jnz short loc_2F9F1 lea rbx, [r14+48h] jmp short loc_2FA10 loc_2FA07: lea rbx, [r14+48h] test rdi, rdi jz short loc_2FA15 loc_2FA10: call _free loc_2FA15: mov [rbx], r15 loc_2FA18: mov [rsp+48h+var_38], r14 mov edi, 18h call _malloc mov rbp, rax mov rdi, r12; this call _ZNK12LefDefParser14defiGeometries9numPointsEv; LefDefParser::defiGeometries::numPoints(void) mov [rbp+0], eax movsxd r14, eax lea r15, ds:0[r14*4] mov rdi, r15 call _malloc mov rbx, r12 mov r12, rax mov [rbp+8], rax mov rdi, r15 call _malloc mov [rsp+48h+var_40], rbp mov [rbp+10h], rax test r14d, r14d jle short loc_2FA9A mov r13, rax xor ebp, ebp mov r15, rsp loc_2FA70: mov rdi, rbx; this mov esi, ebp; int lea rdx, [rsp+48h+var_44]; int * mov rcx, r15; int * call _ZNK12LefDefParser14defiGeometries6pointsEiPiS1_; LefDefParser::defiGeometries::points(int,int *,int *) mov eax, [rsp+48h+var_44] mov [r12+rbp*4], eax mov eax, [rsp+48h+var_48] mov [r13+rbp*4+0], eax inc rbp cmp rbp, r14 jl short loc_2FA70 loc_2FA9A: mov rdx, [rsp+48h+var_38] mov rax, [rdx+48h] movsxd rcx, dword ptr [rdx+40h] mov rsi, [rsp+48h+var_40] mov [rax+rcx*8], rsi lea eax, [rcx+1] mov [rdx+40h], eax add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long LefDefParser::defiSlot::addPolygon(LefDefParser::defiSlot *this, LefDefParser::defiGeometries *a2) { long long v3; // rbx int v4; // ecx long long v5; // r15 _QWORD *v6; // rdi long long i; // rax long long *v8; // rbx long long v9; // rbp int v10; // eax long long v11; // r14 unsigned long long v12; // r15 long long v13; // r12 long long v14; // rax long long v15; // r13 long long j; // rbp LefDefParser::defiSlot *v17; // rdx long long v18; // rcx long long result; // rax int v20; // [rsp+0h] [rbp-48h] BYREF int v21; // [rsp+4h] [rbp-44h] BYREF long long v22; // [rsp+8h] [rbp-40h] LefDefParser::defiSlot *v23; // [rsp+10h] [rbp-38h] v3 = *((unsigned int *)this + 16); if ( (_DWORD)v3 == *((_DWORD *)this + 17) ) { v4 = 2; if ( *((_DWORD *)this + 16) ) v4 = 2 * v3; *((_DWORD *)this + 17) = v4; v5 = malloc(8LL * v4); v6 = (_QWORD *)*((_QWORD *)this + 9); if ( (int)v3 <= 0 ) { v8 = (long long *)((char *)this + 72); if ( !v6 ) { LABEL_10: *v8 = v5; goto LABEL_11; } } else { for ( i = 0LL; i != v3; ++i ) *(_QWORD *)(v5 + 8 * i) = v6[i]; v8 = (long long *)((char *)this + 72); } free(v6); goto LABEL_10; } LABEL_11: v23 = this; v9 = malloc(0x18uLL); v10 = LefDefParser::defiGeometries::numPoints(a2); *(_DWORD *)v9 = v10; v11 = v10; v12 = 4LL * v10; v13 = malloc(v12); *(_QWORD *)(v9 + 8) = v13; v14 = malloc(v12); v22 = v9; *(_QWORD *)(v9 + 16) = v14; if ( (int)v11 > 0 ) { v15 = v14; for ( j = 0LL; j < v11; ++j ) { LefDefParser::defiGeometries::points(a2, j, &v21, &v20); *(_DWORD *)(v13 + 4 * j) = v21; *(_DWORD *)(v15 + 4 * j) = v20; } } v17 = v23; v18 = *((int *)v23 + 16); *(_QWORD *)(*((_QWORD *)v23 + 9) + 8 * v18) = v22; result = (unsigned int)(v18 + 1); *((_DWORD *)v17 + 16) = result; return result; }
addPolygon: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,RSI MOV R14,RDI MOV EBX,dword ptr [RDI + 0x40] CMP EBX,dword ptr [RDI + 0x44] JNZ 0x0012fa18 LEA EAX,[RBX + RBX*0x1] TEST RBX,RBX MOV ECX,0x2 CMOVNZ ECX,EAX MOV dword ptr [R14 + 0x44],ECX MOVSXD RDI,ECX SHL RDI,0x3 CALL 0x00107270 MOV R15,RAX MOV RDI,qword ptr [R14 + 0x48] TEST EBX,EBX JLE 0x0012fa07 XOR EAX,EAX LAB_0012f9f1: MOV RCX,qword ptr [RDI + RAX*0x8] MOV qword ptr [R15 + RAX*0x8],RCX INC RAX CMP RBX,RAX JNZ 0x0012f9f1 LEA RBX,[R14 + 0x48] JMP 0x0012fa10 LAB_0012fa07: LEA RBX,[R14 + 0x48] TEST RDI,RDI JZ 0x0012fa15 LAB_0012fa10: CALL 0x00107220 LAB_0012fa15: MOV qword ptr [RBX],R15 LAB_0012fa18: MOV qword ptr [RSP + 0x10],R14 MOV EDI,0x18 CALL 0x00107270 MOV RBP,RAX MOV RDI,R12 CALL 0x0011bcb6 MOV dword ptr [RBP],EAX MOVSXD R14,EAX LEA R15,[R14*0x4] MOV RDI,R15 CALL 0x00107270 MOV RBX,R12 MOV R12,RAX MOV qword ptr [RBP + 0x8],RAX MOV RDI,R15 CALL 0x00107270 MOV qword ptr [RSP + 0x8],RBP MOV qword ptr [RBP + 0x10],RAX TEST R14D,R14D JLE 0x0012fa9a MOV R13,RAX XOR EBP,EBP MOV R15,RSP LAB_0012fa70: MOV RDI,RBX MOV ESI,EBP LEA RDX,[RSP + 0x4] MOV RCX,R15 CALL 0x0011bcba MOV EAX,dword ptr [RSP + 0x4] MOV dword ptr [R12 + RBP*0x4],EAX MOV EAX,dword ptr [RSP] MOV dword ptr [R13 + RBP*0x4],EAX INC RBP CMP RBP,R14 JL 0x0012fa70 LAB_0012fa9a: MOV RDX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RDX + 0x48] MOVSXD RCX,dword ptr [RDX + 0x40] MOV RSI,qword ptr [RSP + 0x8] MOV qword ptr [RAX + RCX*0x8],RSI LEA EAX,[RCX + 0x1] MOV dword ptr [RDX + 0x40],EAX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* LefDefParser::defiSlot::addPolygon(LefDefParser::defiGeometries*) */ void __thiscall LefDefParser::defiSlot::addPolygon(defiSlot *this,defiGeometries *param_1) { size_t __size; uint uVar1; int iVar2; void *pvVar3; ulong uVar4; int *piVar5; void *pvVar6; long lVar7; int local_48; int local_44; int *local_40; defiSlot *local_38; uVar1 = *(uint *)(this + 0x40); if (uVar1 != *(uint *)(this + 0x44)) goto LAB_0012fa18; iVar2 = 2; if ((ulong)uVar1 != 0) { iVar2 = uVar1 * 2; } *(int *)(this + 0x44) = iVar2; pvVar3 = malloc((long)iVar2 << 3); pvVar6 = *(void **)(this + 0x48); if ((int)uVar1 < 1) { if (pvVar6 != (void *)0x0) goto LAB_0012fa10; } else { uVar4 = 0; do { *(int8 *)((long)pvVar3 + uVar4 * 8) = *(int8 *)((long)pvVar6 + uVar4 * 8); uVar4 = uVar4 + 1; } while (uVar1 != uVar4); LAB_0012fa10: free(pvVar6); } *(void **)(this + 0x48) = pvVar3; LAB_0012fa18: local_38 = this; piVar5 = (int *)malloc(0x18); iVar2 = defiGeometries::numPoints(param_1); *piVar5 = iVar2; __size = (long)iVar2 * 4; pvVar6 = malloc(__size); *(void **)(piVar5 + 2) = pvVar6; pvVar3 = malloc(__size); *(void **)(piVar5 + 4) = pvVar3; local_40 = piVar5; if (0 < iVar2) { lVar7 = 0; do { defiGeometries::points(param_1,(int)lVar7,&local_44,&local_48); *(int *)((long)pvVar6 + lVar7 * 4) = local_44; *(int *)((long)pvVar3 + lVar7 * 4) = local_48; lVar7 = lVar7 + 1; } while (lVar7 < iVar2); } iVar2 = *(int *)(local_38 + 0x40); *(int **)(*(long *)(local_38 + 0x48) + (long)iVar2 * 8) = local_40; *(int *)(local_38 + 0x40) = iVar2 + 1; return; }
5,528
ggml_compute_forward_rope
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp
void ggml_compute_forward_rope( const ggml_compute_params * params, ggml_tensor * dst) { const ggml_tensor * src0 = dst->src[0]; switch (src0->type) { case GGML_TYPE_F16: { ggml_compute_forward_rope_f16(params, dst, true); } break; case GGML_TYPE_F32: { ggml_compute_forward_rope_f32(params, dst, true); } break; default: { GGML_ABORT("fatal error"); } } }
O0
cpp
ggml_compute_forward_rope: subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq 0x18(%rsp), %rax movq 0x98(%rax), %rax movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rax movl (%rax), %eax movl %eax, 0xc(%rsp) testl %eax, %eax je 0x95f71 jmp 0x95f50 movl 0xc(%rsp), %eax subl $0x1, %eax jne 0x95f87 jmp 0x95f5b movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi movl $0x1, %edx callq 0x95fb0 jmp 0x95fa1 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi movl $0x1, %edx callq 0x974c0 jmp 0x95fa1 leaq 0x1f70a(%rip), %rdi # 0xb5698 movl $0x1563, %esi # imm = 0x1563 leaq 0x15afa(%rip), %rdx # 0xaba94 movb $0x0, %al callq 0x10660 addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
ggml_compute_forward_rope: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov rax, [rsp+28h+var_10] mov rax, [rax+98h] mov [rsp+28h+var_18], rax mov rax, [rsp+28h+var_18] mov eax, [rax] mov [rsp+28h+var_1C], eax test eax, eax jz short loc_95F71 jmp short $+2 loc_95F50: mov eax, [rsp+28h+var_1C] sub eax, 1 jnz short loc_95F87 jmp short $+2 loc_95F5B: mov rdi, [rsp+28h+var_8] mov rsi, [rsp+28h+var_10] mov edx, 1 call _ZL29ggml_compute_forward_rope_f16PK19ggml_compute_paramsP11ggml_tensorb; ggml_compute_forward_rope_f16(ggml_compute_params const*,ggml_tensor *,bool) jmp short loc_95FA1 loc_95F71: mov rdi, [rsp+28h+var_8] mov rsi, [rsp+28h+var_10] mov edx, 1 call _ZL29ggml_compute_forward_rope_f32PK19ggml_compute_paramsP11ggml_tensorb; ggml_compute_forward_rope_f32(ggml_compute_params const*,ggml_tensor *,bool) jmp short loc_95FA1 loc_95F87: lea rdi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"... mov esi, 1563h lea rdx, aFatalError; "fatal error" mov al, 0 call _ggml_abort loc_95FA1: add rsp, 28h retn
double ggml_compute_forward_rope(long long a1, long long a2) { double result; // xmm0_8 int v3; // [rsp+Ch] [rbp-1Ch] v3 = **(_DWORD **)(a2 + 152); if ( v3 ) { if ( v3 == 1 ) ggml_compute_forward_rope_f16(a1, a2, 1LL); else return ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp", 5475LL, "fatal error"); } else { ggml_compute_forward_rope_f32(a1, a2, 1LL); } return result; }
ggml_compute_forward_rope: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0xc],EAX TEST EAX,EAX JZ 0x00195f71 JMP 0x00195f50 LAB_00195f50: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x1 JNZ 0x00195f87 JMP 0x00195f5b LAB_00195f5b: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] MOV EDX,0x1 CALL 0x00195fb0 JMP 0x00195fa1 LAB_00195f71: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] MOV EDX,0x1 CALL 0x001974c0 JMP 0x00195fa1 LAB_00195f87: LEA RDI,[0x1b5698] MOV ESI,0x1563 LEA RDX,[0x1aba94] MOV AL,0x0 CALL 0x00110660 LAB_00195fa1: ADD RSP,0x28 RET
void ggml_compute_forward_rope(ggml_compute_params *param_1,ggml_tensor *param_2) { if (**(int **)(param_2 + 0x98) == 0) { ggml_compute_forward_rope_f32(param_1,param_2,true); } else if (**(int **)(param_2 + 0x98) == 1) { ggml_compute_forward_rope_f16(param_1,param_2,true); } else { ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp" ,0x1563,"fatal error"); } return; }
5,529
ggml_compute_forward_rope
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp
void ggml_compute_forward_rope( const ggml_compute_params * params, ggml_tensor * dst) { const ggml_tensor * src0 = dst->src[0]; switch (src0->type) { case GGML_TYPE_F16: { ggml_compute_forward_rope_f16(params, dst, true); } break; case GGML_TYPE_F32: { ggml_compute_forward_rope_f32(params, dst, true); } break; default: { GGML_ABORT("fatal error"); } } }
O2
cpp
ggml_compute_forward_rope: movq 0x98(%rsi), %rax movl (%rax), %eax testl %eax, %eax je 0x39794 cmpl $0x1, %eax jne 0x3979c pushq $0x1 popq %rdx jmp 0x397b7 pushq $0x1 popq %rdx jmp 0x3a2e0 pushq %rax leaq 0x14e5c(%rip), %rdi # 0x4e600 leaq 0xae1d(%rip), %rdx # 0x445c8 movl $0x1563, %esi # imm = 0x1563 xorl %eax, %eax callq 0xc040
ggml_compute_forward_rope: mov rax, [rsi+98h] mov eax, [rax] test eax, eax jz short loc_39794 cmp eax, 1 jnz short loc_3979C push 1 pop rdx jmp short _ZL29ggml_compute_forward_rope_f16PK19ggml_compute_paramsP11ggml_tensorb; ggml_compute_forward_rope_f16(ggml_compute_params const*,ggml_tensor *,bool) loc_39794: push 1 pop rdx jmp _ZL29ggml_compute_forward_rope_f32PK19ggml_compute_paramsP11ggml_tensorb; ggml_compute_forward_rope_f32(ggml_compute_params const*,ggml_tensor *,bool) loc_3979C: push rax lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aFatalError; "fatal error" mov esi, 1563h xor eax, eax call _ggml_abort
long long ggml_compute_forward_rope(long long a1, long long a2) { int v2; // eax v2 = **(_DWORD **)(a2 + 152); if ( !v2 ) return ggml_compute_forward_rope_f32(a1, a2, 1LL); if ( v2 == 1 ) return ggml_compute_forward_rope_f16(a1, a2, 1LL); ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp", 5475LL, "fatal error"); return ((long long (*)(void))ggml_compute_forward_rope_f16)(); }
ggml_compute_forward_rope: MOV RAX,qword ptr [RSI + 0x98] MOV EAX,dword ptr [RAX] TEST EAX,EAX JZ 0x00139794 CMP EAX,0x1 JNZ 0x0013979c PUSH 0x1 POP RDX JMP 0x001397b7 LAB_00139794: PUSH 0x1 POP RDX JMP 0x0013a2e0 LAB_0013979c: PUSH RAX LEA RDI,[0x14e600] LEA RDX,[0x1445c8] MOV ESI,0x1563 XOR EAX,EAX CALL 0x0010c040
void ggml_compute_forward_rope(ggml_compute_params *param_1,ggml_tensor *param_2) { if (**(int **)(param_2 + 0x98) == 0) { ggml_compute_forward_rope_f32(param_1,param_2,true); return; } if (**(int **)(param_2 + 0x98) == 1) { ggml_compute_forward_rope_f16(param_1,param_2,true); return; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp", 0x1563,"fatal error"); }
5,530
ggml_compute_forward_rope
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp
void ggml_compute_forward_rope( const ggml_compute_params * params, ggml_tensor * dst) { const ggml_tensor * src0 = dst->src[0]; switch (src0->type) { case GGML_TYPE_F16: { ggml_compute_forward_rope_f16(params, dst, true); } break; case GGML_TYPE_F32: { ggml_compute_forward_rope_f32(params, dst, true); } break; default: { GGML_ABORT("fatal error"); } } }
O3
cpp
ggml_compute_forward_rope: movq 0x98(%rsi), %rax movl (%rax), %eax testl %eax, %eax je 0x3cc2d cmpl $0x1, %eax jne 0x3cc37 movl $0x1, %edx jmp 0x3cc52 movl $0x1, %edx jmp 0x3d7ba pushq %rax leaq 0x15e61(%rip), %rdi # 0x52aa0 leaq 0xba3a(%rip), %rdx # 0x48680 movl $0x1563, %esi # imm = 0x1563 xorl %eax, %eax callq 0xaf40
ggml_compute_forward_rope: mov rax, [rsi+98h] mov eax, [rax] test eax, eax jz short loc_3CC2D cmp eax, 1 jnz short loc_3CC37 mov edx, 1 jmp short _ZL29ggml_compute_forward_rope_f16PK19ggml_compute_paramsP11ggml_tensorb; ggml_compute_forward_rope_f16(ggml_compute_params const*,ggml_tensor *,bool) loc_3CC2D: mov edx, 1 jmp _ZL29ggml_compute_forward_rope_f32PK19ggml_compute_paramsP11ggml_tensorb; ggml_compute_forward_rope_f32(ggml_compute_params const*,ggml_tensor *,bool) loc_3CC37: push rax lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aFatalError; "fatal error" mov esi, 1563h xor eax, eax call _ggml_abort
long long ggml_compute_forward_rope(long long a1, long long a2) { int v2; // eax v2 = **(_DWORD **)(a2 + 152); if ( !v2 ) return ggml_compute_forward_rope_f32(a1, a2, 1LL); if ( v2 == 1 ) return ggml_compute_forward_rope_f16(a1, a2, 1LL); ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp", 5475LL, "fatal error"); return ((long long (*)(void))ggml_compute_forward_rope_f16)(); }
ggml_compute_forward_rope: MOV RAX,qword ptr [RSI + 0x98] MOV EAX,dword ptr [RAX] TEST EAX,EAX JZ 0x0013cc2d CMP EAX,0x1 JNZ 0x0013cc37 MOV EDX,0x1 JMP 0x0013cc52 LAB_0013cc2d: MOV EDX,0x1 JMP 0x0013d7ba LAB_0013cc37: PUSH RAX LEA RDI,[0x152aa0] LEA RDX,[0x148680] MOV ESI,0x1563 XOR EAX,EAX CALL 0x0010af40
void ggml_compute_forward_rope(ggml_compute_params *param_1,ggml_tensor *param_2) { if (**(int **)(param_2 + 0x98) == 0) { ggml_compute_forward_rope_f32(param_1,param_2,true); return; } if (**(int **)(param_2 + 0x98) == 1) { ggml_compute_forward_rope_f16(param_1,param_2,true); return; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp", 0x1563,"fatal error"); }
5,531
my_mb_wc_eucjpms
eloqsql/strings/ctype-eucjpms.c
static int my_mb_wc_eucjpms(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { int hi; if (s >= e) return MY_CS_TOOSMALL; if ((hi= s[0]) < 0x80) /* ASCII code set: [00..7F] -> [U+0000..U+007F] */ { *pwc= hi; return 1; } if (hi >= 0xA1 && hi <= 0xFE) /* JIS X 0208 code set: [A1..FE][A1..FE] */ { if (s + 2 > e) return MY_CS_TOOSMALL2; return (*pwc= jisx0208_eucjpms_to_unicode[(hi << 8) + s[1]]) ? 2 : (s[1] < 0xA1 || s[1] > 0xFE) ? MY_CS_ILSEQ : -2; } /* JIS-X-0201 HALF WIDTH KATAKANA: [8E][A1..DF] -> [U+FF61..U+FF9F] */ if (hi == 0x8E) { if (s + 2 > e) return MY_CS_TOOSMALL2; if (s[1] < 0xA1 || s[1] > 0xDF) return MY_CS_ILSEQ; *pwc= 0xFEC0 + s[1]; /* 0xFFC0 = 0xFF61 - 0xA1 */ return 2; } if (hi == 0x8F) /* JIS X 0212 code set: [8F][A1..FE][A1..FE] */ { if (s + 3 > e) return MY_CS_TOOSMALL3; return (*pwc= jisx0212_eucjpms_to_unicode[(((int) s[1]) << 8) + s[2]]) ? 3 : (s[1] < 0xA1 || s[1] > 0xFE || s[2] < 0xA1 || s[2] > 0xFE) ? MY_CS_ILSEQ : -3; } return MY_CS_ILSEQ; }
O3
c
my_mb_wc_eucjpms: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0xb53a2 movzbl (%rdx), %edi testb %dil, %dil js 0xb53a4 movq %rdi, (%rsi) movl $0x1, %eax popq %rbp retq leal 0x5f(%rdi), %eax cmpb $0x5d, %al ja 0xb53f0 leaq 0x2(%rdx), %r8 movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %r8 ja 0xb53a2 movzbl 0x1(%rdx), %eax shll $0x9, %edi leal (%rdi,%rax,2), %eax leaq 0xacc76(%rip), %rcx # 0x162040 movzwl (%rax,%rcx), %ecx movq %rcx, (%rsi) movl $0x2, %eax testq %rcx, %rcx jne 0xb53a2 movb 0x1(%rdx), %al incb %al xorl %ecx, %ecx cmpb $-0x5e, %al setb %cl leal -0x2(,%rcx,2), %eax jmp 0xb53a2 cmpq $0x8f, %rdi je 0xb5434 cmpl $0x8e, %edi jne 0xb5476 leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0xb53a2 movzbl 0x1(%rdx), %ecx leal 0x20(%rcx), %edx movl $0x0, %eax cmpb $-0x3f, %dl jb 0xb53a2 addq $0xfec0, %rcx # imm = 0xFEC0 movq %rcx, (%rsi) movl $0x2, %eax jmp 0xb53a2 leaq 0x3(%rdx), %rdi movl $0xffffff99, %eax # imm = 0xFFFFFF99 cmpq %rcx, %rdi ja 0xb53a2 movzwl 0x1(%rdx), %eax rolw $0x8, %ax movzwl %ax, %eax leaq 0xccbe8(%rip), %rcx # 0x182040 movzwl (%rcx,%rax,2), %ecx movq %rcx, (%rsi) movl $0x3, %eax testq %rcx, %rcx jne 0xb53a2 movb 0x1(%rdx), %al incb %al cmpb $-0x5e, %al jae 0xb547d xorl %eax, %eax jmp 0xb53a2 movb 0x2(%rdx), %cl movl $0x0, %eax cmpb $-0x5f, %cl jb 0xb53a2 xorl %eax, %eax cmpb $-0x1, %cl sete %al leal (%rax,%rax,2), %eax addl $-0x3, %eax jmp 0xb53a2
my_mb_wc_eucjpms: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_B53A2 movzx edi, byte ptr [rdx] test dil, dil js short loc_B53A4 mov [rsi], rdi mov eax, 1 loc_B53A2: pop rbp retn loc_B53A4: lea eax, [rdi+5Fh] cmp al, 5Dh ; ']' ja short loc_B53F0 lea r8, [rdx+2] mov eax, 0FFFFFF9Ah cmp r8, rcx ja short loc_B53A2 movzx eax, byte ptr [rdx+1] shl edi, 9 lea eax, [rdi+rax*2] lea rcx, jisx0208_eucjpms_to_unicode movzx ecx, word ptr [rax+rcx] mov [rsi], rcx mov eax, 2 test rcx, rcx jnz short loc_B53A2 mov al, [rdx+1] inc al xor ecx, ecx cmp al, 0A2h setb cl lea eax, ds:0FFFFFFFFFFFFFFFEh[rcx*2] jmp short loc_B53A2 loc_B53F0: cmp rdi, 8Fh jz short loc_B5434 cmp edi, 8Eh jnz short loc_B5476 lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_B53A2 movzx ecx, byte ptr [rdx+1] lea edx, [rcx+20h] mov eax, 0 cmp dl, 0C1h jb short loc_B53A2 add rcx, 0FEC0h mov [rsi], rcx mov eax, 2 jmp loc_B53A2 loc_B5434: lea rdi, [rdx+3] mov eax, 0FFFFFF99h cmp rdi, rcx ja loc_B53A2 movzx eax, word ptr [rdx+1] rol ax, 8 movzx eax, ax lea rcx, jisx0212_eucjpms_to_unicode movzx ecx, word ptr [rcx+rax*2] mov [rsi], rcx mov eax, 3 test rcx, rcx jnz loc_B53A2 mov al, [rdx+1] inc al cmp al, 0A2h jnb short loc_B547D loc_B5476: xor eax, eax jmp loc_B53A2 loc_B547D: mov cl, [rdx+2] mov eax, 0 cmp cl, 0A1h jb loc_B53A2 xor eax, eax cmp cl, 0FFh setz al lea eax, [rax+rax*2] add eax, 0FFFFFFFDh jmp loc_B53A2
long long my_mb_wc_eucjpms(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { long long result; // rax long long v5; // rdi long long v6; // rcx long long v7; // rcx long long v8; // rcx unsigned __int8 v9; // cl result = 4294967195LL; if ( (unsigned long long)a3 >= a4 ) return result; v5 = *a3; if ( (v5 & 0x80u) == 0LL ) { *a2 = v5; return 1LL; } if ( (unsigned __int8)(v5 + 95) <= 0x5Du ) { result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { v6 = jisx0208_eucjpms_to_unicode[256 * (_DWORD)v5 + a3[1]]; *a2 = v6; result = 2LL; if ( !v6 ) return 2 * (unsigned int)((unsigned __int8)(a3[1] + 1) < 0xA2u) - 2; } return result; } if ( v5 != 143 ) { if ( (_DWORD)v5 == 142 ) { result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { v7 = a3[1]; result = 0LL; if ( (unsigned __int8)(v7 + 32) >= 0xC1u ) { *a2 = v7 + 65216; return 2LL; } } return result; } return 0LL; } result = 4294967193LL; if ( (unsigned long long)(a3 + 3) > a4 ) return result; v8 = jisx0212_eucjpms_to_unicode[(unsigned __int16)__ROL2__(*(_WORD *)(a3 + 1), 8)]; *a2 = v8; result = 3LL; if ( v8 ) return result; if ( (unsigned __int8)(a3[1] + 1) < 0xA2u ) return 0LL; v9 = a3[2]; result = 0LL; if ( v9 >= 0xA1u ) return 3 * (unsigned int)(v9 == 0xFF) - 3; return result; }
my_mb_wc_eucjpms: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x001b53a2 MOVZX EDI,byte ptr [RDX] TEST DIL,DIL JS 0x001b53a4 MOV qword ptr [RSI],RDI MOV EAX,0x1 LAB_001b53a2: POP RBP RET LAB_001b53a4: LEA EAX,[RDI + 0x5f] CMP AL,0x5d JA 0x001b53f0 LEA R8,[RDX + 0x2] MOV EAX,0xffffff9a CMP R8,RCX JA 0x001b53a2 MOVZX EAX,byte ptr [RDX + 0x1] SHL EDI,0x9 LEA EAX,[RDI + RAX*0x2] LEA RCX,[0x262040] MOVZX ECX,word ptr [RAX + RCX*0x1] MOV qword ptr [RSI],RCX MOV EAX,0x2 TEST RCX,RCX JNZ 0x001b53a2 MOV AL,byte ptr [RDX + 0x1] INC AL XOR ECX,ECX CMP AL,0xa2 SETC CL LEA EAX,[-0x2 + RCX*0x2] JMP 0x001b53a2 LAB_001b53f0: CMP RDI,0x8f JZ 0x001b5434 CMP EDI,0x8e JNZ 0x001b5476 LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x001b53a2 MOVZX ECX,byte ptr [RDX + 0x1] LEA EDX,[RCX + 0x20] MOV EAX,0x0 CMP DL,0xc1 JC 0x001b53a2 ADD RCX,0xfec0 MOV qword ptr [RSI],RCX MOV EAX,0x2 JMP 0x001b53a2 LAB_001b5434: LEA RDI,[RDX + 0x3] MOV EAX,0xffffff99 CMP RDI,RCX JA 0x001b53a2 MOVZX EAX,word ptr [RDX + 0x1] ROL AX,0x8 MOVZX EAX,AX LEA RCX,[0x282040] MOVZX ECX,word ptr [RCX + RAX*0x2] MOV qword ptr [RSI],RCX MOV EAX,0x3 TEST RCX,RCX JNZ 0x001b53a2 MOV AL,byte ptr [RDX + 0x1] INC AL CMP AL,0xa2 JNC 0x001b547d LAB_001b5476: XOR EAX,EAX JMP 0x001b53a2 LAB_001b547d: MOV CL,byte ptr [RDX + 0x2] MOV EAX,0x0 CMP CL,0xa1 JC 0x001b53a2 XOR EAX,EAX CMP CL,0xff SETZ AL LEA EAX,[RAX + RAX*0x2] ADD EAX,-0x3 JMP 0x001b53a2
int my_mb_wc_eucjpms(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { byte bVar1; ushort uVar2; int iVar3; iVar3 = -0x65; if (param_3 < param_4) { bVar1 = *param_3; if ((char)bVar1 < '\0') { if ((byte)(bVar1 + 0x5f) < 0x5e) { iVar3 = -0x66; if (param_3 + 2 <= param_4) { uVar2 = *(ushort *) (jisx0208_eucjpms_to_unicode + ((uint)bVar1 * 0x200 + (uint)param_3[1] * 2)); *param_2 = (ulong)uVar2; iVar3 = 2; if ((ulong)uVar2 == 0) { iVar3 = (uint)((byte)(param_3[1] + 1) < 0xa2) * 2 + -2; } } } else { if ((ulong)bVar1 == 0x8f) { if (param_4 < param_3 + 3) { return -0x67; } uVar2 = *(ushort *) (&jisx0212_eucjpms_to_unicode + (ulong)(ushort)(*(ushort *)(param_3 + 1) << 8 | *(ushort *)(param_3 + 1) >> 8) * 2); *param_2 = (ulong)uVar2; if ((ulong)uVar2 != 0) { return 3; } if (0xa1 < (byte)(param_3[1] + 1)) { if (param_3[2] < 0xa1) { return 0; } return (uint)(param_3[2] == 0xff) * 3 + -3; } } else if (bVar1 == 0x8e) { if (param_4 < param_3 + 2) { return -0x66; } if ((byte)(param_3[1] + 0x20) < 0xc1) { return 0; } *param_2 = (ulong)param_3[1] + 0xfec0; return 2; } iVar3 = 0; } } else { *param_2 = (ulong)bVar1; iVar3 = 1; } } return iVar3; }
5,532
minja::CallExpr::CallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::ArgumentsExpression&&)
monkey531[P]llama/common/minja.hpp
Expression(const Location & location) : location(location) {}
O1
cpp
minja::CallExpr::CallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::ArgumentsExpression&&): leaq 0x98881(%rip), %rax # 0x12e398 addq $0x10, %rax movq %rax, (%rdi) movq (%rsi), %rax movq %rax, 0x8(%rdi) movq 0x8(%rsi), %rax movq %rax, 0x10(%rdi) testq %rax, %rax je 0x95b48 movq 0x9a447(%rip), %r8 # 0x12ff80 cmpb $0x0, (%r8) je 0x95b44 incl 0x8(%rax) jmp 0x95b48 lock incl 0x8(%rax) movq 0x10(%rsi), %rax movq %rax, 0x18(%rdi) leaq 0x98d59(%rip), %rax # 0x12e8b0 addq $0x10, %rax movq %rax, (%rdi) xorl %eax, %eax movq %rax, 0x28(%rdi) movups (%rdx), %xmm0 movq %rax, 0x8(%rdx) movups %xmm0, 0x20(%rdi) movq %rax, (%rdx) movups (%rcx), %xmm0 movups %xmm0, 0x30(%rdi) movq 0x10(%rcx), %rdx movq %rdx, 0x40(%rdi) movq %rax, 0x10(%rcx) xorps %xmm0, %xmm0 movups %xmm0, (%rcx) movups 0x18(%rcx), %xmm1 movups %xmm1, 0x48(%rdi) movq 0x28(%rcx), %rdx movq %rdx, 0x58(%rdi) movq %rax, 0x28(%rcx) movups %xmm0, 0x18(%rcx) retq
_ZN5minja8CallExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEEONS_19ArgumentsExpressionE: lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression add rax, 10h mov [rdi], rax mov rax, [rsi] mov [rdi+8], rax mov rax, [rsi+8] mov [rdi+10h], rax test rax, rax jz short loc_95B48 mov r8, cs:__libc_single_threaded_ptr cmp byte ptr [r8], 0 jz short loc_95B44 inc dword ptr [rax+8] jmp short loc_95B48 loc_95B44: lock inc dword ptr [rax+8] loc_95B48: mov rax, [rsi+10h] mov [rdi+18h], rax lea rax, _ZTVN5minja8CallExprE; `vtable for'minja::CallExpr add rax, 10h mov [rdi], rax xor eax, eax mov [rdi+28h], rax movups xmm0, xmmword ptr [rdx] mov [rdx+8], rax movups xmmword ptr [rdi+20h], xmm0 mov [rdx], rax movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rdi+30h], xmm0 mov rdx, [rcx+10h] mov [rdi+40h], rdx mov [rcx+10h], rax xorps xmm0, xmm0 movups xmmword ptr [rcx], xmm0 movups xmm1, xmmword ptr [rcx+18h] movups xmmword ptr [rdi+48h], xmm1 mov rdx, [rcx+28h] mov [rdi+58h], rdx mov [rcx+28h], rax movups xmmword ptr [rcx+18h], xmm0 retn
long long minja::CallExpr::CallExpr(long long a1, _QWORD *a2, __int128 *a3, long long a4) { long long v4; // rax long long result; // rax __int128 v6; // xmm0 *(_QWORD *)a1 = &`vtable for'minja::Expression + 2; *(_QWORD *)(a1 + 8) = *a2; v4 = a2[1]; *(_QWORD *)(a1 + 16) = v4; if ( v4 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v4 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v4 + 8)); } *(_QWORD *)(a1 + 24) = a2[2]; *(_QWORD *)a1 = &`vtable for'minja::CallExpr + 2; result = 0LL; *(_QWORD *)(a1 + 40) = 0LL; v6 = *a3; *((_QWORD *)a3 + 1) = 0LL; *(_OWORD *)(a1 + 32) = v6; *(_QWORD *)a3 = 0LL; *(_OWORD *)(a1 + 48) = *(_OWORD *)a4; *(_QWORD *)(a1 + 64) = *(_QWORD *)(a4 + 16); *(_QWORD *)(a4 + 16) = 0LL; *(_OWORD *)a4 = 0LL; *(_OWORD *)(a1 + 72) = *(_OWORD *)(a4 + 24); *(_QWORD *)(a1 + 88) = *(_QWORD *)(a4 + 40); *(_QWORD *)(a4 + 40) = 0LL; *(_OWORD *)(a4 + 24) = 0LL; return result; }
CallExpr: LEA RAX,[0x22e398] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RAX,qword ptr [RSI] MOV qword ptr [RDI + 0x8],RAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x10],RAX TEST RAX,RAX JZ 0x00195b48 MOV R8,qword ptr [0x0022ff80] CMP byte ptr [R8],0x0 JZ 0x00195b44 INC dword ptr [RAX + 0x8] JMP 0x00195b48 LAB_00195b44: INC.LOCK dword ptr [RAX + 0x8] LAB_00195b48: MOV RAX,qword ptr [RSI + 0x10] MOV qword ptr [RDI + 0x18],RAX LEA RAX,[0x22e8b0] ADD RAX,0x10 MOV qword ptr [RDI],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x28],RAX MOVUPS XMM0,xmmword ptr [RDX] MOV qword ptr [RDX + 0x8],RAX MOVUPS xmmword ptr [RDI + 0x20],XMM0 MOV qword ptr [RDX],RAX MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RDI + 0x30],XMM0 MOV RDX,qword ptr [RCX + 0x10] MOV qword ptr [RDI + 0x40],RDX MOV qword ptr [RCX + 0x10],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RCX],XMM0 MOVUPS XMM1,xmmword ptr [RCX + 0x18] MOVUPS xmmword ptr [RDI + 0x48],XMM1 MOV RDX,qword ptr [RCX + 0x28] MOV qword ptr [RDI + 0x58],RDX MOV qword ptr [RCX + 0x28],RAX MOVUPS xmmword ptr [RCX + 0x18],XMM0 RET
/* minja::CallExpr::CallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::ArgumentsExpression&&) */ void __thiscall minja::CallExpr::CallExpr (CallExpr *this,Location *param_1,shared_ptr *param_2,ArgumentsExpression *param_3) { long lVar1; int8 uVar2; *(int ***)this = &PTR___cxa_pure_virtual_0022e3a8; *(int8 *)(this + 8) = *(int8 *)param_1; lVar1 = *(long *)(param_1 + 8); *(long *)(this + 0x10) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_0022ff80 == '\0') { LOCK(); *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; UNLOCK(); } else { *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; } } *(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10); *(int ***)this = &PTR_do_evaluate_0022e8c0; *(int8 *)(this + 0x28) = 0; uVar2 = *(int8 *)(param_2 + 8); *(int8 *)(param_2 + 8) = 0; *(int8 *)(this + 0x20) = *(int8 *)param_2; *(int8 *)(this + 0x28) = uVar2; *(int8 *)param_2 = 0; uVar2 = *(int8 *)(param_3 + 8); *(int8 *)(this + 0x30) = *(int8 *)param_3; *(int8 *)(this + 0x38) = uVar2; *(int8 *)(this + 0x40) = *(int8 *)(param_3 + 0x10); *(int8 *)(param_3 + 0x10) = 0; *(int8 *)param_3 = 0; *(int8 *)(param_3 + 8) = 0; uVar2 = *(int8 *)(param_3 + 0x20); *(int8 *)(this + 0x48) = *(int8 *)(param_3 + 0x18); *(int8 *)(this + 0x50) = uVar2; *(int8 *)(this + 0x58) = *(int8 *)(param_3 + 0x28); *(int8 *)(param_3 + 0x28) = 0; *(int8 *)(param_3 + 0x18) = 0; *(int8 *)(param_3 + 0x20) = 0; return; }
5,533
minja::CallExpr::CallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::ArgumentsExpression&&)
monkey531[P]llama/common/minja.hpp
Expression(const Location & location) : location(location) {}
O3
cpp
minja::CallExpr::CallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::ArgumentsExpression&&): leaq 0x96331(%rip), %rax # 0x12c398 addq $0x10, %rax movq %rax, (%rdi) movq (%rsi), %rax movq %rax, 0x8(%rdi) movq 0x8(%rsi), %rax movq %rax, 0x10(%rdi) testq %rax, %rax je 0x96098 movq 0x97ef7(%rip), %r9 # 0x12df80 cmpb $0x0, (%r9) je 0x96094 incl 0x8(%rax) jmp 0x96098 lock incl 0x8(%rax) movq 0x10(%rsi), %rax movq %rax, 0x18(%rdi) leaq 0x96911(%rip), %rax # 0x12c9b8 addq $0x10, %rax movq %rax, (%rdi) xorl %eax, %eax movq %rax, 0x28(%rdi) movups (%rdx), %xmm0 movq %rax, 0x8(%rdx) movups %xmm0, 0x20(%rdi) movq %rax, (%rdx) movq %rax, 0x38(%rdi) movups (%rcx), %xmm0 movq %rax, 0x8(%rcx) movups %xmm0, 0x30(%rdi) movq %rax, (%rcx) movl %r8d, 0x40(%rdi) retq nop
_ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE: lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression add rax, 10h mov [rdi], rax mov rax, [rsi] mov [rdi+8], rax mov rax, [rsi+8] mov [rdi+10h], rax test rax, rax jz short loc_96098 mov r9, cs:__libc_single_threaded_ptr cmp byte ptr [r9], 0 jz short loc_96094 inc dword ptr [rax+8] jmp short loc_96098 loc_96094: lock inc dword ptr [rax+8] loc_96098: mov rax, [rsi+10h] mov [rdi+18h], rax lea rax, _ZTVN5minja12BinaryOpExprE; `vtable for'minja::BinaryOpExpr add rax, 10h mov [rdi], rax xor eax, eax mov [rdi+28h], rax movups xmm0, xmmword ptr [rdx] mov [rdx+8], rax movups xmmword ptr [rdi+20h], xmm0 mov [rdx], rax mov [rdi+38h], rax movups xmm0, xmmword ptr [rcx] mov [rcx+8], rax movups xmmword ptr [rdi+30h], xmm0 mov [rcx], rax mov [rdi+40h], r8d retn
long long minja::BinaryOpExpr::BinaryOpExpr(long long a1, _QWORD *a2, __int128 *a3, __int128 *a4, int a5) { long long v5; // rax long long result; // rax __int128 v7; // xmm0 __int128 v8; // xmm0 *(_QWORD *)a1 = &`vtable for'minja::Expression + 2; *(_QWORD *)(a1 + 8) = *a2; v5 = a2[1]; *(_QWORD *)(a1 + 16) = v5; if ( v5 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v5 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v5 + 8)); } *(_QWORD *)(a1 + 24) = a2[2]; *(_QWORD *)a1 = &`vtable for'minja::BinaryOpExpr + 2; result = 0LL; *(_QWORD *)(a1 + 40) = 0LL; v7 = *a3; *((_QWORD *)a3 + 1) = 0LL; *(_OWORD *)(a1 + 32) = v7; *(_QWORD *)a3 = 0LL; *(_QWORD *)(a1 + 56) = 0LL; v8 = *a4; *((_QWORD *)a4 + 1) = 0LL; *(_OWORD *)(a1 + 48) = v8; *(_QWORD *)a4 = 0LL; *(_DWORD *)(a1 + 64) = a5; return result; }
BinaryOpExpr: LEA RAX,[0x22c398] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RAX,qword ptr [RSI] MOV qword ptr [RDI + 0x8],RAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x10],RAX TEST RAX,RAX JZ 0x00196098 MOV R9,qword ptr [0x0022df80] CMP byte ptr [R9],0x0 JZ 0x00196094 INC dword ptr [RAX + 0x8] JMP 0x00196098 LAB_00196094: INC.LOCK dword ptr [RAX + 0x8] LAB_00196098: MOV RAX,qword ptr [RSI + 0x10] MOV qword ptr [RDI + 0x18],RAX LEA RAX,[0x22c9b8] ADD RAX,0x10 MOV qword ptr [RDI],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x28],RAX MOVUPS XMM0,xmmword ptr [RDX] MOV qword ptr [RDX + 0x8],RAX MOVUPS xmmword ptr [RDI + 0x20],XMM0 MOV qword ptr [RDX],RAX MOV qword ptr [RDI + 0x38],RAX MOVUPS XMM0,xmmword ptr [RCX] MOV qword ptr [RCX + 0x8],RAX MOVUPS xmmword ptr [RDI + 0x30],XMM0 MOV qword ptr [RCX],RAX MOV dword ptr [RDI + 0x40],R8D RET
/* minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, minja::BinaryOpExpr::Op) */ void __thiscall minja::BinaryOpExpr::BinaryOpExpr (BinaryOpExpr *this,int8 *param_1,int8 *param_2,int8 *param_3, int4 param_5) { long lVar1; int8 uVar2; *(int ***)this = &PTR___cxa_pure_virtual_0022c3a8; *(int8 *)(this + 8) = *param_1; lVar1 = param_1[1]; *(long *)(this + 0x10) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_0022df80 == '\0') { LOCK(); *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; UNLOCK(); } else { *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; } } *(int8 *)(this + 0x18) = param_1[2]; *(int ***)this = &PTR_do_evaluate_0022c9c8; *(int8 *)(this + 0x28) = 0; uVar2 = param_2[1]; param_2[1] = 0; *(int8 *)(this + 0x20) = *param_2; *(int8 *)(this + 0x28) = uVar2; *param_2 = 0; *(int8 *)(this + 0x38) = 0; uVar2 = param_3[1]; param_3[1] = 0; *(int8 *)(this + 0x30) = *param_3; *(int8 *)(this + 0x38) = uVar2; *param_3 = 0; *(int4 *)(this + 0x40) = param_5; return; }
5,534
stbi__readval(stbi__context*, int, unsigned char*)
monkey531[P]llama/examples/llava/../../common/stb_image.h
static stbi_uc *stbi__readval(stbi__context *s, int channel, stbi_uc *dest) { int mask=0x80, i; for (i=0; i<4; ++i, mask>>=1) { if (channel & mask) { if (stbi__at_eof(s)) return stbi__errpuc("bad file","PIC file too short"); dest[i]=stbi__get8(s); } } return dest; }
O3
c
stbi__readval(stbi__context*, int, unsigned char*): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %rbx movl %esi, %ebp movq %rdi, %r14 movl $0x80, %r15d xorl %r12d, %r12d testl %ebp, %r15d je 0x3f2fe cmpq $0x0, 0x10(%r14) je 0x3f2af movq 0x28(%r14), %rdi callq *0x20(%r14) testl %eax, %eax je 0x3f2c4 cmpl $0x0, 0x30(%r14) je 0x3f310 movq 0xc0(%r14), %rax movq 0xc8(%r14), %rcx cmpq %rcx, %rax jb 0x3f2d2 jmp 0x3f310 movq 0xc0(%r14), %rax movq 0xc8(%r14), %rcx cmpq %rcx, %rax jb 0x3f2ed cmpl $0x0, 0x30(%r14) je 0x3f30c movq %r14, %rdi callq 0x3ba17 movq 0xc0(%r14), %rax leaq 0x1(%rax), %rcx movq %rcx, 0xc0(%r14) movb (%rax), %al movb %al, (%rbx,%r12) incq %r12 shrl %r15d cmpq $0x4, %r12 jne 0x3f290 jmp 0x3f32c xorl %eax, %eax jmp 0x3f2fa movq %fs:0x0, %rax leaq 0xcc378(%rip), %rcx # 0x10b69b movq %rcx, -0x20(%rax) xorl %ebx, %ebx movq %rbx, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ZL13stbi__readvalP13stbi__contextiPh: push rbp push r15 push r14 push r12 push rbx mov rbx, rdx mov ebp, esi mov r14, rdi mov r15d, 80h xor r12d, r12d loc_3F290: test r15d, ebp jz short loc_3F2FE cmp qword ptr [r14+10h], 0 jz short loc_3F2AF mov rdi, [r14+28h] call qword ptr [r14+20h] test eax, eax jz short loc_3F2C4 cmp dword ptr [r14+30h], 0 jz short loc_3F310 loc_3F2AF: mov rax, [r14+0C0h] mov rcx, [r14+0C8h] cmp rax, rcx jb short loc_3F2D2 jmp short loc_3F310 loc_3F2C4: mov rax, [r14+0C0h] mov rcx, [r14+0C8h] loc_3F2D2: cmp rax, rcx jb short loc_3F2ED cmp dword ptr [r14+30h], 0 jz short loc_3F30C mov rdi, r14 call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [r14+0C0h] loc_3F2ED: lea rcx, [rax+1] mov [r14+0C0h], rcx mov al, [rax] loc_3F2FA: mov [rbx+r12], al loc_3F2FE: inc r12 shr r15d, 1 cmp r12, 4 jnz short loc_3F290 jmp short loc_3F32C loc_3F30C: xor eax, eax jmp short loc_3F2FA loc_3F310: mov rax, fs:0 lea rcx, aBadFile; "bad file" mov [rax-20h], rcx xor ebx, ebx loc_3F32C: mov rax, rbx pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long stbi__readval(long long a1, int a2, long long a3) { unsigned int v4; // r15d long long v5; // r12 char *v6; // rax unsigned long long v7; // rcx char v8; // al v4 = 128; v5 = 0LL; while ( (a2 & v4) == 0 ) { LABEL_14: ++v5; v4 >>= 1; if ( v5 == 4 ) return a3; } if ( *(_QWORD *)(a1 + 16) ) { if ( !(*(unsigned int ( **)(_QWORD))(a1 + 32))(*(_QWORD *)(a1 + 40)) ) { v6 = *(char **)(a1 + 192); v7 = *(_QWORD *)(a1 + 200); LABEL_9: if ( (unsigned long long)v6 >= v7 ) { if ( !*(_DWORD *)(a1 + 48) ) { v8 = 0; goto LABEL_13; } stbi__refill_buffer(a1); v6 = *(char **)(a1 + 192); } *(_QWORD *)(a1 + 192) = v6 + 1; v8 = *v6; LABEL_13: *(_BYTE *)(a3 + v5) = v8; goto LABEL_14; } if ( !*(_DWORD *)(a1 + 48) ) goto LABEL_17; } v6 = *(char **)(a1 + 192); v7 = *(_QWORD *)(a1 + 200); if ( (unsigned long long)v6 < v7 ) goto LABEL_9; LABEL_17: *(_QWORD *)(__readfsqword(0) - 32) = "bad file"; return 0LL; }
stbi__readval: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDX MOV EBP,ESI MOV R14,RDI MOV R15D,0x80 XOR R12D,R12D LAB_0013f290: TEST R15D,EBP JZ 0x0013f2fe CMP qword ptr [R14 + 0x10],0x0 JZ 0x0013f2af MOV RDI,qword ptr [R14 + 0x28] CALL qword ptr [R14 + 0x20] TEST EAX,EAX JZ 0x0013f2c4 CMP dword ptr [R14 + 0x30],0x0 JZ 0x0013f310 LAB_0013f2af: MOV RAX,qword ptr [R14 + 0xc0] MOV RCX,qword ptr [R14 + 0xc8] CMP RAX,RCX JC 0x0013f2d2 JMP 0x0013f310 LAB_0013f2c4: MOV RAX,qword ptr [R14 + 0xc0] MOV RCX,qword ptr [R14 + 0xc8] LAB_0013f2d2: CMP RAX,RCX JC 0x0013f2ed CMP dword ptr [R14 + 0x30],0x0 JZ 0x0013f30c MOV RDI,R14 CALL 0x0013ba17 MOV RAX,qword ptr [R14 + 0xc0] LAB_0013f2ed: LEA RCX,[RAX + 0x1] MOV qword ptr [R14 + 0xc0],RCX MOV AL,byte ptr [RAX] LAB_0013f2fa: MOV byte ptr [RBX + R12*0x1],AL LAB_0013f2fe: INC R12 SHR R15D,0x1 CMP R12,0x4 JNZ 0x0013f290 JMP 0x0013f32c LAB_0013f30c: XOR EAX,EAX JMP 0x0013f2fa LAB_0013f310: MOV RAX,qword ptr FS:[0x0] LEA RCX,[0x20b69b] MOV qword ptr [RAX + -0x20],RCX XOR EBX,EBX LAB_0013f32c: MOV RAX,RBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* stbi__readval(stbi__context*, int, unsigned char*) */ uchar * stbi__readval(stbi__context *param_1,int param_2,uchar *param_3) { uchar uVar1; int iVar2; uchar *puVar3; uchar *puVar4; long lVar5; uint uVar6; long *in_FS_OFFSET; uVar6 = 0x80; lVar5 = 0; do { if ((uVar6 & param_2) != 0) { if (*(long *)(param_1 + 0x10) == 0) { LAB_0013f2af: puVar3 = *(uchar **)(param_1 + 0xc0); puVar4 = *(uchar **)(param_1 + 200); if (puVar4 <= puVar3) { LAB_0013f310: *(char **)(*in_FS_OFFSET + -0x20) = "bad file"; return (uchar *)0x0; } } else { iVar2 = (**(code **)(param_1 + 0x20))(*(int8 *)(param_1 + 0x28)); if (iVar2 != 0) { if (*(int *)(param_1 + 0x30) == 0) goto LAB_0013f310; goto LAB_0013f2af; } puVar3 = *(uchar **)(param_1 + 0xc0); puVar4 = *(uchar **)(param_1 + 200); } if (puVar3 < puVar4) { LAB_0013f2ed: *(uchar **)(param_1 + 0xc0) = puVar3 + 1; uVar1 = *puVar3; } else { if (*(int *)(param_1 + 0x30) != 0) { stbi__refill_buffer(param_1); puVar3 = *(uchar **)(param_1 + 0xc0); goto LAB_0013f2ed; } uVar1 = '\0'; } param_3[lVar5] = uVar1; } lVar5 = lVar5 + 1; uVar6 = uVar6 >> 1; if (lVar5 == 4) { return param_3; } } while( true ); }
5,535
ma_decrypt
eloqsql/storage/maria/ma_crypt.c
static int ma_decrypt(MARIA_SHARE *share, MARIA_CRYPT_DATA *crypt_data, const uchar *src, uchar *dst, uint size, uint pageno, LSN lsn, uint key_version) { int rc; uint32 dstlen= 0; /* Must be set because of error message */ rc= encryption_scheme_decrypt(src, size, dst, &dstlen, &crypt_data->scheme, key_version, crypt_data->space, pageno, lsn); DBUG_ASSERT(!my_assert_on_error || rc == MY_AES_OK); DBUG_ASSERT(!my_assert_on_error || dstlen == size); if (! (rc == MY_AES_OK && dstlen == size)) { my_errno= HA_ERR_DECRYPTION_FAILED; if (!share->silence_encryption_errors) my_printf_error(HA_ERR_DECRYPTION_FAILED, "failed to decrypt '%s' rc: %d dstlen: %u size: %u\n", MYF(ME_FATAL|ME_ERROR_LOG), share->open_file_name.str, rc, dstlen, size); return 1; } return 0; }
O0
c
ma_decrypt: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl 0x18(%rbp), %eax movq 0x10(%rbp), %rax movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movl %r8d, -0x2c(%rbp) movl %r9d, -0x30(%rbp) movl $0x0, -0x38(%rbp) movq -0x20(%rbp), %rdi movl -0x2c(%rbp), %esi movq -0x28(%rbp), %rdx movq -0x18(%rbp), %r8 movl 0x18(%rbp), %r9d movq -0x18(%rbp), %rax movl 0x60(%rax), %r11d movl -0x30(%rbp), %r10d movq 0x10(%rbp), %rax leaq -0x38(%rbp), %rcx movl %r11d, (%rsp) movl %r10d, 0x8(%rsp) movq %rax, 0x10(%rsp) callq 0x2b9a0 movl %eax, -0x34(%rbp) jmp 0x5f3fd jmp 0x5f3ff jmp 0x5f401 cmpl $0x0, -0x34(%rbp) jne 0x5f40f movl -0x38(%rbp), %eax cmpl -0x2c(%rbp), %eax je 0x5f461 callq 0xf60c0 movl $0xc0, (%rax) movq -0x10(%rbp), %rax cmpb $0x0, 0x7ec(%rax) jne 0x5f458 movq -0x10(%rbp), %rax movq 0x5e0(%rax), %rcx movl -0x34(%rbp), %r8d movl -0x38(%rbp), %r9d movl -0x2c(%rbp), %eax movl $0xc0, %edi leaq 0xf341b(%rip), %rsi # 0x152864 movl $0x1040, %edx # imm = 0x1040 movl %eax, (%rsp) movb $0x0, %al callq 0xefcc0 movl $0x1, -0x4(%rbp) jmp 0x5f468 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_decrypt: push rbp mov rbp, rsp sub rsp, 50h mov eax, [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_28], rcx mov [rbp+var_2C], r8d mov [rbp+var_30], r9d mov [rbp+var_38], 0 mov rdi, [rbp+var_20] mov esi, [rbp+var_2C] mov rdx, [rbp+var_28] mov r8, [rbp+var_18] mov r9d, [rbp+arg_8] mov rax, [rbp+var_18] mov r11d, [rax+60h] mov r10d, [rbp+var_30] mov rax, [rbp+arg_0] lea rcx, [rbp+var_38] mov [rsp+50h+var_50], r11d mov [rsp+50h+var_48], r10d mov [rsp+50h+var_40], rax call encryption_scheme_decrypt mov [rbp+var_34], eax jmp short $+2 loc_5F3FD: jmp short $+2 loc_5F3FF: jmp short $+2 loc_5F401: cmp [rbp+var_34], 0 jnz short loc_5F40F mov eax, [rbp+var_38] cmp eax, [rbp+var_2C] jz short loc_5F461 loc_5F40F: call _my_thread_var mov dword ptr [rax], 0C0h mov rax, [rbp+var_10] cmp byte ptr [rax+7ECh], 0 jnz short loc_5F458 mov rax, [rbp+var_10] mov rcx, [rax+5E0h] mov r8d, [rbp+var_34] mov r9d, [rbp+var_38] mov eax, [rbp+var_2C] mov edi, 0C0h lea rsi, aFailedToDecryp; "failed to decrypt '%s' rc: %d dstlen:"... mov edx, 1040h mov [rsp+50h+var_50], eax mov al, 0 call my_printf_error loc_5F458: mov [rbp+var_4], 1 jmp short loc_5F468 loc_5F461: mov [rbp+var_4], 0 loc_5F468: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long ma_decrypt(long long a1, long long a2, long long a3, long long a4, unsigned int a5, int a6, long long a7) { const char *v8; // rsi long long v9; // rdx long long v10; // rcx long long v11; // r8 long long v12; // r9 int v14; // [rsp+0h] [rbp-50h] int v16; // [rsp+1Ch] [rbp-34h] v8 = (const char *)a5; v14 = *(_DWORD *)(a2 + 96); v16 = encryption_scheme_decrypt(); if ( v16 || a5 ) { *(_DWORD *)my_thread_var(a3, v8, v9, v10, v11, v12, v14, a6, a7) = 192; if ( !*(_BYTE *)(a1 + 2028) ) my_printf_error( 192, (unsigned int)"failed to decrypt '%s' rc: %d dstlen: %u size: %u\n", 4160, *(_QWORD *)(a1 + 1504), v16, 0); return 1; } else { return 0; } }
ma_decrypt: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV EAX,dword 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 qword ptr [RBP + -0x28],RCX MOV dword ptr [RBP + -0x2c],R8D MOV dword ptr [RBP + -0x30],R9D MOV dword ptr [RBP + -0x38],0x0 MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x2c] MOV RDX,qword ptr [RBP + -0x28] MOV R8,qword ptr [RBP + -0x18] MOV R9D,dword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + -0x18] MOV R11D,dword ptr [RAX + 0x60] MOV R10D,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + 0x10] LEA RCX,[RBP + -0x38] MOV dword ptr [RSP],R11D MOV dword ptr [RSP + 0x8],R10D MOV qword ptr [RSP + 0x10],RAX CALL 0x0012b9a0 MOV dword ptr [RBP + -0x34],EAX JMP 0x0015f3fd LAB_0015f3fd: JMP 0x0015f3ff LAB_0015f3ff: JMP 0x0015f401 LAB_0015f401: CMP dword ptr [RBP + -0x34],0x0 JNZ 0x0015f40f MOV EAX,dword ptr [RBP + -0x38] CMP EAX,dword ptr [RBP + -0x2c] JZ 0x0015f461 LAB_0015f40f: CALL 0x001f60c0 MOV dword ptr [RAX],0xc0 MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x7ec],0x0 JNZ 0x0015f458 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x5e0] MOV R8D,dword ptr [RBP + -0x34] MOV R9D,dword ptr [RBP + -0x38] MOV EAX,dword ptr [RBP + -0x2c] MOV EDI,0xc0 LEA RSI,[0x252864] MOV EDX,0x1040 MOV dword ptr [RSP],EAX MOV AL,0x0 CALL 0x001efcc0 LAB_0015f458: MOV dword ptr [RBP + -0x4],0x1 JMP 0x0015f468 LAB_0015f461: MOV dword ptr [RBP + -0x4],0x0 LAB_0015f468: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 ma_decrypt(long param_1,long param_2,int8 param_3,int8 param_4,int param_5, int4 param_6,int8 param_7,int4 param_8) { int4 *puVar1; int local_40; int local_3c; int4 local_38; int local_34; int8 local_30; int8 local_28; long local_20; long local_18; int4 local_c; local_40 = 0; local_38 = param_6; local_34 = param_5; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; local_3c = encryption_scheme_decrypt (param_3,param_5,param_4,&local_40,param_2,param_8, *(int4 *)(param_2 + 0x60),param_6,param_7); if ((local_3c == 0) && (local_40 == local_34)) { local_c = 0; } else { puVar1 = (int4 *)_my_thread_var(); *puVar1 = 0xc0; if (*(char *)(local_18 + 0x7ec) == '\0') { my_printf_error(0xc0,"failed to decrypt \'%s\' rc: %d dstlen: %u size: %u\n",0x1040, *(int8 *)(local_18 + 0x5e0),local_3c,local_40,local_34); } local_c = 1; } return local_c; }
5,536
Ppu::DrawBgScanline(int, int)
sp1187[P]veesem/src/core/spg200/ppu.cc
void Ppu::DrawBgScanline(int bg_index, int screen_y) { const auto& bg = bg_data_[bg_index]; int virtual_y = screen_y; if (bg.ctrl.vcompress) { const int offset = sext<13>(vertical_compress_offset_) + 128 - 128 * static_cast<int>(vertical_compress_amount_) / 0x20; virtual_y = screen_y * static_cast<int>(vertical_compress_amount_) / 0x20 + offset; } if (virtual_y < 0 || virtual_y >= 240) return; const int tilemap_y = (virtual_y + bg.yscroll) & 0xff; const int scroll_x = (bg.xscroll + (bg.ctrl.hmovement ? line_scroll_[tilemap_y] : 0)) & 0x1ff; if (bg.ctrl.bitmap_mode) { const word_t addr_lo = bus_.ReadWord(bg.tile_map_ptr + tilemap_y); const word_t addr_hi = bus_.ReadWord(bg.attribute_map_ptr + tilemap_y / 2) >> word_t((tilemap_y & 1) ? 8 : 0); const addr_t addr = addr_lo | (addr_hi << 16); const int bits_per_pixel = bg.ctrl.hicolor_mode ? 16 : (bg.attr.color_mode + 1) * 2; for (int screen_x = -scroll_x; screen_x < 320; screen_x += 512) { DrawTileLine(screen_y, screen_x, addr, 512, bg.attr.palette, false, bits_per_pixel, bg.ctrl.blend); } return; } const int tile_width = 8 << bg.attr.hsize; const int tile_height = 8 << bg.attr.vsize; const int tilemap_ytile = tilemap_y / tile_height; const int tiles_per_row = 512 >> (bg.attr.hsize + 3); for (int screen_x = -(scroll_x % tile_width); screen_x < 320; screen_x += tile_width) { // one tile const int tilemap_x = (screen_x + scroll_x) & 0x1ff; const int tilemap_xtile = tilemap_x / tile_width; const int tilemap_tilepos = bg.ctrl.wallpaper_mode ? 0 : tiles_per_row * tilemap_ytile + tilemap_xtile; addr_t num_addr = bg.tile_map_ptr + tilemap_tilepos; word_t ch = bus_.ReadWord(num_addr); if (!ch) continue; int palette = bg.attr.palette; bool vflip = bg.attr.vflip; bool hflip = bg.attr.hflip; bool blend = bg.ctrl.blend; if (!bg.ctrl.register_mode) { addr_t attr_addr = bg.attribute_map_ptr + (tilemap_tilepos >> 1); word_t attr_word = bus_.ReadWord(attr_addr); TileAttribute attr{static_cast<word_t>(attr_word >> word_t((tilemap_tilepos & 1) ? 8 : 0))}; palette = attr.palette; vflip = attr.vflip; hflip = attr.hflip; blend = attr.blend; } const int tile_y = !vflip ? tilemap_y % tile_height : tile_height - (tilemap_y % tile_height) - 1; const int bits_per_pixel = (bg.attr.color_mode + 1) * 2; const addr_t addr = CalculateLineSegmentAddr(bg.segment_ptr, ch, tile_y, tile_width, tile_height, bits_per_pixel); DrawTileLine(screen_y, screen_x, addr, tile_width, palette, hflip, bits_per_pixel, blend); } }
O3
cpp
Ppu::DrawBgScanline(int, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %edx, %r12d movq %rdi, %r14 movslq %esi, %rcx leaq (%rcx,%rcx), %rax shlq $0x4, %rcx subq %rax, %rcx movzwl 0x2583a(%rdi,%rcx), %eax movl %edx, 0x8(%rsp) testb $0x40, %al je 0xfc06 movzwl 0x26058(%r14), %edx xorl $0x1000, %edx # imm = 0x1000 movzwl 0x26056(%r14), %esi leal (,%rsi,4), %edi subl %edi, %edx imull 0x8(%rsp), %esi leal 0x1f(%rsi), %edi testl %esi, %esi cmovnsl %esi, %edi sarl $0x5, %edi leal (%rdx,%rdi), %r12d addl $0xfffff080, %r12d # imm = 0xFFFFF080 cmpl $0xef, %r12d ja 0xfeab leaq (%r14,%rcx), %rbp addq $0x25834, %rbp # imm = 0x25834 movzwl 0x2(%rbp), %ecx addl %ecx, %r12d movzbl %r12b, %r15d movzwl (%rbp), %ecx xorl %edi, %edi testb $0x10, %al je 0xfc3f movl %r15d, %edx movzwl 0x2605a(%r14,%rdx,2), %edi addl %ecx, %edi movl %edi, %r13d andl $0x1ff, %r13d # imm = 0x1FF testb $0x1, %al jne 0xfdfc movzwl 0x4(%rbp), %eax movl %eax, %ecx shrl $0x4, %ecx andl $0x3, %ecx movl $0x8, %edx movl $0x8, %esi shll %cl, %esi movl %ecx, %r8d addl $0x3, %r8d movl %r8d, 0x10(%rsp) movq %rsi, 0x20(%rsp) leal -0x1(%rsi), %r12d andl %r13d, %r12d movl $0x40, %esi shrl %cl, %esi shrl $0x6, %eax andl $0x3, %eax leal 0x3(%rax), %ecx movl %r15d, %r8d movl %ecx, 0x18(%rsp) shrl %cl, %r8d movl %eax, %ecx shll %cl, %edx negl %r12d imull %esi, %r8d movl %r8d, 0x1c(%rsp) leal -0x1(%rdx), %eax andl %r15d, %eax movl %eax, 0xc(%rsp) notl %eax addl %edx, %eax movl %eax, 0x14(%rsp) movzwl 0x6(%rbp), %eax movq %rdi, %r15 leal (%rdi,%r12), %ebx andl $0x1ff, %ebx # imm = 0x1FF movl 0x10(%rsp), %ecx shrl %cl, %ebx addl 0x1c(%rsp), %ebx testb $0x4, %al movl $0x0, %eax cmovnel %eax, %ebx movzwl 0x8(%rbp), %esi addl %ebx, %esi movq 0x25808(%r14), %rdi movq (%rdi), %rax callq *0x10(%rax) testw %ax, %ax je 0xfde2 movl %eax, %r13d movzwl 0x6(%rbp), %eax testb $0x2, %al jne 0xfd52 movzwl 0xa(%rbp), %eax movl %ebx, %esi shrl %esi addl %eax, %esi movq 0x25808(%r14), %rdi movq (%rdi), %rax callq *0x10(%rax) movzwl %ax, %edi shll $0x3, %ebx andb $0x8, %bl movl %ebx, %ecx shrl %cl, %edi movl %edi, %r9d andl $0xf, %r9d movl %edi, %edx andl $0x10, %edx shrl $0x4, %edx movl %edi, %eax andl $0x40, %eax shrl $0x6, %eax movl 0xc(%rsp), %esi testb $0x20, %dil jne 0xfd78 jmp 0xfd7c shrl $0x8, %eax andl $0x1, %eax movzwl 0x4(%rbp), %ecx movl %ecx, %edx andl $0x4, %edx shrl $0x2, %edx movl %ecx, %r9d shrl $0x8, %r9d andl $0xf, %r9d movl 0xc(%rsp), %esi testb $0x8, %cl je 0xfd7c movl 0x14(%rsp), %esi movzwl 0x4(%rbp), %edi andl $0x3, %edi movzwl %r13w, %r8d movl 0x18(%rsp), %ecx shll %cl, %r8d leal 0x2(,%rdi,2), %r10d movzwl 0xc(%rbp), %edi addl %esi, %r8d movl %r10d, %esi movl 0x10(%rsp), %ecx shll %cl, %esi shll $0x6, %edi imull %r8d, %esi leal 0xf(%rsi), %ecx testl %esi, %esi cmovnsl %esi, %ecx sarl $0x4, %ecx addl %edi, %ecx subq $0x8, %rsp movzbl %al, %eax movzbl %dl, %r11d movq %r14, %rdi movl 0x10(%rsp), %esi movl %r12d, %edx movq 0x28(%rsp), %r8 pushq %rax pushq %r10 pushq %r11 callq 0xffc8 addq $0x20, %rsp addl 0x20(%rsp), %r12d cmpl $0x140, %r12d # imm = 0x140 movq %r15, %rdi jl 0xfcbf jmp 0xfeab movq 0x25808(%r14), %rdi movzwl 0x8(%rbp), %esi addl %r15d, %esi movq (%rdi), %rax callq *0x10(%rax) movl %eax, %ebx movq 0x25808(%r14), %rdi movzwl 0xa(%rbp), %eax shrl %r15d addl %eax, %r15d movq (%rdi), %rax movl %r15d, %esi callq *0x10(%rax) movzwl %ax, %r15d shll $0x3, %r12d andb $0x8, %r12b movl %r12d, %ecx shrl %cl, %r15d movzwl %bx, %eax shll $0x10, %r15d movl $0x10, %ebx testb $-0x80, 0x6(%rbp) jne 0xfe5e movzwl 0x4(%rbp), %ecx andl $0x3, %ecx leal 0x2(,%rcx,2), %ebx orl %eax, %r15d negl %r13d movzbl 0x5(%rbp), %r9d andl $0xf, %r9d movzbl 0x7(%rbp), %eax andl $0x1, %eax subq $0x8, %rsp movq %r14, %rdi movl 0x10(%rsp), %esi movl %r13d, %edx movl %r15d, %ecx movl $0x200, %r8d # imm = 0x200 pushq %rax pushq %rbx pushq $0x0 callq 0xffc8 addq $0x20, %rsp leal 0x200(%r13), %eax cmpl $0xffffff40, %r13d # imm = 0xFFFFFF40 movl %eax, %r13d jl 0xfe64 addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN3Ppu14DrawBgScanlineEii: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r12d, edx mov r14, rdi movsxd rcx, esi lea rax, [rcx+rcx] shl rcx, 4 sub rcx, rax movzx eax, word ptr [rdi+rcx+2583Ah] mov [rsp+58h+var_50], edx test al, 40h jz short loc_FC06 movzx edx, word ptr ds:loc_26058[r14] xor edx, 1000h movzx esi, word ptr ds:loc_26056[r14] lea edi, ds:0[rsi*4] sub edx, edi imul esi, [rsp+58h+var_50] lea edi, [rsi+1Fh] test esi, esi cmovns edi, esi sar edi, 5 lea r12d, [rdx+rdi] add r12d, 0FFFFF080h loc_FC06: cmp r12d, 0EFh ja loc_FEAB lea rbp, [r14+rcx] add rbp, 25834h movzx ecx, word ptr [rbp+2] add r12d, ecx movzx r15d, r12b movzx ecx, word ptr [rbp+0] xor edi, edi test al, 10h jz short loc_FC3F mov edx, r15d movzx edi, word ptr ds:_ZL31ImGui_ImplSDL2_SetClipboardTextP12ImGuiContextPKc[r14+rdx*2]; ImGui_ImplSDL2_SetClipboardText(ImGuiContext *,char const*) loc_FC3F: add edi, ecx mov r13d, edi and r13d, 1FFh test al, 1 jnz loc_FDFC movzx eax, word ptr [rbp+4] mov ecx, eax shr ecx, 4 and ecx, 3 mov edx, 8 mov esi, 8 shl esi, cl mov r8d, ecx add r8d, 3 mov [rsp+58h+var_48], r8d mov qword ptr [rsp+58h+var_38], rsi lea r12d, [rsi-1] and r12d, r13d mov esi, 40h ; '@' shr esi, cl shr eax, 6 and eax, 3 lea ecx, [rax+3] mov r8d, r15d mov [rsp+58h+var_40], ecx shr r8d, cl mov ecx, eax shl edx, cl neg r12d imul r8d, esi mov [rsp+58h+var_3C], r8d lea eax, [rdx-1] and eax, r15d mov [rsp+58h+var_4C], eax not eax add eax, edx mov [rsp+58h+var_44], eax loc_FCBF: movzx eax, word ptr [rbp+6] mov r15, rdi lea ebx, [rdi+r12] and ebx, 1FFh mov ecx, [rsp+58h+var_48] shr ebx, cl add ebx, [rsp+58h+var_3C] test al, 4 mov eax, 0 cmovnz ebx, eax movzx esi, word ptr [rbp+8] add esi, ebx mov rdi, [r14+25808h] mov rax, [rdi] call qword ptr [rax+10h] test ax, ax jz loc_FDE2 mov r13d, eax movzx eax, word ptr [rbp+6] test al, 2 jnz short loc_FD52 movzx eax, word ptr [rbp+0Ah] mov esi, ebx shr esi, 1 add esi, eax mov rdi, [r14+25808h] mov rax, [rdi] call qword ptr [rax+10h] movzx edi, ax shl ebx, 3 and bl, 8 mov ecx, ebx shr edi, cl mov r9d, edi and r9d, 0Fh mov edx, edi and edx, 10h shr edx, 4 mov eax, edi and eax, 40h shr eax, 6 mov esi, [rsp+58h+var_4C] test dil, 20h jnz short loc_FD78 jmp short loc_FD7C loc_FD52: shr eax, 8 and eax, 1 movzx ecx, word ptr [rbp+4] mov edx, ecx and edx, 4 shr edx, 2 mov r9d, ecx shr r9d, 8 and r9d, 0Fh; unsigned int mov esi, [rsp+58h+var_4C] test cl, 8 jz short loc_FD7C loc_FD78: mov esi, [rsp+58h+var_44] loc_FD7C: movzx edi, word ptr [rbp+4] and edi, 3 movzx r8d, r13w mov ecx, [rsp+58h+var_40] shl r8d, cl lea r10d, ds:2[rdi*2] movzx edi, word ptr [rbp+0Ch] add r8d, esi mov esi, r10d mov ecx, [rsp+58h+var_48] shl esi, cl shl edi, 6 imul esi, r8d lea ecx, [rsi+0Fh] test esi, esi cmovns ecx, esi sar ecx, 4 add ecx, edi; unsigned int sub rsp, 8 movzx eax, al movzx r11d, dl mov rdi, r14; this mov esi, [rsp+60h+var_50]; int mov edx, r12d; int mov r8, qword ptr [rsp+60h+var_38]; int push rax; bool push r10; unsigned int push r11; bool call _ZN3Ppu12DrawTileLineEiijijbjb; Ppu::DrawTileLine(int,int,uint,int,uint,bool,uint,bool) add rsp, 20h loc_FDE2: add r12d, [rsp+58h+var_38] cmp r12d, 140h mov rdi, r15 jl loc_FCBF jmp loc_FEAB loc_FDFC: mov rdi, [r14+25808h] movzx esi, word ptr [rbp+8] add esi, r15d mov rax, [rdi] call qword ptr [rax+10h] mov ebx, eax mov rdi, [r14+25808h] movzx eax, word ptr [rbp+0Ah] shr r15d, 1 add r15d, eax mov rax, [rdi] mov esi, r15d call qword ptr [rax+10h] movzx r15d, ax shl r12d, 3 and r12b, 8 mov ecx, r12d shr r15d, cl movzx eax, bx shl r15d, 10h mov ebx, 10h test byte ptr [rbp+6], 80h jnz short loc_FE5E movzx ecx, word ptr [rbp+4] and ecx, 3 lea ebx, ds:2[rcx*2] loc_FE5E: or r15d, eax neg r13d loc_FE64: movzx r9d, byte ptr [rbp+5] and r9d, 0Fh; unsigned int movzx eax, byte ptr [rbp+7] and eax, 1 sub rsp, 8 mov rdi, r14; this mov esi, [rsp+60h+var_50]; int mov edx, r13d; int mov ecx, r15d; unsigned int mov r8d, 200h; int push rax; bool push rbx; unsigned int push 0; bool call _ZN3Ppu12DrawTileLineEiijijbjb; Ppu::DrawTileLine(int,int,uint,int,uint,bool,uint,bool) add rsp, 20h lea eax, [r13+200h] cmp r13d, 0FFFFFF40h mov r13d, eax jl short loc_FE64 loc_FEAB: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long Ppu::DrawBgScanline(Ppu *this, int a2, int a3) { unsigned int v3; // r12d long long v5; // rcx long long result; // rax char *v7; // rbp __int16 v8; // r12 unsigned int v9; // r15d int v10; // edi long long v11; // rdi int v12; // r13d int v13; // ecx char v14; // al int v15; // r12d long long v16; // r15 unsigned int v17; // ebx unsigned __int16 v18; // r13 unsigned int v19; // eax int v20; // edi unsigned int v21; // r9d int v22; // edx int v23; // eax int v24; // esi unsigned __int16 v25; // bx int v26; // r15d int v27; // eax int v28; // r15d unsigned int v29; // ebx unsigned int v30; // r15d int v31; // r13d bool v32; // cc int v34; // [rsp+Ch] [rbp-4Ch] char v35; // [rsp+10h] [rbp-48h] int v36; // [rsp+14h] [rbp-44h] char v37; // [rsp+18h] [rbp-40h] unsigned int v38; // [rsp+1Ch] [rbp-3Ch] int v39; // [rsp+20h] [rbp-38h] v3 = a3; v5 = 14LL * a2; result = *(unsigned __int16 *)((char *)this + v5 + 153658); if ( (result & 0x40) != 0 ) v3 = (*(unsigned __int16 *)((char *)&loc_26058 + (_QWORD)this) ^ 0x1000) - 4 * *(unsigned __int16 *)((char *)&loc_26056 + (_QWORD)this) + a3 * *(unsigned __int16 *)((char *)&loc_26056 + (_QWORD)this) / 32 - 3968; if ( v3 <= 0xEF ) { v7 = (char *)this + v5 + 153652; v8 = *(_WORD *)((char *)this + v5 + 153654) + v3; v9 = (unsigned __int8)v8; v10 = 0; if ( (result & 0x10) != 0 ) v10 = *(unsigned __int16 *)((char *)ImGui_ImplSDL2_SetClipboardText + (_QWORD)this + 2 * (unsigned __int8)v8); v11 = (unsigned int)*(unsigned __int16 *)v7 + v10; v12 = v11 & 0x1FF; if ( (result & 1) == 0 ) { v13 = (*((unsigned __int16 *)v7 + 2) >> 4) & 3; v35 = v13 + 3; v39 = 8 << v13; v14 = (unsigned __int8)*((_WORD *)v7 + 2) >> 6; v37 = v14 + 3; v15 = -(v12 & ((8 << v13) - 1)); v38 = (0x40u >> v13) * (v9 >> (v14 + 3)); v34 = v9 & ((8 << v14) - 1); v36 = (8 << v14) + ~v34; while ( 1 ) { v16 = v11; v17 = v38 + ((unsigned __int16)((v11 + v15) & 0x1FF) >> v35); if ( (*((_WORD *)v7 + 3) & 4) != 0 ) v17 = 0; result = (*(long long ( **)(_QWORD, _QWORD))(**((_QWORD **)this + 19201) + 16LL))( *((_QWORD *)this + 19201), v17 + *((unsigned __int16 *)v7 + 4)); if ( !(_WORD)result ) goto LABEL_17; v18 = result; v19 = *((unsigned __int16 *)v7 + 3); if ( (v19 & 2) == 0 ) break; v23 = (v19 >> 8) & 1; v22 = (unsigned __int8)(*((_WORD *)v7 + 2) & 4) >> 2; v21 = HIBYTE(*((unsigned __int16 *)v7 + 2)) & 0xF; v24 = v34; if ( (*((_WORD *)v7 + 2) & 8) != 0 ) goto LABEL_15; LABEL_16: result = Ppu::DrawTileLine( this, a3, v15, (*((unsigned __int16 *)v7 + 6) << 6) + (v24 + (v18 << v37)) * ((2 * (*((_WORD *)v7 + 2) & 3) + 2) << v35) / 16, v39, v21, v22, 2 * (*((unsigned __int16 *)v7 + 2) & 3u) + 2, v23); LABEL_17: v15 += v39; v11 = v16; if ( v15 >= 320 ) return result; } v20 = (*(unsigned __int16 ( **)(_QWORD, _QWORD))(**((_QWORD **)this + 19201) + 16LL))( *((_QWORD *)this + 19201), *((unsigned __int16 *)v7 + 5) + (v17 >> 1)) >> ((8 * v17) & 8); v21 = v20 & 0xF; v22 = (unsigned __int8)(v20 & 0x10) >> 4; v23 = (unsigned __int8)(v20 & 0x40) >> 6; v24 = v34; if ( (v20 & 0x20) == 0 ) goto LABEL_16; LABEL_15: v24 = v36; goto LABEL_16; } v25 = (*(long long ( **)(_QWORD, _QWORD))(**((_QWORD **)this + 19201) + 16LL))( *((_QWORD *)this + 19201), (unsigned __int8)v8 + (unsigned int)*((unsigned __int16 *)v7 + 4)); v26 = (*(unsigned __int16 ( **)(_QWORD, _QWORD))(**((_QWORD **)this + 19201) + 16LL))( *((_QWORD *)this + 19201), *((unsigned __int16 *)v7 + 5) + ((unsigned __int8)v8 >> 1)) >> ((8 * v8) & 8); v27 = v25; v28 = v26 << 16; v29 = 16; if ( v7[6] >= 0 ) v29 = 2 * (*((_WORD *)v7 + 2) & 3) + 2; v30 = v27 | v28; v31 = -v12; do { Ppu::DrawTileLine(this, a3, v31, v30, 512, v7[5] & 0xF, 0, v29, v7[7] & 1); result = (unsigned int)(v31 + 512); v32 = v31 < -192; v31 += 512; } while ( v32 ); } return result; }
DrawBgScanline: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R12D,EDX MOV R14,RDI MOVSXD RCX,ESI LEA RAX,[RCX + RCX*0x1] SHL RCX,0x4 SUB RCX,RAX MOVZX EAX,word ptr [RDI + RCX*0x1 + 0x2583a] MOV dword ptr [RSP + 0x8],EDX TEST AL,0x40 JZ 0x0010fc06 MOVZX EDX,word ptr [R14 + 0x26058] XOR EDX,0x1000 MOVZX ESI,word ptr [R14 + 0x26056] LEA EDI,[RSI*0x4] SUB EDX,EDI IMUL ESI,dword ptr [RSP + 0x8] LEA EDI,[RSI + 0x1f] TEST ESI,ESI CMOVNS EDI,ESI SAR EDI,0x5 LEA R12D,[RDX + RDI*0x1] ADD R12D,0xfffff080 LAB_0010fc06: CMP R12D,0xef JA 0x0010feab LEA RBP,[R14 + RCX*0x1] ADD RBP,0x25834 MOVZX ECX,word ptr [RBP + 0x2] ADD R12D,ECX MOVZX R15D,R12B MOVZX ECX,word ptr [RBP] XOR EDI,EDI TEST AL,0x10 JZ 0x0010fc3f MOV EDX,R15D MOVZX EDI,word ptr [R14 + RDX*0x2 + 0x2605a] LAB_0010fc3f: ADD EDI,ECX MOV R13D,EDI AND R13D,0x1ff TEST AL,0x1 JNZ 0x0010fdfc MOVZX EAX,word ptr [RBP + 0x4] MOV ECX,EAX SHR ECX,0x4 AND ECX,0x3 MOV EDX,0x8 MOV ESI,0x8 SHL ESI,CL MOV R8D,ECX ADD R8D,0x3 MOV dword ptr [RSP + 0x10],R8D MOV qword ptr [RSP + 0x20],RSI LEA R12D,[RSI + -0x1] AND R12D,R13D MOV ESI,0x40 SHR ESI,CL SHR EAX,0x6 AND EAX,0x3 LEA ECX,[RAX + 0x3] MOV R8D,R15D MOV dword ptr [RSP + 0x18],ECX SHR R8D,CL MOV ECX,EAX SHL EDX,CL NEG R12D IMUL R8D,ESI MOV dword ptr [RSP + 0x1c],R8D LEA EAX,[RDX + -0x1] AND EAX,R15D MOV dword ptr [RSP + 0xc],EAX NOT EAX ADD EAX,EDX MOV dword ptr [RSP + 0x14],EAX LAB_0010fcbf: MOVZX EAX,word ptr [RBP + 0x6] MOV R15,RDI LEA EBX,[RDI + R12*0x1] AND EBX,0x1ff MOV ECX,dword ptr [RSP + 0x10] SHR EBX,CL ADD EBX,dword ptr [RSP + 0x1c] TEST AL,0x4 MOV EAX,0x0 CMOVNZ EBX,EAX MOVZX ESI,word ptr [RBP + 0x8] ADD ESI,EBX MOV RDI,qword ptr [R14 + 0x25808] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x10] TEST AX,AX JZ 0x0010fde2 MOV R13D,EAX MOVZX EAX,word ptr [RBP + 0x6] TEST AL,0x2 JNZ 0x0010fd52 MOVZX EAX,word ptr [RBP + 0xa] MOV ESI,EBX SHR ESI,0x1 ADD ESI,EAX MOV RDI,qword ptr [R14 + 0x25808] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x10] MOVZX EDI,AX SHL EBX,0x3 AND BL,0x8 MOV ECX,EBX SHR EDI,CL MOV R9D,EDI AND R9D,0xf MOV EDX,EDI AND EDX,0x10 SHR EDX,0x4 MOV EAX,EDI AND EAX,0x40 SHR EAX,0x6 MOV ESI,dword ptr [RSP + 0xc] TEST DIL,0x20 JNZ 0x0010fd78 JMP 0x0010fd7c LAB_0010fd52: SHR EAX,0x8 AND EAX,0x1 MOVZX ECX,word ptr [RBP + 0x4] MOV EDX,ECX AND EDX,0x4 SHR EDX,0x2 MOV R9D,ECX SHR R9D,0x8 AND R9D,0xf MOV ESI,dword ptr [RSP + 0xc] TEST CL,0x8 JZ 0x0010fd7c LAB_0010fd78: MOV ESI,dword ptr [RSP + 0x14] LAB_0010fd7c: MOVZX EDI,word ptr [RBP + 0x4] AND EDI,0x3 MOVZX R8D,R13W MOV ECX,dword ptr [RSP + 0x18] SHL R8D,CL LEA R10D,[0x2 + RDI*0x2] MOVZX EDI,word ptr [RBP + 0xc] ADD R8D,ESI MOV ESI,R10D MOV ECX,dword ptr [RSP + 0x10] SHL ESI,CL SHL EDI,0x6 IMUL ESI,R8D LEA ECX,[RSI + 0xf] TEST ESI,ESI CMOVNS ECX,ESI SAR ECX,0x4 ADD ECX,EDI SUB RSP,0x8 MOVZX EAX,AL MOVZX R11D,DL MOV RDI,R14 MOV ESI,dword ptr [RSP + 0x10] MOV EDX,R12D MOV R8,qword ptr [RSP + 0x28] PUSH RAX PUSH R10 PUSH R11 CALL 0x0010ffc8 ADD RSP,0x20 LAB_0010fde2: ADD R12D,dword ptr [RSP + 0x20] CMP R12D,0x140 MOV RDI,R15 JL 0x0010fcbf JMP 0x0010feab LAB_0010fdfc: MOV RDI,qword ptr [R14 + 0x25808] MOVZX ESI,word ptr [RBP + 0x8] ADD ESI,R15D MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x10] MOV EBX,EAX MOV RDI,qword ptr [R14 + 0x25808] MOVZX EAX,word ptr [RBP + 0xa] SHR R15D,0x1 ADD R15D,EAX MOV RAX,qword ptr [RDI] MOV ESI,R15D CALL qword ptr [RAX + 0x10] MOVZX R15D,AX SHL R12D,0x3 AND R12B,0x8 MOV ECX,R12D SHR R15D,CL MOVZX EAX,BX SHL R15D,0x10 MOV EBX,0x10 TEST byte ptr [RBP + 0x6],0x80 JNZ 0x0010fe5e MOVZX ECX,word ptr [RBP + 0x4] AND ECX,0x3 LEA EBX,[0x2 + RCX*0x2] LAB_0010fe5e: OR R15D,EAX NEG R13D LAB_0010fe64: MOVZX R9D,byte ptr [RBP + 0x5] AND R9D,0xf MOVZX EAX,byte ptr [RBP + 0x7] AND EAX,0x1 SUB RSP,0x8 MOV RDI,R14 MOV ESI,dword ptr [RSP + 0x10] MOV EDX,R13D MOV ECX,R15D MOV R8D,0x200 PUSH RAX PUSH RBX PUSH 0x0 CALL 0x0010ffc8 ADD RSP,0x20 LEA EAX,[R13 + 0x200] CMP R13D,0xffffff40 MOV R13D,EAX JL 0x0010fe64 LAB_0010feab: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* Ppu::DrawBgScanline(int, int) */ void __thiscall Ppu::DrawBgScanline(Ppu *this,int param_1,int param_2) { ushort uVar1; bool bVar2; long lVar3; byte bVar4; ushort uVar5; ushort uVar6; uint uVar7; byte bVar8; sbyte sVar9; int iVar10; int iVar11; uint uVar12; char cVar13; int iVar14; uint uVar15; uint uVar16; int iVar17; uint uVar18; uint uVar19; uint uVar20; lVar3 = (long)param_1 * 0xe; uVar5 = *(ushort *)(this + lVar3 + 0x2583a); uVar18 = param_2; if ((uVar5 & 0x40) != 0) { iVar14 = (uint)*(ushort *)(this + 0x26056) * param_2; iVar11 = iVar14 + 0x1f; if (-1 < iVar14) { iVar11 = iVar14; } uVar18 = ((*(ushort *)(this + 0x26058) ^ 0x1000) + (uint)*(ushort *)(this + 0x26056) * -4 + (iVar11 >> 5)) - 0xf80; } if (uVar18 < 0xf0) { uVar6 = *(ushort *)(this + lVar3 + 0x25836); uVar20 = uVar18 + uVar6 & 0xff; uVar1 = *(ushort *)(this + lVar3 + 0x25834); uVar7 = 0; if ((uVar5 & 0x10) != 0) { uVar7 = (uint)*(ushort *)(this + (ulong)uVar20 * 2 + 0x2605a); } uVar19 = uVar7 + uVar1 & 0x1ff; if ((uVar5 & 1) == 0) { bVar8 = (byte)(*(ushort *)(this + lVar3 + 0x25838) >> 4) & 3; uVar15 = 8 << bVar8; bVar4 = (byte)(*(ushort *)(this + lVar3 + 0x25838) >> 6) & 3; sVar9 = bVar4 + 3; iVar11 = 8 << bVar4; uVar19 = -(uVar15 - 1 & uVar19); uVar18 = iVar11 - 1U & uVar20; do { uVar12 = ((uVar7 + uVar1 + uVar19 & 0x1ff) >> bVar8 + 3) + (uVar20 >> sVar9) * (0x40U >> bVar8); if ((*(ushort *)(this + lVar3 + 0x2583a) & 4) != 0) { uVar12 = 0; } uVar5 = (**(code **)(**(long **)(this + 0x25808) + 0x10)) (*(long **)(this + 0x25808),*(ushort *)(this + lVar3 + 0x2583c) + uVar12); if (uVar5 != 0) { if ((*(ushort *)(this + lVar3 + 0x2583a) & 2) == 0) { uVar6 = (**(code **)(**(long **)(this + 0x25808) + 0x10)) (*(long **)(this + 0x25808), (uVar12 >> 1) + (uint)*(ushort *)(this + lVar3 + 0x2583e)); uVar6 = uVar6 >> ((byte)(uVar12 << 3) & 8); bVar4 = (byte)uVar6; uVar12 = (uVar6 & 0x10) >> 4; uVar6 = uVar6 & 0x20; } else { uVar6 = *(ushort *)(this + lVar3 + 0x25838); uVar12 = (uVar6 & 4) >> 2; bVar4 = (byte)(uVar6 >> 8); uVar6 = uVar6 & 8; } uVar16 = uVar18; if (uVar6 != 0) { uVar16 = ~uVar18 + iVar11; } iVar14 = (*(ushort *)(this + lVar3 + 0x25838) & 3) * 2 + 2; iVar17 = (iVar14 << bVar8 + 3) * (((uint)uVar5 << sVar9) + uVar16); iVar10 = iVar17 + 0xf; if (-1 < iVar17) { iVar10 = iVar17; } DrawTileLine((int)this,param_2,uVar19, (iVar10 >> 4) + (uint)*(ushort *)(this + lVar3 + 0x25840) * 0x40,uVar15, (bool)(bVar4 & 0xf),uVar12,SUB41(iVar14,0)); } uVar19 = uVar19 + uVar15; } while ((int)uVar19 < 0x140); } else { uVar7 = (**(code **)(**(long **)(this + 0x25808) + 0x10)) (*(long **)(this + 0x25808),*(ushort *)(this + lVar3 + 0x2583c) + uVar20); uVar5 = (**(code **)(**(long **)(this + 0x25808) + 0x10)) (*(long **)(this + 0x25808), (uVar20 >> 1) + (uint)*(ushort *)(this + lVar3 + 0x2583e)); cVar13 = 0x10; if (((byte)this[lVar3 + 0x2583a] & 0x80) == 0) { cVar13 = ((byte)*(int2 *)(this + lVar3 + 0x25838) & 3) * '\x02' + '\x02'; } uVar20 = -uVar19; do { DrawTileLine((int)this,param_2,uVar20, (uint)(uVar5 >> ((char)(uVar18 + uVar6) * '\b' & 8U)) << 0x10 | uVar7 & 0xffff, 0x200,(bool)((byte)this[lVar3 + 0x25839] & 0xf),0,(bool)cVar13); bVar2 = (int)uVar20 < -0xc0; uVar20 = uVar20 + 0x200; } while (bVar2); } } return; }
5,537
my_thread_destory_thr_mutex
eloqsql/mysys/my_thr_init.c
static void my_thread_destory_thr_mutex(struct st_my_thread_var *var) { mysql_mutex_destroy(&var->mutex); mysql_cond_destroy(&var->suspend); }
O3
c
my_thread_destory_thr_mutex: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx leaq 0x40(%rdi), %r14 movq 0x80(%rdi), %rdi testq %rdi, %rdi je 0xa1a4b leaq 0x2e45d6(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x48(%rax) movq $0x0, 0x80(%rbx) movq %r14, %rdi callq 0x290c0 movq 0x38(%rbx), %rdi testq %rdi, %rdi jne 0xa1a6c addq $0x8, %rbx movq %rbx, %rdi popq %rbx popq %r14 popq %rbp jmp 0x29280 leaq 0x2e459d(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x68(%rax) movq $0x0, 0x38(%rbx) jmp 0xa1a5c
my_thread_destory_thr_mutex: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi lea r14, [rdi+40h] mov rdi, [rdi+80h] test rdi, rdi jz short loc_A1A4B lea rax, PSI_server mov rax, [rax] call qword ptr [rax+48h] mov qword ptr [rbx+80h], 0 loc_A1A4B: mov rdi, r14 call _pthread_mutex_destroy mov rdi, [rbx+38h] test rdi, rdi jnz short loc_A1A6C loc_A1A5C: add rbx, 8 mov rdi, rbx pop rbx pop r14 pop rbp jmp _pthread_cond_destroy loc_A1A6C: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+68h] mov qword ptr [rbx+38h], 0 jmp short loc_A1A5C
long long my_thread_destory_thr_mutex(long long a1) { if ( *(_QWORD *)(a1 + 128) ) { PSI_server[9](); *(_QWORD *)(a1 + 128) = 0LL; } pthread_mutex_destroy(a1 + 64); if ( *(_QWORD *)(a1 + 56) ) { PSI_server[13](); *(_QWORD *)(a1 + 56) = 0LL; } return pthread_cond_destroy(a1 + 8); }
my_thread_destory_thr_mutex: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI LEA R14,[RDI + 0x40] MOV RDI,qword ptr [RDI + 0x80] TEST RDI,RDI JZ 0x001a1a4b LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0x80],0x0 LAB_001a1a4b: MOV RDI,R14 CALL 0x001290c0 MOV RDI,qword ptr [RBX + 0x38] TEST RDI,RDI JNZ 0x001a1a6c LAB_001a1a5c: ADD RBX,0x8 MOV RDI,RBX POP RBX POP R14 POP RBP JMP 0x00129280 LAB_001a1a6c: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x68] MOV qword ptr [RBX + 0x38],0x0 JMP 0x001a1a5c
void my_thread_destory_thr_mutex(long param_1) { if (*(long *)(param_1 + 0x80) != 0) { (**(code **)(PSI_server + 0x48))(); *(int8 *)(param_1 + 0x80) = 0; } pthread_mutex_destroy((pthread_mutex_t *)(param_1 + 0x40)); if (*(long *)(param_1 + 0x38) != 0) { (**(code **)(PSI_server + 0x68))(); *(int8 *)(param_1 + 0x38) = 0; } pthread_cond_destroy((pthread_cond_t *)(param_1 + 8)); return; }
5,538
lf_dynarray_lvalue
eloqsql/mysys/lf_dynarray.c
void *lf_dynarray_lvalue(LF_DYNARRAY *array, uint idx) { void * ptr, * volatile * ptr_ptr= 0; int i; for (i= LF_DYNARRAY_LEVELS-1; idx < dynarray_idxes_in_prev_levels[i]; i--) /* no-op */; ptr_ptr= &array->level[i]; idx-= dynarray_idxes_in_prev_levels[i]; for (; i > 0; i--) { if (!(ptr= *ptr_ptr)) { void *alloc= my_malloc(key_memory_lf_dynarray, LF_DYNARRAY_LEVEL_LENGTH * sizeof(void *), MYF(MY_WME|MY_ZEROFILL)); if (unlikely(!alloc)) return(NULL); if (my_atomic_casptr(ptr_ptr, &ptr, alloc)) ptr= alloc; else my_free(alloc); } ptr_ptr= ((void **)ptr) + idx / dynarray_idxes_in_prev_level[i]; idx%= dynarray_idxes_in_prev_level[i]; } if (!(ptr= *ptr_ptr)) { uchar *alloc, *data; alloc= my_malloc(key_memory_lf_dynarray, LF_DYNARRAY_LEVEL_LENGTH * array->size_of_element + MY_MAX(array->size_of_element, sizeof(void *)), MYF(MY_WME|MY_ZEROFILL)); if (unlikely(!alloc)) return(NULL); /* reserve the space for free() address */ data= alloc + sizeof(void *); { /* alignment */ intptr mod= ((intptr)data) % array->size_of_element; if (mod) data+= array->size_of_element - mod; } ((void **)data)[-1]= alloc; /* free() will need the original pointer */ if (my_atomic_casptr(ptr_ptr, &ptr, data)) ptr= data; else my_free(alloc); } return ((uchar*)ptr) + array->size_of_element * idx; }
O0
c
lf_dynarray_lvalue: pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq $0x0, -0x28(%rbp) movl $0x3, -0x2c(%rbp) movl -0x14(%rbp), %eax movslq -0x2c(%rbp), %rdx leaq 0x57ff1(%rip), %rcx # 0xb3ff0 cmpq (%rcx,%rdx,8), %rax jae 0x5c012 jmp 0x5c007 movl -0x2c(%rbp), %eax addl $-0x1, %eax movl %eax, -0x2c(%rbp) jmp 0x5bff1 movq -0x10(%rbp), %rax movslq -0x2c(%rbp), %rcx shlq $0x3, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movslq -0x2c(%rbp), %rcx leaq 0x57fc0(%rip), %rax # 0xb3ff0 movq (%rax,%rcx,8), %rcx movl -0x14(%rbp), %eax subq %rcx, %rax movl %eax, -0x14(%rbp) cmpl $0x0, -0x2c(%rbp) jle 0x5c15a movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x5c0fc leaq 0x3b2bd9(%rip), %rax # 0x40ec3c movl (%rax), %edi movl $0x800, %esi # imm = 0x800 movl $0x30, %edx callq 0x58c40 movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%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 0x5c0a7 movq $0x0, -0x8(%rbp) jmp 0x5c2cf movq -0x28(%rbp), %rcx movq -0x38(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x20(%rbp), %rax movq -0x40(%rbp), %rdx lock cmpxchgq %rdx, (%rcx) movq %rax, %rcx sete %al movb %al, -0x79(%rbp) movq %rcx, -0x78(%rbp) testb $0x1, %al jne 0x5c0d9 movq -0x78(%rbp), %rax movq %rax, -0x20(%rbp) movb -0x79(%rbp), %al andb $0x1, %al movb %al, -0x41(%rbp) testb $0x1, -0x41(%rbp) je 0x5c0f1 movq -0x38(%rbp), %rax movq %rax, -0x20(%rbp) jmp 0x5c0fa movq -0x38(%rbp), %rdi callq 0x58fc0 jmp 0x5c0fc movq -0x20(%rbp), %rax movq %rax, -0x88(%rbp) movl -0x14(%rbp), %eax movslq -0x2c(%rbp), %rsi leaq 0x57efb(%rip), %rcx # 0xb4010 xorl %edx, %edx divq (%rcx,%rsi,8) movq %rax, %rcx movq -0x88(%rbp), %rax shlq $0x3, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movslq -0x2c(%rbp), %rcx leaq 0x57ed5(%rip), %rax # 0xb4010 movq (%rax,%rcx,8), %rcx movl -0x14(%rbp), %eax xorl %edx, %edx divq %rcx movl %edx, %eax movl %eax, -0x14(%rbp) movl -0x2c(%rbp), %eax addl $-0x1, %eax movl %eax, -0x2c(%rbp) jmp 0x5c03d movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x5c2b7 leaq 0x3b2ac6(%rip), %rax # 0x40ec3c movl (%rax), %eax movl %eax, -0x94(%rbp) movq -0x10(%rbp), %rax movl 0x20(%rax), %eax shll $0x8, %eax movl %eax, %eax movq %rax, -0x90(%rbp) movq -0x10(%rbp), %rax movl 0x20(%rax), %eax cmpq $0x8, %rax jbe 0x5c1ae movq -0x10(%rbp), %rax movl 0x20(%rax), %eax movq %rax, -0xa0(%rbp) jmp 0x5c1bc movl $0x8, %eax movq %rax, -0xa0(%rbp) jmp 0x5c1bc movl -0x94(%rbp), %edi movq -0x90(%rbp), %rsi movq -0xa0(%rbp), %rax addq %rax, %rsi movl $0x30, %edx callq 0x58c40 movq %rax, -0x50(%rbp) cmpq $0x0, -0x50(%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 0x5c210 movq $0x0, -0x8(%rbp) jmp 0x5c2cf movq -0x50(%rbp), %rax addq $0x8, %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x20(%rcx), %ecx xorl %edx, %edx divq %rcx movq %rdx, -0x60(%rbp) cmpq $0x0, -0x60(%rbp) je 0x5c24a movq -0x10(%rbp), %rax movl 0x20(%rax), %eax subq -0x60(%rbp), %rax addq -0x58(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x50(%rbp), %rcx movq -0x58(%rbp), %rax movq %rcx, -0x8(%rax) movq -0x28(%rbp), %rcx movq -0x58(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x20(%rbp), %rax movq -0x68(%rbp), %rdx lock cmpxchgq %rdx, (%rcx) movq %rax, %rcx sete %al movb %al, -0xa9(%rbp) movq %rcx, -0xa8(%rbp) testb $0x1, %al jne 0x5c291 movq -0xa8(%rbp), %rax movq %rax, -0x20(%rbp) movb -0xa9(%rbp), %al andb $0x1, %al movb %al, -0x69(%rbp) testb $0x1, -0x69(%rbp) je 0x5c2ac movq -0x58(%rbp), %rax movq %rax, -0x20(%rbp) jmp 0x5c2b5 movq -0x50(%rbp), %rdi callq 0x58fc0 jmp 0x5c2b7 movq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x20(%rcx), %ecx imull -0x14(%rbp), %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xb0, %rsp popq %rbp retq nopl (%rax)
lf_dynarray_lvalue: push rbp mov rbp, rsp sub rsp, 0B0h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_28], 0 mov [rbp+var_2C], 3 loc_5BFF1: mov eax, [rbp+var_14] movsxd rdx, [rbp+var_2C] lea rcx, dynarray_idxes_in_prev_levels cmp rax, [rcx+rdx*8] jnb short loc_5C012 jmp short $+2 loc_5C007: mov eax, [rbp+var_2C] add eax, 0FFFFFFFFh mov [rbp+var_2C], eax jmp short loc_5BFF1 loc_5C012: mov rax, [rbp+var_10] movsxd rcx, [rbp+var_2C] shl rcx, 3 add rax, rcx mov [rbp+var_28], rax movsxd rcx, [rbp+var_2C] lea rax, dynarray_idxes_in_prev_levels mov rcx, [rax+rcx*8] mov eax, [rbp+var_14] sub rax, rcx mov [rbp+var_14], eax loc_5C03D: cmp [rbp+var_2C], 0 jle loc_5C15A mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_20], rax cmp rax, 0 jnz loc_5C0FC lea rax, key_memory_lf_dynarray mov edi, [rax] mov esi, 800h mov edx, 30h ; '0' call my_malloc mov [rbp+var_38], rax cmp [rbp+var_38], 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_5C0A7 mov [rbp+var_8], 0 jmp loc_5C2CF loc_5C0A7: mov rcx, [rbp+var_28] mov rax, [rbp+var_38] mov [rbp+var_40], rax mov rax, [rbp+var_20] mov rdx, [rbp+var_40] lock cmpxchg [rcx], rdx mov rcx, rax setz al mov [rbp+var_79], al mov [rbp+var_78], rcx test al, 1 jnz short loc_5C0D9 mov rax, [rbp+var_78] mov [rbp+var_20], rax loc_5C0D9: mov al, [rbp+var_79] and al, 1 mov [rbp+var_41], al test [rbp+var_41], 1 jz short loc_5C0F1 mov rax, [rbp+var_38] mov [rbp+var_20], rax jmp short loc_5C0FA loc_5C0F1: mov rdi, [rbp+var_38] call my_free loc_5C0FA: jmp short $+2 loc_5C0FC: mov rax, [rbp+var_20] mov [rbp+var_88], rax mov eax, [rbp+var_14] movsxd rsi, [rbp+var_2C] lea rcx, dynarray_idxes_in_prev_level xor edx, edx div qword ptr [rcx+rsi*8] mov rcx, rax mov rax, [rbp+var_88] shl rcx, 3 add rax, rcx mov [rbp+var_28], rax movsxd rcx, [rbp+var_2C] lea rax, dynarray_idxes_in_prev_level mov rcx, [rax+rcx*8] mov eax, [rbp+var_14] xor edx, edx div rcx mov eax, edx mov [rbp+var_14], eax mov eax, [rbp+var_2C] add eax, 0FFFFFFFFh mov [rbp+var_2C], eax jmp loc_5C03D loc_5C15A: mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_20], rax cmp rax, 0 jnz loc_5C2B7 lea rax, key_memory_lf_dynarray mov eax, [rax] mov [rbp+var_94], eax mov rax, [rbp+var_10] mov eax, [rax+20h] shl eax, 8 mov eax, eax mov [rbp+var_90], rax mov rax, [rbp+var_10] mov eax, [rax+20h] cmp rax, 8 jbe short loc_5C1AE mov rax, [rbp+var_10] mov eax, [rax+20h] mov [rbp+var_A0], rax jmp short loc_5C1BC loc_5C1AE: mov eax, 8 mov [rbp+var_A0], rax jmp short $+2 loc_5C1BC: mov edi, [rbp+var_94] mov rsi, [rbp+var_90] mov rax, [rbp+var_A0] add rsi, rax mov edx, 30h ; '0' call my_malloc mov [rbp+var_50], rax cmp [rbp+var_50], 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_5C210 mov [rbp+var_8], 0 jmp loc_5C2CF loc_5C210: mov rax, [rbp+var_50] add rax, 8 mov [rbp+var_58], rax mov rax, [rbp+var_58] mov rcx, [rbp+var_10] mov ecx, [rcx+20h] xor edx, edx div rcx mov [rbp+var_60], rdx cmp [rbp+var_60], 0 jz short loc_5C24A mov rax, [rbp+var_10] mov eax, [rax+20h] sub rax, [rbp+var_60] add rax, [rbp+var_58] mov [rbp+var_58], rax loc_5C24A: mov rcx, [rbp+var_50] mov rax, [rbp+var_58] mov [rax-8], rcx mov rcx, [rbp+var_28] mov rax, [rbp+var_58] mov [rbp+var_68], rax mov rax, [rbp+var_20] mov rdx, [rbp+var_68] lock cmpxchg [rcx], rdx mov rcx, rax setz al mov [rbp+var_A9], al mov [rbp+var_A8], rcx test al, 1 jnz short loc_5C291 mov rax, [rbp+var_A8] mov [rbp+var_20], rax loc_5C291: mov al, [rbp+var_A9] and al, 1 mov [rbp+var_69], al test [rbp+var_69], 1 jz short loc_5C2AC mov rax, [rbp+var_58] mov [rbp+var_20], rax jmp short loc_5C2B5 loc_5C2AC: mov rdi, [rbp+var_50] call my_free loc_5C2B5: jmp short $+2 loc_5C2B7: mov rax, [rbp+var_20] mov rcx, [rbp+var_10] mov ecx, [rcx+20h] imul ecx, [rbp+var_14] mov ecx, ecx add rax, rcx mov [rbp+var_8], rax loc_5C2CF: mov rax, [rbp+var_8] add rsp, 0B0h pop rbp retn
signed long long lf_dynarray_lvalue(long long a1, unsigned int a2) { signed long long v2; // rcx signed long long v3; // rcx long long v5; // [rsp+10h] [rbp-A0h] unsigned long long v6; // [rsp+50h] [rbp-60h] signed long long v7; // [rsp+58h] [rbp-58h] long long v8; // [rsp+60h] [rbp-50h] signed long long v9; // [rsp+78h] [rbp-38h] int i; // [rsp+84h] [rbp-2Ch] volatile signed long long *v11; // [rsp+88h] [rbp-28h] volatile signed long long v12; // [rsp+90h] [rbp-20h] volatile signed long long v13; // [rsp+90h] [rbp-20h] unsigned int v14; // [rsp+9Ch] [rbp-14h] for ( i = 3; (unsigned long long)a2 < dynarray_idxes_in_prev_levels[i]; --i ) ; v11 = (volatile signed long long *)(8LL * i + a1); v14 = a2 - dynarray_idxes_in_prev_levels[i]; while ( i > 0 ) { v12 = *v11; if ( !*v11 ) { v9 = my_malloc(key_memory_lf_dynarray, 0x800uLL, 48); if ( !v9 ) return 0LL; v2 = _InterlockedCompareExchange64(v11, v9, 0LL); if ( v2 ) { v12 = v2; my_free(v9); } else { v12 = v9; } } v11 = (volatile signed long long *)(8 * ((unsigned long long)v14 / dynarray_idxes_in_prev_level[i]) + v12); v14 = (unsigned long long)v14 % dynarray_idxes_in_prev_level[i--]; } v13 = *v11; if ( *v11 ) return v14 * *(_DWORD *)(a1 + 32) + v13; if ( *(unsigned int *)(a1 + 32) <= 8uLL ) v5 = 8LL; else v5 = *(unsigned int *)(a1 + 32); v8 = my_malloc(key_memory_lf_dynarray, v5 + (unsigned int)(*(_DWORD *)(a1 + 32) << 8), 48); if ( v8 ) { v7 = v8 + 8; v6 = (v8 + 8) % (unsigned long long)*(unsigned int *)(a1 + 32); if ( v6 ) v7 += *(unsigned int *)(a1 + 32) - v6; *(_QWORD *)(v7 - 8) = v8; v3 = _InterlockedCompareExchange64(v11, v7, 0LL); if ( v3 ) { v13 = v3; my_free(v8); } else { v13 = v7; } return v14 * *(_DWORD *)(a1 + 32) + v13; } return 0LL; }
lf_dynarray_lvalue: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x28],0x0 MOV dword ptr [RBP + -0x2c],0x3 LAB_0015bff1: MOV EAX,dword ptr [RBP + -0x14] MOVSXD RDX,dword ptr [RBP + -0x2c] LEA RCX,[0x1b3ff0] CMP RAX,qword ptr [RCX + RDX*0x8] JNC 0x0015c012 JMP 0x0015c007 LAB_0015c007: MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,-0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x0015bff1 LAB_0015c012: MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x2c] SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOVSXD RCX,dword ptr [RBP + -0x2c] LEA RAX,[0x1b3ff0] MOV RCX,qword ptr [RAX + RCX*0x8] MOV EAX,dword ptr [RBP + -0x14] SUB RAX,RCX MOV dword ptr [RBP + -0x14],EAX LAB_0015c03d: CMP dword ptr [RBP + -0x2c],0x0 JLE 0x0015c15a MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x0015c0fc LEA RAX,[0x50ec3c] MOV EDI,dword ptr [RAX] MOV ESI,0x800 MOV EDX,0x30 CALL 0x00158c40 MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],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 0x0015c0a7 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0015c2cf LAB_0015c0a7: MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x40] CMPXCHG.LOCK qword ptr [RCX],RDX MOV RCX,RAX SETZ AL MOV byte ptr [RBP + -0x79],AL MOV qword ptr [RBP + -0x78],RCX TEST AL,0x1 JNZ 0x0015c0d9 MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x20],RAX LAB_0015c0d9: MOV AL,byte ptr [RBP + -0x79] AND AL,0x1 MOV byte ptr [RBP + -0x41],AL TEST byte ptr [RBP + -0x41],0x1 JZ 0x0015c0f1 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x20],RAX JMP 0x0015c0fa LAB_0015c0f1: MOV RDI,qword ptr [RBP + -0x38] CALL 0x00158fc0 LAB_0015c0fa: JMP 0x0015c0fc LAB_0015c0fc: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x88],RAX MOV EAX,dword ptr [RBP + -0x14] MOVSXD RSI,dword ptr [RBP + -0x2c] LEA RCX,[0x1b4010] XOR EDX,EDX DIV qword ptr [RCX + RSI*0x8] MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x88] SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOVSXD RCX,dword ptr [RBP + -0x2c] LEA RAX,[0x1b4010] MOV RCX,qword ptr [RAX + RCX*0x8] MOV EAX,dword ptr [RBP + -0x14] XOR EDX,EDX DIV RCX MOV EAX,EDX MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,-0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x0015c03d LAB_0015c15a: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x0015c2b7 LEA RAX,[0x50ec3c] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x94],EAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x20] SHL EAX,0x8 MOV EAX,EAX MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x20] CMP RAX,0x8 JBE 0x0015c1ae MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x20] MOV qword ptr [RBP + -0xa0],RAX JMP 0x0015c1bc LAB_0015c1ae: MOV EAX,0x8 MOV qword ptr [RBP + -0xa0],RAX JMP 0x0015c1bc LAB_0015c1bc: MOV EDI,dword ptr [RBP + -0x94] MOV RSI,qword ptr [RBP + -0x90] MOV RAX,qword ptr [RBP + -0xa0] ADD RSI,RAX MOV EDX,0x30 CALL 0x00158c40 MOV qword ptr [RBP + -0x50],RAX CMP qword ptr [RBP + -0x50],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 0x0015c210 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0015c2cf LAB_0015c210: MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x8 MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x20] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x60],RDX CMP qword ptr [RBP + -0x60],0x0 JZ 0x0015c24a MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x20] SUB RAX,qword ptr [RBP + -0x60] ADD RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x58],RAX LAB_0015c24a: MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX + -0x8],RCX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x68] CMPXCHG.LOCK qword ptr [RCX],RDX MOV RCX,RAX SETZ AL MOV byte ptr [RBP + -0xa9],AL MOV qword ptr [RBP + -0xa8],RCX TEST AL,0x1 JNZ 0x0015c291 MOV RAX,qword ptr [RBP + -0xa8] MOV qword ptr [RBP + -0x20],RAX LAB_0015c291: MOV AL,byte ptr [RBP + -0xa9] AND AL,0x1 MOV byte ptr [RBP + -0x69],AL TEST byte ptr [RBP + -0x69],0x1 JZ 0x0015c2ac MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x20],RAX JMP 0x0015c2b5 LAB_0015c2ac: MOV RDI,qword ptr [RBP + -0x50] CALL 0x00158fc0 LAB_0015c2b5: JMP 0x0015c2b7 LAB_0015c2b7: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x20] IMUL ECX,dword ptr [RBP + -0x14] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX LAB_0015c2cf: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xb0 POP RBP RET
long lf_dynarray_lvalue(long param_1,uint param_2) { ulong uVar1; long lVar2; ulong uVar3; bool bVar4; ulong local_a8; ulong local_60; int local_34; ulong *local_30; ulong local_28; uint local_1c; local_34 = 3; while ((ulong)param_2 < *(ulong *)(dynarray_idxes_in_prev_levels + (long)local_34 * 8)) { local_34 = local_34 + -1; } local_30 = (ulong *)(param_1 + (long)local_34 * 8); local_1c = param_2 - (int)*(int8 *)(dynarray_idxes_in_prev_levels + (long)local_34 * 8); for (; 0 < local_34; local_34 = local_34 + -1) { uVar1 = *local_30; local_28 = uVar1; if (uVar1 == 0) { local_28 = my_malloc(key_memory_lf_dynarray,0x800,0x30); if (local_28 == 0) { return 0; } LOCK(); uVar3 = *local_30; bVar4 = uVar3 == 0; if (bVar4) { *local_30 = local_28; uVar3 = uVar1; } UNLOCK(); if (!bVar4) { my_free(local_28); local_28 = uVar3; } } local_30 = (ulong *)(local_28 + ((ulong)local_1c / *(ulong *)(dynarray_idxes_in_prev_level + (long)local_34 * 8)) * 8); local_1c = (uint)((ulong)local_1c % *(ulong *)(dynarray_idxes_in_prev_level + (long)local_34 * 8)); } uVar1 = *local_30; local_28 = uVar1; if (uVar1 == 0) { if (*(uint *)(param_1 + 0x20) < 9) { local_a8 = 8; } else { local_a8 = (ulong)*(uint *)(param_1 + 0x20); } lVar2 = my_malloc(key_memory_lf_dynarray,(uint)(*(int *)(param_1 + 0x20) << 8) + local_a8,0x30); if (lVar2 == 0) { return 0; } local_60 = lVar2 + 8; uVar3 = local_60 % (ulong)*(uint *)(param_1 + 0x20); if (uVar3 != 0) { local_60 = (*(uint *)(param_1 + 0x20) - uVar3) + local_60; } *(long *)(local_60 - 8) = lVar2; LOCK(); local_28 = *local_30; bVar4 = local_28 == 0; if (bVar4) { *local_30 = local_60; local_28 = uVar1; } UNLOCK(); if (bVar4) { local_28 = local_60; } else { my_free(lVar2); } } return local_28 + *(int *)(param_1 + 0x20) * local_1c; }
5,539
my_hash_sort_8bit_bin
eloqsql/strings/ctype-bin.c
void my_hash_sort_8bit_bin(CHARSET_INFO *cs __attribute__((unused)), const uchar *key, size_t len, ulong *nr1, ulong *nr2) { /* Remove trailing spaces. We have to do this to be able to compare 'A ' and 'A' as identical */ const uchar *end= skip_trailing_space(key, len); my_hash_sort_bin(cs, key, end - key, nr1, nr2); }
O3
c
my_hash_sort_8bit_bin: pushq %rbp movq %rsp, %rbp leaq (%rsi,%rdx), %r9 cmpq $0x15, %rdx jb 0x384d4 movq %r9, %rdi andq $-0x4, %rdi cmpq %rsi, %rdi jbe 0x384d4 leaq 0x3(%rsi), %rdx andq $-0x4, %rdx movq %r9, %rax movb -0x1(%r9), %r10b cmpq %rdi, %r9 jbe 0x38534 leaq -0x1(%rax), %r9 cmpb $0x20, %r10b je 0x384bc jmp 0x384d7 movq %r9, %rax movq %rax, %rdi subq %rsi, %rdi movq %rax, %rdx movq %rdi, %r9 cmpq %rsi, %rax jbe 0x384f6 leaq -0x1(%rdx), %rax leaq -0x1(%r9), %rdi cmpb $0x20, -0x1(%rdx) je 0x384dd movq (%rcx), %rax movq (%r8), %rdi testq %r9, %r9 jle 0x3852c 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 0x38501 movq %rax, (%rcx) movq %rdi, (%r8) popq %rbp retq cmpb $0x20, %r10b setne %r9b cmpq %rdi, %rdx setae %dil orb %r9b, %dil jne 0x384d7 movq %rax, %rdi movq %rdi, %rax cmpq %rdx, %rdi jbe 0x384d7 leaq -0x4(%rax), %rdi cmpl $0x20202020, -0x4(%rax) # imm = 0x20202020 je 0x3854b jmp 0x384d7
my_hash_sort_8bit_bin: push rbp mov rbp, rsp lea r9, [rsi+rdx] cmp rdx, 15h jb short loc_384D4 mov rdi, r9 and rdi, 0FFFFFFFFFFFFFFFCh cmp rdi, rsi jbe short loc_384D4 lea rdx, [rsi+3] and rdx, 0FFFFFFFFFFFFFFFCh loc_384BC: mov rax, r9 mov r10b, [r9-1] cmp r9, rdi jbe short loc_38534 lea r9, [rax-1] cmp r10b, 20h ; ' ' jz short loc_384BC jmp short loc_384D7 loc_384D4: mov rax, r9 loc_384D7: mov rdi, rax sub rdi, rsi loc_384DD: mov rdx, rax mov r9, rdi cmp rax, rsi jbe short loc_384F6 lea rax, [rdx-1] lea rdi, [r9-1] cmp byte ptr [rdx-1], 20h ; ' ' jz short loc_384DD loc_384F6: mov rax, [rcx] mov rdi, [r8] test r9, r9 jle short loc_3852C loc_38501: 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_38501 loc_3852C: mov [rcx], rax mov [r8], rdi pop rbp retn loc_38534: cmp r10b, 20h ; ' ' setnz r9b cmp rdx, rdi setnb dil or dil, r9b jnz short loc_384D7 mov rdi, rax loc_3854B: mov rax, rdi cmp rdi, rdx jbe short loc_384D7 lea rdi, [rax-4] cmp dword ptr [rax-4], 20202020h jz short loc_3854B jmp loc_384D7
long long my_hash_sort_8bit_bin( long long a1, unsigned __int8 *a2, unsigned long long a3, long long *a4, long long *a5) { unsigned long long v5; // r9 unsigned long long v6; // rdi unsigned long long v7; // rdx unsigned __int8 *v8; // rax char v9; // r10 long long v10; // rdi unsigned long long v11; // rdx long long v12; // r9 long long result; // rax long long v14; // rdi unsigned long long v15; // rdi v5 = (unsigned long long)&a2[a3]; if ( a3 < 0x15 || (v6 = v5 & 0xFFFFFFFFFFFFFFFCLL, (v5 & 0xFFFFFFFFFFFFFFFCLL) <= (unsigned long long)a2) ) { v8 = &a2[a3]; } else { v7 = (unsigned long long)(a2 + 3) & 0xFFFFFFFFFFFFFFFCLL; while ( 1 ) { v8 = (unsigned __int8 *)v5; v9 = *(_BYTE *)(v5 - 1); if ( v5 <= v6 ) break; --v5; if ( v9 != 32 ) goto LABEL_8; } if ( v9 == 32 && v7 < v6 ) { v15 = v5; do { v8 = (unsigned __int8 *)v15; if ( v15 <= v7 ) break; v15 -= 4LL; } while ( *((_DWORD *)v8 - 1) == 538976288 ); } } LABEL_8: v10 = v8 - a2; do { v11 = (unsigned long long)v8; v12 = v10; if ( v8 <= a2 ) break; --v8; --v10; } while ( *(_BYTE *)(v11 - 1) == 32 ); result = *a4; v14 = *a5; if ( v12 > 0 ) { do { result ^= (v14 + (result & 0x3F)) * *a2 + (result << 8); v14 += 3LL; ++a2; } while ( (unsigned long long)a2 < v11 ); } *a4 = result; *a5 = v14; return result; }
my_hash_sort_8bit_bin: PUSH RBP MOV RBP,RSP LEA R9,[RSI + RDX*0x1] CMP RDX,0x15 JC 0x001384d4 MOV RDI,R9 AND RDI,-0x4 CMP RDI,RSI JBE 0x001384d4 LEA RDX,[RSI + 0x3] AND RDX,-0x4 LAB_001384bc: MOV RAX,R9 MOV R10B,byte ptr [R9 + -0x1] CMP R9,RDI JBE 0x00138534 LEA R9,[RAX + -0x1] CMP R10B,0x20 JZ 0x001384bc JMP 0x001384d7 LAB_001384d4: MOV RAX,R9 LAB_001384d7: MOV RDI,RAX SUB RDI,RSI LAB_001384dd: MOV RDX,RAX MOV R9,RDI CMP RAX,RSI JBE 0x001384f6 LEA RAX,[RDX + -0x1] LEA RDI,[R9 + -0x1] CMP byte ptr [RDX + -0x1],0x20 JZ 0x001384dd LAB_001384f6: MOV RAX,qword ptr [RCX] MOV RDI,qword ptr [R8] TEST R9,R9 JLE 0x0013852c LAB_00138501: 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 0x00138501 LAB_0013852c: MOV qword ptr [RCX],RAX MOV qword ptr [R8],RDI POP RBP RET LAB_00138534: CMP R10B,0x20 SETNZ R9B CMP RDX,RDI SETNC DIL OR DIL,R9B JNZ 0x001384d7 MOV RDI,RAX LAB_0013854b: MOV RAX,RDI CMP RDI,RDX JBE 0x001384d7 LEA RDI,[RAX + -0x4] CMP dword ptr [RAX + -0x4],0x20202020 JZ 0x0013854b JMP 0x001384d7
void my_hash_sort_8bit_bin (int8 param_1,byte *param_2,ulong param_3,ulong *param_4,long *param_5) { byte *pbVar1; byte *pbVar2; ulong uVar3; byte *pbVar4; long lVar5; long lVar6; pbVar2 = param_2 + param_3; if ((0x14 < param_3) && (pbVar4 = (byte *)((ulong)pbVar2 & 0xfffffffffffffffc), param_2 < pbVar4)) { pbVar1 = pbVar2; do { pbVar2 = pbVar1; if (pbVar2 <= pbVar4) { pbVar1 = pbVar2; if ((byte *)((ulong)(param_2 + 3) & 0xfffffffffffffffc) < pbVar4 && pbVar2[-1] == 0x20) goto LAB_0013854b; break; } pbVar1 = pbVar2 + -1; } while (pbVar2[-1] == 0x20); } goto LAB_001384d7; while (pbVar1 = pbVar2 + -4, *(int *)(pbVar2 + -4) == 0x20202020) { LAB_0013854b: pbVar2 = pbVar1; if (pbVar2 <= (byte *)((ulong)(param_2 + 3) & 0xfffffffffffffffc)) break; } LAB_001384d7: lVar6 = (long)pbVar2 - (long)param_2; do { lVar5 = lVar6; pbVar4 = pbVar2; if (pbVar4 <= param_2) break; pbVar2 = pbVar4 + -1; lVar6 = lVar5 + -1; } while (pbVar4[-1] == 0x20); uVar3 = *param_4; lVar6 = *param_5; if (0 < lVar5) { do { uVar3 = uVar3 ^ uVar3 * 0x100 + (ulong)*param_2 * ((ulong)((uint)uVar3 & 0x3f) + lVar6); lVar6 = lVar6 + 3; param_2 = param_2 + 1; } while (param_2 < pbVar4); } *param_4 = uVar3; *param_5 = lVar6; return; }
5,540
inline_mysql_rwlock_unlock
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_rwlock_unlock( mysql_rwlock_t *that) { int result; #ifdef HAVE_PSI_RWLOCK_INTERFACE if (psi_likely(that->m_psi != NULL)) PSI_RWLOCK_CALL(unlock_rwlock)(that->m_psi); #endif result= rw_unlock(&that->m_rwlock); return result; }
O0
c
inline_mysql_rwlock_unlock: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x90(%rax) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x6c3e1 leaq 0x1da27e(%rip), %rax # 0x246648 movq (%rax), %rax movq 0x168(%rax), %rax movq -0x8(%rbp), %rcx movq 0x90(%rcx), %rdi callq *%rax movq -0x8(%rbp), %rdi callq 0x916b0 movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_rwlock_unlock_3: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+90h], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_6C3E1 lea rax, PSI_server mov rax, [rax] mov rax, [rax+168h] mov rcx, [rbp+var_8] mov rdi, [rcx+90h] call rax loc_6C3E1: mov rdi, [rbp+var_8] call my_rw_unlock mov [rbp+var_C], eax mov eax, [rbp+var_C] add rsp, 10h pop rbp retn
long long inline_mysql_rwlock_unlock_3(long long a1) { if ( *(_QWORD *)(a1 + 144) ) (*((void ( **)(_QWORD))PSI_server + 45))(*(_QWORD *)(a1 + 144)); return (unsigned int)my_rw_unlock(a1); }
inline_mysql_rwlock_unlock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x90],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0016c3e1 LEA RAX,[0x346648] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x168] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x90] CALL RAX LAB_0016c3e1: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001916b0 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] ADD RSP,0x10 POP RBP RET
int4 inline_mysql_rwlock_unlock(long param_1) { int4 uVar1; if (*(long *)(param_1 + 0x90) != 0) { (**(code **)(PSI_server + 0x168))(*(int8 *)(param_1 + 0x90)); } uVar1 = my_rw_unlock(param_1); return uVar1; }
5,541
Json::parseFromStream(Json::CharReader::Factory const&, std::istream&, Json::Value*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)
aimrt_mujoco_sim/_deps/jsoncpp-src/src/lib_json/json_reader.cpp
bool parseFromStream(CharReader::Factory const& fact, IStream& sin, Value* root, String* errs) { OStringStream ssin; ssin << sin.rdbuf(); String doc = std::move(ssin).str(); char const* begin = doc.data(); char const* end = begin + doc.size(); // Note that we do not actually need a null-terminator. CharReaderPtr const reader(fact.newCharReader()); return reader->parse(begin, end, root, errs); }
O3
cpp
Json::parseFromStream(Json::CharReader::Factory const&, std::istream&, Json::Value*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1a0, %rsp # imm = 0x1A0 movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %r15 leaq 0x28(%rsp), %r13 movq %r13, %rdi callq 0x1f750 movq (%r12), %rax movq -0x18(%rax), %rax movq 0xe8(%r12,%rax), %rsi movq %r13, %rdi callq 0x1e290 leaq 0x30(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x1fc60 movq 0x8(%rsp), %r12 movq 0x10(%rsp), %r13 movq (%r15), %rax movq %r15, %rdi callq *0x10(%rax) movq %rax, %r15 addq %r12, %r13 movq (%rax), %rax movq %r15, %rdi movq %r12, %rsi movq %r13, %rdx movq %r14, %rcx movq %rbx, %r8 callq *0x10(%rax) movl %eax, %ebx movq (%r15), %rax movq %r15, %rdi callq *0x8(%rax) leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x73841 callq 0x1f0e0 movq 0x3c660(%rip), %rsi # 0xafea8 leaq 0x28(%rsp), %rdi callq 0x1e900 leaq 0x98(%rsp), %rdi callq 0x1e4d0 movl %ebx, %eax addq $0x1a0, %rsp # imm = 0x1A0 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %rbx movq (%r15), %rax movq %r15, %rdi callq *0x8(%rax) jmp 0x73883 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x7389d callq 0x1f0e0 jmp 0x7389d jmp 0x7389a movq %rax, %rbx movq 0x3c604(%rip), %rsi # 0xafea8 leaq 0x28(%rsp), %rdi callq 0x1e900 leaq 0x98(%rsp), %rdi callq 0x1e4d0 movq %rbx, %rdi callq 0x1ffd0
_ZN4Json15parseFromStreamERKNS_10CharReader7FactoryERSiPNS_5ValueEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push r13 push r12 push rbx sub rsp, 1A0h mov rbx, rcx mov r14, rdx mov r12, rsi mov r15, rdi lea r13, [rsp+1C8h+var_1A0] mov rdi, r13 call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) mov rax, [r12] mov rax, [rax-18h] mov rsi, [r12+rax+0E8h] mov rdi, r13 call __ZNSolsEPSt15basic_streambufIcSt11char_traitsIcEE; std::ostream::operator<<(std::streambuf *) lea rsi, [rsp+1C8h+var_198] lea rdi, [rsp+1C8h+var_1C0] call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov r12, [rsp+1C8h+var_1C0] mov r13, [rsp+1C8h+var_1B8] mov rax, [r15] mov rdi, r15 call qword ptr [rax+10h] mov r15, rax add r13, r12 mov rax, [rax] mov rdi, r15 mov rsi, r12 mov rdx, r13 mov rcx, r14 mov r8, rbx call qword ptr [rax+10h] mov ebx, eax mov rax, [r15] mov rdi, r15 call qword ptr [rax+8] lea rax, [rsp+1C8h+var_1B0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_73841 call __ZdlPv; operator delete(void *) loc_73841: mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+1C8h+var_1A0] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+1C8h+var_130]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov eax, ebx add rsp, 1A0h pop rbx pop r12 pop r13 pop r14 pop r15 retn mov rbx, rax mov rax, [r15] mov rdi, r15 call qword ptr [rax+8] jmp short loc_73883 mov rbx, rax loc_73883: lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_7389D call __ZdlPv; operator delete(void *) jmp short loc_7389D jmp short $+2 loc_7389A: mov rbx, rax loc_7389D: mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_20] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+arg_90]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
long long Json::parseFromStream(long long a1, _QWORD *a2, long long a3, long long a4) { void *v6; // r12 char *v7; // r13 long long v8; // r15 unsigned int v9; // ebx void *v11[2]; // [rsp+8h] [rbp-1C0h] BYREF char v12; // [rsp+18h] [rbp-1B0h] BYREF _BYTE v13[8]; // [rsp+28h] [rbp-1A0h] BYREF _BYTE v14[104]; // [rsp+30h] [rbp-198h] BYREF _BYTE v15[304]; // [rsp+98h] [rbp-130h] BYREF std::ostringstream::basic_ostringstream(v13); std::ostream::operator<<(v13, *(_QWORD *)((char *)a2 + *(_QWORD *)(*a2 - 24LL) + 232)); std::stringbuf::str(v11, v14); v6 = v11[0]; v7 = (char *)v11[1]; v8 = (*(long long ( **)(long long))(*(_QWORD *)a1 + 16LL))(a1); v9 = (*(long long ( **)(long long, void *, char *, long long, long long))(*(_QWORD *)v8 + 16LL))( v8, v6, &v7[(_QWORD)v6], a3, a4); (*(void ( **)(long long))(*(_QWORD *)v8 + 8LL))(v8); if ( v11[0] != &v12 ) operator delete(v11[0]); std::ostringstream::~ostringstream(v13, &`VTT for'std::ostringstream); std::ios_base::~ios_base((std::ios_base *)v15); return v9; }
parseFromStream: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1a0 MOV RBX,RCX MOV R14,RDX MOV R12,RSI MOV R15,RDI LEA R13,[RSP + 0x28] MOV RDI,R13 CALL 0x0011f750 MOV RAX,qword ptr [R12] MOV RAX,qword ptr [RAX + -0x18] MOV RSI,qword ptr [R12 + RAX*0x1 + 0xe8] LAB_001737de: MOV RDI,R13 CALL 0x0011e290 LEA RSI,[RSP + 0x30] LAB_001737eb: LEA RDI,[RSP + 0x8] CALL 0x0011fc60 MOV R12,qword ptr [RSP + 0x8] MOV R13,qword ptr [RSP + 0x10] MOV RAX,qword ptr [R15] LAB_00173802: MOV RDI,R15 CALL qword ptr [RAX + 0x10] MOV R15,RAX ADD R13,R12 MOV RAX,qword ptr [RAX] LAB_00173811: MOV RDI,R15 MOV RSI,R12 MOV RDX,R13 MOV RCX,R14 MOV R8,RBX CALL qword ptr [RAX + 0x10] LAB_00173823: MOV EBX,EAX MOV RAX,qword ptr [R15] MOV RDI,R15 CALL qword ptr [RAX + 0x8] LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00173841 CALL 0x0011f0e0 LAB_00173841: MOV RSI,qword ptr [0x001afea8] LEA RDI,[RSP + 0x28] CALL 0x0011e900 LEA RDI,[RSP + 0x98] CALL 0x0011e4d0 MOV EAX,EBX ADD RSP,0x1a0 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* Json::parseFromStream(Json::CharReader::Factory const&, std::istream&, Json::Value*, std::__cxx11::string*) */ int4 Json::parseFromStream(Factory *param_1,istream *param_2,Value *param_3,string *param_4) { int4 uVar1; long *plVar2; int1 *local_1c0; long local_1b8; int1 local_1b0 [16]; ostringstream local_1a0 [112]; ios_base local_130 [264]; std::__cxx11::ostringstream::ostringstream(local_1a0); /* try { // try from 001737de to 001737e5 has its CatchHandler @ 0017389a */ std::ostream::operator<< ((ostream *)local_1a0, *(streambuf **)(param_2 + *(long *)(*(long *)param_2 + -0x18) + 0xe8)); /* try { // try from 001737eb to 001737f4 has its CatchHandler @ 00173898 */ std::__cxx11::stringbuf::str(); /* try { // try from 00173802 to 00173807 has its CatchHandler @ 00173880 */ plVar2 = (long *)(**(code **)(*(long *)param_1 + 0x10))(param_1); /* try { // try from 00173811 to 00173822 has its CatchHandler @ 00173872 */ uVar1 = (**(code **)(*plVar2 + 0x10))(plVar2,local_1c0,local_1c0 + local_1b8,param_3,param_4); (**(code **)(*plVar2 + 8))(plVar2); if (local_1c0 != local_1b0) { operator_delete(local_1c0); } std::__cxx11::ostringstream::~ostringstream(local_1a0); std::ios_base::~ios_base(local_130); return uVar1; }
5,542
ftxui::operator|=(std::shared_ptr<ftxui::ComponentBase>&, std::function<std::shared_ptr<ftxui::ComponentBase> (std::shared_ptr<ftxui::ComponentBase>)>)
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/component/util.cpp
Component& operator|=(Component& component, ComponentDecorator decorator) { component = component | decorator; // NOLINT return component; }
O3
cpp
ftxui::operator|=(std::shared_ptr<ftxui::ComponentBase>&, std::function<std::shared_ptr<ftxui::ComponentBase> (std::shared_ptr<ftxui::ComponentBase>)>): pushq %rbx subq $0x40, %rsp movq %rdi, %rbx movq (%rdi), %rax movq %rax, (%rsp) movq 0x8(%rdi), %rax movq %rax, 0x8(%rsp) testq %rax, %rax je 0x339dd movq 0x255e1(%rip), %rcx # 0x58fb0 cmpb $0x0, (%rcx) je 0x339d9 incl 0x8(%rax) jmp 0x339dd lock incl 0x8(%rax) leaq 0x20(%rsp), %rdi callq 0x33b88 leaq 0x10(%rsp), %rdi movq %rsp, %rsi leaq 0x20(%rsp), %rdx callq 0x33820 movaps 0x10(%rsp), %xmm0 xorps %xmm1, %xmm1 movaps %xmm1, 0x10(%rsp) movq 0x8(%rbx), %rdi movups %xmm0, (%rbx) testq %rdi, %rdi je 0x33a26 callq 0x14af8 movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x33a26 callq 0x14af8 movq 0x30(%rsp), %rax testq %rax, %rax je 0x33a3f leaq 0x20(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x33a4e callq 0x14af8 movq %rbx, %rax addq $0x40, %rsp popq %rbx retq jmp 0x33a77 movq %rax, %rbx movq 0x30(%rsp), %rax testq %rax, %rax je 0x33a82 leaq 0x20(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0x33a82 movq %rax, %rdi callq 0x1049a movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x33a91 callq 0x14af8 movq %rbx, %rdi callq 0xb780
_ZN5ftxuioRERSt10shared_ptrINS_13ComponentBaseEESt8functionIFS2_S2_EE: push rbx sub rsp, 40h mov rbx, rdi mov rax, [rdi] mov [rsp+48h+var_48], rax mov rax, [rdi+8] mov [rsp+48h+var_40], rax test rax, rax jz short loc_339DD mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_339D9 inc dword ptr [rax+8] jmp short loc_339DD loc_339D9: lock inc dword ptr [rax+8] loc_339DD: lea rdi, [rsp+48h+var_28] call _ZNSt8functionIFSt10shared_ptrIN5ftxui13ComponentBaseEES3_EEC2ERKS5_; std::function<std::shared_ptr<ftxui::ComponentBase> ()(std::shared_ptr<ftxui::ComponentBase>)>::function(std::function<std::shared_ptr<ftxui::ComponentBase> ()(std::shared_ptr<ftxui::ComponentBase>)> const&) lea rdi, [rsp+48h+var_38] mov rsi, rsp lea rdx, [rsp+48h+var_28] call _ZN5ftxuiorESt10shared_ptrINS_13ComponentBaseEESt8functionIFS2_S2_EE; ftxui::operator|(std::shared_ptr<ftxui::ComponentBase>,std::function<std::shared_ptr<ftxui::ComponentBase> ()(std::shared_ptr<ftxui::ComponentBase>)>) movaps xmm0, [rsp+48h+var_38] xorps xmm1, xmm1 movaps [rsp+48h+var_38], xmm1 mov rdi, [rbx+8] movups xmmword ptr [rbx], xmm0 test rdi, rdi jz short loc_33A26 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) mov rdi, qword ptr [rsp+48h+var_38+8] test rdi, rdi jz short loc_33A26 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_33A26: mov rax, [rsp+48h+var_18] test rax, rax jz short loc_33A3F lea rdi, [rsp+48h+var_28] mov rsi, rdi mov edx, 3 call rax loc_33A3F: mov rdi, [rsp+48h+var_40] test rdi, rdi jz short loc_33A4E call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_33A4E: mov rax, rbx add rsp, 40h pop rbx retn jmp short loc_33A77 mov rbx, rax mov rax, [rsp+48h+var_18] test rax, rax jz short loc_33A82 lea rdi, [rsp+48h+var_28] mov rsi, rdi mov edx, 3 call rax jmp short loc_33A82 loc_33A77: mov rdi, rax call __clang_call_terminate mov rbx, rax loc_33A82: mov rdi, [rsp+48h+var_40] test rdi, rdi jz short loc_33A91 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_33A91: mov rdi, rbx call __Unwind_Resume
long long * ftxui::operator|=(long long *a1) { volatile signed __int32 *v2; // rax __int128 v3; // xmm0 volatile signed __int32 *v4; // rdi long long v6; // [rsp+0h] [rbp-48h] BYREF volatile signed __int32 *v7; // [rsp+8h] [rbp-40h] __int128 v8; // [rsp+10h] [rbp-38h] BYREF _BYTE v9[16]; // [rsp+20h] [rbp-28h] BYREF void ( *v10)(_BYTE *, _BYTE *, long long); // [rsp+30h] [rbp-18h] v6 = *a1; v2 = (volatile signed __int32 *)a1[1]; v7 = v2; if ( v2 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v2 + 2); else _InterlockedIncrement(v2 + 2); } std::function<std::shared_ptr<ftxui::ComponentBase> ()(std::shared_ptr<ftxui::ComponentBase>)>::function(v9); ftxui::operator|((long long)&v8, &v6, (long long)v9); v3 = v8; v8 = 0LL; v4 = (volatile signed __int32 *)a1[1]; *(_OWORD *)a1 = v3; if ( v4 ) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v4); if ( *((_QWORD *)&v8 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v8 + 1)); } if ( v10 ) v10(v9, v9, 3LL); if ( v7 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v7); return a1; }
operator|=: PUSH RBX SUB RSP,0x40 MOV RBX,RDI MOV RAX,qword ptr [RDI] MOV qword ptr [RSP],RAX MOV RAX,qword ptr [RDI + 0x8] MOV qword ptr [RSP + 0x8],RAX TEST RAX,RAX JZ 0x001339dd MOV RCX,qword ptr [0x00158fb0] CMP byte ptr [RCX],0x0 JZ 0x001339d9 INC dword ptr [RAX + 0x8] JMP 0x001339dd LAB_001339d9: INC.LOCK dword ptr [RAX + 0x8] LAB_001339dd: LEA RDI,[RSP + 0x20] CALL 0x00133b88 LAB_001339e7: LEA RDI,[RSP + 0x10] MOV RSI,RSP LEA RDX,[RSP + 0x20] CALL 0x00133820 MOVAPS XMM0,xmmword ptr [RSP + 0x10] XORPS XMM1,XMM1 MOVAPS xmmword ptr [RSP + 0x10],XMM1 MOV RDI,qword ptr [RBX + 0x8] MOVUPS xmmword ptr [RBX],XMM0 TEST RDI,RDI JZ 0x00133a26 CALL 0x00114af8 MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x00133a26 CALL 0x00114af8 LAB_00133a26: MOV RAX,qword ptr [RSP + 0x30] TEST RAX,RAX JZ 0x00133a3f LAB_00133a30: LEA RDI,[RSP + 0x20] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_00133a3f: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x00133a4e CALL 0x00114af8 LAB_00133a4e: MOV RAX,RBX ADD RSP,0x40 POP RBX RET
/* ftxui::TEMPNAMEPLACEHOLDERVALUE(std::shared_ptr<ftxui::ComponentBase>&, std::function<std::shared_ptr<ftxui::ComponentBase> (std::shared_ptr<ftxui::ComponentBase>)>) */ int8 * ftxui::operator|=(int8 *param_1,function *param_2) { _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this; int4 uVar1; int4 uVar2; int4 uVar3; int4 uVar4; int8 local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40; int8 local_38; int8 uStack_30; function<std::shared_ptr<ftxui::ComponentBase>(std::shared_ptr<ftxui::ComponentBase>)> local_28 [16]; code *local_18; local_48 = *param_1; local_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_1[1]; if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_00158fb0 == '\0') { LOCK(); *(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1; UNLOCK(); } else { *(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1; } } /* try { // try from 001339dd to 001339e6 has its CatchHandler @ 00133a7f */ std::function<std::shared_ptr<ftxui::ComponentBase>(std::shared_ptr<ftxui::ComponentBase>)>:: function(local_28,param_2); /* try { // try from 001339e7 to 001339f8 has its CatchHandler @ 00133a59 */ operator|((ftxui *)&local_38,&local_48,local_28); uVar1 = (int4)local_38; uVar2 = local_38._4_4_; uVar3 = (int4)uStack_30; uVar4 = uStack_30._4_4_; local_38 = 0; uStack_30 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; this = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_1[1]; *(int4 *)param_1 = uVar1; *(int4 *)((long)param_1 + 4) = uVar2; *(int4 *)(param_1 + 1) = uVar3; *(int4 *)((long)param_1 + 0xc) = uVar4; if (this != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this); if (uStack_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(uStack_30); } } if (local_18 != (code *)0x0) { /* try { // try from 00133a30 to 00133a3e has its CatchHandler @ 00133a57 */ (*local_18)(local_28,local_28,3); } if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40); } return param_1; }
5,543
google::protobuf::EnumDescriptorProto::_internal_has_options() const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.h
inline bool EnumDescriptorProto::_internal_has_options() const { bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; PROTOBUF_ASSUME(!value || _impl_.options_ != nullptr); return value; }
O0
c
google::protobuf::EnumDescriptorProto::_internal_has_options() const: subq $0x98, %rsp movq %rdi, 0x80(%rsp) movq 0x80(%rsp), %rax movq %rax, 0x20(%rsp) addq $0x10, %rax movq %rax, 0x90(%rsp) movl $0x0, 0x8c(%rsp) movq 0x90(%rsp), %rax movslq 0x8c(%rsp), %rcx movl (%rax,%rcx,4), %eax andl $0x2, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movb %al, 0x7f(%rsp) xorl %eax, %eax testb $0x1, %al jne 0x2982a0 jmp 0x298346 movb 0x7f(%rsp), %al movb $0x0, 0x3f(%rsp) testb $0x1, %al je 0x2982b9 movq 0x20(%rsp), %rax cmpq $0x0, 0x68(%rax) je 0x2982bb jmp 0x29830b leaq 0x16ac04(%rip), %rdx # 0x402ec6 leaq 0x40(%rsp), %rdi movq %rdi, 0x10(%rsp) movl $0x3, %esi movl $0x2ae3, %ecx # imm = 0x2AE3 callq 0x219560 movq 0x10(%rsp), %rdi movb $0x1, 0x3f(%rsp) leaq 0x16ac81(%rip), %rsi # 0x402f6d callq 0x218e20 movq %rax, 0x18(%rsp) jmp 0x2982f8 movq 0x18(%rsp), %rsi leaq 0x2b(%rsp), %rdi callq 0x218fd0 jmp 0x298309 jmp 0x29830b testb $0x1, 0x3f(%rsp) jne 0x298314 jmp 0x29831e leaq 0x40(%rsp), %rdi callq 0x2195a0 jmp 0x298295 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) testb $0x1, 0x3f(%rsp) jne 0x29833a jmp 0x298344 leaq 0x40(%rsp), %rdi callq 0x2195a0 jmp 0x298376 movb $0x1, %al testb $0x1, 0x7f(%rsp) movb %al, 0xf(%rsp) je 0x298364 movq 0x20(%rsp), %rax cmpq $0x0, 0x68(%rax) setne %al movb %al, 0xf(%rsp) movb 0xf(%rsp), %al movb 0x7f(%rsp), %al andb $0x1, %al addq $0x98, %rsp retq movq 0x30(%rsp), %rdi callq 0x21700
_ZNK6google8protobuf19EnumDescriptorProto21_internal_has_optionsEv: sub rsp, 98h mov [rsp+98h+var_18], rdi mov rax, [rsp+98h+var_18] mov [rsp+98h+var_78], rax add rax, 10h mov [rsp+98h+var_8], rax mov [rsp+98h+var_C], 0 mov rax, [rsp+98h+var_8] movsxd rcx, [rsp+98h+var_C] mov eax, [rax+rcx*4] and eax, 2 cmp eax, 0 setnz al and al, 1 mov [rsp+98h+var_19], al loc_298295: xor eax, eax test al, 1 jnz short loc_2982A0 jmp loc_298346 loc_2982A0: mov al, [rsp+98h+var_19] mov [rsp+98h+var_59], 0 test al, 1 jz short loc_2982B9 mov rax, [rsp+98h+var_78] cmp qword ptr [rax+68h], 0 jz short loc_2982BB loc_2982B9: jmp short loc_29830B loc_2982BB: lea rdx, aWorkspaceLlm4b_81; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+98h+var_58] mov [rsp+98h+var_88], rdi mov esi, 3 mov ecx, 2AE3h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+98h+var_88] mov [rsp+98h+var_59], 1 lea rsi, aCheckFailedVal_6; "CHECK failed: !value || _impl_.options_"... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+98h+var_80], rax jmp short $+2 loc_2982F8: mov rsi, [rsp+98h+var_80] lea rdi, [rsp+98h+var_6D] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_298309: jmp short $+2 loc_29830B: test [rsp+98h+var_59], 1 jnz short loc_298314 jmp short loc_29831E loc_298314: lea rdi, [rsp+98h+var_58]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_29831E: jmp loc_298295 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax test [rsp+arg_37], 1 jnz short loc_29833A jmp short loc_298344 loc_29833A: lea rdi, [rsp+arg_38]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_298344: jmp short loc_298376 loc_298346: mov al, 1 test [rsp+98h+var_19], 1 mov [rsp+98h+var_89], al jz short loc_298364 mov rax, [rsp+98h+var_78] cmp qword ptr [rax+68h], 0 setnz al mov [rsp+98h+var_89], al loc_298364: mov al, [rsp+98h+var_89] mov al, [rsp+98h+var_19] and al, 1 add rsp, 98h retn loc_298376: mov rdi, [rsp+arg_28] call __Unwind_Resume
bool google::protobuf::EnumDescriptorProto::_internal_has_options( google::protobuf::EnumDescriptorProto *this) { return (*((_DWORD *)this + 4) & 2) != 0; }
operator++: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RAX] CALL 0x00121a10 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX],RCX ADD RSP,0x18 RET
/* std::_Rb_tree_iterator<std::pair<google::protobuf::OneofDescriptor const* const, google::protobuf::compiler::java::OneofGeneratorInfo> >::TEMPNAMEPLACEHOLDERVALUE() */ void __thiscall std:: _Rb_tree_iterator<std::pair<google::protobuf::OneofDescriptor_const*const,google::protobuf::compiler::java::OneofGeneratorInfo>> ::operator++(_Rb_tree_iterator<std::pair<google::protobuf::OneofDescriptor_const*const,google::protobuf::compiler::java::OneofGeneratorInfo>> *this) { int8 uVar1; uVar1 = std::_Rb_tree_increment(*(_Rb_tree_node_base **)this); *(int8 *)this = uVar1; return; }
5,544
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator++()
monkey531[P]llama/common/json.hpp
iter_impl& operator++() { JSON_ASSERT(m_object != nullptr); switch (m_object->m_data.m_type) { case value_t::object: { std::advance(m_it.object_iterator, 1); break; } case value_t::array: { std::advance(m_it.array_iterator, 1); break; } case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: { ++m_it.primitive_iterator; break; } } return *this; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator++(): movq (%rdi), %rax testq %rax, %rax je 0x5e68b movzbl (%rax), %eax cmpl $0x2, %eax je 0x5e67c cmpl $0x1, %eax jne 0x5e683 addq $0x30, 0x8(%rdi) jmp 0x5e687 addq $0x10, 0x10(%rdi) jmp 0x5e687 incq 0x18(%rdi) movq %rdi, %rax retq pushq %rax leaq 0x8dec6(%rip), %rdi # 0xec559 leaq 0x8df09(%rip), %rdx # 0xec5a3 leaq 0x9318c(%rip), %rcx # 0xf182d movl $0x33c0, %esi # imm = 0x33C0 xorl %eax, %eax callq 0x1aec0 nop
_ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv: mov rax, [rdi] test rax, rax jz short loc_5E68B movzx eax, byte ptr [rax] cmp eax, 2 jz short loc_5E67C cmp eax, 1 jnz short loc_5E683 add qword ptr [rdi+8], 30h ; '0' jmp short loc_5E687 loc_5E67C: add qword ptr [rdi+10h], 10h jmp short loc_5E687 loc_5E683: inc qword ptr [rdi+18h] loc_5E687: mov rax, rdi retn loc_5E68B: push rax lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN+7; "m_object != nullptr" mov esi, 33C0h xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::operator++( unsigned __int8 **a1) { int v1; // eax if ( *a1 ) { v1 = **a1; if ( v1 == 2 ) { a1[2] += 16; } else if ( v1 == 1 ) { a1[1] += 48; } else { ++a1[3]; } return (long long)a1; } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 13248LL, "GGML_ASSERT(%s) failed", "m_object != nullptr"); return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"); } }
operator++: MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x0015e68b MOVZX EAX,byte ptr [RAX] CMP EAX,0x2 JZ 0x0015e67c CMP EAX,0x1 JNZ 0x0015e683 ADD qword ptr [RDI + 0x8],0x30 JMP 0x0015e687 LAB_0015e67c: ADD qword ptr [RDI + 0x10],0x10 JMP 0x0015e687 LAB_0015e683: INC qword ptr [RDI + 0x18] LAB_0015e687: MOV RAX,RDI RET LAB_0015e68b: PUSH RAX LEA RDI,[0x1ec559] LEA RDX,[0x1ec5a3] LEA RCX,[0x1f182d] MOV ESI,0x33c0 XOR EAX,EAX CALL 0x0011aec0
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::TEMPNAMEPLACEHOLDERVALUE() */ iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> * __thiscall nlohmann::json_abi_v3_11_3::detail:: iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::operator++(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this) { char cVar1; int8 in_R8; int8 in_R9; if (*(char **)this != (char *)0x0) { cVar1 = **(char **)this; if (cVar1 == '\x02') { *(long *)(this + 0x10) = *(long *)(this + 0x10) + 0x10; } else if (cVar1 == '\x01') { *(long *)(this + 8) = *(long *)(this + 8) + 0x30; } else { *(long *)(this + 0x18) = *(long *)(this + 0x18) + 1; } return this; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x33c0, "GGML_ASSERT(%s) failed","m_object != nullptr",in_R8,in_R9,0); }
5,545
Field_num::check_edom_and_important_data_truncation(char const*, bool, charset_info_st const*, char const*, unsigned long, char const*)
eloqsql/sql/field.cc
int Field_num::check_edom_and_important_data_truncation(const char *type, bool edom, CHARSET_INFO *cs, const char *str, size_t length, const char *end) { /* Test if we get an empty string or garbage */ if (edom) { ErrConvString err(str, length, cs); set_warning_truncated_wrong_value(type, err.ptr()); return 1; } /* Test if we have garbage at the end of the given string. */ if (test_if_important_data(cs, end, str + length)) { set_warning(WARN_DATA_TRUNCATED, 1); return 2; } return 0; }
O0
cpp
Field_num::check_edom_and_important_data_truncation(char const*, bool, charset_info_st const*, char const*, unsigned long, char const*): pushq %rbp movq %rsp, %rbp subq $0x2a0, %rsp # imm = 0x2A0 movb %dl, %al movq 0x10(%rbp), %rdx movq %fs:0x28, %rdx movq %rdx, -0x8(%rbp) movq %rdi, -0x238(%rbp) movq %rsi, -0x240(%rbp) andb $0x1, %al movb %al, -0x241(%rbp) movq %rcx, -0x250(%rbp) movq %r8, -0x258(%rbp) movq %r9, -0x260(%rbp) movq -0x238(%rbp), %rax movq %rax, -0x278(%rbp) testb $0x1, -0x241(%rbp) je 0xbe8713 movq -0x258(%rbp), %rsi movq -0x260(%rbp), %rdx movq -0x250(%rbp), %rcx leaq -0x228(%rbp), %rdi movq %rdi, -0x290(%rbp) callq 0x7fb770 movq -0x290(%rbp), %rdi movq -0x240(%rbp), %rax movq %rax, -0x288(%rbp) callq 0x7fa370 movq %rax, -0x280(%rbp) jmp 0xbe86bf movq -0x280(%rbp), %rdx movq -0x288(%rbp), %rsi movq -0x278(%rbp), %rdi callq 0xbe87d0 jmp 0xbe86db movl $0x1, -0x22c(%rbp) leaq -0x228(%rbp), %rdi callq 0x7fa3a0 jmp 0xbe8763 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x268(%rbp) movl %eax, -0x26c(%rbp) leaq -0x228(%rbp), %rdi callq 0x7fa3a0 jmp 0xbe8790 movq -0x250(%rbp), %rdi movq 0x10(%rbp), %rsi movq -0x258(%rbp), %rdx addq -0x260(%rbp), %rdx callq 0xbe8940 testb $0x1, %al jne 0xbe8737 jmp 0xbe8759 movq -0x278(%rbp), %rdi movl $0x4f1, %esi # imm = 0x4F1 movl $0x1, %edx callq 0xc06460 movl $0x2, -0x22c(%rbp) jmp 0xbe8763 movl $0x0, -0x22c(%rbp) movl -0x22c(%rbp), %eax movl %eax, -0x294(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xbe87bc movl -0x294(%rbp), %eax addq $0x2a0, %rsp # imm = 0x2A0 popq %rbp retq movq -0x268(%rbp), %rax movq %rax, -0x2a0(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xbe87bc movq -0x2a0(%rbp), %rdi callq 0x7589b0 callq 0x758480 nopw %cs:(%rax,%rax)
_ZN9Field_num40check_edom_and_important_data_truncationEPKcbPK15charset_info_stS1_mS1_: push rbp mov rbp, rsp sub rsp, 2A0h mov al, dl mov rdx, [rbp+arg_0] mov rdx, fs:28h mov [rbp+var_8], rdx mov [rbp+var_238], rdi mov [rbp+var_240], rsi and al, 1 mov [rbp+var_241], al mov [rbp+var_250], rcx mov [rbp+var_258], r8 mov [rbp+var_260], r9 mov rax, [rbp+var_238] mov [rbp+var_278], rax test [rbp+var_241], 1 jz loc_BE8713 mov rsi, [rbp+var_258]; char * mov rdx, [rbp+var_260]; unsigned __int64 mov rcx, [rbp+var_250]; charset_info_st * lea rdi, [rbp+var_228]; this mov [rbp+var_290], rdi call _ZN13ErrConvStringC2EPKcmPK15charset_info_st; ErrConvString::ErrConvString(char const*,ulong,charset_info_st const*) mov rdi, [rbp+var_290]; this mov rax, [rbp+var_240] mov [rbp+var_288], rax call _ZNK7ErrConv3ptrEv; ErrConv::ptr(void) mov [rbp+var_280], rax jmp short $+2 loc_BE86BF: mov rdx, [rbp+var_280]; char * mov rsi, [rbp+var_288]; char * mov rdi, [rbp+var_278]; this call _ZN5Field33set_warning_truncated_wrong_valueEPKcS1_; Field::set_warning_truncated_wrong_value(char const*,char const*) jmp short $+2 loc_BE86DB: mov [rbp+var_22C], 1 lea rdi, [rbp+var_228]; this call _ZN13ErrConvStringD2Ev; ErrConvString::~ErrConvString() jmp short loc_BE8763 mov rcx, rax mov eax, edx mov [rbp+var_268], rcx mov [rbp+var_26C], eax lea rdi, [rbp+var_228]; this call _ZN13ErrConvStringD2Ev; ErrConvString::~ErrConvString() jmp short loc_BE8790 loc_BE8713: mov rdi, [rbp+var_250]; charset_info_st * mov rsi, [rbp+arg_0]; char * mov rdx, [rbp+var_258] add rdx, [rbp+var_260]; char * call _ZL22test_if_important_dataPK15charset_info_stPKcS3_; test_if_important_data(charset_info_st const*,char const*,char const*) test al, 1 jnz short loc_BE8737 jmp short loc_BE8759 loc_BE8737: mov rdi, [rbp+var_278]; this mov esi, 4F1h; unsigned int mov edx, 1; int call _ZNK5Field11set_warningEji; Field::set_warning(uint,int) mov [rbp+var_22C], 2 jmp short loc_BE8763 loc_BE8759: mov [rbp+var_22C], 0 loc_BE8763: mov eax, [rbp+var_22C] mov [rbp+var_294], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_BE87BC mov eax, [rbp+var_294] add rsp, 2A0h pop rbp retn loc_BE8790: mov rax, [rbp+var_268] mov [rbp+var_2A0], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_BE87BC mov rdi, [rbp+var_2A0] call __Unwind_Resume loc_BE87BC: call ___stack_chk_fail
long long Field_num::check_edom_and_important_data_truncation( Field_num *this, const char *a2, char a3, const charset_info_st *a4, const char *a5, long long a6, char *a7) { char *v8; // [rsp+20h] [rbp-280h] unsigned int v9; // [rsp+74h] [rbp-22Ch] _BYTE v10[544]; // [rsp+78h] [rbp-228h] BYREF unsigned long long v11; // [rsp+298h] [rbp-8h] v11 = __readfsqword(0x28u); if ( (a3 & 1) != 0 ) { ErrConvString::ErrConvString((ErrConvString *)v10, a5, a6, a4); v8 = (char *)ErrConv::ptr((ErrConv *)v10); Field::set_warning_truncated_wrong_value(this, a2, v8); v9 = 1; ErrConvString::~ErrConvString((ErrConvString *)v10); } else if ( (test_if_important_data(a4, a7, &a5[a6]) & 1) != 0 ) { Field::set_warning(this, 0x4F1u, 1); return 2; } else { return 0; } return v9; }
VYear_op: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x20],RDI MOV qword ptr [RBP + -0x28],RSI MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x28] CALL 0x00c053b0 MOV RDI,qword ptr [RBP + -0x40] MOV byte ptr [RBP + -0x30],DL MOV qword ptr [RBP + -0x38],RAX MOV AL,byte ptr [RBP + -0x30] MOV byte ptr [RBP + -0x10],AL MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x18],RAX MOV RSI,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RSI + 0xe] MOV dword ptr [RBP + -0x44],EAX CALL 0x00be8540 MOV EDX,dword ptr [RBP + -0x44] MOV RDI,qword ptr [RBP + -0x40] MOV ECX,EAX AND EDX,0x1 LEA RSI,[RBP + -0x18] CALL 0x00c05320 MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00be8694 ADD RSP,0x50 POP RBP RET LAB_00be8694: CALL 0x00858480
/* VYear_op::VYear_op(Item_func_hybrid_field_type*) */ void __thiscall VYear_op::VYear_op(VYear_op *this,Item_func_hybrid_field_type *param_1) { Item_func_hybrid_field_type IVar1; uint uVar2; int1 extraout_DL; long in_FS_OFFSET; int8 local_20; int1 local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_20 = Item_func_hybrid_field_type::to_longlong_null_op(param_1); IVar1 = param_1[0xe]; local_18 = extraout_DL; uVar2 = Year::year_precision((Year *)this,(Item *)param_1); Year_null::Year_null((Year_null *)this,(Longlong_null *)&local_20,(bool)((byte)IVar1 & 1),uVar2); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
5,546
my_longlong10_to_str_8bit
eloqsql/strings/ctype-simple.c
size_t my_longlong10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)), char *dst, size_t len, int radix, longlong val) { char buffer[65]; register char *p, *e; long long_val; uint sign= 0; ulonglong uval = (ulonglong)val; if (radix < 0) { if (val < 0) { /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ uval = (ulonglong)0 - uval; *dst++= '-'; len--; sign= 1; } } e = p = &buffer[sizeof(buffer)-1]; *p= 0; if (uval == 0) { *--p= '0'; len= 1; goto cnv; } while (uval > (ulonglong) LONG_MAX) { ulonglong quo= uval/(uint) 10; uint rem= (uint) (uval- quo* (uint) 10); *--p = '0' + rem; uval= quo; } long_val= (long) uval; while (long_val != 0) { long quo= long_val/10; *--p = (char) ('0' + (long_val - quo*10)); long_val= quo; } len= MY_MIN(len, (size_t) (e-p)); cnv: memcpy(dst, p, len); return len+sign; }
O3
c
my_longlong10_to_str_8bit: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x50, %rsp movq %rdx, %r9 movq %rsi, %rdi movq %fs:0x28, %rax movq %rax, -0x18(%rbp) testl %ecx, %ecx setns %al testq %r8, %r8 setns %cl orb %al, %cl jne 0xb5972 negq %r8 movb $0x2d, (%rdi) incq %rdi decq %r9 leaq -0x20(%rbp), %rbx movb $0x0, (%rbx) movl $0x1, %r14d jmp 0xb5986 movb $0x0, -0x20(%rbp) testq %r8, %r8 je 0xb5a12 leaq -0x20(%rbp), %rbx xorl %r14d, %r14d movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD testq %r8, %r8 js 0xb599a movq %rbx, %rsi jmp 0xb59bb movq %r8, %rax mulq %rcx shrq $0x3, %rdx leaq -0x21(%rbp), %rsi imull $0xf6, %edx, %eax addl %eax, %r8d addb $0x30, %r8b movb %r8b, (%rsi) movq %rdx, %r8 subq %rsi, %rbx movq %r8, %rax mulq %rcx shrq $0x3, %rdx imull $0xf6, %edx, %eax addl %r8d, %eax addb $0x30, %al movb %al, -0x1(%rsi) decq %rsi incq %rbx cmpq $0x9, %r8 movq %rdx, %r8 ja 0xb59be cmpq %rbx, %r9 cmovbq %r9, %rbx movq %rbx, %rdx callq 0x29080 movq %fs:0x28, %rax cmpq -0x18(%rbp), %rax jne 0xb5a23 addq %r14, %rbx movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r14 popq %rbp retq leaq -0x21(%rbp), %rsi movb $0x30, (%rsi) movl $0x1, %ebx xorl %r14d, %r14d jmp 0xb59ec callq 0x29270
my_longlong10_to_str_8bit: push rbp mov rbp, rsp push r14 push rbx sub rsp, 50h mov r9, rdx mov rdi, rsi mov rax, fs:28h mov [rbp+var_18], rax test ecx, ecx setns al test r8, r8 setns cl or cl, al jnz short loc_B5972 neg r8 mov byte ptr [rdi], 2Dh ; '-' inc rdi dec r9 lea rbx, [rbp+var_20] mov byte ptr [rbx], 0 mov r14d, 1 jmp short loc_B5986 loc_B5972: mov [rbp+var_20], 0 test r8, r8 jz loc_B5A12 lea rbx, [rbp+var_20] xor r14d, r14d loc_B5986: mov rcx, 0CCCCCCCCCCCCCCCDh test r8, r8 js short loc_B599A mov rsi, rbx jmp short loc_B59BB loc_B599A: mov rax, r8 mul rcx shr rdx, 3 lea rsi, [rbp+var_21] imul eax, edx, 0F6h add r8d, eax add r8b, 30h ; '0' mov [rsi], r8b mov r8, rdx loc_B59BB: sub rbx, rsi loc_B59BE: mov rax, r8 mul rcx shr rdx, 3 imul eax, edx, 0F6h add eax, r8d add al, 30h ; '0' mov [rsi-1], al dec rsi inc rbx cmp r8, 9 mov r8, rdx ja short loc_B59BE cmp r9, rbx cmovb rbx, r9 loc_B59EC: mov rdx, rbx call _memcpy mov rax, fs:28h cmp rax, [rbp+var_18] jnz short loc_B5A23 add rbx, r14 mov rax, rbx add rsp, 50h pop rbx pop r14 pop rbp retn loc_B5A12: lea rsi, [rbp+var_21] mov byte ptr [rsi], 30h ; '0' mov ebx, 1 xor r14d, r14d jmp short loc_B59EC loc_B5A23: call ___stack_chk_fail
_BYTE * my_longlong10_to_str_8bit(long long a1, _BYTE *a2, _BYTE *a3, int a4, unsigned long long a5) { _BYTE *v5; // r9 _BYTE *v6; // rdi long long v7; // r14 char *v8; // rsi _BYTE *v9; // rbx bool v10; // cc char v12; // [rsp+3Fh] [rbp-21h] BYREF _BYTE v13[8]; // [rsp+40h] [rbp-20h] BYREF unsigned long long v14; // [rsp+48h] [rbp-18h] v5 = a3; v6 = a2; v14 = __readfsqword(0x28u); if ( a4 >= 0 || (a5 & 0x8000000000000000LL) == 0LL ) { v13[0] = 0; if ( !a5 ) { v8 = &v12; v12 = 48; v9 = (_BYTE *)(&dword_0 + 1); v7 = 0LL; goto LABEL_12; } v7 = 0LL; } else { a5 = -(long long)a5; *a2 = 45; v6 = a2 + 1; v5 = a3 - 1; v13[0] = 0; v7 = 1LL; } if ( (a5 & 0x8000000000000000LL) != 0LL ) { v8 = &v12; v12 = a5 % 0xA + 48; a5 /= 0xAuLL; } else { v8 = v13; } v9 = (_BYTE *)(v13 - v8); do { *--v8 = a5 % 0xA + 48; ++v9; v10 = a5 <= 9; a5 /= 0xAuLL; } while ( !v10 ); if ( v5 < v9 ) v9 = v5; LABEL_12: memcpy(v6, v8, v9); return &v9[v7]; }
my_longlong10_to_str_8bit: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x50 MOV R9,RDX MOV RDI,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX TEST ECX,ECX SETNS AL TEST R8,R8 SETNS CL OR CL,AL JNZ 0x001b5972 NEG R8 MOV byte ptr [RDI],0x2d INC RDI DEC R9 LEA RBX,[RBP + -0x20] MOV byte ptr [RBX],0x0 MOV R14D,0x1 JMP 0x001b5986 LAB_001b5972: MOV byte ptr [RBP + -0x20],0x0 TEST R8,R8 JZ 0x001b5a12 LEA RBX,[RBP + -0x20] XOR R14D,R14D LAB_001b5986: MOV RCX,-0x3333333333333333 TEST R8,R8 JS 0x001b599a MOV RSI,RBX JMP 0x001b59bb LAB_001b599a: MOV RAX,R8 MUL RCX SHR RDX,0x3 LEA RSI,[RBP + -0x21] IMUL EAX,EDX,0xf6 ADD R8D,EAX ADD R8B,0x30 MOV byte ptr [RSI],R8B MOV R8,RDX LAB_001b59bb: SUB RBX,RSI LAB_001b59be: MOV RAX,R8 MUL RCX SHR RDX,0x3 IMUL EAX,EDX,0xf6 ADD EAX,R8D ADD AL,0x30 MOV byte ptr [RSI + -0x1],AL DEC RSI INC RBX CMP R8,0x9 MOV R8,RDX JA 0x001b59be CMP R9,RBX CMOVC RBX,R9 LAB_001b59ec: MOV RDX,RBX CALL 0x00129080 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x001b5a23 ADD RBX,R14 MOV RAX,RBX ADD RSP,0x50 POP RBX POP R14 POP RBP RET LAB_001b5a12: LEA RSI,[RBP + -0x21] MOV byte ptr [RSI],0x30 MOV EBX,0x1 XOR R14D,R14D JMP 0x001b59ec LAB_001b5a23: CALL 0x00129270
long my_longlong10_to_str_8bit (int8 param_1,int1 *param_2,ulong param_3,int param_4,ulong param_5) { bool bVar1; ulong __n; char *__src; long lVar2; long in_FS_OFFSET; char local_29 [9]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); if ((long)param_5 < 0 && param_4 < 0) { param_5 = -param_5; *param_2 = 0x2d; param_2 = param_2 + 1; param_3 = param_3 - 1; lVar2 = 1; } else { if (param_5 == 0) { __src = local_29; local_29[0] = '0'; __n = 1; lVar2 = 0; goto LAB_001b59ec; } lVar2 = 0; } __src = local_29 + 1; if ((long)param_5 < 0) { local_29[0] = (char)param_5 + (char)(param_5 / 10) * -10 + '0'; __src = local_29; param_5 = param_5 / 10; } __n = (long)(local_29 + 1) - (long)__src; do { __src[-1] = (char)(param_5 / 10) * -10 + (char)param_5 + '0'; __src = __src + -1; __n = __n + 1; bVar1 = 9 < param_5; param_5 = param_5 / 10; } while (bVar1); if (param_3 < __n) { __n = param_3; } LAB_001b59ec: local_29[1] = 0; memcpy(param_2,__src,__n); if (*(long *)(in_FS_OFFSET + 0x28) != local_20) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return __n + lVar2; }
5,547
thr_merge_locks
eloqsql/mysys/thr_lock.c
void thr_merge_locks(THR_LOCK_DATA **data, uint old_count, uint new_count) { THR_LOCK_DATA **pos, **end, **first_lock= 0; DBUG_ENTER("thr_merge_lock"); /* Remove marks on old locks to make them sort before new ones */ for (pos=data, end= pos + old_count; pos < end ; pos++) (*pos)->priority&= ~THR_LOCK_LATE_PRIV; /* Mark new locks with LATE_PRIV to make them sort after org ones */ for (pos=data + old_count, end= pos + new_count; pos < end ; pos++) (*pos)->priority|= THR_LOCK_LATE_PRIV; sort_locks(data, old_count + new_count); for (pos=data ; pos < end ; pos++) { /* Check if lock was unlocked before */ if (pos[0]->type == TL_UNLOCK || ! pos[0]->lock->fix_status) { DBUG_PRINT("info", ("lock skipped. unlocked: %d fix_status: %d", pos[0]->type == TL_UNLOCK, pos[0]->lock->fix_status == 0)); continue; } /* If same table as previous table use pointer to previous status information to ensure that all read/write tables shares same state. */ if (first_lock && pos[0]->lock == first_lock[0]->lock) (pos[0]->lock->fix_status)((*first_lock)->status_param, (*pos)->status_param); else { /* Different lock, use this as base for next lock */ first_lock= pos; (pos[0]->lock->fix_status)((*first_lock)->status_param, 0); } } DBUG_VOID_RETURN; }
O3
c
thr_merge_locks: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl %esi, %eax leaq (%rdi,%rax,8), %rax testl %esi, %esi je 0x5d9c7 movq %rbx, %rcx movq (%rcx), %rdi andl $-0x2, 0x48(%rdi) addq $0x8, %rcx cmpq %rax, %rcx jb 0x5d9b7 movl %edx, %ecx leaq (%rax,%rcx,8), %r14 testl %edx, %edx je 0x5d9e1 movq (%rax), %rcx orl $0x1, 0x48(%rcx) addq $0x8, %rax cmpq %r14, %rax jb 0x5d9d1 addl %esi, %edx movq %rbx, %rdi movl %edx, %esi callq 0x5d89b cmpq %rbx, %r14 jbe 0x5da3c xorl %r15d, %r15d movq (%rbx), %rcx cmpl $0x0, 0x40(%rcx) je 0x5da33 movq 0x18(%rcx), %rdx movq 0xe0(%rdx), %rax testq %rax, %rax je 0x5da33 testq %r15, %r15 je 0x5da1c movq (%r15), %rsi cmpq 0x18(%rsi), %rdx je 0x5da29 movq 0x28(%rcx), %rdi xorl %esi, %esi callq *%rax movq %rbx, %r15 jmp 0x5da33 movq 0x28(%rsi), %rdi movq 0x28(%rcx), %rsi callq *%rax addq $0x8, %rbx cmpq %r14, %rbx jb 0x5d9f5 addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
thr_merge_locks: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov eax, esi lea rax, [rdi+rax*8] test esi, esi jz short loc_5D9C7 mov rcx, rbx loc_5D9B7: mov rdi, [rcx] and dword ptr [rdi+48h], 0FFFFFFFEh add rcx, 8 cmp rcx, rax jb short loc_5D9B7 loc_5D9C7: mov ecx, edx lea r14, [rax+rcx*8] test edx, edx jz short loc_5D9E1 loc_5D9D1: mov rcx, [rax] or dword ptr [rcx+48h], 1 add rax, 8 cmp rax, r14 jb short loc_5D9D1 loc_5D9E1: add edx, esi mov rdi, rbx mov esi, edx call sort_locks cmp r14, rbx jbe short loc_5DA3C xor r15d, r15d loc_5D9F5: mov rcx, [rbx] cmp dword ptr [rcx+40h], 0 jz short loc_5DA33 mov rdx, [rcx+18h] mov rax, [rdx+0E0h] test rax, rax jz short loc_5DA33 test r15, r15 jz short loc_5DA1C mov rsi, [r15] cmp rdx, [rsi+18h] jz short loc_5DA29 loc_5DA1C: mov rdi, [rcx+28h] xor esi, esi call rax mov r15, rbx jmp short loc_5DA33 loc_5DA29: mov rdi, [rsi+28h] mov rsi, [rcx+28h] call rax loc_5DA33: add rbx, 8 cmp rbx, r14 jb short loc_5D9F5 loc_5DA3C: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
void thr_merge_locks(_QWORD *a1, int a2, int a3) { _QWORD *v3; // rbx _QWORD *v4; // rax _QWORD *v5; // rcx unsigned long long v6; // r14 _QWORD *v7; // r15 long long v8; // rcx long long v9; // rdx void ( *v10)(_QWORD, _QWORD); // rax v3 = a1; v4 = &a1[a2]; if ( a2 ) { v5 = a1; do *(_DWORD *)(*v5++ + 72LL) &= ~1u; while ( v5 < v4 ); } v6 = (unsigned long long)&v4[a3]; if ( a3 ) { do *(_DWORD *)(*v4++ + 72LL) |= 1u; while ( (unsigned long long)v4 < v6 ); } sort_locks(a1, a2 + a3); if ( v6 > (unsigned long long)a1 ) { v7 = 0LL; do { v8 = *v3; if ( *(_DWORD *)(*v3 + 64LL) ) { v9 = *(_QWORD *)(v8 + 24); v10 = *(void ( **)(_QWORD, _QWORD))(v9 + 224); if ( v10 ) { if ( v7 && v9 == *(_QWORD *)(*v7 + 24LL) ) { v10(*(_QWORD *)(*v7 + 40LL), *(_QWORD *)(v8 + 40)); } else { v10(*(_QWORD *)(v8 + 40), 0LL); v7 = v3; } } } ++v3; } while ( (unsigned long long)v3 < v6 ); } }
thr_merge_locks: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV EAX,ESI LEA RAX,[RDI + RAX*0x8] TEST ESI,ESI JZ 0x0015d9c7 MOV RCX,RBX LAB_0015d9b7: MOV RDI,qword ptr [RCX] AND dword ptr [RDI + 0x48],0xfffffffe ADD RCX,0x8 CMP RCX,RAX JC 0x0015d9b7 LAB_0015d9c7: MOV ECX,EDX LEA R14,[RAX + RCX*0x8] TEST EDX,EDX JZ 0x0015d9e1 LAB_0015d9d1: MOV RCX,qword ptr [RAX] OR dword ptr [RCX + 0x48],0x1 ADD RAX,0x8 CMP RAX,R14 JC 0x0015d9d1 LAB_0015d9e1: ADD EDX,ESI MOV RDI,RBX MOV ESI,EDX CALL 0x0015d89b CMP R14,RBX JBE 0x0015da3c XOR R15D,R15D LAB_0015d9f5: MOV RCX,qword ptr [RBX] CMP dword ptr [RCX + 0x40],0x0 JZ 0x0015da33 MOV RDX,qword ptr [RCX + 0x18] MOV RAX,qword ptr [RDX + 0xe0] TEST RAX,RAX JZ 0x0015da33 TEST R15,R15 JZ 0x0015da1c MOV RSI,qword ptr [R15] CMP RDX,qword ptr [RSI + 0x18] JZ 0x0015da29 LAB_0015da1c: MOV RDI,qword ptr [RCX + 0x28] XOR ESI,ESI CALL RAX MOV R15,RBX JMP 0x0015da33 LAB_0015da29: MOV RDI,qword ptr [RSI + 0x28] MOV RSI,qword ptr [RCX + 0x28] CALL RAX LAB_0015da33: ADD RBX,0x8 CMP RBX,R14 JC 0x0015d9f5 LAB_0015da3c: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void thr_merge_locks(long *param_1,uint param_2,uint param_3) { long lVar1; code *pcVar2; long *plVar3; long *plVar4; plVar3 = param_1 + param_2; plVar4 = param_1; if (param_2 != 0) { do { *(uint *)(*plVar4 + 0x48) = *(uint *)(*plVar4 + 0x48) & 0xfffffffe; plVar4 = plVar4 + 1; } while (plVar4 < plVar3); } plVar4 = plVar3 + param_3; if (param_3 != 0) { do { *(uint *)(*plVar3 + 0x48) = *(uint *)(*plVar3 + 0x48) | 1; plVar3 = plVar3 + 1; } while (plVar3 < plVar4); } sort_locks(param_1,param_3 + param_2); if (param_1 < plVar4) { plVar3 = (long *)0x0; do { lVar1 = *param_1; if (*(int *)(lVar1 + 0x40) != 0) { pcVar2 = *(code **)(*(long *)(lVar1 + 0x18) + 0xe0); if (pcVar2 != (code *)0x0) { if ((plVar3 == (long *)0x0) || (*(long *)(lVar1 + 0x18) != *(long *)(*plVar3 + 0x18))) { (*pcVar2)(*(int8 *)(lVar1 + 0x28),0); plVar3 = param_1; } else { (*pcVar2)(*(int8 *)(*plVar3 + 0x28),*(int8 *)(lVar1 + 0x28)); } } } param_1 = param_1 + 1; } while (param_1 < plVar4); } return; }
5,548
coro::shared_mutex<coro::thread_pool>::lock_operation::await_suspend(std::__n4861::coroutine_handle<void>)
AlayaLite/build_O3/_deps/libcoro-src/include/coro/shared_mutex.hpp
auto await_suspend(std::coroutine_handle<> awaiting_coroutine) noexcept -> bool { std::unique_lock lk{m_shared_mutex.m_mutex}; // Its possible the lock has been released between await_ready() and await_suspend(), double // check and make sure we are not going to suspend when nobody holds the lock. if (m_exclusive) { if (m_shared_mutex.try_lock_locked(lk)) { return false; } } else { if (m_shared_mutex.try_lock_shared_locked(lk)) { return false; } } // For sure the lock is currently held in a manner that it cannot be acquired, suspend ourself // at the end of the waiter list. if (m_shared_mutex.m_tail_waiter == nullptr) { m_shared_mutex.m_head_waiter = this; m_shared_mutex.m_tail_waiter = this; } else { m_shared_mutex.m_tail_waiter->m_next = this; m_shared_mutex.m_tail_waiter = this; } // If this is an exclusive lock acquire then mark it as so so that shared locks after this // exclusive one will also suspend so this exclusive lock doens't get starved. if (m_exclusive) { ++m_shared_mutex.m_exclusive_waiters; } m_awaiting_coroutine = awaiting_coroutine; return true; }
O3
cpp
coro::shared_mutex<coro::thread_pool>::lock_operation::await_suspend(std::__n4861::coroutine_handle<void>): pushq %r14 pushq %rbx subq $0x18, %rsp movq %rsi, %rbx movq %rdi, %r14 movq (%rdi), %rax addq $0x10, %rax leaq 0x8(%rsp), %rdi movq %rax, (%rdi) movb $0x0, 0x8(%rdi) callq 0x3368 movb $0x1, 0x10(%rsp) movq (%r14), %rdi cmpb $0x1, 0x8(%r14) jne 0x31d7 cmpl $0x0, 0x38(%rdi) jne 0x31ec movl $0x2, 0x38(%rdi) leaq 0x8(%rsp), %rdi callq 0x33a4 jmp 0x31e5 leaq 0x8(%rsp), %rsi callq 0x33cc testb %al, %al je 0x31e9 xorl %ebx, %ebx jmp 0x3217 movq (%r14), %rdi movq 0x58(%rdi), %rax leaq 0x18(%rax), %rcx leaq 0x50(%rdi), %rdx testq %rax, %rax cmoveq %rdx, %rcx movq %r14, (%rcx) movq %r14, 0x58(%rdi) cmpb $0x1, 0x8(%r14) jne 0x3211 incq 0x48(%rdi) movq %rbx, 0x10(%r14) movb $0x1, %bl leaq 0x8(%rsp), %rdi callq 0x3352 movl %ebx, %eax addq $0x18, %rsp popq %rbx popq %r14 retq movq %rax, %rdi callq 0x30ea nop
_ZN4coro12shared_mutexINS_11thread_poolEE14lock_operation13await_suspendENSt7__n486116coroutine_handleIvEE: push r14 push rbx sub rsp, 18h mov rbx, rsi mov r14, rdi mov rax, [rdi] add rax, 10h lea rdi, [rsp+28h+var_20] mov [rdi], rax mov byte ptr [rdi+8], 0 call _ZNSt11unique_lockISt5mutexE4lockEv; std::unique_lock<std::mutex>::lock(void) mov [rsp+28h+var_18], 1 mov rdi, [r14] cmp byte ptr [r14+8], 1 jnz short loc_31D7 cmp dword ptr [rdi+38h], 0 jnz short loc_31EC mov dword ptr [rdi+38h], 2 lea rdi, [rsp+28h+var_20] call _ZNSt11unique_lockISt5mutexE6unlockEv; std::unique_lock<std::mutex>::unlock(void) jmp short loc_31E5 loc_31D7: lea rsi, [rsp+28h+var_20] call _ZN4coro12shared_mutexINS_11thread_poolEE22try_lock_shared_lockedERSt11unique_lockISt5mutexE; coro::shared_mutex<coro::thread_pool>::try_lock_shared_locked(std::unique_lock<std::mutex> &) test al, al jz short loc_31E9 loc_31E5: xor ebx, ebx jmp short loc_3217 loc_31E9: mov rdi, [r14] loc_31EC: mov rax, [rdi+58h] lea rcx, [rax+18h] lea rdx, [rdi+50h] test rax, rax cmovz rcx, rdx mov [rcx], r14 mov [rdi+58h], r14 cmp byte ptr [r14+8], 1 jnz short loc_3211 inc qword ptr [rdi+48h] loc_3211: mov [r14+10h], rbx mov bl, 1 loc_3217: lea rdi, [rsp+28h+var_20] call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock() mov eax, ebx add rsp, 18h pop rbx pop r14 retn mov rdi, rax call __clang_call_terminate
long long coro::shared_mutex<coro::thread_pool>::lock_operation::await_suspend(long long *a1, long long a2) { unsigned int v2; // ebx long long v4; // rdi long long v5; // rax _QWORD *v6; // rcx long long v8; // [rsp+8h] [rbp-20h] BYREF char v9; // [rsp+10h] [rbp-18h] v2 = a2; v8 = *a1 + 16; std::unique_lock<std::mutex>::lock(); v9 = 1; v4 = *a1; if ( *((_BYTE *)a1 + 8) == 1 ) { if ( !*(_DWORD *)(v4 + 56) ) { *(_DWORD *)(v4 + 56) = 2; std::unique_lock<std::mutex>::unlock(&v8); LABEL_5: v2 = 0; goto LABEL_12; } } else { if ( (unsigned __int8)coro::shared_mutex<coro::thread_pool>::try_lock_shared_locked(v4, &v8) ) goto LABEL_5; v4 = *a1; } v5 = *(_QWORD *)(v4 + 88); v6 = (_QWORD *)(v5 + 24); if ( !v5 ) v6 = (_QWORD *)(v4 + 80); *v6 = a1; *(_QWORD *)(v4 + 88) = a1; if ( *((_BYTE *)a1 + 8) == 1 ) ++*(_QWORD *)(v4 + 72); a1[2] = a2; LOBYTE(v2) = 1; LABEL_12: std::unique_lock<std::mutex>::~unique_lock(&v8); return v2; }
await_suspend: PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr [RDI] ADD RAX,0x10 LEA RDI,[RSP + 0x8] MOV qword ptr [RDI],RAX MOV byte ptr [RDI + 0x8],0x0 LAB_001031aa: CALL 0x00103368 MOV byte ptr [RSP + 0x10],0x1 MOV RDI,qword ptr [R14] CMP byte ptr [R14 + 0x8],0x1 JNZ 0x001031d7 CMP dword ptr [RDI + 0x38],0x0 JNZ 0x001031ec MOV dword ptr [RDI + 0x38],0x2 LEA RDI,[RSP + 0x8] CALL 0x001033a4 JMP 0x001031e5 LAB_001031d7: LEA RSI,[RSP + 0x8] CALL 0x001033cc TEST AL,AL JZ 0x001031e9 LAB_001031e5: XOR EBX,EBX JMP 0x00103217 LAB_001031e9: MOV RDI,qword ptr [R14] LAB_001031ec: MOV RAX,qword ptr [RDI + 0x58] LEA RCX,[RAX + 0x18] LEA RDX,[RDI + 0x50] TEST RAX,RAX CMOVZ RCX,RDX MOV qword ptr [RCX],R14 MOV qword ptr [RDI + 0x58],R14 CMP byte ptr [R14 + 0x8],0x1 JNZ 0x00103211 INC qword ptr [RDI + 0x48] LAB_00103211: MOV qword ptr [R14 + 0x10],RBX MOV BL,0x1 LAB_00103217: LEA RDI,[RSP + 0x8] CALL 0x00103352 MOV EAX,EBX ADD RSP,0x18 POP RBX POP R14 RET
/* coro::shared_mutex<coro::thread_pool>::lock_operation::await_suspend(std::__n4861::coroutine_handle<void>) */ ulong __thiscall coro::shared_mutex<coro::thread_pool>::lock_operation::await_suspend (lock_operation *this,int8 param_2) { char cVar1; unique_lock *puVar2; ulong uVar3; unique_lock *puVar4; long local_20; int1 local_18; local_20 = *(long *)this + 0x10; local_18 = 0; /* try { // try from 001031aa to 001031e0 has its CatchHandler @ 0010322b */ std::unique_lock<std::mutex>::lock(); local_18 = 1; puVar4 = *(unique_lock **)this; if (this[8] == (lock_operation)0x1) { if (*(int *)(puVar4 + 0x38) != 0) { LAB_001031ec: puVar2 = (unique_lock *)(*(long *)(puVar4 + 0x58) + 0x18); if (*(long *)(puVar4 + 0x58) == 0) { puVar2 = puVar4 + 0x50; } *(lock_operation **)puVar2 = this; *(lock_operation **)(puVar4 + 0x58) = this; if (this[8] == (lock_operation)0x1) { *(long *)(puVar4 + 0x48) = *(long *)(puVar4 + 0x48) + 1; } *(int8 *)(this + 0x10) = param_2; uVar3 = CONCAT71((int7)((ulong)param_2 >> 8),1); goto LAB_00103217; } *(int4 *)(puVar4 + 0x38) = 2; std::unique_lock<std::mutex>::unlock(); } else { cVar1 = try_lock_shared_locked(puVar4); if (cVar1 == '\0') { puVar4 = *(unique_lock **)this; goto LAB_001031ec; } } uVar3 = 0; LAB_00103217: std::unique_lock<std::mutex>::~unique_lock((unique_lock<std::mutex> *)&local_20); return uVar3 & 0xffffffff; }
5,549
common_chat_params_init_mistral_nemo(minja::chat_template const&, templates_params const&)
llama.cpp/common/chat.cpp
static common_chat_params common_chat_params_init_mistral_nemo(const common_chat_template & tmpl, const struct templates_params & inputs) { common_chat_params data; data.grammar_lazy = inputs.tool_choice != COMMON_CHAT_TOOL_CHOICE_REQUIRED; data.grammar = build_grammar([&](const common_grammar_builder & builder) { auto schemas = json::array(); foreach_function(inputs.tools, [&](const json & tool) { const auto & function = tool.at("function"); schemas.push_back({ {"type", "object"}, {"properties", { // Important note: the model is probably trained to take a JSON stringified arguments value. // It's hard to constrain that for now (while reusing the JSON schema conversion), so we're just expecting a plain object. {"name", { {"type", "string"}, {"const", function.at("name")}, }}, {"arguments", function.at("parameters")}, {"id", { {"type", "string"}, // Nemo's template expects a 9-character alphanumeric ID. {"pattern", "^[a-zA-Z0-9]{9}$"}, }}, }}, {"required", json::array({"name", "arguments", "id"})}, }); }); auto schema = json { {"type", "array"}, {"items", schemas.size() == 1 ? schemas[0] : json {{"anyOf", schemas}}}, {"minItems", 1}, }; if (!inputs.parallel_tool_calls) { schema["maxItems"] = 1; } builder.add_rule("root", "\"[TOOL_CALLS]\" " + builder.add_schema("tool_calls", schema)); }); data.grammar_triggers.push_back({COMMON_GRAMMAR_TRIGGER_TYPE_WORD, "[TOOL_CALLS]"}); data.preserved_tokens = { "[TOOL_CALLS]", }; data.prompt = apply(tmpl, inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt); data.format = COMMON_CHAT_FORMAT_MISTRAL_NEMO; return data; }
O3
cpp
common_chat_params_init_mistral_nemo(minja::chat_template const&, templates_params const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movl $0x0, (%rdi) leaq 0x18(%rdi), %rax movq %rax, 0x8(%rdi) xorl %eax, %eax movq %rax, 0x10(%rdi) movb %al, 0x18(%rdi) leaq 0x38(%rdi), %rcx movq %rcx, 0x28(%rdi) movq %rax, 0x30(%rdi) movb %al, 0x38(%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x50(%rdi) movups %xmm0, 0x60(%rdi) movups %xmm0, 0x70(%rdi) movups %xmm0, 0x80(%rdi) movq %rax, 0x90(%rdi) cmpl $0x1, 0x20(%rdx) setne 0x48(%rdi) leaq 0x38(%rsp), %rsi movq %rax, 0x8(%rsi) movq %rdx, (%rsi) leaq 0xd97a(%rip), %rcx # 0xaa4c8 movq %rcx, 0x18(%rsi) leaq 0xe2c9(%rip), %rcx # 0xaae22 movq %rcx, 0x10(%rsi) leaq 0x58(%rsp), %rdx movb %al, (%rdx) leaq 0x8(%rsp), %rdi callq 0xfd1ce leaq 0x28(%rbx), %rdi leaq 0x8(%rsp), %r12 movq %r12, %rsi callq 0x20890 movq (%r12), %rdi leaq 0x18(%rsp), %r13 cmpq %r13, %rdi je 0x9cb9a movq 0x18(%rsp), %rsi incq %rsi callq 0x20170 movq 0x48(%rsp), %rax testq %rax, %rax je 0x9cbb3 leaq 0x38(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x10(%rsp), %rdi movl $0x1, -0x8(%rdi) leaq 0x20(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x82acb(%rip), %rsi # 0x11f69b leaq 0x82ad0(%rip), %rdx # 0x11f6a7 callq 0x28e86 leaq 0x50(%rbx), %rdi leaq 0x8(%rsp), %rsi movl $0xffffffff, 0x28(%rsi) # imm = 0xFFFFFFFF callq 0xb2a4c movq 0x10(%rsp), %rdi cmpq %r12, %rdi je 0x9cc08 movq 0x20(%rsp), %rsi incq %rsi callq 0x20170 leaq 0x8(%rsp), %rdi movq %r13, (%rdi) leaq 0x82a84(%rip), %rsi # 0x11f69b leaq 0x82a89(%rip), %rdx # 0x11f6a7 callq 0x28e86 leaq 0x68(%rbx), %rdi leaq 0x28(%rsp), %rdx leaq 0x8(%rsp), %rsi callq 0x294b2 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x9cc4d movq 0x18(%rsp), %rsi incq %rsi callq 0x20170 movzbl 0x10(%r14), %eax testl %eax, %eax je 0x9cc7d cmpl $0x2, %eax je 0x9cc60 cmpl $0x1, %eax jne 0x9cc6d movq 0x18(%r14), %rax movq (%rax), %rcx cmpq 0x8(%rax), %rcx je 0x9cc7d leaq 0x10(%r14), %rsi leaq 0x38(%rsp), %rdi callq 0x89b18 jmp 0x9ccaa leaq 0x38(%rsp), %r12 movb $0x0, (%r12) movq $0x0, 0x8(%r12) movq %r12, %rdi movl $0x1, %esi callq 0x858ca movq %r12, %rdi movl $0x1, %esi callq 0x858ca movzbl 0x60(%r14), %ebp leaq 0x58(%rsp), %r12 movb $0x0, (%r12) movq $0x0, 0x8(%r12) movq %r12, %rdi movl $0x1, %esi callq 0x858ca movq %r12, %rdi movl $0x1, %esi callq 0x858ca leaq 0x8(%rsp), %rdi leaq 0x38(%rsp), %rcx movq %r15, %rsi movq %r14, %rdx movl %ebp, %r8d movq %r12, %r9 callq 0x9ce05 leaq 0x8(%rbx), %rdi leaq 0x8(%rsp), %r14 movq %r14, %rsi callq 0x20890 movq (%r14), %rdi cmpq %r13, %rdi je 0x9cd1d movq 0x18(%rsp), %rsi incq %rsi callq 0x20170 leaq 0x58(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x858ca movq %r14, %rdi callq 0x89fe4 leaq 0x38(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x858ca movq %r14, %rdi callq 0x89fe4 movl $0x2, (%rbx) addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x9cdcc jmp 0x9cdfd movq %rax, %r14 leaq 0x58(%rsp), %r15 movq %r15, %rdi xorl %esi, %esi callq 0x858ca movq %r15, %rdi callq 0x89fe4 leaq 0x38(%rsp), %r15 movq %r15, %rdi xorl %esi, %esi callq 0x858ca movq %r15, %rdi callq 0x89fe4 jmp 0x9cdcf movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x9cdcf movq 0x18(%rsp), %rsi jmp 0x9cdc2 jmp 0x9cdcc movq %rax, %r14 movq 0x10(%rsp), %rdi cmpq %r12, %rdi je 0x9cdcf movq 0x20(%rsp), %rsi incq %rsi callq 0x20170 jmp 0x9cdcf movq %rax, %r14 movq %rbx, %rdi callq 0xb2296 movq %r14, %rdi callq 0x20ad0 movq %rax, %r14 movq 0x48(%rsp), %rax testq %rax, %rax je 0x9cdcf leaq 0x38(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0x9cdcf movq %rax, %rdi callq 0x27b48
_ZL36common_chat_params_init_mistral_nemoRKN5minja13chat_templateERK16templates_params: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r14, rdx mov r15, rsi mov rbx, rdi mov dword ptr [rdi], 0 lea rax, [rdi+18h] mov [rdi+8], rax xor eax, eax mov [rdi+10h], rax mov [rdi+18h], al lea rcx, [rdi+38h] mov [rdi+28h], rcx mov [rdi+30h], rax mov [rdi+38h], al xorps xmm0, xmm0 movups xmmword ptr [rdi+50h], xmm0 movups xmmword ptr [rdi+60h], xmm0 movups xmmword ptr [rdi+70h], xmm0 movups xmmword ptr [rdi+80h], xmm0 mov [rdi+90h], rax cmp dword ptr [rdx+20h], 1 setnz byte ptr [rdi+48h] lea rsi, [rsp+98h+var_60] mov [rsi+8], rax mov [rsi], rdx lea rcx, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL36common_chat_params_init_mistral_nemoRKN5minja13chat_templateERK16templates_paramsE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_mistral_nemo(minja::chat_template const&,templates_params const&)::$_0>::_M_invoke(std::_Any_data const&,common_grammar_builder const&) mov [rsi+18h], rcx lea rcx, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL36common_chat_params_init_mistral_nemoRKN5minja13chat_templateERK16templates_paramsE3$_0E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_mistral_nemo(minja::chat_template const&,templates_params const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsi+10h], rcx lea rdx, [rsp+98h+var_40] mov [rdx], al lea rdi, [rsp+98h+var_90] call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&) lea rdi, [rbx+28h] lea r12, [rsp+98h+var_90] mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r12]; void * lea r13, [rsp+98h+var_80] cmp rdi, r13 jz short loc_9CB9A mov rsi, [rsp+98h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9CB9A: mov rax, [rsp+98h+var_50] test rax, rax jz short loc_9CBB3 lea rdi, [rsp+98h+var_60] mov rsi, rdi mov edx, 3 call rax loc_9CBB3: lea rdi, [rsp+98h+var_88] mov dword ptr [rdi-8], 1 lea r12, [rsp+98h+var_78] mov [r12-10h], r12 lea rsi, aToolCalls_0; "[TOOL_CALLS]" lea rdx, aToolCalls_0+0Ch; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rbx+50h] lea rsi, [rsp+98h+var_90] mov dword ptr [rsi+28h], 0FFFFFFFFh call _ZNSt6vectorI22common_grammar_triggerSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<common_grammar_trigger>::emplace_back<common_grammar_trigger>(common_grammar_trigger &&) mov rdi, [rsp+98h+var_88]; void * cmp rdi, r12 jz short loc_9CC08 mov rsi, [rsp+98h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9CC08: lea rdi, [rsp+98h+var_90] mov [rdi], r13 lea rsi, aToolCalls_0; "[TOOL_CALLS]" lea rdx, aToolCalls_0+0Ch; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rbx+68h] lea rdx, [rsp+98h+var_70] lea rsi, [rsp+98h+var_90] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE13_M_assign_auxIPKS5_EEvT_SB_St20forward_iterator_tag; std::vector<std::string>::_M_assign_aux<std::string const*>(std::string const*,std::string const*,std::forward_iterator_tag) mov rdi, [rsp+98h+var_90]; void * cmp rdi, r13 jz short loc_9CC4D mov rsi, [rsp+98h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9CC4D: movzx eax, byte ptr [r14+10h] test eax, eax jz short loc_9CC7D cmp eax, 2 jz short loc_9CC60 cmp eax, 1 jnz short loc_9CC6D loc_9CC60: mov rax, [r14+18h] mov rcx, [rax] cmp rcx, [rax+8] jz short loc_9CC7D loc_9CC6D: lea rsi, [r14+10h] lea rdi, [rsp+98h+var_60] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) jmp short loc_9CCAA loc_9CC7D: lea r12, [rsp+98h+var_60] mov byte ptr [r12], 0 mov qword ptr [r12+8], 0 mov rdi, r12 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r12 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) loc_9CCAA: movzx ebp, byte ptr [r14+60h] lea r12, [rsp+98h+var_40] mov byte ptr [r12], 0 mov qword ptr [r12+8], 0 mov rdi, r12 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r12 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) lea rdi, [rsp+98h+var_90] lea rcx, [rsp+98h+var_60] mov rsi, r15 mov rdx, r14 mov r8d, ebp mov r9, r12 call _ZL5applyRKN5minja13chat_templateERKN8nlohmann16json_abi_v3_11_310basic_jsonINS4_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS4_14adl_serializerES7_IhSaIhEEvEESJ_bSJ_; apply(minja::chat_template const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) lea rdi, [rbx+8] lea r14, [rsp+98h+var_90] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r14]; void * cmp rdi, r13 jz short loc_9CD1D mov rsi, [rsp+98h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9CD1D: lea r14, [rsp+98h+var_40] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea r14, [rsp+98h+var_60] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov dword ptr [rbx], 2 add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_9CDCC jmp loc_9CDFD mov r14, rax lea r15, [rsp+98h+var_40] mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea r15, [rsp+98h+var_60] mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_9CDCF mov r14, rax mov rdi, [rsp+98h+var_90] cmp rdi, r13 jz short loc_9CDCF mov rsi, [rsp+98h+var_80] jmp short loc_9CDC2 jmp short loc_9CDCC mov r14, rax mov rdi, [rsp+98h+var_88]; void * cmp rdi, r12 jz short loc_9CDCF mov rsi, [rsp+98h+var_78] loc_9CDC2: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9CDCF loc_9CDCC: mov r14, rax loc_9CDCF: mov rdi, rbx; this call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params() mov rdi, r14 call __Unwind_Resume mov r14, rax mov rax, [rsp+98h+var_50] test rax, rax jz short loc_9CDCF lea rdi, [rsp+98h+var_60] mov rsi, rdi mov edx, 3 call rax jmp short loc_9CDCF loc_9CDFD: mov rdi, rax call __clang_call_terminate
long long common_chat_params_init_mistral_nemo(long long a1, int a2, long long a3) { int v4; // eax int v5; // ebp long long result; // rax void *v7; // [rsp+8h] [rbp-90h] BYREF void *v8; // [rsp+10h] [rbp-88h] BYREF long long v9; // [rsp+18h] [rbp-80h] BYREF long long v10; // [rsp+20h] [rbp-78h] BYREF long long v11; // [rsp+28h] [rbp-70h] BYREF int v12; // [rsp+30h] [rbp-68h] long long v13; // [rsp+38h] [rbp-60h] BYREF long long v14; // [rsp+40h] [rbp-58h] long long ( *v15)(); // [rsp+48h] [rbp-50h] long long ( *v16)(); // [rsp+50h] [rbp-48h] char v17[8]; // [rsp+58h] [rbp-40h] BYREF long long v18; // [rsp+60h] [rbp-38h] *(_DWORD *)a1 = 0; *(_QWORD *)(a1 + 8) = a1 + 24; *(_QWORD *)(a1 + 16) = 0LL; *(_BYTE *)(a1 + 24) = 0; *(_QWORD *)(a1 + 40) = a1 + 56; *(_QWORD *)(a1 + 48) = 0LL; *(_BYTE *)(a1 + 56) = 0; *(_OWORD *)(a1 + 80) = 0LL; *(_OWORD *)(a1 + 96) = 0LL; *(_OWORD *)(a1 + 112) = 0LL; *(_OWORD *)(a1 + 128) = 0LL; *(_QWORD *)(a1 + 144) = 0LL; *(_BYTE *)(a1 + 72) = *(_DWORD *)(a3 + 32) != 1; v14 = 0LL; v13 = a3; v16 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_mistral_nemo(minja::chat_template const&,templates_params const&)::$_0>::_M_invoke; v15 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_mistral_nemo(minja::chat_template const&,templates_params const&)::$_0>::_M_manager; v17[0] = 0; build_grammar[abi:cxx11](&v7, &v13, v17); std::string::operator=(a1 + 40, &v7); if ( v7 != &v9 ) operator delete(v7, v9 + 1); if ( v15 ) ((void ( *)(long long *, long long *, long long))v15)(&v13, &v13, 3LL); LODWORD(v7) = 1; v8 = &v10; std::string::_M_construct<char const*>((long long)&v8, "[TOOL_CALLS]", (long long)""); v12 = -1; std::vector<common_grammar_trigger>::emplace_back<common_grammar_trigger>(a1 + 80, &v7); if ( v8 != &v10 ) operator delete(v8, v10 + 1); v7 = &v9; std::string::_M_construct<char const*>((long long)&v7, "[TOOL_CALLS]", (long long)""); std::vector<std::string>::_M_assign_aux<std::string const*>((long long *)(a1 + 104), (long long)&v7, &v11); if ( v7 != &v9 ) operator delete(v7, v9 + 1); v4 = *(unsigned __int8 *)(a3 + 16); if ( !*(_BYTE *)(a3 + 16) || (v4 == 2 || v4 == 1) && **(_QWORD **)(a3 + 24) == *(_QWORD *)(*(_QWORD *)(a3 + 24) + 8LL) ) { LOBYTE(v13) = 0; v14 = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v13); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v13); } else { nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( (unsigned __int8 *)&v13, (unsigned __int8 *)(a3 + 16)); } v5 = *(unsigned __int8 *)(a3 + 96); v17[0] = 0; v18 = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v17); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v17); apply((unsigned int)&v7, a2, a3, (unsigned int)&v13, v5, (unsigned int)v17); std::string::operator=(a1 + 8, &v7); if ( v7 != &v9 ) operator delete(v7, v9 + 1); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v17); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v17); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v13); result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v13); *(_DWORD *)a1 = 2; return result; }
common_chat_params_init_mistral_nemo: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV dword ptr [RDI],0x0 LEA RAX,[RDI + 0x18] MOV qword ptr [RDI + 0x8],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x10],RAX MOV byte ptr [RDI + 0x18],AL LEA RCX,[RDI + 0x38] MOV qword ptr [RDI + 0x28],RCX MOV qword ptr [RDI + 0x30],RAX MOV byte ptr [RDI + 0x38],AL XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x50],XMM0 MOVUPS xmmword ptr [RDI + 0x60],XMM0 MOVUPS xmmword ptr [RDI + 0x70],XMM0 MOVUPS xmmword ptr [RDI + 0x80],XMM0 MOV qword ptr [RDI + 0x90],RAX CMP dword ptr [RDX + 0x20],0x1 SETNZ byte ptr [RDI + 0x48] LEA RSI,[RSP + 0x38] MOV qword ptr [RSI + 0x8],RAX MOV qword ptr [RSI],RDX LEA RCX,[0x1aa4c8] MOV qword ptr [RSI + 0x18],RCX LEA RCX,[0x1aae22] MOV qword ptr [RSI + 0x10],RCX LEA RDX,[RSP + 0x58] MOV byte ptr [RDX],AL LAB_0019cb64: LEA RDI,[RSP + 0x8] CALL 0x001fd1ce LEA RDI,[RBX + 0x28] LEA R12,[RSP + 0x8] MOV RSI,R12 CALL 0x00120890 MOV RDI,qword ptr [R12] LEA R13,[RSP + 0x18] CMP RDI,R13 JZ 0x0019cb9a MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00120170 LAB_0019cb9a: MOV RAX,qword ptr [RSP + 0x48] TEST RAX,RAX JZ 0x0019cbb3 LAB_0019cba4: LEA RDI,[RSP + 0x38] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0019cbb3: LEA RDI,[RSP + 0x10] MOV dword ptr [RDI + -0x8],0x1 LEA R12,[RSP + 0x20] MOV qword ptr [R12 + -0x10],R12 LAB_0019cbc9: LEA RSI,[0x21f69b] LEA RDX,[0x21f6a7] CALL 0x00128e86 LEA RDI,[RBX + 0x50] LEA RSI,[RSP + 0x8] MOV dword ptr [RSI + 0x28],0xffffffff LAB_0019cbec: CALL 0x001b2a4c MOV RDI,qword ptr [RSP + 0x10] CMP RDI,R12 JZ 0x0019cc08 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x00120170 LAB_0019cc08: LEA RDI,[RSP + 0x8] MOV qword ptr [RDI],R13 LAB_0019cc10: LEA RSI,[0x21f69b] LEA RDX,[0x21f6a7] CALL 0x00128e86 LEA RDI,[RBX + 0x68] LEA RDX,[RSP + 0x28] LAB_0019cc2c: LEA RSI,[RSP + 0x8] CALL 0x001294b2 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R13 JZ 0x0019cc4d MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00120170 LAB_0019cc4d: MOVZX EAX,byte ptr [R14 + 0x10] TEST EAX,EAX JZ 0x0019cc7d CMP EAX,0x2 JZ 0x0019cc60 CMP EAX,0x1 JNZ 0x0019cc6d LAB_0019cc60: MOV RAX,qword ptr [R14 + 0x18] MOV RCX,qword ptr [RAX] CMP RCX,qword ptr [RAX + 0x8] JZ 0x0019cc7d LAB_0019cc6d: LEA RSI,[R14 + 0x10] LEA RDI,[RSP + 0x38] CALL 0x00189b18 JMP 0x0019ccaa LAB_0019cc7d: LEA R12,[RSP + 0x38] MOV byte ptr [R12],0x0 MOV qword ptr [R12 + 0x8],0x0 MOV RDI,R12 MOV ESI,0x1 CALL 0x001858ca MOV RDI,R12 MOV ESI,0x1 CALL 0x001858ca LAB_0019ccaa: MOVZX EBP,byte ptr [R14 + 0x60] LEA R12,[RSP + 0x58] MOV byte ptr [R12],0x0 MOV qword ptr [R12 + 0x8],0x0 MOV RDI,R12 MOV ESI,0x1 CALL 0x001858ca MOV RDI,R12 MOV ESI,0x1 CALL 0x001858ca LAB_0019ccdc: LEA RDI,[RSP + 0x8] LEA RCX,[RSP + 0x38] MOV RSI,R15 MOV RDX,R14 MOV R8D,EBP MOV R9,R12 CALL 0x0019ce05 LAB_0019ccf7: LEA RDI,[RBX + 0x8] LEA R14,[RSP + 0x8] MOV RSI,R14 CALL 0x00120890 MOV RDI,qword ptr [R14] CMP RDI,R13 JZ 0x0019cd1d MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00120170 LAB_0019cd1d: LEA R14,[RSP + 0x58] MOV RDI,R14 XOR ESI,ESI CALL 0x001858ca MOV RDI,R14 CALL 0x00189fe4 LEA R14,[RSP + 0x38] MOV RDI,R14 XOR ESI,ESI CALL 0x001858ca MOV RDI,R14 CALL 0x00189fe4 MOV dword ptr [RBX],0x2 ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_params_init_mistral_nemo(minja::chat_template const&, templates_params const&) */ void common_chat_params_init_mistral_nemo(chat_template *param_1,templates_params *param_2) { basic_json bVar1; basic_json *in_RDX; long *local_90; long *local_88; long local_80; long local_78; int1 local_70 [8]; int4 local_68; basic_json *local_60; int8 local_58; code *local_50; code *local_48; data local_40 [8]; int8 local_38; *(int4 *)param_1 = 0; *(chat_template **)(param_1 + 8) = param_1 + 0x18; *(int8 *)(param_1 + 0x10) = 0; param_1[0x18] = (chat_template)0x0; *(chat_template **)(param_1 + 0x28) = param_1 + 0x38; *(int8 *)(param_1 + 0x30) = 0; param_1[0x38] = (chat_template)0x0; *(int8 *)(param_1 + 0x50) = 0; *(int8 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 0x60) = 0; *(int8 *)(param_1 + 0x68) = 0; *(int8 *)(param_1 + 0x70) = 0; *(int8 *)(param_1 + 0x78) = 0; *(int8 *)(param_1 + 0x80) = 0; *(int8 *)(param_1 + 0x88) = 0; *(int8 *)(param_1 + 0x90) = 0; param_1[0x48] = (chat_template)(*(int *)(in_RDX + 0x20) != 1); local_58 = 0; local_48 = std:: _Function_handler<void(common_grammar_builder_const&),common_chat_params_init_mistral_nemo(minja::chat_template_const&,templates_params_const&)::$_0> ::_M_invoke; local_50 = std:: _Function_handler<void(common_grammar_builder_const&),common_chat_params_init_mistral_nemo(minja::chat_template_const&,templates_params_const&)::$_0> ::_M_manager; local_40[0] = (data)0x0; /* try { // try from 0019cb64 to 0019cb6d has its CatchHandler @ 0019cddf */ local_60 = in_RDX; build_grammar_abi_cxx11_((function *)&local_90,(common_grammar_options *)&local_60); std::__cxx11::string::operator=((string *)(param_1 + 0x28),(string *)&local_90); if (local_90 != &local_80) { operator_delete(local_90,local_80 + 1); } if (local_50 != (code *)0x0) { /* try { // try from 0019cba4 to 0019cbb2 has its CatchHandler @ 0019cd62 */ (*local_50)(&local_60,&local_60,3); } local_90 = (long *)CONCAT44(local_90._4_4_,1); local_88 = &local_78; /* try { // try from 0019cbc9 to 0019cbdb has its CatchHandler @ 0019cdcc */ std::__cxx11::string::_M_construct<char_const*>(&local_88,"[TOOL_CALLS]",""); local_68 = 0xffffffff; /* try { // try from 0019cbec to 0019cbf0 has its CatchHandler @ 0019cdb0 */ std::vector<common_grammar_trigger,std::allocator<common_grammar_trigger>>:: emplace_back<common_grammar_trigger> ((vector<common_grammar_trigger,std::allocator<common_grammar_trigger>> *) (param_1 + 0x50),(common_grammar_trigger *)&local_90); if (local_88 != &local_78) { operator_delete(local_88,local_78 + 1); } local_90 = &local_80; /* try { // try from 0019cc10 to 0019cc22 has its CatchHandler @ 0019cdae */ std::__cxx11::string::_M_construct<char_const*>(&local_90,"[TOOL_CALLS]",""); /* try { // try from 0019cc2c to 0019cc35 has its CatchHandler @ 0019cd9a */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: _M_assign_aux<std::__cxx11::string_const*>(param_1 + 0x68,&local_90,local_70); if (local_90 != &local_80) { operator_delete(local_90,local_80 + 1); } bVar1 = in_RDX[0x10]; if ((bVar1 == (basic_json)0x0) || (((bVar1 == (basic_json)0x2 || (bVar1 == (basic_json)0x1)) && (**(long **)(in_RDX + 0x18) == (*(long **)(in_RDX + 0x18))[1])))) { local_60 = (basic_json *)((ulong)local_60 & 0xffffffffffffff00); local_58 = 0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_60,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_60,0)); } else { /* try { // try from 0019cc6d to 0019cc7a has its CatchHandler @ 0019cd60 */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)&local_60,in_RDX + 0x10); } bVar1 = in_RDX[0x60]; local_40[0] = (data)0x0; local_38 = 0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_40,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_40,0)); /* try { // try from 0019ccdc to 0019ccf6 has its CatchHandler @ 0019cd67 */ apply((chat_template *)&local_90,(basic_json *)param_2,in_RDX,SUB81(&local_60,0), (basic_json *)(ulong)(byte)bVar1); std::__cxx11::string::operator=((string *)(param_1 + 8),(string *)&local_90); if (local_90 != &local_80) { operator_delete(local_90,local_80 + 1); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_40,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_40); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81((data *)&local_60,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)&local_60); *(int4 *)param_1 = 2; return; }
5,550
fmt::v11::detail::is_printable(unsigned int)
zkingston[P]unknot/build_O1/_deps/fmt-src/include/fmt/format-inl.h
FMT_FUNC auto is_printable(uint32_t cp) -> bool { static constexpr singleton singletons0[] = { {0x00, 1}, {0x03, 5}, {0x05, 6}, {0x06, 3}, {0x07, 6}, {0x08, 8}, {0x09, 17}, {0x0a, 28}, {0x0b, 25}, {0x0c, 20}, {0x0d, 16}, {0x0e, 13}, {0x0f, 4}, {0x10, 3}, {0x12, 18}, {0x13, 9}, {0x16, 1}, {0x17, 5}, {0x18, 2}, {0x19, 3}, {0x1a, 7}, {0x1c, 2}, {0x1d, 1}, {0x1f, 22}, {0x20, 3}, {0x2b, 3}, {0x2c, 2}, {0x2d, 11}, {0x2e, 1}, {0x30, 3}, {0x31, 2}, {0x32, 1}, {0xa7, 2}, {0xa9, 2}, {0xaa, 4}, {0xab, 8}, {0xfa, 2}, {0xfb, 5}, {0xfd, 4}, {0xfe, 3}, {0xff, 9}, }; static constexpr unsigned char singletons0_lower[] = { 0xad, 0x78, 0x79, 0x8b, 0x8d, 0xa2, 0x30, 0x57, 0x58, 0x8b, 0x8c, 0x90, 0x1c, 0x1d, 0xdd, 0x0e, 0x0f, 0x4b, 0x4c, 0xfb, 0xfc, 0x2e, 0x2f, 0x3f, 0x5c, 0x5d, 0x5f, 0xb5, 0xe2, 0x84, 0x8d, 0x8e, 0x91, 0x92, 0xa9, 0xb1, 0xba, 0xbb, 0xc5, 0xc6, 0xc9, 0xca, 0xde, 0xe4, 0xe5, 0xff, 0x00, 0x04, 0x11, 0x12, 0x29, 0x31, 0x34, 0x37, 0x3a, 0x3b, 0x3d, 0x49, 0x4a, 0x5d, 0x84, 0x8e, 0x92, 0xa9, 0xb1, 0xb4, 0xba, 0xbb, 0xc6, 0xca, 0xce, 0xcf, 0xe4, 0xe5, 0x00, 0x04, 0x0d, 0x0e, 0x11, 0x12, 0x29, 0x31, 0x34, 0x3a, 0x3b, 0x45, 0x46, 0x49, 0x4a, 0x5e, 0x64, 0x65, 0x84, 0x91, 0x9b, 0x9d, 0xc9, 0xce, 0xcf, 0x0d, 0x11, 0x29, 0x45, 0x49, 0x57, 0x64, 0x65, 0x8d, 0x91, 0xa9, 0xb4, 0xba, 0xbb, 0xc5, 0xc9, 0xdf, 0xe4, 0xe5, 0xf0, 0x0d, 0x11, 0x45, 0x49, 0x64, 0x65, 0x80, 0x84, 0xb2, 0xbc, 0xbe, 0xbf, 0xd5, 0xd7, 0xf0, 0xf1, 0x83, 0x85, 0x8b, 0xa4, 0xa6, 0xbe, 0xbf, 0xc5, 0xc7, 0xce, 0xcf, 0xda, 0xdb, 0x48, 0x98, 0xbd, 0xcd, 0xc6, 0xce, 0xcf, 0x49, 0x4e, 0x4f, 0x57, 0x59, 0x5e, 0x5f, 0x89, 0x8e, 0x8f, 0xb1, 0xb6, 0xb7, 0xbf, 0xc1, 0xc6, 0xc7, 0xd7, 0x11, 0x16, 0x17, 0x5b, 0x5c, 0xf6, 0xf7, 0xfe, 0xff, 0x80, 0x0d, 0x6d, 0x71, 0xde, 0xdf, 0x0e, 0x0f, 0x1f, 0x6e, 0x6f, 0x1c, 0x1d, 0x5f, 0x7d, 0x7e, 0xae, 0xaf, 0xbb, 0xbc, 0xfa, 0x16, 0x17, 0x1e, 0x1f, 0x46, 0x47, 0x4e, 0x4f, 0x58, 0x5a, 0x5c, 0x5e, 0x7e, 0x7f, 0xb5, 0xc5, 0xd4, 0xd5, 0xdc, 0xf0, 0xf1, 0xf5, 0x72, 0x73, 0x8f, 0x74, 0x75, 0x96, 0x2f, 0x5f, 0x26, 0x2e, 0x2f, 0xa7, 0xaf, 0xb7, 0xbf, 0xc7, 0xcf, 0xd7, 0xdf, 0x9a, 0x40, 0x97, 0x98, 0x30, 0x8f, 0x1f, 0xc0, 0xc1, 0xce, 0xff, 0x4e, 0x4f, 0x5a, 0x5b, 0x07, 0x08, 0x0f, 0x10, 0x27, 0x2f, 0xee, 0xef, 0x6e, 0x6f, 0x37, 0x3d, 0x3f, 0x42, 0x45, 0x90, 0x91, 0xfe, 0xff, 0x53, 0x67, 0x75, 0xc8, 0xc9, 0xd0, 0xd1, 0xd8, 0xd9, 0xe7, 0xfe, 0xff, }; static constexpr singleton singletons1[] = { {0x00, 6}, {0x01, 1}, {0x03, 1}, {0x04, 2}, {0x08, 8}, {0x09, 2}, {0x0a, 5}, {0x0b, 2}, {0x0e, 4}, {0x10, 1}, {0x11, 2}, {0x12, 5}, {0x13, 17}, {0x14, 1}, {0x15, 2}, {0x17, 2}, {0x19, 13}, {0x1c, 5}, {0x1d, 8}, {0x24, 1}, {0x6a, 3}, {0x6b, 2}, {0xbc, 2}, {0xd1, 2}, {0xd4, 12}, {0xd5, 9}, {0xd6, 2}, {0xd7, 2}, {0xda, 1}, {0xe0, 5}, {0xe1, 2}, {0xe8, 2}, {0xee, 32}, {0xf0, 4}, {0xf8, 2}, {0xf9, 2}, {0xfa, 2}, {0xfb, 1}, }; static constexpr unsigned char singletons1_lower[] = { 0x0c, 0x27, 0x3b, 0x3e, 0x4e, 0x4f, 0x8f, 0x9e, 0x9e, 0x9f, 0x06, 0x07, 0x09, 0x36, 0x3d, 0x3e, 0x56, 0xf3, 0xd0, 0xd1, 0x04, 0x14, 0x18, 0x36, 0x37, 0x56, 0x57, 0x7f, 0xaa, 0xae, 0xaf, 0xbd, 0x35, 0xe0, 0x12, 0x87, 0x89, 0x8e, 0x9e, 0x04, 0x0d, 0x0e, 0x11, 0x12, 0x29, 0x31, 0x34, 0x3a, 0x45, 0x46, 0x49, 0x4a, 0x4e, 0x4f, 0x64, 0x65, 0x5c, 0xb6, 0xb7, 0x1b, 0x1c, 0x07, 0x08, 0x0a, 0x0b, 0x14, 0x17, 0x36, 0x39, 0x3a, 0xa8, 0xa9, 0xd8, 0xd9, 0x09, 0x37, 0x90, 0x91, 0xa8, 0x07, 0x0a, 0x3b, 0x3e, 0x66, 0x69, 0x8f, 0x92, 0x6f, 0x5f, 0xee, 0xef, 0x5a, 0x62, 0x9a, 0x9b, 0x27, 0x28, 0x55, 0x9d, 0xa0, 0xa1, 0xa3, 0xa4, 0xa7, 0xa8, 0xad, 0xba, 0xbc, 0xc4, 0x06, 0x0b, 0x0c, 0x15, 0x1d, 0x3a, 0x3f, 0x45, 0x51, 0xa6, 0xa7, 0xcc, 0xcd, 0xa0, 0x07, 0x19, 0x1a, 0x22, 0x25, 0x3e, 0x3f, 0xc5, 0xc6, 0x04, 0x20, 0x23, 0x25, 0x26, 0x28, 0x33, 0x38, 0x3a, 0x48, 0x4a, 0x4c, 0x50, 0x53, 0x55, 0x56, 0x58, 0x5a, 0x5c, 0x5e, 0x60, 0x63, 0x65, 0x66, 0x6b, 0x73, 0x78, 0x7d, 0x7f, 0x8a, 0xa4, 0xaa, 0xaf, 0xb0, 0xc0, 0xd0, 0xae, 0xaf, 0x79, 0xcc, 0x6e, 0x6f, 0x93, }; static constexpr unsigned char normal0[] = { 0x00, 0x20, 0x5f, 0x22, 0x82, 0xdf, 0x04, 0x82, 0x44, 0x08, 0x1b, 0x04, 0x06, 0x11, 0x81, 0xac, 0x0e, 0x80, 0xab, 0x35, 0x28, 0x0b, 0x80, 0xe0, 0x03, 0x19, 0x08, 0x01, 0x04, 0x2f, 0x04, 0x34, 0x04, 0x07, 0x03, 0x01, 0x07, 0x06, 0x07, 0x11, 0x0a, 0x50, 0x0f, 0x12, 0x07, 0x55, 0x07, 0x03, 0x04, 0x1c, 0x0a, 0x09, 0x03, 0x08, 0x03, 0x07, 0x03, 0x02, 0x03, 0x03, 0x03, 0x0c, 0x04, 0x05, 0x03, 0x0b, 0x06, 0x01, 0x0e, 0x15, 0x05, 0x3a, 0x03, 0x11, 0x07, 0x06, 0x05, 0x10, 0x07, 0x57, 0x07, 0x02, 0x07, 0x15, 0x0d, 0x50, 0x04, 0x43, 0x03, 0x2d, 0x03, 0x01, 0x04, 0x11, 0x06, 0x0f, 0x0c, 0x3a, 0x04, 0x1d, 0x25, 0x5f, 0x20, 0x6d, 0x04, 0x6a, 0x25, 0x80, 0xc8, 0x05, 0x82, 0xb0, 0x03, 0x1a, 0x06, 0x82, 0xfd, 0x03, 0x59, 0x07, 0x15, 0x0b, 0x17, 0x09, 0x14, 0x0c, 0x14, 0x0c, 0x6a, 0x06, 0x0a, 0x06, 0x1a, 0x06, 0x59, 0x07, 0x2b, 0x05, 0x46, 0x0a, 0x2c, 0x04, 0x0c, 0x04, 0x01, 0x03, 0x31, 0x0b, 0x2c, 0x04, 0x1a, 0x06, 0x0b, 0x03, 0x80, 0xac, 0x06, 0x0a, 0x06, 0x21, 0x3f, 0x4c, 0x04, 0x2d, 0x03, 0x74, 0x08, 0x3c, 0x03, 0x0f, 0x03, 0x3c, 0x07, 0x38, 0x08, 0x2b, 0x05, 0x82, 0xff, 0x11, 0x18, 0x08, 0x2f, 0x11, 0x2d, 0x03, 0x20, 0x10, 0x21, 0x0f, 0x80, 0x8c, 0x04, 0x82, 0x97, 0x19, 0x0b, 0x15, 0x88, 0x94, 0x05, 0x2f, 0x05, 0x3b, 0x07, 0x02, 0x0e, 0x18, 0x09, 0x80, 0xb3, 0x2d, 0x74, 0x0c, 0x80, 0xd6, 0x1a, 0x0c, 0x05, 0x80, 0xff, 0x05, 0x80, 0xdf, 0x0c, 0xee, 0x0d, 0x03, 0x84, 0x8d, 0x03, 0x37, 0x09, 0x81, 0x5c, 0x14, 0x80, 0xb8, 0x08, 0x80, 0xcb, 0x2a, 0x38, 0x03, 0x0a, 0x06, 0x38, 0x08, 0x46, 0x08, 0x0c, 0x06, 0x74, 0x0b, 0x1e, 0x03, 0x5a, 0x04, 0x59, 0x09, 0x80, 0x83, 0x18, 0x1c, 0x0a, 0x16, 0x09, 0x4c, 0x04, 0x80, 0x8a, 0x06, 0xab, 0xa4, 0x0c, 0x17, 0x04, 0x31, 0xa1, 0x04, 0x81, 0xda, 0x26, 0x07, 0x0c, 0x05, 0x05, 0x80, 0xa5, 0x11, 0x81, 0x6d, 0x10, 0x78, 0x28, 0x2a, 0x06, 0x4c, 0x04, 0x80, 0x8d, 0x04, 0x80, 0xbe, 0x03, 0x1b, 0x03, 0x0f, 0x0d, }; static constexpr unsigned char normal1[] = { 0x5e, 0x22, 0x7b, 0x05, 0x03, 0x04, 0x2d, 0x03, 0x66, 0x03, 0x01, 0x2f, 0x2e, 0x80, 0x82, 0x1d, 0x03, 0x31, 0x0f, 0x1c, 0x04, 0x24, 0x09, 0x1e, 0x05, 0x2b, 0x05, 0x44, 0x04, 0x0e, 0x2a, 0x80, 0xaa, 0x06, 0x24, 0x04, 0x24, 0x04, 0x28, 0x08, 0x34, 0x0b, 0x01, 0x80, 0x90, 0x81, 0x37, 0x09, 0x16, 0x0a, 0x08, 0x80, 0x98, 0x39, 0x03, 0x63, 0x08, 0x09, 0x30, 0x16, 0x05, 0x21, 0x03, 0x1b, 0x05, 0x01, 0x40, 0x38, 0x04, 0x4b, 0x05, 0x2f, 0x04, 0x0a, 0x07, 0x09, 0x07, 0x40, 0x20, 0x27, 0x04, 0x0c, 0x09, 0x36, 0x03, 0x3a, 0x05, 0x1a, 0x07, 0x04, 0x0c, 0x07, 0x50, 0x49, 0x37, 0x33, 0x0d, 0x33, 0x07, 0x2e, 0x08, 0x0a, 0x81, 0x26, 0x52, 0x4e, 0x28, 0x08, 0x2a, 0x56, 0x1c, 0x14, 0x17, 0x09, 0x4e, 0x04, 0x1e, 0x0f, 0x43, 0x0e, 0x19, 0x07, 0x0a, 0x06, 0x48, 0x08, 0x27, 0x09, 0x75, 0x0b, 0x3f, 0x41, 0x2a, 0x06, 0x3b, 0x05, 0x0a, 0x06, 0x51, 0x06, 0x01, 0x05, 0x10, 0x03, 0x05, 0x80, 0x8b, 0x62, 0x1e, 0x48, 0x08, 0x0a, 0x80, 0xa6, 0x5e, 0x22, 0x45, 0x0b, 0x0a, 0x06, 0x0d, 0x13, 0x39, 0x07, 0x0a, 0x36, 0x2c, 0x04, 0x10, 0x80, 0xc0, 0x3c, 0x64, 0x53, 0x0c, 0x48, 0x09, 0x0a, 0x46, 0x45, 0x1b, 0x48, 0x08, 0x53, 0x1d, 0x39, 0x81, 0x07, 0x46, 0x0a, 0x1d, 0x03, 0x47, 0x49, 0x37, 0x03, 0x0e, 0x08, 0x0a, 0x06, 0x39, 0x07, 0x0a, 0x81, 0x36, 0x19, 0x80, 0xb7, 0x01, 0x0f, 0x32, 0x0d, 0x83, 0x9b, 0x66, 0x75, 0x0b, 0x80, 0xc4, 0x8a, 0xbc, 0x84, 0x2f, 0x8f, 0xd1, 0x82, 0x47, 0xa1, 0xb9, 0x82, 0x39, 0x07, 0x2a, 0x04, 0x02, 0x60, 0x26, 0x0a, 0x46, 0x0a, 0x28, 0x05, 0x13, 0x82, 0xb0, 0x5b, 0x65, 0x4b, 0x04, 0x39, 0x07, 0x11, 0x40, 0x05, 0x0b, 0x02, 0x0e, 0x97, 0xf8, 0x08, 0x84, 0xd6, 0x2a, 0x09, 0xa2, 0xf7, 0x81, 0x1f, 0x31, 0x03, 0x11, 0x04, 0x08, 0x81, 0x8c, 0x89, 0x04, 0x6b, 0x05, 0x0d, 0x03, 0x09, 0x07, 0x10, 0x93, 0x60, 0x80, 0xf6, 0x0a, 0x73, 0x08, 0x6e, 0x17, 0x46, 0x80, 0x9a, 0x14, 0x0c, 0x57, 0x09, 0x19, 0x80, 0x87, 0x81, 0x47, 0x03, 0x85, 0x42, 0x0f, 0x15, 0x85, 0x50, 0x2b, 0x80, 0xd5, 0x2d, 0x03, 0x1a, 0x04, 0x02, 0x81, 0x70, 0x3a, 0x05, 0x01, 0x85, 0x00, 0x80, 0xd7, 0x29, 0x4c, 0x04, 0x0a, 0x04, 0x02, 0x83, 0x11, 0x44, 0x4c, 0x3d, 0x80, 0xc2, 0x3c, 0x06, 0x01, 0x04, 0x55, 0x05, 0x1b, 0x34, 0x02, 0x81, 0x0e, 0x2c, 0x04, 0x64, 0x0c, 0x56, 0x0a, 0x80, 0xae, 0x38, 0x1d, 0x0d, 0x2c, 0x04, 0x09, 0x07, 0x02, 0x0e, 0x06, 0x80, 0x9a, 0x83, 0xd8, 0x08, 0x0d, 0x03, 0x0d, 0x03, 0x74, 0x0c, 0x59, 0x07, 0x0c, 0x14, 0x0c, 0x04, 0x38, 0x08, 0x0a, 0x06, 0x28, 0x08, 0x22, 0x4e, 0x81, 0x54, 0x0c, 0x15, 0x03, 0x03, 0x05, 0x07, 0x09, 0x19, 0x07, 0x07, 0x09, 0x03, 0x0d, 0x07, 0x29, 0x80, 0xcb, 0x25, 0x0a, 0x84, 0x06, }; auto lower = static_cast<uint16_t>(cp); if (cp < 0x10000) { return is_printable(lower, singletons0, sizeof(singletons0) / sizeof(*singletons0), singletons0_lower, normal0, sizeof(normal0)); } if (cp < 0x20000) { return is_printable(lower, singletons1, sizeof(singletons1) / sizeof(*singletons1), singletons1_lower, normal1, sizeof(normal1)); } if (0x2a6de <= cp && cp < 0x2a700) return false; if (0x2b735 <= cp && cp < 0x2b740) return false; if (0x2b81e <= cp && cp < 0x2b820) return false; if (0x2cea2 <= cp && cp < 0x2ceb0) return false; if (0x2ebe1 <= cp && cp < 0x2f800) return false; if (0x2fa1e <= cp && cp < 0x30000) return false; if (0x3134b <= cp && cp < 0xe0100) return false; if (0xe01f0 <= cp && cp < 0x110000) return false; return cp < 0x110000; }
O1
c
fmt::v11::detail::is_printable(unsigned int): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx cmpl $0xffff, %edi # imm = 0xFFFF ja 0x3dffd movl %edi, %eax shrl $0x8, %eax xorl %esi, %esi leaq 0x255059(%rip), %rcx # 0x292f80 leaq 0x2550b2(%rip), %rdx # 0x292fe0 xorl %r8d, %r8d movzbl (%rcx,%r8,2), %ebx movzbl 0x1(%rcx,%r8,2), %r11d leal (%rsi,%r11), %r10d movl $0x2, %r9d cmpl %ebx, %eax jb 0x3df94 jne 0x3df8e movl $0x5, %r9d testb %r11b, %r11b setne %r11b je 0x3df89 movslq %esi, %rbx movb $0x1, %r11b cmpb %dil, (%rbx,%rdx) je 0x3df83 movslq %r10d, %r14 incq %rbx cmpq %r14, %rbx setl %r11b jge 0x3df89 leaq 0x1(%rbx), %r15 cmpb %dil, (%rbx,%rdx) movq %r15, %rbx jne 0x3df6d movl $0x1, %r9d testb %r11b, %r11b jne 0x3df94 xorl %r9d, %r9d movl %r10d, %esi testl %r9d, %r9d jne 0x3dfa8 incq %r8 cmpq $0x29, %r8 jne 0x3df31 movl $0x2, %r9d cmpl $0x2, %r9d jne 0x3e0e9 movb $0x1, %sil xorl %eax, %eax leaq 0x255252(%rip), %rcx # 0x293210 movl %esi, %edx movzbl (%rax,%rcx), %esi testb %sil, %sil jns 0x3dfdb andl $0x7f, %esi shll $0x8, %esi movzbl 0x1(%rax,%rcx), %r8d incq %rax orl %r8d, %esi subl %esi, %edi setns %r8b incq %rax cmpq $0x134, %rax # imm = 0x134 ja 0x3dff5 movl %edx, %esi xorb %r8b, %sil testl %edi, %edi jns 0x3dfbe cmpb %r8b, %dl jmp 0x3e0e4 cmpl $0x1ffff, %edi # imm = 0x1FFFF ja 0x3e0ed movzwl %di, %eax movl %eax, %ecx shrl $0x8, %ecx xorl %r8d, %r8d leaq 0x2550f5(%rip), %rdx # 0x293110 leaq 0x25513e(%rip), %rsi # 0x293160 xorl %r9d, %r9d movzbl (%rdx,%r9,2), %ebp movzbl 0x1(%rdx,%r9,2), %ebx leal (%r8,%rbx), %r11d movl $0x2, %r10d cmpl %ebp, %ecx jb 0x3e083 jne 0x3e07d movl $0x5, %r10d testb %bl, %bl setne %bl je 0x3e079 movslq %r8d, %r14 movb $0x1, %bl cmpb %dil, (%r14,%rsi) je 0x3e073 movslq %r11d, %r15 incq %r14 cmpq %r15, %r14 setl %bl jge 0x3e079 leaq 0x1(%r14), %r12 cmpb %dil, (%r14,%rsi) movq %r12, %r14 jne 0x3e05e movl $0x1, %r10d testb %bl, %bl jne 0x3e083 xorl %r10d, %r10d movl %r11d, %r8d testl %r10d, %r10d jne 0x3e097 incq %r9 cmpq $0x26, %r9 jne 0x3e025 movl $0x2, %r10d cmpl $0x2, %r10d jne 0x3e0e9 movb $0x1, %dil xorl %ecx, %ecx leaq 0x2552a7(%rip), %rdx # 0x293350 movl %edi, %esi movzbl (%rcx,%rdx), %edi testb %dil, %dil jns 0x3e0c6 andl $0x7f, %edi shll $0x8, %edi movzbl 0x1(%rcx,%rdx), %r8d incq %rcx orl %r8d, %edi subl %edi, %eax setns %r8b incq %rcx cmpq $0x1a2, %rcx # imm = 0x1A2 ja 0x3e0e1 movl %esi, %edi xorb %r8b, %dil testl %eax, %eax jns 0x3e0a9 cmpb %r8b, %sil setne %al jmp 0x3e162 xorl %eax, %eax jmp 0x3e162 movd %edi, %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] paddd 0x255502(%rip), %xmm0 # 0x293600 movl %edi, %eax andl $-0x2, %eax cmpl $0x2b81e, %eax # imm = 0x2B81E setne %cl leal -0x30000(%rdi), %eax cmpl $0xfffffa1e, %eax # imm = 0xFFFFFA1E setb %dl leal -0xe0100(%rdi), %eax cmpl $0xfff5124b, %eax # imm = 0xFFF5124B setb %sil subl $0x110000, %edi # imm = 0x110000 setb %r8b cmpl $0xfffd01f0, %edi # imm = 0xFFFD01F0 setb %al pxor 0x2554cd(%rip), %xmm0 # 0x293610 pcmpgtd 0x2554d5(%rip), %xmm0 # 0x293620 movmskps %xmm0, %edi cmpl $0xf, %edi sete %dil andb %sil, %al andb %dl, %al andb %cl, %al andb %r8b, %al andb %dil, %al popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq nop
_ZN3fmt3v116detail12is_printableEj: push rbp push r15 push r14 push r12 push rbx cmp edi, 0FFFFh ja loc_3DFFD mov eax, edi shr eax, 8 xor esi, esi lea rcx, _ZZN3fmt3v116detail12is_printableEjE11singletons0; fmt::v11::detail::is_printable(uint)::singletons0 lea rdx, _ZZN3fmt3v116detail12is_printableEjE17singletons0_lower; fmt::v11::detail::is_printable(uint)::singletons0_lower xor r8d, r8d loc_3DF31: movzx ebx, byte ptr [rcx+r8*2] movzx r11d, byte ptr [rcx+r8*2+1] lea r10d, [rsi+r11] mov r9d, 2 cmp eax, ebx jb short loc_3DF94 jnz short loc_3DF8E mov r9d, 5 test r11b, r11b setnz r11b jz short loc_3DF89 movsxd rbx, esi mov r11b, 1 cmp [rbx+rdx], dil jz short loc_3DF83 movsxd r14, r10d inc rbx loc_3DF6D: cmp rbx, r14 setl r11b jge short loc_3DF89 lea r15, [rbx+1] cmp [rbx+rdx], dil mov rbx, r15 jnz short loc_3DF6D loc_3DF83: mov r9d, 1 loc_3DF89: test r11b, r11b jnz short loc_3DF94 loc_3DF8E: xor r9d, r9d mov esi, r10d loc_3DF94: test r9d, r9d jnz short loc_3DFA8 inc r8 cmp r8, 29h ; ')' jnz short loc_3DF31 mov r9d, 2 loc_3DFA8: cmp r9d, 2 jnz loc_3E0E9 mov sil, 1 xor eax, eax lea rcx, _ZZN3fmt3v116detail12is_printableEjE7normal0; fmt::v11::detail::is_printable(uint)::normal0 loc_3DFBE: mov edx, esi movzx esi, byte ptr [rax+rcx] test sil, sil jns short loc_3DFDB and esi, 7Fh shl esi, 8 movzx r8d, byte ptr [rax+rcx+1] inc rax or esi, r8d loc_3DFDB: sub edi, esi setns r8b inc rax cmp rax, 134h ja short loc_3DFF5 mov esi, edx xor sil, r8b test edi, edi jns short loc_3DFBE loc_3DFF5: cmp dl, r8b jmp loc_3E0E4 loc_3DFFD: cmp edi, 1FFFFh ja loc_3E0ED movzx eax, di mov ecx, eax shr ecx, 8 xor r8d, r8d lea rdx, _ZZN3fmt3v116detail12is_printableEjE11singletons1; fmt::v11::detail::is_printable(uint)::singletons1 lea rsi, _ZZN3fmt3v116detail12is_printableEjE17singletons1_lower; fmt::v11::detail::is_printable(uint)::singletons1_lower xor r9d, r9d loc_3E025: movzx ebp, byte ptr [rdx+r9*2] movzx ebx, byte ptr [rdx+r9*2+1] lea r11d, [r8+rbx] mov r10d, 2 cmp ecx, ebp jb short loc_3E083 jnz short loc_3E07D mov r10d, 5 test bl, bl setnz bl jz short loc_3E079 movsxd r14, r8d mov bl, 1 cmp [r14+rsi], dil jz short loc_3E073 movsxd r15, r11d inc r14 loc_3E05E: cmp r14, r15 setl bl jge short loc_3E079 lea r12, [r14+1] cmp [r14+rsi], dil mov r14, r12 jnz short loc_3E05E loc_3E073: mov r10d, 1 loc_3E079: test bl, bl jnz short loc_3E083 loc_3E07D: xor r10d, r10d mov r8d, r11d loc_3E083: test r10d, r10d jnz short loc_3E097 inc r9 cmp r9, 26h ; '&' jnz short loc_3E025 mov r10d, 2 loc_3E097: cmp r10d, 2 jnz short loc_3E0E9 mov dil, 1 xor ecx, ecx lea rdx, _ZZN3fmt3v116detail12is_printableEjE7normal1; fmt::v11::detail::is_printable(uint)::normal1 loc_3E0A9: mov esi, edi movzx edi, byte ptr [rcx+rdx] test dil, dil jns short loc_3E0C6 and edi, 7Fh shl edi, 8 movzx r8d, byte ptr [rcx+rdx+1] inc rcx or edi, r8d loc_3E0C6: sub eax, edi setns r8b inc rcx cmp rcx, 1A2h ja short loc_3E0E1 mov edi, esi xor dil, r8b test eax, eax jns short loc_3E0A9 loc_3E0E1: cmp sil, r8b loc_3E0E4: setnz al jmp short loc_3E162 loc_3E0E9: xor eax, eax jmp short loc_3E162 loc_3E0ED: movd xmm0, edi pshufd xmm0, xmm0, 0 paddd xmm0, cs:xmmword_293600 mov eax, edi and eax, 0FFFFFFFEh cmp eax, 2B81Eh setnz cl lea eax, [rdi-30000h] cmp eax, 0FFFFFA1Eh setb dl lea eax, [rdi-0E0100h] cmp eax, 0FFF5124Bh setb sil sub edi, 110000h setb r8b cmp edi, 0FFFD01F0h setb al pxor xmm0, cs:xmmword_293610 pcmpgtd xmm0, cs:xmmword_293620 movmskps edi, xmm0 cmp edi, 0Fh setz dil and al, sil and al, dl and al, cl and al, r8b and al, dil loc_3E162: pop rbx pop r12 pop r14 pop r15 pop rbp retn
bool fmt::v11::detail::is_printable(fmt::v11::detail *this) { unsigned int v1; // eax int v2; // esi long long v3; // r8 unsigned int v4; // ebx int v5; // r11d int v6; // r10d int v7; // r9d bool v8; // r11 long long v9; // rbx long long v10; // rax int v11; // edx int v12; // esi int v13; // r8d bool v14; // sf bool v15; // r8 bool v16; // zf int v17; // eax unsigned int v18; // ecx int v19; // r8d long long v20; // r9 unsigned int v21; // ebp int v22; // ebx int v23; // r11d int v24; // r10d bool v25; // bl long long v26; // r14 long long v27; // rcx int v28; // esi int v29; // edi int v30; // r8d bool v31; // r8 if ( (unsigned int)this <= 0xFFFF ) { v1 = (unsigned int)this >> 8; v2 = 0; v3 = 0LL; while ( 1 ) { v4 = fmt::v11::detail::is_printable(unsigned int)::singletons0[2 * v3]; v5 = fmt::v11::detail::is_printable(unsigned int)::singletons0[2 * v3 + 1]; v6 = v2 + v5; v7 = 2; if ( v1 >= v4 ) { if ( v1 != v4 ) goto LABEL_12; v7 = 5; v16 = (_BYTE)v5 == 0; v8 = (_BYTE)v5 != 0; if ( !v16 ) { v8 = 1; if ( fmt::v11::detail::is_printable(unsigned int)::singletons0_lower[v2] == (_BYTE)this ) { LABEL_10: v7 = 1; } else { v9 = v2 + 1LL; while ( 1 ) { v8 = v9 < v6; if ( v9 >= v6 ) break; v16 = fmt::v11::detail::is_printable(unsigned int)::singletons0_lower[v9++] == (unsigned __int8)this; if ( v16 ) goto LABEL_10; } } } if ( !v8 ) { LABEL_12: v7 = 0; v2 = v6; } } if ( v7 ) break; if ( ++v3 == 41 ) { v7 = 2; break; } } if ( v7 == 2 ) { LOBYTE(v2) = 1; v10 = 0LL; do { v11 = v2; v12 = fmt::v11::detail::is_printable(unsigned int)::normal0[v10]; if ( (v12 & 0x80u) != 0 ) { v13 = fmt::v11::detail::is_printable(unsigned int)::normal0[++v10]; v12 = v13 | ((v12 & 0x7F) << 8); } v14 = (int)this - v12 < 0; LODWORD(this) = (_DWORD)this - v12; v15 = !v14; if ( (unsigned long long)++v10 > 0x134 ) break; v2 = v11; LOBYTE(v2) = v15 ^ v11; } while ( (int)this >= 0 ); v16 = (_BYTE)v11 == v15; return !v16; } return 0; } if ( (unsigned int)this <= 0x1FFFF ) { v17 = (unsigned __int16)this; v18 = (unsigned __int16)this >> 8; v19 = 0; v20 = 0LL; while ( 1 ) { v21 = fmt::v11::detail::is_printable(unsigned int)::singletons1[2 * v20]; v22 = fmt::v11::detail::is_printable(unsigned int)::singletons1[2 * v20 + 1]; v23 = v19 + v22; v24 = 2; if ( v18 >= v21 ) { if ( v18 != v21 ) goto LABEL_34; v24 = 5; v16 = (_BYTE)v22 == 0; v25 = (_BYTE)v22 != 0; if ( !v16 ) { v25 = 1; if ( fmt::v11::detail::is_printable(unsigned int)::singletons1_lower[v19] == (_BYTE)this ) { LABEL_32: v24 = 1; } else { v26 = v19 + 1LL; while ( 1 ) { v25 = v26 < v23; if ( v26 >= v23 ) break; v16 = fmt::v11::detail::is_printable(unsigned int)::singletons1_lower[v26++] == (unsigned __int8)this; if ( v16 ) goto LABEL_32; } } } if ( !v25 ) { LABEL_34: v24 = 0; v19 = v23; } } if ( v24 ) break; if ( ++v20 == 38 ) { v24 = 2; break; } } if ( v24 == 2 ) { LOBYTE(this) = 1; v27 = 0LL; do { v28 = (int)this; v29 = fmt::v11::detail::is_printable(unsigned int)::normal1[v27]; if ( (v29 & 0x80u) != 0 ) { v30 = fmt::v11::detail::is_printable(unsigned int)::normal1[++v27]; v29 = v30 | ((v29 & 0x7F) << 8); } v14 = v17 - v29 < 0; v17 -= v29; v31 = !v14; if ( (unsigned long long)++v27 > 0x1A2 ) break; LODWORD(this) = v28; LOBYTE(this) = v31 ^ v28; } while ( v17 >= 0 ); v16 = (_BYTE)v28 == v31; return !v16; } return 0; } return _mm_movemask_ps((__m128)_mm_cmpgt_epi32( _mm_xor_si128( _mm_add_epi32( _mm_shuffle_epi32(_mm_cvtsi32_si128((unsigned int)this), 0), (__m128i)xmmword_293600), (__m128i)xmmword_293610), (__m128i)xmmword_293620)) == 15 && (unsigned int)this < 0x110000 && ((unsigned int)this & 0xFFFFFFFE) != 178206 && (unsigned int)((_DWORD)this - 196608) < 0xFFFFFA1E && (unsigned int)((_DWORD)this - 917760) < 0xFFF5124B && (unsigned int)((_DWORD)this - 1114112) < 0xFFFD01F0; }
is_printable: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX CMP EDI,0xffff JA 0x0013dffd MOV EAX,EDI SHR EAX,0x8 XOR ESI,ESI LEA RCX,[0x392f80] LEA RDX,[0x392fe0] XOR R8D,R8D LAB_0013df31: MOVZX EBX,byte ptr [RCX + R8*0x2] MOVZX R11D,byte ptr [RCX + R8*0x2 + 0x1] LEA R10D,[RSI + R11*0x1] MOV R9D,0x2 CMP EAX,EBX JC 0x0013df94 JNZ 0x0013df8e MOV R9D,0x5 TEST R11B,R11B SETNZ R11B JZ 0x0013df89 MOVSXD RBX,ESI MOV R11B,0x1 CMP byte ptr [RBX + RDX*0x1],DIL JZ 0x0013df83 MOVSXD R14,R10D INC RBX LAB_0013df6d: CMP RBX,R14 SETL R11B JGE 0x0013df89 LEA R15,[RBX + 0x1] CMP byte ptr [RBX + RDX*0x1],DIL MOV RBX,R15 JNZ 0x0013df6d LAB_0013df83: MOV R9D,0x1 LAB_0013df89: TEST R11B,R11B JNZ 0x0013df94 LAB_0013df8e: XOR R9D,R9D MOV ESI,R10D LAB_0013df94: TEST R9D,R9D JNZ 0x0013dfa8 INC R8 CMP R8,0x29 JNZ 0x0013df31 MOV R9D,0x2 LAB_0013dfa8: CMP R9D,0x2 JNZ 0x0013e0e9 MOV SIL,0x1 XOR EAX,EAX LEA RCX,[0x393210] LAB_0013dfbe: MOV EDX,ESI MOVZX ESI,byte ptr [RAX + RCX*0x1] TEST SIL,SIL JNS 0x0013dfdb AND ESI,0x7f SHL ESI,0x8 MOVZX R8D,byte ptr [RAX + RCX*0x1 + 0x1] INC RAX OR ESI,R8D LAB_0013dfdb: SUB EDI,ESI SETNS R8B INC RAX CMP RAX,0x134 JA 0x0013dff5 MOV ESI,EDX XOR SIL,R8B TEST EDI,EDI JNS 0x0013dfbe LAB_0013dff5: CMP DL,R8B JMP 0x0013e0e4 LAB_0013dffd: CMP EDI,0x1ffff JA 0x0013e0ed MOVZX EAX,DI MOV ECX,EAX SHR ECX,0x8 XOR R8D,R8D LEA RDX,[0x393110] LEA RSI,[0x393160] XOR R9D,R9D LAB_0013e025: MOVZX EBP,byte ptr [RDX + R9*0x2] MOVZX EBX,byte ptr [RDX + R9*0x2 + 0x1] LEA R11D,[R8 + RBX*0x1] MOV R10D,0x2 CMP ECX,EBP JC 0x0013e083 JNZ 0x0013e07d MOV R10D,0x5 TEST BL,BL SETNZ BL JZ 0x0013e079 MOVSXD R14,R8D MOV BL,0x1 CMP byte ptr [R14 + RSI*0x1],DIL JZ 0x0013e073 MOVSXD R15,R11D INC R14 LAB_0013e05e: CMP R14,R15 SETL BL JGE 0x0013e079 LEA R12,[R14 + 0x1] CMP byte ptr [R14 + RSI*0x1],DIL MOV R14,R12 JNZ 0x0013e05e LAB_0013e073: MOV R10D,0x1 LAB_0013e079: TEST BL,BL JNZ 0x0013e083 LAB_0013e07d: XOR R10D,R10D MOV R8D,R11D LAB_0013e083: TEST R10D,R10D JNZ 0x0013e097 INC R9 CMP R9,0x26 JNZ 0x0013e025 MOV R10D,0x2 LAB_0013e097: CMP R10D,0x2 JNZ 0x0013e0e9 MOV DIL,0x1 XOR ECX,ECX LEA RDX,[0x393350] LAB_0013e0a9: MOV ESI,EDI MOVZX EDI,byte ptr [RCX + RDX*0x1] TEST DIL,DIL JNS 0x0013e0c6 AND EDI,0x7f SHL EDI,0x8 MOVZX R8D,byte ptr [RCX + RDX*0x1 + 0x1] INC RCX OR EDI,R8D LAB_0013e0c6: SUB EAX,EDI SETNS R8B INC RCX CMP RCX,0x1a2 JA 0x0013e0e1 MOV EDI,ESI XOR DIL,R8B TEST EAX,EAX JNS 0x0013e0a9 LAB_0013e0e1: CMP SIL,R8B LAB_0013e0e4: SETNZ AL JMP 0x0013e162 LAB_0013e0e9: XOR EAX,EAX JMP 0x0013e162 LAB_0013e0ed: MOVD XMM0,EDI PSHUFD XMM0,XMM0,0x0 PADDD XMM0,xmmword ptr [0x00393600] MOV EAX,EDI AND EAX,0xfffffffe CMP EAX,0x2b81e SETNZ CL LEA EAX,[RDI + -0x30000] CMP EAX,0xfffffa1e SETC DL LEA EAX,[RDI + -0xe0100] CMP EAX,0xfff5124b SETC SIL SUB EDI,0x110000 SETC R8B CMP EDI,0xfffd01f0 SETC AL PXOR XMM0,xmmword ptr [0x00393610] PCMPGTD XMM0,xmmword ptr [0x00393620] MOVMSKPS EDI,XMM0 CMP EDI,0xf SETZ DIL AND AL,SIL AND AL,DL AND AL,CL AND AL,R8B AND AL,DIL LAB_0013e162: POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* fmt::v11::detail::is_printable(unsigned int) */ ulong fmt::v11::detail::is_printable(uint param_1) { char *pcVar1; byte *pbVar2; byte bVar3; ulong uVar4; ulong uVar5; long lVar6; long lVar7; bool bVar8; uint uVar9; char cVar10; int iVar11; long lVar12; int iVar13; int iVar14; bool bVar15; int1 auVar16 [16]; cVar10 = (char)param_1; if (param_1 < 0x10000) { iVar11 = 0; lVar12 = 0; do { iVar14 = iVar11 + (uint)(byte)(&DAT_00392f81)[lVar12 * 2]; iVar13 = 2; if ((uint)(byte)(&is_printable(unsigned_int)::singletons0)[lVar12 * 2] <= param_1 >> 8) { if (param_1 >> 8 == (uint)(byte)(&is_printable(unsigned_int)::singletons0)[lVar12 * 2]) { iVar13 = 5; bVar15 = (&DAT_00392f81)[lVar12 * 2] != 0; if (bVar15) { bVar15 = true; if ((&is_printable(unsigned_int)::singletons0_lower)[iVar11] != cVar10) { lVar7 = (long)iVar11; do { lVar6 = lVar7 + 1; bVar15 = lVar6 < iVar14; if (iVar14 <= lVar6) goto LAB_0013df89; pcVar1 = &DAT_00392fe1 + lVar7; lVar7 = lVar6; } while (*pcVar1 != cVar10); } iVar13 = 1; } LAB_0013df89: if (bVar15) goto LAB_0013df94; } iVar13 = 0; iVar11 = iVar14; } LAB_0013df94: if (iVar13 != 0) goto LAB_0013dfa8; lVar12 = lVar12 + 1; } while (lVar12 != 0x29); iVar13 = 2; LAB_0013dfa8: if (iVar13 != 2) { return 0; } uVar4 = 0; bVar15 = true; do { bVar8 = bVar15; bVar3 = (&is_printable(unsigned_int)::normal0)[uVar4]; uVar9 = (uint)bVar3; if ((char)bVar3 < '\0') { pbVar2 = &DAT_00393211 + uVar4; uVar4 = uVar4 + 1; uVar9 = (bVar3 & 0x7f) << 8 | (uint)*pbVar2; } param_1 = param_1 - uVar9; uVar4 = uVar4 + 1; } while ((uVar4 < 0x135) && (bVar15 = (bool)(bVar8 ^ -1 < (int)param_1), -1 < (int)param_1)); bVar15 = bVar8 == -1 < (int)param_1; } else { if (0x1ffff < param_1) { auVar16._0_4_ = -(uint)(_DAT_00393620 < (int)(param_1 + _DAT_00393600 ^ _DAT_00393610)); auVar16._4_4_ = -(uint)(_UNK_00393624 < (int)(param_1 + _UNK_00393604 ^ _UNK_00393614)); auVar16._8_4_ = -(uint)(_UNK_00393628 < (int)(param_1 + _UNK_00393608 ^ _UNK_00393618)); auVar16._12_4_ = -(uint)(_UNK_0039362c < (int)(param_1 + _UNK_0039360c ^ _UNK_0039361c)); iVar11 = movmskps(param_1 - 0x110000,auVar16); return (ulong)CONCAT31((int3)(param_1 - 0xe0100 >> 8), ((((param_1 - 0x110000 < 0xfffd01f0 && param_1 - 0xe0100 < 0xfff5124b) && param_1 - 0x30000 < 0xfffffa1e) && (param_1 & 0xfffffffe) != 0x2b81e) && param_1 < 0x110000) && iVar11 == 0xf); } uVar4 = (ulong)(param_1 & 0xffff); uVar9 = (param_1 & 0xffff) >> 8; iVar11 = 0; lVar12 = 0; do { iVar14 = iVar11 + (uint)(byte)(&DAT_00393111)[lVar12 * 2]; iVar13 = 2; if ((byte)(&is_printable(unsigned_int)::singletons1)[lVar12 * 2] <= uVar9) { if (uVar9 == (byte)(&is_printable(unsigned_int)::singletons1)[lVar12 * 2]) { iVar13 = 5; bVar15 = (&DAT_00393111)[lVar12 * 2] != 0; if (bVar15) { bVar15 = true; if ((&is_printable(unsigned_int)::singletons1_lower)[iVar11] != cVar10) { lVar7 = (long)iVar11; do { lVar6 = lVar7 + 1; bVar15 = lVar6 < iVar14; if (iVar14 <= lVar6) goto LAB_0013e079; pcVar1 = &DAT_00393161 + lVar7; lVar7 = lVar6; } while (*pcVar1 != cVar10); } iVar13 = 1; } LAB_0013e079: if (bVar15) goto LAB_0013e083; } iVar13 = 0; iVar11 = iVar14; } LAB_0013e083: if (iVar13 != 0) goto LAB_0013e097; lVar12 = lVar12 + 1; } while (lVar12 != 0x26); iVar13 = 2; LAB_0013e097: if (iVar13 != 2) { return 0; } uVar5 = 0; bVar15 = true; do { bVar8 = bVar15; bVar3 = (&is_printable(unsigned_int)::normal1)[uVar5]; uVar9 = (uint)bVar3; if ((char)bVar3 < '\0') { pbVar2 = &DAT_00393351 + uVar5; uVar5 = uVar5 + 1; uVar9 = (bVar3 & 0x7f) << 8 | (uint)*pbVar2; } uVar9 = (int)uVar4 - uVar9; uVar4 = (ulong)uVar9; uVar5 = uVar5 + 1; } while ((uVar5 < 0x1a3) && (bVar15 = (bool)(bVar8 ^ -1 < (int)uVar9), -1 < (int)uVar9)); bVar15 = bVar8 == -1 < (int)uVar9; } return CONCAT71((int7)(uVar4 >> 8),!bVar15); }
5,551
get_lvalue
bluesky950520[P]quickjs/quickjs.c
static __exception int get_lvalue(JSParseState *s, int *popcode, int *pscope, JSAtom *pname, int *plabel, int *pdepth, BOOL keep, int tok) { JSFunctionDef *fd; int opcode, scope, label, depth; JSAtom name; /* we check the last opcode to get the lvalue type */ fd = s->cur_func; scope = 0; name = JS_ATOM_NULL; label = -1; depth = 0; switch(opcode = get_prev_opcode(fd)) { case OP_scope_get_var: name = get_u32(fd->byte_code.buf + fd->last_opcode_pos + 1); scope = get_u16(fd->byte_code.buf + fd->last_opcode_pos + 5); if ((name == JS_ATOM_arguments || name == JS_ATOM_eval) && fd->is_strict_mode) { return js_parse_error(s, "invalid lvalue in strict mode"); } if (name == JS_ATOM_this || name == JS_ATOM_new_target) goto invalid_lvalue; depth = 2; /* will generate OP_get_ref_value */ break; case OP_get_field: name = get_u32(fd->byte_code.buf + fd->last_opcode_pos + 1); depth = 1; break; case OP_scope_get_private_field: name = get_u32(fd->byte_code.buf + fd->last_opcode_pos + 1); scope = get_u16(fd->byte_code.buf + fd->last_opcode_pos + 5); depth = 1; break; case OP_get_array_el: depth = 2; break; case OP_get_super_value: depth = 3; break; default: invalid_lvalue: if (tok == TOK_FOR) { return js_parse_error(s, "invalid for in/of left hand-side"); } else if (tok == TOK_INC || tok == TOK_DEC) { return js_parse_error(s, "invalid increment/decrement operand"); } else if (tok == '[' || tok == '{') { return js_parse_error(s, "invalid destructuring target"); } else { return js_parse_error(s, "invalid assignment left-hand side"); } } /* remove the last opcode */ fd->byte_code.size = fd->last_opcode_pos; fd->last_opcode_pos = -1; if (keep) { /* get the value but keep the object/fields on the stack */ switch(opcode) { case OP_scope_get_var: label = new_label(s); emit_op(s, OP_scope_make_ref); emit_atom(s, name); emit_u32(s, label); emit_u16(s, scope); update_label(fd, label, 1); emit_op(s, OP_get_ref_value); opcode = OP_get_ref_value; break; case OP_get_field: emit_op(s, OP_get_field2); emit_atom(s, name); emit_ic(s, name); break; case OP_scope_get_private_field: emit_op(s, OP_scope_get_private_field2); emit_atom(s, name); emit_u16(s, scope); break; case OP_get_array_el: /* XXX: replace by a single opcode ? */ emit_op(s, OP_to_propkey2); emit_op(s, OP_dup2); emit_op(s, OP_get_array_el); break; case OP_get_super_value: emit_op(s, OP_to_propkey); emit_op(s, OP_dup3); emit_op(s, OP_get_super_value); break; default: abort(); } } else { switch(opcode) { case OP_scope_get_var: label = new_label(s); emit_op(s, OP_scope_make_ref); emit_atom(s, name); emit_u32(s, label); emit_u16(s, scope); update_label(fd, label, 1); opcode = OP_get_ref_value; break; case OP_get_array_el: emit_op(s, OP_to_propkey2); break; case OP_get_super_value: emit_op(s, OP_to_propkey); break; } } *popcode = opcode; *pscope = scope; /* name has refcount for OP_get_field and OP_get_ref_value, and JS_ATOM_NULL for other opcodes */ *pname = name; *plabel = label; if (pdepth) *pdepth = depth; return 0; }
O1
c
get_lvalue: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r9, 0x18(%rsp) movq %rdi, %r14 movq 0x90(%rdi), %r15 movslq 0x168(%r15), %rax xorl %r13d, %r13d movl $0x0, %ebx testq %rax, %rax js 0x65669 movq 0x138(%r15), %rdi movzbl (%rdi,%rax), %ebx movl $0x2, %r9d cmpl $0x49, %ebx jle 0x656be cmpl $0x4a, %ebx je 0x656d2 cmpl $0xbd, %ebx je 0x656df cmpl $0xb7, %ebx jne 0x65a5e movq 0x138(%r15), %rdi movl 0x1(%rdi,%rax), %r13d movzwl 0x5(%rdi,%rax), %ebp cmpl $0x4d, %r13d jg 0x65a2f cmpl $0x8, %r13d je 0x65a5e cmpl $0x3b, %r13d je 0x65a3f jmp 0x6570c cmpl $0x41, %ebx je 0x656f8 movl $0x0, %ebp cmpl $0x47, %ebx je 0x6570c jmp 0x65a5e xorl %ebp, %ebp movl $0x3, %r9d xorl %r13d, %r13d jmp 0x6570c movq 0x138(%r15), %rdi movl 0x1(%rdi,%rax), %r13d movzwl 0x5(%rdi,%rax), %ebp movl $0x1, %r9d jmp 0x6570c movq 0x138(%r15), %rdi movl 0x1(%rdi,%rax), %r13d movl $0x1, %r9d xorl %ebp, %ebp movl 0x80(%rsp), %edi movq %rax, 0x140(%r15) movl $0xffffffff, 0x168(%r15) # imm = 0xFFFFFFFF testl %edi, %edi movq %r8, 0x38(%rsp) movq %rcx, 0x30(%rsp) movq %rdx, 0x28(%rsp) movq %rsi, 0x20(%rsp) movl %r9d, 0xc(%rsp) je 0x657cd movzbl %bl, %edi cmpl $0xb6, %edi jg 0x6588e cmpl $0x47, %edi je 0x659be cmpl $0x4a, %edi jne 0x65b49 movl $0x138, %r12d # imm = 0x138 movl %eax, 0x168(%r15) addq %r12, %r15 movq %r15, %rdi movl $0x71, %esi callq 0x1b4d0 movq 0x90(%r14), %rax leaq (%rax,%r12), %rdi movl 0x140(%rax), %ecx movl %ecx, 0x168(%rax) movl $0x14, %esi callq 0x1b4d0 movq 0x90(%r14), %rax addq %rax, %r12 movl 0x140(%rax), %ecx movl %ecx, 0x168(%rax) movl $0x4a, %ebx movq %r12, %rdi movl $0x4a, %esi jmp 0x65a1f movl $0xffffffff, %r12d # imm = 0xFFFFFFFF cmpb $0x47, %bl je 0x65ab2 movzbl %bl, %ecx cmpl $0x4a, %ecx je 0x65a90 cmpl $0xb7, %ecx jne 0x65ad2 movq %r15, %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF callq 0x6c7b9 movl %eax, %r12d movq 0x90(%r14), %rax movl %r13d, %ebx movl $0x138, %r13d # imm = 0x138 leaq (%rax,%r13), %rdi movl 0x140(%rax), %ecx movl %ecx, 0x168(%rax) movl $0xba, %esi callq 0x1b4d0 movq %r14, %rdi movl %ebx, %esi callq 0x5ebfa movq 0x90(%r14), %rdi addq %r13, %rdi leaq 0x44(%rsp), %rsi movl %r12d, (%rsi) movl $0x4, %edx callq 0x1b422 addq 0x90(%r14), %r13 leaq 0x16(%rsp), %rsi movw %bp, (%rsi) movl $0x2, %edx movq %r13, %rdi movl %ebx, %r13d callq 0x1b422 movq 0x170(%r15), %rax movslq %r12d, %rcx leaq (%rcx,%rcx,2), %rcx incl (%rax,%rcx,8) movl $0x3c, %ebx jmp 0x65ad2 cmpl $0xbd, %edi je 0x6596a cmpl $0xb7, %edi jne 0x65b8f movq %r15, %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF callq 0x6c7b9 movl %r13d, %ebx movl %r13d, 0x8(%rsp) movl %eax, %r12d movq 0x90(%r14), %rax movl $0x138, %r13d # imm = 0x138 leaq (%rax,%r13), %rdi movl 0x140(%rax), %ecx movl %ecx, 0x168(%rax) movl $0xba, %esi callq 0x1b4d0 movq %r14, %rdi movl %ebx, %esi callq 0x5ebfa movq 0x90(%r14), %rdi addq %r13, %rdi leaq 0x40(%rsp), %rsi movl %r12d, (%rsi) movl $0x4, %edx callq 0x1b422 movq 0x90(%r14), %rdi addq %r13, %rdi leaq 0x12(%rsp), %rsi movw %bp, (%rsi) movl $0x2, %edx callq 0x1b422 movq 0x170(%r15), %rax movslq %r12d, %rcx leaq (%rcx,%rcx,2), %rcx incl (%rax,%rcx,8) movq 0x90(%r14), %rax addq %rax, %r13 movl 0x140(%rax), %ecx movl %ecx, 0x168(%rax) movl $0x3c, %ebx movq %r13, %rdi movl 0x8(%rsp), %r13d movl $0x3c, %esi callq 0x1b4d0 jmp 0x65ad2 movl $0x138, %r12d # imm = 0x138 movl %eax, 0x168(%r15) addq %r12, %r15 movq %r15, %rdi movl $0xbe, %esi callq 0x1b4d0 movq %r14, %rdi movl %r13d, %esi callq 0x5ebfa addq 0x90(%r14), %r12 leaq 0x14(%rsp), %rsi movw %bp, (%rsi) movl $0x2, %edx movq %r12, %rdi callq 0x1b422 movl $0xffffffff, %r12d # imm = 0xFFFFFFFF movl $0xbd, %ebx jmp 0x65ad2 movl $0x138, %r12d # imm = 0x138 movl %eax, 0x168(%r15) addq %r12, %r15 movq %r15, %rdi movl $0x72, %esi callq 0x1b4d0 movq 0x90(%r14), %rax leaq (%rax,%r12), %rdi movl 0x140(%rax), %ecx movl %ecx, 0x168(%rax) movl $0x13, %esi callq 0x1b4d0 movq 0x90(%r14), %rax addq %rax, %r12 movl 0x140(%rax), %ecx movl %ecx, 0x168(%rax) movl $0x47, %ebx movq %r12, %rdi movl $0x47, %esi callq 0x1b4d0 movl $0xffffffff, %r12d # imm = 0xFFFFFFFF jmp 0x65ad2 cmpl $0x72, %r13d je 0x65a5e cmpl $0x4e, %r13d jne 0x6570c cmpw $0x0, 0x84(%r15) js 0x65b24 cmpl $0x8, %r13d je 0x65a5e cmpl $0x72, %r13d jne 0x6570c movl 0x88(%rsp), %eax cmpl $-0x45, %eax jne 0x65a76 leaq 0x3b675(%rip), %rsi # 0xa10e6 jmp 0x65b2b movl %eax, %ecx andl $-0x2, %ecx cmpl $-0x6c, %ecx jne 0x65b0a leaq 0x3b67c(%rip), %rsi # 0xa1107 jmp 0x65b2b movl %eax, 0x168(%r15) addq $0x138, %r15 # imm = 0x138 movq %r15, %rdi movl $0x71, %esi callq 0x1b4d0 movl $0x4a, %ebx jmp 0x65ad2 movl %eax, 0x168(%r15) addq $0x138, %r15 # imm = 0x138 movq %r15, %rdi movl $0x72, %esi callq 0x1b4d0 movl $0x47, %ebx movzwl %bp, %eax movq 0x20(%rsp), %rcx movl %ebx, (%rcx) movq 0x28(%rsp), %rcx movl %eax, (%rcx) movq 0x30(%rsp), %rax movl %r13d, (%rax) movq 0x38(%rsp), %rax movl %r12d, (%rax) xorl %eax, %eax cmpq $0x0, 0x18(%rsp) je 0x65b3a movl 0xc(%rsp), %ecx movq 0x18(%rsp), %rdx movl %ecx, (%rdx) jmp 0x65b3a andl $-0x21, %eax cmpl $0x5b, %eax jne 0x65b1b leaq 0x3b0a7(%rip), %rsi # 0xa0bc0 jmp 0x65b2b leaq 0x3b609(%rip), %rsi # 0xa112b jmp 0x65b2b leaq 0x3b59d(%rip), %rsi # 0xa10c8 movq %r14, %rdi xorl %eax, %eax callq 0x2fce9 movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpl $0x41, %edi jne 0x65b8f movl %eax, 0x168(%r15) addq $0x138, %r15 # imm = 0x138 movq %r15, %rdi movl $0x42, %esi callq 0x1b4d0 movq %r14, %rdi movl %r13d, %esi callq 0x5ebfa movq %r14, %rdi movl %r13d, %esi callq 0x11b16 movl $0xffffffff, %r12d # imm = 0xFFFFFFFF movl $0x41, %ebx jmp 0x65ad2 callq 0xe090
get_lvalue: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov [rsp+78h+var_60], r9 mov r14, rdi mov r15, [rdi+90h] movsxd rax, dword ptr [r15+168h] xor r13d, r13d mov ebx, 0 test rax, rax js short loc_65669 mov rdi, [r15+138h] movzx ebx, byte ptr [rdi+rax] loc_65669: mov r9d, 2 cmp ebx, 49h ; 'I' jle short loc_656BE cmp ebx, 4Ah ; 'J' jz short loc_656D2 cmp ebx, 0BDh jz short loc_656DF cmp ebx, 0B7h jnz loc_65A5E mov rdi, [r15+138h] mov r13d, [rdi+rax+1] movzx ebp, word ptr [rdi+rax+5] cmp r13d, 4Dh ; 'M' jg loc_65A2F cmp r13d, 8 jz loc_65A5E cmp r13d, 3Bh ; ';' jz loc_65A3F jmp short loc_6570C loc_656BE: cmp ebx, 41h ; 'A' jz short loc_656F8 mov ebp, 0 cmp ebx, 47h ; 'G' jz short loc_6570C jmp loc_65A5E loc_656D2: xor ebp, ebp mov r9d, 3 xor r13d, r13d jmp short loc_6570C loc_656DF: mov rdi, [r15+138h] mov r13d, [rdi+rax+1] movzx ebp, word ptr [rdi+rax+5] mov r9d, 1 jmp short loc_6570C loc_656F8: mov rdi, [r15+138h] mov r13d, [rdi+rax+1] mov r9d, 1 xor ebp, ebp loc_6570C: mov edi, [rsp+78h+arg_0] mov [r15+140h], rax mov dword ptr [r15+168h], 0FFFFFFFFh test edi, edi mov [rsp+78h+var_40], r8 mov [rsp+78h+var_48], rcx mov [rsp+78h+var_50], rdx mov [rsp+78h+var_58], rsi mov [rsp+78h+var_6C], r9d jz loc_657CD movzx edi, bl cmp edi, 0B6h jg loc_6588E cmp edi, 47h ; 'G' jz loc_659BE cmp edi, 4Ah ; 'J' jnz loc_65B49 mov r12d, 138h mov [r15+168h], eax add r15, r12 mov rdi, r15 mov esi, 71h ; 'q' call dbuf_putc mov rax, [r14+90h] lea rdi, [rax+r12] mov ecx, [rax+140h] mov [rax+168h], ecx mov esi, 14h call dbuf_putc mov rax, [r14+90h] add r12, rax mov ecx, [rax+140h] mov [rax+168h], ecx mov ebx, 4Ah ; 'J' mov rdi, r12 mov esi, 4Ah ; 'J' jmp loc_65A1F loc_657CD: mov r12d, 0FFFFFFFFh cmp bl, 47h ; 'G' jz loc_65AB2 movzx ecx, bl cmp ecx, 4Ah ; 'J' jz loc_65A90 cmp ecx, 0B7h jnz loc_65AD2 mov rdi, r15 mov esi, 0FFFFFFFFh call new_label_fd mov r12d, eax mov rax, [r14+90h] mov ebx, r13d mov r13d, 138h lea rdi, [rax+r13] mov ecx, [rax+140h] mov [rax+168h], ecx mov esi, 0BAh call dbuf_putc mov rdi, r14 mov esi, ebx call emit_atom mov rdi, [r14+90h] add rdi, r13 lea rsi, [rsp+78h+var_34] mov [rsi], r12d mov edx, 4 call dbuf_put add r13, [r14+90h] lea rsi, [rsp+78h+var_62] mov [rsi], bp mov edx, 2 mov rdi, r13 mov r13d, ebx call dbuf_put mov rax, [r15+170h] movsxd rcx, r12d lea rcx, [rcx+rcx*2] inc dword ptr [rax+rcx*8] mov ebx, 3Ch ; '<' jmp loc_65AD2 loc_6588E: cmp edi, 0BDh jz loc_6596A cmp edi, 0B7h jnz loc_65B8F mov rdi, r15 mov esi, 0FFFFFFFFh call new_label_fd mov ebx, r13d mov [rsp+78h+var_70], r13d mov r12d, eax mov rax, [r14+90h] mov r13d, 138h lea rdi, [rax+r13] mov ecx, [rax+140h] mov [rax+168h], ecx mov esi, 0BAh call dbuf_putc mov rdi, r14 mov esi, ebx call emit_atom mov rdi, [r14+90h] add rdi, r13 lea rsi, [rsp+78h+var_38] mov [rsi], r12d mov edx, 4 call dbuf_put mov rdi, [r14+90h] add rdi, r13 lea rsi, [rsp+78h+var_66] mov [rsi], bp mov edx, 2 call dbuf_put mov rax, [r15+170h] movsxd rcx, r12d lea rcx, [rcx+rcx*2] inc dword ptr [rax+rcx*8] mov rax, [r14+90h] add r13, rax mov ecx, [rax+140h] mov [rax+168h], ecx mov ebx, 3Ch ; '<' mov rdi, r13 mov r13d, [rsp+78h+var_70] mov esi, 3Ch ; '<' call dbuf_putc jmp loc_65AD2 loc_6596A: mov r12d, 138h mov [r15+168h], eax add r15, r12 mov rdi, r15 mov esi, 0BEh call dbuf_putc mov rdi, r14 mov esi, r13d call emit_atom add r12, [r14+90h] lea rsi, [rsp+78h+var_64] mov [rsi], bp mov edx, 2 mov rdi, r12 call dbuf_put mov r12d, 0FFFFFFFFh mov ebx, 0BDh jmp loc_65AD2 loc_659BE: mov r12d, 138h mov [r15+168h], eax add r15, r12 mov rdi, r15 mov esi, 72h ; 'r' call dbuf_putc mov rax, [r14+90h] lea rdi, [rax+r12] mov ecx, [rax+140h] mov [rax+168h], ecx mov esi, 13h call dbuf_putc mov rax, [r14+90h] add r12, rax mov ecx, [rax+140h] mov [rax+168h], ecx mov ebx, 47h ; 'G' mov rdi, r12 mov esi, 47h ; 'G' loc_65A1F: call dbuf_putc mov r12d, 0FFFFFFFFh jmp loc_65AD2 loc_65A2F: cmp r13d, 72h ; 'r' jz short loc_65A5E cmp r13d, 4Eh ; 'N' jnz loc_6570C loc_65A3F: cmp word ptr [r15+84h], 0 js loc_65B24 cmp r13d, 8 jz short loc_65A5E cmp r13d, 72h ; 'r' jnz loc_6570C loc_65A5E: mov eax, [rsp+78h+arg_8] cmp eax, 0FFFFFFBBh jnz short loc_65A76 lea rsi, aInvalidForInOf; "invalid for in/of left hand-side" jmp loc_65B2B loc_65A76: mov ecx, eax and ecx, 0FFFFFFFEh cmp ecx, 0FFFFFF94h jnz loc_65B0A lea rsi, aInvalidIncreme; "invalid increment/decrement operand" jmp loc_65B2B loc_65A90: mov [r15+168h], eax add r15, 138h mov rdi, r15 mov esi, 71h ; 'q' call dbuf_putc mov ebx, 4Ah ; 'J' jmp short loc_65AD2 loc_65AB2: mov [r15+168h], eax add r15, 138h mov rdi, r15 mov esi, 72h ; 'r' call dbuf_putc mov ebx, 47h ; 'G' loc_65AD2: movzx eax, bp mov rcx, [rsp+78h+var_58] mov [rcx], ebx mov rcx, [rsp+78h+var_50] mov [rcx], eax mov rax, [rsp+78h+var_48] mov [rax], r13d mov rax, [rsp+78h+var_40] mov [rax], r12d xor eax, eax cmp [rsp+78h+var_60], 0 jz short loc_65B3A mov ecx, [rsp+78h+var_6C] mov rdx, [rsp+78h+var_60] mov [rdx], ecx jmp short loc_65B3A loc_65B0A: and eax, 0FFFFFFDFh cmp eax, 5Bh ; '[' jnz short loc_65B1B lea rsi, aInvalidDestruc; "invalid destructuring target" jmp short loc_65B2B loc_65B1B: lea rsi, aInvalidAssignm_0; "invalid assignment left-hand side" jmp short loc_65B2B loc_65B24: lea rsi, aInvalidLvalueI; "invalid lvalue in strict mode" loc_65B2B: mov rdi, r14 xor eax, eax call js_parse_error mov eax, 0FFFFFFFFh loc_65B3A: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_65B49: cmp edi, 41h ; 'A' jnz short loc_65B8F mov [r15+168h], eax add r15, 138h mov rdi, r15 mov esi, 42h ; 'B' call dbuf_putc mov rdi, r14 mov esi, r13d call emit_atom mov rdi, r14 mov esi, r13d call emit_ic mov r12d, 0FFFFFFFFh mov ebx, 41h ; 'A' jmp loc_65AD2 loc_65B8F: call _abort
long long get_lvalue( long long *a1, int *a2, long long a3, long long a4, long long a5, int *a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, int a15, int a16) { long long v17; // r15 long long v18; // rax int v19; // r13d int v20; // ebx int v21; // r9d long long v22; // rdi unsigned __int16 v23; // bp long long v24; // rdi long long v25; // rax long long v26; // rax _QWORD *v27; // rdi char v28; // si int v29; // r12d long long v30; // rax int v31; // ebx _QWORD *v32; // rdi long long v33; // r13 _QWORD *v34; // rdi long long v35; // rax _QWORD *v36; // rdi _QWORD *v37; // rdi long long v38; // rax _QWORD *v39; // r12 long long v40; // rax long long v41; // rax const char *v42; // rsi long long result; // rax char v44; // [rsp+0h] [rbp-78h] int v45; // [rsp+Ch] [rbp-6Ch] unsigned __int16 v46; // [rsp+12h] [rbp-66h] BYREF unsigned __int16 v47; // [rsp+14h] [rbp-64h] BYREF unsigned __int16 v48; // [rsp+16h] [rbp-62h] BYREF int *v49; // [rsp+18h] [rbp-60h] int *v50; // [rsp+20h] [rbp-58h] _DWORD *v51; // [rsp+28h] [rbp-50h] _DWORD *v52; // [rsp+30h] [rbp-48h] _DWORD *v53; // [rsp+38h] [rbp-40h] int v54; // [rsp+40h] [rbp-38h] BYREF int v55[13]; // [rsp+44h] [rbp-34h] BYREF v49 = a6; v17 = a1[18]; v18 = *(int *)(v17 + 360); v19 = 0; v20 = 0; if ( v18 >= 0 ) v20 = *(unsigned __int8 *)(*(_QWORD *)(v17 + 312) + v18); v21 = 2; if ( v20 <= 73 ) { if ( v20 == 65 ) { v19 = *(_DWORD *)(*(_QWORD *)(v17 + 312) + v18 + 1); v21 = 1; v23 = 0; goto LABEL_17; } v23 = 0; if ( v20 == 71 ) goto LABEL_17; goto LABEL_36; } if ( v20 == 74 ) { v23 = 0; v21 = 3; v19 = 0; goto LABEL_17; } if ( v20 == 189 ) { v24 = *(_QWORD *)(v17 + 312); v19 = *(_DWORD *)(v24 + v18 + 1); v23 = *(_WORD *)(v24 + v18 + 5); v21 = 1; goto LABEL_17; } if ( v20 != 183 ) { LABEL_36: if ( a16 == -69 ) { v42 = "invalid for in/of left hand-side"; } else { a4 = a16 & 0xFFFFFFFE; if ( (_DWORD)a4 == -108 ) { v42 = "invalid increment/decrement operand"; } else if ( (a16 & 0xFFFFFFDF) == 0x5B ) { v42 = "invalid destructuring target"; } else { v42 = "invalid assignment left-hand side"; } } goto LABEL_48; } v22 = *(_QWORD *)(v17 + 312); v19 = *(_DWORD *)(v22 + v18 + 1); v23 = *(_WORD *)(v22 + v18 + 5); if ( v19 > 77 ) { if ( v19 != 114 ) { if ( v19 != 78 ) goto LABEL_17; goto LABEL_34; } goto LABEL_36; } if ( v19 == 8 ) goto LABEL_36; if ( v19 != 59 ) goto LABEL_17; LABEL_34: if ( *(__int16 *)(v17 + 132) < 0 ) { v42 = "invalid lvalue in strict mode"; LABEL_48: js_parse_error(a1, (long long)v42, a3, a4, a5, 2LL, a7, a8, a9, a10, a11, a12, a13, a14, v44); return 0xFFFFFFFFLL; } LABEL_17: *(_QWORD *)(v17 + 320) = v18; *(_DWORD *)(v17 + 360) = -1; v53 = (_DWORD *)a5; v52 = (_DWORD *)a4; v51 = (_DWORD *)a3; v50 = a2; v45 = v21; if ( !a15 ) { v29 = -1; if ( (_BYTE)v20 == 71 ) { *(_DWORD *)(v17 + 360) = v18; dbuf_putc((_QWORD *)(v17 + 312), 114); v20 = 71; } else if ( (unsigned __int8)v20 == 74 ) { *(_DWORD *)(v17 + 360) = v18; dbuf_putc((_QWORD *)(v17 + 312), 113); v20 = 74; } else if ( (unsigned __int8)v20 == 183 ) { v29 = new_label_fd(v17, 0xFFFFFFFFLL); v30 = a1[18]; v31 = v19; *(_DWORD *)(v30 + 360) = *(_DWORD *)(v30 + 320); dbuf_putc((_QWORD *)(v30 + 312), 186); emit_atom(a1, v19); v32 = (_QWORD *)(a1[18] + 312); v55[0] = v29; dbuf_put(v32, (long long)v55, 4LL); v33 = a1[18] + 312; v48 = v23; v34 = (_QWORD *)v33; v19 = v31; dbuf_put(v34, (long long)&v48, 2LL); ++*(_DWORD *)(*(_QWORD *)(v17 + 368) + 24LL * v29); v20 = 60; } goto LABEL_42; } if ( (unsigned __int8)v20 > 0xB6u ) { if ( (unsigned __int8)v20 == 189 ) { *(_DWORD *)(v17 + 360) = v18; dbuf_putc((_QWORD *)(v17 + 312), 190); emit_atom(a1, v19); v39 = (_QWORD *)(a1[18] + 312); v47 = v23; dbuf_put(v39, (long long)&v47, 2LL); v29 = -1; v20 = 189; goto LABEL_42; } if ( (unsigned __int8)v20 == 183 ) { v29 = new_label_fd(v17, 0xFFFFFFFFLL); v35 = a1[18]; *(_DWORD *)(v35 + 360) = *(_DWORD *)(v35 + 320); dbuf_putc((_QWORD *)(v35 + 312), 186); emit_atom(a1, v19); v36 = (_QWORD *)(a1[18] + 312); v54 = v29; dbuf_put(v36, (long long)&v54, 4LL); v37 = (_QWORD *)(a1[18] + 312); v46 = v23; dbuf_put(v37, (long long)&v46, 2LL); ++*(_DWORD *)(*(_QWORD *)(v17 + 368) + 24LL * v29); v38 = a1[18]; *(_DWORD *)(v38 + 360) = *(_DWORD *)(v38 + 320); v20 = 60; dbuf_putc((_QWORD *)(v38 + 312), 60); goto LABEL_42; } goto LABEL_52; } if ( (unsigned __int8)v20 == 71 ) { *(_DWORD *)(v17 + 360) = v18; dbuf_putc((_QWORD *)(v17 + 312), 114); v40 = a1[18]; *(_DWORD *)(v40 + 360) = *(_DWORD *)(v40 + 320); dbuf_putc((_QWORD *)(v40 + 312), 19); v41 = a1[18]; *(_DWORD *)(v41 + 360) = *(_DWORD *)(v41 + 320); v20 = 71; v27 = (_QWORD *)(v41 + 312); v28 = 71; goto LABEL_31; } if ( (unsigned __int8)v20 == 74 ) { *(_DWORD *)(v17 + 360) = v18; dbuf_putc((_QWORD *)(v17 + 312), 113); v25 = a1[18]; *(_DWORD *)(v25 + 360) = *(_DWORD *)(v25 + 320); dbuf_putc((_QWORD *)(v25 + 312), 20); v26 = a1[18]; *(_DWORD *)(v26 + 360) = *(_DWORD *)(v26 + 320); v20 = 74; v27 = (_QWORD *)(v26 + 312); v28 = 74; LABEL_31: dbuf_putc(v27, v28); v29 = -1; goto LABEL_42; } if ( (unsigned __int8)v20 != 65 ) LABEL_52: abort((const char *)(unsigned __int8)v20); *(_DWORD *)(v17 + 360) = v18; dbuf_putc((_QWORD *)(v17 + 312), 66); emit_atom(a1, v19); emit_ic(a1, v19); v29 = -1; v20 = 65; LABEL_42: *v50 = v20; *v51 = v23; *v52 = v19; *v53 = v29; result = 0LL; if ( v49 ) *v49 = v45; return result; }
get_lvalue: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV qword ptr [RSP + 0x18],R9 MOV R14,RDI MOV R15,qword ptr [RDI + 0x90] MOVSXD RAX,dword ptr [R15 + 0x168] XOR R13D,R13D MOV EBX,0x0 TEST RAX,RAX JS 0x00165669 MOV RDI,qword ptr [R15 + 0x138] MOVZX EBX,byte ptr [RDI + RAX*0x1] LAB_00165669: MOV R9D,0x2 CMP EBX,0x49 JLE 0x001656be CMP EBX,0x4a JZ 0x001656d2 CMP EBX,0xbd JZ 0x001656df CMP EBX,0xb7 JNZ 0x00165a5e MOV RDI,qword ptr [R15 + 0x138] MOV R13D,dword ptr [RDI + RAX*0x1 + 0x1] MOVZX EBP,word ptr [RDI + RAX*0x1 + 0x5] CMP R13D,0x4d JG 0x00165a2f CMP R13D,0x8 JZ 0x00165a5e CMP R13D,0x3b JZ 0x00165a3f JMP 0x0016570c LAB_001656be: CMP EBX,0x41 JZ 0x001656f8 MOV EBP,0x0 CMP EBX,0x47 JZ 0x0016570c JMP 0x00165a5e LAB_001656d2: XOR EBP,EBP MOV R9D,0x3 XOR R13D,R13D JMP 0x0016570c LAB_001656df: MOV RDI,qword ptr [R15 + 0x138] MOV R13D,dword ptr [RDI + RAX*0x1 + 0x1] MOVZX EBP,word ptr [RDI + RAX*0x1 + 0x5] MOV R9D,0x1 JMP 0x0016570c LAB_001656f8: MOV RDI,qword ptr [R15 + 0x138] MOV R13D,dword ptr [RDI + RAX*0x1 + 0x1] MOV R9D,0x1 XOR EBP,EBP LAB_0016570c: MOV EDI,dword ptr [RSP + 0x80] MOV qword ptr [R15 + 0x140],RAX MOV dword ptr [R15 + 0x168],0xffffffff TEST EDI,EDI MOV qword ptr [RSP + 0x38],R8 MOV qword ptr [RSP + 0x30],RCX MOV qword ptr [RSP + 0x28],RDX MOV qword ptr [RSP + 0x20],RSI MOV dword ptr [RSP + 0xc],R9D JZ 0x001657cd MOVZX EDI,BL CMP EDI,0xb6 JG 0x0016588e CMP EDI,0x47 JZ 0x001659be CMP EDI,0x4a JNZ 0x00165b49 MOV R12D,0x138 MOV dword ptr [R15 + 0x168],EAX ADD R15,R12 MOV RDI,R15 MOV ESI,0x71 CALL 0x0011b4d0 MOV RAX,qword ptr [R14 + 0x90] LEA RDI,[RAX + R12*0x1] MOV ECX,dword ptr [RAX + 0x140] MOV dword ptr [RAX + 0x168],ECX MOV ESI,0x14 CALL 0x0011b4d0 MOV RAX,qword ptr [R14 + 0x90] ADD R12,RAX MOV ECX,dword ptr [RAX + 0x140] MOV dword ptr [RAX + 0x168],ECX MOV EBX,0x4a MOV RDI,R12 MOV ESI,0x4a JMP 0x00165a1f LAB_001657cd: MOV R12D,0xffffffff CMP BL,0x47 JZ 0x00165ab2 MOVZX ECX,BL CMP ECX,0x4a JZ 0x00165a90 CMP ECX,0xb7 JNZ 0x00165ad2 MOV RDI,R15 MOV ESI,0xffffffff CALL 0x0016c7b9 MOV R12D,EAX MOV RAX,qword ptr [R14 + 0x90] MOV EBX,R13D MOV R13D,0x138 LEA RDI,[RAX + R13*0x1] MOV ECX,dword ptr [RAX + 0x140] MOV dword ptr [RAX + 0x168],ECX MOV ESI,0xba CALL 0x0011b4d0 MOV RDI,R14 MOV ESI,EBX CALL 0x0015ebfa MOV RDI,qword ptr [R14 + 0x90] ADD RDI,R13 LEA RSI,[RSP + 0x44] MOV dword ptr [RSI],R12D MOV EDX,0x4 CALL 0x0011b422 ADD R13,qword ptr [R14 + 0x90] LEA RSI,[RSP + 0x16] MOV word ptr [RSI],BP MOV EDX,0x2 MOV RDI,R13 MOV R13D,EBX CALL 0x0011b422 MOV RAX,qword ptr [R15 + 0x170] MOVSXD RCX,R12D LEA RCX,[RCX + RCX*0x2] INC dword ptr [RAX + RCX*0x8] MOV EBX,0x3c JMP 0x00165ad2 LAB_0016588e: CMP EDI,0xbd JZ 0x0016596a CMP EDI,0xb7 JNZ 0x00165b8f MOV RDI,R15 MOV ESI,0xffffffff CALL 0x0016c7b9 MOV EBX,R13D MOV dword ptr [RSP + 0x8],R13D MOV R12D,EAX MOV RAX,qword ptr [R14 + 0x90] MOV R13D,0x138 LEA RDI,[RAX + R13*0x1] MOV ECX,dword ptr [RAX + 0x140] MOV dword ptr [RAX + 0x168],ECX MOV ESI,0xba CALL 0x0011b4d0 MOV RDI,R14 MOV ESI,EBX CALL 0x0015ebfa MOV RDI,qword ptr [R14 + 0x90] ADD RDI,R13 LEA RSI,[RSP + 0x40] MOV dword ptr [RSI],R12D MOV EDX,0x4 CALL 0x0011b422 MOV RDI,qword ptr [R14 + 0x90] ADD RDI,R13 LEA RSI,[RSP + 0x12] MOV word ptr [RSI],BP MOV EDX,0x2 CALL 0x0011b422 MOV RAX,qword ptr [R15 + 0x170] MOVSXD RCX,R12D LEA RCX,[RCX + RCX*0x2] INC dword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [R14 + 0x90] ADD R13,RAX MOV ECX,dword ptr [RAX + 0x140] MOV dword ptr [RAX + 0x168],ECX MOV EBX,0x3c MOV RDI,R13 MOV R13D,dword ptr [RSP + 0x8] MOV ESI,0x3c CALL 0x0011b4d0 JMP 0x00165ad2 LAB_0016596a: MOV R12D,0x138 MOV dword ptr [R15 + 0x168],EAX ADD R15,R12 MOV RDI,R15 MOV ESI,0xbe CALL 0x0011b4d0 MOV RDI,R14 MOV ESI,R13D CALL 0x0015ebfa ADD R12,qword ptr [R14 + 0x90] LEA RSI,[RSP + 0x14] MOV word ptr [RSI],BP MOV EDX,0x2 MOV RDI,R12 CALL 0x0011b422 MOV R12D,0xffffffff MOV EBX,0xbd JMP 0x00165ad2 LAB_001659be: MOV R12D,0x138 MOV dword ptr [R15 + 0x168],EAX ADD R15,R12 MOV RDI,R15 MOV ESI,0x72 CALL 0x0011b4d0 MOV RAX,qword ptr [R14 + 0x90] LEA RDI,[RAX + R12*0x1] MOV ECX,dword ptr [RAX + 0x140] MOV dword ptr [RAX + 0x168],ECX MOV ESI,0x13 CALL 0x0011b4d0 MOV RAX,qword ptr [R14 + 0x90] ADD R12,RAX MOV ECX,dword ptr [RAX + 0x140] MOV dword ptr [RAX + 0x168],ECX MOV EBX,0x47 MOV RDI,R12 MOV ESI,0x47 LAB_00165a1f: CALL 0x0011b4d0 MOV R12D,0xffffffff JMP 0x00165ad2 LAB_00165a2f: CMP R13D,0x72 JZ 0x00165a5e CMP R13D,0x4e JNZ 0x0016570c LAB_00165a3f: CMP word ptr [R15 + 0x84],0x0 JS 0x00165b24 CMP R13D,0x8 JZ 0x00165a5e CMP R13D,0x72 JNZ 0x0016570c LAB_00165a5e: MOV EAX,dword ptr [RSP + 0x88] CMP EAX,-0x45 JNZ 0x00165a76 LEA RSI,[0x1a10e6] JMP 0x00165b2b LAB_00165a76: MOV ECX,EAX AND ECX,0xfffffffe CMP ECX,-0x6c JNZ 0x00165b0a LEA RSI,[0x1a1107] JMP 0x00165b2b LAB_00165a90: MOV dword ptr [R15 + 0x168],EAX ADD R15,0x138 MOV RDI,R15 MOV ESI,0x71 CALL 0x0011b4d0 MOV EBX,0x4a JMP 0x00165ad2 LAB_00165ab2: MOV dword ptr [R15 + 0x168],EAX ADD R15,0x138 MOV RDI,R15 MOV ESI,0x72 CALL 0x0011b4d0 MOV EBX,0x47 LAB_00165ad2: MOVZX EAX,BP MOV RCX,qword ptr [RSP + 0x20] MOV dword ptr [RCX],EBX MOV RCX,qword ptr [RSP + 0x28] MOV dword ptr [RCX],EAX MOV RAX,qword ptr [RSP + 0x30] MOV dword ptr [RAX],R13D MOV RAX,qword ptr [RSP + 0x38] MOV dword ptr [RAX],R12D XOR EAX,EAX CMP qword ptr [RSP + 0x18],0x0 JZ 0x00165b3a MOV ECX,dword ptr [RSP + 0xc] MOV RDX,qword ptr [RSP + 0x18] MOV dword ptr [RDX],ECX JMP 0x00165b3a LAB_00165b0a: AND EAX,0xffffffdf CMP EAX,0x5b JNZ 0x00165b1b LEA RSI,[0x1a0bc0] JMP 0x00165b2b LAB_00165b1b: LEA RSI,[0x1a112b] JMP 0x00165b2b LAB_00165b24: LEA RSI,[0x1a10c8] LAB_00165b2b: MOV RDI,R14 XOR EAX,EAX CALL 0x0012fce9 MOV EAX,0xffffffff LAB_00165b3a: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00165b49: CMP EDI,0x41 JNZ 0x00165b8f MOV dword ptr [R15 + 0x168],EAX ADD R15,0x138 MOV RDI,R15 MOV ESI,0x42 CALL 0x0011b4d0 MOV RDI,R14 MOV ESI,R13D CALL 0x0015ebfa MOV RDI,R14 MOV ESI,R13D CALL 0x00111b16 MOV R12D,0xffffffff MOV EBX,0x41 JMP 0x00165ad2 LAB_00165b8f: CALL 0x0010e090
int8 get_lvalue(long param_1,uint *param_2,uint *param_3,int *param_4,int *param_5,int4 *param_6, int param_7,uint param_8) { int *piVar1; int iVar2; long lVar3; int iVar4; long lVar5; uint uVar6; ushort uVar7; int8 uVar8; char *pcVar9; int4 uVar10; int iVar11; ushort local_66; ushort local_64; ushort local_62; int4 *local_60; uint *local_58; uint *local_50; int *local_48; int *local_40; int local_38; int local_34; lVar3 = *(long *)(param_1 + 0x90); iVar2 = *(int *)(lVar3 + 0x168); lVar5 = (long)iVar2; iVar11 = 0; uVar6 = 0; if (-1 < lVar5) { uVar6 = (uint)*(byte *)(*(long *)(lVar3 + 0x138) + lVar5); } uVar10 = 2; local_60 = param_6; if (uVar6 < 0x4a) { if (uVar6 == 0x41) { iVar11 = *(int *)(*(long *)(lVar3 + 0x138) + 1 + lVar5); uVar10 = 1; uVar7 = 0; } else { uVar7 = 0; if (uVar6 != 0x47) goto LAB_00165a5e; } } else if (uVar6 == 0x4a) { uVar7 = 0; uVar10 = 3; iVar11 = 0; } else if (uVar6 == 0xbd) { iVar11 = *(int *)(*(long *)(lVar3 + 0x138) + 1 + lVar5); uVar7 = *(ushort *)(*(long *)(lVar3 + 0x138) + 5 + lVar5); uVar10 = 1; } else { if (uVar6 != 0xb7) { LAB_00165a5e: if (param_8 == 0xffffffbb) { pcVar9 = "invalid for in/of left hand-side"; } else if ((param_8 & 0xfffffffe) == 0xffffff94) { pcVar9 = "invalid increment/decrement operand"; } else if ((param_8 & 0xffffffdf) == 0x5b) { pcVar9 = "invalid destructuring target"; } else { pcVar9 = "invalid assignment left-hand side"; } LAB_00165b2b: js_parse_error(param_1,pcVar9); return 0xffffffff; } iVar11 = *(int *)(*(long *)(lVar3 + 0x138) + 1 + lVar5); uVar7 = *(ushort *)(*(long *)(lVar3 + 0x138) + 5 + lVar5); if (iVar11 < 0x4e) { if (iVar11 == 8) goto LAB_00165a5e; if (iVar11 == 0x3b) { LAB_00165a3f: if (*(short *)(lVar3 + 0x84) < 0) { pcVar9 = "invalid lvalue in strict mode"; goto LAB_00165b2b; } if ((iVar11 == 8) || (iVar11 == 0x72)) goto LAB_00165a5e; } } else { if (iVar11 == 0x72) goto LAB_00165a5e; if (iVar11 == 0x4e) goto LAB_00165a3f; } } *(long *)(lVar3 + 0x140) = lVar5; *(int4 *)(lVar3 + 0x168) = 0xffffffff; local_58 = param_2; local_50 = param_3; local_48 = param_4; local_40 = param_5; if (param_7 == 0) { iVar4 = -1; if ((char)uVar6 == 'G') { *(int *)(lVar3 + 0x168) = iVar2; dbuf_putc(lVar3 + 0x138,0x72); uVar6 = 0x47; } else if (uVar6 == 0x4a) { *(int *)(lVar3 + 0x168) = iVar2; dbuf_putc(lVar3 + 0x138,0x71); uVar6 = 0x4a; } else if (uVar6 == 0xb7) { iVar4 = new_label_fd(lVar3,0xffffffff); lVar5 = *(long *)(param_1 + 0x90); *(int4 *)(lVar5 + 0x168) = *(int4 *)(lVar5 + 0x140); dbuf_putc(lVar5 + 0x138,0xba); emit_atom(param_1,iVar11); local_34 = iVar4; dbuf_put(*(long *)(param_1 + 0x90) + 0x138,&local_34,4); local_62 = uVar7; dbuf_put(*(long *)(param_1 + 0x90) + 0x138,&local_62,2); piVar1 = (int *)(*(long *)(lVar3 + 0x170) + (long)iVar4 * 0x18); *piVar1 = *piVar1 + 1; uVar6 = 0x3c; } } else if (uVar6 < 0xb7) { if (uVar6 == 0x47) { *(int *)(lVar3 + 0x168) = iVar2; dbuf_putc(lVar3 + 0x138,0x72); lVar3 = *(long *)(param_1 + 0x90); *(int4 *)(lVar3 + 0x168) = *(int4 *)(lVar3 + 0x140); dbuf_putc(lVar3 + 0x138,0x13); lVar3 = *(long *)(param_1 + 0x90); *(int4 *)(lVar3 + 0x168) = *(int4 *)(lVar3 + 0x140); uVar6 = 0x47; uVar8 = 0x47; } else { if (uVar6 != 0x4a) { if (uVar6 != 0x41) goto LAB_00165b8f; *(int *)(lVar3 + 0x168) = iVar2; dbuf_putc(lVar3 + 0x138,0x42); emit_atom(param_1,iVar11); emit_ic(param_1,iVar11); iVar4 = -1; uVar6 = 0x41; goto LAB_00165ad2; } *(int *)(lVar3 + 0x168) = iVar2; dbuf_putc(lVar3 + 0x138,0x71); lVar3 = *(long *)(param_1 + 0x90); *(int4 *)(lVar3 + 0x168) = *(int4 *)(lVar3 + 0x140); dbuf_putc(lVar3 + 0x138,0x14); lVar3 = *(long *)(param_1 + 0x90); *(int4 *)(lVar3 + 0x168) = *(int4 *)(lVar3 + 0x140); uVar6 = 0x4a; uVar8 = 0x4a; } dbuf_putc(lVar3 + 0x138,uVar8); iVar4 = -1; } else if (uVar6 == 0xbd) { *(int *)(lVar3 + 0x168) = iVar2; dbuf_putc(lVar3 + 0x138,0xbe); emit_atom(param_1,iVar11); local_64 = uVar7; dbuf_put(*(long *)(param_1 + 0x90) + 0x138,&local_64,2); iVar4 = -1; uVar6 = 0xbd; } else { if (uVar6 != 0xb7) { LAB_00165b8f: /* WARNING: Subroutine does not return */ abort(); } iVar4 = new_label_fd(lVar3,0xffffffff); lVar5 = *(long *)(param_1 + 0x90); *(int4 *)(lVar5 + 0x168) = *(int4 *)(lVar5 + 0x140); dbuf_putc(lVar5 + 0x138,0xba); emit_atom(param_1,iVar11); local_38 = iVar4; dbuf_put(*(long *)(param_1 + 0x90) + 0x138,&local_38,4); local_66 = uVar7; dbuf_put(*(long *)(param_1 + 0x90) + 0x138,&local_66,2); piVar1 = (int *)(*(long *)(lVar3 + 0x170) + (long)iVar4 * 0x18); *piVar1 = *piVar1 + 1; lVar3 = *(long *)(param_1 + 0x90); *(int4 *)(lVar3 + 0x168) = *(int4 *)(lVar3 + 0x140); uVar6 = 0x3c; dbuf_putc(lVar3 + 0x138,0x3c); } LAB_00165ad2: *local_58 = uVar6; *local_50 = (uint)uVar7; *local_48 = iVar11; *local_40 = iVar4; if (local_60 != (int4 *)0x0) { *local_60 = uVar10; } return 0; }
5,552
pfs_end_table_io_wait_v1
eloqsql/storage/perfschema/pfs.cc
void pfs_end_table_io_wait_v1(PSI_table_locker* locker, ulonglong numrows) { PSI_table_locker_state *state= reinterpret_cast<PSI_table_locker_state*> (locker); assert(state != NULL); ulonglong timer_end= 0; ulonglong wait_time= 0; PFS_table *table= reinterpret_cast<PFS_table *> (state->m_table); assert(table != NULL); PFS_single_stat *stat; PFS_table_io_stat *table_io_stat; assert((state->m_index < table->m_share->m_key_count) || (state->m_index == MAX_INDEXES)); table_io_stat= & table->m_table_stat.m_index_stat[state->m_index]; table_io_stat->m_has_data= true; switch (state->m_io_operation) { case PSI_TABLE_FETCH_ROW: stat= & table_io_stat->m_fetch; break; case PSI_TABLE_WRITE_ROW: stat= & table_io_stat->m_insert; break; case PSI_TABLE_UPDATE_ROW: stat= & table_io_stat->m_update; break; case PSI_TABLE_DELETE_ROW: stat= & table_io_stat->m_delete; break; default: assert(false); stat= NULL; break; } uint flags= state->m_flags; if (flags & STATE_FLAG_TIMED) { timer_end= state->m_timer(); wait_time= timer_end - state->m_timer_start; stat->aggregate_many_value(wait_time, numrows); } else { stat->aggregate_counted(numrows); } if (flags & STATE_FLAG_THREAD) { PFS_thread *thread= reinterpret_cast<PFS_thread *> (state->m_thread); assert(thread != NULL); PFS_single_stat *event_name_array; event_name_array= thread->write_instr_class_waits_stats(); /* Aggregate to EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME (for wait/io/table/sql/handler) */ if (flags & STATE_FLAG_TIMED) { event_name_array[GLOBAL_TABLE_IO_EVENT_INDEX].aggregate_many_value(wait_time, numrows); } else { event_name_array[GLOBAL_TABLE_IO_EVENT_INDEX].aggregate_counted(numrows); } if (flags & STATE_FLAG_EVENT) { PFS_events_waits *wait= reinterpret_cast<PFS_events_waits*> (state->m_wait); assert(wait != NULL); wait->m_timer_end= timer_end; wait->m_end_event_id= thread->m_event_id; wait->m_number_of_bytes= static_cast<size_t>(numrows); if (thread->m_flag_events_waits_history) insert_events_waits_history(thread, wait); if (thread->m_flag_events_waits_history_long) insert_events_waits_history_long(wait); thread->m_events_waits_current--; assert(wait == thread->m_events_waits_current); } } table->m_has_io_stats= true; }
O3
cpp
pfs_end_table_io_wait_v1: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %r14 movq 0x8(%rdi), %r13 movl 0x38(%rdi), %eax movq %rax, %rcx shlq $0x7, %rcx leaq (%rcx,%rax,8), %rcx movb $0x1, 0x30(%r13,%rcx) movl 0x4(%rdi), %eax cmpq $0x3, %rax ja 0x428ba leaq (%rcx,%r13), %r12 addq $0x30, %r12 leaq 0x43107(%rip), %rcx # 0x859a0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax addq $0x8, %r12 jmp 0x428bd addq $0x48, %r12 jmp 0x428bd addq $0x68, %r12 jmp 0x428bd addq $0x28, %r12 jmp 0x428bd xorl %r12d, %r12d movl (%r14), %ebx testb $0x1, %bl jne 0x428d0 addq %rsi, (%r12) xorl %r15d, %r15d xorl %eax, %eax jmp 0x42900 movq %rsi, %r15 callq *0x28(%r14) movq %r15, %rsi movq %rax, %r15 subq 0x20(%r14), %r15 addq %rsi, (%r12) addq %r15, 0x8(%r12) cmpq %r15, 0x10(%r12) ja 0x429bf cmpq %r15, 0x18(%r12) jb 0x429c9 testb $0x2, %bl je 0x429ab movq 0x18(%r14), %r12 cmpb $0x0, (%r12) jne 0x42931 movq %r12, %rdi movq %rsi, -0x38(%rbp) movq %rax, -0x30(%rbp) callq 0x46378 movq -0x30(%rbp), %rax movq -0x38(%rbp), %rsi movb $0x1, (%r12) movq 0x8(%r12), %rcx addq %rsi, (%rcx) testb $0x1, %bl je 0x42956 addq %r15, 0x8(%rcx) cmpq %r15, 0x10(%rcx) ja 0x429d3 cmpq %r15, 0x18(%rcx) jb 0x429dc testb $0x4, %bl je 0x429ab movq 0x30(%r14), %r14 movq %rax, 0x40(%r14) movq 0x7f8(%r12), %rax movq %rax, 0x10(%r14) movq %rsi, 0x98(%r14) cmpb $0x1, 0x7e2(%r12) jne 0x4298c movq %r12, %rdi movq %r14, %rsi callq 0x272d2 cmpb $0x1, 0x7e3(%r12) jne 0x4299f movq %r14, %rdi callq 0x2732e addq $-0xb0, 0x7f0(%r12) movb $0x1, 0x4(%r13) addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r15, 0x10(%r12) jmp 0x428f5 movq %r15, 0x18(%r12) jmp 0x42900 movq %r15, 0x10(%rcx) jmp 0x4294c movq %r15, 0x18(%rcx) jmp 0x42956
pfs_end_table_io_wait_v1: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rdi mov r13, [rdi+8] mov eax, [rdi+38h] mov rcx, rax shl rcx, 7 lea rcx, [rcx+rax*8] mov byte ptr [r13+rcx+30h], 1 mov eax, [rdi+4] cmp rax, 3; switch 4 cases ja short def_428A0; jumptable 00000000000428A0 default case lea r12, [rcx+r13] add r12, 30h ; '0' lea rcx, jpt_428A0 movsxd rax, ds:(jpt_428A0 - 859A0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_428A2: add r12, 8; jumptable 00000000000428A0 case 0 jmp short loc_428BD loc_428A8: add r12, 48h ; 'H'; jumptable 00000000000428A0 case 2 jmp short loc_428BD loc_428AE: add r12, 68h ; 'h'; jumptable 00000000000428A0 case 3 jmp short loc_428BD loc_428B4: add r12, 28h ; '('; jumptable 00000000000428A0 case 1 jmp short loc_428BD def_428A0: xor r12d, r12d; jumptable 00000000000428A0 default case loc_428BD: mov ebx, [r14] test bl, 1 jnz short loc_428D0 add [r12], rsi xor r15d, r15d xor eax, eax jmp short loc_42900 loc_428D0: mov r15, rsi call qword ptr [r14+28h] mov rsi, r15 mov r15, rax sub r15, [r14+20h] add [r12], rsi add [r12+8], r15 cmp [r12+10h], r15 ja loc_429BF loc_428F5: cmp [r12+18h], r15 jb loc_429C9 loc_42900: test bl, 2 jz loc_429AB mov r12, [r14+18h] cmp byte ptr [r12], 0 jnz short loc_42931 mov rdi, r12; this mov [rbp+var_38], rsi mov [rbp+var_30], rax call _ZN20PFS_connection_slice17reset_waits_statsEv; PFS_connection_slice::reset_waits_stats(void) mov rax, [rbp+var_30] mov rsi, [rbp+var_38] mov byte ptr [r12], 1 loc_42931: mov rcx, [r12+8] add [rcx], rsi test bl, 1 jz short loc_42956 add [rcx+8], r15 cmp [rcx+10h], r15 ja loc_429D3 loc_4294C: cmp [rcx+18h], r15 jb loc_429DC loc_42956: test bl, 4 jz short loc_429AB mov r14, [r14+30h] mov [r14+40h], rax mov rax, [r12+7F8h] mov [r14+10h], rax mov [r14+98h], rsi cmp byte ptr [r12+7E2h], 1 jnz short loc_4298C mov rdi, r12 mov rsi, r14 call _Z27insert_events_waits_historyP10PFS_threadP16PFS_events_waits; insert_events_waits_history(PFS_thread *,PFS_events_waits *) loc_4298C: cmp byte ptr [r12+7E3h], 1 jnz short loc_4299F mov rdi, r14 call _Z32insert_events_waits_history_longP16PFS_events_waits; insert_events_waits_history_long(PFS_events_waits *) loc_4299F: add qword ptr [r12+7F0h], 0FFFFFFFFFFFFFF50h loc_429AB: mov byte ptr [r13+4], 1 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_429BF: mov [r12+10h], r15 jmp loc_428F5 loc_429C9: mov [r12+18h], r15 jmp loc_42900 loc_429D3: mov [rcx+10h], r15 jmp loc_4294C loc_429DC: mov [rcx+18h], r15 jmp loc_42956
long long pfs_end_table_io_wait_v1(int *a1, long long a2) { long long v2; // r13 long long v3; // rcx _QWORD *v4; // r12 int v5; // ebx unsigned long long v6; // r15 long long result; // rax long long v8; // r12 _QWORD *v9; // rcx _QWORD *v10; // r14 long long v11; // [rsp+10h] [rbp-30h] v2 = *((_QWORD *)a1 + 1); v3 = 136LL * (unsigned int)a1[14]; *(_BYTE *)(v2 + v3 + 48) = 1; switch ( a1[1] ) { case 0: v4 = (_QWORD *)(v3 + v2 + 56); break; case 1: v4 = (_QWORD *)(v3 + v2 + 88); break; case 2: v4 = (_QWORD *)(v3 + v2 + 120); break; case 3: v4 = (_QWORD *)(v3 + v2 + 152); break; default: v4 = 0LL; break; } v5 = *a1; if ( (*a1 & 1) != 0 ) { result = (*((long long (**)(void))a1 + 5))(); v6 = result - *((_QWORD *)a1 + 4); *v4 += a2; v4[1] += v6; if ( v4[2] > v6 ) v4[2] = v6; if ( v4[3] < v6 ) v4[3] = v6; } else { *v4 += a2; v6 = 0LL; result = 0LL; } if ( (v5 & 2) != 0 ) { v8 = *((_QWORD *)a1 + 3); if ( !*(_BYTE *)v8 ) { v11 = result; PFS_connection_slice::reset_waits_stats(*((PFS_connection_slice **)a1 + 3)); result = v11; *(_BYTE *)v8 = 1; } v9 = *(_QWORD **)(v8 + 8); *v9 += a2; if ( (v5 & 1) != 0 ) { v9[1] += v6; if ( v9[2] > v6 ) v9[2] = v6; if ( v9[3] < v6 ) v9[3] = v6; } if ( (v5 & 4) != 0 ) { v10 = (_QWORD *)*((_QWORD *)a1 + 6); v10[8] = result; result = *(_QWORD *)(v8 + 2040); v10[2] = result; v10[19] = a2; if ( *(_BYTE *)(v8 + 2018) == 1 ) result = insert_events_waits_history(v8, (long long)v10); if ( *(_BYTE *)(v8 + 2019) == 1 ) result = insert_events_waits_history_long((long long)v10); *(_QWORD *)(v8 + 2032) -= 176LL; } } *(_BYTE *)(v2 + 4) = 1; return result; }
pfs_end_table_io_wait_v1: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RDI MOV R13,qword ptr [RDI + 0x8] MOV EAX,dword ptr [RDI + 0x38] MOV RCX,RAX SHL RCX,0x7 LEA RCX,[RCX + RAX*0x8] MOV byte ptr [R13 + RCX*0x1 + 0x30],0x1 MOV EAX,dword ptr [RDI + 0x4] CMP RAX,0x3 JA 0x001428ba LEA R12,[RCX + R13*0x1] ADD R12,0x30 LEA RCX,[0x1859a0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: ADD R12,0x8 JMP 0x001428bd caseD_2: ADD R12,0x48 JMP 0x001428bd caseD_3: ADD R12,0x68 JMP 0x001428bd caseD_1: ADD R12,0x28 JMP 0x001428bd LAB_001428ba: XOR R12D,R12D LAB_001428bd: MOV EBX,dword ptr [R14] TEST BL,0x1 JNZ 0x001428d0 ADD qword ptr [R12],RSI XOR R15D,R15D XOR EAX,EAX JMP 0x00142900 LAB_001428d0: MOV R15,RSI CALL qword ptr [R14 + 0x28] MOV RSI,R15 MOV R15,RAX SUB R15,qword ptr [R14 + 0x20] ADD qword ptr [R12],RSI ADD qword ptr [R12 + 0x8],R15 CMP qword ptr [R12 + 0x10],R15 JA 0x001429bf LAB_001428f5: CMP qword ptr [R12 + 0x18],R15 JC 0x001429c9 LAB_00142900: TEST BL,0x2 JZ 0x001429ab MOV R12,qword ptr [R14 + 0x18] CMP byte ptr [R12],0x0 JNZ 0x00142931 MOV RDI,R12 MOV qword ptr [RBP + -0x38],RSI MOV qword ptr [RBP + -0x30],RAX CALL 0x00146378 MOV RAX,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x38] MOV byte ptr [R12],0x1 LAB_00142931: MOV RCX,qword ptr [R12 + 0x8] ADD qword ptr [RCX],RSI TEST BL,0x1 JZ 0x00142956 ADD qword ptr [RCX + 0x8],R15 CMP qword ptr [RCX + 0x10],R15 JA 0x001429d3 LAB_0014294c: CMP qword ptr [RCX + 0x18],R15 JC 0x001429dc LAB_00142956: TEST BL,0x4 JZ 0x001429ab MOV R14,qword ptr [R14 + 0x30] MOV qword ptr [R14 + 0x40],RAX MOV RAX,qword ptr [R12 + 0x7f8] MOV qword ptr [R14 + 0x10],RAX MOV qword ptr [R14 + 0x98],RSI CMP byte ptr [R12 + 0x7e2],0x1 JNZ 0x0014298c MOV RDI,R12 MOV RSI,R14 CALL 0x001272d2 LAB_0014298c: CMP byte ptr [R12 + 0x7e3],0x1 JNZ 0x0014299f MOV RDI,R14 CALL 0x0012732e LAB_0014299f: ADD qword ptr [R12 + 0x7f0],-0xb0 LAB_001429ab: MOV byte ptr [R13 + 0x4],0x1 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001429bf: MOV qword ptr [R12 + 0x10],R15 JMP 0x001428f5 LAB_001429c9: MOV qword ptr [R12 + 0x18],R15 JMP 0x00142900 LAB_001429d3: MOV qword ptr [RCX + 0x10],R15 JMP 0x0014294c LAB_001429dc: MOV qword ptr [RCX + 0x18],R15 JMP 0x00142956
void pfs_end_table_io_wait_v1(uint *param_1,long param_2) { uint uVar1; long lVar2; PFS_connection_slice *this; PFS_events_waits *pPVar3; long lVar4; long *plVar5; ulong uVar6; lVar2 = *(long *)(param_1 + 2); uVar1 = param_1[0xe]; *(int1 *)(lVar2 + 0x30 + (ulong)uVar1 * 0x88) = 1; if (param_1[1] < 4) { lVar4 = (ulong)uVar1 * 0x88 + lVar2; switch(param_1[1]) { case 0: plVar5 = (long *)(lVar4 + 0x38); break; case 1: plVar5 = (long *)(lVar4 + 0x58); break; case 2: plVar5 = (long *)(lVar4 + 0x78); break; case 3: plVar5 = (long *)(lVar4 + 0x98); } } else { plVar5 = (long *)0x0; } uVar1 = *param_1; if ((uVar1 & 1) == 0) { *plVar5 = *plVar5 + param_2; uVar6 = 0; lVar4 = 0; } else { lVar4 = (**(code **)(param_1 + 10))(); uVar6 = lVar4 - *(long *)(param_1 + 8); *plVar5 = *plVar5 + param_2; plVar5[1] = plVar5[1] + uVar6; if (uVar6 < (ulong)plVar5[2]) { plVar5[2] = uVar6; } if ((ulong)plVar5[3] < uVar6) { plVar5[3] = uVar6; } } if ((uVar1 & 2) != 0) { this = *(PFS_connection_slice **)(param_1 + 6); if (*this == (PFS_connection_slice)0x0) { PFS_connection_slice::reset_waits_stats(this); *this = (PFS_connection_slice)0x1; } plVar5 = *(long **)(this + 8); *plVar5 = *plVar5 + param_2; if ((uVar1 & 1) != 0) { plVar5[1] = plVar5[1] + uVar6; if (uVar6 < (ulong)plVar5[2]) { plVar5[2] = uVar6; } if ((ulong)plVar5[3] < uVar6) { plVar5[3] = uVar6; } } if ((uVar1 & 4) != 0) { pPVar3 = *(PFS_events_waits **)(param_1 + 0xc); *(long *)(pPVar3 + 0x40) = lVar4; *(int8 *)(pPVar3 + 0x10) = *(int8 *)(this + 0x7f8); *(long *)(pPVar3 + 0x98) = param_2; if (this[0x7e2] == (PFS_connection_slice)0x1) { insert_events_waits_history((PFS_thread *)this,pPVar3); } if (this[0x7e3] == (PFS_connection_slice)0x1) { insert_events_waits_history_long(pPVar3); } *(long *)(this + 0x7f0) = *(long *)(this + 0x7f0) + -0xb0; } } *(int1 *)(lVar2 + 4) = 1; return; }
5,553
stbi__is_16_main(stbi__context*)
monkey531[P]llama/examples/llava/../../common/stb_image.h
static int stbi__is_16_main(stbi__context *s) { #ifndef STBI_NO_PNG if (stbi__png_is16(s)) return 1; #endif #ifndef STBI_NO_PSD if (stbi__psd_is16(s)) return 1; #endif #ifndef STBI_NO_PNM if (stbi__pnm_is16(s)) return 1; #endif return 0; }
O3
c
stbi__is_16_main(stbi__context*): pushq %rbp pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movq %rsp, %rdi movq %rbx, (%rdi) movl $0x2, %esi xorl %edx, %edx callq 0x3c659 testl %eax, %eax je 0x2ace4 cmpl $0x10, 0x20(%rsp) jne 0x2ace4 movl $0x1, %eax jmp 0x2adaf movq (%rsp), %rax movups 0xd0(%rax), %xmm0 movups %xmm0, 0xc0(%rax) movq %rbx, %rdi callq 0x3de05 movl %eax, %ebp shll $0x10, %ebp movq %rbx, %rdi callq 0x3de05 orl %ebp, %eax cmpl $0x38425053, %eax # imm = 0x38425053 jne 0x2ad89 movq %rbx, %rdi callq 0x3de05 cmpl $0x1, %eax jne 0x2ad89 cmpq $0x0, 0x10(%rbx) je 0x2ad56 movq 0xc0(%rbx), %rax movq 0xc8(%rbx), %rdx movl %edx, %ecx subl %eax, %ecx cmpl $0x5, %ecx jg 0x2ad5d movq %rdx, 0xc0(%rbx) movq 0x28(%rbx), %rdi movl $0x6, %esi subl %ecx, %esi callq *0x18(%rbx) jmp 0x2ad68 movq 0xc0(%rbx), %rax addq $0x6, %rax movq %rax, 0xc0(%rbx) movq %rbx, %rdi callq 0x3de05 cmpl $0x10, %eax ja 0x2ad89 movq %rbx, %rdi callq 0x3de05 movl %eax, %ecx movl $0x1, %eax cmpl $0x10, %ecx je 0x2adaf movups 0xd0(%rbx), %xmm0 movups %xmm0, 0xc0(%rbx) movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx xorl %ecx, %ecx callq 0x42976 movl %eax, %ecx xorl %eax, %eax cmpl $0x10, %ecx sete %al addq $0x28, %rsp popq %rbx popq %rbp retq
_ZL16stbi__is_16_mainP13stbi__context: push rbp push rbx sub rsp, 28h mov rbx, rdi mov rdi, rsp mov [rdi], rbx mov esi, 2 xor edx, edx call _ZL20stbi__parse_png_fileP9stbi__pngii; stbi__parse_png_file(stbi__png *,int,int) test eax, eax jz short loc_2ACE4 cmp [rsp+38h+var_18], 10h jnz short loc_2ACE4 mov eax, 1 jmp loc_2ADAF loc_2ACE4: mov rax, [rsp+38h+var_38] movups xmm0, xmmword ptr [rax+0D0h] movups xmmword ptr [rax+0C0h], xmm0 mov rdi, rbx call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *) mov ebp, eax shl ebp, 10h mov rdi, rbx call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *) or eax, ebp cmp eax, 38425053h jnz short loc_2AD89 mov rdi, rbx call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *) cmp eax, 1 jnz short loc_2AD89 cmp qword ptr [rbx+10h], 0 jz short loc_2AD56 mov rax, [rbx+0C0h] mov rdx, [rbx+0C8h] mov ecx, edx sub ecx, eax cmp ecx, 5 jg short loc_2AD5D mov [rbx+0C0h], rdx mov rdi, [rbx+28h] mov esi, 6 sub esi, ecx call qword ptr [rbx+18h] jmp short loc_2AD68 loc_2AD56: mov rax, [rbx+0C0h] loc_2AD5D: add rax, 6 mov [rbx+0C0h], rax loc_2AD68: mov rdi, rbx call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *) cmp eax, 10h ja short loc_2AD89 mov rdi, rbx call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *) mov ecx, eax mov eax, 1 cmp ecx, 10h jz short loc_2ADAF loc_2AD89: movups xmm0, xmmword ptr [rbx+0D0h] movups xmmword ptr [rbx+0C0h], xmm0 mov rdi, rbx xor esi, esi xor edx, edx xor ecx, ecx call _ZL14stbi__pnm_infoP13stbi__contextPiS1_S1_; stbi__pnm_info(stbi__context *,int *,int *,int *) mov ecx, eax xor eax, eax cmp ecx, 10h setz al loc_2ADAF: add rsp, 28h pop rbx pop rbp retn
_BOOL8 stbi__is_16_main(long long a1) { _BOOL8 result; // rax unsigned int v2; // ebp long long v3; // rax int v4; // ecx int v5; // ecx _QWORD v6[4]; // [rsp+0h] [rbp-38h] BYREF int v7; // [rsp+20h] [rbp-18h] v6[0] = a1; if ( (unsigned int)stbi__parse_png_file(v6, 2LL, 0LL) && v7 == 16 ) return 1LL; *(_OWORD *)(v6[0] + 192LL) = *(_OWORD *)(v6[0] + 208LL); v2 = (unsigned int)stbi__get16be(a1) << 16; if ( (v2 | (unsigned int)stbi__get16be(a1)) != 0x38425053 || (unsigned int)stbi__get16be(a1) != 1 ) goto LABEL_13; if ( !*(_QWORD *)(a1 + 16) ) { v3 = *(_QWORD *)(a1 + 192); goto LABEL_10; } v3 = *(_QWORD *)(a1 + 192); v4 = *(_QWORD *)(a1 + 200) - v3; if ( v4 > 5 ) { LABEL_10: *(_QWORD *)(a1 + 192) = v3 + 6; goto LABEL_11; } *(_QWORD *)(a1 + 192) = *(_QWORD *)(a1 + 200); (*(void ( **)(_QWORD, _QWORD))(a1 + 24))(*(_QWORD *)(a1 + 40), (unsigned int)(6 - v4)); LABEL_11: if ( (unsigned int)stbi__get16be(a1) > 0x10 || (v5 = stbi__get16be(a1), result = 1LL, v5 != 16) ) { LABEL_13: *(_OWORD *)(a1 + 192) = *(_OWORD *)(a1 + 208); return (unsigned int)stbi__pnm_info(a1, 0LL, 0LL, 0LL) == 16; } return result; }
stbi__is_16_main: PUSH RBP PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV RDI,RSP MOV qword ptr [RDI],RBX MOV ESI,0x2 XOR EDX,EDX CALL 0x0013c659 TEST EAX,EAX JZ 0x0012ace4 CMP dword ptr [RSP + 0x20],0x10 JNZ 0x0012ace4 MOV EAX,0x1 JMP 0x0012adaf LAB_0012ace4: MOV RAX,qword ptr [RSP] MOVUPS XMM0,xmmword ptr [RAX + 0xd0] MOVUPS xmmword ptr [RAX + 0xc0],XMM0 MOV RDI,RBX CALL 0x0013de05 MOV EBP,EAX SHL EBP,0x10 MOV RDI,RBX CALL 0x0013de05 OR EAX,EBP CMP EAX,0x38425053 JNZ 0x0012ad89 MOV RDI,RBX CALL 0x0013de05 CMP EAX,0x1 JNZ 0x0012ad89 CMP qword ptr [RBX + 0x10],0x0 JZ 0x0012ad56 MOV RAX,qword ptr [RBX + 0xc0] MOV RDX,qword ptr [RBX + 0xc8] MOV ECX,EDX SUB ECX,EAX CMP ECX,0x5 JG 0x0012ad5d MOV qword ptr [RBX + 0xc0],RDX MOV RDI,qword ptr [RBX + 0x28] MOV ESI,0x6 SUB ESI,ECX CALL qword ptr [RBX + 0x18] JMP 0x0012ad68 LAB_0012ad56: MOV RAX,qword ptr [RBX + 0xc0] LAB_0012ad5d: ADD RAX,0x6 MOV qword ptr [RBX + 0xc0],RAX LAB_0012ad68: MOV RDI,RBX CALL 0x0013de05 CMP EAX,0x10 JA 0x0012ad89 MOV RDI,RBX CALL 0x0013de05 MOV ECX,EAX MOV EAX,0x1 CMP ECX,0x10 JZ 0x0012adaf LAB_0012ad89: MOVUPS XMM0,xmmword ptr [RBX + 0xd0] MOVUPS xmmword ptr [RBX + 0xc0],XMM0 MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX XOR ECX,ECX CALL 0x00142976 MOV ECX,EAX XOR EAX,EAX CMP ECX,0x10 SETZ AL LAB_0012adaf: ADD RSP,0x28 POP RBX POP RBP RET
/* stbi__is_16_main(stbi__context*) */ bool stbi__is_16_main(stbi__context *param_1) { int iVar1; uint uVar2; long lVar3; stbi__context *local_38 [4]; int local_18; local_38[0] = param_1; iVar1 = stbi__parse_png_file((stbi__png *)local_38,2,0); if ((iVar1 != 0) && (local_18 == 0x10)) { return true; } *(int8 *)(local_38[0] + 0xc0) = *(int8 *)(local_38[0] + 0xd0); *(int8 *)(local_38[0] + 200) = *(int8 *)(local_38[0] + 0xd8); iVar1 = stbi__get16be(param_1); uVar2 = stbi__get16be(param_1); if (((uVar2 | iVar1 << 0x10) != 0x38425053) || (iVar1 = stbi__get16be(param_1), iVar1 != 1)) goto LAB_0012ad89; if (*(long *)(param_1 + 0x10) == 0) { lVar3 = *(long *)(param_1 + 0xc0); LAB_0012ad5d: *(long *)(param_1 + 0xc0) = lVar3 + 6; } else { lVar3 = *(long *)(param_1 + 0xc0); if (5 < (int)*(int8 *)(param_1 + 200) - (int)lVar3) goto LAB_0012ad5d; *(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 200); (**(code **)(param_1 + 0x18))(*(int8 *)(param_1 + 0x28)); } uVar2 = stbi__get16be(param_1); if ((uVar2 < 0x11) && (iVar1 = stbi__get16be(param_1), iVar1 == 0x10)) { return true; } LAB_0012ad89: *(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 0xd0); *(int8 *)(param_1 + 200) = *(int8 *)(param_1 + 0xd8); iVar1 = stbi__pnm_info(param_1,(int *)0x0,(int *)0x0,(int *)0x0); return iVar1 == 0x10; }
5,554
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[]<char const>(char const*) const
monkey531[P]llama/common/json.hpp
const_reference operator[](T* key) const { return operator[](typename object_t::key_type(key)); }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[]<char const>(char const*) const: pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx leaq 0x8(%rsp), %r14 leaq 0x7(%rsp), %rdx movq %r14, %rdi callq 0x1c98a movq %rbx, %rdi movq %r14, %rsi callq 0x6ead4 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x6897f movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x689a8 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 movq %rbx, %rdi callq 0x18bb0
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_: push r14 push rbx sub rsp, 28h mov rbx, rdi lea r14, [rsp+38h+var_30] lea rdx, [rsp+38h+var_31] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, rbx mov rsi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixERKS9_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[](std::string const&) mov rbx, rax lea rax, [rsp+38h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_6897F mov rsi, [rsp+38h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6897F: mov rax, rbx add rsp, 28h pop rbx pop r14 retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_689A8 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_689A8: mov rdi, rbx call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>( long long a1, long long a2) { long long v2; // rbx void *v4[2]; // [rsp+8h] [rbp-30h] BYREF long long v5; // [rsp+18h] [rbp-20h] BYREF std::string::basic_string<std::allocator<char>>(v4, a2); v2 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( a1, v4); if ( v4[0] != &v5 ) operator delete(v4[0], v5 + 1); return v2; }
operator[]<char_const>: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI LEA R14,[RSP + 0x8] LEA RDX,[RSP + 0x7] MOV RDI,R14 CALL 0x0011c98a LAB_00168956: MOV RDI,RBX MOV RSI,R14 CALL 0x0016ead4 LAB_00168961: MOV RBX,RAX LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0016897f MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001186a0 LAB_0016897f: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R14 RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::operator[]<char const>(char const*) const */ basic_json * __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[]<char_const> (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,char *param_1) { basic_json *pbVar1; allocator local_31; long *local_30 [2]; long local_20 [2]; std::__cxx11::string::string<std::allocator<char>>((string *)local_30,param_1,&local_31); /* try { // try from 00168956 to 00168960 has its CatchHandler @ 0016898a */ pbVar1 = (basic_json *)operator[](this,(string *)local_30); if (local_30[0] != local_20) { operator_delete(local_30[0],local_20[0] + 1); } return pbVar1; }
5,555
lre_is_cased
bluesky950520[P]quickjs/libunicode.c
BOOL lre_is_cased(uint32_t c) { uint32_t v, code, len; int idx, idx_min, idx_max; idx_min = 0; idx_max = countof(case_conv_table1) - 1; while (idx_min <= idx_max) { idx = (unsigned)(idx_max + idx_min) / 2; v = case_conv_table1[idx]; code = v >> (32 - 17); len = (v >> (32 - 17 - 7)) & 0x7f; if (c < code) { idx_max = idx - 1; } else if (c >= code + len) { idx_min = idx + 1; } else { return TRUE; } } return lre_is_in_table(c, unicode_prop_Cased1_table, unicode_prop_Cased1_index, sizeof(unicode_prop_Cased1_index) / 3); }
O1
c
lre_is_cased: xorl %edx, %edx movl $0x179, %ecx # imm = 0x179 leaq 0xb32b(%rip), %rax # 0xa3840 leal (%rcx,%rdx), %esi shrl %esi movl (%rax,%rsi,4), %r8d movl %r8d, %r9d shrl $0xf, %r9d cmpl %edi, %r9d jbe 0x98530 decl %esi movl %esi, %ecx jmp 0x98544 shrl $0x8, %r8d andl $0x7f, %r8d addl %r9d, %r8d cmpl %edi, %r8d ja 0x9855d incl %esi movl %esi, %edx cmpl %ecx, %edx jle 0x98515 leaq 0xb8e1(%rip), %rsi # 0xa3e30 leaq 0xb9aa(%rip), %rdx # 0xa3f00 movl $0x6, %ecx jmp 0x98563 movl $0x1, %eax retq
lre_is_cased: xor edx, edx mov ecx, 179h lea rax, case_conv_table1 loc_98515: lea esi, [rcx+rdx] shr esi, 1 mov r8d, [rax+rsi*4] mov r9d, r8d shr r9d, 0Fh cmp r9d, edi jbe short loc_98530 dec esi mov ecx, esi jmp short loc_98544 loc_98530: shr r8d, 8 and r8d, 7Fh add r8d, r9d cmp r8d, edi ja short loc_9855D inc esi mov edx, esi loc_98544: cmp edx, ecx jle short loc_98515 lea rsi, unicode_prop_Cased1_table lea rdx, unicode_prop_Cased1_index mov ecx, 6 jmp short lre_is_in_table loc_9855D: mov eax, 1 retn
long long lre_is_cased(long long a1) { int v1; // edx int v2; // ecx long long v3; // rsi unsigned int v4; // r9d v1 = 0; v2 = 377; while ( 1 ) { v3 = (unsigned int)(v2 + v1) >> 1; v4 = case_conv_table1[v3] >> 15; if ( v4 <= (unsigned int)a1 ) break; v2 = v3 - 1; LABEL_6: if ( v1 > v2 ) return lre_is_in_table(a1, &unicode_prop_Cased1_table, &unicode_prop_Cased1_index, 6LL); } if ( v4 + ((case_conv_table1[v3] >> 8) & 0x7F) <= (unsigned int)a1 ) { v1 = v3 + 1; goto LABEL_6; } return 1LL; }
lre_is_cased: XOR EDX,EDX MOV ECX,0x179 LEA RAX,[0x1a3840] LAB_00198515: LEA ESI,[RCX + RDX*0x1] SHR ESI,0x1 MOV R8D,dword ptr [RAX + RSI*0x4] MOV R9D,R8D SHR R9D,0xf CMP R9D,EDI JBE 0x00198530 DEC ESI MOV ECX,ESI JMP 0x00198544 LAB_00198530: SHR R8D,0x8 AND R8D,0x7f ADD R8D,R9D CMP R8D,EDI JA 0x0019855d INC ESI MOV EDX,ESI LAB_00198544: CMP EDX,ECX JLE 0x00198515 LEA RSI,[0x1a3e30] LEA RDX,[0x1a3f00] MOV ECX,0x6 JMP 0x00198563 LAB_0019855d: MOV EAX,0x1 RET
int8 lre_is_cased(uint param_1) { int8 uVar1; uint uVar2; int iVar3; int iVar4; uint uVar5; iVar4 = 0; iVar3 = 0x179; do { uVar2 = (uint)(iVar3 + iVar4) >> 1; uVar5 = (uint)(&case_conv_table1)[uVar2] >> 0xf; if (param_1 < uVar5) { iVar3 = uVar2 - 1; } else { if (param_1 < ((uint)(&case_conv_table1)[uVar2] >> 8 & 0x7f) + uVar5) { return 1; } iVar4 = uVar2 + 1; } } while (iVar4 <= iVar3); uVar1 = lre_is_in_table(param_1,unicode_prop_Cased1_table,unicode_prop_Cased1_index,6); return uVar1; }
5,556
lre_is_cased
bluesky950520[P]quickjs/libunicode.c
BOOL lre_is_cased(uint32_t c) { uint32_t v, code, len; int idx, idx_min, idx_max; idx_min = 0; idx_max = countof(case_conv_table1) - 1; while (idx_min <= idx_max) { idx = (unsigned)(idx_max + idx_min) / 2; v = case_conv_table1[idx]; code = v >> (32 - 17); len = (v >> (32 - 17 - 7)) & 0x7f; if (c < code) { idx_max = idx - 1; } else if (c >= code + len) { idx_min = idx + 1; } else { return TRUE; } } return lre_is_in_table(c, unicode_prop_Cased1_table, unicode_prop_Cased1_index, sizeof(unicode_prop_Cased1_index) / 3); }
O2
c
lre_is_cased: movl $0x179, %ecx # imm = 0x179 xorl %edx, %edx leaq 0xb477(%rip), %rax # 0x8a750 cmpl %ecx, %edx jg 0x7f30e leal (%rcx,%rdx), %esi shrl %esi movl (%rax,%rsi,4), %r8d movl %r8d, %r9d shrl $0xf, %r9d cmpl %edi, %r9d jbe 0x7f2f8 decl %esi movl %esi, %ecx jmp 0x7f2d9 shrl $0x8, %r8d andl $0x7f, %r8d addl %r9d, %r8d cmpl %edi, %r8d ja 0x7f321 incl %esi movl %esi, %edx jmp 0x7f2d9 leaq 0xba2b(%rip), %rsi # 0x8ad40 leaq 0xbaf4(%rip), %rdx # 0x8ae10 pushq $0x6 popq %rcx jmp 0x7f325 pushq $0x1 popq %rax retq
lre_is_cased: mov ecx, 179h xor edx, edx lea rax, case_conv_table1 loc_7F2D9: cmp edx, ecx jg short loc_7F30E lea esi, [rcx+rdx] shr esi, 1 mov r8d, [rax+rsi*4] mov r9d, r8d shr r9d, 0Fh cmp r9d, edi jbe short loc_7F2F8 dec esi mov ecx, esi jmp short loc_7F2D9 loc_7F2F8: shr r8d, 8 and r8d, 7Fh add r8d, r9d cmp r8d, edi ja short loc_7F321 inc esi mov edx, esi jmp short loc_7F2D9 loc_7F30E: lea rsi, unicode_prop_Cased1_table lea rdx, unicode_prop_Cased1_index push 6 pop rcx jmp short lre_is_in_table loc_7F321: push 1 pop rax retn
long long lre_is_cased(long long a1) { int v1; // ecx int i; // edx long long v3; // rsi unsigned int v4; // r9d v1 = 377; for ( i = 0; ; i = v3 + 1 ) { while ( 1 ) { if ( i > v1 ) return lre_is_in_table(a1, &unicode_prop_Cased1_table, &unicode_prop_Cased1_index, 6LL); v3 = (unsigned int)(v1 + i) >> 1; v4 = case_conv_table1[v3] >> 15; if ( v4 <= (unsigned int)a1 ) break; v1 = v3 - 1; } if ( v4 + ((case_conv_table1[v3] >> 8) & 0x7F) > (unsigned int)a1 ) break; } return 1LL; }
lre_is_cased: MOV ECX,0x179 XOR EDX,EDX LEA RAX,[0x18a750] LAB_0017f2d9: CMP EDX,ECX JG 0x0017f30e LEA ESI,[RCX + RDX*0x1] SHR ESI,0x1 MOV R8D,dword ptr [RAX + RSI*0x4] MOV R9D,R8D SHR R9D,0xf CMP R9D,EDI JBE 0x0017f2f8 DEC ESI MOV ECX,ESI JMP 0x0017f2d9 LAB_0017f2f8: SHR R8D,0x8 AND R8D,0x7f ADD R8D,R9D CMP R8D,EDI JA 0x0017f321 INC ESI MOV EDX,ESI JMP 0x0017f2d9 LAB_0017f30e: LEA RSI,[0x18ad40] LEA RDX,[0x18ae10] PUSH 0x6 POP RCX JMP 0x0017f325 LAB_0017f321: PUSH 0x1 POP RAX RET
int8 lre_is_cased(uint param_1) { int8 uVar1; uint uVar2; int iVar3; int iVar4; uint uVar5; iVar3 = 0x179; iVar4 = 0; while( true ) { while( true ) { if (iVar3 < iVar4) { uVar1 = lre_is_in_table(param_1,unicode_prop_Cased1_table,unicode_prop_Cased1_index,6); return uVar1; } uVar2 = (uint)(iVar3 + iVar4) >> 1; uVar5 = (uint)(&case_conv_table1)[uVar2] >> 0xf; if (uVar5 <= param_1) break; iVar3 = uVar2 - 1; } if (param_1 < ((uint)(&case_conv_table1)[uVar2] >> 8 & 0x7f) + uVar5) break; iVar4 = uVar2 + 1; } return 1; }
5,557
ma_log_suffix
eloqsql/storage/maria/ma_key_recover.c
my_bool _ma_log_suffix(MARIA_PAGE *ma_page, uint org_length, uint new_length) { LSN lsn; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 4]; uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + 10 + 7 + 2], *log_pos; uchar *buff= ma_page->buff; int diff; uint translog_parts, extra_length; MARIA_HA *info= ma_page->info; pgcache_page_no_t page= ma_page->pos / info->s->block_size; DBUG_ENTER("_ma_log_suffix"); DBUG_PRINT("enter", ("page: %lu org_length: %u new_length: %u", (ulong) page, org_length, new_length)); DBUG_ASSERT(ma_page->size == new_length); DBUG_ASSERT(ma_page->org_size == org_length); log_pos= log_data + FILEID_STORE_SIZE; page_store(log_pos, page); log_pos+= PAGE_STORE_SIZE; /* Store keypage_flag */ *log_pos++= KEY_OP_SET_PAGEFLAG; *log_pos++= _ma_get_keypage_flag(info->s, buff); if ((diff= (int) (new_length - org_length)) < 0) { log_pos[0]= KEY_OP_DEL_SUFFIX; int2store(log_pos+1, -diff); log_pos+= 3; translog_parts= 1; extra_length= 0; } else { log_pos[0]= KEY_OP_ADD_SUFFIX; int2store(log_pos+1, diff); log_pos+= 3; log_array[TRANSLOG_INTERNAL_PARTS + 1].str= buff + org_length; log_array[TRANSLOG_INTERNAL_PARTS + 1].length= (uint) diff; translog_parts= 2; extra_length= (uint) diff; } log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (uint) (log_pos - log_data); _ma_log_key_changes(ma_page, log_array + TRANSLOG_INTERNAL_PARTS + translog_parts, log_pos, &extra_length, &translog_parts); /* Remember new page length for future log entires for same page */ ma_page->org_size= ma_page->size; DBUG_RETURN(translog_write_record(&lsn, LOGREC_REDO_INDEX, info->trn, info, (translog_size_t) log_array[TRANSLOG_INTERNAL_PARTS + 0].length + extra_length, TRANSLOG_INTERNAL_PARTS + translog_parts, log_array, log_data, NULL)); }
O0
c
ma_log_suffix: pushq %rbp movq %rsp, %rbp subq $0x120, %rsp # imm = 0x120 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x38(%rbp) movl %esi, -0x3c(%rbp) movl %edx, -0x40(%rbp) movq -0x38(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0xc0(%rbp) movq -0x38(%rbp), %rax movq (%rax), %rax movq %rax, -0xd8(%rbp) movq -0x38(%rbp), %rax movq 0x18(%rax), %rax movq -0xd8(%rbp), %rcx movq (%rcx), %rcx movl 0x7bc(%rcx), %ecx xorl %edx, %edx divq %rcx movq %rax, -0xe0(%rbp) jmp 0x42e25 jmp 0x42e27 jmp 0x42e29 jmp 0x42e2b jmp 0x42e2d leaq -0x30(%rbp), %rax addq $0x2, %rax movq %rax, -0xb8(%rbp) movq -0xb8(%rbp), %rax movq %rax, -0xe8(%rbp) movq -0xe0(%rbp), %rax movl %eax, %ecx movq -0xe8(%rbp), %rax movl %ecx, (%rax) movq -0xe0(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0xe8(%rbp), %rax movb %cl, 0x4(%rax) movq -0xb8(%rbp), %rax addq $0x5, %rax movq %rax, -0xb8(%rbp) movq -0xb8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xb8(%rbp) movb $0xa, (%rax) movq -0xc0(%rbp), %rax movq -0xd8(%rbp), %rcx movq (%rcx), %rcx movl 0x744(%rcx), %ecx subl $0x2, %ecx subl $0x1, %ecx movl %ecx, %ecx movb (%rax,%rcx), %cl movq -0xb8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0xb8(%rbp) movb %cl, (%rax) movl -0x40(%rbp), %eax subl -0x3c(%rbp), %eax movl %eax, -0xc4(%rbp) cmpl $0x0, %eax jge 0x42f40 movq -0xb8(%rbp), %rax movb $0x7, (%rax) movq -0xb8(%rbp), %rax addq $0x1, %rax movq %rax, -0xf0(%rbp) xorl %eax, %eax subl -0xc4(%rbp), %eax movw %ax, %cx movq -0xf0(%rbp), %rax movw %cx, (%rax) movq -0xb8(%rbp), %rax addq $0x3, %rax movq %rax, -0xb8(%rbp) movl $0x1, -0xc8(%rbp) movl $0x0, -0xcc(%rbp) jmp 0x42fb2 movq -0xb8(%rbp), %rax movb $0x6, (%rax) movq -0xb8(%rbp), %rax addq $0x1, %rax movq %rax, -0xf8(%rbp) movl -0xc4(%rbp), %eax movw %ax, %cx movq -0xf8(%rbp), %rax movw %cx, (%rax) movq -0xb8(%rbp), %rax addq $0x3, %rax movq %rax, -0xb8(%rbp) movq -0xc0(%rbp), %rax movl -0x3c(%rbp), %ecx addq %rcx, %rax movq %rax, -0x80(%rbp) movl -0xc4(%rbp), %eax movq %rax, -0x78(%rbp) movl $0x2, -0xc8(%rbp) movl -0xc4(%rbp), %eax movl %eax, -0xcc(%rbp) leaq -0x30(%rbp), %rax movq %rax, -0x90(%rbp) movq -0xb8(%rbp), %rax leaq -0x30(%rbp), %rcx subq %rcx, %rax movl %eax, %eax movq %rax, -0x88(%rbp) movq -0x38(%rbp), %rax movl 0x20(%rax), %ecx movq -0x38(%rbp), %rax movl %ecx, 0x24(%rax) movq -0xd8(%rbp), %rax movq 0x8(%rax), %rdx movq -0xd8(%rbp), %rcx movq -0x88(%rbp), %rax movl %eax, %r8d addl -0xcc(%rbp), %r8d movl -0xc8(%rbp), %r9d addl $0x2, %r9d leaq -0xb0(%rbp), %r10 leaq -0x30(%rbp), %rax leaq -0x48(%rbp), %rdi movl $0xc, %esi xorl %r11d, %r11d movq %r10, (%rsp) movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) callq 0x302c0 movb %al, -0xf9(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x43065 movb -0xf9(%rbp), %al addq $0x120, %rsp # imm = 0x120 popq %rbp retq callq 0x2a250 nopw (%rax,%rax)
_ma_log_suffix: push rbp mov rbp, rsp sub rsp, 120h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_38], rdi mov [rbp+var_3C], esi mov [rbp+var_40], edx mov rax, [rbp+var_38] mov rax, [rax+10h] mov [rbp+var_C0], rax mov rax, [rbp+var_38] mov rax, [rax] mov [rbp+var_D8], rax mov rax, [rbp+var_38] mov rax, [rax+18h] mov rcx, [rbp+var_D8] mov rcx, [rcx] mov ecx, [rcx+7BCh] xor edx, edx div rcx mov [rbp+var_E0], rax jmp short $+2 loc_42E25: jmp short $+2 loc_42E27: jmp short $+2 loc_42E29: jmp short $+2 loc_42E2B: jmp short $+2 loc_42E2D: lea rax, [rbp+var_30] add rax, 2 mov [rbp+var_B8], rax mov rax, [rbp+var_B8] mov [rbp+var_E8], rax mov rax, [rbp+var_E0] mov ecx, eax mov rax, [rbp+var_E8] mov [rax], ecx mov rax, [rbp+var_E0] shr rax, 20h mov cl, al mov rax, [rbp+var_E8] mov [rax+4], cl mov rax, [rbp+var_B8] add rax, 5 mov [rbp+var_B8], rax mov rax, [rbp+var_B8] mov rcx, rax add rcx, 1 mov [rbp+var_B8], rcx mov byte ptr [rax], 0Ah mov rax, [rbp+var_C0] mov rcx, [rbp+var_D8] mov rcx, [rcx] mov ecx, [rcx+744h] sub ecx, 2 sub ecx, 1 mov ecx, ecx mov cl, [rax+rcx] mov rax, [rbp+var_B8] mov rdx, rax add rdx, 1 mov [rbp+var_B8], rdx mov [rax], cl mov eax, [rbp+var_40] sub eax, [rbp+var_3C] mov [rbp+var_C4], eax cmp eax, 0 jge short loc_42F40 mov rax, [rbp+var_B8] mov byte ptr [rax], 7 mov rax, [rbp+var_B8] add rax, 1 mov [rbp+var_F0], rax xor eax, eax sub eax, [rbp+var_C4] mov cx, ax mov rax, [rbp+var_F0] mov [rax], cx mov rax, [rbp+var_B8] add rax, 3 mov [rbp+var_B8], rax mov [rbp+var_C8], 1 mov [rbp+var_CC], 0 jmp short loc_42FB2 loc_42F40: mov rax, [rbp+var_B8] mov byte ptr [rax], 6 mov rax, [rbp+var_B8] add rax, 1 mov [rbp+var_F8], rax mov eax, [rbp+var_C4] mov cx, ax mov rax, [rbp+var_F8] mov [rax], cx mov rax, [rbp+var_B8] add rax, 3 mov [rbp+var_B8], rax mov rax, [rbp+var_C0] mov ecx, [rbp+var_3C] add rax, rcx mov [rbp+var_80], rax mov eax, [rbp+var_C4] mov [rbp+var_78], rax mov [rbp+var_C8], 2 mov eax, [rbp+var_C4] mov [rbp+var_CC], eax loc_42FB2: lea rax, [rbp+var_30] mov [rbp+var_90], rax mov rax, [rbp+var_B8] lea rcx, [rbp+var_30] sub rax, rcx mov eax, eax mov [rbp+var_88], rax mov rax, [rbp+var_38] mov ecx, [rax+20h] mov rax, [rbp+var_38] mov [rax+24h], ecx mov rax, [rbp+var_D8] mov rdx, [rax+8] mov rcx, [rbp+var_D8] mov rax, [rbp+var_88] mov r8d, eax add r8d, [rbp+var_CC] mov r9d, [rbp+var_C8] add r9d, 2 lea r10, [rbp+var_B0] lea rax, [rbp+var_30] lea rdi, [rbp+var_48] mov esi, 0Ch xor r11d, r11d mov [rsp+120h+var_120], r10 mov [rsp+120h+var_118], rax mov [rsp+120h+var_110], 0 call translog_write_record mov [rbp+var_F9], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_43065 mov al, [rbp+var_F9] add rsp, 120h pop rbp retn loc_43065: call ___stack_chk_fail
char ma_log_suffix(long long **a1, unsigned int a2, int a3) { unsigned long long v4; // [rsp+40h] [rbp-E0h] long long *v5; // [rsp+48h] [rbp-D8h] int v6; // [rsp+54h] [rbp-CCh] int v7; // [rsp+58h] [rbp-C8h] long long *v8; // [rsp+60h] [rbp-C0h] _QWORD v9[5]; // [rsp+70h] [rbp-B0h] BYREF long long v10; // [rsp+98h] [rbp-88h] long long v11; // [rsp+A0h] [rbp-80h] long long v12; // [rsp+A8h] [rbp-78h] char v13[8]; // [rsp+D8h] [rbp-48h] BYREF int v14; // [rsp+E0h] [rbp-40h] unsigned int v15; // [rsp+E4h] [rbp-3Ch] long long **v16; // [rsp+E8h] [rbp-38h] __int16 v17; // [rsp+F0h] [rbp-30h] BYREF int v18; // [rsp+F2h] [rbp-2Eh] char v19; // [rsp+F6h] [rbp-2Ah] char v20; // [rsp+F7h] [rbp-29h] char v21; // [rsp+F8h] [rbp-28h] char v22; // [rsp+F9h] [rbp-27h] __int16 v23; // [rsp+FAh] [rbp-26h] _BYTE v24[36]; // [rsp+FCh] [rbp-24h] BYREF long long savedregs; // [rsp+120h] [rbp+0h] BYREF *(_QWORD *)&v24[28] = __readfsqword(0x28u); v16 = a1; v15 = a2; v14 = a3; v8 = a1[2]; v5 = *a1; v4 = (unsigned long long)a1[3] / *(unsigned int *)(**a1 + 1980); v18 = v4; v19 = BYTE4(v4); v20 = 10; v21 = *((_BYTE *)v8 + (unsigned int)(*(_DWORD *)(*v5 + 1860) - 3)); if ( (int)(a3 - a2) >= 0 ) { v22 = 6; v23 = a3 - a2; v11 = (long long)v8 + v15; v12 = a3 - a2; v7 = 2; v6 = a3 - a2; } else { v22 = 7; v23 = a2 - a3; v7 = 1; v6 = 0; } v9[4] = &v17; v10 = (unsigned int)v24 - ((unsigned int)&savedregs - 48); *((_DWORD *)v16 + 9) = *((_DWORD *)v16 + 8); return translog_write_record((long long)v13, 0xCu, v5[1], v5, v6 + v10, v7 + 2, v9, &v17, 0LL); }
_ma_log_suffix: PUSH RBP MOV RBP,RSP SUB RSP,0x120 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x38],RDI MOV dword ptr [RBP + -0x3c],ESI MOV dword ptr [RBP + -0x40],EDX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0xc0],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0xd8],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0xd8] MOV RCX,qword ptr [RCX] MOV ECX,dword ptr [RCX + 0x7bc] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0xe0],RAX JMP 0x00142e25 LAB_00142e25: JMP 0x00142e27 LAB_00142e27: JMP 0x00142e29 LAB_00142e29: JMP 0x00142e2b LAB_00142e2b: JMP 0x00142e2d LAB_00142e2d: LEA RAX,[RBP + -0x30] ADD RAX,0x2 MOV qword ptr [RBP + -0xb8],RAX MOV RAX,qword ptr [RBP + -0xb8] MOV qword ptr [RBP + -0xe8],RAX MOV RAX,qword ptr [RBP + -0xe0] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0xe8] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0xe0] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0xe8] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0xb8] ADD RAX,0x5 MOV qword ptr [RBP + -0xb8],RAX MOV RAX,qword ptr [RBP + -0xb8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xb8],RCX MOV byte ptr [RAX],0xa MOV RAX,qword ptr [RBP + -0xc0] MOV RCX,qword ptr [RBP + -0xd8] MOV RCX,qword ptr [RCX] MOV ECX,dword ptr [RCX + 0x744] SUB ECX,0x2 SUB ECX,0x1 MOV ECX,ECX MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0xb8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0xb8],RDX MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x40] SUB EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0xc4],EAX CMP EAX,0x0 JGE 0x00142f40 MOV RAX,qword ptr [RBP + -0xb8] MOV byte ptr [RAX],0x7 MOV RAX,qword ptr [RBP + -0xb8] ADD RAX,0x1 MOV qword ptr [RBP + -0xf0],RAX XOR EAX,EAX SUB EAX,dword ptr [RBP + -0xc4] MOV CX,AX MOV RAX,qword ptr [RBP + -0xf0] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0xb8] ADD RAX,0x3 MOV qword ptr [RBP + -0xb8],RAX MOV dword ptr [RBP + -0xc8],0x1 MOV dword ptr [RBP + -0xcc],0x0 JMP 0x00142fb2 LAB_00142f40: MOV RAX,qword ptr [RBP + -0xb8] MOV byte ptr [RAX],0x6 MOV RAX,qword ptr [RBP + -0xb8] ADD RAX,0x1 MOV qword ptr [RBP + -0xf8],RAX MOV EAX,dword ptr [RBP + -0xc4] MOV CX,AX MOV RAX,qword ptr [RBP + -0xf8] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0xb8] ADD RAX,0x3 MOV qword ptr [RBP + -0xb8],RAX MOV RAX,qword ptr [RBP + -0xc0] MOV ECX,dword ptr [RBP + -0x3c] ADD RAX,RCX MOV qword ptr [RBP + -0x80],RAX MOV EAX,dword ptr [RBP + -0xc4] MOV qword ptr [RBP + -0x78],RAX MOV dword ptr [RBP + -0xc8],0x2 MOV EAX,dword ptr [RBP + -0xc4] MOV dword ptr [RBP + -0xcc],EAX LAB_00142fb2: LEA RAX,[RBP + -0x30] MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0xb8] LEA RCX,[RBP + -0x30] SUB RAX,RCX MOV EAX,EAX MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0x20] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x24],ECX MOV RAX,qword ptr [RBP + -0xd8] MOV RDX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0xd8] MOV RAX,qword ptr [RBP + -0x88] MOV R8D,EAX ADD R8D,dword ptr [RBP + -0xcc] MOV R9D,dword ptr [RBP + -0xc8] ADD R9D,0x2 LEA R10,[RBP + -0xb0] LEA RAX,[RBP + -0x30] LEA RDI,[RBP + -0x48] MOV ESI,0xc XOR R11D,R11D MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 CALL 0x001302c0 MOV byte ptr [RBP + -0xf9],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00143065 MOV AL,byte ptr [RBP + -0xf9] ADD RSP,0x120 POP RBP RET LAB_00143065: CALL 0x0012a250
int8 _ma_log_suffix(long *param_1,uint param_2,int param_3) { long *plVar1; int1 uVar2; uint uVar3; ulong uVar4; long in_FS_OFFSET; uint local_d4; int local_d0; int1 *local_c0; int1 local_b8 [32]; int1 *local_98; ulong local_90; long local_88; ulong local_80; int1 local_50 [8]; int local_48; uint local_44; long *local_40; int1 local_38 [2]; int4 local_36; int1 local_32; int1 local_31; int1 local_30; int1 local_2f; short local_2e; int1 auStack_2c [28]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); plVar1 = (long *)*param_1; uVar4 = (ulong)param_1[3] / (ulong)*(uint *)(*plVar1 + 0x7bc); local_36 = (int4)uVar4; local_32 = (int1)(uVar4 >> 0x20); local_31 = 10; local_30 = *(int1 *)(param_1[2] + (ulong)(*(int *)(*plVar1 + 0x744) - 3)); local_d4 = param_3 - param_2; local_2e = (short)local_d4; if ((int)local_d4 < 0) { local_2f = 7; local_2e = -local_2e; local_d0 = 1; local_d4 = 0; } else { local_2f = 6; local_88 = param_1[2] + (ulong)param_2; local_80 = (ulong)local_d4; local_d0 = 2; } local_c0 = auStack_2c; local_98 = local_38; uVar3 = (int)local_c0 - (int)local_38; local_90 = (ulong)uVar3; *(int *)((long)param_1 + 0x24) = (int)param_1[4]; local_48 = param_3; local_44 = param_2; local_40 = param_1; uVar2 = translog_write_record (local_50,0xc,plVar1[1],plVar1,uVar3 + local_d4,local_d0 + 2,local_b8,local_38,0 ); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),uVar2); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
5,558
ma_log_suffix
eloqsql/storage/maria/ma_key_recover.c
my_bool _ma_log_suffix(MARIA_PAGE *ma_page, uint org_length, uint new_length) { LSN lsn; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 4]; uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + 10 + 7 + 2], *log_pos; uchar *buff= ma_page->buff; int diff; uint translog_parts, extra_length; MARIA_HA *info= ma_page->info; pgcache_page_no_t page= ma_page->pos / info->s->block_size; DBUG_ENTER("_ma_log_suffix"); DBUG_PRINT("enter", ("page: %lu org_length: %u new_length: %u", (ulong) page, org_length, new_length)); DBUG_ASSERT(ma_page->size == new_length); DBUG_ASSERT(ma_page->org_size == org_length); log_pos= log_data + FILEID_STORE_SIZE; page_store(log_pos, page); log_pos+= PAGE_STORE_SIZE; /* Store keypage_flag */ *log_pos++= KEY_OP_SET_PAGEFLAG; *log_pos++= _ma_get_keypage_flag(info->s, buff); if ((diff= (int) (new_length - org_length)) < 0) { log_pos[0]= KEY_OP_DEL_SUFFIX; int2store(log_pos+1, -diff); log_pos+= 3; translog_parts= 1; extra_length= 0; } else { log_pos[0]= KEY_OP_ADD_SUFFIX; int2store(log_pos+1, diff); log_pos+= 3; log_array[TRANSLOG_INTERNAL_PARTS + 1].str= buff + org_length; log_array[TRANSLOG_INTERNAL_PARTS + 1].length= (uint) diff; translog_parts= 2; extra_length= (uint) diff; } log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (uint) (log_pos - log_data); _ma_log_key_changes(ma_page, log_array + TRANSLOG_INTERNAL_PARTS + translog_parts, log_pos, &extra_length, &translog_parts); /* Remember new page length for future log entires for same page */ ma_page->org_size= ma_page->size; DBUG_RETURN(translog_write_record(&lsn, LOGREC_REDO_INDEX, info->trn, info, (translog_size_t) log_array[TRANSLOG_INTERNAL_PARTS + 0].length + extra_length, TRANSLOG_INTERNAL_PARTS + translog_parts, log_array, log_data, NULL)); }
O3
c
ma_log_suffix: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x98, %rsp movl %edx, %r10d movq %fs:0x28, %rax movq %rax, -0x10(%rbp) movq (%rdi), %rcx movq 0x10(%rdi), %r9 movq 0x18(%rdi), %rax movq (%rcx), %r11 movl 0x7bc(%r11), %ebx xorl %r8d, %r8d xorl %edx, %edx divq %rbx movl %eax, -0x2e(%rbp) shrq $0x20, %rax movb %al, -0x2a(%rbp) movb $0xa, -0x29(%rbp) movl 0x744(%r11), %eax addl $-0x3, %eax movb (%r9,%rax), %al movb %al, -0x28(%rbp) subl %esi, %r10d js 0x40bd3 leaq -0x24(%rbp), %rax movl %esi, %edx addq %rdx, %r9 movq %r9, -0x70(%rbp) movl %r10d, %edx movq %rdx, -0x68(%rbp) movl $0x4, %r9d movb $0x6, %dl movl %r10d, %r8d jmp 0x40be2 negl %r10d movl $0x3, %r9d movb $0x7, %dl leaq -0x24(%rbp), %rax leaq -0x30(%rbp), %r11 movb %dl, 0x9(%r11) movw %r10w, 0xa(%r11) leaq -0xa0(%rbp), %r10 movq %r11, 0x20(%r10) subq %r11, %rax movl %eax, %edx movq %rdx, 0x28(%r10) movl 0x20(%rdi), %edx movl %edx, 0x24(%rdi) movq 0x8(%rcx), %rdx addl %eax, %r8d subq $0x8, %rsp leaq -0x38(%rbp), %rdi movl $0xc, %esi pushq $0x0 pushq %r11 pushq %r10 callq 0x2aa10 addq $0x20, %rsp movq %fs:0x28, %rcx cmpq -0x10(%rbp), %rcx jne 0x40c45 addq $0x98, %rsp popq %rbx popq %rbp retq callq 0x2a240
_ma_log_suffix: push rbp mov rbp, rsp push rbx sub rsp, 98h mov r10d, edx mov rax, fs:28h mov [rbp+var_10], rax mov rcx, [rdi] mov r9, [rdi+10h] mov rax, [rdi+18h] mov r11, [rcx] mov ebx, [r11+7BCh] xor r8d, r8d xor edx, edx div rbx mov [rbp+var_2E], eax shr rax, 20h mov [rbp+var_2A], al mov [rbp+var_29], 0Ah mov eax, [r11+744h] add eax, 0FFFFFFFDh mov al, [r9+rax] mov [rbp+var_28], al sub r10d, esi js short loc_40BD3 lea rax, [rbp+var_24] mov edx, esi add r9, rdx mov [rbp+var_70], r9 mov edx, r10d mov [rbp+var_68], rdx mov r9d, 4 mov dl, 6 mov r8d, r10d jmp short loc_40BE2 loc_40BD3: neg r10d mov r9d, 3 mov dl, 7 lea rax, [rbp+var_24] loc_40BE2: lea r11, [rbp+var_30] mov [r11+9], dl mov [r11+0Ah], r10w lea r10, [rbp+var_A0] mov [r10+20h], r11 sub rax, r11 mov edx, eax mov [r10+28h], rdx mov edx, [rdi+20h] mov [rdi+24h], edx mov rdx, [rcx+8] add r8d, eax sub rsp, 8 lea rdi, [rbp+var_38] mov esi, 0Ch push 0 push r11 push r10 call translog_write_record add rsp, 20h mov rcx, fs:28h cmp rcx, [rbp+var_10] jnz short loc_40C45 add rsp, 98h pop rbx pop rbp retn loc_40C45: call ___stack_chk_fail
long long ma_log_suffix(long long **a1, unsigned int a2, int a3) { long long *v3; // rcx long long *v4; // r9 long long v5; // r11 unsigned int v6; // r8d unsigned long long v7; // rax unsigned int v8; // r10d int v9; // r9d char v10; // dl __int128 v12; // [rsp+0h] [rbp-A0h] BYREF __int16 *v13; // [rsp+20h] [rbp-80h] long long v14; // [rsp+28h] [rbp-78h] long long v15; // [rsp+30h] [rbp-70h] long long v16; // [rsp+38h] [rbp-68h] _BYTE v17[8]; // [rsp+68h] [rbp-38h] BYREF __int16 v18; // [rsp+70h] [rbp-30h] BYREF int v19; // [rsp+72h] [rbp-2Eh] char v20; // [rsp+76h] [rbp-2Ah] char v21; // [rsp+77h] [rbp-29h] char v22; // [rsp+78h] [rbp-28h] char v23; // [rsp+79h] [rbp-27h] __int16 v24; // [rsp+7Ah] [rbp-26h] _BYTE v25[20]; // [rsp+7Ch] [rbp-24h] BYREF unsigned long long v26; // [rsp+90h] [rbp-10h] v26 = __readfsqword(0x28u); v3 = *a1; v4 = a1[2]; v5 = **a1; v6 = 0; v7 = (unsigned long long)a1[3] / *(unsigned int *)(v5 + 1980); v19 = v7; v20 = BYTE4(v7); v21 = 10; v22 = *((_BYTE *)v4 + (unsigned int)(*(_DWORD *)(v5 + 1860) - 3)); v8 = a3 - a2; if ( (int)(a3 - a2) < 0 ) { LOWORD(v8) = a2 - a3; v9 = 3; v10 = 7; } else { v15 = (long long)v4 + a2; v16 = v8; v9 = 4; v10 = 6; v6 = v8; } v23 = v10; v24 = v8; v13 = &v18; v14 = (unsigned int)(v25 - (_BYTE *)&v18); *((_DWORD *)a1 + 9) = *((_DWORD *)a1 + 8); return translog_write_record( (unsigned long long)v17, &byte_9[3], v3[1], v3, (unsigned int)(v25 - (_BYTE *)&v18) + v6, v9, &v12, &v18, 0LL); }
_ma_log_suffix: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x98 MOV R10D,EDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x10],RAX MOV RCX,qword ptr [RDI] MOV R9,qword ptr [RDI + 0x10] MOV RAX,qword ptr [RDI + 0x18] MOV R11,qword ptr [RCX] MOV EBX,dword ptr [R11 + 0x7bc] XOR R8D,R8D XOR EDX,EDX DIV RBX MOV dword ptr [RBP + -0x2e],EAX SHR RAX,0x20 MOV byte ptr [RBP + -0x2a],AL MOV byte ptr [RBP + -0x29],0xa MOV EAX,dword ptr [R11 + 0x744] ADD EAX,-0x3 MOV AL,byte ptr [R9 + RAX*0x1] MOV byte ptr [RBP + -0x28],AL SUB R10D,ESI JS 0x00140bd3 LEA RAX,[RBP + -0x24] MOV EDX,ESI ADD R9,RDX MOV qword ptr [RBP + -0x70],R9 MOV EDX,R10D MOV qword ptr [RBP + -0x68],RDX MOV R9D,0x4 MOV DL,0x6 MOV R8D,R10D JMP 0x00140be2 LAB_00140bd3: NEG R10D MOV R9D,0x3 MOV DL,0x7 LEA RAX,[RBP + -0x24] LAB_00140be2: LEA R11,[RBP + -0x30] MOV byte ptr [R11 + 0x9],DL MOV word ptr [R11 + 0xa],R10W LEA R10,[RBP + -0xa0] MOV qword ptr [R10 + 0x20],R11 SUB RAX,R11 MOV EDX,EAX MOV qword ptr [R10 + 0x28],RDX MOV EDX,dword ptr [RDI + 0x20] MOV dword ptr [RDI + 0x24],EDX MOV RDX,qword ptr [RCX + 0x8] ADD R8D,EAX SUB RSP,0x8 LEA RDI,[RBP + -0x38] MOV ESI,0xc PUSH 0x0 PUSH R11 PUSH R10 CALL 0x0012aa10 ADD RSP,0x20 MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x10] JNZ 0x00140c45 ADD RSP,0x98 POP RBX POP RBP RET LAB_00140c45: CALL 0x0012a240
void _ma_log_suffix(long *param_1,uint param_2,int param_3) { long *plVar1; int1 auVar2 [16]; int iVar3; uint uVar4; int8 uVar5; uint uVar6; long in_FS_OFFSET; int1 local_a8 [32]; int1 *local_88; ulong local_80; long local_78; ulong local_70; int1 local_40 [8]; int1 local_38 [2]; int4 local_36; int1 local_32; int1 local_31; int1 local_30; int1 local_2f; int2 local_2e; int1 local_2c [20]; long local_18; local_18 = *(long *)(in_FS_OFFSET + 0x28); plVar1 = (long *)*param_1; uVar4 = 0; auVar2._8_8_ = 0; auVar2._0_8_ = param_1[3]; auVar2 = auVar2 / ZEXT416(*(uint *)(*plVar1 + 0x7bc)); local_36 = auVar2._0_4_; local_32 = auVar2[4]; local_31 = 10; local_30 = *(int1 *)(param_1[2] + (ulong)(*(int *)(*plVar1 + 0x744) - 3)); uVar6 = param_3 - param_2; if ((int)uVar6 < 0) { uVar6 = -uVar6; uVar5 = 3; local_2f = 7; iVar3 = (int)local_2c; } else { iVar3 = (int)local_2c; local_78 = param_1[2] + (ulong)param_2; local_70 = (ulong)uVar6; uVar5 = 4; local_2f = 6; uVar4 = uVar6; } local_88 = local_38; local_2e = (int2)uVar6; uVar6 = iVar3 - (int)local_88; local_80 = (ulong)uVar6; *(int *)((long)param_1 + 0x24) = (int)param_1[4]; translog_write_record(local_40,0xc,plVar1[1],plVar1,uVar4 + uVar6,uVar5,local_a8,local_88,0); if (*(long *)(in_FS_OFFSET + 0x28) == local_18) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
5,559
ma_kpos
eloqsql/storage/maria/ma_search.c
my_off_t _ma_kpos(uint nod_flag, const uchar *after_key) { after_key-=nod_flag; switch (nod_flag) { #if SIZEOF_OFF_T > 4 case 7: return mi_uint7korr(after_key)*maria_block_size; case 6: return mi_uint6korr(after_key)*maria_block_size; case 5: return mi_uint5korr(after_key)*maria_block_size; #else case 7: after_key++; case 6: after_key++; case 5: after_key++; #endif case 4: return ((my_off_t) mi_uint4korr(after_key))*maria_block_size; case 3: return ((my_off_t) mi_uint3korr(after_key))*maria_block_size; case 2: return (my_off_t) (mi_uint2korr(after_key)*maria_block_size); case 1: return (uint) (*after_key)*maria_block_size; case 0: /* At leaf page */ default: /* Impossible */ return(HA_OFFSET_ERROR); } }
O3
c
ma_kpos: leal -0x1(%rdi), %eax cmpl $0x6, %eax ja 0x56897 pushq %rbp movq %rsp, %rbp movl %edi, %ecx negq %rcx leaq 0x89879(%rip), %rdx # 0xe00d0 movslq (%rdx,%rax,4), %rax addq %rdx, %rax jmpq *%rax movzbl (%rsi,%rcx), %eax jmp 0x568e0 movl (%rsi,%rcx), %eax movzbl 0x4(%rsi,%rcx), %ecx shlq $0x38, %rcx shlq $0x18, %rax jmp 0x568da movzwl 0x1(%rsi,%rcx), %eax rolw $0x8, %ax movzwl %ax, %edx movzbl (%rsi,%rcx), %eax shll $0x10, %eax orq %rdx, %rax jmp 0x568e0 movl (%rsi,%rcx), %eax bswapl %eax jmp 0x568e0 movq $-0x1, %rax retq movzwl (%rsi,%rcx), %eax rolw $0x8, %ax movzwl %ax, %eax jmp 0x568e0 movl (%rsi,%rcx), %eax movzwl 0x4(%rsi,%rcx), %ecx shlq $0x30, %rcx shlq $0x10, %rax jmp 0x568da movl (%rsi,%rcx), %eax movzwl 0x4(%rsi,%rcx), %edx movzbl 0x6(%rsi,%rcx), %ecx shlq $0x38, %rcx shlq $0x28, %rdx shlq $0x8, %rax orq %rdx, %rax orq %rcx, %rax bswapq %rax leaq 0x32c789(%rip), %rcx # 0x383070 imulq (%rcx), %rax popq %rbp retq
_ma_kpos: lea eax, [rdi-1]; switch 7 cases cmp eax, 6 ja short def_5685E; jumptable 000000000005685E default case push rbp mov rbp, rsp mov ecx, edi neg rcx lea rdx, jpt_5685E movsxd rax, ds:(jpt_5685E - 0E00D0h)[rdx+rax*4] add rax, rdx jmp rax; switch jump loc_56860: movzx eax, byte ptr [rsi+rcx]; jumptable 000000000005685E case 1 jmp short loc_568E0 loc_56866: mov eax, [rsi+rcx]; jumptable 000000000005685E case 5 movzx ecx, byte ptr [rsi+rcx+4] shl rcx, 38h shl rax, 18h jmp short loc_568DA loc_56878: movzx eax, word ptr [rsi+rcx+1]; jumptable 000000000005685E case 3 rol ax, 8 movzx edx, ax movzx eax, byte ptr [rsi+rcx] shl eax, 10h or rax, rdx jmp short loc_568E0 loc_56890: mov eax, [rsi+rcx]; jumptable 000000000005685E case 4 bswap eax jmp short loc_568E0 def_5685E: mov rax, 0FFFFFFFFFFFFFFFFh; jumptable 000000000005685E default case retn loc_5689F: movzx eax, word ptr [rsi+rcx]; jumptable 000000000005685E case 2 rol ax, 8 movzx eax, ax jmp short loc_568E0 loc_568AC: mov eax, [rsi+rcx]; jumptable 000000000005685E case 6 movzx ecx, word ptr [rsi+rcx+4] shl rcx, 30h shl rax, 10h jmp short loc_568DA loc_568BE: mov eax, [rsi+rcx]; jumptable 000000000005685E case 7 movzx edx, word ptr [rsi+rcx+4] movzx ecx, byte ptr [rsi+rcx+6] shl rcx, 38h shl rdx, 28h shl rax, 8 or rax, rdx loc_568DA: or rax, rcx bswap rax loc_568E0: lea rcx, maria_block_size imul rax, [rcx] pop rbp retn
long long ma_kpos(unsigned int a1, long long a2) { unsigned long long v2; // rax unsigned long long v3; // rcx unsigned long long v4; // rax long long result; // rax switch ( a1 ) { case 1u: v2 = *(unsigned __int8 *)(a2 - a1); goto LABEL_11; case 2u: v2 = (unsigned __int16)__ROL2__(*(_WORD *)(a2 - a1), 8); goto LABEL_11; case 3u: v2 = (unsigned __int16)__ROL2__(*(_WORD *)(a2 - a1 + 1), 8) | (unsigned long long)(*(unsigned __int8 *)(a2 - a1) << 16); goto LABEL_11; case 4u: v2 = _byteswap_ulong(*(_DWORD *)(a2 - a1)); goto LABEL_11; case 5u: v3 = (unsigned long long)*(unsigned __int8 *)(a2 - a1 + 4) << 56; v4 = (unsigned long long)*(unsigned int *)(a2 - a1) << 24; goto LABEL_10; case 6u: v3 = (unsigned long long)*(unsigned __int16 *)(a2 - a1 + 4) << 48; v4 = (unsigned long long)*(unsigned int *)(a2 - a1) << 16; goto LABEL_10; case 7u: v3 = (unsigned long long)*(unsigned __int8 *)(a2 - a1 + 6) << 56; v4 = ((unsigned long long)*(unsigned __int16 *)(a2 - a1 + 4) << 40) | ((unsigned long long)*(unsigned int *)(a2 - a1) << 8); LABEL_10: v2 = _byteswap_uint64(v3 | v4); LABEL_11: result = *(_QWORD *)&maria_block_size * v2; break; default: result = -1LL; break; } return result; }
_ma_kpos: LEA EAX,[RDI + -0x1] CMP EAX,0x6 JA 0x00156897 PUSH RBP MOV RBP,RSP MOV ECX,EDI NEG RCX LEA RDX,[0x1e00d0] MOVSXD RAX,dword ptr [RDX + RAX*0x4] ADD RAX,RDX switchD: JMP RAX caseD_1: MOVZX EAX,byte ptr [RSI + RCX*0x1] JMP 0x001568e0 caseD_5: MOV EAX,dword ptr [RSI + RCX*0x1] MOVZX ECX,byte ptr [RSI + RCX*0x1 + 0x4] SHL RCX,0x38 SHL RAX,0x18 JMP 0x001568da caseD_3: MOVZX EAX,word ptr [RSI + RCX*0x1 + 0x1] ROL AX,0x8 MOVZX EDX,AX MOVZX EAX,byte ptr [RSI + RCX*0x1] SHL EAX,0x10 OR RAX,RDX JMP 0x001568e0 caseD_4: MOV EAX,dword ptr [RSI + RCX*0x1] BSWAP EAX JMP 0x001568e0 LAB_00156897: MOV RAX,-0x1 RET caseD_2: MOVZX EAX,word ptr [RSI + RCX*0x1] ROL AX,0x8 MOVZX EAX,AX JMP 0x001568e0 caseD_6: MOV EAX,dword ptr [RSI + RCX*0x1] MOVZX ECX,word ptr [RSI + RCX*0x1 + 0x4] SHL RCX,0x30 SHL RAX,0x10 JMP 0x001568da caseD_7: MOV EAX,dword ptr [RSI + RCX*0x1] MOVZX EDX,word ptr [RSI + RCX*0x1 + 0x4] MOVZX ECX,byte ptr [RSI + RCX*0x1 + 0x6] SHL RCX,0x38 SHL RDX,0x28 SHL RAX,0x8 OR RAX,RDX LAB_001568da: OR RAX,RCX BSWAP RAX LAB_001568e0: LEA RCX,[0x483070] IMUL RAX,qword ptr [RCX] POP RBP RET
long _ma_kpos(uint param_1,long param_2) { ushort uVar1; uint uVar2; ulong uVar3; long lVar4; ulong uVar5; if (6 < param_1 - 1) { return -1; } lVar4 = -(ulong)param_1; switch(param_1) { case 1: uVar3 = (ulong)*(byte *)(param_2 + lVar4); break; case 2: uVar3 = (ulong)(ushort)(*(ushort *)(param_2 + lVar4) << 8 | *(ushort *)(param_2 + lVar4) >> 8); break; case 3: uVar1 = *(ushort *)(param_2 + 1 + lVar4); uVar3 = (ulong)CONCAT12(*(int1 *)(param_2 + lVar4),uVar1 << 8 | uVar1 >> 8); break; case 4: uVar2 = *(uint *)(param_2 + lVar4); uVar3 = (ulong)(uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18) ; break; case 5: uVar5 = (ulong)*(byte *)(param_2 + 4 + lVar4) << 0x38; uVar3 = (ulong)*(uint *)(param_2 + lVar4) << 0x18; goto LAB_001568da; case 6: uVar5 = (ulong)*(ushort *)(param_2 + 4 + lVar4) << 0x30; uVar3 = (ulong)*(uint *)(param_2 + lVar4) << 0x10; goto LAB_001568da; case 7: uVar5 = (ulong)*(byte *)(param_2 + 6 + lVar4) << 0x38; uVar3 = (ulong)*(uint *)(param_2 + lVar4) << 8 | (ulong)*(ushort *)(param_2 + 4 + lVar4) << 0x28 ; LAB_001568da: uVar3 = uVar5 >> 0x38 | ((uVar3 | uVar5) & 0xff000000000000) >> 0x28 | (uVar3 & 0xff0000000000) >> 0x18 | (uVar3 & 0xff00000000) >> 8 | (uVar3 & 0xff000000) << 8 | (uVar3 & 0xff0000) << 0x18 | (uVar3 & 0xff00) << 0x28; } return uVar3 * maria_block_size; }
5,560
mi_restore_status
eloqsql/storage/myisam/mi_locking.c
void mi_restore_status(void *param) { MI_INFO *info= (MI_INFO*) param; DBUG_ENTER("mi_restore_status"); DBUG_PRINT("info",("key_file: %ld data_file: %ld", (long) info->s->state.state.key_file_length, (long) info->s->state.state.data_file_length)); info->state= &info->s->state.state; info->append_insert_at_end= 0; DBUG_VOID_RETURN; }
O0
c
mi_restore_status: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0xb0712 movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x18, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movb $0x0, 0x33a(%rax) jmp 0xb0732 popq %rbp retq nopw %cs:(%rax,%rax)
mi_restore_status: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax jmp short $+2 loc_B0712: mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 18h mov rax, [rbp+var_10] mov [rax+8], rcx mov rax, [rbp+var_10] mov byte ptr [rax+33Ah], 0 jmp short $+2 loc_B0732: pop rbp retn
long long mi_restore_status(long long a1) { long long result; // rax *(_QWORD *)(a1 + 8) = *(_QWORD *)a1 + 24LL; result = a1; *(_BYTE *)(a1 + 826) = 0; return result; }
mi_restore_status: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX JMP 0x001b0712 LAB_001b0712: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x18 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x33a],0x0 JMP 0x001b0732 LAB_001b0732: POP RBP RET
void mi_restore_status(long *param_1) { param_1[1] = *param_1 + 0x18; *(int1 *)((long)param_1 + 0x33a) = 0; return; }
5,561
ma_pvio_close
eloqsql/libmariadb/libmariadb/ma_pvio.c
void ma_pvio_close(MARIADB_PVIO *pvio) { /* free internal structures and close connection */ if (pvio) { #ifdef HAVE_TLS if (pvio->ctls) { ma_pvio_tls_close(pvio->ctls); free(pvio->ctls); } #endif if (pvio && pvio->methods->close) pvio->methods->close(pvio); if (pvio->cache) free(pvio->cache); free(pvio); } }
O3
c
ma_pvio_close: testq %rdi, %rdi je 0x2107a pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movq 0x38(%rdi), %rdi testq %rdi, %rdi je 0x2104c callq 0x213c2 movq 0x38(%rbx), %rdi callq 0x13570 movq 0x48(%rbx), %rax movq 0x48(%rax), %rax testq %rax, %rax je 0x2105e movq %rbx, %rdi callq *%rax movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x2106c callq 0x13570 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x13570 retq
ma_pvio_close: test rdi, rdi jz short locret_2107A push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov rdi, [rdi+38h] test rdi, rdi jz short loc_2104C call ma_pvio_tls_close mov rdi, [rbx+38h] call _free loc_2104C: mov rax, [rbx+48h] mov rax, [rax+48h] test rax, rax jz short loc_2105E mov rdi, rbx call rax loc_2105E: mov rdi, [rbx+8] test rdi, rdi jz short loc_2106C call _free loc_2106C: mov rdi, rbx add rsp, 8 pop rbx pop rbp jmp _free locret_2107A: retn
long long ma_pvio_close(_QWORD *a1) { long long result; // rax long long v3; // rdi void ( *v4)(_QWORD *); // rax long long v5; // rdi if ( a1 ) { v3 = a1[7]; if ( v3 ) { ma_pvio_tls_close(v3); free(a1[7]); } v4 = *(void ( **)(_QWORD *))(a1[9] + 72LL); if ( v4 ) v4(a1); v5 = a1[1]; if ( v5 ) free(v5); return free(a1); } return result; }
ma_pvio_close: TEST RDI,RDI JZ 0x0012107a PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x38] TEST RDI,RDI JZ 0x0012104c CALL 0x001213c2 MOV RDI,qword ptr [RBX + 0x38] CALL 0x00113570 LAB_0012104c: MOV RAX,qword ptr [RBX + 0x48] MOV RAX,qword ptr [RAX + 0x48] TEST RAX,RAX JZ 0x0012105e MOV RDI,RBX CALL RAX LAB_0012105e: MOV RDI,qword ptr [RBX + 0x8] TEST RDI,RDI JZ 0x0012106c CALL 0x00113570 LAB_0012106c: MOV RDI,RBX ADD RSP,0x8 POP RBX POP RBP JMP 0x00113570 LAB_0012107a: RET
void ma_pvio_close(void *param_1) { code *pcVar1; if (param_1 != (void *)0x0) { if (*(long *)((long)param_1 + 0x38) != 0) { ma_pvio_tls_close(); free(*(void **)((long)param_1 + 0x38)); } pcVar1 = *(code **)(*(long *)((long)param_1 + 0x48) + 0x48); if (pcVar1 != (code *)0x0) { (*pcVar1)(param_1); } if (*(void **)((long)param_1 + 8) != (void *)0x0) { free(*(void **)((long)param_1 + 8)); } free(param_1); return; } return; }
5,562
LefDefParser::defiNet::freeShield()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNet.cpp
void defiNet::freeShield() { int i; if (numShields_) { for (i = 0; i < numShields_; i++) { shields_[i]->Destroy(); free((char*)(shields_[i])); shields_[i] = 0; } numShields_ = 0; shieldsAllocated_ = 0; } }
O3
cpp
LefDefParser::defiNet::freeShield(): cmpl $0x0, 0x148(%rdi) je 0x2273d pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx jle 0x2272b xorl %r14d, %r14d movq 0x150(%rbx), %rax movq (%rax,%r14,8), %rdi callq 0x20802 movq 0x150(%rbx), %rax movq (%rax,%r14,8), %rdi callq 0x6220 movq 0x150(%rbx), %rax movq $0x0, (%rax,%r14,8) incq %r14 movslq 0x148(%rbx), %rax cmpq %rax, %r14 jl 0x226ed movq $0x0, 0x148(%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN12LefDefParser7defiNet10freeShieldEv: cmp dword ptr [rdi+148h], 0 jz short locret_2273D push r14 push rbx push rax mov rbx, rdi jle short loc_2272B xor r14d, r14d loc_226ED: mov rax, [rbx+150h] mov rdi, [rax+r14*8]; this call _ZN12LefDefParser10defiShield5clearEv; LefDefParser::defiShield::clear(void) mov rax, [rbx+150h] mov rdi, [rax+r14*8] call _free mov rax, [rbx+150h] mov qword ptr [rax+r14*8], 0 inc r14 movsxd rax, dword ptr [rbx+148h] cmp r14, rax jl short loc_226ED loc_2272B: mov qword ptr [rbx+148h], 0 add rsp, 8 pop rbx pop r14 locret_2273D: retn
long long LefDefParser::defiNet::freeShield(LefDefParser::defiNet *this) { long long v1; // r14 long long result; // rax if ( *((_DWORD *)this + 82) ) { if ( *((int *)this + 82) > 0 ) { v1 = 0LL; do { LefDefParser::defiShield::clear(*(LefDefParser::defiShield **)(*((_QWORD *)this + 42) + 8 * v1)); free(*(_QWORD *)(*((_QWORD *)this + 42) + 8 * v1)); *(_QWORD *)(*((_QWORD *)this + 42) + 8 * v1++) = 0LL; result = *((int *)this + 82); } while ( v1 < result ); } *((_QWORD *)this + 41) = 0LL; } return result; }
freeShield: CMP dword ptr [RDI + 0x148],0x0 JZ 0x0012273d PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI JLE 0x0012272b XOR R14D,R14D LAB_001226ed: MOV RAX,qword ptr [RBX + 0x150] MOV RDI,qword ptr [RAX + R14*0x8] CALL 0x00120802 MOV RAX,qword ptr [RBX + 0x150] MOV RDI,qword ptr [RAX + R14*0x8] CALL 0x00106220 MOV RAX,qword ptr [RBX + 0x150] MOV qword ptr [RAX + R14*0x8],0x0 INC R14 MOVSXD RAX,dword ptr [RBX + 0x148] CMP R14,RAX JL 0x001226ed LAB_0012272b: MOV qword ptr [RBX + 0x148],0x0 ADD RSP,0x8 POP RBX POP R14 LAB_0012273d: RET
/* LefDefParser::defiNet::freeShield() */ void __thiscall LefDefParser::defiNet::freeShield(defiNet *this) { long lVar1; if (*(int *)(this + 0x148) != 0) { if (0 < *(int *)(this + 0x148)) { lVar1 = 0; do { defiShield::clear(*(defiShield **)(*(long *)(this + 0x150) + lVar1 * 8)); free(*(void **)(*(long *)(this + 0x150) + lVar1 * 8)); *(int8 *)(*(long *)(this + 0x150) + lVar1 * 8) = 0; lVar1 = lVar1 + 1; } while (lVar1 < *(int *)(this + 0x148)); } *(int8 *)(this + 0x148) = 0; } return; }
5,563
minja::ArrayExpr::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 { auto result = Value::array(); for (const auto& e : elements) { if (!e) throw std::runtime_error("Array element is null"); result.push_back(e->evaluate(context)); } return result; }
O0
cpp
minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: subq $0xe8, %rsp movq %rdi, 0x20(%rsp) movq %rdi, %rax movq %rax, 0x10(%rsp) movq %rdi, 0xe0(%rsp) movq %rsi, 0xd8(%rsp) movq %rdx, 0xd0(%rsp) movq 0xd8(%rsp), %rax movq %rax, 0x18(%rsp) movb $0x0, 0xcf(%rsp) xorps %xmm0, %xmm0 movaps %xmm0, 0xb0(%rsp) movq $0x0, 0xc0(%rsp) leaq 0xb0(%rsp), %rdi movq %rdi, 0x28(%rsp) callq 0xcb0f0 movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0xcd710 jmp 0xcd3ab leaq 0xb0(%rsp), %rdi callq 0xcb220 movq 0x18(%rsp), %rax addq $0x20, %rax movq %rax, 0x98(%rsp) movq 0x98(%rsp), %rdi callq 0xcd800 movq %rax, 0x90(%rsp) movq 0x98(%rsp), %rdi callq 0xcd830 movq %rax, 0x88(%rsp) leaq 0x90(%rsp), %rdi leaq 0x88(%rsp), %rsi callq 0xcd860 testb $0x1, %al jne 0xcd411 jmp 0xcd54e leaq 0x90(%rsp), %rdi callq 0xcd8a0 movq %rax, 0x80(%rsp) movq 0x80(%rsp), %rdi callq 0x77a80 testb $0x1, %al jne 0xcd4dd movl $0x10, %edi callq 0x50540 movq %rax, %rdi movq %rdi, %rax movq %rax, 0x8(%rsp) leaq 0x1040bb(%rip), %rsi # 0x1d1512 callq 0x50340 jmp 0xcd45e movq 0x8(%rsp), %rdi movq 0x186b46(%rip), %rsi # 0x253fb0 movq 0x186b07(%rip), %rdx # 0x253f78 callq 0x508f0 jmp 0xcd58e movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa8(%rsp) movl %eax, 0xa4(%rsp) leaq 0xb0(%rsp), %rdi callq 0xcb220 jmp 0xcd581 movq 0x8(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa8(%rsp) movl %eax, 0xa4(%rsp) callq 0x50c40 jmp 0xcd577 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa8(%rsp) movl %eax, 0xa4(%rsp) jmp 0xcd577 movq 0x80(%rsp), %rdi callq 0x9f2f0 movq %rax, %rsi movq 0xd0(%rsp), %rdx leaq 0x30(%rsp), %rdi callq 0x9f300 jmp 0xcd501 movq 0x20(%rsp), %rdi leaq 0x30(%rsp), %rsi callq 0xcd8b0 jmp 0xcd512 leaq 0x30(%rsp), %rdi callq 0x9f7a0 leaq 0x90(%rsp), %rdi callq 0xcd9e0 jmp 0xcd3f3 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa8(%rsp) movl %eax, 0xa4(%rsp) leaq 0x30(%rsp), %rdi callq 0x9f7a0 jmp 0xcd577 movb $0x1, 0xcf(%rsp) testb $0x1, 0xcf(%rsp) jne 0xcd56a movq 0x20(%rsp), %rdi callq 0x9f7a0 movq 0x10(%rsp), %rax addq $0xe8, %rsp retq movq 0x20(%rsp), %rdi callq 0x9f7a0 movq 0xa8(%rsp), %rdi callq 0x50940 nop
_ZNK5minja9ArrayExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: sub rsp, 0E8h mov [rsp+0E8h+var_C8], rdi mov rax, rdi mov [rsp+0E8h+var_D8], rax mov [rsp+0E8h+var_8], rdi mov [rsp+0E8h+var_10], rsi mov [rsp+0E8h+var_18], rdx mov rax, [rsp+0E8h+var_10] mov [rsp+0E8h+var_D0], rax mov [rsp+0E8h+var_19], 0 xorps xmm0, xmm0 movaps [rsp+0E8h+var_38], xmm0 mov [rsp+0E8h+var_28], 0 lea rdi, [rsp+0E8h+var_38] mov [rsp+0E8h+var_C0], rdi call _ZNSt6vectorIN5minja5ValueESaIS1_EEC2Ev; std::vector<minja::Value>::vector(void) mov rdi, [rsp+0E8h+var_C8] mov rsi, [rsp+0E8h+var_C0] call _ZN5minja5Value5arrayESt6vectorIS0_SaIS0_EE; minja::Value::array(std::vector<minja::Value>) jmp short $+2 loc_CD3AB: lea rdi, [rsp+0E8h+var_38] call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() mov rax, [rsp+0E8h+var_D0] add rax, 20h ; ' ' mov [rsp+0E8h+var_50], rax mov rdi, [rsp+0E8h+var_50] call _ZNKSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EE5beginEv; std::vector<std::shared_ptr<minja::Expression>>::begin(void) mov [rsp+0E8h+var_58], rax mov rdi, [rsp+0E8h+var_50] call _ZNKSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EE3endEv; std::vector<std::shared_ptr<minja::Expression>>::end(void) mov [rsp+0E8h+var_60], rax loc_CD3F3: lea rdi, [rsp+0E8h+var_58] lea rsi, [rsp+0E8h+var_60] call _ZN9__gnu_cxxneIPKSt10shared_ptrIN5minja10ExpressionEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_; __gnu_cxx::operator!=<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>(__gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>> const&,__gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>> const&) test al, 1 jnz short loc_CD411 jmp loc_CD54E loc_CD411: lea rdi, [rsp+0E8h+var_58] call _ZNK9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN5minja10ExpressionEESt6vectorIS4_SaIS4_EEEdeEv; __gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>::operator*(void) mov [rsp+0E8h+var_68], rax mov rdi, [rsp+0E8h+var_68] call _ZNKSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(void) test al, 1 jnz loc_CD4DD mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rdi, rax; this mov rax, rdi mov [rsp+0E8h+var_E0], rax lea rsi, aArrayElementIs; "Array element is null" call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short $+2 loc_CD45E: mov rdi, [rsp+0E8h+var_E0]; void * mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp loc_CD58E mov rcx, rax mov eax, edx mov [rsp+arg_A0], rcx mov [rsp+arg_9C], eax lea rdi, [rsp+arg_A8] call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() jmp loc_CD581 mov rdi, [rsp+arg_0]; void * mov rcx, rax mov eax, edx mov [rsp+arg_A0], rcx mov [rsp+arg_9C], eax call ___cxa_free_exception jmp loc_CD577 mov rcx, rax mov eax, edx mov [rsp+arg_A0], rcx mov [rsp+arg_9C], eax jmp loc_CD577 loc_CD4DD: mov rdi, [rsp+0E8h+var_68] call _ZNKSt19__shared_ptr_accessIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rsi, rax mov rdx, [rsp+0E8h+var_18] lea rdi, [rsp+0E8h+var_B8] call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) jmp short $+2 loc_CD501: mov rdi, [rsp+0E8h+var_C8]; this lea rsi, [rsp+0E8h+var_B8]; minja::Value * call _ZN5minja5Value9push_backERKS0_; minja::Value::push_back(minja::Value const&) jmp short $+2 loc_CD512: lea rdi, [rsp+0E8h+var_B8]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() lea rdi, [rsp+0E8h+var_58] call _ZN9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN5minja10ExpressionEESt6vectorIS4_SaIS4_EEEppEv; __gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>::operator++(void) jmp loc_CD3F3 mov rcx, rax mov eax, edx mov [rsp+arg_A0], rcx mov [rsp+arg_9C], eax lea rdi, [rsp+arg_28]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_CD577 loc_CD54E: mov [rsp+0E8h+var_19], 1 test [rsp+0E8h+var_19], 1 jnz short loc_CD56A mov rdi, [rsp+0E8h+var_C8]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_CD56A: mov rax, [rsp+0E8h+var_D8] add rsp, 0E8h retn loc_CD577: mov rdi, [rsp+arg_18]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_CD581: mov rdi, [rsp+arg_A0] call __Unwind_Resume loc_CD58E: xchg ax, ax
minja::Value * minja::ArrayExpr::do_evaluate(minja::Value *a1, long long a2, long long a3) { int v3; // edx int v4; // ecx int v5; // r8d int v6; // r9d void (***v7)(void); // rax std::runtime_error *exception; // [rsp+8h] [rbp-E0h] _BYTE v10[80]; // [rsp+30h] [rbp-B8h] BYREF _QWORD *v11; // [rsp+80h] [rbp-68h] long long v12; // [rsp+88h] [rbp-60h] BYREF _QWORD v13[4]; // [rsp+90h] [rbp-58h] BYREF __int128 v14; // [rsp+B0h] [rbp-38h] BYREF long long v15; // [rsp+C0h] [rbp-28h] char v16; // [rsp+CFh] [rbp-19h] long long v17; // [rsp+D0h] [rbp-18h] long long v18; // [rsp+D8h] [rbp-10h] minja::Value *v19; // [rsp+E0h] [rbp-8h] v19 = a1; v18 = a2; v17 = a3; v16 = 0; v14 = 0LL; v15 = 0LL; std::vector<minja::Value>::vector((long long)&v14); minja::Value::array((_DWORD)a1, (unsigned int)&v14, v3, v4, v5, v6); std::vector<minja::Value>::~vector((long long *)&v14); v13[1] = a2 + 32; v13[0] = std::vector<std::shared_ptr<minja::Expression>>::begin(a2 + 32); v12 = std::vector<std::shared_ptr<minja::Expression>>::end(a2 + 32); while ( (__gnu_cxx::operator!=<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>( v13, &v12) & 1) != 0 ) { v11 = (_QWORD *)__gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>::operator*(v13); if ( !std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(v11) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Array element is null"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v7 = (void (***)(void))std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((long long)v11); minja::Expression::evaluate((long long)v10, v7); minja::Value::push_back(a1, (const minja::Value *)v10); minja::Value::~Value((minja::Value *)v10); __gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>::operator++(v13); } return a1; }
do_evaluate: SUB RSP,0xe8 MOV qword ptr [RSP + 0x20],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0xe0],RDI MOV qword ptr [RSP + 0xd8],RSI MOV qword ptr [RSP + 0xd0],RDX MOV RAX,qword ptr [RSP + 0xd8] MOV qword ptr [RSP + 0x18],RAX MOV byte ptr [RSP + 0xcf],0x0 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0xb0],XMM0 MOV qword ptr [RSP + 0xc0],0x0 LEA RDI,[RSP + 0xb0] MOV qword ptr [RSP + 0x28],RDI CALL 0x001cb0f0 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] LAB_001cd3a4: CALL 0x001cd710 LAB_001cd3a9: JMP 0x001cd3ab LAB_001cd3ab: LEA RDI,[RSP + 0xb0] CALL 0x001cb220 MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x20 MOV qword ptr [RSP + 0x98],RAX MOV RDI,qword ptr [RSP + 0x98] CALL 0x001cd800 MOV qword ptr [RSP + 0x90],RAX MOV RDI,qword ptr [RSP + 0x98] CALL 0x001cd830 MOV qword ptr [RSP + 0x88],RAX LAB_001cd3f3: LEA RDI,[RSP + 0x90] LEA RSI,[RSP + 0x88] CALL 0x001cd860 TEST AL,0x1 JNZ 0x001cd411 JMP 0x001cd54e LAB_001cd411: LEA RDI,[RSP + 0x90] CALL 0x001cd8a0 MOV qword ptr [RSP + 0x80],RAX MOV RDI,qword ptr [RSP + 0x80] CALL 0x00177a80 TEST AL,0x1 JNZ 0x001cd4dd MOV EDI,0x10 CALL 0x00150540 MOV RDI,RAX MOV RAX,RDI MOV qword ptr [RSP + 0x8],RAX LAB_001cd450: LEA RSI,[0x2d1512] CALL 0x00150340 JMP 0x001cd45e LAB_001cd45e: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [0x00353fb0] MOV RDX,qword ptr [0x00353f78] CALL 0x001508f0 LAB_001cd4dd: MOV RDI,qword ptr [RSP + 0x80] CALL 0x0019f2f0 MOV RSI,RAX MOV RDX,qword ptr [RSP + 0xd0] LAB_001cd4f5: LEA RDI,[RSP + 0x30] CALL 0x0019f300 JMP 0x001cd501 LAB_001cd501: MOV RDI,qword ptr [RSP + 0x20] LEA RSI,[RSP + 0x30] CALL 0x001cd8b0 LAB_001cd510: JMP 0x001cd512 LAB_001cd512: LEA RDI,[RSP + 0x30] CALL 0x0019f7a0 LEA RDI,[RSP + 0x90] CALL 0x001cd9e0 JMP 0x001cd3f3 LAB_001cd54e: MOV byte ptr [RSP + 0xcf],0x1 TEST byte ptr [RSP + 0xcf],0x1 JNZ 0x001cd56a MOV RDI,qword ptr [RSP + 0x20] CALL 0x0019f7a0 LAB_001cd56a: MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0xe8 RET
/* WARNING: Removing unreachable block (ram,0x001cd560) */ /* minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ shared_ptr * minja::ArrayExpr::do_evaluate(shared_ptr *param_1) { bool bVar1; runtime_error *this; long in_RSI; shared_ptr local_b8 [80]; __shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false> *local_68; int8 local_60; int8 local_58; vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>> *local_50; int8 local_38; int8 uStack_30; int8 local_28; int1 local_19; shared_ptr *local_8; local_19 = 0; local_38 = 0; uStack_30 = 0; local_28 = 0; local_8 = param_1; std::vector<minja::Value,std::allocator<minja::Value>>::vector ((vector<minja::Value,std::allocator<minja::Value>> *)&local_38); /* try { // try from 001cd3a4 to 001cd3a8 has its CatchHandler @ 001cd47b */ Value::array((Value *)param_1,(vector<minja::Value,std::allocator<minja::Value>> *)&local_38); std::vector<minja::Value,std::allocator<minja::Value>>::~vector ((vector<minja::Value,std::allocator<minja::Value>> *)&local_38); local_50 = (vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>> *)(in_RSI + 0x20); local_58 = std:: vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>> ::begin(local_50); local_60 = std:: vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>> ::end(local_50); while( true ) { bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_58,(__normal_iterator *)&local_60); if (!bVar1) { return param_1; } local_68 = (__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false> *) __gnu_cxx:: __normal_iterator<std::shared_ptr<minja::Expression>const*,std::vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>> ::operator*((__normal_iterator<std::shared_ptr<minja::Expression>const*,std::vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>> *)&local_58); bVar1 = std::__shared_ptr::operator_cast_to_bool((__shared_ptr *)local_68); if (!bVar1) break; std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator-> (local_68); /* try { // try from 001cd4f5 to 001cd4fe has its CatchHandler @ 001cd4c4 */ Expression::evaluate(local_b8); /* try { // try from 001cd501 to 001cd50f has its CatchHandler @ 001cd52e */ Value::push_back((Value *)param_1,(Value *)local_b8); Value::~Value((Value *)local_b8); __gnu_cxx:: __normal_iterator<std::shared_ptr<minja::Expression>const*,std::vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>> ::operator++((__normal_iterator<std::shared_ptr<minja::Expression>const*,std::vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>> *)&local_58); } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001cd450 to 001cd45b has its CatchHandler @ 001cd4a1 */ std::runtime_error::runtime_error(this,"Array element is null"); /* try { // try from 001cd45e to 001cd475 has its CatchHandler @ 001cd4c4 */ /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00353fb0,PTR__runtime_error_00353f78); }
5,564
minja::ArrayExpr::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 { auto result = Value::array(); for (const auto& e : elements) { if (!e) throw std::runtime_error("Array element is null"); result.push_back(e->evaluate(context)); } return result; }
O2
cpp
minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x70, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx xorps %xmm0, %xmm0 movq %rsp, %rsi movaps %xmm0, (%rsi) andq $0x0, 0x10(%rsi) callq 0x4a008 movq %rsp, %rdi callq 0x4982a movq 0x20(%r15), %r12 movq 0x28(%r15), %r13 leaq 0x20(%rsp), %r15 cmpq %r13, %r12 je 0x49f52 movq (%r12), %rsi testq %rsi, %rsi je 0x49f63 movq %r15, %rdi movq %r14, %rdx callq 0x3b08c movq %rbx, %rdi movq %r15, %rsi callq 0x4a074 movq %r15, %rdi callq 0x3b31c addq $0x10, %r12 jmp 0x49f20 movq %rbx, %rax addq $0x70, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq pushq $0x10 popq %rdi callq 0x20390 movq %rax, %r15 leaq 0x5415d(%rip), %rsi # 0x9e0d2 movq %rax, %rdi callq 0x20280 movq 0x98064(%rip), %rsi # 0xe1fe8 movq 0x97fe5(%rip), %rdx # 0xe1f70 movq %r15, %rdi callq 0x20b30 movq %rax, %r14 movq %rsp, %rdi callq 0x4982a jmp 0x49fc9 jmp 0x49faf movq %rax, %r14 movq %r15, %rdi callq 0x20520 jmp 0x49fc1 movq %rax, %r14 jmp 0x49fc1 movq %rax, %r14 leaq 0x20(%rsp), %rdi callq 0x3b31c movq %rbx, %rdi callq 0x3b31c movq %r14, %rdi callq 0x20b90 nop
_ZNK5minja9ArrayExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push r15 push r14 push r13 push r12 push rbx sub rsp, 70h mov r14, rdx mov r15, rsi mov rbx, rdi xorps xmm0, xmm0 mov rsi, rsp movaps xmmword ptr [rsi], xmm0 and qword ptr [rsi+10h], 0 call _ZN5minja5Value5arrayESt6vectorIS0_SaIS0_EE; minja::Value::array(std::vector<minja::Value>) mov rdi, rsp call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() mov r12, [r15+20h] mov r13, [r15+28h] lea r15, [rsp+98h+var_78] loc_49F20: cmp r12, r13 jz short loc_49F52 mov rsi, [r12] test rsi, rsi jz short loc_49F63 mov rdi, r15 mov rdx, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rdi, rbx; this mov rsi, r15; minja::Value * call _ZN5minja5Value9push_backERKS0_; minja::Value::push_back(minja::Value const&) mov rdi, r15; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() add r12, 10h jmp short loc_49F20 loc_49F52: mov rax, rbx add rsp, 70h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_49F63: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aArrayElementIs; "Array element is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r15; void * call ___cxa_throw mov r14, rax mov rdi, rsp call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() jmp short loc_49FC9 jmp short loc_49FAF mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_49FC1 loc_49FAF: mov r14, rax jmp short loc_49FC1 mov r14, rax lea rdi, [rsp+98h+var_78]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_49FC1: mov rdi, rbx; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_49FC9: mov rdi, r14 call __Unwind_Resume
minja::Value * minja::ArrayExpr::do_evaluate(minja::Value *this, long long a2, int a3, int a4, int a5, int a6) { void (****v6)(void); // r12 void (****v7)(void); // r13 std::runtime_error *exception; // r15 _BYTE v10[32]; // [rsp+0h] [rbp-98h] BYREF _BYTE v11[120]; // [rsp+20h] [rbp-78h] BYREF minja::Value::array((_DWORD)this, (unsigned int)v10, a3, a4, a5, a6, 0LL, 0LL, 0LL); std::vector<minja::Value>::~vector((long long)v10); v6 = *(void (*****)(void))(a2 + 32); v7 = *(void (*****)(void))(a2 + 40); while ( v6 != v7 ) { if ( !*v6 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Array element is null"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v11, *v6); minja::Value::push_back(this, (const minja::Value *)v11); minja::Value::~Value((minja::Value *)v11); v6 += 2; } return this; }
5,565
mi_kpointer
eloqsql/storage/myisam/mi_search.c
void _mi_kpointer(register MI_INFO *info, register uchar *buff, my_off_t pos) { pos/=MI_MIN_KEY_BLOCK_LENGTH; switch (info->s->base.key_reflength) { #if SIZEOF_OFF_T > 4 case 7: mi_int7store(buff,pos); break; case 6: mi_int6store(buff,pos); break; case 5: mi_int5store(buff,pos); break; #else case 7: *buff++=0; /* fall through */ case 6: *buff++=0; /* fall through */ case 5: *buff++=0; /* fall through */ #endif case 4: mi_int4store(buff,pos); break; case 3: mi_int3store(buff,pos); break; case 2: mi_int2store(buff,(uint) pos); break; case 1: buff[0]= (uchar) pos; break; default: abort(); /* impossible */ } }
O3
c
mi_kpointer: movq (%rdi), %rax movl 0x17c(%rax), %ecx decl %ecx cmpl $0x6, %ecx ja 0x852b7 movq %rdx, %rax shrq $0xa, %rax leaq 0x5c94d(%rip), %rdi # 0xe1b2c movslq (%rdi,%rcx,4), %rcx addq %rdi, %rcx jmpq *%rcx movb %al, 0x1(%rsi) shrq $0x12, %rdx jmp 0x852b1 movb %al, 0x4(%rsi) movq %rdx, %rax shrq $0x2a, %rax movl %edx, %ecx shrl $0x12, %ecx movb %cl, 0x3(%rsi) movq %rdx, %rcx shrq $0x1a, %rcx movb %cl, 0x2(%rsi) shrq $0x22, %rdx movb %dl, 0x1(%rsi) jmp 0x852b4 movb %al, 0x2(%rsi) movl %edx, %eax shrl $0x12, %eax movb %al, 0x1(%rsi) shrq $0x1a, %rdx jmp 0x852b1 movb %al, 0x3(%rsi) movl %edx, %eax shrl $0x12, %eax movb %al, 0x2(%rsi) movq %rdx, %rax shrq $0x1a, %rax movb %al, 0x1(%rsi) shrq $0x22, %rdx jmp 0x852b1 movq %rdx, %rcx shrq $0x2a, %rcx movb %al, 0x5(%rsi) movl %edx, %eax shrl $0x12, %eax movb %al, 0x4(%rsi) movq %rdx, %rax shrq $0x1a, %rax movb %al, 0x3(%rsi) movq %rdx, %rax shrq $0x22, %rax movb %al, 0x2(%rsi) movb %cl, 0x1(%rsi) shrq $0x32, %rdx jmp 0x852b1 movq %rdx, %rcx shrq $0x2a, %rcx movb %al, 0x6(%rsi) movl %edx, %eax shrl $0x12, %eax movb %al, 0x5(%rsi) movq %rdx, %rax shrq $0x1a, %rax movb %al, 0x4(%rsi) movq %rdx, %rax shrq $0x22, %rax movb %al, 0x3(%rsi) movb %cl, 0x2(%rsi) movq %rdx, %rax shrq $0x32, %rax movb %al, 0x1(%rsi) shrq $0x3a, %rdx movq %rdx, %rax movb %al, (%rsi) retq pushq %rbp movq %rsp, %rbp callq 0x29610
_mi_kpointer: mov rax, [rdi] mov ecx, [rax+17Ch] dec ecx; switch 7 cases cmp ecx, 6 ja def_851E6; jumptable 00000000000851E6 default case mov rax, rdx shr rax, 0Ah lea rdi, jpt_851E6 movsxd rcx, ds:(jpt_851E6 - 0E1B2Ch)[rdi+rcx*4] add rcx, rdi jmp rcx; switch jump loc_851E8: mov [rsi+1], al; jumptable 00000000000851E6 case 2 shr rdx, 12h jmp loc_852B1 loc_851F4: mov [rsi+4], al; jumptable 00000000000851E6 case 5 mov rax, rdx shr rax, 2Ah mov ecx, edx shr ecx, 12h mov [rsi+3], cl mov rcx, rdx shr rcx, 1Ah mov [rsi+2], cl shr rdx, 22h mov [rsi+1], dl jmp loc_852B4; jumptable 00000000000851E6 case 1 loc_8521C: mov [rsi+2], al; jumptable 00000000000851E6 case 3 mov eax, edx shr eax, 12h mov [rsi+1], al shr rdx, 1Ah jmp loc_852B1 loc_85230: mov [rsi+3], al; jumptable 00000000000851E6 case 4 mov eax, edx shr eax, 12h mov [rsi+2], al mov rax, rdx shr rax, 1Ah mov [rsi+1], al shr rdx, 22h jmp short loc_852B1 loc_8524B: mov rcx, rdx; jumptable 00000000000851E6 case 6 shr rcx, 2Ah mov [rsi+5], al mov eax, edx shr eax, 12h mov [rsi+4], al mov rax, rdx shr rax, 1Ah mov [rsi+3], al mov rax, rdx shr rax, 22h mov [rsi+2], al mov [rsi+1], cl shr rdx, 32h jmp short loc_852B1 loc_8527A: mov rcx, rdx; jumptable 00000000000851E6 case 7 shr rcx, 2Ah mov [rsi+6], al mov eax, edx shr eax, 12h mov [rsi+5], al mov rax, rdx shr rax, 1Ah mov [rsi+4], al mov rax, rdx shr rax, 22h mov [rsi+3], al mov [rsi+2], cl mov rax, rdx shr rax, 32h mov [rsi+1], al shr rdx, 3Ah loc_852B1: mov rax, rdx loc_852B4: mov [rsi], al; jumptable 00000000000851E6 case 1 retn def_851E6: push rbp; jumptable 00000000000851E6 default case mov rbp, rsp call _abort
unsigned long long mi_kpointer(long long a1, _BYTE *a2, unsigned long long a3) { unsigned long long result; // rax unsigned long long v4; // rdx result = a3 >> 10; switch ( *(_DWORD *)(*(_QWORD *)a1 + 380LL) ) { case 1: goto LABEL_9; case 2: a2[1] = result; v4 = a3 >> 18; goto LABEL_8; case 3: a2[2] = result; a2[1] = (unsigned int)a3 >> 18; v4 = a3 >> 26; goto LABEL_8; case 4: a2[3] = result; a2[2] = (unsigned int)a3 >> 18; a2[1] = a3 >> 26; v4 = a3 >> 34; goto LABEL_8; case 5: a2[4] = result; result = a3 >> 42; a2[3] = (unsigned int)a3 >> 18; a2[2] = a3 >> 26; a2[1] = a3 >> 34; goto LABEL_9; case 6: a2[5] = result; a2[4] = (unsigned int)a3 >> 18; a2[3] = a3 >> 26; a2[2] = a3 >> 34; a2[1] = a3 >> 42; v4 = a3 >> 50; goto LABEL_8; case 7: a2[6] = result; a2[5] = (unsigned int)a3 >> 18; a2[4] = a3 >> 26; a2[3] = a3 >> 34; a2[2] = a3 >> 42; a2[1] = a3 >> 50; v4 = a3 >> 58; LABEL_8: result = v4; LABEL_9: *a2 = result; return result; default: abort(a1, a2, a3); } }
_mi_kpointer: MOV RAX,qword ptr [RDI] MOV ECX,dword ptr [RAX + 0x17c] DEC ECX CMP ECX,0x6 JA 0x001852b7 MOV RAX,RDX SHR RAX,0xa LEA RDI,[0x1e1b2c] MOVSXD RCX,dword ptr [RDI + RCX*0x4] ADD RCX,RDI switchD: JMP RCX caseD_2: MOV byte ptr [RSI + 0x1],AL SHR RDX,0x12 JMP 0x001852b1 caseD_5: MOV byte ptr [RSI + 0x4],AL MOV RAX,RDX SHR RAX,0x2a MOV ECX,EDX SHR ECX,0x12 MOV byte ptr [RSI + 0x3],CL MOV RCX,RDX SHR RCX,0x1a MOV byte ptr [RSI + 0x2],CL SHR RDX,0x22 MOV byte ptr [RSI + 0x1],DL JMP 0x001852b4 caseD_3: MOV byte ptr [RSI + 0x2],AL MOV EAX,EDX SHR EAX,0x12 MOV byte ptr [RSI + 0x1],AL SHR RDX,0x1a JMP 0x001852b1 caseD_4: MOV byte ptr [RSI + 0x3],AL MOV EAX,EDX SHR EAX,0x12 MOV byte ptr [RSI + 0x2],AL MOV RAX,RDX SHR RAX,0x1a MOV byte ptr [RSI + 0x1],AL SHR RDX,0x22 JMP 0x001852b1 caseD_6: MOV RCX,RDX SHR RCX,0x2a MOV byte ptr [RSI + 0x5],AL MOV EAX,EDX SHR EAX,0x12 MOV byte ptr [RSI + 0x4],AL MOV RAX,RDX SHR RAX,0x1a MOV byte ptr [RSI + 0x3],AL MOV RAX,RDX SHR RAX,0x22 MOV byte ptr [RSI + 0x2],AL MOV byte ptr [RSI + 0x1],CL SHR RDX,0x32 JMP 0x001852b1 caseD_7: MOV RCX,RDX SHR RCX,0x2a MOV byte ptr [RSI + 0x6],AL MOV EAX,EDX SHR EAX,0x12 MOV byte ptr [RSI + 0x5],AL MOV RAX,RDX SHR RAX,0x1a MOV byte ptr [RSI + 0x4],AL MOV RAX,RDX SHR RAX,0x22 MOV byte ptr [RSI + 0x3],AL MOV byte ptr [RSI + 0x2],CL MOV RAX,RDX SHR RAX,0x32 MOV byte ptr [RSI + 0x1],AL SHR RDX,0x3a LAB_001852b1: MOV RAX,RDX caseD_1: MOV byte ptr [RSI],AL RET default: PUSH RBP MOV RBP,RSP CALL 0x00129610
void _mi_kpointer(long *param_1,byte *param_2,ulong param_3) { byte bVar1; bVar1 = (byte)(param_3 >> 10); switch(*(int4 *)(*param_1 + 0x17c)) { case 1: break; case 2: param_2[1] = bVar1; bVar1 = (byte)(param_3 >> 0x12); break; case 3: param_2[2] = bVar1; param_2[1] = (byte)(param_3 >> 0x12); bVar1 = (byte)(param_3 >> 0x1a); break; case 4: param_2[3] = bVar1; param_2[2] = (byte)(param_3 >> 0x12); param_2[1] = (byte)(param_3 >> 0x1a); bVar1 = (byte)(param_3 >> 0x22); break; case 5: param_2[4] = bVar1; bVar1 = (byte)(param_3 >> 0x2a); param_2[3] = (byte)(param_3 >> 0x12); param_2[2] = (byte)(param_3 >> 0x1a); param_2[1] = (byte)(param_3 >> 0x22); break; case 6: param_2[5] = bVar1; param_2[4] = (byte)(param_3 >> 0x12); param_2[3] = (byte)(param_3 >> 0x1a); param_2[2] = (byte)(param_3 >> 0x22); param_2[1] = (byte)(param_3 >> 0x2a); bVar1 = (byte)(param_3 >> 0x32); break; case 7: param_2[6] = bVar1; param_2[5] = (byte)(param_3 >> 0x12); param_2[4] = (byte)(param_3 >> 0x1a); param_2[3] = (byte)(param_3 >> 0x22); param_2[2] = (byte)(param_3 >> 0x2a); param_2[1] = (byte)(param_3 >> 0x32); bVar1 = (byte)(param_3 >> 0x3a); break; default: /* WARNING: Subroutine does not return */ abort(); } *param_2 = bVar1; return; }
5,566
spdlog::logger::swap(spdlog::logger&)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/logger-inl.h
SPDLOG_INLINE void logger::swap(spdlog::logger &other) SPDLOG_NOEXCEPT { name_.swap(other.name_); sinks_.swap(other.sinks_); // swap level_ auto other_level = other.level_.load(); auto my_level = level_.exchange(other_level); other.level_.store(my_level); // swap flush level_ other_level = other.flush_level_.load(); my_level = flush_level_.exchange(other_level); other.flush_level_.store(my_level); custom_err_handler_.swap(other.custom_err_handler_); std::swap(tracer_, other.tracer_); }
O0
c
spdlog::logger::swap(spdlog::logger&): subq $0x118, %rsp # imm = 0x118 movq %rdi, 0x80(%rsp) movq %rsi, 0x78(%rsp) movq 0x80(%rsp), %rdi movq %rdi, 0x58(%rsp) addq $0x8, %rdi movq 0x78(%rsp), %rsi addq $0x8, %rsi callq 0x3a220 movq 0x58(%rsp), %rdi addq $0x28, %rdi movq 0x78(%rsp), %rsi addq $0x28, %rsi callq 0x3a550 movq 0x78(%rsp), %rax addq $0x40, %rax movq %rax, 0xb0(%rsp) movl $0x5, 0xac(%rsp) movq 0xb0(%rsp), %rax movq %rax, 0x60(%rsp) movl 0xac(%rsp), %edi movl $0xffff, %esi # imm = 0xFFFF callq 0x23ba0 movl %eax, 0xa8(%rsp) movl 0xac(%rsp), %eax movl %eax, 0x6c(%rsp) decl %eax subl $0x2, %eax jb 0x352ea jmp 0x352cf movl 0x6c(%rsp), %eax subl $0x5, %eax je 0x352fa jmp 0x352da movq 0x60(%rsp), %rax movl (%rax), %eax movl %eax, 0xa4(%rsp) jmp 0x35308 movq 0x60(%rsp), %rax movl (%rax), %eax movl %eax, 0xa4(%rsp) jmp 0x35308 movq 0x60(%rsp), %rax movl (%rax), %eax movl %eax, 0xa4(%rsp) movq 0x58(%rsp), %rcx movl 0xa4(%rsp), %eax movl %eax, 0x74(%rsp) addq $0x40, %rcx movl 0x74(%rsp), %eax movq %rcx, 0xe0(%rsp) movl %eax, 0xdc(%rsp) movl $0x5, 0xd8(%rsp) movq 0xe0(%rsp), %rax movq %rax, 0x48(%rsp) movl 0xd8(%rsp), %eax movl 0xdc(%rsp), %ecx movl %ecx, 0xd4(%rsp) decl %eax movl %eax, %ecx movq %rcx, 0x50(%rsp) subl $0x4, %eax ja 0x3537f movq 0x50(%rsp), %rax leaq 0xd7e9a(%rip), %rcx # 0x10d210 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x48(%rsp), %rcx movl 0xd4(%rsp), %eax xchgl %eax, (%rcx) movl %eax, 0xd0(%rsp) jmp 0x353f0 movq 0x48(%rsp), %rcx movl 0xd4(%rsp), %eax xchgl %eax, (%rcx) movl %eax, 0xd0(%rsp) jmp 0x353f0 movq 0x48(%rsp), %rcx movl 0xd4(%rsp), %eax xchgl %eax, (%rcx) movl %eax, 0xd0(%rsp) jmp 0x353f0 movq 0x48(%rsp), %rcx movl 0xd4(%rsp), %eax xchgl %eax, (%rcx) movl %eax, 0xd0(%rsp) jmp 0x353f0 movq 0x48(%rsp), %rcx movl 0xd4(%rsp), %eax xchgl %eax, (%rcx) movl %eax, 0xd0(%rsp) movl 0xd0(%rsp), %eax movl %eax, 0x70(%rsp) movq 0x78(%rsp), %rcx addq $0x40, %rcx movl 0x70(%rsp), %eax movq %rcx, 0x110(%rsp) movl %eax, 0x10c(%rsp) movl $0x5, 0x108(%rsp) movq 0x110(%rsp), %rax movq %rax, 0x38(%rsp) movl 0x108(%rsp), %edi movl $0xffff, %esi # imm = 0xFFFF callq 0x23ba0 movl %eax, 0x104(%rsp) movl 0x108(%rsp), %eax movl %eax, 0x44(%rsp) movl 0x10c(%rsp), %ecx movl %ecx, 0x100(%rsp) subl $0x3, %eax je 0x35482 jmp 0x35467 movl 0x44(%rsp), %eax subl $0x5, %eax je 0x35492 jmp 0x35472 movq 0x38(%rsp), %rax movl 0x100(%rsp), %ecx movl %ecx, (%rax) jmp 0x354a0 movq 0x38(%rsp), %rax movl 0x100(%rsp), %ecx movl %ecx, (%rax) jmp 0x354a0 movq 0x38(%rsp), %rcx movl 0x100(%rsp), %eax xchgl %eax, (%rcx) movq 0x78(%rsp), %rax addq $0x44, %rax movq %rax, 0x98(%rsp) movl $0x5, 0x94(%rsp) movq 0x98(%rsp), %rax movq %rax, 0x28(%rsp) movl 0x94(%rsp), %edi movl $0xffff, %esi # imm = 0xFFFF callq 0x23ba0 movl %eax, 0x90(%rsp) movl 0x94(%rsp), %eax movl %eax, 0x34(%rsp) decl %eax subl $0x2, %eax jb 0x35510 jmp 0x354f5 movl 0x34(%rsp), %eax subl $0x5, %eax je 0x35520 jmp 0x35500 movq 0x28(%rsp), %rax movl (%rax), %eax movl %eax, 0x8c(%rsp) jmp 0x3552e movq 0x28(%rsp), %rax movl (%rax), %eax movl %eax, 0x8c(%rsp) jmp 0x3552e movq 0x28(%rsp), %rax movl (%rax), %eax movl %eax, 0x8c(%rsp) movq 0x58(%rsp), %rcx movl 0x8c(%rsp), %eax movl %eax, 0x74(%rsp) addq $0x44, %rcx movl 0x74(%rsp), %eax movq %rcx, 0xc8(%rsp) movl %eax, 0xc4(%rsp) movl $0x5, 0xc0(%rsp) movq 0xc8(%rsp), %rax movq %rax, 0x18(%rsp) movl 0xc0(%rsp), %eax movl 0xc4(%rsp), %ecx movl %ecx, 0xbc(%rsp) decl %eax movl %eax, %ecx movq %rcx, 0x20(%rsp) subl $0x4, %eax ja 0x355a5 movq 0x20(%rsp), %rax leaq 0xd7c88(%rip), %rcx # 0x10d224 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x18(%rsp), %rcx movl 0xbc(%rsp), %eax xchgl %eax, (%rcx) movl %eax, 0xb8(%rsp) jmp 0x35616 movq 0x18(%rsp), %rcx movl 0xbc(%rsp), %eax xchgl %eax, (%rcx) movl %eax, 0xb8(%rsp) jmp 0x35616 movq 0x18(%rsp), %rcx movl 0xbc(%rsp), %eax xchgl %eax, (%rcx) movl %eax, 0xb8(%rsp) jmp 0x35616 movq 0x18(%rsp), %rcx movl 0xbc(%rsp), %eax xchgl %eax, (%rcx) movl %eax, 0xb8(%rsp) jmp 0x35616 movq 0x18(%rsp), %rcx movl 0xbc(%rsp), %eax xchgl %eax, (%rcx) movl %eax, 0xb8(%rsp) movl 0xb8(%rsp), %eax movl %eax, 0x70(%rsp) movq 0x78(%rsp), %rcx addq $0x44, %rcx movl 0x70(%rsp), %eax movq %rcx, 0xf8(%rsp) movl %eax, 0xf4(%rsp) movl $0x5, 0xf0(%rsp) movq 0xf8(%rsp), %rax movq %rax, 0x8(%rsp) movl 0xf0(%rsp), %edi movl $0xffff, %esi # imm = 0xFFFF callq 0x23ba0 movl %eax, 0xec(%rsp) movl 0xf0(%rsp), %eax movl %eax, 0x14(%rsp) movl 0xf4(%rsp), %ecx movl %ecx, 0xe8(%rsp) subl $0x3, %eax je 0x356a8 jmp 0x3568d movl 0x14(%rsp), %eax subl $0x5, %eax je 0x356b8 jmp 0x35698 movq 0x8(%rsp), %rax movl 0xe8(%rsp), %ecx movl %ecx, (%rax) jmp 0x356c6 movq 0x8(%rsp), %rax movl 0xe8(%rsp), %ecx movl %ecx, (%rax) jmp 0x356c6 movq 0x8(%rsp), %rcx movl 0xe8(%rsp), %eax xchgl %eax, (%rcx) movq 0x58(%rsp), %rdi addq $0x48, %rdi movq 0x78(%rsp), %rsi addq $0x48, %rsi callq 0x3a5b0 movq 0x58(%rsp), %rdi addq $0x68, %rdi movq 0x78(%rsp), %rsi addq $0x68, %rsi callq 0x3a610 jmp 0x356f6 addq $0x118, %rsp # imm = 0x118 retq movq %rax, %rdi callq 0x1b6b0 nopw %cs:(%rax,%rax)
_ZN6spdlog6logger4swapERS0_: sub rsp, 118h mov [rsp+118h+var_98], rdi mov [rsp+118h+var_A0], rsi mov rdi, [rsp+118h+var_98] mov [rsp+118h+var_C0], rdi add rdi, 8 mov rsi, [rsp+118h+var_A0] add rsi, 8 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4swapERS4_; std::string::swap(std::string&) mov rdi, [rsp+118h+var_C0] add rdi, 28h ; '(' mov rsi, [rsp+118h+var_A0] add rsi, 28h ; '(' call _ZNSt6vectorISt10shared_ptrIN6spdlog5sinks4sinkEESaIS4_EE4swapERS6_; std::vector<std::shared_ptr<spdlog::sinks::sink>>::swap(std::vector<std::shared_ptr<spdlog::sinks::sink>>&) mov rax, [rsp+118h+var_A0] add rax, 40h ; '@' mov [rsp+118h+var_68], rax mov [rsp+118h+var_6C], 5 mov rax, [rsp+118h+var_68] mov [rsp+118h+var_B8], rax mov edi, [rsp+118h+var_6C] mov esi, 0FFFFh call _ZStanSt12memory_orderSt23__memory_order_modifier; std::operator&(std::memory_order,std::__memory_order_modifier) mov [rsp+118h+var_70], eax mov eax, [rsp+118h+var_6C] mov [rsp+118h+var_AC], eax dec eax sub eax, 2 jb short loc_352EA jmp short $+2 loc_352CF: mov eax, [rsp+118h+var_AC] sub eax, 5 jz short loc_352FA jmp short $+2 loc_352DA: mov rax, [rsp+118h+var_B8] mov eax, [rax] mov [rsp+118h+var_74], eax jmp short loc_35308 loc_352EA: mov rax, [rsp+118h+var_B8] mov eax, [rax] mov [rsp+118h+var_74], eax jmp short loc_35308 loc_352FA: mov rax, [rsp+118h+var_B8] mov eax, [rax] mov [rsp+118h+var_74], eax loc_35308: mov rcx, [rsp+118h+var_C0] mov eax, [rsp+118h+var_74] mov [rsp+118h+var_A4], eax add rcx, 40h ; '@' mov eax, [rsp+118h+var_A4] mov [rsp+118h+var_38], rcx mov [rsp+118h+var_3C], eax mov [rsp+118h+var_40], 5 mov rax, [rsp+118h+var_38] mov [rsp+118h+var_D0], rax mov eax, [rsp+118h+var_40] mov ecx, [rsp+118h+var_3C] mov [rsp+118h+var_44], ecx dec eax; switch 5 cases mov ecx, eax mov [rsp+118h+var_C8], rcx sub eax, 4 ja short def_3537D; jumptable 000000000003537D default case mov rax, [rsp+118h+var_C8] lea rcx, jpt_3537D movsxd rax, ds:(jpt_3537D - 10D210h)[rcx+rax*4] add rax, rcx jmp rax; switch jump def_3537D: mov rcx, [rsp+118h+var_D0]; jumptable 000000000003537D default case mov eax, [rsp+118h+var_44] xchg eax, [rcx] mov [rsp+118h+var_48], eax jmp short loc_353F0 loc_35396: mov rcx, [rsp+118h+var_D0]; jumptable 000000000003537D cases 1,2 mov eax, [rsp+118h+var_44] xchg eax, [rcx] mov [rsp+118h+var_48], eax jmp short loc_353F0 loc_353AD: mov rcx, [rsp+118h+var_D0]; jumptable 000000000003537D case 3 mov eax, [rsp+118h+var_44] xchg eax, [rcx] mov [rsp+118h+var_48], eax jmp short loc_353F0 loc_353C4: mov rcx, [rsp+118h+var_D0]; jumptable 000000000003537D case 4 mov eax, [rsp+118h+var_44] xchg eax, [rcx] mov [rsp+118h+var_48], eax jmp short loc_353F0 loc_353DB: mov rcx, [rsp+118h+var_D0]; jumptable 000000000003537D case 5 mov eax, [rsp+118h+var_44] xchg eax, [rcx] mov [rsp+118h+var_48], eax loc_353F0: mov eax, [rsp+118h+var_48] mov [rsp+118h+var_A8], eax mov rcx, [rsp+118h+var_A0] add rcx, 40h ; '@' mov eax, [rsp+118h+var_A8] mov [rsp+118h+var_8], rcx mov [rsp+118h+var_C], eax mov [rsp+118h+var_10], 5 mov rax, [rsp+118h+var_8] mov [rsp+118h+var_E0], rax mov edi, [rsp+118h+var_10] mov esi, 0FFFFh call _ZStanSt12memory_orderSt23__memory_order_modifier; std::operator&(std::memory_order,std::__memory_order_modifier) mov [rsp+118h+var_14], eax mov eax, [rsp+118h+var_10] mov [rsp+118h+var_D4], eax mov ecx, [rsp+118h+var_C] mov [rsp+118h+var_18], ecx sub eax, 3 jz short loc_35482 jmp short $+2 loc_35467: mov eax, [rsp+118h+var_D4] sub eax, 5 jz short loc_35492 jmp short $+2 loc_35472: mov rax, [rsp+118h+var_E0] mov ecx, [rsp+118h+var_18] mov [rax], ecx jmp short loc_354A0 loc_35482: mov rax, [rsp+118h+var_E0] mov ecx, [rsp+118h+var_18] mov [rax], ecx jmp short loc_354A0 loc_35492: mov rcx, [rsp+118h+var_E0] mov eax, [rsp+118h+var_18] xchg eax, [rcx] loc_354A0: mov rax, [rsp+118h+var_A0] add rax, 44h ; 'D' mov [rsp+118h+var_80], rax mov [rsp+118h+var_84], 5 mov rax, [rsp+118h+var_80] mov [rsp+118h+var_F0], rax mov edi, [rsp+118h+var_84] mov esi, 0FFFFh call _ZStanSt12memory_orderSt23__memory_order_modifier; std::operator&(std::memory_order,std::__memory_order_modifier) mov [rsp+118h+var_88], eax mov eax, [rsp+118h+var_84] mov [rsp+118h+var_E4], eax dec eax sub eax, 2 jb short loc_35510 jmp short $+2 loc_354F5: mov eax, [rsp+118h+var_E4] sub eax, 5 jz short loc_35520 jmp short $+2 loc_35500: mov rax, [rsp+118h+var_F0] mov eax, [rax] mov [rsp+118h+var_8C], eax jmp short loc_3552E loc_35510: mov rax, [rsp+118h+var_F0] mov eax, [rax] mov [rsp+118h+var_8C], eax jmp short loc_3552E loc_35520: mov rax, [rsp+118h+var_F0] mov eax, [rax] mov [rsp+118h+var_8C], eax loc_3552E: mov rcx, [rsp+118h+var_C0] mov eax, [rsp+118h+var_8C] mov [rsp+118h+var_A4], eax add rcx, 44h ; 'D' mov eax, [rsp+118h+var_A4] mov [rsp+118h+var_50], rcx mov [rsp+118h+var_54], eax mov [rsp+118h+var_58], 5 mov rax, [rsp+118h+var_50] mov [rsp+118h+var_100], rax mov eax, [rsp+118h+var_58] mov ecx, [rsp+118h+var_54] mov [rsp+118h+var_5C], ecx dec eax; switch 5 cases mov ecx, eax mov [rsp+118h+var_F8], rcx sub eax, 4 ja short def_355A3; jumptable 00000000000355A3 default case mov rax, [rsp+118h+var_F8] lea rcx, jpt_355A3 movsxd rax, ds:(jpt_355A3 - 10D224h)[rcx+rax*4] add rax, rcx jmp rax; switch jump def_355A3: mov rcx, [rsp+118h+var_100]; jumptable 00000000000355A3 default case mov eax, [rsp+118h+var_5C] xchg eax, [rcx] mov [rsp+118h+var_60], eax jmp short loc_35616 loc_355BC: mov rcx, [rsp+118h+var_100]; jumptable 00000000000355A3 cases 1,2 mov eax, [rsp+118h+var_5C] xchg eax, [rcx] mov [rsp+118h+var_60], eax jmp short loc_35616 loc_355D3: mov rcx, [rsp+118h+var_100]; jumptable 00000000000355A3 case 3 mov eax, [rsp+118h+var_5C] xchg eax, [rcx] mov [rsp+118h+var_60], eax jmp short loc_35616 loc_355EA: mov rcx, [rsp+118h+var_100]; jumptable 00000000000355A3 case 4 mov eax, [rsp+118h+var_5C] xchg eax, [rcx] mov [rsp+118h+var_60], eax jmp short loc_35616 loc_35601: mov rcx, [rsp+118h+var_100]; jumptable 00000000000355A3 case 5 mov eax, [rsp+118h+var_5C] xchg eax, [rcx] mov [rsp+118h+var_60], eax loc_35616: mov eax, [rsp+118h+var_60] mov [rsp+118h+var_A8], eax mov rcx, [rsp+118h+var_A0] add rcx, 44h ; 'D' mov eax, [rsp+118h+var_A8] mov [rsp+118h+var_20], rcx mov [rsp+118h+var_24], eax mov [rsp+118h+var_28], 5 mov rax, [rsp+118h+var_20] mov [rsp+118h+var_110], rax mov edi, [rsp+118h+var_28] mov esi, 0FFFFh call _ZStanSt12memory_orderSt23__memory_order_modifier; std::operator&(std::memory_order,std::__memory_order_modifier) mov [rsp+118h+var_2C], eax mov eax, [rsp+118h+var_28] mov [rsp+118h+var_104], eax mov ecx, [rsp+118h+var_24] mov [rsp+118h+var_30], ecx sub eax, 3 jz short loc_356A8 jmp short $+2 loc_3568D: mov eax, [rsp+118h+var_104] sub eax, 5 jz short loc_356B8 jmp short $+2 loc_35698: mov rax, [rsp+118h+var_110] mov ecx, [rsp+118h+var_30] mov [rax], ecx jmp short loc_356C6 loc_356A8: mov rax, [rsp+118h+var_110] mov ecx, [rsp+118h+var_30] mov [rax], ecx jmp short loc_356C6 loc_356B8: mov rcx, [rsp+118h+var_110] mov eax, [rsp+118h+var_30] xchg eax, [rcx] loc_356C6: mov rdi, [rsp+118h+var_C0] add rdi, 48h ; 'H' mov rsi, [rsp+118h+var_A0] add rsi, 48h ; 'H' call _ZNSt8functionIFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE4swapERS9_; std::function<void ()(std::string const&)>::swap(std::function<void ()(std::string const&)>&) mov rdi, [rsp+118h+var_C0] add rdi, 68h ; 'h' mov rsi, [rsp+118h+var_A0] add rsi, 68h ; 'h' call _ZSt4swapIN6spdlog7details10backtracerEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS6_ESt18is_move_assignableIS6_EEE5valueEvE4typeERS6_SF_ jmp short $+2 loc_356F6: add rsp, 118h retn mov rdi, rax call __clang_call_terminate
long long spdlog::logger::swap(spdlog::logger *this, spdlog::logger *a2) { int v2; // edx int v3; // ecx int v4; // r8d int v5; // r9d __int32 v7; // [rsp+F4h] [rbp-24h] __int32 v8; // [rsp+10Ch] [rbp-Ch] std::string::swap((char *)this + 8, (char *)a2 + 8); std::vector<std::shared_ptr<spdlog::sinks::sink>>::swap((char *)this + 40, (char *)a2 + 40); std::operator&(5u, 0xFFFF); v8 = _InterlockedExchange((volatile __int32 *)this + 16, *((_DWORD *)a2 + 16)); std::operator&(5u, 0xFFFF); _InterlockedExchange((volatile __int32 *)a2 + 16, v8); std::operator&(5u, 0xFFFF); v7 = _InterlockedExchange((volatile __int32 *)this + 17, *((_DWORD *)a2 + 17)); std::operator&(5u, 0xFFFF); _InterlockedExchange((volatile __int32 *)a2 + 17, v7); std::function<void ()(std::string const&)>::swap((char *)this + 72, (char *)a2 + 72); return std::swap<spdlog::details::backtracer>((int)this + 104, (int)a2 + 104, v2, v3, v4, v5); }
swap: SUB RSP,0x118 MOV qword ptr [RSP + 0x80],RDI MOV qword ptr [RSP + 0x78],RSI MOV RDI,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x58],RDI ADD RDI,0x8 MOV RSI,qword ptr [RSP + 0x78] ADD RSI,0x8 CALL 0x0013a220 MOV RDI,qword ptr [RSP + 0x58] ADD RDI,0x28 MOV RSI,qword ptr [RSP + 0x78] ADD RSI,0x28 CALL 0x0013a550 MOV RAX,qword ptr [RSP + 0x78] ADD RAX,0x40 MOV qword ptr [RSP + 0xb0],RAX MOV dword ptr [RSP + 0xac],0x5 MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0x60],RAX MOV EDI,dword ptr [RSP + 0xac] MOV ESI,0xffff CALL 0x00123ba0 MOV dword ptr [RSP + 0xa8],EAX MOV EAX,dword ptr [RSP + 0xac] MOV dword ptr [RSP + 0x6c],EAX DEC EAX SUB EAX,0x2 JC 0x001352ea JMP 0x001352cf LAB_001352cf: MOV EAX,dword ptr [RSP + 0x6c] SUB EAX,0x5 JZ 0x001352fa JMP 0x001352da LAB_001352da: MOV RAX,qword ptr [RSP + 0x60] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0xa4],EAX JMP 0x00135308 LAB_001352ea: MOV RAX,qword ptr [RSP + 0x60] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0xa4],EAX JMP 0x00135308 LAB_001352fa: MOV RAX,qword ptr [RSP + 0x60] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0xa4],EAX LAB_00135308: MOV RCX,qword ptr [RSP + 0x58] MOV EAX,dword ptr [RSP + 0xa4] MOV dword ptr [RSP + 0x74],EAX ADD RCX,0x40 MOV EAX,dword ptr [RSP + 0x74] MOV qword ptr [RSP + 0xe0],RCX MOV dword ptr [RSP + 0xdc],EAX MOV dword ptr [RSP + 0xd8],0x5 MOV RAX,qword ptr [RSP + 0xe0] MOV qword ptr [RSP + 0x48],RAX MOV EAX,dword ptr [RSP + 0xd8] MOV ECX,dword ptr [RSP + 0xdc] MOV dword ptr [RSP + 0xd4],ECX DEC EAX MOV ECX,EAX MOV qword ptr [RSP + 0x50],RCX SUB EAX,0x4 JA 0x0013537f MOV RAX,qword ptr [RSP + 0x50] LEA RCX,[0x20d210] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX JMP RAX LAB_0013537f: MOV RCX,qword ptr [RSP + 0x48] MOV EAX,dword ptr [RSP + 0xd4] XCHG dword ptr [RCX],EAX MOV dword ptr [RSP + 0xd0],EAX JMP 0x001353f0 LAB_001353f0: MOV EAX,dword ptr [RSP + 0xd0] MOV dword ptr [RSP + 0x70],EAX MOV RCX,qword ptr [RSP + 0x78] ADD RCX,0x40 MOV EAX,dword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x110],RCX MOV dword ptr [RSP + 0x10c],EAX MOV dword ptr [RSP + 0x108],0x5 MOV RAX,qword ptr [RSP + 0x110] MOV qword ptr [RSP + 0x38],RAX MOV EDI,dword ptr [RSP + 0x108] MOV ESI,0xffff CALL 0x00123ba0 MOV dword ptr [RSP + 0x104],EAX MOV EAX,dword ptr [RSP + 0x108] MOV dword ptr [RSP + 0x44],EAX MOV ECX,dword ptr [RSP + 0x10c] MOV dword ptr [RSP + 0x100],ECX SUB EAX,0x3 JZ 0x00135482 JMP 0x00135467 LAB_00135467: MOV EAX,dword ptr [RSP + 0x44] SUB EAX,0x5 JZ 0x00135492 JMP 0x00135472 LAB_00135472: MOV RAX,qword ptr [RSP + 0x38] MOV ECX,dword ptr [RSP + 0x100] MOV dword ptr [RAX],ECX JMP 0x001354a0 LAB_00135482: MOV RAX,qword ptr [RSP + 0x38] MOV ECX,dword ptr [RSP + 0x100] MOV dword ptr [RAX],ECX JMP 0x001354a0 LAB_00135492: MOV RCX,qword ptr [RSP + 0x38] MOV EAX,dword ptr [RSP + 0x100] XCHG dword ptr [RCX],EAX LAB_001354a0: MOV RAX,qword ptr [RSP + 0x78] ADD RAX,0x44 MOV qword ptr [RSP + 0x98],RAX MOV dword ptr [RSP + 0x94],0x5 MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x28],RAX MOV EDI,dword ptr [RSP + 0x94] MOV ESI,0xffff CALL 0x00123ba0 MOV dword ptr [RSP + 0x90],EAX MOV EAX,dword ptr [RSP + 0x94] MOV dword ptr [RSP + 0x34],EAX DEC EAX SUB EAX,0x2 JC 0x00135510 JMP 0x001354f5 LAB_001354f5: MOV EAX,dword ptr [RSP + 0x34] SUB EAX,0x5 JZ 0x00135520 JMP 0x00135500 LAB_00135500: MOV RAX,qword ptr [RSP + 0x28] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x8c],EAX JMP 0x0013552e LAB_00135510: MOV RAX,qword ptr [RSP + 0x28] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x8c],EAX JMP 0x0013552e LAB_00135520: MOV RAX,qword ptr [RSP + 0x28] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x8c],EAX LAB_0013552e: MOV RCX,qword ptr [RSP + 0x58] MOV EAX,dword ptr [RSP + 0x8c] MOV dword ptr [RSP + 0x74],EAX ADD RCX,0x44 MOV EAX,dword ptr [RSP + 0x74] MOV qword ptr [RSP + 0xc8],RCX MOV dword ptr [RSP + 0xc4],EAX MOV dword ptr [RSP + 0xc0],0x5 MOV RAX,qword ptr [RSP + 0xc8] MOV qword ptr [RSP + 0x18],RAX MOV EAX,dword ptr [RSP + 0xc0] MOV ECX,dword ptr [RSP + 0xc4] MOV dword ptr [RSP + 0xbc],ECX DEC EAX MOV ECX,EAX MOV qword ptr [RSP + 0x20],RCX SUB EAX,0x4 JA 0x001355a5 MOV RAX,qword ptr [RSP + 0x20] LEA RCX,[0x20d224] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX JMP RAX LAB_001355a5: MOV RCX,qword ptr [RSP + 0x18] MOV EAX,dword ptr [RSP + 0xbc] XCHG dword ptr [RCX],EAX MOV dword ptr [RSP + 0xb8],EAX JMP 0x00135616 LAB_00135616: MOV EAX,dword ptr [RSP + 0xb8] MOV dword ptr [RSP + 0x70],EAX MOV RCX,qword ptr [RSP + 0x78] ADD RCX,0x44 MOV EAX,dword ptr [RSP + 0x70] MOV qword ptr [RSP + 0xf8],RCX MOV dword ptr [RSP + 0xf4],EAX MOV dword ptr [RSP + 0xf0],0x5 MOV RAX,qword ptr [RSP + 0xf8] MOV qword ptr [RSP + 0x8],RAX MOV EDI,dword ptr [RSP + 0xf0] MOV ESI,0xffff CALL 0x00123ba0 MOV dword ptr [RSP + 0xec],EAX MOV EAX,dword ptr [RSP + 0xf0] MOV dword ptr [RSP + 0x14],EAX MOV ECX,dword ptr [RSP + 0xf4] MOV dword ptr [RSP + 0xe8],ECX SUB EAX,0x3 JZ 0x001356a8 JMP 0x0013568d LAB_0013568d: MOV EAX,dword ptr [RSP + 0x14] SUB EAX,0x5 JZ 0x001356b8 JMP 0x00135698 LAB_00135698: MOV RAX,qword ptr [RSP + 0x8] MOV ECX,dword ptr [RSP + 0xe8] MOV dword ptr [RAX],ECX JMP 0x001356c6 LAB_001356a8: MOV RAX,qword ptr [RSP + 0x8] MOV ECX,dword ptr [RSP + 0xe8] MOV dword ptr [RAX],ECX JMP 0x001356c6 LAB_001356b8: MOV RCX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSP + 0xe8] XCHG dword ptr [RCX],EAX LAB_001356c6: MOV RDI,qword ptr [RSP + 0x58] ADD RDI,0x48 MOV RSI,qword ptr [RSP + 0x78] ADD RSI,0x48 CALL 0x0013a5b0 MOV RDI,qword ptr [RSP + 0x58] ADD RDI,0x68 MOV RSI,qword ptr [RSP + 0x78] ADD RSI,0x68 LAB_001356ef: CALL 0x0013a610 JMP 0x001356f6 LAB_001356f6: ADD RSP,0x118 RET
/* WARNING: Removing unreachable block (ram,0x001355a5) */ /* WARNING: Removing unreachable block (ram,0x0013568b) */ /* WARNING: Removing unreachable block (ram,0x001356b8) */ /* WARNING: Removing unreachable block (ram,0x00135696) */ /* WARNING: Removing unreachable block (ram,0x001354fe) */ /* WARNING: Removing unreachable block (ram,0x0013537f) */ /* WARNING: Removing unreachable block (ram,0x00135465) */ /* WARNING: Removing unreachable block (ram,0x00135492) */ /* WARNING: Removing unreachable block (ram,0x00135470) */ /* WARNING: Removing unreachable block (ram,0x001352d8) */ /* WARNING: Removing unreachable block (ram,0x001352ea) */ /* WARNING: Removing unreachable block (ram,0x00135482) */ /* WARNING: Removing unreachable block (ram,0x001354a0) */ /* WARNING: Removing unreachable block (ram,0x001354f3) */ /* WARNING: Removing unreachable block (ram,0x00135520) */ /* WARNING: Removing unreachable block (ram,0x00135510) */ /* WARNING: Removing unreachable block (ram,0x0013552e) */ /* WARNING: Removing unreachable block (ram,0x00135590) */ /* WARNING: Removing unreachable block (ram,0x001356a8) */ /* WARNING: Removing unreachable block (ram,0x001356c6) */ /* spdlog::logger::swap(spdlog::logger&) */ void __thiscall spdlog::logger::swap(logger *this,logger *param_1) { std::__cxx11::string::swap((string *)(this + 8),(string *)(param_1 + 8)); std:: vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>> ::swap((vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>> *)(this + 0x28),(vector *)(param_1 + 0x28)); std::operator&(5,0xffff); /* WARNING: Could not recover jumptable at 0x0013537d. Too many branches */ /* WARNING: Treating indirect jump as call */ (*(code *)(&DAT_0020d210 + DAT_0020d220))(); return; }
5,567
convert_to_printable(char*, unsigned long, char const*, unsigned long, charset_info_st const*, unsigned long)
eloqsql/sql/sql_string.cc
uint convert_to_printable(char *to, size_t to_len, const char *from, size_t from_len, CHARSET_INFO *from_cs, size_t nbytes /*= 0*/) { /* needs at least 8 bytes for '\xXX...' and zero byte */ DBUG_ASSERT(to_len >= 8); char *t= to; char *t_end= to + to_len - 1; // '- 1' is for the '\0' at the end const char *f= from; const char *f_end= from + (nbytes ? MY_MIN(from_len, nbytes) : from_len); char *dots= to; // last safe place to append '...' if (!f || t == t_end) return 0; for (; t < t_end && f < f_end; f++) { /* If the source string is ASCII compatible (mbminlen==1) and the source character is in ASCII printable range (0x20..0x7F), then display the character as is. Otherwise, if the source string is not ASCII compatible (e.g. UCS2), or the source character is not in the printable range, then print the character using HEX notation. */ if (((unsigned char) *f) >= 0x20 && ((unsigned char) *f) <= 0x7F && from_cs->mbminlen == 1) { *t++= *f; } else { if (t_end - t < 4) // \xXX break; *t++= '\\'; *t++= 'x'; APPEND_HEX(t, *f); } if (t_end - t >= 3) // '...' dots= t; } if (f < from + from_len) memcpy(dots, STRING_WITH_LEN("...\0")); else *t= '\0'; return (uint) (t - to); }
O0
cpp
convert_to_printable(char*, unsigned long, char const*, unsigned long, charset_info_st const*, unsigned long): pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) jmp 0x296f5 movq -0x10(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax addq $-0x1, %rax movq %rax, -0x48(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x68(%rbp) cmpq $0x0, -0x38(%rbp) je 0x2974a movq -0x28(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x29738 movq -0x28(%rbp), %rax movq %rax, -0x70(%rbp) jmp 0x29740 movq -0x38(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x70(%rbp), %rax movq %rax, -0x78(%rbp) jmp 0x29752 movq -0x28(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x68(%rbp), %rax movq -0x78(%rbp), %rcx addq %rcx, %rax movq %rax, -0x58(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x60(%rbp) cmpq $0x0, -0x50(%rbp) je 0x2977a movq -0x40(%rbp), %rax cmpq -0x48(%rbp), %rax jne 0x29786 movl $0x0, -0x4(%rbp) jmp 0x29896 jmp 0x29788 movq -0x40(%rbp), %rcx xorl %eax, %eax cmpq -0x48(%rbp), %rcx movb %al, -0x79(%rbp) jae 0x297a5 movq -0x50(%rbp), %rax cmpq -0x58(%rbp), %rax setb %al movb %al, -0x79(%rbp) movb -0x79(%rbp), %al testb $0x1, %al jne 0x297b1 jmp 0x29862 movq -0x50(%rbp), %rax movzbl (%rax), %eax cmpl $0x20, %eax jl 0x297ef movq -0x50(%rbp), %rax movzbl (%rax), %eax cmpl $0x7f, %eax jg 0x297ef movq -0x30(%rbp), %rax cmpl $0x1, 0x98(%rax) jne 0x297ef movq -0x50(%rbp), %rax movb (%rax), %cl movq -0x40(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x40(%rbp) movb %cl, (%rax) jmp 0x29836 movq -0x48(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax cmpq $0x4, %rax jge 0x29802 jmp 0x29862 movq -0x40(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x40(%rbp) movb $0x5c, (%rax) movq -0x40(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x40(%rbp) movb $0x78, (%rax) movq -0x50(%rbp), %rax leaq -0x40(%rbp), %rdi movzbl (%rax), %esi callq 0x27490 movq -0x48(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax cmpq $0x3, %rax jl 0x2984f movq -0x40(%rbp), %rax movq %rax, -0x60(%rbp) jmp 0x29851 movq -0x50(%rbp), %rax addq $0x1, %rax movq %rax, -0x50(%rbp) jmp 0x29788 movq -0x50(%rbp), %rax movq -0x20(%rbp), %rcx addq -0x28(%rbp), %rcx cmpq %rcx, %rax jae 0x29881 movq -0x60(%rbp), %rax movl 0x650f5(%rip), %ecx # 0x8e972 movl %ecx, (%rax) jmp 0x29888 movq -0x40(%rbp), %rax movb $0x0, (%rax) movq -0x40(%rbp), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_Z20convert_to_printablePcmPKcmPK15charset_info_stm: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_38], r9 jmp short $+2 loc_296F5: mov rax, [rbp+var_10] mov [rbp+var_40], rax mov rax, [rbp+var_10] add rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_48], rax mov rax, [rbp+var_20] mov [rbp+var_50], rax mov rax, [rbp+var_20] mov [rbp+var_68], rax cmp [rbp+var_38], 0 jz short loc_2974A mov rax, [rbp+var_28] cmp rax, [rbp+var_38] jnb short loc_29738 mov rax, [rbp+var_28] mov [rbp+var_70], rax jmp short loc_29740 loc_29738: mov rax, [rbp+var_38] mov [rbp+var_70], rax loc_29740: mov rax, [rbp+var_70] mov [rbp+var_78], rax jmp short loc_29752 loc_2974A: mov rax, [rbp+var_28] mov [rbp+var_78], rax loc_29752: mov rax, [rbp+var_68] mov rcx, [rbp+var_78] add rax, rcx mov [rbp+var_58], rax mov rax, [rbp+var_10] mov [rbp+var_60], rax cmp [rbp+var_50], 0 jz short loc_2977A mov rax, [rbp+var_40] cmp rax, [rbp+var_48] jnz short loc_29786 loc_2977A: mov [rbp+var_4], 0 jmp loc_29896 loc_29786: jmp short $+2 loc_29788: mov rcx, [rbp+var_40] xor eax, eax cmp rcx, [rbp+var_48] mov [rbp+var_79], al jnb short loc_297A5 mov rax, [rbp+var_50] cmp rax, [rbp+var_58] setb al mov [rbp+var_79], al loc_297A5: mov al, [rbp+var_79] test al, 1 jnz short loc_297B1 jmp loc_29862 loc_297B1: mov rax, [rbp+var_50] movzx eax, byte ptr [rax] cmp eax, 20h ; ' ' jl short loc_297EF mov rax, [rbp+var_50] movzx eax, byte ptr [rax] cmp eax, 7Fh jg short loc_297EF mov rax, [rbp+var_30] cmp dword ptr [rax+98h], 1 jnz short loc_297EF mov rax, [rbp+var_50] mov cl, [rax] mov rax, [rbp+var_40] mov rdx, rax add rdx, 1 mov [rbp+var_40], rdx mov [rax], cl jmp short loc_29836 loc_297EF: mov rax, [rbp+var_48] mov rcx, [rbp+var_40] sub rax, rcx cmp rax, 4 jge short loc_29802 jmp short loc_29862 loc_29802: mov rax, [rbp+var_40] mov rcx, rax add rcx, 1 mov [rbp+var_40], rcx mov byte ptr [rax], 5Ch ; '\' mov rax, [rbp+var_40] mov rcx, rax add rcx, 1 mov [rbp+var_40], rcx mov byte ptr [rax], 78h ; 'x' mov rax, [rbp+var_50] lea rdi, [rbp+var_40]; char ** movzx esi, byte ptr [rax]; unsigned __int8 call _ZL10APPEND_HEXRPch; APPEND_HEX(char *&,uchar) loc_29836: mov rax, [rbp+var_48] mov rcx, [rbp+var_40] sub rax, rcx cmp rax, 3 jl short loc_2984F mov rax, [rbp+var_40] mov [rbp+var_60], rax loc_2984F: jmp short $+2 loc_29851: mov rax, [rbp+var_50] add rax, 1 mov [rbp+var_50], rax jmp loc_29788 loc_29862: mov rax, [rbp+var_50] mov rcx, [rbp+var_20] add rcx, [rbp+var_28] cmp rax, rcx jnb short loc_29881 mov rax, [rbp+var_60] mov ecx, cs:dword_8E972 mov [rax], ecx jmp short loc_29888 loc_29881: mov rax, [rbp+var_40] mov byte ptr [rax], 0 loc_29888: mov rax, [rbp+var_40] mov rcx, [rbp+var_10] sub rax, rcx mov [rbp+var_4], eax loc_29896: mov eax, [rbp+var_4] add rsp, 80h pop rbp retn
long long convert_to_printable( char *a1, long long a2, char *a3, unsigned long long a4, const charset_info_st *a5, unsigned long long a6) { unsigned __int8 v6; // cl char *v7; // rax char *v8; // rax char *v9; // rax bool v11; // [rsp+7h] [rbp-79h] unsigned long long v12; // [rsp+8h] [rbp-78h] unsigned long long v13; // [rsp+10h] [rbp-70h] char *v14; // [rsp+20h] [rbp-60h] const char *v15; // [rsp+28h] [rbp-58h] unsigned __int8 *v16; // [rsp+30h] [rbp-50h] char *v17; // [rsp+38h] [rbp-48h] char *v18; // [rsp+40h] [rbp-40h] BYREF unsigned long long v19; // [rsp+48h] [rbp-38h] const charset_info_st *v20; // [rsp+50h] [rbp-30h] unsigned long long v21; // [rsp+58h] [rbp-28h] const char *v22; // [rsp+60h] [rbp-20h] long long v23; // [rsp+68h] [rbp-18h] char *v24; // [rsp+70h] [rbp-10h] v24 = a1; v23 = a2; v22 = a3; v21 = a4; v20 = a5; v19 = a6; v18 = a1; v17 = &a1[a2 - 1]; v16 = (unsigned __int8 *)a3; if ( a6 ) { if ( v21 >= v19 ) v13 = v19; else v13 = v21; v12 = v13; } else { v12 = v21; } v15 = &a3[v12]; v14 = v24; if ( a3 && v18 != v17 ) { while ( 1 ) { v11 = 0; if ( v18 < v17 ) v11 = v16 < (unsigned __int8 *)v15; if ( !v11 ) break; if ( *v16 >= 0x20u && *v16 <= 0x7Fu && *((_DWORD *)v20 + 38) == 1 ) { v6 = *v16; v7 = v18++; *v7 = v6; } else { if ( v17 - v18 < 4 ) break; v8 = v18++; *v8 = 92; v9 = v18++; *v9 = 120; APPEND_HEX(&v18, *v16); } if ( v17 - v18 >= 3 ) v14 = v18; ++v16; } if ( v16 >= (unsigned __int8 *)&v22[v21] ) *v18 = 0; else *(_DWORD *)v14 = 3026478; return (unsigned int)((_DWORD)v18 - (_DWORD)v24); } else { return 0; } }
convert_to_printable: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 JMP 0x001296f5 LAB_001296f5: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] ADD RAX,-0x1 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x68],RAX CMP qword ptr [RBP + -0x38],0x0 JZ 0x0012974a MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x38] JNC 0x00129738 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x70],RAX JMP 0x00129740 LAB_00129738: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x70],RAX LAB_00129740: MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x78],RAX JMP 0x00129752 LAB_0012974a: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x78],RAX LAB_00129752: MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x78] ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x60],RAX CMP qword ptr [RBP + -0x50],0x0 JZ 0x0012977a MOV RAX,qword ptr [RBP + -0x40] CMP RAX,qword ptr [RBP + -0x48] JNZ 0x00129786 LAB_0012977a: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00129896 LAB_00129786: JMP 0x00129788 LAB_00129788: MOV RCX,qword ptr [RBP + -0x40] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x48] MOV byte ptr [RBP + -0x79],AL JNC 0x001297a5 MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x58] SETC AL MOV byte ptr [RBP + -0x79],AL LAB_001297a5: MOV AL,byte ptr [RBP + -0x79] TEST AL,0x1 JNZ 0x001297b1 JMP 0x00129862 LAB_001297b1: MOV RAX,qword ptr [RBP + -0x50] MOVZX EAX,byte ptr [RAX] CMP EAX,0x20 JL 0x001297ef MOV RAX,qword ptr [RBP + -0x50] MOVZX EAX,byte ptr [RAX] CMP EAX,0x7f JG 0x001297ef MOV RAX,qword ptr [RBP + -0x30] CMP dword ptr [RAX + 0x98],0x1 JNZ 0x001297ef MOV RAX,qword ptr [RBP + -0x50] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x40] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x40],RDX MOV byte ptr [RAX],CL JMP 0x00129836 LAB_001297ef: MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX CMP RAX,0x4 JGE 0x00129802 JMP 0x00129862 LAB_00129802: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x40],RCX MOV byte ptr [RAX],0x5c MOV RAX,qword ptr [RBP + -0x40] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x40],RCX MOV byte ptr [RAX],0x78 MOV RAX,qword ptr [RBP + -0x50] LEA RDI,[RBP + -0x40] MOVZX ESI,byte ptr [RAX] CALL 0x00127490 LAB_00129836: MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX CMP RAX,0x3 JL 0x0012984f MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x60],RAX LAB_0012984f: JMP 0x00129851 LAB_00129851: MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x1 MOV qword ptr [RBP + -0x50],RAX JMP 0x00129788 LAB_00129862: MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x20] ADD RCX,qword ptr [RBP + -0x28] CMP RAX,RCX JNC 0x00129881 MOV RAX,qword ptr [RBP + -0x60] MOV ECX,dword ptr [0x0018e972] MOV dword ptr [RAX],ECX JMP 0x00129888 LAB_00129881: MOV RAX,qword ptr [RBP + -0x40] MOV byte ptr [RAX],0x0 LAB_00129888: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,RCX MOV dword ptr [RBP + -0x4],EAX LAB_00129896: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x80 POP RBP RET
/* convert_to_printable(char*, unsigned long, char const*, unsigned long, charset_info_st const*, unsigned long) */ int convert_to_printable (char *param_1,ulong param_2,char *param_3,ulong param_4,charset_info_st *param_5, ulong param_6) { byte *pbVar1; byte *pbVar2; ulong local_80; ulong local_78; byte *local_68; byte *local_58; byte *local_48; ulong local_40; charset_info_st *local_38; ulong local_30; char *local_28; ulong local_20; char *local_18; int local_c; pbVar1 = (byte *)(param_1 + (param_2 - 1)); local_80 = param_4; if (param_6 != 0) { local_78 = param_6; if (param_4 < param_6) { local_78 = param_4; } local_80 = local_78; } if ((param_3 == (char *)0x0) || (local_68 = (byte *)param_1, local_58 = (byte *)param_3, local_48 = (byte *)param_1, local_40 = param_6, local_38 = param_5, local_30 = param_4, local_28 = param_3, local_20 = param_2, local_18 = param_1, (byte *)param_1 == pbVar1)) { local_c = 0; } else { for (; local_48 < pbVar1 && local_58 < param_3 + local_80; local_58 = local_58 + 1) { if (((*local_58 < 0x20) || (0x7f < *local_58)) || (*(int *)(local_38 + 0x98) != 1)) { if ((long)pbVar1 - (long)local_48 < 4) break; pbVar2 = local_48 + 1; *local_48 = 0x5c; local_48 = local_48 + 2; *pbVar2 = 0x78; APPEND_HEX((char **)&local_48,*local_58); } else { *local_48 = *local_58; local_48 = local_48 + 1; } if (2 < (long)pbVar1 - (long)local_48) { local_68 = local_48; } } if (local_58 < local_28 + local_30) { *(int4 *)local_68 = DAT_0018e972; } else { *local_48 = 0; } local_c = (int)local_48 - (int)local_18; } return local_c; }
5,568
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator=(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>)
monkey531[P]llama/common/json.hpp
basic_json& operator=(basic_json other) noexcept ( std::is_nothrow_move_constructible<value_t>::value&& std::is_nothrow_move_assignable<value_t>::value&& std::is_nothrow_move_constructible<json_value>::value&& std::is_nothrow_move_assignable<json_value>::value&& std::is_nothrow_move_assignable<json_base_class_t>::value ) { // check that passed value is valid other.assert_invariant(); using std::swap; swap(m_data.m_type, other.m_data.m_type); swap(m_data.m_value, other.m_data.m_value); json_base_class_t::operator=(std::move(other)); set_parents(); assert_invariant(); return *this; }
O0
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator=(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>): subq $0x28, %rsp movq %rsi, (%rsp) movq %rdi, %rax movq (%rsp), %rdi movq %rdi, 0x8(%rsp) movq %rax, 0x20(%rsp) movq %rdi, 0x18(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x10(%rsp) movl $0x1, %esi callq 0x9fda0 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdi callq 0xba390 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdi addq $0x8, %rdi addq $0x8, %rsi callq 0xba3c0 movq 0x10(%rsp), %rdi callq 0xae910 movq 0x10(%rsp), %rdi movl $0x1, %esi callq 0x9fda0 movq 0x10(%rsp), %rax addq $0x28, %rsp retq nopl (%rax,%rax)
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_: sub rsp, 28h mov [rsp+28h+var_28], rsi mov rax, rdi mov rdi, [rsp+28h+var_28] mov [rsp+28h+var_20], rdi mov [rsp+28h+var_8], rax mov [rsp+28h+var_10], rdi mov rax, [rsp+28h+var_8] mov [rsp+28h+var_18], rax mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rsi, [rsp+28h+var_20] mov rdi, [rsp+28h+var_18] call _ZSt4swapIN8nlohmann16json_abi_v3_11_36detail7value_tEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS7_ESt18is_move_assignableIS7_EEE5valueEvE4typeERS7_SG_ mov rsi, [rsp+28h+var_20] mov rdi, [rsp+28h+var_18] add rdi, 8 add rsi, 8 call _ZSt4swapIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvE10json_valueEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleISJ_ESt18is_move_assignableISJ_EEE5valueEvE4typeERSJ_SS_ mov rdi, [rsp+28h+var_18] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE11set_parentsEv; 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>::set_parents(void) mov rdi, [rsp+28h+var_18] mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rax, [rsp+28h+var_18] add rsp, 28h retn
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(a2); std::swap<nlohmann::json_abi_v3_11_3::detail::value_t>(a1, a2); std::swap<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>::json_value>( a1 + 8, a2 + 8); 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>::set_parents(a1); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(a1); return a1; }
operator=: SUB RSP,0x28 MOV qword ptr [RSP],RSI MOV RAX,RDI MOV RDI,qword ptr [RSP] MOV qword ptr [RSP + 0x8],RDI MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x18],RDI MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x10],RAX MOV ESI,0x1 CALL 0x0019fda0 MOV RSI,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP + 0x10] CALL 0x001ba390 MOV RSI,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x8 ADD RSI,0x8 CALL 0x001ba3c0 MOV RDI,qword ptr [RSP + 0x10] CALL 0x001ae910 MOV RDI,qword ptr [RSP + 0x10] MOV ESI,0x1 CALL 0x0019fda0 MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0x28 RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::TEMPNAMEPLACEHOLDERVALUE(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>) */ basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> * __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,value_t *param_2) { assert_invariant(SUB81(param_2,0)); std::swap<nlohmann::json_abi_v3_11_3::detail::value_t>(this,param_2); std:: swap<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>::json_value> ((json_value *)(this + 8),(json_value *)(param_2 + 8)); set_parents(); assert_invariant(SUB81(this,0)); return this; }
5,569
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 0xc04c0 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 0xc3b31 movl -0x24(%rbp), %eax addq $0x30, %rsp popq %rbp retq callq 0x2a270 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_C3B31 mov eax, [rbp+var_24] add rsp, 30h pop rbp retn loc_C3B31: 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 0x001c04c0 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 0x001c3b31 MOV EAX,dword ptr [RBP + -0x24] ADD RSP,0x30 POP RBP RET LAB_001c3b31: CALL 0x0012a270
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(); }
5,570
minja::Parser::consumeToken(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::SpaceHandling)
monkey531[P]llama/common/minja.hpp
std::string consumeToken(const std::string & token, SpaceHandling space_handling = SpaceHandling::Strip) { auto start = it; consumeSpaces(space_handling); if (std::distance(it, end) >= (int64_t) token.size() && std::string(it, it + token.size()) == token) { it += token.size(); return token; } it = start; return ""; }
O1
cpp
minja::Parser::consumeToken(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::SpaceHandling): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movq 0x20(%rsi), %rax movq %rax, (%rsp) movq %rsi, %rdi movl %ecx, %esi callq 0x92952 movq 0x18(%r15), %rbp movq 0x20(%r15), %rsi subq %rsi, %rbp movq 0x8(%r14), %r13 cmpq %r13, %rbp jl 0x9209c leaq (%rsi,%r13), %rdx leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x8(%rsp), %r12 movq %r12, %rdi callq 0x7dbe8 movq 0x8(%r12), %rdx cmpq 0x8(%r14), %rdx jne 0x9209c testq %rdx, %rdx je 0x92116 movq (%r14), %rsi movq 0x8(%rsp), %rdi callq 0x1b930 testl %eax, %eax sete %r12b jmp 0x9209f xorl %r12d, %r12d cmpq %r13, %rbp jl 0x920bf leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x920bf movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8f0 testb %r12b, %r12b je 0x920e3 movq 0x8(%r14), %rdx addq %rdx, 0x20(%r15) leaq 0x10(%rbx), %rax movq %rax, (%rbx) movq (%r14), %rsi addq %rsi, %rdx movq %rbx, %rdi callq 0x2d612 jmp 0x92104 movq (%rsp), %rax movq %rax, 0x20(%r15) leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x69ba3(%rip), %rdx # 0xfbc9c movq %rbx, %rdi movq %rdx, %rsi callq 0x2d748 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movb $0x1, %r12b jmp 0x9209f
_ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14, rdx mov r15, rsi mov rbx, rdi mov rax, [rsi+20h] mov [rsp+58h+var_58], rax mov rdi, rsi mov esi, ecx call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling) mov rbp, [r15+18h] mov rsi, [r15+20h] sub rbp, rsi mov r13, [r14+8] cmp rbp, r13 jl short loc_9209C lea rdx, [rsi+r13] lea rax, [rsp+58h+var_40] mov [rax-10h], rax lea r12, [rsp+58h+var_50] mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag) mov rdx, [r12+8] cmp rdx, [r14+8] jnz short loc_9209C test rdx, rdx jz loc_92116 mov rsi, [r14] mov rdi, [rsp+58h+var_50] call _bcmp test eax, eax setz r12b jmp short loc_9209F loc_9209C: xor r12d, r12d loc_9209F: cmp rbp, r13 jl short loc_920BF lea rax, [rsp+58h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_920BF mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_920BF: test r12b, r12b jz short loc_920E3 mov rdx, [r14+8] add [r15+20h], rdx lea rax, [rbx+10h] mov [rbx], rax mov rsi, [r14] add rdx, rsi mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) jmp short loc_92104 loc_920E3: mov rax, [rsp+58h+var_58] mov [r15+20h], rax lea rax, [rbx+10h] mov [rbx], rax lea rdx, aErrorWhileHand_0+34h; "" mov rdi, rbx mov rsi, rdx 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) loc_92104: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_92116: mov r12b, 1 jmp short loc_9209F
_QWORD * minja::Parser::consumeToken(_QWORD *a1, long long a2, _BYTE **a3, unsigned int a4) { _BYTE *v6; // rsi long long v7; // rbp _BYTE *v8; // r13 bool v9; // r12 _BYTE *v10; // rdx long long v12; // [rsp+0h] [rbp-58h] _QWORD *v13; // [rsp+8h] [rbp-50h] BYREF _BYTE *v14; // [rsp+10h] [rbp-48h] _QWORD v15[8]; // [rsp+18h] [rbp-40h] BYREF v12 = *(_QWORD *)(a2 + 32); minja::Parser::consumeSpaces(a2, a4); v6 = *(_BYTE **)(a2 + 32); v7 = *(_QWORD *)(a2 + 24) - (_QWORD)v6; v8 = a3[1]; if ( v7 >= (long long)v8 && (v13 = v15, std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>( &v13, v6, (long long)&v8[(_QWORD)v6]), v14 == a3[1]) ) { if ( v14 ) v9 = (unsigned int)bcmp(v13, *a3) == 0; else v9 = 1; } else { v9 = 0; } if ( v7 >= (long long)v8 && v13 != v15 ) operator delete(v13, v15[0] + 1LL); if ( v9 ) { v10 = a3[1]; *(_QWORD *)(a2 + 32) += v10; *a1 = a1 + 2; std::string::_M_construct<char *>(a1, *a3, (long long)&v10[(_QWORD)*a3]); } else { *(_QWORD *)(a2 + 32) = v12; *a1 = a1 + 2; std::string::_M_construct<char const*>(a1, "", (long long)""); } return a1; }
consumeToken: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV RAX,qword ptr [RSI + 0x20] MOV qword ptr [RSP],RAX MOV RDI,RSI MOV ESI,ECX CALL 0x00192952 MOV RBP,qword ptr [R15 + 0x18] MOV RSI,qword ptr [R15 + 0x20] SUB RBP,RSI MOV R13,qword ptr [R14 + 0x8] CMP RBP,R13 JL 0x0019209c LEA RDX,[RSI + R13*0x1] LEA RAX,[RSP + 0x18] MOV qword ptr [RAX + -0x10],RAX LEA R12,[RSP + 0x8] MOV RDI,R12 CALL 0x0017dbe8 MOV RDX,qword ptr [R12 + 0x8] CMP RDX,qword ptr [R14 + 0x8] JNZ 0x0019209c TEST RDX,RDX JZ 0x00192116 MOV RSI,qword ptr [R14] MOV RDI,qword ptr [RSP + 0x8] CALL 0x0011b930 TEST EAX,EAX SETZ R12B JMP 0x0019209f LAB_0019209c: XOR R12D,R12D LAB_0019209f: CMP RBP,R13 JL 0x001920bf LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001920bf MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b8f0 LAB_001920bf: TEST R12B,R12B JZ 0x001920e3 MOV RDX,qword ptr [R14 + 0x8] ADD qword ptr [R15 + 0x20],RDX LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX MOV RSI,qword ptr [R14] ADD RDX,RSI MOV RDI,RBX CALL 0x0012d612 JMP 0x00192104 LAB_001920e3: MOV RAX,qword ptr [RSP] MOV qword ptr [R15 + 0x20],RAX LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RDX,[0x1fbc9c] MOV RDI,RBX MOV RSI,RDX CALL 0x0012d748 LAB_00192104: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00192116: MOV R12B,0x1 JMP 0x0019209f
/* minja::Parser::consumeToken(std::__cxx11::string const&, minja::SpaceHandling) */ long * minja::Parser::consumeToken(long *param_1,Parser *param_2,long *param_3,int4 param_4) { int8 uVar1; long lVar2; long lVar3; long lVar4; int iVar5; bool bVar6; long *local_50; size_t local_48; long local_40 [2]; uVar1 = *(int8 *)(param_2 + 0x20); consumeSpaces(param_2,param_4); lVar2 = *(long *)(param_2 + 0x18); lVar3 = *(long *)(param_2 + 0x20); lVar4 = param_3[1]; if (lVar4 <= lVar2 - lVar3) { local_50 = local_40; std::__cxx11::string:: _M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>> (&local_50,lVar3,lVar3 + lVar4); if (local_48 == param_3[1]) { if (local_48 == 0) { bVar6 = true; } else { iVar5 = bcmp(local_50,(void *)*param_3,local_48); bVar6 = iVar5 == 0; } goto LAB_0019209f; } } bVar6 = false; LAB_0019209f: if ((lVar4 <= lVar2 - lVar3) && (local_50 != local_40)) { operator_delete(local_50,local_40[0] + 1); } if (bVar6) { lVar2 = param_3[1]; *(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + lVar2; *param_1 = (long)(param_1 + 2); std::__cxx11::string::_M_construct<char*>(param_1,*param_3,lVar2 + *param_3); } else { *(int8 *)(param_2 + 0x20) = uVar1; *param_1 = (long)(param_1 + 2); std::__cxx11::string::_M_construct<char_const*>(param_1,""); } return param_1; }
5,571
my_strntoull_8bit
eloqsql/strings/ctype-simple.c
ulonglong my_strntoull_8bit(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative; register ulonglong cutoff; register uint cutlim; register ulonglong i; register const char *s, *e; const char *save; int overflow; *err= 0; /* Initialize error indicator */ s = nptr; e = nptr+l; for(; s<e && my_isspace(cs,*s); s++); if (s == e) { goto noconv; } if (*s == '-') { negative = 1; ++s; } else if (*s == '+') { negative = 0; ++s; } else negative = 0; save = s; cutoff = (~(ulonglong) 0) / (unsigned long int) base; cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base); overflow = 0; i = 0; for ( ; s != e; s++) { register uchar c= *s; if (c>='0' && c<='9') c -= '0'; else if (c>='A' && c<='Z') c = c - 'A' + 10; else if (c>='a' && c<='z') c = c - 'a' + 10; else break; if (c >= base) break; if (i > cutoff || (i == cutoff && c > cutlim)) overflow = 1; else { i *= (ulonglong) base; i += c; } } if (s == save) goto noconv; if (endptr != NULL) *endptr = (char *) s; if (overflow) { err[0]= ERANGE; return (~(ulonglong) 0); } return (negative ? -((longlong) i) : (longlong) i); noconv: err[0]= EDOM; if (endptr != NULL) *endptr = (char *) nptr; return 0L; }
O3
c
my_strntoull_8bit: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl $0x0, (%r9) leaq (%rsi,%rdx), %r11 movq %rsi, %r10 testq %rdx, %rdx jle 0x94e65 movq 0x40(%rdi), %rax movq %rsi, %r10 movzbl (%r10), %edx testb $0x8, 0x1(%rax,%rdx) je 0x94e65 incq %r10 cmpq %r11, %r10 jb 0x94e52 cmpq %r11, %r10 je 0x94f4d movb (%r10), %dil leal -0x2b(%rdi), %eax andb $-0x3, %al cmpb $0x1, %al adcq $0x0, %r10 movslq %ecx, %rbx movq $-0x1, %rax xorl %edx, %edx movq %rbx, -0x38(%rbp) divq %rbx xorl %r12d, %r12d cmpq %r11, %r10 je 0x94f2a movq %rdi, -0x30(%rbp) movq %r10, %r14 xorl %r15d, %r15d movq %r15, %rdi movl %r12d, %r13d movb (%r14), %r12b leal -0x30(%r12), %ebx cmpb $0xa, %bl jb 0x94ed9 leal -0x41(%r12), %ebx cmpb $0x19, %bl ja 0x94ec8 addb $-0x37, %r12b jmp 0x94ed6 leal -0x61(%r12), %ebx cmpb $0x19, %bl ja 0x94f18 addb $-0x57, %r12b movl %r12d, %ebx movzbl %bl, %ebx cmpl %ecx, %ebx jge 0x94f18 movl $0x1, %r12d cmpq %rax, %rdi jbe 0x94ef0 movq %rdi, %r15 jmp 0x94f07 jne 0x94ef9 movq %rax, %r15 cmpl %edx, %ebx ja 0x94f07 imulq -0x38(%rbp), %rdi movl %ebx, %r15d addq %rdi, %r15 movl %r13d, %r12d incq %r14 cmpq %r11, %r14 jne 0x94ea5 movq %r15, %rdi movq %r11, %r14 movl %r12d, %r13d testl %r13d, %r13d sete %al movq %rdi, %r12 movq %r14, %r11 movq -0x30(%rbp), %rdi jmp 0x94f2c movb $0x1, %al cmpq %r10, %r11 je 0x94f4d testq %r8, %r8 je 0x94f39 movq %r11, (%r8) testb %al, %al je 0x94f60 movq %r12, %rax negq %rax cmpb $0x2d, %dil cmovneq %r12, %rax jmp 0x94f6e movl $0x21, (%r9) testq %r8, %r8 je 0x94f5c movq %rsi, (%r8) xorl %eax, %eax jmp 0x94f6e movl $0x22, (%r9) movq $-0x1, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strntoull_8bit: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx mov dword ptr [r9], 0 lea r11, [rsi+rdx] mov r10, rsi test rdx, rdx jle short loc_94E65 mov rax, [rdi+40h] mov r10, rsi loc_94E52: movzx edx, byte ptr [r10] test byte ptr [rax+rdx+1], 8 jz short loc_94E65 inc r10 cmp r10, r11 jb short loc_94E52 loc_94E65: cmp r10, r11 jz loc_94F4D mov dil, [r10] lea eax, [rdi-2Bh] and al, 0FDh cmp al, 1 adc r10, 0 movsxd rbx, ecx mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx mov [rbp+var_38], rbx div rbx xor r12d, r12d cmp r10, r11 jz loc_94F2A mov [rbp+var_30], rdi mov r14, r10 xor r15d, r15d loc_94EA5: mov rdi, r15 mov r13d, r12d mov r12b, [r14] lea ebx, [r12-30h] cmp bl, 0Ah jb short loc_94ED9 lea ebx, [r12-41h] cmp bl, 19h ja short loc_94EC8 add r12b, 0C9h jmp short loc_94ED6 loc_94EC8: lea ebx, [r12-61h] cmp bl, 19h ja short loc_94F18 add r12b, 0A9h loc_94ED6: mov ebx, r12d loc_94ED9: movzx ebx, bl cmp ebx, ecx jge short loc_94F18 mov r12d, 1 cmp rdi, rax jbe short loc_94EF0 mov r15, rdi jmp short loc_94F07 loc_94EF0: jnz short loc_94EF9 mov r15, rax cmp ebx, edx ja short loc_94F07 loc_94EF9: imul rdi, [rbp+var_38] mov r15d, ebx add r15, rdi mov r12d, r13d loc_94F07: inc r14 cmp r14, r11 jnz short loc_94EA5 mov rdi, r15 mov r14, r11 mov r13d, r12d loc_94F18: test r13d, r13d setz al mov r12, rdi mov r11, r14 mov rdi, [rbp+var_30] jmp short loc_94F2C loc_94F2A: mov al, 1 loc_94F2C: cmp r11, r10 jz short loc_94F4D test r8, r8 jz short loc_94F39 mov [r8], r11 loc_94F39: test al, al jz short loc_94F60 mov rax, r12 neg rax cmp dil, 2Dh ; '-' cmovnz rax, r12 jmp short loc_94F6E loc_94F4D: mov dword ptr [r9], 21h ; '!' test r8, r8 jz short loc_94F5C mov [r8], rsi loc_94F5C: xor eax, eax jmp short loc_94F6E loc_94F60: mov dword ptr [r9], 22h ; '"' mov rax, 0FFFFFFFFFFFFFFFFh loc_94F6E: pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strntoull_8bit( long long a1, unsigned __int8 *a2, long long a3, int a4, unsigned __int8 **a5, _DWORD *a6) { unsigned __int8 *v6; // r11 unsigned __int8 *v7; // r10 unsigned __int8 v8; // di unsigned __int8 *v9; // r10 unsigned long long v10; // rax unsigned long long v11; // r12 unsigned __int8 *v12; // r14 unsigned long long v13; // r15 unsigned long long v14; // rdi int v15; // r13d unsigned __int8 v16; // r12 unsigned __int8 v17; // bl unsigned __int8 v18; // r12 bool v19; // al long long result; // rax unsigned __int8 v21; // [rsp+8h] [rbp-30h] *a6 = 0; v6 = &a2[a3]; v7 = a2; if ( a3 > 0 ) { v7 = a2; do { if ( (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v7 + 1LL) & 8) == 0 ) break; ++v7; } while ( v7 < v6 ); } if ( v7 == v6 ) goto LABEL_30; v8 = *v7; v9 = &v7[((*v7 - 43) & 0xFD) == 0]; v10 = 0xFFFFFFFFFFFFFFFFLL / a4; v11 = 0LL; if ( v9 == v6 ) { v19 = 1; } else { v21 = v8; v12 = v9; v13 = 0LL; while ( 1 ) { v14 = v13; v15 = v11; v16 = *v12; v17 = *v12 - 48; if ( v17 >= 0xAu ) { if ( (unsigned __int8)(v16 - 65) > 0x19u ) { if ( (unsigned __int8)(v16 - 97) > 0x19u ) break; v18 = v16 - 87; } else { v18 = v16 - 55; } v17 = v18; } if ( v17 >= a4 ) break; LODWORD(v11) = 1; if ( v13 <= v10 ) { if ( v13 != v10 || (v13 = 0xFFFFFFFFFFFFFFFFLL / a4, v17 <= (unsigned int)(0xFFFFFFFFFFFFFFFFLL % a4)) ) { v13 = a4 * v14 + v17; LODWORD(v11) = v15; } } if ( ++v12 == v6 ) { v14 = v13; v12 = &a2[a3]; v15 = v11; break; } } v19 = v15 == 0; v11 = v14; v6 = v12; v8 = v21; } if ( v6 == v9 ) { LABEL_30: *a6 = 33; if ( a5 ) *a5 = a2; return 0LL; } else { if ( a5 ) *a5 = v6; if ( v19 ) { result = -(long long)v11; if ( v8 != 45 ) return v11; } else { *a6 = 34; return -1LL; } } return result; }
my_strntoull_8bit: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV dword ptr [R9],0x0 LEA R11,[RSI + RDX*0x1] MOV R10,RSI TEST RDX,RDX JLE 0x00194e65 MOV RAX,qword ptr [RDI + 0x40] MOV R10,RSI LAB_00194e52: MOVZX EDX,byte ptr [R10] TEST byte ptr [RAX + RDX*0x1 + 0x1],0x8 JZ 0x00194e65 INC R10 CMP R10,R11 JC 0x00194e52 LAB_00194e65: CMP R10,R11 JZ 0x00194f4d MOV DIL,byte ptr [R10] LEA EAX,[RDI + -0x2b] AND AL,0xfd CMP AL,0x1 ADC R10,0x0 MOVSXD RBX,ECX MOV RAX,-0x1 XOR EDX,EDX MOV qword ptr [RBP + -0x38],RBX DIV RBX XOR R12D,R12D CMP R10,R11 JZ 0x00194f2a MOV qword ptr [RBP + -0x30],RDI MOV R14,R10 XOR R15D,R15D LAB_00194ea5: MOV RDI,R15 MOV R13D,R12D MOV R12B,byte ptr [R14] LEA EBX,[R12 + -0x30] CMP BL,0xa JC 0x00194ed9 LEA EBX,[R12 + -0x41] CMP BL,0x19 JA 0x00194ec8 ADD R12B,0xc9 JMP 0x00194ed6 LAB_00194ec8: LEA EBX,[R12 + -0x61] CMP BL,0x19 JA 0x00194f18 ADD R12B,0xa9 LAB_00194ed6: MOV EBX,R12D LAB_00194ed9: MOVZX EBX,BL CMP EBX,ECX JGE 0x00194f18 MOV R12D,0x1 CMP RDI,RAX JBE 0x00194ef0 MOV R15,RDI JMP 0x00194f07 LAB_00194ef0: JNZ 0x00194ef9 MOV R15,RAX CMP EBX,EDX JA 0x00194f07 LAB_00194ef9: IMUL RDI,qword ptr [RBP + -0x38] MOV R15D,EBX ADD R15,RDI MOV R12D,R13D LAB_00194f07: INC R14 CMP R14,R11 JNZ 0x00194ea5 MOV RDI,R15 MOV R14,R11 MOV R13D,R12D LAB_00194f18: TEST R13D,R13D SETZ AL MOV R12,RDI MOV R11,R14 MOV RDI,qword ptr [RBP + -0x30] JMP 0x00194f2c LAB_00194f2a: MOV AL,0x1 LAB_00194f2c: CMP R11,R10 JZ 0x00194f4d TEST R8,R8 JZ 0x00194f39 MOV qword ptr [R8],R11 LAB_00194f39: TEST AL,AL JZ 0x00194f60 MOV RAX,R12 NEG RAX CMP DIL,0x2d CMOVNZ RAX,R12 JMP 0x00194f6e LAB_00194f4d: MOV dword ptr [R9],0x21 TEST R8,R8 JZ 0x00194f5c MOV qword ptr [R8],RSI LAB_00194f5c: XOR EAX,EAX JMP 0x00194f6e LAB_00194f60: MOV dword ptr [R9],0x22 MOV RAX,-0x1 LAB_00194f6e: POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong my_strntoull_8bit(long param_1,byte *param_2,long param_3,int param_4,ulong *param_5, int4 *param_6) { byte bVar1; byte bVar2; int1 auVar3 [16]; int1 auVar4 [16]; ulong uVar5; ulong uVar6; ulong uVar7; byte *pbVar8; byte *pbVar9; byte bVar10; ulong uVar11; ulong uVar12; int iVar13; byte *pbVar14; bool bVar15; *param_6 = 0; pbVar9 = param_2 + param_3; pbVar8 = param_2; if (0 < param_3) { do { if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*pbVar8) & 8) == 0) break; pbVar8 = pbVar8 + 1; } while (pbVar8 < pbVar9); } if (pbVar8 != pbVar9) { bVar1 = *pbVar8; pbVar8 = pbVar8 + ((bVar1 - 0x2b & 0xfd) == 0); auVar3._8_8_ = 0; auVar3._0_8_ = (long)param_4; auVar4 = ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff); uVar6 = SUB168(auVar4 / auVar3,0); uVar7 = 0; if (pbVar8 == pbVar9) { bVar15 = true; } else { uVar11 = uVar7; pbVar14 = pbVar8; uVar7 = 0; do { iVar13 = (int)uVar11; bVar2 = *pbVar14; bVar10 = bVar2 - 0x30; if (9 < bVar10) { if ((byte)(bVar2 + 0xbf) < 0x1a) { bVar10 = bVar2 - 0x37; } else { if (0x19 < (byte)(bVar2 + 0x9f)) goto LAB_00194f18; bVar10 = bVar2 + 0xa9; } } if (param_4 <= (int)(uint)bVar10) goto LAB_00194f18; uVar12 = 1; uVar5 = uVar7; if ((uVar7 <= uVar6) && ((uVar7 != uVar6 || (uVar5 = uVar6, (uint)bVar10 <= SUB164(auVar4 % auVar3,0))))) { uVar12 = uVar11; uVar5 = (ulong)bVar10 + uVar7 * (long)param_4; } uVar7 = uVar5; pbVar14 = pbVar14 + 1; uVar11 = uVar12; } while (pbVar14 != pbVar9); iVar13 = (int)uVar12; pbVar14 = pbVar9; LAB_00194f18: pbVar9 = pbVar14; bVar15 = iVar13 == 0; } if (pbVar9 != pbVar8) { if (param_5 != (ulong *)0x0) { *param_5 = (ulong)pbVar9; } if (bVar15) { if (bVar1 == 0x2d) { return -uVar7; } return uVar7; } *param_6 = 0x22; return 0xffffffffffffffff; } } *param_6 = 0x21; if (param_5 != (ulong *)0x0) { *param_5 = (ulong)param_2; } return 0; }
5,572
my_strnncoll_latin1_de
eloqsql/strings/ctype-latin1.c
static int my_strnncoll_latin1_de(CHARSET_INFO *cs __attribute__((unused)), const uchar *a, size_t a_length, const uchar *b, size_t b_length, my_bool b_is_prefix) { const uchar *a_end= a + a_length; const uchar *b_end= b + b_length; uchar a_char, a_extend= 0, b_char, b_extend= 0; while ((a < a_end || a_extend) && (b < b_end || b_extend)) { if (a_extend) { a_char=a_extend; a_extend=0; } else { a_extend=combo2map[*a]; a_char=combo1map[*a++]; } if (b_extend) { b_char=b_extend; b_extend=0; } else { b_extend=combo2map[*b]; b_char=combo1map[*b++]; } if (a_char != b_char) return (int) a_char - (int) b_char; } /* A simple test of string lengths won't work -- we test to see which string ran out first */ return ((a < a_end || a_extend) ? (b_is_prefix ? 0 : 1) : (b < b_end || b_extend) ? -1 : 0); }
O0
c
my_strnncoll_latin1_de: pushq %rbp movq %rsp, %rbp movb %r9b, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movb %al, -0x31(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x28(%rbp), %rax addq -0x30(%rbp), %rax movq %rax, -0x48(%rbp) movb $0x0, -0x4a(%rbp) movb $0x0, -0x4c(%rbp) movq -0x18(%rbp), %rax cmpq -0x40(%rbp), %rax jb 0x3fdb6 movzbl -0x4a(%rbp), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x4d(%rbp) je 0x3fdd8 movq -0x28(%rbp), %rcx movb $0x1, %al cmpq -0x48(%rbp), %rcx movb %al, -0x4e(%rbp) jb 0x3fdd2 movzbl -0x4c(%rbp), %eax cmpl $0x0, %eax setne %al movb %al, -0x4e(%rbp) movb -0x4e(%rbp), %al movb %al, -0x4d(%rbp) movb -0x4d(%rbp), %al testb $0x1, %al jne 0x3fde4 jmp 0x3fe96 cmpb $0x0, -0x4a(%rbp) je 0x3fdf6 movb -0x4a(%rbp), %al movb %al, -0x49(%rbp) movb $0x0, -0x4a(%rbp) jmp 0x3fe2d movq -0x18(%rbp), %rax movzbl (%rax), %eax movl %eax, %ecx leaq 0xffc2a(%rip), %rax # 0x13fa30 movb (%rax,%rcx), %al movb %al, -0x4a(%rbp) movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) movzbl (%rax), %eax movl %eax, %ecx leaq 0xffb09(%rip), %rax # 0x13f930 movb (%rax,%rcx), %al movb %al, -0x49(%rbp) cmpb $0x0, -0x4c(%rbp) je 0x3fe3f movb -0x4c(%rbp), %al movb %al, -0x4b(%rbp) movb $0x0, -0x4c(%rbp) jmp 0x3fe76 movq -0x28(%rbp), %rax movzbl (%rax), %eax movl %eax, %ecx leaq 0xffbe1(%rip), %rax # 0x13fa30 movb (%rax,%rcx), %al movb %al, -0x4c(%rbp) movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movzbl (%rax), %eax movl %eax, %ecx leaq 0xffac0(%rip), %rax # 0x13f930 movb (%rax,%rcx), %al movb %al, -0x4b(%rbp) movzbl -0x49(%rbp), %eax movzbl -0x4b(%rbp), %ecx cmpl %ecx, %eax je 0x3fe91 movzbl -0x49(%rbp), %eax movzbl -0x4b(%rbp), %ecx subl %ecx, %eax movl %eax, -0x4(%rbp) jmp 0x3fef4 jmp 0x3fd9e movq -0x18(%rbp), %rax cmpq -0x40(%rbp), %rax jb 0x3fea9 movzbl -0x4a(%rbp), %eax cmpl $0x0, %eax je 0x3febf movsbl -0x31(%rbp), %edx movl $0x1, %eax xorl %ecx, %ecx cmpl $0x0, %edx cmovnel %ecx, %eax movl %eax, -0x54(%rbp) jmp 0x3feee movq -0x28(%rbp), %rcx movb $0x1, %al cmpq -0x48(%rbp), %rcx movb %al, -0x55(%rbp) jb 0x3fedb movzbl -0x4c(%rbp), %eax cmpl $0x0, %eax setne %al movb %al, -0x55(%rbp) movb -0x55(%rbp), %dl xorl %eax, %eax movl $0xffffffff, %ecx # imm = 0xFFFFFFFF testb $0x1, %dl cmovnel %ecx, %eax movl %eax, -0x54(%rbp) movl -0x54(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax)
my_strnncoll_latin1_de: push rbp mov rbp, rsp mov al, r9b mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_31], al mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_40], rax mov rax, [rbp+var_28] add rax, [rbp+var_30] mov [rbp+var_48], rax mov [rbp+var_4A], 0 mov [rbp+var_4C], 0 loc_3FD9E: mov rax, [rbp+var_18] cmp rax, [rbp+var_40] jb short loc_3FDB6 movzx ecx, [rbp+var_4A] xor eax, eax cmp ecx, 0 mov [rbp+var_4D], al jz short loc_3FDD8 loc_3FDB6: mov rcx, [rbp+var_28] mov al, 1 cmp rcx, [rbp+var_48] mov [rbp+var_4E], al jb short loc_3FDD2 movzx eax, [rbp+var_4C] cmp eax, 0 setnz al mov [rbp+var_4E], al loc_3FDD2: mov al, [rbp+var_4E] mov [rbp+var_4D], al loc_3FDD8: mov al, [rbp+var_4D] test al, 1 jnz short loc_3FDE4 jmp loc_3FE96 loc_3FDE4: cmp [rbp+var_4A], 0 jz short loc_3FDF6 mov al, [rbp+var_4A] mov [rbp+var_49], al mov [rbp+var_4A], 0 jmp short loc_3FE2D loc_3FDF6: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] mov ecx, eax lea rax, combo2map mov al, [rax+rcx] mov [rbp+var_4A], al mov rax, [rbp+var_18] mov rcx, rax add rcx, 1 mov [rbp+var_18], rcx movzx eax, byte ptr [rax] mov ecx, eax lea rax, combo1map mov al, [rax+rcx] mov [rbp+var_49], al loc_3FE2D: cmp [rbp+var_4C], 0 jz short loc_3FE3F mov al, [rbp+var_4C] mov [rbp+var_4B], al mov [rbp+var_4C], 0 jmp short loc_3FE76 loc_3FE3F: mov rax, [rbp+var_28] movzx eax, byte ptr [rax] mov ecx, eax lea rax, combo2map mov al, [rax+rcx] mov [rbp+var_4C], al mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx movzx eax, byte ptr [rax] mov ecx, eax lea rax, combo1map mov al, [rax+rcx] mov [rbp+var_4B], al loc_3FE76: movzx eax, [rbp+var_49] movzx ecx, [rbp+var_4B] cmp eax, ecx jz short loc_3FE91 movzx eax, [rbp+var_49] movzx ecx, [rbp+var_4B] sub eax, ecx mov [rbp+var_4], eax jmp short loc_3FEF4 loc_3FE91: jmp loc_3FD9E loc_3FE96: mov rax, [rbp+var_18] cmp rax, [rbp+var_40] jb short loc_3FEA9 movzx eax, [rbp+var_4A] cmp eax, 0 jz short loc_3FEBF loc_3FEA9: movsx edx, [rbp+var_31] mov eax, 1 xor ecx, ecx cmp edx, 0 cmovnz eax, ecx mov [rbp+var_54], eax jmp short loc_3FEEE loc_3FEBF: mov rcx, [rbp+var_28] mov al, 1 cmp rcx, [rbp+var_48] mov [rbp+var_55], al jb short loc_3FEDB movzx eax, [rbp+var_4C] cmp eax, 0 setnz al mov [rbp+var_55], al loc_3FEDB: mov dl, [rbp+var_55] xor eax, eax mov ecx, 0FFFFFFFFh test dl, 1 cmovnz eax, ecx mov [rbp+var_54], eax loc_3FEEE: mov eax, [rbp+var_54] mov [rbp+var_4], eax loc_3FEF4: mov eax, [rbp+var_4] pop rbp retn
long long my_strnncoll_latin1_de( long long a1, unsigned __int8 *a2, long long a3, unsigned __int8 *a4, long long a5, char a6) { unsigned __int8 *v6; // rax unsigned __int8 *v7; // rax unsigned int v8; // eax bool v10; // [rsp+1h] [rbp-55h] bool v12; // [rsp+8h] [rbp-4Eh] bool v13; // [rsp+9h] [rbp-4Dh] unsigned __int8 v14; // [rsp+Ah] [rbp-4Ch] unsigned __int8 v15; // [rsp+Bh] [rbp-4Bh] unsigned __int8 v16; // [rsp+Ch] [rbp-4Ah] unsigned __int8 v17; // [rsp+Dh] [rbp-49h] unsigned long long v18; // [rsp+Eh] [rbp-48h] unsigned long long v19; // [rsp+16h] [rbp-40h] unsigned __int8 *v20; // [rsp+2Eh] [rbp-28h] unsigned __int8 *v21; // [rsp+3Eh] [rbp-18h] v21 = a2; v20 = a4; v19 = (unsigned long long)&a2[a3]; v18 = (unsigned long long)&a4[a5]; v16 = 0; v14 = 0; while ( 1 ) { if ( (unsigned long long)v21 < v19 || (v13 = 0, v16) ) { v12 = 1; if ( (unsigned long long)v20 >= v18 ) v12 = v14 != 0; v13 = v12; } if ( !v13 ) break; if ( v16 ) { v17 = v16; v16 = 0; } else { v16 = combo2map[*v21]; v6 = v21++; v17 = combo1map[*v6]; } if ( v14 ) { v15 = v14; v14 = 0; } else { v14 = combo2map[*v20]; v7 = v20++; v15 = combo1map[*v7]; } if ( v17 != v15 ) return (unsigned int)(v17 - v15); } if ( (unsigned long long)v21 < v19 || v16 ) { return a6 == 0; } else { v10 = 1; if ( (unsigned long long)v20 >= v18 ) v10 = v14 != 0; v8 = 0; if ( v10 ) v8 = -1; return v8; } }
my_strnncoll_latin1_de: PUSH RBP MOV RBP,RSP MOV AL,R9B MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV byte ptr [RBP + -0x31],AL MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x48],RAX MOV byte ptr [RBP + -0x4a],0x0 MOV byte ptr [RBP + -0x4c],0x0 LAB_0013fd9e: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x40] JC 0x0013fdb6 MOVZX ECX,byte ptr [RBP + -0x4a] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x4d],AL JZ 0x0013fdd8 LAB_0013fdb6: MOV RCX,qword ptr [RBP + -0x28] MOV AL,0x1 CMP RCX,qword ptr [RBP + -0x48] MOV byte ptr [RBP + -0x4e],AL JC 0x0013fdd2 MOVZX EAX,byte ptr [RBP + -0x4c] CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x4e],AL LAB_0013fdd2: MOV AL,byte ptr [RBP + -0x4e] MOV byte ptr [RBP + -0x4d],AL LAB_0013fdd8: MOV AL,byte ptr [RBP + -0x4d] TEST AL,0x1 JNZ 0x0013fde4 JMP 0x0013fe96 LAB_0013fde4: CMP byte ptr [RBP + -0x4a],0x0 JZ 0x0013fdf6 MOV AL,byte ptr [RBP + -0x4a] MOV byte ptr [RBP + -0x49],AL MOV byte ptr [RBP + -0x4a],0x0 JMP 0x0013fe2d LAB_0013fdf6: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x23fa30] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x4a],AL MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x23f930] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x49],AL LAB_0013fe2d: CMP byte ptr [RBP + -0x4c],0x0 JZ 0x0013fe3f MOV AL,byte ptr [RBP + -0x4c] MOV byte ptr [RBP + -0x4b],AL MOV byte ptr [RBP + -0x4c],0x0 JMP 0x0013fe76 LAB_0013fe3f: MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x23fa30] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x4c],AL MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x23f930] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x4b],AL LAB_0013fe76: MOVZX EAX,byte ptr [RBP + -0x49] MOVZX ECX,byte ptr [RBP + -0x4b] CMP EAX,ECX JZ 0x0013fe91 MOVZX EAX,byte ptr [RBP + -0x49] MOVZX ECX,byte ptr [RBP + -0x4b] SUB EAX,ECX MOV dword ptr [RBP + -0x4],EAX JMP 0x0013fef4 LAB_0013fe91: JMP 0x0013fd9e LAB_0013fe96: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x40] JC 0x0013fea9 MOVZX EAX,byte ptr [RBP + -0x4a] CMP EAX,0x0 JZ 0x0013febf LAB_0013fea9: MOVSX EDX,byte ptr [RBP + -0x31] MOV EAX,0x1 XOR ECX,ECX CMP EDX,0x0 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x54],EAX JMP 0x0013feee LAB_0013febf: MOV RCX,qword ptr [RBP + -0x28] MOV AL,0x1 CMP RCX,qword ptr [RBP + -0x48] MOV byte ptr [RBP + -0x55],AL JC 0x0013fedb MOVZX EAX,byte ptr [RBP + -0x4c] CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x55],AL LAB_0013fedb: MOV DL,byte ptr [RBP + -0x55] XOR EAX,EAX MOV ECX,0xffffffff TEST DL,0x1 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x54],EAX LAB_0013feee: MOV EAX,dword ptr [RBP + -0x54] MOV dword ptr [RBP + -0x4],EAX LAB_0013fef4: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
uint my_strnncoll_latin1_de (int8 param_1,byte *param_2,long param_3,byte *param_4,long param_5, char param_6) { uint local_5c; bool local_56; byte local_54; byte local_53; byte local_52; byte local_51; byte *local_30; byte *local_20; local_52 = 0; local_54 = 0; local_30 = param_4; local_20 = param_2; do { if ((local_20 < param_2 + param_3) || (local_56 = false, local_52 != 0)) { local_56 = local_30 < param_4 + param_5 || local_54 != 0; } if (!local_56) { if ((local_20 < param_2 + param_3) || (local_52 != 0)) { local_5c = (uint)(param_6 == '\0'); } else { local_5c = 0; if (local_30 < param_4 + param_5 || local_54 != 0) { local_5c = 0xffffffff; } } return local_5c; } if (local_52 == 0) { local_52 = combo2map[*local_20]; local_51 = combo1map[*local_20]; local_20 = local_20 + 1; } else { local_51 = local_52; local_52 = 0; } if (local_54 == 0) { local_54 = combo2map[*local_30]; local_53 = combo1map[*local_30]; local_30 = local_30 + 1; } else { local_53 = local_54; local_54 = 0; } } while (local_51 == local_53); return (uint)local_51 - (uint)local_53; }
5,573
common_log_entry::print(_IO_FILE*) const
monkey531[P]llama/common/log.cpp
void print(FILE * file = nullptr) const { FILE * fcur = file; if (!fcur) { // stderr displays DBG messages only when their verbosity level is not higher than the threshold // these messages will still be logged to a file if (level == GGML_LOG_LEVEL_DEBUG && common_log_verbosity_thold < LOG_DEFAULT_DEBUG) { return; } fcur = stdout; if (level != GGML_LOG_LEVEL_NONE) { fcur = stderr; } } if (level != GGML_LOG_LEVEL_NONE && level != GGML_LOG_LEVEL_CONT && prefix) { if (timestamp) { // [M.s.ms.us] fprintf(fcur, "%s%d.%02d.%03d.%03d%s ", g_col[COMMON_LOG_COL_BLUE], (int) (timestamp / 1000000 / 60), (int) (timestamp / 1000000 % 60), (int) (timestamp / 1000 % 1000), (int) (timestamp % 1000), g_col[COMMON_LOG_COL_DEFAULT]); } switch (level) { case GGML_LOG_LEVEL_INFO: fprintf(fcur, "%sI %s", g_col[COMMON_LOG_COL_GREEN], g_col[COMMON_LOG_COL_DEFAULT]); break; case GGML_LOG_LEVEL_WARN: fprintf(fcur, "%sW %s", g_col[COMMON_LOG_COL_MAGENTA], "" ); break; case GGML_LOG_LEVEL_ERROR: fprintf(fcur, "%sE %s", g_col[COMMON_LOG_COL_RED], "" ); break; case GGML_LOG_LEVEL_DEBUG: fprintf(fcur, "%sD %s", g_col[COMMON_LOG_COL_YELLOW], "" ); break; default: break; } } fprintf(fcur, "%s", msg.data()); if (level == GGML_LOG_LEVEL_WARN || level == GGML_LOG_LEVEL_ERROR || level == GGML_LOG_LEVEL_DEBUG) { fprintf(fcur, "%s", g_col[COMMON_LOG_COL_DEFAULT]); } fflush(fcur); }
O1
cpp
common_log_entry::print(_IO_FILE*) const: pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx testq %rsi, %rsi jne 0x80a82 movl (%rbx), %eax cmpl $0x1, %eax jne 0x80a6b leaq 0x5e590(%rip), %rcx # 0xdeff0 cmpl $0x0, (%rcx) jg 0x80a6b popq %rbx popq %r14 popq %r15 retq testl %eax, %eax jne 0x80a78 movq 0x5d4b2(%rip), %rax # 0xddf28 jmp 0x80a7f movq 0x5d521(%rip), %rax # 0xddfa0 movq (%rax), %r14 movl (%rbx), %eax testl %eax, %eax je 0x80c01 cmpl $0x5, %eax je 0x80c01 cmpb $0x1, 0x4(%rbx) jne 0x80c01 movq 0x8(%rbx), %r10 testq %r10, %r10 je 0x80b86 movq 0x5e545(%rip), %r15 # 0xdeff8 movq 0x28(%r15), %r9 movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB movq %r10, %rax imulq %rcx movq %rdx, %rcx movq %rdx, %r8 shrq $0x3f, %r8 sarq $0x12, %rcx movabsq $-0x70d59cc6bc5928d7, %rdx # imm = 0x8F2A633943A6D729 movq %r10, %rax imulq %rdx addq %rcx, %r8 leaq (%rdx,%r10), %rcx movq %rcx, %rax shrq $0x3f, %rax shrq $0x19, %rcx addl %eax, %ecx movabsq $-0x7777777777777777, %rdx # imm = 0x8888888888888889 movq %r8, %rax imulq %rdx addq %r8, %rdx movq %rdx, %rax shrq $0x3f, %rax shrq $0x5, %rdx addl %eax, %edx imull $0x3c, %edx, %eax subl %eax, %r8d movabsq $0x20c49ba5e353f7cf, %rsi # imm = 0x20C49BA5E353F7CF movq %r10, %rax imulq %rsi movq %rdx, %r11 movq %rdx, %rax shrq $0x3f, %rax sarq $0x7, %r11 addq %rax, %r11 movq %r11, %rax imulq %rsi movq %rdx, %rax shrq $0x3f, %rax shrq $0x7, %rdx addl %eax, %edx imull $0x3e8, %edx, %eax # imm = 0x3E8 imull $0x3e8, %r11d, %edx # imm = 0x3E8 subl %eax, %r11d subl %edx, %r10d leaq 0x30a6f(%rip), %rsi # 0xb15dc movq %r14, %rdi movq %r9, %rdx movl %r11d, %r9d xorl %eax, %eax pushq (%r15) pushq %r10 callq 0x18970 addq $0x10, %rsp movl (%rbx), %eax decl %eax cmpl $0x3, %eax ja 0x80c01 leaq 0x30a36(%rip), %rcx # 0xb15cc movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x5e452(%rip), %rax # 0xdeff8 movq 0x20(%rax), %rdx leaq 0x30a57(%rip), %rsi # 0xb1608 jmp 0x80bd9 movq 0x5e43e(%rip), %rax # 0xdeff8 movq 0x30(%rax), %rdx leaq 0x30a35(%rip), %rsi # 0xb15fa jmp 0x80bd9 movq 0x5e42a(%rip), %rax # 0xdeff8 movq 0x10(%rax), %rdx leaq 0x30a28(%rip), %rsi # 0xb1601 leaq 0x29165(%rip), %rcx # 0xa9d45 jmp 0x80bf7 movq 0x5e40f(%rip), %rax # 0xdeff8 movq (%rax), %rcx movq 0x18(%rax), %rdx leaq 0x309fc(%rip), %rsi # 0xb15f3 movq %r14, %rdi xorl %eax, %eax callq 0x18970 movq 0x10(%rbx), %rdi movq %r14, %rsi callq 0x18740 movl (%rbx), %eax cmpl $0x4, %eax ja 0x80c30 movl $0x1a, %ecx btl %eax, %ecx jae 0x80c30 movq 0x5e3d3(%rip), %rax # 0xdeff8 movq (%rax), %rdi movq %r14, %rsi callq 0x18740 movq %r14, %rdi popq %rbx popq %r14 popq %r15 jmp 0x187b0 nop
_ZNK16common_log_entry5printEP8_IO_FILE: push r15 push r14 push rbx mov r14, rsi mov rbx, rdi test rsi, rsi jnz short loc_80A82 mov eax, [rbx] cmp eax, 1 jnz short loc_80A6B lea rcx, common_log_verbosity_thold cmp dword ptr [rcx], 0 jg short loc_80A6B pop rbx pop r14 pop r15 retn loc_80A6B: test eax, eax jnz short loc_80A78 mov rax, cs:stdout_ptr jmp short loc_80A7F loc_80A78: mov rax, cs:stderr_ptr loc_80A7F: mov r14, [rax] loc_80A82: mov eax, [rbx] test eax, eax jz def_80B9D; jumptable 0000000000080B9D default case cmp eax, 5 jz def_80B9D; jumptable 0000000000080B9D default case cmp byte ptr [rbx+4], 1 jnz def_80B9D; jumptable 0000000000080B9D default case mov r10, [rbx+8] test r10, r10 jz loc_80B86 mov r15, cs:_ZL5g_col; g_col mov r9, [r15+28h] mov rcx, 431BDE82D7B634DBh mov rax, r10 imul rcx mov rcx, rdx mov r8, rdx shr r8, 3Fh sar rcx, 12h mov rdx, 8F2A633943A6D729h mov rax, r10 imul rdx add r8, rcx lea rcx, [rdx+r10] mov rax, rcx shr rax, 3Fh shr rcx, 19h add ecx, eax mov rdx, 8888888888888889h mov rax, r8 imul rdx add rdx, r8 mov rax, rdx shr rax, 3Fh shr rdx, 5 add edx, eax imul eax, edx, 3Ch ; '<' sub r8d, eax mov rsi, 20C49BA5E353F7CFh mov rax, r10 imul rsi mov r11, rdx mov rax, rdx shr rax, 3Fh sar r11, 7 add r11, rax mov rax, r11 imul rsi mov rax, rdx shr rax, 3Fh shr rdx, 7 add edx, eax imul eax, edx, 3E8h imul edx, r11d, 3E8h sub r11d, eax sub r10d, edx lea rsi, aSD02d03d03dS; "%s%d.%02d.%03d.%03d%s " mov rdi, r14 mov rdx, r9 mov r9d, r11d xor eax, eax push qword ptr [r15] push r10 call _fprintf add rsp, 10h loc_80B86: mov eax, [rbx] dec eax; switch 4 cases cmp eax, 3 ja short def_80B9D; jumptable 0000000000080B9D default case lea rcx, jpt_80B9D movsxd rax, ds:(jpt_80B9D - 0B15CCh)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_80B9F: mov rax, cs:_ZL5g_col; jumptable 0000000000080B9D case 1 mov rdx, [rax+20h] lea rsi, aSdS; "%sD %s" jmp short loc_80BD9 loc_80BB3: mov rax, cs:_ZL5g_col; jumptable 0000000000080B9D case 3 mov rdx, [rax+30h] lea rsi, aSwS; "%sW %s" jmp short loc_80BD9 loc_80BC7: mov rax, cs:_ZL5g_col; jumptable 0000000000080B9D case 4 mov rdx, [rax+10h] lea rsi, aSeS; "%sE %s" loc_80BD9: lea rcx, aEndIndexOutOfB+19h; "" jmp short loc_80BF7 loc_80BE2: mov rax, cs:_ZL5g_col; jumptable 0000000000080B9D case 2 mov rcx, [rax] mov rdx, [rax+18h] lea rsi, aSiS; "%sI %s" loc_80BF7: mov rdi, r14 xor eax, eax call _fprintf def_80B9D: mov rdi, [rbx+10h]; jumptable 0000000000080B9D default case mov rsi, r14 call _fputs mov eax, [rbx] cmp eax, 4 ja short loc_80C30 mov ecx, 1Ah bt ecx, eax jnb short loc_80C30 mov rax, cs:_ZL5g_col; g_col mov rdi, [rax] mov rsi, r14 call _fputs loc_80C30: mov rdi, r14 pop rbx pop r14 pop r15 jmp _fflush
long long common_log_entry::print(unsigned int *a1, long long a2) { long long v2; // r14 long long result; // rax long long *v4; // rax long long v5; // r10 long long v6; // rdx const char *v7; // rsi char *v8; // rcx int v9; // ecx v2 = a2; if ( !a2 ) { result = *a1; if ( (_DWORD)result == 1 && common_log_verbosity_thold[0] <= 0 ) return result; if ( (_DWORD)result ) v4 = (long long *)&stderr; else v4 = (long long *)&stdout; v2 = *v4; } if ( *a1 && *a1 != 5 && *((_BYTE *)a1 + 4) == 1 ) { v5 = *((_QWORD *)a1 + 1); if ( v5 ) fprintf( v2, "%s%d.%02d.%03d.%03d%s ", *(const char **)(g_col + 40), (int)v5 / 60000000, (int)(v5 / 1000000) % 60, (int)(v5 / 1000) % 1000, v5 % 1000, *(const char **)g_col); switch ( *a1 ) { case 1u: v6 = *(_QWORD *)(g_col + 32); v7 = "%sD %s"; goto LABEL_17; case 2u: v8 = *(char **)g_col; v6 = *(_QWORD *)(g_col + 24); v7 = "%sI %s"; goto LABEL_19; case 3u: v6 = *(_QWORD *)(g_col + 48); v7 = "%sW %s"; goto LABEL_17; case 4u: v6 = *(_QWORD *)(g_col + 16); v7 = "%sE %s"; LABEL_17: v8 = ""; LABEL_19: fprintf(v2, v7, v6, v8); break; default: break; } } fputs(*((_QWORD *)a1 + 2), v2); if ( *a1 <= 4 ) { v9 = 26; if ( _bittest(&v9, *a1) ) fputs(*(_QWORD *)g_col, v2); } return fflush(v2); }
print: PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI TEST RSI,RSI JNZ 0x00180a82 MOV EAX,dword ptr [RBX] CMP EAX,0x1 JNZ 0x00180a6b LEA RCX,[0x1deff0] CMP dword ptr [RCX],0x0 JG 0x00180a6b POP RBX POP R14 POP R15 RET LAB_00180a6b: TEST EAX,EAX JNZ 0x00180a78 MOV RAX,qword ptr [0x001ddf28] JMP 0x00180a7f LAB_00180a78: MOV RAX,qword ptr [0x001ddfa0] LAB_00180a7f: MOV R14,qword ptr [RAX] LAB_00180a82: MOV EAX,dword ptr [RBX] TEST EAX,EAX JZ 0x00180c01 CMP EAX,0x5 JZ 0x00180c01 CMP byte ptr [RBX + 0x4],0x1 JNZ 0x00180c01 MOV R10,qword ptr [RBX + 0x8] TEST R10,R10 JZ 0x00180b86 MOV R15,qword ptr [0x001deff8] MOV R9,qword ptr [R15 + 0x28] MOV RCX,0x431bde82d7b634db MOV RAX,R10 IMUL RCX MOV RCX,RDX MOV R8,RDX SHR R8,0x3f SAR RCX,0x12 MOV RDX,-0x70d59cc6bc5928d7 MOV RAX,R10 IMUL RDX ADD R8,RCX LEA RCX,[RDX + R10*0x1] MOV RAX,RCX SHR RAX,0x3f SHR RCX,0x19 ADD ECX,EAX MOV RDX,-0x7777777777777777 MOV RAX,R8 IMUL RDX ADD RDX,R8 MOV RAX,RDX SHR RAX,0x3f SHR RDX,0x5 ADD EDX,EAX IMUL EAX,EDX,0x3c SUB R8D,EAX MOV RSI,0x20c49ba5e353f7cf MOV RAX,R10 IMUL RSI MOV R11,RDX MOV RAX,RDX SHR RAX,0x3f SAR R11,0x7 ADD R11,RAX MOV RAX,R11 IMUL RSI MOV RAX,RDX SHR RAX,0x3f SHR RDX,0x7 ADD EDX,EAX IMUL EAX,EDX,0x3e8 IMUL EDX,R11D,0x3e8 SUB R11D,EAX SUB R10D,EDX LEA RSI,[0x1b15dc] MOV RDI,R14 MOV RDX,R9 MOV R9D,R11D XOR EAX,EAX PUSH qword ptr [R15] PUSH R10 CALL 0x00118970 ADD RSP,0x10 LAB_00180b86: MOV EAX,dword ptr [RBX] DEC EAX CMP EAX,0x3 JA 0x00180c01 LEA RCX,[0x1b15cc] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV RAX,qword ptr [0x001deff8] MOV RDX,qword ptr [RAX + 0x20] LEA RSI,[0x1b1608] JMP 0x00180bd9 caseD_3: MOV RAX,qword ptr [0x001deff8] MOV RDX,qword ptr [RAX + 0x30] LEA RSI,[0x1b15fa] JMP 0x00180bd9 caseD_4: MOV RAX,qword ptr [0x001deff8] MOV RDX,qword ptr [RAX + 0x10] LEA RSI,[0x1b1601] LAB_00180bd9: LEA RCX,[0x1a9d45] JMP 0x00180bf7 caseD_2: MOV RAX,qword ptr [0x001deff8] MOV RCX,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x18] LEA RSI,[0x1b15f3] LAB_00180bf7: MOV RDI,R14 XOR EAX,EAX CALL 0x00118970 default: MOV RDI,qword ptr [RBX + 0x10] MOV RSI,R14 CALL 0x00118740 MOV EAX,dword ptr [RBX] CMP EAX,0x4 JA 0x00180c30 MOV ECX,0x1a BT ECX,EAX JNC 0x00180c30 MOV RAX,qword ptr [0x001deff8] MOV RDI,qword ptr [RAX] MOV RSI,R14 CALL 0x00118740 LAB_00180c30: MOV RDI,R14 POP RBX POP R14 POP R15 JMP 0x001187b0
/* common_log_entry::print(_IO_FILE*) const */ void __thiscall common_log_entry::print(common_log_entry *this,_IO_FILE *param_1) { long lVar1; int1 auVar2 [16]; int1 auVar3 [16]; int8 *puVar4; char *pcVar5; int8 uVar6; char *__format; int iVar7; if (param_1 == (_IO_FILE *)0x0) { if ((*(int *)this == 1) && (common_log_verbosity_thold < 1)) { return; } puVar4 = (int8 *)PTR_stderr_001ddfa0; if (*(int *)this == 0) { puVar4 = (int8 *)PTR_stdout_001ddf28; } param_1 = (_IO_FILE *)*puVar4; } if (((*(int *)this == 0) || (*(int *)this == 5)) || (this[4] != (common_log_entry)0x1)) goto switchD_00180b9d_default; lVar1 = *(long *)(this + 8); if (lVar1 != 0) { auVar3 = SEXT816(lVar1 / 1000000) * ZEXT816(0x8888888888888889); auVar2 = SEXT816(lVar1 / 1000) * SEXT816(0x20c49ba5e353f7cf); iVar7 = (int)(lVar1 / 1000); fprintf(param_1,"%s%d.%02d.%03d.%03d%s ",g_col[5], (ulong)(uint)((int)(SUB168(SEXT816(lVar1) * ZEXT816(0x8f2a633943a6d729),8) >> 0x19) - (SUB164(SEXT816(lVar1) * ZEXT816(0x8f2a633943a6d729),0xc) >> 0x1f)), (ulong)(uint)((int)(lVar1 / 1000000) + ((int)(auVar3._8_8_ >> 5) - (auVar3._12_4_ >> 0x1f)) * -0x3c), (ulong)(uint)(iVar7 + ((int)(auVar2._8_8_ >> 7) - (auVar2._12_4_ >> 0x1f)) * -1000), (ulong)(uint)((int)lVar1 + iVar7 * -1000),*g_col); } switch(*(int4 *)this) { case 1: uVar6 = g_col[4]; __format = "%sD %s"; break; case 2: pcVar5 = (char *)*g_col; uVar6 = g_col[3]; __format = "%sI %s"; goto LAB_00180bf7; case 3: uVar6 = g_col[6]; __format = "%sW %s"; break; case 4: uVar6 = g_col[2]; __format = "%sE %s"; break; default: goto switchD_00180b9d_default; } pcVar5 = ""; LAB_00180bf7: fprintf(param_1,__format,uVar6,pcVar5); switchD_00180b9d_default: fputs(*(char **)(this + 0x10),param_1); if ((*(uint *)this < 5) && ((0x1aU >> (*(uint *)this & 0x1f) & 1) != 0)) { fputs((char *)*g_col,param_1); } fflush(param_1); return; }
5,574
blst_sign_pk2_in_g1
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/e2.c
void blst_sign_pk2_in_g1(unsigned char out[192], POINTonE2_affine *sig, const POINTonE2 *hash, const pow256 SK) { POINTonE2 P[1]; POINTonE2_sign(P, hash, SK); if (sig != NULL) vec_copy(sig, P, sizeof(*sig)); if (out != NULL) { limb_t sgn0_pty = POINTonE2_Serialize_BE(out, P); out[0] |= (sgn0_pty & 2) << 4; /* pre-decorate */ out[0] |= vec_is_zero(P->Z, sizeof(P->Z)) << 6; } }
O3
c
blst_sign_pk2_in_g1: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x120, %rsp # imm = 0x120 movq %rsi, %r14 movq %rdi, %rbx leaq -0x130(%rbp), %rdi movq %rdx, %rsi movq %rcx, %rdx callq 0x5e024 testq %r14, %r14 je 0x5e2d5 leaq -0x130(%rbp), %rsi movl $0xc0, %edx movq %r14, %rdi callq 0x22090 testq %rbx, %rbx je 0x5e303 leaq -0x130(%rbp), %rsi movq %rbx, %rdi callq 0x5e235 shlb $0x4, %al andb $0x20, %al orb %al, (%rbx) leaq -0x70(%rbp), %rdi movl $0x60, %esi callq 0x70940 shlb $0x6, %al orb %al, (%rbx) addq $0x120, %rsp # imm = 0x120 popq %rbx popq %r14 popq %rbp retq
blst_sign_pk2_in_g1: push rbp mov rbp, rsp push r14 push rbx sub rsp, 120h mov r14, rsi mov rbx, rdi lea rdi, [rbp+var_130] mov rsi, rdx mov rdx, rcx call POINTonE2_sign test r14, r14 jz short loc_5E2D5 lea rsi, [rbp+var_130] mov edx, 0C0h mov rdi, r14 call _memcpy loc_5E2D5: test rbx, rbx jz short loc_5E303 lea rsi, [rbp+var_130] mov rdi, rbx call POINTonE2_Serialize_BE shl al, 4 and al, 20h or [rbx], al lea rdi, [rbp+var_70] mov esi, 60h ; '`' call vec_is_zero_16x shl al, 6 or [rbx], al loc_5E303: add rsp, 120h pop rbx pop r14 pop rbp retn
char blst_sign_pk2_in_g1(_BYTE *a1, long long a2) { char result; // al _BYTE v3[192]; // [rsp+0h] [rbp-130h] BYREF _BYTE v4[112]; // [rsp+C0h] [rbp-70h] BYREF result = POINTonE2_sign((long long)v3); if ( a2 ) result = memcpy(a2); if ( a1 ) { *a1 |= (16 * POINTonE2_Serialize_BE(a1, (long long)v3)) & 0x20; result = (unsigned __int8)vec_is_zero_16x(v4, 96LL) << 6; *a1 |= result; } return result; }
blst_sign_pk2_in_g1: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x120 MOV R14,RSI MOV RBX,RDI LEA RDI,[RBP + -0x130] MOV RSI,RDX MOV RDX,RCX CALL 0x0015e024 TEST R14,R14 JZ 0x0015e2d5 LEA RSI,[RBP + -0x130] MOV EDX,0xc0 MOV RDI,R14 CALL 0x00122090 LAB_0015e2d5: TEST RBX,RBX JZ 0x0015e303 LEA RSI,[RBP + -0x130] MOV RDI,RBX CALL 0x0015e235 SHL AL,0x4 AND AL,0x20 OR byte ptr [RBX],AL LEA RDI,[RBP + -0x70] MOV ESI,0x60 CALL 0x00170940 SHL AL,0x6 OR byte ptr [RBX],AL LAB_0015e303: ADD RSP,0x120 POP RBX POP R14 POP RBP RET
void blst_sign_pk2_in_g1(byte *param_1,void *param_2,int8 param_3,int8 param_4) { byte bVar1; char cVar2; int1 local_138 [192]; int1 local_78 [96]; POINTonE2_sign(local_138,param_3,param_4); if (param_2 != (void *)0x0) { memcpy(param_2,local_138,0xc0); } if (param_1 != (byte *)0x0) { bVar1 = POINTonE2_Serialize_BE(param_1,local_138); *param_1 = *param_1 | (bVar1 & 2) << 4; cVar2 = vec_is_zero_16x(local_78,0x60); *param_1 = *param_1 | cVar2 << 6; } return; }
5,575
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_array()
llama.cpp/common/json.hpp
bool end_array() { JSON_ASSERT(!ref_stack.empty()); JSON_ASSERT(ref_stack.back()->is_array()); ref_stack.back()->set_parents(); ref_stack.pop_back(); return true; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_array(): pushq %rax movq 0x10(%rdi), %rax cmpq %rax, 0x8(%rdi) je 0x8fc6a movq -0x8(%rax), %rcx cmpb $0x2, (%rcx) jne 0x8fc86 addq $-0x8, %rax movq %rax, 0x10(%rdi) movb $0x1, %al popq %rcx retq leaq 0x8cfa7(%rip), %rdi # 0x11cc18 leaq 0x8576f(%rip), %rdx # 0x1153e7 leaq 0x8df75(%rip), %rcx # 0x11dbf4 movl $0x1b01, %esi # imm = 0x1B01 jmp 0x8fca0 leaq 0x8cf8b(%rip), %rdi # 0x11cc18 leaq 0x85753(%rip), %rdx # 0x1153e7 leaq 0x8e20a(%rip), %rcx # 0x11dea5 movl $0x1b02, %esi # imm = 0x1B02 xorl %eax, %eax callq 0x21fe0 nop
_ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9end_arrayEv: push rax mov rax, [rdi+10h] cmp [rdi+8], rax jz short loc_8FC6A mov rcx, [rax-8] cmp byte ptr [rcx], 2 jnz short loc_8FC86 add rax, 0FFFFFFFFFFFFFFF8h mov [rdi+10h], rax mov al, 1 pop rcx retn loc_8FC6A: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRefStackEmpty; "!ref_stack.empty()" mov esi, 1B01h jmp short loc_8FCA0 loc_8FC86: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRefStackBackIs_0; "ref_stack.back()->is_array()" mov esi, 1B02h loc_8FCA0: xor eax, eax call _ggml_abort nop
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::end_array( long long a1) { long long v1; // rax long long v3; // rsi long long v4; // rdx long long v5; // rcx v1 = *(_QWORD *)(a1 + 16); if ( *(_QWORD *)(a1 + 8) == v1 ) { v3 = 6913LL; ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 6913LL, "GGML_ASSERT(%s) failed", "!ref_stack.empty()"); } else { if ( **(_BYTE **)(v1 - 8) == 2 ) { *(_QWORD *)(a1 + 16) = v1 - 8; return 1; } v3 = 6914LL; ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 6914LL, "GGML_ASSERT(%s) failed", "ref_stack.back()->is_array()"); } return nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::parse_error<nlohmann::json_abi_v3_11_3::detail::out_of_range>( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", v3, v4, v5); }
end_array: PUSH RAX MOV RAX,qword ptr [RDI + 0x10] CMP qword ptr [RDI + 0x8],RAX JZ 0x0018fc6a MOV RCX,qword ptr [RAX + -0x8] CMP byte ptr [RCX],0x2 JNZ 0x0018fc86 ADD RAX,-0x8 MOV qword ptr [RDI + 0x10],RAX MOV AL,0x1 POP RCX RET LAB_0018fc6a: LEA RDI,[0x21cc18] LEA RDX,[0x2153e7] LEA RCX,[0x21dbf4] MOV ESI,0x1b01 JMP 0x0018fca0 LAB_0018fc86: LEA RDI,[0x21cc18] LEA RDX,[0x2153e7] LEA RCX,[0x21dea5] MOV ESI,0x1b02 LAB_0018fca0: XOR EAX,EAX CALL 0x00121fe0
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::end_array() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::end_array(json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this) { long lVar1; char *pcVar2; int8 uVar3; lVar1 = *(long *)(this + 0x10); if (*(long *)(this + 8) == lVar1) { pcVar2 = "!ref_stack.empty()"; uVar3 = 0x1b01; } else { if (**(char **)(lVar1 + -8) == '\x02') { *(long *)(this + 0x10) = lVar1 + -8; return CONCAT71((int7)((ulong)(lVar1 + -8) >> 8),1); } pcVar2 = "ref_stack.back()->is_array()"; uVar3 = 0x1b02; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar3, "GGML_ASSERT(%s) failed",pcVar2); }
5,576
CLI::App::increment_parsed()
MikePodsytnik[P]TCRtrie/build_O2/_deps/cli11-src/include/CLI/impl/App_inl.hpp
CLI11_INLINE void App::increment_parsed() { ++parsed_; for(App_p &sub : subcommands_) { if(sub->get_name().empty()) sub->increment_parsed(); } }
O2
cpp
CLI::App::increment_parsed(): pushq %r14 pushq %rbx pushq %rax incl 0x2a4(%rdi) movq 0x280(%rdi), %rbx movq 0x288(%rdi), %r14 cmpq %r14, %rbx je 0x16d2e movq (%rbx), %rdi cmpq $0x0, 0x10(%rdi) jne 0x16d28 callq 0x16cfc addq $0x10, %rbx jmp 0x16d14 addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN3CLI3App16increment_parsedEv: push r14 push rbx push rax inc dword ptr [rdi+2A4h] mov rbx, [rdi+280h] mov r14, [rdi+288h] loc_16D14: cmp rbx, r14 jz short loc_16D2E mov rdi, [rbx]; this cmp qword ptr [rdi+10h], 0 jnz short loc_16D28 call _ZN3CLI3App16increment_parsedEv; CLI::App::increment_parsed(void) loc_16D28: add rbx, 10h jmp short loc_16D14 loc_16D2E: add rsp, 8 pop rbx pop r14 retn
long long CLI::App::increment_parsed(CLI::App *this) { CLI::App **v1; // rbx CLI::App **v2; // r14 long long result; // rax ++*((_DWORD *)this + 169); v1 = (CLI::App **)*((_QWORD *)this + 80); v2 = (CLI::App **)*((_QWORD *)this + 81); while ( v1 != v2 ) { if ( !*((_QWORD *)*v1 + 2) ) result = CLI::App::increment_parsed(*v1); v1 += 2; } return result; }
increment_parsed: PUSH R14 PUSH RBX PUSH RAX INC dword ptr [RDI + 0x2a4] MOV RBX,qword ptr [RDI + 0x280] MOV R14,qword ptr [RDI + 0x288] LAB_00116d14: CMP RBX,R14 JZ 0x00116d2e MOV RDI,qword ptr [RBX] CMP qword ptr [RDI + 0x10],0x0 JNZ 0x00116d28 CALL 0x00116cfc LAB_00116d28: ADD RBX,0x10 JMP 0x00116d14 LAB_00116d2e: ADD RSP,0x8 POP RBX POP R14 RET
/* CLI::App::increment_parsed() */ void __thiscall CLI::App::increment_parsed(App *this) { int8 *puVar1; int8 *puVar2; *(int *)(this + 0x2a4) = *(int *)(this + 0x2a4) + 1; puVar1 = *(int8 **)(this + 0x288); for (puVar2 = *(int8 **)(this + 0x280); puVar2 != puVar1; puVar2 = puVar2 + 2) { if (*(long *)((App *)*puVar2 + 0x10) == 0) { increment_parsed((App *)*puVar2); } } return; }
5,577
LefDefParser::defiAlias_itr::Next()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiAlias.cpp
int defiAlias_itr::Next() { if (first) { first = 0; iterator->me = defData->def_alias_set.begin(); } else { iterator->me++; } if (iterator->me == defData->def_alias_set.end()) { return 0; } return 1; }
O3
cpp
LefDefParser::defiAlias_itr::Next(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx cmpl $0x0, 0x8(%rdi) je 0x224c7 movl $0x0, 0x8(%rbx) movq (%rbx), %rax movq 0x10(%rbx), %rcx movq 0x200(%rcx), %rcx movq %rcx, (%rax) movq (%rbx), %rax movq (%rax), %rax jmp 0x224d5 movq (%rbx), %r14 movq (%r14), %rdi callq 0x7130 movq %rax, (%r14) movl $0x1f0, %edx # imm = 0x1F0 addq 0x10(%rbx), %rdx xorl %ecx, %ecx cmpq %rdx, %rax setne %cl movl %ecx, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN12LefDefParser13defiAlias_itr4NextEv: push r14 push rbx push rax mov rbx, rdi cmp dword ptr [rdi+8], 0 jz short loc_224C7 mov dword ptr [rbx+8], 0 mov rax, [rbx] mov rcx, [rbx+10h] mov rcx, [rcx+200h] mov [rax], rcx mov rax, [rbx] mov rax, [rax] jmp short loc_224D5 loc_224C7: mov r14, [rbx] mov rdi, [r14] call __ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base *) mov [r14], rax loc_224D5: mov edx, 1F0h add rdx, [rbx+10h] xor ecx, ecx cmp rax, rdx setnz cl mov eax, ecx add rsp, 8 pop rbx pop r14 retn
_BOOL8 LefDefParser::defiAlias_itr::Next(LefDefParser::defiAlias_itr *this) { long long v1; // rax long long *v2; // r14 if ( *((_DWORD *)this + 2) ) { *((_DWORD *)this + 2) = 0; **(_QWORD **)this = *(_QWORD *)(*((_QWORD *)this + 2) + 512LL); v1 = **(_QWORD **)this; } else { v2 = *(long long **)this; v1 = std::_Rb_tree_increment(**(_QWORD **)this); *v2 = v1; } return v1 != *((_QWORD *)this + 2) + 496LL; }
Next: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI CMP dword ptr [RDI + 0x8],0x0 JZ 0x001224c7 MOV dword ptr [RBX + 0x8],0x0 MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x10] MOV RCX,qword ptr [RCX + 0x200] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX] JMP 0x001224d5 LAB_001224c7: MOV R14,qword ptr [RBX] MOV RDI,qword ptr [R14] CALL 0x00107130 MOV qword ptr [R14],RAX LAB_001224d5: MOV EDX,0x1f0 ADD RDX,qword ptr [RBX + 0x10] XOR ECX,ECX CMP RAX,RDX SETNZ CL MOV EAX,ECX ADD RSP,0x8 POP RBX POP R14 RET
/* LefDefParser::defiAlias_itr::Next() */ bool __thiscall LefDefParser::defiAlias_itr::Next(defiAlias_itr *this) { long *plVar1; long lVar2; if (*(int *)(this + 8) == 0) { plVar1 = *(long **)this; lVar2 = std::_Rb_tree_increment((_Rb_tree_node_base *)*plVar1); *plVar1 = lVar2; } else { *(int4 *)(this + 8) = 0; **(int8 **)this = *(int8 *)(*(long *)(this + 0x10) + 0x200); lVar2 = **(long **)this; } return lVar2 != *(long *)(this + 0x10) + 0x1f0; }
5,578
reset_setup_actor()
eloqsql/storage/perfschema/pfs_setup_actor.cc
int reset_setup_actor() { PFS_thread *thread= PFS_thread::get_current_thread(); if (unlikely(thread == NULL)) return HA_ERR_OUT_OF_MEM; LF_PINS* pins= get_setup_actor_hash_pins(thread); if (unlikely(pins == NULL)) return HA_ERR_OUT_OF_MEM; Proc_reset_setup_actor proc(pins); // FIXME: delete helper instead global_setup_actor_container.apply(proc); update_setup_actors_derived_flags(); return 0; }
O0
cpp
reset_setup_actor(): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp callq 0x37a80 movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) sete %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x4804c movl $0x80, -0x4(%rbp) jmp 0x480c7 movq -0x10(%rbp), %rdi callq 0x47c40 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) sete %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x48074 movl $0x80, -0x4(%rbp) jmp 0x480c7 movq -0x18(%rbp), %rsi leaq -0x28(%rbp), %rdi movq %rdi, -0x40(%rbp) callq 0x48a20 movq -0x40(%rbp), %rsi leaq 0x391ec8(%rip), %rdi # 0x3d9f58 callq 0x48a60 jmp 0x48097 callq 0x47da0 jmp 0x4809e movl $0x0, -0x4(%rbp) leaq -0x28(%rbp), %rdi callq 0x48b10 jmp 0x480c7 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x30(%rbp) movl %eax, -0x34(%rbp) leaq -0x28(%rbp), %rdi callq 0x48b10 jmp 0x480d0 movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq movq -0x30(%rbp), %rdi callq 0x265e0 nopl (%rax)
_Z17reset_setup_actorv: push rbp mov rbp, rsp sub rsp, 40h call _ZN10PFS_thread18get_current_threadEv; PFS_thread::get_current_thread(void) mov [rbp+var_10], rax cmp [rbp+var_10], 0 setz al and al, 1 movzx eax, al cmp eax, 0 jz short loc_4804C mov [rbp+var_4], 80h jmp short loc_480C7 loc_4804C: mov rdi, [rbp+var_10]; PFS_thread * call _ZL25get_setup_actor_hash_pinsP10PFS_thread; get_setup_actor_hash_pins(PFS_thread *) mov [rbp+var_18], rax cmp [rbp+var_18], 0 setz al and al, 1 movzx eax, al cmp eax, 0 jz short loc_48074 mov [rbp+var_4], 80h jmp short loc_480C7 loc_48074: mov rsi, [rbp+var_18] lea rdi, [rbp+var_28] mov [rbp+var_40], rdi call _ZN22Proc_reset_setup_actorC2EP7LF_PINS; Proc_reset_setup_actor::Proc_reset_setup_actor(LF_PINS *) mov rsi, [rbp+var_40] lea rdi, global_setup_actor_container call _ZN29PFS_buffer_scalable_containerI15PFS_setup_actorLi128ELi1024E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE5applyER20PFS_buffer_processorIS0_E; PFS_buffer_scalable_container<PFS_setup_actor,128,1024,PFS_buffer_default_array<PFS_setup_actor>,PFS_buffer_default_allocator<PFS_setup_actor>>::apply(PFS_buffer_processor<PFS_setup_actor> &) jmp short $+2 loc_48097: call _Z33update_setup_actors_derived_flagsv; update_setup_actors_derived_flags(void) jmp short $+2 loc_4809E: mov [rbp+var_4], 0 lea rdi, [rbp+var_28]; this call _ZN22Proc_reset_setup_actorD2Ev; Proc_reset_setup_actor::~Proc_reset_setup_actor() jmp short loc_480C7 mov rcx, rax mov eax, edx mov [rbp+var_30], rcx mov [rbp+var_34], eax lea rdi, [rbp+var_28]; this call _ZN22Proc_reset_setup_actorD2Ev; Proc_reset_setup_actor::~Proc_reset_setup_actor() jmp short loc_480D0 loc_480C7: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn loc_480D0: mov rdi, [rbp+var_30] call __Unwind_Resume
long long reset_setup_actor(PFS_thread *a1) { _BYTE v2[16]; // [rsp+18h] [rbp-28h] BYREF long long setup_actor_hash_pins; // [rsp+28h] [rbp-18h] PFS_thread *current_thread; // [rsp+30h] [rbp-10h] unsigned int v5; // [rsp+3Ch] [rbp-4h] current_thread = (PFS_thread *)PFS_thread::get_current_thread(a1); if ( current_thread ) { setup_actor_hash_pins = get_setup_actor_hash_pins(current_thread); if ( setup_actor_hash_pins ) { Proc_reset_setup_actor::Proc_reset_setup_actor(v2, setup_actor_hash_pins); PFS_buffer_scalable_container<PFS_setup_actor,128,1024,PFS_buffer_default_array<PFS_setup_actor>,PFS_buffer_default_allocator<PFS_setup_actor>>::apply( &global_setup_actor_container, v2); update_setup_actors_derived_flags((PFS_thread *)&global_setup_actor_container); v5 = 0; Proc_reset_setup_actor::~Proc_reset_setup_actor((Proc_reset_setup_actor *)v2); } else { return 128; } } else { return 128; } return v5; }
reset_setup_actor: PUSH RBP MOV RBP,RSP SUB RSP,0x40 CALL 0x00137a80 MOV qword ptr [RBP + -0x10],RAX CMP qword ptr [RBP + -0x10],0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x0014804c MOV dword ptr [RBP + -0x4],0x80 JMP 0x001480c7 LAB_0014804c: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00147c40 MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x00148074 MOV dword ptr [RBP + -0x4],0x80 JMP 0x001480c7 LAB_00148074: MOV RSI,qword ptr [RBP + -0x18] LEA RDI,[RBP + -0x28] MOV qword ptr [RBP + -0x40],RDI CALL 0x00148a20 MOV RSI,qword ptr [RBP + -0x40] LAB_00148089: LEA RDI,[0x4d9f58] CALL 0x00148a60 JMP 0x00148097 LAB_00148097: CALL 0x00147da0 LAB_0014809c: JMP 0x0014809e LAB_0014809e: MOV dword ptr [RBP + -0x4],0x0 LEA RDI,[RBP + -0x28] CALL 0x00148b10 JMP 0x001480c7 LAB_001480c7: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* reset_setup_actor() */ int4 reset_setup_actor(void) { Proc_reset_setup_actor local_30 [16]; LF_PINS *local_20; PFS_thread *local_18; int4 local_c; local_18 = (PFS_thread *)PFS_thread::get_current_thread(); if (local_18 == (PFS_thread *)0x0) { local_c = 0x80; } else { local_20 = (LF_PINS *)get_setup_actor_hash_pins(local_18); if (local_20 == (LF_PINS *)0x0) { local_c = 0x80; } else { Proc_reset_setup_actor::Proc_reset_setup_actor(local_30,local_20); /* try { // try from 00148089 to 0014809b has its CatchHandler @ 001480b0 */ PFS_buffer_scalable_container<PFS_setup_actor,128,1024,PFS_buffer_default_array<PFS_setup_actor>,PFS_buffer_default_allocator<PFS_setup_actor>> ::apply((PFS_buffer_scalable_container<PFS_setup_actor,128,1024,PFS_buffer_default_array<PFS_setup_actor>,PFS_buffer_default_allocator<PFS_setup_actor>> *)global_setup_actor_container,(PFS_buffer_processor *)local_30); update_setup_actors_derived_flags(); local_c = 0; Proc_reset_setup_actor::~Proc_reset_setup_actor(local_30); } } return local_c; }
5,579
ok
eloqsql/libmariadb/unittest/mytap/tap.c
void ok(int const 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(); }
O3
c
ok: pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp leaq -0xd0(%rbp), %r10 movq %rdx, 0x10(%r10) movq %rcx, 0x18(%r10) movq %r8, 0x20(%r10) movq %r9, 0x28(%r10) testb %al, %al je 0x1a1c5 movaps %xmm0, -0xa0(%rbp) movaps %xmm1, -0x90(%rbp) movaps %xmm2, -0x80(%rbp) movaps %xmm3, -0x70(%rbp) movaps %xmm4, -0x60(%rbp) movaps %xmm5, -0x50(%rbp) movaps %xmm6, -0x40(%rbp) movaps %xmm7, -0x30(%rbp) movq %r10, -0x10(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x18(%rbp) movabsq $0x3000000010, %rax # imm = 0x3000000010 movq %rax, -0x20(%rbp) testl %edi, %edi jne 0x1a1f2 cmpb $0x0, 0x37176(%rip) # 0x51360 jne 0x1a1f2 incl 0x3716a(%rip) # 0x5135c leaq -0x20(%rbp), %rdx callq 0x1a255 cmpb $0x0, 0x3715e(%rip) # 0x51360 je 0x1a22f movq 0x34da5(%rip), %rax # 0x4efb0 movq (%rax), %rdi leaq 0x218e4(%rip), %rdx # 0x3baf9 leaq 0x21875(%rip), %rcx # 0x3ba91 leaq 0x3713d(%rip), %r8 # 0x51360 movl $0x1, %esi xorl %eax, %eax callq 0x13740 movq 0x34d7a(%rip), %rax # 0x4efb0 movq (%rax), %rdi leaq 0x1f5e1(%rip), %rdx # 0x39821 movl $0x1, %esi xorl %eax, %eax callq 0x13740 addq $0xd0, %rsp popq %rbp retq
ok: push rbp mov rbp, rsp sub rsp, 0D0h lea r10, [rbp+var_D0] mov [r10+10h], rdx mov [r10+18h], rcx mov [r10+20h], r8 mov [r10+28h], r9 test al, al jz short loc_1A1C5 movaps [rbp+var_A0], xmm0 movaps [rbp+var_90], xmm1 movaps [rbp+var_80], xmm2 movaps [rbp+var_70], xmm3 movaps [rbp+var_60], xmm4 movaps [rbp+var_50], xmm5 movaps [rbp+var_40], xmm6 movaps [rbp+var_30], xmm7 loc_1A1C5: mov [rbp+var_10], r10 lea rax, [rbp+arg_0] mov [rbp+var_18], rax mov rax, 3000000010h mov [rbp+var_20], rax test edi, edi jnz short loc_1A1F2 cmp cs:byte_51360, 0 jnz short loc_1A1F2 inc cs:dword_5135C loc_1A1F2: lea rdx, [rbp+var_20] call vemit_tap cmp cs:byte_51360, 0 jz short loc_1A22F mov rax, cs:stdout_ptr mov rdi, [rax] lea rdx, aSS_1; " # %s %s" lea rcx, aTodo; "todo" lea r8, byte_51360 mov esi, 1 xor eax, eax call ___fprintf_chk loc_1A22F: mov rax, cs:stdout_ptr mov rdi, [rax] lea rdx, aExecuteTestWit+28h; "\n" mov esi, 1 xor eax, eax call ___fprintf_chk add rsp, 0D0h pop rbp retn
long long ok( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { char v16; // [rsp+0h] [rbp-D0h] BYREF long long v17; // [rsp+10h] [rbp-C0h] long long v18; // [rsp+18h] [rbp-B8h] long long v19; // [rsp+20h] [rbp-B0h] long long v20; // [rsp+28h] [rbp-A8h] __m128 v21; // [rsp+30h] [rbp-A0h] __m128 v22; // [rsp+40h] [rbp-90h] __m128 v23; // [rsp+50h] [rbp-80h] __m128 v24; // [rsp+60h] [rbp-70h] __m128 v25; // [rsp+70h] [rbp-60h] __m128 v26; // [rsp+80h] [rbp-50h] __m128 v27; // [rsp+90h] [rbp-40h] __m128 v28; // [rsp+A0h] [rbp-30h] _QWORD v29[4]; // [rsp+B0h] [rbp-20h] BYREF v21 = a7; v22 = a8; v23 = a9; v24 = a10; v25 = a11; v26 = a12; v27 = a13; v28 = a14; v17 = a3; v18 = a4; v19 = a5; v20 = a6; v29[2] = &v16; v29[1] = &a15; v29[0] = 0x3000000010LL; if ( !(_DWORD)a1 && !byte_51360 ) ++dword_5135C; vemit_tap(a1, a2, v29); if ( byte_51360 ) __fprintf_chk(stdout, 1LL, " # %s %s", "todo", &byte_51360); return __fprintf_chk(stdout, 1LL, "\n"); }
ok: PUSH RBP MOV RBP,RSP SUB RSP,0xd0 LEA R10,[RBP + -0xd0] MOV qword ptr [R10 + 0x10],RDX MOV qword ptr [R10 + 0x18],RCX MOV qword ptr [R10 + 0x20],R8 MOV qword ptr [R10 + 0x28],R9 TEST AL,AL JZ 0x0011a1c5 MOVAPS xmmword ptr [RBP + -0xa0],XMM0 MOVAPS xmmword ptr [RBP + -0x90],XMM1 MOVAPS xmmword ptr [RBP + -0x80],XMM2 MOVAPS xmmword ptr [RBP + -0x70],XMM3 MOVAPS xmmword ptr [RBP + -0x60],XMM4 MOVAPS xmmword ptr [RBP + -0x50],XMM5 MOVAPS xmmword ptr [RBP + -0x40],XMM6 MOVAPS xmmword ptr [RBP + -0x30],XMM7 LAB_0011a1c5: MOV qword ptr [RBP + -0x10],R10 LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x18],RAX MOV RAX,0x3000000010 MOV qword ptr [RBP + -0x20],RAX TEST EDI,EDI JNZ 0x0011a1f2 CMP byte ptr [0x00151360],0x0 JNZ 0x0011a1f2 INC dword ptr [0x0015135c] LAB_0011a1f2: LEA RDX,[RBP + -0x20] CALL 0x0011a255 CMP byte ptr [0x00151360],0x0 JZ 0x0011a22f MOV RAX,qword ptr [0x0014efb0] MOV RDI,qword ptr [RAX] LEA RDX,[0x13baf9] LEA RCX,[0x13ba91] LEA R8,[0x151360] MOV ESI,0x1 XOR EAX,EAX CALL 0x00113740 LAB_0011a22f: MOV RAX,qword ptr [0x0014efb0] MOV RDI,qword ptr [RAX] LEA RDX,[0x139821] MOV ESI,0x1 XOR EAX,EAX CALL 0x00113740 ADD RSP,0xd0 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, int8 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; int1 local_d8 [16]; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_b0; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; int8 local_28; int1 *local_20; int1 *local_18; local_18 = local_d8; if (in_AL != '\0') { local_a8 = param_1; local_98 = param_2; local_88 = param_3; local_78 = param_4; local_68 = param_5; local_58 = param_6; local_48 = param_7; local_38 = param_8; } local_20 = &stack0x00000008; local_28 = 0x3000000010; if (((int)param_9 == 0) && (DAT_00151360 == '\0')) { DAT_0015135c = DAT_0015135c + 1; } local_c8 = param_11; local_c0 = param_12; local_b8 = param_13; local_b0 = param_14; vemit_tap(param_9,param_10,&local_28); if (DAT_00151360 != '\0') { __fprintf_chk(*(int8 *)PTR_stdout_0014efb0,1," # %s %s",&DAT_0013ba91,&DAT_00151360); } __fprintf_chk(*(int8 *)PTR_stdout_0014efb0,1,"\n"); return; }
5,580
JS_NewClass1
bluesky950520[P]quickjs/quickjs.c
static int JS_NewClass1(JSRuntime *rt, JSClassID class_id, const JSClassDef *class_def, JSAtom name) { int new_size, i; JSClass *cl, *new_class_array; struct list_head *el; if (class_id >= (1 << 16)) return -1; if (class_id < rt->class_count && rt->class_array[class_id].class_id != 0) return -1; if (class_id >= rt->class_count) { new_size = max_int(JS_CLASS_INIT_COUNT, max_int(class_id + 1, rt->class_count * 3 / 2)); /* reallocate the context class prototype array, if any */ list_for_each(el, &rt->context_list) { JSContext *ctx = list_entry(el, JSContext, link); JSValue *new_tab; new_tab = js_realloc_rt(rt, ctx->class_proto, sizeof(ctx->class_proto[0]) * new_size); if (!new_tab) return -1; for(i = rt->class_count; i < new_size; i++) new_tab[i] = JS_NULL; ctx->class_proto = new_tab; } /* reallocate the class array */ new_class_array = js_realloc_rt(rt, rt->class_array, sizeof(JSClass) * new_size); if (!new_class_array) return -1; memset(new_class_array + rt->class_count, 0, (new_size - rt->class_count) * sizeof(JSClass)); rt->class_array = new_class_array; rt->class_count = new_size; } cl = &rt->class_array[class_id]; cl->class_id = class_id; cl->class_name = JS_DupAtomRT(rt, name); cl->finalizer = class_def->finalizer; cl->gc_mark = class_def->gc_mark; cl->call = class_def->call; cl->exotic = class_def->exotic; return 0; }
O0
c
JS_NewClass1: subq $0x68, %rsp movq %rdi, 0x58(%rsp) movl %esi, 0x54(%rsp) movq %rdx, 0x48(%rsp) movl %ecx, 0x44(%rsp) cmpl $0x10000, 0x54(%rsp) # imm = 0x10000 jb 0x293ed movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF jmp 0x2965c movl 0x54(%rsp), %eax movq 0x58(%rsp), %rcx cmpl 0x78(%rcx), %eax jae 0x29424 movq 0x58(%rsp), %rax movq 0x80(%rax), %rax movl 0x54(%rsp), %ecx imulq $0x28, %rcx, %rcx addq %rcx, %rax cmpl $0x0, (%rax) je 0x29424 movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF jmp 0x2965c movl 0x54(%rsp), %eax movq 0x58(%rsp), %rcx cmpl 0x78(%rcx), %eax jb 0x295cd movl 0x54(%rsp), %edi addl $0x1, %edi movq 0x58(%rsp), %rax imull $0x3, 0x78(%rax), %eax movl $0x2, %ecx cltd idivl %ecx movl %eax, %esi callq 0x5d310 movl %eax, %esi movl $0x3d, %edi callq 0x5d310 movl %eax, 0x40(%rsp) movq 0x58(%rsp), %rax movq 0x90(%rax), %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax movq 0x58(%rsp), %rcx addq $0x88, %rcx cmpq %rcx, %rax je 0x29549 movq 0x20(%rsp), %rax addq $-0x20, %rax movq %rax, 0x18(%rsp) movq 0x58(%rsp), %rdi movq 0x18(%rsp), %rax movq 0x40(%rax), %rsi movslq 0x40(%rsp), %rdx shlq $0x4, %rdx callq 0x219e0 movq %rax, 0x10(%rsp) cmpq $0x0, 0x10(%rsp) jne 0x294d4 movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF jmp 0x2965c movq 0x58(%rsp), %rax movl 0x78(%rax), %eax movl %eax, 0x3c(%rsp) movl 0x3c(%rsp), %eax cmpl 0x40(%rsp), %eax jge 0x29528 movq 0x10(%rsp), %rax movslq 0x3c(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movl $0x0, (%rsp) movq $0x2, 0x8(%rsp) movq (%rsp), %rcx movq %rcx, (%rax) movq 0x8(%rsp), %rcx movq %rcx, 0x8(%rax) movl 0x3c(%rsp), %eax addl $0x1, %eax movl %eax, 0x3c(%rsp) jmp 0x294e0 movq 0x10(%rsp), %rcx movq 0x18(%rsp), %rax movq %rcx, 0x40(%rax) movq 0x20(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x20(%rsp) jmp 0x29476 movq 0x58(%rsp), %rdi movq 0x58(%rsp), %rax movq 0x80(%rax), %rsi movslq 0x40(%rsp), %rax imulq $0x28, %rax, %rdx callq 0x219e0 movq %rax, 0x28(%rsp) cmpq $0x0, 0x28(%rsp) jne 0x29582 movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF jmp 0x2965c movq 0x28(%rsp), %rdi movq 0x58(%rsp), %rax movslq 0x78(%rax), %rax imulq $0x28, %rax, %rax addq %rax, %rdi movl 0x40(%rsp), %eax movq 0x58(%rsp), %rcx subl 0x78(%rcx), %eax cltq imulq $0x28, %rax, %rdx xorl %esi, %esi callq 0xe350 movq 0x28(%rsp), %rcx movq 0x58(%rsp), %rax movq %rcx, 0x80(%rax) movl 0x40(%rsp), %ecx movq 0x58(%rsp), %rax movl %ecx, 0x78(%rax) movq 0x58(%rsp), %rax movq 0x80(%rax), %rax movl 0x54(%rsp), %ecx imulq $0x28, %rcx, %rcx addq %rcx, %rax movq %rax, 0x30(%rsp) movl 0x54(%rsp), %ecx movq 0x30(%rsp), %rax movl %ecx, (%rax) movq 0x58(%rsp), %rdi movl 0x44(%rsp), %esi callq 0x5d640 movl %eax, %ecx movq 0x30(%rsp), %rax movl %ecx, 0x4(%rax) movq 0x48(%rsp), %rax movq 0x8(%rax), %rcx movq 0x30(%rsp), %rax movq %rcx, 0x8(%rax) movq 0x48(%rsp), %rax movq 0x10(%rax), %rcx movq 0x30(%rsp), %rax movq %rcx, 0x10(%rax) movq 0x48(%rsp), %rax movq 0x18(%rax), %rcx movq 0x30(%rsp), %rax movq %rcx, 0x18(%rax) movq 0x48(%rsp), %rax movq 0x20(%rax), %rcx movq 0x30(%rsp), %rax movq %rcx, 0x20(%rax) movl $0x0, 0x64(%rsp) movl 0x64(%rsp), %eax addq $0x68, %rsp retq nopw %cs:(%rax,%rax)
JS_NewClass1: sub rsp, 68h mov [rsp+68h+var_10], rdi mov [rsp+68h+var_14], esi mov [rsp+68h+var_20], rdx mov [rsp+68h+var_24], ecx cmp [rsp+68h+var_14], 10000h jb short loc_293ED mov [rsp+68h+var_4], 0FFFFFFFFh jmp loc_2965C loc_293ED: mov eax, [rsp+68h+var_14] mov rcx, [rsp+68h+var_10] cmp eax, [rcx+78h] jnb short loc_29424 mov rax, [rsp+68h+var_10] mov rax, [rax+80h] mov ecx, [rsp+68h+var_14] imul rcx, 28h ; '(' add rax, rcx cmp dword ptr [rax], 0 jz short loc_29424 mov [rsp+68h+var_4], 0FFFFFFFFh jmp loc_2965C loc_29424: mov eax, [rsp+68h+var_14] mov rcx, [rsp+68h+var_10] cmp eax, [rcx+78h] jb loc_295CD mov edi, [rsp+68h+var_14] add edi, 1 mov rax, [rsp+68h+var_10] imul eax, [rax+78h], 3 mov ecx, 2 cdq idiv ecx mov esi, eax call max_int_0 mov esi, eax mov edi, 3Dh ; '=' call max_int_0 mov [rsp+68h+var_28], eax mov rax, [rsp+68h+var_10] mov rax, [rax+90h] mov [rsp+68h+var_48], rax loc_29476: mov rax, [rsp+68h+var_48] mov rcx, [rsp+68h+var_10] add rcx, 88h cmp rax, rcx jz loc_29549 mov rax, [rsp+68h+var_48] add rax, 0FFFFFFFFFFFFFFE0h mov [rsp+68h+var_50], rax mov rdi, [rsp+68h+var_10] mov rax, [rsp+68h+var_50] mov rsi, [rax+40h] movsxd rdx, [rsp+68h+var_28] shl rdx, 4 call js_realloc_rt mov [rsp+68h+var_58], rax cmp [rsp+68h+var_58], 0 jnz short loc_294D4 mov [rsp+68h+var_4], 0FFFFFFFFh jmp loc_2965C loc_294D4: mov rax, [rsp+68h+var_10] mov eax, [rax+78h] mov [rsp+68h+var_2C], eax loc_294E0: mov eax, [rsp+68h+var_2C] cmp eax, [rsp+68h+var_28] jge short loc_29528 mov rax, [rsp+68h+var_58] movsxd rcx, [rsp+68h+var_2C] shl rcx, 4 add rax, rcx mov dword ptr [rsp+68h+var_68], 0 mov [rsp+68h+var_60], 2 mov rcx, [rsp+68h+var_68] mov [rax], rcx mov rcx, [rsp+68h+var_60] mov [rax+8], rcx mov eax, [rsp+68h+var_2C] add eax, 1 mov [rsp+68h+var_2C], eax jmp short loc_294E0 loc_29528: mov rcx, [rsp+68h+var_58] mov rax, [rsp+68h+var_50] mov [rax+40h], rcx mov rax, [rsp+68h+var_48] mov rax, [rax+8] mov [rsp+68h+var_48], rax jmp loc_29476 loc_29549: mov rdi, [rsp+68h+var_10] mov rax, [rsp+68h+var_10] mov rsi, [rax+80h] movsxd rax, [rsp+68h+var_28] imul rdx, rax, 28h ; '(' call js_realloc_rt mov [rsp+68h+var_40], rax cmp [rsp+68h+var_40], 0 jnz short loc_29582 mov [rsp+68h+var_4], 0FFFFFFFFh jmp loc_2965C loc_29582: mov rdi, [rsp+68h+var_40] mov rax, [rsp+68h+var_10] movsxd rax, dword ptr [rax+78h] imul rax, 28h ; '(' add rdi, rax mov eax, [rsp+68h+var_28] mov rcx, [rsp+68h+var_10] sub eax, [rcx+78h] cdqe imul rdx, rax, 28h ; '(' xor esi, esi call _memset mov rcx, [rsp+68h+var_40] mov rax, [rsp+68h+var_10] mov [rax+80h], rcx mov ecx, [rsp+68h+var_28] mov rax, [rsp+68h+var_10] mov [rax+78h], ecx loc_295CD: mov rax, [rsp+68h+var_10] mov rax, [rax+80h] mov ecx, [rsp+68h+var_14] imul rcx, 28h ; '(' add rax, rcx mov [rsp+68h+var_38], rax mov ecx, [rsp+68h+var_14] mov rax, [rsp+68h+var_38] mov [rax], ecx mov rdi, [rsp+68h+var_10] mov esi, [rsp+68h+var_24] call JS_DupAtomRT mov ecx, eax mov rax, [rsp+68h+var_38] mov [rax+4], ecx mov rax, [rsp+68h+var_20] mov rcx, [rax+8] mov rax, [rsp+68h+var_38] mov [rax+8], rcx mov rax, [rsp+68h+var_20] mov rcx, [rax+10h] mov rax, [rsp+68h+var_38] mov [rax+10h], rcx mov rax, [rsp+68h+var_20] mov rcx, [rax+18h] mov rax, [rsp+68h+var_38] mov [rax+18h], rcx mov rax, [rsp+68h+var_20] mov rcx, [rax+20h] mov rax, [rsp+68h+var_38] mov [rax+20h], rcx mov [rsp+68h+var_4], 0 loc_2965C: mov eax, [rsp+68h+var_4] add rsp, 68h retn
long long JS_NewClass1(long long a1, unsigned int a2, _QWORD *a3, unsigned int a4) { long long v4; // rdx unsigned int v5; // eax long long v6; // rdx _QWORD *v7; // rax long long v9; // [rsp+0h] [rbp-68h] long long v10; // [rsp+10h] [rbp-58h] long long i; // [rsp+20h] [rbp-48h] long long v12; // [rsp+28h] [rbp-40h] long long v13; // [rsp+30h] [rbp-38h] int j; // [rsp+3Ch] [rbp-2Ch] int v15; // [rsp+40h] [rbp-28h] if ( a2 < 0x10000 ) { if ( a2 >= *(_DWORD *)(a1 + 120) || !*(_DWORD *)(40LL * a2 + *(_QWORD *)(a1 + 128)) ) { if ( a2 >= *(_DWORD *)(a1 + 120) ) { v4 = (unsigned int)((3 * *(_DWORD *)(a1 + 120)) >> 31); LODWORD(v4) = 3 * *(_DWORD *)(a1 + 120) % 2; v5 = max_int_0(a2 + 1, (unsigned int)(3 * *(_DWORD *)(a1 + 120) / 2), v4); v15 = max_int_0(61LL, v5, v6); for ( i = *(_QWORD *)(a1 + 144); i != a1 + 136; i = *(_QWORD *)(i + 8) ) { v10 = js_realloc_rt(a1, *(_QWORD *)(i - 32 + 64), 16LL * v15); if ( !v10 ) return (unsigned int)-1; for ( j = *(_DWORD *)(a1 + 120); j < v15; ++j ) { v7 = (_QWORD *)(16LL * j + v10); LODWORD(v9) = 0; *v7 = v9; v7[1] = 2LL; } *(_QWORD *)(i - 32 + 64) = v10; } v12 = js_realloc_rt(a1, *(_QWORD *)(a1 + 128), 40LL * v15); if ( !v12 ) return (unsigned int)-1; memset(40LL * *(int *)(a1 + 120) + v12, 0LL, 40LL * (v15 - *(_DWORD *)(a1 + 120))); *(_QWORD *)(a1 + 128) = v12; *(_DWORD *)(a1 + 120) = v15; } v13 = 40LL * a2 + *(_QWORD *)(a1 + 128); *(_DWORD *)v13 = a2; *(_DWORD *)(v13 + 4) = JS_DupAtomRT(a1, a4); *(_QWORD *)(v13 + 8) = a3[1]; *(_QWORD *)(v13 + 16) = a3[2]; *(_QWORD *)(v13 + 24) = a3[3]; *(_QWORD *)(v13 + 32) = a3[4]; return 0; } return (unsigned int)-1; } else { return (unsigned int)-1; } }
JS_NewClass1: SUB RSP,0x68 MOV qword ptr [RSP + 0x58],RDI MOV dword ptr [RSP + 0x54],ESI MOV qword ptr [RSP + 0x48],RDX MOV dword ptr [RSP + 0x44],ECX CMP dword ptr [RSP + 0x54],0x10000 JC 0x001293ed MOV dword ptr [RSP + 0x64],0xffffffff JMP 0x0012965c LAB_001293ed: MOV EAX,dword ptr [RSP + 0x54] MOV RCX,qword ptr [RSP + 0x58] CMP EAX,dword ptr [RCX + 0x78] JNC 0x00129424 MOV RAX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RAX + 0x80] MOV ECX,dword ptr [RSP + 0x54] IMUL RCX,RCX,0x28 ADD RAX,RCX CMP dword ptr [RAX],0x0 JZ 0x00129424 MOV dword ptr [RSP + 0x64],0xffffffff JMP 0x0012965c LAB_00129424: MOV EAX,dword ptr [RSP + 0x54] MOV RCX,qword ptr [RSP + 0x58] CMP EAX,dword ptr [RCX + 0x78] JC 0x001295cd MOV EDI,dword ptr [RSP + 0x54] ADD EDI,0x1 MOV RAX,qword ptr [RSP + 0x58] IMUL EAX,dword ptr [RAX + 0x78],0x3 MOV ECX,0x2 CDQ IDIV ECX MOV ESI,EAX CALL 0x0015d310 MOV ESI,EAX MOV EDI,0x3d CALL 0x0015d310 MOV dword ptr [RSP + 0x40],EAX MOV RAX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RAX + 0x90] MOV qword ptr [RSP + 0x20],RAX LAB_00129476: MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x58] ADD RCX,0x88 CMP RAX,RCX JZ 0x00129549 MOV RAX,qword ptr [RSP + 0x20] ADD RAX,-0x20 MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RAX + 0x40] MOVSXD RDX,dword ptr [RSP + 0x40] SHL RDX,0x4 CALL 0x001219e0 MOV qword ptr [RSP + 0x10],RAX CMP qword ptr [RSP + 0x10],0x0 JNZ 0x001294d4 MOV dword ptr [RSP + 0x64],0xffffffff JMP 0x0012965c LAB_001294d4: MOV RAX,qword ptr [RSP + 0x58] MOV EAX,dword ptr [RAX + 0x78] MOV dword ptr [RSP + 0x3c],EAX LAB_001294e0: MOV EAX,dword ptr [RSP + 0x3c] CMP EAX,dword ptr [RSP + 0x40] JGE 0x00129528 MOV RAX,qword ptr [RSP + 0x10] MOVSXD RCX,dword ptr [RSP + 0x3c] SHL RCX,0x4 ADD RAX,RCX MOV dword ptr [RSP],0x0 MOV qword ptr [RSP + 0x8],0x2 MOV RCX,qword ptr [RSP] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV EAX,dword ptr [RSP + 0x3c] ADD EAX,0x1 MOV dword ptr [RSP + 0x3c],EAX JMP 0x001294e0 LAB_00129528: MOV RCX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0x40],RCX MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x20],RAX JMP 0x00129476 LAB_00129549: MOV RDI,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RAX + 0x80] MOVSXD RAX,dword ptr [RSP + 0x40] IMUL RDX,RAX,0x28 CALL 0x001219e0 MOV qword ptr [RSP + 0x28],RAX CMP qword ptr [RSP + 0x28],0x0 JNZ 0x00129582 MOV dword ptr [RSP + 0x64],0xffffffff JMP 0x0012965c LAB_00129582: MOV RDI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x58] MOVSXD RAX,dword ptr [RAX + 0x78] IMUL RAX,RAX,0x28 ADD RDI,RAX MOV EAX,dword ptr [RSP + 0x40] MOV RCX,qword ptr [RSP + 0x58] SUB EAX,dword ptr [RCX + 0x78] CDQE IMUL RDX,RAX,0x28 XOR ESI,ESI CALL 0x0010e350 MOV RCX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RAX + 0x80],RCX MOV ECX,dword ptr [RSP + 0x40] MOV RAX,qword ptr [RSP + 0x58] MOV dword ptr [RAX + 0x78],ECX LAB_001295cd: MOV RAX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RAX + 0x80] MOV ECX,dword ptr [RSP + 0x54] IMUL RCX,RCX,0x28 ADD RAX,RCX MOV qword ptr [RSP + 0x30],RAX MOV ECX,dword ptr [RSP + 0x54] MOV RAX,qword ptr [RSP + 0x30] MOV dword ptr [RAX],ECX MOV RDI,qword ptr [RSP + 0x58] MOV ESI,dword ptr [RSP + 0x44] CALL 0x0015d640 MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x30] MOV dword ptr [RAX + 0x4],ECX MOV RAX,qword ptr [RSP + 0x48] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RSP + 0x48] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RSP + 0x48] MOV RCX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RSP + 0x48] MOV RCX,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x20],RCX MOV dword ptr [RSP + 0x64],0x0 LAB_0012965c: MOV EAX,dword ptr [RSP + 0x64] ADD RSP,0x68 RET
int4 JS_NewClass1(long param_1,uint param_2,long param_3,int4 param_4) { int4 uVar1; int iVar2; uint uVar3; long lVar4; long *plVar5; uint *puVar6; uint uStack_64; long local_48; int local_2c; int4 local_4; if (param_2 < 0x10000) { if ((param_2 < *(uint *)(param_1 + 0x78)) && (*(int *)(*(long *)(param_1 + 0x80) + (ulong)param_2 * 0x28) != 0)) { local_4 = 0xffffffff; } else { if (*(uint *)(param_1 + 0x78) <= param_2) { lVar4 = (long)(*(int *)(param_1 + 0x78) * 3); uVar1 = max_int(param_2 + 1,lVar4 / 2 & 0xffffffff,lVar4 % 2 & 0xffffffff); iVar2 = max_int(0x3d,uVar1); for (local_48 = *(long *)(param_1 + 0x90); local_48 != param_1 + 0x88; local_48 = *(long *)(local_48 + 8)) { lVar4 = js_realloc_rt(param_1,*(int8 *)(local_48 + 0x20),(long)iVar2 << 4); if (lVar4 == 0) { return 0xffffffff; } for (local_2c = *(int *)(param_1 + 0x78); local_2c < iVar2; local_2c = local_2c + 1) { plVar5 = (long *)(lVar4 + (long)local_2c * 0x10); *plVar5 = (ulong)uStack_64 << 0x20; plVar5[1] = 2; } *(long *)(local_48 + 0x20) = lVar4; } lVar4 = js_realloc_rt(param_1,*(int8 *)(param_1 + 0x80),(long)iVar2 * 0x28); if (lVar4 == 0) { return 0xffffffff; } memset((void *)(lVar4 + (long)*(int *)(param_1 + 0x78) * 0x28),0, (long)(iVar2 - *(int *)(param_1 + 0x78)) * 0x28); *(long *)(param_1 + 0x80) = lVar4; *(int *)(param_1 + 0x78) = iVar2; } puVar6 = (uint *)(*(long *)(param_1 + 0x80) + (ulong)param_2 * 0x28); *puVar6 = param_2; uVar3 = JS_DupAtomRT(param_1,param_4); puVar6[1] = uVar3; *(int8 *)(puVar6 + 2) = *(int8 *)(param_3 + 8); *(int8 *)(puVar6 + 4) = *(int8 *)(param_3 + 0x10); *(int8 *)(puVar6 + 6) = *(int8 *)(param_3 + 0x18); *(int8 *)(puVar6 + 8) = *(int8 *)(param_3 + 0x20); local_4 = 0; } } else { local_4 = 0xffffffff; } return local_4; }
5,581
JS_NewClass1
bluesky950520[P]quickjs/quickjs.c
static int JS_NewClass1(JSRuntime *rt, JSClassID class_id, const JSClassDef *class_def, JSAtom name) { int new_size, i; JSClass *cl, *new_class_array; struct list_head *el; if (class_id >= (1 << 16)) return -1; if (class_id < rt->class_count && rt->class_array[class_id].class_id != 0) return -1; if (class_id >= rt->class_count) { new_size = max_int(JS_CLASS_INIT_COUNT, max_int(class_id + 1, rt->class_count * 3 / 2)); /* reallocate the context class prototype array, if any */ list_for_each(el, &rt->context_list) { JSContext *ctx = list_entry(el, JSContext, link); JSValue *new_tab; new_tab = js_realloc_rt(rt, ctx->class_proto, sizeof(ctx->class_proto[0]) * new_size); if (!new_tab) return -1; for(i = rt->class_count; i < new_size; i++) new_tab[i] = JS_NULL; ctx->class_proto = new_tab; } /* reallocate the class array */ new_class_array = js_realloc_rt(rt, rt->class_array, sizeof(JSClass) * new_size); if (!new_class_array) return -1; memset(new_class_array + rt->class_count, 0, (new_size - rt->class_count) * sizeof(JSClass)); rt->class_array = new_class_array; rt->class_count = new_size; } cl = &rt->class_array[class_id]; cl->class_id = class_id; cl->class_name = JS_DupAtomRT(rt, name); cl->finalizer = class_def->finalizer; cl->gc_mark = class_def->gc_mark; cl->call = class_def->call; cl->exotic = class_def->exotic; return 0; }
O1
c
JS_NewClass1: movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpl $0xffff, %esi # imm = 0xFFFF ja 0x20adc pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %r14 movl 0x78(%rdi), %r9d cmpl %esi, %r9d jbe 0x20981 movq 0x80(%r14), %rdi movl %esi, %r8d leaq (%r8,%r8,4), %r8 cmpl $0x0, (%rdi,%r8,8) jne 0x20ace cmpl %esi, %r9d ja 0x20a8b movl %ecx, 0x4(%rsp) movq %rdx, 0x10(%rsp) movq %rsi, 0x8(%rsp) leal 0x1(%rsi), %ecx movl %r9d, %edx shrl %edx addl %r9d, %edx cmpl %edx, %ecx cmovgl %ecx, %edx cmpl $0x3e, %edx movl $0x3d, %ebx cmovgel %edx, %ebx leaq 0x88(%r14), %r12 movq 0x90(%r14), %r15 movl %ebx, %ebp cmpq %r12, %r15 je 0x20a1b movq %rbp, %r13 shlq $0x4, %r13 movq 0x20(%r15), %rsi movq %r14, %rdi movq %r13, %rdx callq 0x1cac2 testq %rax, %rax je 0x20ac9 movslq 0x78(%r14), %rdx cmpl %ebx, %edx jge 0x20a0e movq %rbp, %rcx subq %rdx, %rcx shlq $0x4, %rdx addq %rax, %rdx addq $0x8, %rdx movl $0x0, -0x8(%rdx) movq $0x2, (%rdx) addq $0x10, %rdx decq %rcx jne 0x209f7 movq %rax, 0x20(%r15) movq 0x8(%r15), %r15 cmpq %r12, %r15 jne 0x209c6 movq 0x80(%r14), %rsi shlq $0x3, %rbp leaq (,%rbp,4), %rdx addq %rbp, %rdx movq %r14, %rdi callq 0x1cac2 movq %rax, %r13 testq %rax, %rax movl $0xffffffff, %eax # imm = 0xFFFFFFFF je 0x20ace movslq 0x78(%r14), %rax leaq (%rax,%rax,4), %rcx leaq (,%rcx,8), %rdi addq %r13, %rdi movslq %ebx, %rcx subq %rax, %rcx shlq $0x3, %rcx leaq (%rcx,%rcx,4), %rdx xorl %esi, %esi callq 0xe350 movq %r13, 0x80(%r14) movl %ebx, 0x78(%r14) movq 0x10(%rsp), %rdx movl 0x4(%rsp), %ecx movq 0x8(%rsp), %rsi movq 0x80(%r14), %rax movl %esi, %edi leaq (%rdi,%rdi,4), %rdi leaq (%rax,%rdi,8), %rax movl %esi, (%rax) cmpl $0xe0, %ecx jl 0x20ab2 movq 0x68(%r14), %rdi movl %ecx, %esi movq (%rdi,%rsi,8), %rsi incl (%rsi) movl %ecx, 0x4(%rax) movups 0x8(%rdx), %xmm0 movups %xmm0, 0x8(%rax) movups 0x18(%rdx), %xmm0 movups %xmm0, 0x18(%rax) xorl %eax, %eax jmp 0x20ace movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
JS_NewClass1: mov eax, 0FFFFFFFFh cmp esi, 0FFFFh ja locret_20ADC push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rdi mov r9d, [rdi+78h] cmp r9d, esi jbe short loc_20981 mov rdi, [r14+80h] mov r8d, esi lea r8, [r8+r8*4] cmp dword ptr [rdi+r8*8], 0 jnz loc_20ACE cmp r9d, esi ja loc_20A8B loc_20981: mov [rsp+48h+var_44], ecx mov [rsp+48h+var_38], rdx mov [rsp+48h+var_40], rsi lea ecx, [rsi+1] mov edx, r9d shr edx, 1 add edx, r9d cmp ecx, edx cmovg edx, ecx cmp edx, 3Eh ; '>' mov ebx, 3Dh ; '=' cmovge ebx, edx lea r12, [r14+88h] mov r15, [r14+90h] mov ebp, ebx cmp r15, r12 jz short loc_20A1B mov r13, rbp shl r13, 4 loc_209C6: mov rsi, [r15+20h] mov rdi, r14 mov rdx, r13 call js_realloc_rt test rax, rax jz loc_20AC9 movsxd rdx, dword ptr [r14+78h] cmp edx, ebx jge short loc_20A0E mov rcx, rbp sub rcx, rdx shl rdx, 4 add rdx, rax add rdx, 8 loc_209F7: mov dword ptr [rdx-8], 0 mov qword ptr [rdx], 2 add rdx, 10h dec rcx jnz short loc_209F7 loc_20A0E: mov [r15+20h], rax mov r15, [r15+8] cmp r15, r12 jnz short loc_209C6 loc_20A1B: mov rsi, [r14+80h] shl rbp, 3 lea rdx, ds:0[rbp*4] add rdx, rbp mov rdi, r14 call js_realloc_rt mov r13, rax test rax, rax mov eax, 0FFFFFFFFh jz loc_20ACE movsxd rax, dword ptr [r14+78h] lea rcx, [rax+rax*4] lea rdi, ds:0[rcx*8] add rdi, r13 movsxd rcx, ebx sub rcx, rax shl rcx, 3 lea rdx, [rcx+rcx*4] xor esi, esi call _memset mov [r14+80h], r13 mov [r14+78h], ebx mov rdx, [rsp+48h+var_38] mov ecx, [rsp+48h+var_44] mov rsi, [rsp+48h+var_40] loc_20A8B: mov rax, [r14+80h] mov edi, esi lea rdi, [rdi+rdi*4] lea rax, [rax+rdi*8] mov [rax], esi cmp ecx, 0E0h jl short loc_20AB2 mov rdi, [r14+68h] mov esi, ecx mov rsi, [rdi+rsi*8] inc dword ptr [rsi] loc_20AB2: mov [rax+4], ecx movups xmm0, xmmword ptr [rdx+8] movups xmmword ptr [rax+8], xmm0 movups xmm0, xmmword ptr [rdx+18h] movups xmmword ptr [rax+18h], xmm0 xor eax, eax jmp short loc_20ACE loc_20AC9: mov eax, 0FFFFFFFFh loc_20ACE: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp locret_20ADC: retn
long long JS_NewClass1(long long a1, unsigned int a2, long long a3, int a4) { long long result; // rax unsigned int v5; // r9d int v6; // edx unsigned int v7; // ebx long long v8; // r15 long long v9; // rax long long v10; // rdx long long v11; // rcx _QWORD *v12; // rdx long long v13; // r13 long long v14; // rax _DWORD *v15; // rsi int v16; // [rsp+0h] [rbp-44h] long long v17; // [rsp+Ch] [rbp-38h] result = 0xFFFFFFFFLL; if ( a2 > 0xFFFF ) return result; v5 = *(_DWORD *)(a1 + 120); if ( v5 > a2 ) { if ( *(_DWORD *)(*(_QWORD *)(a1 + 128) + 40LL * a2) ) return result; if ( v5 > a2 ) goto LABEL_17; } v16 = a4; v17 = a3; v6 = v5 + (v5 >> 1); if ( (int)(a2 + 1) > v6 ) v6 = a2 + 1; v7 = 61; if ( v6 >= 62 ) v7 = v6; v8 = *(_QWORD *)(a1 + 144); if ( v8 == a1 + 136 ) { LABEL_15: v13 = js_realloc_rt(a1, *(_QWORD *)(a1 + 128), 40LL * v7); result = 0xFFFFFFFFLL; if ( !v13 ) return result; memset(v13 + 40LL * *(int *)(a1 + 120), 0LL, 40 * ((int)v7 - (long long)*(int *)(a1 + 120))); *(_QWORD *)(a1 + 128) = v13; *(_DWORD *)(a1 + 120) = v7; a3 = v17; a4 = v16; LABEL_17: v14 = *(_QWORD *)(a1 + 128) + 40LL * a2; *(_DWORD *)v14 = a2; if ( a4 >= 224 ) { v15 = *(_DWORD **)(*(_QWORD *)(a1 + 104) + 8LL * (unsigned int)a4); ++*v15; } *(_DWORD *)(v14 + 4) = a4; *(_OWORD *)(v14 + 8) = *(_OWORD *)(a3 + 8); *(_OWORD *)(v14 + 24) = *(_OWORD *)(a3 + 24); return 0LL; } while ( 1 ) { v9 = js_realloc_rt(a1, *(_QWORD *)(v8 + 32), 16LL * v7); if ( !v9 ) return 0xFFFFFFFFLL; v10 = *(int *)(a1 + 120); if ( (int)v10 < (int)v7 ) { v11 = v7 - v10; v12 = (_QWORD *)(v9 + 16 * v10 + 8); do { *((_DWORD *)v12 - 2) = 0; *v12 = 2LL; v12 += 2; --v11; } while ( v11 ); } *(_QWORD *)(v8 + 32) = v9; v8 = *(_QWORD *)(v8 + 8); if ( v8 == a1 + 136 ) goto LABEL_15; } }
5,582
JS_NewClass1
bluesky950520[P]quickjs/quickjs.c
static int JS_NewClass1(JSRuntime *rt, JSClassID class_id, const JSClassDef *class_def, JSAtom name) { int new_size, i; JSClass *cl, *new_class_array; struct list_head *el; if (class_id >= (1 << 16)) return -1; if (class_id < rt->class_count && rt->class_array[class_id].class_id != 0) return -1; if (class_id >= rt->class_count) { new_size = max_int(JS_CLASS_INIT_COUNT, max_int(class_id + 1, rt->class_count * 3 / 2)); /* reallocate the context class prototype array, if any */ list_for_each(el, &rt->context_list) { JSContext *ctx = list_entry(el, JSContext, link); JSValue *new_tab; new_tab = js_realloc_rt(rt, ctx->class_proto, sizeof(ctx->class_proto[0]) * new_size); if (!new_tab) return -1; for(i = rt->class_count; i < new_size; i++) new_tab[i] = JS_NULL; ctx->class_proto = new_tab; } /* reallocate the class array */ new_class_array = js_realloc_rt(rt, rt->class_array, sizeof(JSClass) * new_size); if (!new_class_array) return -1; memset(new_class_array + rt->class_count, 0, (new_size - rt->class_count) * sizeof(JSClass)); rt->class_array = new_class_array; rt->class_count = new_size; } cl = &rt->class_array[class_id]; cl->class_id = class_id; cl->class_name = JS_DupAtomRT(rt, name); cl->finalizer = class_def->finalizer; cl->gc_mark = class_def->gc_mark; cl->call = class_def->call; cl->exotic = class_def->exotic; return 0; }
O2
c
JS_NewClass1: pushq $-0x1 popq %rax cmpl $0xffff, %esi # imm = 0xFFFF ja 0x1acb2 pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %rbp movl %esi, %r15d movq %rdi, %r14 movl 0x78(%rdi), %esi cmpl %r15d, %esi jbe 0x1ab86 movq 0x80(%r14), %rbx movl %r15d, %esi imulq $0x28, %rsi, %rdx cmpl $0x0, (%rbx,%rdx) jne 0x1aca4 jmp 0x1ac6a movl %ecx, 0xc(%rsp) movq %rbp, 0x10(%rsp) leal 0x1(%r15), %ecx movl %esi, %edx shrl %edx addl %esi, %edx cmpl %edx, %ecx cmoval %ecx, %edx cmpl $0x3e, %edx pushq $0x3d popq %r13 cmovael %edx, %r13d leaq 0x88(%r14), %rbp leaq 0x90(%r14), %r12 movq %r13, %rbx shlq $0x4, %rbx movq (%r12), %r12 cmpq %rbp, %r12 je 0x1ac16 movq 0x20(%r12), %rsi movq %r14, %rdi movq %rbx, %rdx callq 0x17109 testq %rax, %rax je 0x1aca1 movslq 0x78(%r14), %rcx movq %rcx, %rdx shlq $0x4, %rdx addq %rax, %rdx addq $0x8, %rdx cmpq %r13, %rcx jge 0x1ac0b andl $0x0, -0x8(%rdx) movq $0x2, (%rdx) incq %rcx addq $0x10, %rdx jmp 0x1abf2 movq %rax, 0x20(%r12) addq $0x8, %r12 jmp 0x1abbe movq 0x80(%r14), %rsi imulq $0x28, %r13, %rdx movq %r14, %rdi callq 0x17109 movq %rax, %rbx testq %rax, %rax movq 0x10(%rsp), %rbp pushq $-0x1 popq %rax je 0x1aca4 movslq 0x78(%r14), %rax imulq $0x28, %rax, %rdi addq %rbx, %rdi movslq %r13d, %r12 movq %r12, %rcx subq %rax, %rcx imulq $0x28, %rcx, %rdx xorl %esi, %esi callq 0xe360 movq %rbx, 0x80(%r14) movl %r12d, 0x78(%r14) movl 0xc(%rsp), %ecx movl %r15d, %esi imulq $0x28, %rsi, %rdx leaq (%rbx,%rdx), %rax movl %r15d, (%rbx,%rdx) cmpl $0xe0, %ecx jl 0x1ac8a movq 0x68(%r14), %rsi movl %ecx, %edx movq (%rsi,%rdx,8), %rdx incl (%rdx) movl %ecx, 0x4(%rax) movups 0x8(%rbp), %xmm0 movups %xmm0, 0x8(%rax) movups 0x18(%rbp), %xmm0 movups %xmm0, 0x18(%rax) xorl %eax, %eax jmp 0x1aca4 pushq $-0x1 popq %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
JS_NewClass1: push 0FFFFFFFFFFFFFFFFh pop rax cmp esi, 0FFFFh ja locret_1ACB2 push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbp, rdx mov r15d, esi mov r14, rdi mov esi, [rdi+78h] cmp esi, r15d jbe short loc_1AB86 mov rbx, [r14+80h] mov esi, r15d imul rdx, rsi, 28h ; '(' cmp dword ptr [rbx+rdx], 0 jnz loc_1ACA4 jmp loc_1AC6A loc_1AB86: mov [rsp+48h+var_3C], ecx mov [rsp+48h+var_38], rbp lea ecx, [r15+1] mov edx, esi shr edx, 1 add edx, esi cmp ecx, edx cmova edx, ecx cmp edx, 3Eh ; '>' push 3Dh ; '=' pop r13 cmovnb r13d, edx lea rbp, [r14+88h] lea r12, [r14+90h] mov rbx, r13 shl rbx, 4 loc_1ABBE: mov r12, [r12] cmp r12, rbp jz short loc_1AC16 mov rsi, [r12+20h] mov rdi, r14 mov rdx, rbx call js_realloc_rt test rax, rax jz loc_1ACA1 movsxd rcx, dword ptr [r14+78h] mov rdx, rcx shl rdx, 4 add rdx, rax add rdx, 8 loc_1ABF2: cmp rcx, r13 jge short loc_1AC0B and dword ptr [rdx-8], 0 mov qword ptr [rdx], 2 inc rcx add rdx, 10h jmp short loc_1ABF2 loc_1AC0B: mov [r12+20h], rax add r12, 8 jmp short loc_1ABBE loc_1AC16: mov rsi, [r14+80h] imul rdx, r13, 28h ; '(' mov rdi, r14 call js_realloc_rt mov rbx, rax test rax, rax mov rbp, [rsp+48h+var_38] push 0FFFFFFFFFFFFFFFFh pop rax jz short loc_1ACA4 movsxd rax, dword ptr [r14+78h] imul rdi, rax, 28h ; '(' add rdi, rbx movsxd r12, r13d mov rcx, r12 sub rcx, rax imul rdx, rcx, 28h ; '(' xor esi, esi call _memset mov [r14+80h], rbx mov [r14+78h], r12d mov ecx, [rsp+48h+var_3C] mov esi, r15d loc_1AC6A: imul rdx, rsi, 28h ; '(' lea rax, [rbx+rdx] mov [rbx+rdx], r15d cmp ecx, 0E0h jl short loc_1AC8A mov rsi, [r14+68h] mov edx, ecx mov rdx, [rsi+rdx*8] inc dword ptr [rdx] loc_1AC8A: mov [rax+4], ecx movups xmm0, xmmword ptr [rbp+8] movups xmmword ptr [rax+8], xmm0 movups xmm0, xmmword ptr [rbp+18h] movups xmmword ptr [rax+18h], xmm0 xor eax, eax jmp short loc_1ACA4 loc_1ACA1: push 0FFFFFFFFFFFFFFFFh pop rax loc_1ACA4: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp locret_1ACB2: retn
long long JS_NewClass1(long long a1, unsigned int a2, long long a3, int a4) { long long result; // rax long long v5; // rbp unsigned int v7; // esi long long v8; // rbx long long v9; // rsi unsigned int v10; // edx long long v11; // r13 long long *i; // r12 long long v13; // r12 long long v14; // rax long long v15; // rcx _QWORD *v16; // rdx long long v17; // rax _DWORD *v18; // rdx int v19; // [rsp+0h] [rbp-3Ch] result = -1LL; if ( a2 <= 0xFFFF ) { v5 = a3; v7 = *(_DWORD *)(a1 + 120); if ( v7 <= a2 ) { v19 = a4; v10 = v7 + (v7 >> 1); if ( a2 + 1 > v10 ) v10 = a2 + 1; v11 = 61LL; if ( v10 >= 0x3E ) v11 = v10; for ( i = (long long *)(a1 + 144); ; i = (long long *)(v13 + 8) ) { v13 = *i; if ( v13 == a1 + 136 ) break; v14 = js_realloc_rt(a1, *(_QWORD *)(v13 + 32), 16 * v11); if ( !v14 ) return -1LL; v15 = *(int *)(a1 + 120); v16 = (_QWORD *)(v14 + 16 * v15 + 8); while ( v15 < v11 ) { *((_DWORD *)v16 - 2) = 0; *v16 = 2LL; ++v15; v16 += 2; } *(_QWORD *)(v13 + 32) = v14; } v8 = js_realloc_rt(a1, *(_QWORD *)(a1 + 128), 40 * v11); v5 = a3; result = -1LL; if ( !v8 ) return result; memset(v8 + 40LL * *(int *)(a1 + 120), 0LL, 40 * ((int)v11 - (long long)*(int *)(a1 + 120))); *(_QWORD *)(a1 + 128) = v8; *(_DWORD *)(a1 + 120) = v11; a4 = v19; v9 = a2; } else { v8 = *(_QWORD *)(a1 + 128); v9 = a2; if ( *(_DWORD *)(v8 + 40LL * a2) ) return result; } v17 = v8 + 40 * v9; *(_DWORD *)v17 = a2; if ( a4 >= 224 ) { v18 = *(_DWORD **)(*(_QWORD *)(a1 + 104) + 8LL * (unsigned int)a4); ++*v18; } *(_DWORD *)(v17 + 4) = a4; *(_OWORD *)(v17 + 8) = *(_OWORD *)(v5 + 8); *(_OWORD *)(v17 + 24) = *(_OWORD *)(v5 + 24); return 0LL; } return result; }
JS_NewClass1: PUSH -0x1 POP RAX CMP ESI,0xffff JA 0x0011acb2 PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBP,RDX MOV R15D,ESI MOV R14,RDI MOV ESI,dword ptr [RDI + 0x78] CMP ESI,R15D JBE 0x0011ab86 MOV RBX,qword ptr [R14 + 0x80] MOV ESI,R15D IMUL RDX,RSI,0x28 CMP dword ptr [RBX + RDX*0x1],0x0 JNZ 0x0011aca4 JMP 0x0011ac6a LAB_0011ab86: MOV dword ptr [RSP + 0xc],ECX MOV qword ptr [RSP + 0x10],RBP LEA ECX,[R15 + 0x1] MOV EDX,ESI SHR EDX,0x1 ADD EDX,ESI CMP ECX,EDX CMOVA EDX,ECX CMP EDX,0x3e PUSH 0x3d POP R13 CMOVNC R13D,EDX LEA RBP,[R14 + 0x88] LEA R12,[R14 + 0x90] MOV RBX,R13 SHL RBX,0x4 LAB_0011abbe: MOV R12,qword ptr [R12] CMP R12,RBP JZ 0x0011ac16 MOV RSI,qword ptr [R12 + 0x20] MOV RDI,R14 MOV RDX,RBX CALL 0x00117109 TEST RAX,RAX JZ 0x0011aca1 MOVSXD RCX,dword ptr [R14 + 0x78] MOV RDX,RCX SHL RDX,0x4 ADD RDX,RAX ADD RDX,0x8 LAB_0011abf2: CMP RCX,R13 JGE 0x0011ac0b AND dword ptr [RDX + -0x8],0x0 MOV qword ptr [RDX],0x2 INC RCX ADD RDX,0x10 JMP 0x0011abf2 LAB_0011ac0b: MOV qword ptr [R12 + 0x20],RAX ADD R12,0x8 JMP 0x0011abbe LAB_0011ac16: MOV RSI,qword ptr [R14 + 0x80] IMUL RDX,R13,0x28 MOV RDI,R14 CALL 0x00117109 MOV RBX,RAX TEST RAX,RAX MOV RBP,qword ptr [RSP + 0x10] PUSH -0x1 POP RAX JZ 0x0011aca4 MOVSXD RAX,dword ptr [R14 + 0x78] IMUL RDI,RAX,0x28 ADD RDI,RBX MOVSXD R12,R13D MOV RCX,R12 SUB RCX,RAX IMUL RDX,RCX,0x28 XOR ESI,ESI CALL 0x0010e360 MOV qword ptr [R14 + 0x80],RBX MOV dword ptr [R14 + 0x78],R12D MOV ECX,dword ptr [RSP + 0xc] MOV ESI,R15D LAB_0011ac6a: IMUL RDX,RSI,0x28 LEA RAX,[RBX + RDX*0x1] MOV dword ptr [RBX + RDX*0x1],R15D CMP ECX,0xe0 JL 0x0011ac8a MOV RSI,qword ptr [R14 + 0x68] MOV EDX,ECX MOV RDX,qword ptr [RSI + RDX*0x8] INC dword ptr [RDX] LAB_0011ac8a: MOV dword ptr [RAX + 0x4],ECX MOVUPS XMM0,xmmword ptr [RBP + 0x8] MOVUPS xmmword ptr [RAX + 0x8],XMM0 MOVUPS XMM0,xmmword ptr [RBP + 0x18] MOVUPS xmmword ptr [RAX + 0x18],XMM0 XOR EAX,EAX JMP 0x0011aca4 LAB_0011aca1: PUSH -0x1 POP RAX LAB_0011aca4: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP LAB_0011acb2: RET
int8 JS_NewClass1(long param_1,uint param_2,long param_3,uint param_4) { int *piVar1; long lVar2; long lVar3; int8 uVar4; long lVar5; uint uVar6; int8 *puVar7; long *plVar8; ulong uVar9; uVar4 = 0xffffffffffffffff; if (param_2 < 0x10000) { uVar6 = *(uint *)(param_1 + 0x78); if (param_2 < uVar6) { lVar3 = *(long *)(param_1 + 0x80); if (*(int *)(lVar3 + (ulong)param_2 * 0x28) != 0) { return 0xffffffffffffffff; } } else { uVar6 = (uVar6 >> 1) + uVar6; if (uVar6 < param_2 + 1) { uVar6 = param_2 + 1; } uVar9 = 0x3d; if (0x3d < uVar6) { uVar9 = (ulong)uVar6; } plVar8 = (long *)(param_1 + 0x90); while (lVar3 = *plVar8, lVar3 != param_1 + 0x88) { lVar2 = js_realloc_rt(param_1,*(int8 *)(lVar3 + 0x20),uVar9 << 4); if (lVar2 == 0) { return 0xffffffffffffffff; } lVar5 = (long)*(int *)(param_1 + 0x78); puVar7 = (int8 *)(lVar5 * 0x10 + lVar2 + 8); for (; lVar5 < (long)uVar9; lVar5 = lVar5 + 1) { *(int4 *)(puVar7 + -1) = 0; *puVar7 = 2; puVar7 = puVar7 + 2; } *(long *)(lVar3 + 0x20) = lVar2; plVar8 = (long *)(lVar3 + 8); } lVar3 = js_realloc_rt(param_1,*(int8 *)(param_1 + 0x80),uVar9 * 0x28); if (lVar3 == 0) { return 0xffffffffffffffff; } memset((void *)((long)*(int *)(param_1 + 0x78) * 0x28 + lVar3),0, ((long)(int)uVar9 - (long)*(int *)(param_1 + 0x78)) * 0x28); *(long *)(param_1 + 0x80) = lVar3; *(int *)(param_1 + 0x78) = (int)uVar9; } lVar2 = lVar3 + (ulong)param_2 * 0x28; *(uint *)(lVar3 + (ulong)param_2 * 0x28) = param_2; if (0xdf < (int)param_4) { piVar1 = *(int **)(*(long *)(param_1 + 0x68) + (ulong)param_4 * 8); *piVar1 = *piVar1 + 1; } *(uint *)(lVar2 + 4) = param_4; uVar4 = *(int8 *)(param_3 + 0x10); *(int8 *)(lVar2 + 8) = *(int8 *)(param_3 + 8); *(int8 *)(lVar2 + 0x10) = uVar4; uVar4 = *(int8 *)(param_3 + 0x20); *(int8 *)(lVar2 + 0x18) = *(int8 *)(param_3 + 0x18); *(int8 *)(lVar2 + 0x20) = uVar4; uVar4 = 0; } return uVar4; }
5,583
JS_NewClass1
bluesky950520[P]quickjs/quickjs.c
static int JS_NewClass1(JSRuntime *rt, JSClassID class_id, const JSClassDef *class_def, JSAtom name) { int new_size, i; JSClass *cl, *new_class_array; struct list_head *el; if (class_id >= (1 << 16)) return -1; if (class_id < rt->class_count && rt->class_array[class_id].class_id != 0) return -1; if (class_id >= rt->class_count) { new_size = max_int(JS_CLASS_INIT_COUNT, max_int(class_id + 1, rt->class_count * 3 / 2)); /* reallocate the context class prototype array, if any */ list_for_each(el, &rt->context_list) { JSContext *ctx = list_entry(el, JSContext, link); JSValue *new_tab; new_tab = js_realloc_rt(rt, ctx->class_proto, sizeof(ctx->class_proto[0]) * new_size); if (!new_tab) return -1; for(i = rt->class_count; i < new_size; i++) new_tab[i] = JS_NULL; ctx->class_proto = new_tab; } /* reallocate the class array */ new_class_array = js_realloc_rt(rt, rt->class_array, sizeof(JSClass) * new_size); if (!new_class_array) return -1; memset(new_class_array + rt->class_count, 0, (new_size - rt->class_count) * sizeof(JSClass)); rt->class_array = new_class_array; rt->class_count = new_size; } cl = &rt->class_array[class_id]; cl->class_id = class_id; cl->class_name = JS_DupAtomRT(rt, name); cl->finalizer = class_def->finalizer; cl->gc_mark = class_def->gc_mark; cl->call = class_def->call; cl->exotic = class_def->exotic; return 0; }
O3
c
JS_NewClass1: movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpl $0xffff, %esi # imm = 0xFFFF ja 0x2122b pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %ecx, %ebp movq %rdx, %r12 movl %esi, %r15d movq %rdi, %r14 movl 0x78(%rdi), %esi cmpl %r15d, %esi jbe 0x210e6 movq 0x80(%r14), %rbx movl %r15d, %edx leaq (%rdx,%rdx,4), %rcx cmpl $0x0, (%rbx,%rcx,8) jne 0x2121d jmp 0x211de movl %ebp, 0xc(%rsp) movq %r12, 0x10(%rsp) leal 0x1(%r15), %ecx movl %esi, %edx shrl %edx addl %esi, %edx cmpl %edx, %ecx cmoval %ecx, %edx cmpl $0x3e, %edx movl $0x3d, %r13d cmovael %edx, %r13d leaq 0x88(%r14), %rbp movq 0x90(%r14), %r12 cmpq %rbp, %r12 je 0x2117e movq %r13, %rbx shlq $0x4, %rbx movq 0x20(%r12), %rsi movq %r14, %rdi movq %rbx, %rdx callq 0x1d3aa testq %rax, %rax je 0x21218 movslq 0x78(%r14), %rdx cmpl %r13d, %edx jge 0x2116f movq %r13, %rcx subq %rdx, %rcx shlq $0x4, %rdx addq %rax, %rdx addq $0x8, %rdx movl $0x0, -0x8(%rdx) movq $0x2, (%rdx) addq $0x10, %rdx decq %rcx jne 0x21158 movq %rax, 0x20(%r12) movq 0x8(%r12), %r12 cmpq %rbp, %r12 jne 0x21125 movq 0x80(%r14), %rsi leaq (,%r13,8), %rax leaq (%rax,%rax,4), %rdx movq %r14, %rdi callq 0x1d3aa movq %rax, %rbx testq %rax, %rax movq 0x10(%rsp), %r12 movl 0xc(%rsp), %ebp movl $0xffffffff, %eax # imm = 0xFFFFFFFF je 0x2121d movslq 0x78(%r14), %rax leaq (%rax,%rax,4), %rcx leaq (%rbx,%rcx,8), %rdi movslq %r13d, %rcx subq %rax, %rcx shlq $0x3, %rcx leaq (%rcx,%rcx,4), %rdx xorl %esi, %esi callq 0xe350 movq %rbx, 0x80(%r14) movl %r13d, 0x78(%r14) movl %r15d, %edx leaq (%rdx,%rdx,4), %rax leaq (%rbx,%rax,8), %rax movl %r15d, (%rax) cmpl $0xe0, %ebp jl 0x211fd movq 0x68(%r14), %rcx movl %ebp, %edx movq (%rcx,%rdx,8), %rcx incl (%rcx) movl %ebp, 0x4(%rax) movups 0x8(%r12), %xmm0 movups %xmm0, 0x8(%rax) movups 0x18(%r12), %xmm0 movups %xmm0, 0x18(%rax) xorl %eax, %eax jmp 0x2121d movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
JS_NewClass1: mov eax, 0FFFFFFFFh cmp esi, 0FFFFh ja locret_2122B push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov ebp, ecx mov r12, rdx mov r15d, esi mov r14, rdi mov esi, [rdi+78h] cmp esi, r15d jbe short loc_210E6 mov rbx, [r14+80h] mov edx, r15d lea rcx, [rdx+rdx*4] cmp dword ptr [rbx+rcx*8], 0 jnz loc_2121D jmp loc_211DE loc_210E6: mov [rsp+48h+var_3C], ebp mov [rsp+48h+var_38], r12 lea ecx, [r15+1] mov edx, esi shr edx, 1 add edx, esi cmp ecx, edx cmova edx, ecx cmp edx, 3Eh ; '>' mov r13d, 3Dh ; '=' cmovnb r13d, edx lea rbp, [r14+88h] mov r12, [r14+90h] cmp r12, rbp jz short loc_2117E mov rbx, r13 shl rbx, 4 loc_21125: mov rsi, [r12+20h] mov rdi, r14 mov rdx, rbx call js_realloc_rt test rax, rax jz loc_21218 movsxd rdx, dword ptr [r14+78h] cmp edx, r13d jge short loc_2116F mov rcx, r13 sub rcx, rdx shl rdx, 4 add rdx, rax add rdx, 8 loc_21158: mov dword ptr [rdx-8], 0 mov qword ptr [rdx], 2 add rdx, 10h dec rcx jnz short loc_21158 loc_2116F: mov [r12+20h], rax mov r12, [r12+8] cmp r12, rbp jnz short loc_21125 loc_2117E: mov rsi, [r14+80h] lea rax, ds:0[r13*8] lea rdx, [rax+rax*4] mov rdi, r14 call js_realloc_rt mov rbx, rax test rax, rax mov r12, [rsp+48h+var_38] mov ebp, [rsp+48h+var_3C] mov eax, 0FFFFFFFFh jz short loc_2121D movsxd rax, dword ptr [r14+78h] lea rcx, [rax+rax*4] lea rdi, [rbx+rcx*8] movsxd rcx, r13d sub rcx, rax shl rcx, 3 lea rdx, [rcx+rcx*4] xor esi, esi call _memset mov [r14+80h], rbx mov [r14+78h], r13d mov edx, r15d loc_211DE: lea rax, [rdx+rdx*4] lea rax, [rbx+rax*8] mov [rax], r15d cmp ebp, 0E0h jl short loc_211FD mov rcx, [r14+68h] mov edx, ebp mov rcx, [rcx+rdx*8] inc dword ptr [rcx] loc_211FD: mov [rax+4], ebp movups xmm0, xmmword ptr [r12+8] movups xmmword ptr [rax+8], xmm0 movups xmm0, xmmword ptr [r12+18h] movups xmmword ptr [rax+18h], xmm0 xor eax, eax jmp short loc_2121D loc_21218: mov eax, 0FFFFFFFFh loc_2121D: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp locret_2122B: retn
long long JS_NewClass1(long long a1, unsigned int a2, long long a3, int a4) { long long result; // rax long long v6; // r12 unsigned int v8; // esi long long v9; // rbx long long v10; // rdx unsigned int v11; // edx long long v12; // r13 long long v13; // r12 long long v14; // rax long long v15; // rdx long long v16; // rcx _QWORD *v17; // rdx long long v18; // rax _DWORD *v19; // rcx result = 0xFFFFFFFFLL; if ( a2 > 0xFFFF ) return result; v6 = a3; v8 = *(_DWORD *)(a1 + 120); if ( v8 > a2 ) { v9 = *(_QWORD *)(a1 + 128); v10 = a2; if ( *(_DWORD *)(v9 + 40LL * a2) ) return result; LABEL_17: v18 = v9 + 40 * v10; *(_DWORD *)v18 = a2; if ( a4 >= 224 ) { v19 = *(_DWORD **)(*(_QWORD *)(a1 + 104) + 8LL * (unsigned int)a4); ++*v19; } *(_DWORD *)(v18 + 4) = a4; *(_OWORD *)(v18 + 8) = *(_OWORD *)(v6 + 8); *(_OWORD *)(v18 + 24) = *(_OWORD *)(v6 + 24); return 0LL; } v11 = v8 + (v8 >> 1); if ( a2 + 1 > v11 ) v11 = a2 + 1; v12 = 61LL; if ( v11 >= 0x3E ) v12 = v11; v13 = *(_QWORD *)(a1 + 144); if ( v13 == a1 + 136 ) { LABEL_15: v9 = js_realloc_rt(a1, *(_QWORD *)(a1 + 128), 40 * v12); v6 = a3; result = 0xFFFFFFFFLL; if ( !v9 ) return result; memset(v9 + 40LL * *(int *)(a1 + 120), 0LL, 40 * ((int)v12 - (long long)*(int *)(a1 + 120))); *(_QWORD *)(a1 + 128) = v9; *(_DWORD *)(a1 + 120) = v12; v10 = a2; goto LABEL_17; } while ( 1 ) { v14 = js_realloc_rt(a1, *(_QWORD *)(v13 + 32), 16 * v12); if ( !v14 ) return 0xFFFFFFFFLL; v15 = *(int *)(a1 + 120); if ( (int)v15 < (int)v12 ) { v16 = v12 - v15; v17 = (_QWORD *)(v14 + 16 * v15 + 8); do { *((_DWORD *)v17 - 2) = 0; *v17 = 2LL; v17 += 2; --v16; } while ( v16 ); } *(_QWORD *)(v13 + 32) = v14; v13 = *(_QWORD *)(v13 + 8); if ( v13 == a1 + 136 ) goto LABEL_15; } }
JS_NewClass1: MOV EAX,0xffffffff CMP ESI,0xffff JA 0x0012122b PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV EBP,ECX MOV R12,RDX MOV R15D,ESI MOV R14,RDI MOV ESI,dword ptr [RDI + 0x78] CMP ESI,R15D JBE 0x001210e6 MOV RBX,qword ptr [R14 + 0x80] MOV EDX,R15D LEA RCX,[RDX + RDX*0x4] CMP dword ptr [RBX + RCX*0x8],0x0 JNZ 0x0012121d JMP 0x001211de LAB_001210e6: MOV dword ptr [RSP + 0xc],EBP MOV qword ptr [RSP + 0x10],R12 LEA ECX,[R15 + 0x1] MOV EDX,ESI SHR EDX,0x1 ADD EDX,ESI CMP ECX,EDX CMOVA EDX,ECX CMP EDX,0x3e MOV R13D,0x3d CMOVNC R13D,EDX LEA RBP,[R14 + 0x88] MOV R12,qword ptr [R14 + 0x90] CMP R12,RBP JZ 0x0012117e MOV RBX,R13 SHL RBX,0x4 LAB_00121125: MOV RSI,qword ptr [R12 + 0x20] MOV RDI,R14 MOV RDX,RBX CALL 0x0011d3aa TEST RAX,RAX JZ 0x00121218 MOVSXD RDX,dword ptr [R14 + 0x78] CMP EDX,R13D JGE 0x0012116f MOV RCX,R13 SUB RCX,RDX SHL RDX,0x4 ADD RDX,RAX ADD RDX,0x8 LAB_00121158: MOV dword ptr [RDX + -0x8],0x0 MOV qword ptr [RDX],0x2 ADD RDX,0x10 DEC RCX JNZ 0x00121158 LAB_0012116f: MOV qword ptr [R12 + 0x20],RAX MOV R12,qword ptr [R12 + 0x8] CMP R12,RBP JNZ 0x00121125 LAB_0012117e: MOV RSI,qword ptr [R14 + 0x80] LEA RAX,[R13*0x8] LEA RDX,[RAX + RAX*0x4] MOV RDI,R14 CALL 0x0011d3aa MOV RBX,RAX TEST RAX,RAX MOV R12,qword ptr [RSP + 0x10] MOV EBP,dword ptr [RSP + 0xc] MOV EAX,0xffffffff JZ 0x0012121d MOVSXD RAX,dword ptr [R14 + 0x78] LEA RCX,[RAX + RAX*0x4] LEA RDI,[RBX + RCX*0x8] MOVSXD RCX,R13D SUB RCX,RAX SHL RCX,0x3 LEA RDX,[RCX + RCX*0x4] XOR ESI,ESI CALL 0x0010e350 MOV qword ptr [R14 + 0x80],RBX MOV dword ptr [R14 + 0x78],R13D MOV EDX,R15D LAB_001211de: LEA RAX,[RDX + RDX*0x4] LEA RAX,[RBX + RAX*0x8] MOV dword ptr [RAX],R15D CMP EBP,0xe0 JL 0x001211fd MOV RCX,qword ptr [R14 + 0x68] MOV EDX,EBP MOV RCX,qword ptr [RCX + RDX*0x8] INC dword ptr [RCX] LAB_001211fd: MOV dword ptr [RAX + 0x4],EBP MOVUPS XMM0,xmmword ptr [R12 + 0x8] MOVUPS xmmword ptr [RAX + 0x8],XMM0 MOVUPS XMM0,xmmword ptr [R12 + 0x18] MOVUPS xmmword ptr [RAX + 0x18],XMM0 XOR EAX,EAX JMP 0x0012121d LAB_00121218: MOV EAX,0xffffffff LAB_0012121d: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP LAB_0012122b: RET
int8 JS_NewClass1(long param_1,uint param_2,long param_3,uint param_4) { uint *puVar1; int iVar2; int *piVar3; int8 uVar4; long lVar5; long lVar6; long lVar7; uint uVar8; int8 *puVar9; int iVar10; ulong uVar11; uVar4 = 0xffffffff; if (param_2 < 0x10000) { uVar8 = *(uint *)(param_1 + 0x78); if (param_2 < uVar8) { lVar6 = *(long *)(param_1 + 0x80); if (*(int *)(lVar6 + (ulong)param_2 * 0x28) != 0) { return 0xffffffff; } } else { uVar8 = (uVar8 >> 1) + uVar8; if (uVar8 < param_2 + 1) { uVar8 = param_2 + 1; } uVar11 = 0x3d; if (0x3d < uVar8) { uVar11 = (ulong)uVar8; } lVar6 = *(long *)(param_1 + 0x90); iVar10 = (int)uVar11; if (lVar6 != param_1 + 0x88) { do { lVar5 = js_realloc_rt(param_1,*(int8 *)(lVar6 + 0x20),uVar11 << 4); if (lVar5 == 0) { return 0xffffffff; } iVar2 = *(int *)(param_1 + 0x78); if (iVar2 < iVar10) { lVar7 = uVar11 - (long)iVar2; puVar9 = (int8 *)((long)iVar2 * 0x10 + lVar5 + 8); do { *(int4 *)(puVar9 + -1) = 0; *puVar9 = 2; puVar9 = puVar9 + 2; lVar7 = lVar7 + -1; } while (lVar7 != 0); } *(long *)(lVar6 + 0x20) = lVar5; lVar6 = *(long *)(lVar6 + 8); } while (lVar6 != param_1 + 0x88); } lVar6 = js_realloc_rt(param_1,*(int8 *)(param_1 + 0x80),uVar11 * 0x28); if (lVar6 == 0) { return 0xffffffff; } memset((void *)(lVar6 + (long)*(int *)(param_1 + 0x78) * 0x28),0, ((long)iVar10 - (long)*(int *)(param_1 + 0x78)) * 0x28); *(long *)(param_1 + 0x80) = lVar6; *(int *)(param_1 + 0x78) = iVar10; } puVar1 = (uint *)(lVar6 + (ulong)param_2 * 0x28); *puVar1 = param_2; if (0xdf < (int)param_4) { piVar3 = *(int **)(*(long *)(param_1 + 0x68) + (ulong)param_4 * 8); *piVar3 = *piVar3 + 1; } puVar1[1] = param_4; uVar4 = *(int8 *)(param_3 + 0x10); *(int8 *)(puVar1 + 2) = *(int8 *)(param_3 + 8); *(int8 *)(puVar1 + 4) = uVar4; uVar4 = *(int8 *)(param_3 + 0x20); *(int8 *)(puVar1 + 6) = *(int8 *)(param_3 + 0x18); *(int8 *)(puVar1 + 8) = uVar4; uVar4 = 0; } return uVar4; }
5,584
usage
eloqsql/libmariadb/unittest/libmariadb/my_test.h
static void usage() { printf("Execute test with the following options:\n"); printf("-h hostname\n"); printf("-u username\n"); printf("-p password\n"); printf("-d database\n"); printf("-S socketname\n"); printf("-t force use of TLS\n"); printf("-P port number\n"); printf("? displays this help and exits\n"); }
O0
c
usage: pushq %rbp movq %rsp, %rbp leaq 0x3652f(%rip), %rdi # 0x4b67a movb $0x0, %al callq 0x13060 leaq 0x3654b(%rip), %rdi # 0x4b6a4 movb $0x0, %al callq 0x13060 leaq 0x3654a(%rip), %rdi # 0x4b6b1 movb $0x0, %al callq 0x13060 leaq 0x36549(%rip), %rdi # 0x4b6be movb $0x0, %al callq 0x13060 leaq 0x36548(%rip), %rdi # 0x4b6cb movb $0x0, %al callq 0x13060 leaq 0x36547(%rip), %rdi # 0x4b6d8 movb $0x0, %al callq 0x13060 leaq 0x36548(%rip), %rdi # 0x4b6e7 movb $0x0, %al callq 0x13060 leaq 0x3654f(%rip), %rdi # 0x4b6fc movb $0x0, %al callq 0x13060 leaq 0x36551(%rip), %rdi # 0x4b70c movb $0x0, %al callq 0x13060 popq %rbp retq nopw %cs:(%rax,%rax) nop
usage: push rbp mov rbp, rsp lea rdi, aExecuteTestWit; "Execute test with the following options"... mov al, 0 call _printf lea rdi, aHHostname; "-h hostname\n" mov al, 0 call _printf lea rdi, aUUsername; "-u username\n" mov al, 0 call _printf lea rdi, aPPassword; "-p password\n" mov al, 0 call _printf lea rdi, aDDatabase; "-d database\n" mov al, 0 call _printf lea rdi, aSSocketname; "-S socketname\n" mov al, 0 call _printf lea rdi, aTForceUseOfTls; "-t force use of TLS\n" mov al, 0 call _printf lea rdi, aPPortNumber; "-P port number\n" mov al, 0 call _printf lea rdi, aDisplaysThisHe; "? displays this help and exits\n" mov al, 0 call _printf pop rbp retn
long long usage() { printf("Execute test with the following options:\n"); printf("-h hostname\n"); printf("-u username\n"); printf("-p password\n"); printf("-d database\n"); printf("-S socketname\n"); printf("-t force use of TLS\n"); printf("-P port number\n"); return printf("? displays this help and exits\n"); }
usage: PUSH RBP MOV RBP,RSP LEA RDI,[0x14b67a] MOV AL,0x0 CALL 0x00113060 LEA RDI,[0x14b6a4] MOV AL,0x0 CALL 0x00113060 LEA RDI,[0x14b6b1] MOV AL,0x0 CALL 0x00113060 LEA RDI,[0x14b6be] MOV AL,0x0 CALL 0x00113060 LEA RDI,[0x14b6cb] MOV AL,0x0 CALL 0x00113060 LEA RDI,[0x14b6d8] MOV AL,0x0 CALL 0x00113060 LEA RDI,[0x14b6e7] MOV AL,0x0 CALL 0x00113060 LEA RDI,[0x14b6fc] MOV AL,0x0 CALL 0x00113060 LEA RDI,[0x14b70c] MOV AL,0x0 CALL 0x00113060 POP RBP RET
void usage(void) { printf("Execute test with the following options:\n"); printf("-h hostname\n"); printf("-u username\n"); printf("-p password\n"); printf("-d database\n"); printf("-S socketname\n"); printf("-t force use of TLS\n"); printf("-P port number\n"); printf("? displays this help and exits\n"); return; }
5,585
ma_SHA1Update
eloqsql/libmariadb/libmariadb/ma_sha1.c
void ma_SHA1Update(_MA_SHA1_CTX * context, const unsigned char *input, size_t inputLen) { unsigned int i, index, partLen; /* Compute number of bytes mod 64 */ index = (unsigned int) ((context->count[0] >> 3) & 0x3F); /* Update number of bits */ if ((context->count[0] += ((uint32) inputLen << 3)) < ((uint32) inputLen << 3)) context->count[1]++; context->count[1] += ((uint32) inputLen >> 29); partLen = 64 - index; /* Transform as many times as possible. */ if (inputLen >= partLen) { memcpy ((unsigned char*) & context->buffer[index], (unsigned char*) input, partLen); ma_SHA1Transform(context->state, context->buffer); for (i = partLen; i + 63 < inputLen; i += 64) ma_SHA1Transform(context->state, &input[i]); index = 0; } else i = 0; /* Buffer remaining input */ memcpy ((unsigned char*) & context->buffer[index], (unsigned char*) & input[i], inputLen - i); }
O3
c
ma_SHA1Update: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rdi, %r14 movl 0x14(%rdi), %eax movl %eax, %r12d shrl $0x3, %r12d andl $0x3f, %r12d leal (,%rdx,8), %ecx shrl $0x1d, %edx addl %eax, %ecx movl %ecx, 0x14(%rdi) adcl %edx, 0x18(%rdi) movq %rsi, %r15 movl $0x40, %r13d subq %r12, %r13 cmpq %rbx, %r13 jbe 0xa3829 movl %r12d, %eax xorl %r13d, %r13d jmp 0xa388e leaq 0x1c(%r14), %rax movq %rax, -0x30(%rbp) movl %r12d, %eax leaq (%r14,%rax), %rdi addq $0x1c, %rdi movq %r15, %rsi movq %r13, %rdx callq 0x390a0 movq %r14, %rdi movq -0x30(%rbp), %rsi callq 0xa38b5 movl %r12d, %eax xorl $0x7f, %eax cmpq %rbx, %rax jae 0xa388c xorl $0xbf, %r12d leal -0x7f(%r12), %esi addq %r15, %rsi movq %r14, %rdi callq 0xa38b5 movl %r12d, %eax addl $0x40, %r12d cmpq %rbx, %rax jb 0xa3865 addl $-0x7f, %r12d xorl %eax, %eax movq %r12, %r13 jmp 0xa388e xorl %eax, %eax leaq (%r14,%rax), %rdi addq $0x1c, %rdi addq %r13, %r15 subq %r13, %rbx movq %r15, %rsi movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x390a0
ma_SHA1Update: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r14, rdi mov eax, [rdi+14h] mov r12d, eax shr r12d, 3 and r12d, 3Fh lea ecx, ds:0[rdx*8] shr edx, 1Dh add ecx, eax mov [rdi+14h], ecx adc [rdi+18h], edx mov r15, rsi mov r13d, 40h ; '@' sub r13, r12 cmp r13, rbx jbe short loc_A3829 mov eax, r12d xor r13d, r13d jmp short loc_A388E loc_A3829: lea rax, [r14+1Ch] mov [rbp+var_30], rax mov eax, r12d lea rdi, [r14+rax] add rdi, 1Ch mov rsi, r15 mov rdx, r13 call _memcpy mov rdi, r14 mov rsi, [rbp+var_30] call ma_SHA1Transform mov eax, r12d xor eax, 7Fh cmp rax, rbx jnb short loc_A388C xor r12d, 0BFh loc_A3865: lea esi, [r12-7Fh] add rsi, r15 mov rdi, r14 call ma_SHA1Transform mov eax, r12d add r12d, 40h ; '@' cmp rax, rbx jb short loc_A3865 add r12d, 0FFFFFF81h xor eax, eax mov r13, r12 jmp short loc_A388E loc_A388C: xor eax, eax loc_A388E: lea rdi, [r14+rax] add rdi, 1Ch add r15, r13 sub rbx, r13 mov rsi, r15 mov rdx, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _memcpy
long long ma_SHA1Update(long long a1, long long a2, unsigned long long a3) { unsigned int v4; // eax long long v5; // r12 long long v6; // r13 long long v7; // rax unsigned int v8; // r12d unsigned long long v9; // rax v4 = *(_DWORD *)(a1 + 20); v5 = (v4 >> 3) & 0x3F; *(_DWORD *)(a1 + 20) = v4 + 8 * a3; *(_DWORD *)(a1 + 24) += ((unsigned int)a3 >> 29) + __CFADD__(v4, 8 * a3); v6 = 64 - v5; if ( 64 - v5 <= a3 ) { memcpy(a1 + (unsigned int)v5 + 28, a2, 64 - v5); ma_SHA1Transform(a1, a1 + 28); if ( ((unsigned int)v5 ^ 0x7F) >= a3 ) { v7 = 0LL; } else { v8 = v5 ^ 0xBF; do { ma_SHA1Transform(a1, a2 + v8 - 127); v9 = v8; v8 += 64; } while ( v9 < a3 ); v7 = 0LL; v6 = v8 - 127; } } else { v7 = (unsigned int)v5; v6 = 0LL; } return memcpy(a1 + v7 + 28, v6 + a2, a3 - v6); }
ma_SHA1Update: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RDI MOV EAX,dword ptr [RDI + 0x14] MOV R12D,EAX SHR R12D,0x3 AND R12D,0x3f LEA ECX,[RDX*0x8] SHR EDX,0x1d ADD ECX,EAX MOV dword ptr [RDI + 0x14],ECX ADC dword ptr [RDI + 0x18],EDX MOV R15,RSI MOV R13D,0x40 SUB R13,R12 CMP R13,RBX JBE 0x001a3829 MOV EAX,R12D XOR R13D,R13D JMP 0x001a388e LAB_001a3829: LEA RAX,[R14 + 0x1c] MOV qword ptr [RBP + -0x30],RAX MOV EAX,R12D LEA RDI,[R14 + RAX*0x1] ADD RDI,0x1c MOV RSI,R15 MOV RDX,R13 CALL 0x001390a0 MOV RDI,R14 MOV RSI,qword ptr [RBP + -0x30] CALL 0x001a38b5 MOV EAX,R12D XOR EAX,0x7f CMP RAX,RBX JNC 0x001a388c XOR R12D,0xbf LAB_001a3865: LEA ESI,[R12 + -0x7f] ADD RSI,R15 MOV RDI,R14 CALL 0x001a38b5 MOV EAX,R12D ADD R12D,0x40 CMP RAX,RBX JC 0x001a3865 ADD R12D,-0x7f XOR EAX,EAX MOV R13,R12 JMP 0x001a388e LAB_001a388c: XOR EAX,EAX LAB_001a388e: LEA RDI,[R14 + RAX*0x1] ADD RDI,0x1c ADD R15,R13 SUB RBX,R13 MOV RSI,R15 MOV RDX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001390a0
void ma_SHA1Update(long param_1,void *param_2,ulong param_3) { uint uVar1; ulong uVar2; uint uVar3; uint uVar4; ulong __n; uVar1 = *(uint *)(param_1 + 0x14); uVar4 = uVar1 >> 3 & 0x3f; uVar2 = (ulong)uVar4; uVar3 = (int)param_3 * 8; *(uint *)(param_1 + 0x14) = uVar3 + uVar1; *(int *)(param_1 + 0x18) = *(int *)(param_1 + 0x18) + ((uint)(param_3 >> 0x1d) & 7) + (uint)CARRY4(uVar3,uVar1); __n = 0x40 - uVar2; if (param_3 < __n) { __n = 0; } else { memcpy((void *)(param_1 + uVar2 + 0x1c),param_2,__n); ma_SHA1Transform(param_1,param_1 + 0x1c); if ((uVar4 ^ 0x7f) < param_3) { uVar1 = uVar4 ^ 0xbf; do { uVar3 = uVar1; ma_SHA1Transform(param_1,(ulong)(uVar3 - 0x7f) + (long)param_2); uVar1 = uVar3 + 0x40; } while (uVar3 < param_3); __n = (ulong)(uVar3 - 0x3f); uVar2 = 0; } else { uVar2 = 0; } } memcpy((void *)(param_1 + uVar2 + 0x1c),(void *)((long)param_2 + __n),param_3 - __n); return; }
5,586
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
monkey531[P]llama/common/json.hpp
static diyfp normalize(diyfp x) noexcept { JSON_ASSERT(x.f != 0); while ((x.f >> 63u) == 0) { x.f <<= 1u; x.e--; } return x; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp): pushq %rax testq %rdi, %rdi jne 0x89598 leaq 0x27e63(%rip), %rdi # 0xb13dc leaq 0x21dde(%rip), %rdx # 0xab35e leaq 0x2d605(%rip), %rcx # 0xb6b8c movl $0x42a1, %esi # imm = 0x42A1 xorl %eax, %eax callq 0x23f60 addq %rdi, %rdi decl %esi testq %rdi, %rdi jns 0x89593 movq %rdi, %rax movl %esi, %edx popq %rcx retq movq %rax, %rdi callq 0x28ddb
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp9normalizeES3_: push rax test rdi, rdi jnz short loc_89598 lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aXF0; "x.f != 0" mov esi, 42A1h xor eax, eax call _ggml_abort loc_89593: add rdi, rdi dec esi loc_89598: test rdi, rdi jns short loc_89593 mov rax, rdi mov edx, esi pop rcx retn mov rdi, rax call __clang_call_terminate
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(long long a1, int a2) { if ( a1 ) goto LABEL_4; a1 = (long long)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"; a2 = 17057; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17057LL, "GGML_ASSERT(%s) failed", "x.f != 0"); do { a1 *= 2LL; --a2; LABEL_4: ; } while ( a1 >= 0 ); return a1; }
normalize: PUSH RAX TEST RDI,RDI JNZ 0x00189598 LAB_00189572: LEA RDI,[0x1b13dc] LEA RDX,[0x1ab35e] LEA RCX,[0x1b6b8c] MOV ESI,0x42a1 XOR EAX,EAX CALL 0x00123f60 LAB_00189593: ADD RDI,RDI DEC ESI LAB_00189598: TEST RDI,RDI JNS 0x00189593 MOV RAX,RDI MOV EDX,ESI POP RCX RET
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) */ int1 [16] __thiscall nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(diyfp *this,int param_2) { int1 auVar1 [16]; if (this == (diyfp *)0x0) { /* try { // try from 00189572 to 00189592 has its CatchHandler @ 001895a4 */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x42a1, "GGML_ASSERT(%s) failed","x.f != 0"); } for (; -1 < (long)this; this = (diyfp *)((long)this * 2)) { param_2 = param_2 + -1; } auVar1._8_4_ = param_2; auVar1._0_8_ = this; auVar1._12_4_ = 0; return auVar1; }
5,587
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
monkey531[P]llama/common/json.hpp
static diyfp normalize(diyfp x) noexcept { JSON_ASSERT(x.f != 0); while ((x.f >> 63u) == 0) { x.f <<= 1u; x.e--; } return x; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp): pushq %rax testq %rdi, %rdi je 0xba4d3 js 0xba4cc addq %rdi, %rdi decl %esi testq %rdi, %rdi jns 0xba4c2 movq %rdi, %rax movl %esi, %edx popq %rcx retq leaq 0x33eff(%rip), %rdi # 0xee3d9 leaq 0x2de7d(%rip), %rdx # 0xe835e leaq 0x39678(%rip), %rcx # 0xf3b60 movl $0x42a1, %esi # imm = 0x42A1 xorl %eax, %eax callq 0x1bf40 movq %rax, %rdi callq 0x24259
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp9normalizeES3_: push rax test rdi, rdi jz short loc_BA4D3 js short loc_BA4CC loc_BA4C2: add rdi, rdi dec esi test rdi, rdi jns short loc_BA4C2 loc_BA4CC: mov rax, rdi mov edx, esi pop rcx retn loc_BA4D3: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aXF0; "x.f != 0" mov esi, 42A1h xor eax, eax call _ggml_abort mov rdi, rax call __clang_call_terminate
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(long long a1, int a2) { void *v3; // rax if ( !a1 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17057LL, "GGML_ASSERT(%s) failed", "x.f != 0"); _clang_call_terminate(v3); } for ( ; a1 >= 0; --a2 ) a1 *= 2LL; return a1; }
normalize: PUSH RAX TEST RDI,RDI JZ 0x001ba4d3 JS 0x001ba4cc LAB_001ba4c2: ADD RDI,RDI DEC ESI TEST RDI,RDI JNS 0x001ba4c2 LAB_001ba4cc: MOV RAX,RDI MOV EDX,ESI POP RCX RET LAB_001ba4d3: LEA RDI,[0x1ee3d9] LEA RDX,[0x1e835e] LEA RCX,[0x1f3b60] MOV ESI,0x42a1 XOR EAX,EAX CALL 0x0011bf40
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) */ int1 [16] __thiscall nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(diyfp *this,int param_2) { int1 auVar1 [16]; if (this != (diyfp *)0x0) { if (-1 < (long)this) { do { this = (diyfp *)((long)this * 2); param_2 = param_2 + -1; } while (-1 < (long)this); } auVar1._8_4_ = param_2; auVar1._0_8_ = this; auVar1._12_4_ = 0; return auVar1; } /* try { // try from 001ba4d3 to 001ba4f3 has its CatchHandler @ 001ba4f4 */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x42a1, "GGML_ASSERT(%s) failed","x.f != 0"); }
5,588
default_reporter
eloqsql/mysys/my_getopt.c
static void default_reporter(enum loglevel level, const char *format, ...) { va_list args; DBUG_ENTER("default_reporter"); va_start(args, format); if (level == WARNING_LEVEL) fprintf(stderr, "%s", "Warning: "); else if (level == INFORMATION_LEVEL) fprintf(stderr, "%s", "Info: "); vfprintf(stderr, format, args); va_end(args); fputc('\n', stderr); fflush(stderr); DBUG_VOID_RETURN; }
O0
c
default_reporter: pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp testb %al, %al je 0x29e58 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 $0x1, -0x4(%rbp) jne 0x29ec6 movq 0x1ab134(%rip), %rax # 0x1d4fe0 movq (%rax), %rdi leaq 0x58fe8(%rip), %rsi # 0x82e9e leaq 0x5606c(%rip), %rdx # 0x7ff29 movb $0x0, %al callq 0x24430 jmp 0x29eed cmpl $0x2, -0x4(%rbp) jne 0x29eeb movq 0x1ab10d(%rip), %rax # 0x1d4fe0 movq (%rax), %rdi leaq 0x58fc1(%rip), %rsi # 0x82e9e leaq 0x5604f(%rip), %rdx # 0x7ff33 movb $0x0, %al callq 0x24430 jmp 0x29eed movq 0x1ab0ec(%rip), %rax # 0x1d4fe0 movq (%rax), %rdi movq -0x10(%rbp), %rsi leaq -0x30(%rbp), %rdx callq 0x243f0 leaq -0x30(%rbp), %rax movq 0x1ab0d1(%rip), %rax # 0x1d4fe0 movq (%rax), %rsi movl $0xa, %edi callq 0x243b0 movq 0x1ab0bd(%rip), %rax # 0x1d4fe0 movq (%rax), %rdi callq 0x24350 jmp 0x29f2d addq $0xe0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
default_reporter: push rbp mov rbp, rsp sub rsp, 0E0h test al, al jz short loc_29E58 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_29E58: 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], 1 jnz short loc_29EC6 mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aAtLineDPosDS+13h; "%s" lea rdx, aWarning; "Warning: " mov al, 0 call _fprintf jmp short loc_29EED loc_29EC6: cmp [rbp+var_4], 2 jnz short loc_29EEB mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aAtLineDPosDS+13h; "%s" lea rdx, aInfo; "Info: " mov al, 0 call _fprintf loc_29EEB: jmp short $+2 loc_29EED: mov rax, cs:stderr_ptr mov rdi, [rax] mov rsi, [rbp+var_10] lea rdx, [rbp+var_30] call _vfprintf lea rax, [rbp+var_30] mov rax, cs:stderr_ptr mov rsi, [rax] mov edi, 0Ah call _fputc mov rax, cs:stderr_ptr mov rdi, [rax] call _fflush jmp short $+2 loc_29F2D: add rsp, 0E0h pop rbp retn
long long default_reporter(int a1, long long a2, ...) { va_list va; // [rsp+B0h] [rbp-30h] BYREF long long v4; // [rsp+D0h] [rbp-10h] int v5; // [rsp+DCh] [rbp-4h] va_start(va, a2); v5 = a1; v4 = a2; if ( a1 == 1 ) { fprintf(stderr, "%s", "Warning: "); } else if ( v5 == 2 ) { fprintf(stderr, "%s", "Info: "); } vfprintf(stderr, v4, va); fputc(10LL, stderr); return fflush(stderr); }
default_reporter: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 TEST AL,AL JZ 0x00129e58 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_00129e58: 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],0x1 JNZ 0x00129ec6 MOV RAX,qword ptr [0x002d4fe0] MOV RDI,qword ptr [RAX] LEA RSI,[0x182e9e] LEA RDX,[0x17ff29] MOV AL,0x0 CALL 0x00124430 JMP 0x00129eed LAB_00129ec6: CMP dword ptr [RBP + -0x4],0x2 JNZ 0x00129eeb MOV RAX,qword ptr [0x002d4fe0] MOV RDI,qword ptr [RAX] LEA RSI,[0x182e9e] LEA RDX,[0x17ff33] MOV AL,0x0 CALL 0x00124430 LAB_00129eeb: JMP 0x00129eed LAB_00129eed: MOV RAX,qword ptr [0x002d4fe0] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[RBP + -0x30] CALL 0x001243f0 LEA RAX,[RBP + -0x30] MOV RAX,qword ptr [0x002d4fe0] MOV RSI,qword ptr [RAX] MOV EDI,0xa CALL 0x001243b0 MOV RAX,qword ptr [0x002d4fe0] MOV RDI,qword ptr [RAX] CALL 0x00124350 JMP 0x00129f2d LAB_00129f2d: ADD RSP,0xe0 POP RBP RET
void default_reporter(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,char *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; char *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; local_d8 = param_11; local_d0 = param_12; local_c8 = param_13; local_c0 = param_14; local_18 = param_10; local_c = param_9; if (param_9 == 1) { fprintf(*(FILE **)PTR_stderr_002d4fe0,"%s","Warning: "); } else if (param_9 == 2) { fprintf(*(FILE **)PTR_stderr_002d4fe0,"%s","Info: "); } vfprintf(*(FILE **)PTR_stderr_002d4fe0,local_18,&local_38); fputc(10,*(FILE **)PTR_stderr_002d4fe0); fflush(*(FILE **)PTR_stderr_002d4fe0); return; }
5,589
my_strnxfrm_tis620
eloqsql/strings/ctype-tis620.c
static size_t my_strnxfrm_tis620(CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { size_t len, dstlen0= dstlen; len= MY_MIN(dstlen, srclen); memcpy(dst, src, len); len= thai2sortable(dst, len); set_if_smaller(dstlen, nweights); set_if_smaller(len, dstlen); len= my_strxfrm_pad_desc_and_reverse(cs, dst, dst + len, dst + dstlen, (uint)(dstlen - len), flags, 0); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len < dstlen0) { size_t fill_length= dstlen0 - len; my_ci_fill(cs, (char*) dst + len, fill_length, cs->pad_char); len= dstlen0; } return len; }
O0
c
my_strnxfrm_tis620: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movl 0x10(%rbp), %eax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x575ae movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x575b6 movq -0x30(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x38(%rbp), %rdx callq 0x29270 movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rsi callq 0x576a0 movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movl -0x1c(%rbp), %ecx cmpq %rcx, %rax jbe 0x575f3 movl -0x1c(%rbp), %eax movq %rax, -0x18(%rbp) jmp 0x575f5 jmp 0x575f7 movq -0x38(%rbp), %rax cmpq -0x18(%rbp), %rax jbe 0x57609 movq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0x5760b movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x10(%rbp), %rdx addq -0x38(%rbp), %rdx movq -0x10(%rbp), %rcx addq -0x18(%rbp), %rcx movq -0x18(%rbp), %rax subq -0x38(%rbp), %rax movl %eax, %r8d movl 0x10(%rbp), %r9d xorl %eax, %eax movl $0x0, (%rsp) callq 0x51c60 movq %rax, -0x38(%rbp) movl 0x10(%rbp), %eax andl $0x80, %eax cmpl $0x0, %eax je 0x5768f movq -0x38(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x5768f movq -0x40(%rbp), %rax subq -0x38(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi addq -0x38(%rbp), %rsi movq -0x48(%rbp), %rdx movq -0x8(%rbp), %rax movzbl 0xb0(%rax), %ecx callq 0x57840 movq -0x40(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax addq $0x60, %rsp popq %rbp retq nopl (%rax)
my_strnxfrm_tis620: push rbp mov rbp, rsp sub rsp, 60h mov eax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_18] cmp rax, [rbp+var_30] jnb short loc_575AE mov rax, [rbp+var_18] mov [rbp+var_50], rax jmp short loc_575B6 loc_575AE: mov rax, [rbp+var_30] mov [rbp+var_50], rax loc_575B6: mov rax, [rbp+var_50] mov [rbp+var_38], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] mov rdx, [rbp+var_38] call _memcpy mov rdi, [rbp+var_10] mov rsi, [rbp+var_38] call thai2sortable mov [rbp+var_38], rax mov rax, [rbp+var_18] mov ecx, [rbp+var_1C] cmp rax, rcx jbe short loc_575F3 mov eax, [rbp+var_1C] mov [rbp+var_18], rax loc_575F3: jmp short $+2 loc_575F5: jmp short $+2 loc_575F7: mov rax, [rbp+var_38] cmp rax, [rbp+var_18] jbe short loc_57609 mov rax, [rbp+var_18] mov [rbp+var_38], rax loc_57609: jmp short $+2 loc_5760B: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_10] add rdx, [rbp+var_38] mov rcx, [rbp+var_10] add rcx, [rbp+var_18] mov rax, [rbp+var_18] sub rax, [rbp+var_38] mov r8d, eax mov r9d, [rbp+arg_0] xor eax, eax mov [rsp+60h+var_60], 0 call my_strxfrm_pad_desc_and_reverse mov [rbp+var_38], rax mov eax, [rbp+arg_0] and eax, 80h cmp eax, 0 jz short loc_5768F mov rax, [rbp+var_38] cmp rax, [rbp+var_40] jnb short loc_5768F mov rax, [rbp+var_40] sub rax, [rbp+var_38] mov [rbp+var_48], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] add rsi, [rbp+var_38] mov rdx, [rbp+var_48] mov rax, [rbp+var_8] movzx ecx, byte ptr [rax+0B0h] call my_ci_fill_1 mov rax, [rbp+var_40] mov [rbp+var_38], rax loc_5768F: mov rax, [rbp+var_38] add rsp, 60h pop rbp retn
unsigned long long my_strnxfrm_tis620( long long a1, long long a2, unsigned long long a3, unsigned int a4, long long a5, unsigned long long a6, unsigned int a7) { unsigned long long v8; // [rsp+10h] [rbp-50h] unsigned long long v10; // [rsp+28h] [rbp-38h] unsigned long long v11; // [rsp+28h] [rbp-38h] unsigned long long v13; // [rsp+48h] [rbp-18h] v13 = a3; if ( a3 >= a6 ) v8 = a6; else v8 = a3; memcpy(a2, a5, v8); v10 = thai2sortable(a2, v8); if ( v13 > a4 ) v13 = a4; if ( v10 > v13 ) v10 = v13; v11 = my_strxfrm_pad_desc_and_reverse(a1, a2, v10 + a2, v13 + a2, (int)v13 - (int)v10, a7, 0); if ( (a7 & 0x80) != 0 && v11 < a3 ) { my_ci_fill_1(a1, v11 + a2, a3 - v11, *(unsigned __int8 *)(a1 + 176)); return a3; } return v11; }
my_strnxfrm_tis620: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x30] JNC 0x001575ae MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX JMP 0x001575b6 LAB_001575ae: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x50],RAX LAB_001575b6: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x38] CALL 0x00129270 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x38] CALL 0x001576a0 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x1c] CMP RAX,RCX JBE 0x001575f3 MOV EAX,dword ptr [RBP + -0x1c] MOV qword ptr [RBP + -0x18],RAX LAB_001575f3: JMP 0x001575f5 LAB_001575f5: JMP 0x001575f7 LAB_001575f7: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x18] JBE 0x00157609 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX LAB_00157609: JMP 0x0015760b LAB_0015760b: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x18] SUB RAX,qword ptr [RBP + -0x38] MOV R8D,EAX MOV R9D,dword ptr [RBP + 0x10] XOR EAX,EAX MOV dword ptr [RSP],0x0 CALL 0x00151c60 MOV qword ptr [RBP + -0x38],RAX MOV EAX,dword ptr [RBP + 0x10] AND EAX,0x80 CMP EAX,0x0 JZ 0x0015768f MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x40] JNC 0x0015768f MOV RAX,qword ptr [RBP + -0x40] SUB RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RAX + 0xb0] CALL 0x00157840 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x38],RAX LAB_0015768f: MOV RAX,qword ptr [RBP + -0x38] ADD RSP,0x60 POP RBP RET
ulong my_strnxfrm_tis620(long param_1,void *param_2,ulong param_3,uint param_4,void *param_5, ulong param_6,uint param_7) { size_t local_58; ulong local_40; ulong local_20; local_58 = param_6; if (param_3 < param_6) { local_58 = param_3; } memcpy(param_2,param_5,local_58); local_40 = thai2sortable(param_2,local_58); local_20 = param_3; if (param_4 < param_3) { local_20 = (ulong)param_4; } if (local_20 < local_40) { local_40 = local_20; } local_40 = my_strxfrm_pad_desc_and_reverse (param_1,param_2,(long)param_2 + local_40,(long)param_2 + local_20, (int)local_20 - (int)local_40,param_7,0); if (((param_7 & 0x80) != 0) && (local_40 < param_3)) { my_ci_fill(param_1,(long)param_2 + local_40,param_3 - local_40,*(int1 *)(param_1 + 0xb0)); local_40 = param_3; } return local_40; }
5,590
stbi_info_from_file
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
STBIDEF int stbi_info_from_file(FILE *f, int *x, int *y, int *comp) { int r; stbi__context s; long pos = ftell(f); stbi__start_file(&s, f); r = stbi__info_main(&s,x,y,comp); fseek(f,pos,SEEK_SET); return r; }
O1
c
stbi_info_from_file: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx callq 0xa030 movq %rax, %r13 movups 0xd9a65(%rip), %xmm0 # 0xf5680 leaq 0x40(%rsp), %rax movups %xmm0, -0x28(%rax) movq 0xd9a65(%rip), %rcx # 0xf5690 movq %rcx, -0x18(%rax) movq %rbx, -0x10(%rax) movabsq $0x8000000001, %rcx # imm = 0x8000000001 movq %rcx, -0x8(%rax) movl $0x0, 0x80(%rax) movq %rax, 0x98(%rax) movq %rax, 0x88(%rax) leaq 0x8(%rsp), %rbp movq %rbp, %rdi callq 0x2696c movq 0xc8(%rbp), %rax movq %rax, 0xd8(%rbp) movq %rbp, %rdi movq %r12, %rsi movq %r15, %rdx movq %r14, %rcx callq 0x1bca8 movl %eax, %ebp movq %rbx, %rdi movq %r13, %rsi xorl %edx, %edx callq 0xa660 movl %ebp, %eax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
stbi_info_from_file: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov r14, rcx mov r15, rdx mov r12, rsi mov rbx, rdi call _ftell mov r13, rax movups xmm0, xmmword ptr cs:_ZL21stbi__stdio_callbacks; stbi__stdio_callbacks lea rax, [rsp+118h+var_D8] movups xmmword ptr [rax-28h], xmm0 mov rcx, cs:off_F5690 mov [rax-18h], rcx mov [rax-10h], rbx mov rcx, 8000000001h mov [rax-8], rcx mov dword ptr [rax+80h], 0 mov [rax+98h], rax mov [rax+88h], rax lea rbp, [rsp+118h+var_110] mov rdi, rbp call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [rbp+0C8h] mov [rbp+0D8h], rax mov rdi, rbp mov rsi, r12 mov rdx, r15 mov rcx, r14 call _ZL15stbi__info_mainP13stbi__contextPiS1_S1_; stbi__info_main(stbi__context *,int *,int *,int *) mov ebp, eax mov rdi, rbx mov rsi, r13 xor edx, edx call _fseek mov eax, ebp add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long stbi_info_from_file(long long a1, long long a2, long long a3, long long a4) { long long v6; // r13 unsigned int v7; // ebp _BYTE v9[16]; // [rsp+8h] [rbp-110h] BYREF __int128 v10; // [rsp+18h] [rbp-100h] long long ( *v11)(void *); // [rsp+28h] [rbp-F0h] long long v12; // [rsp+30h] [rbp-E8h] long long v13; // [rsp+38h] [rbp-E0h] _BYTE v14[128]; // [rsp+40h] [rbp-D8h] BYREF int v15; // [rsp+C0h] [rbp-58h] _BYTE *v16; // [rsp+C8h] [rbp-50h] long long v17; // [rsp+D0h] [rbp-48h] _BYTE *v18; // [rsp+D8h] [rbp-40h] long long v19; // [rsp+E0h] [rbp-38h] v6 = ftell(); v10 = *(_OWORD *)&stbi__stdio_callbacks; v11 = stbi__stdio_eof; v12 = a1; v13 = 0x8000000001LL; v15 = 0; v18 = v14; v16 = v14; stbi__refill_buffer(v9); v19 = v17; v7 = stbi__info_main(v9, a2, a3, a4); fseek(a1, v6, 0LL); return v7; }
5,591
stbi_info_from_file
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
STBIDEF int stbi_info_from_file(FILE *f, int *x, int *y, int *comp) { int r; stbi__context s; long pos = ftell(f); stbi__start_file(&s, f); r = stbi__info_main(&s,x,y,comp); fseek(f,pos,SEEK_SET); return r; }
O2
c
stbi_info_from_file: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r12 callq 0xa030 movq %rax, %r13 leaq 0x8(%rsp), %rbp movq %rbp, %rdi movq %r12, %rsi callq 0xbccd movq %rbp, %rdi movq %r15, %rsi movq %r14, %rdx movq %rbx, %rcx callq 0xd232 movl %eax, %ebx movq %r12, %rdi movq %r13, %rsi xorl %edx, %edx callq 0xa690 movl %ebx, %eax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
stbi_info_from_file: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov rbx, rcx mov r14, rdx mov r15, rsi mov r12, rdi call _ftell mov r13, rax lea rbp, [rsp+118h+var_110] mov rdi, rbp mov rsi, r12 call _ZL16stbi__start_fileP13stbi__contextP8_IO_FILE; stbi__start_file(stbi__context *,_IO_FILE *) mov rdi, rbp mov rsi, r15 mov rdx, r14 mov rcx, rbx call _ZL15stbi__info_mainP13stbi__contextPiS1_S1_; stbi__info_main(stbi__context *,int *,int *,int *) mov ebx, eax mov rdi, r12 mov rsi, r13 xor edx, edx call _fseek mov eax, ebx add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long stbi_info_from_file(long long a1, long long a2, long long a3, long long a4) { long long v6; // r13 _BYTE v8[272]; // [rsp+8h] [rbp-110h] BYREF v6 = ftell(); stbi__start_file((long long)v8, a1); LODWORD(a4) = stbi__info_main(v8, a2, a3, a4); fseek(a1, v6, 0LL); return (unsigned int)a4; }
stbi_info_from_file: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV RBX,RCX MOV R14,RDX MOV R15,RSI MOV R12,RDI CALL 0x0010a030 MOV R13,RAX LEA RBP,[RSP + 0x8] MOV RDI,RBP MOV RSI,R12 CALL 0x0010bccd MOV RDI,RBP MOV RSI,R15 MOV RDX,R14 MOV RCX,RBX CALL 0x0010d232 MOV EBX,EAX MOV RDI,R12 MOV RSI,R13 XOR EDX,EDX CALL 0x0010a690 MOV EAX,EBX ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 stbi_info_from_file(FILE *param_1,int *param_2,int *param_3,int *param_4) { int4 uVar1; long __off; stbi__context local_110 [224]; __off = ftell(param_1); stbi__start_file(local_110,param_1); uVar1 = stbi__info_main(local_110,param_2,param_3,param_4); fseek(param_1,__off,0); return uVar1; }
5,592
stbi_info_from_file
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
STBIDEF int stbi_info_from_file(FILE *f, int *x, int *y, int *comp) { int r; stbi__context s; long pos = ftell(f); stbi__start_file(&s, f); r = stbi__info_main(&s,x,y,comp); fseek(f,pos,SEEK_SET); return r; }
O3
c
stbi_info_from_file: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx callq 0xa030 movq %rax, %r13 movups 0xd800f(%rip), %xmm0 # 0xf36c0 leaq 0x40(%rsp), %rax movups %xmm0, -0x28(%rax) movq 0xd800f(%rip), %rcx # 0xf36d0 movq %rcx, -0x18(%rax) movq %rbx, -0x10(%rax) movabsq $0x8000000001, %rcx # imm = 0x8000000001 movq %rcx, -0x8(%rax) movl $0x0, 0x80(%rax) movq %rax, 0x98(%rax) movq %rax, 0x88(%rax) leaq 0x8(%rsp), %rbp movq %rbp, %rdi callq 0x2620e movq 0xc8(%rbp), %rax movq %rax, 0xd8(%rbp) movq %rbp, %rdi movq %r12, %rsi movq %r15, %rdx movq %r14, %rcx callq 0x1b73e movl %eax, %ebp movq %rbx, %rdi movq %r13, %rsi xorl %edx, %edx callq 0xa650 movl %ebp, %eax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
stbi_info_from_file: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov r14, rcx mov r15, rdx mov r12, rsi mov rbx, rdi call _ftell mov r13, rax movups xmm0, xmmword ptr cs:_ZL21stbi__stdio_callbacks; stbi__stdio_callbacks lea rax, [rsp+118h+var_D8] movups xmmword ptr [rax-28h], xmm0 mov rcx, cs:off_F36D0 mov [rax-18h], rcx mov [rax-10h], rbx mov rcx, 8000000001h mov [rax-8], rcx mov dword ptr [rax+80h], 0 mov [rax+98h], rax mov [rax+88h], rax lea rbp, [rsp+118h+var_110] mov rdi, rbp call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [rbp+0C8h] mov [rbp+0D8h], rax mov rdi, rbp mov rsi, r12 mov rdx, r15 mov rcx, r14 call _ZL15stbi__info_mainP13stbi__contextPiS1_S1_; stbi__info_main(stbi__context *,int *,int *,int *) mov ebp, eax mov rdi, rbx mov rsi, r13 xor edx, edx call _fseek mov eax, ebp add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long stbi_info_from_file(long long a1, long long a2, long long a3, long long a4) { long long v6; // r13 unsigned int v7; // ebp _BYTE v9[16]; // [rsp+8h] [rbp-110h] BYREF __int128 v10; // [rsp+18h] [rbp-100h] long long ( *v11)(void *); // [rsp+28h] [rbp-F0h] long long v12; // [rsp+30h] [rbp-E8h] long long v13; // [rsp+38h] [rbp-E0h] _BYTE v14[128]; // [rsp+40h] [rbp-D8h] BYREF int v15; // [rsp+C0h] [rbp-58h] _BYTE *v16; // [rsp+C8h] [rbp-50h] long long v17; // [rsp+D0h] [rbp-48h] _BYTE *v18; // [rsp+D8h] [rbp-40h] long long v19; // [rsp+E0h] [rbp-38h] v6 = ftell(); v10 = *(_OWORD *)&stbi__stdio_callbacks; v11 = stbi__stdio_eof; v12 = a1; v13 = 0x8000000001LL; v15 = 0; v18 = v14; v16 = v14; stbi__refill_buffer(v9); v19 = v17; v7 = stbi__info_main(v9, a2, a3, a4); fseek(a1, v6, 0LL); return v7; }
5,593
minja::Parser::parseDictionary()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Expression> parseDictionary() { if (consumeToken("{").empty()) return nullptr; std::vector<std::pair<std::shared_ptr<Expression>, std::shared_ptr<Expression>>> elements; if (!consumeToken("}").empty()) { return std::make_shared<DictExpr>(get_location(), std::move(elements)); } auto parseKeyValuePair = [&]() { auto key = parseExpression(); if (!key) throw std::runtime_error("Expected key in dictionary"); if (consumeToken(":").empty()) throw std::runtime_error("Expected colon betweek key & value in dictionary"); auto value = parseExpression(); if (!value) throw std::runtime_error("Expected value in dictionary"); elements.emplace_back(std::pair(std::move(key), std::move(value))); }; parseKeyValuePair(); while (it != end) { if (!consumeToken(",").empty()) { parseKeyValuePair(); } else if (!consumeToken("}").empty()) { return std::make_shared<DictExpr>(get_location(), std::move(elements)); } else { throw std::runtime_error("Expected comma or closing brace in dictionary"); } } throw std::runtime_error("Expected closing brace"); }
O2
cpp
minja::Parser::parseDictionary(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x4d1ed(%rip), %rsi # 0xb3c6d leaq 0x10(%rsp), %rdi leaq 0x60(%rsp), %r15 movq %r15, %rdx callq 0x27686 movq %rbx, 0x38(%rsp) leaq 0x40(%rsp), %rdi leaq 0x10(%rsp), %rdx pushq $0x1 popq %rcx movq %r14, %rsi callq 0x60e16 leaq 0x40(%rsp), %rdi movq 0x8(%rdi), %rbx callq 0x241f8 leaq 0x10(%rsp), %rdi callq 0x241f8 xorps %xmm0, %xmm0 testq %rbx, %rbx je 0x66b4a movaps %xmm0, 0x60(%rsp) andq $0x0, 0x70(%rsp) leaq 0x51971(%rip), %rsi # 0xb844f leaq 0x10(%rsp), %rdi leaq 0x78(%rsp), %rdx callq 0x27686 leaq 0x40(%rsp), %rdi leaq 0x10(%rsp), %rdx pushq $0x1 popq %rcx movq %r14, %rsi callq 0x60e16 leaq 0x40(%rsp), %rdi movq 0x8(%rdi), %rbx callq 0x241f8 leaq 0x10(%rsp), %rdi callq 0x241f8 testq %rbx, %rbx je 0x66b57 leaq 0x40(%rsp), %rdi movq %r14, %rsi callq 0x603e6 movq 0x38(%rsp), %rbx leaq 0x10(%rsp), %rdi leaq 0x40(%rsp), %rsi leaq 0x60(%rsp), %rdx callq 0x6962f jmp 0x66c42 movq 0x38(%rsp), %rbx movups %xmm0, (%rbx) jmp 0x66c70 leaq 0x78(%rsp), %rdi movq %r14, (%rdi) movq %r15, 0x8(%rdi) callq 0x69650 leaq 0x10(%rsp), %r12 leaq 0x40(%rsp), %rbp pushq $0x1 popq %rbx leaq 0x78(%rsp), %r15 movq 0x20(%r14), %rax cmpq 0x18(%r14), %rax je 0x66c85 movq %r12, %rdi leaq 0x4d5d4(%rip), %rsi # 0xb4166 leaq 0xf(%rsp), %rdx callq 0x27686 movq %rbp, %rdi movq %r14, %rsi movq %r12, %rdx movl %ebx, %ecx callq 0x60e16 movq 0x48(%rsp), %r13 movq %rbp, %rdi callq 0x241f8 movq %r12, %rdi callq 0x241f8 testq %r13, %r13 je 0x66bd0 movq %r15, %rdi callq 0x69650 jmp 0x66b7a leaq 0x51878(%rip), %rsi # 0xb844f leaq 0x10(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x27686 leaq 0x40(%rsp), %rdi leaq 0x10(%rsp), %rdx pushq $0x1 popq %rcx movq %r14, %rsi callq 0x60e16 leaq 0x40(%rsp), %rdi movq 0x8(%rdi), %rbx callq 0x241f8 leaq 0x10(%rsp), %rdi callq 0x241f8 testq %rbx, %rbx je 0x66cb5 leaq 0x40(%rsp), %rdi movq %r14, %rsi callq 0x603e6 movq 0x38(%rsp), %rbx leaq 0x10(%rsp), %rdi leaq 0x40(%rsp), %rsi leaq 0x60(%rsp), %rdx callq 0x6962f leaq 0x18(%rsp), %rdi movaps -0x8(%rdi), %xmm0 andq $0x0, (%rdi) movups %xmm0, (%rbx) andq $0x0, -0x8(%rdi) callq 0x4f93a leaq 0x48(%rsp), %rdi callq 0x4f93a leaq 0x60(%rsp), %rdi callq 0x6982a movq %rbx, %rax addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x23470 movq %rax, %r14 leaq 0x4d603(%rip), %rsi # 0xb429a movq %rax, %rdi callq 0x23330 movq 0x9734a(%rip), %rsi # 0xfdff0 movq 0x972ab(%rip), %rdx # 0xfdf58 movq %r14, %rdi callq 0x23f40 pushq $0x10 popq %rdi callq 0x23470 movq %rax, %r14 leaq 0x4d5a5(%rip), %rsi # 0xb426c movq %rax, %rdi callq 0x23330 jmp 0x66c9f jmp 0x66d04 jmp 0x66cdb jmp 0x66d15 jmp 0x66d1a jmp 0x66d15 movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x4f93a jmp 0x66d27 jmp 0x66d15 jmp 0x66d1a jmp 0x66d15 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x241f8 jmp 0x66d31 movq %rax, %rbx jmp 0x66d31 movq %rax, %rbx movq %r14, %rdi callq 0x236a0 jmp 0x66d27 jmp 0x66d15 jmp 0x66d15 movq %rax, %rbx jmp 0x66d27 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x241f8 leaq 0x60(%rsp), %rdi callq 0x6982a movq %rbx, %rdi callq 0x23fc0 nop
_ZN5minja6Parser15parseDictionaryEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov r14, rsi mov rbx, rdi lea rsi, asc_B3C6D; "{" lea rdi, [rsp+0B8h+var_A8] lea r15, [rsp+0B8h+var_58] mov rdx, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov [rsp+0B8h+var_80], rbx lea rdi, [rsp+0B8h+var_78] lea rdx, [rsp+0B8h+var_A8] push 1 pop rcx mov rsi, r14 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) lea rdi, [rsp+0B8h+var_78]; void * mov rbx, [rdi+8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0B8h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() xorps xmm0, xmm0 test rbx, rbx jz short loc_66B4A movaps [rsp+0B8h+var_58], xmm0 and [rsp+0B8h+var_48], 0 lea rsi, aNT020+17h; "}" lea rdi, [rsp+0B8h+var_A8] lea rdx, [rsp+0B8h+var_40] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0B8h+var_78] lea rdx, [rsp+0B8h+var_A8] push 1 pop rcx mov rsi, r14 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) lea rdi, [rsp+0B8h+var_78]; void * mov rbx, [rdi+8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0B8h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test rbx, rbx jz short loc_66B57 lea rdi, [rsp+0B8h+var_78]; this mov rsi, r14 call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void) mov rbx, [rsp+0B8h+var_80] lea rdi, [rsp+0B8h+var_A8] lea rsi, [rsp+0B8h+var_78] lea rdx, [rsp+0B8h+var_58] call _ZSt11make_sharedIN5minja8DictExprEJNS0_8LocationESt6vectorISt4pairISt10shared_ptrINS0_10ExpressionEES7_ESaIS8_EEEES5_IT_EDpOT0_; std::make_shared<minja::DictExpr,minja::Location,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>>(minja::Location,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>> &&) jmp loc_66C42 loc_66B4A: mov rbx, [rsp+0B8h+var_80] movups xmmword ptr [rbx], xmm0 jmp loc_66C70 loc_66B57: lea rdi, [rsp+0B8h+var_40] mov [rdi], r14 mov [rdi+8], r15 call _ZZN5minja6Parser15parseDictionaryEvENKUlvE_clEv; minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(void) lea r12, [rsp+0B8h+var_A8] lea rbp, [rsp+0B8h+var_78] push 1 pop rbx lea r15, [rsp+0B8h+var_40] loc_66B7A: mov rax, [r14+20h] cmp rax, [r14+18h] jz loc_66C85 mov rdi, r12 lea rsi, asc_B4166; "," lea rdx, [rsp+0B8h+var_A9] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, rbp mov rsi, r14 mov rdx, r12 mov ecx, ebx call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) mov r13, [rsp+0B8h+var_70] mov rdi, rbp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r12; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test r13, r13 jz short loc_66BD0 mov rdi, r15 call _ZZN5minja6Parser15parseDictionaryEvENKUlvE_clEv; minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(void) jmp short loc_66B7A loc_66BD0: lea rsi, aNT020+17h; "}" lea rdi, [rsp+0B8h+var_A8] lea rdx, [rsp+0B8h+var_A9] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0B8h+var_78] lea rdx, [rsp+0B8h+var_A8] push 1 pop rcx mov rsi, r14 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) lea rdi, [rsp+0B8h+var_78]; void * mov rbx, [rdi+8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0B8h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test rbx, rbx jz loc_66CB5 lea rdi, [rsp+0B8h+var_78]; this mov rsi, r14 call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void) mov rbx, [rsp+0B8h+var_80] lea rdi, [rsp+0B8h+var_A8] lea rsi, [rsp+0B8h+var_78] lea rdx, [rsp+0B8h+var_58] call _ZSt11make_sharedIN5minja8DictExprEJNS0_8LocationESt6vectorISt4pairISt10shared_ptrINS0_10ExpressionEES7_ESaIS8_EEEES5_IT_EDpOT0_; std::make_shared<minja::DictExpr,minja::Location,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>>(minja::Location,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>> &&) loc_66C42: lea rdi, [rsp+0B8h+var_A0] movaps xmm0, xmmword ptr [rdi-8] and qword ptr [rdi], 0 movups xmmword ptr [rbx], xmm0 and qword ptr [rdi-8], 0 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+0B8h+var_70] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+0B8h+var_58] call _ZNSt6vectorISt4pairISt10shared_ptrIN5minja10ExpressionEES4_ESaIS5_EED2Ev; std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>::~vector() loc_66C70: mov rax, rbx add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_66C85: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedClosin_5; "Expected closing brace" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_66C9F: mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_66CB5: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedCommaO_0; "Expected comma or closing brace in dict"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_66C9F jmp short loc_66D04 jmp short loc_66CDB jmp short loc_66D15 jmp short loc_66D1A jmp short loc_66D15 loc_66CDB: mov rbx, rax lea rdi, [rsp+arg_40] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_66D27 jmp short loc_66D15 jmp short loc_66D1A jmp short loc_66D15 mov rbx, rax lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_66D31 mov rbx, rax jmp short loc_66D31 loc_66D04: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_66D27 jmp short loc_66D15 jmp short $+2 loc_66D15: mov rbx, rax jmp short loc_66D27 loc_66D1A: mov rbx, rax lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_66D27: lea rdi, [rsp+arg_58] call _ZNSt6vectorISt4pairISt10shared_ptrIN5minja10ExpressionEES4_ESaIS5_EED2Ev; std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>::~vector() loc_66D31: mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::parseDictionary(minja::Parser *this, _QWORD *a2) { long long v2; // rbx long long v3; // rbx minja::Parser *v4; // rbx long long v5; // r13 long long v6; // rbx __int128 v7; // xmm0 std::runtime_error *exception; // r14 _OWORD v10[2]; // [rsp+10h] [rbp-A8h] BYREF minja::Parser *v11; // [rsp+38h] [rbp-80h] long long v12; // [rsp+40h] [rbp-78h] BYREF _QWORD v13[3]; // [rsp+48h] [rbp-70h] BYREF __int128 v14; // [rsp+60h] [rbp-58h] BYREF long long v15; // [rsp+70h] [rbp-48h] _QWORD *v16; // [rsp+78h] [rbp-40h] __int128 *v17; // [rsp+80h] [rbp-38h] std::string::basic_string<std::allocator<char>>(v10, (long long)"{"); v11 = this; minja::Parser::consumeToken(&v12, (long long)a2, v10, 1u); v2 = v13[0]; std::string::~string(&v12); std::string::~string(v10); if ( v2 ) { v14 = 0LL; v15 = 0LL; std::string::basic_string<std::allocator<char>>(v10, (long long)"}"); minja::Parser::consumeToken(&v12, (long long)a2, v10, 1u); v3 = v13[0]; std::string::~string(&v12); std::string::~string(v10); if ( !v3 ) { v16 = a2; v17 = &v14; minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(0.0); while ( a2[4] != a2[3] ) { std::string::basic_string<std::allocator<char>>(v10, (long long)","); minja::Parser::consumeToken(&v12, (long long)a2, v10, 1u); v5 = v13[0]; std::string::~string(&v12); std::string::~string(v10); if ( !v5 ) { std::string::basic_string<std::allocator<char>>(v10, (long long)"}"); minja::Parser::consumeToken(&v12, (long long)a2, v10, 1u); v6 = v13[0]; std::string::~string(&v12); std::string::~string(v10); if ( v6 ) goto LABEL_10; exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected comma or closing brace in dictionary"); LABEL_13: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(0.0); } exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected closing brace"); goto LABEL_13; } LABEL_10: minja::Parser::get_location((minja::Parser *)&v12, a2); v4 = v11; std::make_shared<minja::DictExpr,minja::Location,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>>( v10, &v12, &v14); v7 = v10[0]; *((_QWORD *)&v10[0] + 1) = 0LL; *(_OWORD *)v4 = v7; *(_QWORD *)&v10[0] = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v10 + 1); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v13); std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>::~vector(&v14); } else { v4 = v11; *(_OWORD *)v11 = 0LL; } return v4; }
parseDictionary: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV R14,RSI MOV RBX,RDI LAB_00166a79: LEA RSI,[0x1b3c6d] LEA RDI,[RSP + 0x10] LEA R15,[RSP + 0x60] MOV RDX,R15 CALL 0x00127686 LAB_00166a92: MOV qword ptr [RSP + 0x38],RBX LEA RDI,[RSP + 0x40] LEA RDX,[RSP + 0x10] PUSH 0x1 POP RCX MOV RSI,R14 CALL 0x00160e16 LEA RDI,[RSP + 0x40] MOV RBX,qword ptr [RDI + 0x8] CALL 0x001241f8 LEA RDI,[RSP + 0x10] CALL 0x001241f8 XORPS XMM0,XMM0 TEST RBX,RBX JZ 0x00166b4a MOVAPS xmmword ptr [RSP + 0x60],XMM0 AND qword ptr [RSP + 0x70],0x0 LAB_00166ad7: LEA RSI,[0x1b844f] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0x78] CALL 0x00127686 LAB_00166aed: LEA RDI,[RSP + 0x40] LEA RDX,[RSP + 0x10] PUSH 0x1 POP RCX MOV RSI,R14 CALL 0x00160e16 LEA RDI,[RSP + 0x40] MOV RBX,qword ptr [RDI + 0x8] CALL 0x001241f8 LEA RDI,[RSP + 0x10] CALL 0x001241f8 TEST RBX,RBX JZ 0x00166b57 LAB_00166b1f: LEA RDI,[RSP + 0x40] MOV RSI,R14 CALL 0x001603e6 MOV RBX,qword ptr [RSP + 0x38] LAB_00166b31: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x40] LEA RDX,[RSP + 0x60] CALL 0x0016962f JMP 0x00166c42 LAB_00166b4a: MOV RBX,qword ptr [RSP + 0x38] MOVUPS xmmword ptr [RBX],XMM0 JMP 0x00166c70 LAB_00166b57: LEA RDI,[RSP + 0x78] MOV qword ptr [RDI],R14 MOV qword ptr [RDI + 0x8],R15 LAB_00166b63: CALL 0x00169650 LEA R12,[RSP + 0x10] LEA RBP,[RSP + 0x40] PUSH 0x1 POP RBX LEA R15,[RSP + 0x78] LAB_00166b7a: MOV RAX,qword ptr [R14 + 0x20] CMP RAX,qword ptr [R14 + 0x18] JZ 0x00166c85 LAB_00166b88: MOV RDI,R12 LEA RSI,[0x1b4166] LEA RDX,[RSP + 0xf] CALL 0x00127686 LAB_00166b9c: MOV RDI,RBP MOV RSI,R14 MOV RDX,R12 MOV ECX,EBX CALL 0x00160e16 MOV R13,qword ptr [RSP + 0x48] MOV RDI,RBP CALL 0x001241f8 MOV RDI,R12 CALL 0x001241f8 TEST R13,R13 JZ 0x00166bd0 LAB_00166bc6: MOV RDI,R15 CALL 0x00169650 JMP 0x00166b7a LAB_00166bd0: LEA RSI,[0x1b844f] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xf] CALL 0x00127686 LAB_00166be6: LEA RDI,[RSP + 0x40] LEA RDX,[RSP + 0x10] PUSH 0x1 POP RCX MOV RSI,R14 CALL 0x00160e16 LEA RDI,[RSP + 0x40] MOV RBX,qword ptr [RDI + 0x8] CALL 0x001241f8 LEA RDI,[RSP + 0x10] CALL 0x001241f8 TEST RBX,RBX JZ 0x00166cb5 LAB_00166c1c: LEA RDI,[RSP + 0x40] MOV RSI,R14 CALL 0x001603e6 MOV RBX,qword ptr [RSP + 0x38] LAB_00166c2e: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x40] LEA RDX,[RSP + 0x60] CALL 0x0016962f LAB_00166c42: LEA RDI,[RSP + 0x18] MOVAPS XMM0,xmmword ptr [RDI + -0x8] AND qword ptr [RDI],0x0 MOVUPS xmmword ptr [RBX],XMM0 AND qword ptr [RDI + -0x8],0x0 CALL 0x0014f93a LEA RDI,[RSP + 0x48] CALL 0x0014f93a LEA RDI,[RSP + 0x60] CALL 0x0016982a LAB_00166c70: MOV RAX,RBX ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00166c85: PUSH 0x10 POP RDI CALL 0x00123470 MOV R14,RAX LAB_00166c90: LEA RSI,[0x1b429a] MOV RDI,RAX CALL 0x00123330 LAB_00166c9f: MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,R14 CALL 0x00123f40 LAB_00166cb5: PUSH 0x10 POP RDI CALL 0x00123470 MOV R14,RAX LAB_00166cc0: LEA RSI,[0x1b426c] MOV RDI,RAX CALL 0x00123330 LAB_00166ccf: JMP 0x00166c9f
/* minja::Parser::parseDictionary() */ int8 * minja::Parser::parseDictionary(void) { int8 uVar1; long lVar2; runtime_error *this; long in_RSI; int8 *in_RDI; allocator local_a9; int8 local_a8; int8 auStack_a0 [4]; int8 *local_80; string local_78 [8]; long local_70 [3]; int8 local_58; int8 uStack_50; int8 local_48; allocator local_40 [8]; allocator *local_38; /* try { // try from 00166a79 to 00166a91 has its CatchHandler @ 00166cff */ std::__cxx11::string::string<std::allocator<char>>((string *)&local_a8,"{",(allocator *)&local_58) ; /* try { // try from 00166a92 to 00166aab has its CatchHandler @ 00166cf0 */ local_80 = in_RDI; consumeToken(local_78); lVar2 = local_70[0]; std::__cxx11::string::~string(local_78); std::__cxx11::string::~string((string *)&local_a8); if (lVar2 == 0) { *local_80 = 0; local_80[1] = 0; } else { local_58 = 0; uStack_50 = 0; local_48 = 0; /* try { // try from 00166ad7 to 00166aec has its CatchHandler @ 00166cee */ std::__cxx11::string::string<std::allocator<char>>((string *)&local_a8,"}",local_40); /* try { // try from 00166aed to 00166b01 has its CatchHandler @ 00166cec */ consumeToken(local_78); lVar2 = local_70[0]; std::__cxx11::string::~string(local_78); std::__cxx11::string::~string((string *)&local_a8); if (lVar2 == 0) { local_38 = (allocator *)&local_58; /* try { // try from 00166b63 to 00166b67 has its CatchHandler @ 00166d11 */ parseDictionary()::{lambda()#1}::operator()((_lambda___1_ *)local_40); do { if (*(long *)(in_RSI + 0x20) == *(long *)(in_RSI + 0x18)) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00166c90 to 00166c9e has its CatchHandler @ 00166d04 */ std::runtime_error::runtime_error(this,"Expected closing brace"); LAB_00166c9f: /* try { // try from 00166c9f to 00166cb4 has its CatchHandler @ 00166d11 */ /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); } /* try { // try from 00166b88 to 00166b9b has its CatchHandler @ 00166d15 */ std::__cxx11::string::string<std::allocator<char>>((string *)&local_a8,",",&local_a9); /* try { // try from 00166b9c to 00166bab has its CatchHandler @ 00166d1a */ consumeToken(local_78); lVar2 = local_70[0]; std::__cxx11::string::~string(local_78); std::__cxx11::string::~string((string *)&local_a8); if (lVar2 == 0) { /* try { // try from 00166bd0 to 00166be5 has its CatchHandler @ 00166cd9 */ std::__cxx11::string::string<std::allocator<char>>((string *)&local_a8,"}",&local_a9); /* try { // try from 00166be6 to 00166bfa has its CatchHandler @ 00166cd7 */ consumeToken(local_78); std::__cxx11::string::~string(local_78); std::__cxx11::string::~string((string *)&local_a8); if (local_70[0] != 0) { /* try { // try from 00166c1c to 00166c28 has its CatchHandler @ 00166cd5 */ get_location(); /* try { // try from 00166c2e to 00166c41 has its CatchHandler @ 00166cd3 */ std:: make_shared<minja::DictExpr,minja::Location,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>>> ((Location *)&local_a8,local_78); goto LAB_00166c42; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00166cc0 to 00166cce has its CatchHandler @ 00166cd1 */ std::runtime_error::runtime_error(this,"Expected comma or closing brace in dictionary"); goto LAB_00166c9f; } /* try { // try from 00166bc6 to 00166bcd has its CatchHandler @ 00166d13 */ parseDictionary()::{lambda()#1}::operator()((_lambda___1_ *)local_40); } while( true ); } /* try { // try from 00166b1f to 00166b2b has its CatchHandler @ 00166cea */ get_location(); /* try { // try from 00166b31 to 00166b44 has its CatchHandler @ 00166cdb */ std:: make_shared<minja::DictExpr,minja::Location,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>>> ((Location *)&local_a8,local_78); LAB_00166c42: uVar1 = auStack_a0[0]; auStack_a0[0] = 0; *local_80 = local_a8; local_80[1] = uVar1; local_a8 = 0; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_a0); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)local_70); std:: vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>> ::~vector((vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>> *)&local_58); } return local_80; }
5,594
minja::Parser::parseDictionary()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Expression> parseDictionary() { if (consumeToken("{").empty()) return nullptr; std::vector<std::pair<std::shared_ptr<Expression>, std::shared_ptr<Expression>>> elements; if (!consumeToken("}").empty()) { return std::make_shared<DictExpr>(get_location(), std::move(elements)); } auto parseKeyValuePair = [&]() { auto key = parseExpression(); if (!key) throw std::runtime_error("Expected key in dictionary"); if (consumeToken(":").empty()) throw std::runtime_error("Expected colon betweek key & value in dictionary"); auto value = parseExpression(); if (!value) throw std::runtime_error("Expected value in dictionary"); elements.emplace_back(std::pair(std::move(key), std::move(value))); }; parseKeyValuePair(); while (it != end) { if (!consumeToken(",").empty()) { parseKeyValuePair(); } else if (!consumeToken("}").empty()) { return std::make_shared<DictExpr>(get_location(), std::move(elements)); } else { throw std::runtime_error("Expected comma or closing brace in dictionary"); } } throw std::runtime_error("Expected closing brace"); }
O3
cpp
minja::Parser::parseDictionary(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rsi, %r14 movq %rdi, %r12 leaq 0x10(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x64c0d(%rip), %rsi # 0xefc7d leaq 0x64c07(%rip), %rdx # 0xefc7e movq %rsp, %rdi callq 0x21cae leaq 0x20(%rsp), %rdi movq %rsp, %rdx movq %r14, %rsi movl $0x1, %ecx callq 0x83cf8 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi movq -0x8(%rax), %rbx cmpq %rax, %rdi je 0x8b0b3 movq 0x30(%rsp), %rsi incq %rsi callq 0x1a8d0 movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x8b0ce movq 0x10(%rsp), %rsi incq %rsi callq 0x1a8d0 xorps %xmm0, %xmm0 testq %rbx, %rbx je 0x8b188 movaps %xmm0, 0x40(%rsp) movq $0x0, 0x50(%rsp) movq %rsp, %rdi leaq 0x10(%rsp), %rax movq %rax, (%rdi) leaq 0x69365(%rip), %rsi # 0xf445f leaq 0x6935f(%rip), %rdx # 0xf4460 callq 0x21cae leaq 0x20(%rsp), %rdi movq %rsp, %rdx movq %r14, %rsi movl $0x1, %ecx callq 0x83cf8 movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rbx leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x8b13c movq 0x30(%rsp), %rsi incq %rsi callq 0x1a8d0 movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x8b157 movq 0x10(%rsp), %rsi incq %rsi callq 0x1a8d0 testq %rbx, %rbx je 0x8b192 movq %r12, %r13 movq (%r14), %r12 movq 0x8(%r14), %r15 testq %r15, %r15 je 0x8b2e6 movq 0xa0e12(%rip), %rax # 0x12bf88 cmpb $0x0, (%rax) je 0x8b2e1 incl 0x8(%r15) jmp 0x8b2e6 movups %xmm0, (%r12) jmp 0x8b404 movq %r12, 0x60(%rsp) leaq 0x68(%rsp), %rdi movq %r14, (%rdi) leaq 0x40(%rsp), %rax movq %rax, 0x8(%rdi) callq 0x8e3b2 leaq 0x64fc3(%rip), %r12 # 0xf0177 movq %rsp, %r13 leaq 0x20(%rsp), %rbp leaq 0x68(%rsp), %rbx movq 0x20(%r14), %rax cmpq 0x18(%r14), %rax je 0x8b416 leaq 0x10(%rsp), %rax movq %rax, (%rsp) movq %r13, %rdi leaq 0x64f94(%rip), %rsi # 0xf0176 movq %r12, %rdx callq 0x21cae movq %rbp, %rdi movq %r14, %rsi movq %r13, %rdx movl $0x1, %ecx callq 0x83cf8 movq 0x20(%rsp), %rdi movq 0x28(%rsp), %r15 leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x8b21e movq 0x30(%rsp), %rsi incq %rsi callq 0x1a8d0 movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x8b239 movq 0x10(%rsp), %rsi incq %rsi callq 0x1a8d0 testq %r15, %r15 je 0x8b24b movq %rbx, %rdi callq 0x8e3b2 jmp 0x8b1c1 movq %rsp, %rdi leaq 0x10(%rsp), %rax movq %rax, (%rdi) leaq 0x69202(%rip), %rsi # 0xf445f leaq 0x691fc(%rip), %rdx # 0xf4460 callq 0x21cae leaq 0x20(%rsp), %rdi movq %rsp, %rdx movq %r14, %rsi movl $0x1, %ecx callq 0x83cf8 movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rbx leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x8b29f movq 0x30(%rsp), %rsi incq %rsi callq 0x1a8d0 movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x8b2ba movq 0x10(%rsp), %rsi incq %rsi callq 0x1a8d0 testq %rbx, %rbx je 0x8b448 movq (%r14), %r12 movq 0x8(%r14), %r15 testq %r15, %r15 je 0x8b341 movq 0xa0cb2(%rip), %rax # 0x12bf88 cmpb $0x0, (%rax) je 0x8b33c incl 0x8(%r15) jmp 0x8b341 lock incl 0x8(%r15) movq 0x20(%r14), %rbx subq 0x10(%r14), %rbx movl $0x48, %edi callq 0x1a8b0 leaq 0x9f309(%rip), %rdx # 0x12a608 addq $0x10, %rdx movq %rax, %rcx addq $0x10, %rcx leaq 0x9f0a7(%rip), %rsi # 0x12a3b8 addq $0x10, %rsi movabsq $0x100000001, %rdi # imm = 0x100000001 movq %rdi, 0x8(%rax) movq %rdx, (%rax) movq %rsi, 0x10(%rax) movq %r12, 0x18(%rax) movq %r15, 0x20(%rax) testq %r15, %r15 movq %r13, %r12 jne 0x8b397 jmp 0x8b3ae lock incl 0x8(%r15) movq 0x20(%r14), %rbx subq 0x10(%r14), %rbx movl $0x48, %edi callq 0x1a8b0 leaq 0x9f2ae(%rip), %rdx # 0x12a608 addq $0x10, %rdx movq %rax, %rcx addq $0x10, %rcx leaq 0x9f04c(%rip), %rsi # 0x12a3b8 addq $0x10, %rsi movabsq $0x100000001, %rdi # imm = 0x100000001 movq %rdi, 0x8(%rax) movq %rdx, (%rax) movq %rsi, 0x10(%rax) movq %r12, 0x18(%rax) movq %r15, 0x20(%rax) testq %r15, %r15 movq 0x60(%rsp), %r12 je 0x8b3ae movq 0xa0bea(%rip), %rdx # 0x12bf88 cmpb $0x0, (%rdx) je 0x8b3a9 incl 0x8(%r15) jmp 0x8b3ae lock incl 0x8(%r15) leaq 0x9f2a3(%rip), %rdx # 0x12a658 addq $0x10, %rdx movq %rbx, 0x28(%rax) movq %rdx, 0x10(%rax) movaps 0x40(%rsp), %xmm0 movups %xmm0, 0x30(%rax) movq 0x50(%rsp), %rdx movq %rdx, 0x40(%rax) xorps %xmm0, %xmm0 movaps %xmm0, 0x40(%rsp) movq $0x0, 0x50(%rsp) movq %rcx, (%r12) movq %rax, 0x8(%r12) testq %r15, %r15 je 0x8b3fa movq %r15, %rdi callq 0x6d59a leaq 0x40(%rsp), %rdi callq 0x8e5ea movq %r12, %rax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x1a450 movq %rax, %r14 leaq 0x64e80(%rip), %rsi # 0xf02aa movq %rax, %rdi callq 0x1a330 movq 0xa0bb7(%rip), %rsi # 0x12bff0 movq 0xa0b20(%rip), %rdx # 0x12bf60 movq %r14, %rdi callq 0x1af40 movl $0x10, %edi callq 0x1a450 movq %rax, %r14 leaq 0x64e20(%rip), %rsi # 0xf027c movq %rax, %rdi callq 0x1a330 jmp 0x8b432 jmp 0x8b4a9 jmp 0x8b46e jmp 0x8b4cf jmp 0x8b4ba movq %rax, %rbx testq %r15, %r15 je 0x8b4bd movq %r15, %rdi callq 0x6d59a jmp 0x8b4bd jmp 0x8b4cf jmp 0x8b4ba movq %rax, %rbx movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x8b4c7 movq 0x10(%rsp), %rsi incq %rsi callq 0x1a8d0 jmp 0x8b4c7 movq %rax, %rbx jmp 0x8b4c7 movq %rax, %rbx movq %r14, %rdi callq 0x1a680 jmp 0x8b4bd jmp 0x8b4ba jmp 0x8b4ba movq %rax, %rbx leaq 0x40(%rsp), %rdi callq 0x8e5ea movq %rbx, %rdi callq 0x1afc0 movq %rax, %rbx movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x8b4bd movq 0x10(%rsp), %rsi incq %rsi callq 0x1a8d0 jmp 0x8b4bd nop
_ZN5minja6Parser15parseDictionaryEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov r14, rsi mov r12, rdi lea rax, [rsp+0A8h+var_98] mov [rax-10h], rax lea rsi, asc_EFC7D; "{" lea rdx, asc_EFC7D+1; "" mov rdi, rsp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+0A8h+var_88] mov rdx, rsp mov rsi, r14 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) lea rax, [rsp+0A8h+var_78] mov rdi, [rax-10h]; void * mov rbx, [rax-8] cmp rdi, rax jz short loc_8B0B3 mov rsi, [rsp+0A8h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8B0B3: mov rdi, [rsp+0A8h+var_A8]; void * lea rax, [rsp+0A8h+var_98] cmp rdi, rax jz short loc_8B0CE mov rsi, [rsp+0A8h+var_98] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8B0CE: xorps xmm0, xmm0 test rbx, rbx jz loc_8B188 movaps [rsp+0A8h+var_68], xmm0 mov [rsp+0A8h+var_58], 0 mov rdi, rsp lea rax, [rsp+0A8h+var_98] mov [rdi], rax lea rsi, aT020+7; "}" lea rdx, aT020+8; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+0A8h+var_88] mov rdx, rsp mov rsi, r14 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) mov rdi, [rsp+0A8h+var_88]; void * mov rbx, [rsp+0A8h+var_80] lea rax, [rsp+0A8h+var_78] cmp rdi, rax jz short loc_8B13C mov rsi, [rsp+0A8h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8B13C: mov rdi, [rsp+0A8h+var_A8]; void * lea rax, [rsp+0A8h+var_98] cmp rdi, rax jz short loc_8B157 mov rsi, [rsp+0A8h+var_98] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8B157: test rbx, rbx jz short loc_8B192 mov r13, r12 mov r12, [r14] mov r15, [r14+8] test r15, r15 jz loc_8B2E6 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz loc_8B2E1 inc dword ptr [r15+8] jmp loc_8B2E6 loc_8B188: movups xmmword ptr [r12], xmm0 jmp loc_8B404 loc_8B192: mov [rsp+0A8h+var_48], r12 lea rdi, [rsp+0A8h+var_40] mov [rdi], r14 lea rax, [rsp+0A8h+var_68] mov [rdi+8], rax call _ZZN5minja6Parser15parseDictionaryEvENKUlvE_clEv; minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(void) lea r12, asc_F0176+1; "" mov r13, rsp lea rbp, [rsp+0A8h+var_88] lea rbx, [rsp+0A8h+var_40] loc_8B1C1: mov rax, [r14+20h] cmp rax, [r14+18h] jz loc_8B416 lea rax, [rsp+0A8h+var_98] mov [rsp+0A8h+var_A8], rax mov rdi, r13 lea rsi, asc_F0176; "," mov rdx, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdi, rbp mov rsi, r14 mov rdx, r13 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) mov rdi, [rsp+0A8h+var_88]; void * mov r15, [rsp+0A8h+var_80] lea rax, [rsp+0A8h+var_78] cmp rdi, rax jz short loc_8B21E mov rsi, [rsp+0A8h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8B21E: mov rdi, [rsp+0A8h+var_A8]; void * lea rax, [rsp+0A8h+var_98] cmp rdi, rax jz short loc_8B239 mov rsi, [rsp+0A8h+var_98] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8B239: test r15, r15 jz short loc_8B24B mov rdi, rbx call _ZZN5minja6Parser15parseDictionaryEvENKUlvE_clEv; minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(void) jmp loc_8B1C1 loc_8B24B: mov rdi, rsp lea rax, [rsp+0A8h+var_98] mov [rdi], rax lea rsi, aT020+7; "}" lea rdx, aT020+8; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+0A8h+var_88] mov rdx, rsp mov rsi, r14 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) mov rdi, [rsp+0A8h+var_88]; void * mov rbx, [rsp+0A8h+var_80] lea rax, [rsp+0A8h+var_78] cmp rdi, rax jz short loc_8B29F mov rsi, [rsp+0A8h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8B29F: mov rdi, [rsp+0A8h+var_A8]; void * lea rax, [rsp+0A8h+var_98] cmp rdi, rax jz short loc_8B2BA mov rsi, [rsp+0A8h+var_98] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8B2BA: test rbx, rbx jz loc_8B448 mov r12, [r14] mov r15, [r14+8] test r15, r15 jz short loc_8B341 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_8B33C inc dword ptr [r15+8] jmp short loc_8B341 loc_8B2E1: lock inc dword ptr [r15+8] loc_8B2E6: mov rbx, [r14+20h] sub rbx, [r14+10h] mov edi, 48h ; 'H'; unsigned __int64 call __Znwm; operator new(ulong) lea rdx, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja8DictExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::DictExpr,std::allocator<minja::DictExpr>,(__gnu_cxx::_Lock_policy)2> add rdx, 10h mov rcx, rax add rcx, 10h lea rsi, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression add rsi, 10h mov rdi, 100000001h mov [rax+8], rdi mov [rax], rdx mov [rax+10h], rsi mov [rax+18h], r12 mov [rax+20h], r15 test r15, r15 mov r12, r13 jnz short loc_8B397 jmp short loc_8B3AE loc_8B33C: lock inc dword ptr [r15+8] loc_8B341: mov rbx, [r14+20h] sub rbx, [r14+10h] mov edi, 48h ; 'H'; unsigned __int64 call __Znwm; operator new(ulong) lea rdx, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja8DictExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::DictExpr,std::allocator<minja::DictExpr>,(__gnu_cxx::_Lock_policy)2> add rdx, 10h mov rcx, rax add rcx, 10h lea rsi, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression add rsi, 10h mov rdi, 100000001h mov [rax+8], rdi mov [rax], rdx mov [rax+10h], rsi mov [rax+18h], r12 mov [rax+20h], r15 test r15, r15 mov r12, [rsp+0A8h+var_48] jz short loc_8B3AE loc_8B397: mov rdx, cs:__libc_single_threaded_ptr cmp byte ptr [rdx], 0 jz short loc_8B3A9 inc dword ptr [r15+8] jmp short loc_8B3AE loc_8B3A9: lock inc dword ptr [r15+8] loc_8B3AE: lea rdx, _ZTVN5minja8DictExprE; `vtable for'minja::DictExpr add rdx, 10h mov [rax+28h], rbx mov [rax+10h], rdx movaps xmm0, [rsp+0A8h+var_68] movups xmmword ptr [rax+30h], xmm0 mov rdx, [rsp+0A8h+var_58] mov [rax+40h], rdx xorps xmm0, xmm0 movaps [rsp+0A8h+var_68], xmm0 mov [rsp+0A8h+var_58], 0 mov [r12], rcx mov [r12+8], rax test r15, r15 jz short loc_8B3FA mov rdi, r15 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_8B3FA: lea rdi, [rsp+0A8h+var_68] call _ZNSt6vectorISt4pairISt10shared_ptrIN5minja10ExpressionEES4_ESaIS5_EED2Ev; std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>::~vector() loc_8B404: mov rax, r12 add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8B416: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedClosin_5; "Expected closing brace" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_8B432: mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_8B448: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedCommaO_0; "Expected comma or closing brace in dict"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_8B432 jmp short loc_8B4A9 jmp short loc_8B46E jmp short loc_8B4CF jmp short loc_8B4BA loc_8B46E: mov rbx, rax test r15, r15 jz short loc_8B4BD mov rdi, r15 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp short loc_8B4BD jmp short loc_8B4CF jmp short loc_8B4BA mov rbx, rax mov rdi, [rsp+0]; void * lea rax, [rsp+arg_8] cmp rdi, rax jz short loc_8B4C7 mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_8B4C7 mov rbx, rax jmp short loc_8B4C7 loc_8B4A9: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_8B4BD jmp short loc_8B4BA jmp short $+2 loc_8B4BA: mov rbx, rax loc_8B4BD: lea rdi, [rsp+arg_38] call _ZNSt6vectorISt4pairISt10shared_ptrIN5minja10ExpressionEES4_ESaIS5_EED2Ev; std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>::~vector() loc_8B4C7: mov rdi, rbx call __Unwind_Resume loc_8B4CF: mov rbx, rax mov rdi, [rsp+0]; void * lea rax, [rsp+arg_8] cmp rdi, rax jz short loc_8B4BD mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_8B4BD
minja::Parser * minja::Parser::parseDictionary(minja::Parser *this, _QWORD *a2) { minja::Parser *v2; // r12 long long v3; // rbx long long v4; // rbx long long v5; // r12 volatile signed __int32 *v6; // r15 long long v7; // r15 long long v8; // rbx long long v9; // r12 long long v10; // rbx long long v11; // rax long long v12; // rcx std::runtime_error *exception; // r14 void *v15[2]; // [rsp+0h] [rbp-A8h] BYREF _QWORD v16[2]; // [rsp+10h] [rbp-98h] BYREF void *v17; // [rsp+20h] [rbp-88h] BYREF long long v18; // [rsp+28h] [rbp-80h] _QWORD v19[2]; // [rsp+30h] [rbp-78h] BYREF __int128 v20; // [rsp+40h] [rbp-68h] BYREF long long v21; // [rsp+50h] [rbp-58h] minja::Parser *v22; // [rsp+60h] [rbp-48h] _QWORD *v23; // [rsp+68h] [rbp-40h] __int128 *v24; // [rsp+70h] [rbp-38h] v2 = this; v15[0] = v16; std::string::_M_construct<char const*>((long long)v15, "{", (long long)""); minja::Parser::consumeToken(&v17, (long long)a2, (_BYTE **)v15, 1u); v3 = v18; if ( v17 != v19 ) operator delete(v17, v19[0] + 1LL); if ( v15[0] != v16 ) operator delete(v15[0], v16[0] + 1LL); if ( !v3 ) { *(_OWORD *)this = 0LL; return v2; } v20 = 0LL; v21 = 0LL; v15[0] = v16; std::string::_M_construct<char const*>((long long)v15, "}", (long long)""); minja::Parser::consumeToken(&v17, (long long)a2, (_BYTE **)v15, 1u); v4 = v18; if ( v17 != v19 ) operator delete(v17, v19[0] + 1LL); if ( v15[0] != v16 ) operator delete(v15[0], v16[0] + 1LL); if ( v4 ) { v5 = *a2; v6 = (volatile signed __int32 *)a2[1]; if ( v6 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v6 + 2); else _InterlockedIncrement(v6 + 2); } v10 = a2[4] - a2[2]; v11 = operator new(0x48uLL); v12 = v11 + 16; *(_QWORD *)(v11 + 8) = 0x100000001LL; *(_QWORD *)v11 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::DictExpr,std::allocator<minja::DictExpr>,(__gnu_cxx::_Lock_policy)2> + 2; *(_QWORD *)(v11 + 16) = &`vtable for'minja::Expression + 2; *(_QWORD *)(v11 + 24) = v5; *(_QWORD *)(v11 + 32) = v6; v2 = this; if ( v6 ) goto LABEL_36; goto LABEL_39; } v22 = this; v23 = a2; v24 = &v20; minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(0.0); while ( 1 ) { if ( a2[4] == a2[3] ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected closing brace"); goto LABEL_44; } v15[0] = v16; std::string::_M_construct<char const*>((long long)v15, ",", (long long)""); minja::Parser::consumeToken(&v17, (long long)a2, (_BYTE **)v15, 1u); v7 = v18; if ( v17 != v19 ) operator delete(v17, v19[0] + 1LL); if ( v15[0] != v16 ) operator delete(v15[0], v16[0] + 1LL); if ( !v7 ) break; minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(0.0); } v15[0] = v16; std::string::_M_construct<char const*>((long long)v15, "}", (long long)""); minja::Parser::consumeToken(&v17, (long long)a2, (_BYTE **)v15, 1u); v8 = v18; if ( v17 != v19 ) operator delete(v17, v19[0] + 1LL); if ( v15[0] != v16 ) operator delete(v15[0], v16[0] + 1LL); if ( !v8 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected comma or closing brace in dictionary"); LABEL_44: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v9 = *a2; v6 = (volatile signed __int32 *)a2[1]; if ( v6 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v6 + 2); else _InterlockedIncrement(v6 + 2); } v10 = a2[4] - a2[2]; v11 = operator new(0x48uLL); v12 = v11 + 16; *(_QWORD *)(v11 + 8) = 0x100000001LL; *(_QWORD *)v11 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::DictExpr,std::allocator<minja::DictExpr>,(__gnu_cxx::_Lock_policy)2> + 2; *(_QWORD *)(v11 + 16) = &`vtable for'minja::Expression + 2; *(_QWORD *)(v11 + 24) = v9; *(_QWORD *)(v11 + 32) = v6; v2 = v22; if ( v6 ) { LABEL_36: if ( _libc_single_threaded ) ++*((_DWORD *)v6 + 2); else _InterlockedIncrement(v6 + 2); } LABEL_39: *(_QWORD *)(v11 + 40) = v10; *(_QWORD *)(v11 + 16) = &`vtable for'minja::DictExpr + 2; *(_OWORD *)(v11 + 48) = v20; *(_QWORD *)(v11 + 64) = v21; v20 = 0LL; v21 = 0LL; *(_QWORD *)v2 = v12; *((_QWORD *)v2 + 1) = v11; if ( v6 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6); std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>::~vector(&v20); return v2; }
parseDictionary: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV R14,RSI MOV R12,RDI LEA RAX,[RSP + 0x10] MOV qword ptr [RAX + -0x10],RAX LAB_0018b069: LEA RSI,[0x1efc7d] LEA RDX,[0x1efc7e] MOV RDI,RSP CALL 0x00121cae LAB_0018b07f: LEA RDI,[RSP + 0x20] MOV RDX,RSP MOV RSI,R14 MOV ECX,0x1 CALL 0x00183cf8 LEA RAX,[RSP + 0x30] MOV RDI,qword ptr [RAX + -0x10] MOV RBX,qword ptr [RAX + -0x8] CMP RDI,RAX JZ 0x0018b0b3 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x0011a8d0 LAB_0018b0b3: MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x0018b0ce MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x0011a8d0 LAB_0018b0ce: XORPS XMM0,XMM0 TEST RBX,RBX JZ 0x0018b188 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOV qword ptr [RSP + 0x50],0x0 MOV RDI,RSP LEA RAX,[RSP + 0x10] MOV qword ptr [RDI],RAX LAB_0018b0f3: LEA RSI,[0x1f445f] LEA RDX,[0x1f4460] CALL 0x00121cae LAB_0018b106: LEA RDI,[RSP + 0x20] MOV RDX,RSP MOV RSI,R14 MOV ECX,0x1 CALL 0x00183cf8 MOV RDI,qword ptr [RSP + 0x20] MOV RBX,qword ptr [RSP + 0x28] LEA RAX,[RSP + 0x30] CMP RDI,RAX JZ 0x0018b13c MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x0011a8d0 LAB_0018b13c: MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x0018b157 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x0011a8d0 LAB_0018b157: TEST RBX,RBX JZ 0x0018b192 MOV R13,R12 MOV R12,qword ptr [R14] MOV R15,qword ptr [R14 + 0x8] TEST R15,R15 JZ 0x0018b2e6 MOV RAX,qword ptr [0x0022bf88] CMP byte ptr [RAX],0x0 JZ 0x0018b2e1 INC dword ptr [R15 + 0x8] JMP 0x0018b2e6 LAB_0018b188: MOVUPS xmmword ptr [R12],XMM0 JMP 0x0018b404 LAB_0018b192: MOV qword ptr [RSP + 0x60],R12 LEA RDI,[RSP + 0x68] MOV qword ptr [RDI],R14 LEA RAX,[RSP + 0x40] MOV qword ptr [RDI + 0x8],RAX LAB_0018b1a8: CALL 0x0018e3b2 LEA R12,[0x1f0177] MOV R13,RSP LEA RBP,[RSP + 0x20] LEA RBX,[RSP + 0x68] LAB_0018b1c1: MOV RAX,qword ptr [R14 + 0x20] CMP RAX,qword ptr [R14 + 0x18] JZ 0x0018b416 LEA RAX,[RSP + 0x10] MOV qword ptr [RSP],RAX LAB_0018b1d8: MOV RDI,R13 LEA RSI,[0x1f0176] MOV RDX,R12 CALL 0x00121cae LAB_0018b1ea: MOV RDI,RBP MOV RSI,R14 MOV RDX,R13 MOV ECX,0x1 CALL 0x00183cf8 MOV RDI,qword ptr [RSP + 0x20] MOV R15,qword ptr [RSP + 0x28] LEA RAX,[RSP + 0x30] CMP RDI,RAX JZ 0x0018b21e MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x0011a8d0 LAB_0018b21e: MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x0018b239 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x0011a8d0 LAB_0018b239: TEST R15,R15 JZ 0x0018b24b LAB_0018b23e: MOV RDI,RBX CALL 0x0018e3b2 JMP 0x0018b1c1 LAB_0018b24b: MOV RDI,RSP LEA RAX,[RSP + 0x10] MOV qword ptr [RDI],RAX LAB_0018b256: LEA RSI,[0x1f445f] LEA RDX,[0x1f4460] CALL 0x00121cae LAB_0018b269: LEA RDI,[RSP + 0x20] MOV RDX,RSP MOV RSI,R14 MOV ECX,0x1 CALL 0x00183cf8 MOV RDI,qword ptr [RSP + 0x20] MOV RBX,qword ptr [RSP + 0x28] LEA RAX,[RSP + 0x30] CMP RDI,RAX JZ 0x0018b29f MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x0011a8d0 LAB_0018b29f: MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x0018b2ba MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x0011a8d0 LAB_0018b2ba: TEST RBX,RBX JZ 0x0018b448 MOV R12,qword ptr [R14] MOV R15,qword ptr [R14 + 0x8] TEST R15,R15 JZ 0x0018b341 MOV RAX,qword ptr [0x0022bf88] CMP byte ptr [RAX],0x0 JZ 0x0018b33c INC dword ptr [R15 + 0x8] JMP 0x0018b341 LAB_0018b2e1: INC.LOCK dword ptr [R15 + 0x8] LAB_0018b2e6: MOV RBX,qword ptr [R14 + 0x20] SUB RBX,qword ptr [R14 + 0x10] LAB_0018b2ee: MOV EDI,0x48 CALL 0x0011a8b0 LEA RDX,[0x22a608] ADD RDX,0x10 MOV RCX,RAX ADD RCX,0x10 LEA RSI,[0x22a3b8] ADD RSI,0x10 MOV RDI,0x100000001 MOV qword ptr [RAX + 0x8],RDI MOV qword ptr [RAX],RDX MOV qword ptr [RAX + 0x10],RSI MOV qword ptr [RAX + 0x18],R12 MOV qword ptr [RAX + 0x20],R15 TEST R15,R15 MOV R12,R13 JNZ 0x0018b397 JMP 0x0018b3ae LAB_0018b33c: INC.LOCK dword ptr [R15 + 0x8] LAB_0018b341: MOV RBX,qword ptr [R14 + 0x20] SUB RBX,qword ptr [R14 + 0x10] LAB_0018b349: MOV EDI,0x48 CALL 0x0011a8b0 LAB_0018b353: LEA RDX,[0x22a608] ADD RDX,0x10 MOV RCX,RAX ADD RCX,0x10 LEA RSI,[0x22a3b8] ADD RSI,0x10 MOV RDI,0x100000001 MOV qword ptr [RAX + 0x8],RDI MOV qword ptr [RAX],RDX MOV qword ptr [RAX + 0x10],RSI MOV qword ptr [RAX + 0x18],R12 MOV qword ptr [RAX + 0x20],R15 TEST R15,R15 MOV R12,qword ptr [RSP + 0x60] JZ 0x0018b3ae LAB_0018b397: MOV RDX,qword ptr [0x0022bf88] CMP byte ptr [RDX],0x0 JZ 0x0018b3a9 INC dword ptr [R15 + 0x8] JMP 0x0018b3ae LAB_0018b3a9: INC.LOCK dword ptr [R15 + 0x8] LAB_0018b3ae: LEA RDX,[0x22a658] ADD RDX,0x10 MOV qword ptr [RAX + 0x28],RBX MOV qword ptr [RAX + 0x10],RDX MOVAPS XMM0,xmmword ptr [RSP + 0x40] MOVUPS xmmword ptr [RAX + 0x30],XMM0 MOV RDX,qword ptr [RSP + 0x50] MOV qword ptr [RAX + 0x40],RDX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOV qword ptr [RSP + 0x50],0x0 MOV qword ptr [R12],RCX MOV qword ptr [R12 + 0x8],RAX TEST R15,R15 JZ 0x0018b3fa MOV RDI,R15 CALL 0x0016d59a LAB_0018b3fa: LEA RDI,[RSP + 0x40] CALL 0x0018e5ea LAB_0018b404: MOV RAX,R12 ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018b416: MOV EDI,0x10 CALL 0x0011a450 MOV R14,RAX LAB_0018b423: LEA RSI,[0x1f02aa] MOV RDI,RAX CALL 0x0011a330 LAB_0018b432: MOV RSI,qword ptr [0x0022bff0] MOV RDX,qword ptr [0x0022bf60] MOV RDI,R14 CALL 0x0011af40 LAB_0018b448: MOV EDI,0x10 CALL 0x0011a450 MOV R14,RAX LAB_0018b455: LEA RSI,[0x1f027c] MOV RDI,RAX CALL 0x0011a330 LAB_0018b464: JMP 0x0018b432
/* minja::Parser::parseDictionary() */ int8 * minja::Parser::parseDictionary(void) { int8 uVar1; int8 *puVar2; runtime_error *this; int8 *puVar3; long lVar4; int8 *in_RSI; int8 *in_RDI; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this_00; long *local_a8 [2]; long local_98 [2]; long *local_88; long local_80; long local_78 [2]; int8 local_68; int8 uStack_60; int8 local_58; int8 *local_48; _lambda___1_ local_40 [8]; int8 *local_38; local_a8[0] = local_98; /* try { // try from 0018b069 to 0018b07e has its CatchHandler @ 0018b4a4 */ std::__cxx11::string::_M_construct<char_const*>(local_a8,&DAT_001efc7d,&DAT_001efc7e); /* try { // try from 0018b07f to 0018b093 has its CatchHandler @ 0018b484 */ consumeToken(&local_88); lVar4 = local_80; if (local_88 != local_78) { operator_delete(local_88,local_78[0] + 1); } if (local_a8[0] != local_98) { operator_delete(local_a8[0],local_98[0] + 1); } if (lVar4 == 0) { *in_RDI = 0; in_RDI[1] = 0; } else { local_68 = 0; uStack_60 = 0; local_58 = 0; local_a8[0] = local_98; /* try { // try from 0018b0f3 to 0018b105 has its CatchHandler @ 0018b482 */ std::__cxx11::string::_M_construct<char_const*>(local_a8,&DAT_001f445f,&DAT_001f4460); /* try { // try from 0018b106 to 0018b11a has its CatchHandler @ 0018b480 */ consumeToken(&local_88); lVar4 = local_80; if (local_88 != local_78) { operator_delete(local_88,local_78[0] + 1); } if (local_a8[0] != local_98) { operator_delete(local_a8[0],local_98[0] + 1); } if (lVar4 == 0) { local_38 = &local_68; local_48 = in_RDI; /* try { // try from 0018b1a8 to 0018b1ac has its CatchHandler @ 0018b4b6 */ parseDictionary()::{lambda()#1}::operator()(local_40); do { if (in_RSI[4] == in_RSI[3]) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0018b423 to 0018b431 has its CatchHandler @ 0018b4a9 */ std::runtime_error::runtime_error(this,"Expected closing brace"); LAB_0018b432: /* try { // try from 0018b432 to 0018b447 has its CatchHandler @ 0018b4b6 */ /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60); } local_a8[0] = local_98; /* try { // try from 0018b1d8 to 0018b1e9 has its CatchHandler @ 0018b4ba */ std::__cxx11::string::_M_construct<char_const*>(local_a8,&DAT_001f0176,&DAT_001f0177); /* try { // try from 0018b1ea to 0018b1fc has its CatchHandler @ 0018b4cf */ consumeToken(&local_88); lVar4 = local_80; if (local_88 != local_78) { operator_delete(local_88,local_78[0] + 1); } if (local_a8[0] != local_98) { operator_delete(local_a8[0],local_98[0] + 1); } if (lVar4 == 0) { local_a8[0] = local_98; /* try { // try from 0018b256 to 0018b268 has its CatchHandler @ 0018b46c */ std::__cxx11::string::_M_construct<char_const*>(local_a8,&DAT_001f445f,&DAT_001f4460); /* try { // try from 0018b269 to 0018b27d has its CatchHandler @ 0018b46a */ consumeToken(&local_88); if (local_88 != local_78) { operator_delete(local_88,local_78[0] + 1); } if (local_a8[0] != local_98) { operator_delete(local_a8[0],local_98[0] + 1); } if (local_80 == 0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0018b455 to 0018b463 has its CatchHandler @ 0018b466 */ std::runtime_error::runtime_error(this,"Expected comma or closing brace in dictionary"); goto LAB_0018b432; } uVar1 = *in_RSI; this_00 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1]; if (this_00 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_0022bf88 == '\0') { LOCK(); *(int *)(this_00 + 8) = *(int *)(this_00 + 8) + 1; UNLOCK(); } else { *(int *)(this_00 + 8) = *(int *)(this_00 + 8) + 1; } } lVar4 = in_RSI[4] - in_RSI[2]; /* try { // try from 0018b349 to 0018b352 has its CatchHandler @ 0018b468 */ puVar2 = (int8 *)operator_new(0x48); puVar3 = puVar2 + 2; puVar2[1] = 0x100000001; *puVar2 = &PTR___Sp_counted_ptr_inplace_0022a618; puVar2[2] = &PTR___cxa_pure_virtual_0022a3c8; puVar2[3] = uVar1; puVar2[4] = this_00; in_RDI = local_48; if (this_00 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) goto LAB_0018b3ae; goto LAB_0018b397; } /* try { // try from 0018b23e to 0018b245 has its CatchHandler @ 0018b4b8 */ parseDictionary()::{lambda()#1}::operator()(local_40); } while( true ); } uVar1 = *in_RSI; this_00 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1]; if (this_00 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_0022bf88 == '\0') { LOCK(); *(int *)(this_00 + 8) = *(int *)(this_00 + 8) + 1; UNLOCK(); } else { *(int *)(this_00 + 8) = *(int *)(this_00 + 8) + 1; } } lVar4 = in_RSI[4] - in_RSI[2]; /* try { // try from 0018b2ee to 0018b2f7 has its CatchHandler @ 0018b46e */ puVar2 = (int8 *)operator_new(0x48); puVar3 = puVar2 + 2; puVar2[1] = 0x100000001; *puVar2 = &PTR___Sp_counted_ptr_inplace_0022a618; puVar2[2] = &PTR___cxa_pure_virtual_0022a3c8; puVar2[3] = uVar1; puVar2[4] = this_00; if (this_00 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { LAB_0018b397: if (*PTR___libc_single_threaded_0022bf88 == '\0') { LOCK(); *(int *)(this_00 + 8) = *(int *)(this_00 + 8) + 1; UNLOCK(); } else { *(int *)(this_00 + 8) = *(int *)(this_00 + 8) + 1; } } LAB_0018b3ae: puVar2[5] = lVar4; puVar2[2] = &PTR_do_evaluate_0022a668; puVar2[6] = local_68; puVar2[7] = uStack_60; puVar2[8] = local_58; local_68 = 0; uStack_60 = 0; local_58 = 0; *in_RDI = puVar3; in_RDI[1] = puVar2; if (this_00 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this_00); } std:: vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>> ::~vector((vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>> *)&local_68); } return in_RDI; }
5,595
mbedtls_pk_parse_public_keyfile
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/pkparse.c
int mbedtls_pk_parse_public_keyfile(mbedtls_pk_context *ctx, const char *path) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; size_t n; unsigned char *buf; PK_VALIDATE_RET(ctx != NULL); PK_VALIDATE_RET(path != NULL); if ((ret = mbedtls_pk_load_file(path, &buf, &n)) != 0) { return ret; } ret = mbedtls_pk_parse_public_key(ctx, buf, n); mbedtls_platform_zeroize(buf, n); mbedtls_free(buf); return ret; }
O3
c
mbedtls_pk_parse_public_keyfile: pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rsi, %rax movq %rdi, %rbx movq %rsp, %rsi leaq 0x8(%rsp), %rdx movq %rax, %rdi callq 0x8c24c testl %eax, %eax jne 0x8c845 movq (%rsp), %r14 movq 0x8(%rsp), %r15 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x8c84f movl %eax, %ebx movq %r14, %rdi movq %r15, %rsi callq 0x8db8c movq %r14, %rdi callq 0xf560 movl %ebx, %eax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq
mbedtls_pk_parse_public_keyfile: push r15 push r14 push rbx sub rsp, 10h mov rax, rsi mov rbx, rdi mov rsi, rsp lea rdx, [rsp+28h+var_20] mov rdi, rax call mbedtls_pk_load_file test eax, eax jnz short loc_8C845 mov r14, [rsp+28h+var_28] mov r15, [rsp+28h+var_20] mov rdi, rbx mov rsi, r14 mov rdx, r15 call mbedtls_pk_parse_public_key mov ebx, eax mov rdi, r14 mov rsi, r15 call mbedtls_platform_zeroize mov rdi, r14 call _free mov eax, ebx loc_8C845: add rsp, 10h pop rbx pop r14 pop r15 retn
long long mbedtls_pk_parse_public_keyfile(long long a1, long long a2) { long long result; // rax long long v3; // r14 long long v4; // r15 unsigned int v5; // ebx long long v6; // [rsp+0h] [rbp-28h] BYREF long long v7[4]; // [rsp+8h] [rbp-20h] BYREF result = mbedtls_pk_load_file(a2, &v6, v7); if ( !(_DWORD)result ) { v3 = v6; v4 = v7[0]; v5 = mbedtls_pk_parse_public_key(a1, v6, v7[0]); mbedtls_platform_zeroize(v3, v4); free(v3); return v5; } return result; }
mbedtls_pk_parse_public_keyfile: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV RAX,RSI MOV RBX,RDI MOV RSI,RSP LEA RDX,[RSP + 0x8] MOV RDI,RAX CALL 0x0018c24c TEST EAX,EAX JNZ 0x0018c845 MOV R14,qword ptr [RSP] MOV R15,qword ptr [RSP + 0x8] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x0018c84f MOV EBX,EAX MOV RDI,R14 MOV RSI,R15 CALL 0x0018db8c MOV RDI,R14 CALL 0x0010f560 MOV EAX,EBX LAB_0018c845: ADD RSP,0x10 POP RBX POP R14 POP R15 RET
ulong mbedtls_pk_parse_public_keyfile(int8 param_1,int8 param_2) { uint uVar1; ulong uVar2; void *local_28; int8 local_20; uVar2 = mbedtls_pk_load_file(param_2,&local_28,&local_20); if ((int)uVar2 == 0) { uVar1 = mbedtls_pk_parse_public_key(param_1,local_28,local_20); uVar2 = (ulong)uVar1; mbedtls_platform_zeroize(local_28,local_20); free(local_28); } return uVar2; }
5,596
aggregate_thread_memory(bool, PFS_thread*, PFS_account*, PFS_user*, PFS_host*)
eloqsql/storage/perfschema/pfs_instr.cc
void aggregate_thread_memory(bool alive, PFS_thread *thread, PFS_account *safe_account, PFS_user *safe_user, PFS_host *safe_host) { if (thread->read_instr_class_memory_stats() == NULL) return; if (likely(safe_account != NULL)) { /* Aggregate MEMORY_SUMMARY_BY_THREAD_BY_EVENT_NAME to MEMORY_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME. */ aggregate_all_memory(alive, thread->write_instr_class_memory_stats(), safe_account->write_instr_class_memory_stats()); return; } if ((safe_user != NULL) && (safe_host != NULL)) { /* Aggregate MEMORY_SUMMARY_BY_THREAD_BY_EVENT_NAME to: - MEMORY_SUMMARY_BY_USER_BY_EVENT_NAME - MEMORY_SUMMARY_BY_HOST_BY_EVENT_NAME in parallel. */ aggregate_all_memory(alive, thread->write_instr_class_memory_stats(), safe_user->write_instr_class_memory_stats(), safe_host->write_instr_class_memory_stats()); return; } if (safe_user != NULL) { /* Aggregate MEMORY_SUMMARY_BY_THREAD_BY_EVENT_NAME to: - MEMORY_SUMMARY_BY_USER_BY_EVENT_NAME - MEMORY_SUMMARY_GLOBAL_BY_EVENT_NAME in parallel. */ aggregate_all_memory(alive, thread->write_instr_class_memory_stats(), safe_user->write_instr_class_memory_stats(), global_instr_class_memory_array); return; } if (safe_host != NULL) { /* Aggregate MEMORY_SUMMARY_BY_THREAD_BY_EVENT_NAME to MEMORY_SUMMARY_BY_HOST_BY_EVENT_NAME, directly. */ aggregate_all_memory(alive, thread->write_instr_class_memory_stats(), safe_host->write_instr_class_memory_stats()); return; } /* Aggregate MEMORY_SUMMARY_BY_THREAD_BY_EVENT_NAME to MEMORY_SUMMARY_GLOBAL_BY_EVENT_NAME. */ aggregate_all_memory(alive, thread->write_instr_class_memory_stats(), global_instr_class_memory_array); }
O0
cpp
aggregate_thread_memory(bool, PFS_thread*, PFS_account*, PFS_user*, PFS_host*): pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movb %dil, %al andb $0x1, %al movb %al, -0x1(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x10(%rbp), %rdi callq 0x419b0 cmpq $0x0, %rax jne 0x3cde7 jmp 0x3cf21 cmpq $0x0, -0x18(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x3ce2e movb -0x1(%rbp), %al movb %al, -0x29(%rbp) movq -0x10(%rbp), %rdi callq 0x419f0 movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rdi callq 0x419f0 movq -0x38(%rbp), %rsi movq %rax, %rdx movb -0x29(%rbp), %al andb $0x1, %al movzbl %al, %edi callq 0x3c580 jmp 0x3cf21 cmpq $0x0, -0x20(%rbp) je 0x3ce82 cmpq $0x0, -0x28(%rbp) je 0x3ce82 movb -0x1(%rbp), %al movb %al, -0x39(%rbp) movq -0x10(%rbp), %rdi callq 0x419f0 movq %rax, -0x50(%rbp) movq -0x20(%rbp), %rdi callq 0x419f0 movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rdi callq 0x419f0 movq -0x50(%rbp), %rsi movq -0x48(%rbp), %rdx movq %rax, %rcx movb -0x39(%rbp), %al andb $0x1, %al movzbl %al, %edi callq 0x3c640 jmp 0x3cf21 cmpq $0x0, -0x20(%rbp) je 0x3cec2 movb -0x1(%rbp), %al movb %al, -0x51(%rbp) movq -0x10(%rbp), %rdi callq 0x419f0 movq %rax, -0x60(%rbp) movq -0x20(%rbp), %rdi callq 0x419f0 movq -0x60(%rbp), %rsi movq %rax, %rdx movb -0x51(%rbp), %al movq 0x3d0c52(%rip), %rcx # 0x40db08 andb $0x1, %al movzbl %al, %edi callq 0x3c640 jmp 0x3cf21 cmpq $0x0, -0x28(%rbp) je 0x3cefb movb -0x1(%rbp), %al movb %al, -0x61(%rbp) movq -0x10(%rbp), %rdi callq 0x419f0 movq %rax, -0x70(%rbp) movq -0x28(%rbp), %rdi callq 0x419f0 movq -0x70(%rbp), %rsi movq %rax, %rdx movb -0x61(%rbp), %al andb $0x1, %al movzbl %al, %edi callq 0x3c580 jmp 0x3cf21 movb -0x1(%rbp), %al movb %al, -0x71(%rbp) movq -0x10(%rbp), %rdi callq 0x419f0 movq %rax, %rsi movb -0x71(%rbp), %al movq 0x3d0bf1(%rip), %rdx # 0x40db08 andb $0x1, %al movzbl %al, %edi callq 0x3c580 addq $0x80, %rsp popq %rbp retq nopw (%rax,%rax)
_Z23aggregate_thread_memorybP10PFS_threadP11PFS_accountP8PFS_userP8PFS_host: push rbp mov rbp, rsp sub rsp, 80h mov al, dil and al, 1 mov [rbp+var_1], al mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rdi, [rbp+var_10]; this call _ZNK20PFS_connection_slice29read_instr_class_memory_statsEv; PFS_connection_slice::read_instr_class_memory_stats(void) cmp rax, 0 jnz short loc_3CDE7 jmp loc_3CF21 loc_3CDE7: cmp [rbp+var_18], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 jz short loc_3CE2E mov al, [rbp+var_1] mov [rbp+var_29], al mov rdi, [rbp+var_10]; this call _ZN20PFS_connection_slice30write_instr_class_memory_statsEv; PFS_connection_slice::write_instr_class_memory_stats(void) mov [rbp+var_38], rax mov rdi, [rbp+var_18]; this call _ZN20PFS_connection_slice30write_instr_class_memory_statsEv; PFS_connection_slice::write_instr_class_memory_stats(void) mov rsi, [rbp+var_38]; PFS_memory_stat * mov rdx, rax; PFS_memory_stat * mov al, [rbp+var_29] and al, 1 movzx edi, al; bool call _Z20aggregate_all_memorybP15PFS_memory_statS0_; aggregate_all_memory(bool,PFS_memory_stat *,PFS_memory_stat *) jmp loc_3CF21 loc_3CE2E: cmp [rbp+var_20], 0 jz short loc_3CE82 cmp [rbp+var_28], 0 jz short loc_3CE82 mov al, [rbp+var_1] mov [rbp+var_39], al mov rdi, [rbp+var_10]; this call _ZN20PFS_connection_slice30write_instr_class_memory_statsEv; PFS_connection_slice::write_instr_class_memory_stats(void) mov [rbp+var_50], rax mov rdi, [rbp+var_20]; this call _ZN20PFS_connection_slice30write_instr_class_memory_statsEv; PFS_connection_slice::write_instr_class_memory_stats(void) mov [rbp+var_48], rax mov rdi, [rbp+var_28]; this call _ZN20PFS_connection_slice30write_instr_class_memory_statsEv; PFS_connection_slice::write_instr_class_memory_stats(void) mov rsi, [rbp+var_50]; PFS_memory_stat * mov rdx, [rbp+var_48]; PFS_memory_stat * mov rcx, rax; PFS_memory_stat * mov al, [rbp+var_39] and al, 1 movzx edi, al; bool call _Z20aggregate_all_memorybP15PFS_memory_statS0_S0_; aggregate_all_memory(bool,PFS_memory_stat *,PFS_memory_stat *,PFS_memory_stat *) jmp loc_3CF21 loc_3CE82: cmp [rbp+var_20], 0 jz short loc_3CEC2 mov al, [rbp+var_1] mov [rbp+var_51], al mov rdi, [rbp+var_10]; this call _ZN20PFS_connection_slice30write_instr_class_memory_statsEv; PFS_connection_slice::write_instr_class_memory_stats(void) mov [rbp+var_60], rax mov rdi, [rbp+var_20]; this call _ZN20PFS_connection_slice30write_instr_class_memory_statsEv; PFS_connection_slice::write_instr_class_memory_stats(void) mov rsi, [rbp+var_60]; PFS_memory_stat * mov rdx, rax; PFS_memory_stat * mov al, [rbp+var_51] mov rcx, cs:global_instr_class_memory_array; PFS_memory_stat * and al, 1 movzx edi, al; bool call _Z20aggregate_all_memorybP15PFS_memory_statS0_S0_; aggregate_all_memory(bool,PFS_memory_stat *,PFS_memory_stat *,PFS_memory_stat *) jmp short loc_3CF21 loc_3CEC2: cmp [rbp+var_28], 0 jz short loc_3CEFB mov al, [rbp+var_1] mov [rbp+var_61], al mov rdi, [rbp+var_10]; this call _ZN20PFS_connection_slice30write_instr_class_memory_statsEv; PFS_connection_slice::write_instr_class_memory_stats(void) mov [rbp+var_70], rax mov rdi, [rbp+var_28]; this call _ZN20PFS_connection_slice30write_instr_class_memory_statsEv; PFS_connection_slice::write_instr_class_memory_stats(void) mov rsi, [rbp+var_70]; PFS_memory_stat * mov rdx, rax; PFS_memory_stat * mov al, [rbp+var_61] and al, 1 movzx edi, al; bool call _Z20aggregate_all_memorybP15PFS_memory_statS0_; aggregate_all_memory(bool,PFS_memory_stat *,PFS_memory_stat *) jmp short loc_3CF21 loc_3CEFB: mov al, [rbp+var_1] mov [rbp+var_71], al mov rdi, [rbp+var_10]; this call _ZN20PFS_connection_slice30write_instr_class_memory_statsEv; PFS_connection_slice::write_instr_class_memory_stats(void) mov rsi, rax; PFS_memory_stat * mov al, [rbp+var_71] mov rdx, cs:global_instr_class_memory_array; PFS_memory_stat * and al, 1 movzx edi, al; bool call _Z20aggregate_all_memorybP15PFS_memory_statS0_; aggregate_all_memory(bool,PFS_memory_stat *,PFS_memory_stat *) loc_3CF21: add rsp, 80h pop rbp retn
PFS_memory_stat * aggregate_thread_memory( char a1, PFS_thread *a2, PFS_account *a3, PFS_user *a4, PFS_host *a5) { PFS_memory_stat *result; // rax PFS_memory_stat *v6; // rax PFS_memory_stat *v7; // rax PFS_memory_stat *v8; // rax PFS_memory_stat *v9; // rax PFS_memory_stat *v10; // rax PFS_memory_stat *v11; // [rsp+10h] [rbp-70h] PFS_memory_stat *v12; // [rsp+20h] [rbp-60h] PFS_memory_stat *v13; // [rsp+30h] [rbp-50h] PFS_memory_stat *v14; // [rsp+38h] [rbp-48h] PFS_memory_stat *v15; // [rsp+48h] [rbp-38h] result = (PFS_memory_stat *)PFS_connection_slice::read_instr_class_memory_stats(a2); if ( result ) { if ( a3 ) { v15 = (PFS_memory_stat *)PFS_connection_slice::write_instr_class_memory_stats(a2); v6 = (PFS_memory_stat *)PFS_connection_slice::write_instr_class_memory_stats(a3); return aggregate_all_memory(a1 & 1, v15, v6); } else if ( a4 && a5 ) { v13 = (PFS_memory_stat *)PFS_connection_slice::write_instr_class_memory_stats(a2); v14 = (PFS_memory_stat *)PFS_connection_slice::write_instr_class_memory_stats(a4); v7 = (PFS_memory_stat *)PFS_connection_slice::write_instr_class_memory_stats(a5); return aggregate_all_memory(a1 & 1, v13, v14, v7); } else if ( a4 ) { v12 = (PFS_memory_stat *)PFS_connection_slice::write_instr_class_memory_stats(a2); v8 = (PFS_memory_stat *)PFS_connection_slice::write_instr_class_memory_stats(a4); return aggregate_all_memory(a1 & 1, v12, v8, global_instr_class_memory_array); } else if ( a5 ) { v11 = (PFS_memory_stat *)PFS_connection_slice::write_instr_class_memory_stats(a2); v9 = (PFS_memory_stat *)PFS_connection_slice::write_instr_class_memory_stats(a5); return aggregate_all_memory(a1 & 1, v11, v9); } else { v10 = (PFS_memory_stat *)PFS_connection_slice::write_instr_class_memory_stats(a2); return aggregate_all_memory(a1 & 1, v10, global_instr_class_memory_array); } } return result; }
aggregate_thread_memory: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV AL,DIL AND AL,0x1 MOV byte ptr [RBP + -0x1],AL MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001419b0 CMP RAX,0x0 JNZ 0x0013cde7 JMP 0x0013cf21 LAB_0013cde7: CMP qword ptr [RBP + -0x18],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x0013ce2e MOV AL,byte ptr [RBP + -0x1] MOV byte ptr [RBP + -0x29],AL MOV RDI,qword ptr [RBP + -0x10] CALL 0x001419f0 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x001419f0 MOV RSI,qword ptr [RBP + -0x38] MOV RDX,RAX MOV AL,byte ptr [RBP + -0x29] AND AL,0x1 MOVZX EDI,AL CALL 0x0013c580 JMP 0x0013cf21 LAB_0013ce2e: CMP qword ptr [RBP + -0x20],0x0 JZ 0x0013ce82 CMP qword ptr [RBP + -0x28],0x0 JZ 0x0013ce82 MOV AL,byte ptr [RBP + -0x1] MOV byte ptr [RBP + -0x39],AL MOV RDI,qword ptr [RBP + -0x10] CALL 0x001419f0 MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x001419f0 MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x28] CALL 0x001419f0 MOV RSI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x48] MOV RCX,RAX MOV AL,byte ptr [RBP + -0x39] AND AL,0x1 MOVZX EDI,AL CALL 0x0013c640 JMP 0x0013cf21 LAB_0013ce82: CMP qword ptr [RBP + -0x20],0x0 JZ 0x0013cec2 MOV AL,byte ptr [RBP + -0x1] MOV byte ptr [RBP + -0x51],AL MOV RDI,qword ptr [RBP + -0x10] CALL 0x001419f0 MOV qword ptr [RBP + -0x60],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x001419f0 MOV RSI,qword ptr [RBP + -0x60] MOV RDX,RAX MOV AL,byte ptr [RBP + -0x51] MOV RCX,qword ptr [0x0050db08] AND AL,0x1 MOVZX EDI,AL CALL 0x0013c640 JMP 0x0013cf21 LAB_0013cec2: CMP qword ptr [RBP + -0x28],0x0 JZ 0x0013cefb MOV AL,byte ptr [RBP + -0x1] MOV byte ptr [RBP + -0x61],AL MOV RDI,qword ptr [RBP + -0x10] CALL 0x001419f0 MOV qword ptr [RBP + -0x70],RAX MOV RDI,qword ptr [RBP + -0x28] CALL 0x001419f0 MOV RSI,qword ptr [RBP + -0x70] MOV RDX,RAX MOV AL,byte ptr [RBP + -0x61] AND AL,0x1 MOVZX EDI,AL CALL 0x0013c580 JMP 0x0013cf21 LAB_0013cefb: MOV AL,byte ptr [RBP + -0x1] MOV byte ptr [RBP + -0x71],AL MOV RDI,qword ptr [RBP + -0x10] CALL 0x001419f0 MOV RSI,RAX MOV AL,byte ptr [RBP + -0x71] MOV RDX,qword ptr [0x0050db08] AND AL,0x1 MOVZX EDI,AL CALL 0x0013c580 LAB_0013cf21: ADD RSP,0x80 POP RBP RET
/* aggregate_thread_memory(bool, PFS_thread*, PFS_account*, PFS_user*, PFS_host*) */ void aggregate_thread_memory (bool param_1,PFS_thread *param_2,PFS_account *param_3,PFS_user *param_4, PFS_host *param_5) { long lVar1; PFS_memory_stat *pPVar2; PFS_memory_stat *pPVar3; PFS_memory_stat *pPVar4; lVar1 = PFS_connection_slice::read_instr_class_memory_stats((PFS_connection_slice *)param_2); if (lVar1 != 0) { if (param_3 == (PFS_account *)0x0) { if ((param_4 == (PFS_user *)0x0) || (param_5 == (PFS_host *)0x0)) { if (param_4 == (PFS_user *)0x0) { if (param_5 == (PFS_host *)0x0) { pPVar2 = (PFS_memory_stat *) PFS_connection_slice::write_instr_class_memory_stats ((PFS_connection_slice *)param_2); aggregate_all_memory(param_1,pPVar2,global_instr_class_memory_array); } else { pPVar2 = (PFS_memory_stat *) PFS_connection_slice::write_instr_class_memory_stats ((PFS_connection_slice *)param_2); pPVar3 = (PFS_memory_stat *) PFS_connection_slice::write_instr_class_memory_stats ((PFS_connection_slice *)param_5); aggregate_all_memory(param_1,pPVar2,pPVar3); } } else { pPVar2 = (PFS_memory_stat *) PFS_connection_slice::write_instr_class_memory_stats ((PFS_connection_slice *)param_2); pPVar3 = (PFS_memory_stat *) PFS_connection_slice::write_instr_class_memory_stats ((PFS_connection_slice *)param_4); aggregate_all_memory(param_1,pPVar2,pPVar3,global_instr_class_memory_array); } } else { pPVar2 = (PFS_memory_stat *) PFS_connection_slice::write_instr_class_memory_stats ((PFS_connection_slice *)param_2); pPVar3 = (PFS_memory_stat *) PFS_connection_slice::write_instr_class_memory_stats ((PFS_connection_slice *)param_4); pPVar4 = (PFS_memory_stat *) PFS_connection_slice::write_instr_class_memory_stats ((PFS_connection_slice *)param_5); aggregate_all_memory(param_1,pPVar2,pPVar3,pPVar4); } } else { pPVar2 = (PFS_memory_stat *) PFS_connection_slice::write_instr_class_memory_stats((PFS_connection_slice *)param_2) ; pPVar3 = (PFS_memory_stat *) PFS_connection_slice::write_instr_class_memory_stats((PFS_connection_slice *)param_3) ; aggregate_all_memory(param_1,pPVar2,pPVar3); } } return; }
5,597
bool nlohmann::json_abi_v3_11_3::detail::binary_reader<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>>>>, parse_json(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, 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>&)::json_error_locator>::get_number<signed char, false>(nlohmann::json_abi_v3_11_3::detail::input_format_t, signed char&)
monkey531[P]llama/common/./json.hpp
bool get_number(const input_format_t format, NumberType& result) { // step 1: read input into array with system's byte order std::array<std::uint8_t, sizeof(NumberType)> vec{}; for (std::size_t i = 0; i < sizeof(NumberType); ++i) { get(); if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(format, "number"))) { return false; } // reverse byte order prior to conversion if necessary if (is_little_endian != (InputIsLittleEndian || format == input_format_t::bjdata)) { vec[sizeof(NumberType) - i - 1] = static_cast<std::uint8_t>(current); } else { vec[i] = static_cast<std::uint8_t>(current); // LCOV_EXCL_LINE } } // step 2: convert array into number of type T and return std::memcpy(&result, vec.data(), sizeof(NumberType)); return true; }
O0
cpp
bool nlohmann::json_abi_v3_11_3::detail::binary_reader<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>>>>, parse_json(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, 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>&)::json_error_locator>::get_number<signed char, false>(nlohmann::json_abi_v3_11_3::detail::input_format_t, signed char&): subq $0x48, %rsp movq %rdi, 0x38(%rsp) movl %esi, 0x34(%rsp) movq %rdx, 0x28(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x10(%rsp) leaq 0x27(%rsp), %rdi xorl %esi, %esi movl $0x1, %edx callq 0x5a560 movq $0x0, 0x18(%rsp) cmpq $0x1, 0x18(%rsp) jae 0x1f96a8 movq 0x10(%rsp), %rdi callq 0x1f5470 movq 0x10(%rsp), %rdi movl 0x34(%rsp), %esi leaq 0x242b9(%rip), %rdx # 0x21d8c5 callq 0x1f59d0 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x1f961d jmp 0x1f9627 movb $0x0, 0x47(%rsp) jmp 0x1f96cb movq 0x10(%rsp), %rax movb 0x20(%rax), %al andb $0x1, %al movzbl %al, %eax cmpl $0x5, 0x34(%rsp) sete %cl andb $0x1, %cl movzbl %cl, %ecx cmpl %ecx, %eax je 0x1f9672 movq 0x10(%rsp), %rax movl 0x10(%rax), %eax movb %al, 0xf(%rsp) movl $0x1, %esi subq 0x18(%rsp), %rsi subq $0x1, %rsi leaq 0x27(%rsp), %rdi callq 0x204400 movb 0xf(%rsp), %cl movb %cl, (%rax) jmp 0x1f9693 movq 0x10(%rsp), %rax movl 0x10(%rax), %eax movb %al, 0xe(%rsp) movq 0x18(%rsp), %rsi leaq 0x27(%rsp), %rdi callq 0x204400 movb 0xe(%rsp), %cl movb %cl, (%rax) jmp 0x1f9695 movq 0x18(%rsp), %rax addq $0x1, %rax movq %rax, 0x18(%rsp) jmp 0x1f95e6 movq 0x28(%rsp), %rax movq %rax, (%rsp) leaq 0x27(%rsp), %rdi callq 0x204430 movq %rax, %rcx movq (%rsp), %rax movb (%rcx), %cl movb %cl, (%rax) movb $0x1, 0x47(%rsp) movb 0x47(%rsp), %al andb $0x1, %al addq $0x48, %rsp retq nopw %cs:(%rax,%rax)
_ZN8nlohmann16json_abi_v3_11_36detail13binary_readerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEZL10parse_jsonRSL_RKSL_RSF_E18json_error_locatorE10get_numberIaLb0EEEbNS1_14input_format_tERT_: sub rsp, 48h mov [rsp+48h+var_10], rdi mov [rsp+48h+var_14], esi mov [rsp+48h+var_20], rdx mov rax, [rsp+48h+var_10] mov [rsp+48h+var_38], rax lea rdi, [rsp+48h+var_21] xor esi, esi mov edx, 1 call _memset mov [rsp+48h+var_30], 0 loc_1F95E6: cmp [rsp+48h+var_30], 1 jnb loc_1F96A8 mov rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail13binary_readerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEZL10parse_jsonRSL_RKSL_RSF_E18json_error_locatorE3getEv; nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,std::string> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)::json_error_locator>::get(void) mov rdi, [rsp+48h+var_38] mov esi, [rsp+48h+var_14] lea rdx, aHighPrecisionN+0Fh; "number" call _ZNK8nlohmann16json_abi_v3_11_36detail13binary_readerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEZL10parse_jsonRSL_RKSL_RSF_E18json_error_locatorE12unexpect_eofENS1_14input_format_tESK_; nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,std::string> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)::json_error_locator>::unexpect_eof(nlohmann::json_abi_v3_11_3::detail::input_format_t,char const*) xor al, 0FFh xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_1F961D jmp short loc_1F9627 loc_1F961D: mov [rsp+48h+var_1], 0 jmp loc_1F96CB loc_1F9627: mov rax, [rsp+48h+var_38] mov al, [rax+20h] and al, 1 movzx eax, al cmp [rsp+48h+var_14], 5 setz cl and cl, 1 movzx ecx, cl cmp eax, ecx jz short loc_1F9672 mov rax, [rsp+48h+var_38] mov eax, [rax+10h] mov [rsp+48h+var_39], al mov esi, 1 sub rsi, [rsp+48h+var_30] sub rsi, 1 lea rdi, [rsp+48h+var_21] call _ZNSt5arrayIhLm1EEixEm; std::array<uchar,1ul>::operator[](ulong) mov cl, [rsp+48h+var_39] mov [rax], cl jmp short loc_1F9693 loc_1F9672: mov rax, [rsp+48h+var_38] mov eax, [rax+10h] mov [rsp+48h+var_3A], al mov rsi, [rsp+48h+var_30] lea rdi, [rsp+48h+var_21] call _ZNSt5arrayIhLm1EEixEm; std::array<uchar,1ul>::operator[](ulong) mov cl, [rsp+48h+var_3A] mov [rax], cl loc_1F9693: jmp short $+2 loc_1F9695: mov rax, [rsp+48h+var_30] add rax, 1 mov [rsp+48h+var_30], rax jmp loc_1F95E6 loc_1F96A8: mov rax, [rsp+48h+var_20] mov [rsp+48h+var_48], rax lea rdi, [rsp+48h+var_21] call _ZNSt5arrayIhLm1EE4dataEv; std::array<uchar,1ul>::data(void) mov rcx, rax mov rax, [rsp+48h+var_48] mov cl, [rcx] mov [rax], cl mov [rsp+48h+var_1], 1 loc_1F96CB: mov al, [rsp+48h+var_1] and al, 1 add rsp, 48h retn
char nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,std::string> const&,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>&)::json_error_locator>::get_number<signed char,false>( long long a1, unsigned int a2, _BYTE *a3) { _BYTE *v4; // [rsp+0h] [rbp-48h] char v5; // [rsp+Eh] [rbp-3Ah] char v6; // [rsp+Fh] [rbp-39h] long long i; // [rsp+18h] [rbp-30h] char v8; // [rsp+27h] [rbp-21h] BYREF _BYTE *v9; // [rsp+28h] [rbp-20h] unsigned int v10; // [rsp+34h] [rbp-14h] long long v11; // [rsp+38h] [rbp-10h] v11 = a1; v10 = a2; v9 = a3; memset(&v8, 0LL, sizeof(v8)); for ( i = 0LL; !i; i = 1LL ) { nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,std::string> const&,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>&)::json_error_locator>::get(a1); if ( (nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,std::string> const&,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>&)::json_error_locator>::unexpect_eof( a1, v10, (long long)"number") & 1) == 0 ) return 0; if ( (*(_BYTE *)(a1 + 32) & 1) == (v10 == 5) ) { v5 = *(_DWORD *)(a1 + 16); *(_BYTE *)std::array<unsigned char,1ul>::operator[](&v8, 0LL) = v5; } else { v6 = *(_DWORD *)(a1 + 16); *(_BYTE *)std::array<unsigned char,1ul>::operator[](&v8, 0LL) = v6; } } v4 = v9; *v4 = *(_BYTE *)std::array<unsigned char,1ul>::data(&v8); return 1; }
operator(): SUB RSP,0x2d8 MOV qword ptr [RSP + 0x50],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x58],RAX MOV qword ptr [RSP + 0x2d0],RDI MOV qword ptr [RSP + 0x2c8],RSI MOV qword ptr [RSP + 0x2c0],RDX MOV qword ptr [RSP + 0x2b8],RCX MOV RAX,qword ptr [RSP + 0x2c8] MOV qword ptr [RSP + 0x60],RAX LEA RDI,[RSP + 0x258] MOV qword ptr [RSP + 0x68],RDI CALL 0x00221730 MOV RSI,qword ptr [RSP + 0x68] LAB_001f9608: LEA RDI,[RSP + 0x268] CALL 0x0022a070 JMP 0x001f9617 LAB_001f9617: LEA RDI,[RSP + 0x258] CALL 0x00218250 MOV RDI,qword ptr [RSP + 0x60] CALL 0x00191b00 MOV qword ptr [RSP + 0x40],RAX LEA RDI,[RSP + 0x21f] MOV qword ptr [RSP + 0x48],RDI CALL 0x0025ac60 MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] LAB_001f964f: LEA RDI,[RSP + 0x220] CALL 0x00273ec0 JMP 0x001f965e LAB_001f965e: LEA RDI,[RSP + 0x21f] CALL 0x0025acf0 MOV qword ptr [RSP + 0x210],0x0 MOV RDI,qword ptr [RSP + 0x2b8] CALL 0x00216a30 MOV qword ptr [RSP + 0x208],RAX LAB_001f968c: MOV RAX,qword ptr [RSP + 0x210] CMP RAX,qword ptr [RSP + 0x208] JNC 0x001f98f0 MOV RDI,qword ptr [RSP + 0x2b8] MOV RSI,qword ptr [RSP + 0x210] CALL 0x00216ae0 MOV RDI,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x200],RAX MOV RAX,qword ptr [RSP + 0x210] MOV qword ptr [RSP + 0x38],RAX CALL 0x00191b00 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x38] CMP RAX,RCX JNC 0x001f9814 MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x210] CALL 0x001fac80 MOV RSI,RAX LAB_001f96fc: LEA RDI,[RSP + 0x1b0] CALL 0x0021cdf0 JMP 0x001f970b LAB_001f970b: MOV RDX,qword ptr [RSP + 0x200] LAB_001f9713: LEA RDI,[RSP + 0x268] LEA RSI,[RSP + 0x1b0] CALL 0x0022a170 JMP 0x001f972a LAB_001f972a: LEA RDI,[RSP + 0x1b0] CALL 0x00215680 MOV RSI,qword ptr [RSP + 0x210] LAB_001f973f: LEA RDI,[RSP + 0x220] CALL 0x0025ad00 LAB_001f974c: MOV qword ptr [RSP + 0x28],RDX MOV qword ptr [RSP + 0x30],RAX JMP 0x001f9758 LAB_001f9758: MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x1a0],RCX MOV qword ptr [RSP + 0x1a8],RAX LEA RDI,[RSP + 0x1a0] MOV ESI,0x1 CALL 0x001af720 JMP 0x001f98d5 LAB_001f9814: MOV byte ptr [RSP + 0x17f],0x1 MOV EDI,0x10 CALL 0x0015a6b0 MOV RDX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x20],RAX ADD RDX,0x18 LAB_001f9834: LEA RSI,[0x31600c] LEA RDI,[RSP + 0x180] CALL 0x00191500 JMP 0x001f984a LAB_001f984a: MOV RDI,qword ptr [RSP + 0x20] LEA RSI,[RSP + 0x180] CALL 0x0015a4c0 JMP 0x001f985e LAB_001f985e: MOV RDI,qword ptr [RSP + 0x20] MOV byte ptr [RSP + 0x17f],0x0 MOV RSI,qword ptr [0x003a5fa8] MOV RDX,qword ptr [0x003a5f68] CALL 0x0015ab40 LAB_001f98d5: JMP 0x001f98d7 LAB_001f98d7: MOV RAX,qword ptr [RSP + 0x210] ADD RAX,0x1 MOV qword ptr [RSP + 0x210],RAX JMP 0x001f968c LAB_001f98f0: MOV RAX,qword ptr [RSP + 0x2b8] ADD RAX,0x18 MOV qword ptr [RSP + 0x170],RAX MOV RDI,qword ptr [RSP + 0x170] CALL 0x00236700 MOV qword ptr [RSP + 0x168],RAX MOV RDI,qword ptr [RSP + 0x170] CALL 0x002364e0 MOV qword ptr [RSP + 0x160],RAX LAB_001f992e: LEA RDI,[RSP + 0x168] LEA RSI,[RSP + 0x160] CALL 0x0025ad80 TEST AL,0x1 JNZ 0x001f994c JMP 0x001f9bed LAB_001f994c: LEA RDI,[RSP + 0x168] CALL 0x00236bf0 MOV qword ptr [RSP + 0x158],RAX MOV RDI,qword ptr [RSP + 0x158] CALL 0x0025adc0 MOV qword ptr [RSP + 0x150],RAX MOV RDI,qword ptr [RSP + 0x158] CALL 0x0025add0 MOV RDI,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x148],RAX ADD RDI,0x38 MOV RSI,qword ptr [RSP + 0x150] LAB_001f999c: CALL 0x00273f00 LAB_001f99a1: MOV qword ptr [RSP + 0x18],RAX JMP 0x001f99a8 LAB_001f99a8: MOV RDI,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x140],RAX ADD RDI,0x38 CALL 0x00273f50 MOV qword ptr [RSP + 0x138],RAX LEA RDI,[RSP + 0x140] LEA RSI,[RSP + 0x138] CALL 0x00273f30 TEST AL,0x1 JNZ 0x001f99e9 JMP 0x001f9b2d LAB_001f99e9: MOV byte ptr [RSP + 0xd7],0x1 MOV EDI,0x10 CALL 0x0015a6b0 MOV qword ptr [RSP + 0x10],RAX MOV RDX,qword ptr [RSP + 0x150] LAB_001f9a08: LEA RSI,[0x31602c] LEA RDI,[RSP + 0xd8] CALL 0x00191500 JMP 0x001f9a1e LAB_001f9a1e: LEA RDX,[0x31603e] LEA RDI,[RSP + 0xf8] LEA RSI,[RSP + 0xd8] CALL 0x0018ec10 JMP 0x001f9a3c LAB_001f9a3c: MOV RDX,qword ptr [RSP + 0x60] ADD RDX,0x18 LAB_001f9a45: LEA RDI,[RSP + 0x118] LEA RSI,[RSP + 0xf8] CALL 0x00198220 JMP 0x001f9a5c LAB_001f9a5c: MOV RDI,qword ptr [RSP + 0x10] LEA RSI,[RSP + 0x118] CALL 0x0015a4c0 JMP 0x001f9a70 LAB_001f9a70: MOV RDI,qword ptr [RSP + 0x10] MOV byte ptr [RSP + 0xd7],0x0 MOV RSI,qword ptr [0x003a5fa8] MOV RDX,qword ptr [0x003a5f68] CALL 0x0015ab40 LAB_001f9b2d: LEA RDI,[RSP + 0x140] CALL 0x00273f80 MOV RSI,qword ptr [RAX + 0x20] LAB_001f9b3e: LEA RDI,[RSP + 0x220] CALL 0x0025ad00 MOV qword ptr [RSP],RDX MOV qword ptr [RSP + 0x8],RAX JMP 0x001f9b56 LAB_001f9b56: MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0xc0],RCX MOV qword ptr [RSP + 0xc8],RAX LEA RDI,[RSP + 0xc0] MOV ESI,0x1 CALL 0x001af720 MOV RSI,qword ptr [RSP + 0x150] LEA RDI,[RSP + 0x70] CALL 0x0021cdf0 JMP 0x001f9b95 LAB_001f9b95: MOV RDX,qword ptr [RSP + 0x148] LAB_001f9b9d: LEA RDI,[RSP + 0x268] LEA RSI,[RSP + 0x70] CALL 0x0022a170 JMP 0x001f9bb1 LAB_001f9bb1: LEA RDI,[RSP + 0x70] CALL 0x00215680 LEA RDI,[RSP + 0x168] CALL 0x0025ae80 JMP 0x001f992e LAB_001f9bed: MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x60] ADD RSI,0x68 MOV RDX,qword ptr [RSP + 0x2c0] LAB_001f9c03: LEA RCX,[RSP + 0x268] CALL 0x00273fa0 LAB_001f9c10: JMP 0x001f9c12 LAB_001f9c12: LEA RDI,[RSP + 0x220] CALL 0x001af4c0 LEA RDI,[RSP + 0x268] CALL 0x00215680 MOV RAX,qword ptr [RSP + 0x58] ADD RSP,0x2d8 RET
/* minja::simple_function(std::__cxx11::string const&, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&)::$_0::TEMPNAMEPLACEHOLDERVALUE(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const */ shared_ptr * minja:: simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&) ::$_0::operator()(shared_ptr *param_1,ArgumentsValue *param_2) { bool bVar1; ulong uVar2; ulong uVar3; string *psVar4; runtime_error *prVar5; long lVar6; vector<minja::Value,std::allocator<minja::Value>> *in_RCX; int1 auVar7 [16]; Value local_268 [80]; int1 local_218 [16]; int1 local_201; char local_200 [32]; string local_1e0 [32]; string local_1c0 [32]; int8 local_1a0; int8 local_198; type *local_190; string *local_188; pair *local_180; int8 local_178; int8 local_170; vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>> *local_168; int1 local_159; string local_158 [32]; int1 local_138 [16]; Value local_128 [80]; Value *local_d8; ulong local_d0; ulong local_c8; allocator<bool> local_b9; vector<bool,std::allocator<bool>> local_b8 [56]; 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::__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>>>> local_80 [16]; Value local_70 [80]; vector<minja::Value,std::allocator<minja::Value>> *local_20; ArgumentsValue *local_10; shared_ptr *local_8; local_20 = in_RCX; local_10 = param_2; local_8 = param_1; std:: make_shared<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>>>> (); /* try { // try from 001f9608 to 001f9614 has its CatchHandler @ 001f9789 */ Value::object(local_70,local_80); 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::__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>>>> ::~shared_ptr(local_80); uVar2 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_2); std::allocator<bool>::allocator(&local_b9); /* try { // try from 001f964f to 001f965b has its CatchHandler @ 001f97af */ std::vector<bool,std::allocator<bool>>::vector(local_b8,uVar2,(allocator *)&local_b9); std::allocator<bool>::~allocator(&local_b9); local_c8 = 0; local_d0 = std::vector<minja::Value,std::allocator<minja::Value>>::size(local_20); while( true ) { if (local_d0 <= local_c8) { local_168 = (vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>> *)(local_20 + 0x18); local_170 = std:: vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>> ::begin(local_168); local_178 = std:: vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>> ::end(local_168); while( true ) { bVar1 = __gnu_cxx::operator!= ((__normal_iterator *)&local_170,(__normal_iterator *)&local_178); if (!bVar1) { /* try { // try from 001f9c03 to 001f9c0f has its CatchHandler @ 001f97d5 */ std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>:: operator()(param_1,(Value *)(param_2 + 0x68)); std::vector<bool,std::allocator<bool>>::~vector(local_b8); Value::~Value(local_70); return param_1; } local_180 = (pair *)__gnu_cxx:: __normal_iterator<std::pair<std::__cxx11::string,minja::Value>*,std::vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>>> ::operator*((__normal_iterator<std::pair<std::__cxx11::string,minja::Value>*,std::vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>>> *)&local_170); local_188 = (string *)std::get<0ul,std::__cxx11::string,minja::Value>(local_180); local_190 = std::get<1ul,std::__cxx11::string,minja::Value>(local_180); /* try { // try from 001f999c to 001f99a0 has its CatchHandler @ 001f97d5 */ local_198 = std:: map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::find((map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> *)(param_2 + 0x38),local_188); local_1a0 = std:: map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::end((map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> *)(param_2 + 0x38)); uVar2 = std::operator==((_Rb_tree_const_iterator *)&local_198, (_Rb_tree_const_iterator *)&local_1a0); if ((uVar2 & 1) != 0) break; lVar6 = std::_Rb_tree_const_iterator<std::pair<std::__cxx11::string_const,unsigned_long>>:: operator->((_Rb_tree_const_iterator<std::pair<std::__cxx11::string_const,unsigned_long>> *)&local_198); /* try { // try from 001f9b3e to 001f9b92 has its CatchHandler @ 001f97d5 */ auVar7 = std::vector<bool,std::allocator<bool>>::operator[] (local_b8,*(ulong *)(lVar6 + 0x20)); local_218 = auVar7; std::_Bit_reference::operator=((_Bit_reference *)local_218,true); Value::Value(local_268,local_188); /* try { // try from 001f9b9d to 001f9bae has its CatchHandler @ 001f9bcd */ Value::set(local_70,local_268,(Value *)local_190); Value::~Value(local_268); __gnu_cxx:: __normal_iterator<std::pair<std::__cxx11::string,minja::Value>*,std::vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>>> ::operator++((__normal_iterator<std::pair<std::__cxx11::string,minja::Value>*,std::vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>>> *)&local_170); } local_201 = 1; prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001f9a08 to 001f9a1b has its CatchHandler @ 001f9a95 */ std::operator+(local_200,(string *)"Unknown argument "); /* try { // try from 001f9a1e to 001f9a39 has its CatchHandler @ 001f9aab */ std::operator+(local_1e0,local_200); /* try { // try from 001f9a45 to 001f9a59 has its CatchHandler @ 001f9ac1 */ std::operator+(local_1c0,local_1e0); /* try { // try from 001f9a5c to 001f9a8f has its CatchHandler @ 001f9ad7 */ std::runtime_error::runtime_error(prVar5,local_1c0); local_201 = 0; /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_003a5fa8,PTR__runtime_error_003a5f68); } local_d8 = (Value *)std::vector<minja::Value,std::allocator<minja::Value>>::operator[] (local_20,local_c8); uVar2 = local_c8; uVar3 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_2) ; if (uVar3 <= uVar2) break; psVar4 = (string *) std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator[] ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_2 ,local_c8); /* try { // try from 001f96fc to 001f9708 has its CatchHandler @ 001f97d5 */ Value::Value(local_128,psVar4); /* try { // try from 001f9713 to 001f9727 has its CatchHandler @ 001f97ee */ Value::set(local_70,local_128,local_d8); Value::~Value(local_128); /* try { // try from 001f973f to 001f974b has its CatchHandler @ 001f97d5 */ auVar7 = std::vector<bool,std::allocator<bool>>::operator[](local_b8,local_c8); local_138 = auVar7; std::_Bit_reference::operator=((_Bit_reference *)local_138,true); local_c8 = local_c8 + 1; } local_159 = 1; prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001f9834 to 001f9847 has its CatchHandler @ 001f9883 */ std::operator+((char *)local_158,(string *)"Too many positional params for "); /* try { // try from 001f984a to 001f987d has its CatchHandler @ 001f9899 */ std::runtime_error::runtime_error(prVar5,local_158); local_159 = 0; /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_003a5fa8,PTR__runtime_error_003a5f68); }
5,598
my_rw_trywrlock
eloqsql/mysys/thr_rwlock.c
int my_rw_trywrlock(my_rw_lock_t *rwp) { int res; pthread_mutex_lock(&rwp->lock); if (rwp->state) res= EBUSY; /* Can't get lock */ else { res=0; rwp->state = -1; #ifdef SAFE_MUTEX rwp->write_thread= pthread_self(); #endif } pthread_mutex_unlock(&rwp->lock); return(res); }
O0
c
my_rw_trywrlock: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x24450 movq -0x8(%rbp), %rax cmpl $0x0, 0x88(%rax) je 0x30c0b movl $0x10, -0xc(%rbp) jmp 0x30c20 movl $0x0, -0xc(%rbp) movq -0x8(%rbp), %rax movl $0xffffffff, 0x88(%rax) # imm = 0xFFFFFFFF movq -0x8(%rbp), %rdi callq 0x241e0 movl -0xc(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_rw_trywrlock: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] call _pthread_mutex_lock mov rax, [rbp+var_8] cmp dword ptr [rax+88h], 0 jz short loc_30C0B mov [rbp+var_C], 10h jmp short loc_30C20 loc_30C0B: mov [rbp+var_C], 0 mov rax, [rbp+var_8] mov dword ptr [rax+88h], 0FFFFFFFFh loc_30C20: mov rdi, [rbp+var_8] call _pthread_mutex_unlock mov eax, [rbp+var_C] add rsp, 10h pop rbp retn
long long my_rw_trywrlock(long long a1) { unsigned int v2; // [rsp+4h] [rbp-Ch] pthread_mutex_lock(a1); if ( *(_DWORD *)(a1 + 136) ) { v2 = 16; } else { v2 = 0; *(_DWORD *)(a1 + 136) = -1; } pthread_mutex_unlock(a1); return v2; }
my_rw_trywrlock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x00124450 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x88],0x0 JZ 0x00130c0b MOV dword ptr [RBP + -0xc],0x10 JMP 0x00130c20 LAB_00130c0b: MOV dword ptr [RBP + -0xc],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x88],0xffffffff LAB_00130c20: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001241e0 MOV EAX,dword ptr [RBP + -0xc] ADD RSP,0x10 POP RBP RET
int4 my_rw_trywrlock(pthread_mutex_t *param_1) { int4 local_14; pthread_mutex_lock(param_1); if (*(int *)((long)param_1 + 0x88) == 0) { local_14 = 0; *(int4 *)((long)param_1 + 0x88) = 0xffffffff; } else { local_14 = 0x10; } pthread_mutex_unlock(param_1); return local_14; }
5,599
my_rw_trywrlock
eloqsql/mysys/thr_rwlock.c
int my_rw_trywrlock(my_rw_lock_t *rwp) { int res; pthread_mutex_lock(&rwp->lock); if (rwp->state) res= EBUSY; /* Can't get lock */ else { res=0; rwp->state = -1; #ifdef SAFE_MUTEX rwp->write_thread= pthread_self(); #endif } pthread_mutex_unlock(&rwp->lock); return(res); }
O3
c
my_rw_trywrlock: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx callq 0x24480 movl $0x10, %r14d cmpl $0x0, 0x88(%rbx) jne 0x2c4c2 movl $0xffffffff, 0x88(%rbx) # imm = 0xFFFFFFFF xorl %r14d, %r14d movq %rbx, %rdi callq 0x241f0 movl %r14d, %eax popq %rbx popq %r14 popq %rbp retq
my_rw_trywrlock: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi call _pthread_mutex_lock mov r14d, 10h cmp dword ptr [rbx+88h], 0 jnz short loc_2C4C2 mov dword ptr [rbx+88h], 0FFFFFFFFh xor r14d, r14d loc_2C4C2: mov rdi, rbx call _pthread_mutex_unlock mov eax, r14d pop rbx pop r14 pop rbp retn
long long my_rw_trywrlock(long long a1) { unsigned int v1; // r14d pthread_mutex_lock(a1); v1 = 16; if ( !*(_DWORD *)(a1 + 136) ) { *(_DWORD *)(a1 + 136) = -1; v1 = 0; } pthread_mutex_unlock(a1); return v1; }
my_rw_trywrlock: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI CALL 0x00124480 MOV R14D,0x10 CMP dword ptr [RBX + 0x88],0x0 JNZ 0x0012c4c2 MOV dword ptr [RBX + 0x88],0xffffffff XOR R14D,R14D LAB_0012c4c2: MOV RDI,RBX CALL 0x001241f0 MOV EAX,R14D POP RBX POP R14 POP RBP RET
int8 my_rw_trywrlock(pthread_mutex_t *param_1) { int8 uVar1; pthread_mutex_lock(param_1); uVar1 = 0x10; if (*(int *)((long)param_1 + 0x88) == 0) { *(int4 *)((long)param_1 + 0x88) = 0xffffffff; uVar1 = 0; } pthread_mutex_unlock(param_1); return uVar1; }