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
35,000
delete_dynamic_element
eloqsql/mysys/array.c
void delete_dynamic_element(DYNAMIC_ARRAY *array, uint idx) { char *ptr= (char*) array->buffer+array->size_of_element*idx; array->elements--; memmove(ptr,ptr+array->size_of_element, (array->elements-idx)*array->size_of_element); }
O3
c
delete_dynamic_element: pushq %rbp movq %rsp, %rbp movl 0x8(%rdi), %edx movl 0x14(%rdi), %ecx movl %ecx, %eax imull %esi, %eax addq (%rdi), %rax decl %edx movl %edx, 0x8(%rdi) subl %esi, %edx imull %ecx, %edx movq %rcx, %rsi addq %rax, %rsi movq %rax, %rdi popq %rbp jmp 0x29110
delete_dynamic_element: push rbp mov rbp, rsp mov edx, [rdi+8] mov ecx, [rdi+14h] mov eax, ecx imul eax, esi add rax, [rdi] dec edx mov [rdi+8], edx sub edx, esi imul edx, ecx mov rsi, rcx add rsi, rax mov rdi, rax pop rbp jmp _memmove
long long delete_dynamic_element(long long a1, int a2) { long long v2; // rcx long long v3; // rax int v4; // edx v2 = *(unsigned int *)(a1 + 20); v3 = *(_QWORD *)a1 + (unsigned int)(a2 * *(_DWORD *)(a1 + 20)); v4 = *(_DWORD *)(a1 + 8) - 1; *(_DWORD *)(a1 + 8) = v4; return memmove(v3, v3 + v2, (unsigned int)(v2 * (v4 - a2))); }
delete_dynamic_element: PUSH RBP MOV RBP,RSP MOV EDX,dword ptr [RDI + 0x8] MOV ECX,dword ptr [RDI + 0x14] MOV EAX,ECX IMUL EAX,ESI ADD RAX,qword ptr [RDI] DEC EDX MOV dword ptr [RDI + 0x8],EDX SUB EDX,ESI IMUL EDX,ECX MOV RSI,RCX ADD RSI,RAX MOV RDI,RAX POP RBP JMP 0x00129110
void delete_dynamic_element(long *param_1,int param_2) { uint uVar1; void *__dest; int iVar2; uVar1 = *(uint *)((long)param_1 + 0x14); __dest = (void *)((ulong)(uVar1 * param_2) + *param_1); iVar2 = (int)param_1[1] + -1; *(int *)(param_1 + 1) = iVar2; memmove(__dest,(void *)((ulong)uVar1 + (long)__dest),(ulong)((iVar2 - param_2) * uVar1)); return; }
35,001
mysql_free_result
eloqsql/libmariadb/libmariadb/mariadb_lib.c
void STDCALL mysql_free_result(MYSQL_RES *result) { if (result) { if (result->handle && result->handle->status == MYSQL_STATUS_USE_RESULT) { result->handle->methods->db_skip_result(result->handle); result->handle->status=MYSQL_STATUS_READY; } free_rows(result->data); if (result->fields) ma_free_root(&result->field_alloc,MYF(0)); if (result->row) free(result->row); free(result); } return; }
O3
c
mysql_free_result: testq %rdi, %rdi je 0x16411 pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movq 0x78(%rdi), %rdi testq %rdi, %rdi je 0x163da cmpl $0x2, 0x488(%rdi) jne 0x163da movq 0x4d0(%rdi), %rax callq *0x18(%rax) movq 0x78(%rbx), %rax movl $0x0, 0x488(%rax) movq 0x18(%rbx), %rdi callq 0x15b3a cmpq $0x0, 0x10(%rbx) je 0x163f5 leaq 0x28(%rbx), %rdi xorl %esi, %esi callq 0x1e037 movq 0x60(%rbx), %rdi testq %rdi, %rdi je 0x16403 callq 0x13570 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x13570 retq
mysql_free_result: test rdi, rdi jz short locret_16411 push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov rdi, [rdi+78h] test rdi, rdi jz short loc_163DA cmp dword ptr [rdi+488h], 2 jnz short loc_163DA mov rax, [rdi+4D0h] call qword ptr [rax+18h] mov rax, [rbx+78h] mov dword ptr [rax+488h], 0 loc_163DA: mov rdi, [rbx+18h] call free_rows cmp qword ptr [rbx+10h], 0 jz short loc_163F5 lea rdi, [rbx+28h] xor esi, esi call ma_free_root loc_163F5: mov rdi, [rbx+60h] test rdi, rdi jz short loc_16403 call _free loc_16403: mov rdi, rbx add rsp, 8 pop rbx pop rbp jmp _free locret_16411: retn
long long mysql_free_result(_QWORD *a1) { long long v2; // rdi long long v3; // rdi long long result; // rax if ( a1 ) { v2 = a1[15]; if ( v2 && *(_DWORD *)(v2 + 1160) == 2 ) { (*(void ( **)(long long))(*(_QWORD *)(v2 + 1232) + 24LL))(v2); *(_DWORD *)(a1[15] + 1160LL) = 0; } free_rows(a1[3]); if ( a1[2] ) ma_free_root(a1 + 5, 0LL); v3 = a1[12]; if ( v3 ) free(v3); return free(a1); } return result; }
mysql_free_result: TEST RDI,RDI JZ 0x00116411 PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x78] TEST RDI,RDI JZ 0x001163da CMP dword ptr [RDI + 0x488],0x2 JNZ 0x001163da MOV RAX,qword ptr [RDI + 0x4d0] CALL qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBX + 0x78] MOV dword ptr [RAX + 0x488],0x0 LAB_001163da: MOV RDI,qword ptr [RBX + 0x18] CALL 0x00115b3a CMP qword ptr [RBX + 0x10],0x0 JZ 0x001163f5 LEA RDI,[RBX + 0x28] XOR ESI,ESI CALL 0x0011e037 LAB_001163f5: MOV RDI,qword ptr [RBX + 0x60] TEST RDI,RDI JZ 0x00116403 CALL 0x00113570 LAB_00116403: MOV RDI,RBX ADD RSP,0x8 POP RBX POP RBP JMP 0x00113570 LAB_00116411: RET
void mysql_free_result(void *param_1) { long lVar1; if (param_1 != (void *)0x0) { lVar1 = *(long *)((long)param_1 + 0x78); if ((lVar1 != 0) && (*(int *)(lVar1 + 0x488) == 2)) { (**(code **)(*(long *)(lVar1 + 0x4d0) + 0x18))(); *(int4 *)(*(long *)((long)param_1 + 0x78) + 0x488) = 0; } free_rows(*(int8 *)((long)param_1 + 0x18)); if (*(long *)((long)param_1 + 0x10) != 0) { ma_free_root((long)param_1 + 0x28,0); } if (*(void **)((long)param_1 + 0x60) != (void *)0x0) { free(*(void **)((long)param_1 + 0x60)); } free(param_1); return; } return; }
35,002
ma_check_print_error
eloqsql/storage/maria/ma_check_standalone.h
void _ma_check_print_error(HA_CHECK *param, const char *fmt,...) { va_list args; DBUG_ENTER("_ma_check_print_error"); DBUG_PRINT("enter", ("format: %s", fmt)); fflush(stdout); if (!param->warning_printed && !param->error_printed) { if (param->testflag & T_SILENT) fprintf(stderr,"%s: Aria file %s\n",my_progname_short,param->isam_file_name); param->out_flag|= O_DATA_LOST; } param->error_printed++; va_start(args,fmt); fprintf(stderr,"%s: error: ",my_progname_short); vfprintf(stderr, fmt, args); fputc('\n',stderr); fflush(stderr); va_end(args); DBUG_VOID_RETURN; }
O3
c
ma_check_print_error: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0xc8, %rsp movq %rsi, %rbx movq %rdi, %r14 movq %rdx, -0xd0(%rbp) movq %rcx, -0xc8(%rbp) movq %r8, -0xc0(%rbp) movq %r9, -0xb8(%rbp) testb %al, %al je 0x3300f 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 0x378f8a(%rip), %rax # 0x3abfa0 movq (%rax), %rdi callq 0x2a450 cmpb $0x0, 0x209a2(%r14) jne 0x3306e cmpl $0x0, 0x2096c(%r14) jne 0x3306e testb $0x40, 0xb12(%r14) je 0x33066 movq 0x378f65(%rip), %rax # 0x3abfa8 movq (%rax), %rdi leaq 0xbfd68b(%rip), %rax # 0xc306d8 movq (%rax), %rcx movq (%r14), %r8 leaq 0xc51e4(%rip), %rdx # 0xf823e movl $0x1, %esi xorl %eax, %eax callq 0x2a210 orb $0x4, 0x20968(%r14) incl 0x2096c(%r14) leaq -0xe0(%rbp), %rax leaq -0x30(%rbp), %r14 movq %rax, 0x10(%r14) leaq 0x10(%rbp), %rax movq %rax, 0x8(%r14) movabsq $0x3000000010, %rax # imm = 0x3000000010 movq %rax, (%r14) movq 0x378f08(%rip), %r15 # 0x3abfa8 movq (%r15), %rdi leaq 0xbfd62e(%rip), %rax # 0xc306d8 movq (%rax), %rcx leaq 0xc51aa(%rip), %rdx # 0xf825e movl $0x1, %esi xorl %eax, %eax callq 0x2a210 movq (%r15), %rdi movl $0x1, %esi movq %rbx, %rdx movq %r14, %rcx callq 0x2a800 movq (%r15), %rsi movl $0xa, %edi callq 0x2a780 movq (%r15), %rdi callq 0x2a450 addq $0xc8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_ma_check_print_error: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 0C8h mov rbx, rsi mov r14, rdi mov [rbp+var_D0], rdx mov [rbp+var_C8], rcx mov [rbp+var_C0], r8 mov [rbp+var_B8], r9 test al, al jz short loc_3300F 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_3300F: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush cmp byte ptr [r14+209A2h], 0 jnz short loc_3306E cmp dword ptr [r14+2096Ch], 0 jnz short loc_3306E test byte ptr [r14+0B12h], 40h jz short loc_33066 mov rax, cs:stderr_ptr mov rdi, [rax] lea rax, my_progname_short mov rcx, [rax] mov r8, [r14] lea rdx, aSAriaFileS; "%s: Aria file %s\n" mov esi, 1 xor eax, eax call ___fprintf_chk loc_33066: or byte ptr [r14+20968h], 4 loc_3306E: inc dword ptr [r14+2096Ch] lea rax, [rbp+var_E0] lea r14, [rbp+var_30] mov [r14+10h], rax lea rax, [rbp+arg_0] mov [r14+8], rax mov rax, 3000000010h mov [r14], rax mov r15, cs:stderr_ptr mov rdi, [r15] lea rax, my_progname_short mov rcx, [rax] lea rdx, aSError; "%s: error: " mov esi, 1 xor eax, eax call ___fprintf_chk mov rdi, [r15] mov esi, 1 mov rdx, rbx mov rcx, r14 call ___vfprintf_chk mov rsi, [r15] mov edi, 0Ah call _fputc mov rdi, [r15] call _fflush add rsp, 0C8h pop rbx pop r14 pop r15 pop rbp retn
long long ma_check_print_error(long long a1, long long a2, ...) { va_list va; // [rsp+B0h] [rbp-30h] BYREF fflush(stdout); if ( !*(_BYTE *)(a1 + 133538) && !*(_DWORD *)(a1 + 133484) ) { if ( (*(_BYTE *)(a1 + 2834) & 0x40) != 0 ) __fprintf_chk(stderr, 1LL, "%s: Aria file %s\n", my_progname_short, *(const char **)a1); *(_BYTE *)(a1 + 133480) |= 4u; } ++*(_DWORD *)(a1 + 133484); va_start(va, a2); __fprintf_chk(stderr, 1LL, "%s: error: ", my_progname_short); __vfprintf_chk(stderr, 1LL, a2, va); fputc(10LL, stderr); return fflush(stderr); }
_ma_check_print_error: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xc8 MOV RBX,RSI MOV R14,RDI MOV qword ptr [RBP + -0xd0],RDX MOV qword ptr [RBP + -0xc8],RCX MOV qword ptr [RBP + -0xc0],R8 MOV qword ptr [RBP + -0xb8],R9 TEST AL,AL JZ 0x0013300f 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_0013300f: MOV RAX,qword ptr [0x004abfa0] MOV RDI,qword ptr [RAX] CALL 0x0012a450 CMP byte ptr [R14 + 0x209a2],0x0 JNZ 0x0013306e CMP dword ptr [R14 + 0x2096c],0x0 JNZ 0x0013306e TEST byte ptr [R14 + 0xb12],0x40 JZ 0x00133066 MOV RAX,qword ptr [0x004abfa8] MOV RDI,qword ptr [RAX] LEA RAX,[0xd306d8] MOV RCX,qword ptr [RAX] MOV R8,qword ptr [R14] LEA RDX,[0x1f823e] MOV ESI,0x1 XOR EAX,EAX CALL 0x0012a210 LAB_00133066: OR byte ptr [R14 + 0x20968],0x4 LAB_0013306e: INC dword ptr [R14 + 0x2096c] LEA RAX,[RBP + -0xe0] LEA R14,[RBP + -0x30] MOV qword ptr [R14 + 0x10],RAX LEA RAX,[RBP + 0x10] MOV qword ptr [R14 + 0x8],RAX MOV RAX,0x3000000010 MOV qword ptr [R14],RAX MOV R15,qword ptr [0x004abfa8] MOV RDI,qword ptr [R15] LEA RAX,[0xd306d8] MOV RCX,qword ptr [RAX] LEA RDX,[0x1f825e] MOV ESI,0x1 XOR EAX,EAX CALL 0x0012a210 MOV RDI,qword ptr [R15] MOV ESI,0x1 MOV RDX,RBX MOV RCX,R14 CALL 0x0012a800 MOV RSI,qword ptr [R15] MOV EDI,0xa CALL 0x0012a780 MOV RDI,qword ptr [R15] CALL 0x0012a450 ADD RSP,0xc8 POP RBX POP R14 POP R15 POP RBP RET
void _ma_check_print_error (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 *param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { int *puVar1; 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; int8 local_38; int1 *local_30; int1 *local_28; 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_d8 = param_11; local_d0 = param_12; local_c8 = param_13; local_c0 = param_14; fflush(*(FILE **)PTR_stdout_004abfa0); if ((*(char *)((long)param_9 + 0x209a2) == '\0') && (*(int *)((long)param_9 + 0x2096c) == 0)) { if ((*(byte *)((long)param_9 + 0xb12) & 0x40) != 0) { __fprintf_chk(*(int8 *)PTR_stderr_004abfa8,1,"%s: Aria file %s\n",my_progname_short, *param_9); } *(byte *)(param_9 + 0x412d) = *(byte *)(param_9 + 0x412d) | 4; } *(int *)((long)param_9 + 0x2096c) = *(int *)((long)param_9 + 0x2096c) + 1; puVar1 = PTR_stderr_004abfa8; local_28 = local_e8; local_30 = &stack0x00000008; local_38 = 0x3000000010; __fprintf_chk(*(int8 *)PTR_stderr_004abfa8,1,"%s: error: ",my_progname_short); __vfprintf_chk(*(int8 *)puVar1,1,param_10,&local_38); fputc(10,*(FILE **)puVar1); fflush(*(FILE **)puVar1); return; }
35,003
add_directory
eloqsql/mysys/my_default.c
static int add_directory(MEM_ROOT *alloc, const char *dir, const char **dirs) { char buf[FN_REFLEN]; size_t len; char *p; my_bool err __attribute__((unused)); len= normalize_dirname(buf, dir); if (!(p= strmake_root(alloc, buf, len))) return 1; /* Failure */ /* Should never fail if DEFAULT_DIRS_SIZE is correct size */ err= array_append_string_unique(p, dirs, DEFAULT_DIRS_SIZE); DBUG_ASSERT(err == FALSE); return 0; }
O0
c
add_directory: pushq %rbp movq %rsp, %rbp subq $0x250, %rsp # imm = 0x250 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x220(%rbp) movq %rsi, -0x228(%rbp) movq %rdx, -0x230(%rbp) leaq -0x210(%rbp), %rdi movq -0x228(%rbp), %rsi callq 0x2e7d0 movq %rax, -0x238(%rbp) movq -0x220(%rbp), %rdi leaq -0x210(%rbp), %rsi movq -0x238(%rbp), %rdx callq 0x2f920 movq %rax, -0x240(%rbp) cmpq $0x0, %rax jne 0x2d66a movl $0x1, -0x214(%rbp) jmp 0x2d694 movq -0x240(%rbp), %rdi movq -0x230(%rbp), %rsi movl $0x8, %edx callq 0x2ecf0 movb %al, -0x241(%rbp) jmp 0x2d68a movl $0x0, -0x214(%rbp) movl -0x214(%rbp), %eax movl %eax, -0x248(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x2d6c1 movl -0x248(%rbp), %eax addq $0x250, %rsp # imm = 0x250 popq %rbp retq callq 0x24300 nopw %cs:(%rax,%rax)
add_directory: push rbp mov rbp, rsp sub rsp, 250h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_220], rdi mov [rbp+var_228], rsi mov [rbp+var_230], rdx lea rdi, [rbp+var_210] mov rsi, [rbp+var_228] call normalize_dirname mov [rbp+var_238], rax mov rdi, [rbp+var_220] lea rsi, [rbp+var_210] mov rdx, [rbp+var_238] call strmake_root mov [rbp+var_240], rax cmp rax, 0 jnz short loc_2D66A mov [rbp+var_214], 1 jmp short loc_2D694 loc_2D66A: mov rdi, [rbp+var_240] mov rsi, [rbp+var_230] mov edx, 8 call array_append_string_unique mov [rbp+var_241], al jmp short $+2 loc_2D68A: mov [rbp+var_214], 0 loc_2D694: mov eax, [rbp+var_214] mov [rbp+var_248], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_2D6C1 mov eax, [rbp+var_248] add rsp, 250h pop rbp retn loc_2D6C1: call ___stack_chk_fail
long long add_directory(long long a1, long long a2, long long a3) { long long v4; // [rsp+10h] [rbp-240h] long long v5; // [rsp+18h] [rbp-238h] _BYTE v8[520]; // [rsp+40h] [rbp-210h] BYREF unsigned long long v9; // [rsp+248h] [rbp-8h] v9 = __readfsqword(0x28u); v5 = normalize_dirname(v8, a2); v4 = strmake_root(a1, v8, v5); if ( v4 ) { array_append_string_unique(v4, a3, 8LL); return 0; } else { return 1; } }
add_directory: PUSH RBP MOV RBP,RSP SUB RSP,0x250 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x220],RDI MOV qword ptr [RBP + -0x228],RSI MOV qword ptr [RBP + -0x230],RDX LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x228] CALL 0x0012e7d0 MOV qword ptr [RBP + -0x238],RAX MOV RDI,qword ptr [RBP + -0x220] LEA RSI,[RBP + -0x210] MOV RDX,qword ptr [RBP + -0x238] CALL 0x0012f920 MOV qword ptr [RBP + -0x240],RAX CMP RAX,0x0 JNZ 0x0012d66a MOV dword ptr [RBP + -0x214],0x1 JMP 0x0012d694 LAB_0012d66a: MOV RDI,qword ptr [RBP + -0x240] MOV RSI,qword ptr [RBP + -0x230] MOV EDX,0x8 CALL 0x0012ecf0 MOV byte ptr [RBP + -0x241],AL JMP 0x0012d68a LAB_0012d68a: MOV dword ptr [RBP + -0x214],0x0 LAB_0012d694: MOV EAX,dword ptr [RBP + -0x214] MOV dword ptr [RBP + -0x248],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0012d6c1 MOV EAX,dword ptr [RBP + -0x248] ADD RSP,0x250 POP RBP RET LAB_0012d6c1: CALL 0x00124300
bool add_directory(int8 param_1,int8 param_2,int8 param_3) { int8 uVar1; long lVar2; long in_FS_OFFSET; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); uVar1 = normalize_dirname(local_218,param_2); lVar2 = strmake_root(param_1,local_218,uVar1); if (lVar2 != 0) { array_append_string_unique(lVar2,param_3,8); } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return lVar2 == 0; }
35,004
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>>>>>::skip_bom()
monkey531[P]llama/common/json.hpp
bool skip_bom() { if (get() == 0xEF) { // check if we completely parse the BOM return get() == 0xBB && get() == 0xBF; } // the first character is not the beginning of the BOM; unget it to // process is later unget(); return true; }
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>>>>>::skip_bom(): pushq %rbx movq %rdi, %rbx callq 0x19150 cmpl $0xef, %eax je 0x4823e movq %rbx, %rdi callq 0x48b34 movb $0x1, %al popq %rbx retq movq %rbx, %rdi callq 0x19150 cmpl $0xbb, %eax je 0x48251 xorl %eax, %eax jmp 0x4823c movq %rbx, %rdi callq 0x19150 cmpl $0xbf, %eax sete %al jmp 0x4823c nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE8skip_bomEv: push rbx 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, 0EFh jz short loc_4823E 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) mov al, 1 loc_4823C: pop rbx retn loc_4823E: 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, 0BBh jz short loc_48251 xor eax, eax jmp short loc_4823C loc_48251: 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, 0BFh setz al jmp short loc_4823C
bool nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_bom( __m128i *a1) { 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) == 239 ) return (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 187 && (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) == 191; 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); return 1; }
skip_bom: PUSH RBX MOV RBX,RDI CALL 0x00119150 CMP EAX,0xef JZ 0x0014823e MOV RDI,RBX CALL 0x00148b34 MOV AL,0x1 LAB_0014823c: POP RBX RET LAB_0014823e: MOV RDI,RBX CALL 0x00119150 CMP EAX,0xbb JZ 0x00148251 XOR EAX,EAX JMP 0x0014823c LAB_00148251: MOV RDI,RBX CALL 0x00119150 CMP EAX,0xbf SETZ AL JMP 0x0014823c
/* 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 > > >::skip_bom() */ bool __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>>> ::skip_bom(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; bool bVar2; iVar1 = get(this); if (iVar1 == 0xef) { iVar1 = get(this); if (iVar1 == 0xbb) { iVar1 = get(this); bVar2 = iVar1 == 0xbf; } else { bVar2 = false; } } else { unget(this); bVar2 = true; } return bVar2; }
35,005
maria_chk_init_for_check
eloqsql/storage/maria/ma_check.c
void maria_chk_init_for_check(HA_CHECK *param, MARIA_HA *info) { param->not_visible_rows_found= 0; param->max_found_trid= 0; /* Set up transaction handler so that we can see all rows. When rows is read we will check the found id against param->max_tried */ if (!info->s->base.born_transactional) { /* There are no trids. Howver we want to set max_trid to make test of create_trid simpler. */ param->max_trid= ~(TrID) 0; } else if (param->max_trid == 0 || param->max_trid == ~(TrID) 0) { if (!ma_control_file_inited()) param->max_trid= 0; /* Give warning for first trid found */ else param->max_trid= max_trid_in_system(); } maria_ignore_trids(info); }
O0
c
maria_chk_init_for_check: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq $0x0, 0xb28(%rax) movq -0x8(%rbp), %rax movq $0x0, 0xb20(%rax) movq -0x10(%rbp), %rax movq (%rax), %rax cmpb $0x0, 0x44c(%rax) jne 0x96bff movq -0x8(%rbp), %rax movq $-0x1, 0xb18(%rax) jmp 0x96c4c movq -0x8(%rbp), %rax cmpq $0x0, 0xb18(%rax) je 0x96c1b movq -0x8(%rbp), %rax cmpq $-0x1, 0xb18(%rax) jne 0x96c4a callq 0x44890 cmpb $0x0, %al jne 0x96c35 movq -0x8(%rbp), %rax movq $0x0, 0xb18(%rax) jmp 0x96c48 callq 0x96c60 movq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0xb18(%rax) jmp 0x96c4a jmp 0x96c4c movq -0x10(%rbp), %rdi callq 0x39230 addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
maria_chk_init_for_check: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov qword ptr [rax+0B28h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+0B20h], 0 mov rax, [rbp+var_10] mov rax, [rax] cmp byte ptr [rax+44Ch], 0 jnz short loc_96BFF mov rax, [rbp+var_8] mov qword ptr [rax+0B18h], 0FFFFFFFFFFFFFFFFh jmp short loc_96C4C loc_96BFF: mov rax, [rbp+var_8] cmp qword ptr [rax+0B18h], 0 jz short loc_96C1B mov rax, [rbp+var_8] cmp qword ptr [rax+0B18h], 0FFFFFFFFFFFFFFFFh jnz short loc_96C4A loc_96C1B: call ma_control_file_inited cmp al, 0 jnz short loc_96C35 mov rax, [rbp+var_8] mov qword ptr [rax+0B18h], 0 jmp short loc_96C48 loc_96C35: call max_trid_in_system_0 mov rcx, rax mov rax, [rbp+var_8] mov [rax+0B18h], rcx loc_96C48: jmp short $+2 loc_96C4A: jmp short $+2 loc_96C4C: mov rdi, [rbp+var_10] call maria_ignore_trids add rsp, 10h pop rbp retn
long long maria_chk_init_for_check(_QWORD *a1, _QWORD *a2) { a1[357] = 0LL; a1[356] = 0LL; if ( *(_BYTE *)(*a2 + 1100LL) ) { if ( !a1[355] || a1[355] == -1LL ) { if ( ma_control_file_inited() ) a1[355] = max_trid_in_system_0(a1); else a1[355] = 0LL; } } else { a1[355] = -1LL; } return maria_ignore_trids(a2); }
maria_chk_init_for_check: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xb28],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xb20],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP byte ptr [RAX + 0x44c],0x0 JNZ 0x00196bff MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xb18],-0x1 JMP 0x00196c4c LAB_00196bff: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0xb18],0x0 JZ 0x00196c1b MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0xb18],-0x1 JNZ 0x00196c4a LAB_00196c1b: CALL 0x00144890 CMP AL,0x0 JNZ 0x00196c35 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xb18],0x0 JMP 0x00196c48 LAB_00196c35: CALL 0x00196c60 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xb18],RCX LAB_00196c48: JMP 0x00196c4a LAB_00196c4a: JMP 0x00196c4c LAB_00196c4c: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00139230 ADD RSP,0x10 POP RBP RET
void maria_chk_init_for_check(long param_1,long *param_2) { char cVar1; int8 uVar2; *(int8 *)(param_1 + 0xb28) = 0; *(int8 *)(param_1 + 0xb20) = 0; if (*(char *)(*param_2 + 0x44c) == '\0') { *(int8 *)(param_1 + 0xb18) = 0xffffffffffffffff; } else if ((*(long *)(param_1 + 0xb18) == 0) || (*(long *)(param_1 + 0xb18) == -1)) { cVar1 = ma_control_file_inited(); if (cVar1 == '\0') { *(int8 *)(param_1 + 0xb18) = 0; } else { uVar2 = max_trid_in_system(); *(int8 *)(param_1 + 0xb18) = uVar2; } } maria_ignore_trids(param_2); return; }
35,006
maria_chk_init_for_check
eloqsql/storage/maria/ma_check.c
void maria_chk_init_for_check(HA_CHECK *param, MARIA_HA *info) { param->not_visible_rows_found= 0; param->max_found_trid= 0; /* Set up transaction handler so that we can see all rows. When rows is read we will check the found id against param->max_tried */ if (!info->s->base.born_transactional) { /* There are no trids. Howver we want to set max_trid to make test of create_trid simpler. */ param->max_trid= ~(TrID) 0; } else if (param->max_trid == 0 || param->max_trid == ~(TrID) 0) { if (!ma_control_file_inited()) param->max_trid= 0; /* Give warning for first trid found */ else param->max_trid= max_trid_in_system(); } maria_ignore_trids(info); }
O3
c
maria_chk_init_for_check: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 xorps %xmm0, %xmm0 movups %xmm0, 0xb20(%rdi) movq (%rsi), %rax cmpb $0x0, 0x44c(%rax) je 0x74044 movq 0xb18(%r14), %rax incq %rax cmpq $0x1, %rax ja 0x74056 callq 0x4288e testb %al, %al je 0x7404d callq 0x41c3d leaq 0x3b1930(%rip), %rcx # 0x425968 movq (%rcx), %rcx cmpq %rcx, %rax cmovaq %rax, %rcx jmp 0x7404f movq $-0x1, %rcx jmp 0x7404f xorl %ecx, %ecx movq %rcx, 0xb18(%r14) movq %rbx, %rdi popq %rbx popq %r14 popq %rbp jmp 0x3b7b0
maria_chk_init_for_check: push rbp mov rbp, rsp push r14 push rbx mov rbx, rsi mov r14, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi+0B20h], xmm0 mov rax, [rsi] cmp byte ptr [rax+44Ch], 0 jz short loc_74044 mov rax, [r14+0B18h] inc rax cmp rax, 1 ja short loc_74056 call ma_control_file_inited test al, al jz short loc_7404D call trnman_get_max_trid lea rcx, max_trid_in_control_file mov rcx, [rcx] cmp rax, rcx cmova rcx, rax jmp short loc_7404F loc_74044: mov rcx, 0FFFFFFFFFFFFFFFFh jmp short loc_7404F loc_7404D: xor ecx, ecx loc_7404F: mov [r14+0B18h], rcx loc_74056: mov rdi, rbx pop rbx pop r14 pop rbp jmp maria_ignore_trids
_QWORD * maria_chk_init_for_check(long long a1, long long a2) { unsigned long long max_trid; // rax long long v3; // rcx *(_OWORD *)(a1 + 2848) = 0LL; if ( !*(_BYTE *)(*(_QWORD *)a2 + 1100LL) ) { v3 = -1LL; LABEL_9: *(_QWORD *)(a1 + 2840) = v3; return maria_ignore_trids(a2); } if ( *(_QWORD *)(a1 + 2840) == -1LL || *(_QWORD *)(a1 + 2840) == 0LL ) { if ( ma_control_file_inited() ) { max_trid = trnman_get_max_trid(a1); v3 = max_trid_in_control_file; if ( max_trid > max_trid_in_control_file ) v3 = max_trid; } else { v3 = 0LL; } goto LABEL_9; } return maria_ignore_trids(a2); }
maria_chk_init_for_check: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RSI MOV R14,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0xb20],XMM0 MOV RAX,qword ptr [RSI] CMP byte ptr [RAX + 0x44c],0x0 JZ 0x00174044 MOV RAX,qword ptr [R14 + 0xb18] INC RAX CMP RAX,0x1 JA 0x00174056 CALL 0x0014288e TEST AL,AL JZ 0x0017404d CALL 0x00141c3d LEA RCX,[0x525968] MOV RCX,qword ptr [RCX] CMP RAX,RCX CMOVA RCX,RAX JMP 0x0017404f LAB_00174044: MOV RCX,-0x1 JMP 0x0017404f LAB_0017404d: XOR ECX,ECX LAB_0017404f: MOV qword ptr [R14 + 0xb18],RCX LAB_00174056: MOV RDI,RBX POP RBX POP R14 POP RBP JMP 0x0013b7b0
void maria_chk_init_for_check(long param_1,long *param_2) { char cVar1; ulong uVar2; ulong uVar3; *(int8 *)(param_1 + 0xb20) = 0; *(int8 *)(param_1 + 0xb28) = 0; if (*(char *)(*param_2 + 0x44c) == '\0') { uVar3 = 0xffffffffffffffff; } else { if (1 < *(long *)(param_1 + 0xb18) + 1U) goto LAB_00174056; cVar1 = ma_control_file_inited(); if (cVar1 == '\0') { uVar3 = 0; } else { uVar2 = trnman_get_max_trid(); uVar3 = max_trid_in_control_file; if (max_trid_in_control_file < uVar2) { uVar3 = uVar2; } } } *(ulong *)(param_1 + 0xb18) = uVar3; LAB_00174056: maria_ignore_trids(param_2); return; }
35,007
inline_mysql_file_create
eloqsql/include/mysql/psi/mysql_file.h
static inline File inline_mysql_file_create( #ifdef HAVE_PSI_FILE_INTERFACE PSI_file_key key, const char *src_file, uint src_line, #endif const char *filename, int create_flags, int access_flags, myf myFlags) { File file; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_CREATE, filename, &locker); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); file= my_create(filename, create_flags, access_flags, myFlags); PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file); return file; } #endif file= my_create(filename, create_flags, access_flags, myFlags); return file; }
O0
c
inline_mysql_file_create: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq 0x10(%rbp), %rax movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movl %r9d, -0x28(%rbp) leaq 0x20eb9c(%rip), %rax # 0x2c0238 movq (%rax), %rax movq 0x148(%rax), %rax movl -0x8(%rbp), %esi movq -0x20(%rbp), %rcx leaq -0x80(%rbp), %rdi xorl %edx, %edx leaq -0x38(%rbp), %r8 callq *%rax movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%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 0xb1733 leaq 0x20eb54(%rip), %rax # 0x2c0238 movq (%rax), %rax movq 0x1f0(%rax), %rax movq -0x38(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx callq *%rax movq -0x20(%rbp), %rdi movl -0x24(%rbp), %esi movl -0x28(%rbp), %edx movq 0x10(%rbp), %rcx callq 0xef3f0 movl %eax, -0x2c(%rbp) leaq 0x20eb20(%rip), %rax # 0x2c0238 movq (%rax), %rax movq 0x200(%rax), %rax movq -0x38(%rbp), %rdi movl -0x2c(%rbp), %esi callq *%rax movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xb174f movq -0x20(%rbp), %rdi movl -0x24(%rbp), %esi movl -0x28(%rbp), %edx movq 0x10(%rbp), %rcx callq 0xef3f0 movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x80, %rsp popq %rbp retq nopl (%rax,%rax)
inline_mysql_file_create_1: push rbp mov rbp, rsp sub rsp, 80h mov rax, [rbp+arg_0] mov [rbp+var_8], edi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov [rbp+var_28], r9d lea rax, PSI_server mov rax, [rax] mov rax, [rax+148h] mov esi, [rbp+var_8] mov rcx, [rbp+var_20] lea rdi, [rbp+var_80] xor edx, edx lea r8, [rbp+var_38] call rax mov [rbp+var_38], rax cmp [rbp+var_38], 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_B1733 lea rax, PSI_server mov rax, [rax] mov rax, [rax+1F0h] mov rdi, [rbp+var_38] mov rsi, [rbp+var_10] mov edx, [rbp+var_14] call rax mov rdi, [rbp+var_20] mov esi, [rbp+var_24] mov edx, [rbp+var_28] mov rcx, [rbp+arg_0] call my_create mov [rbp+var_2C], eax lea rax, PSI_server mov rax, [rax] mov rax, [rax+200h] mov rdi, [rbp+var_38] mov esi, [rbp+var_2C] call rax mov eax, [rbp+var_2C] mov [rbp+var_4], eax jmp short loc_B174F loc_B1733: mov rdi, [rbp+var_20] mov esi, [rbp+var_24] mov edx, [rbp+var_28] mov rcx, [rbp+arg_0] call my_create mov [rbp+var_2C], eax mov eax, [rbp+var_2C] mov [rbp+var_4], eax loc_B174F: mov eax, [rbp+var_4] add rsp, 80h pop rbp retn
long long inline_mysql_file_create_1( unsigned int a1, long long a2, unsigned int a3, long long a4, unsigned int a5, unsigned int a6, long long a7) { _BYTE v8[72]; // [rsp+0h] [rbp-80h] BYREF long long v9; // [rsp+48h] [rbp-38h] BYREF unsigned int v10; // [rsp+54h] [rbp-2Ch] unsigned int v11; // [rsp+58h] [rbp-28h] unsigned int v12; // [rsp+5Ch] [rbp-24h] long long v13; // [rsp+60h] [rbp-20h] unsigned int v14; // [rsp+6Ch] [rbp-14h] long long v15; // [rsp+70h] [rbp-10h] unsigned int v16; // [rsp+78h] [rbp-8h] v16 = a1; v15 = a2; v14 = a3; v13 = a4; v12 = a5; v11 = a6; v9 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, long long, long long *))PSI_server[41])(v8, a1, 0LL, a4, &v9); if ( v9 ) { ((void ( *)(long long, long long, _QWORD))PSI_server[62])(v9, v15, v14); v10 = my_create(v13, v12, v11, a7); ((void ( *)(long long, _QWORD))PSI_server[64])(v9, v10); } else { return (unsigned int)my_create(v13, v12, v11, a7); } return v10; }
inline_mysql_file_create: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV RAX,qword ptr [RBP + 0x10] MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV dword ptr [RBP + -0x28],R9D LEA RAX,[0x3c0238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x148] MOV ESI,dword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x20] LEA RDI,[RBP + -0x80] XOR EDX,EDX LEA R8,[RBP + -0x38] CALL RAX MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],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 0x001b1733 LEA RAX,[0x3c0238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1f0] MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] CALL RAX MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x24] MOV EDX,dword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + 0x10] CALL 0x001ef3f0 MOV dword ptr [RBP + -0x2c],EAX LEA RAX,[0x3c0238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x200] MOV RDI,qword ptr [RBP + -0x38] MOV ESI,dword ptr [RBP + -0x2c] CALL RAX MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x4],EAX JMP 0x001b174f LAB_001b1733: MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x24] MOV EDX,dword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + 0x10] CALL 0x001ef3f0 MOV dword ptr [RBP + -0x2c],EAX MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x4],EAX LAB_001b174f: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x80 POP RBP RET
int4 inline_mysql_file_create (int4 param_1,int8 param_2,int4 param_3,int8 param_4, int4 param_5,int4 param_6,int8 param_7) { int1 local_88 [72]; long local_40; int4 local_34; int4 local_30; int4 local_2c; int8 local_28; int4 local_1c; int8 local_18; int4 local_10; int4 local_c; local_30 = param_6; local_2c = param_5; local_28 = param_4; local_1c = param_3; local_18 = param_2; local_10 = param_1; local_40 = (**(code **)(PSI_server + 0x148))(local_88,param_1,0,param_4,&local_40); if (local_40 == 0) { local_c = my_create(local_28,local_2c,local_30,param_7); } else { (**(code **)(PSI_server + 0x1f0))(local_40,local_18,local_1c); local_34 = my_create(local_28,local_2c,local_30,param_7); (**(code **)(PSI_server + 0x200))(local_40,local_34); local_c = local_34; } return local_c; }
35,008
google::protobuf::FieldOptions::FieldOptions(google::protobuf::FieldOptions const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
FieldOptions::FieldOptions(const FieldOptions& from) : ::PROTOBUF_NAMESPACE_ID::Message() { FieldOptions* const _this = this; (void)_this; new (&_impl_) Impl_{ /*decltype(_impl_._extensions_)*/{} , decltype(_impl_._has_bits_){from._impl_._has_bits_} , /*decltype(_impl_._cached_size_)*/{} , decltype(_impl_.uninterpreted_option_){from._impl_.uninterpreted_option_} , decltype(_impl_.ctype_){} , decltype(_impl_.jstype_){} , decltype(_impl_.packed_){} , decltype(_impl_.lazy_){} , decltype(_impl_.unverified_lazy_){} , decltype(_impl_.deprecated_){} , decltype(_impl_.weak_){}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); _impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_); ::memcpy(&_impl_.ctype_, &from._impl_.ctype_, static_cast<size_t>(reinterpret_cast<char*>(&_impl_.weak_) - reinterpret_cast<char*>(&_impl_.ctype_)) + sizeof(_impl_.weak_)); // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldOptions) }
O0
cpp
google::protobuf::FieldOptions::FieldOptions(google::protobuf::FieldOptions const&): subq $0xc8, %rsp movq %rdi, 0x78(%rsp) movq %rsi, 0x70(%rsp) movq 0x78(%rsp), %rdi movq %rdi, 0x40(%rsp) callq 0xd3f60 movq 0x40(%rsp), %rdi leaq 0x1b68a4(%rip), %rax # 0x278680 movq %rax, (%rdi) movq %rdi, 0x68(%rsp) addq $0x10, %rdi movq %rdi, 0x48(%rsp) movq %rdi, %rax movq %rax, 0x50(%rsp) callq 0xd6a90 jmp 0xc1dfc movq 0x50(%rsp), %rax movq 0x70(%rsp), %rcx movl 0x28(%rcx), %ecx movl %ecx, 0x18(%rax) movq %rax, %rdi addq $0x1c, %rdi movl $0x0, 0x1c(%rax) callq 0xd3ff0 movq 0x50(%rsp), %rdi addq $0x20, %rdi movq 0x70(%rsp), %rsi addq $0x30, %rsi callq 0xd6ac0 jmp 0xc1e38 movq 0x40(%rsp), %rcx movq 0x50(%rsp), %rax movl $0x0, 0x38(%rax) movl $0x0, 0x3c(%rax) movb $0x0, 0x40(%rax) movb $0x0, 0x41(%rax) movb $0x0, 0x42(%rax) movb $0x0, 0x43(%rax) movb $0x0, 0x44(%rax) addq $0x8, %rcx movq 0x70(%rsp), %rax addq $0x8, %rax movq %rcx, 0x88(%rsp) movq %rax, 0x80(%rsp) movq 0x88(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x80(%rsp), %rax movq %rax, 0x90(%rsp) movq 0x90(%rsp), %rax movq %rax, 0xc0(%rsp) movq 0xc0(%rsp), %rax movq (%rax), %rax andq $0x1, %rax cmpq $0x0, %rax setne %al movb %al, 0x3f(%rsp) movb 0x3f(%rsp), %al testb $0x1, %al jne 0xc1ed5 jmp 0xc1f81 movq 0x80(%rsp), %rax movq %rax, 0xa0(%rsp) movq $0x0, 0x98(%rsp) movq 0xa0(%rsp), %rax movq %rax, 0x28(%rsp) movq %rax, 0xb0(%rsp) movq 0xb0(%rsp), %rax movq %rax, 0xb8(%rsp) movq 0xb8(%rsp), %rax movq (%rax), %rax andq $0x1, %rax cmpq $0x0, %rax je 0xc1f43 movq 0x28(%rsp), %rdi callq 0x9cd40 addq $0x8, %rax movq %rax, 0xa8(%rsp) jmp 0xc1f61 movq 0x98(%rsp), %rax callq *%rax movq %rax, 0x20(%rsp) jmp 0xc1f54 movq 0x20(%rsp), %rax movq %rax, 0xa8(%rsp) movq 0xa8(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rsi movq 0x30(%rsp), %rdi callq 0xe0920 jmp 0xc1f7f jmp 0xc1f81 jmp 0xc1f83 movq 0x40(%rsp), %rax addq $0x10, %rax movq %rax, 0x8(%rsp) callq 0x813e0 movq %rax, 0x10(%rsp) jmp 0xc1f9d movq 0x10(%rsp), %rsi movq 0x8(%rsp), %rdi movq 0x70(%rsp), %rdx addq $0x10, %rdx callq 0x198570 jmp 0xc1fb7 movq 0x40(%rsp), %rax movq %rax, %rdi addq $0x10, %rdi addq $0x38, %rdi movq 0x70(%rsp), %rsi addq $0x10, %rsi addq $0x38, %rsi movq %rax, %rdx addq $0x10, %rdx addq $0x44, %rdx addq $0x10, %rax addq $0x38, %rax subq %rax, %rdx addq $0x1, %rdx callq 0x13390 addq $0xc8, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x5c(%rsp) jmp 0xc2023 movq 0x48(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x5c(%rsp) callq 0x186290 movq 0x40(%rsp), %rdi callq 0xd3f50 movq 0x60(%rsp), %rdi callq 0x13750 nopw (%rax,%rax)
_ZN6google8protobuf12FieldOptionsC2ERKS1_: sub rsp, 0C8h mov [rsp+0C8h+var_50], rdi mov [rsp+0C8h+var_58], rsi mov rdi, [rsp+0C8h+var_50]; this mov [rsp+0C8h+var_88], rdi call _ZN6google8protobuf7MessageC2Ev; google::protobuf::Message::Message(void) mov rdi, [rsp+0C8h+var_88] lea rax, off_278680 mov [rdi], rax mov [rsp+0C8h+var_60], rdi add rdi, 10h; this mov [rsp+0C8h+var_80], rdi mov rax, rdi mov [rsp+0C8h+var_78], rax call _ZN6google8protobuf8internal12ExtensionSetC2Ev; google::protobuf::internal::ExtensionSet::ExtensionSet(void) jmp short $+2 loc_C1DFC: mov rax, [rsp+0C8h+var_78] mov rcx, [rsp+0C8h+var_58] mov ecx, [rcx+28h] mov [rax+18h], ecx mov rdi, rax add rdi, 1Ch; this mov dword ptr [rax+1Ch], 0 call _ZN6google8protobuf8internal10CachedSizeC2Ev; google::protobuf::internal::CachedSize::CachedSize(void) mov rdi, [rsp+0C8h+var_78] add rdi, 20h ; ' '; this mov rsi, [rsp+0C8h+var_58] add rsi, 30h ; '0' call _ZN6google8protobuf16RepeatedPtrFieldINS0_19UninterpretedOptionEEC2ERKS3_; google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::RepeatedPtrField(google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption> const&) jmp short $+2 loc_C1E38: mov rcx, [rsp+0C8h+var_88] mov rax, [rsp+0C8h+var_78] mov dword ptr [rax+38h], 0 mov dword ptr [rax+3Ch], 0 mov byte ptr [rax+40h], 0 mov byte ptr [rax+41h], 0 mov byte ptr [rax+42h], 0 mov byte ptr [rax+43h], 0 mov byte ptr [rax+44h], 0 add rcx, 8 mov rax, [rsp+0C8h+var_58] add rax, 8 mov [rsp+0C8h+var_40], rcx mov [rsp+0C8h+var_48], rax mov rax, [rsp+0C8h+var_40] mov [rsp+0C8h+var_98], rax mov rax, [rsp+0C8h+var_48] mov [rsp+0C8h+var_38], rax mov rax, [rsp+0C8h+var_38] mov [rsp+0C8h+var_8], rax mov rax, [rsp+0C8h+var_8] mov rax, [rax] and rax, 1 cmp rax, 0 setnz al mov [rsp+0C8h+var_89], al mov al, [rsp+0C8h+var_89] test al, 1 jnz short loc_C1ED5 jmp loc_C1F81 loc_C1ED5: mov rax, [rsp+0C8h+var_48] mov [rsp+0C8h+var_28], rax mov [rsp+0C8h+var_30], 0 mov rax, [rsp+0C8h+var_28] mov [rsp+0C8h+var_A0], rax mov [rsp+0C8h+var_18], rax mov rax, [rsp+0C8h+var_18] mov [rsp+0C8h+var_10], rax mov rax, [rsp+0C8h+var_10] mov rax, [rax] and rax, 1 cmp rax, 0 jz short loc_C1F43 mov rdi, [rsp+0C8h+var_A0] call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS2_9ContainerINS0_15UnknownFieldSetEEEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(void) add rax, 8 mov [rsp+0C8h+var_20], rax jmp short loc_C1F61 loc_C1F43: mov rax, [rsp+0C8h+var_30] call rax mov [rsp+0C8h+var_A8], rax jmp short $+2 loc_C1F54: mov rax, [rsp+0C8h+var_A8] mov [rsp+0C8h+var_20], rax loc_C1F61: mov rax, [rsp+0C8h+var_20] mov qword ptr [rsp+0C8h+var_B0], rax mov rsi, qword ptr [rsp+0C8h+var_B0]; int mov rdi, [rsp+0C8h+var_98]; void * call _ZN6google8protobuf8internal16InternalMetadata11DoMergeFromINS0_15UnknownFieldSetEEEvRKT_; google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>(google::protobuf::UnknownFieldSet const&) jmp short $+2 loc_C1F7F: jmp short $+2 loc_C1F81: jmp short $+2 loc_C1F83: mov rax, [rsp+0C8h+var_88] add rax, 10h mov [rsp+0C8h+var_C0], rax call _ZN6google8protobuf12FieldOptions25internal_default_instanceEv; google::protobuf::FieldOptions::internal_default_instance(void) mov [rsp+0C8h+var_B8], rax jmp short $+2 loc_C1F9D: mov rsi, [rsp+0C8h+var_B8]; google::protobuf::MessageLite * mov rdi, [rsp+0C8h+var_C0]; this mov rdx, [rsp+0C8h+var_58] add rdx, 10h; google::protobuf::internal::ExtensionSet * call _ZN6google8protobuf8internal12ExtensionSet9MergeFromEPKNS0_11MessageLiteERKS2_; google::protobuf::internal::ExtensionSet::MergeFrom(google::protobuf::MessageLite const*,google::protobuf::internal::ExtensionSet const&) jmp short $+2 loc_C1FB7: mov rax, [rsp+0C8h+var_88] mov rdi, rax add rdi, 10h add rdi, 38h ; '8' mov rsi, [rsp+0C8h+var_58] add rsi, 10h add rsi, 38h ; '8' mov rdx, rax add rdx, 10h add rdx, 44h ; 'D' add rax, 10h add rax, 38h ; '8' sub rdx, rax add rdx, 1 call _memcpy add rsp, 0C8h retn mov rcx, rax mov eax, edx mov [rsp+arg_58], rcx mov [rsp+arg_54], eax jmp short loc_C2023 mov rdi, [rsp+arg_40]; this mov rcx, rax mov eax, edx mov [rsp+arg_58], rcx mov [rsp+arg_54], eax call _ZN6google8protobuf8internal12ExtensionSetD2Ev; google::protobuf::internal::ExtensionSet::~ExtensionSet() loc_C2023: mov rdi, [rsp+arg_38]; this call _ZN6google8protobuf7MessageD2Ev; google::protobuf::Message::~Message() mov rdi, [rsp+arg_58] call __Unwind_Resume
long long google::protobuf::FieldOptions::FieldOptions( google::protobuf::FieldOptions *this, const google::protobuf::FieldOptions *a2) { google::protobuf::FieldOptions *v2; // rdi int v3; // edx int v4; // ecx int v5; // r8d int v6; // r9d google::protobuf::MessageLite *v8; // [rsp+10h] [rbp-B8h] char *v10; // [rsp+50h] [rbp-78h] unsigned long long v12; // [rsp+A8h] [rbp-20h] google::protobuf::Message::Message(this); *(_QWORD *)this = off_278680; v10 = (char *)this + 16; google::protobuf::internal::ExtensionSet::ExtensionSet((google::protobuf::FieldOptions *)((char *)this + 16)); *((_DWORD *)this + 10) = *((_DWORD *)a2 + 10); *((_DWORD *)this + 11) = 0; google::protobuf::internal::CachedSize::CachedSize((google::protobuf::FieldOptions *)((char *)this + 44)); v2 = (google::protobuf::FieldOptions *)((char *)this + 48); google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::RepeatedPtrField( (_DWORD)v10 + 32, (_DWORD)a2 + 48, v3, v4, v5, v6); *((_DWORD *)v10 + 14) = 0; *((_DWORD *)v10 + 15) = 0; v10[64] = 0; v10[65] = 0; v10[66] = 0; v10[67] = 0; v10[68] = 0; if ( (*((_QWORD *)a2 + 1) & 1LL) != 0 ) { v12 = google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>((_QWORD *)a2 + 1) + 8; v2 = (google::protobuf::FieldOptions *)((char *)this + 8); google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>((char *)this + 8, v12); } v8 = (google::protobuf::MessageLite *)google::protobuf::FieldOptions::internal_default_instance(v2); google::protobuf::internal::ExtensionSet::MergeFrom( (google::protobuf::FieldOptions *)((char *)this + 16), v8, (const google::protobuf::FieldOptions *)((char *)a2 + 16)); return memcpy((char *)this + 72, (char *)a2 + 72, 13LL); }
FieldOptions: SUB RSP,0xc8 MOV qword ptr [RSP + 0x78],RDI MOV qword ptr [RSP + 0x70],RSI MOV RDI,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x40],RDI CALL 0x001d3f60 MOV RDI,qword ptr [RSP + 0x40] LEA RAX,[0x378680] MOV qword ptr [RDI],RAX MOV qword ptr [RSP + 0x68],RDI ADD RDI,0x10 MOV qword ptr [RSP + 0x48],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x50],RAX LAB_001c1df5: CALL 0x001d6a90 JMP 0x001c1dfc LAB_001c1dfc: MOV RAX,qword ptr [RSP + 0x50] MOV RCX,qword ptr [RSP + 0x70] MOV ECX,dword ptr [RCX + 0x28] MOV dword ptr [RAX + 0x18],ECX MOV RDI,RAX ADD RDI,0x1c MOV dword ptr [RAX + 0x1c],0x0 CALL 0x001d3ff0 MOV RDI,qword ptr [RSP + 0x50] ADD RDI,0x20 MOV RSI,qword ptr [RSP + 0x70] ADD RSI,0x30 LAB_001c1e31: CALL 0x001d6ac0 JMP 0x001c1e38 LAB_001c1e38: MOV RCX,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RSP + 0x50] MOV dword ptr [RAX + 0x38],0x0 MOV dword ptr [RAX + 0x3c],0x0 MOV byte ptr [RAX + 0x40],0x0 MOV byte ptr [RAX + 0x41],0x0 MOV byte ptr [RAX + 0x42],0x0 MOV byte ptr [RAX + 0x43],0x0 MOV byte ptr [RAX + 0x44],0x0 ADD RCX,0x8 MOV RAX,qword ptr [RSP + 0x70] ADD RAX,0x8 MOV qword ptr [RSP + 0x88],RCX MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x90],RAX MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0xc0],RAX MOV RAX,qword ptr [RSP + 0xc0] MOV RAX,qword ptr [RAX] AND RAX,0x1 CMP RAX,0x0 SETNZ AL MOV byte ptr [RSP + 0x3f],AL MOV AL,byte ptr [RSP + 0x3f] TEST AL,0x1 JNZ 0x001c1ed5 JMP 0x001c1f81 LAB_001c1ed5: MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0xa0],RAX MOV qword ptr [RSP + 0x98],0x0 MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0xb0],RAX MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0xb8],RAX MOV RAX,qword ptr [RSP + 0xb8] MOV RAX,qword ptr [RAX] AND RAX,0x1 CMP RAX,0x0 JZ 0x001c1f43 MOV RDI,qword ptr [RSP + 0x28] CALL 0x0019cd40 ADD RAX,0x8 MOV qword ptr [RSP + 0xa8],RAX JMP 0x001c1f61 LAB_001c1f43: MOV RAX,qword ptr [RSP + 0x98] LAB_001c1f4b: CALL RAX MOV qword ptr [RSP + 0x20],RAX JMP 0x001c1f54 LAB_001c1f54: MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0xa8],RAX LAB_001c1f61: MOV RAX,qword ptr [RSP + 0xa8] MOV qword ptr [RSP + 0x18],RAX MOV RSI,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RSP + 0x30] CALL 0x001e0920 JMP 0x001c1f7f LAB_001c1f7f: JMP 0x001c1f81 LAB_001c1f81: JMP 0x001c1f83 LAB_001c1f83: MOV RAX,qword ptr [RSP + 0x40] ADD RAX,0x10 MOV qword ptr [RSP + 0x8],RAX CALL 0x001813e0 MOV qword ptr [RSP + 0x10],RAX JMP 0x001c1f9d LAB_001c1f9d: MOV RSI,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x70] ADD RDX,0x10 CALL 0x00298570 LAB_001c1fb5: JMP 0x001c1fb7 LAB_001c1fb7: MOV RAX,qword ptr [RSP + 0x40] MOV RDI,RAX ADD RDI,0x10 ADD RDI,0x38 MOV RSI,qword ptr [RSP + 0x70] ADD RSI,0x10 ADD RSI,0x38 MOV RDX,RAX ADD RDX,0x10 ADD RDX,0x44 ADD RAX,0x10 ADD RAX,0x38 SUB RDX,RAX ADD RDX,0x1 CALL 0x00113390 ADD RSP,0xc8 RET
/* google::protobuf::FieldOptions::FieldOptions(google::protobuf::FieldOptions const&) */ void __thiscall google::protobuf::FieldOptions::FieldOptions(FieldOptions *this,FieldOptions *param_1) { InternalMetadata *this_00; MessageLite *pMVar1; UnknownFieldSet *local_20; Message::Message((Message *)this); *(int ***)this = &PTR__FieldOptions_00378680; /* try { // try from 001c1df5 to 001c1df9 has its CatchHandler @ 001c1ffb */ internal::ExtensionSet::ExtensionSet((ExtensionSet *)(this + 0x10)); *(int4 *)(this + 0x28) = *(int4 *)(param_1 + 0x28); *(int4 *)(this + 0x2c) = 0; internal::CachedSize::CachedSize((CachedSize *)(this + 0x2c)); /* try { // try from 001c1e31 to 001c1e35 has its CatchHandler @ 001c200b */ RepeatedPtrField<google::protobuf::UninterpretedOption>::RepeatedPtrField ((RepeatedPtrField<google::protobuf::UninterpretedOption> *)(this + 0x30), (RepeatedPtrField *)(param_1 + 0x30)); *(int4 *)(this + 0x48) = 0; *(int4 *)(this + 0x4c) = 0; this[0x50] = (FieldOptions)0x0; this[0x51] = (FieldOptions)0x0; this[0x52] = (FieldOptions)0x0; this[0x53] = (FieldOptions)0x0; this[0x54] = (FieldOptions)0x0; this_00 = (InternalMetadata *)(param_1 + 8); if ((*(ulong *)this_00 & 1) != 0) { if ((*(ulong *)this_00 & 1) == 0) { /* try { // try from 001c1f4b to 001c1fb4 has its CatchHandler @ 001c1ffb */ local_20 = (UnknownFieldSet *)(*(code *)0x0)(); } else { local_20 = (UnknownFieldSet *) internal::InternalMetadata:: PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>> (this_00); local_20 = (UnknownFieldSet *)((Container *)local_20 + 8); } internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet> ((InternalMetadata *)(this + 8),local_20); } pMVar1 = (MessageLite *)internal_default_instance(); internal::ExtensionSet::MergeFrom ((ExtensionSet *)(this + 0x10),pMVar1,(ExtensionSet *)(param_1 + 0x10)); memcpy(this + 0x48,param_1 + 0x48,0xd); return; }
35,009
translog_get_total_chunk_length
eloqsql/storage/maria/ma_loghandler.c
static uint16 translog_get_total_chunk_length(uchar *page, uint16 offset) { DBUG_ENTER("translog_get_total_chunk_length"); switch (page[offset] & TRANSLOG_CHUNK_TYPE) { case TRANSLOG_CHUNK_LSN: { /* 0 chunk referred as LSN (head or tail) */ translog_size_t rec_len; uchar *start= page + offset; uchar *ptr= start + 1 + 2; /* chunk type and short trid */ uint16 chunk_len, header_len, page_rest; DBUG_PRINT("info", ("TRANSLOG_CHUNK_LSN")); rec_len= translog_variable_record_1group_decode_len(&ptr); chunk_len= uint2korr(ptr); header_len= (uint16) (ptr -start) + 2; DBUG_PRINT("info", ("rec len: %lu chunk len: %u header len: %u", (ulong) rec_len, (uint) chunk_len, (uint) header_len)); if (chunk_len) { DBUG_PRINT("info", ("chunk len: %u + %u = %u", (uint) header_len, (uint) chunk_len, (uint) (chunk_len + header_len))); DBUG_RETURN(chunk_len + header_len); } page_rest= TRANSLOG_PAGE_SIZE - offset; DBUG_PRINT("info", ("page_rest %u", (uint) page_rest)); if (rec_len + header_len < page_rest) DBUG_RETURN(rec_len + header_len); DBUG_RETURN(page_rest); } case TRANSLOG_CHUNK_FIXED: { uchar *ptr; uint type= page[offset] & TRANSLOG_REC_TYPE; uint length; int i; /* 1 (pseudo)fixed record (also LSN) */ DBUG_PRINT("info", ("TRANSLOG_CHUNK_FIXED")); DBUG_ASSERT(log_record_type_descriptor[type].rclass == LOGRECTYPE_FIXEDLENGTH || log_record_type_descriptor[type].rclass == LOGRECTYPE_PSEUDOFIXEDLENGTH); if (log_record_type_descriptor[type].rclass == LOGRECTYPE_FIXEDLENGTH) { DBUG_PRINT("info", ("Fixed length: %u", (uint) (log_record_type_descriptor[type].fixed_length + 3))); DBUG_RETURN(log_record_type_descriptor[type].fixed_length + 3); } ptr= page + offset + 3; /* first compressed LSN */ length= log_record_type_descriptor[type].fixed_length + 3; for (i= 0; i < log_record_type_descriptor[type].compressed_LSN; i++) { /* first 2 bits is length - 2 */ uint len= (((uint8) (*ptr)) >> 6) + 2; if (ptr[0] == 0 && ((uint8) ptr[1]) == 1) len+= LSN_STORE_SIZE; /* case of full LSN storing */ ptr+= len; /* subtract saved bytes */ length-= (LSN_STORE_SIZE - len); } DBUG_PRINT("info", ("Pseudo-fixed length: %u", length)); DBUG_RETURN(length); } case TRANSLOG_CHUNK_NOHDR: /* 2 no header chunk (till page end) */ DBUG_PRINT("info", ("TRANSLOG_CHUNK_NOHDR length: %u", (uint) (TRANSLOG_PAGE_SIZE - offset))); DBUG_RETURN(TRANSLOG_PAGE_SIZE - offset); case TRANSLOG_CHUNK_LNGTH: /* 3 chunk with chunk length */ DBUG_PRINT("info", ("TRANSLOG_CHUNK_LNGTH")); DBUG_ASSERT(TRANSLOG_PAGE_SIZE - offset >= 3); DBUG_PRINT("info", ("length: %u", uint2korr(page + offset + 1) + 3)); DBUG_RETURN(uint2korr(page + offset + 1) + 3); default: DBUG_ASSERT(0); DBUG_RETURN(0); } }
O0
c
translog_get_total_chunk_length: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movw %si, %ax movq %rdi, -0x10(%rbp) movw %ax, -0x12(%rbp) movq -0x10(%rbp), %rax movzwl -0x12(%rbp), %ecx movzbl (%rax,%rcx), %eax andl $0xc0, %eax movl %eax, -0x4c(%rbp) je 0x5793c jmp 0x5790b movl -0x4c(%rbp), %eax subl $0x40, %eax je 0x579f3 jmp 0x57919 movl -0x4c(%rbp), %eax subl $0x80, %eax je 0x57b10 jmp 0x57929 movl -0x4c(%rbp), %eax subl $0xc0, %eax je 0x57b27 jmp 0x57b4e movq -0x10(%rbp), %rax movzwl -0x12(%rbp), %ecx movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax addq $0x1, %rax addq $0x2, %rax movq %rax, -0x28(%rbp) jmp 0x57960 leaq -0x28(%rbp), %rdi callq 0x5e150 movl %eax, -0x18(%rbp) movq -0x28(%rbp), %rax movw (%rax), %ax movw %ax, -0x2a(%rbp) movq -0x28(%rbp), %rax movq -0x20(%rbp), %rcx subq %rcx, %rax movzwl %ax, %eax addl $0x2, %eax movw %ax, -0x2c(%rbp) jmp 0x5798e cmpw $0x0, -0x2a(%rbp) je 0x579ae jmp 0x57997 jmp 0x57999 jmp 0x5799b movzwl -0x2a(%rbp), %eax movzwl -0x2c(%rbp), %ecx addl %ecx, %eax movw %ax, -0x2(%rbp) jmp 0x57b5a movzwl -0x12(%rbp), %ecx movl $0x2000, %eax # imm = 0x2000 subl %ecx, %eax movw %ax, -0x2e(%rbp) jmp 0x579bf movl -0x18(%rbp), %eax movzwl -0x2c(%rbp), %ecx addl %ecx, %eax movzwl -0x2e(%rbp), %ecx cmpl %ecx, %eax jae 0x579e4 jmp 0x579d2 movl -0x18(%rbp), %eax movzwl -0x2c(%rbp), %ecx addl %ecx, %eax movw %ax, -0x2(%rbp) jmp 0x57b5a jmp 0x579e6 movw -0x2e(%rbp), %ax movw %ax, -0x2(%rbp) jmp 0x57b5a movq -0x10(%rbp), %rax movzwl -0x12(%rbp), %ecx movzbl (%rax,%rcx), %eax andl $0x3f, %eax movl %eax, -0x3c(%rbp) jmp 0x57a07 jmp 0x57a09 jmp 0x57a0b movl -0x3c(%rbp), %eax movl %eax, %ecx leaq 0x3e9389(%rip), %rax # 0x440da0 imulq $0x48, %rcx, %rcx addq %rcx, %rax cmpl $0x3, (%rax) jne 0x57a4c jmp 0x57a25 jmp 0x57a27 jmp 0x57a29 movl -0x3c(%rbp), %eax movl %eax, %ecx leaq 0x3e936b(%rip), %rax # 0x440da0 imulq $0x48, %rcx, %rcx addq %rcx, %rax movzwl 0x4(%rax), %eax addl $0x3, %eax movw %ax, -0x2(%rbp) jmp 0x57b5a movq -0x10(%rbp), %rax movzwl -0x12(%rbp), %ecx movslq %ecx, %rcx addq %rcx, %rax addq $0x3, %rax movq %rax, -0x38(%rbp) movl -0x3c(%rbp), %eax movl %eax, %ecx leaq 0x3e9332(%rip), %rax # 0x440da0 imulq $0x48, %rcx, %rcx addq %rcx, %rax movzwl 0x4(%rax), %eax addl $0x3, %eax movl %eax, -0x40(%rbp) movl $0x0, -0x44(%rbp) movl -0x44(%rbp), %eax movl -0x3c(%rbp), %ecx movl %ecx, %edx leaq 0x3e930b(%rip), %rcx # 0x440da0 imulq $0x48, %rdx, %rdx addq %rdx, %rcx movswl 0x20(%rcx), %ecx cmpl %ecx, %eax jge 0x57b01 movq -0x38(%rbp), %rax movzbl (%rax), %eax sarl $0x6, %eax addl $0x2, %eax movl %eax, -0x48(%rbp) movq -0x38(%rbp), %rax movzbl (%rax), %eax cmpl $0x0, %eax jne 0x57ad6 movq -0x38(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x1, %eax jne 0x57ad6 movl -0x48(%rbp), %eax addl $0x7, %eax movl %eax, -0x48(%rbp) movl -0x48(%rbp), %ecx movq -0x38(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x38(%rbp) movl $0x7, %ecx subl -0x48(%rbp), %ecx movl -0x40(%rbp), %eax subl %ecx, %eax movl %eax, -0x40(%rbp) movl -0x44(%rbp), %eax addl $0x1, %eax movl %eax, -0x44(%rbp) jmp 0x57a86 jmp 0x57b03 jmp 0x57b05 jmp 0x57b07 movl -0x40(%rbp), %eax movw %ax, -0x2(%rbp) jmp 0x57b5a jmp 0x57b12 jmp 0x57b14 jmp 0x57b16 movzwl -0x12(%rbp), %ecx movl $0x2000, %eax # imm = 0x2000 subl %ecx, %eax movw %ax, -0x2(%rbp) jmp 0x57b5a jmp 0x57b29 jmp 0x57b2b jmp 0x57b2d jmp 0x57b2f jmp 0x57b31 jmp 0x57b33 jmp 0x57b35 movq -0x10(%rbp), %rax movzwl -0x12(%rbp), %ecx movslq %ecx, %rcx movzwl 0x1(%rax,%rcx), %eax addl $0x3, %eax movw %ax, -0x2(%rbp) jmp 0x57b5a jmp 0x57b50 jmp 0x57b52 jmp 0x57b54 movw $0x0, -0x2(%rbp) movw -0x2(%rbp), %ax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
translog_get_total_chunk_length: push rbp mov rbp, rsp sub rsp, 50h mov ax, si mov [rbp+var_10], rdi mov [rbp+var_12], ax mov rax, [rbp+var_10] movzx ecx, [rbp+var_12] movzx eax, byte ptr [rax+rcx] and eax, 0C0h mov [rbp+var_4C], eax jz short loc_5793C jmp short $+2 loc_5790B: mov eax, [rbp+var_4C] sub eax, 40h ; '@' jz loc_579F3 jmp short $+2 loc_57919: mov eax, [rbp+var_4C] sub eax, 80h jz loc_57B10 jmp short $+2 loc_57929: mov eax, [rbp+var_4C] sub eax, 0C0h jz loc_57B27 jmp loc_57B4E loc_5793C: mov rax, [rbp+var_10] movzx ecx, [rbp+var_12] movsxd rcx, ecx add rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_20] add rax, 1 add rax, 2 mov [rbp+var_28], rax jmp short $+2 loc_57960: lea rdi, [rbp+var_28] call translog_variable_record_1group_decode_len mov [rbp+var_18], eax mov rax, [rbp+var_28] mov ax, [rax] mov [rbp+var_2A], ax mov rax, [rbp+var_28] mov rcx, [rbp+var_20] sub rax, rcx movzx eax, ax add eax, 2 mov [rbp+var_2C], ax jmp short $+2 loc_5798E: cmp [rbp+var_2A], 0 jz short loc_579AE jmp short $+2 loc_57997: jmp short $+2 loc_57999: jmp short $+2 loc_5799B: movzx eax, [rbp+var_2A] movzx ecx, [rbp+var_2C] add eax, ecx mov [rbp+var_2], ax jmp loc_57B5A loc_579AE: movzx ecx, [rbp+var_12] mov eax, 2000h sub eax, ecx mov [rbp+var_2E], ax jmp short $+2 loc_579BF: mov eax, [rbp+var_18] movzx ecx, [rbp+var_2C] add eax, ecx movzx ecx, [rbp+var_2E] cmp eax, ecx jnb short loc_579E4 jmp short $+2 loc_579D2: mov eax, [rbp+var_18] movzx ecx, [rbp+var_2C] add eax, ecx mov [rbp+var_2], ax jmp loc_57B5A loc_579E4: jmp short $+2 loc_579E6: mov ax, [rbp+var_2E] mov [rbp+var_2], ax jmp loc_57B5A loc_579F3: mov rax, [rbp+var_10] movzx ecx, [rbp+var_12] movzx eax, byte ptr [rax+rcx] and eax, 3Fh mov [rbp+var_3C], eax jmp short $+2 loc_57A07: jmp short $+2 loc_57A09: jmp short $+2 loc_57A0B: mov eax, [rbp+var_3C] mov ecx, eax lea rax, log_record_type_descriptor imul rcx, 48h ; 'H' add rax, rcx cmp dword ptr [rax], 3 jnz short loc_57A4C jmp short $+2 loc_57A25: jmp short $+2 loc_57A27: jmp short $+2 loc_57A29: mov eax, [rbp+var_3C] mov ecx, eax lea rax, log_record_type_descriptor imul rcx, 48h ; 'H' add rax, rcx movzx eax, word ptr [rax+4] add eax, 3 mov [rbp+var_2], ax jmp loc_57B5A loc_57A4C: mov rax, [rbp+var_10] movzx ecx, [rbp+var_12] movsxd rcx, ecx add rax, rcx add rax, 3 mov [rbp+var_38], rax mov eax, [rbp+var_3C] mov ecx, eax lea rax, log_record_type_descriptor imul rcx, 48h ; 'H' add rax, rcx movzx eax, word ptr [rax+4] add eax, 3 mov [rbp+var_40], eax mov [rbp+var_44], 0 loc_57A86: mov eax, [rbp+var_44] mov ecx, [rbp+var_3C] mov edx, ecx lea rcx, log_record_type_descriptor imul rdx, 48h ; 'H' add rcx, rdx movsx ecx, word ptr [rcx+20h] cmp eax, ecx jge short loc_57B01 mov rax, [rbp+var_38] movzx eax, byte ptr [rax] sar eax, 6 add eax, 2 mov [rbp+var_48], eax mov rax, [rbp+var_38] movzx eax, byte ptr [rax] cmp eax, 0 jnz short loc_57AD6 mov rax, [rbp+var_38] movzx eax, byte ptr [rax+1] cmp eax, 1 jnz short loc_57AD6 mov eax, [rbp+var_48] add eax, 7 mov [rbp+var_48], eax loc_57AD6: mov ecx, [rbp+var_48] mov rax, [rbp+var_38] mov ecx, ecx add rax, rcx mov [rbp+var_38], rax mov ecx, 7 sub ecx, [rbp+var_48] mov eax, [rbp+var_40] sub eax, ecx mov [rbp+var_40], eax mov eax, [rbp+var_44] add eax, 1 mov [rbp+var_44], eax jmp short loc_57A86 loc_57B01: jmp short $+2 loc_57B03: jmp short $+2 loc_57B05: jmp short $+2 loc_57B07: mov eax, [rbp+var_40] mov [rbp+var_2], ax jmp short loc_57B5A loc_57B10: jmp short $+2 loc_57B12: jmp short $+2 loc_57B14: jmp short $+2 loc_57B16: movzx ecx, [rbp+var_12] mov eax, 2000h sub eax, ecx mov [rbp+var_2], ax jmp short loc_57B5A loc_57B27: jmp short $+2 loc_57B29: jmp short $+2 loc_57B2B: jmp short $+2 loc_57B2D: jmp short $+2 loc_57B2F: jmp short $+2 loc_57B31: jmp short $+2 loc_57B33: jmp short $+2 loc_57B35: mov rax, [rbp+var_10] movzx ecx, [rbp+var_12] movsxd rcx, ecx movzx eax, word ptr [rax+rcx+1] add eax, 3 mov [rbp+var_2], ax jmp short loc_57B5A loc_57B4E: jmp short $+2 loc_57B50: jmp short $+2 loc_57B52: jmp short $+2 loc_57B54: mov [rbp+var_2], 0 loc_57B5A: mov ax, [rbp+var_2] add rsp, 50h pop rbp retn
__int16 translog_get_total_chunk_length(long long a1, unsigned __int16 a2) { int v3; // [rsp+4h] [rbp-4Ch] unsigned int v4; // [rsp+8h] [rbp-48h] int i; // [rsp+Ch] [rbp-44h] __int16 v6; // [rsp+10h] [rbp-40h] unsigned __int8 *v7; // [rsp+18h] [rbp-38h] unsigned __int16 v8; // [rsp+24h] [rbp-2Ch] _WORD *v9; // [rsp+28h] [rbp-28h] BYREF long long v10; // [rsp+30h] [rbp-20h] int v11; // [rsp+38h] [rbp-18h] unsigned __int16 v12; // [rsp+3Eh] [rbp-12h] long long v13; // [rsp+40h] [rbp-10h] v13 = a1; v12 = a2; v3 = *(_BYTE *)(a1 + a2) & 0xC0; if ( (*(_BYTE *)(a1 + a2) & 0xC0) != 0 ) { switch ( v3 ) { case 64: if ( log_record_type_descriptor[18 * (*(_BYTE *)(v13 + v12) & 0x3F)] == 3 ) { return LOWORD(log_record_type_descriptor[18 * (*(_BYTE *)(v13 + v12) & 0x3F) + 1]) + 3; } else { v7 = (unsigned __int8 *)(v12 + v13 + 3); v6 = LOWORD(log_record_type_descriptor[18 * (*(_BYTE *)(v13 + v12) & 0x3F) + 1]) + 3; for ( i = 0; i < SLOWORD(log_record_type_descriptor[18 * (*(_BYTE *)(v13 + v12) & 0x3F) + 8]); ++i ) { v4 = ((int)*v7 >> 6) + 2; if ( !*v7 && v7[1] == 1 ) v4 = ((int)*v7 >> 6) + 9; v7 += v4; v6 -= 7 - v4; } return v6; } case 128: return 0x2000 - v12; case 192: return *(_WORD *)(v13 + v12 + 1) + 3; default: return 0; } } else { v10 = v12 + v13; v9 = (_WORD *)(v10 + 3); v11 = translog_variable_record_1group_decode_len(&v9); v8 = (_WORD)v9 - v10 + 2; if ( *v9 ) { return v8 + *v9; } else if ( (unsigned int)v8 + v11 >= (unsigned __int16)(0x2000 - v12) ) { return 0x2000 - v12; } else { return v8 + v11; } } }
translog_get_total_chunk_length: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV AX,SI MOV qword ptr [RBP + -0x10],RDI MOV word ptr [RBP + -0x12],AX MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RBP + -0x12] MOVZX EAX,byte ptr [RAX + RCX*0x1] AND EAX,0xc0 MOV dword ptr [RBP + -0x4c],EAX JZ 0x0015793c JMP 0x0015790b LAB_0015790b: MOV EAX,dword ptr [RBP + -0x4c] SUB EAX,0x40 JZ 0x001579f3 JMP 0x00157919 LAB_00157919: MOV EAX,dword ptr [RBP + -0x4c] SUB EAX,0x80 JZ 0x00157b10 JMP 0x00157929 LAB_00157929: MOV EAX,dword ptr [RBP + -0x4c] SUB EAX,0xc0 JZ 0x00157b27 JMP 0x00157b4e LAB_0015793c: MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RBP + -0x12] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 ADD RAX,0x2 MOV qword ptr [RBP + -0x28],RAX JMP 0x00157960 LAB_00157960: LEA RDI,[RBP + -0x28] CALL 0x0015e150 MOV dword ptr [RBP + -0x18],EAX MOV RAX,qword ptr [RBP + -0x28] MOV AX,word ptr [RAX] MOV word ptr [RBP + -0x2a],AX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x20] SUB RAX,RCX MOVZX EAX,AX ADD EAX,0x2 MOV word ptr [RBP + -0x2c],AX JMP 0x0015798e LAB_0015798e: CMP word ptr [RBP + -0x2a],0x0 JZ 0x001579ae JMP 0x00157997 LAB_00157997: JMP 0x00157999 LAB_00157999: JMP 0x0015799b LAB_0015799b: MOVZX EAX,word ptr [RBP + -0x2a] MOVZX ECX,word ptr [RBP + -0x2c] ADD EAX,ECX MOV word ptr [RBP + -0x2],AX JMP 0x00157b5a LAB_001579ae: MOVZX ECX,word ptr [RBP + -0x12] MOV EAX,0x2000 SUB EAX,ECX MOV word ptr [RBP + -0x2e],AX JMP 0x001579bf LAB_001579bf: MOV EAX,dword ptr [RBP + -0x18] MOVZX ECX,word ptr [RBP + -0x2c] ADD EAX,ECX MOVZX ECX,word ptr [RBP + -0x2e] CMP EAX,ECX JNC 0x001579e4 JMP 0x001579d2 LAB_001579d2: MOV EAX,dword ptr [RBP + -0x18] MOVZX ECX,word ptr [RBP + -0x2c] ADD EAX,ECX MOV word ptr [RBP + -0x2],AX JMP 0x00157b5a LAB_001579e4: JMP 0x001579e6 LAB_001579e6: MOV AX,word ptr [RBP + -0x2e] MOV word ptr [RBP + -0x2],AX JMP 0x00157b5a LAB_001579f3: MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RBP + -0x12] MOVZX EAX,byte ptr [RAX + RCX*0x1] AND EAX,0x3f MOV dword ptr [RBP + -0x3c],EAX JMP 0x00157a07 LAB_00157a07: JMP 0x00157a09 LAB_00157a09: JMP 0x00157a0b LAB_00157a0b: MOV EAX,dword ptr [RBP + -0x3c] MOV ECX,EAX LEA RAX,[0x540da0] IMUL RCX,RCX,0x48 ADD RAX,RCX CMP dword ptr [RAX],0x3 JNZ 0x00157a4c JMP 0x00157a25 LAB_00157a25: JMP 0x00157a27 LAB_00157a27: JMP 0x00157a29 LAB_00157a29: MOV EAX,dword ptr [RBP + -0x3c] MOV ECX,EAX LEA RAX,[0x540da0] IMUL RCX,RCX,0x48 ADD RAX,RCX MOVZX EAX,word ptr [RAX + 0x4] ADD EAX,0x3 MOV word ptr [RBP + -0x2],AX JMP 0x00157b5a LAB_00157a4c: MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RBP + -0x12] MOVSXD RCX,ECX ADD RAX,RCX ADD RAX,0x3 MOV qword ptr [RBP + -0x38],RAX MOV EAX,dword ptr [RBP + -0x3c] MOV ECX,EAX LEA RAX,[0x540da0] IMUL RCX,RCX,0x48 ADD RAX,RCX MOVZX EAX,word ptr [RAX + 0x4] ADD EAX,0x3 MOV dword ptr [RBP + -0x40],EAX MOV dword ptr [RBP + -0x44],0x0 LAB_00157a86: MOV EAX,dword ptr [RBP + -0x44] MOV ECX,dword ptr [RBP + -0x3c] MOV EDX,ECX LEA RCX,[0x540da0] IMUL RDX,RDX,0x48 ADD RCX,RDX MOVSX ECX,word ptr [RCX + 0x20] CMP EAX,ECX JGE 0x00157b01 MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,byte ptr [RAX] SAR EAX,0x6 ADD EAX,0x2 MOV dword ptr [RBP + -0x48],EAX MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,byte ptr [RAX] CMP EAX,0x0 JNZ 0x00157ad6 MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x1 JNZ 0x00157ad6 MOV EAX,dword ptr [RBP + -0x48] ADD EAX,0x7 MOV dword ptr [RBP + -0x48],EAX LAB_00157ad6: MOV ECX,dword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x38] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV ECX,0x7 SUB ECX,dword ptr [RBP + -0x48] MOV EAX,dword ptr [RBP + -0x40] SUB EAX,ECX MOV dword ptr [RBP + -0x40],EAX MOV EAX,dword ptr [RBP + -0x44] ADD EAX,0x1 MOV dword ptr [RBP + -0x44],EAX JMP 0x00157a86 LAB_00157b01: JMP 0x00157b03 LAB_00157b03: JMP 0x00157b05 LAB_00157b05: JMP 0x00157b07 LAB_00157b07: MOV EAX,dword ptr [RBP + -0x40] MOV word ptr [RBP + -0x2],AX JMP 0x00157b5a LAB_00157b10: JMP 0x00157b12 LAB_00157b12: JMP 0x00157b14 LAB_00157b14: JMP 0x00157b16 LAB_00157b16: MOVZX ECX,word ptr [RBP + -0x12] MOV EAX,0x2000 SUB EAX,ECX MOV word ptr [RBP + -0x2],AX JMP 0x00157b5a LAB_00157b27: JMP 0x00157b29 LAB_00157b29: JMP 0x00157b2b LAB_00157b2b: JMP 0x00157b2d LAB_00157b2d: JMP 0x00157b2f LAB_00157b2f: JMP 0x00157b31 LAB_00157b31: JMP 0x00157b33 LAB_00157b33: JMP 0x00157b35 LAB_00157b35: MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RBP + -0x12] MOVSXD RCX,ECX MOVZX EAX,word ptr [RAX + RCX*0x1 + 0x1] ADD EAX,0x3 MOV word ptr [RBP + -0x2],AX JMP 0x00157b5a LAB_00157b4e: JMP 0x00157b50 LAB_00157b50: JMP 0x00157b52 LAB_00157b52: JMP 0x00157b54 LAB_00157b54: MOV word ptr [RBP + -0x2],0x0 LAB_00157b5a: MOV AX,word ptr [RBP + -0x2] ADD RSP,0x50 POP RBP RET
int8 translog_get_total_chunk_length(long param_1,ushort param_2) { ushort uVar1; uint uVar2; int iVar3; ulong uVar4; uint local_50; int local_4c; uint local_48; byte *local_40; ushort *local_30; long local_28; ushort local_1a; long local_18; ushort local_a; uVar2 = *(byte *)(param_1 + (ulong)param_2) & 0xc0; if ((*(byte *)(param_1 + (ulong)param_2) & 0xc0) == 0) { local_28 = param_1 + (int)(uint)param_2; local_30 = (ushort *)(local_28 + 3); local_1a = param_2; local_18 = param_1; iVar3 = translog_variable_record_1group_decode_len(&local_30); uVar1 = ((short)local_30 - (short)local_28) + 2; if (*local_30 == 0) { local_a = 0x2000 - local_1a; if (iVar3 + (uint)uVar1 < (uint)local_a) { uVar4 = (ulong)(iVar3 + (uint)uVar1); local_a = (ushort)(iVar3 + (uint)uVar1); } else { uVar4 = (ulong)CONCAT22((short)(iVar3 + (uint)uVar1 >> 0x10),local_a); } } else { uVar2 = (uint)*local_30 + (uint)uVar1; uVar4 = (ulong)uVar2; local_a = (ushort)uVar2; } } else if (uVar2 == 0x40) { uVar2 = *(byte *)(param_1 + (ulong)param_2) & 0x3f; if (*(int *)(log_record_type_descriptor + (ulong)uVar2 * 0x48) == 3) { uVar4 = (ulong)(*(ushort *)(log_record_type_descriptor + (ulong)uVar2 * 0x48 + 4) + 3); local_a = (ushort)(*(ushort *)(log_record_type_descriptor + (ulong)uVar2 * 0x48 + 4) + 3); } else { local_40 = (byte *)(param_1 + (int)(uint)param_2 + 3); local_48 = *(ushort *)(log_record_type_descriptor + (ulong)uVar2 * 0x48 + 4) + 3; for (local_4c = 0; local_4c < *(short *)(log_record_type_descriptor + (ulong)uVar2 * 0x48 + 0x20); local_4c = local_4c + 1) { local_50 = ((int)(uint)*local_40 >> 6) + 2; if ((*local_40 == 0) && (local_40[1] == 1)) { local_50 = ((int)(uint)*local_40 >> 6) + 9; } local_40 = local_40 + local_50; local_48 = local_48 - (7 - local_50); } uVar4 = (ulong)local_48; local_a = (ushort)local_48; } } else if (uVar2 == 0x80) { uVar4 = (ulong)(0x2000 - param_2); local_a = (ushort)(0x2000 - param_2); } else { uVar4 = (ulong)(uVar2 - 0xc0); if (uVar2 - 0xc0 == 0) { uVar2 = *(ushort *)(param_1 + 1 + (long)(int)(uint)param_2) + 3; uVar4 = (ulong)uVar2; local_a = (ushort)uVar2; } else { local_a = 0; } } return CONCAT62((int6)(uVar4 >> 0x10),local_a); }
35,010
my_uca_scanner_init_any
eloqsql/strings/ctype-uca.c
static void my_uca_scanner_init_any(my_uca_scanner *scanner, CHARSET_INFO *cs, const MY_UCA_WEIGHT_LEVEL *level, const uchar *str, size_t length) { /* Note, no needs to initialize scanner->wbeg */ scanner->sbeg= str; scanner->send= str + length; scanner->wbeg= nochar; scanner->level= level; scanner->cs= cs; }
O0
c
my_uca_scanner_init_any: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x20(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x20(%rbp), %rcx addq -0x28(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x8(%rbp), %rax leaq 0x164571(%rip), %rcx # 0x21f6f0 movq %rcx, (%rax) movq -0x18(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x30(%rax) popq %rbp retq nopl (%rax)
my_uca_scanner_init_any: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rcx, [rbp+var_20] mov rax, [rbp+var_8] mov [rax+8], rcx mov rcx, [rbp+var_20] add rcx, [rbp+var_28] mov rax, [rbp+var_8] mov [rax+10h], rcx mov rax, [rbp+var_8] lea rcx, nochar mov [rax], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_8] mov [rax+18h], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax+30h], rcx pop rbp retn
_QWORD * my_uca_scanner_init_any(_QWORD *a1, long long a2, long long a3, long long a4, long long a5) { _QWORD *result; // rax a1[1] = a4; a1[2] = a5 + a4; *a1 = &nochar; a1[3] = a3; result = a1; a1[6] = a2; return result; }
my_uca_scanner_init_any: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x20] ADD RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x31f6f0] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x18],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x30],RCX POP RBP RET
void my_uca_scanner_init_any (int8 *param_1,int8 param_2,int8 param_3,long param_4,long param_5) { param_1[1] = param_4; param_1[2] = param_4 + param_5; *param_1 = &nochar; param_1[3] = param_3; param_1[6] = param_2; return; }
35,011
ma_ft_segiterator
eloqsql/storage/maria/ma_ft_update.c
uint _ma_ft_segiterator(register FT_SEG_ITERATOR *ftsi) { DBUG_ENTER("_ma_ft_segiterator"); if (!ftsi->num) DBUG_RETURN(0); ftsi->num--; if (!ftsi->seg) DBUG_RETURN(1); ftsi->seg--; if (ftsi->seg->null_bit && (ftsi->rec[ftsi->seg->null_pos] & ftsi->seg->null_bit)) { ftsi->pos=0; DBUG_RETURN(1); } ftsi->pos= ftsi->rec+ftsi->seg->start; if (ftsi->seg->flag & HA_VAR_LENGTH_PART) { uint pack_length= (ftsi->seg->bit_start); ftsi->len= (pack_length == 1 ? (uint) * ftsi->pos : uint2korr(ftsi->pos)); ftsi->pos+= pack_length; /* Skip VARCHAR length */ DBUG_RETURN(1); } if (ftsi->seg->flag & HA_BLOB_PART) { ftsi->len= _ma_calc_blob_length(ftsi->seg->bit_start,ftsi->pos); memcpy((char**) &ftsi->pos, ftsi->pos+ftsi->seg->bit_start, sizeof(char*)); DBUG_RETURN(1); } ftsi->len=ftsi->seg->length; DBUG_RETURN(1); }
O0
c
ma_ft_segiterator: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, (%rax) jne 0x8c583 jmp 0x8c577 movl $0x0, -0x4(%rbp) jmp 0x8c712 movq -0x10(%rbp), %rax movl (%rax), %ecx addl $-0x1, %ecx movl %ecx, (%rax) movq -0x10(%rbp), %rax cmpq $0x0, 0x8(%rax) jne 0x8c5a7 jmp 0x8c59b movl $0x1, -0x4(%rbp) jmp 0x8c712 movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx addq $-0x20, %rcx movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movzbl 0x19(%rax), %eax cmpl $0x0, %eax je 0x8c60a movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq -0x10(%rbp), %rcx movq 0x8(%rcx), %rcx movl 0xc(%rcx), %ecx movzbl (%rax,%rcx), %eax movq -0x10(%rbp), %rcx movq 0x8(%rcx), %rcx movzbl 0x19(%rcx), %ecx andl %ecx, %eax cmpl $0x0, %eax je 0x8c60a movq -0x10(%rbp), %rax movq $0x0, 0x18(%rax) movl $0x1, -0x4(%rbp) jmp 0x8c712 movq -0x10(%rbp), %rax movq 0x10(%rax), %rcx movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movl 0x8(%rax), %eax addq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movzwl 0x12(%rax), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x8c696 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movzbl 0x1a(%rax), %eax movl %eax, -0x14(%rbp) cmpl $0x1, -0x14(%rbp) jne 0x8c661 movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movzbl (%rax), %eax movl %eax, -0x18(%rbp) jmp 0x8c66f movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movzwl (%rax), %eax movl %eax, -0x18(%rbp) movl -0x18(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x4(%rax) movl -0x14(%rbp), %edx movq -0x10(%rbp), %rax movq 0x18(%rax), %rcx movl %edx, %edx addq %rdx, %rcx movq %rcx, 0x18(%rax) movl $0x1, -0x4(%rbp) jmp 0x8c712 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movzwl 0x12(%rax), %eax andl $0x20, %eax cmpl $0x0, %eax je 0x8c6f8 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movzbl 0x1a(%rax), %edi movq -0x10(%rbp), %rax movq 0x18(%rax), %rsi callq 0x3f540 movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x4(%rax) movq -0x10(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x18(%rcx), %rcx movq -0x10(%rbp), %rdx movq 0x8(%rdx), %rdx movzbl 0x1a(%rdx), %edx movslq %edx, %rdx movq (%rcx,%rdx), %rcx movq %rcx, 0x18(%rax) movl $0x1, -0x4(%rbp) jmp 0x8c712 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movzwl 0x14(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x4(%rax) movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
_ma_ft_segiterator: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rax, [rbp+var_10] cmp dword ptr [rax], 0 jnz short loc_8C583 jmp short $+2 loc_8C577: mov [rbp+var_4], 0 jmp loc_8C712 loc_8C583: mov rax, [rbp+var_10] mov ecx, [rax] add ecx, 0FFFFFFFFh mov [rax], ecx mov rax, [rbp+var_10] cmp qword ptr [rax+8], 0 jnz short loc_8C5A7 jmp short $+2 loc_8C59B: mov [rbp+var_4], 1 jmp loc_8C712 loc_8C5A7: mov rax, [rbp+var_10] mov rcx, [rax+8] add rcx, 0FFFFFFFFFFFFFFE0h mov [rax+8], rcx mov rax, [rbp+var_10] mov rax, [rax+8] movzx eax, byte ptr [rax+19h] cmp eax, 0 jz short loc_8C60A mov rax, [rbp+var_10] mov rax, [rax+10h] mov rcx, [rbp+var_10] mov rcx, [rcx+8] mov ecx, [rcx+0Ch] movzx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_10] mov rcx, [rcx+8] movzx ecx, byte ptr [rcx+19h] and eax, ecx cmp eax, 0 jz short loc_8C60A mov rax, [rbp+var_10] mov qword ptr [rax+18h], 0 mov [rbp+var_4], 1 jmp loc_8C712 loc_8C60A: mov rax, [rbp+var_10] mov rcx, [rax+10h] mov rax, [rbp+var_10] mov rax, [rax+8] mov eax, [rax+8] add rcx, rax mov rax, [rbp+var_10] mov [rax+18h], rcx mov rax, [rbp+var_10] mov rax, [rax+8] movzx eax, word ptr [rax+12h] and eax, 8 cmp eax, 0 jz short loc_8C696 mov rax, [rbp+var_10] mov rax, [rax+8] movzx eax, byte ptr [rax+1Ah] mov [rbp+var_14], eax cmp [rbp+var_14], 1 jnz short loc_8C661 mov rax, [rbp+var_10] mov rax, [rax+18h] movzx eax, byte ptr [rax] mov [rbp+var_18], eax jmp short loc_8C66F loc_8C661: mov rax, [rbp+var_10] mov rax, [rax+18h] movzx eax, word ptr [rax] mov [rbp+var_18], eax loc_8C66F: mov ecx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax+4], ecx mov edx, [rbp+var_14] mov rax, [rbp+var_10] mov rcx, [rax+18h] mov edx, edx add rcx, rdx mov [rax+18h], rcx mov [rbp+var_4], 1 jmp short loc_8C712 loc_8C696: mov rax, [rbp+var_10] mov rax, [rax+8] movzx eax, word ptr [rax+12h] and eax, 20h cmp eax, 0 jz short loc_8C6F8 mov rax, [rbp+var_10] mov rax, [rax+8] movzx edi, byte ptr [rax+1Ah] mov rax, [rbp+var_10] mov rsi, [rax+18h] call _ma_calc_blob_length mov ecx, eax mov rax, [rbp+var_10] mov [rax+4], ecx mov rax, [rbp+var_10] mov rcx, [rbp+var_10] mov rcx, [rcx+18h] mov rdx, [rbp+var_10] mov rdx, [rdx+8] movzx edx, byte ptr [rdx+1Ah] movsxd rdx, edx mov rcx, [rcx+rdx] mov [rax+18h], rcx mov [rbp+var_4], 1 jmp short loc_8C712 loc_8C6F8: mov rax, [rbp+var_10] mov rax, [rax+8] movzx ecx, word ptr [rax+14h] mov rax, [rbp+var_10] mov [rax+4], ecx mov [rbp+var_4], 1 loc_8C712: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long ma_ft_segiterator(long long a1) { int v2; // [rsp+8h] [rbp-18h] unsigned int v3; // [rsp+Ch] [rbp-14h] if ( *(_DWORD *)a1 ) { --*(_DWORD *)a1; if ( *(_QWORD *)(a1 + 8) ) { *(_QWORD *)(a1 + 8) -= 32LL; if ( *(_BYTE *)(*(_QWORD *)(a1 + 8) + 25LL) && (*(_BYTE *)(*(_QWORD *)(a1 + 8) + 25LL) & *(_BYTE *)(*(_QWORD *)(a1 + 16) + *(unsigned int *)(*(_QWORD *)(a1 + 8) + 12LL))) != 0 ) { *(_QWORD *)(a1 + 24) = 0LL; return 1; } else { *(_QWORD *)(a1 + 24) = *(unsigned int *)(*(_QWORD *)(a1 + 8) + 8LL) + *(_QWORD *)(a1 + 16); if ( (*(_WORD *)(*(_QWORD *)(a1 + 8) + 18LL) & 8) != 0 ) { v3 = *(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + 26LL); if ( v3 == 1 ) v2 = **(unsigned __int8 **)(a1 + 24); else v2 = **(unsigned __int16 **)(a1 + 24); *(_DWORD *)(a1 + 4) = v2; *(_QWORD *)(a1 + 24) += v3; return 1; } else { if ( (*(_WORD *)(*(_QWORD *)(a1 + 8) + 18LL) & 0x20) != 0 ) { *(_DWORD *)(a1 + 4) = ma_calc_blob_length( *(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + 26LL), *(unsigned __int8 **)(a1 + 24)); *(_QWORD *)(a1 + 24) = *(_QWORD *)(*(_QWORD *)(a1 + 24) + *(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + 26LL)); } else { *(_DWORD *)(a1 + 4) = *(unsigned __int16 *)(*(_QWORD *)(a1 + 8) + 20LL); } return 1; } } } else { return 1; } } else { return 0; } }
_ma_ft_segiterator: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX],0x0 JNZ 0x0018c583 JMP 0x0018c577 LAB_0018c577: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0018c712 LAB_0018c583: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX] ADD ECX,-0x1 MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x8],0x0 JNZ 0x0018c5a7 JMP 0x0018c59b LAB_0018c59b: MOV dword ptr [RBP + -0x4],0x1 JMP 0x0018c712 LAB_0018c5a7: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] ADD RCX,-0x20 MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOVZX EAX,byte ptr [RAX + 0x19] CMP EAX,0x0 JZ 0x0018c60a MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x8] MOV ECX,dword ptr [RCX + 0xc] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x8] MOVZX ECX,byte ptr [RCX + 0x19] AND EAX,ECX CMP EAX,0x0 JZ 0x0018c60a MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],0x0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0018c712 LAB_0018c60a: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV EAX,dword ptr [RAX + 0x8] ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x8 CMP EAX,0x0 JZ 0x0018c696 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOVZX EAX,byte ptr [RAX + 0x1a] MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x1 JNZ 0x0018c661 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x18],EAX JMP 0x0018c66f LAB_0018c661: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOVZX EAX,word ptr [RAX] MOV dword ptr [RBP + -0x18],EAX LAB_0018c66f: MOV ECX,dword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],ECX MOV EDX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x18] MOV EDX,EDX ADD RCX,RDX MOV qword ptr [RAX + 0x18],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x0018c712 LAB_0018c696: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x20 CMP EAX,0x0 JZ 0x0018c6f8 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOVZX EDI,byte ptr [RAX + 0x1a] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x18] CALL 0x0013f540 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x18] MOV RDX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RDX + 0x8] MOVZX EDX,byte ptr [RDX + 0x1a] MOVSXD RDX,EDX MOV RCX,qword ptr [RCX + RDX*0x1] MOV qword ptr [RAX + 0x18],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x0018c712 LAB_0018c6f8: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOVZX ECX,word ptr [RAX + 0x14] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],ECX MOV dword ptr [RBP + -0x4],0x1 LAB_0018c712: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 _ma_ft_segiterator(int *param_1) { byte bVar1; int iVar2; uint local_20; int4 local_c; if (*param_1 == 0) { local_c = 0; } else { *param_1 = *param_1 + -1; if (*(long *)(param_1 + 2) == 0) { local_c = 1; } else { *(long *)(param_1 + 2) = *(long *)(param_1 + 2) + -0x20; if ((*(char *)(*(long *)(param_1 + 2) + 0x19) == '\0') || ((*(byte *)(*(long *)(param_1 + 4) + (ulong)*(uint *)(*(long *)(param_1 + 2) + 0xc)) & *(byte *)(*(long *)(param_1 + 2) + 0x19)) == 0)) { *(ulong *)(param_1 + 6) = *(long *)(param_1 + 4) + (ulong)*(uint *)(*(long *)(param_1 + 2) + 8); if ((*(ushort *)(*(long *)(param_1 + 2) + 0x12) & 8) == 0) { if ((*(ushort *)(*(long *)(param_1 + 2) + 0x12) & 0x20) == 0) { param_1[1] = (uint)*(ushort *)(*(long *)(param_1 + 2) + 0x14); local_c = 1; } else { iVar2 = _ma_calc_blob_length (*(int1 *)(*(long *)(param_1 + 2) + 0x1a), *(int8 *)(param_1 + 6)); param_1[1] = iVar2; *(int8 *)(param_1 + 6) = *(int8 *) (*(long *)(param_1 + 6) + (long)(int)(uint)*(byte *)(*(long *)(param_1 + 2) + 0x1a)); local_c = 1; } } else { bVar1 = *(byte *)(*(long *)(param_1 + 2) + 0x1a); if (bVar1 == 1) { local_20 = (uint)**(byte **)(param_1 + 6); } else { local_20 = (uint)**(ushort **)(param_1 + 6); } param_1[1] = local_20; *(ulong *)(param_1 + 6) = *(long *)(param_1 + 6) + (ulong)(uint)bVar1; local_c = 1; } } else { param_1[6] = 0; param_1[7] = 0; local_c = 1; } } } return local_c; }
35,012
my_fill_utf8mb3
eloqsql/strings/ctype-utf8.c
static void my_fill_utf8mb3(CHARSET_INFO *cs, char *str, size_t length, int fill) { if (fill < 0x80) my_fill_8bit(cs, str, length, fill); else my_fill_utf8mb3_mb(cs, str, length, fill); }
O3
c
my_fill_utf8mb3: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r15 movq %rsi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) cmpl $0x7f, %ecx jg 0xcbddd movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0xcbe61 movq %rbx, %rsi movq %r15, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xb5ea3 leaq (%rbx,%r15), %r14 movq 0xb8(%rdi), %rax movl %ecx, %esi leaq -0x30(%rbp), %rcx leaq -0x3a(%rbp), %rdx callq *0xd8(%rax) movsbq %al, %r12 cmpq %r15, %r12 jle 0xcbe06 movq %rbx, %r13 jmp 0xcbe2b movsbq %al, %r15 movq %rbx, %r13 movq %rbx, %rdi leaq -0x3a(%rbp), %rsi movq %r15, %rdx callq 0x29080 addq %r12, %rbx addq %r12, %r13 leaq (%rbx,%r12), %rax cmpq %r14, %rax jbe 0xcbe0d cmpq %r14, %rbx jae 0xcbe43 subq %r13, %r14 movq %rbx, %rdi movl $0x20, %esi movq %r14, %rdx callq 0x292c0 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0xcbe61 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29270
my_fill_utf8mb3: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15, rdx mov rbx, rsi mov rax, fs:28h mov [rbp+var_30], rax cmp ecx, 7Fh jg short loc_CBDDD mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_CBE61 mov rsi, rbx mov rdx, r15 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp my_fill_8bit loc_CBDDD: lea r14, [rbx+r15] mov rax, [rdi+0B8h] mov esi, ecx lea rcx, [rbp+var_30] lea rdx, [rbp+var_3A] call qword ptr [rax+0D8h] movsx r12, al cmp r12, r15 jle short loc_CBE06 mov r13, rbx jmp short loc_CBE2B loc_CBE06: movsx r15, al mov r13, rbx loc_CBE0D: mov rdi, rbx lea rsi, [rbp+var_3A] mov rdx, r15 call _memcpy add rbx, r12 add r13, r12 lea rax, [rbx+r12] cmp rax, r14 jbe short loc_CBE0D loc_CBE2B: cmp rbx, r14 jnb short loc_CBE43 sub r14, r13 mov rdi, rbx mov esi, 20h ; ' ' mov rdx, r14 call _memset loc_CBE43: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_CBE61 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_CBE61: call ___stack_chk_fail
long long my_fill_utf8mb3(long long a1, long long a2, long long a3, signed int a4) { unsigned long long v5; // rbx unsigned long long v7; // r14 char v8; // al long long v9; // r12 long long v10; // r13 long long v11; // r15 _BYTE v12[10]; // [rsp+6h] [rbp-3Ah] BYREF unsigned long long v13[6]; // [rsp+10h] [rbp-30h] BYREF v5 = a2; v13[0] = __readfsqword(0x28u); if ( a4 <= 127 ) return my_fill_8bit(a1, a2, a3, a4); v7 = a2 + a3; v8 = (*(long long ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 216LL))( a1, (unsigned int)a4, v12, v13); v9 = v8; if ( v8 <= a3 ) { v11 = v8; v10 = a2; do { memcpy(v5, v12, v11); v5 += v9; v10 += v9; } while ( v5 + v9 <= v7 ); } else { v10 = a2; } if ( v5 < v7 ) memset(v5, 32LL, v7 - v10); return __readfsqword(0x28u); }
my_fill_utf8mb3: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15,RDX MOV RBX,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX CMP ECX,0x7f JG 0x001cbddd MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001cbe61 MOV RSI,RBX MOV RDX,R15 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001b5ea3 LAB_001cbddd: LEA R14,[RBX + R15*0x1] MOV RAX,qword ptr [RDI + 0xb8] MOV ESI,ECX LEA RCX,[RBP + -0x30] LEA RDX,[RBP + -0x3a] CALL qword ptr [RAX + 0xd8] MOVSX R12,AL CMP R12,R15 JLE 0x001cbe06 MOV R13,RBX JMP 0x001cbe2b LAB_001cbe06: MOVSX R15,AL MOV R13,RBX LAB_001cbe0d: MOV RDI,RBX LEA RSI,[RBP + -0x3a] MOV RDX,R15 CALL 0x00129080 ADD RBX,R12 ADD R13,R12 LEA RAX,[RBX + R12*0x1] CMP RAX,R14 JBE 0x001cbe0d LAB_001cbe2b: CMP RBX,R14 JNC 0x001cbe43 SUB R14,R13 MOV RDI,RBX MOV ESI,0x20 MOV RDX,R14 CALL 0x001292c0 LAB_001cbe43: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001cbe61 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001cbe61: CALL 0x00129270
void my_fill_utf8mb3(long param_1,void *param_2,long param_3,int param_4) { void *pvVar1; char cVar2; long lVar3; void *pvVar4; long in_FS_OFFSET; int1 local_42 [10]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); if (param_4 < 0x80) { if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { my_fill_8bit(param_1,param_2,param_3); return; } } else { pvVar1 = (void *)((long)param_2 + param_3); cVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xd8))(param_1,param_4,local_42,&local_38); lVar3 = (long)cVar2; pvVar4 = param_2; if (lVar3 <= param_3) { do { memcpy(param_2,local_42,(long)cVar2); param_2 = (void *)((long)param_2 + lVar3); pvVar4 = (void *)((long)pvVar4 + lVar3); } while ((void *)((long)param_2 + lVar3) <= pvVar1); } if (param_2 < pvVar1) { memset(param_2,0x20,(long)pvVar1 - (long)pvVar4); } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
35,013
std::shared_ptr<metrics::Counter> metrics::Registry::create<metrics::Counter, char const (&) [20], char const (&) [30]>(char const (&) [20], char const (&) [30])
nickolajgrishuk[P]metricz-cpp/examples/../include/metrics.hpp
std::shared_ptr<T> create(Args&&... args) { std::lock_guard<std::mutex> lock(mutex_); auto metric = std::make_shared<T>(std::forward<Args>(args)...); metrics_[metric->name()] = metric; return metric; }
O0
cpp
std::shared_ptr<metrics::Counter> metrics::Registry::create<metrics::Counter, char const (&) [20], char const (&) [30]>(char const (&) [20], char const (&) [30]): pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x48(%rbp) movq %rdi, %rax movq %rax, -0x58(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rsi movq %rsi, -0x50(%rbp) leaq -0x28(%rbp), %rdi callq 0xbe00 movq -0x48(%rbp), %rdi movb $0x0, -0x29(%rbp) movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x6aa80 jmp 0xc54b movq -0x48(%rbp), %rdi movq -0x50(%rbp), %rax addq $0x28, %rax movq %rax, -0x68(%rbp) callq 0xcab0 movq %rax, %rdi callq 0x6abe0 movq %rax, -0x60(%rbp) jmp 0xc56e movq -0x60(%rbp), %rsi movq -0x68(%rbp), %rdi callq 0x6ab00 movq %rax, -0x70(%rbp) jmp 0xc581 movq -0x48(%rbp), %rsi movq -0x70(%rbp), %rdi callq 0x6ac00 movb $0x1, -0x29(%rbp) testb $0x1, -0x29(%rbp) jne 0xc5c8 jmp 0xc5bf movq %rax, %rcx movl %edx, %eax movq %rcx, -0x38(%rbp) movl %eax, -0x3c(%rbp) jmp 0xc5db movq -0x48(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x38(%rbp) movl %eax, -0x3c(%rbp) callq 0xcd70 jmp 0xc5db movq -0x48(%rbp), %rdi callq 0xcd70 leaq -0x28(%rbp), %rdi callq 0xbf30 movq -0x58(%rbp), %rax addq $0x70, %rsp popq %rbp retq leaq -0x28(%rbp), %rdi callq 0xbf30 movq -0x38(%rbp), %rdi callq 0xa850 nopl (%rax)
_ZN7metrics8Registry6createINS_7CounterEJRA20_KcRA30_S3_EEESt10shared_ptrIT_EDpOT0_: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_48], rdi mov rax, rdi mov [rbp+var_58], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rsi, [rbp+var_10] mov [rbp+var_50], rsi lea rdi, [rbp+var_28] call _ZNSt10lock_guardISt5mutexEC2ERS0_; std::lock_guard<std::mutex>::lock_guard(std::mutex&) mov rdi, [rbp+var_48] mov [rbp+var_29], 0 mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _ZSt11make_sharedIN7metrics7CounterEJRA20_KcRA30_S2_EESt10shared_ptrIT_EDpOT0_; std::make_shared<metrics::Counter,char const(&)[20],char const(&)[30]>(char const(&)[20],char const(&)[30] &&) jmp short $+2 loc_C54B: mov rdi, [rbp+var_48] mov rax, [rbp+var_50] add rax, 28h ; '(' mov [rbp+var_68], rax call _ZNKSt19__shared_ptr_accessIN7metrics7CounterELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<metrics::Counter,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax call _ZNK7metrics6Metric4nameB5cxx11Ev; metrics::Metric::name(void) mov [rbp+var_60], rax jmp short $+2 loc_C56E: mov rsi, [rbp+var_60] mov rdi, [rbp+var_68] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN7metrics6MetricEESt4lessIS5_ESaISt4pairIKS5_S9_EEEixERSD_; std::map<std::string,std::shared_ptr<metrics::Metric>>::operator[](std::string const&) mov [rbp+var_70], rax jmp short $+2 loc_C581: mov rsi, [rbp+var_48] mov rdi, [rbp+var_70] call _ZNSt10shared_ptrIN7metrics6MetricEEaSINS0_7CounterEEENSt9enable_ifIXsr13is_assignableIRSt12__shared_ptrIS1_LN9__gnu_cxx12_Lock_policyE2EERKS_IT_EEE5valueERS2_E4typeESE_ mov [rbp+var_29], 1 test [rbp+var_29], 1 jnz short loc_C5C8 jmp short loc_C5BF mov rcx, rax mov eax, edx mov [rbp+var_38], rcx mov [rbp+var_3C], eax jmp short loc_C5DB mov rdi, [rbp+var_48] mov rcx, rax mov eax, edx mov [rbp+var_38], rcx mov [rbp+var_3C], eax call _ZNSt10shared_ptrIN7metrics7CounterEED2Ev; std::shared_ptr<metrics::Counter>::~shared_ptr() jmp short loc_C5DB loc_C5BF: mov rdi, [rbp+var_48] call _ZNSt10shared_ptrIN7metrics7CounterEED2Ev; std::shared_ptr<metrics::Counter>::~shared_ptr() loc_C5C8: lea rdi, [rbp+var_28] call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard() mov rax, [rbp+var_58] add rsp, 70h pop rbp retn loc_C5DB: lea rdi, [rbp+var_28] call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard() mov rdi, [rbp+var_38] call __Unwind_Resume
long long metrics::Registry::create<metrics::Counter,char const(&)[20],char const(&)[30]>( long long a1, std::mutex *a2, long long a3, long long a4) { long long v4; // rax long long v6; // [rsp+0h] [rbp-70h] long long v7; // [rsp+10h] [rbp-60h] std::mutex *v8; // [rsp+48h] [rbp-28h] BYREF long long v9; // [rsp+50h] [rbp-20h] long long v10; // [rsp+58h] [rbp-18h] std::mutex *v11; // [rsp+60h] [rbp-10h] long long v12; // [rsp+68h] [rbp-8h] v12 = a1; v11 = a2; v10 = a3; v9 = a4; std::lock_guard<std::mutex>::lock_guard(&v8, a2); std::make_shared<metrics::Counter,char const(&)[20],char const(&)[30]>(a1, v10, v9); v4 = std::__shared_ptr_access<metrics::Counter,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a1); v7 = metrics::Metric::name[abi:cxx11](v4); v6 = std::map<std::string,std::shared_ptr<metrics::Metric>>::operator[]((char *)a2 + 40, v7); std::shared_ptr<metrics::Metric>::operator=<metrics::Counter>(v6, a1); std::lock_guard<std::mutex>::~lock_guard(&v8); return a1; }
create<metrics::Counter,char_const(&)[20],char_const(&)[30]>: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x48],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x58],RAX 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 RSI,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x50],RSI LEA RDI,[RBP + -0x28] CALL 0x0010be00 MOV RDI,qword ptr [RBP + -0x48] MOV byte ptr [RBP + -0x29],0x0 MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] LAB_0010c544: CALL 0x0016aa80 JMP 0x0010c54b LAB_0010c54b: MOV RDI,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x28 MOV qword ptr [RBP + -0x68],RAX CALL 0x0010cab0 MOV RDI,RAX LAB_0010c563: CALL 0x0016abe0 MOV qword ptr [RBP + -0x60],RAX JMP 0x0010c56e LAB_0010c56e: MOV RSI,qword ptr [RBP + -0x60] MOV RDI,qword ptr [RBP + -0x68] CALL 0x0016ab00 LAB_0010c57b: MOV qword ptr [RBP + -0x70],RAX JMP 0x0010c581 LAB_0010c581: MOV RSI,qword ptr [RBP + -0x48] MOV RDI,qword ptr [RBP + -0x70] CALL 0x0016ac00 MOV byte ptr [RBP + -0x29],0x1 TEST byte ptr [RBP + -0x29],0x1 JNZ 0x0010c5c8 JMP 0x0010c5bf LAB_0010c5bf: MOV RDI,qword ptr [RBP + -0x48] CALL 0x0010cd70 LAB_0010c5c8: LEA RDI,[RBP + -0x28] CALL 0x0010bf30 MOV RAX,qword ptr [RBP + -0x58] ADD RSP,0x70 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x0010c598) */ /* std::shared_ptr<metrics::Counter> metrics::Registry::create<metrics::Counter, char const (&) [20], char const (&) [30]>(char const (&) [20], char const (&) [30]) */ char * metrics::Registry::create<metrics::Counter,char_const(&)[20],char_const(&)[30]> (char *param_1,char *param_2) { Metric *this; string *psVar1; shared_ptr<metrics::Metric> *this_00; char *in_RDX; lock_guard<std::mutex> local_30 [16]; char *local_20; char *local_18; char *local_10; local_20 = in_RDX; local_18 = param_2; local_10 = param_1; std::lock_guard<std::mutex>::lock_guard(local_30,(mutex *)param_2); /* try { // try from 0010c544 to 0010c548 has its CatchHandler @ 0010c59a */ std::make_shared<metrics::Counter,char_const(&)[20],char_const(&)[30]>(param_1,local_20); this = (Metric *) std::__shared_ptr_access<metrics::Counter,(__gnu_cxx::_Lock_policy)2,false,false>:: operator->((__shared_ptr_access<metrics::Counter,(__gnu_cxx::_Lock_policy)2,false,false> *) param_1); /* try { // try from 0010c563 to 0010c57a has its CatchHandler @ 0010c5a8 */ psVar1 = (string *)Metric::name_abi_cxx11_(this); this_00 = (shared_ptr<metrics::Metric> *) std:: map<std::__cxx11::string,std::shared_ptr<metrics::Metric>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<metrics::Metric>>>> ::operator[]((map<std::__cxx11::string,std::shared_ptr<metrics::Metric>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<metrics::Metric>>>> *)(param_2 + 0x28),psVar1); std::shared_ptr<metrics::Metric>::operator=(this_00,param_1); std::lock_guard<std::mutex>::~lock_guard(local_30); return param_1; }
35,014
std::shared_ptr<metrics::Counter> metrics::Registry::create<metrics::Counter, char const (&) [20], char const (&) [30]>(char const (&) [20], char const (&) [30])
nickolajgrishuk[P]metricz-cpp/examples/../include/metrics.hpp
std::shared_ptr<T> create(Args&&... args) { std::lock_guard<std::mutex> lock(mutex_); auto metric = std::make_shared<T>(std::forward<Args>(args)...); metrics_[metric->name()] = metric; return metric; }
O1
cpp
std::shared_ptr<metrics::Counter> metrics::Registry::create<metrics::Counter, char const (&) [20], char const (&) [30]>(char const (&) [20], char const (&) [30]): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rcx, %r12 movq %rdx, %r13 movq %rsi, %rbx movq %rdi, %r14 movq %rsi, %rdi callq 0x8820 testl %eax, %eax jne 0x989e movq $0x0, (%r14) leaq 0x8(%r14), %r15 leaq 0xf(%rsp), %rdx movq %r15, %rdi movq %r14, %rsi movq %r13, %rcx movq %r12, %r8 callq 0x2a96e leaq 0x28(%rbx), %rdi movq (%r14), %rsi addq $0x8, %rsi callq 0x2a0fc movq (%r14), %rcx movq %rcx, (%rax) addq $0x8, %rax movq %rax, %rdi movq %r15, %rsi callq 0x2a928 movq %rbx, %rdi callq 0x8430 movq %r14, %rax addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movl %eax, %edi callq 0x8390 movq %rax, %r14 movq (%r15), %rdi testq %rdi, %rdi je 0x98ba callq 0xaba0 jmp 0x98ba movq %rax, %r14 movq %rbx, %rdi callq 0x8430 movq %r14, %rdi callq 0x8990
_ZN7metrics8Registry6createINS_5GaugeEJRA18_KcRA29_S3_EEESt10shared_ptrIT_EDpOT0_: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov r12, rcx mov r13, rdx mov rbx, rsi mov r14, rdi mov rdi, rsi call _pthread_mutex_lock test eax, eax jnz short loc_989E mov qword ptr [r14], 0 lea r15, [r14+8] lea rdx, [rsp+38h+var_29] mov rdi, r15 mov rsi, r14 mov rcx, r13 mov r8, r12 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN7metrics5GaugeESaIS5_EJRA18_KcRA29_S7_EEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<metrics::Gauge,std::allocator<metrics::Gauge>,char const(&)[18],char const(&)[29]>(metrics::Gauge *&,std::_Sp_alloc_shared_tag<std::allocator<metrics::Gauge>>,char const(&)[18],char const(&)[29] &&) lea rdi, [rbx+28h] mov rsi, [r14] add rsi, 8 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN7metrics6MetricEESt4lessIS5_ESaISt4pairIKS5_S9_EEEixERSD_; std::map<std::string,std::shared_ptr<metrics::Metric>>::operator[](std::string const&) mov rcx, [r14] mov [rax], rcx add rax, 8 mov rdi, rax mov rsi, r15 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEaSERKS2_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_count<(__gnu_cxx::_Lock_policy)2> const&) mov rdi, rbx call _pthread_mutex_unlock mov rax, r14 add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_989E: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) mov r14, rax mov rdi, [r15] test rdi, rdi jz short loc_98BA 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_98BA mov r14, rax loc_98BA: mov rdi, rbx call _pthread_mutex_unlock mov rdi, r14 call __Unwind_Resume
_QWORD * metrics::Registry::create<metrics::Gauge,char const(&)[18],char const(&)[29]>( _QWORD *a1, long long a2, long long a3, long long a4) { int v6; // eax _QWORD *v7; // rax _BYTE v9[41]; // [rsp+Fh] [rbp-29h] BYREF v6 = pthread_mutex_lock(a2); if ( v6 ) std::__throw_system_error(v6); *a1 = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<metrics::Gauge,std::allocator<metrics::Gauge>,char const(&)[18],char const(&)[29]>( a1 + 1, a1, v9, a3, a4); v7 = (_QWORD *)std::map<std::string,std::shared_ptr<metrics::Metric>>::operator[](a2 + 40, *a1 + 8LL); *v7 = *a1; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(v7 + 1, a1 + 1); pthread_mutex_unlock(a2); return a1; }
create<metrics::Gauge,char_const(&)[18],char_const(&)[29]>: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R12,RCX MOV R13,RDX MOV RBX,RSI MOV R14,RDI MOV RDI,RSI CALL 0x00108820 TEST EAX,EAX JNZ 0x0010989e MOV qword ptr [R14],0x0 LEA R15,[R14 + 0x8] LAB_0010984a: LEA RDX,[RSP + 0xf] MOV RDI,R15 MOV RSI,R14 MOV RCX,R13 MOV R8,R12 CALL 0x0012a96e LEA RDI,[RBX + 0x28] MOV RSI,qword ptr [R14] ADD RSI,0x8 LAB_0010986b: CALL 0x0012a0fc LAB_00109870: MOV RCX,qword ptr [R14] MOV qword ptr [RAX],RCX ADD RAX,0x8 MOV RDI,RAX MOV RSI,R15 CALL 0x0012a928 MOV RDI,RBX CALL 0x00108430 MOV RAX,R14 ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_0010989e: MOV EDI,EAX CALL 0x00108390
/* std::shared_ptr<metrics::Gauge> metrics::Registry::create<metrics::Gauge, char const (&) [18], char const (&) [29]>(char const (&) [18], char const (&) [29]) */ char * metrics::Registry::create<metrics::Gauge,char_const(&)[18],char_const(&)[29]> (char *param_1,char *param_2) { int iVar1; int8 *puVar2; int1 local_29; iVar1 = pthread_mutex_lock((pthread_mutex_t *)param_2); if (iVar1 == 0) { param_1[0] = '\0'; param_1[1] = '\0'; param_1[2] = '\0'; param_1[3] = '\0'; param_1[4] = '\0'; param_1[5] = '\0'; param_1[6] = '\0'; param_1[7] = '\0'; /* try { // try from 0010984a to 0010985f has its CatchHandler @ 001098b7 */ std::__shared_count<(__gnu_cxx::_Lock_policy)2>:: __shared_count<metrics::Gauge,std::allocator<metrics::Gauge>,char_const(&)[18],char_const(&)[29]> ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(param_1 + 8),param_1,&local_29); /* try { // try from 0010986b to 0010986f has its CatchHandler @ 001098a5 */ puVar2 = (int8 *) std:: map<std::__cxx11::string,std::shared_ptr<metrics::Metric>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<metrics::Metric>>>> ::operator[]((map<std::__cxx11::string,std::shared_ptr<metrics::Metric>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<metrics::Metric>>>> *)(param_2 + 0x28),(string *)(*(long *)param_1 + 8)); *puVar2 = *(int8 *)param_1; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator= ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(puVar2 + 1), (__shared_count *)(param_1 + 8)); pthread_mutex_unlock((pthread_mutex_t *)param_2); return param_1; } /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar1); }
35,015
std::shared_ptr<metrics::Counter> metrics::Registry::create<metrics::Counter, char const (&) [20], char const (&) [30]>(char const (&) [20], char const (&) [30])
nickolajgrishuk[P]metricz-cpp/examples/../include/metrics.hpp
std::shared_ptr<T> create(Args&&... args) { std::lock_guard<std::mutex> lock(mutex_); auto metric = std::make_shared<T>(std::forward<Args>(args)...); metrics_[metric->name()] = metric; return metric; }
O3
cpp
std::shared_ptr<metrics::Counter> metrics::Registry::create<metrics::Counter, char const (&) [20], char const (&) [30]>(char const (&) [20], char const (&) [30]): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rcx, %r12 movq %rdx, %r13 movq %rsi, %rbx movq %rdi, %r14 movq %rsi, %rdi callq 0x8820 testl %eax, %eax jne 0x97e4 movq $0x0, (%r14) leaq 0x8(%r14), %r15 leaq 0xf(%rsp), %rdx movq %r15, %rdi movq %r14, %rsi movq %r13, %rcx movq %r12, %r8 callq 0x29668 leaq 0x28(%rbx), %rdi movq (%r14), %rsi addq $0x8, %rsi callq 0x295d4 movq (%r14), %rcx movq %rcx, (%rax) addq $0x8, %rax movq %rax, %rdi movq %r15, %rsi callq 0x29dfc movq %rbx, %rdi callq 0x8430 movq %r14, %rax addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movl %eax, %edi callq 0x8390 movq %rax, %r14 movq (%r15), %rdi testq %rdi, %rdi je 0x9800 callq 0xac68 jmp 0x9800 movq %rax, %r14 movq %rbx, %rdi callq 0x8430 movq %r14, %rdi callq 0x8980
_ZN7metrics8Registry6createINS_7CounterEJRA20_KcRA30_S3_EEESt10shared_ptrIT_EDpOT0_: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov r12, rcx mov r13, rdx mov rbx, rsi mov r14, rdi mov rdi, rsi call _pthread_mutex_lock test eax, eax jnz short loc_97E4 mov qword ptr [r14], 0 lea r15, [r14+8] lea rdx, [rsp+38h+var_29] mov rdi, r15 mov rsi, r14 mov rcx, r13 mov r8, r12 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN7metrics7CounterESaIS5_EJRA20_KcRA30_S7_EEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<metrics::Counter,std::allocator<metrics::Counter>,char const(&)[20],char const(&)[30]>(metrics::Counter *&,std::_Sp_alloc_shared_tag<std::allocator<metrics::Counter>>,char const(&)[20],char const(&)[30] &&) lea rdi, [rbx+28h] mov rsi, [r14] add rsi, 8 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN7metrics6MetricEESt4lessIS5_ESaISt4pairIKS5_S9_EEEixERSD_; std::map<std::string,std::shared_ptr<metrics::Metric>>::operator[](std::string const&) mov rcx, [r14] mov [rax], rcx add rax, 8 mov rdi, rax mov rsi, r15 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEaSERKS2_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_count<(__gnu_cxx::_Lock_policy)2> const&) mov rdi, rbx call _pthread_mutex_unlock mov rax, r14 add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_97E4: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) mov r14, rax mov rdi, [r15] test rdi, rdi jz short loc_9800 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_9800 mov r14, rax loc_9800: mov rdi, rbx call _pthread_mutex_unlock mov rdi, r14 call __Unwind_Resume
_QWORD * metrics::Registry::create<metrics::Counter,char const(&)[20],char const(&)[30]>( _QWORD *a1, long long a2, long long a3, long long a4) { int v6; // eax _QWORD *v7; // rax _BYTE v9[41]; // [rsp+Fh] [rbp-29h] BYREF v6 = pthread_mutex_lock(a2); if ( v6 ) std::__throw_system_error(v6); *a1 = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<metrics::Counter,std::allocator<metrics::Counter>,char const(&)[20],char const(&)[30]>( a1 + 1, a1, v9, a3, a4); v7 = (_QWORD *)std::map<std::string,std::shared_ptr<metrics::Metric>>::operator[](a2 + 40, *a1 + 8LL); *v7 = *a1; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(v7 + 1, a1 + 1); pthread_mutex_unlock(a2); return a1; }
create<metrics::Counter,char_const(&)[20],char_const(&)[30]>: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R12,RCX MOV R13,RDX MOV RBX,RSI MOV R14,RDI MOV RDI,RSI CALL 0x00108820 TEST EAX,EAX JNZ 0x001097e4 MOV qword ptr [R14],0x0 LEA R15,[R14 + 0x8] LAB_00109790: LEA RDX,[RSP + 0xf] MOV RDI,R15 MOV RSI,R14 MOV RCX,R13 MOV R8,R12 CALL 0x00129668 LEA RDI,[RBX + 0x28] MOV RSI,qword ptr [R14] ADD RSI,0x8 LAB_001097b1: CALL 0x001295d4 LAB_001097b6: MOV RCX,qword ptr [R14] MOV qword ptr [RAX],RCX ADD RAX,0x8 MOV RDI,RAX MOV RSI,R15 CALL 0x00129dfc MOV RDI,RBX CALL 0x00108430 MOV RAX,R14 ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_001097e4: MOV EDI,EAX CALL 0x00108390
/* std::shared_ptr<metrics::Counter> metrics::Registry::create<metrics::Counter, char const (&) [20], char const (&) [30]>(char const (&) [20], char const (&) [30]) */ char * metrics::Registry::create<metrics::Counter,char_const(&)[20],char_const(&)[30]> (char *param_1,char *param_2) { int iVar1; int8 *puVar2; int1 local_29; iVar1 = pthread_mutex_lock((pthread_mutex_t *)param_2); if (iVar1 == 0) { param_1[0] = '\0'; param_1[1] = '\0'; param_1[2] = '\0'; param_1[3] = '\0'; param_1[4] = '\0'; param_1[5] = '\0'; param_1[6] = '\0'; param_1[7] = '\0'; /* try { // try from 00109790 to 001097a5 has its CatchHandler @ 001097fd */ std::__shared_count<(__gnu_cxx::_Lock_policy)2>:: __shared_count<metrics::Counter,std::allocator<metrics::Counter>,char_const(&)[20],char_const(&)[30]> ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(param_1 + 8),param_1,&local_29); /* try { // try from 001097b1 to 001097b5 has its CatchHandler @ 001097eb */ puVar2 = (int8 *) std:: map<std::__cxx11::string,std::shared_ptr<metrics::Metric>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<metrics::Metric>>>> ::operator[]((map<std::__cxx11::string,std::shared_ptr<metrics::Metric>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<metrics::Metric>>>> *)(param_2 + 0x28),(string *)(*(long *)param_1 + 8)); *puVar2 = *(int8 *)param_1; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator= ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(puVar2 + 1), (__shared_count *)(param_1 + 8)); pthread_mutex_unlock((pthread_mutex_t *)param_2); return param_1; } /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar1); }
35,016
intx::uint<256u> intx::be::unsafe::load<intx::uint<256u>>(unsigned char const*)
corpus-core[P]colibri-stateless/build_O0/_deps/intx-src/include/intx/intx.hpp
inline IntT load(const uint8_t* src) noexcept { // Align bytes. // TODO: Using memcpy() directly triggers this optimization bug in GCC: // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107837 alignas(IntT) std::byte aligned_storage[sizeof(IntT)]; std::memcpy(&aligned_storage, src, sizeof(IntT)); // TODO(C++23): Use std::start_lifetime_as<uint256>(). return to_big_endian(*reinterpret_cast<const IntT*>(&aligned_storage)); }
O0
cpp
intx::uint<256u> intx::be::unsafe::load<intx::uint<256u>>(unsigned char const*): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x10(%rbp) leaq -0x10(%rbp), %rdi callq 0x68f50 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN4intx2be6unsafe4loadImEET_PKh: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_10], rax lea rdi, [rbp+var_10] call _ZN4intx13to_big_endianImEET_RKS1_; intx::to_big_endian<ulong>(ulong const&) add rsp, 10h pop rbp retn
unsigned long long intx::be::unsafe::load<unsigned long>(intx *a1) { intx *v2[2]; // [rsp+0h] [rbp-10h] BYREF v2[1] = a1; v2[0] = *(intx **)a1; return intx::to_big_endian<unsigned long>(v2); }
load<unsigned_long>: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x10],RAX LEA RDI,[RBP + -0x10] CALL 0x00168f50 ADD RSP,0x10 POP RBP RET
/* unsigned long intx::be::unsafe::load<unsigned long>(unsigned char const*) */ ulong intx::be::unsafe::load<unsigned_long>(uchar *param_1) { ulong uVar1; ulong local_18; uchar *local_10; local_18 = *(ulong *)param_1; local_10 = param_1; uVar1 = to_big_endian<unsigned_long>(&local_18); return uVar1; }
35,017
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 0xffdd1 leaq 0x1c139e(%rip), %rax # 0x2c1158 movq (%rax), %rax movq 0x168(%rax), %rax movq -0x8(%rbp), %rcx movq 0x90(%rcx), %rdi callq *%rax movq -0x8(%rbp), %rdi callq 0xfb4d0 movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_rwlock_unlock_8: 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_FFDD1 lea rax, PSI_server mov rax, [rax] mov rax, [rax+168h] mov rcx, [rbp+var_8] mov rdi, [rcx+90h] call rax loc_FFDD1: 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_8(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 0x001ffdd1 LEA RAX,[0x3c1158] 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_001ffdd1: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001fb4d0 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; }
35,018
optimize_scope_make_global_ref
bluesky950520[P]quickjs/quickjs.c
static int optimize_scope_make_global_ref(JSContext *ctx, JSFunctionDef *s, DynBuf *bc, uint8_t *bc_buf, LabelSlot *ls, int pos_next, JSAtom var_name) { int label_pos, end_pos, pos, op; BOOL is_strict_mode = s->is_strict_mode; /* replace the reference get/put with normal variable accesses */ if (is_strict_mode) { /* need to check if the variable exists before evaluating the right expression */ /* XXX: need an extra OP_true if destructuring an array */ dbuf_putc(bc, OP_check_var); dbuf_put_u32(bc, JS_DupAtom(ctx, var_name)); } else { /* XXX: need 2 extra OP_true if destructuring an array */ } if (bc_buf[pos_next] == OP_get_ref_value) { dbuf_putc(bc, OP_get_var); dbuf_put_u32(bc, JS_DupAtom(ctx, var_name)); pos_next++; } /* remove the OP_label to make room for replacement */ /* label should have a refcount of 0 anyway */ /* XXX: should have emitted several OP_nop to avoid this kludge */ label_pos = ls->pos; pos = label_pos - 5; assert(bc_buf[pos] == OP_label); end_pos = label_pos + 2; op = bc_buf[label_pos]; if (is_strict_mode) { if (op != OP_nop) { switch(op) { case OP_insert3: op = OP_insert2; break; case OP_perm4: op = OP_perm3; break; case OP_rot3l: op = OP_swap; break; default: abort(); } bc_buf[pos++] = op; } } else { if (op == OP_insert3) bc_buf[pos++] = OP_dup; } if (is_strict_mode) { bc_buf[pos] = OP_put_var_strict; /* XXX: need 1 extra OP_drop if destructuring an array */ } else { bc_buf[pos] = OP_put_var; /* XXX: need 2 extra OP_drop if destructuring an array */ } put_u32(bc_buf + pos + 1, JS_DupAtom(ctx, var_name)); pos += 5; /* pad with OP_nop */ while (pos < end_pos) bc_buf[pos++] = OP_nop; return pos_next; }
O0
c
optimize_scope_make_global_ref: subq $0x68, %rsp movl 0x70(%rsp), %eax movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movq %rdx, 0x50(%rsp) movq %rcx, 0x48(%rsp) movq %r8, 0x40(%rsp) movl %r9d, 0x3c(%rsp) movq 0x58(%rsp), %rax movw 0x84(%rax), %ax shrw $0xf, %ax movzbl %al, %eax movl %eax, 0x28(%rsp) cmpl $0x0, 0x28(%rsp) je 0xbc239 movq 0x50(%rsp), %rdi movl $0x36, %esi callq 0x1e6d0 movq 0x50(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x60(%rsp), %rdi movl 0x70(%rsp), %esi callq 0x27fa0 movq 0x20(%rsp), %rdi movl %eax, %esi callq 0x7a130 jmp 0xbc23b jmp 0xbc23b movq 0x48(%rsp), %rax movslq 0x3c(%rsp), %rcx movzbl (%rax,%rcx), %eax cmpl $0x3c, %eax jne 0xbc28c movq 0x50(%rsp), %rdi movl $0x38, %esi callq 0x1e6d0 movq 0x50(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x60(%rsp), %rdi movl 0x70(%rsp), %esi callq 0x27fa0 movq 0x18(%rsp), %rdi movl %eax, %esi callq 0x7a130 movl 0x3c(%rsp), %eax addl $0x1, %eax movl %eax, 0x3c(%rsp) movq 0x40(%rsp), %rax movl 0x4(%rax), %eax movl %eax, 0x38(%rsp) movl 0x38(%rsp), %eax subl $0x5, %eax movl %eax, 0x30(%rsp) movl 0x38(%rsp), %eax addl $0x2, %eax movl %eax, 0x34(%rsp) movq 0x48(%rsp), %rax movslq 0x38(%rsp), %rcx movzbl (%rax,%rcx), %eax movl %eax, 0x2c(%rsp) cmpl $0x0, 0x28(%rsp) je 0xbc339 cmpl $0xb2, 0x2c(%rsp) je 0xbc337 movl 0x2c(%rsp), %eax movl %eax, 0x14(%rsp) subl $0x16, %eax je 0xbc2f6 jmp 0xbc2e0 movl 0x14(%rsp), %eax subl $0x19, %eax je 0xbc300 jmp 0xbc2eb movl 0x14(%rsp), %eax subl $0x1d, %eax je 0xbc30a jmp 0xbc314 movl $0x15, 0x2c(%rsp) jmp 0xbc319 movl $0x18, 0x2c(%rsp) jmp 0xbc319 movl $0x1b, 0x2c(%rsp) jmp 0xbc319 callq 0xe090 movl 0x2c(%rsp), %eax movb %al, %dl movq 0x48(%rsp), %rax movl 0x30(%rsp), %ecx movl %ecx, %esi addl $0x1, %esi movl %esi, 0x30(%rsp) movslq %ecx, %rcx movb %dl, (%rax,%rcx) jmp 0xbc35b cmpl $0x16, 0x2c(%rsp) jne 0xbc359 movq 0x48(%rsp), %rax movl 0x30(%rsp), %ecx movl %ecx, %edx addl $0x1, %edx movl %edx, 0x30(%rsp) movslq %ecx, %rcx movb $0x11, (%rax,%rcx) jmp 0xbc35b cmpl $0x0, 0x28(%rsp) je 0xbc372 movq 0x48(%rsp), %rax movslq 0x30(%rsp), %rcx movb $0x3b, (%rax,%rcx) jmp 0xbc380 movq 0x48(%rsp), %rax movslq 0x30(%rsp), %rcx movb $0x39, (%rax,%rcx) movq 0x48(%rsp), %rax movslq 0x30(%rsp), %rcx addq %rcx, %rax addq $0x1, %rax movq %rax, 0x8(%rsp) movq 0x60(%rsp), %rdi movl 0x70(%rsp), %esi callq 0x27fa0 movq 0x8(%rsp), %rdi movl %eax, %esi callq 0x68270 movl 0x30(%rsp), %eax addl $0x5, %eax movl %eax, 0x30(%rsp) movl 0x30(%rsp), %eax cmpl 0x34(%rsp), %eax jge 0xbc3e0 movq 0x48(%rsp), %rax movl 0x30(%rsp), %ecx movl %ecx, %edx addl $0x1, %edx movl %edx, 0x30(%rsp) movslq %ecx, %rcx movb $-0x4e, (%rax,%rcx) jmp 0xbc3bb movl 0x3c(%rsp), %eax addq $0x68, %rsp retq nopl (%rax)
optimize_scope_make_global_ref: sub rsp, 68h mov eax, [rsp+68h+arg_0] mov [rsp+68h+var_8], rdi mov [rsp+68h+var_10], rsi mov [rsp+68h+var_18], rdx mov [rsp+68h+var_20], rcx mov [rsp+68h+var_28], r8 mov [rsp+68h+var_2C], r9d mov rax, [rsp+68h+var_10] mov ax, [rax+84h] shr ax, 0Fh movzx eax, al mov [rsp+68h+var_40], eax cmp [rsp+68h+var_40], 0 jz short loc_BC239 mov rdi, [rsp+68h+var_18] mov esi, 36h ; '6' call dbuf_putc mov rax, [rsp+68h+var_18] mov [rsp+68h+var_48], rax mov rdi, [rsp+68h+var_8] mov esi, [rsp+68h+arg_0] call JS_DupAtom mov rdi, [rsp+68h+var_48] mov esi, eax call dbuf_put_u32 jmp short loc_BC23B loc_BC239: jmp short $+2 loc_BC23B: mov rax, [rsp+68h+var_20] movsxd rcx, [rsp+68h+var_2C] movzx eax, byte ptr [rax+rcx] cmp eax, 3Ch ; '<' jnz short loc_BC28C mov rdi, [rsp+68h+var_18] mov esi, 38h ; '8' call dbuf_putc mov rax, [rsp+68h+var_18] mov [rsp+68h+var_50], rax mov rdi, [rsp+68h+var_8] mov esi, [rsp+68h+arg_0] call JS_DupAtom mov rdi, [rsp+68h+var_50] mov esi, eax call dbuf_put_u32 mov eax, [rsp+68h+var_2C] add eax, 1 mov [rsp+68h+var_2C], eax loc_BC28C: mov rax, [rsp+68h+var_28] mov eax, [rax+4] mov [rsp+68h+var_30], eax mov eax, [rsp+68h+var_30] sub eax, 5 mov [rsp+68h+var_38], eax mov eax, [rsp+68h+var_30] add eax, 2 mov [rsp+68h+var_34], eax mov rax, [rsp+68h+var_20] movsxd rcx, [rsp+68h+var_30] movzx eax, byte ptr [rax+rcx] mov [rsp+68h+var_3C], eax cmp [rsp+68h+var_40], 0 jz short loc_BC339 cmp [rsp+68h+var_3C], 0B2h jz short loc_BC337 mov eax, [rsp+68h+var_3C] mov [rsp+68h+var_54], eax sub eax, 16h jz short loc_BC2F6 jmp short $+2 loc_BC2E0: mov eax, [rsp+68h+var_54] sub eax, 19h jz short loc_BC300 jmp short $+2 loc_BC2EB: mov eax, [rsp+68h+var_54] sub eax, 1Dh jz short loc_BC30A jmp short loc_BC314 loc_BC2F6: mov [rsp+68h+var_3C], 15h jmp short loc_BC319 loc_BC300: mov [rsp+68h+var_3C], 18h jmp short loc_BC319 loc_BC30A: mov [rsp+68h+var_3C], 1Bh jmp short loc_BC319 loc_BC314: call _abort loc_BC319: mov eax, [rsp+68h+var_3C] mov dl, al mov rax, [rsp+68h+var_20] mov ecx, [rsp+68h+var_38] mov esi, ecx add esi, 1 mov [rsp+68h+var_38], esi movsxd rcx, ecx mov [rax+rcx], dl loc_BC337: jmp short loc_BC35B loc_BC339: cmp [rsp+68h+var_3C], 16h jnz short loc_BC359 mov rax, [rsp+68h+var_20] mov ecx, [rsp+68h+var_38] mov edx, ecx add edx, 1 mov [rsp+68h+var_38], edx movsxd rcx, ecx mov byte ptr [rax+rcx], 11h loc_BC359: jmp short $+2 loc_BC35B: cmp [rsp+68h+var_40], 0 jz short loc_BC372 mov rax, [rsp+68h+var_20] movsxd rcx, [rsp+68h+var_38] mov byte ptr [rax+rcx], 3Bh ; ';' jmp short loc_BC380 loc_BC372: mov rax, [rsp+68h+var_20] movsxd rcx, [rsp+68h+var_38] mov byte ptr [rax+rcx], 39h ; '9' loc_BC380: mov rax, [rsp+68h+var_20] movsxd rcx, [rsp+68h+var_38] add rax, rcx add rax, 1 mov [rsp+68h+var_60], rax mov rdi, [rsp+68h+var_8] mov esi, [rsp+68h+arg_0] call JS_DupAtom mov rdi, [rsp+68h+var_60] mov esi, eax call put_u32 mov eax, [rsp+68h+var_38] add eax, 5 mov [rsp+68h+var_38], eax loc_BC3BB: mov eax, [rsp+68h+var_38] cmp eax, [rsp+68h+var_34] jge short loc_BC3E0 mov rax, [rsp+68h+var_20] mov ecx, [rsp+68h+var_38] mov edx, ecx add edx, 1 mov [rsp+68h+var_38], edx movsxd rcx, ecx mov byte ptr [rax+rcx], 0B2h jmp short loc_BC3BB loc_BC3E0: mov eax, [rsp+68h+var_2C] add rsp, 68h retn
long long optimize_scope_make_global_ref( const char *a1, long long a2, char *a3, long long a4, long long a5, unsigned int a6, unsigned int a7) { int v7; // eax int v8; // eax int v9; // eax int v10; // ecx BOOL v12; // [rsp+28h] [rbp-40h] int v13; // [rsp+2Ch] [rbp-3Ch] char v14; // [rsp+2Ch] [rbp-3Ch] int v15; // [rsp+30h] [rbp-38h] int i; // [rsp+30h] [rbp-38h] int v17; // [rsp+38h] [rbp-30h] long long v22; // [rsp+60h] [rbp-8h] v22 = (long long)a1; v12 = *(__int16 *)(a2 + 132) < 0; if ( *(__int16 *)(a2 + 132) < 0 ) { dbuf_putc(a3, 54); v7 = JS_DupAtom((long long)a1, a7); a1 = a3; dbuf_put_u32(a3, v7); } if ( *(_BYTE *)(a4 + (int)a6) == 60 ) { dbuf_putc(a3, 56); v8 = JS_DupAtom(v22, a7); a1 = a3; dbuf_put_u32(a3, v8); ++a6; } v17 = *(_DWORD *)(a5 + 4); v15 = v17 - 5; v13 = *(unsigned __int8 *)(a4 + v17); if ( v12 ) { if ( v13 != 178 ) { switch ( v13 ) { case 22: v14 = 21; break; case 25: v14 = 24; break; case 29: v14 = 27; break; default: abort(a1); } ++v15; *(_BYTE *)(a4 + v17 - 5) = v14; } } else if ( v13 == 22 ) { ++v15; *(_BYTE *)(a4 + v17 - 5) = 17; } if ( v12 ) *(_BYTE *)(a4 + v15) = 59; else *(_BYTE *)(a4 + v15) = 57; v9 = JS_DupAtom(v22, a7); put_u32((_DWORD *)(v15 + a4 + 1), v9); for ( i = v15 + 5; i < v17 + 2; ++i ) { v10 = i; *(_BYTE *)(a4 + v10) = -78; } return a6; }
optimize_scope_make_global_ref: SUB RSP,0x68 MOV EAX,dword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI MOV qword ptr [RSP + 0x50],RDX MOV qword ptr [RSP + 0x48],RCX MOV qword ptr [RSP + 0x40],R8 MOV dword ptr [RSP + 0x3c],R9D MOV RAX,qword ptr [RSP + 0x58] MOV AX,word ptr [RAX + 0x84] SHR AX,0xf MOVZX EAX,AL MOV dword ptr [RSP + 0x28],EAX CMP dword ptr [RSP + 0x28],0x0 JZ 0x001bc239 MOV RDI,qword ptr [RSP + 0x50] MOV ESI,0x36 CALL 0x0011e6d0 MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0x60] MOV ESI,dword ptr [RSP + 0x70] CALL 0x00127fa0 MOV RDI,qword ptr [RSP + 0x20] MOV ESI,EAX CALL 0x0017a130 JMP 0x001bc23b LAB_001bc239: JMP 0x001bc23b LAB_001bc23b: MOV RAX,qword ptr [RSP + 0x48] MOVSXD RCX,dword ptr [RSP + 0x3c] MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x3c JNZ 0x001bc28c MOV RDI,qword ptr [RSP + 0x50] MOV ESI,0x38 CALL 0x0011e6d0 MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x60] MOV ESI,dword ptr [RSP + 0x70] CALL 0x00127fa0 MOV RDI,qword ptr [RSP + 0x18] MOV ESI,EAX CALL 0x0017a130 MOV EAX,dword ptr [RSP + 0x3c] ADD EAX,0x1 MOV dword ptr [RSP + 0x3c],EAX LAB_001bc28c: MOV RAX,qword ptr [RSP + 0x40] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RSP + 0x38],EAX MOV EAX,dword ptr [RSP + 0x38] SUB EAX,0x5 MOV dword ptr [RSP + 0x30],EAX MOV EAX,dword ptr [RSP + 0x38] ADD EAX,0x2 MOV dword ptr [RSP + 0x34],EAX MOV RAX,qword ptr [RSP + 0x48] MOVSXD RCX,dword ptr [RSP + 0x38] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV dword ptr [RSP + 0x2c],EAX CMP dword ptr [RSP + 0x28],0x0 JZ 0x001bc339 CMP dword ptr [RSP + 0x2c],0xb2 JZ 0x001bc337 MOV EAX,dword ptr [RSP + 0x2c] MOV dword ptr [RSP + 0x14],EAX SUB EAX,0x16 JZ 0x001bc2f6 JMP 0x001bc2e0 LAB_001bc2e0: MOV EAX,dword ptr [RSP + 0x14] SUB EAX,0x19 JZ 0x001bc300 JMP 0x001bc2eb LAB_001bc2eb: MOV EAX,dword ptr [RSP + 0x14] SUB EAX,0x1d JZ 0x001bc30a JMP 0x001bc314 LAB_001bc2f6: MOV dword ptr [RSP + 0x2c],0x15 JMP 0x001bc319 LAB_001bc300: MOV dword ptr [RSP + 0x2c],0x18 JMP 0x001bc319 LAB_001bc30a: MOV dword ptr [RSP + 0x2c],0x1b JMP 0x001bc319 LAB_001bc314: CALL 0x0010e090 LAB_001bc319: MOV EAX,dword ptr [RSP + 0x2c] MOV DL,AL MOV RAX,qword ptr [RSP + 0x48] MOV ECX,dword ptr [RSP + 0x30] MOV ESI,ECX ADD ESI,0x1 MOV dword ptr [RSP + 0x30],ESI MOVSXD RCX,ECX MOV byte ptr [RAX + RCX*0x1],DL LAB_001bc337: JMP 0x001bc35b LAB_001bc339: CMP dword ptr [RSP + 0x2c],0x16 JNZ 0x001bc359 MOV RAX,qword ptr [RSP + 0x48] MOV ECX,dword ptr [RSP + 0x30] MOV EDX,ECX ADD EDX,0x1 MOV dword ptr [RSP + 0x30],EDX MOVSXD RCX,ECX MOV byte ptr [RAX + RCX*0x1],0x11 LAB_001bc359: JMP 0x001bc35b LAB_001bc35b: CMP dword ptr [RSP + 0x28],0x0 JZ 0x001bc372 MOV RAX,qword ptr [RSP + 0x48] MOVSXD RCX,dword ptr [RSP + 0x30] MOV byte ptr [RAX + RCX*0x1],0x3b JMP 0x001bc380 LAB_001bc372: MOV RAX,qword ptr [RSP + 0x48] MOVSXD RCX,dword ptr [RSP + 0x30] MOV byte ptr [RAX + RCX*0x1],0x39 LAB_001bc380: MOV RAX,qword ptr [RSP + 0x48] MOVSXD RCX,dword ptr [RSP + 0x30] ADD RAX,RCX ADD RAX,0x1 MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x60] MOV ESI,dword ptr [RSP + 0x70] CALL 0x00127fa0 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,EAX CALL 0x00168270 MOV EAX,dword ptr [RSP + 0x30] ADD EAX,0x5 MOV dword ptr [RSP + 0x30],EAX LAB_001bc3bb: MOV EAX,dword ptr [RSP + 0x30] CMP EAX,dword ptr [RSP + 0x34] JGE 0x001bc3e0 MOV RAX,qword ptr [RSP + 0x48] MOV ECX,dword ptr [RSP + 0x30] MOV EDX,ECX ADD EDX,0x1 MOV dword ptr [RSP + 0x30],EDX MOVSXD RCX,ECX MOV byte ptr [RAX + RCX*0x1],0xb2 JMP 0x001bc3bb LAB_001bc3e0: MOV EAX,dword ptr [RSP + 0x3c] ADD RSP,0x68 RET
int optimize_scope_make_global_ref (int8 param_1,long param_2,int8 param_3,long param_4,long param_5, int param_6,int4 param_7) { char cVar1; short sVar2; int iVar3; int4 uVar4; int iVar5; int1 local_3c; int local_38; int local_2c; sVar2 = *(short *)(param_2 + 0x84); if (sVar2 < 0) { dbuf_putc(param_3,0x36); uVar4 = JS_DupAtom(param_1,param_7); dbuf_put_u32(param_3,uVar4); } local_2c = param_6; if (*(char *)(param_4 + param_6) == '<') { dbuf_putc(param_3,0x38); uVar4 = JS_DupAtom(param_1,param_7); dbuf_put_u32(param_3,uVar4); local_2c = param_6 + 1; } iVar3 = *(int *)(param_5 + 4); iVar5 = iVar3 + -5; cVar1 = *(char *)(param_4 + iVar3); local_38 = iVar5; if (sVar2 < 0) { if (cVar1 != -0x4e) { if (cVar1 == '\x16') { local_3c = 0x15; } else if (cVar1 == '\x19') { local_3c = 0x18; } else { if (cVar1 != '\x1d') { /* WARNING: Subroutine does not return */ abort(); } local_3c = 0x1b; } local_38 = iVar3 + -4; *(int1 *)(param_4 + iVar5) = local_3c; } } else if (cVar1 == '\x16') { *(int1 *)(param_4 + iVar5) = 0x11; local_38 = iVar3 + -4; } if (sVar2 < 0) { *(int1 *)(param_4 + local_38) = 0x3b; } else { *(int1 *)(param_4 + local_38) = 0x39; } uVar4 = JS_DupAtom(param_1,param_7); put_u32(param_4 + local_38 + 1,uVar4); local_38 = local_38 + 5; while (local_38 < iVar3 + 2) { *(int1 *)(param_4 + local_38) = 0xb2; local_38 = local_38 + 1; } return local_2c; }
35,019
pfs_discover_table(handlerton*, THD*, TABLE_SHARE*)
eloqsql/storage/perfschema/ha_perfschema.cc
static int pfs_discover_table(handlerton *hton, THD *thd, TABLE_SHARE *share) { const PFS_engine_table_share *pfs_share; if ((pfs_share= find_table_share(share->db.str, share->table_name.str))) return share->init_from_sql_statement_string(thd, false, pfs_share->sql.str, pfs_share->sql.length); return HA_ERR_NO_SUCH_TABLE; }
O0
cpp
pfs_discover_table(handlerton*, THD*, TABLE_SHARE*): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x20(%rbp), %rax movq 0x2a0(%rax), %rdi movq -0x20(%rbp), %rax movq 0x2b0(%rax), %rsi callq 0xf51ac0 movq %rax, -0x28(%rbp) cmpq $0x0, %rax je 0xf525dd movq -0x20(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x28(%rbp), %rax movq 0x48(%rax), %rcx movq -0x28(%rbp), %rax movq 0x50(%rax), %r8 xorl %edx, %edx callq 0xb0b060 movl %eax, -0x4(%rbp) jmp 0xf525e4 movl $0x9b, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
_ZL18pfs_discover_tableP10handlertonP3THDP11TABLE_SHARE: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_20] mov rdi, [rax+2A0h]; char * mov rax, [rbp+var_20] mov rsi, [rax+2B0h]; char * call _ZL16find_table_sharePKcS0_; find_table_share(char const*,char const*) mov [rbp+var_28], rax cmp rax, 0 jz short loc_F525DD mov rdi, [rbp+var_20]; this mov rsi, [rbp+var_18]; THD * mov rax, [rbp+var_28] mov rcx, [rax+48h]; char * mov rax, [rbp+var_28] mov r8, [rax+50h]; unsigned __int64 xor edx, edx; bool call _ZN11TABLE_SHARE30init_from_sql_statement_stringEP3THDbPKcm; TABLE_SHARE::init_from_sql_statement_string(THD *,bool,char const*,ulong) mov [rbp+var_4], eax jmp short loc_F525E4 loc_F525DD: mov [rbp+var_4], 9Bh loc_F525E4: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long pfs_discover_table(long long a1, THD *a2, long long a3) { long long table_share; // [rsp+8h] [rbp-28h] table_share = find_table_share(*(const char **)(a3 + 672), *(PFS_engine_table **)(a3 + 688)); if ( table_share ) return (unsigned int)TABLE_SHARE::init_from_sql_statement_string( (TABLE_SHARE *)a3, a2, 0, *(char **)(table_share + 72), *(_QWORD *)(table_share + 80)); else return 155; }
mbmaxlen: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x9c] POP RBP RET
/* StringPack::mbmaxlen() const */ int4 __thiscall StringPack::mbmaxlen(StringPack *this) { return *(int4 *)(*(long *)this + 0x9c); }
35,020
pfs_discover_table(handlerton*, THD*, TABLE_SHARE*)
eloqsql/storage/perfschema/ha_perfschema.cc
static int pfs_discover_table(handlerton *hton, THD *thd, TABLE_SHARE *share) { const PFS_engine_table_share *pfs_share; if ((pfs_share= find_table_share(share->db.str, share->table_name.str))) return share->init_from_sql_statement_string(thd, false, pfs_share->sql.str, pfs_share->sql.length); return HA_ERR_NO_SUCH_TABLE; }
O3
cpp
pfs_discover_table(handlerton*, THD*, TABLE_SHARE*): pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdx, %r14 movq %rsi, %rbx movq 0x2a0(%rdx), %rdi movq 0x2b0(%rdx), %rsi callq 0xaef0d4 testq %rax, %rax je 0xaef6cc movq 0x48(%rax), %rcx movq 0x50(%rax), %r8 movq %r14, %rdi movq %rbx, %rsi xorl %edx, %edx popq %rbx popq %r14 popq %rbp jmp 0x88f5a8 movl $0x9b, %eax popq %rbx popq %r14 popq %rbp retq
_ZL18pfs_discover_tableP10handlertonP3THDP11TABLE_SHARE: push rbp mov rbp, rsp push r14 push rbx mov r14, rdx mov rbx, rsi mov rdi, [rdx+2A0h]; char * mov rsi, [rdx+2B0h]; char * call _ZL16find_table_sharePKcS0_; find_table_share(char const*,char const*) test rax, rax jz short loc_AEF6CC mov rcx, [rax+48h]; char * mov r8, [rax+50h]; unsigned __int64 mov rdi, r14; this mov rsi, rbx; THD * xor edx, edx; bool pop rbx pop r14 pop rbp jmp _ZN11TABLE_SHARE30init_from_sql_statement_stringEP3THDbPKcm; TABLE_SHARE::init_from_sql_statement_string(THD *,bool,char const*,ulong) loc_AEF6CC: mov eax, 9Bh pop rbx pop r14 pop rbp retn
long long pfs_discover_table( double a1, __m128 a2, __m128 a3, __m128 a4, double a5, double a6, __m128 a7, __m128 a8, long long a9, THD *a10, long long a11) { long long table_share; // rax double v13; // xmm4_8 double v14; // xmm5_8 table_share = find_table_share(*(const char **)(a11 + 672), *(PFS_engine_table **)(a11 + 688)); if ( table_share ) return TABLE_SHARE::init_from_sql_statement_string( (TABLE_SHARE *)a11, a10, 0, *(const char **)(table_share + 72), *(_QWORD *)(table_share + 80), a1, a2, a3, a4, v13, v14, a7, a8); else return 155LL; }
35,021
my_strnxfrm_simple_internal
eloqsql/strings/ctype-simple.c
size_t my_strnxfrm_simple_internal(CHARSET_INFO * cs, uchar *dst, size_t dstlen, uint *nweights, const uchar *src, size_t srclen) { const uchar *map= cs->sort_order; uchar *d0= dst; uint frmlen; if ((frmlen= (uint)MY_MIN(dstlen, *nweights)) > srclen) frmlen= (uint)srclen; if (dst != src) { const uchar *end; for (end= src + frmlen; src < end;) *dst++= map[*src++]; } else { const uchar *end; for (end= dst + frmlen; dst < end; dst++) *dst= map[(uchar) *dst]; } *nweights-= frmlen; return dst - d0; }
O0
c
my_strnxfrm_simple_internal: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x8(%rbp), %rax movq 0x58(%rax), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax movq -0x20(%rbp), %rcx movl (%rcx), %ecx cmpq %rcx, %rax jae 0x4bc89 movq -0x18(%rbp), %rax movq %rax, -0x60(%rbp) jmp 0x4bc93 movq -0x20(%rbp), %rax movl (%rax), %eax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movl %eax, -0x44(%rbp) movl %eax, %eax cmpq -0x30(%rbp), %rax jbe 0x4bca9 movq -0x30(%rbp), %rax movl %eax, -0x44(%rbp) movq -0x10(%rbp), %rax cmpq -0x28(%rbp), %rax je 0x4bcf9 movq -0x28(%rbp), %rax movl -0x44(%rbp), %ecx addq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax cmpq -0x50(%rbp), %rax jae 0x4bcf7 movq -0x38(%rbp), %rax movq -0x28(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x28(%rbp) movzbl (%rcx), %ecx movb (%rax,%rcx), %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) jmp 0x4bcc1 jmp 0x4bd35 movq -0x10(%rbp), %rax movl -0x44(%rbp), %ecx addq %rcx, %rax movq %rax, -0x58(%rbp) movq -0x10(%rbp), %rax cmpq -0x58(%rbp), %rax jae 0x4bd33 movq -0x38(%rbp), %rax movq -0x10(%rbp), %rcx movzbl (%rcx), %ecx movb (%rax,%rcx), %cl movq -0x10(%rbp), %rax movb %cl, (%rax) movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x4bd07 jmp 0x4bd35 movl -0x44(%rbp), %edx movq -0x20(%rbp), %rax movl (%rax), %ecx subl %edx, %ecx movl %ecx, (%rax) movq -0x10(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax popq %rbp retq nop
my_strnxfrm_simple_internal: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_8] mov rax, [rax+58h] mov [rbp+var_38], rax mov rax, [rbp+var_10] mov [rbp+var_40], rax mov rax, [rbp+var_18] mov rcx, [rbp+var_20] mov ecx, [rcx] cmp rax, rcx jnb short loc_4BC89 mov rax, [rbp+var_18] mov [rbp+var_60], rax jmp short loc_4BC93 loc_4BC89: mov rax, [rbp+var_20] mov eax, [rax] mov [rbp+var_60], rax loc_4BC93: mov rax, [rbp+var_60] mov [rbp+var_44], eax mov eax, eax cmp rax, [rbp+var_30] jbe short loc_4BCA9 mov rax, [rbp+var_30] mov [rbp+var_44], eax loc_4BCA9: mov rax, [rbp+var_10] cmp rax, [rbp+var_28] jz short loc_4BCF9 mov rax, [rbp+var_28] mov ecx, [rbp+var_44] add rax, rcx mov [rbp+var_50], rax loc_4BCC1: mov rax, [rbp+var_28] cmp rax, [rbp+var_50] jnb short loc_4BCF7 mov rax, [rbp+var_38] mov rcx, [rbp+var_28] mov rdx, rcx add rdx, 1 mov [rbp+var_28], rdx movzx ecx, byte ptr [rcx] mov cl, [rax+rcx] mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl jmp short loc_4BCC1 loc_4BCF7: jmp short loc_4BD35 loc_4BCF9: mov rax, [rbp+var_10] mov ecx, [rbp+var_44] add rax, rcx mov [rbp+var_58], rax loc_4BD07: mov rax, [rbp+var_10] cmp rax, [rbp+var_58] jnb short loc_4BD33 mov rax, [rbp+var_38] mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx] mov cl, [rax+rcx] mov rax, [rbp+var_10] mov [rax], cl mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_4BD07 loc_4BD33: jmp short $+2 loc_4BD35: mov edx, [rbp+var_44] mov rax, [rbp+var_20] mov ecx, [rax] sub ecx, edx mov [rax], ecx mov rax, [rbp+var_10] mov rcx, [rbp+var_40] sub rax, rcx pop rbp retn
_BYTE * my_strnxfrm_simple_internal( long long a1, unsigned __int8 *a2, unsigned long long a3, unsigned int *a4, unsigned __int8 *a5, unsigned long long a6) { unsigned __int8 *v6; // rcx unsigned __int8 *v7; // rax unsigned int v9; // [rsp+0h] [rbp-60h] int v10; // [rsp+1Ch] [rbp-44h] long long v11; // [rsp+28h] [rbp-38h] unsigned __int8 *v12; // [rsp+38h] [rbp-28h] unsigned __int8 *v14; // [rsp+50h] [rbp-10h] v14 = a2; v12 = a5; v11 = *(_QWORD *)(a1 + 88); if ( a3 >= *a4 ) v9 = *a4; else v9 = a3; v10 = v9; if ( v9 > a6 ) v10 = a6; if ( a2 == a5 ) { while ( v14 < &a2[v10] ) { *v14 = *(_BYTE *)(v11 + *v14); ++v14; } } else { while ( v12 < &a5[v10] ) { v6 = v12++; v7 = v14++; *v7 = *(_BYTE *)(v11 + *v6); } } *a4 -= v10; return (_BYTE *)(v14 - a2); }
my_strnxfrm_simple_internal: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RCX] CMP RAX,RCX JNC 0x0014bc89 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x60],RAX JMP 0x0014bc93 LAB_0014bc89: MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX] MOV qword ptr [RBP + -0x60],RAX LAB_0014bc93: MOV RAX,qword ptr [RBP + -0x60] MOV dword ptr [RBP + -0x44],EAX MOV EAX,EAX CMP RAX,qword ptr [RBP + -0x30] JBE 0x0014bca9 MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x44],EAX LAB_0014bca9: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x28] JZ 0x0014bcf9 MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RBP + -0x44] ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX LAB_0014bcc1: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x50] JNC 0x0014bcf7 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x28] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x28],RDX MOVZX ECX,byte ptr [RCX] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL JMP 0x0014bcc1 LAB_0014bcf7: JMP 0x0014bd35 LAB_0014bcf9: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x44] ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX LAB_0014bd07: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x58] JNC 0x0014bd33 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RCX] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x0014bd07 LAB_0014bd33: JMP 0x0014bd35 LAB_0014bd35: MOV EDX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX] SUB ECX,EDX MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX POP RBP RET
long my_strnxfrm_simple_internal (long param_1,byte *param_2,ulong param_3,uint *param_4,byte *param_5,ulong param_6) { long lVar1; ulong local_68; uint local_4c; byte *local_30; byte *local_18; lVar1 = *(long *)(param_1 + 0x58); local_68 = param_3; if (*param_4 <= param_3) { local_68 = (ulong)*param_4; } local_4c = (uint)local_68; if (param_6 < (local_68 & 0xffffffff)) { local_4c = (uint)param_6; } if (param_2 == param_5) { for (local_18 = param_2; local_18 < param_2 + local_4c; local_18 = local_18 + 1) { *local_18 = *(byte *)(lVar1 + (ulong)*local_18); } } else { local_30 = param_5; local_18 = param_2; while (local_30 < param_5 + local_4c) { *local_18 = *(byte *)(lVar1 + (ulong)*local_30); local_30 = local_30 + 1; local_18 = local_18 + 1; } } *param_4 = *param_4 - local_4c; return (long)local_18 - (long)param_2; }
35,022
minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const
monkey531[P]llama/common/minja.hpp
Value call(const std::shared_ptr<Context> & context, ArgumentsValue & args) const { if (!callable_) throw std::runtime_error("Value is not callable: " + dump()); return (*callable_)(context, args); }
O1
cpp
minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const: pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rsi, %r14 movq 0x30(%rsi), %rsi testq %rsi, %rsi je 0x78db7 cmpq $0x0, 0x10(%rsi) je 0x78e12 movq %rdi, %rbx callq *0x18(%rsi) movq %rbx, %rax addq $0x40, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x10, %edi callq 0x19370 movq %rax, %rbx movq %rsp, %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x6c964 leaq 0x45bf7(%rip), %rsi # 0xbe9d4 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x3779b movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x19ac0 xorl %ebp, %ebp movq 0x761e5(%rip), %rsi # 0xeefe8 movq 0x7615e(%rip), %rdx # 0xeef68 movq %rbx, %rdi callq 0x19b70 callq 0x19250 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x78e3d movq 0x30(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x78e3d movq %rax, %r14 movb $0x1, %bpl leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x78e60 movq 0x10(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x78e60 movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x78e6d movq %rbx, %rdi callq 0x19510 movq %r14, %rdi callq 0x19be0 nop
_ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE: push rbp push r14 push rbx sub rsp, 40h mov r14, rsi mov rsi, [rsi+30h] test rsi, rsi jz short loc_78DB7 cmp qword ptr [rsi+10h], 0 jz short loc_78E12 mov rbx, rdi call qword ptr [rsi+18h] mov rax, rbx add rsp, 40h pop rbx pop r14 pop rbp retn loc_78DB7: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aValueIsNotCall; "Value is not callable: " lea rdi, [rsp+58h+var_38] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+58h+var_38] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_78E12: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) mov r14, rax lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_78E3D mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_78E3D mov r14, rax mov bpl, 1 loc_78E3D: lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_78E60 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_78E60 mov r14, rax mov bpl, 1 loc_78E60: test bpl, bpl jz short loc_78E6D mov rdi, rbx; void * call ___cxa_free_exception loc_78E6D: mov rdi, r14 call __Unwind_Resume
long long minja::Value::call(long long a1, long long a2) { long long v3; // rsi void *exception; // rbx _BYTE v6[16]; // [rsp+0h] [rbp-58h] BYREF _BYTE v7[16]; // [rsp+20h] [rbp-38h] BYREF v3 = *(_QWORD *)(a2 + 48); if ( !v3 ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v6, a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v7, (long long)"Value is not callable: ", (long long)v6); std::runtime_error::runtime_error(exception, v7); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( !*(_QWORD *)(v3 + 16) ) std::__throw_bad_function_call(); (*(void (**)(void))(v3 + 24))(); return a1; }
call: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RSI MOV RSI,qword ptr [RSI + 0x30] TEST RSI,RSI JZ 0x00178db7 CMP qword ptr [RSI + 0x10],0x0 JZ 0x00178e12 MOV RBX,RDI CALL qword ptr [RSI + 0x18] MOV RAX,RBX ADD RSP,0x40 POP RBX POP R14 POP RBP RET LAB_00178db7: MOV EDI,0x10 CALL 0x00119370 MOV RBX,RAX LAB_00178dc4: MOV RDI,RSP MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x0016c964 LAB_00178dd6: LEA RSI,[0x1be9d4] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x0013779b MOV BPL,0x1 LAB_00178ded: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x00119ac0 XOR EBP,EBP MOV RSI,qword ptr [0x001eefe8] MOV RDX,qword ptr [0x001eef68] MOV RDI,RBX CALL 0x00119b70 LAB_00178e12: CALL 0x00119250
/* minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const */ shared_ptr * minja::Value::call(shared_ptr *param_1,ArgumentsValue *param_2) { long lVar1; runtime_error *this; int1 auStack_58 [32]; string local_38 [32]; lVar1 = *(long *)(param_2 + 0x30); if (lVar1 == 0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00178dc4 to 00178dd5 has its CatchHandler @ 00178e5a */ dump_abi_cxx11_((int)auStack_58,SUB81(param_2,0)); /* try { // try from 00178dd6 to 00178de9 has its CatchHandler @ 00178e37 */ std::operator+((char *)local_38,(string *)"Value is not callable: "); /* try { // try from 00178ded to 00178e11 has its CatchHandler @ 00178e17 */ std::runtime_error::runtime_error(this,local_38); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001eefe8,PTR__runtime_error_001eef68); } if (*(long *)(lVar1 + 0x10) != 0) { (**(code **)(lVar1 + 0x18))(); return param_1; } /* WARNING: Subroutine does not return */ std::__throw_bad_function_call(); }
35,023
minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const
monkey531[P]llama/common/minja.hpp
Value call(const std::shared_ptr<Context> & context, ArgumentsValue & args) const { if (!callable_) throw std::runtime_error("Value is not callable: " + dump()); return (*callable_)(context, args); }
O3
cpp
minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const: pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rsi, %r14 movq 0x30(%rsi), %rsi testq %rsi, %rsi je 0x76fbf cmpq $0x0, 0x10(%rsi) je 0x7701a movq %rdi, %rbx callq *0x18(%rsi) movq %rbx, %rax addq $0x40, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x10, %edi callq 0x19370 movq %rax, %rbx movq %rsp, %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x6ac06 leaq 0x449df(%rip), %rsi # 0xbb9c4 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x36a3b movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x19ac0 xorl %ebp, %ebp movq 0x74fdd(%rip), %rsi # 0xebfe8 movq 0x74f56(%rip), %rdx # 0xebf68 movq %rbx, %rdi callq 0x19b70 callq 0x19250 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x7703d movq 0x30(%rsp), %rsi incq %rsi callq 0x196b0 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x77058 movq 0x10(%rsp), %rsi incq %rsi callq 0x196b0 testb %bpl, %bpl jne 0x77082 jmp 0x7708a movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x77082 movq 0x10(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x77082 movq %rax, %r14 movq %rbx, %rdi callq 0x19510 movq %r14, %rdi callq 0x19be0
_ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE: push rbp push r14 push rbx sub rsp, 40h mov r14, rsi mov rsi, [rsi+30h] test rsi, rsi jz short loc_76FBF cmp qword ptr [rsi+10h], 0 jz short loc_7701A mov rbx, rdi call qword ptr [rsi+18h] mov rax, rbx add rsp, 40h pop rbx pop r14 pop rbp retn loc_76FBF: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aValueIsNotCall; "Value is not callable: " lea rdi, [rsp+58h+var_38] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+58h+var_38] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_7701A: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) mov r14, rax lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_7703D mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7703D: lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_77058 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_77058: test bpl, bpl jnz short loc_77082 jmp short loc_7708A mov r14, rax lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_77082 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_77082 mov r14, rax loc_77082: mov rdi, rbx; void * call ___cxa_free_exception loc_7708A: mov rdi, r14 call __Unwind_Resume
long long minja::Value::call(long long a1, long long a2) { long long v3; // rsi void *exception; // rbx _BYTE v6[16]; // [rsp+0h] [rbp-58h] BYREF _BYTE v7[16]; // [rsp+20h] [rbp-38h] BYREF v3 = *(_QWORD *)(a2 + 48); if ( !v3 ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v6, a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v7, (long long)"Value is not callable: ", (long long)v6); std::runtime_error::runtime_error(exception, v7); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( !*(_QWORD *)(v3 + 16) ) std::__throw_bad_function_call(); (*(void (**)(void))(v3 + 24))(); return a1; }
call: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RSI MOV RSI,qword ptr [RSI + 0x30] TEST RSI,RSI JZ 0x00176fbf CMP qword ptr [RSI + 0x10],0x0 JZ 0x0017701a MOV RBX,RDI CALL qword ptr [RSI + 0x18] MOV RAX,RBX ADD RSP,0x40 POP RBX POP R14 POP RBP RET LAB_00176fbf: MOV EDI,0x10 CALL 0x00119370 MOV RBX,RAX LAB_00176fcc: MOV RDI,RSP MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x0016ac06 LAB_00176fde: LEA RSI,[0x1bb9c4] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x00136a3b MOV BPL,0x1 LAB_00176ff5: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x00119ac0 XOR EBP,EBP MOV RSI,qword ptr [0x001ebfe8] MOV RDX,qword ptr [0x001ebf68] MOV RDI,RBX CALL 0x00119b70 LAB_0017701a: CALL 0x00119250
/* minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const */ shared_ptr * minja::Value::call(shared_ptr *param_1,ArgumentsValue *param_2) { long lVar1; runtime_error *this; int1 auStack_58 [32]; string local_38 [32]; lVar1 = *(long *)(param_2 + 0x30); if (lVar1 == 0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00176fcc to 00176fdd has its CatchHandler @ 0017707f */ dump_abi_cxx11_((int)auStack_58,SUB81(param_2,0)); /* try { // try from 00176fde to 00176ff1 has its CatchHandler @ 0017705f */ std::operator+((char *)local_38,(string *)"Value is not callable: "); /* try { // try from 00176ff5 to 00177019 has its CatchHandler @ 0017701f */ std::runtime_error::runtime_error(this,local_38); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001ebfe8,PTR__runtime_error_001ebf68); } if (*(long *)(lVar1 + 0x10) != 0) { (**(code **)(lVar1 + 0x18))(); return param_1; } /* WARNING: Subroutine does not return */ std::__throw_bad_function_call(); }
35,024
bf_sqrtrem
bluesky950520[P]quickjs/libbf.c
int bf_sqrtrem(bf_t *r, bf_t *rem1, const bf_t *a) { int ret; if (a->len == 0) { if (a->expn == BF_EXP_NAN) { bf_set_nan(r); } else if (a->expn == BF_EXP_INF && a->sign) { goto invalid_op; } else { bf_set(r, a); } if (rem1) bf_set_ui(rem1, 0); ret = 0; } else if (a->sign) { invalid_op: bf_set_nan(r); if (rem1) bf_set_ui(rem1, 0); ret = BF_ST_INVALID_OP; } else { bf_t rem_s, *rem; bf_sqrt(r, a, (a->expn + 1) / 2, BF_RNDZ); bf_rint(r, BF_RNDZ); /* see if the result is exact by computing the remainder */ if (rem1) { rem = rem1; } else { rem = &rem_s; bf_init(r->ctx, rem); } /* XXX: could avoid recomputing the remainder */ bf_mul(rem, r, r, BF_PREC_INF, BF_RNDZ); bf_neg(rem); bf_add(rem, rem, a, BF_PREC_INF, BF_RNDZ); if (bf_is_nan(rem)) { ret = BF_ST_MEM_ERROR; goto done; } if (rem->len != 0) { ret = BF_ST_INEXACT; } else { ret = 0; } done: if (!rem1) bf_delete(rem); } return ret; }
O3
c
bf_sqrtrem: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %r15 movq %rsi, %rbx movq %rdi, %r14 movabsq $0x7fffffffffffffff, %rbp # imm = 0x7FFFFFFFFFFFFFFF cmpq $0x0, 0x18(%rdx) je 0x894f8 cmpl $0x0, 0x8(%r15) je 0x89548 cmpq $0x0, 0x18(%r14) je 0x894b5 movq (%r14), %rax movq 0x20(%r14), %rsi movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq %rax, 0x20(%r14) movq $0x0, 0x18(%r14) movq %rbp, 0x10(%r14) movl $0x0, 0x8(%r14) movl $0x1, %r14d testq %rbx, %rbx je 0x89689 movl $0x0, 0x8(%rbx) incq %rbp movq %rbp, 0x10(%rbx) cmpq $0x0, 0x18(%rbx) je 0x89689 movq (%rbx), %rax movq 0x20(%rbx), %rsi movq (%rax), %rdi jmp 0x895e2 movq 0x10(%r15), %rax movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE cmpq %rcx, %rax je 0x8959a cmpq %rbp, %rax jne 0x895a5 cmpq $0x0, 0x18(%r14) je 0x8953a movq (%r14), %rax movq 0x20(%r14), %rsi movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq %rax, 0x20(%r14) movq $0x0, 0x18(%r14) movq %rbp, 0x10(%r14) movl $0x0, 0x8(%r14) jmp 0x895b0 movq 0x10(%r15), %rax leaq 0x1(%rax), %rcx shrq $0x3f, %rcx leaq (%rax,%rcx), %rdx incq %rdx sarq %rdx movq %r14, %rdi movq %r15, %rsi movl $0x1, %ecx callq 0x896b8 movq 0x18(%r14), %rcx testq %rcx, %rcx je 0x89589 movq %r14, %rdi xorl %esi, %esi movl $0x11, %edx xorl %r8d, %r8d callq 0x86c43 testq %rbx, %rbx je 0x895f8 leaq 0x10(%rbx), %r13 movq %rbx, %r12 jmp 0x89622 cmpl $0x0, 0x8(%r15) jne 0x89493 movq %r14, %rdi movq %r15, %rsi callq 0x86a9a xorl %r14d, %r14d testq %rbx, %rbx je 0x89689 movl $0x0, 0x8(%rbx) incq %rbp movq %rbp, 0x10(%rbx) cmpq $0x0, 0x18(%rbx) je 0x89689 movq (%rbx), %rax movq 0x20(%rbx), %rsi movq (%rax), %rdi xorl %r14d, %r14d xorl %edx, %edx callq *0x8(%rax) movq %rax, 0x20(%rbx) movq $0x0, 0x18(%rbx) jmp 0x89689 leaq 0x18(%rsp), %rax leaq 0x10(%rsp), %r13 movq (%r14), %rcx movq %rcx, -0x10(%r13) movl $0x0, -0x8(%r13) leaq 0x1(%rbp), %rcx movq %rcx, (%r13) xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq %rsp, %r12 movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF movq %r12, %rdi movq %r14, %rsi movq %r14, %rdx movq %rcx, %r14 movl $0x1, %r8d callq 0x8853c xorb $0x1, 0x8(%r12) leaq 0x447(%rip), %r9 # 0x89a97 movq %r12, %rdi movq %r12, %rsi movq %r15, %rdx movq %r14, %rcx movl $0x1, %r8d callq 0x899fd movl $0x20, %r14d cmpq %rbp, (%r13) je 0x89684 xorl %r14d, %r14d cmpq $0x0, 0x18(%r12) setne %r14b shll $0x4, %r14d testq %rbx, %rbx je 0x8969b movl %r14d, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq (%r12), %rax testq %rax, %rax je 0x89689 movq 0x20(%r12), %rsi testq %rsi, %rsi je 0x89689 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) jmp 0x89689
bf_sqrtrem: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r15, rdx mov rbx, rsi mov r14, rdi mov rbp, 7FFFFFFFFFFFFFFFh cmp qword ptr [rdx+18h], 0 jz short loc_894F8 cmp dword ptr [r15+8], 0 jz loc_89548 loc_89493: cmp qword ptr [r14+18h], 0 jz short loc_894B5 mov rax, [r14] mov rsi, [r14+20h] mov rdi, [rax] xor edx, edx call qword ptr [rax+8] mov [r14+20h], rax mov qword ptr [r14+18h], 0 loc_894B5: mov [r14+10h], rbp mov dword ptr [r14+8], 0 mov r14d, 1 test rbx, rbx jz loc_89689 mov dword ptr [rbx+8], 0 inc rbp mov [rbx+10h], rbp cmp qword ptr [rbx+18h], 0 jz loc_89689 mov rax, [rbx] mov rsi, [rbx+20h] mov rdi, [rax] jmp loc_895E2 loc_894F8: mov rax, [r15+10h] mov rcx, 7FFFFFFFFFFFFFFEh cmp rax, rcx jz loc_8959A cmp rax, rbp jnz loc_895A5 cmp qword ptr [r14+18h], 0 jz short loc_8953A mov rax, [r14] mov rsi, [r14+20h] mov rdi, [rax] xor edx, edx call qword ptr [rax+8] mov [r14+20h], rax mov qword ptr [r14+18h], 0 loc_8953A: mov [r14+10h], rbp mov dword ptr [r14+8], 0 jmp short loc_895B0 loc_89548: mov rax, [r15+10h] lea rcx, [rax+1] shr rcx, 3Fh lea rdx, [rax+rcx] inc rdx sar rdx, 1 mov rdi, r14 mov rsi, r15 mov ecx, 1 call bf_sqrt mov rcx, [r14+18h] test rcx, rcx jz short loc_89589 mov rdi, r14 xor esi, esi mov edx, 11h xor r8d, r8d call __bf_round loc_89589: test rbx, rbx jz short loc_895F8 lea r13, [rbx+10h] mov r12, rbx jmp loc_89622 loc_8959A: cmp dword ptr [r15+8], 0 jnz loc_89493 loc_895A5: mov rdi, r14 mov rsi, r15 call bf_set loc_895B0: xor r14d, r14d test rbx, rbx jz loc_89689 mov dword ptr [rbx+8], 0 inc rbp mov [rbx+10h], rbp cmp qword ptr [rbx+18h], 0 jz loc_89689 mov rax, [rbx] mov rsi, [rbx+20h] mov rdi, [rax] xor r14d, r14d loc_895E2: xor edx, edx call qword ptr [rax+8] mov [rbx+20h], rax mov qword ptr [rbx+18h], 0 jmp loc_89689 loc_895F8: lea rax, [rsp+58h+var_40] lea r13, [rsp+58h+var_48] mov rcx, [r14] mov [r13-10h], rcx mov dword ptr [r13-8], 0 lea rcx, [rbp+1] mov [r13+0], rcx xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov r12, rsp loc_89622: mov rcx, 3FFFFFFFFFFFFFFFh mov rdi, r12 mov rsi, r14 mov rdx, r14 mov r14, rcx mov r8d, 1 call bf_mul xor byte ptr [r12+8], 1 lea r9, __bf_add mov rdi, r12 mov rsi, r12 mov rdx, r15 mov rcx, r14 mov r8d, 1 call bf_op2 mov r14d, 20h ; ' ' cmp [r13+0], rbp jz short loc_89684 xor r14d, r14d cmp qword ptr [r12+18h], 0 setnz r14b shl r14d, 4 loc_89684: test rbx, rbx jz short loc_8969B loc_89689: mov eax, r14d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8969B: mov rax, [r12] test rax, rax jz short loc_89689 mov rsi, [r12+20h] test rsi, rsi jz short loc_89689 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] jmp short loc_89689
long long bf_sqrtrem(_QWORD **a1, long long **a2, long long a3) { unsigned int v5; // r14d long long *v6; // rax long long *v7; // rsi long long v8; // rdi long long v9; // rax unsigned long long v10; // rcx unsigned long long *v11; // r13 __int128 *v12; // r12 long long v13; // rcx long long v14; // r8 long long v15; // r9 _QWORD *v17; // rsi _QWORD *v18; // [rsp+0h] [rbp-58h] BYREF int v19; // [rsp+8h] [rbp-50h] unsigned long long v20; // [rsp+10h] [rbp-48h] BYREF __int128 v21; // [rsp+18h] [rbp-40h] if ( *(_QWORD *)(a3 + 24) ) { if ( !*(_DWORD *)(a3 + 8) ) { bf_sqrt( a1, a3, (long long)(*(_QWORD *)(a3 + 16) + ((unsigned long long)(*(_QWORD *)(a3 + 16) + 1LL) >> 63) + 1) >> 1, 1LL); v10 = (unsigned long long)a1[3]; if ( v10 ) _bf_round(a1, 0LL, 0x11u, v10, 0); if ( a2 ) { v11 = (unsigned long long *)(a2 + 2); v12 = (__int128 *)a2; } else { v11 = &v20; v18 = *a1; v19 = 0; v20 = 0x8000000000000000LL; v21 = 0LL; v12 = (__int128 *)&v18; } bf_mul(v12, (long long)a1, (long long)a1, 0x3FFFFFFFFFFFFFFFLL, 1u); *((_BYTE *)v12 + 8) ^= 1u; bf_op2(v12, v12, a3, 0x3FFFFFFFFFFFFFFFLL, 1LL, _bf_add); v5 = 32; if ( *v11 != 0x7FFFFFFFFFFFFFFFLL ) v5 = 16 * (*((_QWORD *)v12 + 3) != 0LL); if ( !a2 ) { if ( *(_QWORD *)v12 ) { v17 = (_QWORD *)*((_QWORD *)v12 + 4); if ( v17 ) (*(void ( **)(_QWORD, _QWORD *, _QWORD, long long, long long, long long, _QWORD *, int, unsigned long long, _QWORD, _QWORD))(*(_QWORD *)v12 + 8LL))( **(_QWORD **)v12, v17, 0LL, v13, v14, v15, v18, v19, v20, v21, *((_QWORD *)&v21 + 1)); } } return v5; } goto LABEL_3; } v9 = *(_QWORD *)(a3 + 16); if ( v9 == 0x7FFFFFFFFFFFFFFELL ) { if ( *(_DWORD *)(a3 + 8) ) { LABEL_3: if ( a1[3] ) { a1[4] = (_QWORD *)((long long ( *)(_QWORD, _QWORD *, _QWORD))(*a1)[1])(**a1, a1[4], 0LL); a1[3] = 0LL; } a1[2] = (_QWORD *)0x7FFFFFFFFFFFFFFFLL; *((_DWORD *)a1 + 2) = 0; v5 = 1; if ( a2 ) { *((_DWORD *)a2 + 2) = 0; a2[2] = (long long *)0x8000000000000000LL; if ( a2[3] ) { v6 = *a2; v7 = a2[4]; v8 = **a2; LABEL_22: a2[4] = (long long *)((long long ( *)(long long, long long *, _QWORD))v6[1])(v8, v7, 0LL); a2[3] = 0LL; return v5; } } return v5; } goto LABEL_18; } if ( v9 != 0x7FFFFFFFFFFFFFFFLL ) { LABEL_18: bf_set(a1, a3); goto LABEL_19; } if ( a1[3] ) { a1[4] = (_QWORD *)((long long ( *)(_QWORD, _QWORD *, _QWORD))(*a1)[1])(**a1, a1[4], 0LL); a1[3] = 0LL; } a1[2] = (_QWORD *)0x7FFFFFFFFFFFFFFFLL; *((_DWORD *)a1 + 2) = 0; LABEL_19: v5 = 0; if ( a2 ) { *((_DWORD *)a2 + 2) = 0; a2[2] = (long long *)0x8000000000000000LL; if ( a2[3] ) { v6 = *a2; v7 = a2[4]; v8 = **a2; v5 = 0; goto LABEL_22; } } return v5; }
bf_sqrtrem: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15,RDX MOV RBX,RSI MOV R14,RDI MOV RBP,0x7fffffffffffffff CMP qword ptr [RDX + 0x18],0x0 JZ 0x001894f8 CMP dword ptr [R15 + 0x8],0x0 JZ 0x00189548 LAB_00189493: CMP qword ptr [R14 + 0x18],0x0 JZ 0x001894b5 MOV RAX,qword ptr [R14] MOV RSI,qword ptr [R14 + 0x20] MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] MOV qword ptr [R14 + 0x20],RAX MOV qword ptr [R14 + 0x18],0x0 LAB_001894b5: MOV qword ptr [R14 + 0x10],RBP MOV dword ptr [R14 + 0x8],0x0 MOV R14D,0x1 TEST RBX,RBX JZ 0x00189689 MOV dword ptr [RBX + 0x8],0x0 INC RBP MOV qword ptr [RBX + 0x10],RBP CMP qword ptr [RBX + 0x18],0x0 JZ 0x00189689 MOV RAX,qword ptr [RBX] MOV RSI,qword ptr [RBX + 0x20] MOV RDI,qword ptr [RAX] JMP 0x001895e2 LAB_001894f8: MOV RAX,qword ptr [R15 + 0x10] MOV RCX,0x7ffffffffffffffe CMP RAX,RCX JZ 0x0018959a CMP RAX,RBP JNZ 0x001895a5 CMP qword ptr [R14 + 0x18],0x0 JZ 0x0018953a MOV RAX,qword ptr [R14] MOV RSI,qword ptr [R14 + 0x20] MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] MOV qword ptr [R14 + 0x20],RAX MOV qword ptr [R14 + 0x18],0x0 LAB_0018953a: MOV qword ptr [R14 + 0x10],RBP MOV dword ptr [R14 + 0x8],0x0 JMP 0x001895b0 LAB_00189548: MOV RAX,qword ptr [R15 + 0x10] LEA RCX,[RAX + 0x1] SHR RCX,0x3f LEA RDX,[RAX + RCX*0x1] INC RDX SAR RDX,0x1 MOV RDI,R14 MOV RSI,R15 MOV ECX,0x1 CALL 0x001896b8 MOV RCX,qword ptr [R14 + 0x18] TEST RCX,RCX JZ 0x00189589 MOV RDI,R14 XOR ESI,ESI MOV EDX,0x11 XOR R8D,R8D CALL 0x00186c43 LAB_00189589: TEST RBX,RBX JZ 0x001895f8 LEA R13,[RBX + 0x10] MOV R12,RBX JMP 0x00189622 LAB_0018959a: CMP dword ptr [R15 + 0x8],0x0 JNZ 0x00189493 LAB_001895a5: MOV RDI,R14 MOV RSI,R15 CALL 0x00186a9a LAB_001895b0: XOR R14D,R14D TEST RBX,RBX JZ 0x00189689 MOV dword ptr [RBX + 0x8],0x0 INC RBP MOV qword ptr [RBX + 0x10],RBP CMP qword ptr [RBX + 0x18],0x0 JZ 0x00189689 MOV RAX,qword ptr [RBX] MOV RSI,qword ptr [RBX + 0x20] MOV RDI,qword ptr [RAX] XOR R14D,R14D LAB_001895e2: XOR EDX,EDX CALL qword ptr [RAX + 0x8] MOV qword ptr [RBX + 0x20],RAX MOV qword ptr [RBX + 0x18],0x0 JMP 0x00189689 LAB_001895f8: LEA RAX,[RSP + 0x18] LEA R13,[RSP + 0x10] MOV RCX,qword ptr [R14] MOV qword ptr [R13 + -0x10],RCX MOV dword ptr [R13 + -0x8],0x0 LEA RCX,[RBP + 0x1] MOV qword ptr [R13],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV R12,RSP LAB_00189622: MOV RCX,0x3fffffffffffffff MOV RDI,R12 MOV RSI,R14 MOV RDX,R14 MOV R14,RCX MOV R8D,0x1 CALL 0x0018853c XOR byte ptr [R12 + 0x8],0x1 LEA R9,[0x189a97] MOV RDI,R12 MOV RSI,R12 MOV RDX,R15 MOV RCX,R14 MOV R8D,0x1 CALL 0x001899fd MOV R14D,0x20 CMP qword ptr [R13],RBP JZ 0x00189684 XOR R14D,R14D CMP qword ptr [R12 + 0x18],0x0 SETNZ R14B SHL R14D,0x4 LAB_00189684: TEST RBX,RBX JZ 0x0018969b LAB_00189689: MOV EAX,R14D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018969b: MOV RAX,qword ptr [R12] TEST RAX,RAX JZ 0x00189689 MOV RSI,qword ptr [R12 + 0x20] TEST RSI,RSI JZ 0x00189689 MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] JMP 0x00189689
int bf_sqrtrem(long *param_1,long *param_2,long param_3) { long lVar1; int8 *puVar2; int8 uVar3; long *plVar4; long *plVar5; int iVar6; long local_58; int4 local_50; long local_48 [3]; plVar4 = &local_58; if (*(long *)(param_3 + 0x18) == 0) { if (*(long *)(param_3 + 0x10) != 0x7ffffffffffffffe) { if (*(long *)(param_3 + 0x10) == 0x7fffffffffffffff) { if (param_1[3] != 0) { lVar1 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0); param_1[4] = lVar1; param_1[3] = 0; } param_1[2] = 0x7fffffffffffffff; *(int4 *)(param_1 + 1) = 0; } else { LAB_001895a5: bf_set(param_1,param_3); } if (param_2 == (long *)0x0) { return 0; } *(int4 *)(param_2 + 1) = 0; param_2[2] = -0x8000000000000000; if (param_2[3] == 0) { return 0; } puVar2 = (int8 *)*param_2; lVar1 = param_2[4]; uVar3 = *puVar2; iVar6 = 0; goto LAB_001895e2; } if (*(int *)(param_3 + 8) == 0) goto LAB_001895a5; } else if (*(int *)(param_3 + 8) == 0) { bf_sqrt(param_1,param_3, (*(long *)(param_3 + 0x10) - (*(long *)(param_3 + 0x10) + 1 >> 0x3f)) + 1 >> 1,1); if (param_1[3] != 0) { __bf_round(param_1,0,0x11,param_1[3],0); } if (param_2 == (long *)0x0) { plVar5 = local_48; local_58 = *param_1; local_50 = 0; local_48[0] = -0x8000000000000000; local_48[1] = 0; local_48[2] = 0; } else { plVar5 = param_2 + 2; plVar4 = param_2; } bf_mul(plVar4,param_1,param_1,0x3fffffffffffffff,1); *(byte *)(plVar4 + 1) = *(byte *)(plVar4 + 1) ^ 1; bf_op2(plVar4,plVar4,param_3,0x3fffffffffffffff,1,__bf_add); iVar6 = 0x20; if (*plVar5 != 0x7fffffffffffffff) { iVar6 = (uint)(plVar4[3] != 0) << 4; } if (param_2 != (long *)0x0) { return iVar6; } puVar2 = (int8 *)*plVar4; if (puVar2 == (int8 *)0x0) { return iVar6; } if (plVar4[4] == 0) { return iVar6; } (*(code *)puVar2[1])(*puVar2,plVar4[4],0); return iVar6; } if (param_1[3] != 0) { lVar1 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0); param_1[4] = lVar1; param_1[3] = 0; } param_1[2] = 0x7fffffffffffffff; *(int4 *)(param_1 + 1) = 0; iVar6 = 1; if (param_2 == (long *)0x0) { return 1; } *(int4 *)(param_2 + 1) = 0; param_2[2] = -0x8000000000000000; if (param_2[3] == 0) { return 1; } puVar2 = (int8 *)*param_2; lVar1 = param_2[4]; uVar3 = *puVar2; LAB_001895e2: lVar1 = (*(code *)puVar2[1])(uVar3,lVar1,0); param_2[4] = lVar1; param_2[3] = 0; return iVar6; }
35,025
ma_ft_erase
eloqsql/storage/maria/ma_ft_update.c
static int _ma_ft_erase(MARIA_HA *info, uint keynr, uchar *keybuf, FT_WORD *wlist, my_off_t filepos) { uint err=0; DBUG_ENTER("_ma_ft_erase"); for (; wlist->pos; wlist++) { MARIA_KEY key; _ma_ft_make_key(info, &key, keynr, keybuf, wlist, filepos); if (_ma_ck_delete(info, &key)) err=1; } DBUG_RETURN(err); }
O3
c
ma_ft_erase: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp cmpq $0x0, (%rcx) je 0x60021 movq %r8, %r12 movq %rcx, %r15 movq %rdx, %r14 movq %rdi, -0x38(%rbp) xorl %r13d, %r13d movl %esi, -0x2c(%rbp) movq -0x38(%rbp), %rbx movq %rbx, %rdi leaq -0x58(%rbp), %rsi movl -0x2c(%rbp), %edx movq %r14, %rcx movq %r15, %r8 movq %r12, %r9 callq 0x5ff09 movq %rbx, %rdi leaq -0x58(%rbp), %rsi callq 0x58e25 testb %al, %al movl $0x1, %eax cmovnel %eax, %r13d cmpq $0x0, 0x18(%r15) leaq 0x18(%r15), %r15 jne 0x5ffe5 jmp 0x60024 xorl %r13d, %r13d movl %r13d, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ma_ft_erase: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h cmp qword ptr [rcx], 0 jz short loc_60021 mov r12, r8 mov r15, rcx mov r14, rdx mov [rbp+var_38], rdi xor r13d, r13d mov [rbp+var_2C], esi mov rbx, [rbp+var_38] loc_5FFE5: mov rdi, rbx lea rsi, [rbp+var_58] mov edx, [rbp+var_2C] mov rcx, r14 mov r8, r15 mov r9, r12 call _ma_ft_make_key mov rdi, rbx lea rsi, [rbp+var_58] call _ma_ck_delete test al, al mov eax, 1 cmovnz r13d, eax cmp qword ptr [r15+18h], 0 lea r15, [r15+18h] jnz short loc_5FFE5 jmp short loc_60024 loc_60021: xor r13d, r13d loc_60024: mov eax, r13d add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_ft_erase(_DWORD *a1, unsigned int a2, char *a3, _QWORD *a4, long long a5, __m128i a6) { long long v7; // r15 unsigned int v9; // r13d bool v10; // zf long long v12[5]; // [rsp+8h] [rbp-58h] BYREF unsigned int v13; // [rsp+34h] [rbp-2Ch] if ( *a4 ) { v7 = (long long)a4; v12[4] = (long long)a1; v9 = 0; v13 = a2; do { ma_ft_make_key(a1, (long long)v12, v13, a3, v7, a5, a6); if ( ma_ck_delete((_QWORD **)a1, v12) ) v9 = 1; v10 = *(_QWORD *)(v7 + 24) == 0LL; v7 += 24LL; } while ( !v10 ); } else { return 0; } return v9; }
_ma_ft_erase: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 CMP qword ptr [RCX],0x0 JZ 0x00160021 MOV R12,R8 MOV R15,RCX MOV R14,RDX MOV qword ptr [RBP + -0x38],RDI XOR R13D,R13D MOV dword ptr [RBP + -0x2c],ESI MOV RBX,qword ptr [RBP + -0x38] LAB_0015ffe5: MOV RDI,RBX LEA RSI,[RBP + -0x58] MOV EDX,dword ptr [RBP + -0x2c] MOV RCX,R14 MOV R8,R15 MOV R9,R12 CALL 0x0015ff09 MOV RDI,RBX LEA RSI,[RBP + -0x58] CALL 0x00158e25 TEST AL,AL MOV EAX,0x1 CMOVNZ R13D,EAX CMP qword ptr [R15 + 0x18],0x0 LEA R15,[R15 + 0x18] JNZ 0x0015ffe5 JMP 0x00160024 LAB_00160021: XOR R13D,R13D LAB_00160024: MOV EAX,R13D ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 _ma_ft_erase(int8 param_1,int4 param_2,int8 param_3,long *param_4, int8 param_5) { long *plVar1; char cVar2; int4 uVar3; int1 local_60 [32]; int8 local_40; int4 local_34; if (*param_4 == 0) { uVar3 = 0; } else { uVar3 = 0; local_40 = param_1; local_34 = param_2; do { _ma_ft_make_key(param_1,local_60,local_34,param_3,param_4,param_5); cVar2 = _ma_ck_delete(param_1,local_60); if (cVar2 != '\0') { uVar3 = 1; } plVar1 = param_4 + 3; param_4 = param_4 + 3; } while (*plVar1 != 0); } return uVar3; }
35,026
window_title::update()
untodesu[P]voxelius/game/client/window_title.cc
void window_title::update(void) { auto string = fmt::format("Voxelius {}: {}", PROJECT_VERSION_STRING, splash::get()); glfwSetWindowTitle(globals::window, string.c_str()); }
O1
cpp
window_title::update(): pushq %rbx subq $0x40, %rsp callq 0x7ed1f leaq 0x129232(%rip), %rcx # 0x19b4bb leaq 0x20(%rsp), %r8 movq %rcx, (%r8) movq %rax, 0x10(%r8) leaq 0x12cd08(%rip), %rsi # 0x19efa4 movq %rsp, %rbx movl $0xf, %edx movl $0xcc, %ecx movq %rbx, %rdi callq 0x147c0b leaq 0x1ebce8(%rip), %rax # 0x25dfa0 movq (%rax), %rdi movq (%rbx), %rsi callq 0x9e3d0 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x722de movq 0x10(%rsp), %rsi incq %rsi callq 0x268d0 addq $0x40, %rsp popq %rbx retq movq %rax, %rbx leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x72302 movq 0x10(%rsp), %rsi incq %rsi callq 0x268d0 movq %rbx, %rdi callq 0x26fe0 nop
_ZN12window_title6updateEv: push rbx sub rsp, 40h call _ZN6splash3getEv; splash::get(void) lea rcx, a0012512; "0.0.1.2512" lea r8, [rsp+48h+var_28] mov [r8], rcx mov [r8+10h], rax lea rsi, aVoxelius_0; "Voxelius {}: {}" mov rbx, rsp mov edx, 0Fh mov ecx, 0CCh mov rdi, rbx call _ZN3fmt3v117vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_7contextEEE; fmt::v11::vformat(fmt::v11::basic_string_view<char>,fmt::v11::basic_format_args<fmt::v11::context>) lea rax, _ZN7globals6windowE; globals::window mov rdi, [rax] mov rsi, [rbx] call glfwSetWindowTitle lea rax, [rsp+48h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_722DE mov rsi, [rsp+48h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_722DE: add rsp, 40h pop rbx retn mov rbx, rax lea rax, [rsp+arg_8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_72302 mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_72302: mov rdi, rbx call __Unwind_Resume
void window_title::update(window_title *this) { int v1; // r9d long long *v2; // [rsp+0h] [rbp-48h] BYREF long long v3; // [rsp+10h] [rbp-38h] BYREF _QWORD v4[5]; // [rsp+20h] [rbp-28h] BYREF v4[0] = "0.0.1.2512"; v4[2] = splash::get(this); fmt::v11::vformat[abi:cxx11]((unsigned int)&v2, (unsigned int)"Voxelius {}: {}", 15, 204, (unsigned int)v4, v1); glfwSetWindowTitle(globals::window, v2); if ( v2 != &v3 ) operator delete(v2, v3 + 1); }
update: PUSH RBX SUB RSP,0x40 CALL 0x0017ed1f LEA RCX,[0x29b4bb] LEA R8,[RSP + 0x20] MOV qword ptr [R8],RCX MOV qword ptr [R8 + 0x10],RAX LEA RSI,[0x29efa4] MOV RBX,RSP MOV EDX,0xf MOV ECX,0xcc MOV RDI,RBX CALL 0x00247c0b LEA RAX,[0x35dfa0] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBX] LAB_001722be: CALL 0x0019e3d0 LAB_001722c3: LEA RAX,[RSP + 0x10] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001722de MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x001268d0 LAB_001722de: ADD RSP,0x40 POP RBX RET
/* window_title::update() */ void window_title::update(void) { long *local_48 [2]; long local_38 [2]; char *local_28; int8 local_18; local_18 = splash::get(); local_28 = "0.0.1.2512"; fmt::v11::vformat_abi_cxx11_(local_48,"Voxelius {}: {}",0xf,0xcc); /* try { // try from 001722be to 001722c2 has its CatchHandler @ 001722e4 */ glfwSetWindowTitle(globals::window,local_48[0]); if (local_48[0] != local_38) { operator_delete(local_48[0],local_38[0] + 1); } return; }
35,027
void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, 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>::array_t&&)
monkey531[P]llama/common/./json.hpp
static void construct(BasicJsonType& j, typename BasicJsonType::array_t&& arr) { j.m_data.m_value.destroy(j.m_data.m_type); j.m_data.m_type = value_t::array; j.m_data.m_value = std::move(arr); j.set_parents(); j.assert_invariant(); }
O1
cpp
void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, 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>::array_t&&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 addq $0x8, %rdi movzbl (%r14), %esi callq 0x2a5aa movb $0x2, (%r14) movl $0x18, %edi callq 0x19790 movups (%rbx), %xmm0 movups %xmm0, (%rax) movq 0x10(%rbx), %rcx movq %rcx, 0x10(%rax) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq $0x0, 0x10(%rbx) movq %rax, 0x8(%r14) addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE2EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_ONSJ_7array_tE: push r14 push rbx push rax mov rbx, rsi mov r14, rdi add rdi, 8 movzx esi, byte ptr [r14] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_value7destroyENS0_6detail7value_tE; 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_value::destroy(nlohmann::json_abi_v3_11_3::detail::value_t) mov byte ptr [r14], 2 mov edi, 18h; unsigned __int64 call __Znwm; operator new(ulong) movups xmm0, xmmword ptr [rbx] movups xmmword ptr [rax], xmm0 mov rcx, [rbx+10h] mov [rax+10h], rcx xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov qword ptr [rbx+10h], 0 mov [r14+8], rax add rsp, 8 pop rbx pop r14 retn
long long nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<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>>( unsigned __int8 *a1, long long a2) { long long result; // rax 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::destroy( (void **)a1 + 1, *a1); *a1 = 2; result = operator new(0x18uLL); *(_OWORD *)result = *(_OWORD *)a2; *(_QWORD *)(result + 16) = *(_QWORD *)(a2 + 16); *(_OWORD *)a2 = 0LL; *(_QWORD *)(a2 + 16) = 0LL; *((_QWORD *)a1 + 1) = result; return result; }
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI ADD RDI,0x8 MOVZX ESI,byte ptr [R14] CALL 0x0012a5aa MOV byte ptr [R14],0x2 MOV EDI,0x18 CALL 0x00119790 MOVUPS XMM0,xmmword ptr [RBX] MOVUPS xmmword ptr [RAX],XMM0 MOV RCX,qword ptr [RBX + 0x10] MOV qword ptr [RAX + 0x10],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBX + 0x10],0x0 MOV qword ptr [R14 + 0x8],RAX ADD RSP,0x8 POP RBX POP R14 RET
/* void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, 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>::array_t&&) */ void nlohmann::json_abi_v3_11_3::detail:: external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>:: construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (basic_json *param_1,array_t *param_2) { int8 uVar1; int8 *puVar2; 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::destroy((json_value *)(param_1 + 8),*param_1); *param_1 = (basic_json)0x2; puVar2 = (int8 *)operator_new(0x18); uVar1 = *(int8 *)(param_2 + 8); *puVar2 = *(int8 *)param_2; puVar2[1] = uVar1; puVar2[2] = *(int8 *)(param_2 + 0x10); *(int8 *)param_2 = 0; *(int8 *)(param_2 + 8) = 0; *(int8 *)(param_2 + 0x10) = 0; *(int8 **)(param_1 + 8) = puVar2; return; }
35,028
psi_rwlock_wrlock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_rwlock_wrlock(mysql_rwlock_t *that, const char *file, uint line) { PSI_rwlock_locker_state state; PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_wrwait) (&state, that->m_psi, PSI_RWLOCK_WRITELOCK, file, line); int result= rw_wrlock(&that->m_rwlock); if (locker) PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result); return result; }
O0
c
psi_rwlock_wrlock: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) leaq 0x1a6c4e(%rip), %rax # 0x1d8c48 movq (%rax), %rax movq 0x1b0(%rax), %rax movq -0x8(%rbp), %rcx movq 0x90(%rcx), %rsi movq -0x10(%rbp), %rcx movl -0x14(%rbp), %r8d leaq -0x48(%rbp), %rdi movl $0x1, %edx callq *%rax movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rdi callq 0x32610 movl %eax, -0x54(%rbp) cmpq $0x0, -0x50(%rbp) je 0x32053 leaq 0x1a6c08(%rip), %rax # 0x1d8c48 movq (%rax), %rax movq 0x1b8(%rax), %rax movq -0x50(%rbp), %rdi movl -0x54(%rbp), %esi callq *%rax movl -0x54(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopl (%rax)
psi_rwlock_wrlock: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx lea rax, PSI_server mov rax, [rax] mov rax, [rax+1B0h] mov rcx, [rbp+var_8] mov rsi, [rcx+90h] mov rcx, [rbp+var_10] mov r8d, [rbp+var_14] lea rdi, [rbp+var_48] mov edx, 1 call rax mov [rbp+var_50], rax mov rdi, [rbp+var_8] call my_rw_wrlock mov [rbp+var_54], eax cmp [rbp+var_50], 0 jz short loc_32053 lea rax, PSI_server mov rax, [rax] mov rax, [rax+1B8h] mov rdi, [rbp+var_50] mov esi, [rbp+var_54] call rax loc_32053: mov eax, [rbp+var_54] add rsp, 60h pop rbp retn
long long psi_rwlock_wrlock(long long a1, long long a2, unsigned int a3) { unsigned int v4; // [rsp+Ch] [rbp-54h] long long v5; // [rsp+10h] [rbp-50h] _BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF unsigned int v7; // [rsp+4Ch] [rbp-14h] long long v8; // [rsp+50h] [rbp-10h] long long v9; // [rsp+58h] [rbp-8h] v9 = a1; v8 = a2; v7 = a3; v5 = (*((long long ( **)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[0] + 54))( v6, *(_QWORD *)(a1 + 144), 1LL, a2, a3); v4 = my_rw_wrlock(v9); if ( v5 ) (*((void ( **)(long long, _QWORD))PSI_server[0] + 55))(v5, v4); return v4; }
psi_rwlock_wrlock: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX LEA RAX,[0x2d8c48] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1b0] MOV RCX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RCX + 0x90] MOV RCX,qword ptr [RBP + -0x10] MOV R8D,dword ptr [RBP + -0x14] LEA RDI,[RBP + -0x48] MOV EDX,0x1 CALL RAX MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x00132610 MOV dword ptr [RBP + -0x54],EAX CMP qword ptr [RBP + -0x50],0x0 JZ 0x00132053 LEA RAX,[0x2d8c48] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1b8] MOV RDI,qword ptr [RBP + -0x50] MOV ESI,dword ptr [RBP + -0x54] CALL RAX LAB_00132053: MOV EAX,dword ptr [RBP + -0x54] ADD RSP,0x60 POP RBP RET
int4 psi_rwlock_wrlock(long param_1,int8 param_2,int4 param_3) { int4 uVar1; long lVar2; int1 local_50 [52]; int4 local_1c; int8 local_18; long local_10; local_1c = param_3; local_18 = param_2; local_10 = param_1; lVar2 = (**(code **)(PSI_server + 0x1b0)) (local_50,*(int8 *)(param_1 + 0x90),1,param_2,param_3); uVar1 = my_rw_wrlock(local_10); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1b8))(lVar2,uVar1); } return uVar1; }
35,029
find_longest_bitstream
eloqsql/storage/maria/ma_packrec.c
static uint find_longest_bitstream(uint16 *table, uint16 *end) { uint length=1; uint length2; if (!(*table & IS_CHAR)) { uint16 *next= table + *table; if (next > end || next == table) { DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree")); return OFFSET_TABLE_SIZE; } length=find_longest_bitstream(next, end)+1; } table++; if (!(*table & IS_CHAR)) { uint16 *next= table + *table; if (next > end || next == table) { DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree")); return OFFSET_TABLE_SIZE; } length2= find_longest_bitstream(next, end) + 1; length=MY_MAX(length,length2); } return length; }
O0
c
find_longest_bitstream: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl $0x1, -0x1c(%rbp) movq -0x10(%rbp), %rax movzwl (%rax), %eax andl $0x8000, %eax # imm = 0x8000 cmpl $0x0, %eax jne 0x4e0f7 movq -0x10(%rbp), %rax movq -0x10(%rbp), %rcx movzwl (%rcx), %ecx movslq %ecx, %rcx shlq %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax cmpq -0x18(%rbp), %rax ja 0x4e0d4 movq -0x28(%rbp), %rax cmpq -0x10(%rbp), %rax jne 0x4e0e4 jmp 0x4e0d6 jmp 0x4e0d8 movl $0x200, -0x4(%rbp) # imm = 0x200 jmp 0x4e182 movq -0x28(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x4e080 addl $0x1, %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax addq $0x2, %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movzwl (%rax), %eax andl $0x8000, %eax # imm = 0x8000 cmpl $0x0, %eax jne 0x4e17c movq -0x10(%rbp), %rax movq -0x10(%rbp), %rcx movzwl (%rcx), %ecx movslq %ecx, %rcx shlq %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq -0x18(%rbp), %rax ja 0x4e140 movq -0x30(%rbp), %rax cmpq -0x10(%rbp), %rax jne 0x4e14d jmp 0x4e142 jmp 0x4e144 movl $0x200, -0x4(%rbp) # imm = 0x200 jmp 0x4e182 movq -0x30(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x4e080 addl $0x1, %eax movl %eax, -0x20(%rbp) movl -0x1c(%rbp), %eax cmpl -0x20(%rbp), %eax jbe 0x4e170 movl -0x1c(%rbp), %eax movl %eax, -0x34(%rbp) jmp 0x4e176 movl -0x20(%rbp), %eax movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax,%rax)
find_longest_bitstream: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], 1 mov rax, [rbp+var_10] movzx eax, word ptr [rax] and eax, 8000h cmp eax, 0 jnz short loc_4E0F7 mov rax, [rbp+var_10] mov rcx, [rbp+var_10] movzx ecx, word ptr [rcx] movsxd rcx, ecx shl rcx, 1 add rax, rcx mov [rbp+var_28], rax mov rax, [rbp+var_28] cmp rax, [rbp+var_18] ja short loc_4E0D4 mov rax, [rbp+var_28] cmp rax, [rbp+var_10] jnz short loc_4E0E4 loc_4E0D4: jmp short $+2 loc_4E0D6: jmp short $+2 loc_4E0D8: mov [rbp+var_4], 200h jmp loc_4E182 loc_4E0E4: mov rdi, [rbp+var_28] mov rsi, [rbp+var_18] call find_longest_bitstream add eax, 1 mov [rbp+var_1C], eax loc_4E0F7: mov rax, [rbp+var_10] add rax, 2 mov [rbp+var_10], rax mov rax, [rbp+var_10] movzx eax, word ptr [rax] and eax, 8000h cmp eax, 0 jnz short loc_4E17C mov rax, [rbp+var_10] mov rcx, [rbp+var_10] movzx ecx, word ptr [rcx] movsxd rcx, ecx shl rcx, 1 add rax, rcx mov [rbp+var_30], rax mov rax, [rbp+var_30] cmp rax, [rbp+var_18] ja short loc_4E140 mov rax, [rbp+var_30] cmp rax, [rbp+var_10] jnz short loc_4E14D loc_4E140: jmp short $+2 loc_4E142: jmp short $+2 loc_4E144: mov [rbp+var_4], 200h jmp short loc_4E182 loc_4E14D: mov rdi, [rbp+var_30] mov rsi, [rbp+var_18] call find_longest_bitstream add eax, 1 mov [rbp+var_20], eax mov eax, [rbp+var_1C] cmp eax, [rbp+var_20] jbe short loc_4E170 mov eax, [rbp+var_1C] mov [rbp+var_34], eax jmp short loc_4E176 loc_4E170: mov eax, [rbp+var_20] mov [rbp+var_34], eax loc_4E176: mov eax, [rbp+var_34] mov [rbp+var_1C], eax loc_4E17C: mov eax, [rbp+var_1C] mov [rbp+var_4], eax loc_4E182: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long find_longest_bitstream(unsigned __int16 *a1, unsigned long long a2) { unsigned __int16 *v4; // [rsp+10h] [rbp-30h] unsigned __int16 *v5; // [rsp+18h] [rbp-28h] unsigned int v6; // [rsp+20h] [rbp-20h] unsigned int v7; // [rsp+24h] [rbp-1Ch] unsigned __int16 *v8; // [rsp+30h] [rbp-10h] v7 = 1; if ( (*a1 & 0x8000) != 0 ) { LABEL_6: v8 = a1 + 1; if ( (a1[1] & 0x8000) == 0 ) { v4 = &v8[*v8]; if ( (unsigned long long)v4 > a2 || v4 == v8 ) return 512; v6 = find_longest_bitstream(v4, a2) + 1; if ( v7 <= v6 ) return v6; else return v7; } return v7; } v5 = &a1[*a1]; if ( (unsigned long long)v5 <= a2 && v5 != a1 ) { v7 = find_longest_bitstream(v5, a2) + 1; goto LABEL_6; } return 512; }
find_longest_bitstream: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],0x1 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX] AND EAX,0x8000 CMP EAX,0x0 JNZ 0x0014e0f7 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RCX] MOVSXD RCX,ECX SHL RCX,0x1 ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x18] JA 0x0014e0d4 MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x10] JNZ 0x0014e0e4 LAB_0014e0d4: JMP 0x0014e0d6 LAB_0014e0d6: JMP 0x0014e0d8 LAB_0014e0d8: MOV dword ptr [RBP + -0x4],0x200 JMP 0x0014e182 LAB_0014e0e4: MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0014e080 ADD EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX LAB_0014e0f7: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX] AND EAX,0x8000 CMP EAX,0x0 JNZ 0x0014e17c MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RCX] MOVSXD RCX,ECX SHL RCX,0x1 ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x18] JA 0x0014e140 MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x10] JNZ 0x0014e14d LAB_0014e140: JMP 0x0014e142 LAB_0014e142: JMP 0x0014e144 LAB_0014e144: MOV dword ptr [RBP + -0x4],0x200 JMP 0x0014e182 LAB_0014e14d: MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0014e080 ADD EAX,0x1 MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x1c] CMP EAX,dword ptr [RBP + -0x20] JBE 0x0014e170 MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x34],EAX JMP 0x0014e176 LAB_0014e170: MOV EAX,dword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x34],EAX LAB_0014e176: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x1c],EAX LAB_0014e17c: MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x4],EAX LAB_0014e182: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
uint find_longest_bitstream(ushort *param_1,ushort *param_2) { int iVar1; ushort *puVar2; uint local_3c; uint local_24; local_24 = 1; if ((*param_1 & 0x8000) == 0) { puVar2 = param_1 + (int)(uint)*param_1; if ((param_2 < puVar2) || (puVar2 == param_1)) { return 0x200; } iVar1 = find_longest_bitstream(puVar2,param_2); local_24 = iVar1 + 1; } param_1 = param_1 + 1; if ((*param_1 & 0x8000) == 0) { puVar2 = param_1 + (int)(uint)*param_1; if ((param_2 < puVar2) || (puVar2 == param_1)) { return 0x200; } iVar1 = find_longest_bitstream(puVar2,param_2); local_3c = iVar1 + 1; if (local_3c < local_24) { local_3c = local_24; } local_24 = local_3c; } return local_24; }
35,030
ftxui::CellToGlyphIndex(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/screen/string.cpp
std::vector<int> CellToGlyphIndex(const std::string& input) { int x = -1; std::vector<int> out; out.reserve(input.size()); size_t start = 0; size_t end = 0; while (start < input.size()) { uint32_t codepoint = 0; const bool eaten = EatCodePoint(input, start, &end, &codepoint); start = end; // Ignore invalid / control characters. if (!eaten || IsControl(codepoint)) { continue; } // Combining characters are put with the previous glyph they are modifying. if (IsCombining(codepoint)) { if (x == -1) { ++x; out.push_back(x); } continue; } // Fullwidth characters take two cells. The second is made of the empty // string to reserve the space the first is taking. if (IsFullWidth(codepoint)) { ++x; out.push_back(x); out.push_back(x); continue; } // Normal characters: ++x; out.push_back(x); } return out; }
O3
cpp
ftxui::CellToGlyphIndex(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %r14 movq %rdi, %rbx movl $0xffffffff, 0x8(%rsp) # imm = 0xFFFFFFFF xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq $0x0, 0x10(%rdi) movq 0x8(%rsi), %rsi callq 0x3b2ca movq $0x0, 0x10(%rsp) cmpq $0x0, 0x8(%r14) je 0x3adfd xorl %ebp, %ebp leaq 0x10(%rsp), %r15 leaq 0xc(%rsp), %r12 movl $0x0, 0xc(%rsp) movq %r14, %rdi movq %rbp, %rsi movq %r15, %rdx movq %r12, %rcx callq 0x3a5b4 movq 0x10(%rsp), %rbp testb %al, %al je 0x3adf3 movl 0xc(%rsp), %r13d testl %r13d, %r13d je 0x3adf3 cmpl $0x1f, %r13d ja 0x3ad46 cmpl $0xa, %r13d je 0x3ad53 jmp 0x3adf3 leal -0x7f(%r13), %eax cmpl $0x21, %eax jb 0x3adf3 movl %r13d, %edi callq 0x3a6d0 testb %al, %al je 0x3ad84 cmpl $-0x1, 0x8(%rsp) jne 0x3adf3 movl $0x0, 0x8(%rsp) movq 0x8(%rbx), %rsi cmpq 0x10(%rbx), %rsi je 0x3ade6 movl $0x0, (%rsi) jmp 0x3addc movl %r13d, %edi callq 0x3a728 movl 0x8(%rsp), %edx incl %edx movl %edx, 0x8(%rsp) movq 0x8(%rbx), %rsi movq 0x10(%rbx), %rcx testb %al, %al je 0x3adb3 cmpq %rcx, %rsi je 0x3adbc movl %edx, (%rsi) addq $0x4, %rsi movq %rsi, 0x8(%rbx) jmp 0x3add1 cmpq %rcx, %rsi je 0x3ade6 movl %edx, (%rsi) jmp 0x3addc movq %rbx, %rdi leaq 0x8(%rsp), %rdx callq 0x1fc80 movq 0x8(%rbx), %rsi movq 0x10(%rbx), %rcx cmpq %rcx, %rsi je 0x3ade6 movl 0x8(%rsp), %eax movl %eax, (%rsi) addq $0x4, %rsi movq %rsi, 0x8(%rbx) jmp 0x3adf3 movq %rbx, %rdi leaq 0x8(%rsp), %rdx callq 0x1fc80 cmpq 0x8(%r14), %rbp jb 0x3ad01 movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x3ae11 movq %rax, %r14 movq (%rbx), %rdi testq %rdi, %rdi je 0x3ae28 movq 0x10(%rbx), %rsi subq %rdi, %rsi callq 0xb400 movq %r14, %rdi callq 0xb780
_ZN5ftxui16CellToGlyphIndexERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rsi mov rbx, rdi mov [rsp+48h+var_40], 0FFFFFFFFh xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 mov rsi, [rsi+8] call _ZNSt6vectorIiSaIiEE7reserveEm; std::vector<int>::reserve(ulong) mov [rsp+48h+var_3C+4], 0 cmp qword ptr [r14+8], 0 jz loc_3ADFD xor ebp, ebp lea r15, [rsp+48h+var_3C+4] lea r12, [rsp+48h+var_3C] loc_3AD01: mov dword ptr [rsp+48h+var_3C], 0 mov rdi, r14 mov rsi, rbp; unsigned int mov rdx, r15 mov rcx, r12 call _ZN5ftxui12EatCodePointERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmPmPj; ftxui::EatCodePoint(std::string const&,ulong,ulong *,uint *) mov rbp, [rsp+48h+var_3C+4] test al, al jz loc_3ADF3 mov r13d, dword ptr [rsp+48h+var_3C] test r13d, r13d jz loc_3ADF3 cmp r13d, 1Fh ja short loc_3AD46 cmp r13d, 0Ah jz short loc_3AD53 jmp loc_3ADF3 loc_3AD46: lea eax, [r13-7Fh] cmp eax, 21h ; '!' jb loc_3ADF3 loc_3AD53: mov edi, r13d; this call _ZN5ftxui11IsCombiningEj; ftxui::IsCombining(uint) test al, al jz short loc_3AD84 cmp [rsp+48h+var_40], 0FFFFFFFFh jnz loc_3ADF3 mov [rsp+48h+var_40], 0 mov rsi, [rbx+8] cmp rsi, [rbx+10h] jz short loc_3ADE6 mov dword ptr [rsi], 0 jmp short loc_3ADDC loc_3AD84: mov edi, r13d; this call _ZN5ftxui11IsFullWidthEj; ftxui::IsFullWidth(uint) mov edx, [rsp+48h+var_40] inc edx mov [rsp+48h+var_40], edx mov rsi, [rbx+8] mov rcx, [rbx+10h] test al, al jz short loc_3ADB3 cmp rsi, rcx jz short loc_3ADBC mov [rsi], edx add rsi, 4 mov [rbx+8], rsi jmp short loc_3ADD1 loc_3ADB3: cmp rsi, rcx jz short loc_3ADE6 mov [rsi], edx jmp short loc_3ADDC loc_3ADBC: mov rdi, rbx lea rdx, [rsp+48h+var_40] call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&) mov rsi, [rbx+8] mov rcx, [rbx+10h] loc_3ADD1: cmp rsi, rcx jz short loc_3ADE6 mov eax, [rsp+48h+var_40] mov [rsi], eax loc_3ADDC: add rsi, 4 mov [rbx+8], rsi jmp short loc_3ADF3 loc_3ADE6: mov rdi, rbx lea rdx, [rsp+48h+var_40] call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&) loc_3ADF3: cmp rbp, [r14+8] jb loc_3AD01 loc_3ADFD: mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_3AE11: mov r14, rax mov rdi, [rbx]; void * test rdi, rdi jz short loc_3AE28 mov rsi, [rbx+10h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3AE28: mov rdi, r14 call __Unwind_Resume
long long ftxui::CellToGlyphIndex(long long a1, long long *a2) { unsigned long long v3; // rbp char v4; // al unsigned int v5; // r13d int *v6; // rsi bool IsFullWidth; // al int v8; // edx int *v9; // rcx int v11; // [rsp+8h] [rbp-40h] BYREF unsigned int v12[15]; // [rsp+Ch] [rbp-3Ch] BYREF v11 = -1; *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; std::vector<int>::reserve(a1, a2[1]); *(_QWORD *)&v12[1] = 0LL; if ( a2[1] ) { v3 = 0LL; do { v12[0] = 0; v4 = ftxui::EatCodePoint(a2, v3, &v12[1], (int *)v12); v3 = *(_QWORD *)&v12[1]; if ( !v4 ) continue; v5 = v12[0]; if ( !v12[0] ) continue; if ( v12[0] > 0x1F ) { if ( v12[0] - 127 < 0x21 ) continue; } else if ( v12[0] != 10 ) { continue; } if ( !ftxui::IsCombining((ftxui *)v12[0]) ) { IsFullWidth = ftxui::IsFullWidth((ftxui *)v5); v8 = ++v11; v6 = *(int **)(a1 + 8); v9 = *(int **)(a1 + 16); if ( IsFullWidth ) { if ( v6 == v9 ) { std::vector<int>::_M_realloc_insert<int const&>(a1, (long long)v6, &v11); v6 = *(int **)(a1 + 8); v9 = *(int **)(a1 + 16); } else { *v6++ = v8; *(_QWORD *)(a1 + 8) = v6; } if ( v6 == v9 ) { LABEL_22: std::vector<int>::_M_realloc_insert<int const&>(a1, (long long)v6, &v11); continue; } *v6 = v11; } else { if ( v6 == v9 ) goto LABEL_22; *v6 = v8; } goto LABEL_21; } if ( v11 == -1 ) { v11 = 0; v6 = *(int **)(a1 + 8); if ( v6 == *(int **)(a1 + 16) ) goto LABEL_22; *v6 = 0; LABEL_21: *(_QWORD *)(a1 + 8) = v6 + 1; } } while ( v3 < a2[1] ); } return a1; }
CellToGlyphIndex: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RSI MOV RBX,RDI MOV dword ptr [RSP + 0x8],0xffffffff XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 MOV RSI,qword ptr [RSI + 0x8] LAB_0013acdc: CALL 0x0013b2ca MOV qword ptr [RSP + 0x10],0x0 CMP qword ptr [R14 + 0x8],0x0 JZ 0x0013adfd XOR EBP,EBP LEA R15,[RSP + 0x10] LEA R12,[RSP + 0xc] LAB_0013ad01: MOV dword ptr [RSP + 0xc],0x0 MOV RDI,R14 MOV RSI,RBP MOV RDX,R15 MOV RCX,R12 CALL 0x0013a5b4 MOV RBP,qword ptr [RSP + 0x10] TEST AL,AL JZ 0x0013adf3 MOV R13D,dword ptr [RSP + 0xc] TEST R13D,R13D JZ 0x0013adf3 CMP R13D,0x1f JA 0x0013ad46 CMP R13D,0xa JZ 0x0013ad53 JMP 0x0013adf3 LAB_0013ad46: LEA EAX,[R13 + -0x7f] CMP EAX,0x21 JC 0x0013adf3 LAB_0013ad53: MOV EDI,R13D CALL 0x0013a6d0 TEST AL,AL JZ 0x0013ad84 CMP dword ptr [RSP + 0x8],-0x1 JNZ 0x0013adf3 MOV dword ptr [RSP + 0x8],0x0 MOV RSI,qword ptr [RBX + 0x8] CMP RSI,qword ptr [RBX + 0x10] JZ 0x0013ade6 MOV dword ptr [RSI],0x0 JMP 0x0013addc LAB_0013ad84: MOV EDI,R13D CALL 0x0013a728 MOV EDX,dword ptr [RSP + 0x8] INC EDX MOV dword ptr [RSP + 0x8],EDX MOV RSI,qword ptr [RBX + 0x8] MOV RCX,qword ptr [RBX + 0x10] TEST AL,AL JZ 0x0013adb3 CMP RSI,RCX JZ 0x0013adbc MOV dword ptr [RSI],EDX ADD RSI,0x4 MOV qword ptr [RBX + 0x8],RSI JMP 0x0013add1 LAB_0013adb3: CMP RSI,RCX JZ 0x0013ade6 MOV dword ptr [RSI],EDX JMP 0x0013addc LAB_0013adbc: MOV RDI,RBX LEA RDX,[RSP + 0x8] CALL 0x0011fc80 MOV RSI,qword ptr [RBX + 0x8] MOV RCX,qword ptr [RBX + 0x10] LAB_0013add1: CMP RSI,RCX JZ 0x0013ade6 MOV EAX,dword ptr [RSP + 0x8] MOV dword ptr [RSI],EAX LAB_0013addc: ADD RSI,0x4 MOV qword ptr [RBX + 0x8],RSI JMP 0x0013adf3 LAB_0013ade6: MOV RDI,RBX LEA RDX,[RSP + 0x8] CALL 0x0011fc80 LAB_0013adf3: CMP RBP,qword ptr [R14 + 0x8] JC 0x0013ad01 LAB_0013adfd: MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* ftxui::CellToGlyphIndex(std::__cxx11::string const&) */ ftxui * __thiscall ftxui::CellToGlyphIndex(ftxui *this,string *param_1) { uint uVar1; char cVar2; int *piVar3; ulong uVar4; int *piVar5; int local_40; uint local_3c; ulong local_38; local_40 = -1; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; /* try { // try from 0013acdc to 0013ace0 has its CatchHandler @ 0013ae0f */ std::vector<int,std::allocator<int>>::reserve ((vector<int,std::allocator<int>> *)this,*(ulong *)(param_1 + 8)); local_38 = 0; if (*(long *)(param_1 + 8) != 0) { uVar4 = 0; do { local_3c = 0; cVar2 = EatCodePoint(param_1,uVar4,&local_38,&local_3c); uVar4 = local_38; uVar1 = local_3c; if ((cVar2 != '\0') && (local_3c != 0)) { if (local_3c < 0x20) { if (local_3c == 10) { LAB_0013ad53: cVar2 = IsCombining(local_3c); if (cVar2 == '\0') { cVar2 = IsFullWidth(uVar1); local_40 = local_40 + 1; piVar5 = *(int **)(this + 8); piVar3 = *(int **)(this + 0x10); if (cVar2 == '\0') { if (piVar5 == piVar3) goto LAB_0013ade6; *piVar5 = local_40; } else { if (piVar5 == piVar3) { /* try { // try from 0013adbc to 0013adf2 has its CatchHandler @ 0013ae11 */ std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&> ((vector<int,std::allocator<int>> *)this,piVar5,&local_40); piVar5 = *(int **)(this + 8); piVar3 = *(int **)(this + 0x10); } else { *piVar5 = local_40; piVar5 = piVar5 + 1; *(int **)(this + 8) = piVar5; } if (piVar5 == piVar3) { LAB_0013ade6: std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&> ((vector<int,std::allocator<int>> *)this,piVar5,&local_40); goto LAB_0013adf3; } *piVar5 = local_40; } LAB_0013addc: *(int **)(this + 8) = piVar5 + 1; } else if (local_40 == -1) { local_40 = 0; piVar5 = *(int **)(this + 8); if (piVar5 == *(int **)(this + 0x10)) goto LAB_0013ade6; *piVar5 = 0; goto LAB_0013addc; } } } else if (0x20 < local_3c - 0x7f) goto LAB_0013ad53; } LAB_0013adf3: } while (uVar4 < *(ulong *)(param_1 + 8)); } return this; }
35,031
my_hash_sort_bin
eloqsql/strings/ctype-bin.c
void my_hash_sort_bin(CHARSET_INFO *cs __attribute__((unused)), const uchar *key, size_t len,ulong *nr1, ulong *nr2) { const uchar *end = key + len; ulong tmp1= *nr1; ulong tmp2= *nr2; for (; key < end ; key++) { MY_HASH_ADD(tmp1, tmp2, (uint) *key); } *nr1= tmp1; *nr2= tmp2; }
O3
c
my_hash_sort_bin: movq (%rcx), %rax movq (%r8), %rdi testq %rdx, %rdx jle 0xac4b3 pushq %rbp movq %rsp, %rbp addq %rsi, %rdx movl %eax, %r9d andl $0x3f, %r9d addq %rdi, %r9 movzbl (%rsi), %r10d imulq %r9, %r10 movq %rax, %r9 shlq $0x8, %r9 addq %r10, %r9 xorq %r9, %rax addq $0x3, %rdi incq %rsi cmpq %rdx, %rsi jb 0xac487 popq %rbp movq %rax, (%rcx) movq %rdi, (%r8) retq
my_hash_sort_bin: mov rax, [rcx] mov rdi, [r8] test rdx, rdx jle short loc_AC4B3 push rbp mov rbp, rsp add rdx, rsi loc_AC487: 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_AC487 pop rbp loc_AC4B3: mov [rcx], rax mov [r8], rdi retn
long long my_hash_sort_bin(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5) { long long result; // rax long long v6; // rdi unsigned __int8 *v7; // rdx result = *a4; v6 = *a5; if ( a3 > 0 ) { v7 = &a2[a3]; do { result ^= (v6 + (result & 0x3F)) * *a2 + (result << 8); v6 += 3LL; ++a2; } while ( a2 < v7 ); } *a4 = result; *a5 = v6; return result; }
my_hash_sort_bin: MOV RAX,qword ptr [RCX] MOV RDI,qword ptr [R8] TEST RDX,RDX JLE 0x001ac4b3 PUSH RBP MOV RBP,RSP ADD RDX,RSI LAB_001ac487: 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 0x001ac487 POP RBP LAB_001ac4b3: MOV qword ptr [RCX],RAX MOV qword ptr [R8],RDI RET
void my_hash_sort_bin(int8 param_1,byte *param_2,long param_3,ulong *param_4,long *param_5) { ulong uVar1; byte *pbVar2; long lVar3; uVar1 = *param_4; lVar3 = *param_5; if (0 < param_3) { pbVar2 = param_2 + param_3; do { uVar1 = uVar1 ^ uVar1 * 0x100 + (ulong)*param_2 * ((ulong)((uint)uVar1 & 0x3f) + lVar3); lVar3 = lVar3 + 3; param_2 = param_2 + 1; } while (param_2 < pbVar2); } *param_4 = uVar1; *param_5 = lVar3; return; }
35,032
ma_bitmap_create_missing
eloqsql/storage/maria/ma_bitmap.c
static my_bool _ma_bitmap_create_missing(MARIA_HA *info, MARIA_FILE_BITMAP *bitmap, pgcache_page_no_t page) { MARIA_SHARE *share= info->s; uint block_size= bitmap->block_size; pgcache_page_no_t from, to; my_off_t data_file_length= share->state.state.data_file_length; DBUG_ENTER("_ma_bitmap_create_missing"); DBUG_PRINT("enter", ("page: %lld", (longlong) page)); /* First (in offset order) bitmap page to create */ if (data_file_length < block_size) goto err; /* corrupted, should have first bitmap page */ if (page * block_size >= share->base.max_data_file_length) { my_errno= HA_ERR_RECORD_FILE_FULL; goto err; } from= (data_file_length / block_size - 1) / bitmap->pages_covered + 1; from*= bitmap->pages_covered; /* page>=from because: (page + 1) * bs > dfl, and page == k * pc so: (k * pc + 1) * bs > dfl; k * pc + 1 > dfl / bs; k * pc > dfl / bs - 1 k > (dfl / bs - 1) / pc; k >= (dfl / bs - 1) / pc + 1 k * pc >= ((dfl / bs - 1) / pc + 1) * pc == from. */ DBUG_ASSERT(page >= from); if (share->now_transactional) { LSN lsn; uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE * 2]; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 1]; page_store(log_data + FILEID_STORE_SIZE, from); page_store(log_data + FILEID_STORE_SIZE + PAGE_STORE_SIZE, page); log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data); /* We don't use info->trn so that this REDO is always executed even though the UNDO does not reach disk due to crash. This is also consistent with the fact that the new bitmap pages are not pinned. */ if (translog_write_record(&lsn, LOGREC_REDO_BITMAP_NEW_PAGE, &dummy_transaction_object, info, (translog_size_t)sizeof(log_data), TRANSLOG_INTERNAL_PARTS + 1, log_array, log_data, NULL)) goto err; /* No need to flush the log: the bitmap pages we are going to create will flush it when they go to disk. */ } /* Last bitmap page. It has special creation: will go to the page cache only later as we are going to modify it very soon. */ bzero(bitmap->map, bitmap->block_size); bitmap->used_size= bitmap->full_head_size= bitmap->full_tail_size= 0; bitmap->changed=1; #ifndef DBUG_OFF /* Make a copy of the page to be able to print out bitmap changes during debugging */ memcpy(bitmap->map + bitmap->block_size, bitmap->map, bitmap->block_size); #endif /* Last bitmap page to create before 'page' */ DBUG_ASSERT(page >= bitmap->pages_covered); to= page - bitmap->pages_covered; /* In run-time situations, from>=to is always false, i.e. we always create one bitmap at a time ('page'). */ if ((from <= to) && _ma_bitmap_create_missing_into_pagecache(share, bitmap, from, to, bitmap->map)) goto err; share->state.state.data_file_length= (page + 1) * bitmap->block_size; DBUG_RETURN(FALSE); err: DBUG_RETURN(TRUE); }
O0
c
ma_bitmap_create_missing: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x20(%rbp) movq %rsi, -0x28(%rbp) movq %rdx, -0x30(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x28(%rbp), %rax movl 0x134(%rax), %eax movl %eax, -0x3c(%rbp) movq -0x38(%rbp), %rax movq 0x40(%rax), %rax movq %rax, -0x58(%rbp) jmp 0x425ea movq -0x58(%rbp), %rax movl -0x3c(%rbp), %ecx cmpq %rcx, %rax jae 0x425fb jmp 0x427e9 movq -0x30(%rbp), %rax movl -0x3c(%rbp), %ecx imulq %rcx, %rax movq -0x38(%rbp), %rcx cmpq 0x368(%rcx), %rax jb 0x42623 callq 0xfabb0 movl $0x87, (%rax) jmp 0x427e9 movq -0x58(%rbp), %rax movl -0x3c(%rbp), %ecx xorl %edx, %edx divq %rcx subq $0x1, %rax movq -0x28(%rbp), %rcx xorl %edx, %edx divq 0x138(%rcx) addq $0x1, %rax movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rax movq 0x138(%rax), %rax imulq -0x48(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0x4265e movq -0x38(%rbp), %rax cmpb $0x0, 0x7e7(%rax) je 0x4273b jmp 0x42671 leaq -0x14(%rbp), %rax addq $0x2, %rax movq %rax, -0x98(%rbp) movq -0x48(%rbp), %rax movl %eax, %ecx movq -0x98(%rbp), %rax movl %ecx, (%rax) movq -0x48(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0x98(%rbp), %rax movb %cl, 0x4(%rax) jmp 0x426a5 leaq -0x14(%rbp), %rax addq $0x2, %rax addq $0x5, %rax movq %rax, -0xa0(%rbp) movq -0x30(%rbp), %rax movl %eax, %ecx movq -0xa0(%rbp), %rax movl %ecx, (%rax) movq -0x30(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0xa0(%rbp), %rax movb %cl, 0x4(%rax) leaq -0x14(%rbp), %rax movq %rax, -0x70(%rbp) movq $0xc, -0x68(%rbp) movq -0x20(%rbp), %rcx leaq -0x90(%rbp), %r10 leaq -0x14(%rbp), %rax leaq -0x60(%rbp), %rdi movl $0x28, %esi leaq 0x440426(%rip), %rdx # 0x482b30 movl $0xc, %r8d movl $0x3, %r9d xorl %r11d, %r11d movq %r10, (%rsp) movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) callq 0x4f4f0 cmpb $0x0, %al je 0x42739 jmp 0x427e9 jmp 0x4273b movq -0x28(%rbp), %rax movq 0x8(%rax), %rdi movq -0x28(%rbp), %rax movl 0x134(%rax), %eax movl %eax, %edx xorl %esi, %esi callq 0x2a2c0 movq -0x28(%rbp), %rax movl $0x0, 0x2c(%rax) movq -0x28(%rbp), %rax movl $0x0, 0x28(%rax) movq -0x28(%rbp), %rax movl $0x0, 0x24(%rax) movq -0x28(%rbp), %rax movb $0x1, 0x20(%rax) jmp 0x42781 movq -0x30(%rbp), %rax movq -0x28(%rbp), %rcx subq 0x138(%rcx), %rax movq %rax, -0x50(%rbp) movq -0x48(%rbp), %rax cmpq -0x50(%rbp), %rax ja 0x427c5 movq -0x38(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x48(%rbp), %rdx movq -0x50(%rbp), %rcx movq -0x28(%rbp), %rax movq 0x8(%rax), %r8 callq 0x41240 movsbl %al, %eax cmpl $0x0, %eax je 0x427c5 jmp 0x427e9 movq -0x30(%rbp), %rcx addq $0x1, %rcx movq -0x28(%rbp), %rax movl 0x134(%rax), %eax imulq %rax, %rcx movq -0x38(%rbp), %rax movq %rcx, 0x40(%rax) movb $0x0, -0x15(%rbp) jmp 0x427ef jmp 0x427eb movb $0x1, -0x15(%rbp) movb -0x15(%rbp), %al movb %al, -0xa1(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x42819 movb -0xa1(%rbp), %al addq $0xc0, %rsp popq %rbp retq callq 0x2a270 nop
_ma_bitmap_create_missing: push rbp mov rbp, rsp sub rsp, 0C0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_20], rdi mov [rbp+var_28], rsi mov [rbp+var_30], rdx mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_38], rax mov rax, [rbp+var_28] mov eax, [rax+134h] mov [rbp+var_3C], eax mov rax, [rbp+var_38] mov rax, [rax+40h] mov [rbp+var_58], rax jmp short $+2 loc_425EA: mov rax, [rbp+var_58] mov ecx, [rbp+var_3C] cmp rax, rcx jnb short loc_425FB jmp loc_427E9 loc_425FB: mov rax, [rbp+var_30] mov ecx, [rbp+var_3C] imul rax, rcx mov rcx, [rbp+var_38] cmp rax, [rcx+368h] jb short loc_42623 call _my_thread_var mov dword ptr [rax], 87h jmp loc_427E9 loc_42623: mov rax, [rbp+var_58] mov ecx, [rbp+var_3C] xor edx, edx div rcx sub rax, 1 mov rcx, [rbp+var_28] xor edx, edx div qword ptr [rcx+138h] add rax, 1 mov [rbp+var_48], rax mov rax, [rbp+var_28] mov rax, [rax+138h] imul rax, [rbp+var_48] mov [rbp+var_48], rax jmp short $+2 loc_4265E: mov rax, [rbp+var_38] cmp byte ptr [rax+7E7h], 0 jz loc_4273B jmp short $+2 loc_42671: lea rax, [rbp+var_14] add rax, 2 mov [rbp+var_98], rax mov rax, [rbp+var_48] mov ecx, eax mov rax, [rbp+var_98] mov [rax], ecx mov rax, [rbp+var_48] shr rax, 20h mov cl, al mov rax, [rbp+var_98] mov [rax+4], cl jmp short $+2 loc_426A5: lea rax, [rbp+var_14] add rax, 2 add rax, 5 mov [rbp+var_A0], rax mov rax, [rbp+var_30] mov ecx, eax mov rax, [rbp+var_A0] mov [rax], ecx mov rax, [rbp+var_30] shr rax, 20h mov cl, al mov rax, [rbp+var_A0] mov [rax+4], cl lea rax, [rbp+var_14] mov [rbp+var_70], rax mov [rbp+var_68], 0Ch mov rcx, [rbp+var_20] lea r10, [rbp+var_90] lea rax, [rbp+var_14] lea rdi, [rbp+var_60] mov esi, 28h ; '(' lea rdx, dummy_transaction_object mov r8d, 0Ch mov r9d, 3 xor r11d, r11d mov [rsp+0C0h+var_C0], r10 mov [rsp+0C0h+var_B8], rax mov [rsp+0C0h+var_B0], 0 call translog_write_record cmp al, 0 jz short loc_42739 jmp loc_427E9 loc_42739: jmp short $+2 loc_4273B: mov rax, [rbp+var_28] mov rdi, [rax+8] mov rax, [rbp+var_28] mov eax, [rax+134h] mov edx, eax xor esi, esi call _memset mov rax, [rbp+var_28] mov dword ptr [rax+2Ch], 0 mov rax, [rbp+var_28] mov dword ptr [rax+28h], 0 mov rax, [rbp+var_28] mov dword ptr [rax+24h], 0 mov rax, [rbp+var_28] mov byte ptr [rax+20h], 1 jmp short $+2 loc_42781: mov rax, [rbp+var_30] mov rcx, [rbp+var_28] sub rax, [rcx+138h] mov [rbp+var_50], rax mov rax, [rbp+var_48] cmp rax, [rbp+var_50] ja short loc_427C5 mov rdi, [rbp+var_38] mov rsi, [rbp+var_28] mov rdx, [rbp+var_48] mov rcx, [rbp+var_50] mov rax, [rbp+var_28] mov r8, [rax+8] call _ma_bitmap_create_missing_into_pagecache movsx eax, al cmp eax, 0 jz short loc_427C5 jmp short loc_427E9 loc_427C5: mov rcx, [rbp+var_30] add rcx, 1 mov rax, [rbp+var_28] mov eax, [rax+134h] imul rcx, rax mov rax, [rbp+var_38] mov [rax+40h], rcx mov [rbp+var_15], 0 jmp short loc_427EF loc_427E9: jmp short $+2 loc_427EB: mov [rbp+var_15], 1 loc_427EF: mov al, [rbp+var_15] mov [rbp+var_A1], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_42819 mov al, [rbp+var_A1] add rsp, 0C0h pop rbp retn loc_42819: call ___stack_chk_fail
char ma_bitmap_create_missing(long long *a1, long long a2, long long a3) { _BYTE v4[32]; // [rsp+30h] [rbp-90h] BYREF _BYTE *v5; // [rsp+50h] [rbp-70h] long long v6; // [rsp+58h] [rbp-68h] char v7; // [rsp+60h] [rbp-60h] BYREF unsigned long long v8; // [rsp+68h] [rbp-58h] unsigned long long v9; // [rsp+70h] [rbp-50h] unsigned long long v10; // [rsp+78h] [rbp-48h] unsigned int v11; // [rsp+84h] [rbp-3Ch] long long v12; // [rsp+88h] [rbp-38h] long long v13; // [rsp+90h] [rbp-30h] long long v14; // [rsp+98h] [rbp-28h] long long *v15; // [rsp+A0h] [rbp-20h] _BYTE v17[2]; // [rsp+ACh] [rbp-14h] BYREF int v18; // [rsp+AEh] [rbp-12h] char v19; // [rsp+B2h] [rbp-Eh] int v20; // [rsp+B3h] [rbp-Dh] char v21; // [rsp+B7h] [rbp-9h] unsigned long long v22; // [rsp+B8h] [rbp-8h] v22 = __readfsqword(0x28u); v15 = a1; v14 = a2; v13 = a3; v12 = *a1; v11 = *(_DWORD *)(a2 + 308); v8 = *(_QWORD *)(v12 + 64); if ( v8 < v11 ) return 1; if ( (unsigned long long)v11 * v13 >= *(_QWORD *)(v12 + 872) ) { *(_DWORD *)my_thread_var() = 135; return 1; } v10 = ((v8 / v11 - 1) / *(_QWORD *)(v14 + 312) + 1) * *(_QWORD *)(v14 + 312); if ( *(_BYTE *)(v12 + 2023) ) { v18 = v10; v19 = BYTE4(v10); v20 = v13; v21 = BYTE4(v13); v5 = v17; v6 = 12LL; if ( (unsigned __int8)translog_write_record( (unsigned int)&v7, 40, (unsigned int)&dummy_transaction_object, (_DWORD)v15, 12, 3, (long long)v4, (long long)v17, 0LL) ) return 1; } memset(*(_QWORD *)(v14 + 8), 0LL, *(unsigned int *)(v14 + 308)); *(_DWORD *)(v14 + 44) = 0; *(_DWORD *)(v14 + 40) = 0; *(_DWORD *)(v14 + 36) = 0; *(_BYTE *)(v14 + 32) = 1; v9 = v13 - *(_QWORD *)(v14 + 312); if ( v10 <= v9 ) { if ( ma_bitmap_create_missing_into_pagecache(v12, v14, v10, v9, *(_QWORD *)(v14 + 8)) ) return 1; } *(_QWORD *)(v12 + 64) = *(unsigned int *)(v14 + 308) * (v13 + 1); return 0; }
_ma_bitmap_create_missing: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 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 qword ptr [RBP + -0x30],RDX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x134] MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBP + -0x58],RAX JMP 0x001425ea LAB_001425ea: MOV RAX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RBP + -0x3c] CMP RAX,RCX JNC 0x001425fb JMP 0x001427e9 LAB_001425fb: MOV RAX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RBP + -0x3c] IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RCX + 0x368] JC 0x00142623 CALL 0x001fabb0 MOV dword ptr [RAX],0x87 JMP 0x001427e9 LAB_00142623: MOV RAX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RBP + -0x3c] XOR EDX,EDX DIV RCX SUB RAX,0x1 MOV RCX,qword ptr [RBP + -0x28] XOR EDX,EDX DIV qword ptr [RCX + 0x138] ADD RAX,0x1 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x138] IMUL RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x48],RAX JMP 0x0014265e LAB_0014265e: MOV RAX,qword ptr [RBP + -0x38] CMP byte ptr [RAX + 0x7e7],0x0 JZ 0x0014273b JMP 0x00142671 LAB_00142671: LEA RAX,[RBP + -0x14] ADD RAX,0x2 MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x48] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x98] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x48] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0x98] MOV byte ptr [RAX + 0x4],CL JMP 0x001426a5 LAB_001426a5: LEA RAX,[RBP + -0x14] ADD RAX,0x2 ADD RAX,0x5 MOV qword ptr [RBP + -0xa0],RAX MOV RAX,qword ptr [RBP + -0x30] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0xa0] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x30] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0xa0] MOV byte ptr [RAX + 0x4],CL LEA RAX,[RBP + -0x14] MOV qword ptr [RBP + -0x70],RAX MOV qword ptr [RBP + -0x68],0xc MOV RCX,qword ptr [RBP + -0x20] LEA R10,[RBP + -0x90] LEA RAX,[RBP + -0x14] LEA RDI,[RBP + -0x60] MOV ESI,0x28 LEA RDX,[0x582b30] MOV R8D,0xc MOV R9D,0x3 XOR R11D,R11D MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 CALL 0x0014f4f0 CMP AL,0x0 JZ 0x00142739 JMP 0x001427e9 LAB_00142739: JMP 0x0014273b LAB_0014273b: MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x134] MOV EDX,EAX XOR ESI,ESI CALL 0x0012a2c0 MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x2c],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x28],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x24],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x20],0x1 JMP 0x00142781 LAB_00142781: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x28] SUB RAX,qword ptr [RCX + 0x138] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x48] CMP RAX,qword ptr [RBP + -0x50] JA 0x001427c5 MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x28] MOV R8,qword ptr [RAX + 0x8] CALL 0x00141240 MOVSX EAX,AL CMP EAX,0x0 JZ 0x001427c5 JMP 0x001427e9 LAB_001427c5: MOV RCX,qword ptr [RBP + -0x30] ADD RCX,0x1 MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x134] IMUL RCX,RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x40],RCX MOV byte ptr [RBP + -0x15],0x0 JMP 0x001427ef LAB_001427e9: JMP 0x001427eb LAB_001427eb: MOV byte ptr [RBP + -0x15],0x1 LAB_001427ef: MOV AL,byte ptr [RBP + -0x15] MOV byte ptr [RBP + -0xa1],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00142819 MOV AL,byte ptr [RBP + -0xa1] ADD RSP,0xc0 POP RBP RET LAB_00142819: CALL 0x0012a270
int8 _ma_bitmap_create_missing(long *param_1,long param_2,long param_3) { char cVar1; int4 *puVar2; long in_FS_OFFSET; int1 local_98 [32]; int1 *local_78; int8 local_70; int1 local_68 [8]; ulong local_60; ulong local_58; ulong local_50; uint local_44; long local_40; long local_38; long local_30; long *local_28; int1 local_1d; int1 local_1c [2]; int4 local_1a; int1 local_16; int4 local_15; int1 local_11; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_40 = *param_1; local_44 = *(uint *)(param_2 + 0x134); local_60 = *(ulong *)(local_40 + 0x40); local_38 = param_3; local_30 = param_2; local_28 = param_1; if (local_44 <= local_60) { if (param_3 * (ulong)local_44 < *(ulong *)(local_40 + 0x368)) { local_50 = *(long *)(param_2 + 0x138) * ((local_60 / local_44 - 1) / *(ulong *)(param_2 + 0x138) + 1); if (*(char *)(local_40 + 0x7e7) != '\0') { local_1a = (int4)local_50; local_16 = (int1)(local_50 >> 0x20); local_15 = (int4)param_3; local_11 = (int1)((ulong)param_3 >> 0x20); local_78 = local_1c; local_70 = 0xc; cVar1 = translog_write_record (local_68,0x28,dummy_transaction_object,param_1,0xc,3,local_98,local_1c,0) ; if (cVar1 != '\0') goto LAB_001427e9; } memset(*(void **)(local_30 + 8),0,(ulong)*(uint *)(local_30 + 0x134)); *(int4 *)(local_30 + 0x2c) = 0; *(int4 *)(local_30 + 0x28) = 0; *(int4 *)(local_30 + 0x24) = 0; *(int1 *)(local_30 + 0x20) = 1; local_58 = local_38 - *(long *)(local_30 + 0x138); if ((local_58 < local_50) || (cVar1 = _ma_bitmap_create_missing_into_pagecache (local_40,local_30,local_50,local_58,*(int8 *)(local_30 + 8)), cVar1 == '\0')) { *(ulong *)(local_40 + 0x40) = (local_38 + 1) * (ulong)*(uint *)(local_30 + 0x134); local_1d = 0; goto LAB_001427ef; } } else { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x87; } } LAB_001427e9: local_1d = 1; LAB_001427ef: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_1d); }
35,033
set_thread_account(PFS_thread*)
eloqsql/storage/perfschema/pfs_instr.cc
void set_thread_account(PFS_thread *thread) { assert(thread->m_account == NULL); assert(thread->m_user == NULL); assert(thread->m_host == NULL); thread->m_account= find_or_create_account(thread, thread->m_username, thread->m_username_length, thread->m_hostname, thread->m_hostname_length); if ((thread->m_account == NULL) && (thread->m_username_length > 0)) thread->m_user= find_or_create_user(thread, thread->m_username, thread->m_username_length); if ((thread->m_account == NULL) && (thread->m_hostname_length > 0)) thread->m_host= find_or_create_host(thread, thread->m_hostname, thread->m_hostname_length); }
O0
cpp
set_thread_account(PFS_thread*): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq -0x8(%rbp), %rsi addq $0xcdc, %rsi # imm = 0xCDC movq -0x8(%rbp), %rax movl 0xe5c(%rax), %edx movq -0x8(%rbp), %rcx addq $0xe60, %rcx # imm = 0xE60 movq -0x8(%rbp), %rax movl 0xf60(%rax), %r8d callq 0x4ed80 movq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x1620(%rax) movq -0x8(%rbp), %rax cmpq $0x0, 0x1620(%rax) jne 0x2f385 movq -0x8(%rbp), %rax cmpl $0x0, 0xe5c(%rax) jbe 0x2f385 movq -0x8(%rbp), %rdi movq -0x8(%rbp), %rsi addq $0xcdc, %rsi # imm = 0xCDC movq -0x8(%rbp), %rax movl 0xe5c(%rax), %edx callq 0x42ff0 movq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x1618(%rax) movq -0x8(%rbp), %rax cmpq $0x0, 0x1620(%rax) jne 0x2f3cc movq -0x8(%rbp), %rax cmpl $0x0, 0xf60(%rax) jbe 0x2f3cc movq -0x8(%rbp), %rdi movq -0x8(%rbp), %rsi addq $0xe60, %rsi # imm = 0xE60 movq -0x8(%rbp), %rax movl 0xf60(%rax), %edx callq 0x56550 movq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x1610(%rax) addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_Z18set_thread_accountP10PFS_thread: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8]; PFS_thread * mov rsi, [rbp+var_8] add rsi, 0CDCh; char * mov rax, [rbp+var_8] mov edx, [rax+0E5Ch]; unsigned int mov rcx, [rbp+var_8] add rcx, 0E60h; char * mov rax, [rbp+var_8] mov r8d, [rax+0F60h]; unsigned int call _Z22find_or_create_accountP10PFS_threadPKcjS2_j; find_or_create_account(PFS_thread *,char const*,uint,char const*,uint) mov rcx, rax mov rax, [rbp+var_8] mov [rax+1620h], rcx mov rax, [rbp+var_8] cmp qword ptr [rax+1620h], 0 jnz short loc_2F385 mov rax, [rbp+var_8] cmp dword ptr [rax+0E5Ch], 0 jbe short loc_2F385 mov rdi, [rbp+var_8]; PFS_thread * mov rsi, [rbp+var_8] add rsi, 0CDCh; char * mov rax, [rbp+var_8] mov edx, [rax+0E5Ch]; unsigned int call _Z19find_or_create_userP10PFS_threadPKcj; find_or_create_user(PFS_thread *,char const*,uint) mov rcx, rax mov rax, [rbp+var_8] mov [rax+1618h], rcx loc_2F385: mov rax, [rbp+var_8] cmp qword ptr [rax+1620h], 0 jnz short loc_2F3CC mov rax, [rbp+var_8] cmp dword ptr [rax+0F60h], 0 jbe short loc_2F3CC mov rdi, [rbp+var_8]; PFS_thread * mov rsi, [rbp+var_8] add rsi, 0E60h; char * mov rax, [rbp+var_8] mov edx, [rax+0F60h]; unsigned int call _Z19find_or_create_hostP10PFS_threadPKcj; find_or_create_host(PFS_thread *,char const*,uint) mov rcx, rax mov rax, [rbp+var_8] mov [rax+1610h], rcx loc_2F3CC: add rsp, 10h pop rbp retn
PFS_thread * set_thread_account(PFS_thread *a1) { PFS_thread *result; // rax long long host; // rcx *((_QWORD *)a1 + 708) = find_or_create_account( a1, (const char *)a1 + 3292, *((_DWORD *)a1 + 919), (const char *)a1 + 3680, *((_DWORD *)a1 + 984)); if ( !*((_QWORD *)a1 + 708) && *((_DWORD *)a1 + 919) ) *((_QWORD *)a1 + 707) = find_or_create_user(a1, (const char *)a1 + 3292, *((_DWORD *)a1 + 919)); result = a1; if ( !*((_QWORD *)a1 + 708) ) { result = a1; if ( *((_DWORD *)a1 + 984) ) { host = find_or_create_host(a1, (const char *)a1 + 3680, *((_DWORD *)a1 + 984)); result = a1; *((_QWORD *)a1 + 706) = host; } } return result; }
set_thread_account: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0xcdc MOV RAX,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RAX + 0xe5c] MOV RCX,qword ptr [RBP + -0x8] ADD RCX,0xe60 MOV RAX,qword ptr [RBP + -0x8] MOV R8D,dword ptr [RAX + 0xf60] CALL 0x0014ed80 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x1620],RCX MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x1620],0x0 JNZ 0x0012f385 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0xe5c],0x0 JBE 0x0012f385 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0xcdc MOV RAX,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RAX + 0xe5c] CALL 0x00142ff0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x1618],RCX LAB_0012f385: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x1620],0x0 JNZ 0x0012f3cc MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0xf60],0x0 JBE 0x0012f3cc MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0xe60 MOV RAX,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RAX + 0xf60] CALL 0x00156550 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x1610],RCX LAB_0012f3cc: ADD RSP,0x10 POP RBP RET
/* set_thread_account(PFS_thread*) */ void set_thread_account(PFS_thread *param_1) { int8 uVar1; uVar1 = find_or_create_account (param_1,(char *)(param_1 + 0xcdc),*(uint *)(param_1 + 0xe5c), (char *)(param_1 + 0xe60),*(uint *)(param_1 + 0xf60)); *(int8 *)(param_1 + 0x1620) = uVar1; if ((*(long *)(param_1 + 0x1620) == 0) && (*(int *)(param_1 + 0xe5c) != 0)) { uVar1 = find_or_create_user(param_1,(char *)(param_1 + 0xcdc),*(uint *)(param_1 + 0xe5c)); *(int8 *)(param_1 + 0x1618) = uVar1; } if ((*(long *)(param_1 + 0x1620) == 0) && (*(int *)(param_1 + 0xf60) != 0)) { uVar1 = find_or_create_host(param_1,(char *)(param_1 + 0xe60),*(uint *)(param_1 + 0xf60)); *(int8 *)(param_1 + 0x1610) = uVar1; } return; }
35,034
inline_mysql_file_sync
eloqsql/include/mysql/psi/mysql_file.h
static inline int inline_mysql_file_sync( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File fd, myf flags) { int result= 0; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, fd, PSI_FILE_SYNC); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); result= my_sync(fd, flags); PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); return result; } #endif result= my_sync(fd, flags); return result; }
O0
c
inline_mysql_file_sync: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl $0x0, -0x24(%rbp) leaq 0x24e721(%rip), %rax # 0x2c0238 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x78(%rbp), %rdi movl $0x10, %edx callq *%rax movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%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 0x71ba5 leaq 0x24e6de(%rip), %rax # 0x2c0238 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x30(%rbp), %rdi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx xorl %esi, %esi callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi callq 0xf5ae0 movl %eax, -0x24(%rbp) leaq 0x24e6af(%rip), %rax # 0x2c0238 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x30(%rbp), %rdi xorl %ecx, %ecx movl %ecx, %esi callq *%rax movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x71bba movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi callq 0xf5ae0 movl %eax, -0x24(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_file_sync_3: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_24], 0 lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_78] mov edx, 10h call rax mov [rbp+var_30], rax cmp [rbp+var_30], 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_71BA5 lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_30] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] xor esi, esi call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] call my_sync mov [rbp+var_24], eax lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_30] xor ecx, ecx mov esi, ecx call rax mov eax, [rbp+var_24] mov [rbp+var_4], eax jmp short loc_71BBA loc_71BA5: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] call my_sync mov [rbp+var_24], eax mov eax, [rbp+var_24] mov [rbp+var_4], eax loc_71BBA: mov eax, [rbp+var_4] add rsp, 80h pop rbp retn
long long inline_mysql_file_sync_3(long long a1, unsigned int a2, unsigned int a3, long long a4) { _BYTE v5[72]; // [rsp+8h] [rbp-78h] BYREF long long v6; // [rsp+50h] [rbp-30h] unsigned int v7; // [rsp+5Ch] [rbp-24h] long long v8; // [rsp+60h] [rbp-20h] unsigned int v9; // [rsp+68h] [rbp-18h] unsigned int v10; // [rsp+6Ch] [rbp-14h] long long v11; // [rsp+70h] [rbp-10h] v11 = a1; v10 = a2; v9 = a3; v8 = a4; v7 = 0; v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v5, a3, 16LL); if ( v6 ) { ((void ( *)(long long, _QWORD, long long, _QWORD))PSI_server[66])(v6, 0LL, v11, v10); v7 = my_sync(v9, v8); ((void ( *)(long long, _QWORD))PSI_server[67])(v6, 0LL); } else { return (unsigned int)my_sync(v9, v8); } return v7; }
inline_mysql_file_sync: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],0x0 LEA RAX,[0x3c0238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x78] MOV EDX,0x10 CALL RAX MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],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 0x00171ba5 LEA RAX,[0x3c0238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] XOR ESI,ESI CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001f5ae0 MOV dword ptr [RBP + -0x24],EAX LEA RAX,[0x3c0238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x30] XOR ECX,ECX MOV ESI,ECX CALL RAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX JMP 0x00171bba LAB_00171ba5: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001f5ae0 MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX LAB_00171bba: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x80 POP RBP RET
int4 inline_mysql_file_sync(int8 param_1,int4 param_2,int4 param_3,int8 param_4) { int1 local_80 [72]; long local_38; int4 local_2c; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; int4 local_c; local_2c = 0; local_28 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; local_38 = (**(code **)(PSI_server + 0x158))(local_80,param_3,0x10); if (local_38 == 0) { local_c = my_sync(local_20,local_28); } else { (**(code **)(PSI_server + 0x210))(local_38,0,local_18,local_1c); local_2c = my_sync(local_20,local_28); (**(code **)(PSI_server + 0x218))(local_38,0); local_c = local_2c; } return local_c; }
35,035
find_var
bluesky950520[P]quickjs/quickjs.c
static int find_var(JSContext *ctx, JSFunctionDef *fd, JSAtom name) { JSVarDef *vd; int i; if (fd->vars_htab) { i = find_var_htab(fd, name); if (i == -1) goto not_found; vd = &fd->vars[i]; if (fd->vars[i].scope_level == 0) return i; } for(i = fd->var_count; i-- > 0;) { vd = &fd->vars[i]; if (vd->var_name == name) if (vd->scope_level == 0) return i; } not_found: return find_arg(ctx, fd, name); }
O2
c
find_var: pushq %r15 pushq %r14 pushq %rbx movl %esi, %ebx movq %rdi, %r14 movq 0x98(%rdi), %r15 testq %r15, %r15 je 0x54aba movl %ebx, %edi callq 0x51b05 movl %eax, %edi movl 0xa4(%r14), %esi pushq $0x5 popq %rcx movl %esi, %eax cltd idivl %ecx addl %esi, %eax bsrl %eax, %ecx notl %ecx pushq $-0x1 popq %rdx shrl %cl, %edx pushq $0x1 popq %rcx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF movl %edi, %eax andl %edx, %eax movl (%r15,%rax,4), %eax cmpq %r8, %rax je 0x54afb movq 0x90(%r14), %r9 movq %rax, %r10 shlq $0x4, %r10 cmpl %ebx, (%r9,%r10) je 0x54ac3 addl %ecx, %edi incl %ecx jmp 0x54a93 movl 0xa4(%r14), %esi jmp 0x54ad2 movslq %eax, %rcx shlq $0x4, %rcx cmpl $0x0, 0x4(%r9,%rcx) je 0x54b0e movl %esi, %eax shlq $0x4, %rax addq $-0xc, %rax testl %esi, %esi jle 0x54afb movq 0x90(%r14), %rcx cmpl %ebx, -0x4(%rcx,%rax) jne 0x54af3 cmpl $0x0, (%rcx,%rax) je 0x54b0a decl %esi addq $-0x10, %rax jmp 0x54adc movq %r14, %rdi movl %ebx, %esi popq %rbx popq %r14 popq %r15 jmp 0x56492 decl %esi movl %esi, %eax popq %rbx popq %r14 popq %r15 retq
find_var: push r15 push r14 push rbx mov ebx, esi mov r14, rdi mov r15, [rdi+98h] test r15, r15 jz short loc_54ABA mov edi, ebx call hash_atom mov edi, eax mov esi, [r14+0A4h] push 5 pop rcx mov eax, esi cdq idiv ecx add eax, esi bsr ecx, eax not ecx push 0FFFFFFFFFFFFFFFFh pop rdx shr edx, cl push 1 pop rcx mov r8d, 0FFFFFFFFh loc_54A93: mov eax, edi and eax, edx mov eax, [r15+rax*4] cmp rax, r8 jz short loc_54AFB mov r9, [r14+90h] mov r10, rax shl r10, 4 cmp [r9+r10], ebx jz short loc_54AC3 add edi, ecx inc ecx jmp short loc_54A93 loc_54ABA: mov esi, [r14+0A4h] jmp short loc_54AD2 loc_54AC3: movsxd rcx, eax shl rcx, 4 cmp dword ptr [r9+rcx+4], 0 jz short loc_54B0E loc_54AD2: mov eax, esi shl rax, 4 add rax, 0FFFFFFFFFFFFFFF4h loc_54ADC: test esi, esi jle short loc_54AFB mov rcx, [r14+90h] cmp [rcx+rax-4], ebx jnz short loc_54AF3 cmp dword ptr [rcx+rax], 0 jz short loc_54B0A loc_54AF3: dec esi add rax, 0FFFFFFFFFFFFFFF0h jmp short loc_54ADC loc_54AFB: mov rdi, r14 mov esi, ebx pop rbx pop r14 pop r15 jmp find_arg loc_54B0A: dec esi mov eax, esi loc_54B0E: pop rbx pop r14 pop r15 retn
long long find_var(long long a1, unsigned int a2, long long a3, long long a4, long long a5) { long long v7; // r15 int v8; // edi int v9; // esi unsigned int v10; // ecx long long result; // rax long long v12; // r9 long long v13; // rax v7 = *(_QWORD *)(a1 + 152); if ( v7 ) { v8 = hash_atom(a2); v9 = *(_DWORD *)(a1 + 164); _BitScanReverse(&v10, v9 + v9 / 5); a3 = 0xFFFFFFFF >> ~(_BYTE)v10; a4 = 1LL; a5 = 0xFFFFFFFFLL; while ( 1 ) { result = *(unsigned int *)(v7 + 4LL * ((unsigned int)a3 & v8)); if ( result == 0xFFFFFFFFLL ) break; v12 = *(_QWORD *)(a1 + 144); if ( *(_DWORD *)(v12 + 16 * result) == a2 ) { a4 = 16LL * (int)result; if ( !*(_DWORD *)(v12 + a4 + 4) ) return result; goto LABEL_8; } v8 += a4; a4 = (unsigned int)(a4 + 1); } } else { v9 = *(_DWORD *)(a1 + 164); LABEL_8: v13 = 16LL * (unsigned int)v9 - 12; while ( v9 > 0 ) { a4 = *(_QWORD *)(a1 + 144); if ( *(_DWORD *)(a4 + v13 - 4) == a2 && !*(_DWORD *)(a4 + v13) ) return (unsigned int)(v9 - 1); --v9; v13 -= 16LL; } } return find_arg(a1, a2, a3, a4, a5); }
find_var: PUSH R15 PUSH R14 PUSH RBX MOV EBX,ESI MOV R14,RDI MOV R15,qword ptr [RDI + 0x98] TEST R15,R15 JZ 0x00154aba MOV EDI,EBX CALL 0x00151b05 MOV EDI,EAX MOV ESI,dword ptr [R14 + 0xa4] PUSH 0x5 POP RCX MOV EAX,ESI CDQ IDIV ECX ADD EAX,ESI BSR ECX,EAX NOT ECX PUSH -0x1 POP RDX SHR EDX,CL PUSH 0x1 POP RCX MOV R8D,0xffffffff LAB_00154a93: MOV EAX,EDI AND EAX,EDX MOV EAX,dword ptr [R15 + RAX*0x4] CMP RAX,R8 JZ 0x00154afb MOV R9,qword ptr [R14 + 0x90] MOV R10,RAX SHL R10,0x4 CMP dword ptr [R9 + R10*0x1],EBX JZ 0x00154ac3 ADD EDI,ECX INC ECX JMP 0x00154a93 LAB_00154aba: MOV ESI,dword ptr [R14 + 0xa4] JMP 0x00154ad2 LAB_00154ac3: MOVSXD RCX,EAX SHL RCX,0x4 CMP dword ptr [R9 + RCX*0x1 + 0x4],0x0 JZ 0x00154b0e LAB_00154ad2: MOV EAX,ESI SHL RAX,0x4 ADD RAX,-0xc LAB_00154adc: TEST ESI,ESI JLE 0x00154afb MOV RCX,qword ptr [R14 + 0x90] CMP dword ptr [RCX + RAX*0x1 + -0x4],EBX JNZ 0x00154af3 CMP dword ptr [RCX + RAX*0x1],0x0 JZ 0x00154b0a LAB_00154af3: DEC ESI ADD RAX,-0x10 JMP 0x00154adc LAB_00154afb: MOV RDI,R14 MOV ESI,EBX POP RBX POP R14 POP R15 JMP 0x00156492 LAB_00154b0a: DEC ESI MOV EAX,ESI LAB_00154b0e: POP RBX POP R14 POP R15 RET
ulong find_var(long param_1,int param_2) { int iVar1; uint uVar2; uint uVar3; long lVar4; ulong uVar5; int iVar6; uint uVar7; lVar4 = *(long *)(param_1 + 0x98); if (lVar4 == 0) { uVar7 = *(uint *)(param_1 + 0xa4); LAB_00154ad2: lVar4 = (ulong)uVar7 * 0x10 + -0xc; for (; 0 < (int)uVar7; uVar7 = uVar7 - 1) { if ((*(int *)(*(long *)(param_1 + 0x90) + -4 + lVar4) == param_2) && (*(int *)(*(long *)(param_1 + 0x90) + lVar4) == 0)) { return (ulong)(uVar7 - 1); } lVar4 = lVar4 + -0x10; } } else { uVar2 = hash_atom(param_2); uVar7 = *(uint *)(param_1 + 0xa4); uVar3 = (int)uVar7 / 5 + uVar7; iVar1 = 0x1f; if (uVar3 != 0) { for (; uVar3 >> iVar1 == 0; iVar1 = iVar1 + -1) { } } iVar6 = 1; while( true ) { uVar3 = *(uint *)(lVar4 + (ulong)(uVar2 & 0xffffffffU >> (~(byte)iVar1 & 0x1f)) * 4); uVar5 = (ulong)uVar3; if (uVar5 == 0xffffffff) break; if (*(int *)(*(long *)(param_1 + 0x90) + uVar5 * 0x10) == param_2) { if (*(int *)(*(long *)(param_1 + 0x90) + 4 + (long)(int)uVar3 * 0x10) == 0) { return uVar5; } goto LAB_00154ad2; } uVar2 = uVar2 + iVar6; iVar6 = iVar6 + 1; } } uVar5 = find_arg(param_1,param_2); return uVar5; }
35,036
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 0x1a538b(%rip), %rcx # 0x1dd8c8 movq (%rcx), %rcx cmpl (%rcx), %eax jne 0x3855a leaq 0x1a537d(%rip), %rax # 0x1dd8c8 movq (%rax), %rax movq %rax, -0x2f8(%rbp) jmp 0x3862c leaq 0x37dec3(%rip), %rdi # 0x3b6424 leaq -0x548(%rip), %rsi # 0x38020 callq 0x24260 cmpl $0x800, -0x2fc(%rbp) # imm = 0x800 jae 0x385a5 leaq -0xb8(%rbp), %rdi callq 0x37640 movl -0x2fc(%rbp), %esi movq -0x308(%rbp), %rdx leaq -0xb8(%rbp), %rdi callq 0x38670 movq %rax, -0x310(%rbp) cmpq $0x0, -0x310(%rbp) jne 0x3861e movq -0x308(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0x3861e leaq -0x2d0(%rbp), %rdi callq 0x37ce0 movq %rax, %rdi leaq 0x4f9f1(%rip), %rsi # 0x87fc7 callq 0x24290 movb $0x23, -0x2f0(%rbp) movl -0x2fc(%rbp), %eax movl %eax, %edi leaq -0x2f0(%rbp), %rsi addq $0x1, %rsi movl $0xa, %edx callq 0x81c00 leaq -0x2f0(%rbp), %rdx leaq -0x2d0(%rbp), %rcx movl $0x16, %edi movl $0x4, %esi movb $0x0, %al callq 0x3d7e0 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 0x3865c movq -0x318(%rbp), %rax addq $0x320, %rsp # imm = 0x320 popq %rbp retq callq 0x242c0 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_3855A lea rax, default_charset_info mov rax, [rax] mov [rbp+var_2F8], rax jmp loc_3862C loc_3855A: lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once cmp [rbp+var_2FC], 800h jnb short loc_385A5 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_385A5: cmp [rbp+var_310], 0 jnz short loc_3861E mov rax, [rbp+var_308] and rax, 10h cmp rax, 0 jz short loc_3861E 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_3861E: mov rax, [rbp+var_310] mov [rbp+var_2F8], rax loc_3862C: 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_3865C mov rax, [rbp+var_318] add rsp, 320h pop rbp retn loc_3865C: 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,[0x2dd8c8] MOV RCX,qword ptr [RCX] CMP EAX,dword ptr [RCX] JNZ 0x0013855a LEA RAX,[0x2dd8c8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x2f8],RAX JMP 0x0013862c LAB_0013855a: LEA RDI,[0x4b6424] LEA RSI,[0x138020] CALL 0x00124260 CMP dword ptr [RBP + -0x2fc],0x800 JNC 0x001385a5 LEA RDI,[RBP + -0xb8] CALL 0x00137640 MOV ESI,dword ptr [RBP + -0x2fc] MOV RDX,qword ptr [RBP + -0x308] LEA RDI,[RBP + -0xb8] CALL 0x00138670 MOV qword ptr [RBP + -0x310],RAX LAB_001385a5: CMP qword ptr [RBP + -0x310],0x0 JNZ 0x0013861e MOV RAX,qword ptr [RBP + -0x308] AND RAX,0x10 CMP RAX,0x0 JZ 0x0013861e LEA RDI,[RBP + -0x2d0] CALL 0x00137ce0 MOV RDI,RAX LEA RSI,[0x187fc7] CALL 0x00124290 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 0x00181c00 LEA RDX,[RBP + -0x2f0] LEA RCX,[RBP + -0x2d0] MOV EDI,0x16 MOV ESI,0x4 MOV AL,0x0 CALL 0x0013d7e0 LAB_0013861e: MOV RAX,qword ptr [RBP + -0x310] MOV qword ptr [RBP + -0x2f8],RAX LAB_0013862c: 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 0x0013865c MOV RAX,qword ptr [RBP + -0x318] ADD RSP,0x320 POP RBP RET LAB_0013865c: CALL 0x001242c0
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(); }
35,037
stbi__pnm_test(stbi__context*)
llama.cpp/examples/llava/../../common/stb_image.h
static int stbi__pnm_test(stbi__context *s) { char p, t; p = (char) stbi__get8(s); t = (char) stbi__get8(s); if (p != 'P' || (t != '5' && t != '6')) { stbi__rewind( s ); return 0; } return 1; }
O3
c
stbi__pnm_test(stbi__context*): pushq %rbp pushq %rbx pushq %rax movq %rdi, %rbx movq 0xc0(%rdi), %rax movq 0xc8(%rdi), %rcx cmpq %rcx, %rax jb 0x2db23 cmpl $0x0, 0x30(%rbx) je 0x2db8a movq %rbx, %rdi callq 0x2f0a9 movq 0xc0(%rbx), %rax movq 0xc8(%rbx), %rcx leaq 0x1(%rax), %rdx movq %rdx, 0xc0(%rbx) cmpb $0x50, (%rax) setne %bpl movq %rdx, %rax cmpq %rcx, %rax jb 0x2db52 cmpl $0x0, 0x30(%rbx) je 0x2db73 movq %rbx, %rdi callq 0x2f0a9 movq 0xc0(%rbx), %rax leaq 0x1(%rax), %rcx movq %rcx, 0xc0(%rbx) movb (%rax), %al addb $-0x37, %al cmpb $-0x2, %al setae %cl notb %bpl movl $0x1, %eax testb %cl, %bpl jne 0x2db83 movups 0xd0(%rbx), %xmm0 movups %xmm0, 0xc0(%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq movb $0x1, %bpl jmp 0x2db38
_ZL14stbi__pnm_testP13stbi__context: push rbp push rbx push rax mov rbx, rdi mov rax, [rdi+0C0h] mov rcx, [rdi+0C8h] cmp rax, rcx jb short loc_2DB23 cmp dword ptr [rbx+30h], 0 jz short loc_2DB8A mov rdi, rbx call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [rbx+0C0h] mov rcx, [rbx+0C8h] loc_2DB23: lea rdx, [rax+1] mov [rbx+0C0h], rdx cmp byte ptr [rax], 50h ; 'P' setnz bpl mov rax, rdx loc_2DB38: cmp rax, rcx jb short loc_2DB52 cmp dword ptr [rbx+30h], 0 jz short loc_2DB73 mov rdi, rbx call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [rbx+0C0h] loc_2DB52: lea rcx, [rax+1] mov [rbx+0C0h], rcx mov al, [rax] add al, 0C9h cmp al, 0FEh setnb cl not bpl mov eax, 1 test bpl, cl jnz short loc_2DB83 loc_2DB73: movups xmm0, xmmword ptr [rbx+0D0h] movups xmmword ptr [rbx+0C0h], xmm0 xor eax, eax loc_2DB83: add rsp, 8 pop rbx pop rbp retn loc_2DB8A: mov bpl, 1 jmp short loc_2DB38
long long stbi__pnm_test(long long a1) { _BYTE *v1; // rax unsigned long long v2; // rcx char v3; // bp bool v4; // cl long long result; // rax v1 = *(_BYTE **)(a1 + 192); v2 = *(_QWORD *)(a1 + 200); if ( (unsigned long long)v1 < v2 ) goto LABEL_4; if ( *(_DWORD *)(a1 + 48) ) { stbi__refill_buffer(a1); v1 = *(_BYTE **)(a1 + 192); v2 = *(_QWORD *)(a1 + 200); LABEL_4: *(_QWORD *)(a1 + 192) = v1 + 1; v3 = *v1++ != 80; goto LABEL_5; } v3 = 1; LABEL_5: if ( (unsigned long long)v1 < v2 ) goto LABEL_8; if ( *(_DWORD *)(a1 + 48) ) { stbi__refill_buffer(a1); v1 = *(_BYTE **)(a1 + 192); LABEL_8: *(_QWORD *)(a1 + 192) = v1 + 1; v4 = (unsigned __int8)(*v1 - 55) >= 0xFEu; result = 1LL; if ( (v4 & (unsigned __int8)~v3) != 0 ) return result; } *(_OWORD *)(a1 + 192) = *(_OWORD *)(a1 + 208); return 0LL; }
stbi__pnm_test: PUSH RBP PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0xc0] MOV RCX,qword ptr [RDI + 0xc8] CMP RAX,RCX JC 0x0012db23 CMP dword ptr [RBX + 0x30],0x0 JZ 0x0012db8a MOV RDI,RBX CALL 0x0012f0a9 MOV RAX,qword ptr [RBX + 0xc0] MOV RCX,qword ptr [RBX + 0xc8] LAB_0012db23: LEA RDX,[RAX + 0x1] MOV qword ptr [RBX + 0xc0],RDX CMP byte ptr [RAX],0x50 SETNZ BPL MOV RAX,RDX LAB_0012db38: CMP RAX,RCX JC 0x0012db52 CMP dword ptr [RBX + 0x30],0x0 JZ 0x0012db73 MOV RDI,RBX CALL 0x0012f0a9 MOV RAX,qword ptr [RBX + 0xc0] LAB_0012db52: LEA RCX,[RAX + 0x1] MOV qword ptr [RBX + 0xc0],RCX MOV AL,byte ptr [RAX] ADD AL,0xc9 CMP AL,0xfe SETNC CL NOT BPL MOV EAX,0x1 TEST BPL,CL JNZ 0x0012db83 LAB_0012db73: MOVUPS XMM0,xmmword ptr [RBX + 0xd0] MOVUPS xmmword ptr [RBX + 0xc0],XMM0 XOR EAX,EAX LAB_0012db83: ADD RSP,0x8 POP RBX POP RBP RET LAB_0012db8a: MOV BPL,0x1 JMP 0x0012db38
/* stbi__pnm_test(stbi__context*) */ int8 stbi__pnm_test(stbi__context *param_1) { char *pcVar1; char *pcVar2; bool bVar3; pcVar1 = *(char **)(param_1 + 0xc0); pcVar2 = *(char **)(param_1 + 200); if (pcVar1 < pcVar2) { LAB_0012db23: *(char **)(param_1 + 0xc0) = pcVar1 + 1; bVar3 = *pcVar1 != 'P'; pcVar1 = pcVar1 + 1; } else { if (*(int *)(param_1 + 0x30) != 0) { stbi__refill_buffer(param_1); pcVar1 = *(char **)(param_1 + 0xc0); pcVar2 = *(char **)(param_1 + 200); goto LAB_0012db23; } bVar3 = true; } if (pcVar2 <= pcVar1) { if (*(int *)(param_1 + 0x30) == 0) goto LAB_0012db73; stbi__refill_buffer(param_1); pcVar1 = *(char **)(param_1 + 0xc0); } *(char **)(param_1 + 0xc0) = pcVar1 + 1; if ((bool)(~bVar3 & 0xfd < (byte)(*pcVar1 - 0x37U))) { return 1; } LAB_0012db73: *(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 0xd0); *(int8 *)(param_1 + 200) = *(int8 *)(param_1 + 0xd8); return 0; }
35,038
my_open_parent_dir_nosymlinks
eloqsql/mysys/my_symlink.c
const char *my_open_parent_dir_nosymlinks(const char *pathname, int *pdfd) { char buf[FN_REFLEN + 1]; char *s= buf, *e= buf+1, *end= strnmov(buf, pathname, sizeof(buf)); int fd, dfd= -1; if (*end) { errno= ENAMETOOLONG; return NULL; } if (*s != '/') /* not an absolute path */ { errno= ENOENT; return NULL; } for (;;) { if (*e == '/') /* '//' in the path */ { errno= ENOENT; goto err; } while (*e && *e != '/') e++; *e= 0; if (!memcmp(s, ".", 2) || !memcmp(s, "..", 3)) { errno= ENOENT; goto err; } if (++e >= end) { *pdfd= dfd; return pathname + (s - buf); } fd = openat(dfd, s, O_NOFOLLOW | O_PATH | O_CLOEXEC); if (fd < 0) goto err; if (dfd >= 0) close(dfd); dfd= fd; s= e; } err: if (dfd >= 0) close(dfd); return NULL; }
O0
c
my_open_parent_dir_nosymlinks: pushq %rbp movq %rsp, %rbp subq $0x260, %rsp # imm = 0x260 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x220(%rbp) movq %rsi, -0x228(%rbp) leaq -0x210(%rbp), %rax movq %rax, -0x230(%rbp) leaq -0x210(%rbp), %rax addq $0x1, %rax movq %rax, -0x238(%rbp) leaq -0x210(%rbp), %rdi movq -0x220(%rbp), %rsi movl $0x201, %edx # imm = 0x201 callq 0x879b0 movq %rax, -0x240(%rbp) movl $0xffffffff, -0x248(%rbp) # imm = 0xFFFFFFFF movq -0x240(%rbp), %rax cmpb $0x0, (%rax) je 0x33676 callq 0x25050 movl $0x24, (%rax) movq $0x0, -0x218(%rbp) jmp 0x3382a movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax je 0x336a0 callq 0x25050 movl $0x2, (%rax) movq $0x0, -0x218(%rbp) jmp 0x3382a jmp 0x336a2 movq -0x238(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x336c1 callq 0x25050 movl $0x2, (%rax) jmp 0x3380b jmp 0x336c3 movq -0x238(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x249(%rbp) je 0x336f0 movq -0x238(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax setne %al movb %al, -0x249(%rbp) movb -0x249(%rbp), %al testb $0x1, %al jne 0x336fc jmp 0x33710 movq -0x238(%rbp), %rax addq $0x1, %rax movq %rax, -0x238(%rbp) jmp 0x336c3 movq -0x238(%rbp), %rax movb $0x0, (%rax) movq -0x230(%rbp), %rax movw (%rax), %ax subw $0x2e, %ax setne %al movzbl %al, %eax cmpl $0x0, %eax je 0x33750 movq -0x230(%rbp), %rdi leaq 0x57edd(%rip), %rsi # 0x8b61e movl $0x3, %edx callq 0x25140 cmpl $0x0, %eax jne 0x33760 callq 0x25050 movl $0x2, (%rax) jmp 0x3380b movq -0x238(%rbp), %rax addq $0x1, %rax movq %rax, -0x238(%rbp) cmpq -0x240(%rbp), %rax jb 0x337ae movl -0x248(%rbp), %ecx movq -0x228(%rbp), %rax movl %ecx, (%rax) movq -0x220(%rbp), %rax movq -0x230(%rbp), %rcx leaq -0x210(%rbp), %rdx subq %rdx, %rcx addq %rcx, %rax movq %rax, -0x218(%rbp) jmp 0x3382a movl -0x248(%rbp), %edi movq -0x230(%rbp), %rsi movl $0x2a0000, %edx # imm = 0x2A0000 movb $0x0, %al callq 0x252b0 movl %eax, -0x244(%rbp) cmpl $0x0, -0x244(%rbp) jge 0x337d8 jmp 0x3380b cmpl $0x0, -0x248(%rbp) jl 0x337ec movl -0x248(%rbp), %edi callq 0x25640 movl -0x244(%rbp), %eax movl %eax, -0x248(%rbp) movq -0x238(%rbp), %rax movq %rax, -0x230(%rbp) jmp 0x336a2 cmpl $0x0, -0x248(%rbp) jl 0x3381f movl -0x248(%rbp), %edi callq 0x25640 movq $0x0, -0x218(%rbp) movq -0x218(%rbp), %rax movq %rax, -0x258(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x3385a movq -0x258(%rbp), %rax addq $0x260, %rsp # imm = 0x260 popq %rbp retq callq 0x25340 nop
my_open_parent_dir_nosymlinks: push rbp mov rbp, rsp sub rsp, 260h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_220], rdi mov [rbp+var_228], rsi lea rax, [rbp+var_210] mov [rbp+var_230], rax lea rax, [rbp+var_210] add rax, 1 mov [rbp+var_238], rax lea rdi, [rbp+var_210] mov rsi, [rbp+var_220] mov edx, 201h call strnmov mov [rbp+var_240], rax mov [rbp+var_248], 0FFFFFFFFh mov rax, [rbp+var_240] cmp byte ptr [rax], 0 jz short loc_33676 call ___errno_location mov dword ptr [rax], 24h ; '$' mov [rbp+var_218], 0 jmp loc_3382A loc_33676: mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jz short loc_336A0 call ___errno_location mov dword ptr [rax], 2 mov [rbp+var_218], 0 jmp loc_3382A loc_336A0: jmp short $+2 loc_336A2: mov rax, [rbp+var_238] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_336C1 call ___errno_location mov dword ptr [rax], 2 jmp loc_3380B loc_336C1: jmp short $+2 loc_336C3: mov rax, [rbp+var_238] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 0 mov [rbp+var_249], al jz short loc_336F0 mov rax, [rbp+var_238] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' setnz al mov [rbp+var_249], al loc_336F0: mov al, [rbp+var_249] test al, 1 jnz short loc_336FC jmp short loc_33710 loc_336FC: mov rax, [rbp+var_238] add rax, 1 mov [rbp+var_238], rax jmp short loc_336C3 loc_33710: mov rax, [rbp+var_238] mov byte ptr [rax], 0 mov rax, [rbp+var_230] mov ax, [rax] sub ax, 2Eh ; '.' setnz al movzx eax, al cmp eax, 0 jz short loc_33750 mov rdi, [rbp+var_230] lea rsi, asc_8B61E; ".." mov edx, 3 call _memcmp cmp eax, 0 jnz short loc_33760 loc_33750: call ___errno_location mov dword ptr [rax], 2 jmp loc_3380B loc_33760: mov rax, [rbp+var_238] add rax, 1 mov [rbp+var_238], rax cmp rax, [rbp+var_240] jb short loc_337AE mov ecx, [rbp+var_248] mov rax, [rbp+var_228] mov [rax], ecx mov rax, [rbp+var_220] mov rcx, [rbp+var_230] lea rdx, [rbp+var_210] sub rcx, rdx add rax, rcx mov [rbp+var_218], rax jmp short loc_3382A loc_337AE: mov edi, [rbp+var_248] mov rsi, [rbp+var_230] mov edx, offset unk_2A0000 mov al, 0 call _openat64 mov [rbp+var_244], eax cmp [rbp+var_244], 0 jge short loc_337D8 jmp short loc_3380B loc_337D8: cmp [rbp+var_248], 0 jl short loc_337EC mov edi, [rbp+var_248] call _close loc_337EC: mov eax, [rbp+var_244] mov [rbp+var_248], eax mov rax, [rbp+var_238] mov [rbp+var_230], rax jmp loc_336A2 loc_3380B: cmp [rbp+var_248], 0 jl short loc_3381F mov edi, [rbp+var_248] call _close loc_3381F: mov [rbp+var_218], 0 loc_3382A: mov rax, [rbp+var_218] mov [rbp+var_258], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_3385A mov rax, [rbp+var_258] add rsp, 260h pop rbp retn loc_3385A: call ___stack_chk_fail
long long my_open_parent_dir_nosymlinks(long long a1, int *a2) { long long v2; // rcx bool v4; // [rsp+17h] [rbp-249h] int v5; // [rsp+18h] [rbp-248h] int v6; // [rsp+1Ch] [rbp-244h] const char *v7; // [rsp+20h] [rbp-240h] const char *v8; // [rsp+28h] [rbp-238h] const char *v9; // [rsp+30h] [rbp-230h] char v11; // [rsp+50h] [rbp-210h] BYREF _BYTE v12[527]; // [rsp+51h] [rbp-20Fh] BYREF *(_QWORD *)&v12[519] = __readfsqword(0x28u); v9 = &v11; v8 = v12; v7 = (const char *)strnmov(&v11, a1, 513LL); v5 = -1; if ( *v7 ) { *(_DWORD *)__errno_location() = 36; return 0LL; } else if ( v11 == 47 ) { while ( *v8 != 47 ) { while ( 1 ) { v2 = (unsigned int)*v8; v4 = 0; if ( *v8 ) v4 = *v8 != 47; if ( !v4 ) break; ++v8; } *v8 = 0; if ( *(_WORD *)v9 == 46 || !(unsigned int)strcmp(v9, "..") ) break; if ( ++v8 >= v7 ) { *a2 = v5; return v9 - &v11 + a1; } v6 = openat64((unsigned int)v5, v9, &unk_2A0000, v2); if ( v6 < 0 ) goto LABEL_20; if ( v5 >= 0 ) close((unsigned int)v5); v5 = v6; v9 = v8; } *(_DWORD *)__errno_location() = 2; LABEL_20: if ( v5 >= 0 ) close((unsigned int)v5); return 0LL; } else { *(_DWORD *)__errno_location() = 2; return 0LL; } }
my_open_parent_dir_nosymlinks: PUSH RBP MOV RBP,RSP SUB RSP,0x260 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x220],RDI MOV qword ptr [RBP + -0x228],RSI LEA RAX,[RBP + -0x210] MOV qword ptr [RBP + -0x230],RAX LEA RAX,[RBP + -0x210] ADD RAX,0x1 MOV qword ptr [RBP + -0x238],RAX LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x220] MOV EDX,0x201 CALL 0x001879b0 MOV qword ptr [RBP + -0x240],RAX MOV dword ptr [RBP + -0x248],0xffffffff MOV RAX,qword ptr [RBP + -0x240] CMP byte ptr [RAX],0x0 JZ 0x00133676 CALL 0x00125050 MOV dword ptr [RAX],0x24 MOV qword ptr [RBP + -0x218],0x0 JMP 0x0013382a LAB_00133676: MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JZ 0x001336a0 CALL 0x00125050 MOV dword ptr [RAX],0x2 MOV qword ptr [RBP + -0x218],0x0 JMP 0x0013382a LAB_001336a0: JMP 0x001336a2 LAB_001336a2: MOV RAX,qword ptr [RBP + -0x238] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x001336c1 CALL 0x00125050 MOV dword ptr [RAX],0x2 JMP 0x0013380b LAB_001336c1: JMP 0x001336c3 LAB_001336c3: MOV RAX,qword ptr [RBP + -0x238] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x249],AL JZ 0x001336f0 MOV RAX,qword ptr [RBP + -0x238] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f SETNZ AL MOV byte ptr [RBP + -0x249],AL LAB_001336f0: MOV AL,byte ptr [RBP + -0x249] TEST AL,0x1 JNZ 0x001336fc JMP 0x00133710 LAB_001336fc: MOV RAX,qword ptr [RBP + -0x238] ADD RAX,0x1 MOV qword ptr [RBP + -0x238],RAX JMP 0x001336c3 LAB_00133710: MOV RAX,qword ptr [RBP + -0x238] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x230] MOV AX,word ptr [RAX] SUB AX,0x2e SETNZ AL MOVZX EAX,AL CMP EAX,0x0 JZ 0x00133750 MOV RDI,qword ptr [RBP + -0x230] LEA RSI,[0x18b61e] MOV EDX,0x3 CALL 0x00125140 CMP EAX,0x0 JNZ 0x00133760 LAB_00133750: CALL 0x00125050 MOV dword ptr [RAX],0x2 JMP 0x0013380b LAB_00133760: MOV RAX,qword ptr [RBP + -0x238] ADD RAX,0x1 MOV qword ptr [RBP + -0x238],RAX CMP RAX,qword ptr [RBP + -0x240] JC 0x001337ae MOV ECX,dword ptr [RBP + -0x248] MOV RAX,qword ptr [RBP + -0x228] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x220] MOV RCX,qword ptr [RBP + -0x230] LEA RDX,[RBP + -0x210] SUB RCX,RDX ADD RAX,RCX MOV qword ptr [RBP + -0x218],RAX JMP 0x0013382a LAB_001337ae: MOV EDI,dword ptr [RBP + -0x248] MOV RSI,qword ptr [RBP + -0x230] MOV EDX,0x2a0000 MOV AL,0x0 CALL 0x001252b0 MOV dword ptr [RBP + -0x244],EAX CMP dword ptr [RBP + -0x244],0x0 JGE 0x001337d8 JMP 0x0013380b LAB_001337d8: CMP dword ptr [RBP + -0x248],0x0 JL 0x001337ec MOV EDI,dword ptr [RBP + -0x248] CALL 0x00125640 LAB_001337ec: MOV EAX,dword ptr [RBP + -0x244] MOV dword ptr [RBP + -0x248],EAX MOV RAX,qword ptr [RBP + -0x238] MOV qword ptr [RBP + -0x230],RAX JMP 0x001336a2 LAB_0013380b: CMP dword ptr [RBP + -0x248],0x0 JL 0x0013381f MOV EDI,dword ptr [RBP + -0x248] CALL 0x00125640 LAB_0013381f: MOV qword ptr [RBP + -0x218],0x0 LAB_0013382a: MOV RAX,qword ptr [RBP + -0x218] MOV qword ptr [RBP + -0x258],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0013385a MOV RAX,qword ptr [RBP + -0x258] ADD RSP,0x260 POP RBP RET LAB_0013385a: CALL 0x00125340
long my_open_parent_dir_nosymlinks(long param_1,int *param_2) { int iVar1; short *psVar2; int *piVar3; long in_FS_OFFSET; bool bVar4; int local_250; short *local_240; short *local_238; long local_220; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_238 = (short *)local_218; local_240 = (short *)(local_218 + 1); psVar2 = (short *)strnmov(local_218,param_1,0x201); local_250 = -1; if ((char)*psVar2 == '\0') { iVar1 = local_250; if (local_218[0] == '/') { while (local_250 = iVar1, (char)*local_240 != '/') { while( true ) { bVar4 = false; if ((char)*local_240 != '\0') { bVar4 = (char)*local_240 != '/'; } if (!bVar4) break; local_240 = (short *)((long)local_240 + 1); } *(char *)local_240 = '\0'; if ((*local_238 == 0x2e) || (iVar1 = memcmp(local_238,&DAT_0018b61e,3), iVar1 == 0)) { piVar3 = __errno_location(); *piVar3 = 2; goto LAB_0013380b; } local_240 = (short *)((long)local_240 + 1); if (psVar2 <= local_240) { *param_2 = local_250; local_220 = (long)local_238 + (param_1 - (long)local_218); goto LAB_0013382a; } iVar1 = openat64(local_250,(char *)local_238,0x2a0000); if (iVar1 < 0) goto LAB_0013380b; local_238 = local_240; if (-1 < local_250) { close(local_250); } } piVar3 = __errno_location(); *piVar3 = 2; LAB_0013380b: if (-1 < local_250) { close(local_250); } local_220 = 0; } else { piVar3 = __errno_location(); *piVar3 = 2; local_220 = 0; } } else { piVar3 = __errno_location(); *piVar3 = 0x24; local_220 = 0; } LAB_0013382a: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_220; }
35,039
my_open_parent_dir_nosymlinks
eloqsql/mysys/my_symlink.c
const char *my_open_parent_dir_nosymlinks(const char *pathname, int *pdfd) { char buf[FN_REFLEN + 1]; char *s= buf, *e= buf+1, *end= strnmov(buf, pathname, sizeof(buf)); int fd, dfd= -1; if (*end) { errno= ENAMETOOLONG; return NULL; } if (*s != '/') /* not an absolute path */ { errno= ENOENT; return NULL; } for (;;) { if (*e == '/') /* '//' in the path */ { errno= ENOENT; goto err; } while (*e && *e != '/') e++; *e= 0; if (!memcmp(s, ".", 2) || !memcmp(s, "..", 3)) { errno= ENOENT; goto err; } if (++e >= end) { *pdfd= dfd; return pathname + (s - buf); } fd = openat(dfd, s, O_NOFOLLOW | O_PATH | O_CLOEXEC); if (fd < 0) goto err; if (dfd >= 0) close(dfd); dfd= fd; s= e; } err: if (dfd >= 0) close(dfd); return NULL; }
O3
c
my_open_parent_dir_nosymlinks: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x228, %rsp # imm = 0x228 movq %rsi, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq -0x240(%rbp), %r15 movl $0x201, %edx # imm = 0x201 movq %r15, %rdi movq %rbx, %rsi callq 0x610bc cmpb $0x0, (%rax) je 0x2e483 callq 0x24060 movl $0x24, (%rax) jmp 0x2e55a cmpb $0x2f, -0x240(%rbp) jne 0x2e52f movq %rax, %r12 movq %r14, -0x248(%rbp) movb -0x23f(%rbp), %al movl $0xffffffff, %r13d # imm = 0xFFFFFFFF cmpb $0x2f, %al je 0x2e53f leaq -0x23f(%rbp), %rcx movl $0xffffffff, %r14d # imm = 0xFFFFFFFF movq %r15, %rsi incq %rcx movq %rcx, %r15 testb %al, %al je 0x2e4d8 movzbl %al, %eax cmpl $0x2f, %eax je 0x2e4d8 movb (%r15), %al incq %r15 jmp 0x2e4c4 movb $0x0, -0x1(%r15) cmpw $0x2e, (%rsi) je 0x2e53c movzwl (%rsi), %eax xorl $0x2e2e, %eax # imm = 0x2E2E movzbl 0x2(%rsi), %ecx orw %ax, %cx je 0x2e53c cmpq %r12, %r15 jae 0x2e580 movl %r14d, %edi movl $0x2a0000, %edx # imm = 0x2A0000 xorl %eax, %eax callq 0x242e0 testl %eax, %eax js 0x2e54d movl %eax, %r13d testl %r14d, %r14d js 0x2e520 movl %r14d, %edi callq 0x24690 movb (%r15), %al movl %r13d, %r14d movq %r15, %rcx cmpb $0x2f, %al jne 0x2e4bb jmp 0x2e53f callq 0x24060 movl $0x2, (%rax) jmp 0x2e55a movl %r14d, %r13d callq 0x24060 movl $0x2, (%rax) movl %r13d, %r14d testl %r14d, %r14d js 0x2e55a movl %r14d, %edi callq 0x24690 xorl %ebx, %ebx movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x2e599 movq %rbx, %rax addq $0x228, %rsp # imm = 0x228 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq -0x248(%rbp), %rax movl %r14d, (%rax) leaq -0x240(%rbp), %rax subq %rax, %rsi addq %rsi, %rbx jmp 0x2e55c callq 0x24390 nop
my_open_parent_dir_nosymlinks: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 228h mov r14, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax lea r15, [rbp+var_240] mov edx, 201h mov rdi, r15 mov rsi, rbx call strnmov cmp byte ptr [rax], 0 jz short loc_2E483 call ___errno_location mov dword ptr [rax], 24h ; '$' jmp loc_2E55A loc_2E483: cmp [rbp+var_240], 2Fh ; '/' jnz loc_2E52F mov r12, rax mov [rbp+var_248], r14 mov al, [rbp+var_23F] mov r13d, 0FFFFFFFFh cmp al, 2Fh ; '/' jz loc_2E53F lea rcx, [rbp+var_23F] mov r14d, 0FFFFFFFFh loc_2E4BB: mov rsi, r15 inc rcx mov r15, rcx loc_2E4C4: test al, al jz short loc_2E4D8 movzx eax, al cmp eax, 2Fh ; '/' jz short loc_2E4D8 mov al, [r15] inc r15 jmp short loc_2E4C4 loc_2E4D8: mov byte ptr [r15-1], 0 cmp word ptr [rsi], 2Eh ; '.' jz short loc_2E53C movzx eax, word ptr [rsi] xor eax, 2E2Eh movzx ecx, byte ptr [rsi+2] or cx, ax jz short loc_2E53C cmp r15, r12 jnb loc_2E580 mov edi, r14d mov edx, offset unk_2A0000 xor eax, eax call _openat64 test eax, eax js short loc_2E54D mov r13d, eax test r14d, r14d js short loc_2E520 mov edi, r14d call _close loc_2E520: mov al, [r15] mov r14d, r13d mov rcx, r15 cmp al, 2Fh ; '/' jnz short loc_2E4BB jmp short loc_2E53F loc_2E52F: call ___errno_location mov dword ptr [rax], 2 jmp short loc_2E55A loc_2E53C: mov r13d, r14d loc_2E53F: call ___errno_location mov dword ptr [rax], 2 mov r14d, r13d loc_2E54D: test r14d, r14d js short loc_2E55A mov edi, r14d call _close loc_2E55A: xor ebx, ebx loc_2E55C: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_2E599 mov rax, rbx add rsp, 228h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2E580: mov rax, [rbp+var_248] mov [rax], r14d lea rax, [rbp+var_240] sub rsi, rax add rbx, rsi jmp short loc_2E55C loc_2E599: call ___stack_chk_fail
long long my_open_parent_dir_nosymlinks(long long a1, unsigned int *a2) { char *v3; // r15 char *v4; // rdi char *v5; // rax char *v6; // r12 char v7; // al int v8; // r13d char *v9; // rcx unsigned int v10; // r14d char *v11; // rsi long long v12; // rcx int v13; // eax unsigned int *v16; // [rsp+8h] [rbp-248h] char v17; // [rsp+10h] [rbp-240h] BYREF char v18; // [rsp+11h] [rbp-23Fh] BYREF unsigned long long v19; // [rsp+220h] [rbp-30h] v19 = __readfsqword(0x28u); v3 = &v17; v4 = &v17; v5 = (char *)strnmov(&v17, a1, 513LL); if ( *v5 ) { *(_DWORD *)__errno_location(&v17) = 36; return 0LL; } if ( v17 != 47 ) { *(_DWORD *)__errno_location(&v17) = 2; return 0LL; } v6 = v5; v16 = a2; v7 = v18; v8 = -1; if ( v18 == 47 ) { LABEL_20: *(_DWORD *)__errno_location(v4) = 2; v10 = v8; LABEL_21: if ( (v10 & 0x80000000) == 0 ) close(v10); return 0LL; } v9 = &v18; v10 = -1; while ( 1 ) { v11 = v3; v3 = v9 + 1; while ( v7 && v7 != 47 ) v7 = *v3++; *(v3 - 1) = 0; if ( *(_WORD *)v11 == 46 || (v12 = (unsigned __int8)v11[2], LOWORD(v12) = *(_WORD *)v11 ^ 0x2E2E | v12, !(_WORD)v12) ) { v8 = v10; goto LABEL_20; } if ( v3 >= v6 ) break; v4 = (char *)v10; v13 = openat64(v10, v11, &unk_2A0000, v12); if ( v13 < 0 ) goto LABEL_21; v8 = v13; if ( (v10 & 0x80000000) == 0 ) { v4 = (char *)v10; close(v10); } v7 = *v3; v10 = v8; v9 = v3; if ( *v3 == 47 ) goto LABEL_20; } *v16 = v10; return v11 - &v17 + a1; }
my_open_parent_dir_nosymlinks: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x228 MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA R15,[RBP + -0x240] MOV EDX,0x201 MOV RDI,R15 MOV RSI,RBX CALL 0x001610bc CMP byte ptr [RAX],0x0 JZ 0x0012e483 CALL 0x00124060 MOV dword ptr [RAX],0x24 JMP 0x0012e55a LAB_0012e483: CMP byte ptr [RBP + -0x240],0x2f JNZ 0x0012e52f MOV R12,RAX MOV qword ptr [RBP + -0x248],R14 MOV AL,byte ptr [RBP + -0x23f] MOV R13D,0xffffffff CMP AL,0x2f JZ 0x0012e53f LEA RCX,[RBP + -0x23f] MOV R14D,0xffffffff LAB_0012e4bb: MOV RSI,R15 INC RCX MOV R15,RCX LAB_0012e4c4: TEST AL,AL JZ 0x0012e4d8 MOVZX EAX,AL CMP EAX,0x2f JZ 0x0012e4d8 MOV AL,byte ptr [R15] INC R15 JMP 0x0012e4c4 LAB_0012e4d8: MOV byte ptr [R15 + -0x1],0x0 CMP word ptr [RSI],0x2e JZ 0x0012e53c MOVZX EAX,word ptr [RSI] XOR EAX,0x2e2e MOVZX ECX,byte ptr [RSI + 0x2] OR CX,AX JZ 0x0012e53c CMP R15,R12 JNC 0x0012e580 MOV EDI,R14D MOV EDX,0x2a0000 XOR EAX,EAX CALL 0x001242e0 TEST EAX,EAX JS 0x0012e54d MOV R13D,EAX TEST R14D,R14D JS 0x0012e520 MOV EDI,R14D CALL 0x00124690 LAB_0012e520: MOV AL,byte ptr [R15] MOV R14D,R13D MOV RCX,R15 CMP AL,0x2f JNZ 0x0012e4bb JMP 0x0012e53f LAB_0012e52f: CALL 0x00124060 MOV dword ptr [RAX],0x2 JMP 0x0012e55a LAB_0012e53c: MOV R13D,R14D LAB_0012e53f: CALL 0x00124060 MOV dword ptr [RAX],0x2 MOV R14D,R13D LAB_0012e54d: TEST R14D,R14D JS 0x0012e55a MOV EDI,R14D CALL 0x00124690 LAB_0012e55a: XOR EBX,EBX LAB_0012e55c: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0012e599 MOV RAX,RBX ADD RSP,0x228 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012e580: MOV RAX,qword ptr [RBP + -0x248] MOV dword ptr [RAX],R14D LEA RAX,[RBP + -0x240] SUB RSI,RAX ADD RBX,RSI JMP 0x0012e55c LAB_0012e599: CALL 0x00124390
long my_open_parent_dir_nosymlinks(long param_1,int *param_2) { short *psVar1; int iVar2; short *psVar3; int *piVar4; long lVar5; int __fd; short *psVar6; short *__file; long in_FS_OFFSET; int1 local_248 [2]; int1 local_246 [526]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); psVar3 = (short *)strnmov(local_248,param_1,0x201); if ((char)*psVar3 == '\0') { if (local_248[0] == '/') { __fd = -1; if (local_248[1] != '/') { psVar1 = (short *)(local_248 + 1); __file = (short *)local_248; __fd = -1; do { while ((psVar6 = (short *)((long)psVar1 + 1), local_248[1] != '\0' && (local_248[1] != '/'))) { psVar1 = psVar6; local_248[1] = *(char *)psVar6; } *(char *)psVar1 = '\0'; if ((*__file == 0x2e) || ((char)__file[1] == '\0' && *__file == 0x2e2e)) break; if (psVar3 <= psVar6) { *param_2 = __fd; lVar5 = (long)__file + (param_1 - (long)local_248); goto LAB_0012e55c; } iVar2 = openat64(__fd,(char *)__file,0x2a0000); if (iVar2 < 0) goto LAB_0012e54d; if (-1 < __fd) { close(__fd); } local_248[1] = *(char *)psVar6; __fd = iVar2; psVar1 = psVar6; __file = psVar6; } while (local_248[1] != '/'); } piVar4 = __errno_location(); *piVar4 = 2; LAB_0012e54d: if (-1 < __fd) { close(__fd); } } else { piVar4 = __errno_location(); *piVar4 = 2; } } else { piVar4 = __errno_location(); *piVar4 = 0x24; } lVar5 = 0; LAB_0012e55c: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return lVar5; }
35,040
ma_setup_live_state
eloqsql/storage/maria/ma_state.c
my_bool _ma_setup_live_state(MARIA_HA *info) { TRN *trn; MARIA_SHARE *share= info->s; MARIA_USED_TABLES *tables; MARIA_STATE_HISTORY *history; DBUG_ENTER("_ma_setup_live_state"); DBUG_PRINT("enter", ("info: %p", info)); DBUG_ASSERT(share->lock_key_trees); if (maria_create_trn_hook(info)) DBUG_RETURN(1); trn= info->trn; for (tables= (MARIA_USED_TABLES*) trn->used_tables; tables; tables= tables->next) { if (tables->share == share) { /* Table is already used by transaction */ goto end; } } /* Table was not used before, create new table state entry */ if (!(tables= (MARIA_USED_TABLES*) my_malloc(PSI_INSTRUMENT_ME, sizeof(*tables), MYF(MY_WME | MY_ZEROFILL)))) DBUG_RETURN(1); tables->next= trn->used_tables; trn->used_tables= tables; tables->share= share; mysql_mutex_lock(&share->intern_lock); share->in_trans++; DBUG_PRINT("info", ("share: %p in_trans: %d", share, share->in_trans)); history= share->state_history; /* We must keep share locked to ensure that we don't access a history link that is deleted by concurrently running checkpoint. It's enough to compare trids here (instead of calling tranman_can_read_from) as history->trid is a commit_trid */ while (trn->trid <= history->trid) history= history->next; mysql_mutex_unlock(&share->intern_lock); /* The current item can't be deleted as it's the first one visible for us */ tables->state_start= tables->state_current= history->state; tables->state_current.changed= tables->state_current.no_transid= 0; DBUG_PRINT("info", ("records: %ld", (ulong) tables->state_start.records)); end: info->state_start= &tables->state_start; info->state= &tables->state_current; info->used_tables= tables; tables->use_count++; /* Mark in transaction state if we are not using transid (versioning) on rows. If not, then we will in _ma_trnman_end_trans_hook() ensure that the state is visible for all at end of transaction */ tables->state_current.no_transid|= !(info->row_flag & ROW_FLAG_TRANSID); DBUG_PRINT("exit", ("tables: %p info->state: %p", tables, info->state)); DBUG_RETURN(0); }
O3
c
ma_setup_live_state: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq (%rdi), %r12 leaq 0x3b9ebd(%rip), %rax # 0x3fcaf8 callq *(%rax) movb $0x1, %r15b testl %eax, %eax jne 0x42d6e movq 0x8(%rbx), %rax leaq 0x58(%rax), %r13 movq %r13, %r14 movq (%r14), %r14 testq %r14, %r14 je 0x42c66 cmpq %r12, 0x8(%r14) jne 0x42c53 jmp 0x42d40 movq %rax, -0x30(%rbp) movl $0x88, %esi movl $0x30, %edx xorl %edi, %edi callq 0x9fd51 testq %rax, %rax je 0x42d6e movq %rax, %r14 movq (%r13), %rax movq %rax, (%r14) movq %r14, (%r13) movq %r12, 0x8(%r14) leaq 0x8f0(%r12), %r13 cmpq $0x0, 0x930(%r12) jne 0x42d80 movq %r13, %rdi callq 0x29200 incl 0x7ac(%r12) leaq 0x450(%r12), %r15 movq -0x30(%rbp), %rax movq 0x78(%rax), %rax movq (%r15), %r15 cmpq 0x8(%r15), %rax jbe 0x42ccd movq 0x930(%r12), %rdi testq %rdi, %rdi jne 0x42d99 movq %r13, %rdi callq 0x291c0 movups 0x10(%r15), %xmm0 movups 0x20(%r15), %xmm1 movups 0x30(%r15), %xmm2 movups %xmm0, 0x10(%r14) movups %xmm1, 0x20(%r14) movups %xmm2, 0x30(%r14) movq 0x40(%r15), %rax movq %rax, 0x40(%r14) movq 0x40(%r15), %rax movups 0x10(%r15), %xmm0 movups 0x20(%r15), %xmm1 movups 0x30(%r15), %xmm2 movups %xmm2, 0x68(%r14) movups %xmm0, 0x48(%r14) movq %rax, 0x78(%r14) movups %xmm1, 0x58(%r14) andb $-0x4, 0x44(%r14) leaq 0x48(%r14), %rax movq %rax, 0x60(%rbx) leaq 0x10(%r14), %rax movq %rax, 0x20(%rbx) movq %r14, 0x68(%rbx) incl 0x80(%r14) movb 0x618(%rbx), %al notb %al addb %al, %al andb $0x2, %al orb %al, 0x44(%r14) xorl %r15d, %r15d movl %r15d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x9776a(%rip), %rsi # 0xda4f1 movq %r13, %rdi movl $0x59, %edx callq 0x2eb6f jmp 0x42cb5 leaq 0x343270(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x42ce7
_ma_setup_live_state: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov r12, [rdi] lea rax, maria_create_trn_hook call qword ptr [rax] mov r15b, 1 test eax, eax jnz loc_42D6E mov rax, [rbx+8] lea r13, [rax+58h] mov r14, r13 loc_42C53: mov r14, [r14] test r14, r14 jz short loc_42C66 cmp [r14+8], r12 jnz short loc_42C53 jmp loc_42D40 loc_42C66: mov [rbp+var_30], rax mov esi, 88h mov edx, 30h ; '0' xor edi, edi call my_malloc test rax, rax jz loc_42D6E mov r14, rax mov rax, [r13+0] mov [r14], rax mov [r13+0], r14 mov [r14+8], r12 lea r13, [r12+8F0h] cmp qword ptr [r12+930h], 0 jnz loc_42D80 mov rdi, r13 call _pthread_mutex_lock loc_42CB5: inc dword ptr [r12+7ACh] lea r15, [r12+450h] mov rax, [rbp+var_30] mov rax, [rax+78h] loc_42CCD: mov r15, [r15] cmp rax, [r15+8] jbe short loc_42CCD mov rdi, [r12+930h] test rdi, rdi jnz loc_42D99 loc_42CE7: mov rdi, r13 call _pthread_mutex_unlock movups xmm0, xmmword ptr [r15+10h] movups xmm1, xmmword ptr [r15+20h] movups xmm2, xmmword ptr [r15+30h] movups xmmword ptr [r14+10h], xmm0 movups xmmword ptr [r14+20h], xmm1 movups xmmword ptr [r14+30h], xmm2 mov rax, [r15+40h] mov [r14+40h], rax mov rax, [r15+40h] movups xmm0, xmmword ptr [r15+10h] movups xmm1, xmmword ptr [r15+20h] movups xmm2, xmmword ptr [r15+30h] movups xmmword ptr [r14+68h], xmm2 movups xmmword ptr [r14+48h], xmm0 mov [r14+78h], rax movups xmmword ptr [r14+58h], xmm1 and byte ptr [r14+44h], 0FCh loc_42D40: lea rax, [r14+48h] mov [rbx+60h], rax lea rax, [r14+10h] mov [rbx+20h], rax mov [rbx+68h], r14 inc dword ptr [r14+80h] mov al, [rbx+618h] not al add al, al and al, 2 or [r14+44h], al xor r15d, r15d loc_42D6E: mov eax, r15d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_42D80: lea rsi, aWorkspaceLlm4b_30; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r13 mov edx, 59h ; 'Y' call psi_mutex_lock jmp loc_42CB5 loc_42D99: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_42CE7
long long ma_setup_live_state(long long *a1) { unsigned int v1; // r15d long long v2; // r12 _QWORD *v3; // r13 _QWORD *v4; // r14 _QWORD *v5; // rax long long *v6; // r15 __int128 v7; // xmm1 __int128 v8; // xmm2 long long v9; // rax __int128 v10; // xmm0 __int128 v11; // xmm1 long long v13; // [rsp+0h] [rbp-30h] v2 = *a1; LOBYTE(v1) = 1; if ( !(unsigned int)maria_create_trn_hook(a1) ) { v3 = (_QWORD *)(a1[1] + 88); v4 = v3; while ( 1 ) { v4 = (_QWORD *)*v4; if ( !v4 ) break; if ( v4[1] == v2 ) goto LABEL_14; } v13 = a1[1]; v5 = (_QWORD *)my_malloc(0LL, 136LL, 48LL); if ( !v5 ) return v1; v4 = v5; *v5 = *v3; *v3 = v5; v5[1] = v2; if ( *(_QWORD *)(v2 + 2352) ) psi_mutex_lock(v2 + 2288, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c", 0x59u); else pthread_mutex_lock(v2 + 2288); ++*(_DWORD *)(v2 + 1964); v6 = (long long *)(v2 + 1104); do v6 = (long long *)*v6; while ( *(_QWORD *)(v13 + 120) <= (unsigned long long)v6[1] ); if ( *(_QWORD *)(v2 + 2352) ) PSI_server[44](); pthread_mutex_unlock(v2 + 2288); v7 = *((_OWORD *)v6 + 2); v8 = *((_OWORD *)v6 + 3); *((_OWORD *)v4 + 1) = *((_OWORD *)v6 + 1); *((_OWORD *)v4 + 2) = v7; *((_OWORD *)v4 + 3) = v8; v4[8] = v6[8]; v9 = v6[8]; v10 = *((_OWORD *)v6 + 1); v11 = *((_OWORD *)v6 + 2); *(_OWORD *)(v4 + 13) = *((_OWORD *)v6 + 3); *(_OWORD *)(v4 + 9) = v10; v4[15] = v9; *(_OWORD *)(v4 + 11) = v11; *((_BYTE *)v4 + 68) &= 0xFCu; LABEL_14: a1[12] = (long long)(v4 + 9); a1[4] = (long long)(v4 + 2); a1[13] = (long long)v4; ++*((_DWORD *)v4 + 32); *((_BYTE *)v4 + 68) |= (2 * ~*((_BYTE *)a1 + 1560)) & 2; return 0; } return v1; }
_ma_setup_live_state: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV R12,qword ptr [RDI] LEA RAX,[0x4fcaf8] CALL qword ptr [RAX] MOV R15B,0x1 TEST EAX,EAX JNZ 0x00142d6e MOV RAX,qword ptr [RBX + 0x8] LEA R13,[RAX + 0x58] MOV R14,R13 LAB_00142c53: MOV R14,qword ptr [R14] TEST R14,R14 JZ 0x00142c66 CMP qword ptr [R14 + 0x8],R12 JNZ 0x00142c53 JMP 0x00142d40 LAB_00142c66: MOV qword ptr [RBP + -0x30],RAX MOV ESI,0x88 MOV EDX,0x30 XOR EDI,EDI CALL 0x0019fd51 TEST RAX,RAX JZ 0x00142d6e MOV R14,RAX MOV RAX,qword ptr [R13] MOV qword ptr [R14],RAX MOV qword ptr [R13],R14 MOV qword ptr [R14 + 0x8],R12 LEA R13,[R12 + 0x8f0] CMP qword ptr [R12 + 0x930],0x0 JNZ 0x00142d80 MOV RDI,R13 CALL 0x00129200 LAB_00142cb5: INC dword ptr [R12 + 0x7ac] LEA R15,[R12 + 0x450] MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x78] LAB_00142ccd: MOV R15,qword ptr [R15] CMP RAX,qword ptr [R15 + 0x8] JBE 0x00142ccd MOV RDI,qword ptr [R12 + 0x930] TEST RDI,RDI JNZ 0x00142d99 LAB_00142ce7: MOV RDI,R13 CALL 0x001291c0 MOVUPS XMM0,xmmword ptr [R15 + 0x10] MOVUPS XMM1,xmmword ptr [R15 + 0x20] MOVUPS XMM2,xmmword ptr [R15 + 0x30] MOVUPS xmmword ptr [R14 + 0x10],XMM0 MOVUPS xmmword ptr [R14 + 0x20],XMM1 MOVUPS xmmword ptr [R14 + 0x30],XMM2 MOV RAX,qword ptr [R15 + 0x40] MOV qword ptr [R14 + 0x40],RAX MOV RAX,qword ptr [R15 + 0x40] MOVUPS XMM0,xmmword ptr [R15 + 0x10] MOVUPS XMM1,xmmword ptr [R15 + 0x20] MOVUPS XMM2,xmmword ptr [R15 + 0x30] MOVUPS xmmword ptr [R14 + 0x68],XMM2 MOVUPS xmmword ptr [R14 + 0x48],XMM0 MOV qword ptr [R14 + 0x78],RAX MOVUPS xmmword ptr [R14 + 0x58],XMM1 AND byte ptr [R14 + 0x44],0xfc LAB_00142d40: LEA RAX,[R14 + 0x48] MOV qword ptr [RBX + 0x60],RAX LEA RAX,[R14 + 0x10] MOV qword ptr [RBX + 0x20],RAX MOV qword ptr [RBX + 0x68],R14 INC dword ptr [R14 + 0x80] MOV AL,byte ptr [RBX + 0x618] NOT AL ADD AL,AL AND AL,0x2 OR byte ptr [R14 + 0x44],AL XOR R15D,R15D LAB_00142d6e: MOV EAX,R15D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00142d80: LEA RSI,[0x1da4f1] MOV RDI,R13 MOV EDX,0x59 CALL 0x0012eb6f JMP 0x00142cb5 LAB_00142d99: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00142ce7
ulong _ma_setup_live_state(long *param_1) { pthread_mutex_t *__mutex; long lVar1; long lVar2; long lVar3; long lVar4; long lVar5; long lVar6; int iVar7; long *plVar8; int8 unaff_R15; ulong uVar9; long *plVar10; lVar1 = *param_1; iVar7 = (*maria_create_trn_hook)(); uVar9 = CONCAT71((int7)((ulong)unaff_R15 >> 8),1); if (iVar7 != 0) { LAB_00142d6e: return uVar9 & 0xffffffff; } lVar2 = param_1[1]; plVar10 = (long *)(lVar2 + 0x58); plVar8 = plVar10; while (plVar8 = (long *)*plVar8, plVar8 != (long *)0x0) { if (plVar8[1] == lVar1) goto LAB_00142d40; } plVar8 = (long *)my_malloc(0,0x88,0x30); if (plVar8 == (long *)0x0) goto LAB_00142d6e; *plVar8 = *plVar10; *plVar10 = (long)plVar8; plVar8[1] = lVar1; __mutex = (pthread_mutex_t *)(lVar1 + 0x8f0); if (*(long *)(lVar1 + 0x930) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c",0x59) ; } *(int *)(lVar1 + 0x7ac) = *(int *)(lVar1 + 0x7ac) + 1; plVar10 = (long *)(lVar1 + 0x450); do { plVar10 = (long *)*plVar10; } while (*(ulong *)(lVar2 + 0x78) <= (ulong)plVar10[1]); if (*(long *)(lVar1 + 0x930) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); lVar1 = plVar10[3]; lVar2 = plVar10[4]; lVar3 = plVar10[5]; lVar4 = plVar10[6]; lVar5 = plVar10[7]; plVar8[2] = plVar10[2]; plVar8[3] = lVar1; plVar8[4] = lVar2; plVar8[5] = lVar3; plVar8[6] = lVar4; plVar8[7] = lVar5; plVar8[8] = plVar10[8]; lVar1 = plVar10[8]; lVar2 = plVar10[2]; lVar3 = plVar10[3]; lVar4 = plVar10[4]; lVar5 = plVar10[5]; lVar6 = plVar10[7]; plVar8[0xd] = plVar10[6]; plVar8[0xe] = lVar6; plVar8[9] = lVar2; plVar8[10] = lVar3; plVar8[0xf] = lVar1; plVar8[0xb] = lVar4; plVar8[0xc] = lVar5; *(byte *)((long)plVar8 + 0x44) = *(byte *)((long)plVar8 + 0x44) & 0xfc; LAB_00142d40: param_1[0xc] = (long)(plVar8 + 9); param_1[4] = (long)(plVar8 + 2); param_1[0xd] = (long)plVar8; *(int *)(plVar8 + 0x10) = (int)plVar8[0x10] + 1; *(byte *)((long)plVar8 + 0x44) = *(byte *)((long)plVar8 + 0x44) | ~*(byte *)(param_1 + 0xc3) * '\x02' & 2; uVar9 = 0; goto LAB_00142d6e; }
35,041
minja::Parser::parseVarNames[abi:cxx11]()
monkey531[P]llama/common/minja.hpp
std::vector<std::string> parseVarNames() { static std::regex varnames_regex(R"(((?:\w+)(?:[\r\n\s]*,[\r\n\s]*(?:\w+))*)[\r\n\s]*)"); std::vector<std::string> group; if ((group = consumeTokenGroups(varnames_regex)).empty()) throw std::runtime_error("Expected variable names"); std::vector<std::string> varnames; std::istringstream iss(group[1]); std::string varname; while (std::getline(iss, varname, ',')) { varnames.push_back(strip(varname)); } return varnames; }
O3
cpp
minja::Parser::parseVarNames[abi:cxx11](): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1e8, %rsp # imm = 0x1E8 movq %rsi, %r14 movq %rdi, %rbx leaq 0xa9bc0(%rip), %rax # 0x131378 movb (%rax), %al testb %al, %al je 0x87927 xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movq $0x0, 0x10(%rsp) leaq 0xa9b7f(%rip), %rdx # 0x131358 leaq 0x20(%rsp), %rdi movq %r14, %rsi movl $0x1, %ecx callq 0x87158 leaq 0x20(%rsp), %r14 movaps (%r14), %xmm0 movaps %xmm0, (%rsp) movq 0x10(%r14), %rax movq %rax, 0x10(%rsp) leaq 0x60(%rsp), %rdi xorps %xmm0, %xmm0 movaps %xmm0, (%rdi) xorl %eax, %eax movq %rax, 0x10(%rdi) movaps %xmm0, (%r14) movq %rax, 0x10(%r14) callq 0x24094 movq (%rsp), %r15 movq 0x8(%rsp), %r12 movq %r14, %rdi callq 0x24094 cmpq %r12, %r15 je 0x8797e xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq $0x0, 0x10(%rbx) movq (%rsp), %rsi addq $0x20, %rsi leaq 0x60(%rsp), %rdi movl $0x8, %edx callq 0x1c140 leaq 0x30(%rsp), %r13 movq %r13, -0x10(%r13) movq $0x0, -0x8(%r13) movb $0x0, (%r13) leaq 0x50(%rsp), %rbp leaq 0x60(%rsp), %r14 leaq 0x20(%rsp), %r15 leaq 0x40(%rsp), %r12 movq %r14, %rdi movq %r15, %rsi movl $0x2c, %edx callq 0x1c350 movq (%rax), %rcx movq -0x18(%rcx), %rcx testb $0x5, 0x20(%rax,%rcx) jne 0x878d5 movq %r12, %rdi movq %r15, %rsi callq 0x7ba63 movq %rbx, %rdi movq %r12, %rsi callq 0x59a1a movq 0x40(%rsp), %rdi cmpq %rbp, %rdi je 0x87888 movq 0x50(%rsp), %rsi incq %rsi callq 0x1ba60 jmp 0x87888 movq 0x20(%rsp), %rdi cmpq %r13, %rdi je 0x878ec movq 0x30(%rsp), %rsi incq %rsi callq 0x1ba60 movq 0xa8655(%rip), %rsi # 0x12ff48 leaq 0x60(%rsp), %rdi callq 0x1bec0 leaq 0xd8(%rsp), %rdi callq 0x1b300 movq %rsp, %rdi callq 0x24094 movq %rbx, %rax addq $0x1e8, %rsp # imm = 0x1E8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0xa9a4a(%rip), %rdi # 0x131378 callq 0x1c2d0 testl %eax, %eax je 0x877c2 leaq 0xa9a16(%rip), %rdi # 0x131358 leaq 0x6c43a(%rip), %rsi # 0xf3d83 movl $0x10, %edx callq 0x66398 leaq -0x212be(%rip), %rdi # 0x6669c leaq 0xa99f7(%rip), %rsi # 0x131358 leaq 0xa90e0(%rip), %rdx # 0x130a48 callq 0x1b8d0 leaq 0xa9a04(%rip), %rdi # 0x131378 callq 0x1b6a0 jmp 0x877c2 movl $0x10, %edi callq 0x1b4d0 movq %rax, %rbx leaq 0x6c423(%rip), %rsi # 0xf3db5 movq %rax, %rdi callq 0x1b370 movq 0xa8647(%rip), %rsi # 0x12ffe8 movq 0xa85a8(%rip), %rdx # 0x12ff50 movq %rbx, %rdi callq 0x1c1c0 movq %rax, %r14 leaq 0xa99be(%rip), %rdi # 0x131378 callq 0x1b690 jmp 0x87a40 jmp 0x879d5 movq %rax, %r14 movq %rbx, %rdi callq 0x1b760 jmp 0x87a38 movq %rax, %r14 jmp 0x87a30 movq %rax, %r14 jmp 0x87a38 movq %rax, %r14 movq 0x40(%rsp), %rdi cmpq %rbp, %rdi je 0x879fb movq 0x50(%rsp), %rsi incq %rsi callq 0x1ba60 jmp 0x879fb jmp 0x879f8 movq %rax, %r14 movq 0x20(%rsp), %rdi cmpq %r13, %rdi je 0x87a12 movq 0x30(%rsp), %rsi incq %rsi callq 0x1ba60 movq 0xa852f(%rip), %rsi # 0x12ff48 leaq 0x60(%rsp), %rdi callq 0x1bec0 leaq 0xd8(%rsp), %rdi callq 0x1b300 movq %rbx, %rdi callq 0x24094 movq %rsp, %rdi callq 0x24094 movq %r14, %rdi callq 0x1c250
_ZN5minja6Parser13parseVarNamesB5cxx11Ev: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1E8h mov r14, rsi mov rbx, rdi lea rax, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; `guard variable for'minja::Parser::parseVarNames(void)::varnames_regex mov al, [rax] test al, al jz loc_87927 loc_877C2: xorps xmm0, xmm0 movaps xmmword ptr [rsp+218h+var_218], xmm0; int mov qword ptr [rsp+218h+var_208], 0; int lea rdx, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; int lea rdi, [rsp+218h+var_1F8]; int mov rsi, r14; int mov ecx, 1; int call _ZN5minja6Parser18consumeTokenGroupsERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeTokenGroups(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) lea r14, [rsp+218h+var_1F8] movaps xmm0, xmmword ptr [r14] movaps xmmword ptr [rsp+218h+var_218], xmm0 mov rax, [r14+10h] mov qword ptr [rsp+218h+var_208], rax lea rdi, [rsp+218h+var_1B8] xorps xmm0, xmm0 movaps xmmword ptr [rdi], xmm0 xor eax, eax mov [rdi+10h], rax movaps xmmword ptr [r14], xmm0 mov [r14+10h], rax call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov r15, qword ptr [rsp+218h+var_218] mov r12, qword ptr [rsp+218h+var_218+8] mov rdi, r14 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() cmp r15, r12 jz loc_8797E xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov qword ptr [rbx+10h], 0 mov rsi, qword ptr [rsp+218h+var_218] add rsi, 20h ; ' ' lea rdi, [rsp+218h+var_1B8] mov edx, 8 call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode) lea r13, [rsp+218h+var_1E8] mov [r13-10h], r13 mov qword ptr [r13-8], 0 mov byte ptr [r13+0], 0 lea rbp, [rsp+218h+var_1C8] lea r14, [rsp+218h+var_1B8] lea r15, [rsp+218h+var_1F8] lea r12, [rsp+218h+var_1D8] loc_87888: mov rdi, r14 mov rsi, r15 mov edx, 2Ch ; ',' call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char) mov rcx, [rax] mov rcx, [rcx-18h] test byte ptr [rax+rcx+20h], 5 jnz short loc_878D5 mov rdi, r12 mov rsi, r15 call _ZN5minjaL5stripERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::strip(std::string const&) mov rdi, rbx mov rsi, r12 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, [rsp+218h+var_1D8]; void * cmp rdi, rbp jz short loc_87888 mov rsi, [rsp+218h+var_1C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_87888 loc_878D5: mov rdi, [rsp+218h+var_1F8]; void * cmp rdi, r13 jz short loc_878EC mov rsi, [rsp+218h+var_1E8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_878EC: mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+218h+var_1B8] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream() lea rdi, [rsp+218h+var_140]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rsp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rax, rbx add rsp, 1E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_87927: lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_877C2 lea rdi, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; minja::Parser::parseVarNames(void)::varnames_regex lea rsi, aWRNSRNSWRNS; "((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?"... mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard * call ___cxa_guard_release jmp loc_877C2 loc_8797E: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aExpectedVariab; "Expected variable names" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_87A40 jmp short loc_879D5 mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_87A38 mov r14, rax jmp short loc_87A30 loc_879D5: mov r14, rax jmp short loc_87A38 mov r14, rax mov rdi, [rsp+218h+var_1D8]; void * cmp rdi, rbp jz short loc_879FB mov rsi, [rsp+218h+var_1C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_879FB jmp short $+2 loc_879F8: mov r14, rax loc_879FB: mov rdi, [rsp+218h+var_1F8]; void * cmp rdi, r13 jz short loc_87A12 mov rsi, [rsp+218h+var_1E8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_87A12: mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+218h+var_1B8] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream() lea rdi, [rsp+218h+var_140]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_87A30: mov rdi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_87A38: mov rdi, rsp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_87A40: mov rdi, r14 call __Unwind_Resume
long long minja::Parser::parseVarNames[abi:cxx11](long long a1, long long a2) { _QWORD *v2; // rax std::runtime_error *exception; // rbx int v5[4]; // [rsp+0h] [rbp-218h] BYREF int v6[2]; // [rsp+10h] [rbp-208h] __int128 v7; // [rsp+20h] [rbp-1F8h] BYREF _QWORD v8[2]; // [rsp+30h] [rbp-1E8h] BYREF void *v9[2]; // [rsp+40h] [rbp-1D8h] BYREF long long v10; // [rsp+50h] [rbp-1C8h] BYREF __int128 v11; // [rsp+60h] [rbp-1B8h] BYREF long long v12; // [rsp+70h] [rbp-1A8h] _BYTE v13[320]; // [rsp+D8h] [rbp-140h] BYREF if ( !(_BYTE)`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11], (long long)"((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?:\\w+))*)[\\r\\n\\s]*", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11]); } minja::Parser::consumeTokenGroups( (long long)&v7, a2, (long long)&minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11], 1u); *(_OWORD *)v5 = v7; *(_QWORD *)v6 = v8[0]; v11 = 0LL; v12 = 0LL; v7 = 0LL; v8[0] = 0LL; std::vector<std::string>::~vector((long long)&v11); std::vector<std::string>::~vector((long long)&v7); if ( *(_QWORD *)v5 == *(_QWORD *)&v5[2] ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected variable names"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; std::istringstream::basic_istringstream(&v11, *(_QWORD *)v5 + 32LL, 8LL); *(_QWORD *)&v7 = v8; *((_QWORD *)&v7 + 1) = 0LL; LOBYTE(v8[0]) = 0; while ( 1 ) { v2 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(&v11, &v7, 44LL); if ( (*((_BYTE *)v2 + *(_QWORD *)(*v2 - 24LL) + 32) & 5) != 0 ) break; minja::strip(v9, (long long)&v7); std::vector<std::string>::emplace_back<std::string>(a1, (long long)v9); if ( v9[0] != &v10 ) operator delete(v9[0], v10 + 1); } if ( (_QWORD *)v7 != v8 ) operator delete((void *)v7, v8[0] + 1LL); std::istringstream::~istringstream(&v11, &`VTT for'std::istringstream); std::ios_base::~ios_base((std::ios_base *)v13); std::vector<std::string>::~vector((long long)v5); return a1; }
parseVarNames[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1e8 MOV R14,RSI MOV RBX,RDI LEA RAX,[0x231378] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x00187927 LAB_001877c2: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],0x0 LAB_001877d2: LEA RDX,[0x231358] LEA RDI,[RSP + 0x20] MOV RSI,R14 MOV ECX,0x1 CALL 0x00187158 LEA R14,[RSP + 0x20] MOVAPS XMM0,xmmword ptr [R14] MOVAPS xmmword ptr [RSP],XMM0 MOV RAX,qword ptr [R14 + 0x10] MOV qword ptr [RSP + 0x10],RAX LEA RDI,[RSP + 0x60] XORPS XMM0,XMM0 MOVAPS xmmword ptr [RDI],XMM0 XOR EAX,EAX MOV qword ptr [RDI + 0x10],RAX MOVAPS xmmword ptr [R14],XMM0 MOV qword ptr [R14 + 0x10],RAX CALL 0x00124094 MOV R15,qword ptr [RSP] MOV R12,qword ptr [RSP + 0x8] MOV RDI,R14 CALL 0x00124094 CMP R15,R12 JZ 0x0018797e XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBX + 0x10],0x0 MOV RSI,qword ptr [RSP] ADD RSI,0x20 LAB_0018784f: LEA RDI,[RSP + 0x60] MOV EDX,0x8 CALL 0x0011c140 LEA R13,[RSP + 0x30] MOV qword ptr [R13 + -0x10],R13 MOV qword ptr [R13 + -0x8],0x0 MOV byte ptr [R13],0x0 LEA RBP,[RSP + 0x50] LEA R14,[RSP + 0x60] LEA R15,[RSP + 0x20] LEA R12,[RSP + 0x40] LAB_00187888: MOV RDI,R14 MOV RSI,R15 MOV EDX,0x2c CALL 0x0011c350 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5 JNZ 0x001878d5 LAB_001878a6: MOV RDI,R12 MOV RSI,R15 CALL 0x0017ba63 LAB_001878b1: MOV RDI,RBX MOV RSI,R12 CALL 0x00159a1a MOV RDI,qword ptr [RSP + 0x40] CMP RDI,RBP JZ 0x00187888 MOV RSI,qword ptr [RSP + 0x50] INC RSI CALL 0x0011ba60 JMP 0x00187888 LAB_001878d5: MOV RDI,qword ptr [RSP + 0x20] CMP RDI,R13 JZ 0x001878ec MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x0011ba60 LAB_001878ec: MOV RSI,qword ptr [0x0022ff48] LEA RDI,[RSP + 0x60] CALL 0x0011bec0 LEA RDI,[RSP + 0xd8] CALL 0x0011b300 MOV RDI,RSP CALL 0x00124094 MOV RAX,RBX ADD RSP,0x1e8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00187927: LEA RDI,[0x231378] CALL 0x0011c2d0 TEST EAX,EAX JZ 0x001877c2 LAB_0018793b: LEA RDI,[0x231358] LEA RSI,[0x1f3d83] MOV EDX,0x10 CALL 0x00166398 LAB_00187953: LEA RDI,[0x16669c] LEA RSI,[0x231358] LEA RDX,[0x230a48] CALL 0x0011b8d0 LEA RDI,[0x231378] CALL 0x0011b6a0 JMP 0x001877c2 LAB_0018797e: MOV EDI,0x10 CALL 0x0011b4d0 MOV RBX,RAX LAB_0018798b: LEA RSI,[0x1f3db5] MOV RDI,RAX CALL 0x0011b370 LAB_0018799a: MOV RSI,qword ptr [0x0022ffe8] MOV RDX,qword ptr [0x0022ff50] MOV RDI,RBX CALL 0x0011c1c0
/* minja::Parser::parseVarNames[abi:cxx11]() */ void minja::Parser::parseVarNames_abi_cxx11_(void) { ulong *puVar1; ulong *puVar2; int iVar3; istream *piVar4; runtime_error *this; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *in_RDI; ulong *local_218; ulong *puStack_210; ulong local_208; ulong *local_1f8; ulong *puStack_1f0; ulong local_1e8 [2]; long *local_1d8 [2]; long local_1c8 [2]; int8 local_1b8; int8 uStack_1b0; int8 local_1a8; ios_base local_140 [272]; if (parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_ == '\0') { iVar3 = __cxa_guard_acquire(&parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_); if (iVar3 != 0) { /* try { // try from 0018793b to 00187952 has its CatchHandler @ 001879b0 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_, "((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?:\\w+))*)[\\r\\n\\s]*",0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_); } } local_218 = (ulong *)0x0; puStack_210 = (ulong *)0x0; local_208 = 0; /* try { // try from 001877d2 to 001877ea has its CatchHandler @ 001879d5 */ consumeTokenGroups(&local_1f8); local_218 = local_1f8; puStack_210 = puStack_1f0; local_208 = local_1e8[0]; local_1b8 = 0; uStack_1b0 = 0; local_1a8 = 0; local_1f8 = (ulong *)0x0; puStack_1f0 = (ulong *)0x0; local_1e8[0] = 0; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_1b8); puVar2 = puStack_210; puVar1 = local_218; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_1f8); if (puVar1 != puVar2) { *(int8 *)in_RDI = 0; *(int8 *)(in_RDI + 8) = 0; *(int8 *)(in_RDI + 0x10) = 0; /* try { // try from 0018784f to 0018785d has its CatchHandler @ 001879d0 */ std::__cxx11::istringstream::istringstream((istringstream *)&local_1b8,local_218 + 4,8); puStack_1f0 = (ulong *)0x0; local_1e8[0] = local_1e8[0] & 0xffffffffffffff00; local_1f8 = local_1e8; while( true ) { /* try { // try from 00187888 to 00187897 has its CatchHandler @ 001879f8 */ piVar4 = std::getline<char,std::char_traits<char>,std::allocator<char>> ((istream *)&local_1b8,(string *)&local_1f8,','); if (((byte)piVar4[*(long *)(*(long *)piVar4 + -0x18) + 0x20] & 5) != 0) break; /* try { // try from 001878a6 to 001878b0 has its CatchHandler @ 001879f6 */ strip((minja *)local_1d8,(string *)&local_1f8); /* try { // try from 001878b1 to 001878bb has its CatchHandler @ 001879da */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string>(in_RDI,(string *)local_1d8); if (local_1d8[0] != local_1c8) { operator_delete(local_1d8[0],local_1c8[0] + 1); } } if (local_1f8 != local_1e8) { operator_delete(local_1f8,local_1e8[0] + 1); } std::__cxx11::istringstream::~istringstream((istringstream *)&local_1b8); std::ios_base::~ios_base(local_140); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_218); return; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0018798b to 00187999 has its CatchHandler @ 001879c3 */ std::runtime_error::runtime_error(this,"Expected variable names"); /* try { // try from 0018799a to 001879af has its CatchHandler @ 001879c1 */ /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_0022ffe8,PTR__runtime_error_0022ff50); }
35,042
uf_varchar1
eloqsql/storage/maria/ma_packrec.c
static void uf_varchar1(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff, uchar *to, uchar *end __attribute__((unused))) { if (get_bit(bit_buff)) to[0]= 0; /* Zero lengths */ else { ulong length=get_bits(bit_buff,rec->space_length_bits); *to= (char) length; decode_bytes(rec,bit_buff,to+1,to+1+length); } }
O3
c
uf_varchar1: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movl 0x4(%rsi), %eax testl %eax, %eax je 0x3b2c1 movl (%r14), %r13d decl %eax movl %eax, 0x4(%r14) btl %eax, %r13d jae 0x3b2de movb $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r14, %rdi callq 0x3a37c movl $0x1f, 0x4(%r14) movl (%r14), %r13d movl $0x1f, %eax testl %r13d, %r13d js 0x3b2af movl 0x24(%r15), %r12d movl %eax, %ecx subl %r12d, %ecx jae 0x3b323 subl %eax, %r12d movl %eax, %eax leaq 0xa5cbb(%rip), %rcx # 0xe0fb0 andl (%rcx,%rax,4), %r13d movl %r12d, %ecx shll %cl, %r13d movq %r14, %rdi callq 0x3a37c movl $0x20, %eax subl %r12d, %eax movl %eax, 0x4(%r14) movl (%r14), %eax negl %r12d movl %r12d, %ecx shrl %cl, %eax addl %eax, %r13d jmp 0x3b339 movl %ecx, 0x4(%r14) shrl %cl, %r13d movl 0x24(%r15), %eax leaq 0xa5c7b(%rip), %rcx # 0xe0fb0 andl (%rcx,%rax,4), %r13d movl %r13d, %eax movb %r13b, (%rbx) leaq (%rbx,%rax), %rcx incq %rcx incq %rbx movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x3a539
uf_varchar1: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r14, rsi mov r15, rdi mov eax, [rsi+4] test eax, eax jz short loc_3B2C1 mov r13d, [r14] dec eax mov [r14+4], eax bt r13d, eax jnb short loc_3B2DE loc_3B2AF: mov byte ptr [rbx], 0 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3B2C1: mov rdi, r14 call fill_buffer mov dword ptr [r14+4], 1Fh mov r13d, [r14] mov eax, 1Fh test r13d, r13d js short loc_3B2AF loc_3B2DE: mov r12d, [r15+24h] mov ecx, eax sub ecx, r12d jnb short loc_3B323 sub r12d, eax mov eax, eax lea rcx, mask and r13d, [rcx+rax*4] mov ecx, r12d shl r13d, cl mov rdi, r14 call fill_buffer mov eax, 20h ; ' ' sub eax, r12d mov [r14+4], eax mov eax, [r14] neg r12d mov ecx, r12d shr eax, cl add r13d, eax jmp short loc_3B339 loc_3B323: mov [r14+4], ecx shr r13d, cl mov eax, [r15+24h] lea rcx, mask and r13d, [rcx+rax*4] loc_3B339: mov eax, r13d mov [rbx], r13b lea rcx, [rbx+rax] inc rcx inc rbx mov rdi, r15 mov rsi, r14 mov rdx, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp decode_bytes
long long uf_varchar1(long long a1, unsigned int *a2, _BYTE *a3) { unsigned int v4; // eax unsigned int v5; // r13d long long result; // rax unsigned int v7; // r12d unsigned int v8; // ecx int v9; // r12d int v10; // r13d unsigned int v11; // r13d v4 = a2[1]; if ( v4 ) { v5 = *a2; result = v4 - 1; a2[1] = result; if ( _bittest((const int *)&v5, result) ) { LABEL_3: *a3 = 0; return result; } } else { fill_buffer((long long)a2); a2[1] = 31; v5 = *a2; result = 31LL; if ( (*a2 & 0x80000000) != 0 ) goto LABEL_3; } v7 = *(_DWORD *)(a1 + 36); v8 = result - v7; if ( (unsigned int)result >= v7 ) { a2[1] = v8; v11 = mask[*(unsigned int *)(a1 + 36)] & (v5 >> v8); } else { v9 = v7 - result; v10 = (mask[(unsigned int)result] & v5) << v9; fill_buffer((long long)a2); a2[1] = 32 - v9; v11 = (*a2 >> -(char)v9) + v10; } *a3 = v11; return (long long)decode_bytes(a1, (long long)a2, a3 + 1, &a3[v11 + 1]); }
uf_varchar1: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV EAX,dword ptr [RSI + 0x4] TEST EAX,EAX JZ 0x0013b2c1 MOV R13D,dword ptr [R14] DEC EAX MOV dword ptr [R14 + 0x4],EAX BT R13D,EAX JNC 0x0013b2de LAB_0013b2af: MOV byte ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013b2c1: MOV RDI,R14 CALL 0x0013a37c MOV dword ptr [R14 + 0x4],0x1f MOV R13D,dword ptr [R14] MOV EAX,0x1f TEST R13D,R13D JS 0x0013b2af LAB_0013b2de: MOV R12D,dword ptr [R15 + 0x24] MOV ECX,EAX SUB ECX,R12D JNC 0x0013b323 SUB R12D,EAX MOV EAX,EAX LEA RCX,[0x1e0fb0] AND R13D,dword ptr [RCX + RAX*0x4] MOV ECX,R12D SHL R13D,CL MOV RDI,R14 CALL 0x0013a37c MOV EAX,0x20 SUB EAX,R12D MOV dword ptr [R14 + 0x4],EAX MOV EAX,dword ptr [R14] NEG R12D MOV ECX,R12D SHR EAX,CL ADD R13D,EAX JMP 0x0013b339 LAB_0013b323: MOV dword ptr [R14 + 0x4],ECX SHR R13D,CL MOV EAX,dword ptr [R15 + 0x24] LEA RCX,[0x1e0fb0] AND R13D,dword ptr [RCX + RAX*0x4] LAB_0013b339: MOV EAX,R13D MOV byte ptr [RBX],R13B LEA RCX,[RBX + RAX*0x1] INC RCX INC RBX MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0013a539
void uf_varchar1(long param_1,uint *param_2,int1 *param_3) { uint uVar1; uint uVar2; uint uVar3; byte bVar4; uint uVar5; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar5 = *param_2; uVar3 = 0x1f; if (-1 < (int)uVar5) goto LAB_0013b2de; } else { uVar5 = *param_2; uVar3 = param_2[1] - 1; param_2[1] = uVar3; if ((uVar5 >> (uVar3 & 0x1f) & 1) == 0) { LAB_0013b2de: uVar1 = *(uint *)(param_1 + 0x24); if (uVar3 < uVar1) { uVar2 = (&mask)[uVar3]; bVar4 = (byte)(uVar1 - uVar3); fill_buffer(param_2); param_2[1] = 0x20 - (uVar1 - uVar3); uVar5 = ((uVar5 & uVar2) << (bVar4 & 0x1f)) + (*param_2 >> (-bVar4 & 0x1f)); } else { param_2[1] = uVar3 - uVar1; uVar5 = uVar5 >> ((byte)(uVar3 - uVar1) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x24)]; } *param_3 = (char)uVar5; decode_bytes(param_1,param_2,param_3 + 1,param_3 + (ulong)uVar5 + 1); return; } } *param_3 = 0; return; }
35,043
adler32_z
3fs/build_O3/src/apache-arrow-cpp/cpp/zlib_ep-prefix/src/zlib_ep/adler32.c
uLong ZEXPORT adler32_z(adler, buf, len) uLong adler; const Bytef *buf; z_size_t len; { unsigned long sum2; unsigned n; /* split Adler-32 into component sums */ sum2 = (adler >> 16) & 0xffff; adler &= 0xffff; /* in case user likes doing a byte at a time, keep it fast */ if (len == 1) { adler += buf[0]; if (adler >= BASE) adler -= BASE; sum2 += adler; if (sum2 >= BASE) sum2 -= BASE; return adler | (sum2 << 16); } /* initial Adler-32 value (deferred check for len == 1 speed) */ if (buf == Z_NULL) return 1L; /* in case short lengths are provided, keep it somewhat fast */ if (len < 16) { while (len--) { adler += *buf++; sum2 += adler; } if (adler >= BASE) adler -= BASE; MOD28(sum2); /* only added so many BASE's */ return adler | (sum2 << 16); } /* do length NMAX blocks -- requires just one modulo operation */ while (len >= NMAX) { len -= NMAX; n = NMAX / 16; /* NMAX is divisible by 16 */ do { DO16(buf); /* 16 sums unrolled */ buf += 16; } while (--n); MOD(adler); MOD(sum2); } /* do remaining bytes (less than NMAX, still just one modulo) */ if (len) { /* avoid modulos if none remaining */ while (len >= 16) { len -= 16; DO16(buf); buf += 16; } while (len--) { adler += *buf++; sum2 += adler; } MOD(adler); MOD(sum2); } /* return recombined sums */ return adler | (sum2 << 16); }
O3
c
adler32_z: movq %rdi, %rcx movzwl %cx, %edi shrl $0x10, %ecx cmpq $0x1, %rdx jne 0x340f movzbl (%rsi), %eax leaq (%rdi,%rax), %rdx movl $0xfff1, %esi # imm = 0xFFF1 cmpq %rsi, %rdx leaq -0xfff1(%rdi,%rax), %rax cmovbq %rdx, %rax addq %rax, %rcx movq %rcx, %rdx shlq $0x10, %rdx movabsq $-0xfff10000, %rdi # imm = 0xFFFFFFFF000F0000 addq %rdx, %rdi cmpq %rsi, %rcx cmovbq %rdx, %rdi orq %rax, %rdi movq %rdi, %rcx jmp 0x36e0 testq %rsi, %rsi je 0x3476 movq %rdx, %r8 cmpq $0x10, %rdx jae 0x3480 testq %r8, %r8 je 0x3436 xorl %eax, %eax movzbl (%rsi,%rax), %edx addq %rdx, %rdi addq %rdi, %rcx incq %rax cmpq %rax, %r8 jne 0x3424 leaq -0xfff1(%rdi), %rsi cmpq $0xfff1, %rdi # imm = 0xFFF1 cmovbq %rdi, %rsi movabsq $0xf00e10d2fc5cd, %rdx # imm = 0xF00E10D2FC5CD movq %rcx, %rax mulq %rdx movl %ecx, %eax subl %edx, %eax shrl %eax addl %edx, %eax shrl $0xf, %eax imull $0xfff1, %eax, %eax # imm = 0xFFF1 subl %eax, %ecx shll $0x10, %ecx orq %rsi, %rcx jmp 0x36e0 movl $0x1, %ecx jmp 0x36e0 cmpq $0x15b0, %r8 # imm = 0x15B0 jb 0x35c5 movabsq $0xf00e10d2fc5cd, %r9 # imm = 0xF00E10D2FC5CD addq $-0x15b0, %r8 # imm = 0xEA50 xorl %eax, %eax movzbl (%rsi,%rax), %edx addq %rdi, %rdx addq %rdx, %rcx movzbl 0x1(%rsi,%rax), %edi addq %rdx, %rdi addq %rdi, %rcx movzbl 0x2(%rsi,%rax), %edx addq %rdi, %rdx addq %rdx, %rcx movzbl 0x3(%rsi,%rax), %edi addq %rdx, %rdi addq %rdi, %rcx movzbl 0x4(%rsi,%rax), %edx addq %rdi, %rdx addq %rdx, %rcx movzbl 0x5(%rsi,%rax), %edi addq %rdx, %rdi addq %rdi, %rcx movzbl 0x6(%rsi,%rax), %edx addq %rdi, %rdx addq %rdx, %rcx movzbl 0x7(%rsi,%rax), %edi addq %rdx, %rdi addq %rdi, %rcx movzbl 0x8(%rsi,%rax), %edx addq %rdi, %rdx addq %rdx, %rcx movzbl 0x9(%rsi,%rax), %edi addq %rdx, %rdi addq %rdi, %rcx movzbl 0xa(%rsi,%rax), %edx addq %rdi, %rdx addq %rdx, %rcx movzbl 0xb(%rsi,%rax), %edi addq %rdx, %rdi addq %rdi, %rcx movzbl 0xc(%rsi,%rax), %edx addq %rdi, %rdx addq %rdx, %rcx movzbl 0xd(%rsi,%rax), %edi addq %rdx, %rdi addq %rdi, %rcx movzbl 0xe(%rsi,%rax), %edx addq %rdi, %rdx addq %rdx, %rcx movzbl 0xf(%rsi,%rax), %edi addq %rdx, %rdi addq %rdi, %rcx addq $0x10, %rax cmpl $0x15b0, %eax # imm = 0x15B0 jne 0x34a0 addq $0x15b0, %rsi # imm = 0x15B0 movq %rdi, %rax mulq %r9 movq %rdi, %rax subq %rdx, %rax shrq %rax addq %rdx, %rax shrq $0xf, %rax imulq $0xfff1, %rax, %rax # imm = 0xFFF1 subq %rax, %rdi movq %rcx, %rax mulq %r9 movq %rcx, %rax subq %rdx, %rax shrq %rax addq %rdx, %rax shrq $0xf, %rax imulq $0xfff1, %rax, %rax # imm = 0xFFF1 subq %rax, %rcx cmpq $0x15af, %r8 # imm = 0x15AF ja 0x3497 testq %r8, %r8 je 0x36d9 cmpq $0x10, %r8 jb 0x367b addq $-0x10, %r8 movzbl (%rsi), %eax addq %rdi, %rax addq %rax, %rcx movzbl 0x1(%rsi), %edx addq %rax, %rdx addq %rdx, %rcx movzbl 0x2(%rsi), %eax addq %rdx, %rax addq %rax, %rcx movzbl 0x3(%rsi), %edx addq %rax, %rdx addq %rdx, %rcx movzbl 0x4(%rsi), %eax addq %rdx, %rax addq %rax, %rcx movzbl 0x5(%rsi), %edx addq %rax, %rdx addq %rdx, %rcx movzbl 0x6(%rsi), %eax addq %rdx, %rax addq %rax, %rcx movzbl 0x7(%rsi), %edx addq %rax, %rdx addq %rdx, %rcx movzbl 0x8(%rsi), %eax addq %rdx, %rax addq %rax, %rcx movzbl 0x9(%rsi), %edx addq %rax, %rdx addq %rdx, %rcx movzbl 0xa(%rsi), %eax addq %rdx, %rax addq %rax, %rcx movzbl 0xb(%rsi), %edx addq %rax, %rdx addq %rdx, %rcx movzbl 0xc(%rsi), %eax addq %rdx, %rax addq %rax, %rcx movzbl 0xd(%rsi), %edx addq %rax, %rdx addq %rdx, %rcx movzbl 0xe(%rsi), %eax addq %rdx, %rax addq %rax, %rcx movzbl 0xf(%rsi), %edi addq %rax, %rdi addq %rdi, %rcx addq $0x10, %rsi cmpq $0xf, %r8 ja 0x35c5 testq %r8, %r8 je 0x368f xorl %eax, %eax movzbl (%rsi,%rax), %edx addq %rdx, %rdi addq %rdi, %rcx incq %rax cmpq %rax, %r8 jne 0x367d movabsq $0xf00e10d2fc5cd, %rsi # imm = 0xF00E10D2FC5CD movq %rdi, %rax mulq %rsi movq %rdi, %rax subq %rdx, %rax shrq %rax addq %rdx, %rax shrq $0xf, %rax imulq $0xfff1, %rax, %rax # imm = 0xFFF1 subq %rax, %rdi movq %rcx, %rax mulq %rsi movq %rcx, %rax subq %rdx, %rax shrq %rax addq %rdx, %rax shrq $0xf, %rax imulq $0xfff1, %rax, %rax # imm = 0xFFF1 subq %rax, %rcx shlq $0x10, %rcx orq %rdi, %rcx movq %rcx, %rax retq
adler32_z: mov rcx, rdi movzx edi, cx shr ecx, 10h cmp rdx, 1 jnz short loc_340F movzx eax, byte ptr [rsi] lea rdx, [rdi+rax] mov esi, 0FFF1h cmp rdx, rsi lea rax, [rdi+rax-0FFF1h] cmovb rax, rdx add rcx, rax mov rdx, rcx shl rdx, 10h mov rdi, 0FFFFFFFF000F0000h add rdi, rdx cmp rcx, rsi cmovb rdi, rdx or rdi, rax mov rcx, rdi jmp loc_36E0 loc_340F: test rsi, rsi jz short loc_3476 mov r8, rdx cmp rdx, 10h jnb short loc_3480 test r8, r8 jz short loc_3436 xor eax, eax loc_3424: movzx edx, byte ptr [rsi+rax] add rdi, rdx add rcx, rdi inc rax cmp r8, rax jnz short loc_3424 loc_3436: lea rsi, [rdi-0FFF1h] cmp rdi, 0FFF1h cmovb rsi, rdi mov rdx, 0F00E10D2FC5CDh mov rax, rcx mul rdx mov eax, ecx sub eax, edx shr eax, 1 add eax, edx shr eax, 0Fh imul eax, 0FFF1h sub ecx, eax shl ecx, 10h or rcx, rsi jmp loc_36E0 loc_3476: mov ecx, 1 jmp loc_36E0 loc_3480: cmp r8, 15B0h jb loc_35C5 mov r9, 0F00E10D2FC5CDh loc_3497: add r8, 0FFFFFFFFFFFFEA50h xor eax, eax loc_34A0: movzx edx, byte ptr [rsi+rax] add rdx, rdi add rcx, rdx movzx edi, byte ptr [rsi+rax+1] add rdi, rdx add rcx, rdi movzx edx, byte ptr [rsi+rax+2] add rdx, rdi add rcx, rdx movzx edi, byte ptr [rsi+rax+3] add rdi, rdx add rcx, rdi movzx edx, byte ptr [rsi+rax+4] add rdx, rdi add rcx, rdx movzx edi, byte ptr [rsi+rax+5] add rdi, rdx add rcx, rdi movzx edx, byte ptr [rsi+rax+6] add rdx, rdi add rcx, rdx movzx edi, byte ptr [rsi+rax+7] add rdi, rdx add rcx, rdi movzx edx, byte ptr [rsi+rax+8] add rdx, rdi add rcx, rdx movzx edi, byte ptr [rsi+rax+9] add rdi, rdx add rcx, rdi movzx edx, byte ptr [rsi+rax+0Ah] add rdx, rdi add rcx, rdx movzx edi, byte ptr [rsi+rax+0Bh] add rdi, rdx add rcx, rdi movzx edx, byte ptr [rsi+rax+0Ch] add rdx, rdi add rcx, rdx movzx edi, byte ptr [rsi+rax+0Dh] add rdi, rdx add rcx, rdi movzx edx, byte ptr [rsi+rax+0Eh] add rdx, rdi add rcx, rdx movzx edi, byte ptr [rsi+rax+0Fh] add rdi, rdx add rcx, rdi add rax, 10h cmp eax, 15B0h jnz loc_34A0 add rsi, 15B0h mov rax, rdi mul r9 mov rax, rdi sub rax, rdx shr rax, 1 add rax, rdx shr rax, 0Fh imul rax, 0FFF1h sub rdi, rax mov rax, rcx mul r9 mov rax, rcx sub rax, rdx shr rax, 1 add rax, rdx shr rax, 0Fh imul rax, 0FFF1h sub rcx, rax cmp r8, 15AFh ja loc_3497 test r8, r8 jz loc_36D9 cmp r8, 10h jb loc_367B loc_35C5: add r8, 0FFFFFFFFFFFFFFF0h movzx eax, byte ptr [rsi] add rax, rdi add rcx, rax movzx edx, byte ptr [rsi+1] add rdx, rax add rcx, rdx movzx eax, byte ptr [rsi+2] add rax, rdx add rcx, rax movzx edx, byte ptr [rsi+3] add rdx, rax add rcx, rdx movzx eax, byte ptr [rsi+4] add rax, rdx add rcx, rax movzx edx, byte ptr [rsi+5] add rdx, rax add rcx, rdx movzx eax, byte ptr [rsi+6] add rax, rdx add rcx, rax movzx edx, byte ptr [rsi+7] add rdx, rax add rcx, rdx movzx eax, byte ptr [rsi+8] add rax, rdx add rcx, rax movzx edx, byte ptr [rsi+9] add rdx, rax add rcx, rdx movzx eax, byte ptr [rsi+0Ah] add rax, rdx add rcx, rax movzx edx, byte ptr [rsi+0Bh] add rdx, rax add rcx, rdx movzx eax, byte ptr [rsi+0Ch] add rax, rdx add rcx, rax movzx edx, byte ptr [rsi+0Dh] add rdx, rax add rcx, rdx movzx eax, byte ptr [rsi+0Eh] add rax, rdx add rcx, rax movzx edi, byte ptr [rsi+0Fh] add rdi, rax add rcx, rdi add rsi, 10h cmp r8, 0Fh ja loc_35C5 test r8, r8 jz short loc_368F loc_367B: xor eax, eax loc_367D: movzx edx, byte ptr [rsi+rax] add rdi, rdx add rcx, rdi inc rax cmp r8, rax jnz short loc_367D loc_368F: mov rsi, 0F00E10D2FC5CDh mov rax, rdi mul rsi mov rax, rdi sub rax, rdx shr rax, 1 add rax, rdx shr rax, 0Fh imul rax, 0FFF1h sub rdi, rax mov rax, rcx mul rsi mov rax, rcx sub rax, rdx shr rax, 1 add rax, rdx shr rax, 0Fh imul rax, 0FFF1h sub rcx, rax loc_36D9: shl rcx, 10h or rcx, rdi loc_36E0: mov rax, rcx retn
long long adler32_z(unsigned long long a1, unsigned __int8 *a2, unsigned long long a3) { unsigned int v3; // ecx unsigned long long v4; // rcx unsigned long long v5; // rdx unsigned long long v6; // rax unsigned long long v7; // rcx long long v8; // rdi unsigned long long v10; // r8 long long j; // rax unsigned long long v12; // rsi long long v13; // rax unsigned long long v14; // rdx unsigned long long v15; // rdi unsigned long long v16; // rcx unsigned long long v17; // rdx unsigned long long v18; // rdi unsigned long long v19; // rcx unsigned long long v20; // rdx unsigned long long v21; // rdi unsigned long long v22; // rcx unsigned long long v23; // rdx unsigned long long v24; // rdi unsigned long long v25; // rcx unsigned long long v26; // rdx long long v27; // rdi long long v28; // rcx long long v29; // rdx long long v30; // rdi long long v31; // rcx long long v32; // rdx long long v33; // rdi long long v34; // rcx long long v35; // rdx unsigned long long v36; // rax unsigned long long v37; // rdx unsigned long long v38; // rcx unsigned long long v39; // rax unsigned long long v40; // rdx unsigned long long v41; // rcx unsigned long long v42; // rax unsigned long long v43; // rdx unsigned long long v44; // rcx unsigned long long v45; // rax unsigned long long v46; // rdx unsigned long long v47; // rcx unsigned long long v48; // rax long long v49; // rdx long long v50; // rcx long long v51; // rax long long v52; // rdx long long v53; // rcx long long v54; // rax long long v55; // rdx long long v56; // rcx long long v57; // rax long long i; // rax v3 = a1; a1 = (unsigned __int16)a1; v4 = HIWORD(v3); if ( a3 == 1 ) { v5 = (unsigned __int16)a1 + (unsigned long long)*a2; v6 = v5 - 65521; if ( v5 < 0xFFF1 ) v6 = (unsigned __int16)a1 + (unsigned long long)*a2; v7 = v6 + v4; v8 = (v7 << 16) - 4293984256u; if ( v7 < 0xFFF1 ) v8 = v7 << 16; return v6 | v8; } if ( !a2 ) return 1LL; v10 = a3; if ( a3 >= 0x10 ) { if ( a3 >= 0x15B0 ) { do { v10 -= 5552LL; v13 = 0LL; do { v14 = a1 + a2[v13]; v15 = v14 + a2[v13 + 1]; v16 = v15 + v14 + v4; v17 = v15 + a2[v13 + 2]; v18 = v17 + a2[v13 + 3]; v19 = v18 + v17 + v16; v20 = v18 + a2[v13 + 4]; v21 = v20 + a2[v13 + 5]; v22 = v21 + v20 + v19; v23 = v21 + a2[v13 + 6]; v24 = v23 + a2[v13 + 7]; v25 = v24 + v23 + v22; v26 = v24 + a2[v13 + 8]; v27 = v26 + a2[v13 + 9]; v28 = v27 + v26 + v25; v29 = v27 + a2[v13 + 10]; v30 = v29 + a2[v13 + 11]; v31 = v30 + v29 + v28; v32 = v30 + a2[v13 + 12]; v33 = v32 + a2[v13 + 13]; v34 = v33 + v32 + v31; v35 = v33 + a2[v13 + 14]; a1 = v35 + a2[v13 + 15]; v4 = a1 + v35 + v34; v13 += 16LL; } while ( (_DWORD)v13 != 5552 ); a2 += 5552; a1 %= 0xFFF1uLL; v4 %= 0xFFF1uLL; } while ( v10 > 0x15AF ); if ( !v10 ) return a1 | (v4 << 16); if ( v10 < 0x10 ) goto LABEL_24; } do { v10 -= 16LL; v36 = a1 + *a2; v37 = v36 + a2[1]; v38 = v37 + v36 + v4; v39 = v37 + a2[2]; v40 = v39 + a2[3]; v41 = v40 + v39 + v38; v42 = v40 + a2[4]; v43 = v42 + a2[5]; v44 = v43 + v42 + v41; v45 = v43 + a2[6]; v46 = v45 + a2[7]; v47 = v46 + v45 + v44; v48 = v46 + a2[8]; v49 = v48 + a2[9]; v50 = v49 + v48 + v47; v51 = v49 + a2[10]; v52 = v51 + a2[11]; v53 = v52 + v51 + v50; v54 = v52 + a2[12]; v55 = v54 + a2[13]; v56 = v55 + v54 + v53; v57 = v55 + a2[14]; a1 = v57 + a2[15]; v4 = a1 + v57 + v56; a2 += 16; } while ( v10 > 0xF ); if ( v10 ) { LABEL_24: for ( i = 0LL; i != v10; ++i ) { a1 += a2[i]; v4 += a1; } } a1 %= 0xFFF1uLL; v4 %= 0xFFF1uLL; return a1 | (v4 << 16); } if ( a3 ) { for ( j = 0LL; j != a3; ++j ) { a1 += a2[j]; v4 += a1; } } v12 = a1 - 65521; if ( a1 < 0xFFF1 ) v12 = a1; return v12 | (((unsigned int)v4 - 65521 * (((unsigned int)((0xF00E10D2FC5CDLL * (unsigned __int128)v4) >> 64) + (((unsigned int)v4 - (unsigned int)((0xF00E10D2FC5CDLL * (unsigned __int128)v4) >> 64)) >> 1)) >> 15)) << 16); }
adler32_z: MOV RCX,RDI MOVZX EDI,CX SHR ECX,0x10 CMP RDX,0x1 JNZ 0x0010340f MOVZX EAX,byte ptr [RSI] LEA RDX,[RDI + RAX*0x1] MOV ESI,0xfff1 CMP RDX,RSI LEA RAX,[RDI + RAX*0x1 + -0xfff1] CMOVC RAX,RDX ADD RCX,RAX MOV RDX,RCX SHL RDX,0x10 MOV RDI,-0xfff10000 ADD RDI,RDX CMP RCX,RSI CMOVC RDI,RDX OR RDI,RAX MOV RCX,RDI JMP 0x001036e0 LAB_0010340f: TEST RSI,RSI JZ 0x00103476 MOV R8,RDX CMP RDX,0x10 JNC 0x00103480 TEST R8,R8 JZ 0x00103436 XOR EAX,EAX LAB_00103424: MOVZX EDX,byte ptr [RSI + RAX*0x1] ADD RDI,RDX ADD RCX,RDI INC RAX CMP R8,RAX JNZ 0x00103424 LAB_00103436: LEA RSI,[RDI + -0xfff1] CMP RDI,0xfff1 CMOVC RSI,RDI MOV RDX,0xf00e10d2fc5cd MOV RAX,RCX MUL RDX MOV EAX,ECX SUB EAX,EDX SHR EAX,0x1 ADD EAX,EDX SHR EAX,0xf IMUL EAX,EAX,0xfff1 SUB ECX,EAX SHL ECX,0x10 OR RCX,RSI JMP 0x001036e0 LAB_00103476: MOV ECX,0x1 JMP 0x001036e0 LAB_00103480: CMP R8,0x15b0 JC 0x001035c5 MOV R9,0xf00e10d2fc5cd LAB_00103497: ADD R8,-0x15b0 XOR EAX,EAX LAB_001034a0: MOVZX EDX,byte ptr [RSI + RAX*0x1] ADD RDX,RDI ADD RCX,RDX MOVZX EDI,byte ptr [RSI + RAX*0x1 + 0x1] ADD RDI,RDX ADD RCX,RDI MOVZX EDX,byte ptr [RSI + RAX*0x1 + 0x2] ADD RDX,RDI ADD RCX,RDX MOVZX EDI,byte ptr [RSI + RAX*0x1 + 0x3] ADD RDI,RDX ADD RCX,RDI MOVZX EDX,byte ptr [RSI + RAX*0x1 + 0x4] ADD RDX,RDI ADD RCX,RDX MOVZX EDI,byte ptr [RSI + RAX*0x1 + 0x5] ADD RDI,RDX ADD RCX,RDI MOVZX EDX,byte ptr [RSI + RAX*0x1 + 0x6] ADD RDX,RDI ADD RCX,RDX MOVZX EDI,byte ptr [RSI + RAX*0x1 + 0x7] ADD RDI,RDX ADD RCX,RDI MOVZX EDX,byte ptr [RSI + RAX*0x1 + 0x8] ADD RDX,RDI ADD RCX,RDX MOVZX EDI,byte ptr [RSI + RAX*0x1 + 0x9] ADD RDI,RDX ADD RCX,RDI MOVZX EDX,byte ptr [RSI + RAX*0x1 + 0xa] ADD RDX,RDI ADD RCX,RDX MOVZX EDI,byte ptr [RSI + RAX*0x1 + 0xb] ADD RDI,RDX ADD RCX,RDI MOVZX EDX,byte ptr [RSI + RAX*0x1 + 0xc] ADD RDX,RDI ADD RCX,RDX MOVZX EDI,byte ptr [RSI + RAX*0x1 + 0xd] ADD RDI,RDX ADD RCX,RDI MOVZX EDX,byte ptr [RSI + RAX*0x1 + 0xe] ADD RDX,RDI ADD RCX,RDX MOVZX EDI,byte ptr [RSI + RAX*0x1 + 0xf] ADD RDI,RDX ADD RCX,RDI ADD RAX,0x10 CMP EAX,0x15b0 JNZ 0x001034a0 ADD RSI,0x15b0 MOV RAX,RDI MUL R9 MOV RAX,RDI SUB RAX,RDX SHR RAX,0x1 ADD RAX,RDX SHR RAX,0xf IMUL RAX,RAX,0xfff1 SUB RDI,RAX MOV RAX,RCX MUL R9 MOV RAX,RCX SUB RAX,RDX SHR RAX,0x1 ADD RAX,RDX SHR RAX,0xf IMUL RAX,RAX,0xfff1 SUB RCX,RAX CMP R8,0x15af JA 0x00103497 TEST R8,R8 JZ 0x001036d9 CMP R8,0x10 JC 0x0010367b LAB_001035c5: ADD R8,-0x10 MOVZX EAX,byte ptr [RSI] ADD RAX,RDI ADD RCX,RAX MOVZX EDX,byte ptr [RSI + 0x1] ADD RDX,RAX ADD RCX,RDX MOVZX EAX,byte ptr [RSI + 0x2] ADD RAX,RDX ADD RCX,RAX MOVZX EDX,byte ptr [RSI + 0x3] ADD RDX,RAX ADD RCX,RDX MOVZX EAX,byte ptr [RSI + 0x4] ADD RAX,RDX ADD RCX,RAX MOVZX EDX,byte ptr [RSI + 0x5] ADD RDX,RAX ADD RCX,RDX MOVZX EAX,byte ptr [RSI + 0x6] ADD RAX,RDX ADD RCX,RAX MOVZX EDX,byte ptr [RSI + 0x7] ADD RDX,RAX ADD RCX,RDX MOVZX EAX,byte ptr [RSI + 0x8] ADD RAX,RDX ADD RCX,RAX MOVZX EDX,byte ptr [RSI + 0x9] ADD RDX,RAX ADD RCX,RDX MOVZX EAX,byte ptr [RSI + 0xa] ADD RAX,RDX ADD RCX,RAX MOVZX EDX,byte ptr [RSI + 0xb] ADD RDX,RAX ADD RCX,RDX MOVZX EAX,byte ptr [RSI + 0xc] ADD RAX,RDX ADD RCX,RAX MOVZX EDX,byte ptr [RSI + 0xd] ADD RDX,RAX ADD RCX,RDX MOVZX EAX,byte ptr [RSI + 0xe] ADD RAX,RDX ADD RCX,RAX MOVZX EDI,byte ptr [RSI + 0xf] ADD RDI,RAX ADD RCX,RDI ADD RSI,0x10 CMP R8,0xf JA 0x001035c5 TEST R8,R8 JZ 0x0010368f LAB_0010367b: XOR EAX,EAX LAB_0010367d: MOVZX EDX,byte ptr [RSI + RAX*0x1] ADD RDI,RDX ADD RCX,RDI INC RAX CMP R8,RAX JNZ 0x0010367d LAB_0010368f: MOV RSI,0xf00e10d2fc5cd MOV RAX,RDI MUL RSI MOV RAX,RDI SUB RAX,RDX SHR RAX,0x1 ADD RAX,RDX SHR RAX,0xf IMUL RAX,RAX,0xfff1 SUB RDI,RAX MOV RAX,RCX MUL RSI MOV RAX,RCX SUB RAX,RDX SHR RAX,0x1 ADD RAX,RDX SHR RAX,0xf IMUL RAX,RAX,0xfff1 SUB RCX,RAX LAB_001036d9: SHL RCX,0x10 OR RCX,RDI LAB_001036e0: MOV RAX,RCX RET
ulong adler32_z(ulong param_1,byte *param_2,ulong param_3) { int1 auVar1 [16]; ulong uVar2; long lVar3; ulong uVar4; int iVar5; ulong uVar6; long lVar7; long lVar8; long lVar9; long lVar10; long lVar11; long lVar12; long lVar13; long lVar14; ulong uVar15; long lVar16; long lVar17; long lVar18; long lVar19; long lVar20; long lVar21; long lVar22; uVar15 = param_1 & 0xffff; uVar4 = param_1 >> 0x10 & 0xffff; if (param_3 == 1) { uVar2 = uVar15 + *param_2; uVar15 = (uVar15 - 0xfff1) + (ulong)*param_2; if (uVar2 < 0xfff1) { uVar15 = uVar2; } uVar6 = (uVar4 + uVar15) * 0x10000; uVar2 = uVar6 - 0xfff10000; if (uVar4 + uVar15 < 0xfff1) { uVar2 = uVar6; } return uVar2 | uVar15; } if (param_2 == (byte *)0x0) { return 1; } if (param_3 < 0x10) { if (param_3 != 0) { uVar2 = 0; do { uVar15 = uVar15 + param_2[uVar2]; uVar4 = uVar4 + uVar15; uVar2 = uVar2 + 1; } while (param_3 != uVar2); } uVar2 = uVar15 - 0xfff1; if (uVar15 < 0xfff1) { uVar2 = uVar15; } auVar1._8_8_ = 0; auVar1._0_8_ = uVar4; iVar5 = SUB164(auVar1 * ZEXT816(0xf00e10d2fc5cd),8); return ((int)uVar4 + (((uint)((int)uVar4 - iVar5) >> 1) + iVar5 >> 0xf) * -0xfff1) * 0x10000 | uVar2; } if (param_3 < 0x15b0) { LAB_001035c5: do { param_3 = param_3 - 0x10; lVar3 = *param_2 + uVar15; lVar14 = (ulong)param_2[1] + lVar3; lVar7 = (ulong)param_2[2] + lVar14; lVar16 = (ulong)param_2[3] + lVar7; lVar8 = (ulong)param_2[4] + lVar16; lVar17 = (ulong)param_2[5] + lVar8; lVar9 = (ulong)param_2[6] + lVar17; lVar18 = (ulong)param_2[7] + lVar9; lVar10 = (ulong)param_2[8] + lVar18; lVar19 = (ulong)param_2[9] + lVar10; lVar11 = (ulong)param_2[10] + lVar19; lVar20 = (ulong)param_2[0xb] + lVar11; lVar12 = (ulong)param_2[0xc] + lVar20; lVar21 = (ulong)param_2[0xd] + lVar12; lVar13 = (ulong)param_2[0xe] + lVar21; uVar15 = (ulong)param_2[0xf] + lVar13; uVar4 = uVar4 + lVar3 + lVar14 + lVar7 + lVar16 + lVar8 + lVar17 + lVar9 + lVar18 + lVar10 + lVar19 + lVar11 + lVar20 + lVar12 + lVar21 + lVar13 + uVar15; param_2 = param_2 + 0x10; } while (0xf < param_3); if (param_3 != 0) goto LAB_0010367b; } else { do { param_3 = param_3 - 0x15b0; lVar3 = 0; do { lVar7 = param_2[lVar3] + uVar15; lVar16 = (ulong)param_2[lVar3 + 1] + lVar7; lVar8 = (ulong)param_2[lVar3 + 2] + lVar16; lVar17 = (ulong)param_2[lVar3 + 3] + lVar8; lVar9 = (ulong)param_2[lVar3 + 4] + lVar17; lVar18 = (ulong)param_2[lVar3 + 5] + lVar9; lVar10 = (ulong)param_2[lVar3 + 6] + lVar18; lVar19 = (ulong)param_2[lVar3 + 7] + lVar10; lVar11 = (ulong)param_2[lVar3 + 8] + lVar19; lVar20 = (ulong)param_2[lVar3 + 9] + lVar11; lVar12 = (ulong)param_2[lVar3 + 10] + lVar20; lVar21 = (ulong)param_2[lVar3 + 0xb] + lVar12; lVar13 = (ulong)param_2[lVar3 + 0xc] + lVar21; lVar22 = (ulong)param_2[lVar3 + 0xd] + lVar13; lVar14 = (ulong)param_2[lVar3 + 0xe] + lVar22; uVar15 = (ulong)param_2[lVar3 + 0xf] + lVar14; uVar4 = uVar4 + lVar7 + lVar16 + lVar8 + lVar17 + lVar9 + lVar18 + lVar10 + lVar19 + lVar11 + lVar20 + lVar12 + lVar21 + lVar13 + lVar22 + lVar14 + uVar15; lVar3 = lVar3 + 0x10; } while ((int)lVar3 != 0x15b0); param_2 = param_2 + 0x15b0; uVar15 = uVar15 % 0xfff1; uVar4 = uVar4 % 0xfff1; } while (0x15af < param_3); if (param_3 == 0) goto LAB_001036d9; if (0xf < param_3) goto LAB_001035c5; LAB_0010367b: uVar2 = 0; do { uVar15 = uVar15 + param_2[uVar2]; uVar4 = uVar4 + uVar15; uVar2 = uVar2 + 1; } while (param_3 != uVar2); } uVar15 = uVar15 % 0xfff1; uVar4 = uVar4 % 0xfff1; LAB_001036d9: return uVar4 << 0x10 | uVar15; }
35,044
parse_connection_string
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static int parse_connection_string(MYSQL *mysql, const char *unused __attribute__((unused)), const char *conn_str, ssize_t len) { char *conn_save, *end, *pos, *key= NULL, *val= NULL; my_bool in_curly_brace= 0; if (len == -1) len= strlen(conn_str); /* don't modify original dsn */ conn_save= (char *)malloc(len + 1); memcpy(conn_save, conn_str, len); conn_save[len]= 0; /* start and end */ pos= conn_save; end= conn_save + len; while (pos <= end) { /* ignore white space, unless it is between curly braces */ if (isspace(*pos) && !in_curly_brace) { pos++; continue; } switch (*pos) { case '{': if (!key) goto error; if (!in_curly_brace) { in_curly_brace= 1; if (pos < end) { pos++; val= pos; continue; } } break; case '}': if (in_curly_brace) { if (!key) goto error; if (pos < end && *(pos + 1) == '}') { memmove(pos, pos + 1, end - pos - 1); end--; pos += 2; continue; } if (in_curly_brace) in_curly_brace= 0; else goto error; *pos++= 0; continue; } break; case '=': if (in_curly_brace) { pos++; continue; } if (!key) goto error; *pos++= 0; if (pos < end) val= pos; continue; break; case ';': if (in_curly_brace) { pos++; continue; } if (!key) goto error; *pos++= 0; if (key && strcasecmp(key, "connection") != 0) _mariadb_set_conf_option(mysql, key, val); key= val= NULL; continue; break; } if (!key && *pos) key= pos; pos++; } if (key && strcasecmp(key, "connection") != 0) _mariadb_set_conf_option(mysql, key, val); free(conn_save); return 0; error: my_set_error(mysql, CR_CONNSTR_PARSE_ERROR, SQLSTATE_UNKNOWN, 0, pos - conn_save); free(conn_save); return 1; }
O3
c
parse_connection_string: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %r15 movq %rdx, %r14 movq %rdi, %rbx cmpq $-0x1, %rcx jne 0x19c29 movq %r14, %rdi callq 0x131c0 movq %rax, %r15 leaq 0x1(%r15), %rdi callq 0x13600 movq %rax, %r12 movq %rax, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x13390 movb $0x0, (%r12,%r15) testq %r15, %r15 js 0x19de4 movq %rbx, -0x38(%rbp) addq %r12, %r15 xorl %ebx, %ebx callq 0x134c0 movq %rax, %r14 xorl %esi, %esi xorl %r13d, %r13d movq %r12, -0x30(%rbp) movq (%r14), %rcx movsbq (%r12), %rax testb $0x20, 0x1(%rcx,%rax,2) sete %cl testb %bl, %bl setne %dl orb %cl, %dl je 0x19d4e movzbl %al, %eax cmpl $0x7a, %eax jg 0x19cbf cmpl $0x3b, %eax je 0x19cf8 cmpl $0x3d, %eax jne 0x19d94 testb %bl, %bl jne 0x19cfc testq %r13, %r13 je 0x19def movb $0x0, (%r12) incq %r12 cmpq %r15, %r12 cmovbq %r12, %rsi jmp 0x19d51 cmpl $0x7d, %eax je 0x19d06 cmpl $0x7b, %eax jne 0x19d94 testq %r13, %r13 je 0x19def testb %bl, %bl setne %al cmpq %r15, %r12 setae %cl orb %al, %cl movb $0x1, %bl jne 0x19da5 incq %r12 movb $0x1, %bl movq %r12, %rsi jmp 0x19da8 testb %bl, %bl je 0x19d55 incq %r12 movb $0x1, %bl jmp 0x19da8 testb %bl, %bl je 0x19d92 testq %r13, %r13 je 0x19def cmpq %r15, %r12 jae 0x19d49 cmpb $0x7d, 0x1(%r12) jne 0x19d49 movq %rsi, %rbx leaq 0x1(%r12), %rsi movq %r12, %rdx notq %rdx addq %r15, %rdx movq %r12, %rdi callq 0x13720 movq %rbx, %rsi decq %r15 addq $0x2, %r12 jmp 0x19cff movb $0x0, (%r12) incq %r12 xorl %ebx, %ebx jmp 0x19da8 testq %r13, %r13 je 0x19def movq %rsi, %rbx movb $0x0, (%r12) incq %r12 movq %r13, %rdi leaq 0x1fd18(%rip), %rsi # 0x39a8b callq 0x134d0 testl %eax, %eax je 0x19d8b movq -0x38(%rbp), %rdi movq %r13, %rsi movq %rbx, %rdx callq 0x19e38 xorl %r13d, %r13d xorl %esi, %esi jmp 0x19d51 xorl %ebx, %ebx testq %r13, %r13 jne 0x19da5 testl %eax, %eax je 0x19da2 movq %r12, %r13 jmp 0x19da5 xorl %r13d, %r13d incq %r12 cmpq %r15, %r12 jbe 0x19c6b xorl %r14d, %r14d testq %r13, %r13 je 0x19de9 movq %rsi, %rbx leaq 0x1fcc8(%rip), %rsi # 0x39a8b movq %r13, %rdi callq 0x134d0 testl %eax, %eax movq -0x30(%rbp), %r12 je 0x19e1e movq -0x38(%rbp), %rdi movq %r13, %rsi movq %rbx, %rdx callq 0x19e38 jmp 0x19e1e xorl %r14d, %r14d jmp 0x19e1e movq -0x30(%rbp), %r12 jmp 0x19e1e leaq 0x34f9a(%rip), %rax # 0x4ed90 movq (%rax), %rdx movq -0x30(%rbp), %rax subq %rax, %r12 movq -0x38(%rbp), %rdi movl $0x1393, %esi # imm = 0x1393 xorl %ecx, %ecx movq %r12, %r8 movq %rax, %r12 xorl %eax, %eax callq 0x1916d movl $0x1, %r14d movq %r12, %rdi callq 0x13570 movl %r14d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
parse_connection_string: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15, rcx mov r14, rdx mov rbx, rdi cmp rcx, 0FFFFFFFFFFFFFFFFh jnz short loc_19C29 mov rdi, r14 call _strlen mov r15, rax loc_19C29: lea rdi, [r15+1] call _malloc mov r12, rax mov rdi, rax mov rsi, r14 mov rdx, r15 call _memcpy mov byte ptr [r12+r15], 0 test r15, r15 js loc_19DE4 mov [rbp+var_38], rbx add r15, r12 xor ebx, ebx call ___ctype_b_loc mov r14, rax xor esi, esi xor r13d, r13d mov [rbp+var_30], r12 loc_19C6B: mov rcx, [r14] movsx rax, byte ptr [r12] test byte ptr [rcx+rax*2+1], 20h setz cl test bl, bl setnz dl or dl, cl jz loc_19D4E movzx eax, al cmp eax, 7Ah ; 'z' jg short loc_19CBF cmp eax, 3Bh ; ';' jz short loc_19CF8 cmp eax, 3Dh ; '=' jnz loc_19D94 test bl, bl jnz short loc_19CFC test r13, r13 jz loc_19DEF mov byte ptr [r12], 0 inc r12 cmp r12, r15 cmovb rsi, r12 jmp loc_19D51 loc_19CBF: cmp eax, 7Dh ; '}' jz short loc_19D06 cmp eax, 7Bh ; '{' jnz loc_19D94 test r13, r13 jz loc_19DEF test bl, bl setnz al cmp r12, r15 setnb cl or cl, al mov bl, 1 jnz loc_19DA5 inc r12 mov bl, 1 mov rsi, r12 jmp loc_19DA8 loc_19CF8: test bl, bl jz short loc_19D55 loc_19CFC: inc r12 loc_19CFF: mov bl, 1 jmp loc_19DA8 loc_19D06: test bl, bl jz loc_19D92 test r13, r13 jz loc_19DEF cmp r12, r15 jnb short loc_19D49 cmp byte ptr [r12+1], 7Dh ; '}' jnz short loc_19D49 mov rbx, rsi lea rsi, [r12+1] mov rdx, r12 not rdx add rdx, r15 mov rdi, r12 call _memmove mov rsi, rbx dec r15 add r12, 2 jmp short loc_19CFF loc_19D49: mov byte ptr [r12], 0 loc_19D4E: inc r12 loc_19D51: xor ebx, ebx jmp short loc_19DA8 loc_19D55: test r13, r13 jz loc_19DEF mov rbx, rsi mov byte ptr [r12], 0 inc r12 mov rdi, r13 lea rsi, aConnection; "connection" call _strcasecmp test eax, eax jz short loc_19D8B mov rdi, [rbp+var_38] mov rsi, r13 mov rdx, rbx call _mariadb_set_conf_option loc_19D8B: xor r13d, r13d xor esi, esi jmp short loc_19D51 loc_19D92: xor ebx, ebx loc_19D94: test r13, r13 jnz short loc_19DA5 test eax, eax jz short loc_19DA2 mov r13, r12 jmp short loc_19DA5 loc_19DA2: xor r13d, r13d loc_19DA5: inc r12 loc_19DA8: cmp r12, r15 jbe loc_19C6B xor r14d, r14d test r13, r13 jz short loc_19DE9 mov rbx, rsi lea rsi, aConnection; "connection" mov rdi, r13 call _strcasecmp test eax, eax mov r12, [rbp+var_30] jz short loc_19E1E mov rdi, [rbp+var_38] mov rsi, r13 mov rdx, rbx call _mariadb_set_conf_option jmp short loc_19E1E loc_19DE4: xor r14d, r14d jmp short loc_19E1E loc_19DE9: mov r12, [rbp+var_30] jmp short loc_19E1E loc_19DEF: lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov rax, [rbp+var_30] sub r12, rax mov rdi, [rbp+var_38] mov esi, 1393h xor ecx, ecx mov r8, r12 mov r12, rax xor eax, eax call my_set_error mov r14d, 1 loc_19E1E: mov rdi, r12 call _free mov eax, r14d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long parse_connection_string(long long a1, long long a2, long long a3, long long a4) { long long v4; // r15 unsigned long long v6; // r12 unsigned long long v7; // r15 char v8; // bl _QWORD *v9; // r14 unsigned long long v10; // rsi unsigned long long v11; // r13 long long v12; // rax bool v13; // zf unsigned int v14; // r14d unsigned long long v15; // r8 unsigned long long v17; // [rsp+10h] [rbp-30h] v4 = a4; if ( a4 == -1 ) v4 = strlen(a3); v6 = malloc(v4 + 1); memcpy(v6, a3, v4); *(_BYTE *)(v6 + v4) = 0; if ( v4 < 0 ) { v14 = 0; goto LABEL_47; } v7 = v6 + v4; v8 = 0; v9 = (_QWORD *)__ctype_b_loc(); v10 = 0LL; v11 = 0LL; v17 = v6; do { v12 = *(char *)v6; if ( (*(_BYTE *)(*v9 + 2 * v12 + 1) & 0x20) != 0 && v8 == 0 ) goto LABEL_28; if ( (unsigned __int8)v12 > 0x7Au ) { if ( (unsigned __int8)v12 == 125 ) { if ( v8 ) { if ( !v11 ) goto LABEL_46; if ( v6 < v7 && *(_BYTE *)(v6 + 1) == 125 ) { memmove(v6, v6 + 1, v7 + ~v6); --v7; v6 += 2LL; goto LABEL_21; } *(_BYTE *)v6 = 0; LABEL_28: ++v6; LABEL_29: v8 = 0; continue; } v8 = 0; } else if ( (unsigned __int8)v12 == 123 ) { if ( !v11 ) goto LABEL_46; v13 = v8 == 0 && v6 < v7; v8 = 1; if ( v13 ) { ++v6; v8 = 1; v10 = v6; continue; } goto LABEL_39; } } else { if ( (unsigned __int8)v12 == 59 ) { if ( v8 ) { LABEL_20: ++v6; LABEL_21: v8 = 1; continue; } if ( !v11 ) { LABEL_46: v15 = v6 - v17; v6 = v17; my_set_error(a1, 5011, (long long)SQLSTATE_UNKNOWN, 0LL, v15); v14 = 1; goto LABEL_47; } *(_BYTE *)v6++ = 0; if ( (unsigned int)strcasecmp(v11, "connection") ) mariadb_set_conf_option(a1, v11, v10); v11 = 0LL; v10 = 0LL; goto LABEL_29; } if ( (unsigned __int8)v12 == 61 ) { if ( v8 ) goto LABEL_20; if ( !v11 ) goto LABEL_46; *(_BYTE *)v6++ = 0; if ( v6 < v7 ) v10 = v6; goto LABEL_29; } } if ( !v11 ) { if ( (_BYTE)v12 ) v11 = v6; else v11 = 0LL; } LABEL_39: ++v6; } while ( v6 <= v7 ); v14 = 0; if ( v11 ) { v6 = v17; if ( (unsigned int)strcasecmp(v11, "connection") ) mariadb_set_conf_option(a1, v11, v10); } else { v6 = v17; } LABEL_47: free(v6); return v14; }
parse_connection_string: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15,RCX MOV R14,RDX MOV RBX,RDI CMP RCX,-0x1 JNZ 0x00119c29 MOV RDI,R14 CALL 0x001131c0 MOV R15,RAX LAB_00119c29: LEA RDI,[R15 + 0x1] CALL 0x00113600 MOV R12,RAX MOV RDI,RAX MOV RSI,R14 MOV RDX,R15 CALL 0x00113390 MOV byte ptr [R12 + R15*0x1],0x0 TEST R15,R15 JS 0x00119de4 MOV qword ptr [RBP + -0x38],RBX ADD R15,R12 XOR EBX,EBX CALL 0x001134c0 MOV R14,RAX XOR ESI,ESI XOR R13D,R13D MOV qword ptr [RBP + -0x30],R12 LAB_00119c6b: MOV RCX,qword ptr [R14] MOVSX RAX,byte ptr [R12] TEST byte ptr [RCX + RAX*0x2 + 0x1],0x20 SETZ CL TEST BL,BL SETNZ DL OR DL,CL JZ 0x00119d4e MOVZX EAX,AL CMP EAX,0x7a JG 0x00119cbf CMP EAX,0x3b JZ 0x00119cf8 CMP EAX,0x3d JNZ 0x00119d94 TEST BL,BL JNZ 0x00119cfc TEST R13,R13 JZ 0x00119def MOV byte ptr [R12],0x0 INC R12 CMP R12,R15 CMOVC RSI,R12 JMP 0x00119d51 LAB_00119cbf: CMP EAX,0x7d JZ 0x00119d06 CMP EAX,0x7b JNZ 0x00119d94 TEST R13,R13 JZ 0x00119def TEST BL,BL SETNZ AL CMP R12,R15 SETNC CL OR CL,AL MOV BL,0x1 JNZ 0x00119da5 INC R12 MOV BL,0x1 MOV RSI,R12 JMP 0x00119da8 LAB_00119cf8: TEST BL,BL JZ 0x00119d55 LAB_00119cfc: INC R12 LAB_00119cff: MOV BL,0x1 JMP 0x00119da8 LAB_00119d06: TEST BL,BL JZ 0x00119d92 TEST R13,R13 JZ 0x00119def CMP R12,R15 JNC 0x00119d49 CMP byte ptr [R12 + 0x1],0x7d JNZ 0x00119d49 MOV RBX,RSI LEA RSI,[R12 + 0x1] MOV RDX,R12 NOT RDX ADD RDX,R15 MOV RDI,R12 CALL 0x00113720 MOV RSI,RBX DEC R15 ADD R12,0x2 JMP 0x00119cff LAB_00119d49: MOV byte ptr [R12],0x0 LAB_00119d4e: INC R12 LAB_00119d51: XOR EBX,EBX JMP 0x00119da8 LAB_00119d55: TEST R13,R13 JZ 0x00119def MOV RBX,RSI MOV byte ptr [R12],0x0 INC R12 MOV RDI,R13 LEA RSI,[0x139a8b] CALL 0x001134d0 TEST EAX,EAX JZ 0x00119d8b MOV RDI,qword ptr [RBP + -0x38] MOV RSI,R13 MOV RDX,RBX CALL 0x00119e38 LAB_00119d8b: XOR R13D,R13D XOR ESI,ESI JMP 0x00119d51 LAB_00119d92: XOR EBX,EBX LAB_00119d94: TEST R13,R13 JNZ 0x00119da5 TEST EAX,EAX JZ 0x00119da2 MOV R13,R12 JMP 0x00119da5 LAB_00119da2: XOR R13D,R13D LAB_00119da5: INC R12 LAB_00119da8: CMP R12,R15 JBE 0x00119c6b XOR R14D,R14D TEST R13,R13 JZ 0x00119de9 MOV RBX,RSI LEA RSI,[0x139a8b] MOV RDI,R13 CALL 0x001134d0 TEST EAX,EAX MOV R12,qword ptr [RBP + -0x30] JZ 0x00119e1e MOV RDI,qword ptr [RBP + -0x38] MOV RSI,R13 MOV RDX,RBX CALL 0x00119e38 JMP 0x00119e1e LAB_00119de4: XOR R14D,R14D JMP 0x00119e1e LAB_00119de9: MOV R12,qword ptr [RBP + -0x30] JMP 0x00119e1e LAB_00119def: LEA RAX,[0x14ed90] MOV RDX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x30] SUB R12,RAX MOV RDI,qword ptr [RBP + -0x38] MOV ESI,0x1393 XOR ECX,ECX MOV R8,R12 MOV R12,RAX XOR EAX,EAX CALL 0x0011916d MOV R14D,0x1 LAB_00119e1e: MOV RDI,R12 CALL 0x00113570 MOV EAX,R14D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 parse_connection_string(int8 param_1,int8 param_2,char *param_3,size_t param_4) { byte bVar1; bool bVar2; bool bVar3; int iVar4; byte *__dest; ushort **ppuVar5; byte *pbVar6; byte *__dest_00; byte *__s1; int8 uVar7; byte *pbVar8; if (param_4 == 0xffffffffffffffff) { param_4 = strlen(param_3); } __dest = (byte *)malloc(param_4 + 1); memcpy(__dest,param_3,param_4); __dest[param_4] = 0; if ((long)param_4 < 0) { uVar7 = 0; } else { pbVar8 = __dest + param_4; bVar2 = false; ppuVar5 = __ctype_b_loc(); pbVar6 = (byte *)0x0; __s1 = (byte *)0x0; __dest_00 = __dest; do { bVar1 = *__dest_00; if (!bVar2 && (*(byte *)((long)*ppuVar5 + (long)(char)bVar1 * 2 + 1) & 0x20) != 0) goto LAB_00119d51; if (bVar1 < 0x7b) { if (bVar1 == 0x3b) { if (bVar2) { LAB_00119cfc: __dest_00 = __dest_00 + 1; LAB_00119cff: bVar2 = true; goto LAB_00119da8; } if (__s1 == (byte *)0x0) goto LAB_00119def; *__dest_00 = 0; iVar4 = strcasecmp((char *)__s1,"connection"); if (iVar4 != 0) { _mariadb_set_conf_option(param_1,__s1,pbVar6); } __s1 = (byte *)0x0; pbVar6 = (byte *)0x0; } else { if (bVar1 != 0x3d) goto LAB_00119d94; if (bVar2) goto LAB_00119cfc; if (__s1 == (byte *)0x0) goto LAB_00119def; *__dest_00 = 0; if (__dest_00 + 1 < pbVar8) { pbVar6 = __dest_00 + 1; } } LAB_00119d51: bVar2 = false; __dest_00 = __dest_00 + 1; } else { if (bVar1 == 0x7d) { if (bVar2) { if (__s1 == (byte *)0x0) goto LAB_00119def; if ((pbVar8 <= __dest_00) || (__dest_00[1] != 0x7d)) { *__dest_00 = 0; goto LAB_00119d51; } memmove(__dest_00,__dest_00 + 1,(size_t)(pbVar8 + ~(ulong)__dest_00)); pbVar8 = pbVar8 + -1; __dest_00 = __dest_00 + 2; goto LAB_00119cff; } bVar2 = false; LAB_00119d94: if ((__s1 == (byte *)0x0) && (__s1 = __dest_00, bVar1 == 0)) { __s1 = (byte *)0x0; } } else { if (bVar1 != 0x7b) goto LAB_00119d94; if (__s1 == (byte *)0x0) { LAB_00119def: my_set_error(param_1,0x1393,SQLSTATE_UNKNOWN,0,(long)__dest_00 - (long)__dest); uVar7 = 1; goto LAB_00119e1e; } bVar3 = !bVar2; bVar2 = true; if (__dest_00 < pbVar8 && bVar3) { pbVar6 = __dest_00 + 1; bVar2 = true; __dest_00 = pbVar6; goto LAB_00119da8; } } __dest_00 = __dest_00 + 1; } LAB_00119da8: } while (__dest_00 <= pbVar8); uVar7 = 0; if ((__s1 != (byte *)0x0) && (iVar4 = strcasecmp((char *)__s1,"connection"), iVar4 != 0)) { _mariadb_set_conf_option(param_1,__s1,pbVar6); } } LAB_00119e1e: free(__dest); return uVar7; }
35,045
LefDefParser::defiNet::Init()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNet.cpp
void defiNet::Init() { name_ = 0; instances_ = 0; numPins_ = 0; numProps_ = 0; propNames_ = 0; subnets_ = 0; source_ = 0; pattern_ = 0; style_ = 0; shieldNet_ = 0; original_ = 0; use_ = 0; nonDefaultRule_ = 0; numWires_ = 0; wiresAllocated_ = 0; wires_= 0; numWidths_ = 0; widthsAllocated_ = 0; wlayers_ = 0; wdist_ = 0; numSpacing_ = 0; spacingAllocated_ = 0; slayers_ = 0; sdist_ = 0; sleft_ = 0; sright_ = 0; vpins_ = 0; numVpins_ = 0; vpinsAllocated_ = 0; shields_ = 0; numShields_ = 0; numNoShields_ = 0; shieldsAllocated_ = 0; numShieldNet_ = 0; shieldNetsAllocated_ = 0; bumpProps(2); bumpName(16); bumpPins(16); bumpSubnets(2); rectNames_ = 0; rectRouteStatus_ = 0; rectRouteStatusShieldNames_=0; rectShapeTypes_ = 0; rectMasks_ = 0; polygonNames_ = 0; polyRouteStatus_ = 0; polyShapeTypes_ = 0; polyRouteStatusShieldNames_ = 0; numPolys_ = 0; polysAllocated_ = 0; polygons_ = 0; polyMasks_ = 0; numSubnets_ = 0; paths_ = 0; numPaths_ = 0; numPts_ = 0; viaNames_ = 0; viaPts_ = 0; ptsAllocated_=0; viaMasks_ = 0; viaOrients_ = 0; viaRouteStatus_ = 0; viaShapeTypes_ = 0; viaRouteStatusShieldNames_ = 0; clear(); }
O3
cpp
LefDefParser::defiNet::Init(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx xorl %r14d, %r14d movq %r14, (%rdi) movq %r14, 0x18(%rdi) movl %r14d, 0xc(%rdi) movl %r14d, 0x44(%rdi) movq %r14, 0x48(%rdi) movq %r14, 0x70(%rdi) movq %r14, 0x88(%rdi) movq %r14, 0x168(%rdi) movq %r14, 0x134(%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0xa0(%rdi) movups %xmm0, 0xb0(%rdi) movl %r14d, 0xc0(%rdi) movups %xmm0, 0xe0(%rdi) movups %xmm0, 0xf0(%rdi) movups %xmm0, 0x100(%rdi) movups %xmm0, 0x110(%rdi) movups %xmm0, 0x120(%rdi) movups %xmm0, 0x140(%rdi) movups %xmm0, 0x150(%rdi) movl %r14d, 0x160(%rdi) movl $0x2, %esi callq 0x20c8a movq %rbx, %rdi movl $0x10, %esi callq 0x20d64 movq %rbx, %rdi movl $0x10, %esi callq 0x20d94 movq %rbx, %rdi movl $0x2, %esi callq 0x20e6a movq %r14, 0x1b8(%rbx) movq %r14, 0x178(%rbx) movl %r14d, 0x170(%rbx) movl %r14d, 0x180(%rbx) movl %r14d, 0x6c(%rbx) movq %r14, 0xc8(%rbx) movl %r14d, 0xd0(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x188(%rbx) movups %xmm0, 0x198(%rbx) movq %r14, 0x1a8(%rbx) movups %xmm0, 0x1e0(%rbx) movups %xmm0, 0x1f0(%rbx) movups %xmm0, 0x200(%rbx) movups %xmm0, 0x210(%rbx) movups %xmm0, 0x220(%rbx) movups %xmm0, 0x230(%rbx) movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x20eba
_ZN12LefDefParser7defiNet4InitEv: push r14 push rbx push rax mov rbx, rdi xor r14d, r14d mov [rdi], r14 mov [rdi+18h], r14 mov [rdi+0Ch], r14d mov [rdi+44h], r14d mov [rdi+48h], r14 mov [rdi+70h], r14 mov [rdi+88h], r14 mov [rdi+168h], r14 mov [rdi+134h], r14 xorps xmm0, xmm0 movups xmmword ptr [rdi+0A0h], xmm0 movups xmmword ptr [rdi+0B0h], xmm0 mov [rdi+0C0h], r14d movups xmmword ptr [rdi+0E0h], xmm0 movups xmmword ptr [rdi+0F0h], xmm0 movups xmmword ptr [rdi+100h], xmm0 movups xmmword ptr [rdi+110h], xmm0 movups xmmword ptr [rdi+120h], xmm0 movups xmmword ptr [rdi+140h], xmm0 movups xmmword ptr [rdi+150h], xmm0 mov [rdi+160h], r14d mov esi, 2; int call _ZN12LefDefParser7defiNet9bumpPropsEi; LefDefParser::defiNet::bumpProps(int) mov rdi, rbx; this mov esi, 10h; int call _ZN12LefDefParser7defiNet8bumpNameEi; LefDefParser::defiNet::bumpName(int) mov rdi, rbx; this mov esi, 10h; int call _ZN12LefDefParser7defiNet8bumpPinsEi; LefDefParser::defiNet::bumpPins(int) mov rdi, rbx; this mov esi, 2; int call _ZN12LefDefParser7defiNet11bumpSubnetsEi; LefDefParser::defiNet::bumpSubnets(int) mov [rbx+1B8h], r14 mov [rbx+178h], r14 mov [rbx+170h], r14d mov [rbx+180h], r14d mov [rbx+6Ch], r14d mov [rbx+0C8h], r14 mov [rbx+0D0h], r14d xorps xmm0, xmm0 movups xmmword ptr [rbx+188h], xmm0 movups xmmword ptr [rbx+198h], xmm0 mov [rbx+1A8h], r14 movups xmmword ptr [rbx+1E0h], xmm0 movups xmmword ptr [rbx+1F0h], xmm0 movups xmmword ptr [rbx+200h], xmm0 movups xmmword ptr [rbx+210h], xmm0 movups xmmword ptr [rbx+220h], xmm0 movups xmmword ptr [rbx+230h], xmm0 mov rdi, rbx; this add rsp, 8 pop rbx pop r14 jmp _ZN12LefDefParser7defiNet5clearEv; LefDefParser::defiNet::clear(void)
long long LefDefParser::defiNet::Init(LefDefParser::defiNet *this) { *(_QWORD *)this = 0LL; *((_QWORD *)this + 3) = 0LL; *((_DWORD *)this + 3) = 0; *((_DWORD *)this + 17) = 0; *((_QWORD *)this + 9) = 0LL; *((_QWORD *)this + 14) = 0LL; *((_QWORD *)this + 17) = 0LL; *((_QWORD *)this + 45) = 0LL; *(_QWORD *)((char *)this + 308) = 0LL; *((_OWORD *)this + 10) = 0LL; *((_OWORD *)this + 11) = 0LL; *((_DWORD *)this + 48) = 0; *((_OWORD *)this + 14) = 0LL; *((_OWORD *)this + 15) = 0LL; *((_OWORD *)this + 16) = 0LL; *((_OWORD *)this + 17) = 0LL; *((_OWORD *)this + 18) = 0LL; *((_OWORD *)this + 20) = 0LL; *((_OWORD *)this + 21) = 0LL; *((_DWORD *)this + 88) = 0; LefDefParser::defiNet::bumpProps(this, 2); LefDefParser::defiNet::bumpName(this, 16); LefDefParser::defiNet::bumpPins(this, 16); LefDefParser::defiNet::bumpSubnets(this, 2); *((_QWORD *)this + 55) = 0LL; *((_QWORD *)this + 47) = 0LL; *((_DWORD *)this + 92) = 0; *((_DWORD *)this + 96) = 0; *((_DWORD *)this + 27) = 0; *((_QWORD *)this + 25) = 0LL; *((_DWORD *)this + 52) = 0; *(_OWORD *)((char *)this + 392) = 0LL; *(_OWORD *)((char *)this + 408) = 0LL; *((_QWORD *)this + 53) = 0LL; *((_OWORD *)this + 30) = 0LL; *((_OWORD *)this + 31) = 0LL; *((_OWORD *)this + 32) = 0LL; *((_OWORD *)this + 33) = 0LL; *((_OWORD *)this + 34) = 0LL; *((_OWORD *)this + 35) = 0LL; return LefDefParser::defiNet::clear(this); }
Init: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI XOR R14D,R14D MOV qword ptr [RDI],R14 MOV qword ptr [RDI + 0x18],R14 MOV dword ptr [RDI + 0xc],R14D MOV dword ptr [RDI + 0x44],R14D MOV qword ptr [RDI + 0x48],R14 MOV qword ptr [RDI + 0x70],R14 MOV qword ptr [RDI + 0x88],R14 MOV qword ptr [RDI + 0x168],R14 MOV qword ptr [RDI + 0x134],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0xa0],XMM0 MOVUPS xmmword ptr [RDI + 0xb0],XMM0 MOV dword ptr [RDI + 0xc0],R14D MOVUPS xmmword ptr [RDI + 0xe0],XMM0 MOVUPS xmmword ptr [RDI + 0xf0],XMM0 MOVUPS xmmword ptr [RDI + 0x100],XMM0 MOVUPS xmmword ptr [RDI + 0x110],XMM0 MOVUPS xmmword ptr [RDI + 0x120],XMM0 MOVUPS xmmword ptr [RDI + 0x140],XMM0 MOVUPS xmmword ptr [RDI + 0x150],XMM0 MOV dword ptr [RDI + 0x160],R14D MOV ESI,0x2 CALL 0x00120c8a MOV RDI,RBX MOV ESI,0x10 CALL 0x00120d64 MOV RDI,RBX MOV ESI,0x10 CALL 0x00120d94 MOV RDI,RBX MOV ESI,0x2 CALL 0x00120e6a MOV qword ptr [RBX + 0x1b8],R14 MOV qword ptr [RBX + 0x178],R14 MOV dword ptr [RBX + 0x170],R14D MOV dword ptr [RBX + 0x180],R14D MOV dword ptr [RBX + 0x6c],R14D MOV qword ptr [RBX + 0xc8],R14 MOV dword ptr [RBX + 0xd0],R14D XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x188],XMM0 MOVUPS xmmword ptr [RBX + 0x198],XMM0 MOV qword ptr [RBX + 0x1a8],R14 MOVUPS xmmword ptr [RBX + 0x1e0],XMM0 MOVUPS xmmword ptr [RBX + 0x1f0],XMM0 MOVUPS xmmword ptr [RBX + 0x200],XMM0 MOVUPS xmmword ptr [RBX + 0x210],XMM0 MOVUPS xmmword ptr [RBX + 0x220],XMM0 MOVUPS xmmword ptr [RBX + 0x230],XMM0 MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x00120eba
/* LefDefParser::defiNet::Init() */ void __thiscall LefDefParser::defiNet::Init(defiNet *this) { *(int8 *)this = 0; *(int8 *)(this + 0x18) = 0; *(int4 *)(this + 0xc) = 0; *(int4 *)(this + 0x44) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x70) = 0; *(int8 *)(this + 0x88) = 0; *(int8 *)(this + 0x168) = 0; *(int8 *)(this + 0x134) = 0; *(int8 *)(this + 0xa0) = 0; *(int8 *)(this + 0xa8) = 0; *(int8 *)(this + 0xb0) = 0; *(int8 *)(this + 0xb8) = 0; *(int4 *)(this + 0xc0) = 0; *(int8 *)(this + 0xe0) = 0; *(int8 *)(this + 0xe8) = 0; *(int8 *)(this + 0xf0) = 0; *(int8 *)(this + 0xf8) = 0; *(int8 *)(this + 0x100) = 0; *(int8 *)(this + 0x108) = 0; *(int8 *)(this + 0x110) = 0; *(int8 *)(this + 0x118) = 0; *(int8 *)(this + 0x120) = 0; *(int8 *)(this + 0x128) = 0; *(int8 *)(this + 0x140) = 0; *(int8 *)(this + 0x148) = 0; *(int8 *)(this + 0x150) = 0; *(int8 *)(this + 0x158) = 0; *(int4 *)(this + 0x160) = 0; bumpProps(this,2); bumpName(this,0x10); bumpPins(this,0x10); bumpSubnets(this,2); *(int8 *)(this + 0x1b8) = 0; *(int8 *)(this + 0x178) = 0; *(int4 *)(this + 0x170) = 0; *(int4 *)(this + 0x180) = 0; *(int4 *)(this + 0x6c) = 0; *(int8 *)(this + 200) = 0; *(int4 *)(this + 0xd0) = 0; *(int8 *)(this + 0x188) = 0; *(int8 *)(this + 400) = 0; *(int8 *)(this + 0x198) = 0; *(int8 *)(this + 0x1a0) = 0; *(int8 *)(this + 0x1a8) = 0; *(int8 *)(this + 0x1e0) = 0; *(int8 *)(this + 0x1e8) = 0; *(int8 *)(this + 0x1f0) = 0; *(int8 *)(this + 0x1f8) = 0; *(int8 *)(this + 0x200) = 0; *(int8 *)(this + 0x208) = 0; *(int8 *)(this + 0x210) = 0; *(int8 *)(this + 0x218) = 0; *(int8 *)(this + 0x220) = 0; *(int8 *)(this + 0x228) = 0; *(int8 *)(this + 0x230) = 0; *(int8 *)(this + 0x238) = 0; clear(this); return; }
35,046
minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling)
monkey531[P]llama/common/minja.hpp
std::string consumeToken(const std::regex & regex, SpaceHandling space_handling = SpaceHandling::Strip) { auto start = it; consumeSpaces(space_handling); std::smatch match; if (std::regex_search(it, end, match, regex) && match.position() == 0) { it += match[0].length(); return match[0].str(); } it = start; return ""; }
O0
cpp
minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling): subq $0xb8, %rsp movq %rdi, 0x28(%rsp) movq %rdi, %rax movq %rax, 0x30(%rsp) movq %rdi, 0xb0(%rsp) movq %rsi, 0xa8(%rsp) movq %rdx, 0xa0(%rsp) movl %ecx, 0x9c(%rsp) movq 0xa8(%rsp), %rdi movq %rdi, 0x38(%rsp) movq 0x20(%rdi), %rax movq %rax, 0x90(%rsp) movl 0x9c(%rsp), %esi callq 0x10e520 leaq 0x70(%rsp), %rdi movq %rdi, 0x40(%rsp) callq 0xdd510 movq 0x38(%rsp), %rax movq 0x40(%rsp), %rdx movq 0x20(%rax), %rcx movq %rcx, 0x68(%rsp) movq 0x18(%rax), %rax movq %rax, 0x60(%rsp) movq 0xa0(%rsp), %rcx movq 0x68(%rsp), %rdi movq 0x60(%rsp), %rsi xorl %r8d, %r8d callq 0xdd550 movb %al, 0x4e(%rsp) jmp 0x10b953 movb 0x4e(%rsp), %al testb $0x1, %al jne 0x10b960 jmp 0x10b9f0 xorl %eax, %eax movl %eax, %esi leaq 0x70(%rsp), %rdi callq 0x10e2a0 movq %rax, 0x20(%rsp) jmp 0x10b975 movq 0x20(%rsp), %rax cmpq $0x0, %rax jne 0x10b9f0 xorl %eax, %eax movl %eax, %esi leaq 0x70(%rsp), %rdi callq 0xe5810 movq %rax, 0x18(%rsp) jmp 0x10b995 movq 0x18(%rsp), %rdi callq 0xe6ba0 movq 0x38(%rsp), %rdi movq %rax, %rsi addq $0x20, %rdi callq 0xa49d0 xorl %eax, %eax movl %eax, %esi leaq 0x70(%rsp), %rdi callq 0xe5810 movq %rax, 0x10(%rsp) jmp 0x10b9c5 movq 0x10(%rsp), %rsi movq 0x28(%rsp), %rdi callq 0xe6e90 jmp 0x10b9d6 movl $0x1, 0x50(%rsp) jmp 0x10ba56 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) jmp 0x10ba6d movq 0x38(%rsp), %rax movq 0x90(%rsp), %rcx movq %rcx, 0x20(%rax) leaq 0x4f(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x5b0d0 movq 0x28(%rsp), %rdi movq 0x8(%rsp), %rdx leaq 0x100858(%rip), %rsi # 0x20c279 callq 0x61fc0 jmp 0x10ba28 leaq 0x4f(%rsp), %rdi callq 0x5b530 movl $0x1, 0x50(%rsp) jmp 0x10ba56 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) leaq 0x4f(%rsp), %rdi callq 0x5b530 jmp 0x10ba6d leaq 0x70(%rsp), %rdi callq 0xdd660 movq 0x30(%rsp), %rax addq $0xb8, %rsp retq leaq 0x70(%rsp), %rdi callq 0xdd660 movq 0x58(%rsp), %rdi callq 0x5abc0 nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE: sub rsp, 0B8h mov [rsp+0B8h+var_90], rdi mov rax, rdi mov [rsp+0B8h+var_88], rax mov [rsp+0B8h+var_8], rdi mov [rsp+0B8h+var_10], rsi mov [rsp+0B8h+var_18], rdx mov [rsp+0B8h+var_1C], ecx mov rdi, [rsp+0B8h+var_10] mov [rsp+0B8h+var_80], rdi mov rax, [rdi+20h] mov [rsp+0B8h+var_28], rax mov esi, [rsp+0B8h+var_1C] call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling) lea rdi, [rsp+0B8h+var_48] mov [rsp+0B8h+var_78], rdi call _ZNSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEEC2Ev; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::match_results(void) mov rax, [rsp+0B8h+var_80] mov rdx, [rsp+0B8h+var_78] mov rcx, [rax+20h] mov [rsp+0B8h+var_50], rcx mov rax, [rax+18h] mov [rsp+0B8h+var_58], rax mov rcx, [rsp+0B8h+var_18] mov rdi, [rsp+0B8h+var_50] mov rsi, [rsp+0B8h+var_58] xor r8d, r8d call _ZSt12regex_searchIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS4_9sub_matchISA_EEEcNS4_12regex_traitsIcEEEbT_SG_RNS4_13match_resultsISG_T0_EERKNS4_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE; std::regex_search<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type) mov [rsp+0B8h+var_6A], al jmp short $+2 loc_10B953: mov al, [rsp+0B8h+var_6A] test al, 1 jnz short loc_10B960 jmp loc_10B9F0 loc_10B960: xor eax, eax mov esi, eax lea rdi, [rsp+0B8h+var_48] call _ZNKSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEE8positionEm; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::position(ulong) mov [rsp+0B8h+var_98], rax jmp short $+2 loc_10B975: mov rax, [rsp+0B8h+var_98] cmp rax, 0 jnz short loc_10B9F0 xor eax, eax mov esi, eax lea rdi, [rsp+0B8h+var_48] call _ZNKSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEEixEm; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::operator[](ulong) mov [rsp+0B8h+var_A0], rax jmp short $+2 loc_10B995: mov rdi, [rsp+0B8h+var_A0] call _ZNKSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEEE6lengthEv; std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::length(void) mov rdi, [rsp+0B8h+var_80] mov rsi, rax add rdi, 20h ; ' ' call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEpLEl; __gnu_cxx::__normal_iterator<char const*,std::string>::operator+=(long) xor eax, eax mov esi, eax lea rdi, [rsp+0B8h+var_48] call _ZNKSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEEixEm; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::operator[](ulong) mov [rsp+0B8h+var_A8], rax jmp short $+2 loc_10B9C5: mov rsi, [rsp+0B8h+var_A8] mov rdi, [rsp+0B8h+var_90] call _ZNKSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEEE3strEv; std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str(void) jmp short $+2 loc_10B9D6: mov [rsp+0B8h+var_68], 1 jmp short loc_10BA56 mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax jmp short loc_10BA6D loc_10B9F0: mov rax, [rsp+0B8h+var_80] mov rcx, [rsp+0B8h+var_28] mov [rax+20h], rcx lea rdi, [rsp+0B8h+var_69] mov [rsp+0B8h+var_B0], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rsp+0B8h+var_90] mov rdx, [rsp+0B8h+var_B0] lea rsi, aExampleSpecifi+27h; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_10BA28: lea rdi, [rsp+0B8h+var_69] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov [rsp+0B8h+var_68], 1 jmp short loc_10BA56 mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax lea rdi, [rsp+arg_47] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_10BA6D loc_10BA56: lea rdi, [rsp+0B8h+var_48] call _ZNSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEED2Ev; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::~match_results() mov rax, [rsp+0B8h+var_88] add rsp, 0B8h retn loc_10BA6D: lea rdi, [rsp+arg_68] call _ZNSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEED2Ev; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::~match_results() mov rdi, [rsp+arg_50] call __Unwind_Resume
long long minja::Parser::consumeToken(long long a1, long long a2, long long a3, unsigned int a4) { long long v4; // rax long long *v6; // [rsp+10h] [rbp-A8h] long long v7; // [rsp+18h] [rbp-A0h] char v8; // [rsp+4Fh] [rbp-69h] BYREF int v9; // [rsp+50h] [rbp-68h] long long v10; // [rsp+60h] [rbp-58h] long long v11; // [rsp+68h] [rbp-50h] _BYTE v12[32]; // [rsp+70h] [rbp-48h] BYREF long long v13; // [rsp+90h] [rbp-28h] unsigned int v14; // [rsp+9Ch] [rbp-1Ch] long long v15; // [rsp+A0h] [rbp-18h] long long v16; // [rsp+A8h] [rbp-10h] long long v17; // [rsp+B0h] [rbp-8h] v17 = a1; v16 = a2; v15 = a3; v14 = a4; v13 = *(_QWORD *)(a2 + 32); minja::Parser::consumeSpaces(a2, a4); std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::match_results((long long)v12); v11 = *(_QWORD *)(a2 + 32); v10 = *(_QWORD *)(a2 + 24); if ( (std::regex_search<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>( v11, v10, v12, v15, 0LL) & 1) == 0 || std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::position(v12, 0LL) ) { *(_QWORD *)(a2 + 32) = v13; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>(a1, (long long)"", (long long)&v8); std::allocator<char>::~allocator(&v8); v9 = 1; } else { v7 = std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::operator[]((long long)v12, 0LL); v4 = std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::length(v7); __gnu_cxx::__normal_iterator<char const*,std::string>::operator+=((_QWORD *)(a2 + 32), v4); v6 = (long long *)std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::operator[]( (long long)v12, 0LL); std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str(a1, v6); v9 = 1; } std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::~match_results((long long)v12); return a1; }
35,047
minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling)
monkey531[P]llama/common/minja.hpp
std::string consumeToken(const std::regex & regex, SpaceHandling space_handling = SpaceHandling::Strip) { auto start = it; consumeSpaces(space_handling); std::smatch match; if (std::regex_search(it, end, match, regex) && match.position() == 0) { it += match[0].length(); return match[0].str(); } it = start; return ""; }
O3
cpp
minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movq 0x20(%rsi), %r12 movq %rsi, %rdi movl %ecx, %esi callq 0x83e02 xorps %xmm0, %xmm0 movq %rsp, %rdx movaps %xmm0, 0x10(%rdx) movaps %xmm0, (%rdx) movq 0x18(%r14), %rsi movq 0x20(%r14), %rdi movq %r15, %rcx xorl %r8d, %r8d callq 0x6cf67 testb %al, %al je 0x83077 movq 0x18(%rsp), %rsi movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rcx, %rdx subq %rax, %rdx je 0x8305e movq (%rax), %r8 cmpq $0x48, %rdx jne 0x8306f cmpq %rsi, %r8 jne 0x83077 jmp 0x83065 cmpq %rsi, -0x48(%rax,%rdx) jne 0x83077 leaq (%rax,%rdx), %rdi addq $-0x48, %rdi jmp 0x830b9 movq %rax, %rdi cmpq %rsi, %r8 je 0x830b9 movq %r12, 0x20(%r14) leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x67a5d(%rip), %rdx # 0xeaae6 movq %rbx, %rdi movq %rdx, %rsi callq 0x214e2 movq (%rsp), %rdi testq %rdi, %rdi je 0x830aa movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0x1a8e0 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq 0x8(%rdi), %r8 subq %rsi, %r8 xorl %esi, %esi cmpb $0x0, 0x10(%rdi) cmovneq %r8, %rsi addq %rsi, 0x20(%r14) cmpq $0x48, %rdx leaq -0x48(%rax,%rdx), %rsi movq %rax, %rdx cmoveq %rsi, %rdx cmpq %rcx, %rax cmoveq %rsi, %rdx cmpb $0x1, 0x10(%rdx) jne 0x83103 movq (%rdx), %rsi movq 0x8(%rdx), %rdx leaq 0x10(%rbx), %rax movq %rax, (%rbx) movq %rbx, %rdi callq 0x6fb52 jmp 0x83094 leaq 0x10(%rbx), %rax movq %rax, (%rbx) movq $0x0, 0x8(%rbx) movb $0x0, 0x10(%rbx) jmp 0x83094 jmp 0x8311d movq %rax, %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0x83136 movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0x1a8e0 movq %rbx, %rdi callq 0x1afa0
_ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE: push r15 push r14 push r12 push rbx sub rsp, 28h mov r15, rdx mov r14, rsi mov rbx, rdi mov r12, [rsi+20h] mov rdi, rsi mov esi, ecx call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling) xorps xmm0, xmm0 mov rdx, rsp movaps xmmword ptr [rdx+10h], xmm0 movaps xmmword ptr [rdx], xmm0 mov rsi, [r14+18h] mov rdi, [r14+20h] mov rcx, r15 xor r8d, r8d call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEELNS_20_RegexExecutorPolicyE0ELb0EEEbT_SI_RNS5_13match_resultsISI_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type) test al, al jz short loc_83077 mov rsi, [rsp+48h+var_30] mov rax, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov rdx, rcx sub rdx, rax jz short loc_8305E mov r8, [rax] cmp rdx, 48h ; 'H' jnz short loc_8306F cmp r8, rsi jnz short loc_83077 jmp short loc_83065 loc_8305E: cmp [rax+rdx-48h], rsi jnz short loc_83077 loc_83065: lea rdi, [rax+rdx] add rdi, 0FFFFFFFFFFFFFFB8h jmp short loc_830B9 loc_8306F: mov rdi, rax cmp r8, rsi jz short loc_830B9 loc_83077: mov [r14+20h], r12 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_83094: mov rdi, [rsp+48h+var_48]; void * test rdi, rdi jz short loc_830AA mov rsi, [rsp+48h+var_38] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_830AA: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r14 pop r15 retn loc_830B9: mov r8, [rdi+8] sub r8, rsi xor esi, esi cmp byte ptr [rdi+10h], 0 cmovnz rsi, r8 add [r14+20h], rsi cmp rdx, 48h ; 'H' lea rsi, [rax+rdx-48h] mov rdx, rax cmovz rdx, rsi cmp rax, rcx cmovz rdx, rsi cmp byte ptr [rdx+10h], 1 jnz short loc_83103 mov rsi, [rdx] mov rdx, [rdx+8] lea rax, [rbx+10h] mov [rbx], rax mov rdi, rbx 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) jmp short loc_83094 loc_83103: lea rax, [rbx+10h] mov [rbx], rax mov qword ptr [rbx+8], 0 mov byte ptr [rbx+10h], 0 jmp loc_83094 jmp short $+2 loc_8311D: mov rbx, rax mov rdi, [rsp+0]; void * test rdi, rdi jz short loc_83136 mov rsi, [rsp+arg_8] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_83136: mov rdi, rbx call __Unwind_Resume
long long minja::Parser::consumeToken(long long a1, long long a2, long long a3, unsigned int a4) { long long v7; // r12 __int128 v8; // kr00_16 long long v9; // rdx long long v10; // r8 long long v11; // rdi long long v13; // rsi bool v14; // zf long long v15; // rsi long long v16; // rdx _BYTE *v17; // rsi long long v18; // rdx __int128 v19; // [rsp+0h] [rbp-48h] BYREF __int128 v20; // [rsp+10h] [rbp-38h] v7 = *(_QWORD *)(a2 + 32); minja::Parser::consumeSpaces(a2, a4); v20 = 0LL; v19 = 0LL; if ( !std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>( *(long long **)(a2 + 32), *(_QWORD *)(a2 + 24), (long long **)&v19, a3, 0) ) goto LABEL_9; v8 = v19; v9 = *((_QWORD *)&v19 + 1) - v19; if ( *((_QWORD *)&v19 + 1) != (_QWORD)v19 ) { v10 = *(_QWORD *)v19; if ( v9 == 72 ) { if ( v10 == *((_QWORD *)&v20 + 1) ) goto LABEL_7; } else { v11 = v19; if ( v10 == *((_QWORD *)&v20 + 1) ) goto LABEL_13; } LABEL_9: *(_QWORD *)(a2 + 32) = v7; *(_QWORD *)a1 = a1 + 16; std::string::_M_construct<char const*>(a1, "", (long long)""); goto LABEL_10; } if ( *(_QWORD *)(*((_QWORD *)&v19 + 1) - 72LL) != *((_QWORD *)&v20 + 1) ) goto LABEL_9; LABEL_7: v11 = *((_QWORD *)&v19 + 1) - 72LL; LABEL_13: v13 = 0LL; if ( *(_BYTE *)(v11 + 16) ) v13 = *(_QWORD *)(v11 + 8) - *((_QWORD *)&v20 + 1); *(_QWORD *)(a2 + 32) += v13; v14 = v9 == 72; v15 = v8 + v9 - 72; v16 = v8; if ( v14 ) v16 = v15; if ( (_QWORD)v8 == *((_QWORD *)&v8 + 1) ) v16 = v15; if ( *(_BYTE *)(v16 + 16) == 1 ) { v17 = *(_BYTE **)v16; v18 = *(_QWORD *)(v16 + 8); *(_QWORD *)a1 = a1 + 16; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(a1, v17, v18); } else { *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; } LABEL_10: if ( (_QWORD)v19 ) operator delete((void *)v19, v20 - v19); return a1; }
consumeToken: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV R12,qword ptr [RSI + 0x20] MOV RDI,RSI MOV ESI,ECX CALL 0x00183e02 XORPS XMM0,XMM0 MOV RDX,RSP MOVAPS xmmword ptr [RDX + 0x10],XMM0 MOVAPS xmmword ptr [RDX],XMM0 MOV RSI,qword ptr [R14 + 0x18] MOV RDI,qword ptr [R14 + 0x20] LAB_00183029: MOV RCX,R15 XOR R8D,R8D CALL 0x0016cf67 TEST AL,AL JZ 0x00183077 MOV RSI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV RDX,RCX SUB RDX,RAX JZ 0x0018305e MOV R8,qword ptr [RAX] CMP RDX,0x48 JNZ 0x0018306f CMP R8,RSI JNZ 0x00183077 JMP 0x00183065 LAB_0018305e: CMP qword ptr [RAX + RDX*0x1 + -0x48],RSI JNZ 0x00183077 LAB_00183065: LEA RDI,[RAX + RDX*0x1] ADD RDI,-0x48 JMP 0x001830b9 LAB_0018306f: MOV RDI,RAX CMP R8,RSI JZ 0x001830b9 LAB_00183077: MOV qword ptr [R14 + 0x20],R12 LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LAB_00183082: LEA RDX,[0x1eaae6] MOV RDI,RBX MOV RSI,RDX CALL 0x001214e2 LAB_00183094: MOV RDI,qword ptr [RSP] TEST RDI,RDI JZ 0x001830aa MOV RSI,qword ptr [RSP + 0x10] SUB RSI,RDI CALL 0x0011a8e0 LAB_001830aa: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R14 POP R15 RET LAB_001830b9: MOV R8,qword ptr [RDI + 0x8] SUB R8,RSI XOR ESI,ESI CMP byte ptr [RDI + 0x10],0x0 CMOVNZ RSI,R8 ADD qword ptr [R14 + 0x20],RSI CMP RDX,0x48 LEA RSI,[RAX + RDX*0x1 + -0x48] MOV RDX,RAX CMOVZ RDX,RSI CMP RAX,RCX CMOVZ RDX,RSI CMP byte ptr [RDX + 0x10],0x1 JNZ 0x00183103 MOV RSI,qword ptr [RDX] MOV RDX,qword ptr [RDX + 0x8] LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LAB_001830f9: MOV RDI,RBX CALL 0x0016fb52 LAB_00183101: JMP 0x00183094 LAB_00183103: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX MOV qword ptr [RBX + 0x8],0x0 MOV byte ptr [RBX + 0x10],0x0 JMP 0x00183094
/* minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char> > const&, minja::SpaceHandling) */ long * minja::Parser::consumeToken (long *param_1,Parser *param_2,int8 param_3,int4 param_4) { int8 uVar1; bool bVar2; long lVar3; long *plVar4; long lVar5; long *plVar6; long *local_48; long *plStack_40; long local_38; long lStack_30; uVar1 = *(int8 *)(param_2 + 0x20); consumeSpaces(param_2,param_4); local_38 = 0; lStack_30 = 0; local_48 = (long *)0x0; plStack_40 = (long *)0x0; /* try { // try from 00183029 to 00183033 has its CatchHandler @ 0018311d */ bVar2 = std::__detail:: __regex_algo_impl<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false> (*(int8 *)(param_2 + 0x20),*(int8 *)(param_2 + 0x18),&local_48, param_3,0); if (bVar2) { lVar3 = (long)plStack_40 - (long)local_48; if (lVar3 == 0) { lVar5 = local_48[-9]; joined_r0x00183063: if (lVar5 != lStack_30) goto LAB_00183077; plVar6 = (long *)((long)local_48 + lVar3 + -0x48); } else { lVar5 = *local_48; if (lVar3 == 0x48) goto joined_r0x00183063; plVar6 = local_48; if (lVar5 != lStack_30) goto LAB_00183077; } lVar5 = 0; if ((char)plVar6[2] != '\0') { lVar5 = plVar6[1] - lStack_30; } *(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + lVar5; plVar6 = (long *)((long)local_48 + lVar3 + -0x48); plVar4 = local_48; if (lVar3 == 0x48) { plVar4 = plVar6; } if (local_48 == plStack_40) { plVar4 = plVar6; } if ((char)plVar4[2] == '\x01') { lVar3 = *plVar4; lVar5 = plVar4[1]; *param_1 = (long)(param_1 + 2); /* try { // try from 001830f9 to 00183100 has its CatchHandler @ 0018311d */ std::__cxx11::string:: _M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>> (param_1,lVar3,lVar5); } else { *param_1 = (long)(param_1 + 2); param_1[1] = 0; *(int1 *)(param_1 + 2) = 0; } } else { LAB_00183077: *(int8 *)(param_2 + 0x20) = uVar1; *param_1 = (long)(param_1 + 2); /* try { // try from 00183082 to 00183093 has its CatchHandler @ 0018311b */ std::__cxx11::string::_M_construct<char_const*>(param_1,""); } if (local_48 != (long *)0x0) { operator_delete(local_48,local_38 - (long)local_48); } return param_1; }
35,048
MemoryManager::getByte(unsigned int, unsigned int*)
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MemoryManager.cpp
uint8_t MemoryManager::getByte(uint32_t addr, uint32_t *cycles) { if (!this->isAddrExist(addr)) { dbgprintf("Byte read to invalid addr 0x%x!\n", addr); return false; } if (this->cache != nullptr) { return this->cache->getByte(addr, cycles); } return this->memory[addr]; }
O0
cpp
MemoryManager::getByte(unsigned int, unsigned int*): subq $0x28, %rsp movq %rdi, 0x18(%rsp) movl %esi, 0x14(%rsp) movq %rdx, 0x8(%rsp) movq 0x18(%rsp), %rdi movq %rdi, (%rsp) movl 0x14(%rsp), %esi callq 0x1e830 testb $0x1, %al jne 0x1e9a1 movl 0x14(%rsp), %esi leaq 0xab93(%rip), %rdi # 0x29526 movb $0x0, %al callq 0x167d0 movb $0x0, 0x27(%rsp) jmp 0x1e9da movq (%rsp), %rax cmpq $0x0, 0x8(%rax) je 0x1e9c8 movq (%rsp), %rax movq 0x8(%rax), %rdi movl 0x14(%rsp), %esi movq 0x8(%rsp), %rdx callq 0x26090 movb %al, 0x27(%rsp) jmp 0x1e9da movq (%rsp), %rax movq (%rax), %rax movl 0x14(%rsp), %ecx movb (%rax,%rcx), %al movb %al, 0x27(%rsp) movb 0x27(%rsp), %al addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
_ZN13MemoryManager7getByteEjPj: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_14], esi mov [rsp+28h+var_20], rdx mov rdi, [rsp+28h+var_10]; this mov [rsp+28h+var_28], rdi mov esi, [rsp+28h+var_14]; unsigned int call _ZN13MemoryManager11isAddrExistEj; MemoryManager::isAddrExist(uint) test al, 1 jnz short loc_1E9A1 mov esi, [rsp+28h+var_14] lea rdi, aByteReadToInva; "Byte read to invalid addr 0x%x!\n" mov al, 0 call _Z9dbgprintfPKcz; dbgprintf(char const*,...) mov [rsp+28h+var_1], 0 jmp short loc_1E9DA loc_1E9A1: mov rax, [rsp+28h+var_28] cmp qword ptr [rax+8], 0 jz short loc_1E9C8 mov rax, [rsp+28h+var_28] mov rdi, [rax+8]; this mov esi, [rsp+28h+var_14]; unsigned int mov rdx, [rsp+28h+var_20]; unsigned int * call _ZN5Cache7getByteEjPj; Cache::getByte(uint,uint *) mov [rsp+28h+var_1], al jmp short loc_1E9DA loc_1E9C8: mov rax, [rsp+28h+var_28] mov rax, [rax] mov ecx, [rsp+28h+var_14] mov al, [rax+rcx] mov [rsp+28h+var_1], al loc_1E9DA: mov al, [rsp+28h+var_1] add rsp, 28h retn
char MemoryManager::getByte( Cache **this, unsigned int a2, unsigned int *a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { long long v11; // rdx long long v12; // rcx long long v13; // r8 long long v14; // r9 __m128 v15; // xmm4 __m128 v16; // xmm5 if ( MemoryManager::isAddrExist((MemoryManager *)this, a2) ) { if ( this[1] ) return Cache::getByte(this[1], a2, a3); else return *((_BYTE *)*this + a2); } else { dbgprintf( "Byte read to invalid addr 0x%x!\n", a2, v11, v12, v13, v14, a4, a5, a6, a7, v15, v16, a10, a11, (char)this); return 0; } }
getByte: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV dword ptr [RSP + 0x14],ESI MOV qword ptr [RSP + 0x8],RDX MOV RDI,qword ptr [RSP + 0x18] MOV qword ptr [RSP],RDI MOV ESI,dword ptr [RSP + 0x14] CALL 0x0011e830 TEST AL,0x1 JNZ 0x0011e9a1 MOV ESI,dword ptr [RSP + 0x14] LEA RDI,[0x129526] MOV AL,0x0 CALL 0x001167d0 MOV byte ptr [RSP + 0x27],0x0 JMP 0x0011e9da LAB_0011e9a1: MOV RAX,qword ptr [RSP] CMP qword ptr [RAX + 0x8],0x0 JZ 0x0011e9c8 MOV RAX,qword ptr [RSP] MOV RDI,qword ptr [RAX + 0x8] MOV ESI,dword ptr [RSP + 0x14] MOV RDX,qword ptr [RSP + 0x8] CALL 0x00126090 MOV byte ptr [RSP + 0x27],AL JMP 0x0011e9da LAB_0011e9c8: MOV RAX,qword ptr [RSP] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RSP + 0x14] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RSP + 0x27],AL LAB_0011e9da: MOV AL,byte ptr [RSP + 0x27] ADD RSP,0x28 RET
/* MemoryManager::getByte(unsigned int, unsigned int*) */ int8 __thiscall MemoryManager::getByte(MemoryManager *this,uint param_1,uint *param_2) { int1 extraout_AL; ulong uVar1; int7 extraout_var; int7 extraout_var_00; int7 uVar2; int1 local_1; uVar1 = isAddrExist(this,param_1); if ((uVar1 & 1) == 0) { dbgprintf("Byte read to invalid addr 0x%x!\n",(ulong)param_1); local_1 = 0; uVar2 = extraout_var; } else if (*(long *)(this + 8) == 0) { local_1 = *(int1 *)(*(long *)this + (ulong)param_1); uVar2 = (int7)((ulong)*(long *)this >> 8); } else { Cache::getByte(*(Cache **)(this + 8),param_1,param_2); uVar2 = extraout_var_00; local_1 = extraout_AL; } return CONCAT71(uVar2,local_1); }
35,049
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[](unsigned long) const
monkey531[P]llama/common/json.hpp
const_reference operator[](size_type idx) const { // const operator[] only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { return m_data.m_value.array->operator[](idx); } JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this)); }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const: pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x2, (%rdi) jne 0x7864b movq 0x8(%r14), %rax shlq $0x4, %rsi addq (%rax), %rsi movq %rsi, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x20 popq %rdi callq 0x24460 movq %rax, %rbx movq %r14, %rdi callq 0x434f0 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x3e5d3(%rip), %rsi # 0xb6c40 leaq 0x10(%rsp), %rdi callq 0x786ce movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x131, %esi # imm = 0x131 movq %r14, %rcx callq 0x63472 xorl %ebp, %ebp leaq 0x858a0(%rip), %rsi # 0xfdf38 leaq -0x3861f(%rip), %rdx # 0x40080 movq %rbx, %rdi callq 0x24ee0 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x251b8 testb %bpl, %bpl jne 0x786be jmp 0x786c6 movq %rax, %r14 movq %rbx, %rdi callq 0x24670 movq %r14, %rdi callq 0x24f60
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm: push rbp; char push r14; int push rbx; int sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 2 jnz short loc_7864B mov rax, [r14+8] shl rsi, 4 add rsi, [rax] mov rax, rsi add rsp, 30h pop rbx pop r14 pop rbp retn loc_7864B: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"... lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 131h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_786BE jmp short loc_786C6 mov r14, rax loc_786BE: mov rdi, rbx; void * call ___cxa_free_exception loc_786C6: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx _BYTE v4[56]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>( v4, "cannot use operator[] with a numeric argument with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 305, (long long)v4); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return **(_QWORD **)(a1 + 8) + 16 * a2; }
operator[]: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x2 JNZ 0x0017864b MOV RAX,qword ptr [R14 + 0x8] SHL RSI,0x4 ADD RSI,qword ptr [RAX] MOV RAX,RSI ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_0017864b: PUSH 0x20 POP RDI CALL 0x00124460 MOV RBX,RAX MOV RDI,R14 CALL 0x001434f0 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_00178666: LEA RSI,[0x1b6c40] LEA RDI,[RSP + 0x10] CALL 0x001786ce MOV BPL,0x1 LAB_0017867a: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x131 MOV RCX,R14 CALL 0x00163472 XOR EBP,EBP LEA RSI,[0x1fdf38] LEA RDX,[0x140080] MOV RDI,RBX CALL 0x00124ee0
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::operator[](unsigned long) const */ long __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,ulong param_1) { int8 uVar1; char *local_40; detail local_38 [32]; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { return param_1 * 0x10 + **(long **)(this + 8); } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 00178666 to 00178676 has its CatchHandler @ 001786bb */ detail::concat<std::__cxx11::string,char_const(&)[52],char_const*> (local_38,"cannot use operator[] with a numeric argument with ",&local_40); /* try { // try from 0017867a to 001786a6 has its CatchHandler @ 001786a7 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0x131,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); }
35,050
add_compiled_collation
eloqsql/mysys/charset.c
void add_compiled_collation(struct charset_info_st *cs) { DBUG_ASSERT(cs->number < array_elements(all_charsets)); all_charsets[cs->number]= cs; cs->state|= MY_CS_AVAILABLE; if ((my_hash_insert(&charset_name_hash, (uchar*) cs))) { #ifndef DBUG_OFF CHARSET_INFO *org= (CHARSET_INFO*) my_hash_search(&charset_name_hash, (uchar*) cs->cs_name.str, cs->cs_name.length); DBUG_ASSERT(org); DBUG_ASSERT(org->cs_name.str == cs->cs_name.str); DBUG_ASSERT(org->cs_name.length == strlen(cs->cs_name.str)); #endif } }
O0
c
add_compiled_collation: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) jmp 0xdd0ce movq -0x8(%rbp), %rdx movq -0x8(%rbp), %rax movl (%rax), %eax movl %eax, %ecx leaq 0xb9f63f(%rip), %rax # 0xc7c720 movq %rdx, (%rax,%rcx,8) movq -0x8(%rbp), %rax movl 0xc(%rax), %ecx orl $0x200, %ecx # imm = 0x200 movl %ecx, 0xc(%rax) movq -0x8(%rbp), %rsi leaq 0xba3620(%rip), %rdi # 0xc80720 callq 0xdfdc0 cmpb $0x0, %al je 0xdd10b jmp 0xdd10b addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
add_compiled_collation: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi jmp short $+2 loc_DD0CE: mov rdx, [rbp+var_8] mov rax, [rbp+var_8] mov eax, [rax] mov ecx, eax lea rax, all_charsets mov [rax+rcx*8], rdx mov rax, [rbp+var_8] mov ecx, [rax+0Ch] or ecx, 200h mov [rax+0Ch], ecx mov rsi, [rbp+var_8] lea rdi, charset_name_hash call my_hash_insert cmp al, 0 jz short loc_DD10B jmp short $+2 loc_DD10B: add rsp, 10h pop rbp retn
long long add_compiled_collation(unsigned int *a1) { all_charsets[*a1] = a1; a1[3] |= 0x200u; return my_hash_insert(&charset_name_hash, a1); }
add_compiled_collation: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI JMP 0x001dd0ce LAB_001dd0ce: MOV RDX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] MOV ECX,EAX LEA RAX,[0xd7c720] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0xc] OR ECX,0x200 MOV dword ptr [RAX + 0xc],ECX MOV RSI,qword ptr [RBP + -0x8] LEA RDI,[0xd80720] CALL 0x001dfdc0 CMP AL,0x0 JZ 0x001dd10b JMP 0x001dd10b LAB_001dd10b: ADD RSP,0x10 POP RBP RET
void add_compiled_collation(uint *param_1) { (&all_charsets)[*param_1] = param_1; param_1[3] = param_1[3] | 0x200; my_hash_insert(charset_name_hash,param_1); return; }
35,051
translog_purge_at_flush
eloqsql/storage/maria/ma_loghandler.c
my_bool translog_purge_at_flush() { uint32 i, min_file; int rc= 0; DBUG_ENTER("translog_purge_at_flush"); DBUG_ASSERT(translog_status == TRANSLOG_OK || translog_status == TRANSLOG_READONLY); if (unlikely(translog_status == TRANSLOG_READONLY)) { DBUG_PRINT("info", ("The log is read only => exit")); DBUG_RETURN(0); } if (log_purge_type != TRANSLOG_PURGE_ONDEMAND) { DBUG_PRINT("info", ("It is not \"at_flush\" => exit")); DBUG_RETURN(0); } mysql_mutex_lock(&log_descriptor.purger_lock); if (unlikely(log_descriptor.min_need_file == 0 || log_purge_disabled)) { DBUG_PRINT("info", ("No info about min need file => exit")); mysql_mutex_unlock(&log_descriptor.purger_lock); DBUG_RETURN(0); } min_file= translog_first_file(translog_get_horizon(), 1); DBUG_ASSERT(min_file != 0); /* log is already started */ for(i= min_file; i < log_descriptor.min_need_file && rc == 0; i++) { char path[FN_REFLEN], *file_name; DBUG_PRINT("info", ("purge file %lu\n", (ulong) i)); file_name= translog_filename_by_fileno(i, path); rc= MY_TEST(mysql_file_delete(key_file_translog, file_name, MYF(MY_WME))); } mysql_mutex_unlock(&log_descriptor.purger_lock); DBUG_RETURN(rc); }
O3
c
translog_purge_at_flush: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x268, %rsp # imm = 0x268 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) xorl %ebx, %ebx cmpl $0x2, 0x3af7a0(%rip) # 0x3fd5b0 je 0x4df26 cmpq $0x2, 0x3af77a(%rip) # 0x3fd598 jne 0x4df26 cmpq $0x0, 0xbb1854(%rip) # 0xbff680 jne 0x4df49 leaq 0xbb1807(%rip), %rdi # 0xbff640 callq 0x29220 cmpl $0x0, 0xbb17f3(%rip) # 0xbff638 je 0x4df53 cmpl $0x0, 0x3af73e(%rip) # 0x3fd590 jne 0x4df53 callq 0x4bf54 movq %rax, %rdi movl $0x1, %esi callq 0x4a3dc cmpl 0xbb17c8(%rip), %eax # 0xbff638 jae 0x4df05 movl %eax, %ebx leaq -0x230(%rbp), %r14 leaq 0x33818a(%rip), %r13 # 0x386010 leaq -0x288(%rbp), %r15 leaq -0x240(%rbp), %r12 movl %ebx, %edi movq %r14, %rsi callq 0x48abd leaq 0x3af26f(%rip), %rax # 0x3fd114 movl (%rax), %esi movq (%r13), %rax movq %r15, %rdi movl $0xe, %edx movq %r14, %rcx movq %r12, %r8 callq *0x148(%rax) movq %rax, -0x240(%rbp) testq %rax, %rax jne 0x4dee8 movl $0x10, %esi movq %r14, %rdi callq 0x9df38 incl %ebx cmpl 0xbb1758(%rip), %ebx # 0xbff638 jae 0x4df09 testl %eax, %eax je 0x4de94 jmp 0x4df09 movq %rax, %rdi movq %r14, %rsi movq %r12, %rdx leaq -0x234(%rbp), %rcx callq 0x2cc76 movl -0x234(%rbp), %eax jmp 0x4ded8 xorl %ebx, %ebx jmp 0x4df0e testl %eax, %eax setne %bl movq 0xbb176b(%rip), %rdi # 0xbff680 testq %rdi, %rdi jne 0x4df5c leaq 0xbb171f(%rip), %rdi # 0xbff640 callq 0x291e0 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x4df6e movl %ebx, %eax addq $0x268, %rsp # imm = 0x268 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x2cc59 jmp 0x4de3e callq 0x2cccd xorl %ebx, %ebx jmp 0x4df26 leaq 0x3380ad(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x4df1a callq 0x29270
translog_purge_at_flush: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 268h mov rax, fs:28h mov [rbp+var_30], rax xor ebx, ebx cmp cs:translog_status, 2 jz loc_4DF26 cmp cs:log_purge_type, 2 jnz loc_4DF26 cmp cs:qword_BFF680, 0 jnz loc_4DF49 lea rdi, unk_BFF640 call _pthread_mutex_lock loc_4DE3E: cmp dword ptr cs:qword_BFF638, 0 jz loc_4DF53 cmp cs:log_purge_disabled, 0 jnz loc_4DF53 call translog_get_horizon mov rdi, rax mov esi, 1 call translog_first_file cmp eax, dword ptr cs:qword_BFF638 jnb loc_4DF05 mov ebx, eax lea r14, [rbp+var_230] lea r13, PSI_server lea r15, [rbp+var_288] lea r12, [rbp+var_240] loc_4DE94: mov edi, ebx mov rsi, r14 call translog_filename_by_fileno lea rax, key_file_translog mov esi, [rax] mov rax, [r13+0] mov rdi, r15 mov edx, 0Eh mov rcx, r14 mov r8, r12 call qword ptr [rax+148h] mov [rbp+var_240], rax test rax, rax jnz short loc_4DEE8 mov esi, 10h mov rdi, r14 call my_delete loc_4DED8: inc ebx cmp ebx, dword ptr cs:qword_BFF638 jnb short loc_4DF09 test eax, eax jz short loc_4DE94 jmp short loc_4DF09 loc_4DEE8: mov rdi, rax mov rsi, r14 mov rdx, r12 lea rcx, [rbp+var_234] call translog_purge_at_flush_cold_2 mov eax, [rbp+var_234] jmp short loc_4DED8 loc_4DF05: xor ebx, ebx jmp short loc_4DF0E loc_4DF09: test eax, eax setnz bl loc_4DF0E: mov rdi, cs:qword_BFF680 test rdi, rdi jnz short loc_4DF5C loc_4DF1A: lea rdi, unk_BFF640 call _pthread_mutex_unlock loc_4DF26: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_4DF6E mov eax, ebx add rsp, 268h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4DF49: call translog_purge_at_flush_cold_1 jmp loc_4DE3E loc_4DF53: call translog_purge_at_flush_cold_3 xor ebx, ebx jmp short loc_4DF26 loc_4DF5C: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_4DF1A loc_4DF6E: call ___stack_chk_fail
long long translog_purge_at_flush() { unsigned int v0; // ebx unsigned long long horizon; // rax unsigned int file; // eax long long v3; // rdx long long v4; // rcx int v5; // r8d int v6; // r9d long long v7; // rax unsigned int v8; // eax _BYTE v10[72]; // [rsp+8h] [rbp-288h] BYREF long long v11; // [rsp+50h] [rbp-240h] BYREF unsigned int v12; // [rsp+5Ch] [rbp-234h] BYREF _BYTE v13[512]; // [rsp+60h] [rbp-230h] BYREF unsigned long long v14; // [rsp+260h] [rbp-30h] v14 = __readfsqword(0x28u); v0 = 0; if ( translog_status != 2 && log_purge_type == 2 ) { if ( qword_BFF680 ) translog_purge_at_flush_cold_1(); else pthread_mutex_lock(&unk_BFF640); if ( !(_DWORD)qword_BFF638 || log_purge_disabled ) { translog_purge_at_flush_cold_3(); return 0; } else { horizon = translog_get_horizon(); file = translog_first_file(horizon, 1); if ( file >= (unsigned int)qword_BFF638 ) { v0 = 0; } else { v0 = file; do { translog_filename_by_fileno(v0, (long long)v13, v3, v4, v5, v6); v7 = ((long long ( *)(_BYTE *, _QWORD, long long, _BYTE *, long long *))PSI_server[41])( v10, key_file_translog, 14LL, v13, &v11); v11 = v7; if ( v7 ) { translog_purge_at_flush_cold_2(v7, (long long)v13, &v11, &v12); v8 = v12; } else { v8 = my_delete(v13, 16LL); } ++v0; } while ( v0 < (unsigned int)qword_BFF638 && !v8 ); LOBYTE(v0) = v8 != 0; } if ( qword_BFF680 ) PSI_server[44](); pthread_mutex_unlock(&unk_BFF640); } } return v0; }
translog_purge_at_flush: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x268 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX XOR EBX,EBX CMP dword ptr [0x004fd5b0],0x2 JZ 0x0014df26 CMP qword ptr [0x004fd598],0x2 JNZ 0x0014df26 CMP qword ptr [0x00cff680],0x0 JNZ 0x0014df49 LEA RDI,[0xcff640] CALL 0x00129220 LAB_0014de3e: CMP dword ptr [0x00cff638],0x0 JZ 0x0014df53 CMP dword ptr [0x004fd590],0x0 JNZ 0x0014df53 CALL 0x0014bf54 MOV RDI,RAX MOV ESI,0x1 CALL 0x0014a3dc CMP EAX,dword ptr [0x00cff638] JNC 0x0014df05 MOV EBX,EAX LEA R14,[RBP + -0x230] LEA R13,[0x486010] LEA R15,[RBP + -0x288] LEA R12,[RBP + -0x240] LAB_0014de94: MOV EDI,EBX MOV RSI,R14 CALL 0x00148abd LEA RAX,[0x4fd114] MOV ESI,dword ptr [RAX] MOV RAX,qword ptr [R13] MOV RDI,R15 MOV EDX,0xe MOV RCX,R14 MOV R8,R12 CALL qword ptr [RAX + 0x148] MOV qword ptr [RBP + -0x240],RAX TEST RAX,RAX JNZ 0x0014dee8 MOV ESI,0x10 MOV RDI,R14 CALL 0x0019df38 LAB_0014ded8: INC EBX CMP EBX,dword ptr [0x00cff638] JNC 0x0014df09 TEST EAX,EAX JZ 0x0014de94 JMP 0x0014df09 LAB_0014dee8: MOV RDI,RAX MOV RSI,R14 MOV RDX,R12 LEA RCX,[RBP + -0x234] CALL 0x0012cc76 MOV EAX,dword ptr [RBP + -0x234] JMP 0x0014ded8 LAB_0014df05: XOR EBX,EBX JMP 0x0014df0e LAB_0014df09: TEST EAX,EAX SETNZ BL LAB_0014df0e: MOV RDI,qword ptr [0x00cff680] TEST RDI,RDI JNZ 0x0014df5c LAB_0014df1a: LEA RDI,[0xcff640] CALL 0x001291e0 LAB_0014df26: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0014df6e MOV EAX,EBX ADD RSP,0x268 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014df49: CALL 0x0012cc59 JMP 0x0014de3e LAB_0014df53: CALL 0x0012cccd XOR EBX,EBX JMP 0x0014df26 LAB_0014df5c: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0014df1a LAB_0014df6e: CALL 0x00129270
int4 translog_purge_at_flush(void) { uint uVar1; int iVar2; int8 uVar3; int4 uVar4; long in_FS_OFFSET; int1 local_290 [72]; long local_248; int local_23c; int1 local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar4 = 0; if ((translog_status != 2) && (log_purge_type == 2)) { if (DAT_00cff680 == 0) { pthread_mutex_lock((pthread_mutex_t *)&DAT_00cff640); } else { translog_purge_at_flush_cold_1(); } if ((DAT_00cff638 == 0) || (log_purge_disabled != 0)) { translog_purge_at_flush_cold_3(); uVar4 = 0; } else { uVar3 = translog_get_horizon(); uVar1 = translog_first_file(uVar3,1); if (uVar1 < DAT_00cff638) { do { translog_filename_by_fileno(uVar1,local_238); local_248 = (**(code **)(PSI_server + 0x148)) (local_290,key_file_translog,0xe,local_238,&local_248); if (local_248 == 0) { iVar2 = my_delete(local_238,0x10); } else { translog_purge_at_flush_cold_2(local_248,local_238,&local_248,&local_23c); iVar2 = local_23c; } uVar1 = uVar1 + 1; } while ((uVar1 < DAT_00cff638) && (iVar2 == 0)); uVar4 = CONCAT31((int3)(uVar1 >> 8),iVar2 != 0); } else { uVar4 = 0; } if (DAT_00cff680 != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)&DAT_00cff640); } } if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar4; }
35,052
pvio_socket_wait_io_or_timeout
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
int pvio_socket_wait_io_or_timeout(MARIADB_PVIO *pvio, my_bool is_read, int timeout) { int rc; struct st_pvio_socket *csock= NULL; #ifndef _WIN32 struct pollfd p_fd; #else struct timeval tv= {0,0}; fd_set fds, exc_fds; #endif if (!pvio || !pvio->data) return 0; if (pvio->mysql->options.extension && pvio->mysql->options.extension->io_wait != NULL) { my_socket handle; if (pvio_socket_get_handle(pvio, &handle)) return 0; return pvio->mysql->options.extension->io_wait(handle, is_read, timeout); } csock= (struct st_pvio_socket *)pvio->data; { #ifndef _WIN32 memset(&p_fd, 0, sizeof(p_fd)); p_fd.fd= csock->socket; p_fd.events= (is_read) ? POLLIN : POLLOUT; if (!timeout) timeout= -1; do { rc= poll(&p_fd, 1, timeout); } while (rc == -1 && errno == EINTR); if (rc == 0) errno= ETIMEDOUT; #else FD_ZERO(&fds); FD_ZERO(&exc_fds); FD_SET(csock->socket, &fds); FD_SET(csock->socket, &exc_fds); if (timeout >= 0) { tv.tv_sec= timeout / 1000; tv.tv_usec= (timeout % 1000) * 1000; } rc= select(0, (is_read) ? &fds : NULL, (is_read) ? NULL : &fds, &exc_fds, (timeout >= 0) ? &tv : NULL); if (rc == SOCKET_ERROR) { errno= WSAGetLastError(); } else if (rc == 0) { rc= SOCKET_ERROR; WSASetLastError(WSAETIMEDOUT); errno= ETIMEDOUT; } else if (FD_ISSET(csock->socket, &exc_fds)) { int err; int len = sizeof(int); if (getsockopt(csock->socket, SOL_SOCKET, SO_ERROR, (char *)&err, &len) != SOCKET_ERROR) { WSASetLastError(err); errno= err; } rc= SOCKET_ERROR; } #endif } return rc; }
O0
c
pvio_socket_wait_io_or_timeout: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movb %sil, %al movq %rdi, -0x10(%rbp) movb %al, -0x11(%rbp) movl %edx, -0x18(%rbp) movq $0x0, -0x28(%rbp) cmpq $0x0, -0x10(%rbp) je 0x5ba7e movq -0x10(%rbp), %rax cmpq $0x0, (%rax) jne 0x5ba8a movl $0x0, -0x4(%rbp) jmp 0x5bb94 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax cmpq $0x0, 0x480(%rax) je 0x5bafe movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq 0x480(%rax), %rax cmpq $0x0, 0x140(%rax) je 0x5bafe movq -0x10(%rbp), %rdi leaq -0x34(%rbp), %rsi callq 0x5ca80 cmpb $0x0, %al je 0x5bad2 movl $0x0, -0x4(%rbp) jmp 0x5bb94 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq 0x480(%rax), %rax movq 0x140(%rax), %rax movl -0x34(%rbp), %edi movb -0x11(%rbp), %cl movl -0x18(%rbp), %edx movsbl %cl, %esi callq *%rax movl %eax, -0x4(%rbp) jmp 0x5bb94 movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) leaq -0x30(%rbp), %rdi xorl %esi, %esi movl $0x8, %edx callq 0x14260 movq -0x28(%rbp), %rax movl (%rax), %eax movl %eax, -0x30(%rbp) movsbl -0x11(%rbp), %edx movl $0x4, %eax movl $0x1, %ecx cmpl $0x0, %edx cmovnel %ecx, %eax movw %ax, -0x2c(%rbp) cmpl $0x0, -0x18(%rbp) jne 0x5bb47 movl $0xffffffff, -0x18(%rbp) # imm = 0xFFFFFFFF jmp 0x5bb49 movl -0x18(%rbp), %edx leaq -0x30(%rbp), %rdi movl $0x1, %esi callq 0x146a0 movl %eax, -0x1c(%rbp) xorl %eax, %eax cmpl $-0x1, -0x1c(%rbp) movb %al, -0x35(%rbp) jne 0x5bb76 callq 0x14050 cmpl $0x4, (%rax) sete %al movb %al, -0x35(%rbp) movb -0x35(%rbp), %al testb $0x1, %al jne 0x5bb49 cmpl $0x0, -0x1c(%rbp) jne 0x5bb8e callq 0x14050 movl $0x6e, (%rax) movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax)
pvio_socket_wait_io_or_timeout: push rbp mov rbp, rsp sub rsp, 40h mov al, sil mov [rbp+var_10], rdi mov [rbp+var_11], al mov [rbp+var_18], edx mov [rbp+var_28], 0 cmp [rbp+var_10], 0 jz short loc_5BA7E mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jnz short loc_5BA8A loc_5BA7E: mov [rbp+var_4], 0 jmp loc_5BB94 loc_5BA8A: mov rax, [rbp+var_10] mov rax, [rax+40h] cmp qword ptr [rax+480h], 0 jz short loc_5BAFE mov rax, [rbp+var_10] mov rax, [rax+40h] mov rax, [rax+480h] cmp qword ptr [rax+140h], 0 jz short loc_5BAFE mov rdi, [rbp+var_10] lea rsi, [rbp+var_34] call pvio_socket_get_handle cmp al, 0 jz short loc_5BAD2 mov [rbp+var_4], 0 jmp loc_5BB94 loc_5BAD2: mov rax, [rbp+var_10] mov rax, [rax+40h] mov rax, [rax+480h] mov rax, [rax+140h] mov edi, [rbp+var_34] mov cl, [rbp+var_11] mov edx, [rbp+var_18] movsx esi, cl call rax mov [rbp+var_4], eax jmp loc_5BB94 loc_5BAFE: mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_28], rax lea rdi, [rbp+var_30] xor esi, esi mov edx, 8 call _memset mov rax, [rbp+var_28] mov eax, [rax] mov [rbp+var_30], eax movsx edx, [rbp+var_11] mov eax, 4 mov ecx, 1 cmp edx, 0 cmovnz eax, ecx mov [rbp+var_2C], ax cmp [rbp+var_18], 0 jnz short loc_5BB47 mov [rbp+var_18], 0FFFFFFFFh loc_5BB47: jmp short $+2 loc_5BB49: mov edx, [rbp+var_18] lea rdi, [rbp+var_30] mov esi, 1 call _poll mov [rbp+var_1C], eax xor eax, eax cmp [rbp+var_1C], 0FFFFFFFFh mov [rbp+var_35], al jnz short loc_5BB76 call ___errno_location cmp dword ptr [rax], 4 setz al mov [rbp+var_35], al loc_5BB76: mov al, [rbp+var_35] test al, 1 jnz short loc_5BB49 cmp [rbp+var_1C], 0 jnz short loc_5BB8E call ___errno_location mov dword ptr [rax], 6Eh ; 'n' loc_5BB8E: mov eax, [rbp+var_1C] mov [rbp+var_4], eax loc_5BB94: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long pvio_socket_wait_io_or_timeout(int **a1, char a2, unsigned int a3) { __int16 v3; // ax bool v5; // [rsp+Bh] [rbp-35h] unsigned int v6; // [rsp+Ch] [rbp-34h] BYREF int v7; // [rsp+10h] [rbp-30h] BYREF __int16 v8; // [rsp+14h] [rbp-2Ch] int *v9; // [rsp+18h] [rbp-28h] unsigned int v10; // [rsp+24h] [rbp-1Ch] unsigned int v11; // [rsp+28h] [rbp-18h] char v12; // [rsp+2Fh] [rbp-11h] int **v13; // [rsp+30h] [rbp-10h] v13 = a1; v12 = a2; v11 = a3; v9 = 0LL; if ( a1 && *v13 ) { if ( *((_QWORD *)v13[8] + 144) && *(_QWORD *)(*((_QWORD *)v13[8] + 144) + 320LL) ) { if ( (unsigned __int8)pvio_socket_get_handle(v13, &v6) ) return 0; else return (unsigned int)(*(long long ( **)(_QWORD, _QWORD, _QWORD))(*((_QWORD *)v13[8] + 144) + 320LL))( v6, (unsigned int)v12, v11); } else { v9 = *v13; memset(&v7, 0LL, 8LL); v7 = *v9; v3 = 4; if ( v12 ) v3 = 1; v8 = v3; if ( !v11 ) v11 = -1; do { v10 = poll(&v7, 1LL, v11); v5 = 0; if ( v10 == -1 ) v5 = *(_DWORD *)__errno_location(&v7) == 4; } while ( v5 ); if ( !v10 ) *(_DWORD *)__errno_location(&v7) = 110; return v10; } } else { return 0; } }
pvio_socket_wait_io_or_timeout: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV AL,SIL MOV qword ptr [RBP + -0x10],RDI MOV byte ptr [RBP + -0x11],AL MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x28],0x0 CMP qword ptr [RBP + -0x10],0x0 JZ 0x0015ba7e MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JNZ 0x0015ba8a LAB_0015ba7e: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0015bb94 LAB_0015ba8a: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] CMP qword ptr [RAX + 0x480],0x0 JZ 0x0015bafe MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RAX + 0x480] CMP qword ptr [RAX + 0x140],0x0 JZ 0x0015bafe MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x34] CALL 0x0015ca80 CMP AL,0x0 JZ 0x0015bad2 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0015bb94 LAB_0015bad2: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x140] MOV EDI,dword ptr [RBP + -0x34] MOV CL,byte ptr [RBP + -0x11] MOV EDX,dword ptr [RBP + -0x18] MOVSX ESI,CL CALL RAX MOV dword ptr [RBP + -0x4],EAX JMP 0x0015bb94 LAB_0015bafe: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX LEA RDI,[RBP + -0x30] XOR ESI,ESI MOV EDX,0x8 CALL 0x00114260 MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x30],EAX MOVSX EDX,byte ptr [RBP + -0x11] MOV EAX,0x4 MOV ECX,0x1 CMP EDX,0x0 CMOVNZ EAX,ECX MOV word ptr [RBP + -0x2c],AX CMP dword ptr [RBP + -0x18],0x0 JNZ 0x0015bb47 MOV dword ptr [RBP + -0x18],0xffffffff LAB_0015bb47: JMP 0x0015bb49 LAB_0015bb49: MOV EDX,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x30] MOV ESI,0x1 CALL 0x001146a0 MOV dword ptr [RBP + -0x1c],EAX XOR EAX,EAX CMP dword ptr [RBP + -0x1c],-0x1 MOV byte ptr [RBP + -0x35],AL JNZ 0x0015bb76 CALL 0x00114050 CMP dword ptr [RAX],0x4 SETZ AL MOV byte ptr [RBP + -0x35],AL LAB_0015bb76: MOV AL,byte ptr [RBP + -0x35] TEST AL,0x1 JNZ 0x0015bb49 CMP dword ptr [RBP + -0x1c],0x0 JNZ 0x0015bb8e CALL 0x00114050 MOV dword ptr [RAX],0x6e LAB_0015bb8e: MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x4],EAX LAB_0015bb94: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int pvio_socket_wait_io_or_timeout(long *param_1,char param_2,int param_3) { char cVar1; int *piVar2; bool bVar3; int4 local_3c; pollfd local_38; int *local_30; int local_24; int local_20; char local_19; long *local_18; int local_c; local_30 = (int *)0x0; if ((param_1 == (long *)0x0) || (*param_1 == 0)) { local_c = 0; } else { local_20 = param_3; local_19 = param_2; local_18 = param_1; if ((*(long *)(param_1[8] + 0x480) == 0) || (*(long *)(*(long *)(param_1[8] + 0x480) + 0x140) == 0)) { local_30 = (int *)*param_1; memset(&local_38,0,8); local_38.fd = *local_30; local_38.events = 4; if (local_19 != '\0') { local_38.events = 1; } if (local_20 == 0) { local_20 = -1; } do { local_24 = poll(&local_38,1,local_20); bVar3 = false; if (local_24 == -1) { piVar2 = __errno_location(); bVar3 = *piVar2 == 4; } } while (bVar3); if (local_24 == 0) { piVar2 = __errno_location(); *piVar2 = 0x6e; } local_c = local_24; } else { cVar1 = pvio_socket_get_handle(param_1,&local_3c); if (cVar1 == '\0') { local_c = (**(code **)(*(long *)(local_18[8] + 0x480) + 0x140)) (local_3c,(int)local_19,local_20,local_19); } else { local_c = 0; } } } return local_c; }
35,053
my_hash_init2
eloqsql/mysys/hash.c
my_bool my_hash_init2(PSI_memory_key psi_key, HASH *hash, uint growth_size, CHARSET_INFO *charset, ulong size, size_t key_offset, size_t key_length, my_hash_get_key get_key, my_hash_function hash_function, void (*free_element)(void*), uint flags) { my_bool res; DBUG_ENTER("my_hash_init2"); DBUG_PRINT("enter",("hash:%p size: %u", hash, (uint) size)); hash->records=0; hash->key_offset=key_offset; hash->key_length=key_length; hash->blength=1; hash->get_key=get_key; hash->hash_function= hash_function ? hash_function : my_hash_sort; hash->free=free_element; hash->flags=flags; hash->charset=charset; res= init_dynamic_array2(psi_key, &hash->array, sizeof(HASH_LINK), NULL, size, growth_size, MYF((flags & HASH_THREAD_SPECIFIC ? MY_THREAD_SPECIFIC : 0))); DBUG_RETURN(res); }
O0
c
my_hash_init2: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl 0x30(%rbp), %eax movq 0x28(%rbp), %rax movq 0x20(%rbp), %rax movq 0x18(%rbp), %rax movq 0x10(%rbp), %rax movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) jmp 0xdf223 movq -0x10(%rbp), %rax movq $0x0, 0x18(%rax) movq -0x30(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq 0x10(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movq $0x1, 0x10(%rax) movq 0x18(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x50(%rax) cmpq $0x0, 0x20(%rbp) je 0xdf26f movq 0x20(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0xdf27c leaq -0x126(%rip), %rax # 0xdf150 movq %rax, -0x40(%rbp) jmp 0xdf27c movq -0x40(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x58(%rax) movq 0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x60(%rax) movl 0x30(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x20(%rax) movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x68(%rax) movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi addq $0x28, %rsi movq -0x28(%rbp), %rax movl %eax, %r8d movl -0x14(%rbp), %r9d movl 0x30(%rbp), %edx andl $0x2, %edx xorl %eax, %eax movl $0x10000, %ecx # imm = 0x10000 cmpl $0x0, %edx cmovnel %ecx, %eax movl %eax, %eax movl $0x10, %edx xorl %ecx, %ecx movq %rax, (%rsp) callq 0xdbb90 movb %al, -0x31(%rbp) movb -0x31(%rbp), %al movb %al, -0x41(%rbp) movb -0x41(%rbp), %al addq $0x50, %rsp popq %rbp retq nopw (%rax,%rax)
my_hash_init2: push rbp mov rbp, rsp sub rsp, 50h mov eax, [rbp+arg_20] mov rax, [rbp+arg_18] mov rax, [rbp+arg_10] mov rax, [rbp+arg_8] mov rax, [rbp+arg_0] mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 jmp short $+2 loc_DF223: mov rax, [rbp+var_10] mov qword ptr [rax+18h], 0 mov rcx, [rbp+var_30] mov rax, [rbp+var_10] mov [rax], rcx mov rcx, [rbp+arg_0] mov rax, [rbp+var_10] mov [rax+8], rcx mov rax, [rbp+var_10] mov qword ptr [rax+10h], 1 mov rcx, [rbp+arg_8] mov rax, [rbp+var_10] mov [rax+50h], rcx cmp [rbp+arg_10], 0 jz short loc_DF26F mov rax, [rbp+arg_10] mov [rbp+var_40], rax jmp short loc_DF27C loc_DF26F: lea rax, my_hash_sort mov [rbp+var_40], rax jmp short $+2 loc_DF27C: mov rcx, [rbp+var_40] mov rax, [rbp+var_10] mov [rax+58h], rcx mov rcx, [rbp+arg_18] mov rax, [rbp+var_10] mov [rax+60h], rcx mov ecx, [rbp+arg_20] mov rax, [rbp+var_10] mov [rax+20h], ecx mov rcx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax+68h], rcx mov edi, [rbp+var_4] mov rsi, [rbp+var_10] add rsi, 28h ; '(' mov rax, [rbp+var_28] mov r8d, eax mov r9d, [rbp+var_14] mov edx, [rbp+arg_20] and edx, 2 xor eax, eax mov ecx, 10000h cmp edx, 0 cmovnz eax, ecx mov eax, eax mov edx, 10h xor ecx, ecx mov [rsp+50h+var_50], rax call init_dynamic_array2 mov [rbp+var_31], al mov al, [rbp+var_31] mov [rbp+var_41], al mov al, [rbp+var_41] add rsp, 50h pop rbp retn
char my_hash_init2( unsigned int a1, long long a2, int a3, long long a4, unsigned int a5, long long a6, long long a7, long long a8, long long ( *a9)(long long a1, long long a2, long long a3), long long a10, int a11) { long long v11; // rsi unsigned int v12; // eax long long ( *v14)(long long, long long, long long); // [rsp+10h] [rbp-40h] *(_QWORD *)(a2 + 24) = 0LL; *(_QWORD *)a2 = a6; *(_QWORD *)(a2 + 8) = a7; *(_QWORD *)(a2 + 16) = 1LL; *(_QWORD *)(a2 + 80) = a8; if ( a9 ) v14 = a9; else v14 = my_hash_sort; *(_QWORD *)(a2 + 88) = v14; *(_QWORD *)(a2 + 96) = a10; *(_DWORD *)(a2 + 32) = a11; *(_QWORD *)(a2 + 104) = a4; v11 = a2 + 40; v12 = 0; if ( (a11 & 2) != 0 ) v12 = 0x10000; return init_dynamic_array2(a1, v11, 0x10u, 0LL, a5, a3, v12); }
my_hash_init2: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV EAX,dword ptr [RBP + 0x30] MOV RAX,qword ptr [RBP + 0x28] MOV RAX,qword ptr [RBP + 0x20] MOV RAX,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + 0x10] MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 JMP 0x001df223 LAB_001df223: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],0x0 MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + 0x10] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],0x1 MOV RCX,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x50],RCX CMP qword ptr [RBP + 0x20],0x0 JZ 0x001df26f MOV RAX,qword ptr [RBP + 0x20] MOV qword ptr [RBP + -0x40],RAX JMP 0x001df27c LAB_001df26f: LEA RAX,[0x1df150] MOV qword ptr [RBP + -0x40],RAX JMP 0x001df27c LAB_001df27c: MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x58],RCX MOV RCX,qword ptr [RBP + 0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x60],RCX MOV ECX,dword ptr [RBP + 0x30] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x20],ECX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x68],RCX MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x28 MOV RAX,qword ptr [RBP + -0x28] MOV R8D,EAX MOV R9D,dword ptr [RBP + -0x14] MOV EDX,dword ptr [RBP + 0x30] AND EDX,0x2 XOR EAX,EAX MOV ECX,0x10000 CMP EDX,0x0 CMOVNZ EAX,ECX MOV EAX,EAX MOV EDX,0x10 XOR ECX,ECX MOV qword ptr [RSP],RAX CALL 0x001dbb90 MOV byte ptr [RBP + -0x31],AL MOV AL,byte ptr [RBP + -0x31] MOV byte ptr [RBP + -0x41],AL MOV AL,byte ptr [RBP + -0x41] ADD RSP,0x50 POP RBP RET
int8 my_hash_init2(int4 param_1,int8 *param_2,int4 param_3,int8 param_4, int4 param_5,int8 param_6,int8 param_7,int8 param_8, code *param_9,int8 param_10,uint param_11) { int4 uVar1; int8 uVar2; code *local_48; param_2[3] = 0; *param_2 = param_6; param_2[1] = param_7; param_2[2] = 1; param_2[10] = param_8; if (param_9 == (code *)0x0) { local_48 = my_hash_sort; } else { local_48 = param_9; } param_2[0xb] = local_48; param_2[0xc] = param_10; *(uint *)(param_2 + 4) = param_11; param_2[0xd] = param_4; uVar1 = 0; if ((param_11 & 2) != 0) { uVar1 = 0x10000; } uVar2 = init_dynamic_array2(param_1,param_2 + 5,0x10,0,param_5,param_3,uVar1); return uVar2; }
35,054
gguf_set_arr_str
monkey531[P]llama/ggml/src/gguf.cpp
void gguf_set_arr_str(struct gguf_context * ctx, const char * key, const char ** data, size_t n) { gguf_check_reserved_keys(key, data); gguf_remove_key(ctx, key); std::vector<std::string> tmp(n); for (size_t i = 0; i < n; ++i) { tmp[i] = data[i]; } ctx->kv.emplace_back(key, tmp); }
O2
cpp
gguf_set_arr_str: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x30, %rsp movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx movq %rsi, 0x28(%rsp) leaq 0x8(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0x1e810 leaq 0x1a6e8(%rip), %rsi # 0x5a871 leaq 0x8(%rsp), %rdi callq 0x1ef90 testb %al, %al jne 0x40211 leaq 0x8(%rsp), %rdi callq 0x1c990 movq %rbx, %rdi movq %r12, %rsi callq 0x1dee0 leaq 0x8(%rsp), %rdi leaq 0x7(%rsp), %rdx movq %r14, %rsi callq 0x1c7f0 xorl %r12d, %r12d xorl %r13d, %r13d cmpq %r13, %r14 je 0x401e3 movq (%r15,%r13,8), %rsi movq 0x8(%rsp), %rdi addq %r12, %rdi callq 0x1ee10 incq %r13 addq $0x20, %r12 jmp 0x401c4 addq $0x8, %rbx leaq 0x28(%rsp), %rsi leaq 0x8(%rsp), %rdx movq %rbx, %rdi callq 0x1d130 leaq 0x8(%rsp), %rdi callq 0x1d0b0 addq $0x30, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq leaq 0x1a5ed(%rip), %rdi # 0x5a805 leaq 0x1ae46(%rip), %rdx # 0x5b065 movl $0x3a7, %esi # imm = 0x3A7 xorl %eax, %eax callq 0x1e760 jmp 0x40243 jmp 0x4023e movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x1c990 jmp 0x40250 movq %rax, %rbx jmp 0x40250 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x1d0b0 movq %rbx, %rdi callq 0x1e9a0
gguf_set_arr_str: push r15 push r14 push r13 push r12 push rbx sub rsp, 30h mov r14, rcx mov r15, rdx mov r12, rsi mov rbx, rdi mov [rsp+58h+var_30], rsi lea rdi, [rsp+58h+var_50] lea rdx, [rsp+58h+var_51] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, aGeneralAlignme; "general.alignment" lea rdi, [rsp+58h+var_50] call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jnz short loc_40211 lea rdi, [rsp+58h+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx mov rsi, r12 call _gguf_remove_key lea rdi, [rsp+58h+var_50] lea rdx, [rsp+58h+var_51] mov rsi, r14 call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2EmRKS6_; std::vector<std::string>::vector(ulong,std::allocator<std::string> const&) xor r12d, r12d xor r13d, r13d loc_401C4: cmp r14, r13 jz short loc_401E3 mov rsi, [r15+r13*8] mov rdi, [rsp+58h+var_50] add rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*) inc r13 add r12, 20h ; ' ' jmp short loc_401C4 loc_401E3: add rbx, 8 lea rsi, [rsp+58h+var_30] lea rdx, [rsp+58h+var_50] mov rdi, rbx call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcRS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISC_EEEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,std::vector&<std::string,std::allocator<std::allocator<char>>>>(char const*&,std::vector&<std::string,std::allocator<std::allocator<char>>> &&) lea rdi, [rsp+58h+var_50] call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() add rsp, 30h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_40211: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGeneralAlignme_0; "general.alignment must be type u32" mov esi, 3A7h xor eax, eax call _ggml_abort jmp short loc_40243 jmp short loc_4023E mov rbx, rax lea rdi, [rsp+58h+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_40250 loc_4023E: mov rbx, rax jmp short loc_40250 loc_40243: mov rbx, rax lea rdi, [rsp+58h+var_50] call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_40250: mov rdi, rbx call __Unwind_Resume
long long gguf_set_arr_str( long long a1, long long a2, long long a3, long long a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, double a9, double a10, __m128 a11, __m128 a12) { long long v14; // rcx long long v15; // r8 long long v16; // r9 __m128 v17; // xmm4 __m128 v18; // xmm5 long long v19; // rdx long long v20; // r12 long long i; // r13 char v23; // [rsp+0h] [rbp-58h] char v24; // [rsp+7h] [rbp-51h] BYREF _QWORD v25[4]; // [rsp+8h] [rbp-50h] BYREF long long v26[6]; // [rsp+28h] [rbp-30h] BYREF v26[0] = a2; std::string::basic_string<std::allocator<char>>(v25, a2, &v24); if ( (unsigned __int8)std::operator==<char>(v25, "general.alignment") ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/gguf.cpp", 935, (long long)"general.alignment must be type u32", v14, v15, v16, a5, a6, a7, a8, v17, v18, a11, a12, v23); std::string::~string(v25); gguf_remove_key(a1, a2, v19); std::vector<std::string>::vector(v25, a4, &v24); v20 = 0LL; for ( i = 0LL; a4 != i; ++i ) { std::string::assign(v20 + v25[0], *(_QWORD *)(a3 + 8 * i)); v20 += 32LL; } std::vector<gguf_kv>::emplace_back<char const*&,std::vector&<std::string,std::allocator<std::allocator<char>>>>( a1 + 8, v26, v25); return std::vector<std::string>::~vector(v25); }
gguf_set_arr_str: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x30 MOV R14,RCX MOV R15,RDX MOV R12,RSI MOV RBX,RDI MOV qword ptr [RSP + 0x28],RSI LAB_00140173: LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x7] CALL 0x0011e810 LAB_00140182: LEA RSI,[0x15a871] LEA RDI,[RSP + 0x8] CALL 0x0011ef90 TEST AL,AL JNZ 0x00140211 LEA RDI,[RSP + 0x8] CALL 0x0011c990 MOV RDI,RBX MOV RSI,R12 CALL 0x0011dee0 LAB_001401ac: LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x7] MOV RSI,R14 CALL 0x0011c7f0 XOR R12D,R12D XOR R13D,R13D LAB_001401c4: CMP R14,R13 JZ 0x001401e3 MOV RSI,qword ptr [R15 + R13*0x8] MOV RDI,qword ptr [RSP + 0x8] ADD RDI,R12 LAB_001401d5: CALL 0x0011ee10 INC R13 ADD R12,0x20 JMP 0x001401c4 LAB_001401e3: ADD RBX,0x8 LAB_001401e7: LEA RSI,[RSP + 0x28] LEA RDX,[RSP + 0x8] MOV RDI,RBX CALL 0x0011d130 LEA RDI,[RSP + 0x8] CALL 0x0011d0b0 ADD RSP,0x30 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_00140211: LEA RDI,[0x15a805] LEA RDX,[0x15b065] MOV ESI,0x3a7 XOR EAX,EAX CALL 0x0011e760
void gguf_set_arr_str(long param_1,char *param_2,int8 param_3,ulong param_4) { bool bVar1; long lVar2; ulong uVar3; allocator local_51; long local_50 [4]; char *local_30; /* try { // try from 00140173 to 00140181 has its CatchHandler @ 0014023e */ local_30 = param_2; std::__cxx11::string::string<std::allocator<char>>((string *)local_50,param_2,&local_51); bVar1 = std::operator==((string *)local_50,"general.alignment"); if (!bVar1) { std::__cxx11::string::~string((string *)local_50); gguf_remove_key(param_1,param_2); /* try { // try from 001401ac to 001401bd has its CatchHandler @ 0014022d */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_50,param_4 ,&local_51); lVar2 = 0; for (uVar3 = 0; param_4 != uVar3; uVar3 = uVar3 + 1) { /* try { // try from 001401d5 to 001401d9 has its CatchHandler @ 00140243 */ std::__cxx11::string::assign((char *)(local_50[0] + lVar2)); lVar2 = lVar2 + 0x20; } /* try { // try from 001401e7 to 001401f8 has its CatchHandler @ 0014022b */ std::vector<gguf_kv,std::allocator<gguf_kv>>:: emplace_back<char_const*&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>&> ((vector<gguf_kv,std::allocator<gguf_kv>> *)(param_1 + 8),&local_30,(vector *)local_50 ); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_50); return; } /* try { // try from 00140211 to 0014022a has its CatchHandler @ 0014022f */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/gguf.cpp",0x3a7, "general.alignment must be type u32"); }
35,055
curl_needs_openssl_locking
eloqsql/storage/maria/libmarias3/src/marias3.c
static int curl_needs_openssl_locking() { curl_version_info_data *data = curl_version_info(CURLVERSION_NOW); if (data->ssl_version == NULL) { return 0; } if (strncmp(data->ssl_version, "OpenSSL", 7) != 0) { return 0; } if (data->ssl_version[8] == '0') { return 1; } if ((data->ssl_version[8] == '1') && (data->ssl_version[10] == '0')) { openssl_set_id_callback = dlsym(RTLD_DEFAULT, "CRYPTO_set_id_callback"); openssl_set_locking_callback = dlsym(RTLD_DEFAULT, "CRYPTO_set_locking_callback"); openssl_num_locks = dlsym(RTLD_DEFAULT, "CRYPTO_num_locks"); return openssl_set_id_callback != NULL && openssl_set_locking_callback != NULL && openssl_num_locks != NULL; } return 0; }
O0
c
curl_needs_openssl_locking: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl $0xa, %edi callq 0x278d0 movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x28(%rax) jne 0x2d5ad movl $0x0, -0x4(%rbp) jmp 0x2d69f movq -0x10(%rbp), %rax movq 0x28(%rax), %rdi leaq 0xf05e7(%rip), %rsi # 0x11dba3 movl $0x7, %edx callq 0x27230 cmpl $0x0, %eax je 0x2d5d7 movl $0x0, -0x4(%rbp) jmp 0x2d69f movq -0x10(%rbp), %rax movq 0x28(%rax), %rax movsbl 0x8(%rax), %eax cmpl $0x30, %eax jne 0x2d5f4 movl $0x1, -0x4(%rbp) jmp 0x2d69f movq -0x10(%rbp), %rax movq 0x28(%rax), %rax movsbl 0x8(%rax), %eax cmpl $0x31, %eax jne 0x2d698 movq -0x10(%rbp), %rax movq 0x28(%rax), %rax movsbl 0xa(%rax), %eax cmpl $0x30, %eax jne 0x2d698 xorl %eax, %eax movl %eax, %edi leaq 0xf0586(%rip), %rsi # 0x11dbab callq 0x271c0 movq %rax, 0x412c2f(%rip) # 0x440260 xorl %eax, %eax movl %eax, %edi leaq 0xf0586(%rip), %rsi # 0x11dbc2 callq 0x271c0 movq %rax, 0x412c20(%rip) # 0x440268 xorl %eax, %eax movl %eax, %edi leaq 0xf058b(%rip), %rsi # 0x11dbde callq 0x271c0 movq %rax, 0x412bf1(%rip) # 0x440250 xorl %eax, %eax cmpq $0x0, 0x412bf7(%rip) # 0x440260 movb %al, -0x11(%rbp) je 0x2d68b xorl %eax, %eax cmpq $0x0, 0x412bf0(%rip) # 0x440268 movb %al, -0x11(%rbp) je 0x2d68b cmpq $0x0, 0x412bcb(%rip) # 0x440250 setne %al movb %al, -0x11(%rbp) movb -0x11(%rbp), %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x4(%rbp) jmp 0x2d69f movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
curl_needs_openssl_locking: push rbp mov rbp, rsp sub rsp, 20h mov edi, 0Ah call _curl_version_info mov [rbp+var_10], rax mov rax, [rbp+var_10] cmp qword ptr [rax+28h], 0 jnz short loc_2D5AD mov [rbp+var_4], 0 jmp loc_2D69F loc_2D5AD: mov rax, [rbp+var_10] mov rdi, [rax+28h] lea rsi, aOpenssl; "OpenSSL" mov edx, 7 call _strncmp cmp eax, 0 jz short loc_2D5D7 mov [rbp+var_4], 0 jmp loc_2D69F loc_2D5D7: mov rax, [rbp+var_10] mov rax, [rax+28h] movsx eax, byte ptr [rax+8] cmp eax, 30h ; '0' jnz short loc_2D5F4 mov [rbp+var_4], 1 jmp loc_2D69F loc_2D5F4: mov rax, [rbp+var_10] mov rax, [rax+28h] movsx eax, byte ptr [rax+8] cmp eax, 31h ; '1' jnz loc_2D698 mov rax, [rbp+var_10] mov rax, [rax+28h] movsx eax, byte ptr [rax+0Ah] cmp eax, 30h ; '0' jnz short loc_2D698 xor eax, eax mov edi, eax lea rsi, aCryptoSetIdCal; "CRYPTO_set_id_callback" call _dlsym mov cs:openssl_set_id_callback, rax xor eax, eax mov edi, eax lea rsi, aCryptoSetLocki; "CRYPTO_set_locking_callback" call _dlsym mov cs:openssl_set_locking_callback, rax xor eax, eax mov edi, eax lea rsi, aCryptoNumLocks; "CRYPTO_num_locks" call _dlsym mov cs:openssl_num_locks, rax xor eax, eax cmp cs:openssl_set_id_callback, 0 mov [rbp+var_11], al jz short loc_2D68B xor eax, eax cmp cs:openssl_set_locking_callback, 0 mov [rbp+var_11], al jz short loc_2D68B cmp cs:openssl_num_locks, 0 setnz al mov [rbp+var_11], al loc_2D68B: mov al, [rbp+var_11] and al, 1 movzx eax, al mov [rbp+var_4], eax jmp short loc_2D69F loc_2D698: mov [rbp+var_4], 0 loc_2D69F: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
_BOOL8 curl_needs_openssl_locking() { bool v1; // [rsp+Fh] [rbp-11h] long long v2; // [rsp+10h] [rbp-10h] v2 = curl_version_info(10LL); if ( *(_QWORD *)(v2 + 40) ) { if ( !(unsigned int)strncmp(*(_QWORD *)(v2 + 40), "OpenSSL", 7LL) ) { if ( *(_BYTE *)(*(_QWORD *)(v2 + 40) + 8LL) == 48 ) { return 1; } else if ( *(_BYTE *)(*(_QWORD *)(v2 + 40) + 8LL) == 49 && *(_BYTE *)(*(_QWORD *)(v2 + 40) + 10LL) == 48 ) { openssl_set_id_callback = (long long ( *)(_QWORD))dlsym(0LL, "CRYPTO_set_id_callback"); openssl_set_locking_callback = (long long ( *)(_QWORD))dlsym(0LL, "CRYPTO_set_locking_callback"); openssl_num_locks = (long long (*)(void))dlsym(0LL, "CRYPTO_num_locks"); v1 = 0; if ( openssl_set_id_callback ) { v1 = 0; if ( openssl_set_locking_callback ) return openssl_num_locks != 0LL; } return v1; } else { return 0; } } else { return 0; } } else { return 0; } }
curl_needs_openssl_locking: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV EDI,0xa CALL 0x001278d0 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x28],0x0 JNZ 0x0012d5ad MOV dword ptr [RBP + -0x4],0x0 JMP 0x0012d69f LAB_0012d5ad: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x28] LEA RSI,[0x21dba3] MOV EDX,0x7 CALL 0x00127230 CMP EAX,0x0 JZ 0x0012d5d7 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0012d69f LAB_0012d5d7: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x28] MOVSX EAX,byte ptr [RAX + 0x8] CMP EAX,0x30 JNZ 0x0012d5f4 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0012d69f LAB_0012d5f4: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x28] MOVSX EAX,byte ptr [RAX + 0x8] CMP EAX,0x31 JNZ 0x0012d698 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x28] MOVSX EAX,byte ptr [RAX + 0xa] CMP EAX,0x30 JNZ 0x0012d698 XOR EAX,EAX MOV EDI,EAX LEA RSI,[0x21dbab] CALL 0x001271c0 MOV qword ptr [0x00540260],RAX XOR EAX,EAX MOV EDI,EAX LEA RSI,[0x21dbc2] CALL 0x001271c0 MOV qword ptr [0x00540268],RAX XOR EAX,EAX MOV EDI,EAX LEA RSI,[0x21dbde] CALL 0x001271c0 MOV qword ptr [0x00540250],RAX XOR EAX,EAX CMP qword ptr [0x00540260],0x0 MOV byte ptr [RBP + -0x11],AL JZ 0x0012d68b XOR EAX,EAX CMP qword ptr [0x00540268],0x0 MOV byte ptr [RBP + -0x11],AL JZ 0x0012d68b CMP qword ptr [0x00540250],0x0 SETNZ AL MOV byte ptr [RBP + -0x11],AL LAB_0012d68b: MOV AL,byte ptr [RBP + -0x11] AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x4],EAX JMP 0x0012d69f LAB_0012d698: MOV dword ptr [RBP + -0x4],0x0 LAB_0012d69f: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
bool curl_needs_openssl_locking(void) { int iVar1; long lVar2; bool local_19; lVar2 = curl_version_info(10); if (*(long *)(lVar2 + 0x28) == 0) { local_19 = false; } else { iVar1 = strncmp(*(char **)(lVar2 + 0x28),"OpenSSL",7); if (iVar1 == 0) { if (*(char *)(*(long *)(lVar2 + 0x28) + 8) == '0') { local_19 = true; } else if ((*(char *)(*(long *)(lVar2 + 0x28) + 8) == '1') && (*(char *)(*(long *)(lVar2 + 0x28) + 10) == '0')) { openssl_set_id_callback = dlsym(0,"CRYPTO_set_id_callback"); openssl_set_locking_callback = dlsym(0,"CRYPTO_set_locking_callback"); openssl_num_locks = dlsym(0,"CRYPTO_num_locks"); local_19 = false; if ((openssl_set_id_callback != 0) && (local_19 = false, openssl_set_locking_callback != 0)) { local_19 = openssl_num_locks != 0; } } else { local_19 = false; } } else { local_19 = false; } } return local_19; }
35,056
rak_record_equals
fabiosvm[P]rak/src/record.c
bool rak_record_equals(RakRecord *rec1, RakRecord *rec2) { if (rec1 == rec2) return true; int len = rak_record_len(rec1); if (len != rak_record_len(rec2)) return false; for (int i = 0; i < len; ++i) { RakRecordField field1 = rak_record_get(rec1, i); RakRecordField field2 = rak_record_get(rec2, i); if (!rak_string_equals(field1.name, field2.name)) return false; if (!rak_value_equals(field1.val, field2.val)) return false; } return true; }
O1
c
rak_record_equals: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp cmpq %rsi, %rdi je 0x7e44 movq %rsi, %r15 movq %rdi, %r12 movl 0xc(%rdi), %eax cmpl 0xc(%rsi), %eax jne 0x7e4c testl %eax, %eax setle %cl movl %ecx, 0xc(%rsp) jle 0x7e54 movq %rax, 0x20(%rsp) movq 0x10(%r12), %rax movq (%rax), %rdi movq 0x8(%rax), %r13 movq 0x10(%rax), %rbp movq 0x10(%r15), %rax movq (%rax), %rsi movq 0x8(%rax), %r14 movq 0x10(%rax), %rbx callq 0x8388 testb %al, %al je 0x7e54 movq %r12, 0x10(%rsp) movq %r15, 0x18(%rsp) movl $0x28, %r15d movl $0x1, %r12d movq %r13, %rdi movq %rbp, %rsi movq %r14, %rdx movq %rbx, %rcx callq 0x853c testb %al, %al je 0x7e54 cmpq 0x20(%rsp), %r12 setae %al movl %eax, 0xc(%rsp) je 0x7e54 movq 0x10(%rsp), %rax movq 0x10(%rax), %rax movq -0x10(%rax,%r15), %rdi movq -0x8(%rax,%r15), %r13 movq (%rax,%r15), %rbp movq 0x18(%rsp), %rax movq 0x10(%rax), %rax movq -0x10(%rax,%r15), %rsi movq -0x8(%rax,%r15), %r14 movq (%rax,%r15), %rbx callq 0x8388 addq $0x18, %r15 incq %r12 testb %al, %al jne 0x7de1 jmp 0x7e54 movb $0x1, %al movl %eax, 0xc(%rsp) jmp 0x7e54 movl $0x0, 0xc(%rsp) movl 0xc(%rsp), %eax andb $0x1, %al addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
rak_record_equals: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h cmp rdi, rsi jz loc_7E44 mov r15, rsi mov r12, rdi mov eax, [rdi+0Ch] cmp eax, [rsi+0Ch] jnz loc_7E4C test eax, eax setle cl mov [rsp+58h+var_4C], ecx jle loc_7E54 mov [rsp+58h+var_38], rax mov rax, [r12+10h] mov rdi, [rax] mov r13, [rax+8] mov rbp, [rax+10h] mov rax, [r15+10h] mov rsi, [rax] mov r14, [rax+8] mov rbx, [rax+10h] call rak_string_equals test al, al jz loc_7E54 mov [rsp+58h+var_48], r12 mov [rsp+58h+var_40], r15 mov r15d, 28h ; '(' mov r12d, 1 loc_7DE1: mov rdi, r13 mov rsi, rbp mov rdx, r14 mov rcx, rbx call rak_value_equals test al, al jz short loc_7E54 cmp r12, [rsp+58h+var_38] setnb al mov [rsp+58h+var_4C], eax jz short loc_7E54 mov rax, [rsp+58h+var_48] mov rax, [rax+10h] mov rdi, [rax+r15-10h] mov r13, [rax+r15-8] mov rbp, [rax+r15] mov rax, [rsp+58h+var_40] mov rax, [rax+10h] mov rsi, [rax+r15-10h] mov r14, [rax+r15-8] mov rbx, [rax+r15] call rak_string_equals add r15, 18h inc r12 test al, al jnz short loc_7DE1 jmp short loc_7E54 loc_7E44: mov al, 1 mov [rsp+58h+var_4C], eax jmp short loc_7E54 loc_7E4C: mov [rsp+58h+var_4C], 0 loc_7E54: mov eax, [rsp+58h+var_4C] and al, 1 add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
bool rak_record_equals(long long a1, long long a2) { int v3; // eax long long *v4; // rax long long v5; // rdi long long v6; // r13 long long v7; // rbp _QWORD *v8; // rax long long v9; // r14 long long v10; // rbx long long v11; // r15 unsigned long long v12; // r12 long long v13; // rax long long v14; // rdi long long v15; // rax char v16; // al bool v18; // [rsp+Ch] [rbp-4Ch] long long v19; // [rsp+10h] [rbp-48h] unsigned long long v20; // [rsp+20h] [rbp-38h] if ( a1 == a2 ) { return 1; } else { v3 = *(_DWORD *)(a1 + 12); if ( v3 == *(_DWORD *)(a2 + 12) ) { v18 = v3 <= 0; if ( v3 > 0 ) { v20 = *(unsigned int *)(a1 + 12); v4 = *(long long **)(a1 + 16); v5 = *v4; v6 = v4[1]; v7 = v4[2]; v8 = *(_QWORD **)(a2 + 16); v9 = v8[1]; v10 = v8[2]; if ( (unsigned __int8)rak_string_equals(v5, *v8) ) { v19 = a1; v11 = 40LL; v12 = 1LL; do { if ( !(unsigned __int8)rak_value_equals(v6, v7, v9, v10) ) break; v18 = v12 >= v20; if ( v12 == v20 ) break; v13 = *(_QWORD *)(v19 + 16); v14 = *(_QWORD *)(v13 + v11 - 16); v6 = *(_QWORD *)(v13 + v11 - 8); v7 = *(_QWORD *)(v13 + v11); v15 = *(_QWORD *)(a2 + 16); v9 = *(_QWORD *)(v15 + v11 - 8); v10 = *(_QWORD *)(v15 + v11); v16 = rak_string_equals(v14, *(_QWORD *)(v15 + v11 - 16)); v11 += 24LL; ++v12; } while ( v16 ); } } } else { return 0; } } return v18; }
rak_record_equals: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 CMP RDI,RSI JZ 0x00107e44 MOV R15,RSI MOV R12,RDI MOV EAX,dword ptr [RDI + 0xc] CMP EAX,dword ptr [RSI + 0xc] JNZ 0x00107e4c TEST EAX,EAX SETLE CL MOV dword ptr [RSP + 0xc],ECX JLE 0x00107e54 MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [R12 + 0x10] MOV RDI,qword ptr [RAX] MOV R13,qword ptr [RAX + 0x8] MOV RBP,qword ptr [RAX + 0x10] MOV RAX,qword ptr [R15 + 0x10] MOV RSI,qword ptr [RAX] MOV R14,qword ptr [RAX + 0x8] MOV RBX,qword ptr [RAX + 0x10] CALL 0x00108388 TEST AL,AL JZ 0x00107e54 MOV qword ptr [RSP + 0x10],R12 MOV qword ptr [RSP + 0x18],R15 MOV R15D,0x28 MOV R12D,0x1 LAB_00107de1: MOV RDI,R13 MOV RSI,RBP MOV RDX,R14 MOV RCX,RBX CALL 0x0010853c TEST AL,AL JZ 0x00107e54 CMP R12,qword ptr [RSP + 0x20] SETNC AL MOV dword ptr [RSP + 0xc],EAX JZ 0x00107e54 MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RDI,qword ptr [RAX + R15*0x1 + -0x10] MOV R13,qword ptr [RAX + R15*0x1 + -0x8] MOV RBP,qword ptr [RAX + R15*0x1] MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x10] MOV RSI,qword ptr [RAX + R15*0x1 + -0x10] MOV R14,qword ptr [RAX + R15*0x1 + -0x8] MOV RBX,qword ptr [RAX + R15*0x1] CALL 0x00108388 ADD R15,0x18 INC R12 TEST AL,AL JNZ 0x00107de1 JMP 0x00107e54 LAB_00107e44: MOV AL,0x1 MOV dword ptr [RSP + 0xc],EAX JMP 0x00107e54 LAB_00107e4c: MOV dword ptr [RSP + 0xc],0x0 LAB_00107e54: MOV EAX,dword ptr [RSP + 0xc] AND AL,0x1 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 rak_record_equals(long param_1,long param_2,int8 param_3,int8 param_4) { uint uVar1; int8 *puVar2; int8 *puVar3; long lVar4; long lVar5; char cVar6; int8 in_RAX; int8 uVar7; int8 uVar8; int8 uVar9; ulong uVar10; int8 uVar11; long lVar12; int4 local_4c; if (param_1 == param_2) { local_4c = (int4)CONCAT71((int7)((ulong)in_RAX >> 8),1); } else { uVar1 = *(uint *)(param_1 + 0xc); if (uVar1 == *(uint *)(param_2 + 0xc)) { local_4c = (int4)CONCAT71((int7)((ulong)param_4 >> 8),(int)uVar1 < 1); if (0 < (int)uVar1) { puVar2 = *(int8 **)(param_1 + 0x10); uVar7 = puVar2[1]; uVar9 = puVar2[2]; puVar3 = *(int8 **)(param_2 + 0x10); uVar11 = puVar3[1]; uVar8 = puVar3[2]; cVar6 = rak_string_equals(*puVar2,*puVar3); if (cVar6 != '\0') { lVar12 = 0x28; uVar10 = 1; do { uVar7 = rak_value_equals(uVar7,uVar9,uVar11,uVar8); if ((char)uVar7 == '\0') { return local_4c; } local_4c = (int4)CONCAT71((int7)((ulong)uVar7 >> 8),uVar1 <= uVar10); if (uVar10 == uVar1) { return local_4c; } lVar4 = *(long *)(param_1 + 0x10); uVar7 = *(int8 *)(lVar4 + -8 + lVar12); uVar9 = *(int8 *)(lVar4 + lVar12); lVar5 = *(long *)(param_2 + 0x10); uVar11 = *(int8 *)(lVar5 + -8 + lVar12); uVar8 = *(int8 *)(lVar5 + lVar12); cVar6 = rak_string_equals(*(int8 *)(lVar4 + -0x10 + lVar12), *(int8 *)(lVar5 + -0x10 + lVar12)); lVar12 = lVar12 + 0x18; uVar10 = uVar10 + 1; } while (cVar6 != '\0'); } } } else { local_4c = 0; } } return local_4c; }
35,057
rak_record_equals
fabiosvm[P]rak/src/record.c
bool rak_record_equals(RakRecord *rec1, RakRecord *rec2) { if (rec1 == rec2) return true; int len = rak_record_len(rec1); if (len != rak_record_len(rec2)) return false; for (int i = 0; i < len; ++i) { RakRecordField field1 = rak_record_get(rec1, i); RakRecordField field2 = rak_record_get(rec2, i); if (!rak_string_equals(field1.name, field2.name)) return false; if (!rak_value_equals(field1.val, field2.val)) return false; } return true; }
O3
c
rak_record_equals: movb $0x1, %al cmpq %rsi, %rdi je 0x7bae movl 0xc(%rdi), %ecx cmpl 0xc(%rsi), %ecx jne 0x7bac testl %ecx, %ecx jle 0x7bae pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl $0x10, %ebx xorl %r14d, %r14d movq %rsi, 0x10(%rsp) movq %rdi, 0x8(%rsp) movq %rcx, (%rsp) movq 0x10(%rdi), %rax movq -0x10(%rax,%rbx), %rdi movq -0x8(%rax,%rbx), %r15 movq (%rax,%rbx), %r12 movq 0x10(%rsi), %rax movq -0x10(%rax,%rbx), %rsi movq -0x8(%rax,%rbx), %r13 movq (%rax,%rbx), %rbp callq 0x80e0 testb %al, %al je 0x7baf movq %r15, %rdi movq %r12, %rsi movq %r13, %rdx movq %rbp, %rcx callq 0x8276 testb %al, %al je 0x7baf incq %r14 addq $0x18, %rbx movq (%rsp), %rcx cmpq %r14, %rcx movq 0x10(%rsp), %rsi movq 0x8(%rsp), %rdi jne 0x7b4b setbe %al jmp 0x7bb1 xorl %eax, %eax retq xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
rak_record_equals: mov al, 1 cmp rdi, rsi jz locret_7BAE mov ecx, [rdi+0Ch] cmp ecx, [rsi+0Ch] jnz loc_7BAC test ecx, ecx jle locret_7BAE push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov ebx, 10h xor r14d, r14d mov [rsp+48h+var_38], rsi mov [rsp+48h+var_40], rdi mov [rsp+48h+var_48], rcx loc_7B4B: mov rax, [rdi+10h] mov rdi, [rax+rbx-10h] mov r15, [rax+rbx-8] mov r12, [rax+rbx] mov rax, [rsi+10h] mov rsi, [rax+rbx-10h] mov r13, [rax+rbx-8] mov rbp, [rax+rbx] call rak_string_equals test al, al jz short loc_7BAF mov rdi, r15 mov rsi, r12 mov rdx, r13 mov rcx, rbp call rak_value_equals test al, al jz short loc_7BAF inc r14 add rbx, 18h mov rcx, [rsp+48h+var_48] cmp rcx, r14 mov rsi, [rsp+48h+var_38] mov rdi, [rsp+48h+var_40] jnz short loc_7B4B setbe al jmp short loc_7BB1 loc_7BAC: xor eax, eax locret_7BAE: retn loc_7BAF: xor eax, eax loc_7BB1: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
bool rak_record_equals(long long a1, long long a2) { bool result; // al int v3; // ecx long long v4; // rbx unsigned long long v5; // r14 long long v6; // rax long long v7; // rdi long long v8; // r15 long long v9; // r12 long long v10; // rax long long v11; // r13 long long v12; // rbp unsigned long long v13; // [rsp+0h] [rbp-48h] long long v14; // [rsp+8h] [rbp-40h] long long v15; // [rsp+10h] [rbp-38h] result = 1; if ( a1 != a2 ) { v3 = *(_DWORD *)(a1 + 12); if ( v3 == *(_DWORD *)(a2 + 12) ) { if ( v3 > 0 ) { v4 = 16LL; v5 = 0LL; v15 = a2; v14 = a1; v13 = *(unsigned int *)(a1 + 12); while ( 1 ) { v6 = *(_QWORD *)(a1 + 16); v7 = *(_QWORD *)(v6 + v4 - 16); v8 = *(_QWORD *)(v6 + v4 - 8); v9 = *(_QWORD *)(v6 + v4); v10 = *(_QWORD *)(a2 + 16); v11 = *(_QWORD *)(v10 + v4 - 8); v12 = *(_QWORD *)(v10 + v4); if ( !(unsigned __int8)rak_string_equals(v7, *(_QWORD *)(v10 + v4 - 16)) || !(unsigned __int8)rak_value_equals(v8, v9, v11, v12) ) { break; } ++v5; v4 += 24LL; a2 = v15; a1 = v14; if ( v13 == v5 ) return v13 <= v5; } return 0; } } else { return 0; } } return result; }
rak_record_equals: MOV AL,0x1 CMP RDI,RSI JZ 0x00107bae MOV ECX,dword ptr [RDI + 0xc] CMP ECX,dword ptr [RSI + 0xc] JNZ 0x00107bac TEST ECX,ECX JLE 0x00107bae PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV EBX,0x10 XOR R14D,R14D MOV qword ptr [RSP + 0x10],RSI MOV qword ptr [RSP + 0x8],RDI MOV qword ptr [RSP],RCX LAB_00107b4b: MOV RAX,qword ptr [RDI + 0x10] MOV RDI,qword ptr [RAX + RBX*0x1 + -0x10] MOV R15,qword ptr [RAX + RBX*0x1 + -0x8] MOV R12,qword ptr [RAX + RBX*0x1] MOV RAX,qword ptr [RSI + 0x10] MOV RSI,qword ptr [RAX + RBX*0x1 + -0x10] MOV R13,qword ptr [RAX + RBX*0x1 + -0x8] MOV RBP,qword ptr [RAX + RBX*0x1] CALL 0x001080e0 TEST AL,AL JZ 0x00107baf MOV RDI,R15 MOV RSI,R12 MOV RDX,R13 MOV RCX,RBP CALL 0x00108276 TEST AL,AL JZ 0x00107baf INC R14 ADD RBX,0x18 MOV RCX,qword ptr [RSP] CMP RCX,R14 MOV RSI,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RSP + 0x8] JNZ 0x00107b4b SETBE AL JMP 0x00107bb1 LAB_00107bac: XOR EAX,EAX LAB_00107bae: RET LAB_00107baf: XOR EAX,EAX LAB_00107bb1: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
bool rak_record_equals(long param_1,long param_2) { uint uVar1; long lVar2; int8 uVar3; int8 uVar4; long lVar5; int8 uVar6; int8 uVar7; char cVar8; bool bVar9; long lVar10; ulong uVar11; bVar9 = true; if (param_1 != param_2) { uVar1 = *(uint *)(param_1 + 0xc); if (uVar1 == *(uint *)(param_2 + 0xc)) { if (0 < (int)uVar1) { lVar10 = 0x10; uVar11 = 0; while( true ) { lVar2 = *(long *)(param_1 + 0x10); uVar3 = *(int8 *)(lVar2 + -8 + lVar10); uVar4 = *(int8 *)(lVar2 + lVar10); lVar5 = *(long *)(param_2 + 0x10); uVar6 = *(int8 *)(lVar5 + -8 + lVar10); uVar7 = *(int8 *)(lVar5 + lVar10); cVar8 = rak_string_equals(*(int8 *)(lVar2 + -0x10 + lVar10), *(int8 *)(lVar5 + -0x10 + lVar10)); if ((cVar8 == '\0') || (cVar8 = rak_value_equals(uVar3,uVar4,uVar6,uVar7), cVar8 == '\0')) break; uVar11 = uVar11 + 1; lVar10 = lVar10 + 0x18; if (uVar1 == uVar11) { return uVar1 <= uVar11; } } return false; } } else { bVar9 = false; } } return bVar9; }
35,058
rw_pr_init
eloqsql/mysys/thr_rwlock.c
int rw_pr_init(rw_pr_lock_t *rwlock) { pthread_mutex_init(&rwlock->lock, NULL); pthread_cond_init(&rwlock->no_active_readers, NULL); rwlock->active_readers= 0; rwlock->writers_waiting_readers= 0; rwlock->active_writer= FALSE; #ifdef SAFE_MUTEX rwlock->writer_thread= 0; #endif return 0; }
O0
c
rw_pr_init: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x244e0 movq -0x8(%rbp), %rdi addq $0x28, %rdi xorl %eax, %eax movl %eax, %esi callq 0x243c0 movq -0x8(%rbp), %rax movl $0x0, 0x58(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x5c(%rax) movq -0x8(%rbp), %rax movb $0x0, 0x60(%rax) xorl %eax, %eax addq $0x10, %rsp popq %rbp retq
rw_pr_init: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] xor eax, eax mov esi, eax call _pthread_mutex_init mov rdi, [rbp+var_8] add rdi, 28h ; '(' xor eax, eax mov esi, eax call _pthread_cond_init mov rax, [rbp+var_8] mov dword ptr [rax+58h], 0 mov rax, [rbp+var_8] mov dword ptr [rax+5Ch], 0 mov rax, [rbp+var_8] mov byte ptr [rax+60h], 0 xor eax, eax add rsp, 10h pop rbp retn
long long rw_pr_init(long long a1) { pthread_mutex_init(a1, 0LL); pthread_cond_init(a1 + 40, 0LL); *(_DWORD *)(a1 + 88) = 0; *(_DWORD *)(a1 + 92) = 0; *(_BYTE *)(a1 + 96) = 0; return 0LL; }
rw_pr_init: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] XOR EAX,EAX MOV ESI,EAX CALL 0x001244e0 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 XOR EAX,EAX MOV ESI,EAX CALL 0x001243c0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x58],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x5c],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x60],0x0 XOR EAX,EAX ADD RSP,0x10 POP RBP RET
int8 rw_pr_init(pthread_mutex_t *param_1) { pthread_mutex_init(param_1,(pthread_mutexattr_t *)0x0); pthread_cond_init((pthread_cond_t *)(param_1 + 1),(pthread_condattr_t *)0x0); *(int4 *)((long)param_1 + 0x58) = 0; *(int4 *)((long)param_1 + 0x5c) = 0; *(int1 *)((long)param_1 + 0x60) = 0; return 0; }
35,059
my_uca_context_weight_find
eloqsql/strings/ctype-uca.c
static inline const MY_CONTRACTION * my_uca_context_weight_find(my_uca_scanner *scanner, my_wc_t *wc, size_t max_char_length) { const MY_CONTRACTION *cnt; DBUG_ASSERT(scanner->level->contractions.nitems); /* If we have scanned a character which can have previous context, and there were some more characters already before, then reconstruct codepoint of the previous character from "page" and "code" into w[1], and verify that {wc[1], wc[0]} together form a real previous context pair. Note, we support only 2-character long sequences with previous context at the moment. CLDR does not have longer sequences. */ if (my_uca_can_be_previous_context_tail(&scanner->level->contractions, wc[0]) && scanner->wbeg != nochar && /* if not the very first character */ my_uca_can_be_previous_context_head(&scanner->level->contractions, (wc[1]= ((scanner->page << 8) + scanner->code))) && (cnt= my_uca_previous_context_find(scanner, wc[1], wc[0]))) { scanner->page= scanner->code= 0; /* Clear for the next character */ return cnt; } else if (my_uca_can_be_contraction_head(&scanner->level->contractions, wc[0])) { /* Check if w[0] starts a contraction */ if ((cnt= my_uca_scanner_contraction_find(scanner, wc, max_char_length))) return cnt; } return NULL; }
O3
c
my_uca_context_weight_find: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, -0x30(%rbp) movq %rsi, %r14 movq 0x18(%rdi), %rcx movq (%rsi), %rdx movq 0x28(%rcx), %rsi movl %edx, %eax andl $0xfff, %eax # imm = 0xFFF cmpb $0x0, (%rsi,%rax) js 0x416d8 movq 0x28(%rcx), %rcx testb $0x1, (%rcx,%rax) je 0x41824 movq %rdi, -0x40(%rbp) xorps %xmm0, %xmm0 movaps %xmm0, -0x60(%rbp) movaps %xmm0, -0x70(%rbp) movaps %xmm0, -0x80(%rbp) cmpq $0x2, -0x30(%rbp) jb 0x41824 movq -0x40(%rbp), %r13 movq 0x8(%r13), %r12 movb $0x4, %r15b movl $0x1, %edx movl $0x8, %ebx movq %rdx, -0x38(%rbp) movq 0x10(%r13), %rcx movq 0x30(%r13), %rdi movq 0xb8(%rdi), %rax leaq (%r14,%rbx), %rsi movq %r12, %rdx callq *0x28(%rax) testl %eax, %eax jle 0x41758 movl %eax, %eax addq %rax, %r12 movq -0x38(%rbp), %rdx movq %r12, -0x80(%rbp,%rdx,8) movq 0x18(%r13), %rcx movq (%r14,%rdx,8), %rax movq 0x28(%rcx), %rsi andl $0xfff, %eax # imm = 0xFFF testb %r15b, (%rsi,%rax) je 0x41774 incq %rdx addb %r15b, %r15b addq $0x8, %rbx cmpq %rdx, -0x30(%rbp) jne 0x41671 movq -0x30(%rbp), %rdx jmp 0x4175c leaq 0x212081(%rip), %rsi # 0x253760 cmpq %rsi, (%rdi) je 0x41630 movl 0x24(%rdi), %esi shll $0x8, %esi movslq 0x28(%rdi), %r8 movslq %esi, %rsi addq %r8, %rsi movq %rsi, 0x8(%r14) movq 0x28(%rcx), %rcx movl %esi, %r8d andl $0xfff, %r8d # imm = 0xFFF testb $0x40, (%rcx,%r8) movq 0x18(%rdi), %rcx je 0x41630 movq 0x18(%rcx), %r8 testq %r8, %r8 jle 0x41630 movq 0x20(%rcx), %r12 imulq $0x58, %r8, %r8 addq %r12, %r8 cmpb $0x0, 0x52(%r12) je 0x4174a cmpq %rsi, (%r12) jne 0x4174a cmpq %rdx, 0x8(%r12) je 0x41850 addq $0x58, %r12 cmpq %r8, %r12 jb 0x41731 jmp 0x41630 movq -0x38(%rbp), %rdx cmpq $0x2, %rdx jb 0x41824 movq -0x40(%rbp), %rax movq 0x18(%rax), %rcx movq 0x28(%rcx), %rsi jmp 0x41777 incq %rdx leaq (,%rdx,8), %rdi movq %rsi, -0x48(%rbp) movq %rdx, %r8 decq %rdx movq -0x8(%r14,%r8,8), %rax andl $0xfff, %eax # imm = 0xFFF testb $0x2, (%rsi,%rax) je 0x41812 movq 0x18(%rcx), %rax testq %rax, %rax jle 0x41812 movq 0x20(%rcx), %r12 imulq $0x58, %rax, %rax addq %r12, %rax leaq (,%r8,8), %rsi movq %rsi, -0x50(%rbp) movq %rdi, -0x38(%rbp) movq %rax, -0x30(%rbp) cmpq $0x5, %r8 ja 0x417ce cmpq $0x0, (%r12,%rdi) jne 0x41809 cmpb $0x0, 0x52(%r12) jne 0x41809 movq %r12, %rdi movq %r14, %rsi movq %rdx, %r15 movq -0x50(%rbp), %rdx movq %r14, %r13 movq %rcx, %rbx movq %r8, %r14 callq 0x242e0 movq %r14, %r8 movq -0x38(%rbp), %rdi movq %rbx, %rcx movq %r15, %rdx movq %r13, %r14 testl %eax, %eax movq -0x30(%rbp), %rax je 0x41839 addq $0x58, %r12 cmpq %rax, %r12 jb 0x417c1 addq $-0x8, %rdi cmpq $0x1, %rdx movq -0x48(%rbp), %rsi ja 0x41783 xorl %r12d, %r12d movq %r12, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x32(%r12), %rax movq -0x40(%rbp), %rcx movq %rax, (%rcx) movq -0x80(%rbp,%rdx,8), %rax movq %rax, 0x8(%rcx) jmp 0x41827 leaq 0x32(%r12), %rax movq %rax, (%rdi) movq $0x0, 0x24(%rdi) jmp 0x41827
my_uca_context_weight_find: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rbp+var_30], rdx mov r14, rsi mov rcx, [rdi+18h] mov rdx, [rsi] mov rsi, [rcx+28h] mov eax, edx and eax, 0FFFh cmp byte ptr [rsi+rax], 0 js loc_416D8 loc_41630: mov rcx, [rcx+28h] test byte ptr [rcx+rax], 1 jz loc_41824 mov [rbp+var_40], rdi xorps xmm0, xmm0 movaps [rbp+var_60], xmm0 movaps [rbp+var_70], xmm0 movaps [rbp+var_80], xmm0 cmp [rbp+var_30], 2 jb loc_41824 mov r13, [rbp+var_40] mov r12, [r13+8] mov r15b, 4 mov edx, 1 mov ebx, 8 loc_41671: mov [rbp+var_38], rdx mov rcx, [r13+10h] mov rdi, [r13+30h] mov rax, [rdi+0B8h] lea rsi, [r14+rbx] mov rdx, r12 call qword ptr [rax+28h] test eax, eax jle loc_41758 mov eax, eax add r12, rax mov rdx, [rbp+var_38] mov qword ptr [rbp+rdx*8+var_80], r12 mov rcx, [r13+18h] mov rax, [r14+rdx*8] mov rsi, [rcx+28h] and eax, 0FFFh test [rsi+rax], r15b jz loc_41774 inc rdx add r15b, r15b add rbx, 8 cmp [rbp+var_30], rdx jnz short loc_41671 mov rdx, [rbp+var_30] jmp loc_4175C loc_416D8: lea rsi, nochar cmp [rdi], rsi jz loc_41630 mov esi, [rdi+24h] shl esi, 8 movsxd r8, dword ptr [rdi+28h] movsxd rsi, esi add rsi, r8 mov [r14+8], rsi mov rcx, [rcx+28h] mov r8d, esi and r8d, 0FFFh test byte ptr [rcx+r8], 40h mov rcx, [rdi+18h] jz loc_41630 mov r8, [rcx+18h] test r8, r8 jle loc_41630 mov r12, [rcx+20h] imul r8, 58h ; 'X' add r8, r12 loc_41731: cmp byte ptr [r12+52h], 0 jz short loc_4174A cmp [r12], rsi jnz short loc_4174A cmp [r12+8], rdx jz loc_41850 loc_4174A: add r12, 58h ; 'X' cmp r12, r8 jb short loc_41731 jmp loc_41630 loc_41758: mov rdx, [rbp+var_38] loc_4175C: cmp rdx, 2 jb loc_41824 mov rax, [rbp+var_40] mov rcx, [rax+18h] mov rsi, [rcx+28h] jmp short loc_41777 loc_41774: inc rdx loc_41777: lea rdi, ds:0[rdx*8] mov [rbp+var_48], rsi loc_41783: mov r8, rdx dec rdx mov rax, [r14+r8*8-8] and eax, 0FFFh test byte ptr [rsi+rax], 2 jz short loc_41812 mov rax, [rcx+18h] test rax, rax jle short loc_41812 mov r12, [rcx+20h] imul rax, 58h ; 'X' add rax, r12 lea rsi, ds:0[r8*8] mov [rbp+var_50], rsi mov [rbp+var_38], rdi mov [rbp+var_30], rax loc_417C1: cmp r8, 5 ja short loc_417CE cmp qword ptr [r12+rdi], 0 jnz short loc_41809 loc_417CE: cmp byte ptr [r12+52h], 0 jnz short loc_41809 mov rdi, r12 mov rsi, r14 mov r15, rdx mov rdx, [rbp+var_50] mov r13, r14 mov rbx, rcx mov r14, r8 call _bcmp mov r8, r14 mov rdi, [rbp+var_38] mov rcx, rbx mov rdx, r15 mov r14, r13 test eax, eax mov rax, [rbp+var_30] jz short loc_41839 loc_41809: add r12, 58h ; 'X' cmp r12, rax jb short loc_417C1 loc_41812: add rdi, 0FFFFFFFFFFFFFFF8h cmp rdx, 1 mov rsi, [rbp+var_48] ja loc_41783 loc_41824: xor r12d, r12d loc_41827: mov rax, r12 add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_41839: lea rax, [r12+32h] mov rcx, [rbp+var_40] mov [rcx], rax mov rax, qword ptr [rbp+rdx*8+var_80] mov [rcx+8], rax jmp short loc_41827 loc_41850: lea rax, [r12+32h] mov [rdi], rax mov qword ptr [rdi+24h], 0 jmp short loc_41827
unsigned long long my_uca_context_weight_find( long long a1, _QWORD *a2, unsigned long long a3, long long a4, long long a5, long long a6) { _QWORD *v6; // r14 _QWORD *v7; // rcx long long v8; // rdx long long v9; // rax _QWORD *v10; // r13 long long v11; // r12 char v12; // r15 long long v13; // rdx long long v14; // rbx int v15; // eax long long v16; // rdx _QWORD *v17; // rcx long long v18; // rsi unsigned long long v19; // rdx long long v20; // rsi bool v21; // zf unsigned long long v22; // r12 long long v23; // rdi unsigned long long v24; // r8 long long v25; // rax unsigned long long v26; // rax _QWORD *v27; // rsi unsigned long long v28; // r15 _QWORD *v29; // r13 _QWORD *v30; // rbx unsigned long long v31; // r14 int v32; // eax _QWORD *v34; // rcx __int128 v35; // [rsp+0h] [rbp-80h] __int128 v36; // [rsp+10h] [rbp-70h] __int128 v37; // [rsp+20h] [rbp-60h] long long v38; // [rsp+30h] [rbp-50h] long long v39; // [rsp+38h] [rbp-48h] _QWORD *v40; // [rsp+40h] [rbp-40h] long long v41; // [rsp+48h] [rbp-38h] unsigned long long v42; // [rsp+50h] [rbp-30h] v42 = a3; v6 = a2; v7 = *(_QWORD **)(a1 + 24); v8 = *a2; v9 = *a2 & 0xFFFLL; if ( *(char *)(v7[5] + v9) >= 0 || *(_UNKNOWN **)a1 == &nochar || (v20 = *(int *)(a1 + 40) + (long long)(int)(*(_DWORD *)(a1 + 36) << 8), v6[1] = v20, a5 = v20 & 0xFFF, v21 = (*(_BYTE *)(v7[5] + a5) & 0x40) == 0, v7 = *(_QWORD **)(a1 + 24), v21) || (a5 = v7[3], a5 <= 0) ) { LABEL_2: if ( (*(_BYTE *)(v7[5] + v9) & 1) != 0 && (v40 = (_QWORD *)a1, v37 = 0LL, v36 = 0LL, v35 = 0LL, v42 >= 2) ) { v10 = v40; v11 = v40[1]; v12 = 4; v13 = 1LL; v14 = 1LL; while ( 1 ) { v41 = v13; v15 = (*(long long ( **)(_QWORD, _QWORD *, long long, _QWORD, long long, long long, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD))(*(_QWORD *)(v10[6] + 184LL) + 40LL))( v10[6], &v6[v14], v11, v10[2], a5, a6, v35, *((_QWORD *)&v35 + 1), v36, *((_QWORD *)&v36 + 1), v37, *((_QWORD *)&v37 + 1)); if ( v15 <= 0 ) break; v11 += (unsigned int)v15; v16 = v41; *((_QWORD *)&v35 + v41) = v11; v17 = (_QWORD *)v10[3]; v18 = v17[5]; if ( ((unsigned __int8)v12 & *(_BYTE *)(v18 + (v6[v16] & 0xFFFLL))) == 0 ) { v19 = v16 + 1; goto LABEL_22; } v13 = v16 + 1; v12 *= 2; ++v14; if ( v42 == v13 ) { v19 = v42; goto LABEL_19; } } v19 = v41; LABEL_19: if ( v19 < 2 ) return 0LL; v17 = (_QWORD *)v40[3]; v18 = v17[5]; LABEL_22: v23 = 8 * v19; v39 = v18; while ( 1 ) { v24 = v19--; if ( (*(_BYTE *)(v18 + (v6[v24 - 1] & 0xFFFLL)) & 2) != 0 ) { v25 = v17[3]; if ( v25 > 0 ) break; } LABEL_31: v23 -= 8LL; v18 = v39; if ( v19 <= 1 ) return 0LL; } v22 = v17[4]; v26 = v22 + 88 * v25; v38 = 8 * v24; v41 = v23; v42 = v26; while ( 1 ) { if ( (v24 > 5 || !*(_QWORD *)(v22 + v23)) && !*(_BYTE *)(v22 + 82) ) { v27 = v6; v28 = v19; v29 = v6; v30 = v17; v31 = v24; v32 = bcmp(v22, v27, v38); v24 = v31; v23 = v41; v17 = v30; v19 = v28; v6 = v29; v21 = v32 == 0; v26 = v42; if ( v21 ) break; } v22 += 88LL; if ( v22 >= v26 ) goto LABEL_31; } v34 = v40; *v40 = v22 + 50; v34[1] = *((_QWORD *)&v35 + v28); } else { return 0LL; } } else { v22 = v7[4]; a5 = v22 + 88 * a5; while ( !*(_BYTE *)(v22 + 82) || *(_QWORD *)v22 != v20 || *(_QWORD *)(v22 + 8) != v8 ) { v22 += 88LL; if ( v22 >= a5 ) goto LABEL_2; } *(_QWORD *)a1 = v22 + 50; *(_QWORD *)(a1 + 36) = 0LL; } return v22; }
my_uca_context_weight_find: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x30],RDX MOV R14,RSI MOV RCX,qword ptr [RDI + 0x18] MOV RDX,qword ptr [RSI] MOV RSI,qword ptr [RCX + 0x28] MOV EAX,EDX AND EAX,0xfff CMP byte ptr [RSI + RAX*0x1],0x0 JS 0x001416d8 LAB_00141630: MOV RCX,qword ptr [RCX + 0x28] TEST byte ptr [RCX + RAX*0x1],0x1 JZ 0x00141824 MOV qword ptr [RBP + -0x40],RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RBP + -0x60],XMM0 MOVAPS xmmword ptr [RBP + -0x70],XMM0 MOVAPS xmmword ptr [RBP + -0x80],XMM0 CMP qword ptr [RBP + -0x30],0x2 JC 0x00141824 MOV R13,qword ptr [RBP + -0x40] MOV R12,qword ptr [R13 + 0x8] MOV R15B,0x4 MOV EDX,0x1 MOV EBX,0x8 LAB_00141671: MOV qword ptr [RBP + -0x38],RDX MOV RCX,qword ptr [R13 + 0x10] MOV RDI,qword ptr [R13 + 0x30] MOV RAX,qword ptr [RDI + 0xb8] LEA RSI,[R14 + RBX*0x1] MOV RDX,R12 CALL qword ptr [RAX + 0x28] TEST EAX,EAX JLE 0x00141758 MOV EAX,EAX ADD R12,RAX MOV RDX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + RDX*0x8 + -0x80],R12 MOV RCX,qword ptr [R13 + 0x18] MOV RAX,qword ptr [R14 + RDX*0x8] MOV RSI,qword ptr [RCX + 0x28] AND EAX,0xfff TEST byte ptr [RSI + RAX*0x1],R15B JZ 0x00141774 INC RDX ADD R15B,R15B ADD RBX,0x8 CMP qword ptr [RBP + -0x30],RDX JNZ 0x00141671 MOV RDX,qword ptr [RBP + -0x30] JMP 0x0014175c LAB_001416d8: LEA RSI,[0x353760] CMP qword ptr [RDI],RSI JZ 0x00141630 MOV ESI,dword ptr [RDI + 0x24] SHL ESI,0x8 MOVSXD R8,dword ptr [RDI + 0x28] MOVSXD RSI,ESI ADD RSI,R8 MOV qword ptr [R14 + 0x8],RSI MOV RCX,qword ptr [RCX + 0x28] MOV R8D,ESI AND R8D,0xfff TEST byte ptr [RCX + R8*0x1],0x40 MOV RCX,qword ptr [RDI + 0x18] JZ 0x00141630 MOV R8,qword ptr [RCX + 0x18] TEST R8,R8 JLE 0x00141630 MOV R12,qword ptr [RCX + 0x20] IMUL R8,R8,0x58 ADD R8,R12 LAB_00141731: CMP byte ptr [R12 + 0x52],0x0 JZ 0x0014174a CMP qword ptr [R12],RSI JNZ 0x0014174a CMP qword ptr [R12 + 0x8],RDX JZ 0x00141850 LAB_0014174a: ADD R12,0x58 CMP R12,R8 JC 0x00141731 JMP 0x00141630 LAB_00141758: MOV RDX,qword ptr [RBP + -0x38] LAB_0014175c: CMP RDX,0x2 JC 0x00141824 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RCX + 0x28] JMP 0x00141777 LAB_00141774: INC RDX LAB_00141777: LEA RDI,[RDX*0x8] MOV qword ptr [RBP + -0x48],RSI LAB_00141783: MOV R8,RDX DEC RDX MOV RAX,qword ptr [R14 + R8*0x8 + -0x8] AND EAX,0xfff TEST byte ptr [RSI + RAX*0x1],0x2 JZ 0x00141812 MOV RAX,qword ptr [RCX + 0x18] TEST RAX,RAX JLE 0x00141812 MOV R12,qword ptr [RCX + 0x20] IMUL RAX,RAX,0x58 ADD RAX,R12 LEA RSI,[R8*0x8] MOV qword ptr [RBP + -0x50],RSI MOV qword ptr [RBP + -0x38],RDI MOV qword ptr [RBP + -0x30],RAX LAB_001417c1: CMP R8,0x5 JA 0x001417ce CMP qword ptr [R12 + RDI*0x1],0x0 JNZ 0x00141809 LAB_001417ce: CMP byte ptr [R12 + 0x52],0x0 JNZ 0x00141809 MOV RDI,R12 MOV RSI,R14 MOV R15,RDX MOV RDX,qword ptr [RBP + -0x50] MOV R13,R14 MOV RBX,RCX MOV R14,R8 CALL 0x001242e0 MOV R8,R14 MOV RDI,qword ptr [RBP + -0x38] MOV RCX,RBX MOV RDX,R15 MOV R14,R13 TEST EAX,EAX MOV RAX,qword ptr [RBP + -0x30] JZ 0x00141839 LAB_00141809: ADD R12,0x58 CMP R12,RAX JC 0x001417c1 LAB_00141812: ADD RDI,-0x8 CMP RDX,0x1 MOV RSI,qword ptr [RBP + -0x48] JA 0x00141783 LAB_00141824: XOR R12D,R12D LAB_00141827: MOV RAX,R12 ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00141839: LEA RAX,[R12 + 0x32] MOV RCX,qword ptr [RBP + -0x40] MOV qword ptr [RCX],RAX MOV RAX,qword ptr [RBP + RDX*0x8 + -0x80] MOV qword ptr [RCX + 0x8],RAX JMP 0x00141827 LAB_00141850: LEA RAX,[R12 + 0x32] MOV qword ptr [RDI],RAX MOV qword ptr [RDI + 0x24],0x0 JMP 0x00141827
long * my_uca_context_weight_find(long *param_1,long *param_2,ulong param_3) { uint uVar1; int iVar2; long *plVar3; long lVar4; ulong uVar5; ulong uVar6; ulong uVar7; long lVar8; long lVar9; long *plVar10; byte bVar11; long local_88 [7]; long local_50; long *local_48; ulong local_40; long *local_38; lVar9 = param_1[3]; uVar5 = (ulong)((uint)*param_2 & 0xfff); if ((*(char *)(*(long *)(lVar9 + 0x28) + uVar5) < '\0') && ((int4 *)*param_1 != &nochar)) { lVar8 = (long)(*(int *)((long)param_1 + 0x24) << 8) + (long)(int)param_1[5]; param_2[1] = lVar8; plVar10 = (long *)(lVar9 + 0x28); lVar9 = param_1[3]; if (((*(byte *)(*plVar10 + (ulong)((uint)lVar8 & 0xfff)) & 0x40) != 0) && (0 < *(long *)(lVar9 + 0x18))) { plVar10 = *(long **)(lVar9 + 0x20); plVar3 = plVar10 + *(long *)(lVar9 + 0x18) * 0xb; do { if (((*(char *)((long)plVar10 + 0x52) != '\0') && (*plVar10 == lVar8)) && (plVar10[1] == *param_2)) { *param_1 = (long)plVar10 + 0x32; *(int8 *)((long)param_1 + 0x24) = 0; return plVar10; } plVar10 = plVar10 + 0xb; } while (plVar10 < plVar3); } } if ((*(byte *)(*(long *)(lVar9 + 0x28) + uVar5) & 1) != 0) { local_88[4] = 0; local_88[5] = 0; local_88[2] = 0; local_88[3] = 0; local_88[0] = 0; local_88[1] = 0; if (1 < param_3) { lVar9 = param_1[1]; bVar11 = 4; uVar5 = 1; lVar8 = 8; local_48 = param_1; local_38 = (long *)param_3; do { local_40 = uVar5; uVar1 = (**(code **)(*(long *)(param_1[6] + 0xb8) + 0x28)) (param_1[6],(long)param_2 + lVar8,lVar9,param_1[2]); if ((int)uVar1 < 1) break; lVar9 = lVar9 + (ulong)uVar1; local_88[local_40] = lVar9; lVar4 = param_1[3]; local_50 = *(long *)(lVar4 + 0x28); if ((*(byte *)(local_50 + (ulong)((uint)param_2[local_40] & 0xfff)) & bVar11) == 0) { local_40 = local_40 + 1; goto LAB_00141777; } uVar5 = local_40 + 1; bVar11 = bVar11 * '\x02'; lVar8 = lVar8 + 8; local_40 = (ulong)local_38; } while (local_38 != (long *)uVar5); if (1 < local_40) { lVar4 = local_48[3]; local_50 = *(long *)(lVar4 + 0x28); LAB_00141777: uVar5 = local_40 * 8; uVar6 = local_40; do { uVar7 = uVar6 - 1; if (((*(byte *)(local_50 + (ulong)((uint)param_2[uVar6 - 1] & 0xfff)) & 2) != 0) && (0 < *(long *)(lVar4 + 0x18))) { plVar10 = *(long **)(lVar4 + 0x20); plVar3 = plVar10 + *(long *)(lVar4 + 0x18) * 0xb; local_88[6] = uVar6 * 8; local_40 = uVar5; local_38 = plVar3; do { if (((5 < uVar6) || (*(long *)((long)plVar10 + uVar5) == 0)) && ((*(char *)((long)plVar10 + 0x52) == '\0' && (iVar2 = bcmp(plVar10,param_2,local_88[6]), plVar3 = local_38, uVar5 = local_40, iVar2 == 0)))) { *local_48 = (long)plVar10 + 0x32; local_48[1] = local_88[uVar7]; return plVar10; } plVar10 = plVar10 + 0xb; } while (plVar10 < plVar3); } uVar5 = uVar5 + -8; uVar6 = uVar7; } while (1 < uVar7); } } } return (long *)0x0; }
35,060
find_or_create_table_share(PFS_thread*, bool, TABLE_SHARE const*)
eloqsql/storage/perfschema/pfs_instr_class.cc
PFS_table_share* find_or_create_table_share(PFS_thread *thread, bool temporary, const TABLE_SHARE *share) { /* See comments in register_mutex_class */ PFS_table_share_key key; LF_PINS *pins= get_table_share_hash_pins(thread); if (unlikely(pins == NULL)) { global_table_share_container.m_lost++; return NULL; } const char *schema_name= share->db.str; size_t schema_name_length= share->db.length; const char *table_name= share->table_name.str; size_t table_name_length= share->table_name.length; set_table_share_key(&key, temporary, schema_name, schema_name_length, table_name, table_name_length); PFS_table_share **entry; uint retry_count= 0; const uint retry_max= 3; bool enabled= true; bool timed= true; PFS_table_share *pfs; pfs_dirty_state dirty_state; search: entry= reinterpret_cast<PFS_table_share**> (lf_hash_search(&table_share_hash, pins, key.m_hash_key, key.m_key_length)); if (entry && (entry != MY_ERRPTR)) { pfs= *entry; pfs->inc_refcount() ; if (compare_keys(pfs, share) != 0) { /* Some DDL was detected. - keep the lock stats, they are unaffected - destroy the index stats, indexes changed. - adjust the expected key count - recreate index stats */ pfs->destroy_index_stats(); pfs->m_key_count= share->keys; for (uint index= 0; index < pfs->m_key_count; index++) { (void)pfs->find_or_create_index_stat(share, index); } } lf_hash_search_unpin(pins); return pfs; } lf_hash_search_unpin(pins); if (retry_count == 0) { lookup_setup_object(thread, OBJECT_TYPE_TABLE, schema_name, static_cast<uint>(schema_name_length), table_name, static_cast<uint>(table_name_length), &enabled, &timed); /* Even when enabled is false, a record is added in the dictionary: - It makes enabling a table already in the table cache possible, - It improves performances for the next time a TABLE_SHARE is reloaded in the table cache. */ } pfs= global_table_share_container.allocate(& dirty_state); if (pfs != NULL) { pfs->m_key= key; pfs->m_schema_name= &pfs->m_key.m_hash_key[1]; pfs->m_schema_name_length= static_cast<uint>(schema_name_length); pfs->m_table_name= &pfs->m_key.m_hash_key[schema_name_length + 2]; pfs->m_table_name_length= static_cast<uint>(table_name_length); pfs->m_enabled= enabled; pfs->m_timed= timed; pfs->init_refcount(); pfs->destroy_lock_stat(); pfs->destroy_index_stats(); pfs->m_key_count= share->keys; int res; pfs->m_lock.dirty_to_allocated(& dirty_state); res= lf_hash_insert(&table_share_hash, pins, &pfs); if (likely(res == 0)) { /* Create table share index stats. */ for (uint index= 0; index < pfs->m_key_count; index++) { (void)pfs->find_or_create_index_stat(share, index); } return pfs; } global_table_share_container.deallocate(pfs); if (res > 0) { /* Duplicate insert by another thread */ if (++retry_count > retry_max) { /* Avoid infinite loops */ global_table_share_container.m_lost++; return NULL; } goto search; } /* OOM in lf_hash_insert */ global_table_share_container.m_lost++; return NULL; } return NULL; }
O3
cpp
find_or_create_table_share(PFS_thread*, bool, TABLE_SHARE const*): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1e8, %rsp # imm = 0x1E8 movq %rdx, %rbx movl %esi, %r15d movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq %rdi, -0x1f0(%rbp) movq 0x810(%rdi), %rax movq %rax, -0x1d8(%rbp) testq %rax, %rax je 0x36876 movq 0x2a0(%rbx), %rdx movq 0x2a8(%rbx), %r13 movq 0x2b0(%rbx), %r8 movq 0x2b8(%rbx), %r9 movzbl %r15b, %esi leaq -0x1b8(%rbp), %r14 movq %r14, %rdi movq %rdx, -0x208(%rbp) movq %r13, %rcx movq %r8, -0x200(%rbp) movq %r9, -0x1f8(%rbp) callq 0x368c1 movq %r14, %rdx movb $0x1, %al leaq -0x1ba(%rbp), %rcx movb %al, (%rcx) leaq -0x1b9(%rbp), %rcx movb %al, (%rcx) movq %r13, -0x1e0(%rbp) addq $0x2, %r13 movq %r13, -0x210(%rbp) xorl %r12d, %r12d leaq 0x39736e(%rip), %rdi # 0x3cd840 leaq 0x3736df(%rip), %r14 # 0x3a9bb8 movl $0x0, -0x1cc(%rbp) movq -0x1d8(%rbp), %r15 movl -0x34(%rbp), %ecx movq %r15, %rsi movq %rdx, %r13 callq 0x2c462 cmpq $0x2, %rax jae 0x36756 xorl %eax, %eax xchgq %rax, 0x10(%r15) cmpl $0x0, -0x1cc(%rbp) jne 0x36552 movq -0x1f0(%rbp), %rdi movl $0x4, %esi movq -0x208(%rbp), %rdx movq -0x1e0(%rbp), %rcx movq -0x200(%rbp), %r8 movq -0x1f8(%rbp), %r9 leaq -0x1b9(%rbp), %rax pushq %rax leaq -0x1ba(%rbp), %rax pushq %rax callq 0x39a38 addq $0x10, %rsp leaq 0x36b57f(%rip), %rdi # 0x3a1ad8 leaq -0x1e4(%rbp), %rsi callq 0x37e24 movq %rax, -0x1c8(%rbp) testq %rax, %rax je 0x368a8 movq %rax, %r15 leaq 0x8(%rax), %rdi movl $0x188, %edx # imm = 0x188 movq %r13, %rsi callq 0x26290 leaq 0x9(%r15), %rax movq %rax, 0x190(%r15) movq -0x1e0(%rbp), %rax movl %eax, 0x198(%r15) movq -0x210(%rbp), %rax leaq 0x8(%r15,%rax), %rax movq %rax, 0x1a0(%r15) movq -0x1f8(%rbp), %rax movl %eax, 0x1a8(%r15) movb -0x1ba(%rbp), %al movb %al, 0x4(%r15) movb -0x1b9(%rbp), %al movq -0x1c8(%rbp), %rcx movb %al, 0x5(%rcx) movq -0x1c8(%rbp), %rcx movl $0x1, %eax xchgl %eax, 0x1b8(%rcx) xorl %eax, %eax xchgq %rax, 0x1c0(%rcx) testq %rax, %rax je 0x36624 movq $0x0, 0x168(%rax) movq 0x170(%rax), %rcx movl (%rax), %edx andl $-0x4, %edx xchgl %edx, (%rax) movb %r12b, (%rcx) leaq 0x383678(%rip), %rax # 0x3b9c98 movb %r12b, 0x9(%rax) movl $0x39, %eax movq -0x1c8(%rbp), %rcx movq -0x1d8(%rbp), %rsi leaq -0x1c8(%rbp), %rdx xorl %r9d, %r9d xchgq %r9, (%rcx,%rax,8) testq %r9, %r9 je 0x3666c movq $0x0, 0x150(%r9) movq 0x158(%r9), %r8 movl (%r9), %edi andl $-0x4, %edi xchgl %edi, (%r9) movb %r12b, (%r8) movb %r12b, 0x9(%r14) incq %rax cmpq $0x7a, %rax jne 0x3663e movl 0x3a0(%rbx), %eax movq -0x1c8(%rbp), %rcx movl %eax, 0x1ac(%rcx) movl -0x1e4(%rbp), %eax andl $-0x4, %eax addl $0x6, %eax xchgl %eax, (%rcx) leaq 0x3971a3(%rip), %rdi # 0x3cd840 callq 0x2bc03 movq -0x1c8(%rbp), %r15 testl %eax, %eax je 0x36700 movq 0x1b0(%r15), %rcx movl (%r15), %edx andl $-0x4, %edx xchgl %edx, (%r15) movb %r12b, (%rcx) leaq 0x36b411(%rip), %rcx # 0x3a1ad8 movb %r12b, 0x9(%rcx) testl %eax, %eax jle 0x3689e movl -0x1cc(%rbp), %eax incl %eax movl %eax, -0x1cc(%rbp) cmpl $0x4, %eax movq -0x1d8(%rbp), %r15 movq %r13, %rdx leaq 0x39714b(%rip), %rdi # 0x3cd840 jne 0x364ea jmp 0x3689e cmpl $0x0, 0x1ac(%r15) je 0x3672e xorl %r14d, %r14d movq %r15, %rdi movq %rbx, %rsi movl %r14d, %edx callq 0x35028 incl %r14d movq -0x1c8(%rbp), %r15 cmpl 0x1ac(%r15), %r14d jb 0x3670d movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x368b0 movq %r15, %rax addq $0x1e8, %rsp # imm = 0x1E8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq (%rax), %rax movq %rax, -0x1c8(%rbp) lock incl 0x1b8(%rax) movq -0x1c8(%rbp), %r15 movl 0x1ac(%r15), %ecx cmpl 0x3a0(%rbx), %ecx jne 0x367ee testq %rcx, %rcx je 0x36864 movq 0x1c8(%rbx), %r13 addq $0x48, %r13 xorl %r12d, %r12d movq %rcx, -0x1e0(%rbp) movq 0x1c8(%r15,%r12,8), %rdi testq %rdi, %rdi je 0x367cf movq (%r13), %rdx movl 0xc4(%rdi), %eax cmpq %rax, %rdx jne 0x367e7 addq $0x4, %rdi movq -0x8(%r13), %rsi callq 0x26350 movq -0x1e0(%rbp), %rcx testl %eax, %eax jne 0x367e7 incq %r12 addq $0xc0, %r13 cmpq %r12, %rcx jne 0x3679b movq -0x1c8(%rbp), %r15 jmp 0x36864 movq -0x1c8(%rbp), %r15 movl $0x39, %eax xorl %ecx, %ecx xorl %edx, %edx xchgq %rdx, (%r15,%rax,8) testq %rdx, %rdx je 0x3681f movq $0x0, 0x150(%rdx) movq 0x158(%rdx), %rsi movl (%rdx), %edi andl $-0x4, %edi xchgl %edi, (%rdx) movb %cl, (%rsi) movb %cl, 0x9(%r14) incq %rax cmpq $0x7a, %rax jne 0x367f5 movl 0x3a0(%rbx), %eax movq -0x1c8(%rbp), %r15 movl %eax, 0x1ac(%r15) testl %eax, %eax je 0x36864 xorl %r12d, %r12d movq %r15, %rdi movq %rbx, %rsi movl %r12d, %edx callq 0x35028 incl %r12d movq -0x1c8(%rbp), %r15 cmpl 0x1ac(%r15), %r12d jb 0x36843 xorl %eax, %eax movq -0x1d8(%rbp), %rcx xchgq %rax, 0x10(%rcx) jmp 0x3672e cmpb $0x1, 0x3970d3(%rip) # 0x3cd950 jne 0x3689e leaq 0x396fe2(%rip), %rdi # 0x3cd868 callq 0x2ba28 movq -0x1f0(%rbp), %rcx movq %rax, 0x810(%rcx) testq %rax, %rax jne 0x368b5 leaq 0x36b233(%rip), %rax # 0x3a1ad8 incq (%rax) xorl %r15d, %r15d jmp 0x3672e callq 0x263a0 movq %rax, -0x1d8(%rbp) jmp 0x36458
_Z26find_or_create_table_shareP10PFS_threadbPK11TABLE_SHARE: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 1E8h mov rbx, rdx mov r15d, esi mov rax, fs:28h mov [rbp+var_30], rax mov [rbp+var_1F0], rdi mov rax, [rdi+810h] mov [rbp+var_1D8], rax test rax, rax jz loc_36876 loc_36458: mov rdx, [rbx+2A0h] mov r13, [rbx+2A8h] mov r8, [rbx+2B0h] mov r9, [rbx+2B8h] movzx esi, r15b lea r14, [rbp+var_1B8] mov rdi, r14 mov [rbp+var_208], rdx mov rcx, r13 mov [rbp+var_200], r8 mov [rbp+var_1F8], r9 call _ZL19set_table_share_keyP19PFS_table_share_keybPKcmS2_m; set_table_share_key(PFS_table_share_key *,bool,char const*,ulong,char const*,ulong) mov rdx, r14 mov al, 1 lea rcx, [rbp+var_1BA] mov [rcx], al lea rcx, [rbp+var_1B9] mov [rcx], al mov [rbp+var_1E0], r13 add r13, 2 mov [rbp+var_210], r13 xor r12d, r12d lea rdi, table_share_hash lea r14, global_table_share_index_container mov [rbp+var_1CC], 0 mov r15, [rbp+var_1D8] loc_364EA: mov ecx, [rbp+var_34] mov rsi, r15 mov r13, rdx call lf_hash_search cmp rax, 2 jnb loc_36756 xor eax, eax xchg rax, [r15+10h] cmp [rbp+var_1CC], 0 jnz short loc_36552 mov rdi, [rbp+var_1F0] mov esi, 4 mov rdx, [rbp+var_208] mov rcx, [rbp+var_1E0] mov r8, [rbp+var_200] mov r9, [rbp+var_1F8] lea rax, [rbp+var_1B9] push rax lea rax, [rbp+var_1BA] push rax call _Z19lookup_setup_objectP10PFS_thread16enum_object_typePKciS3_iPbS4_; lookup_setup_object(PFS_thread *,enum_object_type,char const*,int,char const*,int,bool *,bool *) add rsp, 10h loc_36552: lea rdi, global_table_share_container lea rsi, [rbp+var_1E4] call _ZN29PFS_buffer_scalable_containerI15PFS_table_shareLi4096ELi4096E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE8allocateEP15pfs_dirty_state; PFS_buffer_scalable_container<PFS_table_share,4096,4096,PFS_buffer_default_array<PFS_table_share>,PFS_buffer_default_allocator<PFS_table_share>>::allocate(pfs_dirty_state *) mov [rbp+var_1C8], rax test rax, rax jz loc_368A8 mov r15, rax lea rdi, [rax+8] mov edx, 188h mov rsi, r13 call _memcpy lea rax, [r15+9] mov [r15+190h], rax mov rax, [rbp+var_1E0] mov [r15+198h], eax mov rax, [rbp+var_210] lea rax, [r15+rax+8] mov [r15+1A0h], rax mov rax, [rbp+var_1F8] mov [r15+1A8h], eax mov al, [rbp+var_1BA] mov [r15+4], al mov al, [rbp+var_1B9] mov rcx, [rbp+var_1C8] mov [rcx+5], al mov rcx, [rbp+var_1C8] mov eax, 1 xchg eax, [rcx+1B8h] xor eax, eax xchg rax, [rcx+1C0h] test rax, rax jz short loc_36624 mov qword ptr [rax+168h], 0 mov rcx, [rax+170h] mov edx, [rax] and edx, 0FFFFFFFCh xchg edx, [rax] mov [rcx], r12b lea rax, global_table_share_lock_container mov [rax+9], r12b loc_36624: mov eax, 39h ; '9' mov rcx, [rbp+var_1C8] mov rsi, [rbp+var_1D8] lea rdx, [rbp+var_1C8] loc_3663E: xor r9d, r9d xchg r9, [rcx+rax*8] test r9, r9 jz short loc_3666C mov qword ptr [r9+150h], 0 mov r8, [r9+158h] mov edi, [r9] and edi, 0FFFFFFFCh xchg edi, [r9] mov [r8], r12b mov [r14+9], r12b loc_3666C: inc rax cmp rax, 7Ah ; 'z' jnz short loc_3663E mov eax, [rbx+3A0h] mov rcx, [rbp+var_1C8] mov [rcx+1ACh], eax mov eax, [rbp+var_1E4] and eax, 0FFFFFFFCh add eax, 6 xchg eax, [rcx] lea rdi, table_share_hash call lf_hash_insert mov r15, [rbp+var_1C8] test eax, eax jz short loc_36700 mov rcx, [r15+1B0h] mov edx, [r15] and edx, 0FFFFFFFCh xchg edx, [r15] mov [rcx], r12b lea rcx, global_table_share_container mov [rcx+9], r12b test eax, eax jle loc_3689E mov eax, [rbp+var_1CC] inc eax mov [rbp+var_1CC], eax cmp eax, 4 mov r15, [rbp+var_1D8] mov rdx, r13 lea rdi, table_share_hash jnz loc_364EA jmp loc_3689E loc_36700: cmp dword ptr [r15+1ACh], 0 jz short loc_3672E xor r14d, r14d loc_3670D: mov rdi, r15 mov rsi, rbx mov edx, r14d call _ZN15PFS_table_share25find_or_create_index_statEPK11TABLE_SHAREj; PFS_table_share::find_or_create_index_stat(TABLE_SHARE const*,uint) inc r14d mov r15, [rbp+var_1C8] cmp r14d, [r15+1ACh] jb short loc_3670D loc_3672E: mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_368B0 mov rax, r15 add rsp, 1E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_36756: mov rax, [rax] mov [rbp+var_1C8], rax lock inc dword ptr [rax+1B8h] mov r15, [rbp+var_1C8] mov ecx, [r15+1ACh] cmp ecx, [rbx+3A0h] jnz short loc_367EE test rcx, rcx jz loc_36864 mov r13, [rbx+1C8h] add r13, 48h ; 'H' xor r12d, r12d mov [rbp+var_1E0], rcx loc_3679B: mov rdi, [r15+r12*8+1C8h] test rdi, rdi jz short loc_367CF mov rdx, [r13+0] mov eax, [rdi+0C4h] cmp rdx, rax jnz short loc_367E7 add rdi, 4 mov rsi, [r13-8] call _bcmp mov rcx, [rbp+var_1E0] test eax, eax jnz short loc_367E7 loc_367CF: inc r12 add r13, 0C0h cmp rcx, r12 jnz short loc_3679B mov r15, [rbp+var_1C8] jmp short loc_36864 loc_367E7: mov r15, [rbp+var_1C8] loc_367EE: mov eax, 39h ; '9' xor ecx, ecx loc_367F5: xor edx, edx xchg rdx, [r15+rax*8] test rdx, rdx jz short loc_3681F mov qword ptr [rdx+150h], 0 mov rsi, [rdx+158h] mov edi, [rdx] and edi, 0FFFFFFFCh xchg edi, [rdx] mov [rsi], cl mov [r14+9], cl loc_3681F: inc rax cmp rax, 7Ah ; 'z' jnz short loc_367F5 mov eax, [rbx+3A0h] mov r15, [rbp+var_1C8] mov [r15+1ACh], eax test eax, eax jz short loc_36864 xor r12d, r12d loc_36843: mov rdi, r15 mov rsi, rbx mov edx, r12d call _ZN15PFS_table_share25find_or_create_index_statEPK11TABLE_SHAREj; PFS_table_share::find_or_create_index_stat(TABLE_SHARE const*,uint) inc r12d mov r15, [rbp+var_1C8] cmp r12d, [r15+1ACh] jb short loc_36843 loc_36864: xor eax, eax mov rcx, [rbp+var_1D8] xchg rax, [rcx+10h] jmp loc_3672E loc_36876: cmp cs:_ZL23table_share_hash_inited, 1; table_share_hash_inited jnz short loc_3689E lea rdi, unk_3CD868 call lf_pinbox_get_pins mov rcx, [rbp+var_1F0] mov [rcx+810h], rax test rax, rax jnz short loc_368B5 loc_3689E: lea rax, global_table_share_container inc qword ptr [rax] loc_368A8: xor r15d, r15d jmp loc_3672E loc_368B0: call ___stack_chk_fail loc_368B5: mov [rbp+var_1D8], rax jmp loc_36458
volatile __int32 * find_or_create_table_share(long long a1, unsigned __int8 a2, long long a3) { long long v4; // r13 _BYTE *v5; // rdx volatile long long *v6; // r15 _BYTE *v7; // r13 volatile __int32 **v8; // rax volatile __int32 *v9; // rax volatile __int32 *v10; // r15 volatile __int32 *v11; // rcx long long v12; // rax _BYTE *v13; // rcx long long v14; // rax volatile __int32 *v15; // rcx long long v16; // rsi long long v17; // r9 _BYTE *v18; // r8 volatile __int32 *v19; // rcx int v20; // eax volatile __int32 *v21; // r15 _BYTE *v22; // rcx unsigned int v23; // r14d long long v25; // rcx _QWORD *v26; // r13 long long v27; // r12 long long v28; // rdi int v29; // eax long long i; // rax long long v31; // rdx _BYTE *v32; // rsi int v33; // eax unsigned int v34; // r12d long long pins; // rax long long v36; // [rsp+0h] [rbp-210h] long long v37; // [rsp+8h] [rbp-208h] long long v38; // [rsp+10h] [rbp-200h] long long v39; // [rsp+18h] [rbp-1F8h] int v40; // [rsp+2Ch] [rbp-1E4h] BYREF long long v41; // [rsp+30h] [rbp-1E0h] volatile long long *v42; // [rsp+38h] [rbp-1D8h] int v43; // [rsp+44h] [rbp-1CCh] volatile __int32 *v44; // [rsp+48h] [rbp-1C8h] BYREF char v45; // [rsp+56h] [rbp-1BAh] BYREF char v46; // [rsp+57h] [rbp-1B9h] BYREF _BYTE v47[388]; // [rsp+58h] [rbp-1B8h] BYREF unsigned int v48; // [rsp+1DCh] [rbp-34h] unsigned long long v49; // [rsp+1E0h] [rbp-30h] v49 = __readfsqword(0x28u); v42 = *(volatile long long **)(a1 + 2064); if ( v42 ) goto LABEL_2; if ( table_share_hash_inited == 1 ) { pins = lf_pinbox_get_pins((long long)&unk_3CD868); *(_QWORD *)(a1 + 2064) = pins; if ( pins ) { v42 = (volatile long long *)pins; LABEL_2: v4 = *(_QWORD *)(a3 + 680); v37 = *(_QWORD *)(a3 + 672); v38 = *(_QWORD *)(a3 + 688); v39 = *(_QWORD *)(a3 + 696); set_table_share_key(v47, a2, v37, v4); v5 = v47; v45 = 1; v46 = 1; v41 = v4; v36 = v4 + 2; v43 = 0; v6 = v42; while ( 1 ) { v7 = v5; v8 = (volatile __int32 **)lf_hash_search((long long)&table_share_hash, v6, (long long)v5, v48); if ( (unsigned long long)v8 >= 2 ) break; _InterlockedExchange64(v6 + 2, 0LL); if ( !v43 ) lookup_setup_object(a1, 4, v37, v41, v38, v39, (long long)&v45, (long long)&v46); v9 = (volatile __int32 *)PFS_buffer_scalable_container<PFS_table_share,4096,4096,PFS_buffer_default_array<PFS_table_share>,PFS_buffer_default_allocator<PFS_table_share>>::allocate( &global_table_share_container, &v40); v44 = v9; if ( !v9 ) return 0LL; v10 = v9; memcpy(v9 + 2, v7, 392LL); *((_QWORD *)v10 + 50) = (char *)v10 + 9; *((_DWORD *)v10 + 102) = v41; *((_QWORD *)v10 + 52) = (char *)v10 + v36 + 8; *((_DWORD *)v10 + 106) = v39; *((_BYTE *)v10 + 4) = v45; *((_BYTE *)v44 + 5) = v46; v11 = v44; _InterlockedExchange(v44 + 110, 1); v12 = _InterlockedExchange64((volatile long long *)v11 + 56, 0LL); if ( v12 ) { *(_QWORD *)(v12 + 360) = 0LL; v13 = *(_BYTE **)(v12 + 368); _InterlockedExchange((volatile __int32 *)v12, *(_DWORD *)v12 & 0xFFFFFFFC); *v13 = 0; *((_BYTE *)&global_table_share_lock_container + 9) = 0; } v14 = 57LL; v15 = v44; v16 = (long long)v42; do { v17 = _InterlockedExchange64((volatile long long *)&v15[2 * v14], 0LL); if ( v17 ) { *(_QWORD *)(v17 + 336) = 0LL; v18 = *(_BYTE **)(v17 + 344); _InterlockedExchange((volatile __int32 *)v17, *(_DWORD *)v17 & 0xFFFFFFFC); *v18 = 0; *((_BYTE *)&global_table_share_index_container + 9) = 0; } ++v14; } while ( v14 != 122 ); v19 = v44; *((_DWORD *)v44 + 107) = *(_DWORD *)(a3 + 928); _InterlockedExchange(v19, (v40 & 0xFFFFFFFC) + 6); v20 = lf_hash_insert((long long)&table_share_hash, v16, (long long)&v44); v21 = v44; if ( !v20 ) { if ( *((_DWORD *)v44 + 107) ) { v23 = 0; do { PFS_table_share::find_or_create_index_stat((long long)v21, a3, v23++); v21 = v44; } while ( v23 < *((_DWORD *)v44 + 107) ); } return v21; } v22 = (_BYTE *)*((_QWORD *)v44 + 54); _InterlockedExchange(v44, *v44 & 0xFFFFFFFC); *v22 = 0; *((_BYTE *)&global_table_share_container + 9) = 0; if ( v20 > 0 ) { ++v43; v6 = v42; v5 = v7; if ( v43 != 4 ) continue; } goto LABEL_40; } v44 = *v8; _InterlockedIncrement(v44 + 110); v21 = v44; v25 = *((unsigned int *)v44 + 107); if ( (_DWORD)v25 == *(_DWORD *)(a3 + 928) ) { if ( !*((_DWORD *)v44 + 107) ) { LABEL_37: _InterlockedExchange64(v42 + 2, 0LL); return v21; } v26 = (_QWORD *)(*(_QWORD *)(a3 + 456) + 72LL); v27 = 0LL; v41 = *((unsigned int *)v44 + 107); while ( 1 ) { v28 = *(_QWORD *)&v21[2 * v27 + 114]; if ( v28 ) { if ( *v26 != *(_DWORD *)(v28 + 196) ) break; v29 = bcmp(v28 + 4, *(v26 - 1)); v25 = v41; if ( v29 ) break; } ++v27; v26 += 24; if ( v25 == v27 ) { v21 = v44; goto LABEL_37; } } v21 = v44; } for ( i = 57LL; i != 122; ++i ) { v31 = _InterlockedExchange64((volatile long long *)&v21[2 * i], 0LL); if ( v31 ) { *(_QWORD *)(v31 + 336) = 0LL; v32 = *(_BYTE **)(v31 + 344); _InterlockedExchange((volatile __int32 *)v31, *(_DWORD *)v31 & 0xFFFFFFFC); *v32 = 0; *((_BYTE *)&global_table_share_index_container + 9) = 0; } } v33 = *(_DWORD *)(a3 + 928); v21 = v44; *((_DWORD *)v44 + 107) = v33; if ( v33 ) { v34 = 0; do { PFS_table_share::find_or_create_index_stat((long long)v21, a3, v34++); v21 = v44; } while ( v34 < *((_DWORD *)v44 + 107) ); } goto LABEL_37; } } LABEL_40: ++global_table_share_container; return 0LL; }
find_or_create_table_share: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1e8 MOV RBX,RDX MOV R15D,ESI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x1f0],RDI MOV RAX,qword ptr [RDI + 0x810] MOV qword ptr [RBP + -0x1d8],RAX TEST RAX,RAX JZ 0x00136876 LAB_00136458: MOV RDX,qword ptr [RBX + 0x2a0] MOV R13,qword ptr [RBX + 0x2a8] MOV R8,qword ptr [RBX + 0x2b0] MOV R9,qword ptr [RBX + 0x2b8] MOVZX ESI,R15B LEA R14,[RBP + -0x1b8] MOV RDI,R14 MOV qword ptr [RBP + -0x208],RDX MOV RCX,R13 MOV qword ptr [RBP + -0x200],R8 MOV qword ptr [RBP + -0x1f8],R9 CALL 0x001368c1 MOV RDX,R14 MOV AL,0x1 LEA RCX,[RBP + -0x1ba] MOV byte ptr [RCX],AL LEA RCX,[RBP + -0x1b9] MOV byte ptr [RCX],AL MOV qword ptr [RBP + -0x1e0],R13 ADD R13,0x2 MOV qword ptr [RBP + -0x210],R13 XOR R12D,R12D LEA RDI,[0x4cd840] LEA R14,[0x4a9bb8] MOV dword ptr [RBP + -0x1cc],0x0 MOV R15,qword ptr [RBP + -0x1d8] LAB_001364ea: MOV ECX,dword ptr [RBP + -0x34] MOV RSI,R15 MOV R13,RDX CALL 0x0012c462 CMP RAX,0x2 JNC 0x00136756 XOR EAX,EAX XCHG qword ptr [R15 + 0x10],RAX CMP dword ptr [RBP + -0x1cc],0x0 JNZ 0x00136552 MOV RDI,qword ptr [RBP + -0x1f0] MOV ESI,0x4 MOV RDX,qword ptr [RBP + -0x208] MOV RCX,qword ptr [RBP + -0x1e0] MOV R8,qword ptr [RBP + -0x200] MOV R9,qword ptr [RBP + -0x1f8] LEA RAX,[RBP + -0x1b9] PUSH RAX LEA RAX,[RBP + -0x1ba] PUSH RAX CALL 0x00139a38 ADD RSP,0x10 LAB_00136552: LEA RDI,[0x4a1ad8] LEA RSI,[RBP + -0x1e4] CALL 0x00137e24 MOV qword ptr [RBP + -0x1c8],RAX TEST RAX,RAX JZ 0x001368a8 MOV R15,RAX LEA RDI,[RAX + 0x8] MOV EDX,0x188 MOV RSI,R13 CALL 0x00126290 LEA RAX,[R15 + 0x9] MOV qword ptr [R15 + 0x190],RAX MOV RAX,qword ptr [RBP + -0x1e0] MOV dword ptr [R15 + 0x198],EAX MOV RAX,qword ptr [RBP + -0x210] LEA RAX,[R15 + RAX*0x1 + 0x8] MOV qword ptr [R15 + 0x1a0],RAX MOV RAX,qword ptr [RBP + -0x1f8] MOV dword ptr [R15 + 0x1a8],EAX MOV AL,byte ptr [RBP + -0x1ba] MOV byte ptr [R15 + 0x4],AL MOV AL,byte ptr [RBP + -0x1b9] MOV RCX,qword ptr [RBP + -0x1c8] MOV byte ptr [RCX + 0x5],AL MOV RCX,qword ptr [RBP + -0x1c8] MOV EAX,0x1 XCHG dword ptr [RCX + 0x1b8],EAX XOR EAX,EAX XCHG qword ptr [RCX + 0x1c0],RAX TEST RAX,RAX JZ 0x00136624 MOV qword ptr [RAX + 0x168],0x0 MOV RCX,qword ptr [RAX + 0x170] MOV EDX,dword ptr [RAX] AND EDX,0xfffffffc XCHG dword ptr [RAX],EDX MOV byte ptr [RCX],R12B LEA RAX,[0x4b9c98] MOV byte ptr [RAX + 0x9],R12B LAB_00136624: MOV EAX,0x39 MOV RCX,qword ptr [RBP + -0x1c8] MOV RSI,qword ptr [RBP + -0x1d8] LEA RDX,[RBP + -0x1c8] LAB_0013663e: XOR R9D,R9D XCHG qword ptr [RCX + RAX*0x8],R9 TEST R9,R9 JZ 0x0013666c MOV qword ptr [R9 + 0x150],0x0 MOV R8,qword ptr [R9 + 0x158] MOV EDI,dword ptr [R9] AND EDI,0xfffffffc XCHG dword ptr [R9],EDI MOV byte ptr [R8],R12B MOV byte ptr [R14 + 0x9],R12B LAB_0013666c: INC RAX CMP RAX,0x7a JNZ 0x0013663e MOV EAX,dword ptr [RBX + 0x3a0] MOV RCX,qword ptr [RBP + -0x1c8] MOV dword ptr [RCX + 0x1ac],EAX MOV EAX,dword ptr [RBP + -0x1e4] AND EAX,0xfffffffc ADD EAX,0x6 XCHG dword ptr [RCX],EAX LEA RDI,[0x4cd840] CALL 0x0012bc03 MOV R15,qword ptr [RBP + -0x1c8] TEST EAX,EAX JZ 0x00136700 MOV RCX,qword ptr [R15 + 0x1b0] MOV EDX,dword ptr [R15] AND EDX,0xfffffffc XCHG dword ptr [R15],EDX MOV byte ptr [RCX],R12B LEA RCX,[0x4a1ad8] MOV byte ptr [RCX + 0x9],R12B TEST EAX,EAX JLE 0x0013689e MOV EAX,dword ptr [RBP + -0x1cc] INC EAX MOV dword ptr [RBP + -0x1cc],EAX CMP EAX,0x4 MOV R15,qword ptr [RBP + -0x1d8] MOV RDX,R13 LEA RDI,[0x4cd840] JNZ 0x001364ea JMP 0x0013689e LAB_00136700: CMP dword ptr [R15 + 0x1ac],0x0 JZ 0x0013672e XOR R14D,R14D LAB_0013670d: MOV RDI,R15 MOV RSI,RBX MOV EDX,R14D CALL 0x00135028 INC R14D MOV R15,qword ptr [RBP + -0x1c8] CMP R14D,dword ptr [R15 + 0x1ac] JC 0x0013670d LAB_0013672e: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001368b0 MOV RAX,R15 ADD RSP,0x1e8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00136756: MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x1c8],RAX INC.LOCK dword ptr [RAX + 0x1b8] MOV R15,qword ptr [RBP + -0x1c8] MOV ECX,dword ptr [R15 + 0x1ac] CMP ECX,dword ptr [RBX + 0x3a0] JNZ 0x001367ee TEST RCX,RCX JZ 0x00136864 MOV R13,qword ptr [RBX + 0x1c8] ADD R13,0x48 XOR R12D,R12D MOV qword ptr [RBP + -0x1e0],RCX LAB_0013679b: MOV RDI,qword ptr [R15 + R12*0x8 + 0x1c8] TEST RDI,RDI JZ 0x001367cf MOV RDX,qword ptr [R13] MOV EAX,dword ptr [RDI + 0xc4] CMP RDX,RAX JNZ 0x001367e7 ADD RDI,0x4 MOV RSI,qword ptr [R13 + -0x8] CALL 0x00126350 MOV RCX,qword ptr [RBP + -0x1e0] TEST EAX,EAX JNZ 0x001367e7 LAB_001367cf: INC R12 ADD R13,0xc0 CMP RCX,R12 JNZ 0x0013679b MOV R15,qword ptr [RBP + -0x1c8] JMP 0x00136864 LAB_001367e7: MOV R15,qword ptr [RBP + -0x1c8] LAB_001367ee: MOV EAX,0x39 XOR ECX,ECX LAB_001367f5: XOR EDX,EDX XCHG qword ptr [R15 + RAX*0x8],RDX TEST RDX,RDX JZ 0x0013681f MOV qword ptr [RDX + 0x150],0x0 MOV RSI,qword ptr [RDX + 0x158] MOV EDI,dword ptr [RDX] AND EDI,0xfffffffc XCHG dword ptr [RDX],EDI MOV byte ptr [RSI],CL MOV byte ptr [R14 + 0x9],CL LAB_0013681f: INC RAX CMP RAX,0x7a JNZ 0x001367f5 MOV EAX,dword ptr [RBX + 0x3a0] MOV R15,qword ptr [RBP + -0x1c8] MOV dword ptr [R15 + 0x1ac],EAX TEST EAX,EAX JZ 0x00136864 XOR R12D,R12D LAB_00136843: MOV RDI,R15 MOV RSI,RBX MOV EDX,R12D CALL 0x00135028 INC R12D MOV R15,qword ptr [RBP + -0x1c8] CMP R12D,dword ptr [R15 + 0x1ac] JC 0x00136843 LAB_00136864: XOR EAX,EAX MOV RCX,qword ptr [RBP + -0x1d8] XCHG qword ptr [RCX + 0x10],RAX JMP 0x0013672e LAB_00136876: CMP byte ptr [0x004cd950],0x1 JNZ 0x0013689e LEA RDI,[0x4cd868] CALL 0x0012ba28 MOV RCX,qword ptr [RBP + -0x1f0] MOV qword ptr [RCX + 0x810],RAX TEST RAX,RAX JNZ 0x001368b5 LAB_0013689e: LEA RAX,[0x4a1ad8] INC qword ptr [RAX] LAB_001368a8: XOR R15D,R15D JMP 0x0013672e LAB_001368b0: CALL 0x001263a0 LAB_001368b5: MOV qword ptr [RBP + -0x1d8],RAX JMP 0x00136458
/* find_or_create_table_share(PFS_thread*, bool, TABLE_SHARE const*) */ PFS_table_share * find_or_create_table_share(PFS_thread *param_1,bool param_2,TABLE_SHARE *param_3) { uint *puVar1; char *pcVar2; char *pcVar3; int iVar4; int8 *puVar5; PFS_table_share *pPVar6; long lVar7; ulong uVar8; ulong uVar9; size_t *psVar10; uint uVar11; long in_FS_OFFSET; uint local_1ec; ulong local_1e8; long local_1e0; int local_1d4; PFS_table_share *local_1d0; PFS_table_share local_1c2; PFS_table_share local_1c1; PFS_table_share_key local_1c0 [388]; int4 local_3c; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_1e0 = *(long *)(param_1 + 0x810); lVar7 = local_1e0; if (local_1e0 == 0) { if (table_share_hash_inited == '\x01') { lVar7 = lf_pinbox_get_pins(0x4cd868); *(long *)(param_1 + 0x810) = lVar7; if (lVar7 != 0) goto LAB_00136458; } } else { LAB_00136458: local_1e0 = lVar7; pcVar2 = *(char **)(param_3 + 0x2a0); uVar8 = *(ulong *)(param_3 + 0x2a8); pcVar3 = *(char **)(param_3 + 0x2b0); uVar9 = *(ulong *)(param_3 + 0x2b8); set_table_share_key(local_1c0,param_2,pcVar2,uVar8,pcVar3,uVar9); local_1c2 = (PFS_table_share)0x1; local_1c1 = (PFS_table_share)0x1; local_1d4 = 0; local_1e8 = uVar8; do { lVar7 = local_1e0; puVar5 = (int8 *)lf_hash_search(table_share_hash,local_1e0,local_1c0,local_3c); if ((int8 *)0x1 < puVar5) { pPVar6 = (PFS_table_share *)*puVar5; LOCK(); *(uint *)(pPVar6 + 0x1b8) = *(uint *)(pPVar6 + 0x1b8) + 1; UNLOCK(); uVar8 = (ulong)*(uint *)(pPVar6 + 0x1ac); local_1d0 = pPVar6; if (*(uint *)(pPVar6 + 0x1ac) != *(uint *)(param_3 + 0x3a0)) goto LAB_001367ee; if (uVar8 == 0) goto LAB_00136864; psVar10 = (size_t *)(*(long *)(param_3 + 0x1c8) + 0x48); uVar9 = 0; local_1e8 = uVar8; goto LAB_0013679b; } LOCK(); *(int8 *)(lVar7 + 0x10) = 0; UNLOCK(); if (local_1d4 == 0) { lookup_setup_object(param_1,4,pcVar2,local_1e8,pcVar3,uVar9,&local_1c2,&local_1c1); } pPVar6 = (PFS_table_share *) PFS_buffer_scalable_container<PFS_table_share,4096,4096,PFS_buffer_default_array<PFS_table_share>,PFS_buffer_default_allocator<PFS_table_share>> ::allocate((PFS_buffer_scalable_container<PFS_table_share,4096,4096,PFS_buffer_default_array<PFS_table_share>,PFS_buffer_default_allocator<PFS_table_share>> *)&global_table_share_container,(pfs_dirty_state *)&local_1ec); local_1d0 = pPVar6; if (pPVar6 == (PFS_table_share *)0x0) goto LAB_001368a8; memcpy(pPVar6 + 8,local_1c0,0x188); *(PFS_table_share **)(pPVar6 + 400) = pPVar6 + 9; *(uint *)(pPVar6 + 0x198) = (uint)local_1e8; *(PFS_table_share **)(pPVar6 + 0x1a0) = pPVar6 + uVar8 + 10; *(uint *)(pPVar6 + 0x1a8) = (uint)uVar9; pPVar6[4] = local_1c2; local_1d0[5] = local_1c1; LOCK(); *(uint *)(local_1d0 + 0x1b8) = 1; UNLOCK(); LOCK(); puVar1 = *(uint **)(local_1d0 + 0x1c0); *(long *)(local_1d0 + 0x1c0) = 0; UNLOCK(); if (puVar1 != (uint *)0x0) { puVar1[0x5a] = 0; puVar1[0x5b] = 0; LOCK(); *puVar1 = *puVar1 & 0xfffffffc; UNLOCK(); **(int1 **)(puVar1 + 0x5c) = 0; global_table_share_lock_container[9] = 0; } lVar7 = 0x39; do { LOCK(); puVar1 = *(uint **)(local_1d0 + lVar7 * 8); *(long *)(local_1d0 + lVar7 * 8) = 0; UNLOCK(); if (puVar1 != (uint *)0x0) { puVar1[0x54] = 0; puVar1[0x55] = 0; LOCK(); *puVar1 = *puVar1 & 0xfffffffc; UNLOCK(); **(int1 **)(puVar1 + 0x56) = 0; global_table_share_index_container[9] = 0; } lVar7 = lVar7 + 1; } while (lVar7 != 0x7a); *(uint *)(local_1d0 + 0x1ac) = *(uint *)(param_3 + 0x3a0); LOCK(); *(uint *)local_1d0 = (local_1ec & 0xfffffffc) + 6; UNLOCK(); iVar4 = lf_hash_insert(table_share_hash,local_1e0,&local_1d0); if (iVar4 == 0) { pPVar6 = local_1d0; if (*(uint *)(local_1d0 + 0x1ac) != 0) { uVar11 = 0; do { PFS_table_share::find_or_create_index_stat(local_1d0,param_3,uVar11); uVar11 = uVar11 + 1; pPVar6 = local_1d0; } while (uVar11 < *(uint *)(local_1d0 + 0x1ac)); } goto LAB_0013672e; } LOCK(); *(uint *)local_1d0 = *(uint *)local_1d0 & 0xfffffffc; UNLOCK(); **(int1 **)(local_1d0 + 0x1b0) = 0; DAT_004a1ae1 = 0; } while ((0 < iVar4) && (local_1d4 = local_1d4 + 1, local_1d4 != 4)); } global_table_share_container = global_table_share_container + 1; LAB_001368a8: pPVar6 = (PFS_table_share *)0x0; goto LAB_0013672e; LAB_001367ee: lVar7 = 0x39; do { LOCK(); puVar1 = *(uint **)(local_1d0 + lVar7 * 8); *(long *)(local_1d0 + lVar7 * 8) = 0; UNLOCK(); if (puVar1 != (uint *)0x0) { puVar1[0x54] = 0; puVar1[0x55] = 0; LOCK(); *puVar1 = *puVar1 & 0xfffffffc; UNLOCK(); **(int1 **)(puVar1 + 0x56) = 0; global_table_share_index_container[9] = 0; } lVar7 = lVar7 + 1; } while (lVar7 != 0x7a); uVar11 = *(uint *)(param_3 + 0x3a0); *(uint *)(local_1d0 + 0x1ac) = uVar11; if (uVar11 != 0) { uVar11 = 0; do { PFS_table_share::find_or_create_index_stat(local_1d0,param_3,uVar11); uVar11 = uVar11 + 1; } while (uVar11 < *(uint *)(local_1d0 + 0x1ac)); } goto LAB_00136864; while( true ) { uVar9 = uVar9 + 1; psVar10 = psVar10 + 0x18; if (uVar8 == uVar9) break; LAB_0013679b: lVar7 = *(long *)(pPVar6 + uVar9 * 8 + 0x1c8); if ((lVar7 != 0) && ((*psVar10 != (ulong)*(uint *)(lVar7 + 0xc4) || (iVar4 = bcmp((void *)(lVar7 + 4),(void *)psVar10[-1],*psVar10), uVar8 = local_1e8, iVar4 != 0)))) goto LAB_001367ee; } LAB_00136864: LOCK(); *(int8 *)(local_1e0 + 0x10) = 0; UNLOCK(); pPVar6 = local_1d0; LAB_0013672e: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return pPVar6; }
35,061
kv_cache_type_from_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/arg.cpp
static ggml_type kv_cache_type_from_str(const std::string & s) { for (const auto & type : kv_cache_types) { if (ggml_type_name(type) == s) { return type; } } throw std::runtime_error("Unsupported cache type: " + s); }
O2
cpp
kv_cache_type_from_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %r14 movq 0xc662a(%rip), %rbx # 0xfcd78 movq 0xc662b(%rip), %r15 # 0xfcd80 cmpq %r15, %rbx je 0x36783 movl (%rbx), %edi callq 0x23850 movq %rax, %rdi movq %r14, %rsi callq 0x45e40 testb %al, %al jne 0x36776 addq $0x4, %rbx jmp 0x36755 movl (%rbx), %eax addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x23450 movq %rax, %rbx leaq 0x79998(%rip), %rsi # 0xb012d leaq 0x8(%rsp), %rdi movq %r14, %rdx callq 0x39318 movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x23e20 xorl %ebp, %ebp movq 0xc5835(%rip), %rsi # 0xfbff0 movq 0xc5796(%rip), %rdx # 0xfbf58 movq %rbx, %rdi callq 0x23ef0 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x241b8 testb %bpl, %bpl jne 0x367e1 jmp 0x367e9 movq %rax, %r14 movq %rbx, %rdi callq 0x23680 movq %r14, %rdi callq 0x23f80 nop
_ZL22kv_cache_type_from_strRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push rbx sub rsp, 28h mov r14, rdi mov rbx, cs:_ZL14kv_cache_types; kv_cache_types mov r15, cs:qword_FCD80 loc_36755: cmp rbx, r15 jz short loc_36783 mov edi, [rbx] call _ggml_type_name mov rdi, rax mov rsi, r14 call _ZSteqIcSt11char_traitsIcESaIcEEbPKT_RKNSt7__cxx1112basic_stringIS3_T0_T1_EE; std::operator==<char>(char const*,std::string const&) test al, al jnz short loc_36776 add rbx, 4 jmp short loc_36755 loc_36776: mov eax, [rbx] add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn loc_36783: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aUnsupportedCac; "Unsupported cache type: " lea rdi, [rsp+48h+var_40] mov rdx, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov bpl, 1 lea rsi, [rsp+48h+var_40] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_367E1 jmp short loc_367E9 mov r14, rax loc_367E1: mov rdi, rbx; void * call ___cxa_free_exception loc_367E9: mov rdi, r14 call __Unwind_Resume
long long kv_cache_type_from_str(long long a1) { unsigned int *v1; // rbx long long v2; // r15 long long v3; // rax void *exception; // rbx _BYTE v6[64]; // [rsp+8h] [rbp-40h] BYREF v1 = (unsigned int *)kv_cache_types; v2 = qword_FCD80; while ( 1 ) { if ( v1 == (unsigned int *)v2 ) { exception = __cxa_allocate_exception(0x10uLL); std::operator+<char>(v6, "Unsupported cache type: ", a1); std::runtime_error::runtime_error(exception, v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v3 = ggml_type_name(*v1); if ( (unsigned __int8)std::operator==<char>(v3, a1) ) break; ++v1; } return *v1; }
kv_cache_type_from_str: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV R14,RDI MOV RBX,qword ptr [0x001fcd78] MOV R15,qword ptr [0x001fcd80] LAB_00136755: CMP RBX,R15 JZ 0x00136783 MOV EDI,dword ptr [RBX] CALL 0x00123850 MOV RDI,RAX MOV RSI,R14 CALL 0x00145e40 TEST AL,AL JNZ 0x00136776 ADD RBX,0x4 JMP 0x00136755 LAB_00136776: MOV EAX,dword ptr [RBX] ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET LAB_00136783: PUSH 0x10 POP RDI CALL 0x00123450 MOV RBX,RAX LAB_0013678e: LEA RSI,[0x1b012d] LEA RDI,[RSP + 0x8] MOV RDX,R14 CALL 0x00139318 MOV BPL,0x1 LAB_001367a5: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x00123e20 XOR EBP,EBP MOV RSI,qword ptr [0x001fbff0] MOV RDX,qword ptr [0x001fbf58] MOV RDI,RBX CALL 0x00123ef0
/* kv_cache_type_from_str(std::__cxx11::string const&) */ int4 kv_cache_type_from_str(string *param_1) { int4 *puVar1; bool bVar2; char *pcVar3; runtime_error *this; int4 *puVar4; string local_40 [32]; puVar1 = DAT_001fcd80; puVar4 = kv_cache_types; while( true ) { if (puVar4 == puVar1) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0013678e to 001367a1 has its CatchHandler @ 001367de */ std::operator+((char *)local_40,(string *)"Unsupported cache type: "); /* try { // try from 001367a5 to 001367c9 has its CatchHandler @ 001367ca */ std::runtime_error::runtime_error(this,local_40); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58); } pcVar3 = (char *)ggml_type_name(*puVar4); bVar2 = std::operator==(pcVar3,param_1); if (bVar2) break; puVar4 = puVar4 + 1; } return *puVar4; }
35,062
quantize_row_q8_1_ref
ngxson[P]ggml-easy/ggml/src/ggml-quants.c
void quantize_row_q8_1_ref(const float * GGML_RESTRICT x, block_q8_1 * GGML_RESTRICT y, int64_t k) { assert(QK8_1 == 32); assert(k % QK8_1 == 0); const int nb = k / QK8_1; for (int i = 0; i < nb; i++) { float amax = 0.0f; // absolute max for (int j = 0; j < QK8_1; j++) { const float v = x[i*QK8_1 + j]; amax = MAX(amax, fabsf(v)); } const float d = amax / ((1 << 7) - 1); const float id = d ? 1.0f/d : 0.0f; y[i].d = GGML_FP32_TO_FP16(d); int sum = 0; for (int j = 0; j < QK8_1/2; ++j) { const float v0 = x[i*QK8_1 + j]*id; const float v1 = x[i*QK8_1 + QK8_1/2 + j]*id; y[i].qs[ j] = roundf(v0); y[i].qs[QK8_1/2 + j] = roundf(v1); sum += y[i].qs[ j]; sum += y[i].qs[QK8_1/2 + j]; } y[i].s = GGML_FP32_TO_FP16(sum*d); } }
O3
c
quantize_row_q8_1_ref: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rsi, 0x28(%rsp) leaq 0x1f(%rdx), %r15 testq %rdx, %rdx cmovnsq %rdx, %r15 sarq $0x5, %r15 testl %r15d, %r15d jle 0x2c90d movq %rdi, %r14 andl $0x7fffffff, %r15d # imm = 0x7FFFFFFF movq 0x28(%rsp), %rax leaq 0x14(%rax), %r12 xorl %r13d, %r13d movaps 0x1d9b5(%rip), %xmm1 # 0x4a020 movss 0x1da75(%rip), %xmm2 # 0x4a0e8 movss 0x1da71(%rip), %xmm3 # 0x4a0ec movl $0x40000000, %edi # imm = 0x40000000 movl $0x7e00, %r8d # imm = 0x7E00 xorl %eax, %eax xorps %xmm4, %xmm4 movss (%r14,%rax,4), %xmm0 andps %xmm1, %xmm0 maxss %xmm0, %xmm4 incq %rax cmpq $0x20, %rax jne 0x2c68b divss 0x22473(%rip), %xmm4 # 0x4eb1c movaps %xmm4, %xmm0 andps %xmm1, %xmm0 mulss %xmm2, %xmm0 mulss %xmm3, %xmm0 movd %xmm4, %eax leal (%rax,%rax), %ecx movl %eax, %edx andl $0x7f800000, %edx # imm = 0x7F800000 addl $0x7800000, %edx # imm = 0x7800000 cmpl $0x71000000, %ecx # imm = 0x71000000 cmovbl %edi, %edx movd %edx, %xmm1 addss %xmm0, %xmm1 movd %xmm1, %edx movl %edx, %esi shrl $0xd, %esi andl $0x7c00, %esi # imm = 0x7C00 andl $0xfff, %edx # imm = 0xFFF addl %esi, %edx shrl $0x10, %eax andl $0x8000, %eax # imm = 0x8000 cmpl $0xff000001, %ecx # imm = 0xFF000001 cmovael %r8d, %edx orl %eax, %edx leaq (,%r13,8), %rax addq %r13, %rax movq 0x28(%rsp), %rcx leaq (%rcx,%rax,4), %rbp movw %dx, (%rbp) movss 0x1d9c8(%rip), %xmm0 # 0x4a0f0 divss %xmm4, %xmm0 movaps %xmm4, 0x50(%rsp) cmpneqss 0x223da(%rip), %xmm4 # 0x4eb14 andps %xmm0, %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] movaps %xmm4, 0x60(%rsp) xorps %xmm1, %xmm1 xorl %ebx, %ebx movaps %xmm1, 0x70(%rsp) movups (%r14,%rbx,4), %xmm2 movups 0x40(%r14,%rbx,4), %xmm1 movaps 0x60(%rsp), %xmm0 mulps %xmm0, %xmm2 movaps %xmm2, 0x10(%rsp) mulps %xmm0, %xmm1 movaps %xmm1, 0x30(%rsp) movaps %xmm2, %xmm0 shufps $0xff, %xmm2, %xmm0 # xmm0 = xmm0[3,3],xmm2[3,3] callq 0x170e0 movaps %xmm0, (%rsp) movaps 0x10(%rsp), %xmm0 movhlps %xmm0, %xmm0 # xmm0 = xmm0[1,1] callq 0x170e0 unpcklps (%rsp), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1] movaps %xmm0, (%rsp) movaps 0x10(%rsp), %xmm0 callq 0x170e0 movaps %xmm0, 0x40(%rsp) movaps 0x10(%rsp), %xmm0 shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1] callq 0x170e0 movaps 0x40(%rsp), %xmm1 unpcklps %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1] unpcklpd (%rsp), %xmm1 # xmm1 = xmm1[0],mem[0] cvttps2dq %xmm1, %xmm0 movdqa %xmm0, 0x10(%rsp) packssdw %xmm0, %xmm0 packsswb %xmm0, %xmm0 movd %xmm0, -0x10(%r12,%rbx) movaps 0x30(%rsp), %xmm0 shufps $0xff, %xmm0, %xmm0 # xmm0 = xmm0[3,3,3,3] callq 0x170e0 movaps %xmm0, (%rsp) movaps 0x30(%rsp), %xmm0 movhlps %xmm0, %xmm0 # xmm0 = xmm0[1,1] callq 0x170e0 unpcklps (%rsp), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1] movaps %xmm0, (%rsp) movaps 0x30(%rsp), %xmm0 callq 0x170e0 movaps %xmm0, 0x40(%rsp) movaps 0x30(%rsp), %xmm0 shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1] callq 0x170e0 movdqa 0x70(%rsp), %xmm1 movaps 0x40(%rsp), %xmm2 unpcklps %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1] unpcklpd (%rsp), %xmm2 # xmm2 = xmm2[0],mem[0] cvttps2dq %xmm2, %xmm0 paddd 0x10(%rsp), %xmm1 paddd %xmm0, %xmm1 packssdw %xmm0, %xmm0 packsswb %xmm0, %xmm0 movd %xmm0, (%r12,%rbx) addq $0x4, %rbx cmpq $0x10, %rbx jne 0x2c74b pshufd $0xee, %xmm1, %xmm0 # xmm0 = xmm1[2,3,2,3] paddd %xmm1, %xmm0 pshufd $0x55, %xmm0, %xmm1 # xmm1 = xmm0[1,1,1,1] paddd %xmm0, %xmm1 cvtdq2ps %xmm1, %xmm0 movaps 0x50(%rsp), %xmm4 mulss %xmm0, %xmm4 movd %xmm4, %eax movaps 0x1d79e(%rip), %xmm1 # 0x4a020 andps %xmm1, %xmm4 movss 0x1d85b(%rip), %xmm2 # 0x4a0e8 mulss %xmm2, %xmm4 leal (%rax,%rax), %ecx movl %eax, %edx andl $0x7f800000, %edx # imm = 0x7F800000 addl $0x7800000, %edx # imm = 0x7800000 cmpl $0x71000000, %ecx # imm = 0x71000000 movl $0x40000000, %edi # imm = 0x40000000 cmovbl %edi, %edx movss 0x1d834(%rip), %xmm3 # 0x4a0ec mulss %xmm3, %xmm4 movd %edx, %xmm0 addss %xmm4, %xmm0 movd %xmm0, %edx movl %edx, %esi shrl $0xd, %esi andl $0x7c00, %esi # imm = 0x7C00 andl $0xfff, %edx # imm = 0xFFF addl %esi, %edx shrl $0x10, %eax andl $0x8000, %eax # imm = 0x8000 cmpl $0xff000001, %ecx # imm = 0xFF000001 movl $0x7e00, %r8d # imm = 0x7E00 cmovael %r8d, %edx orl %eax, %edx movw %dx, 0x2(%rbp) incq %r13 subq $-0x80, %r14 addq $0x24, %r12 cmpq %r15, %r13 jne 0x2c686 addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
quantize_row_q8_1_ref: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov [rsp+0B8h+var_90], rsi lea r15, [rdx+1Fh] test rdx, rdx cmovns r15, rdx sar r15, 5 test r15d, r15d jle loc_2C90D mov r14, rdi and r15d, 7FFFFFFFh mov rax, [rsp+0B8h+var_90] lea r12, [rax+14h] xor r13d, r13d movaps xmm1, cs:xmmword_4A020 movss xmm2, cs:dword_4A0E8 movss xmm3, cs:dword_4A0EC mov edi, 40000000h mov r8d, 7E00h loc_2C686: xor eax, eax xorps xmm4, xmm4 loc_2C68B: movss xmm0, dword ptr [r14+rax*4] andps xmm0, xmm1 maxss xmm4, xmm0 inc rax cmp rax, 20h ; ' ' jnz short loc_2C68B divss xmm4, cs:dword_4EB1C movaps xmm0, xmm4 andps xmm0, xmm1 mulss xmm0, xmm2 mulss xmm0, xmm3 movd eax, xmm4 lea ecx, [rax+rax] mov edx, eax and edx, 7F800000h add edx, 7800000h cmp ecx, 71000000h cmovb edx, edi movd xmm1, edx addss xmm1, xmm0 movd edx, xmm1 mov esi, edx shr esi, 0Dh and esi, 7C00h and edx, 0FFFh add edx, esi shr eax, 10h and eax, 8000h cmp ecx, 0FF000001h cmovnb edx, r8d or edx, eax lea rax, ds:0[r13*8] add rax, r13 mov rcx, [rsp+0B8h+var_90] lea rbp, [rcx+rax*4] mov [rbp+0], dx movss xmm0, cs:dword_4A0F0 divss xmm0, xmm4 movaps [rsp+0B8h+var_68], xmm4 cmpneqss xmm4, cs:dword_4EB14 andps xmm4, xmm0 shufps xmm4, xmm4, 0 movaps [rsp+0B8h+var_58], xmm4 xorps xmm1, xmm1 xor ebx, ebx loc_2C74B: movaps [rsp+0B8h+var_48], xmm1 movups xmm2, xmmword ptr [r14+rbx*4] movups xmm1, xmmword ptr [r14+rbx*4+40h] movaps xmm0, [rsp+0B8h+var_58] mulps xmm2, xmm0 movaps [rsp+0B8h+var_A8], xmm2 mulps xmm1, xmm0 movaps [rsp+0B8h+var_88], xmm1 movaps xmm0, xmm2 shufps xmm0, xmm2, 0FFh call _roundf movaps [rsp+0B8h+var_B8], xmm0 movaps xmm0, [rsp+0B8h+var_A8] movhlps xmm0, xmm0 call _roundf unpcklps xmm0, [rsp+0B8h+var_B8] movaps [rsp+0B8h+var_B8], xmm0 movaps xmm0, [rsp+0B8h+var_A8] call _roundf movaps [rsp+0B8h+var_78], xmm0 movaps xmm0, [rsp+0B8h+var_A8] shufps xmm0, xmm0, 55h ; 'U' call _roundf movaps xmm1, [rsp+0B8h+var_78] unpcklps xmm1, xmm0 unpcklpd xmm1, [rsp+0B8h+var_B8] cvttps2dq xmm0, xmm1 movdqa [rsp+0B8h+var_A8], xmm0 packssdw xmm0, xmm0 packsswb xmm0, xmm0 movd dword ptr [r12+rbx-10h], xmm0 movaps xmm0, [rsp+0B8h+var_88] shufps xmm0, xmm0, 0FFh call _roundf movaps [rsp+0B8h+var_B8], xmm0 movaps xmm0, [rsp+0B8h+var_88] movhlps xmm0, xmm0 call _roundf unpcklps xmm0, [rsp+0B8h+var_B8] movaps [rsp+0B8h+var_B8], xmm0 movaps xmm0, [rsp+0B8h+var_88] call _roundf movaps [rsp+0B8h+var_78], xmm0 movaps xmm0, [rsp+0B8h+var_88] shufps xmm0, xmm0, 55h ; 'U' call _roundf movdqa xmm1, [rsp+0B8h+var_48] movaps xmm2, [rsp+0B8h+var_78] unpcklps xmm2, xmm0 unpcklpd xmm2, [rsp+0B8h+var_B8] cvttps2dq xmm0, xmm2 paddd xmm1, [rsp+0B8h+var_A8] paddd xmm1, xmm0 packssdw xmm0, xmm0 packsswb xmm0, xmm0 movd dword ptr [r12+rbx], xmm0 add rbx, 4 cmp rbx, 10h jnz loc_2C74B pshufd xmm0, xmm1, 0EEh paddd xmm0, xmm1 pshufd xmm1, xmm0, 55h ; 'U' paddd xmm1, xmm0 cvtdq2ps xmm0, xmm1 movaps xmm4, [rsp+0B8h+var_68] mulss xmm4, xmm0 movd eax, xmm4 movaps xmm1, cs:xmmword_4A020 andps xmm4, xmm1 movss xmm2, cs:dword_4A0E8 mulss xmm4, xmm2 lea ecx, [rax+rax] mov edx, eax and edx, 7F800000h add edx, 7800000h cmp ecx, 71000000h mov edi, 40000000h cmovb edx, edi movss xmm3, cs:dword_4A0EC mulss xmm4, xmm3 movd xmm0, edx addss xmm0, xmm4 movd edx, xmm0 mov esi, edx shr esi, 0Dh and esi, 7C00h and edx, 0FFFh add edx, esi shr eax, 10h and eax, 8000h cmp ecx, 0FF000001h mov r8d, 7E00h cmovnb edx, r8d or edx, eax mov [rbp+2], dx inc r13 sub r14, 0FFFFFFFFFFFFFF80h add r12, 24h ; '$' cmp r13, r15 jnz loc_2C686 loc_2C90D: add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
void quantize_row_q8_1_ref(long long a1, long long a2, long long a3) { long long v4; // r15 long long v5; // r12 long long v6; // r13 long long v7; // rax __m128 v8; // xmm4 float v9; // xmm0_4 unsigned int v10; // eax unsigned int v11; // ecx unsigned int v12; // edx __m128i v13; // xmm1 unsigned int v14; // edx int v15; // edx int v16; // eax _WORD *v17; // rbp __m128 v18; // xmm0 __m128 v19; // rt1 __m128 v20; // xmm4 __m128i v21; // xmm1 long long i; // rbx __m128 v23; // xmm0 __m128 v24; // xmm0 __m128 v25; // xmm0 __m128i v26; // xmm0 __m128 v27; // xmm0 __m128 v28; // xmm0 __m128 v29; // xmm0 __m128i v30; // xmm0 __m128i v31; // xmm0 __m128i v32; // xmm0 __m128i v33; // xmm4 unsigned int v34; // eax float v35; // xmm4_4 unsigned int v36; // ecx unsigned int v37; // edx __m128i v38; // xmm0 unsigned int v39; // edx int v40; // edx int v41; // eax __m128 v42; // [rsp+0h] [rbp-B8h] __m128d v43; // [rsp+0h] [rbp-B8h] __m128 v44; // [rsp+0h] [rbp-B8h] __m128d v45; // [rsp+0h] [rbp-B8h] __m128 v46; // [rsp+10h] [rbp-A8h] __m128i v47; // [rsp+10h] [rbp-A8h] __m128 v48; // [rsp+30h] [rbp-88h] __m128 v49; // [rsp+40h] [rbp-78h] __m128 v50; // [rsp+40h] [rbp-78h] __m128 v51; // [rsp+50h] [rbp-68h] __m128 v52; // [rsp+60h] [rbp-58h] __m128i v53[4]; // [rsp+70h] [rbp-48h] BYREF if ( (int)(a3 / 32) > 0 ) { v4 = (a3 / 32) & 0x7FFFFFFF; v5 = a2 + 20; v6 = 0LL; do { v7 = 0LL; v8 = 0LL; do v8.m128_f32[0] = fmaxf(v8.m128_f32[0], fabs(*(float *)(a1 + 4 * v7++))); while ( v7 != 32 ); v8.m128_f32[0] = v8.m128_f32[0] / 127.0; v9 = (float)(fabs(v8.m128_f32[0]) * 5.1922969e33) * 7.7037198e-34; v10 = _mm_cvtsi128_si32((__m128i)v8); v11 = 2 * v10; v12 = (v10 & 0x7F800000) + 125829120; if ( 2 * v10 < 0x71000000 ) v12 = 0x40000000; v13 = _mm_cvtsi32_si128(v12); *(float *)v13.m128i_i32 = *(float *)v13.m128i_i32 + v9; v14 = _mm_cvtsi128_si32(v13); v15 = ((v14 >> 13) & 0x7C00) + (v14 & 0xFFF); v16 = HIWORD(v10) & 0x8000; if ( v11 >= 0xFF000001 ) LOWORD(v15) = 32256; v17 = (_WORD *)(a2 + 36 * v6); *v17 = v16 | v15; v18 = (__m128)0x3F800000u; v18.m128_f32[0] = 1.0 / v8.m128_f32[0]; v51 = v8; v19.m128_i32[0] = 0; v20 = _mm_and_ps(_mm_cmpneq_ss(v8, v19), v18); v52 = _mm_shuffle_ps(v20, v20, 0); v21 = 0LL; for ( i = 0LL; i != 16; i += 4LL ) { v53[0] = v21; v46 = _mm_mul_ps(*(__m128 *)(a1 + 4 * i), v52); v48 = _mm_mul_ps(*(__m128 *)(a1 + 4 * i + 64), v52); v23 = _mm_shuffle_ps(v46, v46, 255); *(double *)v23.m128_u64 = roundf(*(double *)v23.m128_u64); v42 = v23; v24 = _mm_movehl_ps(v46, v46); *(double *)v24.m128_u64 = roundf(*(double *)v24.m128_u64); v43 = (__m128d)_mm_unpacklo_ps(v24, v42); v24.m128_u64[1] = v46.m128_u64[1]; *(double *)v24.m128_u64 = roundf(*(double *)v46.m128_u64); v49 = v24; v25 = _mm_shuffle_ps(v46, v46, 85); *(double *)v25.m128_u64 = roundf(*(double *)v25.m128_u64); v47 = _mm_cvttps_epi32((__m128)_mm_unpacklo_pd((__m128d)_mm_unpacklo_ps(v49, v25), v43)); v26 = _mm_packs_epi32(v47, v47); *(_DWORD *)(v5 + i - 16) = _mm_cvtsi128_si32(_mm_packs_epi16(v26, v26)); v27 = _mm_shuffle_ps(v48, v48, 255); *(double *)v27.m128_u64 = roundf(*(double *)v27.m128_u64); v44 = v27; v28 = _mm_movehl_ps(v48, v48); *(double *)v28.m128_u64 = roundf(*(double *)v28.m128_u64); v45 = (__m128d)_mm_unpacklo_ps(v28, v44); v28.m128_u64[1] = v48.m128_u64[1]; *(double *)v28.m128_u64 = roundf(*(double *)v48.m128_u64); v50 = v28; v29 = _mm_shuffle_ps(v48, v48, 85); *(double *)v29.m128_u64 = roundf(*(double *)v29.m128_u64); v30 = _mm_cvttps_epi32((__m128)_mm_unpacklo_pd((__m128d)_mm_unpacklo_ps(v50, v29), v45)); v21 = _mm_add_epi32(_mm_add_epi32(_mm_load_si128(v53), v47), v30); v31 = _mm_packs_epi32(v30, v30); *(_DWORD *)(v5 + i) = _mm_cvtsi128_si32(_mm_packs_epi16(v31, v31)); } v32 = _mm_add_epi32(_mm_shuffle_epi32(v21, 238), v21); v33 = (__m128i)v51; *(float *)v33.m128i_i32 = v51.m128_f32[0] * _mm_cvtepi32_ps(_mm_add_epi32(_mm_shuffle_epi32(v32, 85), v32)).m128_f32[0]; v34 = _mm_cvtsi128_si32(v33); v35 = fabs(*(float *)v33.m128i_i32) * 5.1922969e33; v36 = 2 * v34; v37 = (v34 & 0x7F800000) + 125829120; if ( 2 * v34 < 0x71000000 ) v37 = 0x40000000; v38 = _mm_cvtsi32_si128(v37); *(float *)v38.m128i_i32 = *(float *)v38.m128i_i32 + (float)(v35 * 7.7037198e-34); v39 = _mm_cvtsi128_si32(v38); v40 = ((v39 >> 13) & 0x7C00) + (v39 & 0xFFF); v41 = HIWORD(v34) & 0x8000; if ( v36 >= 0xFF000001 ) LOWORD(v40) = 32256; v17[1] = v41 | v40; ++v6; a1 += 128LL; v5 += 36LL; } while ( v6 != v4 ); } }
quantize_row_q8_1_ref: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV qword ptr [RSP + 0x28],RSI LEA R15,[RDX + 0x1f] TEST RDX,RDX CMOVNS R15,RDX SAR R15,0x5 TEST R15D,R15D JLE 0x0012c90d MOV R14,RDI AND R15D,0x7fffffff MOV RAX,qword ptr [RSP + 0x28] LEA R12,[RAX + 0x14] XOR R13D,R13D MOVAPS XMM1,xmmword ptr [0x0014a020] MOVSS XMM2,dword ptr [0x0014a0e8] MOVSS XMM3,dword ptr [0x0014a0ec] MOV EDI,0x40000000 MOV R8D,0x7e00 LAB_0012c686: XOR EAX,EAX XORPS XMM4,XMM4 LAB_0012c68b: MOVSS XMM0,dword ptr [R14 + RAX*0x4] ANDPS XMM0,XMM1 MAXSS XMM4,XMM0 INC RAX CMP RAX,0x20 JNZ 0x0012c68b DIVSS XMM4,dword ptr [0x0014eb1c] MOVAPS XMM0,XMM4 ANDPS XMM0,XMM1 MULSS XMM0,XMM2 MULSS XMM0,XMM3 MOVD EAX,XMM4 LEA ECX,[RAX + RAX*0x1] MOV EDX,EAX AND EDX,0x7f800000 ADD EDX,0x7800000 CMP ECX,0x71000000 CMOVC EDX,EDI MOVD XMM1,EDX ADDSS XMM1,XMM0 MOVD EDX,XMM1 MOV ESI,EDX SHR ESI,0xd AND ESI,0x7c00 AND EDX,0xfff ADD EDX,ESI SHR EAX,0x10 AND EAX,0x8000 CMP ECX,0xff000001 CMOVNC EDX,R8D OR EDX,EAX LEA RAX,[R13*0x8] ADD RAX,R13 MOV RCX,qword ptr [RSP + 0x28] LEA RBP,[RCX + RAX*0x4] MOV word ptr [RBP],DX MOVSS XMM0,dword ptr [0x0014a0f0] DIVSS XMM0,XMM4 MOVAPS xmmword ptr [RSP + 0x50],XMM4 CMPNEQSS XMM4,dword ptr [0x0014eb14] ANDPS XMM4,XMM0 SHUFPS XMM4,XMM4,0x0 MOVAPS xmmword ptr [RSP + 0x60],XMM4 XORPS XMM1,XMM1 XOR EBX,EBX LAB_0012c74b: MOVAPS xmmword ptr [RSP + 0x70],XMM1 MOVUPS XMM2,xmmword ptr [R14 + RBX*0x4] MOVUPS XMM1,xmmword ptr [R14 + RBX*0x4 + 0x40] MOVAPS XMM0,xmmword ptr [RSP + 0x60] MULPS XMM2,XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM2 MULPS XMM1,XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM1 MOVAPS XMM0,XMM2 SHUFPS XMM0,XMM2,0xff CALL 0x001170e0 MOVAPS xmmword ptr [RSP],XMM0 MOVAPS XMM0,xmmword ptr [RSP + 0x10] MOVHLPS XMM0,XMM0 CALL 0x001170e0 UNPCKLPS XMM0,xmmword ptr [RSP] MOVAPS xmmword ptr [RSP],XMM0 MOVAPS XMM0,xmmword ptr [RSP + 0x10] CALL 0x001170e0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVAPS XMM0,xmmword ptr [RSP + 0x10] SHUFPS XMM0,XMM0,0x55 CALL 0x001170e0 MOVAPS XMM1,xmmword ptr [RSP + 0x40] UNPCKLPS XMM1,XMM0 UNPCKLPD XMM1,xmmword ptr [RSP] CVTTPS2DQ XMM0,XMM1 MOVDQA xmmword ptr [RSP + 0x10],XMM0 PACKSSDW XMM0,XMM0 PACKSSWB XMM0,XMM0 MOVD dword ptr [R12 + RBX*0x1 + -0x10],XMM0 MOVAPS XMM0,xmmword ptr [RSP + 0x30] SHUFPS XMM0,XMM0,0xff CALL 0x001170e0 MOVAPS xmmword ptr [RSP],XMM0 MOVAPS XMM0,xmmword ptr [RSP + 0x30] MOVHLPS XMM0,XMM0 CALL 0x001170e0 UNPCKLPS XMM0,xmmword ptr [RSP] MOVAPS xmmword ptr [RSP],XMM0 MOVAPS XMM0,xmmword ptr [RSP + 0x30] CALL 0x001170e0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVAPS XMM0,xmmword ptr [RSP + 0x30] SHUFPS XMM0,XMM0,0x55 CALL 0x001170e0 MOVDQA XMM1,xmmword ptr [RSP + 0x70] MOVAPS XMM2,xmmword ptr [RSP + 0x40] UNPCKLPS XMM2,XMM0 UNPCKLPD XMM2,xmmword ptr [RSP] CVTTPS2DQ XMM0,XMM2 PADDD XMM1,xmmword ptr [RSP + 0x10] PADDD XMM1,XMM0 PACKSSDW XMM0,XMM0 PACKSSWB XMM0,XMM0 MOVD dword ptr [R12 + RBX*0x1],XMM0 ADD RBX,0x4 CMP RBX,0x10 JNZ 0x0012c74b PSHUFD XMM0,XMM1,0xee PADDD XMM0,XMM1 PSHUFD XMM1,XMM0,0x55 PADDD XMM1,XMM0 CVTDQ2PS XMM0,XMM1 MOVAPS XMM4,xmmword ptr [RSP + 0x50] MULSS XMM4,XMM0 MOVD EAX,XMM4 MOVAPS XMM1,xmmword ptr [0x0014a020] ANDPS XMM4,XMM1 MOVSS XMM2,dword ptr [0x0014a0e8] MULSS XMM4,XMM2 LEA ECX,[RAX + RAX*0x1] MOV EDX,EAX AND EDX,0x7f800000 ADD EDX,0x7800000 CMP ECX,0x71000000 MOV EDI,0x40000000 CMOVC EDX,EDI MOVSS XMM3,dword ptr [0x0014a0ec] MULSS XMM4,XMM3 MOVD XMM0,EDX ADDSS XMM0,XMM4 MOVD EDX,XMM0 MOV ESI,EDX SHR ESI,0xd AND ESI,0x7c00 AND EDX,0xfff ADD EDX,ESI SHR EAX,0x10 AND EAX,0x8000 CMP ECX,0xff000001 MOV R8D,0x7e00 CMOVNC EDX,R8D OR EDX,EAX MOV word ptr [RBP + 0x2],DX INC R13 SUB R14,-0x80 ADD R12,0x24 CMP R13,R15 JNZ 0x0012c686 LAB_0012c90d: ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void quantize_row_q8_1_ref(long param_1,long param_2,long param_3) { ushort *puVar1; float *pfVar2; float *pfVar3; float fVar4; float fVar5; float fVar6; long lVar7; ushort uVar8; long lVar9; ulong uVar10; uint uVar11; float fVar12; float fVar13; float fVar14; float fVar15; float fVar16; float fVar17; int1 auVar18 [16]; int1 auVar19 [16]; uint uVar20; int iVar21; int iVar22; int iVar23; int iVar24; float fVar25; lVar9 = param_3 + 0x1f; if (-1 < param_3) { lVar9 = param_3; } uVar11 = (uint)(lVar9 >> 5); if (0 < (int)uVar11) { lVar9 = param_2 + 0x14; uVar10 = 0; fVar15 = DAT_0014a0e8; fVar16 = DAT_0014a0ec; uVar20 = _DAT_0014a020; do { lVar7 = 0; fVar25 = 0.0; do { fVar12 = (float)(*(uint *)(param_1 + lVar7 * 4) & uVar20); if (fVar25 <= fVar12) { fVar25 = fVar12; } lVar7 = lVar7 + 1; } while (lVar7 != 0x20); fVar25 = fVar25 / _DAT_0014eb1c; fVar12 = (float)(((uint)fVar25 & 0x7f800000) + 0x7800000); if ((uint)((int)fVar25 * 2) < 0x71000000) { fVar12 = 2.0; } fVar12 = fVar12 + (float)((uint)fVar25 & uVar20) * fVar15 * fVar16; uVar8 = (SUB42(fVar12,0) & 0xfff) + ((ushort)((uint)fVar12 >> 0xd) & 0x7c00); if (0xff000000 < (uint)((int)fVar25 * 2)) { uVar8 = 0x7e00; } puVar1 = (ushort *)(param_2 + uVar10 * 0x24); *puVar1 = uVar8 | (ushort)((uint)fVar25 >> 0x10) & 0x8000; fVar12 = (float)(-(uint)(fVar25 != DAT_0014eb14) & (uint)(DAT_0014a0f0 / fVar25)); iVar21 = 0; iVar22 = 0; iVar23 = 0; iVar24 = 0; lVar7 = 0; do { pfVar2 = (float *)(param_1 + lVar7 * 4); fVar15 = *pfVar2; fVar16 = pfVar2[1]; fVar14 = pfVar2[2]; pfVar3 = (float *)(param_1 + 0x40 + lVar7 * 4); fVar17 = *pfVar3; fVar4 = pfVar3[1]; fVar5 = pfVar3[2]; fVar6 = pfVar3[3]; fVar13 = roundf(pfVar2[3] * fVar12); fVar14 = roundf(fVar14 * fVar12); fVar15 = roundf(fVar15 * fVar12); fVar16 = roundf(fVar16 * fVar12); auVar19._0_4_ = (int)fVar15; auVar19._4_4_ = (int)fVar16; auVar19._8_4_ = (int)fVar14; auVar19._12_4_ = (int)fVar13; auVar18 = packssdw(auVar19,auVar19); auVar18 = packsswb(auVar18,auVar18); *(int *)(lVar9 + -0x10 + lVar7) = auVar18._0_4_; fVar15 = roundf(fVar6 * fVar12); fVar16 = roundf(fVar5 * fVar12); fVar14 = roundf(fVar17 * fVar12); fVar17 = roundf(fVar4 * fVar12); auVar18._0_4_ = (int)fVar14; auVar18._4_4_ = (int)fVar17; auVar18._8_4_ = (int)fVar16; auVar18._12_4_ = (int)fVar15; iVar21 = iVar21 + auVar19._0_4_ + auVar18._0_4_; iVar22 = iVar22 + auVar19._4_4_ + auVar18._4_4_; iVar23 = iVar23 + auVar19._8_4_ + auVar18._8_4_; iVar24 = iVar24 + auVar19._12_4_ + auVar18._12_4_; auVar19 = packssdw(auVar18,auVar18); auVar19 = packsswb(auVar19,auVar19); *(int *)(lVar9 + lVar7) = auVar19._0_4_; fVar16 = DAT_0014a0ec; fVar15 = DAT_0014a0e8; uVar20 = _DAT_0014a020; lVar7 = lVar7 + 4; } while (lVar7 != 0x10); fVar25 = fVar25 * (float)(iVar24 + iVar22 + iVar23 + iVar21); fVar12 = (float)(((uint)fVar25 & 0x7f800000) + 0x7800000); if ((uint)((int)fVar25 * 2) < 0x71000000) { fVar12 = 2.0; } fVar12 = fVar12 + (float)((uint)fVar25 & _DAT_0014a020) * DAT_0014a0e8 * DAT_0014a0ec; uVar8 = (SUB42(fVar12,0) & 0xfff) + ((ushort)((uint)fVar12 >> 0xd) & 0x7c00); if (0xff000000 < (uint)((int)fVar25 * 2)) { uVar8 = 0x7e00; } puVar1[1] = uVar8 | (ushort)((uint)fVar25 >> 0x10) & 0x8000; uVar10 = uVar10 + 1; param_1 = param_1 + 0x80; lVar9 = lVar9 + 0x24; } while (uVar10 != (uVar11 & 0x7fffffff)); } return; }
35,063
JS_ToObject
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_ToObject(JSContext *ctx, JSValue val) { int tag = JS_VALUE_GET_NORM_TAG(val); JSValue obj; switch(tag) { default: case JS_TAG_NULL: case JS_TAG_UNDEFINED: return JS_ThrowTypeError(ctx, "Cannot convert undefined or null to object"); case JS_TAG_OBJECT: case JS_TAG_EXCEPTION: return js_dup(val); case JS_TAG_BIG_INT: obj = JS_NewObjectClass(ctx, JS_CLASS_BIG_INT); goto set_value; case JS_TAG_INT: case JS_TAG_FLOAT64: obj = JS_NewObjectClass(ctx, JS_CLASS_NUMBER); goto set_value; case JS_TAG_STRING: /* XXX: should call the string constructor */ { JSString *p1 = JS_VALUE_GET_STRING(val); obj = JS_NewObjectClass(ctx, JS_CLASS_STRING); JS_DefinePropertyValue(ctx, obj, JS_ATOM_length, js_int32(p1->len), 0); } goto set_value; case JS_TAG_BOOL: obj = JS_NewObjectClass(ctx, JS_CLASS_BOOLEAN); goto set_value; case JS_TAG_SYMBOL: obj = JS_NewObjectClass(ctx, JS_CLASS_SYMBOL); set_value: if (!JS_IsException(obj)) JS_SetObjectData(ctx, obj, js_dup(val)); return obj; } }
O1
c
JS_ToObject: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %r15 movq %rsi, 0x10(%rsp) leal 0x9(%rdx), %eax cmpl $0x10, %eax ja 0x2aea1 movq %rdx, %r14 movq %rsi, %rbx leaq 0x75aa8(%rip), %rcx # 0xa090c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq %rbx, 0x8(%rsp) cmpl $-0x9, %r14d jb 0x2af8d movq 0x8(%rsp), %rax incl (%rax) jmp 0x2af8d movq 0x40(%r15), %rax movq 0x40(%rax), %rsi movq 0x48(%rax), %rdx movq %r15, %rdi movl $0x4, %ecx jmp 0x2af50 leaq 0x78e46(%rip), %rsi # 0xa3cee xorl %ebx, %ebx movq %r15, %rdi xorl %eax, %eax callq 0x265c3 movl $0x6, %r14d jmp 0x2af8d movq 0x40(%r15), %rax movq 0x70(%rax), %rsi movq 0x78(%rax), %rdx movq %r15, %rdi movl $0x7, %ecx jmp 0x2af50 movq 0x40(%r15), %rax movq 0x60(%rax), %rsi movq 0x68(%rax), %rdx movq %r15, %rdi movl $0x6, %ecx jmp 0x2af50 movq 0x10(%rsp), %rbp movq 0x40(%r15), %rax movq 0x50(%rax), %rsi movq 0x58(%rax), %rdx movq %r15, %rdi movl $0x5, %ecx callq 0x24f61 movq %rax, %r12 movq %rdx, %r13 movq 0x4(%rbp), %r8 andl $0x7fffffff, %r8d # imm = 0x7FFFFFFF movl $0x0, (%rsp) movq %r15, %rdi movq %rax, %rsi movl $0x32, %ecx xorl %r9d, %r9d callq 0x2ab17 jmp 0x2af5b movq 0x40(%r15), %rax movq 0x220(%rax), %rsi movq 0x228(%rax), %rdx movq %r15, %rdi movl $0x22, %ecx callq 0x24f61 movq %rax, %r12 movq %rdx, %r13 cmpl $0x6, %r13d je 0x2af87 movq %rbx, 0x8(%rsp) cmpl $-0x9, %r14d jb 0x2af73 movq 0x8(%rsp), %rax incl (%rax) movq %r15, %rdi movq %r12, %rsi movq %r13, %rdx movq %rbx, %rcx movq %r14, %r8 callq 0x3aebe movq %r12, %rbx movq %r13, %r14 movq %rbx, %rax movq %r14, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
JS_ToObject: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15, rdi mov [rsp+48h+var_38], rsi lea eax, [rdx+9]; switch 17 cases cmp eax, 10h ja short def_2AE6B; jumptable 000000000002AE6B default case, cases -6--2,2-5 mov r14, rdx mov rbx, rsi lea rcx, jpt_2AE6B movsxd rax, ds:(jpt_2AE6B - 0A090Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_2AE6D: mov [rsp+48h+var_40], rbx; jumptable 000000000002AE6B cases -1,6 cmp r14d, 0FFFFFFF7h jb loc_2AF8D mov rax, [rsp+48h+var_40] inc dword ptr [rax] jmp loc_2AF8D loc_2AE88: mov rax, [r15+40h]; jumptable 000000000002AE6B cases 0,7 mov rsi, [rax+40h] mov rdx, [rax+48h] mov rdi, r15 mov ecx, 4 jmp loc_2AF50 def_2AE6B: lea rsi, aCannotConvertU; jumptable 000000000002AE6B default case, cases -6--2,2-5 xor ebx, ebx mov rdi, r15 xor eax, eax call JS_ThrowTypeError mov r14d, 6 jmp loc_2AF8D loc_2AEBF: mov rax, [r15+40h]; jumptable 000000000002AE6B case -8 mov rsi, [rax+70h] mov rdx, [rax+78h] mov rdi, r15 mov ecx, 7 jmp short loc_2AF50 loc_2AED5: mov rax, [r15+40h]; jumptable 000000000002AE6B case 1 mov rsi, [rax+60h] mov rdx, [rax+68h] mov rdi, r15 mov ecx, 6 jmp short loc_2AF50 loc_2AEEB: mov rbp, [rsp+48h+var_38]; jumptable 000000000002AE6B case -7 mov rax, [r15+40h] mov rsi, [rax+50h] mov rdx, [rax+58h] mov rdi, r15 mov ecx, 5 call JS_NewObjectProtoClass mov r12, rax mov r13, rdx mov r8, [rbp+4] and r8d, 7FFFFFFFh mov [rsp+48h+var_48], 0 mov rdi, r15 mov rsi, rax mov ecx, 32h ; '2' xor r9d, r9d call JS_DefinePropertyValue jmp short loc_2AF5B loc_2AF36: mov rax, [r15+40h]; jumptable 000000000002AE6B case -9 mov rsi, [rax+220h] mov rdx, [rax+228h] mov rdi, r15 mov ecx, 22h ; '"' loc_2AF50: call JS_NewObjectProtoClass mov r12, rax mov r13, rdx loc_2AF5B: cmp r13d, 6 jz short loc_2AF87 mov [rsp+48h+var_40], rbx cmp r14d, 0FFFFFFF7h jb short loc_2AF73 mov rax, [rsp+48h+var_40] inc dword ptr [rax] loc_2AF73: mov rdi, r15 mov rsi, r12 mov rdx, r13 mov rcx, rbx mov r8, r14 call JS_SetObjectData loc_2AF87: mov rbx, r12 mov r14, r13 loc_2AF8D: mov rax, rbx mov rdx, r14 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_DWORD * JS_ToObject( 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) { _DWORD *v15; // rbx long long v16; // rax long long v17; // rsi long long v18; // rdx unsigned int v19; // ecx long long v20; // rax long long v21; // rax unsigned long long v22; // r12 long long v23; // rdx long long v24; // r13 __m128 v25; // xmm4 __m128 v26; // xmm5 long long v27; // rax long long v28; // rdx char v30; // [rsp+0h] [rbp-48h] v15 = (_DWORD *)a2; switch ( (int)a3 ) { case -9: v27 = *(_QWORD *)(a1 + 64); v17 = *(_QWORD *)(v27 + 544); v18 = *(_QWORD *)(v27 + 552); v19 = 34; goto LABEL_10; case -8: v20 = *(_QWORD *)(a1 + 64); v17 = *(_QWORD *)(v20 + 112); v18 = *(_QWORD *)(v20 + 120); v19 = 7; goto LABEL_10; case -7: v22 = JS_NewObjectProtoClass( a1, *(_QWORD *)(*(_QWORD *)(a1 + 64) + 80LL), *(_QWORD *)(*(_QWORD *)(a1 + 64) + 88LL), 5u); v24 = v23; JS_DefinePropertyValue( a1, v22, v23, 50LL, (_DWORD *)(*(_QWORD *)(a2 + 4) & 0x7FFFFFFFLL), 0LL, *(double *)a7.m128_u64, a8, a9, a10, v25, v26, a13, a14, 0); goto LABEL_11; case -1: case 6: if ( (unsigned int)a3 >= 0xFFFFFFF7 ) ++*(_DWORD *)a2; return v15; case 0: case 7: v16 = *(_QWORD *)(a1 + 64); v17 = *(_QWORD *)(v16 + 64); v18 = *(_QWORD *)(v16 + 72); v19 = 4; goto LABEL_10; case 1: v21 = *(_QWORD *)(a1 + 64); v17 = *(_QWORD *)(v21 + 96); v18 = *(_QWORD *)(v21 + 104); v19 = 6; LABEL_10: v22 = JS_NewObjectProtoClass(a1, v17, v18, v19); v24 = v28; LABEL_11: if ( (_DWORD)v24 != 6 ) { if ( (unsigned int)a3 >= 0xFFFFFFF7 ) ++*v15; JS_SetObjectData(a1, v22, v24, v15, a3); } v15 = (_DWORD *)v22; break; default: v15 = 0LL; JS_ThrowTypeError( a1, (long long)"Cannot convert undefined or null to object", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v30); break; } return v15; }
JS_ToObject: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15,RDI MOV qword ptr [RSP + 0x10],RSI LEA EAX,[RDX + 0x9] CMP EAX,0x10 JA 0x0012aea1 MOV R14,RDX MOV RBX,RSI LEA RCX,[0x1a090c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_ffffffff: MOV qword ptr [RSP + 0x8],RBX CMP R14D,-0x9 JC 0x0012af8d MOV RAX,qword ptr [RSP + 0x8] INC dword ptr [RAX] JMP 0x0012af8d caseD_0: MOV RAX,qword ptr [R15 + 0x40] MOV RSI,qword ptr [RAX + 0x40] MOV RDX,qword ptr [RAX + 0x48] MOV RDI,R15 MOV ECX,0x4 JMP 0x0012af50 caseD_fffffffa: LEA RSI,[0x1a3cee] XOR EBX,EBX MOV RDI,R15 XOR EAX,EAX CALL 0x001265c3 MOV R14D,0x6 JMP 0x0012af8d caseD_fffffff8: MOV RAX,qword ptr [R15 + 0x40] MOV RSI,qword ptr [RAX + 0x70] MOV RDX,qword ptr [RAX + 0x78] MOV RDI,R15 MOV ECX,0x7 JMP 0x0012af50 caseD_1: MOV RAX,qword ptr [R15 + 0x40] MOV RSI,qword ptr [RAX + 0x60] MOV RDX,qword ptr [RAX + 0x68] MOV RDI,R15 MOV ECX,0x6 JMP 0x0012af50 caseD_fffffff9: MOV RBP,qword ptr [RSP + 0x10] MOV RAX,qword ptr [R15 + 0x40] MOV RSI,qword ptr [RAX + 0x50] MOV RDX,qword ptr [RAX + 0x58] MOV RDI,R15 MOV ECX,0x5 CALL 0x00124f61 MOV R12,RAX MOV R13,RDX MOV R8,qword ptr [RBP + 0x4] AND R8D,0x7fffffff MOV dword ptr [RSP],0x0 MOV RDI,R15 MOV RSI,RAX MOV ECX,0x32 XOR R9D,R9D CALL 0x0012ab17 JMP 0x0012af5b caseD_fffffff7: MOV RAX,qword ptr [R15 + 0x40] MOV RSI,qword ptr [RAX + 0x220] MOV RDX,qword ptr [RAX + 0x228] MOV RDI,R15 MOV ECX,0x22 LAB_0012af50: CALL 0x00124f61 MOV R12,RAX MOV R13,RDX LAB_0012af5b: CMP R13D,0x6 JZ 0x0012af87 MOV qword ptr [RSP + 0x8],RBX CMP R14D,-0x9 JC 0x0012af73 MOV RAX,qword ptr [RSP + 0x8] INC dword ptr [RAX] LAB_0012af73: MOV RDI,R15 MOV RSI,R12 MOV RDX,R13 MOV RCX,RBX MOV R8,R14 CALL 0x0013aebe LAB_0012af87: MOV RBX,R12 MOV R14,R13 LAB_0012af8d: MOV RAX,RBX MOV RDX,R14 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] JS_ToObject(long param_1,int *param_2,int8 param_3) { uint uVar1; int1 auVar2 [16]; int8 uVar3; int8 uVar5; int1 auVar6 [16]; int8 uVar4; auVar2._8_8_ = param_3; auVar2._0_8_ = param_2; auVar6._8_8_ = param_3; auVar6._0_8_ = param_2; uVar1 = (uint)param_3; switch(uVar1) { case 0: case 7: uVar5 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x40); uVar4 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x48); uVar3 = 4; break; case 1: uVar5 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x60); uVar4 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x68); uVar3 = 6; break; case 0xfffffff7: uVar5 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x220); uVar4 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x228); uVar3 = 0x22; break; case 0xfffffff8: uVar5 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x70); uVar4 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x78); uVar3 = 7; break; case 0xfffffff9: auVar6 = JS_NewObjectProtoClass (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x50), *(int8 *)(*(long *)(param_1 + 0x40) + 0x58),5); JS_DefinePropertyValue (param_1,auVar6._0_8_,auVar6._8_8_,0x32, (uint)*(int8 *)(param_2 + 1) & 0x7fffffff,0,0); goto LAB_0012af5b; default: JS_ThrowTypeError(param_1,"Cannot convert int or null to object"); return ZEXT816(6) << 0x40; case 0xffffffff: case 6: if (uVar1 < 0xfffffff7) { return auVar6; } *param_2 = *param_2 + 1; return auVar2; } auVar6 = JS_NewObjectProtoClass(param_1,uVar5,uVar4,uVar3); LAB_0012af5b: if (auVar6._8_4_ != 6) { if (0xfffffff6 < uVar1) { *param_2 = *param_2 + 1; } JS_SetObjectData(param_1,auVar6._0_8_,auVar6._8_8_,param_2,param_3); } return auVar6; }
35,064
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_value::destroy(nlohmann::json_abi_v3_11_3::detail::value_t)
monkey531[P]llama/common/json.hpp
void destroy(value_t t) { if ( (t == value_t::object && object == nullptr) || (t == value_t::array && array == nullptr) || (t == value_t::string && string == nullptr) || (t == value_t::binary && binary == nullptr) ) { //not initialized (e.g. due to exception in the ctor) return; } if (t == value_t::array || t == value_t::object) { // flatten the current json_value to a heap-allocated stack std::vector<basic_json> stack; // move the top-level items to stack if (t == value_t::array) { stack.reserve(array->size()); std::move(array->begin(), array->end(), std::back_inserter(stack)); } else { stack.reserve(object->size()); for (auto&& it : *object) { stack.push_back(std::move(it.second)); } } while (!stack.empty()) { // move the last item to local variable to be processed basic_json current_item(std::move(stack.back())); stack.pop_back(); // if current_item is array/object, move // its children to the stack to be processed later if (current_item.is_array()) { std::move(current_item.m_data.m_value.array->begin(), current_item.m_data.m_value.array->end(), std::back_inserter(stack)); current_item.m_data.m_value.array->clear(); } else if (current_item.is_object()) { for (auto&& it : *current_item.m_data.m_value.object) { stack.push_back(std::move(it.second)); } current_item.m_data.m_value.object->clear(); } // it's now safe that current_item get destructed // since it doesn't have any children } } switch (t) { case value_t::object: { AllocatorType<object_t> alloc; std::allocator_traits<decltype(alloc)>::destroy(alloc, object); std::allocator_traits<decltype(alloc)>::deallocate(alloc, object, 1); break; } case value_t::array: { AllocatorType<array_t> alloc; std::allocator_traits<decltype(alloc)>::destroy(alloc, array); std::allocator_traits<decltype(alloc)>::deallocate(alloc, array, 1); break; } case value_t::string: { AllocatorType<string_t> alloc; std::allocator_traits<decltype(alloc)>::destroy(alloc, string); std::allocator_traits<decltype(alloc)>::deallocate(alloc, string, 1); break; } case value_t::binary: { AllocatorType<binary_t> alloc; std::allocator_traits<decltype(alloc)>::destroy(alloc, binary); std::allocator_traits<decltype(alloc)>::deallocate(alloc, binary, 1); break; } case value_t::null: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::discarded: default: { break; } } }
O1
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::json_value::destroy(nlohmann::json_abi_v3_11_3::detail::value_t): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp cmpl $0x1, %esi sete %cl movq (%rdi), %rax testq %rax, %rax sete %dl testb %dl, %cl jne 0x442ba movl %esi, %r14d testq %rax, %rax sete %cl movl %r14d, %edx andb $-0x2, %dl cmpb $0x2, %dl sete %dl cmpb $0x8, %r14b sete %sil orb %dl, %sil testb %cl, %sil jne 0x442ba movq %rdi, %rbx leal -0x1(%r14), %ecx cmpb $0x1, %cl ja 0x4423a xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movq $0x0, 0x10(%rsp) movq 0x8(%rax), %rsi subq (%rax), %rsi sarq $0x4, %rsi cmpb $0x2, %r14b jne 0x440e9 movq %rsp, %rdi callq 0x442fe movq (%rbx), %rax movq (%rax), %r15 movq 0x8(%rax), %r13 subq %r15, %r13 sarq $0x4, %r13 testq %r13, %r13 jle 0x4412a incq %r13 movq %rsp, %r12 movq %r12, %rdi movq %r15, %rsi callq 0x44460 addq $0x10, %r15 decq %r13 cmpq $0x1, %r13 jg 0x440cf jmp 0x4412a movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB imulq %rsi, %rax movq %rsp, %rdi movq %rax, %rsi callq 0x442fe movq (%rbx), %rax movq (%rax), %r12 movq 0x8(%rax), %r13 cmpq %r13, %r12 je 0x4412a movq %rsp, %r15 leaq 0x20(%r12), %rsi movq %r15, %rdi callq 0x44460 addq $0x30, %r12 cmpq %r13, %r12 jne 0x44114 movq 0x8(%rsp), %r13 cmpq %r13, (%rsp) je 0x44232 leaq 0x20(%rsp), %r15 movq %rsp, %r12 leaq -0x10(%r13), %rdi movups -0x10(%r13), %xmm0 movaps %xmm0, 0x20(%rsp) xorl %esi, %esi callq 0x42e48 movb $0x0, -0x10(%r13) movq $0x0, -0x8(%r13) movq %r15, %rdi movl $0x1, %esi callq 0x42e48 movq 0x8(%rsp), %r13 addq $-0x10, %r13 movq %r13, 0x8(%rsp) movq %r13, %rdi xorl %esi, %esi callq 0x42e48 movq %r13, %rdi callq 0x4fdb4 movzbl 0x20(%rsp), %eax cmpl $0x1, %eax je 0x441e1 cmpl $0x2, %eax jne 0x44211 movq 0x28(%rsp), %rax movq (%rax), %r13 movq 0x8(%rax), %rbp subq %r13, %rbp sarq $0x4, %rbp testq %rbp, %rbp jle 0x441d2 incq %rbp movq %r12, %rdi movq %r13, %rsi callq 0x44460 addq $0x10, %r13 decq %rbp cmpq $0x1, %rbp jg 0x441ba movq 0x28(%rsp), %rdi movq (%rdi), %rsi callq 0x44604 jmp 0x44211 movq 0x28(%rsp), %rax movq (%rax), %r13 movq 0x8(%rax), %rbp cmpq %rbp, %r13 je 0x44204 leaq 0x20(%r13), %rsi movq %r12, %rdi callq 0x44460 addq $0x30, %r13 jmp 0x441ed movq 0x28(%rsp), %rdi movq (%rdi), %rsi callq 0x4467c movq %r15, %rdi xorl %esi, %esi callq 0x42e48 movq %r15, %rdi callq 0x4fdb4 movq 0x8(%rsp), %r13 cmpq %r13, (%rsp) jne 0x44141 movq %rsp, %rdi callq 0x44392 movzbl %r14b, %eax decl %eax cmpl $0x7, %eax ja 0x442ba leaq 0x6b128(%rip), %rcx # 0xaf374 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq (%rbx), %rdi callq 0x447ce movl $0x20, %r14d jmp 0x442af movq (%rbx), %rax movq (%rax), %rdi addq $0x10, %rax movl $0x20, %r14d cmpq %rax, %rdi je 0x442af movq (%rax), %rsi incq %rsi jmp 0x442aa movq (%rbx), %rdi callq 0x44392 movl $0x18, %r14d jmp 0x442af movq (%rbx), %rax movq (%rax), %rdi movl $0x28, %r14d testq %rdi, %rdi je 0x442af movq 0x10(%rax), %rsi subq %rdi, %rsi callq 0x196e0 movq (%rbx), %rdi movq %r14, %rsi callq 0x196e0 addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x442cd jmp 0x442cd movq %rax, %rbx jmp 0x442ee jmp 0x442d4 movq %rax, %rbx leaq 0x20(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x42e48 movq %r14, %rdi callq 0x4fdb4 movq %rsp, %rdi callq 0x44392 movq %rbx, %rdi callq 0x19c10
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_value7destroyENS0_6detail7value_tE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h cmp esi, 1 setz cl mov rax, [rdi] test rax, rax setz dl test cl, dl jnz def_44253; jumptable 0000000000044253 default case, cases 4-7 mov r14d, esi test rax, rax setz cl mov edx, r14d and dl, 0FEh cmp dl, 2 setz dl cmp r14b, 8 setz sil or sil, dl test sil, cl jnz def_44253; jumptable 0000000000044253 default case, cases 4-7 mov rbx, rdi lea ecx, [r14-1] cmp cl, 1 ja loc_4423A xorps xmm0, xmm0 movaps [rsp+68h+var_68], xmm0 mov [rsp+68h+var_58], 0 mov rsi, [rax+8] sub rsi, [rax] sar rsi, 4 cmp r14b, 2 jnz short loc_440E9 mov rdi, rsp call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE7reserveEm; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::reserve(ulong) mov rax, [rbx] mov r15, [rax] mov r13, [rax+8] sub r13, r15 sar r13, 4 test r13, r13 jle short loc_4412A inc r13 mov r12, rsp loc_440CF: mov rdi, r12 mov rsi, r15 call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&) add r15, 10h dec r13 cmp r13, 1 jg short loc_440CF jmp short loc_4412A loc_440E9: mov rax, 0AAAAAAAAAAAAAAABh imul rax, rsi mov rdi, rsp mov rsi, rax call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE7reserveEm; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::reserve(ulong) mov rax, [rbx] mov r12, [rax] mov r13, [rax+8] cmp r12, r13 jz short loc_4412A mov r15, rsp loc_44114: lea rsi, [r12+20h] mov rdi, r15 call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&) add r12, 30h ; '0' cmp r12, r13 jnz short loc_44114 loc_4412A: mov r13, qword ptr [rsp+68h+var_68+8] cmp qword ptr [rsp+68h+var_68], r13 jz loc_44232 lea r15, [rsp+68h+var_48] mov r12, rsp loc_44141: lea rdi, [r13-10h] movups xmm0, xmmword ptr [r13-10h] movaps [rsp+68h+var_48], xmm0 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 byte ptr [r13-10h], 0 mov qword ptr [r13-8], 0 mov rdi, r15 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 r13, qword ptr [rsp+68h+var_68+8] add r13, 0FFFFFFFFFFFFFFF0h mov qword ptr [rsp+68h+var_68+8], r13 mov rdi, r13 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, r13 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() movzx eax, byte ptr [rsp+68h+var_48] cmp eax, 1 jz short loc_441E1 cmp eax, 2 jnz short loc_44211 mov rax, qword ptr [rsp+68h+var_48+8] mov r13, [rax] mov rbp, [rax+8] sub rbp, r13 sar rbp, 4 test rbp, rbp jle short loc_441D2 inc rbp loc_441BA: mov rdi, r12 mov rsi, r13 call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&) add r13, 10h dec rbp cmp rbp, 1 jg short loc_441BA loc_441D2: mov rdi, qword ptr [rsp+68h+var_48+8] mov rsi, [rdi] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE15_M_erase_at_endEPSD_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::_M_erase_at_end(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>*) jmp short loc_44211 loc_441E1: mov rax, qword ptr [rsp+68h+var_48+8] mov r13, [rax] mov rbp, [rax+8] loc_441ED: cmp r13, rbp jz short loc_44204 lea rsi, [r13+20h] mov rdi, r12 call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&) add r13, 30h ; '0' jmp short loc_441ED loc_44204: mov rdi, qword ptr [rsp+68h+var_48+8] mov rsi, [rdi] call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE15_M_erase_at_endEPSG_; std::vector<std::pair<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>>>::_M_erase_at_end(std::pair<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>>*) loc_44211: 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() mov r13, qword ptr [rsp+68h+var_68+8] cmp qword ptr [rsp+68h+var_68], r13 jnz loc_44141 loc_44232: mov rdi, rsp call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EED2Ev; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::~vector() loc_4423A: movzx eax, r14b dec eax; switch 8 cases cmp eax, 7 ja short def_44253; jumptable 0000000000044253 default case, cases 4-7 lea rcx, jpt_44253 movsxd rax, ds:(jpt_44253 - 0AF374h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_44255: mov rdi, [rbx]; jumptable 0000000000044253 case 1 call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EED2Ev; std::vector<std::pair<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>>>::~vector() mov r14d, 20h ; ' ' jmp short loc_442AF loc_44265: mov rax, [rbx]; jumptable 0000000000044253 case 3 mov rdi, [rax] add rax, 10h mov r14d, 20h ; ' ' cmp rdi, rax jz short loc_442AF mov rsi, [rax] inc rsi jmp short loc_442AA loc_44282: mov rdi, [rbx]; jumptable 0000000000044253 case 2 call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EED2Ev; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::~vector() mov r14d, 18h jmp short loc_442AF loc_44292: mov rax, [rbx]; jumptable 0000000000044253 case 8 mov rdi, [rax]; void * mov r14d, 28h ; '(' test rdi, rdi jz short loc_442AF mov rsi, [rax+10h] sub rsi, rdi; unsigned __int64 loc_442AA: call __ZdlPvm; operator delete(void *,ulong) loc_442AF: mov rdi, [rbx]; void * mov rsi, r14; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) def_44253: add rsp, 38h; jumptable 0000000000044253 default case, cases 4-7 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_442CD jmp short $+2 loc_442CD: mov rbx, rax jmp short loc_442EE jmp short $+2 loc_442D4: mov rbx, rax lea r14, [rsp+arg_18] 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() loc_442EE: mov rdi, rsp call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EED2Ev; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::~vector() mov rdi, rbx call __Unwind_Resume
void nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::json_value::destroy( void **a1, int a2) { _QWORD *v2; // rax char v3; // r14 long long v5; // rsi long long v6; // r15 long long v7; // r13 long long v8; // r13 long long v9; // r12 long long i; // r13 long long j; // r13 char *v12; // r13 long long v13; // r13 long long v14; // rbp long long v15; // rbp long long v16; // r13 long long v17; // rbp unsigned long long v18; // r14 _BYTE *v19; // rdi _QWORD *v20; // rax unsigned long long v21; // rsi void **v22; // rax __int128 v23; // [rsp+0h] [rbp-68h] BYREF long long v24; // [rsp+10h] [rbp-58h] _OWORD v25[4]; // [rsp+20h] [rbp-48h] BYREF v2 = *a1; if ( *a1 != 0LL || a2 != 1 ) { v3 = a2; if ( v2 != 0LL || (a2 & 0xFE) != 2 && (_BYTE)a2 != 8 ) { if ( (unsigned __int8)(a2 - 1) <= 1u ) { v23 = 0LL; v24 = 0LL; v5 = (long long)(v2[1] - *v2) >> 4; if ( v3 == 2 ) { std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::reserve( &v23, v5); v6 = *(_QWORD *)*a1; v7 = (*((_QWORD *)*a1 + 1) - v6) >> 4; if ( v7 > 0 ) { v8 = v7 + 1; do { std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( &v23, v6); v6 += 16LL; --v8; } while ( v8 > 1 ); } } else { std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::reserve( &v23, 0xAAAAAAAAAAAAAAABLL * v5); v9 = *(_QWORD *)*a1; for ( i = *((_QWORD *)*a1 + 1); v9 != i; v9 += 48LL ) std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( &v23, v9 + 32); } for ( j = *((_QWORD *)&v23 + 1); (_QWORD)v23 != *((_QWORD *)&v23 + 1); j = *((_QWORD *)&v23 + 1) ) { v25[0] = *(_OWORD *)(j - 16); 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 *)(j - 16)); *(_BYTE *)(j - 16) = 0; *(_QWORD *)(j - 8) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v25); v12 = (char *)(*((_QWORD *)&v23 + 1) - 16LL); *((_QWORD *)&v23 + 1) = v12; 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(v12); 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(v12); if ( LOBYTE(v25[0]) == 1 ) { v16 = **((_QWORD **)&v25[0] + 1); v17 = *(_QWORD *)(*((_QWORD *)&v25[0] + 1) + 8LL); while ( v16 != v17 ) { std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( &v23, v16 + 32); v16 += 48LL; } std::vector<std::pair<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>>>::_M_erase_at_end( *((_QWORD *)&v25[0] + 1), **((_QWORD **)&v25[0] + 1)); } else if ( LOBYTE(v25[0]) == 2 ) { v13 = **((_QWORD **)&v25[0] + 1); v14 = (long long)(*(_QWORD *)(*((_QWORD *)&v25[0] + 1) + 8LL) - **((_QWORD **)&v25[0] + 1)) >> 4; if ( v14 > 0 ) { v15 = v14 + 1; do { std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( &v23, v13); v13 += 16LL; --v15; } while ( v15 > 1 ); } std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::_M_erase_at_end( *((_QWORD *)&v25[0] + 1), **((_QWORD **)&v25[0] + 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((char *)v25); 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(v25); } std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::~vector(&v23); } switch ( v3 ) { case 1: std::vector<std::pair<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>>>::~vector(*a1); v18 = 32LL; goto LABEL_32; case 2: std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::~vector(*a1); v18 = 24LL; goto LABEL_32; case 3: v19 = *(_BYTE **)*a1; v20 = (char *)*a1 + 16; v18 = 32LL; if ( v19 == (_BYTE *)v20 ) goto LABEL_32; v21 = *v20 + 1LL; break; case 8: v22 = (void **)*a1; v19 = *(_BYTE **)*a1; v18 = 40LL; if ( !v19 ) goto LABEL_32; v21 = (_BYTE *)v22[2] - v19; break; default: return; } operator delete(v19, v21); LABEL_32: operator delete(*a1, v18); } } }
destroy: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 CMP ESI,0x1 SETZ CL MOV RAX,qword ptr [RDI] TEST RAX,RAX SETZ DL TEST CL,DL JNZ 0x001442ba MOV R14D,ESI TEST RAX,RAX SETZ CL MOV EDX,R14D AND DL,0xfe CMP DL,0x2 SETZ DL CMP R14B,0x8 SETZ SIL OR SIL,DL TEST SIL,CL JNZ 0x001442ba MOV RBX,RDI LEA ECX,[R14 + -0x1] CMP CL,0x1 JA 0x0014423a XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],0x0 MOV RSI,qword ptr [RAX + 0x8] SUB RSI,qword ptr [RAX] SAR RSI,0x4 CMP R14B,0x2 JNZ 0x001440e9 LAB_001440ab: MOV RDI,RSP CALL 0x001442fe MOV RAX,qword ptr [RBX] MOV R15,qword ptr [RAX] MOV R13,qword ptr [RAX + 0x8] SUB R13,R15 SAR R13,0x4 TEST R13,R13 JLE 0x0014412a INC R13 MOV R12,RSP LAB_001440cf: MOV RDI,R12 MOV RSI,R15 CALL 0x00144460 ADD R15,0x10 DEC R13 CMP R13,0x1 JG 0x001440cf JMP 0x0014412a LAB_001440e9: MOV RAX,-0x5555555555555555 IMUL RAX,RSI LAB_001440f7: MOV RDI,RSP MOV RSI,RAX CALL 0x001442fe MOV RAX,qword ptr [RBX] MOV R12,qword ptr [RAX] MOV R13,qword ptr [RAX + 0x8] CMP R12,R13 JZ 0x0014412a MOV R15,RSP LAB_00144114: LEA RSI,[R12 + 0x20] LAB_00144119: MOV RDI,R15 CALL 0x00144460 ADD R12,0x30 CMP R12,R13 JNZ 0x00144114 LAB_0014412a: MOV R13,qword ptr [RSP + 0x8] CMP qword ptr [RSP],R13 JZ 0x00144232 LEA R15,[RSP + 0x20] MOV R12,RSP LAB_00144141: LEA RDI,[R13 + -0x10] MOVUPS XMM0,xmmword ptr [R13 + -0x10] MOVAPS xmmword ptr [RSP + 0x20],XMM0 XOR ESI,ESI CALL 0x00142e48 MOV byte ptr [R13 + -0x10],0x0 MOV qword ptr [R13 + -0x8],0x0 MOV RDI,R15 MOV ESI,0x1 CALL 0x00142e48 MOV R13,qword ptr [RSP + 0x8] ADD R13,-0x10 MOV qword ptr [RSP + 0x8],R13 MOV RDI,R13 XOR ESI,ESI CALL 0x00142e48 MOV RDI,R13 CALL 0x0014fdb4 MOVZX EAX,byte ptr [RSP + 0x20] CMP EAX,0x1 JZ 0x001441e1 CMP EAX,0x2 JNZ 0x00144211 MOV RAX,qword ptr [RSP + 0x28] MOV R13,qword ptr [RAX] MOV RBP,qword ptr [RAX + 0x8] SUB RBP,R13 SAR RBP,0x4 TEST RBP,RBP JLE 0x001441d2 INC RBP LAB_001441ba: MOV RDI,R12 MOV RSI,R13 CALL 0x00144460 ADD R13,0x10 DEC RBP CMP RBP,0x1 JG 0x001441ba LAB_001441d2: MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RDI] CALL 0x00144604 JMP 0x00144211 LAB_001441e1: MOV RAX,qword ptr [RSP + 0x28] MOV R13,qword ptr [RAX] MOV RBP,qword ptr [RAX + 0x8] LAB_001441ed: CMP R13,RBP JZ 0x00144204 LEA RSI,[R13 + 0x20] LAB_001441f6: MOV RDI,R12 CALL 0x00144460 LAB_001441fe: ADD R13,0x30 JMP 0x001441ed LAB_00144204: MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RDI] CALL 0x0014467c LAB_00144211: MOV RDI,R15 XOR ESI,ESI CALL 0x00142e48 MOV RDI,R15 CALL 0x0014fdb4 MOV R13,qword ptr [RSP + 0x8] CMP qword ptr [RSP],R13 JNZ 0x00144141 LAB_00144232: MOV RDI,RSP CALL 0x00144392 LAB_0014423a: MOVZX EAX,R14B DEC EAX CMP EAX,0x7 JA 0x001442ba LEA RCX,[0x1af374] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV RDI,qword ptr [RBX] CALL 0x001447ce MOV R14D,0x20 JMP 0x001442af caseD_3: MOV RAX,qword ptr [RBX] MOV RDI,qword ptr [RAX] ADD RAX,0x10 MOV R14D,0x20 CMP RDI,RAX JZ 0x001442af MOV RSI,qword ptr [RAX] INC RSI JMP 0x001442aa caseD_2: MOV RDI,qword ptr [RBX] CALL 0x00144392 MOV R14D,0x18 JMP 0x001442af caseD_8: MOV RAX,qword ptr [RBX] MOV RDI,qword ptr [RAX] MOV R14D,0x28 TEST RDI,RDI JZ 0x001442af MOV RSI,qword ptr [RAX + 0x10] SUB RSI,RDI LAB_001442aa: CALL 0x001196e0 LAB_001442af: MOV RDI,qword ptr [RBX] MOV RSI,R14 CALL 0x001196e0 caseD_4: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::json_value::destroy(nlohmann::json_abi_v3_11_3::detail::value_t) */ 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> ::json_value::destroy(json_value *this,uint param_2) { long lVar1; long *plVar2; byte bVar3; ulong uVar4; ulong uVar5; bool bVar6; long *plVar7; long lVar8; data *pdVar9; basic_json *pbVar10; data *local_68; data *pdStack_60; int8 local_58; int8 local_48; vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *pvStack_40; plVar7 = *(long **)this; if (param_2 == 1 && plVar7 == (long *)0x0) { return; } bVar3 = (byte)param_2; if ((bVar3 == 8 || (bVar3 & 0xfe) == 2) && plVar7 == (long *)0x0) { return; } if ((byte)(bVar3 - 1) < 2) { local_68 = (data *)0x0; pdStack_60 = (data *)0x0; local_58 = 0; uVar4 = plVar7[1] - *plVar7 >> 4; if (bVar3 == 2) { /* try { // try from 001440ab to 001440b2 has its CatchHandler @ 001442c9 */ std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::reserve((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *)&local_68,uVar4); pbVar10 = (basic_json *)**(long **)this; lVar8 = (*(long **)this)[1] - (long)pbVar10 >> 4; if (0 < lVar8) { lVar8 = lVar8 + 1; do { /* try { // try from 001440cf to 001440d9 has its CatchHandler @ 001442cd */ std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> :: emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *)&local_68,pbVar10); pbVar10 = pbVar10 + 0x10; lVar8 = lVar8 + -1; } while (1 < lVar8); } } else { /* try { // try from 001440f7 to 00144101 has its CatchHandler @ 001442c9 */ std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::reserve((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *)&local_68,uVar4 * -0x5555555555555555); lVar1 = (*(long **)this)[1]; for (lVar8 = **(long **)this; lVar8 != lVar1; lVar8 = lVar8 + 0x30) { /* try { // try from 00144119 to 00144120 has its CatchHandler @ 001442cb */ std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> :: emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *)&local_68,(basic_json *)(lVar8 + 0x20)); } } if (local_68 != pdStack_60) { do { pdVar9 = pdStack_60; local_48 = *(int8 *)(pdStack_60 + -0x10); pvStack_40 = *(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(pdStack_60 + -8); assert_invariant((bool)((char)pdStack_60 + -0x10)); pdVar9[-0x10] = (data)0x0; *(int8 *)(pdVar9 + -8) = 0; bVar6 = SUB81((data *)&local_48,0); assert_invariant(bVar6); pdVar9 = pdStack_60 + -0x10; pdStack_60 = pdVar9; assert_invariant(SUB81(pdVar9,0)); data::~data(pdVar9); if (local_48._0_1_ == (data)0x1) { lVar1 = *(long *)(pvStack_40 + 8); for (lVar8 = *(long *)pvStack_40; lVar8 != lVar1; lVar8 = lVar8 + 0x30) { /* try { // try from 001441f6 to 001441fd has its CatchHandler @ 001442d4 */ std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> :: emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *)&local_68,(basic_json *)(lVar8 + 0x20)); } std:: vector<std::pair<std::__cxx11::string_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>>,std::allocator<std::pair<std::__cxx11::string_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>>>> ::_M_erase_at_end((vector<std::pair<std::__cxx11::string_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>>,std::allocator<std::pair<std::__cxx11::string_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>>>> *)pvStack_40,*(pair **)pvStack_40); } else if (local_48._0_1_ == (data)0x2) { pbVar10 = *(basic_json **)pvStack_40; lVar8 = *(long *)(pvStack_40 + 8) - (long)pbVar10 >> 4; if (0 < lVar8) { lVar8 = lVar8 + 1; do { /* try { // try from 001441ba to 001441c4 has its CatchHandler @ 001442d2 */ std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> :: emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *)&local_68,pbVar10); pbVar10 = pbVar10 + 0x10; lVar8 = lVar8 + -1; } while (1 < lVar8); } std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::_M_erase_at_end(pvStack_40,*(basic_json **)pvStack_40); } assert_invariant(bVar6); data::~data((data *)&local_48); } while (local_68 != pdStack_60); } std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::~vector((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *)&local_68); } switch(param_2 & 0xff) { case 1: std:: vector<std::pair<std::__cxx11::string_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>>,std::allocator<std::pair<std::__cxx11::string_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>>>> ::~vector(*(vector<std::pair<std::__cxx11::string_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>>,std::allocator<std::pair<std::__cxx11::string_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>>>> **)this); uVar4 = 0x20; break; case 2: std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::~vector(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)this); uVar4 = 0x18; break; case 3: plVar7 = (long *)**(long **)this; plVar2 = *(long **)this + 2; uVar4 = 0x20; if (plVar7 != plVar2) { uVar5 = *plVar2 + 1; LAB_001442aa: operator_delete(plVar7,uVar5); } break; default: goto switchD_00144253_caseD_4; case 8: plVar7 = (long *)**(long **)this; uVar4 = 0x28; if (plVar7 != (long *)0x0) { uVar5 = (*(long **)this)[2] - (long)plVar7; goto LAB_001442aa; } } operator_delete(*(void **)this,uVar4); switchD_00144253_caseD_4: return; }
35,065
my_realloc
eloqsql/mysys/my_malloc.c
void *my_realloc(PSI_memory_key key, void *old_point, size_t size, myf my_flags) { my_memory_header *old_mh, *mh; void *point; size_t old_size; my_bool old_flags; DBUG_ENTER("my_realloc"); DBUG_PRINT("my",("ptr: %p size: %zu flags: %lu", old_point, size, my_flags)); DBUG_ASSERT(size > 0); if (!old_point && (my_flags & MY_ALLOW_ZERO_PTR)) DBUG_RETURN(my_malloc(key, size, my_flags)); old_mh= USER_TO_HEADER(old_point); old_size= old_mh->m_size & ~1; old_flags= old_mh->m_size & 1; DBUG_ASSERT(old_mh->m_key == key || old_mh->m_key == PSI_NOT_INSTRUMENTED); DBUG_ASSERT(old_flags == MY_TEST(my_flags & MY_THREAD_SPECIFIC)); size= ALIGN_SIZE(size); mh= sf_realloc(old_mh, size + HEADER_SIZE, my_flags); if (mh == NULL) { if (size < old_size) DBUG_RETURN(old_point); my_errno=errno; if (my_flags & MY_FREE_ON_ERROR) { /* my_free will take care of size accounting */ my_free(old_point); old_point= 0; } if (my_flags & (MY_FAE+MY_WME)) my_error(EE_OUTOFMEMORY, MYF(ME_BELL + ME_FATAL), size); point= NULL; } else { mh->m_size= size | old_flags; mh->m_key= PSI_CALL_memory_realloc(key, old_size, size, & mh->m_owner); update_malloc_size((longlong)size - (longlong)old_size, old_flags); point= HEADER_TO_USER(mh); } DBUG_PRINT("exit",("ptr: %p", point)); DBUG_RETURN(point); }
O3
c
my_realloc: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %rbx testq %rsi, %rsi setne %al testb $0x40, %cl sete %dl orb %al, %dl je 0xaa398 movq %rsi, %r15 movl %edi, -0x2c(%rbp) movq %rcx, -0x38(%rbp) leaq -0x18(%rsi), %rdi movq -0x10(%rsi), %r12 movq %r12, %r13 andq $-0x2, %r13 addq $0x7, %rbx andq $-0x8, %rbx leaq 0x18(%rbx), %rsi callq 0x2a0b0 testq %rax, %rax je 0xaa3b1 movq %rax, %r14 andl $0x1, %r12d movq %r12, %rax orq %rbx, %rax movq %rax, 0x8(%r14) leaq 0x2e96f1(%rip), %rax # 0x393a58 movq (%rax), %rax movl -0x2c(%rbp), %edi movq %r13, %rsi movq %rbx, %rdx movq %r14, %rcx callq *0x3e8(%rax) movl %eax, 0x10(%r14) subq %r13, %rbx movq %rbx, %rdi movl %r12d, %esi callq *0x2e9161(%rip) # 0x3934f0 addq $0x18, %r14 movq %r14, %r15 jmp 0xaa3f4 movq %rbx, %rsi movq %rcx, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xaa1d9 cmpq %r13, %rbx jb 0xaa3f4 callq 0x2a7f0 movl (%rax), %r14d callq 0xac2be movl %r14d, (%rax) movq -0x38(%rbp), %r14 testb %r14b, %r14b jns 0xaa3d7 movq %r15, %rdi callq 0xaa406 xorl %r15d, %r15d testb $0x18, %r14b je 0xaa3f4 movl $0x1004, %esi # imm = 0x1004 movl $0x5, %edi movq %rbx, %rdx xorl %eax, %eax callq 0xa5c33 movq %r15, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_realloc: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdx test rsi, rsi setnz al test cl, 40h setz dl or dl, al jz short loc_AA398 mov r15, rsi mov [rbp+var_2C], edi mov [rbp+var_38], rcx lea rdi, [rsi-18h] mov r12, [rsi-10h] mov r13, r12 and r13, 0FFFFFFFFFFFFFFFEh add rbx, 7 and rbx, 0FFFFFFFFFFFFFFF8h lea rsi, [rbx+18h] call _realloc test rax, rax jz short loc_AA3B1 mov r14, rax and r12d, 1 mov rax, r12 or rax, rbx mov [r14+8], rax lea rax, PSI_server mov rax, [rax] mov edi, [rbp+var_2C] mov rsi, r13 mov rdx, rbx mov rcx, r14 call qword ptr [rax+3E8h] mov [r14+10h], eax sub rbx, r13 mov rdi, rbx mov esi, r12d call cs:update_malloc_size add r14, 18h mov r15, r14 jmp short loc_AA3F4 loc_AA398: mov rsi, rbx mov rdx, rcx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp my_malloc loc_AA3B1: cmp rbx, r13 jb short loc_AA3F4 call ___errno_location mov r14d, [rax] call _my_thread_var mov [rax], r14d mov r14, [rbp+var_38] test r14b, r14b jns short loc_AA3D7 mov rdi, r15 call my_free loc_AA3D7: xor r15d, r15d test r14b, 18h jz short loc_AA3F4 mov esi, 1004h mov edi, 5 mov rdx, rbx xor eax, eax call my_error loc_AA3F4: mov rax, r15 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_realloc(unsigned int a1, long long a2, unsigned long long a3, char a4) { long long v4; // r15 long long v5; // rdi long long v6; // r12 unsigned long long v7; // r13 unsigned long long v8; // rbx long long v9; // rax long long v10; // r14 int v12; // r14d if ( a2 == 0 && (a4 & 0x40) != 0 ) return my_malloc(a1, a3, a4); v4 = a2; v5 = a2 - 24; v6 = *(_QWORD *)(a2 - 16); v7 = v6 & 0xFFFFFFFFFFFFFFFELL; v8 = (a3 + 7) & 0xFFFFFFFFFFFFFFF8LL; v9 = realloc(a2 - 24, v8 + 24); if ( v9 ) { v10 = v9; *(_QWORD *)(v9 + 8) = v8 | v6 & 1; *(_DWORD *)(v9 + 16) = ((long long ( *)(_QWORD, unsigned long long, unsigned long long, long long))PSI_server[125])( a1, v7, v8, v9); update_malloc_size(); return v10 + 24; } else if ( v8 >= v7 ) { v12 = *(_DWORD *)__errno_location(v5); *(_DWORD *)my_thread_var(v5) = v12; if ( a4 < 0 ) my_free(a2); v4 = 0LL; if ( (a4 & 0x18) != 0 ) my_error(5u, 4100LL, v8); } return v4; }
my_realloc: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDX TEST RSI,RSI SETNZ AL TEST CL,0x40 SETZ DL OR DL,AL JZ 0x001aa398 MOV R15,RSI MOV dword ptr [RBP + -0x2c],EDI MOV qword ptr [RBP + -0x38],RCX LEA RDI,[RSI + -0x18] MOV R12,qword ptr [RSI + -0x10] MOV R13,R12 AND R13,-0x2 ADD RBX,0x7 AND RBX,-0x8 LEA RSI,[RBX + 0x18] CALL 0x0012a0b0 TEST RAX,RAX JZ 0x001aa3b1 MOV R14,RAX AND R12D,0x1 MOV RAX,R12 OR RAX,RBX MOV qword ptr [R14 + 0x8],RAX LEA RAX,[0x493a58] MOV RAX,qword ptr [RAX] MOV EDI,dword ptr [RBP + -0x2c] MOV RSI,R13 MOV RDX,RBX MOV RCX,R14 CALL qword ptr [RAX + 0x3e8] MOV dword ptr [R14 + 0x10],EAX SUB RBX,R13 MOV RDI,RBX MOV ESI,R12D CALL qword ptr [0x004934f0] ADD R14,0x18 MOV R15,R14 JMP 0x001aa3f4 LAB_001aa398: MOV RSI,RBX MOV RDX,RCX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001aa1d9 LAB_001aa3b1: CMP RBX,R13 JC 0x001aa3f4 CALL 0x0012a7f0 MOV R14D,dword ptr [RAX] CALL 0x001ac2be MOV dword ptr [RAX],R14D MOV R14,qword ptr [RBP + -0x38] TEST R14B,R14B JNS 0x001aa3d7 MOV RDI,R15 CALL 0x001aa406 LAB_001aa3d7: XOR R15D,R15D TEST R14B,0x18 JZ 0x001aa3f4 MOV ESI,0x1004 MOV EDI,0x5 MOV RDX,RBX XOR EAX,EAX CALL 0x001a5c33 LAB_001aa3f4: MOV RAX,R15 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_realloc(ulong param_1,long param_2,long param_3,ulong param_4) { int iVar1; int4 uVar2; void *pvVar3; long lVar4; int *piVar5; ulong uVar6; ulong uVar7; ulong uVar8; if ((param_4 & 0x40) == 0 || param_2 != 0) { uVar7 = *(ulong *)(param_2 + -0x10); uVar8 = uVar7 & 0xfffffffffffffffe; uVar6 = param_3 + 7U & 0xfffffffffffffff8; pvVar3 = realloc((void *)(param_2 + -0x18),uVar6 + 0x18); if (pvVar3 == (void *)0x0) { if (uVar8 <= uVar6) { piVar5 = __errno_location(); iVar1 = *piVar5; piVar5 = (int *)_my_thread_var(); *piVar5 = iVar1; if ((char)param_4 < '\0') { my_free(param_2); } param_2 = 0; if ((param_4 & 0x18) != 0) { my_error(5,0x1004,uVar6); param_2 = 0; } } } else { uVar7 = (ulong)((uint)uVar7 & 1); *(ulong *)((long)pvVar3 + 8) = uVar7 | uVar6; uVar2 = (**(code **)(PSI_server + 1000))(param_1 & 0xffffffff,uVar8,uVar6,pvVar3); *(int4 *)((long)pvVar3 + 0x10) = uVar2; (*(code *)update_malloc_size)(uVar6 - uVar8,uVar7); param_2 = (long)pvVar3 + 0x18; } return param_2; } lVar4 = my_malloc(param_1,param_3,param_4); return lVar4; }
35,066
pvio_socket_close
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
my_bool pvio_socket_close(MARIADB_PVIO *pvio) { struct st_pvio_socket *csock= NULL; int r= 0; if (!pvio) return 1; if (pvio->data) { csock= (struct st_pvio_socket *)pvio->data; if (csock && csock->socket != INVALID_SOCKET) { r= closesocket(csock->socket); csock->socket= INVALID_SOCKET; } free((gptr)pvio->data); pvio->data= NULL; } return r; }
O3
c
pvio_socket_close: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax testq %rdi, %rdi je 0x360d7 movq %rdi, %rbx movq (%rdi), %r15 testq %r15, %r15 je 0x360dc movl (%r15), %edi cmpl $-0x1, %edi je 0x360e1 callq 0x138a0 movl %eax, %r14d movl $0xffffffff, (%r15) # imm = 0xFFFFFFFF movq (%rbx), %r15 jmp 0x360e4 movb $0x1, %r14b jmp 0x360f3 xorl %r14d, %r14d jmp 0x360f3 xorl %r14d, %r14d movq %r15, %rdi callq 0x135a0 movq $0x0, (%rbx) movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
pvio_socket_close: push rbp mov rbp, rsp push r15 push r14 push rbx push rax test rdi, rdi jz short loc_360D7 mov rbx, rdi mov r15, [rdi] test r15, r15 jz short loc_360DC mov edi, [r15] cmp edi, 0FFFFFFFFh jz short loc_360E1 call _close mov r14d, eax mov dword ptr [r15], 0FFFFFFFFh mov r15, [rbx] jmp short loc_360E4 loc_360D7: mov r14b, 1 jmp short loc_360F3 loc_360DC: xor r14d, r14d jmp short loc_360F3 loc_360E1: xor r14d, r14d loc_360E4: mov rdi, r15 call _free mov qword ptr [rbx], 0 loc_360F3: mov eax, r14d add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long pvio_socket_close(_DWORD **a1) { unsigned int v1; // r14d _DWORD *v3; // r15 long long v4; // rdi if ( a1 ) { v3 = *a1; if ( *a1 ) { v4 = (unsigned int)*v3; if ( (_DWORD)v4 == -1 ) { v1 = 0; } else { v1 = close(v4); *v3 = -1; v3 = *a1; } free(v3); *a1 = 0LL; } else { return 0; } } else { LOBYTE(v1) = 1; } return v1; }
pvio_socket_close: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX TEST RDI,RDI JZ 0x001360d7 MOV RBX,RDI MOV R15,qword ptr [RDI] TEST R15,R15 JZ 0x001360dc MOV EDI,dword ptr [R15] CMP EDI,-0x1 JZ 0x001360e1 CALL 0x001138a0 MOV R14D,EAX MOV dword ptr [R15],0xffffffff MOV R15,qword ptr [RBX] JMP 0x001360e4 LAB_001360d7: MOV R14B,0x1 JMP 0x001360f3 LAB_001360dc: XOR R14D,R14D JMP 0x001360f3 LAB_001360e1: XOR R14D,R14D LAB_001360e4: MOV RDI,R15 CALL 0x001135a0 MOV qword ptr [RBX],0x0 LAB_001360f3: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
ulong pvio_socket_close(int8 *param_1) { uint uVar1; int8 unaff_R14; ulong uVar2; int *__ptr; if (param_1 == (int8 *)0x0) { uVar2 = CONCAT71((int7)((ulong)unaff_R14 >> 8),1); } else { __ptr = (int *)*param_1; if (__ptr == (int *)0x0) { uVar2 = 0; } else { if (*__ptr == -1) { uVar2 = 0; } else { uVar1 = close(*__ptr); uVar2 = (ulong)uVar1; *__ptr = -1; __ptr = (int *)*param_1; } free(__ptr); *param_1 = 0; } } return uVar2 & 0xffffffff; }
35,067
minja::Parser::parseConstant()
llama.cpp/common/minja/minja.hpp
std::shared_ptr<Value> parseConstant() { auto start = it; consumeSpaces(); if (it == end) return nullptr; if (*it == '"' || *it == '\'') { auto str = parseString(); if (str) return std::make_shared<Value>(*str); } static std::regex prim_tok(R"(true\b|True\b|false\b|False\b|None\b)"); auto token = consumeToken(prim_tok); if (!token.empty()) { if (token == "true" || token == "True") return std::make_shared<Value>(true); if (token == "false" || token == "False") return std::make_shared<Value>(false); if (token == "None") return std::make_shared<Value>(nullptr); throw std::runtime_error("Unknown constant token: " + token); } auto number = parseNumber(it, end); if (!number.is_null()) return std::make_shared<Value>(number); it = start; return nullptr; }
O3
cpp
minja::Parser::parseConstant(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rsi, %r15 movq %rdi, %rbx leaq 0x20(%rsi), %r14 movq 0x18(%rsi), %r12 movq 0x20(%rsi), %r13 movq %r13, %rbp cmpq %r12, %r13 je 0xe78a3 movq %r13, %rbp movsbl (%rbp), %edi callq 0x20d60 testl %eax, %eax je 0xe78a3 incq %rbp movq %rbp, (%r14) cmpq %r12, %rbp jne 0xe788b cmpq %r12, %rbp je 0xe78f9 movzbl (%rbp), %eax cmpl $0x27, %eax je 0xe78b6 cmpl $0x22, %eax jne 0xe7904 leaq 0x8(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi callq 0xe8c2e movq (%r12), %rdx testq %rdx, %rdx je 0xe7904 leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0xe9220 movq 0x8(%rsp), %rsi testq %rsi, %rsi je 0xe7a61 leaq 0x8(%rsp), %rdi callq 0xe93c6 jmp 0xe7a61 xorps %xmm0, %xmm0 movups %xmm0, (%rbx) jmp 0xe7a61 leaq 0x81125(%rip), %rax # 0x168a30 movb (%rax), %al testb %al, %al je 0xe7a73 leaq 0x810f4(%rip), %rdx # 0x168a10 leaq 0x8(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi movl $0x1, %ecx callq 0xe245a cmpq $0x0, 0x8(%r12) je 0xe79e0 leaq 0x2eebf(%rip), %rsi # 0x116803 leaq 0x8(%rsp), %rdi callq 0x20fc0 testl %eax, %eax je 0xe79c9 leaq 0x3b3ee(%rip), %rsi # 0x122d47 leaq 0x8(%rsp), %rdi callq 0x20fc0 testl %eax, %eax je 0xe79c9 leaq 0x31dc2(%rip), %rsi # 0x119730 leaq 0x8(%rsp), %rdi callq 0x20fc0 testl %eax, %eax je 0xe7a0f leaq 0x3b3c5(%rip), %rsi # 0x122d4c leaq 0x8(%rsp), %rdi callq 0x20fc0 testl %eax, %eax je 0xe7a0f leaq 0x3b71b(%rip), %rsi # 0x1230b7 leaq 0x8(%rsp), %rdi callq 0x20fc0 testl %eax, %eax jne 0xe7aca leaq 0x28(%rsp), %rdx movq $0x0, (%rdx) leaq 0x7(%rsp), %rsi movq %rbx, %rdi callq 0xe94e6 jmp 0xe7a46 leaq 0x7(%rsp), %rdx movb $0x1, (%rdx) leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0xe93f4 jmp 0xe7a46 leaq 0x18(%r15), %rcx leaq 0x28(%rsp), %rdi movq %r15, %rsi movq %r14, %rdx callq 0xe8cae cmpb $0x0, 0x28(%rsp) je 0xe7a26 leaq 0x7(%rsp), %rsi leaq 0x28(%rsp), %rdx movq %rbx, %rdi callq 0xe95ce jmp 0xe7a2f leaq 0x7(%rsp), %rdx movb $0x0, (%rdx) leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0xe93f4 jmp 0xe7a46 movq %r13, (%r14) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) leaq 0x28(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x88a76 movq %r14, %rdi callq 0x8d190 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xe7a61 movq 0x18(%rsp), %rsi incq %rsi callq 0x20180 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x80fb6(%rip), %rdi # 0x168a30 callq 0x205d0 testl %eax, %eax je 0xe7915 leaq 0x80f82(%rip), %rdi # 0x168a10 leaq 0x3cede(%rip), %rsi # 0x124973 movl $0x10, %edx callq 0x69ac0 leaq -0x7df3a(%rip), %rdi # 0x69b6c leaq 0x80f63(%rip), %rsi # 0x168a10 leaq 0x7eff4(%rip), %rdx # 0x166aa8 callq 0x20f40 leaq 0x80f70(%rip), %rdi # 0x168a30 callq 0x209c0 jmp 0xe7915 movl $0x10, %edi callq 0x20680 movq %rax, %r14 leaq 0x3ceba(%rip), %rsi # 0x124998 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x693af movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %r14, %rdi callq 0x204b0 xorl %ebp, %ebp movq 0x7e4ba(%rip), %rsi # 0x165fc0 movq 0x7e473(%rip), %rdx # 0x165f80 movq %r14, %rdi callq 0x20ab0 movq %rax, %rbx leaq 0x80f11(%rip), %rdi # 0x168a30 callq 0x20700 jmp 0xe7bb4 movq %rax, %rbx leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xe7b47 movq 0x38(%rsp), %rsi incq %rsi callq 0x20180 testb %bpl, %bpl jne 0xe7b51 jmp 0xe7b80 movq %rax, %rbx movq %r14, %rdi callq 0x20f60 jmp 0xe7b80 jmp 0xe7b7d jmp 0xe7b7d movq %rax, %rbx leaq 0x28(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x88a76 movq %r14, %rdi callq 0x8d190 jmp 0xe7b80 jmp 0xe7b7d movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xe7bb4 movq 0x18(%rsp), %rsi incq %rsi callq 0x20180 jmp 0xe7bb4 movq %rax, %rbx movq 0x8(%rsp), %rsi testq %rsi, %rsi je 0xe7bb4 leaq 0x8(%rsp), %rdi callq 0xe93c6 movq %rbx, %rdi callq 0x20b50
_ZN5minja6Parser13parseConstantEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r15, rsi mov rbx, rdi lea r14, [rsi+20h] mov r12, [rsi+18h] mov r13, [rsi+20h] mov rbp, r13 cmp r13, r12 jz short loc_E78A3 mov rbp, r13 loc_E788B: movsx edi, byte ptr [rbp+0] call _isspace test eax, eax jz short loc_E78A3 inc rbp mov [r14], rbp cmp rbp, r12 jnz short loc_E788B loc_E78A3: cmp rbp, r12 jz short loc_E78F9 movzx eax, byte ptr [rbp+0] cmp eax, 27h ; ''' jz short loc_E78B6 cmp eax, 22h ; '"' jnz short loc_E7904 loc_E78B6: lea r12, [rsp+78h+var_70] mov rdi, r12; int mov rsi, r15; void * call _ZN5minja6Parser11parseStringB5cxx11Ev; minja::Parser::parseString(void) mov rdx, [r12] test rdx, rdx jz short loc_E7904 lea rsi, [rsp+78h+var_50] mov rdi, rbx call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIvEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,std::string &>(std::_Sp_alloc_shared_tag<std::allocator<void>>,std::string &) mov rsi, qword ptr [rsp+78h+var_70] test rsi, rsi jz loc_E7A61 lea rdi, [rsp+78h+var_70] call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) jmp loc_E7A61 loc_E78F9: xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 jmp loc_E7A61 loc_E7904: lea rax, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; `guard variable for'minja::Parser::parseConstant(void)::prim_tok mov al, [rax] test al, al jz loc_E7A73 loc_E7915: lea rdx, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; int lea r12, [rsp+78h+var_70] mov rdi, r12; int mov rsi, r15; int mov ecx, 1; int call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) cmp qword ptr [r12+8], 0 jz loc_E79E0 lea rsi, aTrue; "true" lea rdi, [rsp+78h+var_70] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_E79C9 lea rsi, aTrue_0; "True" lea rdi, [rsp+78h+var_70] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_E79C9 lea rsi, aAdvancedOption+0ABh; "false" lea rdi, [rsp+78h+var_70] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz loc_E7A0F lea rsi, aFalse; "False" lea rdi, [rsp+78h+var_70] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_E7A0F lea rsi, aNone_0; "None" lea rdi, [rsp+78h+var_70] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jnz loc_E7ACA lea rdx, [rsp+78h+var_50] mov qword ptr [rdx], 0 lea rsi, [rsp+78h+var_71] mov rdi, rbx call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIvEJDnEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,decltype(nullptr)>(std::_Sp_alloc_shared_tag<std::allocator<void>>,decltype(nullptr) &&) jmp short loc_E7A46 loc_E79C9: lea rdx, [rsp+78h+var_71] mov byte ptr [rdx], 1 lea rsi, [rsp+78h+var_50] mov rdi, rbx call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIvEJbEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,bool>(std::_Sp_alloc_shared_tag<std::allocator<void>>,bool &&) jmp short loc_E7A46 loc_E79E0: lea rcx, [r15+18h] lea rdi, [rsp+78h+var_50] mov rsi, r15 mov rdx, r14 call _ZN5minja6Parser11parseNumberERN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKSB_; minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*,std::string> &,__gnu_cxx::__normal_iterator<char const*,std::string> const&) cmp [rsp+78h+var_50], 0 jz short loc_E7A26 lea rsi, [rsp+78h+var_71] lea rdx, [rsp+78h+var_50] mov rdi, rbx call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIvEJRN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS8_14adl_serializerESB_IhSaIhEEvEEEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &>(std::_Sp_alloc_shared_tag<std::allocator<void>>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &) jmp short loc_E7A2F loc_E7A0F: lea rdx, [rsp+78h+var_71] mov byte ptr [rdx], 0 lea rsi, [rsp+78h+var_50] mov rdi, rbx call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIvEJbEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,bool>(std::_Sp_alloc_shared_tag<std::allocator<void>>,bool &&) jmp short loc_E7A46 loc_E7A26: mov [r14], r13 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 loc_E7A2F: lea r14, [rsp+78h+var_50] 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() loc_E7A46: lea rax, [rsp+78h+var_60] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_E7A61 mov rsi, [rsp+78h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_E7A61: mov rax, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_E7A73: lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_E7915 lea rdi, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; minja::Parser::parseConstant(void)::prim_tok lea rsi, aTrueBTrueBFals; "true\\b|True\\b|false\\b|False\\b|None"... mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_E7915 loc_E7ACA: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aUnknownConstan; "Unknown constant token: " lea rdi, [rsp+78h+var_50] lea rdx, [rsp+78h+var_70] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov bpl, 1 lea rsi, [rsp+78h+var_50] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard * call ___cxa_guard_abort jmp loc_E7BB4 mov rbx, rax lea rax, [rsp+78h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_E7B47 mov rsi, [rsp+78h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_E7B47: test bpl, bpl jnz short loc_E7B51 jmp short loc_E7B80 mov rbx, rax loc_E7B51: mov rdi, r14; void * call ___cxa_free_exception jmp short loc_E7B80 jmp short loc_E7B7D jmp short loc_E7B7D mov rbx, rax lea r14, [rsp+78h+var_50] 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() jmp short loc_E7B80 jmp short $+2 loc_E7B7D: mov rbx, rax loc_E7B80: lea rax, [rsp+78h+var_60] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_E7BB4 mov rsi, [rsp+78h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_E7BB4 mov rbx, rax mov rsi, qword ptr [rsp+78h+var_70] test rsi, rsi jz short loc_E7BB4 lea rdi, [rsp+78h+var_70] call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) loc_E7BB4: mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::parseConstant(minja::Parser *this, unsigned __int8 **a2) { unsigned __int8 **v2; // r14 char *v3; // r12 unsigned __int8 *v4; // r13 unsigned __int8 *v5; // rbp int v6; // eax void *exception; // r14 char v9; // [rsp+7h] [rbp-71h] BYREF int v10[2]; // [rsp+8h] [rbp-70h] BYREF long long v11; // [rsp+10h] [rbp-68h] long long v12; // [rsp+18h] [rbp-60h] BYREF _QWORD v13[2]; // [rsp+28h] [rbp-50h] BYREF v2 = a2 + 4; v3 = (char *)a2[3]; v4 = a2[4]; v5 = v4; if ( v4 != (unsigned __int8 *)v3 ) { v5 = a2[4]; do { if ( !(unsigned int)isspace((unsigned int)(char)*v5) ) break; *v2 = ++v5; } while ( v5 != (unsigned __int8 *)v3 ); } if ( v5 == (unsigned __int8 *)v3 ) { *(_OWORD *)this = 0LL; } else { v6 = *v5; if ( (v6 == 39 || v6 == 34) && (minja::Parser::parseString[abi:cxx11]((int)v10, a2), *(_QWORD *)v10) ) { std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,std::string &>( this, v13); if ( *(_QWORD *)v10 ) std::default_delete<std::string>::operator()(v10); } else { if ( !(_BYTE)`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseConstant(void)::prim_tok[abi:cxx11], (long long)"true\\b|True\\b|false\\b|False\\b|None\\b", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseConstant(void)::prim_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11]); } minja::Parser::consumeToken( v10, (long long)a2, (long long)&minja::Parser::parseConstant(void)::prim_tok[abi:cxx11], 1u); if ( v11 ) { if ( !(unsigned int)std::string::compare(v10, "true") || !(unsigned int)std::string::compare(v10, "True") ) { v9 = 1; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,bool>( this, v13, &v9); } else if ( !(unsigned int)std::string::compare(v10, "false") || !(unsigned int)std::string::compare(v10, "False") ) { v9 = 0; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,bool>( this, v13, &v9); } else { if ( (unsigned int)std::string::compare(v10, "None") ) { exception = __cxa_allocate_exception(0x10uLL); std::operator+<char>((long long)v13, (long long)"Unknown constant token: ", v10); std::runtime_error::runtime_error(exception, v13); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v13[0] = 0LL; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,decltype(nullptr)>( this, &v9, v13); } } else { minja::Parser::parseNumber(v13, a2, v2, a2 + 3); if ( LOBYTE(v13[0]) ) { std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &>( this, &v9, v13); } else { *v2 = v4; *(_OWORD *)this = 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>::data::~data(v13); } if ( *(long long **)v10 != &v12 ) operator delete(*(void **)v10, v12 + 1); } } return this; }
parseConstant: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R15,RSI MOV RBX,RDI LEA R14,[RSI + 0x20] MOV R12,qword ptr [RSI + 0x18] MOV R13,qword ptr [RSI + 0x20] MOV RBP,R13 CMP R13,R12 JZ 0x001e78a3 MOV RBP,R13 LAB_001e788b: MOVSX EDI,byte ptr [RBP] CALL 0x00120d60 TEST EAX,EAX JZ 0x001e78a3 INC RBP MOV qword ptr [R14],RBP CMP RBP,R12 JNZ 0x001e788b LAB_001e78a3: CMP RBP,R12 JZ 0x001e78f9 MOVZX EAX,byte ptr [RBP] CMP EAX,0x27 JZ 0x001e78b6 CMP EAX,0x22 JNZ 0x001e7904 LAB_001e78b6: LEA R12,[RSP + 0x8] MOV RDI,R12 MOV RSI,R15 CALL 0x001e8c2e MOV RDX,qword ptr [R12] TEST RDX,RDX JZ 0x001e7904 LAB_001e78cf: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x001e9220 LAB_001e78dc: MOV RSI,qword ptr [RSP + 0x8] TEST RSI,RSI JZ 0x001e7a61 LEA RDI,[RSP + 0x8] CALL 0x001e93c6 JMP 0x001e7a61 LAB_001e78f9: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 JMP 0x001e7a61 LAB_001e7904: LEA RAX,[0x268a30] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x001e7a73 LAB_001e7915: LEA RDX,[0x268a10] LEA R12,[RSP + 0x8] MOV RDI,R12 MOV RSI,R15 MOV ECX,0x1 CALL 0x001e245a CMP qword ptr [R12 + 0x8],0x0 JZ 0x001e79e0 LEA RSI,[0x216803] LEA RDI,[RSP + 0x8] CALL 0x00120fc0 TEST EAX,EAX JZ 0x001e79c9 LEA RSI,[0x222d47] LEA RDI,[RSP + 0x8] CALL 0x00120fc0 TEST EAX,EAX JZ 0x001e79c9 LEA RSI,[0x219730] LEA RDI,[RSP + 0x8] CALL 0x00120fc0 TEST EAX,EAX JZ 0x001e7a0f LEA RSI,[0x222d4c] LEA RDI,[RSP + 0x8] CALL 0x00120fc0 TEST EAX,EAX JZ 0x001e7a0f LEA RSI,[0x2230b7] LEA RDI,[RSP + 0x8] CALL 0x00120fc0 TEST EAX,EAX JNZ 0x001e7aca LEA RDX,[RSP + 0x28] MOV qword ptr [RDX],0x0 LAB_001e79ba: LEA RSI,[RSP + 0x7] MOV RDI,RBX CALL 0x001e94e6 JMP 0x001e7a46 LAB_001e79c9: LEA RDX,[RSP + 0x7] MOV byte ptr [RDX],0x1 LAB_001e79d1: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x001e93f4 JMP 0x001e7a46 LAB_001e79e0: LEA RCX,[R15 + 0x18] LEA RDI,[RSP + 0x28] MOV RSI,R15 MOV RDX,R14 CALL 0x001e8cae CMP byte ptr [RSP + 0x28],0x0 JZ 0x001e7a26 LAB_001e79fb: LEA RSI,[RSP + 0x7] LEA RDX,[RSP + 0x28] MOV RDI,RBX CALL 0x001e95ce JMP 0x001e7a2f LAB_001e7a0f: LEA RDX,[RSP + 0x7] MOV byte ptr [RDX],0x0 LAB_001e7a17: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x001e93f4 JMP 0x001e7a46 LAB_001e7a26: MOV qword ptr [R14],R13 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 LAB_001e7a2f: LEA R14,[RSP + 0x28] MOV RDI,R14 XOR ESI,ESI CALL 0x00188a76 MOV RDI,R14 CALL 0x0018d190 LAB_001e7a46: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001e7a61 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00120180 LAB_001e7a61: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001e7a73: LEA RDI,[0x268a30] CALL 0x001205d0 TEST EAX,EAX JZ 0x001e7915 LAB_001e7a87: LEA RDI,[0x268a10] LEA RSI,[0x224973] MOV EDX,0x10 CALL 0x00169ac0 LAB_001e7a9f: LEA RDI,[0x169b6c] LEA RSI,[0x268a10] LEA RDX,[0x266aa8] CALL 0x00120f40 LEA RDI,[0x268a30] CALL 0x001209c0 JMP 0x001e7915 LAB_001e7aca: MOV EDI,0x10 CALL 0x00120680 MOV R14,RAX LAB_001e7ad7: LEA RSI,[0x224998] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x001693af MOV BPL,0x1 LAB_001e7af0: LEA RSI,[RSP + 0x28] MOV RDI,R14 CALL 0x001204b0 XOR EBP,EBP MOV RSI,qword ptr [0x00265fc0] MOV RDX,qword ptr [0x00265f80] MOV RDI,R14 CALL 0x00120ab0
/* minja::Parser::parseConstant() */ void minja::Parser::parseConstant(void) { char *pcVar1; char *pcVar2; int iVar3; runtime_error *this; char *pcVar4; __normal_iterator *in_RSI; int8 *in_RDI; string *local_70; long local_68; long local_60 [2]; int8 local_50 [4]; pcVar1 = *(char **)(in_RSI + 0x18); pcVar2 = *(char **)(in_RSI + 0x20); pcVar4 = pcVar2; while ((pcVar4 != pcVar1 && (iVar3 = isspace((int)*pcVar4), iVar3 != 0))) { pcVar4 = pcVar4 + 1; *(char **)(in_RSI + 0x20) = pcVar4; } if (pcVar4 == pcVar1) { *in_RDI = 0; in_RDI[1] = 0; } else if (((*pcVar4 == '\'') || (*pcVar4 == '\"')) && (parseString_abi_cxx11_(), local_70 != (string *)0x0)) { /* try { // try from 001e78cf to 001e78db has its CatchHandler @ 001e7b9d */ std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>:: __shared_ptr<std::allocator<void>,std::__cxx11::string&>(); if (local_70 != (string *)0x0) { std::default_delete<std::__cxx11::string>::operator() ((default_delete<std::__cxx11::string> *)&local_70,local_70); } } else { if ((parseConstant()::prim_tok_abi_cxx11_ == '\0') && (iVar3 = __cxa_guard_acquire(&parseConstant()::prim_tok_abi_cxx11_), iVar3 != 0)) { /* try { // try from 001e7a87 to 001e7a9e has its CatchHandler @ 001e7b15 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseConstant()::prim_tok_abi_cxx11_,"true\\b|True\\b|false\\b|False\\b|None\\b", 0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseConstant()::prim_tok_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseConstant()::prim_tok_abi_cxx11_); } consumeToken(&local_70); if (local_68 == 0) { /* try { // try from 001e79e0 to 001e79f3 has its CatchHandler @ 001e7b7b */ parseNumber((__normal_iterator *)local_50,in_RSI); if (local_50[0]._0_1_ == (data)0x0) { *(char **)(in_RSI + 0x20) = pcVar2; *in_RDI = 0; in_RDI[1] = 0; } else { /* try { // try from 001e79fb to 001e7a0c has its CatchHandler @ 001e7b5f */ std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>:: __shared_ptr<std::allocator<void>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&> (); } 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_50,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_50); } else { iVar3 = std::__cxx11::string::compare((char *)&local_70); if ((iVar3 == 0) || (iVar3 = std::__cxx11::string::compare((char *)&local_70), iVar3 == 0)) { /* try { // try from 001e79d1 to 001e79dd has its CatchHandler @ 001e7b7d */ std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>:: __shared_ptr<std::allocator<void>,bool>(); } else { iVar3 = std::__cxx11::string::compare((char *)&local_70); if ((iVar3 == 0) || (iVar3 = std::__cxx11::string::compare((char *)&local_70), iVar3 == 0)) { /* try { // try from 001e7a17 to 001e7a23 has its CatchHandler @ 001e7b5d */ std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>:: __shared_ptr<std::allocator<void>,bool>(); } else { iVar3 = std::__cxx11::string::compare((char *)&local_70); if (iVar3 != 0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001e7ad7 to 001e7aec has its CatchHandler @ 001e7b4e */ std::operator+((char *)local_50,(string *)"Unknown constant token: "); /* try { // try from 001e7af0 to 001e7b14 has its CatchHandler @ 001e7b29 */ std::runtime_error::runtime_error(this,(string *)local_50); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00265fc0,PTR__runtime_error_00265f80); } local_50[0] = 0; /* try { // try from 001e79ba to 001e79c6 has its CatchHandler @ 001e7b5b */ std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>:: __shared_ptr<std::allocator<void>,decltype(nullptr)>(); } } } if (local_70 != (string *)local_60) { operator_delete(local_70,local_60[0] + 1); } } return; }
35,068
StartTree::BoundingMatrix<double, StartTree::BIONJMatrix<double>>::sortRow(unsigned long, unsigned long)
iqtree3/utils/bionj2.cpp
void sortRow(size_t r /*row index*/, size_t c /*upper bound on cluster index*/) { //1. copy data from a row of the D matrix into the S matrix // (and write the cluster identifiers that correspond to // the values in the D row into the same-numbered // row in the I matrix), for distances between the cluster // in that row, and other live clusters (up to, but not including c). T* sourceRow = rows[r]; T* values = entriesSorted.rows[r]; int* clusterIndices = entryToCluster.rows[r]; size_t w = 0; for (size_t i=0; i<n; ++i) { values[w] = sourceRow[i]; clusterIndices[w] = static_cast<int>(rowToCluster[i]); if ( i != r && clusterIndices[w] < c ) { ++w; } } values[w] = infiniteDistance; //sentinel value, to stop row search clusterIndices[w] = static_cast<int>(rowToCluster[r]); //Always room for this, because distance to self //was excluded via the i!=r check above. //2. Sort the row in the S matrix and mirror the sort // on the same row of the I matrix. if ( n<=c) { double now = getRealTime(); mirroredHeapsort(values, 0, w, clusterIndices); rowSortingTime += (getRealTime() - now); } else { mirroredHeapsort(values, 0, w, clusterIndices); } }
O3
cpp
StartTree::BoundingMatrix<double, StartTree::BIONJMatrix<double>>::sortRow(unsigned long, unsigned long): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rdi, %rbx movq 0x8(%rdi), %rax movq 0x188(%rdi), %rcx movq (%rcx,%rsi,8), %r15 movq 0x1b8(%rdi), %rcx movq (%rcx,%rsi,8), %r14 movq 0x30(%rdi), %rcx testq %rax, %rax je 0x27468 movq 0x20(%rbx), %rdi movq (%rdi,%rsi,8), %rdi xorl %r12d, %r12d xorl %r8d, %r8d movsd (%rdi,%r8,8), %xmm0 movsd %xmm0, (%r15,%r12,8) movq (%rcx,%r8,8), %r9 movl %r9d, (%r14,%r12,4) cmpq %r8, %rsi je 0x2745e movslq %r9d, %r9 cmpq %rdx, %r9 adcq $0x0, %r12 incq %r8 cmpq %r8, %rax jne 0x2743b jmp 0x2746b xorl %r12d, %r12d movabsq $0x476812f9c0000000, %rdi # imm = 0x476812F9C0000000 movq %rdi, (%r15,%r12,8) movl (%rcx,%rsi,8), %ecx movl %ecx, (%r14,%r12,4) cmpq %rdx, %rax jbe 0x274a2 movq %r15, %rdi xorl %esi, %esi movq %r12, %rdx movq %r14, %rcx addq $0x20, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmp 0x2779d leaq 0x10(%rsp), %r13 movq %r13, %rdi xorl %esi, %esi callq 0x15510 xorps %xmm0, %xmm0 cvtsi2sdq (%r13), %xmm0 cvtsi2sdq 0x8(%r13), %xmm1 divsd 0x3f90(%rip), %xmm1 # 0x2b458 addsd %xmm0, %xmm1 movsd %xmm1, 0x8(%rsp) movq %r15, %rdi xorl %esi, %esi movq %r12, %rdx movq %r14, %rcx callq 0x2779d leaq 0x10(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x15510 xorps %xmm0, %xmm0 cvtsi2sdq (%r14), %xmm0 xorps %xmm1, %xmm1 cvtsi2sdq 0x8(%r14), %xmm1 divsd 0x3f4e(%rip), %xmm1 # 0x2b458 addsd %xmm0, %xmm1 subsd 0x8(%rsp), %xmm1 addsd 0x1c8(%rbx), %xmm1 movsd %xmm1, 0x1c8(%rbx) addq $0x20, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
_ZN9StartTree14BoundingMatrixIdNS_11BIONJMatrixIdEEE7sortRowEmm: push r15 push r14 push r13 push r12 push rbx sub rsp, 20h mov rbx, rdi mov rax, [rdi+8] mov rcx, [rdi+188h] mov r15, [rcx+rsi*8] mov rcx, [rdi+1B8h] mov r14, [rcx+rsi*8] mov rcx, [rdi+30h] test rax, rax jz short loc_27468 mov rdi, [rbx+20h] mov rdi, [rdi+rsi*8] xor r12d, r12d xor r8d, r8d loc_2743B: movsd xmm0, qword ptr [rdi+r8*8] movsd qword ptr [r15+r12*8], xmm0 mov r9, [rcx+r8*8] mov [r14+r12*4], r9d cmp rsi, r8 jz short loc_2745E movsxd r9, r9d cmp r9, rdx adc r12, 0 loc_2745E: inc r8 cmp rax, r8 jnz short loc_2743B jmp short loc_2746B loc_27468: xor r12d, r12d loc_2746B: mov rdi, 476812F9C0000000h mov [r15+r12*8], rdi mov ecx, [rcx+rsi*8] mov [r14+r12*4], ecx cmp rax, rdx jbe short loc_274A2 mov rdi, r15 xor esi, esi mov rdx, r12 mov rcx, r14 add rsp, 20h pop rbx pop r12 pop r13 pop r14 pop r15 jmp _Z16mirroredHeapsortIdiEvPT_mmPT0_; mirroredHeapsort<double,int>(double *,ulong,ulong,int *) loc_274A2: lea r13, [rsp+48h+var_38] mov rdi, r13 xor esi, esi call _gettimeofday xorps xmm0, xmm0 cvtsi2sd xmm0, qword ptr [r13+0] cvtsi2sd xmm1, qword ptr [r13+8] divsd xmm1, cs:qword_2B458 addsd xmm1, xmm0 movsd [rsp+48h+var_40], xmm1 mov rdi, r15 xor esi, esi mov rdx, r12 mov rcx, r14 call _Z16mirroredHeapsortIdiEvPT_mmPT0_; mirroredHeapsort<double,int>(double *,ulong,ulong,int *) lea r14, [rsp+48h+var_38] mov rdi, r14 xor esi, esi call _gettimeofday xorps xmm0, xmm0 cvtsi2sd xmm0, qword ptr [r14] xorps xmm1, xmm1 cvtsi2sd xmm1, qword ptr [r14+8] divsd xmm1, cs:qword_2B458 addsd xmm1, xmm0 subsd xmm1, [rsp+48h+var_40] addsd xmm1, qword ptr [rbx+1C8h] movsd qword ptr [rbx+1C8h], xmm1 add rsp, 20h pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long StartTree::BoundingMatrix<double,StartTree::BIONJMatrix<double>>::sortRow( long long a1, long long a2, unsigned long long a3) { unsigned long long v4; // rax long long v5; // r15 long long v6; // r14 long long v7; // rcx long long v8; // rdi long long v9; // r12 long long i; // r8 long long v11; // r9 long long result; // rax double v13; // [rsp+8h] [rbp-40h] int v14; // [rsp+10h] [rbp-38h] BYREF int v15; // [rsp+18h] [rbp-30h] v4 = *(_QWORD *)(a1 + 8); v5 = *(_QWORD *)(*(_QWORD *)(a1 + 392) + 8 * a2); v6 = *(_QWORD *)(*(_QWORD *)(a1 + 440) + 8 * a2); v7 = *(_QWORD *)(a1 + 48); if ( v4 ) { v8 = *(_QWORD *)(*(_QWORD *)(a1 + 32) + 8 * a2); v9 = 0LL; for ( i = 0LL; i != v4; ++i ) { *(_QWORD *)(v5 + 8 * v9) = *(_QWORD *)(v8 + 8 * i); v11 = *(_QWORD *)(v7 + 8 * i); *(_DWORD *)(v6 + 4 * v9) = v11; if ( a2 != i ) v9 += (int)v11 < a3; } } else { v9 = 0LL; } *(_QWORD *)(v5 + 8 * v9) = 0x476812F9C0000000LL; *(_DWORD *)(v6 + 4 * v9) = *(_DWORD *)(v7 + 8 * a2); if ( v4 > a3 ) return mirroredHeapsort<double,int>(v5, 0LL, v9, v6); gettimeofday(&v14, 0LL); v13 = (double)v15 / 1000000.0 + (double)v14; mirroredHeapsort<double,int>(v5, 0LL, v9, v6); result = gettimeofday(&v14, 0LL); *(double *)(a1 + 456) = (double)v15 / 1000000.0 + (double)v14 - v13 + *(double *)(a1 + 456); return result; }
sortRow: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x20 MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RDI + 0x188] MOV R15,qword ptr [RCX + RSI*0x8] MOV RCX,qword ptr [RDI + 0x1b8] MOV R14,qword ptr [RCX + RSI*0x8] MOV RCX,qword ptr [RDI + 0x30] TEST RAX,RAX JZ 0x00127468 MOV RDI,qword ptr [RBX + 0x20] MOV RDI,qword ptr [RDI + RSI*0x8] XOR R12D,R12D XOR R8D,R8D LAB_0012743b: MOVSD XMM0,qword ptr [RDI + R8*0x8] MOVSD qword ptr [R15 + R12*0x8],XMM0 MOV R9,qword ptr [RCX + R8*0x8] MOV dword ptr [R14 + R12*0x4],R9D CMP RSI,R8 JZ 0x0012745e MOVSXD R9,R9D CMP R9,RDX ADC R12,0x0 LAB_0012745e: INC R8 CMP RAX,R8 JNZ 0x0012743b JMP 0x0012746b LAB_00127468: XOR R12D,R12D LAB_0012746b: MOV RDI,0x476812f9c0000000 MOV qword ptr [R15 + R12*0x8],RDI MOV ECX,dword ptr [RCX + RSI*0x8] MOV dword ptr [R14 + R12*0x4],ECX CMP RAX,RDX JBE 0x001274a2 MOV RDI,R15 XOR ESI,ESI MOV RDX,R12 MOV RCX,R14 ADD RSP,0x20 POP RBX POP R12 POP R13 POP R14 POP R15 JMP 0x0012779d LAB_001274a2: LEA R13,[RSP + 0x10] MOV RDI,R13 XOR ESI,ESI CALL 0x00115510 XORPS XMM0,XMM0 CVTSI2SD XMM0,qword ptr [R13] CVTSI2SD XMM1,qword ptr [R13 + 0x8] DIVSD XMM1,qword ptr [0x0012b458] ADDSD XMM1,XMM0 MOVSD qword ptr [RSP + 0x8],XMM1 MOV RDI,R15 XOR ESI,ESI MOV RDX,R12 MOV RCX,R14 CALL 0x0012779d LEA R14,[RSP + 0x10] MOV RDI,R14 XOR ESI,ESI CALL 0x00115510 XORPS XMM0,XMM0 CVTSI2SD XMM0,qword ptr [R14] XORPS XMM1,XMM1 CVTSI2SD XMM1,qword ptr [R14 + 0x8] DIVSD XMM1,qword ptr [0x0012b458] ADDSD XMM1,XMM0 SUBSD XMM1,qword ptr [RSP + 0x8] ADDSD XMM1,qword ptr [RBX + 0x1c8] MOVSD qword ptr [RBX + 0x1c8],XMM1 ADD RSP,0x20 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* StartTree::BoundingMatrix<double, StartTree::BIONJMatrix<double> >::sortRow(unsigned long, unsigned long) */ void __thiscall StartTree::BoundingMatrix<double,StartTree::BIONJMatrix<double>>::sortRow (BoundingMatrix<double,StartTree::BIONJMatrix<double>> *this,ulong param_1,ulong param_2) { ulong uVar1; double *pdVar2; int *piVar3; long lVar4; long lVar5; ulong uVar6; int iVar7; ulong uVar8; double dVar9; double dVar10; timeval local_38; uVar1 = *(ulong *)(this + 8); pdVar2 = *(double **)(*(long *)(this + 0x188) + param_1 * 8); piVar3 = *(int **)(*(long *)(this + 0x1b8) + param_1 * 8); lVar4 = *(long *)(this + 0x30); if (uVar1 == 0) { uVar8 = 0; } else { lVar5 = *(long *)(*(long *)(this + 0x20) + param_1 * 8); uVar8 = 0; uVar6 = 0; do { pdVar2[uVar8] = *(double *)(lVar5 + uVar6 * 8); iVar7 = (int)*(int8 *)(lVar4 + uVar6 * 8); piVar3[uVar8] = iVar7; if (param_1 != uVar6) { uVar8 = uVar8 + ((ulong)(long)iVar7 < param_2); } uVar6 = uVar6 + 1; } while (uVar1 != uVar6); } pdVar2[uVar8] = 9.999999616903162e+35; piVar3[uVar8] = *(int *)(lVar4 + param_1 * 8); if (uVar1 <= param_2) { gettimeofday(&local_38,(__timezone_ptr_t)0x0); dVar9 = (double)local_38.tv_sec; dVar10 = (double)local_38.tv_usec / _DAT_0012b458; mirroredHeapsort<double,int>(pdVar2,0,uVar8,piVar3); gettimeofday(&local_38,(__timezone_ptr_t)0x0); *(double *)(this + 0x1c8) = (((double)local_38.tv_usec / _DAT_0012b458 + (double)local_38.tv_sec) - (dVar10 + dVar9)) + *(double *)(this + 0x1c8); return; } mirroredHeapsort<double,int>(pdVar2,0,uVar8,piVar3); return; }
35,069
void rapidjson::GenericReader<rapidjson::UTF8<char>, rapidjson::UTF8<char>, rapidjson::CrtAllocator>::ParseValue<0u, rapidjson::GenericStringStream<rapidjson::UTF8<char>>, rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator>>(rapidjson::GenericStringStream<rapidjson::UTF8<char>>&, rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator>&)
mnn-tts/MNN/3rd_party/rapidjson/reader.h
void ParseValue(InputStream& is, Handler& handler) { switch (is.Peek()) { case 'n': ParseNull <parseFlags>(is, handler); break; case 't': ParseTrue <parseFlags>(is, handler); break; case 'f': ParseFalse <parseFlags>(is, handler); break; case '"': ParseString<parseFlags>(is, handler); break; case '{': ParseObject<parseFlags>(is, handler); break; case '[': ParseArray <parseFlags>(is, handler); break; default : ParseNumber<parseFlags>(is, handler); break; } }
O0
c
void rapidjson::GenericReader<rapidjson::UTF8<char>, rapidjson::UTF8<char>, rapidjson::CrtAllocator>::ParseValue<0u, rapidjson::GenericStringStream<rapidjson::UTF8<char>>, rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator>>(rapidjson::GenericStringStream<rapidjson::UTF8<char>>&, rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator>&): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq %rdx, 0x10(%rsp) movq 0x20(%rsp), %rax movq %rax, (%rsp) movq 0x18(%rsp), %rdi callq 0x163c0 movsbl %al, %eax movl %eax, 0xc(%rsp) subl $0x22, %eax je 0x164d1 jmp 0x16454 movl 0xc(%rsp), %eax subl $0x5b, %eax je 0x164fd jmp 0x16463 movl 0xc(%rsp), %eax subl $0x66, %eax je 0x164bc jmp 0x1646e movl 0xc(%rsp), %eax subl $0x6e, %eax je 0x16492 jmp 0x16479 movl 0xc(%rsp), %eax subl $0x74, %eax je 0x164a7 jmp 0x16484 movl 0xc(%rsp), %eax subl $0x7b, %eax je 0x164e8 jmp 0x16512 movq (%rsp), %rdi movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdx callq 0x166b0 jmp 0x16525 movq (%rsp), %rdi movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdx callq 0x16870 jmp 0x16525 movq (%rsp), %rdi movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdx callq 0x16a30 jmp 0x16525 movq (%rsp), %rdi movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdx xorl %ecx, %ecx callq 0x16c10 jmp 0x16525 movq (%rsp), %rdi movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdx callq 0x16df0 jmp 0x16525 movq (%rsp), %rdi movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdx callq 0x17330 jmp 0x16525 movq (%rsp), %rdi movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdx callq 0x176b0 addq $0x28, %rsp retq nopw (%rax,%rax)
_ZN9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE10ParseValueILj0ENS_19GenericStringStreamIS2_EENS_15GenericDocumentIS2_NS_19MemoryPoolAllocatorIS3_EES3_EEEEvRT0_RT1_: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov [rsp+28h+var_18], rdx mov rax, [rsp+28h+var_8] mov [rsp+28h+var_28], rax mov rdi, [rsp+28h+var_10] call _ZNK9rapidjson19GenericStringStreamINS_4UTF8IcEEE4PeekEv; rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Peek(void) movsx eax, al mov [rsp+28h+var_1C], eax sub eax, 22h ; '"' jz short loc_164D1 jmp short $+2 loc_16454: mov eax, [rsp+28h+var_1C] sub eax, 5Bh ; '[' jz loc_164FD jmp short $+2 loc_16463: mov eax, [rsp+28h+var_1C] sub eax, 66h ; 'f' jz short loc_164BC jmp short $+2 loc_1646E: mov eax, [rsp+28h+var_1C] sub eax, 6Eh ; 'n' jz short loc_16492 jmp short $+2 loc_16479: mov eax, [rsp+28h+var_1C] sub eax, 74h ; 't' jz short loc_164A7 jmp short $+2 loc_16484: mov eax, [rsp+28h+var_1C] sub eax, 7Bh ; '{' jz short loc_164E8 jmp loc_16512 loc_16492: mov rdi, [rsp+28h+var_28] mov rsi, [rsp+28h+var_10] mov rdx, [rsp+28h+var_18] call _ZN9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE9ParseNullILj0ENS_19GenericStringStreamIS2_EENS_15GenericDocumentIS2_NS_19MemoryPoolAllocatorIS3_EES3_EEEEvRT0_RT1_; rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::ParseNull<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>>(rapidjson::GenericStringStream<rapidjson::UTF8<char>> &,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator> &) jmp short loc_16525 loc_164A7: mov rdi, [rsp+28h+var_28] mov rsi, [rsp+28h+var_10] mov rdx, [rsp+28h+var_18] call _ZN9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE9ParseTrueILj0ENS_19GenericStringStreamIS2_EENS_15GenericDocumentIS2_NS_19MemoryPoolAllocatorIS3_EES3_EEEEvRT0_RT1_; rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::ParseTrue<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>>(rapidjson::GenericStringStream<rapidjson::UTF8<char>> &,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator> &) jmp short loc_16525 loc_164BC: mov rdi, [rsp+28h+var_28] mov rsi, [rsp+28h+var_10] mov rdx, [rsp+28h+var_18] call _ZN9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE10ParseFalseILj0ENS_19GenericStringStreamIS2_EENS_15GenericDocumentIS2_NS_19MemoryPoolAllocatorIS3_EES3_EEEEvRT0_RT1_; rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::ParseFalse<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>>(rapidjson::GenericStringStream<rapidjson::UTF8<char>> &,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator> &) jmp short loc_16525 loc_164D1: mov rdi, [rsp+28h+var_28] mov rsi, [rsp+28h+var_10] mov rdx, [rsp+28h+var_18] xor ecx, ecx call _ZN9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE11ParseStringILj0ENS_19GenericStringStreamIS2_EENS_15GenericDocumentIS2_NS_19MemoryPoolAllocatorIS3_EES3_EEEEvRT0_RT1_b; rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::ParseString<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>>(rapidjson::GenericStringStream<rapidjson::UTF8<char>> &,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator> &,bool) jmp short loc_16525 loc_164E8: mov rdi, [rsp+28h+var_28] mov rsi, [rsp+28h+var_10] mov rdx, [rsp+28h+var_18] call _ZN9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE11ParseObjectILj0ENS_19GenericStringStreamIS2_EENS_15GenericDocumentIS2_NS_19MemoryPoolAllocatorIS3_EES3_EEEEvRT0_RT1_; rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::ParseObject<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>>(rapidjson::GenericStringStream<rapidjson::UTF8<char>> &,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator> &) jmp short loc_16525 loc_164FD: mov rdi, [rsp+28h+var_28] mov rsi, [rsp+28h+var_10] mov rdx, [rsp+28h+var_18] call _ZN9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE10ParseArrayILj0ENS_19GenericStringStreamIS2_EENS_15GenericDocumentIS2_NS_19MemoryPoolAllocatorIS3_EES3_EEEEvRT0_RT1_; rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::ParseArray<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>>(rapidjson::GenericStringStream<rapidjson::UTF8<char>> &,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator> &) jmp short loc_16525 loc_16512: mov rdi, [rsp+28h+var_28] mov rsi, [rsp+28h+var_10] mov rdx, [rsp+28h+var_18] call _ZN9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE11ParseNumberILj0ENS_19GenericStringStreamIS2_EENS_15GenericDocumentIS2_NS_19MemoryPoolAllocatorIS3_EES3_EEEEvRT0_RT1_; rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::ParseNumber<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>>(rapidjson::GenericStringStream<rapidjson::UTF8<char>> &,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator> &) loc_16525: add rsp, 28h retn
long long rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::ParseValue<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>>( long long a1, long long a2, long long a3) { int v4; // [rsp+Ch] [rbp-1Ch] v4 = rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Peek(a2); switch ( v4 ) { case '"': return rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::ParseString<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>>( a1, a2, a3, 0LL); case '[': return rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::ParseArray<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>>( a1, a2, a3); case 'f': return rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::ParseFalse<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>>( a1, a2, a3); case 'n': return rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::ParseNull<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>>( a1, a2, a3); case 't': return rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::ParseTrue<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>>( a1, a2, a3); case '{': return rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::ParseObject<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>>( a1, a2, a3); } return rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::ParseNumber<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>>( a1, a2, a3); }
ParseValue<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>>: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x10],RDX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x18] CALL 0x001163c0 MOVSX EAX,AL MOV dword ptr [RSP + 0xc],EAX SUB EAX,0x22 JZ 0x001164d1 JMP 0x00116454 LAB_00116454: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x5b JZ 0x001164fd JMP 0x00116463 LAB_00116463: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x66 JZ 0x001164bc JMP 0x0011646e LAB_0011646e: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x6e JZ 0x00116492 JMP 0x00116479 LAB_00116479: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x74 JZ 0x001164a7 JMP 0x00116484 LAB_00116484: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x7b JZ 0x001164e8 JMP 0x00116512 LAB_00116492: MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x10] CALL 0x001166b0 JMP 0x00116525 LAB_001164a7: MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x10] CALL 0x00116870 JMP 0x00116525 LAB_001164bc: MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x10] CALL 0x00116a30 JMP 0x00116525 LAB_001164d1: MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x10] XOR ECX,ECX CALL 0x00116c10 JMP 0x00116525 LAB_001164e8: MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x10] CALL 0x00116df0 JMP 0x00116525 LAB_001164fd: MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x10] CALL 0x00117330 JMP 0x00116525 LAB_00116512: MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x10] CALL 0x001176b0 LAB_00116525: ADD RSP,0x28 RET
/* void rapidjson::GenericReader<rapidjson::UTF8<char>, rapidjson::UTF8<char>, rapidjson::CrtAllocator>::ParseValue<0u, rapidjson::GenericStringStream<rapidjson::UTF8<char> >, rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator> >(rapidjson::GenericStringStream<rapidjson::UTF8<char> >&, rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator>&) */ void __thiscall rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>:: ParseValue<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>> (GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator> *this, GenericStringStream *param_1,GenericDocument *param_2) { char cVar1; cVar1 = GenericStringStream<rapidjson::UTF8<char>>::Peek ((GenericStringStream<rapidjson::UTF8<char>> *)param_1); if (cVar1 == '\"') { ParseString<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>> (this,param_1,param_2,false); } else if (cVar1 == '[') { ParseArray<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>> (this,param_1,param_2); } else if (cVar1 == 'f') { ParseFalse<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>> (this,param_1,param_2); } else if (cVar1 == 'n') { ParseNull<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>> (this,param_1,param_2); } else if (cVar1 == 't') { ParseTrue<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>> (this,param_1,param_2); } else if (cVar1 == '{') { ParseObject<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>> (this,param_1,param_2); } else { ParseNumber<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>> (this,param_1,param_2); } return; }
35,070
mi_cmp_static_record
eloqsql/storage/myisam/mi_statrec.c
int _mi_cmp_static_record(register MI_INFO *info, register const uchar *old) { DBUG_ENTER("_mi_cmp_static_record"); if (info->opt_flag & WRITE_CACHE_USED) { if (flush_io_cache(&info->rec_cache)) { DBUG_RETURN(-1); } info->rec_cache.seek_not_done=1; /* We have done a seek */ } if ((info->opt_flag & READ_CHECK_USED)) { /* If check isn't disabled */ info->rec_cache.seek_not_done=1; /* We have done a seek */ if (info->s->file_read(info, info->rec_buff, info->s->base.reclength, info->lastpos, MYF(MY_NABP))) DBUG_RETURN(-1); if (memcmp(info->rec_buff, old, (uint) info->s->base.reclength)) { DBUG_DUMP("read",old,info->s->base.reclength); DBUG_DUMP("disk",info->rec_buff,info->s->base.reclength); my_errno=HA_ERR_RECORD_CHANGED; /* Record have changed */ DBUG_RETURN(1); } } DBUG_RETURN(0); }
O3
c
mi_cmp_static_record: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movl 0x1c8(%rdi), %ecx testb $0x10, %cl je 0x8706f leaq 0x220(%r14), %rdi movl $0x1, %esi callq 0x954a9 movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF testl %ecx, %ecx jne 0x870e8 movl $0x1, 0x300(%r14) movl 0x1c8(%r14), %ecx xorl %eax, %eax testb $0x4, %cl je 0x870e8 movl $0x1, 0x300(%r14) movq (%r14), %rax movq 0x120(%r14), %rsi movq 0x140(%rax), %rdx movq 0x170(%r14), %rcx movl $0x4, %r8d movq %r14, %rdi callq *0x2e0(%rax) movq %rax, %rcx movl $0xffffffff, %eax # imm = 0xFFFFFFFF testq %rcx, %rcx jne 0x870e8 movq (%r14), %rax movq 0x120(%r14), %rdi movl 0x140(%rax), %edx movq %rbx, %rsi callq 0x29560 movl %eax, %ecx movl $0x0, %eax testl %ecx, %ecx je 0x870e8 callq 0xa1c0e movl $0x7b, (%rax) movl $0x1, %eax popq %rbx popq %r14 popq %rbp retq
_mi_cmp_static_record: push rbp mov rbp, rsp push r14 push rbx mov rbx, rsi mov r14, rdi mov ecx, [rdi+1C8h] test cl, 10h jz short loc_8706F lea rdi, [r14+220h] mov esi, 1 call my_b_flush_io_cache mov ecx, eax mov eax, 0FFFFFFFFh test ecx, ecx jnz loc_870E8 mov dword ptr [r14+300h], 1 mov ecx, [r14+1C8h] loc_8706F: xor eax, eax test cl, 4 jz short loc_870E8 mov dword ptr [r14+300h], 1 mov rax, [r14] mov rsi, [r14+120h] mov rdx, [rax+140h] mov rcx, [r14+170h] mov r8d, 4 mov rdi, r14 call qword ptr [rax+2E0h] mov rcx, rax mov eax, 0FFFFFFFFh test rcx, rcx jnz short loc_870E8 mov rax, [r14] mov rdi, [r14+120h] mov edx, [rax+140h] mov rsi, rbx call _bcmp mov ecx, eax mov eax, 0 test ecx, ecx jz short loc_870E8 call _my_thread_var mov dword ptr [rax], 7Bh ; '{' mov eax, 1 loc_870E8: pop rbx pop r14 pop rbp retn
long long mi_cmp_static_record(_QWORD *a1, long long a2) { int v3; // ecx int v4; // ecx long long result; // rax long long v6; // rcx long long v7; // rdi int v8; // ecx v3 = *((_DWORD *)a1 + 114); if ( (v3 & 0x10) != 0 ) { v4 = my_b_flush_io_cache(a1 + 68, 1LL); result = 0xFFFFFFFFLL; if ( v4 ) return result; *((_DWORD *)a1 + 192) = 1; v3 = *((_DWORD *)a1 + 114); } result = 0LL; if ( (v3 & 4) != 0 ) { *((_DWORD *)a1 + 192) = 1; v6 = (*(long long ( **)(_QWORD *, _QWORD, _QWORD, _QWORD, long long))(*a1 + 736LL))( a1, a1[36], *(_QWORD *)(*a1 + 320LL), a1[46], 4LL); result = 0xFFFFFFFFLL; if ( !v6 ) { v7 = a1[36]; v8 = bcmp(v7, a2, *(unsigned int *)(*a1 + 320LL)); result = 0LL; if ( v8 ) { *(_DWORD *)my_thread_var(v7) = 123; return 1LL; } } } return result; }
_mi_cmp_static_record: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RSI MOV R14,RDI MOV ECX,dword ptr [RDI + 0x1c8] TEST CL,0x10 JZ 0x0018706f LEA RDI,[R14 + 0x220] MOV ESI,0x1 CALL 0x001954a9 MOV ECX,EAX MOV EAX,0xffffffff TEST ECX,ECX JNZ 0x001870e8 MOV dword ptr [R14 + 0x300],0x1 MOV ECX,dword ptr [R14 + 0x1c8] LAB_0018706f: XOR EAX,EAX TEST CL,0x4 JZ 0x001870e8 MOV dword ptr [R14 + 0x300],0x1 MOV RAX,qword ptr [R14] MOV RSI,qword ptr [R14 + 0x120] MOV RDX,qword ptr [RAX + 0x140] MOV RCX,qword ptr [R14 + 0x170] MOV R8D,0x4 MOV RDI,R14 CALL qword ptr [RAX + 0x2e0] MOV RCX,RAX MOV EAX,0xffffffff TEST RCX,RCX JNZ 0x001870e8 MOV RAX,qword ptr [R14] MOV RDI,qword ptr [R14 + 0x120] MOV EDX,dword ptr [RAX + 0x140] MOV RSI,RBX CALL 0x00129560 MOV ECX,EAX MOV EAX,0x0 TEST ECX,ECX JZ 0x001870e8 CALL 0x001a1c0e MOV dword ptr [RAX],0x7b MOV EAX,0x1 LAB_001870e8: POP RBX POP R14 POP RBP RET
int8 _mi_cmp_static_record(long *param_1,void *param_2) { uint uVar1; int iVar2; long lVar3; int8 uVar4; int4 *puVar5; uVar1 = *(uint *)(param_1 + 0x39); if ((uVar1 & 0x10) != 0) { iVar2 = my_b_flush_io_cache(param_1 + 0x44,1); if (iVar2 != 0) { return 0xffffffff; } *(int4 *)(param_1 + 0x60) = 1; uVar1 = *(uint *)(param_1 + 0x39); } uVar4 = 0; if ((uVar1 & 4) != 0) { *(int4 *)(param_1 + 0x60) = 1; lVar3 = (**(code **)(*param_1 + 0x2e0)) (param_1,param_1[0x24],*(int8 *)(*param_1 + 0x140),param_1[0x2e],4); uVar4 = 0xffffffff; if (lVar3 == 0) { iVar2 = bcmp((void *)param_1[0x24],param_2,(ulong)*(uint *)(*param_1 + 0x140)); uVar4 = 0; if (iVar2 != 0) { puVar5 = (int4 *)_my_thread_var(); *puVar5 = 0x7b; uVar4 = 1; } } } return uVar4; }
35,071
ImPlot::CancelPlotSelection()
zkingston[P]unknot/build_O1/_deps/implot-src/implot.cpp
void CancelPlotSelection() { ImPlotContext& gp = *GImPlot; IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr, "CancelPlotSelection() needs to be called between BeginPlot() and EndPlot()!"); SetupLock(); ImPlotPlot& plot = *gp.CurrentPlot; if (plot.Selected) plot.Selected = plot.Selecting = false; }
O1
cpp
ImPlot::CancelPlotSelection(): pushq %r14 pushq %rbx pushq %rax movq 0x2762a1(%rip), %rbx # 0x336ca0 cmpq $0x0, 0x50(%rbx) jne 0xc0a12 leaq 0x1da0b3(%rip), %rdi # 0x29aac0 callq 0x2161f4 movq 0x276287(%rip), %r14 # 0x336ca0 movq 0x50(%r14), %rax cmpb $0x0, 0x9de(%rax) jne 0xc0a2b callq 0xb930f movq 0x50(%r14), %rax movb $0x1, 0x9de(%rax) movq 0x50(%rbx), %rax cmpb $0x1, 0x9e3(%rax) jne 0xc0a4c movw $0x0, 0x9e2(%rax) addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN6ImPlot19CancelPlotSelectionEv: push r14 push rbx push rax mov rbx, cs:GImPlot cmp qword ptr [rbx+50h], 0 jnz short loc_C0A12 lea rdi, aCancelplotsele; "CancelPlotSelection() needs to be calle"... call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*) loc_C0A12: mov r14, cs:GImPlot mov rax, [r14+50h] cmp byte ptr [rax+9DEh], 0 jnz short loc_C0A2B call _ZN6ImPlot11SetupFinishEv; ImPlot::SetupFinish(void) loc_C0A2B: mov rax, [r14+50h] mov byte ptr [rax+9DEh], 1 mov rax, [rbx+50h] cmp byte ptr [rax+9E3h], 1 jnz short loc_C0A4C mov word ptr [rax+9E2h], 0 loc_C0A4C: add rsp, 8 pop rbx pop r14 retn
long long ImPlot::CancelPlotSelection(ImPlot *this, const char *a2) { ImGui *v2; // rbx ImGui *v3; // r14 long long result; // rax v2 = GImPlot; if ( !*((_QWORD *)GImPlot + 10) ) { this = (ImPlot *)"CancelPlotSelection() needs to be called between BeginPlot() and EndPlot()!"; ImGui::ErrorLog((ImGui *)"CancelPlotSelection() needs to be called between BeginPlot() and EndPlot()!", a2); } v3 = GImPlot; if ( !*(_BYTE *)(*((_QWORD *)GImPlot + 10) + 2526LL) ) ImPlot::SetupFinish(this, a2); *(_BYTE *)(*((_QWORD *)v3 + 10) + 2526LL) = 1; result = *((_QWORD *)v2 + 10); if ( *(_BYTE *)(result + 2531) == 1 ) *(_WORD *)(result + 2530) = 0; return result; }
CancelPlotSelection: PUSH R14 PUSH RBX PUSH RAX MOV RBX,qword ptr [0x00436ca0] CMP qword ptr [RBX + 0x50],0x0 JNZ 0x001c0a12 LEA RDI,[0x39aac0] CALL 0x003161f4 LAB_001c0a12: MOV R14,qword ptr [0x00436ca0] MOV RAX,qword ptr [R14 + 0x50] CMP byte ptr [RAX + 0x9de],0x0 JNZ 0x001c0a2b CALL 0x001b930f LAB_001c0a2b: MOV RAX,qword ptr [R14 + 0x50] MOV byte ptr [RAX + 0x9de],0x1 MOV RAX,qword ptr [RBX + 0x50] CMP byte ptr [RAX + 0x9e3],0x1 JNZ 0x001c0a4c MOV word ptr [RAX + 0x9e2],0x0 LAB_001c0a4c: ADD RSP,0x8 POP RBX POP R14 RET
/* ImPlot::CancelPlotSelection() */ void ImPlot::CancelPlotSelection(void) { long lVar1; long lVar2; lVar1 = GImPlot; if (*(long *)(GImPlot + 0x50) == 0) { ImGui::ErrorLog("CancelPlotSelection() needs to be called between BeginPlot() and EndPlot()!"); } lVar2 = GImPlot; if (*(char *)(*(long *)(GImPlot + 0x50) + 0x9de) == '\0') { SetupFinish(); } *(int1 *)(*(long *)(lVar2 + 0x50) + 0x9de) = 1; if (*(char *)(*(long *)(lVar1 + 0x50) + 0x9e3) == '\x01') { *(int2 *)(*(long *)(lVar1 + 0x50) + 0x9e2) = 0; } return; }
35,072
GetSplinePointCatmullRom
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rshapes.c
Vector2 GetSplinePointCatmullRom(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float t) { Vector2 point = { 0 }; float q0 = (-1*t*t*t) + (2*t*t) + (-1*t); float q1 = (3*t*t*t) + (-5*t*t) + 2; float q2 = (-3*t*t*t) + (4*t*t) + t; float q3 = t*t*t - t*t; point.x = 0.5f*((p1.x*q0) + (p2.x*q1) + (p3.x*q2) + (p4.x*q3)); point.y = 0.5f*((p1.y*q0) + (p2.y*q1) + (p3.y*q2) + (p4.y*q3)); return point; }
O3
c
GetSplinePointCatmullRom: movaps %xmm4, %xmm6 addss %xmm4, %xmm6 mulss %xmm4, %xmm6 movaps %xmm4, %xmm8 mulss %xmm4, %xmm8 movaps %xmm8, %xmm5 mulss %xmm4, %xmm5 subss %xmm5, %xmm6 subss %xmm4, %xmm6 movss 0x50ffb(%rip), %xmm7 # 0xcf1ac mulss %xmm4, %xmm7 mulss %xmm4, %xmm7 movss 0x50f3e(%rip), %xmm9 # 0xcf100 mulss %xmm4, %xmm9 mulss %xmm4, %xmm9 mulss %xmm4, %xmm7 addss %xmm9, %xmm7 addss 0x5f0f7(%rip), %xmm7 # 0xdd2d4 movss 0x68fa6(%rip), %xmm9 # 0xe718c mulss %xmm4, %xmm9 mulss %xmm4, %xmm9 movss 0x559bb(%rip), %xmm10 # 0xd3bb4 mulss %xmm4, %xmm10 mulss %xmm4, %xmm10 mulss %xmm4, %xmm9 addss %xmm10, %xmm9 addss %xmm4, %xmm9 subss %xmm8, %xmm5 shufps $0x0, %xmm7, %xmm7 # xmm7 = xmm7[0,0,0,0] mulps %xmm1, %xmm7 shufps $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0] mulps %xmm6, %xmm0 addps %xmm7, %xmm0 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] mulps %xmm2, %xmm9 addps %xmm9, %xmm0 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm3, %xmm5 addps %xmm5, %xmm0 mulps 0x50f1a(%rip), %xmm0 # 0xcf160 retq
GetSplinePointCatmullRom: movaps xmm6, xmm4 addss xmm6, xmm4 mulss xmm6, xmm4 movaps xmm8, xmm4 mulss xmm8, xmm4 movaps xmm5, xmm8 mulss xmm5, xmm4 subss xmm6, xmm5 subss xmm6, xmm4 movss xmm7, cs:dword_CF1AC mulss xmm7, xmm4 mulss xmm7, xmm4 movss xmm9, cs:dword_CF100 mulss xmm9, xmm4 mulss xmm9, xmm4 mulss xmm7, xmm4 addss xmm7, xmm9 addss xmm7, cs:dword_DD2D4 movss xmm9, cs:dword_E718C mulss xmm9, xmm4 mulss xmm9, xmm4 movss xmm10, cs:dword_D3BB4 mulss xmm10, xmm4 mulss xmm10, xmm4 mulss xmm9, xmm4 addss xmm9, xmm10 addss xmm9, xmm4 subss xmm5, xmm8 shufps xmm7, xmm7, 0 mulps xmm7, xmm1 shufps xmm6, xmm6, 0 mulps xmm0, xmm6 addps xmm0, xmm7 shufps xmm9, xmm9, 0 mulps xmm9, xmm2 addps xmm0, xmm9 shufps xmm5, xmm5, 0 mulps xmm5, xmm3 addps xmm0, xmm5 mulps xmm0, cs:xmmword_CF160 retn
__m128 GetSplinePointCatmullRom(__m128 a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5) { __m128 v5; // xmm6 __m128 v6; // xmm8 __m128 v7; // xmm5 __m128 v8; // xmm7 __m128 v9; // xmm9 v5 = a5; v6 = a5; v6.m128_f32[0] = a5.m128_f32[0] * a5.m128_f32[0]; v7 = v6; v7.m128_f32[0] = (float)(a5.m128_f32[0] * a5.m128_f32[0]) * a5.m128_f32[0]; v5.m128_f32[0] = (float)((float)((float)(a5.m128_f32[0] + a5.m128_f32[0]) * a5.m128_f32[0]) - v7.m128_f32[0]) - a5.m128_f32[0]; v8 = (__m128)0x40400000u; v8.m128_f32[0] = (float)((float)((float)((float)(3.0 * a5.m128_f32[0]) * a5.m128_f32[0]) * a5.m128_f32[0]) + (float)((float)(-5.0 * a5.m128_f32[0]) * a5.m128_f32[0])) + 2.0; v9 = (__m128)0xC0400000; v9.m128_f32[0] = (float)((float)((float)((float)(-3.0 * a5.m128_f32[0]) * a5.m128_f32[0]) * a5.m128_f32[0]) + (float)((float)(4.0 * a5.m128_f32[0]) * a5.m128_f32[0])) + a5.m128_f32[0]; v7.m128_f32[0] = v7.m128_f32[0] - (float)(a5.m128_f32[0] * a5.m128_f32[0]); return _mm_mul_ps( _mm_add_ps( _mm_add_ps( _mm_add_ps(_mm_mul_ps(a1, _mm_shuffle_ps(v5, v5, 0)), _mm_mul_ps(_mm_shuffle_ps(v8, v8, 0), a2)), _mm_mul_ps(_mm_shuffle_ps(v9, v9, 0), a3)), _mm_mul_ps(_mm_shuffle_ps(v7, v7, 0), a4)), (__m128)xmmword_CF160); }
GetSplinePointCatmullRom: MOVAPS XMM6,XMM4 ADDSS XMM6,XMM4 MULSS XMM6,XMM4 MOVAPS XMM8,XMM4 MULSS XMM8,XMM4 MOVAPS XMM5,XMM8 MULSS XMM5,XMM4 SUBSS XMM6,XMM5 SUBSS XMM6,XMM4 MOVSS XMM7,dword ptr [0x001cf1ac] MULSS XMM7,XMM4 MULSS XMM7,XMM4 MOVSS XMM9,dword ptr [0x001cf100] MULSS XMM9,XMM4 MULSS XMM9,XMM4 MULSS XMM7,XMM4 ADDSS XMM7,XMM9 ADDSS XMM7,dword ptr [0x001dd2d4] MOVSS XMM9,dword ptr [0x001e718c] MULSS XMM9,XMM4 MULSS XMM9,XMM4 MOVSS XMM10,dword ptr [0x001d3bb4] MULSS XMM10,XMM4 MULSS XMM10,XMM4 MULSS XMM9,XMM4 ADDSS XMM9,XMM10 ADDSS XMM9,XMM4 SUBSS XMM5,XMM8 SHUFPS XMM7,XMM7,0x0 MULPS XMM7,XMM1 SHUFPS XMM6,XMM6,0x0 MULPS XMM0,XMM6 ADDPS XMM0,XMM7 SHUFPS XMM9,XMM9,0x0 MULPS XMM9,XMM2 ADDPS XMM0,XMM9 SHUFPS XMM5,XMM5,0x0 MULPS XMM5,XMM3 ADDPS XMM0,XMM5 MULPS XMM0,xmmword ptr [0x001cf160] RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int8 GetSplinePointCatmullRom (int8 param_1,int8 param_2,int8 param_3,int8 param_4,float param_5 ) { float fVar1; float fVar2; float fVar3; float fVar4; fVar1 = param_5 * param_5 * param_5; fVar2 = ((param_5 + param_5) * param_5 - fVar1) - param_5; fVar3 = DAT_001cf1ac * param_5 * param_5 * param_5 + DAT_001cf100 * param_5 * param_5 + DAT_001dd2d4; fVar4 = DAT_001e718c * param_5 * param_5 * param_5 + DAT_001d3bb4 * param_5 * param_5 + param_5; fVar1 = fVar1 - param_5 * param_5; return CONCAT44(((float)((ulong)param_1 >> 0x20) * fVar2 + fVar3 * (float)((ulong)param_2 >> 0x20) + fVar4 * (float)((ulong)param_3 >> 0x20) + fVar1 * (float)((ulong)param_4 >> 0x20)) * _UNK_001cf164, ((float)param_1 * fVar2 + fVar3 * (float)param_2 + fVar4 * (float)param_3 + fVar1 * (float)param_4) * _DAT_001cf160); }
35,073
LefDefParser::lefiVia::getPolygon(int, int) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiVia.cpp
lefiGeomPolygon lefiVia::getPolygon(int layerNum, int polyNum) const { lefiViaLayer *vl; char msg[160]; lefiGeomPolygon tempPoly; tempPoly.numPoints = 0; tempPoly.x = 0; tempPoly.y = 0; tempPoly.colorMask = 0; if (layerNum < 0 || layerNum >= numLayers_) { sprintf(msg, "ERROR (LEFPARS-1421): The layer number %d given for the VIA LAYER is invalid.\nValid number is from 0 to %d", layerNum, numLayers_); lefiError(0, 1421, msg); return tempPoly; } vl = layers_[layerNum]; return *(vl->getPolygon(polyNum)); }
O3
cpp
LefDefParser::lefiVia::getPolygon(int, int) const: pushq %rbp pushq %r14 pushq %rbx subq $0xa0, %rsp movq %rdi, %rbx testl %edx, %edx setns %dil movl 0x48(%rsi), %eax cmpl %edx, %eax setg %r8b testb %r8b, %dil je 0x14cc1 movq 0x50(%rsi), %rax movl %edx, %edx movq (%rax,%rdx,8), %rax movq 0x48(%rax), %rax movslq %ecx, %rcx movq (%rax,%rcx,8), %rax movups (%rax), %xmm0 movups 0x10(%rax), %xmm1 movups %xmm1, 0x10(%rbx) movups %xmm0, (%rbx) jmp 0x14cf4 leaq 0x38f6d(%rip), %rsi # 0x4dc35 xorl %ebp, %ebp movq %rsp, %r14 movq %r14, %rdi movl %eax, %ecx xorl %eax, %eax callq 0x2050 xorl %edi, %edi movl $0x58d, %esi # imm = 0x58D movq %r14, %rdx callq 0x27ae8 movl %ebp, (%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rbx) movl %ebp, 0x18(%rbx) movq %rbx, %rax addq $0xa0, %rsp popq %rbx popq %r14 popq %rbp retq nop
_ZNK12LefDefParser7lefiVia10getPolygonEii: push rbp push r14 push rbx sub rsp, 0A0h mov rbx, rdi test edx, edx setns dil mov eax, [rsi+48h] cmp eax, edx setnle r8b test dil, r8b jz short loc_14CC1 mov rax, [rsi+50h] mov edx, edx mov rax, [rax+rdx*8] mov rax, [rax+48h] movsxd rcx, ecx mov rax, [rax+rcx*8] movups xmm0, xmmword ptr [rax] movups xmm1, xmmword ptr [rax+10h] movups xmmword ptr [rbx+10h], xmm1 movups xmmword ptr [rbx], xmm0 jmp short loc_14CF4 loc_14CC1: lea rsi, aErrorLefpars14_1; "ERROR (LEFPARS-1421): The layer number "... xor ebp, ebp mov r14, rsp mov rdi, r14 mov ecx, eax xor eax, eax call _sprintf xor edi, edi; this mov esi, 58Dh; int mov rdx, r14; int call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*) mov [rbx], ebp xorps xmm0, xmm0 movups xmmword ptr [rbx+8], xmm0 mov [rbx+18h], ebp loc_14CF4: mov rax, rbx add rsp, 0A0h pop rbx pop r14 pop rbp retn
LefDefParser::lefiVia * LefDefParser::lefiVia::getPolygon( LefDefParser::lefiVia *this, long long a2, signed int a3, int a4) { int v4; // eax __int128 *v5; // rax __int128 v6; // xmm0 const char *v7; // rcx _BYTE v9[184]; // [rsp+0h] [rbp-B8h] BYREF v4 = *(_DWORD *)(a2 + 72); if ( v4 > a3 && a3 >= 0 ) { v5 = *(__int128 **)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a2 + 80) + 8LL * (unsigned int)a3) + 72LL) + 8LL * a4); v6 = *v5; *((_OWORD *)this + 1) = v5[1]; *(_OWORD *)this = v6; } else { sprintf( v9, "ERROR (LEFPARS-1421): The layer number %d given for the VIA LAYER is invalid.\nValid number is from 0 to %d", a3, v4); LefDefParser::lefiError(0LL, 1421, (int)v9, v7); *(_DWORD *)this = 0; *(_OWORD *)((char *)this + 8) = 0LL; *((_DWORD *)this + 6) = 0; } return this; }
getPolygon: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0xa0 MOV RBX,RDI TEST EDX,EDX SETNS DIL MOV EAX,dword ptr [RSI + 0x48] CMP EAX,EDX SETG R8B TEST DIL,R8B JZ 0x00114cc1 MOV RAX,qword ptr [RSI + 0x50] MOV EDX,EDX MOV RAX,qword ptr [RAX + RDX*0x8] MOV RAX,qword ptr [RAX + 0x48] MOVSXD RCX,ECX MOV RAX,qword ptr [RAX + RCX*0x8] MOVUPS XMM0,xmmword ptr [RAX] MOVUPS XMM1,xmmword ptr [RAX + 0x10] MOVUPS xmmword ptr [RBX + 0x10],XMM1 MOVUPS xmmword ptr [RBX],XMM0 JMP 0x00114cf4 LAB_00114cc1: LEA RSI,[0x14dc35] XOR EBP,EBP MOV R14,RSP MOV RDI,R14 MOV ECX,EAX XOR EAX,EAX CALL 0x00102050 XOR EDI,EDI MOV ESI,0x58d MOV RDX,R14 CALL 0x00127ae8 MOV dword ptr [RBX],EBP XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x8],XMM0 MOV dword ptr [RBX + 0x18],EBP LAB_00114cf4: MOV RAX,RBX ADD RSP,0xa0 POP RBX POP R14 POP RBP RET
/* LefDefParser::lefiVia::getPolygon(int, int) const */ int8 * LefDefParser::lefiVia::getPolygon(int param_1,int param_2) { uint uVar1; int8 *puVar2; int8 uVar3; int8 uVar4; int8 uVar5; int in_ECX; ulong in_RDX; int4 in_register_00000034; int4 in_register_0000003c; int8 *puVar6; char acStack_b8 [160]; puVar6 = (int8 *)CONCAT44(in_register_0000003c,param_1); uVar1 = *(uint *)(CONCAT44(in_register_00000034,param_2) + 0x48); if ((int)in_RDX < 0 || (int)uVar1 <= (int)in_RDX) { sprintf(acStack_b8, "ERROR (LEFPARS-1421): The layer number %d given for the VIA LAYER is invalid.\nValid number is from 0 to %d" ,in_RDX,(ulong)uVar1); lefiError(0,0x58d,acStack_b8); *(int4 *)puVar6 = 0; puVar6[1] = 0; puVar6[2] = 0; *(int4 *)(puVar6 + 3) = 0; } else { puVar2 = *(int8 **) (*(long *)(*(long *)(*(long *)(CONCAT44(in_register_00000034,param_2) + 0x50) + (in_RDX & 0xffffffff) * 8) + 0x48) + (long)in_ECX * 8); uVar3 = *puVar2; uVar4 = puVar2[1]; uVar5 = puVar2[3]; puVar6[2] = puVar2[2]; puVar6[3] = uVar5; *puVar6 = uVar3; puVar6[1] = uVar4; } return puVar6; }
35,074
testing::internal::TypedTestSuitePState::VerifyRegisteredTestNames(char const*, char const*, int, char const*)
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest-typed-test.cc
const char* TypedTestSuitePState::VerifyRegisteredTestNames( const char* test_suite_name, const char* file, int line, const char* registered_tests) { RegisterTypeParameterizedTestSuite(test_suite_name, CodeLocation(file, line)); typedef RegisteredTestsMap::const_iterator RegisteredTestIter; registered_ = true; std::vector<std::string> name_vec = SplitIntoTestNames(registered_tests); Message errors; std::set<std::string> tests; for (std::vector<std::string>::const_iterator name_it = name_vec.begin(); name_it != name_vec.end(); ++name_it) { const std::string& name = *name_it; if (tests.count(name) != 0) { errors << "Test " << name << " is listed more than once.\n"; continue; } if (registered_tests_.count(name) != 0) { tests.insert(name); } else { errors << "No test named " << name << " can be found in this test suite.\n"; } } for (RegisteredTestIter it = registered_tests_.begin(); it != registered_tests_.end(); ++it) { if (tests.count(it->first) == 0) { errors << "You forgot to list test " << it->first << ".\n"; } } const std::string& errors_str = errors.GetString(); if (!errors_str.empty()) { fprintf(stderr, "%s %s", FormatFileLocation(file, line).c_str(), errors_str.c_str()); fflush(stderr); posix::Abort(); } return registered_tests; }
O3
cpp
testing::internal::TypedTestSuitePState::VerifyRegisteredTestNames(char const*, char const*, int, char const*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x108, %rsp # imm = 0x108 movq %r8, %r12 movl %ecx, %ebp movq %rdx, %r13 movq %rsi, %rbx movq %rdi, 0x30(%rsp) leaq 0x88(%rsp), %rdi leaq 0x58(%rsp), %rdx movq %r13, %rsi callq 0x81e0 leaq 0xd0(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x98(%rsp), %r14 movq -0x10(%r14), %rax cmpq %r14, %rax je 0x18441 movq %rax, 0xc0(%rsp) movq 0x98(%rsp), %rax movq %rax, 0xd0(%rsp) jmp 0x18449 movups (%r14), %xmm0 movups %xmm0, (%r15) movq 0x90(%rsp), %rax leaq 0xc0(%rsp), %rsi movq %rax, 0x8(%rsi) movq %r14, 0x88(%rsp) movq $0x0, 0x90(%rsp) movb $0x0, 0x98(%rsp) movl %ebp, 0x20(%rsi) movq %rbx, %rdi callq 0x18966 movq 0xc0(%rsp), %rdi cmpq %r15, %rdi je 0x184a1 movq 0xd0(%rsp), %rsi incq %rsi callq 0x84e0 movq 0x88(%rsp), %rdi cmpq %r14, %rdi je 0x184be movq 0x98(%rsp), %rsi incq %rsi callq 0x84e0 movq %r13, 0xa8(%rsp) movl %ebp, 0x3c(%rsp) movq 0x30(%rsp), %rax movb $0x1, (%rax) xorps %xmm0, %xmm0 movaps %xmm0, 0x40(%rsp) movq $0x0, 0x50(%rsp) movq %r12, 0xb0(%rsp) decq %r12 movzbl 0x1(%r12), %edi incq %r12 callq 0x80b0 testl %eax, %eax jne 0x184ee leaq 0x18(%rsp), %rbx leaq 0x68(%rsp), %rbp leaq 0x8(%rsp), %r13 movq %r12, %rdi movl $0x2c, %esi callq 0x81d0 movq %rbx, 0x8(%rsp) testq %rax, %rax jne 0x18531 movq %r12, %rdi callq 0x8200 addq %r12, %rax movq %r13, %rdi movq %r12, %rsi movq %rax, %rdx callq 0x3911e movq 0x8(%rsp), %r14 movq 0x10(%rsp), %r15 testq %r15, %r15 je 0x1858d addq %r14, %r15 movzbl -0x1(%r15), %edi callq 0x80b0 testl %eax, %eax je 0x1858d decq %r15 movq %r15, %rbx subq %r14, %rbx movl $0x1, %edx movq %r13, %rdi movq %rbx, %rsi callq 0x8630 movq 0x8(%rsp), %rax addq %rax, %rbx cmpq %r14, %r15 movq %rax, %r14 movq %rbx, %r15 jne 0x18551 jmp 0x18590 movq %r14, %rax movq %rbp, 0x58(%rsp) leaq 0x18(%rsp), %rbx cmpq %rbx, %rax je 0x185b0 movq %rax, 0x58(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x68(%rsp) jmp 0x185b7 movups (%rbx), %xmm0 movups %xmm0, (%rbp) movq 0x10(%rsp), %rax movq %rax, 0x60(%rsp) movq %rbx, 0x8(%rsp) movq $0x0, 0x10(%rsp) movb $0x0, 0x18(%rsp) leaq 0x40(%rsp), %rdi leaq 0x58(%rsp), %rsi callq 0x39de6 movq 0x58(%rsp), %rdi cmpq %rbp, %rdi je 0x185fa movq 0x68(%rsp), %rsi incq %rsi callq 0x84e0 movq 0x8(%rsp), %rdi cmpq %rbx, %rdi je 0x18611 movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 movq %r12, %rdi movl $0x2c, %esi callq 0x81d0 testq %rax, %rax je 0x1863d movq %rax, %r12 movzbl 0x1(%r12), %edi incq %r12 callq 0x80b0 testl %eax, %eax jne 0x18626 jmp 0x1850f leaq 0x28(%rsp), %rdi callq 0x1c968 leaq 0x60(%rsp), %rcx movl $0x0, (%rcx) xorl %eax, %eax movq %rax, 0x8(%rcx) movq %rcx, 0x10(%rcx) movq %rcx, 0x18(%rcx) movq %rax, 0x20(%rcx) movq 0x40(%rsp), %r14 cmpq 0x48(%rsp), %r14 je 0x18748 movq 0x28(%rsp), %r15 leaq 0x10(%r15), %r13 movq 0x30(%rsp), %rax leaq 0x8(%rax), %rbp addq $0x10, %rax movq %rax, 0xb8(%rsp) leaq 0x58(%rsp), %rbx movq %rbx, %rdi movq %r14, %rsi callq 0x39e3a leaq 0x60(%rsp), %rcx cmpq %rcx, %rax je 0x186e9 movl $0x5, %edx movq %r13, %rdi leaq 0x29f70(%rip), %rsi # 0x4262b callq 0x85b0 movq (%r14), %rsi movq 0x8(%r14), %rdx movl $0x1b, %r12d movq %r13, %rdi callq 0x85b0 leaq 0x29f55(%rip), %rsi # 0x42631 movq %r13, %rdi movq %r12, %rdx callq 0x85b0 jmp 0x18709 movq %rbp, %rdi movq %r14, %rsi callq 0x3924a cmpq 0xb8(%rsp), %rax je 0x18716 movq %rbx, %rdi movq %r14, %rsi callq 0x39ec4 addq $0x20, %r14 cmpq 0x48(%rsp), %r14 jne 0x18697 jmp 0x18748 movl $0xe, %edx movq %r13, %rdi leaq 0x29f28(%rip), %rsi # 0x4264d callq 0x85b0 movq (%r14), %rsi movq 0x8(%r14), %rdx movl $0x22, %r12d movq %r13, %rdi callq 0x85b0 leaq 0x29f16(%rip), %rsi # 0x4265c jmp 0x186dc movq 0x30(%rsp), %rax movq 0x20(%rax), %rbx addq $0x10, %rax cmpq %rax, %rbx je 0x187cf movq %rax, %r15 leaq 0x58(%rsp), %r14 leaq 0x29f16(%rip), %r12 # 0x4267f leaq 0x2ab54(%rip), %r13 # 0x432c4 leaq 0x20(%rbx), %rsi movq %r14, %rdi callq 0x39e3a leaq 0x60(%rsp), %rcx cmpq %rcx, %rax jne 0x187bf movq 0x28(%rsp), %rbp addq $0x10, %rbp movl $0x18, %edx movq %rbp, %rdi movq %r12, %rsi callq 0x85b0 movq 0x20(%rbx), %rsi movq 0x28(%rbx), %rdx movq %rbp, %rdi callq 0x85b0 movl $0x2, %edx movq %rbp, %rdi movq %r13, %rsi callq 0x85b0 movq %rbx, %rdi callq 0x85d0 movq %rax, %rbx cmpq %r15, %rax jne 0x18770 movq 0x28(%rsp), %r15 leaq 0x8(%rsp), %rdi movq %r15, %rsi callq 0x1cbbf cmpq $0x0, 0x10(%rsp) movq 0xb0(%rsp), %rbx leaq 0x18(%rsp), %rax jne 0x18844 movq 0x8(%rsp), %rdi cmpq %rax, %rdi je 0x1880d movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 leaq 0x58(%rsp), %rdi callq 0x36168 testq %r15, %r15 je 0x18825 movq (%r15), %rax movq %r15, %rdi callq *0x8(%rax) leaq 0x40(%rsp), %rdi callq 0x31f9e movq %rbx, %rax addq $0x108, %rsp # imm = 0x108 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x4077d(%rip), %rax # 0x58fc8 movq (%rax), %rbx leaq 0xe8(%rsp), %rdi movq 0xa8(%rsp), %rsi movl 0x3c(%rsp), %edx callq 0x1663e leaq 0xe8(%rsp), %rdi leaq 0x8(%rsp), %rsi movq %rbx, %rdx callq 0x8bd2 movq %rax, %rbx movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x1891b movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 jmp 0x1891b jmp 0x18918 jmp 0x188ed movq %rax, %rbx movq 0xc0(%rsp), %rdi cmpq %r15, %rdi je 0x188c5 movq 0xd0(%rsp), %rsi incq %rsi callq 0x84e0 movq 0x88(%rsp), %rdi cmpq %r14, %rdi je 0x1895e movq 0x98(%rsp), %rsi incq %rsi callq 0x84e0 jmp 0x1895e movq %rax, %rbx jmp 0x1895e movq %rax, %rbx jmp 0x18954 movq %rax, %rbx movq 0x58(%rsp), %rdi cmpq %rbp, %rdi je 0x18938 movq 0x68(%rsp), %rsi incq %rsi callq 0x84e0 jmp 0x18938 movq %rax, %rbx movq 0x28(%rsp), %r15 jmp 0x1891b movq %rax, %rbx leaq 0x58(%rsp), %rdi callq 0x36168 testq %r15, %r15 je 0x18954 movq (%r15), %rax movq %r15, %rdi callq *0x8(%rax) jmp 0x18954 movq %rax, %rbx movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x18954 movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 leaq 0x40(%rsp), %rdi callq 0x31f9e movq %rbx, %rdi callq 0x8990
_ZN7testing8internal20TypedTestSuitePState25VerifyRegisteredTestNamesEPKcS3_iS3_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 108h mov r12, r8 mov ebp, ecx mov r13, rdx mov rbx, rsi mov [rsp+138h+var_108], rdi; __int64 lea rdi, [rsp+138h+var_B0] lea rdx, [rsp+138h+var_E0] mov rsi, r13 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) lea r15, [rsp+138h+var_68] mov [r15-10h], r15 lea r14, [rsp+138h+var_A0] mov rax, [r14-10h] cmp rax, r14 jz short loc_18441 mov [rsp+138h+var_78], rax mov rax, [rsp+138h+var_A0] mov [rsp+138h+var_68], rax jmp short loc_18449 loc_18441: movups xmm0, xmmword ptr [r14] movups xmmword ptr [r15], xmm0 loc_18449: mov rax, [rsp+138h+var_A8] lea rsi, [rsp+138h+var_78] mov [rsi+8], rax mov [rsp+138h+var_B0], r14 mov [rsp+138h+var_A8], 0 mov byte ptr [rsp+138h+var_A0], 0 mov [rsi+20h], ebp mov rdi, rbx; int call _ZN7testing8internal34RegisterTypeParameterizedTestSuiteEPKcNS0_12CodeLocationE; testing::internal::RegisterTypeParameterizedTestSuite(char const*,testing::internal::CodeLocation) mov rdi, [rsp+138h+var_78]; void * cmp rdi, r15 jz short loc_184A1 mov rsi, [rsp+138h+var_68] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_184A1: mov rdi, [rsp+138h+var_B0]; void * cmp rdi, r14 jz short loc_184BE mov rsi, [rsp+138h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_184BE: mov qword ptr [rsp+138h+var_90], r13 mov [rsp+138h+var_FC], ebp mov rax, [rsp+138h+var_108] mov byte ptr [rax], 1 xorps xmm0, xmm0 movaps xmmword ptr [rsp+138h+var_F8], xmm0; int mov [rsp+138h+var_E8], 0; __int64 mov [rsp+138h+var_88], r12 dec r12 loc_184EE: movzx edi, byte ptr [r12+1] inc r12 call _isspace test eax, eax jnz short loc_184EE lea rbx, [rsp+138h+var_120] lea rbp, [rsp+138h+var_D0] lea r13, [rsp+138h+var_130] loc_1850F: mov rdi, r12 mov esi, 2Ch ; ',' call _strchr mov [rsp+138h+var_130], rbx test rax, rax jnz short loc_18531 mov rdi, r12 call _strlen add rax, r12 loc_18531: mov rdi, r13 mov rsi, r12 mov rdx, rax 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 r14, [rsp+138h+var_130] mov r15, [rsp+138h+var_128] test r15, r15 jz short loc_1858D add r15, r14 loc_18551: movzx edi, byte ptr [r15-1] call _isspace test eax, eax jz short loc_1858D dec r15 mov rbx, r15 sub rbx, r14 mov edx, 1 mov rdi, r13 mov rsi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8_M_eraseEmm; std::string::_M_erase(ulong,ulong) mov rax, [rsp+138h+var_130] add rbx, rax cmp r15, r14 mov r14, rax mov r15, rbx jnz short loc_18551 jmp short loc_18590 loc_1858D: mov rax, r14 loc_18590: mov [rsp+138h+var_E0], rbp; int lea rbx, [rsp+138h+var_120] cmp rax, rbx jz short loc_185B0 mov [rsp+138h+var_E0], rax mov rax, qword ptr [rsp+138h+var_120] mov qword ptr [rsp+138h+var_D0], rax jmp short loc_185B7 loc_185B0: movups xmm0, xmmword ptr [rbx] movups xmmword ptr [rbp+0], xmm0 loc_185B7: mov rax, [rsp+138h+var_128] mov [rsp+138h+var_D8], rax; void * mov [rsp+138h+var_130], rbx; int mov [rsp+138h+var_128], 0; __int64 mov byte ptr [rsp+138h+var_120], 0; int lea rdi, [rsp+138h+var_F8] lea rsi, [rsp+138h+var_E0] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEEvDpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, [rsp+138h+var_E0]; void * cmp rdi, rbp jz short loc_185FA mov rsi, qword ptr [rsp+138h+var_D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_185FA: mov rdi, [rsp+138h+var_130]; void * cmp rdi, rbx jz short loc_18611 mov rsi, qword ptr [rsp+138h+var_120] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_18611: mov rdi, r12 mov esi, 2Ch ; ',' call _strchr test rax, rax jz short loc_1863D mov r12, rax loc_18626: movzx edi, byte ptr [r12+1] inc r12 call _isspace test eax, eax jnz short loc_18626 jmp loc_1850F loc_1863D: lea rdi, [rsp+138h+var_110]; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) lea rcx, [rsp+138h+var_D8] mov dword ptr [rcx], 0 xor eax, eax mov [rcx+8], rax mov [rcx+10h], rcx mov [rcx+18h], rcx mov [rcx+20h], rax mov r14, qword ptr [rsp+138h+var_F8] cmp r14, qword ptr [rsp+138h+var_F8+8] jz loc_18748 mov r15, [rsp+138h+var_110] lea r13, [r15+10h] mov rax, [rsp+138h+var_108] lea rbp, [rax+8] add rax, 10h mov [rsp+138h+var_80], rax lea rbx, [rsp+138h+var_E0] loc_18697: mov rdi, rbx mov rsi, r14 call _ZNKSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EE4findERKS5_; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::find(std::string const&) lea rcx, [rsp+138h+var_D8] cmp rax, rcx jz short loc_186E9 mov edx, 5 mov rdi, r13 lea rsi, aTest; "Test " call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rsi, [r14] mov rdx, [r14+8] mov r12d, 1Bh mov rdi, r13 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, aIsListedMoreTh; " is listed more than once.\n" loc_186DC: mov rdi, r13 mov rdx, r12 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) jmp short loc_18709 loc_186E9: mov rdi, rbp mov rsi, r14 call _ZNKSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N7testing8internal12CodeLocationEESt10_Select1stISB_ESt4lessIvESaISB_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,testing::internal::CodeLocation>,std::_Select1st<std::pair<std::string const,testing::internal::CodeLocation>>,std::less<void>,std::allocator<std::pair<std::string const,testing::internal::CodeLocation>>>::find(std::string const&) cmp rax, [rsp+138h+var_80] jz short loc_18716 mov rdi, rbx mov rsi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EE16_M_insert_uniqueIRKS5_EESt4pairISt17_Rb_tree_iteratorIS5_EbEOT_; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::_M_insert_unique<std::string const&>(std::string const&) loc_18709: add r14, 20h ; ' ' cmp r14, qword ptr [rsp+138h+var_F8+8] jnz short loc_18697 jmp short loc_18748 loc_18716: mov edx, 0Eh mov rdi, r13 lea rsi, aNoTestNamed; "No test named " call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rsi, [r14] mov rdx, [r14+8] mov r12d, 22h ; '"' mov rdi, r13 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, aCanBeFoundInTh; " can be found in this test suite.\n" jmp short loc_186DC loc_18748: mov rax, [rsp+138h+var_108] mov rbx, [rax+20h] add rax, 10h cmp rbx, rax jz short loc_187CF mov r15, rax lea r14, [rsp+138h+var_E0] lea r12, aYouForgotToLis; "You forgot to list test " lea r13, aNoteRandomizin+32h; ".\n" loc_18770: lea rsi, [rbx+20h] mov rdi, r14 call _ZNKSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EE4findERKS5_; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::find(std::string const&) lea rcx, [rsp+138h+var_D8] cmp rax, rcx jnz short loc_187BF mov rbp, [rsp+138h+var_110] add rbp, 10h mov edx, 18h mov rdi, rbp mov rsi, r12 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rsi, [rbx+20h] mov rdx, [rbx+28h] mov rdi, rbp call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov edx, 2 mov rdi, rbp mov rsi, r13 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_187BF: mov rdi, rbx call __ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base const*) mov rbx, rax cmp rax, r15 jnz short loc_18770 loc_187CF: mov r15, [rsp+138h+var_110] lea rdi, [rsp+138h+var_130] mov rsi, r15 call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *) cmp [rsp+138h+var_128], 0 mov rbx, [rsp+138h+var_88] lea rax, [rsp+138h+var_120] jnz short loc_18844 mov rdi, [rsp+138h+var_130]; void * cmp rdi, rax jz short loc_1880D mov rsi, qword ptr [rsp+138h+var_120] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1880D: lea rdi, [rsp+138h+var_E0] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EED2Ev; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree() test r15, r15 jz short loc_18825 mov rax, [r15] mov rdi, r15 call qword ptr [rax+8] loc_18825: lea rdi, [rsp+138h+var_F8]; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rax, rbx add rsp, 108h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_18844: mov rax, cs:stderr_ptr mov rbx, [rax] lea rdi, [rsp+138h+var_50]; int mov rsi, qword ptr [rsp+138h+var_90]; int mov edx, [rsp+138h+var_FC]; int call _ZN7testing8internal18FormatFileLocationB5cxx11EPKci; testing::internal::FormatFileLocation(char const*,int) lea rdi, [rsp+138h+var_50]; void * lea rsi, [rsp+138h+var_130] mov rdx, rbx call _ZN7testing8internal20TypedTestSuitePState25VerifyRegisteredTestNamesEPKcS3_iS3__cold_1; testing::internal::TypedTestSuitePState::VerifyRegisteredTestNames(char const*,char const*,int,char const*) [clone] mov rbx, rax mov rdi, [rsp+138h+var_130]; void * lea rax, [rsp+138h+var_120] cmp rdi, rax jz loc_1891B mov rsi, qword ptr [rsp+138h+var_120] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_1891B jmp short loc_18918 jmp short loc_188ED mov rbx, rax mov rdi, [rsp+138h+var_78]; void * cmp rdi, r15 jz short loc_188C5 mov rsi, [rsp+138h+var_68] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_188C5: mov rdi, [rsp+138h+var_B0]; void * cmp rdi, r14 jz loc_1895E mov rsi, [rsp+138h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_1895E mov rbx, rax jmp short loc_1895E loc_188ED: mov rbx, rax jmp short loc_18954 mov rbx, rax mov rdi, [rsp+138h+var_E0]; void * cmp rdi, rbp jz short loc_18938 mov rsi, qword ptr [rsp+138h+var_D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_18938 mov rbx, rax mov r15, [rsp+138h+var_110] jmp short loc_1891B loc_18918: mov rbx, rax loc_1891B: lea rdi, [rsp+138h+var_E0] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EED2Ev; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree() test r15, r15 jz short loc_18954 mov rax, [r15] mov rdi, r15 call qword ptr [rax+8] jmp short loc_18954 mov rbx, rax loc_18938: mov rdi, [rsp+138h+var_130]; void * lea rax, [rsp+138h+var_120] cmp rdi, rax jz short loc_18954 mov rsi, qword ptr [rsp+138h+var_120] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_18954: lea rdi, [rsp+138h+var_F8]; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_1895E: mov rdi, rbx call __Unwind_Resume
const char * testing::internal::TypedTestSuitePState::VerifyRegisteredTestNames( testing::internal::TypedTestSuitePState *this, const char *a2, const char *a3, int a4, const char *a5) { const char *v8; // r12 long long v9; // rdi long long v10; // rax char *v11; // r14 char *v12; // r15 char *v13; // r15 signed long long v14; // rbx __int128 *v15; // rax bool v16; // zf long long v17; // rax long long v18; // rdi int v19; // edx int v20; // r8d int v21; // r9d void **v22; // rcx _QWORD *v23; // r14 long long v24; // r13 long long v25; // rbp long long v26; // r12 const char *v27; // rsi long long v28; // rax long long v29; // rbx long long v30; // r15 long long v31; // rbp long long v32; // r15 const char *v33; // rbx long long v35; // rbx void *v36; // [rsp+0h] [rbp-138h] void *v37; // [rsp+8h] [rbp-130h] BYREF void *v38; // [rsp+10h] [rbp-128h] __int128 v39; // [rsp+18h] [rbp-120h] BYREF long long v40; // [rsp+28h] [rbp-110h] BYREF long long v41; // [rsp+30h] [rbp-108h] int v42; // [rsp+3Ch] [rbp-FCh] int v43[4]; // [rsp+40h] [rbp-F8h] BYREF long long v44; // [rsp+50h] [rbp-E8h] void *v45; // [rsp+58h] [rbp-E0h] BYREF void *v46; // [rsp+60h] [rbp-D8h] BYREF __int128 v47; // [rsp+68h] [rbp-D0h] BYREF void **v48; // [rsp+78h] [rbp-C0h] long long v49; // [rsp+80h] [rbp-B8h] void *v50; // [rsp+88h] [rbp-B0h] BYREF long long v51; // [rsp+90h] [rbp-A8h] __int128 v52; // [rsp+98h] [rbp-A0h] BYREF int v53[2]; // [rsp+A8h] [rbp-90h] const char *v54; // [rsp+B0h] [rbp-88h] long long v55; // [rsp+B8h] [rbp-80h] void *v56; // [rsp+C0h] [rbp-78h] long long v57; // [rsp+C8h] [rbp-70h] __int128 v58; // [rsp+D0h] [rbp-68h] BYREF int v59; // [rsp+E0h] [rbp-58h] int v60[20]; // [rsp+E8h] [rbp-50h] BYREF v41 = (long long)this; std::string::basic_string(&v50, a3, &v45); v56 = &v58; if ( v50 == &v52 ) { v58 = v52; } else { v56 = v50; *(_QWORD *)&v58 = v52; } v57 = v51; v50 = &v52; v51 = 0LL; LOBYTE(v52) = 0; v59 = a4; testing::internal::RegisterTypeParameterizedTestSuite((int)a2, v36, (int)v37, (long long)v38); if ( v56 != &v58 ) operator delete(v56, v58 + 1); if ( v50 != &v52 ) operator delete(v50, v52 + 1); *(_QWORD *)v53 = a3; v42 = a4; *(_BYTE *)v41 = 1; *(_OWORD *)v43 = 0LL; v44 = 0LL; v54 = a5; v8 = a5 - 1; do v9 = *(unsigned __int8 *)++v8; while ( (unsigned int)isspace(v9) ); while ( 1 ) { v10 = strchr(v8, 44LL); v37 = &v39; if ( !v10 ) v10 = (long long)&v8[strlen(v8)]; std::string::_M_construct<char const*>(&v37, v8, v10); v11 = (char *)v37; if ( v38 ) { v12 = (char *)v38 + (_QWORD)v37; while ( (unsigned int)isspace((unsigned __int8)*(v12 - 1)) ) { v13 = v12 - 1; v14 = v13 - v11; std::string::_M_erase(&v37, v13 - v11, 1LL); v15 = (__int128 *)v37; v16 = v13 == v11; v11 = (char *)v37; v12 = (char *)v37 + v14; if ( v16 ) goto LABEL_18; } } v15 = (__int128 *)v11; LABEL_18: v45 = &v47; if ( v15 == &v39 ) { v47 = v39; } else { v45 = v15; *(_QWORD *)&v47 = v39; } v46 = v38; v37 = &v39; v38 = 0LL; LOBYTE(v39) = 0; std::vector<std::string>::emplace_back<std::string>(v43, &v45); if ( v45 != &v47 ) operator delete(v45, v47 + 1); if ( v37 != &v39 ) operator delete(v37, v39 + 1); v17 = strchr(v8, 44LL); if ( !v17 ) break; v8 = (const char *)v17; do v18 = *(unsigned __int8 *)++v8; while ( (unsigned int)isspace(v18) ); } testing::Message::Message((testing::Message *)&v40); v22 = &v46; LODWORD(v46) = 0; *(_QWORD *)&v47 = 0LL; *((_QWORD *)&v47 + 1) = &v46; v48 = &v46; v49 = 0LL; v23 = *(_QWORD **)v43; if ( *(_QWORD *)v43 != *(_QWORD *)&v43[2] ) { v24 = v40 + 16; v25 = v41 + 8; v55 = v41 + 16; do { if ( (void **)std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::find( &v45, v23) == &v46 ) { v28 = std::_Rb_tree<std::string,std::pair<std::string const,testing::internal::CodeLocation>,std::_Select1st<std::pair<std::string const,testing::internal::CodeLocation>>,std::less<void>,std::allocator<std::pair<std::string const,testing::internal::CodeLocation>>>::find( v25, v23); if ( v28 != v55 ) { std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::_M_insert_unique<std::string const&>( &v45, v23); goto LABEL_36; } std::__ostream_insert<char,std::char_traits<char>>(v24, "No test named ", 14LL); v26 = 34LL; std::__ostream_insert<char,std::char_traits<char>>(v24, *v23, v23[1]); v27 = " can be found in this test suite.\n"; } else { std::__ostream_insert<char,std::char_traits<char>>(v24, "Test ", 5LL); v26 = 27LL; std::__ostream_insert<char,std::char_traits<char>>(v24, *v23, v23[1]); v27 = " is listed more than once.\n"; } std::__ostream_insert<char,std::char_traits<char>>(v24, v27, v26); LABEL_36: v23 += 4; } while ( v23 != *(_QWORD **)&v43[2] ); } v29 = *(_QWORD *)(v41 + 32); if ( v29 != v41 + 16 ) { v30 = v41 + 16; do { if ( (void **)std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::find( &v45, v29 + 32) == &v46 ) { v31 = v40 + 16; std::__ostream_insert<char,std::char_traits<char>>(v40 + 16, "You forgot to list test ", 24LL); std::__ostream_insert<char,std::char_traits<char>>(v31, *(_QWORD *)(v29 + 32), *(_QWORD *)(v29 + 40)); std::__ostream_insert<char,std::char_traits<char>>(v31, ".\n", 2LL); } v29 = std::_Rb_tree_increment(v29); } while ( v29 != v30 ); } v32 = v40; testing::internal::StringStreamToString((unsigned int)&v37, v40, v19, (_DWORD)v22, v20, v21); v33 = v54; if ( v38 ) { v35 = stderr; testing::internal::FormatFileLocation[abi:cxx11]((long long)v60, *(const char **)v53, v42); testing::internal::TypedTestSuitePState::VerifyRegisteredTestNames((const char **)v60, (const char **)&v37, v35); } if ( v37 != &v39 ) operator delete(v37, v39 + 1); std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree(&v45); if ( v32 ) (*(void ( **)(long long))(*(_QWORD *)v32 + 8LL))(v32); std::vector<std::string>::~vector(v43); return v33; }
VerifyRegisteredTestNames: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x108 MOV R12,R8 MOV EBP,ECX MOV R13,RDX MOV RBX,RSI MOV qword ptr [RSP + 0x30],RDI LAB_001183f5: LEA RDI,[RSP + 0x88] LEA RDX,[RSP + 0x58] MOV RSI,R13 CALL 0x001081e0 LEA R15,[RSP + 0xd0] MOV qword ptr [R15 + -0x10],R15 LEA R14,[RSP + 0x98] MOV RAX,qword ptr [R14 + -0x10] CMP RAX,R14 JZ 0x00118441 MOV qword ptr [RSP + 0xc0],RAX MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0xd0],RAX JMP 0x00118449 LAB_00118441: MOVUPS XMM0,xmmword ptr [R14] MOVUPS xmmword ptr [R15],XMM0 LAB_00118449: MOV RAX,qword ptr [RSP + 0x90] LEA RSI,[RSP + 0xc0] MOV qword ptr [RSI + 0x8],RAX MOV qword ptr [RSP + 0x88],R14 MOV qword ptr [RSP + 0x90],0x0 MOV byte ptr [RSP + 0x98],0x0 MOV dword ptr [RSI + 0x20],EBP LAB_0011847c: MOV RDI,RBX CALL 0x00118966 MOV RDI,qword ptr [RSP + 0xc0] CMP RDI,R15 JZ 0x001184a1 MOV RSI,qword ptr [RSP + 0xd0] INC RSI CALL 0x001084e0 LAB_001184a1: MOV RDI,qword ptr [RSP + 0x88] CMP RDI,R14 JZ 0x001184be MOV RSI,qword ptr [RSP + 0x98] INC RSI CALL 0x001084e0 LAB_001184be: MOV qword ptr [RSP + 0xa8],R13 MOV dword ptr [RSP + 0x3c],EBP MOV RAX,qword ptr [RSP + 0x30] MOV byte ptr [RAX],0x1 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOV qword ptr [RSP + 0x50],0x0 MOV qword ptr [RSP + 0xb0],R12 DEC R12 LAB_001184ee: MOVZX EDI,byte ptr [R12 + 0x1] INC R12 CALL 0x001080b0 TEST EAX,EAX JNZ 0x001184ee LEA RBX,[RSP + 0x18] LEA RBP,[RSP + 0x68] LEA R13,[RSP + 0x8] LAB_0011850f: MOV RDI,R12 MOV ESI,0x2c CALL 0x001081d0 MOV qword ptr [RSP + 0x8],RBX TEST RAX,RAX JNZ 0x00118531 MOV RDI,R12 CALL 0x00108200 ADD RAX,R12 LAB_00118531: MOV RDI,R13 MOV RSI,R12 MOV RDX,RAX CALL 0x0013911e MOV R14,qword ptr [RSP + 0x8] MOV R15,qword ptr [RSP + 0x10] TEST R15,R15 JZ 0x0011858d ADD R15,R14 LAB_00118551: MOVZX EDI,byte ptr [R15 + -0x1] CALL 0x001080b0 TEST EAX,EAX JZ 0x0011858d DEC R15 MOV RBX,R15 SUB RBX,R14 LAB_00118568: MOV EDX,0x1 MOV RDI,R13 MOV RSI,RBX CALL 0x00108630 MOV RAX,qword ptr [RSP + 0x8] ADD RBX,RAX CMP R15,R14 MOV R14,RAX MOV R15,RBX JNZ 0x00118551 JMP 0x00118590 LAB_0011858d: MOV RAX,R14 LAB_00118590: MOV qword ptr [RSP + 0x58],RBP LEA RBX,[RSP + 0x18] CMP RAX,RBX JZ 0x001185b0 MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x68],RAX JMP 0x001185b7 LAB_001185b0: MOVUPS XMM0,xmmword ptr [RBX] MOVUPS xmmword ptr [RBP],XMM0 LAB_001185b7: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x60],RAX MOV qword ptr [RSP + 0x8],RBX MOV qword ptr [RSP + 0x10],0x0 MOV byte ptr [RSP + 0x18],0x0 LAB_001185d4: LEA RDI,[RSP + 0x40] LEA RSI,[RSP + 0x58] CALL 0x00139de6 MOV RDI,qword ptr [RSP + 0x58] CMP RDI,RBP JZ 0x001185fa MOV RSI,qword ptr [RSP + 0x68] INC RSI CALL 0x001084e0 LAB_001185fa: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,RBX JZ 0x00118611 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001084e0 LAB_00118611: MOV RDI,R12 MOV ESI,0x2c CALL 0x001081d0 TEST RAX,RAX JZ 0x0011863d MOV R12,RAX LAB_00118626: MOVZX EDI,byte ptr [R12 + 0x1] INC R12 CALL 0x001080b0 TEST EAX,EAX JNZ 0x00118626 JMP 0x0011850f LAB_0011863d: LEA RDI,[RSP + 0x28] CALL 0x0011c968 LEA RCX,[RSP + 0x60] MOV dword ptr [RCX],0x0 XOR EAX,EAX MOV qword ptr [RCX + 0x8],RAX MOV qword ptr [RCX + 0x10],RCX MOV qword ptr [RCX + 0x18],RCX MOV qword ptr [RCX + 0x20],RAX MOV R14,qword ptr [RSP + 0x40] CMP R14,qword ptr [RSP + 0x48] JZ 0x00118748 MOV R15,qword ptr [RSP + 0x28] LEA R13,[R15 + 0x10] MOV RAX,qword ptr [RSP + 0x30] LEA RBP,[RAX + 0x8] ADD RAX,0x10 MOV qword ptr [RSP + 0xb8],RAX LEA RBX,[RSP + 0x58] LAB_00118697: MOV RDI,RBX MOV RSI,R14 CALL 0x00139e3a LEA RCX,[RSP + 0x60] CMP RAX,RCX JZ 0x001186e9 MOV EDX,0x5 MOV RDI,R13 LEA RSI,[0x14262b] CALL 0x001085b0 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] MOV R12D,0x1b MOV RDI,R13 CALL 0x001085b0 LEA RSI,[0x142631] LAB_001186dc: MOV RDI,R13 MOV RDX,R12 CALL 0x001085b0 JMP 0x00118709 LAB_001186e9: MOV RDI,RBP MOV RSI,R14 CALL 0x0013924a CMP RAX,qword ptr [RSP + 0xb8] JZ 0x00118716 MOV RDI,RBX MOV RSI,R14 CALL 0x00139ec4 LAB_00118709: ADD R14,0x20 CMP R14,qword ptr [RSP + 0x48] JNZ 0x00118697 JMP 0x00118748 LAB_00118716: MOV EDX,0xe MOV RDI,R13 LEA RSI,[0x14264d] CALL 0x001085b0 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] MOV R12D,0x22 MOV RDI,R13 CALL 0x001085b0 LEA RSI,[0x14265c] JMP 0x001186dc LAB_00118748: MOV RAX,qword ptr [RSP + 0x30] MOV RBX,qword ptr [RAX + 0x20] ADD RAX,0x10 CMP RBX,RAX JZ 0x001187cf MOV R15,RAX LEA R14,[RSP + 0x58] LEA R12,[0x14267f] LEA R13,[0x1432c4] LAB_00118770: LEA RSI,[RBX + 0x20] LAB_00118774: MOV RDI,R14 CALL 0x00139e3a LEA RCX,[RSP + 0x60] CMP RAX,RCX JNZ 0x001187bf MOV RBP,qword ptr [RSP + 0x28] ADD RBP,0x10 MOV EDX,0x18 MOV RDI,RBP MOV RSI,R12 CALL 0x001085b0 MOV RSI,qword ptr [RBX + 0x20] MOV RDX,qword ptr [RBX + 0x28] MOV RDI,RBP CALL 0x001085b0 MOV EDX,0x2 MOV RDI,RBP MOV RSI,R13 CALL 0x001085b0 LAB_001187bf: MOV RDI,RBX CALL 0x001085d0 MOV RBX,RAX CMP RAX,R15 JNZ 0x00118770 LAB_001187cf: MOV R15,qword ptr [RSP + 0x28] LAB_001187d4: LEA RDI,[RSP + 0x8] MOV RSI,R15 CALL 0x0011cbbf LAB_001187e1: CMP qword ptr [RSP + 0x10],0x0 MOV RBX,qword ptr [RSP + 0xb0] LEA RAX,[RSP + 0x18] JNZ 0x00118844 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,RAX JZ 0x0011880d MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001084e0 LAB_0011880d: LEA RDI,[RSP + 0x58] CALL 0x00136168 TEST R15,R15 JZ 0x00118825 MOV RAX,qword ptr [R15] MOV RDI,R15 CALL qword ptr [RAX + 0x8] LAB_00118825: LEA RDI,[RSP + 0x40] CALL 0x00131f9e MOV RAX,RBX ADD RSP,0x108 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00118844: MOV RAX,qword ptr [0x00158fc8] MOV RBX,qword ptr [RAX] LAB_0011884e: LEA RDI,[RSP + 0xe8] MOV RSI,qword ptr [RSP + 0xa8] MOV EDX,dword ptr [RSP + 0x3c] CALL 0x0011663e LAB_00118867: LEA RDI,[RSP + 0xe8] LEA RSI,[RSP + 0x8] MOV RDX,RBX CALL 0x00108bd2 LAB_0011887c: MOV RBX,RAX MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x0011891b MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001084e0 JMP 0x0011891b LAB_0011891b: LEA RDI,[RSP + 0x58] CALL 0x00136168 TEST R15,R15 JZ 0x00118954 MOV RAX,qword ptr [R15] MOV RDI,R15 CALL qword ptr [RAX + 0x8] JMP 0x00118954 LAB_00118954: LEA RDI,[RSP + 0x40] CALL 0x00131f9e LAB_0011895e: MOV RDI,RBX CALL 0x00108990
/* testing::internal::TypedTestSuitePState::VerifyRegisteredTestNames(char const*, char const*, int, char const*) */ char * __thiscall testing::internal::TypedTestSuitePState::VerifyRegisteredTestNames (TypedTestSuitePState *this,char *param_1,char *param_2,int param_3,char *param_4) { _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,testing::internal::CodeLocation>,std::_Select1st<std::pair<std::__cxx11::string_const,testing::internal::CodeLocation>>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,testing::internal::CodeLocation>>> *this_00; byte *pbVar1; long *plVar2; int iVar3; char *pcVar4; size_t sVar5; long *plVar6; ulong *puVar7; TypedTestSuitePState *pTVar8; _Rb_tree_node_base *p_Var9; _Rb_tree_node_base *p_Var10; int8 uVar11; ulong *puVar12; ulong uVar13; ostream *poVar14; char *pcVar15; string *psVar16; long lVar17; long *plVar18; long *local_130; ulong local_128; int1 local_120; int7 uStack_11f; int8 uStack_118; long *local_110; TypedTestSuitePState *local_108; int local_fc; string *local_f8; string *psStack_f0; int8 local_e8; long *local_e0; ulong local_d8; long local_d0; ulong *puStack_c8; ulong *local_c0; int8 local_b8; uint *local_b0; int8 local_a8; uint local_a0; int4 uStack_9c; int4 uStack_98; int4 uStack_94; char *local_90; char *local_88; TypedTestSuitePState *local_80; uint *local_78; int8 local_70; int8 local_68; int4 uStack_60; int4 uStack_5c; int local_58; internal local_50 [32]; /* try { // try from 001183f5 to 00118409 has its CatchHandler @ 001188e8 */ local_108 = this; std::__cxx11::string::string((string *)&local_b0,param_2,(allocator *)&local_e0); if (local_b0 == &local_a0) { uStack_60 = uStack_98; uStack_5c = uStack_94; local_78 = (uint *)&local_68; } else { local_78 = local_b0; } local_68 = CONCAT44(uStack_9c,local_a0); local_70 = local_a8; local_a8 = 0; local_a0 = local_a0 & 0xffffff00; local_b0 = &local_a0; local_58 = param_3; /* try { // try from 0011847c to 00118483 has its CatchHandler @ 001188a5 */ RegisterTypeParameterizedTestSuite(param_1); if (local_78 != (uint *)&local_68) { operator_delete(local_78,local_68 + 1); } if (local_b0 != &local_a0) { operator_delete(local_b0,CONCAT44(uStack_9c,local_a0) + 1); } *local_108 = (TypedTestSuitePState)0x1; local_f8 = (string *)0x0; psStack_f0 = (string *)0x0; local_e8 = 0; pcVar15 = param_4 + -1; local_fc = param_3; local_90 = param_2; local_88 = param_4; do { pbVar1 = (byte *)(pcVar15 + 1); pcVar15 = pcVar15 + 1; iVar3 = isspace((uint)*pbVar1); } while (iVar3 != 0); do { pcVar4 = strchr(pcVar15,0x2c); local_130 = (long *)&local_120; if (pcVar4 == (char *)0x0) { sVar5 = strlen(pcVar15); pcVar4 = pcVar15 + sVar5; } /* try { // try from 00118531 to 0011853e has its CatchHandler @ 001188ed */ std::__cxx11::string::_M_construct<char_const*>(&local_130,pcVar15,pcVar4); plVar6 = local_130; if (local_128 != 0) { lVar17 = local_128 + (long)local_130; do { plVar2 = local_130; iVar3 = isspace((uint)*(byte *)(lVar17 + -1)); plVar6 = plVar2; if (iVar3 == 0) break; plVar18 = (long *)(lVar17 + -1); uVar13 = (long)plVar18 - (long)plVar2; /* try { // try from 00118568 to 00118577 has its CatchHandler @ 00118935 */ std::__cxx11::string::_M_erase((ulong)&local_130,uVar13); lVar17 = uVar13 + (long)local_130; plVar6 = local_130; } while (plVar18 != plVar2); } local_e0 = plVar6; if (plVar6 == (long *)&local_120) { puStack_c8 = (ulong *)uStack_118; local_e0 = &local_d0; } local_d0 = CONCAT71(uStack_11f,local_120); local_d8 = local_128; local_128 = 0; local_120 = 0; /* try { // try from 001185d4 to 001185e2 has its CatchHandler @ 001188f2 */ local_130 = (long *)&local_120; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_f8, (string *)&local_e0); if (local_e0 != &local_d0) { operator_delete(local_e0,local_d0 + 1); } if (local_130 != (long *)&local_120) { operator_delete(local_130,CONCAT71(uStack_11f,local_120) + 1); } pcVar15 = strchr(pcVar15,0x2c); if (pcVar15 == (char *)0x0) break; do { pbVar1 = (byte *)(pcVar15 + 1); pcVar15 = pcVar15 + 1; iVar3 = isspace((uint)*pbVar1); } while (iVar3 != 0); } while( true ); /* try { // try from 0011863d to 00118646 has its CatchHandler @ 001188a3 */ Message::Message((Message *)&local_110); puVar12 = &local_d8; local_d8 = local_d8 & 0xffffffff00000000; local_d0 = 0; local_b8 = 0; puStack_c8 = puVar12; local_c0 = puVar12; if (local_f8 != psStack_f0) { poVar14 = (ostream *)(local_110 + 2); this_00 = (_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,testing::internal::CodeLocation>,std::_Select1st<std::pair<std::__cxx11::string_const,testing::internal::CodeLocation>>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,testing::internal::CodeLocation>>> *)(local_108 + 8); local_80 = local_108 + 0x10; psVar16 = local_f8; do { /* try { // try from 00118697 to 0011873e has its CatchHandler @ 00118918 */ puVar7 = (ulong *)std:: _Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::find((_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> *)&local_e0,psVar16); puVar12 = &local_d8; if (puVar7 == puVar12) { pTVar8 = (TypedTestSuitePState *) std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,testing::internal::CodeLocation>,std::_Select1st<std::pair<std::__cxx11::string_const,testing::internal::CodeLocation>>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,testing::internal::CodeLocation>>> ::find(this_00,psVar16); if (pTVar8 == local_80) { std::__ostream_insert<char,std::char_traits<char>>(poVar14,"No test named ",0xe); lVar17 = 0x22; std::__ostream_insert<char,std::char_traits<char>> (poVar14,*(char **)psVar16,*(long *)(psVar16 + 8)); pcVar15 = " can be found in this test suite.\n"; goto LAB_001186dc; } std:: _Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::_M_insert_unique<std::__cxx11::string_const&> ((_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> *)&local_e0,psVar16); } else { std::__ostream_insert<char,std::char_traits<char>>(poVar14,"Test ",5); lVar17 = 0x1b; std::__ostream_insert<char,std::char_traits<char>> (poVar14,*(char **)psVar16,*(long *)(psVar16 + 8)); pcVar15 = " is listed more than once.\n"; LAB_001186dc: std::__ostream_insert<char,std::char_traits<char>>(poVar14,pcVar15,lVar17); } psVar16 = psVar16 + 0x20; } while (psVar16 != psStack_f0); } p_Var10 = *(_Rb_tree_node_base **)(local_108 + 0x20); p_Var9 = (_Rb_tree_node_base *)(local_108 + 0x10); if (p_Var10 != p_Var9) { do { /* try { // try from 00118774 to 001187be has its CatchHandler @ 0011890e */ puVar7 = (ulong *)std:: _Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::find((_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> *)&local_e0,(string *)(p_Var10 + 0x20)); puVar12 = &local_d8; if (puVar7 == puVar12) { poVar14 = (ostream *)(local_110 + 2); std::__ostream_insert<char,std::char_traits<char>>(poVar14,"You forgot to list test ",0x18); std::__ostream_insert<char,std::char_traits<char>> (poVar14,*(char **)(p_Var10 + 0x20),*(long *)(p_Var10 + 0x28)); std::__ostream_insert<char,std::char_traits<char>>(poVar14,".\n",2); } p_Var10 = (_Rb_tree_node_base *)std::_Rb_tree_increment(p_Var10); } while (p_Var10 != p_Var9); } /* try { // try from 001187d4 to 001187e0 has its CatchHandler @ 001188a1 */ StringStreamToString((stringstream *)&local_130); pcVar15 = local_88; if (local_128 != 0) { uVar11 = *(int8 *)PTR_stderr_00158fc8; /* try { // try from 0011884e to 00118866 has its CatchHandler @ 0011887c */ FormatFileLocation_abi_cxx11_(local_50,local_90,local_fc); uVar11 = VerifyRegisteredTestNames ((char *)local_50,(char *)&local_130,(int)uVar11,(char *)puVar12); /* catch() { ... } // from try @ 0011884e with catch @ 0011887c */ if (local_130 != (long *)&local_120) { operator_delete(local_130,CONCAT71(uStack_11f,local_120) + 1); } std:: _Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::~_Rb_tree((_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> *)&local_e0); if (local_110 != (long *)0x0) { (**(code **)(*local_110 + 8))(local_110); } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_f8); /* WARNING: Subroutine does not return */ _Unwind_Resume(uVar11); } if (local_130 != (long *)&local_120) { operator_delete(local_130,CONCAT71(uStack_11f,local_120) + 1); } std:: _Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::~_Rb_tree((_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> *)&local_e0); if (local_110 != (long *)0x0) { (**(code **)(*local_110 + 8))(local_110); } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_f8); return pcVar15; }
35,075
translog_record_read_next_chunk
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_record_read_next_chunk(TRANSLOG_READER_DATA *data) { translog_size_t new_current_offset= data->current_offset + data->chunk_size; uint16 chunk_header_len, chunk_len; uint8 type; DBUG_ENTER("translog_record_read_next_chunk"); if (data->eor) { DBUG_PRINT("info", ("end of the record flag set")); DBUG_RETURN(1); } if (data->header.groups_no && data->header.groups_no - 1 != data->current_group && data->header.groups[data->current_group].num == data->current_chunk) { /* Goto next group */ data->current_group++; data->current_chunk= 0; DBUG_PRINT("info", ("skip to group: #%u", data->current_group)); translog_destroy_scanner(&data->scanner); translog_scanner_init(data->header.groups[data->current_group].addr, 1, &data->scanner, 1); } else { data->current_chunk++; if (translog_get_next_chunk(&data->scanner)) DBUG_RETURN(1); if (data->scanner.page == END_OF_LOG) { /* Actually it should not happened, but we want to quit nicely in case of a truncated log */ DBUG_RETURN(1); } } type= data->scanner.page[data->scanner.page_offset] & TRANSLOG_CHUNK_TYPE; if (type == TRANSLOG_CHUNK_LSN && data->header.groups_no) { DBUG_PRINT("info", ("Last chunk: data len: %u offset: %u group: %u of %u", data->header.chunk0_data_len, data->scanner.page_offset, data->current_group, data->header.groups_no - 1)); DBUG_ASSERT(data->header.groups_no - 1 == data->current_group); DBUG_ASSERT(data->header.lsn == data->scanner.page_addr + data->scanner.page_offset); translog_destroy_scanner(&data->scanner); translog_scanner_init(data->header.chunk0_data_addr, 1, &data->scanner, 1); data->chunk_size= data->header.chunk0_data_len; data->body_offset= data->scanner.page_offset; data->current_offset= new_current_offset; data->eor= 1; DBUG_RETURN(0); } if (type == TRANSLOG_CHUNK_LSN || type == TRANSLOG_CHUNK_FIXED) { data->eor= 1; DBUG_RETURN(1); /* End of record */ } chunk_header_len= translog_get_chunk_header_length(data->scanner.page + data->scanner.page_offset); chunk_len= translog_get_total_chunk_length(data->scanner.page, data->scanner.page_offset); data->chunk_size= chunk_len - chunk_header_len; data->body_offset= data->scanner.page_offset + chunk_header_len; data->current_offset= new_current_offset; DBUG_PRINT("info", ("grp: %u chunk: %u body_offset: %u chunk_size: %u " "current_offset: %lu", (uint) data->current_group, (uint) data->current_chunk, (uint) data->body_offset, (uint) data->chunk_size, (ulong) data->current_offset)); DBUG_RETURN(0); }
O0
c
translog_record_read_next_chunk: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movl 0x246c(%rax), %eax movq -0x10(%rbp), %rcx movzwl 0x2472(%rcx), %ecx addl %ecx, %eax movl %eax, -0x14(%rbp) movq -0x10(%rbp), %rax cmpb $0x0, 0x247c(%rax) je 0x56f82 jmp 0x56f75 jmp 0x56f77 jmp 0x56f79 movb $0x1, -0x1(%rbp) jmp 0x5720b movq -0x10(%rbp), %rax cmpl $0x0, 0x418(%rax) je 0x57041 movq -0x10(%rbp), %rax movl 0x418(%rax), %eax subl $0x1, %eax movq -0x10(%rbp), %rcx cmpl 0x2474(%rcx), %eax je 0x57041 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq -0x10(%rbp), %rcx movl 0x2474(%rcx), %ecx shlq $0x4, %rcx addq %rcx, %rax movzbl 0x8(%rax), %eax movq -0x10(%rbp), %rcx cmpl 0x2478(%rcx), %eax jne 0x57041 movq -0x10(%rbp), %rax movl 0x2474(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x2474(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x2478(%rax) jmp 0x56ffc movq -0x10(%rbp), %rdi addq $0x438, %rdi # imm = 0x438 callq 0x543c0 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq -0x10(%rbp), %rcx movl 0x2474(%rcx), %ecx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rdi movq -0x10(%rbp), %rdx addq $0x438, %rdx # imm = 0x438 movl $0x1, %ecx movl %ecx, %esi callq 0x54090 jmp 0x57094 movq -0x10(%rbp), %rax movl 0x2478(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x2478(%rax) movq -0x10(%rbp), %rdi addq $0x438, %rdi # imm = 0x438 callq 0x541e0 cmpb $0x0, %al je 0x57073 jmp 0x5706a movb $0x1, -0x1(%rbp) jmp 0x5720b movq -0x10(%rbp), %rax leaq 0xc24502(%rip), %rcx # 0xc7b580 cmpq %rcx, 0x2450(%rax) jne 0x57092 jmp 0x57089 movb $0x1, -0x1(%rbp) jmp 0x5720b jmp 0x57094 movq -0x10(%rbp), %rax movq 0x2450(%rax), %rax movq -0x10(%rbp), %rcx movl 0x2460(%rcx), %ecx movzbl (%rax,%rcx), %eax andl $0xc0, %eax movb %al, -0x19(%rbp) movzbl -0x19(%rbp), %eax cmpl $0x0, %eax jne 0x5715c movq -0x10(%rbp), %rax cmpl $0x0, 0x418(%rax) je 0x5715c jmp 0x570d5 jmp 0x570d7 jmp 0x570d9 jmp 0x570db jmp 0x570dd jmp 0x570df movq -0x10(%rbp), %rdi addq $0x438, %rdi # imm = 0x438 callq 0x543c0 movq -0x10(%rbp), %rax movq 0x428(%rax), %rdi movq -0x10(%rbp), %rdx addq $0x438, %rdx # imm = 0x438 movl $0x1, %ecx movl %ecx, %esi callq 0x54090 movq -0x10(%rbp), %rax movw 0x436(%rax), %cx movq -0x10(%rbp), %rax movw %cx, 0x2472(%rax) movq -0x10(%rbp), %rax movl 0x2460(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x2468(%rax) movl -0x14(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x246c(%rax) movq -0x10(%rbp), %rax movb $0x1, 0x247c(%rax) movb $0x0, -0x1(%rbp) jmp 0x5720b movzbl -0x19(%rbp), %eax cmpl $0x0, %eax je 0x5716e movzbl -0x19(%rbp), %eax cmpl $0x40, %eax jne 0x57182 movq -0x10(%rbp), %rax movb $0x1, 0x247c(%rax) movb $0x1, -0x1(%rbp) jmp 0x5720b movq -0x10(%rbp), %rax movq 0x2450(%rax), %rdi movq -0x10(%rbp), %rax movl 0x2460(%rax), %eax addq %rax, %rdi callq 0x5dad0 movw %ax, -0x16(%rbp) movq -0x10(%rbp), %rax movq 0x2450(%rax), %rdi movq -0x10(%rbp), %rax movl 0x2460(%rax), %eax movzwl %ax, %esi callq 0x53ad0 movw %ax, -0x18(%rbp) movzwl -0x18(%rbp), %eax movzwl -0x16(%rbp), %ecx subl %ecx, %eax movw %ax, %cx movq -0x10(%rbp), %rax movw %cx, 0x2472(%rax) movq -0x10(%rbp), %rax movl 0x2460(%rax), %ecx movzwl -0x16(%rbp), %eax addl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x2468(%rax) movl -0x14(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x246c(%rax) jmp 0x57205 jmp 0x57207 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
translog_record_read_next_chunk: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov eax, [rax+246Ch] mov rcx, [rbp+var_10] movzx ecx, word ptr [rcx+2472h] add eax, ecx mov [rbp+var_14], eax mov rax, [rbp+var_10] cmp byte ptr [rax+247Ch], 0 jz short loc_56F82 jmp short $+2 loc_56F75: jmp short $+2 loc_56F77: jmp short $+2 loc_56F79: mov [rbp+var_1], 1 jmp loc_5720B loc_56F82: mov rax, [rbp+var_10] cmp dword ptr [rax+418h], 0 jz loc_57041 mov rax, [rbp+var_10] mov eax, [rax+418h] sub eax, 1 mov rcx, [rbp+var_10] cmp eax, [rcx+2474h] jz loc_57041 mov rax, [rbp+var_10] mov rax, [rax+8] mov rcx, [rbp+var_10] mov ecx, [rcx+2474h] shl rcx, 4 add rax, rcx movzx eax, byte ptr [rax+8] mov rcx, [rbp+var_10] cmp eax, [rcx+2478h] jnz short loc_57041 mov rax, [rbp+var_10] mov ecx, [rax+2474h] add ecx, 1 mov [rax+2474h], ecx mov rax, [rbp+var_10] mov dword ptr [rax+2478h], 0 jmp short $+2 loc_56FFC: mov rdi, [rbp+var_10] add rdi, 438h call translog_destroy_scanner mov rax, [rbp+var_10] mov rax, [rax+8] mov rcx, [rbp+var_10] mov ecx, [rcx+2474h] shl rcx, 4 add rax, rcx mov rdi, [rax] mov rdx, [rbp+var_10] add rdx, 438h mov ecx, 1 mov esi, ecx call translog_scanner_init jmp short loc_57094 loc_57041: mov rax, [rbp+var_10] mov ecx, [rax+2478h] add ecx, 1 mov [rax+2478h], ecx mov rdi, [rbp+var_10] add rdi, 438h call translog_get_next_chunk cmp al, 0 jz short loc_57073 jmp short $+2 loc_5706A: mov [rbp+var_1], 1 jmp loc_5720B loc_57073: mov rax, [rbp+var_10] lea rcx, end_of_log cmp [rax+2450h], rcx jnz short loc_57092 jmp short $+2 loc_57089: mov [rbp+var_1], 1 jmp loc_5720B loc_57092: jmp short $+2 loc_57094: mov rax, [rbp+var_10] mov rax, [rax+2450h] mov rcx, [rbp+var_10] mov ecx, [rcx+2460h] movzx eax, byte ptr [rax+rcx] and eax, 0C0h mov [rbp+var_19], al movzx eax, [rbp+var_19] cmp eax, 0 jnz loc_5715C mov rax, [rbp+var_10] cmp dword ptr [rax+418h], 0 jz loc_5715C jmp short $+2 loc_570D5: jmp short $+2 loc_570D7: jmp short $+2 loc_570D9: jmp short $+2 loc_570DB: jmp short $+2 loc_570DD: jmp short $+2 loc_570DF: mov rdi, [rbp+var_10] add rdi, 438h call translog_destroy_scanner mov rax, [rbp+var_10] mov rdi, [rax+428h] mov rdx, [rbp+var_10] add rdx, 438h mov ecx, 1 mov esi, ecx call translog_scanner_init mov rax, [rbp+var_10] mov cx, [rax+436h] mov rax, [rbp+var_10] mov [rax+2472h], cx mov rax, [rbp+var_10] mov ecx, [rax+2460h] mov rax, [rbp+var_10] mov [rax+2468h], ecx mov ecx, [rbp+var_14] mov rax, [rbp+var_10] mov [rax+246Ch], ecx mov rax, [rbp+var_10] mov byte ptr [rax+247Ch], 1 mov [rbp+var_1], 0 jmp loc_5720B loc_5715C: movzx eax, [rbp+var_19] cmp eax, 0 jz short loc_5716E movzx eax, [rbp+var_19] cmp eax, 40h ; '@' jnz short loc_57182 loc_5716E: mov rax, [rbp+var_10] mov byte ptr [rax+247Ch], 1 mov [rbp+var_1], 1 jmp loc_5720B loc_57182: mov rax, [rbp+var_10] mov rdi, [rax+2450h] mov rax, [rbp+var_10] mov eax, [rax+2460h] add rdi, rax call translog_get_chunk_header_length mov [rbp+var_16], ax mov rax, [rbp+var_10] mov rdi, [rax+2450h] mov rax, [rbp+var_10] mov eax, [rax+2460h] movzx esi, ax call translog_get_total_chunk_length mov [rbp+var_18], ax movzx eax, [rbp+var_18] movzx ecx, [rbp+var_16] sub eax, ecx mov cx, ax mov rax, [rbp+var_10] mov [rax+2472h], cx mov rax, [rbp+var_10] mov ecx, [rax+2460h] movzx eax, [rbp+var_16] add ecx, eax mov rax, [rbp+var_10] mov [rax+2468h], ecx mov ecx, [rbp+var_14] mov rax, [rbp+var_10] mov [rax+246Ch], ecx jmp short $+2 loc_57205: jmp short $+2 loc_57207: mov [rbp+var_1], 0 loc_5720B: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char translog_record_read_next_chunk(long long a1) { char v2; // [rsp+7h] [rbp-19h] unsigned __int16 chunk_header_length; // [rsp+Ah] [rbp-16h] int v4; // [rsp+Ch] [rbp-14h] v4 = *(unsigned __int16 *)(a1 + 9330) + *(_DWORD *)(a1 + 9324); if ( *(_BYTE *)(a1 + 9340) ) return 1; if ( *(_DWORD *)(a1 + 1048) && *(_DWORD *)(a1 + 1048) - 1 != *(_DWORD *)(a1 + 9332) && *(unsigned __int8 *)(16LL * *(unsigned int *)(a1 + 9332) + *(_QWORD *)(a1 + 8) + 8) == *(_DWORD *)(a1 + 9336) ) { ++*(_DWORD *)(a1 + 9332); *(_DWORD *)(a1 + 9336) = 0; translog_destroy_scanner(a1 + 1080); translog_scanner_init(*(_QWORD *)(16LL * *(unsigned int *)(a1 + 9332) + *(_QWORD *)(a1 + 8)), 1, a1 + 1080, 1); } else { ++*(_DWORD *)(a1 + 9336); if ( translog_get_next_chunk(a1 + 1080) ) return 1; if ( *(_UNKNOWN **)(a1 + 9296) == &end_of_log ) return 1; } v2 = *(_BYTE *)(*(_QWORD *)(a1 + 9296) + *(unsigned int *)(a1 + 9312)) & 0xC0; if ( v2 || !*(_DWORD *)(a1 + 1048) ) { if ( v2 && v2 != 64 ) { chunk_header_length = translog_get_chunk_header_length(*(unsigned int *)(a1 + 9312) + *(_QWORD *)(a1 + 9296)); *(_WORD *)(a1 + 9330) = translog_get_total_chunk_length(*(_QWORD *)(a1 + 9296), *(_DWORD *)(a1 + 9312)) - chunk_header_length; *(_DWORD *)(a1 + 9320) = chunk_header_length + *(_DWORD *)(a1 + 9312); *(_DWORD *)(a1 + 9324) = v4; return 0; } else { *(_BYTE *)(a1 + 9340) = 1; return 1; } } else { translog_destroy_scanner(a1 + 1080); translog_scanner_init(*(_QWORD *)(a1 + 1064), 1, a1 + 1080, 1); *(_WORD *)(a1 + 9330) = *(_WORD *)(a1 + 1078); *(_DWORD *)(a1 + 9320) = *(_DWORD *)(a1 + 9312); *(_DWORD *)(a1 + 9324) = v4; *(_BYTE *)(a1 + 9340) = 1; return 0; } }
translog_record_read_next_chunk: 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 + 0x246c] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RCX + 0x2472] ADD EAX,ECX MOV dword ptr [RBP + -0x14],EAX MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x247c],0x0 JZ 0x00156f82 JMP 0x00156f75 LAB_00156f75: JMP 0x00156f77 LAB_00156f77: JMP 0x00156f79 LAB_00156f79: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0015720b LAB_00156f82: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x418],0x0 JZ 0x00157041 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x418] SUB EAX,0x1 MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x2474] JZ 0x00157041 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x2474] SHL RCX,0x4 ADD RAX,RCX MOVZX EAX,byte ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x2478] JNZ 0x00157041 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x2474] ADD ECX,0x1 MOV dword ptr [RAX + 0x2474],ECX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x2478],0x0 JMP 0x00156ffc LAB_00156ffc: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x438 CALL 0x001543c0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x2474] SHL RCX,0x4 ADD RAX,RCX MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] ADD RDX,0x438 MOV ECX,0x1 MOV ESI,ECX CALL 0x00154090 JMP 0x00157094 LAB_00157041: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x2478] ADD ECX,0x1 MOV dword ptr [RAX + 0x2478],ECX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x438 CALL 0x001541e0 CMP AL,0x0 JZ 0x00157073 JMP 0x0015706a LAB_0015706a: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0015720b LAB_00157073: MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0xd7b580] CMP qword ptr [RAX + 0x2450],RCX JNZ 0x00157092 JMP 0x00157089 LAB_00157089: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0015720b LAB_00157092: JMP 0x00157094 LAB_00157094: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x2450] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x2460] MOVZX EAX,byte ptr [RAX + RCX*0x1] AND EAX,0xc0 MOV byte ptr [RBP + -0x19],AL MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0x0 JNZ 0x0015715c MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x418],0x0 JZ 0x0015715c JMP 0x001570d5 LAB_001570d5: JMP 0x001570d7 LAB_001570d7: JMP 0x001570d9 LAB_001570d9: JMP 0x001570db LAB_001570db: JMP 0x001570dd LAB_001570dd: JMP 0x001570df LAB_001570df: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x438 CALL 0x001543c0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x428] MOV RDX,qword ptr [RBP + -0x10] ADD RDX,0x438 MOV ECX,0x1 MOV ESI,ECX CALL 0x00154090 MOV RAX,qword ptr [RBP + -0x10] MOV CX,word ptr [RAX + 0x436] MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0x2472],CX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x2460] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x2468],ECX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x246c],ECX MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x247c],0x1 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0015720b LAB_0015715c: MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0x0 JZ 0x0015716e MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0x40 JNZ 0x00157182 LAB_0015716e: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x247c],0x1 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0015720b LAB_00157182: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x2450] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x2460] ADD RDI,RAX CALL 0x0015dad0 MOV word ptr [RBP + -0x16],AX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x2450] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x2460] MOVZX ESI,AX CALL 0x00153ad0 MOV word ptr [RBP + -0x18],AX MOVZX EAX,word ptr [RBP + -0x18] MOVZX ECX,word ptr [RBP + -0x16] SUB EAX,ECX MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0x2472],CX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x2460] MOVZX EAX,word ptr [RBP + -0x16] ADD ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x2468],ECX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x246c],ECX JMP 0x00157205 LAB_00157205: JMP 0x00157207 LAB_00157207: MOV byte ptr [RBP + -0x1],0x0 LAB_0015720b: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 translog_record_read_next_chunk(long param_1) { char cVar1; byte bVar2; ushort uVar3; short sVar4; int iVar5; int1 local_9; iVar5 = *(int *)(param_1 + 0x246c) + (uint)*(ushort *)(param_1 + 0x2472); if (*(char *)(param_1 + 0x247c) != '\0') { return 1; } if (((*(int *)(param_1 + 0x418) == 0) || (*(int *)(param_1 + 0x418) + -1 == *(int *)(param_1 + 0x2474))) || ((uint)*(byte *)(*(long *)(param_1 + 8) + (ulong)*(uint *)(param_1 + 0x2474) * 0x10 + 8) != *(uint *)(param_1 + 0x2478))) { *(int *)(param_1 + 0x2478) = *(int *)(param_1 + 0x2478) + 1; cVar1 = translog_get_next_chunk(param_1 + 0x438); if (cVar1 != '\0') { return 1; } if (*(int1 **)(param_1 + 0x2450) == &end_of_log) { return 1; } } else { *(int *)(param_1 + 0x2474) = *(int *)(param_1 + 0x2474) + 1; *(int4 *)(param_1 + 0x2478) = 0; translog_destroy_scanner(param_1 + 0x438); translog_scanner_init (*(int8 *)(*(long *)(param_1 + 8) + (ulong)*(uint *)(param_1 + 0x2474) * 0x10),1 ,param_1 + 0x438); } bVar2 = *(byte *)(*(long *)(param_1 + 0x2450) + (ulong)*(uint *)(param_1 + 0x2460)) & 0xc0; if ((bVar2 == 0) && (*(int *)(param_1 + 0x418) != 0)) { translog_destroy_scanner(param_1 + 0x438); translog_scanner_init(*(int8 *)(param_1 + 0x428),1,param_1 + 0x438); *(int2 *)(param_1 + 0x2472) = *(int2 *)(param_1 + 0x436); *(int4 *)(param_1 + 0x2468) = *(int4 *)(param_1 + 0x2460); *(int *)(param_1 + 0x246c) = iVar5; *(int1 *)(param_1 + 0x247c) = 1; local_9 = 0; } else if ((bVar2 == 0) || (bVar2 == 0x40)) { *(int1 *)(param_1 + 0x247c) = 1; local_9 = 1; } else { uVar3 = translog_get_chunk_header_length (*(long *)(param_1 + 0x2450) + (ulong)*(uint *)(param_1 + 0x2460)); sVar4 = translog_get_total_chunk_length (*(int8 *)(param_1 + 0x2450),*(uint *)(param_1 + 0x2460) & 0xffff); *(ushort *)(param_1 + 0x2472) = sVar4 - uVar3; *(uint *)(param_1 + 0x2468) = *(int *)(param_1 + 0x2460) + (uint)uVar3; *(int *)(param_1 + 0x246c) = iVar5; local_9 = 0; } return local_9; }
35,076
common_sampler_types_from_names(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&, bool)
monkey531[P]llama/common/sampling.cpp
std::vector<common_sampler_type> common_sampler_types_from_names(const std::vector<std::string> & names, bool allow_alt_names) { std::unordered_map<std::string, common_sampler_type> sampler_canonical_name_map { { "dry", COMMON_SAMPLER_TYPE_DRY }, { "top_k", COMMON_SAMPLER_TYPE_TOP_K }, { "top_p", COMMON_SAMPLER_TYPE_TOP_P }, { "typ_p", COMMON_SAMPLER_TYPE_TYPICAL_P }, { "min_p", COMMON_SAMPLER_TYPE_MIN_P }, { "temperature", COMMON_SAMPLER_TYPE_TEMPERATURE }, { "xtc", COMMON_SAMPLER_TYPE_XTC }, { "infill", COMMON_SAMPLER_TYPE_INFILL }, { "penalties", COMMON_SAMPLER_TYPE_PENALTIES }, }; // since samplers names are written multiple ways // make it ready for both system names and input names std::unordered_map<std::string, common_sampler_type> sampler_alt_name_map { { "top-k", COMMON_SAMPLER_TYPE_TOP_K }, { "top-p", COMMON_SAMPLER_TYPE_TOP_P }, { "nucleus", COMMON_SAMPLER_TYPE_TOP_P }, { "typical-p", COMMON_SAMPLER_TYPE_TYPICAL_P }, { "typical", COMMON_SAMPLER_TYPE_TYPICAL_P }, { "typ-p", COMMON_SAMPLER_TYPE_TYPICAL_P }, { "typ", COMMON_SAMPLER_TYPE_TYPICAL_P }, { "min-p", COMMON_SAMPLER_TYPE_MIN_P }, { "temp", COMMON_SAMPLER_TYPE_TEMPERATURE }, }; std::vector<common_sampler_type> samplers; samplers.reserve(names.size()); for (const auto & name : names) { auto sampler = sampler_canonical_name_map.find(name); if (sampler != sampler_canonical_name_map.end()) { samplers.push_back(sampler->second); } else { if (allow_alt_names) { sampler = sampler_alt_name_map.find(name); if (sampler != sampler_alt_name_map.end()) { samplers.push_back(sampler->second); } } } } return samplers; }
O2
cpp
common_sampler_types_from_names(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&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x208, %rsp # imm = 0x208 movl %edx, %ebp movq %rsi, %r14 movq %rdi, %rbx leaq 0x30(%rsp), %rdx movl $0x1, (%rdx) leaq 0x20fbe(%rip), %rsi # 0xbb47f leaq 0x68(%rsp), %r15 movq %r15, %rdi callq 0x9ada4 leaq 0x90(%rsp), %r12 leaq 0x2c(%rsp), %rdx movl $0x2, (%rdx) leaq 0x20f9b(%rip), %rsi # 0xbb483 movq %r12, %rdi callq 0x9adc6 leaq 0xb8(%rsp), %r12 leaq 0x28(%rsp), %rdx movl $0x3, (%rdx) leaq 0x20f85(%rip), %rsi # 0xbb48f movq %r12, %rdi callq 0x9adc6 leaq 0xe0(%rsp), %r12 leaq 0x24(%rsp), %rdx movl $0x6, (%rdx) leaq 0x20f5d(%rip), %rsi # 0xbb489 movq %r12, %rdi callq 0x9adc6 leaq 0x108(%rsp), %r12 leaq 0x20(%rsp), %rdx movl $0x4, (%rdx) leaq 0x20f47(%rip), %rsi # 0xbb495 movq %r12, %rdi callq 0x9adc6 leaq 0x130(%rsp), %r12 leaq 0x1c(%rsp), %rdx movl $0x7, (%rdx) leaq 0x20f2b(%rip), %rsi # 0xbb49b movq %r12, %rdi callq 0x9ade8 leaq 0x158(%rsp), %r12 leaq 0x18(%rsp), %rdx movl $0x8, (%rdx) leaq 0x20f15(%rip), %rsi # 0xbb4a7 movq %r12, %rdi callq 0x9ada4 leaq 0x180(%rsp), %r12 leaq 0x14(%rsp), %rdx movl $0x9, (%rdx) leaq 0x132e5(%rip), %rsi # 0xad899 movq %r12, %rdi callq 0x9ae0a leaq 0x1a8(%rsp), %r12 leaq 0x10(%rsp), %rdx movl $0xa, (%rdx) leaq 0x20ed5(%rip), %rsi # 0xbb4ab movq %r12, %rdi callq 0x9ae2c leaq 0x1d0(%rsp), %rdx leaq 0x9(%rsp), %rax movq %rax, (%rsp) leaq 0x1d0(%rsp), %rdi leaq 0x68(%rsp), %rsi leaq 0xc(%rsp), %r8 leaq 0xa(%rsp), %r9 xorl %ecx, %ecx callq 0x9b438 movl $0x140, %r15d # imm = 0x140 leaq (%rsp,%r15), %rdi addq $0x68, %rdi callq 0x251b8 addq $-0x28, %r15 cmpq $-0x28, %r15 jne 0x9a613 leaq 0x2c(%rsp), %rdx movl $0x2, (%rdx) leaq 0x13470(%rip), %rsi # 0xadaac leaq 0x68(%rsp), %r15 movq %r15, %rdi callq 0x9adc6 leaq 0x90(%rsp), %r12 leaq 0x28(%rsp), %rdx movl $0x3, (%rdx) leaq 0x1347c(%rip), %rsi # 0xadadf movq %r12, %rdi callq 0x9adc6 leaq 0xb8(%rsp), %r12 leaq 0x24(%rsp), %rdx movl $0x3, (%rdx) leaq 0x20e30(%rip), %rsi # 0xbb4b5 movq %r12, %rdi callq 0x9ae4e leaq 0xe0(%rsp), %r12 leaq 0x20(%rsp), %rdx movl $0x6, (%rdx) leaq 0x20e16(%rip), %rsi # 0xbb4bd movq %r12, %rdi callq 0x9ae2c leaq 0x108(%rsp), %r12 leaq 0x1c(%rsp), %rdx movl $0x6, (%rdx) leaq 0x13504(%rip), %rsi # 0xadbcd movq %r12, %rdi callq 0x9ae4e leaq 0x130(%rsp), %r12 leaq 0x18(%rsp), %rdx movl $0x6, (%rdx) leaq 0x20ddc(%rip), %rsi # 0xbb4c7 movq %r12, %rdi callq 0x9adc6 leaq 0x158(%rsp), %r12 leaq 0x14(%rsp), %rdx movl $0x6, (%rdx) leaq 0x20dc0(%rip), %rsi # 0xbb4cd movq %r12, %rdi callq 0x9ada4 leaq 0x180(%rsp), %r12 leaq 0x10(%rsp), %rdx movl $0x4, (%rdx) leaq 0x133e7(%rip), %rsi # 0xadb16 movq %r12, %rdi callq 0x9adc6 leaq 0x1a8(%rsp), %r12 leaq 0xc(%rsp), %rdx movl $0x7, (%rdx) leaq 0x13338(%rip), %rsi # 0xada89 movq %r12, %rdi callq 0x9ae70 leaq 0x1d0(%rsp), %rdx leaq 0xb(%rsp), %rax movq %rax, (%rsp) leaq 0x30(%rsp), %rdi leaq 0x68(%rsp), %rsi leaq 0xa(%rsp), %r8 leaq 0x9(%rsp), %r9 xorl %ecx, %ecx callq 0x9b438 movl $0x140, %r15d # imm = 0x140 leaq (%rsp,%r15), %rdi addq $0x68, %rdi callq 0x251b8 addq $-0x28, %r15 cmpq $-0x28, %r15 jne 0x9a78b xorps %xmm0, %xmm0 movups %xmm0, (%rbx) andq $0x0, 0x10(%rbx) movq 0x8(%r14), %rsi subq (%r14), %rsi sarq $0x5, %rsi movq %rbx, %rdi callq 0x9ae92 movq (%r14), %r15 movq 0x8(%r14), %r13 leaq 0x1d0(%rsp), %r14 leaq 0x30(%rsp), %r12 cmpq %r13, %r15 je 0x9a815 movq %r14, %rdi movq %r15, %rsi callq 0x9b900 testq %rax, %rax je 0x9a7fa addq $0x28, %rax movq %rbx, %rdi movq %rax, %rsi callq 0x9af28 jmp 0x9a80f testb %bpl, %bpl je 0x9a80f movq %r12, %rdi movq %r15, %rsi callq 0x9b900 testq %rax, %rax jne 0x9a7e9 addq $0x20, %r15 jmp 0x9a7d4 leaq 0x30(%rsp), %rdi callq 0x9b1ac leaq 0x1d0(%rsp), %rdi callq 0x9b1ac movq %rbx, %rax addq $0x208, %rsp # imm = 0x208 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x9a908 movq %rax, %r14 movl $0x140, %ebx # imm = 0x140 leaq (%rsp,%rbx), %rdi addq $0x68, %rdi callq 0x251b8 addq $-0x28, %rbx cmpq $-0x28, %rbx jne 0x9a84e movb $0x1, %al jmp 0x9a87c jmp 0x9a877 jmp 0x9a877 jmp 0x9a877 jmp 0x9a877 jmp 0x9a877 jmp 0x9a877 jmp 0x9a877 movq %rax, %r14 xorl %eax, %eax cmpq %r12, %r15 sete %cl testb %al, %al jne 0x9a91d testb %cl, %cl jne 0x9a91d addq $-0x28, %r12 movq %r12, %rdi callq 0x251b8 cmpq %r15, %r12 jne 0x9a892 jmp 0x9a91d movq %rax, %r14 jmp 0x9a91d movq %rax, %r14 movl $0x140, %ebx # imm = 0x140 leaq (%rsp,%rbx), %rdi addq $0x68, %rdi callq 0x251b8 addq $-0x28, %rbx cmpq $-0x28, %rbx jne 0x9a8b2 movb $0x1, %al jmp 0x9a8e0 jmp 0x9a8db jmp 0x9a8db jmp 0x9a8db jmp 0x9a8db jmp 0x9a8db jmp 0x9a8db jmp 0x9a8db movq %rax, %r14 xorl %eax, %eax cmpq %r12, %r15 sete %cl testb %al, %al jne 0x9a92a testb %cl, %cl jne 0x9a92a addq $-0x28, %r12 movq %r12, %rdi callq 0x251b8 cmpq %r15, %r12 jne 0x9a8ee jmp 0x9a92a movq %rax, %r14 jmp 0x9a92a jmp 0x9a908 movq %rax, %r14 movq %rbx, %rdi callq 0x27c02 leaq 0x30(%rsp), %rdi callq 0x9b1ac leaq 0x1d0(%rsp), %rdi callq 0x9b1ac movq %r14, %rdi callq 0x24f60
_Z31common_sampler_types_from_namesRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 208h mov ebp, edx mov r14, rsi mov rbx, rdi lea rdx, [rsp+238h+var_208] mov dword ptr [rdx], 1 lea rsi, aDry; "dry" lea r15, [rsp+238h+var_1D0] mov rdi, r15 call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ lea r12, [rsp+238h+var_1A8] lea rdx, [rsp+238h+var_20C] mov dword ptr [rdx], 2 lea rsi, aTopK_0; "top_k" mov rdi, r12 call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ lea r12, [rsp+238h+var_180] lea rdx, [rsp+238h+var_210] mov dword ptr [rdx], 3 lea rsi, aTopP_0; "top_p" mov rdi, r12 call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ lea r12, [rsp+238h+var_158] lea rdx, [rsp+238h+var_214] mov dword ptr [rdx], 6 lea rsi, aTypP; "typ_p" mov rdi, r12 call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ lea r12, [rsp+238h+var_130] lea rdx, [rsp+238h+var_218] mov dword ptr [rdx], 4 lea rsi, aMinP_0; "min_p" mov rdi, r12 call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ lea r12, [rsp+238h+var_108] lea rdx, [rsp+238h+var_21C] mov dword ptr [rdx], 7 lea rsi, aTemperature; "temperature" mov rdi, r12 call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA12_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ lea r12, [rsp+238h+var_E0] lea rdx, [rsp+238h+var_220] mov dword ptr [rdx], 8 lea rsi, aXtc; "xtc" mov rdi, r12 call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ lea r12, [rsp+238h+var_B8] lea rdx, [rsp+238h+var_224] mov dword ptr [rdx], 9 lea rsi, aSpmInfill+6; "infill" mov rdi, r12 call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA7_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ lea r12, [rsp+238h+var_90] lea rdx, [rsp+238h+var_228] mov dword ptr [rdx], 0Ah lea rsi, aPenalties; "penalties" mov rdi, r12 call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA10_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ lea rdx, [rsp+238h+var_68] lea rax, [rsp+238h+var_22F] mov [rsp+238h+var_238], rax lea rdi, [rsp+238h+var_68] lea rsi, [rsp+238h+var_1D0] lea r8, [rsp+238h+var_22C] lea r9, [rsp+238h+var_22E] xor ecx, ecx call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEEC2IPKS9_EET_SQ_mRKSG_RKSE_RKSA_St17integral_constantIbLb1EE; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_Hashtable<std::pair<std::string const,common_sampler_type> const*>(std::pair<std::string const,common_sampler_type> const*,std::pair<std::string const,common_sampler_type> const*,ulong,std::hash<std::string> const&,std::equal_to<std::string> const&,std::allocator<std::pair<std::string const,common_sampler_type>> const&,std::integral_constant<bool,true>) mov r15d, 140h loc_9A613: lea rdi, [rsp+r15+238h+var_238] add rdi, 68h ; 'h'; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() add r15, 0FFFFFFFFFFFFFFD8h cmp r15, 0FFFFFFFFFFFFFFD8h jnz short loc_9A613 lea rdx, [rsp+238h+var_20C] mov dword ptr [rdx], 2 lea rsi, aTopK+2; "top-k" lea r15, [rsp+238h+var_1D0] mov rdi, r15 call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ lea r12, [rsp+238h+var_1A8] lea rdx, [rsp+238h+var_210] mov dword ptr [rdx], 3 lea rsi, aTopP+2; "top-p" mov rdi, r12 call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ lea r12, [rsp+238h+var_180] lea rdx, [rsp+238h+var_214] mov dword ptr [rdx], 3 lea rsi, aNucleus; "nucleus" mov rdi, r12 call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA8_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ lea r12, [rsp+238h+var_158] lea rdx, [rsp+238h+var_218] mov dword ptr [rdx], 6 lea rsi, aTypicalP; "typical-p" mov rdi, r12 call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA10_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ lea r12, [rsp+238h+var_130] lea rdx, [rsp+238h+var_21C] mov dword ptr [rdx], 6 lea rsi, aTypical+2; "typical" mov rdi, r12 call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA8_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ lea r12, [rsp+238h+var_108] lea rdx, [rsp+238h+var_220] mov dword ptr [rdx], 6 lea rsi, aTypP_0; "typ-p" mov rdi, r12 call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ lea r12, [rsp+238h+var_E0] lea rdx, [rsp+238h+var_224] mov dword ptr [rdx], 6 lea rsi, aTyp; "typ" mov rdi, r12 call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ lea r12, [rsp+238h+var_B8] lea rdx, [rsp+238h+var_228] mov dword ptr [rdx], 4 lea rsi, aMinP+2; "min-p" mov rdi, r12 call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ lea r12, [rsp+238h+var_90] lea rdx, [rsp+238h+var_22C] mov dword ptr [rdx], 7 lea rsi, aTemp+2; "temp" mov rdi, r12 call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA5_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ lea rdx, [rsp+238h+var_68] lea rax, [rsp+238h+var_22D] mov [rsp+238h+var_238], rax lea rdi, [rsp+238h+var_208] lea rsi, [rsp+238h+var_1D0] lea r8, [rsp+238h+var_22E] lea r9, [rsp+238h+var_22F] xor ecx, ecx call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEEC2IPKS9_EET_SQ_mRKSG_RKSE_RKSA_St17integral_constantIbLb1EE; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_Hashtable<std::pair<std::string const,common_sampler_type> const*>(std::pair<std::string const,common_sampler_type> const*,std::pair<std::string const,common_sampler_type> const*,ulong,std::hash<std::string> const&,std::equal_to<std::string> const&,std::allocator<std::pair<std::string const,common_sampler_type>> const&,std::integral_constant<bool,true>) mov r15d, 140h loc_9A78B: lea rdi, [rsp+r15+238h+var_238] add rdi, 68h ; 'h'; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() add r15, 0FFFFFFFFFFFFFFD8h cmp r15, 0FFFFFFFFFFFFFFD8h jnz short loc_9A78B xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 and qword ptr [rbx+10h], 0 mov rsi, [r14+8] sub rsi, [r14] sar rsi, 5 mov rdi, rbx call _ZNSt6vectorI19common_sampler_typeSaIS0_EE7reserveEm; std::vector<common_sampler_type>::reserve(ulong) mov r15, [r14] mov r13, [r14+8] lea r14, [rsp+238h+var_68] lea r12, [rsp+238h+var_208] loc_9A7D4: cmp r15, r13 jz short loc_9A815 mov rdi, r14 mov rsi, r15 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&) test rax, rax jz short loc_9A7FA loc_9A7E9: add rax, 28h ; '(' mov rdi, rbx mov rsi, rax call _ZNSt6vectorI19common_sampler_typeSaIS0_EE9push_backERKS0_; std::vector<common_sampler_type>::push_back(common_sampler_type const&) jmp short loc_9A80F loc_9A7FA: test bpl, bpl jz short loc_9A80F mov rdi, r12 mov rsi, r15 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&) test rax, rax jnz short loc_9A7E9 loc_9A80F: add r15, 20h ; ' ' jmp short loc_9A7D4 loc_9A815: lea rdi, [rsp+238h+var_208] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable() lea rdi, [rsp+238h+var_68] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable() mov rax, rbx add rsp, 208h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp loc_9A908 mov r14, rax mov ebx, 140h loc_9A84E: lea rdi, [rsp+rbx+0] add rdi, 68h ; 'h'; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() add rbx, 0FFFFFFFFFFFFFFD8h cmp rbx, 0FFFFFFFFFFFFFFD8h jnz short loc_9A84E mov al, 1 jmp short loc_9A87C jmp short loc_9A877 jmp short loc_9A877 jmp short loc_9A877 jmp short loc_9A877 jmp short loc_9A877 jmp short loc_9A877 jmp short $+2 loc_9A877: mov r14, rax xor eax, eax loc_9A87C: cmp r15, r12 setz cl test al, al jnz loc_9A91D test cl, cl jnz loc_9A91D loc_9A892: add r12, 0FFFFFFFFFFFFFFD8h mov rdi, r12; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() cmp r12, r15 jnz short loc_9A892 jmp short loc_9A91D mov r14, rax jmp short loc_9A91D mov r14, rax mov ebx, 140h loc_9A8B2: lea rdi, [rsp+rbx+0] add rdi, 68h ; 'h'; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() add rbx, 0FFFFFFFFFFFFFFD8h cmp rbx, 0FFFFFFFFFFFFFFD8h jnz short loc_9A8B2 mov al, 1 jmp short loc_9A8E0 jmp short loc_9A8DB jmp short loc_9A8DB jmp short loc_9A8DB jmp short loc_9A8DB jmp short loc_9A8DB jmp short loc_9A8DB jmp short $+2 loc_9A8DB: mov r14, rax xor eax, eax loc_9A8E0: cmp r15, r12 setz cl test al, al jnz short loc_9A92A test cl, cl jnz short loc_9A92A loc_9A8EE: add r12, 0FFFFFFFFFFFFFFD8h mov rdi, r12; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() cmp r12, r15 jnz short loc_9A8EE jmp short loc_9A92A mov r14, rax jmp short loc_9A92A jmp short $+2 loc_9A908: mov r14, rax mov rdi, rbx call _ZNSt12_Vector_baseI19common_sampler_typeSaIS0_EED2Ev; std::_Vector_base<common_sampler_type>::~_Vector_base() lea rdi, [rsp+arg_28] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable() loc_9A91D: lea rdi, [rsp+arg_1C8] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable() loc_9A92A: mov rdi, r14 call __Unwind_Resume
long long common_sampler_types_from_names(long long a1, long long *a2, char a3) { long long i; // r15 long long j; // r15 long long v6; // r15 long long v7; // r13 long long v8; // rax char v10; // [rsp+9h] [rbp-22Fh] BYREF char v11; // [rsp+Ah] [rbp-22Eh] BYREF char v12; // [rsp+Bh] [rbp-22Dh] BYREF int v13; // [rsp+Ch] [rbp-22Ch] BYREF int v14; // [rsp+10h] [rbp-228h] BYREF int v15; // [rsp+14h] [rbp-224h] BYREF int v16; // [rsp+18h] [rbp-220h] BYREF int v17; // [rsp+1Ch] [rbp-21Ch] BYREF int v18; // [rsp+20h] [rbp-218h] BYREF int v19; // [rsp+24h] [rbp-214h] BYREF int v20; // [rsp+28h] [rbp-210h] BYREF int v21; // [rsp+2Ch] [rbp-20Ch] BYREF _DWORD v22[14]; // [rsp+30h] [rbp-208h] BYREF _BYTE v23[40]; // [rsp+68h] [rbp-1D0h] BYREF _BYTE v24[40]; // [rsp+90h] [rbp-1A8h] BYREF _BYTE v25[40]; // [rsp+B8h] [rbp-180h] BYREF _BYTE v26[40]; // [rsp+E0h] [rbp-158h] BYREF _BYTE v27[40]; // [rsp+108h] [rbp-130h] BYREF _BYTE v28[40]; // [rsp+130h] [rbp-108h] BYREF _BYTE v29[40]; // [rsp+158h] [rbp-E0h] BYREF _BYTE v30[40]; // [rsp+180h] [rbp-B8h] BYREF _BYTE v31[40]; // [rsp+1A8h] [rbp-90h] BYREF _BYTE v32[104]; // [rsp+1D0h] [rbp-68h] BYREF v22[0] = 1; ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_( v23, "dry", v22); v21 = 2; ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_( v24, "top_k", &v21); v20 = 3; ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_( v25, "top_p", &v20); v19 = 6; ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_( v26, "typ_p", &v19); v18 = 4; ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_( v27, "min_p", &v18); v17 = 7; ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA12_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_( v28, "temperature", &v17); v16 = 8; ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_( v29, "xtc", &v16); v15 = 9; ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA7_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_( v30, "infill", &v15); v14 = 10; ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA10_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_( v31, "penalties", &v14); std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_Hashtable<std::pair<std::string const,common_sampler_type> const*>( (unsigned int)v32, (unsigned int)v23, (unsigned int)v32, 0, (unsigned int)&v13, (unsigned int)&v11, (long long)&v10); for ( i = 320LL; i != -40; i -= 40LL ) std::string::~string(&v23[i]); v21 = 2; ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_( v23, "top-k", &v21); v20 = 3; ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_( v24, "top-p", &v20); v19 = 3; ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA8_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_( v25, "nucleus", &v19); v18 = 6; ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA10_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_( v26, "typical-p", &v18); v17 = 6; ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA8_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_( v27, "typical", &v17); v16 = 6; ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_( v28, "typ-p", &v16); v15 = 6; ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_( v29, "typ", &v15); v14 = 4; ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_( v30, "min-p", &v14); v13 = 7; ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA5_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_( v31, "temp", &v13); std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_Hashtable<std::pair<std::string const,common_sampler_type> const*>( (unsigned int)v22, (unsigned int)v23, (unsigned int)v32, 0, (unsigned int)&v11, (unsigned int)&v10, (long long)&v12); for ( j = 320LL; j != -40; j -= 40LL ) std::string::~string(&v23[j]); *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; std::vector<common_sampler_type>::reserve(a1, (a2[1] - *a2) >> 5); v6 = *a2; v7 = a2[1]; while ( v6 != v7 ) { v8 = std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find( v32, v6); if ( v8 || a3 && (v8 = std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find( v22, v6)) != 0 ) { std::vector<common_sampler_type>::push_back(a1, v8 + 40); } v6 += 32LL; } std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(v22); std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(v32); return a1; }
common_sampler_types_from_names: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x208 MOV EBP,EDX MOV R14,RSI MOV RBX,RDI LEA RDX,[RSP + 0x30] MOV dword ptr [RDX],0x1 LAB_0019a4ba: LEA RSI,[0x1bb47f] LEA R15,[RSP + 0x68] MOV RDI,R15 CALL 0x0019ada4 LEA R12,[RSP + 0x90] LEA RDX,[RSP + 0x2c] MOV dword ptr [RDX],0x2 LAB_0019a4e1: LEA RSI,[0x1bb483] MOV RDI,R12 CALL 0x0019adc6 LEA R12,[RSP + 0xb8] LEA RDX,[RSP + 0x28] MOV dword ptr [RDX],0x3 LAB_0019a503: LEA RSI,[0x1bb48f] MOV RDI,R12 CALL 0x0019adc6 LEA R12,[RSP + 0xe0] LEA RDX,[RSP + 0x24] MOV dword ptr [RDX],0x6 LAB_0019a525: LEA RSI,[0x1bb489] MOV RDI,R12 CALL 0x0019adc6 LEA R12,[RSP + 0x108] LEA RDX,[RSP + 0x20] MOV dword ptr [RDX],0x4 LAB_0019a547: LEA RSI,[0x1bb495] MOV RDI,R12 CALL 0x0019adc6 LEA R12,[RSP + 0x130] LEA RDX,[RSP + 0x1c] MOV dword ptr [RDX],0x7 LAB_0019a569: LEA RSI,[0x1bb49b] MOV RDI,R12 CALL 0x0019ade8 LEA R12,[RSP + 0x158] LEA RDX,[RSP + 0x18] MOV dword ptr [RDX],0x8 LAB_0019a58b: LEA RSI,[0x1bb4a7] MOV RDI,R12 CALL 0x0019ada4 LEA R12,[RSP + 0x180] LEA RDX,[RSP + 0x14] MOV dword ptr [RDX],0x9 LAB_0019a5ad: LEA RSI,[0x1ad899] MOV RDI,R12 CALL 0x0019ae0a LEA R12,[RSP + 0x1a8] LEA RDX,[RSP + 0x10] MOV dword ptr [RDX],0xa LAB_0019a5cf: LEA RSI,[0x1bb4ab] MOV RDI,R12 CALL 0x0019ae2c LEA RDX,[RSP + 0x1d0] LAB_0019a5e6: LEA RAX,[RSP + 0x9] MOV qword ptr [RSP],RAX LEA RDI,[RSP + 0x1d0] LEA RSI,[RSP + 0x68] LEA R8,[RSP + 0xc] LEA R9,[RSP + 0xa] XOR ECX,ECX CALL 0x0019b438 MOV R15D,0x140 LAB_0019a613: LEA RDI,[RSP + R15*0x1] ADD RDI,0x68 CALL 0x001251b8 ADD R15,-0x28 CMP R15,-0x28 JNZ 0x0019a613 LEA RDX,[RSP + 0x2c] MOV dword ptr [RDX],0x2 LAB_0019a635: LEA RSI,[0x1adaac] LEA R15,[RSP + 0x68] MOV RDI,R15 CALL 0x0019adc6 LEA R12,[RSP + 0x90] LEA RDX,[RSP + 0x28] MOV dword ptr [RDX],0x3 LAB_0019a65c: LEA RSI,[0x1adadf] MOV RDI,R12 CALL 0x0019adc6 LEA R12,[RSP + 0xb8] LEA RDX,[RSP + 0x24] MOV dword ptr [RDX],0x3 LAB_0019a67e: LEA RSI,[0x1bb4b5] MOV RDI,R12 CALL 0x0019ae4e LEA R12,[RSP + 0xe0] LEA RDX,[RSP + 0x20] MOV dword ptr [RDX],0x6 LAB_0019a6a0: LEA RSI,[0x1bb4bd] MOV RDI,R12 CALL 0x0019ae2c LEA R12,[RSP + 0x108] LEA RDX,[RSP + 0x1c] MOV dword ptr [RDX],0x6 LAB_0019a6c2: LEA RSI,[0x1adbcd] MOV RDI,R12 CALL 0x0019ae4e LEA R12,[RSP + 0x130] LEA RDX,[RSP + 0x18] MOV dword ptr [RDX],0x6 LAB_0019a6e4: LEA RSI,[0x1bb4c7] MOV RDI,R12 CALL 0x0019adc6 LEA R12,[RSP + 0x158] LEA RDX,[RSP + 0x14] MOV dword ptr [RDX],0x6 LAB_0019a706: LEA RSI,[0x1bb4cd] MOV RDI,R12 CALL 0x0019ada4 LEA R12,[RSP + 0x180] LEA RDX,[RSP + 0x10] MOV dword ptr [RDX],0x4 LAB_0019a728: LEA RSI,[0x1adb16] MOV RDI,R12 CALL 0x0019adc6 LEA R12,[RSP + 0x1a8] LEA RDX,[RSP + 0xc] MOV dword ptr [RDX],0x7 LAB_0019a74a: LEA RSI,[0x1ada89] MOV RDI,R12 CALL 0x0019ae70 LEA RDX,[RSP + 0x1d0] LAB_0019a761: LEA RAX,[RSP + 0xb] MOV qword ptr [RSP],RAX LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x68] LEA R8,[RSP + 0xa] LEA R9,[RSP + 0x9] XOR ECX,ECX CALL 0x0019b438 MOV R15D,0x140 LAB_0019a78b: LEA RDI,[RSP + R15*0x1] ADD RDI,0x68 CALL 0x001251b8 ADD R15,-0x28 CMP R15,-0x28 JNZ 0x0019a78b XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 AND qword ptr [RBX + 0x10],0x0 MOV RSI,qword ptr [R14 + 0x8] SUB RSI,qword ptr [R14] SAR RSI,0x5 LAB_0019a7b8: MOV RDI,RBX CALL 0x0019ae92 MOV R15,qword ptr [R14] MOV R13,qword ptr [R14 + 0x8] LEA R14,[RSP + 0x1d0] LEA R12,[RSP + 0x30] LAB_0019a7d4: CMP R15,R13 JZ 0x0019a815 LAB_0019a7d9: MOV RDI,R14 MOV RSI,R15 CALL 0x0019b900 TEST RAX,RAX JZ 0x0019a7fa LAB_0019a7e9: ADD RAX,0x28 MOV RDI,RBX MOV RSI,RAX CALL 0x0019af28 JMP 0x0019a80f LAB_0019a7fa: TEST BPL,BPL JZ 0x0019a80f LAB_0019a7ff: MOV RDI,R12 MOV RSI,R15 CALL 0x0019b900 LAB_0019a80a: TEST RAX,RAX JNZ 0x0019a7e9 LAB_0019a80f: ADD R15,0x20 JMP 0x0019a7d4 LAB_0019a815: LEA RDI,[RSP + 0x30] CALL 0x0019b1ac LEA RDI,[RSP + 0x1d0] CALL 0x0019b1ac MOV RAX,RBX ADD RSP,0x208 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_sampler_types_from_names(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, bool) */ vector * common_sampler_types_from_names(vector *param_1,bool param_2) { string *psVar1; char in_DL; int7 in_register_00000031; long *plVar2; long lVar3; string *psVar4; int1 local_22f; int1 local_22e; int1 local_22d; int4 local_22c; int4 local_228; int4 local_224; int4 local_220; int4 local_21c; int4 local_218; int4 local_214; int4 local_210; int4 local_20c; int4 local_208 [14]; string local_1d0 [40]; int1 local_1a8 [40]; int1 local_180 [40]; int1 local_158 [40]; int1 local_130 [40]; int1 local_108 [40]; int1 local_e0 [40]; int1 local_b8 [40]; int1 local_90 [40]; _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> local_68 [56]; plVar2 = (long *)CONCAT71(in_register_00000031,param_2); local_208[0] = 1; /* try { // try from 0019a4ba to 0019a4cd has its CatchHandler @ 0019a901 */ _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ (local_1d0,&DAT_001bb47f); local_20c = 2; /* try { // try from 0019a4e1 to 0019a4ef has its CatchHandler @ 0019a8db */ _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ (local_1a8,"top_k"); local_210 = 3; /* try { // try from 0019a503 to 0019a511 has its CatchHandler @ 0019a8d9 */ _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ (local_180,"top_p"); local_214 = 6; /* try { // try from 0019a525 to 0019a533 has its CatchHandler @ 0019a8d7 */ _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ (local_158,"typ_p"); local_218 = 4; /* try { // try from 0019a547 to 0019a555 has its CatchHandler @ 0019a8d5 */ _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ (local_130,"min_p"); local_21c = 7; /* try { // try from 0019a569 to 0019a577 has its CatchHandler @ 0019a8d3 */ _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA12_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ (local_108,"temperature"); local_220 = 8; /* try { // try from 0019a58b to 0019a599 has its CatchHandler @ 0019a8d1 */ _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ (local_e0,&DAT_001bb4a7); local_224 = 9; /* try { // try from 0019a5ad to 0019a5bb has its CatchHandler @ 0019a8cf */ _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA7_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ (local_b8,"infill"); local_228 = 10; /* try { // try from 0019a5cf to 0019a5dd has its CatchHandler @ 0019a8cd */ _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA10_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ (local_90,"penalties"); /* try { // try from 0019a5e6 to 0019a60c has its CatchHandler @ 0019a8aa */ std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::_Hashtable<std::pair<std::__cxx11::string_const,common_sampler_type>const*> (local_68,local_1d0,local_68,0,&local_22c,&local_22e,&local_22f); lVar3 = 0x140; do { std::__cxx11::string::~string(local_1d0 + lVar3); lVar3 = lVar3 + -0x28; } while (lVar3 != -0x28); local_20c = 2; /* try { // try from 0019a635 to 0019a648 has its CatchHandler @ 0019a8a5 */ _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ (local_1d0,"top-k"); local_210 = 3; /* try { // try from 0019a65c to 0019a66a has its CatchHandler @ 0019a877 */ _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ (local_1a8,"top-p"); local_214 = 3; /* try { // try from 0019a67e to 0019a68c has its CatchHandler @ 0019a875 */ _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA8_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ (local_180,"nucleus"); local_218 = 6; /* try { // try from 0019a6a0 to 0019a6ae has its CatchHandler @ 0019a873 */ _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA10_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ (local_158,"typical-p"); local_21c = 6; /* try { // try from 0019a6c2 to 0019a6d0 has its CatchHandler @ 0019a871 */ _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA8_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ (local_130,"typical"); local_220 = 6; /* try { // try from 0019a6e4 to 0019a6f2 has its CatchHandler @ 0019a86f */ _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ (local_108,"typ-p"); local_224 = 6; /* try { // try from 0019a706 to 0019a714 has its CatchHandler @ 0019a86d */ _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ (local_e0,&DAT_001bb4cd); local_228 = 4; /* try { // try from 0019a728 to 0019a736 has its CatchHandler @ 0019a86b */ _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ (local_b8,"min-p"); local_22c = 7; /* try { // try from 0019a74a to 0019a758 has its CatchHandler @ 0019a869 */ _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA5_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_ (local_90,"temp"); /* try { // try from 0019a761 to 0019a784 has its CatchHandler @ 0019a846 */ std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::_Hashtable<std::pair<std::__cxx11::string_const,common_sampler_type>const*> (local_208,local_1d0,local_68,0,&local_22e,&local_22f,&local_22d); lVar3 = 0x140; do { std::__cxx11::string::~string(local_1d0 + lVar3); lVar3 = lVar3 + -0x28; } while (lVar3 != -0x28); *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; /* try { // try from 0019a7b8 to 0019a7bf has its CatchHandler @ 0019a841 */ std::vector<common_sampler_type,std::allocator<common_sampler_type>>::reserve ((vector<common_sampler_type,std::allocator<common_sampler_type>> *)param_1, plVar2[1] - *plVar2 >> 5); psVar4 = (string *)*plVar2; psVar1 = (string *)plVar2[1]; do { if (psVar4 == psVar1) { std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::~_Hashtable((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> *)local_208); std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::~_Hashtable(local_68); return param_1; } /* try { // try from 0019a7d9 to 0019a7f7 has its CatchHandler @ 0019a908 */ lVar3 = std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::find(local_68,psVar4); if (lVar3 == 0) { if (in_DL != '\0') { /* try { // try from 0019a7ff to 0019a809 has its CatchHandler @ 0019a906 */ lVar3 = std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> *)local_208,psVar4); if (lVar3 != 0) goto LAB_0019a7e9; } } else { LAB_0019a7e9: std::vector<common_sampler_type,std::allocator<common_sampler_type>>::push_back ((vector<common_sampler_type,std::allocator<common_sampler_type>> *)param_1, (common_sampler_type *)(lVar3 + 0x28)); } psVar4 = psVar4 + 0x20; } while( true ); }
35,077
evmone::instr::core::(anonymous namespace)::get_target_address(evmc::address const&, long&, evmone::ExecutionState&)
corpus-core[P]colibri-stateless/build_O2/_deps/evmone_external-src/lib/evmone/instructions_calls.cpp
inline std::variant<evmc::address, Result> get_target_address( const evmc::address& addr, int64_t& gas_left, ExecutionState& state) noexcept { if (state.rev < EVMC_PRAGUE) return addr; const auto delegate_addr = get_delegate_address(state.host, addr); if (!delegate_addr) return addr; const auto delegate_account_access_cost = (state.host.access_account(*delegate_addr) == EVMC_ACCESS_COLD ? instr::cold_account_access_cost : instr::warm_storage_read_cost); if ((gas_left -= delegate_account_access_cost) < 0) return Result{EVMC_OUT_OF_GAS, gas_left}; return *delegate_addr; }
O2
cpp
evmone::instr::core::(anonymous namespace)::get_target_address(evmc::address const&, long&, evmone::ExecutionState&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rsi, %r15 movq %rdi, %rbx cmpl $0xc, 0x40(%rcx) jg 0x41ad5 movl 0x10(%r15), %eax movl %eax, 0x10(%rbx) movups (%r15), %xmm0 movups %xmm0, (%rbx) movb $0x0, 0x18(%rbx) jmp 0x41b3f movq %rcx, %r12 movq %rdx, %r14 addq $0x28, %r12 leaq 0xb(%rsp), %r13 movq %r13, %rdi movq %r12, %rsi movq %r15, %rdx callq 0x48c24 cmpb $0x0, 0x14(%r13) je 0x41b2c leaq 0xb(%rsp), %rsi movq %r12, %rdi callq 0x2f5c0 testl %eax, %eax movq $-0xa28, %rcx # imm = 0xF5D8 pushq $-0x64 popq %rax cmoveq %rcx, %rax addq (%r14), %rax movq %rax, (%r14) js 0x41b50 movl 0x1b(%rsp), %eax movl %eax, 0x10(%rbx) movups 0xb(%rsp), %xmm0 jmp 0x41b37 movl 0x10(%r15), %eax movl %eax, 0x10(%rbx) movups (%r15), %xmm0 movups %xmm0, (%rbx) xorl %eax, %eax movb %al, 0x18(%rbx) movq %rbx, %rax addq $0x20, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movl $0x3, (%rbx) movq %rax, 0x8(%rbx) movb $0x1, %al jmp 0x41b3c
_ZN6evmone5instr4core12_GLOBAL__N_118get_target_addressERKN4evmc7addressERlRNS_14ExecutionStateE: push r15 push r14 push r13 push r12 push rbx sub rsp, 20h mov r15, rsi mov rbx, rdi cmp dword ptr [rcx+40h], 0Ch jg short loc_41AD5 mov eax, [r15+10h] mov [rbx+10h], eax movups xmm0, xmmword ptr [r15] movups xmmword ptr [rbx], xmm0 mov byte ptr [rbx+18h], 0 jmp short loc_41B3F loc_41AD5: mov r12, rcx mov r14, rdx add r12, 28h ; '(' lea r13, [rsp+48h+var_3D] mov rdi, r13 mov rsi, r12 mov rdx, r15 call _ZN6evmone20get_delegate_addressERKN4evmc13HostInterfaceERKNS0_7addressE; evmone::get_delegate_address(evmc::HostInterface const&,evmc::address const&) cmp byte ptr [r13+14h], 0 jz short loc_41B2C lea rsi, [rsp+48h+var_3D] mov rdi, r12 call _ZN4evmc11HostContext14access_accountERKNS_7addressE; evmc::HostContext::access_account(evmc::address const&) test eax, eax mov rcx, 0FFFFFFFFFFFFF5D8h push 0FFFFFFFFFFFFFF9Ch pop rax cmovz rax, rcx add rax, [r14] mov [r14], rax js short loc_41B50 mov eax, [rsp+48h+var_2D] mov [rbx+10h], eax movups xmm0, [rsp+48h+var_3D] jmp short loc_41B37 loc_41B2C: mov eax, [r15+10h] mov [rbx+10h], eax movups xmm0, xmmword ptr [r15] loc_41B37: movups xmmword ptr [rbx], xmm0 xor eax, eax loc_41B3C: mov [rbx+18h], al loc_41B3F: mov rax, rbx add rsp, 20h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_41B50: mov dword ptr [rbx], 3 mov [rbx+8], rax mov al, 1 jmp short loc_41B3C
long long evmone::instr::core::`anonymous namespace'::get_target_address( long long a1, __int128 *a2, _QWORD *a3, long long a4) { long long v5; // r12 bool v6; // zf long long v7; // rax bool v8; // sf long long v9; // rax __int128 v10; // xmm0 char v11; // al __int128 v13; // [rsp+Bh] [rbp-3Dh] BYREF int v14; // [rsp+1Bh] [rbp-2Dh] char v15; // [rsp+1Fh] [rbp-29h] if ( *(int *)(a4 + 64) > 12 ) { v5 = a4 + 40; evmone::get_delegate_address(&v13, a4 + 40, a2); if ( v15 ) { v6 = (unsigned int)evmc::HostContext::access_account(v5) == 0; v7 = -100LL; if ( v6 ) v7 = -2600LL; v8 = *a3 + v7 < 0; v9 = *a3 + v7; *a3 = v9; if ( v8 ) { *(_DWORD *)a1 = 3; *(_QWORD *)(a1 + 8) = v9; v11 = 1; goto LABEL_10; } *(_DWORD *)(a1 + 16) = v14; v10 = v13; } else { *(_DWORD *)(a1 + 16) = *((_DWORD *)a2 + 4); v10 = *a2; } *(_OWORD *)a1 = v10; v11 = 0; LABEL_10: *(_BYTE *)(a1 + 24) = v11; return a1; } *(_DWORD *)(a1 + 16) = *((_DWORD *)a2 + 4); *(_OWORD *)a1 = *a2; *(_BYTE *)(a1 + 24) = 0; return a1; }
get_target_address: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x20 MOV R15,RSI MOV RBX,RDI CMP dword ptr [RCX + 0x40],0xc JG 0x00141ad5 MOV EAX,dword ptr [R15 + 0x10] MOV dword ptr [RBX + 0x10],EAX MOVUPS XMM0,xmmword ptr [R15] MOVUPS xmmword ptr [RBX],XMM0 MOV byte ptr [RBX + 0x18],0x0 JMP 0x00141b3f LAB_00141ad5: MOV R12,RCX MOV R14,RDX ADD R12,0x28 LEA R13,[RSP + 0xb] MOV RDI,R13 MOV RSI,R12 MOV RDX,R15 CALL 0x00148c24 CMP byte ptr [R13 + 0x14],0x0 JZ 0x00141b2c LEA RSI,[RSP + 0xb] MOV RDI,R12 CALL 0x0012f5c0 TEST EAX,EAX MOV RCX,-0xa28 PUSH -0x64 POP RAX CMOVZ RAX,RCX ADD RAX,qword ptr [R14] MOV qword ptr [R14],RAX JS 0x00141b50 MOV EAX,dword ptr [RSP + 0x1b] MOV dword ptr [RBX + 0x10],EAX MOVUPS XMM0,xmmword ptr [RSP + 0xb] JMP 0x00141b37 LAB_00141b2c: MOV EAX,dword ptr [R15 + 0x10] MOV dword ptr [RBX + 0x10],EAX MOVUPS XMM0,xmmword ptr [R15] LAB_00141b37: MOVUPS xmmword ptr [RBX],XMM0 XOR EAX,EAX LAB_00141b3c: MOV byte ptr [RBX + 0x18],AL LAB_00141b3f: MOV RAX,RBX ADD RSP,0x20 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_00141b50: MOV dword ptr [RBX],0x3 MOV qword ptr [RBX + 0x8],RAX MOV AL,0x1 JMP 0x00141b3c
/* evmone::instr::core::(anonymous namespace)::get_target_address(evmc::address const&, long&, evmone::ExecutionState&) */ _anonymous_namespace_ * __thiscall evmone::instr::core::(anonymous_namespace)::get_target_address (_anonymous_namespace_ *this,address *param_1,long *param_2,ExecutionState *param_3) { int8 uVar1; _anonymous_namespace_ _Var2; int iVar3; long lVar4; int4 local_3d; int4 uStack_39; int4 uStack_35; int4 uStack_31; int4 local_2d; char local_29; if (*(int *)(param_3 + 0x40) < 0xd) { *(int4 *)(this + 0x10) = *(int4 *)(param_1 + 0x10); uVar1 = *(int8 *)(param_1 + 8); *(int8 *)this = *(int8 *)param_1; *(int8 *)(this + 8) = uVar1; this[0x18] = (_anonymous_namespace_)0x0; return this; } get_delegate_address((evmone *)&local_3d,(HostInterface *)(param_3 + 0x28),param_1); if (local_29 == '\0') { *(int4 *)(this + 0x10) = *(int4 *)(param_1 + 0x10); local_3d = *(int4 *)param_1; uStack_39 = *(int4 *)(param_1 + 4); uStack_35 = *(int4 *)(param_1 + 8); uStack_31 = *(int4 *)(param_1 + 0xc); } else { iVar3 = evmc::HostContext::access_account((address *)(param_3 + 0x28)); lVar4 = -100; if (iVar3 == 0) { lVar4 = -0xa28; } lVar4 = lVar4 + *param_2; *param_2 = lVar4; if (lVar4 < 0) { *(int4 *)this = 3; *(long *)(this + 8) = lVar4; _Var2 = (_anonymous_namespace_)0x1; goto LAB_00141b3c; } *(int4 *)(this + 0x10) = local_2d; } *(int4 *)this = local_3d; *(int4 *)(this + 4) = uStack_39; *(int4 *)(this + 8) = uStack_35; *(int4 *)(this + 0xc) = uStack_31; _Var2 = (_anonymous_namespace_)0x0; LAB_00141b3c: this[0x18] = _Var2; return this; }
35,078
bf_add_limb
bluesky950520[P]quickjs/libbf.c
static int bf_add_limb(bf_t *a, slimb_t *ppos, limb_t v) { slimb_t pos; pos = *ppos; if (unlikely(pos < 0)) { limb_t new_size, d, *new_tab; new_size = bf_max(a->len + 1, a->len * 3 / 2); new_tab = bf_realloc(a->ctx, a->tab, sizeof(limb_t) * new_size); if (!new_tab) return -1; a->tab = new_tab; d = new_size - a->len; memmove(a->tab + d, a->tab, a->len * sizeof(limb_t)); a->len = new_size; pos += d; } a->tab[pos--] = v; *ppos = pos; return 0; }
O2
c
bf_add_limb: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %rbx movq %rdi, %r15 movq (%rsi), %r12 testq %r12, %r12 js 0x78ba4 movq 0x20(%r15), %rax movq %r14, (%rax,%r12,8) decq %r12 movq %r12, (%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x18(%r15), %rax leaq (%rax,%rax,2), %r13 incq %rax shrq %r13 cmpq %r13, %rax cmovgq %rax, %r13 movq (%r15), %rax movq 0x20(%r15), %rsi leaq (,%r13,8), %rdx movq (%rax), %rdi callq *0x8(%rax) testq %rax, %rax je 0x78bfa movq %rax, 0x20(%r15) movq 0x18(%r15), %rdx movq %r13, %rbp subq %rdx, %rbp leaq (%rax,%rbp,8), %rdi shlq $0x3, %rdx movq %rax, %rsi callq 0xe740 movq %r13, 0x18(%r15) addq %rbp, %r12 jmp 0x78b85 pushq $-0x1 popq %rax jmp 0x78b95
bf_add_limb: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdx mov rbx, rsi mov r15, rdi mov r12, [rsi] test r12, r12 js short loc_78BA4 loc_78B85: mov rax, [r15+20h] mov [rax+r12*8], r14 dec r12 mov [rbx], r12 xor eax, eax loc_78B95: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_78BA4: mov rax, [r15+18h] lea r13, [rax+rax*2] inc rax shr r13, 1 cmp rax, r13 cmovg r13, rax mov rax, [r15] mov rsi, [r15+20h] lea rdx, ds:0[r13*8] mov rdi, [rax] call qword ptr [rax+8] test rax, rax jz short loc_78BFA mov [r15+20h], rax mov rdx, [r15+18h] mov rbp, r13 sub rbp, rdx lea rdi, [rax+rbp*8] shl rdx, 3 mov rsi, rax call _memmove mov [r15+18h], r13 add r12, rbp jmp short loc_78B85 loc_78BFA: push 0FFFFFFFFFFFFFFFFh pop rax jmp short loc_78B95
long long bf_add_limb(_QWORD *a1, long long *a2, long long a3) { long long v4; // r12 long long v6; // rax unsigned long long v7; // r13 signed long long v8; // rax signed long long v9; // r13 long long v10; // rax long long v11; // rdx long long v12; // rbp v4 = *a2; if ( *a2 < 0 ) { v6 = a1[3]; v7 = 3 * v6; v8 = v6 + 1; v9 = v7 >> 1; if ( v8 > v9 ) v9 = v8; v10 = (*(long long ( **)(_QWORD, _QWORD, signed long long))(*a1 + 8LL))(*(_QWORD *)*a1, a1[4], 8 * v9); if ( !v10 ) return -1LL; a1[4] = v10; v11 = a1[3]; v12 = v9 - v11; memmove(v10 + 8 * (v9 - v11), v10, 8 * v11); a1[3] = v9; v4 += v12; } *(_QWORD *)(a1[4] + 8 * v4) = a3; *a2 = v4 - 1; return 0LL; }
bf_add_limb: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV RBX,RSI MOV R15,RDI MOV R12,qword ptr [RSI] TEST R12,R12 JS 0x00178ba4 LAB_00178b85: MOV RAX,qword ptr [R15 + 0x20] MOV qword ptr [RAX + R12*0x8],R14 DEC R12 MOV qword ptr [RBX],R12 XOR EAX,EAX LAB_00178b95: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00178ba4: MOV RAX,qword ptr [R15 + 0x18] LEA R13,[RAX + RAX*0x2] INC RAX SHR R13,0x1 CMP RAX,R13 CMOVG R13,RAX MOV RAX,qword ptr [R15] MOV RSI,qword ptr [R15 + 0x20] LEA RDX,[R13*0x8] MOV RDI,qword ptr [RAX] CALL qword ptr [RAX + 0x8] TEST RAX,RAX JZ 0x00178bfa MOV qword ptr [R15 + 0x20],RAX MOV RDX,qword ptr [R15 + 0x18] MOV RBP,R13 SUB RBP,RDX LEA RDI,[RAX + RBP*0x8] SHL RDX,0x3 MOV RSI,RAX CALL 0x0010e740 MOV qword ptr [R15 + 0x18],R13 ADD R12,RBP JMP 0x00178b85 LAB_00178bfa: PUSH -0x1 POP RAX JMP 0x00178b95
int8 bf_add_limb(long *param_1,long *param_2,int8 param_3) { ulong uVar1; void *__src; long lVar2; long lVar3; ulong uVar4; lVar3 = *param_2; if (lVar3 < 0) { uVar1 = param_1[3] + 1; uVar4 = (ulong)(param_1[3] * 3) >> 1; if ((long)uVar4 < (long)uVar1) { uVar4 = uVar1; } __src = (void *)(*(code *)((int8 *)*param_1)[1]) (*(int8 *)*param_1,param_1[4],uVar4 * 8); if (__src == (void *)0x0) { return 0xffffffffffffffff; } param_1[4] = (long)__src; lVar2 = uVar4 - param_1[3]; memmove((void *)((long)__src + lVar2 * 8),__src,param_1[3] << 3); param_1[3] = uVar4; lVar3 = lVar3 + lVar2; } *(int8 *)(param_1[4] + lVar3 * 8) = param_3; *param_2 = lVar3 + -1; return 0; }
35,079
test_bug_54100
eloqsql/libmariadb/unittest/libmariadb/charset.c
static int test_bug_54100(MYSQL *mysql) { MYSQL_RES *result; MYSQL_ROW row; int rc; rc= mysql_query(mysql, "SHOW CHARACTER SET"); check_mysql_rc(rc, mysql); result= mysql_store_result(mysql); while ((row= mysql_fetch_row(result))) { /* ignore ucs2 */ if (strcmp(row[0], "ucs2") && strcmp(row[0], "utf16le") && (strcmp(row[0], "utf8mb4") && mariadb_connection(mysql) && mysql_get_server_version(mysql) < 100600) && (strcmp(row[0], "utf8") && mariadb_connection(mysql) && mysql_get_server_version(mysql) >= 100600) && strcmp(row[0], "utf16") && strcmp(row[0], "utf32")) { rc= mysql_set_character_set(mysql, row[0]); check_mysql_rc(rc, mysql); } } mysql_free_result(result); return OK; }
O3
c
test_bug_54100: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x20887(%rip), %rsi # 0x371d9 callq 0x1d045 testl %eax, %eax je 0x1699e movl %eax, %r14d movq %rbx, %rdi callq 0x1f0be movq %rax, %r15 movq %rbx, %rdi callq 0x1f0a9 leaq 0x1f86d(%rip), %rdi # 0x361e5 leaq 0x1fcc1(%rip), %r8 # 0x36640 movl %r14d, %esi movq %r15, %rdx movl %eax, %ecx movl $0x288, %r9d # imm = 0x288 xorl %eax, %eax callq 0x16f1f movl $0x1, %eax jmp 0x16aac movq %rbx, %rdi callq 0x1df3d movq %rax, %r14 movq %rax, %rdi callq 0x1e140 testq %rax, %rax je 0x16aa2 movq %rax, %r13 leaq 0x20828(%rip), %r15 # 0x371ec movq (%r13), %r12 movq %r12, %rdi movq %r15, %rsi callq 0x13640 testl %eax, %eax je 0x16a8e movq %r12, %rdi leaq 0x2080c(%rip), %rsi # 0x371f1 callq 0x13640 testl %eax, %eax je 0x16a8e movq %r12, %rdi leaq 0x207fd(%rip), %rsi # 0x371f9 callq 0x13640 testl %eax, %eax je 0x16a8e movq %rbx, %rdi callq 0x183d3 testb %al, %al je 0x16a8e movq %rbx, %rdi callq 0x1e85b cmpq $0x188f7, %rax # imm = 0x188F7 ja 0x16a8e movq (%r13), %rdi leaq 0x2013f(%rip), %rsi # 0x36b6f callq 0x13640 testl %eax, %eax je 0x16a8e movq %rbx, %rdi callq 0x183d3 testb %al, %al je 0x16a8e movq %rbx, %rdi callq 0x1e85b cmpq $0x188f8, %rax # imm = 0x188F8 jb 0x16a8e movq (%r13), %r13 movq %r13, %rdi leaq 0x2079e(%rip), %rsi # 0x37201 callq 0x13640 testl %eax, %eax je 0x16a8e movq %r13, %rdi leaq 0x20791(%rip), %rsi # 0x37207 callq 0x13640 testl %eax, %eax je 0x16a8e movq %rbx, %rdi movq %r13, %rsi callq 0x1c9c3 testl %eax, %eax jne 0x16abb movq %r14, %rdi callq 0x1e140 movq %rax, %r13 testq %rax, %rax jne 0x169c4 movq %r14, %rdi callq 0x18cf2 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %eax, %r12d movq %rbx, %rdi callq 0x1f0be movq %rax, %r14 movq %rbx, %rdi callq 0x1f0a9 leaq 0x1f70d(%rip), %rdi # 0x361e5 leaq 0x1fb61(%rip), %r8 # 0x36640 movl %r12d, %esi movq %r14, %rdx movl %eax, %ecx movl $0x296, %r9d # imm = 0x296 jmp 0x1698d
test_bug_54100: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi lea rsi, aShowCharacterS; "SHOW CHARACTER SET" call mysql_query test eax, eax jz short loc_1699E mov r14d, eax mov rdi, rbx call mysql_error mov r15, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, r14d mov rdx, r15 mov ecx, eax mov r9d, 288h loc_1698D: xor eax, eax call diag mov eax, 1 jmp loc_16AAC loc_1699E: mov rdi, rbx call mysql_store_result mov r14, rax mov rdi, rax call mysql_fetch_row test rax, rax jz loc_16AA2 mov r13, rax lea r15, aUcs2; "ucs2" loc_169C4: mov r12, [r13+0] mov rdi, r12 mov rsi, r15 call _strcmp test eax, eax jz loc_16A8E mov rdi, r12 lea rsi, aUtf16le; "utf16le" call _strcmp test eax, eax jz loc_16A8E mov rdi, r12 lea rsi, aUtf8mb4; "utf8mb4" call _strcmp test eax, eax jz loc_16A8E mov rdi, rbx call mariadb_connection test al, al jz short loc_16A8E mov rdi, rbx call mysql_get_server_version cmp rax, offset loc_188F7 ja short loc_16A8E mov rdi, [r13+0] lea rsi, aWrongCharsetEx+18h; "utf8" call _strcmp test eax, eax jz short loc_16A8E mov rdi, rbx call mariadb_connection test al, al jz short loc_16A8E mov rdi, rbx call mysql_get_server_version cmp rax, 188F8h jb short loc_16A8E mov r13, [r13+0] mov rdi, r13 lea rsi, aUtf16; "utf16" call _strcmp test eax, eax jz short loc_16A8E mov rdi, r13 lea rsi, aUtf32; "utf32" call _strcmp test eax, eax jz short loc_16A8E mov rdi, rbx mov rsi, r13 call mysql_set_character_set test eax, eax jnz short loc_16ABB loc_16A8E: mov rdi, r14 call mysql_fetch_row mov r13, rax test rax, rax jnz loc_169C4 loc_16AA2: mov rdi, r14 call mysql_free_result xor eax, eax loc_16AAC: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_16ABB: mov r12d, eax mov rdi, rbx call mysql_error mov r14, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, r12d mov rdx, r14 mov ecx, eax mov r9d, 296h jmp loc_1698D
long long test_bug_54100(long long a1) { int v1; // eax int v2; // r14d int v3; // r15d int v4; // eax int v5; // esi int v6; // edx int v7; // ecx int v8; // r9d long long v10; // r14 long long row; // rax _QWORD *v12; // r13 long long v13; // r12 long long v14; // r13 int v15; // eax int v16; // r12d int v17; // r14d int v18; // eax v1 = mysql_query(a1, "SHOW CHARACTER SET"); if ( v1 ) { v2 = v1; v3 = mysql_error(a1); v4 = mysql_errno(a1); v5 = v2; v6 = v3; v7 = v4; v8 = 648; LABEL_3: diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v5, v6, v7, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c", v8); return 1LL; } v10 = mysql_store_result(a1); row = mysql_fetch_row(v10); if ( row ) { v12 = (_QWORD *)row; while ( 1 ) { v13 = *v12; if ( (unsigned int)strcmp(*v12, "ucs2") ) { if ( (unsigned int)strcmp(v13, "utf16le") ) { if ( (unsigned int)strcmp(v13, "utf8mb4") ) { if ( (unsigned __int8)mariadb_connection(a1) ) { if ( mysql_get_server_version(a1) <= (unsigned long long)&loc_188F7 ) { if ( (unsigned int)strcmp(*v12, "utf8") ) { if ( (unsigned __int8)mariadb_connection(a1) ) { if ( (unsigned long long)mysql_get_server_version(a1) >= 0x188F8 ) { v14 = *v12; if ( (unsigned int)strcmp(v14, "utf16") ) { if ( (unsigned int)strcmp(v14, "utf32") ) { v15 = mysql_set_character_set(a1, v14); if ( v15 ) break; } } } } } } } } } } v12 = (_QWORD *)mysql_fetch_row(v10); if ( !v12 ) goto LABEL_18; } v16 = v15; v17 = mysql_error(a1); v18 = mysql_errno(a1); v5 = v16; v6 = v17; v7 = v18; v8 = 662; goto LABEL_3; } LABEL_18: mysql_free_result(v10); return 0LL; }
test_bug_54100: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI LEA RSI,[0x1371d9] CALL 0x0011d045 TEST EAX,EAX JZ 0x0011699e MOV R14D,EAX MOV RDI,RBX CALL 0x0011f0be MOV R15,RAX MOV RDI,RBX CALL 0x0011f0a9 LEA RDI,[0x1361e5] LEA R8,[0x136640] MOV ESI,R14D MOV RDX,R15 MOV ECX,EAX MOV R9D,0x288 LAB_0011698d: XOR EAX,EAX CALL 0x00116f1f MOV EAX,0x1 JMP 0x00116aac LAB_0011699e: MOV RDI,RBX CALL 0x0011df3d MOV R14,RAX MOV RDI,RAX CALL 0x0011e140 TEST RAX,RAX JZ 0x00116aa2 MOV R13,RAX LEA R15,[0x1371ec] LAB_001169c4: MOV R12,qword ptr [R13] MOV RDI,R12 MOV RSI,R15 CALL 0x00113640 TEST EAX,EAX JZ 0x00116a8e MOV RDI,R12 LEA RSI,[0x1371f1] CALL 0x00113640 TEST EAX,EAX JZ 0x00116a8e MOV RDI,R12 LEA RSI,[0x1371f9] CALL 0x00113640 TEST EAX,EAX JZ 0x00116a8e MOV RDI,RBX CALL 0x001183d3 TEST AL,AL JZ 0x00116a8e MOV RDI,RBX CALL 0x0011e85b CMP RAX,0x188f7 JA 0x00116a8e MOV RDI,qword ptr [R13] LEA RSI,[0x136b6f] CALL 0x00113640 TEST EAX,EAX JZ 0x00116a8e MOV RDI,RBX CALL 0x001183d3 TEST AL,AL JZ 0x00116a8e MOV RDI,RBX CALL 0x0011e85b CMP RAX,0x188f8 JC 0x00116a8e MOV R13,qword ptr [R13] MOV RDI,R13 LEA RSI,[0x137201] CALL 0x00113640 TEST EAX,EAX JZ 0x00116a8e MOV RDI,R13 LEA RSI,[0x137207] CALL 0x00113640 TEST EAX,EAX JZ 0x00116a8e MOV RDI,RBX MOV RSI,R13 CALL 0x0011c9c3 TEST EAX,EAX JNZ 0x00116abb LAB_00116a8e: MOV RDI,R14 CALL 0x0011e140 MOV R13,RAX TEST RAX,RAX JNZ 0x001169c4 LAB_00116aa2: MOV RDI,R14 CALL 0x00118cf2 XOR EAX,EAX LAB_00116aac: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00116abb: MOV R12D,EAX MOV RDI,RBX CALL 0x0011f0be MOV R14,RAX MOV RDI,RBX CALL 0x0011f0a9 LEA RDI,[0x1361e5] LEA R8,[0x136640] MOV ESI,R12D MOV RDX,R14 MOV ECX,EAX MOV R9D,0x296 JMP 0x0011698d
int8 test_bug_54100(int8 param_1) { char *pcVar1; char cVar2; int iVar3; int4 uVar4; int8 uVar5; int8 *puVar6; ulong uVar7; int8 uVar8; iVar3 = mysql_query(param_1,"SHOW CHARACTER SET"); if (iVar3 == 0) { uVar5 = mysql_store_result(param_1); puVar6 = (int8 *)mysql_fetch_row(uVar5); while (puVar6 != (int8 *)0x0) { pcVar1 = (char *)*puVar6; iVar3 = strcmp(pcVar1,"ucs2"); if (((((iVar3 != 0) && (iVar3 = strcmp(pcVar1,"utf16le"), iVar3 != 0)) && (iVar3 = strcmp(pcVar1,"utf8mb4"), iVar3 != 0)) && ((cVar2 = mariadb_connection(param_1), cVar2 != '\0' && (uVar7 = mysql_get_server_version(param_1), uVar7 < 0x188f8)))) && ((iVar3 = strcmp((char *)*puVar6,"utf8"), iVar3 != 0 && ((cVar2 = mariadb_connection(param_1), cVar2 != '\0' && (uVar7 = mysql_get_server_version(param_1), 0x188f7 < uVar7)))))) { pcVar1 = (char *)*puVar6; iVar3 = strcmp(pcVar1,"utf16"); if ((iVar3 != 0) && ((iVar3 = strcmp(pcVar1,"utf32"), iVar3 != 0 && (iVar3 = mysql_set_character_set(param_1,pcVar1), iVar3 != 0)))) { uVar5 = mysql_error(param_1); uVar4 = mysql_errno(param_1); uVar8 = 0x296; goto LAB_0011698d; } } puVar6 = (int8 *)mysql_fetch_row(uVar5); } mysql_free_result(uVar5); uVar5 = 0; } else { uVar5 = mysql_error(param_1); uVar4 = mysql_errno(param_1); uVar8 = 0x288; LAB_0011698d: diag("Error (%d): %s (%d) in %s line %d",iVar3,uVar5,uVar4, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c",uVar8); uVar5 = 1; } return uVar5; }
35,080
minja::Value::dump_string(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&, std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, char)
monkey531[P]llama/common/minja.hpp
static void dump_string(const json & primitive, std::ostringstream & out, char string_quote = '\'') { if (!primitive.is_string()) throw std::runtime_error("Value is not a string: " + primitive.dump()); auto s = primitive.dump(); if (string_quote == '"' || s.find('\'') != std::string::npos) { out << s; return; } // Reuse json dump, just changing string quotes out << string_quote; for (size_t i = 1, n = s.size() - 1; i < n; ++i) { if (s[i] == '\\' && s[i + 1] == '"') { out << '"'; i++; } else if (s[i] == string_quote) { out << '\\' << string_quote; } else { out << s[i]; } } out << string_quote; }
O2
cpp
minja::Value::dump_string(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&, std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, char): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdi, %r14 cmpb $0x3, (%rdi) jne 0x4e818 movl %edx, %ebp movq %rsi, %rbx leaq 0x8(%rsp), %rdi pushq $-0x1 popq %rdx pushq $0x20 popq %rcx movq %r14, %rsi xorl %r8d, %r8d xorl %r9d, %r9d callq 0x47dd6 cmpb $0x22, %bpl je 0x4e76d leaq 0x8(%rsp), %rdi pushq $0x27 popq %rsi xorl %edx, %edx callq 0x22a30 cmpq $-0x1, %rax je 0x4e793 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x226d0 leaq 0x8(%rsp), %rdi callq 0x22f98 addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movsbl %bpl, %esi movq %rbx, %rdi movl %esi, 0x4(%rsp) callq 0x22910 movq 0x10(%rsp), %r13 decq %r13 pushq $0x1 popq %r14 pushq $0x22 popq %r15 pushq $0x5c popq %r12 cmpq %r13, %r14 jae 0x4e807 movq 0x8(%rsp), %rax movb (%rax,%r14), %cl cmpb $0x5c, %cl jne 0x4e7e2 cmpb $0x22, 0x1(%rax,%r14) jne 0x4e7e2 movq %rbx, %rdi movl %r15d, %esi callq 0x22910 incq %r14 jmp 0x4e802 movq %rbx, %rax cmpb %bpl, %cl jne 0x4e7f7 movq %rbx, %rdi movl %r12d, %esi callq 0x22910 movl %ebp, %ecx movsbl %cl, %esi movq %rax, %rdi callq 0x22910 incq %r14 jmp 0x4e7b7 movq %rbx, %rdi movl 0x4(%rsp), %esi callq 0x22910 jmp 0x4e77a pushq $0x10 popq %rdi callq 0x223e0 movq %rax, %rbx leaq 0x28(%rsp), %rdi pushq $-0x1 popq %rdx pushq $0x20 popq %rcx movq %r14, %rsi xorl %r8d, %r8d xorl %r9d, %r9d callq 0x47dd6 leaq 0x4f689(%rip), %rsi # 0x9decc leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rdx callq 0x3a58f movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x22c80 xorl %ebp, %ebp movq 0x94785(%rip), %rsi # 0xe2ff0 movq 0x946f6(%rip), %rdx # 0xe2f68 movq %rbx, %rdi callq 0x22d40 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x22f98 jmp 0x4e88f movq %rax, %r14 movb $0x1, %bpl leaq 0x28(%rsp), %rdi callq 0x22f98 testb %bpl, %bpl jne 0x4e8a3 jmp 0x4e8bc movq %rax, %r14 movq %rbx, %rdi callq 0x225c0 jmp 0x4e8bc jmp 0x4e8af movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x22f98 movq %r14, %rdi callq 0x22da0
_ZN5minja5Value11dump_stringERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERNS6_19basic_ostringstreamIcS9_SA_EEc: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r14, rdi cmp byte ptr [rdi], 3 jnz loc_4E818 mov ebp, edx mov rbx, rsi lea rdi, [rsp+78h+var_70] push 0FFFFFFFFFFFFFFFFh pop rdx push 20h ; ' ' pop rcx mov rsi, r14 xor r8d, r8d xor r9d, r9d call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; 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>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t) cmp bpl, 22h ; '"' jz short loc_4E76D lea rdi, [rsp+78h+var_70] push 27h ; ''' pop rsi xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_4E793 loc_4E76D: lea rsi, [rsp+78h+var_70] mov rdi, rbx call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) loc_4E77A: lea rdi, [rsp+78h+var_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4E793: movsx esi, bpl mov rdi, rbx mov [rsp+78h+var_74], esi call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) mov r13, [rsp+78h+var_68] dec r13 push 1 pop r14 push 22h ; '"' pop r15 push 5Ch ; '\' pop r12 loc_4E7B7: cmp r14, r13 jnb short loc_4E807 mov rax, [rsp+78h+var_70] mov cl, [rax+r14] cmp cl, 5Ch ; '\' jnz short loc_4E7E2 cmp byte ptr [rax+r14+1], 22h ; '"' jnz short loc_4E7E2 mov rdi, rbx mov esi, r15d call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) inc r14 jmp short loc_4E802 loc_4E7E2: mov rax, rbx cmp cl, bpl jnz short loc_4E7F7 mov rdi, rbx mov esi, r12d call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) mov ecx, ebp loc_4E7F7: movsx esi, cl mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) loc_4E802: inc r14 jmp short loc_4E7B7 loc_4E807: mov rdi, rbx mov esi, [rsp+78h+var_74] call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) jmp loc_4E77A loc_4E818: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+78h+var_50] push 0FFFFFFFFFFFFFFFFh pop rdx push 20h ; ' ' pop rcx mov rsi, r14 xor r8d, r8d xor r9d, r9d call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; 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>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t) lea rsi, aValueIsNotAStr; "Value is not a string: " lea rdi, [rsp+78h+var_70] lea rdx, [rsp+78h+var_50] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+78h+var_70] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+78h+var_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_4E88F mov r14, rax mov bpl, 1 loc_4E88F: lea rdi, [rsp+78h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_4E8A3 jmp short loc_4E8BC mov r14, rax loc_4E8A3: mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_4E8BC jmp short $+2 loc_4E8AF: mov r14, rax lea rdi, [rsp+78h+var_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_4E8BC: mov rdi, r14 call __Unwind_Resume
void minja::Value::dump_string(_BYTE *a1, long long a2, char a3) { unsigned long long v4; // r13 unsigned long long i; // r14 char v6; // cl long long v7; // rax void *exception; // rbx _QWORD v9[4]; // [rsp+8h] [rbp-70h] BYREF _BYTE v10[80]; // [rsp+28h] [rbp-50h] BYREF if ( *a1 != 3 ) { exception = __cxa_allocate_exception(0x10uLL); 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>::dump( (long long)v10, (long long)a1, -1, 32, 0, 0); std::operator+<char>((long long)v9, (long long)"Value is not a string: ", (long long)v10); std::runtime_error::runtime_error(exception, v9); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } 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>::dump( (long long)v9, (long long)a1, -1, 32, 0, 0); if ( a3 != 34 && std::string::find(v9, 39LL, 0LL) == -1 ) { std::operator<<<std::char_traits<char>>(a2, (unsigned int)a3); v4 = v9[1] - 1LL; for ( i = 1LL; i < v4; ++i ) { v6 = *(_BYTE *)(v9[0] + i); if ( v6 == 92 && *(_BYTE *)(v9[0] + i + 1) == 34 ) { std::operator<<<std::char_traits<char>>(a2, 34LL); ++i; } else { v7 = a2; if ( v6 == a3 ) { v7 = std::operator<<<std::char_traits<char>>(a2, 92LL); v6 = a3; } std::operator<<<std::char_traits<char>>(v7, (unsigned int)v6); } } std::operator<<<std::char_traits<char>>(a2, (unsigned int)a3); } else { std::operator<<<char>(a2, v9); } std::string::~string(v9); }
dump_string: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R14,RDI CMP byte ptr [RDI],0x3 JNZ 0x0014e818 MOV EBP,EDX MOV RBX,RSI LEA RDI,[RSP + 0x8] PUSH -0x1 POP RDX PUSH 0x20 POP RCX MOV RSI,R14 XOR R8D,R8D XOR R9D,R9D CALL 0x00147dd6 CMP BPL,0x22 JZ 0x0014e76d LEA RDI,[RSP + 0x8] PUSH 0x27 POP RSI XOR EDX,EDX CALL 0x00122a30 CMP RAX,-0x1 JZ 0x0014e793 LAB_0014e76d: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x001226d0 LAB_0014e77a: LEA RDI,[RSP + 0x8] CALL 0x00122f98 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014e793: MOVSX ESI,BPL MOV RDI,RBX MOV dword ptr [RSP + 0x4],ESI CALL 0x00122910 MOV R13,qword ptr [RSP + 0x10] DEC R13 PUSH 0x1 POP R14 PUSH 0x22 POP R15 PUSH 0x5c POP R12 LAB_0014e7b7: CMP R14,R13 JNC 0x0014e807 MOV RAX,qword ptr [RSP + 0x8] MOV CL,byte ptr [RAX + R14*0x1] CMP CL,0x5c JNZ 0x0014e7e2 CMP byte ptr [RAX + R14*0x1 + 0x1],0x22 JNZ 0x0014e7e2 LAB_0014e7d2: MOV RDI,RBX MOV ESI,R15D CALL 0x00122910 INC R14 JMP 0x0014e802 LAB_0014e7e2: MOV RAX,RBX CMP CL,BPL JNZ 0x0014e7f7 MOV RDI,RBX MOV ESI,R12D CALL 0x00122910 MOV ECX,EBP LAB_0014e7f7: MOVSX ESI,CL MOV RDI,RAX CALL 0x00122910 LAB_0014e802: INC R14 JMP 0x0014e7b7 LAB_0014e807: MOV RDI,RBX MOV ESI,dword ptr [RSP + 0x4] CALL 0x00122910 LAB_0014e813: JMP 0x0014e77a LAB_0014e818: PUSH 0x10 POP RDI CALL 0x001223e0 MOV RBX,RAX LAB_0014e823: LEA RDI,[RSP + 0x28] PUSH -0x1 POP RDX PUSH 0x20 POP RCX MOV RSI,R14 XOR R8D,R8D XOR R9D,R9D CALL 0x00147dd6 LAB_0014e83c: LEA RSI,[0x19decc] LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x28] CALL 0x0013a58f MOV BPL,0x1 LAB_0014e855: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x00122c80 XOR EBP,EBP MOV RSI,qword ptr [0x001e2ff0] MOV RDX,qword ptr [0x001e2f68] MOV RDI,RBX CALL 0x00122d40
/* minja::Value::dump_string(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&, std::__cxx11::ostringstream&, char) */ void minja::Value::dump_string(basic_json *param_1,ostringstream *param_2,char param_3) { long lVar1; ostringstream *poVar2; runtime_error *this; char cVar3; ulong uVar4; long local_70; long local_68; int1 local_50 [32]; if (*param_1 != '\x03') { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0014e823 to 0014e83b has its CatchHandler @ 0014e8a0 */ 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> ::dump(local_50,param_1,0xffffffffffffffff,0x20,0,0); /* try { // try from 0014e83c to 0014e851 has its CatchHandler @ 0014e889 */ std::operator+((char *)&local_70,(string *)"Value is not a string: "); /* try { // try from 0014e855 to 0014e879 has its CatchHandler @ 0014e87a */ std::runtime_error::runtime_error(this,(string *)&local_70); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001e2ff0,PTR__runtime_error_001e2f68); } 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> ::dump(&local_70,param_1,0xffffffffffffffff,0x20,0,0); if (param_3 != '\"') { lVar1 = std::__cxx11::string::find((char)&local_70,0x27); if (lVar1 == -1) { std::operator<<((ostream *)param_2,param_3); for (uVar4 = 1; uVar4 < local_68 - 1U; uVar4 = uVar4 + 1) { cVar3 = *(char *)(local_70 + uVar4); if ((cVar3 == '\\') && (*(char *)(local_70 + 1 + uVar4) == '\"')) { /* try { // try from 0014e7d2 to 0014e801 has its CatchHandler @ 0014e8af */ std::operator<<((ostream *)param_2,'\"'); uVar4 = uVar4 + 1; } else { poVar2 = param_2; if (cVar3 == param_3) { poVar2 = (ostringstream *)std::operator<<((ostream *)param_2,'\\'); cVar3 = param_3; } std::operator<<((ostream *)poVar2,cVar3); } } /* try { // try from 0014e807 to 0014e812 has its CatchHandler @ 0014e8ad */ std::operator<<((ostream *)param_2,param_3); goto LAB_0014e77a; } } /* try { // try from 0014e76d to 0014e7a2 has its CatchHandler @ 0014e8ad */ std::operator<<((ostream *)param_2,(string *)&local_70); LAB_0014e77a: std::__cxx11::string::~string((string *)&local_70); return; }
35,081
compare_columns
eloqsql/storage/maria/ma_create.c
static int compare_columns(MARIA_COLUMNDEF **a_ptr, MARIA_COLUMNDEF **b_ptr) { MARIA_COLUMNDEF *a= *a_ptr, *b= *b_ptr; enum en_fieldtype a_type, b_type; a_type= (a->type == FIELD_CHECK) ? FIELD_NORMAL : a->type; b_type= (b->type == FIELD_CHECK) ? FIELD_NORMAL : b->type; if (a_type == FIELD_NORMAL && !a->null_bit) { if (b_type != FIELD_NORMAL || b->null_bit) return -1; return sign((long) a->offset - (long) b->offset); } if (b_type == FIELD_NORMAL && !b->null_bit) return 1; if (a_type == b_type) return sign((long) a->offset - (long) b->offset); if (a_type == FIELD_NORMAL) return -1; if (b_type == FIELD_NORMAL) return 1; if (a_type == FIELD_SKIP_ZERO) return -1; if (b_type == FIELD_SKIP_ZERO) return 1; if (a->type != FIELD_BLOB && b->type != FIELD_BLOB) if (a->length != b->length) return sign((long) a->length - (long) b->length); if (a_type == FIELD_BLOB) return 1; if (b_type == FIELD_BLOB) return -1; return sign((long) a->offset - (long) b->offset); }
O0
c
compare_columns: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax cmpl $0x9, (%rax) jne 0x75776 xorl %eax, %eax movl %eax, -0x34(%rbp) jmp 0x7577f movq -0x20(%rbp), %rax movl (%rax), %eax movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x2c(%rbp) movq -0x28(%rbp), %rax cmpl $0x9, (%rax) jne 0x75795 xorl %eax, %eax movl %eax, -0x38(%rbp) jmp 0x7579e movq -0x28(%rbp), %rax movl (%rax), %eax movl %eax, -0x38(%rbp) movl -0x38(%rbp), %eax movl %eax, -0x30(%rbp) cmpl $0x0, -0x2c(%rbp) jne 0x757f3 movq -0x20(%rbp), %rax cmpb $0x0, 0x12(%rax) jne 0x757f3 cmpl $0x0, -0x30(%rbp) jne 0x757c7 movq -0x28(%rbp), %rax movzbl 0x12(%rax), %eax cmpl $0x0, %eax je 0x757d3 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x758ff movq -0x20(%rbp), %rax movl 0x4(%rax), %eax movl %eax, %edi movq -0x28(%rbp), %rax movl 0x4(%rax), %eax subq %rax, %rdi callq 0x763e0 movl %eax, -0x4(%rbp) jmp 0x758ff cmpl $0x0, -0x30(%rbp) jne 0x7580f movq -0x28(%rbp), %rax cmpb $0x0, 0x12(%rax) jne 0x7580f movl $0x1, -0x4(%rbp) jmp 0x758ff movl -0x2c(%rbp), %eax cmpl -0x30(%rbp), %eax jne 0x75837 movq -0x20(%rbp), %rax movl 0x4(%rax), %eax movl %eax, %edi movq -0x28(%rbp), %rax movl 0x4(%rax), %eax subq %rax, %rdi callq 0x763e0 movl %eax, -0x4(%rbp) jmp 0x758ff cmpl $0x0, -0x2c(%rbp) jne 0x75849 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x758ff cmpl $0x0, -0x30(%rbp) jne 0x7585b movl $0x1, -0x4(%rbp) jmp 0x758ff cmpl $0x3, -0x2c(%rbp) jne 0x7586d movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x758ff cmpl $0x3, -0x30(%rbp) jne 0x7587f movl $0x1, -0x4(%rbp) jmp 0x758ff movq -0x20(%rbp), %rax cmpl $0x4, (%rax) je 0x758c6 movq -0x28(%rbp), %rax cmpl $0x4, (%rax) je 0x758c6 movq -0x20(%rbp), %rax movzwl 0x8(%rax), %eax movq -0x28(%rbp), %rcx movzwl 0x8(%rcx), %ecx cmpl %ecx, %eax je 0x758c4 movq -0x20(%rbp), %rax movzwl 0x8(%rax), %eax movl %eax, %edi movq -0x28(%rbp), %rax movzwl 0x8(%rax), %eax subq %rax, %rdi callq 0x763e0 movl %eax, -0x4(%rbp) jmp 0x758ff jmp 0x758c6 cmpl $0x4, -0x2c(%rbp) jne 0x758d5 movl $0x1, -0x4(%rbp) jmp 0x758ff cmpl $0x4, -0x30(%rbp) jne 0x758e4 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x758ff movq -0x20(%rbp), %rax movl 0x4(%rax), %eax movl %eax, %edi movq -0x28(%rbp), %rax movl 0x4(%rax), %eax subq %rax, %rdi callq 0x763e0 movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax,%rax)
compare_columns: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_20], rax mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_28], rax mov rax, [rbp+var_20] cmp dword ptr [rax], 9 jnz short loc_75776 xor eax, eax mov [rbp+var_34], eax jmp short loc_7577F loc_75776: mov rax, [rbp+var_20] mov eax, [rax] mov [rbp+var_34], eax loc_7577F: mov eax, [rbp+var_34] mov [rbp+var_2C], eax mov rax, [rbp+var_28] cmp dword ptr [rax], 9 jnz short loc_75795 xor eax, eax mov [rbp+var_38], eax jmp short loc_7579E loc_75795: mov rax, [rbp+var_28] mov eax, [rax] mov [rbp+var_38], eax loc_7579E: mov eax, [rbp+var_38] mov [rbp+var_30], eax cmp [rbp+var_2C], 0 jnz short loc_757F3 mov rax, [rbp+var_20] cmp byte ptr [rax+12h], 0 jnz short loc_757F3 cmp [rbp+var_30], 0 jnz short loc_757C7 mov rax, [rbp+var_28] movzx eax, byte ptr [rax+12h] cmp eax, 0 jz short loc_757D3 loc_757C7: mov [rbp+var_4], 0FFFFFFFFh jmp loc_758FF loc_757D3: mov rax, [rbp+var_20] mov eax, [rax+4] mov edi, eax mov rax, [rbp+var_28] mov eax, [rax+4] sub rdi, rax call sign mov [rbp+var_4], eax jmp loc_758FF loc_757F3: cmp [rbp+var_30], 0 jnz short loc_7580F mov rax, [rbp+var_28] cmp byte ptr [rax+12h], 0 jnz short loc_7580F mov [rbp+var_4], 1 jmp loc_758FF loc_7580F: mov eax, [rbp+var_2C] cmp eax, [rbp+var_30] jnz short loc_75837 mov rax, [rbp+var_20] mov eax, [rax+4] mov edi, eax mov rax, [rbp+var_28] mov eax, [rax+4] sub rdi, rax call sign mov [rbp+var_4], eax jmp loc_758FF loc_75837: cmp [rbp+var_2C], 0 jnz short loc_75849 mov [rbp+var_4], 0FFFFFFFFh jmp loc_758FF loc_75849: cmp [rbp+var_30], 0 jnz short loc_7585B mov [rbp+var_4], 1 jmp loc_758FF loc_7585B: cmp [rbp+var_2C], 3 jnz short loc_7586D mov [rbp+var_4], 0FFFFFFFFh jmp loc_758FF loc_7586D: cmp [rbp+var_30], 3 jnz short loc_7587F mov [rbp+var_4], 1 jmp loc_758FF loc_7587F: mov rax, [rbp+var_20] cmp dword ptr [rax], 4 jz short loc_758C6 mov rax, [rbp+var_28] cmp dword ptr [rax], 4 jz short loc_758C6 mov rax, [rbp+var_20] movzx eax, word ptr [rax+8] mov rcx, [rbp+var_28] movzx ecx, word ptr [rcx+8] cmp eax, ecx jz short loc_758C4 mov rax, [rbp+var_20] movzx eax, word ptr [rax+8] mov edi, eax mov rax, [rbp+var_28] movzx eax, word ptr [rax+8] sub rdi, rax call sign mov [rbp+var_4], eax jmp short loc_758FF loc_758C4: jmp short $+2 loc_758C6: cmp [rbp+var_2C], 4 jnz short loc_758D5 mov [rbp+var_4], 1 jmp short loc_758FF loc_758D5: cmp [rbp+var_30], 4 jnz short loc_758E4 mov [rbp+var_4], 0FFFFFFFFh jmp short loc_758FF loc_758E4: mov rax, [rbp+var_20] mov eax, [rax+4] mov edi, eax mov rax, [rbp+var_28] mov eax, [rax+4] sub rdi, rax call sign mov [rbp+var_4], eax loc_758FF: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long compare_columns(_QWORD *a1, int **a2) { int v3; // [rsp+8h] [rbp-38h] int v4; // [rsp+Ch] [rbp-34h] int *v5; // [rsp+18h] [rbp-28h] _DWORD *v6; // [rsp+20h] [rbp-20h] v6 = (_DWORD *)*a1; v5 = *a2; if ( *(_DWORD *)*a1 == 9 ) v4 = 0; else v4 = *v6; if ( *v5 == 9 ) v3 = 0; else v3 = *v5; if ( v4 || *((_BYTE *)v6 + 18) ) { if ( !v3 && !*((_BYTE *)v5 + 18) ) return 1; if ( v4 != v3 ) { if ( !v4 ) return (unsigned int)-1; if ( !v3 ) return 1; if ( v4 == 3 ) return (unsigned int)-1; if ( v3 == 3 ) return 1; if ( *v6 != 4 && *v5 != 4 && *((unsigned __int16 *)v6 + 4) != *((unsigned __int16 *)v5 + 4) ) return (unsigned int)sign(*((unsigned __int16 *)v6 + 4) - (unsigned long long)*((unsigned __int16 *)v5 + 4)); if ( v4 == 4 ) return 1; if ( v3 == 4 ) return (unsigned int)-1; } return (unsigned int)sign((unsigned int)v6[1] - (unsigned long long)(unsigned int)v5[1]); } if ( !v3 && !*((_BYTE *)v5 + 18) ) return (unsigned int)sign((unsigned int)v6[1] - (unsigned long long)(unsigned int)v5[1]); return (unsigned int)-1; }
compare_columns: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX],0x9 JNZ 0x00175776 XOR EAX,EAX MOV dword ptr [RBP + -0x34],EAX JMP 0x0017577f LAB_00175776: MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x34],EAX LAB_0017577f: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x28] CMP dword ptr [RAX],0x9 JNZ 0x00175795 XOR EAX,EAX MOV dword ptr [RBP + -0x38],EAX JMP 0x0017579e LAB_00175795: MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x38],EAX LAB_0017579e: MOV EAX,dword ptr [RBP + -0x38] MOV dword ptr [RBP + -0x30],EAX CMP dword ptr [RBP + -0x2c],0x0 JNZ 0x001757f3 MOV RAX,qword ptr [RBP + -0x20] CMP byte ptr [RAX + 0x12],0x0 JNZ 0x001757f3 CMP dword ptr [RBP + -0x30],0x0 JNZ 0x001757c7 MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + 0x12] CMP EAX,0x0 JZ 0x001757d3 LAB_001757c7: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001758ff LAB_001757d3: MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x4] MOV EDI,EAX MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x4] SUB RDI,RAX CALL 0x001763e0 MOV dword ptr [RBP + -0x4],EAX JMP 0x001758ff LAB_001757f3: CMP dword ptr [RBP + -0x30],0x0 JNZ 0x0017580f MOV RAX,qword ptr [RBP + -0x28] CMP byte ptr [RAX + 0x12],0x0 JNZ 0x0017580f MOV dword ptr [RBP + -0x4],0x1 JMP 0x001758ff LAB_0017580f: MOV EAX,dword ptr [RBP + -0x2c] CMP EAX,dword ptr [RBP + -0x30] JNZ 0x00175837 MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x4] MOV EDI,EAX MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x4] SUB RDI,RAX CALL 0x001763e0 MOV dword ptr [RBP + -0x4],EAX JMP 0x001758ff LAB_00175837: CMP dword ptr [RBP + -0x2c],0x0 JNZ 0x00175849 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001758ff LAB_00175849: CMP dword ptr [RBP + -0x30],0x0 JNZ 0x0017585b MOV dword ptr [RBP + -0x4],0x1 JMP 0x001758ff LAB_0017585b: CMP dword ptr [RBP + -0x2c],0x3 JNZ 0x0017586d MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001758ff LAB_0017586d: CMP dword ptr [RBP + -0x30],0x3 JNZ 0x0017587f MOV dword ptr [RBP + -0x4],0x1 JMP 0x001758ff LAB_0017587f: MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX],0x4 JZ 0x001758c6 MOV RAX,qword ptr [RBP + -0x28] CMP dword ptr [RAX],0x4 JZ 0x001758c6 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x28] MOVZX ECX,word ptr [RCX + 0x8] CMP EAX,ECX JZ 0x001758c4 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX + 0x8] MOV EDI,EAX MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,word ptr [RAX + 0x8] SUB RDI,RAX CALL 0x001763e0 MOV dword ptr [RBP + -0x4],EAX JMP 0x001758ff LAB_001758c4: JMP 0x001758c6 LAB_001758c6: CMP dword ptr [RBP + -0x2c],0x4 JNZ 0x001758d5 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001758ff LAB_001758d5: CMP dword ptr [RBP + -0x30],0x4 JNZ 0x001758e4 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001758ff LAB_001758e4: MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x4] MOV EDI,EAX MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x4] SUB RDI,RAX CALL 0x001763e0 MOV dword ptr [RBP + -0x4],EAX LAB_001758ff: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int compare_columns(int8 *param_1,uchar *param_2,size_t *param_3,uchar *param_4,size_t param_5 ) { int *piVar1; int *piVar2; int local_40; int local_3c; int local_c; piVar1 = (int *)*param_1; piVar2 = *(int **)param_2; if (*piVar1 == 9) { local_3c = 0; } else { local_3c = *piVar1; } if (*piVar2 == 9) { local_40 = 0; } else { local_40 = *piVar2; } if ((local_3c == 0) && (*(char *)((long)piVar1 + 0x12) == '\0')) { if ((local_40 == 0) && (*(char *)((long)piVar2 + 0x12) == '\0')) { local_c = sign((EVP_PKEY_CTX *)((ulong)(uint)piVar1[1] - (ulong)(uint)piVar2[1]),param_2, param_3,param_4,param_5); } else { local_c = -1; } } else if ((local_40 == 0) && (*(char *)((long)piVar2 + 0x12) == '\0')) { local_c = 1; } else if (local_3c == local_40) { local_c = sign((EVP_PKEY_CTX *)((ulong)(uint)piVar1[1] - (ulong)(uint)piVar2[1]),param_2,param_3 ,param_4,param_5); } else if (local_3c == 0) { local_c = -1; } else if (local_40 == 0) { local_c = 1; } else if (local_3c == 3) { local_c = -1; } else if (local_40 == 3) { local_c = 1; } else if (((*piVar1 == 4) || (*piVar2 == 4)) || (param_4 = (uchar *)(ulong)*(ushort *)(piVar2 + 2), *(ushort *)(piVar1 + 2) == *(ushort *)(piVar2 + 2))) { if (local_3c == 4) { local_c = 1; } else if (local_40 == 4) { local_c = -1; } else { local_c = sign((EVP_PKEY_CTX *)((ulong)(uint)piVar1[1] - (ulong)(uint)piVar2[1]),param_2, param_3,param_4,param_5); } } else { local_c = sign((EVP_PKEY_CTX *)((ulong)*(ushort *)(piVar1 + 2) - (ulong)*(ushort *)(piVar2 + 2)) ,param_2,param_3,param_4,param_5); } return local_c; }
35,082
js_bytecode_function_mark
bluesky950520[P]quickjs/quickjs.c
static void js_bytecode_function_mark(JSRuntime *rt, JSValue val, JS_MarkFunc *mark_func) { JSObject *p = JS_VALUE_GET_OBJ(val); JSVarRef **var_refs = p->u.func.var_refs; JSFunctionBytecode *b = p->u.func.function_bytecode; int i; if (p->u.func.home_object) { JS_MarkValue(rt, JS_MKPTR(JS_TAG_OBJECT, p->u.func.home_object), mark_func); } if (b) { if (var_refs) { for(i = 0; i < b->closure_var_count; i++) { JSVarRef *var_ref = var_refs[i]; if (var_ref && var_ref->is_detached) { mark_func(rt, &var_ref->header); } } } /* must mark the function bytecode because template objects may be part of a cycle */ JS_MarkValue(rt, JS_MKPTR(JS_TAG_FUNCTION_BYTECODE, b), mark_func); } }
O0
c
js_bytecode_function_mark: subq $0x68, %rsp movq %rsi, 0x58(%rsp) movq %rdx, 0x60(%rsp) movq %rdi, 0x50(%rsp) movq %rcx, 0x48(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rax movq 0x38(%rax), %rax movq %rax, 0x38(%rsp) movq 0x40(%rsp), %rax movq 0x30(%rax), %rax movq %rax, 0x30(%rsp) movq 0x40(%rsp), %rax cmpq $0x0, 0x40(%rax) je 0x614ba movq 0x50(%rsp), %rdi movq 0x40(%rsp), %rax movq 0x40(%rax), %rax movq %rax, 0x18(%rsp) movq $-0x1, 0x20(%rsp) movq 0x48(%rsp), %rcx movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx callq 0x30ed0 cmpq $0x0, 0x30(%rsp) je 0x6155d cmpq $0x0, 0x38(%rsp) je 0x61533 movl $0x0, 0x2c(%rsp) movl 0x2c(%rsp), %eax movq 0x30(%rsp), %rcx cmpl 0x5c(%rcx), %eax jge 0x61531 movq 0x38(%rsp), %rax movslq 0x2c(%rsp), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x10(%rsp) cmpq $0x0, 0x10(%rsp) je 0x61522 movq 0x10(%rsp), %rax movb 0x5(%rax), %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x61522 movq 0x48(%rsp), %rax movq 0x50(%rsp), %rdi movq 0x10(%rsp), %rsi callq *%rax jmp 0x61524 movl 0x2c(%rsp), %eax addl $0x1, %eax movl %eax, 0x2c(%rsp) jmp 0x614d6 jmp 0x61533 movq 0x50(%rsp), %rdi movq 0x30(%rsp), %rax movq %rax, (%rsp) movq $-0x2, 0x8(%rsp) movq 0x48(%rsp), %rcx movq (%rsp), %rsi movq 0x8(%rsp), %rdx callq 0x30ed0 addq $0x68, %rsp retq nopw %cs:(%rax,%rax)
js_bytecode_function_mark: sub rsp, 68h mov [rsp+68h+var_10], rsi mov [rsp+68h+var_8], rdx mov [rsp+68h+var_18], rdi mov [rsp+68h+var_20], rcx mov rax, [rsp+68h+var_10] mov [rsp+68h+var_28], rax mov rax, [rsp+68h+var_28] mov rax, [rax+38h] mov [rsp+68h+var_30], rax mov rax, [rsp+68h+var_28] mov rax, [rax+30h] mov [rsp+68h+var_38], rax mov rax, [rsp+68h+var_28] cmp qword ptr [rax+40h], 0 jz short loc_614BA mov rdi, [rsp+68h+var_18] mov rax, [rsp+68h+var_28] mov rax, [rax+40h] mov [rsp+68h+var_50], rax mov [rsp+68h+var_48], 0FFFFFFFFFFFFFFFFh mov rcx, [rsp+68h+var_20] mov rsi, [rsp+68h+var_50] mov rdx, [rsp+68h+var_48] call JS_MarkValue loc_614BA: cmp [rsp+68h+var_38], 0 jz loc_6155D cmp [rsp+68h+var_30], 0 jz short loc_61533 mov [rsp+68h+var_3C], 0 loc_614D6: mov eax, [rsp+68h+var_3C] mov rcx, [rsp+68h+var_38] cmp eax, [rcx+5Ch] jge short loc_61531 mov rax, [rsp+68h+var_30] movsxd rcx, [rsp+68h+var_3C] mov rax, [rax+rcx*8] mov [rsp+68h+var_58], rax cmp [rsp+68h+var_58], 0 jz short loc_61522 mov rax, [rsp+68h+var_58] mov al, [rax+5] and al, 1 movzx eax, al cmp eax, 0 jz short loc_61522 mov rax, [rsp+68h+var_20] mov rdi, [rsp+68h+var_18] mov rsi, [rsp+68h+var_58] call rax loc_61522: jmp short $+2 loc_61524: mov eax, [rsp+68h+var_3C] add eax, 1 mov [rsp+68h+var_3C], eax jmp short loc_614D6 loc_61531: jmp short $+2 loc_61533: mov rdi, [rsp+68h+var_18] mov rax, [rsp+68h+var_38] mov [rsp+68h+var_68], rax mov [rsp+68h+var_60], 0FFFFFFFFFFFFFFFEh mov rcx, [rsp+68h+var_20] mov rsi, [rsp+68h+var_68] mov rdx, [rsp+68h+var_60] call JS_MarkValue loc_6155D: add rsp, 68h retn
long long js_bytecode_function_mark( long long a1, _QWORD *a2, long long a3, long long ( *a4)(long long, long long)) { long long result; // rax long long v5; // [rsp+10h] [rbp-58h] int i; // [rsp+2Ch] [rbp-3Ch] long long v7; // [rsp+30h] [rbp-38h] long long v8; // [rsp+38h] [rbp-30h] v8 = a2[7]; v7 = a2[6]; result = (long long)a2; if ( a2[8] ) result = JS_MarkValue(a1, a2[8], -1LL, a4); if ( v7 ) { if ( v8 ) { for ( i = 0; i < *(_DWORD *)(v7 + 92); ++i ) { v5 = *(_QWORD *)(v8 + 8LL * i); if ( v5 ) { if ( (*(_BYTE *)(v5 + 5) & 1) != 0 ) a4(a1, v5); } } } return JS_MarkValue(a1, v7, -2LL, a4); } return result; }
js_bytecode_function_mark: SUB RSP,0x68 MOV qword ptr [RSP + 0x58],RSI MOV qword ptr [RSP + 0x60],RDX MOV qword ptr [RSP + 0x50],RDI MOV qword ptr [RSP + 0x48],RCX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x40] CMP qword ptr [RAX + 0x40],0x0 JZ 0x001614ba MOV RDI,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],-0x1 MOV RCX,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] CALL 0x00130ed0 LAB_001614ba: CMP qword ptr [RSP + 0x30],0x0 JZ 0x0016155d CMP qword ptr [RSP + 0x38],0x0 JZ 0x00161533 MOV dword ptr [RSP + 0x2c],0x0 LAB_001614d6: MOV EAX,dword ptr [RSP + 0x2c] MOV RCX,qword ptr [RSP + 0x30] CMP EAX,dword ptr [RCX + 0x5c] JGE 0x00161531 MOV RAX,qword ptr [RSP + 0x38] MOVSXD RCX,dword ptr [RSP + 0x2c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x10],RAX CMP qword ptr [RSP + 0x10],0x0 JZ 0x00161522 MOV RAX,qword ptr [RSP + 0x10] MOV AL,byte ptr [RAX + 0x5] AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x00161522 MOV RAX,qword ptr [RSP + 0x48] MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x10] CALL RAX LAB_00161522: JMP 0x00161524 LAB_00161524: MOV EAX,dword ptr [RSP + 0x2c] ADD EAX,0x1 MOV dword ptr [RSP + 0x2c],EAX JMP 0x001614d6 LAB_00161531: JMP 0x00161533 LAB_00161533: MOV RDI,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],-0x2 MOV RCX,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] CALL 0x00130ed0 LAB_0016155d: ADD RSP,0x68 RET
void js_bytecode_function_mark(int8 param_1,long param_2,int8 param_3,code *param_4) { long lVar1; long lVar2; long lVar3; int local_3c; lVar1 = *(long *)(param_2 + 0x38); lVar2 = *(long *)(param_2 + 0x30); if (*(long *)(param_2 + 0x40) != 0) { JS_MarkValue(param_1,*(int8 *)(param_2 + 0x40),0xffffffffffffffff,param_4); } if (lVar2 != 0) { if (lVar1 != 0) { for (local_3c = 0; local_3c < *(int *)(lVar2 + 0x5c); local_3c = local_3c + 1) { lVar3 = *(long *)(lVar1 + (long)local_3c * 8); if ((lVar3 != 0) && ((*(byte *)(lVar3 + 5) & 1) != 0)) { (*param_4)(param_1,lVar3); } } } JS_MarkValue(param_1,lVar2,0xfffffffffffffffe,param_4); } return; }
35,083
js_bytecode_function_mark
bluesky950520[P]quickjs/quickjs.c
static void js_bytecode_function_mark(JSRuntime *rt, JSValue val, JS_MarkFunc *mark_func) { JSObject *p = JS_VALUE_GET_OBJ(val); JSVarRef **var_refs = p->u.func.var_refs; JSFunctionBytecode *b = p->u.func.function_bytecode; int i; if (p->u.func.home_object) { JS_MarkValue(rt, JS_MKPTR(JS_TAG_OBJECT, p->u.func.home_object), mark_func); } if (b) { if (var_refs) { for(i = 0; i < b->closure_var_count; i++) { JSVarRef *var_ref = var_refs[i]; if (var_ref && var_ref->is_detached) { mark_func(rt, &var_ref->header); } } } /* must mark the function bytecode because template objects may be part of a cycle */ JS_MarkValue(rt, JS_MKPTR(JS_TAG_FUNCTION_BYTECODE, b), mark_func); } }
O2
c
js_bytecode_function_mark: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdi, %r14 movq 0x30(%rsi), %rbx movq 0x38(%rsi), %r15 movq 0x40(%rsi), %rsi testq %rsi, %rsi movq %rcx, %r13 je 0x3758e movq %r14, %rdi callq *%r13 movq %r13, %rcx testq %rbx, %rbx je 0x375d2 testq %r15, %r15 je 0x375c1 xorl %r12d, %r12d movslq 0x5c(%rbx), %rax cmpq %rax, %r12 jge 0x375c1 movq (%r15,%r12,8), %rsi testq %rsi, %rsi je 0x375bc testb $0x1, 0x5(%rsi) je 0x375bc movq %r14, %rdi callq *%r13 movq %r13, %rcx incq %r12 jmp 0x3759b movq %r14, %rdi movq %rbx, %rsi popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmpq *%rcx popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
js_bytecode_function_mark: push r15 push r14 push r13 push r12 push rbx mov r14, rdi mov rbx, [rsi+30h] mov r15, [rsi+38h] mov rsi, [rsi+40h] test rsi, rsi mov r13, rcx jz short loc_3758E mov rdi, r14 call r13 mov rcx, r13 loc_3758E: test rbx, rbx jz short loc_375D2 test r15, r15 jz short loc_375C1 xor r12d, r12d loc_3759B: movsxd rax, dword ptr [rbx+5Ch] cmp r12, rax jge short loc_375C1 mov rsi, [r15+r12*8] test rsi, rsi jz short loc_375BC test byte ptr [rsi+5], 1 jz short loc_375BC mov rdi, r14 call r13 mov rcx, r13 loc_375BC: inc r12 jmp short loc_3759B loc_375C1: mov rdi, r14 mov rsi, rbx pop rbx pop r12 pop r13 pop r14 pop r15 jmp rcx loc_375D2: pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long js_bytecode_function_mark(long long a1, _QWORD *a2, long long a3, void ( *a4)(_QWORD)) { long long v4; // rbx long long v5; // r15 void ( *v6)(_QWORD); // r13 long long result; // rax long long i; // r12 long long v9; // rsi v4 = a2[6]; v5 = a2[7]; v6 = a4; if ( a2[8] ) { result = ((long long ( *)(long long))a4)(a1); a4 = v6; } if ( v4 ) { if ( v5 ) { for ( i = 0LL; i < *(int *)(v4 + 92); ++i ) { v9 = *(_QWORD *)(v5 + 8 * i); if ( v9 ) { if ( (*(_BYTE *)(v9 + 5) & 1) != 0 ) { v6(a1); a4 = v6; } } } } return ((long long ( *)(long long, long long))a4)(a1, v4); } return result; }
js_bytecode_function_mark: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R14,RDI MOV RBX,qword ptr [RSI + 0x30] MOV R15,qword ptr [RSI + 0x38] MOV RSI,qword ptr [RSI + 0x40] TEST RSI,RSI MOV R13,RCX JZ 0x0013758e MOV RDI,R14 CALL R13 MOV RCX,R13 LAB_0013758e: TEST RBX,RBX JZ 0x001375d2 TEST R15,R15 JZ 0x001375c1 XOR R12D,R12D LAB_0013759b: MOVSXD RAX,dword ptr [RBX + 0x5c] CMP R12,RAX JGE 0x001375c1 MOV RSI,qword ptr [R15 + R12*0x8] TEST RSI,RSI JZ 0x001375bc TEST byte ptr [RSI + 0x5],0x1 JZ 0x001375bc MOV RDI,R14 CALL R13 MOV RCX,R13 LAB_001375bc: INC R12 JMP 0x0013759b LAB_001375c1: MOV RDI,R14 MOV RSI,RBX POP RBX POP R12 POP R13 POP R14 POP R15 JMP RCX LAB_001375d2: POP RBX POP R12 POP R13 POP R14 POP R15 RET
void js_bytecode_function_mark (int8 param_1,long param_2,int8 param_3,code *UNRECOVERED_JUMPTABLE) { long lVar1; long lVar2; long lVar3; int8 extraout_RDX; int8 extraout_RDX_00; long lVar4; lVar1 = *(long *)(param_2 + 0x30); lVar2 = *(long *)(param_2 + 0x38); if (*(long *)(param_2 + 0x40) != 0) { (*UNRECOVERED_JUMPTABLE)(param_1); param_3 = extraout_RDX; } if (lVar1 != 0) { if (lVar2 != 0) { for (lVar4 = 0; lVar4 < *(int *)(lVar1 + 0x5c); lVar4 = lVar4 + 1) { lVar3 = *(long *)(lVar2 + lVar4 * 8); if ((lVar3 != 0) && ((*(byte *)(lVar3 + 5) & 1) != 0)) { (*UNRECOVERED_JUMPTABLE)(param_1); param_3 = extraout_RDX_00; } } } /* WARNING: Could not recover jumptable at 0x001375d0. Too many branches */ /* WARNING: Treating indirect jump as call */ (*UNRECOVERED_JUMPTABLE)(param_1,lVar1,param_3,UNRECOVERED_JUMPTABLE); return; } return; }
35,084
rak_string_new_copy
fabiosvm[P]rak/src/string.c
RakString *rak_string_new_copy(RakString *str, RakError *err) { int len = rak_string_len(str); RakString *_str = rak_string_new_with_capacity(len, err); if (!rak_is_ok(err)) return NULL; memcpy(rak_string_chars(_str), rak_string_chars(str), len); _str->slice.len = len; return _str; }
O3
c
rak_string_new_copy: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r15 movq %rdi, %r14 movl 0xc(%rdi), %ebp movl %ebp, %edi callq 0x7e25 cmpb $0x1, (%r15) jne 0x7f1d movq %rax, %rbx movslq %ebp, %rdx movq 0x10(%rax), %rdi movq 0x10(%r14), %rsi callq 0x2100 movl %ebp, 0xc(%rbx) jmp 0x7f1f xorl %ebx, %ebx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
rak_string_new_copy: push rbp push r15 push r14 push rbx push rax mov r15, rsi mov r14, rdi mov ebp, [rdi+0Ch] mov edi, ebp call rak_string_new_with_capacity cmp byte ptr [r15], 1 jnz short loc_7F1D mov rbx, rax movsxd rdx, ebp mov rdi, [rax+10h] mov rsi, [r14+10h] call _memcpy mov [rbx+0Ch], ebp jmp short loc_7F1F loc_7F1D: xor ebx, ebx loc_7F1F: mov rax, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long rak_string_new_copy(long long a1, _BYTE *a2) { int v2; // ebp long long v3; // rax long long v4; // rbx v2 = *(_DWORD *)(a1 + 12); v3 = rak_string_new_with_capacity(v2, a2); if ( *a2 != 1 ) return 0LL; v4 = v3; memcpy(*(_QWORD *)(v3 + 16), *(_QWORD *)(a1 + 16), v2); *(_DWORD *)(v4 + 12) = v2; return v4; }
rak_string_new_copy: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R15,RSI MOV R14,RDI MOV EBP,dword ptr [RDI + 0xc] MOV EDI,EBP CALL 0x00107e25 CMP byte ptr [R15],0x1 JNZ 0x00107f1d MOV RBX,RAX MOVSXD RDX,EBP MOV RDI,qword ptr [RAX + 0x10] MOV RSI,qword ptr [R14 + 0x10] CALL 0x00102100 MOV dword ptr [RBX + 0xc],EBP JMP 0x00107f1f LAB_00107f1d: XOR EBX,EBX LAB_00107f1f: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
long rak_string_new_copy(long param_1,char *param_2) { int iVar1; long lVar2; iVar1 = *(int *)(param_1 + 0xc); lVar2 = rak_string_new_with_capacity(iVar1); if (*param_2 == '\x01') { memcpy(*(void **)(lVar2 + 0x10),*(void **)(param_1 + 0x10),(long)iVar1); *(int *)(lVar2 + 0xc) = iVar1; } else { lVar2 = 0; } return lVar2; }
35,085
my_copy_fix_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static size_t my_copy_fix_mb2_or_mb4(CHARSET_INFO *cs, char *dst, size_t dst_length, const char *src, size_t src_length, size_t nchars, MY_STRCOPY_STATUS *status) { size_t length2, src_offset= src_length % cs->mbminlen; my_char_copy_status_t padstatus; if (!src_offset) return my_copy_fix_mb(cs, dst, dst_length, src, src_length, nchars, status); if ((padstatus= my_copy_incomplete_char(cs, dst, dst_length, src, src_length, nchars, TRUE)) == MY_CHAR_COPY_ERROR) { status->m_source_end_pos= status->m_well_formed_error_pos= src; return 0; } length2= my_copy_fix_mb(cs, dst + cs->mbminlen, dst_length - cs->mbminlen, src + src_offset, src_length - src_offset, nchars - 1, status); if (padstatus == MY_CHAR_COPY_FIXED) status->m_well_formed_error_pos= src; return cs->mbminlen /* The left-padded character */ + length2; }
O3
c
my_copy_fix_mb2_or_mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rcx, %r12 movq %rdx, %r10 movq %rsi, %rbx movq %rdi, %r14 movl 0x98(%rdi), %r13d movq %r8, %rax xorl %edx, %edx divq %r13 testq %rdx, %rdx je 0xc9641 cmpq %r10, %r13 seta %al movq 0x10(%rbp), %rsi testq %r9, %r9 sete %cl orb %al, %cl jne 0xc96d0 movq %rdx, %r15 movq %rsi, -0x38(%rbp) movq %r10, -0x40(%rbp) movq %r8, -0x48(%rbp) movq %r9, -0x50(%rbp) subq %rdx, %r13 movq %rbx, %rdi xorl %esi, %esi movq %r13, %rdx callq 0x2a290 addq %rbx, %r13 movq %r13, %rdi movq %r12, -0x58(%rbp) movq %r12, %rsi movq %r15, %rdx callq 0x2a130 movl 0x98(%r14), %edx addq %rbx, %rdx movq 0xb8(%r14), %rax movq %r14, %rdi movq %rbx, %rsi callq *0xc0(%rax) movl 0x98(%r14), %r13d cmpl %r13d, %eax movl %eax, -0x2c(%rbp) jne 0xc9660 movq -0x58(%rbp), %r12 movq -0x50(%rbp), %r9 movq -0x48(%rbp), %r8 movq -0x40(%rbp), %rdx movq -0x38(%rbp), %rsi jmp 0xc9696 movq %r14, %rdi movq %rbx, %rsi movq %r10, %rdx movq %r12, %rcx addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xb861a movq 0xb8(%r14), %rax leaq (%rbx,%r13), %rcx movl $0x3f, %esi movq %r14, %rdi movq %rbx, %rdx callq *0x30(%rax) cmpl 0x98(%r14), %eax movq -0x58(%rbp), %r12 movq -0x50(%rbp), %r9 movq -0x48(%rbp), %r8 movq -0x40(%rbp), %rdx movq -0x38(%rbp), %rsi jne 0xc96d0 movl %eax, %eax addq %rax, %rbx subq %rax, %rdx leaq (%r12,%r15), %rcx subq %r15, %r8 decq %r9 movq %rsi, (%rsp) movq %r14, %rdi movq %rsi, %r15 movq %rbx, %rsi callq 0xb861a cmpl %r13d, -0x2c(%rbp) je 0xc96c4 movq %r12, 0x8(%r15) movl 0x98(%r14), %ecx addq %rcx, %rax jmp 0xc96d9 movq %r12, 0x8(%rsi) movq %r12, (%rsi) xorl %eax, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_copy_fix_mb2_or_mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r12, rcx mov r10, rdx mov rbx, rsi mov r14, rdi mov r13d, [rdi+98h] mov rax, r8 xor edx, edx div r13 test rdx, rdx jz loc_C9641 cmp r13, r10 setnbe al mov rsi, [rbp+arg_0] test r9, r9 setz cl or cl, al jnz loc_C96D0 mov r15, rdx mov [rbp+var_38], rsi mov [rbp+var_40], r10 mov [rbp+var_48], r8 mov [rbp+var_50], r9 sub r13, rdx mov rdi, rbx xor esi, esi mov rdx, r13 call _memset add r13, rbx mov rdi, r13 mov [rbp+var_58], r12 mov rsi, r12 mov rdx, r15 call _memmove mov edx, [r14+98h] add rdx, rbx mov rax, [r14+0B8h] mov rdi, r14 mov rsi, rbx call qword ptr [rax+0C0h] mov r13d, [r14+98h] cmp eax, r13d mov [rbp+var_2C], eax jnz short loc_C9660 mov r12, [rbp+var_58] mov r9, [rbp+var_50] mov r8, [rbp+var_48] mov rdx, [rbp+var_40] mov rsi, [rbp+var_38] jmp short loc_C9696 loc_C9641: mov rdi, r14 mov rsi, rbx mov rdx, r10 mov rcx, r12 add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp my_copy_fix_mb loc_C9660: mov rax, [r14+0B8h] lea rcx, [rbx+r13] mov esi, 3Fh ; '?' mov rdi, r14 mov rdx, rbx call qword ptr [rax+30h] cmp eax, [r14+98h] mov r12, [rbp+var_58] mov r9, [rbp+var_50] mov r8, [rbp+var_48] mov rdx, [rbp+var_40] mov rsi, [rbp+var_38] jnz short loc_C96D0 loc_C9696: mov eax, eax add rbx, rax sub rdx, rax lea rcx, [r12+r15] sub r8, r15 dec r9 mov [rsp+60h+var_60], rsi mov rdi, r14 mov r15, rsi mov rsi, rbx call my_copy_fix_mb cmp [rbp+var_2C], r13d jz short loc_C96C4 mov [r15+8], r12 loc_C96C4: mov ecx, [r14+98h] add rax, rcx jmp short loc_C96D9 loc_C96D0: mov [rsi+8], r12 mov [rsi], r12 xor eax, eax loc_C96D9: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long my_copy_fix_mb2_or_mb4( long long a1, long long a2, unsigned long long a3, long long a4, unsigned long long a5, long long a6, unsigned long long *a7) { unsigned long long v9; // r13 unsigned long long *v10; // rsi unsigned long long v11; // r15 unsigned long long v12; // r13 unsigned int v13; // eax long long v14; // r13 long long v15; // r9 unsigned long long v16; // r8 unsigned long long v17; // rdx unsigned long long fixed; // rax unsigned int v23; // [rsp+34h] [rbp-2Ch] v9 = *(unsigned int *)(a1 + 152); if ( !(a5 % v9) ) return my_copy_fix_mb(a1, a2, a3, a4, a5, a6, a7); v10 = a7; if ( v9 > a3 || a6 == 0 ) goto LABEL_10; v11 = a5 % *(unsigned int *)(a1 + 152); v12 = v9 - a5 % v9; memset(a2, 0LL, v12); memmove(a2 + v12, a4, v11); v13 = (*(long long ( **)(long long, long long, long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, a2, a2 + *(unsigned int *)(a1 + 152)); v14 = *(unsigned int *)(a1 + 152); v23 = v13; if ( v13 != (_DWORD)v14 ) { v13 = (*(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a1 + 184) + 48LL))( a1, 63LL, a2, a2 + v14); v15 = a6; v16 = a5; v17 = a3; v10 = a7; if ( v13 == *(_DWORD *)(a1 + 152) ) goto LABEL_7; LABEL_10: v10[1] = a4; *v10 = a4; return 0LL; } v15 = a6; v16 = a5; v17 = a3; v10 = a7; LABEL_7: fixed = my_copy_fix_mb(a1, v13 + a2, v17 - v13, a4 + v11, v16 - v11, v15 - 1, v10); if ( v23 != (_DWORD)v14 ) v10[1] = a4; return *(unsigned int *)(a1 + 152) + fixed; }
my_copy_fix_mb2_or_mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R12,RCX MOV R10,RDX MOV RBX,RSI MOV R14,RDI MOV R13D,dword ptr [RDI + 0x98] MOV RAX,R8 XOR EDX,EDX DIV R13 TEST RDX,RDX JZ 0x001c9641 CMP R13,R10 SETA AL MOV RSI,qword ptr [RBP + 0x10] TEST R9,R9 SETZ CL OR CL,AL JNZ 0x001c96d0 MOV R15,RDX MOV qword ptr [RBP + -0x38],RSI MOV qword ptr [RBP + -0x40],R10 MOV qword ptr [RBP + -0x48],R8 MOV qword ptr [RBP + -0x50],R9 SUB R13,RDX MOV RDI,RBX XOR ESI,ESI MOV RDX,R13 CALL 0x0012a290 ADD R13,RBX MOV RDI,R13 MOV qword ptr [RBP + -0x58],R12 MOV RSI,R12 MOV RDX,R15 CALL 0x0012a130 MOV EDX,dword ptr [R14 + 0x98] ADD RDX,RBX MOV RAX,qword ptr [R14 + 0xb8] MOV RDI,R14 MOV RSI,RBX CALL qword ptr [RAX + 0xc0] MOV R13D,dword ptr [R14 + 0x98] CMP EAX,R13D MOV dword ptr [RBP + -0x2c],EAX JNZ 0x001c9660 MOV R12,qword ptr [RBP + -0x58] MOV R9,qword ptr [RBP + -0x50] MOV R8,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x38] JMP 0x001c9696 LAB_001c9641: MOV RDI,R14 MOV RSI,RBX MOV RDX,R10 MOV RCX,R12 ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001b861a LAB_001c9660: MOV RAX,qword ptr [R14 + 0xb8] LEA RCX,[RBX + R13*0x1] MOV ESI,0x3f MOV RDI,R14 MOV RDX,RBX CALL qword ptr [RAX + 0x30] CMP EAX,dword ptr [R14 + 0x98] MOV R12,qword ptr [RBP + -0x58] MOV R9,qword ptr [RBP + -0x50] MOV R8,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x38] JNZ 0x001c96d0 LAB_001c9696: MOV EAX,EAX ADD RBX,RAX SUB RDX,RAX LEA RCX,[R12 + R15*0x1] SUB R8,R15 DEC R9 MOV qword ptr [RSP],RSI MOV RDI,R14 MOV R15,RSI MOV RSI,RBX CALL 0x001b861a CMP dword ptr [RBP + -0x2c],R13D JZ 0x001c96c4 MOV qword ptr [R15 + 0x8],R12 LAB_001c96c4: MOV ECX,dword ptr [R14 + 0x98] ADD RAX,RCX JMP 0x001c96d9 LAB_001c96d0: MOV qword ptr [RSI + 0x8],R12 MOV qword ptr [RSI],R12 XOR EAX,EAX LAB_001c96d9: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_copy_fix_mb2_or_mb4 (long param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,long param_6, int8 *param_7) { uint uVar1; uint uVar2; uint uVar3; long lVar4; ulong __n; ulong uVar5; uVar5 = (ulong)*(uint *)(param_1 + 0x98); __n = param_5 % uVar5; if (__n == 0) { lVar4 = my_copy_fix_mb(param_1,param_2,param_3,param_4); return lVar4; } if (param_6 != 0 && uVar5 <= param_3) { memset(param_2,0,uVar5 - __n); memmove((void *)((uVar5 - __n) + (long)param_2),param_4,__n); uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0)) (param_1,param_2,(ulong)*(uint *)(param_1 + 0x98) + (long)param_2); uVar1 = *(uint *)(param_1 + 0x98); uVar3 = uVar2; if ((uVar2 == uVar1) || (uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30)) (param_1,0x3f,param_2,(long)param_2 + (ulong)uVar1), uVar3 == *(uint *)(param_1 + 0x98))) { lVar4 = my_copy_fix_mb(param_1,(long)param_2 + (ulong)uVar3,param_3 - uVar3, (long)param_4 + __n,param_5 - __n,param_6 + -1,param_7); if (uVar2 != uVar1) { param_7[1] = param_4; } return lVar4 + (ulong)*(uint *)(param_1 + 0x98); } } param_7[1] = param_4; *param_7 = param_4; return 0; }
35,086
my_realloc
eloqsql/mysys/my_malloc.c
void *my_realloc(PSI_memory_key key, void *old_point, size_t size, myf my_flags) { my_memory_header *old_mh, *mh; void *point; size_t old_size; my_bool old_flags; DBUG_ENTER("my_realloc"); DBUG_PRINT("my",("ptr: %p size: %zu flags: %lu", old_point, size, my_flags)); DBUG_ASSERT(size > 0); if (!old_point && (my_flags & MY_ALLOW_ZERO_PTR)) DBUG_RETURN(my_malloc(key, size, my_flags)); old_mh= USER_TO_HEADER(old_point); old_size= old_mh->m_size & ~1; old_flags= old_mh->m_size & 1; DBUG_ASSERT(old_mh->m_key == key || old_mh->m_key == PSI_NOT_INSTRUMENTED); DBUG_ASSERT(old_flags == MY_TEST(my_flags & MY_THREAD_SPECIFIC)); size= ALIGN_SIZE(size); mh= sf_realloc(old_mh, size + HEADER_SIZE, my_flags); if (mh == NULL) { if (size < old_size) DBUG_RETURN(old_point); my_errno=errno; if (my_flags & MY_FREE_ON_ERROR) { /* my_free will take care of size accounting */ my_free(old_point); old_point= 0; } if (my_flags & (MY_FAE+MY_WME)) my_error(EE_OUTOFMEMORY, MYF(ME_BELL + ME_FATAL), size); point= NULL; } else { mh->m_size= size | old_flags; mh->m_key= PSI_CALL_memory_realloc(key, old_size, size, & mh->m_owner); update_malloc_size((longlong)size - (longlong)old_size, old_flags); point= HEADER_TO_USER(mh); } DBUG_PRINT("exit",("ptr: %p", point)); DBUG_RETURN(point); }
O0
c
my_realloc: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl %edi, -0xc(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) jmp 0x2f749 jmp 0x2f74b jmp 0x2f74d cmpq $0x0, -0x18(%rbp) jne 0x2f77d movq -0x28(%rbp), %rax andq $0x40, %rax cmpq $0x0, %rax je 0x2f77d jmp 0x2f764 movl -0xc(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x2f560 movq %rax, -0x8(%rbp) jmp 0x2f8c7 movq -0x18(%rbp), %rax addq $-0x18, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq 0x8(%rax), %rax andq $-0x2, %rax movq %rax, -0x48(%rbp) movq -0x30(%rbp), %rax movq 0x8(%rax), %rax andq $0x1, %rax movb %al, -0x49(%rbp) jmp 0x2f7aa jmp 0x2f7ac jmp 0x2f7ae movq -0x20(%rbp), %rax addq $0x8, %rax subq $0x1, %rax andq $-0x8, %rax movq %rax, -0x20(%rbp) movq -0x30(%rbp), %rdi movq -0x20(%rbp), %rsi addq $0x18, %rsi callq 0x24540 movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) jne 0x2f859 movq -0x20(%rbp), %rax cmpq -0x48(%rbp), %rax jae 0x2f7f7 jmp 0x2f7ea movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x2f8c7 callq 0x24050 movl (%rax), %eax movl %eax, -0x50(%rbp) callq 0x26770 movl -0x50(%rbp), %ecx movl %ecx, (%rax) movq -0x28(%rbp), %rax andq $0x80, %rax cmpq $0x0, %rax je 0x2f82c movq -0x18(%rbp), %rdi callq 0x2f8e0 movq $0x0, -0x18(%rbp) movq -0x28(%rbp), %rax andq $0x18, %rax cmpq $0x0, %rax je 0x2f84f movq -0x20(%rbp), %rdx movl $0x5, %edi movl $0x1004, %esi # imm = 0x1004 movb $0x0, %al callq 0x2e6e0 movq $0x0, -0x40(%rbp) jmp 0x2f8b9 movq -0x20(%rbp), %rcx movsbq -0x49(%rbp), %rax orq %rax, %rcx movq -0x38(%rbp), %rax movq %rcx, 0x8(%rax) leaq 0x19ecbc(%rip), %rax # 0x1ce530 movq (%rax), %rax movq 0x3e8(%rax), %rax movl -0xc(%rbp), %edi movq -0x48(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x38(%rbp), %rcx callq *%rax movl %eax, %ecx movq -0x38(%rbp), %rax movl %ecx, 0x10(%rax) movq 0x19f1c9(%rip), %rax # 0x1cea68 movq -0x20(%rbp), %rdi subq -0x48(%rbp), %rdi movsbl -0x49(%rbp), %esi callq *%rax movq -0x38(%rbp), %rax addq $0x18, %rax movq %rax, -0x40(%rbp) jmp 0x2f8bb jmp 0x2f8bd jmp 0x2f8bf movq -0x40(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_realloc: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_C], edi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx jmp short $+2 loc_2F749: jmp short $+2 loc_2F74B: jmp short $+2 loc_2F74D: cmp [rbp+var_18], 0 jnz short loc_2F77D mov rax, [rbp+var_28] and rax, 40h cmp rax, 0 jz short loc_2F77D jmp short $+2 loc_2F764: mov edi, [rbp+var_C] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] call my_malloc mov [rbp+var_8], rax jmp loc_2F8C7 loc_2F77D: mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFE8h mov [rbp+var_30], rax mov rax, [rbp+var_30] mov rax, [rax+8] and rax, 0FFFFFFFFFFFFFFFEh mov [rbp+var_48], rax mov rax, [rbp+var_30] mov rax, [rax+8] and rax, 1 mov [rbp+var_49], al jmp short $+2 loc_2F7AA: jmp short $+2 loc_2F7AC: jmp short $+2 loc_2F7AE: mov rax, [rbp+var_20] add rax, 8 sub rax, 1 and rax, 0FFFFFFFFFFFFFFF8h mov [rbp+var_20], rax mov rdi, [rbp+var_30] mov rsi, [rbp+var_20] add rsi, 18h call _realloc mov [rbp+var_38], rax cmp [rbp+var_38], 0 jnz short loc_2F859 mov rax, [rbp+var_20] cmp rax, [rbp+var_48] jnb short loc_2F7F7 jmp short $+2 loc_2F7EA: mov rax, [rbp+var_18] mov [rbp+var_8], rax jmp loc_2F8C7 loc_2F7F7: call ___errno_location mov eax, [rax] mov [rbp+var_50], eax call _my_thread_var mov ecx, [rbp+var_50] mov [rax], ecx mov rax, [rbp+var_28] and rax, 80h cmp rax, 0 jz short loc_2F82C mov rdi, [rbp+var_18] call my_free mov [rbp+var_18], 0 loc_2F82C: mov rax, [rbp+var_28] and rax, 18h cmp rax, 0 jz short loc_2F84F mov rdx, [rbp+var_20] mov edi, 5 mov esi, 1004h mov al, 0 call my_error loc_2F84F: mov [rbp+var_40], 0 jmp short loc_2F8B9 loc_2F859: mov rcx, [rbp+var_20] movsx rax, [rbp+var_49] or rcx, rax mov rax, [rbp+var_38] mov [rax+8], rcx lea rax, PSI_server mov rax, [rax] mov rax, [rax+3E8h] mov edi, [rbp+var_C] mov rsi, [rbp+var_48] mov rdx, [rbp+var_20] mov rcx, [rbp+var_38] call rax mov ecx, eax mov rax, [rbp+var_38] mov [rax+10h], ecx mov rax, cs:update_malloc_size mov rdi, [rbp+var_20] sub rdi, [rbp+var_48] movsx esi, [rbp+var_49] call rax ; dummy mov rax, [rbp+var_38] add rax, 18h mov [rbp+var_40], rax loc_2F8B9: jmp short $+2 loc_2F8BB: jmp short $+2 loc_2F8BD: jmp short $+2 loc_2F8BF: mov rax, [rbp+var_40] mov [rbp+var_8], rax loc_2F8C7: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
long long my_realloc(unsigned int a1, long long a2, unsigned long long a3, char a4) { int v5; // [rsp+0h] [rbp-50h] char v6; // [rsp+7h] [rbp-49h] unsigned long long v7; // [rsp+8h] [rbp-48h] long long v9; // [rsp+18h] [rbp-38h] unsigned long long v11; // [rsp+30h] [rbp-20h] if ( a2 || (a4 & 0x40) == 0 ) { v7 = *(_QWORD *)(a2 - 24 + 8) & 0xFFFFFFFFFFFFFFFELL; v6 = *(_BYTE *)(a2 - 24 + 8) & 1; v11 = (a3 + 7) & 0xFFFFFFFFFFFFFFF8LL; v9 = realloc(a2 - 24, v11 + 24); if ( v9 ) { *(_QWORD *)(v9 + 8) = v6 | v11; *(_DWORD *)(v9 + 16) = ((long long ( *)(_QWORD, unsigned long long, unsigned long long, long long))PSI_server[125])( a1, v7, v11, v9); ((void ( *)(long long, char))update_malloc_size[0])(v11 - v7, v6); return v9 + 24; } else { if ( v11 < v7 ) return a2; v5 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var() = v5; if ( a4 < 0 ) my_free(a2); if ( (a4 & 0x18) != 0 ) my_error(5u, 4100LL, v11); return 0LL; } } return my_malloc(a1, a3, a4); }
my_realloc: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV dword ptr [RBP + -0xc],EDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX JMP 0x0012f749 LAB_0012f749: JMP 0x0012f74b LAB_0012f74b: JMP 0x0012f74d LAB_0012f74d: CMP qword ptr [RBP + -0x18],0x0 JNZ 0x0012f77d MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x40 CMP RAX,0x0 JZ 0x0012f77d JMP 0x0012f764 LAB_0012f764: MOV EDI,dword ptr [RBP + -0xc] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] CALL 0x0012f560 MOV qword ptr [RBP + -0x8],RAX JMP 0x0012f8c7 LAB_0012f77d: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x18 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] AND RAX,-0x2 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] AND RAX,0x1 MOV byte ptr [RBP + -0x49],AL JMP 0x0012f7aa LAB_0012f7aa: JMP 0x0012f7ac LAB_0012f7ac: JMP 0x0012f7ae LAB_0012f7ae: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x8 SUB RAX,0x1 AND RAX,-0x8 MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x20] ADD RSI,0x18 CALL 0x00124540 MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],0x0 JNZ 0x0012f859 MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x48] JNC 0x0012f7f7 JMP 0x0012f7ea LAB_0012f7ea: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX JMP 0x0012f8c7 LAB_0012f7f7: CALL 0x00124050 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x50],EAX CALL 0x00126770 MOV ECX,dword ptr [RBP + -0x50] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x80 CMP RAX,0x0 JZ 0x0012f82c MOV RDI,qword ptr [RBP + -0x18] CALL 0x0012f8e0 MOV qword ptr [RBP + -0x18],0x0 LAB_0012f82c: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x18 CMP RAX,0x0 JZ 0x0012f84f MOV RDX,qword ptr [RBP + -0x20] MOV EDI,0x5 MOV ESI,0x1004 MOV AL,0x0 CALL 0x0012e6e0 LAB_0012f84f: MOV qword ptr [RBP + -0x40],0x0 JMP 0x0012f8b9 LAB_0012f859: MOV RCX,qword ptr [RBP + -0x20] MOVSX RAX,byte ptr [RBP + -0x49] OR RCX,RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x8],RCX LEA RAX,[0x2ce530] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x3e8] MOV EDI,dword ptr [RBP + -0xc] MOV RSI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x38] CALL RAX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [0x002cea68] MOV RDI,qword ptr [RBP + -0x20] SUB RDI,qword ptr [RBP + -0x48] MOVSX ESI,byte ptr [RBP + -0x49] CALL RAX MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x18 MOV qword ptr [RBP + -0x40],RAX LAB_0012f8b9: JMP 0x0012f8bb LAB_0012f8bb: JMP 0x0012f8bd LAB_0012f8bd: JMP 0x0012f8bf LAB_0012f8bf: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x8],RAX LAB_0012f8c7: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
long my_realloc(int4 param_1,long param_2,long param_3,ulong param_4) { int iVar1; byte bVar2; int4 uVar3; ulong uVar4; ulong uVar5; void *pvVar6; int *piVar7; long local_48; long local_10; if ((param_2 == 0) && ((param_4 & 0x40) != 0)) { local_10 = my_malloc(param_1,param_3,param_4); } else { uVar4 = *(ulong *)(param_2 + -0x10) & 0xfffffffffffffffe; bVar2 = (byte)*(int8 *)(param_2 + -0x10) & 1; uVar5 = param_3 + 7U & 0xfffffffffffffff8; pvVar6 = realloc((void *)(param_2 + -0x18),uVar5 + 0x18); if (pvVar6 == (void *)0x0) { if (uVar5 < uVar4) { return param_2; } piVar7 = __errno_location(); iVar1 = *piVar7; piVar7 = (int *)_my_thread_var(); *piVar7 = iVar1; if ((param_4 & 0x80) != 0) { my_free(param_2); } if ((param_4 & 0x18) != 0) { my_error(5,0x1004,uVar5); } local_48 = 0; } else { *(ulong *)((long)pvVar6 + 8) = uVar5 | (long)(char)bVar2; uVar3 = (**(code **)(PSI_server + 1000))(param_1,uVar4,uVar5,pvVar6); *(int4 *)((long)pvVar6 + 0x10) = uVar3; (*(code *)update_malloc_size)(uVar5 - uVar4,bVar2); local_48 = (long)pvVar6 + 0x18; } local_10 = local_48; } return local_10; }
35,087
pvio_socket_close
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
my_bool pvio_socket_close(MARIADB_PVIO *pvio) { struct st_pvio_socket *csock= NULL; int r= 0; if (!pvio) return 1; if (pvio->data) { csock= (struct st_pvio_socket *)pvio->data; if (csock && csock->socket != INVALID_SOCKET) { r= closesocket(csock->socket); csock->socket= INVALID_SOCKET; } free((gptr)pvio->data); pvio->data= NULL; } return r; }
O0
c
pvio_socket_close: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq $0x0, -0x18(%rbp) movl $0x0, -0x1c(%rbp) cmpq $0x0, -0x10(%rbp) jne 0x46cb8 movb $0x1, -0x1(%rbp) jmp 0x46d12 movq -0x10(%rbp), %rax cmpq $0x0, (%rax) je 0x46d0c movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x46cf5 movq -0x18(%rbp), %rax cmpl $-0x1, (%rax) je 0x46cf5 movq -0x18(%rbp), %rax movl (%rax), %edi callq 0x13830 movl %eax, -0x1c(%rbp) movq -0x18(%rbp), %rax movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x13520 movq -0x10(%rbp), %rax movq $0x0, (%rax) movl -0x1c(%rbp), %eax movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
pvio_socket_close: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], 0 mov [rbp+var_1C], 0 cmp [rbp+var_10], 0 jnz short loc_46CB8 mov [rbp+var_1], 1 jmp short loc_46D12 loc_46CB8: mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jz short loc_46D0C mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_18], rax cmp [rbp+var_18], 0 jz short loc_46CF5 mov rax, [rbp+var_18] cmp dword ptr [rax], 0FFFFFFFFh jz short loc_46CF5 mov rax, [rbp+var_18] mov edi, [rax] call _close mov [rbp+var_1C], eax mov rax, [rbp+var_18] mov dword ptr [rax], 0FFFFFFFFh loc_46CF5: mov rax, [rbp+var_10] mov rdi, [rax] call _free mov rax, [rbp+var_10] mov qword ptr [rax], 0 loc_46D0C: mov eax, [rbp+var_1C] mov [rbp+var_1], al loc_46D12: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char pvio_socket_close(_QWORD *a1) { char v2; // [rsp+4h] [rbp-1Ch] _DWORD *v3; // [rsp+8h] [rbp-18h] v2 = 0; if ( !a1 ) return 1; if ( *a1 ) { v3 = (_DWORD *)*a1; if ( *(_DWORD *)*a1 != -1 ) { v2 = close((unsigned int)*v3); *v3 = -1; } free(*a1); *a1 = 0LL; } return v2; }
pvio_socket_close: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],0x0 MOV dword ptr [RBP + -0x1c],0x0 CMP qword ptr [RBP + -0x10],0x0 JNZ 0x00146cb8 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00146d12 LAB_00146cb8: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JZ 0x00146d0c MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x00146cf5 MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],-0x1 JZ 0x00146cf5 MOV RAX,qword ptr [RBP + -0x18] MOV EDI,dword ptr [RAX] CALL 0x00113830 MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX],0xffffffff LAB_00146cf5: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x00113520 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],0x0 LAB_00146d0c: MOV EAX,dword ptr [RBP + -0x1c] MOV byte ptr [RBP + -0x1],AL LAB_00146d12: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 pvio_socket_close(long *param_1) { int *piVar1; int1 uVar2; int iVar3; int1 local_24; int1 local_9; local_24 = 0; uVar2 = local_24; local_24 = 0; if (param_1 == (long *)0x0) { local_9 = 1; } else { if (*param_1 != 0) { piVar1 = (int *)*param_1; local_24 = uVar2; if ((piVar1 != (int *)0x0) && (*piVar1 != -1)) { iVar3 = close(*piVar1); local_24 = (int1)iVar3; *piVar1 = -1; } free((void *)*param_1); *param_1 = 0; } local_9 = local_24; } return local_9; }
35,088
reset_events_transactions_history_long()
eloqsql/storage/perfschema/pfs_events_transactions.cc
void reset_events_transactions_history_long(void) { PFS_atomic::store_u32(&events_transactions_history_long_index.m_u32, 0); events_transactions_history_long_full= false; PFS_events_transactions *pfs= events_transactions_history_long_array; PFS_events_transactions *pfs_last= pfs + events_transactions_history_long_size; for ( ; pfs < pfs_last; pfs++) pfs->m_class= NULL; }
O0
cpp
reset_events_transactions_history_long(): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp leaq 0x3caf11(%rip), %rdi # 0x40b840 xorl %esi, %esi callq 0x36cb0 movb $0x0, 0x3caec3(%rip) # 0x40b800 movq 0x3caf3c(%rip), %rax # 0x40b880 movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax imulq $0x140, 0x3cada9(%rip), %rcx # imm = 0x140 addq %rcx, %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax cmpq -0x10(%rbp), %rax jae 0x40984 movq -0x8(%rbp), %rax movq $0x0, 0x30(%rax) movq -0x8(%rbp), %rax addq $0x140, %rax # imm = 0x140 movq %rax, -0x8(%rbp) jmp 0x4095e addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
_Z38reset_events_transactions_history_longv: push rbp mov rbp, rsp sub rsp, 10h lea rdi, events_transactions_history_long_index; this xor esi, esi; unsigned int * call _ZN10PFS_atomic9store_u32EPjj; PFS_atomic::store_u32(uint *,uint) mov cs:events_transactions_history_long_full, 0 mov rax, cs:events_transactions_history_long_array mov [rbp+var_8], rax mov rax, [rbp+var_8] imul rcx, cs:events_transactions_history_long_size, 140h add rax, rcx mov [rbp+var_10], rax loc_4095E: mov rax, [rbp+var_8] cmp rax, [rbp+var_10] jnb short loc_40984 mov rax, [rbp+var_8] mov qword ptr [rax+30h], 0 mov rax, [rbp+var_8] add rax, 140h mov [rbp+var_8], rax jmp short loc_4095E loc_40984: add rsp, 10h pop rbp retn
unsigned long long reset_events_transactions_history_long(void) { unsigned long long result; // rax unsigned long long v1; // [rsp+0h] [rbp-10h] unsigned long long v2; // [rsp+8h] [rbp-8h] PFS_atomic::store_u32((PFS_atomic *)&events_transactions_history_long_index, 0LL); events_transactions_history_long_full = 0; v2 = events_transactions_history_long_array; v1 = 320 * events_transactions_history_long_size + events_transactions_history_long_array; while ( 1 ) { result = v2; if ( v2 >= v1 ) break; *(_QWORD *)(v2 + 48) = 0LL; v2 += 320LL; } return result; }
reset_events_transactions_history_long: PUSH RBP MOV RBP,RSP SUB RSP,0x10 LEA RDI,[0x50b840] XOR ESI,ESI CALL 0x00136cb0 MOV byte ptr [0x0050b800],0x0 MOV RAX,qword ptr [0x0050b880] MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x8] IMUL RCX,qword ptr [0x0050b700],0x140 ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX LAB_0014095e: MOV RAX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RBP + -0x10] JNC 0x00140984 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x30],0x0 MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x140 MOV qword ptr [RBP + -0x8],RAX JMP 0x0014095e LAB_00140984: ADD RSP,0x10 POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* reset_events_transactions_history_long() */ void reset_events_transactions_history_long(void) { ulong uVar1; ulong local_10; PFS_atomic::store_u32((uint *)events_transactions_history_long_index,0); events_transactions_history_long_full = 0; uVar1 = events_transactions_history_long_array + events_transactions_history_long_size * 0x140; for (local_10 = events_transactions_history_long_array; local_10 < uVar1; local_10 = local_10 + 0x140) { *(int8 *)(local_10 + 0x30) = 0; } return; }
35,089
plutovg_surface_write_to_jpg
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-surface.c
bool plutovg_surface_write_to_jpg(const plutovg_surface_t* surface, const char* filename, int quality) { plutovg_surface_write_begin(surface); int success = stbi_write_jpg(filename, surface->width, surface->height, 4, surface->data, quality); plutovg_surface_write_end(surface); return success; }
O1
c
plutovg_surface_write_to_jpg: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movl %edx, %ebp movq %rsi, %r13 movq %rdi, %rbx movq 0x10(%rdi), %rdi movl 0x4(%rbx), %edx movl 0x8(%rbx), %ecx movl 0xc(%rbx), %r8d movq %rdi, %rsi callq 0x2deb6 movl 0x4(%rbx), %r14d movl 0x8(%rbx), %r15d movq 0x10(%rbx), %r12 xorps %xmm0, %xmm0 movaps %xmm0, 0x40(%rsp) movaps %xmm0, 0x30(%rsp) movaps %xmm0, 0x20(%rsp) movaps %xmm0, 0x10(%rsp) movaps %xmm0, (%rsp) movq $0x0, 0x50(%rsp) leaq 0x1a694(%rip), %rsi # 0x483c3 movq %r13, %rdi callq 0xa3b0 movq %rax, %r13 leaq 0xd10e(%rip), %rax # 0x3ae4f movq %rax, (%rsp) movq %r13, 0x8(%rsp) testq %r13, %r13 je 0x2dd75 movq %rsp, %rdi movl %r14d, %esi movl %r15d, %edx movq %r12, %rcx movl %ebp, %r8d callq 0x3a328 movl %eax, %ebp movq %r13, %rdi callq 0xa300 testl %ebp, %ebp setne %bpl jmp 0x2dd77 xorl %ebp, %ebp movq 0x10(%rbx), %rdi movl 0x4(%rbx), %edx movl 0x8(%rbx), %ecx movl 0xc(%rbx), %r8d movq %rdi, %rsi callq 0x2df9b movl %ebp, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
plutovg_surface_write_to_jpg: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov ebp, edx mov r13, rsi mov rbx, rdi mov rdi, [rdi+10h] mov edx, [rbx+4] mov ecx, [rbx+8] mov r8d, [rbx+0Ch] mov rsi, rdi call plutovg_convert_argb_to_rgba mov r14d, [rbx+4] mov r15d, [rbx+8] mov r12, [rbx+10h] xorps xmm0, xmm0 movaps [rsp+88h+var_48], xmm0 movaps [rsp+88h+var_58], xmm0 movaps [rsp+88h+var_68], xmm0 movaps [rsp+88h+var_78], xmm0 movaps [rsp+88h+var_88], xmm0 mov [rsp+88h+var_38], 0 lea rsi, aWb; "wb" mov rdi, r13 call _fopen mov r13, rax lea rax, stbi__stdio_write mov qword ptr [rsp+88h+var_88], rax mov qword ptr [rsp+88h+var_88+8], r13 test r13, r13 jz short loc_2DD75 mov rdi, rsp mov esi, r14d mov edx, r15d mov rcx, r12 mov r8d, ebp call stbi_write_jpg_core mov ebp, eax mov rdi, r13 call _fclose test ebp, ebp setnz bpl jmp short loc_2DD77 loc_2DD75: xor ebp, ebp loc_2DD77: mov rdi, [rbx+10h] mov edx, [rbx+4] mov ecx, [rbx+8] mov r8d, [rbx+0Ch] mov rsi, rdi call plutovg_convert_rgba_to_argb mov eax, ebp add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long plutovg_surface_write_to_jpg(long long a1, long long a2, unsigned int a3) { unsigned int v4; // r14d unsigned int v5; // r15d long long v6; // r12 long long v7; // r13 unsigned int v8; // ebp _QWORD v10[2]; // [rsp+0h] [rbp-88h] BYREF __int128 v11; // [rsp+10h] [rbp-78h] __int128 v12; // [rsp+20h] [rbp-68h] __int128 v13; // [rsp+30h] [rbp-58h] __int128 v14; // [rsp+40h] [rbp-48h] long long v15; // [rsp+50h] [rbp-38h] plutovg_convert_argb_to_rgba( *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 16), *(unsigned int *)(a1 + 4), *(unsigned int *)(a1 + 8), *(unsigned int *)(a1 + 12)); v4 = *(_DWORD *)(a1 + 4); v5 = *(_DWORD *)(a1 + 8); v6 = *(_QWORD *)(a1 + 16); v14 = 0LL; v13 = 0LL; v12 = 0LL; v11 = 0LL; v15 = 0LL; v7 = fopen(a2, "wb"); v10[0] = stbi__stdio_write; v10[1] = v7; if ( v7 ) { v8 = ((long long ( *)(_QWORD *, _QWORD, _QWORD, long long, _QWORD))stbi_write_jpg_core)(v10, v4, v5, v6, a3); fclose(v7); LOBYTE(v8) = v8 != 0; } else { v8 = 0; } plutovg_convert_rgba_to_argb( *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 16), *(unsigned int *)(a1 + 4), *(unsigned int *)(a1 + 8), *(unsigned int *)(a1 + 12)); return v8; }
plutovg_surface_write_to_jpg: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV EBP,EDX MOV R13,RSI MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x10] MOV EDX,dword ptr [RBX + 0x4] MOV ECX,dword ptr [RBX + 0x8] MOV R8D,dword ptr [RBX + 0xc] MOV RSI,RDI CALL 0x0012deb6 MOV R14D,dword ptr [RBX + 0x4] MOV R15D,dword ptr [RBX + 0x8] MOV R12,qword ptr [RBX + 0x10] XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x50],0x0 LEA RSI,[0x1483c3] MOV RDI,R13 CALL 0x0010a3b0 MOV R13,RAX LEA RAX,[0x13ae4f] MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],R13 TEST R13,R13 JZ 0x0012dd75 MOV RDI,RSP MOV ESI,R14D MOV EDX,R15D MOV RCX,R12 MOV R8D,EBP CALL 0x0013a328 MOV EBP,EAX MOV RDI,R13 CALL 0x0010a300 TEST EBP,EBP SETNZ BPL JMP 0x0012dd77 LAB_0012dd75: XOR EBP,EBP LAB_0012dd77: MOV RDI,qword ptr [RBX + 0x10] MOV EDX,dword ptr [RBX + 0x4] MOV ECX,dword ptr [RBX + 0x8] MOV R8D,dword ptr [RBX + 0xc] MOV RSI,RDI CALL 0x0012df9b MOV EAX,EBP ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
bool plutovg_surface_write_to_jpg(long param_1,char *param_2,int4 param_3) { int4 uVar1; int4 uVar2; int8 uVar3; int iVar4; FILE *__stream; bool bVar5; code *local_88; FILE *pFStack_80; int8 local_78; int8 uStack_70; int8 local_68; int8 uStack_60; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; int8 local_38; plutovg_convert_argb_to_rgba (*(int8 *)(param_1 + 0x10),*(int8 *)(param_1 + 0x10), *(int4 *)(param_1 + 4),*(int4 *)(param_1 + 8), *(int4 *)(param_1 + 0xc)); uVar1 = *(int4 *)(param_1 + 4); uVar2 = *(int4 *)(param_1 + 8); uVar3 = *(int8 *)(param_1 + 0x10); local_48 = 0; uStack_40 = 0; local_58 = 0; uStack_50 = 0; local_68 = 0; uStack_60 = 0; local_78 = 0; uStack_70 = 0; local_88 = (code *)0x0; pFStack_80 = (FILE *)0x0; local_38 = 0; __stream = fopen(param_2,"wb"); local_88 = stbi__stdio_write; pFStack_80 = __stream; if (__stream == (FILE *)0x0) { bVar5 = false; } else { iVar4 = stbi_write_jpg_core(&local_88,uVar1,uVar2,uVar3,param_3); fclose(__stream); bVar5 = iVar4 != 0; } plutovg_convert_rgba_to_argb (*(int8 *)(param_1 + 0x10),*(int8 *)(param_1 + 0x10), *(int4 *)(param_1 + 4),*(int4 *)(param_1 + 8), *(int4 *)(param_1 + 0xc)); return bVar5; }
35,090
remove_end_comment
eloqsql/mysys/my_default.c
static char *remove_end_comment(char *ptr) { char quote= 0; /* we are inside quote marks */ char escape= 0; /* symbol is protected by escape chagacter */ for (; *ptr; ptr++) { if ((*ptr == '\'' || *ptr == '\"') && !escape) { if (!quote) quote= *ptr; else if (quote == *ptr) quote= 0; } /* We are not inside a string */ if (!quote && *ptr == '#') { *ptr= 0; return ptr; } escape= (quote && *ptr == '\\' && !escape); } return ptr; }
O0
c
remove_end_comment: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movb $0x0, -0x11(%rbp) movb $0x0, -0x12(%rbp) movq -0x10(%rbp), %rax cmpb $0x0, (%rax) je 0x8519d movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x27, %eax je 0x85105 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x22, %eax jne 0x85133 cmpb $0x0, -0x12(%rbp) jne 0x85133 cmpb $0x0, -0x11(%rbp) jne 0x8511c movq -0x10(%rbp), %rax movb (%rax), %al movb %al, -0x11(%rbp) jmp 0x85131 movsbl -0x11(%rbp), %eax movq -0x10(%rbp), %rcx movsbl (%rcx), %ecx cmpl %ecx, %eax jne 0x8512f movb $0x0, -0x11(%rbp) jmp 0x85131 jmp 0x85133 cmpb $0x0, -0x11(%rbp) jne 0x85156 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x23, %eax jne 0x85156 movq -0x10(%rbp), %rax movb $0x0, (%rax) movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x851a5 movsbl -0x11(%rbp), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x13(%rbp) je 0x85181 movq -0x10(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x5c, %ecx movb %al, -0x13(%rbp) jne 0x85181 cmpb $0x0, -0x12(%rbp) setne %al xorb $-0x1, %al movb %al, -0x13(%rbp) movb -0x13(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, -0x12(%rbp) movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x850e0 movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopl (%rax,%rax)
remove_end_comment: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_11], 0 mov [rbp+var_12], 0 loc_850E0: mov rax, [rbp+var_10] cmp byte ptr [rax], 0 jz loc_8519D mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 27h ; ''' jz short loc_85105 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 22h ; '"' jnz short loc_85133 loc_85105: cmp [rbp+var_12], 0 jnz short loc_85133 cmp [rbp+var_11], 0 jnz short loc_8511C mov rax, [rbp+var_10] mov al, [rax] mov [rbp+var_11], al jmp short loc_85131 loc_8511C: movsx eax, [rbp+var_11] mov rcx, [rbp+var_10] movsx ecx, byte ptr [rcx] cmp eax, ecx jnz short loc_8512F mov [rbp+var_11], 0 loc_8512F: jmp short $+2 loc_85131: jmp short $+2 loc_85133: cmp [rbp+var_11], 0 jnz short loc_85156 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 23h ; '#' jnz short loc_85156 mov rax, [rbp+var_10] mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov [rbp+var_8], rax jmp short loc_851A5 loc_85156: movsx ecx, [rbp+var_11] xor eax, eax cmp ecx, 0 mov [rbp+var_13], al jz short loc_85181 mov rax, [rbp+var_10] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 5Ch ; '\' mov [rbp+var_13], al jnz short loc_85181 cmp [rbp+var_12], 0 setnz al xor al, 0FFh mov [rbp+var_13], al loc_85181: mov al, [rbp+var_13] and al, 1 movzx eax, al mov [rbp+var_12], al mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp loc_850E0 loc_8519D: mov rax, [rbp+var_10] mov [rbp+var_8], rax loc_851A5: mov rax, [rbp+var_8] pop rbp retn
char * remove_end_comment(char *a1) { char v2; // [rsp+1h] [rbp-13h] char v3; // [rsp+2h] [rbp-12h] char v4; // [rsp+3h] [rbp-11h] v4 = 0; v3 = 0; while ( *a1 ) { if ( (*a1 == 39 || *a1 == 34) && !v3 ) { if ( v4 ) { if ( v4 == *a1 ) v4 = 0; } else { v4 = *a1; } } if ( !v4 && *a1 == 35 ) { *a1 = 0; return a1; } v2 = 0; if ( v4 ) { v2 = 0; if ( *a1 == 92 ) v2 = ~(v3 != 0); } v3 = v2 & 1; ++a1; } return a1; }
remove_end_comment: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV byte ptr [RBP + -0x11],0x0 MOV byte ptr [RBP + -0x12],0x0 LAB_001850e0: MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX],0x0 JZ 0x0018519d MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x27 JZ 0x00185105 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x22 JNZ 0x00185133 LAB_00185105: CMP byte ptr [RBP + -0x12],0x0 JNZ 0x00185133 CMP byte ptr [RBP + -0x11],0x0 JNZ 0x0018511c MOV RAX,qword ptr [RBP + -0x10] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x11],AL JMP 0x00185131 LAB_0018511c: MOVSX EAX,byte ptr [RBP + -0x11] MOV RCX,qword ptr [RBP + -0x10] MOVSX ECX,byte ptr [RCX] CMP EAX,ECX JNZ 0x0018512f MOV byte ptr [RBP + -0x11],0x0 LAB_0018512f: JMP 0x00185131 LAB_00185131: JMP 0x00185133 LAB_00185133: CMP byte ptr [RBP + -0x11],0x0 JNZ 0x00185156 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x23 JNZ 0x00185156 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX JMP 0x001851a5 LAB_00185156: MOVSX ECX,byte ptr [RBP + -0x11] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x13],AL JZ 0x00185181 MOV RAX,qword ptr [RBP + -0x10] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x5c MOV byte ptr [RBP + -0x13],AL JNZ 0x00185181 CMP byte ptr [RBP + -0x12],0x0 SETNZ AL XOR AL,0xff MOV byte ptr [RBP + -0x13],AL LAB_00185181: MOV AL,byte ptr [RBP + -0x13] AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x12],AL MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x001850e0 LAB_0018519d: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX LAB_001851a5: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
char * remove_end_comment(char *param_1) { bool bVar1; bool bVar2; char local_19; char *local_18; local_19 = '\0'; bVar1 = false; local_18 = param_1; while( true ) { if (*local_18 == '\0') { return local_18; } if (((*local_18 == '\'') || (*local_18 == '\"')) && (!bVar1)) { if (local_19 == '\0') { local_19 = *local_18; } else if (local_19 == *local_18) { local_19 = '\0'; } } if ((local_19 == '\0') && (*local_18 == '#')) break; bVar2 = false; if ((local_19 != '\0') && (bVar2 = false, *local_18 == '\\')) { bVar2 = (bool)(bVar1 ^ 1); } bVar1 = bVar2; local_18 = local_18 + 1; } *local_18 = '\0'; return local_18; }
35,091
_gnu_cxx::__normal_iterator<std::pair<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>>*, std::vector<std::pair<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>>, std::allocator<std::pair<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>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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>, std::less<void>, std::allocator<std::pair<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>>>>::find<char const (&) [12], 0>(char const (&) [12])
monkey531[P]llama/common/./json.hpp
iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return it; } } return Container::end(); }
O2
cpp
_gnu_cxx::__normal_iterator<std::pair<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>>*, std::vector<std::pair<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>>, std::allocator<std::pair<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>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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>, std::less<void>, std::allocator<std::pair<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>>>>::find<char const (&) [12], 0>(char const (&) [12]): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r15 movq (%rdi), %r14 movq 0x8(%r15), %rax cmpq %rax, %r14 je 0x851c1 movq %r14, %rdi movq %rbx, %rsi callq 0x26888 testb %al, %al jne 0x851be addq $0x30, %r14 jmp 0x851a0 movq %r14, %rax popq %rbx popq %r14 popq %r15 retq
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA12_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_: push r15 push r14 push rbx mov rbx, rsi mov r15, rdi mov r14, [rdi] loc_851A0: mov rax, [r15+8] cmp r14, rax jz short loc_851C1 mov rdi, r14 mov rsi, rbx call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jnz short loc_851BE add r14, 30h ; '0' jmp short loc_851A0 loc_851BE: mov rax, r14 loc_851C1: pop rbx pop r14 pop r15 retn
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA12_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_( long long *a1) { long long i; // r14 long long result; // rax for ( i = *a1; ; i += 48LL ) { result = a1[1]; if ( i == result ) break; if ( std::operator==<char>(i) ) return i; } return result; }
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA12_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV R15,RDI MOV R14,qword ptr [RDI] LAB_001851a0: MOV RAX,qword ptr [R15 + 0x8] CMP R14,RAX JZ 0x001851c1 MOV RDI,R14 MOV RSI,RBX CALL 0x00126888 TEST AL,AL JNZ 0x001851be ADD R14,0x30 JMP 0x001851a0 LAB_001851be: MOV RAX,R14 LAB_001851c1: POP RBX POP R14 POP R15 RET
string * _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA12_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ (int8 *param_1,char *param_2) { bool bVar1; string *psVar2; string *psVar3; psVar3 = (string *)*param_1; while ((psVar2 = (string *)param_1[1], psVar3 != (string *)param_1[1] && (bVar1 = std::operator==(psVar3,param_2), psVar2 = psVar3, !bVar1))) { psVar3 = psVar3 + 0x30; } return psVar2; }
35,092
minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&)
monkey531[P]llama/common/minja.hpp
MacroNode(const Location & location, std::shared_ptr<VariableExpr> && n, Expression::Parameters && p, std::shared_ptr<TemplateNode> && b) : TemplateNode(location), name(std::move(n)), params(std::move(p)), body(std::move(b)) { for (size_t i = 0; i < params.size(); ++i) { const auto & name = params[i].first; if (!name.empty()) { named_param_positions[name] = i; } } }
O1
cpp
minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq 0x20(%rdi), %r15 movq 0x28(%rdi), %r12 cmpq %r12, %r15 je 0x85eba movq %rdx, %rbx movq %rsi, %r14 movq (%r15), %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x7f6fe addq $0x10, %r15 cmpq %r12, %r15 jne 0x85ea3 addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
_ZNK5minja12SequenceNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE: push r15 push r14 push r12 push rbx push rax mov r15, [rdi+20h] mov r12, [rdi+28h] cmp r15, r12 jz short loc_85EBA mov rbx, rdx mov r14, rsi loc_85EA3: mov rdi, [r15] mov rsi, r14 mov rdx, rbx call _ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE; minja::TemplateNode::render(std::ostringstream &,std::shared_ptr<minja::Context> const&) add r15, 10h cmp r15, r12 jnz short loc_85EA3 loc_85EBA: add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long minja::SequenceNode::do_render(long long a1) { long long ( ****v1)(_QWORD); // r15 long long ( ****i)(_QWORD); // r12 long long result; // rax v1 = *(long long ( *****)(_QWORD))(a1 + 32); for ( i = *(long long ( *****)(_QWORD))(a1 + 40); v1 != i; v1 += 2 ) result = minja::TemplateNode::render(*v1); return result; }
do_render: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R15,qword ptr [RDI + 0x20] MOV R12,qword ptr [RDI + 0x28] CMP R15,R12 JZ 0x00185eba MOV RBX,RDX MOV R14,RSI LAB_00185ea3: MOV RDI,qword ptr [R15] MOV RSI,R14 MOV RDX,RBX CALL 0x0017f6fe ADD R15,0x10 CMP R15,R12 JNZ 0x00185ea3 LAB_00185eba: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* minja::SequenceNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&) const */ void minja::SequenceNode::do_render(ostringstream *param_1,shared_ptr *param_2) { int8 *puVar1; int8 *puVar2; puVar1 = *(int8 **)(param_1 + 0x28); for (puVar2 = *(int8 **)(param_1 + 0x20); puVar2 != puVar1; puVar2 = puVar2 + 2) { TemplateNode::render((ostringstream *)*puVar2,param_2); } return; }
35,093
minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&)
monkey531[P]llama/common/minja.hpp
MacroNode(const Location & location, std::shared_ptr<VariableExpr> && n, Expression::Parameters && p, std::shared_ptr<TemplateNode> && b) : TemplateNode(location), name(std::move(n)), params(std::move(p)), body(std::move(b)) { for (size_t i = 0; i < params.size(); ++i) { const auto & name = params[i].first; if (!name.empty()) { named_param_positions[name] = i; } } }
O3
cpp
minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx leaq 0x69212(%rip), %rax # 0xeb148 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 0x81f66 movq 0x6a038(%rip), %rdi # 0xebf90 cmpb $0x0, (%rdi) je 0x81f62 incl 0x8(%rax) jmp 0x81f66 lock incl 0x8(%rax) movq 0x10(%rsi), %rax movq %rax, 0x18(%rbx) leaq 0x69663(%rip), %rax # 0xeb5d8 addq $0x10, %rax movq %rax, (%rbx) xorl %eax, %eax movq %rax, 0x28(%rbx) movups (%rdx), %xmm0 movq %rax, 0x8(%rdx) movups %xmm0, 0x20(%rbx) movq %rax, (%rdx) movups (%rcx), %xmm0 movups %xmm0, 0x30(%rbx) movq 0x10(%rcx), %rdx movq %rdx, 0x40(%rbx) movq %rax, 0x10(%rcx) xorps %xmm0, %xmm0 movups %xmm0, (%rcx) movq %rax, 0x50(%rbx) movups (%r8), %xmm1 movq %rax, 0x8(%r8) movups %xmm1, 0x48(%rbx) movq %rax, (%r8) leaq 0x88(%rbx), %rax movq %rax, 0x58(%rbx) movq $0x1, 0x60(%rbx) movups %xmm0, 0x68(%rbx) movl $0x3f800000, 0x78(%rbx) # imm = 0x3F800000 movups %xmm0, 0x80(%rbx) movq 0x30(%rbx), %rsi movq 0x38(%rbx), %rax cmpq %rsi, %rax je 0x8204f leaq 0x10(%rbx), %rcx movq %rcx, 0x10(%rsp) leaq 0x28(%rbx), %rcx movq %rcx, 0x8(%rsp) leaq 0x30(%rbx), %r12 leaq 0x58(%rbx), %r13 xorl %ebp, %ebp movabsq $-0x5555555555555555, %r14 # imm = 0xAAAAAAAAAAAAAAAB xorl %r15d, %r15d cmpq $0x0, 0x8(%rsi,%rbp) je 0x82035 addq %rbp, %rsi movq %r13, %rdi callq 0x823f2 movq %r15, (%rax) movq 0x30(%rbx), %rsi movq 0x38(%rbx), %rax incq %r15 movq %rax, %rcx subq %rsi, %rcx sarq $0x4, %rcx imulq %r14, %rcx addq $0x30, %rbp cmpq %rcx, %r15 jb 0x82017 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbp movq %r13, %rdi callq 0x82814 movq 0x50(%rbx), %rdi testq %rdi, %rdi je 0x82077 callq 0x4200c movq %r12, %rdi movq 0x8(%rsp), %rsi movq %rbx, %rdx movq 0x10(%rsp), %rcx callq 0x1af81 movq %rbp, %rdi callq 0x19be0
_ZN5minja9MacroNodeC2ERKNS_8LocationEOSt10shared_ptrINS_12VariableExprEEOSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_INS_10ExpressionEEESaISI_EEOS4_INS_12TemplateNodeEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi lea rax, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode 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_81F66 mov rdi, cs:__libc_single_threaded_ptr cmp byte ptr [rdi], 0 jz short loc_81F62 inc dword ptr [rax+8] jmp short loc_81F66 loc_81F62: lock inc dword ptr [rax+8] loc_81F66: mov rax, [rsi+10h] mov [rbx+18h], rax lea rax, _ZTVN5minja9MacroNodeE; `vtable for'minja::MacroNode add rax, 10h mov [rbx], rax xor eax, eax mov [rbx+28h], rax movups xmm0, xmmword ptr [rdx] mov [rdx+8], rax movups xmmword ptr [rbx+20h], xmm0 mov [rdx], rax movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rbx+30h], xmm0 mov rdx, [rcx+10h] mov [rbx+40h], rdx mov [rcx+10h], rax xorps xmm0, xmm0 movups xmmword ptr [rcx], xmm0 mov [rbx+50h], rax movups xmm1, xmmword ptr [r8] mov [r8+8], rax movups xmmword ptr [rbx+48h], xmm1 mov [r8], rax lea rax, [rbx+88h] mov [rbx+58h], rax mov qword ptr [rbx+60h], 1 movups xmmword ptr [rbx+68h], xmm0 mov dword ptr [rbx+78h], 3F800000h movups xmmword ptr [rbx+80h], xmm0 mov rsi, [rbx+30h] mov rax, [rbx+38h] cmp rax, rsi jz short loc_8204F lea rcx, [rbx+10h] mov [rsp+48h+var_38], rcx lea rcx, [rbx+28h] mov [rsp+48h+var_40], rcx lea r12, [rbx+30h] lea r13, [rbx+58h] xor ebp, ebp mov r14, 0AAAAAAAAAAAAAAABh xor r15d, r15d loc_82017: cmp qword ptr [rsi+rbp+8], 0 jz short loc_82035 add rsi, rbp mov rdi, r13 call _ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_mESaIS9_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixERS8_; std::__detail::_Map_base<std::string,std::pair<std::string const,ulong>,std::allocator<std::pair<std::string const,ulong>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::operator[](std::string const&) mov [rax], r15 mov rsi, [rbx+30h] mov rax, [rbx+38h] loc_82035: inc r15 mov rcx, rax sub rcx, rsi sar rcx, 4 imul rcx, r14 add rbp, 30h ; '0' cmp r15, rcx jb short loc_82017 loc_8204F: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbp, rax mov rdi, r13 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,ulong>,std::allocator<std::pair<std::string const,ulong>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable() mov rdi, [rbx+50h] test rdi, rdi jz short loc_82077 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_82077: mov rdi, r12 mov rsi, [rsp+arg_0] mov rdx, rbx mov rcx, [rsp+arg_8] call _ZN5minja9MacroNodeC2ERKNS_8LocationEOSt10shared_ptrINS_12VariableExprEEOSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_INS_10ExpressionEEESaISI_EEOS4_INS_12TemplateNodeEE_cold_1; minja::MacroNode::MacroNode(minja::Location const&,std::shared_ptr<minja::VariableExpr> &&,std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>> &&,std::shared_ptr&&<minja::TemplateNode>) [clone] mov rdi, rbp call __Unwind_Resume
long long minja::MacroNode::MacroNode(long long a1, _QWORD *a2, __int128 *a3, long long a4, __int128 *a5, int a6) { long long v6; // rax __int128 v7; // xmm0 long long v8; // rdx __int128 v9; // xmm1 long long v10; // rsi long long result; // rax unsigned long long v12; // rcx long long v13; // rbp unsigned long long v14; // r15 char v15; // [rsp+0h] [rbp-48h] *(_QWORD *)a1 = &`vtable for'minja::TemplateNode + 2; *(_QWORD *)(a1 + 8) = *a2; v6 = a2[1]; *(_QWORD *)(a1 + 16) = v6; if ( v6 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v6 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v6 + 8)); } *(_QWORD *)(a1 + 24) = a2[2]; *(_QWORD *)a1 = &`vtable for'minja::MacroNode + 2; *(_QWORD *)(a1 + 40) = 0LL; v7 = *a3; *((_QWORD *)a3 + 1) = 0LL; *(_OWORD *)(a1 + 32) = v7; *(_QWORD *)a3 = 0LL; *(_OWORD *)(a1 + 48) = *(_OWORD *)a4; v8 = *(_QWORD *)(a4 + 16); *(_QWORD *)(a1 + 64) = v8; *(_QWORD *)(a4 + 16) = 0LL; *(_OWORD *)a4 = 0LL; *(_QWORD *)(a1 + 80) = 0LL; v9 = *a5; *((_QWORD *)a5 + 1) = 0LL; *(_OWORD *)(a1 + 72) = v9; *(_QWORD *)a5 = 0LL; *(_QWORD *)(a1 + 88) = a1 + 136; *(_QWORD *)(a1 + 96) = 1LL; *(_OWORD *)(a1 + 104) = 0LL; *(_DWORD *)(a1 + 120) = 1065353216; *(_OWORD *)(a1 + 128) = 0LL; v10 = *(_QWORD *)(a1 + 48); result = *(_QWORD *)(a1 + 56); if ( result != v10 ) { LODWORD(v12) = a1 + 40; v13 = 0LL; v14 = 0LL; do { if ( *(_QWORD *)(v10 + v13 + 8) ) { *(_QWORD *)std::__detail::_Map_base<std::string,std::pair<std::string const,unsigned long>,std::allocator<std::pair<std::string const,unsigned long>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::operator[]( (int)a1 + 88, (int)v13 + (int)v10, v8, v12, (_DWORD)a5, a6, v15) = v14; v10 = *(_QWORD *)(a1 + 48); result = *(_QWORD *)(a1 + 56); } ++v14; v12 = 0xAAAAAAAAAAAAAAABLL * ((result - v10) >> 4); v13 += 48LL; } while ( v14 < v12 ); } return result; }
MacroNode: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI LEA RAX,[0x1eb148] 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 0x00181f66 MOV RDI,qword ptr [0x001ebf90] CMP byte ptr [RDI],0x0 JZ 0x00181f62 INC dword ptr [RAX + 0x8] JMP 0x00181f66 LAB_00181f62: INC.LOCK dword ptr [RAX + 0x8] LAB_00181f66: MOV RAX,qword ptr [RSI + 0x10] MOV qword ptr [RBX + 0x18],RAX LEA RAX,[0x1eb5d8] ADD RAX,0x10 MOV qword ptr [RBX],RAX XOR EAX,EAX MOV qword ptr [RBX + 0x28],RAX MOVUPS XMM0,xmmword ptr [RDX] MOV qword ptr [RDX + 0x8],RAX MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOV qword ptr [RDX],RAX MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV RDX,qword ptr [RCX + 0x10] MOV qword ptr [RBX + 0x40],RDX MOV qword ptr [RCX + 0x10],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RCX],XMM0 MOV qword ptr [RBX + 0x50],RAX MOVUPS XMM1,xmmword ptr [R8] MOV qword ptr [R8 + 0x8],RAX MOVUPS xmmword ptr [RBX + 0x48],XMM1 MOV qword ptr [R8],RAX LEA RAX,[RBX + 0x88] MOV qword ptr [RBX + 0x58],RAX MOV qword ptr [RBX + 0x60],0x1 MOVUPS xmmword ptr [RBX + 0x68],XMM0 MOV dword ptr [RBX + 0x78],0x3f800000 MOVUPS xmmword ptr [RBX + 0x80],XMM0 MOV RSI,qword ptr [RBX + 0x30] MOV RAX,qword ptr [RBX + 0x38] CMP RAX,RSI JZ 0x0018204f LEA RCX,[RBX + 0x10] MOV qword ptr [RSP + 0x10],RCX LEA RCX,[RBX + 0x28] MOV qword ptr [RSP + 0x8],RCX LEA R12,[RBX + 0x30] LEA R13,[RBX + 0x58] XOR EBP,EBP MOV R14,-0x5555555555555555 XOR R15D,R15D LAB_00182017: CMP qword ptr [RSI + RBP*0x1 + 0x8],0x0 JZ 0x00182035 ADD RSI,RBP LAB_00182022: MOV RDI,R13 CALL 0x001823f2 LAB_0018202a: MOV qword ptr [RAX],R15 MOV RSI,qword ptr [RBX + 0x30] MOV RAX,qword ptr [RBX + 0x38] LAB_00182035: INC R15 MOV RCX,RAX SUB RCX,RSI SAR RCX,0x4 IMUL RCX,R14 ADD RBP,0x30 CMP R15,RCX JC 0x00182017 LAB_0018204f: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::string, std::shared_ptr<minja::Expression> >, std::allocator<std::pair<std::__cxx11::string, std::shared_ptr<minja::Expression> > > >&&, std::shared_ptr<minja::TemplateNode>&&) */ void __thiscall minja::MacroNode::MacroNode (MacroNode *this,Location *param_1,shared_ptr *param_2,vector *param_3,shared_ptr *param_4 ) { int8 uVar1; ulong *puVar2; long lVar3; long lVar4; long lVar5; ulong uVar6; *(int ***)this = &PTR___cxa_pure_virtual_001eb158; *(int8 *)(this + 8) = *(int8 *)param_1; lVar5 = *(long *)(param_1 + 8); *(long *)(this + 0x10) = lVar5; if (lVar5 != 0) { if (*PTR___libc_single_threaded_001ebf90 == '\0') { LOCK(); *(int *)(lVar5 + 8) = *(int *)(lVar5 + 8) + 1; UNLOCK(); } else { *(int *)(lVar5 + 8) = *(int *)(lVar5 + 8) + 1; } } *(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10); *(int ***)this = &PTR_do_render_001eb5e8; *(int8 *)(this + 0x28) = 0; uVar1 = *(int8 *)(param_2 + 8); *(int8 *)(param_2 + 8) = 0; *(int8 *)(this + 0x20) = *(int8 *)param_2; *(int8 *)(this + 0x28) = uVar1; *(int8 *)param_2 = 0; uVar1 = *(int8 *)(param_3 + 8); *(int8 *)(this + 0x30) = *(int8 *)param_3; *(int8 *)(this + 0x38) = uVar1; *(int8 *)(this + 0x40) = *(int8 *)(param_3 + 0x10); *(int8 *)(param_3 + 0x10) = 0; *(int8 *)param_3 = 0; *(int8 *)(param_3 + 8) = 0; *(int8 *)(this + 0x50) = 0; uVar1 = *(int8 *)(param_4 + 8); *(int8 *)(param_4 + 8) = 0; *(int8 *)(this + 0x48) = *(int8 *)param_4; *(int8 *)(this + 0x50) = uVar1; *(int8 *)param_4 = 0; *(MacroNode **)(this + 0x58) = this + 0x88; *(int8 *)(this + 0x60) = 1; *(int8 *)(this + 0x68) = 0; *(int8 *)(this + 0x70) = 0; *(int4 *)(this + 0x78) = 0x3f800000; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0; lVar5 = *(long *)(this + 0x30); lVar3 = *(long *)(this + 0x38); if (lVar3 != lVar5) { lVar4 = 0; uVar6 = 0; do { if (*(long *)(lVar5 + 8 + lVar4) != 0) { /* try { // try from 00182022 to 00182029 has its CatchHandler @ 0018205e */ puVar2 = (ulong *)std::__detail:: _Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true> ::operator[]((_Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true> *)(this + 0x58),(string *)(lVar5 + lVar4)); *puVar2 = uVar6; lVar5 = *(long *)(this + 0x30); lVar3 = *(long *)(this + 0x38); } uVar6 = uVar6 + 1; lVar4 = lVar4 + 0x30; } while (uVar6 < (ulong)((lVar3 - lVar5 >> 4) * -0x5555555555555555)); } return; }
35,094
js_math_clz32
bluesky950520[P]quickjs/quickjs.c
static JSValue js_math_clz32(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { uint32_t a, r; if (JS_ToUint32(ctx, &a, argv[0])) return JS_EXCEPTION; if (a == 0) r = 32; else r = clz32(a); return js_int32(r); }
O2
c
js_math_clz32: pushq %rbx subq $0x10, %rsp movq (%r8), %rdx movq 0x8(%r8), %rcx leaq 0xc(%rsp), %rbx movq %rbx, %rsi callq 0x25187 movl %eax, %ecx movl (%rbx), %eax testl %eax, %eax je 0x6d9af bsrl %eax, %eax xorl $0x1f, %eax jmp 0x6d9b2 pushq $0x20 popq %rax xorl %esi, %esi testl %ecx, %ecx cmovnel %esi, %eax pushq $0x6 popq %rdx cmoveq %rsi, %rdx addq $0x10, %rsp popq %rbx retq
js_math_clz32: push rbx sub rsp, 10h mov rdx, [r8] mov rcx, [r8+8] lea rbx, [rsp+18h+var_C] mov rsi, rbx call JS_ToInt32 mov ecx, eax mov eax, [rbx] test eax, eax jz short loc_6D9AF bsr eax, eax xor eax, 1Fh jmp short loc_6D9B2 loc_6D9AF: push 20h ; ' ' pop rax loc_6D9B2: xor esi, esi test ecx, ecx cmovnz eax, esi push 6 pop rdx cmovz rdx, rsi add rsp, 10h pop rbx retn
long long js_math_clz32(long long a1, long long a2, long long a3, long long a4, long long a5) { int v5; // ecx unsigned int v6; // eax long long result; // rax unsigned int v8[3]; // [rsp+Ch] [rbp-Ch] BYREF v5 = JS_ToInt32(a1, (long long)v8, *(_DWORD **)a5, *(_QWORD *)(a5 + 8)); if ( v8[0] ) { _BitScanReverse(&v6, v8[0]); result = v6 ^ 0x1F; } else { result = 32LL; } if ( v5 ) return 0LL; return result; }
js_math_clz32: PUSH RBX SUB RSP,0x10 MOV RDX,qword ptr [R8] MOV RCX,qword ptr [R8 + 0x8] LEA RBX,[RSP + 0xc] MOV RSI,RBX CALL 0x00125187 MOV ECX,EAX MOV EAX,dword ptr [RBX] TEST EAX,EAX JZ 0x0016d9af BSR EAX,EAX XOR EAX,0x1f JMP 0x0016d9b2 LAB_0016d9af: PUSH 0x20 POP RAX LAB_0016d9b2: XOR ESI,ESI TEST ECX,ECX CMOVNZ EAX,ESI PUSH 0x6 POP RDX CMOVZ RDX,RSI ADD RSP,0x10 POP RBX RET
int1 [16] js_math_clz32(int8 param_1) { uint uVar1; int iVar2; ulong uVar3; ulong uVar4; int8 *in_R8; int1 auVar5 [16]; uint local_c; iVar2 = JS_ToInt32(param_1,&local_c,*in_R8,in_R8[1]); if (local_c == 0) { uVar3 = 0x20; } else { uVar1 = 0x1f; if (local_c != 0) { for (; local_c >> uVar1 == 0; uVar1 = uVar1 - 1) { } } uVar3 = (ulong)(uVar1 ^ 0x1f); } if (iVar2 != 0) { uVar3 = 0; } uVar4 = 6; if (iVar2 == 0) { uVar4 = 0; } auVar5._8_8_ = uVar4; auVar5._0_8_ = uVar3; return auVar5; }
35,095
mysql_stmt_free_result_cont
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_free_result_cont(my_bool *ret, MYSQL_STMT *stmt, int ready_status) { MK_ASYNC_CONT_BODY( stmt->mysql, TRUE, r_my_bool) }
O3
c
mysql_stmt_free_result_cont: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x38(%rsi), %rax movq 0x480(%rax), %rcx movq 0x28(%rcx), %r15 cmpb $0x0, 0x15(%r15) je 0x2f844 movb $0x1, 0x14(%r15) movl %edx, 0x4(%r15) leaq 0x38(%r15), %rdi callq 0x305fb movb $0x0, 0x14(%r15) testl %eax, %eax jle 0x2f8a7 movl (%r15), %r15d jmp 0x2f91d movl $0x7de, 0x90(%rax) # imm = 0x7DE movl $0x297, %edi # imm = 0x297 addq 0x38(%r14), %rdi leaq 0x1e522(%rip), %rax # 0x4dd80 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 movq 0x38(%r14), %rax xorl %r15d, %r15d movb %r15b, 0x29c(%rax) movl $0x97, %edi addq 0x38(%r14), %rdi leaq 0x1e507(%rip), %rax # 0x4dd90 movq 0x70(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13220 movq 0x38(%r14), %rax movb %r15b, 0x296(%rax) movb $0x1, (%rbx) jmp 0x2f91d movb $0x0, 0x15(%r15) js 0x2f8b4 movb 0x8(%r15), %al jmp 0x2f918 movq 0x38(%r14), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movl $0x297, %edi # imm = 0x297 addq 0x38(%r14), %rdi leaq 0x1e4ae(%rip), %rax # 0x4dd80 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 movq 0x38(%r14), %rax xorl %r15d, %r15d movb %r15b, 0x29c(%rax) movl $0x97, %edi addq 0x38(%r14), %rdi leaq 0x1e493(%rip), %rax # 0x4dd90 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13220 movq 0x38(%r14), %rax movb %r15b, 0x296(%rax) movb $0x1, %al movb %al, (%rbx) xorl %r15d, %r15d movl %r15d, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mysql_stmt_free_result_cont: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rax, [rsi+38h] mov rcx, [rax+480h] mov r15, [rcx+28h] cmp byte ptr [r15+15h], 0 jz short loc_2F844 mov byte ptr [r15+14h], 1 mov [r15+4], edx lea rdi, [r15+38h] call my_context_continue mov byte ptr [r15+14h], 0 test eax, eax jle short loc_2F8A7 mov r15d, [r15] jmp loc_2F91D loc_2F844: mov dword ptr [rax+90h], 7DEh mov edi, 297h add rdi, [r14+38h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [r14+38h] xor r15d, r15d mov [rax+29Ch], r15b mov edi, 97h add rdi, [r14+38h] lea rax, client_errors mov rsi, [rax+70h] mov edx, 1FFh call _strncpy mov rax, [r14+38h] mov [rax+296h], r15b mov byte ptr [rbx], 1 jmp short loc_2F91D loc_2F8A7: mov byte ptr [r15+15h], 0 js short loc_2F8B4 mov al, [r15+8] jmp short loc_2F918 loc_2F8B4: mov rax, [r14+38h] mov dword ptr [rax+90h], 7D8h mov edi, 297h add rdi, [r14+38h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [r14+38h] xor r15d, r15d mov [rax+29Ch], r15b mov edi, 97h add rdi, [r14+38h] lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [r14+38h] mov [rax+296h], r15b mov al, 1 loc_2F918: mov [rbx], al xor r15d, r15d loc_2F91D: mov eax, r15d add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mysql_stmt_free_result_cont(char *a1, long long a2, unsigned int a3) { long long v3; // rax unsigned int *v4; // r15 int v5; // eax unsigned int v6; // r15d char v7; // al v3 = *(_QWORD *)(a2 + 56); v4 = *(unsigned int **)(*(_QWORD *)(v3 + 1152) + 40LL); if ( *((_BYTE *)v4 + 21) ) { *((_BYTE *)v4 + 20) = 1; v4[1] = a3; v5 = my_context_continue(v4 + 14); *((_BYTE *)v4 + 20) = 0; if ( v5 <= 0 ) { *((_BYTE *)v4 + 21) = 0; if ( v5 < 0 ) { *(_DWORD *)(*(_QWORD *)(a2 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0; v7 = 1; } else { v7 = *((_BYTE *)v4 + 8); } *a1 = v7; return 0; } else { return *v4; } } else { *(_DWORD *)(v3 + 144) = 2014; strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); v6 = 0; *(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[14], 511LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0; *a1 = 1; } return v6; }
mysql_stmt_free_result_cont: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RSI + 0x38] MOV RCX,qword ptr [RAX + 0x480] MOV R15,qword ptr [RCX + 0x28] CMP byte ptr [R15 + 0x15],0x0 JZ 0x0012f844 MOV byte ptr [R15 + 0x14],0x1 MOV dword ptr [R15 + 0x4],EDX LEA RDI,[R15 + 0x38] CALL 0x001305fb MOV byte ptr [R15 + 0x14],0x0 TEST EAX,EAX JLE 0x0012f8a7 MOV R15D,dword ptr [R15] JMP 0x0012f91d LAB_0012f844: MOV dword ptr [RAX + 0x90],0x7de MOV EDI,0x297 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x14dd80] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 MOV RAX,qword ptr [R14 + 0x38] XOR R15D,R15D MOV byte ptr [RAX + 0x29c],R15B MOV EDI,0x97 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x14dd90] MOV RSI,qword ptr [RAX + 0x70] MOV EDX,0x1ff CALL 0x00113220 MOV RAX,qword ptr [R14 + 0x38] MOV byte ptr [RAX + 0x296],R15B MOV byte ptr [RBX],0x1 JMP 0x0012f91d LAB_0012f8a7: MOV byte ptr [R15 + 0x15],0x0 JS 0x0012f8b4 MOV AL,byte ptr [R15 + 0x8] JMP 0x0012f918 LAB_0012f8b4: MOV RAX,qword ptr [R14 + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV EDI,0x297 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x14dd80] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 MOV RAX,qword ptr [R14 + 0x38] XOR R15D,R15D MOV byte ptr [RAX + 0x29c],R15B MOV EDI,0x97 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x14dd90] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00113220 MOV RAX,qword ptr [R14 + 0x38] MOV byte ptr [RAX + 0x296],R15B MOV AL,0x1 LAB_0012f918: MOV byte ptr [RBX],AL XOR R15D,R15D LAB_0012f91d: MOV EAX,R15D ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int4 mysql_stmt_free_result_cont(int1 *param_1,long param_2,int4 param_3) { int4 *puVar1; int1 uVar2; int iVar3; int4 uVar4; puVar1 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); if (*(char *)((long)puVar1 + 0x15) == '\0') { *(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7de; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); uVar4 = 0; *(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97), PTR_s_Commands_out_of_sync__you_can_t_r_0014de00,0x1ff); *(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0; *param_1 = 1; } else { *(int1 *)(puVar1 + 5) = 1; puVar1[1] = param_3; iVar3 = my_context_continue(puVar1 + 0xe); *(int1 *)(puVar1 + 5) = 0; if (iVar3 < 1) { *(int1 *)((long)puVar1 + 0x15) = 0; if (iVar3 < 0) { *(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_0014ddd0, 0x1ff); *(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0; uVar2 = 1; } else { uVar2 = *(int1 *)(puVar1 + 2); } *param_1 = uVar2; uVar4 = 0; } else { uVar4 = *puVar1; } } return uVar4; }
35,096
ast_create_vector
tsotchke[P]eshkol/src/frontend/ast/create/ast_create.c
AstNode* ast_create_vector(Arena* arena, AstNode** elements, size_t count, size_t line, size_t column) { AstNode* node = ast_create_node(arena, AST_LITERAL_VECTOR, line, column); if (!node) { return NULL; } node->as.vector.elements = elements; node->as.vector.count = count; return node; }
O1
c
ast_create_vector: pushq %r14 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 movl $0x4, %esi movq %rcx, %rdx movq %r8, %rcx callq 0x4648 testq %rax, %rax je 0x4786 movq %r14, 0x48(%rax) movq %rbx, 0x50(%rax) jmp 0x4788 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
ast_create_vector: push r14 push rbx push rax mov rbx, rdx mov r14, rsi mov esi, 4 mov rdx, rcx mov rcx, r8 call ast_create_node test rax, rax jz short loc_4786 mov [rax+48h], r14 mov [rax+50h], rbx jmp short loc_4788 loc_4786: xor eax, eax loc_4788: add rsp, 8 pop rbx pop r14 retn
long long ast_create_vector(long long a1, long long a2, long long a3, long long a4, long long a5) { long long result; // rax result = ast_create_node(a1, 4, a4, a5); if ( !result ) return 0LL; *(_QWORD *)(result + 72) = a2; *(_QWORD *)(result + 80) = a3; return result; }
ast_create_vector: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI MOV ESI,0x4 MOV RDX,RCX MOV RCX,R8 CALL 0x00104648 TEST RAX,RAX JZ 0x00104786 MOV qword ptr [RAX + 0x48],R14 MOV qword ptr [RAX + 0x50],RBX JMP 0x00104788 LAB_00104786: XOR EAX,EAX LAB_00104788: ADD RSP,0x8 POP RBX POP R14 RET
long ast_create_vector(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { long lVar1; lVar1 = ast_create_node(param_1,4,param_4,param_5); if (lVar1 == 0) { lVar1 = 0; } else { *(int8 *)(lVar1 + 0x48) = param_2; *(int8 *)(lVar1 + 0x50) = param_3; } return lVar1; }
35,097
LefDefParser::lefiMacro::setSitePattern(LefDefParser::lefiSitePattern*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMacro.cpp
void lefiMacro::setSitePattern(lefiSitePattern *p) { if (numSites_ == sitesAllocated_) { lefiSitePattern **np; int i, lim; if (sitesAllocated_ == 0) { lim = sitesAllocated_ = 4; np = (lefiSitePattern**) lefMalloc(sizeof(lefiSitePattern*) * lim); } else { lim = sitesAllocated_ * 2; sitesAllocated_ = lim; np = (lefiSitePattern**) lefMalloc(sizeof(lefiSitePattern*) * lim); lim /= 2; for (i = 0; i < lim; i++) np[i] = pattern_[i]; lefFree((char*) (pattern_)); } pattern_ = np; } pattern_[numSites_] = p; numSites_ += 1; }
O3
cpp
LefDefParser::lefiMacro::setSitePattern(LefDefParser::lefiSitePattern*): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movl 0xc0(%rdi), %r12d cmpl 0xc4(%rdi), %r12d jne 0x2bc56 testl %r12d, %r12d je 0x2bc5f movslq %r12d, %rdi leal (%r12,%r12), %eax movl %eax, 0xc4(%rbx) shlq $0x4, %rdi callq 0x24985 movq %rax, %r15 testl %r12d, %r12d jle 0x2bc48 xorl %eax, %eax movq 0xc8(%rbx), %rcx movq (%rcx,%rax,8), %rcx movq %rcx, (%r15,%rax,8) incq %rax cmpq %rax, %r12 jne 0x2bc31 movq 0xc8(%rbx), %rdi callq 0x26040 jmp 0x2bc76 movq 0xc8(%rbx), %r15 jmp 0x2bc84 movl $0x4, 0xc4(%rbx) movl $0x20, %edi callq 0x24985 movq %rax, %r15 movq %r15, 0xc8(%rbx) movl 0xc0(%rbx), %r12d movslq %r12d, %rax movq %r14, (%r15,%rax,8) incl %eax movl %eax, 0xc0(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
_ZN12LefDefParser9lefiMacro14setSitePatternEPNS_15lefiSitePatternE: push r15 push r14 push r12 push rbx push rax mov r14, rsi mov rbx, rdi mov r12d, [rdi+0C0h] cmp r12d, [rdi+0C4h] jnz short loc_2BC56 test r12d, r12d jz short loc_2BC5F movsxd rdi, r12d lea eax, [r12+r12] mov [rbx+0C4h], eax shl rdi, 4; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov r15, rax test r12d, r12d jle short loc_2BC48 xor eax, eax loc_2BC31: mov rcx, [rbx+0C8h] mov rcx, [rcx+rax*8] mov [r15+rax*8], rcx inc rax cmp r12, rax jnz short loc_2BC31 loc_2BC48: mov rdi, [rbx+0C8h]; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) jmp short loc_2BC76 loc_2BC56: mov r15, [rbx+0C8h] jmp short loc_2BC84 loc_2BC5F: mov dword ptr [rbx+0C4h], 4 mov edi, offset qword_20; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov r15, rax loc_2BC76: mov [rbx+0C8h], r15 mov r12d, [rbx+0C0h] loc_2BC84: movsxd rax, r12d mov [r15+rax*8], r14 inc eax mov [rbx+0C0h], eax add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long LefDefParser::lefiMacro::setSitePattern( LefDefParser::lefiMacro *this, LefDefParser::lefiSitePattern *a2) { long long v2; // r12 long long v3; // r15 long long i; // rax long long result; // rax v2 = *((unsigned int *)this + 48); if ( (_DWORD)v2 == *((_DWORD *)this + 49) ) { if ( (_DWORD)v2 ) { *((_DWORD *)this + 49) = 2 * v2; v3 = LefDefParser::lefMalloc((LefDefParser *)(16LL * (int)v2)); if ( (int)v2 > 0 ) { for ( i = 0LL; i != v2; ++i ) *(_QWORD *)(v3 + 8 * i) = *(_QWORD *)(*((_QWORD *)this + 25) + 8 * i); } LefDefParser::lefFree(*((LefDefParser **)this + 25), a2); } else { *((_DWORD *)this + 49) = 4; v3 = LefDefParser::lefMalloc((LefDefParser *)&qword_20); } *((_QWORD *)this + 25) = v3; LODWORD(v2) = *((_DWORD *)this + 48); } else { v3 = *((_QWORD *)this + 25); } *(_QWORD *)(v3 + 8LL * (int)v2) = a2; result = (unsigned int)(v2 + 1); *((_DWORD *)this + 48) = result; return result; }
setSitePattern: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV R12D,dword ptr [RDI + 0xc0] CMP R12D,dword ptr [RDI + 0xc4] JNZ 0x0012bc56 TEST R12D,R12D JZ 0x0012bc5f MOVSXD RDI,R12D LEA EAX,[R12 + R12*0x1] MOV dword ptr [RBX + 0xc4],EAX SHL RDI,0x4 CALL 0x00124985 MOV R15,RAX TEST R12D,R12D JLE 0x0012bc48 XOR EAX,EAX LAB_0012bc31: MOV RCX,qword ptr [RBX + 0xc8] MOV RCX,qword ptr [RCX + RAX*0x8] MOV qword ptr [R15 + RAX*0x8],RCX INC RAX CMP R12,RAX JNZ 0x0012bc31 LAB_0012bc48: MOV RDI,qword ptr [RBX + 0xc8] CALL 0x00126040 JMP 0x0012bc76 LAB_0012bc56: MOV R15,qword ptr [RBX + 0xc8] JMP 0x0012bc84 LAB_0012bc5f: MOV dword ptr [RBX + 0xc4],0x4 MOV EDI,0x20 CALL 0x00124985 MOV R15,RAX LAB_0012bc76: MOV qword ptr [RBX + 0xc8],R15 MOV R12D,dword ptr [RBX + 0xc0] LAB_0012bc84: MOVSXD RAX,R12D MOV qword ptr [R15 + RAX*0x8],R14 INC EAX MOV dword ptr [RBX + 0xc0],EAX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* LefDefParser::lefiMacro::setSitePattern(LefDefParser::lefiSitePattern*) */ void __thiscall LefDefParser::lefiMacro::setSitePattern(lefiMacro *this,lefiSitePattern *param_1) { long lVar1; ulong uVar2; uint uVar3; uVar3 = *(uint *)(this + 0xc0); if (uVar3 == *(uint *)(this + 0xc4)) { if (uVar3 == 0) { *(int4 *)(this + 0xc4) = 4; lVar1 = lefMalloc((LefDefParser *)0x20,(ulong)param_1); } else { *(uint *)(this + 0xc4) = uVar3 * 2; lVar1 = lefMalloc((LefDefParser *)((long)(int)uVar3 << 4),(ulong)param_1); if (0 < (int)uVar3) { uVar2 = 0; do { *(int8 *)(lVar1 + uVar2 * 8) = *(int8 *)(*(long *)(this + 200) + uVar2 * 8); uVar2 = uVar2 + 1; } while (uVar3 != uVar2); } lefFree(*(void **)(this + 200)); } *(long *)(this + 200) = lVar1; uVar3 = *(uint *)(this + 0xc0); } else { lVar1 = *(long *)(this + 200); } *(lefiSitePattern **)(lVar1 + (long)(int)uVar3 * 8) = param_1; *(uint *)(this + 0xc0) = uVar3 + 1; return; }
35,098
ftxui::StackedContainer::SetActiveChild(ftxui::ComponentBase*)
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/component/container.cpp
void SetActiveChild(ComponentBase* child) final { if (children_.empty()) { return; } // Find `child` and put it at the beginning without change the order of the // other children. auto it = std::find_if(children_.begin(), children_.end(), [child](const Component& c) { return c.get() == child; }); if (it == children_.end()) { return; } std::rotate(children_.begin(), it, it + 1); }
O1
cpp
ftxui::StackedContainer::SetActiveChild(ftxui::ComponentBase*): pushq %rbx movq %rsi, %rdx movq %rdi, %rbx movq 0x8(%rdi), %rdi movq 0x10(%rbx), %rsi cmpq %rsi, %rdi je 0x29639 callq 0x2963b cmpq 0x10(%rbx), %rax je 0x29639 movq 0x8(%rbx), %rdi movq %rax, %rdx addq $0x10, %rdx movq %rax, %rsi popq %rbx jmp 0x296ce popq %rbx retq
_ZN5ftxui16StackedContainer14SetActiveChildEPNS_13ComponentBaseE: push rbx mov rdx, rsi mov rbx, rdi mov rdi, [rdi+8] mov rsi, [rbx+10h] cmp rdi, rsi jz short loc_29639 call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN5ftxui13ComponentBaseEESt6vectorIS5_SaIS5_EEEENS0_5__ops10_Iter_predIZNS3_16StackedContainer14SetActiveChildEPS4_EUlRKS5_E_EEET_SJ_SJ_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::ComponentBase> *,std::vector<std::shared_ptr<ftxui::ComponentBase>>>,__gnu_cxx::__ops::_Iter_pred<ftxui::StackedContainer::SetActiveChild(ftxui::ComponentBase*)::{lambda(std::shared_ptr<ftxui::ComponentBase> const&)#1}>>(__gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::ComponentBase> *,std::vector<std::shared_ptr<ftxui::ComponentBase>>>,__gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::ComponentBase> *,std::vector<std::shared_ptr<ftxui::ComponentBase>>>,__gnu_cxx::__ops::_Iter_pred<ftxui::StackedContainer::SetActiveChild(ftxui::ComponentBase*)::{lambda(std::shared_ptr<ftxui::ComponentBase> const&)#1}>,std::random_access_iterator_tag) cmp rax, [rbx+10h] jz short loc_29639 mov rdi, [rbx+8] mov rdx, rax add rdx, 10h mov rsi, rax pop rbx jmp _ZNSt3_V28__rotateIN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN5ftxui13ComponentBaseEESt6vectorIS6_SaIS6_EEEEEET_SC_SC_SC_St26random_access_iterator_tag; std::_V2::__rotate<__gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::ComponentBase> *,std::vector<std::shared_ptr<ftxui::ComponentBase>>>>(__gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::ComponentBase> *,std::vector<std::shared_ptr<ftxui::ComponentBase>>>,__gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::ComponentBase> *,std::vector<std::shared_ptr<ftxui::ComponentBase>>>,__gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::ComponentBase> *,std::vector<std::shared_ptr<ftxui::ComponentBase>>>,std::random_access_iterator_tag) loc_29639: pop rbx retn
void ftxui::StackedContainer::SetActiveChild(ftxui::StackedContainer *this, ftxui::ComponentBase *a2) { long long v4; // rdi long long v5; // rsi long long v6; // rax v4 = *((_QWORD *)this + 1); v5 = *((_QWORD *)this + 2); if ( v4 != v5 ) { v6 = std::__find_if<__gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::ComponentBase> *,std::vector<std::shared_ptr<ftxui::ComponentBase>>>,__gnu_cxx::__ops::_Iter_pred<ftxui::StackedContainer::SetActiveChild(ftxui::ComponentBase*)::{lambda(std::shared_ptr<ftxui::ComponentBase> const&)#1}>>( v4, v5, a2); if ( v6 != *((_QWORD *)this + 2) ) std::_V2::__rotate<__gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::ComponentBase> *,std::vector<std::shared_ptr<ftxui::ComponentBase>>>>( *((_QWORD *)this + 1), v6, v6 + 16); } }
SetActiveChild: PUSH RBX MOV RDX,RSI MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x8] MOV RSI,qword ptr [RBX + 0x10] CMP RDI,RSI JZ 0x00129639 CALL 0x0012963b CMP RAX,qword ptr [RBX + 0x10] JZ 0x00129639 MOV RDI,qword ptr [RBX + 0x8] MOV RDX,RAX ADD RDX,0x10 MOV RSI,RAX POP RBX JMP 0x001296ce LAB_00129639: POP RBX RET
/* ftxui::StackedContainer::SetActiveChild(ftxui::ComponentBase*) */ void __thiscall ftxui::StackedContainer::SetActiveChild(StackedContainer *this,ComponentBase *param_1) { long lVar1; if (*(long *)(this + 8) != *(long *)(this + 0x10)) { lVar1 = std:: __find_if<__gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::ComponentBase>*,std::vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>>>,__gnu_cxx::__ops::_Iter_pred<ftxui::StackedContainer::SetActiveChild(ftxui::ComponentBase*)::_lambda(std::shared_ptr<ftxui::ComponentBase>const&)_1_>> (*(long *)(this + 8),*(long *)(this + 0x10),param_1); if (lVar1 != *(long *)(this + 0x10)) { std::_V2:: __rotate<__gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::ComponentBase>*,std::vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>>>> (*(int8 *)(this + 8),lVar1,lVar1 + 0x10); return; } } return; }
35,099
dtoa_alloc
eloqsql/strings/dtoa.c
static char *dtoa_alloc(int i, Stack_alloc *alloc) { char *rv; int aligned_size= MY_ALIGN(i, SIZEOF_CHARP); if (alloc->free + aligned_size <= alloc->end) { rv= alloc->free; alloc->free+= aligned_size; } else rv= malloc(i); return rv; }
O0
c
dtoa_alloc: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movl -0x4(%rbp), %eax addl $0x8, %eax subl $0x1, %eax andl $-0x8, %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movslq -0x1c(%rbp), %rcx addq %rcx, %rax movq -0x10(%rbp), %rcx cmpq 0x10(%rcx), %rax ja 0x796aa movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rbp) movl -0x1c(%rbp), %edx movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movslq %edx, %rdx addq %rdx, %rcx movq %rcx, 0x8(%rax) jmp 0x796b7 movslq -0x4(%rbp), %rdi callq 0x243e0 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
dtoa_alloc: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov eax, [rbp+var_4] add eax, 8 sub eax, 1 and eax, 0FFFFFFF8h mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov rax, [rax+8] movsxd rcx, [rbp+var_1C] add rax, rcx mov rcx, [rbp+var_10] cmp rax, [rcx+10h] ja short loc_796AA mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_18], rax mov edx, [rbp+var_1C] mov rax, [rbp+var_10] mov rcx, [rax+8] movsxd rdx, edx add rcx, rdx mov [rax+8], rcx jmp short loc_796B7 loc_796AA: movsxd rdi, [rbp+var_4] call _malloc mov [rbp+var_18], rax loc_796B7: mov rax, [rbp+var_18] add rsp, 20h pop rbp retn
long long dtoa_alloc(int a1, long long a2) { signed int v3; // [rsp+4h] [rbp-1Ch] long long v4; // [rsp+8h] [rbp-18h] v3 = (a1 + 7) & 0xFFFFFFF8; if ( (unsigned long long)(v3 + *(_QWORD *)(a2 + 8)) > *(_QWORD *)(a2 + 16) ) return malloc(a1); v4 = *(_QWORD *)(a2 + 8); *(_QWORD *)(a2 + 8) = v3 + v4; return v4; }
dtoa_alloc: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV EAX,dword ptr [RBP + -0x4] ADD EAX,0x8 SUB EAX,0x1 AND EAX,0xfffffff8 MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOVSXD RCX,dword ptr [RBP + -0x1c] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x10] JA 0x001796aa MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x18],RAX MOV EDX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOVSXD RDX,EDX ADD RCX,RDX MOV qword ptr [RAX + 0x8],RCX JMP 0x001796b7 LAB_001796aa: MOVSXD RDI,dword ptr [RBP + -0x4] CALL 0x001243e0 MOV qword ptr [RBP + -0x18],RAX LAB_001796b7: MOV RAX,qword ptr [RBP + -0x18] ADD RSP,0x20 POP RBP RET
void * dtoa_alloc(int param_1,long param_2) { uint uVar1; int8 local_20; uVar1 = param_1 + 7U & 0xfffffff8; if (*(ulong *)(param_2 + 0x10) < (ulong)(*(long *)(param_2 + 8) + (long)(int)uVar1)) { local_20 = malloc((long)param_1); } else { local_20 = *(void **)(param_2 + 8); *(long *)(param_2 + 8) = *(long *)(param_2 + 8) + (long)(int)uVar1; } return local_20; }