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
13,600
ma_store_bin_pack_key
eloqsql/storage/maria/ma_search.c
void _ma_store_bin_pack_key(MARIA_KEYDEF *keyinfo __attribute__((unused)), register uchar *key_pos, register MARIA_KEY_PARAM *s_temp) { uchar *org_key_pos= key_pos; size_t length= s_temp->totlength - s_temp->ref_length; store_key_length_inc(key_pos,s_temp->ref_length); memcpy(key_pos, s_temp->key+s_temp->ref_length, length); key_pos+= length; if (s_temp->next_key_pos) { store_key_length_inc(key_pos,s_temp->n_ref_length); if (s_temp->prev_length) /* If we must extend key */ { memcpy(key_pos,s_temp->prev_key,s_temp->prev_length); key_pos+= s_temp->prev_length; } } s_temp->changed_length= (uint) (key_pos - org_key_pos); }
O3
c
ma_store_bin_pack_key: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %rbx movq %rsi, %r14 movl 0x20(%rdx), %eax movl 0x30(%rdx), %r12d subl %eax, %r12d cmpl $0xfe, %eax ja 0x58c1e leaq 0x1(%r14), %r15 movb %al, (%r14) jmp 0x58c33 movb $-0x1, (%r14) movzwl 0x20(%rbx), %eax rolw $0x8, %ax movw %ax, 0x1(%r14) leaq 0x3(%r14), %r15 movl 0x20(%rbx), %esi addq (%rbx), %rsi movq %r15, %rdi movq %r12, %rdx callq 0x29080 addq %r12, %r15 cmpq $0x0, 0x10(%rbx) je 0x58c8f movl 0x28(%rbx), %eax cmpl $0xfe, %eax ja 0x58c60 movb %al, (%r15) incq %r15 jmp 0x58c75 movb $-0x1, (%r15) movzwl 0x28(%rbx), %eax rolw $0x8, %ax movw %ax, 0x1(%r15) addq $0x3, %r15 movl 0x38(%rbx), %edx testq %rdx, %rdx je 0x58c8f movq 0x8(%rbx), %rsi movq %r15, %rdi callq 0x29080 movl 0x38(%rbx), %eax addq %rax, %r15 subl %r14d, %r15d movl %r15d, 0x40(%rbx) popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ma_store_bin_pack_key: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdx mov r14, rsi mov eax, [rdx+20h] mov r12d, [rdx+30h] sub r12d, eax cmp eax, 0FEh ja short loc_58C1E lea r15, [r14+1] mov [r14], al jmp short loc_58C33 loc_58C1E: mov byte ptr [r14], 0FFh movzx eax, word ptr [rbx+20h] rol ax, 8 mov [r14+1], ax lea r15, [r14+3] loc_58C33: mov esi, [rbx+20h] add rsi, [rbx] mov rdi, r15 mov rdx, r12 call _memcpy add r15, r12 cmp qword ptr [rbx+10h], 0 jz short loc_58C8F mov eax, [rbx+28h] cmp eax, 0FEh ja short loc_58C60 mov [r15], al inc r15 jmp short loc_58C75 loc_58C60: mov byte ptr [r15], 0FFh movzx eax, word ptr [rbx+28h] rol ax, 8 mov [r15+1], ax add r15, 3 loc_58C75: mov edx, [rbx+38h] test rdx, rdx jz short loc_58C8F mov rsi, [rbx+8] mov rdi, r15 call _memcpy mov eax, [rbx+38h] add r15, rax loc_58C8F: sub r15d, r14d mov [rbx+40h], r15d pop rbx pop r12 pop r14 pop r15 pop rbp retn
__int16 ma_store_bin_pack_key(long long a1, long long a2, long long a3) { unsigned int v4; // eax long long v5; // r12 long long v6; // r15 unsigned int v7; // eax _BYTE *v8; // r15 v4 = *(_DWORD *)(a3 + 32); v5 = *(_DWORD *)(a3 + 48) - v4; if ( v4 > 0xFE ) { *(_BYTE *)a2 = -1; *(_WORD *)(a2 + 1) = __ROL2__(*(_WORD *)(a3 + 32), 8); v6 = a2 + 3; } else { v6 = a2 + 1; *(_BYTE *)a2 = v4; } LOWORD(v7) = memcpy(v6, *(_QWORD *)a3 + *(unsigned int *)(a3 + 32), v5); v8 = (_BYTE *)(v5 + v6); if ( *(_QWORD *)(a3 + 16) ) { v7 = *(_DWORD *)(a3 + 40); if ( v7 > 0xFE ) { *v8 = -1; LOWORD(v7) = __ROL2__(*(_WORD *)(a3 + 40), 8); *(_WORD *)(v8 + 1) = v7; v8 += 3; } else { *v8++ = v7; } if ( *(_DWORD *)(a3 + 56) ) { memcpy(v8, *(_QWORD *)(a3 + 8), *(unsigned int *)(a3 + 56)); v7 = *(_DWORD *)(a3 + 56); LODWORD(v8) = v7 + (_DWORD)v8; } } *(_DWORD *)(a3 + 64) = (_DWORD)v8 - a2; return v7; }
_ma_store_bin_pack_key: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDX MOV R14,RSI MOV EAX,dword ptr [RDX + 0x20] MOV R12D,dword ptr [RDX + 0x30] SUB R12D,EAX CMP EAX,0xfe JA 0x00158c1e LEA R15,[R14 + 0x1] MOV byte ptr [R14],AL JMP 0x00158c33 LAB_00158c1e: MOV byte ptr [R14],0xff MOVZX EAX,word ptr [RBX + 0x20] ROL AX,0x8 MOV word ptr [R14 + 0x1],AX LEA R15,[R14 + 0x3] LAB_00158c33: MOV ESI,dword ptr [RBX + 0x20] ADD RSI,qword ptr [RBX] MOV RDI,R15 MOV RDX,R12 CALL 0x00129080 ADD R15,R12 CMP qword ptr [RBX + 0x10],0x0 JZ 0x00158c8f MOV EAX,dword ptr [RBX + 0x28] CMP EAX,0xfe JA 0x00158c60 MOV byte ptr [R15],AL INC R15 JMP 0x00158c75 LAB_00158c60: MOV byte ptr [R15],0xff MOVZX EAX,word ptr [RBX + 0x28] ROL AX,0x8 MOV word ptr [R15 + 0x1],AX ADD R15,0x3 LAB_00158c75: MOV EDX,dword ptr [RBX + 0x38] TEST RDX,RDX JZ 0x00158c8f MOV RSI,qword ptr [RBX + 0x8] MOV RDI,R15 CALL 0x00129080 MOV EAX,dword ptr [RBX + 0x38] ADD R15,RAX LAB_00158c8f: SUB R15D,R14D MOV dword ptr [RBX + 0x40],R15D POP RBX POP R12 POP R14 POP R15 POP RBP RET
void _ma_store_bin_pack_key(int8 param_1,int1 *param_2,long *param_3) { uint uVar1; ulong __n; int1 *puVar2; uVar1 = *(uint *)(param_3 + 4); __n = (ulong)((int)param_3[6] - uVar1); if (uVar1 < 0xff) { puVar2 = param_2 + 1; *param_2 = (char)uVar1; } else { *param_2 = 0xff; *(ushort *)(param_2 + 1) = *(ushort *)(param_3 + 4) << 8 | *(ushort *)(param_3 + 4) >> 8; puVar2 = param_2 + 3; } memcpy(puVar2,(void *)((ulong)*(uint *)(param_3 + 4) + *param_3),__n); puVar2 = puVar2 + __n; if (param_3[2] != 0) { if (*(uint *)(param_3 + 5) < 0xff) { *puVar2 = (char)*(uint *)(param_3 + 5); puVar2 = puVar2 + 1; } else { *puVar2 = 0xff; *(ushort *)(puVar2 + 1) = *(ushort *)(param_3 + 5) << 8 | *(ushort *)(param_3 + 5) >> 8; puVar2 = puVar2 + 3; } if ((ulong)*(uint *)(param_3 + 7) != 0) { memcpy(puVar2,(void *)param_3[1],(ulong)*(uint *)(param_3 + 7)); puVar2 = puVar2 + *(uint *)(param_3 + 7); } } *(int *)(param_3 + 8) = (int)puVar2 - (int)param_2; return; }
13,601
mthd_stmt_flush_unbuffered
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
void mthd_stmt_flush_unbuffered(MYSQL_STMT *stmt) { ulong packet_len; int in_resultset= stmt->state > MYSQL_STMT_EXECUTED && stmt->state < MYSQL_STMT_FETCH_DONE; while ((packet_len = ma_net_safe_read(stmt->mysql)) != packet_error) { uchar *pos= stmt->mysql->net.read_pos; if (!in_resultset && *pos == 0) /* OK */ { pos++; net_field_length(&pos); net_field_length(&pos); stmt->mysql->server_status= uint2korr(pos); goto end; } if (packet_len < 8 && *pos == 254) /* EOF */ { if (mariadb_connection(stmt->mysql)) { stmt->mysql->server_status= uint2korr(pos + 3); if (in_resultset) goto end; in_resultset= 1; } else goto end; } } end: stmt->state= MYSQL_STMT_FETCH_DONE; }
O3
c
mthd_stmt_flush_unbuffered: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movl 0x50(%rdi), %r12d movq 0x38(%rdi), %rdi callq 0x18ed3 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF cmpq %r14, %rax je 0x22182 addl $-0x3, %r12d xorl %r15d, %r15d cmpl $0x3, %r12d setb %r15b movq 0x38(%rbx), %rdi movq 0x20(%rdi), %r12 testl %r15d, %r15d jne 0x22117 cmpb $0x0, (%r12) je 0x22158 cmpq $0x7, %rax ja 0x2214c cmpb $-0x2, (%r12) jne 0x2214c callq 0x1926f testb %al, %al je 0x22182 movzwl 0x3(%r12), %eax movq 0x38(%rbx), %rcx movl %eax, 0x380(%rcx) testl %r15d, %r15d jne 0x22182 movq 0x38(%rbx), %rdi movl $0x1, %r15d callq 0x18ed3 cmpq %r14, %rax jne 0x22103 jmp 0x22182 incq %r12 leaq -0x28(%rbp), %r14 movq %r12, (%r14) movq %r14, %rdi callq 0x192b1 movq %r14, %rdi callq 0x192b1 movq (%r14), %rax movzwl (%rax), %eax movq 0x38(%rbx), %rcx movl %eax, 0x380(%rcx) movl $0x6, 0x50(%rbx) addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
mthd_stmt_flush_unbuffered: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov rbx, rdi mov r12d, [rdi+50h] mov rdi, [rdi+38h] call ma_net_safe_read mov r14d, 0FFFFFFFFh cmp rax, r14 jz loc_22182 add r12d, 0FFFFFFFDh xor r15d, r15d cmp r12d, 3 setb r15b loc_22103: mov rdi, [rbx+38h] mov r12, [rdi+20h] test r15d, r15d jnz short loc_22117 cmp byte ptr [r12], 0 jz short loc_22158 loc_22117: cmp rax, 7 ja short loc_2214C cmp byte ptr [r12], 0FEh jnz short loc_2214C call mariadb_connection test al, al jz short loc_22182 movzx eax, word ptr [r12+3] mov rcx, [rbx+38h] mov [rcx+380h], eax test r15d, r15d jnz short loc_22182 mov rdi, [rbx+38h] mov r15d, 1 loc_2214C: call ma_net_safe_read cmp rax, r14 jnz short loc_22103 jmp short loc_22182 loc_22158: inc r12 lea r14, [rbp+var_28] mov [r14], r12 mov rdi, r14 call net_field_length mov rdi, r14 call net_field_length mov rax, [r14] movzx eax, word ptr [rax] mov rcx, [rbx+38h] mov [rcx+380h], eax loc_22182: mov dword ptr [rbx+50h], 6 add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn
char mthd_stmt_flush_unbuffered(long long a1, long long a2, long long a3, long long a4, unsigned long long a5, int a6) { int v7; // r12d unsigned long long v8; // rax long long v9; // rdx long long v10; // rcx unsigned long long v11; // r8 int v12; // r9d BOOL v13; // r15d long long v14; // rdi long long v15; // r12 unsigned __int8 *v17[5]; // [rsp+8h] [rbp-28h] BYREF v7 = *(_DWORD *)(a1 + 80); v8 = ma_net_safe_read(*(_QWORD *)(a1 + 56), a2, a3, a4, a5, a6); if ( v8 != 0xFFFFFFFF ) { v13 = (unsigned int)(v7 - 3) < 3; while ( 1 ) { v14 = *(_QWORD *)(a1 + 56); v15 = *(_QWORD *)(v14 + 32); if ( !v13 && !*(_BYTE *)v15 ) break; if ( v8 <= 7 && *(_BYTE *)v15 == 0xFE ) { LOBYTE(v8) = mariadb_connection(v14); if ( !(_BYTE)v8 ) goto LABEL_13; LODWORD(v8) = *(unsigned __int16 *)(v15 + 3); v10 = *(_QWORD *)(a1 + 56); *(_DWORD *)(v10 + 896) = v8; if ( v13 ) goto LABEL_13; v14 = *(_QWORD *)(a1 + 56); v13 = 1; } v8 = ma_net_safe_read(v14, a2, v9, v10, v11, v12); if ( v8 == 0xFFFFFFFF ) goto LABEL_13; } v17[0] = (unsigned __int8 *)(v15 + 1); net_field_length(v17); net_field_length(v17); LODWORD(v8) = *(unsigned __int16 *)v17[0]; *(_DWORD *)(*(_QWORD *)(a1 + 56) + 896LL) = v8; } LABEL_13: *(_DWORD *)(a1 + 80) = 6; return v8; }
mthd_stmt_flush_unbuffered: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOV R12D,dword ptr [RDI + 0x50] MOV RDI,qword ptr [RDI + 0x38] CALL 0x00118ed3 MOV R14D,0xffffffff CMP RAX,R14 JZ 0x00122182 ADD R12D,-0x3 XOR R15D,R15D CMP R12D,0x3 SETC R15B LAB_00122103: MOV RDI,qword ptr [RBX + 0x38] MOV R12,qword ptr [RDI + 0x20] TEST R15D,R15D JNZ 0x00122117 CMP byte ptr [R12],0x0 JZ 0x00122158 LAB_00122117: CMP RAX,0x7 JA 0x0012214c CMP byte ptr [R12],0xfe JNZ 0x0012214c CALL 0x0011926f TEST AL,AL JZ 0x00122182 MOVZX EAX,word ptr [R12 + 0x3] MOV RCX,qword ptr [RBX + 0x38] MOV dword ptr [RCX + 0x380],EAX TEST R15D,R15D JNZ 0x00122182 MOV RDI,qword ptr [RBX + 0x38] MOV R15D,0x1 LAB_0012214c: CALL 0x00118ed3 CMP RAX,R14 JNZ 0x00122103 JMP 0x00122182 LAB_00122158: INC R12 LEA R14,[RBP + -0x28] MOV qword ptr [R14],R12 MOV RDI,R14 CALL 0x001192b1 MOV RDI,R14 CALL 0x001192b1 MOV RAX,qword ptr [R14] MOVZX EAX,word ptr [RAX] MOV RCX,qword ptr [RBX + 0x38] MOV dword ptr [RCX + 0x380],EAX LAB_00122182: MOV dword ptr [RBX + 0x50],0x6 ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET
void mthd_stmt_flush_unbuffered(long param_1) { int iVar1; char *pcVar2; char cVar3; ulong uVar4; long lVar5; bool bVar6; ushort *local_30; iVar1 = *(int *)(param_1 + 0x50); uVar4 = ma_net_safe_read(*(int8 *)(param_1 + 0x38)); if (uVar4 != 0xffffffff) { bVar6 = iVar1 - 3U < 3; while( true ) { lVar5 = *(long *)(param_1 + 0x38); pcVar2 = *(char **)(lVar5 + 0x20); if ((!bVar6) && (*pcVar2 == '\0')) break; if ((uVar4 < 8) && (*pcVar2 == -2)) { cVar3 = mariadb_connection(); if ((cVar3 == '\0') || (*(uint *)(*(long *)(param_1 + 0x38) + 0x380) = (uint)*(ushort *)(pcVar2 + 3), bVar6)) goto LAB_00122182; lVar5 = *(long *)(param_1 + 0x38); bVar6 = true; } uVar4 = ma_net_safe_read(lVar5); if (uVar4 == 0xffffffff) goto LAB_00122182; } local_30 = (ushort *)(pcVar2 + 1); net_field_length(&local_30); net_field_length(&local_30); *(uint *)(*(long *)(param_1 + 0x38) + 0x380) = (uint)*local_30; } LAB_00122182: *(int4 *)(param_1 + 0x50) = 6; return; }
13,602
mbedtls_ecdsa_genkey
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/ecdsa.c
int mbedtls_ecdsa_genkey(mbedtls_ecdsa_context *ctx, mbedtls_ecp_group_id gid, int (*f_rng)(void *, unsigned char *, size_t), void *p_rng) { int ret = 0; ECDSA_VALIDATE_RET(ctx != NULL); ECDSA_VALIDATE_RET(f_rng != NULL); ret = mbedtls_ecp_group_load(&ctx->grp, gid); if (ret != 0) { return ret; } return mbedtls_ecp_gen_keypair(&ctx->grp, &ctx->d, &ctx->Q, f_rng, p_rng); }
O3
c
mbedtls_ecdsa_genkey: pushq %r15 pushq %r14 pushq %rbx movq %rcx, %rbx movq %rdx, %r14 movq %rdi, %r15 callq 0x8769c testl %eax, %eax je 0x84091 popq %rbx popq %r14 popq %r15 retq leaq 0xf8(%r15), %rsi leaq 0x110(%r15), %rdx movq %r15, %rdi movq %r14, %rcx movq %rbx, %r8 popq %rbx popq %r14 popq %r15 jmp 0x85f7d
mbedtls_ecdsa_genkey: push r15 push r14 push rbx mov rbx, rcx mov r14, rdx mov r15, rdi call mbedtls_ecp_group_load test eax, eax jz short loc_84091 pop rbx pop r14 pop r15 retn loc_84091: lea rsi, [r15+0F8h] lea rdx, [r15+110h] mov rdi, r15 mov rcx, r14 mov r8, rbx pop rbx pop r14 pop r15 jmp mbedtls_ecp_gen_keypair
long long mbedtls_ecdsa_genkey(long long a1, long long a2, long long a3, long long a4) { long long result; // rax result = mbedtls_ecp_group_load(a1, a2); if ( !(_DWORD)result ) return mbedtls_ecp_gen_keypair(a1, a1 + 248, a1 + 272, a3, a4); return result; }
mbedtls_ecdsa_genkey: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RCX MOV R14,RDX MOV R15,RDI CALL 0x0018769c TEST EAX,EAX JZ 0x00184091 POP RBX POP R14 POP R15 RET LAB_00184091: LEA RSI,[R15 + 0xf8] LEA RDX,[R15 + 0x110] MOV RDI,R15 MOV RCX,R14 MOV R8,RBX POP RBX POP R14 POP R15 JMP 0x00185f7d
void mbedtls_ecdsa_genkey(long param_1,int8 param_2,int8 param_3,int8 param_4) { int iVar1; iVar1 = mbedtls_ecp_group_load(); if (iVar1 != 0) { return; } mbedtls_ecp_gen_keypair(param_1,param_1 + 0xf8,param_1 + 0x110,param_3,param_4); return; }
13,603
number_to_datetime_or_date
eloqsql/client/../sql-common/my_time.c
longlong number_to_datetime_or_date(longlong nr, ulong sec_part, MYSQL_TIME *time_res, ulonglong flags, int *was_cut) { long part1,part2; DBUG_ASSERT(C_FLAGS_OK(flags)); *was_cut= 0; time_res->time_type=MYSQL_TIMESTAMP_DATE; if (nr == 0 || nr >= 10000101000000LL) { time_res->time_type=MYSQL_TIMESTAMP_DATETIME; goto ok; } if (nr < 101) goto err; if (nr <= (YY_PART_YEAR-1)*10000L+1231L) { nr= (nr+20000000L)*1000000L; /* YYMMDD, year: 2000-2069 */ goto ok; } if (nr < (YY_PART_YEAR)*10000L+101L) goto err; if (nr <= 991231L) { nr= (nr+19000000L)*1000000L; /* YYMMDD, year: 1970-1999 */ goto ok; } if (nr < 10000101L) goto err; if (nr <= 99991231L) { nr= nr*1000000L; goto ok; } if (nr < 101000000L) goto err; time_res->time_type=MYSQL_TIMESTAMP_DATETIME; if (nr <= (YY_PART_YEAR-1)*10000000000LL+1231235959LL) { nr= nr+20000000000000LL; /* YYMMDDHHMMSS, 2000-2069 */ goto ok; } if (nr < YY_PART_YEAR*10000000000LL+ 101000000LL) goto err; if (nr <= 991231235959LL) nr= nr+19000000000000LL; /* YYMMDDHHMMSS, 1970-1999 */ ok: part1=(long) (nr/1000000LL); part2=(long) (nr - (longlong) part1*1000000LL); time_res->year= (int) (part1/10000L); part1%=10000L; time_res->month= (int) part1 / 100; time_res->day= (int) part1 % 100; time_res->hour= (int) (part2/10000L); part2%=10000L; time_res->minute=(int) part2 / 100; time_res->second=(int) part2 % 100; time_res->second_part= sec_part; time_res->neg= 0; if (time_res->year <= 9999 && time_res->month <= 12 && time_res->day <= 31 && time_res->hour <= 23 && time_res->minute <= 59 && time_res->second <= 59 && sec_part <= TIME_MAX_SECOND_PART && !check_date(time_res, nr || sec_part, flags, was_cut)) { if (time_res->time_type == MYSQL_TIMESTAMP_DATE && sec_part != 0) { /* Date format, but with fractional digits, e.g. 20010203.5 */ *was_cut= MYSQL_TIME_NOTE_TRUNCATED; time_res->second_part= 0; } return nr; } /* Don't want to have was_cut get set if NO_ZERO_DATE was violated. */ if (nr || !(flags & C_TIME_NO_ZERO_DATE)) *was_cut= MYSQL_TIME_WARN_TRUNCATED; return -1; err: { /* reset everything except time_type */ enum enum_mysql_timestamp_type save= time_res->time_type; bzero((char*) time_res, sizeof(*time_res)); time_res->time_type= save; /* Restore range */ *was_cut= MYSQL_TIME_WARN_TRUNCATED; /* Found invalid date */ } return -1; }
O0
c
number_to_datetime_or_date: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) jmp 0x49aae movq -0x30(%rbp), %rax movl $0x0, (%rax) movq -0x20(%rbp), %rax movl $0x0, 0x24(%rax) cmpq $0x0, -0x10(%rbp) je 0x49ada movabsq $0x9185477c340, %rax # imm = 0x9185477C340 cmpq %rax, -0x10(%rbp) jl 0x49aea movq -0x20(%rbp), %rax movl $0x1, 0x24(%rax) jmp 0x49beb cmpq $0x65, -0x10(%rbp) jge 0x49af6 jmp 0x49db9 cmpq $0xa8c1f, -0x10(%rbp) # imm = 0xA8C1F jg 0x49b1a movq -0x10(%rbp), %rax addq $0x1312d00, %rax # imm = 0x1312D00 imulq $0xf4240, %rax, %rax # imm = 0xF4240 movq %rax, -0x10(%rbp) jmp 0x49beb cmpq $0xaaec5, -0x10(%rbp) # imm = 0xAAEC5 jge 0x49b29 jmp 0x49db9 cmpq $0xf1fff, -0x10(%rbp) # imm = 0xF1FFF jg 0x49b4d movq -0x10(%rbp), %rax addq $0x121eac0, %rax # imm = 0x121EAC0 imulq $0xf4240, %rax, %rax # imm = 0xF4240 movq %rax, -0x10(%rbp) jmp 0x49beb cmpq $0x9896e5, -0x10(%rbp) # imm = 0x9896E5 jge 0x49b5c jmp 0x49db9 cmpq $0x5f5bebf, -0x10(%rbp) # imm = 0x5F5BEBF jg 0x49b74 imulq $0xf4240, -0x10(%rbp), %rax # imm = 0xF4240 movq %rax, -0x10(%rbp) jmp 0x49beb cmpq $0x6052340, -0x10(%rbp) # imm = 0x6052340 jge 0x49b83 jmp 0x49db9 movq -0x20(%rbp), %rax movl $0x1, 0x24(%rax) movabsq $0xa0f0979f77, %rax # imm = 0xA0F0979F77 cmpq %rax, -0x10(%rbp) jg 0x49bb2 movabsq $0x12309ce54000, %rax # imm = 0x12309CE54000 addq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0x49beb movabsq $0xa301457b40, %rax # imm = 0xA301457B40 cmpq %rax, -0x10(%rbp) jge 0x49bc7 jmp 0x49db9 movabsq $0xe6c9fc5777, %rax # imm = 0xE6C9FC5777 cmpq %rax, -0x10(%rbp) jg 0x49be9 movabsq $0x1147c8403000, %rax # imm = 0x1147C8403000 addq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0x49beb movq -0x10(%rbp), %rax movl $0xf4240, %ecx # imm = 0xF4240 cqto idivq %rcx movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax imulq $0xf4240, -0x38(%rbp), %rcx # imm = 0xF4240 subq %rcx, %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rax movl $0x2710, %ecx # imm = 0x2710 cqto idivq %rcx movl %eax, %ecx movq -0x20(%rbp), %rax movl %ecx, (%rax) movq -0x38(%rbp), %rax movl $0x2710, %ecx # imm = 0x2710 cqto idivq %rcx movq %rdx, -0x38(%rbp) movq -0x38(%rbp), %rax movl $0x64, %ecx cltd idivl %ecx movl %eax, %ecx movq -0x20(%rbp), %rax movl %ecx, 0x4(%rax) movq -0x38(%rbp), %rax movl $0x64, %ecx cltd idivl %ecx movq -0x20(%rbp), %rax movl %edx, 0x8(%rax) movq -0x40(%rbp), %rax movl $0x2710, %ecx # imm = 0x2710 cqto idivq %rcx movl %eax, %ecx movq -0x20(%rbp), %rax movl %ecx, 0xc(%rax) movq -0x40(%rbp), %rax movl $0x2710, %ecx # imm = 0x2710 cqto idivq %rcx movq %rdx, -0x40(%rbp) movq -0x40(%rbp), %rax movl $0x64, %ecx cltd idivl %ecx movl %eax, %ecx movq -0x20(%rbp), %rax movl %ecx, 0x10(%rax) movq -0x40(%rbp), %rax movl $0x64, %ecx cltd idivl %ecx movq -0x20(%rbp), %rax movl %edx, 0x14(%rax) movq -0x18(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x20(%rbp), %rax movb $0x0, 0x20(%rax) movq -0x20(%rbp), %rax cmpl $0x270f, (%rax) # imm = 0x270F ja 0x49d8e movq -0x20(%rbp), %rax cmpl $0xc, 0x4(%rax) ja 0x49d8e movq -0x20(%rbp), %rax cmpl $0x1f, 0x8(%rax) ja 0x49d8e movq -0x20(%rbp), %rax cmpl $0x17, 0xc(%rax) ja 0x49d8e movq -0x20(%rbp), %rax cmpl $0x3b, 0x10(%rax) ja 0x49d8e movq -0x20(%rbp), %rax cmpl $0x3b, 0x14(%rax) ja 0x49d8e cmpq $0xf423f, -0x18(%rbp) # imm = 0xF423F ja 0x49d8e movq -0x20(%rbp), %rax movq %rax, -0x50(%rbp) movb $0x1, %al cmpq $0x0, -0x10(%rbp) movb %al, -0x45(%rbp) jne 0x49d40 cmpq $0x0, -0x18(%rbp) setne %al movb %al, -0x45(%rbp) movq -0x50(%rbp), %rdi movb -0x45(%rbp), %al andb $0x1, %al movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx movsbl %al, %esi callq 0x474b0 cmpb $0x0, %al jne 0x49d8e movq -0x20(%rbp), %rax cmpl $0x0, 0x24(%rax) jne 0x49d84 cmpq $0x0, -0x18(%rbp) je 0x49d84 movq -0x30(%rbp), %rax movl $0x10, (%rax) movq -0x20(%rbp), %rax movq $0x0, 0x18(%rax) movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x49def cmpq $0x0, -0x10(%rbp) jne 0x49da5 movq -0x28(%rbp), %rax andq $0x1000000, %rax # imm = 0x1000000 cmpq $0x0, %rax jne 0x49daf movq -0x30(%rbp), %rax movl $0x1, (%rax) movq $-0x1, -0x8(%rbp) jmp 0x49def movq -0x20(%rbp), %rax movl 0x24(%rax), %eax movl %eax, -0x44(%rbp) movq -0x20(%rbp), %rdi xorl %esi, %esi movl $0x28, %edx callq 0x3b390 movl -0x44(%rbp), %ecx movq -0x20(%rbp), %rax movl %ecx, 0x24(%rax) movq -0x30(%rbp), %rax movl $0x1, (%rax) movq $-0x1, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopl (%rax)
number_to_datetime_or_date: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 jmp short $+2 loc_49AAE: mov rax, [rbp+var_30] mov dword ptr [rax], 0 mov rax, [rbp+var_20] mov dword ptr [rax+24h], 0 cmp [rbp+var_10], 0 jz short loc_49ADA mov rax, 9185477C340h cmp [rbp+var_10], rax jl short loc_49AEA loc_49ADA: mov rax, [rbp+var_20] mov dword ptr [rax+24h], 1 jmp loc_49BEB loc_49AEA: cmp [rbp+var_10], 65h ; 'e' jge short loc_49AF6 jmp loc_49DB9 loc_49AF6: cmp [rbp+var_10], 0A8C1Fh jg short loc_49B1A mov rax, [rbp+var_10] add rax, 1312D00h imul rax, 0F4240h mov [rbp+var_10], rax jmp loc_49BEB loc_49B1A: cmp [rbp+var_10], 0AAEC5h jge short loc_49B29 jmp loc_49DB9 loc_49B29: cmp [rbp+var_10], 0F1FFFh jg short loc_49B4D mov rax, [rbp+var_10] add rax, 121EAC0h imul rax, 0F4240h mov [rbp+var_10], rax jmp loc_49BEB loc_49B4D: cmp [rbp+var_10], 9896E5h jge short loc_49B5C jmp loc_49DB9 loc_49B5C: cmp [rbp+var_10], 5F5BEBFh jg short loc_49B74 imul rax, [rbp+var_10], 0F4240h mov [rbp+var_10], rax jmp short loc_49BEB loc_49B74: cmp [rbp+var_10], 6052340h jge short loc_49B83 jmp loc_49DB9 loc_49B83: mov rax, [rbp+var_20] mov dword ptr [rax+24h], 1 mov rax, 0A0F0979F77h cmp [rbp+var_10], rax jg short loc_49BB2 mov rax, 12309CE54000h add rax, [rbp+var_10] mov [rbp+var_10], rax jmp short loc_49BEB loc_49BB2: mov rax, 0A301457B40h cmp [rbp+var_10], rax jge short loc_49BC7 jmp loc_49DB9 loc_49BC7: mov rax, 0E6C9FC5777h cmp [rbp+var_10], rax jg short loc_49BE9 mov rax, 1147C8403000h add rax, [rbp+var_10] mov [rbp+var_10], rax loc_49BE9: jmp short $+2 loc_49BEB: mov rax, [rbp+var_10] mov ecx, 0F4240h cqo idiv rcx mov [rbp+var_38], rax mov rax, [rbp+var_10] imul rcx, [rbp+var_38], 0F4240h sub rax, rcx mov [rbp+var_40], rax mov rax, [rbp+var_38] mov ecx, 2710h cqo idiv rcx mov ecx, eax mov rax, [rbp+var_20] mov [rax], ecx mov rax, [rbp+var_38] mov ecx, 2710h cqo idiv rcx mov [rbp+var_38], rdx mov rax, [rbp+var_38] mov ecx, 64h ; 'd' cdq idiv ecx mov ecx, eax mov rax, [rbp+var_20] mov [rax+4], ecx mov rax, [rbp+var_38] mov ecx, 64h ; 'd' cdq idiv ecx mov rax, [rbp+var_20] mov [rax+8], edx mov rax, [rbp+var_40] mov ecx, 2710h cqo idiv rcx mov ecx, eax mov rax, [rbp+var_20] mov [rax+0Ch], ecx mov rax, [rbp+var_40] mov ecx, 2710h cqo idiv rcx mov [rbp+var_40], rdx mov rax, [rbp+var_40] mov ecx, 64h ; 'd' cdq idiv ecx mov ecx, eax mov rax, [rbp+var_20] mov [rax+10h], ecx mov rax, [rbp+var_40] mov ecx, 64h ; 'd' cdq idiv ecx mov rax, [rbp+var_20] mov [rax+14h], edx mov rcx, [rbp+var_18] mov rax, [rbp+var_20] mov [rax+18h], rcx mov rax, [rbp+var_20] mov byte ptr [rax+20h], 0 mov rax, [rbp+var_20] cmp dword ptr [rax], 270Fh ja loc_49D8E mov rax, [rbp+var_20] cmp dword ptr [rax+4], 0Ch ja loc_49D8E mov rax, [rbp+var_20] cmp dword ptr [rax+8], 1Fh ja loc_49D8E mov rax, [rbp+var_20] cmp dword ptr [rax+0Ch], 17h ja loc_49D8E mov rax, [rbp+var_20] cmp dword ptr [rax+10h], 3Bh ; ';' ja loc_49D8E mov rax, [rbp+var_20] cmp dword ptr [rax+14h], 3Bh ; ';' ja short loc_49D8E cmp [rbp+var_18], offset loc_F423F ja short loc_49D8E mov rax, [rbp+var_20] mov [rbp+var_50], rax mov al, 1 cmp [rbp+var_10], 0 mov [rbp+var_45], al jnz short loc_49D40 cmp [rbp+var_18], 0 setnz al mov [rbp+var_45], al loc_49D40: mov rdi, [rbp+var_50] mov al, [rbp+var_45] and al, 1 mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] movsx esi, al call check_date cmp al, 0 jnz short loc_49D8E mov rax, [rbp+var_20] cmp dword ptr [rax+24h], 0 jnz short loc_49D84 cmp [rbp+var_18], 0 jz short loc_49D84 mov rax, [rbp+var_30] mov dword ptr [rax], 10h mov rax, [rbp+var_20] mov qword ptr [rax+18h], 0 loc_49D84: mov rax, [rbp+var_10] mov [rbp+var_8], rax jmp short loc_49DEF loc_49D8E: cmp [rbp+var_10], 0 jnz short loc_49DA5 mov rax, [rbp+var_28] and rax, 1000000h cmp rax, 0 jnz short loc_49DAF loc_49DA5: mov rax, [rbp+var_30] mov dword ptr [rax], 1 loc_49DAF: mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_49DEF loc_49DB9: mov rax, [rbp+var_20] mov eax, [rax+24h] mov [rbp+var_44], eax mov rdi, [rbp+var_20] xor esi, esi mov edx, 28h ; '(' call _memset mov ecx, [rbp+var_44] mov rax, [rbp+var_20] mov [rax+24h], ecx mov rax, [rbp+var_30] mov dword ptr [rax], 1 mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh loc_49DEF: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
long long number_to_datetime_or_date(long long a1, unsigned long long a2, long long a3, int a4, _DWORD *a5) { bool v6; // [rsp+Bh] [rbp-45h] int v7; // [rsp+Ch] [rbp-44h] long long v8; // [rsp+10h] [rbp-40h] long long v9; // [rsp+18h] [rbp-38h] long long v13; // [rsp+40h] [rbp-10h] v13 = a1; *a5 = 0; *(_DWORD *)(a3 + 36) = 0; if ( !a1 || a1 >= 10000101000000LL ) { *(_DWORD *)(a3 + 36) = 1; goto LABEL_19; } if ( a1 < 101 ) goto LABEL_37; if ( a1 <= 691231 ) { v13 = 1000000 * (a1 + 20000000); goto LABEL_19; } if ( a1 < 700101 ) goto LABEL_37; if ( a1 <= 991231 ) { v13 = 1000000 * (a1 + 19000000); goto LABEL_19; } if ( a1 < 10000101 ) goto LABEL_37; if ( a1 <= 99991231 ) { v13 = 1000000 * a1; goto LABEL_19; } if ( a1 < 101000000 ) { LABEL_37: v7 = *(_DWORD *)(a3 + 36); memset(a3, 0LL, 40LL); *(_DWORD *)(a3 + 36) = v7; *a5 = 1; return -1LL; } *(_DWORD *)(a3 + 36) = 1; if ( a1 > 0xA0F0979F77LL ) { if ( a1 >= 700101000000LL ) { if ( a1 <= 0xE6C9FC5777LL ) v13 = a1 + 19000000000000LL; goto LABEL_19; } goto LABEL_37; } v13 = a1 + 20000000000000LL; LABEL_19: *(_DWORD *)a3 = v13 / 1000000 / 10000; v9 = v13 / 1000000 % 10000; *(_DWORD *)(a3 + 4) = (int)v9 / 100; *(_DWORD *)(a3 + 8) = (int)v9 % 100; *(_DWORD *)(a3 + 12) = v13 % 1000000 / 10000; v8 = v13 % 1000000 % 10000; *(_DWORD *)(a3 + 16) = (int)v8 / 100; *(_DWORD *)(a3 + 20) = (int)v8 % 100; *(_QWORD *)(a3 + 24) = a2; *(_BYTE *)(a3 + 32) = 0; if ( *(_DWORD *)a3 > 0x270Fu || *(_DWORD *)(a3 + 4) > 0xCu || *(_DWORD *)(a3 + 8) > 0x1Fu || *(_DWORD *)(a3 + 12) > 0x17u || *(_DWORD *)(a3 + 16) > 0x3Bu || *(_DWORD *)(a3 + 20) > 0x3Bu || a2 > (unsigned long long)&loc_F423F ) { goto LABEL_34; } v6 = 1; if ( !v13 ) v6 = a2 != 0; if ( check_date(a3, v6, a4, a5) ) { LABEL_34: if ( v13 || (a4 & 0x1000000) == 0 ) *a5 = 1; return -1LL; } else { if ( !*(_DWORD *)(a3 + 36) && a2 ) { *a5 = 16; *(_QWORD *)(a3 + 24) = 0LL; } return v13; } }
number_to_datetime_or_date: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 JMP 0x00149aae LAB_00149aae: MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x24],0x0 CMP qword ptr [RBP + -0x10],0x0 JZ 0x00149ada MOV RAX,0x9185477c340 CMP qword ptr [RBP + -0x10],RAX JL 0x00149aea LAB_00149ada: MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x24],0x1 JMP 0x00149beb LAB_00149aea: CMP qword ptr [RBP + -0x10],0x65 JGE 0x00149af6 JMP 0x00149db9 LAB_00149af6: CMP qword ptr [RBP + -0x10],0xa8c1f JG 0x00149b1a MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1312d00 IMUL RAX,RAX,0xf4240 MOV qword ptr [RBP + -0x10],RAX JMP 0x00149beb LAB_00149b1a: CMP qword ptr [RBP + -0x10],0xaaec5 JGE 0x00149b29 JMP 0x00149db9 LAB_00149b29: CMP qword ptr [RBP + -0x10],0xf1fff JG 0x00149b4d MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x121eac0 IMUL RAX,RAX,0xf4240 MOV qword ptr [RBP + -0x10],RAX JMP 0x00149beb LAB_00149b4d: CMP qword ptr [RBP + -0x10],0x9896e5 JGE 0x00149b5c JMP 0x00149db9 LAB_00149b5c: CMP qword ptr [RBP + -0x10],0x5f5bebf JG 0x00149b74 IMUL RAX,qword ptr [RBP + -0x10],0xf4240 MOV qword ptr [RBP + -0x10],RAX JMP 0x00149beb LAB_00149b74: CMP qword ptr [RBP + -0x10],0x6052340 JGE 0x00149b83 JMP 0x00149db9 LAB_00149b83: MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x24],0x1 MOV RAX,0xa0f0979f77 CMP qword ptr [RBP + -0x10],RAX JG 0x00149bb2 MOV RAX,0x12309ce54000 ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX JMP 0x00149beb LAB_00149bb2: MOV RAX,0xa301457b40 CMP qword ptr [RBP + -0x10],RAX JGE 0x00149bc7 JMP 0x00149db9 LAB_00149bc7: MOV RAX,0xe6c9fc5777 CMP qword ptr [RBP + -0x10],RAX JG 0x00149be9 MOV RAX,0x1147c8403000 ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX LAB_00149be9: JMP 0x00149beb LAB_00149beb: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,0xf4240 CQO IDIV RCX MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] IMUL RCX,qword ptr [RBP + -0x38],0xf4240 SUB RAX,RCX MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,0x2710 CQO IDIV RCX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,0x2710 CQO IDIV RCX MOV qword ptr [RBP + -0x38],RDX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,0x64 CDQ IDIV ECX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x4],ECX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,0x64 CDQ IDIV ECX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x8],EDX MOV RAX,qword ptr [RBP + -0x40] MOV ECX,0x2710 CQO IDIV RCX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0xc],ECX MOV RAX,qword ptr [RBP + -0x40] MOV ECX,0x2710 CQO IDIV RCX MOV qword ptr [RBP + -0x40],RDX MOV RAX,qword ptr [RBP + -0x40] MOV ECX,0x64 CDQ IDIV ECX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x40] MOV ECX,0x64 CDQ IDIV ECX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x14],EDX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x20],0x0 MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX],0x270f JA 0x00149d8e MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x4],0xc JA 0x00149d8e MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x8],0x1f JA 0x00149d8e MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0xc],0x17 JA 0x00149d8e MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x10],0x3b JA 0x00149d8e MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x14],0x3b JA 0x00149d8e CMP qword ptr [RBP + -0x18],0xf423f JA 0x00149d8e MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x50],RAX MOV AL,0x1 CMP qword ptr [RBP + -0x10],0x0 MOV byte ptr [RBP + -0x45],AL JNZ 0x00149d40 CMP qword ptr [RBP + -0x18],0x0 SETNZ AL MOV byte ptr [RBP + -0x45],AL LAB_00149d40: MOV RDI,qword ptr [RBP + -0x50] MOV AL,byte ptr [RBP + -0x45] AND AL,0x1 MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] MOVSX ESI,AL CALL 0x001474b0 CMP AL,0x0 JNZ 0x00149d8e MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x24],0x0 JNZ 0x00149d84 CMP qword ptr [RBP + -0x18],0x0 JZ 0x00149d84 MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],0x10 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x18],0x0 LAB_00149d84: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX JMP 0x00149def LAB_00149d8e: CMP qword ptr [RBP + -0x10],0x0 JNZ 0x00149da5 MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x1000000 CMP RAX,0x0 JNZ 0x00149daf LAB_00149da5: MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],0x1 LAB_00149daf: MOV qword ptr [RBP + -0x8],-0x1 JMP 0x00149def LAB_00149db9: MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x24] MOV dword ptr [RBP + -0x44],EAX MOV RDI,qword ptr [RBP + -0x20] XOR ESI,ESI MOV EDX,0x28 CALL 0x0013b390 MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x24],ECX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],0x1 MOV qword ptr [RBP + -0x8],-0x1 LAB_00149def: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
long number_to_datetime_or_date (long param_1,ulong param_2,uint *param_3,ulong param_4,int4 *param_5) { char cVar1; uint uVar2; ulong uVar3; bool local_4d; long local_18; *param_5 = 0; param_3[9] = 0; local_18 = param_1; if ((param_1 == 0) || (0x9185477c33f < param_1)) { param_3[9] = 1; } else { if (param_1 < 0x65) { LAB_00149db9: uVar2 = param_3[9]; memset(param_3,0,0x28); param_3[9] = uVar2; *param_5 = 1; return -1; } if (param_1 < 0xa8c20) { local_18 = (param_1 + 20000000) * 1000000; } else { if (param_1 < 0xaaec5) goto LAB_00149db9; if (param_1 < 0xf2000) { local_18 = (param_1 + 19000000) * 1000000; } else { if (param_1 < 0x9896e5) goto LAB_00149db9; if (param_1 < 0x5f5bec0) { local_18 = param_1 * 1000000; } else { if (param_1 < 101000000) goto LAB_00149db9; param_3[9] = 1; if (param_1 < 0xa0f0979f78) { local_18 = param_1 + 20000000000000; } else { if (param_1 < 0xa301457b40) goto LAB_00149db9; if (param_1 < 0xe6c9fc5778) { local_18 = param_1 + 19000000000000; } } } } } } *param_3 = (uint)((local_18 / 1000000) / 10000); uVar3 = (local_18 / 1000000) % 10000; uVar2 = (int)uVar3 >> 0x1f; param_3[1] = (uint)((long)((ulong)uVar2 << 0x20 | uVar3 & 0xffffffff) / 100); param_3[2] = (uint)((long)((ulong)uVar2 << 0x20 | uVar3 & 0xffffffff) % 100); param_3[3] = (uint)((local_18 % 1000000) / 10000); uVar3 = (local_18 % 1000000) % 10000; uVar2 = (int)uVar3 >> 0x1f; param_3[4] = (uint)((long)((ulong)uVar2 << 0x20 | uVar3 & 0xffffffff) / 100); param_3[5] = (uint)((long)((ulong)uVar2 << 0x20 | uVar3 & 0xffffffff) % 100); *(ulong *)(param_3 + 6) = param_2; *(int1 *)(param_3 + 8) = 0; if (((((*param_3 < 10000) && (param_3[1] < 0xd)) && (param_3[2] < 0x20)) && ((param_3[3] < 0x18 && (param_3[4] < 0x3c)))) && ((param_3[5] < 0x3c && (param_2 < 1000000)))) { local_4d = local_18 != 0 || param_2 != 0; cVar1 = check_date(param_3,local_4d,param_4,param_5); if (cVar1 == '\0') { if ((param_3[9] == 0) && (param_2 != 0)) { *param_5 = 0x10; param_3[6] = 0; param_3[7] = 0; } return local_18; } } if ((local_18 != 0) || ((param_4 & 0x1000000) == 0)) { *param_5 = 1; } return -1; }
13,604
number_to_datetime_or_date
eloqsql/client/../sql-common/my_time.c
longlong number_to_datetime_or_date(longlong nr, ulong sec_part, MYSQL_TIME *time_res, ulonglong flags, int *was_cut) { long part1,part2; DBUG_ASSERT(C_FLAGS_OK(flags)); *was_cut= 0; time_res->time_type=MYSQL_TIMESTAMP_DATE; if (nr == 0 || nr >= 10000101000000LL) { time_res->time_type=MYSQL_TIMESTAMP_DATETIME; goto ok; } if (nr < 101) goto err; if (nr <= (YY_PART_YEAR-1)*10000L+1231L) { nr= (nr+20000000L)*1000000L; /* YYMMDD, year: 2000-2069 */ goto ok; } if (nr < (YY_PART_YEAR)*10000L+101L) goto err; if (nr <= 991231L) { nr= (nr+19000000L)*1000000L; /* YYMMDD, year: 1970-1999 */ goto ok; } if (nr < 10000101L) goto err; if (nr <= 99991231L) { nr= nr*1000000L; goto ok; } if (nr < 101000000L) goto err; time_res->time_type=MYSQL_TIMESTAMP_DATETIME; if (nr <= (YY_PART_YEAR-1)*10000000000LL+1231235959LL) { nr= nr+20000000000000LL; /* YYMMDDHHMMSS, 2000-2069 */ goto ok; } if (nr < YY_PART_YEAR*10000000000LL+ 101000000LL) goto err; if (nr <= 991231235959LL) nr= nr+19000000000000LL; /* YYMMDDHHMMSS, 1970-1999 */ ok: part1=(long) (nr/1000000LL); part2=(long) (nr - (longlong) part1*1000000LL); time_res->year= (int) (part1/10000L); part1%=10000L; time_res->month= (int) part1 / 100; time_res->day= (int) part1 % 100; time_res->hour= (int) (part2/10000L); part2%=10000L; time_res->minute=(int) part2 / 100; time_res->second=(int) part2 % 100; time_res->second_part= sec_part; time_res->neg= 0; if (time_res->year <= 9999 && time_res->month <= 12 && time_res->day <= 31 && time_res->hour <= 23 && time_res->minute <= 59 && time_res->second <= 59 && sec_part <= TIME_MAX_SECOND_PART && !check_date(time_res, nr || sec_part, flags, was_cut)) { if (time_res->time_type == MYSQL_TIMESTAMP_DATE && sec_part != 0) { /* Date format, but with fractional digits, e.g. 20010203.5 */ *was_cut= MYSQL_TIME_NOTE_TRUNCATED; time_res->second_part= 0; } return nr; } /* Don't want to have was_cut get set if NO_ZERO_DATE was violated. */ if (nr || !(flags & C_TIME_NO_ZERO_DATE)) *was_cut= MYSQL_TIME_WARN_TRUNCATED; return -1; err: { /* reset everything except time_type */ enum enum_mysql_timestamp_type save= time_res->time_type; bzero((char*) time_res, sizeof(*time_res)); time_res->time_type= save; /* Restore range */ *was_cut= MYSQL_TIME_WARN_TRUNCATED; /* Found invalid date */ } return -1; }
O3
c
number_to_datetime_or_date: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %rbx movq %rcx, %r12 movq %rdx, %r14 movq %rsi, %r13 movq %rdi, %r15 xorl %eax, %eax movl %eax, (%r8) movl %eax, 0x24(%rdx) testq %rdi, %rdi setne %cl movabsq $0x9185477c340, %rdx # imm = 0x9185477C340 cmpq %rdx, %rdi setl %dl testb %dl, %cl jne 0x468cc movl $0x1, 0x24(%r14) jmp 0x4691d cmpq $0x65, %r15 jge 0x468fc xorps %xmm0, %xmm0 movups %xmm0, 0x10(%r14) movups %xmm0, (%r14) movq $0x0, 0x20(%r14) movl %eax, 0x24(%r14) movl $0x1, (%rbx) movq $-0x1, %rax jmp 0x46a55 cmpq $0xa8c1f, %r15 # imm = 0xA8C1F ja 0x46a64 imulq $0xf4240, %r15, %rax # imm = 0xF4240 movabsq $0x12309ce54000, %r15 # imm = 0x12309CE54000 addq %rax, %r15 movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB movq %r15, %rax mulq %rcx movq %rdx, %rsi shrq $0x12, %rsi imulq $-0xf4240, %rsi, %rcx # imm = 0xFFF0BDC0 addq %r15, %rcx movabsq $-0x2419013142122a41, %rdx # imm = 0xDBE6FECEBDEDD5BF movq %r15, %rax mulq %rdx shrq $0x21, %rdx movl %edx, (%r14) movabsq $0x68db8bac710cc, %rdx # imm = 0x68DB8BAC710CC movq %rsi, %rax mulq %rdx imulq $0x2710, %rdx, %rax # imm = 0x2710 subq %rax, %rsi imull $0x147b, %esi, %eax # imm = 0x147B shrl $0x13, %eax movl %eax, 0x4(%r14) imull $0x64, %eax, %eax movl %esi, %edi subl %eax, %edi movzwl %di, %r8d movabsq $0x346dc5d63886594b, %rdx # imm = 0x346DC5D63886594B movq %rcx, %rax imulq %rdx movl %r8d, 0x8(%r14) movq %rdx, %rax shrq $0x3f, %rax shrq $0xb, %rdx addl %eax, %edx movl %edx, 0xc(%r14) imull $0x2710, %edx, %eax # imm = 0x2710 subl %eax, %ecx movswl %cx, %eax imull $0x147b, %eax, %eax # imm = 0x147B movl %eax, %r8d shrl $0x1f, %r8d sarl $0x13, %eax addl %r8d, %eax movl %eax, 0x10(%r14) imull $0x64, %eax, %r8d subl %r8d, %ecx movswl %cx, %r8d movl %r8d, 0x14(%r14) movq %r13, 0x18(%r14) movb $0x0, 0x20(%r14) movabsq $0x5af3107a3fff, %r8 # imm = 0x5AF3107A3FFF cmpq %r8, %r15 ja 0x46a3c cmpq $0x513, %rsi # imm = 0x513 ja 0x46a3c cmpw $0x1f, %di ja 0x46a3c cmpl $0x17, %edx ja 0x46a3c cmpw $0x3b, %ax ja 0x46a3c cmpq $0xf423f, %r13 # imm = 0xF423F ja 0x46a3c cmpw $0x3b, %cx ja 0x46a3c xorl %esi, %esi movq %r15, %rax orq %r13, %rax setne %sil movq %r14, %rdi movq %r12, %rdx movq %rbx, %rcx callq 0x44e1b testb %al, %al je 0x46a90 btl $0x18, %r12d movq $-0x1, %rax jae 0x46a4f testq %r15, %r15 je 0x46a55 movl $0x1, (%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpq $0xaaec5, %r15 # imm = 0xAAEC5 jb 0x468d2 cmpq $0xf1fff, %r15 # imm = 0xF1FFF ja 0x46aaf imulq $0xf4240, %r15, %rax # imm = 0xF4240 movabsq $0x1147c8403000, %r15 # imm = 0x1147C8403000 jmp 0x4691a testq %r13, %r13 je 0x46aaa cmpl $0x0, 0x24(%r14) jne 0x46aaa movl $0x10, (%rbx) movq $0x0, 0x18(%r14) movq %r15, %rax jmp 0x46a55 cmpq $0x9896e5, %r15 # imm = 0x9896E5 jb 0x468d2 cmpq $0x5f5bebf, %r15 # imm = 0x5F5BEBF ja 0x46ad1 imulq $0xf4240, %r15, %r15 # imm = 0xF4240 jmp 0x4691d cmpq $0x6052340, %r15 # imm = 0x6052340 jb 0x468d2 movl $0x1, 0x24(%r14) movabsq $0xa0f0979f77, %rax # imm = 0xA0F0979F77 cmpq %rax, %r15 ja 0x46b04 movabsq $0x12309ce54000, %rax # imm = 0x12309CE54000 jmp 0x4691a movl $0x1, %eax movabsq $0xa301457b40, %rcx # imm = 0xA301457B40 cmpq %rcx, %r15 jb 0x468d2 movabsq $0x1147c8403000, %rax # imm = 0x1147C8403000 addq %r15, %rax movabsq $0xe6c9fc5778, %rcx # imm = 0xE6C9FC5778 cmpq %rcx, %r15 cmovbq %rax, %r15 jmp 0x4691d
number_to_datetime_or_date: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, r8 mov r12, rcx mov r14, rdx mov r13, rsi mov r15, rdi xor eax, eax mov [r8], eax mov [rdx+24h], eax test rdi, rdi setnz cl mov rdx, 9185477C340h cmp rdi, rdx setl dl test cl, dl jnz short loc_468CC mov dword ptr [r14+24h], 1 jmp short loc_4691D loc_468CC: cmp r15, 65h ; 'e' jge short loc_468FC loc_468D2: xorps xmm0, xmm0 movups xmmword ptr [r14+10h], xmm0 movups xmmword ptr [r14], xmm0 mov qword ptr [r14+20h], 0 mov [r14+24h], eax mov dword ptr [rbx], 1 mov rax, 0FFFFFFFFFFFFFFFFh jmp loc_46A55 loc_468FC: cmp r15, 0A8C1Fh ja loc_46A64 imul rax, r15, 0F4240h mov r15, 12309CE54000h loc_4691A: add r15, rax loc_4691D: mov rcx, 431BDE82D7B634DBh mov rax, r15 mul rcx mov rsi, rdx shr rsi, 12h imul rcx, rsi, 0FFFFFFFFFFF0BDC0h add rcx, r15 mov rdx, 0DBE6FECEBDEDD5BFh mov rax, r15 mul rdx shr rdx, 21h mov [r14], edx mov rdx, 68DB8BAC710CCh mov rax, rsi mul rdx imul rax, rdx, 2710h sub rsi, rax imul eax, esi, 147Bh shr eax, 13h mov [r14+4], eax imul eax, 64h ; 'd' mov edi, esi sub edi, eax movzx r8d, di mov rdx, 346DC5D63886594Bh mov rax, rcx imul rdx mov [r14+8], r8d mov rax, rdx shr rax, 3Fh shr rdx, 0Bh add edx, eax mov [r14+0Ch], edx imul eax, edx, 2710h sub ecx, eax movsx eax, cx imul eax, 147Bh mov r8d, eax shr r8d, 1Fh sar eax, 13h add eax, r8d mov [r14+10h], eax imul r8d, eax, 64h ; 'd' sub ecx, r8d movsx r8d, cx mov [r14+14h], r8d mov [r14+18h], r13 mov byte ptr [r14+20h], 0 mov r8, 5AF3107A3FFFh cmp r15, r8 ja short loc_46A3C cmp rsi, 513h ja short loc_46A3C cmp di, 1Fh ja short loc_46A3C cmp edx, 17h ja short loc_46A3C cmp ax, 3Bh ; ';' ja short loc_46A3C cmp r13, offset unk_F423F ja short loc_46A3C cmp cx, 3Bh ; ';' ja short loc_46A3C xor esi, esi mov rax, r15 or rax, r13 setnz sil mov rdi, r14 mov rdx, r12 mov rcx, rbx call check_date test al, al jz short loc_46A90 loc_46A3C: bt r12d, 18h mov rax, 0FFFFFFFFFFFFFFFFh jnb short loc_46A4F test r15, r15 jz short loc_46A55 loc_46A4F: mov dword ptr [rbx], 1 loc_46A55: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_46A64: cmp r15, offset loc_AAEC5 jb loc_468D2 cmp r15, offset unk_F1FFF ja short loc_46AAF imul rax, r15, 0F4240h mov r15, 1147C8403000h jmp loc_4691A loc_46A90: test r13, r13 jz short loc_46AAA cmp dword ptr [r14+24h], 0 jnz short loc_46AAA mov dword ptr [rbx], 10h mov qword ptr [r14+18h], 0 loc_46AAA: mov rax, r15 jmp short loc_46A55 loc_46AAF: cmp r15, 9896E5h jb loc_468D2 cmp r15, 5F5BEBFh ja short loc_46AD1 imul r15, 0F4240h jmp loc_4691D loc_46AD1: cmp r15, 6052340h jb loc_468D2 mov dword ptr [r14+24h], 1 mov rax, 0A0F0979F77h cmp r15, rax ja short loc_46B04 mov rax, 12309CE54000h jmp loc_4691A loc_46B04: mov eax, 1 mov rcx, 0A301457B40h cmp r15, rcx jb loc_468D2 mov rax, 1147C8403000h add rax, r15 mov rcx, 0E6C9FC5778h cmp r15, rcx cmovb r15, rax jmp loc_4691D
long long number_to_datetime_or_date(unsigned long long a1, unsigned long long a2, long long a3, int a4, int *a5) { unsigned long long v9; // r15 int v10; // eax long long result; // rax long long v12; // rax unsigned long long v13; // rsi unsigned int v14; // eax int v15; // edi unsigned int v16; // edx int v17; // ecx unsigned int v18; // eax unsigned __int16 v19; // cx v9 = a1; v10 = 0; *a5 = 0; *(_DWORD *)(a3 + 36) = 0; if ( (long long)a1 < 10000101000000LL && a1 != 0 ) { if ( (long long)a1 < 101 ) goto LABEL_4; if ( a1 > 0xA8C1F ) { if ( a1 < (unsigned long long)&loc_AAEC5 ) goto LABEL_4; if ( a1 > (unsigned long long)&unk_F1FFF ) { if ( a1 >= 0x9896E5 ) { if ( a1 <= 0x5F5BEBF ) { v9 = 1000000 * a1; goto LABEL_8; } if ( a1 >= 0x6052340 ) { *(_DWORD *)(a3 + 36) = 1; if ( a1 <= 0xA0F0979F77LL ) { v12 = 20000000000000LL; goto LABEL_7; } v10 = 1; if ( a1 >= 0xA301457B40LL ) { if ( a1 < 0xE6C9FC5778LL ) v9 = a1 + 19000000000000LL; goto LABEL_8; } } } LABEL_4: *(_OWORD *)(a3 + 16) = 0LL; *(_OWORD *)a3 = 0LL; *(_QWORD *)(a3 + 32) = 0LL; *(_DWORD *)(a3 + 36) = v10; *a5 = 1; return -1LL; } v12 = 1000000 * a1; v9 = 19000000000000LL; } else { v12 = 1000000 * a1; v9 = 20000000000000LL; } LABEL_7: v9 += v12; goto LABEL_8; } *(_DWORD *)(a3 + 36) = 1; LABEL_8: *(_DWORD *)a3 = v9 / 0x2540BE400LL; v13 = v9 / 0xF4240 - 10000 * ((0x68DB8BAC710CCLL * (unsigned __int128)(v9 / 0xF4240)) >> 64); v14 = (unsigned int)(5243 * v13) >> 19; *(_DWORD *)(a3 + 4) = v14; v15 = v9 / 0xF4240 - 10000 * ((0x68DB8BAC710CCLL * (unsigned __int128)(v9 / 0xF4240)) >> 64) - 100 * v14; *(_DWORD *)(a3 + 8) = (unsigned __int16)(v9 / 0xF4240 - 10000 * ((0x68DB8BAC710CCLL * (unsigned __int128)(v9 / 0xF4240)) >> 64) - 100 * v14); v16 = (int)(v9 % 0xF4240) / 10000; *(_DWORD *)(a3 + 12) = v16; v17 = (int)(v9 % 0xF4240) % 10000; v18 = ((unsigned int)(5243 * (__int16)v17) >> 31) + ((5243 * (__int16)v17) >> 19); *(_DWORD *)(a3 + 16) = v18; v19 = (__int16)v17 % 100; *(_DWORD *)(a3 + 20) = (__int16)v19; *(_QWORD *)(a3 + 24) = a2; *(_BYTE *)(a3 + 32) = 0; if ( v9 > 0x5AF3107A3FFFLL || v13 > 0x513 || (unsigned __int16)v15 > 0x1Fu || v16 > 0x17 || (unsigned __int16)v18 > 0x3Bu || a2 > (unsigned long long)&unk_F423F || v19 > 0x3Bu || check_date((int *)a3, (a2 | v9) != 0, a4, a5) ) { result = -1LL; if ( (a4 & 0x1000000) == 0 || v9 ) *a5 = 1; } else { if ( a2 && !*(_DWORD *)(a3 + 36) ) { *a5 = 16; *(_QWORD *)(a3 + 24) = 0LL; } return v9; } return result; }
number_to_datetime_or_date: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,R8 MOV R12,RCX MOV R14,RDX MOV R13,RSI MOV R15,RDI XOR EAX,EAX MOV dword ptr [R8],EAX MOV dword ptr [RDX + 0x24],EAX TEST RDI,RDI SETNZ CL MOV RDX,0x9185477c340 CMP RDI,RDX SETL DL TEST CL,DL JNZ 0x001468cc MOV dword ptr [R14 + 0x24],0x1 JMP 0x0014691d LAB_001468cc: CMP R15,0x65 JGE 0x001468fc LAB_001468d2: XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x10],XMM0 MOVUPS xmmword ptr [R14],XMM0 MOV qword ptr [R14 + 0x20],0x0 MOV dword ptr [R14 + 0x24],EAX MOV dword ptr [RBX],0x1 MOV RAX,-0x1 JMP 0x00146a55 LAB_001468fc: CMP R15,0xa8c1f JA 0x00146a64 IMUL RAX,R15,0xf4240 MOV R15,0x12309ce54000 LAB_0014691a: ADD R15,RAX LAB_0014691d: MOV RCX,0x431bde82d7b634db MOV RAX,R15 MUL RCX MOV RSI,RDX SHR RSI,0x12 IMUL RCX,RSI,-0xf4240 ADD RCX,R15 MOV RDX,-0x2419013142122a41 MOV RAX,R15 MUL RDX SHR RDX,0x21 MOV dword ptr [R14],EDX MOV RDX,0x68db8bac710cc MOV RAX,RSI MUL RDX IMUL RAX,RDX,0x2710 SUB RSI,RAX IMUL EAX,ESI,0x147b SHR EAX,0x13 MOV dword ptr [R14 + 0x4],EAX IMUL EAX,EAX,0x64 MOV EDI,ESI SUB EDI,EAX MOVZX R8D,DI MOV RDX,0x346dc5d63886594b MOV RAX,RCX IMUL RDX MOV dword ptr [R14 + 0x8],R8D MOV RAX,RDX SHR RAX,0x3f SHR RDX,0xb ADD EDX,EAX MOV dword ptr [R14 + 0xc],EDX IMUL EAX,EDX,0x2710 SUB ECX,EAX MOVSX EAX,CX IMUL EAX,EAX,0x147b MOV R8D,EAX SHR R8D,0x1f SAR EAX,0x13 ADD EAX,R8D MOV dword ptr [R14 + 0x10],EAX IMUL R8D,EAX,0x64 SUB ECX,R8D MOVSX R8D,CX MOV dword ptr [R14 + 0x14],R8D MOV qword ptr [R14 + 0x18],R13 MOV byte ptr [R14 + 0x20],0x0 MOV R8,0x5af3107a3fff CMP R15,R8 JA 0x00146a3c CMP RSI,0x513 JA 0x00146a3c CMP DI,0x1f JA 0x00146a3c CMP EDX,0x17 JA 0x00146a3c CMP AX,0x3b JA 0x00146a3c CMP R13,0xf423f JA 0x00146a3c CMP CX,0x3b JA 0x00146a3c XOR ESI,ESI MOV RAX,R15 OR RAX,R13 SETNZ SIL MOV RDI,R14 MOV RDX,R12 MOV RCX,RBX CALL 0x00144e1b TEST AL,AL JZ 0x00146a90 LAB_00146a3c: BT R12D,0x18 MOV RAX,-0x1 JNC 0x00146a4f TEST R15,R15 JZ 0x00146a55 LAB_00146a4f: MOV dword ptr [RBX],0x1 LAB_00146a55: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00146a64: CMP R15,0xaaec5 JC 0x001468d2 CMP R15,0xf1fff JA 0x00146aaf IMUL RAX,R15,0xf4240 MOV R15,0x1147c8403000 JMP 0x0014691a LAB_00146a90: TEST R13,R13 JZ 0x00146aaa CMP dword ptr [R14 + 0x24],0x0 JNZ 0x00146aaa MOV dword ptr [RBX],0x10 MOV qword ptr [R14 + 0x18],0x0 LAB_00146aaa: MOV RAX,R15 JMP 0x00146a55 LAB_00146aaf: CMP R15,0x9896e5 JC 0x001468d2 CMP R15,0x5f5bebf JA 0x00146ad1 IMUL R15,R15,0xf4240 JMP 0x0014691d LAB_00146ad1: CMP R15,0x6052340 JC 0x001468d2 MOV dword ptr [R14 + 0x24],0x1 MOV RAX,0xa0f0979f77 CMP R15,RAX JA 0x00146b04 MOV RAX,0x12309ce54000 JMP 0x0014691a LAB_00146b04: MOV EAX,0x1 MOV RCX,0xa301457b40 CMP R15,RCX JC 0x001468d2 MOV RAX,0x1147c8403000 ADD RAX,R15 MOV RCX,0xe6c9fc5778 CMP R15,RCX CMOVC R15,RAX JMP 0x0014691d
ulong number_to_datetime_or_date (ulong param_1,ulong param_2,int8 *param_3,int8 param_4, int4 *param_5) { int1 auVar1 [16]; ushort uVar2; int iVar3; char cVar4; int4 uVar5; int4 uVar6; long lVar7; short sVar8; ushort uVar9; uint uVar10; ulong uVar11; uint uVar12; uVar5 = 0; *param_5 = 0; *(int4 *)((long)param_3 + 0x24) = 0; if (param_1 == 0 || 0x9185477c33f < (long)param_1) { *(int4 *)((long)param_3 + 0x24) = 1; goto LAB_0014691d; } uVar6 = 0; if ((long)param_1 < 0x65) goto LAB_001468d2; if (param_1 < 0xa8c20) { lVar7 = param_1 * 1000000; param_1 = 20000000000000; } else { uVar6 = uVar5; if (param_1 < 0xaaec5) goto LAB_001468d2; if (param_1 < 0xf2000) { lVar7 = param_1 * 1000000; param_1 = 19000000000000; } else { if (param_1 < 0x9896e5) goto LAB_001468d2; if (param_1 < 0x5f5bec0) { param_1 = param_1 * 1000000; goto LAB_0014691d; } if (param_1 < 101000000) { LAB_001468d2: param_3[2] = 0; param_3[3] = 0; *param_3 = 0; param_3[1] = 0; param_3[4] = 0; *(int4 *)((long)param_3 + 0x24) = uVar6; *param_5 = 1; return 0xffffffffffffffff; } *(int4 *)((long)param_3 + 0x24) = 1; if (0xa0f0979f77 < param_1) { uVar6 = 1; if (0xa301457b3f < param_1) { if (param_1 < 0xe6c9fc5778) { param_1 = param_1 + 19000000000000; } goto LAB_0014691d; } goto LAB_001468d2; } lVar7 = 20000000000000; } } param_1 = param_1 + lVar7; LAB_0014691d: *(int *)param_3 = (int)(param_1 / 10000000000); uVar11 = (param_1 / 1000000) % 10000; uVar12 = (uint)uVar11; *(uint *)((long)param_3 + 4) = uVar12 / 100; uVar12 = uVar12 % 100; auVar1 = SEXT816((long)(param_1 % 1000000)) * SEXT816(0x346dc5d63886594b); *(uint *)(param_3 + 1) = uVar12; uVar10 = (int)(auVar1._8_8_ >> 0xb) - (auVar1._12_4_ >> 0x1f); *(uint *)((long)param_3 + 0xc) = uVar10; sVar8 = (short)(param_1 % 1000000) + (short)uVar10 * -10000; iVar3 = (int)sVar8 / 100; *(int *)(param_3 + 2) = iVar3; uVar2 = (ushort)iVar3; uVar9 = sVar8 + uVar2 * -100; *(int *)((long)param_3 + 0x14) = (int)(short)uVar9; param_3[3] = param_2; *(int1 *)(param_3 + 4) = 0; if (((((99999999999999 < param_1) || (0x513 < uVar11)) || (0x1f < (ushort)uVar12)) || ((0x17 < uVar10 || (0x3b < uVar2)))) || ((999999 < param_2 || ((0x3b < uVar9 || (cVar4 = check_date(param_3,param_1 != 0 || param_2 != 0,param_4,param_5), cVar4 != '\0'))))) ) { if ((((uint)param_4 >> 0x18 & 1) != 0) && (param_1 == 0)) { return 0xffffffffffffffff; } *param_5 = 1; return 0xffffffffffffffff; } if (param_2 == 0) { return param_1; } if (*(int *)((long)param_3 + 0x24) != 0) { return param_1; } *param_5 = 0x10; param_3[3] = 0; return param_1; }
13,605
my_multi_malloc_large
eloqsql/mysys/mulalloc.c
void *my_multi_malloc_large(PSI_memory_key key, myf myFlags, ...) { va_list args; char **ptr,*start,*res; ulonglong tot_length,length; DBUG_ENTER("my_multi_malloc"); va_start(args,myFlags); tot_length=0; while ((ptr=va_arg(args, char **))) { length=va_arg(args,ulonglong); tot_length+=ALIGN_SIZE(length); } va_end(args); if (!(start=(char *) my_malloc(key, (size_t) tot_length, myFlags))) DBUG_RETURN(0); /* purecov: inspected */ va_start(args,myFlags); res=start; while ((ptr=va_arg(args, char **))) { *ptr=res; length=va_arg(args,ulonglong); res+=ALIGN_SIZE(length); } va_end(args); DBUG_RETURN((void*) start); }
O0
c
my_multi_malloc_large: pushq %rbp movq %rsp, %rbp subq $0x170, %rsp # imm = 0x170 testb %al, %al je 0xf12c1 movaps %xmm0, -0xe0(%rbp) movaps %xmm1, -0xd0(%rbp) movaps %xmm2, -0xc0(%rbp) movaps %xmm3, -0xb0(%rbp) movaps %xmm4, -0xa0(%rbp) movaps %xmm5, -0x90(%rbp) movaps %xmm6, -0x80(%rbp) movaps %xmm7, -0x70(%rbp) movq %r9, -0xe8(%rbp) movq %r8, -0xf0(%rbp) movq %rcx, -0xf8(%rbp) movq %rdx, -0x100(%rbp) movl %edi, -0xc(%rbp) movq %rsi, -0x18(%rbp) leaq -0x30(%rbp), %rax leaq -0x110(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x10, (%rax) movq $0x0, -0x50(%rbp) leaq -0x30(%rbp), %rax movq %rax, -0x120(%rbp) movl -0x30(%rbp), %eax movl %eax, -0x114(%rbp) cmpl $0x28, %eax ja 0xf134b movq -0x120(%rbp), %rcx movl -0x114(%rbp), %edx movslq %edx, %rax addq 0x10(%rcx), %rax addl $0x8, %edx movl %edx, (%rcx) movq %rax, -0x128(%rbp) jmp 0xf1368 movq -0x120(%rbp), %rcx movq 0x8(%rcx), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, 0x8(%rcx) movq %rax, -0x128(%rbp) movq -0x128(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) cmpq $0x0, %rax je 0xf1403 leaq -0x30(%rbp), %rax movq %rax, -0x138(%rbp) movl -0x30(%rbp), %eax movl %eax, -0x12c(%rbp) cmpl $0x28, %eax ja 0xf13bb movq -0x138(%rbp), %rcx movl -0x12c(%rbp), %edx movslq %edx, %rax addq 0x10(%rcx), %rax addl $0x8, %edx movl %edx, (%rcx) movq %rax, -0x140(%rbp) jmp 0xf13d8 movq -0x138(%rbp), %rcx movq 0x8(%rcx), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, 0x8(%rcx) movq %rax, -0x140(%rbp) movq -0x140(%rbp), %rax movq (%rax), %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax addq $0x8, %rax subq $0x1, %rax andq $-0x8, %rax addq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0xf1310 leaq -0x30(%rbp), %rax movl -0xc(%rbp), %edi movq -0x50(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0xfc020 movq %rax, -0x40(%rbp) cmpq $0x0, %rax jne 0xf1430 jmp 0xf1423 movq $0x0, -0x8(%rbp) jmp 0xf1566 leaq -0x30(%rbp), %rax leaq -0x110(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x10, (%rax) movq -0x40(%rbp), %rax movq %rax, -0x48(%rbp) leaq -0x30(%rbp), %rax movq %rax, -0x150(%rbp) movl -0x30(%rbp), %eax movl %eax, -0x144(%rbp) cmpl $0x28, %eax ja 0xf1497 movq -0x150(%rbp), %rcx movl -0x144(%rbp), %edx movslq %edx, %rax addq 0x10(%rcx), %rax addl $0x8, %edx movl %edx, (%rcx) movq %rax, -0x158(%rbp) jmp 0xf14b4 movq -0x150(%rbp), %rcx movq 0x8(%rcx), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, 0x8(%rcx) movq %rax, -0x158(%rbp) movq -0x158(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) cmpq $0x0, %rax je 0xf155a movq -0x48(%rbp), %rcx movq -0x38(%rbp), %rax movq %rcx, (%rax) leaq -0x30(%rbp), %rax movq %rax, -0x168(%rbp) movl -0x30(%rbp), %eax movl %eax, -0x15c(%rbp) cmpl $0x28, %eax ja 0xf1512 movq -0x168(%rbp), %rcx movl -0x15c(%rbp), %edx movslq %edx, %rax addq 0x10(%rcx), %rax addl $0x8, %edx movl %edx, (%rcx) movq %rax, -0x170(%rbp) jmp 0xf152f movq -0x168(%rbp), %rcx movq 0x8(%rcx), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, 0x8(%rcx) movq %rax, -0x170(%rbp) movq -0x170(%rbp), %rax movq (%rax), %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax addq $0x8, %rax subq $0x1, %rax andq $-0x8, %rax addq -0x48(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0xf145c leaq -0x30(%rbp), %rax movq -0x40(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x170, %rsp # imm = 0x170 popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
my_multi_malloc_large: push rbp mov rbp, rsp sub rsp, 170h test al, al jz short loc_F12C1 movaps [rbp+var_E0], xmm0 movaps [rbp+var_D0], xmm1 movaps [rbp+var_C0], xmm2 movaps [rbp+var_B0], xmm3 movaps [rbp+var_A0], xmm4 movaps [rbp+var_90], xmm5 movaps [rbp+var_80], xmm6 movaps [rbp+var_70], xmm7 loc_F12C1: mov [rbp+var_E8], r9 mov [rbp+var_F0], r8 mov [rbp+var_F8], rcx mov [rbp+var_100], rdx mov [rbp+var_C], edi mov [rbp+var_18], rsi lea rax, [rbp+var_30] lea rcx, [rbp+var_110] mov [rax+10h], rcx lea rcx, [rbp+arg_0] mov [rax+8], rcx mov dword ptr [rax+4], 30h ; '0' mov dword ptr [rax], 10h mov [rbp+var_50], 0 loc_F1310: lea rax, [rbp+var_30] mov [rbp+var_120], rax mov eax, [rbp+var_30] mov [rbp+var_114], eax cmp eax, 28h ; '(' ja short loc_F134B mov rcx, [rbp+var_120] mov edx, [rbp+var_114] movsxd rax, edx add rax, [rcx+10h] add edx, 8 mov [rcx], edx mov [rbp+var_128], rax jmp short loc_F1368 loc_F134B: mov rcx, [rbp+var_120] mov rax, [rcx+8] mov rdx, rax add rdx, 8 mov [rcx+8], rdx mov [rbp+var_128], rax loc_F1368: mov rax, [rbp+var_128] mov rax, [rax] mov [rbp+var_38], rax cmp rax, 0 jz loc_F1403 lea rax, [rbp+var_30] mov [rbp+var_138], rax mov eax, [rbp+var_30] mov [rbp+var_12C], eax cmp eax, 28h ; '(' ja short loc_F13BB mov rcx, [rbp+var_138] mov edx, [rbp+var_12C] movsxd rax, edx add rax, [rcx+10h] add edx, 8 mov [rcx], edx mov [rbp+var_140], rax jmp short loc_F13D8 loc_F13BB: mov rcx, [rbp+var_138] mov rax, [rcx+8] mov rdx, rax add rdx, 8 mov [rcx+8], rdx mov [rbp+var_140], rax loc_F13D8: mov rax, [rbp+var_140] mov rax, [rax] mov [rbp+var_58], rax mov rax, [rbp+var_58] add rax, 8 sub rax, 1 and rax, 0FFFFFFFFFFFFFFF8h add rax, [rbp+var_50] mov [rbp+var_50], rax jmp loc_F1310 loc_F1403: lea rax, [rbp+var_30] mov edi, [rbp+var_C] mov rsi, [rbp+var_50] mov rdx, [rbp+var_18] call my_malloc mov [rbp+var_40], rax cmp rax, 0 jnz short loc_F1430 jmp short $+2 loc_F1423: mov [rbp+var_8], 0 jmp loc_F1566 loc_F1430: lea rax, [rbp+var_30] lea rcx, [rbp+var_110] mov [rax+10h], rcx lea rcx, [rbp+arg_0] mov [rax+8], rcx mov dword ptr [rax+4], 30h ; '0' mov dword ptr [rax], 10h mov rax, [rbp+var_40] mov [rbp+var_48], rax loc_F145C: lea rax, [rbp+var_30] mov [rbp+var_150], rax mov eax, [rbp+var_30] mov [rbp+var_144], eax cmp eax, 28h ; '(' ja short loc_F1497 mov rcx, [rbp+var_150] mov edx, [rbp+var_144] movsxd rax, edx add rax, [rcx+10h] add edx, 8 mov [rcx], edx mov [rbp+var_158], rax jmp short loc_F14B4 loc_F1497: mov rcx, [rbp+var_150] mov rax, [rcx+8] mov rdx, rax add rdx, 8 mov [rcx+8], rdx mov [rbp+var_158], rax loc_F14B4: mov rax, [rbp+var_158] mov rax, [rax] mov [rbp+var_38], rax cmp rax, 0 jz loc_F155A mov rcx, [rbp+var_48] mov rax, [rbp+var_38] mov [rax], rcx lea rax, [rbp+var_30] mov [rbp+var_168], rax mov eax, [rbp+var_30] mov [rbp+var_15C], eax cmp eax, 28h ; '(' ja short loc_F1512 mov rcx, [rbp+var_168] mov edx, [rbp+var_15C] movsxd rax, edx add rax, [rcx+10h] add edx, 8 mov [rcx], edx mov [rbp+var_170], rax jmp short loc_F152F loc_F1512: mov rcx, [rbp+var_168] mov rax, [rcx+8] mov rdx, rax add rdx, 8 mov [rcx+8], rdx mov [rbp+var_170], rax loc_F152F: mov rax, [rbp+var_170] mov rax, [rax] mov [rbp+var_58], rax mov rax, [rbp+var_58] add rax, 8 sub rax, 1 and rax, 0FFFFFFFFFFFFFFF8h add rax, [rbp+var_48] mov [rbp+var_48], rax jmp loc_F145C loc_F155A: lea rax, [rbp+var_30] mov rax, [rbp+var_40] mov [rbp+var_8], rax loc_F1566: mov rax, [rbp+var_8] add rsp, 170h pop rbp retn
long long my_multi_malloc_large(unsigned int a1, long long a2, ...) { _QWORD *overflow_arg_area; // rax _QWORD *v3; // rax _QWORD *v4; // rax _QWORD *v5; // rax long long i; // [rsp+120h] [rbp-50h] long long j; // [rsp+128h] [rbp-48h] long long v9; // [rsp+130h] [rbp-40h] va_list va; // [rsp+140h] [rbp-30h] BYREF long long v11; // [rsp+158h] [rbp-18h] unsigned int v12; // [rsp+164h] [rbp-Ch] va_start(va, a2); v12 = a1; v11 = a2; for ( i = 0LL; ; i += (*v3 + 7LL) & 0xFFFFFFFFFFFFFFF8LL ) { if ( va[0].gp_offset > 0x28 ) { overflow_arg_area = va[0].overflow_arg_area; va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8; } else { overflow_arg_area = (char *)va[0].reg_save_area + (int)va[0].gp_offset; va[0].gp_offset += 8; } if ( !*overflow_arg_area ) break; if ( va[0].gp_offset > 0x28 ) { v3 = va[0].overflow_arg_area; va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8; } else { v3 = (char *)va[0].reg_save_area + (int)va[0].gp_offset; va[0].gp_offset += 8; } } v9 = my_malloc(v12, i, v11); if ( !v9 ) return 0LL; va_end(va); va_start(va, a2); for ( j = v9; ; j += (*v5 + 7LL) & 0xFFFFFFFFFFFFFFF8LL ) { if ( va[0].gp_offset > 0x28 ) { v4 = va[0].overflow_arg_area; va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8; } else { v4 = (char *)va[0].reg_save_area + (int)va[0].gp_offset; va[0].gp_offset += 8; } if ( !*v4 ) break; *(_QWORD *)*v4 = j; if ( va[0].gp_offset > 0x28 ) { v5 = va[0].overflow_arg_area; va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8; } else { v5 = (char *)va[0].reg_save_area + (int)va[0].gp_offset; va[0].gp_offset += 8; } } return v9; }
my_multi_malloc_large: PUSH RBP MOV RBP,RSP SUB RSP,0x170 TEST AL,AL JZ 0x001f12c1 MOVAPS xmmword ptr [RBP + -0xe0],XMM0 MOVAPS xmmword ptr [RBP + -0xd0],XMM1 MOVAPS xmmword ptr [RBP + -0xc0],XMM2 MOVAPS xmmword ptr [RBP + -0xb0],XMM3 MOVAPS xmmword ptr [RBP + -0xa0],XMM4 MOVAPS xmmword ptr [RBP + -0x90],XMM5 MOVAPS xmmword ptr [RBP + -0x80],XMM6 MOVAPS xmmword ptr [RBP + -0x70],XMM7 LAB_001f12c1: MOV qword ptr [RBP + -0xe8],R9 MOV qword ptr [RBP + -0xf0],R8 MOV qword ptr [RBP + -0xf8],RCX MOV qword ptr [RBP + -0x100],RDX MOV dword ptr [RBP + -0xc],EDI MOV qword ptr [RBP + -0x18],RSI LEA RAX,[RBP + -0x30] LEA RCX,[RBP + -0x110] MOV qword ptr [RAX + 0x10],RCX LEA RCX,[RBP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RAX + 0x4],0x30 MOV dword ptr [RAX],0x10 MOV qword ptr [RBP + -0x50],0x0 LAB_001f1310: LEA RAX,[RBP + -0x30] MOV qword ptr [RBP + -0x120],RAX MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x114],EAX CMP EAX,0x28 JA 0x001f134b MOV RCX,qword ptr [RBP + -0x120] MOV EDX,dword ptr [RBP + -0x114] MOVSXD RAX,EDX ADD RAX,qword ptr [RCX + 0x10] ADD EDX,0x8 MOV dword ptr [RCX],EDX MOV qword ptr [RBP + -0x128],RAX JMP 0x001f1368 LAB_001f134b: MOV RCX,qword ptr [RBP + -0x120] MOV RAX,qword ptr [RCX + 0x8] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RBP + -0x128],RAX LAB_001f1368: MOV RAX,qword ptr [RBP + -0x128] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX CMP RAX,0x0 JZ 0x001f1403 LEA RAX,[RBP + -0x30] MOV qword ptr [RBP + -0x138],RAX MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x12c],EAX CMP EAX,0x28 JA 0x001f13bb MOV RCX,qword ptr [RBP + -0x138] MOV EDX,dword ptr [RBP + -0x12c] MOVSXD RAX,EDX ADD RAX,qword ptr [RCX + 0x10] ADD EDX,0x8 MOV dword ptr [RCX],EDX MOV qword ptr [RBP + -0x140],RAX JMP 0x001f13d8 LAB_001f13bb: MOV RCX,qword ptr [RBP + -0x138] MOV RAX,qword ptr [RCX + 0x8] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RBP + -0x140],RAX LAB_001f13d8: MOV RAX,qword ptr [RBP + -0x140] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x8 SUB RAX,0x1 AND RAX,-0x8 ADD RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX JMP 0x001f1310 LAB_001f1403: LEA RAX,[RBP + -0x30] MOV EDI,dword ptr [RBP + -0xc] MOV RSI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x18] CALL 0x001fc020 MOV qword ptr [RBP + -0x40],RAX CMP RAX,0x0 JNZ 0x001f1430 JMP 0x001f1423 LAB_001f1423: MOV qword ptr [RBP + -0x8],0x0 JMP 0x001f1566 LAB_001f1430: LEA RAX,[RBP + -0x30] LEA RCX,[RBP + -0x110] MOV qword ptr [RAX + 0x10],RCX LEA RCX,[RBP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RAX + 0x4],0x30 MOV dword ptr [RAX],0x10 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x48],RAX LAB_001f145c: LEA RAX,[RBP + -0x30] MOV qword ptr [RBP + -0x150],RAX MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x144],EAX CMP EAX,0x28 JA 0x001f1497 MOV RCX,qword ptr [RBP + -0x150] MOV EDX,dword ptr [RBP + -0x144] MOVSXD RAX,EDX ADD RAX,qword ptr [RCX + 0x10] ADD EDX,0x8 MOV dword ptr [RCX],EDX MOV qword ptr [RBP + -0x158],RAX JMP 0x001f14b4 LAB_001f1497: MOV RCX,qword ptr [RBP + -0x150] MOV RAX,qword ptr [RCX + 0x8] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RBP + -0x158],RAX LAB_001f14b4: MOV RAX,qword ptr [RBP + -0x158] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX CMP RAX,0x0 JZ 0x001f155a MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],RCX LEA RAX,[RBP + -0x30] MOV qword ptr [RBP + -0x168],RAX MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x15c],EAX CMP EAX,0x28 JA 0x001f1512 MOV RCX,qword ptr [RBP + -0x168] MOV EDX,dword ptr [RBP + -0x15c] MOVSXD RAX,EDX ADD RAX,qword ptr [RCX + 0x10] ADD EDX,0x8 MOV dword ptr [RCX],EDX MOV qword ptr [RBP + -0x170],RAX JMP 0x001f152f LAB_001f1512: MOV RCX,qword ptr [RBP + -0x168] MOV RAX,qword ptr [RCX + 0x8] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RBP + -0x170],RAX LAB_001f152f: MOV RAX,qword ptr [RBP + -0x170] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x8 SUB RAX,0x1 AND RAX,-0x8 ADD RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x48],RAX JMP 0x001f145c LAB_001f155a: LEA RAX,[RBP + -0x30] MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x8],RAX LAB_001f1566: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x170 POP RBP RET
/* WARNING: Restarted to delay deadcode elimination for space: stack */ long my_multi_malloc_large (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int4 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; long *local_178; long *local_160; long *local_148; long *local_130; long local_118 [4]; int8 local_f8; int8 local_f0; int8 local_e8; int8 local_d8; int8 local_c8; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; long local_60; long local_58; long local_50; long local_40; uint local_38; int4 local_34; long *local_30; long *local_28; int8 local_20; int4 local_14; long local_10; if (in_AL != '\0') { local_e8 = param_1; local_d8 = param_2; local_c8 = param_3; local_b8 = param_4; local_a8 = param_5; local_98 = param_6; local_88 = param_7; local_78 = param_8; } local_28 = local_118; local_30 = (long *)&stack0x00000008; local_34 = 0x30; local_38 = 0x10; local_58 = 0; while( true ) { if (local_38 < 0x29) { local_130 = (long *)((long)local_28 + (long)(int)local_38); local_38 = local_38 + 8; } else { local_130 = local_30; local_30 = local_30 + 1; } local_40 = *local_130; if (local_40 == 0) break; if (local_38 < 0x29) { local_148 = (long *)((long)local_28 + (long)(int)local_38); local_38 = local_38 + 8; } else { local_148 = local_30; local_30 = local_30 + 1; } local_60 = *local_148; local_58 = (local_60 + 7U & 0xfffffffffffffff8) + local_58; } local_118[2] = param_11; local_118[3] = param_12; local_f8 = param_13; local_f0 = param_14; local_20 = param_10; local_14 = param_9; local_10 = my_malloc(param_9,local_58,param_10); if (local_10 == 0) { local_10 = 0; } else { local_30 = (long *)&stack0x00000008; local_38 = 0x10; local_50 = local_10; while( true ) { if (local_38 < 0x29) { local_160 = (long *)((long)local_118 + (long)(int)local_38); local_38 = local_38 + 8; } else { local_160 = local_30; local_30 = local_30 + 1; } if ((long *)*local_160 == (long *)0x0) break; *(long *)*local_160 = local_50; if (local_38 < 0x29) { local_178 = (long *)((long)local_118 + (long)(int)local_38); local_38 = local_38 + 8; } else { local_178 = local_30; local_30 = local_30 + 1; } local_50 = (*local_178 + 7U & 0xfffffffffffffff8) + local_50; } } return local_10; }
13,606
lshift
eloqsql/strings/dtoa.c
static Bigint *lshift(Bigint *b, int k, Stack_alloc *alloc) { int i, k1, n, n1; Bigint *b1; ULong *x, *x1, *xe, z; n= k >> 5; k1= b->k; n1= n + b->wds + 1; for (i= b->maxwds; n1 > i; i<<= 1) k1++; b1= Balloc(k1, alloc); x1= b1->p.x; for (i= 0; i < n; i++) *x1++= 0; x= b->p.x; xe= x + b->wds; if (k&= 0x1f) { k1= 32 - k; z= 0; do { *x1++= *x << k | z; z= *x++ >> k1; } while (x < xe); if ((*x1= z)) ++n1; } else do *x1++= *x++; while (x < xe); b1->wds= n1 - 1; Bfree(b, alloc); return b1; }
O3
c
lshift: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %esi, %r15d movq %rdi, %r14 movl %esi, %r12d shrl $0x5, %r12d movl 0x8(%rdi), %edi movl 0xc(%r14), %eax movl 0x14(%r14), %ebx addl %r12d, %ebx cmpl %eax, %ebx jl 0x5c065 incl %edi addl %eax, %eax jmp 0x5c05b movq %rdx, -0x38(%rbp) movq %rdx, %rsi callq 0x5bc08 movq (%rax), %r13 cmpl $0x20, %r15d jb 0x5c09c decl %r12d leaq 0x4(,%r12,4), %rdx movq %r13, %rdi xorl %esi, %esi movq %rax, -0x30(%rbp) callq 0x24180 movq -0x30(%rbp), %rax leaq 0x4(%r13,%r12,4), %r13 movq (%r14), %rdx movslq 0x14(%r14), %rcx leaq (%rdx,%rcx,4), %rsi andl $0x1f, %r15d je 0x5c0e8 movl $0x20, %r9d subl %r15d, %r9d xorl %edi, %edi movl (%rdx), %r8d movl %r15d, %ecx shll %cl, %r8d orl %edi, %r8d movl %r8d, (%r13) addq $0x4, %r13 movl (%rdx), %edi addq $0x4, %rdx movl %r9d, %ecx shrl %cl, %edi cmpq %rsi, %rdx jb 0x5c0b8 movl %edi, (%r13) cmpl $0x1, %edi sbbl $-0x1, %ebx jmp 0x5c0fb movl (%rdx), %ecx addq $0x4, %rdx movl %ecx, (%r13) addq $0x4, %r13 cmpq %rsi, %rdx jb 0x5c0e8 movl %ebx, 0x14(%rax) movq %r14, %rdi movq -0x38(%rbp), %rsi movq %rax, %rbx callq 0x5c001 movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
lshift: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15d, esi mov r14, rdi mov r12d, esi shr r12d, 5 mov edi, [rdi+8] mov eax, [r14+0Ch] mov ebx, [r14+14h] add ebx, r12d loc_5C05B: cmp ebx, eax jl short loc_5C065 inc edi add eax, eax jmp short loc_5C05B loc_5C065: mov [rbp+var_38], rdx mov rsi, rdx call Balloc mov r13, [rax] cmp r15d, 20h ; ' ' jb short loc_5C09C dec r12d lea rdx, ds:4[r12*4] mov rdi, r13 xor esi, esi mov [rbp+var_30], rax call _memset mov rax, [rbp+var_30] lea r13, [r13+r12*4+4] loc_5C09C: mov rdx, [r14] movsxd rcx, dword ptr [r14+14h] lea rsi, [rdx+rcx*4] and r15d, 1Fh jz short loc_5C0E8 mov r9d, 20h ; ' ' sub r9d, r15d xor edi, edi loc_5C0B8: mov r8d, [rdx] mov ecx, r15d shl r8d, cl or r8d, edi mov [r13+0], r8d add r13, 4 mov edi, [rdx] add rdx, 4 mov ecx, r9d shr edi, cl cmp rdx, rsi jb short loc_5C0B8 mov [r13+0], edi cmp edi, 1 sbb ebx, 0FFFFFFFFh jmp short loc_5C0FB loc_5C0E8: mov ecx, [rdx] add rdx, 4 mov [r13+0], ecx add r13, 4 cmp rdx, rsi jb short loc_5C0E8 loc_5C0FB: mov [rax+14h], ebx mov rdi, r14 mov rsi, [rbp+var_38] mov rbx, rax call Bfree mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long lshift(unsigned long long a1, unsigned int a2, unsigned long long *a3) { char v3; // r15 int v5; // edi int v6; // eax int v7; // ebx long long v8; // rax int *v9; // r13 long long v10; // r12 int *v11; // rdx unsigned long long v12; // rsi int v13; // r15d int v14; // edi unsigned int v15; // edi int v16; // ecx long long v17; // rbx long long v20; // [rsp+10h] [rbp-30h] v3 = a2; v5 = *(_DWORD *)(a1 + 8); v6 = *(_DWORD *)(a1 + 12); v7 = (a2 >> 5) + *(_DWORD *)(a1 + 20); while ( v7 >= v6 ) { ++v5; v6 *= 2; } v8 = Balloc(v5, (long long)a3); v9 = *(int **)v8; if ( a2 >= 0x20 ) { v10 = (a2 >> 5) - 1; v20 = v8; memset(*(_QWORD *)v8, 0LL, 4 * v10 + 4); v8 = v20; v9 += v10 + 1; } v11 = *(int **)a1; v12 = *(_QWORD *)a1 + 4LL * *(int *)(a1 + 20); v13 = v3 & 0x1F; if ( v13 ) { v14 = 0; do { *v9++ = v14 | (*v11 << v13); v15 = *v11++; v14 = v15 >> (32 - v13); } while ( (unsigned long long)v11 < v12 ); *v9 = v14; v7 -= (v14 == 0) - 1; } else { do { v16 = *v11++; *v9++ = v16; } while ( (unsigned long long)v11 < v12 ); } *(_DWORD *)(v8 + 20) = v7; v17 = v8; Bfree(a1, a3); return v17; }
lshift: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15D,ESI MOV R14,RDI MOV R12D,ESI SHR R12D,0x5 MOV EDI,dword ptr [RDI + 0x8] MOV EAX,dword ptr [R14 + 0xc] MOV EBX,dword ptr [R14 + 0x14] ADD EBX,R12D LAB_0015c05b: CMP EBX,EAX JL 0x0015c065 INC EDI ADD EAX,EAX JMP 0x0015c05b LAB_0015c065: MOV qword ptr [RBP + -0x38],RDX MOV RSI,RDX CALL 0x0015bc08 MOV R13,qword ptr [RAX] CMP R15D,0x20 JC 0x0015c09c DEC R12D LEA RDX,[0x4 + R12*0x4] MOV RDI,R13 XOR ESI,ESI MOV qword ptr [RBP + -0x30],RAX CALL 0x00124180 MOV RAX,qword ptr [RBP + -0x30] LEA R13,[R13 + R12*0x4 + 0x4] LAB_0015c09c: MOV RDX,qword ptr [R14] MOVSXD RCX,dword ptr [R14 + 0x14] LEA RSI,[RDX + RCX*0x4] AND R15D,0x1f JZ 0x0015c0e8 MOV R9D,0x20 SUB R9D,R15D XOR EDI,EDI LAB_0015c0b8: MOV R8D,dword ptr [RDX] MOV ECX,R15D SHL R8D,CL OR R8D,EDI MOV dword ptr [R13],R8D ADD R13,0x4 MOV EDI,dword ptr [RDX] ADD RDX,0x4 MOV ECX,R9D SHR EDI,CL CMP RDX,RSI JC 0x0015c0b8 MOV dword ptr [R13],EDI CMP EDI,0x1 SBB EBX,-0x1 JMP 0x0015c0fb LAB_0015c0e8: MOV ECX,dword ptr [RDX] ADD RDX,0x4 MOV dword ptr [R13],ECX ADD R13,0x4 CMP RDX,RSI JC 0x0015c0e8 LAB_0015c0fb: MOV dword ptr [RAX + 0x14],EBX MOV RDI,R14 MOV RSI,qword ptr [RBP + -0x38] MOV RBX,RAX CALL 0x0015c001 MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 * lshift(int8 *param_1,uint param_2,int8 param_3) { uint *puVar1; sbyte sVar2; int iVar3; int8 *puVar4; uint *puVar5; int iVar6; uint uVar7; ulong uVar8; uint *__s; iVar6 = *(int *)((long)param_1 + 0x14) + (param_2 >> 5); for (iVar3 = *(int *)((long)param_1 + 0xc); iVar3 <= iVar6; iVar3 = iVar3 * 2) { } puVar4 = (int8 *)Balloc(); __s = (uint *)*puVar4; if (0x1f < param_2) { uVar8 = (ulong)((param_2 >> 5) - 1); memset(__s,0,uVar8 * 4 + 4); __s = __s + uVar8 + 1; } puVar5 = (uint *)*param_1; puVar1 = puVar5 + *(int *)((long)param_1 + 0x14); if ((param_2 & 0x1f) == 0) { do { uVar7 = *puVar5; puVar5 = puVar5 + 1; *__s = uVar7; __s = __s + 1; } while (puVar5 < puVar1); } else { sVar2 = (sbyte)(param_2 & 0x1f); uVar7 = 0; do { *__s = *puVar5 << sVar2 | uVar7; __s = __s + 1; uVar7 = *puVar5; puVar5 = puVar5 + 1; uVar7 = uVar7 >> (0x20U - sVar2 & 0x1f); } while (puVar5 < puVar1); *__s = uVar7; iVar6 = (iVar6 + 1) - (uint)(uVar7 == 0); } *(int *)((long)puVar4 + 0x14) = iVar6; Bfree(param_1,param_3); return puVar4; }
13,607
dequantize_row_tq2_0
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
void dequantize_row_tq2_0(const block_tq2_0 * restrict x, float * restrict y, int64_t k) { assert(k % QK_K == 0); const int64_t nb = k / QK_K; for (int64_t i = 0; i < nb; ++i) { const float d = GGML_FP16_TO_FP32(x[i].d); for (size_t j = 0; j < sizeof(x->qs); j += 32) { for (size_t l = 0; l < 4; ++l) { for (size_t m = 0; m < 32; ++m) { int8_t q = (x[i].qs[j + m] >> (l*2)) & 3; *y++ = (float) (q - 1) * d; } } } } }
O0
c
dequantize_row_tq2_0: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x18(%rbp), %rax movl $0x100, %ecx # imm = 0x100 cqto idivq %rcx cmpq $0x0, %rdx jne 0x7853a jmp 0x78559 leaq 0x48c03(%rip), %rdi # 0xc1144 leaq 0x48814(%rip), %rsi # 0xc0d5c movl $0x881, %edx # imm = 0x881 leaq 0x49015(%rip), %rcx # 0xc1569 callq 0x44810 movq -0x18(%rbp), %rax movl $0x100, %ecx # imm = 0x100 cqto idivq %rcx movq %rax, -0x20(%rbp) movq $0x0, -0x28(%rbp) movq -0x28(%rbp), %rax cmpq -0x20(%rbp), %rax jge 0x7865a movq -0x8(%rbp), %rax imulq $0x42, -0x28(%rbp), %rcx addq %rcx, %rax movzwl 0x40(%rax), %edi callq 0x6e6e0 movss %xmm0, -0x2c(%rbp) movq $0x0, -0x38(%rbp) cmpq $0x40, -0x38(%rbp) jae 0x78647 movq $0x0, -0x40(%rbp) cmpq $0x4, -0x40(%rbp) jae 0x78634 movq $0x0, -0x48(%rbp) cmpq $0x20, -0x48(%rbp) jae 0x78624 movq -0x8(%rbp), %rax imulq $0x42, -0x28(%rbp), %rcx addq %rcx, %rax movq -0x38(%rbp), %rcx addq -0x48(%rbp), %rcx movzbl (%rax,%rcx), %eax movq -0x40(%rbp), %rcx shlq %rcx sarl %cl, %eax andl $0x3, %eax movb %al, -0x49(%rbp) movsbl -0x49(%rbp), %eax subl $0x1, %eax cvtsi2ss %eax, %xmm0 mulss -0x2c(%rbp), %xmm0 movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, -0x10(%rbp) movss %xmm0, (%rax) movq -0x48(%rbp), %rax addq $0x1, %rax movq %rax, -0x48(%rbp) jmp 0x785c5 jmp 0x78626 movq -0x40(%rbp), %rax addq $0x1, %rax movq %rax, -0x40(%rbp) jmp 0x785b6 jmp 0x78636 movq -0x38(%rbp), %rax addq $0x20, %rax movq %rax, -0x38(%rbp) jmp 0x785a3 jmp 0x78649 movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x78573 addq $0x50, %rsp popq %rbp retq
dequantize_row_tq2_0: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_18] mov ecx, 100h cqo idiv rcx cmp rdx, 0 jnz short loc_7853A jmp short loc_78559 loc_7853A: lea rdi, aKQkK0; "k % QK_K == 0" lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"... mov edx, 881h lea rcx, aVoidDequantize_10; "void dequantize_row_tq2_0(const block_t"... call ___assert_fail loc_78559: mov rax, [rbp+var_18] mov ecx, 100h cqo idiv rcx mov [rbp+var_20], rax mov [rbp+var_28], 0 loc_78573: mov rax, [rbp+var_28] cmp rax, [rbp+var_20] jge loc_7865A mov rax, [rbp+var_8] imul rcx, [rbp+var_28], 42h ; 'B' add rax, rcx movzx edi, word ptr [rax+40h] call ggml_lookup_fp16_to_fp32_0 movss [rbp+var_2C], xmm0 mov [rbp+var_38], 0 loc_785A3: cmp [rbp+var_38], 40h ; '@' jnb loc_78647 mov [rbp+var_40], 0 loc_785B6: cmp [rbp+var_40], 4 jnb short loc_78634 mov [rbp+var_48], 0 loc_785C5: cmp [rbp+var_48], 20h ; ' ' jnb short loc_78624 mov rax, [rbp+var_8] imul rcx, [rbp+var_28], 42h ; 'B' add rax, rcx mov rcx, [rbp+var_38] add rcx, [rbp+var_48] movzx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_40] shl rcx, 1 sar eax, cl and eax, 3 mov [rbp+var_49], al movsx eax, [rbp+var_49] sub eax, 1 cvtsi2ss xmm0, eax mulss xmm0, [rbp+var_2C] mov rax, [rbp+var_10] mov rcx, rax add rcx, 4 mov [rbp+var_10], rcx movss dword ptr [rax], xmm0 mov rax, [rbp+var_48] add rax, 1 mov [rbp+var_48], rax jmp short loc_785C5 loc_78624: jmp short $+2 loc_78626: mov rax, [rbp+var_40] add rax, 1 mov [rbp+var_40], rax jmp short loc_785B6 loc_78634: jmp short $+2 loc_78636: mov rax, [rbp+var_38] add rax, 20h ; ' ' mov [rbp+var_38], rax jmp loc_785A3 loc_78647: jmp short $+2 loc_78649: mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp loc_78573 loc_7865A: add rsp, 50h pop rbp retn
long long dequantize_row_tq2_0(long long a1, float *a2, long long a3) { long long result; // rax float *v4; // rax unsigned long long m; // [rsp+8h] [rbp-48h] unsigned long long k; // [rsp+10h] [rbp-40h] unsigned long long j; // [rsp+18h] [rbp-38h] float v8; // [rsp+24h] [rbp-2Ch] long long i; // [rsp+28h] [rbp-28h] if ( a3 % 256 ) __assert_fail( "k % QK_K == 0", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c", 2177LL, "void dequantize_row_tq2_0(const block_tq2_0 *restrict, float *restrict, int64_t)"); for ( i = 0LL; ; ++i ) { result = i; if ( i >= a3 / 256 ) break; v8 = ggml_lookup_fp16_to_fp32_0(*(_WORD *)(66 * i + a1 + 64)); for ( j = 0LL; j < 0x40; j += 32LL ) { for ( k = 0LL; k < 4; ++k ) { for ( m = 0LL; m < 0x20; ++m ) { v4 = a2++; *v4 = (float)((((int)*(unsigned __int8 *)(66 * i + a1 + m + j) >> (2 * k)) & 3) - 1) * v8; } } } } return result; }
dequantize_row_tq2_0: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,0x100 CQO IDIV RCX CMP RDX,0x0 JNZ 0x0017853a JMP 0x00178559 LAB_0017853a: LEA RDI,[0x1c1144] LEA RSI,[0x1c0d5c] MOV EDX,0x881 LEA RCX,[0x1c1569] CALL 0x00144810 LAB_00178559: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,0x100 CQO IDIV RCX MOV qword ptr [RBP + -0x20],RAX MOV qword ptr [RBP + -0x28],0x0 LAB_00178573: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x20] JGE 0x0017865a MOV RAX,qword ptr [RBP + -0x8] IMUL RCX,qword ptr [RBP + -0x28],0x42 ADD RAX,RCX MOVZX EDI,word ptr [RAX + 0x40] CALL 0x0016e6e0 MOVSS dword ptr [RBP + -0x2c],XMM0 MOV qword ptr [RBP + -0x38],0x0 LAB_001785a3: CMP qword ptr [RBP + -0x38],0x40 JNC 0x00178647 MOV qword ptr [RBP + -0x40],0x0 LAB_001785b6: CMP qword ptr [RBP + -0x40],0x4 JNC 0x00178634 MOV qword ptr [RBP + -0x48],0x0 LAB_001785c5: CMP qword ptr [RBP + -0x48],0x20 JNC 0x00178624 MOV RAX,qword ptr [RBP + -0x8] IMUL RCX,qword ptr [RBP + -0x28],0x42 ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x38] ADD RCX,qword ptr [RBP + -0x48] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x40] SHL RCX,0x1 SAR EAX,CL AND EAX,0x3 MOV byte ptr [RBP + -0x49],AL MOVSX EAX,byte ptr [RBP + -0x49] SUB EAX,0x1 CVTSI2SS XMM0,EAX MULSS XMM0,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RBP + -0x10],RCX MOVSS dword ptr [RAX],XMM0 MOV RAX,qword ptr [RBP + -0x48] ADD RAX,0x1 MOV qword ptr [RBP + -0x48],RAX JMP 0x001785c5 LAB_00178624: JMP 0x00178626 LAB_00178626: MOV RAX,qword ptr [RBP + -0x40] ADD RAX,0x1 MOV qword ptr [RBP + -0x40],RAX JMP 0x001785b6 LAB_00178634: JMP 0x00178636 LAB_00178636: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x20 MOV qword ptr [RBP + -0x38],RAX JMP 0x001785a3 LAB_00178647: JMP 0x00178649 LAB_00178649: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x00178573 LAB_0017865a: ADD RSP,0x50 POP RBP RET
void dequantize_row_tq2_0(long param_1,float *param_2,long param_3) { float fVar1; ulong local_50; ulong local_48; ulong local_40; long local_30; float *local_18; if (param_3 % 0x100 == 0) { local_18 = param_2; for (local_30 = 0; local_30 < param_3 / 0x100; local_30 = local_30 + 1) { fVar1 = (float)ggml_lookup_fp16_to_fp32(*(int2 *)(param_1 + local_30 * 0x42 + 0x40)); for (local_40 = 0; local_40 < 0x40; local_40 = local_40 + 0x20) { for (local_48 = 0; local_48 < 4; local_48 = local_48 + 1) { for (local_50 = 0; local_50 < 0x20; local_50 = local_50 + 1) { *local_18 = (float)((char)((byte)((int)(uint)*(byte *)(param_1 + local_30 * 0x42 + local_40 + local_50) >> ((byte)(local_48 << 1) & 0x1f)) & 3) + -1) * fVar1; local_18 = local_18 + 1; } } } } return; } /* WARNING: Subroutine does not return */ __assert_fail("k % QK_K == 0", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c" ,0x881, "void dequantize_row_tq2_0(const block_tq2_0 *restrict, float *restrict, int64_t)"); }
13,608
dequantize_row_tq2_0
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
void dequantize_row_tq2_0(const block_tq2_0 * restrict x, float * restrict y, int64_t k) { assert(k % QK_K == 0); const int64_t nb = k / QK_K; for (int64_t i = 0; i < nb; ++i) { const float d = GGML_FP16_TO_FP32(x[i].d); for (size_t j = 0; j < sizeof(x->qs); j += 32) { for (size_t l = 0; l < 4; ++l) { for (size_t m = 0; m < 32; ++m) { int8_t q = (x[i].qs[j + m] >> (l*2)) & 3; *y++ = (float) (q - 1) * d; } } } } }
O3
c
dequantize_row_tq2_0: pushq %rbp pushq %r14 pushq %rbx testb %dl, %dl jne 0x33149 sarq $0x8, %rdx testq %rdx, %rdx jle 0x33144 xorl %eax, %eax movq 0x3aedd(%rip), %r8 # 0x6dfa8 movq %rdi, %r9 movq %rax, %rcx shlq $0x6, %rcx leaq (%rcx,%rax,2), %rcx movzwl 0x40(%rdi,%rcx), %ecx movss (%r8,%rcx,4), %xmm0 movb $0x1, %r10b xorl %r11d, %r11d addq %r9, %r11 xorl %ebx, %ebx leal (%rbx,%rbx), %ecx xorl %r14d, %r14d movzbl (%r11,%r14), %ebp shrl %cl, %ebp andl $0x3, %ebp decl %ebp xorps %xmm1, %xmm1 cvtsi2ss %ebp, %xmm1 mulss %xmm0, %xmm1 movss %xmm1, (%rsi) addq $0x4, %rsi incq %r14 cmpq $0x20, %r14 jne 0x330f5 incq %rbx cmpq $0x4, %rbx jne 0x330ef movl $0x20, %r11d testb $0x1, %r10b movl $0x0, %r10d jne 0x330ea incq %rax addq $0x42, %r9 cmpq %rdx, %rax jne 0x330ce popq %rbx popq %r14 popq %rbp retq leaq 0x28f8c(%rip), %rdi # 0x5c0dc leaq 0x28b9d(%rip), %rsi # 0x5bcf4 leaq 0x293a3(%rip), %rcx # 0x5c501 movl $0x881, %edx # imm = 0x881 callq 0x16b00
dequantize_row_tq2_0: push rbp push r14 push rbx test dl, dl jnz loc_33149 sar rdx, 8 test rdx, rdx jle loc_33144 xor eax, eax mov r8, cs:ggml_table_f32_f16_ptr mov r9, rdi loc_330CE: mov rcx, rax shl rcx, 6 lea rcx, [rcx+rax*2] movzx ecx, word ptr [rdi+rcx+40h] movss xmm0, dword ptr [r8+rcx*4] mov r10b, 1 xor r11d, r11d loc_330EA: add r11, r9 xor ebx, ebx loc_330EF: lea ecx, [rbx+rbx] xor r14d, r14d loc_330F5: movzx ebp, byte ptr [r11+r14] shr ebp, cl and ebp, 3 dec ebp xorps xmm1, xmm1 cvtsi2ss xmm1, ebp mulss xmm1, xmm0 movss dword ptr [rsi], xmm1 add rsi, 4 inc r14 cmp r14, 20h ; ' ' jnz short loc_330F5 inc rbx cmp rbx, 4 jnz short loc_330EF mov r11d, 20h ; ' ' test r10b, 1 mov r10d, 0 jnz short loc_330EA inc rax add r9, 42h ; 'B' cmp rax, rdx jnz short loc_330CE loc_33144: pop rbx pop r14 pop rbp retn loc_33149: lea rdi, aKQkK0; "k % QK_K == 0" lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidDequantize_10; "void dequantize_row_tq2_0(const block_t"... mov edx, 881h call ___assert_fail
void dequantize_row_tq2_0(long long a1, float *a2, long long a3) { long long v3; // rdx long long v4; // rax long long v5; // r9 float v6; // xmm0_4 char v7; // r10 long long v8; // r11 long long v9; // r11 long long i; // rbx long long j; // r14 bool v12; // zf if ( (_BYTE)a3 ) __assert_fail( "k % QK_K == 0", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c", 2177LL, "void dequantize_row_tq2_0(const block_tq2_0 *restrict, float *restrict, int64_t)"); v3 = a3 >> 8; if ( v3 > 0 ) { v4 = 0LL; v5 = a1; do { v6 = ggml_table_f32_f16[*(unsigned __int16 *)(a1 + 66 * v4 + 64)]; v7 = 1; v8 = 0LL; do { v9 = v5 + v8; for ( i = 0LL; i != 4; ++i ) { for ( j = 0LL; j != 32; ++j ) *a2++ = (float)(((*(unsigned __int8 *)(v9 + j) >> (2 * i)) & 3) - 1) * v6; } v8 = 32LL; v12 = (v7 & 1) == 0; v7 = 0; } while ( !v12 ); ++v4; v5 += 66LL; } while ( v4 != v3 ); } }
dequantize_row_tq2_0: PUSH RBP PUSH R14 PUSH RBX TEST DL,DL JNZ 0x00133149 SAR RDX,0x8 TEST RDX,RDX JLE 0x00133144 XOR EAX,EAX MOV R8,qword ptr [0x0016dfa8] MOV R9,RDI LAB_001330ce: MOV RCX,RAX SHL RCX,0x6 LEA RCX,[RCX + RAX*0x2] MOVZX ECX,word ptr [RDI + RCX*0x1 + 0x40] MOVSS XMM0,dword ptr [R8 + RCX*0x4] MOV R10B,0x1 XOR R11D,R11D LAB_001330ea: ADD R11,R9 XOR EBX,EBX LAB_001330ef: LEA ECX,[RBX + RBX*0x1] XOR R14D,R14D LAB_001330f5: MOVZX EBP,byte ptr [R11 + R14*0x1] SHR EBP,CL AND EBP,0x3 DEC EBP XORPS XMM1,XMM1 CVTSI2SS XMM1,EBP MULSS XMM1,XMM0 MOVSS dword ptr [RSI],XMM1 ADD RSI,0x4 INC R14 CMP R14,0x20 JNZ 0x001330f5 INC RBX CMP RBX,0x4 JNZ 0x001330ef MOV R11D,0x20 TEST R10B,0x1 MOV R10D,0x0 JNZ 0x001330ea INC RAX ADD R9,0x42 CMP RAX,RDX JNZ 0x001330ce LAB_00133144: POP RBX POP R14 POP RBP RET LAB_00133149: LEA RDI,[0x15c0dc] LEA RSI,[0x15bcf4] LEA RCX,[0x15c501] MOV EDX,0x881 CALL 0x00116b00
void dequantize_row_tq2_0(long param_1,float *param_2,long param_3) { float fVar1; int *puVar2; bool bVar3; long lVar4; long lVar5; long lVar6; bool bVar7; long lVar8; long lVar9; puVar2 = PTR_ggml_table_f32_f16_0016dfa8; if ((char)param_3 == '\0') { if (0 < param_3 >> 8) { lVar4 = 0; lVar6 = param_1; do { fVar1 = *(float *)(puVar2 + (ulong)*(ushort *)(param_1 + 0x40 + lVar4 * 0x42) * 4); lVar8 = 0; bVar3 = true; do { bVar7 = bVar3; lVar5 = 0; do { lVar9 = 0; do { *param_2 = (float)(int)((*(byte *)(lVar8 + lVar6 + lVar9) >> ((char)lVar5 * '\x02' & 0x1fU) & 3) - 1) * fVar1; param_2 = param_2 + 1; lVar9 = lVar9 + 1; } while (lVar9 != 0x20); lVar5 = lVar5 + 1; } while (lVar5 != 4); lVar8 = 0x20; bVar3 = false; } while (bVar7); lVar4 = lVar4 + 1; lVar6 = lVar6 + 0x42; } while (lVar4 != param_3 >> 8); } return; } /* WARNING: Subroutine does not return */ __assert_fail("k % QK_K == 0", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c" ,0x881, "void dequantize_row_tq2_0(const block_tq2_0 *restrict, float *restrict, int64_t)"); }
13,609
my_wc_to_printable_ex
eloqsql/strings/ctype.c
int my_wc_to_printable_ex(CHARSET_INFO *cs, my_wc_t wc, uchar *str, uchar *end, uint bs, uint bslen, uint diglen) { uchar *str0; uint i, length; uchar tmp[MY_CS_PRINTABLE_CHAR_LENGTH * MY_CS_MBMAXLEN]; if (my_is_printable(wc)) { int mblen= my_ci_wc_mb(cs, wc, str, end); if (mblen > 0) return mblen; } if (str + my_printable_length(bslen, diglen) > end) return MY_CS_TOOSMALLN(my_printable_length(bslen, diglen)); if ((cs->state & MY_CS_NONASCII) == 0) return to_printable_8bit(str, wc, bs); length= to_printable_8bit(tmp, wc, bs); str0= str; for (i= 0; i < length; i++) { uint expected_length= i == 0 ? bslen : diglen; if (my_ci_wc_mb(cs, tmp[i], str, end) != (int) expected_length) { DBUG_ASSERT(0); return MY_CS_ILSEQ; } str+= expected_length; } return (int) (str - str0); }
O3
c
my_wc_to_printable_ex: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r9, -0x60(%rbp) movl %r8d, -0x58(%rbp) movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r13 movq %rdi, %r12 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq -0x20(%rsi), %rax cmpq $0x5f, %rax jae 0x2ccff movq 0xb8(%r12), %rax movq %r12, %rdi movq %r13, %rsi movq %r15, %rdx movq %r14, %rcx callq *0x30(%rax) movl %eax, %ebx testl %eax, %eax jg 0x2ce22 jmp 0x2cd30 cmpq $0x9f, %r13 ja 0x2cd1f cmpb $0xa, %r13b je 0x2ccdc movzbl %r13b, %eax cmpl $0xd, %eax je 0x2ccdc cmpq $0x9, %r13 je 0x2ccdc jmp 0x2cd30 movq %r13, %rax andq $-0x800, %rax # imm = 0xF800 cmpq $0xd800, %rax # imm = 0xD800 jne 0x2ccdc movl 0x10(%rbp), %ecx movq -0x60(%rbp), %rax leal (%rax,%rcx,4), %eax leaq (%r15,%rax), %rcx cmpq %r14, %rcx jbe 0x2cd4f movl $0xffffff9c, %ebx # imm = 0xFFFFFF9C subl %eax, %ebx jmp 0x2ce22 movl %r13d, %eax shrl $0xc, %eax andl $0xf, %eax movl %r13d, %ecx shrl $0x8, %ecx andl $0xf, %ecx movl %r13d, %edx shrl $0x4, %edx andl $0xf, %edx andl $0xf, %r13d testb $0x20, 0xd(%r12) jne 0x2cda7 movl -0x58(%rbp), %esi movb %sil, (%r15) leaq 0x3a38d(%rip), %rsi # 0x67110 movb (%rsi,%rax), %al movb %al, 0x1(%r15) movb (%rsi,%rcx), %al movb %al, 0x2(%r15) movb (%rsi,%rdx), %al movb %al, 0x3(%r15) movb (%rsi,%r13), %al movb %al, 0x4(%r15) movl $0x5, %ebx jmp 0x2ce22 movq %r14, -0x68(%rbp) movl -0x58(%rbp), %esi movb %sil, -0x50(%rbp) leaq 0x3a357(%rip), %rsi # 0x67110 movb (%rsi,%rax), %al movb %al, -0x4f(%rbp) movb (%rsi,%rcx), %al movb %al, -0x4e(%rbp) movb (%rsi,%rdx), %al movb %al, -0x4d(%rbp) movb (%rsi,%r13), %al movb %al, -0x4c(%rbp) xorl %ebx, %ebx xorl %r14d, %r14d movq %r15, -0x58(%rbp) movq %r15, %r13 testq %r14, %r14 movl 0x10(%rbp), %eax movl %eax, %r15d cmovel -0x60(%rbp), %r15d movq 0xb8(%r12), %rax movzbl -0x50(%rbp,%r14), %esi movq %r12, %rdi movq %r13, %rdx movq -0x68(%rbp), %rcx callq *0x30(%rax) cmpl %r15d, %eax jne 0x2ce22 movl %r15d, %eax addq %rax, %r13 incq %r14 cmpq $0x5, %r14 jne 0x2cdde subl -0x58(%rbp), %r13d movl %r13d, %ebx movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x2ce42 movl %ebx, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x25320
my_wc_to_printable_ex: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov [rbp+var_60], r9 mov dword ptr [rbp+var_58], r8d mov r14, rcx mov r15, rdx mov r13, rsi mov r12, rdi mov rax, fs:28h mov [rbp+var_30], rax lea rax, [rsi-20h] cmp rax, 5Fh ; '_' jnb short loc_2CCFF loc_2CCDC: mov rax, [r12+0B8h] mov rdi, r12 mov rsi, r13 mov rdx, r15 mov rcx, r14 call qword ptr [rax+30h] mov ebx, eax test eax, eax jg loc_2CE22 jmp short loc_2CD30 loc_2CCFF: cmp r13, 9Fh ja short loc_2CD1F cmp r13b, 0Ah jz short loc_2CCDC movzx eax, r13b cmp eax, 0Dh jz short loc_2CCDC cmp r13, 9 jz short loc_2CCDC jmp short loc_2CD30 loc_2CD1F: mov rax, r13 and rax, 0FFFFFFFFFFFFF800h cmp rax, 0D800h jnz short loc_2CCDC loc_2CD30: mov ecx, [rbp+arg_0] mov rax, [rbp+var_60] lea eax, [rax+rcx*4] lea rcx, [r15+rax] cmp rcx, r14 jbe short loc_2CD4F mov ebx, 0FFFFFF9Ch sub ebx, eax jmp loc_2CE22 loc_2CD4F: mov eax, r13d shr eax, 0Ch and eax, 0Fh mov ecx, r13d shr ecx, 8 and ecx, 0Fh mov edx, r13d shr edx, 4 and edx, 0Fh and r13d, 0Fh test byte ptr [r12+0Dh], 20h jnz short loc_2CDA7 mov esi, dword ptr [rbp+var_58] mov [r15], sil lea rsi, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" mov al, [rsi+rax] mov [r15+1], al mov al, [rsi+rcx] mov [r15+2], al mov al, [rsi+rdx] mov [r15+3], al mov al, [rsi+r13] mov [r15+4], al mov ebx, 5 jmp short loc_2CE22 loc_2CDA7: mov [rbp+var_68], r14 mov esi, dword ptr [rbp+var_58] mov [rbp+var_50], sil lea rsi, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" mov al, [rsi+rax] mov [rbp+var_4F], al mov al, [rsi+rcx] mov [rbp+var_4E], al mov al, [rsi+rdx] mov [rbp+var_4D], al mov al, [rsi+r13] mov [rbp+var_4C], al xor ebx, ebx xor r14d, r14d mov [rbp+var_58], r15 mov r13, r15 loc_2CDDE: test r14, r14 mov eax, [rbp+arg_0] mov r15d, eax cmovz r15d, dword ptr [rbp+var_60] mov rax, [r12+0B8h] movzx esi, [rbp+r14+var_50] mov rdi, r12 mov rdx, r13 mov rcx, [rbp+var_68] call qword ptr [rax+30h] cmp eax, r15d jnz short loc_2CE22 mov eax, r15d add r13, rax inc r14 cmp r14, 5 jnz short loc_2CDDE sub r13d, dword ptr [rbp+var_58] mov ebx, r13d loc_2CE22: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_2CE42 mov eax, ebx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2CE42: call ___stack_chk_fail
long long my_wc_to_printable_ex( long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4, char a5, unsigned int a6, unsigned int a7) { int v9; // ebx long long v10; // rax long long v11; // rax long long v12; // rcx long long v13; // rdx unsigned long long v14; // r13 long long v15; // r14 _BYTE *v16; // r13 unsigned int v17; // r15d unsigned long long v19; // [rsp+8h] [rbp-68h] int v22; // [rsp+18h] [rbp-58h] _BYTE v23[32]; // [rsp+20h] [rbp-50h] unsigned long long v24; // [rsp+40h] [rbp-30h] v24 = __readfsqword(0x28u); if ( a2 - 32 < 0x5F ) { LABEL_2: v9 = (*(long long ( **)(long long, unsigned long long, _BYTE *, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))( a1, a2, a3, a4); if ( v9 > 0 ) return (unsigned int)v9; goto LABEL_10; } if ( a2 > 0x9F ) { if ( (a2 & 0xFFFFFFFFFFFFF800LL) != 0xD800 ) goto LABEL_2; } else if ( (_BYTE)a2 == 10 || (unsigned __int8)a2 == 13 || a2 == 9 ) { goto LABEL_2; } LABEL_10: v10 = a6 + 4 * a7; if ( (unsigned long long)&a3[v10] <= a4 ) { v11 = (unsigned __int16)a2 >> 12; v12 = ((unsigned int)a2 >> 8) & 0xF; v13 = (unsigned __int8)a2 >> 4; v14 = a2 & 0xF; if ( (*(_BYTE *)(a1 + 13) & 0x20) != 0 ) { v19 = a4; v23[0] = a5; v23[1] = dig_vec_upper[v11]; v23[2] = dig_vec_upper[v12]; v23[3] = dig_vec_upper[v13]; v23[4] = dig_vec_upper[v14]; v9 = 0; v15 = 0LL; v22 = (int)a3; v16 = a3; while ( 1 ) { v17 = a7; if ( !v15 ) v17 = a6; if ( (*(unsigned int ( **)(long long, _QWORD, _BYTE *, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))( a1, (unsigned __int8)v23[v15], v16, v19) != v17 ) break; v16 += v17; if ( ++v15 == 5 ) return (unsigned int)((_DWORD)v16 - v22); } } else { *a3 = a5; a3[1] = dig_vec_upper[v11]; a3[2] = dig_vec_upper[v12]; a3[3] = dig_vec_upper[v13]; a3[4] = dig_vec_upper[v14]; return 5; } } else { return (unsigned int)(-100 - v10); } return (unsigned int)v9; }
my_wc_to_printable_ex: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV qword ptr [RBP + -0x60],R9 MOV dword ptr [RBP + -0x58],R8D MOV R14,RCX MOV R15,RDX MOV R13,RSI MOV R12,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA RAX,[RSI + -0x20] CMP RAX,0x5f JNC 0x0012ccff LAB_0012ccdc: MOV RAX,qword ptr [R12 + 0xb8] MOV RDI,R12 MOV RSI,R13 MOV RDX,R15 MOV RCX,R14 CALL qword ptr [RAX + 0x30] MOV EBX,EAX TEST EAX,EAX JG 0x0012ce22 JMP 0x0012cd30 LAB_0012ccff: CMP R13,0x9f JA 0x0012cd1f CMP R13B,0xa JZ 0x0012ccdc MOVZX EAX,R13B CMP EAX,0xd JZ 0x0012ccdc CMP R13,0x9 JZ 0x0012ccdc JMP 0x0012cd30 LAB_0012cd1f: MOV RAX,R13 AND RAX,-0x800 CMP RAX,0xd800 JNZ 0x0012ccdc LAB_0012cd30: MOV ECX,dword ptr [RBP + 0x10] MOV RAX,qword ptr [RBP + -0x60] LEA EAX,[RAX + RCX*0x4] LEA RCX,[R15 + RAX*0x1] CMP RCX,R14 JBE 0x0012cd4f MOV EBX,0xffffff9c SUB EBX,EAX JMP 0x0012ce22 LAB_0012cd4f: MOV EAX,R13D SHR EAX,0xc AND EAX,0xf MOV ECX,R13D SHR ECX,0x8 AND ECX,0xf MOV EDX,R13D SHR EDX,0x4 AND EDX,0xf AND R13D,0xf TEST byte ptr [R12 + 0xd],0x20 JNZ 0x0012cda7 MOV ESI,dword ptr [RBP + -0x58] MOV byte ptr [R15],SIL LEA RSI,[0x167110] MOV AL,byte ptr [RSI + RAX*0x1] MOV byte ptr [R15 + 0x1],AL MOV AL,byte ptr [RSI + RCX*0x1] MOV byte ptr [R15 + 0x2],AL MOV AL,byte ptr [RSI + RDX*0x1] MOV byte ptr [R15 + 0x3],AL MOV AL,byte ptr [RSI + R13*0x1] MOV byte ptr [R15 + 0x4],AL MOV EBX,0x5 JMP 0x0012ce22 LAB_0012cda7: MOV qword ptr [RBP + -0x68],R14 MOV ESI,dword ptr [RBP + -0x58] MOV byte ptr [RBP + -0x50],SIL LEA RSI,[0x167110] MOV AL,byte ptr [RSI + RAX*0x1] MOV byte ptr [RBP + -0x4f],AL MOV AL,byte ptr [RSI + RCX*0x1] MOV byte ptr [RBP + -0x4e],AL MOV AL,byte ptr [RSI + RDX*0x1] MOV byte ptr [RBP + -0x4d],AL MOV AL,byte ptr [RSI + R13*0x1] MOV byte ptr [RBP + -0x4c],AL XOR EBX,EBX XOR R14D,R14D MOV qword ptr [RBP + -0x58],R15 MOV R13,R15 LAB_0012cdde: TEST R14,R14 MOV EAX,dword ptr [RBP + 0x10] MOV R15D,EAX CMOVZ R15D,dword ptr [RBP + -0x60] MOV RAX,qword ptr [R12 + 0xb8] MOVZX ESI,byte ptr [RBP + R14*0x1 + -0x50] MOV RDI,R12 MOV RDX,R13 MOV RCX,qword ptr [RBP + -0x68] CALL qword ptr [RAX + 0x30] CMP EAX,R15D JNZ 0x0012ce22 MOV EAX,R15D ADD R13,RAX INC R14 CMP R14,0x5 JNZ 0x0012cdde SUB R13D,dword ptr [RBP + -0x58] MOV EBX,R13D LAB_0012ce22: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0012ce42 MOV EAX,EBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012ce42: CALL 0x00125320
int my_wc_to_printable_ex (long param_1,ulong param_2,char *param_3,char *param_4,char param_5,uint param_6, uint param_7) { uint uVar1; uint uVar2; uint uVar3; uint uVar4; char *pcVar5; long lVar6; long in_FS_OFFSET; int local_60; char local_58 [32]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); if (param_2 - 0x20 < 0x5f) { LAB_0012ccdc: local_60 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))(param_1,param_2,param_3,param_4); if (0 < local_60) goto LAB_0012ce22; } else if (param_2 < 0xa0) { if ((((char)param_2 == '\n') || (((uint)param_2 & 0xff) == 0xd)) || (param_2 == 9)) goto LAB_0012ccdc; } else if ((param_2 & 0xfffffffffffff800) != 0xd800) goto LAB_0012ccdc; uVar1 = param_6 + param_7 * 4; if (param_4 < param_3 + uVar1) { local_60 = -100 - uVar1; } else { uVar1 = (uint)(param_2 >> 0xc) & 0xf; uVar2 = (uint)(param_2 >> 8) & 0xf; uVar3 = (uint)(param_2 >> 4) & 0xf; uVar4 = (uint)param_2 & 0xf; if ((*(byte *)(param_1 + 0xd) & 0x20) == 0) { *param_3 = param_5; param_3[1] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[uVar1]; param_3[2] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[uVar2]; param_3[3] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[uVar3]; param_3[4] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[uVar4]; local_60 = 5; } else { local_58[0] = param_5; local_58[1] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[uVar1]; local_58[2] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[uVar2]; local_58[3] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[uVar3]; local_58[4] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[uVar4]; local_60 = 0; lVar6 = 0; pcVar5 = param_3; do { uVar1 = param_7; if (lVar6 == 0) { uVar1 = param_6; } uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30)) (param_1,local_58[lVar6],pcVar5,param_4); if (uVar2 != uVar1) goto LAB_0012ce22; pcVar5 = pcVar5 + uVar1; lVar6 = lVar6 + 1; } while (lVar6 != 5); local_60 = (int)param_3; local_60 = (int)pcVar5 - local_60; } } LAB_0012ce22: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_60; }
13,610
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>>>> string_split<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char)
monkey531[P]llama/common/common.h
std::vector<std::string> string_split<std::string>(const std::string & input, char separator) { std::vector<std::string> parts; size_t begin_pos = 0; size_t separator_pos = input.find(separator); while (separator_pos != std::string::npos) { std::string part = input.substr(begin_pos, separator_pos - begin_pos); parts.emplace_back(part); begin_pos = separator_pos + 1; separator_pos = input.find(separator, begin_pos); } parts.emplace_back(input.substr(begin_pos, separator_pos - begin_pos)); return parts; }
O1
c
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>>>> string_split<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %edx, %ebp movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq $0x0, 0x10(%rdi) xorl %r15d, %r15d movq %rsi, %rdi movl %edx, %esi xorl %edx, %edx callq 0x1bb60 cmpq $-0x1, %rax je 0x6132b movq %rax, %r12 xorl %r15d, %r15d leaq 0x8(%rsp), %r13 movsbl %bpl, %ebp movq %r12, %rcx subq %r15, %rcx movq %r13, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x1b960 movq %rbx, %rdi movq %r13, %rsi callq 0x67fbc movq %r12, %r15 incq %r15 movq %r14, %rdi movl %ebp, %esi movq %r15, %rdx callq 0x1bb60 movq %rax, %r12 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x61325 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b910 cmpq $-0x1, %r12 jne 0x612d4 movq %r15, %rcx notq %rcx leaq 0x8(%rsp), %rdi movq %r14, %rsi movq %r15, %rdx callq 0x1b960 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x68002 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x61369 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b910 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi jmp 0x6139d jmp 0x6138b movq %rax, %r14 jmp 0x613af movq %rax, %r14 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x613af movq 0x18(%rsp), %rsi incq %rsi callq 0x1b910 movq %rbx, %rdi callq 0x24318 movq %r14, %rdi callq 0x1bff0 nop
_ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov ebp, edx mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 xor r15d, r15d mov rdi, rsi mov esi, edx xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_6132B mov r12, rax xor r15d, r15d lea r13, [rsp+58h+var_50] movsx ebp, bpl loc_612D4: mov rcx, r12 sub rcx, r15 mov rdi, r13 mov rsi, r14 mov rdx, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, rbx mov rsi, r13 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJRS5_EEES9_DpOT_; std::vector<std::string>::emplace_back<std::string&>(std::string&) mov r15, r12 inc r15 mov rdi, r14 mov esi, ebp mov rdx, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) mov r12, rax mov rdi, [rsp+58h+var_50]; void * lea rax, [rsp+58h+var_40] cmp rdi, rax jz short loc_61325 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_61325: cmp r12, 0FFFFFFFFFFFFFFFFh jnz short loc_612D4 loc_6132B: mov rcx, r15 not rcx lea rdi, [rsp+58h+var_50] mov rsi, r14 mov rdx, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) lea rax, [rsp+58h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_61369 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_61369: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h] jmp short loc_6139D jmp short $+2 loc_6138B: mov r14, rax jmp short loc_613AF mov r14, rax mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] loc_6139D: cmp rdi, rax jz short loc_613AF mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_613AF: mov rdi, rbx; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, r14 call __Unwind_Resume
long long string_split<std::string>(long long a1, long long a2, unsigned int a3) { char v3; // bp long long v4; // r15 long long v5; // rax long long v6; // r12 void *v8[2]; // [rsp+8h] [rbp-50h] BYREF _QWORD v9[8]; // [rsp+18h] [rbp-40h] BYREF v3 = a3; *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; v4 = 0LL; v5 = std::string::find(a2, a3, 0LL); if ( v5 != -1 ) { v6 = v5; v4 = 0LL; do { std::string::substr(v8, a2, v4, v6 - v4); std::vector<std::string>::emplace_back<std::string&>(a1, v8); v4 = v6 + 1; v6 = std::string::find(a2, (unsigned int)v3, v6 + 1); if ( v8[0] != v9 ) operator delete(v8[0], v9[0] + 1LL); } while ( v6 != -1 ); } std::string::substr(v8, a2, v4, ~v4); std::vector<std::string>::emplace_back<std::string>(a1, v8); if ( v8[0] != v9 ) operator delete(v8[0], v9[0] + 1LL); return a1; }
string_split<std::__cxx11::string>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBP,EDX MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 XOR R15D,R15D MOV RDI,RSI MOV ESI,EDX XOR EDX,EDX CALL 0x0011bb60 CMP RAX,-0x1 JZ 0x0016132b MOV R12,RAX XOR R15D,R15D LEA R13,[RSP + 0x8] MOVSX EBP,BPL LAB_001612d4: MOV RCX,R12 SUB RCX,R15 LAB_001612da: MOV RDI,R13 MOV RSI,R14 MOV RDX,R15 CALL 0x0011b960 LAB_001612e8: MOV RDI,RBX MOV RSI,R13 CALL 0x00167fbc MOV R15,R12 INC R15 MOV RDI,R14 MOV ESI,EBP MOV RDX,R15 CALL 0x0011bb60 MOV R12,RAX MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x00161325 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b910 LAB_00161325: CMP R12,-0x1 JNZ 0x001612d4 LAB_0016132b: MOV RCX,R15 NOT RCX LAB_00161331: LEA RDI,[RSP + 0x8] MOV RSI,R14 MOV RDX,R15 CALL 0x0011b960 LAB_00161341: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x00168002 LAB_0016134e: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00161369 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b910 LAB_00161369: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > string_split<std::__cxx11::string >(std::__cxx11::string const&, char) */ string * string_split<std::__cxx11::string>(string *param_1,char param_2) { long lVar1; uint in_EDX; int7 in_register_00000031; long *local_50 [2]; long local_40 [2]; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; lVar1 = std::__cxx11::string::find(param_2,(ulong)in_EDX); if (lVar1 != -1) { do { /* try { // try from 001612da to 001612e7 has its CatchHandler @ 0016138b */ std::__cxx11::string::substr((ulong)local_50,CONCAT71(in_register_00000031,param_2)); /* try { // try from 001612e8 to 001612f2 has its CatchHandler @ 00161390 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string&> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1, (string *)local_50); lVar1 = std::__cxx11::string::find(param_2,(ulong)(uint)(int)(char)in_EDX); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } } while (lVar1 != -1); } /* try { // try from 00161331 to 00161340 has its CatchHandler @ 00161389 */ std::__cxx11::string::substr((ulong)local_50,CONCAT71(in_register_00000031,param_2)); /* try { // try from 00161341 to 0016134d has its CatchHandler @ 0016137b */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1, (string *)local_50); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } return param_1; }
13,611
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>>>> string_split<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char)
monkey531[P]llama/common/common.h
std::vector<std::string> string_split<std::string>(const std::string & input, char separator) { std::vector<std::string> parts; size_t begin_pos = 0; size_t separator_pos = input.find(separator); while (separator_pos != std::string::npos) { std::string part = input.substr(begin_pos, separator_pos - begin_pos); parts.emplace_back(part); begin_pos = separator_pos + 1; separator_pos = input.find(separator, begin_pos); } parts.emplace_back(input.substr(begin_pos, separator_pos - begin_pos)); return parts; }
O2
c
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>>>> string_split<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %edx, %ebp movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) andq $0x0, 0x10(%rdi) xorl %r13d, %r13d movq %rsi, %rdi movl %edx, %esi xorl %edx, %edx callq 0x24b90 movq %rax, %r15 leaq 0x8(%rsp), %r12 movsbl %bpl, %eax movl %eax, 0x4(%rsp) cmpq $-0x1, %r15 je 0x46399 movq %r15, %rcx subq %r13, %rcx movq %r12, %rdi movq %r14, %rsi movq %r13, %rdx callq 0x24970 movq %rbx, %rbp movq %rbx, %rdi movq %r12, %rsi callq 0x4b2d8 incq %r15 movq %r14, %rdi movl 0x4(%rsp), %esi movq %r15, %rdx callq 0x24b90 movq %rax, %rbx movq %r12, %rdi callq 0x25258 movq %r15, %r13 movq %rbx, %r15 movq %rbp, %rbx jmp 0x46349 movq %r13, %rcx notq %rcx leaq 0x8(%rsp), %rdi movq %r14, %rsi movq %r13, %rdx callq 0x24970 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x4b314 leaq 0x8(%rsp), %rdi callq 0x25258 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rbx, %rbp jmp 0x463e7 jmp 0x463df movq %rbx, %rbp movq %rax, %r14 jmp 0x463f4 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x25258 movq %rbp, %rdi callq 0x29c48 movq %r14, %rdi callq 0x24fe0
_ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov ebp, edx mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 and qword ptr [rdi+10h], 0 xor r13d, r13d mov rdi, rsi mov esi, edx xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) mov r15, rax lea r12, [rsp+58h+var_50] movsx eax, bpl mov [rsp+58h+var_54], eax loc_46349: cmp r15, 0FFFFFFFFFFFFFFFFh jz short loc_46399 mov rcx, r15 sub rcx, r13 mov rdi, r12 mov rsi, r14 mov rdx, r13 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rbp, rbx mov rdi, rbx mov rsi, r12 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJRS5_EEES9_DpOT_; std::vector<std::string>::emplace_back<std::string&>(std::string&) inc r15 mov rdi, r14 mov esi, [rsp+58h+var_54] mov rdx, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) mov rbx, rax mov rdi, r12; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov r13, r15 mov r15, rbx mov rbx, rbp jmp short loc_46349 loc_46399: mov rcx, r13 not rcx lea rdi, [rsp+58h+var_50] mov rsi, r14 mov rdx, r13 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) lea rdi, [rsp+58h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbp, rbx jmp short loc_463E7 jmp short $+2 loc_463DF: mov rbp, rbx mov r14, rax jmp short loc_463F4 loc_463E7: mov r14, rax lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_463F4: mov rdi, rbp; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, r14 call __Unwind_Resume
long long string_split<std::string>(long long a1, long long a2, unsigned int a3) { char v3; // bp long long v4; // rbx long long v5; // r13 long long v6; // r15 long long v7; // rbp long long v8; // r15 long long v9; // rbx unsigned int v11; // [rsp+4h] [rbp-54h] _BYTE v12[80]; // [rsp+8h] [rbp-50h] BYREF v3 = a3; v4 = a1; *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; v5 = 0LL; v6 = std::string::find(a2, a3, 0LL); v11 = v3; while ( v6 != -1 ) { std::string::substr(v12, a2, v5, v6 - v5); v7 = v4; std::vector<std::string>::emplace_back<std::string&>(v4, v12); v8 = v6 + 1; v9 = std::string::find(a2, v11, v8); std::string::~string(v12); v5 = v8; v6 = v9; v4 = v7; } std::string::substr(v12, a2, v5, ~v5); std::vector<std::string>::emplace_back<std::string>(v4, v12); std::string::~string(v12); return v4; }
string_split<std::__cxx11::string>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBP,EDX MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 AND qword ptr [RDI + 0x10],0x0 XOR R13D,R13D MOV RDI,RSI MOV ESI,EDX XOR EDX,EDX CALL 0x00124b90 MOV R15,RAX LEA R12,[RSP + 0x8] MOVSX EAX,BPL MOV dword ptr [RSP + 0x4],EAX LAB_00146349: CMP R15,-0x1 JZ 0x00146399 MOV RCX,R15 SUB RCX,R13 LAB_00146355: MOV RDI,R12 MOV RSI,R14 MOV RDX,R13 CALL 0x00124970 LAB_00146363: MOV RBP,RBX MOV RDI,RBX MOV RSI,R12 CALL 0x0014b2d8 INC R15 MOV RDI,R14 MOV ESI,dword ptr [RSP + 0x4] MOV RDX,R15 CALL 0x00124b90 MOV RBX,RAX MOV RDI,R12 CALL 0x00125258 MOV R13,R15 MOV R15,RBX MOV RBX,RBP JMP 0x00146349 LAB_00146399: MOV RCX,R13 NOT RCX LAB_0014639f: LEA RDI,[RSP + 0x8] MOV RSI,R14 MOV RDX,R13 CALL 0x00124970 LAB_001463af: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x0014b314 LAB_001463bc: LEA RDI,[RSP + 0x8] CALL 0x00125258 MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > string_split<std::__cxx11::string >(std::__cxx11::string const&, char) */ string * string_split<std::__cxx11::string>(string *param_1,char param_2) { long lVar1; uint in_EDX; int7 in_register_00000031; string local_50 [32]; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; lVar1 = std::__cxx11::string::find(param_2,(ulong)in_EDX); while (lVar1 != -1) { /* try { // try from 00146355 to 00146362 has its CatchHandler @ 001463df */ std::__cxx11::string::substr((ulong)local_50,CONCAT71(in_register_00000031,param_2)); /* try { // try from 00146363 to 00146370 has its CatchHandler @ 001463e7 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string&> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,local_50 ); lVar1 = std::__cxx11::string::find(param_2,(ulong)(uint)(int)(char)in_EDX); std::__cxx11::string::~string(local_50); } /* try { // try from 0014639f to 001463ae has its CatchHandler @ 001463dd */ std::__cxx11::string::substr((ulong)local_50,CONCAT71(in_register_00000031,param_2)); /* try { // try from 001463af to 001463bb has its CatchHandler @ 001463d8 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,local_50); std::__cxx11::string::~string(local_50); return param_1; }
13,612
my_getwd
eloqsql/mysys/my_getwd.c
int my_getwd(char * buf, size_t size, myf MyFlags) { char * pos; DBUG_ENTER("my_getwd"); DBUG_PRINT("my",("buf:%p size: %u MyFlags %lu", buf, (uint) size, MyFlags)); if (size < 1) DBUG_RETURN(-1); if (curr_dir[0]) /* Current pos is saved here */ (void) strmake(buf,&curr_dir[0],size-1); else { #if defined(HAVE_GETCWD) if (size < 2) DBUG_RETURN(-1); if (!getcwd(buf,(uint) (size-2)) && MyFlags & MY_WME) { my_errno=errno; my_error(EE_GETWD,MYF(ME_BELL),errno); DBUG_RETURN(-1); } #elif defined(HAVE_GETWD) { char pathname[MAXPATHLEN]; getwd(pathname); strmake(buf,pathname,size-1); } #else #error "No way to get current directory" #endif if (*((pos=strend(buf))-1) != FN_LIBCHAR) /* End with FN_LIBCHAR */ { pos[0]= FN_LIBCHAR; pos[1]=0; } (void) strmake(&curr_dir[0],buf, (size_t) (FN_REFLEN-1)); } DBUG_RETURN(0); }
O3
c
my_getwd: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl $0xffffffff, %ebx # imm = 0xFFFFFFFF testq %rsi, %rsi je 0xbdc15 movq %rdx, %r15 movq %rsi, %rdx movq %rdi, %r14 leaq 0xb72b2c(%rip), %rax # 0xc306e0 cmpb $0x0, (%rax) je 0xbdbcf decq %rdx leaq 0xb72b1d(%rip), %rsi # 0xc306e0 movq %r14, %rdi callq 0xf6e50 xorl %ebx, %ebx jmp 0xbdc15 cmpq $0x1, %rdx je 0xbdc15 addl $-0x2, %edx movq %r14, %rdi movq %rdx, %rsi callq 0x2a360 testb $0x10, %r15b je 0xbdc22 testq %rax, %rax jne 0xbdc22 callq 0x2a870 movq %rax, %r14 movl (%rax), %r15d callq 0xc14ee movl %r15d, (%rax) movl (%r14), %edx movl $0x4, %esi movl $0x10, %edi xorl %eax, %eax callq 0xbad7b movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %r14, %rdi callq 0xf6e08 cmpb $0x2f, -0x1(%rax) je 0xbdc35 movw $0x2f, (%rax) leaq 0xb72aa4(%rip), %rdi # 0xc306e0 movl $0x1ff, %edx # imm = 0x1FF movq %r14, %rsi jmp 0xbdbc6
my_getwd: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov ebx, 0FFFFFFFFh test rsi, rsi jz short loc_BDC15 mov r15, rdx mov rdx, rsi mov r14, rdi lea rax, curr_dir cmp byte ptr [rax], 0 jz short loc_BDBCF dec rdx lea rsi, curr_dir mov rdi, r14 loc_BDBC6: call strmake xor ebx, ebx jmp short loc_BDC15 loc_BDBCF: cmp rdx, 1 jz short loc_BDC15 add edx, 0FFFFFFFEh mov rdi, r14 mov rsi, rdx call _getcwd test r15b, 10h jz short loc_BDC22 test rax, rax jnz short loc_BDC22 call ___errno_location mov r14, rax mov r15d, [rax] call _my_thread_var mov [rax], r15d mov edx, [r14] mov esi, 4 mov edi, 10h xor eax, eax call my_error loc_BDC15: mov eax, ebx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_BDC22: mov rdi, r14 call strend cmp byte ptr [rax-1], 2Fh ; '/' jz short loc_BDC35 mov word ptr [rax], 2Fh ; '/' loc_BDC35: lea rdi, curr_dir mov edx, 1FFh mov rsi, r14 jmp short loc_BDBC6
long long my_getwd(_BYTE *a1, long long a2, char a3) { unsigned int v3; // ebx _BYTE *v5; // r14 long long v6; // rdx _BYTE *v7; // rsi long long v8; // rax unsigned int *v9; // r14 unsigned int v10; // r15d _WORD *v12; // rax v3 = -1; if ( a2 ) { v5 = a1; if ( curr_dir[0] ) { v6 = a2 - 1; v7 = curr_dir; } else { if ( a2 == 1 ) return v3; v8 = getcwd(a1, (unsigned int)(a2 - 2)); if ( (a3 & 0x10) != 0 && !v8 ) { v9 = (unsigned int *)__errno_location(a1); v10 = *v9; *(_DWORD *)my_thread_var(a1) = v10; my_error(0x10u, 4LL, *v9); return v3; } v12 = (_WORD *)strend(a1); if ( *((_BYTE *)v12 - 1) != 47 ) *v12 = 47; a1 = curr_dir; v6 = 511LL; v7 = v5; } strmake(a1, v7, v6); return 0; } return v3; }
my_getwd: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBX,0xffffffff TEST RSI,RSI JZ 0x001bdc15 MOV R15,RDX MOV RDX,RSI MOV R14,RDI LEA RAX,[0xd306e0] CMP byte ptr [RAX],0x0 JZ 0x001bdbcf DEC RDX LEA RSI,[0xd306e0] MOV RDI,R14 LAB_001bdbc6: CALL 0x001f6e50 XOR EBX,EBX JMP 0x001bdc15 LAB_001bdbcf: CMP RDX,0x1 JZ 0x001bdc15 ADD EDX,-0x2 MOV RDI,R14 MOV RSI,RDX CALL 0x0012a360 TEST R15B,0x10 JZ 0x001bdc22 TEST RAX,RAX JNZ 0x001bdc22 CALL 0x0012a870 MOV R14,RAX MOV R15D,dword ptr [RAX] CALL 0x001c14ee MOV dword ptr [RAX],R15D MOV EDX,dword ptr [R14] MOV ESI,0x4 MOV EDI,0x10 XOR EAX,EAX CALL 0x001bad7b LAB_001bdc15: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_001bdc22: MOV RDI,R14 CALL 0x001f6e08 CMP byte ptr [RAX + -0x1],0x2f JZ 0x001bdc35 MOV word ptr [RAX],0x2f LAB_001bdc35: LEA RDI,[0xd306e0] MOV EDX,0x1ff MOV RSI,R14 JMP 0x001bdbc6
int8 my_getwd(char *param_1,long param_2,ulong param_3) { int iVar1; char *pcVar2; int *piVar3; int *piVar4; int2 *puVar5; char *pcVar6; if (param_2 == 0) { return 0xffffffff; } if (curr_dir == '\0') { if (param_2 == 1) { return 0xffffffff; } pcVar2 = getcwd(param_1,(ulong)((int)param_2 - 2)); if (((param_3 & 0x10) != 0) && (pcVar2 == (char *)0x0)) { piVar3 = __errno_location(); iVar1 = *piVar3; piVar4 = (int *)_my_thread_var(); *piVar4 = iVar1; my_error(0x10,4,*piVar3); return 0xffffffff; } puVar5 = (int2 *)strend(param_1); if (*(char *)((long)puVar5 + -1) != '/') { *puVar5 = 0x2f; } pcVar6 = &curr_dir; param_2 = 0x1ff; pcVar2 = param_1; } else { param_2 = param_2 + -1; pcVar2 = &curr_dir; pcVar6 = param_1; } strmake(pcVar6,pcVar2,param_2); return 0; }
13,613
mi_read_rnd_pack_record
eloqsql/storage/myisam/mi_packrec.c
int _mi_read_rnd_pack_record(MI_INFO *info, uchar *buf, register my_off_t filepos, my_bool skip_deleted_blocks) { uint b_type; MI_BLOCK_INFO block_info; MYISAM_SHARE *share=info->s; DBUG_ENTER("_mi_read_rnd_pack_record"); if (filepos >= info->state->data_file_length) { my_errno= HA_ERR_END_OF_FILE; goto err; } if (info->opt_flag & READ_CACHE_USED) { if (_mi_read_cache(&info->rec_cache, (uchar*) block_info.header, filepos, share->pack.ref_length, skip_deleted_blocks ? READING_NEXT : 0)) goto err; b_type=_mi_pack_get_block_info(info, &info->bit_buff, &block_info, &info->rec_buff, -1, filepos); } else b_type=_mi_pack_get_block_info(info, &info->bit_buff, &block_info, &info->rec_buff, info->dfile, filepos); if (b_type) goto err; /* Error code is already set */ #ifndef DBUG_OFF if (block_info.rec_len > share->max_pack_length) { my_errno=HA_ERR_WRONG_IN_RECORD; goto err; } #endif if (info->opt_flag & READ_CACHE_USED) { if (_mi_read_cache(&info->rec_cache, (uchar*) info->rec_buff, block_info.filepos, block_info.rec_len, skip_deleted_blocks ? READING_NEXT : 0)) goto err; } else { if (mysql_file_read(info->dfile, (uchar*) info->rec_buff + block_info.offset, block_info.rec_len-block_info.offset, MYF(MY_NABP))) goto err; } info->packed_length=block_info.rec_len; info->lastpos=filepos; info->nextpos=block_info.filepos+block_info.rec_len; info->update|= HA_STATE_AKTIV | HA_STATE_KEY_CHANGED; info->rec_buff[block_info.rec_len]= 0; /* Keep valgrind happy */ DBUG_RETURN(_mi_pack_rec_unpack(info, &info->bit_buff, buf, info->rec_buff, block_info.rec_len)); err: DBUG_RETURN(my_errno); }
O0
c
mi_read_rnd_pack_record: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movb %cl, %al movq %fs:0x28, %rcx movq %rcx, -0x8(%rbp) movq %rdi, -0x70(%rbp) movq %rsi, -0x78(%rbp) movq %rdx, -0x80(%rbp) movb %al, -0x81(%rbp) movq -0x70(%rbp), %rax movq (%rax), %rax movq %rax, -0x90(%rbp) movq -0x80(%rbp), %rax movq -0x70(%rbp), %rcx movq 0x8(%rcx), %rcx cmpq 0x28(%rcx), %rax jb 0xbb86c callq 0xf60c0 movl $0x89, (%rax) jmp 0xbba61 movq -0x70(%rbp), %rax movl 0x1c8(%rax), %eax andl $0x2, %eax cmpl $0x0, %eax je 0xbb8f9 movq -0x70(%rbp), %rdi addq $0x220, %rdi # imm = 0x220 leaq -0x60(%rbp), %rsi movq -0x80(%rbp), %rdx movq -0x90(%rbp), %rax movl 0x240(%rax), %eax movl %eax, %ecx movsbl -0x81(%rbp), %r9d xorl %r8d, %r8d movl $0x1, %eax cmpl $0x0, %r9d cmovnel %eax, %r8d callq 0xd68e0 cmpl $0x0, %eax je 0xbb8c7 jmp 0xbba61 movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rsi addq $0x50, %rsi movq -0x70(%rbp), %rcx addq $0x120, %rcx # imm = 0x120 movq -0x80(%rbp), %r9 leaq -0x60(%rbp), %rdx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF callq 0xbb4f0 movl %eax, -0x88(%rbp) jmp 0xbb92e movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rsi addq $0x50, %rsi movq -0x70(%rbp), %rcx addq $0x120, %rcx # imm = 0x120 movq -0x70(%rbp), %rax movl 0x1c0(%rax), %r8d movq -0x80(%rbp), %r9 leaq -0x60(%rbp), %rdx callq 0xbb4f0 movl %eax, -0x88(%rbp) cmpl $0x0, -0x88(%rbp) je 0xbb93c jmp 0xbba61 movq -0x70(%rbp), %rax movl 0x1c8(%rax), %eax andl $0x2, %eax cmpl $0x0, %eax je 0xbb995 movq -0x70(%rbp), %rdi addq $0x220, %rdi # imm = 0x220 movq -0x70(%rbp), %rax movq 0x120(%rax), %rsi movq -0x28(%rbp), %rdx movq -0x48(%rbp), %rcx movsbl -0x81(%rbp), %r9d xorl %r8d, %r8d movl $0x1, %eax cmpl $0x0, %r9d cmovnel %eax, %r8d callq 0xd68e0 cmpl $0x0, %eax je 0xbb993 jmp 0xbba61 jmp 0xbb9de movq -0x70(%rbp), %rax movl 0x1c0(%rax), %edx movq -0x70(%rbp), %rax movq 0x120(%rax), %rcx movl -0xc(%rbp), %eax addq %rax, %rcx movq -0x48(%rbp), %r8 movl -0xc(%rbp), %eax subq %rax, %r8 leaq 0x98205(%rip), %rdi # 0x153bc6 movl $0x545, %esi # imm = 0x545 movl $0x4, %r9d callq 0xba960 cmpq $0x0, %rax je 0xbb9dc jmp 0xbba61 jmp 0xbb9de movq -0x48(%rbp), %rcx movq -0x70(%rbp), %rax movq %rcx, 0x1b0(%rax) movq -0x80(%rbp), %rcx movq -0x70(%rbp), %rax movq %rcx, 0x170(%rax) movq -0x28(%rbp), %rcx addq -0x48(%rbp), %rcx movq -0x70(%rbp), %rax movq %rcx, 0x178(%rax) movq -0x70(%rbp), %rax movl 0x1d0(%rax), %ecx orl $0x82, %ecx movl %ecx, 0x1d0(%rax) movq -0x70(%rbp), %rax movq 0x120(%rax), %rax movq -0x48(%rbp), %rcx movb $0x0, (%rax,%rcx) movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rsi addq $0x50, %rsi movq -0x78(%rbp), %rdx movq -0x70(%rbp), %rax movq 0x120(%rax), %rcx movq -0x48(%rbp), %r8 callq 0xbb6f0 movl %eax, -0x64(%rbp) jmp 0xbba6d jmp 0xbba63 callq 0xf60c0 movl (%rax), %eax movl %eax, -0x64(%rbp) movl -0x64(%rbp), %eax movl %eax, -0x94(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xbba97 movl -0x94(%rbp), %eax addq $0xa0, %rsp popq %rbp retq callq 0x2a270 nopl (%rax)
_mi_read_rnd_pack_record: push rbp mov rbp, rsp sub rsp, 0A0h mov al, cl mov rcx, fs:28h mov [rbp+var_8], rcx mov [rbp+var_70], rdi mov [rbp+var_78], rsi mov [rbp+var_80], rdx mov [rbp+var_81], al mov rax, [rbp+var_70] mov rax, [rax] mov [rbp+var_90], rax mov rax, [rbp+var_80] mov rcx, [rbp+var_70] mov rcx, [rcx+8] cmp rax, [rcx+28h] jb short loc_BB86C call _my_thread_var mov dword ptr [rax], 89h jmp loc_BBA61 loc_BB86C: mov rax, [rbp+var_70] mov eax, [rax+1C8h] and eax, 2 cmp eax, 0 jz short loc_BB8F9 mov rdi, [rbp+var_70] add rdi, 220h lea rsi, [rbp+var_60] mov rdx, [rbp+var_80] mov rax, [rbp+var_90] mov eax, [rax+240h] mov ecx, eax movsx r9d, [rbp+var_81] xor r8d, r8d mov eax, 1 cmp r9d, 0 cmovnz r8d, eax call _mi_read_cache cmp eax, 0 jz short loc_BB8C7 jmp loc_BBA61 loc_BB8C7: mov rdi, [rbp+var_70] mov rsi, [rbp+var_70] add rsi, 50h ; 'P' mov rcx, [rbp+var_70] add rcx, 120h mov r9, [rbp+var_80] lea rdx, [rbp+var_60] mov r8d, 0FFFFFFFFh call _mi_pack_get_block_info mov [rbp+var_88], eax jmp short loc_BB92E loc_BB8F9: mov rdi, [rbp+var_70] mov rsi, [rbp+var_70] add rsi, 50h ; 'P' mov rcx, [rbp+var_70] add rcx, 120h mov rax, [rbp+var_70] mov r8d, [rax+1C0h] mov r9, [rbp+var_80] lea rdx, [rbp+var_60] call _mi_pack_get_block_info mov [rbp+var_88], eax loc_BB92E: cmp [rbp+var_88], 0 jz short loc_BB93C jmp loc_BBA61 loc_BB93C: mov rax, [rbp+var_70] mov eax, [rax+1C8h] and eax, 2 cmp eax, 0 jz short loc_BB995 mov rdi, [rbp+var_70] add rdi, 220h mov rax, [rbp+var_70] mov rsi, [rax+120h] mov rdx, [rbp+var_28] mov rcx, [rbp+var_48] movsx r9d, [rbp+var_81] xor r8d, r8d mov eax, 1 cmp r9d, 0 cmovnz r8d, eax call _mi_read_cache cmp eax, 0 jz short loc_BB993 jmp loc_BBA61 loc_BB993: jmp short loc_BB9DE loc_BB995: mov rax, [rbp+var_70] mov edx, [rax+1C0h] mov rax, [rbp+var_70] mov rcx, [rax+120h] mov eax, [rbp+var_C] add rcx, rax mov r8, [rbp+var_48] mov eax, [rbp+var_C] sub r8, rax lea rdi, aWorkspaceLlm4b_30; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 545h mov r9d, 4 call inline_mysql_file_read_3 cmp rax, 0 jz short loc_BB9DC jmp loc_BBA61 loc_BB9DC: jmp short $+2 loc_BB9DE: mov rcx, [rbp+var_48] mov rax, [rbp+var_70] mov [rax+1B0h], rcx mov rcx, [rbp+var_80] mov rax, [rbp+var_70] mov [rax+170h], rcx mov rcx, [rbp+var_28] add rcx, [rbp+var_48] mov rax, [rbp+var_70] mov [rax+178h], rcx mov rax, [rbp+var_70] mov ecx, [rax+1D0h] or ecx, 82h mov [rax+1D0h], ecx mov rax, [rbp+var_70] mov rax, [rax+120h] mov rcx, [rbp+var_48] mov byte ptr [rax+rcx], 0 mov rdi, [rbp+var_70] mov rsi, [rbp+var_70] add rsi, 50h ; 'P' mov rdx, [rbp+var_78] mov rax, [rbp+var_70] mov rcx, [rax+120h] mov r8, [rbp+var_48] call _mi_pack_rec_unpack mov [rbp+var_64], eax jmp short loc_BBA6D loc_BBA61: jmp short $+2 loc_BBA63: call _my_thread_var mov eax, [rax] mov [rbp+var_64], eax loc_BBA6D: mov eax, [rbp+var_64] mov [rbp+var_94], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_BBA97 mov eax, [rbp+var_94] add rsp, 0A0h pop rbp retn loc_BBA97: call ___stack_chk_fail
long long mi_read_rnd_pack_record(char *a1, const char *a2, unsigned long long a3, char a4) { long long v5; // [rsp+10h] [rbp-90h] int block_info; // [rsp+18h] [rbp-88h] long long v9; // [rsp+28h] [rbp-78h] char *v10; // [rsp+30h] [rbp-70h] _BYTE v12[24]; // [rsp+40h] [rbp-60h] BYREF long long v13; // [rsp+58h] [rbp-48h] long long v14; // [rsp+78h] [rbp-28h] unsigned int v15; // [rsp+94h] [rbp-Ch] unsigned long long v16; // [rsp+98h] [rbp-8h] v16 = __readfsqword(0x28u); v10 = a1; v9 = (long long)a2; v5 = *(_QWORD *)a1; if ( a3 >= *(_QWORD *)(*((_QWORD *)a1 + 1) + 40LL) ) { *(_DWORD *)my_thread_var(a1, a2) = 137; return *(unsigned int *)my_thread_var(a1, a2); } if ( (*((_DWORD *)a1 + 114) & 2) != 0 ) { a1 += 544; a2 = v12; if ( (unsigned int)mi_read_cache(a1, v12, a3, *(unsigned int *)(v5 + 576), a4 != 0) ) return *(unsigned int *)my_thread_var(a1, a2); a1 = v10; a2 = v10 + 80; block_info = mi_pack_get_block_info(v10, (long long)(v10 + 80), (long long)v12, (long long *)v10 + 36, -1, a3); } else { a2 = a1 + 80; block_info = mi_pack_get_block_info( a1, (long long)(a1 + 80), (long long)v12, (long long *)a1 + 36, *((_DWORD *)a1 + 112), a3); } if ( block_info ) return *(unsigned int *)my_thread_var(a1, a2); if ( (*((_DWORD *)v10 + 114) & 2) != 0 ) { a1 = v10 + 544; a2 = (const char *)*((_QWORD *)v10 + 36); if ( (unsigned int)mi_read_cache(v10 + 544, a2, v14, v13, a4 != 0) ) return *(unsigned int *)my_thread_var(a1, a2); } else { a1 = "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c"; a2 = (_BYTE *)(&stru_538 + 13); if ( inline_mysql_file_read_3( (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c", 0x545u, *((_DWORD *)v10 + 112), v15 + *((_QWORD *)v10 + 36), v13 - v15, 4LL) ) { return *(unsigned int *)my_thread_var(a1, a2); } } *((_QWORD *)v10 + 54) = v13; *((_QWORD *)v10 + 46) = a3; *((_QWORD *)v10 + 47) = v13 + v14; *((_DWORD *)v10 + 116) |= 0x82u; *(_BYTE *)(*((_QWORD *)v10 + 36) + v13) = 0; return (unsigned int)mi_pack_rec_unpack((long long *)v10, (long long)(v10 + 80), v9, *((_QWORD *)v10 + 36), v13); }
_mi_read_rnd_pack_record: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV AL,CL MOV RCX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RCX MOV qword ptr [RBP + -0x70],RDI MOV qword ptr [RBP + -0x78],RSI MOV qword ptr [RBP + -0x80],RDX MOV byte ptr [RBP + -0x81],AL MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x80] MOV RCX,qword ptr [RBP + -0x70] MOV RCX,qword ptr [RCX + 0x8] CMP RAX,qword ptr [RCX + 0x28] JC 0x001bb86c CALL 0x001f60c0 MOV dword ptr [RAX],0x89 JMP 0x001bba61 LAB_001bb86c: MOV RAX,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RAX + 0x1c8] AND EAX,0x2 CMP EAX,0x0 JZ 0x001bb8f9 MOV RDI,qword ptr [RBP + -0x70] ADD RDI,0x220 LEA RSI,[RBP + -0x60] MOV RDX,qword ptr [RBP + -0x80] MOV RAX,qword ptr [RBP + -0x90] MOV EAX,dword ptr [RAX + 0x240] MOV ECX,EAX MOVSX R9D,byte ptr [RBP + -0x81] XOR R8D,R8D MOV EAX,0x1 CMP R9D,0x0 CMOVNZ R8D,EAX CALL 0x001d68e0 CMP EAX,0x0 JZ 0x001bb8c7 JMP 0x001bba61 LAB_001bb8c7: MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x70] ADD RSI,0x50 MOV RCX,qword ptr [RBP + -0x70] ADD RCX,0x120 MOV R9,qword ptr [RBP + -0x80] LEA RDX,[RBP + -0x60] MOV R8D,0xffffffff CALL 0x001bb4f0 MOV dword ptr [RBP + -0x88],EAX JMP 0x001bb92e LAB_001bb8f9: MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x70] ADD RSI,0x50 MOV RCX,qword ptr [RBP + -0x70] ADD RCX,0x120 MOV RAX,qword ptr [RBP + -0x70] MOV R8D,dword ptr [RAX + 0x1c0] MOV R9,qword ptr [RBP + -0x80] LEA RDX,[RBP + -0x60] CALL 0x001bb4f0 MOV dword ptr [RBP + -0x88],EAX LAB_001bb92e: CMP dword ptr [RBP + -0x88],0x0 JZ 0x001bb93c JMP 0x001bba61 LAB_001bb93c: MOV RAX,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RAX + 0x1c8] AND EAX,0x2 CMP EAX,0x0 JZ 0x001bb995 MOV RDI,qword ptr [RBP + -0x70] ADD RDI,0x220 MOV RAX,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RAX + 0x120] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x48] MOVSX R9D,byte ptr [RBP + -0x81] XOR R8D,R8D MOV EAX,0x1 CMP R9D,0x0 CMOVNZ R8D,EAX CALL 0x001d68e0 CMP EAX,0x0 JZ 0x001bb993 JMP 0x001bba61 LAB_001bb993: JMP 0x001bb9de LAB_001bb995: MOV RAX,qword ptr [RBP + -0x70] MOV EDX,dword ptr [RAX + 0x1c0] MOV RAX,qword ptr [RBP + -0x70] MOV RCX,qword ptr [RAX + 0x120] MOV EAX,dword ptr [RBP + -0xc] ADD RCX,RAX MOV R8,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RBP + -0xc] SUB R8,RAX LEA RDI,[0x253bc6] MOV ESI,0x545 MOV R9D,0x4 CALL 0x001ba960 CMP RAX,0x0 JZ 0x001bb9dc JMP 0x001bba61 LAB_001bb9dc: JMP 0x001bb9de LAB_001bb9de: MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RAX + 0x1b0],RCX MOV RCX,qword ptr [RBP + -0x80] MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RAX + 0x170],RCX MOV RCX,qword ptr [RBP + -0x28] ADD RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RAX + 0x178],RCX MOV RAX,qword ptr [RBP + -0x70] MOV ECX,dword ptr [RAX + 0x1d0] OR ECX,0x82 MOV dword ptr [RAX + 0x1d0],ECX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x120] MOV RCX,qword ptr [RBP + -0x48] MOV byte ptr [RAX + RCX*0x1],0x0 MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x70] ADD RSI,0x50 MOV RDX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x70] MOV RCX,qword ptr [RAX + 0x120] MOV R8,qword ptr [RBP + -0x48] CALL 0x001bb6f0 MOV dword ptr [RBP + -0x64],EAX JMP 0x001bba6d LAB_001bba61: JMP 0x001bba63 LAB_001bba63: CALL 0x001f60c0 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x64],EAX LAB_001bba6d: MOV EAX,dword ptr [RBP + -0x64] MOV dword ptr [RBP + -0x94],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001bba97 MOV EAX,dword ptr [RBP + -0x94] ADD RSP,0xa0 POP RBP RET LAB_001bba97: CALL 0x0012a270
int4 _mi_read_rnd_pack_record(long *param_1,int8 param_2,ulong param_3,char param_4) { int iVar1; int4 *puVar2; long lVar3; long in_FS_OFFSET; int local_90; int4 local_6c; int1 local_68 [24]; long local_50; long local_30; uint local_14; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if (param_3 < *(ulong *)(param_1[1] + 0x28)) { if ((*(uint *)(param_1 + 0x39) & 2) == 0) { local_90 = _mi_pack_get_block_info (param_1,param_1 + 10,local_68,param_1 + 0x24,(int)param_1[0x38],param_3) ; } else { iVar1 = _mi_read_cache(param_1 + 0x44,local_68,param_3,*(int4 *)(*param_1 + 0x240), param_4 != '\0'); if (iVar1 != 0) goto LAB_001bba61; local_90 = _mi_pack_get_block_info (param_1,param_1 + 10,local_68,param_1 + 0x24,0xffffffff,param_3); } if (local_90 == 0) { if ((*(uint *)(param_1 + 0x39) & 2) == 0) { lVar3 = inline_mysql_file_read ("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c", 0x545,(int)param_1[0x38],param_1[0x24] + (ulong)local_14, local_50 - (ulong)local_14,4); if (lVar3 == 0) goto LAB_001bb9de; } else { iVar1 = _mi_read_cache(param_1 + 0x44,param_1[0x24],local_30,local_50,param_4 != '\0'); if (iVar1 == 0) { LAB_001bb9de: param_1[0x36] = local_50; param_1[0x2e] = param_3; param_1[0x2f] = local_30 + local_50; *(uint *)(param_1 + 0x3a) = *(uint *)(param_1 + 0x3a) | 0x82; *(int1 *)(param_1[0x24] + local_50) = 0; local_6c = _mi_pack_rec_unpack(param_1,param_1 + 10,param_2,param_1[0x24],local_50); goto LAB_001bba6d; } } } } else { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x89; } LAB_001bba61: puVar2 = (int4 *)_my_thread_var(); local_6c = *puVar2; LAB_001bba6d: if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_6c; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
13,614
arena_alloc_from_block
tsotchke[P]eshkol/src/core/memory/arena.c
static void* arena_alloc_from_block(Arena* arena, Block* block, size_t size, size_t alignment) { assert(arena != NULL); assert(block != NULL); assert(size > 0); assert(alignment > 0 && (alignment & (alignment - 1)) == 0); // Power of 2 // Calculate aligned address uintptr_t address = (uintptr_t)block->data + block->used; uintptr_t aligned = (address + alignment - 1) & ~(alignment - 1); size_t padding = aligned - address; // Check if enough space in block if (block->used + padding + size > block->size) { return NULL; } // Update block usage block->used += padding + size; arena->total_used += padding + size; arena->allocation_count++; return (void*)aligned; }
O1
c
arena_alloc_from_block: pushq %rax testq %rsi, %rsi je 0x2a3c leaq -0x1(%rcx), %rax testq %rax, %rcx jne 0x2a5b movq 0x10(%rsi), %rax leaq (%rsi,%rax), %r8 leaq (%rsi,%rax), %r9 addq $0x18, %r9 addq %rcx, %r8 addq $0x17, %r8 negq %rcx andq %r8, %rcx movq %rcx, %r8 subq %r9, %r8 leaq (%rdx,%rax), %r9 addq %r8, %r9 cmpq 0x8(%rsi), %r9 jbe 0x2a25 xorl %ecx, %ecx jmp 0x2a37 addq %rdx, %r8 addq %r8, %rax movq %rax, 0x10(%rsi) addq %r8, 0x10(%rdi) incq 0x18(%rdi) movq %rcx, %rax popq %rcx retq leaq 0x35fe(%rip), %rdi # 0x6041 leaq 0x3420(%rip), %rsi # 0x5e6a leaq 0x35b1(%rip), %rcx # 0x6002 movl $0x50, %edx callq 0x10e0 leaq 0x34ca(%rip), %rdi # 0x5f2c leaq 0x3401(%rip), %rsi # 0x5e6a leaq 0x3592(%rip), %rcx # 0x6002 movl $0x52, %edx callq 0x10e0
arena_alloc_from_block: push rax test rsi, rsi jz short loc_2A3C lea rax, [rcx-1] test rcx, rax jnz short loc_2A5B mov rax, [rsi+10h] lea r8, [rsi+rax] lea r9, [rsi+rax] add r9, 18h add r8, rcx add r8, 17h neg rcx and rcx, r8 mov r8, rcx sub r8, r9 lea r9, [rdx+rax] add r9, r8 cmp r9, [rsi+8] jbe short loc_2A25 xor ecx, ecx jmp short loc_2A37 loc_2A25: add r8, rdx add rax, r8 mov [rsi+10h], rax add [rdi+10h], r8 inc qword ptr [rdi+18h] loc_2A37: mov rax, rcx pop rcx retn loc_2A3C: lea rdi, aBlockNull; "block != NULL" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidArenaAlloc_0; "void *arena_alloc_from_block(Arena *, B"... mov edx, 50h ; 'P' call ___assert_fail loc_2A5B: lea rdi, aAlignment0Alig; "alignment > 0 && (alignment & (alignmen"... lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidArenaAlloc_0; "void *arena_alloc_from_block(Arena *, B"... mov edx, 52h ; 'R' call ___assert_fail
long long arena_alloc_from_block(long long a1, long long a2, long long a3, long long a4) { long long v4; // rax long long v5; // rcx if ( !a2 ) __assert_fail( "block != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c", 80LL, "void *arena_alloc_from_block(Arena *, Block *, size_t, size_t)"); if ( ((a4 - 1) & a4) != 0 ) __assert_fail( "alignment > 0 && (alignment & (alignment - 1)) == 0", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c", 82LL, "void *arena_alloc_from_block(Arena *, Block *, size_t, size_t)"); v4 = *(_QWORD *)(a2 + 16); v5 = (a4 + a2 + v4 + 23) & -a4; if ( (unsigned long long)(v5 - (a2 + 24) + a3) > *(_QWORD *)(a2 + 8) ) return 0LL; *(_QWORD *)(a2 + 16) = a3 + v5 - (a2 + 24); *(_QWORD *)(a1 + 16) += a3 + v5 - (a2 + v4 + 24); ++*(_QWORD *)(a1 + 24); return v5; }
arena_alloc_from_block: PUSH RAX TEST RSI,RSI JZ 0x00102a3c LEA RAX,[RCX + -0x1] TEST RCX,RAX JNZ 0x00102a5b MOV RAX,qword ptr [RSI + 0x10] LEA R8,[RSI + RAX*0x1] LEA R9,[RSI + RAX*0x1] ADD R9,0x18 ADD R8,RCX ADD R8,0x17 NEG RCX AND RCX,R8 MOV R8,RCX SUB R8,R9 LEA R9,[RDX + RAX*0x1] ADD R9,R8 CMP R9,qword ptr [RSI + 0x8] JBE 0x00102a25 XOR ECX,ECX JMP 0x00102a37 LAB_00102a25: ADD R8,RDX ADD RAX,R8 MOV qword ptr [RSI + 0x10],RAX ADD qword ptr [RDI + 0x10],R8 INC qword ptr [RDI + 0x18] LAB_00102a37: MOV RAX,RCX POP RCX RET LAB_00102a3c: LEA RDI,[0x106041] LEA RSI,[0x105e6a] LEA RCX,[0x106002] MOV EDX,0x50 CALL 0x001010e0 LAB_00102a5b: LEA RDI,[0x105f2c] LEA RSI,[0x105e6a] LEA RCX,[0x106002] MOV EDX,0x52 CALL 0x001010e0
ulong arena_alloc_from_block(long param_1,long param_2,long param_3,ulong param_4) { long lVar1; ulong uVar2; long lVar3; if (param_2 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("block != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c" ,0x50,"void *arena_alloc_from_block(Arena *, Block *, size_t, size_t)"); } if ((param_4 & param_4 - 1) == 0) { lVar1 = *(long *)(param_2 + 0x10); uVar2 = -param_4 & param_2 + lVar1 + param_4 + 0x17; lVar3 = uVar2 - (param_2 + lVar1 + 0x18); if (*(ulong *)(param_2 + 8) < (ulong)(param_3 + lVar1 + lVar3)) { uVar2 = 0; } else { lVar3 = lVar3 + param_3; *(long *)(param_2 + 0x10) = lVar1 + lVar3; *(long *)(param_1 + 0x10) = *(long *)(param_1 + 0x10) + lVar3; *(long *)(param_1 + 0x18) = *(long *)(param_1 + 0x18) + 1; } return uVar2; } /* WARNING: Subroutine does not return */ __assert_fail("alignment > 0 && (alignment & (alignment - 1)) == 0", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c", 0x52,"void *arena_alloc_from_block(Arena *, Block *, size_t, size_t)"); }
13,615
testing::TestResult::GetTestProperty(int) const
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
const TestProperty& TestResult::GetTestProperty(int i) const { if (i < 0 || i >= test_property_count()) internal::posix::Abort(); return test_properties_.at(static_cast<size_t>(i)); }
O1
cpp
testing::TestResult::GetTestProperty(int) const: pushq %rax testl %esi, %esi js 0x1fc8f movq 0x50(%rdi), %rax movq 0x58(%rdi), %rcx subq %rax, %rcx shrq $0x6, %rcx cmpl %esi, %ecx jle 0x1fc8f movl %esi, %esi movq 0x58(%rdi), %rdx subq %rax, %rdx sarq $0x6, %rdx cmpq %rsi, %rdx jbe 0x1fc94 shlq $0x6, %rsi addq %rsi, %rax popq %rcx retq callq 0x326af leaq 0x24a60(%rip), %rdi # 0x446fb xorl %eax, %eax callq 0x8860
_ZNK7testing10TestResult15GetTestPropertyEi: push rax test esi, esi js short loc_1FC8F mov rax, [rdi+50h] mov rcx, [rdi+58h] sub rcx, rax shr rcx, 6 cmp ecx, esi jle short loc_1FC8F mov esi, esi mov rdx, [rdi+58h] sub rdx, rax sar rdx, 6 cmp rdx, rsi jbe short loc_1FC94 shl rsi, 6 add rax, rsi pop rcx retn loc_1FC8F: call _ZN7testing8internal5posix5AbortEv; testing::internal::posix::Abort(void) loc_1FC94: lea rdi, aVectorMRangeCh; "vector::_M_range_check: __n (which is %"... xor eax, eax call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...)
long long testing::TestResult::GetTestProperty(testing::TestResult *this, int a2) { long long v2; // rax unsigned long long v3; // rdx if ( a2 < 0 || (v2 = *((_QWORD *)this + 10), (int)((unsigned long long)(*((_QWORD *)this + 11) - v2) >> 6) <= a2) ) testing::internal::posix::Abort(this); v3 = (*((_QWORD *)this + 11) - v2) >> 6; if ( v3 <= (unsigned int)a2 ) std::__throw_out_of_range_fmt( "vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)", (unsigned int)a2, v3); return ((unsigned long long)(unsigned int)a2 << 6) + v2; }
GetTestProperty: PUSH RAX TEST ESI,ESI JS 0x0011fc8f MOV RAX,qword ptr [RDI + 0x50] MOV RCX,qword ptr [RDI + 0x58] SUB RCX,RAX SHR RCX,0x6 CMP ECX,ESI JLE 0x0011fc8f MOV ESI,ESI MOV RDX,qword ptr [RDI + 0x58] SUB RDX,RAX SAR RDX,0x6 CMP RDX,RSI JBE 0x0011fc94 SHL RSI,0x6 ADD RAX,RSI POP RCX RET LAB_0011fc8f: CALL 0x001326af LAB_0011fc94: LEA RDI,[0x1446fb] XOR EAX,EAX CALL 0x00108860
/* testing::TestResult::GetTestProperty(int) const */ ulong __thiscall testing::TestResult::GetTestProperty(TestResult *this,int param_1) { long lVar1; char *pcVar2; if ((param_1 < 0) || (lVar1 = *(long *)(this + 0x50), (int)((ulong)(*(long *)(this + 0x58) - lVar1) >> 6) <= param_1 )) { internal::posix::Abort(); } else if ((ulong)(uint)param_1 < (ulong)(*(long *)(this + 0x58) - lVar1 >> 6)) { return lVar1 + (ulong)(uint)param_1 * 0x40; } pcVar2 = "vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)"; std::__throw_out_of_range_fmt ("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)"); return (ulong)(*(long *)(pcVar2 + 0x58) - *(long *)(pcVar2 + 0x50)) >> 6; }
13,616
nglog::tools::ReadFromOffset(int, void*, unsigned long, unsigned long)
ng-log[P]ng-log/src/symbolize.cc
static ssize_t ReadFromOffset(const int fd, void* buf, const size_t count, const size_t offset) { NGLOG_SAFE_ASSERT(fd >= 0); NGLOG_SAFE_ASSERT(count <= static_cast<size_t>(std::numeric_limits<ssize_t>::max())); char* buf0 = reinterpret_cast<char*>(buf); size_t num_bytes = 0; while (num_bytes < count) { ssize_t len = FailureRetry([fd, p = buf0 + num_bytes, n = count - num_bytes, m = static_cast<off_t>(offset + num_bytes)] { return pread(fd, p, n, m); }); if (len < 0) { // There was an error other than EINTR. return -1; } if (len == 0) { // Reached EOF. break; } num_bytes += static_cast<size_t>(len); } NGLOG_SAFE_ASSERT(num_bytes <= count); return static_cast<ssize_t>(num_bytes); }
O0
cpp
nglog::tools::ReadFromOffset(int, void*, unsigned long, unsigned long): pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movl %edi, -0xc(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) cmpl $0x0, -0xc(%rbp) jl 0x49182 jmp 0x49187 callq 0x93b0 movq -0x20(%rbp), %rax movq %rax, -0x68(%rbp) callq 0x4aa90 movq %rax, %rcx movq -0x68(%rbp), %rax cmpq %rcx, %rax ja 0x491a2 jmp 0x491a7 callq 0x93b0 movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq $0x0, -0x38(%rbp) movq -0x38(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x4924e movl -0xc(%rbp), %eax movl %eax, -0x60(%rbp) movq -0x30(%rbp), %rax addq -0x38(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x20(%rbp), %rax subq -0x38(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax addq -0x38(%rbp), %rax movq %rax, -0x48(%rbp) leaq -0x60(%rbp), %rax movl $0x4, %edi movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rcx movq %rcx, 0x10(%rsp) movq 0x18(%rax), %rax movq %rax, 0x18(%rsp) callq 0x49610 movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) jge 0x49234 movq $-0x1, -0x8(%rbp) jmp 0x49267 cmpq $0x0, -0x40(%rbp) jne 0x4923d jmp 0x4924e movq -0x40(%rbp), %rax addq -0x38(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0x491b7 movq -0x38(%rbp), %rax cmpq -0x20(%rbp), %rax ja 0x4925a jmp 0x4925f callq 0x93b0 movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x90, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN5nglog5toolsL14ReadFromOffsetEiPvmm: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_C], edi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx cmp [rbp+var_C], 0 jl short loc_49182 jmp short loc_49187 loc_49182: call _abort loc_49187: mov rax, [rbp+var_20] mov [rbp+var_68], rax call _ZNSt14numeric_limitsIlE3maxEv; std::numeric_limits<long>::max(void) mov rcx, rax mov rax, [rbp+var_68] cmp rax, rcx ja short loc_491A2 jmp short loc_491A7 loc_491A2: call _abort loc_491A7: mov rax, [rbp+var_18] mov [rbp+var_30], rax mov [rbp+var_38], 0 loc_491B7: mov rax, [rbp+var_38] cmp rax, [rbp+var_20] jnb loc_4924E mov eax, [rbp+var_C] mov [rbp+var_60], eax mov rax, [rbp+var_30] add rax, [rbp+var_38] mov [rbp+var_58], rax mov rax, [rbp+var_20] sub rax, [rbp+var_38] mov [rbp+var_50], rax mov rax, [rbp+var_28] add rax, [rbp+var_38] mov [rbp+var_48], rax lea rax, [rbp+var_60] mov edi, 4 mov rcx, [rax] mov [rsp+90h+var_90], rcx mov rcx, [rax+8] mov [rsp+90h+var_88], rcx mov rcx, [rax+10h] mov [rsp+90h+var_80], rcx mov rax, [rax+18h] mov [rsp+90h+var_78], rax call _ZN5nglog5tools12_GLOBAL__N_112FailureRetryIZNS0_L14ReadFromOffsetEiPvmmE3$_0EEDaT_i mov [rbp+var_40], rax cmp [rbp+var_40], 0 jge short loc_49234 mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_49267 loc_49234: cmp [rbp+var_40], 0 jnz short loc_4923D jmp short loc_4924E loc_4923D: mov rax, [rbp+var_40] add rax, [rbp+var_38] mov [rbp+var_38], rax jmp loc_491B7 loc_4924E: mov rax, [rbp+var_38] cmp rax, [rbp+var_20] ja short loc_4925A jmp short loc_4925F loc_4925A: call _abort loc_4925F: mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_49267: mov rax, [rbp+var_8] add rsp, 90h pop rbp retn
unsigned long long nglog::tools::ReadFromOffset(nglog::tools *this, long long a2, char *a3, long long a4) { int v4; // edx int v5; // r8d int v6; // r9d int v8; // [rsp+30h] [rbp-60h] long long v9; // [rsp+50h] [rbp-40h] unsigned long long i; // [rsp+58h] [rbp-38h] int v13; // [rsp+84h] [rbp-Ch] v13 = (int)this; if ( (int)this < 0 ) abort(this, a2); if ( (unsigned long long)a3 > std::numeric_limits<long>::max() ) abort(this, a2); for ( i = 0LL; i < (unsigned long long)a3; i += v9 ) { v8 = v13; this = (nglog::tools *)&byte_4; v9 = nglog::tools::`anonymous namespace'::FailureRetry<nglog::tools::ReadFromOffset(int,void *,unsigned long,unsigned long)::$_0>( 4, a2, v4, (int)a3 - (int)i, v5, v6, v8, i + a2, &a3[-i], i + a4); if ( v9 < 0 ) return -1LL; if ( !v9 ) break; } if ( i > (unsigned long long)a3 ) abort(this, a2); return i; }
ReadFromOffset: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV dword ptr [RBP + -0xc],EDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX CMP dword ptr [RBP + -0xc],0x0 JL 0x00149182 JMP 0x00149187 LAB_00149182: CALL 0x001093b0 LAB_00149187: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x68],RAX CALL 0x0014aa90 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x68] CMP RAX,RCX JA 0x001491a2 JMP 0x001491a7 LAB_001491a2: CALL 0x001093b0 LAB_001491a7: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x38],0x0 LAB_001491b7: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x20] JNC 0x0014924e MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x60],EAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x20] SUB RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x48],RAX LEA RAX,[RBP + -0x60] MOV EDI,0x4 MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RCX MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x18],RAX CALL 0x00149610 MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 JGE 0x00149234 MOV qword ptr [RBP + -0x8],-0x1 JMP 0x00149267 LAB_00149234: CMP qword ptr [RBP + -0x40],0x0 JNZ 0x0014923d JMP 0x0014924e LAB_0014923d: MOV RAX,qword ptr [RBP + -0x40] ADD RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x38],RAX JMP 0x001491b7 LAB_0014924e: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x20] JA 0x0014925a JMP 0x0014925f LAB_0014925a: CALL 0x001093b0 LAB_0014925f: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_00149267: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x90 POP RBP RET
/* nglog::tools::ReadFromOffset(int, void*, unsigned long, unsigned long) */ ulong nglog::tools::ReadFromOffset(int param_1,void *param_2,ulong param_3,ulong param_4) { ulong uVar1; long lVar2; ulong local_40; if (param_1 < 0) { /* WARNING: Subroutine does not return */ abort(); } uVar1 = std::numeric_limits<long>::max(); if (uVar1 < param_3) { /* WARNING: Subroutine does not return */ abort(); } for (local_40 = 0; local_40 < param_3; local_40 = lVar2 + local_40) { lVar2 = (anonymous_namespace):: FailureRetry<nglog::tools::ReadFromOffset(int,void*,unsigned_long,unsigned_long)::__0> (4); if (lVar2 < 0) { return 0xffffffffffffffff; } if (lVar2 == 0) break; } if (local_40 <= param_3) { return local_40; } /* WARNING: Subroutine does not return */ abort(); }
13,617
nglog::tools::ReadFromOffset(int, void*, unsigned long, unsigned long)
ng-log[P]ng-log/src/symbolize.cc
static ssize_t ReadFromOffset(const int fd, void* buf, const size_t count, const size_t offset) { NGLOG_SAFE_ASSERT(fd >= 0); NGLOG_SAFE_ASSERT(count <= static_cast<size_t>(std::numeric_limits<ssize_t>::max())); char* buf0 = reinterpret_cast<char*>(buf); size_t num_bytes = 0; while (num_bytes < count) { ssize_t len = FailureRetry([fd, p = buf0 + num_bytes, n = count - num_bytes, m = static_cast<off_t>(offset + num_bytes)] { return pread(fd, p, n, m); }); if (len < 0) { // There was an error other than EINTR. return -1; } if (len == 0) { // Reached EOF. break; } num_bytes += static_cast<size_t>(len); } NGLOG_SAFE_ASSERT(num_bytes <= count); return static_cast<ssize_t>(num_bytes); }
O1
cpp
nglog::tools::ReadFromOffset(int, void*, unsigned long, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, 0x10(%rsp) movq %rsi, 0x8(%rsp) testl %edi, %edi js 0x204bc testq %rdx, %rdx js 0x204bc movl %edi, %ebp xorl %r14d, %r14d movq %rdx, (%rsp) movq %rdx, %rbx subq %r14, %rbx jbe 0x204b7 movq 0x8(%rsp), %rax leaq (%rax,%r14), %r12 movq 0x10(%rsp), %rax leaq (%r14,%rax), %r15 movl %ebp, %edi movq %r12, %rsi movq %rbx, %rdx movq %r15, %rcx callq 0x76c0 movq %rax, %r13 cmpq $-0x1, %rax jne 0x2048b callq 0x7050 cmpl $0x4, (%rax) je 0x20468 xorl %eax, %eax testq %r13, %r13 sete %al leal (%rax,%rax,2), %eax movl $0x0, %ecx cmovleq %rcx, %r13 movl $0x1, %ecx cmovsl %ecx, %eax addq %r13, %r14 testl %eax, %eax movq (%rsp), %rdx je 0x2044e cmpl $0x3, %eax jne 0x204c1 cmpq %rdx, %r14 jbe 0x204c8 callq 0x72c0 movq $-0x1, %r14 movq %r14, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN5nglog5toolsL14ReadFromOffsetEiPvmm: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rsp+48h+var_38], rcx mov [rsp+48h+var_40], rsi test edi, edi js short loc_204BC test rdx, rdx js short loc_204BC mov ebp, edi xor r14d, r14d mov [rsp+48h+var_48], rdx loc_2044E: mov rbx, rdx sub rbx, r14 jbe short loc_204B7 mov rax, [rsp+48h+var_40] lea r12, [rax+r14] mov rax, [rsp+48h+var_38] lea r15, [r14+rax] loc_20468: mov edi, ebp mov rsi, r12 mov rdx, rbx mov rcx, r15 call _pread mov r13, rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_2048B call ___errno_location cmp dword ptr [rax], 4 jz short loc_20468 loc_2048B: xor eax, eax test r13, r13 setz al lea eax, [rax+rax*2] mov ecx, 0 cmovle r13, rcx mov ecx, 1 cmovs eax, ecx add r14, r13 test eax, eax mov rdx, [rsp+48h+var_48] jz short loc_2044E cmp eax, 3 jnz short loc_204C1 loc_204B7: cmp r14, rdx jbe short loc_204C8 loc_204BC: call _abort loc_204C1: mov r14, 0FFFFFFFFFFFFFFFFh loc_204C8: mov rax, r14 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long nglog::tools::ReadFromOffset(unsigned long long this, long long a2, char *a3, long long a4) { unsigned int v4; // ebp unsigned long long v5; // r14 char *v6; // rbx long long v7; // r13 bool v8; // sf int v9; // eax char *v11; // [rsp+0h] [rbp-48h] if ( (this & 0x80000000) != 0LL || (long long)a3 < 0 ) LABEL_14: abort(this); v4 = this; v5 = 0LL; v11 = a3; do { v6 = &a3[-v5]; if ( (unsigned long long)a3 <= v5 ) goto LABEL_13; do { this = v4; v7 = pread(v4, a2 + v5, v6, v5 + a4); } while ( v7 == -1 && *(_DWORD *)__errno_location(v4) == 4 ); v8 = v7 < 0; v9 = 3 * (v7 == 0); if ( v7 <= 0 ) v7 = 0LL; if ( v8 ) v9 = 1; v5 += v7; a3 = v11; } while ( !v9 ); if ( v9 != 3 ) return -1LL; LABEL_13: if ( v5 > (unsigned long long)a3 ) goto LABEL_14; return v5; }
ReadFromOffset: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RCX MOV qword ptr [RSP + 0x8],RSI TEST EDI,EDI JS 0x001204bc TEST RDX,RDX JS 0x001204bc MOV EBP,EDI XOR R14D,R14D MOV qword ptr [RSP],RDX LAB_0012044e: MOV RBX,RDX SUB RBX,R14 JBE 0x001204b7 MOV RAX,qword ptr [RSP + 0x8] LEA R12,[RAX + R14*0x1] MOV RAX,qword ptr [RSP + 0x10] LEA R15,[R14 + RAX*0x1] LAB_00120468: MOV EDI,EBP MOV RSI,R12 MOV RDX,RBX MOV RCX,R15 CALL 0x001076c0 MOV R13,RAX CMP RAX,-0x1 JNZ 0x0012048b CALL 0x00107050 CMP dword ptr [RAX],0x4 JZ 0x00120468 LAB_0012048b: XOR EAX,EAX TEST R13,R13 SETZ AL LEA EAX,[RAX + RAX*0x2] MOV ECX,0x0 CMOVLE R13,RCX MOV ECX,0x1 CMOVS EAX,ECX ADD R14,R13 TEST EAX,EAX MOV RDX,qword ptr [RSP] JZ 0x0012044e CMP EAX,0x3 JNZ 0x001204c1 LAB_001204b7: CMP R14,RDX JBE 0x001204c8 LAB_001204bc: CALL 0x001072c0 LAB_001204c1: MOV R14,-0x1 LAB_001204c8: MOV RAX,R14 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nglog::tools::ReadFromOffset(int, void*, unsigned long, unsigned long) */ ulong nglog::tools::ReadFromOffset(int param_1,void *param_2,ulong param_3,ulong param_4) { char cVar1; ssize_t sVar2; int *piVar3; ulong uVar4; bool bVar5; if ((-1 < param_1) && (-1 < (long)param_3)) { uVar4 = 0; do { if (param_3 < uVar4 || param_3 - uVar4 == 0) goto LAB_001204b7; do { sVar2 = pread(param_1,(void *)((long)param_2 + uVar4),param_3 - uVar4,uVar4 + param_4); if (sVar2 != -1) break; piVar3 = __errno_location(); } while (*piVar3 == 4); bVar5 = sVar2 < 0; cVar1 = (sVar2 == 0) * '\x03'; if (sVar2 < 1) { sVar2 = 0; } if (bVar5) { cVar1 = '\x01'; } uVar4 = uVar4 + sVar2; } while (cVar1 == '\0'); if (cVar1 == '\x03') { LAB_001204b7: if (param_3 < uVar4) goto LAB_001204bc; } else { uVar4 = 0xffffffffffffffff; } return uVar4; } LAB_001204bc: /* WARNING: Subroutine does not return */ abort(); }
13,618
my_snprintf_mb2
eloqsql/strings/ctype-ucs2.c
static size_t my_snprintf_mb2(CHARSET_INFO *cs __attribute__((unused)), char* to, size_t n, const char* fmt, ...) { size_t ret; va_list args; va_start(args,fmt); ret= my_vsnprintf_mb2(to, n, fmt, args); va_end(args); return ret; }
O3
c
my_snprintf_mb2: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movq %rcx, %r15 movq %rsi, %r14 leaq -0x120(%rbp), %rcx movq %r8, 0x20(%rcx) movq %r9, 0x28(%rcx) testb %al, %al je 0xc9d48 movaps %xmm0, -0xf0(%rbp) movaps %xmm1, -0xe0(%rbp) movaps %xmm2, -0xd0(%rbp) movaps %xmm3, -0xc0(%rbp) movaps %xmm4, -0xb0(%rbp) movaps %xmm5, -0xa0(%rbp) movaps %xmm6, -0x90(%rbp) movaps %xmm7, -0x80(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq %rcx, -0x50(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x58(%rbp) movabsq $0x3000000020, %rax # imm = 0x3000000020 movq %rax, -0x60(%rbp) leaq (%rsi,%rdx), %rbx decq %rbx leaq -0x40(%rbp), %r12 movq %rsi, -0x68(%rbp) movzbl (%r15), %eax cmpl $0x25, %eax je 0xc9dac testl %eax, %eax je 0xc9f12 cmpq %rbx, %r14 je 0xc9f0f movb $0x0, (%r14) movb (%r15), %al movb %al, 0x1(%r14) addq $0x2, %r14 incq %r15 jmp 0xc9d7e addq $0x2, %r15 movb -0x1(%r15), %al leal -0x30(%rax), %ecx cmpb $0xa, %cl jb 0xc9dc7 movzbl %al, %ecx leal -0x2d(%rcx), %edx cmpl $0x2, %edx jae 0xc9dcc incq %r15 jmp 0xc9db0 cmpl $0x6c, %ecx jne 0xc9dd6 movb (%r15), %al jmp 0xc9dd9 decq %r15 cmpb $0x64, %al je 0xc9e09 movzbl %al, %eax cmpl $0x75, %eax je 0xc9e09 cmpl $0x73, %eax jne 0xc9e31 movl -0x60(%rbp), %ecx cmpq $0x28, %rcx ja 0xc9e9e movq %rcx, %rax addq -0x50(%rbp), %rax addl $0x8, %ecx movl %ecx, -0x60(%rbp) jmp 0xc9eaa movq %rbx, %rax subq %r14, %rax cmpq $0x1f, %rax jbe 0xc9f12 movl -0x60(%rbp), %ecx cmpq $0x28, %rcx ja 0xc9e45 movq %rcx, %rax addq -0x50(%rbp), %rax addl $0x8, %ecx movl %ecx, -0x60(%rbp) jmp 0xc9e51 cmpq %rbx, %r14 je 0xc9f0f movw $0x2500, (%r14) # imm = 0x2500 jmp 0xc9da3 movq -0x58(%rbp), %rax leaq 0x8(%rax), %rcx movq %rcx, -0x58(%rbp) movslq (%rax), %rdi cmpb $0x64, (%r15) jne 0xc9e64 movq %r12, %rsi movl $0xfffffff6, %edx # imm = 0xFFFFFFF6 jmp 0xc9e6e movl %edi, %edi movq %r12, %rsi movl $0xa, %edx callq 0xdc40a cmpb $0x0, -0x40(%rbp) je 0xc9da7 leaq -0x3f(%rbp), %rax movb $0x0, (%r14) movb -0x1(%rax), %cl movb %cl, 0x1(%r14) addq $0x2, %r14 cmpb $0x0, (%rax) leaq 0x1(%rax), %rax jne 0xc9e81 jmp 0xc9da7 movq -0x58(%rbp), %rax leaq 0x8(%rax), %rcx movq %rcx, -0x58(%rbp) movq (%rax), %r13 movq %rbx, %r12 subq %r14, %r12 testq %r13, %r13 leaq 0x1d3fb(%rip), %rax # 0xe72b8 cmoveq %rax, %r13 movq %r13, %rdi callq 0x2a360 leaq (%rax,%rax), %rdx movq %r12, %rcx shrq %rcx decq %rcx cmpq %rdx, %r12 cmovaq %rax, %rcx testq %rcx, %rcx je 0xc9f06 xorl %eax, %eax leaq -0x40(%rbp), %r12 movb $0x0, (%r14) movb (%r13,%rax), %dl movb %dl, 0x1(%r14) addq $0x2, %r14 incq %rax cmpq %rax, %rcx jne 0xc9ee8 jmp 0xc9da7 leaq -0x40(%rbp), %r12 jmp 0xc9da7 movq %rbx, %r14 movb $0x0, (%r14) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0xc9f3e subq -0x68(%rbp), %r14 movq %r14, %rax addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x2a270
my_snprintf_mb2: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0F8h mov r15, rcx mov r14, rsi lea rcx, [rbp+var_120] mov [rcx+20h], r8 mov [rcx+28h], r9 test al, al jz short loc_C9D48 movaps [rbp+var_F0], xmm0 movaps [rbp+var_E0], xmm1 movaps [rbp+var_D0], xmm2 movaps [rbp+var_C0], xmm3 movaps [rbp+var_B0], xmm4 movaps [rbp+var_A0], xmm5 movaps [rbp+var_90], xmm6 movaps [rbp+var_80], xmm7 loc_C9D48: mov rax, fs:28h mov [rbp+var_30], rax mov [rbp+var_50], rcx lea rax, [rbp+arg_0] mov [rbp+var_58], rax mov rax, 3000000020h mov [rbp+var_60], rax lea rbx, [rsi+rdx] dec rbx lea r12, [rbp+var_40] mov [rbp+var_68], rsi loc_C9D7E: movzx eax, byte ptr [r15] cmp eax, 25h ; '%' jz short loc_C9DAC test eax, eax jz loc_C9F12 cmp r14, rbx jz loc_C9F0F mov byte ptr [r14], 0 mov al, [r15] mov [r14+1], al loc_C9DA3: add r14, 2 loc_C9DA7: inc r15 jmp short loc_C9D7E loc_C9DAC: add r15, 2 loc_C9DB0: mov al, [r15-1] lea ecx, [rax-30h] cmp cl, 0Ah jb short loc_C9DC7 movzx ecx, al lea edx, [rcx-2Dh] cmp edx, 2 jnb short loc_C9DCC loc_C9DC7: inc r15 jmp short loc_C9DB0 loc_C9DCC: cmp ecx, 6Ch ; 'l' jnz short loc_C9DD6 mov al, [r15] jmp short loc_C9DD9 loc_C9DD6: dec r15 loc_C9DD9: cmp al, 64h ; 'd' jz short loc_C9E09 movzx eax, al cmp eax, 75h ; 'u' jz short loc_C9E09 cmp eax, 73h ; 's' jnz short loc_C9E31 mov ecx, dword ptr [rbp+var_60] cmp rcx, 28h ; '(' ja loc_C9E9E mov rax, rcx add rax, [rbp+var_50] add ecx, 8 mov dword ptr [rbp+var_60], ecx jmp loc_C9EAA loc_C9E09: mov rax, rbx sub rax, r14 cmp rax, 1Fh jbe loc_C9F12 mov ecx, dword ptr [rbp+var_60] cmp rcx, 28h ; '(' ja short loc_C9E45 mov rax, rcx add rax, [rbp+var_50] add ecx, 8 mov dword ptr [rbp+var_60], ecx jmp short loc_C9E51 loc_C9E31: cmp r14, rbx jz loc_C9F0F mov word ptr [r14], 2500h jmp loc_C9DA3 loc_C9E45: mov rax, [rbp+var_58] lea rcx, [rax+8] mov [rbp+var_58], rcx loc_C9E51: movsxd rdi, dword ptr [rax] cmp byte ptr [r15], 64h ; 'd' jnz short loc_C9E64 mov rsi, r12 mov edx, 0FFFFFFF6h jmp short loc_C9E6E loc_C9E64: mov edi, edi mov rsi, r12 mov edx, 0Ah loc_C9E6E: call int10_to_str cmp [rbp+var_40], 0 jz loc_C9DA7 lea rax, [rbp+var_3F] loc_C9E81: mov byte ptr [r14], 0 mov cl, [rax-1] mov [r14+1], cl add r14, 2 cmp byte ptr [rax], 0 lea rax, [rax+1] jnz short loc_C9E81 jmp loc_C9DA7 loc_C9E9E: mov rax, [rbp+var_58] lea rcx, [rax+8] mov [rbp+var_58], rcx loc_C9EAA: mov r13, [rax] mov r12, rbx sub r12, r14 test r13, r13 lea rax, aNull; "(null)" cmovz r13, rax mov rdi, r13 call _strlen lea rdx, [rax+rax] mov rcx, r12 shr rcx, 1 dec rcx cmp r12, rdx cmova rcx, rax test rcx, rcx jz short loc_C9F06 xor eax, eax lea r12, [rbp+var_40] loc_C9EE8: mov byte ptr [r14], 0 mov dl, [r13+rax+0] mov [r14+1], dl add r14, 2 inc rax cmp rcx, rax jnz short loc_C9EE8 jmp loc_C9DA7 loc_C9F06: lea r12, [rbp+var_40] jmp loc_C9DA7 loc_C9F0F: mov r14, rbx loc_C9F12: mov byte ptr [r14], 0 mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_C9F3E sub r14, [rbp+var_68] mov rax, r14 add rsp, 0F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_C9F3E: call ___stack_chk_fail
_BYTE * my_snprintf_mb2( __m128 a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, long long a9, _BYTE *a10, long long a11, unsigned __int8 *a12, long long a13, long long a14, char a15) { _BYTE *v16; // r14 long long v17; // rbx unsigned __int8 v18; // al const char **v19; // rax char *v20; // rax long long v21; // rdi long long v22; // rdx char *v23; // rax const char *v25; // r13 unsigned long long v26; // r12 long long v27; // rax long long v28; // rcx long long i; // rax char v31; // [rsp+0h] [rbp-120h] BYREF long long v32; // [rsp+20h] [rbp-100h] long long v33; // [rsp+28h] [rbp-F8h] __m128 v34; // [rsp+30h] [rbp-F0h] __m128 v35; // [rsp+40h] [rbp-E0h] __m128 v36; // [rsp+50h] [rbp-D0h] __m128 v37; // [rsp+60h] [rbp-C0h] __m128 v38; // [rsp+70h] [rbp-B0h] __m128 v39; // [rsp+80h] [rbp-A0h] __m128 v40; // [rsp+90h] [rbp-90h] __m128 v41; // [rsp+A0h] [rbp-80h] _BYTE *v42; // [rsp+B8h] [rbp-68h] long long v43; // [rsp+C0h] [rbp-60h] char *v44; // [rsp+C8h] [rbp-58h] char *v45; // [rsp+D0h] [rbp-50h] char v46; // [rsp+E0h] [rbp-40h] BYREF char v47; // [rsp+E1h] [rbp-3Fh] BYREF unsigned long long v48; // [rsp+F0h] [rbp-30h] v34 = a1; v35 = a2; v36 = a3; v37 = a4; v38 = a5; v39 = a6; v40 = a7; v41 = a8; v16 = a10; v32 = a13; v33 = a14; v48 = __readfsqword(0x28u); v45 = &v31; v44 = &a15; v43 = 0x3000000020LL; v17 = (long long)&a10[a11 - 1]; v42 = a10; while ( *a12 == 37 ) { for ( a12 += 2; ; ++a12 ) { v18 = *(a12 - 1); if ( (unsigned __int8)(v18 - 48) >= 0xAu && (unsigned int)v18 - 45 >= 2 ) break; } if ( v18 == 108 ) v18 = *a12; else --a12; if ( v18 == 100 || v18 == 117 ) { if ( (unsigned long long)(v17 - (_QWORD)v16) <= 0x1F ) goto LABEL_44; if ( (unsigned int)v43 > 0x28uLL ) { v20 = v44; v44 += 8; } else { v20 = &v45[(unsigned int)v43]; LODWORD(v43) = v43 + 8; } v21 = *(int *)v20; if ( *a12 == 100 ) { v22 = 4294967286LL; } else { v21 = (unsigned int)v21; v22 = 10LL; } int10_to_str(v21, &v46, v22); if ( v46 ) { v23 = &v47; do { *v16 = 0; v16[1] = *(v23 - 1); v16 += 2; } while ( *v23++ != 0 ); } } else { if ( v18 != 115 ) { if ( v16 == (_BYTE *)v17 ) goto LABEL_43; *(_WORD *)v16 = 9472; goto LABEL_6; } if ( (unsigned int)v43 > 0x28uLL ) { v19 = (const char **)v44; v44 += 8; } else { v19 = (const char **)&v45[(unsigned int)v43]; LODWORD(v43) = v43 + 8; } v25 = *v19; v26 = v17 - (_QWORD)v16; if ( !*v19 ) v25 = "(null)"; v27 = strlen(v25); v28 = (v26 >> 1) - 1; if ( v26 > 2 * v27 ) v28 = v27; if ( v28 ) { for ( i = 0LL; i != v28; ++i ) { *v16 = 0; v16[1] = v25[i]; v16 += 2; } } } LABEL_7: ++a12; } if ( !*a12 ) goto LABEL_44; if ( v16 != (_BYTE *)v17 ) { *v16 = 0; v16[1] = *a12; LABEL_6: v16 += 2; goto LABEL_7; } LABEL_43: v16 = (_BYTE *)v17; LABEL_44: *v16 = 0; return (_BYTE *)(v16 - v42); }
my_snprintf_mb2: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xf8 MOV R15,RCX MOV R14,RSI LEA RCX,[RBP + -0x120] MOV qword ptr [RCX + 0x20],R8 MOV qword ptr [RCX + 0x28],R9 TEST AL,AL JZ 0x001c9d48 MOVAPS xmmword ptr [RBP + -0xf0],XMM0 MOVAPS xmmword ptr [RBP + -0xe0],XMM1 MOVAPS xmmword ptr [RBP + -0xd0],XMM2 MOVAPS xmmword ptr [RBP + -0xc0],XMM3 MOVAPS xmmword ptr [RBP + -0xb0],XMM4 MOVAPS xmmword ptr [RBP + -0xa0],XMM5 MOVAPS xmmword ptr [RBP + -0x90],XMM6 MOVAPS xmmword ptr [RBP + -0x80],XMM7 LAB_001c9d48: MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x50],RCX LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x58],RAX MOV RAX,0x3000000020 MOV qword ptr [RBP + -0x60],RAX LEA RBX,[RSI + RDX*0x1] DEC RBX LEA R12,[RBP + -0x40] MOV qword ptr [RBP + -0x68],RSI LAB_001c9d7e: MOVZX EAX,byte ptr [R15] CMP EAX,0x25 JZ 0x001c9dac TEST EAX,EAX JZ 0x001c9f12 CMP R14,RBX JZ 0x001c9f0f MOV byte ptr [R14],0x0 MOV AL,byte ptr [R15] MOV byte ptr [R14 + 0x1],AL LAB_001c9da3: ADD R14,0x2 LAB_001c9da7: INC R15 JMP 0x001c9d7e LAB_001c9dac: ADD R15,0x2 LAB_001c9db0: MOV AL,byte ptr [R15 + -0x1] LEA ECX,[RAX + -0x30] CMP CL,0xa JC 0x001c9dc7 MOVZX ECX,AL LEA EDX,[RCX + -0x2d] CMP EDX,0x2 JNC 0x001c9dcc LAB_001c9dc7: INC R15 JMP 0x001c9db0 LAB_001c9dcc: CMP ECX,0x6c JNZ 0x001c9dd6 MOV AL,byte ptr [R15] JMP 0x001c9dd9 LAB_001c9dd6: DEC R15 LAB_001c9dd9: CMP AL,0x64 JZ 0x001c9e09 MOVZX EAX,AL CMP EAX,0x75 JZ 0x001c9e09 CMP EAX,0x73 JNZ 0x001c9e31 MOV ECX,dword ptr [RBP + -0x60] CMP RCX,0x28 JA 0x001c9e9e MOV RAX,RCX ADD RAX,qword ptr [RBP + -0x50] ADD ECX,0x8 MOV dword ptr [RBP + -0x60],ECX JMP 0x001c9eaa LAB_001c9e09: MOV RAX,RBX SUB RAX,R14 CMP RAX,0x1f JBE 0x001c9f12 MOV ECX,dword ptr [RBP + -0x60] CMP RCX,0x28 JA 0x001c9e45 MOV RAX,RCX ADD RAX,qword ptr [RBP + -0x50] ADD ECX,0x8 MOV dword ptr [RBP + -0x60],ECX JMP 0x001c9e51 LAB_001c9e31: CMP R14,RBX JZ 0x001c9f0f MOV word ptr [R14],0x2500 JMP 0x001c9da3 LAB_001c9e45: MOV RAX,qword ptr [RBP + -0x58] LEA RCX,[RAX + 0x8] MOV qword ptr [RBP + -0x58],RCX LAB_001c9e51: MOVSXD RDI,dword ptr [RAX] CMP byte ptr [R15],0x64 JNZ 0x001c9e64 MOV RSI,R12 MOV EDX,0xfffffff6 JMP 0x001c9e6e LAB_001c9e64: MOV EDI,EDI MOV RSI,R12 MOV EDX,0xa LAB_001c9e6e: CALL 0x001dc40a CMP byte ptr [RBP + -0x40],0x0 JZ 0x001c9da7 LEA RAX,[RBP + -0x3f] LAB_001c9e81: MOV byte ptr [R14],0x0 MOV CL,byte ptr [RAX + -0x1] MOV byte ptr [R14 + 0x1],CL ADD R14,0x2 CMP byte ptr [RAX],0x0 LEA RAX,[RAX + 0x1] JNZ 0x001c9e81 JMP 0x001c9da7 LAB_001c9e9e: MOV RAX,qword ptr [RBP + -0x58] LEA RCX,[RAX + 0x8] MOV qword ptr [RBP + -0x58],RCX LAB_001c9eaa: MOV R13,qword ptr [RAX] MOV R12,RBX SUB R12,R14 TEST R13,R13 LEA RAX,[0x1e72b8] CMOVZ R13,RAX MOV RDI,R13 CALL 0x0012a360 LEA RDX,[RAX + RAX*0x1] MOV RCX,R12 SHR RCX,0x1 DEC RCX CMP R12,RDX CMOVA RCX,RAX TEST RCX,RCX JZ 0x001c9f06 XOR EAX,EAX LEA R12,[RBP + -0x40] LAB_001c9ee8: MOV byte ptr [R14],0x0 MOV DL,byte ptr [R13 + RAX*0x1] MOV byte ptr [R14 + 0x1],DL ADD R14,0x2 INC RAX CMP RCX,RAX JNZ 0x001c9ee8 JMP 0x001c9da7 LAB_001c9f06: LEA R12,[RBP + -0x40] JMP 0x001c9da7 LAB_001c9f0f: MOV R14,RBX LAB_001c9f12: MOV byte ptr [R14],0x0 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001c9f3e SUB R14,qword ptr [RBP + -0x68] MOV RAX,R14 ADD RSP,0xf8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001c9f3e: CALL 0x0012a270
long my_snprintf_mb2(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,int2 *param_10,long param_11,byte *param_12, int8 param_13,int8 param_14) { char in_AL; byte bVar1; uint *puVar2; size_t sVar3; size_t sVar4; int8 uVar5; int2 *puVar6; ulong uVar7; char *pcVar8; int2 *puVar9; long in_FS_OFFSET; int1 local_128 [32]; int8 local_108; int8 local_100; int8 local_f8; int8 local_e8; int8 local_d8; int8 local_c8; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int2 *local_70; ulong local_68; uint *local_60; int1 *local_58; char local_48 [16]; long local_38; local_58 = local_128; if (in_AL != '\0') { local_f8 = param_1; local_e8 = param_2; local_d8 = param_3; local_c8 = param_4; local_b8 = param_5; local_a8 = param_6; local_98 = param_7; local_88 = param_8; } local_38 = *(long *)(in_FS_OFFSET + 0x28); local_60 = (uint *)&stack0x00000008; local_68 = 0x3000000020; puVar6 = (int2 *)((long)param_10 + param_11 + -1); local_108 = param_13; local_100 = param_14; local_70 = param_10; do { puVar9 = param_10; if (*param_12 == 0x25) { param_12 = param_12 + 2; while ((bVar1 = param_12[-1], (byte)(bVar1 - 0x30) < 10 || (bVar1 - 0x2d < 2))) { param_12 = param_12 + 1; } if (bVar1 == 0x6c) { bVar1 = *param_12; } else { param_12 = param_12 + -1; } if ((bVar1 == 100) || (bVar1 == 0x75)) { if ((ulong)((long)puVar6 - (long)param_10) < 0x20) { LAB_001c9f12: *(int1 *)puVar9 = 0; if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return (long)puVar9 - (long)local_70; } uVar7 = local_68 & 0xffffffff; if (uVar7 < 0x29) { local_68 = CONCAT44(local_68._4_4_,(int)local_68 + 8); puVar2 = (uint *)(local_58 + uVar7); } else { puVar2 = local_60; local_60 = local_60 + 2; } uVar7 = (ulong)(int)*puVar2; if (*param_12 == 100) { uVar5 = 0xfffffff6; } else { uVar7 = (ulong)*puVar2; uVar5 = 10; } int10_to_str(uVar7,local_48,uVar5); if (local_48[0] != '\0') { pcVar8 = local_48; do { pcVar8 = pcVar8 + 1; *(int1 *)param_10 = 0; *(char *)((long)param_10 + 1) = pcVar8[-1]; param_10 = param_10 + 1; } while (*pcVar8 != '\0'); } } else { if (bVar1 != 0x73) { puVar9 = puVar6; if (param_10 != puVar6) { *param_10 = 0x2500; goto LAB_001c9da3; } goto LAB_001c9f12; } uVar7 = local_68 & 0xffffffff; if (uVar7 < 0x29) { local_68 = CONCAT44(local_68._4_4_,(int)local_68 + 8); puVar2 = (uint *)(local_58 + uVar7); } else { puVar2 = local_60; local_60 = local_60 + 2; } pcVar8 = *(char **)puVar2; if (pcVar8 == (char *)0x0) { pcVar8 = "(null)"; } sVar3 = strlen(pcVar8); sVar4 = ((ulong)((long)puVar6 - (long)param_10) >> 1) - 1; if (sVar3 * 2 < (ulong)((long)puVar6 - (long)param_10)) { sVar4 = sVar3; } if (sVar4 != 0) { sVar3 = 0; do { *(int1 *)param_10 = 0; *(char *)((long)param_10 + 1) = pcVar8[sVar3]; param_10 = param_10 + 1; sVar3 = sVar3 + 1; } while (sVar4 != sVar3); } } } else { if ((*param_12 == 0) || (puVar9 = puVar6, param_10 == puVar6)) goto LAB_001c9f12; *(int1 *)param_10 = 0; *(byte *)((long)param_10 + 1) = *param_12; LAB_001c9da3: param_10 = param_10 + 1; } param_12 = param_12 + 1; } while( true ); }
13,619
find_atom
bluesky950520[P]quickjs/quickjs.c
static JSAtom find_atom(JSContext *ctx, const char *name) { JSAtom atom; int len; if (*name == '[') { name++; len = strlen(name) - 1; /* We assume 8 bit non null strings, which is the case for these symbols */ for(atom = JS_ATOM_Symbol_toPrimitive; atom < JS_ATOM_END; atom++) { JSAtomStruct *p = ctx->rt->atom_array[atom]; JSString *str = p; if (str->len == len && !memcmp(str->u.str8, name, len)) return JS_DupAtom(ctx, atom); } abort(); } else { atom = JS_NewAtom(ctx, name); } return atom; }
O0
c
find_atom: subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq 0x20(%rsp), %rax movzbl (%rax), %eax cmpl $0x5b, %eax jne 0x52f62 movq 0x20(%rsp), %rax addq $0x1, %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rdi callq 0xe260 subq $0x1, %rax movl %eax, 0x18(%rsp) movl $0xd3, 0x1c(%rsp) cmpl $0xe0, 0x1c(%rsp) jae 0x52f5d movq 0x28(%rsp), %rax movq 0x18(%rax), %rax movq 0x68(%rax), %rax movl 0x1c(%rsp), %ecx movq (%rax,%rcx,8), %rax movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax movq 0x4(%rax), %rax andq $0x7fffffff, %rax # imm = 0x7FFFFFFF cmpl 0x18(%rsp), %eax jne 0x52f4b movq 0x8(%rsp), %rdi addq $0x18, %rdi movq 0x20(%rsp), %rsi movslq 0x18(%rsp), %rdx callq 0xe4c0 cmpl $0x0, %eax jne 0x52f4b movq 0x28(%rsp), %rdi movl 0x1c(%rsp), %esi callq 0x2e290 movl %eax, 0x34(%rsp) jmp 0x52f7d jmp 0x52f4d movl 0x1c(%rsp), %eax addl $0x1, %eax movl %eax, 0x1c(%rsp) jmp 0x52ed7 callq 0xe090 movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rsi callq 0x2e7b0 movl %eax, 0x1c(%rsp) movl 0x1c(%rsp), %eax movl %eax, 0x34(%rsp) movl 0x34(%rsp), %eax addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
find_atom: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov rax, [rsp+38h+var_18] movzx eax, byte ptr [rax] cmp eax, 5Bh ; '[' jnz loc_52F62 mov rax, [rsp+38h+var_18] add rax, 1 mov [rsp+38h+var_18], rax mov rdi, [rsp+38h+var_18] call _strlen sub rax, 1 mov [rsp+38h+var_20], eax mov [rsp+38h+var_1C], 0D3h loc_52ED7: cmp [rsp+38h+var_1C], 0E0h jnb short loc_52F5D mov rax, [rsp+38h+var_10] mov rax, [rax+18h] mov rax, [rax+68h] mov ecx, [rsp+38h+var_1C] mov rax, [rax+rcx*8] mov [rsp+38h+var_28], rax mov rax, [rsp+38h+var_28] mov [rsp+38h+var_30], rax mov rax, [rsp+38h+var_30] mov rax, [rax+4] and rax, 7FFFFFFFh cmp eax, [rsp+38h+var_20] jnz short loc_52F4B mov rdi, [rsp+38h+var_30] add rdi, 18h mov rsi, [rsp+38h+var_18] movsxd rdx, [rsp+38h+var_20] call _memcmp cmp eax, 0 jnz short loc_52F4B mov rdi, [rsp+38h+var_10] mov esi, [rsp+38h+var_1C] call JS_DupAtom mov [rsp+38h+var_4], eax jmp short loc_52F7D loc_52F4B: jmp short $+2 loc_52F4D: mov eax, [rsp+38h+var_1C] add eax, 1 mov [rsp+38h+var_1C], eax jmp loc_52ED7 loc_52F5D: call _abort loc_52F62: mov rdi, [rsp+38h+var_10] mov rsi, [rsp+38h+var_18] call JS_NewAtom mov [rsp+38h+var_1C], eax mov eax, [rsp+38h+var_1C] mov [rsp+38h+var_4], eax loc_52F7D: mov eax, [rsp+38h+var_4] add rsp, 38h retn
long long find_atom(long long a1, unsigned __int8 *a2) { const char *v2; // rdi long long v4; // [rsp+8h] [rbp-30h] int v5; // [rsp+18h] [rbp-20h] unsigned int i; // [rsp+1Ch] [rbp-1Ch] if ( *a2 == 91 ) { v2 = (const char *)(a2 + 1); v5 = strlen(a2 + 1) - 1; for ( i = 211; ; ++i ) { if ( i >= 0xE0 ) abort(v2); v4 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 8LL * i); if ( (*(_DWORD *)(v4 + 4) & 0x7FFFFFFF) == v5 ) { v2 = (const char *)(v4 + 24); if ( !(unsigned int)memcmp(v4 + 24, a2 + 1, v5) ) break; } } return (unsigned int)JS_DupAtom(a1, i); } else { return (unsigned int)JS_NewAtom(a1, a2); } }
find_atom: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV RAX,qword ptr [RSP + 0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0x5b JNZ 0x00152f62 MOV RAX,qword ptr [RSP + 0x20] ADD RAX,0x1 MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0x20] CALL 0x0010e260 SUB RAX,0x1 MOV dword ptr [RSP + 0x18],EAX MOV dword ptr [RSP + 0x1c],0xd3 LAB_00152ed7: CMP dword ptr [RSP + 0x1c],0xe0 JNC 0x00152f5d MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RAX + 0x68] MOV ECX,dword ptr [RSP + 0x1c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x4] AND RAX,0x7fffffff CMP EAX,dword ptr [RSP + 0x18] JNZ 0x00152f4b MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x18 MOV RSI,qword ptr [RSP + 0x20] MOVSXD RDX,dword ptr [RSP + 0x18] CALL 0x0010e4c0 CMP EAX,0x0 JNZ 0x00152f4b MOV RDI,qword ptr [RSP + 0x28] MOV ESI,dword ptr [RSP + 0x1c] CALL 0x0012e290 MOV dword ptr [RSP + 0x34],EAX JMP 0x00152f7d LAB_00152f4b: JMP 0x00152f4d LAB_00152f4d: MOV EAX,dword ptr [RSP + 0x1c] ADD EAX,0x1 MOV dword ptr [RSP + 0x1c],EAX JMP 0x00152ed7 LAB_00152f5d: CALL 0x0010e090 LAB_00152f62: MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x20] CALL 0x0012e7b0 MOV dword ptr [RSP + 0x1c],EAX MOV EAX,dword ptr [RSP + 0x1c] MOV dword ptr [RSP + 0x34],EAX LAB_00152f7d: MOV EAX,dword ptr [RSP + 0x34] ADD RSP,0x38 RET
int4 find_atom(long param_1,char *param_2) { long lVar1; uint uVar2; int iVar3; int4 uVar4; size_t sVar5; uint local_1c; if (*param_2 != '[') { uVar4 = JS_NewAtom(param_1,param_2); return uVar4; } sVar5 = strlen(param_2 + 1); uVar2 = (int)sVar5 - 1; local_1c = 0xd3; while( true ) { if (0xdf < local_1c) { /* WARNING: Subroutine does not return */ abort(); } lVar1 = *(long *)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + (ulong)local_1c * 8); if ((((uint)*(int8 *)(lVar1 + 4) & 0x7fffffff) == uVar2) && (iVar3 = memcmp((void *)(lVar1 + 0x18),param_2 + 1,(long)(int)uVar2), iVar3 == 0)) break; local_1c = local_1c + 1; } uVar4 = JS_DupAtom(param_1,local_1c); return uVar4; }
13,620
find_atom
bluesky950520[P]quickjs/quickjs.c
static JSAtom find_atom(JSContext *ctx, const char *name) { JSAtom atom; int len; if (*name == '[') { name++; len = strlen(name) - 1; /* We assume 8 bit non null strings, which is the case for these symbols */ for(atom = JS_ATOM_Symbol_toPrimitive; atom < JS_ATOM_END; atom++) { JSAtomStruct *p = ctx->rt->atom_array[atom]; JSString *str = p; if (str->len == len && !memcmp(str->u.str8, name, len)) return JS_DupAtom(ctx, atom); } abort(); } else { atom = JS_NewAtom(ctx, name); } return atom; }
O1
c
find_atom: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r15 cmpb $0x5b, (%rsi) jne 0x37077 incq %rbx movq %rbx, %rdi callq 0xe270 movq %rax, %r14 decl %r14d movq 0x18(%r15), %rax movq 0x68(%rax), %r15 movl $0xd3, %r12d movl $0x7fffffff, %r13d # imm = 0x7FFFFFFF movq (%r15,%r12,8), %rdi movl 0x4(%rdi), %ecx andl %r13d, %ecx movb $0x1, %al cmpl %r14d, %ecx jne 0x37062 addq $0x18, %rdi movq %rbx, %rsi movq %r14, %rdx callq 0xe710 testl %eax, %eax setne %al cmovel %r12d, %ebp testb %al, %al je 0x3709b incq %r12 cmpq $0xe0, %r12 jne 0x37039 callq 0xe090 movq %rbx, %rdi callq 0xe270 movq %r15, %rdi movq %rbx, %rsi movq %rax, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x23e1c movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
find_atom: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi mov r15, rdi cmp byte ptr [rsi], 5Bh ; '[' jnz short loc_37077 inc rbx mov rdi, rbx call _strlen mov r14, rax dec r14d mov rax, [r15+18h] mov r15, [rax+68h] mov r12d, 0D3h mov r13d, 7FFFFFFFh loc_37039: mov rdi, [r15+r12*8] mov ecx, [rdi+4] and ecx, r13d mov al, 1 cmp ecx, r14d jnz short loc_37062 add rdi, 18h mov rsi, rbx mov rdx, r14 call _bcmp test eax, eax setnz al cmovz ebp, r12d loc_37062: test al, al jz short loc_3709B inc r12 cmp r12, 0E0h jnz short loc_37039 call _abort loc_37077: mov rdi, rbx call _strlen mov rdi, r15 mov rsi, rbx mov rdx, rax add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp JS_NewAtomLen loc_3709B: mov eax, ebp add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long find_atom(long long a1, unsigned __int8 *a2) { unsigned int v2; // ebp long long v3; // r14 long long v4; // r15 long long v5; // r12 long long v6; // rdi long long v7; // rcx bool v8; // al long long v9; // rax if ( *a2 == 91 ) { v3 = (unsigned int)strlen(a2 + 1) - 1; v4 = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL); v5 = 211LL; while ( 1 ) { v6 = *(_QWORD *)(v4 + 8 * v5); v7 = *(_DWORD *)(v6 + 4) & 0x7FFFFFFF; v8 = 1; if ( (_DWORD)v7 == (_DWORD)v3 ) { v6 += 24LL; v8 = (unsigned int)bcmp(v6, a2 + 1, v3, v7) != 0; if ( !v8 ) v2 = v5; } if ( !v8 ) break; if ( ++v5 == 224 ) abort((const char *)v6); } return v2; } else { v9 = strlen(a2); return JS_NewAtomLen(a1, a2, v9); } }
find_atom: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R15,RDI CMP byte ptr [RSI],0x5b JNZ 0x00137077 INC RBX MOV RDI,RBX CALL 0x0010e270 MOV R14,RAX DEC R14D MOV RAX,qword ptr [R15 + 0x18] MOV R15,qword ptr [RAX + 0x68] MOV R12D,0xd3 MOV R13D,0x7fffffff LAB_00137039: MOV RDI,qword ptr [R15 + R12*0x8] MOV ECX,dword ptr [RDI + 0x4] AND ECX,R13D MOV AL,0x1 CMP ECX,R14D JNZ 0x00137062 ADD RDI,0x18 MOV RSI,RBX MOV RDX,R14 CALL 0x0010e710 TEST EAX,EAX SETNZ AL CMOVZ EBP,R12D LAB_00137062: TEST AL,AL JZ 0x0013709b INC R12 CMP R12,0xe0 JNZ 0x00137039 CALL 0x0010e090 LAB_00137077: MOV RDI,RBX CALL 0x0010e270 MOV RDI,R15 MOV RSI,RBX MOV RDX,RAX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00123e1c LAB_0013709b: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong find_atom(long param_1,char *param_2) { long lVar1; long lVar2; int iVar3; size_t sVar4; ulong unaff_RBP; ulong uVar5; uint uVar6; bool bVar7; if (*param_2 != '[') { sVar4 = strlen(param_2); uVar5 = JS_NewAtomLen(param_1,param_2,sVar4); return uVar5; } sVar4 = strlen(param_2 + 1); uVar6 = (int)sVar4 - 1; lVar1 = *(long *)(*(long *)(param_1 + 0x18) + 0x68); uVar5 = 0xd3; while( true ) { lVar2 = *(long *)(lVar1 + uVar5 * 8); bVar7 = true; if ((*(uint *)(lVar2 + 4) & 0x7fffffff) == uVar6) { iVar3 = bcmp((void *)(lVar2 + 0x18),param_2 + 1,(ulong)uVar6); bVar7 = iVar3 != 0; unaff_RBP = unaff_RBP & 0xffffffff; if (!bVar7) { unaff_RBP = uVar5 & 0xffffffff; } } if (!bVar7) break; uVar5 = uVar5 + 1; if (uVar5 == 0xe0) { /* WARNING: Subroutine does not return */ abort(); } } return unaff_RBP & 0xffffffff; }
13,621
find_atom
bluesky950520[P]quickjs/quickjs.c
static JSAtom find_atom(JSContext *ctx, const char *name) { JSAtom atom; int len; if (*name == '[') { name++; len = strlen(name) - 1; /* We assume 8 bit non null strings, which is the case for these symbols */ for(atom = JS_ATOM_Symbol_toPrimitive; atom < JS_ATOM_END; atom++) { JSAtomStruct *p = ctx->rt->atom_array[atom]; JSString *str = p; if (str->len == len && !memcmp(str->u.str8, name, len)) return JS_DupAtom(ctx, atom); } abort(); } else { atom = JS_NewAtom(ctx, name); } return atom; }
O2
c
find_atom: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %rbx movq %rdi, %r15 cmpb $0x5b, (%rsi) jne 0x302d6 incq %rbx movq %rbx, %rdi callq 0xe280 movq %rax, %r14 decl %r14d movq 0x18(%r15), %rax movq 0x68(%rax), %r12 movl $0xd3, %r15d movl $0x7fffffff, %ebp # imm = 0x7FFFFFFF cmpq $0xe0, %r15 je 0x302f5 movq (%r12,%r15,8), %rdi movl 0x4(%rdi), %eax andl %ebp, %eax cmpl %r14d, %eax jne 0x302d1 addq $0x18, %rdi movq %rbx, %rsi movq %r14, %rdx callq 0xe730 testl %eax, %eax je 0x302e9 incq %r15 jmp 0x302a7 movq %r15, %rdi movq %rbx, %rsi popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x1e021 movl %r15d, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq callq 0xe090
find_atom: push rbp push r15 push r14 push r12 push rbx mov rbx, rsi mov r15, rdi cmp byte ptr [rsi], 5Bh ; '[' jnz short loc_302D6 inc rbx mov rdi, rbx call _strlen mov r14, rax dec r14d mov rax, [r15+18h] mov r12, [rax+68h] mov r15d, 0D3h mov ebp, 7FFFFFFFh loc_302A7: cmp r15, 0E0h jz short loc_302F5 mov rdi, [r12+r15*8] mov eax, [rdi+4] and eax, ebp cmp eax, r14d jnz short loc_302D1 add rdi, 18h mov rsi, rbx mov rdx, r14 call _bcmp test eax, eax jz short loc_302E9 loc_302D1: inc r15 jmp short loc_302A7 loc_302D6: mov rdi, r15 mov rsi, rbx pop rbx pop r12 pop r14 pop r15 pop rbp jmp JS_NewAtom loc_302E9: mov eax, r15d pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_302F5: call _abort
long long find_atom(long long a1, unsigned __int8 *a2) { unsigned __int8 *v3; // rdi long long v4; // rcx long long v5; // r14 long long v6; // r12 long long i; // r15 if ( *a2 != 91 ) return JS_NewAtom(a1, a2); v3 = a2 + 1; v5 = (unsigned int)strlen(a2 + 1) - 1; v6 = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL); for ( i = 211LL; ; ++i ) { if ( i == 224 ) abort((const char *)v3); v3 = *(unsigned __int8 **)(v6 + 8 * i); if ( (*((_DWORD *)v3 + 1) & 0x7FFFFFFF) == (_DWORD)v5 ) { v3 += 24; if ( !(unsigned int)bcmp(v3, a2 + 1, v5, v4) ) break; } } return (unsigned int)i; }
find_atom: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RSI MOV R15,RDI CMP byte ptr [RSI],0x5b JNZ 0x001302d6 INC RBX MOV RDI,RBX CALL 0x0010e280 MOV R14,RAX DEC R14D MOV RAX,qword ptr [R15 + 0x18] MOV R12,qword ptr [RAX + 0x68] MOV R15D,0xd3 MOV EBP,0x7fffffff LAB_001302a7: CMP R15,0xe0 JZ 0x001302f5 MOV RDI,qword ptr [R12 + R15*0x8] MOV EAX,dword ptr [RDI + 0x4] AND EAX,EBP CMP EAX,R14D JNZ 0x001302d1 ADD RDI,0x18 MOV RSI,RBX MOV RDX,R14 CALL 0x0010e730 TEST EAX,EAX JZ 0x001302e9 LAB_001302d1: INC R15 JMP 0x001302a7 LAB_001302d6: MOV RDI,R15 MOV RSI,RBX POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x0011e021 LAB_001302e9: MOV EAX,R15D POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001302f5: CALL 0x0010e090
ulong find_atom(long param_1,char *param_2) { long lVar1; long lVar2; int iVar3; size_t sVar4; uint uVar5; ulong uVar6; if (*param_2 != '[') { uVar6 = JS_NewAtom(param_1,param_2); return uVar6; } sVar4 = strlen(param_2 + 1); uVar5 = (int)sVar4 - 1; lVar1 = *(long *)(*(long *)(param_1 + 0x18) + 0x68); uVar6 = 0xd3; do { if (uVar6 == 0xe0) { /* WARNING: Subroutine does not return */ abort(); } lVar2 = *(long *)(lVar1 + uVar6 * 8); if ((*(uint *)(lVar2 + 4) & 0x7fffffff) == uVar5) { iVar3 = bcmp((void *)(lVar2 + 0x18),param_2 + 1,(ulong)uVar5); if (iVar3 == 0) { return uVar6 & 0xffffffff; } } uVar6 = uVar6 + 1; } while( true ); }
13,622
mbedtls_chacha20_setkey
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/chacha20.c
int mbedtls_chacha20_setkey(mbedtls_chacha20_context *ctx, const unsigned char key[32]) { CHACHA20_VALIDATE_RET(ctx != NULL); CHACHA20_VALIDATE_RET(key != NULL); /* ChaCha20 constants - the string "expand 32-byte k" */ ctx->state[0] = 0x61707865; ctx->state[1] = 0x3320646e; ctx->state[2] = 0x79622d32; ctx->state[3] = 0x6b206574; /* Set key */ ctx->state[4] = MBEDTLS_GET_UINT32_LE(key, 0); ctx->state[5] = MBEDTLS_GET_UINT32_LE(key, 4); ctx->state[6] = MBEDTLS_GET_UINT32_LE(key, 8); ctx->state[7] = MBEDTLS_GET_UINT32_LE(key, 12); ctx->state[8] = MBEDTLS_GET_UINT32_LE(key, 16); ctx->state[9] = MBEDTLS_GET_UINT32_LE(key, 20); ctx->state[10] = MBEDTLS_GET_UINT32_LE(key, 24); ctx->state[11] = MBEDTLS_GET_UINT32_LE(key, 28); return 0; }
O3
c
mbedtls_chacha20_setkey: movaps 0x166d0(%rip), %xmm0 # 0xb61b0 movups %xmm0, (%rdi) movl (%rsi), %eax movl %eax, 0x10(%rdi) movl 0x4(%rsi), %eax movl %eax, 0x14(%rdi) movl 0x8(%rsi), %eax movl %eax, 0x18(%rdi) movl 0xc(%rsi), %eax movl %eax, 0x1c(%rdi) movl 0x10(%rsi), %eax movl %eax, 0x20(%rdi) movl 0x14(%rsi), %eax movl %eax, 0x24(%rdi) movl 0x18(%rsi), %eax movl %eax, 0x28(%rdi) movl 0x1c(%rsi), %eax movl %eax, 0x2c(%rdi) xorl %eax, %eax retq
mbedtls_chacha20_setkey: movaps xmm0, cs:xmmword_B61B0 movups xmmword ptr [rdi], xmm0 mov eax, [rsi] mov [rdi+10h], eax mov eax, [rsi+4] mov [rdi+14h], eax mov eax, [rsi+8] mov [rdi+18h], eax mov eax, [rsi+0Ch] mov [rdi+1Ch], eax mov eax, [rsi+10h] mov [rdi+20h], eax mov eax, [rsi+14h] mov [rdi+24h], eax mov eax, [rsi+18h] mov [rdi+28h], eax mov eax, [rsi+1Ch] mov [rdi+2Ch], eax xor eax, eax retn
long long mbedtls_chacha20_setkey(long long a1, _DWORD *a2) { *(_OWORD *)a1 = xmmword_B61B0; *(_DWORD *)(a1 + 16) = *a2; *(_DWORD *)(a1 + 20) = a2[1]; *(_DWORD *)(a1 + 24) = a2[2]; *(_DWORD *)(a1 + 28) = a2[3]; *(_DWORD *)(a1 + 32) = a2[4]; *(_DWORD *)(a1 + 36) = a2[5]; *(_DWORD *)(a1 + 40) = a2[6]; *(_DWORD *)(a1 + 44) = a2[7]; return 0LL; }
mbedtls_chacha20_setkey: MOVAPS XMM0,xmmword ptr [0x001b61b0] MOVUPS xmmword ptr [RDI],XMM0 MOV EAX,dword ptr [RSI] MOV dword ptr [RDI + 0x10],EAX MOV EAX,dword ptr [RSI + 0x4] MOV dword ptr [RDI + 0x14],EAX MOV EAX,dword ptr [RSI + 0x8] MOV dword ptr [RDI + 0x18],EAX MOV EAX,dword ptr [RSI + 0xc] MOV dword ptr [RDI + 0x1c],EAX MOV EAX,dword ptr [RSI + 0x10] MOV dword ptr [RDI + 0x20],EAX MOV EAX,dword ptr [RSI + 0x14] MOV dword ptr [RDI + 0x24],EAX MOV EAX,dword ptr [RSI + 0x18] MOV dword ptr [RDI + 0x28],EAX MOV EAX,dword ptr [RSI + 0x1c] MOV dword ptr [RDI + 0x2c],EAX XOR EAX,EAX RET
int8 mbedtls_chacha20_setkey(char *param_1,int4 *param_2) { int8 uVar1; uVar1 = s_expand_32_byte_k__001b61b0._8_8_; *(int8 *)param_1 = s_expand_32_byte_k__001b61b0._0_8_; *(int8 *)(param_1 + 8) = uVar1; *(int4 *)(param_1 + 0x10) = *param_2; *(int4 *)(param_1 + 0x14) = param_2[1]; *(int4 *)(param_1 + 0x18) = param_2[2]; *(int4 *)(param_1 + 0x1c) = param_2[3]; *(int4 *)(param_1 + 0x20) = param_2[4]; *(int4 *)(param_1 + 0x24) = param_2[5]; *(int4 *)(param_1 + 0x28) = param_2[6]; *(int4 *)(param_1 + 0x2c) = param_2[7]; return 0; }
13,623
google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(int, google::protobuf::MessageLite const&, google::protobuf::io::CodedOutputStream*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/wire_format_lite.cc
void WireFormatLite::WriteGroupMaybeToArray(int field_number, const MessageLite& value, io::CodedOutputStream* output) { WriteTag(field_number, WIRETYPE_START_GROUP, output); const int size = value.GetCachedSize(); WriteSubMessageMaybeToArray(size, value, output); WriteTag(field_number, WIRETYPE_END_GROUP, output); }
O0
cpp
google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(int, google::protobuf::MessageLite const&, google::protobuf::io::CodedOutputStream*): subq $0x58, %rsp movl %edi, 0x34(%rsp) movq %rsi, 0x28(%rsp) movq %rdx, 0x20(%rsp) movl 0x34(%rsp), %ecx movq 0x20(%rsp), %rax movl %ecx, 0x54(%rsp) movl $0x3, 0x50(%rsp) movq %rax, 0x48(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x8(%rsp) movl 0x54(%rsp), %edi movl 0x50(%rsp), %esi callq 0x6a150 movq 0x8(%rsp), %rdi movl %eax, %esi callq 0x22cfc0 movq 0x28(%rsp), %rdi movq (%rdi), %rax callq *0x48(%rax) movl %eax, 0x1c(%rsp) movl 0x1c(%rsp), %edi movq 0x28(%rsp), %rsi movq 0x20(%rsp), %rdx callq 0x22c010 movl 0x34(%rsp), %ecx movq 0x20(%rsp), %rax movl %ecx, 0x44(%rsp) movl $0x4, 0x40(%rsp) movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x10(%rsp) movl 0x44(%rsp), %edi movl 0x40(%rsp), %esi callq 0x6a150 movq 0x10(%rsp), %rdi movl %eax, %esi callq 0x22cfc0 addq $0x58, %rsp retq nopw %cs:(%rax,%rax)
_ZN6google8protobuf8internal14WireFormatLite22WriteGroupMaybeToArrayEiRKNS0_11MessageLiteEPNS0_2io17CodedOutputStreamE: sub rsp, 58h mov [rsp+58h+var_24], edi mov qword ptr [rsp+58h+var_30], rsi mov [rsp+58h+var_3C+4], rdx mov ecx, [rsp+58h+var_24] mov rax, [rsp+58h+var_3C+4] mov [rsp+58h+var_4], ecx mov [rsp+58h+var_8], 3 mov [rsp+58h+var_10], rax mov rax, [rsp+58h+var_10] mov [rsp+58h+var_50], rax mov edi, [rsp+58h+var_4] mov esi, [rsp+58h+var_8] call _ZN6google8protobuf8internal14WireFormatLite7MakeTagEiNS2_8WireTypeE; google::protobuf::internal::WireFormatLite::MakeTag(int,google::protobuf::internal::WireFormatLite::WireType) mov rdi, [rsp+58h+var_50]; this mov esi, eax; unsigned int call _ZN6google8protobuf2io17CodedOutputStream8WriteTagEj; google::protobuf::io::CodedOutputStream::WriteTag(uint) mov rdi, qword ptr [rsp+58h+var_30] mov rax, [rdi] call qword ptr [rax+48h] mov dword ptr [rsp+58h+var_3C], eax mov edi, dword ptr [rsp+58h+var_3C]; this mov rsi, qword ptr [rsp+58h+var_30]; int mov rdx, [rsp+58h+var_3C+4]; google::protobuf::MessageLite * call _ZN6google8protobuf8internal14WireFormatLite27WriteSubMessageMaybeToArrayEiRKNS0_11MessageLiteEPNS0_2io17CodedOutputStreamE; google::protobuf::internal::WireFormatLite::WriteSubMessageMaybeToArray(int,google::protobuf::MessageLite const&,google::protobuf::io::CodedOutputStream *) mov ecx, [rsp+58h+var_24] mov rax, [rsp+58h+var_3C+4] mov [rsp+58h+var_14], ecx mov [rsp+58h+var_18], 4 mov [rsp+58h+var_20], rax mov rax, [rsp+58h+var_20] mov [rsp+58h+var_48], rax mov edi, [rsp+58h+var_14] mov esi, [rsp+58h+var_18] call _ZN6google8protobuf8internal14WireFormatLite7MakeTagEiNS2_8WireTypeE; google::protobuf::internal::WireFormatLite::MakeTag(int,google::protobuf::internal::WireFormatLite::WireType) mov rdi, [rsp+58h+var_48]; this mov esi, eax; unsigned int call _ZN6google8protobuf2io17CodedOutputStream8WriteTagEj; google::protobuf::io::CodedOutputStream::WriteTag(uint) add rsp, 58h retn
long long google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray( google::protobuf::internal::WireFormatLite *this, long long a2, const google::protobuf::MessageLite *a3, google::protobuf::io::CodedOutputStream *a4) { unsigned int Tag; // eax google::protobuf::io::CodedOutputStream *v5; // rcx unsigned int v6; // eax unsigned int v9; // [rsp+1Ch] [rbp-3Ch] Tag = google::protobuf::internal::WireFormatLite::MakeTag((int)this, 3); google::protobuf::io::CodedOutputStream::WriteTag(a3, Tag); v9 = (*(long long ( **)(long long))(*(_QWORD *)a2 + 72LL))(a2); google::protobuf::internal::WireFormatLite::WriteSubMessageMaybeToArray( (google::protobuf::internal::WireFormatLite *)v9, a2, a3, v5); v6 = google::protobuf::internal::WireFormatLite::MakeTag((int)this, 4); return google::protobuf::io::CodedOutputStream::WriteTag(a3, v6); }
Set<char[12]>: SUB RSP,0x98 MOV qword ptr [RSP + 0x90],RDI MOV qword ptr [RSP + 0x88],RSI MOV qword ptr [RSP + 0x80],RDX MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x18],RAX LEA RDI,[RSP + 0x3f] MOV qword ptr [RSP + 0x20],RDI CALL 0x00121a00 MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] LAB_0022c0d2: LEA RDI,[RSP + 0x40] CALL 0x00121890 JMP 0x0022c0de LAB_0022c0de: LEA RDI,[RSP + 0x60] LEA RSI,[RSP + 0x40] CALL 0x0015b3f0 JMP 0x0022c0ef LAB_0022c0ef: MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x8 MOV RSI,qword ptr [RSP + 0x88] LAB_0022c100: CALL 0x00138bc0 LAB_0022c105: MOV qword ptr [RSP + 0x8],RAX JMP 0x0022c10c LAB_0022c10c: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x60] CALL 0x001215e0 LEA RDI,[RSP + 0x60] CALL 0x00121cc8 LEA RDI,[RSP + 0x40] CALL 0x00121cc8 LEA RDI,[RSP + 0x3f] CALL 0x00121cb0 ADD RSP,0x98 RET
/* void google::protobuf::compiler::cpp::Formatter::Set<char [12]>(std::__cxx11::string const&, char const (&) [12]) */ void __thiscall google::protobuf::compiler::cpp::Formatter::Set<char[12]> (Formatter *this,string *param_1,char *param_2) { string *this_00; allocator local_59; string local_58 [32]; Formatter local_38 [32]; char *local_18; string *local_10; Formatter *local_8; local_18 = param_2; local_10 = param_1; local_8 = this; std::allocator<char>::allocator(); /* try { // try from 0022c0d2 to 0022c0db has its CatchHandler @ 0022c141 */ std::__cxx11::string::string(local_58,param_2,&local_59); /* try { // try from 0022c0de to 0022c0ec has its CatchHandler @ 0022c151 */ ToString(local_38,local_58); /* try { // try from 0022c100 to 0022c104 has its CatchHandler @ 0022c161 */ this_00 = (string *) std:: map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)(this + 8),local_10); std::__cxx11::string::operator=(this_00,(string *)local_38); std::__cxx11::string::~string((string *)local_38); std::__cxx11::string::~string(local_58); std::allocator<char>::~allocator((allocator<char> *)&local_59); return; }
13,624
testing::(anonymous namespace)::PrintBytesInObjectToImpl(unsigned char const*, unsigned long, std::ostream*)
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-printers.cc
void PrintBytesInObjectToImpl(const unsigned char* obj_bytes, size_t count, ostream* os) { // Tells the user how big the object is. *os << count << "-byte object <"; const size_t kThreshold = 132; const size_t kChunkSize = 64; // If the object size is bigger than kThreshold, we'll have to omit // some details by printing only the first and the last kChunkSize // bytes. if (count < kThreshold) { PrintByteSegmentInObjectTo(obj_bytes, 0, count, os); } else { PrintByteSegmentInObjectTo(obj_bytes, 0, kChunkSize, os); *os << " ... "; // Rounds up to 2-byte boundary. const size_t resume_pos = (count - kChunkSize + 1) / 2 * 2; PrintByteSegmentInObjectTo(obj_bytes, resume_pos, count - resume_pos, os); } *os << ">"; }
O0
cpp
testing::(anonymous namespace)::PrintBytesInObjectToImpl(unsigned char const*, unsigned long, std::ostream*): subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq %rdx, 0x20(%rsp) movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x14130 movq %rax, %rdi leaq 0x5a598(%rip), %rsi # 0x114694 callq 0x146a0 movq $0x84, 0x18(%rsp) movq $0x40, 0x10(%rsp) cmpq $0x84, 0x28(%rsp) jae 0xba138 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rdx movq 0x20(%rsp), %rcx xorl %eax, %eax movl %eax, %esi callq 0xdcf70 jmp 0xba197 movq 0x30(%rsp), %rdi movq 0x20(%rsp), %rcx xorl %eax, %eax movl %eax, %esi movl $0x40, %edx callq 0xdcf70 movq 0x20(%rsp), %rdi leaq 0x5a547(%rip), %rsi # 0x1146a3 callq 0x146a0 movq 0x28(%rsp), %rax subq $0x40, %rax addq $0x1, %rax shrq %rax shlq %rax movq %rax, 0x8(%rsp) movq 0x30(%rsp), %rdi movq 0x8(%rsp), %rsi movq 0x28(%rsp), %rdx subq 0x8(%rsp), %rdx movq 0x20(%rsp), %rcx callq 0xdcf70 movq 0x20(%rsp), %rdi leaq 0x59b80(%rip), %rsi # 0x113d23 callq 0x146a0 addq $0x38, %rsp retq nopl (%rax)
_ZN7testing12_GLOBAL__N_124PrintBytesInObjectToImplEPKhmPSo: sub rsp, 38h mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov [rsp+38h+var_18], rdx mov rdi, [rsp+38h+var_18] mov rsi, [rsp+38h+var_10] call __ZNSolsEm; std::ostream::operator<<(ulong) mov rdi, rax lea rsi, aByteObject; "-byte object <" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+38h+var_20], 84h mov [rsp+38h+var_28], 40h ; '@' cmp [rsp+38h+var_10], 84h jnb short loc_BA138 mov rdi, [rsp+38h+var_8]; this mov rdx, [rsp+38h+var_10]; unsigned __int64 mov rcx, [rsp+38h+var_18]; unsigned __int64 xor eax, eax mov esi, eax; unsigned __int8 * call _ZN7testing12_GLOBAL__N_126PrintByteSegmentInObjectToEPKhmmPSo; testing::`anonymous namespace'::PrintByteSegmentInObjectTo(uchar const*,ulong,ulong,std::ostream *) jmp short loc_BA197 loc_BA138: mov rdi, [rsp+38h+var_8]; this mov rcx, [rsp+38h+var_18]; unsigned __int64 xor eax, eax mov esi, eax; unsigned __int8 * mov edx, 40h ; '@'; unsigned __int64 call _ZN7testing12_GLOBAL__N_126PrintByteSegmentInObjectToEPKhmmPSo; testing::`anonymous namespace'::PrintByteSegmentInObjectTo(uchar const*,ulong,ulong,std::ostream *) mov rdi, [rsp+38h+var_18] lea rsi, asc_1146A3; " ... " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rax, [rsp+38h+var_10] sub rax, 40h ; '@' add rax, 1 shr rax, 1 shl rax, 1 mov [rsp+38h+var_30], rax mov rdi, [rsp+38h+var_8]; this mov rsi, [rsp+38h+var_30]; unsigned __int8 * mov rdx, [rsp+38h+var_10] sub rdx, [rsp+38h+var_30]; unsigned __int64 mov rcx, [rsp+38h+var_18]; unsigned __int64 call _ZN7testing12_GLOBAL__N_126PrintByteSegmentInObjectToEPKhmmPSo; testing::`anonymous namespace'::PrintByteSegmentInObjectTo(uchar const*,ulong,ulong,std::ostream *) loc_BA197: mov rdi, [rsp+38h+var_18] lea rsi, aType_0+9; ">" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) add rsp, 38h retn
long long testing::`anonymous namespace'::PrintBytesInObjectToImpl( testing::_anonymous_namespace_ *this, const unsigned __int8 *a2, unsigned long long a3, std::ostream *a4) { long long v4; // rax std::ostream *v5; // r8 std::ostream *v6; // r8 v4 = std::ostream::operator<<(a3, a2); std::operator<<<std::char_traits<char>>(v4, "-byte object <"); if ( (unsigned long long)a2 >= 0x84 ) { testing::`anonymous namespace'::PrintByteSegmentInObjectTo(this, 0LL, 0x40uLL, a3, v5); std::operator<<<std::char_traits<char>>(a3, " ... "); testing::`anonymous namespace'::PrintByteSegmentInObjectTo( this, (const unsigned __int8 *)(2 * ((unsigned long long)(a2 - 63) >> 1)), (unsigned long long)&a2[-2 * ((unsigned long long)(a2 - 63) >> 1)], a3, v6); } else { testing::`anonymous namespace'::PrintByteSegmentInObjectTo(this, 0LL, (unsigned long long)a2, a3, v5); } return std::operator<<<std::char_traits<char>>(a3, ">"); }
PrintBytesInObjectToImpl: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x20],RDX MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00114130 MOV RDI,RAX LEA RSI,[0x214694] CALL 0x001146a0 MOV qword ptr [RSP + 0x18],0x84 MOV qword ptr [RSP + 0x10],0x40 CMP qword ptr [RSP + 0x28],0x84 JNC 0x001ba138 MOV RDI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] XOR EAX,EAX MOV ESI,EAX CALL 0x001dcf70 JMP 0x001ba197 LAB_001ba138: MOV RDI,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x20] XOR EAX,EAX MOV ESI,EAX MOV EDX,0x40 CALL 0x001dcf70 MOV RDI,qword ptr [RSP + 0x20] LEA RSI,[0x2146a3] CALL 0x001146a0 MOV RAX,qword ptr [RSP + 0x28] SUB RAX,0x40 ADD RAX,0x1 SHR RAX,0x1 SHL RAX,0x1 MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x28] SUB RDX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x20] CALL 0x001dcf70 LAB_001ba197: MOV RDI,qword ptr [RSP + 0x20] LEA RSI,[0x213d23] CALL 0x001146a0 ADD RSP,0x38 RET
/* testing::(anonymous namespace)::PrintBytesInObjectToImpl(unsigned char const*, unsigned long, std::ostream*) */ void testing::(anonymous_namespace)::PrintBytesInObjectToImpl (uchar *param_1,ulong param_2,ostream *param_3) { ostream *poVar1; ulong uVar2; poVar1 = (ostream *)std::ostream::operator<<(param_3,param_2); std::operator<<(poVar1,"-byte object <"); if (param_2 < 0x84) { PrintByteSegmentInObjectTo(param_1,0,param_2,param_3); } else { PrintByteSegmentInObjectTo(param_1,0,0x40,param_3); std::operator<<(param_3," ... "); uVar2 = param_2 - 0x3f & 0xfffffffffffffffe; PrintByteSegmentInObjectTo(param_1,uVar2,param_2 - uVar2,param_3); } std::operator<<(param_3,">"); return; }
13,625
my_thread_init_common_mutex
eloqsql/mysys/my_thr_init.c
static void my_thread_init_common_mutex(void) { mysql_mutex_init(key_THR_LOCK_open, &THR_LOCK_open, MY_MUTEX_INIT_FAST); mysql_mutex_init(key_THR_LOCK_lock, &THR_LOCK_lock, MY_MUTEX_INIT_FAST); mysql_mutex_init(key_THR_LOCK_myisam, &THR_LOCK_myisam, MY_MUTEX_INIT_SLOW); mysql_mutex_init(key_THR_LOCK_myisam_mmap, &THR_LOCK_myisam_mmap, MY_MUTEX_INIT_FAST); mysql_mutex_init(key_THR_LOCK_heap, &THR_LOCK_heap, MY_MUTEX_INIT_FAST); mysql_mutex_init(key_THR_LOCK_net, &THR_LOCK_net, MY_MUTEX_INIT_FAST); mysql_mutex_init(key_THR_LOCK_charset, &THR_LOCK_charset, MY_MUTEX_INIT_FAST); #if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R) mysql_mutex_init(key_LOCK_localtime_r, &LOCK_localtime_r, MY_MUTEX_INIT_SLOW); #endif }
O0
c
my_thread_init_common_mutex: pushq %rbp movq %rsp, %rbp leaq 0x35f655(%rip), %rax # 0x385ca0 movl (%rax), %edi leaq 0x35f314(%rip), %rsi # 0x385968 leaq 0x35f5dd(%rip), %rdx # 0x385c38 callq 0x27350 leaq 0x35f625(%rip), %rax # 0x385c8c movl (%rax), %edi leaq 0x35f340(%rip), %rsi # 0x3859b0 leaq 0x35f5c1(%rip), %rdx # 0x385c38 callq 0x27350 leaq 0x35f615(%rip), %rax # 0x385c98 movl (%rax), %edi leaq 0x35f36c(%rip), %rsi # 0x3859f8 xorl %eax, %eax movl %eax, %edx callq 0x27350 leaq 0x35f610(%rip), %rax # 0x385cac movl (%rax), %edi leaq 0x35f39b(%rip), %rsi # 0x385a40 leaq 0x35f58c(%rip), %rdx # 0x385c38 callq 0x27350 leaq 0x35f5d0(%rip), %rax # 0x385c88 movl (%rax), %edi leaq 0x35f3c7(%rip), %rsi # 0x385a88 leaq 0x35f570(%rip), %rdx # 0x385c38 callq 0x27350 leaq 0x35f5c8(%rip), %rax # 0x385c9c movl (%rax), %edi leaq 0x35f3f3(%rip), %rsi # 0x385ad0 leaq 0x35f554(%rip), %rdx # 0x385c38 callq 0x27350 leaq 0x35f594(%rip), %rax # 0x385c84 movl (%rax), %edi leaq 0x35f41f(%rip), %rsi # 0x385b18 leaq 0x35f538(%rip), %rdx # 0x385c38 callq 0x27350 popq %rbp retq nopw (%rax,%rax)
my_thread_init_common_mutex: push rbp mov rbp, rsp lea rax, key_THR_LOCK_open mov edi, [rax] lea rsi, THR_LOCK_open lea rdx, my_fast_mutexattr call inline_mysql_mutex_init lea rax, key_THR_LOCK_lock mov edi, [rax] lea rsi, THR_LOCK_lock lea rdx, my_fast_mutexattr call inline_mysql_mutex_init lea rax, key_THR_LOCK_myisam mov edi, [rax] lea rsi, THR_LOCK_myisam xor eax, eax mov edx, eax call inline_mysql_mutex_init lea rax, key_THR_LOCK_myisam_mmap mov edi, [rax] lea rsi, THR_LOCK_myisam_mmap lea rdx, my_fast_mutexattr call inline_mysql_mutex_init lea rax, key_THR_LOCK_heap mov edi, [rax] lea rsi, THR_LOCK_heap lea rdx, my_fast_mutexattr call inline_mysql_mutex_init lea rax, key_THR_LOCK_net mov edi, [rax] lea rsi, THR_LOCK_net lea rdx, my_fast_mutexattr call inline_mysql_mutex_init lea rax, key_THR_LOCK_charset mov edi, [rax] lea rsi, THR_LOCK_charset lea rdx, my_fast_mutexattr call inline_mysql_mutex_init pop rbp retn
long long my_thread_init_common_mutex() { inline_mysql_mutex_init(key_THR_LOCK_open, &THR_LOCK_open, &my_fast_mutexattr); inline_mysql_mutex_init(key_THR_LOCK_lock, &THR_LOCK_lock, &my_fast_mutexattr); inline_mysql_mutex_init(key_THR_LOCK_myisam, &THR_LOCK_myisam, 0LL); inline_mysql_mutex_init(key_THR_LOCK_myisam_mmap, &THR_LOCK_myisam_mmap, &my_fast_mutexattr); inline_mysql_mutex_init(key_THR_LOCK_heap, &THR_LOCK_heap, &my_fast_mutexattr); inline_mysql_mutex_init(key_THR_LOCK_net, &THR_LOCK_net, &my_fast_mutexattr); return inline_mysql_mutex_init(key_THR_LOCK_charset, &THR_LOCK_charset, &my_fast_mutexattr); }
my_thread_init_common_mutex: PUSH RBP MOV RBP,RSP LEA RAX,[0x485ca0] MOV EDI,dword ptr [RAX] LEA RSI,[0x485968] LEA RDX,[0x485c38] CALL 0x00127350 LEA RAX,[0x485c8c] MOV EDI,dword ptr [RAX] LEA RSI,[0x4859b0] LEA RDX,[0x485c38] CALL 0x00127350 LEA RAX,[0x485c98] MOV EDI,dword ptr [RAX] LEA RSI,[0x4859f8] XOR EAX,EAX MOV EDX,EAX CALL 0x00127350 LEA RAX,[0x485cac] MOV EDI,dword ptr [RAX] LEA RSI,[0x485a40] LEA RDX,[0x485c38] CALL 0x00127350 LEA RAX,[0x485c88] MOV EDI,dword ptr [RAX] LEA RSI,[0x485a88] LEA RDX,[0x485c38] CALL 0x00127350 LEA RAX,[0x485c9c] MOV EDI,dword ptr [RAX] LEA RSI,[0x485ad0] LEA RDX,[0x485c38] CALL 0x00127350 LEA RAX,[0x485c84] MOV EDI,dword ptr [RAX] LEA RSI,[0x485b18] LEA RDX,[0x485c38] CALL 0x00127350 POP RBP RET
void my_thread_init_common_mutex(void) { inline_mysql_mutex_init(key_THR_LOCK_open,THR_LOCK_open,&my_fast_mutexattr); inline_mysql_mutex_init(key_THR_LOCK_lock,THR_LOCK_lock,&my_fast_mutexattr); inline_mysql_mutex_init(key_THR_LOCK_myisam,THR_LOCK_myisam,0); inline_mysql_mutex_init(key_THR_LOCK_myisam_mmap,THR_LOCK_myisam_mmap,&my_fast_mutexattr); inline_mysql_mutex_init(key_THR_LOCK_heap,THR_LOCK_heap,&my_fast_mutexattr); inline_mysql_mutex_init(key_THR_LOCK_net,THR_LOCK_net,&my_fast_mutexattr); inline_mysql_mutex_init(key_THR_LOCK_charset,THR_LOCK_charset,&my_fast_mutexattr); return; }
13,626
mariadb_reconnect
eloqsql/libmariadb/libmariadb/mariadb_lib.c
my_bool STDCALL mariadb_reconnect(MYSQL *mysql) { MYSQL tmp_mysql; struct my_hook_data hook_data; struct mysql_async_context *ctxt= NULL; LIST *li_stmt= mysql->stmts; /* check if connection handler is active */ if (IS_CONNHDLR_ACTIVE(mysql)) { if (mysql->extension->conn_hdlr->plugin && mysql->extension->conn_hdlr->plugin->reconnect) return(mysql->extension->conn_hdlr->plugin->reconnect(mysql)); } if (!mysql->options.reconnect || (mysql->server_status & SERVER_STATUS_IN_TRANS) || !mysql->host_info) { /* Allow reconnect next time */ mysql->server_status&= ~SERVER_STATUS_IN_TRANS; my_set_error(mysql, CR_SERVER_GONE_ERROR, SQLSTATE_UNKNOWN, 0); return(1); } mysql_init(&tmp_mysql); tmp_mysql.free_me= 0; tmp_mysql.options=mysql->options; if (mysql->extension->conn_hdlr) { tmp_mysql.extension->conn_hdlr= mysql->extension->conn_hdlr; mysql->extension->conn_hdlr= 0; } /* don't reread options from configuration files */ tmp_mysql.options.my_cnf_group= tmp_mysql.options.my_cnf_file= NULL; if (IS_MYSQL_ASYNC_ACTIVE(mysql)) { ctxt= mysql->options.extension->async_context; hook_data.orig_mysql= mysql; hook_data.new_mysql= &tmp_mysql; hook_data.orig_pvio= mysql->net.pvio; my_context_install_suspend_resume_hook(ctxt, my_suspend_hook, &hook_data); } if (!mysql_real_connect(&tmp_mysql,mysql->host,mysql->user,mysql->passwd, mysql->db, mysql->port, mysql->unix_socket, mysql->client_flag | CLIENT_REMEMBER_OPTIONS) || mysql_set_character_set(&tmp_mysql, mysql->charset->csname)) { if (ctxt) my_context_install_suspend_resume_hook(ctxt, NULL, NULL); /* don't free options (CONC-118) */ memset(&tmp_mysql.options, 0, sizeof(struct st_mysql_options)); my_set_error(mysql, tmp_mysql.net.last_errno, tmp_mysql.net.sqlstate, tmp_mysql.net.last_error); mysql_close(&tmp_mysql); return(1); } for (;li_stmt;li_stmt= li_stmt->next) { MYSQL_STMT *stmt= (MYSQL_STMT *)li_stmt->data; if (stmt->state != MYSQL_STMT_INITTED) { stmt->state= MYSQL_STMT_INITTED; SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); } } tmp_mysql.free_me= mysql->free_me; tmp_mysql.stmts= mysql->stmts; mysql->stmts= NULL; if (ctxt) my_context_install_suspend_resume_hook(ctxt, NULL, NULL); /* Don't free options, we moved them to tmp_mysql */ memset(&mysql->options, 0, sizeof(mysql->options)); mysql->free_me=0; mysql_close(mysql); *mysql=tmp_mysql; mysql->net.pvio->mysql= mysql; #ifdef HAVE_TLS /* CONC-604: Set new connection handle */ if (mysql_get_ssl_cipher(mysql)) ma_pvio_tls_set_connection(mysql); #endif ma_net_clear(&mysql->net); mysql->affected_rows= ~(unsigned long long) 0; mysql->info= 0; return(0); }
O0
c
mariadb_reconnect: pushq %rbp movq %rsp, %rbp subq $0x560, %rsp # imm = 0x560 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x510(%rbp) movq $0x0, -0x530(%rbp) movq -0x510(%rbp), %rax movq 0x4c8(%rax), %rax movq %rax, -0x538(%rbp) movq -0x510(%rbp), %rax cmpq $0x0, 0x4f0(%rax) je 0x31144 movq -0x510(%rbp), %rax movq 0x4f0(%rax), %rax cmpq $0x0, (%rax) je 0x31144 movq -0x510(%rbp), %rax movq 0x4f0(%rax), %rax movq (%rax), %rax cmpq $0x0, (%rax) je 0x31142 movq -0x510(%rbp), %rax movq 0x4f0(%rax), %rax movq (%rax), %rax movq (%rax), %rax cmpq $0x0, 0x78(%rax) je 0x31142 movq -0x510(%rbp), %rax movq 0x4f0(%rax), %rax movq (%rax), %rax movq (%rax), %rax movq 0x78(%rax), %rax movq -0x510(%rbp), %rdi callq *%rax movb %al, -0x501(%rbp) jmp 0x315ed jmp 0x31144 movq -0x510(%rbp), %rax cmpb $0x0, 0x43b(%rax) je 0x3117a movq -0x510(%rbp), %rax movl 0x380(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0x3117a movq -0x510(%rbp), %rax cmpq $0x0, 0x2d8(%rax) jne 0x311bd movq -0x510(%rbp), %rax movl 0x380(%rax), %ecx andl $-0x2, %ecx movl %ecx, 0x380(%rax) movq -0x510(%rbp), %rdi leaq 0x4fd02(%rip), %rax # 0x80ea0 movq (%rax), %rdx movl $0x7d6, %esi # imm = 0x7D6 xorl %eax, %eax movl %eax, %ecx movb $0x0, %al callq 0x307d0 movb $0x1, -0x501(%rbp) jmp 0x315ed leaq -0x500(%rbp), %rdi callq 0x35120 movb $0x0, -0x74(%rbp) leaq -0x500(%rbp), %rdi addq $0x390, %rdi # imm = 0x390 movq -0x510(%rbp), %rsi addq $0x390, %rsi # imm = 0x390 movl $0xf8, %edx callq 0x14370 movq -0x510(%rbp), %rax movq 0x4f0(%rax), %rax cmpq $0x0, (%rax) je 0x31234 movq -0x510(%rbp), %rax movq 0x4f0(%rax), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x510(%rbp), %rax movq 0x4f0(%rax), %rax movq $0x0, (%rax) movq $0x0, -0x120(%rbp) movq $0x0, -0x118(%rbp) movq -0x510(%rbp), %rax cmpq $0x0, 0x480(%rax) je 0x312ef movq -0x510(%rbp), %rax movq 0x480(%rax), %rax cmpq $0x0, 0x28(%rax) je 0x312ef movq -0x510(%rbp), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movsbl 0x14(%rax), %eax cmpl $0x0, %eax je 0x312ef movq -0x510(%rbp), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x530(%rbp) movq -0x510(%rbp), %rax movq %rax, -0x528(%rbp) leaq -0x500(%rbp), %rax movq %rax, -0x520(%rbp) movq -0x510(%rbp), %rax movq (%rax), %rax movq %rax, -0x518(%rbp) movq -0x530(%rbp), %rdi leaq 0x6d8d(%rip), %rsi # 0x38070 leaq -0x528(%rbp), %rdx callq 0x522f0 movq -0x510(%rbp), %rax movq 0x2b0(%rax), %rsi movq -0x510(%rbp), %rax movq 0x2b8(%rax), %rdx movq -0x510(%rbp), %rax movq 0x2c0(%rax), %rcx movq -0x510(%rbp), %rax movq 0x2e8(%rax), %r8 movq -0x510(%rbp), %rax movl 0x360(%rax), %r9d movq -0x510(%rbp), %rax movq 0x2c8(%rax), %r10 movq -0x510(%rbp), %rdi movabsq $0x80000000, %rax # imm = 0x80000000 orq 0x368(%rdi), %rax leaq -0x500(%rbp), %rdi movq %r10, (%rsp) movq %rax, 0x8(%rsp) callq 0x355f0 cmpq $0x0, %rax je 0x31399 movq -0x510(%rbp), %rax movq 0x2f0(%rax), %rax movq 0x8(%rax), %rsi leaq -0x500(%rbp), %rdi callq 0x380d0 cmpl $0x0, %eax je 0x31418 cmpq $0x0, -0x530(%rbp) je 0x313b6 movq -0x530(%rbp), %rdi xorl %eax, %eax movl %eax, %edx movq %rdx, %rsi callq 0x522f0 leaq -0x500(%rbp), %rdi addq $0x390, %rdi # imm = 0x390 xorl %esi, %esi movl $0xf8, %edx callq 0x14260 movq -0x510(%rbp), %rdi movl -0x470(%rbp), %esi leaq -0x500(%rbp), %rdx addq $0x297, %rdx # imm = 0x297 leaq -0x500(%rbp), %rcx addq $0x97, %rcx movb $0x0, %al callq 0x307d0 leaq -0x500(%rbp), %rdi callq 0x381f0 movb $0x1, -0x501(%rbp) jmp 0x315ed jmp 0x3141a cmpq $0x0, -0x538(%rbp) je 0x314e6 movq -0x538(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x540(%rbp) movq -0x540(%rbp), %rax cmpl $0x0, 0x50(%rax) je 0x314cd movq -0x540(%rbp), %rax movl $0x0, 0x50(%rax) movq -0x540(%rbp), %rax movl $0x7dd, 0x108(%rax) # imm = 0x7DD movq -0x540(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x4fa21(%rip), %rax # 0x80ea0 movq (%rax), %rsi movl $0x5, %edx callq 0x14220 movq -0x540(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x540(%rbp), %rdi addq $0x10c, %rdi # imm = 0x10C leaq 0x4fa01(%rip), %rax # 0x80eb0 movq 0x68(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x14220 movq -0x540(%rbp), %rax movb $0x0, 0x30b(%rax) jmp 0x314cd jmp 0x314cf movq -0x538(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x538(%rbp) jmp 0x3141a movq -0x510(%rbp), %rax movb 0x48c(%rax), %al movb %al, -0x74(%rbp) movq -0x510(%rbp), %rax movq 0x4c8(%rax), %rax movq %rax, -0x38(%rbp) movq -0x510(%rbp), %rax movq $0x0, 0x4c8(%rax) cmpq $0x0, -0x530(%rbp) je 0x31537 movq -0x530(%rbp), %rdi xorl %eax, %eax movl %eax, %edx movq %rdx, %rsi callq 0x522f0 movq -0x510(%rbp), %rdi addq $0x390, %rdi # imm = 0x390 xorl %esi, %esi movl $0xf8, %edx callq 0x14260 movq -0x510(%rbp), %rax movb $0x0, 0x48c(%rax) movq -0x510(%rbp), %rdi callq 0x381f0 movq -0x510(%rbp), %rdi leaq -0x500(%rbp), %rsi movl $0x4f8, %edx # imm = 0x4F8 callq 0x14370 movq -0x510(%rbp), %rcx movq -0x510(%rbp), %rax movq (%rax), %rax movq %rcx, 0x40(%rax) movq -0x510(%rbp), %rdi callq 0x35420 cmpq $0x0, %rax je 0x315b6 movq -0x510(%rbp), %rdi callq 0x3f040 movq -0x510(%rbp), %rdi callq 0x602e0 movq -0x510(%rbp), %rax movq $-0x1, 0x338(%rax) movq -0x510(%rbp), %rax movq $0x0, 0x2e0(%rax) movb $0x0, -0x501(%rbp) movb -0x501(%rbp), %al movb %al, -0x541(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x3161a movb -0x541(%rbp), %al addq $0x560, %rsp # imm = 0x560 popq %rbp retq callq 0x144c0 nop
mariadb_reconnect: push rbp mov rbp, rsp sub rsp, 560h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_510], rdi mov [rbp+var_530], 0 mov rax, [rbp+var_510] mov rax, [rax+4C8h] mov [rbp+var_538], rax mov rax, [rbp+var_510] cmp qword ptr [rax+4F0h], 0 jz short loc_31144 mov rax, [rbp+var_510] mov rax, [rax+4F0h] cmp qword ptr [rax], 0 jz short loc_31144 mov rax, [rbp+var_510] mov rax, [rax+4F0h] mov rax, [rax] cmp qword ptr [rax], 0 jz short loc_31142 mov rax, [rbp+var_510] mov rax, [rax+4F0h] mov rax, [rax] mov rax, [rax] cmp qword ptr [rax+78h], 0 jz short loc_31142 mov rax, [rbp+var_510] mov rax, [rax+4F0h] mov rax, [rax] mov rax, [rax] mov rax, [rax+78h] mov rdi, [rbp+var_510] call rax mov [rbp+var_501], al jmp loc_315ED loc_31142: jmp short $+2 loc_31144: mov rax, [rbp+var_510] cmp byte ptr [rax+43Bh], 0 jz short loc_3117A mov rax, [rbp+var_510] mov eax, [rax+380h] and eax, 1 cmp eax, 0 jnz short loc_3117A mov rax, [rbp+var_510] cmp qword ptr [rax+2D8h], 0 jnz short loc_311BD loc_3117A: mov rax, [rbp+var_510] mov ecx, [rax+380h] and ecx, 0FFFFFFFEh mov [rax+380h], ecx mov rdi, [rbp+var_510] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov esi, 7D6h xor eax, eax mov ecx, eax mov al, 0 call my_set_error mov [rbp+var_501], 1 jmp loc_315ED loc_311BD: lea rdi, [rbp+var_500] call mysql_init mov [rbp+var_74], 0 lea rdi, [rbp+var_500] add rdi, 390h mov rsi, [rbp+var_510] add rsi, 390h mov edx, 0F8h call _memcpy mov rax, [rbp+var_510] mov rax, [rax+4F0h] cmp qword ptr [rax], 0 jz short loc_31234 mov rax, [rbp+var_510] mov rax, [rax+4F0h] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_510] mov rax, [rax+4F0h] mov qword ptr [rax], 0 loc_31234: mov [rbp+var_120], 0 mov [rbp+var_118], 0 mov rax, [rbp+var_510] cmp qword ptr [rax+480h], 0 jz loc_312EF mov rax, [rbp+var_510] mov rax, [rax+480h] cmp qword ptr [rax+28h], 0 jz short loc_312EF mov rax, [rbp+var_510] mov rax, [rax+480h] mov rax, [rax+28h] movsx eax, byte ptr [rax+14h] cmp eax, 0 jz short loc_312EF mov rax, [rbp+var_510] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_530], rax mov rax, [rbp+var_510] mov [rbp+var_528], rax lea rax, [rbp+var_500] mov [rbp+var_520], rax mov rax, [rbp+var_510] mov rax, [rax] mov [rbp+var_518], rax mov rdi, [rbp+var_530] lea rsi, my_suspend_hook lea rdx, [rbp+var_528] call my_context_install_suspend_resume_hook loc_312EF: mov rax, [rbp+var_510] mov rsi, [rax+2B0h] mov rax, [rbp+var_510] mov rdx, [rax+2B8h] mov rax, [rbp+var_510] mov rcx, [rax+2C0h] mov rax, [rbp+var_510] mov r8, [rax+2E8h] mov rax, [rbp+var_510] mov r9d, [rax+360h] mov rax, [rbp+var_510] mov r10, [rax+2C8h] mov rdi, [rbp+var_510] mov rax, 80000000h or rax, [rdi+368h] lea rdi, [rbp+var_500] mov [rsp+560h+var_560], r10 mov [rsp+560h+var_558], rax call mysql_real_connect cmp rax, 0 jz short loc_31399 mov rax, [rbp+var_510] mov rax, [rax+2F0h] mov rsi, [rax+8] lea rdi, [rbp+var_500] call mysql_set_character_set cmp eax, 0 jz short loc_31418 loc_31399: cmp [rbp+var_530], 0 jz short loc_313B6 mov rdi, [rbp+var_530] xor eax, eax mov edx, eax mov rsi, rdx call my_context_install_suspend_resume_hook loc_313B6: lea rdi, [rbp+var_500] add rdi, 390h xor esi, esi mov edx, 0F8h call _memset mov rdi, [rbp+var_510] mov esi, [rbp+var_470] lea rdx, [rbp+var_500] add rdx, 297h lea rcx, [rbp+var_500] add rcx, 97h mov al, 0 call my_set_error lea rdi, [rbp+var_500] call mysql_close mov [rbp+var_501], 1 jmp loc_315ED loc_31418: jmp short $+2 loc_3141A: cmp [rbp+var_538], 0 jz loc_314E6 mov rax, [rbp+var_538] mov rax, [rax+10h] mov [rbp+var_540], rax mov rax, [rbp+var_540] cmp dword ptr [rax+50h], 0 jz loc_314CD mov rax, [rbp+var_540] mov dword ptr [rax+50h], 0 mov rax, [rbp+var_540] mov dword ptr [rax+108h], 7DDh mov rdi, [rbp+var_540] add rdi, 30Dh lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_540] mov byte ptr [rax+312h], 0 mov rdi, [rbp+var_540] add rdi, 10Ch lea rax, client_errors mov rsi, [rax+68h] mov edx, 200h call _strncpy mov rax, [rbp+var_540] mov byte ptr [rax+30Bh], 0 jmp short $+2 loc_314CD: jmp short $+2 loc_314CF: mov rax, [rbp+var_538] mov rax, [rax+8] mov [rbp+var_538], rax jmp loc_3141A loc_314E6: mov rax, [rbp+var_510] mov al, [rax+48Ch] mov [rbp+var_74], al mov rax, [rbp+var_510] mov rax, [rax+4C8h] mov [rbp+var_38], rax mov rax, [rbp+var_510] mov qword ptr [rax+4C8h], 0 cmp [rbp+var_530], 0 jz short loc_31537 mov rdi, [rbp+var_530] xor eax, eax mov edx, eax mov rsi, rdx call my_context_install_suspend_resume_hook loc_31537: mov rdi, [rbp+var_510] add rdi, 390h xor esi, esi mov edx, 0F8h call _memset mov rax, [rbp+var_510] mov byte ptr [rax+48Ch], 0 mov rdi, [rbp+var_510] call mysql_close mov rdi, [rbp+var_510] lea rsi, [rbp+var_500] mov edx, 4F8h call _memcpy mov rcx, [rbp+var_510] mov rax, [rbp+var_510] mov rax, [rax] mov [rax+40h], rcx mov rdi, [rbp+var_510] call mysql_get_ssl_cipher cmp rax, 0 jz short loc_315B6 mov rdi, [rbp+var_510] call ma_pvio_tls_set_connection loc_315B6: mov rdi, [rbp+var_510] call ma_net_clear mov rax, [rbp+var_510] mov qword ptr [rax+338h], 0FFFFFFFFFFFFFFFFh mov rax, [rbp+var_510] mov qword ptr [rax+2E0h], 0 mov [rbp+var_501], 0 loc_315ED: mov al, [rbp+var_501] mov [rbp+var_541], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_3161A mov al, [rbp+var_541] add rsp, 560h pop rbp retn loc_3161A: call ___stack_chk_fail
char mariadb_reconnect(long long a1) { long long v2; // [rsp+20h] [rbp-540h] long long v3; // [rsp+28h] [rbp-538h] long long v4; // [rsp+30h] [rbp-530h] _QWORD v5[3]; // [rsp+38h] [rbp-528h] BYREF long long v6; // [rsp+50h] [rbp-510h] _BYTE v8[144]; // [rsp+60h] [rbp-500h] BYREF unsigned int v9; // [rsp+F0h] [rbp-470h] char v10; // [rsp+F7h] [rbp-469h] BYREF char v11; // [rsp+2F7h] [rbp-269h] BYREF _QWORD v12[31]; // [rsp+3F0h] [rbp-170h] BYREF char v13; // [rsp+4ECh] [rbp-74h] long long v14; // [rsp+528h] [rbp-38h] _QWORD *v15; // [rsp+550h] [rbp-10h] unsigned long long v16; // [rsp+558h] [rbp-8h] v16 = __readfsqword(0x28u); v6 = a1; v4 = 0LL; v3 = *(_QWORD *)(a1 + 1224); if ( *(_QWORD *)(a1 + 1264) && **(_QWORD **)(v6 + 1264) && ***(_QWORD ***)(v6 + 1264) && *(_QWORD *)(***(_QWORD ***)(v6 + 1264) + 120LL) ) { return (*(long long ( **)(long long))(***(_QWORD ***)(v6 + 1264) + 120LL))(v6); } if ( *(_BYTE *)(v6 + 1083) && (*(_DWORD *)(v6 + 896) & 1) == 0 && *(_QWORD *)(v6 + 728) ) { mysql_init(v8); v13 = 0; memcpy(v12, v6 + 912, sizeof(v12)); if ( **(_QWORD **)(v6 + 1264) ) { *v15 = **(_QWORD **)(v6 + 1264); **(_QWORD **)(v6 + 1264) = 0LL; } v12[10] = 0LL; v12[11] = 0LL; if ( *(_QWORD *)(v6 + 1152) && *(_QWORD *)(*(_QWORD *)(v6 + 1152) + 40LL) && *(_BYTE *)(*(_QWORD *)(*(_QWORD *)(v6 + 1152) + 40LL) + 20LL) ) { v4 = *(_QWORD *)(*(_QWORD *)(v6 + 1152) + 40LL); v5[0] = v6; v5[1] = v8; v5[2] = *(_QWORD *)v6; my_context_install_suspend_resume_hook(v4, my_suspend_hook, v5); } if ( mysql_real_connect( (unsigned int)v8, *(_QWORD *)(v6 + 688), *(_QWORD *)(v6 + 696), *(_QWORD *)(v6 + 704), *(_QWORD *)(v6 + 744), *(_DWORD *)(v6 + 864), *(_QWORD *)(v6 + 712), *(_QWORD *)(v6 + 872) | 0x80000000LL) && !(unsigned int)mysql_set_character_set(v8, *(_QWORD *)(*(_QWORD *)(v6 + 752) + 8LL)) ) { while ( v3 ) { v2 = *(_QWORD *)(v3 + 16); if ( *(_DWORD *)(v2 + 80) ) { *(_DWORD *)(v2 + 80) = 0; *(_DWORD *)(v2 + 264) = 2013; strncpy(v2 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(v2 + 786) = 0; strncpy(v2 + 268, client_errors[13], 512LL); *(_BYTE *)(v2 + 779) = 0; } v3 = *(_QWORD *)(v3 + 8); } v13 = *(_BYTE *)(v6 + 1164); v14 = *(_QWORD *)(v6 + 1224); *(_QWORD *)(v6 + 1224) = 0LL; if ( v4 ) my_context_install_suspend_resume_hook(v4, 0LL, 0LL); memset(v6 + 912, 0LL, 248LL); *(_BYTE *)(v6 + 1164) = 0; mysql_close(v6); memcpy(v6, v8, 1272LL); *(_QWORD *)(*(_QWORD *)v6 + 64LL) = v6; if ( mysql_get_ssl_cipher(v6) ) ma_pvio_tls_set_connection(v6); ma_net_clear(v6); *(_QWORD *)(v6 + 824) = -1LL; *(_QWORD *)(v6 + 736) = 0LL; return 0; } else { if ( v4 ) my_context_install_suspend_resume_hook(v4, 0LL, 0LL); memset(v12, 0LL, sizeof(v12)); my_set_error(v6, v9, (long long)&v11, (long long)&v10); mysql_close(v8); return 1; } } else { *(_DWORD *)(v6 + 896) &= ~1u; my_set_error(v6, 0x7D6u, (long long)SQLSTATE_UNKNOWN, 0LL); return 1; } }
mariadb_reconnect: PUSH RBP MOV RBP,RSP SUB RSP,0x560 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x510],RDI MOV qword ptr [RBP + -0x530],0x0 MOV RAX,qword ptr [RBP + -0x510] MOV RAX,qword ptr [RAX + 0x4c8] MOV qword ptr [RBP + -0x538],RAX MOV RAX,qword ptr [RBP + -0x510] CMP qword ptr [RAX + 0x4f0],0x0 JZ 0x00131144 MOV RAX,qword ptr [RBP + -0x510] MOV RAX,qword ptr [RAX + 0x4f0] CMP qword ptr [RAX],0x0 JZ 0x00131144 MOV RAX,qword ptr [RBP + -0x510] MOV RAX,qword ptr [RAX + 0x4f0] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX],0x0 JZ 0x00131142 MOV RAX,qword ptr [RBP + -0x510] MOV RAX,qword ptr [RAX + 0x4f0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x78],0x0 JZ 0x00131142 MOV RAX,qword ptr [RBP + -0x510] MOV RAX,qword ptr [RAX + 0x4f0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x78] MOV RDI,qword ptr [RBP + -0x510] CALL RAX MOV byte ptr [RBP + -0x501],AL JMP 0x001315ed LAB_00131142: JMP 0x00131144 LAB_00131144: MOV RAX,qword ptr [RBP + -0x510] CMP byte ptr [RAX + 0x43b],0x0 JZ 0x0013117a MOV RAX,qword ptr [RBP + -0x510] MOV EAX,dword ptr [RAX + 0x380] AND EAX,0x1 CMP EAX,0x0 JNZ 0x0013117a MOV RAX,qword ptr [RBP + -0x510] CMP qword ptr [RAX + 0x2d8],0x0 JNZ 0x001311bd LAB_0013117a: MOV RAX,qword ptr [RBP + -0x510] MOV ECX,dword ptr [RAX + 0x380] AND ECX,0xfffffffe MOV dword ptr [RAX + 0x380],ECX MOV RDI,qword ptr [RBP + -0x510] LEA RAX,[0x180ea0] MOV RDX,qword ptr [RAX] MOV ESI,0x7d6 XOR EAX,EAX MOV ECX,EAX MOV AL,0x0 CALL 0x001307d0 MOV byte ptr [RBP + -0x501],0x1 JMP 0x001315ed LAB_001311bd: LEA RDI,[RBP + -0x500] CALL 0x00135120 MOV byte ptr [RBP + -0x74],0x0 LEA RDI,[RBP + -0x500] ADD RDI,0x390 MOV RSI,qword ptr [RBP + -0x510] ADD RSI,0x390 MOV EDX,0xf8 CALL 0x00114370 MOV RAX,qword ptr [RBP + -0x510] MOV RAX,qword ptr [RAX + 0x4f0] CMP qword ptr [RAX],0x0 JZ 0x00131234 MOV RAX,qword ptr [RBP + -0x510] MOV RAX,qword ptr [RAX + 0x4f0] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x510] MOV RAX,qword ptr [RAX + 0x4f0] MOV qword ptr [RAX],0x0 LAB_00131234: MOV qword ptr [RBP + -0x120],0x0 MOV qword ptr [RBP + -0x118],0x0 MOV RAX,qword ptr [RBP + -0x510] CMP qword ptr [RAX + 0x480],0x0 JZ 0x001312ef MOV RAX,qword ptr [RBP + -0x510] MOV RAX,qword ptr [RAX + 0x480] CMP qword ptr [RAX + 0x28],0x0 JZ 0x001312ef MOV RAX,qword ptr [RBP + -0x510] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOVSX EAX,byte ptr [RAX + 0x14] CMP EAX,0x0 JZ 0x001312ef MOV RAX,qword ptr [RBP + -0x510] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x530],RAX MOV RAX,qword ptr [RBP + -0x510] MOV qword ptr [RBP + -0x528],RAX LEA RAX,[RBP + -0x500] MOV qword ptr [RBP + -0x520],RAX MOV RAX,qword ptr [RBP + -0x510] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x518],RAX MOV RDI,qword ptr [RBP + -0x530] LEA RSI,[0x138070] LEA RDX,[RBP + -0x528] CALL 0x001522f0 LAB_001312ef: MOV RAX,qword ptr [RBP + -0x510] MOV RSI,qword ptr [RAX + 0x2b0] MOV RAX,qword ptr [RBP + -0x510] MOV RDX,qword ptr [RAX + 0x2b8] MOV RAX,qword ptr [RBP + -0x510] MOV RCX,qword ptr [RAX + 0x2c0] MOV RAX,qword ptr [RBP + -0x510] MOV R8,qword ptr [RAX + 0x2e8] MOV RAX,qword ptr [RBP + -0x510] MOV R9D,dword ptr [RAX + 0x360] MOV RAX,qword ptr [RBP + -0x510] MOV R10,qword ptr [RAX + 0x2c8] MOV RDI,qword ptr [RBP + -0x510] MOV RAX,0x80000000 OR RAX,qword ptr [RDI + 0x368] LEA RDI,[RBP + -0x500] MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX CALL 0x001355f0 CMP RAX,0x0 JZ 0x00131399 MOV RAX,qword ptr [RBP + -0x510] MOV RAX,qword ptr [RAX + 0x2f0] MOV RSI,qword ptr [RAX + 0x8] LEA RDI,[RBP + -0x500] CALL 0x001380d0 CMP EAX,0x0 JZ 0x00131418 LAB_00131399: CMP qword ptr [RBP + -0x530],0x0 JZ 0x001313b6 MOV RDI,qword ptr [RBP + -0x530] XOR EAX,EAX MOV EDX,EAX MOV RSI,RDX CALL 0x001522f0 LAB_001313b6: LEA RDI,[RBP + -0x500] ADD RDI,0x390 XOR ESI,ESI MOV EDX,0xf8 CALL 0x00114260 MOV RDI,qword ptr [RBP + -0x510] MOV ESI,dword ptr [RBP + -0x470] LEA RDX,[RBP + -0x500] ADD RDX,0x297 LEA RCX,[RBP + -0x500] ADD RCX,0x97 MOV AL,0x0 CALL 0x001307d0 LEA RDI,[RBP + -0x500] CALL 0x001381f0 MOV byte ptr [RBP + -0x501],0x1 JMP 0x001315ed LAB_00131418: JMP 0x0013141a LAB_0013141a: CMP qword ptr [RBP + -0x538],0x0 JZ 0x001314e6 MOV RAX,qword ptr [RBP + -0x538] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x540],RAX MOV RAX,qword ptr [RBP + -0x540] CMP dword ptr [RAX + 0x50],0x0 JZ 0x001314cd MOV RAX,qword ptr [RBP + -0x540] MOV dword ptr [RAX + 0x50],0x0 MOV RAX,qword ptr [RBP + -0x540] MOV dword ptr [RAX + 0x108],0x7dd MOV RDI,qword ptr [RBP + -0x540] ADD RDI,0x30d LEA RAX,[0x180ea0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00114220 MOV RAX,qword ptr [RBP + -0x540] MOV byte ptr [RAX + 0x312],0x0 MOV RDI,qword ptr [RBP + -0x540] ADD RDI,0x10c LEA RAX,[0x180eb0] MOV RSI,qword ptr [RAX + 0x68] MOV EDX,0x200 CALL 0x00114220 MOV RAX,qword ptr [RBP + -0x540] MOV byte ptr [RAX + 0x30b],0x0 JMP 0x001314cd LAB_001314cd: JMP 0x001314cf LAB_001314cf: MOV RAX,qword ptr [RBP + -0x538] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x538],RAX JMP 0x0013141a LAB_001314e6: MOV RAX,qword ptr [RBP + -0x510] MOV AL,byte ptr [RAX + 0x48c] MOV byte ptr [RBP + -0x74],AL MOV RAX,qword ptr [RBP + -0x510] MOV RAX,qword ptr [RAX + 0x4c8] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x510] MOV qword ptr [RAX + 0x4c8],0x0 CMP qword ptr [RBP + -0x530],0x0 JZ 0x00131537 MOV RDI,qword ptr [RBP + -0x530] XOR EAX,EAX MOV EDX,EAX MOV RSI,RDX CALL 0x001522f0 LAB_00131537: MOV RDI,qword ptr [RBP + -0x510] ADD RDI,0x390 XOR ESI,ESI MOV EDX,0xf8 CALL 0x00114260 MOV RAX,qword ptr [RBP + -0x510] MOV byte ptr [RAX + 0x48c],0x0 MOV RDI,qword ptr [RBP + -0x510] CALL 0x001381f0 MOV RDI,qword ptr [RBP + -0x510] LEA RSI,[RBP + -0x500] MOV EDX,0x4f8 CALL 0x00114370 MOV RCX,qword ptr [RBP + -0x510] MOV RAX,qword ptr [RBP + -0x510] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x40],RCX MOV RDI,qword ptr [RBP + -0x510] CALL 0x00135420 CMP RAX,0x0 JZ 0x001315b6 MOV RDI,qword ptr [RBP + -0x510] CALL 0x0013f040 LAB_001315b6: MOV RDI,qword ptr [RBP + -0x510] CALL 0x001602e0 MOV RAX,qword ptr [RBP + -0x510] MOV qword ptr [RAX + 0x338],-0x1 MOV RAX,qword ptr [RBP + -0x510] MOV qword ptr [RAX + 0x2e0],0x0 MOV byte ptr [RBP + -0x501],0x0 LAB_001315ed: MOV AL,byte ptr [RBP + -0x501] MOV byte ptr [RBP + -0x541],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0013161a MOV AL,byte ptr [RBP + -0x541] ADD RSP,0x560 POP RBP RET LAB_0013161a: CALL 0x001144c0
int8 mariadb_reconnect(long *param_1) { int iVar1; long lVar2; long in_FS_OFFSET; long local_540; long local_538; long *local_530; int1 *local_528; long local_520; long *local_518; int1 local_509; int1 local_508 [144]; int4 local_478; int1 auStack_471 [512]; int1 auStack_271 [249]; int1 auStack_178 [80]; int8 local_128; int8 local_120; int1 local_7c; long local_40; int8 *local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_538 = 0; local_540 = param_1[0x99]; local_518 = param_1; if ((((param_1[0x9e] == 0) || (*(long *)param_1[0x9e] == 0)) || (**(long **)param_1[0x9e] == 0)) || (*(long *)(**(long **)param_1[0x9e] + 0x78) == 0)) { if (((*(char *)((long)param_1 + 0x43b) == '\0') || ((*(uint *)(param_1 + 0x70) & 1) != 0)) || (param_1[0x5b] == 0)) { *(uint *)(param_1 + 0x70) = *(uint *)(param_1 + 0x70) & 0xfffffffe; my_set_error(param_1,0x7d6,SQLSTATE_UNKNOWN,0); local_509 = 1; } else { mysql_init(local_508); local_7c = 0; memcpy(auStack_178,local_518 + 0x72,0xf8); if (*(long *)local_518[0x9e] != 0) { *local_18 = *(int8 *)local_518[0x9e]; *(int8 *)local_518[0x9e] = 0; } local_128 = 0; local_120 = 0; if (((local_518[0x90] != 0) && (*(long *)(local_518[0x90] + 0x28) != 0)) && (*(char *)(*(long *)(local_518[0x90] + 0x28) + 0x14) != '\0')) { local_538 = *(long *)(local_518[0x90] + 0x28); local_530 = local_518; local_528 = local_508; local_520 = *local_518; my_context_install_suspend_resume_hook(local_538,my_suspend_hook,&local_530); } lVar2 = mysql_real_connect(local_508,local_518[0x56],local_518[0x57],local_518[0x58], local_518[0x5d],(int)local_518[0x6c],local_518[0x59], local_518[0x6d] | 0x80000000); if ((lVar2 == 0) || (iVar1 = mysql_set_character_set(local_508), iVar1 != 0)) { if (local_538 != 0) { my_context_install_suspend_resume_hook(local_538); } memset(auStack_178,0,0xf8); my_set_error(local_518,local_478,auStack_271,auStack_471); mysql_close(local_508); local_509 = 1; } else { for (; local_540 != 0; local_540 = *(long *)(local_540 + 8)) { lVar2 = *(long *)(local_540 + 0x10); if (*(int *)(lVar2 + 0x50) != 0) { *(int4 *)(lVar2 + 0x50) = 0; *(int4 *)(lVar2 + 0x108) = 0x7dd; strncpy((char *)(lVar2 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(lVar2 + 0x312) = 0; strncpy((char *)(lVar2 + 0x10c),PTR_s_Lost_connection_to_server_during_00180f18,0x200); *(int1 *)(lVar2 + 0x30b) = 0; } } local_7c = *(int1 *)((long)local_518 + 0x48c); local_40 = local_518[0x99]; local_518[0x99] = 0; if (local_538 != 0) { my_context_install_suspend_resume_hook(local_538); } memset(local_518 + 0x72,0,0xf8); *(int1 *)((long)local_518 + 0x48c) = 0; mysql_close(local_518); memcpy(local_518,local_508,0x4f8); *(long **)(*local_518 + 0x40) = local_518; lVar2 = mysql_get_ssl_cipher(local_518); if (lVar2 != 0) { ma_pvio_tls_set_connection(local_518); } ma_net_clear(local_518); local_518[0x67] = -1; local_518[0x5c] = 0; local_509 = 0; } } } else { local_509 = (**(code **)(**(long **)param_1[0x9e] + 0x78))(param_1); } 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_509); }
13,627
mariadb_reconnect
eloqsql/libmariadb/libmariadb/mariadb_lib.c
my_bool STDCALL mariadb_reconnect(MYSQL *mysql) { MYSQL tmp_mysql; struct my_hook_data hook_data; struct mysql_async_context *ctxt= NULL; LIST *li_stmt= mysql->stmts; /* check if connection handler is active */ if (IS_CONNHDLR_ACTIVE(mysql)) { if (mysql->extension->conn_hdlr->plugin && mysql->extension->conn_hdlr->plugin->reconnect) return(mysql->extension->conn_hdlr->plugin->reconnect(mysql)); } if (!mysql->options.reconnect || (mysql->server_status & SERVER_STATUS_IN_TRANS) || !mysql->host_info) { /* Allow reconnect next time */ mysql->server_status&= ~SERVER_STATUS_IN_TRANS; my_set_error(mysql, CR_SERVER_GONE_ERROR, SQLSTATE_UNKNOWN, 0); return(1); } mysql_init(&tmp_mysql); tmp_mysql.free_me= 0; tmp_mysql.options=mysql->options; if (mysql->extension->conn_hdlr) { tmp_mysql.extension->conn_hdlr= mysql->extension->conn_hdlr; mysql->extension->conn_hdlr= 0; } /* don't reread options from configuration files */ tmp_mysql.options.my_cnf_group= tmp_mysql.options.my_cnf_file= NULL; if (IS_MYSQL_ASYNC_ACTIVE(mysql)) { ctxt= mysql->options.extension->async_context; hook_data.orig_mysql= mysql; hook_data.new_mysql= &tmp_mysql; hook_data.orig_pvio= mysql->net.pvio; my_context_install_suspend_resume_hook(ctxt, my_suspend_hook, &hook_data); } if (!mysql_real_connect(&tmp_mysql,mysql->host,mysql->user,mysql->passwd, mysql->db, mysql->port, mysql->unix_socket, mysql->client_flag | CLIENT_REMEMBER_OPTIONS) || mysql_set_character_set(&tmp_mysql, mysql->charset->csname)) { if (ctxt) my_context_install_suspend_resume_hook(ctxt, NULL, NULL); /* don't free options (CONC-118) */ memset(&tmp_mysql.options, 0, sizeof(struct st_mysql_options)); my_set_error(mysql, tmp_mysql.net.last_errno, tmp_mysql.net.sqlstate, tmp_mysql.net.last_error); mysql_close(&tmp_mysql); return(1); } for (;li_stmt;li_stmt= li_stmt->next) { MYSQL_STMT *stmt= (MYSQL_STMT *)li_stmt->data; if (stmt->state != MYSQL_STMT_INITTED) { stmt->state= MYSQL_STMT_INITTED; SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); } } tmp_mysql.free_me= mysql->free_me; tmp_mysql.stmts= mysql->stmts; mysql->stmts= NULL; if (ctxt) my_context_install_suspend_resume_hook(ctxt, NULL, NULL); /* Don't free options, we moved them to tmp_mysql */ memset(&mysql->options, 0, sizeof(mysql->options)); mysql->free_me=0; mysql_close(mysql); *mysql=tmp_mysql; mysql->net.pvio->mysql= mysql; #ifdef HAVE_TLS /* CONC-604: Set new connection handle */ if (mysql_get_ssl_cipher(mysql)) ma_pvio_tls_set_connection(mysql); #endif ma_net_clear(&mysql->net); mysql->affected_rows= ~(unsigned long long) 0; mysql->info= 0; return(0); }
O3
c
mariadb_reconnect: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x528, %rsp # imm = 0x528 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq 0x4c8(%rdi), %r14 movq 0x4f0(%rdi), %rax testq %rax, %rax je 0x273f9 movq (%rax), %rax testq %rax, %rax je 0x273f9 movq (%rax), %rax testq %rax, %rax je 0x273f9 movq 0x78(%rax), %rax testq %rax, %rax je 0x273f9 movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x27712 movq %rbx, %rdi addq $0x528, %rsp # imm = 0x528 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmpq *%rax cmpb $0x0, 0x43b(%rbx) setne %cl movl 0x380(%rbx), %eax testb $0x1, %al sete %dl andb %cl, %dl cmpb $0x1, %dl jne 0x274ca cmpq $0x0, 0x2d8(%rbx) je 0x274ca leaq 0x390(%rbx), %r15 leaq -0x528(%rbp), %r12 movq %r12, %rdi callq 0x29915 movb $0x0, 0x48c(%r12) leaq -0x198(%rbp), %rdi movl $0xf8, %edx movq %r15, %rsi callq 0x143a0 movq 0x4f0(%rbx), %rax movq (%rax), %rax testq %rax, %rax je 0x2747e movq -0x38(%rbp), %rcx movq %rax, (%rcx) movq 0x4f0(%rbx), %rax movq $0x0, (%rax) xorps %xmm0, %xmm0 movups %xmm0, -0x148(%rbp) movq 0x480(%rbx), %rax testq %rax, %rax je 0x274f3 movq 0x28(%rax), %r13 testq %r13, %r13 je 0x274f3 cmpb $0x0, 0x14(%r13) je 0x274f3 leaq -0x550(%rbp), %rdx movq %rbx, (%rdx) movq %r12, 0x8(%rdx) movq (%rbx), %rax movq %rax, 0x10(%rdx) leaq 0x408f(%rip), %rsi # 0x2b54f movq %r13, %rdi callq 0x3a0cc jmp 0x274f6 andl $-0x2, %eax movl %eax, 0x380(%rbx) leaq 0x3b516(%rip), %rax # 0x629f0 movq (%rax), %rdx movq %rbx, %rdi movl $0x7d6, %esi # imm = 0x7D6 xorl %ecx, %ecx xorl %eax, %eax callq 0x26e85 jmp 0x275aa xorl %r13d, %r13d movq 0x2b0(%rbx), %rsi movq 0x2b8(%rbx), %rdx movq 0x2c0(%rbx), %rcx movq 0x2e8(%rbx), %r8 movl 0x360(%rbx), %r9d movl $0x80000000, %eax # imm = 0x80000000 orq 0x368(%rbx), %rax leaq -0x528(%rbp), %rdi pushq %rax pushq 0x2c8(%rbx) callq 0x29c4e addq $0x10, %rsp testq %rax, %rax je 0x2755c movq 0x2f0(%rbx), %rax movq 0x8(%rax), %rsi leaq -0x528(%rbp), %rdi callq 0x2b577 testl %eax, %eax je 0x275d1 testq %r13, %r13 je 0x2756d movq %r13, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x3a0cc movl $0xf8, %edx leaq -0x198(%rbp), %rdi xorl %esi, %esi callq 0x14270 leaq -0x291(%rbp), %rdx movl -0x207(%rdx), %esi leaq -0x491(%rbp), %rcx movq %rbx, %rdi xorl %eax, %eax callq 0x26e85 leaq -0x528(%rbp), %rdi callq 0x2b66c movb $0x1, %al movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x27712 addq $0x528, %rsp # imm = 0x528 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r13, -0x530(%rbp) movq %r15, -0x538(%rbp) testq %r14, %r14 je 0x27656 leaq 0x3b405(%rip), %rax # 0x629f0 movq (%rax), %r12 xorl %r13d, %r13d movq 0x10(%r14), %r15 cmpl $0x0, 0x50(%r15) je 0x2764d movl $0x0, 0x50(%r15) movl $0x7dd, 0x108(%r15) # imm = 0x7DD leaq 0x30d(%r15), %rdi movl $0x5, %edx movq %r12, %rsi callq 0x14230 movb %r13b, 0x312(%r15) leaq 0x10c(%r15), %rdi leaq 0x3b3c8(%rip), %rax # 0x62a00 movq 0x68(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x14230 movb %r13b, 0x30b(%r15) movq 0x8(%r14), %r14 testq %r14, %r14 jne 0x275f1 movb 0x48c(%rbx), %al movb %al, -0x9c(%rbp) movq 0x4c8(%rbx), %rax movq %rax, -0x60(%rbp) movq $0x0, 0x4c8(%rbx) movq -0x530(%rbp), %rdi testq %rdi, %rdi je 0x2768d xorl %esi, %esi xorl %edx, %edx callq 0x3a0cc movl $0xf8, %edx movq -0x538(%rbp), %rdi xorl %esi, %esi callq 0x14270 movb $0x0, 0x48c(%rbx) movq %rbx, %rdi callq 0x2b66c leaq -0x528(%rbp), %rsi movl $0x4f8, %edx # imm = 0x4F8 movq %rbx, %rdi callq 0x143a0 movq (%rbx), %rax movq %rbx, 0x40(%rax) movq (%rbx), %rax testq %rax, %rax je 0x276ed movq 0x38(%rax), %rdi testq %rdi, %rdi je 0x276ed callq 0x2f0ee testq %rax, %rax je 0x276ed movq %rbx, %rdi callq 0x2f3aa movq %rbx, %rdi callq 0x42888 movq $-0x1, 0x338(%rbx) movq $0x0, 0x2e0(%rbx) xorl %eax, %eax jmp 0x275ac callq 0x14520
mariadb_reconnect: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 528h mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax mov r14, [rdi+4C8h] mov rax, [rdi+4F0h] test rax, rax jz short loc_273F9 mov rax, [rax] test rax, rax jz short loc_273F9 mov rax, [rax] test rax, rax jz short loc_273F9 mov rax, [rax+78h] test rax, rax jz short loc_273F9 mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz loc_27712 mov rdi, rbx add rsp, 528h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp rax loc_273F9: cmp byte ptr [rbx+43Bh], 0 setnz cl mov eax, [rbx+380h] test al, 1 setz dl and dl, cl cmp dl, 1 jnz loc_274CA cmp qword ptr [rbx+2D8h], 0 jz loc_274CA lea r15, [rbx+390h] lea r12, [rbp+var_528] mov rdi, r12 call mysql_init mov byte ptr [r12+48Ch], 0 lea rdi, [rbp+var_198] mov edx, 0F8h mov rsi, r15 call _memcpy mov rax, [rbx+4F0h] mov rax, [rax] test rax, rax jz short loc_2747E mov rcx, [rbp+var_38] mov [rcx], rax mov rax, [rbx+4F0h] mov qword ptr [rax], 0 loc_2747E: xorps xmm0, xmm0 movups [rbp+var_148], xmm0 mov rax, [rbx+480h] test rax, rax jz short loc_274F3 mov r13, [rax+28h] test r13, r13 jz short loc_274F3 cmp byte ptr [r13+14h], 0 jz short loc_274F3 lea rdx, [rbp+var_550] mov [rdx], rbx mov [rdx+8], r12 mov rax, [rbx] mov [rdx+10h], rax lea rsi, my_suspend_hook mov rdi, r13 call my_context_install_suspend_resume_hook jmp short loc_274F6 loc_274CA: and eax, 0FFFFFFFEh mov [rbx+380h], eax lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov rdi, rbx mov esi, 7D6h xor ecx, ecx xor eax, eax call my_set_error jmp loc_275AA loc_274F3: xor r13d, r13d loc_274F6: mov rsi, [rbx+2B0h] mov rdx, [rbx+2B8h] mov rcx, [rbx+2C0h] mov r8, [rbx+2E8h] mov r9d, [rbx+360h] mov eax, 80000000h or rax, [rbx+368h] lea rdi, [rbp+var_528] push rax push qword ptr [rbx+2C8h] call mysql_real_connect add rsp, 10h test rax, rax jz short loc_2755C mov rax, [rbx+2F0h] mov rsi, [rax+8] lea rdi, [rbp+var_528] call mysql_set_character_set test eax, eax jz short loc_275D1 loc_2755C: test r13, r13 jz short loc_2756D mov rdi, r13 xor esi, esi xor edx, edx call my_context_install_suspend_resume_hook loc_2756D: mov edx, 0F8h lea rdi, [rbp+var_198] xor esi, esi call _memset lea rdx, [rbp+var_291] mov esi, [rdx-207h] lea rcx, [rbp+var_491] mov rdi, rbx xor eax, eax call my_set_error lea rdi, [rbp+var_528] call mysql_close loc_275AA: mov al, 1 loc_275AC: mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz loc_27712 add rsp, 528h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_275D1: mov [rbp+var_530], r13 mov [rbp+var_538], r15 test r14, r14 jz short loc_27656 lea rax, SQLSTATE_UNKNOWN mov r12, [rax] xor r13d, r13d loc_275F1: mov r15, [r14+10h] cmp dword ptr [r15+50h], 0 jz short loc_2764D mov dword ptr [r15+50h], 0 mov dword ptr [r15+108h], 7DDh lea rdi, [r15+30Dh] mov edx, 5 mov rsi, r12 call _strncpy mov [r15+312h], r13b lea rdi, [r15+10Ch] lea rax, client_errors mov rsi, [rax+68h] mov edx, 200h call _strncpy mov [r15+30Bh], r13b loc_2764D: mov r14, [r14+8] test r14, r14 jnz short loc_275F1 loc_27656: mov al, [rbx+48Ch] mov [rbp+var_9C], al mov rax, [rbx+4C8h] mov [rbp+var_60], rax mov qword ptr [rbx+4C8h], 0 mov rdi, [rbp+var_530] test rdi, rdi jz short loc_2768D xor esi, esi xor edx, edx call my_context_install_suspend_resume_hook loc_2768D: mov edx, 0F8h mov rdi, [rbp+var_538] xor esi, esi call _memset mov byte ptr [rbx+48Ch], 0 mov rdi, rbx call mysql_close lea rsi, [rbp+var_528] mov edx, 4F8h mov rdi, rbx call _memcpy mov rax, [rbx] mov [rax+40h], rbx mov rax, [rbx] test rax, rax jz short loc_276ED mov rdi, [rax+38h] test rdi, rdi jz short loc_276ED call ma_pvio_tls_cipher test rax, rax jz short loc_276ED mov rdi, rbx call ma_pvio_tls_set_connection loc_276ED: mov rdi, rbx call ma_net_clear mov qword ptr [rbx+338h], 0FFFFFFFFFFFFFFFFh mov qword ptr [rbx+2E0h], 0 xor eax, eax jmp loc_275AC loc_27712: call ___stack_chk_fail
char mariadb_reconnect(_QWORD *a1, long long a2, long long a3) { long long v3; // r14 long long **v4; // rax long long *v5; // rax long long v6; // rax long long ( *v7)(_QWORD *, long long, long long, unsigned long long); // rax int v9; // eax long long v10; // rax long long v11; // rax long long v12; // r13 long long v13; // rcx long long v14; // r8 long long v15; // r9 char *v16; // r12 long long v17; // r15 _QWORD *v18; // [rsp+0h] [rbp-550h] _BYTE *v19; // [rsp+8h] [rbp-548h] long long v20; // [rsp+10h] [rbp-540h] _BYTE v21[144]; // [rsp+28h] [rbp-528h] BYREF int v22; // [rsp+B8h] [rbp-498h] char v23[512]; // [rsp+BFh] [rbp-491h] BYREF _BYTE v24[249]; // [rsp+2BFh] [rbp-291h] BYREF _BYTE v25[80]; // [rsp+3B8h] [rbp-198h] BYREF __int128 v26; // [rsp+408h] [rbp-148h] char v27; // [rsp+4B4h] [rbp-9Ch] long long v28; // [rsp+4F0h] [rbp-60h] _QWORD *v29; // [rsp+518h] [rbp-38h] unsigned long long v30; // [rsp+520h] [rbp-30h] v30 = __readfsqword(0x28u); v3 = a1[153]; v4 = (long long **)a1[158]; if ( v4 ) { v5 = *v4; if ( v5 ) { v6 = *v5; if ( v6 ) { v7 = *(long long ( **)(_QWORD *, long long, long long, unsigned long long))(v6 + 120); if ( v7 ) return v7(a1, a2, a3, __readfsqword(0x28u)); } } } v9 = *((_DWORD *)a1 + 224); if ( *((_BYTE *)a1 + 1083) == 0 || (v9 & 1) != 0 || !a1[91] ) { *((_DWORD *)a1 + 224) = v9 & 0xFFFFFFFE; my_set_error((long long)a1, 2006, (long long)SQLSTATE_UNKNOWN, 0LL); return 1; } mysql_init(v21); v27 = 0; memcpy(v25, a1 + 114, 248LL); v10 = *(_QWORD *)a1[158]; if ( v10 ) { *v29 = v10; *(_QWORD *)a1[158] = 0LL; } v26 = 0LL; v11 = a1[144]; if ( v11 && (v12 = *(_QWORD *)(v11 + 40)) != 0 && *(_BYTE *)(v12 + 20) ) { v18 = a1; v19 = v21; v20 = *a1; ((void ( *)(long long, long long ( *)()))my_context_install_suspend_resume_hook)( v12, my_suspend_hook); } else { v12 = 0LL; } if ( !mysql_real_connect( (unsigned int)v21, a1[86], a1[87], a1[88], a1[93], *((_DWORD *)a1 + 216), a1[89], a1[109] | 0x80000000LL) || (unsigned int)mysql_set_character_set(v21, *(_QWORD *)(a1[94] + 8LL)) ) { if ( v12 ) my_context_install_suspend_resume_hook(v12, 0LL, 0LL, v13, v14, v15, v18, v19, v20); memset(v25, 0LL, 248LL); my_set_error((long long)a1, v22, (long long)v24, v23); mysql_close(v21); return 1; } if ( v3 ) { v16 = SQLSTATE_UNKNOWN; do { v17 = *(_QWORD *)(v3 + 16); if ( *(_DWORD *)(v17 + 80) ) { *(_DWORD *)(v17 + 80) = 0; *(_DWORD *)(v17 + 264) = 2013; strncpy(v17 + 781, v16, 5LL); *(_BYTE *)(v17 + 786) = 0; strncpy(v17 + 268, client_errors[13], 512LL); *(_BYTE *)(v17 + 779) = 0; } v3 = *(_QWORD *)(v3 + 8); } while ( v3 ); } v27 = *((_BYTE *)a1 + 1164); v28 = a1[153]; a1[153] = 0LL; if ( v12 ) my_context_install_suspend_resume_hook(v12, 0LL, 0LL, v13, v14, v15, v18, v19, v20); memset(a1 + 114, 0LL, 248LL); *((_BYTE *)a1 + 1164) = 0; mysql_close(a1); memcpy(a1, v21, 1272LL); *(_QWORD *)(*a1 + 64LL) = a1; if ( *a1 && *(_QWORD *)(*a1 + 56LL) && ma_pvio_tls_cipher() ) ma_pvio_tls_set_connection(a1); ma_net_clear(a1); a1[103] = -1LL; a1[92] = 0LL; return 0; }
mariadb_reconnect: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x528 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R14,qword ptr [RDI + 0x4c8] MOV RAX,qword ptr [RDI + 0x4f0] TEST RAX,RAX JZ 0x001273f9 MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x001273f9 MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x001273f9 MOV RAX,qword ptr [RAX + 0x78] TEST RAX,RAX JZ 0x001273f9 MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x00127712 MOV RDI,RBX ADD RSP,0x528 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP RAX LAB_001273f9: CMP byte ptr [RBX + 0x43b],0x0 SETNZ CL MOV EAX,dword ptr [RBX + 0x380] TEST AL,0x1 SETZ DL AND DL,CL CMP DL,0x1 JNZ 0x001274ca CMP qword ptr [RBX + 0x2d8],0x0 JZ 0x001274ca LEA R15,[RBX + 0x390] LEA R12,[RBP + -0x528] MOV RDI,R12 CALL 0x00129915 MOV byte ptr [R12 + 0x48c],0x0 LEA RDI,[RBP + -0x198] MOV EDX,0xf8 MOV RSI,R15 CALL 0x001143a0 MOV RAX,qword ptr [RBX + 0x4f0] MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x0012747e MOV RCX,qword ptr [RBP + -0x38] MOV qword ptr [RCX],RAX MOV RAX,qword ptr [RBX + 0x4f0] MOV qword ptr [RAX],0x0 LAB_0012747e: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBP + -0x148],XMM0 MOV RAX,qword ptr [RBX + 0x480] TEST RAX,RAX JZ 0x001274f3 MOV R13,qword ptr [RAX + 0x28] TEST R13,R13 JZ 0x001274f3 CMP byte ptr [R13 + 0x14],0x0 JZ 0x001274f3 LEA RDX,[RBP + -0x550] MOV qword ptr [RDX],RBX MOV qword ptr [RDX + 0x8],R12 MOV RAX,qword ptr [RBX] MOV qword ptr [RDX + 0x10],RAX LEA RSI,[0x12b54f] MOV RDI,R13 CALL 0x0013a0cc JMP 0x001274f6 LAB_001274ca: AND EAX,0xfffffffe MOV dword ptr [RBX + 0x380],EAX LEA RAX,[0x1629f0] MOV RDX,qword ptr [RAX] MOV RDI,RBX MOV ESI,0x7d6 XOR ECX,ECX XOR EAX,EAX CALL 0x00126e85 JMP 0x001275aa LAB_001274f3: XOR R13D,R13D LAB_001274f6: MOV RSI,qword ptr [RBX + 0x2b0] MOV RDX,qword ptr [RBX + 0x2b8] MOV RCX,qword ptr [RBX + 0x2c0] MOV R8,qword ptr [RBX + 0x2e8] MOV R9D,dword ptr [RBX + 0x360] MOV EAX,0x80000000 OR RAX,qword ptr [RBX + 0x368] LEA RDI,[RBP + -0x528] PUSH RAX PUSH qword ptr [RBX + 0x2c8] CALL 0x00129c4e ADD RSP,0x10 TEST RAX,RAX JZ 0x0012755c MOV RAX,qword ptr [RBX + 0x2f0] MOV RSI,qword ptr [RAX + 0x8] LEA RDI,[RBP + -0x528] CALL 0x0012b577 TEST EAX,EAX JZ 0x001275d1 LAB_0012755c: TEST R13,R13 JZ 0x0012756d MOV RDI,R13 XOR ESI,ESI XOR EDX,EDX CALL 0x0013a0cc LAB_0012756d: MOV EDX,0xf8 LEA RDI,[RBP + -0x198] XOR ESI,ESI CALL 0x00114270 LEA RDX,[RBP + -0x291] MOV ESI,dword ptr [RDX + -0x207] LEA RCX,[RBP + -0x491] MOV RDI,RBX XOR EAX,EAX CALL 0x00126e85 LEA RDI,[RBP + -0x528] CALL 0x0012b66c LAB_001275aa: MOV AL,0x1 LAB_001275ac: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x00127712 ADD RSP,0x528 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001275d1: MOV qword ptr [RBP + -0x530],R13 MOV qword ptr [RBP + -0x538],R15 TEST R14,R14 JZ 0x00127656 LEA RAX,[0x1629f0] MOV R12,qword ptr [RAX] XOR R13D,R13D LAB_001275f1: MOV R15,qword ptr [R14 + 0x10] CMP dword ptr [R15 + 0x50],0x0 JZ 0x0012764d MOV dword ptr [R15 + 0x50],0x0 MOV dword ptr [R15 + 0x108],0x7dd LEA RDI,[R15 + 0x30d] MOV EDX,0x5 MOV RSI,R12 CALL 0x00114230 MOV byte ptr [R15 + 0x312],R13B LEA RDI,[R15 + 0x10c] LEA RAX,[0x162a00] MOV RSI,qword ptr [RAX + 0x68] MOV EDX,0x200 CALL 0x00114230 MOV byte ptr [R15 + 0x30b],R13B LAB_0012764d: MOV R14,qword ptr [R14 + 0x8] TEST R14,R14 JNZ 0x001275f1 LAB_00127656: MOV AL,byte ptr [RBX + 0x48c] MOV byte ptr [RBP + -0x9c],AL MOV RAX,qword ptr [RBX + 0x4c8] MOV qword ptr [RBP + -0x60],RAX MOV qword ptr [RBX + 0x4c8],0x0 MOV RDI,qword ptr [RBP + -0x530] TEST RDI,RDI JZ 0x0012768d XOR ESI,ESI XOR EDX,EDX CALL 0x0013a0cc LAB_0012768d: MOV EDX,0xf8 MOV RDI,qword ptr [RBP + -0x538] XOR ESI,ESI CALL 0x00114270 MOV byte ptr [RBX + 0x48c],0x0 MOV RDI,RBX CALL 0x0012b66c LEA RSI,[RBP + -0x528] MOV EDX,0x4f8 MOV RDI,RBX CALL 0x001143a0 MOV RAX,qword ptr [RBX] MOV qword ptr [RAX + 0x40],RBX MOV RAX,qword ptr [RBX] TEST RAX,RAX JZ 0x001276ed MOV RDI,qword ptr [RAX + 0x38] TEST RDI,RDI JZ 0x001276ed CALL 0x0012f0ee TEST RAX,RAX JZ 0x001276ed MOV RDI,RBX CALL 0x0012f3aa LAB_001276ed: MOV RDI,RBX CALL 0x00142888 MOV qword ptr [RBX + 0x338],-0x1 MOV qword ptr [RBX + 0x2e0],0x0 XOR EAX,EAX JMP 0x001275ac LAB_00127712: CALL 0x00114520
int8 mariadb_reconnect(long *param_1) { long *plVar1; code *UNRECOVERED_JUMPTABLE; int *__src; int iVar2; int8 uVar3; long lVar4; long lVar5; long lVar6; long in_FS_OFFSET; int1 local_530 [144]; int4 local_4a0; int1 local_499 [512]; int1 local_299 [249]; int1 local_1a0 [80]; int8 local_150; int8 uStack_148; int1 local_a4; long local_68; long *local_40; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); lVar5 = param_1[0x99]; if (((((long *)param_1[0x9e] != (long *)0x0) && (plVar1 = *(long **)param_1[0x9e], plVar1 != (long *)0x0)) && (lVar6 = *plVar1, lVar6 != 0)) && (UNRECOVERED_JUMPTABLE = *(code **)(lVar6 + 0x78), UNRECOVERED_JUMPTABLE != (code *)0x0)) { if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { /* WARNING: Could not recover jumptable at 0x001273f7. Too many branches */ /* WARNING: Treating indirect jump as call */ uVar3 = (*UNRECOVERED_JUMPTABLE)(param_1); return uVar3; } goto LAB_00127712; } if (((*(uint *)(param_1 + 0x70) & 1) == 0 && *(char *)((long)param_1 + 0x43b) != '\0') && (param_1[0x5b] != 0)) { mysql_init(local_530); local_a4 = 0; memcpy(local_1a0,param_1 + 0x72,0xf8); if (*(long *)param_1[0x9e] != 0) { *local_40 = *(long *)param_1[0x9e]; *(int8 *)param_1[0x9e] = 0; } local_150 = 0; uStack_148 = 0; if (((param_1[0x90] == 0) || (lVar6 = *(long *)(param_1[0x90] + 0x28), lVar6 == 0)) || (*(char *)(lVar6 + 0x14) == '\0')) { lVar6 = 0; } else { my_context_install_suspend_resume_hook(lVar6,my_suspend_hook); } lVar4 = mysql_real_connect(local_530,param_1[0x56],param_1[0x57],param_1[0x58],param_1[0x5d], (int)param_1[0x6c],param_1[0x59],param_1[0x6d] | 0x80000000); if ((lVar4 == 0) || (iVar2 = mysql_set_character_set(local_530), __src = SQLSTATE_UNKNOWN, iVar2 != 0)) { if (lVar6 != 0) { my_context_install_suspend_resume_hook(lVar6,0,0); } memset(local_1a0,0,0xf8); my_set_error(param_1,local_4a0,local_299,local_499); mysql_close(local_530); goto LAB_001275aa; } for (; lVar5 != 0; lVar5 = *(long *)(lVar5 + 8)) { lVar4 = *(long *)(lVar5 + 0x10); if (*(int *)(lVar4 + 0x50) != 0) { *(int4 *)(lVar4 + 0x50) = 0; *(int4 *)(lVar4 + 0x108) = 0x7dd; strncpy((char *)(lVar4 + 0x30d),__src,5); *(int1 *)(lVar4 + 0x312) = 0; strncpy((char *)(lVar4 + 0x10c),PTR_s_Lost_connection_to_server_during_00162a68,0x200); *(int1 *)(lVar4 + 0x30b) = 0; } } local_a4 = *(int1 *)((long)param_1 + 0x48c); local_68 = param_1[0x99]; param_1[0x99] = 0; if (lVar6 != 0) { my_context_install_suspend_resume_hook(lVar6,0,0); } memset(param_1 + 0x72,0,0xf8); *(int1 *)((long)param_1 + 0x48c) = 0; mysql_close(param_1); memcpy(param_1,local_530,0x4f8); *(long **)(*param_1 + 0x40) = param_1; if (((*param_1 != 0) && (*(long *)(*param_1 + 0x38) != 0)) && (lVar5 = ma_pvio_tls_cipher(), lVar5 != 0)) { ma_pvio_tls_set_connection(param_1); } ma_net_clear(param_1); param_1[0x67] = -1; param_1[0x5c] = 0; uVar3 = 0; } else { *(uint *)(param_1 + 0x70) = *(uint *)(param_1 + 0x70) & 0xfffffffe; my_set_error(param_1,0x7d6,SQLSTATE_UNKNOWN,0); LAB_001275aa: uVar3 = 1; } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar3; } LAB_00127712: /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
13,628
my_utf16le_uni
eloqsql/strings/ctype-ucs2.c
static int my_utf16le_uni(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { my_wc_t lo; if (s + 2 > e) return MY_CS_TOOSMALL2; if ((*pwc= uint2korr(s)) < MY_UTF16_SURROGATE_HIGH_FIRST || (*pwc > MY_UTF16_SURROGATE_LOW_LAST)) return 2; /* [0000-D7FF,E000-FFFF] */ if (*pwc >= MY_UTF16_SURROGATE_LOW_FIRST) return MY_CS_ILSEQ; /* [DC00-DFFF] Low surrogate part without high part */ if (s + 4 > e) return MY_CS_TOOSMALL4; s+= 2; if ((lo= uint2korr(s)) < MY_UTF16_SURROGATE_LOW_FIRST || lo > MY_UTF16_SURROGATE_LOW_LAST) return MY_CS_ILSEQ; /* Expected low surrogate part, got something else */ *pwc= 0x10000 + (((*pwc & 0x3FF) << 10) | (lo & 0x3FF)); return 4; }
O0
c
my_utf16le_uni: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x94fce movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x95090 movq -0x20(%rbp), %rax movzwl (%rax), %eax movq -0x18(%rbp), %rcx movq %rax, (%rcx) cmpq $0xd800, %rax # imm = 0xD800 jb 0x94ff1 movq -0x18(%rbp), %rax cmpq $0xdfff, (%rax) # imm = 0xDFFF jbe 0x94ffd movl $0x2, -0x4(%rbp) jmp 0x95090 movq -0x18(%rbp), %rax cmpq $0xdc00, (%rax) # imm = 0xDC00 jb 0x95013 movl $0x0, -0x4(%rbp) jmp 0x95090 movq -0x20(%rbp), %rax addq $0x4, %rax cmpq -0x28(%rbp), %rax jbe 0x9502a movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98 jmp 0x95090 movq -0x20(%rbp), %rax addq $0x2, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movzwl (%rax), %eax movq %rax, -0x30(%rbp) cmpq $0xdc00, %rax # imm = 0xDC00 jb 0x95053 cmpq $0xdfff, -0x30(%rbp) # imm = 0xDFFF jbe 0x9505c movl $0x0, -0x4(%rbp) jmp 0x95090 movq -0x18(%rbp), %rax movq (%rax), %rcx andq $0x3ff, %rcx # imm = 0x3FF shlq $0xa, %rcx movq -0x30(%rbp), %rax andq $0x3ff, %rax # imm = 0x3FF orq %rax, %rcx addq $0x10000, %rcx # imm = 0x10000 movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x4, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
my_utf16le_uni: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_94FCE mov [rbp+var_4], 0FFFFFF9Ah jmp loc_95090 loc_94FCE: mov rax, [rbp+var_20] movzx eax, word ptr [rax] mov rcx, [rbp+var_18] mov [rcx], rax cmp rax, 0D800h jb short loc_94FF1 mov rax, [rbp+var_18] cmp qword ptr [rax], 0DFFFh jbe short loc_94FFD loc_94FF1: mov [rbp+var_4], 2 jmp loc_95090 loc_94FFD: mov rax, [rbp+var_18] cmp qword ptr [rax], 0DC00h jb short loc_95013 mov [rbp+var_4], 0 jmp short loc_95090 loc_95013: mov rax, [rbp+var_20] add rax, 4 cmp rax, [rbp+var_28] jbe short loc_9502A mov [rbp+var_4], 0FFFFFF98h jmp short loc_95090 loc_9502A: mov rax, [rbp+var_20] add rax, 2 mov [rbp+var_20], rax mov rax, [rbp+var_20] movzx eax, word ptr [rax] mov [rbp+var_30], rax cmp rax, 0DC00h jb short loc_95053 cmp [rbp+var_30], 0DFFFh jbe short loc_9505C loc_95053: mov [rbp+var_4], 0 jmp short loc_95090 loc_9505C: mov rax, [rbp+var_18] mov rcx, [rax] and rcx, 3FFh shl rcx, 0Ah mov rax, [rbp+var_30] and rax, 3FFh or rcx, rax add rcx, 10000h mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 4 loc_95090: mov eax, [rbp+var_4] pop rbp retn
long long my_utf16le_uni(long long a1, unsigned long long *a2, unsigned __int16 *a3, unsigned long long a4) { unsigned long long v4; // rax unsigned long long v6; // [rsp+0h] [rbp-30h] if ( (unsigned long long)(a3 + 1) <= a4 ) { v4 = *a3; *a2 = v4; if ( v4 >= 0xD800 && *a2 <= 0xDFFF ) { if ( *a2 < 0xDC00 ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { v6 = a3[1]; if ( v6 >= 0xDC00 && v6 <= 0xDFFF ) { *a2 = (v6 & 0x3FF | ((*a2 & 0x3FF) << 10)) + 0x10000; return 4; } else { return 0; } } else { return (unsigned int)-104; } } else { return 0; } } else { return 2; } } else { return (unsigned int)-102; } }
my_utf16le_uni: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x00194fce MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00195090 LAB_00194fce: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RCX],RAX CMP RAX,0xd800 JC 0x00194ff1 MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX],0xdfff JBE 0x00194ffd LAB_00194ff1: MOV dword ptr [RBP + -0x4],0x2 JMP 0x00195090 LAB_00194ffd: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX],0xdc00 JC 0x00195013 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00195090 LAB_00195013: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x4 CMP RAX,qword ptr [RBP + -0x28] JBE 0x0019502a MOV dword ptr [RBP + -0x4],0xffffff98 JMP 0x00195090 LAB_0019502a: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX] MOV qword ptr [RBP + -0x30],RAX CMP RAX,0xdc00 JC 0x00195053 CMP qword ptr [RBP + -0x30],0xdfff JBE 0x0019505c LAB_00195053: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00195090 LAB_0019505c: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX] AND RCX,0x3ff SHL RCX,0xa MOV RAX,qword ptr [RBP + -0x30] AND RAX,0x3ff OR RCX,RAX ADD RCX,0x10000 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x4 LAB_00195090: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_utf16le_uni(int8 param_1,ulong *param_2,ushort *param_3,ushort *param_4) { ushort uVar1; ulong uVar2; int4 local_c; if (param_4 < param_3 + 1) { local_c = 0xffffff9a; } else { uVar1 = *param_3; *param_2 = (ulong)uVar1; if (((ulong)uVar1 < 0xd800) || (0xdfff < *param_2)) { local_c = 2; } else if (*param_2 < 0xdc00) { if (param_4 < param_3 + 2) { local_c = 0xffffff98; } else { uVar2 = (ulong)param_3[1]; if ((uVar2 < 0xdc00) || (0xdfff < uVar2)) { local_c = 0; } else { *param_2 = ((*param_2 & 0x3ff) << 10 | uVar2 & 0x3ff) + 0x10000; local_c = 4; } } } else { local_c = 0; } } return local_c; }
13,629
mariadb_compress_alloc
eloqsql/libmariadb/libmariadb/ma_compress.c
unsigned char *_mariadb_compress_alloc(NET *net, const unsigned char *packet, size_t *len, size_t *complen) { unsigned char *compbuf; *complen = *len * 120 / 100 + 12; if (!(compbuf = (unsigned char *) malloc(*complen))) return 0; /* Not enough memory */ if (compression_plugin(net)->compress(compression_ctx(net), (void *)compbuf, complen, (void *)packet, *len)) { free(compbuf); return 0; } if (*complen >= *len) { *complen=0; free(compbuf); return 0; } swap(size_t,*len,*complen); /* *len is now packet length */ return compbuf; }
O0
c
mariadb_compress_alloc: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax imulq $0x78, (%rax), %rax movl $0x64, %ecx xorl %edx, %edx divq %rcx movq %rax, %rcx addq $0xc, %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rax movq (%rax), %rdi callq 0x135b0 movq %rax, -0x30(%rbp) cmpq $0x0, %rax jne 0x2508b movq $0x0, -0x8(%rbp) jmp 0x25135 movq -0x10(%rbp), %rax movq 0x2a0(%rax), %rax movq 0x10(%rax), %rax movq 0x68(%rax), %rax movq -0x10(%rbp), %rcx movq 0x2a0(%rcx), %rcx movq 0x8(%rcx), %rdi movq -0x30(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x18(%rbp), %rcx movq -0x20(%rbp), %r8 movq (%r8), %r8 callq *%rax cmpb $0x0, %al je 0x250d9 movq -0x30(%rbp), %rdi callq 0x13520 movq $0x0, -0x8(%rbp) jmp 0x25135 movq -0x28(%rbp), %rax movq (%rax), %rax movq -0x20(%rbp), %rcx cmpq (%rcx), %rax jb 0x25107 movq -0x28(%rbp), %rax movq $0x0, (%rax) movq -0x30(%rbp), %rdi callq 0x13520 movq $0x0, -0x8(%rbp) jmp 0x25135 jmp 0x25109 movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nop
_mariadb_compress_alloc: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] imul rax, [rax], 78h ; 'x' mov ecx, 64h ; 'd' xor edx, edx div rcx mov rcx, rax add rcx, 0Ch mov rax, [rbp+var_28] mov [rax], rcx mov rax, [rbp+var_28] mov rdi, [rax] call _malloc mov [rbp+var_30], rax cmp rax, 0 jnz short loc_2508B mov [rbp+var_8], 0 jmp loc_25135 loc_2508B: mov rax, [rbp+var_10] mov rax, [rax+2A0h] mov rax, [rax+10h] mov rax, [rax+68h] mov rcx, [rbp+var_10] mov rcx, [rcx+2A0h] mov rdi, [rcx+8] mov rsi, [rbp+var_30] mov rdx, [rbp+var_28] mov rcx, [rbp+var_18] mov r8, [rbp+var_20] mov r8, [r8] call rax cmp al, 0 jz short loc_250D9 mov rdi, [rbp+var_30] call _free mov [rbp+var_8], 0 jmp short loc_25135 loc_250D9: mov rax, [rbp+var_28] mov rax, [rax] mov rcx, [rbp+var_20] cmp rax, [rcx] jb short loc_25107 mov rax, [rbp+var_28] mov qword ptr [rax], 0 mov rdi, [rbp+var_30] call _free mov [rbp+var_8], 0 jmp short loc_25135 loc_25107: jmp short $+2 loc_25109: mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_38], rax mov rax, [rbp+var_28] mov rcx, [rax] mov rax, [rbp+var_20] mov [rax], rcx mov rcx, [rbp+var_38] mov rax, [rbp+var_28] mov [rax], rcx mov rax, [rbp+var_30] mov [rbp+var_8], rax loc_25135: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long mariadb_compress_alloc(long long a1, long long a2, _QWORD *a3, _QWORD *a4) { long long v5; // [rsp+8h] [rbp-38h] long long v6; // [rsp+10h] [rbp-30h] *a4 = 120LL * *a3 / 0x64uLL + 12; v6 = malloc(*a4); if ( !v6 ) return 0LL; if ( (*(unsigned __int8 ( **)(_QWORD, long long, _QWORD *, long long, _QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 672) + 16LL) + 104LL))( *(_QWORD *)(*(_QWORD *)(a1 + 672) + 8LL), v6, a4, a2, *a3) ) { free(v6); return 0LL; } else if ( *a4 < *a3 ) { v5 = *a3; *a3 = *a4; *a4 = v5; return v6; } else { *a4 = 0LL; free(v6); return 0LL; } }
_mariadb_compress_alloc: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] IMUL RAX,qword ptr [RAX],0x78 MOV ECX,0x64 XOR EDX,EDX DIV RCX MOV RCX,RAX ADD RCX,0xc MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX] CALL 0x001135b0 MOV qword ptr [RBP + -0x30],RAX CMP RAX,0x0 JNZ 0x0012508b MOV qword ptr [RBP + -0x8],0x0 JMP 0x00125135 LAB_0012508b: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x2a0] MOV RAX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RAX + 0x68] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x2a0] MOV RDI,qword ptr [RCX + 0x8] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x20] MOV R8,qword ptr [R8] CALL RAX CMP AL,0x0 JZ 0x001250d9 MOV RDI,qword ptr [RBP + -0x30] CALL 0x00113520 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00125135 LAB_001250d9: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RCX] JC 0x00125107 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],0x0 MOV RDI,qword ptr [RBP + -0x30] CALL 0x00113520 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00125135 LAB_00125107: JMP 0x00125109 LAB_00125109: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX LAB_00125135: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
void * _mariadb_compress_alloc(long param_1,int8 param_2,size_t *param_3,size_t *param_4) { size_t sVar1; char cVar2; int8 local_10; *param_4 = (*param_3 * 0x78) / 100 + 0xc; local_10 = malloc(*param_4); if (local_10 == (void *)0x0) { local_10 = (void *)0x0; } else { cVar2 = (**(code **)(*(long *)(*(long *)(param_1 + 0x2a0) + 0x10) + 0x68)) (*(int8 *)(*(long *)(param_1 + 0x2a0) + 8),local_10,param_4,param_2, *param_3); if (cVar2 == '\0') { if (*param_4 < *param_3) { sVar1 = *param_3; *param_3 = *param_4; *param_4 = sVar1; } else { *param_4 = 0; free(local_10); local_10 = (void *)0x0; } } else { free(local_10); local_10 = (void *)0x0; } } return local_10; }
13,630
asio::execution::any_executor<asio::execution::context_as_t<asio::execution_context&>, asio::execution::detail::blocking::never_t<0>, asio::execution::prefer_only<asio::execution::detail::blocking::possibly_t<0>>, asio::execution::prefer_only<asio::execution::detail::outstanding_work::tracked_t<0>>, asio::execution::prefer_only<asio::execution::detail::outstanding_work::untracked_t<0>>, asio::execution::prefer_only<asio::execution::detail::relationship::fork_t<0>>, asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0>>> asio::execution::detail::any_executor_base::prefer_fn<asio::execution::any_executor<asio::execution::context_as_t<asio::execution_context&>, asio::execution::detail::blocking::never_t<0>, asio::execution::prefer_only<asio::execution::detail::blocking::possibly_t<0>>, asio::execution::prefer_only<asio::execution::detail::outstanding_work::tracked_t<0>>, asio::execution::prefer_only<asio::execution::detail::outstanding_work::untracked_t<0>>, asio::execution::prefer_only<asio::execution::detail::relationship::fork_t<0>>, asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0>>>, asio::io_context::basic_executor_type<std::allocator<void>, 0ul>, asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0>>>(void const*, void const*)
aimrt_mujoco_sim/_deps/asio-src/asio/include/asio/execution/any_executor.hpp
static Poly prefer_fn(const void* ex, const void* prop) { return prefer_fn_impl<Poly, Ex, Prop>(ex, prop, 0); }
O3
cpp
asio::execution::any_executor<asio::execution::context_as_t<asio::execution_context&>, asio::execution::detail::blocking::never_t<0>, asio::execution::prefer_only<asio::execution::detail::blocking::possibly_t<0>>, asio::execution::prefer_only<asio::execution::detail::outstanding_work::tracked_t<0>>, asio::execution::prefer_only<asio::execution::detail::outstanding_work::untracked_t<0>>, asio::execution::prefer_only<asio::execution::detail::relationship::fork_t<0>>, asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0>>> asio::execution::detail::any_executor_base::prefer_fn<asio::execution::any_executor<asio::execution::context_as_t<asio::execution_context&>, asio::execution::detail::blocking::never_t<0>, asio::execution::prefer_only<asio::execution::detail::blocking::possibly_t<0>>, asio::execution::prefer_only<asio::execution::detail::outstanding_work::tracked_t<0>>, asio::execution::prefer_only<asio::execution::detail::outstanding_work::untracked_t<0>>, asio::execution::prefer_only<asio::execution::detail::relationship::fork_t<0>>, asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0>>>, asio::io_context::basic_executor_type<std::allocator<void>, 0ul>, asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0>>>(void const*, void const*): movq %rdi, %rax movq (%rsi), %rcx movq 0x1a7c4f(%rip), %rdx # 0x2a0ce0 movq %rdx, 0x28(%rdi) movq 0x1a794c(%rip), %rdx # 0x2a09e8 movq %rdx, 0x18(%rdi) movq %rcx, (%rdi) movq %rdi, 0x20(%rdi) movq 0x1a7f2a(%rip), %rcx # 0x2a0fd8 movq %rcx, 0x30(%rdi) retq nop
_ZN4asio9execution6detail17any_executor_base9prefer_fnINS0_12any_executorIJNS0_12context_as_tIRNS_17execution_contextEEENS1_8blocking7never_tILi0EEENS0_11prefer_onlyINS9_10possibly_tILi0EEEEENSC_INS1_16outstanding_work9tracked_tILi0EEEEENSC_INSG_11untracked_tILi0EEEEENSC_INS1_12relationship6fork_tILi0EEEEENSC_INSN_14continuation_tILi0EEEEEEEENS_10io_context19basic_executor_typeISaIvELm4EEESM_EET_PKvS11_: mov rax, rdi mov rcx, [rsi] mov rdx, cs:_ZZN4asio9execution6detail17any_executor_base16target_fns_tableINS_10io_context19basic_executor_typeISaIvELm0EEEEEPKNS2_10target_fnsEbPNSt9enable_ifIXntsr7is_sameIT_vEE5valueEvE4typeEE16fns_with_execute_ptr mov [rdi+28h], rdx mov rdx, cs:_ZZN4asio9execution6detail17any_executor_base16object_fns_tableINS_10io_context19basic_executor_typeISaIvELm0EEEEEPKNS2_10object_fnsEPNSt9enable_ifIXaantsr7is_sameIT_vEE5valuentsr7is_sameISC_NS1_22shared_target_executorEEE5valueEvE4typeEE3fns_ptr mov [rdi+18h], rdx mov [rdi], rcx mov [rdi+20h], rdi mov rcx, cs:_ZZN4asio9execution12any_executorIJNS0_12context_as_tIRNS_17execution_contextEEENS0_6detail8blocking7never_tILi0EEENS0_11prefer_onlyINS7_10possibly_tILi0EEEEENSA_INS6_16outstanding_work9tracked_tILi0EEEEENSA_INSE_11untracked_tILi0EEEEENSA_INS6_12relationship6fork_tILi0EEEEENSA_INSL_14continuation_tILi0EEEEEEE14prop_fns_tableINS_10io_context19basic_executor_typeISaIvELm0EEEEEPKNS6_17any_executor_base8prop_fnsISS_EEvE3fns_ptr mov [rdi+30h], rcx retn
_QWORD * asio::execution::detail::any_executor_base::prefer_fn<asio::execution::any_executor<asio::execution::context_as_t<asio::execution_context &>,asio::execution::detail::blocking::never_t<0>,asio::execution::prefer_only<asio::execution::detail::blocking::possibly_t<0>>,asio::execution::prefer_only<asio::execution::detail::outstanding_work::tracked_t<0>>,asio::execution::prefer_only<asio::execution::detail::outstanding_work::untracked_t<0>>,asio::execution::prefer_only<asio::execution::detail::relationship::fork_t<0>>,asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0>>>,asio::io_context::basic_executor_type<std::allocator<void>,4ul>,asio::execution::prefer_only<asio::execution::detail::outstanding_work::untracked_t<0>>>( _QWORD *a1, long long *a2) { _QWORD *result; // rax long long v3; // rcx result = a1; v3 = *a2; a1[5] = ZZN4asio9execution6detail17any_executor_base16target_fns_tableINS_10io_context19basic_executor_typeISaIvELm0EEEEEPKNS2_10target_fnsEbPNSt9enable_ifIXntsr7is_sameIT_vEE5valueEvE4typeEE16fns_with_execute; a1[3] = ZZN4asio9execution6detail17any_executor_base16object_fns_tableINS_10io_context19basic_executor_typeISaIvELm0EEEEEPKNS2_10object_fnsEPNSt9enable_ifIXaantsr7is_sameIT_vEE5valuentsr7is_sameISC_NS1_22shared_target_executorEEE5valueEvE4typeEE3fns; *a1 = v3; a1[4] = a1; a1[6] = asio::execution::any_executor<asio::execution::context_as_t<asio::execution_context &>,asio::execution::detail::blocking::never_t<0>,asio::execution::prefer_only<asio::execution::detail::blocking::possibly_t<0>>,asio::execution::prefer_only<asio::execution::detail::outstanding_work::tracked_t<0>>,asio::execution::prefer_only<asio::execution::detail::outstanding_work::untracked_t<0>>,asio::execution::prefer_only<asio::execution::detail::relationship::fork_t<0>>,asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0>>>::prop_fns_table<asio::io_context::basic_executor_type<std::allocator<void>,0ul>>(void)::fns; return result; }
prefer_fn<asio::execution::any_executor<asio::execution::context_as_t<asio::execution_context&>,asio::execution::detail::blocking::never_t<0>,asio::execution::prefer_only<asio::execution::detail::blocking::possibly_t<0>>,asio::execution::prefer_only<asio::execution::detail::outstanding_work::tracked_t<0>>,asio::execution::prefer_only<asio::execution::detail::outstanding_work::untracked_t<0>>,asio::execution::prefer_only<asio::execution::detail::relationship::fork_t<0>>,asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0>>>,asio::io_context::basic_executor_type<std::allocator<void>,4ul>,asio::execution::prefer_only<asio::execution::detail::outstanding_work::untracked_t<0>>>: MOV RAX,RDI MOV RCX,qword ptr [RSI] MOV RDX,qword ptr [0x003a0ce0] MOV qword ptr [RDI + 0x28],RDX MOV RDX,qword ptr [0x003a09e8] MOV qword ptr [RDI + 0x18],RDX MOV qword ptr [RDI],RCX MOV qword ptr [RDI + 0x20],RDI MOV RCX,qword ptr [0x003a0fd8] MOV qword ptr [RDI + 0x30],RCX RET
/* asio::execution::any_executor<asio::execution::context_as_t<asio::execution_context&>, asio::execution::detail::blocking::never_t<0>, asio::execution::prefer_only<asio::execution::detail::blocking::possibly_t<0> >, asio::execution::prefer_only<asio::execution::detail::outstanding_work::tracked_t<0> >, asio::execution::prefer_only<asio::execution::detail::outstanding_work::untracked_t<0> >, asio::execution::prefer_only<asio::execution::detail::relationship::fork_t<0> >, asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0> > > asio::execution::detail::any_executor_base::prefer_fn<asio::execution::any_executor<asio::execution::context_as_t<asio::execution_context&>, asio::execution::detail::blocking::never_t<0>, asio::execution::prefer_only<asio::execution::detail::blocking::possibly_t<0> >, asio::execution::prefer_only<asio::execution::detail::outstanding_work::tracked_t<0> >, asio::execution::prefer_only<asio::execution::detail::outstanding_work::untracked_t<0> >, asio::execution::prefer_only<asio::execution::detail::relationship::fork_t<0> >, asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0> > >, asio::io_context::basic_executor_type<std::allocator<void>, 4ul>, asio::execution::prefer_only<asio::execution::detail::outstanding_work::untracked_t<0> > >(void const*, void const*) */ void * asio::execution::detail::any_executor_base:: prefer_fn<asio::execution::any_executor<asio::execution::context_as_t<asio::execution_context&>,asio::execution::detail::blocking::never_t<0>,asio::execution::prefer_only<asio::execution::detail::blocking::possibly_t<0>>,asio::execution::prefer_only<asio::execution::detail::outstanding_work::tracked_t<0>>,asio::execution::prefer_only<asio::execution::detail::outstanding_work::untracked_t<0>>,asio::execution::prefer_only<asio::execution::detail::relationship::fork_t<0>>,asio::execution::prefer_only<asio::execution::detail::relationship::continuation_t<0>>>,asio::io_context::basic_executor_type<std::allocator<void>,4ul>,asio::execution::prefer_only<asio::execution::detail::outstanding_work::untracked_t<0>>> (void *param_1,void *param_2) { int8 uVar1; /* WARNING: Load size is inaccurate */ uVar1 = *param_2; *(int **)((long)param_1 + 0x28) = PTR_fns_with_execute_003a0ce0; *(int **)((long)param_1 + 0x18) = PTR_fns_003a09e8; *(int8 *)param_1 = uVar1; *(void **)((long)param_1 + 0x20) = param_1; *(int **)((long)param_1 + 0x30) = PTR_fns_003a0fd8; return param_1; }
13,631
js_array_iterator_next
bluesky950520[P]quickjs/quickjs.c
static JSValue js_array_iterator_next(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, BOOL *pdone, int magic) { JSArrayIteratorData *it; uint32_t len, idx; JSValue val, obj; JSObject *p; it = JS_GetOpaque2(ctx, this_val, JS_CLASS_ARRAY_ITERATOR); if (!it) goto fail1; if (JS_IsUndefined(it->obj)) goto done; p = JS_VALUE_GET_OBJ(it->obj); if (p->class_id >= JS_CLASS_UINT8C_ARRAY && p->class_id <= JS_CLASS_FLOAT64_ARRAY) { if (typed_array_is_oob(p)) { JS_ThrowTypeErrorArrayBufferOOB(ctx); goto fail1; } len = p->u.array.count; } else { if (js_get_length32(ctx, &len, it->obj)) { fail1: *pdone = FALSE; return JS_EXCEPTION; } } idx = it->idx; if (idx >= len) { JS_FreeValue(ctx, it->obj); it->obj = JS_UNDEFINED; done: *pdone = TRUE; return JS_UNDEFINED; } it->idx = idx + 1; *pdone = FALSE; if (it->kind == JS_ITERATOR_KIND_KEY) { return js_uint32(idx); } else { val = JS_GetPropertyUint32(ctx, it->obj, idx); if (JS_IsException(val)) return JS_EXCEPTION; if (it->kind == JS_ITERATOR_KIND_VALUE) { return val; } else { JSValue args[2]; JSValue num; num = js_uint32(idx); args[0] = num; args[1] = val; obj = js_create_array(ctx, 2, args); JS_FreeValue(ctx, val); JS_FreeValue(ctx, num); return obj; } } }
O1
c
js_array_iterator_next: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r9, %r14 movq %rdi, %rbx movl $0x2c, %ecx callq 0x269a1 testq %rax, %rax je 0x41892 movq %rax, %r15 movq 0x8(%rax), %rcx cmpl $0x3, %ecx jne 0x4184d movl $0x1, (%r14) movl $0x3, %r14d jmp 0x4189f movq (%r15), %r12 movzwl 0x6(%r12), %eax addl $-0x15, %eax cmpw $0xb, %ax ja 0x4187e movq %r12, %rdi callq 0x38ab0 testl %eax, %eax je 0x418bc leaq 0x5f4a8(%rip), %rsi # 0xa0d1a movq %rbx, %rdi xorl %eax, %eax callq 0x21953 jmp 0x41892 movq (%r15), %rdx leaq 0xc(%rsp), %rsi movq %rbx, %rdi callq 0x409fb testl %eax, %eax je 0x418c5 movl $0x0, (%r14) movl $0x6, %r14d xorl %r12d, %r12d xorl %ecx, %ecx movl %r12d, %eax orq %rcx, %rax movq %r14, %rdx addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl 0x40(%r12), %eax movl %eax, 0xc(%rsp) movl 0x14(%r15), %r13d cmpl 0xc(%rsp), %r13d jae 0x4191d leal 0x1(%r13), %eax movl %eax, 0x14(%r15) movl $0x0, (%r14) cmpl $0x0, 0x10(%r15) je 0x41941 movq (%r15), %rsi movq 0x8(%r15), %rdx movq %rbx, %rdi movq %r13, %rcx callq 0x235a0 movq %rdx, %r14 cmpl $0x6, %r14d je 0x41899 movq %rax, %r12 movabsq $-0x100000000, %rbp # imm = 0xFFFFFFFF00000000 cmpl $0x1, 0x10(%r15) jne 0x41970 movq %r12, %rcx andq %rbp, %rcx jmp 0x418a4 movq (%r15), %rsi movq 0x8(%r15), %rdx movq 0x18(%rbx), %rdi callq 0x1ccb2 movl $0x0, (%r15) movq $0x3, 0x8(%r15) jmp 0x4183e xorl %eax, %eax testl %r13d, %r13d cvtsi2sd %r13, %xmm0 movq %xmm0, %r12 cmovnsq %r13, %r12 movl $0x7, %r14d cmovnsq %rax, %r14 movabsq $0x7fffffff00000000, %rcx # imm = 0x7FFFFFFF00000000 andq %r12, %rcx jmp 0x418a4 xorl %eax, %eax cvtsi2sd %r13, %xmm0 testl %r13d, %r13d movq %xmm0, %r15 cmovnsq %r13, %r15 movl $0x7, %r13d cmovnsq %rax, %r13 leaq 0x20(%rsp), %rdx movq %r15, (%rdx) movq %r13, 0x8(%rdx) movq %r12, 0x10(%rdx) movq %r14, 0x18(%rdx) movq %rbx, %rdi movl $0x2, %esi callq 0x10a79 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq 0x18(%rbx), %rdi movq %r12, %rsi movq %r14, %rdx callq 0x1ccb2 movq 0x18(%rbx), %rdi movq %r15, %rsi movq %r13, %rdx callq 0x1ccb2 movq 0x10(%rsp), %r12 andq %r12, %rbp movq %rbp, %rcx movq 0x18(%rsp), %r14 jmp 0x418a4
js_array_iterator_next: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r14, r9 mov rbx, rdi mov ecx, 2Ch ; ',' call JS_GetOpaque2 test rax, rax jz short loc_41892 mov r15, rax mov rcx, [rax+8] cmp ecx, 3 jnz short loc_4184D loc_4183E: mov dword ptr [r14], 1 mov r14d, 3 jmp short loc_4189F loc_4184D: mov r12, [r15] movzx eax, word ptr [r12+6] add eax, 0FFFFFFEBh cmp ax, 0Bh ja short loc_4187E mov rdi, r12 call typed_array_is_oob test eax, eax jz short loc_418BC lea rsi, aArraybufferIsD_0; "ArrayBuffer is detached or resized" mov rdi, rbx xor eax, eax call JS_ThrowTypeError jmp short loc_41892 loc_4187E: mov rdx, [r15] lea rsi, [rsp+78h+var_6C] mov rdi, rbx call js_get_length32 test eax, eax jz short loc_418C5 loc_41892: mov dword ptr [r14], 0 loc_41899: mov r14d, 6 loc_4189F: xor r12d, r12d xor ecx, ecx loc_418A4: mov eax, r12d or rax, rcx mov rdx, r14 add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_418BC: mov eax, [r12+40h] mov [rsp+78h+var_6C], eax loc_418C5: mov r13d, [r15+14h] cmp r13d, [rsp+78h+var_6C] jnb short loc_4191D lea eax, [r13+1] mov [r15+14h], eax mov dword ptr [r14], 0 cmp dword ptr [r15+10h], 0 jz short loc_41941 mov rsi, [r15] mov rdx, [r15+8] mov rdi, rbx mov rcx, r13 call JS_GetPropertyInt64 mov r14, rdx cmp r14d, 6 jz short loc_41899 mov r12, rax mov rbp, 0FFFFFFFF00000000h cmp dword ptr [r15+10h], 1 jnz short loc_41970 mov rcx, r12 and rcx, rbp jmp short loc_418A4 loc_4191D: mov rsi, [r15] mov rdx, [r15+8] mov rdi, [rbx+18h] call JS_FreeValueRT mov dword ptr [r15], 0 mov qword ptr [r15+8], 3 jmp loc_4183E loc_41941: xor eax, eax test r13d, r13d cvtsi2sd xmm0, r13 movq r12, xmm0 cmovns r12, r13 mov r14d, 7 cmovns r14, rax mov rcx, 7FFFFFFF00000000h and rcx, r12 jmp loc_418A4 loc_41970: xor eax, eax cvtsi2sd xmm0, r13 test r13d, r13d movq r15, xmm0 cmovns r15, r13 mov r13d, 7 cmovns r13, rax lea rdx, [rsp+78h+var_58] mov [rdx], r15 mov [rdx+8], r13 mov [rdx+10h], r12 mov [rdx+18h], r14 mov rdi, rbx mov esi, 2 call js_create_array mov [rsp+78h+var_68], rax mov [rsp+78h+var_60], rdx mov rdi, [rbx+18h] mov rsi, r12 mov rdx, r14 call JS_FreeValueRT mov rdi, [rbx+18h] mov rsi, r15 mov rdx, r13 call JS_FreeValueRT mov r12, [rsp+78h+var_68] and rbp, r12 mov rcx, rbp mov r14, [rsp+78h+var_60] jmp loc_418A4
unsigned long long js_array_iterator_next( long long a1, long long a2, int a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11, long long a12, long long a13, _DWORD *a14) { long long *Opaque2; // rax long long *v16; // r15 long long v17; // rcx long long v18; // r12 long long v19; // rdx long long v20; // rcx long long v21; // r8 long long v22; // r9 __m128 v23; // xmm4 __m128 v24; // xmm5 double v25; // r12 unsigned long long v26; // rcx unsigned long long v28; // r13 unsigned long long PropertyInt64; // rax long long v30; // rdx long long v31; // r14 bool v32; // sf double v33; // r15 long long v34; // r13 long long v35; // rdx char v36; // [rsp+0h] [rbp-78h] unsigned int v37; // [rsp+Ch] [rbp-6Ch] BYREF unsigned long long array; // [rsp+10h] [rbp-68h] long long v39; // [rsp+18h] [rbp-60h] double v40[11]; // [rsp+20h] [rbp-58h] BYREF Opaque2 = (long long *)JS_GetOpaque2(a1, a2, a3, 0x2Cu); if ( !Opaque2 ) goto LABEL_8; v16 = Opaque2; v17 = Opaque2[1]; if ( (_DWORD)v17 == 3 ) { LABEL_3: *a14 = 1; LABEL_9: LODWORD(v25) = 0; v26 = 0LL; return v26 | LODWORD(v25); } v18 = *Opaque2; if ( (unsigned __int16)(*(_WORD *)(*Opaque2 + 6) - 21) > 0xBu ) { if ( (unsigned int)js_get_length32(a1, (int *)&v37, *Opaque2, v17) ) goto LABEL_8; } else { if ( typed_array_is_oob(*Opaque2) ) { JS_ThrowTypeError( a1, (long long)"ArrayBuffer is detached or resized", v19, v20, v21, v22, a4, a5, a6, a7, v23, v24, a10, a11, v36); LABEL_8: *a14 = 0; goto LABEL_9; } v37 = *(_DWORD *)(v18 + 64); } v28 = *((unsigned int *)v16 + 5); if ( (unsigned int)v28 >= v37 ) { JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)*v16, v16[1]); *(_DWORD *)v16 = 0; v16[1] = 3LL; goto LABEL_3; } *((_DWORD *)v16 + 5) = v28 + 1; *a14 = 0; if ( *((_DWORD *)v16 + 4) ) { PropertyInt64 = JS_GetPropertyInt64(a1, *v16, v16[1], v28); v31 = v30; if ( (_DWORD)v30 == 6 ) goto LABEL_9; v25 = *(double *)&PropertyInt64; if ( *((_DWORD *)v16 + 4) == 1 ) { v26 = PropertyInt64 & 0xFFFFFFFF00000000LL; } else { v32 = (v28 & 0x80000000) != 0LL; v33 = (double)(int)v28; if ( (v28 & 0x80000000) == 0LL ) v33 = *(double *)&v28; v34 = 7LL; if ( !v32 ) v34 = 0LL; v40[0] = v33; *(_QWORD *)&v40[1] = v34; *(_QWORD *)&v40[2] = PropertyInt64; *(_QWORD *)&v40[3] = v30; array = js_create_array(a1, 2, (long long)v40); v39 = v35; JS_FreeValueRT(*(_QWORD *)(a1 + 24), *(_DWORD **)&v25, v31); JS_FreeValueRT(*(_QWORD *)(a1 + 24), *(_DWORD **)&v33, v34); LODWORD(v25) = array; v26 = array & 0xFFFFFFFF00000000LL; } } else { v25 = (double)(int)v28; if ( (v28 & 0x80000000) == 0LL ) v25 = *(double *)&v28; v26 = *(_QWORD *)&v25 & 0x7FFFFFFF00000000LL; } return v26 | LODWORD(v25); }
js_array_iterator_next: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R14,R9 MOV RBX,RDI MOV ECX,0x2c CALL 0x001269a1 TEST RAX,RAX JZ 0x00141892 MOV R15,RAX MOV RCX,qword ptr [RAX + 0x8] CMP ECX,0x3 JNZ 0x0014184d LAB_0014183e: MOV dword ptr [R14],0x1 MOV R14D,0x3 JMP 0x0014189f LAB_0014184d: MOV R12,qword ptr [R15] MOVZX EAX,word ptr [R12 + 0x6] ADD EAX,-0x15 CMP AX,0xb JA 0x0014187e MOV RDI,R12 CALL 0x00138ab0 TEST EAX,EAX JZ 0x001418bc LEA RSI,[0x1a0d1a] MOV RDI,RBX XOR EAX,EAX CALL 0x00121953 JMP 0x00141892 LAB_0014187e: MOV RDX,qword ptr [R15] LEA RSI,[RSP + 0xc] MOV RDI,RBX CALL 0x001409fb TEST EAX,EAX JZ 0x001418c5 LAB_00141892: MOV dword ptr [R14],0x0 LAB_00141899: MOV R14D,0x6 LAB_0014189f: XOR R12D,R12D XOR ECX,ECX LAB_001418a4: MOV EAX,R12D OR RAX,RCX MOV RDX,R14 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001418bc: MOV EAX,dword ptr [R12 + 0x40] MOV dword ptr [RSP + 0xc],EAX LAB_001418c5: MOV R13D,dword ptr [R15 + 0x14] CMP R13D,dword ptr [RSP + 0xc] JNC 0x0014191d LEA EAX,[R13 + 0x1] MOV dword ptr [R15 + 0x14],EAX MOV dword ptr [R14],0x0 CMP dword ptr [R15 + 0x10],0x0 JZ 0x00141941 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] MOV RDI,RBX MOV RCX,R13 CALL 0x001235a0 MOV R14,RDX CMP R14D,0x6 JZ 0x00141899 MOV R12,RAX MOV RBP,-0x100000000 CMP dword ptr [R15 + 0x10],0x1 JNZ 0x00141970 MOV RCX,R12 AND RCX,RBP JMP 0x001418a4 LAB_0014191d: MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] MOV RDI,qword ptr [RBX + 0x18] CALL 0x0011ccb2 MOV dword ptr [R15],0x0 MOV qword ptr [R15 + 0x8],0x3 JMP 0x0014183e LAB_00141941: XOR EAX,EAX TEST R13D,R13D CVTSI2SD XMM0,R13 MOVQ R12,XMM0 CMOVNS R12,R13 MOV R14D,0x7 CMOVNS R14,RAX MOV RCX,0x7fffffff00000000 AND RCX,R12 JMP 0x001418a4 LAB_00141970: XOR EAX,EAX CVTSI2SD XMM0,R13 TEST R13D,R13D MOVQ R15,XMM0 CMOVNS R15,R13 MOV R13D,0x7 CMOVNS R13,RAX LEA RDX,[RSP + 0x20] MOV qword ptr [RDX],R15 MOV qword ptr [RDX + 0x8],R13 MOV qword ptr [RDX + 0x10],R12 MOV qword ptr [RDX + 0x18],R14 MOV RDI,RBX MOV ESI,0x2 CALL 0x00110a79 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R12 MOV RDX,R14 CALL 0x0011ccb2 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R15 MOV RDX,R13 CALL 0x0011ccb2 MOV R12,qword ptr [RSP + 0x10] AND RBP,R12 MOV RCX,RBP MOV R14,qword ptr [RSP + 0x18] JMP 0x001418a4
int1 [16] js_array_iterator_next(long param_1) { uint uVar1; long lVar2; int1 auVar3 [16]; int iVar4; long *plVar5; int4 *in_R9; double dVar6; double dVar7; int8 uVar8; ulong uVar9; int8 uVar10; int1 auVar11 [16]; uint local_6c; int1 local_68 [16]; double local_58; int8 local_50; int1 local_48 [16]; plVar5 = (long *)JS_GetOpaque2(); if (plVar5 == (long *)0x0) goto LAB_00141892; if ((int)plVar5[1] == 3) { LAB_0014183e: *in_R9 = 1; uVar9 = 3; } else { lVar2 = *plVar5; if ((ushort)(*(short *)(lVar2 + 6) - 0x15U) < 0xc) { iVar4 = typed_array_is_oob(lVar2); if (iVar4 != 0) { JS_ThrowTypeError(param_1,"ArrayBuffer is detached or resized"); goto LAB_00141892; } local_6c = *(uint *)(lVar2 + 0x40); LAB_001418c5: uVar1 = *(uint *)((long)plVar5 + 0x14); dVar7 = (double)(ulong)uVar1; if (local_6c <= uVar1) { JS_FreeValueRT(*(int8 *)(param_1 + 0x18),*plVar5,plVar5[1]); *(int4 *)plVar5 = 0; plVar5[1] = 3; goto LAB_0014183e; } *(uint *)((long)plVar5 + 0x14) = uVar1 + 1; *in_R9 = 0; if ((int)plVar5[2] == 0) { dVar6 = (double)(long)dVar7; if (-1 < (int)uVar1) { dVar6 = dVar7; } uVar10 = 7; if (-1 < (int)uVar1) { uVar10 = 0; } local_68._8_8_ = uVar10; local_68._0_8_ = dVar6; uVar9 = (ulong)dVar6 & 0x7fffffff00000000; goto LAB_001418a4; } local_68 = JS_GetPropertyInt64(param_1,*plVar5,plVar5[1],dVar7); uVar10 = local_68._8_8_; uVar9 = local_68._0_8_; if (local_68._8_4_ != 6) { if ((int)plVar5[2] == 1) { uVar9 = uVar9 & 0xffffffff00000000; } else { dVar6 = (double)(long)dVar7; if (-1 < (int)uVar1) { dVar6 = dVar7; } uVar8 = 7; if (-1 < (int)uVar1) { uVar8 = 0; } local_58 = dVar6; local_50 = uVar8; local_48 = local_68; local_68 = js_create_array(param_1,2); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar9,uVar10); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),dVar6,uVar8); uVar9 = local_68._0_8_ & 0xffffffff00000000; } goto LAB_001418a4; } } else { iVar4 = js_get_length32(param_1,&local_6c,*plVar5); if (iVar4 == 0) goto LAB_001418c5; LAB_00141892: *in_R9 = 0; } uVar9 = 6; } auVar3._8_8_ = 0; auVar3._0_8_ = uVar9; local_68 = auVar3 << 0x40; uVar9 = 0; LAB_001418a4: auVar11._0_8_ = local_68._0_8_ & 0xffffffff | uVar9; auVar11._8_8_ = local_68._8_8_; return auVar11; }
13,632
inline_mysql_cond_broadcast
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_cond_broadcast( mysql_cond_t *that) { int result; #ifdef HAVE_PSI_COND_INTERFACE if (psi_likely(that->m_psi != NULL)) PSI_COND_CALL(broadcast_cond)(that->m_psi); #endif result= pthread_cond_broadcast(&that->m_cond); return result; }
O0
c
inline_mysql_cond_broadcast: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x30(%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 0x4738b leaq 0x241f89(%rip), %rax # 0x289300 movq (%rax), %rax movq 0x178(%rax), %rax movq -0x8(%rbp), %rcx movq 0x30(%rcx), %rdi callq *%rax movq -0x8(%rbp), %rdi callq 0x277c0 movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax addq $0x10, %rsp popq %rbp retq
inline_mysql_cond_broadcast: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+30h], 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_4738B lea rax, PSI_server mov rax, [rax] mov rax, [rax+178h] mov rcx, [rbp+var_8] mov rdi, [rcx+30h] call rax loc_4738B: mov rdi, [rbp+var_8] call _pthread_cond_broadcast mov [rbp+var_C], eax mov eax, [rbp+var_C] add rsp, 10h pop rbp retn
long long inline_mysql_cond_broadcast(long long a1) { if ( *(_QWORD *)(a1 + 48) ) ((void ( *)(_QWORD))PSI_server[47])(*(_QWORD *)(a1 + 48)); return (unsigned int)pthread_cond_broadcast(a1); }
inline_mysql_cond_broadcast: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 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 0x0014738b LEA RAX,[0x389300] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x178] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x30] CALL RAX LAB_0014738b: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001277c0 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] ADD RSP,0x10 POP RBP RET
int inline_mysql_cond_broadcast(pthread_cond_t *param_1) { int iVar1; if (param_1[1].__align != 0) { (**(code **)(PSI_server + 0x178))(param_1[1].__align); } iVar1 = pthread_cond_broadcast(param_1); return iVar1; }
13,633
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>::emplace_back<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>&)
monkey531[P]llama/common/./json.hpp
reference emplace_back(Args&& ... args) { // emplace_back only works for null objects or arrays if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array()))) { JSON_THROW(type_error::create(311, detail::concat("cannot use emplace_back() with ", type_name()), this)); } // transform null object into an array if (is_null()) { m_data.m_type = value_t::array; m_data.m_value = value_t::array; assert_invariant(); } // add element to array (perfect forwarding) const auto old_capacity = m_data.m_value.array->capacity(); m_data.m_value.array->emplace_back(std::forward<Args>(args)...); return set_parent(m_data.m_value.array->back(), old_capacity); }
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>& 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>::emplace_back<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>&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 movzbl (%rdi), %eax testl %eax, %eax jne 0x863e5 movb $0x2, (%r14) callq 0x2d196 movq %rax, %rdi movq %rax, 0x8(%r14) jmp 0x863ee cmpl $0x2, %eax jne 0x8640b movq 0x8(%r14), %rdi movq %rbx, %rsi callq 0x86522 movq 0x8(%r14), %rax movq 0x8(%rax), %rax addq $-0x10, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x20 popq %rdi callq 0x213f0 movq %rax, %rbx movq %r14, %rdi callq 0x2d0f2 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x178a9(%rip), %rsi # 0x9dcd6 leaq 0x10(%rsp), %rdi callq 0x864c3 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x137, %esi # imm = 0x137 movq %r14, %rcx callq 0x2e408 xorl %ebp, %ebp leaq 0x51a88(%rip), %rsi # 0xd7ee0 leaq -0x5e42d(%rip), %rdx # 0x28032 movq %rbx, %rdi callq 0x21de0 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x22078 testb %bpl, %bpl jne 0x8647e jmp 0x86486 movq %rax, %r14 movq %rbx, %rdi callq 0x215c0 movq %r14, %rdi callq 0x21e50
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12emplace_backIJRSD_EEESF_DpOT_: push rbp; char push r14; int push rbx; int sub rsp, 30h mov rbx, rsi mov r14, rdi movzx eax, byte ptr [rdi] test eax, eax jnz short loc_863E5 mov byte ptr [r14], 2 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJEEEPT_DpOT0_; 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>::create<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>>>() mov rdi, rax mov [r14+8], rax jmp short loc_863EE loc_863E5: cmp eax, 2 jnz short loc_8640B mov rdi, [r14+8] loc_863EE: mov rsi, rbx call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJRSD_EEESH_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>&) mov rax, [r14+8] mov rax, [rax+8] add rax, 0FFFFFFFFFFFFFFF0h add rsp, 30h pop rbx pop r14 pop rbp retn loc_8640B: 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, aCannotUseEmpla; "cannot use emplace_back() with " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA32_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[32],char const*>(char const(&)[32],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 137h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_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_8647E jmp short loc_86486 mov r14, rax loc_8647E: mov rdi, rbx; void * call ___cxa_free_exception loc_86486: 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>::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>&>( long long a1, long long a2) { long long v3; // rdi nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx _BYTE v6[56]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 ) { 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(&)[32],char const*>( v6, "cannot use emplace_back() with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 311, (long long)v6); __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); } v3 = *(_QWORD *)(a1 + 8); } else { *(_BYTE *)a1 = 2; v3 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<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>>>(); *(_QWORD *)(a1 + 8) = v3; } 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>&>( v3, a2); return *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) - 16LL; }
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>&>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R14,RDI MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JNZ 0x001863e5 MOV byte ptr [R14],0x2 CALL 0x0012d196 MOV RDI,RAX MOV qword ptr [R14 + 0x8],RAX JMP 0x001863ee LAB_001863e5: CMP EAX,0x2 JNZ 0x0018640b MOV RDI,qword ptr [R14 + 0x8] LAB_001863ee: MOV RSI,RBX CALL 0x00186522 MOV RAX,qword ptr [R14 + 0x8] MOV RAX,qword ptr [RAX + 0x8] ADD RAX,-0x10 ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_0018640b: PUSH 0x20 POP RDI CALL 0x001213f0 MOV RBX,RAX MOV RDI,R14 CALL 0x0012d0f2 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_00186426: LEA RSI,[0x19dcd6] LEA RDI,[RSP + 0x10] CALL 0x001864c3 MOV BPL,0x1 LAB_0018643a: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x137 MOV RCX,R14 CALL 0x0012e408 XOR EBP,EBP LEA RSI,[0x1d7ee0] LEA RDX,[0x128032] MOV RDI,RBX CALL 0x00121de0
/* 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>::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>&>(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 * __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> :: 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>&> (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,basic_json *param_1) { 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_00; 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> )0x0) { *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; this_00 = (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>>> *)create<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<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(this + 8) = this_00; } else { 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) { uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 00186426 to 00186436 has its CatchHandler @ 0018647b */ detail::concat<std::__cxx11::string,char_const(&)[32],char_const*> (local_38,"cannot use emplace_back() with ",&local_40); /* try { // try from 0018643a to 00186466 has its CatchHandler @ 00186467 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar1,0x137,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); } this_00 = *(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(this + 8); } 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>&> (this_00,param_1); return (basic_json *)(*(long *)(*(long *)(this + 8) + 8) + -0x10); }
13,634
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>::emplace_back<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>&)
monkey531[P]llama/common/./json.hpp
reference emplace_back(Args&& ... args) { // emplace_back only works for null objects or arrays if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array()))) { JSON_THROW(type_error::create(311, detail::concat("cannot use emplace_back() with ", type_name()), this)); } // transform null object into an array if (is_null()) { m_data.m_type = value_t::array; m_data.m_value = value_t::array; assert_invariant(); } // add element to array (perfect forwarding) const auto old_capacity = m_data.m_value.array->capacity(); m_data.m_value.array->emplace_back(std::forward<Args>(args)...); return set_parent(m_data.m_value.array->back(), old_capacity); }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::emplace_back<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>&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 movzbl (%rdi), %eax testl %eax, %eax jne 0x9d2aa movb $0x2, (%r14) movl $0x18, %edi callq 0x197a0 movq %rax, %rdi xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x8(%r14) jmp 0x9d2b3 cmpl $0x2, %eax jne 0x9d2d0 movq 0x8(%r14), %rdi movq %rbx, %rsi callq 0x9d3ee movq 0x8(%r14), %rax movq 0x8(%rax), %rax addq $-0x10, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x20, %edi callq 0x193b0 movq %rax, %rbx movq %r14, %rdi callq 0x298a8 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x1c9c4(%rip), %rsi # 0xb9cb8 leaq 0x10(%rsp), %rdi callq 0x9d366 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x137, %esi # imm = 0x137 movq %r14, %rcx callq 0x2ab30 xorl %ebp, %ebp leaq 0x48bc1(%rip), %rsi # 0xe5ee0 leaq -0x7957e(%rip), %rdx # 0x23da8 movq %rbx, %rdi callq 0x19da0 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9d34c movq 0x20(%rsp), %rsi incq %rsi callq 0x197b0 testb %bpl, %bpl jne 0x9d356 jmp 0x9d35e movq %rax, %r14 movq %rbx, %rdi callq 0x19570 movq %r14, %rdi callq 0x19e10
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12emplace_backIJRSD_EEESF_DpOT_: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov rbx, rsi mov r14, rdi movzx eax, byte ptr [rdi] test eax, eax jnz short loc_9D2AA mov byte ptr [r14], 2 mov edi, 18h; unsigned __int64 call __Znwm; operator new(ulong) mov rdi, rax xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 mov [r14+8], rax jmp short loc_9D2B3 loc_9D2AA: cmp eax, 2 jnz short loc_9D2D0 mov rdi, [r14+8] loc_9D2B3: mov rsi, rbx call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJRSD_EEESH_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>&) mov rax, [r14+8] mov rax, [rax+8] add rax, 0FFFFFFFFFFFFFFF0h add rsp, 30h pop rbx pop r14 pop rbp retn loc_9D2D0: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUseEmpla; "cannot use emplace_back() with " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA32_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[32],char const*>(char const(&)[32],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 137h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9D34C mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9D34C: test bpl, bpl jnz short loc_9D356 jmp short loc_9D35E mov r14, rax loc_9D356: mov rdi, rbx; void * call ___cxa_free_exception loc_9D35E: 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>::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>&>( long long a1, long long a2) { long long v3; // rdi nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx _QWORD v6[2]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 ) { if ( *(_BYTE *)a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__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(&)[32],char const*>( v6, "cannot use emplace_back() with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 311, v6); __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); } v3 = *(_QWORD *)(a1 + 8); } else { *(_BYTE *)a1 = 2; v3 = operator new(0x18uLL); *(_OWORD *)v3 = 0LL; *(_QWORD *)(v3 + 16) = 0LL; *(_QWORD *)(a1 + 8) = v3; } 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>&>( v3, a2); return *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) - 16LL; }
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>&>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R14,RDI MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JNZ 0x0019d2aa MOV byte ptr [R14],0x2 MOV EDI,0x18 CALL 0x001197a0 MOV RDI,RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOV qword ptr [R14 + 0x8],RAX JMP 0x0019d2b3 LAB_0019d2aa: CMP EAX,0x2 JNZ 0x0019d2d0 MOV RDI,qword ptr [R14 + 0x8] LAB_0019d2b3: MOV RSI,RBX CALL 0x0019d3ee MOV RAX,qword ptr [R14 + 0x8] MOV RAX,qword ptr [RAX + 0x8] ADD RAX,-0x10 ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_0019d2d0: MOV EDI,0x20 CALL 0x001193b0 MOV RBX,RAX MOV RDI,R14 CALL 0x001298a8 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0019d2ed: LEA RSI,[0x1b9cb8] LEA RDI,[RSP + 0x10] CALL 0x0019d366 MOV BPL,0x1 LAB_0019d301: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x137 MOV RCX,R14 CALL 0x0012ab30 XOR EBP,EBP LEA RSI,[0x1e5ee0] LEA RDX,[0x123da8] MOV RDI,RBX CALL 0x00119da0
/* 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>::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>&>(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 * __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> :: 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>&> (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,basic_json *param_1) { 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_00; 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> )0x0) { *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; this_00 = (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>>> *)operator_new(0x18); *(int8 *)this_00 = 0; *(int8 *)(this_00 + 8) = 0; *(int8 *)(this_00 + 0x10) = 0; *(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(this + 8) = this_00; } else { 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) { uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 0019d2ed to 0019d2fd has its CatchHandler @ 0019d353 */ detail::concat<std::__cxx11::string,char_const(&)[32],char_const*> (local_38,"cannot use emplace_back() with ",&local_40); /* try { // try from 0019d301 to 0019d32d has its CatchHandler @ 0019d32e */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar1,0x137,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); } this_00 = *(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(this + 8); } 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>&> (this_00,param_1); return (basic_json *)(*(long *)(*(long *)(this + 8) + 8) + -0x10); }
13,635
nglog::tools::ReadFromOffset(int, void*, unsigned long, unsigned long)
ng-log[P]ng-log/src/symbolize.cc
static ssize_t ReadFromOffset(const int fd, void* buf, const size_t count, const size_t offset) { NGLOG_SAFE_ASSERT(fd >= 0); NGLOG_SAFE_ASSERT(count <= static_cast<size_t>(std::numeric_limits<ssize_t>::max())); char* buf0 = reinterpret_cast<char*>(buf); size_t num_bytes = 0; while (num_bytes < count) { ssize_t len = FailureRetry([fd, p = buf0 + num_bytes, n = count - num_bytes, m = static_cast<off_t>(offset + num_bytes)] { return pread(fd, p, n, m); }); if (len < 0) { // There was an error other than EINTR. return -1; } if (len == 0) { // Reached EOF. break; } num_bytes += static_cast<size_t>(len); } NGLOG_SAFE_ASSERT(num_bytes <= count); return static_cast<ssize_t>(num_bytes); }
O0
cpp
nglog::tools::ReadFromOffset(int, void*, unsigned long, unsigned long): pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movl %edi, -0xc(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) cmpl $0x0, -0xc(%rbp) jl 0x4de42 jmp 0x4de47 callq 0x93a0 movq -0x20(%rbp), %rax movq %rax, -0x68(%rbp) callq 0x4f750 movq %rax, %rcx movq -0x68(%rbp), %rax cmpq %rcx, %rax ja 0x4de62 jmp 0x4de67 callq 0x93a0 movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq $0x0, -0x38(%rbp) movq -0x38(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x4df0e movl -0xc(%rbp), %eax movl %eax, -0x60(%rbp) movq -0x30(%rbp), %rax addq -0x38(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x20(%rbp), %rax subq -0x38(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax addq -0x38(%rbp), %rax movq %rax, -0x48(%rbp) leaq -0x60(%rbp), %rax movl $0x4, %edi movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rcx movq %rcx, 0x10(%rsp) movq 0x18(%rax), %rax movq %rax, 0x18(%rsp) callq 0x4e2d0 movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) jge 0x4def4 movq $-0x1, -0x8(%rbp) jmp 0x4df27 cmpq $0x0, -0x40(%rbp) jne 0x4defd jmp 0x4df0e movq -0x40(%rbp), %rax addq -0x38(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0x4de77 movq -0x38(%rbp), %rax cmpq -0x20(%rbp), %rax ja 0x4df1a jmp 0x4df1f callq 0x93a0 movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x90, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN5nglog5toolsL14ReadFromOffsetEiPvmm: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_C], edi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx cmp [rbp+var_C], 0 jl short loc_4DE42 jmp short loc_4DE47 loc_4DE42: call _abort loc_4DE47: mov rax, [rbp+var_20] mov [rbp+var_68], rax call _ZNSt14numeric_limitsIlE3maxEv; std::numeric_limits<long>::max(void) mov rcx, rax mov rax, [rbp+var_68] cmp rax, rcx ja short loc_4DE62 jmp short loc_4DE67 loc_4DE62: call _abort loc_4DE67: mov rax, [rbp+var_18] mov [rbp+var_30], rax mov [rbp+var_38], 0 loc_4DE77: mov rax, [rbp+var_38] cmp rax, [rbp+var_20] jnb loc_4DF0E mov eax, [rbp+var_C] mov [rbp+var_60], eax mov rax, [rbp+var_30] add rax, [rbp+var_38] mov [rbp+var_58], rax mov rax, [rbp+var_20] sub rax, [rbp+var_38] mov [rbp+var_50], rax mov rax, [rbp+var_28] add rax, [rbp+var_38] mov [rbp+var_48], rax lea rax, [rbp+var_60] mov edi, 4 mov rcx, [rax] mov [rsp+90h+var_90], rcx mov rcx, [rax+8] mov [rsp+90h+var_88], rcx mov rcx, [rax+10h] mov [rsp+90h+var_80], rcx mov rax, [rax+18h] mov [rsp+90h+var_78], rax call _ZN5nglog5tools12_GLOBAL__N_112FailureRetryIZNS0_L14ReadFromOffsetEiPvmmE3$_0EEDaT_i mov [rbp+var_40], rax cmp [rbp+var_40], 0 jge short loc_4DEF4 mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_4DF27 loc_4DEF4: cmp [rbp+var_40], 0 jnz short loc_4DEFD jmp short loc_4DF0E loc_4DEFD: mov rax, [rbp+var_40] add rax, [rbp+var_38] mov [rbp+var_38], rax jmp loc_4DE77 loc_4DF0E: mov rax, [rbp+var_38] cmp rax, [rbp+var_20] ja short loc_4DF1A jmp short loc_4DF1F loc_4DF1A: call _abort loc_4DF1F: mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_4DF27: mov rax, [rbp+var_8] add rsp, 90h pop rbp retn
unsigned long long nglog::tools::ReadFromOffset(nglog::tools *this, long long a2, char *a3, long long a4) { int v4; // edx int v5; // r8d int v6; // r9d int v8; // [rsp+30h] [rbp-60h] long long v9; // [rsp+50h] [rbp-40h] unsigned long long i; // [rsp+58h] [rbp-38h] int v13; // [rsp+84h] [rbp-Ch] v13 = (int)this; if ( (int)this < 0 ) abort(this, a2); if ( (unsigned long long)a3 > std::numeric_limits<long>::max() ) abort(this, a2); for ( i = 0LL; i < (unsigned long long)a3; i += v9 ) { v8 = v13; this = (nglog::tools *)&byte_4; v9 = nglog::tools::`anonymous namespace'::FailureRetry<nglog::tools::ReadFromOffset(int,void *,unsigned long,unsigned long)::$_0>( 4, a2, v4, (int)a3 - (int)i, v5, v6, v8, i + a2, &a3[-i], i + a4); if ( v9 < 0 ) return -1LL; if ( !v9 ) break; } if ( i > (unsigned long long)a3 ) abort(this, a2); return i; }
ReadFromOffset: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV dword ptr [RBP + -0xc],EDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX CMP dword ptr [RBP + -0xc],0x0 JL 0x0014de42 JMP 0x0014de47 LAB_0014de42: CALL 0x001093a0 LAB_0014de47: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x68],RAX CALL 0x0014f750 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x68] CMP RAX,RCX JA 0x0014de62 JMP 0x0014de67 LAB_0014de62: CALL 0x001093a0 LAB_0014de67: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x38],0x0 LAB_0014de77: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x20] JNC 0x0014df0e MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x60],EAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x20] SUB RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x48],RAX LEA RAX,[RBP + -0x60] MOV EDI,0x4 MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RCX MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x18],RAX CALL 0x0014e2d0 MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 JGE 0x0014def4 MOV qword ptr [RBP + -0x8],-0x1 JMP 0x0014df27 LAB_0014def4: CMP qword ptr [RBP + -0x40],0x0 JNZ 0x0014defd JMP 0x0014df0e LAB_0014defd: MOV RAX,qword ptr [RBP + -0x40] ADD RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x38],RAX JMP 0x0014de77 LAB_0014df0e: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x20] JA 0x0014df1a JMP 0x0014df1f LAB_0014df1a: CALL 0x001093a0 LAB_0014df1f: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_0014df27: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x90 POP RBP RET
/* nglog::tools::ReadFromOffset(int, void*, unsigned long, unsigned long) */ ulong nglog::tools::ReadFromOffset(int param_1,void *param_2,ulong param_3,ulong param_4) { ulong uVar1; long lVar2; ulong local_40; if (param_1 < 0) { /* WARNING: Subroutine does not return */ abort(); } uVar1 = std::numeric_limits<long>::max(); if (uVar1 < param_3) { /* WARNING: Subroutine does not return */ abort(); } for (local_40 = 0; local_40 < param_3; local_40 = lVar2 + local_40) { lVar2 = (anonymous_namespace):: FailureRetry<nglog::tools::ReadFromOffset(int,void*,unsigned_long,unsigned_long)::__0> (4); if (lVar2 < 0) { return 0xffffffffffffffff; } if (lVar2 == 0) break; } if (local_40 <= param_3) { return local_40; } /* WARNING: Subroutine does not return */ abort(); }
13,636
nglog::tools::ReadFromOffset(int, void*, unsigned long, unsigned long)
ng-log[P]ng-log/src/symbolize.cc
static ssize_t ReadFromOffset(const int fd, void* buf, const size_t count, const size_t offset) { NGLOG_SAFE_ASSERT(fd >= 0); NGLOG_SAFE_ASSERT(count <= static_cast<size_t>(std::numeric_limits<ssize_t>::max())); char* buf0 = reinterpret_cast<char*>(buf); size_t num_bytes = 0; while (num_bytes < count) { ssize_t len = FailureRetry([fd, p = buf0 + num_bytes, n = count - num_bytes, m = static_cast<off_t>(offset + num_bytes)] { return pread(fd, p, n, m); }); if (len < 0) { // There was an error other than EINTR. return -1; } if (len == 0) { // Reached EOF. break; } num_bytes += static_cast<size_t>(len); } NGLOG_SAFE_ASSERT(num_bytes <= count); return static_cast<ssize_t>(num_bytes); }
O1
cpp
nglog::tools::ReadFromOffset(int, void*, unsigned long, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, 0x10(%rsp) movq %rsi, 0x8(%rsp) testl %edi, %edi js 0x216fc testq %rdx, %rdx js 0x216fc movl %edi, %ebp xorl %r14d, %r14d movq %rdx, (%rsp) movq %rdx, %rbx subq %r14, %rbx jbe 0x216f7 movq 0x8(%rsp), %rax leaq (%rax,%r14), %r12 movq 0x10(%rsp), %rax leaq (%r14,%rax), %r15 movl %ebp, %edi movq %r12, %rsi movq %rbx, %rdx movq %r15, %rcx callq 0x76c0 movq %rax, %r13 cmpq $-0x1, %rax jne 0x216cb callq 0x7050 cmpl $0x4, (%rax) je 0x216a8 xorl %eax, %eax testq %r13, %r13 sete %al leal (%rax,%rax,2), %eax movl $0x0, %ecx cmovleq %rcx, %r13 movl $0x1, %ecx cmovsl %ecx, %eax addq %r13, %r14 testl %eax, %eax movq (%rsp), %rdx je 0x2168e cmpl $0x3, %eax jne 0x21701 cmpq %rdx, %r14 jbe 0x21708 callq 0x72b0 movq $-0x1, %r14 movq %r14, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN5nglog5toolsL14ReadFromOffsetEiPvmm: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rsp+48h+var_38], rcx mov [rsp+48h+var_40], rsi test edi, edi js short loc_216FC test rdx, rdx js short loc_216FC mov ebp, edi xor r14d, r14d mov [rsp+48h+var_48], rdx loc_2168E: mov rbx, rdx sub rbx, r14 jbe short loc_216F7 mov rax, [rsp+48h+var_40] lea r12, [rax+r14] mov rax, [rsp+48h+var_38] lea r15, [r14+rax] loc_216A8: mov edi, ebp mov rsi, r12 mov rdx, rbx mov rcx, r15 call _pread mov r13, rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_216CB call ___errno_location cmp dword ptr [rax], 4 jz short loc_216A8 loc_216CB: xor eax, eax test r13, r13 setz al lea eax, [rax+rax*2] mov ecx, 0 cmovle r13, rcx mov ecx, 1 cmovs eax, ecx add r14, r13 test eax, eax mov rdx, [rsp+48h+var_48] jz short loc_2168E cmp eax, 3 jnz short loc_21701 loc_216F7: cmp r14, rdx jbe short loc_21708 loc_216FC: call _abort loc_21701: mov r14, 0FFFFFFFFFFFFFFFFh loc_21708: mov rax, r14 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long nglog::tools::ReadFromOffset(unsigned long long this, long long a2, char *a3, long long a4) { unsigned int v4; // ebp unsigned long long v5; // r14 char *v6; // rbx long long v7; // r13 bool v8; // sf int v9; // eax char *v11; // [rsp+0h] [rbp-48h] if ( (this & 0x80000000) != 0LL || (long long)a3 < 0 ) LABEL_14: abort(this); v4 = this; v5 = 0LL; v11 = a3; do { v6 = &a3[-v5]; if ( (unsigned long long)a3 <= v5 ) goto LABEL_13; do { this = v4; v7 = pread(v4, a2 + v5, v6, v5 + a4); } while ( v7 == -1 && *(_DWORD *)__errno_location(v4) == 4 ); v8 = v7 < 0; v9 = 3 * (v7 == 0); if ( v7 <= 0 ) v7 = 0LL; if ( v8 ) v9 = 1; v5 += v7; a3 = v11; } while ( !v9 ); if ( v9 != 3 ) return -1LL; LABEL_13: if ( v5 > (unsigned long long)a3 ) goto LABEL_14; return v5; }
ReadFromOffset: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RCX MOV qword ptr [RSP + 0x8],RSI TEST EDI,EDI JS 0x001216fc TEST RDX,RDX JS 0x001216fc MOV EBP,EDI XOR R14D,R14D MOV qword ptr [RSP],RDX LAB_0012168e: MOV RBX,RDX SUB RBX,R14 JBE 0x001216f7 MOV RAX,qword ptr [RSP + 0x8] LEA R12,[RAX + R14*0x1] MOV RAX,qword ptr [RSP + 0x10] LEA R15,[R14 + RAX*0x1] LAB_001216a8: MOV EDI,EBP MOV RSI,R12 MOV RDX,RBX MOV RCX,R15 CALL 0x001076c0 MOV R13,RAX CMP RAX,-0x1 JNZ 0x001216cb CALL 0x00107050 CMP dword ptr [RAX],0x4 JZ 0x001216a8 LAB_001216cb: XOR EAX,EAX TEST R13,R13 SETZ AL LEA EAX,[RAX + RAX*0x2] MOV ECX,0x0 CMOVLE R13,RCX MOV ECX,0x1 CMOVS EAX,ECX ADD R14,R13 TEST EAX,EAX MOV RDX,qword ptr [RSP] JZ 0x0012168e CMP EAX,0x3 JNZ 0x00121701 LAB_001216f7: CMP R14,RDX JBE 0x00121708 LAB_001216fc: CALL 0x001072b0 LAB_00121701: MOV R14,-0x1 LAB_00121708: MOV RAX,R14 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nglog::tools::ReadFromOffset(int, void*, unsigned long, unsigned long) */ ulong nglog::tools::ReadFromOffset(int param_1,void *param_2,ulong param_3,ulong param_4) { char cVar1; ssize_t sVar2; int *piVar3; ulong uVar4; bool bVar5; if ((-1 < param_1) && (-1 < (long)param_3)) { uVar4 = 0; do { if (param_3 < uVar4 || param_3 - uVar4 == 0) goto LAB_001216f7; do { sVar2 = pread(param_1,(void *)((long)param_2 + uVar4),param_3 - uVar4,uVar4 + param_4); if (sVar2 != -1) break; piVar3 = __errno_location(); } while (*piVar3 == 4); bVar5 = sVar2 < 0; cVar1 = (sVar2 == 0) * '\x03'; if (sVar2 < 1) { sVar2 = 0; } if (bVar5) { cVar1 = '\x01'; } uVar4 = uVar4 + sVar2; } while (cVar1 == '\0'); if (cVar1 == '\x03') { LAB_001216f7: if (param_3 < uVar4) goto LAB_001216fc; } else { uVar4 = 0xffffffffffffffff; } return uVar4; } LAB_001216fc: /* WARNING: Subroutine does not return */ abort(); }
13,637
nglog::tools::ReadFromOffset(int, void*, unsigned long, unsigned long)
ng-log[P]ng-log/src/symbolize.cc
static ssize_t ReadFromOffset(const int fd, void* buf, const size_t count, const size_t offset) { NGLOG_SAFE_ASSERT(fd >= 0); NGLOG_SAFE_ASSERT(count <= static_cast<size_t>(std::numeric_limits<ssize_t>::max())); char* buf0 = reinterpret_cast<char*>(buf); size_t num_bytes = 0; while (num_bytes < count) { ssize_t len = FailureRetry([fd, p = buf0 + num_bytes, n = count - num_bytes, m = static_cast<off_t>(offset + num_bytes)] { return pread(fd, p, n, m); }); if (len < 0) { // There was an error other than EINTR. return -1; } if (len == 0) { // Reached EOF. break; } num_bytes += static_cast<size_t>(len); } NGLOG_SAFE_ASSERT(num_bytes <= count); return static_cast<ssize_t>(num_bytes); }
O2
cpp
nglog::tools::ReadFromOffset(int, void*, unsigned long, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp testl %edi, %edi js 0x1deb1 testq %rdx, %rdx js 0x1deb1 movl %edi, %ebp xorl %r12d, %r12d movq %rdx, 0x10(%rsp) movq %rsi, 0x8(%rsp) movq %rdx, %r13 subq %r12, %r13 jbe 0x1dea9 leaq (%rsi,%r12), %r14 movq %rcx, %rbx leaq (%r12,%rcx), %r15 movl %ebp, %edi movq %r14, %rsi movq %r13, %rdx movq %r15, %rcx callq 0x8730 cmpq $-0x1, %rax jne 0x1de76 callq 0x8050 cmpl $0x4, (%rax) je 0x1de54 jmp 0x1deb6 xorl %ecx, %ecx testq %rax, %rax sete %cl leal (%rcx,%rcx,2), %edi movl $0x0, %ecx cmovleq %rcx, %rax pushq $0x1 popq %rcx cmovsl %ecx, %edi addq %rax, %r12 testl %edi, %edi movq %rbx, %rcx movq 0x10(%rsp), %rdx movq 0x8(%rsp), %rsi je 0x1de41 cmpl $0x3, %edi jne 0x1deb6 movq %r12, %rax cmpq %rdx, %r12 jbe 0x1deb9 callq 0x8310 pushq $-0x1 popq %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN5nglog5toolsL14ReadFromOffsetEiPvmm: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h test edi, edi js loc_1DEB1 test rdx, rdx js short loc_1DEB1 mov ebp, edi xor r12d, r12d mov [rsp+48h+var_38], rdx mov [rsp+48h+var_40], rsi loc_1DE41: mov r13, rdx sub r13, r12 jbe short loc_1DEA9 lea r14, [rsi+r12] mov rbx, rcx lea r15, [r12+rcx] loc_1DE54: mov edi, ebp mov rsi, r14 mov rdx, r13 mov rcx, r15 call _pread cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_1DE76 call ___errno_location cmp dword ptr [rax], 4 jz short loc_1DE54 jmp short loc_1DEB6 loc_1DE76: xor ecx, ecx test rax, rax setz cl lea edi, [rcx+rcx*2] mov ecx, 0 cmovle rax, rcx push 1 pop rcx cmovs edi, ecx add r12, rax test edi, edi mov rcx, rbx mov rdx, [rsp+48h+var_38] mov rsi, [rsp+48h+var_40] jz short loc_1DE41 cmp edi, 3 jnz short loc_1DEB6 loc_1DEA9: mov rax, r12 cmp r12, rdx jbe short loc_1DEB9 loc_1DEB1: call _abort loc_1DEB6: push 0FFFFFFFFFFFFFFFFh pop rax loc_1DEB9: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long nglog::tools::ReadFromOffset(unsigned long long this, long long a2, char *a3, long long a4) { unsigned int v4; // ebp unsigned long long v5; // r12 char *v6; // r13 long long v7; // rbx long long v8; // r15 long long v9; // rax bool v10; // sf unsigned long long result; // rax long long v12; // [rsp+8h] [rbp-40h] char *v13; // [rsp+10h] [rbp-38h] if ( (this & 0x80000000) != 0LL || (long long)a3 < 0 ) LABEL_16: abort(this); v4 = this; v5 = 0LL; v13 = a3; v12 = a2; do { v6 = &a3[-v5]; if ( (unsigned long long)a3 <= v5 ) goto LABEL_15; v7 = a4; v8 = v5 + a4; while ( 1 ) { v9 = pread(v4, a2 + v5, v6, v8); if ( v9 != -1 ) break; if ( *(_DWORD *)__errno_location(v4) != 4 ) return -1LL; } v10 = v9 < 0; this = 3 * (unsigned int)(v9 == 0); if ( v9 <= 0 ) v9 = 0LL; if ( v10 ) this = 1LL; v5 += v9; a4 = v7; a3 = v13; a2 = v12; } while ( !(_DWORD)this ); if ( (_DWORD)this != 3 ) return -1LL; LABEL_15: result = v5; if ( v5 > (unsigned long long)a3 ) goto LABEL_16; return result; }
ReadFromOffset: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 TEST EDI,EDI JS 0x0011deb1 TEST RDX,RDX JS 0x0011deb1 MOV EBP,EDI XOR R12D,R12D MOV qword ptr [RSP + 0x10],RDX MOV qword ptr [RSP + 0x8],RSI LAB_0011de41: MOV R13,RDX SUB R13,R12 JBE 0x0011dea9 LEA R14,[RSI + R12*0x1] MOV RBX,RCX LEA R15,[R12 + RCX*0x1] LAB_0011de54: MOV EDI,EBP MOV RSI,R14 MOV RDX,R13 MOV RCX,R15 CALL 0x00108730 CMP RAX,-0x1 JNZ 0x0011de76 CALL 0x00108050 CMP dword ptr [RAX],0x4 JZ 0x0011de54 JMP 0x0011deb6 LAB_0011de76: XOR ECX,ECX TEST RAX,RAX SETZ CL LEA EDI,[RCX + RCX*0x2] MOV ECX,0x0 CMOVLE RAX,RCX PUSH 0x1 POP RCX CMOVS EDI,ECX ADD R12,RAX TEST EDI,EDI MOV RCX,RBX MOV RDX,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x8] JZ 0x0011de41 CMP EDI,0x3 JNZ 0x0011deb6 LAB_0011dea9: MOV RAX,R12 CMP R12,RDX JBE 0x0011deb9 LAB_0011deb1: CALL 0x00108310 LAB_0011deb6: PUSH -0x1 POP RAX LAB_0011deb9: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nglog::tools::ReadFromOffset(int, void*, unsigned long, unsigned long) */ ulong nglog::tools::ReadFromOffset(int param_1,void *param_2,ulong param_3,ulong param_4) { long lVar1; int *piVar2; char cVar3; ulong uVar4; bool bVar5; if ((-1 < param_1) && (-1 < (long)param_3)) { uVar4 = 0; do { if (param_3 < uVar4 || param_3 - uVar4 == 0) goto LAB_0011dea9; while (lVar1 = pread(param_1,(void *)((long)param_2 + uVar4),param_3 - uVar4,uVar4 + param_4), lVar1 == -1) { piVar2 = __errno_location(); if (*piVar2 != 4) goto LAB_0011deb6; } bVar5 = lVar1 < 0; cVar3 = (lVar1 == 0) * '\x03'; if (lVar1 < 1) { lVar1 = 0; } if (bVar5) { cVar3 = '\x01'; } uVar4 = uVar4 + lVar1; } while (cVar3 == '\0'); if (cVar3 == '\x03') { LAB_0011dea9: if (param_3 < uVar4) goto LAB_0011deb1; } else { LAB_0011deb6: uVar4 = 0xffffffffffffffff; } return uVar4; } LAB_0011deb1: /* WARNING: Subroutine does not return */ abort(); }
13,638
downheap
eloqsql/mysys/queues.c
void _downheap(QUEUE *queue, uint idx) { uchar *element= queue->root[idx]; uint next_index, elements= queue->elements, half_queue= elements >> 1, offset_to_key= queue->offset_to_key, offset_to_queue_pos= queue->offset_to_queue_pos; while (idx <= half_queue) { next_index= idx+idx; if (next_index < elements && (queue->compare(queue->first_cmp_arg, queue->root[next_index]+offset_to_key, queue->root[next_index+1]+offset_to_key) * queue->max_at_top) > 0) next_index++; if ((queue->compare(queue->first_cmp_arg, queue->root[next_index]+offset_to_key, element+offset_to_key) * queue->max_at_top) >= 0) break; queue->root[idx]= queue->root[next_index]; if (offset_to_queue_pos) (*(uint*) (queue->root[idx] + offset_to_queue_pos-1))= idx; idx= next_index; } queue->root[idx]=element; if (offset_to_queue_pos) (*(uint*) (element + offset_to_queue_pos-1))= idx; }
O0
c
downheap: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movl -0xc(%rbp), %ecx movq (%rax,%rcx,8), %rax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movl 0x10(%rax), %eax movl %eax, -0x20(%rbp) movl -0x20(%rbp), %eax shrl %eax movl %eax, -0x24(%rbp) movq -0x8(%rbp), %rax movl 0x18(%rax), %eax movl %eax, -0x28(%rbp) movq -0x8(%rbp), %rax movl 0x1c(%rax), %eax movl %eax, -0x2c(%rbp) movl -0xc(%rbp), %eax cmpl -0x24(%rbp), %eax ja 0xf76bd movl -0xc(%rbp), %eax addl -0xc(%rbp), %eax movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %eax cmpl -0x20(%rbp), %eax jae 0xf7639 movq -0x8(%rbp), %rax movq 0x28(%rax), %rax movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rdi movq -0x8(%rbp), %rcx movq (%rcx), %rcx movl -0x1c(%rbp), %edx movq (%rcx,%rdx,8), %rsi movl -0x28(%rbp), %ecx addq %rcx, %rsi movq -0x8(%rbp), %rcx movq (%rcx), %rcx movl -0x1c(%rbp), %edx addl $0x1, %edx movl %edx, %edx movq (%rcx,%rdx,8), %rdx movl -0x28(%rbp), %ecx addq %rcx, %rdx callq *%rax movq -0x8(%rbp), %rcx imull 0x24(%rcx), %eax cmpl $0x0, %eax jle 0xf7639 movl -0x1c(%rbp), %eax addl $0x1, %eax movl %eax, -0x1c(%rbp) movq -0x8(%rbp), %rax movq 0x28(%rax), %rax movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rdi movq -0x8(%rbp), %rcx movq (%rcx), %rcx movl -0x1c(%rbp), %edx movq (%rcx,%rdx,8), %rsi movl -0x28(%rbp), %ecx addq %rcx, %rsi movq -0x18(%rbp), %rdx movl -0x28(%rbp), %ecx addq %rcx, %rdx callq *%rax movq -0x8(%rbp), %rcx imull 0x24(%rcx), %eax cmpl $0x0, %eax jl 0xf7678 jmp 0xf76bd movq -0x8(%rbp), %rax movq (%rax), %rax movl -0x1c(%rbp), %ecx movq (%rax,%rcx,8), %rdx movq -0x8(%rbp), %rax movq (%rax), %rax movl -0xc(%rbp), %ecx movq %rdx, (%rax,%rcx,8) cmpl $0x0, -0x2c(%rbp) je 0xf76b2 movl -0xc(%rbp), %edx movq -0x8(%rbp), %rax movq (%rax), %rax movl -0xc(%rbp), %ecx movq (%rax,%rcx,8), %rax movl -0x2c(%rbp), %ecx movl %edx, -0x1(%rax,%rcx) movl -0x1c(%rbp), %eax movl %eax, -0xc(%rbp) jmp 0xf75c7 movq -0x18(%rbp), %rdx movq -0x8(%rbp), %rax movq (%rax), %rax movl -0xc(%rbp), %ecx movq %rdx, (%rax,%rcx,8) cmpl $0x0, -0x2c(%rbp) je 0xf76e3 movl -0xc(%rbp), %edx movq -0x18(%rbp), %rax movl -0x2c(%rbp), %ecx movl %edx, -0x1(%rax,%rcx) addq $0x30, %rsp popq %rbp retq nopl (%rax)
_downheap: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov rax, [rbp+var_8] mov rax, [rax] mov ecx, [rbp+var_C] mov rax, [rax+rcx*8] mov [rbp+var_18], rax mov rax, [rbp+var_8] mov eax, [rax+10h] mov [rbp+var_20], eax mov eax, [rbp+var_20] shr eax, 1 mov [rbp+var_24], eax mov rax, [rbp+var_8] mov eax, [rax+18h] mov [rbp+var_28], eax mov rax, [rbp+var_8] mov eax, [rax+1Ch] mov [rbp+var_2C], eax loc_F75C7: mov eax, [rbp+var_C] cmp eax, [rbp+var_24] ja loc_F76BD mov eax, [rbp+var_C] add eax, [rbp+var_C] mov [rbp+var_1C], eax mov eax, [rbp+var_1C] cmp eax, [rbp+var_20] jnb short loc_F7639 mov rax, [rbp+var_8] mov rax, [rax+28h] mov rcx, [rbp+var_8] mov rdi, [rcx+8] mov rcx, [rbp+var_8] mov rcx, [rcx] mov edx, [rbp+var_1C] mov rsi, [rcx+rdx*8] mov ecx, [rbp+var_28] add rsi, rcx mov rcx, [rbp+var_8] mov rcx, [rcx] mov edx, [rbp+var_1C] add edx, 1 mov edx, edx mov rdx, [rcx+rdx*8] mov ecx, [rbp+var_28] add rdx, rcx call rax mov rcx, [rbp+var_8] imul eax, [rcx+24h] cmp eax, 0 jle short loc_F7639 mov eax, [rbp+var_1C] add eax, 1 mov [rbp+var_1C], eax loc_F7639: mov rax, [rbp+var_8] mov rax, [rax+28h] mov rcx, [rbp+var_8] mov rdi, [rcx+8] mov rcx, [rbp+var_8] mov rcx, [rcx] mov edx, [rbp+var_1C] mov rsi, [rcx+rdx*8] mov ecx, [rbp+var_28] add rsi, rcx mov rdx, [rbp+var_18] mov ecx, [rbp+var_28] add rdx, rcx call rax mov rcx, [rbp+var_8] imul eax, [rcx+24h] cmp eax, 0 jl short loc_F7678 jmp short loc_F76BD loc_F7678: mov rax, [rbp+var_8] mov rax, [rax] mov ecx, [rbp+var_1C] mov rdx, [rax+rcx*8] mov rax, [rbp+var_8] mov rax, [rax] mov ecx, [rbp+var_C] mov [rax+rcx*8], rdx cmp [rbp+var_2C], 0 jz short loc_F76B2 mov edx, [rbp+var_C] mov rax, [rbp+var_8] mov rax, [rax] mov ecx, [rbp+var_C] mov rax, [rax+rcx*8] mov ecx, [rbp+var_2C] mov [rax+rcx-1], edx loc_F76B2: mov eax, [rbp+var_1C] mov [rbp+var_C], eax jmp loc_F75C7 loc_F76BD: mov rdx, [rbp+var_18] mov rax, [rbp+var_8] mov rax, [rax] mov ecx, [rbp+var_C] mov [rax+rcx*8], rdx cmp [rbp+var_2C], 0 jz short loc_F76E3 mov edx, [rbp+var_C] mov rax, [rbp+var_18] mov ecx, [rbp+var_2C] mov [rax+rcx-1], edx loc_F76E3: add rsp, 30h pop rbp retn
long long downheap(long long *a1, unsigned int a2) { long long result; // rax unsigned int v3; // [rsp+4h] [rbp-2Ch] unsigned int v4; // [rsp+8h] [rbp-28h] unsigned int v5; // [rsp+10h] [rbp-20h] unsigned int v6; // [rsp+14h] [rbp-1Ch] long long v7; // [rsp+18h] [rbp-18h] unsigned int v8; // [rsp+24h] [rbp-Ch] v8 = a2; v7 = *(_QWORD *)(*a1 + 8LL * a2); v5 = *((_DWORD *)a1 + 4); v4 = *((_DWORD *)a1 + 6); v3 = *((_DWORD *)a1 + 7); while ( v8 <= v5 >> 1 ) { v6 = 2 * v8; if ( 2 * v8 < v5 && (int)(*((_DWORD *)a1 + 9) * ((long long ( *)(long long, _QWORD, _QWORD))a1[5])( a1[1], v4 + *(_QWORD *)(*a1 + 8LL * v6), v4 + *(_QWORD *)(*a1 + 8LL * (v6 + 1)))) > 0 ) { ++v6; } if ( (int)(*((_DWORD *)a1 + 9) * ((long long ( *)(long long, _QWORD, long long))a1[5])( a1[1], v4 + *(_QWORD *)(*a1 + 8LL * v6), v4 + v7)) >= 0 ) break; *(_QWORD *)(*a1 + 8LL * v8) = *(_QWORD *)(*a1 + 8LL * v6); if ( v3 ) *(_DWORD *)(*(_QWORD *)(*a1 + 8LL * v8) + v3 - 1LL) = v8; v8 = v6; } result = *a1; *(_QWORD *)(*a1 + 8LL * v8) = v7; if ( v3 ) { result = v7; *(_DWORD *)(v7 + v3 - 1) = v8; } return result; }
_downheap: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x10] MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x20] SHR EAX,0x1 MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x18] MOV dword ptr [RBP + -0x28],EAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x1c] MOV dword ptr [RBP + -0x2c],EAX LAB_001f75c7: MOV EAX,dword ptr [RBP + -0xc] CMP EAX,dword ptr [RBP + -0x24] JA 0x001f76bd MOV EAX,dword ptr [RBP + -0xc] ADD EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x1c],EAX MOV EAX,dword ptr [RBP + -0x1c] CMP EAX,dword ptr [RBP + -0x20] JNC 0x001f7639 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x8] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX] MOV EDX,dword ptr [RBP + -0x1c] MOV RSI,qword ptr [RCX + RDX*0x8] MOV ECX,dword ptr [RBP + -0x28] ADD RSI,RCX MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX] MOV EDX,dword ptr [RBP + -0x1c] ADD EDX,0x1 MOV EDX,EDX MOV RDX,qword ptr [RCX + RDX*0x8] MOV ECX,dword ptr [RBP + -0x28] ADD RDX,RCX CALL RAX MOV RCX,qword ptr [RBP + -0x8] IMUL EAX,dword ptr [RCX + 0x24] CMP EAX,0x0 JLE 0x001f7639 MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX LAB_001f7639: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x8] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX] MOV EDX,dword ptr [RBP + -0x1c] MOV RSI,qword ptr [RCX + RDX*0x8] MOV ECX,dword ptr [RBP + -0x28] ADD RSI,RCX MOV RDX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x28] ADD RDX,RCX CALL RAX MOV RCX,qword ptr [RBP + -0x8] IMUL EAX,dword ptr [RCX + 0x24] CMP EAX,0x0 JL 0x001f7678 JMP 0x001f76bd LAB_001f7678: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x1c] MOV RDX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0xc] MOV qword ptr [RAX + RCX*0x8],RDX CMP dword ptr [RBP + -0x2c],0x0 JZ 0x001f76b2 MOV EDX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RAX + RCX*0x8] MOV ECX,dword ptr [RBP + -0x2c] MOV dword ptr [RAX + RCX*0x1 + -0x1],EDX LAB_001f76b2: MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0xc],EAX JMP 0x001f75c7 LAB_001f76bd: MOV RDX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0xc] MOV qword ptr [RAX + RCX*0x8],RDX CMP dword ptr [RBP + -0x2c],0x0 JZ 0x001f76e3 MOV EDX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x2c] MOV dword ptr [RAX + RCX*0x1 + -0x1],EDX LAB_001f76e3: ADD RSP,0x30 POP RBP RET
void _downheap(long *param_1,uint param_2) { uint uVar1; uint uVar2; uint uVar3; long lVar4; int iVar5; uint local_24; uint local_14; lVar4 = *(long *)(*param_1 + (ulong)param_2 * 8); uVar1 = *(uint *)(param_1 + 2); uVar2 = *(uint *)(param_1 + 3); uVar3 = *(uint *)((long)param_1 + 0x1c); local_14 = param_2; while (local_14 <= uVar1 >> 1) { local_24 = local_14 * 2; if ((local_24 < uVar1) && (iVar5 = (*(code *)param_1[5]) (param_1[1],*(long *)(*param_1 + (ulong)local_24 * 8) + (ulong)uVar2, *(long *)(*param_1 + (ulong)(local_24 + 1) * 8) + (ulong)uVar2), 0 < iVar5 * *(int *)((long)param_1 + 0x24))) { local_24 = local_24 + 1; } iVar5 = (*(code *)param_1[5]) (param_1[1],*(long *)(*param_1 + (ulong)local_24 * 8) + (ulong)uVar2, lVar4 + (ulong)uVar2); if (-1 < iVar5 * *(int *)((long)param_1 + 0x24)) break; *(int8 *)(*param_1 + (ulong)local_14 * 8) = *(int8 *)(*param_1 + (ulong)local_24 * 8); if (uVar3 != 0) { *(uint *)(*(long *)(*param_1 + (ulong)local_14 * 8) + -1 + (ulong)uVar3) = local_14; } local_14 = local_24; } *(long *)(*param_1 + (ulong)local_14 * 8) = lVar4; if (uVar3 != 0) { *(uint *)(lVar4 + -1 + (ulong)uVar3) = local_14; } return; }
13,639
fill_answer_1_fields(THD*, List<Item>*)
eloqsql/sql/sql_help.cc
static void fill_answer_1_fields(THD *thd, List<Item> *field_list) { MEM_ROOT *mem_root= thd->mem_root; field_list->push_back(new (mem_root) Item_empty_string(thd, "name", 64), mem_root); field_list->push_back(new (mem_root) Item_empty_string(thd, "description", 1000), mem_root); field_list->push_back(new (mem_root) Item_empty_string(thd, "example", 1000), mem_root); }
O0
cpp
fill_answer_1_fields(THD*, List<Item>*): pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x18(%rbp), %rsi movq %rsi, -0x78(%rbp) movl $0x70, %edi callq 0x4af070 movq %rax, %rcx movq %rcx, -0x70(%rbp) movb $0x0, -0x19(%rbp) xorl %eax, %eax cmpq $0x0, %rcx movq %rax, -0x68(%rbp) je 0xa89bb0 movq -0x70(%rbp), %rdi movb $0x1, -0x19(%rbp) movq -0x8(%rbp), %rsi leaq 0x2fed1b(%rip), %rdx # 0xd888ae leaq 0xb28366(%rip), %r8 # 0x15b1f00 movl $0x40, %ecx callq 0x4af140 jmp 0xa89ba6 movq -0x70(%rbp), %rax movq %rax, -0x68(%rbp) jmp 0xa89bb0 movq -0x80(%rbp), %rdi movq -0x68(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x4ad9c0 movq -0x10(%rbp), %rax movq %rax, -0xa0(%rbp) movq -0x18(%rbp), %rsi movq %rsi, -0x98(%rbp) movl $0x70, %edi callq 0x4af070 movq %rax, %rcx movq %rcx, -0x90(%rbp) movb $0x0, -0x41(%rbp) xorl %eax, %eax cmpq $0x0, %rcx movq %rax, -0x88(%rbp) je 0xa89c46 movq -0x90(%rbp), %rdi movq -0x98(%rbp), %rax movq %rdi, -0x38(%rbp) movq %rax, -0x40(%rbp) movb $0x1, -0x41(%rbp) movq -0x8(%rbp), %rsi leaq 0x305cf1(%rip), %rdx # 0xd8f914 leaq 0xb282d6(%rip), %r8 # 0x15b1f00 movl $0x3e8, %ecx # imm = 0x3E8 callq 0x4af140 jmp 0xa89c36 movq -0x90(%rbp), %rax movq %rax, -0x88(%rbp) jmp 0xa89c46 movq -0xa0(%rbp), %rdi movq -0x88(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x4ad9c0 movq -0x10(%rbp), %rax movq %rax, -0xc0(%rbp) movq -0x18(%rbp), %rsi movq %rsi, -0xb8(%rbp) movl $0x70, %edi callq 0x4af070 movq %rax, %rcx movq %rcx, -0xb0(%rbp) movb $0x0, -0x59(%rbp) xorl %eax, %eax cmpq $0x0, %rcx movq %rax, -0xa8(%rbp) je 0xa89ce2 movq -0xb0(%rbp), %rdi movq -0xb8(%rbp), %rax movq %rdi, -0x50(%rbp) movq %rax, -0x58(%rbp) movb $0x1, -0x59(%rbp) movq -0x8(%rbp), %rsi leaq 0x34326a(%rip), %rdx # 0xdccf29 leaq 0xb2823a(%rip), %r8 # 0x15b1f00 movl $0x3e8, %ecx # imm = 0x3E8 callq 0x4af140 jmp 0xa89cd2 movq -0xb0(%rbp), %rax movq %rax, -0xa8(%rbp) jmp 0xa89ce2 movq -0xc0(%rbp), %rdi movq -0xa8(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x4ad9c0 addq $0xc0, %rsp popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x28(%rbp) movl %eax, -0x2c(%rbp) testb $0x1, -0x19(%rbp) jne 0xa89d16 jmp 0xa89d23 movq -0x78(%rbp), %rsi movq -0x70(%rbp), %rdi callq 0x4af130 jmp 0xa89d6b movq %rax, %rcx movl %edx, %eax movq %rcx, -0x28(%rbp) movl %eax, -0x2c(%rbp) testb $0x1, -0x41(%rbp) jne 0xa89d39 jmp 0xa89d46 movq -0x38(%rbp), %rdi movq -0x40(%rbp), %rsi callq 0x4af130 jmp 0xa89d6b movq %rax, %rcx movl %edx, %eax movq %rcx, -0x28(%rbp) movl %eax, -0x2c(%rbp) testb $0x1, -0x59(%rbp) jne 0xa89d5c jmp 0xa89d69 movq -0x50(%rbp), %rdi movq -0x58(%rbp), %rsi callq 0x4af130 jmp 0xa89d6b movq -0x28(%rbp), %rdi callq 0x433ff0 nopw %cs:(%rax,%rax)
_ZL20fill_answer_1_fieldsP3THDP4ListI4ItemE: push rbp mov rbp, rsp sub rsp, 0C0h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov rax, [rax+28h] mov [rbp+var_18], rax mov rax, [rbp+var_10] mov [rbp+var_80], rax mov rsi, [rbp+var_18] mov [rbp+var_78], rsi mov edi, 70h ; 'p' call _ZN4ItemnwEmP11st_mem_root; Item::operator new(ulong,st_mem_root *) mov rcx, rax mov [rbp+var_70], rcx mov [rbp+var_19], 0 xor eax, eax cmp rcx, 0 mov [rbp+var_68], rax jz short loc_A89BB0 mov rdi, [rbp+var_70]; this mov [rbp+var_19], 1 mov rsi, [rbp+var_8]; THD * lea rdx, aWhileReadingFi+13h; char * lea r8, my_charset_utf8mb3_general_ci; charset_info_st * mov ecx, 40h ; '@'; unsigned int call _ZN17Item_empty_stringC2EP3THDPKcjPK15charset_info_st; Item_empty_string::Item_empty_string(THD *,char const*,uint,charset_info_st const*) jmp short $+2 loc_A89BA6: mov rax, [rbp+var_70] mov [rbp+var_68], rax jmp short $+2 loc_A89BB0: mov rdi, [rbp+var_80] mov rsi, [rbp+var_68] mov rdx, [rbp+var_18] call _ZN4ListI4ItemE9push_backEPS0_P11st_mem_root; List<Item>::push_back(Item*,st_mem_root *) mov rax, [rbp+var_10] mov [rbp+var_A0], rax mov rsi, [rbp+var_18] mov [rbp+var_98], rsi mov edi, 70h ; 'p' call _ZN4ItemnwEmP11st_mem_root; Item::operator new(ulong,st_mem_root *) mov rcx, rax mov [rbp+var_90], rcx mov [rbp+var_41], 0 xor eax, eax cmp rcx, 0 mov [rbp+var_88], rax jz short loc_A89C46 mov rdi, [rbp+var_90]; this mov rax, [rbp+var_98] mov [rbp+var_38], rdi mov [rbp+var_40], rax mov [rbp+var_41], 1 mov rsi, [rbp+var_8]; THD * lea rdx, aOutOfMemoryWhi_2+26h; char * lea r8, my_charset_utf8mb3_general_ci; charset_info_st * mov ecx, 3E8h; unsigned int call _ZN17Item_empty_stringC2EP3THDPKcjPK15charset_info_st; Item_empty_string::Item_empty_string(THD *,char const*,uint,charset_info_st const*) jmp short $+2 loc_A89C36: mov rax, [rbp+var_90] mov [rbp+var_88], rax jmp short $+2 loc_A89C46: mov rdi, [rbp+var_A0] mov rsi, [rbp+var_88] mov rdx, [rbp+var_18] call _ZN4ListI4ItemE9push_backEPS0_P11st_mem_root; List<Item>::push_back(Item*,st_mem_root *) mov rax, [rbp+var_10] mov [rbp+var_C0], rax mov rsi, [rbp+var_18] mov [rbp+var_B8], rsi mov edi, 70h ; 'p' call _ZN4ItemnwEmP11st_mem_root; Item::operator new(ulong,st_mem_root *) mov rcx, rax mov [rbp+var_B0], rcx mov [rbp+var_59], 0 xor eax, eax cmp rcx, 0 mov [rbp+var_A8], rax jz short loc_A89CE2 mov rdi, [rbp+var_B0]; this mov rax, [rbp+var_B8] mov [rbp+var_50], rdi mov [rbp+var_58], rax mov [rbp+var_59], 1 mov rsi, [rbp+var_8]; THD * lea rdx, aExample; "example" lea r8, my_charset_utf8mb3_general_ci; charset_info_st * mov ecx, 3E8h; unsigned int call _ZN17Item_empty_stringC2EP3THDPKcjPK15charset_info_st; Item_empty_string::Item_empty_string(THD *,char const*,uint,charset_info_st const*) jmp short $+2 loc_A89CD2: mov rax, [rbp+var_B0] mov [rbp+var_A8], rax jmp short $+2 loc_A89CE2: mov rdi, [rbp+var_C0] mov rsi, [rbp+var_A8] mov rdx, [rbp+var_18] call _ZN4ListI4ItemE9push_backEPS0_P11st_mem_root; List<Item>::push_back(Item*,st_mem_root *) add rsp, 0C0h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_28], rcx mov [rbp+var_2C], eax test [rbp+var_19], 1 jnz short loc_A89D16 jmp short loc_A89D23 loc_A89D16: mov rsi, [rbp+var_78] mov rdi, [rbp+var_70] call _ZN4ItemdlEPvP11st_mem_root; Item::operator delete(void *,st_mem_root *) loc_A89D23: jmp short loc_A89D6B mov rcx, rax mov eax, edx mov [rbp+var_28], rcx mov [rbp+var_2C], eax test [rbp+var_41], 1 jnz short loc_A89D39 jmp short loc_A89D46 loc_A89D39: mov rdi, [rbp+var_38] mov rsi, [rbp+var_40] call _ZN4ItemdlEPvP11st_mem_root; Item::operator delete(void *,st_mem_root *) loc_A89D46: jmp short loc_A89D6B mov rcx, rax mov eax, edx mov [rbp+var_28], rcx mov [rbp+var_2C], eax test [rbp+var_59], 1 jnz short loc_A89D5C jmp short loc_A89D69 loc_A89D5C: mov rdi, [rbp+var_50] mov rsi, [rbp+var_58] call _ZN4ItemdlEPvP11st_mem_root; Item::operator delete(void *,st_mem_root *) loc_A89D69: jmp short $+2 loc_A89D6B: mov rdi, [rbp+var_28] call __Unwind_Resume
char fill_answer_1_fields(THD *a1, long long a2) { Item_empty_string *v3; // [rsp+10h] [rbp-B0h] Item_empty_string *v4; // [rsp+18h] [rbp-A8h] Item_empty_string *v5; // [rsp+30h] [rbp-90h] Item_empty_string *v6; // [rsp+38h] [rbp-88h] Item_empty_string *v7; // [rsp+50h] [rbp-70h] Item_empty_string *v8; // [rsp+58h] [rbp-68h] long long v9; // [rsp+A8h] [rbp-18h] v9 = *((_QWORD *)a1 + 5); v7 = (Item_empty_string *)Item::operator new(112LL, v9); v8 = 0LL; if ( v7 ) { Item_empty_string::Item_empty_string(v7, a1, "name", 64, (const charset_info_st *)&my_charset_utf8mb3_general_ci); v8 = v7; } List<Item>::push_back(a2, v8, v9); v5 = (Item_empty_string *)Item::operator new(112LL, v9); v6 = 0LL; if ( v5 ) { Item_empty_string::Item_empty_string( v5, a1, "description", 1000, (const charset_info_st *)&my_charset_utf8mb3_general_ci); v6 = v5; } List<Item>::push_back(a2, v6, v9); v3 = (Item_empty_string *)Item::operator new(112LL, v9); v4 = 0LL; if ( v3 ) { Item_empty_string::Item_empty_string( v3, a1, "example", 1000, (const charset_info_st *)&my_charset_utf8mb3_general_ci); v4 = v3; } return List<Item>::push_back(a2, v4, v9); }
~Item_bool_func_args_geometry_geometry: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI UD2
/* Item_bool_func_args_geometry_geometry::~Item_bool_func_args_geometry_geometry() */ void __thiscall Item_bool_func_args_geometry_geometry::~Item_bool_func_args_geometry_geometry (Item_bool_func_args_geometry_geometry *this) { code *pcVar1; /* WARNING: Does not return */ pcVar1 = (code *)invalidInstructionException(); (*pcVar1)(); }
13,640
js_parse_string
bluesky950520[P]quickjs/quickjs.c
static __exception int js_parse_string(JSParseState *s, int sep, BOOL do_throw, const uint8_t *p, JSToken *token, const uint8_t **pp) { const uint8_t *p_next; int ret; uint32_t c; StringBuffer b_s, *b = &b_s; /* string */ if (string_buffer_init(s->ctx, b, 32)) goto fail; for(;;) { if (p >= s->buf_end) goto invalid_char; c = *p; if (c < 0x20) { if (sep == '`') { if (c == '\r') { if (p[1] == '\n') p++; c = '\n'; } /* do not update s->line_num */ } else if (c == '\n' || c == '\r') goto invalid_char; } p++; if (c == sep) break; if (c == '$' && *p == '{' && sep == '`') { /* template start or middle part */ p++; break; } if (c == '\\') { c = *p; switch(c) { case '\0': if (p >= s->buf_end) { if (sep != '`') goto invalid_char; if (do_throw) js_parse_error(s, "Unexpected end of input"); goto fail; } p++; break; case '\'': case '\"': case '\\': p++; break; case '\r': /* accept DOS and MAC newline sequences */ if (p[1] == '\n') { p++; } /* fall thru */ case '\n': /* ignore escaped newline sequence */ p++; if (sep != '`') { s->line_num++; s->eol = &p[-1]; s->mark = p; } continue; default: if (c == '0' && !(p[1] >= '0' && p[1] <= '9')) { /* accept isolated \0 */ p++; c = '\0'; } else if ((c >= '0' && c <= '9') && (s->cur_func->is_strict_mode || sep == '`')) { if (do_throw) { js_parse_error(s, "%s are not allowed in %s", (c >= '8') ? "\\8 and \\9" : "Octal escape sequences", (sep == '`') ? "template strings" : "strict mode"); } goto fail; } else if (c >= 0x80) { c = utf8_decode(p, &p_next); if (p_next == p + 1) { goto invalid_utf8; } p = p_next; /* LS or PS are skipped */ if (c == CP_LS || c == CP_PS) continue; } else { ret = lre_parse_escape(&p, TRUE); if (ret == -1) { if (do_throw) { js_parse_error(s, "Invalid %s escape sequence", c == 'u' ? "Unicode" : "hexadecimal"); } goto fail; } else if (ret < 0) { /* ignore the '\' (could output a warning) */ p++; } else { c = ret; } } break; } } else if (c >= 0x80) { c = utf8_decode(p - 1, &p_next); if (p_next == p) goto invalid_utf8; p = p_next; } if (string_buffer_putc(b, c)) goto fail; } token->val = TOK_STRING; token->u.str.sep = c; token->u.str.str = string_buffer_end(b); *pp = p; return 0; invalid_utf8: if (do_throw) js_parse_error(s, "invalid UTF-8 sequence"); goto fail; invalid_char: if (do_throw) js_parse_error(s, "unexpected end of string"); fail: string_buffer_free(b); return -1; }
O1
c
js_parse_string: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r9, %r14 movq %r8, %r15 movl %edx, %r12d movl %esi, %ebp movq %rdi, %rbx movq %rcx, (%rsp) movq (%rdi), %rdi movq %rdi, 0x10(%rsp) movsd 0x3ea0f(%rip), %xmm0 # 0x9d070 movups %xmm0, 0x20(%rsp) movl $0x20, %esi xorl %edx, %edx callq 0x1ff5f movq %rax, 0x18(%rsp) testq %rax, %rax je 0x5e99d movq %r14, 0x30(%rsp) movq (%rsp), %rax movq 0x78(%rbx), %rcx cmpq %rcx, %rax jae 0x5e8e7 leaq 0x10(%rsp), %r13 movzbl (%rax), %edx cmpl $0x1f, %edx ja 0x5e6d0 cmpl $0x60, %ebp jne 0x5e6be cmpb $0xd, %dl jne 0x5e6d0 movb $0xa, %dl cmpb $0xa, 0x1(%rax) jne 0x5e6d0 incq %rax movq %rax, (%rsp) jmp 0x5e6d0 cmpl $0xa, %edx je 0x5e8e7 cmpl $0xd, %edx je 0x5e8e7 movzbl %dl, %r14d movq (%rsp), %rdi leaq 0x1(%rdi), %rax movq %rax, (%rsp) cmpl %ebp, %r14d je 0x5e899 cmpl $0x5c, %r14d je 0x5e709 cmpl $0x24, %r14d jne 0x5e736 cmpl $0x60, %ebp jne 0x5e703 cmpb $0x7b, (%rax) je 0x5e891 cmpl $0x5c, %r14d jne 0x5e736 movzbl (%rax), %r14d cmpl $0x21, %r14d jle 0x5e763 cmpl $0x2f, %r14d jg 0x5e7ad cmpl $0x22, %r14d je 0x5e7b9 cmpl $0x27, %r14d je 0x5e7b9 jmp 0x5e7d8 testb %dl, %dl jns 0x5e82e leaq 0x8(%rsp), %rsi callq 0x1ab15 movl %eax, %r14d movq 0x8(%rsp), %rax cmpq (%rsp), %rax je 0x5e8c6 movq %rax, (%rsp) jmp 0x5e82e testl %r14d, %r14d je 0x5e7c3 cmpl $0xa, %r14d je 0x5e782 cmpl $0xd, %r14d jne 0x5e7d8 cmpb $0xa, 0x2(%rdi) jne 0x5e782 addq $0x2, %rdi movq %rdi, (%rsp) movq (%rsp), %rax leaq 0x1(%rax), %rcx movq %rcx, (%rsp) cmpl $0x60, %ebp je 0x5e841 incl 0x10(%rbx) movq %rax, 0x80(%rbx) movq %rcx, 0x88(%rbx) jmp 0x5e841 cmpl $0x30, %r14d je 0x5e7cd cmpl $0x5c, %r14d jne 0x5e7d8 addq $0x2, %rdi movq %rdi, (%rsp) jmp 0x5e82e cmpq %rcx, %rax jb 0x5e823 jmp 0x5e8d4 movb 0x2(%rdi), %cl addb $-0x30, %cl cmpb $0xa, %cl jae 0x5e823 leal -0x30(%r14), %ecx cmpb $0x9, %cl ja 0x5e7ff cmpl $0x60, %ebp je 0x5e957 movq 0x90(%rbx), %rcx cmpw $0x0, 0x84(%rcx) js 0x5e957 testb %r14b, %r14b js 0x5e857 movq %rsp, %rdi movl $0x1, %esi callq 0x9392b cmpl $-0x1, %eax je 0x5e929 testl %eax, %eax js 0x5e88b movl %eax, %r14d jmp 0x5e82e addq $0x2, %rdi movq %rdi, (%rsp) xorl %r14d, %r14d movq %r13, %rdi movl %r14d, %esi callq 0x327dc testl %eax, %eax jne 0x5e8fd movq (%rsp), %rax movq 0x78(%rbx), %rcx cmpq %rcx, %rax jb 0x5e69b jmp 0x5e8e7 movq %rax, %rdi leaq 0x8(%rsp), %rsi callq 0x1ab15 movl %eax, %r14d movq 0x8(%rsp), %rax movq (%rsp), %rcx incq %rcx cmpq %rcx, %rax je 0x5e8c6 movq %rax, (%rsp) movl %r14d, %eax andl $-0x2, %eax cmpl $0x2028, %eax # imm = 0x2028 jne 0x5e82e jmp 0x5e841 incq (%rsp) jmp 0x5e82e addq $0x2, %rdi movq %rdi, (%rsp) movl $0xffffff81, (%r15) # imm = 0xFFFFFF81 movl %r14d, 0x28(%r15) leaq 0x10(%rsp), %rdi callq 0x32830 movq %rax, 0x18(%r15) movq %rdx, 0x20(%r15) movq (%rsp), %rax movq 0x30(%rsp), %rcx movq %rax, (%rcx) xorl %eax, %eax jmp 0x5e91a testl %r12d, %r12d je 0x5e8fd leaq 0x40846(%rip), %rsi # 0x9f118 jmp 0x5e8f3 cmpl $0x60, %ebp jne 0x5e8e7 testl %r12d, %r12d je 0x5e8fd leaq 0x40863(%rip), %rsi # 0x9f148 jmp 0x5e8f3 testl %r12d, %r12d je 0x5e8fd leaq 0x4083c(%rip), %rsi # 0x9f12f movq %rbx, %rdi xorl %eax, %eax callq 0x2f0d5 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x1bf85 movq $0x0, 0x18(%rsp) movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testl %r12d, %r12d je 0x5e8fd cmpl $0x75, %r14d leaq 0x4088d(%rip), %rax # 0x9f1c6 leaq 0x4088e(%rip), %rdx # 0x9f1ce cmoveq %rax, %rdx leaq 0x40860(%rip), %rsi # 0x9f1ab movq %rbx, %rdi xorl %eax, %eax callq 0x2f0d5 jmp 0x5e8fd testl %r12d, %r12d je 0x5e8fd cmpb $0x38, %r14b leaq 0x40812(%rip), %rax # 0x9f179 leaq 0x40815(%rip), %rdx # 0x9f183 cmovaeq %rax, %rdx cmpl $0x60, %ebp leaq 0x4081e(%rip), %rax # 0x9f19a leaq 0x4072b(%rip), %rcx # 0x9f0ae cmoveq %rax, %rcx leaq 0x407d2(%rip), %rsi # 0x9f160 movq %rbx, %rdi xorl %eax, %eax callq 0x2f0d5 jmp 0x5e8fd movl $0x0, 0x24(%rsp) movl $0xffffffff, 0x2c(%rsp) # imm = 0xFFFFFFFF jmp 0x5e8fd
js_parse_string: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r14, r9 mov r15, r8 mov r12d, edx mov ebp, esi mov rbx, rdi mov [rsp+68h+var_68], rcx mov rdi, [rdi] mov [rsp+68h+var_58], rdi movsd xmm0, cs:qword_9D070 movups [rsp+68h+var_48], xmm0 mov esi, 20h ; ' ' xor edx, edx call js_alloc_string mov [rsp+68h+var_50], rax test rax, rax jz loc_5E99D mov [rsp+68h+var_38], r14 mov rax, [rsp+68h+var_68] mov rcx, [rbx+78h] cmp rax, rcx jnb loc_5E8E7 lea r13, [rsp+68h+var_58] loc_5E69B: movzx edx, byte ptr [rax] cmp edx, 1Fh ja short loc_5E6D0 cmp ebp, 60h ; '`' jnz short loc_5E6BE cmp dl, 0Dh jnz short loc_5E6D0 mov dl, 0Ah cmp byte ptr [rax+1], 0Ah jnz short loc_5E6D0 inc rax mov [rsp+68h+var_68], rax jmp short loc_5E6D0 loc_5E6BE: cmp edx, 0Ah jz loc_5E8E7 cmp edx, 0Dh jz loc_5E8E7 loc_5E6D0: movzx r14d, dl mov rdi, [rsp+68h+var_68] lea rax, [rdi+1] mov [rsp+68h+var_68], rax cmp r14d, ebp jz loc_5E899 cmp r14d, 5Ch ; '\' jz short loc_5E709 cmp r14d, 24h ; '$' jnz short loc_5E736 cmp ebp, 60h ; '`' jnz short loc_5E703 cmp byte ptr [rax], 7Bh ; '{' jz loc_5E891 loc_5E703: cmp r14d, 5Ch ; '\' jnz short loc_5E736 loc_5E709: movzx r14d, byte ptr [rax] cmp r14d, 21h ; '!' jle short loc_5E763 cmp r14d, 2Fh ; '/' jg loc_5E7AD cmp r14d, 22h ; '"' jz loc_5E7B9 cmp r14d, 27h ; ''' jz loc_5E7B9 jmp loc_5E7D8 loc_5E736: test dl, dl jns loc_5E82E lea rsi, [rsp+68h+var_60] call utf8_decode mov r14d, eax mov rax, [rsp+68h+var_60] cmp rax, [rsp+68h+var_68] jz loc_5E8C6 mov [rsp+68h+var_68], rax jmp loc_5E82E loc_5E763: test r14d, r14d jz short loc_5E7C3 cmp r14d, 0Ah jz short loc_5E782 cmp r14d, 0Dh jnz short loc_5E7D8 cmp byte ptr [rdi+2], 0Ah jnz short loc_5E782 add rdi, 2 mov [rsp+68h+var_68], rdi loc_5E782: mov rax, [rsp+68h+var_68] lea rcx, [rax+1] mov [rsp+68h+var_68], rcx cmp ebp, 60h ; '`' jz loc_5E841 inc dword ptr [rbx+10h] mov [rbx+80h], rax mov [rbx+88h], rcx jmp loc_5E841 loc_5E7AD: cmp r14d, 30h ; '0' jz short loc_5E7CD cmp r14d, 5Ch ; '\' jnz short loc_5E7D8 loc_5E7B9: add rdi, 2 mov [rsp+68h+var_68], rdi jmp short loc_5E82E loc_5E7C3: cmp rax, rcx jb short loc_5E823 jmp loc_5E8D4 loc_5E7CD: mov cl, [rdi+2] add cl, 0D0h cmp cl, 0Ah jnb short loc_5E823 loc_5E7D8: lea ecx, [r14-30h] cmp cl, 9 ja short loc_5E7FF cmp ebp, 60h ; '`' jz loc_5E957 mov rcx, [rbx+90h] cmp word ptr [rcx+84h], 0 js loc_5E957 loc_5E7FF: test r14b, r14b js short loc_5E857 mov rdi, rsp mov esi, 1 call lre_parse_escape cmp eax, 0FFFFFFFFh jz loc_5E929 test eax, eax js short loc_5E88B mov r14d, eax jmp short loc_5E82E loc_5E823: add rdi, 2 mov [rsp+68h+var_68], rdi xor r14d, r14d loc_5E82E: mov rdi, r13 mov esi, r14d call string_buffer_putc test eax, eax jnz loc_5E8FD loc_5E841: mov rax, [rsp+68h+var_68] mov rcx, [rbx+78h] cmp rax, rcx jb loc_5E69B jmp loc_5E8E7 loc_5E857: mov rdi, rax lea rsi, [rsp+68h+var_60] call utf8_decode mov r14d, eax mov rax, [rsp+68h+var_60] mov rcx, [rsp+68h+var_68] inc rcx cmp rax, rcx jz short loc_5E8C6 mov [rsp+68h+var_68], rax mov eax, r14d and eax, 0FFFFFFFEh cmp eax, 2028h jnz short loc_5E82E jmp short loc_5E841 loc_5E88B: inc [rsp+68h+var_68] jmp short loc_5E82E loc_5E891: add rdi, 2 mov [rsp+68h+var_68], rdi loc_5E899: mov dword ptr [r15], 0FFFFFF81h mov [r15+28h], r14d lea rdi, [rsp+68h+var_58] call string_buffer_end mov [r15+18h], rax mov [r15+20h], rdx mov rax, [rsp+68h+var_68] mov rcx, [rsp+68h+var_38] mov [rcx], rax xor eax, eax jmp short loc_5E91A loc_5E8C6: test r12d, r12d jz short loc_5E8FD lea rsi, aInvalidUtf8Seq; "invalid UTF-8 sequence" jmp short loc_5E8F3 loc_5E8D4: cmp ebp, 60h ; '`' jnz short loc_5E8E7 test r12d, r12d jz short loc_5E8FD lea rsi, aUnexpectedEndO_2; "Unexpected end of input" jmp short loc_5E8F3 loc_5E8E7: test r12d, r12d jz short loc_5E8FD lea rsi, aUnexpectedEndO_1; "unexpected end of string" loc_5E8F3: mov rdi, rbx xor eax, eax call js_parse_error loc_5E8FD: mov rdi, [rsp+68h+var_58] mov rsi, [rsp+68h+var_50] call js_free mov [rsp+68h+var_50], 0 mov eax, 0FFFFFFFFh loc_5E91A: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5E929: test r12d, r12d jz short loc_5E8FD cmp r14d, 75h ; 'u' lea rax, aUnicode; "Unicode" lea rdx, aHexadecimal; "hexadecimal" cmovz rdx, rax lea rsi, aInvalidSEscape; "Invalid %s escape sequence" mov rdi, rbx xor eax, eax call js_parse_error jmp short loc_5E8FD loc_5E957: test r12d, r12d jz short loc_5E8FD cmp r14b, 38h ; '8' lea rax, a8And9; "\\8 and \\9" lea rdx, aOctalEscapeSeq; "Octal escape sequences" cmovnb rdx, rax cmp ebp, 60h ; '`' lea rax, aTemplateString; "template strings" lea rcx, aOctalLiteralsA+22h; "strict mode" cmovz rcx, rax lea rsi, aSAreNotAllowed; "%s are not allowed in %s" mov rdi, rbx xor eax, eax call js_parse_error jmp loc_5E8FD loc_5E99D: mov dword ptr [rsp+68h+var_48+4], 0 mov dword ptr [rsp+68h+var_48+0Ch], 0FFFFFFFFh jmp loc_5E8FD
long long js_parse_string( long long a1, int a2, int a3, char *a4, long long a5, char **a6, double a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14) { long long v18; // rdx long long v19; // r8 long long v20; // r9 __m128 v21; // xmm4 __m128 v22; // xmm5 char *v23; // rax unsigned long long i; // rcx unsigned int v25; // r14d char *v26; // rdi char *v27; // rax char *v28; // rax char *v29; // rcx int v30; // eax long long v31; // rcx long long v32; // r8 long long v33; // r9 __m128 v34; // xmm4 __m128 v35; // xmm5 long long v36; // rdx const char *v38; // rsi const char *v39; // rdx const char *v40; // rdx char *v41; // rcx char *v42; // [rsp+0h] [rbp-68h] BYREF char *v43; // [rsp+8h] [rbp-60h] BYREF long long v44; // [rsp+10h] [rbp-58h] BYREF long long v45; // [rsp+18h] [rbp-50h] __int128 v46; // [rsp+20h] [rbp-48h] char **v47; // [rsp+30h] [rbp-38h] v42 = a4; v44 = *(_QWORD *)a1; v46 = 0x2000000000uLL; v45 = js_alloc_string(v44, 32LL, 0); if ( !v45 ) { DWORD1(v46) = 0; HIDWORD(v46) = -1; goto LABEL_62; } v47 = a6; v23 = v42; for ( i = *(_QWORD *)(a1 + 120); (unsigned long long)v42 < i; i = *(_QWORD *)(a1 + 120) ) { v18 = (unsigned __int8)*v23; if ( (unsigned int)v18 <= 0x1F ) { if ( a2 == 96 ) { if ( (_BYTE)v18 == 13 ) { LOBYTE(v18) = 10; if ( v23[1] == 10 ) v42 = v23 + 1; } } else if ( (_DWORD)v18 == 10 || (_DWORD)v18 == 13 ) { break; } } v25 = (unsigned __int8)v18; v26 = v42; v27 = ++v42; if ( (unsigned __int8)v18 == a2 ) goto LABEL_53; if ( (unsigned __int8)v18 != 92 ) { if ( (unsigned __int8)v18 == 36 && a2 == 96 && *v27 == 123 ) { v42 = v26 + 2; LABEL_53: *(_DWORD *)a5 = -127; *(_DWORD *)(a5 + 40) = (unsigned __int8)v18; *(_QWORD *)(a5 + 24) = string_buffer_end((long long)&v44); *(_QWORD *)(a5 + 32) = v36; *v47 = v42; return 0LL; } if ( (v18 & 0x80u) != 0LL ) { v25 = utf8_decode(v26, &v43); if ( v43 == v42 ) goto LABEL_54; v42 = v43; } goto LABEL_45; } v25 = (unsigned __int8)*v27; if ( v25 <= 0x21 ) { if ( !*v27 ) { if ( (unsigned long long)v27 >= i ) { if ( a2 != 96 ) break; if ( a3 ) { v38 = "Unexpected end of input"; goto LABEL_61; } goto LABEL_62; } LABEL_44: v42 = v26 + 2; v25 = 0; LABEL_45: if ( (unsigned int)string_buffer_putc((long long)&v44, v25) ) goto LABEL_62; goto LABEL_46; } if ( v25 == 10 ) goto LABEL_29; if ( v25 == 13 ) { if ( v26[2] == 10 ) v42 = v26 + 2; LABEL_29: v28 = v42; v29 = ++v42; if ( a2 != 96 ) { ++*(_DWORD *)(a1 + 16); *(_QWORD *)(a1 + 128) = v28; *(_QWORD *)(a1 + 136) = v29; } goto LABEL_46; } } else if ( (unsigned __int8)*v27 > 0x2Fu ) { if ( v25 == 48 ) { if ( (unsigned __int8)(v26[2] - 48) >= 0xAu ) goto LABEL_44; } else if ( v25 == 92 ) { goto LABEL_33; } } else if ( v25 == 34 || v25 == 39 ) { LABEL_33: v42 = v26 + 2; goto LABEL_45; } if ( (unsigned __int8)(v25 - 48) <= 9u && (a2 == 96 || *(__int16 *)(*(_QWORD *)(a1 + 144) + 132LL) < 0) ) { if ( a3 ) { v40 = "Octal escape sequences"; if ( (unsigned __int8)v25 >= 0x38u ) v40 = "\\8 and \\9"; v41 = "strict mode"; if ( a2 == 96 ) v41 = "template strings"; js_parse_error( (long long *)a1, (long long)"%s are not allowed in %s", (long long)v40, (long long)v41, v19, v20, (__m128)0x2000000000uLL, a8, a9, a10, v21, v22, a13, a14, (char)v42); } goto LABEL_62; } if ( (v25 & 0x80u) == 0 ) { v30 = lre_parse_escape(&v42, 1LL); if ( v30 == -1 ) { if ( a3 ) { v39 = "hexadecimal"; if ( v25 == 117 ) v39 = "Unicode"; js_parse_error( (long long *)a1, (long long)"Invalid %s escape sequence", (long long)v39, v31, v32, v33, (__m128)0x2000000000uLL, a8, a9, a10, v34, v35, a13, a14, (char)v42); } goto LABEL_62; } if ( v30 < 0 ) ++v42; else v25 = v30; goto LABEL_45; } v25 = utf8_decode(v27, &v43); i = (unsigned long long)(v42 + 1); if ( v43 == v42 + 1 ) { LABEL_54: if ( !a3 ) goto LABEL_62; v38 = "invalid UTF-8 sequence"; goto LABEL_61; } v42 = v43; if ( (v25 & 0xFFFFFFFE) != 0x2028 ) goto LABEL_45; LABEL_46: v23 = v42; } if ( a3 ) { v38 = "unexpected end of string"; LABEL_61: js_parse_error( (long long *)a1, (long long)v38, v18, i, v19, v20, (__m128)0x2000000000uLL, a8, a9, a10, v21, v22, a13, a14, (char)v42); } LABEL_62: js_free(v44, v45); v45 = 0LL; return 0xFFFFFFFFLL; }
js_parse_string: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,R9 MOV R15,R8 MOV R12D,EDX MOV EBP,ESI MOV RBX,RDI MOV qword ptr [RSP],RCX MOV RDI,qword ptr [RDI] MOV qword ptr [RSP + 0x10],RDI MOVSD XMM0,qword ptr [0x0019d070] MOVUPS xmmword ptr [RSP + 0x20],XMM0 MOV ESI,0x20 XOR EDX,EDX CALL 0x0011ff5f MOV qword ptr [RSP + 0x18],RAX TEST RAX,RAX JZ 0x0015e99d MOV qword ptr [RSP + 0x30],R14 MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RBX + 0x78] CMP RAX,RCX JNC 0x0015e8e7 LEA R13,[RSP + 0x10] LAB_0015e69b: MOVZX EDX,byte ptr [RAX] CMP EDX,0x1f JA 0x0015e6d0 CMP EBP,0x60 JNZ 0x0015e6be CMP DL,0xd JNZ 0x0015e6d0 MOV DL,0xa CMP byte ptr [RAX + 0x1],0xa JNZ 0x0015e6d0 INC RAX MOV qword ptr [RSP],RAX JMP 0x0015e6d0 LAB_0015e6be: CMP EDX,0xa JZ 0x0015e8e7 CMP EDX,0xd JZ 0x0015e8e7 LAB_0015e6d0: MOVZX R14D,DL MOV RDI,qword ptr [RSP] LEA RAX,[RDI + 0x1] MOV qword ptr [RSP],RAX CMP R14D,EBP JZ 0x0015e899 CMP R14D,0x5c JZ 0x0015e709 CMP R14D,0x24 JNZ 0x0015e736 CMP EBP,0x60 JNZ 0x0015e703 CMP byte ptr [RAX],0x7b JZ 0x0015e891 LAB_0015e703: CMP R14D,0x5c JNZ 0x0015e736 LAB_0015e709: MOVZX R14D,byte ptr [RAX] CMP R14D,0x21 JLE 0x0015e763 CMP R14D,0x2f JG 0x0015e7ad CMP R14D,0x22 JZ 0x0015e7b9 CMP R14D,0x27 JZ 0x0015e7b9 JMP 0x0015e7d8 LAB_0015e736: TEST DL,DL JNS 0x0015e82e LEA RSI,[RSP + 0x8] CALL 0x0011ab15 MOV R14D,EAX MOV RAX,qword ptr [RSP + 0x8] CMP RAX,qword ptr [RSP] JZ 0x0015e8c6 MOV qword ptr [RSP],RAX JMP 0x0015e82e LAB_0015e763: TEST R14D,R14D JZ 0x0015e7c3 CMP R14D,0xa JZ 0x0015e782 CMP R14D,0xd JNZ 0x0015e7d8 CMP byte ptr [RDI + 0x2],0xa JNZ 0x0015e782 ADD RDI,0x2 MOV qword ptr [RSP],RDI LAB_0015e782: MOV RAX,qword ptr [RSP] LEA RCX,[RAX + 0x1] MOV qword ptr [RSP],RCX CMP EBP,0x60 JZ 0x0015e841 INC dword ptr [RBX + 0x10] MOV qword ptr [RBX + 0x80],RAX MOV qword ptr [RBX + 0x88],RCX JMP 0x0015e841 LAB_0015e7ad: CMP R14D,0x30 JZ 0x0015e7cd CMP R14D,0x5c JNZ 0x0015e7d8 LAB_0015e7b9: ADD RDI,0x2 MOV qword ptr [RSP],RDI JMP 0x0015e82e LAB_0015e7c3: CMP RAX,RCX JC 0x0015e823 JMP 0x0015e8d4 LAB_0015e7cd: MOV CL,byte ptr [RDI + 0x2] ADD CL,0xd0 CMP CL,0xa JNC 0x0015e823 LAB_0015e7d8: LEA ECX,[R14 + -0x30] CMP CL,0x9 JA 0x0015e7ff CMP EBP,0x60 JZ 0x0015e957 MOV RCX,qword ptr [RBX + 0x90] CMP word ptr [RCX + 0x84],0x0 JS 0x0015e957 LAB_0015e7ff: TEST R14B,R14B JS 0x0015e857 MOV RDI,RSP MOV ESI,0x1 CALL 0x0019392b CMP EAX,-0x1 JZ 0x0015e929 TEST EAX,EAX JS 0x0015e88b MOV R14D,EAX JMP 0x0015e82e LAB_0015e823: ADD RDI,0x2 MOV qword ptr [RSP],RDI XOR R14D,R14D LAB_0015e82e: MOV RDI,R13 MOV ESI,R14D CALL 0x001327dc TEST EAX,EAX JNZ 0x0015e8fd LAB_0015e841: MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RBX + 0x78] CMP RAX,RCX JC 0x0015e69b JMP 0x0015e8e7 LAB_0015e857: MOV RDI,RAX LEA RSI,[RSP + 0x8] CALL 0x0011ab15 MOV R14D,EAX MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP] INC RCX CMP RAX,RCX JZ 0x0015e8c6 MOV qword ptr [RSP],RAX MOV EAX,R14D AND EAX,0xfffffffe CMP EAX,0x2028 JNZ 0x0015e82e JMP 0x0015e841 LAB_0015e88b: INC qword ptr [RSP] JMP 0x0015e82e LAB_0015e891: ADD RDI,0x2 MOV qword ptr [RSP],RDI LAB_0015e899: MOV dword ptr [R15],0xffffff81 MOV dword ptr [R15 + 0x28],R14D LEA RDI,[RSP + 0x10] CALL 0x00132830 MOV qword ptr [R15 + 0x18],RAX MOV qword ptr [R15 + 0x20],RDX MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x30] MOV qword ptr [RCX],RAX XOR EAX,EAX JMP 0x0015e91a LAB_0015e8c6: TEST R12D,R12D JZ 0x0015e8fd LEA RSI,[0x19f118] JMP 0x0015e8f3 LAB_0015e8d4: CMP EBP,0x60 JNZ 0x0015e8e7 TEST R12D,R12D JZ 0x0015e8fd LEA RSI,[0x19f148] JMP 0x0015e8f3 LAB_0015e8e7: TEST R12D,R12D JZ 0x0015e8fd LEA RSI,[0x19f12f] LAB_0015e8f3: MOV RDI,RBX XOR EAX,EAX CALL 0x0012f0d5 LAB_0015e8fd: MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x18] CALL 0x0011bf85 MOV qword ptr [RSP + 0x18],0x0 MOV EAX,0xffffffff LAB_0015e91a: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015e929: TEST R12D,R12D JZ 0x0015e8fd CMP R14D,0x75 LEA RAX,[0x19f1c6] LEA RDX,[0x19f1ce] CMOVZ RDX,RAX LEA RSI,[0x19f1ab] MOV RDI,RBX XOR EAX,EAX CALL 0x0012f0d5 JMP 0x0015e8fd LAB_0015e957: TEST R12D,R12D JZ 0x0015e8fd CMP R14B,0x38 LEA RAX,[0x19f179] LEA RDX,[0x19f183] CMOVNC RDX,RAX CMP EBP,0x60 LEA RAX,[0x19f19a] LEA RCX,[0x19f0ae] CMOVZ RCX,RAX LEA RSI,[0x19f160] MOV RDI,RBX XOR EAX,EAX CALL 0x0012f0d5 JMP 0x0015e8fd LAB_0015e99d: MOV dword ptr [RSP + 0x24],0x0 MOV dword ptr [RSP + 0x2c],0xffffffff JMP 0x0015e8fd
int8 js_parse_string(int8 *param_1,uint param_2,int param_3,byte *param_4,int4 *param_5, ulong *param_6) { byte *pbVar1; byte bVar2; byte *pbVar3; uint uVar4; int iVar5; byte *pbVar6; char *pcVar7; char *pcVar8; int1 auVar9 [16]; byte *local_68; byte *local_60; int8 local_58; long local_50; ulong local_48; int8 uStack_40; ulong *local_38; local_58 = *param_1; local_48 = DAT_0019d070; uStack_40 = 0; local_68 = param_4; local_50 = js_alloc_string(local_58,0x20,0); if (local_50 == 0) { local_48 = local_48 & 0xffffffff; uStack_40 = CONCAT44(0xffffffff,(int4)uStack_40); LAB_0015e8fd: js_free(local_58,local_50); return 0xffffffff; } pbVar6 = (byte *)param_1[0xf]; local_38 = param_6; if (pbVar6 <= local_68) { LAB_0015e8e7: if (param_3 != 0) { pcVar8 = "unexpected end of string"; LAB_0015e8f3: js_parse_error(param_1,pcVar8); } goto LAB_0015e8fd; } LAB_0015e69b: bVar2 = *local_68; uVar4 = (uint)bVar2; if (bVar2 < 0x20) { if (param_2 == 0x60) { if ((bVar2 == 0xd) && (uVar4 = 10, local_68[1] == 10)) { local_68 = local_68 + 1; } } else if ((bVar2 == 10) || (bVar2 == 0xd)) goto LAB_0015e8e7; } pbVar3 = local_68; pbVar1 = local_68 + 1; if (uVar4 == param_2) { LAB_0015e899: local_68 = pbVar1; *param_5 = 0xffffff81; param_5[10] = uVar4; auVar9 = string_buffer_end(&local_58); *(int1 (*) [16])(param_5 + 6) = auVar9; *local_38 = (ulong)local_68; return 0; } if (uVar4 == 0x5c) { bVar2 = *pbVar1; if (bVar2 < 0x22) { if (bVar2 == 0) { if (pbVar1 < pbVar6) { LAB_0015e823: uVar4 = 0; local_68 = local_68 + 2; goto LAB_0015e82e; } local_68 = pbVar1; if (param_2 == 0x60) { if (param_3 == 0) goto LAB_0015e8fd; pcVar8 = "Unexpected end of input"; goto LAB_0015e8f3; } goto LAB_0015e8e7; } if (bVar2 != 10) { if (bVar2 != 0xd) goto LAB_0015e7d8; if (local_68[2] == 10) { pbVar1 = local_68 + 2; } } local_68 = pbVar1; pbVar6 = local_68 + 1; if (param_2 != 0x60) { *(int *)(param_1 + 2) = *(int *)(param_1 + 2) + 1; param_1[0x10] = local_68; param_1[0x11] = pbVar6; } goto LAB_0015e841; } if (bVar2 < 0x30) { if ((bVar2 == 0x22) || (bVar2 == 0x27)) { LAB_0015e7b9: local_68 = local_68 + 2; uVar4 = (uint)bVar2; goto LAB_0015e82e; } } else if (bVar2 == 0x30) { if (9 < (byte)(local_68[2] - 0x30)) goto LAB_0015e823; } else if (bVar2 == 0x5c) goto LAB_0015e7b9; LAB_0015e7d8: if (((byte)(bVar2 - 0x30) < 10) && ((param_2 == 0x60 || (*(short *)(param_1[0x12] + 0x84) < 0))) ) { local_68 = pbVar1; if (param_3 != 0) { pcVar8 = "Octal escape sequences"; if (0x37 < bVar2) { pcVar8 = "\\8 and \\9"; } pcVar7 = "strict mode"; if (param_2 == 0x60) { pcVar7 = "template strings"; } js_parse_error(param_1,"%s are not allowed in %s",pcVar8,pcVar7); } goto LAB_0015e8fd; } if ((char)bVar2 < '\0') { local_68 = pbVar1; uVar4 = utf8_decode(pbVar1,&local_60); if (local_60 == local_68 + 1) goto LAB_0015e8c6; local_68 = local_60; pbVar6 = local_60; if ((uVar4 & 0xfffffffe) == 0x2028) goto LAB_0015e841; goto LAB_0015e82e; } local_68 = pbVar1; uVar4 = lre_parse_escape(&local_68,1); if (uVar4 == 0xffffffff) { if (param_3 != 0) { pcVar8 = "hexadecimal"; if (bVar2 == 0x75) { pcVar8 = "Unicode"; } js_parse_error(param_1,"Invalid %s escape sequence",pcVar8); } goto LAB_0015e8fd; } if ((int)uVar4 < 0) { local_68 = local_68 + 1; uVar4 = (uint)bVar2; } } else { if (((uVar4 == 0x24) && (param_2 == 0x60)) && (*pbVar1 == 0x7b)) { pbVar1 = local_68 + 2; goto LAB_0015e899; } local_68 = pbVar1; if ((char)uVar4 < '\0') { uVar4 = utf8_decode(pbVar3,&local_60); if (local_60 == local_68) { LAB_0015e8c6: if (param_3 == 0) goto LAB_0015e8fd; pcVar8 = "invalid UTF-8 sequence"; goto LAB_0015e8f3; } local_68 = local_60; } } LAB_0015e82e: iVar5 = string_buffer_putc(&local_58,uVar4); pbVar6 = local_68; if (iVar5 != 0) goto LAB_0015e8fd; LAB_0015e841: local_68 = pbVar6; pbVar6 = (byte *)param_1[0xf]; if (pbVar6 <= local_68) goto LAB_0015e8e7; goto LAB_0015e69b; }
13,641
js_parse_string
bluesky950520[P]quickjs/quickjs.c
static __exception int js_parse_string(JSParseState *s, int sep, BOOL do_throw, const uint8_t *p, JSToken *token, const uint8_t **pp) { const uint8_t *p_next; int ret; uint32_t c; StringBuffer b_s, *b = &b_s; /* string */ if (string_buffer_init(s->ctx, b, 32)) goto fail; for(;;) { if (p >= s->buf_end) goto invalid_char; c = *p; if (c < 0x20) { if (sep == '`') { if (c == '\r') { if (p[1] == '\n') p++; c = '\n'; } /* do not update s->line_num */ } else if (c == '\n' || c == '\r') goto invalid_char; } p++; if (c == sep) break; if (c == '$' && *p == '{' && sep == '`') { /* template start or middle part */ p++; break; } if (c == '\\') { c = *p; switch(c) { case '\0': if (p >= s->buf_end) { if (sep != '`') goto invalid_char; if (do_throw) js_parse_error(s, "Unexpected end of input"); goto fail; } p++; break; case '\'': case '\"': case '\\': p++; break; case '\r': /* accept DOS and MAC newline sequences */ if (p[1] == '\n') { p++; } /* fall thru */ case '\n': /* ignore escaped newline sequence */ p++; if (sep != '`') { s->line_num++; s->eol = &p[-1]; s->mark = p; } continue; default: if (c == '0' && !(p[1] >= '0' && p[1] <= '9')) { /* accept isolated \0 */ p++; c = '\0'; } else if ((c >= '0' && c <= '9') && (s->cur_func->is_strict_mode || sep == '`')) { if (do_throw) { js_parse_error(s, "%s are not allowed in %s", (c >= '8') ? "\\8 and \\9" : "Octal escape sequences", (sep == '`') ? "template strings" : "strict mode"); } goto fail; } else if (c >= 0x80) { c = utf8_decode(p, &p_next); if (p_next == p + 1) { goto invalid_utf8; } p = p_next; /* LS or PS are skipped */ if (c == CP_LS || c == CP_PS) continue; } else { ret = lre_parse_escape(&p, TRUE); if (ret == -1) { if (do_throw) { js_parse_error(s, "Invalid %s escape sequence", c == 'u' ? "Unicode" : "hexadecimal"); } goto fail; } else if (ret < 0) { /* ignore the '\' (could output a warning) */ p++; } else { c = ret; } } break; } } else if (c >= 0x80) { c = utf8_decode(p - 1, &p_next); if (p_next == p) goto invalid_utf8; p = p_next; } if (string_buffer_putc(b, c)) goto fail; } token->val = TOK_STRING; token->u.str.sep = c; token->u.str.str = string_buffer_end(b); *pp = p; return 0; invalid_utf8: if (do_throw) js_parse_error(s, "invalid UTF-8 sequence"); goto fail; invalid_char: if (do_throw) js_parse_error(s, "unexpected end of string"); fail: string_buffer_free(b); return -1; }
O3
c
js_parse_string: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r9, 0x20(%rsp) movq %r8, 0x18(%rsp) movq %rcx, %r14 movl %edx, %r12d movl %esi, %ebp movq %rdi, %rbx movq %rcx, 0x8(%rsp) movq (%rdi), %rdi movq %rdi, 0x28(%rsp) movsd 0x3eb87(%rip), %xmm0 # 0xa0010 movups %xmm0, 0x38(%rsp) movl $0x20, %esi xorl %edx, %edx callq 0x20686 movq %rax, 0x30(%rsp) testq %rax, %rax je 0x616d1 movq 0x78(%rbx), %rax cmpq %r14, %rax jbe 0x616bb leaq 0x28(%rsp), %r13 movzbl (%r14), %ecx cmpl $0x1f, %ecx ja 0x614ed cmpl $0x60, %ebp jne 0x614db cmpb $0xd, %cl jne 0x614ed cmpb $0xa, 0x1(%r14) jne 0x614d7 incq %r14 movb $0xa, %cl jmp 0x614ed cmpl $0xa, %ecx je 0x616bb cmpl $0xd, %ecx je 0x616bb movzbl %cl, %r15d leaq 0x1(%r14), %rdi movq %rdi, 0x8(%rsp) cmpl %ebp, %r15d je 0x61702 cmpl $0x5c, %r15d je 0x6152c cmpl $0x24, %r15d jne 0x61559 movl $0x24, %r15d cmpl $0x60, %ebp jne 0x6169a cmpb $0x7b, (%rdi) jne 0x6169a jmp 0x616f4 movzbl (%rdi), %r15d cmpl $0x21, %r15d jle 0x6158b cmpl $0x2f, %r15d jg 0x615d2 cmpl $0x22, %r15d je 0x615de cmpl $0x27, %r15d je 0x615de jmp 0x615fa testb %cl, %cl jns 0x6169a movq %r14, %rdi leaq 0x10(%rsp), %rsi callq 0x1b41e movl %eax, %r15d movq 0x10(%rsp), %rax cmpq 0x8(%rsp), %rax je 0x61733 movq %rax, 0x8(%rsp) jmp 0x6169a testl %r15d, %r15d je 0x615ec cmpl $0xa, %r15d je 0x615aa cmpl $0xd, %r15d jne 0x615fa cmpb $0xa, 0x2(%r14) jne 0x615aa addq $0x2, %r14 movq %r14, %rdi leaq 0x1(%rdi), %r14 movq %r14, 0x8(%rsp) cmpl $0x60, %ebp je 0x616ae incl 0x10(%rbx) movq %rdi, 0x80(%rbx) movq %r14, 0x88(%rbx) jmp 0x616ae cmpl $0x30, %r15d je 0x6163e cmpl $0x5c, %r15d jne 0x615fa addq $0x2, %r14 movq %r14, 0x8(%rsp) jmp 0x6169a cmpq %rax, %rdi jb 0x61687 jmp 0x617bc leal -0x30(%r15), %eax cmpb $0x9, %al jbe 0x61648 testb %r15b, %r15b jns 0x61666 leaq 0x10(%rsp), %rsi callq 0x1b41e movl %eax, %r15d movq 0x10(%rsp), %r14 movq 0x8(%rsp), %rax incq %rax cmpq %rax, %r14 je 0x61733 movq %r14, 0x8(%rsp) movl %r15d, %eax andl $-0x2, %eax cmpl $0x2028, %eax # imm = 0x2028 jne 0x6169a jmp 0x616ae movb 0x2(%r14), %al addb $-0x30, %al cmpb $0xa, %al jae 0x61687 cmpl $0x60, %ebp je 0x61772 movq 0x90(%rbx), %rax cmpw $0x0, 0x84(%rax) js 0x61772 leaq 0x8(%rsp), %rdi movl $0x1, %esi callq 0x9643f cmpl $-0x1, %eax je 0x61741 testl %eax, %eax js 0x61695 movl %eax, %r15d jmp 0x6169a addq $0x2, %r14 movq %r14, 0x8(%rsp) xorl %r15d, %r15d jmp 0x6169a incq 0x8(%rsp) movq %r13, %rdi movl %r15d, %esi callq 0x33621 testl %eax, %eax jne 0x616d1 movq 0x8(%rsp), %r14 movq 0x78(%rbx), %rax cmpq %rax, %r14 jb 0x614ba testl %r12d, %r12d je 0x616d1 leaq 0x40a22(%rip), %rsi # 0xa20e9 movq %rbx, %rdi xorl %eax, %eax callq 0x2fed1 movq 0x28(%rsp), %rdi movq 0x30(%rsp), %rsi callq 0x1c845 movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq addq $0x2, %r14 movq %r14, 0x8(%rsp) movl $0x24, %ebp movq 0x18(%rsp), %rbx movl $0xffffff81, (%rbx) # imm = 0xFFFFFF81 movl %ebp, 0x28(%rbx) leaq 0x28(%rsp), %rdi callq 0x33675 movq %rax, 0x18(%rbx) movq %rdx, 0x20(%rbx) movq 0x8(%rsp), %rax movq 0x20(%rsp), %rcx movq %rax, (%rcx) xorl %eax, %eax jmp 0x616e5 testl %r12d, %r12d je 0x616d1 leaq 0x40993(%rip), %rsi # 0xa20d2 jmp 0x616c7 testl %r12d, %r12d je 0x616d1 cmpl $0x75, %r15d leaq 0x40a2f(%rip), %rax # 0xa2180 leaq 0x40a30(%rip), %rdx # 0xa2188 cmoveq %rax, %rdx leaq 0x40a02(%rip), %rsi # 0xa2165 movq %rbx, %rdi xorl %eax, %eax callq 0x2fed1 jmp 0x616d1 testl %r12d, %r12d je 0x616d1 cmpb $0x38, %r15b leaq 0x409ad(%rip), %rax # 0xa2133 leaq 0x409b0(%rip), %rdx # 0xa213d cmovaeq %rax, %rdx cmpl $0x60, %ebp leaq 0x409b9(%rip), %rax # 0xa2154 leaq 0x408c6(%rip), %rcx # 0xa2068 cmoveq %rax, %rcx leaq 0x4096d(%rip), %rsi # 0xa211a movq %rbx, %rdi xorl %eax, %eax callq 0x2fed1 jmp 0x616d1 cmpl $0x60, %ebp jne 0x616bb testl %r12d, %r12d je 0x616d1 leaq 0x4092d(%rip), %rsi # 0xa2102 jmp 0x616c7
js_parse_string: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov [rsp+78h+var_58], r9 mov [rsp+78h+var_60], r8 mov r14, rcx mov r12d, edx mov ebp, esi mov rbx, rdi mov [rsp+78h+var_70], rcx mov rdi, [rdi] mov [rsp+78h+var_50], rdi movsd xmm0, cs:qword_A0010 movups [rsp+78h+var_40], xmm0 mov esi, 20h ; ' ' xor edx, edx call js_alloc_string mov [rsp+78h+var_48], rax test rax, rax jz loc_616D1 mov rax, [rbx+78h] cmp rax, r14 jbe loc_616BB lea r13, [rsp+78h+var_50] loc_614BA: movzx ecx, byte ptr [r14] cmp ecx, 1Fh ja short loc_614ED cmp ebp, 60h ; '`' jnz short loc_614DB cmp cl, 0Dh jnz short loc_614ED cmp byte ptr [r14+1], 0Ah jnz short loc_614D7 inc r14 loc_614D7: mov cl, 0Ah jmp short loc_614ED loc_614DB: cmp ecx, 0Ah jz loc_616BB cmp ecx, 0Dh jz loc_616BB loc_614ED: movzx r15d, cl lea rdi, [r14+1] mov [rsp+78h+var_70], rdi cmp r15d, ebp jz loc_61702 cmp r15d, 5Ch ; '\' jz short loc_6152C cmp r15d, 24h ; '$' jnz short loc_61559 mov r15d, 24h ; '$' cmp ebp, 60h ; '`' jnz loc_6169A cmp byte ptr [rdi], 7Bh ; '{' jnz loc_6169A jmp loc_616F4 loc_6152C: movzx r15d, byte ptr [rdi] cmp r15d, 21h ; '!' jle short loc_6158B cmp r15d, 2Fh ; '/' jg loc_615D2 cmp r15d, 22h ; '"' jz loc_615DE cmp r15d, 27h ; ''' jz loc_615DE jmp loc_615FA loc_61559: test cl, cl jns loc_6169A mov rdi, r14 lea rsi, [rsp+78h+var_68] call utf8_decode mov r15d, eax mov rax, [rsp+78h+var_68] cmp rax, [rsp+78h+var_70] jz loc_61733 mov [rsp+78h+var_70], rax jmp loc_6169A loc_6158B: test r15d, r15d jz short loc_615EC cmp r15d, 0Ah jz short loc_615AA cmp r15d, 0Dh jnz short loc_615FA cmp byte ptr [r14+2], 0Ah jnz short loc_615AA add r14, 2 mov rdi, r14 loc_615AA: lea r14, [rdi+1] mov [rsp+78h+var_70], r14 cmp ebp, 60h ; '`' jz loc_616AE inc dword ptr [rbx+10h] mov [rbx+80h], rdi mov [rbx+88h], r14 jmp loc_616AE loc_615D2: cmp r15d, 30h ; '0' jz short loc_6163E cmp r15d, 5Ch ; '\' jnz short loc_615FA loc_615DE: add r14, 2 mov [rsp+78h+var_70], r14 jmp loc_6169A loc_615EC: cmp rdi, rax jb loc_61687 jmp loc_617BC loc_615FA: lea eax, [r15-30h] cmp al, 9 jbe short loc_61648 test r15b, r15b jns short loc_61666 lea rsi, [rsp+78h+var_68] call utf8_decode mov r15d, eax mov r14, [rsp+78h+var_68] mov rax, [rsp+78h+var_70] inc rax cmp r14, rax jz loc_61733 mov [rsp+78h+var_70], r14 mov eax, r15d and eax, 0FFFFFFFEh cmp eax, 2028h jnz short loc_6169A jmp short loc_616AE loc_6163E: mov al, [r14+2] add al, 0D0h cmp al, 0Ah jnb short loc_61687 loc_61648: cmp ebp, 60h ; '`' jz loc_61772 mov rax, [rbx+90h] cmp word ptr [rax+84h], 0 js loc_61772 loc_61666: lea rdi, [rsp+78h+var_70] mov esi, 1 call lre_parse_escape cmp eax, 0FFFFFFFFh jz loc_61741 test eax, eax js short loc_61695 mov r15d, eax jmp short loc_6169A loc_61687: add r14, 2 mov [rsp+78h+var_70], r14 xor r15d, r15d jmp short loc_6169A loc_61695: inc [rsp+78h+var_70] loc_6169A: mov rdi, r13 mov esi, r15d call string_buffer_putc test eax, eax jnz short loc_616D1 mov r14, [rsp+78h+var_70] loc_616AE: mov rax, [rbx+78h] cmp r14, rax jb loc_614BA loc_616BB: test r12d, r12d jz short loc_616D1 lea rsi, aUnexpectedEndO_2; "unexpected end of string" loc_616C7: mov rdi, rbx xor eax, eax call js_parse_error loc_616D1: mov rdi, [rsp+78h+var_50] mov rsi, [rsp+78h+var_48] call js_free mov eax, 0FFFFFFFFh loc_616E5: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_616F4: add r14, 2 mov [rsp+78h+var_70], r14 mov ebp, 24h ; '$' loc_61702: mov rbx, [rsp+78h+var_60] mov dword ptr [rbx], 0FFFFFF81h mov [rbx+28h], ebp lea rdi, [rsp+78h+var_50] call string_buffer_end mov [rbx+18h], rax mov [rbx+20h], rdx mov rax, [rsp+78h+var_70] mov rcx, [rsp+78h+var_58] mov [rcx], rax xor eax, eax jmp short loc_616E5 loc_61733: test r12d, r12d jz short loc_616D1 lea rsi, aInvalidUtf8Seq; "invalid UTF-8 sequence" jmp short loc_616C7 loc_61741: test r12d, r12d jz short loc_616D1 cmp r15d, 75h ; 'u' lea rax, aUnicode; "Unicode" lea rdx, aHexadecimal; "hexadecimal" cmovz rdx, rax lea rsi, aInvalidSEscape; "Invalid %s escape sequence" mov rdi, rbx xor eax, eax call js_parse_error jmp loc_616D1 loc_61772: test r12d, r12d jz loc_616D1 cmp r15b, 38h ; '8' lea rax, a8And9; "\\8 and \\9" lea rdx, aOctalEscapeSeq; "Octal escape sequences" cmovnb rdx, rax cmp ebp, 60h ; '`' lea rax, aTemplateString; "template strings" lea rcx, aOctalLiteralsA+22h; "strict mode" cmovz rcx, rax lea rsi, aSAreNotAllowed; "%s are not allowed in %s" mov rdi, rbx xor eax, eax call js_parse_error jmp loc_616D1 loc_617BC: cmp ebp, 60h ; '`' jnz loc_616BB test r12d, r12d jz loc_616D1 lea rsi, aUnexpectedEndO_3; "Unexpected end of input" jmp loc_616C7
long long js_parse_string( long long a1, int a2, int a3, char *a4, _DWORD *a5, char **a6, double a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14) { char *v14; // r14 int v16; // ebp long long v18; // rdx long long v19; // rcx long long v20; // r8 long long v21; // r9 __m128 v22; // xmm4 __m128 v23; // xmm5 unsigned long long i; // rax unsigned int v25; // r15d char *v26; // rdi int v27; // eax long long v28; // rcx long long v29; // r8 long long v30; // r9 __m128 v31; // xmm4 __m128 v32; // xmm5 const char *v33; // rsi _DWORD *v35; // rbx long long v36; // rdx const char *v37; // rdx const char *v38; // rdx char *v39; // rcx char v40; // [rsp+0h] [rbp-78h] char *v41; // [rsp+8h] [rbp-70h] BYREF char *v42; // [rsp+10h] [rbp-68h] BYREF _DWORD *v43; // [rsp+18h] [rbp-60h] char **v44; // [rsp+20h] [rbp-58h] long long v45; // [rsp+28h] [rbp-50h] BYREF long long v46; // [rsp+30h] [rbp-48h] __int128 v47; // [rsp+38h] [rbp-40h] v44 = a6; v43 = a5; v14 = a4; v16 = a2; v41 = a4; v45 = *(_QWORD *)a1; v47 = 0x2000000000uLL; v46 = js_alloc_string(v45, 32LL, 0); if ( !v46 ) goto LABEL_56; for ( i = *(_QWORD *)(a1 + 120); (unsigned long long)v14 < i; i = *(_QWORD *)(a1 + 120) ) { v19 = (unsigned __int8)*v14; if ( (unsigned int)v19 <= 0x1F ) { if ( a2 == 96 ) { if ( (_BYTE)v19 == 13 ) { if ( v14[1] == 10 ) ++v14; LOBYTE(v19) = 10; } } else if ( (_DWORD)v19 == 10 || (_DWORD)v19 == 13 ) { break; } } v25 = (unsigned __int8)v19; v26 = v14 + 1; v41 = v14 + 1; if ( (unsigned __int8)v19 == a2 ) goto LABEL_57; if ( (unsigned __int8)v19 != 92 ) { if ( (unsigned __int8)v19 == 36 ) { v25 = 36; if ( a2 == 96 && *v26 == 123 ) { v41 = v14 + 2; v16 = 36; LABEL_57: v35 = v43; *v43 = -127; v35[10] = v16; *((_QWORD *)v35 + 3) = string_buffer_end(&v45); *((_QWORD *)v35 + 4) = v36; *v44 = v41; return 0LL; } } else if ( (v19 & 0x80u) != 0LL ) { v25 = utf8_decode(v14, &v42); if ( v42 == v41 ) goto LABEL_58; v41 = v42; } goto LABEL_50; } v25 = (unsigned __int8)*v26; if ( v25 <= 0x21 ) { if ( !*v26 ) { if ( (unsigned long long)v26 >= i ) { if ( a2 != 96 ) break; if ( a3 ) { v33 = "Unexpected end of input"; goto LABEL_55; } goto LABEL_56; } goto LABEL_48; } if ( v25 == 10 ) goto LABEL_30; if ( v25 == 13 ) { if ( v14[2] == 10 ) v26 = v14 + 2; LABEL_30: v14 = v26 + 1; v41 = v26 + 1; if ( a2 != 96 ) { ++*(_DWORD *)(a1 + 16); *(_QWORD *)(a1 + 128) = v26; *(_QWORD *)(a1 + 136) = v14; } continue; } } else if ( (unsigned __int8)*v26 > 0x2Fu ) { if ( v25 == 48 ) { if ( (unsigned __int8)(v14[2] - 48) < 0xAu ) { LABEL_43: if ( a2 == 96 || *(__int16 *)(*(_QWORD *)(a1 + 144) + 132LL) < 0 ) { if ( a3 ) { v38 = "Octal escape sequences"; if ( (unsigned __int8)v25 >= 0x38u ) v38 = "\\8 and \\9"; v39 = "strict mode"; if ( a2 == 96 ) v39 = "template strings"; js_parse_error( (long long *)a1, (long long)"%s are not allowed in %s", (long long)v38, (long long)v39, v20, v21, (__m128)0x2000000000uLL, a8, a9, a10, v22, v23, a13, a14, v40); } goto LABEL_56; } LABEL_45: v27 = lre_parse_escape(&v41, 1LL); if ( v27 == -1 ) { if ( a3 ) { v37 = "hexadecimal"; if ( v25 == 117 ) v37 = "Unicode"; js_parse_error( (long long *)a1, (long long)"Invalid %s escape sequence", (long long)v37, v28, v29, v30, (__m128)0x2000000000uLL, a8, a9, a10, v31, v32, a13, a14, v40); } goto LABEL_56; } if ( v27 < 0 ) ++v41; else v25 = v27; LABEL_50: if ( (unsigned int)string_buffer_putc((long long)&v45, v25) ) goto LABEL_56; v14 = v41; continue; } LABEL_48: v41 = v14 + 2; v25 = 0; goto LABEL_50; } if ( v25 == 92 ) goto LABEL_34; } else if ( v25 == 34 || v25 == 39 ) { LABEL_34: v41 = v14 + 2; goto LABEL_50; } if ( (unsigned __int8)(v25 - 48) <= 9u ) goto LABEL_43; if ( (v25 & 0x80u) == 0 ) goto LABEL_45; v25 = utf8_decode(v26, &v42); v14 = v42; if ( v42 == v41 + 1 ) { LABEL_58: if ( !a3 ) goto LABEL_56; v33 = "invalid UTF-8 sequence"; goto LABEL_55; } v41 = v42; if ( (v25 & 0xFFFFFFFE) != 0x2028 ) goto LABEL_50; } if ( a3 ) { v33 = "unexpected end of string"; LABEL_55: js_parse_error( (long long *)a1, (long long)v33, v18, v19, v20, v21, (__m128)0x2000000000uLL, a8, a9, a10, v22, v23, a13, a14, v40); } LABEL_56: js_free(v45, v46); return 0xFFFFFFFFLL; }
js_parse_string: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV qword ptr [RSP + 0x20],R9 MOV qword ptr [RSP + 0x18],R8 MOV R14,RCX MOV R12D,EDX MOV EBP,ESI MOV RBX,RDI MOV qword ptr [RSP + 0x8],RCX MOV RDI,qword ptr [RDI] MOV qword ptr [RSP + 0x28],RDI MOVSD XMM0,qword ptr [0x001a0010] MOVUPS xmmword ptr [RSP + 0x38],XMM0 MOV ESI,0x20 XOR EDX,EDX CALL 0x00120686 MOV qword ptr [RSP + 0x30],RAX TEST RAX,RAX JZ 0x001616d1 MOV RAX,qword ptr [RBX + 0x78] CMP RAX,R14 JBE 0x001616bb LEA R13,[RSP + 0x28] LAB_001614ba: MOVZX ECX,byte ptr [R14] CMP ECX,0x1f JA 0x001614ed CMP EBP,0x60 JNZ 0x001614db CMP CL,0xd JNZ 0x001614ed CMP byte ptr [R14 + 0x1],0xa JNZ 0x001614d7 INC R14 LAB_001614d7: MOV CL,0xa JMP 0x001614ed LAB_001614db: CMP ECX,0xa JZ 0x001616bb CMP ECX,0xd JZ 0x001616bb LAB_001614ed: MOVZX R15D,CL LEA RDI,[R14 + 0x1] MOV qword ptr [RSP + 0x8],RDI CMP R15D,EBP JZ 0x00161702 CMP R15D,0x5c JZ 0x0016152c CMP R15D,0x24 JNZ 0x00161559 MOV R15D,0x24 CMP EBP,0x60 JNZ 0x0016169a CMP byte ptr [RDI],0x7b JNZ 0x0016169a JMP 0x001616f4 LAB_0016152c: MOVZX R15D,byte ptr [RDI] CMP R15D,0x21 JLE 0x0016158b CMP R15D,0x2f JG 0x001615d2 CMP R15D,0x22 JZ 0x001615de CMP R15D,0x27 JZ 0x001615de JMP 0x001615fa LAB_00161559: TEST CL,CL JNS 0x0016169a MOV RDI,R14 LEA RSI,[RSP + 0x10] CALL 0x0011b41e MOV R15D,EAX MOV RAX,qword ptr [RSP + 0x10] CMP RAX,qword ptr [RSP + 0x8] JZ 0x00161733 MOV qword ptr [RSP + 0x8],RAX JMP 0x0016169a LAB_0016158b: TEST R15D,R15D JZ 0x001615ec CMP R15D,0xa JZ 0x001615aa CMP R15D,0xd JNZ 0x001615fa CMP byte ptr [R14 + 0x2],0xa JNZ 0x001615aa ADD R14,0x2 MOV RDI,R14 LAB_001615aa: LEA R14,[RDI + 0x1] MOV qword ptr [RSP + 0x8],R14 CMP EBP,0x60 JZ 0x001616ae INC dword ptr [RBX + 0x10] MOV qword ptr [RBX + 0x80],RDI MOV qword ptr [RBX + 0x88],R14 JMP 0x001616ae LAB_001615d2: CMP R15D,0x30 JZ 0x0016163e CMP R15D,0x5c JNZ 0x001615fa LAB_001615de: ADD R14,0x2 MOV qword ptr [RSP + 0x8],R14 JMP 0x0016169a LAB_001615ec: CMP RDI,RAX JC 0x00161687 JMP 0x001617bc LAB_001615fa: LEA EAX,[R15 + -0x30] CMP AL,0x9 JBE 0x00161648 TEST R15B,R15B JNS 0x00161666 LEA RSI,[RSP + 0x10] CALL 0x0011b41e MOV R15D,EAX MOV R14,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x8] INC RAX CMP R14,RAX JZ 0x00161733 MOV qword ptr [RSP + 0x8],R14 MOV EAX,R15D AND EAX,0xfffffffe CMP EAX,0x2028 JNZ 0x0016169a JMP 0x001616ae LAB_0016163e: MOV AL,byte ptr [R14 + 0x2] ADD AL,0xd0 CMP AL,0xa JNC 0x00161687 LAB_00161648: CMP EBP,0x60 JZ 0x00161772 MOV RAX,qword ptr [RBX + 0x90] CMP word ptr [RAX + 0x84],0x0 JS 0x00161772 LAB_00161666: LEA RDI,[RSP + 0x8] MOV ESI,0x1 CALL 0x0019643f CMP EAX,-0x1 JZ 0x00161741 TEST EAX,EAX JS 0x00161695 MOV R15D,EAX JMP 0x0016169a LAB_00161687: ADD R14,0x2 MOV qword ptr [RSP + 0x8],R14 XOR R15D,R15D JMP 0x0016169a LAB_00161695: INC qword ptr [RSP + 0x8] LAB_0016169a: MOV RDI,R13 MOV ESI,R15D CALL 0x00133621 TEST EAX,EAX JNZ 0x001616d1 MOV R14,qword ptr [RSP + 0x8] LAB_001616ae: MOV RAX,qword ptr [RBX + 0x78] CMP R14,RAX JC 0x001614ba LAB_001616bb: TEST R12D,R12D JZ 0x001616d1 LEA RSI,[0x1a20e9] LAB_001616c7: MOV RDI,RBX XOR EAX,EAX CALL 0x0012fed1 LAB_001616d1: MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x30] CALL 0x0011c845 MOV EAX,0xffffffff LAB_001616e5: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001616f4: ADD R14,0x2 MOV qword ptr [RSP + 0x8],R14 MOV EBP,0x24 LAB_00161702: MOV RBX,qword ptr [RSP + 0x18] MOV dword ptr [RBX],0xffffff81 MOV dword ptr [RBX + 0x28],EBP LEA RDI,[RSP + 0x28] CALL 0x00133675 MOV qword ptr [RBX + 0x18],RAX MOV qword ptr [RBX + 0x20],RDX MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RCX],RAX XOR EAX,EAX JMP 0x001616e5 LAB_00161733: TEST R12D,R12D JZ 0x001616d1 LEA RSI,[0x1a20d2] JMP 0x001616c7 LAB_00161741: TEST R12D,R12D JZ 0x001616d1 CMP R15D,0x75 LEA RAX,[0x1a2180] LEA RDX,[0x1a2188] CMOVZ RDX,RAX LEA RSI,[0x1a2165] MOV RDI,RBX XOR EAX,EAX CALL 0x0012fed1 JMP 0x001616d1 LAB_00161772: TEST R12D,R12D JZ 0x001616d1 CMP R15B,0x38 LEA RAX,[0x1a2133] LEA RDX,[0x1a213d] CMOVNC RDX,RAX CMP EBP,0x60 LEA RAX,[0x1a2154] LEA RCX,[0x1a2068] CMOVZ RCX,RAX LEA RSI,[0x1a211a] MOV RDI,RBX XOR EAX,EAX CALL 0x0012fed1 JMP 0x001616d1 LAB_001617bc: CMP EBP,0x60 JNZ 0x001616bb TEST R12D,R12D JZ 0x001616d1 LEA RSI,[0x1a2102] JMP 0x001616c7
int8 js_parse_string(int8 *param_1,uint param_2,int param_3,byte *param_4,int4 *param_5, ulong *param_6) { byte bVar1; int4 *puVar2; uint uVar3; int iVar4; byte *pbVar5; char *pcVar6; char *pcVar7; int1 auVar8 [16]; byte *local_70; byte *local_68; int4 *local_60; ulong *local_58; int8 local_50; long local_48; int8 local_40; int8 uStack_38; local_50 = *param_1; local_40 = DAT_001a0010; uStack_38 = 0; local_70 = param_4; local_60 = param_5; local_58 = param_6; local_48 = js_alloc_string(local_50,0x20,0); if (local_48 != 0) { pbVar5 = (byte *)param_1[0xf]; if (param_4 < pbVar5) { do { puVar2 = local_60; bVar1 = *param_4; uVar3 = (uint)bVar1; if (bVar1 < 0x20) { if (param_2 == 0x60) { if (bVar1 == 0xd) { if (param_4[1] == 10) { param_4 = param_4 + 1; } uVar3 = 10; } } else if ((bVar1 == 10) || (bVar1 == 0xd)) break; } local_70 = param_4 + 1; if (uVar3 == param_2) { LAB_00161702: *local_60 = 0xffffff81; local_60[10] = param_2; auVar8 = string_buffer_end(&local_50); *(int1 (*) [16])(puVar2 + 6) = auVar8; *local_58 = (ulong)local_70; return 0; } if (uVar3 == 0x5c) { bVar1 = *local_70; if (0x21 < bVar1) { if (bVar1 < 0x30) { if ((bVar1 == 0x22) || (bVar1 == 0x27)) { LAB_001615de: local_70 = param_4 + 2; uVar3 = (uint)bVar1; goto LAB_0016169a; } LAB_001615fa: if ((byte)(bVar1 - 0x30) < 10) goto LAB_00161648; if ((char)bVar1 < '\0') { uVar3 = utf8_decode(local_70,&local_68); if (local_68 == local_70 + 1) goto LAB_00161733; local_70 = local_68; pbVar5 = local_70; if ((uVar3 & 0xfffffffe) != 0x2028) goto LAB_0016169a; goto LAB_001616ae; } } else { if (bVar1 != 0x30) { if (bVar1 == 0x5c) goto LAB_001615de; goto LAB_001615fa; } if (9 < (byte)(param_4[2] - 0x30)) goto LAB_00161687; LAB_00161648: if ((param_2 == 0x60) || (*(short *)(param_1[0x12] + 0x84) < 0)) { if (param_3 != 0) { pcVar7 = "Octal escape sequences"; if (0x37 < bVar1) { pcVar7 = "\\8 and \\9"; } pcVar6 = "strict mode"; if (param_2 == 0x60) { pcVar6 = "template strings"; } js_parse_error(param_1,"%s are not allowed in %s",pcVar7,pcVar6); } goto LAB_001616d1; } } uVar3 = lre_parse_escape(&local_70,1); if (uVar3 != 0xffffffff) { if ((int)uVar3 < 0) { local_70 = local_70 + 1; uVar3 = (uint)bVar1; } goto LAB_0016169a; } if (param_3 != 0) { pcVar7 = "hexadecimal"; if (bVar1 == 0x75) { pcVar7 = "Unicode"; } js_parse_error(param_1,"Invalid %s escape sequence",pcVar7); } goto LAB_001616d1; } if (bVar1 == 0) { if (local_70 < pbVar5) { LAB_00161687: local_70 = param_4 + 2; uVar3 = 0; goto LAB_0016169a; } if (param_2 == 0x60) { if (param_3 == 0) goto LAB_001616d1; pcVar7 = "Unexpected end of input"; goto LAB_001616c7; } break; } if (bVar1 != 10) { if (bVar1 != 0xd) goto LAB_001615fa; if (param_4[2] == 10) { local_70 = param_4 + 2; } } pbVar5 = local_70 + 1; if (param_2 != 0x60) { *(int *)(param_1 + 2) = *(int *)(param_1 + 2) + 1; param_1[0x10] = local_70; param_1[0x11] = pbVar5; } } else { if (uVar3 == 0x24) { uVar3 = 0x24; if ((param_2 == 0x60) && (*local_70 == 0x7b)) { local_70 = param_4 + 2; param_2 = 0x24; goto LAB_00161702; } } else if ((char)uVar3 < '\0') { uVar3 = utf8_decode(param_4,&local_68); if (local_68 == local_70) { LAB_00161733: if (param_3 == 0) goto LAB_001616d1; pcVar7 = "invalid UTF-8 sequence"; goto LAB_001616c7; } local_70 = local_68; } LAB_0016169a: iVar4 = string_buffer_putc(&local_50,uVar3); pbVar5 = local_70; if (iVar4 != 0) goto LAB_001616d1; } LAB_001616ae: local_70 = pbVar5; pbVar5 = (byte *)param_1[0xf]; param_4 = local_70; } while (local_70 < pbVar5); } if (param_3 != 0) { pcVar7 = "unexpected end of string"; LAB_001616c7: js_parse_error(param_1,pcVar7); } } LAB_001616d1: js_free(local_50,local_48); return 0xffffffff; }
13,642
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string build_grammar(const std::function<void(const common_grammar_builder &)> & cb, const common_grammar_options & options) { SchemaConverter converter([&](const std::string &) { return json(); }, options.dotall, options.compact_spaces); common_grammar_builder builder { /* .add_rule = */ [&](const std::string & name, const std::string & rule) { return converter._add_rule(name, rule); }, /* .add_schema = */ [&](const std::string & name, const nlohmann::ordered_json & schema) { return converter.visit(schema, name == "root" ? "" : name); }, /* .resolve_refs = */ [&](nlohmann::ordered_json & schema) { converter.resolve_refs(schema, ""); } }; cb(builder); converter.check_errors(); return converter.format_grammar(); }
O1
cpp
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&): pushq %r15 pushq %r14 pushq %rbx subq $0x160, %rsp # imm = 0x160 movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movq %rsp, %rsi movaps %xmm0, (%rsi) leaq 0x304(%rip), %rax # 0xbd46c movq %rax, 0x18(%rsi) leaq 0x325(%rip), %rax # 0xbd498 movq %rax, 0x10(%rsi) movzbl (%rdx), %eax movzbl 0x1(%rdx), %ecx leaq 0x68(%rsp), %r15 movq %r15, %rdi movl %eax, %edx callq 0xc06ea movq 0x10(%rsp), %rax testq %rax, %rax je 0xbd1a4 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movaps %xmm0, 0x10(%rsp) movq %r15, (%rsp) leaq 0x2f5(%rip), %rax # 0xbd4b0 movq %rax, 0x18(%rsp) leaq 0x2fb(%rip), %rax # 0xbd4c2 movq %rax, 0x10(%rsp) movaps %xmm0, 0x20(%rsp) movaps %xmm0, 0x30(%rsp) movq %r15, 0x20(%rsp) leaq 0x306(%rip), %rax # 0xbd4e8 movq %rax, 0x38(%rsp) leaq 0x3ac(%rip), %rax # 0xbd59a movq %rax, 0x30(%rsp) movaps %xmm0, 0x40(%rsp) movaps %xmm0, 0x50(%rsp) movq %r15, 0x40(%rsp) leaq 0x2e37(%rip), %rax # 0xc0040 movq %rax, 0x58(%rsp) leaq 0x2e95(%rip), %rax # 0xc00aa movq %rax, 0x50(%rsp) cmpq $0x0, 0x10(%r14) je 0xbd2fb movq %rsp, %rsi movq %r14, %rdi callq *0x18(%r14) leaq 0x68(%rsp), %rdi callq 0xc08ec leaq 0x68(%rsp), %rsi movq %rbx, %rdi callq 0xc0aa2 movq 0x50(%rsp), %rax testq %rax, %rax je 0xbd25f leaq 0x40(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x30(%rsp), %rax testq %rax, %rax je 0xbd278 leaq 0x20(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x10(%rsp), %rax testq %rax, %rax je 0xbd28f movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x148(%rsp), %rdi callq 0x22380 leaq 0x130(%rsp), %rdi callq 0x22380 leaq 0xf8(%rsp), %rdi callq 0x801f6 leaq 0xc0(%rsp), %rdi callq 0xc12b6 leaq 0x90(%rsp), %r14 movq %r14, %rdi callq 0xc1398 movq -0x18(%r14), %rax testq %rax, %rax je 0xbd2eb leaq 0x68(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rax addq $0x160, %rsp # imm = 0x160 popq %rbx popq %r14 popq %r15 retq callq 0x1b320 jmp 0xbd326 jmp 0xbd326 jmp 0xbd326 jmp 0xbd326 jmp 0xbd326 movq %rax, %rbx movq 0x10(%rsp), %rax testq %rax, %rax je 0xbd343 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0xbd343 movq %rax, %rdi callq 0x231d1 movq %rax, %rbx movq %rsp, %rdi callq 0xc0bae leaq 0x68(%rsp), %rdi callq 0xc0c04 movq %rbx, %rdi callq 0x1bf90 nop
_Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options: push r15 push r14 push rbx sub rsp, 160h mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 mov rsi, rsp; int movaps xmmword ptr [rsi], xmm0 lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E9_M_invokeERKSt9_Any_dataSG_; std::_Function_handler<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::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke(std::_Any_data const&,std::string const&) mov [rsi+18h], rax lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E10_M_managerERSt9_Any_dataRKSV_St18_Manager_operation; std::_Function_handler<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::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsi+10h], rax movzx eax, byte ptr [rdx] movzx ecx, byte ptr [rdx+1]; int lea r15, [rsp+178h+var_110] mov rdi, r15; int mov edx, eax; int call _ZN15SchemaConverterC2ERKSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERKSB_EEbb; SchemaConverter::SchemaConverter(std::function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> ()(std::string const&)> const&,bool,bool) mov rax, qword ptr [rsp+178h+var_168] test rax, rax jz short loc_BD1A4 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_BD1A4: xorps xmm0, xmm0 movaps [rsp+178h+var_178], xmm0 movaps [rsp+178h+var_168], xmm0 mov qword ptr [rsp+178h+var_178], r15 lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E9_M_invokeERKSt9_Any_dataS7_S7_; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke(std::_Any_data const&,std::string const&,std::string const&) mov qword ptr [rsp+178h+var_168+8], rax lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E10_M_managerERSt9_Any_dataRKSM_St18_Manager_operation; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov qword ptr [rsp+178h+var_168], rax movaps [rsp+178h+var_158], xmm0 movaps [rsp+178h+var_148], xmm0 mov qword ptr [rsp+178h+var_158], r15 lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E9_M_invokeERKSt9_Any_dataS7_SI_; std::_Function_handler<std::string ()(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> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke(std::_Any_data const&,std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov qword ptr [rsp+178h+var_148+8], rax lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E10_M_managerERSt9_Any_dataRKSX_St18_Manager_operation; std::_Function_handler<std::string ()(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> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov qword ptr [rsp+178h+var_148], rax movaps [rsp+178h+var_138], xmm0 movaps [rsp+178h+var_128], xmm0 mov qword ptr [rsp+178h+var_138], r15 lea rax, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E9_M_invokeERKSt9_Any_dataSF_; std::_Function_handler<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> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke(std::_Any_data 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> &) mov qword ptr [rsp+178h+var_128+8], rax lea rax, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E10_M_managerERSt9_Any_dataRKSU_St18_Manager_operation; std::_Function_handler<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> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov qword ptr [rsp+178h+var_128], rax cmp qword ptr [r14+10h], 0 jz loc_BD2FB mov rsi, rsp mov rdi, r14 call qword ptr [r14+18h] lea rdi, [rsp+178h+var_110]; this call _ZN15SchemaConverter12check_errorsEv; SchemaConverter::check_errors(void) lea rsi, [rsp+178h+var_110] mov rdi, rbx call _ZN15SchemaConverter14format_grammarB5cxx11Ev; SchemaConverter::format_grammar(void) mov rax, qword ptr [rsp+178h+var_128] test rax, rax jz short loc_BD25F lea rdi, [rsp+178h+var_138] mov rsi, rdi mov edx, 3 call rax loc_BD25F: mov rax, qword ptr [rsp+178h+var_148] test rax, rax jz short loc_BD278 lea rdi, [rsp+178h+var_158] mov rsi, rdi mov edx, 3 call rax loc_BD278: mov rax, qword ptr [rsp+178h+var_168] test rax, rax jz short loc_BD28F mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_BD28F: lea rdi, [rsp+178h+var_30] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+178h+var_48] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+178h+var_80] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,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,true,true>>::~_Hashtable() lea rdi, [rsp+178h+var_B8] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEESaISH_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSJ_18_Mod_range_hashingENSJ_20_Default_ranged_hashENSJ_20_Prime_rehash_policyENSJ_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,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>>,std::allocator<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>>>,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 r14, [rsp+178h+var_E8] mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree() mov rax, [r14-18h] test rax, rax jz short loc_BD2EB lea rdi, [rsp+178h+var_110] mov rsi, rdi mov edx, 3 call rax loc_BD2EB: mov rax, rbx add rsp, 160h pop rbx pop r14 pop r15 retn loc_BD2FB: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) jmp short loc_BD326 jmp short loc_BD326 jmp short loc_BD326 jmp short loc_BD326 jmp short loc_BD326 mov rbx, rax mov rax, qword ptr [rsp+178h+var_168] test rax, rax jz short loc_BD343 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax jmp short loc_BD343 loc_BD326: mov rdi, rax call __clang_call_terminate mov rbx, rax mov rdi, rsp; this call _ZN22common_grammar_builderD2Ev; common_grammar_builder::~common_grammar_builder() lea rdi, [rsp+178h+var_110]; this call _ZN15SchemaConverterD2Ev; SchemaConverter::~SchemaConverter() loc_BD343: mov rdi, rbx call __Unwind_Resume
long long build_grammar[abi:cxx11](long long a1, long long a2, unsigned __int8 *a3, long long a4, int a5, int a6) { int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d __int128 v11; // [rsp+0h] [rbp-178h] BYREF long long ( *v12)(); // [rsp+10h] [rbp-168h] void *v13; // [rsp+18h] [rbp-160h] __int128 v14; // [rsp+20h] [rbp-158h] BYREF long long ( *v15)(); // [rsp+30h] [rbp-148h] long long ( *v16)(int, int, int, int, int, int, int, long long); // [rsp+38h] [rbp-140h] __int128 v17; // [rsp+40h] [rbp-138h] BYREF long long ( *v18)(); // [rsp+50h] [rbp-128h] long long ( *v19)(int, int, int, int, int, int, void *, int, long long); // [rsp+58h] [rbp-120h] int v20; // [rsp+60h] [rbp-118h] int v21[4]; // [rsp+68h] [rbp-110h] BYREF void ( *v22)(int *, int *, long long); // [rsp+78h] [rbp-100h] _BYTE v23[48]; // [rsp+90h] [rbp-E8h] BYREF _BYTE v24[56]; // [rsp+C0h] [rbp-B8h] BYREF _BYTE v25[56]; // [rsp+F8h] [rbp-80h] BYREF _QWORD v26[3]; // [rsp+130h] [rbp-48h] BYREF _QWORD v27[6]; // [rsp+148h] [rbp-30h] BYREF SchemaConverter::SchemaConverter( (int)v21, (int)&v11, *a3, a3[1], a5, a6, 0LL, 0, (long long)std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager, (int)std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke, (void *)v14, SDWORD2(v14), (long long)v15); if ( v12 ) ((void ( *)(__int128 *, __int128 *, long long))v12)(&v11, &v11, 3LL); v11 = (unsigned long long)v21; v13 = &std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke; v12 = std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager; v14 = (unsigned long long)v21; v16 = std::_Function_handler<std::string ()(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> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke; v15 = std::_Function_handler<std::string ()(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> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager; v17 = (unsigned long long)v21; v19 = std::_Function_handler<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> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke; v18 = std::_Function_handler<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> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager; if ( !*(_QWORD *)(a2 + 16) ) std::__throw_bad_function_call(); (*(void ( **)(long long, __int128 *))(a2 + 24))(a2, &v11); SchemaConverter::check_errors((SchemaConverter *)v21); SchemaConverter::format_grammar[abi:cxx11]( a1, (unsigned int)v21, v6, v7, v8, v9, v11, DWORD2(v11), (_DWORD)v12, (_DWORD)v13, v14, DWORD2(v14), (_DWORD)v15, (_DWORD)v16, v17, DWORD2(v17), (_DWORD)v18, (_DWORD)v19, v20, v21[0], v21[2], (char)v22); if ( v18 ) ((void ( *)(__int128 *, __int128 *, long long))v18)(&v17, &v17, 3LL); if ( v15 ) ((void ( *)(__int128 *, __int128 *, long long))v15)(&v14, &v14, 3LL); if ( v12 ) ((void ( *)(__int128 *, __int128 *, long long))v12)(&v11, &v11, 3LL); std::vector<std::string>::~vector(v27); std::vector<std::string>::~vector(v26); std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,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,true,true>>::~_Hashtable((long long)v25); std::_Hashtable<std::string,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>>,std::allocator<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>>>,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(v24); std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree(v23); if ( v22 ) v22(v21, v21, 3LL); return a1; }
build_grammar[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x160 MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOV RSI,RSP MOVAPS xmmword ptr [RSI],XMM0 LEA RAX,[0x1bd46c] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x1bd498] MOV qword ptr [RSI + 0x10],RAX MOVZX EAX,byte ptr [RDX] MOVZX ECX,byte ptr [RDX + 0x1] LAB_001bd17e: LEA R15,[RSP + 0x68] MOV RDI,R15 MOV EDX,EAX CALL 0x001c06ea MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x001bd1a4 LAB_001bd197: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001bd1a4: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOV qword ptr [RSP],R15 LEA RAX,[0x1bd4b0] MOV qword ptr [RSP + 0x18],RAX LEA RAX,[0x1bd4c2] MOV qword ptr [RSP + 0x10],RAX MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOV qword ptr [RSP + 0x20],R15 LEA RAX,[0x1bd4e8] MOV qword ptr [RSP + 0x38],RAX LEA RAX,[0x1bd59a] MOV qword ptr [RSP + 0x30],RAX MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOV qword ptr [RSP + 0x40],R15 LEA RAX,[0x1c0040] MOV qword ptr [RSP + 0x58],RAX LEA RAX,[0x1c00aa] MOV qword ptr [RSP + 0x50],RAX CMP qword ptr [R14 + 0x10],0x0 JZ 0x001bd2fb LAB_001bd225: MOV RSI,RSP MOV RDI,R14 CALL qword ptr [R14 + 0x18] LEA RDI,[RSP + 0x68] CALL 0x001c08ec LEA RSI,[RSP + 0x68] MOV RDI,RBX CALL 0x001c0aa2 MOV RAX,qword ptr [RSP + 0x50] TEST RAX,RAX JZ 0x001bd25f LEA RDI,[RSP + 0x40] LAB_001bd255: MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001bd25f: MOV RAX,qword ptr [RSP + 0x30] TEST RAX,RAX JZ 0x001bd278 LEA RDI,[RSP + 0x20] LAB_001bd26e: MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001bd278: MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x001bd28f LAB_001bd282: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001bd28f: LEA RDI,[RSP + 0x148] CALL 0x00122380 LEA RDI,[RSP + 0x130] CALL 0x00122380 LEA RDI,[RSP + 0xf8] CALL 0x001801f6 LEA RDI,[RSP + 0xc0] CALL 0x001c12b6 LEA R14,[RSP + 0x90] MOV RDI,R14 CALL 0x001c1398 MOV RAX,qword ptr [R14 + -0x18] TEST RAX,RAX JZ 0x001bd2eb LAB_001bd2dc: LEA RDI,[RSP + 0x68] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001bd2eb: MOV RAX,RBX ADD RSP,0x160 POP RBX POP R14 POP R15 RET LAB_001bd2fb: CALL 0x0011b320
/* build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&) */ function * build_grammar_abi_cxx11_(function *param_1,common_grammar_options *param_2) { long in_RDX; SchemaConverter *local_178; int8 uStack_170; code *local_168; code *pcStack_160; SchemaConverter *local_158; int8 uStack_150; code *local_148; code *pcStack_140; SchemaConverter *local_138; int8 uStack_130; code *local_128; code *pcStack_120; SchemaConverter local_110 [16]; code *local_100; _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> local_e8 [48]; _Hashtable<std::__cxx11::string,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>>>,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_b8 [56]; _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,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,true,true>> local_80 [56]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_48 [24]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_30 [24]; local_178 = (SchemaConverter *)0x0; uStack_170 = 0; pcStack_160 = std:: _Function_handler<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::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0> ::_M_invoke; local_168 = std:: _Function_handler<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::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0> ::_M_manager; /* try { // try from 001bd17e to 001bd18c has its CatchHandler @ 001bd30a */ SchemaConverter::SchemaConverter (local_110,(function *)&local_178,*(bool *)in_RDX,*(bool *)(in_RDX + 1)); if (local_168 != (code *)0x0) { /* try { // try from 001bd197 to 001bd1a3 has its CatchHandler @ 001bd308 */ (*local_168)(&local_178,&local_178,3); } uStack_170 = 0; pcStack_160 = std:: _Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1> ::_M_invoke; local_168 = std:: _Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1> ::_M_manager; uStack_150 = 0; pcStack_140 = std:: _Function_handler<std::__cxx11::string(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>const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2> ::_M_invoke; local_148 = std:: _Function_handler<std::__cxx11::string(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>const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2> ::_M_manager; uStack_130 = 0; pcStack_120 = std:: _Function_handler<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>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3> ::_M_invoke; local_128 = std:: _Function_handler<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>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3> ::_M_manager; local_178 = local_110; local_158 = local_110; local_138 = local_110; if (*(long *)(param_2 + 0x10) != 0) { /* try { // try from 001bd225 to 001bd245 has its CatchHandler @ 001bd32e */ (**(code **)(param_2 + 0x18))(param_2,&local_178); SchemaConverter::check_errors(local_110); SchemaConverter::format_grammar_abi_cxx11_(); if (local_128 != (code *)0x0) { /* try { // try from 001bd255 to 001bd25e has its CatchHandler @ 001bd306 */ (*local_128)(&local_138,&local_138,3); } if (local_148 != (code *)0x0) { /* try { // try from 001bd26e to 001bd277 has its CatchHandler @ 001bd304 */ (*local_148)(&local_158,&local_158,3); } if (local_168 != (code *)0x0) { /* try { // try from 001bd282 to 001bd28e has its CatchHandler @ 001bd302 */ (*local_168)(&local_178,&local_178,3); } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_30); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_48); std:: _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,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,true,true>> ::~_Hashtable(local_80); std:: _Hashtable<std::__cxx11::string,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>>>,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_b8); std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::~_Rb_tree(local_e8); if (local_100 != (code *)0x0) { /* try { // try from 001bd2dc to 001bd2ea has its CatchHandler @ 001bd300 */ (*local_100)(local_110,local_110,3); } return param_1; } /* WARNING: Subroutine does not return */ /* try { // try from 001bd2fb to 001bd2ff has its CatchHandler @ 001bd32e */ std::__throw_bad_function_call(); }
13,643
google::protobuf::DescriptorBuilder::BuildService(google::protobuf::ServiceDescriptorProto const&, void const*, google::protobuf::ServiceDescriptor*, google::protobuf::internal::FlatAllocator&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
void DescriptorBuilder::BuildService(const ServiceDescriptorProto& proto, const void* /* dummy */, ServiceDescriptor* result, internal::FlatAllocator& alloc) { result->all_names_ = AllocateNameStrings(file_->package(), proto.name(), alloc); result->file_ = file_; ValidateSymbolName(proto.name(), result->full_name(), proto); BUILD_ARRAY(proto, result, method, BuildMethod, result); // Copy options. result->options_ = nullptr; // Set to default_instance later if necessary. if (proto.has_options()) { AllocateOptions(proto.options(), result, ServiceDescriptorProto::kOptionsFieldNumber, "google.protobuf.ServiceOptions", alloc); } AddSymbol(result->full_name(), nullptr, result->name(), proto, Symbol(result)); }
O0
cpp
google::protobuf::DescriptorBuilder::BuildService(google::protobuf::ServiceDescriptorProto const&, void const*, google::protobuf::ServiceDescriptor*, google::protobuf::internal::FlatAllocator&): subq $0xc8, %rsp movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movq %rdx, 0xb0(%rsp) movq %rcx, 0xa8(%rsp) movq %r8, 0xa0(%rsp) movq 0xc0(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x58(%rax), %rdi callq 0x159c0 movq %rax, 0x38(%rsp) movq 0xb8(%rsp), %rdi callq 0x795d0 movq 0x38(%rsp), %rsi movq 0x40(%rsp), %rdi movq %rax, %rdx movq 0xa0(%rsp), %rcx callq 0x51810 movq %rax, %rdx movq 0x40(%rsp), %rax movq 0xa8(%rsp), %rcx movq %rdx, 0x8(%rcx) movq 0x58(%rax), %rcx movq 0xa8(%rsp), %rax movq %rcx, 0x10(%rax) movq 0xb8(%rsp), %rdi callq 0x795d0 movq %rax, 0x48(%rsp) movq 0xa8(%rsp), %rdi callq 0x795e0 movq 0x40(%rsp), %rdi movq 0x48(%rsp), %rsi movq %rax, %rdx movq 0xb8(%rsp), %rcx callq 0x47170 movq 0xb8(%rsp), %rdi callq 0x79600 movl %eax, %ecx movq 0xa8(%rsp), %rax movl %ecx, 0x28(%rax) movq 0xa0(%rsp), %rax movq %rax, 0x50(%rsp) movq 0xb8(%rsp), %rdi callq 0x79600 movq 0x50(%rsp), %rdi movl %eax, %esi callq 0x55f10 movq %rax, %rcx movq 0xa8(%rsp), %rax movq %rcx, 0x20(%rax) movl $0x0, 0x9c(%rsp) movl 0x9c(%rsp), %eax movl %eax, 0x34(%rsp) movq 0xb8(%rsp), %rdi callq 0x79600 movl %eax, %ecx movl 0x34(%rsp), %eax cmpl %ecx, %eax jge 0x4e9ac movq 0xb8(%rsp), %rdi movl 0x9c(%rsp), %esi callq 0x79610 movq 0x40(%rsp), %rdi movq %rax, %rsi movq 0xa8(%rsp), %rdx movq 0xa8(%rsp), %rax movq 0x20(%rax), %rcx movslq 0x9c(%rsp), %rax shlq $0x6, %rax addq %rax, %rcx movq 0xa0(%rsp), %r8 callq 0x56130 movl 0x9c(%rsp), %eax addl $0x1, %eax movl %eax, 0x9c(%rsp) jmp 0x4e928 movq 0xa8(%rsp), %rax movq $0x0, 0x18(%rax) movq 0xb8(%rsp), %rdi callq 0x79630 testb $0x1, %al jne 0x4e9d2 jmp 0x4ea8a movq 0xb8(%rsp), %rdi callq 0x79740 movq %rax, 0x18(%rsp) movq 0xa8(%rsp), %rax movq %rax, 0x20(%rsp) leaq 0x77(%rsp), %rdi movq %rdi, 0x28(%rsp) callq 0x13760 movq 0x28(%rsp), %rdx leaq 0x19fe39(%rip), %rsi # 0x1ee845 leaq 0x78(%rsp), %rdi callq 0x135f0 jmp 0x4ea18 movq 0x20(%rsp), %rdx movq 0x18(%rsp), %rsi movq 0x40(%rsp), %rdi movq 0xa0(%rsp), %r9 movl $0x3, %ecx leaq 0x78(%rsp), %r8 callq 0x79650 jmp 0x4ea40 leaq 0x78(%rsp), %rdi callq 0x13290 leaq 0x77(%rsp), %rdi callq 0x134d0 jmp 0x4ea8a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) jmp 0x4ea7e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) leaq 0x78(%rsp), %rdi callq 0x13290 leaq 0x77(%rsp), %rdi callq 0x134d0 jmp 0x4eaf5 movq 0xa8(%rsp), %rdi callq 0x795e0 movq %rax, (%rsp) movq 0xa8(%rsp), %rdi callq 0x161b0 movq %rax, 0x8(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x10(%rsp) movq 0xa8(%rsp), %rsi leaq 0x58(%rsp), %rdi callq 0x79750 movq 0x40(%rsp), %rdi movq (%rsp), %rsi movq 0x8(%rsp), %rcx movq 0x10(%rsp), %r8 movq 0x58(%rsp), %r9 xorl %eax, %eax movl %eax, %edx callq 0x461e0 addq $0xc8, %rsp retq movq 0x68(%rsp), %rdi callq 0x13750 nop
_ZN6google8protobuf17DescriptorBuilder12BuildServiceERKNS0_22ServiceDescriptorProtoEPKvPNS0_17ServiceDescriptorERNS0_8internal13FlatAllocatorE: sub rsp, 0C8h mov [rsp+0C8h+var_8], rdi mov [rsp+0C8h+var_10], rsi mov [rsp+0C8h+var_18], rdx mov [rsp+0C8h+var_20], rcx mov [rsp+0C8h+var_28], r8 mov rax, [rsp+0C8h+var_8] mov [rsp+0C8h+var_88], rax mov rdi, [rax+58h] call _ZNK6google8protobuf14FileDescriptor7packageB5cxx11Ev; google::protobuf::FileDescriptor::package(void) mov [rsp+0C8h+var_90], rax mov rdi, [rsp+0C8h+var_10] call _ZNK6google8protobuf22ServiceDescriptorProto4nameB5cxx11Ev; google::protobuf::ServiceDescriptorProto::name(void) mov rsi, [rsp+0C8h+var_90] mov rdi, [rsp+0C8h+var_88] mov rdx, rax mov rcx, [rsp+0C8h+var_28] call _ZN6google8protobuf17DescriptorBuilder19AllocateNameStringsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_RNS0_8internal13FlatAllocatorE; google::protobuf::DescriptorBuilder::AllocateNameStrings(std::string const&,std::string const&,google::protobuf::internal::FlatAllocator &) mov rdx, rax mov rax, [rsp+0C8h+var_88] mov rcx, [rsp+0C8h+var_20] mov [rcx+8], rdx mov rcx, [rax+58h] mov rax, [rsp+0C8h+var_20] mov [rax+10h], rcx mov rdi, [rsp+0C8h+var_10] call _ZNK6google8protobuf22ServiceDescriptorProto4nameB5cxx11Ev; google::protobuf::ServiceDescriptorProto::name(void) mov [rsp+0C8h+var_80], rax mov rdi, [rsp+0C8h+var_20] call _ZNK6google8protobuf17ServiceDescriptor9full_nameB5cxx11Ev; google::protobuf::ServiceDescriptor::full_name(void) mov rdi, [rsp+0C8h+var_88] mov rsi, [rsp+0C8h+var_80] mov rdx, rax mov rcx, [rsp+0C8h+var_10] call _ZN6google8protobuf17DescriptorBuilder18ValidateSymbolNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_RKNS0_7MessageE; google::protobuf::DescriptorBuilder::ValidateSymbolName(std::string const&,std::string const&,google::protobuf::Message const&) mov rdi, [rsp+0C8h+var_10]; this call _ZNK6google8protobuf22ServiceDescriptorProto11method_sizeEv; google::protobuf::ServiceDescriptorProto::method_size(void) mov ecx, eax mov rax, [rsp+0C8h+var_20] mov [rax+28h], ecx mov rax, [rsp+0C8h+var_28] mov [rsp+0C8h+var_78], rax mov rdi, [rsp+0C8h+var_10]; this call _ZNK6google8protobuf22ServiceDescriptorProto11method_sizeEv; google::protobuf::ServiceDescriptorProto::method_size(void) mov rdi, [rsp+0C8h+var_78] mov esi, eax call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE13AllocateArrayINS0_16MethodDescriptorEEEPT_i; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::AllocateArray<google::protobuf::MethodDescriptor>(int) mov rcx, rax mov rax, [rsp+0C8h+var_20] mov [rax+20h], rcx mov [rsp+0C8h+var_2C], 0 loc_4E928: mov eax, [rsp+0C8h+var_2C] mov [rsp+0C8h+var_94], eax mov rdi, [rsp+0C8h+var_10]; this call _ZNK6google8protobuf22ServiceDescriptorProto11method_sizeEv; google::protobuf::ServiceDescriptorProto::method_size(void) mov ecx, eax mov eax, [rsp+0C8h+var_94] cmp eax, ecx jge short loc_4E9AC mov rdi, [rsp+0C8h+var_10]; this mov esi, [rsp+0C8h+var_2C]; int call _ZNK6google8protobuf22ServiceDescriptorProto6methodEi; google::protobuf::ServiceDescriptorProto::method(int) mov rdi, [rsp+0C8h+var_88]; this mov rsi, rax; google::protobuf::MethodDescriptorProto * mov rdx, [rsp+0C8h+var_20]; google::protobuf::ServiceDescriptor * mov rax, [rsp+0C8h+var_20] mov rcx, [rax+20h] movsxd rax, [rsp+0C8h+var_2C] shl rax, 6 add rcx, rax; google::protobuf::MethodDescriptor * mov r8, [rsp+0C8h+var_28]; google::protobuf::internal::FlatAllocator * call _ZN6google8protobuf17DescriptorBuilder11BuildMethodERKNS0_21MethodDescriptorProtoEPKNS0_17ServiceDescriptorEPNS0_16MethodDescriptorERNS0_8internal13FlatAllocatorE; google::protobuf::DescriptorBuilder::BuildMethod(google::protobuf::MethodDescriptorProto const&,google::protobuf::ServiceDescriptor const*,google::protobuf::MethodDescriptor *,google::protobuf::internal::FlatAllocator &) mov eax, [rsp+0C8h+var_2C] add eax, 1 mov [rsp+0C8h+var_2C], eax jmp loc_4E928 loc_4E9AC: mov rax, [rsp+0C8h+var_20] mov qword ptr [rax+18h], 0 mov rdi, [rsp+0C8h+var_10]; this call _ZNK6google8protobuf22ServiceDescriptorProto11has_optionsEv; google::protobuf::ServiceDescriptorProto::has_options(void) test al, 1 jnz short loc_4E9D2 jmp loc_4EA8A loc_4E9D2: mov rdi, [rsp+0C8h+var_10]; this call _ZNK6google8protobuf22ServiceDescriptorProto7optionsEv; google::protobuf::ServiceDescriptorProto::options(void) mov [rsp+0C8h+var_B0], rax mov rax, [rsp+0C8h+var_20] mov [rsp+0C8h+var_A8], rax lea rdi, [rsp+0C8h+var_51] mov [rsp+0C8h+var_A0], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+0C8h+var_A0] lea rsi, aGoogleProtobuf_18; "google.protobuf.ServiceOptions" lea rdi, [rsp+0C8h+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) jmp short $+2 loc_4EA18: mov rdx, [rsp+0C8h+var_A8] mov rsi, [rsp+0C8h+var_B0] mov rdi, [rsp+0C8h+var_88] mov r9, [rsp+0C8h+var_28] mov ecx, 3 lea r8, [rsp+0C8h+var_50] call _ZN6google8protobuf17DescriptorBuilder15AllocateOptionsINS0_17ServiceDescriptorEEEvRKNT_11OptionsTypeEPS4_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS0_8internal13FlatAllocatorE; google::protobuf::DescriptorBuilder::AllocateOptions<google::protobuf::ServiceDescriptor>(google::protobuf::ServiceDescriptor::OptionsType const&,google::protobuf::ServiceDescriptor::OptionsType*,int,std::string const&,google::protobuf::internal::FlatAllocator &) jmp short $+2 loc_4EA40: lea rdi, [rsp+0C8h+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+0C8h+var_51] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_4EA8A mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax jmp short loc_4EA7E mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax lea rdi, [rsp+arg_70] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_4EA7E: lea rdi, [rsp+arg_6F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_4EAF5 loc_4EA8A: mov rdi, [rsp+0C8h+var_20] call _ZNK6google8protobuf17ServiceDescriptor9full_nameB5cxx11Ev; google::protobuf::ServiceDescriptor::full_name(void) mov [rsp+0C8h+var_C8], rax mov rdi, [rsp+0C8h+var_20] call _ZNK6google8protobuf17ServiceDescriptor4nameB5cxx11Ev; google::protobuf::ServiceDescriptor::name(void) mov [rsp+0C8h+var_C0], rax mov rax, [rsp+0C8h+var_10] mov [rsp+0C8h+var_B8], rax mov rsi, [rsp+0C8h+var_20]; google::protobuf::ServiceDescriptor * lea rdi, [rsp+0C8h+var_70]; this call _ZN6google8protobuf6SymbolC2EPNS0_17ServiceDescriptorE; google::protobuf::Symbol::Symbol(google::protobuf::ServiceDescriptor *) mov rdi, [rsp+0C8h+var_88] mov rsi, [rsp+0C8h+var_C8] mov rcx, [rsp+0C8h+var_C0] mov r8, [rsp+0C8h+var_B8] mov r9, [rsp+0C8h+var_70] xor eax, eax mov edx, eax call _ZN6google8protobuf17DescriptorBuilder9AddSymbolERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvS9_RKNS0_7MessageENS0_6SymbolE; google::protobuf::DescriptorBuilder::AddSymbol(std::string const&,void const*,std::string const&,google::protobuf::Message const&,google::protobuf::Symbol) add rsp, 0C8h retn loc_4EAF5: mov rdi, [rsp+arg_60] call __Unwind_Resume
char google::protobuf::DescriptorBuilder::BuildService( google::protobuf::DescriptorBuilder *this, const google::protobuf::ServiceDescriptorProto *a2, const void *a3, google::protobuf::ServiceDescriptor *a4, google::protobuf::internal::FlatAllocator *a5) { int v5; // eax int v6; // r8d int v7; // r9d long long v8; // rax unsigned int v9; // eax unsigned long long v10; // rsi int v11; // edx int v12; // ecx int v13; // r8d int v14; // r9d void *v16; // [rsp+0h] [rbp-C8h] long long v17; // [rsp+8h] [rbp-C0h] google::protobuf::ServiceDescriptorProto *v18; // [rsp+10h] [rbp-B8h] int v19; // [rsp+18h] [rbp-B0h] int v20; // [rsp+20h] [rbp-A8h] int v21; // [rsp+38h] [rbp-90h] long long v22; // [rsp+48h] [rbp-80h] long long v23[3]; // [rsp+58h] [rbp-70h] BYREF char v24; // [rsp+77h] [rbp-51h] BYREF _BYTE v25[36]; // [rsp+78h] [rbp-50h] BYREF int i; // [rsp+9Ch] [rbp-2Ch] google::protobuf::internal::FlatAllocator *v27; // [rsp+A0h] [rbp-28h] google::protobuf::ServiceDescriptor *v28; // [rsp+A8h] [rbp-20h] const void *v29; // [rsp+B0h] [rbp-18h] google::protobuf::ServiceDescriptorProto *v30; // [rsp+B8h] [rbp-10h] google::protobuf::DescriptorBuilder *v31; // [rsp+C0h] [rbp-8h] v31 = this; v30 = a2; v29 = a3; v28 = a4; v27 = a5; v21 = google::protobuf::FileDescriptor::package[abi:cxx11](*((_QWORD *)this + 11)); v5 = google::protobuf::ServiceDescriptorProto::name[abi:cxx11](a2); *((_QWORD *)v28 + 1) = google::protobuf::DescriptorBuilder::AllocateNameStrings( (_DWORD)this, v21, v5, (_DWORD)v27, v6, v7); *((_QWORD *)v28 + 2) = *((_QWORD *)this + 11); v22 = google::protobuf::ServiceDescriptorProto::name[abi:cxx11](v30); v8 = google::protobuf::ServiceDescriptor::full_name[abi:cxx11](v28); google::protobuf::DescriptorBuilder::ValidateSymbolName((long long)this, v22, v8, v30); *((_DWORD *)v28 + 10) = google::protobuf::ServiceDescriptorProto::method_size(v30); v9 = google::protobuf::ServiceDescriptorProto::method_size(v30); v10 = v9; *((_QWORD *)v28 + 4) = google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::AllocateArray<google::protobuf::MethodDescriptor>( (_DWORD)v27, v9, v11, v12, v13, v14); for ( i = 0; i < (int)google::protobuf::ServiceDescriptorProto::method_size(v30); ++i ) { v10 = google::protobuf::ServiceDescriptorProto::method(v30, i); google::protobuf::DescriptorBuilder::BuildMethod( this, (const google::protobuf::MethodDescriptorProto *)v10, v28, (google::protobuf::MethodDescriptor *)(((long long)i << 6) + *((_QWORD *)v28 + 4)), v27); } *((_QWORD *)v28 + 3) = 0LL; if ( (google::protobuf::ServiceDescriptorProto::has_options(v30) & 1) != 0 ) { v19 = google::protobuf::ServiceDescriptorProto::options(v30); v20 = (int)v28; std::allocator<char>::allocator(&v24, v10); std::string::basic_string(v25, "google.protobuf.ServiceOptions", &v24); google::protobuf::DescriptorBuilder::AllocateOptions<google::protobuf::ServiceDescriptor>( (_DWORD)this, v19, v20, 3, (unsigned int)v25, (_DWORD)v27); std::string::~string(v25); std::allocator<char>::~allocator(&v24); } v16 = (void *)google::protobuf::ServiceDescriptor::full_name[abi:cxx11](v28); v17 = google::protobuf::ServiceDescriptor::name[abi:cxx11]((long long)v28); v18 = v30; google::protobuf::Symbol::Symbol((google::protobuf::Symbol *)v23, v28); return google::protobuf::DescriptorBuilder::AddSymbol((long long)this, v16, 0LL, v17, (long long)v18, v23[0]); }
BuildService: SUB RSP,0xc8 MOV qword ptr [RSP + 0xc0],RDI MOV qword ptr [RSP + 0xb8],RSI MOV qword ptr [RSP + 0xb0],RDX MOV qword ptr [RSP + 0xa8],RCX MOV qword ptr [RSP + 0xa0],R8 MOV RAX,qword ptr [RSP + 0xc0] MOV qword ptr [RSP + 0x40],RAX MOV RDI,qword ptr [RAX + 0x58] CALL 0x001159c0 MOV qword ptr [RSP + 0x38],RAX MOV RDI,qword ptr [RSP + 0xb8] CALL 0x001795d0 MOV RSI,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RSP + 0x40] MOV RDX,RAX MOV RCX,qword ptr [RSP + 0xa0] CALL 0x00151810 MOV RDX,RAX MOV RAX,qword ptr [RSP + 0x40] MOV RCX,qword ptr [RSP + 0xa8] MOV qword ptr [RCX + 0x8],RDX MOV RCX,qword ptr [RAX + 0x58] MOV RAX,qword ptr [RSP + 0xa8] MOV qword ptr [RAX + 0x10],RCX MOV RDI,qword ptr [RSP + 0xb8] CALL 0x001795d0 MOV qword ptr [RSP + 0x48],RAX MOV RDI,qword ptr [RSP + 0xa8] CALL 0x001795e0 MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x48] MOV RDX,RAX MOV RCX,qword ptr [RSP + 0xb8] CALL 0x00147170 MOV RDI,qword ptr [RSP + 0xb8] CALL 0x00179600 MOV ECX,EAX MOV RAX,qword ptr [RSP + 0xa8] MOV dword ptr [RAX + 0x28],ECX MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x50],RAX MOV RDI,qword ptr [RSP + 0xb8] CALL 0x00179600 MOV RDI,qword ptr [RSP + 0x50] MOV ESI,EAX CALL 0x00155f10 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0xa8] MOV qword ptr [RAX + 0x20],RCX MOV dword ptr [RSP + 0x9c],0x0 LAB_0014e928: MOV EAX,dword ptr [RSP + 0x9c] MOV dword ptr [RSP + 0x34],EAX MOV RDI,qword ptr [RSP + 0xb8] CALL 0x00179600 MOV ECX,EAX MOV EAX,dword ptr [RSP + 0x34] CMP EAX,ECX JGE 0x0014e9ac MOV RDI,qword ptr [RSP + 0xb8] MOV ESI,dword ptr [RSP + 0x9c] CALL 0x00179610 MOV RDI,qword ptr [RSP + 0x40] MOV RSI,RAX MOV RDX,qword ptr [RSP + 0xa8] MOV RAX,qword ptr [RSP + 0xa8] MOV RCX,qword ptr [RAX + 0x20] MOVSXD RAX,dword ptr [RSP + 0x9c] SHL RAX,0x6 ADD RCX,RAX MOV R8,qword ptr [RSP + 0xa0] CALL 0x00156130 MOV EAX,dword ptr [RSP + 0x9c] ADD EAX,0x1 MOV dword ptr [RSP + 0x9c],EAX JMP 0x0014e928 LAB_0014e9ac: MOV RAX,qword ptr [RSP + 0xa8] MOV qword ptr [RAX + 0x18],0x0 MOV RDI,qword ptr [RSP + 0xb8] CALL 0x00179630 TEST AL,0x1 JNZ 0x0014e9d2 JMP 0x0014ea8a LAB_0014e9d2: MOV RDI,qword ptr [RSP + 0xb8] CALL 0x00179740 MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0xa8] MOV qword ptr [RSP + 0x20],RAX LEA RDI,[RSP + 0x77] MOV qword ptr [RSP + 0x28],RDI CALL 0x00113760 MOV RDX,qword ptr [RSP + 0x28] LAB_0014ea05: LEA RSI,[0x2ee845] LEA RDI,[RSP + 0x78] CALL 0x001135f0 JMP 0x0014ea18 LAB_0014ea18: MOV RDX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RSP + 0x40] MOV R9,qword ptr [RSP + 0xa0] LAB_0014ea2f: MOV ECX,0x3 LEA R8,[RSP + 0x78] CALL 0x00179650 LAB_0014ea3e: JMP 0x0014ea40 LAB_0014ea40: LEA RDI,[RSP + 0x78] CALL 0x00113290 LEA RDI,[RSP + 0x77] CALL 0x001134d0 JMP 0x0014ea8a LAB_0014ea8a: MOV RDI,qword ptr [RSP + 0xa8] CALL 0x001795e0 MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0xa8] CALL 0x001161b0 MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0x10],RAX MOV RSI,qword ptr [RSP + 0xa8] LEA RDI,[RSP + 0x58] CALL 0x00179750 MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV R8,qword ptr [RSP + 0x10] MOV R9,qword ptr [RSP + 0x58] XOR EAX,EAX MOV EDX,EAX CALL 0x001461e0 ADD RSP,0xc8 RET
/* google::protobuf::DescriptorBuilder::BuildService(google::protobuf::ServiceDescriptorProto const&, void const*, google::protobuf::ServiceDescriptor*, google::protobuf::internal::FlatAllocator&) */ void __thiscall google::protobuf::DescriptorBuilder::BuildService (DescriptorBuilder *this,ServiceDescriptorProto *param_1,void *param_2, ServiceDescriptor *param_3,FlatAllocator *param_4) { FlatAllocator *this_00; ServiceDescriptor *pSVar1; ServiceDescriptorProto *pSVar2; int4 uVar3; int iVar4; int iVar5; string *psVar6; string *psVar7; int8 uVar8; MethodDescriptor *pMVar9; MethodDescriptorProto *pMVar10; ulong uVar11; OptionsType *pOVar12; int8 uVar13; int8 local_70 [3]; allocator local_51; string local_50 [36]; int local_2c; FlatAllocator *local_28; ServiceDescriptor *local_20; void *local_18; ServiceDescriptorProto *local_10; DescriptorBuilder *local_8; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; local_8 = this; psVar6 = (string *)FileDescriptor::package_abi_cxx11_(*(FileDescriptor **)(this + 0x58)); psVar7 = (string *)ServiceDescriptorProto::name_abi_cxx11_(local_10); uVar8 = AllocateNameStrings(this,psVar6,psVar7,local_28); *(int8 *)(local_20 + 8) = uVar8; *(int8 *)(local_20 + 0x10) = *(int8 *)(this + 0x58); psVar6 = (string *)ServiceDescriptorProto::name_abi_cxx11_(local_10); psVar7 = (string *)ServiceDescriptor::full_name_abi_cxx11_(local_20); ValidateSymbolName(this,psVar6,psVar7,(Message *)local_10); uVar3 = ServiceDescriptorProto::method_size(local_10); this_00 = local_28; *(int4 *)(local_20 + 0x28) = uVar3; iVar4 = ServiceDescriptorProto::method_size(local_10); pMVar9 = (anonymous_namespace):: FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> ::AllocateArray<google::protobuf::MethodDescriptor> ((FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> *)this_00,iVar4); *(MethodDescriptor **)(local_20 + 0x20) = pMVar9; for (local_2c = 0; iVar4 = local_2c, iVar5 = ServiceDescriptorProto::method_size(local_10), iVar4 < iVar5; local_2c = local_2c + 1) { pMVar10 = (MethodDescriptorProto *)ServiceDescriptorProto::method(local_10,local_2c); BuildMethod(this,pMVar10,local_20, (MethodDescriptor *)(*(long *)(local_20 + 0x20) + (long)local_2c * 0x40),local_28); } *(int8 *)(local_20 + 0x18) = 0; uVar11 = ServiceDescriptorProto::has_options(local_10); if ((uVar11 & 1) != 0) { pOVar12 = (OptionsType *)ServiceDescriptorProto::options(local_10); pSVar1 = local_20; std::allocator<char>::allocator(); /* try { // try from 0014ea05 to 0014ea15 has its CatchHandler @ 0014ea56 */ std::__cxx11::string::string(local_50,"google.protobuf.ServiceOptions",&local_51); /* try { // try from 0014ea2f to 0014ea3d has its CatchHandler @ 0014ea66 */ AllocateOptions<google::protobuf::ServiceDescriptor>(this,pOVar12,pSVar1,3,local_50,local_28); std::__cxx11::string::~string(local_50); std::allocator<char>::~allocator((allocator<char> *)&local_51); } uVar8 = ServiceDescriptor::full_name_abi_cxx11_(local_20); uVar13 = ServiceDescriptor::name_abi_cxx11_(local_20); pSVar2 = local_10; Symbol::Symbol((Symbol *)local_70,local_20); AddSymbol(this,uVar8,0,uVar13,pSVar2,local_70[0]); return; }
13,644
google::protobuf::DescriptorBuilder::BuildService(google::protobuf::ServiceDescriptorProto const&, void const*, google::protobuf::ServiceDescriptor*, google::protobuf::internal::FlatAllocator&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
void DescriptorBuilder::BuildService(const ServiceDescriptorProto& proto, const void* /* dummy */, ServiceDescriptor* result, internal::FlatAllocator& alloc) { result->all_names_ = AllocateNameStrings(file_->package(), proto.name(), alloc); result->file_ = file_; ValidateSymbolName(proto.name(), result->full_name(), proto); BUILD_ARRAY(proto, result, method, BuildMethod, result); // Copy options. result->options_ = nullptr; // Set to default_instance later if necessary. if (proto.has_options()) { AllocateOptions(proto.options(), result, ServiceDescriptorProto::kOptionsFieldNumber, "google.protobuf.ServiceOptions", alloc); } AddSymbol(result->full_name(), nullptr, result->name(), proto, Symbol(result)); }
O3
cpp
google::protobuf::DescriptorBuilder::BuildService(google::protobuf::ServiceDescriptorProto const&, void const*, google::protobuf::ServiceDescriptor*, google::protobuf::internal::FlatAllocator&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r8, %r12 movq %rcx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq 0x58(%rdi), %rax movq 0x10(%rax), %rsi movq 0x30(%r14), %rdx andq $-0x4, %rdx movq %r8, %rcx callq 0x30864 movq %rax, 0x8(%rbx) movq 0x58(%r15), %rcx movq %rcx, 0x10(%rbx) movq 0x30(%r14), %rsi andq $-0x4, %rsi leaq 0x20(%rax), %rdx movq %r15, %rdi movq %r14, %rcx callq 0x2a9a2 movl 0x20(%r14), %r13d movl %r13d, 0x28(%rbx) movq (%r12), %rbp testq %rbp, %rbp jne 0x2f20a leaq 0x86c1b(%rip), %rdx # 0xb5de4 leaq 0x10(%rsp), %rbp movq %rbp, %rdi movl $0x3, %esi movl $0x187, %ecx # imm = 0x187 callq 0x169ca leaq 0x893e5(%rip), %rsi # 0xb85cc movq %rbp, %rdi callq 0x164c8 leaq 0x7(%rsp), %rdi movq %rax, %rsi callq 0x165a2 leaq 0x10(%rsp), %rdi callq 0x169e8 movq (%r12), %rbp movslq 0x9c(%r12), %rax shll $0x6, %r13d addl %eax, %r13d movl %r13d, 0x9c(%r12) cmpl 0x68(%r12), %r13d jle 0x2f276 movq %rax, 0x8(%rsp) leaq 0x86bb0(%rip), %rdx # 0xb5de4 leaq 0x10(%rsp), %r13 movq %r13, %rdi movl $0x3, %esi movl $0x18d, %ecx # imm = 0x18D callq 0x169ca leaq 0x8939a(%rip), %rsi # 0xb85ec movq %r13, %rdi callq 0x164c8 leaq 0x7(%rsp), %rdi movq %rax, %rsi callq 0x165a2 leaq 0x10(%rsp), %rdi callq 0x169e8 movq 0x8(%rsp), %rax addq %rax, %rbp movq %rbp, 0x20(%rbx) cmpl $0x0, 0x20(%r14) jle 0x2f2b7 xorl %r13d, %r13d xorl %ebp, %ebp movq 0x28(%r14), %rax movq 0x8(%rax,%rbp,8), %rsi movq 0x20(%rbx), %rcx addq %r13, %rcx movq %r15, %rdi movq %rbx, %rdx movq %r12, %r8 callq 0x33390 incq %rbp movslq 0x20(%r14), %rax addq $0x40, %r13 cmpq %rax, %rbp jl 0x2f289 movq $0x0, 0x18(%rbx) testb $0x2, 0x10(%r14) je 0x2f321 movq 0x38(%r14), %r13 leaq 0x20(%rsp), %rbp movq %rbp, -0x10(%rbp) leaq 0x87d60(%rip), %rsi # 0xb703a leaq 0x87d77(%rip), %rdx # 0xb7058 leaq 0x10(%rsp), %rdi callq 0x137ec testq %r13, %r13 jne 0x2f2f7 leaq 0xd36b1(%rip), %r13 # 0x1029a8 leaq 0x10(%rsp), %r8 movq %r15, %rdi movq %r13, %rsi movq %rbx, %rdx movl $0x3, %ecx movq %r12, %r9 callq 0x3f282 movq 0x10(%rsp), %rdi cmpq %rbp, %rdi je 0x2f321 callq 0xf330 movq 0x8(%rbx), %rsi addq $0x20, %rsi movb $0x7, (%rbx) movq %r15, %rdi xorl %edx, %edx movq %r14, %r8 movq %rbx, %r9 callq 0x29c6c addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x2f36a jmp 0x2f36a movq %rax, %rbx movq 0x10(%rsp), %rdi cmpq %rbp, %rdi je 0x2f377 callq 0xf330 jmp 0x2f377 movq %rax, %rbx jmp 0x2f377 jmp 0x2f36a movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x169e8 movq %rbx, %rdi callq 0xf570 nop
_ZN6google8protobuf17DescriptorBuilder12BuildServiceERKNS0_22ServiceDescriptorProtoEPKvPNS0_17ServiceDescriptorERNS0_8internal13FlatAllocatorE: push rbp; void * push r15; int push r14; int push r13; int push r12; int push rbx; int sub rsp, 48h mov r12, r8 mov rbx, rcx mov r14, rsi mov r15, rdi mov rax, [rdi+58h] mov rsi, [rax+10h] mov rdx, [r14+30h] and rdx, 0FFFFFFFFFFFFFFFCh mov rcx, r8 call _ZN6google8protobuf17DescriptorBuilder19AllocateNameStringsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_RNS0_8internal13FlatAllocatorE; google::protobuf::DescriptorBuilder::AllocateNameStrings(std::string const&,std::string const&,google::protobuf::internal::FlatAllocator &) mov [rbx+8], rax mov rcx, [r15+58h] mov [rbx+10h], rcx mov rsi, [r14+30h] and rsi, 0FFFFFFFFFFFFFFFCh; int lea rdx, [rax+20h]; int mov rdi, r15; int mov rcx, r14; int call _ZN6google8protobuf17DescriptorBuilder18ValidateSymbolNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_RKNS0_7MessageE; google::protobuf::DescriptorBuilder::ValidateSymbolName(std::string const&,std::string const&,google::protobuf::Message const&) mov r13d, [r14+20h] mov [rbx+28h], r13d mov rbp, [r12] test rbp, rbp jnz short loc_2F20A lea rdx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/aimrt_"... lea rbp, [rsp+78h+var_68] mov rdi, rbp mov esi, 3 mov ecx, 187h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) lea rsi, aCheckFailedHas_1; "CHECK failed: has_allocated(): " mov rdi, rbp call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rdi, [rsp+78h+var_71] mov rsi, rax call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) lea rdi, [rsp+78h+var_68]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() mov rbp, [r12] loc_2F20A: movsxd rax, dword ptr [r12+9Ch] shl r13d, 6 add r13d, eax mov [r12+9Ch], r13d cmp r13d, [r12+68h] jle short loc_2F276 mov [rsp+78h+var_70], rax; char lea rdx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/aimrt_"... lea r13, [rsp+78h+var_68] mov rdi, r13 mov esi, 3 mov ecx, 18Dh call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) lea rsi, aCheckFailedUse; "CHECK failed: (used) <= (total_.templat"... mov rdi, r13 call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rdi, [rsp+78h+var_71] mov rsi, rax call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) lea rdi, [rsp+78h+var_68]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() mov rax, [rsp+78h+var_70] loc_2F276: add rbp, rax mov [rbx+20h], rbp cmp dword ptr [r14+20h], 0 jle short loc_2F2B7 xor r13d, r13d xor ebp, ebp loc_2F289: mov rax, [r14+28h] mov rsi, [rax+rbp*8+8]; int mov rcx, [rbx+20h] add rcx, r13; int mov rdi, r15; int mov rdx, rbx; int mov r8, r12; int call _ZN6google8protobuf17DescriptorBuilder11BuildMethodERKNS0_21MethodDescriptorProtoEPKNS0_17ServiceDescriptorEPNS0_16MethodDescriptorERNS0_8internal13FlatAllocatorE; google::protobuf::DescriptorBuilder::BuildMethod(google::protobuf::MethodDescriptorProto const&,google::protobuf::ServiceDescriptor const*,google::protobuf::MethodDescriptor *,google::protobuf::internal::FlatAllocator &) inc rbp movsxd rax, dword ptr [r14+20h] add r13, 40h ; '@' cmp rbp, rax jl short loc_2F289 loc_2F2B7: mov qword ptr [rbx+18h], 0 test byte ptr [r14+10h], 2 jz short loc_2F321 mov r13, [r14+38h] lea rbp, [rsp+78h+var_58] mov [rbp-10h], rbp lea rsi, aGoogleProtobuf_18; "google.protobuf.ServiceOptions" lea rdx, aGoogleProtobuf_18+1Eh; "" lea rdi, [rsp+78h+var_68] 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) test r13, r13 jnz short loc_2F2F7 lea r13, _ZN6google8protobuf33_ServiceOptions_default_instance_E; google::protobuf::_ServiceOptions_default_instance_ loc_2F2F7: lea r8, [rsp+78h+var_68]; int mov rdi, r15; int mov rsi, r13; int mov rdx, rbx; int mov ecx, 3; int mov r9, r12; int call _ZN6google8protobuf17DescriptorBuilder15AllocateOptionsINS0_17ServiceDescriptorEEEvRKNT_11OptionsTypeEPS4_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS0_8internal13FlatAllocatorE; google::protobuf::DescriptorBuilder::AllocateOptions<google::protobuf::ServiceDescriptor>(google::protobuf::ServiceDescriptor::OptionsType const&,google::protobuf::ServiceDescriptor::OptionsType*,int,std::string const&,google::protobuf::internal::FlatAllocator &) mov rdi, [rsp+78h+var_68]; void * cmp rdi, rbp jz short loc_2F321 call __ZdlPv; operator delete(void *) loc_2F321: mov rsi, [rbx+8] add rsi, 20h ; ' '; int mov byte ptr [rbx], 7 mov rdi, r15; int xor edx, edx; int mov r8, r14; int mov r9, rbx; int call _ZN6google8protobuf17DescriptorBuilder9AddSymbolERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvS9_RKNS0_7MessageENS0_6SymbolE; google::protobuf::DescriptorBuilder::AddSymbol(std::string const&,void const*,std::string const&,google::protobuf::Message const&,google::protobuf::Symbol) add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_2F36A jmp short loc_2F36A mov rbx, rax mov rdi, [rsp+arg_8]; void * cmp rdi, rbp jz short loc_2F377 call __ZdlPv; operator delete(void *) jmp short loc_2F377 mov rbx, rax jmp short loc_2F377 jmp short $+2 loc_2F36A: mov rbx, rax lea rdi, [rsp+arg_8]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_2F377: mov rdi, rbx call __Unwind_Resume
char google::protobuf::DescriptorBuilder::BuildService( long long a1, long long a2, long long a3, long long a4, long long *a5, int a6) { long long NameStrings; // rax int v10; // ecx int v11; // r13d long long v12; // rbp google::protobuf::internal::LogMessage *v13; // rax void *v14; // rax int v15; // r13d google::protobuf::internal::LogMessage *v16; // rax int v17; // r13d long long v18; // rbp void ( ***v19)(google::protobuf::ServiceOptions *__hidden); // r13 _QWORD *v20; // rsi void *v22; // [rsp+0h] [rbp-78h] BYREF void *v23; // [rsp+8h] [rbp-70h] void *v24[2]; // [rsp+10h] [rbp-68h] BYREF _BYTE v25[88]; // [rsp+20h] [rbp-58h] BYREF NameStrings = google::protobuf::DescriptorBuilder::AllocateNameStrings( a1, *(_QWORD *)(*(_QWORD *)(a1 + 88) + 16LL), *(_DWORD *)(a2 + 48) & 0xFFFFFFFC, (_DWORD)a5, (_DWORD)a5, a6); *(_QWORD *)(a4 + 8) = NameStrings; *(_QWORD *)(a4 + 16) = *(_QWORD *)(a1 + 88); google::protobuf::DescriptorBuilder::ValidateSymbolName( a1, (long long *)(*(_QWORD *)(a2 + 48) & 0xFFFFFFFFFFFFFFFCLL), NameStrings + 32, a2); v11 = *(_DWORD *)(a2 + 32); *(_DWORD *)(a4 + 40) = v11; v12 = *a5; if ( !*a5 ) { google::protobuf::internal::LogMessage::LogMessage( (long long)v24, 3, (long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc", 391); v13 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<( (long long)v24, (long long)"CHECK failed: has_allocated(): "); google::protobuf::internal::LogFinisher::operator=((long long)&v22 + 7, v13); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v24); v12 = *a5; } v14 = (void *)*((int *)a5 + 39); v15 = (_DWORD)v14 + (v11 << 6); *((_DWORD *)a5 + 39) = v15; if ( v15 > *((_DWORD *)a5 + 26) ) { v23 = v14; google::protobuf::internal::LogMessage::LogMessage( (long long)v24, 3, (long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc", 397); v16 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<( (long long)v24, (long long)"CHECK failed: (used) <= (total_.template Get<TypeToUse>()): "); google::protobuf::internal::LogFinisher::operator=((long long)&v22 + 7, v16); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v24); v14 = v23; } *(_QWORD *)(a4 + 32) = (char *)v14 + v12; if ( *(int *)(a2 + 32) > 0 ) { v17 = 0; v18 = 0LL; do { google::protobuf::DescriptorBuilder::BuildMethod( a1, *(_QWORD *)(*(_QWORD *)(a2 + 40) + 8 * v18++ + 8), a4, v17 + *(_QWORD *)(a4 + 32), (int)a5, v22, (int)v23, (char)v24[0]); v17 += 64; } while ( v18 < *(int *)(a2 + 32) ); } *(_QWORD *)(a4 + 24) = 0LL; if ( (*(_BYTE *)(a2 + 16) & 2) != 0 ) { v19 = *(void ( ****)(google::protobuf::ServiceOptions *__hidden))(a2 + 56); v24[0] = v25; std::string::_M_construct<char const*>((long long)v24, "google.protobuf.ServiceOptions", (long long)""); if ( !v19 ) v19 = &google::protobuf::_ServiceOptions_default_instance_; google::protobuf::DescriptorBuilder::AllocateOptions<google::protobuf::ServiceDescriptor>( a1, (int)v19, a4, 3, (int)v24, (int)a5, (int)v22, v23); if ( v24[0] != v25 ) operator delete(v24[0]); } v20 = (_QWORD *)(*(_QWORD *)(a4 + 8) + 32LL); *(_BYTE *)a4 = 7; return google::protobuf::DescriptorBuilder::AddSymbol(a1, v20, 0, v10, a2, a4); }
BuildService: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R12,R8 MOV RBX,RCX MOV R14,RSI MOV R15,RDI MOV RAX,qword ptr [RDI + 0x58] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [R14 + 0x30] AND RDX,-0x4 MOV RCX,R8 CALL 0x00130864 MOV qword ptr [RBX + 0x8],RAX MOV RCX,qword ptr [R15 + 0x58] MOV qword ptr [RBX + 0x10],RCX MOV RSI,qword ptr [R14 + 0x30] AND RSI,-0x4 LEA RDX,[RAX + 0x20] MOV RDI,R15 MOV RCX,R14 CALL 0x0012a9a2 MOV R13D,dword ptr [R14 + 0x20] MOV dword ptr [RBX + 0x28],R13D MOV RBP,qword ptr [R12] TEST RBP,RBP JNZ 0x0012f20a LEA RDX,[0x1b5de4] LEA RBP,[RSP + 0x10] MOV RDI,RBP MOV ESI,0x3 MOV ECX,0x187 CALL 0x001169ca LAB_0012f1e0: LEA RSI,[0x1b85cc] MOV RDI,RBP CALL 0x001164c8 LAB_0012f1ef: LEA RDI,[RSP + 0x7] MOV RSI,RAX CALL 0x001165a2 LAB_0012f1fc: LEA RDI,[RSP + 0x10] CALL 0x001169e8 MOV RBP,qword ptr [R12] LAB_0012f20a: MOVSXD RAX,dword ptr [R12 + 0x9c] SHL R13D,0x6 ADD R13D,EAX MOV dword ptr [R12 + 0x9c],R13D CMP R13D,dword ptr [R12 + 0x68] JLE 0x0012f276 MOV qword ptr [RSP + 0x8],RAX LEA RDX,[0x1b5de4] LEA R13,[RSP + 0x10] MOV RDI,R13 MOV ESI,0x3 MOV ECX,0x18d CALL 0x001169ca LAB_0012f24b: LEA RSI,[0x1b85ec] MOV RDI,R13 CALL 0x001164c8 LAB_0012f25a: LEA RDI,[RSP + 0x7] MOV RSI,RAX CALL 0x001165a2 LAB_0012f267: LEA RDI,[RSP + 0x10] CALL 0x001169e8 MOV RAX,qword ptr [RSP + 0x8] LAB_0012f276: ADD RBP,RAX MOV qword ptr [RBX + 0x20],RBP CMP dword ptr [R14 + 0x20],0x0 JLE 0x0012f2b7 XOR R13D,R13D XOR EBP,EBP LAB_0012f289: MOV RAX,qword ptr [R14 + 0x28] MOV RSI,qword ptr [RAX + RBP*0x8 + 0x8] MOV RCX,qword ptr [RBX + 0x20] ADD RCX,R13 MOV RDI,R15 MOV RDX,RBX MOV R8,R12 CALL 0x00133390 INC RBP MOVSXD RAX,dword ptr [R14 + 0x20] ADD R13,0x40 CMP RBP,RAX JL 0x0012f289 LAB_0012f2b7: MOV qword ptr [RBX + 0x18],0x0 TEST byte ptr [R14 + 0x10],0x2 JZ 0x0012f321 MOV R13,qword ptr [R14 + 0x38] LEA RBP,[RSP + 0x20] MOV qword ptr [RBP + -0x10],RBP LAB_0012f2d3: LEA RSI,[0x1b703a] LEA RDX,[0x1b7058] LEA RDI,[RSP + 0x10] CALL 0x001137ec TEST R13,R13 JNZ 0x0012f2f7 LEA R13,[0x2029a8] LAB_0012f2f7: LEA R8,[RSP + 0x10] MOV RDI,R15 MOV RSI,R13 MOV RDX,RBX MOV ECX,0x3 MOV R9,R12 CALL 0x0013f282 LAB_0012f312: MOV RDI,qword ptr [RSP + 0x10] CMP RDI,RBP JZ 0x0012f321 CALL 0x0010f330 LAB_0012f321: MOV RSI,qword ptr [RBX + 0x8] ADD RSI,0x20 MOV byte ptr [RBX],0x7 MOV RDI,R15 XOR EDX,EDX MOV R8,R14 MOV R9,RBX CALL 0x00129c6c ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* google::protobuf::DescriptorBuilder::BuildService(google::protobuf::ServiceDescriptorProto const&, void const*, google::protobuf::ServiceDescriptor*, google::protobuf::internal::FlatAllocator&) */ void __thiscall google::protobuf::DescriptorBuilder::BuildService (DescriptorBuilder *this,ServiceDescriptorProto *param_1,void *param_2, ServiceDescriptor *param_3,FlatAllocator *param_4) { int iVar1; long lVar2; LogMessage *pLVar3; int iVar4; long lVar5; int1 *puVar6; LogFinisher local_71; long local_70; int1 *local_68 [2]; int1 local_58 [40]; lVar2 = AllocateNameStrings(this,*(string **)(*(long *)(this + 0x58) + 0x10), (string *)(*(ulong *)(param_1 + 0x30) & 0xfffffffffffffffc),param_4); *(long *)(param_3 + 8) = lVar2; *(int8 *)(param_3 + 0x10) = *(int8 *)(this + 0x58); ValidateSymbolName(this,(string *)(*(ulong *)(param_1 + 0x30) & 0xfffffffffffffffc), (string *)(lVar2 + 0x20),(Message *)param_1); iVar4 = *(int *)(param_1 + 0x20); *(int *)(param_3 + 0x28) = iVar4; lVar2 = *(long *)param_4; if (lVar2 == 0) { internal::LogMessage::LogMessage ((LogMessage *)local_68,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc" ,0x187); /* try { // try from 0012f1e0 to 0012f1ee has its CatchHandler @ 0012f34d */ pLVar3 = (LogMessage *) internal::LogMessage::operator<< ((LogMessage *)local_68,"CHECK failed: has_allocated(): "); /* try { // try from 0012f1ef to 0012f1fb has its CatchHandler @ 0012f34b */ internal::LogFinisher::operator=(&local_71,pLVar3); internal::LogMessage::~LogMessage((LogMessage *)local_68); lVar2 = *(long *)param_4; } iVar1 = *(int *)(param_4 + 0x9c); iVar4 = iVar4 * 0x40 + iVar1; *(int *)(param_4 + 0x9c) = iVar4; lVar5 = (long)iVar1; if (*(int *)(param_4 + 0x68) < iVar4) { local_70 = (long)iVar1; internal::LogMessage::LogMessage ((LogMessage *)local_68,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc" ,0x18d); /* try { // try from 0012f24b to 0012f259 has its CatchHandler @ 0012f36a */ pLVar3 = (LogMessage *) internal::LogMessage::operator<< ((LogMessage *)local_68, "CHECK failed: (used) <= (total_.template Get<TypeToUse>()): "); /* try { // try from 0012f25a to 0012f266 has its CatchHandler @ 0012f368 */ internal::LogFinisher::operator=(&local_71,pLVar3); internal::LogMessage::~LogMessage((LogMessage *)local_68); lVar5 = local_70; } *(long *)(param_3 + 0x20) = lVar2 + lVar5; if (0 < *(int *)(param_1 + 0x20)) { lVar5 = 0; lVar2 = 0; do { BuildMethod(this,*(MethodDescriptorProto **)(*(long *)(param_1 + 0x28) + 8 + lVar2 * 8), param_3,(MethodDescriptor *)(*(long *)(param_3 + 0x20) + lVar5),param_4); lVar2 = lVar2 + 1; lVar5 = lVar5 + 0x40; } while (lVar2 < *(int *)(param_1 + 0x20)); } *(int8 *)(param_3 + 0x18) = 0; if (((byte)param_1[0x10] & 2) != 0) { puVar6 = *(int1 **)(param_1 + 0x38); /* try { // try from 0012f2d3 to 0012f2ea has its CatchHandler @ 0012f363 */ local_68[0] = local_58; std::__cxx11::string::_M_construct<char_const*>(local_68,"google.protobuf.ServiceOptions",""); if ((OptionsType *)puVar6 == (OptionsType *)0x0) { puVar6 = _ServiceOptions_default_instance_; } /* try { // try from 0012f2f7 to 0012f311 has its CatchHandler @ 0012f34f */ AllocateOptions<google::protobuf::ServiceDescriptor> (this,(OptionsType *)puVar6,param_3,3,(string *)local_68,param_4); if (local_68[0] != local_58) { operator_delete(local_68[0]); } } *param_3 = (ServiceDescriptor)0x7; AddSymbol(this,*(long *)(param_3 + 8) + 0x20,0); return; }
13,645
pk_parse_key_pkcs8_encrypted_der
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/pkparse.c
static int pk_parse_key_pkcs8_encrypted_der( mbedtls_pk_context *pk, unsigned char *key, size_t keylen, const unsigned char *pwd, size_t pwdlen) { int ret, decrypted = 0; size_t len; unsigned char *buf; unsigned char *p, *end; mbedtls_asn1_buf pbe_alg_oid, pbe_params; #if defined(MBEDTLS_PKCS12_C) mbedtls_cipher_type_t cipher_alg; mbedtls_md_type_t md_alg; #endif p = key; end = p + keylen; if (pwdlen == 0) { return MBEDTLS_ERR_PK_PASSWORD_REQUIRED; } /* * This function parses the EncryptedPrivateKeyInfo object (PKCS#8) * * EncryptedPrivateKeyInfo ::= SEQUENCE { * encryptionAlgorithm EncryptionAlgorithmIdentifier, * encryptedData EncryptedData * } * * EncryptionAlgorithmIdentifier ::= AlgorithmIdentifier * * EncryptedData ::= OCTET STRING * * The EncryptedData OCTET STRING is a PKCS#8 PrivateKeyInfo * */ if ((ret = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE)) != 0) { return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_PK_KEY_INVALID_FORMAT, ret); } end = p + len; if ((ret = mbedtls_asn1_get_alg(&p, end, &pbe_alg_oid, &pbe_params)) != 0) { return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_PK_KEY_INVALID_FORMAT, ret); } if ((ret = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OCTET_STRING)) != 0) { return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_PK_KEY_INVALID_FORMAT, ret); } buf = p; /* * Decrypt EncryptedData with appropriate PBE */ #if defined(MBEDTLS_PKCS12_C) if (mbedtls_oid_get_pkcs12_pbe_alg(&pbe_alg_oid, &md_alg, &cipher_alg) == 0) { if ((ret = mbedtls_pkcs12_pbe(&pbe_params, MBEDTLS_PKCS12_PBE_DECRYPT, cipher_alg, md_alg, pwd, pwdlen, p, len, buf)) != 0) { if (ret == MBEDTLS_ERR_PKCS12_PASSWORD_MISMATCH) { return MBEDTLS_ERR_PK_PASSWORD_MISMATCH; } return ret; } decrypted = 1; } else if (MBEDTLS_OID_CMP(MBEDTLS_OID_PKCS12_PBE_SHA1_RC4_128, &pbe_alg_oid) == 0) { if ((ret = mbedtls_pkcs12_pbe_sha1_rc4_128(&pbe_params, MBEDTLS_PKCS12_PBE_DECRYPT, pwd, pwdlen, p, len, buf)) != 0) { return ret; } // Best guess for password mismatch when using RC4. If first tag is // not MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE // if (*buf != (MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE)) { return MBEDTLS_ERR_PK_PASSWORD_MISMATCH; } decrypted = 1; } else #endif /* MBEDTLS_PKCS12_C */ #if defined(MBEDTLS_PKCS5_C) if (MBEDTLS_OID_CMP(MBEDTLS_OID_PKCS5_PBES2, &pbe_alg_oid) == 0) { if ((ret = mbedtls_pkcs5_pbes2(&pbe_params, MBEDTLS_PKCS5_DECRYPT, pwd, pwdlen, p, len, buf)) != 0) { if (ret == MBEDTLS_ERR_PKCS5_PASSWORD_MISMATCH) { return MBEDTLS_ERR_PK_PASSWORD_MISMATCH; } return ret; } decrypted = 1; } else #endif /* MBEDTLS_PKCS5_C */ { ((void) pwd); } if (decrypted == 0) { return MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE; } return pk_parse_key_pkcs8_unencrypted_der(pk, buf, len); }
O3
c
pk_parse_key_pkcs8_encrypted_der: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rsi, 0x20(%rsp) testq %r8, %r8 je 0x8d99b movq %r8, %r14 movq %rcx, %r15 movq %rdi, %rbx addq %rdx, %rsi leaq 0x20(%rsp), %rdi leaq 0x28(%rsp), %rdx movl $0x30, %ecx callq 0x96961 testl %eax, %eax jne 0x8d994 leaq 0x20(%rsp), %rdi movq (%rdi), %r12 addq 0x28(%rsp), %r12 leaq 0x38(%rsp), %rdx leaq 0x50(%rsp), %rcx movq %r12, %rsi callq 0x96df8 testl %eax, %eax jne 0x8d994 leaq 0x20(%rsp), %rdi leaq 0x28(%rsp), %rdx movq %r12, %rsi movl $0x4, %ecx callq 0x96961 testl %eax, %eax je 0x8d9ac addl $0xffffc300, %eax # imm = 0xFFFFC300 jmp 0x8d9a0 movl $0xffffc400, %eax # imm = 0xFFFFC400 addq $0x68, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq 0x20(%rsp), %r12 leaq 0x38(%rsp), %rdi leaq 0x30(%rsp), %rsi leaq 0x34(%rsp), %rdx callq 0x97dd2 testl %eax, %eax je 0x8da3f movl $0xffffc680, %eax # imm = 0xFFFFC680 movq 0x40(%rsp), %rcx cmpq $0x9, %rcx je 0x8da95 cmpq $0xa, %rcx jne 0x8d9a0 movq 0x48(%rsp), %rcx movabsq $0xc010df78648862a, %rdx # imm = 0xC010DF78648862A xorq (%rcx), %rdx movzwl 0x8(%rcx), %ecx xorq $0x101, %rcx # imm = 0x101 orq %rdx, %rcx jne 0x8d9a0 movq 0x20(%rsp), %r8 movq 0x28(%rsp), %r9 movq %r12, (%rsp) leaq 0x50(%rsp), %rdi xorl %esi, %esi movq %r15, %rdx movq %r14, %rcx callq 0x98ae4 testl %eax, %eax jne 0x8d9a0 movl $0xffffc480, %eax # imm = 0xFFFFC480 cmpb $0x30, (%r12) jne 0x8d9a0 jmp 0x8da80 movl 0x34(%rsp), %edx movl 0x30(%rsp), %ecx movq 0x20(%rsp), %rax movq 0x28(%rsp), %rsi movq %r12, 0x10(%rsp) movq %rsi, 0x8(%rsp) movq %rax, (%rsp) leaq 0x50(%rsp), %rdi xorl %esi, %esi movq %r15, %r8 movq %r14, %r9 callq 0x98d29 cmpl $0xffffe200, %eax # imm = 0xFFFFE200 je 0x8dadf testl %eax, %eax jne 0x8d9a0 movq 0x28(%rsp), %rdx movq %rbx, %rdi movq %r12, %rsi callq 0x8d75d jmp 0x8d9a0 movq 0x48(%rsp), %rcx movabsq $0x5010df78648862a, %rdx # imm = 0x5010DF78648862A xorq (%rcx), %rdx movzbl 0x8(%rcx), %ecx xorq $0xd, %rcx orq %rdx, %rcx jne 0x8d9a0 movq 0x20(%rsp), %r8 movq 0x28(%rsp), %r9 movq %r12, (%rsp) leaq 0x50(%rsp), %rdi xorl %esi, %esi movq %r15, %rdx movq %r14, %rcx callq 0x99364 cmpl $0xffffd200, %eax # imm = 0xFFFFD200 jne 0x8da78 movl $0xffffc480, %eax # imm = 0xFFFFC480 jmp 0x8d9a0
pk_parse_key_pkcs8_encrypted_der: push r15 push r14 push r12 push rbx sub rsp, 68h mov [rsp+88h+var_68], rsi test r8, r8 jz short loc_8D99B mov r14, r8 mov r15, rcx mov rbx, rdi add rsi, rdx lea rdi, [rsp+88h+var_68] lea rdx, [rsp+88h+var_60] mov ecx, 30h ; '0' call mbedtls_asn1_get_tag test eax, eax jnz short loc_8D994 lea rdi, [rsp+88h+var_68] mov r12, [rdi] add r12, [rsp+88h+var_60] lea rdx, [rsp+88h+var_50] lea rcx, [rsp+88h+var_38] mov rsi, r12 call mbedtls_asn1_get_alg test eax, eax jnz short loc_8D994 lea rdi, [rsp+88h+var_68] lea rdx, [rsp+88h+var_60] mov rsi, r12 mov ecx, 4 call mbedtls_asn1_get_tag test eax, eax jz short loc_8D9AC loc_8D994: add eax, 0FFFFC300h jmp short loc_8D9A0 loc_8D99B: mov eax, 0FFFFC400h loc_8D9A0: add rsp, 68h pop rbx pop r12 pop r14 pop r15 retn loc_8D9AC: mov r12, [rsp+88h+var_68] lea rdi, [rsp+88h+var_50] lea rsi, [rsp+88h+var_58] lea rdx, [rsp+88h+var_54] call mbedtls_oid_get_pkcs12_pbe_alg test eax, eax jz short loc_8DA3F mov eax, 0FFFFC680h mov rcx, [rsp+88h+var_48] cmp rcx, 9 jz loc_8DA95 cmp rcx, 0Ah jnz short loc_8D9A0 mov rcx, [rsp+88h+var_40] mov rdx, 0C010DF78648862Ah xor rdx, [rcx] movzx ecx, word ptr [rcx+8] xor rcx, 101h or rcx, rdx jnz short loc_8D9A0 mov r8, [rsp+88h+var_68] mov r9, [rsp+88h+var_60] mov [rsp+88h+var_88], r12 lea rdi, [rsp+88h+var_38] xor esi, esi mov rdx, r15 mov rcx, r14 call mbedtls_pkcs12_pbe_sha1_rc4_128 test eax, eax jnz loc_8D9A0 mov eax, 0FFFFC480h cmp byte ptr [r12], 30h ; '0' jnz loc_8D9A0 jmp short loc_8DA80 loc_8DA3F: mov edx, [rsp+88h+var_54] mov ecx, [rsp+88h+var_58] mov rax, [rsp+88h+var_68] mov rsi, [rsp+88h+var_60] mov [rsp+88h+var_78], r12 mov [rsp+88h+var_80], rsi mov [rsp+88h+var_88], rax lea rdi, [rsp+88h+var_38] xor esi, esi mov r8, r15 mov r9, r14 call mbedtls_pkcs12_pbe cmp eax, 0FFFFE200h jz short loc_8DADF loc_8DA78: test eax, eax jnz loc_8D9A0 loc_8DA80: mov rdx, [rsp+88h+var_60] mov rdi, rbx mov rsi, r12 call pk_parse_key_pkcs8_unencrypted_der jmp loc_8D9A0 loc_8DA95: mov rcx, [rsp+88h+var_40] mov rdx, 5010DF78648862Ah xor rdx, [rcx] movzx ecx, byte ptr [rcx+8] xor rcx, 0Dh or rcx, rdx jnz loc_8D9A0 mov r8, [rsp+88h+var_68] mov r9, [rsp+88h+var_60] mov [rsp+88h+var_88], r12 lea rdi, [rsp+88h+var_38] xor esi, esi mov rdx, r15 mov rcx, r14 call mbedtls_pkcs5_pbes2 cmp eax, 0FFFFD200h jnz short loc_8DA78 loc_8DADF: mov eax, 0FFFFC480h jmp loc_8D9A0
long long pk_parse_key_pkcs8_encrypted_der(_QWORD *a1, long long a2, long long a3, int a4, long long a5) { int v5; // r14d int tag; // eax long long v8; // r12 long long result; // rax _BYTE *v10; // r12 __int128 v11; // [rsp+20h] [rbp-68h] BYREF int v12; // [rsp+30h] [rbp-58h] BYREF int v13; // [rsp+34h] [rbp-54h] BYREF _BYTE v14[8]; // [rsp+38h] [rbp-50h] BYREF long long v15; // [rsp+40h] [rbp-48h] long long v16; // [rsp+48h] [rbp-40h] _BYTE v17[56]; // [rsp+50h] [rbp-38h] BYREF *(_QWORD *)&v11 = a2; if ( !a5 ) return 4294951936LL; v5 = a5; tag = mbedtls_asn1_get_tag(&v11, a3 + a2, (char *)&v11 + 8, 48LL); if ( tag ) return (unsigned int)(tag - 15616); v8 = *((_QWORD *)&v11 + 1) + v11; tag = mbedtls_asn1_get_alg(&v11, *((_QWORD *)&v11 + 1) + v11, v14); if ( tag ) return (unsigned int)(tag - 15616); tag = mbedtls_asn1_get_tag(&v11, v8, (char *)&v11 + 8, 4LL); if ( tag ) return (unsigned int)(tag - 15616); v10 = (_BYTE *)v11; if ( (unsigned int)mbedtls_oid_get_pkcs12_pbe_alg(v14, &v12, &v13) ) { result = 4294952576LL; if ( v15 != 9 ) { if ( v15 == 10 && !(*(_QWORD *)v16 ^ 0xC010DF78648862ALL | *(unsigned __int16 *)(v16 + 8) ^ 0x101LL) ) { result = mbedtls_pkcs12_pbe_sha1_rc4_128((unsigned int)v17, 0, a4, v5, v11, DWORD2(v11), (long long)v10); if ( !(_DWORD)result ) { result = 4294952064LL; if ( *v10 == 48 ) return pk_parse_key_pkcs8_unencrypted_der(a1, v10, *((long long *)&v11 + 1)); } } return result; } if ( *(_QWORD *)v16 ^ 0x5010DF78648862ALL | *(unsigned __int8 *)(v16 + 8) ^ 0xDLL ) return result; result = mbedtls_pkcs5_pbes2((unsigned int)v17, 0, a4, v5, v11, DWORD2(v11), (long long)v10); if ( (_DWORD)result == -11776 ) return 4294952064LL; } else { result = mbedtls_pkcs12_pbe((unsigned int)v17, 0, v13, v12, a4, v5, v11, (long long)v10); if ( (_DWORD)result == -7680 ) return 4294952064LL; } if ( !(_DWORD)result ) return pk_parse_key_pkcs8_unencrypted_der(a1, v10, *((long long *)&v11 + 1)); return result; }
pk_parse_key_pkcs8_encrypted_der: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x68 MOV qword ptr [RSP + 0x20],RSI TEST R8,R8 JZ 0x0018d99b MOV R14,R8 MOV R15,RCX MOV RBX,RDI ADD RSI,RDX LEA RDI,[RSP + 0x20] LEA RDX,[RSP + 0x28] MOV ECX,0x30 CALL 0x00196961 TEST EAX,EAX JNZ 0x0018d994 LEA RDI,[RSP + 0x20] MOV R12,qword ptr [RDI] ADD R12,qword ptr [RSP + 0x28] LEA RDX,[RSP + 0x38] LEA RCX,[RSP + 0x50] MOV RSI,R12 CALL 0x00196df8 TEST EAX,EAX JNZ 0x0018d994 LEA RDI,[RSP + 0x20] LEA RDX,[RSP + 0x28] MOV RSI,R12 MOV ECX,0x4 CALL 0x00196961 TEST EAX,EAX JZ 0x0018d9ac LAB_0018d994: ADD EAX,0xffffc300 JMP 0x0018d9a0 LAB_0018d99b: MOV EAX,0xffffc400 LAB_0018d9a0: ADD RSP,0x68 POP RBX POP R12 POP R14 POP R15 RET LAB_0018d9ac: MOV R12,qword ptr [RSP + 0x20] LEA RDI,[RSP + 0x38] LEA RSI,[RSP + 0x30] LEA RDX,[RSP + 0x34] CALL 0x00197dd2 TEST EAX,EAX JZ 0x0018da3f MOV EAX,0xffffc680 MOV RCX,qword ptr [RSP + 0x40] CMP RCX,0x9 JZ 0x0018da95 CMP RCX,0xa JNZ 0x0018d9a0 MOV RCX,qword ptr [RSP + 0x48] MOV RDX,0xc010df78648862a XOR RDX,qword ptr [RCX] MOVZX ECX,word ptr [RCX + 0x8] XOR RCX,0x101 OR RCX,RDX JNZ 0x0018d9a0 MOV R8,qword ptr [RSP + 0x20] MOV R9,qword ptr [RSP + 0x28] MOV qword ptr [RSP],R12 LEA RDI,[RSP + 0x50] XOR ESI,ESI MOV RDX,R15 MOV RCX,R14 CALL 0x00198ae4 TEST EAX,EAX JNZ 0x0018d9a0 MOV EAX,0xffffc480 CMP byte ptr [R12],0x30 JNZ 0x0018d9a0 JMP 0x0018da80 LAB_0018da3f: MOV EDX,dword ptr [RSP + 0x34] MOV ECX,dword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x10],R12 MOV qword ptr [RSP + 0x8],RSI MOV qword ptr [RSP],RAX LEA RDI,[RSP + 0x50] XOR ESI,ESI MOV R8,R15 MOV R9,R14 CALL 0x00198d29 CMP EAX,0xffffe200 JZ 0x0018dadf LAB_0018da78: TEST EAX,EAX JNZ 0x0018d9a0 LAB_0018da80: MOV RDX,qword ptr [RSP + 0x28] MOV RDI,RBX MOV RSI,R12 CALL 0x0018d75d JMP 0x0018d9a0 LAB_0018da95: MOV RCX,qword ptr [RSP + 0x48] MOV RDX,0x5010df78648862a XOR RDX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x8] XOR RCX,0xd OR RCX,RDX JNZ 0x0018d9a0 MOV R8,qword ptr [RSP + 0x20] MOV R9,qword ptr [RSP + 0x28] MOV qword ptr [RSP],R12 LEA RDI,[RSP + 0x50] XOR ESI,ESI MOV RDX,R15 MOV RCX,R14 CALL 0x00199364 CMP EAX,0xffffd200 JNZ 0x0018da78 LAB_0018dadf: MOV EAX,0xffffc480 JMP 0x0018d9a0
ulong pk_parse_key_pkcs8_encrypted_der (int8 param_1,char *param_2,long param_3,int8 param_4,long param_5) { int iVar1; ulong uVar2; char *pcVar3; char *local_68; long local_60; int4 local_58; int4 local_54; int1 local_50 [8]; long local_48; long *local_40; int1 local_38 [24]; if (param_5 == 0) { return 0xffffc400; } local_68 = param_2; iVar1 = mbedtls_asn1_get_tag(&local_68,param_2 + param_3,&local_60,0x30); if (iVar1 != 0) { LAB_0018d994: return (ulong)(iVar1 - 0x3d00); } pcVar3 = local_68 + local_60; iVar1 = mbedtls_asn1_get_alg(&local_68,pcVar3,local_50,local_38); if ((iVar1 != 0) || (iVar1 = mbedtls_asn1_get_tag(&local_68,pcVar3,&local_60,4), pcVar3 = local_68, iVar1 != 0)) goto LAB_0018d994; iVar1 = mbedtls_oid_get_pkcs12_pbe_alg(local_50,&local_58,&local_54); if (iVar1 == 0) { uVar2 = mbedtls_pkcs12_pbe(local_38,0,local_54,local_58,param_4,param_5,local_68,local_60,pcVar3 ); if ((int)uVar2 == -0x1e00) { return 0xffffc480; } } else { if (local_48 != 9) { if (local_48 != 10) { return 0xffffc680; } if ((short)local_40[1] != 0x101 || *local_40 != 0xc010df78648862a) { return 0xffffc680; } uVar2 = mbedtls_pkcs12_pbe_sha1_rc4_128(local_38,0,param_4,param_5,local_68,local_60,pcVar3); if ((int)uVar2 != 0) { return uVar2; } if (*pcVar3 != '0') { return 0xffffc480; } goto LAB_0018da80; } if ((char)local_40[1] != '\r' || *local_40 != 0x5010df78648862a) { return 0xffffc680; } uVar2 = mbedtls_pkcs5_pbes2(local_38,0,param_4,param_5,local_68,local_60,pcVar3); if ((int)uVar2 == -0x2e00) { return 0xffffc480; } } if ((int)uVar2 != 0) { return uVar2; } LAB_0018da80: uVar2 = pk_parse_key_pkcs8_unencrypted_der(param_1,pcVar3,local_60); return uVar2; }
13,646
minja::Parser::parseLogicalNot()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Expression> parseLogicalNot() { static std::regex not_tok(R"(not\b)"); auto location = get_location(); if (!consumeToken(not_tok).empty()) { auto sub = parseLogicalNot(); if (!sub) throw std::runtime_error("Expected expression after 'not' keyword"); return std::make_shared<UnaryOpExpr>(location, std::move(sub), UnaryOpExpr::Op::LogicalNot); } return parseLogicalCompare(); }
O3
cpp
minja::Parser::parseLogicalNot(): pushq %r15 pushq %r14 pushq %rbx subq $0x60, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0xa0d30(%rip), %rax # 0xdcdb8 movb (%rax), %al testb %al, %al je 0x3c192 movq (%r14), %rax movq %rax, 0x30(%rsp) movq 0x8(%r14), %rax movq %rax, 0x38(%rsp) testq %rax, %rax je 0x3c0bd movq 0x9fee9(%rip), %rcx # 0xdbf98 cmpb $0x0, (%rcx) je 0x3c0b9 incl 0x8(%rax) jmp 0x3c0bd lock incl 0x8(%rax) movq 0x20(%r14), %rax subq 0x10(%r14), %rax movq %rax, 0x40(%rsp) leaq 0xa0cc7(%rip), %rdx # 0xdcd98 leaq 0x10(%rsp), %rdi movq %r14, %rsi movl $0x1, %ecx callq 0x2f714 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi movq -0x8(%rax), %r15 cmpq %rax, %rdi je 0x3c102 movq 0x20(%rsp), %rsi incq %rsi callq 0x186a0 testq %r15, %r15 je 0x3c16b leaq 0x10(%rsp), %rdi movq %r14, %rsi callq 0x3c072 cmpq $0x0, 0x10(%rsp) je 0x3c1e9 leaq 0x4c(%rsp), %r9 movl $0x2, (%r9) leaq 0x58(%rsp), %rdi movq $0x0, -0x8(%rdi) leaq 0x50(%rsp), %rsi leaq 0xf(%rsp), %rdx leaq 0x30(%rsp), %rcx leaq 0x10(%rsp), %r8 callq 0x3c93e movaps 0x50(%rsp), %xmm0 movups %xmm0, (%rbx) movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x3c176 callq 0x2f20e jmp 0x3c176 movq %rbx, %rdi movq %r14, %rsi callq 0x3c26e movq 0x38(%rsp), %rdi testq %rdi, %rdi je 0x3c185 callq 0x2f20e movq %rbx, %rax addq $0x60, %rsp popq %rbx popq %r14 popq %r15 retq leaq 0xa0c1f(%rip), %rdi # 0xdcdb8 callq 0x18c00 testl %eax, %eax je 0x3c092 leaq 0xa0beb(%rip), %rdi # 0xdcd98 leaq 0x6d49e(%rip), %rsi # 0xa9652 movl $0x10, %edx callq 0x2f27e leaq -0xcedf(%rip), %rdi # 0x2f2e6 leaq 0xa0bcc(%rip), %rsi # 0xdcd98 leaq 0xa04d5(%rip), %rdx # 0xdc6a8 callq 0x185d0 leaq 0xa0bd9(%rip), %rdi # 0xdcdb8 callq 0x18440 jmp 0x3c092 movl $0x10, %edi callq 0x18350 movq %rax, %r14 leaq 0x6d45b(%rip), %rsi # 0xa9658 movq %rax, %rdi callq 0x18260 movq 0x9fde4(%rip), %rsi # 0xdbff0 movq 0x9fd5d(%rip), %rdx # 0xdbf70 movq %r14, %rdi callq 0x18b30 movq %rax, %rbx leaq 0xa0b93(%rip), %rdi # 0xdcdb8 callq 0x18430 jmp 0x3c265 jmp 0x3c23d movq %rax, %rbx movq %r14, %rdi callq 0x184f0 jmp 0x3c240 jmp 0x3c253 movq %rax, %rbx movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x3c256 callq 0x2f20e jmp 0x3c256 jmp 0x3c253 movq %rax, %rbx movq 0x38(%rsp), %rdi testq %rdi, %rdi je 0x3c265 callq 0x2f20e movq %rbx, %rdi callq 0x18bb0 nop
_ZN5minja6Parser15parseLogicalNotEv: push r15 push r14 push rbx sub rsp, 60h mov r14, rsi mov rbx, rdi lea rax, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; `guard variable for'minja::Parser::parseLogicalNot(void)::not_tok mov al, [rax] test al, al jz loc_3C192 loc_3C092: mov rax, [r14] mov [rsp+78h+var_48], rax mov rax, [r14+8] mov [rsp+78h+var_40], rax test rax, rax jz short loc_3C0BD mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_3C0B9 inc dword ptr [rax+8] jmp short loc_3C0BD loc_3C0B9: lock inc dword ptr [rax+8] loc_3C0BD: mov rax, [r14+20h] sub rax, [r14+10h] mov [rsp+78h+var_38], rax lea rdx, _ZZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; minja::Parser::parseLogicalNot(void)::not_tok lea rdi, [rsp+78h+var_68] mov rsi, r14 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) lea rax, [rsp+78h+var_58] mov rdi, [rax-10h]; void * mov r15, [rax-8] cmp rdi, rax jz short loc_3C102 mov rsi, [rsp+78h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3C102: test r15, r15 jz short loc_3C16B lea rdi, [rsp+78h+var_68]; this mov rsi, r14 call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void) cmp [rsp+78h+var_68], 0 jz loc_3C1E9 lea r9, [rsp+78h+var_2C] mov dword ptr [r9], 2 lea rdi, [rsp+78h+var_28+8] mov qword ptr [rdi-8], 0 lea rsi, [rsp+78h+var_28] lea rdx, [rsp+78h+var_69] lea rcx, [rsp+78h+var_48] lea r8, [rsp+78h+var_68] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja11UnaryOpExprESaIS5_EJRNS4_8LocationESt10shared_ptrINS4_10ExpressionEENS5_2OpEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location &,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(minja::UnaryOpExpr *&,std::_Sp_alloc_shared_tag<std::allocator<minja::UnaryOpExpr>>,minja::Location &,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &&) movaps xmm0, [rsp+78h+var_28] movups xmmword ptr [rbx], xmm0 mov rdi, [rsp+78h+var_60] test rdi, rdi jz short loc_3C176 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_3C176 loc_3C16B: mov rdi, rbx; this mov rsi, r14 call _ZN5minja6Parser19parseLogicalCompareEv; minja::Parser::parseLogicalCompare(void) loc_3C176: mov rdi, [rsp+78h+var_40] test rdi, rdi jz short loc_3C185 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_3C185: mov rax, rbx add rsp, 60h pop rbx pop r14 pop r15 retn loc_3C192: lea rdi, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_3C092 lea rdi, _ZZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; minja::Parser::parseLogicalNot(void)::not_tok lea rsi, aNotB; "not\\b" 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, _ZZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_3C092 loc_3C1E9: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedExpres_2; "Expected expression after 'not' keyword" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax lea rdi, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_3C265 jmp short loc_3C23D mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_3C240 jmp short loc_3C253 loc_3C23D: mov rbx, rax loc_3C240: mov rdi, [rsp+78h+var_60] test rdi, rdi jz short loc_3C256 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_3C256 jmp short $+2 loc_3C253: mov rbx, rax loc_3C256: mov rdi, [rsp+78h+var_40] test rdi, rdi jz short loc_3C265 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_3C265: mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::parseLogicalNot(minja::Parser *this, long long *a2) { volatile signed __int32 *v2; // rax volatile signed __int32 *v3; // r15 std::runtime_error *exception; // r14 char v6; // [rsp+Fh] [rbp-69h] BYREF long long *v7; // [rsp+10h] [rbp-68h] BYREF volatile signed __int32 *v8; // [rsp+18h] [rbp-60h] long long v9; // [rsp+20h] [rbp-58h] BYREF long long v10; // [rsp+30h] [rbp-48h] BYREF volatile signed __int32 *v11; // [rsp+38h] [rbp-40h] long long v12; // [rsp+40h] [rbp-38h] int v13; // [rsp+4Ch] [rbp-2Ch] _OWORD v14[2]; // [rsp+50h] [rbp-28h] BYREF if ( !(_BYTE)`guard variable for'minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11], "not\\b", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11]); } v10 = *a2; v2 = (volatile signed __int32 *)a2[1]; v11 = v2; if ( v2 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v2 + 2); else _InterlockedIncrement(v2 + 2); } v12 = a2[4] - a2[2]; minja::Parser::consumeToken( (long long)&v7, (long long)a2, (long long)&minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11], 1u); v3 = v8; if ( v7 != &v9 ) operator delete(v7, v9 + 1); if ( v3 ) { minja::Parser::parseLogicalNot((minja::Parser *)&v7); if ( !v7 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected expression after 'not' keyword"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v13 = 2; *(_QWORD *)&v14[0] = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location &,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>( (char *)v14 + 8, v14, &v6, &v10, &v7); *(_OWORD *)this = v14[0]; if ( v8 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v8); } else { minja::Parser::parseLogicalCompare(this); } if ( v11 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11); return this; }
parseLogicalNot: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x60 MOV R14,RSI MOV RBX,RDI LEA RAX,[0x1dcdb8] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x0013c192 LAB_0013c092: MOV RAX,qword ptr [R14] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x38],RAX TEST RAX,RAX JZ 0x0013c0bd MOV RCX,qword ptr [0x001dbf98] CMP byte ptr [RCX],0x0 JZ 0x0013c0b9 INC dword ptr [RAX + 0x8] JMP 0x0013c0bd LAB_0013c0b9: INC.LOCK dword ptr [RAX + 0x8] LAB_0013c0bd: MOV RAX,qword ptr [R14 + 0x20] SUB RAX,qword ptr [R14 + 0x10] MOV qword ptr [RSP + 0x40],RAX LAB_0013c0ca: LEA RDX,[0x1dcd98] LEA RDI,[RSP + 0x10] MOV RSI,R14 MOV ECX,0x1 CALL 0x0012f714 LEA RAX,[RSP + 0x20] MOV RDI,qword ptr [RAX + -0x10] MOV R15,qword ptr [RAX + -0x8] CMP RDI,RAX JZ 0x0013c102 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x001186a0 LAB_0013c102: TEST R15,R15 JZ 0x0013c16b LAB_0013c107: LEA RDI,[RSP + 0x10] MOV RSI,R14 CALL 0x0013c072 CMP qword ptr [RSP + 0x10],0x0 JZ 0x0013c1e9 LEA R9,[RSP + 0x4c] MOV dword ptr [R9],0x2 LEA RDI,[RSP + 0x58] MOV qword ptr [RDI + -0x8],0x0 LAB_0013c139: LEA RSI,[RSP + 0x50] LEA RDX,[RSP + 0xf] LEA RCX,[RSP + 0x30] LEA R8,[RSP + 0x10] CALL 0x0013c93e MOVAPS XMM0,xmmword ptr [RSP + 0x50] MOVUPS xmmword ptr [RBX],XMM0 MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x0013c176 CALL 0x0012f20e JMP 0x0013c176 LAB_0013c16b: MOV RDI,RBX MOV RSI,R14 CALL 0x0013c26e LAB_0013c176: MOV RDI,qword ptr [RSP + 0x38] TEST RDI,RDI JZ 0x0013c185 CALL 0x0012f20e LAB_0013c185: MOV RAX,RBX ADD RSP,0x60 POP RBX POP R14 POP R15 RET LAB_0013c192: LEA RDI,[0x1dcdb8] CALL 0x00118c00 TEST EAX,EAX JZ 0x0013c092 LAB_0013c1a6: LEA RDI,[0x1dcd98] LEA RSI,[0x1a9652] MOV EDX,0x10 CALL 0x0012f27e LAB_0013c1be: LEA RDI,[0x12f2e6] LEA RSI,[0x1dcd98] LEA RDX,[0x1dc6a8] CALL 0x001185d0 LEA RDI,[0x1dcdb8] CALL 0x00118440 JMP 0x0013c092 LAB_0013c1e9: MOV EDI,0x10 CALL 0x00118350 MOV R14,RAX LAB_0013c1f6: LEA RSI,[0x1a9658] MOV RDI,RAX CALL 0x00118260 LAB_0013c205: MOV RSI,qword ptr [0x001dbff0] MOV RDX,qword ptr [0x001dbf70] MOV RDI,R14 CALL 0x00118b30
/* minja::Parser::parseLogicalNot() */ void minja::Parser::parseLogicalNot(void) { _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1; int iVar2; runtime_error *this; int8 *in_RSI; int8 *in_RDI; int1 local_69; long *local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60; long local_58 [2]; int8 local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40; long local_38; int4 local_2c; int8 local_28; int8 uStack_20; if (parseLogicalNot()::not_tok_abi_cxx11_ == '\0') { iVar2 = __cxa_guard_acquire(&parseLogicalNot()::not_tok_abi_cxx11_); if (iVar2 != 0) { /* try { // try from 0013c1a6 to 0013c1bd has its CatchHandler @ 0013c21b */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseLogicalNot()::not_tok_abi_cxx11_,"not\\b",0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseLogicalNot()::not_tok_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseLogicalNot()::not_tok_abi_cxx11_); } } local_48 = *in_RSI; local_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1]; if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_001dbf98 == '\0') { LOCK(); *(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1; UNLOCK(); } else { *(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1; } } local_38 = in_RSI[4] - in_RSI[2]; /* try { // try from 0013c0ca to 0013c0e2 has its CatchHandler @ 0013c253 */ consumeToken(&local_68); p_Var1 = local_60; if (local_68 != local_58) { operator_delete(local_68,local_58[0] + 1); } if (p_Var1 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { /* try { // try from 0013c16b to 0013c175 has its CatchHandler @ 0013c23b */ parseLogicalCompare(); } else { /* try { // try from 0013c107 to 0013c113 has its CatchHandler @ 0013c251 */ parseLogicalNot(); if (local_68 == (long *)0x0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0013c1f6 to 0013c204 has its CatchHandler @ 0013c22e */ std::runtime_error::runtime_error(this,"Expected expression after \'not\' keyword"); /* try { // try from 0013c205 to 0013c21a has its CatchHandler @ 0013c22c */ /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001dbff0,PTR__runtime_error_001dbf70); } local_2c = 2; local_28 = 0; /* try { // try from 0013c139 to 0013c151 has its CatchHandler @ 0013c23d */ std::__shared_count<(__gnu_cxx::_Lock_policy)2>:: __shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location&,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op> ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_20,&local_28,&local_69, &local_48,&local_68); *in_RDI = local_28; in_RDI[1] = uStack_20; if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60); } } if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40); } return; }
13,647
R3D_SetMaterialOcclusion
r3d/src/r3d_utils.c
void R3D_SetMaterialOcclusion(Material* material, Texture2D* texture, float value) { if (material == NULL) { return; } MaterialMap* map = &material->maps[MATERIAL_MAP_OCCLUSION]; if (texture != NULL) { map->texture = *texture; } else if (map->texture.id == 0) { map->texture = R3D_GetWhiteTexture(); } map->value = value; }
O3
c
R3D_SetMaterialOcclusion: testq %rdi, %rdi je 0xbe62c pushq %rbp movq %rsp, %rbp movq 0x10(%rdi), %rax leaq 0x70(%rax), %rcx testq %rsi, %rsi je 0xbe603 movl 0x10(%rsi), %edx movl %edx, 0x10(%rcx) movups (%rsi), %xmm1 movups %xmm1, (%rcx) jmp 0xbe623 cmpl $0x0, (%rcx) jne 0xbe623 leaq 0xf1d61(%rip), %rcx # 0x1b0370 movl 0x1530(%rcx), %ecx movl %ecx, 0x70(%rax) movaps 0x22f81(%rip), %xmm1 # 0xe15a0 movups %xmm1, 0x74(%rax) movss %xmm0, 0x88(%rax) popq %rbp retq
R3D_SetMaterialOcclusion: test rdi, rdi jz short locret_BE62C push rbp mov rbp, rsp mov rax, [rdi+10h] lea rcx, [rax+70h] test rsi, rsi jz short loc_BE603 mov edx, [rsi+10h] mov [rcx+10h], edx movups xmm1, xmmword ptr [rsi] movups xmmword ptr [rcx], xmm1 jmp short loc_BE623 loc_BE603: cmp dword ptr [rcx], 0 jnz short loc_BE623 lea rcx, R3D mov ecx, [rcx+1530h] mov [rax+70h], ecx movaps xmm1, cs:xmmword_E15A0 movups xmmword ptr [rax+74h], xmm1 loc_BE623: movss dword ptr [rax+88h], xmm0 pop rbp locret_BE62C: retn
void R3D_SetMaterialOcclusion(long long a1, long long a2, float a3) { long long v3; // rax _OWORD *v4; // rcx if ( a1 ) { v3 = *(_QWORD *)(a1 + 16); v4 = (_OWORD *)(v3 + 112); if ( a2 ) { *(_DWORD *)(v3 + 128) = *(_DWORD *)(a2 + 16); *v4 = *(_OWORD *)a2; } else if ( !*(_DWORD *)v4 ) { *(_DWORD *)(v3 + 112) = *((_DWORD *)&R3D + 1356); *(_OWORD *)(v3 + 116) = xmmword_E15A0; } *(float *)(v3 + 136) = a3; } }
R3D_SetMaterialOcclusion: TEST RDI,RDI JZ 0x001be62c PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI + 0x10] LEA RCX,[RAX + 0x70] TEST RSI,RSI JZ 0x001be603 MOV EDX,dword ptr [RSI + 0x10] MOV dword ptr [RCX + 0x10],EDX MOVUPS XMM1,xmmword ptr [RSI] MOVUPS xmmword ptr [RCX],XMM1 JMP 0x001be623 LAB_001be603: CMP dword ptr [RCX],0x0 JNZ 0x001be623 LEA RCX,[0x2b0370] MOV ECX,dword ptr [RCX + 0x1530] MOV dword ptr [RAX + 0x70],ECX MOVAPS XMM1,xmmword ptr [0x001e15a0] MOVUPS xmmword ptr [RAX + 0x74],XMM1 LAB_001be623: MOVSS dword ptr [RAX + 0x88],XMM0 POP RBP LAB_001be62c: RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void R3D_SetMaterialOcclusion(int4 param_1,long param_2,int8 *param_3) { long lVar1; int8 uVar2; if (param_2 != 0) { lVar1 = *(long *)(param_2 + 0x10); if (param_3 == (int8 *)0x0) { if (*(int *)(lVar1 + 0x70) == 0) { *(int4 *)(lVar1 + 0x70) = DAT_002b18a0; uVar2 = _UNK_001e15a8; *(int8 *)(lVar1 + 0x74) = _DAT_001e15a0; *(int8 *)(lVar1 + 0x7c) = uVar2; } } else { *(int4 *)(lVar1 + 0x80) = *(int4 *)(param_3 + 2); uVar2 = param_3[1]; *(int8 *)(lVar1 + 0x70) = *param_3; *(int8 *)(lVar1 + 0x78) = uVar2; } *(int4 *)(lVar1 + 0x88) = param_1; } return; }
13,648
ma_apply_redo_insert_row_blobs
eloqsql/storage/maria/ma_blockrec.c
uint _ma_apply_redo_insert_row_blobs(MARIA_HA *info, LSN lsn, const uchar *header, LSN redo_lsn, uint * const number_of_blobs, uint * const number_of_ranges, pgcache_page_no_t * const first_page, pgcache_page_no_t * const last_page) { MARIA_SHARE *share= info->s; const uchar *data; uint data_size= FULL_PAGE_SIZE(share); uint blob_count, ranges; uint16 sid; pgcache_page_no_t first_page2= ULONGLONG_MAX, last_page2= 0; DBUG_ENTER("_ma_apply_redo_insert_row_blobs"); share->state.changed|= (STATE_CHANGED | STATE_NOT_ZEROFILLED | STATE_NOT_MOVABLE); sid= fileid_korr(header); header+= FILEID_STORE_SIZE; *number_of_ranges= ranges= pagerange_korr(header); header+= PAGERANGE_STORE_SIZE; *number_of_blobs= blob_count= pagerange_korr(header); header+= PAGERANGE_STORE_SIZE; DBUG_ASSERT(ranges >= blob_count); data= (header + ranges * ROW_EXTENT_SIZE + blob_count * (SUB_RANGE_SIZE + BLOCK_FILLER_SIZE)); while (blob_count--) { uint sub_ranges, empty_space; sub_ranges= uint2korr(header); header+= SUB_RANGE_SIZE; empty_space= uint2korr(header); header+= BLOCK_FILLER_SIZE; DBUG_ASSERT(sub_ranges <= ranges && empty_space < data_size); ranges-= sub_ranges; while (sub_ranges--) { uint i; uint res; uint page_range; pgcache_page_no_t page; uchar *buff; uint data_on_page= data_size; page= page_korr(header); header+= PAGE_STORE_SIZE; page_range= pagerange_korr(header); header+= PAGERANGE_STORE_SIZE; for (i= page_range; i-- > 0 ; page++, data+= data_on_page) { MARIA_PINNED_PAGE page_link; enum pagecache_page_lock unlock_method; enum pagecache_page_pin unpin_method; set_if_smaller(first_page2, page); set_if_bigger(last_page2, page); if (i == 0 && sub_ranges == 0) data_on_page= data_size - empty_space; /* data on last page */ if (_ma_redo_not_needed_for_page(sid, redo_lsn, page, FALSE)) continue; if (((page + 1) * share->block_size) > share->state.state.data_file_length) { /* New page or half written page at end of file */ DBUG_PRINT("info", ("Enlarging data file from %lu to %lu", (ulong) share->state.state.data_file_length, (ulong) ((page + 1 ) * share->block_size))); share->state.state.data_file_length= (page + 1) * share->block_size; buff= info->keyread_buff; info->keyread_buff_used= 1; make_empty_page(info, buff, BLOB_PAGE, 0); unlock_method= PAGECACHE_LOCK_LEFT_UNLOCKED; unpin_method= PAGECACHE_PIN_LEFT_UNPINNED; } else { share->pagecache->readwrite_flags&= ~MY_WME; share->silence_encryption_errors= 1; buff= pagecache_read(share->pagecache, &info->dfile, page, 0, 0, PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_WRITE, &page_link.link); share->pagecache->readwrite_flags= share->pagecache-> org_readwrite_flags; share->silence_encryption_errors= 0; if (!buff) { if (my_errno != HA_ERR_FILE_TOO_SHORT && my_errno != HA_ERR_WRONG_CRC && my_errno != HA_ERR_DECRYPTION_FAILED) { /* If not read outside of file */ pagecache_unlock_by_link(share->pagecache, page_link.link, PAGECACHE_LOCK_WRITE_UNLOCK, PAGECACHE_UNPIN, LSN_IMPOSSIBLE, LSN_IMPOSSIBLE, 0, FALSE); goto err; } /* Physical file was too short, create new page. It can be that recovery started with a file with N pages, wrote page N+2 into pagecache (increased data_file_length but not physical file length), now reads page N+1: the read fails. */ buff= pagecache_block_link_to_buffer(page_link.link); make_empty_page(info, buff, BLOB_PAGE, 0); } else { #ifdef DBUG_ASSERT_EXISTS uchar found_page_type= (buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK); #endif if (lsn_korr(buff) >= lsn) { /* Already applied */ check_skipped_lsn(info, lsn_korr(buff), 1, page); pagecache_unlock_by_link(share->pagecache, page_link.link, PAGECACHE_LOCK_WRITE_UNLOCK, PAGECACHE_UNPIN, LSN_IMPOSSIBLE, LSN_IMPOSSIBLE, 0, FALSE); goto fix_bitmap; } DBUG_ASSERT((found_page_type == (uchar) BLOB_PAGE) || (found_page_type == (uchar) UNALLOCATED_PAGE)); } unlock_method= PAGECACHE_LOCK_WRITE_UNLOCK; unpin_method= PAGECACHE_UNPIN; } /* Blob pages are never updated twice in same redo-undo chain, so it's safe to update lsn for them here */ lsn_store(buff, lsn); buff[PAGE_TYPE_OFFSET]= BLOB_PAGE; bzero(buff + LSN_SIZE + PAGE_TYPE_SIZE, FULL_PAGE_HEADER_SIZE(share) - (LSN_SIZE + PAGE_TYPE_SIZE)); if (data_on_page != data_size) { /* Last page may be only partly filled. We zero the rest, like write_full_pages() does. */ bzero(buff + share->block_size - PAGE_SUFFIX_SIZE - empty_space, empty_space); } memcpy(buff + FULL_PAGE_HEADER_SIZE(share), data, data_on_page); if (pagecache_write(share->pagecache, &info->dfile, page, 0, buff, PAGECACHE_PLAIN_PAGE, unlock_method, unpin_method, PAGECACHE_WRITE_DELAY, 0, LSN_IMPOSSIBLE)) goto err; fix_bitmap: /** @todo leave bitmap lock to the bitmap code... */ mysql_mutex_lock(&share->bitmap.bitmap_lock); res= _ma_bitmap_set_full_page_bits(info, &share->bitmap, page, 1); mysql_mutex_unlock(&share->bitmap.bitmap_lock); if (res) goto err; } } } *first_page= first_page2; *last_page= last_page2; DBUG_RETURN(0); err: _ma_mark_file_crashed(share); DBUG_ASSERT(!maria_assert_if_crashed_table); DBUG_RETURN(1); }
O3
c
ma_apply_redo_insert_row_blobs: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %rcx, %rbx movq (%rdi), %r12 movl 0x7bc(%r12), %r10d subl 0xc18(%r12), %r10d orl $0x181, 0x170(%r12) # imm = 0x181 movzwl (%rdx), %eax movzwl 0x2(%rdx), %ecx movl %ecx, (%r9) movzwl 0x4(%rdx), %r9d movl %r9d, (%r8) testl %r9d, %r9d je 0x5fc99 addl $-0xc, %r10d leaq (,%rcx,8), %r8 subq %rcx, %r8 leaq (%rdx,%r8), %rcx addq $0x6, %rcx addq $0x6, %rdx leaq (%rcx,%r9,4), %rcx movq %rcx, -0x78(%rbp) leaq 0x470(%rdi), %rcx movq %rcx, -0x70(%rbp) movq %rsi, %rcx shrq $0x20, %rcx movq %rcx, -0xb0(%rbp) movq %rsi, %rcx shrq $0x28, %rcx movq %rcx, -0xa8(%rbp) movq %rsi, %rcx shrq $0x30, %rcx movq %rcx, -0xa0(%rbp) leaq 0xa10(%r12), %rcx movq %rcx, -0xb8(%rbp) leaq 0xa98(%r12), %rcx movq %rcx, -0x50(%rbp) movq $-0x1, %r8 movzwl %ax, %eax movl %eax, -0x54(%rbp) xorl %r11d, %r11d movq %r12, -0x48(%rbp) movq %rbx, -0xc8(%rbp) movl %r10d, -0x38(%rbp) movq %rdi, -0x40(%rbp) movq %rsi, -0x68(%rbp) movq %r9, -0x80(%rbp) movzwl (%rdx), %esi leaq 0x4(%rdx), %rcx testl %esi, %esi je 0x5fc87 movzwl 0x2(%rdx), %eax movl %r10d, %edx subl %eax, %edx movl %edx, -0x58(%rbp) movq %rax, -0x98(%rbp) negq %rax movq %rax, -0x90(%rbp) decl %esi movzwl 0x5(%rcx), %ebx testl %ebx, %ebx movq %rcx, -0x88(%rbp) je 0x5fc70 movzbl 0x4(%rcx), %eax shlq $0x20, %rax movl (%rcx), %r15d orq %rax, %r15 decl %ebx movl %r10d, -0x34(%rbp) movl %esi, -0x5c(%rbp) cmpq %r15, %r8 cmovaeq %r15, %r8 movq %r8, -0xd8(%rbp) cmpq %r15, %r11 cmovbeq %r15, %r11 movq %r11, -0xd0(%rbp) movl %ebx, %eax orl %esi, %eax movl -0x34(%rbp), %r14d cmovel -0x58(%rbp), %r14d movl -0x54(%rbp), %edi movq -0xc8(%rbp), %rsi movq %r15, %rdx xorl %ecx, %ecx callq 0x500fb leaq 0x1(%r15), %rcx movl %r14d, -0x34(%rbp) movl %r14d, %r13d testb %al, %al jne 0x5fbd8 movl 0x7bc(%r12), %eax movq %rcx, -0xc0(%rbp) imulq %rcx, %rax cmpq 0x40(%r12), %rax jbe 0x5f974 movq %rax, 0x40(%r12) movq -0x40(%rbp), %rax movq 0x380(%rax), %r12 movb $0x1, 0x685(%rax) movl $0x1, -0x30(%rbp) movl $0x0, -0x2c(%rbp) jmp 0x5fa6c movq 0x600(%r12), %rax movl $0xffffffef, %ecx # imm = 0xFFFFFFEF andq %rcx, 0x198(%rax) movb $0x1, 0x7ec(%r12) movq 0x600(%r12), %rdi movq -0x70(%rbp), %rsi movq %r15, %rdx xorl %ecx, %ecx xorl %r8d, %r8d movl $0x1, %r9d leaq -0xf0(%rbp), %rax pushq %rax pushq $0x4 callq 0x4ce7e addq $0x10, %rsp movq %r12, %rdx movq %rax, %r12 movq 0x600(%rdx), %rax movq 0x1a0(%rax), %rcx movq %rcx, 0x198(%rax) movb $0x0, 0x7ec(%rdx) testq %r12, %r12 je 0x5fa20 movzwl (%r12), %eax shlq $0x20, %rax movzbl 0x2(%r12), %ecx shlq $0x30, %rcx orq %rax, %rcx movl 0x3(%r12), %esi orq %rcx, %rsi movq -0x68(%rbp), %rax cmpq %rax, %rsi jge 0x5fbfb movl $0x3, -0x30(%rbp) movl $0x6, -0x2c(%rbp) jmp 0x5fa94 callq 0xa13e6 cmpl $0xaf, (%rax) je 0x5fa4b callq 0xa13e6 cmpl $0xb0, (%rax) je 0x5fa4b callq 0xa13e6 cmpl $0xc0, (%rax) jne 0x5fcb5 movq -0xf0(%rbp), %rdi callq 0x4f361 movq %rax, %r12 movl $0x3, -0x30(%rbp) movl $0x6, -0x2c(%rbp) movq -0x40(%rbp), %rax movq (%rax), %rax movl 0xc18(%rax), %edx addl $0xc, %edx movq %r12, %rdi xorl %esi, %esi callq 0x292b0 movw $0x3, 0x7(%r12) movb $-0x1, 0x9(%r12) movq -0x68(%rbp), %rax movq -0xb0(%rbp), %rcx movb %cl, (%r12) movq -0xa8(%rbp), %rcx movb %cl, 0x1(%r12) movq -0xa0(%rbp), %rcx movb %cl, 0x2(%r12) movl %eax, 0x3(%r12) movb $0x3, 0x7(%r12) leaq 0x8(%r12), %rdi movq -0x48(%rbp), %r14 movl 0xc18(%r14), %edx xorl %esi, %esi callq 0x292b0 movl -0x34(%rbp), %eax cmpl -0x38(%rbp), %eax je 0x5fb08 movl 0x7bc(%r14), %eax addq %r12, %rax movq -0x90(%rbp), %rcx leaq (%rcx,%rax), %rdi addq $-0x4, %rdi xorl %esi, %esi movq -0x98(%rbp), %rdx callq 0x292b0 movl 0xc18(%r14), %edi addl $0x8, %edi addq %r12, %rdi movq -0x78(%rbp), %rsi movq %r13, %rdx callq 0x29090 movq 0x600(%r14), %rdi movl 0x80(%rdi), %eax subq $0x40, %rsp movl %eax, 0x30(%rsp) xorl %eax, %eax movl %eax, 0x28(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rsp) movl %eax, 0x10(%rsp) movl -0x30(%rbp), %eax movl %eax, 0x8(%rsp) movl -0x2c(%rbp), %eax movl %eax, (%rsp) movq -0x70(%rbp), %rsi movq %r15, %rdx xorl %ecx, %ecx movq %r12, %r8 movl $0x1, %r9d callq 0x4e2e2 addq $0x40, %rsp testb %al, %al movq %r14, %r12 jne 0x5fce5 cmpq $0x0, 0xad8(%r12) jne 0x5fc41 movq -0x50(%rbp), %rdi callq 0x29210 movq -0x40(%rbp), %rdi movq -0xb8(%rbp), %rsi movq %r15, %rdx movl $0x1, %ecx callq 0x3d674 movl %eax, %r15d movq 0xad8(%r12), %rdi testq %rdi, %rdi jne 0x5fc5b movq -0x50(%rbp), %rdi callq 0x291e0 testb %r15b, %r15b movq -0xc0(%rbp), %rcx jne 0x5fce5 addq %r13, -0x78(%rbp) movq %rcx, %r15 addl $-0x1, %ebx movq -0xd8(%rbp), %r8 movq -0xd0(%rbp), %r11 movl -0x5c(%rbp), %esi jb 0x5f8e0 jmp 0x5fc70 movq -0x40(%rbp), %rdi movl $0x1, %edx movq %r15, %rcx callq 0x47a8d movq -0x48(%rbp), %r12 movq 0x600(%r12), %rdi movq -0xf0(%rbp), %rsi movl $0x6, %edx movl $0x3, %ecx xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %rax pushq %rax callq 0x4cb99 addq $0x10, %rsp jmp 0x5fb7b movq -0x50(%rbp), %rdi leaq 0x79e07(%rip), %rsi # 0xd9a53 movl $0x1b5a, %edx # imm = 0x1B5A callq 0x2eb6f jmp 0x5fb93 leaq 0x3253ae(%rip), %rax # 0x385010 movq (%rax), %rax callq *0x160(%rax) jmp 0x5fbbf movq -0x88(%rbp), %rcx addq $0x7, %rcx testl %esi, %esi movl -0x38(%rbp), %r10d jne 0x5f8b4 movq %rcx, %rdx movq -0x80(%rbp), %r9 decl %r9d jne 0x5f884 jmp 0x5fca3 movq $-0x1, %r8 xorl %r11d, %r11d movq 0x18(%rbp), %rax movq 0x10(%rbp), %rcx movq %r8, (%rcx) movq %r11, (%rax) xorl %eax, %eax jmp 0x5fcf2 movq -0x48(%rbp), %r12 movq 0x600(%r12), %rdi movq -0xf0(%rbp), %rsi xorl %eax, %eax movl $0x6, %edx movl $0x3, %ecx xorl %r8d, %r8d xorl %r9d, %r9d pushq %rax pushq %rax callq 0x4cb99 addq $0x10, %rsp movq %r12, %rdi callq 0x342f2 movl $0x1, %eax addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ma_apply_redo_insert_row_blobs: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov rbx, rcx mov r12, [rdi] mov r10d, [r12+7BCh] sub r10d, [r12+0C18h] or dword ptr [r12+170h], 181h movzx eax, word ptr [rdx] movzx ecx, word ptr [rdx+2] mov [r9], ecx movzx r9d, word ptr [rdx+4] mov [r8], r9d test r9d, r9d jz loc_5FC99 add r10d, 0FFFFFFF4h lea r8, ds:0[rcx*8] sub r8, rcx lea rcx, [rdx+r8] add rcx, 6 add rdx, 6 lea rcx, [rcx+r9*4] mov [rbp+var_78], rcx lea rcx, [rdi+470h] mov [rbp+var_70], rcx mov rcx, rsi shr rcx, 20h mov [rbp+var_B0], rcx mov rcx, rsi shr rcx, 28h mov [rbp+var_A8], rcx mov rcx, rsi shr rcx, 30h mov [rbp+var_A0], rcx lea rcx, [r12+0A10h] mov [rbp+var_B8], rcx lea rcx, [r12+0A98h] mov [rbp+var_50], rcx mov r8, 0FFFFFFFFFFFFFFFFh movzx eax, ax mov [rbp+var_54], eax xor r11d, r11d mov [rbp+var_48], r12 mov [rbp+var_C8], rbx mov [rbp+var_38], r10d mov [rbp+var_40], rdi mov [rbp+var_68], rsi loc_5F884: mov [rbp+var_80], r9 movzx esi, word ptr [rdx] lea rcx, [rdx+4] test esi, esi jz loc_5FC87 movzx eax, word ptr [rdx+2] mov edx, r10d sub edx, eax mov [rbp+var_58], edx mov [rbp+var_98], rax neg rax mov [rbp+var_90], rax loc_5F8B4: dec esi movzx ebx, word ptr [rcx+5] test ebx, ebx mov [rbp+var_88], rcx jz loc_5FC70 movzx eax, byte ptr [rcx+4] shl rax, 20h mov r15d, [rcx] or r15, rax dec ebx mov [rbp+var_34], r10d mov [rbp+var_5C], esi loc_5F8E0: cmp r8, r15 cmovnb r8, r15 mov [rbp+var_D8], r8 cmp r11, r15 cmovbe r11, r15 mov [rbp+var_D0], r11 mov eax, ebx or eax, esi mov r14d, [rbp+var_34] cmovz r14d, [rbp+var_58] mov edi, [rbp+var_54] mov rsi, [rbp+var_C8] mov rdx, r15 xor ecx, ecx call _ma_redo_not_needed_for_page lea rcx, [r15+1] mov [rbp+var_34], r14d mov r13d, r14d test al, al jnz loc_5FBD8 mov eax, [r12+7BCh] mov [rbp+var_C0], rcx imul rax, rcx cmp rax, [r12+40h] jbe short loc_5F974 mov [r12+40h], rax mov rax, [rbp+var_40] mov r12, [rax+380h] mov byte ptr [rax+685h], 1 mov [rbp+var_30], 1 mov [rbp+var_2C], 0 jmp loc_5FA6C loc_5F974: mov rax, [r12+600h] mov ecx, 0FFFFFFEFh and [rax+198h], rcx mov byte ptr [r12+7ECh], 1 mov rdi, [r12+600h] mov rsi, [rbp+var_70] mov rdx, r15 xor ecx, ecx xor r8d, r8d mov r9d, 1 lea rax, [rbp+var_F0] push rax push 4 call pagecache_read add rsp, 10h mov rdx, r12 mov r12, rax mov rax, [rdx+600h] mov rcx, [rax+1A0h] mov [rax+198h], rcx mov byte ptr [rdx+7ECh], 0 test r12, r12 jz short loc_5FA20 movzx eax, word ptr [r12] shl rax, 20h movzx ecx, byte ptr [r12+2] shl rcx, 30h or rcx, rax mov esi, [r12+3] or rsi, rcx mov rax, [rbp+var_68] cmp rsi, rax jge loc_5FBFB mov [rbp+var_30], 3 mov [rbp+var_2C], 6 jmp short loc_5FA94 loc_5FA20: call _my_thread_var cmp dword ptr [rax], 0AFh jz short loc_5FA4B call _my_thread_var cmp dword ptr [rax], 0B0h jz short loc_5FA4B call _my_thread_var cmp dword ptr [rax], 0C0h jnz loc_5FCB5 loc_5FA4B: mov rdi, [rbp+var_F0] call pagecache_block_link_to_buffer mov r12, rax mov [rbp+var_30], 3 mov [rbp+var_2C], 6 mov rax, [rbp+var_40] loc_5FA6C: mov rax, [rax] mov edx, [rax+0C18h] add edx, 0Ch mov rdi, r12 xor esi, esi call _memset mov word ptr [r12+7], 3 mov byte ptr [r12+9], 0FFh mov rax, [rbp+var_68] loc_5FA94: mov rcx, [rbp+var_B0] mov [r12], cl mov rcx, [rbp+var_A8] mov [r12+1], cl mov rcx, [rbp+var_A0] mov [r12+2], cl mov [r12+3], eax mov byte ptr [r12+7], 3 lea rdi, [r12+8] mov r14, [rbp+var_48] mov edx, [r14+0C18h] xor esi, esi call _memset mov eax, [rbp+var_34] cmp eax, [rbp+var_38] jz short loc_5FB08 mov eax, [r14+7BCh] add rax, r12 mov rcx, [rbp+var_90] lea rdi, [rcx+rax] add rdi, 0FFFFFFFFFFFFFFFCh xor esi, esi mov rdx, [rbp+var_98] call _memset loc_5FB08: mov edi, [r14+0C18h] add edi, 8 add rdi, r12 mov rsi, [rbp+var_78] mov rdx, r13 call _memcpy mov rdi, [r14+600h] mov eax, [rdi+80h] sub rsp, 40h mov [rsp+130h+var_100], eax xor eax, eax mov [rsp+130h+var_108], eax xorps xmm0, xmm0 movups [rsp+130h+var_118], xmm0 mov [rsp+130h+var_120], eax mov eax, [rbp+var_30] mov [rsp+130h+var_128], eax mov eax, [rbp+var_2C] mov [rsp+130h+var_130], eax mov rsi, [rbp+var_70] mov rdx, r15 xor ecx, ecx mov r8, r12 mov r9d, 1 call pagecache_write_part add rsp, 40h test al, al mov r12, r14 jnz loc_5FCE5 loc_5FB7B: cmp qword ptr [r12+0AD8h], 0 jnz loc_5FC41 mov rdi, [rbp+var_50] call _pthread_mutex_lock loc_5FB93: mov rdi, [rbp+var_40] mov rsi, [rbp+var_B8] mov rdx, r15 mov ecx, 1 call _ma_bitmap_set_full_page_bits mov r15d, eax mov rdi, [r12+0AD8h] test rdi, rdi jnz loc_5FC5B loc_5FBBF: mov rdi, [rbp+var_50] call _pthread_mutex_unlock test r15b, r15b mov rcx, [rbp+var_C0] jnz loc_5FCE5 loc_5FBD8: add [rbp+var_78], r13 mov r15, rcx add ebx, 0FFFFFFFFh mov r8, [rbp+var_D8] mov r11, [rbp+var_D0] mov esi, [rbp+var_5C] jb loc_5F8E0 jmp short loc_5FC70 loc_5FBFB: mov rdi, [rbp+var_40] mov edx, 1 mov rcx, r15 call check_skipped_lsn mov r12, [rbp+var_48] mov rdi, [r12+600h] mov rsi, [rbp+var_F0] mov edx, 6 mov ecx, 3 xor r8d, r8d xor r9d, r9d xor eax, eax push rax push rax call pagecache_unlock_by_link add rsp, 10h jmp loc_5FB7B loc_5FC41: mov rdi, [rbp+var_50] lea rsi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 1B5Ah call psi_mutex_lock jmp loc_5FB93 loc_5FC5B: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_5FBBF loc_5FC70: mov rcx, [rbp+var_88] add rcx, 7 test esi, esi mov r10d, [rbp+var_38] jnz loc_5F8B4 loc_5FC87: mov rdx, rcx mov r9, [rbp+var_80] dec r9d jnz loc_5F884 jmp short loc_5FCA3 loc_5FC99: mov r8, 0FFFFFFFFFFFFFFFFh xor r11d, r11d loc_5FCA3: mov rax, [rbp+arg_8] mov rcx, [rbp+arg_0] mov [rcx], r8 mov [rax], r11 xor eax, eax jmp short loc_5FCF2 loc_5FCB5: mov r12, [rbp+var_48] mov rdi, [r12+600h] mov rsi, [rbp+var_F0] xor eax, eax mov edx, 6 mov ecx, 3 xor r8d, r8d xor r9d, r9d push rax push rax call pagecache_unlock_by_link add rsp, 10h loc_5FCE5: mov rdi, r12 call _ma_mark_file_crashed mov eax, 1 loc_5FCF2: add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_apply_redo_insert_row_blobs( char *a1, unsigned long long a2, unsigned __int16 *a3, long long a4, _DWORD *a5, _DWORD *a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14, unsigned long long *a15, unsigned long long *a16) { long long v17; // r12 int v18; // r10d unsigned __int16 v19; // ax long long v20; // rcx long long v21; // r9 int v22; // r10d long long v23; // rcx unsigned __int16 *v24; // rdx unsigned long long v25; // r8 unsigned long long v26; // r11 int v27; // esi unsigned __int16 *v28; // rcx long long v29; // rax int v30; // ebx unsigned long long v31; // r15 int v32; // ebx unsigned int v33; // r14d char v34; // al unsigned long long v35; // rcx long long v36; // r13 long long v37; // rax unsigned long long v38; // rax long long *v39; // rax long long v40; // r12 long long v41; // rdi unsigned __int16 *v42; // rax long long v43; // rdx signed long long v44; // rsi int v45; // eax long long v46; // r14 char v47; // al char v48; // r15 bool v49; // cf long long v51[3]; // [rsp+40h] [rbp-F0h] BYREF unsigned long long v52; // [rsp+58h] [rbp-D8h] unsigned long long v53; // [rsp+60h] [rbp-D0h] long long v54; // [rsp+68h] [rbp-C8h] unsigned long long v55; // [rsp+70h] [rbp-C0h] long long v56; // [rsp+78h] [rbp-B8h] unsigned long long v57; // [rsp+80h] [rbp-B0h] unsigned long long v58; // [rsp+88h] [rbp-A8h] unsigned long long v59; // [rsp+90h] [rbp-A0h] long long v60; // [rsp+98h] [rbp-98h] long long v61; // [rsp+A0h] [rbp-90h] unsigned __int16 *v62; // [rsp+A8h] [rbp-88h] long long v63; // [rsp+B0h] [rbp-80h] long long v64; // [rsp+B8h] [rbp-78h] char *v65; // [rsp+C0h] [rbp-70h] signed long long v66; // [rsp+C8h] [rbp-68h] int v67; // [rsp+D4h] [rbp-5Ch] unsigned int v68; // [rsp+D8h] [rbp-58h] int v69; // [rsp+DCh] [rbp-54h] long long v70; // [rsp+E0h] [rbp-50h] long long v71; // [rsp+E8h] [rbp-48h] long long *v72; // [rsp+F0h] [rbp-40h] int v73; // [rsp+F8h] [rbp-38h] int v74; // [rsp+FCh] [rbp-34h] unsigned int v75; // [rsp+100h] [rbp-30h] unsigned int v76; // [rsp+104h] [rbp-2Ch] v17 = *(_QWORD *)a1; v18 = *(_DWORD *)(*(_QWORD *)a1 + 1980LL) - *(_DWORD *)(*(_QWORD *)a1 + 3096LL); *(_DWORD *)(*(_QWORD *)a1 + 368LL) |= 0x181u; v19 = *a3; v20 = a3[1]; *a6 = v20; v21 = a3[2]; *a5 = v21; if ( !(_DWORD)v21 ) { v25 = -1LL; v26 = 0LL; LABEL_40: *a15 = v25; *a16 = v26; return 0LL; } v22 = v18 - 12; v23 = (long long)a3 + 7 * v20 + 6; v24 = a3 + 3; v64 = v23 + 4 * v21; v65 = a1 + 1136; v57 = HIDWORD(a2); v58 = a2 >> 40; v59 = HIWORD(a2); v56 = v17 + 2576; v70 = v17 + 2712; v25 = -1LL; v69 = v19; v26 = 0LL; v71 = v17; v54 = a4; v73 = v22; v72 = (long long *)a1; v66 = a2; while ( 1 ) { v63 = v21; v27 = *v24; v28 = v24 + 2; if ( *v24 ) break; LABEL_37: v24 = v28; v21 = (unsigned int)(v63 - 1); if ( (_DWORD)v63 == 1 ) goto LABEL_40; } v29 = v24[1]; v68 = v22 - v29; v60 = v29; v61 = -v29; while ( 1 ) { --v27; v30 = *(unsigned __int16 *)((char *)v28 + 5); v62 = v28; if ( v30 ) break; LABEL_36: v28 = (unsigned __int16 *)((char *)v62 + 7); v22 = v73; if ( !v27 ) goto LABEL_37; } v31 = ((unsigned long long)*((unsigned __int8 *)v28 + 4) << 32) | *(unsigned int *)v28; v32 = v30 - 1; v74 = v22; v67 = v27; while ( 1 ) { if ( v25 >= v31 ) v25 = v31; v52 = v25; if ( v26 <= v31 ) v26 = v31; v53 = v26; v33 = v74; if ( !(v27 | v32) ) v33 = v68; v34 = ma_redo_not_needed_for_page(v69, v54, v31, 0, a7, a8, a9, a10, a11, a12, a13, a14); v35 = v31 + 1; v74 = v33; v36 = v33; if ( v34 ) goto LABEL_32; v37 = *(unsigned int *)(v17 + 1980); v55 = v31 + 1; v38 = v35 * v37; if ( v38 > *(_QWORD *)(v17 + 64) ) { *(_QWORD *)(v17 + 64) = v38; v39 = v72; v40 = v72[112]; *((_BYTE *)v72 + 1669) = 1; v75 = 1; v76 = 0; LABEL_23: memset(v40, 0LL, (unsigned int)(*(_DWORD *)(*v39 + 3096) + 12)); *(_WORD *)(v40 + 7) = 3; *(_BYTE *)(v40 + 9) = -1; v45 = v66; LABEL_24: *(_BYTE *)v40 = v57; *(_BYTE *)(v40 + 1) = v58; *(_BYTE *)(v40 + 2) = v59; *(_DWORD *)(v40 + 3) = v45; *(_BYTE *)(v40 + 7) = 3; v46 = v71; memset(v40 + 8, 0LL, *(unsigned int *)(v71 + 3096)); if ( v74 != v73 ) memset(v61 + v40 + *(unsigned int *)(v46 + 1980) - 4, 0LL, v60); memcpy(v40 + (unsigned int)(*(_DWORD *)(v46 + 3096) + 8), v64, v36); a7 = 0LL; v47 = pagecache_write_part( *(__m128i **)(v46 + 1536), v65, v31, 0, (char *)v40, 1, v76, v75, 0, 0LL, 0LL, 0, *(_DWORD *)(*(_QWORD *)(v46 + 1536) + 128LL)); v17 = v46; if ( v47 ) goto LABEL_42; goto LABEL_27; } *(_QWORD *)(*(_QWORD *)(v17 + 1536) + 408LL) &= 0xFFFFFFEFuLL; *(_BYTE *)(v17 + 2028) = 1; v41 = *(_QWORD *)(v17 + 1536); v42 = (unsigned __int16 *)pagecache_read(v41, (long long)v65, v31, 0, 0LL, 1, 4u, v51); v43 = v17; v40 = (long long)v42; *(_QWORD *)(*(_QWORD *)(v43 + 1536) + 408LL) = *(_QWORD *)(*(_QWORD *)(v43 + 1536) + 416LL); *(_BYTE *)(v43 + 2028) = 0; if ( !v42 ) break; v44 = ((unsigned long long)*v42 << 32) | ((unsigned long long)*((unsigned __int8 *)v42 + 2) << 48) | *(unsigned int *)((char *)v42 + 3); v45 = v66; if ( v44 < v66 ) { v75 = 3; v76 = 6; goto LABEL_24; } check_skipped_lsn((long long)v72, v44, 1, v31); v17 = v71; pagecache_unlock_by_link(*(_QWORD *)(v71 + 1536), v51[0], 6, 3, 0LL, 0LL, 0); LABEL_27: if ( *(_QWORD *)(v17 + 2776) ) psi_mutex_lock(v70, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_blockrec.c", 0x1B5Au); else pthread_mutex_lock(v70); v48 = ma_bitmap_set_full_page_bits(v72, v56, v31, 1u); if ( *(_QWORD *)(v17 + 2776) ) PSI_server[44](); pthread_mutex_unlock(v70); v35 = v55; if ( v48 ) goto LABEL_42; LABEL_32: v64 += v36; v31 = v35; v49 = v32-- != 0; v25 = v52; v26 = v53; v27 = v67; if ( !v49 ) goto LABEL_36; } if ( *(_DWORD *)my_thread_var(v41) == 175 || *(_DWORD *)my_thread_var(v41) == 176 || *(_DWORD *)my_thread_var(v41) == 192 ) { v40 = pagecache_block_link_to_buffer(v51[0]); v75 = 3; v76 = 6; v39 = v72; goto LABEL_23; } v17 = v71; pagecache_unlock_by_link(*(_QWORD *)(v71 + 1536), v51[0], 6, 3, 0LL, 0LL, 0); LABEL_42: ma_mark_file_crashed(v17); return 1LL; }
_ma_apply_redo_insert_row_blobs: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV RBX,RCX MOV R12,qword ptr [RDI] MOV R10D,dword ptr [R12 + 0x7bc] SUB R10D,dword ptr [R12 + 0xc18] OR dword ptr [R12 + 0x170],0x181 MOVZX EAX,word ptr [RDX] MOVZX ECX,word ptr [RDX + 0x2] MOV dword ptr [R9],ECX MOVZX R9D,word ptr [RDX + 0x4] MOV dword ptr [R8],R9D TEST R9D,R9D JZ 0x0015fc99 ADD R10D,-0xc LEA R8,[RCX*0x8] SUB R8,RCX LEA RCX,[RDX + R8*0x1] ADD RCX,0x6 ADD RDX,0x6 LEA RCX,[RCX + R9*0x4] MOV qword ptr [RBP + -0x78],RCX LEA RCX,[RDI + 0x470] MOV qword ptr [RBP + -0x70],RCX MOV RCX,RSI SHR RCX,0x20 MOV qword ptr [RBP + -0xb0],RCX MOV RCX,RSI SHR RCX,0x28 MOV qword ptr [RBP + -0xa8],RCX MOV RCX,RSI SHR RCX,0x30 MOV qword ptr [RBP + -0xa0],RCX LEA RCX,[R12 + 0xa10] MOV qword ptr [RBP + -0xb8],RCX LEA RCX,[R12 + 0xa98] MOV qword ptr [RBP + -0x50],RCX MOV R8,-0x1 MOVZX EAX,AX MOV dword ptr [RBP + -0x54],EAX XOR R11D,R11D MOV qword ptr [RBP + -0x48],R12 MOV qword ptr [RBP + -0xc8],RBX MOV dword ptr [RBP + -0x38],R10D MOV qword ptr [RBP + -0x40],RDI MOV qword ptr [RBP + -0x68],RSI LAB_0015f884: MOV qword ptr [RBP + -0x80],R9 MOVZX ESI,word ptr [RDX] LEA RCX,[RDX + 0x4] TEST ESI,ESI JZ 0x0015fc87 MOVZX EAX,word ptr [RDX + 0x2] MOV EDX,R10D SUB EDX,EAX MOV dword ptr [RBP + -0x58],EDX MOV qword ptr [RBP + -0x98],RAX NEG RAX MOV qword ptr [RBP + -0x90],RAX LAB_0015f8b4: DEC ESI MOVZX EBX,word ptr [RCX + 0x5] TEST EBX,EBX MOV qword ptr [RBP + -0x88],RCX JZ 0x0015fc70 MOVZX EAX,byte ptr [RCX + 0x4] SHL RAX,0x20 MOV R15D,dword ptr [RCX] OR R15,RAX DEC EBX MOV dword ptr [RBP + -0x34],R10D MOV dword ptr [RBP + -0x5c],ESI LAB_0015f8e0: CMP R8,R15 CMOVNC R8,R15 MOV qword ptr [RBP + -0xd8],R8 CMP R11,R15 CMOVBE R11,R15 MOV qword ptr [RBP + -0xd0],R11 MOV EAX,EBX OR EAX,ESI MOV R14D,dword ptr [RBP + -0x34] CMOVZ R14D,dword ptr [RBP + -0x58] MOV EDI,dword ptr [RBP + -0x54] MOV RSI,qword ptr [RBP + -0xc8] MOV RDX,R15 XOR ECX,ECX CALL 0x001500fb LEA RCX,[R15 + 0x1] MOV dword ptr [RBP + -0x34],R14D MOV R13D,R14D TEST AL,AL JNZ 0x0015fbd8 MOV EAX,dword ptr [R12 + 0x7bc] MOV qword ptr [RBP + -0xc0],RCX IMUL RAX,RCX CMP RAX,qword ptr [R12 + 0x40] JBE 0x0015f974 MOV qword ptr [R12 + 0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV R12,qword ptr [RAX + 0x380] MOV byte ptr [RAX + 0x685],0x1 MOV dword ptr [RBP + -0x30],0x1 MOV dword ptr [RBP + -0x2c],0x0 JMP 0x0015fa6c LAB_0015f974: MOV RAX,qword ptr [R12 + 0x600] MOV ECX,0xffffffef AND qword ptr [RAX + 0x198],RCX MOV byte ptr [R12 + 0x7ec],0x1 MOV RDI,qword ptr [R12 + 0x600] MOV RSI,qword ptr [RBP + -0x70] MOV RDX,R15 XOR ECX,ECX XOR R8D,R8D MOV R9D,0x1 LEA RAX,[RBP + -0xf0] PUSH RAX PUSH 0x4 CALL 0x0014ce7e ADD RSP,0x10 MOV RDX,R12 MOV R12,RAX MOV RAX,qword ptr [RDX + 0x600] MOV RCX,qword ptr [RAX + 0x1a0] MOV qword ptr [RAX + 0x198],RCX MOV byte ptr [RDX + 0x7ec],0x0 TEST R12,R12 JZ 0x0015fa20 MOVZX EAX,word ptr [R12] SHL RAX,0x20 MOVZX ECX,byte ptr [R12 + 0x2] SHL RCX,0x30 OR RCX,RAX MOV ESI,dword ptr [R12 + 0x3] OR RSI,RCX MOV RAX,qword ptr [RBP + -0x68] CMP RSI,RAX JGE 0x0015fbfb MOV dword ptr [RBP + -0x30],0x3 MOV dword ptr [RBP + -0x2c],0x6 JMP 0x0015fa94 LAB_0015fa20: CALL 0x001a13e6 CMP dword ptr [RAX],0xaf JZ 0x0015fa4b CALL 0x001a13e6 CMP dword ptr [RAX],0xb0 JZ 0x0015fa4b CALL 0x001a13e6 CMP dword ptr [RAX],0xc0 JNZ 0x0015fcb5 LAB_0015fa4b: MOV RDI,qword ptr [RBP + -0xf0] CALL 0x0014f361 MOV R12,RAX MOV dword ptr [RBP + -0x30],0x3 MOV dword ptr [RBP + -0x2c],0x6 MOV RAX,qword ptr [RBP + -0x40] LAB_0015fa6c: MOV RAX,qword ptr [RAX] MOV EDX,dword ptr [RAX + 0xc18] ADD EDX,0xc MOV RDI,R12 XOR ESI,ESI CALL 0x001292b0 MOV word ptr [R12 + 0x7],0x3 MOV byte ptr [R12 + 0x9],0xff MOV RAX,qword ptr [RBP + -0x68] LAB_0015fa94: MOV RCX,qword ptr [RBP + -0xb0] MOV byte ptr [R12],CL MOV RCX,qword ptr [RBP + -0xa8] MOV byte ptr [R12 + 0x1],CL MOV RCX,qword ptr [RBP + -0xa0] MOV byte ptr [R12 + 0x2],CL MOV dword ptr [R12 + 0x3],EAX MOV byte ptr [R12 + 0x7],0x3 LEA RDI,[R12 + 0x8] MOV R14,qword ptr [RBP + -0x48] MOV EDX,dword ptr [R14 + 0xc18] XOR ESI,ESI CALL 0x001292b0 MOV EAX,dword ptr [RBP + -0x34] CMP EAX,dword ptr [RBP + -0x38] JZ 0x0015fb08 MOV EAX,dword ptr [R14 + 0x7bc] ADD RAX,R12 MOV RCX,qword ptr [RBP + -0x90] LEA RDI,[RCX + RAX*0x1] ADD RDI,-0x4 XOR ESI,ESI MOV RDX,qword ptr [RBP + -0x98] CALL 0x001292b0 LAB_0015fb08: MOV EDI,dword ptr [R14 + 0xc18] ADD EDI,0x8 ADD RDI,R12 MOV RSI,qword ptr [RBP + -0x78] MOV RDX,R13 CALL 0x00129090 MOV RDI,qword ptr [R14 + 0x600] MOV EAX,dword ptr [RDI + 0x80] SUB RSP,0x40 MOV dword ptr [RSP + 0x30],EAX XOR EAX,EAX MOV dword ptr [RSP + 0x28],EAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOV dword ptr [RSP + 0x10],EAX MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RSP + 0x8],EAX MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RSP],EAX MOV RSI,qword ptr [RBP + -0x70] MOV RDX,R15 XOR ECX,ECX MOV R8,R12 MOV R9D,0x1 CALL 0x0014e2e2 ADD RSP,0x40 TEST AL,AL MOV R12,R14 JNZ 0x0015fce5 LAB_0015fb7b: CMP qword ptr [R12 + 0xad8],0x0 JNZ 0x0015fc41 MOV RDI,qword ptr [RBP + -0x50] CALL 0x00129210 LAB_0015fb93: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0xb8] MOV RDX,R15 MOV ECX,0x1 CALL 0x0013d674 MOV R15D,EAX MOV RDI,qword ptr [R12 + 0xad8] TEST RDI,RDI JNZ 0x0015fc5b LAB_0015fbbf: MOV RDI,qword ptr [RBP + -0x50] CALL 0x001291e0 TEST R15B,R15B MOV RCX,qword ptr [RBP + -0xc0] JNZ 0x0015fce5 LAB_0015fbd8: ADD qword ptr [RBP + -0x78],R13 MOV R15,RCX ADD EBX,-0x1 MOV R8,qword ptr [RBP + -0xd8] MOV R11,qword ptr [RBP + -0xd0] MOV ESI,dword ptr [RBP + -0x5c] JC 0x0015f8e0 JMP 0x0015fc70 LAB_0015fbfb: MOV RDI,qword ptr [RBP + -0x40] MOV EDX,0x1 MOV RCX,R15 CALL 0x00147a8d MOV R12,qword ptr [RBP + -0x48] MOV RDI,qword ptr [R12 + 0x600] MOV RSI,qword ptr [RBP + -0xf0] MOV EDX,0x6 MOV ECX,0x3 XOR R8D,R8D XOR R9D,R9D XOR EAX,EAX PUSH RAX PUSH RAX CALL 0x0014cb99 ADD RSP,0x10 JMP 0x0015fb7b LAB_0015fc41: MOV RDI,qword ptr [RBP + -0x50] LEA RSI,[0x1d9a53] MOV EDX,0x1b5a CALL 0x0012eb6f JMP 0x0015fb93 LAB_0015fc5b: LEA RAX,[0x485010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0015fbbf LAB_0015fc70: MOV RCX,qword ptr [RBP + -0x88] ADD RCX,0x7 TEST ESI,ESI MOV R10D,dword ptr [RBP + -0x38] JNZ 0x0015f8b4 LAB_0015fc87: MOV RDX,RCX MOV R9,qword ptr [RBP + -0x80] DEC R9D JNZ 0x0015f884 JMP 0x0015fca3 LAB_0015fc99: MOV R8,-0x1 XOR R11D,R11D LAB_0015fca3: MOV RAX,qword ptr [RBP + 0x18] MOV RCX,qword ptr [RBP + 0x10] MOV qword ptr [RCX],R8 MOV qword ptr [RAX],R11 XOR EAX,EAX JMP 0x0015fcf2 LAB_0015fcb5: MOV R12,qword ptr [RBP + -0x48] MOV RDI,qword ptr [R12 + 0x600] MOV RSI,qword ptr [RBP + -0xf0] XOR EAX,EAX MOV EDX,0x6 MOV ECX,0x3 XOR R8D,R8D XOR R9D,R9D PUSH RAX PUSH RAX CALL 0x0014cb99 ADD RSP,0x10 LAB_0015fce5: MOV RDI,R12 CALL 0x001342f2 MOV EAX,0x1 LAB_0015fcf2: ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 _ma_apply_redo_insert_row_blobs (long *param_1,ulong param_2,ushort *param_3,int8 param_4,uint *param_5, uint *param_6,ulong *param_7,ulong *param_8) { ulong *puVar1; ushort uVar2; ushort uVar3; ushort uVar4; int iVar5; int iVar6; uint uVar7; char cVar8; ulong uVar9; ushort *__s; int *piVar10; uint5 *puVar11; uint uVar12; ulong uVar13; long lVar14; ulong uVar15; ulong in_stack_fffffffffffffef0; int8 local_f8 [3]; ulong local_e0; ulong local_d8; int8 local_d0; ulong local_c8; long local_c0; ulong local_b8; ulong local_b0; ulong local_a8; ulong local_a0; long local_98; uint5 *local_90; ulong local_88; void *local_80; long *local_78; ulong local_70; uint local_64; uint local_60; uint local_5c; pthread_mutex_t *local_58; long local_50; long *local_48; uint local_40; uint local_3c; int4 local_38; int4 local_34; lVar14 = *param_1; iVar5 = *(int *)(lVar14 + 0x7bc); iVar6 = *(int *)(lVar14 + 0xc18); *(uint *)(lVar14 + 0x170) = *(uint *)(lVar14 + 0x170) | 0x181; uVar2 = *param_3; uVar3 = param_3[1]; *param_6 = (uint)uVar3; uVar4 = param_3[2]; local_88 = (ulong)uVar4; *param_5 = (uint)uVar4; if (uVar4 == 0) { local_e0 = 0xffffffffffffffff; local_d8 = 0; } else { local_3c = (iVar5 - iVar6) - 0xc; local_80 = (void *)((long)param_3 + local_88 * 4 + (ulong)uVar3 * 7 + 6); local_78 = param_1 + 0x8e; local_b8 = param_2 >> 0x20; local_b0 = param_2 >> 0x28; local_a8 = param_2 >> 0x30; local_c0 = lVar14 + 0xa10; local_58 = (pthread_mutex_t *)(lVar14 + 0xa98); local_e0 = 0xffffffffffffffff; local_5c = (uint)uVar2; local_d8 = 0; puVar11 = (uint5 *)(param_3 + 3); local_d0 = param_4; local_70 = param_2; local_50 = lVar14; local_48 = param_1; local_40 = local_3c; do { local_64 = (uint)(ushort)*puVar11; local_90 = (uint5 *)((long)puVar11 + 4); if ((ushort)*puVar11 != 0) { local_a0 = (ulong)*(ushort *)((long)puVar11 + 2); local_60 = local_3c - *(ushort *)((long)puVar11 + 2); local_98 = -local_a0; do { local_64 = local_64 - 1; if (*(ushort *)((long)local_90 + 5) != 0) { uVar12 = (uint)*(ushort *)((long)local_90 + 5); uVar15 = (ulong)*local_90; do { uVar12 = uVar12 - 1; if (uVar15 <= local_e0) { local_e0 = uVar15; } if (local_d8 <= uVar15) { local_d8 = uVar15; } uVar7 = local_3c; if (uVar12 == 0 && local_64 == 0) { uVar7 = local_60; } cVar8 = _ma_redo_not_needed_for_page(local_5c,local_d0,uVar15,0); uVar13 = uVar15 + 1; local_3c = uVar7; if (cVar8 == '\0') { uVar9 = *(uint *)(lVar14 + 0x7bc) * uVar13; local_c8 = uVar13; if (uVar9 < *(ulong *)(lVar14 + 0x40) || uVar9 - *(ulong *)(lVar14 + 0x40) == 0) { puVar1 = (ulong *)(*(long *)(lVar14 + 0x600) + 0x198); *puVar1 = *puVar1 & 0xffffffef; *(int1 *)(lVar14 + 0x7ec) = 1; in_stack_fffffffffffffef0 = 0; __s = (ushort *) pagecache_read(*(int8 *)(lVar14 + 0x600),local_78,uVar15,0,0,1,4, local_f8); *(int8 *)(*(long *)(lVar14 + 0x600) + 0x198) = *(int8 *)(*(long *)(lVar14 + 0x600) + 0x1a0); *(int1 *)(lVar14 + 0x7ec) = 0; if (__s == (ushort *)0x0) { piVar10 = (int *)_my_thread_var(); if (((*piVar10 != 0xaf) && (piVar10 = (int *)_my_thread_var(), *piVar10 != 0xb0) ) && (piVar10 = (int *)_my_thread_var(), lVar14 = local_50, *piVar10 != 0xc0 )) { pagecache_unlock_by_link (*(int8 *)(local_50 + 0x600),local_f8[0],6,3,0,0,0,0); goto LAB_0015fce5; } __s = (ushort *)pagecache_block_link_to_buffer(local_f8[0]); local_38 = 3; local_34 = 6; goto LAB_0015fa6c; } uVar13 = (ulong)*(uint *)((long)__s + 3) | (ulong)(byte)__s[1] << 0x30 | (ulong)*__s << 0x20; if ((long)uVar13 < (long)local_70) { local_38 = 3; local_34 = 6; goto LAB_0015fa94; } check_skipped_lsn(local_48,uVar13,1,uVar15); lVar14 = local_50; in_stack_fffffffffffffef0 = 0; pagecache_unlock_by_link (*(int8 *)(local_50 + 0x600),local_f8[0],6,3,0,0,0,0); } else { *(ulong *)(lVar14 + 0x40) = uVar9; __s = (ushort *)local_48[0x70]; *(int1 *)((long)local_48 + 0x685) = 1; local_38 = 1; local_34 = 0; LAB_0015fa6c: memset(__s,0,(ulong)(*(int *)(*local_48 + 0xc18) + 0xc)); *(int2 *)((long)__s + 7) = 3; *(int1 *)((long)__s + 9) = 0xff; LAB_0015fa94: lVar14 = local_50; *(char *)__s = (char)local_b8; *(char *)((long)__s + 1) = (char)local_b0; *(char *)(__s + 1) = (char)local_a8; *(int *)((long)__s + 3) = (int)local_70; *(int1 *)((long)__s + 7) = 3; memset(__s + 4,0,(ulong)*(uint *)(local_50 + 0xc18)); if (local_3c != local_40) { memset((void *)((long)__s + local_98 + (ulong)*(uint *)(lVar14 + 0x7bc) + -4),0, local_a0); } memcpy((void *)((ulong)(*(int *)(lVar14 + 0xc18) + 8) + (long)__s),local_80, (ulong)uVar7); in_stack_fffffffffffffef0 = in_stack_fffffffffffffef0 & 0xffffffff00000000; cVar8 = pagecache_write_part (*(long *)(lVar14 + 0x600),local_78,uVar15,0,__s,1,local_34, local_38,0,0,0,in_stack_fffffffffffffef0, *(int4 *)(*(long *)(lVar14 + 0x600) + 0x80)); if (cVar8 != '\0') goto LAB_0015fce5; } if (*(long *)(lVar14 + 0xad8) == 0) { pthread_mutex_lock(local_58); } else { psi_mutex_lock(local_58, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_blockrec.c" ,0x1b5a); } cVar8 = _ma_bitmap_set_full_page_bits(local_48,local_c0,uVar15,1); if (*(long *)(lVar14 + 0xad8) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(local_58); uVar13 = local_c8; if (cVar8 != '\0') { LAB_0015fce5: _ma_mark_file_crashed(lVar14); return 1; } } local_80 = (void *)((long)local_80 + (ulong)uVar7); uVar15 = uVar13; } while (uVar12 != 0); } local_90 = (uint5 *)((long)local_90 + 7); local_3c = local_40; } while (local_64 != 0); } uVar12 = (int)local_88 - 1; local_88 = (ulong)uVar12; puVar11 = local_90; } while (uVar12 != 0); } *param_7 = local_e0; *param_8 = local_d8; return 0; }
13,649
ggml_map_binary_impl_f32
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
static struct ggml_tensor * ggml_map_binary_impl_f32( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, const ggml_binary_op_f32_t fun, bool inplace) { GGML_ASSERT(ggml_are_same_shape(a, b)); struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a); ggml_set_op_params(result, (const void *) &fun, sizeof(fun)); result->op = GGML_OP_MAP_BINARY; result->src[0] = a; result->src[1] = b; return result; }
O0
c
ggml_map_binary_impl_f32: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movb %r8b, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) andb $0x1, %al movb %al, -0x21(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x489b0 testb $0x1, %al jne 0x54922 leaq 0x5ccaf(%rip), %rdi # 0xb15b7 movl $0x12a6, %esi # imm = 0x12A6 leaq 0x5ccf5(%rip), %rdx # 0xb1609 leaq 0x5cedd(%rip), %rcx # 0xb17f8 movb $0x0, %al callq 0x48a00 testb $0x1, -0x21(%rbp) je 0x5493b movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x428f0 movq %rax, -0x38(%rbp) jmp 0x5494c movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x45d90 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rdi leaq -0x20(%rbp), %rsi movl $0x8, %edx callq 0x4e370 movq -0x30(%rbp), %rax movl $0x49, 0x50(%rax) movq -0x10(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x18(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, 0xa0(%rax) movq -0x30(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopl (%rax)
ggml_map_binary_impl_f32: push rbp mov rbp, rsp sub rsp, 40h mov al, r8b mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx and al, 1 mov [rbp+var_21], al mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call _ggml_are_same_shape test al, 1 jnz short loc_54922 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 12A6h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlAreSameSha_0; "ggml_are_same_shape(a, b)" mov al, 0 call _ggml_abort loc_54922: test [rbp+var_21], 1 jz short loc_5493B mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call _ggml_view_tensor mov [rbp+var_38], rax jmp short loc_5494C loc_5493B: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call _ggml_dup_tensor mov [rbp+var_38], rax loc_5494C: mov rax, [rbp+var_38] mov [rbp+var_30], rax mov rdi, [rbp+var_30] lea rsi, [rbp+var_20] mov edx, 8 call ggml_set_op_params mov rax, [rbp+var_30] mov dword ptr [rax+50h], 49h ; 'I' mov rcx, [rbp+var_10] mov rax, [rbp+var_30] mov [rax+98h], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_30] mov [rax+0A0h], rcx mov rax, [rbp+var_30] add rsp, 40h pop rbp retn
long long ggml_map_binary_impl_f32( long long a1, unsigned int *a2, _QWORD *a3, long long a4, char a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { double v13; // xmm4_8 double v14; // xmm5_8 long long v16; // [rsp+8h] [rbp-38h] char v17; // [rsp+1Fh] [rbp-21h] long long v18; // [rsp+20h] [rbp-20h] BYREF _QWORD *v19; // [rsp+28h] [rbp-18h] unsigned int *v20; // [rsp+30h] [rbp-10h] long long v21; // [rsp+38h] [rbp-8h] v21 = a1; v20 = a2; v19 = a3; v18 = a4; v17 = a5 & 1; if ( !ggml_are_same_shape(a2, a3) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 4774, (long long)"GGML_ASSERT(%s) failed", "ggml_are_same_shape(a, b)"); if ( (v17 & 1) != 0 ) v16 = (long long)ggml_view_tensor(v21, (long long)v20, a6, a7, a8, a9, v13, v14, a12, a13); else v16 = ggml_dup_tensor(v21, v20); ggml_set_op_params(v16, (long long)&v18, 8uLL); *(_DWORD *)(v16 + 80) = 73; *(_QWORD *)(v16 + 152) = v20; *(_QWORD *)(v16 + 160) = v19; return v16; }
ggml_map_binary_impl_f32: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV AL,R8B MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX AND AL,0x1 MOV byte ptr [RBP + -0x21],AL MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001489b0 TEST AL,0x1 JNZ 0x00154922 LEA RDI,[0x1b15b7] MOV ESI,0x12a6 LEA RDX,[0x1b1609] LEA RCX,[0x1b17f8] MOV AL,0x0 CALL 0x00148a00 LAB_00154922: TEST byte ptr [RBP + -0x21],0x1 JZ 0x0015493b MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x001428f0 MOV qword ptr [RBP + -0x38],RAX JMP 0x0015494c LAB_0015493b: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x00145d90 MOV qword ptr [RBP + -0x38],RAX LAB_0015494c: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x20] MOV EDX,0x8 CALL 0x0014e370 MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x50],0x49 MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x98],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0xa0],RCX MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x40 POP RBP RET
long ggml_map_binary_impl_f32 (int8 param_1,int8 param_2,int8 param_3,int8 param_4, byte param_5) { ulong uVar1; long local_40; int8 local_28; int8 local_20; int8 local_18; int8 local_10; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; uVar1 = ggml_are_same_shape(param_2,param_3); if ((uVar1 & 1) == 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 0x12a6,"GGML_ASSERT(%s) failed","ggml_are_same_shape(a, b)"); } if ((param_5 & 1) == 0) { local_40 = ggml_dup_tensor(local_10,local_18); } else { local_40 = ggml_view_tensor(local_10,local_18); } ggml_set_op_params(local_40,&local_28,8); *(int4 *)(local_40 + 0x50) = 0x49; *(int8 *)(local_40 + 0x98) = local_18; *(int8 *)(local_40 + 0xa0) = local_20; return local_40; }
13,650
ggml_map_binary_impl_f32
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
static struct ggml_tensor * ggml_map_binary_impl_f32( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, const ggml_binary_op_f32_t fun, bool inplace) { GGML_ASSERT(ggml_are_same_shape(a, b)); struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a); ggml_set_op_params(result, (const void *) &fun, sizeof(fun)); result->op = GGML_OP_MAP_BINARY; result->src[0] = a; result->src[1] = b; return result; }
O3
c
ggml_map_binary_impl_f32: pushq %r15 pushq %r14 pushq %rbx movq 0x10(%rsi), %rax cmpq 0x10(%rdx), %rax jne 0x1fcf9 movq %rdx, %rbx movq %rsi, %r14 movq 0x18(%rsi), %rax cmpq 0x18(%rdx), %rax jne 0x1fcf9 movq 0x20(%r14), %rax cmpq 0x20(%rbx), %rax jne 0x1fcf9 movq 0x28(%r14), %rax cmpq 0x28(%rbx), %rax jne 0x1fcf9 movq %rcx, %r15 testb %r8b, %r8b je 0x1fcbe movq %r14, %rsi callq 0x16260 jmp 0x1fcd5 leaq 0x10(%r14), %rcx movl (%r14), %esi movl $0x4, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x1a57f testq %rax, %rax je 0x1fd1a movq %r15, 0x54(%rax) movl $0x49, 0x50(%rax) movq %r14, 0x98(%rax) movq %rbx, 0xa0(%rax) popq %rbx popq %r14 popq %r15 retq leaq 0x2c913(%rip), %rdi # 0x4c613 leaq 0x2c95e(%rip), %rdx # 0x4c665 leaq 0x2cb46(%rip), %rcx # 0x4c854 movl $0x12a6, %esi # imm = 0x12A6 xorl %eax, %eax callq 0x17cd0 leaq 0x2ea48(%rip), %rdi # 0x4e769 leaq 0x2c93d(%rip), %rdx # 0x4c665 leaq 0x2eb67(%rip), %rcx # 0x4e896 movl $0x70, %esi jmp 0x1fd13
ggml_map_binary_impl_f32: push r15 push r14 push rbx mov rax, [rsi+10h] cmp rax, [rdx+10h] jnz short loc_1FCF9 mov rbx, rdx mov r14, rsi mov rax, [rsi+18h] cmp rax, [rdx+18h] jnz short loc_1FCF9 mov rax, [r14+20h] cmp rax, [rbx+20h] jnz short loc_1FCF9 mov rax, [r14+28h] cmp rax, [rbx+28h] jnz short loc_1FCF9 mov r15, rcx test r8b, r8b jz short loc_1FCBE mov rsi, r14 call _ggml_view_tensor jmp short loc_1FCD5 loc_1FCBE: lea rcx, [r14+10h] mov esi, [r14] mov edx, 4 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl loc_1FCD5: test rax, rax jz short loc_1FD1A mov [rax+54h], r15 mov dword ptr [rax+50h], 49h ; 'I' mov [rax+98h], r14 mov [rax+0A0h], rbx pop rbx pop r14 pop r15 retn loc_1FCF9: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlAreSameSha_0; "ggml_are_same_shape(a, b)" mov esi, 12A6h loc_1FD13: xor eax, eax call _ggml_abort loc_1FD1A: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorNull; "tensor != NULL" mov esi, 70h ; 'p' jmp short loc_1FD13
long long ggml_map_binary_impl_f32(long long a1, long long a2, _QWORD *a3, long long a4, char a5, int a6, double a7) { long long result; // rax const char *v10; // rdi const char *v11; // rcx int v12; // esi if ( *(_QWORD *)(a2 + 16) != a3[2] || *(_QWORD *)(a2 + 24) != a3[3] || *(_QWORD *)(a2 + 32) != a3[4] || *(_QWORD *)(a2 + 40) != a3[5] ) { v10 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; v11 = "ggml_are_same_shape(a, b)"; v12 = 4774; goto LABEL_11; } if ( a5 ) result = ggml_view_tensor(a1, a2, a7); else result = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 4u, (long long *)(a2 + 16), 0LL, 0LL, a7); if ( !result ) { v10 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h"; v11 = "tensor != NULL"; v12 = 112; LABEL_11: ggml_abort((_DWORD)v10, v12, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v11, a5, a6); } *(_QWORD *)(result + 84) = a4; *(_DWORD *)(result + 80) = 73; *(_QWORD *)(result + 152) = a2; *(_QWORD *)(result + 160) = a3; return result; }
ggml_map_binary_impl_f32: PUSH R15 PUSH R14 PUSH RBX MOV RAX,qword ptr [RSI + 0x10] CMP RAX,qword ptr [RDX + 0x10] JNZ 0x0011fcf9 MOV RBX,RDX MOV R14,RSI MOV RAX,qword ptr [RSI + 0x18] CMP RAX,qword ptr [RDX + 0x18] JNZ 0x0011fcf9 MOV RAX,qword ptr [R14 + 0x20] CMP RAX,qword ptr [RBX + 0x20] JNZ 0x0011fcf9 MOV RAX,qword ptr [R14 + 0x28] CMP RAX,qword ptr [RBX + 0x28] JNZ 0x0011fcf9 MOV R15,RCX TEST R8B,R8B JZ 0x0011fcbe MOV RSI,R14 CALL 0x00116260 JMP 0x0011fcd5 LAB_0011fcbe: LEA RCX,[R14 + 0x10] MOV ESI,dword ptr [R14] MOV EDX,0x4 XOR R8D,R8D XOR R9D,R9D CALL 0x0011a57f LAB_0011fcd5: TEST RAX,RAX JZ 0x0011fd1a MOV qword ptr [RAX + 0x54],R15 MOV dword ptr [RAX + 0x50],0x49 MOV qword ptr [RAX + 0x98],R14 MOV qword ptr [RAX + 0xa0],RBX POP RBX POP R14 POP R15 RET LAB_0011fcf9: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14c854] MOV ESI,0x12a6 LAB_0011fd13: XOR EAX,EAX CALL 0x00117cd0 LAB_0011fd1a: LEA RDI,[0x14e769] LEA RDX,[0x14c665] LEA RCX,[0x14e896] MOV ESI,0x70 JMP 0x0011fd13
void ggml_map_binary_impl_f32 (int8 param_1,int4 *param_2,long param_3,int8 param_4,char param_5) { long lVar1; char *pcVar2; int8 uVar3; char *pcVar4; if ((((*(long *)(param_2 + 4) == *(long *)(param_3 + 0x10)) && (*(long *)(param_2 + 6) == *(long *)(param_3 + 0x18))) && (*(long *)(param_2 + 8) == *(long *)(param_3 + 0x20))) && (*(long *)(param_2 + 10) == *(long *)(param_3 + 0x28))) { if (param_5 == '\0') { lVar1 = ggml_new_tensor_impl(param_1,*param_2,4,param_2 + 4,0,0); } else { lVar1 = ggml_view_tensor(param_1,param_2); } if (lVar1 != 0) { *(int8 *)(lVar1 + 0x54) = param_4; *(int4 *)(lVar1 + 0x50) = 0x49; *(int4 **)(lVar1 + 0x98) = param_2; *(long *)(lVar1 + 0xa0) = param_3; return; } pcVar4 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h"; pcVar2 = "tensor != NULL"; uVar3 = 0x70; } else { pcVar4 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; pcVar2 = "ggml_are_same_shape(a, b)"; uVar3 = 0x12a6; } /* WARNING: Subroutine does not return */ ggml_abort(pcVar4,uVar3,"GGML_ASSERT(%s) failed",pcVar2); }
13,651
test_bug16143
eloqsql/tests/mysql_client_test.c
static void test_bug16143() { MYSQL_STMT *stmt; myheader("test_bug16143"); stmt= mysql_stmt_init(mysql); /* Check mysql_stmt_sqlstate return "no error" */ DIE_UNLESS(strcmp(mysql_stmt_sqlstate(stmt), "00000") == 0); mysql_stmt_close(stmt); }
O0
c
test_bug16143: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp jmp 0x7cdfa movsbl 0x3ed6d0(%rip), %eax # 0x46a4d1 cmpl $0x2, %eax jge 0x7ce82 movq 0x2321cb(%rip), %rax # 0x2aefd8 movq (%rax), %rdi leaq 0xb150d(%rip), %rsi # 0x12e324 movb $0x0, %al callq 0x3a1c0 movq 0x2321b3(%rip), %rax # 0x2aefd8 movq (%rax), %rdi movl 0x3ed8ee(%rip), %edx # 0x46a71c movl %edx, %eax addl $0x1, %eax movl %eax, 0x3ed8e3(%rip) # 0x46a71c movl 0x3ed8d9(%rip), %ecx # 0x46a718 movl 0x3ed6b6(%rip), %r8d # 0x46a4fc leaq 0xb27df(%rip), %rsi # 0x12f62c leaq 0xb2276(%rip), %r9 # 0x12f0ca movb $0x0, %al callq 0x3a1c0 movq 0x232176(%rip), %rax # 0x2aefd8 movq (%rax), %rdi leaq 0xb14f0(%rip), %rsi # 0x12e35c movb $0x0, %al callq 0x3a1c0 movq 0x23215e(%rip), %rax # 0x2aefd8 movq (%rax), %rdi callq 0x3a4a0 movq 0x3ed64f(%rip), %rdi # 0x46a4d8 callq 0xb2790 movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0xb4a00 movq %rax, %rdi leaq 0xc06b7(%rip), %rsi # 0x13d55c callq 0x3a880 cmpl $0x0, %eax jne 0x7ceb1 jmp 0x7cec9 leaq 0xb0d54(%rip), %rdi # 0x12dc0c movl $0x3c43, %esi # imm = 0x3C43 leaq 0xc2bb5(%rip), %rdx # 0x13fa79 callq 0x3c010 movq -0x8(%rbp), %rdi callq 0x3b9f0 addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
test_bug16143: push rbp mov rbp, rsp sub rsp, 10h jmp short $+2 loc_7CDFA: movsx eax, cs:opt_silent cmp eax, 2 jge short loc_7CE82 mov rax, cs:stdout_ptr mov rdi, [rax] lea rsi, asc_12E324; "\n\n###################################"... mov al, 0 call _fprintf mov rax, cs:stdout_ptr mov rdi, [rax] mov edx, cs:test_count mov eax, edx add eax, 1 mov cs:test_count, eax mov ecx, cs:iter_count mov r8d, cs:opt_count lea rsi, aUOfUUS; "%u of (%u/%u): %s" lea r9, aTestBug16143; "test_bug16143" mov al, 0 call _fprintf mov rax, cs:stdout_ptr mov rdi, [rax] lea rsi, asc_12E35C; " \n###################################"... mov al, 0 call _fprintf mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush loc_7CE82: mov rdi, cs:mysql call mysql_stmt_init mov [rbp+var_8], rax mov rdi, [rbp+var_8] call mysql_stmt_sqlstate mov rdi, rax lea rsi, aSetGlobalQuery_0+1Eh; "00000" call _strcmp cmp eax, 0 jnz short loc_7CEB1 jmp short loc_7CEC9 loc_7CEB1: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 3C43h lea rdx, aStrcmpMysqlStm; "strcmp(mysql_stmt_sqlstate(stmt), \"000"... call die loc_7CEC9: mov rdi, [rbp+var_8] call wrap_mysql_stmt_close add rsp, 10h pop rbp retn
char test_bug16143() { int v0; // edx long long v1; // rax long long v3; // [rsp+8h] [rbp-8h] if ( opt_silent < 2 ) { fprintf(stdout, "\n\n#####################################\n"); v0 = test_count++; fprintf(stdout, "%u of (%u/%u): %s", v0, iter_count, opt_count, "test_bug16143"); fprintf(stdout, " \n#####################################\n"); fflush(stdout); } v3 = mysql_stmt_init(mysql); v1 = mysql_stmt_sqlstate(v3); if ( (unsigned int)strcmp(v1, "00000") ) die( "/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 15427, "strcmp(mysql_stmt_sqlstate(stmt), \"00000\") == 0"); return wrap_mysql_stmt_close(v3); }
test_bug16143: PUSH RBP MOV RBP,RSP SUB RSP,0x10 JMP 0x0017cdfa LAB_0017cdfa: MOVSX EAX,byte ptr [0x0056a4d1] CMP EAX,0x2 JGE 0x0017ce82 MOV RAX,qword ptr [0x003aefd8] MOV RDI,qword ptr [RAX] LEA RSI,[0x22e324] MOV AL,0x0 CALL 0x0013a1c0 MOV RAX,qword ptr [0x003aefd8] MOV RDI,qword ptr [RAX] MOV EDX,dword ptr [0x0056a71c] MOV EAX,EDX ADD EAX,0x1 MOV dword ptr [0x0056a71c],EAX MOV ECX,dword ptr [0x0056a718] MOV R8D,dword ptr [0x0056a4fc] LEA RSI,[0x22f62c] LEA R9,[0x22f0ca] MOV AL,0x0 CALL 0x0013a1c0 MOV RAX,qword ptr [0x003aefd8] MOV RDI,qword ptr [RAX] LEA RSI,[0x22e35c] MOV AL,0x0 CALL 0x0013a1c0 MOV RAX,qword ptr [0x003aefd8] MOV RDI,qword ptr [RAX] CALL 0x0013a4a0 LAB_0017ce82: MOV RDI,qword ptr [0x0056a4d8] CALL 0x001b2790 MOV qword ptr [RBP + -0x8],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x001b4a00 MOV RDI,RAX LEA RSI,[0x23d55c] CALL 0x0013a880 CMP EAX,0x0 JNZ 0x0017ceb1 JMP 0x0017cec9 LAB_0017ceb1: LEA RDI,[0x22dc0c] MOV ESI,0x3c43 LEA RDX,[0x23fa79] CALL 0x0013c010 LAB_0017cec9: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0013b9f0 ADD RSP,0x10 POP RBP RET
void test_bug16143(void) { int iVar1; int8 uVar2; char *__s1; ulong uVar3; if (opt_silent < '\x02') { fprintf(*(FILE **)PTR_stdout_003aefd8,"\n\n#####################################\n"); uVar3 = (ulong)test_count; test_count = test_count + 1; fprintf(*(FILE **)PTR_stdout_003aefd8,"%u of (%u/%u): %s",uVar3,(ulong)iter_count, (ulong)opt_count,"test_bug16143"); fprintf(*(FILE **)PTR_stdout_003aefd8," \n#####################################\n"); fflush(*(FILE **)PTR_stdout_003aefd8); } uVar2 = mysql_stmt_init(mysql); __s1 = (char *)mysql_stmt_sqlstate(uVar2); iVar1 = strcmp(__s1,"00000"); if (iVar1 != 0) { die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3c43, "strcmp(mysql_stmt_sqlstate(stmt), \"00000\") == 0"); } wrap_mysql_stmt_close(uVar2); return; }
13,652
get_dynamic
eloqsql/mysys/array.c
void get_dynamic(DYNAMIC_ARRAY *array, void *element, uint idx) { if (idx >= array->elements) { DBUG_PRINT("warning",("To big array idx: %d, array size is %d", idx,array->elements)); bzero(element,array->size_of_element); return; } memcpy(element,array->buffer+idx*array->size_of_element, (size_t) array->size_of_element); }
O0
c
get_dynamic: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl -0x14(%rbp), %eax movq -0x8(%rbp), %rcx cmpl 0x8(%rcx), %eax jb 0x90019 jmp 0x90001 jmp 0x90003 movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x14(%rax), %eax movl %eax, %edx xorl %esi, %esi callq 0x38300 jmp 0x90042 movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movq (%rax), %rsi movl -0x14(%rbp), %eax movq -0x8(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax addq %rax, %rsi movq -0x8(%rbp), %rax movl 0x14(%rax), %eax movl %eax, %edx callq 0x380b0 addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
get_dynamic: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov eax, [rbp+var_14] mov rcx, [rbp+var_8] cmp eax, [rcx+8] jb short loc_90019 jmp short $+2 loc_90001: jmp short $+2 loc_90003: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov eax, [rax+14h] mov edx, eax xor esi, esi call _memset jmp short loc_90042 loc_90019: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov rsi, [rax] mov eax, [rbp+var_14] mov rcx, [rbp+var_8] imul eax, [rcx+14h] mov eax, eax add rsi, rax mov rax, [rbp+var_8] mov eax, [rax+14h] mov edx, eax call _memcpy loc_90042: add rsp, 20h pop rbp retn
long long get_dynamic(long long a1, long long a2, unsigned int a3) { if ( a3 < *(_DWORD *)(a1 + 8) ) return memcpy(a2, *(_DWORD *)(a1 + 20) * a3 + *(_QWORD *)a1, *(unsigned int *)(a1 + 20)); else return memset(a2, 0LL, *(unsigned int *)(a1 + 20)); }
get_dynamic: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV EAX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0x8] JC 0x00190019 JMP 0x00190001 LAB_00190001: JMP 0x00190003 LAB_00190003: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x14] MOV EDX,EAX XOR ESI,ESI CALL 0x00138300 JMP 0x00190042 LAB_00190019: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RAX] MOV EAX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x8] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX ADD RSI,RAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x14] MOV EDX,EAX CALL 0x001380b0 LAB_00190042: ADD RSP,0x20 POP RBP RET
void get_dynamic(long *param_1,void *param_2,uint param_3) { if (param_3 < *(uint *)(param_1 + 1)) { memcpy(param_2,(void *)(*param_1 + (ulong)(param_3 * *(int *)((long)param_1 + 0x14))), (ulong)*(uint *)((long)param_1 + 0x14)); } else { memset(param_2,0,(ulong)*(uint *)((long)param_1 + 0x14)); } return; }
13,653
get_dynamic
eloqsql/mysys/array.c
void get_dynamic(DYNAMIC_ARRAY *array, void *element, uint idx) { if (idx >= array->elements) { DBUG_PRINT("warning",("To big array idx: %d, array size is %d", idx,array->elements)); bzero(element,array->size_of_element); return; } memcpy(element,array->buffer+idx*array->size_of_element, (size_t) array->size_of_element); }
O3
c
get_dynamic: pushq %rbp movq %rsp, %rbp cmpl %edx, 0x8(%rdi) jbe 0x32eb2 movl 0x14(%rdi), %eax imull %eax, %edx addq (%rdi), %rdx movq %rsi, %rdi movq %rdx, %rsi movq %rax, %rdx popq %rbp jmp 0x24290 movl 0x14(%rdi), %edx movq %rsi, %rdi xorl %esi, %esi popq %rbp jmp 0x241e0
get_dynamic: push rbp mov rbp, rsp cmp [rdi+8], edx jbe short loc_32EB2 mov eax, [rdi+14h] imul edx, eax add rdx, [rdi] mov rdi, rsi mov rsi, rdx mov rdx, rax pop rbp jmp _memcpy loc_32EB2: mov edx, [rdi+14h] mov rdi, rsi xor esi, esi pop rbp jmp _memset
long long get_dynamic(long long a1, long long a2, unsigned int a3) { if ( *(_DWORD *)(a1 + 8) <= a3 ) return memset(a2, 0LL, *(unsigned int *)(a1 + 20)); else return memcpy(a2, *(_QWORD *)a1 + *(_DWORD *)(a1 + 20) * a3); }
get_dynamic: PUSH RBP MOV RBP,RSP CMP dword ptr [RDI + 0x8],EDX JBE 0x00132eb2 MOV EAX,dword ptr [RDI + 0x14] IMUL EDX,EAX ADD RDX,qword ptr [RDI] MOV RDI,RSI MOV RSI,RDX MOV RDX,RAX POP RBP JMP 0x00124290 LAB_00132eb2: MOV EDX,dword ptr [RDI + 0x14] MOV RDI,RSI XOR ESI,ESI POP RBP JMP 0x001241e0
void get_dynamic(long *param_1,void *param_2,uint param_3) { if (param_3 < *(uint *)(param_1 + 1)) { memcpy(param_2,(void *)((ulong)(param_3 * *(uint *)((long)param_1 + 0x14)) + *param_1), (ulong)*(uint *)((long)param_1 + 0x14)); return; } memset(param_2,0,(ulong)*(uint *)((long)param_1 + 0x14)); return; }
13,654
ma_bitmap_free_full_pages
eloqsql/storage/maria/ma_bitmap.c
my_bool _ma_bitmap_free_full_pages(MARIA_HA *info, const uchar *extents, uint count) { MARIA_FILE_BITMAP *bitmap= &info->s->bitmap; my_bool res; DBUG_ENTER("_ma_bitmap_free_full_pages"); for (; count--; extents+= ROW_EXTENT_SIZE) { pgcache_page_no_t page= uint5korr(extents); uint page_count= (uint2korr(extents + ROW_EXTENT_PAGE_SIZE) & ~START_EXTENT_BIT); if (!(page_count & TAIL_BIT)) { if (page == 0 && page_count == 0) continue; /* Not used extent */ if (pagecache_delete_pages(info->s->pagecache, &info->dfile, page, page_count, PAGECACHE_LOCK_WRITE, 1)) DBUG_RETURN(1); mysql_mutex_lock(&bitmap->bitmap_lock); res= _ma_bitmap_reset_full_page_bits(info, bitmap, page, page_count); mysql_mutex_unlock(&bitmap->bitmap_lock); if (res) DBUG_RETURN(1); } } DBUG_RETURN(0); }
O0
c
ma_bitmap_free_full_pages: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax addq $0xa10, %rax # imm = 0xA10 movq %rax, -0x28(%rbp) movl -0x1c(%rbp), %eax movl %eax, %ecx addl $-0x1, %ecx movl %ecx, -0x1c(%rbp) cmpl $0x0, %eax je 0x635bb movq -0x18(%rbp), %rdi callq 0x635d0 movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movzwl 0x5(%rax), %eax andl $0xffffbfff, %eax # imm = 0xFFFFBFFF movl %eax, -0x3c(%rbp) movl -0x3c(%rbp), %eax andl $0x8000, %eax # imm = 0x8000 cmpl $0x0, %eax jne 0x635a8 cmpq $0x0, -0x38(%rbp) jne 0x63518 cmpl $0x0, -0x3c(%rbp) jne 0x63518 jmp 0x635aa movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x600(%rax), %rdi movq -0x10(%rbp), %rsi addq $0x470, %rsi # imm = 0x470 movq -0x38(%rbp), %rdx movl -0x3c(%rbp), %ecx movl $0x4, %r8d movl $0x1, %r9d callq 0x9d440 cmpb $0x0, %al je 0x63555 jmp 0x6354f movb $0x1, -0x1(%rbp) jmp 0x635c1 movq -0x28(%rbp), %rdi addq $0x88, %rdi leaq 0xf5eff(%rip), %rsi # 0x159466 movl $0xb31, %edx # imm = 0xB31 callq 0x61210 movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x38(%rbp), %rdx movl -0x3c(%rbp), %ecx callq 0x62a10 movb %al, -0x29(%rbp) movq -0x28(%rbp), %rdi addq $0x88, %rdi callq 0x614c0 cmpb $0x0, -0x29(%rbp) je 0x635a6 jmp 0x635a0 movb $0x1, -0x1(%rbp) jmp 0x635c1 jmp 0x635a8 jmp 0x635aa movq -0x18(%rbp), %rax addq $0x7, %rax movq %rax, -0x18(%rbp) jmp 0x634c4 jmp 0x635bd movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x40, %rsp popq %rbp retq nopw (%rax,%rax)
_ma_bitmap_free_full_pages: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov rax, [rbp+var_10] mov rax, [rax] add rax, 0A10h mov [rbp+var_28], rax loc_634C4: mov eax, [rbp+var_1C] mov ecx, eax add ecx, 0FFFFFFFFh mov [rbp+var_1C], ecx cmp eax, 0 jz loc_635BB mov rdi, [rbp+var_18] call uint5korr_1 mov [rbp+var_38], rax mov rax, [rbp+var_18] movzx eax, word ptr [rax+5] and eax, 0FFFFBFFFh mov [rbp+var_3C], eax mov eax, [rbp+var_3C] and eax, 8000h cmp eax, 0 jnz loc_635A8 cmp [rbp+var_38], 0 jnz short loc_63518 cmp [rbp+var_3C], 0 jnz short loc_63518 jmp loc_635AA loc_63518: mov rax, [rbp+var_10] mov rax, [rax] mov rdi, [rax+600h] mov rsi, [rbp+var_10] add rsi, 470h mov rdx, [rbp+var_38] mov ecx, [rbp+var_3C] mov r8d, 4 mov r9d, 1 call pagecache_delete_pages cmp al, 0 jz short loc_63555 jmp short $+2 loc_6354F: mov [rbp+var_1], 1 jmp short loc_635C1 loc_63555: mov rdi, [rbp+var_28] add rdi, 88h lea rsi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0B31h call inline_mysql_mutex_lock_7 mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] mov rdx, [rbp+var_38] mov ecx, [rbp+var_3C] call _ma_bitmap_reset_full_page_bits mov [rbp+var_29], al mov rdi, [rbp+var_28] add rdi, 88h call inline_mysql_mutex_unlock_7 cmp [rbp+var_29], 0 jz short loc_635A6 jmp short $+2 loc_635A0: mov [rbp+var_1], 1 jmp short loc_635C1 loc_635A6: jmp short $+2 loc_635A8: jmp short $+2 loc_635AA: mov rax, [rbp+var_18] add rax, 7 mov [rbp+var_18], rax jmp loc_634C4 loc_635BB: jmp short $+2 loc_635BD: mov [rbp+var_1], 0 loc_635C1: mov al, [rbp+var_1] add rsp, 40h pop rbp retn
char ma_bitmap_free_full_pages(long long *a1, long long a2, int a3) { int v5; // [rsp+4h] [rbp-3Ch] unsigned long long v6; // [rsp+8h] [rbp-38h] char v7; // [rsp+17h] [rbp-29h] long long v8; // [rsp+18h] [rbp-28h] v8 = *a1 + 2576; while ( a3-- ) { v6 = uint5korr_1(a2); v5 = *(_WORD *)(a2 + 5) & 0xBFFF; if ( (*(_WORD *)(a2 + 5) & 0x8000) == 0 && (v6 || (*(_WORD *)(a2 + 5) & 0xBFFF) != 0) ) { if ( (unsigned __int8)pagecache_delete_pages( *(_QWORD *)(*a1 + 1536), a1 + 142, v6, *(_WORD *)(a2 + 5) & 0xBFFF, 4LL, 1LL) ) return 1; inline_mysql_mutex_lock_7( v8 + 136, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0xB31u); v7 = ma_bitmap_reset_full_page_bits(a1, v8, v6, v5); inline_mysql_mutex_unlock_7(v8 + 136); if ( v7 ) return 1; } a2 += 7LL; } return 0; }
_ma_bitmap_free_full_pages: 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],EDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] ADD RAX,0xa10 MOV qword ptr [RBP + -0x28],RAX LAB_001634c4: MOV EAX,dword ptr [RBP + -0x1c] MOV ECX,EAX ADD ECX,-0x1 MOV dword ptr [RBP + -0x1c],ECX CMP EAX,0x0 JZ 0x001635bb MOV RDI,qword ptr [RBP + -0x18] CALL 0x001635d0 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX + 0x5] AND EAX,0xffffbfff MOV dword ptr [RBP + -0x3c],EAX MOV EAX,dword ptr [RBP + -0x3c] AND EAX,0x8000 CMP EAX,0x0 JNZ 0x001635a8 CMP qword ptr [RBP + -0x38],0x0 JNZ 0x00163518 CMP dword ptr [RBP + -0x3c],0x0 JNZ 0x00163518 JMP 0x001635aa LAB_00163518: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + 0x600] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x470 MOV RDX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x3c] MOV R8D,0x4 MOV R9D,0x1 CALL 0x0019d440 CMP AL,0x0 JZ 0x00163555 JMP 0x0016354f LAB_0016354f: MOV byte ptr [RBP + -0x1],0x1 JMP 0x001635c1 LAB_00163555: MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x88 LEA RSI,[0x259466] MOV EDX,0xb31 CALL 0x00161210 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x3c] CALL 0x00162a10 MOV byte ptr [RBP + -0x29],AL MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x88 CALL 0x001614c0 CMP byte ptr [RBP + -0x29],0x0 JZ 0x001635a6 JMP 0x001635a0 LAB_001635a0: MOV byte ptr [RBP + -0x1],0x1 JMP 0x001635c1 LAB_001635a6: JMP 0x001635a8 LAB_001635a8: JMP 0x001635aa LAB_001635aa: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x7 MOV qword ptr [RBP + -0x18],RAX JMP 0x001634c4 LAB_001635bb: JMP 0x001635bd LAB_001635bd: MOV byte ptr [RBP + -0x1],0x0 LAB_001635c1: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x40 POP RBP RET
int1 _ma_bitmap_free_full_pages(long *param_1,long param_2,int param_3) { ushort uVar1; long lVar2; char cVar3; long lVar4; int local_24; long local_20; lVar2 = *param_1; local_24 = param_3; local_20 = param_2; do { if (local_24 == 0) { return 0; } lVar4 = uint5korr(local_20); uVar1 = *(ushort *)(local_20 + 5); if (((uVar1 & 0x8000) == 0) && ((lVar4 != 0 || ((uVar1 & 0xbfff) != 0)))) { cVar3 = pagecache_delete_pages (*(int8 *)(*param_1 + 0x600),param_1 + 0x8e,lVar4,uVar1 & 0xbfff,4,1); if (cVar3 != '\0') { return 1; } inline_mysql_mutex_lock (lVar2 + 0xa98,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0xb31); cVar3 = _ma_bitmap_reset_full_page_bits(param_1,lVar2 + 0xa10,lVar4,uVar1 & 0xbfff); inline_mysql_mutex_unlock(lVar2 + 0xa98); if (cVar3 != '\0') { return 1; } } local_20 = local_20 + 7; local_24 = local_24 + -1; } while( true ); }
13,655
ma_write_keypage
eloqsql/storage/maria/ma_page.c
my_bool _ma_write_keypage(MARIA_PAGE *page, enum pagecache_page_lock lock, int level) { MARIA_SHARE *share= page->info->s; uint block_size= share->block_size; uchar *buff= page->buff; my_bool res; MARIA_PINNED_PAGE page_link; DBUG_ENTER("_ma_write_keypage"); /* The following ensures that for transactional tables we have logged all changes that changes the page size (as the logging code sets page->org_size) */ DBUG_ASSERT(!share->now_transactional || page->size == page->org_size); #ifdef EXTRA_DEBUG /* Safety check */ { uint page_length, nod_flag; page_length= _ma_get_page_used(share, buff); nod_flag= _ma_test_if_nod(share, buff); DBUG_ASSERT(page->size == page_length); DBUG_ASSERT(page->size <= share->max_index_block_size); DBUG_ASSERT(page->flag == _ma_get_keypage_flag(share, buff)); if (page->pos < share->base.keystart || page->pos+block_size > share->state.state.key_file_length || (page->pos & (maria_block_size-1))) { DBUG_PRINT("error",("Trying to write inside key status region: " "key_start: %lu length: %lu page_pos: %lu", (long) share->base.keystart, (long) share->state.state.key_file_length, (long) page->pos)); my_errno=EINVAL; DBUG_ASSERT(0); DBUG_RETURN(1); } DBUG_PRINT("page",("write page at: %lu",(ulong) (page->pos / block_size))); DBUG_DUMP("buff", buff, page_length); DBUG_ASSERT(page_length >= share->keypage_header + nod_flag + page->keyinfo->minlength || maria_in_recovery); } #endif /* Verify that keynr is correct */ DBUG_ASSERT(_ma_get_keynr(share, buff) == page->keyinfo->key_nr); #if defined(EXTRA_DEBUG) && defined(HAVE_valgrind) && defined(WHEN_DEBUGGING) MEM_CHECK_DEFINED(buff, block_size); #endif page_cleanup(share, page); { PAGECACHE_BLOCK_LINK **link; enum pagecache_page_pin pin; if (lock == PAGECACHE_LOCK_LEFT_WRITELOCKED) { pin= PAGECACHE_PIN_LEFT_PINNED; link= &page_link.link; } else if (lock == PAGECACHE_LOCK_WRITE_UNLOCK) { pin= PAGECACHE_UNPIN; /* We unlock this page so link should be 0 to prevent it usage even accidentally */ link= NULL; } else { pin= PAGECACHE_PIN; link= &page_link.link; } res= pagecache_write(share->pagecache, &share->kfile, (pgcache_page_no_t) (page->pos / block_size), level, buff, share->page_type, lock, pin, PAGECACHE_WRITE_DELAY, link, LSN_IMPOSSIBLE); } if (lock == PAGECACHE_LOCK_WRITE) { /* It was not locked before, we have to unlock it when we unpin pages */ page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK; page_link.changed= 1; push_dynamic(&page->info->pinned_pages, (void*) &page_link); } DBUG_RETURN(res); }
O0
c
ma_write_keypage: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x90, %rsp movq %rdi, -0x18(%rbp) movl %esi, -0x1c(%rbp) movl %edx, -0x20(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movl 0x7bc(%rax), %eax movl %eax, -0x2c(%rbp) movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x38(%rbp) jmp 0x99571 jmp 0x99573 jmp 0x99575 jmp 0x99577 jmp 0x99579 cmpl $0x2, -0x1c(%rbp) jne 0x99590 movl $0x0, -0x64(%rbp) leaq -0x58(%rbp), %rax movq %rax, -0x60(%rbp) jmp 0x995b8 cmpl $0x6, -0x1c(%rbp) jne 0x995a7 movl $0x3, -0x64(%rbp) movq $0x0, -0x60(%rbp) jmp 0x995b6 movl $0x2, -0x64(%rbp) leaq -0x58(%rbp), %rax movq %rax, -0x60(%rbp) jmp 0x995b8 movq -0x28(%rbp), %rax movq 0x600(%rax), %rdi movq -0x28(%rbp), %rsi addq $0x750, %rsi # imm = 0x750 movq -0x18(%rbp), %rax movq 0x18(%rax), %rax movl -0x2c(%rbp), %ecx xorl %edx, %edx divq %rcx movq %rax, %rdx movl -0x20(%rbp), %ecx movq -0x38(%rbp), %r8 movq -0x28(%rbp), %rax movl 0x7d4(%rax), %r9d movl -0x1c(%rbp), %ebx movl -0x64(%rbp), %r11d movq -0x60(%rbp), %r10 movq -0x28(%rbp), %rax movq 0x600(%rax), %rax movl 0x80(%rax), %eax xorl %r14d, %r14d xorl %r14d, %r14d movl %ebx, (%rsp) movl %r11d, 0x8(%rsp) movl $0x0, 0x10(%rsp) movq %r10, 0x18(%rsp) movq $0x0, 0x20(%rsp) movl $0x0, 0x28(%rsp) movl %eax, 0x30(%rsp) callq 0x3cb70 movb %al, -0x39(%rbp) cmpl $0x4, -0x1c(%rbp) jne 0x9966f movl $0x6, -0x50(%rbp) movb $0x1, -0x48(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rdi addq $0x2e8, %rdi # imm = 0x2E8 leaq -0x58(%rbp), %rsi callq 0xda300 jmp 0x99671 movb -0x39(%rbp), %al movb %al, -0x65(%rbp) movb -0x65(%rbp), %al addq $0x90, %rsp popq %rbx popq %r14 popq %rbp retq nopw %cs:(%rax,%rax)
_ma_write_keypage: push rbp mov rbp, rsp push r14 push rbx sub rsp, 90h mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_20], edx mov rax, [rbp+var_18] mov rax, [rax] mov rax, [rax] mov [rbp+var_28], rax mov rax, [rbp+var_28] mov eax, [rax+7BCh] mov [rbp+var_2C], eax mov rax, [rbp+var_18] mov rax, [rax+10h] mov [rbp+var_38], rax jmp short $+2 loc_99571: jmp short $+2 loc_99573: jmp short $+2 loc_99575: jmp short $+2 loc_99577: jmp short $+2 loc_99579: cmp [rbp+var_1C], 2 jnz short loc_99590 mov [rbp+var_64], 0 lea rax, [rbp+var_58] mov [rbp+var_60], rax jmp short loc_995B8 loc_99590: cmp [rbp+var_1C], 6 jnz short loc_995A7 mov [rbp+var_64], 3 mov [rbp+var_60], 0 jmp short loc_995B6 loc_995A7: mov [rbp+var_64], 2 lea rax, [rbp+var_58] mov [rbp+var_60], rax loc_995B6: jmp short $+2 loc_995B8: mov rax, [rbp+var_28] mov rdi, [rax+600h] mov rsi, [rbp+var_28] add rsi, 750h mov rax, [rbp+var_18] mov rax, [rax+18h] mov ecx, [rbp+var_2C] xor edx, edx div rcx mov rdx, rax mov ecx, [rbp+var_20] mov r8, [rbp+var_38] mov rax, [rbp+var_28] mov r9d, [rax+7D4h] mov ebx, [rbp+var_1C] mov r11d, [rbp+var_64] mov r10, [rbp+var_60] mov rax, [rbp+var_28] mov rax, [rax+600h] mov eax, [rax+80h] xor r14d, r14d xor r14d, r14d mov [rsp+0A0h+var_A0], ebx mov [rsp+0A0h+var_98], r11d mov [rsp+0A0h+var_90], 0 mov [rsp+0A0h+var_88], r10 mov [rsp+0A0h+var_80], 0 mov [rsp+0A0h+var_78], 0 mov [rsp+0A0h+var_70], eax call pagecache_write_part mov [rbp+var_39], al cmp [rbp+var_1C], 4 jnz short loc_9966F mov [rbp+var_50], 6 mov [rbp+var_48], 1 mov rax, [rbp+var_18] mov rdi, [rax] add rdi, 2E8h lea rsi, [rbp+var_58] call insert_dynamic loc_9966F: jmp short $+2 loc_99671: mov al, [rbp+var_39] mov [rbp+var_65], al mov al, [rbp+var_65] add rsp, 90h pop rbx pop r14 pop rbp retn
char ma_write_keypage(long long **a1, unsigned int a2, int a3) { char v3; // al char v5[8]; // [rsp+48h] [rbp-58h] BYREF int v6; // [rsp+50h] [rbp-50h] char v7; // [rsp+58h] [rbp-48h] char v8; // [rsp+67h] [rbp-39h] long long *v9; // [rsp+68h] [rbp-38h] unsigned int v10; // [rsp+74h] [rbp-2Ch] long long v11; // [rsp+78h] [rbp-28h] int v12; // [rsp+80h] [rbp-20h] unsigned int v13; // [rsp+84h] [rbp-1Ch] long long **v14; // [rsp+88h] [rbp-18h] v14 = a1; v13 = a2; v12 = a3; v11 = **a1; v10 = *(_DWORD *)(v11 + 1980); v9 = a1[2]; if ( a2 == 2 ) { v3 = pagecache_write_part( *(_QWORD **)(v11 + 1536), v11 + 1872, (unsigned long long)v14[3] / v10, v12, (long long)v9, *(_DWORD *)(v11 + 2004), 2u, 0, 0, v5, 0LL, 0, *(_DWORD *)(*(_QWORD *)(v11 + 1536) + 128LL)); } else if ( v13 == 6 ) { v3 = pagecache_write_part( *(_QWORD **)(v11 + 1536), v11 + 1872, (unsigned long long)v14[3] / v10, v12, (long long)v9, *(_DWORD *)(v11 + 2004), 6u, 3u, 0, 0LL, 0LL, 0, *(_DWORD *)(*(_QWORD *)(v11 + 1536) + 128LL)); } else { v3 = pagecache_write_part( *(_QWORD **)(v11 + 1536), v11 + 1872, (unsigned long long)v14[3] / v10, v12, (long long)v9, *(_DWORD *)(v11 + 2004), v13, 2u, 0, v5, 0LL, 0, *(_DWORD *)(*(_QWORD *)(v11 + 1536) + 128LL)); } v8 = v3; if ( v13 == 4 ) { v6 = 6; v7 = 1; insert_dynamic(*v14 + 93, v5); } return v8; }
_ma_write_keypage: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x90 MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV dword ptr [RBP + -0x20],EDX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x7bc] MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x38],RAX JMP 0x00199571 LAB_00199571: JMP 0x00199573 LAB_00199573: JMP 0x00199575 LAB_00199575: JMP 0x00199577 LAB_00199577: JMP 0x00199579 LAB_00199579: CMP dword ptr [RBP + -0x1c],0x2 JNZ 0x00199590 MOV dword ptr [RBP + -0x64],0x0 LEA RAX,[RBP + -0x58] MOV qword ptr [RBP + -0x60],RAX JMP 0x001995b8 LAB_00199590: CMP dword ptr [RBP + -0x1c],0x6 JNZ 0x001995a7 MOV dword ptr [RBP + -0x64],0x3 MOV qword ptr [RBP + -0x60],0x0 JMP 0x001995b6 LAB_001995a7: MOV dword ptr [RBP + -0x64],0x2 LEA RAX,[RBP + -0x58] MOV qword ptr [RBP + -0x60],RAX LAB_001995b6: JMP 0x001995b8 LAB_001995b8: MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX + 0x600] MOV RSI,qword ptr [RBP + -0x28] ADD RSI,0x750 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x18] MOV ECX,dword ptr [RBP + -0x2c] XOR EDX,EDX DIV RCX MOV RDX,RAX MOV ECX,dword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x28] MOV R9D,dword ptr [RAX + 0x7d4] MOV EBX,dword ptr [RBP + -0x1c] MOV R11D,dword ptr [RBP + -0x64] MOV R10,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x600] MOV EAX,dword ptr [RAX + 0x80] XOR R14D,R14D XOR R14D,R14D MOV dword ptr [RSP],EBX MOV dword ptr [RSP + 0x8],R11D MOV dword ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],R10 MOV qword ptr [RSP + 0x20],0x0 MOV dword ptr [RSP + 0x28],0x0 MOV dword ptr [RSP + 0x30],EAX CALL 0x0013cb70 MOV byte ptr [RBP + -0x39],AL CMP dword ptr [RBP + -0x1c],0x4 JNZ 0x0019966f MOV dword ptr [RBP + -0x50],0x6 MOV byte ptr [RBP + -0x48],0x1 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX] ADD RDI,0x2e8 LEA RSI,[RBP + -0x58] CALL 0x001da300 LAB_0019966f: JMP 0x00199671 LAB_00199671: MOV AL,byte ptr [RBP + -0x39] MOV byte ptr [RBP + -0x65],AL MOV AL,byte ptr [RBP + -0x65] ADD RSP,0x90 POP RBX POP R14 POP RBP RET
int1 _ma_write_keypage(long *param_1,int param_2,int4 param_3) { int4 local_6c; int1 *local_68; int1 local_60 [8]; int4 local_58; int1 local_50; int1 local_41; long local_40; uint local_34; long local_30; int4 local_28; int local_24; long *local_20; local_30 = *(long *)*param_1; local_34 = *(uint *)(local_30 + 0x7bc); local_40 = param_1[2]; if (param_2 == 2) { local_6c = 0; local_68 = local_60; } else if (param_2 == 6) { local_6c = 3; local_68 = (int1 *)0x0; } else { local_6c = 2; local_68 = local_60; } local_28 = param_3; local_24 = param_2; local_20 = param_1; local_41 = pagecache_write_part (*(int8 *)(local_30 + 0x600),local_30 + 0x750, (ulong)param_1[3] / (ulong)local_34,param_3,local_40, *(int4 *)(local_30 + 0x7d4),param_2,local_6c,0,local_68,0,0, *(int4 *)(*(long *)(local_30 + 0x600) + 0x80)); if (local_24 == 4) { local_58 = 6; local_50 = 1; insert_dynamic(*local_20 + 0x2e8,local_60); } return local_41; }
13,656
minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
monkey531[P]llama/common/minja.hpp
static std::string error_location_suffix(const std::string & source, size_t pos) { auto get_line = [&](size_t line) { auto start = source.begin(); for (size_t i = 1; i < line; ++i) { start = std::find(start, source.end(), '\n') + 1; } auto end = std::find(start, source.end(), '\n'); return std::string(start, end); }; auto start = source.begin(); auto end = source.end(); auto it = start + pos; auto line = std::count(start, it, '\n') + 1; auto max_line = std::count(start, end, '\n') + 1; auto col = pos - std::string(start, it).rfind('\n'); std::ostringstream out; out << " at row " << line << ", column " << col << ":\n"; if (line > 1) out << get_line(line - 1) << "\n"; out << get_line(line) << "\n"; out << std::string(col - 1, ' ') << "^\n"; if (line < max_line) out << get_line(line + 1) << "\n"; return out.str(); }
O0
cpp
minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long): subq $0xb8, %rsp movq %rdi, 0x8(%rsp) movq %rdi, %rax movq %rax, 0x10(%rsp) movq %rdi, 0xb0(%rsp) movq %rsi, 0xa8(%rsp) movq %rdx, 0xa0(%rsp) movq 0xa8(%rsp), %rax movq %rax, 0x18(%rsp) movq (%rax), %rdi callq 0x5a3a0 movq %rax, 0x98(%rsp) movq $0x1, 0x90(%rsp) movq 0x90(%rsp), %rax cmpq 0xa0(%rsp), %rax jae 0x1d821e movq 0x18(%rsp), %rax movq 0x98(%rsp), %rcx movq %rcx, 0x78(%rsp) movq (%rax), %rdi callq 0x5b280 movq %rax, 0x70(%rsp) movb $0xa, 0x6f(%rsp) movq 0x78(%rsp), %rdi movq 0x70(%rsp), %rsi leaq 0x6f(%rsp), %rdx callq 0x146030 movq %rax, 0x80(%rsp) leaq 0x80(%rsp), %rdi movl $0x1, %esi callq 0x10eb50 movq %rax, 0x88(%rsp) movq 0x88(%rsp), %rax movq %rax, 0x98(%rsp) movq 0x90(%rsp), %rax addq $0x1, %rax movq %rax, 0x90(%rsp) jmp 0x1d8185 movq 0x18(%rsp), %rax movq 0x98(%rsp), %rcx movq %rcx, 0x58(%rsp) movq (%rax), %rdi callq 0x5b280 movq %rax, 0x50(%rsp) movb $0xa, 0x4f(%rsp) movq 0x58(%rsp), %rdi movq 0x50(%rsp), %rsi leaq 0x4f(%rsp), %rdx callq 0x146030 movq %rax, 0x60(%rsp) movq 0x98(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x38(%rsp) leaq 0x37(%rsp), %rdi movq %rdi, (%rsp) callq 0x5b0f0 movq 0x8(%rsp), %rdi movq (%rsp), %rcx movq 0x40(%rsp), %rsi movq 0x38(%rsp), %rdx callq 0xe72e0 jmp 0x1d829a leaq 0x37(%rsp), %rdi callq 0x5b570 movq 0x10(%rsp), %rax addq $0xb8, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) leaq 0x37(%rsp), %rdi callq 0x5b570 movq 0x28(%rsp), %rdi callq 0x5abc0 nopw %cs:(%rax,%rax)
_ZZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmENK3$_0clB5cxx11Em_0: sub rsp, 0B8h mov [rsp+0B8h+var_B0], rdi mov rax, rdi mov [rsp+0B8h+var_A8], rax mov [rsp+0B8h+var_8], rdi mov [rsp+0B8h+var_10], rsi mov [rsp+0B8h+var_18], rdx mov rax, [rsp+0B8h+var_10] mov [rsp+0B8h+var_A0], rax mov rdi, [rax] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void) mov [rsp+0B8h+var_20], rax mov [rsp+0B8h+var_28], 1 loc_1D8185: mov rax, [rsp+0B8h+var_28] cmp rax, [rsp+0B8h+var_18] jnb loc_1D821E mov rax, [rsp+0B8h+var_A0] mov rcx, [rsp+0B8h+var_20] mov [rsp+0B8h+var_40], rcx mov rdi, [rax] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void) mov [rsp+0B8h+var_48], rax mov [rsp+0B8h+var_49], 0Ah mov rdi, [rsp+0B8h+var_40] mov rsi, [rsp+0B8h+var_48] lea rdx, [rsp+0B8h+var_49] call _ZSt4findIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcET_SB_SB_RKT0_; std::find<__gnu_cxx::__normal_iterator<char const*,std::string>,char>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,char const&) mov [rsp+0B8h+var_38], rax lea rdi, [rsp+0B8h+var_38] mov esi, 1 call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEplEl; __gnu_cxx::__normal_iterator<char const*,std::string>::operator+(long) mov [rsp+0B8h+var_30], rax mov rax, [rsp+0B8h+var_30] mov [rsp+0B8h+var_20], rax mov rax, [rsp+0B8h+var_28] add rax, 1 mov [rsp+0B8h+var_28], rax jmp loc_1D8185 loc_1D821E: mov rax, [rsp+0B8h+var_A0] mov rcx, [rsp+0B8h+var_20] mov [rsp+0B8h+var_60], rcx mov rdi, [rax] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void) mov [rsp+0B8h+var_68], rax mov [rsp+0B8h+var_69], 0Ah mov rdi, [rsp+0B8h+var_60] mov rsi, [rsp+0B8h+var_68] lea rdx, [rsp+0B8h+var_69] call _ZSt4findIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcET_SB_SB_RKT0_; std::find<__gnu_cxx::__normal_iterator<char const*,std::string>,char>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,char const&) mov [rsp+0B8h+var_58], rax mov rax, [rsp+0B8h+var_20] mov [rsp+0B8h+var_78], rax mov rax, [rsp+0B8h+var_58] mov [rsp+0B8h+var_80], rax lea rdi, [rsp+0B8h+var_81] mov [rsp+0B8h+var_B8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rsp+0B8h+var_B0] mov rcx, [rsp+0B8h+var_B8] mov rsi, [rsp+0B8h+var_78] mov rdx, [rsp+0B8h+var_80] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IN9__gnu_cxx17__normal_iteratorIPKcS4_EEvEET_SB_RKS3_; std::string::basic_string<__gnu_cxx::__normal_iterator<char const*,std::string>,void>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<char> const&) jmp short $+2 loc_1D829A: lea rdi, [rsp+0B8h+var_81] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rax, [rsp+0B8h+var_A8] add rsp, 0B8h retn mov rcx, rax mov eax, edx mov [rsp+arg_20], rcx mov [rsp+arg_1C], eax lea rdi, [rsp+arg_2F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rsp+arg_20] call __Unwind_Resume
long long minja::error_location_suffix(std::string const&,unsigned long)::$_0::operator()[abi:cxx11]( long long a1, _QWORD *a2, unsigned long long a3) { long long v3; // rsi char v5; // [rsp+37h] [rbp-81h] BYREF long long v6; // [rsp+38h] [rbp-80h] long long v7; // [rsp+40h] [rbp-78h] char v8; // [rsp+4Fh] [rbp-69h] BYREF long long v9; // [rsp+50h] [rbp-68h] long long v10; // [rsp+58h] [rbp-60h] long long v11; // [rsp+60h] [rbp-58h] char v12; // [rsp+6Fh] [rbp-49h] BYREF long long v13; // [rsp+70h] [rbp-48h] long long v14; // [rsp+78h] [rbp-40h] long long v15; // [rsp+80h] [rbp-38h] BYREF long long v16; // [rsp+88h] [rbp-30h] unsigned long long i; // [rsp+90h] [rbp-28h] long long v18; // [rsp+98h] [rbp-20h] unsigned long long v19; // [rsp+A0h] [rbp-18h] _QWORD *v20; // [rsp+A8h] [rbp-10h] long long v21; // [rsp+B0h] [rbp-8h] v21 = a1; v20 = a2; v19 = a3; v18 = std::string::begin(*a2); for ( i = 1LL; i < v19; ++i ) { v14 = v18; v13 = std::string::end(*a2); v12 = 10; v15 = std::find<__gnu_cxx::__normal_iterator<char const*,std::string>,char>(v14, v13, (long long)&v12); v16 = __gnu_cxx::__normal_iterator<char const*,std::string>::operator+(&v15, 1LL); v18 = v16; } v10 = v18; v9 = std::string::end(*a2); v8 = 10; v3 = v9; v11 = std::find<__gnu_cxx::__normal_iterator<char const*,std::string>,char>(v10, v9, (long long)&v8); v7 = v18; v6 = v11; std::allocator<char>::allocator(&v5, v3); std::string::basic_string<__gnu_cxx::__normal_iterator<char const*,std::string>,void>(a1, v7, v6, (long long)&v5); std::allocator<char>::~allocator(&v5); return a1; }
13,657
minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
monkey531[P]llama/common/minja.hpp
static std::string error_location_suffix(const std::string & source, size_t pos) { auto get_line = [&](size_t line) { auto start = source.begin(); for (size_t i = 1; i < line; ++i) { start = std::find(start, source.end(), '\n') + 1; } auto end = std::find(start, source.end(), '\n'); return std::string(start, end); }; auto start = source.begin(); auto end = source.end(); auto it = start + pos; auto line = std::count(start, it, '\n') + 1; auto max_line = std::count(start, end, '\n') + 1; auto col = pos - std::string(start, it).rfind('\n'); std::ostringstream out; out << " at row " << line << ", column " << col << ":\n"; if (line > 1) out << get_line(line - 1) << "\n"; out << get_line(line) << "\n"; out << std::string(col - 1, ' ') << "^\n"; if (line < max_line) out << get_line(line + 1) << "\n"; return out.str(); }
O2
cpp
minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx movq (%rsi), %rax movq (%rax), %r14 pushq $0x1 popq %rbp leaq 0x6(%rsp), %r13 movq (%r12), %rax movq (%rax), %rsi addq 0x8(%rax), %rsi cmpq %r15, %rbp jae 0x9fa23 movb $0xa, 0x6(%rsp) movq %r14, %rdi movq %r13, %rdx callq 0x721fc movq %rax, %r14 incq %r14 incq %rbp jmp 0x9f9f8 leaq 0x7(%rsp), %rdx movb $0xa, (%rdx) movq %r14, %rdi callq 0x721fc leaq 0x10(%rbx), %rcx movq %rcx, (%rbx) movq %rbx, %rdi movq %r14, %rsi movq %rax, %rdx callq 0x5265a movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmENK3$_0clB5cxx11Em_0: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r15, rdx mov r12, rsi mov rbx, rdi mov rax, [rsi] mov r14, [rax] push 1 pop rbp lea r13, [rsp+38h+var_32] loc_9F9F8: mov rax, [r12] mov rsi, [rax] add rsi, [rax+8] cmp rbp, r15 jnb short loc_9FA23 mov [rsp+38h+var_32], 0Ah mov rdi, r14 mov rdx, r13 call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag) mov r14, rax inc r14 inc rbp jmp short loc_9F9F8 loc_9FA23: lea rdx, [rsp+38h+var_31] mov byte ptr [rdx], 0Ah mov rdi, r14 call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag) lea rcx, [rbx+10h] mov [rbx], rcx mov rdi, rbx mov rsi, r14 mov rdx, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag) mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_QWORD * minja::error_location_suffix(std::string const&,unsigned long)::$_0::operator()[abi:cxx11]( _QWORD *a1, _BYTE ***a2, unsigned long long a3) { long long v3; // rax _BYTE *v6; // r14 unsigned long long i; // rbp long long v8; // rsi _BYTE *v9; // rax _WORD v11[25]; // [rsp+0h] [rbp-32h] BYREF v11[0] = HIWORD(v3); v6 = **a2; for ( i = 1LL; ; ++i ) { v8 = (long long)&(**a2)[(_QWORD)(*a2)[1]]; if ( i >= a3 ) break; LOBYTE(v11[0]) = 10; v6 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>( (long long)v6, v8, (char *)v11) + 1; } HIBYTE(v11[0]) = 10; v9 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>( (long long)v6, v8, (char *)v11 + 1); *a1 = a1 + 2; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)a1, v6, (long long)v9); return a1; }
operator()[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,RDX MOV R12,RSI MOV RBX,RDI MOV RAX,qword ptr [RSI] MOV R14,qword ptr [RAX] PUSH 0x1 POP RBP LEA R13,[RSP + 0x6] LAB_0019f9f8: MOV RAX,qword ptr [R12] MOV RSI,qword ptr [RAX] ADD RSI,qword ptr [RAX + 0x8] CMP RBP,R15 JNC 0x0019fa23 MOV byte ptr [RSP + 0x6],0xa MOV RDI,R14 MOV RDX,R13 CALL 0x001721fc MOV R14,RAX INC R14 INC RBP JMP 0x0019f9f8 LAB_0019fa23: LEA RDX,[RSP + 0x7] MOV byte ptr [RDX],0xa MOV RDI,R14 CALL 0x001721fc LEA RCX,[RBX + 0x10] MOV qword ptr [RBX],RCX MOV RDI,RBX MOV RSI,R14 MOV RDX,RAX CALL 0x0015265a MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* operator()[abi:cxx11](unsigned long) const */ ulong minja::error_location_suffix(std::__cxx11::string_const&,unsigned_long)::$_0:: operator()[abi_cxx11_(ulong param_1) { int8 in_RAX; long lVar1; int8 uVar2; ulong in_RDX; ulong uVar3; long *in_RSI; long lVar4; int8 uStack_38; lVar1 = *(long *)*in_RSI; uStack_38 = in_RAX; for (uVar3 = 1; lVar4 = *(long *)*in_RSI + ((long *)*in_RSI)[1], uVar3 < in_RDX; uVar3 = uVar3 + 1 ) { uStack_38._0_7_ = CONCAT16(10,(int6)uStack_38); lVar1 = std:: __find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>> (lVar1,lVar4,(long)&uStack_38 + 6); lVar1 = lVar1 + 1; } uStack_38 = CONCAT17(10,(int7)uStack_38); uVar2 = std:: __find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>> (lVar1,lVar4); *(ulong *)param_1 = param_1 + 0x10; std::__cxx11::string::_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>> (param_1,lVar1,uVar2); return param_1; }
13,658
ggml_backend_cpu_aarch64_buffer_set_tensor(ggml_backend_buffer*, ggml_tensor*, void const*, unsigned long, unsigned long)
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp
static void ggml_backend_cpu_aarch64_buffer_set_tensor(ggml_backend_buffer_t buffer, struct ggml_tensor * tensor, const void * data, size_t offset, size_t size) { GGML_ASSERT(offset == 0); GGML_ASSERT(size == ggml_nbytes(tensor)); auto tensor_traits = (ggml::cpu::aarch64::tensor_traits_base *) tensor->extra; auto OK = tensor_traits->repack(tensor, data, size); GGML_ASSERT(OK == 0); GGML_UNUSED(buffer); }
O2
cpp
ggml_backend_cpu_aarch64_buffer_set_tensor(ggml_backend_buffer*, ggml_tensor*, void const*, unsigned long, unsigned long): pushq %r15 pushq %r14 pushq %rbx testq %rcx, %rcx jne 0x2b51c movq %r8, %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rsi, %rdi callq 0x80b0 cmpq %rbx, %rax jne 0x2b538 movq 0x140(%r15), %rdi movq (%rdi), %rax movq %r15, %rsi movq %r14, %rdx movq %rbx, %rcx callq *0x20(%rax) testl %eax, %eax jne 0x2b554 popq %rbx popq %r14 popq %r15 retq leaq 0xb2f3(%rip), %rdi # 0x36816 leaq 0x828f(%rip), %rdx # 0x337b9 leaq 0xb813(%rip), %rcx # 0x36d44 movl $0x1032, %esi # imm = 0x1032 jmp 0x2b56e leaq 0xb2d7(%rip), %rdi # 0x36816 leaq 0x8273(%rip), %rdx # 0x337b9 leaq 0xb803(%rip), %rcx # 0x36d50 movl $0x1033, %esi # imm = 0x1033 jmp 0x2b56e leaq 0xb2bb(%rip), %rdi # 0x36816 leaq 0x8257(%rip), %rdx # 0x337b9 leaq 0xb803(%rip), %rcx # 0x36d6c movl $0x1038, %esi # imm = 0x1038 xorl %eax, %eax callq 0x8b10
_ZL42ggml_backend_cpu_aarch64_buffer_set_tensorP19ggml_backend_bufferP11ggml_tensorPKvmm: push r15 push r14 push rbx test rcx, rcx jnz short loc_2B51C mov rbx, r8 mov r14, rdx mov r15, rsi mov rdi, rsi call _ggml_nbytes cmp rax, rbx jnz short loc_2B538 mov rdi, [r15+140h] mov rax, [rdi] mov rsi, r15 mov rdx, r14 mov rcx, rbx call qword ptr [rax+20h] test eax, eax jnz short loc_2B554 pop rbx pop r14 pop r15 retn loc_2B51C: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aOffset0; "offset == 0" mov esi, 1032h jmp short loc_2B56E loc_2B538: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSizeGgmlNbytes; "size == ggml_nbytes(tensor)" mov esi, 1033h jmp short loc_2B56E loc_2B554: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aOk0; "OK == 0" mov esi, 1038h loc_2B56E: xor eax, eax call _ggml_abort
long long ggml_backend_cpu_aarch64_buffer_set_tensor( long long a1, long long a2, long long a3, long long a4, long long a5) { long long result; // rax if ( a4 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp", 4146LL, "GGML_ASSERT(%s) failed", "offset == 0"); return ggml_aarch64_get_optimal_repack_type("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp"); } if ( ggml_nbytes(a2) != a5 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp", 4147LL, "GGML_ASSERT(%s) failed", "size == ggml_nbytes(tensor)"); return ggml_aarch64_get_optimal_repack_type("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp"); } result = (*(long long ( **)(_QWORD, long long, long long, long long))(**(_QWORD **)(a2 + 320) + 32LL))( *(_QWORD *)(a2 + 320), a2, a3, a5); if ( (_DWORD)result ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp", 4152LL, "GGML_ASSERT(%s) failed", "OK == 0"); return ggml_aarch64_get_optimal_repack_type("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp"); } return result; }
ggml_backend_cpu_aarch64_buffer_set_tensor: PUSH R15 PUSH R14 PUSH RBX TEST RCX,RCX JNZ 0x0012b51c MOV RBX,R8 MOV R14,RDX MOV R15,RSI MOV RDI,RSI CALL 0x001080b0 CMP RAX,RBX JNZ 0x0012b538 MOV RDI,qword ptr [R15 + 0x140] MOV RAX,qword ptr [RDI] MOV RSI,R15 MOV RDX,R14 MOV RCX,RBX CALL qword ptr [RAX + 0x20] TEST EAX,EAX JNZ 0x0012b554 POP RBX POP R14 POP R15 RET LAB_0012b51c: LEA RDI,[0x136816] LEA RDX,[0x1337b9] LEA RCX,[0x136d44] MOV ESI,0x1032 JMP 0x0012b56e LAB_0012b538: LEA RDI,[0x136816] LEA RDX,[0x1337b9] LEA RCX,[0x136d50] MOV ESI,0x1033 JMP 0x0012b56e LAB_0012b554: LEA RDI,[0x136816] LEA RDX,[0x1337b9] LEA RCX,[0x136d6c] MOV ESI,0x1038 LAB_0012b56e: XOR EAX,EAX CALL 0x00108b10
/* ggml_backend_cpu_aarch64_buffer_set_tensor(ggml_backend_buffer*, ggml_tensor*, void const*, unsigned long, unsigned long) */ void ggml_backend_cpu_aarch64_buffer_set_tensor (ggml_backend_buffer *param_1,ggml_tensor *param_2,void *param_3,ulong param_4, ulong param_5) { int iVar1; ulong uVar2; char *pcVar3; int8 uVar4; if (param_4 == 0) { uVar2 = ggml_nbytes(param_2); if (uVar2 == param_5) { iVar1 = (**(code **)(**(long **)(param_2 + 0x140) + 0x20)) (*(long **)(param_2 + 0x140),param_2,param_3,param_5); if (iVar1 == 0) { return; } pcVar3 = "OK == 0"; uVar4 = 0x1038; } else { pcVar3 = "size == ggml_nbytes(tensor)"; uVar4 = 0x1033; } } else { pcVar3 = "offset == 0"; uVar4 = 0x1032; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp" ,uVar4,"GGML_ASSERT(%s) failed",pcVar3); }
13,659
ma_pvio_register_callback
eloqsql/libmariadb/libmariadb/ma_pvio.c
int ma_pvio_register_callback(my_bool register_callback, void (*callback_function)(int mode, MYSQL *mysql, const uchar *buffer, size_t length)) { LIST *list; if (!callback_function) return 1; /* plugin will unregister in it's deinit function */ if (register_callback) { list= (LIST *)malloc(sizeof(LIST)); list->data= (void *)callback_function; pvio_callback= list_add(pvio_callback, list); } else /* unregister callback function */ { LIST *p= pvio_callback; while (p) { if (p->data == callback_function) { list_delete(pvio_callback, p); break; } p= p->next; } } return 0; }
O3
c
ma_pvio_register_callback: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx testq %rsi, %rsi je 0x24d4e movq %rsi, %r14 testb %dil, %dil je 0x24d5a movl $0x18, %edi callq 0x177c0 movq %r14, 0x10(%rax) leaq 0x281bc(%rip), %rbx # 0x4cef8 movq (%rbx), %rdi movq %rax, %rsi callq 0x242f4 movq %rax, (%rbx) xorl %ebx, %ebx jmp 0x24d53 movl $0x1, %ebx movl %ebx, %eax popq %rbx popq %r14 popq %rbp retq leaq 0x28197(%rip), %rax # 0x4cef8 movq (%rax), %rdi xorl %ebx, %ebx testq %rdi, %rdi je 0x24d53 movq %rdi, %rsi cmpq %r14, 0x10(%rsi) je 0x24d7f movq 0x8(%rsi), %rsi testq %rsi, %rsi jne 0x24d6e jmp 0x24d53 callq 0x24328 jmp 0x24d53 nop
ma_pvio_register_callback: push rbp mov rbp, rsp push r14 push rbx test rsi, rsi jz short loc_24D4E mov r14, rsi test dil, dil jz short loc_24D5A mov edi, 18h call _malloc mov [rax+10h], r14 lea rbx, pvio_callback mov rdi, [rbx] mov rsi, rax call list_add mov [rbx], rax xor ebx, ebx jmp short loc_24D53 loc_24D4E: mov ebx, 1 loc_24D53: mov eax, ebx pop rbx pop r14 pop rbp retn loc_24D5A: lea rax, pvio_callback mov rdi, [rax] xor ebx, ebx test rdi, rdi jz short loc_24D53 mov rsi, rdi loc_24D6E: cmp [rsi+10h], r14 jz short loc_24D7F mov rsi, [rsi+8] test rsi, rsi jnz short loc_24D6E jmp short loc_24D53 loc_24D7F: call list_delete jmp short loc_24D53
long long ma_pvio_register_callback(char a1, long long a2) { _QWORD *v3; // rax unsigned int v4; // ebx long long *v6; // rsi if ( a2 ) { if ( a1 ) { v3 = (_QWORD *)malloc(24LL); v3[2] = a2; pvio_callback = list_add(pvio_callback, v3); return 0; } else { v4 = 0; if ( pvio_callback ) { v6 = pvio_callback; while ( v6[2] != a2 ) { v6 = (long long *)v6[1]; if ( !v6 ) return v4; } list_delete(pvio_callback, v6); } } } else { return 1; } return v4; }
ma_pvio_register_callback: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX TEST RSI,RSI JZ 0x00124d4e MOV R14,RSI TEST DIL,DIL JZ 0x00124d5a MOV EDI,0x18 CALL 0x001177c0 MOV qword ptr [RAX + 0x10],R14 LEA RBX,[0x14cef8] MOV RDI,qword ptr [RBX] MOV RSI,RAX CALL 0x001242f4 MOV qword ptr [RBX],RAX XOR EBX,EBX JMP 0x00124d53 LAB_00124d4e: MOV EBX,0x1 LAB_00124d53: MOV EAX,EBX POP RBX POP R14 POP RBP RET LAB_00124d5a: LEA RAX,[0x14cef8] MOV RDI,qword ptr [RAX] XOR EBX,EBX TEST RDI,RDI JZ 0x00124d53 MOV RSI,RDI LAB_00124d6e: CMP qword ptr [RSI + 0x10],R14 JZ 0x00124d7f MOV RSI,qword ptr [RSI + 0x8] TEST RSI,RSI JNZ 0x00124d6e JMP 0x00124d53 LAB_00124d7f: CALL 0x00124328 JMP 0x00124d53
int8 ma_pvio_register_callback(char param_1,long param_2) { long *plVar1; void *pvVar2; int8 uVar3; long lVar4; if (param_2 == 0) { uVar3 = 1; } else if (param_1 == '\0') { uVar3 = 0; lVar4 = pvio_callback; if (pvio_callback != 0) { do { if (*(long *)(lVar4 + 0x10) == param_2) { list_delete(); return 0; } plVar1 = (long *)(lVar4 + 8); lVar4 = *plVar1; } while (*plVar1 != 0); } } else { pvVar2 = malloc(0x18); *(long *)((long)pvVar2 + 0x10) = param_2; pvio_callback = list_add(pvio_callback,pvVar2); uVar3 = 0; } return uVar3; }
13,660
parse_cpu_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512])
monkey531[P]llama/common/common.cpp
bool parse_cpu_range(const std::string & range, bool (&boolmask)[GGML_MAX_N_THREADS]) { size_t dash_loc = range.find('-'); if (dash_loc == std::string::npos) { LOG_ERR("Format of CPU range is invalid! Expected [<start>]-[<end>].\n"); return false; } size_t start_i; size_t end_i; if (dash_loc == 0) { start_i = 0; } else { start_i = std::stoull(range.substr(0, dash_loc)); if (start_i >= GGML_MAX_N_THREADS) { LOG_ERR("Start index out of bounds!\n"); return false; } } if (dash_loc == range.length() - 1) { end_i = GGML_MAX_N_THREADS - 1; } else { end_i = std::stoull(range.substr(dash_loc + 1)); if (end_i >= GGML_MAX_N_THREADS) { LOG_ERR("End index out of bounds!\n"); return false; } } for (size_t i = start_i; i <= end_i; i++) { boolmask[i] = true; } return true; }
O2
cpp
parse_cpu_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rsi, %rbx movq %rdi, %r15 pushq $0x2d popq %rsi xorl %edx, %edx callq 0x24b90 movq %rax, %r12 testq %rax, %rax je 0x5f250 cmpq $-0x1, %r12 jne 0x5f255 leaq 0xae272(%rip), %rax # 0x10d4a8 cmpl $0x0, (%rax) js 0x5f32b callq 0xa1f9e leaq 0x5f9e8(%rip), %rdx # 0xbec33 jmp 0x5f309 movq %r12, %r14 jmp 0x5f2a7 movq %rsp, %r14 movq %r14, %rdi movq %r15, %rsi xorl %edx, %edx movq %r12, %rcx callq 0x24950 pushq $0xa popq %rdx movq %r14, %rdi xorl %esi, %esi callq 0x644f9 movq %rax, %r14 movq %rsp, %rdi callq 0x25298 cmpq $0x200, %r14 # imm = 0x200 jb 0x5f2a7 leaq 0xae218(%rip), %rax # 0x10d4a8 cmpl $0x0, (%rax) js 0x5f32b callq 0xa1f9e leaq 0x5f9cb(%rip), %rdx # 0xbec70 jmp 0x5f309 movq 0x8(%r15), %rax decq %rax movl $0x1ff, %r13d # imm = 0x1FF cmpq %rax, %r12 je 0x5f322 incq %r12 movq %rsp, %r13 pushq $-0x1 popq %rcx movq %r13, %rdi movq %r15, %rsi movq %r12, %rdx callq 0x24950 pushq $0xa popq %rdx movq %r13, %rdi xorl %esi, %esi callq 0x644f9 movq %rax, %r13 movq %rsp, %rdi callq 0x25298 cmpq $0x200, %r13 # imm = 0x200 jb 0x5f322 leaq 0xae1b0(%rip), %rax # 0x10d4a8 cmpl $0x0, (%rax) js 0x5f32b callq 0xa1f9e leaq 0x5f983(%rip), %rdx # 0xbec8c xorl %ebx, %ebx pushq $0x4 popq %rsi movq %rax, %rdi xorl %eax, %eax callq 0xa2036 jmp 0x5f32d movb $0x1, (%rbx,%r14) incq %r14 cmpq %r13, %r14 jbe 0x5f31a movb $0x1, %bl jmp 0x5f32d xorl %ebx, %ebx movl %ebx, %eax addq $0x20, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq jmp 0x5f33f movq %rax, %rbx movq %rsp, %rdi callq 0x25298 movq %rbx, %rdi callq 0x25010
_Z15parse_cpu_rangeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b: push r15 push r14 push r13 push r12 push rbx sub rsp, 20h mov rbx, rsi mov r15, rdi push 2Dh ; '-' pop rsi xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) mov r12, rax test rax, rax jz short loc_5F250 cmp r12, 0FFFFFFFFFFFFFFFFh jnz short loc_5F255 lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js loc_5F32B call _Z15common_log_mainv; common_log_main(void) lea rdx, aFormatOfCpuRan; "Format of CPU range is invalid! Expecte"... jmp loc_5F309 loc_5F250: mov r14, r12 jmp short loc_5F2A7 loc_5F255: mov r14, rsp mov rdi, r14 mov rsi, r15 xor edx, edx mov rcx, r12 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) push 0Ah pop rdx mov rdi, r14 xor esi, esi call _ZNSt7__cxx116stoullERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi; std::stoull(std::string const&,ulong *,int) mov r14, rax mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() cmp r14, 200h jb short loc_5F2A7 lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js loc_5F32B call _Z15common_log_mainv; common_log_main(void) lea rdx, aStartIndexOutO; "Start index out of bounds!\n" jmp short loc_5F309 loc_5F2A7: mov rax, [r15+8] dec rax mov r13d, 1FFh cmp r12, rax jz short loc_5F322 inc r12 mov r13, rsp push 0FFFFFFFFFFFFFFFFh pop rcx mov rdi, r13 mov rsi, r15 mov rdx, r12 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) push 0Ah pop rdx mov rdi, r13 xor esi, esi call _ZNSt7__cxx116stoullERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi; std::stoull(std::string const&,ulong *,int) mov r13, rax mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() cmp r13, 200h jb short loc_5F322 lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_5F32B call _Z15common_log_mainv; common_log_main(void) lea rdx, aEndIndexOutOfB; "End index out of bounds!\n" loc_5F309: xor ebx, ebx push 4 pop rsi mov rdi, rax xor eax, eax call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) jmp short loc_5F32D loc_5F31A: mov byte ptr [rbx+r14], 1 inc r14 loc_5F322: cmp r14, r13 jbe short loc_5F31A mov bl, 1 jmp short loc_5F32D loc_5F32B: xor ebx, ebx loc_5F32D: mov eax, ebx add rsp, 20h pop rbx pop r12 pop r13 pop r14 pop r15 retn jmp short $+2 loc_5F33F: mov rbx, rax mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long parse_cpu_range(long long a1, long long a2) { unsigned int v2; // ebx long long v3; // rax long long v4; // r12 int v5; // eax int v6; // ecx int v7; // r8d int v8; // r9d const char *v9; // rdx unsigned long long v10; // r14 unsigned long long v11; // r13 _BYTE v13[72]; // [rsp+0h] [rbp-48h] BYREF v2 = a2; v3 = std::string::find(a1, 45LL, 0LL); v4 = v3; if ( v3 ) { if ( v3 == -1 ) { if ( common_log_verbosity_thold >= 0 ) { v5 = common_log_main(); v9 = "Format of CPU range is invalid! Expected [<start>]-[<end>].\n"; LABEL_13: v2 = 0; common_log_add(v5, 4, (_DWORD)v9, v6, v7, v8); return v2; } return 0; } std::string::substr(v13, a1, 0LL, v3); v10 = std::stoull(v13, 0LL, 10LL); std::string::~string(v13); if ( v10 >= 0x200 ) { if ( common_log_verbosity_thold >= 0 ) { v5 = common_log_main(); v9 = "Start index out of bounds!\n"; goto LABEL_13; } return 0; } } else { v10 = 0LL; } v11 = 511LL; if ( v4 != *(_QWORD *)(a1 + 8) - 1LL ) { std::string::substr(v13, a1, v4 + 1, -1LL); v11 = std::stoull(v13, 0LL, 10LL); std::string::~string(v13); if ( v11 >= 0x200 ) { if ( common_log_verbosity_thold >= 0 ) { v5 = common_log_main(); v9 = "End index out of bounds!\n"; goto LABEL_13; } return 0; } } while ( v10 <= v11 ) *(_BYTE *)(a2 + v10++) = 1; LOBYTE(v2) = 1; return v2; }
parse_cpu_range: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x20 MOV RBX,RSI MOV R15,RDI PUSH 0x2d POP RSI XOR EDX,EDX CALL 0x00124b90 MOV R12,RAX TEST RAX,RAX JZ 0x0015f250 CMP R12,-0x1 JNZ 0x0015f255 LEA RAX,[0x20d4a8] CMP dword ptr [RAX],0x0 JS 0x0015f32b CALL 0x001a1f9e LEA RDX,[0x1bec33] JMP 0x0015f309 LAB_0015f250: MOV R14,R12 JMP 0x0015f2a7 LAB_0015f255: MOV R14,RSP MOV RDI,R14 MOV RSI,R15 XOR EDX,EDX MOV RCX,R12 CALL 0x00124950 LAB_0015f268: PUSH 0xa POP RDX MOV RDI,R14 XOR ESI,ESI CALL 0x001644f9 LAB_0015f275: MOV R14,RAX MOV RDI,RSP CALL 0x00125298 CMP R14,0x200 JC 0x0015f2a7 LEA RAX,[0x20d4a8] CMP dword ptr [RAX],0x0 JS 0x0015f32b CALL 0x001a1f9e LEA RDX,[0x1bec70] JMP 0x0015f309 LAB_0015f2a7: MOV RAX,qword ptr [R15 + 0x8] DEC RAX MOV R13D,0x1ff CMP R12,RAX JZ 0x0015f322 INC R12 MOV R13,RSP PUSH -0x1 POP RCX MOV RDI,R13 MOV RSI,R15 MOV RDX,R12 CALL 0x00124950 LAB_0015f2d0: PUSH 0xa POP RDX MOV RDI,R13 XOR ESI,ESI CALL 0x001644f9 LAB_0015f2dd: MOV R13,RAX MOV RDI,RSP CALL 0x00125298 CMP R13,0x200 JC 0x0015f322 LEA RAX,[0x20d4a8] CMP dword ptr [RAX],0x0 JS 0x0015f32b CALL 0x001a1f9e LEA RDX,[0x1bec8c] LAB_0015f309: XOR EBX,EBX PUSH 0x4 POP RSI MOV RDI,RAX XOR EAX,EAX CALL 0x001a2036 JMP 0x0015f32d LAB_0015f31a: MOV byte ptr [RBX + R14*0x1],0x1 INC R14 LAB_0015f322: CMP R14,R13 JBE 0x0015f31a MOV BL,0x1 JMP 0x0015f32d LAB_0015f32b: XOR EBX,EBX LAB_0015f32d: MOV EAX,EBX ADD RSP,0x20 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* parse_cpu_range(std::__cxx11::string const&, bool (&) [512]) */ ulong parse_cpu_range(string *param_1,bool *param_2) { long lVar1; int8 uVar2; ulong uVar3; char *pcVar4; ulong uVar5; string asStack_48 [32]; lVar1 = std::__cxx11::string::find((char)param_1,0x2d); if (lVar1 == 0) { uVar3 = 0; LAB_0015f2a7: uVar5 = 0x1ff; if (lVar1 != *(long *)(param_1 + 8) + -1) { std::__cxx11::string::substr((ulong)asStack_48,(ulong)param_1); /* try { // try from 0015f2d0 to 0015f2dc has its CatchHandler @ 0015f33d */ uVar5 = std::__cxx11::stoull(asStack_48,(ulong *)0x0,10); std::__cxx11::string::~string(asStack_48); if (0x1ff < uVar5) { if (common_log_verbosity_thold < 0) goto LAB_0015f32b; uVar2 = common_log_main(); pcVar4 = "End index out of bounds!\n"; goto LAB_0015f309; } } for (; uVar3 <= uVar5; uVar3 = uVar3 + 1) { param_2[uVar3] = true; } uVar3 = CONCAT71((int7)((ulong)param_2 >> 8),1); } else { if (lVar1 == -1) { if (common_log_verbosity_thold < 0) { LAB_0015f32b: uVar3 = 0; goto LAB_0015f32d; } uVar2 = common_log_main(); pcVar4 = "Format of CPU range is invalid! Expected [<start>]-[<end>].\n"; } else { std::__cxx11::string::substr((ulong)asStack_48,(ulong)param_1); /* try { // try from 0015f268 to 0015f274 has its CatchHandler @ 0015f33f */ uVar3 = std::__cxx11::stoull(asStack_48,(ulong *)0x0,10); std::__cxx11::string::~string(asStack_48); if (uVar3 < 0x200) goto LAB_0015f2a7; if (common_log_verbosity_thold < 0) goto LAB_0015f32b; uVar2 = common_log_main(); pcVar4 = "Start index out of bounds!\n"; } LAB_0015f309: uVar3 = 0; common_log_add(uVar2,4,pcVar4); } LAB_0015f32d: return uVar3 & 0xffffffff; }
13,661
testing::internal::PrettyUnitTestResultPrinter::PrintFailedTests(testing::UnitTest const&)
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc
void PrettyUnitTestResultPrinter::PrintFailedTests(const UnitTest& unit_test) { const int failed_test_count = unit_test.failed_test_count(); ColoredPrintf(GTestColor::kRed, "[ FAILED ] "); printf("%s, listed below:\n", FormatTestCount(failed_test_count).c_str()); for (int i = 0; i < unit_test.total_test_suite_count(); ++i) { const TestSuite& test_suite = *unit_test.GetTestSuite(i); if (!test_suite.should_run() || (test_suite.failed_test_count() == 0)) { continue; } for (int j = 0; j < test_suite.total_test_count(); ++j) { const TestInfo& test_info = *test_suite.GetTestInfo(j); if (!test_info.should_run() || !test_info.result()->Failed()) { continue; } ColoredPrintf(GTestColor::kRed, "[ FAILED ] "); printf("%s.%s", test_suite.name(), test_info.name()); PrintFullTestCommentIfPresent(test_info); printf("\n"); } } printf("\n%2d FAILED %s\n", failed_test_count, failed_test_count == 1 ? "TEST" : "TESTS"); }
O1
cpp
testing::internal::PrettyUnitTestResultPrinter::PrintFailedTests(testing::UnitTest const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %r14 movq 0x40(%rdi), %rdi callq 0x2086c movl %eax, %ebx leaq 0x1c4b1(%rip), %rsi # 0x435be movl $0x1, %edi xorl %eax, %eax callq 0x26396 leaq 0x1b3d5(%rip), %rdx # 0x424f5 leaq 0x1b7e1(%rip), %rcx # 0x42908 leaq 0x8(%rsp), %r15 movq %r15, %rdi movl %ebx, 0x4(%rsp) movl %ebx, %esi callq 0x26bc4 movq (%r15), %rsi leaq 0x1c4ad(%rip), %rdi # 0x435f1 xorl %eax, %eax callq 0x9080 movq (%r15), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x27165 movq 0x18(%rsp), %rsi incq %rsi callq 0x94c0 movq 0x40(%r14), %rcx movq 0xb8(%rcx), %rax movq 0xc0(%rcx), %rdx subq %rax, %rdx shrq $0x3, %rdx testl %edx, %edx jle 0x272b4 leaq 0x1c477(%rip), %r12 # 0x43604 xorl %ebx, %ebx movq 0xd0(%rcx), %rdx movq 0xd8(%rcx), %rcx subq %rdx, %rcx shrq $0x2, %rcx movslq %ecx, %rcx cmpq %rcx, %rbx jge 0x271b8 cmpl $0x0, (%rdx,%rbx,4) js 0x271b8 movq (%rax,%rbx,8), %r13 jmp 0x271bb xorl %r13d, %r13d cmpb $0x1, 0x70(%r13) jne 0x2728c movq %r13, %rdi callq 0x208bc testl %eax, %eax je 0x2728c movq 0x30(%r13), %rax movq 0x38(%r13), %rcx subq %rax, %rcx shrq $0x3, %rcx testl %ecx, %ecx jle 0x2728c xorl %r15d, %r15d movq 0x48(%r13), %rcx movq 0x50(%r13), %rdx subq %rcx, %rdx shrq $0x2, %rdx movslq %edx, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF cmpq %rsi, %r15 jge 0x27210 movl (%rcx,%r15,4), %edx testl %edx, %edx js 0x2721c movl %edx, %ecx movq (%rax,%rcx,8), %rbp jmp 0x2721e xorl %ebp, %ebp cmpb $0x1, 0x80(%rbp) jne 0x2726e leaq 0x90(%rbp), %rdi callq 0x241b8 testb %al, %al je 0x2726e movl $0x1, %edi leaq 0x1c37b(%rip), %rsi # 0x435be xorl %eax, %eax callq 0x26396 movq 0x8(%r13), %rsi movq 0x20(%rbp), %rdx movq %r12, %rdi xorl %eax, %eax callq 0x9080 movq %rbp, %rdi callq 0x26f0d movl $0xa, %edi callq 0x97a0 incq %r15 movq 0x30(%r13), %rax movq 0x38(%r13), %rcx subq %rax, %rcx shrq $0x3, %rcx movslq %ecx, %rcx cmpq %rcx, %r15 jl 0x271f0 incq %rbx movq 0x40(%r14), %rcx movq 0xb8(%rcx), %rax movq 0xc0(%rcx), %rdx subq %rax, %rdx shrq $0x3, %rdx movslq %edx, %rdx cmpq %rdx, %rbx jl 0x2718f movl 0x4(%rsp), %esi cmpl $0x1, %esi leaq 0x1c358(%rip), %rax # 0x4361a leaq 0x1c356(%rip), %rdx # 0x4361f cmoveq %rax, %rdx leaq 0x1c336(%rip), %rdi # 0x4360a xorl %eax, %eax callq 0x9080 addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN7testing8internal27PrettyUnitTestResultPrinter16PrintFailedTestsERKNS_8UnitTestE: push rbp push r15 push r14 push r13 push r12; __int64 push rbx; int sub rsp, 28h mov r14, rdi mov rdi, [rdi+40h]; this call _ZNK7testing8internal12UnitTestImpl17failed_test_countEv; testing::internal::UnitTestImpl::failed_test_count(void) mov ebx, eax lea rsi, aFailed_0; "[ FAILED ] " mov edi, 1 xor eax, eax call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...) lea rdx, aDeathtestPasse+36h; int lea rcx, aAlsoRunDisable+12h; int lea r15, [rsp+58h+var_50] mov rdi, r15; int mov [rsp+58h+var_54], ebx mov esi, ebx; int call _ZN7testingL19FormatCountableNounB5cxx11EiPKcS1_; testing::FormatCountableNoun(int,char const*,char const*) mov rsi, [r15] lea rdi, aSListedBelow; "%s, listed below:\n" xor eax, eax call _printf mov rdi, [r15]; void * lea rax, [rsp+58h+var_40] cmp rdi, rax jz short loc_27165 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_27165: mov rcx, [r14+40h] mov rax, [rcx+0B8h] mov rdx, [rcx+0C0h] sub rdx, rax shr rdx, 3 test edx, edx jle loc_272B4 lea r12, aSS_0; "%s.%s" xor ebx, ebx loc_2718F: mov rdx, [rcx+0D0h] mov rcx, [rcx+0D8h] sub rcx, rdx shr rcx, 2 movsxd rcx, ecx cmp rbx, rcx jge short loc_271B8 cmp dword ptr [rdx+rbx*4], 0 js short loc_271B8 mov r13, [rax+rbx*8] jmp short loc_271BB loc_271B8: xor r13d, r13d loc_271BB: cmp byte ptr [r13+70h], 1 jnz loc_2728C mov rdi, r13; this call _ZNK7testing9TestSuite17failed_test_countEv; testing::TestSuite::failed_test_count(void) test eax, eax jz loc_2728C mov rax, [r13+30h] mov rcx, [r13+38h] sub rcx, rax shr rcx, 3 test ecx, ecx jle loc_2728C xor r15d, r15d loc_271F0: mov rcx, [r13+48h] mov rdx, [r13+50h] sub rdx, rcx shr rdx, 2 movsxd rsi, edx mov edx, 0FFFFFFFFh cmp r15, rsi jge short loc_27210 mov edx, [rcx+r15*4] loc_27210: test edx, edx js short loc_2721C mov ecx, edx mov rbp, [rax+rcx*8] jmp short loc_2721E loc_2721C: xor ebp, ebp loc_2721E: cmp byte ptr [rbp+80h], 1 jnz short loc_2726E lea rdi, [rbp+90h]; this call _ZNK7testing10TestResult6FailedEv; testing::TestResult::Failed(void) test al, al jz short loc_2726E mov edi, 1 lea rsi, aFailed_0; "[ FAILED ] " xor eax, eax call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...) mov rsi, [r13+8] mov rdx, [rbp+20h] mov rdi, r12 xor eax, eax call _printf mov rdi, rbp call _ZN7testing8internalL29PrintFullTestCommentIfPresentERKNS_8TestInfoE; testing::internal::PrintFullTestCommentIfPresent(testing::TestInfo const&) mov edi, 0Ah call _putchar loc_2726E: inc r15 mov rax, [r13+30h] mov rcx, [r13+38h] sub rcx, rax shr rcx, 3 movsxd rcx, ecx cmp r15, rcx jl loc_271F0 loc_2728C: inc rbx mov rcx, [r14+40h] mov rax, [rcx+0B8h] mov rdx, [rcx+0C0h] sub rdx, rax shr rdx, 3 movsxd rdx, edx cmp rbx, rdx jl loc_2718F loc_272B4: mov esi, [rsp+58h+var_54] cmp esi, 1 lea rax, aTest_0; "TEST" lea rdx, aTests; "TESTS" cmovz rdx, rax lea rdi, a2dFailedS; "\n%2d FAILED %s\n" xor eax, eax call _printf add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long testing::internal::PrettyUnitTestResultPrinter::PrintFailedTests( testing::internal::UnitTestImpl **this, const testing::UnitTest *a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { int v10; // ebx long long v11; // rdx long long v12; // rcx long long v13; // r8 long long v14; // r9 __m128 v15; // xmm4 __m128 v16; // xmm5 testing::internal::UnitTestImpl *v17; // rcx long long v18; // rax long long v19; // rbx long long v20; // rdx long long v21; // r13 long long v22; // rax long long v23; // r15 long long v24; // rcx int v25; // edx long long v26; // rbp long long v27; // rdx long long v28; // rcx long long v29; // r8 long long v30; // r9 __m128 v31; // xmm4 __m128 v32; // xmm5 const char *v33; // rsi const char *v34; // rdx char v36; // [rsp+0h] [rbp-58h] char v37; // [rsp+0h] [rbp-58h] int v38; // [rsp+4h] [rbp-54h] char *v39; // [rsp+8h] [rbp-50h] BYREF long long v40; // [rsp+18h] [rbp-40h] BYREF v10 = testing::internal::UnitTestImpl::failed_test_count(this[8]); testing::internal::ColoredPrintf( 1, (long long)"[ FAILED ] ", v11, v12, v13, v14, a3, a4, a5, a6, v15, v16, a9, a10, v36); v38 = v10; testing::FormatCountableNoun[abi:cxx11]((long long)&v39, v10, "test", "tests"); printf("%s, listed below:\n", v39); if ( v39 != (char *)&v40 ) operator delete(v39, v40 + 1); v17 = this[8]; v18 = *((_QWORD *)v17 + 23); if ( (int)((unsigned long long)(*((_QWORD *)v17 + 24) - v18) >> 3) > 0 ) { v19 = 0LL; do { v20 = *((_QWORD *)v17 + 26); if ( v19 >= (int)((unsigned long long)(*((_QWORD *)v17 + 27) - v20) >> 2) || *(int *)(v20 + 4 * v19) < 0 ) v21 = 0LL; else v21 = *(_QWORD *)(v18 + 8 * v19); if ( *(_BYTE *)(v21 + 112) == 1 ) { if ( (unsigned int)testing::TestSuite::failed_test_count((testing::TestSuite *)v21) ) { v22 = *(_QWORD *)(v21 + 48); if ( (int)((unsigned long long)(*(_QWORD *)(v21 + 56) - v22) >> 3) > 0 ) { v23 = 0LL; do { v24 = *(_QWORD *)(v21 + 72); v25 = -1; if ( v23 < (int)((unsigned long long)(*(_QWORD *)(v21 + 80) - v24) >> 2) ) v25 = *(_DWORD *)(v24 + 4 * v23); if ( v25 < 0 ) v26 = 0LL; else v26 = *(_QWORD *)(v22 + 8LL * (unsigned int)v25); if ( *(_BYTE *)(v26 + 128) == 1 && (unsigned __int8)testing::TestResult::Failed((testing::TestResult *)(v26 + 144)) ) { testing::internal::ColoredPrintf( 1, (long long)"[ FAILED ] ", v27, v28, v29, v30, a3, a4, a5, a6, v31, v32, a9, a10, v37); v33 = *(const char **)(v21 + 8); printf("%s.%s", v33, *(const char **)(v26 + 32)); testing::internal::PrintFullTestCommentIfPresent( (testing::internal *)v26, (const testing::TestInfo *)v33); putchar(10LL); } ++v23; v22 = *(_QWORD *)(v21 + 48); } while ( v23 < (int)((unsigned long long)(*(_QWORD *)(v21 + 56) - v22) >> 3) ); } } } ++v19; v17 = this[8]; v18 = *((_QWORD *)v17 + 23); } while ( v19 < (int)((unsigned long long)(*((_QWORD *)v17 + 24) - v18) >> 3) ); } v34 = "TESTS"; if ( v38 == 1 ) v34 = "TEST"; return printf("\n%2d FAILED %s\n", v38, v34); }
PrintFailedTests: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,RDI MOV RDI,qword ptr [RDI + 0x40] CALL 0x0012086c MOV EBX,EAX LEA RSI,[0x1435be] MOV EDI,0x1 XOR EAX,EAX CALL 0x00126396 LEA RDX,[0x1424f5] LEA RCX,[0x142908] LEA R15,[RSP + 0x8] MOV RDI,R15 MOV dword ptr [RSP + 0x4],EBX MOV ESI,EBX CALL 0x00126bc4 MOV RSI,qword ptr [R15] LEA RDI,[0x1435f1] XOR EAX,EAX CALL 0x00109080 MOV RDI,qword ptr [R15] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x00127165 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001094c0 LAB_00127165: MOV RCX,qword ptr [R14 + 0x40] MOV RAX,qword ptr [RCX + 0xb8] MOV RDX,qword ptr [RCX + 0xc0] SUB RDX,RAX SHR RDX,0x3 TEST EDX,EDX JLE 0x001272b4 LEA R12,[0x143604] XOR EBX,EBX LAB_0012718f: MOV RDX,qword ptr [RCX + 0xd0] MOV RCX,qword ptr [RCX + 0xd8] SUB RCX,RDX SHR RCX,0x2 MOVSXD RCX,ECX CMP RBX,RCX JGE 0x001271b8 CMP dword ptr [RDX + RBX*0x4],0x0 JS 0x001271b8 MOV R13,qword ptr [RAX + RBX*0x8] JMP 0x001271bb LAB_001271b8: XOR R13D,R13D LAB_001271bb: CMP byte ptr [R13 + 0x70],0x1 JNZ 0x0012728c MOV RDI,R13 CALL 0x001208bc TEST EAX,EAX JZ 0x0012728c MOV RAX,qword ptr [R13 + 0x30] MOV RCX,qword ptr [R13 + 0x38] SUB RCX,RAX SHR RCX,0x3 TEST ECX,ECX JLE 0x0012728c XOR R15D,R15D LAB_001271f0: MOV RCX,qword ptr [R13 + 0x48] MOV RDX,qword ptr [R13 + 0x50] SUB RDX,RCX SHR RDX,0x2 MOVSXD RSI,EDX MOV EDX,0xffffffff CMP R15,RSI JGE 0x00127210 MOV EDX,dword ptr [RCX + R15*0x4] LAB_00127210: TEST EDX,EDX JS 0x0012721c MOV ECX,EDX MOV RBP,qword ptr [RAX + RCX*0x8] JMP 0x0012721e LAB_0012721c: XOR EBP,EBP LAB_0012721e: CMP byte ptr [RBP + 0x80],0x1 JNZ 0x0012726e LEA RDI,[RBP + 0x90] CALL 0x001241b8 TEST AL,AL JZ 0x0012726e MOV EDI,0x1 LEA RSI,[0x1435be] XOR EAX,EAX CALL 0x00126396 MOV RSI,qword ptr [R13 + 0x8] MOV RDX,qword ptr [RBP + 0x20] MOV RDI,R12 XOR EAX,EAX CALL 0x00109080 MOV RDI,RBP CALL 0x00126f0d MOV EDI,0xa CALL 0x001097a0 LAB_0012726e: INC R15 MOV RAX,qword ptr [R13 + 0x30] MOV RCX,qword ptr [R13 + 0x38] SUB RCX,RAX SHR RCX,0x3 MOVSXD RCX,ECX CMP R15,RCX JL 0x001271f0 LAB_0012728c: INC RBX MOV RCX,qword ptr [R14 + 0x40] MOV RAX,qword ptr [RCX + 0xb8] MOV RDX,qword ptr [RCX + 0xc0] SUB RDX,RAX SHR RDX,0x3 MOVSXD RDX,EDX CMP RBX,RDX JL 0x0012718f LAB_001272b4: MOV ESI,dword ptr [RSP + 0x4] CMP ESI,0x1 LEA RAX,[0x14361a] LEA RDX,[0x14361f] CMOVZ RDX,RAX LEA RDI,[0x14360a] XOR EAX,EAX CALL 0x00109080 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* testing::internal::PrettyUnitTestResultPrinter::PrintFailedTests(testing::UnitTest const&) */ void testing::internal::PrettyUnitTestResultPrinter::PrintFailedTests(UnitTest *param_1) { char cVar1; uint uVar2; int iVar3; long lVar4; uint uVar5; char *pcVar6; long lVar7; TestInfo *pTVar8; TestSuite *this; long lVar9; long *local_50 [2]; long local_40 [2]; uVar2 = UnitTestImpl::failed_test_count(*(UnitTestImpl **)(param_1 + 0x40)); ColoredPrintf(1,"[ FAILED ] "); FormatCountableNoun_abi_cxx11_((int)local_50,(char *)(ulong)uVar2,"test"); printf("%s, listed below:\n",local_50[0]); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } lVar4 = *(long *)(param_1 + 0x40); lVar9 = *(long *)(lVar4 + 0xb8); if (0 < (int)((ulong)(*(long *)(lVar4 + 0xc0) - lVar9) >> 3)) { lVar7 = 0; do { if ((lVar7 < (int)((ulong)(*(long *)(lVar4 + 0xd8) - *(long *)(lVar4 + 0xd0)) >> 2)) && (-1 < *(int *)(*(long *)(lVar4 + 0xd0) + lVar7 * 4))) { this = *(TestSuite **)(lVar9 + lVar7 * 8); } else { this = (TestSuite *)0x0; } if (this[0x70] == (TestSuite)0x1) { iVar3 = TestSuite::failed_test_count(this); if ((iVar3 != 0) && (lVar4 = *(long *)(this + 0x30), 0 < (int)((ulong)(*(long *)(this + 0x38) - lVar4) >> 3)) ) { lVar9 = 0; do { uVar5 = 0xffffffff; if (lVar9 < (int)((ulong)(*(long *)(this + 0x50) - *(long *)(this + 0x48)) >> 2)) { uVar5 = *(uint *)(*(long *)(this + 0x48) + lVar9 * 4); } if ((int)uVar5 < 0) { pTVar8 = (TestInfo *)0x0; } else { pTVar8 = *(TestInfo **)(lVar4 + (ulong)uVar5 * 8); } if (pTVar8[0x80] == (TestInfo)0x1) { cVar1 = TestResult::Failed((TestResult *)(pTVar8 + 0x90)); if (cVar1 != '\0') { ColoredPrintf(1,"[ FAILED ] "); printf("%s.%s",*(int8 *)(this + 8),*(int8 *)(pTVar8 + 0x20)); PrintFullTestCommentIfPresent(pTVar8); putchar(10); } } lVar9 = lVar9 + 1; lVar4 = *(long *)(this + 0x30); } while (lVar9 < (int)((ulong)(*(long *)(this + 0x38) - lVar4) >> 3)); } } lVar7 = lVar7 + 1; lVar4 = *(long *)(param_1 + 0x40); lVar9 = *(long *)(lVar4 + 0xb8); } while (lVar7 < (int)((ulong)(*(long *)(lVar4 + 0xc0) - lVar9) >> 3)); } pcVar6 = "TESTS"; if (uVar2 == 1) { pcVar6 = "TEST"; } printf("\n%2d FAILED %s\n",(ulong)uVar2,pcVar6); return; }
13,662
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>>>>>::get_codepoint()
monkey531[P]llama/common/json.hpp
int get_codepoint() { // this function only makes sense after reading `\u` JSON_ASSERT(current == 'u'); int codepoint = 0; const auto factors = { 12u, 8u, 4u, 0u }; for (const auto factor : factors) { get(); if (current >= '0' && current <= '9') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x30u) << factor); } else if (current >= 'A' && current <= 'F') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x37u) << factor); } else if (current >= 'a' && current <= 'f') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x57u) << factor); } else { return -1; } } JSON_ASSERT(0x0000 <= codepoint && codepoint <= 0xFFFF); return codepoint; }
O1
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>>>>>::get_codepoint(): pushq %rbx subq $0x10, %rsp cmpl $0x75, 0x14(%rdi) jne 0x8a880 leaq 0x14(%rdi), %rsi leaq 0xc(%rsp), %rbx movq %rbx, %rdx callq 0x1f199 movl (%rbx), %eax addq $0x10, %rsp popq %rbx retq leaq 0x8ab05(%rip), %rdi # 0x11538c leaq 0x831d5(%rip), %rdx # 0x10da63 leaq 0x8b80f(%rip), %rcx # 0x1160a4 movl $0x1d79, %esi # imm = 0x1D79 xorl %eax, %eax callq 0x1e4f0 nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv: push rbx sub rsp, 10h cmp dword ptr [rdi+14h], 75h ; 'u' jnz short loc_8A880 lea rsi, [rdi+14h] lea rbx, [rsp+18h+var_C] mov rdx, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv_cold_1; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,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_codepoint(void) [clone] mov eax, [rbx] add rsp, 10h pop rbx retn loc_8A880: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCurrentU; "current == 'u'" mov esi, 1D79h xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint( __m128i *a1, long long a2, long long a3, long long a4, long long a5, long long a6, long long a7, long long a8, long long a9) { long long v10; // rdx long long v11; // rcx long long v12; // r8 long long v13; // r9 unsigned int v14[3]; // [rsp+Ch] [rbp-Ch] BYREF if ( a1[1].m128i_i32[1] == 117 ) { 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_codepoint( a1, &a1[1].m128i_i32[1], v14); return v14[0]; } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7545LL, "GGML_ASSERT(%s) failed", "current == 'u'"); return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::next_byte_in_range( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7545LL, v10, v11, v12, v13, a7, a8, a9); } }
get_codepoint: PUSH RBX SUB RSP,0x10 CMP dword ptr [RDI + 0x14],0x75 JNZ 0x0018a880 LEA RSI,[RDI + 0x14] LEA RBX,[RSP + 0xc] MOV RDX,RBX CALL 0x0011f199 MOV EAX,dword ptr [RBX] ADD RSP,0x10 POP RBX RET LAB_0018a880: LEA RDI,[0x21538c] LEA RDX,[0x20da63] LEA RCX,[0x2160a4] MOV ESI,0x1d79 XOR EAX,EAX CALL 0x0011e4f0
/* 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 > > >::get_codepoint() */ int4 __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>>> ::get_codepoint(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) { int4 local_c; if (*(int *)(this + 0x14) == 0x75) { get_codepoint(); return local_c; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1d79, "GGML_ASSERT(%s) failed","current == \'u\'"); }
13,663
ResidualDenseBlock::calculate_mem_size()
7CodeWizard[P]stablediffusion/esrgan.hpp
size_t calculate_mem_size() { size_t mem_size = num_features * num_grow_ch * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv1_w mem_size += num_grow_ch * ggml_type_size(GGML_TYPE_F32); // conv1_b mem_size += (num_features + num_grow_ch) * num_grow_ch * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv2_w mem_size += num_grow_ch * ggml_type_size(GGML_TYPE_F32); // conv2_b mem_size += (num_features + 2 * num_grow_ch) * num_grow_ch * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv3_w mem_size += num_grow_ch * ggml_type_size(GGML_TYPE_F32); // conv3_w mem_size += (num_features + 3 * num_grow_ch) * num_grow_ch * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv4_w mem_size += num_grow_ch * ggml_type_size(GGML_TYPE_F32); // conv4_w mem_size += (num_features + 4 * num_grow_ch) * num_features * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv5_w mem_size += num_features * ggml_type_size(GGML_TYPE_F32); // conv5_w return mem_size; }
O1
cpp
ResidualDenseBlock::calculate_mem_size(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movl (%rdi), %eax imull 0x4(%rdi), %eax leal (%rax,%rax,8), %eax movslq %eax, %r15 movl $0x1, %edi callq 0x8e159 movq %rax, %r14 imulq %r15, %r14 movslq 0x4(%rbx), %r12 xorl %edi, %edi callq 0x8e159 movq %rax, %r15 imulq %r12, %r15 addq %r14, %r15 movl 0x4(%rbx), %eax movl (%rbx), %ecx addl %eax, %ecx imull %eax, %ecx leal (%rcx,%rcx,8), %eax movslq %eax, %r12 movl $0x1, %edi callq 0x8e159 movq %rax, %r14 imulq %r12, %r14 addq %r15, %r14 movslq 0x4(%rbx), %r15 xorl %edi, %edi callq 0x8e159 movq %rax, %r12 movl 0x4(%rbx), %eax leal (%rax,%rax), %ecx addl (%rbx), %ecx imulq %r15, %r12 imull %eax, %ecx leal (%rcx,%rcx,8), %eax movslq %eax, %r13 movl $0x1, %edi callq 0x8e159 movq %rax, %r15 imulq %r13, %r15 movslq 0x4(%rbx), %rbp xorl %edi, %edi callq 0x8e159 movq %rax, %r13 imulq %rbp, %r13 addq %r12, %r13 movl 0x4(%rbx), %eax leal (%rax,%rax,2), %ecx addl (%rbx), %ecx addq %r14, %r13 imull %eax, %ecx leal (%rcx,%rcx,8), %eax movslq %eax, %r12 movl $0x1, %edi callq 0x8e159 movq %rax, %r14 imulq %r12, %r14 movslq 0x4(%rbx), %rbp xorl %edi, %edi callq 0x8e159 movq %rax, %r12 imulq %rbp, %r12 addq %r13, %r12 addq %r15, %r12 movl (%rbx), %eax movl 0x4(%rbx), %ecx leal (%rax,%rcx,4), %ecx imull %eax, %ecx leal (%rcx,%rcx,8), %eax movslq %eax, %r13 movl $0x1, %edi callq 0x8e159 movq %rax, %r15 imulq %r13, %r15 movslq (%rbx), %rbx xorl %edi, %edi callq 0x8e159 imulq %rbx, %rax addq %r14, %rax addq %r12, %rax addq %r15, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN18ResidualDenseBlock18calculate_mem_sizeEv: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov eax, [rdi] imul eax, [rdi+4] lea eax, [rax+rax*8] movsxd r15, eax mov edi, 1 call ggml_type_size mov r14, rax imul r14, r15 movsxd r12, dword ptr [rbx+4] xor edi, edi call ggml_type_size mov r15, rax imul r15, r12 add r15, r14 mov eax, [rbx+4] mov ecx, [rbx] add ecx, eax imul ecx, eax lea eax, [rcx+rcx*8] movsxd r12, eax mov edi, 1 call ggml_type_size mov r14, rax imul r14, r12 add r14, r15 movsxd r15, dword ptr [rbx+4] xor edi, edi call ggml_type_size mov r12, rax mov eax, [rbx+4] lea ecx, [rax+rax] add ecx, [rbx] imul r12, r15 imul ecx, eax lea eax, [rcx+rcx*8] movsxd r13, eax mov edi, 1 call ggml_type_size mov r15, rax imul r15, r13 movsxd rbp, dword ptr [rbx+4] xor edi, edi call ggml_type_size mov r13, rax imul r13, rbp add r13, r12 mov eax, [rbx+4] lea ecx, [rax+rax*2] add ecx, [rbx] add r13, r14 imul ecx, eax lea eax, [rcx+rcx*8] movsxd r12, eax mov edi, 1 call ggml_type_size mov r14, rax imul r14, r12 movsxd rbp, dword ptr [rbx+4] xor edi, edi call ggml_type_size mov r12, rax imul r12, rbp add r12, r13 add r12, r15 mov eax, [rbx] mov ecx, [rbx+4] lea ecx, [rax+rcx*4] imul ecx, eax lea eax, [rcx+rcx*8] movsxd r13, eax mov edi, 1 call ggml_type_size mov r15, rax imul r15, r13 movsxd rbx, dword ptr [rbx] xor edi, edi call ggml_type_size imul rax, rbx add rax, r14 add rax, r12 add rax, r15 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ResidualDenseBlock::calculate_mem_size(ResidualDenseBlock *this) { long long v2; // r15 long long v3; // r14 long long v4; // r12 long long v5; // r15 long long v6; // r12 long long v7; // r14 long long v8; // r15 long long v9; // r12 long long v10; // r13 long long v11; // r15 long long v12; // rbp long long v13; // r13 long long v14; // r12 long long v15; // r14 long long v16; // rbp long long v17; // r12 long long v18; // r13 long long v19; // r15 long long v20; // rbx v2 = 9 * *((_DWORD *)this + 1) * *(_DWORD *)this; v3 = v2 * ggml_type_size(1LL); v4 = *((int *)this + 1); v5 = v3 + v4 * ggml_type_size(0LL); v6 = 9 * *((_DWORD *)this + 1) * (*((_DWORD *)this + 1) + *(_DWORD *)this); v7 = v5 + v6 * ggml_type_size(1LL); v8 = *((int *)this + 1); v9 = v8 * ggml_type_size(0LL); v10 = 9 * *((_DWORD *)this + 1) * (*(_DWORD *)this + 2 * *((_DWORD *)this + 1)); v11 = v10 * ggml_type_size(1LL); v12 = *((int *)this + 1); v13 = v7 + v9 + v12 * ggml_type_size(0LL); v14 = 9 * *((_DWORD *)this + 1) * (*(_DWORD *)this + 3 * *((_DWORD *)this + 1)); v15 = v14 * ggml_type_size(1LL); v16 = *((int *)this + 1); v17 = v11 + v13 + v16 * ggml_type_size(0LL); v18 = 9 * *(_DWORD *)this * (*(_DWORD *)this + 4 * *((_DWORD *)this + 1)); v19 = v18 * ggml_type_size(1LL); v20 = *(int *)this; return v19 + v17 + v15 + v20 * ggml_type_size(0LL); }
13,664
ResidualDenseBlock::calculate_mem_size()
7CodeWizard[P]stablediffusion/esrgan.hpp
size_t calculate_mem_size() { size_t mem_size = num_features * num_grow_ch * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv1_w mem_size += num_grow_ch * ggml_type_size(GGML_TYPE_F32); // conv1_b mem_size += (num_features + num_grow_ch) * num_grow_ch * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv2_w mem_size += num_grow_ch * ggml_type_size(GGML_TYPE_F32); // conv2_b mem_size += (num_features + 2 * num_grow_ch) * num_grow_ch * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv3_w mem_size += num_grow_ch * ggml_type_size(GGML_TYPE_F32); // conv3_w mem_size += (num_features + 3 * num_grow_ch) * num_grow_ch * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv4_w mem_size += num_grow_ch * ggml_type_size(GGML_TYPE_F32); // conv4_w mem_size += (num_features + 4 * num_grow_ch) * num_features * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv5_w mem_size += num_features * ggml_type_size(GGML_TYPE_F32); // conv5_w return mem_size; }
O2
cpp
ResidualDenseBlock::calculate_mem_size(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movl (%rdi), %eax imull 0x4(%rdi), %eax leal (%rax,%rax,8), %eax movslq %eax, %r15 pushq $0x1 popq %rbp movl %ebp, %edi callq 0x67b83 movq %rax, %r14 imulq %r15, %r14 movslq 0x4(%rbx), %r12 xorl %edi, %edi callq 0x67b83 movq %rax, %r15 imulq %r12, %r15 addq %r14, %r15 movl 0x4(%rbx), %eax movl (%rbx), %ecx addl %eax, %ecx imull %eax, %ecx leal (%rcx,%rcx,8), %eax movslq %eax, %r12 movl %ebp, %edi callq 0x67b83 movq %rax, %r14 imulq %r12, %r14 addq %r15, %r14 movslq 0x4(%rbx), %r15 xorl %edi, %edi callq 0x67b83 movq %rax, %r12 movl 0x4(%rbx), %eax leal (%rax,%rax), %ecx addl (%rbx), %ecx imulq %r15, %r12 imull %eax, %ecx leal (%rcx,%rcx,8), %eax movslq %eax, %r13 movl %ebp, %edi callq 0x67b83 movq %rax, %r15 imulq %r13, %r15 movslq 0x4(%rbx), %rbp xorl %edi, %edi callq 0x67b83 movq %rax, %r13 imulq %rbp, %r13 addq %r12, %r13 movl 0x4(%rbx), %eax leal (%rax,%rax,2), %ecx addl (%rbx), %ecx addq %r14, %r13 imull %eax, %ecx leal (%rcx,%rcx,8), %eax movslq %eax, %r12 pushq $0x1 popq %rdi callq 0x67b83 movq %rax, %r14 imulq %r12, %r14 movslq 0x4(%rbx), %rbp xorl %edi, %edi callq 0x67b83 movq %rax, %r12 imulq %rbp, %r12 addq %r13, %r12 addq %r15, %r12 movl (%rbx), %eax movl 0x4(%rbx), %ecx leal (%rax,%rcx,4), %ecx imull %eax, %ecx leal (%rcx,%rcx,8), %eax movslq %eax, %r13 pushq $0x1 popq %rdi callq 0x67b83 movq %rax, %r15 imulq %r13, %r15 movslq (%rbx), %rbx xorl %edi, %edi callq 0x67b83 imulq %rbx, %rax addq %r14, %rax addq %r12, %rax addq %r15, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN18ResidualDenseBlock18calculate_mem_sizeEv: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov eax, [rdi] imul eax, [rdi+4] lea eax, [rax+rax*8] movsxd r15, eax push 1 pop rbp mov edi, ebp call ggml_type_size mov r14, rax imul r14, r15 movsxd r12, dword ptr [rbx+4] xor edi, edi call ggml_type_size mov r15, rax imul r15, r12 add r15, r14 mov eax, [rbx+4] mov ecx, [rbx] add ecx, eax imul ecx, eax lea eax, [rcx+rcx*8] movsxd r12, eax mov edi, ebp call ggml_type_size mov r14, rax imul r14, r12 add r14, r15 movsxd r15, dword ptr [rbx+4] xor edi, edi call ggml_type_size mov r12, rax mov eax, [rbx+4] lea ecx, [rax+rax] add ecx, [rbx] imul r12, r15 imul ecx, eax lea eax, [rcx+rcx*8] movsxd r13, eax mov edi, ebp call ggml_type_size mov r15, rax imul r15, r13 movsxd rbp, dword ptr [rbx+4] xor edi, edi call ggml_type_size mov r13, rax imul r13, rbp add r13, r12 mov eax, [rbx+4] lea ecx, [rax+rax*2] add ecx, [rbx] add r13, r14 imul ecx, eax lea eax, [rcx+rcx*8] movsxd r12, eax push 1 pop rdi call ggml_type_size mov r14, rax imul r14, r12 movsxd rbp, dword ptr [rbx+4] xor edi, edi call ggml_type_size mov r12, rax imul r12, rbp add r12, r13 add r12, r15 mov eax, [rbx] mov ecx, [rbx+4] lea ecx, [rax+rcx*4] imul ecx, eax lea eax, [rcx+rcx*8] movsxd r13, eax push 1 pop rdi call ggml_type_size mov r15, rax imul r15, r13 movsxd rbx, dword ptr [rbx] xor edi, edi call ggml_type_size imul rax, rbx add rax, r14 add rax, r12 add rax, r15 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ResidualDenseBlock::calculate_mem_size(ResidualDenseBlock *this) { long long v2; // r15 long long v3; // r14 long long v4; // r12 long long v5; // r15 long long v6; // r12 long long v7; // r14 long long v8; // r15 long long v9; // r12 long long v10; // r13 long long v11; // r15 long long v12; // rbp long long v13; // r13 long long v14; // r12 long long v15; // r14 long long v16; // rbp long long v17; // r12 long long v18; // r13 long long v19; // r15 long long v20; // rbx v2 = 9 * *((_DWORD *)this + 1) * *(_DWORD *)this; v3 = v2 * ggml_type_size(1LL); v4 = *((int *)this + 1); v5 = v3 + v4 * ggml_type_size(0LL); v6 = 9 * *((_DWORD *)this + 1) * (*((_DWORD *)this + 1) + *(_DWORD *)this); v7 = v5 + v6 * ggml_type_size(1LL); v8 = *((int *)this + 1); v9 = v8 * ggml_type_size(0LL); v10 = 9 * *((_DWORD *)this + 1) * (*(_DWORD *)this + 2 * *((_DWORD *)this + 1)); v11 = v10 * ggml_type_size(1LL); v12 = *((int *)this + 1); v13 = v7 + v9 + v12 * ggml_type_size(0LL); v14 = 9 * *((_DWORD *)this + 1) * (*(_DWORD *)this + 3 * *((_DWORD *)this + 1)); v15 = v14 * ggml_type_size(1LL); v16 = *((int *)this + 1); v17 = v11 + v13 + v16 * ggml_type_size(0LL); v18 = 9 * *(_DWORD *)this * (*(_DWORD *)this + 4 * *((_DWORD *)this + 1)); v19 = v18 * ggml_type_size(1LL); v20 = *(int *)this; return v19 + v17 + v15 + v20 * ggml_type_size(0LL); }
calculate_mem_size: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV EAX,dword ptr [RDI] IMUL EAX,dword ptr [RDI + 0x4] LEA EAX,[RAX + RAX*0x8] MOVSXD R15,EAX PUSH 0x1 POP RBP MOV EDI,EBP CALL 0x00167b83 MOV R14,RAX IMUL R14,R15 MOVSXD R12,dword ptr [RBX + 0x4] XOR EDI,EDI CALL 0x00167b83 MOV R15,RAX IMUL R15,R12 ADD R15,R14 MOV EAX,dword ptr [RBX + 0x4] MOV ECX,dword ptr [RBX] ADD ECX,EAX IMUL ECX,EAX LEA EAX,[RCX + RCX*0x8] MOVSXD R12,EAX MOV EDI,EBP CALL 0x00167b83 MOV R14,RAX IMUL R14,R12 ADD R14,R15 MOVSXD R15,dword ptr [RBX + 0x4] XOR EDI,EDI CALL 0x00167b83 MOV R12,RAX MOV EAX,dword ptr [RBX + 0x4] LEA ECX,[RAX + RAX*0x1] ADD ECX,dword ptr [RBX] IMUL R12,R15 IMUL ECX,EAX LEA EAX,[RCX + RCX*0x8] MOVSXD R13,EAX MOV EDI,EBP CALL 0x00167b83 MOV R15,RAX IMUL R15,R13 MOVSXD RBP,dword ptr [RBX + 0x4] XOR EDI,EDI CALL 0x00167b83 MOV R13,RAX IMUL R13,RBP ADD R13,R12 MOV EAX,dword ptr [RBX + 0x4] LEA ECX,[RAX + RAX*0x2] ADD ECX,dword ptr [RBX] ADD R13,R14 IMUL ECX,EAX LEA EAX,[RCX + RCX*0x8] MOVSXD R12,EAX PUSH 0x1 POP RDI CALL 0x00167b83 MOV R14,RAX IMUL R14,R12 MOVSXD RBP,dword ptr [RBX + 0x4] XOR EDI,EDI CALL 0x00167b83 MOV R12,RAX IMUL R12,RBP ADD R12,R13 ADD R12,R15 MOV EAX,dword ptr [RBX] MOV ECX,dword ptr [RBX + 0x4] LEA ECX,[RAX + RCX*0x4] IMUL ECX,EAX LEA EAX,[RCX + RCX*0x8] MOVSXD R13,EAX PUSH 0x1 POP RDI CALL 0x00167b83 MOV R15,RAX IMUL R15,R13 MOVSXD RBX,dword ptr [RBX] XOR EDI,EDI CALL 0x00167b83 IMUL RAX,RBX ADD RAX,R14 ADD RAX,R12 ADD RAX,R15 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* ResidualDenseBlock::calculate_mem_size() */ long __thiscall ResidualDenseBlock::calculate_mem_size(ResidualDenseBlock *this) { int iVar1; int iVar2; int iVar3; int iVar4; int iVar5; int iVar6; int iVar7; int iVar8; int iVar9; int iVar10; int iVar11; int iVar12; int iVar13; int iVar14; int iVar15; long lVar16; long lVar17; long lVar18; long lVar19; long lVar20; long lVar21; long lVar22; long lVar23; long lVar24; long lVar25; iVar1 = *(int *)this; iVar2 = *(int *)(this + 4); lVar16 = ggml_type_size(1); iVar3 = *(int *)(this + 4); lVar17 = ggml_type_size(0); iVar4 = *(int *)(this + 4); iVar5 = *(int *)this; lVar18 = ggml_type_size(1); iVar6 = *(int *)(this + 4); lVar19 = ggml_type_size(0); iVar7 = *(int *)(this + 4); iVar8 = *(int *)this; lVar20 = ggml_type_size(1); iVar9 = *(int *)(this + 4); lVar21 = ggml_type_size(0); iVar10 = *(int *)(this + 4); iVar11 = *(int *)this; lVar22 = ggml_type_size(1); iVar12 = *(int *)(this + 4); lVar23 = ggml_type_size(0); iVar13 = *(int *)this; iVar14 = *(int *)(this + 4); lVar24 = ggml_type_size(1); iVar15 = *(int *)this; lVar25 = ggml_type_size(0); return lVar25 * iVar15 + lVar22 * ((iVar10 * 3 + iVar11) * iVar10 * 9) + lVar23 * iVar12 + lVar21 * iVar9 + lVar19 * iVar6 + lVar18 * ((iVar5 + iVar4) * iVar4 * 9) + lVar17 * iVar3 + lVar16 * (iVar1 * iVar2 * 9) + lVar20 * ((iVar7 * 2 + iVar8) * iVar7 * 9) + lVar24 * ((iVar13 + iVar14 * 4) * iVar13 * 9); }
13,665
ResidualDenseBlock::calculate_mem_size()
7CodeWizard[P]stablediffusion/esrgan.hpp
size_t calculate_mem_size() { size_t mem_size = num_features * num_grow_ch * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv1_w mem_size += num_grow_ch * ggml_type_size(GGML_TYPE_F32); // conv1_b mem_size += (num_features + num_grow_ch) * num_grow_ch * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv2_w mem_size += num_grow_ch * ggml_type_size(GGML_TYPE_F32); // conv2_b mem_size += (num_features + 2 * num_grow_ch) * num_grow_ch * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv3_w mem_size += num_grow_ch * ggml_type_size(GGML_TYPE_F32); // conv3_w mem_size += (num_features + 3 * num_grow_ch) * num_grow_ch * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv4_w mem_size += num_grow_ch * ggml_type_size(GGML_TYPE_F32); // conv4_w mem_size += (num_features + 4 * num_grow_ch) * num_features * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv5_w mem_size += num_features * ggml_type_size(GGML_TYPE_F32); // conv5_w return mem_size; }
O3
cpp
ResidualDenseBlock::calculate_mem_size(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movl (%rdi), %eax imull 0x4(%rdi), %eax leal (%rax,%rax,8), %eax movslq %eax, %r15 movl $0x1, %edi callq 0x8ceea movq %rax, %r14 imulq %r15, %r14 movslq 0x4(%rbx), %r12 xorl %edi, %edi callq 0x8ceea movq %rax, %r15 imulq %r12, %r15 addq %r14, %r15 movl 0x4(%rbx), %eax movl (%rbx), %ecx addl %eax, %ecx imull %eax, %ecx leal (%rcx,%rcx,8), %eax movslq %eax, %r12 movl $0x1, %edi callq 0x8ceea movq %rax, %r14 imulq %r12, %r14 addq %r15, %r14 movslq 0x4(%rbx), %r15 xorl %edi, %edi callq 0x8ceea movq %rax, %r12 movl 0x4(%rbx), %eax leal (%rax,%rax), %ecx addl (%rbx), %ecx imulq %r15, %r12 imull %eax, %ecx leal (%rcx,%rcx,8), %eax movslq %eax, %r13 movl $0x1, %edi callq 0x8ceea movq %rax, %r15 imulq %r13, %r15 movslq 0x4(%rbx), %rbp xorl %edi, %edi callq 0x8ceea movq %rax, %r13 imulq %rbp, %r13 addq %r12, %r13 movl 0x4(%rbx), %eax leal (%rax,%rax,2), %ecx addl (%rbx), %ecx addq %r14, %r13 imull %eax, %ecx leal (%rcx,%rcx,8), %eax movslq %eax, %r12 movl $0x1, %edi callq 0x8ceea movq %rax, %r14 imulq %r12, %r14 movslq 0x4(%rbx), %rbp xorl %edi, %edi callq 0x8ceea movq %rax, %r12 imulq %rbp, %r12 addq %r13, %r12 addq %r15, %r12 movl (%rbx), %eax movl 0x4(%rbx), %ecx leal (%rax,%rcx,4), %ecx imull %eax, %ecx leal (%rcx,%rcx,8), %eax movslq %eax, %r13 movl $0x1, %edi callq 0x8ceea movq %rax, %r15 imulq %r13, %r15 movslq (%rbx), %rbx xorl %edi, %edi callq 0x8ceea imulq %rbx, %rax addq %r14, %rax addq %r12, %rax addq %r15, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN18ResidualDenseBlock18calculate_mem_sizeEv: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov eax, [rdi] imul eax, [rdi+4] lea eax, [rax+rax*8] movsxd r15, eax mov edi, 1 call ggml_type_size mov r14, rax imul r14, r15 movsxd r12, dword ptr [rbx+4] xor edi, edi call ggml_type_size mov r15, rax imul r15, r12 add r15, r14 mov eax, [rbx+4] mov ecx, [rbx] add ecx, eax imul ecx, eax lea eax, [rcx+rcx*8] movsxd r12, eax mov edi, 1 call ggml_type_size mov r14, rax imul r14, r12 add r14, r15 movsxd r15, dword ptr [rbx+4] xor edi, edi call ggml_type_size mov r12, rax mov eax, [rbx+4] lea ecx, [rax+rax] add ecx, [rbx] imul r12, r15 imul ecx, eax lea eax, [rcx+rcx*8] movsxd r13, eax mov edi, 1 call ggml_type_size mov r15, rax imul r15, r13 movsxd rbp, dword ptr [rbx+4] xor edi, edi call ggml_type_size mov r13, rax imul r13, rbp add r13, r12 mov eax, [rbx+4] lea ecx, [rax+rax*2] add ecx, [rbx] add r13, r14 imul ecx, eax lea eax, [rcx+rcx*8] movsxd r12, eax mov edi, 1 call ggml_type_size mov r14, rax imul r14, r12 movsxd rbp, dword ptr [rbx+4] xor edi, edi call ggml_type_size mov r12, rax imul r12, rbp add r12, r13 add r12, r15 mov eax, [rbx] mov ecx, [rbx+4] lea ecx, [rax+rcx*4] imul ecx, eax lea eax, [rcx+rcx*8] movsxd r13, eax mov edi, 1 call ggml_type_size mov r15, rax imul r15, r13 movsxd rbx, dword ptr [rbx] xor edi, edi call ggml_type_size imul rax, rbx add rax, r14 add rax, r12 add rax, r15 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ResidualDenseBlock::calculate_mem_size(ResidualDenseBlock *this) { long long v2; // r15 long long v3; // r14 long long v4; // r12 long long v5; // r15 long long v6; // r12 long long v7; // r14 long long v8; // r15 long long v9; // r12 long long v10; // r13 long long v11; // r15 long long v12; // rbp long long v13; // r13 long long v14; // r12 long long v15; // r14 long long v16; // rbp long long v17; // r12 long long v18; // r13 long long v19; // r15 long long v20; // rbx v2 = 9 * *((_DWORD *)this + 1) * *(_DWORD *)this; v3 = v2 * ggml_type_size(1LL); v4 = *((int *)this + 1); v5 = v3 + v4 * ggml_type_size(0LL); v6 = 9 * *((_DWORD *)this + 1) * (*((_DWORD *)this + 1) + *(_DWORD *)this); v7 = v5 + v6 * ggml_type_size(1LL); v8 = *((int *)this + 1); v9 = v8 * ggml_type_size(0LL); v10 = 9 * *((_DWORD *)this + 1) * (*(_DWORD *)this + 2 * *((_DWORD *)this + 1)); v11 = v10 * ggml_type_size(1LL); v12 = *((int *)this + 1); v13 = v7 + v9 + v12 * ggml_type_size(0LL); v14 = 9 * *((_DWORD *)this + 1) * (*(_DWORD *)this + 3 * *((_DWORD *)this + 1)); v15 = v14 * ggml_type_size(1LL); v16 = *((int *)this + 1); v17 = v11 + v13 + v16 * ggml_type_size(0LL); v18 = 9 * *(_DWORD *)this * (*(_DWORD *)this + 4 * *((_DWORD *)this + 1)); v19 = v18 * ggml_type_size(1LL); v20 = *(int *)this; return v19 + v17 + v15 + v20 * ggml_type_size(0LL); }
13,666
minja::Parser::unterminated(minja::TemplateToken const&) const
monkey531[P]llama/common/minja.hpp
std::runtime_error unterminated(const TemplateToken & token) const { return std::runtime_error("Unterminated " + TemplateToken::typeToString(token.type) + error_location_suffix(*template_str, token.location.pos)); }
O3
cpp
minja::Parser::unterminated(minja::TemplateToken const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movl 0x8(%rdx), %esi leaq 0x68(%rsp), %r12 movq %r12, %rdi callq 0xa7752 leaq 0x57fc8(%rip), %rcx # 0xfec18 movl $0xd, %r8d movq %r12, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x1b9f0 leaq 0x38(%rsp), %r12 movq %r12, -0x10(%r12) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0xa6c8a movq %rdx, 0x28(%rsp) movq (%rcx), %rdx movq %rdx, 0x38(%rsp) jmp 0xa6c92 movups (%rcx), %xmm0 movups %xmm0, (%r12) movq 0x8(%rax), %rdx movq %rdx, 0x30(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq (%r15), %rsi movq 0x20(%r14), %rdx leaq 0x48(%rsp), %rdi callq 0x8588c movq 0x28(%rsp), %rcx movq 0x30(%rsp), %r8 movq 0x50(%rsp), %rdx leaq (%rdx,%r8), %rax movl $0xf, %edi cmpq %r12, %rcx je 0xa6cdd movq 0x38(%rsp), %rdi movq 0x48(%rsp), %rsi cmpq %rdi, %rax jbe 0xa6d00 leaq 0x58(%rsp), %r9 movl $0xf, %edi cmpq %r9, %rsi je 0xa6cfb movq 0x58(%rsp), %rdi cmpq %rdi, %rax jbe 0xa6d0c leaq 0x28(%rsp), %rdi callq 0x1b260 jmp 0xa6d1a leaq 0x48(%rsp), %rdi xorl %esi, %esi xorl %edx, %edx callq 0x1b9f0 leaq 0x18(%rsp), %rdx movq %rdx, -0x10(%rdx) movq (%rax), %rsi leaq 0x10(%rax), %rcx cmpq %rcx, %rsi je 0xa6d3e movq %rsi, 0x8(%rsp) movq (%rcx), %rdx movq %rdx, 0x18(%rsp) jmp 0xa6d44 movups (%rcx), %xmm0 movups %xmm0, (%rdx) movq %rax, %rdx addq $0x8, %rdx movq 0x8(%rax), %rsi movq %rsi, 0x10(%rsp) movq %rcx, (%rax) movq $0x0, (%rdx) movb $0x0, (%rcx) leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x1be80 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa6d89 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8f0 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa6da4 movq 0x58(%rsp), %rsi incq %rsi callq 0x1b8f0 movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0xa6dbb movq 0x38(%rsp), %rsi incq %rsi callq 0x1b8f0 leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa6dd6 movq 0x78(%rsp), %rsi incq %rsi callq 0x1b8f0 movq %rbx, %rax addq $0x88, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa6e0b movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8f0 jmp 0xa6e0b movq %rax, %rbx leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa6e2b movq 0x58(%rsp), %rsi incq %rsi callq 0x1b8f0 jmp 0xa6e2b movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0xa6e47 movq 0x38(%rsp), %rsi incq %rsi callq 0x1b8f0 jmp 0xa6e47 movq %rax, %rbx leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa6e62 movq 0x78(%rsp), %rsi incq %rsi callq 0x1b8f0 movq %rbx, %rdi callq 0x1c020
_ZNK5minja6Parser12unterminatedERKNS_13TemplateTokenE: push r15; int push r14; int push r12; int push rbx; int sub rsp, 88h mov r14, rdx mov r15, rsi mov rbx, rdi mov esi, [rdx+8] lea r12, [rsp+0A8h+var_40] mov rdi, r12 call _ZN5minja13TemplateToken12typeToStringB5cxx11ENS0_4TypeE; minja::TemplateToken::typeToString(minja::TemplateToken::Type) lea rcx, aUnterminated; "Unterminated " mov r8d, 0Dh mov rdi, r12 xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) lea r12, [rsp+0A8h+var_70] mov [r12-10h], r12 mov rdx, [rax] mov rcx, rax add rcx, 10h; int cmp rdx, rcx jz short loc_A6C8A mov [rsp+0A8h+var_80], rdx mov rdx, [rcx] mov [rsp+0A8h+var_70], rdx jmp short loc_A6C92 loc_A6C8A: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r12], xmm0 loc_A6C92: mov rdx, [rax+8] mov qword ptr [rsp+0A8h+var_78], rdx; int mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rsi, [r15]; int mov rdx, [r14+20h]; int lea rdi, [rsp+0A8h+var_60]; int call _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; minja::error_location_suffix(std::string const&,ulong) mov rcx, [rsp+0A8h+var_80] mov r8, qword ptr [rsp+0A8h+var_78] mov rdx, [rsp+0A8h+var_58] lea rax, [rdx+r8] mov edi, 0Fh cmp rcx, r12 jz short loc_A6CDD mov rdi, [rsp+0A8h+var_70] loc_A6CDD: mov rsi, qword ptr [rsp+0A8h+var_60] cmp rax, rdi jbe short loc_A6D00 lea r9, [rsp+0A8h+var_50] mov edi, 0Fh cmp rsi, r9 jz short loc_A6CFB mov rdi, [rsp+0A8h+var_50] loc_A6CFB: cmp rax, rdi jbe short loc_A6D0C loc_A6D00: lea rdi, [rsp+0A8h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) jmp short loc_A6D1A loc_A6D0C: lea rdi, [rsp+0A8h+var_60] xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) loc_A6D1A: lea rdx, [rsp+0A8h+var_90] mov [rdx-10h], rdx mov rsi, [rax] lea rcx, [rax+10h] cmp rsi, rcx jz short loc_A6D3E mov [rsp+0A8h+var_A0], rsi mov rdx, [rcx] mov [rsp+0A8h+var_90], rdx jmp short loc_A6D44 loc_A6D3E: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rdx], xmm0 loc_A6D44: mov rdx, rax add rdx, 8 mov rsi, [rax+8] mov [rsp+0A8h+var_98], rsi mov [rax], rcx mov qword ptr [rdx], 0 mov byte ptr [rcx], 0 lea rsi, [rsp+0A8h+var_A0] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) lea rax, [rsp+0A8h+var_90] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A6D89 mov rsi, [rsp+0A8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A6D89: lea rax, [rsp+0A8h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A6DA4 mov rsi, [rsp+0A8h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A6DA4: mov rdi, [rsp+0A8h+var_80]; void * cmp rdi, r12 jz short loc_A6DBB mov rsi, [rsp+0A8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A6DBB: lea rax, [rsp+0A8h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A6DD6 mov rsi, [rsp+0A8h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A6DD6: mov rax, rbx add rsp, 88h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A6E0B mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_A6E0B mov rbx, rax loc_A6E0B: lea rax, [rsp+arg_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A6E2B mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_A6E2B mov rbx, rax loc_A6E2B: mov rdi, [rsp+arg_20]; void * cmp rdi, r12 jz short loc_A6E47 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_A6E47 mov rbx, rax loc_A6E47: lea rax, [rsp+arg_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A6E62 mov rsi, [rsp+arg_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A6E62: mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::unterminated(minja::Parser *this, const minja::TemplateToken *a2, long long a3) { long long v5; // rax __int128 *v6; // rcx unsigned long long v7; // rax unsigned long long v8; // rdi unsigned long long v9; // rdi void **v10; // rax __int128 *v11; // rcx void *v13[2]; // [rsp+8h] [rbp-A0h] BYREF __int128 v14; // [rsp+18h] [rbp-90h] BYREF void *v15; // [rsp+28h] [rbp-80h] BYREF int v16[2]; // [rsp+30h] [rbp-78h] __int128 v17; // [rsp+38h] [rbp-70h] BYREF int v18[2]; // [rsp+48h] [rbp-60h] BYREF long long v19; // [rsp+50h] [rbp-58h] _QWORD v20[2]; // [rsp+58h] [rbp-50h] BYREF void *v21[2]; // [rsp+68h] [rbp-40h] BYREF long long v22; // [rsp+78h] [rbp-30h] BYREF minja::TemplateToken::typeToString[abi:cxx11](v21, *(unsigned int *)(a3 + 8)); v5 = std::string::replace(v21, 0LL, 0LL, "Unterminated ", 13LL); v15 = &v17; v6 = (__int128 *)(v5 + 16); if ( *(_QWORD *)v5 == v5 + 16 ) { v17 = *v6; } else { v15 = *(void **)v5; *(_QWORD *)&v17 = *(_QWORD *)v6; } *(_QWORD *)v16 = *(_QWORD *)(v5 + 8); *(_QWORD *)v5 = v6; *(_QWORD *)(v5 + 8) = 0LL; *(_BYTE *)(v5 + 16) = 0; minja::error_location_suffix((long long)v18, *(_QWORD *)a2, *(_QWORD *)(a3 + 32)); v7 = v19 + *(_QWORD *)v16; v8 = 15LL; if ( v15 != &v17 ) v8 = v17; if ( v7 <= v8 ) goto LABEL_10; v9 = 15LL; if ( *(_QWORD **)v18 != v20 ) v9 = v20[0]; if ( v7 <= v9 ) v10 = (void **)std::string::replace(v18, 0LL, 0LL, v15, *(_QWORD *)v16); else LABEL_10: v10 = (void **)std::string::_M_append(&v15, *(_QWORD *)v18, v19); v13[0] = &v14; v11 = (__int128 *)(v10 + 2); if ( *v10 == v10 + 2 ) { v14 = *v11; } else { v13[0] = *v10; *(_QWORD *)&v14 = *(_QWORD *)v11; } v13[1] = v10[1]; *v10 = v11; v10[1] = 0LL; *(_BYTE *)v11 = 0; std::runtime_error::runtime_error(this, v13); if ( v13[0] != &v14 ) operator delete(v13[0], v14 + 1); if ( *(_QWORD **)v18 != v20 ) operator delete(*(void **)v18, v20[0] + 1LL); if ( v15 != &v17 ) operator delete(v15, v17 + 1); if ( v21[0] != &v22 ) operator delete(v21[0], v22 + 1); return this; }
unterminated: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x88 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV ESI,dword ptr [RDX + 0x8] LEA R12,[RSP + 0x68] MOV RDI,R12 CALL 0x001a7752 LAB_001a6c49: LEA RCX,[0x1fec18] MOV R8D,0xd MOV RDI,R12 XOR ESI,ESI XOR EDX,EDX CALL 0x0011b9f0 LEA R12,[RSP + 0x38] MOV qword ptr [R12 + -0x10],R12 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x001a6c8a MOV qword ptr [RSP + 0x28],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x38],RDX JMP 0x001a6c92 LAB_001a6c8a: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R12],XMM0 LAB_001a6c92: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R14 + 0x20] LAB_001a6cb1: LEA RDI,[RSP + 0x48] CALL 0x0018588c MOV RCX,qword ptr [RSP + 0x28] MOV R8,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x50] LEA RAX,[RDX + R8*0x1] MOV EDI,0xf CMP RCX,R12 JZ 0x001a6cdd MOV RDI,qword ptr [RSP + 0x38] LAB_001a6cdd: MOV RSI,qword ptr [RSP + 0x48] CMP RAX,RDI JBE 0x001a6d00 LEA R9,[RSP + 0x58] MOV EDI,0xf CMP RSI,R9 JZ 0x001a6cfb MOV RDI,qword ptr [RSP + 0x58] LAB_001a6cfb: CMP RAX,RDI JBE 0x001a6d0c LAB_001a6d00: LEA RDI,[RSP + 0x28] CALL 0x0011b260 JMP 0x001a6d1a LAB_001a6d0c: LEA RDI,[RSP + 0x48] XOR ESI,ESI XOR EDX,EDX CALL 0x0011b9f0 LAB_001a6d1a: LEA RDX,[RSP + 0x18] MOV qword ptr [RDX + -0x10],RDX MOV RSI,qword ptr [RAX] LEA RCX,[RAX + 0x10] CMP RSI,RCX JZ 0x001a6d3e MOV qword ptr [RSP + 0x8],RSI MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x18],RDX JMP 0x001a6d44 LAB_001a6d3e: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RDX],XMM0 LAB_001a6d44: MOV RDX,RAX ADD RDX,0x8 MOV RSI,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RSI MOV qword ptr [RAX],RCX MOV qword ptr [RDX],0x0 MOV byte ptr [RCX],0x0 LAB_001a6d61: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x0011be80 LAB_001a6d6e: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001a6d89 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b8f0 LAB_001a6d89: LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001a6da4 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x0011b8f0 LAB_001a6da4: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R12 JZ 0x001a6dbb MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0011b8f0 LAB_001a6dbb: LEA RAX,[RSP + 0x78] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001a6dd6 MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x0011b8f0 LAB_001a6dd6: MOV RAX,RBX ADD RSP,0x88 POP RBX POP R12 POP R14 POP R15 RET
/* minja::Parser::unterminated(minja::TemplateToken const&) const */ TemplateToken * minja::Parser::unterminated(TemplateToken *param_1) { long *plVar1; int8 *puVar2; ulong *puVar3; long in_RDX; int8 *in_RSI; ulong uVar4; long *local_a0; int8 local_98; long local_90; int8 uStack_88; ulong *local_80; long local_78; ulong local_70; long lStack_68; ulong *local_60; long local_58; ulong local_50 [2]; long *local_40 [2]; long local_30 [2]; TemplateToken::typeToString_abi_cxx11_((TemplateToken *)local_40); /* try { // try from 001a6c49 to 001a6c61 has its CatchHandler @ 001a6e44 */ plVar1 = (long *)std::__cxx11::string::replace((ulong)local_40,0,(char *)0x0,0x1fec18); puVar3 = (ulong *)(plVar1 + 2); if ((ulong *)*plVar1 == puVar3) { local_70 = *puVar3; lStack_68 = plVar1[3]; local_80 = &local_70; } else { local_70 = *puVar3; local_80 = (ulong *)*plVar1; } local_78 = plVar1[1]; *plVar1 = (long)puVar3; plVar1[1] = 0; *(int1 *)(plVar1 + 2) = 0; /* try { // try from 001a6cb1 to 001a6cba has its CatchHandler @ 001a6e28 */ error_location_suffix((minja *)&local_60,(string *)*in_RSI,*(ulong *)(in_RDX + 0x20)); uVar4 = 0xf; if (local_80 != &local_70) { uVar4 = local_70; } if (uVar4 < (ulong)(local_58 + local_78)) { uVar4 = 0xf; if (local_60 != local_50) { uVar4 = local_50[0]; } if ((ulong)(local_58 + local_78) <= uVar4) { puVar2 = (int8 *) std::__cxx11::string::replace((ulong)&local_60,0,(char *)0x0,(ulong)local_80); goto LAB_001a6d1a; } } /* try { // try from 001a6d00 to 001a6d19 has its CatchHandler @ 001a6e08 */ puVar2 = (int8 *)std::__cxx11::string::_M_append((char *)&local_80,(ulong)local_60); LAB_001a6d1a: local_a0 = &local_90; plVar1 = puVar2 + 2; if ((long *)*puVar2 == plVar1) { local_90 = *plVar1; uStack_88 = puVar2[3]; } else { local_90 = *plVar1; local_a0 = (long *)*puVar2; } local_98 = puVar2[1]; *puVar2 = plVar1; puVar2[1] = 0; *(int1 *)plVar1 = 0; /* try { // try from 001a6d61 to 001a6d6d has its CatchHandler @ 001a6de8 */ std::runtime_error::runtime_error((runtime_error *)param_1,(string *)&local_a0); if (local_a0 != &local_90) { operator_delete(local_a0,local_90 + 1); } if (local_60 != local_50) { operator_delete(local_60,local_50[0] + 1); } if (local_80 != &local_70) { operator_delete(local_80,local_70 + 1); } if (local_40[0] != local_30) { operator_delete(local_40[0],local_30[0] + 1); } return param_1; }
13,667
my_wc_mb_euc_kr
eloqsql/strings/ctype-euc_kr.c
static int my_wc_mb_euc_kr(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; if (s >= e) return MY_CS_TOOSMALL; if ((uint) wc < 0x80) { s[0]= (uchar) wc; return 1; } if (!(code=func_uni_ksc5601_onechar(wc))) return MY_CS_ILUNI; if (s+2>e) return MY_CS_TOOSMALL2; s[0]=code>>8; s[1]=code&0xFF; return 2; }
O3
c
my_wc_mb_euc_kr: movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x5275a cmpl $0x7f, %esi ja 0x5275b movb %sil, (%rdx) movl $0x1, %eax retq leal -0xa1(%rsi), %eax cmpl $0xc6, %eax ja 0x52776 movl %eax, %eax leaq 0x97f8f(%rip), %rsi # 0xea700 jmp 0x5286e leal -0x2c7(%rsi), %eax cmpl $0x18a, %eax # imm = 0x18A ja 0x52791 movl %eax, %eax leaq 0x98104(%rip), %rsi # 0xea890 jmp 0x5286e leal -0x2015(%rsi), %eax cmpl $0x2fd, %eax # imm = 0x2FD ja 0x527ac movl %eax, %eax leaq 0x98409(%rip), %rsi # 0xeabb0 jmp 0x5286e leal -0x2460(%rsi), %eax cmpl $0x20d, %eax # imm = 0x20D ja 0x527c7 movl %eax, %eax leaq 0x989ee(%rip), %rsi # 0xeb1b0 jmp 0x5286e leal -0x3000(%rsi), %eax cmpl $0x27f, %eax # imm = 0x27F ja 0x527e2 movl %eax, %eax leaq 0x98df3(%rip), %rsi # 0xeb5d0 jmp 0x5286e leal -0x3380(%rsi), %eax cmpl $0x5d, %eax ja 0x527f8 movl %eax, %eax leaq 0x992da(%rip), %rsi # 0xebad0 jmp 0x5286e leal -0x4e00(%rsi), %eax cmpl $0x467f, %eax # imm = 0x467F ja 0x52810 movl %eax, %eax leaq 0x99382(%rip), %rsi # 0xebb90 jmp 0x5286e leal -0x9577(%rsi), %eax cmpl $0xa25, %eax # imm = 0xA25 ja 0x52828 movl %eax, %eax leaq 0xa206a(%rip), %rsi # 0xf4890 jmp 0x5286e leal -0xac00(%rsi), %eax cmpl $0x2ba3, %eax # imm = 0x2BA3 ja 0x52840 movl %eax, %eax leaq 0xa34a2(%rip), %rsi # 0xf5ce0 jmp 0x5286e leal -0xf900(%rsi), %eax cmpl $0x10b, %eax # imm = 0x10B ja 0x52858 movl %eax, %eax leaq 0xa8bda(%rip), %rsi # 0xfb430 jmp 0x5286e leal -0xff01(%rsi), %eax cmpl $0xe5, %eax ja 0x5289e movl %eax, %eax leaq 0xa8de2(%rip), %rsi # 0xfb650 leaq (%rsi,%rax,2), %rax pushq %rbp movq %rsp, %rbp movzwl (%rax), %esi testw %si, %si je 0x5289a leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0x5289c rolw $0x8, %si movw %si, (%rdx) movl $0x2, %eax jmp 0x5289c xorl %eax, %eax popq %rbp retq xorl %eax, %eax retq
my_wc_mb_euc_kr: mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short locret_5275A cmp esi, 7Fh ja short loc_5275B mov [rdx], sil mov eax, 1 locret_5275A: retn loc_5275B: lea eax, [rsi-0A1h] cmp eax, 0C6h ja short loc_52776 mov eax, eax lea rsi, tab_uni_ksc56010 jmp loc_5286E loc_52776: lea eax, [rsi-2C7h] cmp eax, 18Ah ja short loc_52791 mov eax, eax lea rsi, tab_uni_ksc56011 jmp loc_5286E loc_52791: lea eax, [rsi-2015h] cmp eax, 2FDh ja short loc_527AC mov eax, eax lea rsi, tab_uni_ksc56012 jmp loc_5286E loc_527AC: lea eax, [rsi-2460h] cmp eax, 20Dh ja short loc_527C7 mov eax, eax lea rsi, tab_uni_ksc56013 jmp loc_5286E loc_527C7: lea eax, [rsi-3000h] cmp eax, 27Fh ja short loc_527E2 mov eax, eax lea rsi, tab_uni_ksc56014 jmp loc_5286E loc_527E2: lea eax, [rsi-3380h] cmp eax, 5Dh ; ']' ja short loc_527F8 mov eax, eax lea rsi, tab_uni_ksc56015 jmp short loc_5286E loc_527F8: lea eax, [rsi-4E00h] cmp eax, 467Fh ja short loc_52810 mov eax, eax lea rsi, tab_uni_ksc56016 jmp short loc_5286E loc_52810: lea eax, [rsi-9577h] cmp eax, 0A25h ja short loc_52828 mov eax, eax lea rsi, tab_uni_ksc56017 jmp short loc_5286E loc_52828: lea eax, [rsi-0AC00h] cmp eax, 2BA3h ja short loc_52840 mov eax, eax lea rsi, tab_uni_ksc56018 jmp short loc_5286E loc_52840: lea eax, [rsi-0F900h] cmp eax, 10Bh ja short loc_52858 mov eax, eax lea rsi, tab_uni_ksc56019 jmp short loc_5286E loc_52858: lea eax, [rsi-0FF01h] cmp eax, 0E5h ja short loc_5289E mov eax, eax lea rsi, tab_uni_ksc560110 loc_5286E: lea rax, [rsi+rax*2] push rbp mov rbp, rsp movzx esi, word ptr [rax] test si, si jz short loc_5289A lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_5289C rol si, 8 mov [rdx], si mov eax, 2 jmp short loc_5289C loc_5289A: xor eax, eax loc_5289C: pop rbp retn loc_5289E: xor eax, eax retn
long long my_wc_mb_euc_kr(long long a1, unsigned int a2, _WORD *a3, unsigned long long a4) { long long result; // rax long long v5; // rax _WORD *v6; // rsi __int16 v7; // si result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { if ( a2 > 0x7F ) { LODWORD(v5) = a2 - 161; if ( a2 - 161 > 0xC6 ) { LODWORD(v5) = a2 - 711; if ( a2 - 711 > 0x18A ) { LODWORD(v5) = a2 - 8213; if ( a2 - 8213 > 0x2FD ) { LODWORD(v5) = a2 - 9312; if ( a2 - 9312 > 0x20D ) { LODWORD(v5) = a2 - 12288; if ( a2 - 12288 > 0x27F ) { LODWORD(v5) = a2 - 13184; if ( a2 - 13184 > 0x5D ) { LODWORD(v5) = a2 - 19968; if ( a2 - 19968 > 0x467F ) { LODWORD(v5) = a2 - 38263; if ( a2 - 38263 > 0xA25 ) { LODWORD(v5) = a2 - 44032; if ( a2 - 44032 > 0x2BA3 ) { LODWORD(v5) = a2 - 63744; if ( a2 - 63744 > 0x10B ) { LODWORD(v5) = a2 - 65281; if ( a2 - 65281 > 0xE5 ) return 0LL; v5 = (unsigned int)v5; v6 = &tab_uni_ksc560110; } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56019; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56018; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56017; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56016; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56015; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56014; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56013; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56012; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56011; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56010; } v7 = v6[v5]; if ( v7 ) { result = 4294967194LL; if ( (unsigned long long)(a3 + 1) <= a4 ) { *a3 = __ROL2__(v7, 8); return 2LL; } } else { return 0LL; } } else { *(_BYTE *)a3 = a2; return 1LL; } } return result; }
my_wc_mb_euc_kr: MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x0015275a CMP ESI,0x7f JA 0x0015275b MOV byte ptr [RDX],SIL MOV EAX,0x1 LAB_0015275a: RET LAB_0015275b: LEA EAX,[RSI + -0xa1] CMP EAX,0xc6 JA 0x00152776 MOV EAX,EAX LEA RSI,[0x1ea700] JMP 0x0015286e LAB_00152776: LEA EAX,[RSI + -0x2c7] CMP EAX,0x18a JA 0x00152791 MOV EAX,EAX LEA RSI,[0x1ea890] JMP 0x0015286e LAB_00152791: LEA EAX,[RSI + -0x2015] CMP EAX,0x2fd JA 0x001527ac MOV EAX,EAX LEA RSI,[0x1eabb0] JMP 0x0015286e LAB_001527ac: LEA EAX,[RSI + -0x2460] CMP EAX,0x20d JA 0x001527c7 MOV EAX,EAX LEA RSI,[0x1eb1b0] JMP 0x0015286e LAB_001527c7: LEA EAX,[RSI + -0x3000] CMP EAX,0x27f JA 0x001527e2 MOV EAX,EAX LEA RSI,[0x1eb5d0] JMP 0x0015286e LAB_001527e2: LEA EAX,[RSI + -0x3380] CMP EAX,0x5d JA 0x001527f8 MOV EAX,EAX LEA RSI,[0x1ebad0] JMP 0x0015286e LAB_001527f8: LEA EAX,[RSI + -0x4e00] CMP EAX,0x467f JA 0x00152810 MOV EAX,EAX LEA RSI,[0x1ebb90] JMP 0x0015286e LAB_00152810: LEA EAX,[RSI + -0x9577] CMP EAX,0xa25 JA 0x00152828 MOV EAX,EAX LEA RSI,[0x1f4890] JMP 0x0015286e LAB_00152828: LEA EAX,[RSI + -0xac00] CMP EAX,0x2ba3 JA 0x00152840 MOV EAX,EAX LEA RSI,[0x1f5ce0] JMP 0x0015286e LAB_00152840: LEA EAX,[RSI + -0xf900] CMP EAX,0x10b JA 0x00152858 MOV EAX,EAX LEA RSI,[0x1fb430] JMP 0x0015286e LAB_00152858: LEA EAX,[RSI + -0xff01] CMP EAX,0xe5 JA 0x0015289e MOV EAX,EAX LEA RSI,[0x1fb650] LAB_0015286e: LEA RAX,[RSI + RAX*0x2] PUSH RBP MOV RBP,RSP MOVZX ESI,word ptr [RAX] TEST SI,SI JZ 0x0015289a LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x0015289c ROL SI,0x8 MOV word ptr [RDX],SI MOV EAX,0x2 JMP 0x0015289c LAB_0015289a: XOR EAX,EAX LAB_0015289c: POP RBP RET LAB_0015289e: XOR EAX,EAX RET
int8 my_wc_mb_euc_kr(int8 param_1,uint param_2,ushort *param_3,ushort *param_4) { ushort uVar1; int8 uVar2; ulong uVar3; int1 *puVar4; uVar2 = 0xffffff9b; if (param_3 < param_4) { if (0x7f < param_2) { if (param_2 - 0xa1 < 199) { uVar3 = (ulong)(param_2 - 0xa1); puVar4 = tab_uni_ksc56010; } else if (param_2 - 0x2c7 < 0x18b) { uVar3 = (ulong)(param_2 - 0x2c7); puVar4 = tab_uni_ksc56011; } else if (param_2 - 0x2015 < 0x2fe) { uVar3 = (ulong)(param_2 - 0x2015); puVar4 = tab_uni_ksc56012; } else if (param_2 - 0x2460 < 0x20e) { uVar3 = (ulong)(param_2 - 0x2460); puVar4 = tab_uni_ksc56013; } else if (param_2 - 0x3000 < 0x280) { uVar3 = (ulong)(param_2 - 0x3000); puVar4 = tab_uni_ksc56014; } else if (param_2 - 0x3380 < 0x5e) { uVar3 = (ulong)(param_2 - 0x3380); puVar4 = tab_uni_ksc56015; } else if (param_2 - 0x4e00 < 0x4680) { uVar3 = (ulong)(param_2 - 0x4e00); puVar4 = tab_uni_ksc56016; } else if (param_2 - 0x9577 < 0xa26) { uVar3 = (ulong)(param_2 - 0x9577); puVar4 = tab_uni_ksc56017; } else if (param_2 - 0xac00 < 0x2ba4) { uVar3 = (ulong)(param_2 - 0xac00); puVar4 = tab_uni_ksc56018; } else if (param_2 - 0xf900 < 0x10c) { uVar3 = (ulong)(param_2 - 0xf900); puVar4 = tab_uni_ksc56019; } else { uVar3 = (ulong)(param_2 - 0xff01); if (0xe5 < param_2 - 0xff01) { return 0; } puVar4 = tab_uni_ksc560110; } uVar1 = *(ushort *)(puVar4 + uVar3 * 2); if (uVar1 == 0) { uVar2 = 0; } else { uVar2 = 0xffffff9a; if (param_3 + 1 <= param_4) { *param_3 = uVar1 << 8 | uVar1 >> 8; uVar2 = 2; } } return uVar2; } *(char *)param_3 = (char)param_2; uVar2 = 1; } return uVar2; }
13,668
my_coll_rules_realloc
eloqsql/strings/ctype-uca.c
static int my_coll_rules_realloc(MY_COLL_RULES *rules, size_t n) { if (rules->nrules < rules->mrules || (rules->rule= rules->loader->realloc(rules->rule, sizeof(MY_COLL_RULE) * (rules->mrules= n + 128)))) return 0; return -1; }
O0
c
my_coll_rules_realloc: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq -0x10(%rbp), %rcx cmpq 0x18(%rcx), %rax jb 0x588f3 movq -0x10(%rbp), %rax movq 0x28(%rax), %rax movq 0x90(%rax), %rax movq -0x10(%rbp), %rcx movq 0x20(%rcx), %rdi movq -0x18(%rbp), %rcx addq $0x80, %rcx movq -0x10(%rbp), %rdx movq %rcx, 0x18(%rdx) imulq $0xa0, %rcx, %rsi callq *%rax movq -0x10(%rbp), %rcx movq %rax, 0x20(%rcx) cmpq $0x0, %rax je 0x588fc movl $0x0, -0x4(%rbp) jmp 0x58903 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax)
my_coll_rules_realloc: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov rax, [rax+10h] mov rcx, [rbp+var_10] cmp rax, [rcx+18h] jb short loc_588F3 mov rax, [rbp+var_10] mov rax, [rax+28h] mov rax, [rax+90h] mov rcx, [rbp+var_10] mov rdi, [rcx+20h] mov rcx, [rbp+var_18] add rcx, 80h mov rdx, [rbp+var_10] mov [rdx+18h], rcx imul rsi, rcx, 0A0h call rax mov rcx, [rbp+var_10] mov [rcx+20h], rax cmp rax, 0 jz short loc_588FC loc_588F3: mov [rbp+var_4], 0 jmp short loc_58903 loc_588FC: mov [rbp+var_4], 0FFFFFFFFh loc_58903: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long my_coll_rules_realloc(_QWORD *a1, long long a2) { long long ( *v2)(long long, long long); // rax long long v3; // rdi long long v4; // rax if ( a1[2] < a1[3] ) return 0; v2 = *(long long ( **)(long long, long long))(a1[5] + 144LL); v3 = a1[4]; a1[3] = a2 + 128; v4 = v2(v3, 160 * (a2 + 128)); if ( (a1[4] = v4) != 0LL ) return 0; else return (unsigned int)-1; }
my_coll_rules_realloc: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x18] JC 0x001588f3 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RAX + 0x90] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x20] MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x80 MOV RDX,qword ptr [RBP + -0x10] MOV qword ptr [RDX + 0x18],RCX IMUL RSI,RCX,0xa0 CALL RAX MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x20],RAX CMP RAX,0x0 JZ 0x001588fc LAB_001588f3: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00158903 LAB_001588fc: MOV dword ptr [RBP + -0x4],0xffffffff LAB_00158903: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 my_coll_rules_realloc(long param_1,long param_2) { code *pcVar1; long lVar2; if (*(ulong *)(param_1 + 0x18) <= *(ulong *)(param_1 + 0x10)) { pcVar1 = *(code **)(*(long *)(param_1 + 0x28) + 0x90); *(long *)(param_1 + 0x18) = param_2 + 0x80; lVar2 = (*pcVar1)(*(int8 *)(param_1 + 0x20),(param_2 + 0x80) * 0xa0); *(long *)(param_1 + 0x20) = lVar2; if (lVar2 == 0) { return 0xffffffff; } } return 0; }
13,669
js_std_file_error
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_std_file_error(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { FILE *f = js_std_file_get(ctx, this_val); if (!f) return JS_EXCEPTION; return JS_NewBool(ctx, ferror(f)); }
O0
c
js_std_file_error: subq $0x68, %rsp movq %rsi, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq %rdi, 0x20(%rsp) movl %ecx, 0x1c(%rsp) movq %r8, 0x10(%rsp) movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx callq 0x19d70 movq %rax, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) jne 0x19440 movl $0x0, 0x38(%rsp) movq $0x6, 0x40(%rsp) jmp 0x1948d movq 0x20(%rsp), %rax movq %rax, (%rsp) movq 0x8(%rsp), %rdi callq 0xe160 movq (%rsp), %rcx movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) movl 0x4c(%rsp), %eax testl %eax, %eax setne %al movzbl %al, %eax movl %eax, 0x58(%rsp) movq $0x1, 0x60(%rsp) movq 0x58(%rsp), %rcx movq 0x60(%rsp), %rax movq %rcx, 0x38(%rsp) movq %rax, 0x40(%rsp) movq 0x38(%rsp), %rax movq 0x40(%rsp), %rdx addq $0x68, %rsp retq nopl (%rax)
js_std_file_error: sub rsp, 68h mov [rsp+68h+var_40], rsi mov [rsp+68h+var_38], rdx mov [rsp+68h+var_48], rdi mov [rsp+68h+var_4C], ecx mov [rsp+68h+var_58], r8 mov rdi, [rsp+68h+var_48] mov rsi, [rsp+68h+var_40] mov rdx, [rsp+68h+var_38] call js_std_file_get mov [rsp+68h+var_60], rax cmp [rsp+68h+var_60], 0 jnz short loc_19440 mov dword ptr [rsp+68h+var_30], 0 mov [rsp+68h+var_28], 6 jmp short loc_1948D loc_19440: mov rax, [rsp+68h+var_48] mov [rsp+68h+var_68], rax mov rdi, [rsp+68h+var_60] call _ferror mov rcx, [rsp+68h+var_68] mov [rsp+68h+var_18], rcx mov [rsp+68h+var_1C], eax mov eax, [rsp+68h+var_1C] test eax, eax setnz al movzx eax, al mov dword ptr [rsp+68h+var_10], eax mov [rsp+68h+var_8], 1 mov rcx, [rsp+68h+var_10] mov rax, [rsp+68h+var_8] mov [rsp+68h+var_30], rcx mov [rsp+68h+var_28], rax loc_1948D: mov rax, [rsp+68h+var_30] mov rdx, [rsp+68h+var_28] add rsp, 68h retn
long long js_std_file_error(long long a1, long long a2, long long a3) { long long v4; // [rsp+8h] [rbp-60h] long long v5; // [rsp+38h] [rbp-30h] long long v6; // [rsp+58h] [rbp-10h] v4 = js_std_file_get(a1, a2, a3); if ( v4 ) { LODWORD(v6) = ferror(v4) != 0; return v6; } else { LODWORD(v5) = 0; } return v5; }
js_std_file_error: SUB RSP,0x68 MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RSP + 0x20],RDI MOV dword ptr [RSP + 0x1c],ECX MOV qword ptr [RSP + 0x10],R8 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] CALL 0x00119d70 MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x8],0x0 JNZ 0x00119440 MOV dword ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x40],0x6 JMP 0x0011948d LAB_00119440: MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x8] CALL 0x0010e160 MOV RCX,qword ptr [RSP] MOV qword ptr [RSP + 0x50],RCX MOV dword ptr [RSP + 0x4c],EAX MOV EAX,dword ptr [RSP + 0x4c] TEST EAX,EAX SETNZ AL MOVZX EAX,AL MOV dword ptr [RSP + 0x58],EAX MOV qword ptr [RSP + 0x60],0x1 MOV RCX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x38],RCX MOV qword ptr [RSP + 0x40],RAX LAB_0011948d: MOV RAX,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] ADD RSP,0x68 RET
int1 [16] js_std_file_error(int8 param_1,int8 param_2,int8 param_3) { int1 auVar1 [16]; int iVar2; FILE *__stream; int4 local_30; int4 uStack_2c; int8 local_28; int4 uStack_c; __stream = (FILE *)js_std_file_get(param_1,param_2,param_3); if (__stream == (FILE *)0x0) { local_30 = 0; local_28 = 6; } else { iVar2 = ferror(__stream); local_30 = (uint)(iVar2 != 0); uStack_2c = uStack_c; local_28 = 1; } auVar1._4_4_ = uStack_2c; auVar1._0_4_ = local_30; auVar1._8_8_ = local_28; return auVar1; }
13,670
js_string_trim
bluesky950520[P]quickjs/quickjs.c
static JSValue js_string_trim(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSValue str, ret; int a, b, len; JSString *p; str = JS_ToStringCheckObject(ctx, this_val); if (JS_IsException(str)) return str; p = JS_VALUE_GET_STRING(str); a = 0; b = len = p->len; if (magic & 1) { while (a < len && lre_is_space(string_get(p, a))) a++; } if (magic & 2) { while (b > a && lre_is_space(string_get(p, b - 1))) b--; } ret = js_sub_string(ctx, p, a, b); JS_FreeValue(ctx, str); return ret; }
O2
c
js_string_trim: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %r9d, %r13d movq %rdi, %rbx callq 0x3a290 movq %rax, %r15 movq %rdx, %r14 cmpl $0x6, %r14d jne 0x68d27 movq %r15, %rax movq %r14, %rdx jmp 0x68df8 movq %rbx, 0x10(%rsp) movq 0x4(%r15), %rbx movl %ebx, %ebp andl $0x7fffffff, %ebp # imm = 0x7FFFFFFF xorl %r12d, %r12d testb $0x1, %r13b je 0x68d83 movq %r14, 0x8(%rsp) movl %ebx, %r14d andl $0x7fffffff, %r14d # imm = 0x7FFFFFFF xorl %r12d, %r12d cmpq %r12, %r14 je 0x68d7b testb $-0x80, 0x7(%r15) jne 0x68d67 movzbl 0x18(%r15,%r12), %edi jmp 0x68d6d movzwl 0x18(%r15,%r12,2), %edi callq 0x7b908 testl %eax, %eax je 0x68d7e incq %r12 jmp 0x68d53 movl %ebp, %r12d movq 0x8(%rsp), %r14 testb $0x2, %r13b je 0x68dc9 movq %r14, %r13 andl $0x7fffffff, %ebx # imm = 0x7FFFFFFF movslq %r12d, %r14 cmpl %ebp, %r14d cmovll %r12d, %ebp cmpq %r14, %rbx jle 0x68dc6 testb $-0x80, 0x7(%r15) jne 0x68db0 movzbl 0x17(%r15,%rbx), %edi jmp 0x68db6 movzwl 0x16(%r15,%rbx,2), %edi callq 0x7b908 decq %rbx testl %eax, %eax jne 0x68d9c incl %ebx movl %ebx, %ebp movq %r13, %r14 movq 0x10(%rsp), %rbx movq %rbx, %rdi movq %r15, %rsi movl %r12d, %edx movl %ebp, %ecx callq 0x2e21d movq %rax, %r12 movq %rdx, %r13 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x1801e movq %r12, %rax movq %r13, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_string_trim: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r13d, r9d mov rbx, rdi call JS_ToStringCheckObject mov r15, rax mov r14, rdx cmp r14d, 6 jnz short loc_68D27 mov rax, r15 mov rdx, r14 jmp loc_68DF8 loc_68D27: mov [rsp+48h+var_38], rbx mov rbx, [r15+4] mov ebp, ebx and ebp, 7FFFFFFFh xor r12d, r12d test r13b, 1 jz short loc_68D83 mov [rsp+48h+var_40], r14 mov r14d, ebx and r14d, 7FFFFFFFh xor r12d, r12d loc_68D53: cmp r14, r12 jz short loc_68D7B test byte ptr [r15+7], 80h jnz short loc_68D67 movzx edi, byte ptr [r15+r12+18h] jmp short loc_68D6D loc_68D67: movzx edi, word ptr [r15+r12*2+18h] loc_68D6D: call lre_is_space test eax, eax jz short loc_68D7E inc r12 jmp short loc_68D53 loc_68D7B: mov r12d, ebp loc_68D7E: mov r14, [rsp+48h+var_40] loc_68D83: test r13b, 2 jz short loc_68DC9 mov r13, r14 and ebx, 7FFFFFFFh movsxd r14, r12d cmp r14d, ebp cmovl ebp, r12d loc_68D9C: cmp rbx, r14 jle short loc_68DC6 test byte ptr [r15+7], 80h jnz short loc_68DB0 movzx edi, byte ptr [r15+rbx+17h] jmp short loc_68DB6 loc_68DB0: movzx edi, word ptr [r15+rbx*2+16h] loc_68DB6: call lre_is_space dec rbx test eax, eax jnz short loc_68D9C inc ebx mov ebp, ebx loc_68DC6: mov r14, r13 loc_68DC9: mov rbx, [rsp+48h+var_38] mov rdi, rbx mov rsi, r15 mov edx, r12d mov ecx, ebp call js_sub_string mov r12, rax mov r13, rdx mov rdi, rbx mov rsi, r15 mov rdx, r14 call JS_FreeValue mov rax, r12 mov rdx, r13 loc_68DF8: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_string_trim( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { char v14; // r13 long long result; // rax long long v16; // rdx long long v17; // r15 long long v18; // r14 long long v19; // rbx int v20; // ebp long long i; // r12 long long v22; // rdi long long v23; // rbx long long v24; // rdi long long v25; // r12 long long v26; // [rsp+8h] [rbp-40h] v14 = a6; result = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v17 = result; v18 = v16; if ( (_DWORD)v16 != 6 ) { v19 = *(_QWORD *)(result + 4); v20 = v19 & 0x7FFFFFFF; LODWORD(i) = 0; if ( (v14 & 1) != 0 ) { v26 = v16; for ( i = 0LL; (v19 & 0x7FFFFFFF) != i; ++i ) { if ( *(char *)(v17 + 7) < 0 ) v22 = *(unsigned __int16 *)(v17 + 2 * i + 24); else v22 = *(unsigned __int8 *)(v17 + i + 24); if ( !(unsigned int)lre_is_space(v22) ) goto LABEL_11; } LODWORD(i) = v19 & 0x7FFFFFFF; LABEL_11: v18 = v26; } if ( (v14 & 2) != 0 ) { v23 = v19 & 0x7FFFFFFF; if ( (int)i < v20 ) v20 = i; while ( v23 > (int)i ) { if ( *(char *)(v17 + 7) < 0 ) v24 = *(unsigned __int16 *)(v17 + 2 * v23 + 22); else v24 = *(unsigned __int8 *)(v17 + v23 + 23); --v23; if ( !(unsigned int)lre_is_space(v24) ) { v20 = v23 + 1; break; } } } v25 = js_sub_string(a1, (_DWORD *)v17, (unsigned int)i, v20); JS_FreeValue(a1, v17, v18); return v25; } return result; }
js_string_trim: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R13D,R9D MOV RBX,RDI CALL 0x0013a290 MOV R15,RAX MOV R14,RDX CMP R14D,0x6 JNZ 0x00168d27 MOV RAX,R15 MOV RDX,R14 JMP 0x00168df8 LAB_00168d27: MOV qword ptr [RSP + 0x10],RBX MOV RBX,qword ptr [R15 + 0x4] MOV EBP,EBX AND EBP,0x7fffffff XOR R12D,R12D TEST R13B,0x1 JZ 0x00168d83 MOV qword ptr [RSP + 0x8],R14 MOV R14D,EBX AND R14D,0x7fffffff XOR R12D,R12D LAB_00168d53: CMP R14,R12 JZ 0x00168d7b TEST byte ptr [R15 + 0x7],0x80 JNZ 0x00168d67 MOVZX EDI,byte ptr [R15 + R12*0x1 + 0x18] JMP 0x00168d6d LAB_00168d67: MOVZX EDI,word ptr [R15 + R12*0x2 + 0x18] LAB_00168d6d: CALL 0x0017b908 TEST EAX,EAX JZ 0x00168d7e INC R12 JMP 0x00168d53 LAB_00168d7b: MOV R12D,EBP LAB_00168d7e: MOV R14,qword ptr [RSP + 0x8] LAB_00168d83: TEST R13B,0x2 JZ 0x00168dc9 MOV R13,R14 AND EBX,0x7fffffff MOVSXD R14,R12D CMP R14D,EBP CMOVL EBP,R12D LAB_00168d9c: CMP RBX,R14 JLE 0x00168dc6 TEST byte ptr [R15 + 0x7],0x80 JNZ 0x00168db0 MOVZX EDI,byte ptr [R15 + RBX*0x1 + 0x17] JMP 0x00168db6 LAB_00168db0: MOVZX EDI,word ptr [R15 + RBX*0x2 + 0x16] LAB_00168db6: CALL 0x0017b908 DEC RBX TEST EAX,EAX JNZ 0x00168d9c INC EBX MOV EBP,EBX LAB_00168dc6: MOV R14,R13 LAB_00168dc9: MOV RBX,qword ptr [RSP + 0x10] MOV RDI,RBX MOV RSI,R15 MOV EDX,R12D MOV ECX,EBP CALL 0x0012e21d MOV R12,RAX MOV R13,RDX MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x0011801e MOV RAX,R12 MOV RDX,R13 LAB_00168df8: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_string_trim(int8 param_1) { int iVar1; long lVar2; int8 uVar3; uint uVar4; uint uVar5; ushort uVar6; uint in_R9D; uint uVar7; ulong uVar8; int1 auVar9 [16]; auVar9 = JS_ToStringCheckObject(); uVar3 = auVar9._8_8_; lVar2 = auVar9._0_8_; if (auVar9._8_4_ != 6) { uVar4 = (uint)*(int8 *)(lVar2 + 4); uVar5 = uVar4 & 0x7fffffff; uVar7 = 0; if ((in_R9D & 1) != 0) { for (uVar8 = 0; (uVar4 & 0x7fffffff) != uVar8; uVar8 = uVar8 + 1) { if ((*(byte *)(lVar2 + 7) & 0x80) == 0) { uVar6 = (ushort)*(byte *)(lVar2 + 0x18 + uVar8); } else { uVar6 = *(ushort *)(lVar2 + 0x18 + uVar8 * 2); } iVar1 = lre_is_space(uVar6); if (iVar1 == 0) goto LAB_00168d7e; } uVar8 = (ulong)uVar5; LAB_00168d7e: uVar7 = (uint)uVar8; } if ((in_R9D & 2) != 0) { uVar8 = (ulong)(uVar4 & 0x7fffffff); if ((int)uVar7 < (int)uVar5) { uVar5 = uVar7; } do { if ((long)uVar8 <= (long)(int)uVar7) goto LAB_00168dc9; if ((*(byte *)(lVar2 + 7) & 0x80) == 0) { uVar6 = (ushort)*(byte *)(lVar2 + 0x17 + uVar8); } else { uVar6 = *(ushort *)(lVar2 + 0x16 + uVar8 * 2); } iVar1 = lre_is_space(uVar6); uVar8 = uVar8 - 1; } while (iVar1 != 0); uVar5 = (int)uVar8 + 1; } LAB_00168dc9: auVar9 = js_sub_string(param_1,lVar2,uVar7,uVar5); JS_FreeValue(param_1,lVar2,uVar3); } return auVar9; }
13,671
memcpy
seiftnesse[P]memoryallocator/src/custom_alloc_util.c
void *_memcpy(void *dest, const void *src, size_t bytes) { if (!dest || !src || bytes == 0) { HEAP_LOG("Invalid memcpy parameters: dest=%p, src=%p, bytes=%zu\n", dest, src, bytes); return dest; } // Use 64-bit copies for aligned data when possible size_t i = 0; if (!(((uintptr_t) dest | (uintptr_t) src | bytes) & 7)) { size_t qwords = bytes >> 3; uint64_t *qdest = (uint64_t *) dest; const uint64_t *qsrc = (const uint64_t *) src; for (i = 0; i < qwords; ++i) { *qdest++ = *qsrc++; } i = qwords << 3; HEAP_LOG("Used optimized 64-bit copy for %zu qwords\n", qwords); } // Copy remaining bytes char *cdest = (char *) dest + i; const char *csrc = (char *) src + i; for (; i < bytes; ++i) { *cdest++ = *csrc++; } HEAP_LOG("Memory copied: %zu bytes from %p to %p\n", bytes, src, dest); return dest; }
O0
c
memcpy: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) cmpq $0x0, -0x10(%rbp) je 0x2c95 cmpq $0x0, -0x18(%rbp) je 0x2c95 cmpq $0x0, -0x20(%rbp) jne 0x2ca2 movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x2d89 movq $0x0, -0x28(%rbp) movq -0x10(%rbp), %rax movq -0x18(%rbp), %rcx orq %rcx, %rax orq -0x20(%rbp), %rax andq $0x7, %rax cmpq $0x0, %rax jne 0x2d2f movq -0x20(%rbp), %rax shrq $0x3, %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq $0x0, -0x28(%rbp) movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x2d23 movq -0x40(%rbp), %rax movq %rax, %rcx addq $0x8, %rcx movq %rcx, -0x40(%rbp) movq (%rax), %rcx movq -0x38(%rbp), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, -0x38(%rbp) movq %rcx, (%rax) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x2ce7 movq -0x30(%rbp), %rax shlq $0x3, %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x18(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x2d81 movq -0x50(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x50(%rbp) movb (%rax), %cl movq -0x48(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x48(%rbp) movb %cl, (%rax) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x2d47 movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nop
_memcpy: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx cmp [rbp+var_10], 0 jz short loc_2C95 cmp [rbp+var_18], 0 jz short loc_2C95 cmp [rbp+var_20], 0 jnz short loc_2CA2 loc_2C95: mov rax, [rbp+var_10] mov [rbp+var_8], rax jmp loc_2D89 loc_2CA2: mov [rbp+var_28], 0 mov rax, [rbp+var_10] mov rcx, [rbp+var_18] or rax, rcx or rax, [rbp+var_20] and rax, 7 cmp rax, 0 jnz short loc_2D2F mov rax, [rbp+var_20] shr rax, 3 mov [rbp+var_30], rax mov rax, [rbp+var_10] mov [rbp+var_38], rax mov rax, [rbp+var_18] mov [rbp+var_40], rax mov [rbp+var_28], 0 loc_2CE7: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnb short loc_2D23 mov rax, [rbp+var_40] mov rcx, rax add rcx, 8 mov [rbp+var_40], rcx mov rcx, [rax] mov rax, [rbp+var_38] mov rdx, rax add rdx, 8 mov [rbp+var_38], rdx mov [rax], rcx mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_2CE7 loc_2D23: mov rax, [rbp+var_30] shl rax, 3 mov [rbp+var_28], rax loc_2D2F: mov rax, [rbp+var_10] add rax, [rbp+var_28] mov [rbp+var_48], rax mov rax, [rbp+var_18] add rax, [rbp+var_28] mov [rbp+var_50], rax loc_2D47: mov rax, [rbp+var_28] cmp rax, [rbp+var_20] jnb short loc_2D81 mov rax, [rbp+var_50] mov rcx, rax add rcx, 1 mov [rbp+var_50], rcx mov cl, [rax] mov rax, [rbp+var_48] mov rdx, rax add rdx, 1 mov [rbp+var_48], rdx mov [rax], cl mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_2D47 loc_2D81: mov rax, [rbp+var_10] mov [rbp+var_8], rax loc_2D89: mov rax, [rbp+var_8] pop rbp retn
_QWORD * memcpy(_QWORD *a1, long long *a2, unsigned long long a3) { long long *v3; // rax long long v4; // rcx _QWORD *v5; // rax char *v6; // rax char v7; // cl _BYTE *v8; // rax char *v10; // [rsp+0h] [rbp-50h] _BYTE *v11; // [rsp+8h] [rbp-48h] long long *v12; // [rsp+10h] [rbp-40h] _QWORD *v13; // [rsp+18h] [rbp-38h] unsigned long long v14; // [rsp+20h] [rbp-30h] unsigned long long v15; // [rsp+28h] [rbp-28h] unsigned long long i; // [rsp+28h] [rbp-28h] if ( !a1 || !a2 || !a3 ) return a1; v15 = 0LL; if ( (((unsigned __int8)a3 | (unsigned __int8)((unsigned __int8)a2 | (unsigned __int8)a1)) & 7) == 0 ) { v14 = a3 >> 3; v13 = a1; v12 = a2; for ( i = 0LL; i < v14; ++i ) { v3 = v12++; v4 = *v3; v5 = v13++; *v5 = v4; } v15 = 8 * v14; } v11 = (char *)a1 + v15; v10 = (char *)a2 + v15; while ( v15 < a3 ) { v6 = v10++; v7 = *v6; v8 = v11++; *v8 = v7; ++v15; } return a1; }
_memcpy: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX CMP qword ptr [RBP + -0x10],0x0 JZ 0x00102c95 CMP qword ptr [RBP + -0x18],0x0 JZ 0x00102c95 CMP qword ptr [RBP + -0x20],0x0 JNZ 0x00102ca2 LAB_00102c95: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX JMP 0x00102d89 LAB_00102ca2: MOV qword ptr [RBP + -0x28],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x18] OR RAX,RCX OR RAX,qword ptr [RBP + -0x20] AND RAX,0x7 CMP RAX,0x0 JNZ 0x00102d2f MOV RAX,qword ptr [RBP + -0x20] SHR RAX,0x3 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV qword ptr [RBP + -0x28],0x0 LAB_00102ce7: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNC 0x00102d23 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,RAX ADD RCX,0x8 MOV qword ptr [RBP + -0x40],RCX MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x38] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RBP + -0x38],RDX MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x00102ce7 LAB_00102d23: MOV RAX,qword ptr [RBP + -0x30] SHL RAX,0x3 MOV qword ptr [RBP + -0x28],RAX LAB_00102d2f: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x50],RAX LAB_00102d47: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x20] JNC 0x00102d81 MOV RAX,qword ptr [RBP + -0x50] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x50],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x48] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x48],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x00102d47 LAB_00102d81: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX LAB_00102d89: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
void * _memcpy(void *__dest,void *__src,size_t __n) { int1 *local_58; int1 *local_50; int8 *local_48; int8 *local_40; ulong local_30; if (((__dest != (void *)0x0) && (__src != (void *)0x0)) && (__n != 0)) { local_30 = 0; if ((((ulong)__dest | (ulong)__src | __n) & 7) == 0) { local_48 = (int8 *)__src; local_40 = (int8 *)__dest; for (local_30 = 0; local_30 < __n >> 3; local_30 = local_30 + 1) { *local_40 = *local_48; local_48 = local_48 + 1; local_40 = local_40 + 1; } local_30 = (__n >> 3) << 3; } local_58 = (int1 *)((long)__src + local_30); local_50 = (int1 *)((long)__dest + local_30); for (; local_30 < __n; local_30 = local_30 + 1) { *local_50 = *local_58; local_58 = local_58 + 1; local_50 = local_50 + 1; } } return __dest; }
13,672
sp_add_point_to_mbr
eloqsql/storage/myisam/sp_key.c
static int sp_add_point_to_mbr(uchar *(*wkb), uchar *end, uint n_dims, uchar byte_order __attribute__((unused)), double *mbr) { double ord; double *mbr_end= mbr + n_dims * 2; while (mbr < mbr_end) { if ((*wkb) > end - 8) return -1; float8get(ord, (const uchar*) *wkb); (*wkb)+= 8; if (ord < *mbr) *mbr= ord; mbr++; if (ord > *mbr) *mbr= ord; mbr++; } return 0; }
O0
c
sp_add_point_to_mbr: pushq %rbp movq %rsp, %rbp movb %cl, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movb %al, -0x1d(%rbp) movq %r8, -0x28(%rbp) movq -0x28(%rbp), %rax movl -0x1c(%rbp), %ecx shll %ecx movl %ecx, %ecx shlq $0x3, %rcx addq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x28(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x5dbee movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x18(%rbp), %rcx addq $-0x8, %rcx cmpq %rcx, %rax jbe 0x5db79 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x5dbf5 movq -0x10(%rbp), %rax movq (%rax), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x8, %rcx movq %rcx, (%rax) movsd -0x30(%rbp), %xmm1 movq -0x28(%rbp), %rax movsd (%rax), %xmm0 ucomisd %xmm1, %xmm0 jbe 0x5dbb5 movsd -0x30(%rbp), %xmm0 movq -0x28(%rbp), %rax movsd %xmm0, (%rax) movq -0x28(%rbp), %rax addq $0x8, %rax movq %rax, -0x28(%rbp) movsd -0x30(%rbp), %xmm0 movq -0x28(%rbp), %rax ucomisd (%rax), %xmm0 jbe 0x5dbdd movsd -0x30(%rbp), %xmm0 movq -0x28(%rbp), %rax movsd %xmm0, (%rax) movq -0x28(%rbp), %rax addq $0x8, %rax movq %rax, -0x28(%rbp) jmp 0x5db4e movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
sp_add_point_to_mbr: push rbp mov rbp, rsp mov al, cl mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_1D], al mov [rbp+var_28], r8 mov rax, [rbp+var_28] mov ecx, [rbp+var_1C] shl ecx, 1 mov ecx, ecx shl rcx, 3 add rax, rcx mov [rbp+var_38], rax loc_5DB4E: mov rax, [rbp+var_28] cmp rax, [rbp+var_38] jnb loc_5DBEE mov rax, [rbp+var_10] mov rax, [rax] mov rcx, [rbp+var_18] add rcx, 0FFFFFFFFFFFFFFF8h cmp rax, rcx jbe short loc_5DB79 mov [rbp+var_4], 0FFFFFFFFh jmp short loc_5DBF5 loc_5DB79: mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 8 mov [rax], rcx movsd xmm1, [rbp+var_30] mov rax, [rbp+var_28] movsd xmm0, qword ptr [rax] ucomisd xmm0, xmm1 jbe short loc_5DBB5 movsd xmm0, [rbp+var_30] mov rax, [rbp+var_28] movsd qword ptr [rax], xmm0 loc_5DBB5: mov rax, [rbp+var_28] add rax, 8 mov [rbp+var_28], rax movsd xmm0, [rbp+var_30] mov rax, [rbp+var_28] ucomisd xmm0, qword ptr [rax] jbe short loc_5DBDD movsd xmm0, [rbp+var_30] mov rax, [rbp+var_28] movsd qword ptr [rax], xmm0 loc_5DBDD: mov rax, [rbp+var_28] add rax, 8 mov [rbp+var_28], rax jmp loc_5DB4E loc_5DBEE: mov [rbp+var_4], 0 loc_5DBF5: mov eax, [rbp+var_4] pop rbp retn
long long sp_add_point_to_mbr(unsigned long long *a1, long long a2, int a3, long long a4, double *a5) { double v6; // [rsp+8h] [rbp-30h] double *i; // [rsp+10h] [rbp-28h] double *v8; // [rsp+10h] [rbp-28h] for ( i = a5; i < &a5[2 * a3]; i = v8 + 1 ) { if ( *a1 > a2 - 8 ) return (unsigned int)-1; v6 = *(double *)*a1; *a1 += 8LL; if ( *i > v6 ) *i = v6; v8 = i + 1; if ( v6 > *v8 ) *v8 = v6; } return 0; }
sp_add_point_to_mbr: PUSH RBP MOV RBP,RSP MOV AL,CL MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV byte ptr [RBP + -0x1d],AL MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RBP + -0x1c] SHL ECX,0x1 MOV ECX,ECX SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX LAB_0015db4e: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x38] JNC 0x0015dbee MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] ADD RCX,-0x8 CMP RAX,RCX JBE 0x0015db79 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0015dbf5 LAB_0015db79: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x8 MOV qword ptr [RAX],RCX MOVSD XMM1,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x28] MOVSD XMM0,qword ptr [RAX] UCOMISD XMM0,XMM1 JBE 0x0015dbb5 MOVSD XMM0,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x28] MOVSD qword ptr [RAX],XMM0 LAB_0015dbb5: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x8 MOV qword ptr [RBP + -0x28],RAX MOVSD XMM0,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x28] UCOMISD XMM0,qword ptr [RAX] JBE 0x0015dbdd MOVSD XMM0,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x28] MOVSD qword ptr [RAX],XMM0 LAB_0015dbdd: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x8 MOV qword ptr [RBP + -0x28],RAX JMP 0x0015db4e LAB_0015dbee: MOV dword ptr [RBP + -0x4],0x0 LAB_0015dbf5: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 sp_add_point_to_mbr(ulong *param_1,long param_2,int param_3,int8 param_4,double *param_5) { double dVar1; double *pdVar2; double *local_30; local_30 = param_5; while( true ) { if (param_5 + (uint)(param_3 << 1) <= local_30) { return 0; } if (param_2 - 8U < *param_1) break; dVar1 = *(double *)*param_1; *param_1 = *param_1 + 8; if (dVar1 < *local_30) { *local_30 = dVar1; } pdVar2 = local_30 + 1; if (*pdVar2 <= dVar1 && dVar1 != *pdVar2) { *pdVar2 = dVar1; } local_30 = local_30 + 2; } return 0xffffffff; }
13,673
run_bind_stmt(st_connection*, st_command*, char const*, unsigned long, st_dynamic_string*, st_dynamic_string*)
eloqsql/client/mysqltest.cc
void run_bind_stmt(struct st_connection *cn, struct st_command *command, const char *query, size_t query_len, DYNAMIC_STRING *ds, DYNAMIC_STRING *ds_warnings ) { MYSQL_STMT *stmt= cn->stmt; DBUG_ENTER("run_bind_stmt"); DBUG_PRINT("query", ("'%-.60s'", query)); MYSQL_BIND *ps_params= cn->ps_params; if (ps_params) { for (size_t i=0; i<stmt->param_count; i++) { my_free(ps_params[i].buffer); ps_params[i].buffer= NULL; } my_free(ps_params); ps_params= NULL; } /* Init PS-parameters. */ cn->ps_params= ps_params = (MYSQL_BIND*)my_malloc(PSI_NOT_INSTRUMENTED, sizeof(MYSQL_BIND) * stmt->param_count, MYF(MY_WME)); bzero((char *) ps_params, sizeof(MYSQL_BIND) * stmt->param_count); int i=0; char *c; long *l; double *d; char *p= strtok((char*)command->first_argument, " "); while (p != nullptr) { (void)strtol(p, &c, 10); if (!*c) { ps_params[i].buffer_type= MYSQL_TYPE_LONG; l= (long*)my_malloc(PSI_NOT_INSTRUMENTED, sizeof(long), MYF(MY_WME)); *l= strtol(p, &c, 10); ps_params[i].buffer= (void*)l; ps_params[i].buffer_length= 8; } else { (void)strtod(p, &c); if (!*c) { ps_params[i].buffer_type= MYSQL_TYPE_DECIMAL; d= (double*)my_malloc(PSI_NOT_INSTRUMENTED, sizeof(double), MYF(MY_WME)); *d= strtod(p, &c); ps_params[i].buffer= (void*)d; ps_params[i].buffer_length= 8; } else { ps_params[i].buffer_type= MYSQL_TYPE_STRING; ps_params[i].buffer= my_strdup(PSI_NOT_INSTRUMENTED, p, MYF(MY_WME)); ps_params[i].buffer_length= (unsigned long)strlen(p); } } p= strtok(nullptr, " "); i++; } int rc= mysql_stmt_bind_param(stmt, ps_params); if (rc) { die("mysql_stmt_bind_param() failed': %d %s", mysql_stmt_errno(stmt), mysql_stmt_error(stmt)); } DBUG_VOID_RETURN; }
O3
cpp
run_bind_stmt(st_connection*, st_command*, char const*, unsigned long, st_dynamic_string*, st_dynamic_string*): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %rbx movq %rdi, %r12 movq 0x20(%rdi), %r15 movq 0x28(%rdi), %r14 testq %r14, %r14 je 0x6c0b0 movq %rbx, -0x30(%rbp) cmpl $0x0, 0x64(%r15) je 0x6c0a4 leaq 0x10(%r14), %rbx xorl %r13d, %r13d movq (%rbx), %rdi callq 0x9c92a movq $0x0, (%rbx) incq %r13 movl 0x64(%r15), %eax addq $0x70, %rbx cmpq %rax, %r13 jb 0x6c085 movq %r14, %rdi callq 0x9c92a movq -0x30(%rbp), %rbx movl 0x64(%r15), %eax imulq $0x70, %rax, %rsi movl $0x10, %edx xorl %edi, %edi callq 0x9c6fd movq %rax, %rdi movq %rax, 0x28(%r12) movq %r15, -0x40(%rbp) movl 0x64(%r15), %eax imulq $0x70, %rax, %rdx movq %rdi, -0x30(%rbp) xorl %esi, %esi callq 0x5f370 movq 0x10(%rbx), %rdi leaq 0xa36c0(%rip), %rsi # 0x10f7ae callq 0x5f300 testq %rax, %rax je 0x6c1f1 movq %rax, %r13 movq -0x30(%rbp), %r12 addq $0x60, %r12 leaq -0x38(%rbp), %r15 movq %r13, %rdi movq %r15, %rsi movl $0xa, %edx callq 0x5fb00 movq -0x38(%rbp), %rax cmpb $0x0, (%rax) je 0x6c161 movq %r13, %rdi movq %r15, %rsi callq 0x5fee0 movq -0x38(%rbp), %rax cmpb $0x0, (%rax) je 0x6c198 movl $0xfe, (%r12) movl $0x10, %edx xorl %edi, %edi movq %r13, %rsi callq 0x9c9c0 movq %rax, -0x50(%r12) movq %r13, %rdi callq 0x5f480 movq %rax, %r14 jmp 0x6c1ce movl $0x3, (%r12) movl $0x8, %r14d movl $0x8, %esi movl $0x10, %edx xorl %edi, %edi callq 0x9c6fd movq %rax, %rbx movq %r13, %rdi movq %r15, %rsi movl $0xa, %edx callq 0x5fb00 movq %rax, (%rbx) jmp 0x6c1c9 movl $0x0, (%r12) movl $0x8, %r14d movl $0x8, %esi movl $0x10, %edx xorl %edi, %edi callq 0x9c6fd movq %rax, %rbx movq %r13, %rdi movq %r15, %rsi callq 0x5fee0 movsd %xmm0, (%rbx) movq %rbx, -0x50(%r12) movq %r14, -0x20(%r12) xorl %edi, %edi leaq 0xa35d2(%rip), %rsi # 0x10f7ae callq 0x5f300 movq %rax, %r13 addq $0x70, %r12 testq %rax, %rax jne 0x6c10b movq -0x40(%rbp), %r14 movq %r14, %rdi movq -0x30(%rbp), %rsi callq 0x7d636 testb %al, %al jne 0x6c214 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r14, %rdi callq 0x7dc98 movl %eax, %ebx movq %r14, %rdi callq 0x7dca4 leaq 0x86574(%rip), %rdi # 0xf27a1 movl %ebx, %esi movq %rax, %rdx xorl %eax, %eax callq 0x62bd2
_Z13run_bind_stmtP13st_connectionP10st_commandPKcmP17st_dynamic_stringS6_: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rsi mov r12, rdi mov r15, [rdi+20h] mov r14, [rdi+28h] test r14, r14 jz short loc_6C0B0 mov [rbp+var_30], rbx cmp dword ptr [r15+64h], 0 jz short loc_6C0A4 lea rbx, [r14+10h] xor r13d, r13d loc_6C085: mov rdi, [rbx] call my_free mov qword ptr [rbx], 0 inc r13 mov eax, [r15+64h] add rbx, 70h ; 'p' cmp r13, rax jb short loc_6C085 loc_6C0A4: mov rdi, r14 call my_free mov rbx, [rbp+var_30] loc_6C0B0: mov eax, [r15+64h] imul rsi, rax, 70h ; 'p' mov edx, 10h xor edi, edi call my_malloc mov rdi, rax mov [r12+28h], rax mov [rbp+var_40], r15 mov eax, [r15+64h] imul rdx, rax, 70h ; 'p' mov [rbp+var_30], rdi xor esi, esi call _memset mov rdi, [rbx+10h] lea rsi, asc_10F7AD+1; " " call _strtok test rax, rax jz loc_6C1F1 mov r13, rax mov r12, [rbp+var_30] add r12, 60h ; '`' lea r15, [rbp+var_38] loc_6C10B: mov rdi, r13 mov rsi, r15 mov edx, 0Ah call ___isoc23_strtol mov rax, [rbp+var_38] cmp byte ptr [rax], 0 jz short loc_6C161 mov rdi, r13 mov rsi, r15 call _strtod mov rax, [rbp+var_38] cmp byte ptr [rax], 0 jz short loc_6C198 mov dword ptr [r12], 0FEh mov edx, 10h xor edi, edi mov rsi, r13 call my_strdup mov [r12-50h], rax mov rdi, r13 call _strlen mov r14, rax jmp short loc_6C1CE loc_6C161: mov dword ptr [r12], 3 mov r14d, 8 mov esi, 8 mov edx, 10h xor edi, edi call my_malloc mov rbx, rax mov rdi, r13 mov rsi, r15 mov edx, 0Ah call ___isoc23_strtol mov [rbx], rax jmp short loc_6C1C9 loc_6C198: mov dword ptr [r12], 0 mov r14d, 8 mov esi, 8 mov edx, 10h xor edi, edi call my_malloc mov rbx, rax mov rdi, r13 mov rsi, r15 call _strtod movsd qword ptr [rbx], xmm0 loc_6C1C9: mov [r12-50h], rbx loc_6C1CE: mov [r12-20h], r14 xor edi, edi lea rsi, asc_10F7AD+1; " " call _strtok mov r13, rax add r12, 70h ; 'p' test rax, rax jnz loc_6C10B loc_6C1F1: mov r14, [rbp+var_40] mov rdi, r14 mov rsi, [rbp+var_30] call mysql_stmt_bind_param test al, al jnz short loc_6C214 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6C214: mov rdi, r14 call mysql_stmt_errno mov ebx, eax mov rdi, r14 call mysql_stmt_error lea rdi, aMysqlStmtBindP_0; "mysql_stmt_bind_param() failed': %d %s" mov esi, ebx mov rdx, rax xor eax, eax call _ZL3diePKcz; die(char const*,...)
long long run_bind_stmt( long long a1, long long a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { long long v10; // rbx long long v11; // r15 long long v12; // r14 _QWORD *v13; // rbx unsigned long long v14; // r13 long long v15; // rax long long v16; // rdx long long v17; // rax long long v18; // r13 _DWORD *v19; // r12 long long v20; // r14 _QWORD *v21; // rbx long long result; // rax unsigned int v23; // ebx long long v24; // rax __va_list_tag *v25; // rcx long long v26; // r8 long long v27; // r9 __m128 v28; // xmm4 __m128 v29; // xmm5 _BYTE *v30; // [rsp+8h] [rbp-38h] BYREF long long v31; // [rsp+10h] [rbp-30h] v10 = a2; v11 = *(_QWORD *)(a1 + 32); v12 = *(_QWORD *)(a1 + 40); if ( v12 ) { v31 = a2; if ( *(_DWORD *)(v11 + 100) ) { v13 = (_QWORD *)(v12 + 16); v14 = 0LL; do { my_free(*v13); *v13 = 0LL; ++v14; v13 += 14; } while ( v14 < *(unsigned int *)(v11 + 100) ); } my_free(v12); v10 = v31; } v15 = my_malloc(0LL, 112LL * *(unsigned int *)(v11 + 100)); *(_QWORD *)(a1 + 40) = v15; v16 = 112LL * *(unsigned int *)(v11 + 100); v31 = v15; memset(v15, 0LL, v16); v17 = strtok(*(_QWORD *)(v10 + 16), " "); if ( v17 ) { v18 = v17; v19 = (_DWORD *)(v31 + 96); while ( 1 ) { __isoc23_strtol(v18, &v30, 10LL); if ( !*v30 ) break; strtod(v18, &v30); if ( !*v30 ) { *v19 = 0; v20 = 8LL; v21 = (_QWORD *)my_malloc(0LL, 8LL); *(double *)a3.m128_u64 = strtod(v18, &v30); *v21 = a3.m128_u64[0]; goto LABEL_13; } *v19 = 254; *((_QWORD *)v19 - 10) = my_strdup(0LL, v18, 16LL); v20 = strlen(v18); LABEL_14: *((_QWORD *)v19 - 4) = v20; v18 = strtok(0LL, " "); v19 += 28; if ( !v18 ) goto LABEL_15; } *v19 = 3; v20 = 8LL; v21 = (_QWORD *)my_malloc(0LL, 8LL); *v21 = __isoc23_strtol(v18, &v30, 10LL); LABEL_13: *((_QWORD *)v19 - 10) = v21; goto LABEL_14; } LABEL_15: result = mysql_stmt_bind_param(v11, v31); if ( (_BYTE)result ) { v23 = mysql_stmt_errno(v11); v24 = mysql_stmt_error(v11); die("mysql_stmt_bind_param() failed': %d %s", v23, v24, v25, v26, v27, a3, a4, a5, a6, v28, v29, a9, a10, v11); } return result; }
run_bind_stmt: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RSI MOV R12,RDI MOV R15,qword ptr [RDI + 0x20] MOV R14,qword ptr [RDI + 0x28] TEST R14,R14 JZ 0x0016c0b0 MOV qword ptr [RBP + -0x30],RBX CMP dword ptr [R15 + 0x64],0x0 JZ 0x0016c0a4 LEA RBX,[R14 + 0x10] XOR R13D,R13D LAB_0016c085: MOV RDI,qword ptr [RBX] CALL 0x0019c92a MOV qword ptr [RBX],0x0 INC R13 MOV EAX,dword ptr [R15 + 0x64] ADD RBX,0x70 CMP R13,RAX JC 0x0016c085 LAB_0016c0a4: MOV RDI,R14 CALL 0x0019c92a MOV RBX,qword ptr [RBP + -0x30] LAB_0016c0b0: MOV EAX,dword ptr [R15 + 0x64] IMUL RSI,RAX,0x70 MOV EDX,0x10 XOR EDI,EDI CALL 0x0019c6fd MOV RDI,RAX MOV qword ptr [R12 + 0x28],RAX MOV qword ptr [RBP + -0x40],R15 MOV EAX,dword ptr [R15 + 0x64] IMUL RDX,RAX,0x70 MOV qword ptr [RBP + -0x30],RDI XOR ESI,ESI CALL 0x0015f370 MOV RDI,qword ptr [RBX + 0x10] LEA RSI,[0x20f7ae] CALL 0x0015f300 TEST RAX,RAX JZ 0x0016c1f1 MOV R13,RAX MOV R12,qword ptr [RBP + -0x30] ADD R12,0x60 LEA R15,[RBP + -0x38] LAB_0016c10b: MOV RDI,R13 MOV RSI,R15 MOV EDX,0xa CALL 0x0015fb00 MOV RAX,qword ptr [RBP + -0x38] CMP byte ptr [RAX],0x0 JZ 0x0016c161 MOV RDI,R13 MOV RSI,R15 CALL 0x0015fee0 MOV RAX,qword ptr [RBP + -0x38] CMP byte ptr [RAX],0x0 JZ 0x0016c198 MOV dword ptr [R12],0xfe MOV EDX,0x10 XOR EDI,EDI MOV RSI,R13 CALL 0x0019c9c0 MOV qword ptr [R12 + -0x50],RAX MOV RDI,R13 CALL 0x0015f480 MOV R14,RAX JMP 0x0016c1ce LAB_0016c161: MOV dword ptr [R12],0x3 MOV R14D,0x8 MOV ESI,0x8 MOV EDX,0x10 XOR EDI,EDI CALL 0x0019c6fd MOV RBX,RAX MOV RDI,R13 MOV RSI,R15 MOV EDX,0xa CALL 0x0015fb00 MOV qword ptr [RBX],RAX JMP 0x0016c1c9 LAB_0016c198: MOV dword ptr [R12],0x0 MOV R14D,0x8 MOV ESI,0x8 MOV EDX,0x10 XOR EDI,EDI CALL 0x0019c6fd MOV RBX,RAX MOV RDI,R13 MOV RSI,R15 CALL 0x0015fee0 MOVSD qword ptr [RBX],XMM0 LAB_0016c1c9: MOV qword ptr [R12 + -0x50],RBX LAB_0016c1ce: MOV qword ptr [R12 + -0x20],R14 XOR EDI,EDI LEA RSI,[0x20f7ae] CALL 0x0015f300 MOV R13,RAX ADD R12,0x70 TEST RAX,RAX JNZ 0x0016c10b LAB_0016c1f1: MOV R14,qword ptr [RBP + -0x40] MOV RDI,R14 MOV RSI,qword ptr [RBP + -0x30] CALL 0x0017d636 TEST AL,AL JNZ 0x0016c214 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016c214: MOV RDI,R14 CALL 0x0017dc98 MOV EBX,EAX MOV RDI,R14 CALL 0x0017dca4 LEA RDI,[0x1f27a1] MOV ESI,EBX MOV RDX,RAX XOR EAX,EAX CALL 0x00162bd2
/* run_bind_stmt(st_connection*, st_command*, char const*, unsigned long, st_dynamic_string*, st_dynamic_string*) */ void run_bind_stmt(st_connection *param_1,st_command *param_2,char *param_3,ulong param_4, st_dynamic_string *param_5,st_dynamic_string *param_6) { long lVar1; long lVar2; char cVar3; uint uVar4; char *__nptr; int8 uVar5; size_t sVar6; double *pdVar7; int8 *puVar8; int4 *puVar9; ulong uVar10; double dVar11; char *local_40; st_command *local_38; lVar1 = *(long *)(param_1 + 0x20); lVar2 = *(long *)(param_1 + 0x28); if (lVar2 != 0) { local_38 = param_2; if (*(int *)(lVar1 + 100) != 0) { puVar8 = (int8 *)(lVar2 + 0x10); uVar10 = 0; do { my_free(*puVar8); *puVar8 = 0; uVar10 = uVar10 + 1; puVar8 = puVar8 + 0xe; } while (uVar10 < *(uint *)(lVar1 + 100)); } my_free(lVar2); param_2 = local_38; } local_38 = (st_command *)my_malloc(0,(ulong)*(uint *)(lVar1 + 100) * 0x70,0x10); *(st_command **)(param_1 + 0x28) = local_38; memset(local_38,0,(ulong)*(uint *)(lVar1 + 100) * 0x70); __nptr = strtok(*(char **)(param_2 + 0x10)," "); if (__nptr != (char *)0x0) { puVar9 = (int4 *)((long)local_38 + 0x60); do { __isoc23_strtol(__nptr,&local_40,10); if (*local_40 == '\0') { *puVar9 = 3; pdVar7 = (double *)my_malloc(0,8,0x10); dVar11 = (double)__isoc23_strtol(__nptr,&local_40,10); *pdVar7 = dVar11; LAB_0016c1c9: sVar6 = 8; *(double **)(puVar9 + -0x14) = pdVar7; } else { strtod(__nptr,&local_40); if (*local_40 == '\0') { *puVar9 = 0; pdVar7 = (double *)my_malloc(0,8,0x10); dVar11 = strtod(__nptr,&local_40); *pdVar7 = dVar11; goto LAB_0016c1c9; } *puVar9 = 0xfe; uVar5 = my_strdup(0,__nptr,0x10); *(int8 *)(puVar9 + -0x14) = uVar5; sVar6 = strlen(__nptr); } *(size_t *)(puVar9 + -8) = sVar6; __nptr = strtok((char *)0x0," "); puVar9 = puVar9 + 0x1c; } while (__nptr != (char *)0x0); } cVar3 = mysql_stmt_bind_param(lVar1,local_38); if (cVar3 == '\0') { return; } uVar4 = mysql_stmt_errno(lVar1); uVar5 = mysql_stmt_error(lVar1); /* WARNING: Subroutine does not return */ die("mysql_stmt_bind_param() failed\': %d %s",(ulong)uVar4,uVar5); }
13,674
Tools::username[abi:cxx11]()
cosmotop/src/cosmotop_tools_shared.cpp
string username() { auto user = getenv("LOGNAME"); if (user == nullptr or strlen(user) == 0) user = getenv("USER"); return (user != nullptr ? user : ""); }
O0
cpp
Tools::username[abi:cxx11](): subq $0x68, %rsp movq %rdi, 0x10(%rsp) movq %rdi, %rax movq %rax, 0x18(%rsp) movq %rdi, 0x40(%rsp) leaq 0x227b1d(%rip), %rdi # 0x31b00a callq 0x16b00 movq %rax, 0x38(%rsp) cmpq $0x0, 0x38(%rsp) je 0xf350f movq 0x38(%rsp), %rdi callq 0x16550 cmpq $0x0, %rax jne 0xf3520 leaq 0x227afc(%rip), %rdi # 0x31b012 callq 0x16b00 movq %rax, 0x38(%rsp) cmpq $0x0, 0x38(%rsp) je 0xf3534 movq 0x38(%rsp), %rax movq %rax, 0x8(%rsp) jmp 0xf3542 leaq 0x227bf9(%rip), %rax # 0x31b134 movq %rax, 0x8(%rsp) jmp 0xf3542 movq 0x10(%rsp), %rdi movq 0x8(%rsp), %rsi leaq 0x37(%rsp), %rdx movq %rdx, 0x48(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x60(%rsp) callq 0x33160 jmp 0xf3567 movq 0x18(%rsp), %rax leaq 0x37(%rsp), %rcx movq %rcx, 0x50(%rsp) addq $0x68, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) leaq 0x37(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x28(%rsp), %rdi callq 0x16950 nopl (%rax)
_ZN5Tools8usernameB5cxx11Ev: sub rsp, 68h mov [rsp+68h+var_58], rdi mov rax, rdi mov [rsp+68h+var_50], rax mov [rsp+68h+var_28], rdi lea rdi, aLogname; "LOGNAME" call _getenv mov [rsp+68h+var_30], rax cmp [rsp+68h+var_30], 0 jz short loc_F350F mov rdi, [rsp+68h+var_30] call _strlen cmp rax, 0 jnz short loc_F3520 loc_F350F: lea rdi, aUser_0; "USER" call _getenv mov [rsp+68h+var_30], rax loc_F3520: cmp [rsp+68h+var_30], 0 jz short loc_F3534 mov rax, [rsp+68h+var_30] mov [rsp+68h+var_60], rax jmp short loc_F3542 loc_F3534: lea rax, byte_31B134 mov [rsp+68h+var_60], rax jmp short $+2 loc_F3542: mov rdi, [rsp+68h+var_58] mov rsi, [rsp+68h+var_60] lea rdx, [rsp+68h+var_31] mov [rsp+68h+var_20], rdx mov rax, [rsp+68h+var_20] mov [rsp+68h+var_8], rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_F3567: mov rax, [rsp+68h+var_50] lea rcx, [rsp+68h+var_31] mov [rsp+68h+var_18], rcx add rsp, 68h retn mov rcx, rax mov eax, edx mov [rsp+arg_20], rcx mov [rsp+arg_1C], eax lea rax, [rsp+arg_2F] mov [rsp+arg_50], rax mov rdi, [rsp+arg_20] call __Unwind_Resume
long long Tools::username[abi:cxx11](long long a1) { const char *v2; // [rsp+8h] [rbp-60h] char v3; // [rsp+37h] [rbp-31h] BYREF long long v4; // [rsp+38h] [rbp-30h] long long v5; // [rsp+40h] [rbp-28h] char *v6; // [rsp+48h] [rbp-20h] char *v7; // [rsp+60h] [rbp-8h] v5 = a1; v4 = getenv("LOGNAME"); if ( !v4 || !strlen(v4) ) v4 = getenv("USER"); if ( v4 ) v2 = (const char *)v4; else v2 = &byte_31B134; v6 = &v3; v7 = &v3; std::string::basic_string<std::allocator<char>>(a1, (long long)v2, (long long)&v3); return a1; }
username[abi:cxx11]: SUB RSP,0x68 MOV qword ptr [RSP + 0x10],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x40],RDI LEA RDI,[0x41b00a] CALL 0x00116b00 MOV qword ptr [RSP + 0x38],RAX CMP qword ptr [RSP + 0x38],0x0 JZ 0x001f350f MOV RDI,qword ptr [RSP + 0x38] CALL 0x00116550 CMP RAX,0x0 JNZ 0x001f3520 LAB_001f350f: LEA RDI,[0x41b012] CALL 0x00116b00 MOV qword ptr [RSP + 0x38],RAX LAB_001f3520: CMP qword ptr [RSP + 0x38],0x0 JZ 0x001f3534 MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x8],RAX JMP 0x001f3542 LAB_001f3534: LEA RAX,[0x41b134] MOV qword ptr [RSP + 0x8],RAX JMP 0x001f3542 LAB_001f3542: MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x8] LEA RDX,[RSP + 0x37] MOV qword ptr [RSP + 0x48],RDX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x60],RAX LAB_001f3560: CALL 0x00133160 LAB_001f3565: JMP 0x001f3567 LAB_001f3567: MOV RAX,qword ptr [RSP + 0x18] LEA RCX,[RSP + 0x37] MOV qword ptr [RSP + 0x50],RCX ADD RSP,0x68 RET
/* Tools::username[abi:cxx11]() */ Tools * __thiscall Tools::username_abi_cxx11_(Tools *this) { size_t sVar1; char *local_60; allocator local_31; char *local_30; Tools *local_28; allocator *local_20; allocator *local_8; local_28 = this; local_30 = getenv("LOGNAME"); if (local_30 != (char *)0x0) { sVar1 = strlen(local_30); if (sVar1 != 0) goto LAB_001f3520; } local_30 = getenv("USER"); LAB_001f3520: if (local_30 == (char *)0x0) { local_60 = ""; } else { local_60 = local_30; } local_20 = &local_31; local_8 = local_20; /* try { // try from 001f3560 to 001f3564 has its CatchHandler @ 001f357b */ std::__cxx11::string::string<std::allocator<char>>((string *)this,local_60,local_20); return this; }
13,675
mysql_hex_string
eloqsql/libmariadb/libmariadb/mariadb_lib.c
ulong STDCALL mysql_hex_string(char *to, const char *from, unsigned long len) { char *start= to; char hexdigits[]= "0123456789ABCDEF"; while (len--) { *to++= hexdigits[((unsigned char)*from) >> 4]; *to++= hexdigits[((unsigned char)*from) & 0x0F]; from++; } *to= 0; return (ulong)(to - start); }
O3
c
mysql_hex_string: pushq %rbp movq %rsp, %rbp movq %rdi, %rax testq %rdx, %rdx je 0x2351f xorl %ecx, %ecx leaq 0x1d1d1(%rip), %r8 # 0x406c0 movq %rdi, %rax movzbl (%rsi,%rcx), %r9d shrl $0x4, %r9d movb (%r9,%r8), %r9b movb %r9b, (%rax) movzbl (%rsi,%rcx), %r9d andl $0xf, %r9d movb (%r9,%r8), %r9b movb %r9b, 0x1(%rax) addq $0x2, %rax incq %rcx cmpq %rcx, %rdx jne 0x234f2 movb $0x0, (%rax) subq %rdi, %rax popq %rbp retq
mysql_hex_string: push rbp mov rbp, rsp mov rax, rdi test rdx, rdx jz short loc_2351F xor ecx, ecx lea r8, a0123456789abcd; "0123456789ABCDEF" mov rax, rdi loc_234F2: movzx r9d, byte ptr [rsi+rcx] shr r9d, 4 mov r9b, [r9+r8] mov [rax], r9b movzx r9d, byte ptr [rsi+rcx] and r9d, 0Fh mov r9b, [r9+r8] mov [rax+1], r9b add rax, 2 inc rcx cmp rdx, rcx jnz short loc_234F2 loc_2351F: mov byte ptr [rax], 0 sub rax, rdi pop rbp retn
_BYTE * mysql_hex_string(_BYTE *a1, long long a2, long long a3) { _BYTE *v3; // rax long long v4; // rcx v3 = a1; if ( a3 ) { v4 = 0LL; v3 = a1; do { *v3 = a0123456789abcd[*(unsigned __int8 *)(a2 + v4) >> 4]; v3[1] = a0123456789abcd[*(_BYTE *)(a2 + v4) & 0xF]; v3 += 2; ++v4; } while ( a3 != v4 ); } *v3 = 0; return (_BYTE *)(v3 - a1); }
mysql_hex_string: PUSH RBP MOV RBP,RSP MOV RAX,RDI TEST RDX,RDX JZ 0x0012351f XOR ECX,ECX LEA R8,[0x1406c0] MOV RAX,RDI LAB_001234f2: MOVZX R9D,byte ptr [RSI + RCX*0x1] SHR R9D,0x4 MOV R9B,byte ptr [R9 + R8*0x1] MOV byte ptr [RAX],R9B MOVZX R9D,byte ptr [RSI + RCX*0x1] AND R9D,0xf MOV R9B,byte ptr [R9 + R8*0x1] MOV byte ptr [RAX + 0x1],R9B ADD RAX,0x2 INC RCX CMP RDX,RCX JNZ 0x001234f2 LAB_0012351f: MOV byte ptr [RAX],0x0 SUB RAX,RDI POP RBP RET
long mysql_hex_string(char *param_1,long param_2,long param_3) { char *pcVar1; long lVar2; pcVar1 = param_1; if (param_3 != 0) { lVar2 = 0; do { *pcVar1 = "0123456789ABCDEF"[*(byte *)(param_2 + lVar2) >> 4]; pcVar1[1] = "0123456789ABCDEF"[*(byte *)(param_2 + lVar2) & 0xf]; pcVar1 = pcVar1 + 2; lVar2 = lVar2 + 1; } while (param_3 != lVar2); } *pcVar1 = '\0'; return (long)pcVar1 - (long)param_1; }
13,676
ma_kpointer
eloqsql/storage/maria/ma_search.c
void _ma_kpointer(register MARIA_HA *info, register uchar *buff, my_off_t pos) { pos/=maria_block_size; switch (info->s->base.key_reflength) { #if SIZEOF_OFF_T > 4 case 7: mi_int7store(buff,pos); break; case 6: mi_int6store(buff,pos); break; case 5: mi_int5store(buff,pos); break; #else case 7: *buff++=0; /* fall through */ case 6: *buff++=0; /* fall through */ case 5: *buff++=0; /* fall through */ #endif case 4: mi_int4store(buff,pos); break; case 3: mi_int3store(buff,pos); break; case 2: mi_int2store(buff,(uint) pos); break; case 1: buff[0]= (uchar) pos; break; default: abort(); /* impossible */ } }
O3
c
ma_kpointer: movq %rdx, %rax leaq 0x32d099(%rip), %rcx # 0x384060 xorl %edx, %edx divq (%rcx) movq (%rdi), %rcx movl 0x3e4(%rcx), %ecx decl %ecx cmpl $0x6, %ecx ja 0x5706b leaq 0x8a3ad(%rip), %rdx # 0xe1394 movslq (%rdx,%rcx,4), %rcx addq %rdx, %rcx jmpq *%rcx movb %al, 0x1(%rsi) shrq $0x8, %rax jmp 0x57068 movq %rax, %rcx shrq $0x20, %rcx bswapl %eax movl %eax, 0x1(%rsi) movq %rcx, %rax jmp 0x57068 movl %eax, %ecx rolw $0x8, %cx movw %cx, 0x1(%rsi) shrq $0x10, %rax jmp 0x57068 movl %eax, %ecx rolw $0x8, %cx movw %cx, 0x2(%rsi) movl %eax, %ecx shrl $0x10, %ecx movb %cl, 0x1(%rsi) shrq $0x18, %rax jmp 0x57068 movq %rax, %rcx shrq $0x20, %rcx movl %eax, %edx bswapl %edx movl %edx, 0x2(%rsi) movb %cl, 0x1(%rsi) shrq $0x28, %rax jmp 0x57068 movq %rax, %rcx shrq $0x20, %rcx movl %eax, %edx bswapl %edx movl %edx, 0x3(%rsi) movb %cl, 0x2(%rsi) movq %rax, %rcx shrq $0x28, %rcx movb %cl, 0x1(%rsi) shrq $0x30, %rax movb %al, (%rsi) retq pushq %rbp movq %rsp, %rbp callq 0x29610
_ma_kpointer: mov rax, rdx lea rcx, maria_block_size xor edx, edx div qword ptr [rcx] mov rcx, [rdi] mov ecx, [rcx+3E4h] dec ecx; switch 7 cases cmp ecx, 6 ja def_56FEE; jumptable 0000000000056FEE default case lea rdx, jpt_56FEE movsxd rcx, ds:(jpt_56FEE - 0E1394h)[rdx+rcx*4] add rcx, rdx jmp rcx; switch jump loc_56FF0: mov [rsi+1], al; jumptable 0000000000056FEE case 2 shr rax, 8 jmp short loc_57068; jumptable 0000000000056FEE case 1 loc_56FF9: mov rcx, rax; jumptable 0000000000056FEE case 5 shr rcx, 20h bswap eax mov [rsi+1], eax mov rax, rcx jmp short loc_57068; jumptable 0000000000056FEE case 1 loc_5700A: mov ecx, eax; jumptable 0000000000056FEE case 3 rol cx, 8 mov [rsi+1], cx shr rax, 10h jmp short loc_57068; jumptable 0000000000056FEE case 1 loc_5701A: mov ecx, eax; jumptable 0000000000056FEE case 4 rol cx, 8 mov [rsi+2], cx mov ecx, eax shr ecx, 10h mov [rsi+1], cl shr rax, 18h jmp short loc_57068; jumptable 0000000000056FEE case 1 loc_57032: mov rcx, rax; jumptable 0000000000056FEE case 6 shr rcx, 20h mov edx, eax bswap edx mov [rsi+2], edx mov [rsi+1], cl shr rax, 28h jmp short loc_57068; jumptable 0000000000056FEE case 1 loc_57049: mov rcx, rax; jumptable 0000000000056FEE case 7 shr rcx, 20h mov edx, eax bswap edx mov [rsi+3], edx mov [rsi+2], cl mov rcx, rax shr rcx, 28h mov [rsi+1], cl shr rax, 30h loc_57068: mov [rsi], al; jumptable 0000000000056FEE case 1 retn def_56FEE: push rbp; jumptable 0000000000056FEE default case mov rbp, rsp call _abort
unsigned long long ma_kpointer(long long a1, long long a2, unsigned long long a3) { unsigned long long result; // rax unsigned long long v4; // rdx result = a3 / *(_QWORD *)&maria_block_size; v4 = a3 % *(_QWORD *)&maria_block_size; switch ( *(_DWORD *)(*(_QWORD *)a1 + 996LL) ) { case 1: break; case 2: *(_BYTE *)(a2 + 1) = result; result >>= 8; break; case 3: *(_WORD *)(a2 + 1) = __ROL2__(result, 8); result >>= 16; break; case 4: *(_WORD *)(a2 + 2) = __ROL2__(result, 8); *(_BYTE *)(a2 + 1) = BYTE2(result); result >>= 24; break; case 5: *(_DWORD *)(a2 + 1) = _byteswap_ulong(result); result >>= 32; break; case 6: *(_DWORD *)(a2 + 2) = _byteswap_ulong(result); *(_BYTE *)(a2 + 1) = BYTE4(result); result >>= 40; break; case 7: *(_DWORD *)(a2 + 3) = _byteswap_ulong(result); *(_BYTE *)(a2 + 2) = BYTE4(result); *(_BYTE *)(a2 + 1) = BYTE5(result); result >>= 48; break; default: abort(a1, a2, v4); } *(_BYTE *)a2 = result; return result; }
_ma_kpointer: MOV RAX,RDX LEA RCX,[0x484060] XOR EDX,EDX DIV qword ptr [RCX] MOV RCX,qword ptr [RDI] MOV ECX,dword ptr [RCX + 0x3e4] DEC ECX CMP ECX,0x6 JA 0x0015706b LEA RDX,[0x1e1394] MOVSXD RCX,dword ptr [RDX + RCX*0x4] ADD RCX,RDX switchD: JMP RCX caseD_2: MOV byte ptr [RSI + 0x1],AL SHR RAX,0x8 JMP 0x00157068 caseD_5: MOV RCX,RAX SHR RCX,0x20 BSWAP EAX MOV dword ptr [RSI + 0x1],EAX MOV RAX,RCX JMP 0x00157068 caseD_3: MOV ECX,EAX ROL CX,0x8 MOV word ptr [RSI + 0x1],CX SHR RAX,0x10 JMP 0x00157068 caseD_4: MOV ECX,EAX ROL CX,0x8 MOV word ptr [RSI + 0x2],CX MOV ECX,EAX SHR ECX,0x10 MOV byte ptr [RSI + 0x1],CL SHR RAX,0x18 JMP 0x00157068 caseD_6: MOV RCX,RAX SHR RCX,0x20 MOV EDX,EAX BSWAP EDX MOV dword ptr [RSI + 0x2],EDX MOV byte ptr [RSI + 0x1],CL SHR RAX,0x28 JMP 0x00157068 caseD_7: MOV RCX,RAX SHR RCX,0x20 MOV EDX,EAX BSWAP EDX MOV dword ptr [RSI + 0x3],EDX MOV byte ptr [RSI + 0x2],CL MOV RCX,RAX SHR RCX,0x28 MOV byte ptr [RSI + 0x1],CL SHR RAX,0x30 caseD_1: MOV byte ptr [RSI],AL RET default: PUSH RBP MOV RBP,RSP CALL 0x00129610
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void _ma_kpointer(long *param_1,int1 *param_2,ulong param_3) { int1 auVar1 [16]; int1 auVar2 [16]; ushort uVar3; uint uVar4; ulong uVar5; auVar1._8_8_ = 0; auVar1._0_8_ = _maria_block_size; auVar2._8_8_ = 0; auVar2._0_8_ = param_3; auVar2 = auVar2 / auVar1; uVar5 = auVar2._0_8_; uVar4 = auVar2._0_4_; uVar3 = auVar2._0_2_; switch(*(int4 *)(*param_1 + 0x3e4)) { case 1: break; case 2: param_2[1] = auVar2[0]; uVar5 = uVar5 >> 8; break; case 3: *(ushort *)(param_2 + 1) = uVar3 << 8 | uVar3 >> 8; uVar5 = uVar5 >> 0x10; break; case 4: *(ushort *)(param_2 + 2) = uVar3 << 8 | uVar3 >> 8; param_2[1] = auVar2[2]; uVar5 = uVar5 >> 0x18; break; case 5: uVar5 = uVar5 >> 0x20; *(uint *)(param_2 + 1) = uVar4 >> 0x18 | (uVar4 & 0xff0000) >> 8 | (uVar4 & 0xff00) << 8 | uVar4 << 0x18; break; case 6: *(uint *)(param_2 + 2) = uVar4 >> 0x18 | (uVar4 & 0xff0000) >> 8 | (uVar4 & 0xff00) << 8 | uVar4 << 0x18; param_2[1] = auVar2[4]; uVar5 = uVar5 >> 0x28; break; case 7: *(uint *)(param_2 + 3) = uVar4 >> 0x18 | (uVar4 & 0xff0000) >> 8 | (uVar4 & 0xff00) << 8 | uVar4 << 0x18; param_2[2] = auVar2[4]; param_2[1] = auVar2[5]; uVar5 = uVar5 >> 0x30; break; default: /* WARNING: Subroutine does not return */ abort(); } *param_2 = (char)uVar5; return; }
13,677
ftxui::Utf8ToGlyphs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/screen/string.cpp
std::vector<std::string> Utf8ToGlyphs(const std::string& input) { std::vector<std::string> out; const std::string current; out.reserve(input.size()); size_t start = 0; size_t end = 0; while (start < input.size()) { uint32_t codepoint = 0; if (!EatCodePoint(input, start, &end, &codepoint)) { start = end; continue; } const std::string append = input.substr(start, end - start); start = end; // Ignore control characters. if (IsControl(codepoint)) { continue; } // Combining characters are put with the previous glyph they are modifying. if (IsCombining(codepoint)) { if (!out.empty()) { out.back() += append; } 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)) { out.push_back(append); out.emplace_back(""); continue; } // Normal characters: out.push_back(append); } return out; }
O0
cpp
ftxui::Utf8ToGlyphs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %rdi, -0x90(%rbp) movq %rdi, %rax movq %rax, -0x98(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movb $0x0, -0x11(%rbp) callq 0x15ec0 leaq -0x38(%rbp), %rdi callq 0xd850 movq -0x10(%rbp), %rdi callq 0xd3c0 movq -0x90(%rbp), %rdi movq %rax, %rsi callq 0x8e570 jmp 0x8d8a0 movq $0x0, -0x50(%rbp) movq $0x0, -0x58(%rbp) movq -0x50(%rbp), %rax movq %rax, -0xa0(%rbp) movq -0x10(%rbp), %rdi callq 0xd3c0 movq %rax, %rcx movq -0xa0(%rbp), %rax cmpq %rcx, %rax jae 0x8da49 movl $0x0, -0x5c(%rbp) movq -0x10(%rbp), %rdi movq -0x50(%rbp), %rsi leaq -0x58(%rbp), %rdx leaq -0x5c(%rbp), %rcx callq 0x8cf10 testb $0x1, %al jne 0x8d912 movq -0x58(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x8d8b0 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0x8da68 movq -0x10(%rbp), %rsi movq -0x50(%rbp), %rdx movq -0x58(%rbp), %rcx subq %rdx, %rcx leaq -0x80(%rbp), %rdi callq 0xd5d0 jmp 0x8d92c movq -0x58(%rbp), %rax movq %rax, -0x50(%rbp) movl -0x5c(%rbp), %edi callq 0x8d4d0 testb $0x1, %al jne 0x8d942 jmp 0x8d951 movl $0x2, -0x84(%rbp) jmp 0x8da2a movl -0x5c(%rbp), %edi callq 0x8d2a0 movb %al, -0xa1(%rbp) jmp 0x8d961 movb -0xa1(%rbp), %al testb $0x1, %al jne 0x8d96d jmp 0x8d9bf movq -0x90(%rbp), %rdi callq 0x30210 testb $0x1, %al jne 0x8d9b3 movq -0x90(%rbp), %rdi callq 0x195f0 movq %rax, %rdi leaq -0x80(%rbp), %rsi callq 0xd7a0 jmp 0x8d997 jmp 0x8d9b3 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) leaq -0x80(%rbp), %rdi callq 0xdbc8 jmp 0x8da68 movl $0x2, -0x84(%rbp) jmp 0x8da2a movl -0x5c(%rbp), %edi callq 0x8d3b0 movb %al, -0xa2(%rbp) jmp 0x8d9cf movb -0xa2(%rbp), %al testb $0x1, %al jne 0x8d9db jmp 0x8da0e movq -0x90(%rbp), %rdi leaq -0x80(%rbp), %rsi callq 0x5db40 jmp 0x8d9ed movq -0x90(%rbp), %rdi leaq 0x32ff(%rip), %rsi # 0x90cfa callq 0x5dbb0 jmp 0x8da02 movl $0x2, -0x84(%rbp) jmp 0x8da2a movq -0x90(%rbp), %rdi leaq -0x80(%rbp), %rsi callq 0x5db40 jmp 0x8da20 movl $0x0, -0x84(%rbp) leaq -0x80(%rbp), %rdi callq 0xdbc8 movl -0x84(%rbp), %eax testl %eax, %eax je 0x8da44 jmp 0x8da3f jmp 0x8d8b0 jmp 0x8d8b0 movb $0x1, -0x11(%rbp) movl $0x1, -0x84(%rbp) leaq -0x38(%rbp), %rdi callq 0xdbc8 testb $0x1, -0x11(%rbp) jne 0x8da8b jmp 0x8da7f leaq -0x38(%rbp), %rdi callq 0xdbc8 movq -0x90(%rbp), %rdi callq 0x16110 jmp 0x8da9b movq -0x90(%rbp), %rdi callq 0x16110 movq -0x98(%rbp), %rax addq $0xb0, %rsp popq %rbp retq movq -0x40(%rbp), %rdi callq 0xda90 nopw %cs:(%rax,%rax)
_ZN5ftxui12Utf8ToGlyphsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp mov rbp, rsp sub rsp, 0B0h mov [rbp+var_90], rdi mov rax, rdi mov [rbp+var_98], rax mov [rbp+var_8], rdi mov qword ptr [rbp+var_10], rsi mov [rbp+var_11], 0 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev; std::vector<std::string>::vector(void) lea rdi, [rbp+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) mov rdi, qword ptr [rbp+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) mov rdi, [rbp+var_90] mov rsi, rax call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE7reserveEm; std::vector<std::string>::reserve(ulong) jmp short $+2 loc_8D8A0: mov [rbp+var_50], 0 mov [rbp+var_5C+4], 0 loc_8D8B0: mov rax, [rbp+var_50] mov [rbp+var_A0], rax mov rdi, qword ptr [rbp+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) mov rcx, rax mov rax, [rbp+var_A0] cmp rax, rcx jnb loc_8DA49 mov dword ptr [rbp+var_5C], 0 mov rdi, qword ptr [rbp+var_10] mov rsi, [rbp+var_50] lea rdx, [rbp+var_5C+4] lea rcx, [rbp+var_5C] call _ZN5ftxui12EatCodePointERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmPmPj; ftxui::EatCodePoint(std::string const&,ulong,ulong *,uint *) test al, 1 jnz short loc_8D912 mov rax, [rbp+var_5C+4] mov [rbp+var_50], rax jmp short loc_8D8B0 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax jmp loc_8DA68 loc_8D912: mov rsi, qword ptr [rbp+var_10]; unsigned int mov rdx, [rbp+var_50] mov rcx, [rbp+var_5C+4] sub rcx, rdx lea rdi, [rbp+var_80] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) jmp short $+2 loc_8D92C: mov rax, [rbp+var_5C+4] mov [rbp+var_50], rax mov edi, dword ptr [rbp+var_5C]; this call _ZN5ftxui9IsControlEj; ftxui::IsControl(uint) test al, 1 jnz short loc_8D942 jmp short loc_8D951 loc_8D942: mov [rbp+var_84], 2 jmp loc_8DA2A loc_8D951: mov edi, dword ptr [rbp+var_5C]; this call _ZN5ftxui11IsCombiningEj; ftxui::IsCombining(uint) mov [rbp+var_A1], al jmp short $+2 loc_8D961: mov al, [rbp+var_A1] test al, 1 jnz short loc_8D96D jmp short loc_8D9BF loc_8D96D: mov rdi, [rbp+var_90] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5emptyEv; std::vector<std::string>::empty(void) test al, 1 jnz short loc_8D9B3 mov rdi, [rbp+var_90] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4backEv; std::vector<std::string>::back(void) mov rdi, rax lea rsi, [rbp+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&) jmp short $+2 loc_8D997: jmp short loc_8D9B3 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax lea rdi, [rbp+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_8DA68 loc_8D9B3: mov [rbp+var_84], 2 jmp short loc_8DA2A loc_8D9BF: mov edi, dword ptr [rbp+var_5C]; this call _ZN5ftxui11IsFullWidthEj; ftxui::IsFullWidth(uint) mov [rbp+var_A2], al jmp short $+2 loc_8D9CF: mov al, [rbp+var_A2] test al, 1 jnz short loc_8D9DB jmp short loc_8DA0E loc_8D9DB: mov rdi, [rbp+var_90] lea rsi, [rbp+var_80] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&) jmp short $+2 loc_8D9ED: mov rdi, [rbp+var_90] lea rsi, asc_90CF8+2; "" call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJRA1_KcEEERS5_DpOT_; std::vector<std::string>::emplace_back<char const(&)[1]>(char const(&)[1] &&) jmp short $+2 loc_8DA02: mov [rbp+var_84], 2 jmp short loc_8DA2A loc_8DA0E: mov rdi, [rbp+var_90] lea rsi, [rbp+var_80] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&) jmp short $+2 loc_8DA20: mov [rbp+var_84], 0 loc_8DA2A: lea rdi, [rbp+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov eax, [rbp+var_84] test eax, eax jz short loc_8DA44 jmp short $+2 loc_8DA3F: jmp loc_8D8B0 loc_8DA44: jmp loc_8D8B0 loc_8DA49: mov [rbp+var_11], 1 mov [rbp+var_84], 1 lea rdi, [rbp+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() test [rbp+var_11], 1 jnz short loc_8DA8B jmp short loc_8DA7F loc_8DA68: lea rdi, [rbp+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rbp+var_90] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_8DA9B loc_8DA7F: mov rdi, [rbp+var_90] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_8DA8B: mov rax, [rbp+var_98] add rsp, 0B0h pop rbp retn loc_8DA9B: mov rdi, [rbp+var_40] call __Unwind_Resume
long long * ftxui::Utf8ToGlyphs(long long *a1, long long a2) { long long v2; // rax long long v3; // rax unsigned long long v5; // [rsp+10h] [rbp-A0h] _BYTE v6[36]; // [rsp+30h] [rbp-80h] BYREF int v7[3]; // [rsp+54h] [rbp-5Ch] BYREF unsigned long long v8; // [rsp+60h] [rbp-50h] _BYTE v9[39]; // [rsp+78h] [rbp-38h] BYREF char v10; // [rsp+9Fh] [rbp-11h] unsigned int v11[2]; // [rsp+A0h] [rbp-10h] long long *v12; // [rsp+A8h] [rbp-8h] v12 = a1; *(_QWORD *)v11 = a2; v10 = 0; std::vector<std::string>::vector((long long)a1); std::string::basic_string(v9); v2 = std::string::size(*(_QWORD *)v11); std::vector<std::string>::reserve(a1, v2); v8 = 0LL; *(_QWORD *)&v7[1] = 0LL; while ( 1 ) { v5 = v8; if ( v5 >= std::string::size(*(_QWORD *)v11) ) break; v7[0] = 0; if ( (ftxui::EatCodePoint(*(long long *)v11, v8, &v7[1], v7) & 1) != 0 ) { std::string::substr(v6, *(_QWORD *)v11, v8, *(_QWORD *)&v7[1] - v8); v8 = *(_QWORD *)&v7[1]; if ( (ftxui::IsControl((ftxui *)(unsigned int)v7[0]) & 1) == 0 ) { if ( (ftxui::IsCombining((ftxui *)(unsigned int)v7[0]) & 1) != 0 ) { if ( (std::vector<std::string>::empty((long long)a1) & 1) == 0 ) { v3 = std::vector<std::string>::back((long long)a1); std::string::operator+=(v3, v6); } } else if ( (ftxui::IsFullWidth((ftxui *)(unsigned int)v7[0]) & 1) != 0 ) { std::vector<std::string>::push_back((long long)a1, (long long)v6); std::vector<std::string>::emplace_back<char const(&)[1]>((long long)a1, (long long)""); } else { std::vector<std::string>::push_back((long long)a1, (long long)v6); } } std::string::~string(v6); } else { v8 = *(_QWORD *)&v7[1]; } } v10 = 1; std::string::~string(v9); if ( (v10 & 1) == 0 ) std::vector<std::string>::~vector(a1); return a1; }
Utf8ToGlyphs: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV qword ptr [RBP + -0x90],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x98],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV byte ptr [RBP + -0x11],0x0 CALL 0x00115ec0 LEA RDI,[RBP + -0x38] CALL 0x0010d850 MOV RDI,qword ptr [RBP + -0x10] CALL 0x0010d3c0 MOV RDI,qword ptr [RBP + -0x90] MOV RSI,RAX LAB_0018d899: CALL 0x0018e570 JMP 0x0018d8a0 LAB_0018d8a0: MOV qword ptr [RBP + -0x50],0x0 MOV qword ptr [RBP + -0x58],0x0 LAB_0018d8b0: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0xa0],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0010d3c0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0xa0] CMP RAX,RCX JNC 0x0018da49 MOV dword ptr [RBP + -0x5c],0x0 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x50] LEA RDX,[RBP + -0x58] LEA RCX,[RBP + -0x5c] CALL 0x0018cf10 TEST AL,0x1 JNZ 0x0018d912 MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x50],RAX JMP 0x0018d8b0 LAB_0018d912: MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x58] SUB RCX,RDX LEA RDI,[RBP + -0x80] CALL 0x0010d5d0 JMP 0x0018d92c LAB_0018d92c: MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x50],RAX MOV EDI,dword ptr [RBP + -0x5c] CALL 0x0018d4d0 TEST AL,0x1 JNZ 0x0018d942 JMP 0x0018d951 LAB_0018d942: MOV dword ptr [RBP + -0x84],0x2 JMP 0x0018da2a LAB_0018d951: MOV EDI,dword ptr [RBP + -0x5c] LAB_0018d954: CALL 0x0018d2a0 MOV byte ptr [RBP + -0xa1],AL JMP 0x0018d961 LAB_0018d961: MOV AL,byte ptr [RBP + -0xa1] TEST AL,0x1 JNZ 0x0018d96d JMP 0x0018d9bf LAB_0018d96d: MOV RDI,qword ptr [RBP + -0x90] CALL 0x00130210 TEST AL,0x1 JNZ 0x0018d9b3 MOV RDI,qword ptr [RBP + -0x90] CALL 0x001195f0 MOV RDI,RAX LEA RSI,[RBP + -0x80] CALL 0x0010d7a0 JMP 0x0018d997 LAB_0018d997: JMP 0x0018d9b3 LAB_0018d9b3: MOV dword ptr [RBP + -0x84],0x2 JMP 0x0018da2a LAB_0018d9bf: MOV EDI,dword ptr [RBP + -0x5c] CALL 0x0018d3b0 MOV byte ptr [RBP + -0xa2],AL JMP 0x0018d9cf LAB_0018d9cf: MOV AL,byte ptr [RBP + -0xa2] TEST AL,0x1 JNZ 0x0018d9db JMP 0x0018da0e LAB_0018d9db: MOV RDI,qword ptr [RBP + -0x90] LEA RSI,[RBP + -0x80] CALL 0x0015db40 JMP 0x0018d9ed LAB_0018d9ed: MOV RDI,qword ptr [RBP + -0x90] LEA RSI,[0x190cfa] CALL 0x0015dbb0 JMP 0x0018da02 LAB_0018da02: MOV dword ptr [RBP + -0x84],0x2 JMP 0x0018da2a LAB_0018da0e: MOV RDI,qword ptr [RBP + -0x90] LEA RSI,[RBP + -0x80] CALL 0x0015db40 LAB_0018da1e: JMP 0x0018da20 LAB_0018da20: MOV dword ptr [RBP + -0x84],0x0 LAB_0018da2a: LEA RDI,[RBP + -0x80] CALL 0x0010dbc8 MOV EAX,dword ptr [RBP + -0x84] TEST EAX,EAX JZ 0x0018da44 JMP 0x0018da3f LAB_0018da3f: JMP 0x0018d8b0 LAB_0018da44: JMP 0x0018d8b0 LAB_0018da49: MOV byte ptr [RBP + -0x11],0x1 MOV dword ptr [RBP + -0x84],0x1 LEA RDI,[RBP + -0x38] CALL 0x0010dbc8 TEST byte ptr [RBP + -0x11],0x1 JNZ 0x0018da8b JMP 0x0018da7f LAB_0018da7f: MOV RDI,qword ptr [RBP + -0x90] CALL 0x00116110 LAB_0018da8b: MOV RAX,qword ptr [RBP + -0x98] ADD RSP,0xb0 POP RBP RET
/* ftxui::Utf8ToGlyphs(std::__cxx11::string const&) */ ftxui * __thiscall ftxui::Utf8ToGlyphs(ftxui *this,string *param_1) { byte bVar1; ulong uVar2; ulong uVar3; string *this_00; string local_88 [36]; uint local_64; ulong local_60; ulong local_58; string local_40 [39]; byte local_19; string *local_18; ftxui *local_10; local_19 = 0; local_18 = param_1; local_10 = this; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this); std::__cxx11::string::string(local_40); uVar2 = std::__cxx11::string::size(); /* try { // try from 0018d899 to 0018d929 has its CatchHandler @ 0018d901 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::reserve ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this,uVar2); local_58 = 0; local_60 = 0; while (uVar2 = local_58, uVar3 = std::__cxx11::string::size(), uVar2 < uVar3) { local_64 = 0; uVar2 = EatCodePoint(local_18,local_58,&local_60,&local_64); if ((uVar2 & 1) == 0) { local_58 = local_60; } else { std::__cxx11::string::substr((ulong)local_88,(ulong)local_18); local_58 = local_60; uVar2 = IsControl(local_64); if ((uVar2 & 1) == 0) { /* try { // try from 0018d954 to 0018da1d has its CatchHandler @ 0018d999 */ bVar1 = IsCombining(local_64); if ((bVar1 & 1) == 0) { bVar1 = IsFullWidth(local_64); if ((bVar1 & 1) == 0) { std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this, local_88); } else { std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this, local_88); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<char_const(&)[1]> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this,"") ; } } else { uVar2 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::empty ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *) this); if ((uVar2 & 1) == 0) { this_00 = (string *) std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::back ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this); std::__cxx11::string::operator+=(this_00,local_88); } } } std::__cxx11::string::~string(local_88); } } local_19 = 1; std::__cxx11::string::~string(local_40); if ((local_19 & 1) == 0) { std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this); } return this; }
13,678
mysql_select_db_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_select_db_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_select_db, (parms->mysql, parms->db), parms->mysql, int, r_int) }
O0
c
mysql_select_db_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movq 0x8(%rax), %rsi callq 0x37750 movl %eax, -0x14(%rbp) movl -0x14(%rbp), %ecx movq -0x20(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
mysql_select_db_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_10] mov rsi, [rax+8] call mysql_select_db mov [rbp+var_14], eax mov ecx, [rbp+var_14] mov rax, [rbp+var_20] mov [rax+8], ecx mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
_DWORD * mysql_select_db_start_internal(long long *a1) { _DWORD *result; // rax _DWORD *v2; // [rsp+0h] [rbp-20h] v2 = *(_DWORD **)(*(_QWORD *)(*a1 + 1152) + 40LL); v2[2] = mysql_select_db(*a1, a1[1]); result = v2; *v2 = 0; return result; }
mysql_select_db_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x8] CALL 0x00137750 MOV dword ptr [RBP + -0x14],EAX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_select_db_start_internal(long *param_1) { int4 *puVar1; int4 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_select_db(*param_1,param_1[1]); puVar1[2] = uVar2; *puVar1 = 0; return; }
13,679
mysql_select_db_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_select_db_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_select_db, (parms->mysql, parms->db), parms->mysql, int, r_int) }
O3
c
mysql_select_db_start_internal: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rax movq 0x8(%rdi), %rsi movq 0x480(%rax), %rcx movq 0x28(%rcx), %rbx movq %rax, %rdi callq 0x2aeff movl %eax, 0x8(%rbx) movl $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_select_db_start_internal: push rbp mov rbp, rsp push rbx push rax mov rax, [rdi] mov rsi, [rdi+8] mov rcx, [rax+480h] mov rbx, [rcx+28h] mov rdi, rax call mysql_select_db mov [rbx+8], eax mov dword ptr [rbx], 0 add rsp, 8 pop rbx pop rbp retn
long long mysql_select_db_start_internal(long long *a1) { _DWORD *v1; // rbx long long result; // rax v1 = *(_DWORD **)(*(_QWORD *)(*a1 + 1152) + 40LL); result = mysql_select_db(*a1, a1[1]); v1[2] = result; *v1 = 0; return result; }
mysql_select_db_start_internal: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RAX,qword ptr [RDI] MOV RSI,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RAX + 0x480] MOV RBX,qword ptr [RCX + 0x28] MOV RDI,RAX CALL 0x0012aeff MOV dword ptr [RBX + 0x8],EAX MOV dword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP RBP RET
void mysql_select_db_start_internal(long *param_1) { int4 *puVar1; int4 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_select_db(*param_1,param_1[1]); puVar1[2] = uVar2; *puVar1 = 0; return; }
13,680
mysql_stmt_bind_result
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *bind) { uint i; if (stmt->state < MYSQL_STMT_PREPARED) { SET_CLIENT_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, SQLSTATE_UNKNOWN, 0); return(1); } if (!stmt->field_count) { SET_CLIENT_STMT_ERROR(stmt, CR_NO_STMT_METADATA, SQLSTATE_UNKNOWN, 0); return(1); } if (!bind) return(1); /* In case of a stored procedure we don't allocate memory for bind in mysql_stmt_prepare */ if (stmt->field_count && !stmt->bind) { MA_MEM_ROOT *fields_ma_alloc_root= &((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root; if (!(stmt->bind= (MYSQL_BIND *)ma_alloc_root(fields_ma_alloc_root, stmt->field_count * sizeof(MYSQL_BIND)))) { SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return(1); } } memcpy(stmt->bind, bind, sizeof(MYSQL_BIND) * stmt->field_count); for (i=0; i < stmt->field_count; i++) { if (stmt->mysql->methods->db_supported_buffer_type && !stmt->mysql->methods->db_supported_buffer_type(bind[i].buffer_type)) { SET_CLIENT_STMT_ERROR(stmt, CR_UNSUPPORTED_PARAM_TYPE, SQLSTATE_UNKNOWN, 0); return(1); } if (!stmt->bind[i].is_null) stmt->bind[i].is_null= &stmt->bind[i].is_null_value; if (!stmt->bind[i].length) stmt->bind[i].length= &stmt->bind[i].length_value; if (!stmt->bind[i].error) stmt->bind[i].error= &stmt->bind[i].error_value; /* set length values for numeric types */ switch(bind[i].buffer_type) { case MYSQL_TYPE_NULL: *stmt->bind[i].length= stmt->bind[i].length_value= 0; break; case MYSQL_TYPE_TINY: *stmt->bind[i].length= stmt->bind[i].length_value= 1; break; case MYSQL_TYPE_SHORT: case MYSQL_TYPE_YEAR: *stmt->bind[i].length= stmt->bind[i].length_value= 2; break; case MYSQL_TYPE_INT24: case MYSQL_TYPE_LONG: case MYSQL_TYPE_FLOAT: *stmt->bind[i].length= stmt->bind[i].length_value= 4; break; case MYSQL_TYPE_LONGLONG: case MYSQL_TYPE_DOUBLE: *stmt->bind[i].length= stmt->bind[i].length_value= 8; break; case MYSQL_TYPE_TIME: case MYSQL_TYPE_DATE: case MYSQL_TYPE_DATETIME: case MYSQL_TYPE_TIMESTAMP: *stmt->bind[i].length= stmt->bind[i].length_value= sizeof(MYSQL_TIME); break; default: break; } } stmt->bind_result_done= 1; CLEAR_CLIENT_STMT_ERROR(stmt); return(0); }
O3
c
mysql_stmt_bind_result: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx cmpl $0x0, 0x50(%rdi) je 0x7dac8 movl 0x60(%rbx), %eax testq %rax, %rax je 0x7db0e movq %rsi, %r15 movb $0x1, %r14b testq %rsi, %rsi je 0x7db66 movq 0x78(%rbx), %rdi testq %rdi, %rdi jne 0x7d9ce movq 0x340(%rbx), %rdi imulq $0x70, %rax, %rsi callq 0x7b36f movq %rax, 0x78(%rbx) testq %rax, %rax je 0x7dbbe movq %rax, %rdi movl 0x60(%rbx), %eax movl %eax, %eax imulq $0x70, %rax, %rdx movq %r15, %rsi callq 0x5f0e0 cmpl $0x0, 0x60(%rbx) je 0x7da95 movl $0x50, %r12d xorl %r13d, %r13d movq 0x38(%rbx), %rax movq 0x4d0(%rax), %rax movq 0x38(%rax), %rax testq %rax, %rax je 0x7da12 movl 0x10(%r15,%r12), %edi callq *%rax testb %al, %al je 0x7db78 movq 0x78(%rbx), %rax cmpq $0x0, -0x48(%rax,%r12) jne 0x7da2d addq %r12, %rax addq $0x17, %rax movq %rax, -0x5f(%rax) movq 0x78(%rbx), %rax cmpq $0x0, -0x50(%rax,%r12) jne 0x7da42 leaq (%rax,%r12), %rcx movq %rcx, -0x50(%rax,%r12) movq 0x78(%rbx), %rax cmpq $0x0, -0x38(%rax,%r12) jne 0x7da55 addq %r12, %rax addq $0x14, %rax movq %rax, -0x4c(%rax) movl 0x10(%r15,%r12), %eax decl %eax cmpl $0xc, %eax ja 0x7da82 movl %eax, %eax leaq 0x98e9e(%rip), %rcx # 0x116908 movq (%rcx,%rax,8), %rax movq 0x78(%rbx), %rcx movq %rax, (%rcx,%r12) movq 0x78(%rbx), %rcx movq -0x50(%rcx,%r12), %rcx movq %rax, (%rcx) incq %r13 movl 0x60(%rbx), %eax addq $0x70, %r12 cmpq %rax, %r13 jb 0x7d9ef movb $0x1, 0xe8(%rbx) movl $0x0, 0x108(%rbx) movl $0x30303030, 0x30d(%rbx) # imm = 0x30303030 movw $0x30, 0x311(%rbx) movb $0x0, 0x10c(%rbx) xorl %r14d, %r14d jmp 0x7db66 movl $0x7ee, 0x108(%rbx) # imm = 0x7EE leaq 0x30d(%rbx), %rdi leaq 0x367440(%rip), %rax # 0x3e4f20 movq (%rax), %rsi movl $0x5, %edx callq 0x5f180 xorl %r14d, %r14d movb %r14b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi leaq 0x36742b(%rip), %rax # 0x3e4f30 movq 0xf0(%rax), %rsi jmp 0x7db52 movl $0x804, 0x108(%rbx) # imm = 0x804 leaq 0x30d(%rbx), %rdi leaq 0x3673fa(%rip), %rax # 0x3e4f20 movq (%rax), %rsi movl $0x5, %edx callq 0x5f180 xorl %r14d, %r14d movb %r14b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi leaq 0x3673e5(%rip), %rax # 0x3e4f30 movq 0x1a0(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x5f180 movb %r14b, 0x30b(%rbx) movb $0x1, %r14b movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x7f4, 0x108(%rbx) # imm = 0x7F4 leaq 0x30d(%rbx), %rdi leaq 0x367390(%rip), %rax # 0x3e4f20 movq (%rax), %rsi movl $0x5, %edx callq 0x5f180 xorl %r15d, %r15d movb %r15b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi leaq 0x36737b(%rip), %rax # 0x3e4f30 movq 0x120(%rax), %rsi jmp 0x7dbff movl $0x7d8, 0x108(%rbx) # imm = 0x7D8 leaq 0x30d(%rbx), %rdi leaq 0x36734a(%rip), %rax # 0x3e4f20 movq (%rax), %rsi movl $0x5, %edx callq 0x5f180 xorl %r15d, %r15d movb %r15b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi leaq 0x367335(%rip), %rax # 0x3e4f30 movq 0x40(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x5f180 movb %r15b, 0x30b(%rbx) jmp 0x7db66
mysql_stmt_bind_result: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi cmp dword ptr [rdi+50h], 0 jz loc_7DAC8 mov eax, [rbx+60h] test rax, rax jz loc_7DB0E mov r15, rsi mov r14b, 1 test rsi, rsi jz loc_7DB66 mov rdi, [rbx+78h] test rdi, rdi jnz short loc_7D9CE mov rdi, [rbx+340h] imul rsi, rax, 70h ; 'p' call ma_alloc_root mov [rbx+78h], rax test rax, rax jz loc_7DBBE mov rdi, rax mov eax, [rbx+60h] loc_7D9CE: mov eax, eax imul rdx, rax, 70h ; 'p' mov rsi, r15 call _memcpy cmp dword ptr [rbx+60h], 0 jz loc_7DA95 mov r12d, 50h ; 'P' xor r13d, r13d loc_7D9EF: mov rax, [rbx+38h] mov rax, [rax+4D0h] mov rax, [rax+38h] test rax, rax jz short loc_7DA12 mov edi, [r15+r12+10h] call rax test al, al jz loc_7DB78 loc_7DA12: mov rax, [rbx+78h] cmp qword ptr [rax+r12-48h], 0 jnz short loc_7DA2D add rax, r12 add rax, 17h mov [rax-5Fh], rax mov rax, [rbx+78h] loc_7DA2D: cmp qword ptr [rax+r12-50h], 0 jnz short loc_7DA42 lea rcx, [rax+r12] mov [rax+r12-50h], rcx mov rax, [rbx+78h] loc_7DA42: cmp qword ptr [rax+r12-38h], 0 jnz short loc_7DA55 add rax, r12 add rax, 14h mov [rax-4Ch], rax loc_7DA55: mov eax, [r15+r12+10h] dec eax cmp eax, 0Ch ja short loc_7DA82 mov eax, eax lea rcx, unk_116908 mov rax, [rcx+rax*8] mov rcx, [rbx+78h] mov [rcx+r12], rax mov rcx, [rbx+78h] mov rcx, [rcx+r12-50h] mov [rcx], rax loc_7DA82: inc r13 mov eax, [rbx+60h] add r12, 70h ; 'p' cmp r13, rax jb loc_7D9EF loc_7DA95: mov byte ptr [rbx+0E8h], 1 mov dword ptr [rbx+108h], 0 mov dword ptr [rbx+30Dh], 30303030h mov word ptr [rbx+311h], 30h ; '0' mov byte ptr [rbx+10Ch], 0 xor r14d, r14d jmp loc_7DB66 loc_7DAC8: mov dword ptr [rbx+108h], 7EEh lea rdi, [rbx+30Dh] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r14d, r14d mov [rbx+312h], r14b lea rdi, [rbx+10Ch] lea rax, client_errors mov rsi, [rax+0F0h] jmp short loc_7DB52 loc_7DB0E: mov dword ptr [rbx+108h], 804h lea rdi, [rbx+30Dh] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r14d, r14d mov [rbx+312h], r14b lea rdi, [rbx+10Ch] lea rax, client_errors mov rsi, [rax+1A0h] loc_7DB52: mov edx, 200h call _strncpy mov [rbx+30Bh], r14b mov r14b, 1 loc_7DB66: mov eax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7DB78: mov dword ptr [rbx+108h], 7F4h lea rdi, [rbx+30Dh] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r15d, r15d mov [rbx+312h], r15b lea rdi, [rbx+10Ch] lea rax, client_errors mov rsi, [rax+120h] jmp short loc_7DBFF loc_7DBBE: mov dword ptr [rbx+108h], 7D8h lea rdi, [rbx+30Dh] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r15d, r15d mov [rbx+312h], r15b lea rdi, [rbx+10Ch] lea rax, client_errors mov rsi, [rax+40h] loc_7DBFF: mov edx, 200h call _strncpy mov [rbx+30Bh], r15b jmp loc_7DB66
long long mysql_stmt_bind_result(long long a1, long long a2) { unsigned int v2; // r14d char *v4; // rax char *v5; // rdi long long v6; // r12 unsigned long long v7; // r13 unsigned __int8 ( *v8)(_QWORD); // rax long long v9; // rax unsigned int v10; // eax long long v11; // rax long long v12; // rdi char *v13; // rsi long long v15; // rdi char *v16; // rsi if ( !*(_DWORD *)(a1 + 80) ) { *(_DWORD *)(a1 + 264) = 2030; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); v2 = 0; *(_BYTE *)(a1 + 786) = 0; v12 = a1 + 268; v13 = client_errors[30]; LABEL_23: strncpy(v12, v13, 512LL); *(_BYTE *)(a1 + 779) = 0; LOBYTE(v2) = 1; return v2; } v4 = (char *)*(unsigned int *)(a1 + 96); if ( !*(_DWORD *)(a1 + 96) ) { *(_DWORD *)(a1 + 264) = 2052; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); v2 = 0; *(_BYTE *)(a1 + 786) = 0; v12 = a1 + 268; v13 = client_errors[52]; goto LABEL_23; } LOBYTE(v2) = 1; if ( a2 ) { v5 = *(char **)(a1 + 120); if ( !v5 ) { v4 = ma_alloc_root(*(_QWORD *)(a1 + 832), 112LL * (_QWORD)v4); *(_QWORD *)(a1 + 120) = v4; if ( !v4 ) { *(_DWORD *)(a1 + 264) = 2008; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; v15 = a1 + 268; v16 = client_errors[8]; LABEL_27: strncpy(v15, v16, 512LL); *(_BYTE *)(a1 + 779) = 0; return v2; } v5 = v4; LODWORD(v4) = *(_DWORD *)(a1 + 96); } memcpy(v5, a2, 112LL * (unsigned int)v4); if ( *(_DWORD *)(a1 + 96) ) { v6 = 80LL; v7 = 0LL; while ( 1 ) { v8 = *(unsigned __int8 ( **)(_QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 56LL); if ( v8 ) { if ( !v8(*(unsigned int *)(a2 + v6 + 16)) ) break; } v9 = *(_QWORD *)(a1 + 120); if ( !*(_QWORD *)(v9 + v6 - 72) ) { *(_QWORD *)(v6 + v9 - 72) = v6 + v9 + 23; v9 = *(_QWORD *)(a1 + 120); } if ( !*(_QWORD *)(v9 + v6 - 80) ) { *(_QWORD *)(v9 + v6 - 80) = v9 + v6; v9 = *(_QWORD *)(a1 + 120); } if ( !*(_QWORD *)(v9 + v6 - 56) ) *(_QWORD *)(v6 + v9 - 56) = v6 + v9 + 20; v10 = *(_DWORD *)(a2 + v6 + 16) - 1; if ( v10 <= 0xC ) { v11 = qword_116908[v10]; *(_QWORD *)(*(_QWORD *)(a1 + 120) + v6) = v11; **(_QWORD **)(*(_QWORD *)(a1 + 120) + v6 - 80) = v11; } ++v7; v6 += 112LL; if ( v7 >= *(unsigned int *)(a1 + 96) ) goto LABEL_20; } *(_DWORD *)(a1 + 264) = 2036; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; v15 = a1 + 268; v16 = client_errors[36]; goto LABEL_27; } LABEL_20: *(_BYTE *)(a1 + 232) = 1; *(_DWORD *)(a1 + 264) = 0; strcpy((char *)(a1 + 781), "00000"); *(_BYTE *)(a1 + 268) = 0; return 0; } return v2; }
mysql_stmt_bind_result: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI CMP dword ptr [RDI + 0x50],0x0 JZ 0x0017dac8 MOV EAX,dword ptr [RBX + 0x60] TEST RAX,RAX JZ 0x0017db0e MOV R15,RSI MOV R14B,0x1 TEST RSI,RSI JZ 0x0017db66 MOV RDI,qword ptr [RBX + 0x78] TEST RDI,RDI JNZ 0x0017d9ce MOV RDI,qword ptr [RBX + 0x340] IMUL RSI,RAX,0x70 CALL 0x0017b36f MOV qword ptr [RBX + 0x78],RAX TEST RAX,RAX JZ 0x0017dbbe MOV RDI,RAX MOV EAX,dword ptr [RBX + 0x60] LAB_0017d9ce: MOV EAX,EAX IMUL RDX,RAX,0x70 MOV RSI,R15 CALL 0x0015f0e0 CMP dword ptr [RBX + 0x60],0x0 JZ 0x0017da95 MOV R12D,0x50 XOR R13D,R13D LAB_0017d9ef: MOV RAX,qword ptr [RBX + 0x38] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x38] TEST RAX,RAX JZ 0x0017da12 MOV EDI,dword ptr [R15 + R12*0x1 + 0x10] CALL RAX TEST AL,AL JZ 0x0017db78 LAB_0017da12: MOV RAX,qword ptr [RBX + 0x78] CMP qword ptr [RAX + R12*0x1 + -0x48],0x0 JNZ 0x0017da2d ADD RAX,R12 ADD RAX,0x17 MOV qword ptr [RAX + -0x5f],RAX MOV RAX,qword ptr [RBX + 0x78] LAB_0017da2d: CMP qword ptr [RAX + R12*0x1 + -0x50],0x0 JNZ 0x0017da42 LEA RCX,[RAX + R12*0x1] MOV qword ptr [RAX + R12*0x1 + -0x50],RCX MOV RAX,qword ptr [RBX + 0x78] LAB_0017da42: CMP qword ptr [RAX + R12*0x1 + -0x38],0x0 JNZ 0x0017da55 ADD RAX,R12 ADD RAX,0x14 MOV qword ptr [RAX + -0x4c],RAX LAB_0017da55: MOV EAX,dword ptr [R15 + R12*0x1 + 0x10] DEC EAX CMP EAX,0xc JA 0x0017da82 MOV EAX,EAX LEA RCX,[0x216908] MOV RAX,qword ptr [RCX + RAX*0x8] MOV RCX,qword ptr [RBX + 0x78] MOV qword ptr [RCX + R12*0x1],RAX MOV RCX,qword ptr [RBX + 0x78] MOV RCX,qword ptr [RCX + R12*0x1 + -0x50] MOV qword ptr [RCX],RAX LAB_0017da82: INC R13 MOV EAX,dword ptr [RBX + 0x60] ADD R12,0x70 CMP R13,RAX JC 0x0017d9ef LAB_0017da95: MOV byte ptr [RBX + 0xe8],0x1 MOV dword ptr [RBX + 0x108],0x0 MOV dword ptr [RBX + 0x30d],0x30303030 MOV word ptr [RBX + 0x311],0x30 MOV byte ptr [RBX + 0x10c],0x0 XOR R14D,R14D JMP 0x0017db66 LAB_0017dac8: MOV dword ptr [RBX + 0x108],0x7ee LEA RDI,[RBX + 0x30d] LEA RAX,[0x4e4f20] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x0015f180 XOR R14D,R14D MOV byte ptr [RBX + 0x312],R14B LEA RDI,[RBX + 0x10c] LEA RAX,[0x4e4f30] MOV RSI,qword ptr [RAX + 0xf0] JMP 0x0017db52 LAB_0017db0e: MOV dword ptr [RBX + 0x108],0x804 LEA RDI,[RBX + 0x30d] LEA RAX,[0x4e4f20] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x0015f180 XOR R14D,R14D MOV byte ptr [RBX + 0x312],R14B LEA RDI,[RBX + 0x10c] LEA RAX,[0x4e4f30] MOV RSI,qword ptr [RAX + 0x1a0] LAB_0017db52: MOV EDX,0x200 CALL 0x0015f180 MOV byte ptr [RBX + 0x30b],R14B MOV R14B,0x1 LAB_0017db66: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017db78: MOV dword ptr [RBX + 0x108],0x7f4 LEA RDI,[RBX + 0x30d] LEA RAX,[0x4e4f20] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x0015f180 XOR R15D,R15D MOV byte ptr [RBX + 0x312],R15B LEA RDI,[RBX + 0x10c] LEA RAX,[0x4e4f30] MOV RSI,qword ptr [RAX + 0x120] JMP 0x0017dbff LAB_0017dbbe: MOV dword ptr [RBX + 0x108],0x7d8 LEA RDI,[RBX + 0x30d] LEA RAX,[0x4e4f20] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x0015f180 XOR R15D,R15D MOV byte ptr [RBX + 0x312],R15B LEA RDI,[RBX + 0x10c] LEA RAX,[0x4e4f30] MOV RSI,qword ptr [RAX + 0x40] LAB_0017dbff: MOV EDX,0x200 CALL 0x0015f180 MOV byte ptr [RBX + 0x30b],R15B JMP 0x0017db66
ulong mysql_stmt_bind_result(long param_1,void *param_2) { code *pcVar1; int8 uVar2; char cVar3; uint uVar4; void *__dest; long lVar5; char *pcVar6; long lVar7; ulong uVar8; int8 unaff_R14; ulong uVar9; if (*(int *)(param_1 + 0x50) == 0) { *(int4 *)(param_1 + 0x108) = 0x7ee; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; pcVar6 = PTR_s_Statement_is_not_prepared_004e5020; } else { uVar8 = (ulong)*(uint *)(param_1 + 0x60); if (uVar8 != 0) { uVar9 = CONCAT71((int7)((ulong)unaff_R14 >> 8),1); if (param_2 != (void *)0x0) { __dest = *(void **)(param_1 + 0x78); if (__dest == (void *)0x0) { __dest = (void *)ma_alloc_root(*(int8 *)(param_1 + 0x340),uVar8 * 0x70); *(void **)(param_1 + 0x78) = __dest; if (__dest == (void *)0x0) { *(int4 *)(param_1 + 0x108) = 0x7d8; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; pcVar6 = PTR_s_Client_run_out_of_memory_004e4f70; LAB_0017dbff: strncpy((char *)(param_1 + 0x10c),pcVar6,0x200); *(int1 *)(param_1 + 0x30b) = 0; goto LAB_0017db66; } uVar8 = (ulong)*(uint *)(param_1 + 0x60); } memcpy(__dest,param_2,uVar8 * 0x70); if (*(int *)(param_1 + 0x60) != 0) { lVar7 = 0x50; uVar8 = 0; do { pcVar1 = *(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x38); if (pcVar1 != (code *)0x0) { cVar3 = (*pcVar1)(*(int4 *)((long)param_2 + lVar7 + 0x10)); if (cVar3 == '\0') { *(int4 *)(param_1 + 0x108) = 0x7f4; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; pcVar6 = PTR_s_Buffer_type_is_not_supported_004e5050; goto LAB_0017dbff; } } lVar5 = *(long *)(param_1 + 0x78); if (*(long *)(lVar5 + -0x48 + lVar7) == 0) { *(long *)(lVar5 + lVar7 + -0x48) = lVar5 + lVar7 + 0x17; lVar5 = *(long *)(param_1 + 0x78); } if (*(long *)(lVar5 + -0x50 + lVar7) == 0) { *(long *)(lVar5 + -0x50 + lVar7) = lVar5 + lVar7; lVar5 = *(long *)(param_1 + 0x78); } if (*(long *)(lVar5 + -0x38 + lVar7) == 0) { *(long *)(lVar5 + lVar7 + -0x38) = lVar5 + lVar7 + 0x14; } uVar4 = *(int *)((long)param_2 + lVar7 + 0x10) - 1; if (uVar4 < 0xd) { uVar2 = *(int8 *)(&DAT_00216908 + (ulong)uVar4 * 8); *(int8 *)(*(long *)(param_1 + 0x78) + lVar7) = uVar2; **(int8 **)(*(long *)(param_1 + 0x78) + -0x50 + lVar7) = uVar2; } uVar8 = uVar8 + 1; lVar7 = lVar7 + 0x70; } while (uVar8 < *(uint *)(param_1 + 0x60)); } *(int1 *)(param_1 + 0xe8) = 1; *(int4 *)(param_1 + 0x108) = 0; *(int4 *)(param_1 + 0x30d) = 0x30303030; *(int2 *)(param_1 + 0x311) = 0x30; *(int1 *)(param_1 + 0x10c) = 0; uVar9 = 0; } goto LAB_0017db66; } *(int4 *)(param_1 + 0x108) = 0x804; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; pcVar6 = PTR_s_Prepared_statement_contains_no_m_004e50d0; } strncpy((char *)(param_1 + 0x10c),pcVar6,0x200); *(int1 *)(param_1 + 0x30b) = 0; uVar9 = 1; LAB_0017db66: return uVar9 & 0xffffffff; }
13,681
test_fetch_tiny
eloqsql/tests/mysql_client_test.c
static void test_fetch_tiny() { int rc; myheader("test_fetch_tiny"); rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_bind_fetch"); myquery(rc); rc= mysql_query(mysql, "CREATE TABLE test_bind_fetch(c1 tinyint unsigned, \ c2 tinyint, \ c3 tinyint unsigned, \ c4 tinyint, \ c5 tinyint, \ c6 tinyint, \ c7 tinyint unsigned)"); myquery(rc); bind_fetch(3); }
O3
c
test_fetch_tiny: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax cmpb $0x1, 0x3d7b55(%rip) # 0x41a4c1 jg 0x429e7 movq 0x35d64b(%rip), %rbx # 0x39ffc0 movq (%rbx), %rdi leaq 0x9cb45(%rip), %rdx # 0xdf4c4 movl $0x1, %esi xorl %eax, %eax callq 0x39240 movq (%rbx), %rdi movl 0x3d7d78(%rip), %ecx # 0x41a70c leal 0x1(%rcx), %eax movl %eax, 0x3d7d6f(%rip) # 0x41a70c movl 0x3d7d64(%rip), %r8d # 0x41a708 movl 0x3d7b41(%rip), %r9d # 0x41a4ec leaq 0x9ceb4(%rip), %rax # 0xdf866 movq %rax, (%rsp) leaq 0x9de0f(%rip), %rdx # 0xe07cc movl $0x1, %esi xorl %eax, %eax callq 0x39240 movq (%rbx), %rdi leaq 0x9cb29(%rip), %rdx # 0xdf4fc movl $0x1, %esi xorl %eax, %eax callq 0x39240 movq (%rbx), %rdi callq 0x394b0 movq 0x3d7ada(%rip), %rdi # 0x41a4c8 leaq 0x9f07c(%rip), %rsi # 0xe1a71 callq 0x3b116 testl %eax, %eax jne 0x42a25 movq 0x3d7ac3(%rip), %rdi # 0x41a4c8 leaq 0x9f7c1(%rip), %rsi # 0xe21cd callq 0x3b116 testl %eax, %eax jne 0x42a44 movl $0x3, %edi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x41f62 xorl %edi, %edi callq 0x3ba57 leaq 0x9c379(%rip), %rdi # 0xdedac leaq 0xb2685(%rip), %rdx # 0xf50bf movl $0x10fa, %esi # imm = 0x10FA callq 0x3bb30 xorl %edi, %edi callq 0x3ba57 leaq 0x9c35a(%rip), %rdi # 0xdedac leaq 0xb2666(%rip), %rdx # 0xf50bf movl $0x1103, %esi # imm = 0x1103 callq 0x3bb30
test_fetch_tiny: push rbp mov rbp, rsp push rbx push rax cmp cs:opt_silent, 1 jg short loc_429E7 mov rbx, cs:stdout_ptr mov rdi, [rbx] lea rdx, asc_DF4C4; "\n\n###################################"... mov esi, 1 xor eax, eax call ___fprintf_chk mov rdi, [rbx] mov ecx, cs:test_count lea eax, [rcx+1] mov cs:test_count, eax mov r8d, cs:iter_count mov r9d, cs:opt_count lea rax, aTestFetchTiny; "test_fetch_tiny" mov [rsp+10h+var_10], rax lea rdx, aUOfUUS; "%u of (%u/%u): %s" mov esi, 1 xor eax, eax call ___fprintf_chk mov rdi, [rbx] lea rdx, asc_DF4FC; " \n###################################"... mov esi, 1 xor eax, eax call ___fprintf_chk mov rdi, [rbx] call _fflush loc_429E7: mov rdi, cs:mysql lea rsi, aDropTableIfExi_7; "DROP TABLE IF EXISTS test_bind_fetch" call wrap_mysql_query test eax, eax jnz short loc_42A25 mov rdi, cs:mysql lea rsi, aCreateTableTes_6; "CREATE TABLE test_bind_fetch(c1 tinyint"... call wrap_mysql_query test eax, eax jnz short loc_42A44 mov edi, 3 add rsp, 8 pop rbx pop rbp jmp bind_fetch loc_42A25: xor edi, edi call print_error lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, aTmIYear0+9; "r == 0" mov esi, 10FAh call die loc_42A44: xor edi, edi call print_error lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, aTmIYear0+9; "r == 0" mov esi, 1103h call die
void test_fetch_tiny() { int v0; // ecx if ( opt_silent <= 1 ) { __fprintf_chk(stdout, 1LL, "\n\n#####################################\n"); v0 = test_count++; __fprintf_chk(stdout, 1LL, "%u of (%u/%u): %s", v0, iter_count, opt_count, "test_fetch_tiny"); __fprintf_chk(stdout, 1LL, " \n#####################################\n"); fflush(stdout); } if ( !(unsigned int)wrap_mysql_query(mysql, (long long)"DROP TABLE IF EXISTS test_bind_fetch") ) { if ( !(unsigned int)wrap_mysql_query( mysql, (long long)"CREATE TABLE test_bind_fetch(c1 tinyint unsigned, " " c2 tinyint, c3" " tinyint unsigned, c4 tinyint, " " c5 tinyint, " " c6 tinyint, " " c7 tinyint unsigned)") ) JUMPOUT(0x41F62LL); print_error(0LL); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 4355, "r == 0"); } print_error(0LL); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 4346, "r == 0"); }
test_fetch_tiny: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX CMP byte ptr [0x0051a4c1],0x1 JG 0x001429e7 MOV RBX,qword ptr [0x0049ffc0] MOV RDI,qword ptr [RBX] LEA RDX,[0x1df4c4] MOV ESI,0x1 XOR EAX,EAX CALL 0x00139240 MOV RDI,qword ptr [RBX] MOV ECX,dword ptr [0x0051a70c] LEA EAX,[RCX + 0x1] MOV dword ptr [0x0051a70c],EAX MOV R8D,dword ptr [0x0051a708] MOV R9D,dword ptr [0x0051a4ec] LEA RAX,[0x1df866] MOV qword ptr [RSP],RAX LEA RDX,[0x1e07cc] MOV ESI,0x1 XOR EAX,EAX CALL 0x00139240 MOV RDI,qword ptr [RBX] LEA RDX,[0x1df4fc] MOV ESI,0x1 XOR EAX,EAX CALL 0x00139240 MOV RDI,qword ptr [RBX] CALL 0x001394b0 LAB_001429e7: MOV RDI,qword ptr [0x0051a4c8] LEA RSI,[0x1e1a71] CALL 0x0013b116 TEST EAX,EAX JNZ 0x00142a25 MOV RDI,qword ptr [0x0051a4c8] LEA RSI,[0x1e21cd] CALL 0x0013b116 TEST EAX,EAX JNZ 0x00142a44 MOV EDI,0x3 ADD RSP,0x8 POP RBX POP RBP JMP 0x00141f62 LAB_00142a25: XOR EDI,EDI CALL 0x0013ba57 LEA RDI,[0x1dedac] LEA RDX,[0x1f50bf] MOV ESI,0x10fa CALL 0x0013bb30 LAB_00142a44: XOR EDI,EDI CALL 0x0013ba57 LEA RDI,[0x1dedac] LEA RDX,[0x1f50bf] MOV ESI,0x1103 CALL 0x0013bb30
void test_fetch_tiny(void) { int *puVar1; int iVar2; puVar1 = PTR_stdout_0049ffc0; if (opt_silent < '\x02') { __fprintf_chk(*(int8 *)PTR_stdout_0049ffc0,1,"\n\n#####################################\n" ); iVar2 = test_count; test_count = test_count + 1; __fprintf_chk(*(int8 *)puVar1,1,"%u of (%u/%u): %s",iVar2,iter_count,opt_count, "test_fetch_tiny"); __fprintf_chk(*(int8 *)puVar1,1," \n#####################################\n"); fflush(*(FILE **)puVar1); } iVar2 = wrap_mysql_query(mysql,"DROP TABLE IF EXISTS test_bind_fetch"); if (iVar2 == 0) { iVar2 = wrap_mysql_query(mysql, "CREATE TABLE test_bind_fetch(c1 tinyint unsigned, c2 tinyint, c3 tinyint unsigned, c4 tinyint, c5 tinyint, c6 tinyint, c7 tinyint unsigned)" ); if (iVar2 == 0) { bind_fetch(3); return; } print_error(0); /* WARNING: Subroutine does not return */ die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x1103,"r == 0"); } print_error(0); /* WARNING: Subroutine does not return */ die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x10fa,"r == 0"); }
13,682
mj_markStack
aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_io.c
void mj__markStack(mjData* d) #endif { if (!d->threadpool) { mjStackInfo stack_info = get_stack_info_from_data(d); markstackinternal(d, &stack_info); d->pstack = stack_info.bottom - stack_info.top; d->pbase = stack_info.stack_base; return; } size_t thread_id = mju_threadPoolCurrentWorkerId((mjThreadPool*)d->threadpool); mjStackInfo* stack_info = mju_getStackInfoForThread(d, thread_id); markstackinternal(d, stack_info); }
O0
c
mj_markStack: subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq 0x30(%rsp), %rax cmpq $0x0, 0x27b90(%rax) jne 0xe0f19 movq 0x30(%rsp), %rsi leaq 0x10(%rsp), %rdi callq 0xe0f60 movq 0x30(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0xe0fc0 movq 0x10(%rsp), %rcx subq 0x18(%rsp), %rcx movq 0x30(%rsp), %rax movq %rcx, 0x18(%rax) movq 0x28(%rsp), %rcx movq 0x30(%rsp), %rax movq %rcx, 0x20(%rax) jmp 0xe0f50 movq 0x30(%rsp), %rax movq 0x27b90(%rax), %rdi callq 0x4a000 movq %rax, 0x8(%rsp) movq 0x30(%rsp), %rdi movq 0x8(%rsp), %rsi callq 0x48a710 movq %rax, (%rsp) movq 0x30(%rsp), %rdi movq (%rsp), %rsi callq 0xe0fc0 addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
mj_markStack: sub rsp, 38h mov [rsp+38h+var_8], rdi mov rax, [rsp+38h+var_8] cmp qword ptr [rax+27B90h], 0 jnz short loc_E0F19 mov rsi, [rsp+38h+var_8] lea rdi, [rsp+38h+var_28] call get_stack_info_from_data mov rdi, [rsp+38h+var_8] lea rsi, [rsp+38h+var_28] call markstackinternal mov rcx, [rsp+38h+var_28] sub rcx, [rsp+38h+var_20] mov rax, [rsp+38h+var_8] mov [rax+18h], rcx mov rcx, [rsp+38h+var_10] mov rax, [rsp+38h+var_8] mov [rax+20h], rcx jmp short loc_E0F50 loc_E0F19: mov rax, [rsp+38h+var_8] mov rdi, [rax+27B90h] call _mju_threadPoolCurrentWorkerId mov [rsp+38h+var_30], rax mov rdi, [rsp+38h+var_8] mov rsi, [rsp+38h+var_30] call mju_getStackInfoForThread mov [rsp+38h+var_38], rax mov rdi, [rsp+38h+var_8] mov rsi, [rsp+38h+var_38] call markstackinternal loc_E0F50: add rsp, 38h retn
long long mj_markStack(_QWORD *a1) { long long result; // rax long long StackInfoForThread; // [rsp+0h] [rbp-38h] long long v3; // [rsp+8h] [rbp-30h] _QWORD v4[4]; // [rsp+10h] [rbp-28h] BYREF _QWORD *v5; // [rsp+30h] [rbp-8h] v5 = a1; if ( a1[20338] ) { v3 = mju_threadPoolCurrentWorkerId(v5[20338]); StackInfoForThread = mju_getStackInfoForThread(v5, v3); return markstackinternal(v5, StackInfoForThread); } else { get_stack_info_from_data(v4, v5); markstackinternal(v5, v4); v5[3] = v4[0] - v4[1]; result = (long long)v5; v5[4] = v4[3]; } return result; }
mj_markStack: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV RAX,qword ptr [RSP + 0x30] CMP qword ptr [RAX + 0x27b90],0x0 JNZ 0x001e0f19 MOV RSI,qword ptr [RSP + 0x30] LEA RDI,[RSP + 0x10] CALL 0x001e0f60 MOV RDI,qword ptr [RSP + 0x30] LEA RSI,[RSP + 0x10] CALL 0x001e0fc0 MOV RCX,qword ptr [RSP + 0x10] SUB RCX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x18],RCX MOV RCX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x20],RCX JMP 0x001e0f50 LAB_001e0f19: MOV RAX,qword ptr [RSP + 0x30] MOV RDI,qword ptr [RAX + 0x27b90] CALL 0x0014a000 MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x8] CALL 0x0058a710 MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP] CALL 0x001e0fc0 LAB_001e0f50: ADD RSP,0x38 RET
void mj_markStack(long param_1) { int8 uVar1; long local_28; long local_20; int8 local_10; long local_8; local_8 = param_1; if (*(long *)(param_1 + 0x27b90) == 0) { get_stack_info_from_data(&local_28,param_1); markstackinternal(local_8,&local_28); *(long *)(local_8 + 0x18) = local_28 - local_20; *(int8 *)(local_8 + 0x20) = local_10; } else { uVar1 = mju_threadPoolCurrentWorkerId(*(int8 *)(param_1 + 0x27b90)); uVar1 = mju_getStackInfoForThread(local_8,uVar1); markstackinternal(local_8,uVar1); } return; }
13,683
mj_markStack
aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_io.c
void mj__markStack(mjData* d) #endif { if (!d->threadpool) { mjStackInfo stack_info = get_stack_info_from_data(d); markstackinternal(d, &stack_info); d->pstack = stack_info.bottom - stack_info.top; d->pbase = stack_info.stack_base; return; } size_t thread_id = mju_threadPoolCurrentWorkerId((mjThreadPool*)d->threadpool); mjStackInfo* stack_info = mju_getStackInfoForThread(d, thread_id); markstackinternal(d, stack_info); }
O3
c
mj_markStack: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x27b90(%rdi), %rdi testq %rdi, %rdi je 0x792f7 callq 0x2dde0 movq %rbx, %rdi movq %rax, %rsi callq 0x175a1d movq %rax, %r14 movq (%rax), %r13 movq 0x8(%rax), %r15 movq %r15, %r12 andq $-0x8, %r12 addq $-0x18, %r12 movq %r15, %rcx subq %r12, %rcx movq 0x10(%rax), %rax movq %r15, %rdx subq %rax, %rdx cmpq %rdx, %rcx ja 0x793c3 subq %r12, %r13 movq %r12, 0x8(%r14) movq 0x27b90(%rbx), %rdi testq %rdi, %rdi je 0x7937b callq 0x2dde0 movq 0x38(%rbx,%rax,8), %rcx cmpq %r13, %rcx cmovaq %rcx, %r13 movq %r13, 0x38(%rbx,%rax,8) jmp 0x793a3 movq 0x27770(%rbx), %rdi movq (%rbx), %rsi movq 0x18(%rbx), %r13 leaq (%rsi,%rdi), %r14 movq %r14, %r15 subq %r13, %r15 movq 0x28(%rbx), %rax movq 0x20(%rbx), %rbp movq %r15, %r12 andq $-0x8, %r12 addq $-0x18, %r12 movq %r15, %rcx subq %r12, %rcx addq %rcx, %r13 addq %rax, %rdi movq %r15, %rdx subq %rdi, %rdx cmpq %rdx, %rcx ja 0x79400 movq 0x30(%rbx), %rax cmpq %r13, %rax cmovbeq %r13, %rax movq %rax, 0x30(%rbx) movq 0x438(%rbx), %rax addq 0x28(%rbx), %r13 cmpq %r13, %rax cmovaq %rax, %r13 movq %r13, 0x438(%rbx) movq %rbp, (%r12) movq %r15, 0x8(%r12) subq %r12, %r14 movq %r14, 0x18(%rbx) movq %r12, 0x20(%rbx) jmp 0x793b4 movq 0x30(%rbx), %rax cmpq %r13, %rax cmovbeq %r13, %rax movq %rax, 0x30(%rbx) movq 0x438(%rbx), %rax addq 0x28(%rbx), %r13 cmpq %r13, %rax cmovaq %rax, %r13 movq %r13, 0x438(%rbx) movq 0x18(%r14), %rax movq %rax, (%r12) movq %r15, 0x8(%r12) movq %r12, 0x18(%r14) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r13, %rsi subq %rax, %rsi movl 0x27730(%rbx), %r8d movl 0x27734(%rbx), %r9d movl 0x2773c(%rbx), %r10d movl 0x27744(%rbx), %r11d leaq 0x152449(%rip), %rdi # 0x1cb835 xorl %eax, %eax pushq %r11 pushq %r10 callq 0x2d3e0 addq $0x10, %rsp jmp 0x792c5 subq %rax, %rsi movl 0x27730(%rbx), %r8d movl 0x27734(%rbx), %r9d movl 0x2773c(%rbx), %r10d movl 0x27744(%rbx), %r11d leaq 0x15240f(%rip), %rdi # 0x1cb835 xorl %eax, %eax pushq %r11 pushq %r10 callq 0x2d3e0 addq $0x10, %rsp movq 0x27b90(%rbx), %rdi testq %rdi, %rdi je 0x7933d callq 0x2dde0 movq 0x38(%rbx,%rax,8), %rcx cmpq %r13, %rcx cmovaq %rcx, %r13 movq %r13, 0x38(%rbx,%rax,8) jmp 0x79365
mj_markStack: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov rdi, [rdi+27B90h] test rdi, rdi jz short loc_792F7 call _mju_threadPoolCurrentWorkerId mov rdi, rbx mov rsi, rax call mju_getStackInfoForThread mov r14, rax mov r13, [rax] mov r15, [rax+8] mov r12, r15 and r12, 0FFFFFFFFFFFFFFF8h add r12, 0FFFFFFFFFFFFFFE8h mov rcx, r15 sub rcx, r12 mov rax, [rax+10h] mov rdx, r15 sub rdx, rax cmp rcx, rdx ja loc_793C3 loc_792C5: sub r13, r12 mov [r14+8], r12 mov rdi, [rbx+27B90h] test rdi, rdi jz loc_7937B call _mju_threadPoolCurrentWorkerId mov rcx, [rbx+rax*8+38h] cmp rcx, r13 cmova r13, rcx mov [rbx+rax*8+38h], r13 jmp loc_793A3 loc_792F7: mov rdi, [rbx+27770h] mov rsi, [rbx] mov r13, [rbx+18h] lea r14, [rsi+rdi] mov r15, r14 sub r15, r13 mov rax, [rbx+28h] mov rbp, [rbx+20h] mov r12, r15 and r12, 0FFFFFFFFFFFFFFF8h add r12, 0FFFFFFFFFFFFFFE8h mov rcx, r15 sub rcx, r12 add r13, rcx add rdi, rax mov rdx, r15 sub rdx, rdi cmp rcx, rdx ja loc_79400 loc_7933D: mov rax, [rbx+30h] cmp rax, r13 cmovbe rax, r13 mov [rbx+30h], rax mov rax, [rbx+438h] add r13, [rbx+28h] cmp rax, r13 cmova r13, rax mov [rbx+438h], r13 loc_79365: mov [r12], rbp mov [r12+8], r15 sub r14, r12 mov [rbx+18h], r14 mov [rbx+20h], r12 jmp short loc_793B4 loc_7937B: mov rax, [rbx+30h] cmp rax, r13 cmovbe rax, r13 mov [rbx+30h], rax mov rax, [rbx+438h] add r13, [rbx+28h] cmp rax, r13 cmova r13, rax mov [rbx+438h], r13 loc_793A3: mov rax, [r14+18h] mov [r12], rax mov [r12+8], r15 mov [r14+18h], r12 loc_793B4: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_793C3: mov rsi, r13 sub rsi, rax mov r8d, [rbx+27730h] mov r9d, [rbx+27734h] mov r10d, [rbx+2773Ch] mov r11d, [rbx+27744h] lea rdi, aMjStackallocIn; "mj_stackAlloc: insufficient memory: max"... xor eax, eax push r11 push r10 call _mju_error add rsp, 10h jmp loc_792C5 loc_79400: sub rsi, rax mov r8d, [rbx+27730h] mov r9d, [rbx+27734h] mov r10d, [rbx+2773Ch] mov r11d, [rbx+27744h] lea rdi, aMjStackallocIn; "mj_stackAlloc: insufficient memory: max"... xor eax, eax push r11 push r10 call _mju_error add rsp, 10h mov rdi, [rbx+27B90h] test rdi, rdi jz loc_7933D call _mju_threadPoolCurrentWorkerId mov rcx, [rbx+rax*8+38h] cmp rcx, r13 cmova r13, rcx mov [rbx+rax*8+38h], r13 jmp loc_79365
unsigned long long mj_markStack(long long a1) { long long v2; // rdi long long v3; // rax long long *StackInfoForThread; // r14 long long v5; // r13 unsigned long long v6; // r15 unsigned long long *v7; // r12 long long v8; // rax unsigned long long v9; // r13 long long v10; // rdi long long v11; // rax long long v12; // rdi long long v13; // r14 long long v14; // r15 long long v15; // rax long long v16; // rbp _QWORD *v17; // r12 unsigned long long v18; // r13 long long v19; // rdi unsigned long long v20; // rax unsigned long long result; // rax unsigned long long v22; // r13 unsigned long long v23; // rax unsigned long long v24; // r13 long long v25; // rdi v2 = *(_QWORD *)(a1 + 162704); if ( v2 ) { v3 = mju_threadPoolCurrentWorkerId(v2); StackInfoForThread = (long long *)mju_getStackInfoForThread(a1, v3); v5 = *StackInfoForThread; v6 = StackInfoForThread[1]; v7 = (unsigned long long *)((v6 & 0xFFFFFFFFFFFFFFF8LL) - 24); v8 = StackInfoForThread[2]; if ( v6 - (unsigned long long)v7 > v6 - v8 ) mju_error( (unsigned int)"mj_stackAlloc: insufficient memory: max = %zu, available = %zu, requested = %zu (ne = %d, nf = %d," " nefc = %d, ncon = %d)", v5 - v8, v6 - v8, v6 - (_DWORD)v7, *(_DWORD *)(a1 + 161584), *(_DWORD *)(a1 + 161588), *(unsigned int *)(a1 + 161596), *(unsigned int *)(a1 + 161604)); v9 = v5 - (_QWORD)v7; StackInfoForThread[1] = (long long)v7; v10 = *(_QWORD *)(a1 + 162704); if ( v10 ) { v11 = mju_threadPoolCurrentWorkerId(v10); if ( *(_QWORD *)(a1 + 8 * v11 + 56) > v9 ) v9 = *(_QWORD *)(a1 + 8 * v11 + 56); *(_QWORD *)(a1 + 8 * v11 + 56) = v9; } else { v23 = *(_QWORD *)(a1 + 48); if ( v23 <= v9 ) v23 = v9; *(_QWORD *)(a1 + 48) = v23; v24 = *(_QWORD *)(a1 + 40) + v9; if ( *(_QWORD *)(a1 + 1080) > v24 ) v24 = *(_QWORD *)(a1 + 1080); *(_QWORD *)(a1 + 1080) = v24; } result = StackInfoForThread[3]; *v7 = result; v7[1] = v6; StackInfoForThread[3] = (long long)v7; } else { v12 = *(_QWORD *)(a1 + 161648); v13 = *(_QWORD *)a1 + v12; v14 = v13 - *(_QWORD *)(a1 + 24); v15 = *(_QWORD *)(a1 + 40); v16 = *(_QWORD *)(a1 + 32); v17 = (_QWORD *)((v14 & 0xFFFFFFFFFFFFFFF8LL) - 24); v18 = v13 - (_QWORD)v17; v19 = v15 + v12; if ( v14 - (long long)v17 > (unsigned long long)(v14 - v19) && (mju_error( (unsigned int)"mj_stackAlloc: insufficient memory: max = %zu, available = %zu, requested = %zu (ne = %d, nf =" " %d, nefc = %d, ncon = %d)", *(_DWORD *)a1 - v15, v14 - v19, v14 - (_DWORD)v17, *(_DWORD *)(a1 + 161584), *(_DWORD *)(a1 + 161588), *(unsigned int *)(a1 + 161596), *(unsigned int *)(a1 + 161604)), (v25 = *(_QWORD *)(a1 + 162704)) != 0) ) { result = mju_threadPoolCurrentWorkerId(v25); if ( *(_QWORD *)(a1 + 8 * result + 56) > v18 ) v18 = *(_QWORD *)(a1 + 8 * result + 56); *(_QWORD *)(a1 + 8 * result + 56) = v18; } else { v20 = *(_QWORD *)(a1 + 48); if ( v20 <= v18 ) v20 = v13 - (_QWORD)v17; *(_QWORD *)(a1 + 48) = v20; result = *(_QWORD *)(a1 + 1080); v22 = *(_QWORD *)(a1 + 40) + v18; if ( result > v22 ) v22 = *(_QWORD *)(a1 + 1080); *(_QWORD *)(a1 + 1080) = v22; } *v17 = v16; v17[1] = v14; *(_QWORD *)(a1 + 24) = v13 - (_QWORD)v17; *(_QWORD *)(a1 + 32) = v17; } return result; }
mj_markStack: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x27b90] TEST RDI,RDI JZ 0x001792f7 CALL 0x0012dde0 MOV RDI,RBX MOV RSI,RAX CALL 0x00275a1d MOV R14,RAX MOV R13,qword ptr [RAX] MOV R15,qword ptr [RAX + 0x8] MOV R12,R15 AND R12,-0x8 ADD R12,-0x18 MOV RCX,R15 SUB RCX,R12 MOV RAX,qword ptr [RAX + 0x10] MOV RDX,R15 SUB RDX,RAX CMP RCX,RDX JA 0x001793c3 LAB_001792c5: SUB R13,R12 MOV qword ptr [R14 + 0x8],R12 MOV RDI,qword ptr [RBX + 0x27b90] TEST RDI,RDI JZ 0x0017937b CALL 0x0012dde0 MOV RCX,qword ptr [RBX + RAX*0x8 + 0x38] CMP RCX,R13 CMOVA R13,RCX MOV qword ptr [RBX + RAX*0x8 + 0x38],R13 JMP 0x001793a3 LAB_001792f7: MOV RDI,qword ptr [RBX + 0x27770] MOV RSI,qword ptr [RBX] MOV R13,qword ptr [RBX + 0x18] LEA R14,[RSI + RDI*0x1] MOV R15,R14 SUB R15,R13 MOV RAX,qword ptr [RBX + 0x28] MOV RBP,qword ptr [RBX + 0x20] MOV R12,R15 AND R12,-0x8 ADD R12,-0x18 MOV RCX,R15 SUB RCX,R12 ADD R13,RCX ADD RDI,RAX MOV RDX,R15 SUB RDX,RDI CMP RCX,RDX JA 0x00179400 LAB_0017933d: MOV RAX,qword ptr [RBX + 0x30] CMP RAX,R13 CMOVBE RAX,R13 MOV qword ptr [RBX + 0x30],RAX MOV RAX,qword ptr [RBX + 0x438] ADD R13,qword ptr [RBX + 0x28] CMP RAX,R13 CMOVA R13,RAX MOV qword ptr [RBX + 0x438],R13 LAB_00179365: MOV qword ptr [R12],RBP MOV qword ptr [R12 + 0x8],R15 SUB R14,R12 MOV qword ptr [RBX + 0x18],R14 MOV qword ptr [RBX + 0x20],R12 JMP 0x001793b4 LAB_0017937b: MOV RAX,qword ptr [RBX + 0x30] CMP RAX,R13 CMOVBE RAX,R13 MOV qword ptr [RBX + 0x30],RAX MOV RAX,qword ptr [RBX + 0x438] ADD R13,qword ptr [RBX + 0x28] CMP RAX,R13 CMOVA R13,RAX MOV qword ptr [RBX + 0x438],R13 LAB_001793a3: MOV RAX,qword ptr [R14 + 0x18] MOV qword ptr [R12],RAX MOV qword ptr [R12 + 0x8],R15 MOV qword ptr [R14 + 0x18],R12 LAB_001793b4: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001793c3: MOV RSI,R13 SUB RSI,RAX MOV R8D,dword ptr [RBX + 0x27730] MOV R9D,dword ptr [RBX + 0x27734] MOV R10D,dword ptr [RBX + 0x2773c] MOV R11D,dword ptr [RBX + 0x27744] LEA RDI,[0x2cb835] XOR EAX,EAX PUSH R11 PUSH R10 CALL 0x0012d3e0 ADD RSP,0x10 JMP 0x001792c5 LAB_00179400: SUB RSI,RAX MOV R8D,dword ptr [RBX + 0x27730] MOV R9D,dword ptr [RBX + 0x27734] MOV R10D,dword ptr [RBX + 0x2773c] MOV R11D,dword ptr [RBX + 0x27744] LEA RDI,[0x2cb835] XOR EAX,EAX PUSH R11 PUSH R10 CALL 0x0012d3e0 ADD RSP,0x10 MOV RDI,qword ptr [RBX + 0x27b90] TEST RDI,RDI JZ 0x0017933d CALL 0x0012dde0 MOV RCX,qword ptr [RBX + RAX*0x8 + 0x38] CMP RCX,R13 CMOVA R13,RCX MOV qword ptr [RBX + RAX*0x8 + 0x38],R13 JMP 0x00179365
void mj_markStack(long *param_1) { long lVar1; int8 uVar2; long *plVar3; long lVar4; long lVar5; ulong uVar6; ulong uVar7; long *plVar8; ulong uVar9; ulong uVar10; if (param_1[0x4f72] == 0) { lVar4 = *param_1 + param_1[0x4eee]; uVar10 = lVar4 - param_1[3]; lVar1 = param_1[4]; plVar3 = (long *)((uVar10 & 0xfffffffffffffff8) - 0x18); uVar6 = uVar10 - (long)plVar3; uVar9 = param_1[3] + uVar6; uVar7 = uVar10 - (param_1[0x4eee] + param_1[5]); if ((uVar7 < uVar6) && (mju_error("mj_stackAlloc: insufficient memory: max = %zu, available = %zu, requested = %zu (ne = %d, nf = %d, nefc = %d, ncon = %d)" ,*param_1 - param_1[5],uVar7,uVar6,(int)param_1[0x4ee6], *(int4 *)((long)param_1 + 0x27734),*(int4 *)((long)param_1 + 0x2773c), *(int4 *)((long)param_1 + 0x27744)), param_1[0x4f72] != 0)) { lVar5 = mju_threadPoolCurrentWorkerId(); if (uVar9 < (ulong)param_1[lVar5 + 7]) { uVar9 = param_1[lVar5 + 7]; } param_1[lVar5 + 7] = uVar9; } else { uVar6 = param_1[6]; if ((ulong)param_1[6] <= uVar9) { uVar6 = uVar9; } param_1[6] = uVar6; uVar6 = uVar9 + param_1[5]; if (uVar9 + param_1[5] < (ulong)param_1[0x87]) { uVar6 = param_1[0x87]; } param_1[0x87] = uVar6; } *plVar3 = lVar1; *(ulong *)((uVar10 & 0xfffffffffffffff8) - 0x10) = uVar10; param_1[3] = lVar4 - (long)plVar3; param_1[4] = (long)plVar3; return; } uVar2 = mju_threadPoolCurrentWorkerId(); plVar3 = (long *)mju_getStackInfoForThread(param_1,uVar2); lVar4 = *plVar3; uVar9 = plVar3[1]; plVar8 = (long *)((uVar9 & 0xfffffffffffffff8) - 0x18); uVar6 = uVar9 - plVar3[2]; if (uVar6 < uVar9 - (long)plVar8) { mju_error("mj_stackAlloc: insufficient memory: max = %zu, available = %zu, requested = %zu (ne = %d, nf = %d, nefc = %d, ncon = %d)" ,lVar4 - plVar3[2],uVar6,uVar9 - (long)plVar8,(int)param_1[0x4ee6], *(int4 *)((long)param_1 + 0x27734),*(int4 *)((long)param_1 + 0x2773c), *(int4 *)((long)param_1 + 0x27744)); } uVar6 = lVar4 - (long)plVar8; plVar3[1] = (long)plVar8; if (param_1[0x4f72] == 0) { uVar7 = param_1[6]; if ((ulong)param_1[6] <= uVar6) { uVar7 = uVar6; } param_1[6] = uVar7; uVar7 = uVar6 + param_1[5]; if (uVar6 + param_1[5] < (ulong)param_1[0x87]) { uVar7 = param_1[0x87]; } param_1[0x87] = uVar7; } else { lVar4 = mju_threadPoolCurrentWorkerId(); if (uVar6 < (ulong)param_1[lVar4 + 7]) { uVar6 = param_1[lVar4 + 7]; } param_1[lVar4 + 7] = uVar6; } *plVar8 = plVar3[3]; *(ulong *)((uVar9 & 0xfffffffffffffff8) - 0x10) = uVar9; plVar3[3] = (long)plVar8; return; }
13,684
mi_delete_static_record
eloqsql/storage/myisam/mi_statrec.c
int _mi_delete_static_record(MI_INFO *info) { uchar temp[9]; /* 1+sizeof(uint32) */ info->state->del++; info->state->empty+=info->s->base.pack_reclength; temp[0]= '\0'; /* Mark that record is deleted */ _mi_dpointer(info,temp+1,info->s->state.dellink); info->s->state.dellink = info->lastpos; info->rec_cache.seek_not_done=1; return (info->s->file_write(info,(uchar*) temp, 1+info->s->rec_reflength, info->lastpos, MYF(MY_NABP)) != 0); }
O0
c
mi_delete_static_record: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x20(%rbp) movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movq 0x8(%rax), %rcx incq %rcx movq %rcx, 0x8(%rax) movq -0x20(%rbp), %rax movq (%rax), %rcx movq 0x8(%rax), %rax movq 0x148(%rcx), %rdx movq 0x10(%rax), %rcx addq %rdx, %rcx movq %rcx, 0x10(%rax) movb $0x0, -0x11(%rbp) movq -0x20(%rbp), %rdi leaq -0x10(%rbp), %rsi movq (%rdi), %rax movq 0x58(%rax), %rdx callq 0x46f90 movq -0x20(%rbp), %rcx movq (%rcx), %rax movq 0x170(%rcx), %rcx movq %rcx, 0x58(%rax) movq -0x20(%rbp), %rax movl $0x1, 0x300(%rax) movq -0x20(%rbp), %rdi movq (%rdi), %rdx movq 0x170(%rdi), %rcx movq 0x2e8(%rdx), %rax movl 0x338(%rdx), %edx incl %edx leaq -0x11(%rbp), %rsi movl $0x4, %r8d callq *%rax testq %rax, %rax setne %al movzbl %al, %eax movl %eax, -0x24(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x4a841 movl -0x24(%rbp), %eax addq $0x30, %rsp popq %rbp retq callq 0x283b0 nopw %cs:(%rax,%rax)
_mi_delete_static_record: push rbp mov rbp, rsp sub rsp, 30h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_20], rdi mov rax, [rbp+var_20] mov rax, [rax+8] mov rcx, [rax+8] inc rcx mov [rax+8], rcx mov rax, [rbp+var_20] mov rcx, [rax] mov rax, [rax+8] mov rdx, [rcx+148h] mov rcx, [rax+10h] add rcx, rdx mov [rax+10h], rcx mov [rbp+var_11], 0 mov rdi, [rbp+var_20] lea rsi, [rbp+var_10] mov rax, [rdi] mov rdx, [rax+58h] call _mi_dpointer mov rcx, [rbp+var_20] mov rax, [rcx] mov rcx, [rcx+170h] mov [rax+58h], rcx mov rax, [rbp+var_20] mov dword ptr [rax+300h], 1 mov rdi, [rbp+var_20] mov rdx, [rdi] mov rcx, [rdi+170h] mov rax, [rdx+2E8h] mov edx, [rdx+338h] inc edx lea rsi, [rbp+var_11] mov r8d, 4 call rax test rax, rax setnz al movzx eax, al mov [rbp+var_24], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_4A841 mov eax, [rbp+var_24] add rsp, 30h pop rbp retn loc_4A841: call ___stack_chk_fail
_BOOL8 mi_delete_static_record(_QWORD *a1) { char v2; // [rsp+1Fh] [rbp-11h] BYREF _BYTE v3[8]; // [rsp+20h] [rbp-10h] BYREF unsigned long long v4; // [rsp+28h] [rbp-8h] v4 = __readfsqword(0x28u); ++*(_QWORD *)(a1[1] + 8LL); *(_QWORD *)(a1[1] + 16LL) += *(_QWORD *)(*a1 + 328LL); v2 = 0; mi_dpointer((long long)a1, v3, *(_QWORD *)(*a1 + 88LL)); *(_QWORD *)(*a1 + 88LL) = a1[46]; *((_DWORD *)a1 + 192) = 1; return (*(long long ( **)(_QWORD *, char *, _QWORD, _QWORD, long long))(*a1 + 744LL))( a1, &v2, (unsigned int)(*(_DWORD *)(*a1 + 824LL) + 1), a1[46], 4LL) != 0; }
_mi_delete_static_record: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x20],RDI MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RAX + 0x8] INC RCX MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RCX + 0x148] MOV RCX,qword ptr [RAX + 0x10] ADD RCX,RDX MOV qword ptr [RAX + 0x10],RCX MOV byte ptr [RBP + -0x11],0x0 MOV RDI,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0x10] MOV RAX,qword ptr [RDI] MOV RDX,qword ptr [RAX + 0x58] CALL 0x00146f90 MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RCX] MOV RCX,qword ptr [RCX + 0x170] MOV qword ptr [RAX + 0x58],RCX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x300],0x1 MOV RDI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x170] MOV RAX,qword ptr [RDX + 0x2e8] MOV EDX,dword ptr [RDX + 0x338] INC EDX LEA RSI,[RBP + -0x11] MOV R8D,0x4 CALL RAX TEST RAX,RAX SETNZ AL MOVZX EAX,AL MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0014a841 MOV EAX,dword ptr [RBP + -0x24] ADD RSP,0x30 POP RBP RET LAB_0014a841: CALL 0x001283b0
bool _mi_delete_static_record(long *param_1) { long lVar1; long in_FS_OFFSET; int1 local_19; int1 local_18 [8]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); *(long *)(param_1[1] + 8) = *(long *)(param_1[1] + 8) + 1; *(long *)(param_1[1] + 0x10) = *(long *)(param_1[1] + 0x10) + *(long *)(*param_1 + 0x148); local_19 = 0; _mi_dpointer(param_1,local_18,*(int8 *)(*param_1 + 0x58)); *(long *)(*param_1 + 0x58) = param_1[0x2e]; *(int4 *)(param_1 + 0x60) = 1; lVar1 = (**(code **)(*param_1 + 0x2e8)) (param_1,&local_19,*(int *)(*param_1 + 0x338) + 1,param_1[0x2e],4); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return lVar1 != 0; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
13,685
my_uca_charcmp_onelevel
eloqsql/strings/ctype-uca.c
static int my_uca_charcmp_onelevel(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2, uint level) { size_t length1, length2; const uint16 *weight1= my_char_weight_addr(&cs->uca->level[level], wc1); const uint16 *weight2= my_char_weight_addr(&cs->uca->level[level], wc2); if (!weight1 || !weight2) return wc1 != wc2; /* Quickly compare first weights */ if (weight1[0] != weight2[0]) return 1; /* Thoroughly compare all weights */ length1= cs->uca->level[level].lengths[wc1 >> MY_UCA_PSHIFT]; length2= cs->uca->level[level].lengths[wc2 >> MY_UCA_PSHIFT]; if (length1 > length2) return memcmp((const void*)weight1, (const void*)weight2, length2*2) ? 1: weight1[length2]; if (length1 < length2) return memcmp((const void*)weight1, (const void*)weight2, length1*2) ? 1 : weight2[length1]; return memcmp((const void*)weight1, (const void*)weight2, length1*2); }
O0
c
my_uca_charcmp_onelevel: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq -0x10(%rbp), %rax movq 0x60(%rax), %rdi movl -0x24(%rbp), %eax imulq $0x38, %rax, %rax addq %rax, %rdi movq -0x18(%rbp), %rax movl %eax, %esi callq 0x4e330 movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax movq 0x60(%rax), %rdi movl -0x24(%rbp), %eax imulq $0x38, %rax, %rax addq %rax, %rdi movq -0x20(%rbp), %rax movl %eax, %esi callq 0x4e330 movq %rax, -0x48(%rbp) cmpq $0x0, -0x40(%rbp) je 0x4e1f7 cmpq $0x0, -0x48(%rbp) jne 0x4e20f movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax setne %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x4(%rbp) jmp 0x4e318 movq -0x40(%rbp), %rax movzwl (%rax), %eax movq -0x48(%rbp), %rcx movzwl (%rcx), %ecx cmpl %ecx, %eax je 0x4e22d movl $0x1, -0x4(%rbp) jmp 0x4e318 movq -0x10(%rbp), %rax movq 0x60(%rax), %rax movl -0x24(%rbp), %ecx imulq $0x38, %rcx, %rcx addq %rcx, %rax movq 0x8(%rax), %rax movq -0x18(%rbp), %rcx shrq $0x8, %rcx movzbl (%rax,%rcx), %eax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x60(%rax), %rax movl -0x24(%rbp), %ecx imulq $0x38, %rcx, %rcx addq %rcx, %rax movq 0x8(%rax), %rax movq -0x20(%rbp), %rcx shrq $0x8, %rcx movzbl (%rax,%rcx), %eax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax jbe 0x4e2bd movq -0x40(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x38(%rbp), %rdx shlq %rdx callq 0x24140 cmpl $0x0, %eax je 0x4e2a6 movl $0x1, %eax movl %eax, -0x4c(%rbp) jmp 0x4e2b5 movq -0x40(%rbp), %rax movq -0x38(%rbp), %rcx movzwl (%rax,%rcx,2), %eax movl %eax, -0x4c(%rbp) movl -0x4c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x4e318 movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x4e301 movq -0x40(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x30(%rbp), %rdx shlq %rdx callq 0x24140 cmpl $0x0, %eax je 0x4e2ea movl $0x1, %eax movl %eax, -0x50(%rbp) jmp 0x4e2f9 movq -0x48(%rbp), %rax movq -0x30(%rbp), %rcx movzwl (%rax,%rcx,2), %eax movl %eax, -0x50(%rbp) movl -0x50(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x4e318 movq -0x40(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x30(%rbp), %rdx shlq %rdx callq 0x24140 movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_uca_charcmp_onelevel: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov rax, [rbp+var_10] mov rdi, [rax+60h] mov eax, [rbp+var_24] imul rax, 38h ; '8' add rdi, rax mov rax, [rbp+var_18] mov esi, eax call my_char_weight_addr mov [rbp+var_40], rax mov rax, [rbp+var_10] mov rdi, [rax+60h] mov eax, [rbp+var_24] imul rax, 38h ; '8' add rdi, rax mov rax, [rbp+var_20] mov esi, eax call my_char_weight_addr mov [rbp+var_48], rax cmp [rbp+var_40], 0 jz short loc_4E1F7 cmp [rbp+var_48], 0 jnz short loc_4E20F loc_4E1F7: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] setnz al and al, 1 movzx eax, al mov [rbp+var_4], eax jmp loc_4E318 loc_4E20F: mov rax, [rbp+var_40] movzx eax, word ptr [rax] mov rcx, [rbp+var_48] movzx ecx, word ptr [rcx] cmp eax, ecx jz short loc_4E22D mov [rbp+var_4], 1 jmp loc_4E318 loc_4E22D: mov rax, [rbp+var_10] mov rax, [rax+60h] mov ecx, [rbp+var_24] imul rcx, 38h ; '8' add rax, rcx mov rax, [rax+8] mov rcx, [rbp+var_18] shr rcx, 8 movzx eax, byte ptr [rax+rcx] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov rax, [rax+60h] mov ecx, [rbp+var_24] imul rcx, 38h ; '8' add rax, rcx mov rax, [rax+8] mov rcx, [rbp+var_20] shr rcx, 8 movzx eax, byte ptr [rax+rcx] mov [rbp+var_38], rax mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jbe short loc_4E2BD mov rdi, [rbp+var_40] mov rsi, [rbp+var_48] mov rdx, [rbp+var_38] shl rdx, 1 call _memcmp cmp eax, 0 jz short loc_4E2A6 mov eax, 1 mov [rbp+var_4C], eax jmp short loc_4E2B5 loc_4E2A6: mov rax, [rbp+var_40] mov rcx, [rbp+var_38] movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4C], eax loc_4E2B5: mov eax, [rbp+var_4C] mov [rbp+var_4], eax jmp short loc_4E318 loc_4E2BD: mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jnb short loc_4E301 mov rdi, [rbp+var_40] mov rsi, [rbp+var_48] mov rdx, [rbp+var_30] shl rdx, 1 call _memcmp cmp eax, 0 jz short loc_4E2EA mov eax, 1 mov [rbp+var_50], eax jmp short loc_4E2F9 loc_4E2EA: mov rax, [rbp+var_48] mov rcx, [rbp+var_30] movzx eax, word ptr [rax+rcx*2] mov [rbp+var_50], eax loc_4E2F9: mov eax, [rbp+var_50] mov [rbp+var_4], eax jmp short loc_4E318 loc_4E301: mov rdi, [rbp+var_40] mov rsi, [rbp+var_48] mov rdx, [rbp+var_30] shl rdx, 1 call _memcmp mov [rbp+var_4], eax loc_4E318: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long my_uca_charcmp_onelevel(long long a1, unsigned long long a2, unsigned long long a3, unsigned int a4) { unsigned __int16 *v7; // [rsp+8h] [rbp-48h] unsigned __int16 *v8; // [rsp+10h] [rbp-40h] unsigned long long v9; // [rsp+18h] [rbp-38h] unsigned long long v10; // [rsp+20h] [rbp-30h] v8 = (unsigned __int16 *)my_char_weight_addr(56LL * a4 + *(_QWORD *)(a1 + 96), (unsigned int)a2); v7 = (unsigned __int16 *)my_char_weight_addr(56LL * a4 + *(_QWORD *)(a1 + 96), (unsigned int)a3); if ( v8 && v7 ) { if ( *v8 == *v7 ) { v10 = *(unsigned __int8 *)(*(_QWORD *)(56LL * a4 + *(_QWORD *)(a1 + 96) + 8) + (a2 >> 8)); v9 = *(unsigned __int8 *)(*(_QWORD *)(56LL * a4 + *(_QWORD *)(a1 + 96) + 8) + (a3 >> 8)); if ( v10 <= v9 ) { if ( v10 >= v9 ) { return (unsigned int)memcmp(v8, v7, 2 * v10); } else if ( !(unsigned int)memcmp(v8, v7, 2 * v10) ) { return v7[v10]; } else { return 1; } } else if ( !(unsigned int)memcmp(v8, v7, 2 * v9) ) { return v8[v9]; } else { return 1; } } else { return 1; } } else { return a2 != a3; } }
my_uca_charcmp_onelevel: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x60] MOV EAX,dword ptr [RBP + -0x24] IMUL RAX,RAX,0x38 ADD RDI,RAX MOV RAX,qword ptr [RBP + -0x18] MOV ESI,EAX CALL 0x0014e330 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x60] MOV EAX,dword ptr [RBP + -0x24] IMUL RAX,RAX,0x38 ADD RDI,RAX MOV RAX,qword ptr [RBP + -0x20] MOV ESI,EAX CALL 0x0014e330 MOV qword ptr [RBP + -0x48],RAX CMP qword ptr [RBP + -0x40],0x0 JZ 0x0014e1f7 CMP qword ptr [RBP + -0x48],0x0 JNZ 0x0014e20f LAB_0014e1f7: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x4],EAX JMP 0x0014e318 LAB_0014e20f: MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,word ptr [RAX] MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,word ptr [RCX] CMP EAX,ECX JZ 0x0014e22d MOV dword ptr [RBP + -0x4],0x1 JMP 0x0014e318 LAB_0014e22d: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x60] MOV ECX,dword ptr [RBP + -0x24] IMUL RCX,RCX,0x38 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x18] SHR RCX,0x8 MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x60] MOV ECX,dword ptr [RBP + -0x24] IMUL RCX,RCX,0x38 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x20] SHR RCX,0x8 MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JBE 0x0014e2bd MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x38] SHL RDX,0x1 CALL 0x00124140 CMP EAX,0x0 JZ 0x0014e2a6 MOV EAX,0x1 MOV dword ptr [RBP + -0x4c],EAX JMP 0x0014e2b5 LAB_0014e2a6: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x38] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4c],EAX LAB_0014e2b5: MOV EAX,dword ptr [RBP + -0x4c] MOV dword ptr [RBP + -0x4],EAX JMP 0x0014e318 LAB_0014e2bd: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JNC 0x0014e301 MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x30] SHL RDX,0x1 CALL 0x00124140 CMP EAX,0x0 JZ 0x0014e2ea MOV EAX,0x1 MOV dword ptr [RBP + -0x50],EAX JMP 0x0014e2f9 LAB_0014e2ea: MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x50],EAX LAB_0014e2f9: MOV EAX,dword ptr [RBP + -0x50] MOV dword ptr [RBP + -0x4],EAX JMP 0x0014e318 LAB_0014e301: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x30] SHL RDX,0x1 CALL 0x00124140 MOV dword ptr [RBP + -0x4],EAX LAB_0014e318: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
uint my_uca_charcmp_onelevel(long param_1,ulong param_2,ulong param_3,uint param_4) { int iVar1; short *__s1; short *__s2; ulong uVar2; ulong uVar3; uint local_58; uint local_54; uint local_c; __s1 = (short *)my_char_weight_addr(*(long *)(param_1 + 0x60) + (ulong)param_4 * 0x38, param_2 & 0xffffffff); __s2 = (short *)my_char_weight_addr(*(long *)(param_1 + 0x60) + (ulong)param_4 * 0x38, param_3 & 0xffffffff); if ((__s1 == (short *)0x0) || (__s2 == (short *)0x0)) { local_c = (uint)(param_2 != param_3); } else if (*__s1 == *__s2) { uVar2 = (ulong)*(byte *)(*(long *)(*(long *)(param_1 + 0x60) + (ulong)param_4 * 0x38 + 8) + (param_2 >> 8)); uVar3 = (ulong)*(byte *)(*(long *)(*(long *)(param_1 + 0x60) + (ulong)param_4 * 0x38 + 8) + (param_3 >> 8)); if (uVar3 < uVar2) { iVar1 = memcmp(__s1,__s2,uVar3 << 1); if (iVar1 == 0) { local_54 = (uint)(ushort)__s1[uVar3]; } else { local_54 = 1; } local_c = local_54; } else if (uVar2 < uVar3) { iVar1 = memcmp(__s1,__s2,uVar2 << 1); if (iVar1 == 0) { local_58 = (uint)(ushort)__s2[uVar2]; } else { local_58 = 1; } local_c = local_58; } else { local_c = memcmp(__s1,__s2,uVar2 << 1); } } else { local_c = 1; } return local_c; }
13,686
my_casefold_ujis
eloqsql/strings/ctype-ujis.c
static size_t my_casefold_ujis(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen __attribute__((unused)), const uchar * const map, size_t is_upper) { const char *srcend= src + srclen, *dst0= dst; while (src < srcend) { size_t mblen= my_ismbchar(cs, src, srcend); if (mblen) { MY_UNICASE_CHARACTER *ch; ch= (mblen == 2) ? get_case_info_for_ch(cs, 0, (uchar) src[0], (uchar) src[1]) : get_case_info_for_ch(cs, 1, (uchar) src[1], (uchar) src[2]); if (ch) { int code= is_upper ? ch->toupper : ch->tolower; src+= mblen; if (code > 0xFFFF) *dst++= (char) (uchar) ((code >> 16) & 0xFF); if (code > 0xFF) *dst++= (char) (uchar) ((code >> 8) & 0xFF); *dst++= (char) (uchar) (code & 0xFF); } else { if (mblen == 3) *dst++= *src++; *dst++= *src++; *dst++= *src++; } } else { *dst++= (char) map[(uchar) *src++]; } } return (size_t) (dst - dst0); }
O3
c
my_casefold_ujis: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, -0x40(%rbp) movq %rcx, %rbx movq %rcx, -0x30(%rbp) testq %rdx, %rdx jle 0x5f78f movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %r13 addq %rsi, %r15 xorl %eax, %eax testq %r9, %r9 sete %al shll $0x2, %eax movq %rax, -0x38(%rbp) xorl %r14d, %r14d movq -0x30(%rbp), %rbx movq 0xb8(%r13), %rax movq %r13, %rdi movq %r12, %rsi movq %r15, %rdx callq *0xc0(%rax) cmpl $0x2, %eax cmovll %r14d, %eax testl %eax, %eax je 0x5f6e9 cmpl $0x2, %eax jne 0x5f6ff movzbl (%r12), %ecx movq 0x78(%r13), %rdx movq 0x8(%rdx), %rdx movq (%rdx,%rcx,8), %rcx testq %rcx, %rcx je 0x5f759 movzbl 0x1(%r12), %edx jmp 0x5f720 movzbl (%r12), %eax incq %r12 movq -0x40(%rbp), %rcx movb (%rcx,%rax), %al movb %al, (%rbx) jmp 0x5f783 movzbl 0x1(%r12), %ecx movq 0x78(%r13), %rdx movq 0x8(%rdx), %rdx movq 0x800(%rdx,%rcx,8), %rcx testq %rcx, %rcx je 0x5f748 movzbl 0x2(%r12), %edx leaq (%rdx,%rdx,2), %rdx leaq (%rcx,%rdx,4), %rcx testq %rcx, %rcx je 0x5f748 movq -0x38(%rbp), %rdx movl (%rcx,%rdx), %ecx cmpl $0x10000, %ecx # imm = 0x10000 jl 0x5f771 movl %ecx, %edx shrl $0x10, %edx movb %dl, (%rbx) incq %rbx jmp 0x5f779 cmpl $0x3, %eax jne 0x5f759 movb (%r12), %al incq %r12 movb %al, (%rbx) incq %rbx movb (%r12), %al movb %al, (%rbx) movb 0x1(%r12), %al addq $0x2, %r12 movb %al, 0x1(%rbx) addq $0x2, %rbx jmp 0x5f786 cmpl $0x100, %ecx # imm = 0x100 jl 0x5f77e movb %ch, (%rbx) incq %rbx addq %rax, %r12 movb %cl, (%rbx) incq %rbx cmpq %r15, %r12 jb 0x5f6a5 subq -0x30(%rbp), %rbx movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_casefold_ujis: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_40], r8 mov rbx, rcx mov [rbp+var_30], rcx test rdx, rdx jle loc_5F78F mov r15, rdx mov r12, rsi mov r13, rdi add r15, rsi xor eax, eax test r9, r9 setz al shl eax, 2 mov [rbp+var_38], rax xor r14d, r14d mov rbx, [rbp+var_30] loc_5F6A5: mov rax, [r13+0B8h] mov rdi, r13 mov rsi, r12 mov rdx, r15 call qword ptr [rax+0C0h] cmp eax, 2 cmovl eax, r14d test eax, eax jz short loc_5F6E9 cmp eax, 2 jnz short loc_5F6FF movzx ecx, byte ptr [r12] mov rdx, [r13+78h] mov rdx, [rdx+8] mov rcx, [rdx+rcx*8] test rcx, rcx jz short loc_5F759 movzx edx, byte ptr [r12+1] jmp short loc_5F720 loc_5F6E9: movzx eax, byte ptr [r12] inc r12 mov rcx, [rbp+var_40] mov al, [rcx+rax] mov [rbx], al jmp loc_5F783 loc_5F6FF: movzx ecx, byte ptr [r12+1] mov rdx, [r13+78h] mov rdx, [rdx+8] mov rcx, [rdx+rcx*8+800h] test rcx, rcx jz short loc_5F748 movzx edx, byte ptr [r12+2] loc_5F720: lea rdx, [rdx+rdx*2] lea rcx, [rcx+rdx*4] test rcx, rcx jz short loc_5F748 mov rdx, [rbp+var_38] mov ecx, [rcx+rdx] cmp ecx, offset stru_10000 jl short loc_5F771 mov edx, ecx shr edx, 10h mov [rbx], dl inc rbx jmp short loc_5F779 loc_5F748: cmp eax, 3 jnz short loc_5F759 mov al, [r12] inc r12 mov [rbx], al inc rbx loc_5F759: mov al, [r12] mov [rbx], al mov al, [r12+1] add r12, 2 mov [rbx+1], al add rbx, 2 jmp short loc_5F786 loc_5F771: cmp ecx, 100h jl short loc_5F77E loc_5F779: mov [rbx], ch inc rbx loc_5F77E: add r12, rax mov [rbx], cl loc_5F783: inc rbx loc_5F786: cmp r12, r15 jb loc_5F6A5 loc_5F78F: sub rbx, [rbp+var_30] mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_BYTE * my_casefold_ujis( long long a1, unsigned __int8 *a2, long long a3, unsigned __int8 *a4, long long a5, long long a6) { unsigned __int8 *v6; // rbx unsigned __int8 *v7; // r12 unsigned long long v8; // r15 long long v9; // rax long long v10; // rcx long long v11; // rdx long long v12; // rax long long v13; // rcx int v14; // ecx unsigned __int8 v15; // al unsigned __int8 v16; // al long long v19; // [rsp+8h] [rbp-38h] v6 = a4; if ( a3 > 0 ) { v7 = a2; v8 = (unsigned long long)&a2[a3]; v19 = 4 * (unsigned int)(a6 == 0); v6 = a4; while ( 1 ) { v9 = (*(long long ( **)(long long, unsigned __int8 *, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v7, v8); if ( (int)v9 < 2 ) v9 = 0LL; if ( !(_DWORD)v9 ) { v12 = *v7++; *v6 = *(_BYTE *)(a5 + v12); goto LABEL_21; } if ( (_DWORD)v9 != 2 ) break; v10 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 120) + 8LL) + 8LL * *v7); if ( v10 ) { v11 = v7[1]; LABEL_12: v13 = v10 + 12 * v11; if ( v13 ) { v14 = *(_DWORD *)(v13 + v19); if ( v14 >= (int)&stru_10000 ) { *v6++ = BYTE2(v14); goto LABEL_19; } if ( v14 >= 256 ) LABEL_19: *v6++ = BYTE1(v14); v7 += v9; *v6 = v14; LABEL_21: ++v6; goto LABEL_22; } goto LABEL_15; } LABEL_17: *v6 = *v7; v16 = v7[1]; v7 += 2; v6[1] = v16; v6 += 2; LABEL_22: if ( (unsigned long long)v7 >= v8 ) return (_BYTE *)(v6 - a4); } v10 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 120) + 8LL) + 8LL * v7[1] + 2048); if ( v10 ) { v11 = v7[2]; goto LABEL_12; } LABEL_15: if ( (_DWORD)v9 == 3 ) { v15 = *v7++; *v6++ = v15; } goto LABEL_17; } return (_BYTE *)(v6 - a4); }
my_casefold_ujis: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x40],R8 MOV RBX,RCX MOV qword ptr [RBP + -0x30],RCX TEST RDX,RDX JLE 0x0015f78f MOV R15,RDX MOV R12,RSI MOV R13,RDI ADD R15,RSI XOR EAX,EAX TEST R9,R9 SETZ AL SHL EAX,0x2 MOV qword ptr [RBP + -0x38],RAX XOR R14D,R14D MOV RBX,qword ptr [RBP + -0x30] LAB_0015f6a5: MOV RAX,qword ptr [R13 + 0xb8] MOV RDI,R13 MOV RSI,R12 MOV RDX,R15 CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 CMOVL EAX,R14D TEST EAX,EAX JZ 0x0015f6e9 CMP EAX,0x2 JNZ 0x0015f6ff MOVZX ECX,byte ptr [R12] MOV RDX,qword ptr [R13 + 0x78] MOV RDX,qword ptr [RDX + 0x8] MOV RCX,qword ptr [RDX + RCX*0x8] TEST RCX,RCX JZ 0x0015f759 MOVZX EDX,byte ptr [R12 + 0x1] JMP 0x0015f720 LAB_0015f6e9: MOVZX EAX,byte ptr [R12] INC R12 MOV RCX,qword ptr [RBP + -0x40] MOV AL,byte ptr [RCX + RAX*0x1] MOV byte ptr [RBX],AL JMP 0x0015f783 LAB_0015f6ff: MOVZX ECX,byte ptr [R12 + 0x1] MOV RDX,qword ptr [R13 + 0x78] MOV RDX,qword ptr [RDX + 0x8] MOV RCX,qword ptr [RDX + RCX*0x8 + 0x800] TEST RCX,RCX JZ 0x0015f748 MOVZX EDX,byte ptr [R12 + 0x2] LAB_0015f720: LEA RDX,[RDX + RDX*0x2] LEA RCX,[RCX + RDX*0x4] TEST RCX,RCX JZ 0x0015f748 MOV RDX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RCX + RDX*0x1] CMP ECX,0x10000 JL 0x0015f771 MOV EDX,ECX SHR EDX,0x10 MOV byte ptr [RBX],DL INC RBX JMP 0x0015f779 LAB_0015f748: CMP EAX,0x3 JNZ 0x0015f759 MOV AL,byte ptr [R12] INC R12 MOV byte ptr [RBX],AL INC RBX LAB_0015f759: MOV AL,byte ptr [R12] MOV byte ptr [RBX],AL MOV AL,byte ptr [R12 + 0x1] ADD R12,0x2 MOV byte ptr [RBX + 0x1],AL ADD RBX,0x2 JMP 0x0015f786 LAB_0015f771: CMP ECX,0x100 JL 0x0015f77e LAB_0015f779: MOV byte ptr [RBX],CH INC RBX LAB_0015f77e: ADD R12,RAX MOV byte ptr [RBX],CL LAB_0015f783: INC RBX LAB_0015f786: CMP R12,R15 JC 0x0015f6a5 LAB_0015f78f: SUB RBX,qword ptr [RBP + -0x30] MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_casefold_ujis(long param_1,byte *param_2,long param_3,byte *param_4,long param_5, long param_6) { byte *pbVar1; byte bVar2; uint uVar3; int iVar4; long lVar6; byte *pbVar7; byte *pbVar8; ulong uVar5; pbVar7 = param_4; if (0 < param_3) { pbVar8 = param_2 + param_3; do { uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,pbVar8); uVar5 = (ulong)uVar3; if ((int)uVar3 < 2) { uVar5 = 0; } iVar4 = (int)uVar5; if (iVar4 == 0) { bVar2 = *param_2; param_2 = param_2 + 1; *pbVar7 = *(byte *)(param_5 + (ulong)bVar2); LAB_0015f783: pbVar7 = pbVar7 + 1; } else { if (iVar4 == 2) { lVar6 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + (ulong)*param_2 * 8); if (lVar6 != 0) { bVar2 = param_2[1]; LAB_0015f720: lVar6 = lVar6 + (ulong)bVar2 * 0xc; if (lVar6 == 0) goto LAB_0015f748; iVar4 = *(int *)(lVar6 + (ulong)(param_6 == 0) * 4); if (iVar4 < 0x10000) { if (0xff < iVar4) goto LAB_0015f779; } else { *pbVar7 = (byte)((uint)iVar4 >> 0x10); pbVar7 = pbVar7 + 1; LAB_0015f779: *pbVar7 = (byte)((uint)iVar4 >> 8); pbVar7 = pbVar7 + 1; } param_2 = param_2 + uVar5; *pbVar7 = (byte)iVar4; goto LAB_0015f783; } } else { lVar6 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + 0x800 + (ulong)param_2[1] * 8 ); if (lVar6 != 0) { bVar2 = param_2[2]; goto LAB_0015f720; } LAB_0015f748: if (iVar4 == 3) { bVar2 = *param_2; param_2 = param_2 + 1; *pbVar7 = bVar2; pbVar7 = pbVar7 + 1; } } *pbVar7 = *param_2; pbVar1 = param_2 + 1; param_2 = param_2 + 2; pbVar7[1] = *pbVar1; pbVar7 = pbVar7 + 2; } } while (param_2 < pbVar8); } return (long)pbVar7 - (long)param_4; }
13,687
my_utf8mb3_uni_no_range
eloqsql/strings/ctype-utf8.c
static int my_utf8mb3_uni_no_range(CHARSET_INFO *cs __attribute__((unused)), my_wc_t * pwc, const uchar *s) { uchar c; c= s[0]; if (c < 0x80) { *pwc = c; return 1; } if (c < 0xc2) return MY_CS_ILSEQ; if (c < 0xe0) { if (!((s[1] ^ 0x80) < 0x40)) return MY_CS_ILSEQ; *pwc= UTF8MB2_CODE(c, s[1]); return 2; } if (c < 0xf0) { if (!IS_UTF8MB3_STEP2(c, s[1], s[2])) return MY_CS_ILSEQ; *pwc= UTF8MB3_CODE(c, s[1], s[2]); return 3; } return MY_CS_ILSEQ; }
O0
c
my_utf8mb3_uni_no_range: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x20(%rbp), %rax movb (%rax), %al movb %al, -0x21(%rbp) movzbl -0x21(%rbp), %eax cmpl $0x80, %eax jge 0xc443d movzbl -0x21(%rbp), %eax movl %eax, %ecx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0xc4553 movzbl -0x21(%rbp), %eax cmpl $0xc2, %eax jge 0xc4454 movl $0x0, -0x4(%rbp) jmp 0xc4553 movzbl -0x21(%rbp), %eax cmpl $0xe0, %eax jge 0xc44b0 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jl 0xc447d movl $0x0, -0x4(%rbp) jmp 0xc4553 movzbl -0x21(%rbp), %eax andl $0x1f, %eax movslq %eax, %rcx shlq $0x6, %rcx movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cltq orq %rax, %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x2, -0x4(%rbp) jmp 0xc4553 movzbl -0x21(%rbp), %eax cmpl $0xf0, %eax jge 0xc454c movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0xc44fd movq -0x20(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0xc44fd movzbl -0x21(%rbp), %eax cmpl $0xe1, %eax jge 0xc4506 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xa0, %eax jge 0xc4506 movl $0x0, -0x4(%rbp) jmp 0xc4553 movzbl -0x21(%rbp), %eax andl $0xf, %eax movslq %eax, %rcx shlq $0xc, %rcx movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cltq shlq $0x6, %rax orq %rax, %rcx movq -0x20(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cltq orq %rax, %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x3, -0x4(%rbp) jmp 0xc4553 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
my_utf8mb3_uni_no_range: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_20] mov al, [rax] mov [rbp+var_21], al movzx eax, [rbp+var_21] cmp eax, 80h jge short loc_C443D movzx eax, [rbp+var_21] mov ecx, eax mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_C4553 loc_C443D: movzx eax, [rbp+var_21] cmp eax, 0C2h jge short loc_C4454 mov [rbp+var_4], 0 jmp loc_C4553 loc_C4454: movzx eax, [rbp+var_21] cmp eax, 0E0h jge short loc_C44B0 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jl short loc_C447D mov [rbp+var_4], 0 jmp loc_C4553 loc_C447D: movzx eax, [rbp+var_21] and eax, 1Fh movsxd rcx, eax shl rcx, 6 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] xor eax, 80h cdqe or rcx, rax mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 2 jmp loc_C4553 loc_C44B0: movzx eax, [rbp+var_21] cmp eax, 0F0h jge loc_C454C mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jge short loc_C44FD mov rax, [rbp+var_20] movzx eax, byte ptr [rax+2] xor eax, 80h cmp eax, 40h ; '@' jge short loc_C44FD movzx eax, [rbp+var_21] cmp eax, 0E1h jge short loc_C4506 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0A0h jge short loc_C4506 loc_C44FD: mov [rbp+var_4], 0 jmp short loc_C4553 loc_C4506: movzx eax, [rbp+var_21] and eax, 0Fh movsxd rcx, eax shl rcx, 0Ch mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] xor eax, 80h cdqe shl rax, 6 or rcx, rax mov rax, [rbp+var_20] movzx eax, byte ptr [rax+2] xor eax, 80h cdqe or rcx, rax mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 3 jmp short loc_C4553 loc_C454C: mov [rbp+var_4], 0 loc_C4553: mov eax, [rbp+var_4] pop rbp retn
long long my_utf8mb3_uni_no_range(long long a1, unsigned long long *a2, unsigned __int8 *a3) { unsigned __int8 v4; // [rsp+1h] [rbp-21h] v4 = *a3; if ( *a3 >= 0x80u ) { if ( v4 >= 0xC2u ) { if ( v4 >= 0xE0u ) { if ( v4 >= 0xF0u ) { return 0; } else if ( (a3[1] ^ 0x80) < 64 && (a3[2] ^ 0x80) < 64 && (v4 >= 0xE1u || a3[1] >= 0xA0u) ) { *a2 = a3[2] ^ 0x80u | ((long long)(a3[1] ^ 0x80u) << 6) | ((unsigned long long)(v4 & 0xF) << 12); return 3; } else { return 0; } } else if ( (a3[1] ^ 0x80) < 64 ) { *a2 = a3[1] ^ 0x80u | ((unsigned long long)(v4 & 0x1F) << 6); return 2; } else { return 0; } } else { return 0; } } else { *a2 = v4; return 1; } }
my_utf8mb3_uni_no_range: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x20] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x21],AL MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0x80 JGE 0x001c443d MOVZX EAX,byte ptr [RBP + -0x21] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x001c4553 LAB_001c443d: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xc2 JGE 0x001c4454 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001c4553 LAB_001c4454: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xe0 JGE 0x001c44b0 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JL 0x001c447d MOV dword ptr [RBP + -0x4],0x0 JMP 0x001c4553 LAB_001c447d: MOVZX EAX,byte ptr [RBP + -0x21] AND EAX,0x1f MOVSXD RCX,EAX SHL RCX,0x6 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CDQE OR RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x2 JMP 0x001c4553 LAB_001c44b0: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf0 JGE 0x001c454c MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JGE 0x001c44fd MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CMP EAX,0x40 JGE 0x001c44fd MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xe1 JGE 0x001c4506 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xa0 JGE 0x001c4506 LAB_001c44fd: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001c4553 LAB_001c4506: MOVZX EAX,byte ptr [RBP + -0x21] AND EAX,0xf MOVSXD RCX,EAX SHL RCX,0xc MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CDQE SHL RAX,0x6 OR RCX,RAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CDQE OR RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x3 JMP 0x001c4553 LAB_001c454c: MOV dword ptr [RBP + -0x4],0x0 LAB_001c4553: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_utf8mb3_uni_no_range(int8 param_1,ulong *param_2,byte *param_3) { byte bVar1; int4 local_c; bVar1 = *param_3; if (bVar1 < 0x80) { *param_2 = (ulong)bVar1; local_c = 1; } else if (bVar1 < 0xc2) { local_c = 0; } else if (bVar1 < 0xe0) { if ((param_3[1] ^ 0x80) < 0x40) { *param_2 = (long)(int)(bVar1 & 0x1f) << 6 | (long)(int)(param_3[1] ^ 0x80); local_c = 2; } else { local_c = 0; } } else if (bVar1 < 0xf0) { if ((((param_3[1] ^ 0x80) < 0x40) && ((param_3[2] ^ 0x80) < 0x40)) && ((0xe0 < bVar1 || (0x9f < param_3[1])))) { *param_2 = (long)(int)(bVar1 & 0xf) << 0xc | (long)(int)(param_3[1] ^ 0x80) << 6 | (long)(int)(param_3[2] ^ 0x80); local_c = 3; } else { local_c = 0; } } else { local_c = 0; } return local_c; }
13,688
my_utf8mb3_uni_no_range
eloqsql/strings/ctype-utf8.c
static int my_utf8mb3_uni_no_range(CHARSET_INFO *cs __attribute__((unused)), my_wc_t * pwc, const uchar *s) { uchar c; c= s[0]; if (c < 0x80) { *pwc = c; return 1; } if (c < 0xc2) return MY_CS_ILSEQ; if (c < 0xe0) { if (!((s[1] ^ 0x80) < 0x40)) return MY_CS_ILSEQ; *pwc= UTF8MB2_CODE(c, s[1]); return 2; } if (c < 0xf0) { if (!IS_UTF8MB3_STEP2(c, s[1], s[2])) return MY_CS_ILSEQ; *pwc= UTF8MB3_CODE(c, s[1], s[2]); return 3; } return MY_CS_ILSEQ; }
O3
c
my_utf8mb3_uni_no_range: pushq %rbp movq %rsp, %rbp movzbl (%rsi), %ecx testb %cl, %cl js 0x90b29 movl $0x1, %eax movq %rcx, (%rdi) jmp 0x90b30 xorl %eax, %eax cmpb $-0x3e, %cl jae 0x90b32 popq %rbp retq cmpb $-0x21, %cl ja 0x90b55 movzbl 0x1(%rsi), %edx xorl $0x80, %edx cmpb $0x3f, %dl ja 0x90b30 andl $0x1f, %ecx shll $0x6, %ecx orl %edx, %ecx movl $0x2, %eax jmp 0x90b24 cmpb $-0x11, %cl ja 0x90b30 movzbl 0x1(%rsi), %edx cmpb $-0x41, %dl jg 0x90b30 movzbl 0x2(%rsi), %esi cmpb $-0x41, %sil jg 0x90b30 cmpl $0xe0, %ecx sete %r8b cmpb $-0x60, %dl setb %r9b testb %r9b, %r8b jne 0x90b30 shll $0xc, %ecx movzwl %cx, %eax andl $0x3f, %edx shll $0x6, %edx orl %eax, %edx andl $0x3f, %esi orq %rdx, %rsi movl $0x3, %eax movq %rsi, %rcx jmp 0x90b24
my_utf8mb3_uni_no_range: push rbp mov rbp, rsp movzx ecx, byte ptr [rsi] test cl, cl js short loc_90B29 mov eax, 1 loc_90B24: mov [rdi], rcx jmp short loc_90B30 loc_90B29: xor eax, eax cmp cl, 0C2h jnb short loc_90B32 loc_90B30: pop rbp retn loc_90B32: cmp cl, 0DFh ja short loc_90B55 movzx edx, byte ptr [rsi+1] xor edx, 80h cmp dl, 3Fh ; '?' ja short loc_90B30 and ecx, 1Fh shl ecx, 6 or ecx, edx mov eax, 2 jmp short loc_90B24 loc_90B55: cmp cl, 0EFh ja short loc_90B30 movzx edx, byte ptr [rsi+1] cmp dl, 0BFh jg short loc_90B30 movzx esi, byte ptr [rsi+2] cmp sil, 0BFh jg short loc_90B30 cmp ecx, 0E0h setz r8b cmp dl, 0A0h setb r9b test r8b, r9b jnz short loc_90B30 shl ecx, 0Ch movzx eax, cx and edx, 3Fh shl edx, 6 or edx, eax and esi, 3Fh or rsi, rdx mov eax, 3 mov rcx, rsi jmp short loc_90B24
long long my_utf8mb3_uni_no_range(unsigned long long *a1, unsigned __int8 *a2) { unsigned long long v2; // rcx long long result; // rax char v4; // dl char v5; // si v2 = *a2; if ( (v2 & 0x80u) == 0LL ) { result = 1LL; LABEL_3: *a1 = v2; return result; } result = 0LL; if ( (unsigned __int8)v2 >= 0xC2u ) { if ( (unsigned __int8)v2 > 0xDFu ) { if ( (unsigned __int8)v2 <= 0xEFu ) { v4 = a2[1]; if ( v4 <= -65 ) { v5 = a2[2]; if ( v5 <= -65 && ((unsigned __int8)v4 >= 0xA0u || (_DWORD)v2 != 224) ) { result = 3LL; v2 = (unsigned __int16)((_WORD)v2 << 12) | ((unsigned __int8)(v4 & 0x3F) << 6) | (unsigned long long)(v5 & 0x3F); goto LABEL_3; } } } } else if ( (a2[1] ^ 0x80u) <= 0x3F ) { v2 = a2[1] ^ 0x80 | ((unsigned __int8)(v2 & 0x1F) << 6); result = 2LL; goto LABEL_3; } } return result; }
my_utf8mb3_uni_no_range: PUSH RBP MOV RBP,RSP MOVZX ECX,byte ptr [RSI] TEST CL,CL JS 0x00190b29 MOV EAX,0x1 LAB_00190b24: MOV qword ptr [RDI],RCX JMP 0x00190b30 LAB_00190b29: XOR EAX,EAX CMP CL,0xc2 JNC 0x00190b32 LAB_00190b30: POP RBP RET LAB_00190b32: CMP CL,0xdf JA 0x00190b55 MOVZX EDX,byte ptr [RSI + 0x1] XOR EDX,0x80 CMP DL,0x3f JA 0x00190b30 AND ECX,0x1f SHL ECX,0x6 OR ECX,EDX MOV EAX,0x2 JMP 0x00190b24 LAB_00190b55: CMP CL,0xef JA 0x00190b30 MOVZX EDX,byte ptr [RSI + 0x1] CMP DL,0xbf JG 0x00190b30 MOVZX ESI,byte ptr [RSI + 0x2] CMP SIL,0xbf JG 0x00190b30 CMP ECX,0xe0 SETZ R8B CMP DL,0xa0 SETC R9B TEST R8B,R9B JNZ 0x00190b30 SHL ECX,0xc MOVZX EAX,CX AND EDX,0x3f SHL EDX,0x6 OR EDX,EAX AND ESI,0x3f OR RSI,RDX MOV EAX,0x3 MOV RCX,RSI JMP 0x00190b24
int8 my_utf8mb3_uni_no_range(ulong *param_1,byte *param_2) { byte bVar1; byte bVar2; int8 uVar3; ulong uVar4; bVar1 = *param_2; uVar4 = (ulong)bVar1; if ((char)bVar1 < '\0') { if (bVar1 < 0xc2) { return 0; } if (bVar1 < 0xe0) { if (0x3f < (byte)(param_2[1] ^ 0x80)) { return 0; } uVar4 = (ulong)((bVar1 & 0x1f) << 6 | param_2[1] ^ 0x80); uVar3 = 2; } else { if (0xef < bVar1) { return 0; } bVar2 = param_2[1]; if (-0x41 < (char)bVar2) { return 0; } if (-0x41 < (char)param_2[2]) { return 0; } if (bVar1 == 0xe0 && bVar2 < 0xa0) { return 0; } uVar4 = (ulong)(param_2[2] & 0x3f | (bVar2 & 0x3f) << 6 | (bVar1 & 0xf) << 0xc); uVar3 = 3; } } else { uVar3 = 1; } *param_1 = uVar4; return uVar3; }
13,689
my_strnncollsp_tis620
eloqsql/strings/ctype-tis620.c
static int my_strnncollsp_tis620(CHARSET_INFO * cs __attribute__((unused)), const uchar *a0, size_t a_length, const uchar *b0, size_t b_length) { uchar buf[80], *end, *a, *b, *alloced= NULL; size_t length; int res= 0; a= buf; if ((a_length + b_length +2) > (int) sizeof(buf)) alloced= a= (uchar*) my_malloc(PSI_INSTRUMENT_ME, a_length+b_length+2, MYF(MY_FAE)); b= a + a_length+1; if (a_length) memcpy((char*) a, (char*) a0, a_length); a[a_length]= 0; /* if length(a0)> len1, need to put 'end of string' */ if (b_length) memcpy((char *)b, (char *)b0, b_length); b[b_length]= 0; /* put end of string */ a_length= thai2sortable(a, a_length); b_length= thai2sortable(b, b_length); end= a + (length= MY_MIN(a_length, b_length)); while (a < end) { if (*a++ != *b++) { res= ((int) a[-1] - (int) b[-1]); goto ret; } } res= a_length == b_length ? 0 : a_length < b_length ? -my_strnncollsp_padspace_bin(b, b_length - length) : my_strnncollsp_padspace_bin(a, a_length - length); ret: if (alloced) my_free(alloced); return res; }
O0
c
my_strnncollsp_tis620: pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x68(%rbp) movq %rsi, -0x70(%rbp) movq %rdx, -0x78(%rbp) movq %rcx, -0x80(%rbp) movq %r8, -0x88(%rbp) movq $0x0, -0xa8(%rbp) movl $0x0, -0xb4(%rbp) leaq -0x60(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x78(%rbp), %rax addq -0x88(%rbp), %rax addq $0x2, %rax cmpq $0x50, %rax jbe 0x7ce0d movq -0x78(%rbp), %rsi addq -0x88(%rbp), %rsi addq $0x2, %rsi xorl %edi, %edi movl $0x8, %edx callq 0x58f20 movq %rax, -0x98(%rbp) movq %rax, -0xa8(%rbp) movq -0x98(%rbp), %rax addq -0x78(%rbp), %rax addq $0x1, %rax movq %rax, -0xa0(%rbp) cmpq $0x0, -0x78(%rbp) je 0x7ce3e movq -0x98(%rbp), %rdi movq -0x70(%rbp), %rsi movq -0x78(%rbp), %rdx callq 0x26280 movq -0x98(%rbp), %rax movq -0x78(%rbp), %rcx movb $0x0, (%rax,%rcx) cmpq $0x0, -0x88(%rbp) je 0x7ce6e movq -0xa0(%rbp), %rdi movq -0x80(%rbp), %rsi movq -0x88(%rbp), %rdx callq 0x26280 movq -0xa0(%rbp), %rax movq -0x88(%rbp), %rcx movb $0x0, (%rax,%rcx) movq -0x98(%rbp), %rdi movq -0x78(%rbp), %rsi callq 0x7d170 movq %rax, -0x78(%rbp) movq -0xa0(%rbp), %rdi movq -0x88(%rbp), %rsi callq 0x7d170 movq %rax, -0x88(%rbp) movq -0x98(%rbp), %rax movq %rax, -0xc0(%rbp) movq -0x78(%rbp), %rax cmpq -0x88(%rbp), %rax jae 0x7ced6 movq -0x78(%rbp), %rax movq %rax, -0xc8(%rbp) jmp 0x7cee4 movq -0x88(%rbp), %rax movq %rax, -0xc8(%rbp) movq -0xc0(%rbp), %rax movq -0xc8(%rbp), %rcx movq %rcx, -0xb0(%rbp) addq %rcx, %rax movq %rax, -0x90(%rbp) movq -0x98(%rbp), %rax cmpq -0x90(%rbp), %rax jae 0x7cf6c movq -0x98(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x98(%rbp) movzbl (%rax), %eax movq -0xa0(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0xa0(%rbp) movzbl (%rcx), %ecx cmpl %ecx, %eax je 0x7cf6a movq -0x98(%rbp), %rax movzbl -0x1(%rax), %eax movq -0xa0(%rbp), %rcx movzbl -0x1(%rcx), %ecx subl %ecx, %eax movl %eax, -0xb4(%rbp) jmp 0x7cfed jmp 0x7cf03 movq -0x78(%rbp), %rax cmpq -0x88(%rbp), %rax jne 0x7cf83 xorl %eax, %eax movl %eax, -0xcc(%rbp) jmp 0x7cfe1 movq -0x78(%rbp), %rax cmpq -0x88(%rbp), %rax jae 0x7cfb8 movq -0xa0(%rbp), %rdi movq -0x88(%rbp), %rsi subq -0xb0(%rbp), %rsi callq 0x6b070 movl %eax, %ecx xorl %eax, %eax subl %ecx, %eax movl %eax, -0xd0(%rbp) jmp 0x7cfd5 movq -0x98(%rbp), %rdi movq -0x78(%rbp), %rsi subq -0xb0(%rbp), %rsi callq 0x6b070 movl %eax, -0xd0(%rbp) movl -0xd0(%rbp), %eax movl %eax, -0xcc(%rbp) movl -0xcc(%rbp), %eax movl %eax, -0xb4(%rbp) cmpq $0x0, -0xa8(%rbp) je 0x7d003 movq -0xa8(%rbp), %rdi callq 0x592a0 movl -0xb4(%rbp), %eax movl %eax, -0xd4(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x7d030 movl -0xd4(%rbp), %eax addq $0xe0, %rsp popq %rbp retq callq 0x26360 nopw %cs:(%rax,%rax)
my_strnncollsp_tis620: push rbp mov rbp, rsp sub rsp, 0E0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_68], rdi mov [rbp+var_70], rsi mov [rbp+var_78], rdx mov [rbp+var_80], rcx mov [rbp+var_88], r8 mov [rbp+var_A8], 0 mov [rbp+var_B4], 0 lea rax, [rbp+var_60] mov [rbp+var_98], rax mov rax, [rbp+var_78] add rax, [rbp+var_88] add rax, 2 cmp rax, 50h ; 'P' jbe short loc_7CE0D mov rsi, [rbp+var_78] add rsi, [rbp+var_88] add rsi, 2 xor edi, edi mov edx, 8 call my_malloc mov [rbp+var_98], rax mov [rbp+var_A8], rax loc_7CE0D: mov rax, [rbp+var_98] add rax, [rbp+var_78] add rax, 1 mov [rbp+var_A0], rax cmp [rbp+var_78], 0 jz short loc_7CE3E mov rdi, [rbp+var_98] mov rsi, [rbp+var_70] mov rdx, [rbp+var_78] call _memcpy loc_7CE3E: mov rax, [rbp+var_98] mov rcx, [rbp+var_78] mov byte ptr [rax+rcx], 0 cmp [rbp+var_88], 0 jz short loc_7CE6E mov rdi, [rbp+var_A0] mov rsi, [rbp+var_80] mov rdx, [rbp+var_88] call _memcpy loc_7CE6E: mov rax, [rbp+var_A0] mov rcx, [rbp+var_88] mov byte ptr [rax+rcx], 0 mov rdi, [rbp+var_98] mov rsi, [rbp+var_78] call thai2sortable mov [rbp+var_78], rax mov rdi, [rbp+var_A0] mov rsi, [rbp+var_88] call thai2sortable mov [rbp+var_88], rax mov rax, [rbp+var_98] mov [rbp+var_C0], rax mov rax, [rbp+var_78] cmp rax, [rbp+var_88] jnb short loc_7CED6 mov rax, [rbp+var_78] mov [rbp+var_C8], rax jmp short loc_7CEE4 loc_7CED6: mov rax, [rbp+var_88] mov [rbp+var_C8], rax loc_7CEE4: mov rax, [rbp+var_C0] mov rcx, [rbp+var_C8] mov [rbp+var_B0], rcx add rax, rcx mov [rbp+var_90], rax loc_7CF03: mov rax, [rbp+var_98] cmp rax, [rbp+var_90] jnb short loc_7CF6C mov rax, [rbp+var_98] mov rcx, rax add rcx, 1 mov [rbp+var_98], rcx movzx eax, byte ptr [rax] mov rcx, [rbp+var_A0] mov rdx, rcx add rdx, 1 mov [rbp+var_A0], rdx movzx ecx, byte ptr [rcx] cmp eax, ecx jz short loc_7CF6A mov rax, [rbp+var_98] movzx eax, byte ptr [rax-1] mov rcx, [rbp+var_A0] movzx ecx, byte ptr [rcx-1] sub eax, ecx mov [rbp+var_B4], eax jmp loc_7CFED loc_7CF6A: jmp short loc_7CF03 loc_7CF6C: mov rax, [rbp+var_78] cmp rax, [rbp+var_88] jnz short loc_7CF83 xor eax, eax mov [rbp+var_CC], eax jmp short loc_7CFE1 loc_7CF83: mov rax, [rbp+var_78] cmp rax, [rbp+var_88] jnb short loc_7CFB8 mov rdi, [rbp+var_A0] mov rsi, [rbp+var_88] sub rsi, [rbp+var_B0] call my_strnncollsp_padspace_bin mov ecx, eax xor eax, eax sub eax, ecx mov [rbp+var_D0], eax jmp short loc_7CFD5 loc_7CFB8: mov rdi, [rbp+var_98] mov rsi, [rbp+var_78] sub rsi, [rbp+var_B0] call my_strnncollsp_padspace_bin mov [rbp+var_D0], eax loc_7CFD5: mov eax, [rbp+var_D0] mov [rbp+var_CC], eax loc_7CFE1: mov eax, [rbp+var_CC] mov [rbp+var_B4], eax loc_7CFED: cmp [rbp+var_A8], 0 jz short loc_7D003 mov rdi, [rbp+var_A8] call my_free loc_7D003: mov eax, [rbp+var_B4] mov [rbp+var_D4], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_7D030 mov eax, [rbp+var_D4] add rsp, 0E0h pop rbp retn loc_7D030: call ___stack_chk_fail
long long my_strnncollsp_tis620(long long a1, long long a2, long long a3, long long a4, long long a5) { unsigned __int8 *v5; // rax unsigned __int8 *v6; // rcx int v8; // [rsp+10h] [rbp-D0h] unsigned int v9; // [rsp+14h] [rbp-CCh] unsigned long long v10; // [rsp+18h] [rbp-C8h] unsigned __int8 *v11; // [rsp+20h] [rbp-C0h] unsigned int v12; // [rsp+2Ch] [rbp-B4h] long long v13; // [rsp+38h] [rbp-A8h] unsigned __int8 *v14; // [rsp+40h] [rbp-A0h] unsigned __int8 *v15; // [rsp+48h] [rbp-98h] unsigned long long v17; // [rsp+58h] [rbp-88h] unsigned long long v20; // [rsp+68h] [rbp-78h] char v21; // [rsp+80h] [rbp-60h] BYREF unsigned long long v22; // [rsp+D8h] [rbp-8h] v22 = __readfsqword(0x28u); v13 = 0LL; v15 = (unsigned __int8 *)&v21; if ( (unsigned long long)(a5 + a3 + 2) > 0x50 ) { v15 = (unsigned __int8 *)my_malloc(0, a5 + a3 + 2, 8); v13 = (long long)v15; } v14 = &v15[a3 + 1]; if ( a3 ) memcpy(v15, a2, a3); v15[a3] = 0; if ( a5 ) memcpy(v14, a4, a5); v14[a5] = 0; v20 = thai2sortable(v15, a3); v17 = thai2sortable(v14, a5); v11 = v15; if ( v20 >= v17 ) v10 = v17; else v10 = v20; while ( v15 < &v11[v10] ) { v5 = v15++; v6 = v14++; if ( *v5 != *v6 ) { v12 = *(v15 - 1) - *(v14 - 1); goto LABEL_21; } } if ( v20 == v17 ) { v9 = 0; } else { if ( v20 >= v17 ) v8 = my_strnncollsp_padspace_bin(v15, v20 - v10); else v8 = -(int)my_strnncollsp_padspace_bin(v14, v17 - v10); v9 = v8; } v12 = v9; LABEL_21: if ( v13 ) my_free(v13); return v12; }
my_strnncollsp_tis620: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x68],RDI MOV qword ptr [RBP + -0x70],RSI MOV qword ptr [RBP + -0x78],RDX MOV qword ptr [RBP + -0x80],RCX MOV qword ptr [RBP + -0x88],R8 MOV qword ptr [RBP + -0xa8],0x0 MOV dword ptr [RBP + -0xb4],0x0 LEA RAX,[RBP + -0x60] MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x78] ADD RAX,qword ptr [RBP + -0x88] ADD RAX,0x2 CMP RAX,0x50 JBE 0x0017ce0d MOV RSI,qword ptr [RBP + -0x78] ADD RSI,qword ptr [RBP + -0x88] ADD RSI,0x2 XOR EDI,EDI MOV EDX,0x8 CALL 0x00158f20 MOV qword ptr [RBP + -0x98],RAX MOV qword ptr [RBP + -0xa8],RAX LAB_0017ce0d: MOV RAX,qword ptr [RBP + -0x98] ADD RAX,qword ptr [RBP + -0x78] ADD RAX,0x1 MOV qword ptr [RBP + -0xa0],RAX CMP qword ptr [RBP + -0x78],0x0 JZ 0x0017ce3e MOV RDI,qword ptr [RBP + -0x98] MOV RSI,qword ptr [RBP + -0x70] MOV RDX,qword ptr [RBP + -0x78] CALL 0x00126280 LAB_0017ce3e: MOV RAX,qword ptr [RBP + -0x98] MOV RCX,qword ptr [RBP + -0x78] MOV byte ptr [RAX + RCX*0x1],0x0 CMP qword ptr [RBP + -0x88],0x0 JZ 0x0017ce6e MOV RDI,qword ptr [RBP + -0xa0] MOV RSI,qword ptr [RBP + -0x80] MOV RDX,qword ptr [RBP + -0x88] CALL 0x00126280 LAB_0017ce6e: MOV RAX,qword ptr [RBP + -0xa0] MOV RCX,qword ptr [RBP + -0x88] MOV byte ptr [RAX + RCX*0x1],0x0 MOV RDI,qword ptr [RBP + -0x98] MOV RSI,qword ptr [RBP + -0x78] CALL 0x0017d170 MOV qword ptr [RBP + -0x78],RAX MOV RDI,qword ptr [RBP + -0xa0] MOV RSI,qword ptr [RBP + -0x88] CALL 0x0017d170 MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0xc0],RAX MOV RAX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RBP + -0x88] JNC 0x0017ced6 MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0xc8],RAX JMP 0x0017cee4 LAB_0017ced6: MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RBP + -0xc8],RAX LAB_0017cee4: MOV RAX,qword ptr [RBP + -0xc0] MOV RCX,qword ptr [RBP + -0xc8] MOV qword ptr [RBP + -0xb0],RCX ADD RAX,RCX MOV qword ptr [RBP + -0x90],RAX LAB_0017cf03: MOV RAX,qword ptr [RBP + -0x98] CMP RAX,qword ptr [RBP + -0x90] JNC 0x0017cf6c MOV RAX,qword ptr [RBP + -0x98] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x98],RCX MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0xa0] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0xa0],RDX MOVZX ECX,byte ptr [RCX] CMP EAX,ECX JZ 0x0017cf6a MOV RAX,qword ptr [RBP + -0x98] MOVZX EAX,byte ptr [RAX + -0x1] MOV RCX,qword ptr [RBP + -0xa0] MOVZX ECX,byte ptr [RCX + -0x1] SUB EAX,ECX MOV dword ptr [RBP + -0xb4],EAX JMP 0x0017cfed LAB_0017cf6a: JMP 0x0017cf03 LAB_0017cf6c: MOV RAX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RBP + -0x88] JNZ 0x0017cf83 XOR EAX,EAX MOV dword ptr [RBP + -0xcc],EAX JMP 0x0017cfe1 LAB_0017cf83: MOV RAX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RBP + -0x88] JNC 0x0017cfb8 MOV RDI,qword ptr [RBP + -0xa0] MOV RSI,qword ptr [RBP + -0x88] SUB RSI,qword ptr [RBP + -0xb0] CALL 0x0016b070 MOV ECX,EAX XOR EAX,EAX SUB EAX,ECX MOV dword ptr [RBP + -0xd0],EAX JMP 0x0017cfd5 LAB_0017cfb8: MOV RDI,qword ptr [RBP + -0x98] MOV RSI,qword ptr [RBP + -0x78] SUB RSI,qword ptr [RBP + -0xb0] CALL 0x0016b070 MOV dword ptr [RBP + -0xd0],EAX LAB_0017cfd5: MOV EAX,dword ptr [RBP + -0xd0] MOV dword ptr [RBP + -0xcc],EAX LAB_0017cfe1: MOV EAX,dword ptr [RBP + -0xcc] MOV dword ptr [RBP + -0xb4],EAX LAB_0017cfed: CMP qword ptr [RBP + -0xa8],0x0 JZ 0x0017d003 MOV RDI,qword ptr [RBP + -0xa8] CALL 0x001592a0 LAB_0017d003: MOV EAX,dword ptr [RBP + -0xb4] MOV dword ptr [RBP + -0xd4],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0017d030 MOV EAX,dword ptr [RBP + -0xd4] ADD RSP,0xe0 POP RBP RET LAB_0017d030: CALL 0x00126360
int my_strnncollsp_tis620 (int8 param_1,void *param_2,size_t param_3,void *param_4,size_t param_5) { byte *pbVar1; byte *__dest; ulong uVar2; ulong uVar3; byte *pbVar4; long in_FS_OFFSET; int local_d8; int local_d4; ulong local_d0; int local_bc; byte *local_b0; byte *local_a8; byte *local_a0; byte local_68 [88]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_b0 = (byte *)0x0; local_a0 = local_68; if (0x50 < param_3 + param_5 + 2) { local_b0 = (byte *)my_malloc(0,param_3 + param_5 + 2,8); local_a0 = local_b0; } __dest = local_a0 + param_3 + 1; if (param_3 != 0) { memcpy(local_a0,param_2,param_3); } local_a0[param_3] = 0; if (param_5 != 0) { memcpy(__dest,param_4,param_5); } __dest[param_5] = 0; uVar2 = thai2sortable(local_a0,param_3); uVar3 = thai2sortable(__dest,param_5); local_d0 = uVar3; if (uVar2 < uVar3) { local_d0 = uVar2; } pbVar4 = local_a0 + local_d0; pbVar1 = local_a0; do { local_a0 = pbVar1; local_a8 = __dest; if (pbVar4 <= local_a0) { if (uVar2 == uVar3) { local_d4 = 0; } else { if (uVar2 < uVar3) { local_d8 = my_strnncollsp_padspace_bin(local_a8,uVar3 - local_d0); local_d8 = -local_d8; } else { local_d8 = my_strnncollsp_padspace_bin(local_a0,uVar2 - local_d0); } local_d4 = local_d8; } local_bc = local_d4; goto LAB_0017cfed; } __dest = local_a8 + 1; pbVar1 = local_a0 + 1; } while (*local_a0 == *local_a8); local_bc = (uint)*local_a0 - (uint)*local_a8; LAB_0017cfed: if (local_b0 != (byte *)0x0) { my_free(local_b0); } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_bc; }
13,690
wt_thd_destroy
eloqsql/mysys/waiting_threads.c
void wt_thd_destroy(WT_THD *thd) { DBUG_ENTER("wt_thd_destroy"); DBUG_ASSERT(thd->my_resources.elements == 0); DBUG_ASSERT(thd->waiting_for == 0); if (thd->pins != 0) lf_hash_put_pins(thd->pins); delete_dynamic(&thd->my_resources); DBUG_VOID_RETURN; }
O3
c
wt_thd_destroy: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movq 0x30(%rdi), %rdi testq %rdi, %rdi je 0xa7b23 callq 0xa643f movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x92d4c
wt_thd_destroy: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov rdi, [rdi+30h] test rdi, rdi jz short loc_A7B23 call lf_pinbox_put_pins loc_A7B23: mov rdi, rbx add rsp, 8 pop rbx pop rbp jmp delete_dynamic
long long wt_thd_destroy(long long *a1) { long long v2; // rdi v2 = a1[6]; if ( v2 ) lf_pinbox_put_pins(v2); return delete_dynamic(a1); }
wt_thd_destroy: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x30] TEST RDI,RDI JZ 0x001a7b23 CALL 0x001a643f LAB_001a7b23: MOV RDI,RBX ADD RSP,0x8 POP RBX POP RBP JMP 0x00192d4c
void wt_thd_destroy(long param_1) { if (*(long *)(param_1 + 0x30) != 0) { lf_pinbox_put_pins(); } delete_dynamic(param_1); return; }
13,691
string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
monkey531[P]llama/common/common.cpp
void string_process_escapes(std::string & input) { std::size_t input_len = input.length(); std::size_t output_idx = 0; for (std::size_t input_idx = 0; input_idx < input_len; ++input_idx) { if (input[input_idx] == '\\' && input_idx + 1 < input_len) { switch (input[++input_idx]) { case 'n': input[output_idx++] = '\n'; break; case 'r': input[output_idx++] = '\r'; break; case 't': input[output_idx++] = '\t'; break; case '\'': input[output_idx++] = '\''; break; case '\"': input[output_idx++] = '\"'; break; case '\\': input[output_idx++] = '\\'; break; case 'x': // Handle \x12, etc if (input_idx + 2 < input_len) { const char x[3] = { input[input_idx + 1], input[input_idx + 2], 0 }; char *err_p = nullptr; const long val = std::strtol(x, &err_p, 16); if (err_p == x + 2) { input_idx += 2; input[output_idx++] = char(val); break; } } // fall through default: input[output_idx++] = '\\'; input[output_idx++] = input[input_idx]; break; } } else { input[output_idx++] = input[input_idx]; } } input.resize(output_idx); }
O0
cpp
string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): subq $0x48, %rsp movq %rdi, 0x40(%rsp) movq 0x40(%rsp), %rdi callq 0x5aab0 movq %rax, 0x38(%rsp) movq $0x0, 0x30(%rsp) movq $0x0, 0x28(%rsp) movq 0x28(%rsp), %rax cmpq 0x38(%rsp), %rax jae 0xf55c4 movq 0x40(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x5b560 movsbl (%rax), %eax cmpl $0x5c, %eax jne 0xf5579 movq 0x28(%rsp), %rax addq $0x1, %rax cmpq 0x38(%rsp), %rax jae 0xf5579 movq 0x40(%rsp), %rdi movq 0x28(%rsp), %rsi incq %rsi movq %rsi, 0x28(%rsp) callq 0x5b560 movsbl (%rax), %eax movl %eax, 0xc(%rsp) subl $0x22, %eax je 0xf541f jmp 0xf5342 movl 0xc(%rsp), %eax subl $0x27, %eax je 0xf53fc jmp 0xf5351 movl 0xc(%rsp), %eax subl $0x5c, %eax je 0xf5442 jmp 0xf5360 movl 0xc(%rsp), %eax subl $0x6e, %eax je 0xf5393 jmp 0xf536b movl 0xc(%rsp), %eax subl $0x72, %eax je 0xf53b6 jmp 0xf5376 movl 0xc(%rsp), %eax subl $0x74, %eax je 0xf53d9 jmp 0xf5381 movl 0xc(%rsp), %eax subl $0x78, %eax je 0xf5465 jmp 0xf5523 movq 0x40(%rsp), %rdi movq 0x30(%rsp), %rsi movq %rsi, %rax addq $0x1, %rax movq %rax, 0x30(%rsp) callq 0x5b560 movb $0xa, (%rax) jmp 0xf5577 movq 0x40(%rsp), %rdi movq 0x30(%rsp), %rsi movq %rsi, %rax addq $0x1, %rax movq %rax, 0x30(%rsp) callq 0x5b560 movb $0xd, (%rax) jmp 0xf5577 movq 0x40(%rsp), %rdi movq 0x30(%rsp), %rsi movq %rsi, %rax addq $0x1, %rax movq %rax, 0x30(%rsp) callq 0x5b560 movb $0x9, (%rax) jmp 0xf5577 movq 0x40(%rsp), %rdi movq 0x30(%rsp), %rsi movq %rsi, %rax addq $0x1, %rax movq %rax, 0x30(%rsp) callq 0x5b560 movb $0x27, (%rax) jmp 0xf5577 movq 0x40(%rsp), %rdi movq 0x30(%rsp), %rsi movq %rsi, %rax addq $0x1, %rax movq %rax, 0x30(%rsp) callq 0x5b560 movb $0x22, (%rax) jmp 0xf5577 movq 0x40(%rsp), %rdi movq 0x30(%rsp), %rsi movq %rsi, %rax addq $0x1, %rax movq %rax, 0x30(%rsp) callq 0x5b560 movb $0x5c, (%rax) jmp 0xf5577 movq 0x28(%rsp), %rax addq $0x2, %rax cmpq 0x38(%rsp), %rax jae 0xf5521 movq 0x40(%rsp), %rdi movq 0x28(%rsp), %rsi addq $0x1, %rsi callq 0x5b560 movb (%rax), %al movb %al, 0x25(%rsp) movq 0x40(%rsp), %rdi movq 0x28(%rsp), %rsi addq $0x2, %rsi callq 0x5b560 movb (%rax), %al movb %al, 0x26(%rsp) movb $0x0, 0x27(%rsp) movq $0x0, 0x18(%rsp) leaq 0x25(%rsp), %rdi leaq 0x18(%rsp), %rsi movl $0x10, %edx callq 0x5b718 movq %rax, 0x10(%rsp) movq 0x18(%rsp), %rax leaq 0x25(%rsp), %rcx addq $0x2, %rcx cmpq %rcx, %rax jne 0xf551f movq 0x28(%rsp), %rax addq $0x2, %rax movq %rax, 0x28(%rsp) movq 0x10(%rsp), %rax movb %al, 0xb(%rsp) movq 0x40(%rsp), %rdi movq 0x30(%rsp), %rsi movq %rsi, %rax addq $0x1, %rax movq %rax, 0x30(%rsp) callq 0x5b560 movb 0xb(%rsp), %cl movb %cl, (%rax) jmp 0xf5577 jmp 0xf5521 jmp 0xf5523 movq 0x40(%rsp), %rdi movq 0x30(%rsp), %rsi movq %rsi, %rax addq $0x1, %rax movq %rax, 0x30(%rsp) callq 0x5b560 movb $0x5c, (%rax) movq 0x40(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x5b560 movb (%rax), %al movb %al, 0xa(%rsp) movq 0x40(%rsp), %rdi movq 0x30(%rsp), %rsi movq %rsi, %rax addq $0x1, %rax movq %rax, 0x30(%rsp) callq 0x5b560 movb 0xa(%rsp), %cl movb %cl, (%rax) jmp 0xf55af movq 0x40(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x5b560 movb (%rax), %al movb %al, 0x9(%rsp) movq 0x40(%rsp), %rdi movq 0x30(%rsp), %rsi movq %rsi, %rax addq $0x1, %rax movq %rax, 0x30(%rsp) callq 0x5b560 movb 0x9(%rsp), %cl movb %cl, (%rax) jmp 0xf55b1 movq 0x28(%rsp), %rax addq $0x1, %rax movq %rax, 0x28(%rsp) jmp 0xf52da movq 0x40(%rsp), %rdi movq 0x30(%rsp), %rsi callq 0x5a770 addq $0x48, %rsp retq nopl (%rax,%rax)
_Z22string_process_escapesRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 48h mov [rsp+48h+var_8], rdi mov rdi, [rsp+48h+var_8] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void) mov [rsp+48h+var_10], rax mov [rsp+48h+var_18], 0 mov [rsp+48h+var_20], 0 loc_F52DA: mov rax, [rsp+48h+var_20] cmp rax, [rsp+48h+var_10] jnb loc_F55C4 mov rdi, [rsp+48h+var_8] mov rsi, [rsp+48h+var_20] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) movsx eax, byte ptr [rax] cmp eax, 5Ch ; '\' jnz loc_F5579 mov rax, [rsp+48h+var_20] add rax, 1 cmp rax, [rsp+48h+var_10] jnb loc_F5579 mov rdi, [rsp+48h+var_8] mov rsi, [rsp+48h+var_20] inc rsi mov [rsp+48h+var_20], rsi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) movsx eax, byte ptr [rax] mov [rsp+48h+var_3C], eax sub eax, 22h ; '"' jz loc_F541F jmp short $+2 loc_F5342: mov eax, [rsp+48h+var_3C] sub eax, 27h ; ''' jz loc_F53FC jmp short $+2 loc_F5351: mov eax, [rsp+48h+var_3C] sub eax, 5Ch ; '\' jz loc_F5442 jmp short $+2 loc_F5360: mov eax, [rsp+48h+var_3C] sub eax, 6Eh ; 'n' jz short loc_F5393 jmp short $+2 loc_F536B: mov eax, [rsp+48h+var_3C] sub eax, 72h ; 'r' jz short loc_F53B6 jmp short $+2 loc_F5376: mov eax, [rsp+48h+var_3C] sub eax, 74h ; 't' jz short loc_F53D9 jmp short $+2 loc_F5381: mov eax, [rsp+48h+var_3C] sub eax, 78h ; 'x' jz loc_F5465 jmp loc_F5523 loc_F5393: mov rdi, [rsp+48h+var_8] mov rsi, [rsp+48h+var_18] mov rax, rsi add rax, 1 mov [rsp+48h+var_18], rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov byte ptr [rax], 0Ah jmp loc_F5577 loc_F53B6: mov rdi, [rsp+48h+var_8] mov rsi, [rsp+48h+var_18] mov rax, rsi add rax, 1 mov [rsp+48h+var_18], rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov byte ptr [rax], 0Dh jmp loc_F5577 loc_F53D9: mov rdi, [rsp+48h+var_8] mov rsi, [rsp+48h+var_18] mov rax, rsi add rax, 1 mov [rsp+48h+var_18], rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov byte ptr [rax], 9 jmp loc_F5577 loc_F53FC: mov rdi, [rsp+48h+var_8] mov rsi, [rsp+48h+var_18] mov rax, rsi add rax, 1 mov [rsp+48h+var_18], rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov byte ptr [rax], 27h ; ''' jmp loc_F5577 loc_F541F: mov rdi, [rsp+48h+var_8] mov rsi, [rsp+48h+var_18] mov rax, rsi add rax, 1 mov [rsp+48h+var_18], rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov byte ptr [rax], 22h ; '"' jmp loc_F5577 loc_F5442: mov rdi, [rsp+48h+var_8] mov rsi, [rsp+48h+var_18] mov rax, rsi add rax, 1 mov [rsp+48h+var_18], rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov byte ptr [rax], 5Ch ; '\' jmp loc_F5577 loc_F5465: mov rax, [rsp+48h+var_20] add rax, 2 cmp rax, [rsp+48h+var_10] jnb loc_F5521 mov rdi, [rsp+48h+var_8] mov rsi, [rsp+48h+var_20] add rsi, 1 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov al, [rax] mov [rsp+48h+var_23], al mov rdi, [rsp+48h+var_8] mov rsi, [rsp+48h+var_20] add rsi, 2 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov al, [rax] mov [rsp+48h+var_22], al mov [rsp+48h+var_21], 0 mov [rsp+48h+var_30], 0 lea rdi, [rsp+48h+var_23] lea rsi, [rsp+48h+var_30] mov edx, 10h call strtol mov [rsp+48h+var_38], rax mov rax, [rsp+48h+var_30] lea rcx, [rsp+48h+var_23] add rcx, 2 cmp rax, rcx jnz short loc_F551F mov rax, [rsp+48h+var_20] add rax, 2 mov [rsp+48h+var_20], rax mov rax, [rsp+48h+var_38] mov [rsp+48h+var_3D], al mov rdi, [rsp+48h+var_8] mov rsi, [rsp+48h+var_18] mov rax, rsi add rax, 1 mov [rsp+48h+var_18], rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov cl, [rsp+48h+var_3D] mov [rax], cl jmp short loc_F5577 loc_F551F: jmp short $+2 loc_F5521: jmp short $+2 loc_F5523: mov rdi, [rsp+48h+var_8] mov rsi, [rsp+48h+var_18] mov rax, rsi add rax, 1 mov [rsp+48h+var_18], rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov byte ptr [rax], 5Ch ; '\' mov rdi, [rsp+48h+var_8] mov rsi, [rsp+48h+var_20] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov al, [rax] mov [rsp+48h+var_3E], al mov rdi, [rsp+48h+var_8] mov rsi, [rsp+48h+var_18] mov rax, rsi add rax, 1 mov [rsp+48h+var_18], rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov cl, [rsp+48h+var_3E] mov [rax], cl loc_F5577: jmp short loc_F55AF loc_F5579: mov rdi, [rsp+48h+var_8] mov rsi, [rsp+48h+var_20] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov al, [rax] mov [rsp+48h+var_3F], al mov rdi, [rsp+48h+var_8] mov rsi, [rsp+48h+var_18] mov rax, rsi add rax, 1 mov [rsp+48h+var_18], rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov cl, [rsp+48h+var_3F] mov [rax], cl loc_F55AF: jmp short $+2 loc_F55B1: mov rax, [rsp+48h+var_20] add rax, 1 mov [rsp+48h+var_20], rax jmp loc_F52DA loc_F55C4: mov rdi, [rsp+48h+var_8] mov rsi, [rsp+48h+var_18] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm; std::string::resize(ulong) add rsp, 48h retn
long long string_process_escapes(long long a1) { long long v1; // rsi long long v2; // rsi long long v3; // rsi long long v4; // rsi long long v5; // rsi long long v6; // rsi long long v7; // rsi long long v8; // rsi long long v9; // rsi long long v10; // rsi char v12; // [rsp+9h] [rbp-3Fh] char v13; // [rsp+Ah] [rbp-3Eh] int v14; // [rsp+Ch] [rbp-3Ch] char v15; // [rsp+10h] [rbp-38h] char *v16; // [rsp+18h] [rbp-30h] BYREF _BYTE v17[2]; // [rsp+25h] [rbp-23h] BYREF char v18; // [rsp+27h] [rbp-21h] BYREF unsigned long long i; // [rsp+28h] [rbp-20h] long long v20; // [rsp+30h] [rbp-18h] unsigned long long v21; // [rsp+38h] [rbp-10h] long long v22; // [rsp+40h] [rbp-8h] v22 = a1; v21 = std::string::length(a1); v20 = 0LL; for ( i = 0LL; i < v21; ++i ) { if ( *(_BYTE *)std::string::operator[](v22, i) == 92 && i + 1 < v21 ) { v14 = *(char *)std::string::operator[](v22, ++i); switch ( v14 ) { case '"': v5 = v20++; *(_BYTE *)std::string::operator[](v22, v5) = 34; break; case '\'': v4 = v20++; *(_BYTE *)std::string::operator[](v22, v4) = 39; break; case '\\': v6 = v20++; *(_BYTE *)std::string::operator[](v22, v6) = 92; break; case 'n': v1 = v20++; *(_BYTE *)std::string::operator[](v22, v1) = 10; break; case 'r': v2 = v20++; *(_BYTE *)std::string::operator[](v22, v2) = 13; break; case 't': v3 = v20++; *(_BYTE *)std::string::operator[](v22, v3) = 9; break; default: if ( v14 == 120 && i + 2 < v21 && (v17[0] = *(_BYTE *)std::string::operator[](v22, i + 1), v17[1] = *(_BYTE *)std::string::operator[](v22, i + 2), v18 = 0, v16 = 0LL, v15 = strtol(v17, &v16, 16LL), v16 == &v18) ) { i += 2LL; v7 = v20++; *(_BYTE *)std::string::operator[](v22, v7) = v15; } else { v8 = v20++; *(_BYTE *)std::string::operator[](v22, v8) = 92; v13 = *(_BYTE *)std::string::operator[](v22, i); v9 = v20++; *(_BYTE *)std::string::operator[](v22, v9) = v13; } break; } } else { v12 = *(_BYTE *)std::string::operator[](v22, i); v10 = v20++; *(_BYTE *)std::string::operator[](v22, v10) = v12; } } return std::string::resize(v22, v20); }
string_process_escapes: SUB RSP,0x48 MOV qword ptr [RSP + 0x40],RDI MOV RDI,qword ptr [RSP + 0x40] CALL 0x0015aab0 MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x30],0x0 MOV qword ptr [RSP + 0x28],0x0 LAB_001f52da: MOV RAX,qword ptr [RSP + 0x28] CMP RAX,qword ptr [RSP + 0x38] JNC 0x001f55c4 MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x28] CALL 0x0015b560 MOVSX EAX,byte ptr [RAX] CMP EAX,0x5c JNZ 0x001f5579 MOV RAX,qword ptr [RSP + 0x28] ADD RAX,0x1 CMP RAX,qword ptr [RSP + 0x38] JNC 0x001f5579 MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x28] INC RSI MOV qword ptr [RSP + 0x28],RSI CALL 0x0015b560 MOVSX EAX,byte ptr [RAX] MOV dword ptr [RSP + 0xc],EAX SUB EAX,0x22 JZ 0x001f541f JMP 0x001f5342 LAB_001f5342: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x27 JZ 0x001f53fc JMP 0x001f5351 LAB_001f5351: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x5c JZ 0x001f5442 JMP 0x001f5360 LAB_001f5360: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x6e JZ 0x001f5393 JMP 0x001f536b LAB_001f536b: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x72 JZ 0x001f53b6 JMP 0x001f5376 LAB_001f5376: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x74 JZ 0x001f53d9 JMP 0x001f5381 LAB_001f5381: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x78 JZ 0x001f5465 JMP 0x001f5523 LAB_001f5393: MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x30] MOV RAX,RSI ADD RAX,0x1 MOV qword ptr [RSP + 0x30],RAX CALL 0x0015b560 MOV byte ptr [RAX],0xa JMP 0x001f5577 LAB_001f53b6: MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x30] MOV RAX,RSI ADD RAX,0x1 MOV qword ptr [RSP + 0x30],RAX CALL 0x0015b560 MOV byte ptr [RAX],0xd JMP 0x001f5577 LAB_001f53d9: MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x30] MOV RAX,RSI ADD RAX,0x1 MOV qword ptr [RSP + 0x30],RAX CALL 0x0015b560 MOV byte ptr [RAX],0x9 JMP 0x001f5577 LAB_001f53fc: MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x30] MOV RAX,RSI ADD RAX,0x1 MOV qword ptr [RSP + 0x30],RAX CALL 0x0015b560 MOV byte ptr [RAX],0x27 JMP 0x001f5577 LAB_001f541f: MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x30] MOV RAX,RSI ADD RAX,0x1 MOV qword ptr [RSP + 0x30],RAX CALL 0x0015b560 MOV byte ptr [RAX],0x22 JMP 0x001f5577 LAB_001f5442: MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x30] MOV RAX,RSI ADD RAX,0x1 MOV qword ptr [RSP + 0x30],RAX CALL 0x0015b560 MOV byte ptr [RAX],0x5c JMP 0x001f5577 LAB_001f5465: MOV RAX,qword ptr [RSP + 0x28] ADD RAX,0x2 CMP RAX,qword ptr [RSP + 0x38] JNC 0x001f5521 MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x28] ADD RSI,0x1 CALL 0x0015b560 MOV AL,byte ptr [RAX] MOV byte ptr [RSP + 0x25],AL MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x28] ADD RSI,0x2 CALL 0x0015b560 MOV AL,byte ptr [RAX] MOV byte ptr [RSP + 0x26],AL MOV byte ptr [RSP + 0x27],0x0 MOV qword ptr [RSP + 0x18],0x0 LEA RDI,[RSP + 0x25] LEA RSI,[RSP + 0x18] MOV EDX,0x10 CALL 0x0015b718 MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x18] LEA RCX,[RSP + 0x25] ADD RCX,0x2 CMP RAX,RCX JNZ 0x001f551f MOV RAX,qword ptr [RSP + 0x28] ADD RAX,0x2 MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0x10] MOV byte ptr [RSP + 0xb],AL MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x30] MOV RAX,RSI ADD RAX,0x1 MOV qword ptr [RSP + 0x30],RAX CALL 0x0015b560 MOV CL,byte ptr [RSP + 0xb] MOV byte ptr [RAX],CL JMP 0x001f5577 LAB_001f551f: JMP 0x001f5521 LAB_001f5521: JMP 0x001f5523 LAB_001f5523: MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x30] MOV RAX,RSI ADD RAX,0x1 MOV qword ptr [RSP + 0x30],RAX CALL 0x0015b560 MOV byte ptr [RAX],0x5c MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x28] CALL 0x0015b560 MOV AL,byte ptr [RAX] MOV byte ptr [RSP + 0xa],AL MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x30] MOV RAX,RSI ADD RAX,0x1 MOV qword ptr [RSP + 0x30],RAX CALL 0x0015b560 MOV CL,byte ptr [RSP + 0xa] MOV byte ptr [RAX],CL LAB_001f5577: JMP 0x001f55af LAB_001f5579: MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x28] CALL 0x0015b560 MOV AL,byte ptr [RAX] MOV byte ptr [RSP + 0x9],AL MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x30] MOV RAX,RSI ADD RAX,0x1 MOV qword ptr [RSP + 0x30],RAX CALL 0x0015b560 MOV CL,byte ptr [RSP + 0x9] MOV byte ptr [RAX],CL LAB_001f55af: JMP 0x001f55b1 LAB_001f55b1: MOV RAX,qword ptr [RSP + 0x28] ADD RAX,0x1 MOV qword ptr [RSP + 0x28],RAX JMP 0x001f52da LAB_001f55c4: MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x30] CALL 0x0015a770 ADD RSP,0x48 RET
/* string_process_escapes(std::__cxx11::string&) */ void string_process_escapes(string *param_1) { int1 uVar1; char cVar2; char *pcVar3; long lVar4; int1 *puVar5; char *local_30; char local_23; int1 local_22; char local_21; ulong local_20; long local_18; ulong local_10; string *local_8; local_8 = param_1; local_10 = std::__cxx11::string::length(); local_18 = 0; local_20 = 0; do { if (local_10 <= local_20) { std::__cxx11::string::resize((ulong)local_8); return; } pcVar3 = (char *)std::__cxx11::string::operator[]((ulong)local_8); if ((*pcVar3 == '\\') && (local_20 + 1 < local_10)) { local_20 = local_20 + 1; pcVar3 = (char *)std::__cxx11::string::operator[]((ulong)local_8); cVar2 = *pcVar3; if (cVar2 == '\"') { local_18 = local_18 + 1; puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8); *puVar5 = 0x22; } else if (cVar2 == '\'') { local_18 = local_18 + 1; puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8); *puVar5 = 0x27; } else if (cVar2 == '\\') { local_18 = local_18 + 1; puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8); *puVar5 = 0x5c; } else if (cVar2 == 'n') { local_18 = local_18 + 1; puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8); *puVar5 = 10; } else if (cVar2 == 'r') { local_18 = local_18 + 1; puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8); *puVar5 = 0xd; } else if (cVar2 == 't') { local_18 = local_18 + 1; puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8); *puVar5 = 9; } else { if ((cVar2 == 'x') && (local_20 + 2 < local_10)) { pcVar3 = (char *)std::__cxx11::string::operator[]((ulong)local_8); local_23 = *pcVar3; puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8); local_22 = *puVar5; local_21 = '\0'; local_30 = (char *)0x0; lVar4 = strtol(&local_23,&local_30,0x10); if (local_30 == &local_21) { local_20 = local_20 + 2; local_18 = local_18 + 1; puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8); *puVar5 = (char)lVar4; goto LAB_001f55af; } } local_18 = local_18 + 1; puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8); *puVar5 = 0x5c; puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8); uVar1 = *puVar5; local_18 = local_18 + 1; puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8); *puVar5 = uVar1; } } else { puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8); uVar1 = *puVar5; local_18 = local_18 + 1; puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8); *puVar5 = uVar1; } LAB_001f55af: local_20 = local_20 + 1; } while( true ); }
13,692
evmone::instr::core::mstore(evmone::StackTop, long, evmone::ExecutionState&)
corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/instructions.hpp
inline Result mstore(StackTop stack, int64_t gas_left, ExecutionState& state) noexcept { const auto& index = stack.pop(); const auto& value = stack.pop(); if (!check_memory(gas_left, state.memory, index, 32)) return {EVMC_OUT_OF_GAS, gas_left}; intx::be::unsafe::store(&state.memory[static_cast<size_t>(index)], value); return {EVMC_SUCCESS, gas_left}; }
O0
cpp
evmone::instr::core::mstore(evmone::StackTop, long, evmone::ExecutionState&): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x18(%rbp) movq %rsi, -0x20(%rbp) movq %rdx, -0x28(%rbp) leaq -0x18(%rbp), %rdi callq 0x5fb60 movq %rax, -0x30(%rbp) leaq -0x18(%rbp), %rdi callq 0x5fb60 movq %rax, -0x38(%rbp) movq -0x28(%rbp), %rsi addq $0x8, %rsi movq -0x30(%rbp), %rdx leaq -0x20(%rbp), %rdi movl $0x20, %ecx callq 0x66fa0 testb $0x1, %al jne 0x68e4d movl $0x3, -0x10(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x68e89 movq -0x28(%rbp), %rax addq $0x8, %rax movq %rax, -0x40(%rbp) movq -0x30(%rbp), %rdi callq 0x66f00 movq -0x40(%rbp), %rdi movq %rax, %rsi callq 0x5ead0 movq %rax, %rdi movq -0x38(%rbp), %rsi callq 0x68ea0 movl $0x0, -0x10(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) movl -0x10(%rbp), %eax movq -0x8(%rbp), %rdx addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN6evmone5instr4core6mstoreENS_8StackTopElRNS_14ExecutionStateE: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_28], rdx lea rdi, [rbp+var_18]; this call _ZN6evmone8StackTop3popEv; evmone::StackTop::pop(void) mov [rbp+var_30], rax lea rdi, [rbp+var_18]; this call _ZN6evmone8StackTop3popEv; evmone::StackTop::pop(void) mov [rbp+var_38], rax mov rsi, [rbp+var_28] add rsi, 8 mov rdx, [rbp+var_30] lea rdi, [rbp+var_20] mov ecx, 20h ; ' ' call _ZN6evmone12check_memoryERlRNS_6MemoryERKN4intx4uintILj256EEEm; evmone::check_memory(long &,evmone::Memory &,intx::uint<256u> const&,ulong) test al, 1 jnz short loc_68E4D mov [rbp+var_10], 3 mov rax, [rbp+var_20] mov [rbp+var_8], rax jmp short loc_68E89 loc_68E4D: mov rax, [rbp+var_28] add rax, 8 mov [rbp+var_40], rax mov rdi, [rbp+var_30] call _ZNK4intx4uintILj256EEcvT_ImvEEv; intx::uint<256u>::operator ulong<ulong,void>(void) mov rdi, [rbp+var_40] mov rsi, rax call _ZN6evmone6MemoryixEm; evmone::Memory::operator[](ulong) mov rdi, rax mov rsi, [rbp+var_38] call _ZN4intx2be6unsafe5storeEPhRKNS_4uintILj256EEE; intx::be::unsafe::store(uchar *,intx::uint<256u> const&) mov [rbp+var_10], 0 mov rax, [rbp+var_20] mov [rbp+var_8], rax loc_68E89: mov eax, [rbp+var_10] mov rdx, [rbp+var_8] add rsp, 40h pop rbp retn
long long evmone::instr::core::mstore(long long a1, evmone *a2, long long a3) { long long v3; // rax long long v4; // rax long long v6; // [rsp+8h] [rbp-38h] long long v7; // [rsp+10h] [rbp-30h] evmone *v9; // [rsp+20h] [rbp-20h] BYREF long long v10; // [rsp+28h] [rbp-18h] BYREF v10 = a1; v9 = a2; v7 = evmone::StackTop::pop((evmone::StackTop *)&v10); v6 = evmone::StackTop::pop((evmone::StackTop *)&v10); if ( evmone::check_memory(&v9, (evmone::Memory *)(a3 + 8), v7, 32LL) ) { v3 = intx::uint<256u>::operator unsigned long<unsigned long,void>(v7); v4 = evmone::Memory::operator[](a3 + 8, v3); intx::be::unsafe::store(v4, v6); return 0; } else { return 3; } }
mstore: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV qword ptr [RBP + -0x28],RDX LEA RDI,[RBP + -0x18] CALL 0x0015fb60 MOV qword ptr [RBP + -0x30],RAX LEA RDI,[RBP + -0x18] CALL 0x0015fb60 MOV qword ptr [RBP + -0x38],RAX MOV RSI,qword ptr [RBP + -0x28] ADD RSI,0x8 MOV RDX,qword ptr [RBP + -0x30] LEA RDI,[RBP + -0x20] MOV ECX,0x20 CALL 0x00166fa0 TEST AL,0x1 JNZ 0x00168e4d MOV dword ptr [RBP + -0x10],0x3 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX JMP 0x00168e89 LAB_00168e4d: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x8 MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x30] CALL 0x00166f00 MOV RDI,qword ptr [RBP + -0x40] MOV RSI,RAX CALL 0x0015ead0 MOV RDI,RAX MOV RSI,qword ptr [RBP + -0x38] CALL 0x00168ea0 MOV dword ptr [RBP + -0x10],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX LAB_00168e89: MOV EAX,dword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
/* evmone::instr::core::mstore(evmone::StackTop, long, evmone::ExecutionState&) */ int1 [16] evmone::instr::core::mstore(int8 param_1,long param_2,long param_3) { uint *this; uint *puVar1; ulong uVar2; uchar *puVar3; int1 auVar4 [16]; long local_28; int8 local_20; uint local_18; long local_10; local_28 = param_2; local_20 = param_1; this = (uint *)StackTop::pop((StackTop *)&local_20); puVar1 = (uint *)StackTop::pop((StackTop *)&local_20); uVar2 = check_memory(&local_28,(Memory *)(param_3 + 8),this,0x20); if ((uVar2 & 1) == 0) { local_18 = 3; local_10 = local_28; } else { uVar2 = intx::uint::operator_cast_to_unsigned_long(this); puVar3 = (uchar *)Memory::operator[]((Memory *)(param_3 + 8),uVar2); intx::be::unsafe::store(puVar3,puVar1); local_18 = 0; local_10 = local_28; } auVar4._4_4_ = 0; auVar4._0_4_ = local_18; auVar4._8_8_ = local_10; return auVar4; }
13,693
minja::chat_template::add_system(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_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/./chat-template.hpp
static nlohmann::ordered_json add_system(const nlohmann::ordered_json & messages, const std::string & system_prompt) { json messages_with_system = messages; if (messages_with_system.size() > 0 && messages_with_system[0].at("role") == "system") { std::string existing_system = messages_with_system.at(0).at("content"); messages_with_system[0] = json { {"role", "system"}, {"content", existing_system + "\n" + system_prompt}, }; } else { messages_with_system.insert(messages_with_system.begin(), json { {"role", "system"}, {"content", system_prompt}, }); } return messages_with_system; }
O2
cpp
minja::chat_template::add_system(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_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x120, %rsp # imm = 0x120 movq %rdx, %r14 movq %rdi, %rbx callq 0x2d362 movq %rbx, %rdi callq 0x2cec2 testq %rax, %rax je 0x2ec74 movq %rbx, %rdi xorl %esi, %esi callq 0x32b5a leaq 0x6682a(%rip), %rsi # 0x952ee movq %rax, %rdi callq 0x2f1fa leaq 0x66999(%rip), %rsi # 0x9546c movq %rax, %rdi callq 0x2f606 testb %al, %al je 0x2ec74 movq %rbx, %rdi xorl %esi, %esi callq 0x32c3e leaq 0x667ff(%rip), %rsi # 0x952f3 movq %rax, %rdi callq 0x2fa0e leaq 0xe0(%rsp), %rdi movq %rax, %rsi callq 0x3aeca leaq 0x667db(%rip), %rsi # 0x952ee leaq 0x50(%rsp), %rdi callq 0x2b0f8 leaq 0x68(%rsp), %rdi leaq 0x66943(%rip), %rsi # 0x9546c callq 0x32d9e leaq 0x80(%rsp), %r15 leaq 0x50(%rsp), %rsi pushq $0x2 popq %rdx movq %r15, %rdi callq 0x2b118 leaq 0x98(%rsp), %r15 leaq 0x6679e(%rip), %rsi # 0x952f3 leaq 0x20(%rsp), %rdi callq 0x2b130 leaq 0x64d4b(%rip), %rdx # 0x938b1 movq %rsp, %rdi leaq 0xe0(%rsp), %rsi callq 0x32dae leaq 0xc0(%rsp), %rdi movq %rsp, %rsi movq %r14, %rdx callq 0x27546 leaq 0x38(%rsp), %rdi leaq 0xc0(%rsp), %rsi callq 0x32de6 leaq 0x20(%rsp), %rsi pushq $0x2 popq %rdx movq %r15, %rdi callq 0x2b118 leaq 0xb0(%rsp), %rdi leaq 0x80(%rsp), %rsi pushq $0x2 popq %rdx pushq $0x1 popq %rcx pushq $0x2 popq %r8 callq 0x2c9c0 movq %rbx, %rdi xorl %esi, %esi callq 0x32b5a movb (%rax), %cl leaq 0xb0(%rsp), %rdi movb (%rdi), %dl movb %dl, (%rax) movb %cl, (%rdi) movq 0x8(%rax), %rcx movq 0x8(%rdi), %rdx movq %rdx, 0x8(%rax) movq %rcx, 0x8(%rdi) callq 0x2cd5a pushq $0x18 popq %r14 leaq (%rsp,%r14), %rdi addq $0x80, %rdi callq 0x2cd5a addq $-0x18, %r14 cmpq $-0x18, %r14 jne 0x2ebfd pushq $0x18 popq %r14 leaq (%rsp,%r14), %rdi addq $0x20, %rdi callq 0x2cd5a addq $-0x18, %r14 cmpq $-0x18, %r14 jne 0x2ec1b leaq 0xc0(%rsp), %rdi callq 0x22078 movq %rsp, %rdi callq 0x22078 pushq $0x18 popq %r14 leaq (%rsp,%r14), %rdi addq $0x50, %rdi callq 0x2cd5a addq $-0x18, %r14 cmpq $-0x18, %r14 jne 0x2ec4b leaq 0xe0(%rsp), %rdi callq 0x22078 jmp 0x2edac leaq 0xe0(%rsp), %r15 movq %r15, %rdi movq %rbx, %rsi callq 0x2f4a4 movq (%r15), %rax movq %rax, 0x100(%rsp) movups 0x8(%r15), %xmm0 movups %xmm0, 0x108(%rsp) movq 0x18(%r15), %rax movq %rax, 0x118(%rsp) leaq 0x6663c(%rip), %rsi # 0x952ee leaq 0x50(%rsp), %rdi callq 0x2b0f8 leaq 0x68(%rsp), %rdi leaq 0x667a4(%rip), %rsi # 0x9546c callq 0x32d9e leaq 0x80(%rsp), %r15 leaq 0x50(%rsp), %rsi pushq $0x2 popq %rdx movq %r15, %rdi callq 0x2b118 leaq 0x98(%rsp), %r15 leaq 0x665ff(%rip), %rsi # 0x952f3 leaq 0x20(%rsp), %rdi callq 0x2b130 leaq 0x38(%rsp), %rdi movq %r14, %rsi callq 0x309f4 leaq 0x20(%rsp), %rsi pushq $0x2 popq %rdx movq %r15, %rdi callq 0x2b118 movq %rsp, %rdi leaq 0x80(%rsp), %rsi pushq $0x2 popq %rdx pushq $0x1 popq %rcx pushq $0x2 popq %r8 callq 0x2c9c0 leaq 0xc0(%rsp), %rdi leaq 0x100(%rsp), %rdx movq %rsp, %rcx movq %rbx, %rsi callq 0x32df6 movq %rsp, %rdi callq 0x2cd5a pushq $0x18 popq %r14 leaq (%rsp,%r14), %rdi addq $0x80, %rdi callq 0x2cd5a addq $-0x18, %r14 cmpq $-0x18, %r14 jne 0x2ed5c pushq $0x18 popq %r14 leaq (%rsp,%r14), %rdi addq $0x20, %rdi callq 0x2cd5a addq $-0x18, %r14 cmpq $-0x18, %r14 jne 0x2ed7a pushq $0x18 popq %r14 leaq (%rsp,%r14), %rdi addq $0x50, %rdi callq 0x2cd5a addq $-0x18, %r14 cmpq $-0x18, %r14 jne 0x2ed95 movq %rbx, %rax addq $0x120, %rsp # imm = 0x120 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 leaq 0xb0(%rsp), %rdi callq 0x2cd5a jmp 0x2edd4 movq %rax, %r14 pushq $0x18 popq %r12 leaq (%rsp,%r12), %rdi addq $0x80, %rdi callq 0x2cd5a addq $-0x18, %r12 cmpq $-0x18, %r12 jne 0x2edd8 xorl %ebp, %ebp jmp 0x2edfc movq %rax, %r14 movb $0x1, %bpl pushq $0x18 popq %r12 leaq (%rsp,%r12), %rdi addq $0x20, %rdi callq 0x2cd5a addq $-0x18, %r12 cmpq $-0x18, %r12 jne 0x2ee00 movb $0x1, %r12b jmp 0x2ee25 movq %rax, %r14 movb $0x1, %bpl xorl %r12d, %r12d leaq 0xc0(%rsp), %rdi callq 0x22078 jmp 0x2ee3d movq %rax, %r14 movb $0x1, %bpl xorl %r12d, %r12d movq %rsp, %rdi callq 0x22078 testb %r12b, %r12b je 0x2ee52 jmp 0x2ee66 movq %rax, %r14 movb $0x1, %bpl leaq 0x20(%rsp), %rdi callq 0x2cd5a jmp 0x2ee66 jmp 0x2ee60 movq %rax, %r14 movb $0x1, %bpl pushq $0x18 popq %r12 leaq (%rsp,%r12), %rdi addq $0x50, %rdi callq 0x2cd5a addq $-0x18, %r12 cmpq $-0x18, %r12 jne 0x2ee6a leaq 0x80(%rsp), %r12 cmpq %r15, %r12 setne %al andb %al, %bpl cmpb $0x1, %bpl jne 0x2eebd addq $-0x18, %r15 movq %r15, %rdi callq 0x2cd5a cmpq %r12, %r15 jne 0x2ee98 jmp 0x2eebd movq %rax, %r14 leaq 0x50(%rsp), %rdi callq 0x2cd5a jmp 0x2eebd movq %rax, %r14 leaq 0xe0(%rsp), %rdi callq 0x22078 jmp 0x2ef96 movq %rax, %r14 movq %rsp, %rdi callq 0x2cd5a jmp 0x2eedf movq %rax, %r14 pushq $0x18 popq %r12 leaq (%rsp,%r12), %rdi addq $0x80, %rdi callq 0x2cd5a addq $-0x18, %r12 cmpq $-0x18, %r12 jne 0x2eee3 xorl %ebp, %ebp jmp 0x2ef07 movq %rax, %r14 movb $0x1, %bpl pushq $0x18 popq %r12 leaq (%rsp,%r12), %rdi addq $0x20, %rdi callq 0x2cd5a addq $-0x18, %r12 cmpq $-0x18, %r12 jne 0x2ef0b jmp 0x2ef3b movq %rax, %r14 leaq 0x20(%rsp), %rdi callq 0x2cd5a jmp 0x2ef38 jmp 0x2ef35 movq %rax, %r14 movb $0x1, %bpl pushq $0x18 popq %r12 leaq (%rsp,%r12), %rdi addq $0x50, %rdi callq 0x2cd5a addq $-0x18, %r12 cmpq $-0x18, %r12 jne 0x2ef3f leaq 0x80(%rsp), %r12 cmpq %r15, %r12 setne %al andb %al, %bpl cmpb $0x1, %bpl jne 0x2ef96 addq $-0x18, %r15 movq %r15, %rdi callq 0x2cd5a cmpq %r12, %r15 jne 0x2ef6d jmp 0x2ef96 movq %rax, %r14 leaq 0x50(%rsp), %rdi callq 0x2cd5a jmp 0x2ef96 jmp 0x2ef93 jmp 0x2ef93 movq %rax, %r14 movq %rbx, %rdi callq 0x2cd5a movq %r14, %rdi callq 0x21e50
_ZN5minja13chat_template10add_systemERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERKSB_: push rbp push r15 push r14 push r12 push rbx sub rsp, 120h mov r14, rdx mov rbx, rdi call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rdi, rbx call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv; 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>::size(void) test rax, rax jz loc_2EC74 mov rdi, rbx xor esi, esi call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[](ulong) lea rsi, aRole; "role" mov rdi, rax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_ lea rsi, aSystem; "system" mov rdi, rax call _ZN8nlohmann16json_abi_v3_11_3eqIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ test al, al jz loc_2EC74 mov rdi, rbx xor esi, esi call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atEm; 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>::at(ulong) lea rsi, aContent; "content" mov rdi, rax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_ lea rdi, [rsp+148h+var_68] mov rsi, rax call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE lea rsi, aRole; "role" lea rdi, [rsp+148h+var_F8] call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ lea rdi, [rsp+148h+var_E0] lea rsi, aSystem; "system" call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA7_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ lea r15, [rsp+148h+var_C8] lea rsi, [rsp+148h+var_F8] push 2 pop rdx mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt16initializer_listISG_E; nlohmann::json_abi_v3_11_3::detail::json_ref<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_ref(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>) lea r15, [rsp+148h+var_B0] lea rsi, aContent; "content" lea rdi, [rsp+148h+var_128] call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA8_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ lea rdx, unk_938B1 mov rdi, rsp lea rsi, [rsp+148h+var_68] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) lea rdi, [rsp+148h+var_88] mov rsi, rsp mov rdx, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&) lea rdi, [rsp+148h+var_110] lea rsi, [rsp+148h+var_88] call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSJ_ lea rsi, [rsp+148h+var_128] push 2 pop rdx mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt16initializer_listISG_E; nlohmann::json_abi_v3_11_3::detail::json_ref<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_ref(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>) lea rdi, [rsp+148h+var_98] lea rsi, [rsp+148h+var_C8] push 2 pop rdx push 1 pop rcx push 2 pop r8 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_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>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t) mov rdi, rbx xor esi, esi call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[](ulong) mov cl, [rax] lea rdi, [rsp+148h+var_98] mov dl, [rdi] mov [rax], dl mov [rdi], cl mov rcx, [rax+8] mov rdx, [rdi+8] mov [rax+8], rdx mov [rdi+8], rcx 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() push 18h pop r14 loc_2EBFD: lea rdi, [rsp+r14+148h+var_148] add rdi, 80h 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() add r14, 0FFFFFFFFFFFFFFE8h cmp r14, 0FFFFFFFFFFFFFFE8h jnz short loc_2EBFD push 18h pop r14 loc_2EC1B: lea rdi, [rsp+r14+148h+var_148] add rdi, 20h ; ' ' 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() add r14, 0FFFFFFFFFFFFFFE8h cmp r14, 0FFFFFFFFFFFFFFE8h jnz short loc_2EC1B lea rdi, [rsp+148h+var_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() push 18h pop r14 loc_2EC4B: lea rdi, [rsp+r14+148h+var_148] add rdi, 50h ; 'P' 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() add r14, 0FFFFFFFFFFFFFFE8h cmp r14, 0FFFFFFFFFFFFFFE8h jnz short loc_2EC4B lea rdi, [rsp+148h+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp loc_2EDAC loc_2EC74: lea r15, [rsp+148h+var_68] mov rdi, r15 mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5beginEv; 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>::begin(void) mov rax, [r15] mov [rsp+148h+var_48], rax movups xmm0, xmmword ptr [r15+8] movups [rsp+148h+var_40], xmm0 mov rax, [r15+18h] mov [rsp+148h+var_30], rax lea rsi, aRole; "role" lea rdi, [rsp+148h+var_F8] call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ lea rdi, [rsp+148h+var_E0] lea rsi, aSystem; "system" call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA7_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ lea r15, [rsp+148h+var_C8] lea rsi, [rsp+148h+var_F8] push 2 pop rdx mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt16initializer_listISG_E; nlohmann::json_abi_v3_11_3::detail::json_ref<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_ref(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>) lea r15, [rsp+148h+var_B0] lea rsi, aContent; "content" lea rdi, [rsp+148h+var_128] call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA8_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ lea rdi, [rsp+148h+var_110] mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRKSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSL_ lea rsi, [rsp+148h+var_128] push 2 pop rdx mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt16initializer_listISG_E; nlohmann::json_abi_v3_11_3::detail::json_ref<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_ref(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>>) mov rdi, rsp lea rsi, [rsp+148h+var_C8] push 2 pop rdx push 1 pop rcx push 2 pop r8 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_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>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t) lea rdi, [rsp+148h+var_88] lea rdx, [rsp+148h+var_48] mov rcx, rsp mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6insertENS0_6detail9iter_implIKSD_EEOSD_; 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>::insert(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> 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>&&) mov rdi, rsp 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() push 18h pop r14 loc_2ED5C: lea rdi, [rsp+r14+148h+var_148] add rdi, 80h 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() add r14, 0FFFFFFFFFFFFFFE8h cmp r14, 0FFFFFFFFFFFFFFE8h jnz short loc_2ED5C push 18h pop r14 loc_2ED7A: lea rdi, [rsp+r14+148h+var_148] add rdi, 20h ; ' ' 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() add r14, 0FFFFFFFFFFFFFFE8h cmp r14, 0FFFFFFFFFFFFFFE8h jnz short loc_2ED7A push 18h pop r14 loc_2ED95: lea rdi, [rsp+r14+148h+var_148] add rdi, 50h ; 'P' 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() add r14, 0FFFFFFFFFFFFFFE8h cmp r14, 0FFFFFFFFFFFFFFE8h jnz short loc_2ED95 loc_2EDAC: mov rax, rbx add rsp, 120h pop rbx pop r12 pop r14 pop r15 pop rbp retn mov r14, rax lea rdi, [rsp+arg_A8] 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_2EDD4 mov r14, rax loc_2EDD4: push 18h pop r12 loc_2EDD8: lea rdi, [rsp+r12+0] add rdi, 80h 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() add r12, 0FFFFFFFFFFFFFFE8h cmp r12, 0FFFFFFFFFFFFFFE8h jnz short loc_2EDD8 xor ebp, ebp jmp short loc_2EDFC mov r14, rax mov bpl, 1 loc_2EDFC: push 18h pop r12 loc_2EE00: lea rdi, [rsp+r12+0] add rdi, 20h ; ' ' 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() add r12, 0FFFFFFFFFFFFFFE8h cmp r12, 0FFFFFFFFFFFFFFE8h jnz short loc_2EE00 mov r12b, 1 jmp short loc_2EE25 mov r14, rax mov bpl, 1 xor r12d, r12d loc_2EE25: lea rdi, [rsp+arg_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_2EE3D mov r14, rax mov bpl, 1 xor r12d, r12d loc_2EE3D: mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test r12b, r12b jz short loc_2EE52 jmp short loc_2EE66 mov r14, rax mov bpl, 1 loc_2EE52: lea rdi, [rsp+arg_18] 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_2EE66 jmp short $+2 loc_2EE60: mov r14, rax mov bpl, 1 loc_2EE66: push 18h pop r12 loc_2EE6A: lea rdi, [rsp+r12+0] add rdi, 50h ; 'P' 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() add r12, 0FFFFFFFFFFFFFFE8h cmp r12, 0FFFFFFFFFFFFFFE8h jnz short loc_2EE6A lea r12, [rsp+arg_78] cmp r12, r15 setnz al and bpl, al cmp bpl, 1 jnz short loc_2EEBD loc_2EE98: add r15, 0FFFFFFFFFFFFFFE8h 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() cmp r15, r12 jnz short loc_2EE98 jmp short loc_2EEBD mov r14, rax lea rdi, [rsp+arg_48] 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_2EEBD mov r14, rax loc_2EEBD: lea rdi, [rsp+arg_D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp loc_2EF96 mov r14, rax mov rdi, rsp 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_2EEDF mov r14, rax loc_2EEDF: push 18h pop r12 loc_2EEE3: lea rdi, [rsp+r12+0] add rdi, 80h 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() add r12, 0FFFFFFFFFFFFFFE8h cmp r12, 0FFFFFFFFFFFFFFE8h jnz short loc_2EEE3 xor ebp, ebp jmp short loc_2EF07 mov r14, rax mov bpl, 1 loc_2EF07: push 18h pop r12 loc_2EF0B: lea rdi, [rsp+r12+0] add rdi, 20h ; ' ' 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() add r12, 0FFFFFFFFFFFFFFE8h cmp r12, 0FFFFFFFFFFFFFFE8h jnz short loc_2EF0B jmp short loc_2EF3B mov r14, rax lea rdi, [rsp+arg_18] 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_2EF38 jmp short $+2 loc_2EF35: mov r14, rax loc_2EF38: mov bpl, 1 loc_2EF3B: push 18h pop r12 loc_2EF3F: lea rdi, [rsp+r12+0] add rdi, 50h ; 'P' 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() add r12, 0FFFFFFFFFFFFFFE8h cmp r12, 0FFFFFFFFFFFFFFE8h jnz short loc_2EF3F lea r12, [rsp+arg_78] cmp r12, r15 setnz al and bpl, al cmp bpl, 1 jnz short loc_2EF96 loc_2EF6D: add r15, 0FFFFFFFFFFFFFFE8h 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() cmp r15, r12 jnz short loc_2EF6D jmp short loc_2EF96 mov r14, rax lea rdi, [rsp+arg_48] 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_2EF96 jmp short loc_2EF93 jmp short $+2 loc_2EF93: mov r14, rax loc_2EF96: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, r14 call __Unwind_Resume
unsigned __int8 * minja::chat_template::add_system( unsigned __int8 *a1, unsigned __int8 *a2, long long a3, int a4, int a5, int a6) { long long v7; // rax long long v8; // rax long long v9; // rax long long v10; // rax long long v11; // rax char v12; // cl long long v13; // rcx long long i; // r14 long long j; // r14 long long k; // r14 long long m; // r14 long long n; // r14 long long ii; // r14 _BYTE v21[32]; // [rsp+0h] [rbp-148h] BYREF _BYTE v22[24]; // [rsp+20h] [rbp-128h] BYREF _BYTE v23[24]; // [rsp+38h] [rbp-110h] BYREF _BYTE v24[24]; // [rsp+50h] [rbp-F8h] BYREF _BYTE v25[24]; // [rsp+68h] [rbp-E0h] BYREF _BYTE v26[24]; // [rsp+80h] [rbp-C8h] BYREF _BYTE v27[24]; // [rsp+98h] [rbp-B0h] BYREF _BYTE v28[8]; // [rsp+B0h] [rbp-98h] BYREF long long v29; // [rsp+B8h] [rbp-90h] _BYTE v30[32]; // [rsp+C0h] [rbp-88h] BYREF long long v31; // [rsp+E0h] [rbp-68h] BYREF __int128 v32; // [rsp+E8h] [rbp-60h] long long v33; // [rsp+F8h] [rbp-50h] long long v34; // [rsp+100h] [rbp-48h] BYREF __int128 v35; // [rsp+108h] [rbp-40h] long long v36; // [rsp+118h] [rbp-30h] nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( (long long)a1, a2, a3, a4, a5, a6); if ( 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>::size(a1) && (v7 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( a1, 0LL), v8 = ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_( v7, "role"), (unsigned __int8)ZN8nlohmann16json_abi_v3_11_3eqIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_( v8, "system")) ) { v9 = 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>::at( a1, 0LL); v10 = ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_( v9, "content"); ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE( &v31, v10); ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_((long long)v24); ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA7_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_( v25, "system"); nlohmann::json_abi_v3_11_3::detail::json_ref<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_ref( (long long)v26, (long long)v24, 2LL); ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA8_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_((long long)v22); std::operator+<char>(v21, &v31, &unk_938B1); std::operator+<char>((long long)v30, (long long)v21, a3); ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSJ_( v23, v30); nlohmann::json_abi_v3_11_3::detail::json_ref<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_ref( (long long)v27, (long long)v22, 2LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( v28, v26, 2LL, 1LL, 2LL); v11 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( a1, 0LL); v12 = *(_BYTE *)v11; *(_BYTE *)v11 = v28[0]; v28[0] = v12; v13 = *(_QWORD *)(v11 + 8); *(_QWORD *)(v11 + 8) = v29; v29 = 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(v28); for ( i = 24LL; i != -24; i -= 24LL ) nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v26[i]); for ( j = 24LL; j != -24; j -= 24LL ) 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(&v22[j]); std::string::~string(v30); std::string::~string(v21); for ( k = 24LL; k != -24; k -= 24LL ) 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(&v24[k]); std::string::~string(&v31); } else { nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::begin( &v31, a1); v34 = v31; v35 = v32; v36 = v33; ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_((long long)v24); ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA7_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_( v25, "system"); nlohmann::json_abi_v3_11_3::detail::json_ref<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_ref( (long long)v26, (long long)v24, 2LL); ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA8_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_((long long)v22); ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRKSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSL_( v23, a3); nlohmann::json_abi_v3_11_3::detail::json_ref<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_ref( (long long)v27, (long long)v22, 2LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( v21, v26, 2LL, 1LL, 2LL); 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>::insert( v30, a1, &v34, v21); 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(v21); for ( m = 24LL; m != -24; m -= 24LL ) nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v26[m]); for ( n = 24LL; n != -24; n -= 24LL ) 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(&v22[n]); for ( ii = 24LL; ii != -24; ii -= 24LL ) 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(&v24[ii]); } return a1; }
add_system: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x120 MOV R14,RDX MOV RBX,RDI CALL 0x0012d362 MOV RDI,RBX CALL 0x0012cec2 TEST RAX,RAX JZ 0x0012ec74 LAB_0012eab3: MOV RDI,RBX XOR ESI,ESI CALL 0x00132b5a LEA RSI,[0x1952ee] MOV RDI,RAX CALL 0x0012f1fa LEA RSI,[0x19546c] MOV RDI,RAX CALL 0x0012f606 TEST AL,AL JZ 0x0012ec74 LAB_0012eae3: MOV RDI,RBX XOR ESI,ESI CALL 0x00132c3e LEA RSI,[0x1952f3] MOV RDI,RAX CALL 0x0012fa0e LEA RDI,[RSP + 0xe0] MOV RSI,RAX CALL 0x0013aeca LAB_0012eb0c: LEA RSI,[0x1952ee] LEA RDI,[RSP + 0x50] CALL 0x0012b0f8 LEA RDI,[RSP + 0x68] LAB_0012eb22: LEA RSI,[0x19546c] CALL 0x00132d9e LAB_0012eb2e: LEA R15,[RSP + 0x80] LEA RSI,[RSP + 0x50] PUSH 0x2 POP RDX MOV RDI,R15 CALL 0x0012b118 LEA R15,[RSP + 0x98] LAB_0012eb4e: LEA RSI,[0x1952f3] LEA RDI,[RSP + 0x20] CALL 0x0012b130 LAB_0012eb5f: LEA RDX,[0x1938b1] MOV RDI,RSP LEA RSI,[RSP + 0xe0] CALL 0x00132dae LAB_0012eb76: LEA RDI,[RSP + 0xc0] MOV RSI,RSP MOV RDX,R14 CALL 0x00127546 LAB_0012eb89: LEA RDI,[RSP + 0x38] LEA RSI,[RSP + 0xc0] CALL 0x00132de6 LAB_0012eb9b: LEA RSI,[RSP + 0x20] PUSH 0x2 POP RDX MOV RDI,R15 CALL 0x0012b118 LAB_0012ebab: LEA RDI,[RSP + 0xb0] LEA RSI,[RSP + 0x80] PUSH 0x2 POP RDX PUSH 0x1 POP RCX PUSH 0x2 POP R8 CALL 0x0012c9c0 LAB_0012ebca: MOV RDI,RBX XOR ESI,ESI CALL 0x00132b5a MOV CL,byte ptr [RAX] LEA RDI,[RSP + 0xb0] MOV DL,byte ptr [RDI] MOV byte ptr [RAX],DL MOV byte ptr [RDI],CL MOV RCX,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RDI + 0x8] MOV qword ptr [RAX + 0x8],RDX MOV qword ptr [RDI + 0x8],RCX CALL 0x0012cd5a PUSH 0x18 POP R14 LAB_0012ebfd: LEA RDI,[RSP + R14*0x1] ADD RDI,0x80 CALL 0x0012cd5a ADD R14,-0x18 CMP R14,-0x18 JNZ 0x0012ebfd PUSH 0x18 POP R14 LAB_0012ec1b: LEA RDI,[RSP + R14*0x1] ADD RDI,0x20 CALL 0x0012cd5a ADD R14,-0x18 CMP R14,-0x18 JNZ 0x0012ec1b LEA RDI,[RSP + 0xc0] CALL 0x00122078 MOV RDI,RSP CALL 0x00122078 PUSH 0x18 POP R14 LAB_0012ec4b: LEA RDI,[RSP + R14*0x1] ADD RDI,0x50 CALL 0x0012cd5a ADD R14,-0x18 CMP R14,-0x18 JNZ 0x0012ec4b LEA RDI,[RSP + 0xe0] CALL 0x00122078 JMP 0x0012edac LAB_0012ec74: LEA R15,[RSP + 0xe0] MOV RDI,R15 MOV RSI,RBX CALL 0x0012f4a4 MOV RAX,qword ptr [R15] MOV qword ptr [RSP + 0x100],RAX MOVUPS XMM0,xmmword ptr [R15 + 0x8] MOVUPS xmmword ptr [RSP + 0x108],XMM0 MOV RAX,qword ptr [R15 + 0x18] MOV qword ptr [RSP + 0x118],RAX LAB_0012ecab: LEA RSI,[0x1952ee] LEA RDI,[RSP + 0x50] CALL 0x0012b0f8 LEA RDI,[RSP + 0x68] LAB_0012ecc1: LEA RSI,[0x19546c] CALL 0x00132d9e LAB_0012eccd: LEA R15,[RSP + 0x80] LEA RSI,[RSP + 0x50] PUSH 0x2 POP RDX MOV RDI,R15 CALL 0x0012b118 LEA R15,[RSP + 0x98] LAB_0012eced: LEA RSI,[0x1952f3] LEA RDI,[RSP + 0x20] CALL 0x0012b130 LEA RDI,[RSP + 0x38] LAB_0012ed03: MOV RSI,R14 CALL 0x001309f4 LAB_0012ed0b: LEA RSI,[RSP + 0x20] PUSH 0x2 POP RDX MOV RDI,R15 CALL 0x0012b118 LAB_0012ed1b: MOV RDI,RSP LEA RSI,[RSP + 0x80] PUSH 0x2 POP RDX PUSH 0x1 POP RCX PUSH 0x2 POP R8 CALL 0x0012c9c0 LAB_0012ed35: LEA RDI,[RSP + 0xc0] LEA RDX,[RSP + 0x100] MOV RCX,RSP MOV RSI,RBX CALL 0x00132df6 LAB_0012ed50: MOV RDI,RSP CALL 0x0012cd5a PUSH 0x18 POP R14 LAB_0012ed5c: LEA RDI,[RSP + R14*0x1] ADD RDI,0x80 CALL 0x0012cd5a ADD R14,-0x18 CMP R14,-0x18 JNZ 0x0012ed5c PUSH 0x18 POP R14 LAB_0012ed7a: LEA RDI,[RSP + R14*0x1] ADD RDI,0x20 CALL 0x0012cd5a ADD R14,-0x18 CMP R14,-0x18 JNZ 0x0012ed7a PUSH 0x18 POP R14 LAB_0012ed95: LEA RDI,[RSP + R14*0x1] ADD RDI,0x50 CALL 0x0012cd5a ADD R14,-0x18 CMP R14,-0x18 JNZ 0x0012ed95 LAB_0012edac: MOV RAX,RBX ADD RSP,0x120 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* minja::chat_template::add_system(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&, std::__cxx11::string const&) */ chat_template * __thiscall minja::chat_template::add_system(chat_template *this,basic_json *param_1,string *param_2) { data dVar1; char cVar2; long lVar3; int8 uVar4; data *pdVar5; string asStack_148 [32]; data local_128 [24]; int1 local_110 [24]; data local_f8 [24]; int1 local_e0 [24]; data local_c8 [24]; int1 local_b0 [24]; data local_98 [8]; int8 local_90; string local_88 [32]; int8 local_68; int4 local_60; int4 uStack_5c; int4 uStack_58; int4 uStack_54; int8 local_50; int8 local_48; int4 local_40; int4 uStack_3c; int4 uStack_38; int4 uStack_34; int8 local_30; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)this,param_1); lVar3 = 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> ::size((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)this); if (lVar3 != 0) { /* try { // try from 0012eab3 to 0012eacb has its CatchHandler @ 0012ef93 */ uVar4 = 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,0); uVar4 = _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_ (uVar4,&DAT_001952ee); cVar2 = _ZN8nlohmann16json_abi_v3_11_3eqIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ (uVar4); if (cVar2 != '\0') { /* try { // try from 0012eae3 to 0012eb0b has its CatchHandler @ 0012ef91 */ uVar4 = 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> ::at((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,0); uVar4 = _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_ (uVar4,"content"); _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE (&local_68,uVar4); /* try { // try from 0012eb0c to 0012eb1c has its CatchHandler @ 0012eeba */ _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ (local_f8,&DAT_001952ee); /* try { // try from 0012eb22 to 0012eb2d has its CatchHandler @ 0012eeab */ _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA7_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ (local_e0,"system"); /* try { // try from 0012eb2e to 0012eb45 has its CatchHandler @ 0012ee60 */ nlohmann::json_abi_v3_11_3::detail:: json_ref<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_ref(local_c8,local_f8,2); /* try { // try from 0012eb4e to 0012eb5e has its CatchHandler @ 0012ee5e */ _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA8_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ (local_128,"content"); /* try { // try from 0012eb5f to 0012eb75 has its CatchHandler @ 0012ee4c */ std::operator+(asStack_148,(char *)&local_68); /* try { // try from 0012eb76 to 0012eb88 has its CatchHandler @ 0012ee34 */ std::operator+(local_88,asStack_148); /* try { // try from 0012eb89 to 0012eb9a has its CatchHandler @ 0012ee1c */ _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSJ_ (local_110,local_88); /* try { // try from 0012eb9b to 0012ebaa has its CatchHandler @ 0012edf6 */ nlohmann::json_abi_v3_11_3::detail:: json_ref<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_ref(local_b0,local_128,2); /* try { // try from 0012ebab to 0012ebc9 has its CatchHandler @ 0012edd1 */ 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(local_98,local_c8,2,1,2); /* try { // try from 0012ebca to 0012ebd3 has its CatchHandler @ 0012edbf */ pdVar5 = (data *)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,0); dVar1 = *pdVar5; *pdVar5 = local_98[0]; uVar4 = *(int8 *)(pdVar5 + 8); *(int8 *)(pdVar5 + 8) = local_90; local_98[0] = dVar1; local_90 = uVar4; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_98); lVar3 = 0x18; do { nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_c8 + lVar3); lVar3 = lVar3 + -0x18; } while (lVar3 != -0x18); lVar3 = 0x18; do { nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_128 + lVar3); lVar3 = lVar3 + -0x18; } while (lVar3 != -0x18); std::__cxx11::string::~string(local_88); std::__cxx11::string::~string(asStack_148); lVar3 = 0x18; do { nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_f8 + lVar3); lVar3 = lVar3 + -0x18; } while (lVar3 != -0x18); std::__cxx11::string::~string((string *)&local_68); return this; } } 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> ::begin(); local_48 = local_68; local_40 = local_60; uStack_3c = uStack_5c; uStack_38 = uStack_58; uStack_34 = uStack_54; local_30 = local_50; /* try { // try from 0012ecab to 0012ecbb has its CatchHandler @ 0012ef8f */ _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ (local_f8,&DAT_001952ee); /* try { // try from 0012ecc1 to 0012eccc has its CatchHandler @ 0012ef80 */ _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA7_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ (local_e0,"system"); /* try { // try from 0012eccd to 0012ece4 has its CatchHandler @ 0012ef35 */ nlohmann::json_abi_v3_11_3::detail:: json_ref<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_ref(local_c8,local_f8,2); /* try { // try from 0012eced to 0012ecfd has its CatchHandler @ 0012ef33 */ _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA8_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ (local_128,"content"); /* try { // try from 0012ed03 to 0012ed0a has its CatchHandler @ 0012ef24 */ _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRKSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSL_ (local_110,param_2); /* try { // try from 0012ed0b to 0012ed1a has its CatchHandler @ 0012ef01 */ nlohmann::json_abi_v3_11_3::detail:: json_ref<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_ref(local_b0,local_128,2); /* try { // try from 0012ed1b to 0012ed34 has its CatchHandler @ 0012eedc */ 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(asStack_148,local_c8,2,1,2); /* try { // try from 0012ed35 to 0012ed4f has its CatchHandler @ 0012eecf */ 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> ::insert((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_88,this,&local_48,asStack_148); 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 *)asStack_148); lVar3 = 0x18; do { nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_c8 + lVar3); lVar3 = lVar3 + -0x18; } while (lVar3 != -0x18); lVar3 = 0x18; do { nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_128 + lVar3); lVar3 = lVar3 + -0x18; } while (lVar3 != -0x18); lVar3 = 0x18; do { nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_f8 + lVar3); lVar3 = lVar3 + -0x18; } while (lVar3 != -0x18); return this; }
13,694
get_simple_collation_handler_by_flags
eloqsql/mysys/charset.c
static MY_COLLATION_HANDLER *get_simple_collation_handler_by_flags(uint flags) { return flags & MY_CS_BINSORT ? (flags & MY_CS_NOPAD ? &my_collation_8bit_nopad_bin_handler : &my_collation_8bit_bin_handler) : (flags & MY_CS_NOPAD ? &my_collation_8bit_simple_nopad_ci_handler : &my_collation_8bit_simple_ci_handler); }
O0
c
get_simple_collation_handler_by_flags: pushq %rbp movq %rsp, %rbp movl %edi, -0x4(%rbp) movl -0x4(%rbp), %eax andl $0x10, %eax cmpl $0x0, %eax je 0xdd436 movl -0x4(%rbp), %edx andl $0x20000, %edx # imm = 0x20000 leaq 0x1d7a26(%rip), %rax # 0x2b4e48 leaq 0x1d7a8f(%rip), %rcx # 0x2b4eb8 cmpl $0x0, %edx cmovneq %rcx, %rax movq %rax, -0x10(%rbp) jmp 0xdd458 movl -0x4(%rbp), %edx andl $0x20000, %edx # imm = 0x20000 leaq 0x1da542(%rip), %rax # 0x2b7988 leaq 0x1da5ab(%rip), %rcx # 0x2b79f8 cmpl $0x0, %edx cmovneq %rcx, %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax popq %rbp retq nop
get_simple_collation_handler_by_flags: push rbp mov rbp, rsp mov [rbp+var_4], edi mov eax, [rbp+var_4] and eax, 10h cmp eax, 0 jz short loc_DD436 mov edx, [rbp+var_4] and edx, 20000h lea rax, my_collation_8bit_bin_handler lea rcx, my_collation_8bit_nopad_bin_handler cmp edx, 0 cmovnz rax, rcx mov [rbp+var_10], rax jmp short loc_DD458 loc_DD436: mov edx, [rbp+var_4] and edx, 20000h lea rax, my_collation_8bit_simple_ci_handler lea rcx, my_collation_8bit_simple_nopad_ci_handler cmp edx, 0 cmovnz rax, rcx mov [rbp+var_10], rax loc_DD458: mov rax, [rbp+var_10] pop rbp retn
long long ( ** get_simple_collation_handler_by_flags(int a1))() { long long ( **v1)(); // rax long long ( **v2)(); // rax if ( (a1 & 0x10) != 0 ) { v1 = my_collation_8bit_bin_handler; if ( (a1 & 0x20000) != 0 ) return my_collation_8bit_nopad_bin_handler; return v1; } else { v2 = my_collation_8bit_simple_ci_handler; if ( (a1 & 0x20000) != 0 ) return my_collation_8bit_simple_nopad_ci_handler; return v2; } }
get_simple_collation_handler_by_flags: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV EAX,dword ptr [RBP + -0x4] AND EAX,0x10 CMP EAX,0x0 JZ 0x001dd436 MOV EDX,dword ptr [RBP + -0x4] AND EDX,0x20000 LEA RAX,[0x3b4e48] LEA RCX,[0x3b4eb8] CMP EDX,0x0 CMOVNZ RAX,RCX MOV qword ptr [RBP + -0x10],RAX JMP 0x001dd458 LAB_001dd436: MOV EDX,dword ptr [RBP + -0x4] AND EDX,0x20000 LEA RAX,[0x3b7988] LEA RCX,[0x3b79f8] CMP EDX,0x0 CMOVNZ RAX,RCX MOV qword ptr [RBP + -0x10],RAX LAB_001dd458: MOV RAX,qword ptr [RBP + -0x10] POP RBP RET
int1 * get_simple_collation_handler_by_flags(uint param_1) { int1 *local_18; if ((param_1 & 0x10) == 0) { local_18 = my_collation_8bit_simple_ci_handler; if ((param_1 & 0x20000) != 0) { local_18 = my_collation_8bit_simple_nopad_ci_handler; } } else { local_18 = my_collation_8bit_bin_handler; if ((param_1 & 0x20000) != 0) { local_18 = my_collation_8bit_nopad_bin_handler; } } return local_18; }
13,695
bitmap_intersect
eloqsql/mysys/my_bitmap.c
void bitmap_intersect(MY_BITMAP *map, const MY_BITMAP *map2) { my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end; uint len= no_words_in_map(map), len2 = no_words_in_map(map2); DBUG_ASSERT(map->bitmap); DBUG_ASSERT(map2->bitmap); end= to+MY_MIN(len,len2); while (to < end) *to++ &= *from++; if (len2 <= len) { to[-1]&= ~map2->last_word_mask; /* Clear last not relevant bits */ end+= len-len2; while (to < end) *to++= 0; } }
O3
c
bitmap_intersect: pushq %rbp movq %rsp, %rbp pushq %rbx movq (%rdi), %rax movl 0x1c(%rdi), %ecx addl $0x1f, %ecx shrl $0x5, %ecx movl 0x1c(%rsi), %r9d addl $0x1f, %r9d shrl $0x5, %r9d cmpl %r9d, %ecx movl %r9d, %r8d cmovbl %ecx, %r8d leaq (%rax,%r8,4), %r10 testl %r8d, %r8d je 0x9d70b movq (%rsi), %r11 movq %rax, %rdx movq %rax, %rdi movl (%r11), %ebx andl %ebx, (%rdi) addq $0x4, %r11 addq $0x4, %rdi addq $0x4, %rdx cmpq %r10, %rdi jb 0x9d6f3 jmp 0x9d711 movq %rax, %rdx movq %rax, %rdi subl %r9d, %ecx jb 0x9d750 movl 0x18(%rsi), %esi notl %esi andl %esi, -0x4(%rdi) leaq (%r10,%rcx,4), %rsi cmpq %rsi, %rdi jae 0x9d750 addq %r8, %rcx leaq (%rax,%rcx,4), %rax leaq 0x4(%rdx), %rcx cmpq %rcx, %rax cmovaq %rax, %rcx notq %rdx addq %rcx, %rdx andq $-0x4, %rdx addq $0x4, %rdx xorl %esi, %esi popq %rbx popq %rbp jmp 0x292b0 popq %rbx popq %rbp retq
bitmap_intersect: push rbp mov rbp, rsp push rbx mov rax, [rdi] mov ecx, [rdi+1Ch] add ecx, 1Fh shr ecx, 5 mov r9d, [rsi+1Ch] add r9d, 1Fh shr r9d, 5 cmp ecx, r9d mov r8d, r9d cmovb r8d, ecx lea r10, [rax+r8*4] test r8d, r8d jz short loc_9D70B mov r11, [rsi] mov rdx, rax mov rdi, rax loc_9D6F3: mov ebx, [r11] and [rdi], ebx add r11, 4 add rdi, 4 add rdx, 4 cmp rdi, r10 jb short loc_9D6F3 jmp short loc_9D711 loc_9D70B: mov rdx, rax mov rdi, rax loc_9D711: sub ecx, r9d jb short loc_9D750 mov esi, [rsi+18h] not esi and [rdi-4], esi lea rsi, [r10+rcx*4] cmp rdi, rsi jnb short loc_9D750 add rcx, r8 lea rax, [rax+rcx*4] lea rcx, [rdx+4] cmp rax, rcx cmova rcx, rax not rdx add rdx, rcx and rdx, 0FFFFFFFFFFFFFFFCh add rdx, 4 xor esi, esi pop rbx pop rbp jmp _memset loc_9D750: pop rbx pop rbp retn
long long bitmap_intersect(long long a1, long long a2) { long long result; // rax unsigned int v3; // ecx unsigned int v4; // r9d long long v5; // r8 unsigned long long v6; // r10 _DWORD *v7; // r11 long long v8; // rdx _DWORD *v9; // rdi bool v10; // cf unsigned int v11; // ecx unsigned long long v12; // rax unsigned long long v13; // rcx result = *(_QWORD *)a1; v3 = (unsigned int)(*(_DWORD *)(a1 + 28) + 31) >> 5; v4 = (unsigned int)(*(_DWORD *)(a2 + 28) + 31) >> 5; v5 = v4; if ( v3 < v4 ) v5 = v3; v6 = result + 4 * v5; if ( (_DWORD)v5 ) { v7 = *(_DWORD **)a2; v8 = *(_QWORD *)a1; v9 = *(_DWORD **)a1; do { *v9++ &= *v7++; v8 += 4LL; } while ( (unsigned long long)v9 < v6 ); } else { v8 = *(_QWORD *)a1; v9 = *(_DWORD **)a1; } v10 = v3 < v4; v11 = v3 - v4; if ( !v10 ) { *(v9 - 1) &= ~*(_DWORD *)(a2 + 24); if ( (unsigned long long)v9 < v6 + 4LL * v11 ) { v12 = result + 4 * (v5 + v11); v13 = v8 + 4; if ( v12 > v8 + 4 ) v13 = v12; return memset(v9, 0LL, ((v13 + ~v8) & 0xFFFFFFFFFFFFFFFCLL) + 4); } } return result; }
bitmap_intersect: PUSH RBP MOV RBP,RSP PUSH RBX MOV RAX,qword ptr [RDI] MOV ECX,dword ptr [RDI + 0x1c] ADD ECX,0x1f SHR ECX,0x5 MOV R9D,dword ptr [RSI + 0x1c] ADD R9D,0x1f SHR R9D,0x5 CMP ECX,R9D MOV R8D,R9D CMOVC R8D,ECX LEA R10,[RAX + R8*0x4] TEST R8D,R8D JZ 0x0019d70b MOV R11,qword ptr [RSI] MOV RDX,RAX MOV RDI,RAX LAB_0019d6f3: MOV EBX,dword ptr [R11] AND dword ptr [RDI],EBX ADD R11,0x4 ADD RDI,0x4 ADD RDX,0x4 CMP RDI,R10 JC 0x0019d6f3 JMP 0x0019d711 LAB_0019d70b: MOV RDX,RAX MOV RDI,RAX LAB_0019d711: SUB ECX,R9D JC 0x0019d750 MOV ESI,dword ptr [RSI + 0x18] NOT ESI AND dword ptr [RDI + -0x4],ESI LEA RSI,[R10 + RCX*0x4] CMP RDI,RSI JNC 0x0019d750 ADD RCX,R8 LEA RAX,[RAX + RCX*0x4] LEA RCX,[RDX + 0x4] CMP RAX,RCX CMOVA RCX,RAX NOT RDX ADD RDX,RCX AND RDX,-0x4 ADD RDX,0x4 XOR ESI,ESI POP RBX POP RBP JMP 0x001292b0 LAB_0019d750: POP RBX POP RBP RET
void bitmap_intersect(int8 *param_1,int8 *param_2) { uint *puVar1; uint uVar2; uint uVar3; uint *puVar4; uint *puVar5; uint *__s; uint uVar6; puVar1 = (uint *)*param_1; uVar3 = *(int *)((long)param_1 + 0x1c) + 0x1fU >> 5; uVar6 = *(int *)((long)param_2 + 0x1c) + 0x1fU >> 5; uVar2 = uVar6; if (uVar3 < uVar6) { uVar2 = uVar3; } puVar5 = puVar1; __s = puVar1; if (uVar2 != 0) { puVar4 = (uint *)*param_2; do { *__s = *__s & *puVar4; puVar4 = puVar4 + 1; __s = __s + 1; puVar5 = puVar5 + 1; } while (__s < puVar1 + uVar2); } if ((uVar6 <= uVar3) && (__s[-1] = __s[-1] & ~*(uint *)(param_2 + 3), __s < puVar1 + uVar2 + (uVar3 - uVar6))) { puVar4 = puVar5 + 1; if (puVar5 + 1 < puVar1 + (ulong)(uVar3 - uVar6) + (ulong)uVar2) { puVar4 = puVar1 + (ulong)(uVar3 - uVar6) + (ulong)uVar2; } memset(__s,0,(~(ulong)puVar5 + (long)puVar4 & 0xfffffffffffffffc) + 4); return; } return; }
13,696
rw_pr_unlock
eloqsql/mysys/thr_rwlock.c
int rw_pr_unlock(rw_pr_lock_t *rwlock) { if (rwlock->active_writer) { /* We are unlocking wr-lock. */ #ifdef SAFE_MUTEX rwlock->writer_thread= 0; #endif rwlock->active_writer= FALSE; if (rwlock->writers_waiting_readers) { /* Avoid expensive cond signal in case when there is no contention or it is wr-only. Note that from view point of performance it would be better to signal on the condition variable after unlocking mutex (as it reduces number of contex switches). Unfortunately this would mean that such rwlock can't be safely used by MDL subsystem, which relies on the fact that it is OK to destroy rwlock once it is in unlocked state. */ pthread_cond_signal(&rwlock->no_active_readers); } pthread_mutex_unlock(&rwlock->lock); } else { /* We are unlocking rd-lock. */ pthread_mutex_lock(&rwlock->lock); rwlock->active_readers--; if (rwlock->active_readers == 0 && rwlock->writers_waiting_readers) { /* If we are last reader and there are waiting writers wake them up. */ pthread_cond_signal(&rwlock->no_active_readers); } pthread_mutex_unlock(&rwlock->lock); } return 0; }
O0
c
rw_pr_unlock: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpb $0x0, 0x60(%rax) je 0x5d7f0 movq -0x8(%rbp), %rax movb $0x0, 0x60(%rax) movq -0x8(%rbp), %rax cmpl $0x0, 0x5c(%rax) je 0x5d7e5 movq -0x8(%rbp), %rdi addq $0x28, %rdi callq 0x26030 movq -0x8(%rbp), %rdi callq 0x26260 jmp 0x5d830 movq -0x8(%rbp), %rdi callq 0x264c0 movq -0x8(%rbp), %rax movl 0x58(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x58(%rax) movq -0x8(%rbp), %rax cmpl $0x0, 0x58(%rax) jne 0x5d827 movq -0x8(%rbp), %rax cmpl $0x0, 0x5c(%rax) je 0x5d827 movq -0x8(%rbp), %rdi addq $0x28, %rdi callq 0x26030 movq -0x8(%rbp), %rdi callq 0x26260 xorl %eax, %eax addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
rw_pr_unlock: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp byte ptr [rax+60h], 0 jz short loc_5D7F0 mov rax, [rbp+var_8] mov byte ptr [rax+60h], 0 mov rax, [rbp+var_8] cmp dword ptr [rax+5Ch], 0 jz short loc_5D7E5 mov rdi, [rbp+var_8] add rdi, 28h ; '(' call _pthread_cond_signal loc_5D7E5: mov rdi, [rbp+var_8] call _pthread_mutex_unlock jmp short loc_5D830 loc_5D7F0: mov rdi, [rbp+var_8] call _pthread_mutex_lock mov rax, [rbp+var_8] mov ecx, [rax+58h] add ecx, 0FFFFFFFFh mov [rax+58h], ecx mov rax, [rbp+var_8] cmp dword ptr [rax+58h], 0 jnz short loc_5D827 mov rax, [rbp+var_8] cmp dword ptr [rax+5Ch], 0 jz short loc_5D827 mov rdi, [rbp+var_8] add rdi, 28h ; '(' call _pthread_cond_signal loc_5D827: mov rdi, [rbp+var_8] call _pthread_mutex_unlock loc_5D830: xor eax, eax add rsp, 10h pop rbp retn
long long rw_pr_unlock(long long a1) { if ( *(_BYTE *)(a1 + 96) ) { *(_BYTE *)(a1 + 96) = 0; if ( *(_DWORD *)(a1 + 92) ) pthread_cond_signal(a1 + 40); } else { pthread_mutex_lock(a1); if ( !--*(_DWORD *)(a1 + 88) && *(_DWORD *)(a1 + 92) ) pthread_cond_signal(a1 + 40); } pthread_mutex_unlock(a1); return 0LL; }
rw_pr_unlock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x60],0x0 JZ 0x0015d7f0 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x60],0x0 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x5c],0x0 JZ 0x0015d7e5 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 CALL 0x00126030 LAB_0015d7e5: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00126260 JMP 0x0015d830 LAB_0015d7f0: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001264c0 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x58] ADD ECX,-0x1 MOV dword ptr [RAX + 0x58],ECX MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x58],0x0 JNZ 0x0015d827 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x5c],0x0 JZ 0x0015d827 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 CALL 0x00126030 LAB_0015d827: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00126260 LAB_0015d830: XOR EAX,EAX ADD RSP,0x10 POP RBP RET
int8 rw_pr_unlock(pthread_mutex_t *param_1) { if (*(char *)((long)param_1 + 0x60) == '\0') { pthread_mutex_lock(param_1); *(int *)((long)param_1 + 0x58) = *(int *)((long)param_1 + 0x58) + -1; if ((*(int *)((long)param_1 + 0x58) == 0) && (*(int *)((long)param_1 + 0x5c) != 0)) { pthread_cond_signal((pthread_cond_t *)(param_1 + 1)); } pthread_mutex_unlock(param_1); } else { *(int1 *)((long)param_1 + 0x60) = 0; if (*(int *)((long)param_1 + 0x5c) != 0) { pthread_cond_signal((pthread_cond_t *)(param_1 + 1)); } pthread_mutex_unlock(param_1); } return 0; }
13,697
unicode_find_name
bluesky950520[P]quickjs/libunicode.c
static int unicode_find_name(const char *name_table, const char *name) { const char *p, *r; int pos; size_t name_len, len; p = name_table; pos = 0; name_len = strlen(name); while (*p) { for(;;) { r = strchr(p, ','); if (!r) len = strlen(p); else len = r - p; if (len == name_len && !memcmp(p, name, name_len)) return pos; p += len + 1; if (!r) break; } pos++; } return -1; }
O3
c
unicode_find_name: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %r15 movq %rsi, %rdi callq 0xe240 movq %rax, %r12 movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpb $0x0, (%r15) je 0x9bdd8 xorl %ebx, %ebx movq %r15, %rdi movl $0x2c, %esi callq 0xe270 movq %rax, %r13 testq %rax, %rax je 0x9bd9a movq %r13, %rbp subq %r15, %rbp jmp 0x9bda5 movq %r15, %rdi callq 0xe240 movq %rax, %rbp cmpq %r12, %rbp jne 0x9bdbc movq %r15, %rdi movq %r14, %rsi movq %r12, %rdx callq 0xe6a0 testl %eax, %eax je 0x9bdd6 addq %rbp, %r15 incq %r15 testq %r13, %r13 jne 0x9bd7d incl %ebx cmpb $0x0, (%r15) jne 0x9bd7d movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x9bdd8 movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
unicode_find_name: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rsi mov r15, rdi mov rdi, rsi call _strlen mov r12, rax mov eax, 0FFFFFFFFh cmp byte ptr [r15], 0 jz short loc_9BDD8 xor ebx, ebx loc_9BD7D: mov rdi, r15 mov esi, 2Ch ; ',' call _strchr mov r13, rax test rax, rax jz short loc_9BD9A mov rbp, r13 sub rbp, r15 jmp short loc_9BDA5 loc_9BD9A: mov rdi, r15 call _strlen mov rbp, rax loc_9BDA5: cmp rbp, r12 jnz short loc_9BDBC mov rdi, r15 mov rsi, r14 mov rdx, r12 call _bcmp test eax, eax jz short loc_9BDD6 loc_9BDBC: add r15, rbp inc r15 test r13, r13 jnz short loc_9BD7D inc ebx cmp byte ptr [r15], 0 jnz short loc_9BD7D mov eax, 0FFFFFFFFh jmp short loc_9BDD8 loc_9BDD6: mov eax, ebx loc_9BDD8: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long unicode_find_name(_BYTE *a1, long long a2) { _BYTE *v2; // r15 long long v3; // r12 long long result; // rax unsigned int v5; // ebx long long v6; // rax long long v7; // rcx long long v8; // r13 long long v9; // rbp v2 = a1; v3 = strlen(a2); result = 0xFFFFFFFFLL; if ( *a1 ) { v5 = 0; while ( 1 ) { v6 = strchr(v2, 44LL); v8 = v6; v9 = v6 ? v6 - (_QWORD)v2 : strlen(v2); if ( v9 == v3 && !(unsigned int)bcmp(v2, a2, v3, v7) ) break; v2 += v9 + 1; if ( !v8 ) { ++v5; if ( !*v2 ) return 0xFFFFFFFFLL; } } return v5; } return result; }
unicode_find_name: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV R15,RDI MOV RDI,RSI CALL 0x0010e240 MOV R12,RAX MOV EAX,0xffffffff CMP byte ptr [R15],0x0 JZ 0x0019bdd8 XOR EBX,EBX LAB_0019bd7d: MOV RDI,R15 MOV ESI,0x2c CALL 0x0010e270 MOV R13,RAX TEST RAX,RAX JZ 0x0019bd9a MOV RBP,R13 SUB RBP,R15 JMP 0x0019bda5 LAB_0019bd9a: MOV RDI,R15 CALL 0x0010e240 MOV RBP,RAX LAB_0019bda5: CMP RBP,R12 JNZ 0x0019bdbc MOV RDI,R15 MOV RSI,R14 MOV RDX,R12 CALL 0x0010e6a0 TEST EAX,EAX JZ 0x0019bdd6 LAB_0019bdbc: ADD R15,RBP INC R15 TEST R13,R13 JNZ 0x0019bd7d INC EBX CMP byte ptr [R15],0x0 JNZ 0x0019bd7d MOV EAX,0xffffffff JMP 0x0019bdd8 LAB_0019bdd6: MOV EAX,EBX LAB_0019bdd8: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int unicode_find_name(char *param_1,char *param_2) { int iVar1; size_t __n; char *pcVar2; int iVar3; size_t sVar4; __n = strlen(param_2); if (*param_1 != '\0') { iVar3 = 0; do { pcVar2 = strchr(param_1,0x2c); if (pcVar2 == (char *)0x0) { sVar4 = strlen(param_1); } else { sVar4 = (long)pcVar2 - (long)param_1; } if ((sVar4 == __n) && (iVar1 = bcmp(param_1,param_2,__n), iVar1 == 0)) { return iVar3; } param_1 = param_1 + sVar4 + 1; } while ((pcVar2 != (char *)0x0) || (iVar3 = iVar3 + 1, *param_1 != '\0')); } return -1; }
13,698
void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(char*, int&, int&, double)
llama.cpp/common/json.hpp
JSON_HEDLEY_NON_NULL(1) void grisu2(char* buf, int& len, int& decimal_exponent, FloatType value) { static_assert(diyfp::kPrecision >= std::numeric_limits<FloatType>::digits + 3, "internal error: not enough precision"); JSON_ASSERT(std::isfinite(value)); JSON_ASSERT(value > 0); // If the neighbors (and boundaries) of 'value' are always computed for double-precision // numbers, all float's can be recovered using strtod (and strtof). However, the resulting // decimal representations are not exactly "short". // // The documentation for 'std::to_chars' (https://en.cppreference.com/w/cpp/utility/to_chars) // says "value is converted to a string as if by std::sprintf in the default ("C") locale" // and since sprintf promotes floats to doubles, I think this is exactly what 'std::to_chars' // does. // On the other hand, the documentation for 'std::to_chars' requires that "parsing the // representation using the corresponding std::from_chars function recovers value exactly". That // indicates that single precision floating-point numbers should be recovered using // 'std::strtof'. // // NB: If the neighbors are computed for single-precision numbers, there is a single float // (7.0385307e-26f) which can't be recovered using strtod. The resulting double precision // value is off by 1 ulp. #if 0 // NOLINT(readability-avoid-unconditional-preprocessor-if) const boundaries w = compute_boundaries(static_cast<double>(value)); #else const boundaries w = compute_boundaries(value); #endif grisu2(buf, len, decimal_exponent, w.minus, w.w, w.plus); }
O3
cpp
void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(char*, int&, int&, double): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x58, %rsp movq %xmm0, %rax btrq $0x3f, %rax movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000 cmpq %rcx, %rax jge 0x82a5f xorpd %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jbe 0x82a7b movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 leaq 0x28(%rsp), %r12 movq %r12, %rdi callq 0x82d18 movq 0x10(%r12), %rcx movl 0x18(%r12), %r8d movups (%r12), %xmm0 movups 0x20(%r12), %xmm1 movups %xmm1, 0x10(%rsp) movups %xmm0, (%rsp) movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x82e71 addq $0x58, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq leaq 0x9a31a(%rip), %rdi # 0x11cd80 leaq 0x9273e(%rip), %rdx # 0x1151ab leaq 0x9b718(%rip), %rcx # 0x11e18c movl $0x4589, %esi # imm = 0x4589 jmp 0x82a95 leaq 0x9a2fe(%rip), %rdi # 0x11cd80 leaq 0x92722(%rip), %rdx # 0x1151ab leaq 0x9b815(%rip), %rcx # 0x11e2a5 movl $0x458a, %esi # imm = 0x458A xorl %eax, %eax callq 0x20ed0
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl6grisu2IdEEvPcRiS5_T_: push r15 push r14 push r12 push rbx sub rsp, 58h movq rax, xmm0 btr rax, 3Fh ; '?' mov rcx, 7FF0000000000000h cmp rax, rcx jge short loc_82A5F xorpd xmm1, xmm1 ucomisd xmm0, xmm1 jbe short loc_82A7B mov rbx, rdx mov r14, rsi mov r15, rdi lea r12, [rsp+78h+var_50] mov rdi, r12 call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl18compute_boundariesIdEENS2_10boundariesET_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(double) mov rcx, [r12+10h] mov r8d, [r12+18h] movups xmm0, xmmword ptr [r12] movups xmm1, xmmword ptr [r12+20h] movups [rsp+78h+var_68], xmm1 movups [rsp+78h+var_78], xmm0 mov rdi, r15 mov rsi, r14 mov rdx, rbx call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl6grisu2EPcRiS4_NS2_5diyfpES5_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(char *,int &,int &,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) add rsp, 58h pop rbx pop r12 pop r14 pop r15 retn loc_82A5F: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aStdIsfiniteVal; "std::isfinite(value)" mov esi, 4589h jmp short loc_82A95 loc_82A7B: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aValue0; "value > 0" mov esi, 458Ah loc_82A95: xor eax, eax call _ggml_abort
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>( long long a1, long long a2, long long a3, double a4) { long long v5; // r9 char *v7; // rsi int v8; // edx int v9; // ecx int v10; // r8d int v11; // r9d _QWORD v12[3]; // [rsp+28h] [rbp-50h] BYREF unsigned int v13; // [rsp+40h] [rbp-38h] long long v14; // [rsp+48h] [rbp-30h] long long v15; // [rsp+50h] [rbp-28h] if ( (*(_QWORD *)&a4 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL ) { v7 = (_BYTE *)(&stru_4578 + 17); ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 17801LL, "GGML_ASSERT(%s) failed", "std::isfinite(value)"); } else { if ( a4 > 0.0 ) { nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(v12); return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2( a1, a2, a3, v12[2], v13, v5, v12[0], v12[1], v14, v15); } v7 = (_BYTE *)(&stru_4578 + 18); ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 17802LL, "GGML_ASSERT(%s) failed", "value > 0"); } return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer( (nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", v7, v8, v9, v10, v11); }
grisu2<double>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x58 MOVQ RAX,XMM0 BTR RAX,0x3f MOV RCX,0x7ff0000000000000 CMP RAX,RCX JGE 0x00182a5f XORPD XMM1,XMM1 UCOMISD XMM0,XMM1 JBE 0x00182a7b MOV RBX,RDX MOV R14,RSI MOV R15,RDI LEA R12,[RSP + 0x28] MOV RDI,R12 CALL 0x00182d18 MOV RCX,qword ptr [R12 + 0x10] MOV R8D,dword ptr [R12 + 0x18] MOVUPS XMM0,xmmword ptr [R12] MOVUPS XMM1,xmmword ptr [R12 + 0x20] MOVUPS xmmword ptr [RSP + 0x10],XMM1 MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x00182e71 ADD RSP,0x58 POP RBX POP R12 POP R14 POP R15 RET LAB_00182a5f: LEA RDI,[0x21cd80] LEA RDX,[0x2151ab] LEA RCX,[0x21e18c] MOV ESI,0x4589 JMP 0x00182a95 LAB_00182a7b: LEA RDI,[0x21cd80] LEA RDX,[0x2151ab] LEA RCX,[0x21e2a5] MOV ESI,0x458a LAB_00182a95: XOR EAX,EAX CALL 0x00120ed0
/* void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(char*, int&, int&, double) */ void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double> (char *param_1,int *param_2,int *param_3,double param_4) { char *pcVar1; int8 uVar2; int8 in_R9; int4 local_50 [2]; int4 uStack_48; int8 local_40; int4 local_38; int4 local_30; int4 uStack_28; if ((ulong)ABS(param_4) < 0x7ff0000000000000) { if (0.0 < param_4) { compute_boundaries<double>((dtoa_impl *)local_50,param_4); grisu2(param_1,param_2,param_3,local_40,local_38,in_R9,local_50[0],uStack_48,local_30, uStack_28); return; } pcVar1 = "value > 0"; uVar2 = 0x458a; } else { pcVar1 = "std::isfinite(value)"; uVar2 = 0x4589; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar2, "GGML_ASSERT(%s) failed",pcVar1); }
13,699
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); }
O0
c
ma_setup_live_state: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) jmp 0x47209 jmp 0x4720b jmp 0x4720d leaq 0x43bb54(%rip), %rax # 0x482d68 movq (%rax), %rax movq -0x10(%rbp), %rdi callq *%rax cmpl $0x0, %eax je 0x4722d jmp 0x47224 movb $0x1, -0x1(%rbp) jmp 0x4740e movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq 0x58(%rax), %rax movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) je 0x4726e movq -0x28(%rbp), %rax movq 0x8(%rax), %rax cmpq -0x20(%rbp), %rax jne 0x4725f jmp 0x4738a jmp 0x47261 movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) jmp 0x47245 xorl %edi, %edi movl $0x88, %esi movl $0x30, %edx callq 0xfb390 movq %rax, -0x28(%rbp) cmpq $0x0, %rax jne 0x47294 jmp 0x4728b movb $0x1, -0x1(%rbp) jmp 0x4740e movq -0x18(%rbp), %rax movq 0x58(%rax), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x58(%rax) movq -0x20(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x20(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 leaq 0x11202e(%rip), %rsi # 0x1592fb movl $0x59, %edx callq 0x47420 movq -0x20(%rbp), %rax movl 0x7ac(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x7ac(%rax) jmp 0x472ec movq -0x20(%rbp), %rax movq 0x450(%rax), %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax movq 0x78(%rax), %rax movq -0x30(%rbp), %rcx cmpq 0x8(%rcx), %rax ja 0x4731a movq -0x30(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) jmp 0x472fb movq -0x20(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 callq 0x47490 movq -0x28(%rbp), %rax addq $0x48, %rax movq %rax, -0x40(%rbp) movq -0x28(%rbp), %rdi addq $0x10, %rdi movq %rdi, -0x38(%rbp) movq -0x30(%rbp), %rsi addq $0x10, %rsi movl $0x38, %edx callq 0x29090 movq -0x40(%rbp), %rdi movq -0x38(%rbp), %rsi movl $0x38, %edx callq 0x29090 movq -0x28(%rbp), %rax movb 0x44(%rax), %cl andb $-0x3, %cl orb $0x0, %cl movb %cl, 0x44(%rax) movq -0x28(%rbp), %rax movb 0x44(%rax), %cl andb $-0x2, %cl orb $0x0, %cl movb %cl, 0x44(%rax) jmp 0x47388 jmp 0x4738a movq -0x28(%rbp), %rcx addq $0x48, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x60(%rax) movq -0x28(%rbp), %rcx addq $0x10, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x68(%rax) movq -0x28(%rbp), %rax movl 0x80(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x80(%rax) movq -0x10(%rbp), %rax movl 0x618(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax setne %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %edx movq -0x28(%rbp), %rax movb 0x44(%rax), %cl shrb %cl andb $0x1, %cl movzbl %cl, %ecx orl %edx, %ecx movb %cl, %dl movb 0x44(%rax), %cl andb $0x1, %dl shlb %dl andb $-0x3, %cl orb %dl, %cl movb %cl, 0x44(%rax) jmp 0x47408 jmp 0x4740a movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x40, %rsp popq %rbp retq nopw (%rax,%rax)
_ma_setup_live_state: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_20], rax jmp short $+2 loc_47209: jmp short $+2 loc_4720B: jmp short $+2 loc_4720D: lea rax, maria_create_trn_hook mov rax, [rax] mov rdi, [rbp+var_10] call rax cmp eax, 0 jz short loc_4722D jmp short $+2 loc_47224: mov [rbp+var_1], 1 jmp loc_4740E loc_4722D: mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov rax, [rax+58h] mov [rbp+var_28], rax loc_47245: cmp [rbp+var_28], 0 jz short loc_4726E mov rax, [rbp+var_28] mov rax, [rax+8] cmp rax, [rbp+var_20] jnz short loc_4725F jmp loc_4738A loc_4725F: jmp short $+2 loc_47261: mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_28], rax jmp short loc_47245 loc_4726E: xor edi, edi mov esi, 88h mov edx, 30h ; '0' call my_malloc mov [rbp+var_28], rax cmp rax, 0 jnz short loc_47294 jmp short $+2 loc_4728B: mov [rbp+var_1], 1 jmp loc_4740E loc_47294: mov rax, [rbp+var_18] mov rcx, [rax+58h] mov rax, [rbp+var_28] mov [rax], rcx mov rcx, [rbp+var_28] mov rax, [rbp+var_18] mov [rax+58h], rcx mov rcx, [rbp+var_20] mov rax, [rbp+var_28] mov [rax+8], rcx mov rdi, [rbp+var_20] add rdi, 8F0h lea rsi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 59h ; 'Y' call inline_mysql_mutex_lock_5 mov rax, [rbp+var_20] mov ecx, [rax+7ACh] add ecx, 1 mov [rax+7ACh], ecx jmp short $+2 loc_472EC: mov rax, [rbp+var_20] mov rax, [rax+450h] mov [rbp+var_30], rax loc_472FB: mov rax, [rbp+var_18] mov rax, [rax+78h] mov rcx, [rbp+var_30] cmp rax, [rcx+8] ja short loc_4731A mov rax, [rbp+var_30] mov rax, [rax] mov [rbp+var_30], rax jmp short loc_472FB loc_4731A: mov rdi, [rbp+var_20] add rdi, 8F0h call inline_mysql_mutex_unlock_5 mov rax, [rbp+var_28] add rax, 48h ; 'H' mov [rbp+var_40], rax mov rdi, [rbp+var_28] add rdi, 10h mov [rbp+var_38], rdi mov rsi, [rbp+var_30] add rsi, 10h mov edx, 38h ; '8' call _memcpy mov rdi, [rbp+var_40] mov rsi, [rbp+var_38] mov edx, 38h ; '8' call _memcpy mov rax, [rbp+var_28] mov cl, [rax+44h] and cl, 0FDh or cl, 0 mov [rax+44h], cl mov rax, [rbp+var_28] mov cl, [rax+44h] and cl, 0FEh or cl, 0 mov [rax+44h], cl jmp short $+2 loc_47388: jmp short $+2 loc_4738A: mov rcx, [rbp+var_28] add rcx, 48h ; 'H' mov rax, [rbp+var_10] mov [rax+60h], rcx mov rcx, [rbp+var_28] add rcx, 10h mov rax, [rbp+var_10] mov [rax+20h], rcx mov rcx, [rbp+var_28] mov rax, [rbp+var_10] mov [rax+68h], rcx mov rax, [rbp+var_28] mov ecx, [rax+80h] add ecx, 1 mov [rax+80h], ecx mov rax, [rbp+var_10] mov eax, [rax+618h] and eax, 1 cmp eax, 0 setnz al xor al, 0FFh and al, 1 movzx edx, al mov rax, [rbp+var_28] mov cl, [rax+44h] shr cl, 1 and cl, 1 movzx ecx, cl or ecx, edx mov dl, cl mov cl, [rax+44h] and dl, 1 shl dl, 1 and cl, 0FDh or cl, dl mov [rax+44h], cl jmp short $+2 loc_47408: jmp short $+2 loc_4740A: mov [rbp+var_1], 0 loc_4740E: mov al, [rbp+var_1] add rsp, 40h pop rbp retn
char ma_setup_live_state(long long *a1) { _QWORD *j; // [rsp+10h] [rbp-30h] long long i; // [rsp+18h] [rbp-28h] long long v4; // [rsp+20h] [rbp-20h] long long v5; // [rsp+28h] [rbp-18h] v4 = *a1; if ( (unsigned int)maria_create_trn_hook(a1) ) return 1; v5 = a1[1]; for ( i = *(_QWORD *)(v5 + 88); i; i = *(_QWORD *)i ) { if ( *(_QWORD *)(i + 8) == v4 ) goto LABEL_13; } i = my_malloc(0LL, 136LL, 48LL); if ( !i ) return 1; *(_QWORD *)i = *(_QWORD *)(v5 + 88); *(_QWORD *)(v5 + 88) = i; *(_QWORD *)(i + 8) = v4; inline_mysql_mutex_lock_5(v4 + 2288, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c", 89LL); ++*(_DWORD *)(v4 + 1964); for ( j = *(_QWORD **)(v4 + 1104); *(_QWORD *)(v5 + 120) <= j[1]; j = (_QWORD *)*j ) ; inline_mysql_mutex_unlock_5(v4 + 2288); memcpy(i + 16, j + 2, 56LL); memcpy(i + 72, i + 16, 56LL); *(_BYTE *)(i + 68) &= ~2u; *(_BYTE *)(i + 68) &= ~1u; LABEL_13: a1[12] = i + 72; a1[4] = i + 16; a1[13] = i; ++*(_DWORD *)(i + 128); *(_BYTE *)(i + 68) = (2 * ((a1[195] & 1) == 0 || (*(_BYTE *)(i + 68) & 2) != 0)) | *(_BYTE *)(i + 68) & 0xFD; return 0; }
_ma_setup_live_state: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX JMP 0x00147209 LAB_00147209: JMP 0x0014720b LAB_0014720b: JMP 0x0014720d LAB_0014720d: LEA RAX,[0x582d68] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x10] CALL RAX CMP EAX,0x0 JZ 0x0014722d JMP 0x00147224 LAB_00147224: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014740e LAB_0014722d: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RBP + -0x28],RAX LAB_00147245: CMP qword ptr [RBP + -0x28],0x0 JZ 0x0014726e MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x0014725f JMP 0x0014738a LAB_0014725f: JMP 0x00147261 LAB_00147261: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX JMP 0x00147245 LAB_0014726e: XOR EDI,EDI MOV ESI,0x88 MOV EDX,0x30 CALL 0x001fb390 MOV qword ptr [RBP + -0x28],RAX CMP RAX,0x0 JNZ 0x00147294 JMP 0x0014728b LAB_0014728b: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014740e LAB_00147294: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x58] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x58],RCX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x8],RCX MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x8f0 LEA RSI,[0x2592fb] MOV EDX,0x59 CALL 0x00147420 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x7ac] ADD ECX,0x1 MOV dword ptr [RAX + 0x7ac],ECX JMP 0x001472ec LAB_001472ec: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x450] MOV qword ptr [RBP + -0x30],RAX LAB_001472fb: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x78] MOV RCX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RCX + 0x8] JA 0x0014731a MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX JMP 0x001472fb LAB_0014731a: MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x8f0 CALL 0x00147490 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x48 MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x10 MOV qword ptr [RBP + -0x38],RDI MOV RSI,qword ptr [RBP + -0x30] ADD RSI,0x10 MOV EDX,0x38 CALL 0x00129090 MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x38] MOV EDX,0x38 CALL 0x00129090 MOV RAX,qword ptr [RBP + -0x28] MOV CL,byte ptr [RAX + 0x44] AND CL,0xfd OR CL,0x0 MOV byte ptr [RAX + 0x44],CL MOV RAX,qword ptr [RBP + -0x28] MOV CL,byte ptr [RAX + 0x44] AND CL,0xfe OR CL,0x0 MOV byte ptr [RAX + 0x44],CL JMP 0x00147388 LAB_00147388: JMP 0x0014738a LAB_0014738a: MOV RCX,qword ptr [RBP + -0x28] ADD RCX,0x48 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x60],RCX MOV RCX,qword ptr [RBP + -0x28] ADD RCX,0x10 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x20],RCX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x68],RCX MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x80] ADD ECX,0x1 MOV dword ptr [RAX + 0x80],ECX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x618] AND EAX,0x1 CMP EAX,0x0 SETNZ AL XOR AL,0xff AND AL,0x1 MOVZX EDX,AL MOV RAX,qword ptr [RBP + -0x28] MOV CL,byte ptr [RAX + 0x44] SHR CL,0x1 AND CL,0x1 MOVZX ECX,CL OR ECX,EDX MOV DL,CL MOV CL,byte ptr [RAX + 0x44] AND DL,0x1 SHL DL,0x1 AND CL,0xfd OR CL,DL MOV byte ptr [RAX + 0x44],CL JMP 0x00147408 LAB_00147408: JMP 0x0014740a LAB_0014740a: MOV byte ptr [RBP + -0x1],0x0 LAB_0014740e: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x40 POP RBP RET
int1 _ma_setup_live_state(long *param_1) { long lVar1; long lVar2; int iVar3; int8 *local_38; int8 *local_30; int1 local_9; lVar1 = *param_1; iVar3 = (*maria_create_trn_hook)(param_1); if (iVar3 == 0) { lVar2 = param_1[1]; for (local_30 = *(int8 **)(lVar2 + 0x58); local_30 != (int8 *)0x0; local_30 = (int8 *)*local_30) { if (local_30[1] == lVar1) goto LAB_0014738a; } local_30 = (int8 *)my_malloc(0,0x88,0x30); if (local_30 == (int8 *)0x0) { local_9 = 1; } else { *local_30 = *(int8 *)(lVar2 + 0x58); *(int8 **)(lVar2 + 0x58) = local_30; local_30[1] = lVar1; inline_mysql_mutex_lock (lVar1 + 0x8f0,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c", 0x59); *(int *)(lVar1 + 0x7ac) = *(int *)(lVar1 + 0x7ac) + 1; for (local_38 = *(int8 **)(lVar1 + 0x450); *(ulong *)(lVar2 + 0x78) <= (ulong)local_38[1]; local_38 = (int8 *)*local_38) { } inline_mysql_mutex_unlock(lVar1 + 0x8f0); memcpy(local_30 + 2,local_38 + 2,0x38); memcpy(local_30 + 9,local_30 + 2,0x38); *(byte *)((long)local_30 + 0x44) = *(byte *)((long)local_30 + 0x44) & 0xfd; *(byte *)((long)local_30 + 0x44) = *(byte *)((long)local_30 + 0x44) & 0xfe; LAB_0014738a: param_1[0xc] = (long)(local_30 + 9); param_1[4] = (long)(local_30 + 2); param_1[0xd] = (long)local_30; *(int *)(local_30 + 0x10) = *(int *)(local_30 + 0x10) + 1; *(byte *)((long)local_30 + 0x44) = *(byte *)((long)local_30 + 0x44) & 0xfd | (*(byte *)((long)local_30 + 0x44) >> 1 & 1 | (*(uint *)(param_1 + 0xc3) & 1) == 0) << 1; local_9 = 0; } } else { local_9 = 1; } return local_9; }