index
int64
0
66.5k
func_name
stringlengths
2
5.36k
func_dep
stringlengths
16
2.19k
func
stringlengths
8
55.3k
test
stringlengths
0
7.07k
opt
stringclasses
4 values
language
stringclasses
2 values
asm
stringlengths
0
45.4k
ida_asm
stringlengths
0
44.7k
ida_pseudo
stringlengths
0
44.3k
ghidra_asm
stringlengths
0
49.1k
ghidra_pseudo
stringlengths
0
64.7k
35,500
my_charset_file_tailoring_realloc
eloqsql/strings/ctype.c
static int my_charset_file_tailoring_realloc(MY_CHARSET_FILE *i, size_t newlen) { if (i->tailoring_alloced_length > newlen || (i->tailoring= i->loader->realloc(i->tailoring, (i->tailoring_alloced_length= (newlen + 32*1024))))) { return MY_XML_OK; } return MY_XML_ERROR; }
O0
c
my_charset_file_tailoring_realloc: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x698(%rax), %rax cmpq -0x18(%rbp), %rax ja 0x6df37 movq -0x10(%rbp), %rax movq 0x7a8(%rax), %rax movq 0x90(%rax), %rax movq -0x10(%rbp), %rcx movq 0x688(%rcx), %rdi movq -0x18(%rbp), %rsi addq $0x8000, %rsi # imm = 0x8000 movq -0x10(%rbp), %rcx movq %rsi, 0x698(%rcx) callq *%rax movq -0x10(%rbp), %rcx movq %rax, 0x688(%rcx) cmpq $0x0, %rax je 0x6df40 movl $0x0, -0x4(%rbp) jmp 0x6df47 movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq
my_charset_file_tailoring_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+698h] cmp rax, [rbp+var_18] ja short loc_6DF37 mov rax, [rbp+var_10] mov rax, [rax+7A8h] mov rax, [rax+90h] mov rcx, [rbp+var_10] mov rdi, [rcx+688h] mov rsi, [rbp+var_18] add rsi, 8000h mov rcx, [rbp+var_10] mov [rcx+698h], rsi call rax mov rcx, [rbp+var_10] mov [rcx+688h], rax cmp rax, 0 jz short loc_6DF40 loc_6DF37: mov [rbp+var_4], 0 jmp short loc_6DF47 loc_6DF40: mov [rbp+var_4], 1 loc_6DF47: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long my_charset_file_tailoring_realloc(_QWORD *a1, unsigned long long a2) { long long ( *v2)(long long); // rax long long v3; // rdi long long v4; // rax unsigned int v7; // [rsp+1Ch] [rbp-4h] v7 = 0; if ( a1[211] <= a2 ) { v2 = *(long long ( **)(long long))(a1[245] + 144LL); v3 = a1[209]; a1[211] = a2 + 0x8000; v4 = v2(v3); a1[209] = v4; if ( !v4 ) return 1; } return v7; }
my_charset_file_tailoring_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 + 0x698] CMP RAX,qword ptr [RBP + -0x18] JA 0x0016df37 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x7a8] MOV RAX,qword ptr [RAX + 0x90] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x688] MOV RSI,qword ptr [RBP + -0x18] ADD RSI,0x8000 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x698],RSI CALL RAX MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x688],RAX CMP RAX,0x0 JZ 0x0016df40 LAB_0016df37: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0016df47 LAB_0016df40: MOV dword ptr [RBP + -0x4],0x1 LAB_0016df47: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 my_charset_file_tailoring_realloc(long param_1,ulong param_2) { code *pcVar1; long lVar2; if (*(ulong *)(param_1 + 0x698) <= param_2) { pcVar1 = *(code **)(*(long *)(param_1 + 0x7a8) + 0x90); *(ulong *)(param_1 + 0x698) = param_2 + 0x8000; lVar2 = (*pcVar1)(*(int8 *)(param_1 + 0x688)); *(long *)(param_1 + 0x688) = lVar2; if (lVar2 == 0) { return 1; } } return 0; }
35,501
my_hash_reset
eloqsql/mysys/hash.c
void my_hash_reset(HASH *hash) { DBUG_ENTER("my_hash_reset"); DBUG_PRINT("enter",("hash:%p", hash)); my_hash_free_elements(hash); reset_dynamic(&hash->array); /* Set row pointers so that the hash can be reused at once */ hash->blength= 1; DBUG_VOID_RETURN; }
O3
c
my_hash_reset: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl 0x18(%rdi), %r14d testq %r14, %r14 je 0x93a7c movq $0x0, 0x18(%rbx) cmpq $0x0, 0x60(%rbx) je 0x93a7c movq 0x28(%rbx), %r15 shlq $0x4, %r14 addq %r15, %r14 movq 0x8(%r15), %rdi addq $0x10, %r15 callq *0x60(%rbx) cmpq %r14, %r15 jb 0x93a6c movl $0x0, 0x30(%rbx) movq $0x1, 0x10(%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
my_hash_reset: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov r14d, [rdi+18h] test r14, r14 jz short loc_93A7C mov qword ptr [rbx+18h], 0 cmp qword ptr [rbx+60h], 0 jz short loc_93A7C mov r15, [rbx+28h] shl r14, 4 add r14, r15 loc_93A6C: mov rdi, [r15+8] add r15, 10h call qword ptr [rbx+60h] cmp r15, r14 jb short loc_93A6C loc_93A7C: mov dword ptr [rbx+30h], 0 mov qword ptr [rbx+10h], 1 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long my_hash_reset(long long a1) { long long v2; // r14 unsigned long long v3; // r15 unsigned long long v4; // r14 long long v5; // rdi long long result; // rax v2 = *(unsigned int *)(a1 + 24); if ( *(_DWORD *)(a1 + 24) ) { *(_QWORD *)(a1 + 24) = 0LL; if ( *(_QWORD *)(a1 + 96) ) { v3 = *(_QWORD *)(a1 + 40); v4 = v3 + 16 * v2; do { v5 = *(_QWORD *)(v3 + 8); v3 += 16LL; result = (*(long long ( **)(long long))(a1 + 96))(v5); } while ( v3 < v4 ); } } *(_DWORD *)(a1 + 48) = 0; *(_QWORD *)(a1 + 16) = 1LL; return result; }
my_hash_reset: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV R14D,dword ptr [RDI + 0x18] TEST R14,R14 JZ 0x00193a7c MOV qword ptr [RBX + 0x18],0x0 CMP qword ptr [RBX + 0x60],0x0 JZ 0x00193a7c MOV R15,qword ptr [RBX + 0x28] SHL R14,0x4 ADD R14,R15 LAB_00193a6c: MOV RDI,qword ptr [R15 + 0x8] ADD R15,0x10 CALL qword ptr [RBX + 0x60] CMP R15,R14 JC 0x00193a6c LAB_00193a7c: MOV dword ptr [RBX + 0x30],0x0 MOV qword ptr [RBX + 0x10],0x1 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void my_hash_reset(long param_1) { int8 *puVar1; uint uVar2; ulong uVar3; ulong uVar4; uVar2 = *(uint *)(param_1 + 0x18); if (((ulong)uVar2 != 0) && (*(int8 *)(param_1 + 0x18) = 0, *(long *)(param_1 + 0x60) != 0)) { uVar4 = *(ulong *)(param_1 + 0x28); uVar3 = (ulong)uVar2 * 0x10 + uVar4; do { puVar1 = (int8 *)(uVar4 + 8); uVar4 = uVar4 + 0x10; (**(code **)(param_1 + 0x60))(*puVar1); } while (uVar4 < uVar3); } *(int4 *)(param_1 + 0x30) = 0; *(int8 *)(param_1 + 0x10) = 1; return; }
35,502
ma_send_connect_attr
eloqsql/libmariadb/libmariadb/mariadb_lib.c
char *ma_send_connect_attr(MYSQL *mysql, unsigned char *buffer) { if (mysql->server_capabilities & CLIENT_CONNECT_ATTRS) { buffer= (unsigned char *)mysql_net_store_length((unsigned char *)buffer, (mysql->options.extension) ? mysql->options.extension->connect_attrs_len : 0); if (mysql->options.extension && ma_hashtbl_inited(&mysql->options.extension->connect_attrs)) { uint i; for (i=0; i < mysql->options.extension->connect_attrs.records; i++) { size_t len; uchar *p= ma_hashtbl_element(&mysql->options.extension->connect_attrs, i); len= strlen((char *)p); buffer= mysql_net_store_length(buffer, len); memcpy(buffer, p, len); buffer+= (len); p+= (len + 1); len= strlen((char *)p); buffer= mysql_net_store_length(buffer, len); memcpy(buffer, p, len); buffer+= len; } } } return (char *)buffer; }
O3
c
ma_send_connect_attr: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 testb $0x10, 0x372(%rdi) je 0x1b088 movq %rdi, %rbx movq 0x480(%rdi), %rax testq %rax, %rax je 0x1afde movq 0x78(%rax), %rsi jmp 0x1afe0 xorl %esi, %esi movq %r14, %rdi callq 0x21877 movq %rax, %r14 movq 0x480(%rbx), %rdi testq %rdi, %rdi je 0x1b088 cmpq $0x0, 0x48(%rdi) je 0x1b088 cmpl $0x0, 0x38(%rdi) je 0x1b088 xorl %r15d, %r15d addq $0x30, %rdi movl %r15d, %esi callq 0x33165 movq %rax, %r12 movq %rax, %rdi callq 0x131c0 movq %rax, %r13 movq %r14, %rdi movq %rax, %rsi callq 0x21877 movq %rax, %r14 movq %rax, %rdi movq %r12, %rsi movq %r13, %rdx callq 0x13390 addq %r13, %r14 addq %r13, %r12 incq %r12 movq %r12, %rdi callq 0x131c0 movq %rax, %r13 movq %r14, %rdi movq %rax, %rsi callq 0x21877 movq %rax, %r14 movq %rax, %rdi movq %r12, %rsi movq %r13, %rdx callq 0x13390 addq %r13, %r14 incl %r15d movq 0x480(%rbx), %rdi cmpl 0x38(%rdi), %r15d jb 0x1b00f movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ma_send_connect_attr: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rsi test byte ptr [rdi+372h], 10h jz loc_1B088 mov rbx, rdi mov rax, [rdi+480h] test rax, rax jz short loc_1AFDE mov rsi, [rax+78h] jmp short loc_1AFE0 loc_1AFDE: xor esi, esi loc_1AFE0: mov rdi, r14 call mysql_net_store_length mov r14, rax mov rdi, [rbx+480h] test rdi, rdi jz loc_1B088 cmp qword ptr [rdi+48h], 0 jz loc_1B088 cmp dword ptr [rdi+38h], 0 jz short loc_1B088 xor r15d, r15d loc_1B00F: add rdi, 30h ; '0' mov esi, r15d call ma_hashtbl_element mov r12, rax mov rdi, rax call _strlen mov r13, rax mov rdi, r14 mov rsi, rax call mysql_net_store_length mov r14, rax mov rdi, rax mov rsi, r12 mov rdx, r13 call _memcpy add r14, r13 add r12, r13 inc r12 mov rdi, r12 call _strlen mov r13, rax mov rdi, r14 mov rsi, rax call mysql_net_store_length mov r14, rax mov rdi, rax mov rsi, r12 mov rdx, r13 call _memcpy add r14, r13 inc r15d mov rdi, [rbx+480h] cmp r15d, [rdi+38h] jb short loc_1B00F loc_1B088: mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_send_connect_attr(long long a1, long long a2) { long long v4; // rax long long v5; // rsi long long v6; // rdi unsigned int v7; // r15d long long v8; // r12 long long v9; // r13 long long v10; // r14 long long v11; // r14 long long v12; // r12 long long v13; // r13 long long v14; // r14 if ( (*(_BYTE *)(a1 + 882) & 0x10) != 0 ) { v4 = *(_QWORD *)(a1 + 1152); if ( v4 ) v5 = *(_QWORD *)(v4 + 120); else v5 = 0LL; a2 = mysql_net_store_length(a2, v5); v6 = *(_QWORD *)(a1 + 1152); if ( v6 && *(_QWORD *)(v6 + 72) && *(_DWORD *)(v6 + 56) ) { v7 = 0; do { v8 = ma_hashtbl_element(v6 + 48, v7); v9 = strlen(v8); v10 = mysql_net_store_length(a2, v9); memcpy(v10, v8, v9); v11 = v9 + v10; v12 = v9 + v8 + 1; v13 = strlen(v12); v14 = mysql_net_store_length(v11, v13); memcpy(v14, v12, v13); a2 = v13 + v14; ++v7; v6 = *(_QWORD *)(a1 + 1152); } while ( v7 < *(_DWORD *)(v6 + 56) ); } } return a2; }
ma_send_connect_attr: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI TEST byte ptr [RDI + 0x372],0x10 JZ 0x0011b088 MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x480] TEST RAX,RAX JZ 0x0011afde MOV RSI,qword ptr [RAX + 0x78] JMP 0x0011afe0 LAB_0011afde: XOR ESI,ESI LAB_0011afe0: MOV RDI,R14 CALL 0x00121877 MOV R14,RAX MOV RDI,qword ptr [RBX + 0x480] TEST RDI,RDI JZ 0x0011b088 CMP qword ptr [RDI + 0x48],0x0 JZ 0x0011b088 CMP dword ptr [RDI + 0x38],0x0 JZ 0x0011b088 XOR R15D,R15D LAB_0011b00f: ADD RDI,0x30 MOV ESI,R15D CALL 0x00133165 MOV R12,RAX MOV RDI,RAX CALL 0x001131c0 MOV R13,RAX MOV RDI,R14 MOV RSI,RAX CALL 0x00121877 MOV R14,RAX MOV RDI,RAX MOV RSI,R12 MOV RDX,R13 CALL 0x00113390 ADD R14,R13 ADD R12,R13 INC R12 MOV RDI,R12 CALL 0x001131c0 MOV R13,RAX MOV RDI,R14 MOV RSI,RAX CALL 0x00121877 MOV R14,RAX MOV RDI,RAX MOV RSI,R12 MOV RDX,R13 CALL 0x00113390 ADD R14,R13 INC R15D MOV RDI,qword ptr [RBX + 0x480] CMP R15D,dword ptr [RDI + 0x38] JC 0x0011b00f LAB_0011b088: MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long ma_send_connect_attr(long param_1,long param_2) { char *__s; size_t __n; void *pvVar1; size_t __n_00; int8 uVar2; long lVar3; uint uVar4; if ((*(byte *)(param_1 + 0x372) & 0x10) != 0) { if (*(long *)(param_1 + 0x480) == 0) { uVar2 = 0; } else { uVar2 = *(int8 *)(*(long *)(param_1 + 0x480) + 0x78); } param_2 = mysql_net_store_length(param_2,uVar2); lVar3 = *(long *)(param_1 + 0x480); if (((lVar3 != 0) && (*(long *)(lVar3 + 0x48) != 0)) && (*(int *)(lVar3 + 0x38) != 0)) { uVar4 = 0; do { __s = (char *)ma_hashtbl_element(lVar3 + 0x30,uVar4); __n = strlen(__s); pvVar1 = (void *)mysql_net_store_length(param_2,__n); memcpy(pvVar1,__s,__n); __n_00 = strlen(__s + __n + 1); pvVar1 = (void *)mysql_net_store_length((long)pvVar1 + __n,__n_00); memcpy(pvVar1,__s + __n + 1,__n_00); param_2 = (long)pvVar1 + __n_00; uVar4 = uVar4 + 1; lVar3 = *(long *)(param_1 + 0x480); } while (uVar4 < *(uint *)(lVar3 + 0x38)); } } return param_2; }
35,503
LefDefParser::lefwLayerRoutingDiagWidth(double)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwLayerRoutingDiagWidth(double diagWidth) { if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_LAYERROUTING_START && lefwState != LEFW_LAYERROUTING) return LEFW_BAD_ORDER; if (!lefwIsRouting) return LEFW_BAD_DATA; // only routing calls this func if (prtSemiColon) { // the previous statement hasn't written the ; yet if (lefwWriteEncrypt) encPrint(lefwFile, (char*) ";\n"); else fprintf(lefwFile, ";\n"); prtSemiColon = 0; } // this routine should call only once per layer routing // it is required for SE only, other is optional if (lefwWriteEncrypt) encPrint(lefwFile, (char*) " DIAGWIDTH %.11g ;\n", diagWidth); else fprintf(lefwFile, " DIAGWIDTH %.11g ;\n", diagWidth); lefwLines++; return LEFW_OK; }
O3
cpp
LefDefParser::lefwLayerRoutingDiagWidth(double): pushq %rbx subq $0x10, %rsp leaq 0x7a74f(%rip), %rbx # 0x8d0f0 movq (%rbx), %rcx testq %rcx, %rcx je 0x129fc leaq 0x7a990(%rip), %rax # 0x8d340 movl (%rax), %edx cmpl $0x1f, %edx je 0x129c5 movl $0x2, %eax cmpl $0x7, %edx jne 0x12a62 leaq 0x7a9e8(%rip), %rax # 0x8d3b4 cmpl $0x0, (%rax) je 0x12a03 cmpb $0x1, 0x7aa0c(%rip) # 0x8d3e4 jne 0x12a2d movsd %xmm0, 0x8(%rsp) cmpb $0x1, 0x7a9f5(%rip) # 0x8d3dc jne 0x12a0a leaq 0x47e11(%rip), %rsi # 0x5a801 movq %rcx, %rdi xorl %eax, %eax callq 0x55afd jmp 0x12a20 movl $0x1, %eax jmp 0x12a62 movl $0x3, %eax jmp 0x12a62 leaq 0x47df0(%rip), %rdi # 0x5a801 movl $0x2, %esi movl $0x1, %edx callq 0x23d0 movb $0x0, 0x7a9bd(%rip) # 0x8d3e4 movsd 0x8(%rsp), %xmm0 movq (%rbx), %rdi cmpb $0x1, 0x7a9a5(%rip) # 0x8d3dc jne 0x12a49 leaq 0x4821f(%rip), %rsi # 0x5ac5f movb $0x1, %al callq 0x55afd jmp 0x12a57 leaq 0x4820f(%rip), %rsi # 0x5ac5f movb $0x1, %al callq 0x22e0 leaq 0x7a8de(%rip), %rax # 0x8d33c incl (%rax) xorl %eax, %eax addq $0x10, %rsp popq %rbx retq
_ZN12LefDefParser25lefwLayerRoutingDiagWidthEd: push rbx sub rsp, 10h lea rbx, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rcx, [rbx] test rcx, rcx jz short loc_129FC lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov edx, [rax] cmp edx, 1Fh jz short loc_129C5 mov eax, 2 cmp edx, 7 jnz loc_12A62 loc_129C5: lea rax, _ZN12LefDefParser13lefwIsRoutingE; LefDefParser::lefwIsRouting cmp dword ptr [rax], 0 jz short loc_12A03 cmp cs:_ZN12LefDefParserL12prtSemiColonE, 1; LefDefParser::prtSemiColon jnz short loc_12A2D movsd [rsp+18h+var_10], xmm0 cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_12A0A lea rsi, aDividercharS+11h; ";\n" mov rdi, rcx xor eax, eax call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_12A20 loc_129FC: mov eax, 1 jmp short loc_12A62 loc_12A03: mov eax, 3 jmp short loc_12A62 loc_12A0A: lea rdi, aDividercharS+11h; ";\n" mov esi, 2 mov edx, 1 call _fwrite loc_12A20: mov cs:_ZN12LefDefParserL12prtSemiColonE, 0; LefDefParser::prtSemiColon movsd xmm0, [rsp+18h+var_10] loc_12A2D: mov rdi, [rbx] cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_12A49 lea rsi, aDiagwidth11g; " DIAGWIDTH %.11g ;\n" mov al, 1 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_12A57 loc_12A49: lea rsi, aDiagwidth11g; " DIAGWIDTH %.11g ;\n" mov al, 1 call _fprintf loc_12A57: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines inc dword ptr [rax] xor eax, eax loc_12A62: add rsp, 10h pop rbx retn
long long LefDefParser::lefwLayerRoutingDiagWidth( LefDefParser *this, double a2, long long a3, long long a4, long long a5, int a6, int a7) { int v7; // ecx unsigned int v8; // edx long long result; // rax v7 = LefDefParser::lefwFile; if ( !*(_QWORD *)&LefDefParser::lefwFile ) return 1LL; v8 = LefDefParser::lefwState; if ( LefDefParser::lefwState == 31 || (result = 2LL, LefDefParser::lefwState == 7) ) { if ( LefDefParser::lefwIsRouting ) { if ( LefDefParser::prtSemiColon == 1 ) { if ( LefDefParser::lefwWriteEncrypt == 1 ) LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)";\n", LefDefParser::lefwState, LefDefParser::lefwFile, a6, a7); else fwrite(";\n", 2LL, 1LL, *(_QWORD *)&LefDefParser::lefwFile); LefDefParser::prtSemiColon = 0; } if ( LefDefParser::lefwWriteEncrypt == 1 ) LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)" DIAGWIDTH %.11g ;\n", v8, v7, a6, a7); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, " DIAGWIDTH %.11g ;\n", a2); ++LefDefParser::lefwLines; return 0LL; } else { return 3LL; } } return result; }
lefwLayerRoutingDiagWidth: PUSH RBX SUB RSP,0x10 LEA RBX,[0x18d0f0] MOV RCX,qword ptr [RBX] TEST RCX,RCX JZ 0x001129fc LEA RAX,[0x18d340] MOV EDX,dword ptr [RAX] CMP EDX,0x1f JZ 0x001129c5 MOV EAX,0x2 CMP EDX,0x7 JNZ 0x00112a62 LAB_001129c5: LEA RAX,[0x18d3b4] CMP dword ptr [RAX],0x0 JZ 0x00112a03 CMP byte ptr [0x0018d3e4],0x1 JNZ 0x00112a2d MOVSD qword ptr [RSP + 0x8],XMM0 CMP byte ptr [0x0018d3dc],0x1 JNZ 0x00112a0a LEA RSI,[0x15a801] MOV RDI,RCX XOR EAX,EAX CALL 0x00155afd JMP 0x00112a20 LAB_001129fc: MOV EAX,0x1 JMP 0x00112a62 LAB_00112a03: MOV EAX,0x3 JMP 0x00112a62 LAB_00112a0a: LEA RDI,[0x15a801] MOV ESI,0x2 MOV EDX,0x1 CALL 0x001023d0 LAB_00112a20: MOV byte ptr [0x0018d3e4],0x0 MOVSD XMM0,qword ptr [RSP + 0x8] LAB_00112a2d: MOV RDI,qword ptr [RBX] CMP byte ptr [0x0018d3dc],0x1 JNZ 0x00112a49 LEA RSI,[0x15ac5f] MOV AL,0x1 CALL 0x00155afd JMP 0x00112a57 LAB_00112a49: LEA RSI,[0x15ac5f] MOV AL,0x1 CALL 0x001022e0 LAB_00112a57: LEA RAX,[0x18d33c] INC dword ptr [RAX] XOR EAX,EAX LAB_00112a62: ADD RSP,0x10 POP RBX RET
/* LefDefParser::lefwLayerRoutingDiagWidth(double) */ int8 LefDefParser::lefwLayerRoutingDiagWidth(double param_1) { int8 uVar1; if (lefwFile == (_IO_FILE *)0x0) { uVar1 = 1; } else if ((lefwState == 0x1f) || (uVar1 = 2, lefwState == 7)) { if (lefwIsRouting == 0) { uVar1 = 3; } else { if (prtSemiColon == '\x01') { if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile,";\n"); } else { fwrite(";\n",2,1,lefwFile); } prtSemiColon = '\0'; } if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile," DIAGWIDTH %.11g ;\n"); } else { fprintf(lefwFile," DIAGWIDTH %.11g ;\n",param_1); } lefwLines = lefwLines + 1; uVar1 = 0; } } return uVar1; }
35,504
my_realloc
eloqsql/mysys/my_malloc.c
void *my_realloc(PSI_memory_key key, void *old_point, size_t size, myf my_flags) { my_memory_header *old_mh, *mh; void *point; size_t old_size; my_bool old_flags; DBUG_ENTER("my_realloc"); DBUG_PRINT("my",("ptr: %p size: %zu flags: %lu", old_point, size, my_flags)); DBUG_ASSERT(size > 0); if (!old_point && (my_flags & MY_ALLOW_ZERO_PTR)) DBUG_RETURN(my_malloc(key, size, my_flags)); old_mh= USER_TO_HEADER(old_point); old_size= old_mh->m_size & ~1; old_flags= old_mh->m_size & 1; DBUG_ASSERT(old_mh->m_key == key || old_mh->m_key == PSI_NOT_INSTRUMENTED); DBUG_ASSERT(old_flags == MY_TEST(my_flags & MY_THREAD_SPECIFIC)); size= ALIGN_SIZE(size); mh= sf_realloc(old_mh, size + HEADER_SIZE, my_flags); if (mh == NULL) { if (size < old_size) DBUG_RETURN(old_point); my_errno=errno; if (my_flags & MY_FREE_ON_ERROR) { /* my_free will take care of size accounting */ my_free(old_point); old_point= 0; } if (my_flags & (MY_FAE+MY_WME)) my_error(EE_OUTOFMEMORY, MYF(ME_BELL + ME_FATAL), size); point= NULL; } else { mh->m_size= size | old_flags; mh->m_key= PSI_CALL_memory_realloc(key, old_size, size, & mh->m_owner); update_malloc_size((longlong)size - (longlong)old_size, old_flags); point= HEADER_TO_USER(mh); } DBUG_PRINT("exit",("ptr: %p", point)); DBUG_RETURN(point); }
O3
c
my_realloc: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %rbx testq %rsi, %rsi setne %al testb $0x40, %cl sete %dl orb %al, %dl je 0x2b694 movq %rsi, %r15 movl %edi, -0x2c(%rbp) movq %rcx, -0x38(%rbp) leaq -0x18(%rsi), %rdi movq -0x10(%rsi), %r12 movq %r12, %r13 andq $-0x2, %r13 addq $0x7, %rbx andq $-0x8, %rbx leaq 0x18(%rbx), %rsi callq 0x24530 testq %rax, %rax je 0x2b6ad movq %rax, %r14 andl $0x1, %r12d movq %r12, %rax orq %rbx, %rax movq %rax, 0x8(%r14) leaq 0x2c41cd(%rip), %rax # 0x2ef830 movq (%rax), %rax movl -0x2c(%rbp), %edi movq %r13, %rsi movq %rbx, %rdx movq %r14, %rcx callq *0x3e8(%rax) movl %eax, 0x10(%r14) subq %r13, %rbx movq %rbx, %rdi movl %r12d, %esi callq *0x2c431d(%rip) # 0x2ef9a8 addq $0x18, %r14 movq %r14, %r15 jmp 0x2b6f0 movq %rbx, %rsi movq %rcx, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x2b4d5 cmpq %r13, %rbx jb 0x2b6f0 callq 0x24050 movl (%rax), %r14d callq 0x2686a movl %r14d, (%rax) movq -0x38(%rbp), %r14 testb %r14b, %r14b jns 0x2b6d3 movq %r15, %rdi callq 0x2b702 xorl %r15d, %r15d testb $0x18, %r14b je 0x2b6f0 movl $0x1004, %esi # imm = 0x1004 movl $0x5, %edi movq %rbx, %rdx xorl %eax, %eax callq 0x2ab8f movq %r15, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_realloc: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdx test rsi, rsi setnz al test cl, 40h setz dl or dl, al jz short loc_2B694 mov r15, rsi mov [rbp+var_2C], edi mov [rbp+var_38], rcx lea rdi, [rsi-18h] mov r12, [rsi-10h] mov r13, r12 and r13, 0FFFFFFFFFFFFFFFEh add rbx, 7 and rbx, 0FFFFFFFFFFFFFFF8h lea rsi, [rbx+18h] call _realloc test rax, rax jz short loc_2B6AD mov r14, rax and r12d, 1 mov rax, r12 or rax, rbx mov [r14+8], rax lea rax, PSI_server mov rax, [rax] mov edi, [rbp+var_2C] mov rsi, r13 mov rdx, rbx mov rcx, r14 call qword ptr [rax+3E8h] mov [r14+10h], eax sub rbx, r13 mov rdi, rbx mov esi, r12d call cs:update_malloc_size add r14, 18h mov r15, r14 jmp short loc_2B6F0 loc_2B694: mov rsi, rbx mov rdx, rcx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp my_malloc loc_2B6AD: cmp rbx, r13 jb short loc_2B6F0 call ___errno_location mov r14d, [rax] call _my_thread_var mov [rax], r14d mov r14, [rbp+var_38] test r14b, r14b jns short loc_2B6D3 mov rdi, r15 call my_free loc_2B6D3: xor r15d, r15d test r14b, 18h jz short loc_2B6F0 mov esi, 1004h mov edi, 5 mov rdx, rbx xor eax, eax call my_error loc_2B6F0: mov rax, r15 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_realloc(unsigned int a1, long long a2, unsigned long long a3, char a4) { long long v4; // r15 long long v5; // r12 unsigned long long v6; // r13 unsigned long long v7; // rbx long long v8; // rax long long v9; // r14 int v11; // r14d if ( a2 == 0 && (a4 & 0x40) != 0 ) return my_malloc(a1, a3, a4); v4 = a2; v5 = *(_QWORD *)(a2 - 16); v6 = v5 & 0xFFFFFFFFFFFFFFFELL; v7 = (a3 + 7) & 0xFFFFFFFFFFFFFFF8LL; v8 = realloc(a2 - 24, v7 + 24); if ( v8 ) { v9 = v8; *(_QWORD *)(v8 + 8) = v7 | v5 & 1; *(_DWORD *)(v8 + 16) = (*((long long ( **)(_QWORD, unsigned long long, unsigned long long, long long))PSI_server[0] + 125))( a1, v6, v7, v8); update_malloc_size[0](); return v9 + 24; } else if ( v7 >= v6 ) { v11 = *(_DWORD *)__errno_location(a2 - 24, v7 + 24); *(_DWORD *)my_thread_var() = v11; if ( a4 < 0 ) my_free(a2); v4 = 0LL; if ( (a4 & 0x18) != 0 ) my_error(5u, 4100, v7); } return v4; }
my_realloc: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDX TEST RSI,RSI SETNZ AL TEST CL,0x40 SETZ DL OR DL,AL JZ 0x0012b694 MOV R15,RSI MOV dword ptr [RBP + -0x2c],EDI MOV qword ptr [RBP + -0x38],RCX LEA RDI,[RSI + -0x18] MOV R12,qword ptr [RSI + -0x10] MOV R13,R12 AND R13,-0x2 ADD RBX,0x7 AND RBX,-0x8 LEA RSI,[RBX + 0x18] CALL 0x00124530 TEST RAX,RAX JZ 0x0012b6ad MOV R14,RAX AND R12D,0x1 MOV RAX,R12 OR RAX,RBX MOV qword ptr [R14 + 0x8],RAX LEA RAX,[0x3ef830] MOV RAX,qword ptr [RAX] MOV EDI,dword ptr [RBP + -0x2c] MOV RSI,R13 MOV RDX,RBX MOV RCX,R14 CALL qword ptr [RAX + 0x3e8] MOV dword ptr [R14 + 0x10],EAX SUB RBX,R13 MOV RDI,RBX MOV ESI,R12D CALL qword ptr [0x003ef9a8] ADD R14,0x18 MOV R15,R14 JMP 0x0012b6f0 LAB_0012b694: MOV RSI,RBX MOV RDX,RCX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0012b4d5 LAB_0012b6ad: CMP RBX,R13 JC 0x0012b6f0 CALL 0x00124050 MOV R14D,dword ptr [RAX] CALL 0x0012686a MOV dword ptr [RAX],R14D MOV R14,qword ptr [RBP + -0x38] TEST R14B,R14B JNS 0x0012b6d3 MOV RDI,R15 CALL 0x0012b702 LAB_0012b6d3: XOR R15D,R15D TEST R14B,0x18 JZ 0x0012b6f0 MOV ESI,0x1004 MOV EDI,0x5 MOV RDX,RBX XOR EAX,EAX CALL 0x0012ab8f LAB_0012b6f0: MOV RAX,R15 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_realloc(ulong param_1,long param_2,long param_3,ulong param_4) { int iVar1; int4 uVar2; void *pvVar3; long lVar4; int *piVar5; ulong uVar6; ulong uVar7; ulong uVar8; if ((param_4 & 0x40) == 0 || param_2 != 0) { uVar7 = *(ulong *)(param_2 + -0x10); uVar8 = uVar7 & 0xfffffffffffffffe; uVar6 = param_3 + 7U & 0xfffffffffffffff8; pvVar3 = realloc((void *)(param_2 + -0x18),uVar6 + 0x18); if (pvVar3 == (void *)0x0) { if (uVar8 <= uVar6) { piVar5 = __errno_location(); iVar1 = *piVar5; piVar5 = (int *)_my_thread_var(); *piVar5 = iVar1; if ((char)param_4 < '\0') { my_free(param_2); } param_2 = 0; if ((param_4 & 0x18) != 0) { my_error(5,0x1004,uVar6); param_2 = 0; } } } else { uVar7 = (ulong)((uint)uVar7 & 1); *(ulong *)((long)pvVar3 + 8) = uVar7 | uVar6; uVar2 = (**(code **)(PSI_server + 1000))(param_1 & 0xffffffff,uVar8,uVar6,pvVar3); *(int4 *)((long)pvVar3 + 0x10) = uVar2; (*(code *)update_malloc_size)(uVar6 - uVar8,uVar7); param_2 = (long)pvVar3 + 0x18; } return param_2; } lVar4 = my_malloc(param_1,param_3,param_4); return lVar4; }
35,505
ma_read_dynamic_record
eloqsql/storage/maria/ma_dynrec.c
int _ma_read_dynamic_record(MARIA_HA *info, uchar *buf, MARIA_RECORD_POS filepos) { int block_of_record; uint b_type; MARIA_BLOCK_INFO block_info; File file; uchar *UNINIT_VAR(to); uint UNINIT_VAR(left_length); MARIA_SHARE *share= info->s; myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0); DBUG_ENTER("_ma_read_dynamic_record"); if (filepos == HA_OFFSET_ERROR) goto err; file= info->dfile.file; block_of_record= 0; /* First block of record is numbered as zero. */ block_info.second_read= 0; do { /* A corrupted table can have wrong pointers. (Bug# 19835) */ if (filepos == HA_OFFSET_ERROR) goto panic; if (info->opt_flag & WRITE_CACHE_USED && (info->rec_cache.pos_in_file < filepos + MARIA_BLOCK_INFO_HEADER_LENGTH) && flush_io_cache(&info->rec_cache)) goto err; info->rec_cache.seek_not_done=1; if ((b_type= _ma_get_block_info(info, &block_info, file, filepos)) & (BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR | BLOCK_FATAL_ERROR)) { if (b_type & (BLOCK_SYNC_ERROR | BLOCK_DELETED)) my_errno=HA_ERR_RECORD_DELETED; goto err; } if (block_of_record++ == 0) /* First block */ { info->cur_row.total_length= block_info.rec_len; if (block_info.rec_len > (uint) share->base.max_pack_length) goto panic; if (share->base.blobs) { if (_ma_alloc_buffer(&info->rec_buff, &info->rec_buff_size, block_info.rec_len + share->base.extra_rec_buff_size, flag)) goto err; } to= info->rec_buff; left_length=block_info.rec_len; } if (left_length < block_info.data_len || ! block_info.data_len) goto panic; /* Wrong linked record */ /* copy information that is already read */ { uint offset= (uint) (block_info.filepos - filepos); uint prefetch_len= (sizeof(block_info.header) - offset); filepos+= sizeof(block_info.header); if (prefetch_len > block_info.data_len) prefetch_len= block_info.data_len; if (prefetch_len) { memcpy(to, block_info.header + offset, prefetch_len); block_info.data_len-= prefetch_len; left_length-= prefetch_len; to+= prefetch_len; } } /* read rest of record from file */ if (block_info.data_len) { if (info->opt_flag & WRITE_CACHE_USED && info->rec_cache.pos_in_file < filepos + block_info.data_len && flush_io_cache(&info->rec_cache)) goto err; /* What a pity that this method is not called 'file_pread' and that there is no equivalent without seeking. We are at the right position already. :( */ if (share->file_read(info, to, block_info.data_len, filepos, MYF(MY_NABP))) goto panic; left_length-=block_info.data_len; to+=block_info.data_len; } filepos= block_info.next_filepos; } while (left_length); info->update|= HA_STATE_AKTIV; /* We have a aktive record */ fast_ma_writeinfo(info); DBUG_RETURN(_ma_rec_unpack(info,buf,info->rec_buff,block_info.rec_len) != MY_FILE_ERROR ? 0 : my_errno); err: fast_ma_writeinfo(info); DBUG_RETURN(my_errno); panic: _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); goto err; }
O0
c
ma_read_dynamic_record: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x70(%rbp) movq %rsi, -0x78(%rbp) movq %rdx, -0x80(%rbp) movq -0x98(%rbp), %rax movq %rax, -0x98(%rbp) movl -0x9c(%rbp), %eax movl %eax, -0x9c(%rbp) movq -0x70(%rbp), %rax movq (%rax), %rax movq %rax, -0xa8(%rbp) movq -0xa8(%rbp), %rax movsbl 0x7d9(%rax), %edx xorl %eax, %eax movl $0x10000, %ecx # imm = 0x10000 cmpl $0x0, %edx cmovnel %ecx, %eax orl $0x10, %eax movl %eax, %eax movq %rax, -0xb0(%rbp) cmpq $-0x1, -0x80(%rbp) jne 0x3fd0f jmp 0x40088 movq -0x70(%rbp), %rax movl 0x480(%rax), %eax movl %eax, -0x8c(%rbp) movl $0x0, -0x84(%rbp) movl $0x0, -0x10(%rbp) cmpq $-0x1, -0x80(%rbp) jne 0x3fd3c jmp 0x400b1 movq -0x70(%rbp), %rax movl 0x61c(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0x3fd85 movq -0x70(%rbp), %rax movq 0x4b8(%rax), %rax movq -0x80(%rbp), %rcx addq $0x14, %rcx cmpq %rcx, %rax jae 0x3fd85 movq -0x70(%rbp), %rdi addq $0x4b8, %rdi # imm = 0x4B8 movl $0x1, %esi callq 0xe0bb0 cmpl $0x0, %eax je 0x3fd85 jmp 0x40088 movq -0x70(%rbp), %rax movl $0x1, 0x598(%rax) movq -0x70(%rbp), %rdi movl -0x8c(%rbp), %edx movq -0x80(%rbp), %rcx leaq -0x60(%rbp), %rsi callq 0x3e0b0 movl %eax, -0x88(%rbp) andl $0x3c, %eax cmpl $0x0, %eax je 0x3fdd6 movl -0x88(%rbp), %eax andl $0x14, %eax cmpl $0x0, %eax je 0x3fdd1 callq 0xf6090 movl $0x86, (%rax) jmp 0x40088 movl -0x84(%rbp), %eax movl %eax, %ecx addl $0x1, %ecx movl %ecx, -0x84(%rbp) cmpl $0x0, %eax jne 0x3fe8a movq -0x48(%rbp), %rcx movq -0x70(%rbp), %rax movq %rcx, 0x110(%rax) movq -0x48(%rbp), %rax movq -0xa8(%rbp), %rcx movq 0x3b0(%rcx), %rcx movl %ecx, %ecx cmpq %rcx, %rax jbe 0x3fe1d jmp 0x400b1 movq -0xa8(%rbp), %rax cmpl $0x0, 0x3f0(%rax) je 0x3fe6e movq -0x70(%rbp), %rdi addq $0x3a0, %rdi # imm = 0x3A0 movq -0x70(%rbp), %rsi addq $0x460, %rsi # imm = 0x460 movq -0x48(%rbp), %rdx movq -0xa8(%rbp), %rax movl 0x424(%rax), %eax addq %rax, %rdx movq -0xb0(%rbp), %rcx callq 0x65490 cmpb $0x0, %al je 0x3fe6c jmp 0x40088 jmp 0x3fe6e movq -0x70(%rbp), %rax movq 0x3a0(%rax), %rax movq %rax, -0x98(%rbp) movq -0x48(%rbp), %rax movl %eax, -0x9c(%rbp) movl -0x9c(%rbp), %eax cmpq -0x40(%rbp), %rax jb 0x3fe9d cmpq $0x0, -0x40(%rbp) jne 0x3fea2 jmp 0x400b1 movq -0x28(%rbp), %rax subq -0x80(%rbp), %rax movl %eax, -0xb4(%rbp) movl -0xb4(%rbp), %eax movl %eax, %ecx movl $0x14, %eax subq %rcx, %rax movl %eax, -0xb8(%rbp) movq -0x80(%rbp), %rax addq $0x14, %rax movq %rax, -0x80(%rbp) movl -0xb8(%rbp), %eax cmpq -0x40(%rbp), %rax jbe 0x3fee8 movq -0x40(%rbp), %rax movl %eax, -0xb8(%rbp) cmpl $0x0, -0xb8(%rbp) je 0x3ff52 movq -0x98(%rbp), %rdi leaq -0x60(%rbp), %rsi movl -0xb4(%rbp), %eax addq %rax, %rsi movl -0xb8(%rbp), %eax movl %eax, %edx callq 0x2a090 movl -0xb8(%rbp), %eax movl %eax, %ecx movq -0x40(%rbp), %rax subq %rcx, %rax movq %rax, -0x40(%rbp) movl -0xb8(%rbp), %ecx movl -0x9c(%rbp), %eax subl %ecx, %eax movl %eax, -0x9c(%rbp) movl -0xb8(%rbp), %ecx movq -0x98(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x98(%rbp) cmpq $0x0, -0x40(%rbp) je 0x3ffff movq -0x70(%rbp), %rax movl 0x61c(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0x3ffa6 movq -0x70(%rbp), %rax movq 0x4b8(%rax), %rax movq -0x80(%rbp), %rcx addq -0x40(%rbp), %rcx cmpq %rcx, %rax jae 0x3ffa6 movq -0x70(%rbp), %rdi addq $0x4b8, %rdi # imm = 0x4B8 movl $0x1, %esi callq 0xe0bb0 cmpl $0x0, %eax je 0x3ffa6 jmp 0x40088 movq -0xa8(%rbp), %rax movq 0x6e0(%rax), %rax movq -0x70(%rbp), %rdi movq -0x98(%rbp), %rsi movq -0x40(%rbp), %rdx movq -0x80(%rbp), %rcx movl $0x4, %r8d callq *%rax cmpq $0x0, %rax je 0x3ffda jmp 0x400b1 movq -0x40(%rbp), %rcx movl -0x9c(%rbp), %eax subq %rcx, %rax movl %eax, -0x9c(%rbp) movq -0x40(%rbp), %rax addq -0x98(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x80(%rbp) cmpl $0x0, -0x9c(%rbp) jne 0x3fd30 movq -0x70(%rbp), %rax movl 0x624(%rax), %ecx orl $0x2, %ecx movl %ecx, 0x624(%rax) movq -0x70(%rbp), %rax movq (%rax), %rax cmpl $0x0, 0x7b8(%rax) jne 0x40042 movq -0x70(%rbp), %rdi xorl %esi, %esi callq 0x35c40 jmp 0x40044 movq -0x70(%rbp), %rdi movq -0x78(%rbp), %rsi movq -0x70(%rbp), %rax movq 0x3a0(%rax), %rdx movq -0x48(%rbp), %rcx callq 0x3f5b0 cmpq $-0x1, %rax je 0x40070 xorl %eax, %eax movl %eax, -0xbc(%rbp) jmp 0x4007d callq 0xf6090 movl (%rax), %eax movl %eax, -0xbc(%rbp) movl -0xbc(%rbp), %eax movl %eax, -0x64(%rbp) jmp 0x400c1 movq -0x70(%rbp), %rax movq (%rax), %rax cmpl $0x0, 0x7b8(%rax) jne 0x400a3 movq -0x70(%rbp), %rdi xorl %esi, %esi callq 0x35c40 jmp 0x400a5 callq 0xf6090 movl (%rax), %eax movl %eax, -0x64(%rbp) jmp 0x400c1 movq -0x70(%rbp), %rdi movl $0x7f, %esi callq 0x33880 jmp 0x40088 movl -0x64(%rbp), %eax movl %eax, -0xc0(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x400eb movl -0xc0(%rbp), %eax addq $0xc0, %rsp popq %rbp retq callq 0x2a270
_ma_read_dynamic_record: push rbp mov rbp, rsp sub rsp, 0C0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_70], rdi mov [rbp+var_78], rsi mov [rbp+var_80], rdx mov rax, [rbp+var_98] mov [rbp+var_98], rax mov eax, [rbp+var_9C] mov [rbp+var_9C], eax mov rax, [rbp+var_70] mov rax, [rax] mov [rbp+var_A8], rax mov rax, [rbp+var_A8] movsx edx, byte ptr [rax+7D9h] xor eax, eax mov ecx, 10000h cmp edx, 0 cmovnz eax, ecx or eax, 10h mov eax, eax mov [rbp+var_B0], rax cmp [rbp+var_80], 0FFFFFFFFFFFFFFFFh jnz short loc_3FD0F jmp loc_40088 loc_3FD0F: mov rax, [rbp+var_70] mov eax, [rax+480h] mov [rbp+var_8C], eax mov [rbp+var_84], 0 mov [rbp+var_10], 0 loc_3FD30: cmp [rbp+var_80], 0FFFFFFFFFFFFFFFFh jnz short loc_3FD3C jmp loc_400B1 loc_3FD3C: mov rax, [rbp+var_70] mov eax, [rax+61Ch] and eax, 10h cmp eax, 0 jz short loc_3FD85 mov rax, [rbp+var_70] mov rax, [rax+4B8h] mov rcx, [rbp+var_80] add rcx, 14h cmp rax, rcx jnb short loc_3FD85 mov rdi, [rbp+var_70] add rdi, 4B8h mov esi, 1 call my_b_flush_io_cache cmp eax, 0 jz short loc_3FD85 jmp loc_40088 loc_3FD85: mov rax, [rbp+var_70] mov dword ptr [rax+598h], 1 mov rdi, [rbp+var_70] mov edx, [rbp+var_8C] mov rcx, [rbp+var_80] lea rsi, [rbp+var_60] call _ma_get_block_info mov [rbp+var_88], eax and eax, 3Ch cmp eax, 0 jz short loc_3FDD6 mov eax, [rbp+var_88] and eax, 14h cmp eax, 0 jz short loc_3FDD1 call _my_thread_var mov dword ptr [rax], 86h loc_3FDD1: jmp loc_40088 loc_3FDD6: mov eax, [rbp+var_84] mov ecx, eax add ecx, 1 mov [rbp+var_84], ecx cmp eax, 0 jnz loc_3FE8A mov rcx, [rbp+var_48] mov rax, [rbp+var_70] mov [rax+110h], rcx mov rax, [rbp+var_48] mov rcx, [rbp+var_A8] mov rcx, [rcx+3B0h] mov ecx, ecx cmp rax, rcx jbe short loc_3FE1D jmp loc_400B1 loc_3FE1D: mov rax, [rbp+var_A8] cmp dword ptr [rax+3F0h], 0 jz short loc_3FE6E mov rdi, [rbp+var_70] add rdi, 3A0h mov rsi, [rbp+var_70] add rsi, 460h mov rdx, [rbp+var_48] mov rax, [rbp+var_A8] mov eax, [rax+424h] add rdx, rax mov rcx, [rbp+var_B0] call _ma_alloc_buffer cmp al, 0 jz short loc_3FE6C jmp loc_40088 loc_3FE6C: jmp short $+2 loc_3FE6E: mov rax, [rbp+var_70] mov rax, [rax+3A0h] mov [rbp+var_98], rax mov rax, [rbp+var_48] mov [rbp+var_9C], eax loc_3FE8A: mov eax, [rbp+var_9C] cmp rax, [rbp+var_40] jb short loc_3FE9D cmp [rbp+var_40], 0 jnz short loc_3FEA2 loc_3FE9D: jmp loc_400B1 loc_3FEA2: mov rax, [rbp+var_28] sub rax, [rbp+var_80] mov [rbp+var_B4], eax mov eax, [rbp+var_B4] mov ecx, eax mov eax, 14h sub rax, rcx mov [rbp+var_B8], eax mov rax, [rbp+var_80] add rax, 14h mov [rbp+var_80], rax mov eax, [rbp+var_B8] cmp rax, [rbp+var_40] jbe short loc_3FEE8 mov rax, [rbp+var_40] mov [rbp+var_B8], eax loc_3FEE8: cmp [rbp+var_B8], 0 jz short loc_3FF52 mov rdi, [rbp+var_98] lea rsi, [rbp+var_60] mov eax, [rbp+var_B4] add rsi, rax mov eax, [rbp+var_B8] mov edx, eax call _memcpy mov eax, [rbp+var_B8] mov ecx, eax mov rax, [rbp+var_40] sub rax, rcx mov [rbp+var_40], rax mov ecx, [rbp+var_B8] mov eax, [rbp+var_9C] sub eax, ecx mov [rbp+var_9C], eax mov ecx, [rbp+var_B8] mov rax, [rbp+var_98] mov ecx, ecx add rax, rcx mov [rbp+var_98], rax loc_3FF52: cmp [rbp+var_40], 0 jz loc_3FFFF mov rax, [rbp+var_70] mov eax, [rax+61Ch] and eax, 10h cmp eax, 0 jz short loc_3FFA6 mov rax, [rbp+var_70] mov rax, [rax+4B8h] mov rcx, [rbp+var_80] add rcx, [rbp+var_40] cmp rax, rcx jnb short loc_3FFA6 mov rdi, [rbp+var_70] add rdi, 4B8h mov esi, 1 call my_b_flush_io_cache cmp eax, 0 jz short loc_3FFA6 jmp loc_40088 loc_3FFA6: mov rax, [rbp+var_A8] mov rax, [rax+6E0h] mov rdi, [rbp+var_70] mov rsi, [rbp+var_98] mov rdx, [rbp+var_40] mov rcx, [rbp+var_80] mov r8d, 4 call rax cmp rax, 0 jz short loc_3FFDA jmp loc_400B1 loc_3FFDA: mov rcx, [rbp+var_40] mov eax, [rbp+var_9C] sub rax, rcx mov [rbp+var_9C], eax mov rax, [rbp+var_40] add rax, [rbp+var_98] mov [rbp+var_98], rax loc_3FFFF: mov rax, [rbp+var_20] mov [rbp+var_80], rax cmp [rbp+var_9C], 0 jnz loc_3FD30 mov rax, [rbp+var_70] mov ecx, [rax+624h] or ecx, 2 mov [rax+624h], ecx mov rax, [rbp+var_70] mov rax, [rax] cmp dword ptr [rax+7B8h], 0 jnz short loc_40042 mov rdi, [rbp+var_70] xor esi, esi call _ma_writeinfo loc_40042: jmp short $+2 loc_40044: mov rdi, [rbp+var_70] mov rsi, [rbp+var_78] mov rax, [rbp+var_70] mov rdx, [rax+3A0h] mov rcx, [rbp+var_48] call _ma_rec_unpack cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_40070 xor eax, eax mov [rbp+var_BC], eax jmp short loc_4007D loc_40070: call _my_thread_var mov eax, [rax] mov [rbp+var_BC], eax loc_4007D: mov eax, [rbp+var_BC] mov [rbp+var_64], eax jmp short loc_400C1 loc_40088: mov rax, [rbp+var_70] mov rax, [rax] cmp dword ptr [rax+7B8h], 0 jnz short loc_400A3 mov rdi, [rbp+var_70] xor esi, esi call _ma_writeinfo loc_400A3: jmp short $+2 loc_400A5: call _my_thread_var mov eax, [rax] mov [rbp+var_64], eax jmp short loc_400C1 loc_400B1: mov rdi, [rbp+var_70] mov esi, 7Fh call _ma_set_fatal_error jmp short loc_40088 loc_400C1: mov eax, [rbp+var_64] mov [rbp+var_C0], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_400EB mov eax, [rbp+var_C0] add rsp, 0C0h pop rbp retn loc_400EB: call ___stack_chk_fail
long long ma_read_dynamic_record(long long a1, unsigned __int8 *a2, long long a3, long long a4, long long a5, int a6) { long long v6; // rdx int v7; // eax unsigned long long v8; // rcx int v9; // eax unsigned int v12; // [rsp+8h] [rbp-B8h] int v13; // [rsp+Ch] [rbp-B4h] long long v14; // [rsp+10h] [rbp-B0h] long long v15; // [rsp+18h] [rbp-A8h] unsigned int v16; // [rsp+24h] [rbp-9Ch] long long v17; // [rsp+28h] [rbp-98h] unsigned int v18; // [rsp+34h] [rbp-8Ch] char block_info; // [rsp+38h] [rbp-88h] int v20; // [rsp+3Ch] [rbp-84h] long long v22; // [rsp+40h] [rbp-80h] unsigned __int8 v24[24]; // [rsp+60h] [rbp-60h] BYREF unsigned long long v25; // [rsp+78h] [rbp-48h] unsigned long long v26; // [rsp+80h] [rbp-40h] long long v27; // [rsp+98h] [rbp-28h] long long v28; // [rsp+A0h] [rbp-20h] int v29; // [rsp+B0h] [rbp-10h] unsigned long long v30; // [rsp+B8h] [rbp-8h] v30 = __readfsqword(0x28u); v15 = *(_QWORD *)a1; v6 = (unsigned int)*(char *)(*(_QWORD *)a1 + 2009LL); v7 = 0; v8 = 0x10000LL; if ( *(_BYTE *)(*(_QWORD *)a1 + 2009LL) ) v7 = 0x10000; v14 = v7 | 0x10u; if ( a3 == -1 ) { LABEL_38: if ( !*(_DWORD *)(*(_QWORD *)a1 + 1976LL) ) ma_writeinfo((long long *)a1, 0); return *(unsigned int *)my_thread_var(); } else { v18 = *(_DWORD *)(a1 + 1152); v20 = 0; v29 = 0; do { if ( a3 == -1 ) { LABEL_41: ma_set_fatal_error((_DWORD *)a1, 127, v6, v8, a5, a6); goto LABEL_38; } if ( (*(_DWORD *)(a1 + 1564) & 0x10) != 0 && *(_QWORD *)(a1 + 1208) < (unsigned long long)(a3 + 20) && (unsigned int)my_b_flush_io_cache(a1 + 1208, 1LL) ) { goto LABEL_38; } *(_DWORD *)(a1 + 1432) = 1; block_info = ma_get_block_info(a1, v24, v18, a3, a5, a6); if ( (block_info & 0x3C) != 0 ) { if ( (block_info & 0x14) != 0 ) *(_DWORD *)my_thread_var() = 134; goto LABEL_38; } v9 = v20; v8 = (unsigned int)++v20; if ( !v9 ) { *(_QWORD *)(a1 + 272) = v25; v8 = (unsigned int)*(_QWORD *)(v15 + 944); if ( v25 > v8 ) goto LABEL_41; if ( *(_DWORD *)(v15 + 1008) && (unsigned __int8)ma_alloc_buffer(a1 + 928, a1 + 1120, *(unsigned int *)(v15 + 1060) + v25, v14) ) { goto LABEL_38; } v17 = *(_QWORD *)(a1 + 928); v16 = v25; } if ( v16 < v26 || !v26 ) goto LABEL_41; v13 = v27 - a3; v8 = (unsigned int)(v27 - a3); v12 = 20 - v8; v22 = a3 + 20; if ( (unsigned int)(20 - v8) > v26 ) v12 = v26; if ( v12 ) { memcpy(v17, &v24[v13], v12); v26 -= v12; v16 -= v12; v8 = v12; v17 += v12; } if ( v26 ) { if ( (*(_DWORD *)(a1 + 1564) & 0x10) != 0 && *(_QWORD *)(a1 + 1208) < v26 + v22 && (unsigned int)my_b_flush_io_cache(a1 + 1208, 1LL) ) { goto LABEL_38; } if ( (*(long long ( **)(long long, long long, unsigned long long, long long, long long))(v15 + 1760))( a1, v17, v26, v22, 4LL) ) { goto LABEL_41; } v8 = v26; v16 -= v26; v17 += v26; } a3 = v28; } while ( v16 ); *(_DWORD *)(a1 + 1572) |= 2u; if ( !*(_DWORD *)(*(_QWORD *)a1 + 1976LL) ) ma_writeinfo((long long *)a1, 0); if ( ma_rec_unpack((_DWORD *)a1, a2, *(_QWORD *)(a1 + 928), v25, a5, a6) == -1 ) return *(unsigned int *)my_thread_var(); else return 0; } }
_ma_read_dynamic_record: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x70],RDI MOV qword ptr [RBP + -0x78],RSI MOV qword ptr [RBP + -0x80],RDX MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x98],RAX MOV EAX,dword ptr [RBP + -0x9c] MOV dword ptr [RBP + -0x9c],EAX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0xa8],RAX MOV RAX,qword ptr [RBP + -0xa8] MOVSX EDX,byte ptr [RAX + 0x7d9] XOR EAX,EAX MOV ECX,0x10000 CMP EDX,0x0 CMOVNZ EAX,ECX OR EAX,0x10 MOV EAX,EAX MOV qword ptr [RBP + -0xb0],RAX CMP qword ptr [RBP + -0x80],-0x1 JNZ 0x0013fd0f JMP 0x00140088 LAB_0013fd0f: MOV RAX,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RAX + 0x480] MOV dword ptr [RBP + -0x8c],EAX MOV dword ptr [RBP + -0x84],0x0 MOV dword ptr [RBP + -0x10],0x0 LAB_0013fd30: CMP qword ptr [RBP + -0x80],-0x1 JNZ 0x0013fd3c JMP 0x001400b1 LAB_0013fd3c: MOV RAX,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RAX + 0x61c] AND EAX,0x10 CMP EAX,0x0 JZ 0x0013fd85 MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x4b8] MOV RCX,qword ptr [RBP + -0x80] ADD RCX,0x14 CMP RAX,RCX JNC 0x0013fd85 MOV RDI,qword ptr [RBP + -0x70] ADD RDI,0x4b8 MOV ESI,0x1 CALL 0x001e0bb0 CMP EAX,0x0 JZ 0x0013fd85 JMP 0x00140088 LAB_0013fd85: MOV RAX,qword ptr [RBP + -0x70] MOV dword ptr [RAX + 0x598],0x1 MOV RDI,qword ptr [RBP + -0x70] MOV EDX,dword ptr [RBP + -0x8c] MOV RCX,qword ptr [RBP + -0x80] LEA RSI,[RBP + -0x60] CALL 0x0013e0b0 MOV dword ptr [RBP + -0x88],EAX AND EAX,0x3c CMP EAX,0x0 JZ 0x0013fdd6 MOV EAX,dword ptr [RBP + -0x88] AND EAX,0x14 CMP EAX,0x0 JZ 0x0013fdd1 CALL 0x001f6090 MOV dword ptr [RAX],0x86 LAB_0013fdd1: JMP 0x00140088 LAB_0013fdd6: MOV EAX,dword ptr [RBP + -0x84] MOV ECX,EAX ADD ECX,0x1 MOV dword ptr [RBP + -0x84],ECX CMP EAX,0x0 JNZ 0x0013fe8a MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RAX + 0x110],RCX MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0xa8] MOV RCX,qword ptr [RCX + 0x3b0] MOV ECX,ECX CMP RAX,RCX JBE 0x0013fe1d JMP 0x001400b1 LAB_0013fe1d: MOV RAX,qword ptr [RBP + -0xa8] CMP dword ptr [RAX + 0x3f0],0x0 JZ 0x0013fe6e MOV RDI,qword ptr [RBP + -0x70] ADD RDI,0x3a0 MOV RSI,qword ptr [RBP + -0x70] ADD RSI,0x460 MOV RDX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0xa8] MOV EAX,dword ptr [RAX + 0x424] ADD RDX,RAX MOV RCX,qword ptr [RBP + -0xb0] CALL 0x00165490 CMP AL,0x0 JZ 0x0013fe6c JMP 0x00140088 LAB_0013fe6c: JMP 0x0013fe6e LAB_0013fe6e: MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x3a0] MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x48] MOV dword ptr [RBP + -0x9c],EAX LAB_0013fe8a: MOV EAX,dword ptr [RBP + -0x9c] CMP RAX,qword ptr [RBP + -0x40] JC 0x0013fe9d CMP qword ptr [RBP + -0x40],0x0 JNZ 0x0013fea2 LAB_0013fe9d: JMP 0x001400b1 LAB_0013fea2: MOV RAX,qword ptr [RBP + -0x28] SUB RAX,qword ptr [RBP + -0x80] MOV dword ptr [RBP + -0xb4],EAX MOV EAX,dword ptr [RBP + -0xb4] MOV ECX,EAX MOV EAX,0x14 SUB RAX,RCX MOV dword ptr [RBP + -0xb8],EAX MOV RAX,qword ptr [RBP + -0x80] ADD RAX,0x14 MOV qword ptr [RBP + -0x80],RAX MOV EAX,dword ptr [RBP + -0xb8] CMP RAX,qword ptr [RBP + -0x40] JBE 0x0013fee8 MOV RAX,qword ptr [RBP + -0x40] MOV dword ptr [RBP + -0xb8],EAX LAB_0013fee8: CMP dword ptr [RBP + -0xb8],0x0 JZ 0x0013ff52 MOV RDI,qword ptr [RBP + -0x98] LEA RSI,[RBP + -0x60] MOV EAX,dword ptr [RBP + -0xb4] ADD RSI,RAX MOV EAX,dword ptr [RBP + -0xb8] MOV EDX,EAX CALL 0x0012a090 MOV EAX,dword ptr [RBP + -0xb8] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x40] SUB RAX,RCX MOV qword ptr [RBP + -0x40],RAX MOV ECX,dword ptr [RBP + -0xb8] MOV EAX,dword ptr [RBP + -0x9c] SUB EAX,ECX MOV dword ptr [RBP + -0x9c],EAX MOV ECX,dword ptr [RBP + -0xb8] MOV RAX,qword ptr [RBP + -0x98] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x98],RAX LAB_0013ff52: CMP qword ptr [RBP + -0x40],0x0 JZ 0x0013ffff MOV RAX,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RAX + 0x61c] AND EAX,0x10 CMP EAX,0x0 JZ 0x0013ffa6 MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x4b8] MOV RCX,qword ptr [RBP + -0x80] ADD RCX,qword ptr [RBP + -0x40] CMP RAX,RCX JNC 0x0013ffa6 MOV RDI,qword ptr [RBP + -0x70] ADD RDI,0x4b8 MOV ESI,0x1 CALL 0x001e0bb0 CMP EAX,0x0 JZ 0x0013ffa6 JMP 0x00140088 LAB_0013ffa6: MOV RAX,qword ptr [RBP + -0xa8] MOV RAX,qword ptr [RAX + 0x6e0] MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x98] MOV RDX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x80] MOV R8D,0x4 CALL RAX CMP RAX,0x0 JZ 0x0013ffda JMP 0x001400b1 LAB_0013ffda: MOV RCX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + -0x9c] SUB RAX,RCX MOV dword ptr [RBP + -0x9c],EAX MOV RAX,qword ptr [RBP + -0x40] ADD RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x98],RAX LAB_0013ffff: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x80],RAX CMP dword ptr [RBP + -0x9c],0x0 JNZ 0x0013fd30 MOV RAX,qword ptr [RBP + -0x70] MOV ECX,dword ptr [RAX + 0x624] OR ECX,0x2 MOV dword ptr [RAX + 0x624],ECX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0x7b8],0x0 JNZ 0x00140042 MOV RDI,qword ptr [RBP + -0x70] XOR ESI,ESI CALL 0x00135c40 LAB_00140042: JMP 0x00140044 LAB_00140044: MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x70] MOV RDX,qword ptr [RAX + 0x3a0] MOV RCX,qword ptr [RBP + -0x48] CALL 0x0013f5b0 CMP RAX,-0x1 JZ 0x00140070 XOR EAX,EAX MOV dword ptr [RBP + -0xbc],EAX JMP 0x0014007d LAB_00140070: CALL 0x001f6090 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0xbc],EAX LAB_0014007d: MOV EAX,dword ptr [RBP + -0xbc] MOV dword ptr [RBP + -0x64],EAX JMP 0x001400c1 LAB_00140088: MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0x7b8],0x0 JNZ 0x001400a3 MOV RDI,qword ptr [RBP + -0x70] XOR ESI,ESI CALL 0x00135c40 LAB_001400a3: JMP 0x001400a5 LAB_001400a5: CALL 0x001f6090 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x64],EAX JMP 0x001400c1 LAB_001400b1: MOV RDI,qword ptr [RBP + -0x70] MOV ESI,0x7f CALL 0x00133880 JMP 0x00140088 LAB_001400c1: MOV EAX,dword ptr [RBP + -0x64] MOV dword ptr [RBP + -0xc0],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001400eb MOV EAX,dword ptr [RBP + -0xc0] ADD RSP,0xc0 POP RBP RET LAB_001400eb: CALL 0x0012a270
int4 _ma_read_dynamic_record(long *param_1,int8 param_2,long param_3) { long lVar1; char cVar2; uint uVar3; int iVar4; uint uVar5; long lVar6; long lVar7; int4 *puVar8; long in_FS_OFFSET; int4 local_c4; uint local_c0; uint local_a4; void *local_a0; int local_8c; long local_88; int4 local_6c; int1 local_68 [24]; ulong local_50; ulong local_48; int8 local_30; long local_28; int4 local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); lVar7 = *param_1; uVar3 = 0; if (*(char *)(lVar7 + 0x7d9) != '\0') { uVar3 = 0x10000; } if (param_3 == -1) { LAB_00140088: if (*(int *)(*param_1 + 0x7b8) == 0) { _ma_writeinfo(param_1,0); } puVar8 = (int4 *)_my_thread_var(); local_6c = *puVar8; } else { lVar1 = param_1[0x90]; local_8c = 0; local_18 = 0; local_88 = param_3; do { if (local_88 == -1) { LAB_001400b1: _ma_set_fatal_error(param_1,0x7f); goto LAB_00140088; } if ((((*(uint *)((long)param_1 + 0x61c) & 0x10) != 0) && ((ulong)param_1[0x97] < local_88 + 0x14U)) && (iVar4 = my_b_flush_io_cache(param_1 + 0x97,1), iVar4 != 0)) goto LAB_00140088; *(int4 *)(param_1 + 0xb3) = 1; uVar5 = _ma_get_block_info(param_1,local_68,(int)lVar1,local_88); if ((uVar5 & 0x3c) != 0) { if ((uVar5 & 0x14) != 0) { puVar8 = (int4 *)_my_thread_var(); *puVar8 = 0x86; } goto LAB_00140088; } if (local_8c == 0) { param_1[0x22] = local_50; if ((*(ulong *)(lVar7 + 0x3b0) & 0xffffffff) < local_50) goto LAB_001400b1; if ((*(int *)(lVar7 + 0x3f0) != 0) && (cVar2 = _ma_alloc_buffer(param_1 + 0x74,param_1 + 0x8c, local_50 + *(uint *)(lVar7 + 0x424),uVar3 | 0x10), cVar2 != '\0')) goto LAB_00140088; local_a0 = (void *)param_1[0x74]; local_a4 = (uint)local_50; } if ((local_a4 < local_48) || (local_48 == 0)) goto LAB_001400b1; uVar5 = (int)local_30 - (int)local_88; local_c0 = 0x14 - uVar5; if (local_48 < local_c0) { local_c0 = (uint)local_48; } if (local_c0 != 0) { memcpy(local_a0,local_68 + uVar5,(ulong)local_c0); local_48 = local_48 - local_c0; local_a4 = local_a4 - local_c0; local_a0 = (void *)((long)local_a0 + (ulong)local_c0); } if (local_48 != 0) { if ((((*(uint *)((long)param_1 + 0x61c) & 0x10) != 0) && ((ulong)param_1[0x97] < local_88 + 0x14 + local_48)) && (iVar4 = my_b_flush_io_cache(param_1 + 0x97,1), iVar4 != 0)) goto LAB_00140088; lVar6 = (**(code **)(lVar7 + 0x6e0))(param_1,local_a0,local_48,local_88 + 0x14,4); if (lVar6 != 0) goto LAB_001400b1; local_a4 = local_a4 - (int)local_48; local_a0 = (void *)(local_48 + (long)local_a0); } local_88 = local_28; local_8c = local_8c + 1; } while (local_a4 != 0); *(uint *)((long)param_1 + 0x624) = *(uint *)((long)param_1 + 0x624) | 2; if (*(int *)(*param_1 + 0x7b8) == 0) { _ma_writeinfo(param_1,0); } lVar7 = _ma_rec_unpack(param_1,param_2,param_1[0x74],local_50); if (lVar7 == -1) { puVar8 = (int4 *)_my_thread_var(); local_c4 = *puVar8; } else { local_c4 = 0; } local_6c = local_c4; } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_6c; }
35,506
void mcp::logger::log_impl<char const*>(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>>&, char const*&&)
hkr04[P]cpp-mcp/include/mcp_logger.h
void log_impl(std::stringstream& ss, T&& arg) { ss << std::forward<T>(arg); }
O3
c
void mcp::logger::log_impl<char const*>(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>>&, char const*&&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx addq $0x10, %rbx movq (%rdx), %r14 testq %r14, %r14 je 0x4279c movq %r14, %rdi callq 0xa2b0 movq %rbx, %rdi movq %r14, %rsi movq %rax, %rdx addq $0x8, %rsp popq %rbx popq %r14 jmp 0xa6f0 movq (%rbx), %rax movq -0x18(%rax), %rax leaq (%rbx,%rax), %rdi movl 0x20(%rbx,%rax), %esi orl $0x1, %esi addq $0x8, %rsp popq %rbx popq %r14 jmp 0xa9c0
_ZN3mcp6logger8log_implIPKcEEvRNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEEOT_: push r14 push rbx push rax mov rbx, rsi add rbx, 10h mov r14, [rdx] test r14, r14 jz short loc_4279C mov rdi, r14 call _strlen mov rdi, rbx mov rsi, r14 mov rdx, rax add rsp, 8 pop rbx pop r14 jmp __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_4279C: mov rax, [rbx] mov rax, [rax-18h] lea rdi, [rbx+rax] mov esi, [rbx+rax+20h] or esi, 1 add rsp, 8 pop rbx pop r14 jmp __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate)
long long mcp::logger::log_impl<char const*>(long long a1, long long a2, _QWORD *a3) { long long v3; // r14 long long v4; // rax v3 = *a3; if ( !*a3 ) return std::ios::clear( a2 + 16 + *(_QWORD *)(*(_QWORD *)(a2 + 16) - 24LL), *(_DWORD *)(a2 + 16 + *(_QWORD *)(*(_QWORD *)(a2 + 16) - 24LL) + 32) | 1u); v4 = strlen(*a3); return std::__ostream_insert<char,std::char_traits<char>>(a2 + 16, v3, v4); }
log_impl<char_const*>: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI ADD RBX,0x10 MOV R14,qword ptr [RDX] TEST R14,R14 JZ 0x0014279c MOV RDI,R14 CALL 0x0010a2b0 MOV RDI,RBX MOV RSI,R14 MOV RDX,RAX ADD RSP,0x8 POP RBX POP R14 JMP 0x0010a6f0 LAB_0014279c: MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX + -0x18] LEA RDI,[RBX + RAX*0x1] MOV ESI,dword ptr [RBX + RAX*0x1 + 0x20] OR ESI,0x1 ADD RSP,0x8 POP RBX POP R14 JMP 0x0010a9c0
/* void mcp::logger::log_impl<char const*>(std::__cxx11::stringstream&, char const*&&) */ void __thiscall mcp::logger::log_impl<char_const*>(logger *this,stringstream *param_1,char **param_2) { char *__s; size_t sVar1; ostream *poVar2; poVar2 = (ostream *)(param_1 + 0x10); __s = *param_2; if (__s != (char *)0x0) { sVar1 = strlen(__s); std::__ostream_insert<char,std::char_traits<char>>(poVar2,__s,sVar1); return; } std::ios::clear(poVar2 + *(long *)(*(long *)poVar2 + -0x18), *(uint *)(param_1 + *(long *)(*(long *)poVar2 + -0x18) + 0x30) | 1); return; }
35,507
mysql_mbcharlen_utf8
eloqsql/libmariadb/libmariadb/ma_charset.c
static unsigned int mysql_mbcharlen_utf8(unsigned int utf8) { if (utf8 < 0x80) { return 1; /* single byte character */ } if (utf8 < 0xC2) { return 0; /* invalid multibyte header */ } if (utf8 < 0xE0) { return 2; /* double byte character */ } if (utf8 < 0xF0) { return 3; /* triple byte character */ } if (utf8 < 0xF8) { return 4; /* four byte character */ } return 0; }
O0
c
mysql_mbcharlen_utf8: pushq %rbp movq %rsp, %rbp movl %edi, -0x8(%rbp) cmpl $0x80, -0x8(%rbp) jae 0x4b8f9 movl $0x1, -0x4(%rbp) jmp 0x4b948 cmpl $0xc2, -0x8(%rbp) jae 0x4b90b movl $0x0, -0x4(%rbp) jmp 0x4b948 cmpl $0xe0, -0x8(%rbp) jae 0x4b91d movl $0x2, -0x4(%rbp) jmp 0x4b948 cmpl $0xf0, -0x8(%rbp) jae 0x4b92f movl $0x3, -0x4(%rbp) jmp 0x4b948 cmpl $0xf8, -0x8(%rbp) jae 0x4b941 movl $0x4, -0x4(%rbp) jmp 0x4b948 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax)
mysql_mbcharlen_utf8: push rbp mov rbp, rsp mov [rbp+var_8], edi cmp [rbp+var_8], 80h jnb short loc_4B8F9 mov [rbp+var_4], 1 jmp short loc_4B948 loc_4B8F9: cmp [rbp+var_8], 0C2h jnb short loc_4B90B mov [rbp+var_4], 0 jmp short loc_4B948 loc_4B90B: cmp [rbp+var_8], 0E0h jnb short loc_4B91D mov [rbp+var_4], 2 jmp short loc_4B948 loc_4B91D: cmp [rbp+var_8], 0F0h jnb short loc_4B92F mov [rbp+var_4], 3 jmp short loc_4B948 loc_4B92F: cmp [rbp+var_8], 0F8h jnb short loc_4B941 mov [rbp+var_4], 4 jmp short loc_4B948 loc_4B941: mov [rbp+var_4], 0 loc_4B948: mov eax, [rbp+var_4] pop rbp retn
long long mysql_mbcharlen_utf8(unsigned int a1) { if ( a1 >= 0x80 ) { if ( a1 >= 0xC2 ) { if ( a1 >= 0xE0 ) { if ( a1 >= 0xF0 ) { if ( a1 >= 0xF8 ) return 0; else return 4; } else { return 3; } } else { return 2; } } else { return 0; } } else { return 1; } }
mysql_mbcharlen_utf8: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI CMP dword ptr [RBP + -0x8],0x80 JNC 0x0014b8f9 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0014b948 LAB_0014b8f9: CMP dword ptr [RBP + -0x8],0xc2 JNC 0x0014b90b MOV dword ptr [RBP + -0x4],0x0 JMP 0x0014b948 LAB_0014b90b: CMP dword ptr [RBP + -0x8],0xe0 JNC 0x0014b91d MOV dword ptr [RBP + -0x4],0x2 JMP 0x0014b948 LAB_0014b91d: CMP dword ptr [RBP + -0x8],0xf0 JNC 0x0014b92f MOV dword ptr [RBP + -0x4],0x3 JMP 0x0014b948 LAB_0014b92f: CMP dword ptr [RBP + -0x8],0xf8 JNC 0x0014b941 MOV dword ptr [RBP + -0x4],0x4 JMP 0x0014b948 LAB_0014b941: MOV dword ptr [RBP + -0x4],0x0 LAB_0014b948: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 mysql_mbcharlen_utf8(uint param_1) { int4 local_c; if (param_1 < 0x80) { local_c = 1; } else if (param_1 < 0xc2) { local_c = 0; } else if (param_1 < 0xe0) { local_c = 2; } else if (param_1 < 0xf0) { local_c = 3; } else if (param_1 < 0xf8) { local_c = 4; } else { local_c = 0; } return local_c; }
35,508
get_charsets_dir
eloqsql/mysys/charset.c
char *get_charsets_dir(char *buf) { const char *sharedir= SHAREDIR; char *res; DBUG_ENTER("get_charsets_dir"); if (charsets_dir != NULL) strmake(buf, charsets_dir, FN_REFLEN-1); else { if (test_if_hard_path(sharedir) || is_prefix(sharedir, DEFAULT_CHARSET_HOME)) strxmov(buf, sharedir, "/", CHARSET_DIR, NullS); else strxmov(buf, DEFAULT_CHARSET_HOME, "/", sharedir, "/", CHARSET_DIR, NullS); } res= convert_dirname(buf,buf,NullS); DBUG_PRINT("info",("charsets dir: '%s'", buf)); DBUG_RETURN(res); }
O0
c
get_charsets_dir: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) leaq 0x7fdf3(%rip), %rax # 0x15c776 movq %rax, -0x10(%rbp) leaq 0xba8c82(%rip), %rax # 0xc85610 cmpq $0x0, (%rax) je 0xdc9ae movq -0x8(%rbp), %rdi leaq 0xba8c71(%rip), %rax # 0xc85610 movq (%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x156240 jmp 0xdca28 movq -0x10(%rbp), %rdi callq 0xf4ed0 cmpl $0x0, %eax jne 0xdc9d1 movq -0x10(%rbp), %rdi leaq 0x7fdc8(%rip), %rsi # 0x15c78f callq 0x152a30 cmpl $0x0, %eax je 0xdc9f5 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi leaq 0x81efd(%rip), %rdx # 0x15e8dd leaq 0x7fdbb(%rip), %rcx # 0x15c7a2 xorl %eax, %eax movl %eax, %r8d movb $0x0, %al callq 0x156320 jmp 0xdca26 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rcx leaq 0x7fd8b(%rip), %rsi # 0x15c78f leaq 0x81ed2(%rip), %r8 # 0x15e8dd leaq 0x7fd90(%rip), %r9 # 0x15c7a2 xorl %eax, %eax movq %r8, %rdx movq $0x0, (%rsp) movb $0x0, %al callq 0x156320 jmp 0xdca28 movq -0x8(%rbp), %rdi movq -0x8(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0xe09d0 movq %rax, -0x18(%rbp) jmp 0xdca3f jmp 0xdca41 movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
get_charsets_dir: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi lea rax, aHomeMonoInstal; "/home/mono/install/share" mov [rbp+var_10], rax lea rax, charsets_dir cmp qword ptr [rax], 0 jz short loc_DC9AE mov rdi, [rbp+var_8] lea rax, charsets_dir mov rsi, [rax] mov edx, 1FFh call strmake jmp short loc_DCA28 loc_DC9AE: mov rdi, [rbp+var_10] call test_if_hard_path cmp eax, 0 jnz short loc_DC9D1 mov rdi, [rbp+var_10] lea rsi, aHomeMonoInstal_0; "/home/mono/install" call is_prefix cmp eax, 0 jz short loc_DC9F5 loc_DC9D1: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] lea rdx, word_15E8DD lea rcx, aCharsets; "charsets/" xor eax, eax mov r8d, eax mov al, 0 call strxmov jmp short loc_DCA26 loc_DC9F5: mov rdi, [rbp+var_8] mov rcx, [rbp+var_10] lea rsi, aHomeMonoInstal_0; "/home/mono/install" lea r8, word_15E8DD lea r9, aCharsets; "charsets/" xor eax, eax mov rdx, r8 mov [rsp+30h+var_30], 0 mov al, 0 call strxmov loc_DCA26: jmp short $+2 loc_DCA28: mov rdi, [rbp+var_8] mov rsi, [rbp+var_8] xor eax, eax mov edx, eax call convert_dirname mov [rbp+var_18], rax jmp short $+2 loc_DCA3F: jmp short $+2 loc_DCA41: mov rax, [rbp+var_18] mov [rbp+var_20], rax mov rax, [rbp+var_20] add rsp, 30h pop rbp retn
long long get_charsets_dir(long long a1) { int v1; // r9d if ( charsets_dir ) { strmake(a1, charsets_dir, 511LL); } else if ( (unsigned int)test_if_hard_path("/home/mono/install/share") || (unsigned int)is_prefix("/home/mono/install/share", "/home/mono/install") ) { strxmov(a1, (unsigned int)"/home/mono/install/share", (unsigned int)&word_15E8DD, (unsigned int)"charsets/", 0, v1); } else { strxmov( a1, (unsigned int)"/home/mono/install", (unsigned int)&word_15E8DD, (unsigned int)"/home/mono/install/share", (unsigned int)&word_15E8DD, (unsigned int)"charsets/", 0LL); } return convert_dirname(a1, a1, 0LL); }
get_charsets_dir: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI LEA RAX,[0x25c776] MOV qword ptr [RBP + -0x10],RAX LEA RAX,[0xd85610] CMP qword ptr [RAX],0x0 JZ 0x001dc9ae MOV RDI,qword ptr [RBP + -0x8] LEA RAX,[0xd85610] MOV RSI,qword ptr [RAX] MOV EDX,0x1ff CALL 0x00256240 JMP 0x001dca28 LAB_001dc9ae: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001f4ed0 CMP EAX,0x0 JNZ 0x001dc9d1 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x25c78f] CALL 0x00252a30 CMP EAX,0x0 JZ 0x001dc9f5 LAB_001dc9d1: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[0x25e8dd] LEA RCX,[0x25c7a2] XOR EAX,EAX MOV R8D,EAX MOV AL,0x0 CALL 0x00256320 JMP 0x001dca26 LAB_001dc9f5: MOV RDI,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x10] LEA RSI,[0x25c78f] LEA R8,[0x25e8dd] LEA R9,[0x25c7a2] XOR EAX,EAX MOV RDX,R8 MOV qword ptr [RSP],0x0 MOV AL,0x0 CALL 0x00256320 LAB_001dca26: JMP 0x001dca28 LAB_001dca28: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x8] XOR EAX,EAX MOV EDX,EAX CALL 0x001e09d0 MOV qword ptr [RBP + -0x18],RAX JMP 0x001dca3f LAB_001dca3f: JMP 0x001dca41 LAB_001dca41: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RSP,0x30 POP RBP RET
int8 get_charsets_dir(int8 param_1) { int iVar1; int8 uVar2; if (charsets_dir == 0) { iVar1 = test_if_hard_path("/home/mono/install/share"); if ((iVar1 == 0) && (iVar1 = is_prefix("/home/mono/install/share","/home/mono/install"), iVar1 == 0)) { strxmov(param_1,"/home/mono/install",&DAT_0025e8dd,"/home/mono/install/share",&DAT_0025e8dd, "charsets/",0); } else { strxmov(param_1,"/home/mono/install/share",&DAT_0025e8dd,"charsets/",0); } } else { strmake(param_1,charsets_dir,0x1ff); } uVar2 = convert_dirname(param_1,param_1,0); return uVar2; }
35,509
void nlohmann::json_abi_v3_11_3::detail::from_json<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> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::boolean_t&)
llama.cpp/common/json.hpp
inline void from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b) { if (JSON_HEDLEY_UNLIKELY(!j.is_boolean())) { JSON_THROW(type_error::create(302, concat("type must be boolean, but is ", j.type_name()), &j)); } b = *j.template get_ptr<const typename BasicJsonType::boolean_t*>(); }
O3
cpp
void nlohmann::json_abi_v3_11_3::detail::from_json<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> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::boolean_t&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x4, (%rdi) jne 0x646c2 movb 0x8(%r14), %al movb %al, (%rsi) addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x20, %edi callq 0x1d520 movq %rax, %rbx movq %r14, %rdi callq 0x607fe leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x6e205(%rip), %rsi # 0xd28eb leaq 0x10(%rsp), %rdi callq 0x64758 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0x60626 xorl %ebp, %ebp leaq 0xa47af(%rip), %rsi # 0x108ec0 leaq -0x3b3fa(%rip), %rdx # 0x2931e movq %rbx, %rdi callq 0x1d890 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x6473e movq 0x20(%rsp), %rsi incq %rsi callq 0x1d160 testb %bpl, %bpl jne 0x64748 jmp 0x64750 movq %rax, %r14 movq %rbx, %rdi callq 0x1dc90 movq %r14, %rdi callq 0x1d8e0
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_9boolean_tE: push rbp; void * push r14; int push rbx; __int64 sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 4 jnz short loc_646C2 mov al, [r14+8] mov [rsi], al add rsp, 30h pop rbx pop r14 pop rbp retn loc_646C2: 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, aTypeMustBeBool; "type must be boolean, but is " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA30_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[30],char const*>(char const(&)[30],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Eh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_6473E mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6473E: test bpl, bpl jnz short loc_64748 jmp short loc_64750 mov r14, rax loc_64748: mov rdi, rbx; void * call ___cxa_free_exception loc_64750: mov rdi, r14 call __Unwind_Resume
unsigned __int8 nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( unsigned __int8 *a1, unsigned __int8 *a2) { unsigned __int8 result; // al nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx _QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF if ( *a1 != 4 ) { 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(a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[30],char const*>( v4, "type must be boolean, but is "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 302, v4); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } result = a1[8]; *a2 = result; return result; }
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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 R14,RDI CMP byte ptr [RDI],0x4 JNZ 0x001646c2 MOV AL,byte ptr [R14 + 0x8] MOV byte ptr [RSI],AL ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_001646c2: MOV EDI,0x20 CALL 0x0011d520 MOV RBX,RAX MOV RDI,R14 CALL 0x001607fe LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_001646df: LEA RSI,[0x1d28eb] LEA RDI,[RSP + 0x10] CALL 0x00164758 MOV BPL,0x1 LAB_001646f3: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12e MOV RCX,R14 CALL 0x00160626 XOR EBP,EBP LEA RSI,[0x208ec0] LEA RDX,[0x12931e] MOV RDI,RBX CALL 0x0011d890
/* void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::boolean_t&) */ void nlohmann::json_abi_v3_11_3::detail:: from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (basic_json *param_1,boolean_t *param_2) { int8 uVar1; char *local_40; detail local_38 [32]; if (*param_1 == (basic_json)0x4) { *param_2 = *(boolean_t *)(param_1 + 8); return; } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)param_1); /* try { // try from 001646df to 001646ef has its CatchHandler @ 00164745 */ concat<std::__cxx11::string,char_const(&)[30],char_const*> (local_38,"type must be boolean, but is ",&local_40); /* try { // try from 001646f3 to 0016471f has its CatchHandler @ 00164720 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0x12e,local_38,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&type_error::typeinfo,exception::~exception); }
35,510
minja::Value::callable(std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)> const&)
monkey531[P]llama/common/minja.hpp
static Value callable(const CallableType & callable) { return Value(std::make_shared<CallableType>(callable)); }
O3
cpp
minja::Value::callable(std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)> const&): pushq %r14 pushq %rbx subq $0x18, %rsp movq %rsi, %rcx movq %rdi, %rbx leaq 0x10(%rsp), %rdi movq $0x0, -0x8(%rdi) leaq 0x8(%rsp), %r14 leaq 0x7(%rsp), %rdx movq %r14, %rsi callq 0x74b4c movq %rbx, %rdi movq %r14, %rsi callq 0x74a78 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x743c8 callq 0x309ec movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x743e5 callq 0x309ec movq %rbx, %rdi callq 0x19c00 nop
_ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE: push r14 push rbx sub rsp, 18h mov rcx, rsi mov rbx, rdi lea rdi, [rsp+28h+var_18] mov qword ptr [rdi-8], 0 lea r14, [rsp+28h+var_20] lea rdx, [rsp+28h+var_21] mov rsi, r14 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2ISt8functionIFN5minja5ValueERKSt10shared_ptrINS5_7ContextEERNS5_14ArgumentsValueEEESaISF_EJRKSF_EEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>,std::allocator<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>>,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&>(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> *&,std::_Sp_alloc_shared_tag<std::allocator<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>>>,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&) mov rdi, rbx mov rsi, r14 call _ZN5minja5ValueC2ERKSt10shared_ptrISt8functionIFS0_RKS1_INS_7ContextEERNS_14ArgumentsValueEEEE; minja::Value::Value(std::shared_ptr<std::function<minja::Value ()(std::shared_ptr const&<minja::Context>,minja::ArgumentsValue &)>> const&) mov rdi, [rsp+28h+var_18] test rdi, rdi jz short loc_743C8 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_743C8: mov rax, rbx add rsp, 18h pop rbx pop r14 retn mov rbx, rax mov rdi, [rsp+arg_8] test rdi, rdi jz short loc_743E5 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_743E5: mov rdi, rbx call __Unwind_Resume
long long minja::Value::callable(long long a1, long long a2) { char v3; // [rsp+7h] [rbp-21h] BYREF long long v4; // [rsp+8h] [rbp-20h] BYREF volatile signed __int32 *v5; // [rsp+10h] [rbp-18h] BYREF v4 = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>,std::allocator<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>>,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&>( &v5, &v4, &v3, a2); minja::Value::Value(a1, &v4); if ( v5 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v5); return a1; }
callable: PUSH R14 PUSH RBX SUB RSP,0x18 MOV RCX,RSI MOV RBX,RDI LEA RDI,[RSP + 0x10] MOV qword ptr [RDI + -0x8],0x0 LEA R14,[RSP + 0x8] LEA RDX,[RSP + 0x7] MOV RSI,R14 CALL 0x00174b4c LAB_001743ae: MOV RDI,RBX MOV RSI,R14 CALL 0x00174a78 LAB_001743b9: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x001743c8 CALL 0x001309ec LAB_001743c8: MOV RAX,RBX ADD RSP,0x18 POP RBX POP R14 RET
/* minja::Value::callable(std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)> const&) */ Value * __thiscall minja::Value::callable(Value *this,function *param_1) { int1 local_21; int8 local_20; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_18; local_20 = 0; std::__shared_count<(__gnu_cxx::_Lock_policy)2>:: __shared_count<std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>,std::allocator<std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>>,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>const&> ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_18,(shared_ptr *)&local_20, &local_21,param_1); /* try { // try from 001743ae to 001743b8 has its CatchHandler @ 001743d3 */ Value(this,(shared_ptr *)&local_20); if (local_18 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_18); } return this; }
35,511
async_func_init
bluesky950520[P]quickjs/quickjs.c
static __exception int async_func_init(JSContext *ctx, JSAsyncFunctionState *s, JSValue func_obj, JSValue this_obj, int argc, JSValue *argv) { JSObject *p; JSFunctionBytecode *b; JSStackFrame *sf; int local_count, i, arg_buf_len, n; sf = &s->frame; init_list_head(&sf->var_ref_list); p = JS_VALUE_GET_OBJ(func_obj); b = p->u.func.function_bytecode; sf->is_strict_mode = b->is_strict_mode; sf->cur_pc = b->byte_code_buf; arg_buf_len = max_int(b->arg_count, argc); local_count = arg_buf_len + b->var_count + b->stack_size; sf->arg_buf = js_malloc(ctx, sizeof(JSValue) * max_int(local_count, 1)); if (!sf->arg_buf) return -1; sf->cur_func = js_dup(func_obj); s->this_val = js_dup(this_obj); s->argc = argc; sf->arg_count = arg_buf_len; sf->var_buf = sf->arg_buf + arg_buf_len; sf->cur_sp = sf->var_buf + b->var_count; for(i = 0; i < argc; i++) sf->arg_buf[i] = js_dup(argv[i]); n = arg_buf_len + b->var_count; for(i = argc; i < n; i++) sf->arg_buf[i] = JS_UNDEFINED; return 0; }
O0
c
async_func_init: subq $0xc8, %rsp movq 0xd8(%rsp), %rax movl 0xd0(%rsp), %eax movq %rdx, 0xb0(%rsp) movq %rcx, 0xb8(%rsp) movq %r8, 0xa0(%rsp) movq %r9, 0xa8(%rsp) movq %rdi, 0x98(%rsp) movq %rsi, 0x90(%rsp) movq 0x90(%rsp), %rax addq $0x18, %rax movq %rax, 0x78(%rsp) movq 0x78(%rsp), %rdi addq $0x28, %rdi callq 0x22390 movq 0xb0(%rsp), %rax movq %rax, 0x88(%rsp) movq 0x88(%rsp), %rax movq 0x30(%rax), %rax movq %rax, 0x80(%rsp) movq 0x80(%rsp), %rax movw 0x18(%rax), %ax andw $0x1, %ax movzbl %al, %edx movq 0x78(%rsp), %rax movl 0x40(%rax), %ecx andl $0x1, %edx shll $0x1f, %edx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl %edx, %ecx movl %ecx, 0x40(%rax) movq 0x80(%rsp), %rax movq 0x20(%rax), %rcx movq 0x78(%rsp), %rax movq %rcx, 0x38(%rax) movq 0x80(%rsp), %rax movzwl 0x40(%rax), %edi movl 0xd0(%rsp), %esi callq 0x5d310 movl %eax, 0x6c(%rsp) movl 0x6c(%rsp), %eax movq 0x80(%rsp), %rcx movzwl 0x42(%rcx), %ecx addl %ecx, %eax movq 0x80(%rsp), %rcx movzwl 0x46(%rcx), %ecx addl %ecx, %eax movl %eax, 0x74(%rsp) movq 0x98(%rsp), %rax movq %rax, 0x20(%rsp) movl 0x74(%rsp), %edi movl $0x1, %esi callq 0x5d310 movq 0x20(%rsp), %rdi movslq %eax, %rsi shlq $0x4, %rsi callq 0x21cb0 movq %rax, %rcx movq 0x78(%rsp), %rax movq %rcx, 0x18(%rax) movq 0x78(%rsp), %rax cmpq $0x0, 0x18(%rax) jne 0x7210e movl $0xffffffff, 0xc4(%rsp) # imm = 0xFFFFFFFF jmp 0x72303 movq 0x78(%rsp), %rax movq %rax, 0x10(%rsp) movq 0xb0(%rsp), %rdi movq 0xb8(%rsp), %rsi callq 0x216d0 movq %rax, %rcx movq 0x10(%rsp), %rax movq %rcx, 0x58(%rsp) movq %rdx, 0x60(%rsp) movq 0x58(%rsp), %rcx movq %rcx, 0x8(%rax) movq 0x60(%rsp), %rcx movq %rcx, 0x10(%rax) movq 0x90(%rsp), %rax movq %rax, 0x18(%rsp) movq 0xa0(%rsp), %rdi movq 0xa8(%rsp), %rsi callq 0x216d0 movq %rax, %rcx movq 0x18(%rsp), %rax movq %rcx, 0x48(%rsp) movq %rdx, 0x50(%rsp) movq 0x48(%rsp), %rcx movq %rcx, (%rax) movq 0x50(%rsp), %rcx movq %rcx, 0x8(%rax) movl 0xd0(%rsp), %ecx movq 0x90(%rsp), %rax movl %ecx, 0x10(%rax) movl 0x6c(%rsp), %edx movq 0x78(%rsp), %rax movl 0x40(%rax), %ecx andl $0x7fffffff, %edx # imm = 0x7FFFFFFF andl $0x80000000, %ecx # imm = 0x80000000 orl %edx, %ecx movl %ecx, 0x40(%rax) movq 0x78(%rsp), %rax movq 0x18(%rax), %rcx movslq 0x6c(%rsp), %rax shlq $0x4, %rax addq %rax, %rcx movq 0x78(%rsp), %rax movq %rcx, 0x20(%rax) movq 0x78(%rsp), %rax movq 0x20(%rax), %rcx movq 0x80(%rsp), %rax movzwl 0x42(%rax), %eax cltq shlq $0x4, %rax addq %rax, %rcx movq 0x78(%rsp), %rax movq %rcx, 0x48(%rax) movl $0x0, 0x70(%rsp) movl 0x70(%rsp), %eax cmpl 0xd0(%rsp), %eax jge 0x72289 movq 0x78(%rsp), %rax movq 0x18(%rax), %rax movslq 0x70(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq %rax, 0x8(%rsp) movq 0xd8(%rsp), %rax movslq 0x70(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rdi movq 0x8(%rax), %rsi callq 0x216d0 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x38(%rsp) movq %rdx, 0x40(%rsp) movq 0x38(%rsp), %rcx movq %rcx, (%rax) movq 0x40(%rsp), %rcx movq %rcx, 0x8(%rax) movl 0x70(%rsp), %eax addl $0x1, %eax movl %eax, 0x70(%rsp) jmp 0x72212 movl 0x6c(%rsp), %eax movq 0x80(%rsp), %rcx movzwl 0x42(%rcx), %ecx addl %ecx, %eax movl %eax, 0x68(%rsp) movl 0xd0(%rsp), %eax movl %eax, 0x70(%rsp) movl 0x70(%rsp), %eax cmpl 0x68(%rsp), %eax jge 0x722f8 movq 0x78(%rsp), %rax movq 0x18(%rax), %rax movslq 0x70(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movl $0x0, 0x28(%rsp) movq $0x3, 0x30(%rsp) movq 0x28(%rsp), %rcx movq %rcx, (%rax) movq 0x30(%rsp), %rcx movq %rcx, 0x8(%rax) movl 0x70(%rsp), %eax addl $0x1, %eax movl %eax, 0x70(%rsp) jmp 0x722aa movl $0x0, 0xc4(%rsp) movl 0xc4(%rsp), %eax addq $0xc8, %rsp retq nopw %cs:(%rax,%rax)
async_func_init: sub rsp, 0C8h mov rax, [rsp+0C8h+arg_8] mov eax, [rsp+0C8h+arg_0] mov [rsp+0C8h+var_18], rdx mov [rsp+0C8h+var_10], rcx mov [rsp+0C8h+var_28], r8 mov [rsp+0C8h+var_20], r9 mov [rsp+0C8h+var_30], rdi mov [rsp+0C8h+var_38], rsi mov rax, [rsp+0C8h+var_38] add rax, 18h mov [rsp+0C8h+var_50], rax mov rdi, [rsp+0C8h+var_50] add rdi, 28h ; '(' call init_list_head_0 mov rax, [rsp+0C8h+var_18] mov [rsp+0C8h+var_40], rax mov rax, [rsp+0C8h+var_40] mov rax, [rax+30h] mov [rsp+0C8h+var_48], rax mov rax, [rsp+0C8h+var_48] mov ax, [rax+18h] and ax, 1 movzx edx, al mov rax, [rsp+0C8h+var_50] mov ecx, [rax+40h] and edx, 1 shl edx, 1Fh and ecx, 7FFFFFFFh or ecx, edx mov [rax+40h], ecx mov rax, [rsp+0C8h+var_48] mov rcx, [rax+20h] mov rax, [rsp+0C8h+var_50] mov [rax+38h], rcx mov rax, [rsp+0C8h+var_48] movzx edi, word ptr [rax+40h] mov esi, [rsp+0C8h+arg_0] call max_int_0 mov [rsp+0C8h+var_5C], eax mov eax, [rsp+0C8h+var_5C] mov rcx, [rsp+0C8h+var_48] movzx ecx, word ptr [rcx+42h] add eax, ecx mov rcx, [rsp+0C8h+var_48] movzx ecx, word ptr [rcx+46h] add eax, ecx mov [rsp+0C8h+var_54], eax mov rax, [rsp+0C8h+var_30] mov [rsp+0C8h+var_A8], rax mov edi, [rsp+0C8h+var_54] mov esi, 1 call max_int_0 mov rdi, [rsp+0C8h+var_A8] movsxd rsi, eax shl rsi, 4 call js_malloc mov rcx, rax mov rax, [rsp+0C8h+var_50] mov [rax+18h], rcx mov rax, [rsp+0C8h+var_50] cmp qword ptr [rax+18h], 0 jnz short loc_7210E mov [rsp+0C8h+var_4], 0FFFFFFFFh jmp loc_72303 loc_7210E: mov rax, [rsp+0C8h+var_50] mov [rsp+0C8h+var_B8], rax mov rdi, [rsp+0C8h+var_18] mov rsi, [rsp+0C8h+var_10] call js_dup mov rcx, rax mov rax, [rsp+0C8h+var_B8] mov [rsp+0C8h+var_70], rcx mov [rsp+0C8h+var_68], rdx mov rcx, [rsp+0C8h+var_70] mov [rax+8], rcx mov rcx, [rsp+0C8h+var_68] mov [rax+10h], rcx mov rax, [rsp+0C8h+var_38] mov [rsp+0C8h+var_B0], rax mov rdi, [rsp+0C8h+var_28] mov rsi, [rsp+0C8h+var_20] call js_dup mov rcx, rax mov rax, [rsp+0C8h+var_B0] mov [rsp+0C8h+var_80], rcx mov [rsp+0C8h+var_78], rdx mov rcx, [rsp+0C8h+var_80] mov [rax], rcx mov rcx, [rsp+0C8h+var_78] mov [rax+8], rcx mov ecx, [rsp+0C8h+arg_0] mov rax, [rsp+0C8h+var_38] mov [rax+10h], ecx mov edx, [rsp+0C8h+var_5C] mov rax, [rsp+0C8h+var_50] mov ecx, [rax+40h] and edx, 7FFFFFFFh and ecx, 80000000h or ecx, edx mov [rax+40h], ecx mov rax, [rsp+0C8h+var_50] mov rcx, [rax+18h] movsxd rax, [rsp+0C8h+var_5C] shl rax, 4 add rcx, rax mov rax, [rsp+0C8h+var_50] mov [rax+20h], rcx mov rax, [rsp+0C8h+var_50] mov rcx, [rax+20h] mov rax, [rsp+0C8h+var_48] movzx eax, word ptr [rax+42h] cdqe shl rax, 4 add rcx, rax mov rax, [rsp+0C8h+var_50] mov [rax+48h], rcx mov [rsp+0C8h+var_58], 0 loc_72212: mov eax, [rsp+0C8h+var_58] cmp eax, [rsp+0C8h+arg_0] jge short loc_72289 mov rax, [rsp+0C8h+var_50] mov rax, [rax+18h] movsxd rcx, [rsp+0C8h+var_58] shl rcx, 4 add rax, rcx mov [rsp+0C8h+var_C0], rax mov rax, [rsp+0C8h+arg_8] movsxd rcx, [rsp+0C8h+var_58] shl rcx, 4 add rax, rcx mov rdi, [rax] mov rsi, [rax+8] call js_dup mov rcx, rax mov rax, [rsp+0C8h+var_C0] mov [rsp+0C8h+var_90], rcx mov [rsp+0C8h+var_88], rdx mov rcx, [rsp+0C8h+var_90] mov [rax], rcx mov rcx, [rsp+0C8h+var_88] mov [rax+8], rcx mov eax, [rsp+0C8h+var_58] add eax, 1 mov [rsp+0C8h+var_58], eax jmp short loc_72212 loc_72289: mov eax, [rsp+0C8h+var_5C] mov rcx, [rsp+0C8h+var_48] movzx ecx, word ptr [rcx+42h] add eax, ecx mov [rsp+0C8h+var_60], eax mov eax, [rsp+0C8h+arg_0] mov [rsp+0C8h+var_58], eax loc_722AA: mov eax, [rsp+0C8h+var_58] cmp eax, [rsp+0C8h+var_60] jge short loc_722F8 mov rax, [rsp+0C8h+var_50] mov rax, [rax+18h] movsxd rcx, [rsp+0C8h+var_58] shl rcx, 4 add rax, rcx mov dword ptr [rsp+0C8h+var_A0], 0 mov [rsp+0C8h+var_98], 3 mov rcx, [rsp+0C8h+var_A0] mov [rax], rcx mov rcx, [rsp+0C8h+var_98] mov [rax+8], rcx mov eax, [rsp+0C8h+var_58] add eax, 1 mov [rsp+0C8h+var_58], eax jmp short loc_722AA loc_722F8: mov [rsp+0C8h+var_4], 0 loc_72303: mov eax, [rsp+0C8h+var_4] add rsp, 0C8h retn
long long async_func_init( long long a1, long long a2, long long a3, unsigned int a4, _DWORD *a5, unsigned int a6, signed int a7, long long a8) { int v8; // eax long long v9; // rdx long long v10; // rdx long long v11; // rdx _QWORD *v12; // rax _QWORD *v14; // [rsp+8h] [rbp-C0h] long long v15; // [rsp+28h] [rbp-A0h] signed int v16; // [rsp+68h] [rbp-60h] int v17; // [rsp+6Ch] [rbp-5Ch] signed int i; // [rsp+70h] [rbp-58h] signed int j; // [rsp+70h] [rbp-58h] long long v20; // [rsp+80h] [rbp-48h] init_list_head_0((_QWORD *)(a2 + 64)); v20 = *(_QWORD *)(a3 + 48); *(_DWORD *)(a2 + 88) = ((*(_WORD *)(v20 + 24) & 1) << 31) | *(_DWORD *)(a2 + 88) & 0x7FFFFFFF; *(_QWORD *)(a2 + 80) = *(_QWORD *)(v20 + 32); v17 = max_int_0(*(unsigned __int16 *)(v20 + 64), a7); v8 = max_int_0(*(unsigned __int16 *)(v20 + 70) + (unsigned int)*(unsigned __int16 *)(v20 + 66) + v17, 1u); *(_QWORD *)(a2 + 48) = js_malloc(a1, 16LL * v8); if ( *(_QWORD *)(a2 + 48) ) { *(_QWORD *)(a2 + 32) = js_dup((_DWORD *)a3, a4); *(_QWORD *)(a2 + 40) = v9; *(_QWORD *)a2 = js_dup(a5, a6); *(_QWORD *)(a2 + 8) = v10; *(_DWORD *)(a2 + 16) = a7; *(_DWORD *)(a2 + 88) = v17 & 0x7FFFFFFF | *(_DWORD *)(a2 + 88) & 0x80000000; *(_QWORD *)(a2 + 56) = 16LL * v17 + *(_QWORD *)(a2 + 48); *(_QWORD *)(a2 + 96) = 16LL * *(unsigned __int16 *)(v20 + 66) + *(_QWORD *)(a2 + 56); for ( i = 0; i < a7; ++i ) { v14 = (_QWORD *)(16LL * i + *(_QWORD *)(a2 + 48)); *v14 = js_dup(*(_DWORD **)(16LL * i + a8), *(_QWORD *)(16LL * i + a8 + 8)); v14[1] = v11; } v16 = *(unsigned __int16 *)(v20 + 66) + v17; for ( j = a7; j < v16; ++j ) { v12 = (_QWORD *)(16LL * j + *(_QWORD *)(a2 + 48)); LODWORD(v15) = 0; *v12 = v15; v12[1] = 3LL; } return 0; } else { return (unsigned int)-1; } }
async_func_init: SUB RSP,0xc8 MOV RAX,qword ptr [RSP + 0xd8] MOV EAX,dword ptr [RSP + 0xd0] MOV qword ptr [RSP + 0xb0],RDX MOV qword ptr [RSP + 0xb8],RCX MOV qword ptr [RSP + 0xa0],R8 MOV qword ptr [RSP + 0xa8],R9 MOV qword ptr [RSP + 0x98],RDI MOV qword ptr [RSP + 0x90],RSI MOV RAX,qword ptr [RSP + 0x90] ADD RAX,0x18 MOV qword ptr [RSP + 0x78],RAX MOV RDI,qword ptr [RSP + 0x78] ADD RDI,0x28 CALL 0x00122390 MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0x88],RAX MOV RAX,qword ptr [RSP + 0x88] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x80] MOV AX,word ptr [RAX + 0x18] AND AX,0x1 MOVZX EDX,AL MOV RAX,qword ptr [RSP + 0x78] MOV ECX,dword ptr [RAX + 0x40] AND EDX,0x1 SHL EDX,0x1f AND ECX,0x7fffffff OR ECX,EDX MOV dword ptr [RAX + 0x40],ECX MOV RAX,qword ptr [RSP + 0x80] MOV RCX,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RAX + 0x38],RCX MOV RAX,qword ptr [RSP + 0x80] MOVZX EDI,word ptr [RAX + 0x40] MOV ESI,dword ptr [RSP + 0xd0] CALL 0x0015d310 MOV dword ptr [RSP + 0x6c],EAX MOV EAX,dword ptr [RSP + 0x6c] MOV RCX,qword ptr [RSP + 0x80] MOVZX ECX,word ptr [RCX + 0x42] ADD EAX,ECX MOV RCX,qword ptr [RSP + 0x80] MOVZX ECX,word ptr [RCX + 0x46] ADD EAX,ECX MOV dword ptr [RSP + 0x74],EAX MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x20],RAX MOV EDI,dword ptr [RSP + 0x74] MOV ESI,0x1 CALL 0x0015d310 MOV RDI,qword ptr [RSP + 0x20] MOVSXD RSI,EAX SHL RSI,0x4 CALL 0x00121cb0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RSP + 0x78] CMP qword ptr [RAX + 0x18],0x0 JNZ 0x0017210e MOV dword ptr [RSP + 0xc4],0xffffffff JMP 0x00172303 LAB_0017210e: MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0xb8] CALL 0x001216d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x58],RCX MOV qword ptr [RSP + 0x60],RDX MOV RCX,qword ptr [RSP + 0x58] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RSP + 0x60] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0xa0] MOV RSI,qword ptr [RSP + 0xa8] CALL 0x001216d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x48],RCX MOV qword ptr [RSP + 0x50],RDX MOV RCX,qword ptr [RSP + 0x48] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x50] MOV qword ptr [RAX + 0x8],RCX MOV ECX,dword ptr [RSP + 0xd0] MOV RAX,qword ptr [RSP + 0x90] MOV dword ptr [RAX + 0x10],ECX MOV EDX,dword ptr [RSP + 0x6c] MOV RAX,qword ptr [RSP + 0x78] MOV ECX,dword ptr [RAX + 0x40] AND EDX,0x7fffffff AND ECX,0x80000000 OR ECX,EDX MOV dword ptr [RAX + 0x40],ECX MOV RAX,qword ptr [RSP + 0x78] MOV RCX,qword ptr [RAX + 0x18] MOVSXD RAX,dword ptr [RSP + 0x6c] SHL RAX,0x4 ADD RCX,RAX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RSP + 0x78] MOV RCX,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RSP + 0x80] MOVZX EAX,word ptr [RAX + 0x42] CDQE SHL RAX,0x4 ADD RCX,RAX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RAX + 0x48],RCX MOV dword ptr [RSP + 0x70],0x0 LAB_00172212: MOV EAX,dword ptr [RSP + 0x70] CMP EAX,dword ptr [RSP + 0xd0] JGE 0x00172289 MOV RAX,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RAX + 0x18] MOVSXD RCX,dword ptr [RSP + 0x70] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0xd8] MOVSXD RCX,dword ptr [RSP + 0x70] SHL RCX,0x4 ADD RAX,RCX MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x8] CALL 0x001216d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x38],RCX MOV qword ptr [RSP + 0x40],RDX MOV RCX,qword ptr [RSP + 0x38] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x40] MOV qword ptr [RAX + 0x8],RCX MOV EAX,dword ptr [RSP + 0x70] ADD EAX,0x1 MOV dword ptr [RSP + 0x70],EAX JMP 0x00172212 LAB_00172289: MOV EAX,dword ptr [RSP + 0x6c] MOV RCX,qword ptr [RSP + 0x80] MOVZX ECX,word ptr [RCX + 0x42] ADD EAX,ECX MOV dword ptr [RSP + 0x68],EAX MOV EAX,dword ptr [RSP + 0xd0] MOV dword ptr [RSP + 0x70],EAX LAB_001722aa: MOV EAX,dword ptr [RSP + 0x70] CMP EAX,dword ptr [RSP + 0x68] JGE 0x001722f8 MOV RAX,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RAX + 0x18] MOVSXD RCX,dword ptr [RSP + 0x70] SHL RCX,0x4 ADD RAX,RCX MOV dword ptr [RSP + 0x28],0x0 MOV qword ptr [RSP + 0x30],0x3 MOV RCX,qword ptr [RSP + 0x28] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x8],RCX MOV EAX,dword ptr [RSP + 0x70] ADD EAX,0x1 MOV dword ptr [RSP + 0x70],EAX JMP 0x001722aa LAB_001722f8: MOV dword ptr [RSP + 0xc4],0x0 LAB_00172303: MOV EAX,dword ptr [RSP + 0xc4] ADD RSP,0xc8 RET
int4 async_func_init(int8 param_1,int1 (*param_2) [16],long param_3,int8 param_4, int8 param_5,int8 param_6,int param_7,long param_8) { ushort uVar1; long lVar2; long lVar3; uint uVar4; int iVar5; int8 uVar6; int8 *puVar7; long *plVar8; int1 auVar9 [16]; uint uStack_9c; int local_58; int4 local_4; init_list_head(param_2 + 4); lVar2 = *(long *)(param_3 + 0x30); *(uint *)(param_2[5] + 8) = *(uint *)(param_2[5] + 8) & 0x7fffffff | (uint)((byte)*(int2 *)(lVar2 + 0x18) & 1) << 0x1f; *(int8 *)param_2[5] = *(int8 *)(lVar2 + 0x20); uVar4 = max_int(*(int2 *)(lVar2 + 0x40),param_7); iVar5 = max_int(uVar4 + *(ushort *)(lVar2 + 0x42) + (uint)*(ushort *)(lVar2 + 0x46),1); uVar6 = js_malloc(param_1,(long)iVar5 << 4); *(int8 *)param_2[3] = uVar6; if (*(long *)param_2[3] == 0) { local_4 = 0xffffffff; } else { auVar9 = js_dup(param_3,param_4); param_2[2] = auVar9; auVar9 = js_dup(param_5,param_6); *param_2 = auVar9; *(int *)param_2[1] = param_7; *(uint *)(param_2[5] + 8) = *(uint *)(param_2[5] + 8) & 0x80000000 | uVar4 & 0x7fffffff; *(long *)(param_2[3] + 8) = *(long *)param_2[3] + (long)(int)uVar4 * 0x10; *(long *)param_2[6] = *(long *)(param_2[3] + 8) + (long)(int)(uint)*(ushort *)(lVar2 + 0x42) * 0x10; for (local_58 = 0; local_58 < param_7; local_58 = local_58 + 1) { lVar3 = *(long *)param_2[3]; puVar7 = (int8 *)(param_8 + (long)local_58 * 0x10); auVar9 = js_dup(*puVar7,puVar7[1]); *(int1 (*) [16])(lVar3 + (long)local_58 * 0x10) = auVar9; } uVar1 = *(ushort *)(lVar2 + 0x42); for (local_58 = param_7; local_58 < (int)(uVar4 + uVar1); local_58 = local_58 + 1) { plVar8 = (long *)(*(long *)param_2[3] + (long)local_58 * 0x10); *plVar8 = (ulong)uStack_9c << 0x20; plVar8[1] = 3; } local_4 = 0; } return local_4; }
35,512
async_func_init
bluesky950520[P]quickjs/quickjs.c
static __exception int async_func_init(JSContext *ctx, JSAsyncFunctionState *s, JSValue func_obj, JSValue this_obj, int argc, JSValue *argv) { JSObject *p; JSFunctionBytecode *b; JSStackFrame *sf; int local_count, i, arg_buf_len, n; sf = &s->frame; init_list_head(&sf->var_ref_list); p = JS_VALUE_GET_OBJ(func_obj); b = p->u.func.function_bytecode; sf->is_strict_mode = b->is_strict_mode; sf->cur_pc = b->byte_code_buf; arg_buf_len = max_int(b->arg_count, argc); local_count = arg_buf_len + b->var_count + b->stack_size; sf->arg_buf = js_malloc(ctx, sizeof(JSValue) * max_int(local_count, 1)); if (!sf->arg_buf) return -1; sf->cur_func = js_dup(func_obj); s->this_val = js_dup(this_obj); s->argc = argc; sf->arg_count = arg_buf_len; sf->var_buf = sf->arg_buf + arg_buf_len; sf->cur_sp = sf->var_buf + b->var_count; for(i = 0; i < argc; i++) sf->arg_buf[i] = js_dup(argv[i]); n = arg_buf_len + b->var_count; for(i = argc; i < n; i++) sf->arg_buf[i] = JS_UNDEFINED; return 0; }
O1
c
async_func_init: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r9, 0x10(%rsp) movq %r8, %r15 movq %rcx, %r12 movq %rdx, %r13 movq %rsi, %rbx movl 0x50(%rsp), %edx leaq 0x40(%rsi), %rax movq %rax, 0x40(%rsi) movq %rax, 0x48(%rsi) movq 0x30(%r13), %rbp movl 0x18(%rbp), %eax shll $0x1f, %eax movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF andl 0x58(%rsi), %ecx orl %eax, %ecx movl %ecx, 0x58(%rsi) movq 0x20(%rbp), %rax movq %rax, 0x50(%rsi) movzwl 0x40(%rbp), %r14d cmpl %edx, %r14d cmovlel %edx, %r14d movzwl 0x42(%rbp), %eax movzwl 0x46(%rbp), %ecx addl %eax, %ecx addl %r14d, %ecx cmpl $0x2, %ecx pushq $0x1 popq %rsi cmovgel %ecx, %esi shlq $0x4, %rsi callq 0xede6 movq %rax, 0x30(%rbx) testq %rax, %rax je 0x10d56 movq %r13, 0x8(%rsp) cmpl $-0x9, %r12d jb 0x10c78 movq 0x8(%rsp), %rcx incl (%rcx) movq %r13, 0x20(%rbx) movq %r12, 0x28(%rbx) movq %r15, 0x8(%rsp) movq 0x10(%rsp), %rdx cmpl $-0x9, %edx movl 0x50(%rsp), %r11d jb 0x10c9b movq 0x8(%rsp), %rcx incl (%rcx) movq %r15, (%rbx) movq %rdx, 0x8(%rbx) movl %r11d, 0x10(%rbx) movl $0x80000000, %ecx # imm = 0x80000000 andl 0x58(%rbx), %ecx orl %r14d, %ecx movl %ecx, 0x58(%rbx) movl %r14d, %ecx movq %rcx, %rdx shlq $0x4, %rdx addq %rdx, %rax movq %rax, 0x38(%rbx) movzwl 0x42(%rbp), %edx shll $0x4, %edx addq %rax, %rdx movq %rdx, 0x60(%rbx) testl %r11d, %r11d jle 0x10d18 movq 0x58(%rsp), %rax movl %r11d, %edx shlq $0x4, %rdx xorl %esi, %esi movq 0x30(%rbx), %rdi movq (%rax,%rsi), %r8 movq 0x8(%rax,%rsi), %r9 movq %r8, 0x8(%rsp) cmpl $-0x9, %r9d jb 0x10d06 movq 0x8(%rsp), %r10 incl (%r10) movq %r8, (%rdi,%rsi) movq %r9, 0x8(%rdi,%rsi) addq $0x10, %rsi cmpq %rsi, %rdx jne 0x10ce6 movzwl 0x42(%rbp), %edx addl %edx, %r14d xorl %eax, %eax cmpl %r11d, %r14d jle 0x10d59 movslq %r11d, %rsi addq %rdx, %rcx subq %rsi, %rcx movq %rsi, %rdx shlq $0x4, %rdx orq $0x8, %rdx movq 0x30(%rbx), %rsi andl $0x0, -0x8(%rsi,%rdx) movq $0x3, (%rsi,%rdx) addq $0x10, %rdx decq %rcx jne 0x10d3a jmp 0x10d59 pushq $-0x1 popq %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
async_func_init: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rsp+48h+var_38], r9 mov r15, r8 mov r12, rcx mov r13, rdx mov rbx, rsi mov edx, [rsp+48h+arg_0] lea rax, [rsi+40h] mov [rsi+40h], rax mov [rsi+48h], rax mov rbp, [r13+30h] mov eax, [rbp+18h] shl eax, 1Fh mov ecx, 7FFFFFFFh and ecx, [rsi+58h] or ecx, eax mov [rsi+58h], ecx mov rax, [rbp+20h] mov [rsi+50h], rax movzx r14d, word ptr [rbp+40h] cmp r14d, edx cmovle r14d, edx movzx eax, word ptr [rbp+42h] movzx ecx, word ptr [rbp+46h] add ecx, eax add ecx, r14d cmp ecx, 2 push 1 pop rsi cmovge esi, ecx shl rsi, 4 call js_malloc mov [rbx+30h], rax test rax, rax jz loc_10D56 mov [rsp+48h+var_40], r13 cmp r12d, 0FFFFFFF7h jb short loc_10C78 mov rcx, [rsp+48h+var_40] inc dword ptr [rcx] loc_10C78: mov [rbx+20h], r13 mov [rbx+28h], r12 mov [rsp+48h+var_40], r15 mov rdx, [rsp+48h+var_38] cmp edx, 0FFFFFFF7h mov r11d, [rsp+48h+arg_0] jb short loc_10C9B mov rcx, [rsp+48h+var_40] inc dword ptr [rcx] loc_10C9B: mov [rbx], r15 mov [rbx+8], rdx mov [rbx+10h], r11d mov ecx, 80000000h and ecx, [rbx+58h] or ecx, r14d mov [rbx+58h], ecx mov ecx, r14d mov rdx, rcx shl rdx, 4 add rax, rdx mov [rbx+38h], rax movzx edx, word ptr [rbp+42h] shl edx, 4 add rdx, rax mov [rbx+60h], rdx test r11d, r11d jle short loc_10D18 mov rax, [rsp+48h+arg_8] mov edx, r11d shl rdx, 4 xor esi, esi loc_10CE6: mov rdi, [rbx+30h] mov r8, [rax+rsi] mov r9, [rax+rsi+8] mov [rsp+48h+var_40], r8 cmp r9d, 0FFFFFFF7h jb short loc_10D06 mov r10, [rsp+48h+var_40] inc dword ptr [r10] loc_10D06: mov [rdi+rsi], r8 mov [rdi+rsi+8], r9 add rsi, 10h cmp rdx, rsi jnz short loc_10CE6 loc_10D18: movzx edx, word ptr [rbp+42h] add r14d, edx xor eax, eax cmp r14d, r11d jle short loc_10D59 movsxd rsi, r11d add rcx, rdx sub rcx, rsi mov rdx, rsi shl rdx, 4 or rdx, 8 loc_10D3A: mov rsi, [rbx+30h] and dword ptr [rsi+rdx-8], 0 mov qword ptr [rsi+rdx], 3 add rdx, 10h dec rcx jnz short loc_10D3A jmp short loc_10D59 loc_10D56: push 0FFFFFFFFFFFFFFFFh pop rax loc_10D59: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long async_func_init( long long a1, long long a2, long long a3, long long a4, _DWORD *a5, long long a6, int a7, long long a8) { long long v12; // rbp unsigned int v13; // r14d int v14; // ecx long long v15; // rsi long long v16; // rax long long v17; // rax long long v18; // rsi long long v19; // rdi long long v20; // r8 long long v21; // r9 long long v22; // rdx long long result; // rax long long v24; // rcx long long v25; // rdx long long v26; // rsi *(_QWORD *)(a2 + 64) = a2 + 64; *(_QWORD *)(a2 + 72) = a2 + 64; v12 = *(_QWORD *)(a3 + 48); *(_DWORD *)(a2 + 88) = (*(_DWORD *)(v12 + 24) << 31) | *(_DWORD *)(a2 + 88) & 0x7FFFFFFF; *(_QWORD *)(a2 + 80) = *(_QWORD *)(v12 + 32); v13 = *(unsigned __int16 *)(v12 + 64); if ( (int)v13 <= a7 ) v13 = a7; v14 = v13 + *(unsigned __int16 *)(v12 + 66) + *(unsigned __int16 *)(v12 + 70); v15 = 1LL; if ( v14 >= 2 ) v15 = (unsigned int)v14; v16 = js_malloc(a1, 16 * v15); *(_QWORD *)(a2 + 48) = v16; if ( !v16 ) return -1LL; if ( (unsigned int)a4 >= 0xFFFFFFF7 ) ++*(_DWORD *)a3; *(_QWORD *)(a2 + 32) = a3; *(_QWORD *)(a2 + 40) = a4; if ( (unsigned int)a6 >= 0xFFFFFFF7 ) ++*a5; *(_QWORD *)a2 = a5; *(_QWORD *)(a2 + 8) = a6; *(_DWORD *)(a2 + 16) = a7; *(_DWORD *)(a2 + 88) = v13 | *(_DWORD *)(a2 + 88) & 0x80000000; v17 = 16LL * v13 + v16; *(_QWORD *)(a2 + 56) = v17; *(_QWORD *)(a2 + 96) = v17 + 16 * (unsigned int)*(unsigned __int16 *)(v12 + 66); if ( a7 > 0 ) { v18 = 0LL; do { v19 = *(_QWORD *)(a2 + 48); v20 = *(_QWORD *)(a8 + v18); v21 = *(_QWORD *)(a8 + v18 + 8); if ( (unsigned int)v21 >= 0xFFFFFFF7 ) ++**(_DWORD **)(a8 + v18); *(_QWORD *)(v19 + v18) = v20; *(_QWORD *)(v19 + v18 + 8) = v21; v18 += 16LL; } while ( 16LL * (unsigned int)a7 != v18 ); } v22 = *(unsigned __int16 *)(v12 + 66); result = 0LL; if ( (int)(v22 + v13) > a7 ) { v24 = v22 + v13 - a7; v25 = (16LL * a7) | 8; do { v26 = *(_QWORD *)(a2 + 48); *(_DWORD *)(v26 + v25 - 8) = 0; *(_QWORD *)(v26 + v25) = 3LL; v25 += 16LL; --v24; } while ( v24 ); } return result; }
async_func_init: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RSP + 0x10],R9 MOV R15,R8 MOV R12,RCX MOV R13,RDX MOV RBX,RSI MOV EDX,dword ptr [RSP + 0x50] LEA RAX,[RSI + 0x40] MOV qword ptr [RSI + 0x40],RAX MOV qword ptr [RSI + 0x48],RAX MOV RBP,qword ptr [R13 + 0x30] MOV EAX,dword ptr [RBP + 0x18] SHL EAX,0x1f MOV ECX,0x7fffffff AND ECX,dword ptr [RSI + 0x58] OR ECX,EAX MOV dword ptr [RSI + 0x58],ECX MOV RAX,qword ptr [RBP + 0x20] MOV qword ptr [RSI + 0x50],RAX MOVZX R14D,word ptr [RBP + 0x40] CMP R14D,EDX CMOVLE R14D,EDX MOVZX EAX,word ptr [RBP + 0x42] MOVZX ECX,word ptr [RBP + 0x46] ADD ECX,EAX ADD ECX,R14D CMP ECX,0x2 PUSH 0x1 POP RSI CMOVGE ESI,ECX SHL RSI,0x4 CALL 0x0010ede6 MOV qword ptr [RBX + 0x30],RAX TEST RAX,RAX JZ 0x00110d56 MOV qword ptr [RSP + 0x8],R13 CMP R12D,-0x9 JC 0x00110c78 MOV RCX,qword ptr [RSP + 0x8] INC dword ptr [RCX] LAB_00110c78: MOV qword ptr [RBX + 0x20],R13 MOV qword ptr [RBX + 0x28],R12 MOV qword ptr [RSP + 0x8],R15 MOV RDX,qword ptr [RSP + 0x10] CMP EDX,-0x9 MOV R11D,dword ptr [RSP + 0x50] JC 0x00110c9b MOV RCX,qword ptr [RSP + 0x8] INC dword ptr [RCX] LAB_00110c9b: MOV qword ptr [RBX],R15 MOV qword ptr [RBX + 0x8],RDX MOV dword ptr [RBX + 0x10],R11D MOV ECX,0x80000000 AND ECX,dword ptr [RBX + 0x58] OR ECX,R14D MOV dword ptr [RBX + 0x58],ECX MOV ECX,R14D MOV RDX,RCX SHL RDX,0x4 ADD RAX,RDX MOV qword ptr [RBX + 0x38],RAX MOVZX EDX,word ptr [RBP + 0x42] SHL EDX,0x4 ADD RDX,RAX MOV qword ptr [RBX + 0x60],RDX TEST R11D,R11D JLE 0x00110d18 MOV RAX,qword ptr [RSP + 0x58] MOV EDX,R11D SHL RDX,0x4 XOR ESI,ESI LAB_00110ce6: MOV RDI,qword ptr [RBX + 0x30] MOV R8,qword ptr [RAX + RSI*0x1] MOV R9,qword ptr [RAX + RSI*0x1 + 0x8] MOV qword ptr [RSP + 0x8],R8 CMP R9D,-0x9 JC 0x00110d06 MOV R10,qword ptr [RSP + 0x8] INC dword ptr [R10] LAB_00110d06: MOV qword ptr [RDI + RSI*0x1],R8 MOV qword ptr [RDI + RSI*0x1 + 0x8],R9 ADD RSI,0x10 CMP RDX,RSI JNZ 0x00110ce6 LAB_00110d18: MOVZX EDX,word ptr [RBP + 0x42] ADD R14D,EDX XOR EAX,EAX CMP R14D,R11D JLE 0x00110d59 MOVSXD RSI,R11D ADD RCX,RDX SUB RCX,RSI MOV RDX,RSI SHL RDX,0x4 OR RDX,0x8 LAB_00110d3a: MOV RSI,qword ptr [RBX + 0x30] AND dword ptr [RSI + RDX*0x1 + -0x8],0x0 MOV qword ptr [RSI + RDX*0x1],0x3 ADD RDX,0x10 DEC RCX JNZ 0x00110d3a JMP 0x00110d59 LAB_00110d56: PUSH -0x1 POP RAX LAB_00110d59: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 async_func_init(int8 param_1,int8 *param_2,int *param_3,int8 param_4,int *param_5, int8 param_6,uint param_7,long param_8) { long lVar1; int *piVar2; long lVar3; int8 uVar4; long lVar5; ulong uVar6; uint uVar7; param_2[8] = param_2 + 8; param_2[9] = param_2 + 8; lVar5 = *(long *)(param_3 + 0xc); *(uint *)(param_2 + 0xb) = *(uint *)(param_2 + 0xb) & 0x7fffffff | *(int *)(lVar5 + 0x18) << 0x1f; param_2[10] = *(int8 *)(lVar5 + 0x20); uVar7 = (uint)*(ushort *)(lVar5 + 0x40); if ((int)(uint)*(ushort *)(lVar5 + 0x40) <= (int)param_7) { uVar7 = param_7; } lVar3 = js_malloc(); param_2[6] = lVar3; if (lVar3 == 0) { uVar4 = 0xffffffffffffffff; } else { if (0xfffffff6 < (uint)param_4) { *param_3 = *param_3 + 1; } param_2[4] = param_3; param_2[5] = param_4; if (0xfffffff6 < (uint)param_6) { *param_5 = *param_5 + 1; } *param_2 = param_5; param_2[1] = param_6; *(uint *)(param_2 + 2) = param_7; *(uint *)(param_2 + 0xb) = *(uint *)(param_2 + 0xb) & 0x80000000 | uVar7; lVar3 = lVar3 + (ulong)uVar7 * 0x10; param_2[7] = lVar3; param_2[0xc] = (ulong)*(ushort *)(lVar5 + 0x42) * 0x10 + lVar3; if (0 < (int)param_7) { lVar3 = 0; do { lVar1 = param_2[6]; piVar2 = *(int **)(param_8 + lVar3); uVar4 = *(int8 *)(param_8 + 8 + lVar3); if (0xfffffff6 < (uint)uVar4) { *piVar2 = *piVar2 + 1; } *(int **)(lVar1 + lVar3) = piVar2; *(int8 *)(lVar1 + 8 + lVar3) = uVar4; lVar3 = lVar3 + 0x10; } while ((ulong)param_7 << 4 != lVar3); } uVar4 = 0; if ((int)param_7 < (int)(uVar7 + *(ushort *)(lVar5 + 0x42))) { lVar5 = ((ulong)uVar7 + (ulong)*(ushort *)(lVar5 + 0x42)) - (long)(int)param_7; uVar6 = (long)(int)param_7 << 4 | 8; do { lVar3 = param_2[6]; *(int4 *)(lVar3 + -8 + uVar6) = 0; *(int8 *)(lVar3 + uVar6) = 3; uVar6 = uVar6 + 0x10; lVar5 = lVar5 + -1; } while (lVar5 != 0); } } return uVar4; }
35,513
async_func_init
bluesky950520[P]quickjs/quickjs.c
static __exception int async_func_init(JSContext *ctx, JSAsyncFunctionState *s, JSValue func_obj, JSValue this_obj, int argc, JSValue *argv) { JSObject *p; JSFunctionBytecode *b; JSStackFrame *sf; int local_count, i, arg_buf_len, n; sf = &s->frame; init_list_head(&sf->var_ref_list); p = JS_VALUE_GET_OBJ(func_obj); b = p->u.func.function_bytecode; sf->is_strict_mode = b->is_strict_mode; sf->cur_pc = b->byte_code_buf; arg_buf_len = max_int(b->arg_count, argc); local_count = arg_buf_len + b->var_count + b->stack_size; sf->arg_buf = js_malloc(ctx, sizeof(JSValue) * max_int(local_count, 1)); if (!sf->arg_buf) return -1; sf->cur_func = js_dup(func_obj); s->this_val = js_dup(this_obj); s->argc = argc; sf->arg_count = arg_buf_len; sf->var_buf = sf->arg_buf + arg_buf_len; sf->cur_sp = sf->var_buf + b->var_count; for(i = 0; i < argc; i++) sf->arg_buf[i] = js_dup(argv[i]); n = arg_buf_len + b->var_count; for(i = argc; i < n; i++) sf->arg_buf[i] = JS_UNDEFINED; return 0; }
O2
c
async_func_init: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %r14 movq %r8, (%rsp) movq %rcx, %r12 movq %rdx, %r13 movq %rsi, %rbx movl 0x40(%rsp), %edx leaq 0x40(%rsi), %rax movq %rax, 0x40(%rsi) movq %rax, 0x48(%rsi) movq 0x30(%r13), %r15 movl 0x18(%r15), %eax shll $0x1f, %eax movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF andl 0x58(%rsi), %ecx orl %eax, %ecx movl %ecx, 0x58(%rsi) movq 0x20(%r15), %rax movq %rax, 0x50(%rsi) movzwl 0x40(%r15), %ebp cmpl %edx, %ebp cmovlel %edx, %ebp movzwl 0x42(%r15), %esi addl %ebp, %esi movzwl 0x46(%r15), %eax leal (%rsi,%rax), %ecx cmpl $0x1, %ecx adcl %eax, %esi shlq $0x4, %rsi callq 0x17214 movq %rax, 0x30(%rbx) testq %rax, %rax je 0x3adb5 cmpl $-0x9, %r12d jb 0x3acf0 incl (%r13) movq %r13, 0x20(%rbx) movq %r12, 0x28(%rbx) cmpl $-0x9, %r14d movl 0x40(%rsp), %r9d movq (%rsp), %rdx jb 0x3ad09 incl (%rdx) movq 0x48(%rsp), %rcx movq %rdx, (%rbx) movq %r14, 0x8(%rbx) movl %r9d, 0x10(%rbx) movl $0x80000000, %edx # imm = 0x80000000 andl 0x58(%rbx), %edx orl %ebp, %edx movl %edx, 0x58(%rbx) movl %ebp, %edx shlq $0x4, %rdx addq %rdx, %rax movq %rax, 0x38(%rbx) movzwl 0x42(%r15), %edx shll $0x4, %edx addq %rax, %rdx movq %rdx, 0x60(%rbx) xorl %eax, %eax testl %r9d, %r9d movl $0x0, %edx cmovgl %r9d, %edx shlq $0x4, %rdx cmpq %rax, %rdx je 0x3ad7d movq 0x30(%rbx), %rsi movq (%rcx,%rax), %rdi movq 0x8(%rcx,%rax), %r8 cmpl $-0x9, %r8d jb 0x3ad6e incl (%rdi) movq %rdi, (%rsi,%rax) movq %r8, 0x8(%rsi,%rax) addq $0x10, %rax jmp 0x3ad54 movzwl 0x42(%r15), %eax addl %eax, %ebp movslq %r9d, %rax movq %rax, %rcx shlq $0x4, %rcx orq $0x8, %rcx cmpq %rbp, %rax jge 0x3adb1 movq 0x30(%rbx), %rdx andl $0x0, -0x8(%rdx,%rcx) movq $0x3, (%rdx,%rcx) incq %rax addq $0x10, %rcx jmp 0x3ad92 xorl %eax, %eax jmp 0x3adb8 pushq $-0x1 popq %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
async_func_init: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r9 mov [rsp+38h+var_38], r8 mov r12, rcx mov r13, rdx mov rbx, rsi mov edx, [rsp+38h+arg_0] lea rax, [rsi+40h] mov [rsi+40h], rax mov [rsi+48h], rax mov r15, [r13+30h] mov eax, [r15+18h] shl eax, 1Fh mov ecx, 7FFFFFFFh and ecx, [rsi+58h] or ecx, eax mov [rsi+58h], ecx mov rax, [r15+20h] mov [rsi+50h], rax movzx ebp, word ptr [r15+40h] cmp ebp, edx cmovle ebp, edx movzx esi, word ptr [r15+42h] add esi, ebp movzx eax, word ptr [r15+46h] lea ecx, [rsi+rax] cmp ecx, 1 adc esi, eax shl rsi, 4 call js_malloc mov [rbx+30h], rax test rax, rax jz loc_3ADB5 cmp r12d, 0FFFFFFF7h jb short loc_3ACF0 inc dword ptr [r13+0] loc_3ACF0: mov [rbx+20h], r13 mov [rbx+28h], r12 cmp r14d, 0FFFFFFF7h mov r9d, [rsp+38h+arg_0] mov rdx, [rsp+38h+var_38] jb short loc_3AD09 inc dword ptr [rdx] loc_3AD09: mov rcx, [rsp+38h+arg_8] mov [rbx], rdx mov [rbx+8], r14 mov [rbx+10h], r9d mov edx, 80000000h and edx, [rbx+58h] or edx, ebp mov [rbx+58h], edx mov edx, ebp shl rdx, 4 add rax, rdx mov [rbx+38h], rax movzx edx, word ptr [r15+42h] shl edx, 4 add rdx, rax mov [rbx+60h], rdx xor eax, eax test r9d, r9d mov edx, 0 cmovg edx, r9d shl rdx, 4 loc_3AD54: cmp rdx, rax jz short loc_3AD7D mov rsi, [rbx+30h] mov rdi, [rcx+rax] mov r8, [rcx+rax+8] cmp r8d, 0FFFFFFF7h jb short loc_3AD6E inc dword ptr [rdi] loc_3AD6E: mov [rsi+rax], rdi mov [rsi+rax+8], r8 add rax, 10h jmp short loc_3AD54 loc_3AD7D: movzx eax, word ptr [r15+42h] add ebp, eax movsxd rax, r9d mov rcx, rax shl rcx, 4 or rcx, 8 loc_3AD92: cmp rax, rbp jge short loc_3ADB1 mov rdx, [rbx+30h] and dword ptr [rdx+rcx-8], 0 mov qword ptr [rdx+rcx], 3 inc rax add rcx, 10h jmp short loc_3AD92 loc_3ADB1: xor eax, eax jmp short loc_3ADB8 loc_3ADB5: push 0FFFFFFFFFFFFFFFFh pop rax loc_3ADB8: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long async_func_init( long long a1, long long a2, long long a3, long long a4, _DWORD *a5, long long a6, int a7, long long a8) { long long v12; // r15 int v13; // ebp long long v14; // rax long long v15; // rax long long v16; // rax long long v17; // rdx long long v18; // rdx long long v19; // rsi _DWORD *v20; // rdi long long v21; // r8 long long v22; // rbp long long v23; // rax long long v24; // rcx long long v25; // rdx *(_QWORD *)(a2 + 64) = a2 + 64; *(_QWORD *)(a2 + 72) = a2 + 64; v12 = *(_QWORD *)(a3 + 48); *(_DWORD *)(a2 + 88) = (*(_DWORD *)(v12 + 24) << 31) | *(_DWORD *)(a2 + 88) & 0x7FFFFFFF; *(_QWORD *)(a2 + 80) = *(_QWORD *)(v12 + 32); v13 = *(unsigned __int16 *)(v12 + 64); if ( v13 <= a7 ) v13 = a7; v14 = js_malloc( a1, 16LL * (*(unsigned __int16 *)(v12 + 70) + (v13 + *(unsigned __int16 *)(v12 + 66) + *(unsigned __int16 *)(v12 + 70) == 0) + v13 + (unsigned int)*(unsigned __int16 *)(v12 + 66))); *(_QWORD *)(a2 + 48) = v14; if ( !v14 ) return -1LL; if ( (unsigned int)a4 >= 0xFFFFFFF7 ) ++*(_DWORD *)a3; *(_QWORD *)(a2 + 32) = a3; *(_QWORD *)(a2 + 40) = a4; if ( (unsigned int)a6 >= 0xFFFFFFF7 ) ++*a5; *(_QWORD *)a2 = a5; *(_QWORD *)(a2 + 8) = a6; *(_DWORD *)(a2 + 16) = a7; *(_DWORD *)(a2 + 88) = v13 | *(_DWORD *)(a2 + 88) & 0x80000000; v15 = 16LL * (unsigned int)v13 + v14; *(_QWORD *)(a2 + 56) = v15; *(_QWORD *)(a2 + 96) = v15 + 16 * (unsigned int)*(unsigned __int16 *)(v12 + 66); v16 = 0LL; v17 = 0LL; if ( a7 > 0 ) v17 = (unsigned int)a7; v18 = 16 * v17; while ( v18 != v16 ) { v19 = *(_QWORD *)(a2 + 48); v20 = *(_DWORD **)(a8 + v16); v21 = *(_QWORD *)(a8 + v16 + 8); if ( (unsigned int)v21 >= 0xFFFFFFF7 ) ++*v20; *(_QWORD *)(v19 + v16) = v20; *(_QWORD *)(v19 + v16 + 8) = v21; v16 += 16LL; } v22 = (unsigned int)*(unsigned __int16 *)(v12 + 66) + v13; v23 = a7; v24 = (16LL * a7) | 8; while ( v23 < v22 ) { v25 = *(_QWORD *)(a2 + 48); *(_DWORD *)(v25 + v24 - 8) = 0; *(_QWORD *)(v25 + v24) = 3LL; ++v23; v24 += 16LL; } return 0LL; }
async_func_init: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R9 MOV qword ptr [RSP],R8 MOV R12,RCX MOV R13,RDX MOV RBX,RSI MOV EDX,dword ptr [RSP + 0x40] LEA RAX,[RSI + 0x40] MOV qword ptr [RSI + 0x40],RAX MOV qword ptr [RSI + 0x48],RAX MOV R15,qword ptr [R13 + 0x30] MOV EAX,dword ptr [R15 + 0x18] SHL EAX,0x1f MOV ECX,0x7fffffff AND ECX,dword ptr [RSI + 0x58] OR ECX,EAX MOV dword ptr [RSI + 0x58],ECX MOV RAX,qword ptr [R15 + 0x20] MOV qword ptr [RSI + 0x50],RAX MOVZX EBP,word ptr [R15 + 0x40] CMP EBP,EDX CMOVLE EBP,EDX MOVZX ESI,word ptr [R15 + 0x42] ADD ESI,EBP MOVZX EAX,word ptr [R15 + 0x46] LEA ECX,[RSI + RAX*0x1] CMP ECX,0x1 ADC ESI,EAX SHL RSI,0x4 CALL 0x00117214 MOV qword ptr [RBX + 0x30],RAX TEST RAX,RAX JZ 0x0013adb5 CMP R12D,-0x9 JC 0x0013acf0 INC dword ptr [R13] LAB_0013acf0: MOV qword ptr [RBX + 0x20],R13 MOV qword ptr [RBX + 0x28],R12 CMP R14D,-0x9 MOV R9D,dword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP] JC 0x0013ad09 INC dword ptr [RDX] LAB_0013ad09: MOV RCX,qword ptr [RSP + 0x48] MOV qword ptr [RBX],RDX MOV qword ptr [RBX + 0x8],R14 MOV dword ptr [RBX + 0x10],R9D MOV EDX,0x80000000 AND EDX,dword ptr [RBX + 0x58] OR EDX,EBP MOV dword ptr [RBX + 0x58],EDX MOV EDX,EBP SHL RDX,0x4 ADD RAX,RDX MOV qword ptr [RBX + 0x38],RAX MOVZX EDX,word ptr [R15 + 0x42] SHL EDX,0x4 ADD RDX,RAX MOV qword ptr [RBX + 0x60],RDX XOR EAX,EAX TEST R9D,R9D MOV EDX,0x0 CMOVG EDX,R9D SHL RDX,0x4 LAB_0013ad54: CMP RDX,RAX JZ 0x0013ad7d MOV RSI,qword ptr [RBX + 0x30] MOV RDI,qword ptr [RCX + RAX*0x1] MOV R8,qword ptr [RCX + RAX*0x1 + 0x8] CMP R8D,-0x9 JC 0x0013ad6e INC dword ptr [RDI] LAB_0013ad6e: MOV qword ptr [RSI + RAX*0x1],RDI MOV qword ptr [RSI + RAX*0x1 + 0x8],R8 ADD RAX,0x10 JMP 0x0013ad54 LAB_0013ad7d: MOVZX EAX,word ptr [R15 + 0x42] ADD EBP,EAX MOVSXD RAX,R9D MOV RCX,RAX SHL RCX,0x4 OR RCX,0x8 LAB_0013ad92: CMP RAX,RBP JGE 0x0013adb1 MOV RDX,qword ptr [RBX + 0x30] AND dword ptr [RDX + RCX*0x1 + -0x8],0x0 MOV qword ptr [RDX + RCX*0x1],0x3 INC RAX ADD RCX,0x10 JMP 0x0013ad92 LAB_0013adb1: XOR EAX,EAX JMP 0x0013adb8 LAB_0013adb5: PUSH -0x1 POP RAX LAB_0013adb8: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 async_func_init(int8 param_1,int8 *param_2,int *param_3,int8 param_4,int *param_5, int8 param_6,uint param_7,long param_8) { ushort uVar1; long lVar2; int *piVar3; long lVar4; long lVar5; int8 uVar6; ulong uVar7; uint uVar8; int iVar9; param_2[8] = param_2 + 8; param_2[9] = param_2 + 8; lVar5 = *(long *)(param_3 + 0xc); *(uint *)(param_2 + 0xb) = *(uint *)(param_2 + 0xb) & 0x7fffffff | *(int *)(lVar5 + 0x18) << 0x1f; param_2[10] = *(int8 *)(lVar5 + 0x20); uVar8 = (uint)*(ushort *)(lVar5 + 0x40); if ((int)(uint)*(ushort *)(lVar5 + 0x40) <= (int)param_7) { uVar8 = param_7; } iVar9 = *(ushort *)(lVar5 + 0x42) + uVar8; lVar4 = js_malloc(param_1,(ulong)(iVar9 + (uint)*(ushort *)(lVar5 + 0x46) + (uint)(iVar9 + (uint)*(ushort *)(lVar5 + 0x46) == 0)) << 4); param_2[6] = lVar4; if (lVar4 == 0) { uVar6 = 0xffffffffffffffff; } else { if (0xfffffff6 < (uint)param_4) { *param_3 = *param_3 + 1; } param_2[4] = param_3; param_2[5] = param_4; if (0xfffffff6 < (uint)param_6) { *param_5 = *param_5 + 1; } *param_2 = param_5; param_2[1] = param_6; *(uint *)(param_2 + 2) = param_7; *(uint *)(param_2 + 0xb) = *(uint *)(param_2 + 0xb) & 0x80000000 | uVar8; lVar4 = lVar4 + (ulong)uVar8 * 0x10; param_2[7] = lVar4; param_2[0xc] = (ulong)*(ushort *)(lVar5 + 0x42) * 0x10 + lVar4; lVar4 = 0; uVar7 = 0; if (0 < (int)param_7) { uVar7 = (ulong)param_7; } for (; uVar7 * 0x10 != lVar4; lVar4 = lVar4 + 0x10) { lVar2 = param_2[6]; piVar3 = *(int **)(param_8 + lVar4); uVar6 = *(int8 *)(param_8 + 8 + lVar4); if (0xfffffff6 < (uint)uVar6) { *piVar3 = *piVar3 + 1; } *(int **)(lVar2 + lVar4) = piVar3; *(int8 *)(lVar2 + 8 + lVar4) = uVar6; } uVar1 = *(ushort *)(lVar5 + 0x42); lVar5 = (long)(int)param_7; uVar7 = lVar5 << 4 | 8; for (; lVar5 < (long)(ulong)(uVar8 + uVar1); lVar5 = lVar5 + 1) { lVar4 = param_2[6]; *(int4 *)(lVar4 + -8 + uVar7) = 0; *(int8 *)(lVar4 + uVar7) = 3; uVar7 = uVar7 + 0x10; } uVar6 = 0; } return uVar6; }
35,514
print_name
eloqsql/mysys/my_getopt.c
static uint print_name(const struct my_option *optp) { const char *s= optp->name; for (;*s;s++) putchar(*s == '_' ? '-' : *s); return (uint)(s - optp->name); }
O0
c
print_name: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax cmpb $0x0, (%rax) je 0x2e286 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x5f, %eax jne 0x2e266 movl $0x2d, %eax movl %eax, -0x14(%rbp) jmp 0x2e270 movq -0x10(%rbp), %rax movsbl (%rax), %eax movl %eax, -0x14(%rbp) movl -0x14(%rbp), %edi callq 0x24400 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x2e247 movq -0x10(%rbp), %rax movq -0x8(%rbp), %rcx movq (%rcx), %rcx subq %rcx, %rax addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
print_name: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_10], rax loc_2E247: mov rax, [rbp+var_10] cmp byte ptr [rax], 0 jz short loc_2E286 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 5Fh ; '_' jnz short loc_2E266 mov eax, 2Dh ; '-' mov [rbp+var_14], eax jmp short loc_2E270 loc_2E266: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] mov [rbp+var_14], eax loc_2E270: mov edi, [rbp+var_14] call _putchar mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_2E247 loc_2E286: mov rax, [rbp+var_10] mov rcx, [rbp+var_8] mov rcx, [rcx] sub rax, rcx add rsp, 20h pop rbp retn
long long print_name(_BYTE **a1) { unsigned int v2; // [rsp+Ch] [rbp-14h] _BYTE *i; // [rsp+10h] [rbp-10h] for ( i = *a1; *i; ++i ) { if ( *i == 95 ) v2 = 45; else v2 = (char)*i; putchar(v2); } return i - *a1; }
print_name: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x10],RAX LAB_0012e247: MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX],0x0 JZ 0x0012e286 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x5f JNZ 0x0012e266 MOV EAX,0x2d MOV dword ptr [RBP + -0x14],EAX JMP 0x0012e270 LAB_0012e266: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x14],EAX LAB_0012e270: MOV EDI,dword ptr [RBP + -0x14] CALL 0x00124400 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x0012e247 LAB_0012e286: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX] SUB RAX,RCX ADD RSP,0x20 POP RBP RET
long print_name(long *param_1) { int local_1c; char *local_18; for (local_18 = (char *)*param_1; *local_18 != '\0'; local_18 = local_18 + 1) { if (*local_18 == '_') { local_1c = 0x2d; } else { local_1c = (int)*local_18; } putchar(local_1c); } return (long)local_18 - *param_1; }
35,515
nglog::LogDestination::log_destination(nglog::LogSeverity)
ng-log[P]ng-log/src/logging.cc
inline LogDestination* LogDestination::log_destination(LogSeverity severity) { if (log_destinations_[severity] == nullptr) { log_destinations_[severity] = std::make_unique<LogDestination>(severity, nullptr); } return log_destinations_[severity].get(); }
O2
cpp
nglog::LogDestination::log_destination(nglog::LogSeverity): pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movl %edi, 0xc(%rsp) movl %edi, %eax leaq 0x20a3c(%rip), %r15 # 0x2ec00 movq (%r15,%rax,8), %rax testq %rax, %rax jne 0xe20d leaq 0x10(%rsp), %rdx andq $0x0, (%rdx) leaq 0x18(%rsp), %rbx leaq 0xc(%rsp), %r14 movq %rbx, %rdi movq %r14, %rsi callq 0xf095 movl (%r14), %eax leaq (%r15,%rax,8), %rdi movq (%rbx), %rsi andq $0x0, (%rbx) callq 0xf0de movq %rbx, %rdi callq 0xdd84 movl (%r14), %eax movq (%r15,%rax,8), %rax addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq nop
_ZN5nglog14LogDestination15log_destinationENS_11LogSeverityE: push r15 push r14 push rbx sub rsp, 20h mov [rsp+38h+var_2C], edi mov eax, edi lea r15, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_ mov rax, [r15+rax*8] test rax, rax jnz short loc_E20D lea rdx, [rsp+38h+var_28] and qword ptr [rdx], 0 lea rbx, [rsp+38h+var_20] lea r14, [rsp+38h+var_2C] mov rdi, rbx mov rsi, r14 call _ZSt11make_uniqueIN5nglog14LogDestinationEJRNS0_11LogSeverityEDnEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<nglog::LogDestination,nglog::LogSeverity &,decltype(nullptr)>(nglog::LogSeverity &,decltype(nullptr) &&) mov eax, [r14] lea rdi, [r15+rax*8] mov rsi, [rbx] and qword ptr [rbx], 0 call _ZNSt15__uniq_ptr_implIN5nglog14LogDestinationESt14default_deleteIS1_EE5resetEPS1_; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(nglog::LogDestination*) mov rdi, rbx call _ZNSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS1_EED2Ev; std::unique_ptr<nglog::LogDestination>::~unique_ptr() mov eax, [r14] mov rax, [r15+rax*8] loc_E20D: add rsp, 20h pop rbx pop r14 pop r15 retn
long long nglog::LogDestination::log_destination(int a1) { long long result; // rax long long v2; // rsi int v3; // [rsp+Ch] [rbp-2Ch] BYREF long long v4; // [rsp+10h] [rbp-28h] BYREF _QWORD v5[4]; // [rsp+18h] [rbp-20h] BYREF v3 = a1; result = nglog::LogDestination::log_destinations_[a1]; if ( !result ) { v4 = 0LL; std::make_unique<nglog::LogDestination,nglog::LogSeverity &,decltype(nullptr)>(v5, &v3, &v4); v2 = v5[0]; v5[0] = 0LL; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset( &nglog::LogDestination::log_destinations_[v3], v2); std::unique_ptr<nglog::LogDestination>::~unique_ptr(v5); return nglog::LogDestination::log_destinations_[v3]; } return result; }
log_destination: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV dword ptr [RSP + 0xc],EDI MOV EAX,EDI LEA R15,[0x12ec00] MOV RAX,qword ptr [R15 + RAX*0x8] TEST RAX,RAX JNZ 0x0010e20d LEA RDX,[RSP + 0x10] AND qword ptr [RDX],0x0 LEA RBX,[RSP + 0x18] LEA R14,[RSP + 0xc] MOV RDI,RBX MOV RSI,R14 CALL 0x0010f095 MOV EAX,dword ptr [R14] LEA RDI,[R15 + RAX*0x8] MOV RSI,qword ptr [RBX] AND qword ptr [RBX],0x0 CALL 0x0010f0de MOV RDI,RBX CALL 0x0010dd84 MOV EAX,dword ptr [R14] MOV RAX,qword ptr [R15 + RAX*0x8] LAB_0010e20d: ADD RSP,0x20 POP RBX POP R14 POP R15 RET
/* nglog::LogDestination::log_destination(nglog::LogSeverity) */ long nglog::LogDestination::log_destination(uint param_1) { LogDestination *pLVar1; long lVar2; uint local_2c [3]; LogDestination *local_20; lVar2 = (&log_destinations_)[param_1]; if (lVar2 == 0) { local_2c[1] = 0; local_2c[2] = 0; local_2c[0] = param_1; std::make_unique<nglog::LogDestination,nglog::LogSeverity&,decltype(nullptr)> ((unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *) &local_20,(_func_decltype_nullptr **)local_2c); pLVar1 = local_20; local_20 = (LogDestination *)0x0; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset ((__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *) (&log_destinations_ + local_2c[0]),pLVar1); std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::~unique_ptr ((unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *) &local_20); lVar2 = (&log_destinations_)[local_2c[0]]; } return lVar2; }
35,516
ulight::(anonymous namespace)::Parser::try_match_argument()
ulight/src/main/cpp/mmml.cpp
[[nodiscard]] bool try_match_argument() { if (eof()) { return false; } Scoped_Attempt a = attempt(); const std::size_t argument_instruction_index = m_out.size(); m_out.push_back({ AST_Instruction_Type::push_argument }); try_match_argument_name(); const std::optional<std::size_t> result = try_match_trimmed_argument_value(); if (!result) { return false; } m_out[argument_instruction_index].n = *result; m_out.push_back({ AST_Instruction_Type::pop_argument }); a.commit(); return true; }
O0
cpp
ulight::(anonymous namespace)::Parser::try_match_argument(): pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x80(%rbp) callq 0x15cd0 testb $0x1, %al jne 0x16b82 jmp 0x16b8b movb $0x0, -0x1(%rbp) jmp 0x16ca2 movq -0x80(%rbp), %rsi leaq -0x28(%rbp), %rdi callq 0x163a0 movq -0x80(%rbp), %rax movq (%rax), %rdi callq 0x17760 movq %rax, %rcx movq -0x80(%rbp), %rax movq %rcx, -0x30(%rbp) movq (%rax), %rdi movb $0xc, -0x40(%rbp) movq $0x0, -0x38(%rbp) leaq -0x40(%rbp), %rsi callq 0x17780 jmp 0x16bc9 movq -0x80(%rbp), %rdi callq 0x16cc0 jmp 0x16bd4 movq -0x80(%rbp), %rdi callq 0x16eb0 movb %dl, -0x89(%rbp) movq %rax, -0x88(%rbp) jmp 0x16bec movb -0x89(%rbp), %al movq -0x88(%rbp), %rcx movq %rcx, -0x60(%rbp) movb %al, -0x58(%rbp) leaq -0x60(%rbp), %rdi callq 0x186d0 testb $0x1, %al jne 0x16c31 movb $0x0, -0x1(%rbp) movl $0x1, -0x64(%rbp) jmp 0x16c99 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x48(%rbp) movl %eax, -0x4c(%rbp) leaq -0x28(%rbp), %rdi callq 0x16860 jmp 0x16cb0 leaq -0x60(%rbp), %rdi callq 0x186f0 movq %rax, %rcx movq -0x80(%rbp), %rax movq (%rcx), %rcx movq %rcx, -0x98(%rbp) movq (%rax), %rdi movq -0x30(%rbp), %rsi callq 0x177b0 movq -0x98(%rbp), %rdx movq %rax, %rcx movq -0x80(%rbp), %rax movq %rdx, 0x8(%rcx) movq (%rax), %rdi movb $0xd, -0x78(%rbp) movq $0x0, -0x70(%rbp) leaq -0x78(%rbp), %rsi callq 0x17780 jmp 0x16c83 leaq -0x28(%rbp), %rdi callq 0x167e0 jmp 0x16c8e movb $0x1, -0x1(%rbp) movl $0x1, -0x64(%rbp) leaq -0x28(%rbp), %rdi callq 0x16860 movb -0x1(%rbp), %al andb $0x1, %al addq $0xa0, %rsp popq %rbp retq movq -0x48(%rbp), %rdi callq 0x5200 nopl (%rax)
_ZN6ulight12_GLOBAL__N_16Parser18try_match_argumentEv: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_10], rdi mov rdi, [rbp+var_10]; this mov [rbp+var_80], rdi call _ZNK6ulight12_GLOBAL__N_16Parser3eofEv; ulight::`anonymous namespace'::Parser::eof(void) test al, 1 jnz short loc_16B82 jmp short loc_16B8B loc_16B82: mov [rbp+var_1], 0 jmp loc_16CA2 loc_16B8B: mov rsi, [rbp+var_80] lea rdi, [rbp+var_28]; this call _ZN6ulight12_GLOBAL__N_16Parser7attemptEv; ulight::`anonymous namespace'::Parser::attempt(void) mov rax, [rbp+var_80] mov rdi, [rax] call _ZNKSt6vectorIN6ulight15AST_InstructionENSt3pmr21polymorphic_allocatorIS1_EEE4sizeEv; std::vector<ulight::AST_Instruction,std::pmr::polymorphic_allocator<ulight::AST_Instruction>>::size(void) mov rcx, rax mov rax, [rbp+var_80] mov [rbp+var_30], rcx mov rdi, [rax] mov [rbp+var_40], 0Ch mov [rbp+var_38], 0 lea rsi, [rbp+var_40] call _ZNSt6vectorIN6ulight15AST_InstructionENSt3pmr21polymorphic_allocatorIS1_EEE9push_backEOS1_; std::vector<ulight::AST_Instruction,std::pmr::polymorphic_allocator<ulight::AST_Instruction>>::push_back(ulight::AST_Instruction&&) jmp short $+2 loc_16BC9: mov rdi, [rbp+var_80]; this call _ZN6ulight12_GLOBAL__N_16Parser23try_match_argument_nameEv; ulight::`anonymous namespace'::Parser::try_match_argument_name(void) jmp short $+2 loc_16BD4: mov rdi, [rbp+var_80]; this call _ZN6ulight12_GLOBAL__N_16Parser32try_match_trimmed_argument_valueEv; ulight::`anonymous namespace'::Parser::try_match_trimmed_argument_value(void) mov [rbp+var_89], dl mov [rbp+var_88], rax jmp short $+2 loc_16BEC: mov al, [rbp+var_89] mov rcx, [rbp+var_88] mov [rbp+var_60], rcx mov [rbp+var_58], al lea rdi, [rbp+var_60] call _ZNKSt8optionalImEcvbEv; std::optional<ulong>::operator bool(void) test al, 1 jnz short loc_16C31 mov [rbp+var_1], 0 mov [rbp+var_64], 1 jmp short loc_16C99 mov rcx, rax mov eax, edx mov [rbp+var_48], rcx mov [rbp+var_4C], eax lea rdi, [rbp+var_28]; this call _ZN6ulight12_GLOBAL__N_16Parser14Scoped_AttemptD2Ev; ulight::`anonymous namespace'::Parser::Scoped_Attempt::~Scoped_Attempt() jmp short loc_16CB0 loc_16C31: lea rdi, [rbp+var_60] call _ZNKRSt8optionalImEdeEv; std::optional<ulong>::operator*(void) mov rcx, rax mov rax, [rbp+var_80] mov rcx, [rcx] mov [rbp+var_98], rcx mov rdi, [rax] mov rsi, [rbp+var_30] call _ZNSt6vectorIN6ulight15AST_InstructionENSt3pmr21polymorphic_allocatorIS1_EEEixEm; std::vector<ulight::AST_Instruction,std::pmr::polymorphic_allocator<ulight::AST_Instruction>>::operator[](ulong) mov rdx, [rbp+var_98] mov rcx, rax mov rax, [rbp+var_80] mov [rcx+8], rdx mov rdi, [rax] mov [rbp+var_78], 0Dh mov [rbp+var_70], 0 lea rsi, [rbp+var_78] call _ZNSt6vectorIN6ulight15AST_InstructionENSt3pmr21polymorphic_allocatorIS1_EEE9push_backEOS1_; std::vector<ulight::AST_Instruction,std::pmr::polymorphic_allocator<ulight::AST_Instruction>>::push_back(ulight::AST_Instruction&&) jmp short $+2 loc_16C83: lea rdi, [rbp+var_28]; this call _ZN6ulight12_GLOBAL__N_16Parser14Scoped_Attempt6commitEv; ulight::`anonymous namespace'::Parser::Scoped_Attempt::commit(void) jmp short $+2 loc_16C8E: mov [rbp+var_1], 1 mov [rbp+var_64], 1 loc_16C99: lea rdi, [rbp+var_28]; this call _ZN6ulight12_GLOBAL__N_16Parser14Scoped_AttemptD2Ev; ulight::`anonymous namespace'::Parser::Scoped_Attempt::~Scoped_Attempt() loc_16CA2: mov al, [rbp+var_1] and al, 1 add rsp, 0A0h pop rbp retn loc_16CB0: mov rdi, [rbp+var_48] call __Unwind_Resume
char ulight::`anonymous namespace'::Parser::try_match_argument(ulight::_anonymous_namespace_::Parser *this) { long long v1; // rdi char v2; // dl long long v3; // rdi long long v5; // [rsp+8h] [rbp-98h] char v7[8]; // [rsp+28h] [rbp-78h] BYREF long long v8; // [rsp+30h] [rbp-70h] int v9; // [rsp+3Ch] [rbp-64h] long long matched; // [rsp+40h] [rbp-60h] BYREF char v11; // [rsp+48h] [rbp-58h] char v12[8]; // [rsp+60h] [rbp-40h] BYREF long long v13; // [rsp+68h] [rbp-38h] long long v14; // [rsp+70h] [rbp-30h] _BYTE v15[24]; // [rsp+78h] [rbp-28h] BYREF ulight::_anonymous_namespace_::Parser *v16; // [rsp+90h] [rbp-10h] char v17; // [rsp+9Fh] [rbp-1h] v16 = this; if ( ulight::`anonymous namespace'::Parser::eof(this) ) { v17 = 0; } else { ulight::`anonymous namespace'::Parser::attempt((ulight::_anonymous_namespace_::Parser *)v15, (long long)this); v14 = std::vector<ulight::AST_Instruction,std::pmr::polymorphic_allocator<ulight::AST_Instruction>>::size(*(_QWORD *)this); v1 = *(_QWORD *)this; v12[0] = 12; v13 = 0LL; std::vector<ulight::AST_Instruction,std::pmr::polymorphic_allocator<ulight::AST_Instruction>>::push_back(v1, v12); ulight::`anonymous namespace'::Parser::try_match_argument_name(this); matched = ulight::`anonymous namespace'::Parser::try_match_trimmed_argument_value(this); v11 = v2; if ( (std::optional<unsigned long>::operator bool(&matched) & 1) != 0 ) { v5 = *(_QWORD *)std::optional<unsigned long>::operator*(&matched); *(_QWORD *)(std::vector<ulight::AST_Instruction,std::pmr::polymorphic_allocator<ulight::AST_Instruction>>::operator[]( *(_QWORD *)this, v14) + 8) = v5; v3 = *(_QWORD *)this; v7[0] = 13; v8 = 0LL; std::vector<ulight::AST_Instruction,std::pmr::polymorphic_allocator<ulight::AST_Instruction>>::push_back(v3, v7); ulight::`anonymous namespace'::Parser::Scoped_Attempt::commit((ulight::_anonymous_namespace_::Parser::Scoped_Attempt *)v15); v17 = 1; } else { v17 = 0; } v9 = 1; ulight::`anonymous namespace'::Parser::Scoped_Attempt::~Scoped_Attempt((ulight::_anonymous_namespace_::Parser::Scoped_Attempt *)v15); } return v17 & 1; }
try_match_argument: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x80],RDI CALL 0x00115cd0 TEST AL,0x1 JNZ 0x00116b82 JMP 0x00116b8b LAB_00116b82: MOV byte ptr [RBP + -0x1],0x0 JMP 0x00116ca2 LAB_00116b8b: MOV RSI,qword ptr [RBP + -0x80] LEA RDI,[RBP + -0x28] CALL 0x001163a0 MOV RAX,qword ptr [RBP + -0x80] MOV RDI,qword ptr [RAX] CALL 0x00117760 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0x30],RCX MOV RDI,qword ptr [RAX] MOV byte ptr [RBP + -0x40],0xc MOV qword ptr [RBP + -0x38],0x0 LAB_00116bbe: LEA RSI,[RBP + -0x40] CALL 0x00117780 JMP 0x00116bc9 LAB_00116bc9: MOV RDI,qword ptr [RBP + -0x80] CALL 0x00116cc0 JMP 0x00116bd4 LAB_00116bd4: MOV RDI,qword ptr [RBP + -0x80] CALL 0x00116eb0 MOV byte ptr [RBP + -0x89],DL MOV qword ptr [RBP + -0x88],RAX JMP 0x00116bec LAB_00116bec: MOV AL,byte ptr [RBP + -0x89] MOV RCX,qword ptr [RBP + -0x88] MOV qword ptr [RBP + -0x60],RCX MOV byte ptr [RBP + -0x58],AL LEA RDI,[RBP + -0x60] CALL 0x001186d0 TEST AL,0x1 JNZ 0x00116c31 MOV byte ptr [RBP + -0x1],0x0 MOV dword ptr [RBP + -0x64],0x1 JMP 0x00116c99 LAB_00116c31: LEA RDI,[RBP + -0x60] CALL 0x001186f0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x80] MOV RCX,qword ptr [RCX] MOV qword ptr [RBP + -0x98],RCX MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x30] CALL 0x001177b0 MOV RDX,qword ptr [RBP + -0x98] MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RCX + 0x8],RDX MOV RDI,qword ptr [RAX] MOV byte ptr [RBP + -0x78],0xd MOV qword ptr [RBP + -0x70],0x0 LEA RSI,[RBP + -0x78] CALL 0x00117780 JMP 0x00116c83 LAB_00116c83: LEA RDI,[RBP + -0x28] CALL 0x001167e0 LAB_00116c8c: JMP 0x00116c8e LAB_00116c8e: MOV byte ptr [RBP + -0x1],0x1 MOV dword ptr [RBP + -0x64],0x1 LAB_00116c99: LEA RDI,[RBP + -0x28] CALL 0x00116860 LAB_00116ca2: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0xa0 POP RBP RET
/* ulight::(anonymous namespace)::Parser::try_match_argument() */ ulong __thiscall ulight::(anonymous_namespace)::Parser::try_match_argument(Parser *this) { int8 uVar1; ulong uVar2; int8 *puVar3; long lVar4; int1 extraout_DL; AST_Instruction local_80 [8]; int8 local_78; int4 local_6c; int8 local_68; int1 local_60; AST_Instruction local_48 [8]; int8 local_40; ulong local_38; Scoped_Attempt local_30 [24]; Parser *local_18; int1 local_9; local_18 = this; uVar2 = eof(this); if ((uVar2 & 1) == 0) { attempt(); local_38 = std:: vector<ulight::AST_Instruction,std::pmr::polymorphic_allocator<ulight::AST_Instruction>> ::size(*(vector<ulight::AST_Instruction,std::pmr::polymorphic_allocator<ulight::AST_Instruction>> **)this); local_48[0] = (AST_Instruction)0xc; local_40 = 0; /* try { // try from 00116bbe to 00116c8b has its CatchHandler @ 00116c1a */ std::vector<ulight::AST_Instruction,std::pmr::polymorphic_allocator<ulight::AST_Instruction>>:: push_back(*(vector<ulight::AST_Instruction,std::pmr::polymorphic_allocator<ulight::AST_Instruction>> **)this,local_48); try_match_argument_name(this); local_68 = try_match_trimmed_argument_value(this); local_60 = extraout_DL; local_9 = std::optional::operator_cast_to_bool((optional *)&local_68); if ((bool)local_9) { puVar3 = (int8 *) std::optional<unsigned_long>::operator*((optional<unsigned_long> *)&local_68); uVar1 = *puVar3; lVar4 = std:: vector<ulight::AST_Instruction,std::pmr::polymorphic_allocator<ulight::AST_Instruction>> ::operator[](*(vector<ulight::AST_Instruction,std::pmr::polymorphic_allocator<ulight::AST_Instruction>> **)this,local_38); *(int8 *)(lVar4 + 8) = uVar1; local_80[0] = (AST_Instruction)0xd; local_78 = 0; std::vector<ulight::AST_Instruction,std::pmr::polymorphic_allocator<ulight::AST_Instruction>> ::push_back(*(vector<ulight::AST_Instruction,std::pmr::polymorphic_allocator<ulight::AST_Instruction>> **)this,local_80); Scoped_Attempt::commit(local_30); } local_6c = 1; uVar2 = Scoped_Attempt::~Scoped_Attempt(local_30); } else { local_9 = 0; } return CONCAT71((int7)(uVar2 >> 8),local_9) & 0xffffffffffffff01; }
35,517
bool minja::Value::get<bool>() const
monkey531[P]llama/common/minja.hpp
T get() const { if (is_primitive()) return primitive_.get<T>(); throw std::runtime_error("get<T> not defined for this value type: " + dump()); }
O1
cpp
bool minja::Value::get<bool>() const: pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpq $0x0, 0x10(%rdi) jne 0x95462 cmpq $0x0, 0x20(%r14) jne 0x95462 cmpq $0x0, 0x30(%r14) jne 0x95462 addq $0x40, %r14 movq %rsp, %rbx movb $0x0, (%rbx) movq %r14, %rdi movq %rbx, %rsi callq 0x956a1 movb (%rbx), %al addq $0x40, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x10, %edi callq 0x1b450 movq %rax, %rbx leaq 0x20(%rsp), %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x94712 leaq 0x6a901(%rip), %rsi # 0xffd8b movq %rsp, %rdi leaq 0x20(%rsp), %rdx callq 0x8661b movb $0x1, %bpl movq %rsp, %rsi movq %rbx, %rdi callq 0x1be80 xorl %ebp, %ebp movq 0xa7b3a(%rip), %rsi # 0x13cfe8 movq 0xa7aa3(%rip), %rdx # 0x13cf58 movq %rbx, %rdi callq 0x1bf90 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x954e3 movq 0x10(%rsp), %rsi incq %rsi callq 0x1b8f0 jmp 0x954e3 movq %rax, %r14 movb $0x1, %bpl leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x95506 movq 0x30(%rsp), %rsi incq %rsi callq 0x1b8f0 jmp 0x95506 movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x95513 movq %rbx, %rdi callq 0x1b680 movq %r14, %rdi callq 0x1c020 nop
_ZNK5minja5Value3getIbEET_v: push rbp push r14 push rbx sub rsp, 40h mov r14, rdi cmp qword ptr [rdi+10h], 0 jnz short loc_95462 cmp qword ptr [r14+20h], 0 jnz short loc_95462 cmp qword ptr [r14+30h], 0 jnz short loc_95462 add r14, 40h ; '@' mov rbx, rsp mov byte ptr [rbx], 0 mov rdi, r14 mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_9boolean_tE; nlohmann::json_abi_v3_11_3::detail::from_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>>(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>::boolean_t &) mov al, [rbx] add rsp, 40h pop rbx pop r14 pop rbp retn loc_95462: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+58h+var_38] mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aGetTNotDefined; "get<T> not defined for this value type:"... mov rdi, rsp lea rdx, [rsp+58h+var_38] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 mov rsi, rsp mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_954E3 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_954E3 mov r14, rax mov bpl, 1 loc_954E3: lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_95506 mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_95506 mov r14, rax mov bpl, 1 loc_95506: test bpl, bpl jz short loc_95513 mov rdi, rbx; void * call ___cxa_free_exception loc_95513: mov rdi, r14 call __Unwind_Resume
char minja::Value::get<bool>(_QWORD *a1) { void *exception; // rbx _BYTE v3[16]; // [rsp+0h] [rbp-58h] BYREF _BYTE v4[16]; // [rsp+20h] [rbp-38h] BYREF if ( a1[2] || a1[4] || a1[6] ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v4, (long long)a1, 0xFFFFFFFF, 0); std::operator+<char>((long long)v3, (long long)"get<T> not defined for this value type: ", (long long)v4); std::runtime_error::runtime_error(exception, v3); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v3[0] = 0; nlohmann::json_abi_v3_11_3::detail::from_json<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>>( a1 + 8, v3); return v3[0]; }
get<bool>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP qword ptr [RDI + 0x10],0x0 JNZ 0x00195462 CMP qword ptr [R14 + 0x20],0x0 JNZ 0x00195462 CMP qword ptr [R14 + 0x30],0x0 JNZ 0x00195462 ADD R14,0x40 MOV RBX,RSP MOV byte ptr [RBX],0x0 MOV RDI,R14 MOV RSI,RBX CALL 0x001956a1 MOV AL,byte ptr [RBX] ADD RSP,0x40 POP RBX POP R14 POP RBP RET LAB_00195462: MOV EDI,0x10 CALL 0x0011b450 MOV RBX,RAX LAB_0019546f: LEA RDI,[RSP + 0x20] MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x00194712 LAB_00195483: LEA RSI,[0x1ffd8b] MOV RDI,RSP LEA RDX,[RSP + 0x20] CALL 0x0018661b MOV BPL,0x1 LAB_0019549a: MOV RSI,RSP MOV RDI,RBX CALL 0x0011be80 XOR EBP,EBP MOV RSI,qword ptr [0x0023cfe8] MOV RDX,qword ptr [0x0023cf58] MOV RDI,RBX CALL 0x0011bf90
/* bool minja::Value::get<bool>() const */ bool __thiscall minja::Value::get<bool>(Value *this) { runtime_error *this_00; string local_58 [32]; int1 local_38 [32]; if (((*(long *)(this + 0x10) == 0) && (*(long *)(this + 0x20) == 0)) && (*(long *)(this + 0x30) == 0)) { local_58[0] = (string)0x0; nlohmann::json_abi_v3_11_3::detail:: from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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 *)(this + 0x40),local_58); return (bool)local_58[0]; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0019546f to 00195482 has its CatchHandler @ 00195500 */ dump_abi_cxx11_((int)local_38,SUB81(this,0)); /* try { // try from 00195483 to 00195496 has its CatchHandler @ 001954dd */ std::operator+((char *)local_58,(string *)"get<T> not defined for this value type: "); /* try { // try from 0019549a to 001954bc has its CatchHandler @ 001954bd */ std::runtime_error::runtime_error(this_00,local_58); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_0023cfe8,PTR__runtime_error_0023cf58); }
35,518
bool minja::Value::get<bool>() const
monkey531[P]llama/common/minja.hpp
T get() const { if (is_primitive()) return primitive_.get<T>(); throw std::runtime_error("get<T> not defined for this value type: " + dump()); }
O2
cpp
bool minja::Value::get<bool>() const: pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 callq 0x6ec70 testb %al, %al je 0x6f626 addq $0x40, %r14 movq %r14, %rdi addq $0x40, %rsp popq %rbx popq %r14 popq %rbp jmp 0x6f80c pushq $0x10 popq %rdi callq 0x24470 movq %rax, %rbx movq %rsp, %rdi pushq $-0x1 popq %rdx movq %r14, %rsi xorl %ecx, %ecx callq 0x6ec80 leaq 0x506e3(%rip), %rsi # 0xbfd2b leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x64496 movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x24e90 xorl %ebp, %ebp movq 0x9c982(%rip), %rsi # 0x10bff0 movq 0x9c8e3(%rip), %rdx # 0x10bf58 movq %rbx, %rdi callq 0x24f80 movq %rax, %r14 leaq 0x20(%rsp), %rdi callq 0x25298 jmp 0x6f692 movq %rax, %r14 movb $0x1, %bpl movq %rsp, %rdi callq 0x25298 testb %bpl, %bpl jne 0x6f6a4 jmp 0x6f6ac movq %rax, %r14 movq %rbx, %rdi callq 0x246a0 movq %r14, %rdi callq 0x25010
_ZNK5minja5Value3getIbEET_v: push rbp push r14 push rbx sub rsp, 40h mov r14, rdi call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void) test al, al jz short loc_6F626 add r14, 40h ; '@' mov rdi, r14 add rsp, 40h pop rbx pop r14 pop rbp jmp _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIbTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE loc_6F626: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r14 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aGetTNotDefined; "get<T> not defined for this value type:"... lea rdi, [rsp+58h+var_38] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+58h+var_38] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+58h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6F692 mov r14, rax mov bpl, 1 loc_6F692: mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_6F6A4 jmp short loc_6F6AC mov r14, rax loc_6F6A4: mov rdi, rbx; void * call ___cxa_free_exception loc_6F6AC: mov rdi, r14 call __Unwind_Resume
long long minja::Value::get<bool>(minja::Value *a1) { void *exception; // rbx _BYTE v3[32]; // [rsp+0h] [rbp-58h] BYREF _BYTE v4[56]; // [rsp+20h] [rbp-38h] BYREF if ( !minja::Value::is_primitive(a1) ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v3, (long long)a1, 0xFFFFFFFF, 0); std::operator+<char>((long long)v4, (long long)"get<T> not defined for this value type: ", (long long)v3); std::runtime_error::runtime_error(exception, v4); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIbTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE((char *)a1 + 64); }
get<bool>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RDI CALL 0x0016ec70 TEST AL,AL JZ 0x0016f626 ADD R14,0x40 MOV RDI,R14 ADD RSP,0x40 POP RBX POP R14 POP RBP JMP 0x0016f80c LAB_0016f626: PUSH 0x10 POP RDI CALL 0x00124470 MOV RBX,RAX LAB_0016f631: MOV RDI,RSP PUSH -0x1 POP RDX MOV RSI,R14 XOR ECX,ECX CALL 0x0016ec80 LAB_0016f641: LEA RSI,[0x1bfd2b] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x00164496 MOV BPL,0x1 LAB_0016f658: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x00124e90 XOR EBP,EBP MOV RSI,qword ptr [0x0020bff0] MOV RDX,qword ptr [0x0020bf58] MOV RDI,RBX CALL 0x00124f80
/* bool minja::Value::get<bool>() const */ bool __thiscall minja::Value::get<bool>(Value *this) { runtime_error *this_00; char cVar1; bool bVar2; int1 auStack_58 [32]; string local_38 [32]; cVar1 = is_primitive(this); if (cVar1 != '\0') { bVar2 = (bool)_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIbTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE (this + 0x40); return bVar2; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016f631 to 0016f640 has its CatchHandler @ 0016f6a1 */ dump_abi_cxx11_((int)auStack_58,SUB81(this,0)); /* try { // try from 0016f641 to 0016f654 has its CatchHandler @ 0016f68c */ std::operator+((char *)local_38,(string *)"get<T> not defined for this value type: "); /* try { // try from 0016f658 to 0016f67c has its CatchHandler @ 0016f67d */ std::runtime_error::runtime_error(this_00,local_38); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_0020bff0,PTR__runtime_error_0020bf58); }
35,519
bool minja::Value::get<bool>() const
monkey531[P]llama/common/minja.hpp
T get() const { if (is_primitive()) return primitive_.get<T>(); throw std::runtime_error("get<T> not defined for this value type: " + dump()); }
O3
cpp
bool minja::Value::get<bool>() const: pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpq $0x0, 0x10(%rdi) jne 0x9e5c1 cmpq $0x0, 0x20(%r14) jne 0x9e5c1 cmpq $0x0, 0x30(%r14) jne 0x9e5c1 addq $0x40, %r14 leaq 0x20(%rsp), %rbx movl $0x0, (%rbx) movq %r14, %rdi movq %rbx, %rsi callq 0x9e68f movl (%rbx), %eax addq $0x40, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x10, %edi callq 0x1b450 movq %rax, %rbx movq %rsp, %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x941f8 leaq 0x5f794(%rip), %rsi # 0xfdd7b leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x86aa5 movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x1be80 xorl %ebp, %ebp movq 0x9c9db(%rip), %rsi # 0x13afe8 movq 0x9c944(%rip), %rdx # 0x13af58 movq %rbx, %rdi callq 0x1bf90 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9e63a movq 0x30(%rsp), %rsi incq %rsi callq 0x1b8f0 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9e655 movq 0x10(%rsp), %rsi incq %rsi callq 0x1b8f0 testb %bpl, %bpl jne 0x9e67f jmp 0x9e687 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9e67f movq 0x10(%rsp), %rsi incq %rsi callq 0x1b8f0 jmp 0x9e67f movq %rax, %r14 movq %rbx, %rdi callq 0x1b680 movq %r14, %rdi callq 0x1c020
_ZNK5minja5Value3getIiEET_v: push rbp push r14 push rbx sub rsp, 40h mov r14, rdi cmp qword ptr [rdi+10h], 0 jnz short loc_9E5C1 cmp qword ptr [r14+20h], 0 jnz short loc_9E5C1 cmp qword ptr [r14+30h], 0 jnz short loc_9E5C1 add r14, 40h ; '@' lea rbx, [rsp+58h+var_38] mov dword ptr [rbx], 0 mov rdi, r14 mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_ mov eax, [rbx] add rsp, 40h pop rbx pop r14 pop rbp retn loc_9E5C1: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aGetTNotDefined; "get<T> not defined for this value type:"... lea rdi, [rsp+58h+var_38] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+58h+var_38] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9E63A mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9E63A: lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9E655 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9E655: test bpl, bpl jnz short loc_9E67F jmp short loc_9E687 mov r14, rax lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9E67F mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9E67F mov r14, rax loc_9E67F: mov rdi, rbx; void * call ___cxa_free_exception loc_9E687: mov rdi, r14 call __Unwind_Resume
long long minja::Value::get<int>(_QWORD *a1) { void *exception; // rbx _BYTE v3[16]; // [rsp+0h] [rbp-58h] BYREF _DWORD v4[4]; // [rsp+20h] [rbp-38h] BYREF if ( a1[2] || a1[4] || a1[6] ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v3, (long long)a1, 0xFFFFFFFF, 0); std::operator+<char>((long long)v4, (long long)"get<T> not defined for this value type: ", (long long)v3); std::runtime_error::runtime_error(exception, v4); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v4[0] = 0; ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_( a1 + 8, v4); return v4[0]; }
get<int>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP qword ptr [RDI + 0x10],0x0 JNZ 0x0019e5c1 CMP qword ptr [R14 + 0x20],0x0 JNZ 0x0019e5c1 CMP qword ptr [R14 + 0x30],0x0 JNZ 0x0019e5c1 ADD R14,0x40 LEA RBX,[RSP + 0x20] MOV dword ptr [RBX],0x0 MOV RDI,R14 MOV RSI,RBX CALL 0x0019e68f MOV EAX,dword ptr [RBX] ADD RSP,0x40 POP RBX POP R14 POP RBP RET LAB_0019e5c1: MOV EDI,0x10 CALL 0x0011b450 MOV RBX,RAX LAB_0019e5ce: MOV RDI,RSP MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x001941f8 LAB_0019e5e0: LEA RSI,[0x1fdd7b] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x00186aa5 MOV BPL,0x1 LAB_0019e5f7: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x0011be80 XOR EBP,EBP MOV RSI,qword ptr [0x0023afe8] MOV RDX,qword ptr [0x0023af58] MOV RDI,RBX CALL 0x0011bf90
/* int minja::Value::get<int>() const */ int __thiscall minja::Value::get<int>(Value *this) { runtime_error *this_00; int1 auStack_58 [32]; int local_38 [8]; if (((*(long *)(this + 0x10) == 0) && (*(long *)(this + 0x20) == 0)) && (*(long *)(this + 0x30) == 0)) { local_38[0] = 0; _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_ (this + 0x40,local_38); return local_38[0]; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0019e5ce to 0019e5df has its CatchHandler @ 0019e67c */ dump_abi_cxx11_((int)auStack_58,SUB81(this,0)); /* try { // try from 0019e5e0 to 0019e5f3 has its CatchHandler @ 0019e65c */ std::operator+((char *)local_38,(string *)"get<T> not defined for this value type: "); /* try { // try from 0019e5f7 to 0019e61b has its CatchHandler @ 0019e61c */ std::runtime_error::runtime_error(this_00,(string *)local_38); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_0023afe8,PTR__runtime_error_0023af58); }
35,520
chess::Bitboard chess::attacks::shift<(chess::Direction)7>(chess::Bitboard)
Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp
[[nodiscard]] inline constexpr Bitboard attacks::shift(const Bitboard b) { switch (direction) { case Direction::NORTH: return b << 8; case Direction::SOUTH: return b >> 8; case Direction::NORTH_WEST: return (b & ~MASK_FILE[0]) << 7; case Direction::WEST: return (b & ~MASK_FILE[0]) >> 1; case Direction::SOUTH_WEST: return (b & ~MASK_FILE[0]) >> 9; case Direction::NORTH_EAST: return (b & ~MASK_FILE[7]) << 9; case Direction::EAST: return (b & ~MASK_FILE[7]) << 1; case Direction::SOUTH_EAST: return (b & ~MASK_FILE[7]) >> 7; } // c++23 #if defined(__cpp_lib_unreachable) && __cpp_lib_unreachable >= 202202L std::unreachable(); #endif assert(false); return {}; }
O0
cpp
chess::Bitboard chess::attacks::shift<(chess::Direction)7>(chess::Bitboard): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x10(%rbp) leaq -0x10(%rbp), %rdi movl $0x8, %esi callq 0x16340 movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN5chess7attacks5shiftILNS_9DirectionEn8EEENS_8BitboardES3_: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_10], rdi lea rdi, [rbp+var_10] mov esi, 8 call _ZNK5chess8BitboardrsEm; chess::Bitboard::operator>>(ulong) mov [rbp+var_8], rax mov rax, [rbp+var_8] add rsp, 10h pop rbp retn
long long chess::attacks::shift<(chess::Direction)-8>(long long a1) { long long v2; // [rsp+0h] [rbp-10h] BYREF v2 = a1; return chess::Bitboard::operator>>(&v2, 8); }
shift<(chess::Direction)-8>: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x10],RDI LEA RDI,[RBP + -0x10] MOV ESI,0x8 CALL 0x00116340 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x10 POP RBP RET
/* chess::Bitboard chess::attacks::shift<(chess::Direction)-8>(chess::Bitboard) */ int8 chess::attacks::shift<(chess::Direction)_8>(int8 param_1) { int8 uVar1; int8 local_18 [2]; local_18[0] = param_1; uVar1 = Bitboard::operator>>((Bitboard *)local_18,8); return uVar1; }
35,521
ma_apply_undo_bulk_insert
eloqsql/storage/maria/ma_blockrec.c
my_bool _ma_apply_undo_bulk_insert(MARIA_HA *info, LSN undo_lsn) { my_bool error; LSN lsn; DBUG_ENTER("_ma_apply_undo_bulk_insert"); /* We delete all rows, re-enable indices as bulk insert had disabled non-unique ones. */ error= (maria_delete_all_rows(info) || maria_enable_indexes(info) || /* we enabled indices so need '2' below */ _ma_state_info_write(info->s, MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET | MA_STATE_INFO_WRITE_FULL_INFO | MA_STATE_INFO_WRITE_LOCK) || _ma_write_clr(info, undo_lsn, LOGREC_UNDO_BULK_INSERT, FALSE, 0, &lsn, NULL)); DBUG_RETURN(error); }
O3
c
ma_apply_undo_bulk_insert: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x18, %rsp movq %rsi, %rbx movq %rdi, %r14 callq 0x5e094 movb $0x1, %r15b testl %eax, %eax jne 0x4f85c movq %r14, %rdi callq 0x37cfb testl %eax, %eax jne 0x4f85c movq (%r14), %rdi movl $0x7, %esi callq 0x36e8a testl %eax, %eax jne 0x4f85c movq $0x0, (%rsp) leaq -0x20(%rbp), %r9 movq %r14, %rdi movq %rbx, %rsi movl $0x27, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x3d9bd testb %al, %al setne %r15b movl %r15d, %eax addq $0x18, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_ma_apply_undo_bulk_insert: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 18h mov rbx, rsi mov r14, rdi call maria_delete_all_rows mov r15b, 1 test eax, eax jnz short loc_4F85C mov rdi, r14 call maria_enable_indexes test eax, eax jnz short loc_4F85C mov rdi, [r14] mov esi, 7 call _ma_state_info_write test eax, eax jnz short loc_4F85C mov [rsp+30h+var_30], 0 lea r9, [rbp+var_20] mov rdi, r14 mov rsi, rbx mov edx, 27h ; ''' xor ecx, ecx xor r8d, r8d call _ma_write_clr test al, al setnz r15b loc_4F85C: mov eax, r15d add rsp, 18h pop rbx pop r14 pop r15 pop rbp retn
long long ma_apply_undo_bulk_insert(long long *a1, long long a2) { unsigned int v2; // r15d _BYTE v4[32]; // [rsp+10h] [rbp-20h] BYREF LOBYTE(v2) = 1; if ( !(unsigned int)maria_delete_all_rows() && !(unsigned int)maria_enable_indexes(a1) && !(unsigned int)ma_state_info_write(*a1, 7u) ) { LOBYTE(v2) = (unsigned __int8)ma_write_clr(a1, a2, 39, 0, 0, (unsigned long long)v4, 0LL) != 0; } return v2; }
_ma_apply_undo_bulk_insert: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RSI MOV R14,RDI CALL 0x0015e094 MOV R15B,0x1 TEST EAX,EAX JNZ 0x0014f85c MOV RDI,R14 CALL 0x00137cfb TEST EAX,EAX JNZ 0x0014f85c MOV RDI,qword ptr [R14] MOV ESI,0x7 CALL 0x00136e8a TEST EAX,EAX JNZ 0x0014f85c MOV qword ptr [RSP],0x0 LEA R9,[RBP + -0x20] MOV RDI,R14 MOV RSI,RBX MOV EDX,0x27 XOR ECX,ECX XOR R8D,R8D CALL 0x0013d9bd TEST AL,AL SETNZ R15B LAB_0014f85c: MOV EAX,R15D ADD RSP,0x18 POP RBX POP R14 POP R15 POP RBP RET
ulong _ma_apply_undo_bulk_insert(int8 *param_1,int8 param_2) { char cVar1; int iVar2; int8 unaff_R15; ulong uVar3; int1 local_28 [8]; int7 uVar4; iVar2 = maria_delete_all_rows(); uVar4 = (int7)((ulong)unaff_R15 >> 8); uVar3 = CONCAT71(uVar4,1); if (iVar2 == 0) { iVar2 = maria_enable_indexes(param_1); if (iVar2 == 0) { iVar2 = _ma_state_info_write(*param_1,7); if (iVar2 == 0) { cVar1 = _ma_write_clr(param_1,param_2,0x27,0,0,local_28,0); uVar3 = CONCAT71(uVar4,cVar1 != '\0'); } } } return uVar3 & 0xffffffff; }
35,522
MNN::CreateSliceTf(flatbuffers::FlatBufferBuilder&, MNN::SliceTfT const*, std::__1::function<unsigned long (void*)> const*)
mnn-tts/MNN/schema/current/TensorflowOp_generated.h
inline flatbuffers::Offset<SliceTf> CreateSliceTf(flatbuffers::FlatBufferBuilder &_fbb, const SliceTfT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const SliceTfT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _T = _o->T; return MNN::CreateSliceTf( _fbb, _T); }
O0
c
MNN::CreateSliceTf(flatbuffers::FlatBufferBuilder&, MNN::SliceTfT const*, std::__1::function<unsigned long (void*)> const*): subq $0x48, %rsp movq %rdi, 0x38(%rsp) movq %rsi, 0x30(%rsp) movq %rdx, 0x28(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x30(%rsp), %rax movl (%rax), %eax movl %eax, 0xc(%rsp) movq 0x38(%rsp), %rdi movl 0xc(%rsp), %esi callq 0x53030 movl %eax, 0x44(%rsp) movl 0x44(%rsp), %eax addq $0x48, %rsp retq nopw (%rax,%rax)
_ZN3MNN13CreateSliceTfERN11flatbuffers17FlatBufferBuilderEPKNS_8SliceTfTEPKNSt3__18functionIFmPvEEE: sub rsp, 48h mov [rsp+48h+var_10], rdi mov [rsp+48h+var_18], rsi mov [rsp+48h+var_20], rdx mov rax, [rsp+48h+var_10] mov [rsp+48h+var_38], rax mov rax, [rsp+48h+var_18] mov [rsp+48h+var_30], rax mov rax, [rsp+48h+var_20] mov [rsp+48h+var_28], rax mov rax, [rsp+48h+var_18] mov eax, [rax] mov [rsp+48h+var_3C], eax mov rdi, [rsp+48h+var_10] mov esi, [rsp+48h+var_3C] call _ZN3MNN13CreateSliceTfERN11flatbuffers17FlatBufferBuilderENS_8DataTypeE; MNN::CreateSliceTf(flatbuffers::FlatBufferBuilder &,MNN::DataType) mov [rsp+48h+var_4], eax mov eax, [rsp+48h+var_4] add rsp, 48h retn
long long MNN::CreateSliceTf(long long a1, unsigned int *a2) { return (unsigned int)MNN::CreateSliceTf(a1, *a2); }
CreateSliceTf: SUB RSP,0x48 MOV qword ptr [RSP + 0x38],RDI MOV qword ptr [RSP + 0x30],RSI MOV qword ptr [RSP + 0x28],RDX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x30] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0xc],EAX MOV RDI,qword ptr [RSP + 0x38] MOV ESI,dword ptr [RSP + 0xc] CALL 0x00153030 MOV dword ptr [RSP + 0x44],EAX MOV EAX,dword ptr [RSP + 0x44] ADD RSP,0x48 RET
/* MNN::CreateSliceTf(flatbuffers::FlatBufferBuilder&, MNN::SliceTfT const*, std::function<unsigned long (void*)> const*) */ int4 MNN::CreateSliceTf(FlatBufferBuilder *param_1,SliceTfT *param_2,function *param_3) { int4 uVar1; uVar1 = CreateSliceTf(param_1,*(int4 *)param_2); return uVar1; }
35,523
resize_queue
eloqsql/mysys/queues.c
int resize_queue(QUEUE *queue, uint max_elements) { uchar **new_root; DBUG_ENTER("resize_queue"); if (queue->max_elements == max_elements) DBUG_RETURN(0); if ((new_root= (uchar **) my_realloc(key_memory_QUEUE, (void *)queue->root, (max_elements + 1)* sizeof(void*), MYF(MY_WME))) == 0) DBUG_RETURN(1); set_if_smaller(queue->elements, max_elements); queue->max_elements= max_elements; queue->root= new_root; DBUG_RETURN(0); }
O0
c
resize_queue: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq -0x10(%rbp), %rax movl 0x14(%rax), %eax cmpl -0x14(%rbp), %eax jne 0xff8f6 jmp 0xff8ed movl $0x0, -0x4(%rbp) jmp 0xff969 leaq 0xb8edb3(%rip), %rax # 0xc8e6b0 movl (%rax), %edi movq -0x10(%rbp), %rax movq (%rax), %rsi movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, %eax movl %eax, %edx shlq $0x3, %rdx movl $0x10, %ecx callq 0xfc1f0 movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0xff933 jmp 0xff92a movl $0x1, -0x4(%rbp) jmp 0xff969 jmp 0xff935 movq -0x10(%rbp), %rax movl 0x10(%rax), %eax cmpl -0x14(%rbp), %eax jbe 0xff94b movl -0x14(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x10(%rax) jmp 0xff94d movl -0x14(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x14(%rax) movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
resize_queue: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov rax, [rbp+var_10] mov eax, [rax+14h] cmp eax, [rbp+var_14] jnz short loc_FF8F6 jmp short $+2 loc_FF8ED: mov [rbp+var_4], 0 jmp short loc_FF969 loc_FF8F6: lea rax, key_memory_QUEUE mov edi, [rax] mov rax, [rbp+var_10] mov rsi, [rax] mov eax, [rbp+var_14] add eax, 1 mov eax, eax mov edx, eax shl rdx, 3 mov ecx, 10h call my_realloc mov [rbp+var_20], rax cmp rax, 0 jnz short loc_FF933 jmp short $+2 loc_FF92A: mov [rbp+var_4], 1 jmp short loc_FF969 loc_FF933: jmp short $+2 loc_FF935: mov rax, [rbp+var_10] mov eax, [rax+10h] cmp eax, [rbp+var_14] jbe short loc_FF94B mov ecx, [rbp+var_14] mov rax, [rbp+var_10] mov [rax+10h], ecx loc_FF94B: jmp short $+2 loc_FF94D: mov ecx, [rbp+var_14] mov rax, [rbp+var_10] mov [rax+14h], ecx mov rcx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 0 loc_FF969: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long resize_queue(long long a1, unsigned int a2) { long long v3; // [rsp+0h] [rbp-20h] if ( *(_DWORD *)(a1 + 20) == a2 ) { return 0; } else { v3 = my_realloc(key_memory_QUEUE, *(_QWORD *)a1, (const char *)(8LL * (a2 + 1)), 16); if ( v3 ) { if ( *(_DWORD *)(a1 + 16) > a2 ) *(_DWORD *)(a1 + 16) = a2; *(_DWORD *)(a1 + 20) = a2; *(_QWORD *)a1 = v3; return 0; } else { return 1; } } }
resize_queue: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x14] CMP EAX,dword ptr [RBP + -0x14] JNZ 0x001ff8f6 JMP 0x001ff8ed LAB_001ff8ed: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001ff969 LAB_001ff8f6: LEA RAX,[0xd8e6b0] MOV EDI,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX] MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV EAX,EAX MOV EDX,EAX SHL RDX,0x3 MOV ECX,0x10 CALL 0x001fc1f0 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x001ff933 JMP 0x001ff92a LAB_001ff92a: MOV dword ptr [RBP + -0x4],0x1 JMP 0x001ff969 LAB_001ff933: JMP 0x001ff935 LAB_001ff935: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x10] CMP EAX,dword ptr [RBP + -0x14] JBE 0x001ff94b MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x10],ECX LAB_001ff94b: JMP 0x001ff94d LAB_001ff94d: MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x14],ECX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x0 LAB_001ff969: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 resize_queue(long *param_1,uint param_2) { long lVar1; int4 local_c; if (*(uint *)((long)param_1 + 0x14) == param_2) { local_c = 0; } else { lVar1 = my_realloc(key_memory_QUEUE,*param_1,(ulong)(param_2 + 1) << 3,0x10); if (lVar1 == 0) { local_c = 1; } else { if (param_2 < *(uint *)(param_1 + 2)) { *(uint *)(param_1 + 2) = param_2; } *(uint *)((long)param_1 + 0x14) = param_2; *param_1 = lVar1; local_c = 0; } } return local_c; }
35,524
my_wc_mb_cp932
eloqsql/strings/ctype-cp932.c
static int my_wc_mb_cp932(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; if ((int) wc < 0x80) /* ASCII: [U+0000..U+007F] -> [00-7F] */ { /* This branch is for performance purposes on ASCII range, to avoid using unicode_to_cp932[]: about 10% improvement. */ if (s >= e) return MY_CS_TOOSMALL; s[0]= (uchar) wc; return 1; } if (wc > 0xFFFF || !(code= unicode_to_cp932[wc])) /* Bad Unicode code point */ return MY_CS_ILUNI; if (code <= 0xFF) { /* JIS-X-0201 HALF WIDTH KATAKANA [U+FF61..U+FF9F] -> [A1..DF] */ if (s >= e) return MY_CS_TOOSMALL; s[0]= code; return 1; } if (s + 2 > e) return MY_CS_TOOSMALL2; MY_PUT_MB2(s, code); /* JIS-X-0208(MS) */ return 2; }
O0
c
my_wc_mb_cp932: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x18(%rbp), %rax cmpl $0x80, %eax jge 0x6e39d movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x6e385 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x6e434 movq -0x18(%rbp), %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0x6e434 cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF ja 0x6e3be movq -0x18(%rbp), %rcx leaq 0x7f53e(%rip), %rax # 0xed8f0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jne 0x6e3c7 movl $0x0, -0x4(%rbp) jmp 0x6e434 cmpl $0xff, -0x2c(%rbp) jg 0x6e3f7 movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x6e3e3 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x6e434 movl -0x2c(%rbp), %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0x6e434 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x6e40e movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x6e434 movl -0x2c(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl -0x2c(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x1(%rax) movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax)
my_wc_mb_cp932: 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_18] cmp eax, 80h jge short loc_6E39D mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_6E385 mov [rbp+var_4], 0FFFFFF9Bh jmp loc_6E434 loc_6E385: mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 1 jmp loc_6E434 loc_6E39D: cmp [rbp+var_18], 0FFFFh ja short loc_6E3BE mov rcx, [rbp+var_18] lea rax, unicode_to_cp932 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_2C], eax cmp eax, 0 jnz short loc_6E3C7 loc_6E3BE: mov [rbp+var_4], 0 jmp short loc_6E434 loc_6E3C7: cmp [rbp+var_2C], 0FFh jg short loc_6E3F7 mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_6E3E3 mov [rbp+var_4], 0FFFFFF9Bh jmp short loc_6E434 loc_6E3E3: mov eax, [rbp+var_2C] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 1 jmp short loc_6E434 loc_6E3F7: mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_6E40E mov [rbp+var_4], 0FFFFFF9Ah jmp short loc_6E434 loc_6E40E: mov eax, [rbp+var_2C] sar eax, 8 mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov eax, [rbp+var_2C] and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax+1], cl mov [rbp+var_4], 2 loc_6E434: mov eax, [rbp+var_4] pop rbp retn
long long my_wc_mb_cp932(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { unsigned __int16 v5; // [rsp+0h] [rbp-2Ch] if ( (int)a2 >= 128 ) { if ( a2 <= 0xFFFF && (v5 = unicode_to_cp932[a2]) != 0 ) { if ( unicode_to_cp932[a2] > 0xFFu ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { *a3 = HIBYTE(v5); a3[1] = v5; return 2; } else { return (unsigned int)-102; } } else if ( (unsigned long long)a3 < a4 ) { *a3 = v5; return 1; } else { return (unsigned int)-101; } } else { return 0; } } else if ( (unsigned long long)a3 < a4 ) { *a3 = a2; return 1; } else { return (unsigned int)-101; } }
my_wc_mb_cp932: 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 + -0x18] CMP EAX,0x80 JGE 0x0016e39d MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x0016e385 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x0016e434 LAB_0016e385: MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x1 JMP 0x0016e434 LAB_0016e39d: CMP qword ptr [RBP + -0x18],0xffff JA 0x0016e3be MOV RCX,qword ptr [RBP + -0x18] LEA RAX,[0x1ed8f0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JNZ 0x0016e3c7 LAB_0016e3be: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0016e434 LAB_0016e3c7: CMP dword ptr [RBP + -0x2c],0xff JG 0x0016e3f7 MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x0016e3e3 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x0016e434 LAB_0016e3e3: MOV EAX,dword ptr [RBP + -0x2c] MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x1 JMP 0x0016e434 LAB_0016e3f7: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x0016e40e MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x0016e434 LAB_0016e40e: MOV EAX,dword ptr [RBP + -0x2c] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x2c] AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],CL MOV dword ptr [RBP + -0x4],0x2 LAB_0016e434: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_wc_mb_cp932(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4) { ushort uVar1; int4 local_c; if ((int)param_2 < 0x80) { if (param_3 < param_4) { *param_3 = (char)param_2; local_c = 1; } else { local_c = 0xffffff9b; } } else if ((param_2 < 0x10000) && (uVar1 = *(ushort *)(unicode_to_cp932 + param_2 * 2), uVar1 != 0)) { if (uVar1 < 0x100) { if (param_3 < param_4) { *param_3 = (char)uVar1; local_c = 1; } else { local_c = 0xffffff9b; } } else if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else { *param_3 = (char)(uVar1 >> 8); param_3[1] = (char)uVar1; local_c = 2; } } else { local_c = 0; } return local_c; }
35,525
pagecache_file_set_null_hooks
eloqsql/storage/maria/ma_pagecache.c
void pagecache_file_set_null_hooks(PAGECACHE_FILE *file) { file->pre_read_hook= null_pre_hook; file->post_read_hook= null_post_read_hook; file->pre_write_hook= null_pre_hook; file->post_write_hook= null_post_write_hook; file->flush_log_callback= null_pre_hook; file->callback_data= NULL; file->head_blocks= file->big_block_size= 0; }
O0
c
pagecache_file_set_null_hooks: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax leaq 0x6d(%rip), %rcx # 0x318e0 movq %rcx, 0x18(%rax) movq -0x8(%rbp), %rax leaq 0x6e(%rip), %rcx # 0x318f0 movq %rcx, 0x20(%rax) movq -0x8(%rbp), %rax leaq 0x4f(%rip), %rcx # 0x318e0 movq %rcx, 0x28(%rax) movq -0x8(%rbp), %rax leaq 0x70(%rip), %rcx # 0x31910 movq %rcx, 0x30(%rax) movq -0x8(%rbp), %rax leaq 0x31(%rip), %rcx # 0x318e0 movq %rcx, 0x38(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x40(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x8(%rax) movq -0x8(%rbp), %rax movq $0x0, (%rax) popq %rbp retq nopl (%rax,%rax)
pagecache_file_set_null_hooks: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] lea rcx, null_pre_hook mov [rax+18h], rcx mov rax, [rbp+var_8] lea rcx, null_post_read_hook mov [rax+20h], rcx mov rax, [rbp+var_8] lea rcx, null_pre_hook mov [rax+28h], rcx mov rax, [rbp+var_8] lea rcx, null_post_write_hook mov [rax+30h], rcx mov rax, [rbp+var_8] lea rcx, null_pre_hook mov [rax+38h], rcx mov rax, [rbp+var_8] mov qword ptr [rax+40h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+8], 0 mov rax, [rbp+var_8] mov qword ptr [rax], 0 pop rbp retn
_QWORD * pagecache_file_set_null_hooks(_QWORD *a1) { _QWORD *result; // rax a1[3] = null_pre_hook; a1[4] = null_post_read_hook; a1[5] = null_pre_hook; a1[6] = null_post_write_hook; a1[7] = null_pre_hook; a1[8] = 0LL; a1[1] = 0LL; result = a1; *a1 = 0LL; return result; }
pagecache_file_set_null_hooks: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x1318e0] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x1318f0] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x1318e0] MOV qword ptr [RAX + 0x28],RCX MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x131910] MOV qword ptr [RAX + 0x30],RCX MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x1318e0] MOV qword ptr [RAX + 0x38],RCX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x40],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],0x0 POP RBP RET
void pagecache_file_set_null_hooks(int8 *param_1) { param_1[3] = null_pre_hook; param_1[4] = null_post_read_hook; param_1[5] = null_pre_hook; param_1[6] = null_post_write_hook; param_1[7] = null_pre_hook; param_1[8] = 0; param_1[1] = 0; *param_1 = 0; return; }
35,526
minja::ForNode::ForNode(minja::Location const&, 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>>>>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool, std::shared_ptr<minja::TemplateNode>&&)
monkey531[P]llama/common/minja.hpp
ForNode(const Location & location, std::vector<std::string> && var_names, std::shared_ptr<Expression> && iterable, std::shared_ptr<Expression> && condition, std::shared_ptr<TemplateNode> && body, bool recursive, std::shared_ptr<TemplateNode> && else_body) : TemplateNode(location), var_names(var_names), iterable(std::move(iterable)), condition(std::move(condition)), body(std::move(body)), recursive(recursive), else_body(std::move(else_body)) {}
O2
cpp
minja::ForNode::ForNode(minja::Location const&, 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>>>>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool, std::shared_ptr<minja::TemplateNode>&&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %r9, %r14 movq %r8, %r15 movq %rcx, %r12 movq %rdx, %r13 movq %rdi, %rbx callq 0x723d8 leaq 0x8862e(%rip), %rax # 0xfb090 addq $0x10, %rax movq %rax, (%rbx) leaq 0x20(%rbx), %rdi movq %r13, %rsi callq 0x3904e andq $0x0, 0x40(%rbx) movups (%r12), %xmm0 andq $0x0, 0x8(%r12) movups %xmm0, 0x38(%rbx) andq $0x0, (%r12) movq 0x38(%rsp), %rax andq $0x0, 0x50(%rbx) movups (%r15), %xmm0 andq $0x0, 0x8(%r15) movups %xmm0, 0x48(%rbx) andq $0x0, (%r15) movb 0x30(%rsp), %cl andq $0x0, 0x60(%rbx) movups (%r14), %xmm0 andq $0x0, 0x8(%r14) movups %xmm0, 0x58(%rbx) andq $0x0, (%r14) movb %cl, 0x68(%rbx) andq $0x0, 0x78(%rbx) movups (%rax), %xmm0 andq $0x0, 0x8(%rax) movups %xmm0, 0x70(%rbx) andq $0x0, (%rax) popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq %rbx, %rdi callq 0x77052 movq %r14, %rdi callq 0x23f10
_ZN5minja7ForNodeC2ERKNS_8LocationEOSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EEOSt10shared_ptrINS_10ExpressionEESH_OSE_INS_12TemplateNodeEEbSK_: push r15 push r14 push r13 push r12 push rbx mov r14, r9 mov r15, r8 mov r12, rcx mov r13, rdx mov rbx, rdi call _ZN5minja12TemplateNodeC2ERKNS_8LocationE; minja::TemplateNode::TemplateNode(minja::Location const&) lea rax, _ZTVN5minja7ForNodeE; `vtable for'minja::ForNode add rax, 10h mov [rbx], rax lea rdi, [rbx+20h] mov rsi, r13 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) and qword ptr [rbx+40h], 0 movups xmm0, xmmword ptr [r12] and qword ptr [r12+8], 0 movups xmmword ptr [rbx+38h], xmm0 and qword ptr [r12], 0 mov rax, [rsp+28h+arg_8] and qword ptr [rbx+50h], 0 movups xmm0, xmmword ptr [r15] and qword ptr [r15+8], 0 movups xmmword ptr [rbx+48h], xmm0 and qword ptr [r15], 0 mov cl, [rsp+28h+arg_0] and qword ptr [rbx+60h], 0 movups xmm0, xmmword ptr [r14] and qword ptr [r14+8], 0 movups xmmword ptr [rbx+58h], xmm0 and qword ptr [r14], 0 mov [rbx+68h], cl and qword ptr [rbx+78h], 0 movups xmm0, xmmword ptr [rax] and qword ptr [rax+8], 0 movups xmmword ptr [rbx+70h], xmm0 and qword ptr [rax], 0 pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, rbx; this call _ZN5minja12TemplateNodeD2Ev; minja::TemplateNode::~TemplateNode() mov rdi, r14 call __Unwind_Resume
long long minja::ForNode::ForNode( long long a1, _QWORD *a2, _QWORD *a3, __int128 *a4, __int128 *a5, __int128 *a6, char a7, __int128 *a8) { __int128 v12; // xmm0 long long result; // rax __int128 v14; // xmm0 __int128 v15; // xmm0 __int128 v16; // xmm0 minja::TemplateNode::TemplateNode((_QWORD *)a1, a2); *(_QWORD *)a1 = &`vtable for'minja::ForNode + 2; std::vector<std::string>::vector((_QWORD *)(a1 + 32), a3); *(_QWORD *)(a1 + 64) = 0LL; v12 = *a4; *((_QWORD *)a4 + 1) = 0LL; *(_OWORD *)(a1 + 56) = v12; *(_QWORD *)a4 = 0LL; result = (long long)a8; *(_QWORD *)(a1 + 80) = 0LL; v14 = *a5; *((_QWORD *)a5 + 1) = 0LL; *(_OWORD *)(a1 + 72) = v14; *(_QWORD *)a5 = 0LL; *(_QWORD *)(a1 + 96) = 0LL; v15 = *a6; *((_QWORD *)a6 + 1) = 0LL; *(_OWORD *)(a1 + 88) = v15; *(_QWORD *)a6 = 0LL; *(_BYTE *)(a1 + 104) = a7; *(_QWORD *)(a1 + 120) = 0LL; v16 = *a8; *((_QWORD *)a8 + 1) = 0LL; *(_OWORD *)(a1 + 112) = v16; *(_QWORD *)a8 = 0LL; return result; }
ForNode: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R14,R9 MOV R15,R8 MOV R12,RCX MOV R13,RDX MOV RBX,RDI CALL 0x001723d8 LEA RAX,[0x1fb090] ADD RAX,0x10 MOV qword ptr [RBX],RAX LEA RDI,[RBX + 0x20] LAB_00172a6d: MOV RSI,R13 CALL 0x0013904e LAB_00172a75: AND qword ptr [RBX + 0x40],0x0 MOVUPS XMM0,xmmword ptr [R12] AND qword ptr [R12 + 0x8],0x0 MOVUPS xmmword ptr [RBX + 0x38],XMM0 AND qword ptr [R12],0x0 MOV RAX,qword ptr [RSP + 0x38] AND qword ptr [RBX + 0x50],0x0 MOVUPS XMM0,xmmword ptr [R15] AND qword ptr [R15 + 0x8],0x0 MOVUPS xmmword ptr [RBX + 0x48],XMM0 AND qword ptr [R15],0x0 MOV CL,byte ptr [RSP + 0x30] AND qword ptr [RBX + 0x60],0x0 MOVUPS XMM0,xmmword ptr [R14] AND qword ptr [R14 + 0x8],0x0 MOVUPS xmmword ptr [RBX + 0x58],XMM0 AND qword ptr [R14],0x0 MOV byte ptr [RBX + 0x68],CL AND qword ptr [RBX + 0x78],0x0 MOVUPS XMM0,xmmword ptr [RAX] AND qword ptr [RAX + 0x8],0x0 MOVUPS xmmword ptr [RBX + 0x70],XMM0 AND qword ptr [RAX],0x0 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* minja::ForNode::ForNode(minja::Location const&, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool, std::shared_ptr<minja::TemplateNode>&&) */ void __thiscall minja::ForNode::ForNode (ForNode *this,Location *param_1,vector *param_2,shared_ptr *param_3,shared_ptr *param_4, shared_ptr *param_5,bool param_6,shared_ptr *param_7) { int8 uVar1; TemplateNode::TemplateNode((TemplateNode *)this,param_1); *(int ***)this = &PTR_do_render_001fb0a0; /* try { // try from 00172a6d to 00172a74 has its CatchHandler @ 00172ae5 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x20), param_2); *(int8 *)(this + 0x40) = 0; uVar1 = *(int8 *)(param_3 + 8); *(int8 *)(param_3 + 8) = 0; *(int8 *)(this + 0x38) = *(int8 *)param_3; *(int8 *)(this + 0x40) = uVar1; *(int8 *)param_3 = 0; *(int8 *)(this + 0x50) = 0; uVar1 = *(int8 *)(param_4 + 8); *(int8 *)(param_4 + 8) = 0; *(int8 *)(this + 0x48) = *(int8 *)param_4; *(int8 *)(this + 0x50) = uVar1; *(int8 *)param_4 = 0; *(int8 *)(this + 0x60) = 0; uVar1 = *(int8 *)(param_5 + 8); *(int8 *)(param_5 + 8) = 0; *(int8 *)(this + 0x58) = *(int8 *)param_5; *(int8 *)(this + 0x60) = uVar1; *(int8 *)param_5 = 0; this[0x68] = (ForNode)param_6; *(int8 *)(this + 0x78) = 0; uVar1 = *(int8 *)(param_7 + 8); *(int8 *)(param_7 + 8) = 0; *(int8 *)(this + 0x70) = *(int8 *)param_7; *(int8 *)(this + 0x78) = uVar1; *(int8 *)param_7 = 0; return; }
35,527
google::protobuf::util::converter::JsonObjectWriter::~JsonObjectWriter()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/util/internal/json_objectwriter.cc
JsonObjectWriter::~JsonObjectWriter() { if (element_ && !element_->is_root()) { GOOGLE_LOG(WARNING) << "JsonObjectWriter was not fully closed."; } }
O0
cpp
google::protobuf::util::converter::JsonObjectWriter::~JsonObjectWriter(): subq $0x68, %rsp movq %rdi, 0x60(%rsp) movq 0x60(%rsp), %rdi movq %rdi, 0x18(%rsp) leaq 0x1b32fe(%rip), %rax # 0x74bee8 addq $0x10, %rax movq %rax, (%rdi) addq $0x10, %rdi callq 0x599af0 testb $0x1, %al jne 0x598c00 jmp 0x598c76 movq 0x18(%rsp), %rdi addq $0x10, %rdi callq 0x599b10 movq %rax, %rdi callq 0x599b20 movb %al, 0x17(%rsp) jmp 0x598c1c movb 0x17(%rsp), %al testb $0x1, %al jne 0x598c76 jmp 0x598c26 leaq 0x65586(%rip), %rdx # 0x5fe1b3 leaq 0x28(%rsp), %rdi movl $0x1, %esi movl $0x34, %ecx callq 0x3ef0b0 jmp 0x598c43 leaq 0x655e5(%rip), %rsi # 0x5fe22f leaq 0x28(%rsp), %rdi callq 0x3ee970 movq %rax, 0x8(%rsp) jmp 0x598c5b movq 0x8(%rsp), %rsi leaq 0x27(%rsp), %rdi callq 0x3eeb20 jmp 0x598c6c leaq 0x28(%rsp), %rdi callq 0x3ef0f0 movq 0x18(%rsp), %rdi addq $0x30, %rdi callq 0x19b990 movq 0x18(%rsp), %rdi addq $0x20, %rdi callq 0x441220 movq 0x18(%rsp), %rdi addq $0x10, %rdi callq 0x441230 movq 0x18(%rsp), %rdi callq 0x4412b0 addq $0x68, %rsp retq movq %rax, %rdi callq 0x1af200 nopw (%rax,%rax)
_ZN6google8protobuf4util9converter16JsonObjectWriterD2Ev: sub rsp, 68h mov [rsp+68h+var_8], rdi mov rdi, [rsp+68h+var_8] mov [rsp+68h+var_50], rdi lea rax, _ZTVN6google8protobuf4util9converter16JsonObjectWriterE; `vtable for'google::protobuf::util::converter::JsonObjectWriter add rax, 10h mov [rdi], rax add rdi, 10h call _ZNKSt10unique_ptrIN6google8protobuf4util9converter16JsonObjectWriter7ElementESt14default_deleteIS5_EEcvbEv; std::unique_ptr<google::protobuf::util::converter::JsonObjectWriter::Element>::operator bool(void) test al, 1 jnz short loc_598C00 jmp short loc_598C76 loc_598C00: mov rdi, [rsp+68h+var_50] add rdi, 10h call _ZNKSt10unique_ptrIN6google8protobuf4util9converter16JsonObjectWriter7ElementESt14default_deleteIS5_EEptEv; std::unique_ptr<google::protobuf::util::converter::JsonObjectWriter::Element>::operator->(void) mov rdi, rax; this call _ZNK6google8protobuf4util9converter22StructuredObjectWriter11BaseElement7is_rootEv; google::protobuf::util::converter::StructuredObjectWriter::BaseElement::is_root(void) mov [rsp+68h+var_51], al jmp short $+2 loc_598C1C: mov al, [rsp+68h+var_51] test al, 1 jnz short loc_598C76 jmp short $+2 loc_598C26: lea rdx, aWorkspaceLlm4b_59; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+68h+var_40] mov esi, 1 mov ecx, 34h ; '4' call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) jmp short $+2 loc_598C43: lea rsi, aJsonobjectwrit; "JsonObjectWriter was not fully closed." lea rdi, [rsp+68h+var_40] call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+68h+var_60], rax jmp short $+2 loc_598C5B: mov rsi, [rsp+68h+var_60] lea rdi, [rsp+68h+var_41] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_598C6C: lea rdi, [rsp+68h+var_40]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_598C76: mov rdi, [rsp+68h+var_50] add rdi, 30h ; '0' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rsp+68h+var_50] add rdi, 20h ; ' '; this call _ZN6google8protobuf4util9converter16JsonObjectWriter15ByteSinkWrapperD2Ev; google::protobuf::util::converter::JsonObjectWriter::ByteSinkWrapper::~ByteSinkWrapper() mov rdi, [rsp+68h+var_50] add rdi, 10h call _ZNSt10unique_ptrIN6google8protobuf4util9converter16JsonObjectWriter7ElementESt14default_deleteIS5_EED2Ev; std::unique_ptr<google::protobuf::util::converter::JsonObjectWriter::Element>::~unique_ptr() mov rdi, [rsp+68h+var_50]; this call _ZN6google8protobuf4util9converter22StructuredObjectWriterD2Ev; google::protobuf::util::converter::StructuredObjectWriter::~StructuredObjectWriter() add rsp, 68h retn mov rdi, rax call __clang_call_terminate
void google::protobuf::util::converter::JsonObjectWriter::~JsonObjectWriter( google::protobuf::util::converter::JsonObjectWriter *this) { google::protobuf::util::converter::StructuredObjectWriter::BaseElement *v1; // rdi google::protobuf::internal::LogMessage *v2; // [rsp+8h] [rbp-60h] char v4; // [rsp+27h] [rbp-41h] BYREF _BYTE v5[56]; // [rsp+28h] [rbp-40h] BYREF google::protobuf::util::converter::JsonObjectWriter *v6; // [rsp+60h] [rbp-8h] v6 = this; *(_QWORD *)this = &`vtable for'google::protobuf::util::converter::JsonObjectWriter + 2; if ( (std::unique_ptr<google::protobuf::util::converter::JsonObjectWriter::Element>::operator bool((char *)this + 16) & 1) != 0 ) { v1 = (google::protobuf::util::converter::StructuredObjectWriter::BaseElement *)std::unique_ptr<google::protobuf::util::converter::JsonObjectWriter::Element>::operator->((char *)this + 16); if ( (google::protobuf::util::converter::StructuredObjectWriter::BaseElement::is_root(v1) & 1) == 0 ) { google::protobuf::internal::LogMessage::LogMessage( (long long)v5, 1, (long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/util/internal/" "json_objectwriter.cc", 52); v2 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<( (long long)v5, (long long)"JsonObjectWriter was not fully closed."); google::protobuf::internal::LogFinisher::operator=((long long)&v4, v2); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v5); } } std::string::~string((char *)this + 48); google::protobuf::util::converter::JsonObjectWriter::ByteSinkWrapper::~ByteSinkWrapper((google::protobuf::util::converter::JsonObjectWriter *)((char *)this + 32)); std::unique_ptr<google::protobuf::util::converter::JsonObjectWriter::Element>::~unique_ptr((long long)this + 16); google::protobuf::util::converter::StructuredObjectWriter::~StructuredObjectWriter(this); }
FindFieldByLowercaseName: SUB RSP,0x48 MOV qword ptr [RSP + 0x38],RDI MOV qword ptr [RSP + 0x30],RSI MOV RDI,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x10],RDI CALL 0x00515ea0 MOV RAX,qword ptr [RAX + 0x80] MOV qword ptr [RSP + 0x8],RAX MOV RSI,qword ptr [RSP + 0x30] LEA RDI,[RSP + 0x18] CALL 0x004b7cf0 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x20] CALL 0x005d7420 MOV qword ptr [RSP + 0x28],RAX CMP qword ptr [RSP + 0x28],0x0 JZ 0x00598c3e MOV RDI,qword ptr [RSP + 0x28] CALL 0x0050f420 TEST AL,0x1 JNZ 0x00598c3e JMP 0x00598c49 LAB_00598c3e: MOV qword ptr [RSP + 0x40],0x0 JMP 0x00598c53 LAB_00598c49: MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x40],RAX LAB_00598c53: MOV RAX,qword ptr [RSP + 0x40] ADD RSP,0x48 RET
/* google::protobuf::Descriptor::FindFieldByLowercaseName(std::__cxx11::string const&) const */ FieldDescriptor * __thiscall google::protobuf::Descriptor::FindFieldByLowercaseName(Descriptor *this,string *param_1) { int8 uVar1; long lVar2; ulong uVar3; int8 local_30; int8 local_28; FieldDescriptor *local_20; string *local_18; Descriptor *local_10; local_18 = param_1; local_10 = this; lVar2 = file(this); uVar1 = *(int8 *)(lVar2 + 0x80); stringpiece_internal::StringPiece::StringPiece<std::allocator<char>> ((StringPiece *)&local_30,local_18); local_20 = (FieldDescriptor *) FileDescriptorTables::FindFieldByLowercaseName(uVar1,this,local_30,local_28); if ((local_20 != (FieldDescriptor *)0x0) && (uVar3 = FieldDescriptor::is_extension(local_20), (uVar3 & 1) == 0)) { return local_20; } return (FieldDescriptor *)0x0; }
35,528
decimal2double
eloqsql/strings/decimal.c
int decimal2double(const decimal_t *from, double *to) { char strbuf[FLOATING_POINT_BUFFER], *end; int len= sizeof(strbuf); int rc, error; rc = decimal2string(from, strbuf, &len, 0, 0, 0); end= strbuf + len; DBUG_PRINT("info", ("interm.: %s", strbuf)); *to= my_strtod(strbuf, &end, &error); DBUG_PRINT("info", ("result: %f", *to)); return (rc != E_DEC_OK) ? rc : (error ? E_DEC_OVERFLOW : E_DEC_OK); }
O3
c
decimal2double: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x180, %rsp # imm = 0x180 movq %rsi, %rbx movq %fs:0x28, %rax movq %rax, -0x28(%rbp) leaq -0x198(%rbp), %r14 movl $0x15e, (%r14) # imm = 0x15E leaq -0x190(%rbp), %r15 movq %r15, %rsi movq %r14, %rdx xorl %ecx, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x268c4 movl %eax, %r12d movslq (%r14), %rax addq %rbp, %rax addq $-0x190, %rax # imm = 0xFE70 leaq -0x1a0(%rbp), %rsi movq %rax, (%rsi) leaq -0x194(%rbp), %r14 movq %r15, %rdi movq %r14, %rdx callq 0x2adfc movsd %xmm0, (%rbx) xorl %eax, %eax cmpl $0x0, (%r14) setne %al addl %eax, %eax testl %r12d, %r12d cmovnel %r12d, %eax movq %fs:0x28, %rcx cmpq -0x28(%rbp), %rcx jne 0x27f5c addq $0x180, %rsp # imm = 0x180 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq callq 0x24320
decimal2double: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 180h mov rbx, rsi mov rax, fs:28h mov [rbp+var_28], rax lea r14, [rbp+var_198] mov dword ptr [r14], 15Eh lea r15, [rbp+var_190] mov rsi, r15 mov rdx, r14 xor ecx, ecx xor r8d, r8d xor r9d, r9d call decimal2string mov r12d, eax movsxd rax, dword ptr [r14] add rax, rbp add rax, 0FFFFFFFFFFFFFE70h lea rsi, [rbp+var_1A0] mov [rsi], rax lea r14, [rbp+var_194] mov rdi, r15 mov rdx, r14 call my_strtod movsd qword ptr [rbx], xmm0 xor eax, eax cmp dword ptr [r14], 0 setnz al add eax, eax test r12d, r12d cmovnz eax, r12d mov rcx, fs:28h cmp rcx, [rbp+var_28] jnz short loc_27F5C add rsp, 180h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_27F5C: call ___stack_chk_fail
long long decimal2double(unsigned int *a1, double *a2) { unsigned int v2; // r12d long long result; // rax _BYTE *v4; // [rsp+0h] [rbp-1A0h] BYREF int v5; // [rsp+8h] [rbp-198h] BYREF int v6; // [rsp+Ch] [rbp-194h] BYREF _BYTE v7[360]; // [rsp+10h] [rbp-190h] BYREF unsigned long long v8; // [rsp+178h] [rbp-28h] v8 = __readfsqword(0x28u); v5 = 350; v2 = decimal2string(a1, v7, &v5, 0, 0, 0); v4 = &v7[v5]; *a2 = my_strtod(v7, &v4, &v6); result = 2 * (unsigned int)(v6 != 0); if ( v2 ) return v2; return result; }
decimal2double: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x180 MOV RBX,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX LEA R14,[RBP + -0x198] MOV dword ptr [R14],0x15e LEA R15,[RBP + -0x190] MOV RSI,R15 MOV RDX,R14 XOR ECX,ECX XOR R8D,R8D XOR R9D,R9D CALL 0x001268c4 MOV R12D,EAX MOVSXD RAX,dword ptr [R14] ADD RAX,RBP ADD RAX,-0x190 LEA RSI,[RBP + -0x1a0] MOV qword ptr [RSI],RAX LEA R14,[RBP + -0x194] MOV RDI,R15 MOV RDX,R14 CALL 0x0012adfc MOVSD qword ptr [RBX],XMM0 XOR EAX,EAX CMP dword ptr [R14],0x0 SETNZ AL ADD EAX,EAX TEST R12D,R12D CMOVNZ EAX,R12D MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x28] JNZ 0x00127f5c ADD RSP,0x180 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00127f5c: CALL 0x00124320
int decimal2double(int8 param_1,int8 *param_2) { int iVar1; int iVar2; long in_FS_OFFSET; int8 uVar3; int1 *local_1a8; int local_1a0; int local_19c; int1 local_198 [360]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); local_1a0 = 0x15e; iVar1 = decimal2string(param_1,local_198,&local_1a0,0,0,0); local_1a8 = local_198 + local_1a0; uVar3 = my_strtod(local_198,&local_1a8,&local_19c); *param_2 = uVar3; iVar2 = (uint)(local_19c != 0) * 2; if (iVar1 != 0) { iVar2 = iVar1; } if (*(long *)(in_FS_OFFSET + 0x28) == local_30) { return iVar2; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
35,529
inline_mysql_file_sync
eloqsql/include/mysql/psi/mysql_file.h
static inline int inline_mysql_file_sync( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File fd, myf flags) { int result= 0; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, fd, PSI_FILE_SYNC); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); result= my_sync(fd, flags); PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); return result; } #endif result= my_sync(fd, flags); return result; }
O3
c
inline_mysql_file_sync: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x58, %rsp movl %esi, %ebx movl %edi, %r14d leaq 0x309c4a(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x68(%rbp), %rdi movl $0x10, %edx callq *0x158(%rax) testq %rax, %rax jne 0x7c3f1 movl %ebx, %edi xorl %esi, %esi callq 0xa1434 addq $0x58, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq -0x1c(%rbp), %r15 movq %rax, %rdi movl %r14d, %esi movl %ebx, %edx movq %r15, %rcx callq 0x2d9e4 movl (%r15), %eax jmp 0x7c3e6
inline_mysql_file_sync_1: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 58h mov ebx, esi mov r14d, edi lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_68] mov edx, 10h call qword ptr [rax+158h] test rax, rax jnz short loc_7C3F1 mov edi, ebx xor esi, esi call my_sync loc_7C3E6: add rsp, 58h pop rbx pop r14 pop r15 pop rbp retn loc_7C3F1: lea r15, [rbp+var_1C] mov rdi, rax mov esi, r14d mov edx, ebx mov rcx, r15 call inline_mysql_file_sync_cold_1_0 mov eax, [r15] jmp short loc_7C3E6
long long inline_mysql_file_sync_1(unsigned int a1, long long a2) { long long v2; // rax _BYTE v4[76]; // [rsp+8h] [rbp-68h] BYREF _DWORD v5[7]; // [rsp+54h] [rbp-1Ch] BYREF v2 = ((long long ( *)(_BYTE *, long long, long long))PSI_server[43])(v4, a2, 16LL); if ( !v2 ) return my_sync((unsigned int)a2, 0LL); inline_mysql_file_sync_cold_1_0(v2, a1, a2, v5); return v5[0]; }
inline_mysql_file_sync: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x58 MOV EBX,ESI MOV R14D,EDI LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x68] MOV EDX,0x10 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0017c3f1 MOV EDI,EBX XOR ESI,ESI CALL 0x001a1434 LAB_0017c3e6: ADD RSP,0x58 POP RBX POP R14 POP R15 POP RBP RET LAB_0017c3f1: LEA R15,[RBP + -0x1c] MOV RDI,RAX MOV ESI,R14D MOV EDX,EBX MOV RCX,R15 CALL 0x0012d9e4 MOV EAX,dword ptr [R15] JMP 0x0017c3e6
ulong inline_mysql_file_sync(int4 param_1,ulong param_2) { long lVar1; ulong uVar2; int1 local_70 [76]; uint local_24; lVar1 = (**(code **)(PSI_server + 0x158))(local_70,param_2,0x10); if (lVar1 == 0) { uVar2 = my_sync(param_2 & 0xffffffff,0); } else { inline_mysql_file_sync_cold_1(lVar1,param_1,param_2 & 0xffffffff,&local_24); uVar2 = (ulong)local_24; } return uVar2; }
35,530
common_params_get_system_info[abi:cxx11](common_params const&)
llama.cpp/common/common.cpp
std::string common_params_get_system_info(const common_params & params) { std::ostringstream os; os << "system_info: n_threads = " << params.cpuparams.n_threads; if (params.cpuparams_batch.n_threads != -1) { os << " (n_threads_batch = " << params.cpuparams_batch.n_threads << ")"; } #if defined(_WIN32) && (_WIN32_WINNT >= 0x0601) && !defined(__MINGW64__) // windows 7 and later // TODO: windows + arm64 + mingw64 DWORD logicalProcessorCount = GetActiveProcessorCount(ALL_PROCESSOR_GROUPS); os << " / " << logicalProcessorCount << " | " << llama_print_system_info(); #else os << " / " << std::thread::hardware_concurrency() << " | " << llama_print_system_info(); #endif return os.str(); }
O3
cpp
common_params_get_system_info[abi:cxx11](common_params const&): pushq %r15 pushq %r14 pushq %rbx subq $0x180, %rsp # imm = 0x180 movq %rsi, %r14 movq %rdi, %rbx leaq 0x8(%rsp), %r15 movq %r15, %rdi callq 0x20fa0 leaq 0x2dd99(%rip), %rsi # 0x123072 movl $0x19, %edx movq %r15, %rdi callq 0x21000 movl 0x274(%r14), %esi leaq 0x8(%rsp), %rdi callq 0x204d0 cmpl $-0x1, 0x488(%r14) je 0xf533c leaq 0x2dd84(%rip), %rsi # 0x12308c leaq 0x8(%rsp), %rdi movl $0x14, %edx callq 0x21000 movl 0x488(%r14), %esi leaq 0x8(%rsp), %rdi callq 0x204d0 leaq 0x25863(%rip), %rsi # 0x11ab92 movl $0x1, %edx movq %rax, %rdi callq 0x21000 leaq 0x2dd5e(%rip), %rsi # 0x1230a1 leaq 0x8(%rsp), %rdi movl $0x3, %edx callq 0x21000 callq 0x20d90 movl %eax, %esi leaq 0x8(%rsp), %rdi callq 0x20830 movq %rax, %r14 leaq 0x2f323(%rip), %rsi # 0x124690 movl $0x3, %edx movq %rax, %rdi callq 0x21000 callq 0x20060 movq %rax, %r15 testq %rax, %rax je 0xf539f movq %r15, %rdi callq 0x20640 movq %r14, %rdi movq %r15, %rsi movq %rax, %rdx callq 0x21000 jmp 0xf53b9 movq (%r14), %rax movq -0x18(%rax), %rax movq %r14, %rdi addq %rax, %rdi movl 0x20(%r14,%rax), %esi orl $0x1, %esi callq 0x21230 leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x20620 movq 0x6bb8b(%rip), %rsi # 0x160f58 leaq 0x8(%rsp), %rdi callq 0x20c30 leaq 0x78(%rsp), %rdi callq 0x20c00 movq %rbx, %rax addq $0x180, %rsp # imm = 0x180 popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq 0x6bb5d(%rip), %rsi # 0x160f58 leaq 0x8(%rsp), %rdi callq 0x20c30 leaq 0x78(%rsp), %rdi callq 0x20c00 movq %rbx, %rdi callq 0x20ab0
_Z29common_params_get_system_infoB5cxx11RK13common_params: push r15 push r14 push rbx sub rsp, 180h mov r14, rsi mov rbx, rdi lea r15, [rsp+198h+var_190] mov rdi, r15 call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) lea rsi, aSystemInfoNThr; "system_info: n_threads = " mov edx, 19h mov rdi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov esi, [r14+274h] lea rdi, [rsp+198h+var_190] call __ZNSolsEi; std::ostream::operator<<(int) cmp dword ptr [r14+488h], 0FFFFFFFFh jz short loc_F533C lea rsi, aNThreadsBatch; " (n_threads_batch = " lea rdi, [rsp+198h+var_190] mov edx, 14h call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov esi, [r14+488h] lea rdi, [rsp+198h+var_190] call __ZNSolsEi; std::ostream::operator<<(int) lea rsi, aCompreplyCompg_2+3Ah; ")" mov edx, 1 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_F533C: lea rsi, asc_1230A1; " / " lea rdi, [rsp+198h+var_190]; this mov edx, 3 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) call __ZNSt6thread20hardware_concurrencyEv; std::thread::hardware_concurrency(void) mov esi, eax lea rdi, [rsp+198h+var_190] call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) mov r14, rax lea rsi, asc_12468F+1; " | " mov edx, 3 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) call _llama_print_system_info mov r15, rax test rax, rax jz short loc_F539F mov rdi, r15 call _strlen mov rdi, r14 mov rsi, r15 mov rdx, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) jmp short loc_F53B9 loc_F539F: mov rax, [r14] mov rax, [rax-18h] mov rdi, r14 add rdi, rax mov esi, [r14+rax+20h] or esi, 1 call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate) loc_F53B9: lea rsi, [rsp+198h+var_188] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+198h+var_190] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+198h+var_120]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rax, rbx add rsp, 180h pop rbx pop r14 pop r15 retn mov rbx, rax mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_0] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+arg_70]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
long long common_params_get_system_info[abi:cxx11](long long a1, long long a2) { long long v2; // rax unsigned int v3; // eax _QWORD *v4; // r14 long long v5; // rax long long v6; // r15 long long v7; // rax _BYTE v9[8]; // [rsp+8h] [rbp-190h] BYREF _BYTE v10[104]; // [rsp+10h] [rbp-188h] BYREF _BYTE v11[288]; // [rsp+78h] [rbp-120h] BYREF std::ostringstream::basic_ostringstream(v9); std::__ostream_insert<char,std::char_traits<char>>(v9, "system_info: n_threads = ", 25LL); std::ostream::operator<<(v9, *(unsigned int *)(a2 + 628)); if ( *(_DWORD *)(a2 + 1160) != -1 ) { std::__ostream_insert<char,std::char_traits<char>>(v9, " (n_threads_batch = ", 20LL); v2 = std::ostream::operator<<(v9, *(unsigned int *)(a2 + 1160)); std::__ostream_insert<char,std::char_traits<char>>(v2, ")", 1LL); } std::__ostream_insert<char,std::char_traits<char>>(v9, " / ", 3LL); v3 = std::thread::hardware_concurrency((std::thread *)v9); v4 = (_QWORD *)std::ostream::_M_insert<unsigned long>(v9, v3); std::__ostream_insert<char,std::char_traits<char>>(v4, " | ", 3LL); v5 = llama_print_system_info(); v6 = v5; if ( v5 ) { v7 = strlen(v5); std::__ostream_insert<char,std::char_traits<char>>(v4, v6, v7); } else { std::ios::clear((char *)v4 + *(_QWORD *)(*v4 - 24LL), *(_DWORD *)((char *)v4 + *(_QWORD *)(*v4 - 24LL) + 32) | 1u); } std::stringbuf::str(a1, v10); std::ostringstream::~ostringstream(v9, &`VTT for'std::ostringstream); std::ios_base::~ios_base((std::ios_base *)v11); return a1; }
common_params_get_system_info[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x180 MOV R14,RSI MOV RBX,RDI LEA R15,[RSP + 0x8] MOV RDI,R15 CALL 0x00120fa0 LAB_001f52d2: LEA RSI,[0x223072] MOV EDX,0x19 MOV RDI,R15 CALL 0x00121000 MOV ESI,dword ptr [R14 + 0x274] LEA RDI,[RSP + 0x8] CALL 0x001204d0 CMP dword ptr [R14 + 0x488],-0x1 JZ 0x001f533c LEA RSI,[0x22308c] LEA RDI,[RSP + 0x8] MOV EDX,0x14 CALL 0x00121000 MOV ESI,dword ptr [R14 + 0x488] LEA RDI,[RSP + 0x8] CALL 0x001204d0 LEA RSI,[0x21ab92] MOV EDX,0x1 MOV RDI,RAX CALL 0x00121000 LAB_001f533c: LEA RSI,[0x2230a1] LEA RDI,[RSP + 0x8] MOV EDX,0x3 CALL 0x00121000 CALL 0x00120d90 MOV ESI,EAX LEA RDI,[RSP + 0x8] CALL 0x00120830 MOV R14,RAX LEA RSI,[0x224690] MOV EDX,0x3 MOV RDI,RAX CALL 0x00121000 CALL 0x00120060 MOV R15,RAX TEST RAX,RAX JZ 0x001f539f MOV RDI,R15 CALL 0x00120640 MOV RDI,R14 MOV RSI,R15 MOV RDX,RAX CALL 0x00121000 JMP 0x001f53b9 LAB_001f539f: MOV RAX,qword ptr [R14] MOV RAX,qword ptr [RAX + -0x18] MOV RDI,R14 ADD RDI,RAX MOV ESI,dword ptr [R14 + RAX*0x1 + 0x20] OR ESI,0x1 CALL 0x00121230 LAB_001f53b9: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x00120620 LAB_001f53c6: MOV RSI,qword ptr [0x00260f58] LEA RDI,[RSP + 0x8] CALL 0x00120c30 LEA RDI,[RSP + 0x78] CALL 0x00120c00 MOV RAX,RBX ADD RSP,0x180 POP RBX POP R14 POP R15 RET
/* common_params_get_system_info[abi:cxx11](common_params const&) */ common_params * common_params_get_system_info_abi_cxx11_(common_params *param_1) { ostream *poVar1; char *__s; size_t sVar2; long in_RSI; ostringstream local_190 [112]; ios_base local_120 [264]; std::__cxx11::ostringstream::ostringstream(local_190); /* try { // try from 001f52d2 to 001f53c5 has its CatchHandler @ 001f53f1 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_190,"system_info: n_threads = ",0x19); std::ostream::operator<<((ostream *)local_190,*(int *)(in_RSI + 0x274)); if (*(int *)(in_RSI + 0x488) != -1) { std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_190," (n_threads_batch = ",0x14); poVar1 = (ostream *)std::ostream::operator<<((ostream *)local_190,*(int *)(in_RSI + 0x488)); std::__ostream_insert<char,std::char_traits<char>>(poVar1,")",1); } std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_190," / ",3); std::thread::hardware_concurrency(); poVar1 = std::ostream::_M_insert<unsigned_long>((ulong)local_190); std::__ostream_insert<char,std::char_traits<char>>(poVar1," | ",3); __s = (char *)llama_print_system_info(); if (__s == (char *)0x0) { std::ios::clear(poVar1 + *(long *)(*(long *)poVar1 + -0x18), *(uint *)(poVar1 + *(long *)(*(long *)poVar1 + -0x18) + 0x20) | 1); } else { sVar2 = strlen(__s); std::__ostream_insert<char,std::char_traits<char>>(poVar1,__s,sVar2); } std::__cxx11::stringbuf::str(); std::__cxx11::ostringstream::~ostringstream(local_190); std::ios_base::~ios_base(local_120); return param_1; }
35,531
lshift
eloqsql/libmariadb/libmariadb/ma_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 0x47ece incl %edi addl %eax, %eax jmp 0x47ec4 movq %rdx, -0x38(%rbp) movq %rdx, %rsi callq 0x48037 movq (%rax), %r13 cmpl $0x20, %r15d jb 0x47f05 decl %r12d leaq 0x4(,%r12,4), %rdx movq %r13, %rdi xorl %esi, %esi movq %rax, -0x30(%rbp) callq 0x352c0 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 0x47f51 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 0x47f21 movl %edi, (%r13) cmpl $0x1, %edi sbbl $-0x1, %ebx jmp 0x47f64 movl (%rdx), %ecx addq $0x4, %rdx movl %ecx, (%r13) addq $0x4, %r13 cmpq %rsi, %rdx jb 0x47f51 movl %ebx, 0x14(%rax) movq %r14, %rdi movq -0x38(%rbp), %rsi movq %rax, %rbx callq 0x47dfe 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_47EC4: cmp ebx, eax jl short loc_47ECE inc edi add eax, eax jmp short loc_47EC4 loc_47ECE: mov [rbp+var_38], rdx mov rsi, rdx call Balloc mov r13, [rax] cmp r15d, 20h ; ' ' jb short loc_47F05 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_47F05: mov rdx, [r14] movsxd rcx, dword ptr [r14+14h] lea rsi, [rdx+rcx*4] and r15d, 1Fh jz short loc_47F51 mov r9d, 20h ; ' ' sub r9d, r15d xor edi, edi loc_47F21: 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_47F21 mov [r13+0], edi cmp edi, 1 sbb ebx, 0FFFFFFFFh jmp short loc_47F64 loc_47F51: mov ecx, [rdx] add rdx, 4 mov [r13+0], ecx add r13, 4 cmp rdx, rsi jb short loc_47F51 loc_47F64: 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, long long a4) { char v4; // r15 long long v6; // rdi int v7; // eax int v8; // ebx long long v9; // rax int *v10; // r13 long long v11; // r12 int *v12; // rdx unsigned long long v13; // rsi int v14; // r15d int v15; // edi unsigned int v16; // edi int v17; // ecx long long v18; // rbx long long v21; // [rsp+10h] [rbp-30h] v4 = a2; v6 = *(unsigned int *)(a1 + 8); v7 = *(_DWORD *)(a1 + 12); v8 = (a2 >> 5) + *(_DWORD *)(a1 + 20); while ( v8 >= v7 ) { v6 = (unsigned int)(v6 + 1); v7 *= 2; } v9 = Balloc(v6, a3, a3, a4); v10 = *(int **)v9; if ( a2 >= 0x20 ) { v11 = (a2 >> 5) - 1; v21 = v9; memset(*(_QWORD *)v9, 0LL, 4 * v11 + 4); v9 = v21; v10 += v11 + 1; } v12 = *(int **)a1; v13 = *(_QWORD *)a1 + 4LL * *(int *)(a1 + 20); v14 = v4 & 0x1F; if ( v14 ) { v15 = 0; do { *v10++ = v15 | (*v12 << v14); v16 = *v12++; v15 = v16 >> (32 - v14); } while ( (unsigned long long)v12 < v13 ); *v10 = v15; v8 -= (v15 == 0) - 1; } else { do { v17 = *v12++; *v10++ = v17; } while ( (unsigned long long)v12 < v13 ); } *(_DWORD *)(v9 + 20) = v8; v18 = v9; Bfree(a1, a3); return v18; }
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_00147ec4: CMP EBX,EAX JL 0x00147ece INC EDI ADD EAX,EAX JMP 0x00147ec4 LAB_00147ece: MOV qword ptr [RBP + -0x38],RDX MOV RSI,RDX CALL 0x00148037 MOV R13,qword ptr [RAX] CMP R15D,0x20 JC 0x00147f05 DEC R12D LEA RDX,[0x4 + R12*0x4] MOV RDI,R13 XOR ESI,ESI MOV qword ptr [RBP + -0x30],RAX CALL 0x001352c0 MOV RAX,qword ptr [RBP + -0x30] LEA R13,[R13 + R12*0x4 + 0x4] LAB_00147f05: MOV RDX,qword ptr [R14] MOVSXD RCX,dword ptr [R14 + 0x14] LEA RSI,[RDX + RCX*0x4] AND R15D,0x1f JZ 0x00147f51 MOV R9D,0x20 SUB R9D,R15D XOR EDI,EDI LAB_00147f21: 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 0x00147f21 MOV dword ptr [R13],EDI CMP EDI,0x1 SBB EBX,-0x1 JMP 0x00147f64 LAB_00147f51: MOV ECX,dword ptr [RDX] ADD RDX,0x4 MOV dword ptr [R13],ECX ADD R13,0x4 CMP RDX,RSI JC 0x00147f51 LAB_00147f64: MOV dword ptr [RAX + 0x14],EBX MOV RDI,R14 MOV RSI,qword ptr [RBP + -0x38] MOV RBX,RAX CALL 0x00147dfe 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; }
35,532
nglog::LogMessage::SendToLog()
ng-log[P]ng-log/src/logging.cc
EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { static bool already_warned_before_init = false; RAW_DCHECK(data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\n', ""); // Messages of a given severity get logged to lower severity logs, too if (!already_warned_before_init && !IsLoggingInitialized()) { const char w[] = "WARNING: Logging before InitializeLogging() is " "written to STDERR\n"; WriteToStderr(w, strlen(w)); already_warned_before_init = true; } // global flag: never log to file if set. Also -- don't log to a // file if we haven't parsed the command line flags to get the // program name. if (FLAGS_logtostderr || FLAGS_logtostdout || !IsLoggingInitialized()) { if (FLAGS_logtostdout) { ColoredWriteToStdout(data_->severity_, data_->message_text_, data_->num_chars_to_log_); } else { ColoredWriteToStderr(data_->severity_, data_->message_text_, data_->num_chars_to_log_); } // this could be protected by a flag if necessary. LogDestination::LogToSinks( data_->severity_, data_->fullname_, data_->basename_, data_->line_, time_, data_->message_text_ + data_->num_prefix_chars_, (data_->num_chars_to_log_ - data_->num_prefix_chars_ - 1)); } else { // log this message to all log files of severity <= severity_ LogDestination::LogToAllLogfiles(data_->severity_, time_.when(), data_->message_text_, data_->num_chars_to_log_); LogDestination::MaybeLogToStderr(data_->severity_, data_->message_text_, data_->num_chars_to_log_, data_->num_prefix_chars_); LogDestination::MaybeLogToEmail(data_->severity_, data_->message_text_, data_->num_chars_to_log_); LogDestination::LogToSinks( data_->severity_, data_->fullname_, data_->basename_, data_->line_, time_, data_->message_text_ + data_->num_prefix_chars_, (data_->num_chars_to_log_ - data_->num_prefix_chars_ - 1)); // NOTE: -1 removes trailing \n } // If we log a FATAL message, flush all the log destinations, then toss // a signal for others to catch. We leave the logs in a state that // someone else can use them (as long as they flush afterwards) if (data_->severity_ == NGLOG_FATAL && exit_on_dfatal) { if (data_->first_fatal_) { // Store crash information so that it is accessible from within signal // handlers that may be invoked later. RecordCrashReason(&crash_reason); SetCrashReason(&crash_reason); // Store shortened fatal message for other logs and GWQ status const size_t copy = min(data_->num_chars_to_log_, sizeof(fatal_message) - 1); memcpy(fatal_message, data_->message_text_, copy); fatal_message[copy] = '\0'; fatal_time = time_.when(); } if (!FLAGS_logtostderr && !FLAGS_logtostdout) { for (auto& log_destination : LogDestination::log_destinations_) { if (log_destination) { log_destination->logger_->Write( true, std::chrono::system_clock::time_point{}, "", 0); } } } LogDestination::WaitForSinks(data_); } }
O3
cpp
nglog::LogMessage::SendToLog(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %r15 movq 0x8(%rdi), %rax movq 0x76c0(%rax), %rcx testq %rcx, %rcx je 0x144d2 cmpb $0xa, 0x3(%rcx,%rax) je 0x144ff leaq 0x18051(%rip), %rsi # 0x2c52a leaq 0x18091(%rip), %rcx # 0x2c571 leaq 0x1809e(%rip), %r8 # 0x2c585 leaq 0x185c7(%rip), %r9 # 0x2cab5 movl $0x3, %edi movl $0x6f6, %edx # imm = 0x6F6 xorl %eax, %eax callq 0x11d40 cmpb $0x0, 0x34b82(%rip) # 0x49088 jne 0x14515 callq 0x122b0 testb %al, %al je 0x1494a movq 0x24a3c(%rip), %rcx # 0x38f58 movq 0x249a5(%rip), %rbx # 0x38ec8 movb (%rbx), %al cmpb $0x0, (%rcx) movq %r15, 0x8(%rsp) jne 0x14694 testb $0x1, %al jne 0x14694 callq 0x122b0 testb %al, %al je 0x14692 movq 0x8(%r15), %rdx movl 0x7698(%rdx), %edi leaq 0x48(%r15), %rsi movq 0x76c0(%rdx), %rcx addq $0x4, %rdx callq 0x1aa1e movq 0x8(%r15), %r14 movl 0x7698(%r14), %ebp movq 0x76c0(%r14), %rcx movq 0x76b8(%r14), %rbx movq 0x2477a(%rip), %rax # 0x38d00 cmpl %ebp, (%rax) jle 0x14596 movq 0x24757(%rip), %rax # 0x38ce8 cmpb $0x1, (%rax) jne 0x145d5 addq $0x4, %r14 movq 0x24957(%rip), %rax # 0x38ef8 movq (%rax), %rdi movl %ebp, %esi movq %r14, %rdx callq 0x1a748 callq 0x2b49b addq %rbx, %r14 movl %ebp, %edi movq %rax, %rsi movq %r14, %rdx callq 0x2b47c movq 0x8(%r15), %r14 movl 0x7698(%r14), %ebp movq 0x76c0(%r14), %rcx addq $0x4, %r14 movl %ebp, %edi movq %r14, %rsi movq %rcx, %rdx callq 0x1ab5c movq 0x8(%r15), %r14 movl 0x7698(%r14), %eax movl %eax, 0x4(%rsp) movl 0x769c(%r14), %eax movl %eax, (%rsp) movq 0x76d8(%r14), %r15 movq 0x76d0(%r14), %r12 movq 0x76b8(%r14), %rbp movq %rbp, %rbx notq %rbx addq 0x76c0(%r14), %rbx leaq 0x259c0(%rip), %rdi # 0x39fe8 callq 0x1be56 movq 0x259ac(%rip), %rax # 0x39fe0 testq %rax, %rax je 0x14774 movq 0x8(%rsp), %rcx leaq 0x10(%rcx), %r13 addq %r14, %rbp addq $0x4, %rbp movq 0x8(%rax), %r14 subq (%rax), %r14 sarq $0x3, %r14 subq $0x1, %r14 jb 0x14774 movq 0x25977(%rip), %rax # 0x39fe0 movq (%rax), %rax movq (%rax,%r14,8), %rdi movq (%rdi), %rax movq 0x10(%rax), %rax movl 0x4(%rsp), %esi movq %r15, %rdx movq %r12, %rcx movl (%rsp), %r8d movq %r13, %r9 pushq %rbx pushq %rbp callq *%rax addq $0x10, %rsp jmp 0x14658 movb (%rbx), %al movq 0x8(%r15), %rdx movl 0x7698(%rdx), %esi movq 0x76c0(%rdx), %rcx addq $0x4, %rdx testb $0x1, %al je 0x146c1 movq 0x2464c(%rip), %rax # 0x38d00 cmpl %esi, (%rax) jle 0x146c1 movq 0x24631(%rip), %rax # 0x38cf0 jmp 0x146c8 movq 0x24830(%rip), %rax # 0x38ef8 movq (%rax), %rdi callq 0x1a748 movq 0x8(%r15), %r14 movl 0x7698(%r14), %eax movl %eax, 0x4(%rsp) movl 0x769c(%r14), %eax movl %eax, (%rsp) movq 0x76d8(%r14), %r15 movq 0x76d0(%r14), %r12 movq 0x76b8(%r14), %rbp movq %rbp, %rbx notq %rbx addq 0x76c0(%r14), %rbx leaq 0x258d6(%rip), %rdi # 0x39fe8 callq 0x1be56 movq 0x258c2(%rip), %rax # 0x39fe0 testq %rax, %rax je 0x14774 movq 0x8(%rsp), %rcx leaq 0x10(%rcx), %r13 addq %r14, %rbp addq $0x4, %rbp movq 0x8(%rax), %r14 subq (%rax), %r14 sarq $0x3, %r14 subq $0x1, %r14 jb 0x14774 movq 0x25895(%rip), %rax # 0x39fe0 movq (%rax), %rax movq (%rax,%r14,8), %rdi movq (%rdi), %rax movq 0x10(%rax), %rax movl 0x4(%rsp), %esi movq %r15, %rdx movq %r12, %rcx movl (%rsp), %r8d movq %r13, %r9 pushq %rbx pushq %rbp callq *%rax addq $0x10, %rsp jmp 0x1473e leaq 0x2586d(%rip), %rdi # 0x39fe8 callq 0x11c70 movq 0x8(%rsp), %r13 movq 0x8(%r13), %rax cmpl $0x3, 0x7698(%rax) jne 0x1493b cmpb $0x1, 0x25257(%rip) # 0x399f4 jne 0x1493b cmpb $0x1, 0x76e1(%rax) jne 0x1484d leaq 0x259d9(%rip), %rax # 0x3a190 movq 0x2d0aa(%rip), %rcx # 0x41868 movq %rcx, 0x258ab(%rip) # 0x3a070 leaq 0x258a4(%rip), %r14 # 0x3a070 movl 0x2d05a(%rip), %ecx # 0x4182c movl %ecx, 0x258a0(%rip) # 0x3a078 movq 0x2d069(%rip), %rcx # 0x41848 leaq 0x4(%rcx,%rax), %rax movq %rax, 0x25895(%rip) # 0x3a080 leaq 0x25896(%rip), %rdi # 0x3a088 movl $0x20, %esi movl $0x4, %edx callq 0x2a630 movl %eax, 0x25981(%rip) # 0x3a188 movq %r14, %rdi callq 0x2b4de movq 0x8(%r13), %rsi movq 0x76c0(%rsi), %rax movl $0xff, %r14d cmpq %r14, %rax cmovbq %rax, %r14 addq $0x4, %rsi leaq 0x3474e(%rip), %r15 # 0x48f80 movq %r15, %rdi movq %r14, %rdx callq 0x11720 movb $0x0, (%r14,%r15) movq 0x48(%r13), %rax movq %rax, 0x34833(%rip) # 0x49080 movq 0x24704(%rip), %rax # 0x38f58 cmpb $0x0, (%rax) jne 0x148b1 movq 0x24668(%rip), %rax # 0x38ec8 cmpb $0x0, (%rax) jne 0x148b1 xorl %ebx, %ebx leaq 0x257c2(%rip), %r12 # 0x3a030 leaq 0x18240(%rip), %r14 # 0x2cab5 leaq 0x10(%rsp), %r15 movq (%rbx,%r12), %rax testq %rax, %rax je 0x148a7 movq 0xc8(%rax), %rdi movq $0x0, 0x10(%rsp) movq (%rdi), %rax movl $0x1, %esi movq %r15, %rdx movq %r14, %rcx xorl %r8d, %r8d callq *0x10(%rax) addq $0x8, %rbx cmpq $0x20, %rbx jne 0x1487a movq 0x8(%r13), %rbx leaq 0x2572c(%rip), %rdi # 0x39fe8 callq 0x1be56 movq 0x25718(%rip), %rax # 0x39fe0 testq %rax, %rax je 0x148f4 movq 0x8(%rax), %r14 subq (%rax), %r14 sarq $0x3, %r14 subq $0x1, %r14 jb 0x148f4 movq 0x256fb(%rip), %rax # 0x39fe0 movq (%rax), %rax movq (%rax,%r14,8), %rdi movq (%rdi), %rax callq *0x18(%rax) jmp 0x148d8 movq 0x76a0(%rbx), %rax cmpq 0x246ee(%rip), %rax # 0x38ff0 setne %cl cmpq 0x24634(%rip), %rax # 0x38f40 setne %al testb %al, %cl jne 0x1492f cmpq $0x0, 0x76a8(%rbx) jne 0x1492f movq 0x76b0(%rbx), %rdi testq %rdi, %rdi je 0x1492f movq (%rdi), %rax callq *0x18(%rax) leaq 0x256b2(%rip), %rdi # 0x39fe8 callq 0x11c70 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x123d0 jmp 0x14515 jmp 0x1495a jmp 0x1495a jmp 0x1495a movq %rax, %rbx leaq 0x25684(%rip), %rdi # 0x39fe8 callq 0x11c70 movq %rbx, %rdi callq 0x121a0 nop
_ZN5nglog10LogMessage9SendToLogEv: push rbp; void * push r15; int push r14; __int64 push r13; int push r12; void * push rbx; int sub rsp, 18h mov r15, rdi mov rax, [rdi+8] mov rcx, [rax+76C0h] test rcx, rcx jz short loc_144D2 cmp byte ptr [rcx+rax+3], 0Ah jz short loc_144FF loc_144D2: lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rcx, aCheckSFailedS; "Check %s failed: %s" lea r8, aDataNumCharsTo; "data_->num_chars_to_log_ > 0 && data_->"... lea r9, asc_2CAB3+2; "" mov edi, (offset dword_0+3); this mov edx, 6F6h xor eax, eax call __ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...) loc_144FF: cmp cs:_ZZN5nglog10LogMessage9SendToLogEvE26already_warned_before_init, 0; nglog::LogMessage::SendToLog(void)::already_warned_before_init jnz short loc_14515 call __ZN5nglog20IsLoggingInitializedEv; nglog::IsLoggingInitialized(void) test al, al jz loc_1494A loc_14515: mov rcx, cs:_ZN3fLB17FLAGS_logtostderrE_ptr mov rbx, cs:_ZN3fLB17FLAGS_logtostdoutE_ptr mov al, [rbx] cmp byte ptr [rcx], 0 mov qword ptr [rsp+48h+var_40], r15; int jnz loc_14694 test al, 1 jnz loc_14694 call __ZN5nglog20IsLoggingInitializedEv; nglog::IsLoggingInitialized(void) test al, al jz loc_14692 mov rdx, [r15+8] mov edi, [rdx+7698h] lea rsi, [r15+48h] mov rcx, [rdx+76C0h] add rdx, 4 call _ZN5nglog14LogDestination16LogToAllLogfilesENS_11LogSeverityERKNSt6chrono10time_pointINS2_3_V212system_clockENS2_8durationIlSt5ratioILl1ELl1000000000EEEEEEPKcm; nglog::LogDestination::LogToAllLogfiles(nglog::LogSeverity,std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&,char const*,ulong) mov r14, [r15+8] mov ebp, [r14+7698h] mov rcx, [r14+76C0h] mov rbx, [r14+76B8h] mov rax, cs:_ZN3fLI21FLAGS_stderrthresholdE_ptr cmp [rax], ebp jle short loc_14596 mov rax, cs:_ZN3fLB21FLAGS_alsologtostderrE_ptr cmp byte ptr [rax], 1 jnz short loc_145D5 loc_14596: add r14, 4 mov rax, cs:stderr_ptr mov rdi, [rax]; this mov esi, ebp mov rdx, r14 call _ZN5nglogL28ColoredWriteToStderrOrStdoutEP8_IO_FILENS_11LogSeverityEPKcm; nglog::ColoredWriteToStderrOrStdout(_IO_FILE *,nglog::LogSeverity,char const*,ulong) call _ZN5nglog5tools26ProgramInvocationShortNameEv; nglog::tools::ProgramInvocationShortName(void) add r14, rbx mov edi, ebp mov rsi, rax mov rdx, r14 call _ZN5nglog5tools14AlsoErrorWriteENS_11LogSeverityEPKcS3_; nglog::tools::AlsoErrorWrite(nglog::LogSeverity,char const*,char const*) mov r14, [r15+8] mov ebp, [r14+7698h] mov rcx, [r14+76C0h]; int loc_145D5: add r14, 4 mov edi, ebp; int mov rsi, r14; int mov rdx, rcx; int call _ZN5nglog14LogDestination15MaybeLogToEmailENS_11LogSeverityEPKcm; nglog::LogDestination::MaybeLogToEmail(nglog::LogSeverity,char const*,ulong) mov r14, [r15+8] mov eax, [r14+7698h] mov [rsp+48h+var_44], eax mov eax, [r14+769Ch] mov [rsp+48h+var_48], eax mov r15, [r14+76D8h] mov r12, [r14+76D0h] mov rbp, [r14+76B8h] mov rbx, rbp not rbx add rbx, [r14+76C0h] lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; this call _ZNSt22__shared_mutex_pthread11lock_sharedEv; std::__shared_mutex_pthread::lock_shared(void) mov rax, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_ test rax, rax jz loc_14774 mov rcx, qword ptr [rsp+48h+var_40] lea r13, [rcx+10h] add rbp, r14 add rbp, 4 mov r14, [rax+8] sub r14, [rax] sar r14, 3 loc_14658: sub r14, 1 jb loc_14774 mov rax, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_ mov rax, [rax] mov rdi, [rax+r14*8] mov rax, [rdi] mov rax, [rax+10h] mov esi, [rsp+48h+var_44] mov rdx, r15 mov rcx, r12 mov r8d, [rsp+48h+var_48] mov r9, r13 push rbx push rbp call rax add rsp, 10h jmp short loc_14658 loc_14692: mov al, [rbx] loc_14694: mov rdx, [r15+8] mov esi, [rdx+7698h] mov rcx, [rdx+76C0h] add rdx, 4 test al, 1 jz short loc_146C1 mov rax, cs:_ZN3fLI21FLAGS_stderrthresholdE_ptr cmp [rax], esi jle short loc_146C1 mov rax, cs:stdout_ptr jmp short loc_146C8 loc_146C1: mov rax, cs:stderr_ptr loc_146C8: mov rdi, [rax] call _ZN5nglogL28ColoredWriteToStderrOrStdoutEP8_IO_FILENS_11LogSeverityEPKcm; nglog::ColoredWriteToStderrOrStdout(_IO_FILE *,nglog::LogSeverity,char const*,ulong) mov r14, [r15+8] mov eax, [r14+7698h] mov [rsp+48h+var_44], eax mov eax, [r14+769Ch] mov [rsp+48h+var_48], eax mov r15, [r14+76D8h] mov r12, [r14+76D0h] mov rbp, [r14+76B8h] mov rbx, rbp not rbx add rbx, [r14+76C0h] lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; this call _ZNSt22__shared_mutex_pthread11lock_sharedEv; std::__shared_mutex_pthread::lock_shared(void) mov rax, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_ test rax, rax jz short loc_14774 mov rcx, qword ptr [rsp+48h+var_40] lea r13, [rcx+10h] add rbp, r14 add rbp, 4 mov r14, [rax+8] sub r14, [rax] sar r14, 3 loc_1473E: sub r14, 1 jb short loc_14774 mov rax, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_ mov rax, [rax] mov rdi, [rax+r14*8] mov rax, [rdi] mov rax, [rax+10h] mov esi, [rsp+48h+var_44] mov rdx, r15 mov rcx, r12 mov r8d, [rsp+48h+var_48] mov r9, r13 push rbx push rbp call rax add rsp, 10h jmp short loc_1473E loc_14774: lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_ call _pthread_rwlock_unlock mov r13, qword ptr [rsp+48h+var_40] mov rax, [r13+8] cmp dword ptr [rax+7698h], 3 jnz loc_1493B cmp cs:_ZN5nglogL14exit_on_dfatalE, 1; nglog::exit_on_dfatal jnz loc_1493B cmp byte ptr [rax+76E1h], 1 jnz loc_1484D lea rax, _ZN5nglogL24fatal_msg_data_exclusiveE; nglog::fatal_msg_data_exclusive mov rcx, cs:qword_41868 mov cs:_ZN5nglogL12crash_reasonE, rcx; nglog::crash_reason lea r14, _ZN5nglogL12crash_reasonE; nglog::crash_reason mov ecx, cs:dword_4182C mov cs:dword_3A078, ecx mov rcx, cs:qword_41848; int lea rax, [rcx+rax+4] mov cs:qword_3A080, rax lea rdi, unk_3A088; this mov esi, offset qword_20; void ** mov edx, 4; int call _ZN5nglog5tools13GetStackTraceEPPvii; nglog::tools::GetStackTrace(void **,int,int) mov cs:dword_3A188, eax mov rdi, r14 call _ZN5nglog5tools14SetCrashReasonEPKNS_8internal11CrashReasonE; nglog::tools::SetCrashReason(nglog::internal::CrashReason const*) mov rsi, [r13+8] mov rax, [rsi+76C0h] mov r14d, 0FFh cmp rax, r14 cmovb r14, rax add rsi, 4 lea r15, _ZN5nglogL13fatal_messageE; nglog::fatal_message mov rdi, r15 mov rdx, r14 call _memcpy mov byte ptr [r14+r15], 0 mov rax, [r13+48h] mov cs:_ZN5nglogL10fatal_timeE, rax; nglog::fatal_time loc_1484D: mov rax, cs:_ZN3fLB17FLAGS_logtostderrE_ptr cmp byte ptr [rax], 0 jnz short loc_148B1 mov rax, cs:_ZN3fLB17FLAGS_logtostdoutE_ptr cmp byte ptr [rax], 0 jnz short loc_148B1 xor ebx, ebx lea r12, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_ lea r14, asc_2CAB3+2; "" lea r15, [rsp+48h+var_38] loc_1487A: mov rax, [rbx+r12] test rax, rax jz short loc_148A7 mov rdi, [rax+0C8h] mov [rsp+48h+var_38], 0 mov rax, [rdi] mov esi, 1 mov rdx, r15 mov rcx, r14 xor r8d, r8d call qword ptr [rax+10h] loc_148A7: add rbx, 8 cmp rbx, 20h ; ' ' jnz short loc_1487A loc_148B1: mov rbx, [r13+8] lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; this call _ZNSt22__shared_mutex_pthread11lock_sharedEv; std::__shared_mutex_pthread::lock_shared(void) mov rax, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_ test rax, rax jz short loc_148F4 mov r14, [rax+8] sub r14, [rax] sar r14, 3 loc_148D8: sub r14, 1 jb short loc_148F4 mov rax, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_ mov rax, [rax] mov rdi, [rax+r14*8] mov rax, [rdi] call qword ptr [rax+18h] jmp short loc_148D8 loc_148F4: mov rax, [rbx+76A0h] cmp rax, cs:_ZN5nglog10LogMessage10SendToSinkEv_ptr setnz cl cmp rax, cs:_ZN5nglog10LogMessage16SendToSinkAndLogEv_ptr setnz al test cl, al jnz short loc_1492F cmp qword ptr [rbx+76A8h], 0 jnz short loc_1492F mov rdi, [rbx+76B0h] test rdi, rdi jz short loc_1492F mov rax, [rdi] call qword ptr [rax+18h] loc_1492F: lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_ call _pthread_rwlock_unlock loc_1493B: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1494A: call _ZN5nglog10LogMessage9SendToLogEv_cold_1; nglog::LogMessage::SendToLog(void) [clone] jmp loc_14515 jmp short loc_1495A jmp short loc_1495A jmp short $+2 loc_1495A: mov rbx, rax lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_ call _pthread_rwlock_unlock mov rdi, rbx call __Unwind_Resume
SendToLog: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15,RDI MOV RAX,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RAX + 0x76c0] TEST RCX,RCX JZ 0x001144d2 CMP byte ptr [RCX + RAX*0x1 + 0x3],0xa JZ 0x001144ff LAB_001144d2: LEA RSI,[0x12c52a] LEA RCX,[0x12c571] LEA R8,[0x12c585] LEA R9,[0x12cab5] MOV EDI,0x3 MOV EDX,0x6f6 XOR EAX,EAX CALL 0x00111d40 LAB_001144ff: CMP byte ptr [0x00149088],0x0 JNZ 0x00114515 CALL 0x001122b0 TEST AL,AL JZ 0x0011494a LAB_00114515: MOV RCX,qword ptr [0x00138f58] MOV RBX,qword ptr [0x00138ec8] MOV AL,byte ptr [RBX] CMP byte ptr [RCX],0x0 MOV qword ptr [RSP + 0x8],R15 JNZ 0x00114694 TEST AL,0x1 JNZ 0x00114694 CALL 0x001122b0 TEST AL,AL JZ 0x00114692 MOV RDX,qword ptr [R15 + 0x8] MOV EDI,dword ptr [RDX + 0x7698] LEA RSI,[R15 + 0x48] MOV RCX,qword ptr [RDX + 0x76c0] ADD RDX,0x4 CALL 0x0011aa1e MOV R14,qword ptr [R15 + 0x8] MOV EBP,dword ptr [R14 + 0x7698] MOV RCX,qword ptr [R14 + 0x76c0] MOV RBX,qword ptr [R14 + 0x76b8] MOV RAX,qword ptr [0x00138d00] CMP dword ptr [RAX],EBP JLE 0x00114596 MOV RAX,qword ptr [0x00138ce8] CMP byte ptr [RAX],0x1 JNZ 0x001145d5 LAB_00114596: ADD R14,0x4 MOV RAX,qword ptr [0x00138ef8] MOV RDI,qword ptr [RAX] MOV ESI,EBP MOV RDX,R14 CALL 0x0011a748 CALL 0x0012b49b ADD R14,RBX MOV EDI,EBP MOV RSI,RAX MOV RDX,R14 CALL 0x0012b47c MOV R14,qword ptr [R15 + 0x8] MOV EBP,dword ptr [R14 + 0x7698] MOV RCX,qword ptr [R14 + 0x76c0] LAB_001145d5: ADD R14,0x4 MOV EDI,EBP MOV RSI,R14 MOV RDX,RCX CALL 0x0011ab5c MOV R14,qword ptr [R15 + 0x8] MOV EAX,dword ptr [R14 + 0x7698] MOV dword ptr [RSP + 0x4],EAX MOV EAX,dword ptr [R14 + 0x769c] MOV dword ptr [RSP],EAX MOV R15,qword ptr [R14 + 0x76d8] MOV R12,qword ptr [R14 + 0x76d0] MOV RBP,qword ptr [R14 + 0x76b8] MOV RBX,RBP NOT RBX ADD RBX,qword ptr [R14 + 0x76c0] LEA RDI,[0x139fe8] CALL 0x0011be56 MOV RAX,qword ptr [0x00139fe0] TEST RAX,RAX JZ 0x00114774 MOV RCX,qword ptr [RSP + 0x8] LEA R13,[RCX + 0x10] ADD RBP,R14 ADD RBP,0x4 MOV R14,qword ptr [RAX + 0x8] SUB R14,qword ptr [RAX] SAR R14,0x3 LAB_00114658: SUB R14,0x1 JC 0x00114774 MOV RAX,qword ptr [0x00139fe0] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + R14*0x8] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x10] LAB_00114677: MOV ESI,dword ptr [RSP + 0x4] MOV RDX,R15 MOV RCX,R12 MOV R8D,dword ptr [RSP] MOV R9,R13 PUSH RBX PUSH RBP CALL RAX ADD RSP,0x10 LAB_00114690: JMP 0x00114658 LAB_00114692: MOV AL,byte ptr [RBX] LAB_00114694: MOV RDX,qword ptr [R15 + 0x8] MOV ESI,dword ptr [RDX + 0x7698] MOV RCX,qword ptr [RDX + 0x76c0] ADD RDX,0x4 TEST AL,0x1 JZ 0x001146c1 MOV RAX,qword ptr [0x00138d00] CMP dword ptr [RAX],ESI JLE 0x001146c1 MOV RAX,qword ptr [0x00138cf0] JMP 0x001146c8 LAB_001146c1: MOV RAX,qword ptr [0x00138ef8] LAB_001146c8: MOV RDI,qword ptr [RAX] CALL 0x0011a748 MOV R14,qword ptr [R15 + 0x8] MOV EAX,dword ptr [R14 + 0x7698] MOV dword ptr [RSP + 0x4],EAX MOV EAX,dword ptr [R14 + 0x769c] MOV dword ptr [RSP],EAX MOV R15,qword ptr [R14 + 0x76d8] MOV R12,qword ptr [R14 + 0x76d0] MOV RBP,qword ptr [R14 + 0x76b8] MOV RBX,RBP NOT RBX ADD RBX,qword ptr [R14 + 0x76c0] LEA RDI,[0x139fe8] CALL 0x0011be56 MOV RAX,qword ptr [0x00139fe0] TEST RAX,RAX JZ 0x00114774 MOV RCX,qword ptr [RSP + 0x8] LEA R13,[RCX + 0x10] ADD RBP,R14 ADD RBP,0x4 MOV R14,qword ptr [RAX + 0x8] SUB R14,qword ptr [RAX] SAR R14,0x3 LAB_0011473e: SUB R14,0x1 JC 0x00114774 MOV RAX,qword ptr [0x00139fe0] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + R14*0x8] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x10] LAB_00114759: MOV ESI,dword ptr [RSP + 0x4] MOV RDX,R15 MOV RCX,R12 MOV R8D,dword ptr [RSP] MOV R9,R13 PUSH RBX PUSH RBP CALL RAX ADD RSP,0x10 LAB_00114772: JMP 0x0011473e LAB_00114774: LEA RDI,[0x139fe8] CALL 0x00111c70 MOV R13,qword ptr [RSP + 0x8] MOV RAX,qword ptr [R13 + 0x8] CMP dword ptr [RAX + 0x7698],0x3 JNZ 0x0011493b CMP byte ptr [0x001399f4],0x1 JNZ 0x0011493b CMP byte ptr [RAX + 0x76e1],0x1 JNZ 0x0011484d LEA RAX,[0x13a190] MOV RCX,qword ptr [0x00141868] MOV qword ptr [0x0013a070],RCX LEA R14,[0x13a070] MOV ECX,dword ptr [0x0014182c] MOV dword ptr [0x0013a078],ECX MOV RCX,qword ptr [0x00141848] LEA RAX,[RCX + RAX*0x1 + 0x4] MOV qword ptr [0x0013a080],RAX LEA RDI,[0x13a088] MOV ESI,0x20 MOV EDX,0x4 CALL 0x0012a630 MOV dword ptr [0x0013a188],EAX MOV RDI,R14 CALL 0x0012b4de MOV RSI,qword ptr [R13 + 0x8] MOV RAX,qword ptr [RSI + 0x76c0] MOV R14D,0xff CMP RAX,R14 CMOVC R14,RAX ADD RSI,0x4 LEA R15,[0x148f80] MOV RDI,R15 MOV RDX,R14 CALL 0x00111720 MOV byte ptr [R14 + R15*0x1],0x0 MOV RAX,qword ptr [R13 + 0x48] MOV qword ptr [0x00149080],RAX LAB_0011484d: MOV RAX,qword ptr [0x00138f58] CMP byte ptr [RAX],0x0 JNZ 0x001148b1 MOV RAX,qword ptr [0x00138ec8] CMP byte ptr [RAX],0x0 JNZ 0x001148b1 XOR EBX,EBX LEA R12,[0x13a030] LEA R14,[0x12cab5] LEA R15,[RSP + 0x10] LAB_0011487a: MOV RAX,qword ptr [RBX + R12*0x1] TEST RAX,RAX JZ 0x001148a7 MOV RDI,qword ptr [RAX + 0xc8] MOV qword ptr [RSP + 0x10],0x0 MOV RAX,qword ptr [RDI] MOV ESI,0x1 MOV RDX,R15 MOV RCX,R14 XOR R8D,R8D CALL qword ptr [RAX + 0x10] LAB_001148a7: ADD RBX,0x8 CMP RBX,0x20 JNZ 0x0011487a LAB_001148b1: MOV RBX,qword ptr [R13 + 0x8] LEA RDI,[0x139fe8] CALL 0x0011be56 MOV RAX,qword ptr [0x00139fe0] TEST RAX,RAX JZ 0x001148f4 MOV R14,qword ptr [RAX + 0x8] SUB R14,qword ptr [RAX] SAR R14,0x3 LAB_001148d8: SUB R14,0x1 JC 0x001148f4 MOV RAX,qword ptr [0x00139fe0] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + R14*0x8] MOV RAX,qword ptr [RDI] LAB_001148ef: CALL qword ptr [RAX + 0x18] JMP 0x001148d8 LAB_001148f4: MOV RAX,qword ptr [RBX + 0x76a0] CMP RAX,qword ptr [0x00138ff0] SETNZ CL CMP RAX,qword ptr [0x00138f40] SETNZ AL TEST CL,AL JNZ 0x0011492f CMP qword ptr [RBX + 0x76a8],0x0 JNZ 0x0011492f MOV RDI,qword ptr [RBX + 0x76b0] TEST RDI,RDI JZ 0x0011492f MOV RAX,qword ptr [RDI] LAB_0011492c: CALL qword ptr [RAX + 0x18] LAB_0011492f: LEA RDI,[0x139fe8] CALL 0x00111c70 LAB_0011493b: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011494a: CALL 0x001123d0 JMP 0x00114515
/* nglog::LogMessage::SendToLog() */ void __thiscall nglog::LogMessage::SendToLog(LogMessage *this) { int4 uVar1; int8 uVar2; ulong uVar3; long *plVar4; int *puVar5; char cVar6; byte bVar7; int8 uVar8; int8 *puVar9; long lVar10; int iVar11; long lVar12; size_t __n; long lVar13; bool bVar14; int4 uVar15; int8 local_38; lVar10 = *(long *)(*(long *)(this + 8) + 0x76c0); if ((lVar10 == 0) || (*(char *)(lVar10 + 3 + *(long *)(this + 8)) != '\n')) { RawLog(3,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0x6f6, "Check %s failed: %s", "data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == \'\\n\'" ,&DAT_0012cab5); } if ((SendToLog()::already_warned_before_init == '\0') && (cVar6 = IsLoggingInitialized(), cVar6 == '\0')) { SendToLog(); } puVar5 = PTR_FLAGS_logtostdout_00138ec8; bVar7 = *PTR_FLAGS_logtostdout_00138ec8; if ((*PTR_FLAGS_logtostderr_00138f58 == '\0') && ((bVar7 & 1) == 0)) { cVar6 = IsLoggingInitialized(); if (cVar6 != '\0') { lVar10 = *(long *)(this + 8); LogDestination::LogToAllLogfiles (*(int4 *)(lVar10 + 0x7698),this + 0x48,lVar10 + 4, *(int8 *)(lVar10 + 0x76c0)); lVar10 = *(long *)(this + 8); iVar11 = *(int *)(lVar10 + 0x7698); uVar8 = *(int8 *)(lVar10 + 0x76c0); lVar13 = *(long *)(lVar10 + 0x76b8); if ((*(int *)PTR_FLAGS_stderrthreshold_00138d00 <= iVar11) || (*PTR_FLAGS_alsologtostderr_00138ce8 == '\x01')) { ColoredWriteToStderrOrStdout(*(int8 *)PTR_stderr_00138ef8,iVar11,lVar10 + 4); uVar8 = tools::ProgramInvocationShortName(); tools::AlsoErrorWrite(iVar11,uVar8,lVar10 + 4 + lVar13); lVar10 = *(long *)(this + 8); iVar11 = *(int *)(lVar10 + 0x7698); uVar8 = *(int8 *)(lVar10 + 0x76c0); } LogDestination::MaybeLogToEmail(iVar11,lVar10 + 4,uVar8); lVar10 = *(long *)(this + 8); uVar1 = *(int4 *)(lVar10 + 0x7698); uVar15 = *(int4 *)(lVar10 + 0x769c); uVar8 = *(int8 *)(lVar10 + 0x76d8); uVar2 = *(int8 *)(lVar10 + 0x76d0); uVar3 = *(ulong *)(lVar10 + 0x76b8); lVar13 = *(long *)(lVar10 + 0x76c0); std::__shared_mutex_pthread::lock_shared ((__shared_mutex_pthread *)LogDestination::sink_mutex_); if (LogDestination::sinks_ != (long *)0x0) { lVar12 = LogDestination::sinks_[1] - *LogDestination::sinks_ >> 3; while (bVar14 = lVar12 != 0, lVar12 = lVar12 + -1, bVar14) { plVar4 = *(long **)(*LogDestination::sinks_ + lVar12 * 8); /* try { // try from 00114677 to 0011468f has its CatchHandler @ 00114956 */ (**(code **)(*plVar4 + 0x10)) (plVar4,uVar1,uVar8,uVar2,uVar15,this + 0x10,uVar3 + lVar10 + 4,~uVar3 + lVar13, uVar15); } } goto LAB_00114774; } bVar7 = *puVar5; } lVar10 = *(long *)(this + 8); puVar9 = (int8 *)PTR_stderr_00138ef8; if (((bVar7 & 1) != 0) && (*(int *)(lVar10 + 0x7698) < *(int *)PTR_FLAGS_stderrthreshold_00138d00) ) { puVar9 = (int8 *)PTR_stdout_00138cf0; } ColoredWriteToStderrOrStdout (*puVar9,*(int *)(lVar10 + 0x7698),lVar10 + 4,*(int8 *)(lVar10 + 0x76c0)); lVar10 = *(long *)(this + 8); uVar1 = *(int4 *)(lVar10 + 0x7698); uVar15 = *(int4 *)(lVar10 + 0x769c); uVar8 = *(int8 *)(lVar10 + 0x76d8); uVar2 = *(int8 *)(lVar10 + 0x76d0); uVar3 = *(ulong *)(lVar10 + 0x76b8); lVar13 = *(long *)(lVar10 + 0x76c0); std::__shared_mutex_pthread::lock_shared((__shared_mutex_pthread *)LogDestination::sink_mutex_); if (LogDestination::sinks_ != (long *)0x0) { lVar12 = LogDestination::sinks_[1] - *LogDestination::sinks_ >> 3; while (bVar14 = lVar12 != 0, lVar12 = lVar12 + -1, bVar14) { plVar4 = *(long **)(*LogDestination::sinks_ + lVar12 * 8); /* try { // try from 00114759 to 00114771 has its CatchHandler @ 0011495a */ (**(code **)(*plVar4 + 0x10)) (plVar4,uVar1,uVar8,uVar2,uVar15,this + 0x10,uVar3 + lVar10 + 4,~uVar3 + lVar13); } } LAB_00114774: pthread_rwlock_unlock((pthread_rwlock_t *)LogDestination::sink_mutex_); if ((*(int *)(*(long *)(this + 8) + 0x7698) == 3) && (exit_on_dfatal == '\x01')) { if (*(char *)(*(long *)(this + 8) + 0x76e1) == '\x01') { crash_reason._0_8_ = fatal_msg_data_exclusive._30424_8_; crash_reason._8_4_ = fatal_msg_data_exclusive._30364_4_; crash_reason._16_8_ = fatal_msg_data_exclusive._30392_8_ + 0x13a194; crash_reason._280_4_ = tools::GetStackTrace((void **)(crash_reason + 0x18),0x20,4); tools::SetCrashReason((CrashReason *)crash_reason); uVar3 = *(ulong *)(*(long *)(this + 8) + 0x76c0); __n = 0xff; if (uVar3 < 0xff) { __n = uVar3; } memcpy(&fatal_message,(void *)(*(long *)(this + 8) + 4),__n); (&fatal_message)[__n] = 0; fatal_time = *(int8 *)(this + 0x48); } if ((*PTR_FLAGS_logtostderr_00138f58 == '\0') && (*PTR_FLAGS_logtostdout_00138ec8 == '\0')) { lVar10 = 0; do { if (*(long *)((long)&LogDestination::log_destinations_ + lVar10) != 0) { plVar4 = *(long **)(*(long *)((long)&LogDestination::log_destinations_ + lVar10) + 200); local_38 = 0; (**(code **)(*plVar4 + 0x10))(plVar4,1,&local_38,&DAT_0012cab5,0); } lVar10 = lVar10 + 8; } while (lVar10 != 0x20); } lVar10 = *(long *)(this + 8); std::__shared_mutex_pthread::lock_shared((__shared_mutex_pthread *)LogDestination::sink_mutex_); if (LogDestination::sinks_ != (long *)0x0) { lVar13 = LogDestination::sinks_[1] - *LogDestination::sinks_ >> 3; while (bVar14 = lVar13 != 0, lVar13 = lVar13 + -1, bVar14) { /* try { // try from 001148ef to 001148f1 has its CatchHandler @ 00114958 */ (**(code **)(**(long **)(*LogDestination::sinks_ + lVar13 * 8) + 0x18))(); } } if (((*(int **)(lVar10 + 0x76a0) == PTR_SendToSink_00138ff0 || *(int **)(lVar10 + 0x76a0) == PTR_SendToSinkAndLog_00138f40) && (*(long *)(lVar10 + 0x76a8) == 0)) && (*(long **)(lVar10 + 0x76b0) != (long *)0x0)) { /* try { // try from 0011492c to 0011492e has its CatchHandler @ 00114954 */ (**(code **)(**(long **)(lVar10 + 0x76b0) + 0x18))(); } pthread_rwlock_unlock((pthread_rwlock_t *)LogDestination::sink_mutex_); } return; }
35,533
MyCTX_gcm::update(unsigned char const*, unsigned int, unsigned char*, unsigned int*)
eloqsql/mysys_ssl/my_crypt.cc
int update(const uchar *src, uint slen, uchar *dst, uint *dlen) { /* note that this GCM class cannot do streaming decryption, because it needs the tag (which is located at the end of encrypted data) before decrypting the data. it can encrypt data piecewise, like, first half, then the second half, but it must decrypt all at once */ if (!EVP_CIPHER_CTX_encrypting(ctx)) { /* encrypted string must contain authenticaton tag (see MDEV-11174) */ if (slen < MY_AES_BLOCK_SIZE) return MY_AES_BAD_DATA; slen-= MY_AES_BLOCK_SIZE; if(!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, MY_AES_BLOCK_SIZE, (void*)(src + slen))) return MY_AES_OPENSSL_ERROR; } int unused; if (aadlen && !EVP_CipherUpdate(ctx, NULL, &unused, aad, aadlen)) return MY_AES_OPENSSL_ERROR; aadlen= 0; return MyCTX::update(src, slen, dst, dlen); }
O3
cpp
MyCTX_gcm::update(unsigned char const*, unsigned int, unsigned char*, unsigned int*): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %rbx movq %rcx, %r12 movl %edx, %r14d movq %rsi, %r15 movq %rdi, %r13 movq 0xc8(%rdi), %rdi callq 0x29870 testl %eax, %eax je 0xd92f2 movl 0xd8(%r13), %r8d testl %r8d, %r8d je 0xd92c4 movq 0xc8(%r13), %rdi movq 0xd0(%r13), %rcx leaq -0x2c(%rbp), %rdx xorl %esi, %esi callq 0x29890 testl %eax, %eax je 0xd9323 movq %rbx, %rdx xorl %ebx, %ebx movl %ebx, 0xd8(%r13) movq 0xc8(%r13), %rdi movq %r12, %rsi movq %r15, %rcx movl %r14d, %r8d callq 0x29890 cmpl $0x1, %eax movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmovel %ebx, %eax jmp 0xd9328 movl $0xffffff9c, %eax # imm = 0xFFFFFF9C cmpl $0x10, %r14d jb 0xd9328 addl $-0x10, %r14d movq 0xc8(%r13), %rdi leaq (%r15,%r14), %rcx movl $0x11, %esi movl $0x10, %edx callq 0x292d0 testl %eax, %eax jne 0xd929b movl $0xffffff9b, %eax # imm = 0xFFFFFF9B addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN9MyCTX_gcm6updateEPKhjPhPj: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, r8 mov r12, rcx mov r14d, edx mov r15, rsi mov r13, rdi mov rdi, [rdi+0C8h] call _EVP_CIPHER_CTX_is_encrypting test eax, eax jz short loc_D92F2 loc_D929B: mov r8d, [r13+0D8h] test r8d, r8d jz short loc_D92C4 mov rdi, [r13+0C8h] mov rcx, [r13+0D0h] lea rdx, [rbp+var_2C] xor esi, esi call _EVP_CipherUpdate test eax, eax jz short loc_D9323 loc_D92C4: mov rdx, rbx xor ebx, ebx mov [r13+0D8h], ebx mov rdi, [r13+0C8h] mov rsi, r12 mov rcx, r15 mov r8d, r14d call _EVP_CipherUpdate cmp eax, 1 mov eax, 0FFFFFF9Bh cmovz eax, ebx jmp short loc_D9328 loc_D92F2: mov eax, 0FFFFFF9Ch cmp r14d, 10h jb short loc_D9328 add r14d, 0FFFFFFF0h mov rdi, [r13+0C8h] lea rcx, [r15+r14] mov esi, 11h mov edx, 10h call _EVP_CIPHER_CTX_ctrl test eax, eax jnz loc_D929B loc_D9323: mov eax, 0FFFFFF9Bh loc_D9328: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long MyCTX_gcm::update( MyCTX_gcm *this, const unsigned __int8 *a2, unsigned int a3, unsigned __int8 *a4, unsigned int *a5) { long long v5; // rax bool v9; // zf long long result; // rax _DWORD v11[11]; // [rsp+0h] [rbp-2Ch] BYREF v11[0] = HIDWORD(v5); if ( !(unsigned int)EVP_CIPHER_CTX_is_encrypting(*((_QWORD *)this + 25)) ) { result = 4294967196LL; if ( a3 < 0x10 ) return result; if ( !(unsigned int)EVP_CIPHER_CTX_ctrl(*((_QWORD *)this + 25), 17LL, 16LL, &a2[a3 - 16]) ) return 4294967195LL; } if ( *((_DWORD *)this + 54) && !(unsigned int)EVP_CipherUpdate(*((_QWORD *)this + 25), 0LL, v11, *((_QWORD *)this + 26)) ) { return 4294967195LL; } *((_DWORD *)this + 54) = 0; v9 = (unsigned int)EVP_CipherUpdate(*((_QWORD *)this + 25), a4, a5, a2) == 1; result = 4294967195LL; if ( v9 ) return 0LL; return result; }
update: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,R8 MOV R12,RCX MOV R14D,EDX MOV R15,RSI MOV R13,RDI MOV RDI,qword ptr [RDI + 0xc8] CALL 0x00129870 TEST EAX,EAX JZ 0x001d92f2 LAB_001d929b: MOV R8D,dword ptr [R13 + 0xd8] TEST R8D,R8D JZ 0x001d92c4 MOV RDI,qword ptr [R13 + 0xc8] MOV RCX,qword ptr [R13 + 0xd0] LEA RDX,[RBP + -0x2c] XOR ESI,ESI CALL 0x00129890 TEST EAX,EAX JZ 0x001d9323 LAB_001d92c4: MOV RDX,RBX XOR EBX,EBX MOV dword ptr [R13 + 0xd8],EBX MOV RDI,qword ptr [R13 + 0xc8] MOV RSI,R12 MOV RCX,R15 MOV R8D,R14D CALL 0x00129890 CMP EAX,0x1 MOV EAX,0xffffff9b CMOVZ EAX,EBX JMP 0x001d9328 LAB_001d92f2: MOV EAX,0xffffff9c CMP R14D,0x10 JC 0x001d9328 ADD R14D,-0x10 MOV RDI,qword ptr [R13 + 0xc8] LEA RCX,[R15 + R14*0x1] MOV ESI,0x11 MOV EDX,0x10 CALL 0x001292d0 TEST EAX,EAX JNZ 0x001d929b LAB_001d9323: MOV EAX,0xffffff9b LAB_001d9328: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* MyCTX_gcm::update(unsigned char const*, unsigned int, unsigned char*, unsigned int*) */ int8 __thiscall MyCTX_gcm::update(MyCTX_gcm *this,uchar *param_1,uint param_2,uchar *param_3,uint *param_4) { int iVar1; int local_34; iVar1 = EVP_CIPHER_CTX_is_encrypting(*(int8 *)(this + 200)); if (iVar1 == 0) { if (param_2 < 0x10) { return 0xffffff9c; } param_2 = param_2 - 0x10; iVar1 = EVP_CIPHER_CTX_ctrl(*(EVP_CIPHER_CTX **)(this + 200),0x11,0x10,param_1 + param_2); if (iVar1 == 0) { return 0xffffff9b; } } if ((*(int *)(this + 0xd8) != 0) && (iVar1 = EVP_CipherUpdate(*(EVP_CIPHER_CTX **)(this + 200),(uchar *)0x0,&local_34, *(uchar **)(this + 0xd0),*(int *)(this + 0xd8)), iVar1 == 0)) { return 0xffffff9b; } *(int4 *)(this + 0xd8) = 0; iVar1 = EVP_CipherUpdate(*(EVP_CIPHER_CTX **)(this + 200),param_3,(int *)param_4,param_1,param_2); if (iVar1 == 1) { return 0; } return 0xffffff9b; }
35,534
my_strxfrm_desc_and_reverse
eloqsql/strings/ctype-simple.c
void my_strxfrm_desc_and_reverse(uchar *str, uchar *strend, uint flags, uint level) { if (flags & (MY_STRXFRM_DESC_LEVEL1 << level)) { if (flags & (MY_STRXFRM_REVERSE_LEVEL1 << level)) { for (strend--; str <= strend;) { uchar tmp= *str; *str++= ~*strend; *strend--= ~tmp; } } else { for (; str < strend; str++) *str= ~*str; } } else if (flags & (MY_STRXFRM_REVERSE_LEVEL1 << level)) { for (strend--; str < strend;) { uchar tmp= *str; *str++= *strend; *strend--= tmp; } } }
O3
c
my_strxfrm_desc_and_reverse: pushq %rbp movq %rsp, %rbp movl %edx, %r8d shrl %cl, %r8d movl $0x10000, %eax # imm = 0x10000 shll %cl, %eax btl $0x8, %r8d jae 0xb6258 testl %edx, %eax je 0xb628b decq %rsi cmpq %rdi, %rsi jb 0xb629a incq %rdi movb -0x1(%rdi), %al movb (%rsi), %cl notb %cl movb %cl, -0x1(%rdi) notb %al movb %al, (%rsi) decq %rsi leaq 0x1(%rdi), %rax cmpq %rsi, %rdi movq %rax, %rdi jbe 0xb6239 jmp 0xb629a testl %edx, %eax setne %al decq %rsi cmpq %rdi, %rsi seta %cl andb %al, %cl cmpb $0x1, %cl jne 0xb629a incq %rdi movb -0x1(%rdi), %al movb (%rsi), %cl movb %cl, -0x1(%rdi) movb %al, (%rsi) decq %rsi leaq 0x1(%rdi), %rax cmpq %rsi, %rdi movq %rax, %rdi jb 0xb6270 jmp 0xb629a cmpq %rsi, %rdi jae 0xb629a notb (%rdi) incq %rdi cmpq %rsi, %rdi jne 0xb6290 popq %rbp retq
my_strxfrm_desc_and_reverse: push rbp mov rbp, rsp mov r8d, edx shr r8d, cl mov eax, offset stru_10000 shl eax, cl bt r8d, 8 jnb short loc_B6258 test eax, edx jz short loc_B628B dec rsi cmp rsi, rdi jb short loc_B629A inc rdi loc_B6239: mov al, [rdi-1] mov cl, [rsi] not cl mov [rdi-1], cl not al mov [rsi], al dec rsi lea rax, [rdi+1] cmp rdi, rsi mov rdi, rax jbe short loc_B6239 jmp short loc_B629A loc_B6258: test eax, edx setnz al dec rsi cmp rsi, rdi setnbe cl and cl, al cmp cl, 1 jnz short loc_B629A inc rdi loc_B6270: mov al, [rdi-1] mov cl, [rsi] mov [rdi-1], cl mov [rsi], al dec rsi lea rax, [rdi+1] cmp rdi, rsi mov rdi, rax jb short loc_B6270 jmp short loc_B629A loc_B628B: cmp rdi, rsi jnb short loc_B629A loc_B6290: not byte ptr [rdi] inc rdi cmp rdi, rsi jnz short loc_B6290 loc_B629A: pop rbp retn
char my_strxfrm_desc_and_reverse(_BYTE *a1, _BYTE *a2, unsigned int a3, char a4) { int v4; // eax _BYTE *v5; // rsi _BYTE *v6; // rdi char v7; // al _BYTE *v9; // rsi _BYTE *v10; // rdi char v11; // al v4 = (_DWORD)&stru_10000 << a4; if ( ((a3 >> a4) & 0x100) != 0 ) { if ( (a3 & v4) != 0 ) { v5 = a2 - 1; if ( v5 >= a1 ) { v6 = a1 + 1; do { v7 = *(v6 - 1); *(v6 - 1) = ~*v5; *v5-- = ~v7; LOBYTE(v4) = (_BYTE)v6 + 1; } while ( v6++ <= v5 ); } } else if ( a1 < a2 ) { do { *a1 = ~*a1; ++a1; } while ( a1 != a2 ); } } else { LOBYTE(v4) = (a3 & v4) != 0; v9 = a2 - 1; if ( ((unsigned __int8)v4 & (v9 > a1)) == 1 ) { v10 = a1 + 1; do { v11 = *(v10 - 1); *(v10 - 1) = *v9; *v9-- = v11; LOBYTE(v4) = (_BYTE)v10 + 1; } while ( v10++ < v9 ); } } return v4; }
my_strxfrm_desc_and_reverse: PUSH RBP MOV RBP,RSP MOV R8D,EDX SHR R8D,CL MOV EAX,0x10000 SHL EAX,CL BT R8D,0x8 JNC 0x001b6258 TEST EAX,EDX JZ 0x001b628b DEC RSI CMP RSI,RDI JC 0x001b629a INC RDI LAB_001b6239: MOV AL,byte ptr [RDI + -0x1] MOV CL,byte ptr [RSI] NOT CL MOV byte ptr [RDI + -0x1],CL NOT AL MOV byte ptr [RSI],AL DEC RSI LEA RAX,[RDI + 0x1] CMP RDI,RSI MOV RDI,RAX JBE 0x001b6239 JMP 0x001b629a LAB_001b6258: TEST EAX,EDX SETNZ AL DEC RSI CMP RSI,RDI SETA CL AND CL,AL CMP CL,0x1 JNZ 0x001b629a INC RDI LAB_001b6270: MOV AL,byte ptr [RDI + -0x1] MOV CL,byte ptr [RSI] MOV byte ptr [RDI + -0x1],CL MOV byte ptr [RSI],AL DEC RSI LEA RAX,[RDI + 0x1] CMP RDI,RSI MOV RDI,RAX JC 0x001b6270 JMP 0x001b629a LAB_001b628b: CMP RDI,RSI JNC 0x001b629a LAB_001b6290: NOT byte ptr [RDI] INC RDI CMP RDI,RSI JNZ 0x001b6290 LAB_001b629a: POP RBP RET
void my_strxfrm_desc_and_reverse(byte *param_1,byte *param_2,uint param_3,byte param_4) { byte bVar1; uint uVar2; byte *pbVar3; bool bVar4; uVar2 = 0x10000 << (param_4 & 0x1f); if (((param_3 >> (param_4 & 0x1f)) >> 8 & 1) == 0) { param_2 = param_2 + -1; if (param_1 < param_2 && (uVar2 & param_3) != 0) { pbVar3 = param_1 + 1; do { bVar1 = pbVar3[-1]; pbVar3[-1] = *param_2; *param_2 = bVar1; param_2 = param_2 + -1; bVar4 = pbVar3 < param_2; pbVar3 = pbVar3 + 1; } while (bVar4); } } else if ((uVar2 & param_3) == 0) { if (param_1 < param_2) { do { *param_1 = ~*param_1; param_1 = param_1 + 1; } while (param_1 != param_2); } } else { param_2 = param_2 + -1; if (param_1 <= param_2) { pbVar3 = param_1 + 1; do { bVar1 = pbVar3[-1]; pbVar3[-1] = ~*param_2; *param_2 = ~bVar1; param_2 = param_2 + -1; bVar4 = pbVar3 <= param_2; pbVar3 = pbVar3 + 1; } while (bVar4); } } return; }
35,535
ggml_cpy
llama.cpp/ggml/src/ggml.c
struct ggml_tensor * ggml_cpy( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b) { return ggml_cpy_impl(ctx, a, b); }
O3
c
ggml_cpy: pushq %r15 pushq %r14 pushq %rbx movq 0x18(%rsi), %rax imulq 0x10(%rsi), %rax imulq 0x20(%rsi), %rax imulq 0x28(%rsi), %rax movq 0x18(%rdx), %rcx imulq 0x10(%rdx), %rcx imulq 0x20(%rdx), %rcx imulq 0x28(%rdx), %rcx cmpq %rcx, %rax jne 0x1b85b movq %rsi, %rbx movq %rdx, %r14 movq %rdx, %rsi callq 0x16240 movq %rax, %r15 movl $0x100, %edx # imm = 0x100 leaq (%rbx,%rdx), %rcx cmpb $0x0, 0x100(%r14) je 0x1b828 addq %r14, %rdx leaq 0x30ff8(%rip), %rsi # 0x4c814 movq %r15, %rdi xorl %eax, %eax callq 0x17a20 jmp 0x1b83c leaq 0x2f116(%rip), %rsi # 0x4a945 movq %r15, %rdi movq %rcx, %rdx xorl %eax, %eax callq 0x17a20 movl $0x20, 0x50(%r15) movq %rbx, 0x98(%r15) movq %r14, 0xa0(%r15) movq %r15, %rax popq %rbx popq %r14 popq %r15 retq leaq 0x2edb1(%rip), %rdi # 0x4a613 leaq 0x2ede5(%rip), %rdx # 0x4a64e leaq 0x2f126(%rip), %rcx # 0x4a996 movl $0xb83, %esi # imm = 0xB83 xorl %eax, %eax callq 0x17c80
ggml_cpy: push r15 push r14 push rbx mov rax, [rsi+18h] imul rax, [rsi+10h] imul rax, [rsi+20h] imul rax, [rsi+28h] mov rcx, [rdx+18h] imul rcx, [rdx+10h] imul rcx, [rdx+20h] imul rcx, [rdx+28h] cmp rax, rcx jnz short loc_1B85B mov rbx, rsi mov r14, rdx mov rsi, rdx call _ggml_view_tensor mov r15, rax mov edx, 100h lea rcx, [rbx+rdx] cmp byte ptr [r14+100h], 0 jz short loc_1B828 add rdx, r14 lea rsi, aSCopyOfS; "%s (copy of %s)" mov rdi, r15 xor eax, eax call _ggml_format_name jmp short loc_1B83C loc_1B828: lea rsi, aSCopy; "%s (copy)" mov rdi, r15 mov rdx, rcx xor eax, eax call _ggml_format_name loc_1B83C: mov dword ptr [r15+50h], 20h ; ' ' mov [r15+98h], rbx mov [r15+0A0h], r14 mov rax, r15 pop rbx pop r14 pop r15 retn loc_1B85B: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlNelementsA_0; "ggml_nelements(a) == ggml_nelements(b)" mov esi, 0B83h xor eax, eax call _ggml_abort
long long ggml_cpy(long long a1, _QWORD *a2, long long a3, long long a4, int a5, int a6) { long long v7; // rax long long v8; // r15 if ( a2[5] * a2[4] * a2[2] * a2[3] != *(_QWORD *)(a3 + 40) * *(_QWORD *)(a3 + 32) * *(_QWORD *)(a3 + 16) * *(_QWORD *)(a3 + 24) ) ggml_abort( (unsigned int)"/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c", 2947, (unsigned int)"GGML_ASSERT(%s) failed", (unsigned int)"ggml_nelements(a) == ggml_nelements(b)", a5, a6); v7 = ggml_view_tensor(a1, a3); v8 = v7; if ( *(_BYTE *)(a3 + 256) ) ggml_format_name(v7, (long long)"%s (copy of %s)"); else ggml_format_name(v7, (long long)"%s (copy)"); *(_DWORD *)(v8 + 80) = 32; *(_QWORD *)(v8 + 152) = a2; *(_QWORD *)(v8 + 160) = a3; return v8; }
ggml_cpy: PUSH R15 PUSH R14 PUSH RBX MOV RAX,qword ptr [RSI + 0x18] IMUL RAX,qword ptr [RSI + 0x10] IMUL RAX,qword ptr [RSI + 0x20] IMUL RAX,qword ptr [RSI + 0x28] MOV RCX,qword ptr [RDX + 0x18] IMUL RCX,qword ptr [RDX + 0x10] IMUL RCX,qword ptr [RDX + 0x20] IMUL RCX,qword ptr [RDX + 0x28] CMP RAX,RCX JNZ 0x0011b85b MOV RBX,RSI MOV R14,RDX MOV RSI,RDX CALL 0x00116240 MOV R15,RAX MOV EDX,0x100 LEA RCX,[RBX + RDX*0x1] CMP byte ptr [R14 + 0x100],0x0 JZ 0x0011b828 ADD RDX,R14 LEA RSI,[0x14c814] MOV RDI,R15 XOR EAX,EAX CALL 0x00117a20 JMP 0x0011b83c LAB_0011b828: LEA RSI,[0x14a945] MOV RDI,R15 MOV RDX,RCX XOR EAX,EAX CALL 0x00117a20 LAB_0011b83c: MOV dword ptr [R15 + 0x50],0x20 MOV qword ptr [R15 + 0x98],RBX MOV qword ptr [R15 + 0xa0],R14 MOV RAX,R15 POP RBX POP R14 POP R15 RET LAB_0011b85b: LEA RDI,[0x14a613] LEA RDX,[0x14a64e] LEA RCX,[0x14a996] MOV ESI,0xb83 XOR EAX,EAX CALL 0x00117c80
long ggml_cpy(int8 param_1,long param_2,long param_3) { long lVar1; if (*(long *)(param_2 + 0x18) * *(long *)(param_2 + 0x10) * *(long *)(param_2 + 0x20) * *(long *)(param_2 + 0x28) - *(long *)(param_3 + 0x18) * *(long *)(param_3 + 0x10) * *(long *)(param_3 + 0x20) * *(long *)(param_3 + 0x28) == 0) { lVar1 = ggml_view_tensor(param_1,param_3); if (*(char *)(param_3 + 0x100) == '\0') { ggml_format_name(lVar1,"%s (copy)",param_2 + 0x100); } else { ggml_format_name(lVar1,"%s (copy of %s)",param_3 + 0x100); } *(int4 *)(lVar1 + 0x50) = 0x20; *(long *)(lVar1 + 0x98) = param_2; *(long *)(lVar1 + 0xa0) = param_3; return lVar1; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c",0xb83, "GGML_ASSERT(%s) failed","ggml_nelements(a) == ggml_nelements(b)"); }
35,536
bf_asin
bluesky950520[P]quickjs/libbf.c
int bf_asin(bf_t *r, const bf_t *a, limb_t prec, bf_flags_t flags) { bf_context_t *s = r->ctx; bf_t T_s, *T = &T_s; int res; if (a->len == 0) { if (a->expn == BF_EXP_NAN) { bf_set_nan(r); return 0; } else if (a->expn == BF_EXP_INF) { bf_set_nan(r); return BF_ST_INVALID_OP; } else { bf_set_zero(r, a->sign); return 0; } } bf_init(s, T); bf_set_ui(T, 1); res = bf_cmpu(a, T); bf_delete(T); if (res > 0) { bf_set_nan(r); return BF_ST_INVALID_OP; } /* small argument case: result = x+r(x) with r(x) = x^3/6 + O(X^5). We assume r(x) < 2^(3*EXP(x) - 2). */ if (a->expn < 0) { slimb_t e; e = sat_add(2 * a->expn, a->expn - 2); if (e < a->expn - bf_max(prec + 2, a->len * LIMB_BITS + 2)) { bf_set(r, a); return bf_add_epsilon(r, r, e, a->sign, prec, flags); } } return bf_ziv_rounding(r, a, prec, flags, bf_asin_internal, (void *)FALSE); }
O1
c
bf_asin: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rsi, %r14 movq %rdi, %rbx movabsq $0x7fffffffffffffff, %rbp # imm = 0x7FFFFFFFFFFFFFFF movq (%rdi), %rax cmpq $0x0, 0x18(%rsi) je 0x8d438 movq %rdx, %r15 movl %ecx, 0xc(%rsp) leaq 0x10(%rsp), %r13 movq %rax, (%r13) movl $0x0, 0x8(%r13) leaq 0x1(%rbp), %rax movq %rax, 0x10(%r13) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%r13) movl $0x1, %esi movq %r13, %rdi callq 0x84abb movq %r14, %rdi movq %r13, %rsi callq 0x8542a movl %eax, %r12d movq (%r13), %rax testq %rax, %rax je 0x8d420 movq 0x30(%rsp), %rsi testq %rsi, %rsi je 0x8d420 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) testl %r12d, %r12d jle 0x8d487 cmpq $0x0, 0x18(%rbx) je 0x8d531 movq (%rbx), %rax jmp 0x8d519 movq 0x10(%r14), %rcx movabsq $0x7ffffffffffffffe, %rdx # imm = 0x7FFFFFFFFFFFFFFE cmpq %rdx, %rcx je 0x8d512 cmpq %rbp, %rcx jne 0x8d543 cmpq $0x0, 0x18(%rbx) je 0x8d477 movq 0x20(%rbx), %rsi movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq %rax, 0x20(%rbx) movq $0x0, 0x18(%rbx) movq %rbp, 0x10(%rbx) movl $0x0, 0x8(%rbx) jmp 0x8d571 movq 0x10(%r14), %r13 testq %r13, %r13 jns 0x8d4e8 leaq -0x2(,%r13,2), %r12 addq %r13, %r12 leaq 0x2(%r15), %rax movq 0x18(%r14), %rcx shlq $0x6, %rcx orq $0x2, %rcx cmpq %rcx, %rax cmovgq %rax, %rcx subq %rcx, %r13 cmpq %r13, %r12 jge 0x8d4df movq %rbx, %rdi movq %r14, %rsi callq 0x84c8d movl 0x8(%r14), %ecx movq %rbx, %rdi movq %rbx, %rsi movq %r12, %rdx movq %r15, %r8 movl 0xc(%rsp), %r9d callq 0x8ac4a cmpq %r13, %r12 jl 0x8d573 leaq 0x93(%rip), %r8 # 0x8d582 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx movl 0xc(%rsp), %ecx xorl %r9d, %r9d addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x8acec cmpq $0x0, 0x18(%rbx) je 0x8d531 movq 0x20(%rbx), %rsi movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq %rax, 0x20(%rbx) movq $0x0, 0x18(%rbx) movq %rbp, 0x10(%rbx) movl $0x0, 0x8(%rbx) movl $0x1, %eax jmp 0x8d573 movl 0x8(%r14), %r14d cmpq $0x0, 0x18(%rbx) je 0x8d566 movq 0x20(%rbx), %rsi movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq %rax, 0x20(%rbx) movq $0x0, 0x18(%rbx) incq %rbp movq %rbp, 0x10(%rbx) movl %r14d, 0x8(%rbx) xorl %eax, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
bf_asin: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r14, rsi mov rbx, rdi mov rbp, 7FFFFFFFFFFFFFFFh mov rax, [rdi] cmp qword ptr [rsi+18h], 0 jz short loc_8D438 mov r15, rdx mov [rsp+68h+var_5C], ecx lea r13, [rsp+68h+var_58] mov [r13+0], rax mov dword ptr [r13+8], 0 lea rax, [rbp+1] mov [r13+10h], rax xorps xmm0, xmm0 movups xmmword ptr [r13+18h], xmm0 mov esi, 1 mov rdi, r13 call bf_set_ui mov rdi, r14 mov rsi, r13 call bf_cmpu mov r12d, eax mov rax, [r13+0] test rax, rax jz short loc_8D420 mov rsi, [rsp+68h+var_38] test rsi, rsi jz short loc_8D420 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8D420: test r12d, r12d jle short loc_8D487 cmp qword ptr [rbx+18h], 0 jz loc_8D531 mov rax, [rbx] jmp loc_8D519 loc_8D438: mov rcx, [r14+10h] mov rdx, 7FFFFFFFFFFFFFFEh cmp rcx, rdx jz loc_8D512 cmp rcx, rbp jnz loc_8D543 cmp qword ptr [rbx+18h], 0 jz short loc_8D477 mov rsi, [rbx+20h] mov rdi, [rax] xor edx, edx call qword ptr [rax+8] mov [rbx+20h], rax mov qword ptr [rbx+18h], 0 loc_8D477: mov [rbx+10h], rbp mov dword ptr [rbx+8], 0 jmp loc_8D571 loc_8D487: mov r13, [r14+10h] test r13, r13 jns short loc_8D4E8 lea r12, ds:0FFFFFFFFFFFFFFFEh[r13*2] add r12, r13 lea rax, [r15+2] mov rcx, [r14+18h] shl rcx, 6 or rcx, 2 cmp rax, rcx cmovg rcx, rax sub r13, rcx cmp r12, r13 jge short loc_8D4DF mov rdi, rbx mov rsi, r14 call bf_set mov ecx, [r14+8] mov rdi, rbx mov rsi, rbx mov rdx, r12 mov r8, r15 mov r9d, [rsp+68h+var_5C] call bf_add_epsilon loc_8D4DF: cmp r12, r13 jl loc_8D573 loc_8D4E8: lea r8, bf_asin_internal mov rdi, rbx mov rsi, r14 mov rdx, r15 mov ecx, [rsp+68h+var_5C] xor r9d, r9d add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp bf_ziv_rounding loc_8D512: cmp qword ptr [rbx+18h], 0 jz short loc_8D531 loc_8D519: mov rsi, [rbx+20h] mov rdi, [rax] xor edx, edx call qword ptr [rax+8] mov [rbx+20h], rax mov qword ptr [rbx+18h], 0 loc_8D531: mov [rbx+10h], rbp mov dword ptr [rbx+8], 0 mov eax, 1 jmp short loc_8D573 loc_8D543: mov r14d, [r14+8] cmp qword ptr [rbx+18h], 0 jz short loc_8D566 mov rsi, [rbx+20h] mov rdi, [rax] xor edx, edx call qword ptr [rax+8] mov [rbx+20h], rax mov qword ptr [rbx+18h], 0 loc_8D566: inc rbp mov [rbx+10h], rbp mov [rbx+8], r14d loc_8D571: xor eax, eax loc_8D573: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long bf_asin(long long a1, long long a2, long long a3, unsigned int a4) { _QWORD *v4; // rax int v6; // r12d long long v7; // rcx long long v8; // r13 long long v9; // r12 long long v10; // rcx int v12; // r14d _QWORD *v14; // [rsp+10h] [rbp-58h] BYREF int v15; // [rsp+18h] [rbp-50h] unsigned long long v16; // [rsp+20h] [rbp-48h] __int128 v17; // [rsp+28h] [rbp-40h] v4 = *(_QWORD **)a1; if ( *(_QWORD *)(a2 + 24) ) { v14 = *(_QWORD **)a1; v15 = 0; v16 = 0x8000000000000000LL; v17 = 0LL; bf_set_ui(&v14, 1uLL); v6 = bf_cmpu((_QWORD *)a2, &v14); if ( v14 && *((_QWORD *)&v17 + 1) ) ((void ( *)(_QWORD, _QWORD, _QWORD))v14[1])(*v14, *((_QWORD *)&v17 + 1), 0LL); if ( v6 > 0 ) { if ( *(_QWORD *)(a1 + 24) ) { v4 = *(_QWORD **)a1; LABEL_20: *(_QWORD *)(a1 + 32) = ((long long ( *)(_QWORD, _QWORD, _QWORD))v4[1])(*v4, *(_QWORD *)(a1 + 32), 0LL); *(_QWORD *)(a1 + 24) = 0LL; } LABEL_21: *(_QWORD *)(a1 + 16) = 0x7FFFFFFFFFFFFFFFLL; *(_DWORD *)(a1 + 8) = 0; return 1LL; } v8 = *(_QWORD *)(a2 + 16); if ( v8 >= 0 ) return bf_ziv_rounding( (_QWORD *)a1, a2, a3, a4, (void ( *)(_QWORD *, long long, long long, long long))bf_asin_internal, 0LL); v9 = v8 + 2 * v8 - 2; v10 = (*(_QWORD *)(a2 + 24) << 6) | 2LL; if ( a3 + 2 > v10 ) v10 = a3 + 2; if ( v9 >= v8 - v10 ) { return bf_ziv_rounding( (_QWORD *)a1, a2, a3, a4, (void ( *)(_QWORD *, long long, long long, long long))bf_asin_internal, 0LL); } else { bf_set((_QWORD *)a1, a2); return bf_add_epsilon((__int128 *)a1, (_QWORD *)a1, v9, *(_DWORD *)(a2 + 8), a3, a4); } } else { v7 = *(_QWORD *)(a2 + 16); if ( v7 == 0x7FFFFFFFFFFFFFFELL ) { if ( *(_QWORD *)(a1 + 24) ) goto LABEL_20; goto LABEL_21; } if ( v7 == 0x7FFFFFFFFFFFFFFFLL ) { if ( *(_QWORD *)(a1 + 24) ) { *(_QWORD *)(a1 + 32) = ((long long ( *)(_QWORD, _QWORD, _QWORD))v4[1])(*v4, *(_QWORD *)(a1 + 32), 0LL); *(_QWORD *)(a1 + 24) = 0LL; } *(_QWORD *)(a1 + 16) = 0x7FFFFFFFFFFFFFFFLL; *(_DWORD *)(a1 + 8) = 0; } else { v12 = *(_DWORD *)(a2 + 8); if ( *(_QWORD *)(a1 + 24) ) { *(_QWORD *)(a1 + 32) = ((long long ( *)(_QWORD, _QWORD, _QWORD))v4[1])(*v4, *(_QWORD *)(a1 + 32), 0LL); *(_QWORD *)(a1 + 24) = 0LL; } *(_QWORD *)(a1 + 16) = 0x8000000000000000LL; *(_DWORD *)(a1 + 8) = v12; } return 0LL; } }
35,537
bf_asin
bluesky950520[P]quickjs/libbf.c
int bf_asin(bf_t *r, const bf_t *a, limb_t prec, bf_flags_t flags) { bf_context_t *s = r->ctx; bf_t T_s, *T = &T_s; int res; if (a->len == 0) { if (a->expn == BF_EXP_NAN) { bf_set_nan(r); return 0; } else if (a->expn == BF_EXP_INF) { bf_set_nan(r); return BF_ST_INVALID_OP; } else { bf_set_zero(r, a->sign); return 0; } } bf_init(s, T); bf_set_ui(T, 1); res = bf_cmpu(a, T); bf_delete(T); if (res > 0) { bf_set_nan(r); return BF_ST_INVALID_OP; } /* small argument case: result = x+r(x) with r(x) = x^3/6 + O(X^5). We assume r(x) < 2^(3*EXP(x) - 2). */ if (a->expn < 0) { slimb_t e; e = sat_add(2 * a->expn, a->expn - 2); if (e < a->expn - bf_max(prec + 2, a->len * LIMB_BITS + 2)) { bf_set(r, a); return bf_add_epsilon(r, r, e, a->sign, prec, flags); } } return bf_ziv_rounding(r, a, prec, flags, bf_asin_internal, (void *)FALSE); }
O2
c
bf_asin: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %r14 movq %rdi, %rbx cmpq $0x0, 0x18(%rsi) je 0x7606b movl %ecx, %ebp movq %rdx, %r15 movq (%rbx), %rax movq %rsp, %r12 movq %rax, (%r12) andl $0x0, 0x8(%r12) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, 0x10(%r12) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%r12) pushq $0x1 popq %rsi movq %r12, %rdi callq 0x6f556 movq %r14, %rdi movq %r12, %rsi callq 0x6fd66 movl %eax, %r13d movq %r12, %rdi callq 0x7145e testl %r13d, %r13d jg 0x76097 movq 0x10(%r14), %rax testq %rax, %rax jns 0x760a4 leaq (%rax,%rax,2), %r12 addq $-0x2, %r12 leaq 0x2(%r15), %rcx movq 0x18(%r14), %rdx shlq $0x6, %rdx orq $0x2, %rdx cmpq %rdx, %rcx cmovgq %rcx, %rdx subq %rdx, %rax cmpq %rax, %r12 jge 0x760a4 movq %rbx, %rdi movq %r14, %rsi callq 0x6f666 movl 0x8(%r14), %ecx movq %rbx, %rdi movq %rbx, %rsi movq %r12, %rdx movq %r15, %r8 movl %ebp, %r9d addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x74401 movq 0x10(%r14), %rax movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE cmpq %rcx, %rax je 0x76097 movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF cmpq %rcx, %rax jne 0x760cc movq %rbx, %rdi callq 0x6f5cd jmp 0x760d8 movq %rbx, %rdi callq 0x6f5cd pushq $0x1 popq %rax jmp 0x760da leaq 0x3e(%rip), %r8 # 0x760e9 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx movl %ebp, %ecx xorl %r9d, %r9d addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x74484 movl 0x8(%r14), %esi movq %rbx, %rdi callq 0x6f612 xorl %eax, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
bf_asin: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14, rsi mov rbx, rdi cmp qword ptr [rsi+18h], 0 jz loc_7606B mov ebp, ecx mov r15, rdx mov rax, [rbx] mov r12, rsp mov [r12], rax and dword ptr [r12+8], 0 mov rax, 8000000000000000h mov [r12+10h], rax xorps xmm0, xmm0 movups xmmword ptr [r12+18h], xmm0 push 1 pop rsi mov rdi, r12 call bf_set_ui mov rdi, r14 mov rsi, r12 call bf_cmpu mov r13d, eax mov rdi, r12 call bf_delete_0 test r13d, r13d jg loc_76097 mov rax, [r14+10h] test rax, rax jns loc_760A4 lea r12, [rax+rax*2] add r12, 0FFFFFFFFFFFFFFFEh lea rcx, [r15+2] mov rdx, [r14+18h] shl rdx, 6 or rdx, 2 cmp rcx, rdx cmovg rdx, rcx sub rax, rdx cmp r12, rax jge short loc_760A4 mov rdi, rbx mov rsi, r14 call bf_set mov ecx, [r14+8] mov rdi, rbx mov rsi, rbx mov rdx, r12 mov r8, r15 mov r9d, ebp add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp bf_add_epsilon loc_7606B: mov rax, [r14+10h] mov rcx, 7FFFFFFFFFFFFFFEh cmp rax, rcx jz short loc_76097 mov rcx, 7FFFFFFFFFFFFFFFh cmp rax, rcx jnz short loc_760CC mov rdi, rbx call bf_set_nan jmp short loc_760D8 loc_76097: mov rdi, rbx call bf_set_nan push 1 pop rax jmp short loc_760DA loc_760A4: lea r8, bf_asin_internal mov rdi, rbx mov rsi, r14 mov rdx, r15 mov ecx, ebp xor r9d, r9d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp bf_ziv_rounding loc_760CC: mov esi, [r14+8] mov rdi, rbx call bf_set_zero loc_760D8: xor eax, eax loc_760DA: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long bf_asin(long long *a1, long long a2, long long a3, unsigned int a4) { int v6; // r13d long long v7; // rax long long v8; // r12 long long v9; // rdx long long v11; // rax long long v12; // [rsp+0h] [rbp-58h] BYREF int v13; // [rsp+8h] [rbp-50h] unsigned long long v14; // [rsp+10h] [rbp-48h] __int128 v15; // [rsp+18h] [rbp-40h] if ( !*(_QWORD *)(a2 + 24) ) { v11 = *(_QWORD *)(a2 + 16); if ( v11 != 0x7FFFFFFFFFFFFFFELL ) { if ( v11 == 0x7FFFFFFFFFFFFFFFLL ) bf_set_nan((long long)a1); else bf_set_zero((long long)a1, *(_DWORD *)(a2 + 8)); return 0LL; } LABEL_11: bf_set_nan((long long)a1); return 1LL; } v12 = *a1; v13 = 0; v14 = 0x8000000000000000LL; v15 = 0LL; bf_set_ui((long long)&v12, 1uLL); v6 = bf_cmpu((_QWORD *)a2, &v12); bf_delete_0(&v12); if ( v6 > 0 ) goto LABEL_11; v7 = *(_QWORD *)(a2 + 16); if ( v7 >= 0 ) return bf_ziv_rounding( a1, a2, a3, a4, (void ( *)(_QWORD *, long long, long long, long long))bf_asin_internal, 0LL); v8 = 3 * v7 - 2; v9 = (*(_QWORD *)(a2 + 24) << 6) | 2LL; if ( a3 + 2 > v9 ) v9 = a3 + 2; if ( v8 >= v7 - v9 ) return bf_ziv_rounding( a1, a2, a3, a4, (void ( *)(_QWORD *, long long, long long, long long))bf_asin_internal, 0LL); bf_set((long long)a1, a2); return bf_add_epsilon((long long)a1, a1, v8, *(_DWORD *)(a2 + 8), a3, a4); }
bf_asin: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,RSI MOV RBX,RDI CMP qword ptr [RSI + 0x18],0x0 JZ 0x0017606b MOV EBP,ECX MOV R15,RDX MOV RAX,qword ptr [RBX] MOV R12,RSP MOV qword ptr [R12],RAX AND dword ptr [R12 + 0x8],0x0 MOV RAX,-0x8000000000000000 MOV qword ptr [R12 + 0x10],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R12 + 0x18],XMM0 PUSH 0x1 POP RSI MOV RDI,R12 CALL 0x0016f556 MOV RDI,R14 MOV RSI,R12 CALL 0x0016fd66 MOV R13D,EAX MOV RDI,R12 CALL 0x0017145e TEST R13D,R13D JG 0x00176097 MOV RAX,qword ptr [R14 + 0x10] TEST RAX,RAX JNS 0x001760a4 LEA R12,[RAX + RAX*0x2] ADD R12,-0x2 LEA RCX,[R15 + 0x2] MOV RDX,qword ptr [R14 + 0x18] SHL RDX,0x6 OR RDX,0x2 CMP RCX,RDX CMOVG RDX,RCX SUB RAX,RDX CMP R12,RAX JGE 0x001760a4 MOV RDI,RBX MOV RSI,R14 CALL 0x0016f666 MOV ECX,dword ptr [R14 + 0x8] MOV RDI,RBX MOV RSI,RBX MOV RDX,R12 MOV R8,R15 MOV R9D,EBP ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00174401 LAB_0017606b: MOV RAX,qword ptr [R14 + 0x10] MOV RCX,0x7ffffffffffffffe CMP RAX,RCX JZ 0x00176097 MOV RCX,0x7fffffffffffffff CMP RAX,RCX JNZ 0x001760cc MOV RDI,RBX CALL 0x0016f5cd JMP 0x001760d8 LAB_00176097: MOV RDI,RBX CALL 0x0016f5cd PUSH 0x1 POP RAX JMP 0x001760da LAB_001760a4: LEA R8,[0x1760e9] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 MOV ECX,EBP XOR R9D,R9D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00174484 LAB_001760cc: MOV ESI,dword ptr [R14 + 0x8] MOV RDI,RBX CALL 0x0016f612 LAB_001760d8: XOR EAX,EAX LAB_001760da: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 bf_asin(int8 *param_1,long param_2,long param_3,int4 param_4) { long lVar1; int iVar2; int8 uVar3; ulong uVar4; long lVar5; int8 local_58; int4 local_50; int8 local_48; int8 local_40; int8 uStack_38; if (*(long *)(param_2 + 0x18) == 0) { if (*(long *)(param_2 + 0x10) != 0x7ffffffffffffffe) { if (*(long *)(param_2 + 0x10) == 0x7fffffffffffffff) { bf_set_nan(param_1); } else { bf_set_zero(param_1,*(int4 *)(param_2 + 8)); } return 0; } } else { local_58 = *param_1; local_50 = 0; local_48 = 0x8000000000000000; local_40 = 0; uStack_38 = 0; bf_set_ui(&local_58,1); iVar2 = bf_cmpu(param_2,&local_58); bf_delete(&local_58); if (iVar2 < 1) { lVar1 = *(long *)(param_2 + 0x10); if (lVar1 < 0) { lVar5 = lVar1 * 3 + -2; uVar4 = *(long *)(param_2 + 0x18) << 6 | 2; if ((long)uVar4 < (long)(param_3 + 2U)) { uVar4 = param_3 + 2U; } if (lVar5 < (long)(lVar1 - uVar4)) { bf_set(param_1,param_2); uVar3 = bf_add_epsilon(param_1,param_1,lVar5,*(int4 *)(param_2 + 8),param_3,param_4) ; return uVar3; } } uVar3 = bf_ziv_rounding(param_1,param_2,param_3,param_4,bf_asin_internal,0); return uVar3; } } bf_set_nan(param_1); return 1; }
35,538
lodepng_color_mode_alloc_palette(LodePNGColorMode*)
aimrt_mujoco_sim/_deps/lodepng-src/lodepng.cpp
static void lodepng_color_mode_alloc_palette(LodePNGColorMode* info) { size_t i; /*if the palette is already allocated, it will have size 1024 so no reallocation needed in that case*/ /*the palette must have room for up to 256 colors with 4 bytes each.*/ if(!info->palette) info->palette = (unsigned char*)lodepng_malloc(1024); if(!info->palette) return; /*alloc fail*/ for(i = 0; i != 256; ++i) { /*Initialize all unused colors with black, the value used for invalid palette indices. This is an error according to the PNG spec, but common PNG decoders make it black instead. That makes color conversion slightly faster due to no error handling needed.*/ info->palette[i * 4 + 0] = 0; info->palette[i * 4 + 1] = 0; info->palette[i * 4 + 2] = 0; info->palette[i * 4 + 3] = 255; } }
O0
cpp
lodepng_color_mode_alloc_palette(LodePNGColorMode*): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rax cmpq $0x0, 0x8(%rax) jne 0x3aa0db movl $0x400, %edi # imm = 0x400 callq 0x3a7d40 movq %rax, %rcx movq 0x10(%rsp), %rax movq %rcx, 0x8(%rax) movq 0x10(%rsp), %rax cmpq $0x0, 0x8(%rax) jne 0x3aa0e9 jmp 0x3aa168 movq $0x0, 0x8(%rsp) cmpq $0x100, 0x8(%rsp) # imm = 0x100 je 0x3aa168 movq 0x10(%rsp), %rax movq 0x8(%rax), %rax movq 0x8(%rsp), %rcx shlq $0x2, %rcx movb $0x0, (%rax,%rcx) movq 0x10(%rsp), %rax movq 0x8(%rax), %rax movq 0x8(%rsp), %rcx shlq $0x2, %rcx movb $0x0, 0x1(%rax,%rcx) movq 0x10(%rsp), %rax movq 0x8(%rax), %rax movq 0x8(%rsp), %rcx shlq $0x2, %rcx movb $0x0, 0x2(%rax,%rcx) movq 0x10(%rsp), %rax movq 0x8(%rax), %rax movq 0x8(%rsp), %rcx shlq $0x2, %rcx movb $-0x1, 0x3(%rax,%rcx) movq 0x8(%rsp), %rax addq $0x1, %rax movq %rax, 0x8(%rsp) jmp 0x3aa0f2 addq $0x18, %rsp retq nopl (%rax)
_ZL32lodepng_color_mode_alloc_paletteP16LodePNGColorMode: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rax, [rsp+18h+var_8] cmp qword ptr [rax+8], 0 jnz short loc_3AA0DB mov edi, 400h; unsigned __int64 call _ZL14lodepng_mallocm; lodepng_malloc(ulong) mov rcx, rax mov rax, [rsp+18h+var_8] mov [rax+8], rcx loc_3AA0DB: mov rax, [rsp+18h+var_8] cmp qword ptr [rax+8], 0 jnz short loc_3AA0E9 jmp short loc_3AA168 loc_3AA0E9: mov [rsp+18h+var_10], 0 loc_3AA0F2: cmp [rsp+18h+var_10], 100h jz short loc_3AA168 mov rax, [rsp+18h+var_8] mov rax, [rax+8] mov rcx, [rsp+18h+var_10] shl rcx, 2 mov byte ptr [rax+rcx], 0 mov rax, [rsp+18h+var_8] mov rax, [rax+8] mov rcx, [rsp+18h+var_10] shl rcx, 2 mov byte ptr [rax+rcx+1], 0 mov rax, [rsp+18h+var_8] mov rax, [rax+8] mov rcx, [rsp+18h+var_10] shl rcx, 2 mov byte ptr [rax+rcx+2], 0 mov rax, [rsp+18h+var_8] mov rax, [rax+8] mov rcx, [rsp+18h+var_10] shl rcx, 2 mov byte ptr [rax+rcx+3], 0FFh mov rax, [rsp+18h+var_10] add rax, 1 mov [rsp+18h+var_10], rax jmp short loc_3AA0F2 loc_3AA168: add rsp, 18h retn
long long lodepng_color_mode_alloc_palette(long long a1) { long long result; // rax long long i; // [rsp+8h] [rbp-10h] if ( !*(_QWORD *)(a1 + 8) ) *(_QWORD *)(a1 + 8) = lodepng_malloc(1024LL); result = a1; if ( *(_QWORD *)(a1 + 8) ) { for ( i = 0LL; i != 256; ++i ) { *(_BYTE *)(*(_QWORD *)(a1 + 8) + 4 * i) = 0; *(_BYTE *)(*(_QWORD *)(a1 + 8) + 4 * i + 1) = 0; *(_BYTE *)(*(_QWORD *)(a1 + 8) + 4 * i + 2) = 0; *(_BYTE *)(*(_QWORD *)(a1 + 8) + 4 * i + 3) = -1; result = i + 1; } } return result; }
operator--: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RAX] CALL 0x0018f060 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX],RCX ADD RSP,0x18 RET
/* std::_Rb_tree_iterator<std::pair<std::__cxx11::string const, google::protobuf::EnumValueDescriptor const*> >::TEMPNAMEPLACEHOLDERVALUE() */ void __thiscall std:: _Rb_tree_iterator<std::pair<std::__cxx11::string_const,google::protobuf::EnumValueDescriptor_const*>> ::operator--(_Rb_tree_iterator<std::pair<std::__cxx11::string_const,google::protobuf::EnumValueDescriptor_const*>> *this) { int8 uVar1; uVar1 = std::_Rb_tree_decrement(*(_Rb_tree_node_base **)this); *(int8 *)this = uVar1; return; }
35,539
my_b_cache_read_r
eloqsql/mysys/mf_iocache.c
static int _my_b_cache_read_r(IO_CACHE *cache, uchar *Buffer, size_t Count) { my_off_t pos_in_file; size_t length, diff_length, left_length= 0; IO_CACHE_SHARE *cshare= cache->share; DBUG_ENTER("_my_b_cache_read_r"); DBUG_ASSERT(!(cache->myflags & MY_ENCRYPT)); while (Count) { size_t cnt, len; pos_in_file= cache->pos_in_file + (cache->read_end - cache->buffer); diff_length= (size_t) (pos_in_file & (IO_SIZE-1)); length=IO_ROUND_UP(Count+diff_length)-diff_length; length= ((length <= cache->read_length) ? length + IO_ROUND_DN(cache->read_length - length) : length - IO_ROUND_UP(length - cache->read_length)); if (cache->type != READ_FIFO && (length > (cache->end_of_file - pos_in_file))) length= (size_t) (cache->end_of_file - pos_in_file); if (length == 0) { cache->error= (int) left_length; DBUG_RETURN(1); } if (lock_io_cache(cache, pos_in_file)) { /* With a synchronized write/read cache we won't come here... */ DBUG_ASSERT(!cshare->source_cache); /* ... unless the writer has gone before this thread entered the lock. Simulate EOF in this case. It can be distinguished by cache->file. */ if (cache->file < 0) len= 0; else { /* Whenever a function which operates on IO_CACHE flushes/writes some part of the IO_CACHE to disk it will set the property "seek_not_done" to indicate this to other functions operating on the IO_CACHE. */ if (cache->seek_not_done) { if (mysql_file_seek(cache->file, pos_in_file, MY_SEEK_SET, MYF(0)) == MY_FILEPOS_ERROR) { cache->error= -1; unlock_io_cache(cache); DBUG_RETURN(1); } } len= mysql_file_read(cache->file, cache->buffer, length, cache->myflags); } DBUG_PRINT("io_cache_share", ("read %lu bytes", (ulong) len)); cache->read_end= cache->buffer + (len == (size_t) -1 ? 0 : len); cache->error= (len == length ? 0 : (int) len); cache->pos_in_file= pos_in_file; /* Copy important values to the share. */ cshare->error= cache->error; cshare->read_end= cache->read_end; cshare->pos_in_file= pos_in_file; /* Mark all threads as running and wake them. */ unlock_io_cache(cache); } else { /* With a synchronized write/read cache readers always come here. Copy important values from the share. */ cache->error= cshare->error; cache->read_end= cshare->read_end; cache->pos_in_file= cshare->pos_in_file; len= ((cache->error == -1) ? (size_t) -1 : (size_t) (cache->read_end - cache->buffer)); } cache->read_pos= cache->buffer; cache->seek_not_done= 0; if (len == 0 || len == (size_t) -1) { DBUG_PRINT("io_cache_share", ("reader error. len %lu left %lu", (ulong) len, (ulong) left_length)); cache->error= (int) left_length; DBUG_RETURN(1); } cnt= (len > Count) ? Count : len; if (cnt) memcpy(Buffer, cache->read_pos, cnt); Count -= cnt; Buffer+= cnt; left_length+= cnt; cache->read_pos+= cnt; } DBUG_RETURN(0); }
O3
c
my_b_cache_read_r: testq %rdx, %rdx je 0x9ab12 pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, %r14 movq %rdi, %rbx movq %rsi, -0x50(%rbp) movq 0x98(%rdi), %rax movq %rax, -0x40(%rbp) xorl %edx, %edx movq 0x18(%rbx), %r13 movq 0xf0(%rbx), %r12 subq 0x20(%rbx), %r13 addq (%rbx), %r13 movl %r13d, %ecx andl $0xfff, %ecx # imm = 0xFFF leal (%r14,%rcx), %eax addl $0xfff, %eax # imm = 0xFFF andl $0xfffff000, %eax # imm = 0xFFFFF000 subq %rcx, %rax cmpq %r12, %rax jbe 0x9a8a0 movl %eax, %ecx subl %r12d, %ecx addl $0xfff, %ecx # imm = 0xFFF andl $0xfffff000, %ecx # imm = 0xFFFFF000 subq %rcx, %rax movq %rax, %r12 jmp 0x9a8ad subl %eax, %r12d andl $0xfffff000, %r12d # imm = 0xFFFFF000 addq %rax, %r12 cmpl $0x4, 0xb0(%rbx) je 0x9a8c4 movq 0x8(%rbx), %rax subq %r13, %rax cmpq %rax, %r12 cmovaeq %rax, %r12 testq %r12, %r12 je 0x9ab15 movq %rdx, -0x48(%rbp) movq %rbx, %rdi movq %r13, %rsi callq 0x9be3e testl %eax, %eax je 0x9a9a5 movl 0xd4(%rbx), %r15d testl %r15d, %r15d js 0x9a9dc cmpl $0x0, 0xe0(%rbx) je 0x9a945 leaq 0x2f65d4(%rip), %rax # 0x390ed8 movq (%rax), %rax leaq -0xa8(%rbp), %rdi movl %r15d, %esi movl $0x8, %edx callq *0x158(%rax) testq %rax, %rax jne 0x9aaf7 movl %r15d, %edi movq %r13, %rsi xorl %edx, %edx xorl %ecx, %ecx callq 0xa7e58 cmpq $-0x1, %rax je 0x9ab50 movl 0xd4(%rbx), %r15d movq 0x20(%rbx), %rax movq %rax, -0x38(%rbp) movq 0xf8(%rbx), %rax movq %rax, -0x30(%rbp) leaq 0x2f6579(%rip), %rax # 0x390ed8 movq (%rax), %rax leaq -0xa8(%rbp), %rdi movl %r15d, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x9aa7e movl %r15d, %edi movq -0x38(%rbp), %rsi movq %r12, %rdx movq -0x30(%rbp), %rcx callq 0xa7b1c movq %rax, %r15 cmpq $-0x1, %r15 movl $0x0, %eax cmovneq %r15, %rax jmp 0x9a9e1 movq -0x40(%rbp), %rcx movl 0xe0(%rcx), %eax movl %eax, 0xe4(%rbx) movq 0xd0(%rcx), %r15 movq %r15, 0x18(%rbx) movq 0xb8(%rcx), %rcx movq %rcx, (%rbx) movq 0x20(%rbx), %rsi cmpl $-0x1, %eax je 0x9ab21 subq %rsi, %r15 jmp 0x9aa2c xorl %r15d, %r15d xorl %eax, %eax addq 0x20(%rbx), %rax cmpq %r12, %r15 movl %r15d, %ecx movl $0x0, %edx cmovel %edx, %ecx movq %rax, 0x18(%rbx) movl %ecx, 0xe4(%rbx) movq %r13, (%rbx) movq -0x40(%rbp), %rdx movl %ecx, 0xe0(%rdx) movq 0x18(%rbx), %rax movq %rax, 0xd0(%rdx) movq %r13, 0xb8(%rdx) movq 0x98(%rbx), %rdi callq 0x9c03f movq 0x20(%rbx), %rsi movq %rsi, 0x10(%rbx) movl $0x0, 0xe0(%rbx) leaq 0x1(%r15), %rax cmpq $0x1, %rax jbe 0x9ab2f cmpq %r14, %r15 cmovaeq %r14, %r15 movq -0x50(%rbp), %r12 movq %r12, %rdi movq %r15, %rdx callq 0x2a0a0 addq %r15, %r12 movq %r12, -0x50(%rbp) movq -0x48(%rbp), %rdx addq %r15, %rdx addq %r15, 0x10(%rbx) subq %r15, %r14 jne 0x9a856 jmp 0x9ab1d movq %rax, %rcx leaq 0x2f6450(%rip), %rax # 0x390ed8 movq (%rax), %rax movq %rcx, -0x58(%rbp) movq %rcx, %rdi movq %r12, %rsi leaq 0x49eaf(%rip), %rdx # 0xe494b movl $0x4d3, %ecx # imm = 0x4D3 callq *0x210(%rax) movl %r15d, %edi movq -0x38(%rbp), %rsi movq %r12, %rdx movq -0x30(%rbp), %rcx callq 0xa7b1c movq %rax, %r15 testq %rax, %rax movl $0x0, %eax cmoveq %r12, %rax cmpq $-0x1, %r15 movl $0x0, %esi cmovneq %r15, %rsi testb $0x6, -0x30(%rbp) cmovneq %rax, %rsi leaq 0x2f63f3(%rip), %rax # 0x390ed8 movq (%rax), %rax movq -0x58(%rbp), %rdi callq *0x218(%rax) jmp 0x9a996 movq %rax, %rdi movl %r15d, %esi movq %r13, %rdx leaq -0x60(%rbp), %rcx callq 0x2fdca movq -0x60(%rbp), %rax jmp 0x9a934 xorl %eax, %eax retq movl %edx, 0xe4(%rbx) jmp 0x9ab39 xorl %eax, %eax jmp 0x9ab3e movq %rsi, 0x10(%rbx) movl $0x0, 0xe0(%rbx) movq -0x48(%rbp), %rax movl %eax, 0xe4(%rbx) movl $0x1, %eax addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xffffffff, 0xe4(%rbx) # imm = 0xFFFFFFFF movq 0x98(%rbx), %rdi callq 0x9c03f jmp 0x9ab39
_my_b_cache_read_r: test rdx, rdx jz loc_9AB12 push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov r14, rdx mov rbx, rdi mov [rbp-50h], rsi mov rax, [rdi+98h] mov [rbp-40h], rax xor edx, edx loc_9A856: mov r13, [rbx+18h] mov r12, [rbx+0F0h] sub r13, [rbx+20h] add r13, [rbx] mov ecx, r13d and ecx, 0FFFh lea eax, [r14+rcx] add eax, 0FFFh and eax, 0FFFFF000h sub rax, rcx cmp rax, r12 jbe short loc_9A8A0 mov ecx, eax sub ecx, r12d add ecx, 0FFFh and ecx, 0FFFFF000h sub rax, rcx mov r12, rax jmp short loc_9A8AD loc_9A8A0: sub r12d, eax and r12d, 0FFFFF000h add r12, rax loc_9A8AD: cmp dword ptr [rbx+0B0h], 4 jz short loc_9A8C4 mov rax, [rbx+8] sub rax, r13 cmp r12, rax cmovnb r12, rax loc_9A8C4: test r12, r12 jz loc_9AB15 mov [rbp-48h], rdx mov rdi, rbx mov rsi, r13 call lock_io_cache test eax, eax jz loc_9A9A5 mov r15d, [rbx+0D4h] test r15d, r15d js loc_9A9DC cmp dword ptr [rbx+0E0h], 0 jz short loc_9A945 lea rax, PSI_server mov rax, [rax] lea rdi, [rbp-0A8h] mov esi, r15d mov edx, 8 call qword ptr [rax+158h] test rax, rax jnz loc_9AAF7 mov edi, r15d mov rsi, r13 xor edx, edx xor ecx, ecx call my_seek loc_9A934: cmp rax, 0FFFFFFFFFFFFFFFFh jz loc_9AB50 mov r15d, [rbx+0D4h] loc_9A945: mov rax, [rbx+20h] mov [rbp-38h], rax mov rax, [rbx+0F8h] mov [rbp-30h], rax lea rax, PSI_server mov rax, [rax] lea rdi, [rbp-0A8h] mov esi, r15d mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz loc_9AA7E mov edi, r15d mov rsi, [rbp-38h] mov rdx, r12 mov rcx, [rbp-30h] call my_read mov r15, rax loc_9A996: cmp r15, 0FFFFFFFFFFFFFFFFh mov eax, 0 cmovnz rax, r15 jmp short loc_9A9E1 loc_9A9A5: mov rcx, [rbp-40h] mov eax, [rcx+0E0h] mov [rbx+0E4h], eax mov r15, [rcx+0D0h] mov [rbx+18h], r15 mov rcx, [rcx+0B8h] mov [rbx], rcx mov rsi, [rbx+20h] cmp eax, 0FFFFFFFFh jz loc_9AB21 sub r15, rsi jmp short loc_9AA2C loc_9A9DC: xor r15d, r15d xor eax, eax loc_9A9E1: add rax, [rbx+20h] cmp r15, r12 mov ecx, r15d mov edx, 0 cmovz ecx, edx mov [rbx+18h], rax mov [rbx+0E4h], ecx mov [rbx], r13 mov rdx, [rbp-40h] mov [rdx+0E0h], ecx mov rax, [rbx+18h] mov [rdx+0D0h], rax mov [rdx+0B8h], r13 mov rdi, [rbx+98h] call unlock_io_cache mov rsi, [rbx+20h] loc_9AA2C: mov [rbx+10h], rsi mov dword ptr [rbx+0E0h], 0 lea rax, [r15+1] cmp rax, 1 jbe loc_9AB2F cmp r15, r14 cmovnb r15, r14 mov r12, [rbp-50h] mov rdi, r12 mov rdx, r15 call _memcpy add r12, r15 mov [rbp-50h], r12 mov rdx, [rbp-48h] add rdx, r15 add [rbx+10h], r15 sub r14, r15 jnz loc_9A856 jmp loc_9AB1D loc_9AA7E: mov rcx, rax lea rax, PSI_server mov rax, [rax] mov [rbp-58h], rcx mov rdi, rcx mov rsi, r12 lea rdx, aWorkspaceLlm4b_22; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 4D3h call qword ptr [rax+210h] mov edi, r15d mov rsi, [rbp-38h] mov rdx, r12 mov rcx, [rbp-30h] call my_read mov r15, rax test rax, rax mov eax, 0 cmovz rax, r12 cmp r15, 0FFFFFFFFFFFFFFFFh mov esi, 0 cmovnz rsi, r15 test byte ptr [rbp-30h], 6 cmovnz rsi, rax lea rax, PSI_server mov rax, [rax] mov rdi, [rbp-58h] call qword ptr [rax+218h] jmp loc_9A996 loc_9AAF7: mov rdi, rax mov esi, r15d mov rdx, r13 lea rcx, [rbp-60h] call _my_b_cache_read_r_cold_1 mov rax, [rbp-60h] jmp loc_9A934 loc_9AB12: xor eax, eax retn loc_9AB15: mov [rbx+0E4h], edx jmp short loc_9AB39 loc_9AB1D: xor eax, eax jmp short loc_9AB3E loc_9AB21: mov [rbx+10h], rsi mov dword ptr [rbx+0E0h], 0 loc_9AB2F: mov rax, [rbp-48h] mov [rbx+0E4h], eax loc_9AB39: mov eax, 1 loc_9AB3E: add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9AB50: mov dword ptr [rbx+0E4h], 0FFFFFFFFh mov rdi, [rbx+98h] call unlock_io_cache jmp short loc_9AB39
long long my_b_cache_read_r(long long a1, long long a2, unsigned long long a3) { unsigned long long v3; // r14 long long v4; // rdx unsigned long long v5; // r12 long long v6; // r13 long long v7; // rcx unsigned long long v8; // rax unsigned long long v9; // r12 unsigned int v10; // r15d long long v11; // rax long long v12; // rax long long v13; // rax unsigned long long v14; // r15 unsigned long long v15; // rax long long v16; // rcx int v17; // eax long long v18; // r15 long long v19; // rsi unsigned long long v20; // rax int v21; // ecx long long v22; // rdx long long v23; // r12 unsigned long long v24; // rax unsigned long long v25; // rsi _BYTE v27[72]; // [rsp-B0h] [rbp-B0h] BYREF long long v28; // [rsp-68h] [rbp-68h] BYREF long long v29; // [rsp-60h] [rbp-60h] long long v30; // [rsp-58h] [rbp-58h] long long v31; // [rsp-50h] [rbp-50h] long long v32; // [rsp-48h] [rbp-48h] long long v33; // [rsp-40h] [rbp-40h] long long v34; // [rsp-38h] [rbp-38h] if ( !a3 ) return 0LL; v3 = a3; v30 = a2; v32 = *(_QWORD *)(a1 + 152); v4 = 0LL; while ( 1 ) { v5 = *(_QWORD *)(a1 + 240); v6 = *(_QWORD *)a1 + *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 32); v7 = (*(_WORD *)a1 + *(_WORD *)(a1 + 24) - *(_WORD *)(a1 + 32)) & 0xFFF; v8 = (((_DWORD)v3 + (_DWORD)v7 + 4095) & 0xFFFFF000) - v7; if ( v8 <= v5 ) v9 = v8 + (((_DWORD)v5 - (_DWORD)v8) & 0xFFFFF000); else v9 = v8 - (((_DWORD)v8 - (_DWORD)v5 + 4095) & 0xFFFFF000); if ( *(_DWORD *)(a1 + 176) != 4 && v9 >= *(_QWORD *)(a1 + 8) - v6 ) v9 = *(_QWORD *)(a1 + 8) - v6; if ( !v9 ) { *(_DWORD *)(a1 + 228) = v4; return 1LL; } v31 = v4; if ( (unsigned int)lock_io_cache(a1, v6) ) break; v16 = v32; v17 = *(_DWORD *)(v32 + 224); *(_DWORD *)(a1 + 228) = v17; v18 = *(_QWORD *)(v16 + 208); *(_QWORD *)(a1 + 24) = v18; *(_QWORD *)a1 = *(_QWORD *)(v16 + 184); v19 = *(_QWORD *)(a1 + 32); if ( v17 == -1 ) { *(_QWORD *)(a1 + 16) = v19; *(_DWORD *)(a1 + 224) = 0; LABEL_44: *(_DWORD *)(a1 + 228) = v31; return 1LL; } v14 = v18 - v19; LABEL_28: *(_QWORD *)(a1 + 16) = v19; *(_DWORD *)(a1 + 224) = 0; if ( v14 + 1 <= 1 ) goto LABEL_44; if ( v14 >= v3 ) v14 = v3; v23 = v30; memcpy(v30, v19, v14); v30 = v14 + v23; v4 = v14 + v31; *(_QWORD *)(a1 + 16) += v14; v3 -= v14; if ( !v3 ) return 0LL; } v10 = *(_DWORD *)(a1 + 212); if ( (v10 & 0x80000000) != 0 ) { v14 = 0LL; v15 = 0LL; LABEL_25: v20 = *(_QWORD *)(a1 + 32) + v15; v21 = v14; if ( v14 == v9 ) v21 = 0; *(_QWORD *)(a1 + 24) = v20; *(_DWORD *)(a1 + 228) = v21; *(_QWORD *)a1 = v6; v22 = v32; *(_DWORD *)(v32 + 224) = v21; *(_QWORD *)(v22 + 208) = *(_QWORD *)(a1 + 24); *(_QWORD *)(v22 + 184) = v6; unlock_io_cache(*(_QWORD *)(a1 + 152)); v19 = *(_QWORD *)(a1 + 32); goto LABEL_28; } if ( !*(_DWORD *)(a1 + 224) ) { LABEL_17: v33 = *(_QWORD *)(a1 + 32); v34 = *(_QWORD *)(a1 + 248); v13 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v27, v10, 6LL); if ( v13 ) { v29 = v13; ((void ( *)(long long, unsigned long long, const char *, long long))PSI_server[66])( v13, v9, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 1235LL); v14 = my_read(v10, v33, v9, v34); v24 = 0LL; if ( !v14 ) v24 = v9; v25 = 0LL; if ( v14 != -1LL ) v25 = v14; if ( (v34 & 6) != 0 ) v25 = v24; ((void ( *)(long long, unsigned long long))PSI_server[67])(v29, v25); } else { v14 = my_read(v10, v33, v9, v34); } v15 = 0LL; if ( v14 != -1LL ) v15 = v14; goto LABEL_25; } v11 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v27, v10, 8LL); if ( v11 ) { my_b_cache_read_r_cold_1(v11, v10, v6, &v28); v12 = v28; } else { v12 = my_seek(v10, v6, 0LL, 0LL); } if ( v12 != -1 ) { v10 = *(_DWORD *)(a1 + 212); goto LABEL_17; } *(_DWORD *)(a1 + 228) = -1; unlock_io_cache(*(_QWORD *)(a1 + 152)); return 1LL; }
_my_b_cache_read_r: TEST RDX,RDX JZ 0x0019ab12 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV R14,RDX MOV RBX,RDI MOV qword ptr [RBP + -0x50],RSI MOV RAX,qword ptr [RDI + 0x98] MOV qword ptr [RBP + -0x40],RAX XOR EDX,EDX LAB_0019a856: MOV R13,qword ptr [RBX + 0x18] MOV R12,qword ptr [RBX + 0xf0] SUB R13,qword ptr [RBX + 0x20] ADD R13,qword ptr [RBX] MOV ECX,R13D AND ECX,0xfff LEA EAX,[R14 + RCX*0x1] ADD EAX,0xfff AND EAX,0xfffff000 SUB RAX,RCX CMP RAX,R12 JBE 0x0019a8a0 MOV ECX,EAX SUB ECX,R12D ADD ECX,0xfff AND ECX,0xfffff000 SUB RAX,RCX MOV R12,RAX JMP 0x0019a8ad LAB_0019a8a0: SUB R12D,EAX AND R12D,0xfffff000 ADD R12,RAX LAB_0019a8ad: CMP dword ptr [RBX + 0xb0],0x4 JZ 0x0019a8c4 MOV RAX,qword ptr [RBX + 0x8] SUB RAX,R13 CMP R12,RAX CMOVNC R12,RAX LAB_0019a8c4: TEST R12,R12 JZ 0x0019ab15 MOV qword ptr [RBP + -0x48],RDX MOV RDI,RBX MOV RSI,R13 CALL 0x0019be3e TEST EAX,EAX JZ 0x0019a9a5 MOV R15D,dword ptr [RBX + 0xd4] TEST R15D,R15D JS 0x0019a9dc CMP dword ptr [RBX + 0xe0],0x0 JZ 0x0019a945 LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0xa8] MOV ESI,R15D MOV EDX,0x8 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0019aaf7 MOV EDI,R15D MOV RSI,R13 XOR EDX,EDX XOR ECX,ECX CALL 0x001a7e58 LAB_0019a934: CMP RAX,-0x1 JZ 0x0019ab50 MOV R15D,dword ptr [RBX + 0xd4] LAB_0019a945: MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBX + 0xf8] MOV qword ptr [RBP + -0x30],RAX LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0xa8] MOV ESI,R15D MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0019aa7e MOV EDI,R15D MOV RSI,qword ptr [RBP + -0x38] MOV RDX,R12 MOV RCX,qword ptr [RBP + -0x30] CALL 0x001a7b1c MOV R15,RAX LAB_0019a996: CMP R15,-0x1 MOV EAX,0x0 CMOVNZ RAX,R15 JMP 0x0019a9e1 LAB_0019a9a5: MOV RCX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RCX + 0xe0] MOV dword ptr [RBX + 0xe4],EAX MOV R15,qword ptr [RCX + 0xd0] MOV qword ptr [RBX + 0x18],R15 MOV RCX,qword ptr [RCX + 0xb8] MOV qword ptr [RBX],RCX MOV RSI,qword ptr [RBX + 0x20] CMP EAX,-0x1 JZ 0x0019ab21 SUB R15,RSI JMP 0x0019aa2c LAB_0019a9dc: XOR R15D,R15D XOR EAX,EAX LAB_0019a9e1: ADD RAX,qword ptr [RBX + 0x20] CMP R15,R12 MOV ECX,R15D MOV EDX,0x0 CMOVZ ECX,EDX MOV qword ptr [RBX + 0x18],RAX MOV dword ptr [RBX + 0xe4],ECX MOV qword ptr [RBX],R13 MOV RDX,qword ptr [RBP + -0x40] MOV dword ptr [RDX + 0xe0],ECX MOV RAX,qword ptr [RBX + 0x18] MOV qword ptr [RDX + 0xd0],RAX MOV qword ptr [RDX + 0xb8],R13 MOV RDI,qword ptr [RBX + 0x98] CALL 0x0019c03f MOV RSI,qword ptr [RBX + 0x20] LAB_0019aa2c: MOV qword ptr [RBX + 0x10],RSI MOV dword ptr [RBX + 0xe0],0x0 LEA RAX,[R15 + 0x1] CMP RAX,0x1 JBE 0x0019ab2f CMP R15,R14 CMOVNC R15,R14 MOV R12,qword ptr [RBP + -0x50] MOV RDI,R12 MOV RDX,R15 CALL 0x0012a0a0 ADD R12,R15 MOV qword ptr [RBP + -0x50],R12 MOV RDX,qword ptr [RBP + -0x48] ADD RDX,R15 ADD qword ptr [RBX + 0x10],R15 SUB R14,R15 JNZ 0x0019a856 JMP 0x0019ab1d LAB_0019aa7e: MOV RCX,RAX LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x58],RCX MOV RDI,RCX MOV RSI,R12 LEA RDX,[0x1e494b] MOV ECX,0x4d3 CALL qword ptr [RAX + 0x210] MOV EDI,R15D MOV RSI,qword ptr [RBP + -0x38] MOV RDX,R12 MOV RCX,qword ptr [RBP + -0x30] CALL 0x001a7b1c MOV R15,RAX TEST RAX,RAX MOV EAX,0x0 CMOVZ RAX,R12 CMP R15,-0x1 MOV ESI,0x0 CMOVNZ RSI,R15 TEST byte ptr [RBP + -0x30],0x6 CMOVNZ RSI,RAX LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x58] CALL qword ptr [RAX + 0x218] JMP 0x0019a996 LAB_0019aaf7: MOV RDI,RAX MOV ESI,R15D MOV RDX,R13 LEA RCX,[RBP + -0x60] CALL 0x0012fdca MOV RAX,qword ptr [RBP + -0x60] JMP 0x0019a934 LAB_0019ab12: XOR EAX,EAX RET LAB_0019ab15: MOV dword ptr [RBX + 0xe4],EDX JMP 0x0019ab39 LAB_0019ab1d: XOR EAX,EAX JMP 0x0019ab3e LAB_0019ab21: MOV qword ptr [RBX + 0x10],RSI MOV dword ptr [RBX + 0xe0],0x0 LAB_0019ab2f: MOV RAX,qword ptr [RBP + -0x48] MOV dword ptr [RBX + 0xe4],EAX LAB_0019ab39: MOV EAX,0x1 LAB_0019ab3e: ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0019ab50: MOV dword ptr [RBX + 0xe4],0xffffffff MOV RDI,qword ptr [RBX + 0x98] CALL 0x0019c03f JMP 0x0019ab39
int8 _my_b_cache_read_r(long *param_1,void *param_2,ulong param_3) { void *pvVar1; int iVar2; ulong uVar3; long lVar4; ulong uVar5; ulong uVar6; uint uVar7; int4 uVar8; void *__src; ulong uVar9; long lVar10; int1 local_b0 [72]; long local_68; long local_60; void *local_58; long local_50; long local_48; long local_40; ulong local_38; if (param_3 == 0) { return 0; } local_48 = param_1[0x13]; local_50 = 0; local_58 = param_2; while( true ) { lVar10 = (param_1[3] - param_1[4]) + *param_1; uVar7 = (uint)lVar10 & 0xfff; uVar3 = (ulong)((int)param_3 + uVar7 + 0xfff & 0xfffff000) - (ulong)uVar7; iVar2 = (int)param_1[0x1e]; if ((ulong)param_1[0x1e] < uVar3) { uVar5 = -(ulong)(((int)uVar3 - iVar2) + 0xfffU & 0xfffff000); } else { uVar5 = (ulong)(iVar2 - (int)uVar3 & 0xfffff000); } uVar3 = uVar3 + uVar5; if (((int)param_1[0x16] != 4) && ((ulong)(param_1[1] - lVar10) <= uVar3)) { uVar3 = param_1[1] - lVar10; } if (uVar3 == 0) { *(int *)((long)param_1 + 0xe4) = (int)local_50; return 1; } iVar2 = lock_io_cache(param_1,lVar10); if (iVar2 == 0) { iVar2 = *(int *)(local_48 + 0xe0); *(int *)((long)param_1 + 0xe4) = iVar2; lVar10 = *(long *)(local_48 + 0xd0); param_1[3] = lVar10; *param_1 = *(long *)(local_48 + 0xb8); __src = (void *)param_1[4]; if (iVar2 == -1) { param_1[2] = (long)__src; *(int4 *)(param_1 + 0x1c) = 0; break; } uVar5 = lVar10 - (long)__src; } else { iVar2 = *(int *)((long)param_1 + 0xd4); if (iVar2 < 0) { uVar5 = 0; uVar6 = 0; } else { if ((int)param_1[0x1c] != 0) { lVar4 = (**(code **)(PSI_server + 0x158))(local_b0,iVar2,8); if (lVar4 == 0) { lVar4 = my_seek(iVar2,lVar10,0,0); } else { _my_b_cache_read_r_cold_1(lVar4,iVar2,lVar10,&local_68); lVar4 = local_68; } if (lVar4 == -1) { *(int4 *)((long)param_1 + 0xe4) = 0xffffffff; unlock_io_cache(param_1[0x13]); return 1; } iVar2 = *(int *)((long)param_1 + 0xd4); } local_40 = param_1[4]; local_38 = param_1[0x1f]; lVar4 = (**(code **)(PSI_server + 0x158))(local_b0,iVar2,6); if (lVar4 == 0) { uVar5 = my_read(iVar2,local_40,uVar3,local_38); } else { local_60 = lVar4; (**(code **)(PSI_server + 0x210)) (lVar4,uVar3,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x4d3 ); uVar5 = my_read(iVar2,local_40,uVar3,local_38); uVar6 = 0; if (uVar5 == 0) { uVar6 = uVar3; } uVar9 = 0; if (uVar5 != 0xffffffffffffffff) { uVar9 = uVar5; } if ((local_38 & 6) != 0) { uVar9 = uVar6; } (**(code **)(PSI_server + 0x218))(local_60,uVar9); } uVar6 = 0; if (uVar5 != 0xffffffffffffffff) { uVar6 = uVar5; } } uVar8 = (int4)uVar5; if (uVar5 == uVar3) { uVar8 = 0; } param_1[3] = uVar6 + param_1[4]; *(int4 *)((long)param_1 + 0xe4) = uVar8; *param_1 = lVar10; *(int4 *)(local_48 + 0xe0) = uVar8; *(long *)(local_48 + 0xd0) = param_1[3]; *(long *)(local_48 + 0xb8) = lVar10; unlock_io_cache(param_1[0x13]); __src = (void *)param_1[4]; } pvVar1 = local_58; param_1[2] = (long)__src; *(int4 *)(param_1 + 0x1c) = 0; if (uVar5 + 1 < 2) break; if (param_3 <= uVar5) { uVar5 = param_3; } memcpy(local_58,__src,uVar5); local_58 = (void *)((long)pvVar1 + uVar5); local_50 = local_50 + uVar5; param_1[2] = param_1[2] + uVar5; param_3 = param_3 - uVar5; if (param_3 == 0) { return 0; } } *(int *)((long)param_1 + 0xe4) = (int)local_50; return 1; }
35,540
js_os_cputime
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_cputime(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { struct rusage ru; int64_t cputime; cputime = 0; if (!getrusage(RUSAGE_SELF, &ru)) cputime = (int64_t)ru.ru_utime.tv_sec * 1000000 + ru.ru_utime.tv_usec; return JS_NewInt64(ctx, cputime); }
O0
c
js_os_cputime: subq $0x158, %rsp # imm = 0x158 movq %rsi, 0xb8(%rsp) movq %rdx, 0xc0(%rsp) movq %rdi, 0xb0(%rsp) movl %ecx, 0xac(%rsp) movq %r8, 0xa0(%rsp) movq $0x0, 0x8(%rsp) xorl %edi, %edi leaq 0x10(%rsp), %rsi callq 0xe7c0 cmpl $0x0, %eax jne 0x17beb imulq $0xf4240, 0x10(%rsp), %rax # imm = 0xF4240 addq 0x18(%rsp), %rax movq %rax, 0x8(%rsp) movq 0xb0(%rsp), %rcx movq 0x8(%rsp), %rax movq %rcx, 0x100(%rsp) movq %rax, 0xf8(%rsp) cmpq $-0x80000000, 0xf8(%rsp) # imm = 0x80000000 jl 0x17ca5 cmpq $0x7fffffff, 0xf8(%rsp) # imm = 0x7FFFFFFF jg 0x17ca5 movq 0x100(%rsp), %rcx movl 0xf8(%rsp), %eax movq %rcx, 0x120(%rsp) movl %eax, 0x11c(%rsp) movl 0x11c(%rsp), %eax movl %eax, 0x128(%rsp) movq $0x0, 0x130(%rsp) movq 0x128(%rsp), %rcx movq 0x130(%rsp), %rax movq %rcx, 0xe8(%rsp) movq %rax, 0xf0(%rsp) movq 0xe8(%rsp), %rax movq %rax, 0x108(%rsp) movq 0xf0(%rsp), %rax movq %rax, 0x110(%rsp) jmp 0x17d26 movq 0x100(%rsp), %rax cvtsi2sdq 0xf8(%rsp), %xmm0 movq %rax, 0x140(%rsp) movsd %xmm0, 0x138(%rsp) movsd 0x138(%rsp), %xmm0 callq 0x13560 movq %rax, 0x148(%rsp) movq %rdx, 0x150(%rsp) movq 0x148(%rsp), %rcx movq 0x150(%rsp), %rax movq %rcx, 0xd8(%rsp) movq %rax, 0xe0(%rsp) movq 0xd8(%rsp), %rax movq %rax, 0x108(%rsp) movq 0xe0(%rsp), %rax movq %rax, 0x110(%rsp) movq 0x108(%rsp), %rcx movq 0x110(%rsp), %rax movq %rcx, 0xc8(%rsp) movq %rax, 0xd0(%rsp) movq 0xc8(%rsp), %rax movq 0xd0(%rsp), %rdx addq $0x158, %rsp # imm = 0x158 retq nop
js_os_cputime: sub rsp, 158h mov [rsp+158h+var_A0], rsi mov [rsp+158h+var_98], rdx mov [rsp+158h+var_A8], rdi mov [rsp+158h+var_AC], ecx mov [rsp+158h+var_B8], r8 mov [rsp+158h+var_150], 0 xor edi, edi lea rsi, [rsp+158h+var_148] call _getrusage cmp eax, 0 jnz short loc_17BEB imul rax, [rsp+158h+var_148], 0F4240h add rax, [rsp+158h+var_140] mov [rsp+158h+var_150], rax loc_17BEB: mov rcx, [rsp+158h+var_A8] mov rax, [rsp+158h+var_150] mov [rsp+158h+var_58], rcx mov [rsp+158h+var_60], rax cmp [rsp+158h+var_60], 0FFFFFFFF80000000h jl loc_17CA5 cmp [rsp+158h+var_60], 7FFFFFFFh jg short loc_17CA5 mov rcx, [rsp+158h+var_58] mov eax, dword ptr [rsp+158h+var_60] mov [rsp+158h+var_38], rcx mov [rsp+158h+var_3C], eax mov eax, [rsp+158h+var_3C] mov dword ptr [rsp+158h+var_30], eax mov [rsp+158h+var_28], 0 mov rcx, [rsp+158h+var_30] mov rax, [rsp+158h+var_28] mov [rsp+158h+var_70], rcx mov [rsp+158h+var_68], rax mov rax, [rsp+158h+var_70] mov [rsp+158h+var_50], rax mov rax, [rsp+158h+var_68] mov [rsp+158h+var_48], rax jmp loc_17D26 loc_17CA5: mov rax, [rsp+158h+var_58] cvtsi2sd xmm0, [rsp+158h+var_60] mov [rsp+158h+var_18], rax movsd [rsp+158h+var_20], xmm0 movsd xmm0, [rsp+158h+var_20] call __JS_NewFloat64 mov [rsp+158h+var_10], rax mov [rsp+158h+var_8], rdx mov rcx, [rsp+158h+var_10] mov rax, [rsp+158h+var_8] mov [rsp+158h+var_80], rcx mov [rsp+158h+var_78], rax mov rax, [rsp+158h+var_80] mov [rsp+158h+var_50], rax mov rax, [rsp+158h+var_78] mov [rsp+158h+var_48], rax loc_17D26: mov rcx, [rsp+158h+var_50] mov rax, [rsp+158h+var_48] mov [rsp+158h+var_90], rcx mov [rsp+158h+var_88], rax mov rax, [rsp+158h+var_90] mov rdx, [rsp+158h+var_88] add rsp, 158h retn
long long js_os_cputime(long long a1, long long a2, long long a3, int a4, long long a5) { long long v5; // rdx long long v7; // [rsp+8h] [rbp-150h] _QWORD v8[19]; // [rsp+10h] [rbp-148h] BYREF int v9; // [rsp+ACh] [rbp-ACh] long long v10; // [rsp+B0h] [rbp-A8h] long long v11; // [rsp+B8h] [rbp-A0h] long long v12; // [rsp+C0h] [rbp-98h] long long v13; // [rsp+D8h] [rbp-80h] long long v14; // [rsp+E0h] [rbp-78h] long long v15; // [rsp+E8h] [rbp-70h] long long v16; // [rsp+F0h] [rbp-68h] long long v17; // [rsp+F8h] [rbp-60h] long long v18; // [rsp+100h] [rbp-58h] long long v19; // [rsp+108h] [rbp-50h] long long v20; // [rsp+110h] [rbp-48h] int v21; // [rsp+11Ch] [rbp-3Ch] long long v22; // [rsp+120h] [rbp-38h] long long v23; // [rsp+128h] [rbp-30h] long long v24; // [rsp+130h] [rbp-28h] double v25; // [rsp+138h] [rbp-20h] long long v26; // [rsp+140h] [rbp-18h] long long v27; // [rsp+148h] [rbp-10h] long long v28; // [rsp+150h] [rbp-8h] v11 = a2; v12 = a3; v10 = a1; v9 = a4; v8[18] = a5; v7 = 0LL; if ( !(unsigned int)getrusage(0LL, v8) ) v7 = v8[1] + 1000000LL * v8[0]; v18 = v10; v17 = v7; if ( v7 < (long long)0xFFFFFFFF80000000LL || v17 > 0x7FFFFFFF ) { v26 = v18; v25 = (double)(int)v17; v27 = _JS_NewFloat64((double)(int)v17); v28 = v5; v13 = v27; v14 = v5; v19 = v27; v20 = v5; } else { v22 = v18; v21 = v17; LODWORD(v23) = v17; v24 = 0LL; v15 = v23; v16 = 0LL; v19 = v23; v20 = 0LL; } return v19; }
js_os_cputime: SUB RSP,0x158 MOV qword ptr [RSP + 0xb8],RSI MOV qword ptr [RSP + 0xc0],RDX MOV qword ptr [RSP + 0xb0],RDI MOV dword ptr [RSP + 0xac],ECX MOV qword ptr [RSP + 0xa0],R8 MOV qword ptr [RSP + 0x8],0x0 XOR EDI,EDI LEA RSI,[RSP + 0x10] CALL 0x0010e7c0 CMP EAX,0x0 JNZ 0x00117beb IMUL RAX,qword ptr [RSP + 0x10],0xf4240 ADD RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x8],RAX LAB_00117beb: MOV RCX,qword ptr [RSP + 0xb0] MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x100],RCX MOV qword ptr [RSP + 0xf8],RAX CMP qword ptr [RSP + 0xf8],-0x80000000 JL 0x00117ca5 CMP qword ptr [RSP + 0xf8],0x7fffffff JG 0x00117ca5 MOV RCX,qword ptr [RSP + 0x100] MOV EAX,dword ptr [RSP + 0xf8] MOV qword ptr [RSP + 0x120],RCX MOV dword ptr [RSP + 0x11c],EAX MOV EAX,dword ptr [RSP + 0x11c] MOV dword ptr [RSP + 0x128],EAX MOV qword ptr [RSP + 0x130],0x0 MOV RCX,qword ptr [RSP + 0x128] MOV RAX,qword ptr [RSP + 0x130] MOV qword ptr [RSP + 0xe8],RCX MOV qword ptr [RSP + 0xf0],RAX MOV RAX,qword ptr [RSP + 0xe8] MOV qword ptr [RSP + 0x108],RAX MOV RAX,qword ptr [RSP + 0xf0] MOV qword ptr [RSP + 0x110],RAX JMP 0x00117d26 LAB_00117ca5: MOV RAX,qword ptr [RSP + 0x100] CVTSI2SD XMM0,qword ptr [RSP + 0xf8] MOV qword ptr [RSP + 0x140],RAX MOVSD qword ptr [RSP + 0x138],XMM0 MOVSD XMM0,qword ptr [RSP + 0x138] CALL 0x00113560 MOV qword ptr [RSP + 0x148],RAX MOV qword ptr [RSP + 0x150],RDX MOV RCX,qword ptr [RSP + 0x148] MOV RAX,qword ptr [RSP + 0x150] MOV qword ptr [RSP + 0xd8],RCX MOV qword ptr [RSP + 0xe0],RAX MOV RAX,qword ptr [RSP + 0xd8] MOV qword ptr [RSP + 0x108],RAX MOV RAX,qword ptr [RSP + 0xe0] MOV qword ptr [RSP + 0x110],RAX LAB_00117d26: MOV RCX,qword ptr [RSP + 0x108] MOV RAX,qword ptr [RSP + 0x110] MOV qword ptr [RSP + 0xc8],RCX MOV qword ptr [RSP + 0xd0],RAX MOV RAX,qword ptr [RSP + 0xc8] MOV RDX,qword ptr [RSP + 0xd0] ADD RSP,0x158 RET
int1 [16] js_os_cputime(int8 param_1,int8 param_2,int8 param_3,int4 param_4, int8 param_5) { int iVar1; int1 auVar2 [16]; long local_150; rusage local_148; int8 local_b8; int4 local_ac; int8 local_a8; int8 local_a0; int8 local_98; long local_60; int8 local_58; int4 uStack_2c; double local_20; int8 local_18; local_150 = 0; local_b8 = param_5; local_ac = param_4; local_a8 = param_1; local_a0 = param_2; local_98 = param_3; iVar1 = getrusage(RUSAGE_SELF,&local_148); if (iVar1 == 0) { local_150 = local_148.ru_utime.tv_sec * 1000000 + local_148.ru_utime.tv_usec; } local_58 = local_a8; local_60 = local_150; if ((local_150 < -0x80000000) || (0x7fffffff < local_150)) { local_20 = (double)local_150; local_18 = local_a8; auVar2 = __JS_NewFloat64(local_20); } else { local_60._0_4_ = (int4)local_150; auVar2._4_4_ = uStack_2c; auVar2._0_4_ = (int4)local_60; auVar2._8_8_ = 0; } return auVar2; }
35,541
js_os_cputime
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_cputime(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { struct rusage ru; int64_t cputime; cputime = 0; if (!getrusage(RUSAGE_SELF, &ru)) cputime = (int64_t)ru.ru_utime.tv_sec * 1000000 + ru.ru_utime.tv_usec; return JS_NewInt64(ctx, cputime); }
O1
c
js_os_cputime: pushq %rbx subq $0x90, %rsp xorl %ebx, %ebx movq %rsp, %rsi xorl %edi, %edi callq 0xe7d0 testl %eax, %eax jne 0x1859b imulq $0xf4240, (%rsp), %rbx # imm = 0xF4240 addq 0x8(%rsp), %rbx movslq %ebx, %rax xorl %ecx, %ecx cmpq %rbx, %rax movl %eax, %edx cvtsi2sd %rbx, %xmm0 movq %xmm0, %rax cmoveq %rdx, %rax movl $0x7, %edx cmoveq %rcx, %rdx addq $0x90, %rsp popq %rbx retq
js_os_cputime: push rbx sub rsp, 90h xor ebx, ebx mov rsi, rsp xor edi, edi call _getrusage test eax, eax jnz short loc_1859B imul rbx, [rsp+98h+var_98], 0F4240h add rbx, [rsp+98h+var_90] loc_1859B: movsxd rax, ebx xor ecx, ecx cmp rax, rbx mov edx, eax cvtsi2sd xmm0, rbx movq rax, xmm0 cmovz rax, rdx mov edx, 7 cmovz rdx, rcx add rsp, 90h pop rbx retn
long long js_os_cputime() { long long v0; // rbx long long result; // rax _QWORD v2[19]; // [rsp+0h] [rbp-98h] BYREF v0 = 0LL; if ( !(unsigned int)getrusage(0LL, v2) ) v0 = v2[1] + 1000000LL * v2[0]; *(double *)&result = (double)(int)v0; if ( (int)v0 == v0 ) return (unsigned int)v0; return result; }
js_os_cputime: PUSH RBX SUB RSP,0x90 XOR EBX,EBX MOV RSI,RSP XOR EDI,EDI CALL 0x0010e7d0 TEST EAX,EAX JNZ 0x0011859b IMUL RBX,qword ptr [RSP],0xf4240 ADD RBX,qword ptr [RSP + 0x8] LAB_0011859b: MOVSXD RAX,EBX XOR ECX,ECX CMP RAX,RBX MOV EDX,EAX CVTSI2SD XMM0,RBX MOVQ RAX,XMM0 CMOVZ RAX,RDX MOV EDX,0x7 CMOVZ RDX,RCX ADD RSP,0x90 POP RBX RET
int1 [16] js_os_cputime(void) { int iVar1; double dVar2; int8 uVar3; ulong uVar4; bool bVar5; int1 auVar6 [16]; rusage local_98; uVar4 = 0; iVar1 = getrusage(RUSAGE_SELF,&local_98); if (iVar1 == 0) { uVar4 = local_98.ru_utime.tv_sec * 1000000 + local_98.ru_utime.tv_usec; } bVar5 = (long)(int)uVar4 == uVar4; dVar2 = (double)(long)uVar4; if (bVar5) { dVar2 = (double)(uVar4 & 0xffffffff); } uVar3 = 7; if (bVar5) { uVar3 = 0; } auVar6._8_8_ = uVar3; auVar6._0_8_ = dVar2; return auVar6; }
35,542
js_os_cputime
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_cputime(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { struct rusage ru; int64_t cputime; cputime = 0; if (!getrusage(RUSAGE_SELF, &ru)) cputime = (int64_t)ru.ru_utime.tv_sec * 1000000 + ru.ru_utime.tv_usec; return JS_NewInt64(ctx, cputime); }
O2
c
js_os_cputime: pushq %rbx subq $0x90, %rsp xorl %ebx, %ebx movq %rsp, %rsi xorl %edi, %edi callq 0xe7f0 testl %eax, %eax jne 0x1321b imulq $0xf4240, (%rsp), %rbx # imm = 0xF4240 addq 0x8(%rsp), %rbx movslq %ebx, %rax cmpq %rbx, %rax jne 0x13228 movl %ebx, %eax xorl %edx, %edx addq $0x90, %rsp popq %rbx retq cvtsi2sd %rbx, %xmm0 movq %xmm0, %rax pushq $0x7 popq %rdx jmp 0x1321f
js_os_cputime: push rbx sub rsp, 90h xor ebx, ebx mov rsi, rsp xor edi, edi call _getrusage test eax, eax jnz short loc_1321B imul rbx, [rsp+98h+var_98], 0F4240h add rbx, [rsp+98h+var_90] movsxd rax, ebx cmp rax, rbx jnz short loc_13228 loc_1321B: mov eax, ebx xor edx, edx loc_1321F: add rsp, 90h pop rbx retn loc_13228: cvtsi2sd xmm0, rbx movq rax, xmm0 push 7 pop rdx jmp short loc_1321F
long long js_os_cputime() { long long v0; // rbx long long result; // rax _QWORD v2[19]; // [rsp+0h] [rbp-98h] BYREF LODWORD(v0) = 0; if ( (unsigned int)getrusage(0LL, v2) ) return (unsigned int)v0; v0 = v2[1] + 1000000LL * v2[0]; if ( (int)v0 == v0 ) return (unsigned int)v0; *(double *)&result = (double)(int)v0; return result; }
js_os_cputime: PUSH RBX SUB RSP,0x90 XOR EBX,EBX MOV RSI,RSP XOR EDI,EDI CALL 0x0010e7f0 TEST EAX,EAX JNZ 0x0011321b IMUL RBX,qword ptr [RSP],0xf4240 ADD RBX,qword ptr [RSP + 0x8] MOVSXD RAX,EBX CMP RAX,RBX JNZ 0x00113228 LAB_0011321b: MOV EAX,EBX XOR EDX,EDX LAB_0011321f: ADD RSP,0x90 POP RBX RET LAB_00113228: CVTSI2SD XMM0,RBX MOVQ RAX,XMM0 PUSH 0x7 POP RDX JMP 0x0011321f
int1 [16] js_os_cputime(void) { int iVar1; ulong uVar2; double dVar3; int1 auVar4 [16]; int8 uStack_a0; rusage local_98; uVar2 = 0; iVar1 = getrusage(RUSAGE_SELF,&local_98); if ((iVar1 == 0) && (uVar2 = local_98.ru_utime.tv_sec * 1000000 + local_98.ru_utime.tv_usec, (long)(int)uVar2 != uVar2)) { dVar3 = (double)(long)uVar2; uStack_a0 = 7; } else { dVar3 = (double)(uVar2 & 0xffffffff); uStack_a0 = 0; } auVar4._8_8_ = uStack_a0; auVar4._0_8_ = dVar3; return auVar4; }
35,543
js_os_cputime
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_cputime(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { struct rusage ru; int64_t cputime; cputime = 0; if (!getrusage(RUSAGE_SELF, &ru)) cputime = (int64_t)ru.ru_utime.tv_sec * 1000000 + ru.ru_utime.tv_usec; return JS_NewInt64(ctx, cputime); }
O3
c
js_os_cputime: pushq %rbx subq $0x90, %rsp xorl %ebx, %ebx movq %rsp, %rsi xorl %edi, %edi callq 0xe7d0 testl %eax, %eax jne 0x18f88 imulq $0xf4240, (%rsp), %rbx # imm = 0xF4240 addq 0x8(%rsp), %rbx movslq %ebx, %rax cmpq %rbx, %rax jne 0x18f95 movl %ebx, %eax xorl %edx, %edx addq $0x90, %rsp popq %rbx retq cvtsi2sd %rbx, %xmm0 movq %xmm0, %rax movl $0x7, %edx jmp 0x18f8c
js_os_cputime: push rbx sub rsp, 90h xor ebx, ebx mov rsi, rsp xor edi, edi call _getrusage test eax, eax jnz short loc_18F88 imul rbx, [rsp+98h+var_98], 0F4240h add rbx, [rsp+98h+var_90] movsxd rax, ebx cmp rax, rbx jnz short loc_18F95 loc_18F88: mov eax, ebx xor edx, edx loc_18F8C: add rsp, 90h pop rbx retn loc_18F95: cvtsi2sd xmm0, rbx movq rax, xmm0 mov edx, 7 jmp short loc_18F8C
long long js_os_cputime() { long long v0; // rbx long long result; // rax _QWORD v2[19]; // [rsp+0h] [rbp-98h] BYREF LODWORD(v0) = 0; if ( (unsigned int)getrusage(0LL, v2) ) return (unsigned int)v0; v0 = v2[1] + 1000000LL * v2[0]; if ( (int)v0 == v0 ) return (unsigned int)v0; *(double *)&result = (double)(int)v0; return result; }
js_os_cputime: PUSH RBX SUB RSP,0x90 XOR EBX,EBX MOV RSI,RSP XOR EDI,EDI CALL 0x0010e7d0 TEST EAX,EAX JNZ 0x00118f88 IMUL RBX,qword ptr [RSP],0xf4240 ADD RBX,qword ptr [RSP + 0x8] MOVSXD RAX,EBX CMP RAX,RBX JNZ 0x00118f95 LAB_00118f88: MOV EAX,EBX XOR EDX,EDX LAB_00118f8c: ADD RSP,0x90 POP RBX RET LAB_00118f95: CVTSI2SD XMM0,RBX MOVQ RAX,XMM0 MOV EDX,0x7 JMP 0x00118f8c
int1 [16] js_os_cputime(void) { int iVar1; int8 uVar2; ulong uVar3; double dVar4; int1 auVar5 [16]; rusage local_98; uVar3 = 0; iVar1 = getrusage(RUSAGE_SELF,&local_98); if ((iVar1 == 0) && (uVar3 = local_98.ru_utime.tv_sec * 1000000 + local_98.ru_utime.tv_usec, (long)(int)uVar3 != uVar3)) { dVar4 = (double)(long)uVar3; uVar2 = 7; } else { dVar4 = (double)(uVar3 & 0xffffffff); uVar2 = 0; } auVar5._8_8_ = uVar2; auVar5._0_8_ = dVar4; return auVar5; }
35,544
js_bjson_write
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_bjson_write(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { size_t len; uint8_t *buf; JSValue array; int flags; if (JS_ToInt32(ctx, &flags, argv[1])) return JS_EXCEPTION; buf = JS_WriteObject(ctx, &len, argv[0], flags); if (!buf) return JS_EXCEPTION; array = JS_NewArrayBufferCopy(ctx, buf, len); js_free(ctx, buf); return array; }
O0
c
js_bjson_write: subq $0x78, %rsp movq %rsi, 0x58(%rsp) movq %rdx, 0x60(%rsp) movq %rdi, 0x50(%rsp) movl %ecx, 0x4c(%rsp) movq %r8, 0x40(%rsp) movq 0x50(%rsp), %rdi movq 0x40(%rsp), %rax movq 0x10(%rax), %rdx movq 0x18(%rax), %rcx leaq 0x1c(%rsp), %rsi callq 0x38f20 cmpl $0x0, %eax je 0x1e093 movl $0x0, 0x68(%rsp) movq $0x6, 0x70(%rsp) jmp 0x1e128 movq 0x50(%rsp), %rdi movq 0x40(%rsp), %rax movl 0x1c(%rsp), %r8d movq (%rax), %rdx movq 0x8(%rax), %rcx leaq 0x38(%rsp), %rsi callq 0x4bb40 movq %rax, 0x30(%rsp) cmpq $0x0, 0x30(%rsp) jne 0x1e0d3 movl $0x0, 0x68(%rsp) movq $0x6, 0x70(%rsp) jmp 0x1e128 movq 0x50(%rsp), %rdi movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx callq 0x57e40 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x50(%rsp), %rdi movq 0x30(%rsp), %rsi callq 0x21db0 movq 0x20(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x68(%rsp), %rax movq 0x70(%rsp), %rdx addq $0x78, %rsp retq nopw (%rax,%rax)
js_bjson_write: sub rsp, 78h mov [rsp+78h+var_20], rsi mov [rsp+78h+var_18], rdx mov [rsp+78h+var_28], rdi mov [rsp+78h+var_2C], ecx mov [rsp+78h+var_38], r8 mov rdi, [rsp+78h+var_28] mov rax, [rsp+78h+var_38] mov rdx, [rax+10h] mov rcx, [rax+18h] lea rsi, [rsp+78h+var_5C] call JS_ToInt32 cmp eax, 0 jz short loc_1E093 mov dword ptr [rsp+78h+var_10], 0 mov [rsp+78h+var_8], 6 jmp loc_1E128 loc_1E093: mov rdi, [rsp+78h+var_28] mov rax, [rsp+78h+var_38] mov r8d, [rsp+78h+var_5C] mov rdx, [rax] mov rcx, [rax+8] lea rsi, [rsp+78h+var_40] call JS_WriteObject mov [rsp+78h+var_48], rax cmp [rsp+78h+var_48], 0 jnz short loc_1E0D3 mov dword ptr [rsp+78h+var_10], 0 mov [rsp+78h+var_8], 6 jmp short loc_1E128 loc_1E0D3: mov rdi, [rsp+78h+var_28] mov rsi, [rsp+78h+var_48] mov rdx, [rsp+78h+var_40] call JS_NewArrayBufferCopy mov [rsp+78h+var_70], rax mov [rsp+78h+var_68], rdx mov rax, [rsp+78h+var_70] mov [rsp+78h+var_58], rax mov rax, [rsp+78h+var_68] mov [rsp+78h+var_50], rax mov rdi, [rsp+78h+var_28] mov rsi, [rsp+78h+var_48] call js_free mov rax, [rsp+78h+var_58] mov [rsp+78h+var_10], rax mov rax, [rsp+78h+var_50] mov [rsp+78h+var_8], rax loc_1E128: mov rax, [rsp+78h+var_10] mov rdx, [rsp+78h+var_8] add rsp, 78h retn
long long js_bjson_write(long long a1, long long a2, long long a3, int a4, _QWORD *a5) { long long v5; // rdx unsigned int v7; // [rsp+1Ch] [rbp-5Ch] BYREF long long v8; // [rsp+20h] [rbp-58h] long long v9; // [rsp+28h] [rbp-50h] long long v10; // [rsp+30h] [rbp-48h] long long v11; // [rsp+38h] [rbp-40h] BYREF _QWORD *v12; // [rsp+40h] [rbp-38h] int v13; // [rsp+4Ch] [rbp-2Ch] long long v14; // [rsp+50h] [rbp-28h] long long v15; // [rsp+58h] [rbp-20h] long long v16; // [rsp+60h] [rbp-18h] long long v17; // [rsp+68h] [rbp-10h] long long v18; // [rsp+70h] [rbp-8h] v15 = a2; v16 = a3; v14 = a1; v13 = a4; v12 = a5; if ( (unsigned int)JS_ToInt32(a1, &v7, a5[2], a5[3]) ) { LODWORD(v17) = 0; v18 = 6LL; } else { v10 = JS_WriteObject(v14, &v11, *v12, v12[1], v7); if ( v10 ) { v8 = JS_NewArrayBufferCopy(v14, v10, v11); v9 = v5; js_free(v14, v10); v17 = v8; v18 = v9; } else { LODWORD(v17) = 0; v18 = 6LL; } } return v17; }
js_bjson_write: SUB RSP,0x78 MOV qword ptr [RSP + 0x58],RSI MOV qword ptr [RSP + 0x60],RDX MOV qword ptr [RSP + 0x50],RDI MOV dword ptr [RSP + 0x4c],ECX MOV qword ptr [RSP + 0x40],R8 MOV RDI,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RAX + 0x18] LEA RSI,[RSP + 0x1c] CALL 0x00138f20 CMP EAX,0x0 JZ 0x0011e093 MOV dword ptr [RSP + 0x68],0x0 MOV qword ptr [RSP + 0x70],0x6 JMP 0x0011e128 LAB_0011e093: MOV RDI,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x40] MOV R8D,dword ptr [RSP + 0x1c] MOV RDX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x38] CALL 0x0014bb40 MOV qword ptr [RSP + 0x30],RAX CMP qword ptr [RSP + 0x30],0x0 JNZ 0x0011e0d3 MOV dword ptr [RSP + 0x68],0x0 MOV qword ptr [RSP + 0x70],0x6 JMP 0x0011e128 LAB_0011e0d3: MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] CALL 0x00157e40 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x30] CALL 0x00121db0 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x68],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x70],RAX LAB_0011e128: MOV RAX,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] ADD RSP,0x78 RET
int1 [16] js_bjson_write(int8 param_1,int8 param_2,int8 param_3,int4 param_4, int8 *param_5) { int1 auVar1 [16]; int iVar2; int4 local_5c; int1 local_58 [16]; long local_48; int8 local_40; int8 *local_38; int4 local_2c; int8 local_28; int8 local_20; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; local_38 = param_5; local_2c = param_4; local_28 = param_1; local_20 = param_2; local_18 = param_3; iVar2 = JS_ToInt32(param_1,&local_5c,param_5[2],param_5[3]); if (iVar2 == 0) { local_48 = JS_WriteObject(local_28,&local_40,*local_38,local_38[1],local_5c); if (local_48 == 0) { local_10 = 0; local_8 = 6; } else { local_58 = JS_NewArrayBufferCopy(local_28,local_48,local_40); js_free(local_28,local_48); local_10 = local_58._0_4_; uStack_c = local_58._4_4_; local_8 = local_58._8_8_; } } else { local_10 = 0; local_8 = 6; } auVar1._4_4_ = uStack_c; auVar1._0_4_ = local_10; auVar1._8_8_ = local_8; return auVar1; }
35,545
js_bjson_write
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_bjson_write(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { size_t len; uint8_t *buf; JSValue array; int flags; if (JS_ToInt32(ctx, &flags, argv[1])) return JS_EXCEPTION; buf = JS_WriteObject(ctx, &len, argv[0], flags); if (!buf) return JS_EXCEPTION; array = JS_NewArrayBufferCopy(ctx, buf, len); js_free(ctx, buf); return array; }
O2
c
js_bjson_write: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, %r15 movq %rdi, %r14 movq 0x10(%r8), %rdx movq 0x18(%r8), %rcx leaq 0xc(%rsp), %rsi callq 0x215d7 pushq $0x6 popq %rbx testl %eax, %eax je 0x15a79 xorl %eax, %eax xorl %ecx, %ecx jmp 0x15acb movl 0xc(%rsp), %r8d movq (%r15), %rdx movq 0x8(%r15), %rcx leaq 0x10(%rsp), %rsi movq %r14, %rdi callq 0x2abef testq %rax, %rax je 0x15a73 movq %rax, %r15 movq 0x10(%rsp), %rdx movq %r14, %rdi movq %rax, %rsi callq 0x3200a movq %rax, %r12 movq %rdx, %rbx movq %r14, %rdi movq %r15, %rsi callq 0x1726e movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %r12, %rcx movl %r12d, %eax orq %rcx, %rax movq %rbx, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nopl (%rax)
js_bjson_write: push r15 push r14 push r12 push rbx sub rsp, 18h mov r15, r8 mov r14, rdi mov rdx, [r8+10h] mov rcx, [r8+18h] lea rsi, [rsp+38h+var_2C] call JS_ToInt32 push 6 pop rbx test eax, eax jz short loc_15A79 loc_15A73: xor eax, eax xor ecx, ecx jmp short loc_15ACB loc_15A79: mov r8d, [rsp+38h+var_2C] mov rdx, [r15] mov rcx, [r15+8] lea rsi, [rsp+38h+var_28] mov rdi, r14 call JS_WriteObject test rax, rax jz short loc_15A73 mov r15, rax mov rdx, [rsp+38h+var_28] mov rdi, r14 mov rsi, rax call JS_NewArrayBufferCopy mov r12, rax mov rbx, rdx mov rdi, r14 mov rsi, r15 call js_free mov rcx, 0FFFFFFFF00000000h and rcx, r12 mov eax, r12d loc_15ACB: or rax, rcx mov rdx, rbx add rsp, 18h pop rbx pop r12 pop r14 pop r15 retn
unsigned long long js_bjson_write(long long a1, long long a2, long long a3, long long a4, _QWORD *a5) { long long v6; // rax unsigned long long v7; // rcx long long v8; // rax long long v9; // r15 long long v10; // r12 unsigned int v12; // [rsp+Ch] [rbp-2Ch] BYREF _QWORD v13[5]; // [rsp+10h] [rbp-28h] BYREF if ( (unsigned int)JS_ToInt32(a1, &v12, a5[2], a5[3]) || (v8 = JS_WriteObject(a1, v13, *a5, a5[1], v12)) == 0 ) { v6 = 0LL; v7 = 0LL; } else { v9 = v8; v10 = JS_NewArrayBufferCopy(a1, v8, v13[0]); js_free(a1, v9); v7 = v10 & 0xFFFFFFFF00000000LL; v6 = (unsigned int)v10; } return v7 | v6; }
js_bjson_write: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15,R8 MOV R14,RDI MOV RDX,qword ptr [R8 + 0x10] MOV RCX,qword ptr [R8 + 0x18] LEA RSI,[RSP + 0xc] CALL 0x001215d7 PUSH 0x6 POP RBX TEST EAX,EAX JZ 0x00115a79 LAB_00115a73: XOR EAX,EAX XOR ECX,ECX JMP 0x00115acb LAB_00115a79: MOV R8D,dword ptr [RSP + 0xc] MOV RDX,qword ptr [R15] MOV RCX,qword ptr [R15 + 0x8] LEA RSI,[RSP + 0x10] MOV RDI,R14 CALL 0x0012abef TEST RAX,RAX JZ 0x00115a73 MOV R15,RAX MOV RDX,qword ptr [RSP + 0x10] MOV RDI,R14 MOV RSI,RAX CALL 0x0013200a MOV R12,RAX MOV RBX,RDX MOV RDI,R14 MOV RSI,R15 CALL 0x0011726e MOV RCX,-0x100000000 AND RCX,R12 MOV EAX,R12D LAB_00115acb: OR RAX,RCX MOV RDX,RBX ADD RSP,0x18 POP RBX POP R12 POP R14 POP R15 RET
int1 [16] js_bjson_write(int8 param_1) { int iVar1; ulong uVar2; long lVar3; ulong uVar4; int8 uVar5; int8 *in_R8; int1 auVar6 [16]; int4 local_2c; int8 local_28; iVar1 = JS_ToInt32(param_1,&local_2c,in_R8[2],in_R8[3]); uVar5 = 6; if (iVar1 == 0) { lVar3 = JS_WriteObject(param_1,&local_28,*in_R8,in_R8[1],local_2c); if (lVar3 != 0) { auVar6 = JS_NewArrayBufferCopy(param_1,lVar3,local_28); uVar5 = auVar6._8_8_; js_free(param_1,lVar3); uVar4 = auVar6._0_8_ & 0xffffffff00000000; uVar2 = auVar6._0_8_ & 0xffffffff; goto LAB_00115acb; } } uVar2 = 0; uVar4 = 0; LAB_00115acb: auVar6._0_8_ = uVar2 | uVar4; auVar6._8_8_ = uVar5; return auVar6; }
35,546
js_bjson_write
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_bjson_write(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { size_t len; uint8_t *buf; JSValue array; int flags; if (JS_ToInt32(ctx, &flags, argv[1])) return JS_EXCEPTION; buf = JS_WriteObject(ctx, &len, argv[0], flags); if (!buf) return JS_EXCEPTION; array = JS_NewArrayBufferCopy(ctx, buf, len); js_free(ctx, buf); return array; }
O3
c
js_bjson_write: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, %r15 movq %rdi, %r14 movq 0x10(%r8), %rdx movq 0x18(%r8), %rcx leaq 0xc(%rsp), %rsi callq 0x2803b movl $0x6, %ebx testl %eax, %eax je 0x1baf8 xorl %eax, %eax xorl %ecx, %ecx jmp 0x1bb4a movl 0xc(%rsp), %r8d movq (%r15), %rdx movq 0x8(%r15), %rcx leaq 0x10(%rsp), %rsi movq %r14, %rdi callq 0x3365f testq %rax, %rax je 0x1baf2 movq %rax, %r15 movq 0x10(%rsp), %rdx movq %r14, %rdi movq %rax, %rsi callq 0x3a1a2 movq %rax, %r12 movq %rdx, %rbx movq %r14, %rdi movq %r15, %rsi callq 0x1d481 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %r12, %rcx movl %r12d, %eax orq %rcx, %rax movq %rbx, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
js_bjson_write: push r15 push r14 push r12 push rbx sub rsp, 18h mov r15, r8 mov r14, rdi mov rdx, [r8+10h] mov rcx, [r8+18h] lea rsi, [rsp+38h+var_2C] call JS_ToInt32 mov ebx, 6 test eax, eax jz short loc_1BAF8 loc_1BAF2: xor eax, eax xor ecx, ecx jmp short loc_1BB4A loc_1BAF8: mov r8d, [rsp+38h+var_2C] mov rdx, [r15] mov rcx, [r15+8] lea rsi, [rsp+38h+var_28] mov rdi, r14 call JS_WriteObject test rax, rax jz short loc_1BAF2 mov r15, rax mov rdx, [rsp+38h+var_28] mov rdi, r14 mov rsi, rax call JS_NewArrayBufferCopy mov r12, rax mov rbx, rdx mov rdi, r14 mov rsi, r15 call js_free mov rcx, 0FFFFFFFF00000000h and rcx, r12 mov eax, r12d loc_1BB4A: or rax, rcx mov rdx, rbx add rsp, 18h pop rbx pop r12 pop r14 pop r15 retn
unsigned long long js_bjson_write(long long a1, long long a2, long long a3, long long a4, _QWORD *a5) { long long v6; // rax unsigned long long v7; // rcx long long v8; // rax long long v9; // r15 long long v10; // r12 unsigned int v12; // [rsp+Ch] [rbp-2Ch] BYREF _QWORD v13[5]; // [rsp+10h] [rbp-28h] BYREF if ( (unsigned int)JS_ToInt32(a1, &v12, a5[2], a5[3]) || (v8 = JS_WriteObject(a1, v13, *a5, a5[1], v12)) == 0 ) { v6 = 0LL; v7 = 0LL; } else { v9 = v8; v10 = JS_NewArrayBufferCopy(a1, v8, v13[0]); js_free(a1, v9); v7 = v10 & 0xFFFFFFFF00000000LL; v6 = (unsigned int)v10; } return v7 | v6; }
js_bjson_write: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15,R8 MOV R14,RDI MOV RDX,qword ptr [R8 + 0x10] MOV RCX,qword ptr [R8 + 0x18] LEA RSI,[RSP + 0xc] CALL 0x0012803b MOV EBX,0x6 TEST EAX,EAX JZ 0x0011baf8 LAB_0011baf2: XOR EAX,EAX XOR ECX,ECX JMP 0x0011bb4a LAB_0011baf8: MOV R8D,dword ptr [RSP + 0xc] MOV RDX,qword ptr [R15] MOV RCX,qword ptr [R15 + 0x8] LEA RSI,[RSP + 0x10] MOV RDI,R14 CALL 0x0013365f TEST RAX,RAX JZ 0x0011baf2 MOV R15,RAX MOV RDX,qword ptr [RSP + 0x10] MOV RDI,R14 MOV RSI,RAX CALL 0x0013a1a2 MOV R12,RAX MOV RBX,RDX MOV RDI,R14 MOV RSI,R15 CALL 0x0011d481 MOV RCX,-0x100000000 AND RCX,R12 MOV EAX,R12D LAB_0011bb4a: OR RAX,RCX MOV RDX,RBX ADD RSP,0x18 POP RBX POP R12 POP R14 POP R15 RET
int1 [16] js_bjson_write(int8 param_1) { int iVar1; ulong uVar2; long lVar3; ulong uVar4; int8 uVar5; int8 *in_R8; int1 auVar6 [16]; int4 local_2c; int8 local_28; iVar1 = JS_ToInt32(param_1,&local_2c,in_R8[2],in_R8[3]); uVar5 = 6; if (iVar1 == 0) { lVar3 = JS_WriteObject(param_1,&local_28,*in_R8,in_R8[1],local_2c); if (lVar3 != 0) { auVar6 = JS_NewArrayBufferCopy(param_1,lVar3,local_28); uVar5 = auVar6._8_8_; js_free(param_1,lVar3); uVar4 = auVar6._0_8_ & 0xffffffff00000000; uVar2 = auVar6._0_8_ & 0xffffffff; goto LAB_0011bb4a; } } uVar2 = 0; uVar4 = 0; LAB_0011bb4a: auVar6._0_8_ = uVar2 | uVar4; auVar6._8_8_ = uVar5; return auVar6; }
35,547
common_context_params_to_llama(common_params const&)
llama.cpp/common/common.cpp
struct llama_context_params common_context_params_to_llama(const common_params & params) { auto cparams = llama_context_default_params(); cparams.n_ctx = params.n_ctx; cparams.n_seq_max = params.n_parallel; cparams.n_batch = params.n_batch; cparams.n_ubatch = params.n_ubatch; cparams.n_threads = params.cpuparams.n_threads; cparams.n_threads_batch = params.cpuparams_batch.n_threads == -1 ? params.cpuparams.n_threads : params.cpuparams_batch.n_threads; cparams.logits_all = params.logits_all; cparams.embeddings = params.embedding; cparams.rope_scaling_type = params.rope_scaling_type; cparams.rope_freq_base = params.rope_freq_base; cparams.rope_freq_scale = params.rope_freq_scale; cparams.yarn_ext_factor = params.yarn_ext_factor; cparams.yarn_attn_factor = params.yarn_attn_factor; cparams.yarn_beta_fast = params.yarn_beta_fast; cparams.yarn_beta_slow = params.yarn_beta_slow; cparams.yarn_orig_ctx = params.yarn_orig_ctx; cparams.pooling_type = params.pooling_type; cparams.attention_type = params.attention_type; cparams.defrag_thold = params.defrag_thold; cparams.cb_eval = params.cb_eval; cparams.cb_eval_user_data = params.cb_eval_user_data; cparams.offload_kqv = !params.no_kv_offload; cparams.flash_attn = params.flash_attn; cparams.no_perf = params.no_perf; if (params.reranking) { cparams.embeddings = true; cparams.pooling_type = LLAMA_POOLING_TYPE_RANK; } cparams.type_k = params.cache_type_k; cparams.type_v = params.cache_type_v; return cparams; }
O3
cpp
common_context_params_to_llama(common_params const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx callq 0x214a0 movl 0x18(%r14), %eax movl %eax, 0xc(%rbx) movq 0x4(%r14), %rax movq %rax, (%rbx) movl 0xc(%r14), %eax movl %eax, 0x8(%rbx) movl 0x274(%r14), %eax movl %eax, 0x10(%rbx) movl 0x488(%r14), %ecx cmpl $-0x1, %ecx cmovel %eax, %ecx movl %ecx, 0x14(%rbx) movb 0x1029(%r14), %al movb %al, 0x60(%rbx) movb 0x10d8(%r14), %al movb %al, 0x61(%rbx) movups 0x2c(%r14), %xmm0 movups %xmm0, 0x24(%rbx) movsd 0x3c(%r14), %xmm0 movsd %xmm0, 0x34(%rbx) movl 0x44(%r14), %eax movl %eax, 0x3c(%rbx) movq 0x6b4(%r14), %rax movq %rax, 0x18(%rbx) movl 0x6bc(%r14), %eax movl %eax, 0x20(%rbx) movss 0x48(%r14), %xmm0 movss %xmm0, 0x40(%rbx) movups 0x6a0(%r14), %xmm0 movups %xmm0, 0x48(%rbx) movb 0x102f(%r14), %al xorb $0x1, %al movb %al, 0x62(%rbx) movb 0x1025(%r14), %al movb %al, 0x63(%rbx) movb 0x1026(%r14), %al movb %al, 0x64(%rbx) cmpb $0x1, 0x1120(%r14) jne 0xf9d29 movb $0x1, 0x61(%rbx) movl $0x4, 0x1c(%rbx) movq 0x1034(%r14), %rax movq %rax, 0x58(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_Z30common_context_params_to_llamaRK13common_params: push r14 push rbx push rax mov r14, rsi mov rbx, rdi call _llama_context_default_params mov eax, [r14+18h] mov [rbx+0Ch], eax mov rax, [r14+4] mov [rbx], rax mov eax, [r14+0Ch] mov [rbx+8], eax mov eax, [r14+274h] mov [rbx+10h], eax mov ecx, [r14+488h] cmp ecx, 0FFFFFFFFh cmovz ecx, eax mov [rbx+14h], ecx mov al, [r14+1029h] mov [rbx+60h], al mov al, [r14+10D8h] mov [rbx+61h], al movups xmm0, xmmword ptr [r14+2Ch] movups xmmword ptr [rbx+24h], xmm0 movsd xmm0, qword ptr [r14+3Ch] movsd qword ptr [rbx+34h], xmm0 mov eax, [r14+44h] mov [rbx+3Ch], eax mov rax, [r14+6B4h] mov [rbx+18h], rax mov eax, [r14+6BCh] mov [rbx+20h], eax movss xmm0, dword ptr [r14+48h] movss dword ptr [rbx+40h], xmm0 movups xmm0, xmmword ptr [r14+6A0h] movups xmmword ptr [rbx+48h], xmm0 mov al, [r14+102Fh] xor al, 1 mov [rbx+62h], al mov al, [r14+1025h] mov [rbx+63h], al mov al, [r14+1026h] mov [rbx+64h], al cmp byte ptr [r14+1120h], 1 jnz short loc_F9D29 mov byte ptr [rbx+61h], 1 mov dword ptr [rbx+1Ch], 4 loc_F9D29: mov rax, [r14+1034h] mov [rbx+58h], rax mov rax, rbx add rsp, 8 pop rbx pop r14 retn
const common_params * common_context_params_to_llama(const common_params *a1, long long a2) { int v2; // eax int v3; // ecx llama_context_default_params(a1); *((_DWORD *)a1 + 3) = *(_DWORD *)(a2 + 24); *(_QWORD *)a1 = *(_QWORD *)(a2 + 4); *((_DWORD *)a1 + 2) = *(_DWORD *)(a2 + 12); v2 = *(_DWORD *)(a2 + 628); *((_DWORD *)a1 + 4) = v2; v3 = *(_DWORD *)(a2 + 1160); if ( v3 == -1 ) v3 = v2; *((_DWORD *)a1 + 5) = v3; *((_BYTE *)a1 + 96) = *(_BYTE *)(a2 + 4137); *((_BYTE *)a1 + 97) = *(_BYTE *)(a2 + 4312); *(_OWORD *)((char *)a1 + 36) = *(_OWORD *)(a2 + 44); *(_QWORD *)((char *)a1 + 52) = *(_QWORD *)(a2 + 60); *((_DWORD *)a1 + 15) = *(_DWORD *)(a2 + 68); *((_QWORD *)a1 + 3) = *(_QWORD *)(a2 + 1716); *((_DWORD *)a1 + 8) = *(_DWORD *)(a2 + 1724); *((_DWORD *)a1 + 16) = *(_DWORD *)(a2 + 72); *(_OWORD *)((char *)a1 + 72) = *(_OWORD *)(a2 + 1696); *((_BYTE *)a1 + 98) = *(_BYTE *)(a2 + 4143) ^ 1; *((_BYTE *)a1 + 99) = *(_BYTE *)(a2 + 4133); *((_BYTE *)a1 + 100) = *(_BYTE *)(a2 + 4134); if ( *(_BYTE *)(a2 + 4384) == 1 ) { *((_BYTE *)a1 + 97) = 1; *((_DWORD *)a1 + 7) = 4; } *((_QWORD *)a1 + 11) = *(_QWORD *)(a2 + 4148); return a1; }
common_context_params_to_llama: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI CALL 0x001214a0 MOV EAX,dword ptr [R14 + 0x18] MOV dword ptr [RBX + 0xc],EAX MOV RAX,qword ptr [R14 + 0x4] MOV qword ptr [RBX],RAX MOV EAX,dword ptr [R14 + 0xc] MOV dword ptr [RBX + 0x8],EAX MOV EAX,dword ptr [R14 + 0x274] MOV dword ptr [RBX + 0x10],EAX MOV ECX,dword ptr [R14 + 0x488] CMP ECX,-0x1 CMOVZ ECX,EAX MOV dword ptr [RBX + 0x14],ECX MOV AL,byte ptr [R14 + 0x1029] MOV byte ptr [RBX + 0x60],AL MOV AL,byte ptr [R14 + 0x10d8] MOV byte ptr [RBX + 0x61],AL MOVUPS XMM0,xmmword ptr [R14 + 0x2c] MOVUPS xmmword ptr [RBX + 0x24],XMM0 MOVSD XMM0,qword ptr [R14 + 0x3c] MOVSD qword ptr [RBX + 0x34],XMM0 MOV EAX,dword ptr [R14 + 0x44] MOV dword ptr [RBX + 0x3c],EAX MOV RAX,qword ptr [R14 + 0x6b4] MOV qword ptr [RBX + 0x18],RAX MOV EAX,dword ptr [R14 + 0x6bc] MOV dword ptr [RBX + 0x20],EAX MOVSS XMM0,dword ptr [R14 + 0x48] MOVSS dword ptr [RBX + 0x40],XMM0 MOVUPS XMM0,xmmword ptr [R14 + 0x6a0] MOVUPS xmmword ptr [RBX + 0x48],XMM0 MOV AL,byte ptr [R14 + 0x102f] XOR AL,0x1 MOV byte ptr [RBX + 0x62],AL MOV AL,byte ptr [R14 + 0x1025] MOV byte ptr [RBX + 0x63],AL MOV AL,byte ptr [R14 + 0x1026] MOV byte ptr [RBX + 0x64],AL CMP byte ptr [R14 + 0x1120],0x1 JNZ 0x001f9d29 MOV byte ptr [RBX + 0x61],0x1 MOV dword ptr [RBX + 0x1c],0x4 LAB_001f9d29: MOV RAX,qword ptr [R14 + 0x1034] MOV qword ptr [RBX + 0x58],RAX MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* common_context_params_to_llama(common_params const&) */ common_params * common_context_params_to_llama(common_params *param_1) { int iVar1; int8 uVar2; int iVar3; long in_RSI; llama_context_default_params(); *(int4 *)(param_1 + 0xc) = *(int4 *)(in_RSI + 0x18); *(int8 *)param_1 = *(int8 *)(in_RSI + 4); *(int4 *)(param_1 + 8) = *(int4 *)(in_RSI + 0xc); iVar1 = *(int *)(in_RSI + 0x274); *(int *)(param_1 + 0x10) = iVar1; iVar3 = *(int *)(in_RSI + 0x488); if (*(int *)(in_RSI + 0x488) == -1) { iVar3 = iVar1; } *(int *)(param_1 + 0x14) = iVar3; param_1[0x60] = *(common_params *)(in_RSI + 0x1029); param_1[0x61] = *(common_params *)(in_RSI + 0x10d8); uVar2 = *(int8 *)(in_RSI + 0x34); *(int8 *)(param_1 + 0x24) = *(int8 *)(in_RSI + 0x2c); *(int8 *)(param_1 + 0x2c) = uVar2; *(int8 *)(param_1 + 0x34) = *(int8 *)(in_RSI + 0x3c); *(int4 *)(param_1 + 0x3c) = *(int4 *)(in_RSI + 0x44); *(int8 *)(param_1 + 0x18) = *(int8 *)(in_RSI + 0x6b4); *(int4 *)(param_1 + 0x20) = *(int4 *)(in_RSI + 0x6bc); *(int4 *)(param_1 + 0x40) = *(int4 *)(in_RSI + 0x48); uVar2 = *(int8 *)(in_RSI + 0x6a8); *(int8 *)(param_1 + 0x48) = *(int8 *)(in_RSI + 0x6a0); *(int8 *)(param_1 + 0x50) = uVar2; param_1[0x62] = (common_params)(*(byte *)(in_RSI + 0x102f) ^ 1); param_1[99] = *(common_params *)(in_RSI + 0x1025); param_1[100] = *(common_params *)(in_RSI + 0x1026); if (*(char *)(in_RSI + 0x1120) == '\x01') { param_1[0x61] = (common_params)0x1; *(int4 *)(param_1 + 0x1c) = 4; } *(int8 *)(param_1 + 0x58) = *(int8 *)(in_RSI + 0x1034); return param_1; }
35,548
ma_open_keyfile
eloqsql/storage/maria/ma_open.c
int _ma_open_keyfile(MARIA_SHARE *share) { /* Modifications to share->kfile should be under intern_lock to protect against a concurrent checkpoint. */ mysql_mutex_lock(&share->intern_lock); share->kfile.file= mysql_file_open(key_file_kfile, share->unique_file_name.str, share->mode | O_SHARE | O_NOFOLLOW | O_CLOEXEC, MYF(MY_WME | MY_NOSYMLINKS)); mysql_mutex_unlock(&share->intern_lock); return (share->kfile.file < 0); }
O0
c
ma_open_keyfile: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 leaq 0xe9ace(%rip), %rsi # 0x153bdc movl $0x811, %edx # imm = 0x811 callq 0x63a60 leaq 0x40ee99(%rip), %rax # 0x478fb8 movl (%rax), %edi movq -0x8(%rbp), %rax movq 0x5b0(%rax), %rcx movq -0x8(%rbp), %rax movl 0x7a4(%rax), %r8d orl $0x0, %r8d orl $0x20000, %r8d # imm = 0x20000 orl $0x80000, %r8d # imm = 0x80000 leaq 0xe9a8c(%rip), %rsi # 0x153bdc movl $0x815, %edx # imm = 0x815 movl $0x210, %r9d # imm = 0x210 callq 0x63ad0 movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, 0x760(%rax) movq -0x8(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 callq 0x66710 movq -0x8(%rbp), %rax cmpl $0x0, 0x760(%rax) setl %al andb $0x1, %al movzbl %al, %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_open_keyfile: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] add rdi, 8F0h lea rsi, aWorkspaceLlm4b_14; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 811h call inline_mysql_mutex_lock_11 lea rax, key_file_kfile mov edi, [rax] mov rax, [rbp+var_8] mov rcx, [rax+5B0h] mov rax, [rbp+var_8] mov r8d, [rax+7A4h] or r8d, 0 or r8d, 20000h or r8d, 80000h lea rsi, aWorkspaceLlm4b_14; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 815h mov r9d, 210h call inline_mysql_file_open_1 mov ecx, eax mov rax, [rbp+var_8] mov [rax+760h], ecx mov rdi, [rbp+var_8] add rdi, 8F0h call inline_mysql_mutex_unlock_11 mov rax, [rbp+var_8] cmp dword ptr [rax+760h], 0 setl al and al, 1 movzx eax, al add rsp, 10h pop rbp retn
_BOOL8 ma_open_keyfile(long long a1) { inline_mysql_mutex_lock_11( a1 + 2288, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c", 0x811u); *(_DWORD *)(a1 + 1888) = inline_mysql_file_open_1( key_file_kfile, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c", 0x815u, *(_QWORD *)(a1 + 1456), *(_DWORD *)(a1 + 1956) | 0xA0000u, 528LL); inline_mysql_mutex_unlock_11(a1 + 2288); return *(int *)(a1 + 1888) < 0; }
_ma_open_keyfile: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x8f0 LEA RSI,[0x253bdc] MOV EDX,0x811 CALL 0x00163a60 LEA RAX,[0x578fb8] MOV EDI,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x5b0] MOV RAX,qword ptr [RBP + -0x8] MOV R8D,dword ptr [RAX + 0x7a4] OR R8D,0x0 OR R8D,0x20000 OR R8D,0x80000 LEA RSI,[0x253bdc] MOV EDX,0x815 MOV R9D,0x210 CALL 0x00163ad0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x760],ECX MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x8f0 CALL 0x00166710 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x760],0x0 SETL AL AND AL,0x1 MOVZX EAX,AL ADD RSP,0x10 POP RBP RET
bool _ma_open_keyfile(long param_1) { int4 uVar1; inline_mysql_mutex_lock (param_1 + 0x8f0,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c", 0x811); uVar1 = inline_mysql_file_open (key_file_kfile, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c",0x815, *(int8 *)(param_1 + 0x5b0),*(uint *)(param_1 + 0x7a4) | 0xa0000,0x210); *(int4 *)(param_1 + 0x760) = uVar1; inline_mysql_mutex_unlock(param_1 + 0x8f0); return *(int *)(param_1 + 0x760) < 0; }
35,549
blst_p1_mult
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/e1.c
void blst_p1_mult(POINTonE1 *out, const POINTonE1 *a, const byte *scalar, size_t nbits) { if (nbits < 176) { if (nbits) POINTonE1_mult_w4(out, a, scalar, nbits); else vec_zero(out, sizeof(*out)); } else if (nbits <= 256) { union { vec256 l; pow256 s; } val; size_t i, j, top, mask = (size_t)0 - 1; /* this is not about constant-time-ness, but branch optimization */ for (top = (nbits + 7)/8, i=0, j=0; i<sizeof(val.s);) { val.s[i++] = scalar[j] & mask; mask = 0 - ((i - top) >> (8*sizeof(top)-1)); j += 1 & mask; } if (check_mod_256(val.s, BLS12_381_r)) /* z^4 is the formal limit */ POINTonE1_mult_glv(out, a, val.s); else /* should never be the case, added for formal completeness */ POINTonE1_mult_w5(out, a, scalar, nbits); vec_zero(val.l, sizeof(val)); } else { /* should never be the case, added for formal completeness */ POINTonE1_mult_w5(out, a, scalar, nbits); } }
O3
c
blst_p1_mult: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rcx, %r14 movq %rdx, %r12 movq %rsi, %r15 movq %rdi, %rbx cmpq $0xaf, %rcx ja 0x1a7b1 testq %r14, %r14 je 0x1a830 movq %rbx, %rdi movq %r15, %rsi movq %r12, %rdx movq %r14, %rcx addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x1a87b cmpq $0x100, %r14 # imm = 0x100 ja 0x1a813 leaq 0x7(%r14), %rax shrq $0x3, %rax movb $-0x1, %sil movl $0x1, %ecx xorl %edx, %edx andb (%r12,%rdx), %sil movb %sil, -0x41(%rbp,%rcx) xorl %esi, %esi cmpq %rax, %rcx setb %sil addq %rsi, %rdx negb %sil incq %rcx cmpq $0x21, %rcx jne 0x1a7cc leaq 0x250bc(%rip), %rsi # 0x3f8b0 leaq -0x40(%rbp), %rdi callq 0x36080 testq %rax, %rax je 0x1a845 leaq -0x40(%rbp), %rdx movq %rbx, %rdi movq %r15, %rsi callq 0x1aabf jmp 0x1a856 movq %rbx, %rdi movq %r15, %rsi movq %r12, %rdx movq %r14, %rcx addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x1af02 xorl %eax, %eax movq $0x0, (%rbx,%rax,8) incq %rax cmpq $0x12, %rax jne 0x1a832 jmp 0x1a86e movq %rbx, %rdi movq %r15, %rsi movq %r12, %rdx movq %r14, %rcx callq 0x1af02 xorl %eax, %eax movq $0x0, -0x40(%rbp,%rax,8) incq %rax cmpq $0x4, %rax jne 0x1a858 leaq -0x40(%rbp), %rax addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
blst_p1_mult: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 20h mov r14, rcx mov r12, rdx mov r15, rsi mov rbx, rdi cmp rcx, 0AFh ja short loc_1A7B1 test r14, r14 jz loc_1A830 mov rdi, rbx mov rsi, r15 mov rdx, r12 mov rcx, r14 add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp jmp POINTonE1_mult_w4 loc_1A7B1: cmp r14, 100h ja short loc_1A813 lea rax, [r14+7] shr rax, 3 mov sil, 0FFh mov ecx, 1 xor edx, edx loc_1A7CC: and sil, [r12+rdx] mov [rbp+rcx+var_41], sil xor esi, esi cmp rcx, rax setb sil add rdx, rsi neg sil inc rcx cmp rcx, 21h ; '!' jnz short loc_1A7CC lea rsi, BLS12_381_r lea rdi, [rbp+var_40] call check_mod_256 test rax, rax jz short loc_1A845 lea rdx, [rbp+var_40] mov rdi, rbx mov rsi, r15 call POINTonE1_mult_glv jmp short loc_1A856 loc_1A813: mov rdi, rbx mov rsi, r15 mov rdx, r12 mov rcx, r14 add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp jmp POINTonE1_mult_w5 loc_1A830: xor eax, eax loc_1A832: mov qword ptr [rbx+rax*8], 0 inc rax cmp rax, 12h jnz short loc_1A832 jmp short loc_1A86E loc_1A845: mov rdi, rbx mov rsi, r15 mov rdx, r12 mov rcx, r14 call POINTonE1_mult_w5 loc_1A856: xor eax, eax loc_1A858: mov [rbp+rax*8+var_40], 0 inc rax cmp rax, 4 jnz short loc_1A858 lea rax, [rbp+var_40] loc_1A86E: add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long blst_p1_mult(long long a1, long long a2, long long a3, unsigned long long a4) { long long result; // rax unsigned long long v8; // rax char v9; // si unsigned long long v10; // rcx long long v11; // rdx long long v12; // rsi long long i; // rax char v14; // [rsp+1h] [rbp-41h] _QWORD v15[8]; // [rsp+2h] [rbp-40h] BYREF if ( a4 > 0xAF ) { if ( a4 > 0x100 ) { return POINTonE1_mult_w5(a1, a2, a3, a4); } else { v8 = (a4 + 7) >> 3; v9 = -1; v10 = 1LL; v11 = 0LL; do { *(&v14 + v10) = *(_BYTE *)(a3 + v11) & v9; v12 = v10 < v8; v11 += v12; v9 = -(char)v12; ++v10; } while ( v10 != 33 ); if ( check_mod_256(v15, &BLS12_381_r, v11) ) POINTonE1_mult_glv(a1, a2, v15); else POINTonE1_mult_w5(a1, a2, a3, a4); for ( i = 0LL; i != 4; ++i ) v15[i] = 0LL; return (long long)v15; } } else if ( a4 ) { return POINTonE1_mult_w4(a1, a2, a3, a4); } else { for ( result = 0LL; result != 18; ++result ) *(_QWORD *)(a1 + 8 * result) = 0LL; } return result; }
blst_p1_mult: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV R14,RCX MOV R12,RDX MOV R15,RSI MOV RBX,RDI CMP RCX,0xaf JA 0x0011a7b1 TEST R14,R14 JZ 0x0011a830 MOV RDI,RBX MOV RSI,R15 MOV RDX,R12 MOV RCX,R14 ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x0011a87b LAB_0011a7b1: CMP R14,0x100 JA 0x0011a813 LEA RAX,[R14 + 0x7] SHR RAX,0x3 MOV SIL,0xff MOV ECX,0x1 XOR EDX,EDX LAB_0011a7cc: AND SIL,byte ptr [R12 + RDX*0x1] MOV byte ptr [RBP + RCX*0x1 + -0x41],SIL XOR ESI,ESI CMP RCX,RAX SETC SIL ADD RDX,RSI NEG SIL INC RCX CMP RCX,0x21 JNZ 0x0011a7cc LEA RSI,[0x13f8b0] LEA RDI,[RBP + -0x40] CALL 0x00136080 TEST RAX,RAX JZ 0x0011a845 LEA RDX,[RBP + -0x40] MOV RDI,RBX MOV RSI,R15 CALL 0x0011aabf JMP 0x0011a856 LAB_0011a813: MOV RDI,RBX MOV RSI,R15 MOV RDX,R12 MOV RCX,R14 ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x0011af02 LAB_0011a830: XOR EAX,EAX LAB_0011a832: MOV qword ptr [RBX + RAX*0x8],0x0 INC RAX CMP RAX,0x12 JNZ 0x0011a832 JMP 0x0011a86e LAB_0011a845: MOV RDI,RBX MOV RSI,R15 MOV RDX,R12 MOV RCX,R14 CALL 0x0011af02 LAB_0011a856: XOR EAX,EAX LAB_0011a858: MOV qword ptr [RBP + RAX*0x8 + -0x40],0x0 INC RAX CMP RAX,0x4 JNZ 0x0011a858 LEA RAX,[RBP + -0x40] LAB_0011a86e: ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET
byte * blst_p1_mult(long param_1,int8 param_2,long param_3,ulong param_4) { byte *pbVar1; long lVar2; ulong uVar3; byte bVar4; bool bVar5; int8 uStack_50; byte local_48 [32]; if (param_4 < 0xb0) { if (param_4 != 0) { pbVar1 = (byte *)POINTonE1_mult_w4(param_1,param_2,param_3,param_4); return pbVar1; } lVar2 = 0; do { *(int8 *)(param_1 + lVar2 * 8) = 0; lVar2 = lVar2 + 1; } while (lVar2 != 0x12); pbVar1 = (byte *)0x12; } else { if (0x100 < param_4) { pbVar1 = (byte *)POINTonE1_mult_w5(param_1,param_2,param_3,param_4); return pbVar1; } bVar4 = 0xff; uVar3 = 1; lVar2 = 0; do { local_48[uVar3 - 1] = bVar4 & *(byte *)(param_3 + lVar2); bVar5 = uVar3 < param_4 + 7 >> 3; lVar2 = lVar2 + (ulong)bVar5; bVar4 = -bVar5; uVar3 = uVar3 + 1; } while (uVar3 != 0x21); uStack_50 = 0x11a7fd; lVar2 = check_mod_256(local_48,BLS12_381_r); if (lVar2 == 0) { uStack_50 = 0x11a856; POINTonE1_mult_w5(param_1,param_2,param_3,param_4); } else { uStack_50 = 0x11a811; POINTonE1_mult_glv(param_1,param_2,local_48); } lVar2 = 0; do { pbVar1 = local_48 + lVar2 * 8; pbVar1[0] = 0; pbVar1[1] = 0; pbVar1[2] = 0; pbVar1[3] = 0; pbVar1[4] = 0; pbVar1[5] = 0; pbVar1[6] = 0; pbVar1[7] = 0; lVar2 = lVar2 + 1; } while (lVar2 != 4); pbVar1 = local_48; } return pbVar1; }
35,550
JS_WriteString
bluesky950520[P]quickjs/quickjs.c
static void JS_WriteString(BCWriterState *s, JSString *p) { int i; bc_put_leb128(s, ((uint32_t)p->len << 1) | p->is_wide_char); if (p->is_wide_char) { for(i = 0; i < p->len; i++) bc_put_u16(s, p->u.str16[i]); } else { dbuf_put(&s->dbuf, p->u.str8, p->len); } }
O2
c
JS_WriteString: pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movl 0x4(%rsi), %esi roll %esi addq $0x8, %r14 movq %r14, %rdi callq 0x3cf8f movq 0x4(%rbx), %rdx testl %edx, %edx js 0x3cf18 addq $0x18, %rbx andl $0x7fffffff, %edx # imm = 0x7FFFFFFF movq %r14, %rdi movq %rbx, %rsi popq %rbx popq %r14 popq %r15 jmp 0x15c88 xorl %r15d, %r15d andl $0x7fffffff, %edx # imm = 0x7FFFFFFF cmpq %rdx, %r15 jae 0x3cf3d movzwl 0x18(%rbx,%r15,2), %esi movq %r14, %rdi callq 0x3cfc8 incq %r15 movq 0x4(%rbx), %rdx jmp 0x3cf1b popq %rbx popq %r14 popq %r15 retq
JS_WriteString: push r15 push r14 push rbx mov rbx, rsi mov r14, rdi mov esi, [rsi+4] rol esi, 1 add r14, 8 mov rdi, r14 call dbuf_put_leb128 mov rdx, [rbx+4] test edx, edx js short loc_3CF18 add rbx, 18h and edx, 7FFFFFFFh mov rdi, r14 mov rsi, rbx pop rbx pop r14 pop r15 jmp dbuf_put loc_3CF18: xor r15d, r15d loc_3CF1B: and edx, 7FFFFFFFh cmp r15, rdx jnb short loc_3CF3D movzx esi, word ptr [rbx+r15*2+18h] mov rdi, r14 call dbuf_put_u16 inc r15 mov rdx, [rbx+4] jmp short loc_3CF1B loc_3CF3D: pop rbx pop r14 pop r15 retn
long long JS_WriteString(long long a1, long long a2) { _QWORD *v2; // r14 long long result; // rax long long v4; // rdx unsigned long long i; // r15 v2 = (_QWORD *)(a1 + 8); result = dbuf_put_leb128(a1 + 8, (unsigned int)__ROL4__(*(_DWORD *)(a2 + 4), 1)); v4 = *(_QWORD *)(a2 + 4); if ( (int)v4 >= 0 ) return dbuf_put(v2, a2 + 24, *(_QWORD *)(a2 + 4) & 0x7FFFFFFFLL); for ( i = 0LL; i < ((unsigned int)v4 & 0x7FFFFFFF); ++i ) { result = dbuf_put_u16(v2, *(unsigned __int16 *)(a2 + 2 * i + 24)); v4 = *(_QWORD *)(a2 + 4); } return result; }
JS_WriteString: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV R14,RDI MOV ESI,dword ptr [RSI + 0x4] ROL ESI,0x1 ADD R14,0x8 MOV RDI,R14 CALL 0x0013cf8f MOV RDX,qword ptr [RBX + 0x4] TEST EDX,EDX JS 0x0013cf18 ADD RBX,0x18 AND EDX,0x7fffffff MOV RDI,R14 MOV RSI,RBX POP RBX POP R14 POP R15 JMP 0x00115c88 LAB_0013cf18: XOR R15D,R15D LAB_0013cf1b: AND EDX,0x7fffffff CMP R15,RDX JNC 0x0013cf3d MOVZX ESI,word ptr [RBX + R15*0x2 + 0x18] MOV RDI,R14 CALL 0x0013cfc8 INC R15 MOV RDX,qword ptr [RBX + 0x4] JMP 0x0013cf1b LAB_0013cf3d: POP RBX POP R14 POP R15 RET
void JS_WriteString(long param_1,long param_2) { int8 uVar1; ulong uVar2; param_1 = param_1 + 8; dbuf_put_leb128(param_1,*(int *)(param_2 + 4) << 1 | (uint)(*(int *)(param_2 + 4) < 0)); uVar1 = *(int8 *)(param_2 + 4); if (-1 < (int)(uint)uVar1) { dbuf_put(param_1,param_2 + 0x18,(uint)uVar1 & 0x7fffffff); return; } for (uVar2 = 0; uVar2 < ((uint)uVar1 & 0x7fffffff); uVar2 = uVar2 + 1) { dbuf_put_u16(param_1,*(int2 *)(param_2 + 0x18 + uVar2 * 2)); uVar1 = *(int8 *)(param_2 + 4); } return; }
35,551
JS_ToQuotedStringFree
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_ToQuotedStringFree(JSContext *ctx, JSValue val) { JSValue r = JS_ToQuotedString(ctx, val); JS_FreeValue(ctx, val); return r; }
O1
c
JS_ToQuotedStringFree: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 callq 0x4665b movq %rdx, %r12 movq %rax, 0x30(%rsp) cmpl $0x6, %r12d jne 0x5108a movq %rax, %r13 jmp 0x5111c movq %rbx, 0x38(%rsp) movq 0x30(%rsp), %r13 movl $0x7fffffff, %esi # imm = 0x7FFFFFFF andl 0x4(%r13), %esi addl $0x2, %esi movq %r15, 0x10(%rsp) movl %esi, 0x24(%rsp) movl $0x0, 0x20(%rsp) movq $0x0, 0x28(%rsp) movq %r15, %rdi xorl %edx, %edx callq 0x24bcf movq %rax, 0x18(%rsp) testq %rax, %rax je 0x5128d leaq 0x10(%rsp), %rdi movl $0x22, %esi callq 0x4f8bd testl %eax, %eax je 0x51140 movq 0x30(%rsp), %rsi movq 0x18(%r15), %rdi movq %r12, %rdx callq 0x21922 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x20bf5 movq $0x0, 0x18(%rsp) movl $0x6, %r12d xorl %r13d, %r13d movq 0x38(%rsp), %rbx movq 0x18(%r15), %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x21922 movq %r13, %rax movq %r12, %rdx addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x0, 0xc(%rsp) testl $0x7fffffff, 0x4(%r13) # imm = 0x7FFFFFFF je 0x51250 movq %r13, %rdi leaq 0xc(%rsp), %rsi callq 0x50609 movl %eax, %ebp leal -0x8(%rbp), %eax cmpl $0x5, %eax ja 0x51189 leaq 0x4fe3c(%rip), %rcx # 0xa0fb0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax leaq 0x10(%rsp), %rbx jmpq *%rax movl $0x62, %ebp jmp 0x51206 cmpl $0x22, %ebp je 0x51201 cmpl $0x5c, %ebp leaq 0x10(%rsp), %rbx je 0x51206 cmpl $0x20, %ebp setae %al movl %ebp, %ecx andl $0x1ff800, %ecx # imm = 0x1FF800 cmpl $0xd800, %ecx # imm = 0xD800 setne %cl testb %cl, %al jne 0x51244 movl $0x10, %esi leaq 0x40(%rsp), %rdi leaq 0x52cce(%rip), %rdx # 0xa3e96 movl %ebp, %ecx xorl %eax, %eax callq 0xe300 movq %rbx, %rdi leaq 0x40(%rsp), %rsi movl $0x6, %edx callq 0x46094 jmp 0x51225 movl $0x74, %ebp jmp 0x51206 movl $0x6e, %ebp jmp 0x51206 movl $0x66, %ebp jmp 0x51206 movl $0x72, %ebp jmp 0x51206 leaq 0x10(%rsp), %rbx movq %rbx, %rdi movl $0x5c, %esi callq 0x4f8bd testl %eax, %eax jne 0x510e5 movq %rbx, %rdi movl %ebp, %esi callq 0x4f8bd testl %eax, %eax jne 0x510e5 movl 0x4(%r13), %eax movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF andl %ecx, %eax cmpl %eax, 0xc(%rsp) jl 0x51156 jmp 0x51250 movq %rbx, %rdi movl %ebp, %esi callq 0x3744c jmp 0x51225 leaq 0x10(%rsp), %rdi movl $0x22, %esi callq 0x4f8bd testl %eax, %eax jne 0x510e5 movq 0x30(%rsp), %rsi movq 0x18(%r15), %rdi movq %r12, %rdx callq 0x21922 leaq 0x10(%rsp), %rdi callq 0x374a0 movq %rax, %r13 movq %rdx, %r12 jmp 0x51117 movl $0x0, 0x24(%rsp) movl $0xffffffff, 0x2c(%rsp) # imm = 0xFFFFFFFF jmp 0x510e5
JS_ToQuotedStringFree: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov rbx, rdx mov r14, rsi mov r15, rdi call JS_ToStringCheckObject mov r12, rdx mov [rsp+88h+var_58], rax cmp r12d, 6 jnz short loc_5108A mov r13, rax jmp loc_5111C loc_5108A: mov [rsp+88h+var_50], rbx mov r13, [rsp+88h+var_58] mov esi, 7FFFFFFFh and esi, [r13+4] add esi, 2 mov [rsp+88h+var_78], r15 mov [rsp+88h+var_64], esi mov [rsp+88h+var_68], 0 mov [rsp+88h+var_60], 0 mov rdi, r15 xor edx, edx call js_alloc_string mov [rsp+88h+var_70], rax test rax, rax jz loc_5128D lea rdi, [rsp+88h+var_78] mov esi, 22h ; '"' call string_buffer_putc8 test eax, eax jz short loc_51140 loc_510E5: mov rsi, [rsp+88h+var_58] mov rdi, [r15+18h] mov rdx, r12 call JS_FreeValueRT mov rdi, [rsp+88h+var_78] mov rsi, [rsp+88h+var_70] call js_free mov [rsp+88h+var_70], 0 mov r12d, 6 xor r13d, r13d loc_51117: mov rbx, [rsp+88h+var_50] loc_5111C: mov rdi, [r15+18h] mov rsi, r14 mov rdx, rbx call JS_FreeValueRT mov rax, r13 mov rdx, r12 add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_51140: mov [rsp+88h+var_7C], 0 test dword ptr [r13+4], 7FFFFFFFh jz loc_51250 loc_51156: mov rdi, r13 lea rsi, [rsp+88h+var_7C] call string_getc mov ebp, eax lea eax, [rbp-8]; switch 6 cases cmp eax, 5 ja short def_51180; jumptable 0000000000051180 default case lea rcx, jpt_51180 movsxd rax, ds:(jpt_51180 - 0A0FB0h)[rcx+rax*4] add rax, rcx lea rbx, [rsp+88h+var_78] jmp rax; switch jump loc_51182: mov ebp, 62h ; 'b'; jumptable 0000000000051180 case 8 jmp short loc_51206 def_51180: cmp ebp, 22h ; '"'; jumptable 0000000000051180 default case jz short loc_51201 cmp ebp, 5Ch ; '\' lea rbx, [rsp+88h+var_78] jz short loc_51206 loc_51198: cmp ebp, 20h ; ' '; jumptable 0000000000051180 case 11 setnb al mov ecx, ebp and ecx, 1FF800h cmp ecx, 0D800h setnz cl test al, cl jnz loc_51244 mov esi, 10h lea rdi, [rsp+88h+var_48] lea rdx, aU04x; "\\u%04x" mov ecx, ebp xor eax, eax call _snprintf mov rdi, rbx lea rsi, [rsp+88h+var_48] mov edx, 6 call string_buffer_write8 jmp short loc_51225 loc_511E5: mov ebp, 74h ; 't'; jumptable 0000000000051180 case 9 jmp short loc_51206 loc_511EC: mov ebp, 6Eh ; 'n'; jumptable 0000000000051180 case 10 jmp short loc_51206 loc_511F3: mov ebp, 66h ; 'f'; jumptable 0000000000051180 case 12 jmp short loc_51206 loc_511FA: mov ebp, 72h ; 'r'; jumptable 0000000000051180 case 13 jmp short loc_51206 loc_51201: lea rbx, [rsp+88h+var_78] loc_51206: mov rdi, rbx mov esi, 5Ch ; '\' call string_buffer_putc8 test eax, eax jnz loc_510E5 mov rdi, rbx mov esi, ebp call string_buffer_putc8 loc_51225: test eax, eax jnz loc_510E5 mov eax, [r13+4] mov ecx, 7FFFFFFFh and eax, ecx cmp [rsp+88h+var_7C], eax jl loc_51156 jmp short loc_51250 loc_51244: mov rdi, rbx mov esi, ebp call string_buffer_putc jmp short loc_51225 loc_51250: lea rdi, [rsp+88h+var_78] mov esi, 22h ; '"' call string_buffer_putc8 test eax, eax jnz loc_510E5 mov rsi, [rsp+88h+var_58] mov rdi, [r15+18h] mov rdx, r12 call JS_FreeValueRT lea rdi, [rsp+88h+var_78] call string_buffer_end mov r13, rax mov r12, rdx jmp loc_51117 loc_5128D: mov [rsp+88h+var_64], 0 mov dword ptr [rsp+88h+var_60+4], 0FFFFFFFFh jmp loc_510E5
_DWORD * JS_ToQuotedStringFree( long long a1, _DWORD *a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // rbx _DWORD *v16; // rax long long v17; // rdx long long v18; // r12 _DWORD *v19; // r13 _DWORD *v20; // r13 long long v21; // rsi long long v22; // rdx long long v23; // rcx long long v24; // r8 long long v25; // r9 __m128 v26; // xmm4 __m128 v27; // xmm5 long long v28; // rdx long long v29; // rcx long long v30; // r8 long long v31; // r9 __m128 v32; // xmm4 __m128 v33; // xmm5 long long v35; // rdx long long v36; // rcx unsigned int v37; // ebp long long v38; // r8 long long v39; // r9 __m128 v40; // xmm4 __m128 v41; // xmm5 int v42; // eax long long v43; // rdx long long v44; // rcx long long v45; // r8 long long v46; // r9 __m128 v47; // xmm4 __m128 v48; // xmm5 int v49; // [rsp+Ch] [rbp-7Ch] BYREF long long v50; // [rsp+10h] [rbp-78h] BYREF long long v51; // [rsp+18h] [rbp-70h] int v52; // [rsp+20h] [rbp-68h] int v53; // [rsp+24h] [rbp-64h] long long v54; // [rsp+28h] [rbp-60h] _DWORD *v55; // [rsp+30h] [rbp-58h] long long v56; // [rsp+38h] [rbp-50h] _BYTE v57[72]; // [rsp+40h] [rbp-48h] BYREF v14 = a3; v16 = (_DWORD *)JS_ToStringCheckObject(a1, (long long)a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v18 = v17; v55 = v16; if ( (_DWORD)v17 != 6 ) { v56 = v14; v20 = v55; v21 = (v55[1] & 0x7FFFFFFFu) + 2; v50 = a1; v53 = v21; v52 = 0; v54 = 0LL; v51 = js_alloc_string(a1, v21, 0); if ( v51 ) { if ( !(unsigned int)string_buffer_putc8( (long long)&v50, 0x22u, a7, a8, a9, a10, v26, v27, a13, a14, v22, v23, v24, v25) ) { v49 = 0; if ( (v20[1] & 0x7FFFFFFF) != 0 ) { while ( 2 ) { v37 = string_getc((long long)v20, &v49); switch ( v37 ) { case 8u: v37 = 98; goto LABEL_19; case 9u: v37 = 116; goto LABEL_19; case 0xAu: v37 = 110; goto LABEL_19; case 0xBu: goto LABEL_13; case 0xCu: v37 = 102; goto LABEL_19; case 0xDu: v37 = 114; goto LABEL_19; default: if ( v37 == 34 || v37 == 92 ) { LABEL_19: if ( (unsigned int)string_buffer_putc8( (long long)&v50, 0x5Cu, a7, a8, a9, a10, v40, v41, a13, a14, v35, v36, v38, v39) ) goto LABEL_5; v42 = string_buffer_putc8((long long)&v50, v37, a7, a8, a9, a10, v47, v48, a13, a14, v43, v44, v45, v46); } else { LABEL_13: if ( (v37 & 0x1FF800) != 55296 && v37 >= 0x20 ) { v42 = string_buffer_putc((long long)&v50, v37); } else { snprintf(v57, 16LL, "\\u%04x", v37); v42 = string_buffer_write8((long long)&v50, (long long)v57, 6); } } if ( v42 ) goto LABEL_5; v29 = 0x7FFFFFFFLL; if ( v49 >= (v20[1] & 0x7FFFFFFF) ) break; continue; } break; } } if ( !(unsigned int)string_buffer_putc8( (long long)&v50, 0x22u, a7, a8, a9, a10, v32, v33, a13, a14, v28, v29, v30, v31) ) { JS_FreeValueRT(*(_QWORD *)(a1 + 24), v55, v18); v19 = string_buffer_end((long long)&v50); goto LABEL_6; } } } else { v53 = 0; HIDWORD(v54) = -1; } LABEL_5: JS_FreeValueRT(*(_QWORD *)(a1 + 24), v55, v18); js_free(v50, v51); v51 = 0LL; v19 = 0LL; LABEL_6: v14 = v56; goto LABEL_7; } v19 = v16; LABEL_7: JS_FreeValueRT(*(_QWORD *)(a1 + 24), a2, v14); return v19; }
JS_ToQuotedStringFree: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RBX,RDX MOV R14,RSI MOV R15,RDI CALL 0x0014665b MOV R12,RDX MOV qword ptr [RSP + 0x30],RAX CMP R12D,0x6 JNZ 0x0015108a MOV R13,RAX JMP 0x0015111c LAB_0015108a: MOV qword ptr [RSP + 0x38],RBX MOV R13,qword ptr [RSP + 0x30] MOV ESI,0x7fffffff AND ESI,dword ptr [R13 + 0x4] ADD ESI,0x2 MOV qword ptr [RSP + 0x10],R15 MOV dword ptr [RSP + 0x24],ESI MOV dword ptr [RSP + 0x20],0x0 MOV qword ptr [RSP + 0x28],0x0 MOV RDI,R15 XOR EDX,EDX CALL 0x00124bcf MOV qword ptr [RSP + 0x18],RAX TEST RAX,RAX JZ 0x0015128d LEA RDI,[RSP + 0x10] MOV ESI,0x22 CALL 0x0014f8bd TEST EAX,EAX JZ 0x00151140 LAB_001510e5: MOV RSI,qword ptr [RSP + 0x30] MOV RDI,qword ptr [R15 + 0x18] MOV RDX,R12 CALL 0x00121922 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x18] CALL 0x00120bf5 MOV qword ptr [RSP + 0x18],0x0 MOV R12D,0x6 XOR R13D,R13D LAB_00151117: MOV RBX,qword ptr [RSP + 0x38] LAB_0015111c: MOV RDI,qword ptr [R15 + 0x18] MOV RSI,R14 MOV RDX,RBX CALL 0x00121922 MOV RAX,R13 MOV RDX,R12 ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00151140: MOV dword ptr [RSP + 0xc],0x0 TEST dword ptr [R13 + 0x4],0x7fffffff JZ 0x00151250 LAB_00151156: MOV RDI,R13 LEA RSI,[RSP + 0xc] CALL 0x00150609 MOV EBP,EAX LEA EAX,[RBP + -0x8] CMP EAX,0x5 JA 0x00151189 LEA RCX,[0x1a0fb0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX LEA RBX,[RSP + 0x10] switchD: JMP RAX caseD_8: MOV EBP,0x62 JMP 0x00151206 default: CMP EBP,0x22 JZ 0x00151201 CMP EBP,0x5c LEA RBX,[RSP + 0x10] JZ 0x00151206 caseD_b: CMP EBP,0x20 SETNC AL MOV ECX,EBP AND ECX,0x1ff800 CMP ECX,0xd800 SETNZ CL TEST AL,CL JNZ 0x00151244 MOV ESI,0x10 LEA RDI,[RSP + 0x40] LEA RDX,[0x1a3e96] MOV ECX,EBP XOR EAX,EAX CALL 0x0010e300 MOV RDI,RBX LEA RSI,[RSP + 0x40] MOV EDX,0x6 CALL 0x00146094 JMP 0x00151225 caseD_9: MOV EBP,0x74 JMP 0x00151206 caseD_a: MOV EBP,0x6e JMP 0x00151206 caseD_c: MOV EBP,0x66 JMP 0x00151206 caseD_d: MOV EBP,0x72 JMP 0x00151206 LAB_00151201: LEA RBX,[RSP + 0x10] LAB_00151206: MOV RDI,RBX MOV ESI,0x5c CALL 0x0014f8bd TEST EAX,EAX JNZ 0x001510e5 MOV RDI,RBX MOV ESI,EBP CALL 0x0014f8bd LAB_00151225: TEST EAX,EAX JNZ 0x001510e5 MOV EAX,dword ptr [R13 + 0x4] MOV ECX,0x7fffffff AND EAX,ECX CMP dword ptr [RSP + 0xc],EAX JL 0x00151156 JMP 0x00151250 LAB_00151244: MOV RDI,RBX MOV ESI,EBP CALL 0x0013744c JMP 0x00151225 LAB_00151250: LEA RDI,[RSP + 0x10] MOV ESI,0x22 CALL 0x0014f8bd TEST EAX,EAX JNZ 0x001510e5 MOV RSI,qword ptr [RSP + 0x30] MOV RDI,qword ptr [R15 + 0x18] MOV RDX,R12 CALL 0x00121922 LEA RDI,[RSP + 0x10] CALL 0x001374a0 MOV R13,RAX MOV R12,RDX JMP 0x00151117 LAB_0015128d: MOV dword ptr [RSP + 0x24],0x0 MOV dword ptr [RSP + 0x2c],0xffffffff JMP 0x001510e5
int1 [16] JS_ToQuotedStringFree(long param_1,int8 param_2,int8 param_3) { int iVar1; uint uVar2; long lVar3; int1 auVar4 [16]; int1 auVar5 [16]; int local_7c; long local_78; long local_70; int4 local_68; int local_64; int8 local_60; long local_58; int8 local_50; char local_48 [24]; auVar4 = JS_ToStringCheckObject(); lVar3 = auVar4._0_8_; if (auVar4._8_4_ != 6) { local_64 = (*(uint *)(lVar3 + 4) & 0x7fffffff) + 2; local_68 = 0; local_60 = 0; local_78 = param_1; local_58 = lVar3; local_50 = param_3; local_70 = js_alloc_string(param_1,local_64,0); if (local_70 == 0) { local_64 = 0; local_60 = CONCAT44(0xffffffff,(int4)local_60); } else { iVar1 = string_buffer_putc8(&local_78,0x22); if (iVar1 == 0) { local_7c = 0; if ((*(uint *)(lVar3 + 4) & 0x7fffffff) != 0) { do { uVar2 = string_getc(lVar3,&local_7c); switch(uVar2) { case 8: uVar2 = 0x62; break; case 9: uVar2 = 0x74; break; case 10: uVar2 = 0x6e; break; case 0xb: switchD_00151180_caseD_b: if (uVar2 < 0x20 || (uVar2 & 0x1ff800) == 0xd800) { snprintf(local_48,0x10,"\\u%04x",(ulong)uVar2); iVar1 = string_buffer_write8(&local_78,local_48,6); } else { iVar1 = string_buffer_putc(&local_78,uVar2); } goto LAB_00151225; case 0xc: uVar2 = 0x66; break; case 0xd: uVar2 = 0x72; break; default: if ((uVar2 != 0x22) && (uVar2 != 0x5c)) goto switchD_00151180_caseD_b; } iVar1 = string_buffer_putc8(&local_78,0x5c); if (iVar1 != 0) goto LAB_001510e5; iVar1 = string_buffer_putc8(&local_78,uVar2); LAB_00151225: if (iVar1 != 0) goto LAB_001510e5; } while (local_7c < (int)(*(uint *)(lVar3 + 4) & 0x7fffffff)); } iVar1 = string_buffer_putc8(&local_78,0x22); if (iVar1 == 0) { JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_58,auVar4._8_8_); auVar5 = string_buffer_end(&local_78); auVar4._8_8_ = auVar5._8_8_; auVar4._0_8_ = local_58; lVar3 = auVar5._0_8_; param_3 = local_50; goto LAB_0015111c; } } } LAB_001510e5: JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_58,auVar4._8_8_); js_free(local_78,local_70); local_70 = 0; auVar4._8_8_ = 6; auVar4._0_8_ = local_58; lVar3 = 0; param_3 = local_50; } LAB_0015111c: local_58 = auVar4._0_8_; JS_FreeValueRT(*(int8 *)(param_1 + 0x18),param_2,param_3); auVar5._8_8_ = auVar4._8_8_; auVar5._0_8_ = lVar3; return auVar5; }
35,552
JS_ToQuotedStringFree
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_ToQuotedStringFree(JSContext *ctx, JSValue val) { JSValue r = JS_ToQuotedString(ctx, val); JS_FreeValue(ctx, val); return r; }
O2
c
JS_ToQuotedStringFree: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 callq 0x3de40 movq %rax, %r13 movq %rdx, %r12 cmpl $0x6, %r12d je 0x45d30 movq %rbx, 0x8(%rsp) movl $0x7fffffff, %edx # imm = 0x7FFFFFFF andl 0x4(%r13), %edx addl $0x2, %edx leaq 0x10(%rsp), %rsi movq %r15, %rdi callq 0x31bf2 testl %eax, %eax jne 0x45d0c leaq 0x10(%rsp), %rdi pushq $0x22 popq %rsi callq 0x44fd5 testl %eax, %eax je 0x45d53 movq %r15, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x1bbce leaq 0x10(%rsp), %rdi callq 0x32ab1 pushq $0x6 popq %r12 xorl %r13d, %r13d movq 0x8(%rsp), %rbx movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x1bbce movq %r13, %rax movq %r12, %rdx addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x4(%rsp), %rax andl $0x0, (%rax) xorl %eax, %eax movl 0x4(%r13), %ecx movl $0x7fffffff, %edx # imm = 0x7FFFFFFF andl %edx, %ecx cmpl %ecx, %eax jge 0x45e45 movq %r13, %rdi leaq 0x4(%rsp), %rsi callq 0x455d8 movl %eax, %ebp leal -0x8(%rbp), %eax cmpl $0x5, %eax ja 0x45da0 leaq 0x41246(%rip), %rcx # 0x86fd4 movslq (%rcx,%rax,4), %rax addq %rcx, %rax leaq 0x10(%rsp), %rdx jmpq *%rax pushq $0x62 jmp 0x45e05 cmpl $0x22, %ebp leaq 0x10(%rsp), %rdx je 0x45e08 cmpl $0x5c, %ebp je 0x45e08 cmpl $0x20, %ebp setae %al movl %ebp, %ecx andl $0x1ff800, %ecx # imm = 0x1FF800 cmpl $0xd800, %ecx # imm = 0xD800 setne %cl testb %cl, %al jne 0x45e39 leaq 0x30(%rsp), %rdi pushq $0x10 popq %rsi movq %rdx, %rbx leaq 0x4400a(%rip), %rdx # 0x89de6 movl %ebp, %ecx xorl %eax, %eax callq 0xe310 movq %rbx, %rdi leaq 0x30(%rsp), %rsi pushq $0x6 popq %rdx callq 0x3d8da jmp 0x45e28 pushq $0x74 jmp 0x45e05 pushq $0x6e jmp 0x45e05 pushq $0x66 jmp 0x45e05 pushq $0x72 popq %rax movl %eax, %ebp movq %rdx, %rdi pushq $0x5c popq %rsi movq %rdx, %rbx callq 0x44fd5 testl %eax, %eax jne 0x45d0c movq %rbx, %rdi movl %ebp, %esi callq 0x44fd5 testl %eax, %eax jne 0x45d0c movl 0x4(%rsp), %eax jmp 0x45d5d movq %rdx, %rdi movl %ebp, %esi callq 0x30632 jmp 0x45e28 leaq 0x10(%rsp), %rdi pushq $0x22 popq %rsi callq 0x44fd5 testl %eax, %eax jne 0x45d0c movq %r15, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x1bbce leaq 0x10(%rsp), %rdi callq 0x30684 movq %rax, %r13 movq %rdx, %r12 jmp 0x45d2b
JS_ToQuotedStringFree: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov rbx, rdx mov r14, rsi mov r15, rdi call JS_ToStringCheckObject mov r13, rax mov r12, rdx cmp r12d, 6 jz short loc_45D30 mov [rsp+78h+var_70], rbx mov edx, 7FFFFFFFh and edx, [r13+4] add edx, 2 lea rsi, [rsp+78h+var_68] mov rdi, r15 call string_buffer_init test eax, eax jnz short loc_45D0C lea rdi, [rsp+78h+var_68] push 22h ; '"' pop rsi call string_buffer_putc8 test eax, eax jz short loc_45D53 loc_45D0C: mov rdi, r15 mov rsi, r13 mov rdx, r12 call JS_FreeValue lea rdi, [rsp+78h+var_68] call string_buffer_free push 6 pop r12 xor r13d, r13d loc_45D2B: mov rbx, [rsp+78h+var_70] loc_45D30: mov rdi, r15 mov rsi, r14 mov rdx, rbx call JS_FreeValue mov rax, r13 mov rdx, r12 add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_45D53: lea rax, [rsp+78h+var_74] and dword ptr [rax], 0 xor eax, eax loc_45D5D: mov ecx, [r13+4] mov edx, 7FFFFFFFh and ecx, edx cmp eax, ecx jge loc_45E45 mov rdi, r13 lea rsi, [rsp+78h+var_74] call string_getc mov ebp, eax lea eax, [rbp-8]; switch 6 cases cmp eax, 5 ja short def_45D9A; jumptable 0000000000045D9A default case lea rcx, jpt_45D9A movsxd rax, ds:(jpt_45D9A - 86FD4h)[rcx+rax*4] add rax, rcx lea rdx, [rsp+78h+var_68] jmp rax; switch jump loc_45D9C: push 62h ; 'b'; jumptable 0000000000045D9A case 8 jmp short loc_45E05 def_45D9A: cmp ebp, 22h ; '"'; jumptable 0000000000045D9A default case lea rdx, [rsp+78h+var_68] jz short loc_45E08 cmp ebp, 5Ch ; '\' jz short loc_45E08 loc_45DAF: cmp ebp, 20h ; ' '; jumptable 0000000000045D9A case 11 setnb al mov ecx, ebp and ecx, 1FF800h cmp ecx, 0D800h setnz cl test al, cl jnz short loc_45E39 lea rdi, [rsp+78h+var_48] push 10h pop rsi mov rbx, rdx lea rdx, aU04x; "\\u%04x" mov ecx, ebp xor eax, eax call _snprintf mov rdi, rbx lea rsi, [rsp+78h+var_48] push 6 pop rdx call string_buffer_write8 jmp short loc_45E28 loc_45DF7: push 74h ; 't'; jumptable 0000000000045D9A case 9 jmp short loc_45E05 loc_45DFB: push 6Eh ; 'n'; jumptable 0000000000045D9A case 10 jmp short loc_45E05 loc_45DFF: push 66h ; 'f'; jumptable 0000000000045D9A case 12 jmp short loc_45E05 loc_45E03: push 72h ; 'r'; jumptable 0000000000045D9A case 13 loc_45E05: pop rax mov ebp, eax loc_45E08: mov rdi, rdx push 5Ch ; '\' pop rsi mov rbx, rdx call string_buffer_putc8 test eax, eax jnz loc_45D0C mov rdi, rbx mov esi, ebp call string_buffer_putc8 loc_45E28: test eax, eax jnz loc_45D0C mov eax, [rsp+78h+var_74] jmp loc_45D5D loc_45E39: mov rdi, rdx mov esi, ebp call string_buffer_putc jmp short loc_45E28 loc_45E45: lea rdi, [rsp+78h+var_68] push 22h ; '"' pop rsi call string_buffer_putc8 test eax, eax jnz loc_45D0C mov rdi, r15 mov rsi, r13 mov rdx, r12 call JS_FreeValue lea rdi, [rsp+78h+var_68] call string_buffer_end mov r13, rax mov r12, rdx jmp loc_45D2B
long long JS_ToQuotedStringFree( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // rbx long long v15; // rax long long v16; // r13 long long v17; // rdx 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 long long v25; // r8 long long v26; // r9 __m128 v27; // xmm4 __m128 v28; // xmm5 int v30; // eax long long v31; // rcx long long v32; // rcx unsigned int v33; // ebp long long v34; // r8 long long v35; // r9 __m128 v36; // xmm4 __m128 v37; // xmm5 int v38; // eax long long v39; // rdx long long v40; // rcx long long v41; // r8 long long v42; // r9 __m128 v43; // xmm4 __m128 v44; // xmm5 int v45; // [rsp-8h] [rbp-80h] int v46; // [rsp+4h] [rbp-74h] BYREF long long v47; // [rsp+8h] [rbp-70h] long long v48[4]; // [rsp+10h] [rbp-68h] BYREF _BYTE v49[72]; // [rsp+30h] [rbp-48h] BYREF v14 = a3; v15 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v16 = v15; v18 = v17; if ( (_DWORD)v17 != 6 ) { v47 = v14; if ( (unsigned int)string_buffer_init(a1, (long long)v48, (*(_DWORD *)(v15 + 4) & 0x7FFFFFFFu) + 2) || (unsigned int)string_buffer_putc8((long long)v48, 0x22u, a7, a8, a9, a10, v23, v24, a13, a14, v19, v20, v21, v22) ) { goto LABEL_4; } v46 = 0; v30 = 0; while ( 1 ) { v31 = *(_DWORD *)(v16 + 4) & 0x7FFFFFFF; if ( v30 >= (int)v31 ) break; v33 = string_getc(v16, &v46); switch ( v33 ) { case 8u: v45 = 98; goto LABEL_19; case 9u: v45 = 116; goto LABEL_19; case 0xAu: v45 = 110; goto LABEL_19; case 0xBu: goto LABEL_13; case 0xCu: v45 = 102; goto LABEL_19; case 0xDu: v45 = 114; LABEL_19: v33 = v45; goto LABEL_20; default: if ( v33 == 34 || v33 == 92 ) { LABEL_20: if ( (unsigned int)string_buffer_putc8( (long long)v48, 0x5Cu, a7, a8, a9, a10, v36, v37, a13, a14, (long long)v48, v32, v34, v35) ) goto LABEL_4; v38 = string_buffer_putc8((long long)v48, v33, a7, a8, a9, a10, v43, v44, a13, a14, v39, v40, v41, v42); } else { LABEL_13: if ( (v33 & 0x1FF800) != 55296 && v33 >= 0x20 ) { v38 = string_buffer_putc((long long)v48, v33); } else { snprintf(v49, 16LL, "\\u%04x", v33); v38 = string_buffer_write8((long long)v48, (long long)v49, 6); } } if ( v38 ) goto LABEL_4; v30 = v46; break; } } if ( (unsigned int)string_buffer_putc8( (long long)v48, 0x22u, a7, a8, a9, a10, v27, v28, a13, a14, 0x7FFFFFFFLL, v31, v25, v26) ) { LABEL_4: JS_FreeValue(a1, v16, v18); string_buffer_free(v48); v16 = 0LL; } else { JS_FreeValue(a1, v16, v18); v16 = string_buffer_end(v48); } v14 = v47; } JS_FreeValue(a1, a2, v14); return v16; }
JS_ToQuotedStringFree: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RBX,RDX MOV R14,RSI MOV R15,RDI CALL 0x0013de40 MOV R13,RAX MOV R12,RDX CMP R12D,0x6 JZ 0x00145d30 MOV qword ptr [RSP + 0x8],RBX MOV EDX,0x7fffffff AND EDX,dword ptr [R13 + 0x4] ADD EDX,0x2 LEA RSI,[RSP + 0x10] MOV RDI,R15 CALL 0x00131bf2 TEST EAX,EAX JNZ 0x00145d0c LEA RDI,[RSP + 0x10] PUSH 0x22 POP RSI CALL 0x00144fd5 TEST EAX,EAX JZ 0x00145d53 LAB_00145d0c: MOV RDI,R15 MOV RSI,R13 MOV RDX,R12 CALL 0x0011bbce LEA RDI,[RSP + 0x10] CALL 0x00132ab1 PUSH 0x6 POP R12 XOR R13D,R13D LAB_00145d2b: MOV RBX,qword ptr [RSP + 0x8] LAB_00145d30: MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x0011bbce MOV RAX,R13 MOV RDX,R12 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00145d53: LEA RAX,[RSP + 0x4] AND dword ptr [RAX],0x0 XOR EAX,EAX LAB_00145d5d: MOV ECX,dword ptr [R13 + 0x4] MOV EDX,0x7fffffff AND ECX,EDX CMP EAX,ECX JGE 0x00145e45 MOV RDI,R13 LEA RSI,[RSP + 0x4] CALL 0x001455d8 MOV EBP,EAX LEA EAX,[RBP + -0x8] CMP EAX,0x5 JA 0x00145da0 LEA RCX,[0x186fd4] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX LEA RDX,[RSP + 0x10] switchD: JMP RAX caseD_8: PUSH 0x62 JMP 0x00145e05 default: CMP EBP,0x22 LEA RDX,[RSP + 0x10] JZ 0x00145e08 CMP EBP,0x5c JZ 0x00145e08 caseD_b: CMP EBP,0x20 SETNC AL MOV ECX,EBP AND ECX,0x1ff800 CMP ECX,0xd800 SETNZ CL TEST AL,CL JNZ 0x00145e39 LEA RDI,[RSP + 0x30] PUSH 0x10 POP RSI MOV RBX,RDX LEA RDX,[0x189de6] MOV ECX,EBP XOR EAX,EAX CALL 0x0010e310 MOV RDI,RBX LEA RSI,[RSP + 0x30] PUSH 0x6 POP RDX CALL 0x0013d8da JMP 0x00145e28 caseD_9: PUSH 0x74 JMP 0x00145e05 caseD_a: PUSH 0x6e JMP 0x00145e05 caseD_c: PUSH 0x66 JMP 0x00145e05 caseD_d: PUSH 0x72 LAB_00145e05: POP RAX MOV EBP,EAX LAB_00145e08: MOV RDI,RDX PUSH 0x5c POP RSI MOV RBX,RDX CALL 0x00144fd5 TEST EAX,EAX JNZ 0x00145d0c MOV RDI,RBX MOV ESI,EBP CALL 0x00144fd5 LAB_00145e28: TEST EAX,EAX JNZ 0x00145d0c MOV EAX,dword ptr [RSP + 0x4] JMP 0x00145d5d LAB_00145e39: MOV RDI,RDX MOV ESI,EBP CALL 0x00130632 JMP 0x00145e28 LAB_00145e45: LEA RDI,[RSP + 0x10] PUSH 0x22 POP RSI CALL 0x00144fd5 TEST EAX,EAX JNZ 0x00145d0c MOV RDI,R15 MOV RSI,R13 MOV RDX,R12 CALL 0x0011bbce LEA RDI,[RSP + 0x10] CALL 0x00130684 MOV R13,RAX MOV R12,RDX JMP 0x00145d2b
int1 [16] JS_ToQuotedStringFree(int8 param_1,int8 param_2,int8 param_3) { int iVar1; uint uVar2; long lVar3; int1 auVar4 [16]; int local_74; int8 local_70; int1 local_68 [32]; char local_48 [24]; auVar4 = JS_ToStringCheckObject(); lVar3 = auVar4._0_8_; if (auVar4._8_4_ != 6) { local_70 = param_3; iVar1 = string_buffer_init(param_1,local_68,(*(uint *)(lVar3 + 4) & 0x7fffffff) + 2); if ((iVar1 == 0) && (iVar1 = string_buffer_putc8(local_68,0x22), iVar1 == 0)) { local_74 = 0; do { if ((int)(*(uint *)(lVar3 + 4) & 0x7fffffff) <= local_74) { iVar1 = string_buffer_putc8(local_68,0x22); if (iVar1 == 0) { JS_FreeValue(param_1,lVar3,auVar4._8_8_); auVar4 = string_buffer_end(local_68); param_3 = local_70; goto LAB_00145d30; } break; } uVar2 = string_getc(lVar3,&local_74); switch(uVar2) { case 8: uVar2 = 0x62; break; case 9: uVar2 = 0x74; break; case 10: uVar2 = 0x6e; break; case 0xb: switchD_00145d9a_caseD_b: if (uVar2 < 0x20 || (uVar2 & 0x1ff800) == 0xd800) { snprintf(local_48,0x10,"\\u%04x",(ulong)uVar2); iVar1 = string_buffer_write8(local_68,local_48,6); } else { iVar1 = string_buffer_putc(local_68,uVar2); } goto LAB_00145e28; case 0xc: uVar2 = 0x66; break; case 0xd: uVar2 = 0x72; break; default: if ((uVar2 != 0x22) && (uVar2 != 0x5c)) goto switchD_00145d9a_caseD_b; } iVar1 = string_buffer_putc8(local_68,0x5c); if (iVar1 != 0) break; iVar1 = string_buffer_putc8(local_68,uVar2); LAB_00145e28: } while (iVar1 == 0); } JS_FreeValue(param_1,lVar3,auVar4._8_8_); string_buffer_free(local_68); auVar4 = ZEXT816(6) << 0x40; param_3 = local_70; } LAB_00145d30: JS_FreeValue(param_1,param_2,param_3); return auVar4; }
35,553
intx::subc(unsigned long, unsigned long, bool)
corpus-core[P]colibri-stateless/build_O0/_deps/intx-src/include/intx/intx.hpp
inline constexpr result_with_carry<uint64_t> subc( uint64_t x, uint64_t y, bool carry = false) noexcept { #if __has_builtin(__builtin_subcll) if (!std::is_constant_evaluated()) { unsigned long long carryout = 0; // NOLINT(google-runtime-int) const auto d = __builtin_subcll(x, y, carry, &carryout); static_assert(sizeof(d) == sizeof(uint64_t)); return {d, static_cast<bool>(carryout)}; } #elif __has_builtin(__builtin_ia32_sbb_u64) if (!std::is_constant_evaluated()) { unsigned long long d = 0; // NOLINT(google-runtime-int) static_assert(sizeof(d) == sizeof(uint64_t)); const auto carryout = __builtin_ia32_sbb_u64(carry, x, y, &d); return {d, static_cast<bool>(carryout)}; } #endif const auto d = x - y; const auto carry1 = x < y; const auto e = d - carry; const auto carry2 = d < uint64_t{carry}; return {e, carry1 || carry2}; }
O0
cpp
intx::subc(unsigned long, unsigned long, bool): pushq %rbp movq %rsp, %rbp movb %dl, %al movq %rdi, -0x18(%rbp) movq %rsi, -0x20(%rbp) andb $0x1, %al movb %al, -0x21(%rbp) movq $0x0, -0x30(%rbp) movq -0x18(%rbp), %rax movq -0x20(%rbp), %rcx movzbl -0x21(%rbp), %edx btl $0x0, %edx sbbq %rcx, %rax setb %cl movzbl %cl, %ecx movq %rcx, -0x30(%rbp) movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x30(%rbp), %rax testq %rax, %rax setne -0x8(%rbp) movq -0x10(%rbp), %rax movb -0x8(%rbp), %dl popq %rbp retq nopl (%rax,%rax)
_ZN4intx4subcEmmb: push rbp mov rbp, rsp mov al, dl mov [rbp+var_18], rdi mov [rbp+var_20], rsi and al, 1 mov [rbp+var_21], al mov [rbp+var_30], 0 mov rax, [rbp+var_18] mov rcx, [rbp+var_20] movzx edx, [rbp+var_21] bt edx, 0 sbb rax, rcx setb cl movzx ecx, cl mov [rbp+var_30], rcx mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_10], rax mov rax, [rbp+var_30] test rax, rax setnz [rbp+var_8] mov rax, [rbp+var_10] mov dl, [rbp+var_8] pop rbp retn
long long intx::subc(intx *this, long long a2, char a3) { return (long long)this - ((a3 & 1) != 0) - a2; }
subc: PUSH RBP MOV RBP,RSP MOV AL,DL MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI AND AL,0x1 MOV byte ptr [RBP + -0x21],AL MOV qword ptr [RBP + -0x30],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] MOVZX EDX,byte ptr [RBP + -0x21] BT EDX,0x0 SBB RAX,RCX SETC CL MOVZX ECX,CL MOV qword ptr [RBP + -0x30],RCX MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x30] TEST RAX,RAX SETNZ byte ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x10] MOV DL,byte ptr [RBP + -0x8] POP RBP RET
/* intx::subc(unsigned long, unsigned long, bool) */ int1 [16] intx::subc(ulong param_1,ulong param_2,bool param_3) { int1 auVar1 [16]; auVar1._0_8_ = (param_1 - param_2) - (ulong)param_3; auVar1[8] = param_1 < param_2 || param_1 - param_2 < (ulong)param_3; auVar1._9_7_ = 0; return auVar1; }
35,554
sp_get_geometry_mbr
eloqsql/storage/maria/ma_sp_key.c
static int sp_get_geometry_mbr(uchar *(*wkb), uchar *end, uint n_dims, double *mbr, int top) { int res; uchar byte_order; uint wkb_type; byte_order = *(*wkb); ++(*wkb); wkb_type = uint4korr((*wkb)); (*wkb) += 4; switch ((enum wkbType) wkb_type) { case wkbPoint: res = sp_get_point_mbr(wkb, end, n_dims, byte_order, mbr); break; case wkbLineString: res = sp_get_linestring_mbr(wkb, end, n_dims, byte_order, mbr); break; case wkbPolygon: res = sp_get_polygon_mbr(wkb, end, n_dims, byte_order, mbr); break; case wkbMultiPoint: { uint n_items; n_items = uint4korr((*wkb)); (*wkb) += 4; for (; n_items > 0; --n_items) { byte_order = *(*wkb); ++(*wkb); (*wkb) += 4; if (sp_get_point_mbr(wkb, end, n_dims, byte_order, mbr)) return -1; } res = 0; break; } case wkbMultiLineString: { uint n_items; n_items = uint4korr((*wkb)); (*wkb) += 4; for (; n_items > 0; --n_items) { byte_order = *(*wkb); ++(*wkb); (*wkb) += 4; if (sp_get_linestring_mbr(wkb, end, n_dims, byte_order, mbr)) return -1; } res = 0; break; } case wkbMultiPolygon: { uint n_items; n_items = uint4korr((*wkb)); (*wkb) += 4; for (; n_items > 0; --n_items) { byte_order = *(*wkb); ++(*wkb); (*wkb) += 4; if (sp_get_polygon_mbr(wkb, end, n_dims, byte_order, mbr)) return -1; } res = 0; break; } case wkbGeometryCollection: { uint n_items; if (!top) return -1; n_items = uint4korr((*wkb)); (*wkb) += 4; for (; n_items > 0; --n_items) { if (sp_get_geometry_mbr(wkb, end, n_dims, mbr, 0)) return -1; } res = 0; break; } default: res = -1; } return res; }
O0
c
sp_get_geometry_mbr: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movl %r8d, -0x2c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movb (%rax), %al movb %al, -0x31(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx incq %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x38(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) movl -0x38(%rbp), %eax decl %eax movl %eax, %ecx movq %rcx, -0x50(%rbp) subl $0x6, %eax ja 0x9c697 movq -0x50(%rbp), %rax leaq 0xbcec3(%rip), %rcx # 0x1592e0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx movb -0x31(%rbp), %al movq -0x28(%rbp), %r8 movzbl %al, %ecx callq 0x9c6b0 movl %eax, -0x30(%rbp) jmp 0x9c69e movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx movb -0x31(%rbp), %al movq -0x28(%rbp), %r8 movzbl %al, %ecx callq 0x9c6f0 movl %eax, -0x30(%rbp) jmp 0x9c69e movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx movb -0x31(%rbp), %al movq -0x28(%rbp), %r8 movzbl %al, %ecx callq 0x9c780 movl %eax, -0x30(%rbp) jmp 0x9c69e movq -0x10(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x3c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) cmpl $0x0, -0x3c(%rbp) jbe 0x9c50c movq -0x10(%rbp), %rax movq (%rax), %rax movb (%rax), %al movb %al, -0x31(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x1, %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx movb -0x31(%rbp), %al movq -0x28(%rbp), %r8 movzbl %al, %ecx callq 0x9c6b0 cmpl $0x0, %eax je 0x9c4ff movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x9c6a4 jmp 0x9c501 movl -0x3c(%rbp), %eax addl $-0x1, %eax movl %eax, -0x3c(%rbp) jmp 0x9c4a6 movl $0x0, -0x30(%rbp) jmp 0x9c69e movq -0x10(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x40(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) cmpl $0x0, -0x40(%rbp) jbe 0x9c598 movq -0x10(%rbp), %rax movq (%rax), %rax movb (%rax), %al movb %al, -0x31(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x1, %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx movb -0x31(%rbp), %al movq -0x28(%rbp), %r8 movzbl %al, %ecx callq 0x9c6f0 cmpl $0x0, %eax je 0x9c58b movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x9c6a4 jmp 0x9c58d movl -0x40(%rbp), %eax addl $-0x1, %eax movl %eax, -0x40(%rbp) jmp 0x9c532 movl $0x0, -0x30(%rbp) jmp 0x9c69e movq -0x10(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x44(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) cmpl $0x0, -0x44(%rbp) jbe 0x9c624 movq -0x10(%rbp), %rax movq (%rax), %rax movb (%rax), %al movb %al, -0x31(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x1, %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx movb -0x31(%rbp), %al movq -0x28(%rbp), %r8 movzbl %al, %ecx callq 0x9c780 cmpl $0x0, %eax je 0x9c617 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x9c6a4 jmp 0x9c619 movl -0x44(%rbp), %eax addl $-0x1, %eax movl %eax, -0x44(%rbp) jmp 0x9c5be movl $0x0, -0x30(%rbp) jmp 0x9c69e cmpl $0x0, -0x2c(%rbp) jne 0x9c63c movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x9c6a4 movq -0x10(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x48(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) cmpl $0x0, -0x48(%rbp) jbe 0x9c68e movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx movq -0x28(%rbp), %rcx xorl %r8d, %r8d callq 0x9c3b0 cmpl $0x0, %eax je 0x9c681 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x9c6a4 jmp 0x9c683 movl -0x48(%rbp), %eax addl $-0x1, %eax movl %eax, -0x48(%rbp) jmp 0x9c656 movl $0x0, -0x30(%rbp) jmp 0x9c69e movl $0xffffffff, -0x30(%rbp) # imm = 0xFFFFFFFF movl -0x30(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopl (%rax)
sp_get_geometry_mbr: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], rcx mov [rbp+var_2C], r8d mov rax, [rbp+var_10] mov rax, [rax] mov al, [rax] mov [rbp+var_31], al mov rax, [rbp+var_10] mov rcx, [rax] inc rcx mov [rax], rcx mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax] mov [rbp+var_38], eax mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx mov eax, [rbp+var_38] dec eax; switch 7 cases mov ecx, eax mov [rbp+var_50], rcx sub eax, 6 ja def_9C424; jumptable 000000000009C424 default case mov rax, [rbp+var_50] lea rcx, jpt_9C424 movsxd rax, ds:(jpt_9C424 - 1592E0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_9C426: mov rdi, [rbp+var_10]; jumptable 000000000009C424 case 1 mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] mov al, [rbp+var_31] mov r8, [rbp+var_28] movzx ecx, al call sp_get_point_mbr mov [rbp+var_30], eax jmp loc_9C69E loc_9C448: mov rdi, [rbp+var_10]; jumptable 000000000009C424 case 2 mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] mov al, [rbp+var_31] mov r8, [rbp+var_28] movzx ecx, al call sp_get_linestring_mbr mov [rbp+var_30], eax jmp loc_9C69E loc_9C46A: mov rdi, [rbp+var_10]; jumptable 000000000009C424 case 3 mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] mov al, [rbp+var_31] mov r8, [rbp+var_28] movzx ecx, al call sp_get_polygon_mbr mov [rbp+var_30], eax jmp loc_9C69E loc_9C48C: mov rax, [rbp+var_10]; jumptable 000000000009C424 case 4 mov rax, [rax] mov eax, [rax] mov [rbp+var_3C], eax mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx loc_9C4A6: cmp [rbp+var_3C], 0 jbe short loc_9C50C mov rax, [rbp+var_10] mov rax, [rax] mov al, [rax] mov [rbp+var_31], al mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 1 mov [rax], rcx mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] mov al, [rbp+var_31] mov r8, [rbp+var_28] movzx ecx, al call sp_get_point_mbr cmp eax, 0 jz short loc_9C4FF mov [rbp+var_4], 0FFFFFFFFh jmp loc_9C6A4 loc_9C4FF: jmp short $+2 loc_9C501: mov eax, [rbp+var_3C] add eax, 0FFFFFFFFh mov [rbp+var_3C], eax jmp short loc_9C4A6 loc_9C50C: mov [rbp+var_30], 0 jmp loc_9C69E loc_9C518: mov rax, [rbp+var_10]; jumptable 000000000009C424 case 5 mov rax, [rax] mov eax, [rax] mov [rbp+var_40], eax mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx loc_9C532: cmp [rbp+var_40], 0 jbe short loc_9C598 mov rax, [rbp+var_10] mov rax, [rax] mov al, [rax] mov [rbp+var_31], al mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 1 mov [rax], rcx mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] mov al, [rbp+var_31] mov r8, [rbp+var_28] movzx ecx, al call sp_get_linestring_mbr cmp eax, 0 jz short loc_9C58B mov [rbp+var_4], 0FFFFFFFFh jmp loc_9C6A4 loc_9C58B: jmp short $+2 loc_9C58D: mov eax, [rbp+var_40] add eax, 0FFFFFFFFh mov [rbp+var_40], eax jmp short loc_9C532 loc_9C598: mov [rbp+var_30], 0 jmp loc_9C69E loc_9C5A4: mov rax, [rbp+var_10]; jumptable 000000000009C424 case 6 mov rax, [rax] mov eax, [rax] mov [rbp+var_44], eax mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx loc_9C5BE: cmp [rbp+var_44], 0 jbe short loc_9C624 mov rax, [rbp+var_10] mov rax, [rax] mov al, [rax] mov [rbp+var_31], al mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 1 mov [rax], rcx mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] mov al, [rbp+var_31] mov r8, [rbp+var_28] movzx ecx, al call sp_get_polygon_mbr cmp eax, 0 jz short loc_9C617 mov [rbp+var_4], 0FFFFFFFFh jmp loc_9C6A4 loc_9C617: jmp short $+2 loc_9C619: mov eax, [rbp+var_44] add eax, 0FFFFFFFFh mov [rbp+var_44], eax jmp short loc_9C5BE loc_9C624: mov [rbp+var_30], 0 jmp short loc_9C69E loc_9C62D: cmp [rbp+var_2C], 0; jumptable 000000000009C424 case 7 jnz short loc_9C63C mov [rbp+var_4], 0FFFFFFFFh jmp short loc_9C6A4 loc_9C63C: mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax] mov [rbp+var_48], eax mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx loc_9C656: cmp [rbp+var_48], 0 jbe short loc_9C68E mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] mov rcx, [rbp+var_28] xor r8d, r8d call sp_get_geometry_mbr cmp eax, 0 jz short loc_9C681 mov [rbp+var_4], 0FFFFFFFFh jmp short loc_9C6A4 loc_9C681: jmp short $+2 loc_9C683: mov eax, [rbp+var_48] add eax, 0FFFFFFFFh mov [rbp+var_48], eax jmp short loc_9C656 loc_9C68E: mov [rbp+var_30], 0 jmp short loc_9C69E def_9C424: mov [rbp+var_30], 0FFFFFFFFh; jumptable 000000000009C424 default case loc_9C69E: mov eax, [rbp+var_30] mov [rbp+var_4], eax loc_9C6A4: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long sp_get_geometry_mbr(unsigned __int8 **a1, long long a2, unsigned int a3, long long a4, int a5) { int v6; // [rsp+8h] [rbp-48h] int v7; // [rsp+Ch] [rbp-44h] int v8; // [rsp+10h] [rbp-40h] int v9; // [rsp+14h] [rbp-3Ch] int v10; // [rsp+18h] [rbp-38h] unsigned __int8 v11; // [rsp+1Fh] [rbp-31h] unsigned __int8 v12; // [rsp+1Fh] [rbp-31h] unsigned __int8 v13; // [rsp+1Fh] [rbp-31h] unsigned __int8 v14; // [rsp+1Fh] [rbp-31h] v11 = *(*a1)++; v10 = *(_DWORD *)*a1; *a1 += 4; switch ( v10 ) { case 1: return (unsigned int)sp_get_point_mbr(a1, a2, a3, v11, a4); case 2: return (unsigned int)sp_get_linestring_mbr(a1, a2, a3, v11, a4); case 3: return (unsigned int)sp_get_polygon_mbr(a1, a2, a3, v11, a4); case 4: v9 = *(_DWORD *)*a1; *a1 += 4; while ( 2 ) { if ( !v9 ) return 0; v12 = *(*a1)++; *a1 += 4; if ( !(unsigned int)sp_get_point_mbr(a1, a2, a3, v12, a4) ) { --v9; continue; } return (unsigned int)-1; } case 5: v8 = *(_DWORD *)*a1; *a1 += 4; while ( 2 ) { if ( !v8 ) return 0; v13 = *(*a1)++; *a1 += 4; if ( !(unsigned int)sp_get_linestring_mbr(a1, a2, a3, v13, a4) ) { --v8; continue; } return (unsigned int)-1; } case 6: v7 = *(_DWORD *)*a1; *a1 += 4; while ( 2 ) { if ( !v7 ) return 0; v14 = *(*a1)++; *a1 += 4; if ( !(unsigned int)sp_get_polygon_mbr(a1, a2, a3, v14, a4) ) { --v7; continue; } break; } return (unsigned int)-1; case 7: if ( !a5 ) return (unsigned int)-1; v6 = *(_DWORD *)*a1; *a1 += 4; break; default: return (unsigned int)-1; } while ( v6 ) { if ( (unsigned int)sp_get_geometry_mbr(a1, a2, a3, a4, 0LL) ) return (unsigned int)-1; --v6; } return 0; }
sp_get_geometry_mbr: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],RCX MOV dword ptr [RBP + -0x2c],R8D MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x31],AL MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] INC RCX MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x38],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX MOV EAX,dword ptr [RBP + -0x38] DEC EAX MOV ECX,EAX MOV qword ptr [RBP + -0x50],RCX SUB EAX,0x6 JA 0x0019c697 MOV RAX,qword ptr [RBP + -0x50] LEA RCX,[0x2592e0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] MOV AL,byte ptr [RBP + -0x31] MOV R8,qword ptr [RBP + -0x28] MOVZX ECX,AL CALL 0x0019c6b0 MOV dword ptr [RBP + -0x30],EAX JMP 0x0019c69e caseD_2: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] MOV AL,byte ptr [RBP + -0x31] MOV R8,qword ptr [RBP + -0x28] MOVZX ECX,AL CALL 0x0019c6f0 MOV dword ptr [RBP + -0x30],EAX JMP 0x0019c69e caseD_3: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] MOV AL,byte ptr [RBP + -0x31] MOV R8,qword ptr [RBP + -0x28] MOVZX ECX,AL CALL 0x0019c780 MOV dword ptr [RBP + -0x30],EAX JMP 0x0019c69e caseD_4: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX LAB_0019c4a6: CMP dword ptr [RBP + -0x3c],0x0 JBE 0x0019c50c MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x31],AL MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x1 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] MOV AL,byte ptr [RBP + -0x31] MOV R8,qword ptr [RBP + -0x28] MOVZX ECX,AL CALL 0x0019c6b0 CMP EAX,0x0 JZ 0x0019c4ff MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0019c6a4 LAB_0019c4ff: JMP 0x0019c501 LAB_0019c501: MOV EAX,dword ptr [RBP + -0x3c] ADD EAX,-0x1 MOV dword ptr [RBP + -0x3c],EAX JMP 0x0019c4a6 LAB_0019c50c: MOV dword ptr [RBP + -0x30],0x0 JMP 0x0019c69e caseD_5: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x40],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX LAB_0019c532: CMP dword ptr [RBP + -0x40],0x0 JBE 0x0019c598 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x31],AL MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x1 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] MOV AL,byte ptr [RBP + -0x31] MOV R8,qword ptr [RBP + -0x28] MOVZX ECX,AL CALL 0x0019c6f0 CMP EAX,0x0 JZ 0x0019c58b MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0019c6a4 LAB_0019c58b: JMP 0x0019c58d LAB_0019c58d: MOV EAX,dword ptr [RBP + -0x40] ADD EAX,-0x1 MOV dword ptr [RBP + -0x40],EAX JMP 0x0019c532 LAB_0019c598: MOV dword ptr [RBP + -0x30],0x0 JMP 0x0019c69e caseD_6: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX LAB_0019c5be: CMP dword ptr [RBP + -0x44],0x0 JBE 0x0019c624 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x31],AL MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x1 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] MOV AL,byte ptr [RBP + -0x31] MOV R8,qword ptr [RBP + -0x28] MOVZX ECX,AL CALL 0x0019c780 CMP EAX,0x0 JZ 0x0019c617 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0019c6a4 LAB_0019c617: JMP 0x0019c619 LAB_0019c619: MOV EAX,dword ptr [RBP + -0x44] ADD EAX,-0x1 MOV dword ptr [RBP + -0x44],EAX JMP 0x0019c5be LAB_0019c624: MOV dword ptr [RBP + -0x30],0x0 JMP 0x0019c69e caseD_7: CMP dword ptr [RBP + -0x2c],0x0 JNZ 0x0019c63c MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0019c6a4 LAB_0019c63c: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x48],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX LAB_0019c656: CMP dword ptr [RBP + -0x48],0x0 JBE 0x0019c68e MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] MOV RCX,qword ptr [RBP + -0x28] XOR R8D,R8D CALL 0x0019c3b0 CMP EAX,0x0 JZ 0x0019c681 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0019c6a4 LAB_0019c681: JMP 0x0019c683 LAB_0019c683: MOV EAX,dword ptr [RBP + -0x48] ADD EAX,-0x1 MOV dword ptr [RBP + -0x48],EAX JMP 0x0019c656 LAB_0019c68e: MOV dword ptr [RBP + -0x30],0x0 JMP 0x0019c69e default: MOV dword ptr [RBP + -0x30],0xffffffff LAB_0019c69e: MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x4],EAX LAB_0019c6a4: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 sp_get_geometry_mbr(long *param_1,int8 param_2,int4 param_3,int8 param_4, int param_5) { int1 uVar1; int4 uVar2; int iVar3; int local_50; int local_4c; int local_48; int local_44; int4 local_38; uVar1 = *(int1 *)*param_1; *param_1 = *param_1 + 1; uVar2 = *(int4 *)*param_1; *param_1 = *param_1 + 4; switch(uVar2) { case 1: local_38 = sp_get_point_mbr(param_1,param_2,param_3,uVar1,param_4); break; case 2: local_38 = sp_get_linestring_mbr(param_1,param_2,param_3,uVar1,param_4); break; case 3: local_38 = sp_get_polygon_mbr(param_1,param_2,param_3,uVar1,param_4); break; case 4: local_44 = *(int *)*param_1; *param_1 = *param_1 + 4; for (; local_44 != 0; local_44 = local_44 + -1) { uVar1 = *(int1 *)*param_1; *param_1 = *param_1 + 1; *param_1 = *param_1 + 4; iVar3 = sp_get_point_mbr(param_1,param_2,param_3,uVar1,param_4); if (iVar3 != 0) { return 0xffffffff; } } local_38 = 0; break; case 5: local_48 = *(int *)*param_1; *param_1 = *param_1 + 4; for (; local_48 != 0; local_48 = local_48 + -1) { uVar1 = *(int1 *)*param_1; *param_1 = *param_1 + 1; *param_1 = *param_1 + 4; iVar3 = sp_get_linestring_mbr(param_1,param_2,param_3,uVar1,param_4); if (iVar3 != 0) { return 0xffffffff; } } local_38 = 0; break; case 6: local_4c = *(int *)*param_1; *param_1 = *param_1 + 4; for (; local_4c != 0; local_4c = local_4c + -1) { uVar1 = *(int1 *)*param_1; *param_1 = *param_1 + 1; *param_1 = *param_1 + 4; iVar3 = sp_get_polygon_mbr(param_1,param_2,param_3,uVar1,param_4); if (iVar3 != 0) { return 0xffffffff; } } local_38 = 0; break; case 7: if (param_5 == 0) { return 0xffffffff; } local_50 = *(int *)*param_1; *param_1 = *param_1 + 4; for (; local_50 != 0; local_50 = local_50 + -1) { iVar3 = sp_get_geometry_mbr(param_1,param_2,param_3,param_4,0); if (iVar3 != 0) { return 0xffffffff; } } local_38 = 0; break; default: local_38 = 0xffffffff; } return local_38; }
35,555
mcp::event_dispatcher::send_event(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
hkr04[P]cpp-mcp/include/mcp_server.h
bool send_event(const std::string& message) { if (closed_.load(std::memory_order_acquire) || message.empty()) { return false; } try { std::lock_guard<std::mutex> lk(m_); if (closed_.load(std::memory_order_acquire)) { return false; } // Efficiently set the message and allocate space as needed if (message.size() > message_.capacity()) { message_.reserve(message.size() + 64); // Pre-allocate extra space to avoid frequent reallocations } message_ = message; cid_.store(id_.fetch_add(1, std::memory_order_relaxed), std::memory_order_relaxed); cv_.notify_one(); // Notify waiting threads return true; } catch (...) { return false; } }
O0
c
mcp::event_dispatcher::send_event(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0xa8, %rsp movq %rdi, 0x68(%rsp) movq %rsi, 0x60(%rsp) movq 0x68(%rsp), %rdi movq %rdi, 0x40(%rsp) addq $0x80, %rdi movl $0x2, %esi callq 0xa5300 testb $0x1, %al jne 0x96a90 movq 0x60(%rsp), %rdi callq 0xcd10 testb $0x1, %al jne 0x96a90 jmp 0x96a9a movb $0x0, 0x77(%rsp) jmp 0x96d3b movq 0x40(%rsp), %rsi leaq 0x58(%rsp), %rdi callq 0x12370 jmp 0x96aab movq 0x40(%rsp), %rdi addq $0x80, %rdi movl $0x2, %esi callq 0xa5300 testb $0x1, %al jne 0x96ac7 jmp 0x96ae9 movb $0x0, 0x77(%rsp) movl $0x1, 0x48(%rsp) jmp 0x96d31 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) jmp 0x96b58 movq 0x60(%rsp), %rdi callq 0xc610 movq 0x40(%rsp), %rdi movq %rax, 0x38(%rsp) addq $0x60, %rdi callq 0xc050 movq %rax, %rcx movq 0x38(%rsp), %rax cmpq %rcx, %rax jbe 0x96b79 movq 0x40(%rsp), %rax addq $0x60, %rax movq %rax, 0x30(%rsp) movq 0x60(%rsp), %rdi callq 0xc610 movq 0x30(%rsp), %rdi movq %rax, %rsi addq $0x40, %rsi callq 0xcc80 jmp 0x96b3e jmp 0x96b79 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) leaq 0x58(%rsp), %rdi callq 0x12420 movq 0x50(%rsp), %rdi callq 0xc300 movb $0x0, 0x77(%rsp) movl $0x1, 0x48(%rsp) callq 0xcce0 jmp 0x96d3b movq 0x40(%rsp), %rdi movq 0x60(%rsp), %rsi addq $0x60, %rdi callq 0xc070 jmp 0x96b8e movq 0x40(%rsp), %rax movq %rax, %rcx addq $0x5c, %rcx movq %rcx, 0x18(%rsp) addq $0x58, %rax movq %rax, 0xa0(%rsp) movl $0x1, 0x9c(%rsp) movl $0x0, 0x98(%rsp) movq 0xa0(%rsp), %rax movq %rax, 0x20(%rsp) movl 0x98(%rsp), %eax movl 0x9c(%rsp), %ecx movl %ecx, 0x94(%rsp) decl %eax movl %eax, %ecx movq %rcx, 0x28(%rsp) subl $0x4, %eax ja 0x96c06 movq 0x28(%rsp), %rax leaq 0x50957(%rip), %rcx # 0xe7554 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x20(%rsp), %rcx movl 0x94(%rsp), %eax lock xaddl %eax, (%rcx) movl %eax, 0x90(%rsp) jmp 0x96c81 movq 0x20(%rsp), %rcx movl 0x94(%rsp), %eax lock xaddl %eax, (%rcx) movl %eax, 0x90(%rsp) jmp 0x96c81 movq 0x20(%rsp), %rcx movl 0x94(%rsp), %eax lock xaddl %eax, (%rcx) movl %eax, 0x90(%rsp) jmp 0x96c81 movq 0x20(%rsp), %rcx movl 0x94(%rsp), %eax lock xaddl %eax, (%rcx) movl %eax, 0x90(%rsp) jmp 0x96c81 movq 0x20(%rsp), %rcx movl 0x94(%rsp), %eax lock xaddl %eax, (%rcx) movl %eax, 0x90(%rsp) movq 0x18(%rsp), %rcx movl 0x90(%rsp), %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) movl $0x0, 0x80(%rsp) movq 0x88(%rsp), %rax movq %rax, 0x8(%rsp) movl 0x80(%rsp), %edi movl $0xffff, %esi # imm = 0xFFFF callq 0x18c50 movl %eax, 0x7c(%rsp) movl 0x80(%rsp), %eax movl %eax, 0x14(%rsp) movl 0x84(%rsp), %ecx movl %ecx, 0x78(%rsp) subl $0x3, %eax je 0x96cfe jmp 0x96ce6 movl 0x14(%rsp), %eax subl $0x5, %eax je 0x96d0b jmp 0x96cf1 movq 0x8(%rsp), %rax movl 0x78(%rsp), %ecx movl %ecx, (%rax) jmp 0x96d16 movq 0x8(%rsp), %rax movl 0x78(%rsp), %ecx movl %ecx, (%rax) jmp 0x96d16 movq 0x8(%rsp), %rcx movl 0x78(%rsp), %eax xchgl %eax, (%rcx) movq 0x40(%rsp), %rdi addq $0x28, %rdi callq 0xc450 movb $0x1, 0x77(%rsp) movl $0x1, 0x48(%rsp) leaq 0x58(%rsp), %rdi callq 0x12420 movb 0x77(%rsp), %al andb $0x1, %al addq $0xa8, %rsp retq nopl (%rax)
_ZN3mcp16event_dispatcher10send_eventERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 0A8h mov [rsp+0A8h+var_40], rdi mov [rsp+0A8h+var_48], rsi mov rdi, [rsp+0A8h+var_40] mov [rsp+0A8h+var_68], rdi add rdi, 80h mov esi, 2 call _ZNKSt6atomicIbE4loadESt12memory_order; std::atomic<bool>::load(std::memory_order) test al, 1 jnz short loc_96A90 mov rdi, [rsp+0A8h+var_48] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_96A90 jmp short loc_96A9A loc_96A90: mov [rsp+0A8h+var_31], 0 jmp loc_96D3B loc_96A9A: mov rsi, [rsp+0A8h+var_68] lea rdi, [rsp+0A8h+var_50] call _ZNSt10lock_guardISt5mutexEC2ERS0_; std::lock_guard<std::mutex>::lock_guard(std::mutex&) jmp short $+2 loc_96AAB: mov rdi, [rsp+0A8h+var_68] add rdi, 80h mov esi, 2 call _ZNKSt6atomicIbE4loadESt12memory_order; std::atomic<bool>::load(std::memory_order) test al, 1 jnz short loc_96AC7 jmp short loc_96AE9 loc_96AC7: mov [rsp+0A8h+var_31], 0 mov [rsp+0A8h+var_60], 1 jmp loc_96D31 mov rcx, rax mov eax, edx mov [rsp+0A8h+var_58], rcx mov [rsp+0A8h+var_5C], eax jmp short loc_96B58 loc_96AE9: mov rdi, [rsp+0A8h+var_48] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) mov rdi, [rsp+0A8h+var_68] mov [rsp+0A8h+var_70], rax add rdi, 60h ; '`' call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8capacityEv; std::string::capacity(void) mov rcx, rax mov rax, [rsp+0A8h+var_70] cmp rax, rcx jbe short loc_96B79 mov rax, [rsp+0A8h+var_68] add rax, 60h ; '`' mov [rsp+0A8h+var_78], rax mov rdi, [rsp+0A8h+var_48] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) mov rdi, [rsp+0A8h+var_78] mov rsi, rax add rsi, 40h ; '@' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) jmp short $+2 loc_96B3E: jmp short loc_96B79 mov rcx, rax mov eax, edx mov [rsp+0A8h+var_58], rcx mov [rsp+0A8h+var_5C], eax lea rdi, [rsp+0A8h+var_50] call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard() loc_96B58: mov rdi, [rsp+0A8h+var_58]; void * call ___cxa_begin_catch mov [rsp+0A8h+var_31], 0 mov [rsp+0A8h+var_60], 1 call ___cxa_end_catch jmp loc_96D3B loc_96B79: mov rdi, [rsp+0A8h+var_68] mov rsi, [rsp+0A8h+var_48] add rdi, 60h ; '`' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&) jmp short $+2 loc_96B8E: mov rax, [rsp+0A8h+var_68] mov rcx, rax add rcx, 5Ch ; '\' mov [rsp+0A8h+var_90], rcx add rax, 58h ; 'X' mov [rsp+0A8h+var_8], rax mov [rsp+0A8h+var_C], 1 mov [rsp+0A8h+var_10], 0 mov rax, [rsp+0A8h+var_8] mov [rsp+0A8h+var_88], rax mov eax, [rsp+0A8h+var_10] mov ecx, [rsp+0A8h+var_C] mov [rsp+0A8h+var_14], ecx dec eax; switch 5 cases mov ecx, eax mov [rsp+0A8h+var_80], rcx sub eax, 4 ja short def_96C04; jumptable 0000000000096C04 default case mov rax, [rsp+0A8h+var_80] lea rcx, jpt_96C04 movsxd rax, ds:(jpt_96C04 - 0E7554h)[rcx+rax*4] add rax, rcx jmp rax; switch jump def_96C04: mov rcx, [rsp+0A8h+var_88]; jumptable 0000000000096C04 default case mov eax, [rsp+0A8h+var_14] lock xadd [rcx], eax mov [rsp+0A8h+var_18], eax jmp short loc_96C81 loc_96C1F: mov rcx, [rsp+0A8h+var_88]; jumptable 0000000000096C04 cases 1,2 mov eax, [rsp+0A8h+var_14] lock xadd [rcx], eax mov [rsp+0A8h+var_18], eax jmp short loc_96C81 loc_96C38: mov rcx, [rsp+0A8h+var_88]; jumptable 0000000000096C04 case 3 mov eax, [rsp+0A8h+var_14] lock xadd [rcx], eax mov [rsp+0A8h+var_18], eax jmp short loc_96C81 loc_96C51: mov rcx, [rsp+0A8h+var_88]; jumptable 0000000000096C04 case 4 mov eax, [rsp+0A8h+var_14] lock xadd [rcx], eax mov [rsp+0A8h+var_18], eax jmp short loc_96C81 loc_96C6A: mov rcx, [rsp+0A8h+var_88]; jumptable 0000000000096C04 case 5 mov eax, [rsp+0A8h+var_14] lock xadd [rcx], eax mov [rsp+0A8h+var_18], eax loc_96C81: mov rcx, [rsp+0A8h+var_90] mov eax, [rsp+0A8h+var_18] mov [rsp+0A8h+var_20], rcx mov [rsp+0A8h+var_24], eax mov [rsp+0A8h+var_28], 0 mov rax, [rsp+0A8h+var_20] mov [rsp+0A8h+var_A0], rax mov edi, [rsp+0A8h+var_28] mov esi, 0FFFFh call _ZStanSt12memory_orderSt23__memory_order_modifier; std::operator&(std::memory_order,std::__memory_order_modifier) mov [rsp+0A8h+var_2C], eax mov eax, [rsp+0A8h+var_28] mov [rsp+0A8h+var_94], eax mov ecx, [rsp+0A8h+var_24] mov [rsp+0A8h+var_30], ecx sub eax, 3 jz short loc_96CFE jmp short $+2 loc_96CE6: mov eax, [rsp+0A8h+var_94] sub eax, 5 jz short loc_96D0B jmp short $+2 loc_96CF1: mov rax, [rsp+0A8h+var_A0] mov ecx, [rsp+0A8h+var_30] mov [rax], ecx jmp short loc_96D16 loc_96CFE: mov rax, [rsp+0A8h+var_A0] mov ecx, [rsp+0A8h+var_30] mov [rax], ecx jmp short loc_96D16 loc_96D0B: mov rcx, [rsp+0A8h+var_A0] mov eax, [rsp+0A8h+var_30] xchg eax, [rcx] loc_96D16: mov rdi, [rsp+0A8h+var_68] add rdi, 28h ; '('; this call __ZNSt18condition_variable10notify_oneEv; std::condition_variable::notify_one(void) mov [rsp+0A8h+var_31], 1 mov [rsp+0A8h+var_60], 1 loc_96D31: lea rdi, [rsp+0A8h+var_50] call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard() loc_96D3B: mov al, [rsp+0A8h+var_31] and al, 1 add rsp, 0A8h retn
char mcp::event_dispatcher::send_event(volatile signed __int32 *a1, long long a2) { long long v2; // rsi volatile __int32 *v4; // [rsp+8h] [rbp-A0h] unsigned long long v5; // [rsp+38h] [rbp-70h] std::mutex *v6; // [rsp+58h] [rbp-50h] BYREF long long v7; // [rsp+60h] [rbp-48h] volatile signed __int32 *v8; // [rsp+68h] [rbp-40h] char v9; // [rsp+77h] [rbp-31h] __int32 v10; // [rsp+78h] [rbp-30h] int v11; // [rsp+7Ch] [rbp-2Ch] int v12; // [rsp+80h] [rbp-28h] __int32 v13; // [rsp+84h] [rbp-24h] volatile signed __int32 *v14; // [rsp+88h] [rbp-20h] signed __int32 v15; // [rsp+90h] [rbp-18h] int v16; // [rsp+94h] [rbp-14h] int v17; // [rsp+98h] [rbp-10h] int v18; // [rsp+9Ch] [rbp-Ch] volatile signed __int32 *v19; // [rsp+A0h] [rbp-8h] v8 = a1; v7 = a2; if ( (std::atomic<bool>::load(a1 + 32, 2LL) & 1) != 0 || (std::string::empty(v7) & 1) != 0 ) { v9 = 0; } else { std::lock_guard<std::mutex>::lock_guard(&v6, (std::mutex *)a1); if ( (std::atomic<bool>::load(a1 + 32, 2LL) & 1) != 0 ) { v9 = 0; } else { v5 = std::string::size(v7); if ( v5 > std::string::capacity(a1 + 24) ) { v2 = std::string::size(v7) + 64; std::string::reserve(a1 + 24, v2); } std::string::operator=(a1 + 24, v7); v19 = a1 + 22; v18 = 1; v17 = 0; v16 = 1; v15 = _InterlockedExchangeAdd(a1 + 22, 1u); v14 = a1 + 23; v13 = v15; v12 = 0; v4 = a1 + 23; v11 = std::operator&(0, 0xFFFF); v10 = v13; if ( v12 == 3 ) { *v4 = v10; } else if ( v12 == 5 ) { _InterlockedExchange(v4, v10); } else { *v4 = v10; } std::condition_variable::notify_one((std::condition_variable *)(a1 + 10)); v9 = 1; } std::lock_guard<std::mutex>::~lock_guard(&v6); } return v9 & 1; }
send_event: SUB RSP,0xa8 MOV qword ptr [RSP + 0x68],RDI MOV qword ptr [RSP + 0x60],RSI MOV RDI,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x40],RDI ADD RDI,0x80 MOV ESI,0x2 CALL 0x001a5300 TEST AL,0x1 JNZ 0x00196a90 MOV RDI,qword ptr [RSP + 0x60] CALL 0x0010cd10 TEST AL,0x1 JNZ 0x00196a90 JMP 0x00196a9a LAB_00196a90: MOV byte ptr [RSP + 0x77],0x0 JMP 0x00196d3b LAB_00196a9a: MOV RSI,qword ptr [RSP + 0x40] LEA RDI,[RSP + 0x58] CALL 0x00112370 JMP 0x00196aab LAB_00196aab: MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0x80 MOV ESI,0x2 CALL 0x001a5300 TEST AL,0x1 JNZ 0x00196ac7 JMP 0x00196ae9 LAB_00196ac7: MOV byte ptr [RSP + 0x77],0x0 MOV dword ptr [RSP + 0x48],0x1 JMP 0x00196d31 LAB_00196ae9: MOV RDI,qword ptr [RSP + 0x60] CALL 0x0010c610 MOV RDI,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x38],RAX ADD RDI,0x60 CALL 0x0010c050 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x38] CMP RAX,RCX JBE 0x00196b79 MOV RAX,qword ptr [RSP + 0x40] ADD RAX,0x60 MOV qword ptr [RSP + 0x30],RAX MOV RDI,qword ptr [RSP + 0x60] CALL 0x0010c610 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,RAX ADD RSI,0x40 LAB_00196b37: CALL 0x0010cc80 LAB_00196b3c: JMP 0x00196b3e LAB_00196b3e: JMP 0x00196b79 LAB_00196b79: MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x60] ADD RDI,0x60 LAB_00196b87: CALL 0x0010c070 JMP 0x00196b8e LAB_00196b8e: MOV RAX,qword ptr [RSP + 0x40] MOV RCX,RAX ADD RCX,0x5c MOV qword ptr [RSP + 0x18],RCX ADD RAX,0x58 MOV qword ptr [RSP + 0xa0],RAX MOV dword ptr [RSP + 0x9c],0x1 MOV dword ptr [RSP + 0x98],0x0 MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x20],RAX MOV EAX,dword ptr [RSP + 0x98] MOV ECX,dword ptr [RSP + 0x9c] MOV dword ptr [RSP + 0x94],ECX DEC EAX MOV ECX,EAX MOV qword ptr [RSP + 0x28],RCX SUB EAX,0x4 JA 0x00196c06 MOV RAX,qword ptr [RSP + 0x28] LEA RCX,[0x1e7554] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX JMP RAX LAB_00196c06: MOV RCX,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RSP + 0x94] XADD.LOCK dword ptr [RCX],EAX MOV dword ptr [RSP + 0x90],EAX JMP 0x00196c81 LAB_00196c81: MOV RCX,qword ptr [RSP + 0x18] MOV EAX,dword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x88],RCX MOV dword ptr [RSP + 0x84],EAX MOV dword ptr [RSP + 0x80],0x0 MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x8],RAX MOV EDI,dword ptr [RSP + 0x80] MOV ESI,0xffff CALL 0x00118c50 MOV dword ptr [RSP + 0x7c],EAX MOV EAX,dword ptr [RSP + 0x80] MOV dword ptr [RSP + 0x14],EAX MOV ECX,dword ptr [RSP + 0x84] MOV dword ptr [RSP + 0x78],ECX SUB EAX,0x3 JZ 0x00196cfe JMP 0x00196ce6 LAB_00196ce6: MOV EAX,dword ptr [RSP + 0x14] SUB EAX,0x5 JZ 0x00196d0b JMP 0x00196cf1 LAB_00196cf1: MOV RAX,qword ptr [RSP + 0x8] MOV ECX,dword ptr [RSP + 0x78] MOV dword ptr [RAX],ECX JMP 0x00196d16 LAB_00196cfe: MOV RAX,qword ptr [RSP + 0x8] MOV ECX,dword ptr [RSP + 0x78] MOV dword ptr [RAX],ECX JMP 0x00196d16 LAB_00196d0b: MOV RCX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSP + 0x78] XCHG dword ptr [RCX],EAX LAB_00196d16: MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0x28 CALL 0x0010c450 MOV byte ptr [RSP + 0x77],0x1 MOV dword ptr [RSP + 0x48],0x1 LAB_00196d31: LEA RDI,[RSP + 0x58] CALL 0x00112420 LAB_00196d3b: MOV AL,byte ptr [RSP + 0x77] AND AL,0x1 ADD RSP,0xa8 RET
/* WARNING: Removing unreachable block (ram,0x00196bf1) */ /* mcp::event_dispatcher::send_event(std::__cxx11::string const&) */ ulong __thiscall mcp::event_dispatcher::send_event(event_dispatcher *this,string *param_1) { ulong uVar1; ulong uVar2; event_dispatcher *peVar3; lock_guard<std::mutex> local_50 [8]; string *local_48; event_dispatcher *local_40; int1 local_31; int local_30; int4 local_2c; int local_28; int local_24; event_dispatcher *local_20; int local_18; int4 local_14; int4 local_10; int4 local_c; event_dispatcher *local_8; local_48 = param_1; local_40 = this; uVar1 = std::atomic<bool>::load((atomic<bool> *)(this + 0x80),2); if (((uVar1 & 1) == 0) && (uVar1 = std::__cxx11::string::empty(), (uVar1 & 1) == 0)) { /* try { // try from 00196a9a to 00196aa8 has its CatchHandler @ 00196ad9 */ std::lock_guard<std::mutex>::lock_guard(local_50,(mutex *)this); uVar1 = std::atomic<bool>::load((atomic<bool> *)(this + 0x80),2); if ((uVar1 & 1) == 0) { uVar1 = std::__cxx11::string::size(); uVar2 = std::__cxx11::string::capacity(); if (uVar2 < uVar1) { std::__cxx11::string::size(); /* try { // try from 00196b37 to 00196b3b has its CatchHandler @ 00196b40 */ std::__cxx11::string::reserve((ulong)(this + 0x60)); } /* try { // try from 00196b87 to 00196b8b has its CatchHandler @ 00196b40 */ std::__cxx11::string::operator=((string *)(this + 0x60),local_48); peVar3 = this + 0x5c; local_8 = this + 0x58; local_c = 1; local_10 = 0; local_14 = 1; LOCK(); local_24 = *(int *)local_8; *(int *)local_8 = *(int *)local_8 + 1; UNLOCK(); local_28 = 0; local_20 = peVar3; local_18 = local_24; local_2c = std::operator&(0,0xffff); local_30 = local_24; if (local_28 == 3) { *(int *)peVar3 = local_24; } else if (local_28 == 5) { LOCK(); *(int *)peVar3 = local_24; UNLOCK(); } else { *(int *)peVar3 = local_24; } std::condition_variable::notify_one(); local_31 = 1; } else { local_31 = 0; } uVar1 = std::lock_guard<std::mutex>::~lock_guard(local_50); } else { local_31 = 0; } return CONCAT71((int7)(uVar1 >> 8),local_31) & 0xffffffffffffff01; }
35,556
my_hash_free_elements
eloqsql/mysys/hash.c
static inline void my_hash_free_elements(HASH *hash) { uint records= hash->records; if (records == 0) return; /* Set records to 0 early to guard against anyone looking at the structure during the free process */ hash->records= 0; if (hash->free) { HASH_LINK *data=dynamic_element(&hash->array,0,HASH_LINK*); HASH_LINK *end= data + records; do { (*hash->free)((data++)->data); } while (data < end); } }
O0
c
my_hash_free_elements: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq 0x18(%rax), %rax movl %eax, -0xc(%rbp) cmpl $0x0, -0xc(%rbp) jne 0x74e9f jmp 0x74efd movq -0x8(%rbp), %rax movq $0x0, 0x18(%rax) movq -0x8(%rbp), %rax cmpq $0x0, 0x60(%rax) je 0x74efd movq -0x8(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movl -0xc(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rax movq 0x60(%rax), %rax movq -0x18(%rbp), %rcx movq %rcx, %rdx addq $0x10, %rdx movq %rdx, -0x18(%rbp) movq 0x8(%rcx), %rdi callq *%rax movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jb 0x74ed4 jmp 0x74efd addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_hash_free_elements: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax+18h] mov [rbp+var_C], eax cmp [rbp+var_C], 0 jnz short loc_74E9F jmp short loc_74EFD loc_74E9F: mov rax, [rbp+var_8] mov qword ptr [rax+18h], 0 mov rax, [rbp+var_8] cmp qword ptr [rax+60h], 0 jz short loc_74EFD mov rax, [rbp+var_8] mov rax, [rax+28h] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov ecx, [rbp+var_C] shl rcx, 4 add rax, rcx mov [rbp+var_20], rax loc_74ED4: mov rax, [rbp+var_8] mov rax, [rax+60h] mov rcx, [rbp+var_18] mov rdx, rcx add rdx, 10h mov [rbp+var_18], rdx mov rdi, [rcx+8] call rax mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jb short loc_74ED4 jmp short $+2 loc_74EFD: add rsp, 20h pop rbp retn
unsigned long long my_hash_free_elements(unsigned long long a1) { unsigned long long result; // rax unsigned long long v2; // rcx unsigned long long v3; // [rsp+0h] [rbp-20h] unsigned long long v4; // [rsp+8h] [rbp-18h] unsigned int v5; // [rsp+14h] [rbp-Ch] result = *(_QWORD *)(a1 + 24); v5 = result; if ( (_DWORD)result ) { *(_QWORD *)(a1 + 24) = 0LL; result = a1; if ( *(_QWORD *)(a1 + 96) ) { v4 = *(_QWORD *)(a1 + 40); v3 = 16LL * v5 + v4; do { v2 = v4; v4 += 16LL; (*(void ( **)(_QWORD))(a1 + 96))(*(_QWORD *)(v2 + 8)); result = v4; } while ( v4 < v3 ); } } return result; }
my_hash_free_elements: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] MOV dword ptr [RBP + -0xc],EAX CMP dword ptr [RBP + -0xc],0x0 JNZ 0x00174e9f JMP 0x00174efd LAB_00174e9f: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x18],0x0 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x60],0x0 JZ 0x00174efd MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0xc] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX LAB_00174ed4: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x60] MOV RCX,qword ptr [RBP + -0x18] MOV RDX,RCX ADD RDX,0x10 MOV qword ptr [RBP + -0x18],RDX MOV RDI,qword ptr [RCX + 0x8] CALL RAX MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JC 0x00174ed4 JMP 0x00174efd LAB_00174efd: ADD RSP,0x20 POP RBP RET
void my_hash_free_elements(long param_1) { ulong uVar1; ulong uVar2; ulong uVar3; ulong local_20; uVar1 = *(ulong *)(param_1 + 0x18); if (((int)uVar1 != 0) && (*(int8 *)(param_1 + 0x18) = 0, *(long *)(param_1 + 0x60) != 0)) { uVar2 = *(ulong *)(param_1 + 0x28); local_20 = uVar2; do { uVar3 = local_20 + 0x10; (**(code **)(param_1 + 0x60))(*(int8 *)(local_20 + 8)); local_20 = uVar3; } while (uVar3 < uVar2 + (uVar1 & 0xffffffff) * 0x10); } return; }
35,557
my_coll_parser_init
eloqsql/strings/ctype-uca.c
static void my_coll_parser_init(MY_COLL_RULE_PARSER *p, MY_COLL_RULES *rules, const char *str, const char *str_end) { /* Initialize parser to the input buffer and scan two tokens, to make the current token and the next token known. */ memset(p, 0, sizeof(*p)); p->rules= rules; p->errstr[0]= '\0'; my_coll_lexem_init(my_coll_parser_curr(p), str, str_end); my_coll_lexem_next(my_coll_parser_curr(p)); my_coll_parser_next(p)[0]= my_coll_parser_curr(p)[0]; my_coll_lexem_next(my_coll_parser_next(p)); }
O0
c
my_coll_parser_init: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x8(%rbp), %rdi xorl %esi, %esi movl $0x178, %edx # imm = 0x178 callq 0x24180 movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xf0(%rax) movq -0x8(%rbp), %rax movb $0x0, 0xf8(%rax) movq -0x8(%rbp), %rdi callq 0x54cd0 movq %rax, %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x54ce0 movq -0x8(%rbp), %rdi callq 0x54cd0 movq %rax, %rdi callq 0x54d30 movq -0x8(%rbp), %rdi callq 0x55120 movq %rax, -0x28(%rbp) movq -0x8(%rbp), %rdi callq 0x54cd0 movq -0x28(%rbp), %rdi movq %rax, %rsi movl $0x28, %edx callq 0x24200 movq -0x8(%rbp), %rdi callq 0x55120 movq %rax, %rdi callq 0x54d30 addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
my_coll_parser_init: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rdi, [rbp+var_8] xor esi, esi mov edx, 178h call _memset mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax+0F0h], rcx mov rax, [rbp+var_8] mov byte ptr [rax+0F8h], 0 mov rdi, [rbp+var_8] call my_coll_parser_curr mov rdi, rax mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call my_coll_lexem_init mov rdi, [rbp+var_8] call my_coll_parser_curr mov rdi, rax call my_coll_lexem_next mov rdi, [rbp+var_8] call my_coll_parser_next mov [rbp+var_28], rax mov rdi, [rbp+var_8] call my_coll_parser_curr mov rdi, [rbp+var_28] mov rsi, rax mov edx, 28h ; '(' call _memcpy mov rdi, [rbp+var_8] call my_coll_parser_next mov rdi, rax call my_coll_lexem_next add rsp, 30h pop rbp retn
long long my_coll_parser_init(long long a1, long long a2, long long a3, long long a4) { long long v4; // rax long long v5; // rax long long v6; // rsi long long v7; // rax long long v9; // [rsp+8h] [rbp-28h] memset(a1, 0LL, 376LL); *(_QWORD *)(a1 + 240) = a2; *(_BYTE *)(a1 + 248) = 0; v4 = my_coll_parser_curr(a1); my_coll_lexem_init(v4, a3, a4); v5 = my_coll_parser_curr(a1); my_coll_lexem_next(v5); v9 = my_coll_parser_next(a1); v6 = my_coll_parser_curr(a1); memcpy(v9, v6, 40LL); v7 = my_coll_parser_next(a1); return my_coll_lexem_next(v7); }
my_coll_parser_init: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RDI,qword ptr [RBP + -0x8] XOR ESI,ESI MOV EDX,0x178 CALL 0x00124180 MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xf0],RCX MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0xf8],0x0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00154cd0 MOV RDI,RAX MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00154ce0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00154cd0 MOV RDI,RAX CALL 0x00154d30 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00155120 MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x00154cd0 MOV RDI,qword ptr [RBP + -0x28] MOV RSI,RAX MOV EDX,0x28 CALL 0x00124200 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00155120 MOV RDI,RAX CALL 0x00154d30 ADD RSP,0x30 POP RBP RET
void my_coll_parser_init(void *param_1,int8 param_2,int8 param_3,int8 param_4) { int8 uVar1; void *__dest; void *__src; memset(param_1,0,0x178); *(int8 *)((long)param_1 + 0xf0) = param_2; *(int1 *)((long)param_1 + 0xf8) = 0; uVar1 = my_coll_parser_curr(param_1); my_coll_lexem_init(uVar1,param_3,param_4); uVar1 = my_coll_parser_curr(param_1); my_coll_lexem_next(uVar1); __dest = (void *)my_coll_parser_next(param_1); __src = (void *)my_coll_parser_curr(param_1); memcpy(__dest,__src,0x28); uVar1 = my_coll_parser_next(param_1); my_coll_lexem_next(uVar1); return; }
35,558
js_promise_resolve_thenable_job
bluesky950520[P]quickjs/quickjs.c
static JSValue js_promise_resolve_thenable_job(JSContext *ctx, int argc, JSValue *argv) { JSValue promise, thenable, then; JSValue args[2], res; promise_trace(ctx, "js_promise_resolve_thenable_job\n"); assert(argc == 3); promise = argv[0]; thenable = argv[1]; then = argv[2]; if (js_create_resolving_functions(ctx, args, promise) < 0) return JS_EXCEPTION; res = JS_Call(ctx, then, thenable, 2, args); if (JS_IsException(res)) { JSValue error = JS_GetException(ctx); res = JS_Call(ctx, args[1], JS_UNDEFINED, 1, &error); JS_FreeValue(ctx, error); } JS_FreeValue(ctx, args[0]); JS_FreeValue(ctx, args[1]); return res; }
O0
c
js_promise_resolve_thenable_job: subq $0xd8, %rsp movq %rdi, 0xc0(%rsp) movl %esi, 0xbc(%rsp) movq %rdx, 0xb0(%rsp) movq 0xb0(%rsp), %rax movq (%rax), %rcx movq %rcx, 0xa0(%rsp) movq 0x8(%rax), %rax movq %rax, 0xa8(%rsp) movq 0xb0(%rsp), %rax movq 0x10(%rax), %rcx movq %rcx, 0x90(%rsp) movq 0x18(%rax), %rax movq %rax, 0x98(%rsp) movq 0xb0(%rsp), %rax movq 0x20(%rax), %rcx movq %rcx, 0x80(%rsp) movq 0x28(%rax), %rax movq %rax, 0x88(%rsp) movq 0xc0(%rsp), %rdi leaq 0x60(%rsp), %rsi movq 0xa0(%rsp), %rdx movq 0xa8(%rsp), %rcx callq 0x98710 cmpl $0x0, %eax jge 0x985b0 movl $0x0, 0xc8(%rsp) movq $0x6, 0xd0(%rsp) jmp 0x986f7 movq 0xc0(%rsp), %rdi leaq 0x60(%rsp), %rax movq 0x80(%rsp), %rsi movq 0x88(%rsp), %rdx movq 0x90(%rsp), %rcx movq 0x98(%rsp), %r8 movl $0x2, %r9d movq %rax, (%rsp) callq 0x40340 movq %rax, 0x40(%rsp) movq %rdx, 0x48(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x50(%rsp), %rdi movq 0x58(%rsp), %rsi callq 0x29fb0 cmpl $0x0, %eax je 0x986af movq 0xc0(%rsp), %rdi callq 0x33260 movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq 0xc0(%rsp), %rdi movl $0x0, 0x10(%rsp) movq $0x3, 0x18(%rsp) movq 0x70(%rsp), %rsi movq 0x78(%rsp), %rdx movq 0x10(%rsp), %rcx movq 0x18(%rsp), %r8 movl $0x1, %r9d leaq 0x30(%rsp), %rax movq %rax, (%rsp) callq 0x40340 movq %rax, 0x20(%rsp) movq %rdx, 0x28(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x58(%rsp) movq 0xc0(%rsp), %rdi movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx callq 0x29f80 movq 0xc0(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx callq 0x29f80 movq 0xc0(%rsp), %rdi movq 0x70(%rsp), %rsi movq 0x78(%rsp), %rdx callq 0x29f80 movq 0x50(%rsp), %rax movq %rax, 0xc8(%rsp) movq 0x58(%rsp), %rax movq %rax, 0xd0(%rsp) movq 0xc8(%rsp), %rax movq 0xd0(%rsp), %rdx addq $0xd8, %rsp retq nop
js_promise_resolve_thenable_job: sub rsp, 0D8h mov [rsp+0D8h+var_18], rdi mov [rsp+0D8h+var_1C], esi mov [rsp+0D8h+var_28], rdx mov rax, [rsp+0D8h+var_28] mov rcx, [rax] mov [rsp+0D8h+var_38], rcx mov rax, [rax+8] mov [rsp+0D8h+var_30], rax mov rax, [rsp+0D8h+var_28] mov rcx, [rax+10h] mov [rsp+0D8h+var_48], rcx mov rax, [rax+18h] mov [rsp+0D8h+var_40], rax mov rax, [rsp+0D8h+var_28] mov rcx, [rax+20h] mov [rsp+0D8h+var_58], rcx mov rax, [rax+28h] mov [rsp+0D8h+var_50], rax mov rdi, [rsp+0D8h+var_18] lea rsi, [rsp+0D8h+var_78] mov rdx, [rsp+0D8h+var_38] mov rcx, [rsp+0D8h+var_30] call js_create_resolving_functions cmp eax, 0 jge short loc_985B0 mov dword ptr [rsp+0D8h+var_10], 0 mov [rsp+0D8h+var_8], 6 jmp loc_986F7 loc_985B0: mov rdi, [rsp+0D8h+var_18] lea rax, [rsp+0D8h+var_78] mov rsi, [rsp+0D8h+var_58] mov rdx, [rsp+0D8h+var_50] mov rcx, [rsp+0D8h+var_48] mov r8, [rsp+0D8h+var_40] mov r9d, 2 mov [rsp+0D8h+var_D8], rax call JS_Call mov [rsp+0D8h+var_98], rax mov [rsp+0D8h+var_90], rdx mov rax, [rsp+0D8h+var_98] mov [rsp+0D8h+var_88], rax mov rax, [rsp+0D8h+var_90] mov [rsp+0D8h+var_80], rax mov rdi, [rsp+0D8h+var_88] mov rsi, [rsp+0D8h+var_80] call JS_IsException_1 cmp eax, 0 jz loc_986AF mov rdi, [rsp+0D8h+var_18] call JS_GetException mov [rsp+0D8h+var_A8], rax mov [rsp+0D8h+var_A0], rdx mov rdi, [rsp+0D8h+var_18] mov dword ptr [rsp+0D8h+var_C8], 0 mov [rsp+0D8h+var_C0], 3 mov rsi, [rsp+0D8h+var_68] mov rdx, [rsp+0D8h+var_60] mov rcx, [rsp+0D8h+var_C8] mov r8, [rsp+0D8h+var_C0] mov r9d, 1 lea rax, [rsp+0D8h+var_A8] mov [rsp+0D8h+var_D8], rax call JS_Call mov [rsp+0D8h+var_B8], rax mov [rsp+0D8h+var_B0], rdx mov rax, [rsp+0D8h+var_B8] mov [rsp+0D8h+var_88], rax mov rax, [rsp+0D8h+var_B0] mov [rsp+0D8h+var_80], rax mov rdi, [rsp+0D8h+var_18] mov rsi, [rsp+0D8h+var_A8] mov rdx, [rsp+0D8h+var_A0] call JS_FreeValue loc_986AF: mov rdi, [rsp+0D8h+var_18] mov rsi, [rsp+0D8h+var_78] mov rdx, [rsp+0D8h+var_70] call JS_FreeValue mov rdi, [rsp+0D8h+var_18] mov rsi, [rsp+0D8h+var_68] mov rdx, [rsp+0D8h+var_60] call JS_FreeValue mov rax, [rsp+0D8h+var_88] mov [rsp+0D8h+var_10], rax mov rax, [rsp+0D8h+var_80] mov [rsp+0D8h+var_8], rax loc_986F7: mov rax, [rsp+0D8h+var_10] mov rdx, [rsp+0D8h+var_8] add rsp, 0D8h retn
long long js_promise_resolve_thenable_job(long long a1, int a2, _QWORD *a3) { long long v3; // rdx long long v4; // rdx long long v5; // rdx long long Exception; // [rsp+30h] [rbp-A8h] BYREF long long v8; // [rsp+38h] [rbp-A0h] long long v9; // [rsp+40h] [rbp-98h] long long v10; // [rsp+48h] [rbp-90h] long long v11; // [rsp+50h] [rbp-88h] long long v12; // [rsp+58h] [rbp-80h] long long v13[2]; // [rsp+60h] [rbp-78h] BYREF long long v14; // [rsp+70h] [rbp-68h] long long v15; // [rsp+78h] [rbp-60h] long long v16; // [rsp+80h] [rbp-58h] long long v17; // [rsp+88h] [rbp-50h] long long v18; // [rsp+90h] [rbp-48h] long long v19; // [rsp+98h] [rbp-40h] long long v20; // [rsp+A0h] [rbp-38h] long long v21; // [rsp+A8h] [rbp-30h] _QWORD *v22; // [rsp+B0h] [rbp-28h] int v23; // [rsp+BCh] [rbp-1Ch] long long v24; // [rsp+C0h] [rbp-18h] long long v25; // [rsp+C8h] [rbp-10h] long long v26; // [rsp+D0h] [rbp-8h] v24 = a1; v23 = a2; v22 = a3; v20 = *a3; v21 = a3[1]; v18 = a3[2]; v19 = a3[3]; v16 = a3[4]; v17 = a3[5]; if ( (int)js_create_resolving_functions(a1, v13, v20, v21) >= 0 ) { v9 = JS_Call(v24, v16, v17, v18, v19, 2, (long long)v13); v10 = v3; v11 = v9; v12 = v3; if ( JS_IsException_1(v9, v3) ) { Exception = JS_GetException(v24); v8 = v4; v11 = JS_Call(v24, v14, v15, 0, 3, 1, (long long)&Exception); v12 = v5; JS_FreeValue(v24, Exception, v8); } JS_FreeValue(v24, v13[0], v13[1]); JS_FreeValue(v24, v14, v15); v25 = v11; v26 = v12; } else { LODWORD(v25) = 0; v26 = 6LL; } return v25; }
js_promise_resolve_thenable_job: SUB RSP,0xd8 MOV qword ptr [RSP + 0xc0],RDI MOV dword ptr [RSP + 0xbc],ESI MOV qword ptr [RSP + 0xb0],RDX MOV RAX,qword ptr [RSP + 0xb0] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP + 0xa0],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0xa8],RAX MOV RAX,qword ptr [RSP + 0xb0] MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x90],RCX MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x98],RAX MOV RAX,qword ptr [RSP + 0xb0] MOV RCX,qword ptr [RAX + 0x20] MOV qword ptr [RSP + 0x80],RCX MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RSP + 0x88],RAX MOV RDI,qword ptr [RSP + 0xc0] LEA RSI,[RSP + 0x60] MOV RDX,qword ptr [RSP + 0xa0] MOV RCX,qword ptr [RSP + 0xa8] CALL 0x00198710 CMP EAX,0x0 JGE 0x001985b0 MOV dword ptr [RSP + 0xc8],0x0 MOV qword ptr [RSP + 0xd0],0x6 JMP 0x001986f7 LAB_001985b0: MOV RDI,qword ptr [RSP + 0xc0] LEA RAX,[RSP + 0x60] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x88] MOV RCX,qword ptr [RSP + 0x90] MOV R8,qword ptr [RSP + 0x98] MOV R9D,0x2 MOV qword ptr [RSP],RAX CALL 0x00140340 MOV qword ptr [RSP + 0x40],RAX MOV qword ptr [RSP + 0x48],RDX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x58],RAX MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x58] CALL 0x00129fb0 CMP EAX,0x0 JZ 0x001986af MOV RDI,qword ptr [RSP + 0xc0] CALL 0x00133260 MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX MOV RDI,qword ptr [RSP + 0xc0] MOV dword ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],0x3 MOV RSI,qword ptr [RSP + 0x70] MOV RDX,qword ptr [RSP + 0x78] MOV RCX,qword ptr [RSP + 0x10] MOV R8,qword ptr [RSP + 0x18] MOV R9D,0x1 LEA RAX,[RSP + 0x30] MOV qword ptr [RSP],RAX CALL 0x00140340 MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RDX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x58],RAX MOV RDI,qword ptr [RSP + 0xc0] MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] CALL 0x00129f80 LAB_001986af: MOV RDI,qword ptr [RSP + 0xc0] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x68] CALL 0x00129f80 MOV RDI,qword ptr [RSP + 0xc0] MOV RSI,qword ptr [RSP + 0x70] MOV RDX,qword ptr [RSP + 0x78] CALL 0x00129f80 MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0xc8],RAX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0xd0],RAX LAB_001986f7: MOV RAX,qword ptr [RSP + 0xc8] MOV RDX,qword ptr [RSP + 0xd0] ADD RSP,0xd8 RET
int1 [16] js_promise_resolve_thenable_job(int8 param_1,int4 param_2,int8 *param_3) { int iVar1; int1 auVar2 [16]; uint uStack_c4; int1 local_a8 [16]; int1 local_98 [16]; int1 local_88 [16]; int8 local_78; int8 local_70; int8 local_68; int8 local_60; int8 local_58; int8 local_50; int8 local_48; int8 local_40; int8 local_38; int8 local_30; int8 *local_28; int4 local_1c; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; local_38 = *param_3; local_30 = param_3[1]; local_48 = param_3[2]; local_40 = param_3[3]; local_58 = param_3[4]; local_50 = param_3[5]; local_28 = param_3; local_1c = param_2; local_18 = param_1; iVar1 = js_create_resolving_functions(param_1,&local_78,local_38,local_30); if (iVar1 < 0) { local_10 = 0; local_8 = 6; } else { local_98 = JS_Call(local_18,local_58,local_50,local_48,local_40,2,&local_78); local_88 = local_98; iVar1 = JS_IsException(local_98._0_8_,local_98._8_8_); if (iVar1 != 0) { local_a8 = JS_GetException(local_18); auVar2 = JS_Call(local_18,local_68,local_60,(ulong)uStack_c4 << 0x20,3,1,local_a8); local_88 = auVar2; JS_FreeValue(local_18,local_a8._0_8_,local_a8._8_8_); } JS_FreeValue(local_18,local_78,local_70); JS_FreeValue(local_18,local_68,local_60); local_10 = local_88._0_4_; uStack_c = local_88._4_4_; local_8 = local_88._8_8_; } auVar2._4_4_ = uStack_c; auVar2._0_4_ = local_10; auVar2._8_8_ = local_8; return auVar2; }
35,559
js_promise_resolve_thenable_job
bluesky950520[P]quickjs/quickjs.c
static JSValue js_promise_resolve_thenable_job(JSContext *ctx, int argc, JSValue *argv) { JSValue promise, thenable, then; JSValue args[2], res; promise_trace(ctx, "js_promise_resolve_thenable_job\n"); assert(argc == 3); promise = argv[0]; thenable = argv[1]; then = argv[2]; if (js_create_resolving_functions(ctx, args, promise) < 0) return JS_EXCEPTION; res = JS_Call(ctx, then, thenable, 2, args); if (JS_IsException(res)) { JSValue error = JS_GetException(ctx); res = JS_Call(ctx, args[1], JS_UNDEFINED, 1, &error); JS_FreeValue(ctx, error); } JS_FreeValue(ctx, args[0]); JS_FreeValue(ctx, args[1]); return res; }
O2
c
js_promise_resolve_thenable_job: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdi, %rbx movq (%rdx), %rax movq 0x8(%rdx), %rcx movq 0x10(%rdx), %r14 movq 0x18(%rdx), %r15 movq 0x20(%rdx), %r12 movq 0x28(%rdx), %r13 leaq 0x10(%rsp), %rbp movq %rbp, %rsi movq %rax, %rdx callq 0x4aef0 testl %eax, %eax js 0x4aeab movq %rbp, (%rsp) pushq $0x2 popq %r9 movq %rbx, %rdi movq %r12, %rsi movq %r13, %rdx movq %r14, %rcx movq %r15, %r8 callq 0x25a66 movq %rdx, %r14 cmpl $0x6, %r14d jne 0x4aeb4 movq 0x18(%rbx), %rax movups 0xf0(%rax), %xmm0 andl $0x0, 0xf0(%rax) movq $0x4, 0xf8(%rax) leaq 0x30(%rsp), %r12 movaps %xmm0, (%r12) movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rdx movq %r12, (%rsp) pushq $0x3 popq %r8 pushq $0x1 popq %r9 movq %rbx, %rdi xorl %ecx, %ecx callq 0x25a66 movq %rax, %r15 movq %rdx, %r14 movq (%r12), %rsi movq 0x8(%r12), %rdx movq %rbx, %rdi callq 0x1bbce jmp 0x4aeb7 pushq $0x6 popq %r14 xorl %r15d, %r15d jmp 0x4aedb movq %rax, %r15 movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx movq %rbx, %rdi callq 0x1bbce movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rdx movq %rbx, %rdi callq 0x1bbce movq %r15, %rax movq %r14, %rdx addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_promise_resolve_thenable_job: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov rbx, rdi mov rax, [rdx] mov rcx, [rdx+8] mov r14, [rdx+10h] mov r15, [rdx+18h] mov r12, [rdx+20h] mov r13, [rdx+28h] lea rbp, [rsp+78h+var_68] mov rsi, rbp mov rdx, rax call js_create_resolving_functions test eax, eax js loc_4AEAB mov [rsp+78h+var_78], rbp push 2 pop r9 mov rdi, rbx mov rsi, r12 mov rdx, r13 mov rcx, r14 mov r8, r15 call JS_Call mov r14, rdx cmp r14d, 6 jnz short loc_4AEB4 mov rax, [rbx+18h] movups xmm0, xmmword ptr [rax+0F0h] and dword ptr [rax+0F0h], 0 mov qword ptr [rax+0F8h], 4 lea r12, [rsp+78h+var_48] movaps xmmword ptr [r12], xmm0 mov rsi, [rsp+78h+var_58] mov rdx, [rsp+78h+var_50] mov [rsp+78h+var_78], r12 push 3 pop r8 push 1 pop r9 mov rdi, rbx xor ecx, ecx call JS_Call mov r15, rax mov r14, rdx mov rsi, [r12] mov rdx, [r12+8] mov rdi, rbx call JS_FreeValue jmp short loc_4AEB7 loc_4AEAB: push 6 pop r14 xor r15d, r15d jmp short loc_4AEDB loc_4AEB4: mov r15, rax loc_4AEB7: mov rsi, [rsp+78h+var_68] mov rdx, [rsp+78h+var_60] mov rdi, rbx call JS_FreeValue mov rsi, [rsp+78h+var_58] mov rdx, [rsp+78h+var_50] mov rdi, rbx call JS_FreeValue loc_4AEDB: mov rax, r15 mov rdx, r14 add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_promise_resolve_thenable_job(long long a1, long long a2, _QWORD *a3) { long long v3; // r14 long long v4; // r15 long long v5; // r12 long long v6; // r13 long long v7; // rax int v8; // edx long long v9; // rax __int128 v10; // xmm0 long long v11; // r15 long long v13[2]; // [rsp+10h] [rbp-68h] BYREF long long v14; // [rsp+20h] [rbp-58h] long long v15; // [rsp+28h] [rbp-50h] __int128 v16; // [rsp+30h] [rbp-48h] BYREF v3 = a3[2]; v4 = a3[3]; v5 = a3[4]; v6 = a3[5]; if ( (int)js_create_resolving_functions(a1, v13, *a3, a3[1]) < 0 ) return 0LL; v7 = JS_Call(a1, v5, v6, v3, v4, 2, (long long)v13); if ( v8 == 6 ) { v9 = *(_QWORD *)(a1 + 24); v10 = *(_OWORD *)(v9 + 240); *(_DWORD *)(v9 + 240) = 0; *(_QWORD *)(v9 + 248) = 4LL; v16 = v10; v11 = JS_Call(a1, v14, v15, 0, 3, 1, (long long)&v16); JS_FreeValue(a1, v16, *((long long *)&v16 + 1)); } else { v11 = v7; } JS_FreeValue(a1, v13[0], v13[1]); JS_FreeValue(a1, v14, v15); return v11; }
js_promise_resolve_thenable_job: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RBX,RDI MOV RAX,qword ptr [RDX] MOV RCX,qword ptr [RDX + 0x8] MOV R14,qword ptr [RDX + 0x10] MOV R15,qword ptr [RDX + 0x18] MOV R12,qword ptr [RDX + 0x20] MOV R13,qword ptr [RDX + 0x28] LEA RBP,[RSP + 0x10] MOV RSI,RBP MOV RDX,RAX CALL 0x0014aef0 TEST EAX,EAX JS 0x0014aeab MOV qword ptr [RSP],RBP PUSH 0x2 POP R9 MOV RDI,RBX MOV RSI,R12 MOV RDX,R13 MOV RCX,R14 MOV R8,R15 CALL 0x00125a66 MOV R14,RDX CMP R14D,0x6 JNZ 0x0014aeb4 MOV RAX,qword ptr [RBX + 0x18] MOVUPS XMM0,xmmword ptr [RAX + 0xf0] AND dword ptr [RAX + 0xf0],0x0 MOV qword ptr [RAX + 0xf8],0x4 LEA R12,[RSP + 0x30] MOVAPS xmmword ptr [R12],XMM0 MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x28] MOV qword ptr [RSP],R12 PUSH 0x3 POP R8 PUSH 0x1 POP R9 MOV RDI,RBX XOR ECX,ECX CALL 0x00125a66 MOV R15,RAX MOV R14,RDX MOV RSI,qword ptr [R12] MOV RDX,qword ptr [R12 + 0x8] MOV RDI,RBX CALL 0x0011bbce JMP 0x0014aeb7 LAB_0014aeab: PUSH 0x6 POP R14 XOR R15D,R15D JMP 0x0014aedb LAB_0014aeb4: MOV R15,RAX LAB_0014aeb7: MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] MOV RDI,RBX CALL 0x0011bbce MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x28] MOV RDI,RBX CALL 0x0011bbce LAB_0014aedb: MOV RAX,R15 MOV RDX,R14 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_promise_resolve_thenable_job(long param_1,int8 param_2,int8 *param_3) { int8 uVar1; int8 uVar2; int8 uVar3; int8 uVar4; long lVar5; int iVar6; int1 auVar7 [16]; int8 local_68; int8 local_60; int8 local_58; int8 local_50; int4 local_48; int4 uStack_44; int4 uStack_40; int4 uStack_3c; uVar1 = param_3[2]; uVar2 = param_3[3]; uVar3 = param_3[4]; uVar4 = param_3[5]; iVar6 = js_create_resolving_functions(param_1,&local_68,*param_3,param_3[1]); if (iVar6 < 0) { auVar7 = ZEXT816(6) << 0x40; } else { auVar7 = JS_Call(param_1,uVar3,uVar4,uVar1,uVar2,2,&local_68); if (auVar7._8_4_ == 6) { lVar5 = *(long *)(param_1 + 0x18); local_48 = *(int4 *)(lVar5 + 0xf0); uStack_44 = *(int4 *)(lVar5 + 0xf4); uStack_40 = *(int4 *)(lVar5 + 0xf8); uStack_3c = *(int4 *)(lVar5 + 0xfc); *(int4 *)(lVar5 + 0xf0) = 0; *(int8 *)(lVar5 + 0xf8) = 4; auVar7 = JS_Call(param_1,local_58,local_50,0,3,1,&local_48); JS_FreeValue(param_1,CONCAT44(uStack_44,local_48),CONCAT44(uStack_3c,uStack_40)); } JS_FreeValue(param_1,local_68,local_60); JS_FreeValue(param_1,local_58,local_50); } return auVar7; }
35,560
JS_DeleteProperty
bluesky950520[P]quickjs/quickjs.c
int JS_DeleteProperty(JSContext *ctx, JSValue obj, JSAtom prop, int flags) { JSValue obj1; JSObject *p; int res; obj1 = JS_ToObject(ctx, obj); if (JS_IsException(obj1)) return -1; p = JS_VALUE_GET_OBJ(obj1); res = delete_property(ctx, p, prop); JS_FreeValue(ctx, obj1); if (res != FALSE) return res; if ((flags & JS_PROP_THROW) || ((flags & JS_PROP_THROW_STRICT) && is_strict_mode(ctx))) { JS_ThrowTypeError(ctx, "could not delete property"); return -1; } return FALSE; }
O0
c
JS_DeleteProperty: subq $0x68, %rsp movq %rsi, 0x50(%rsp) movq %rdx, 0x58(%rsp) movq %rdi, 0x48(%rsp) movl %ecx, 0x44(%rsp) movl %r8d, 0x40(%rsp) movq 0x48(%rsp), %rdi movq 0x50(%rsp), %rsi movq 0x58(%rsp), %rdx callq 0x364b0 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x30(%rsp), %rdi movq 0x38(%rsp), %rsi callq 0x22a00 cmpl $0x0, %eax je 0x363ff movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF jmp 0x3649e movq 0x30(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x48(%rsp), %rdi movq 0x28(%rsp), %rsi movl 0x44(%rsp), %edx callq 0x367a0 movl %eax, 0x24(%rsp) movq 0x48(%rsp), %rdi movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx callq 0x229d0 cmpl $0x0, 0x24(%rsp) je 0x36445 movl 0x24(%rsp), %eax movl %eax, 0x64(%rsp) jmp 0x3649e movl 0x40(%rsp), %eax andl $0x4000, %eax # imm = 0x4000 cmpl $0x0, %eax jne 0x36470 movl 0x40(%rsp), %eax andl $0x8000, %eax # imm = 0x8000 cmpl $0x0, %eax je 0x36496 movq 0x48(%rsp), %rdi callq 0x36c80 cmpl $0x0, %eax je 0x36496 movq 0x48(%rsp), %rdi leaq 0xd61c0(%rip), %rsi # 0x10c63c movb $0x0, %al callq 0x2c040 movq %rax, (%rsp) movq %rdx, 0x8(%rsp) movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF jmp 0x3649e movl $0x0, 0x64(%rsp) movl 0x64(%rsp), %eax addq $0x68, %rsp retq nopw (%rax,%rax)
JS_DeleteProperty: sub rsp, 68h mov [rsp+68h+var_18], rsi mov [rsp+68h+var_10], rdx mov [rsp+68h+var_20], rdi mov [rsp+68h+var_24], ecx mov [rsp+68h+var_28], r8d mov rdi, [rsp+68h+var_20] mov rsi, [rsp+68h+var_18] mov rdx, [rsp+68h+var_10] call JS_ToObject mov [rsp+68h+var_58], rax mov [rsp+68h+var_50], rdx mov rax, [rsp+68h+var_58] mov [rsp+68h+var_38], rax mov rax, [rsp+68h+var_50] mov [rsp+68h+var_30], rax mov rdi, [rsp+68h+var_38] mov rsi, [rsp+68h+var_30] call JS_IsException_1 cmp eax, 0 jz short loc_363FF mov [rsp+68h+var_4], 0FFFFFFFFh jmp loc_3649E loc_363FF: mov rax, [rsp+68h+var_38] mov [rsp+68h+var_40], rax mov rdi, [rsp+68h+var_20] mov rsi, [rsp+68h+var_40] mov edx, [rsp+68h+var_24] call delete_property mov [rsp+68h+var_44], eax mov rdi, [rsp+68h+var_20] mov rsi, [rsp+68h+var_38] mov rdx, [rsp+68h+var_30] call JS_FreeValue cmp [rsp+68h+var_44], 0 jz short loc_36445 mov eax, [rsp+68h+var_44] mov [rsp+68h+var_4], eax jmp short loc_3649E loc_36445: mov eax, [rsp+68h+var_28] and eax, 4000h cmp eax, 0 jnz short loc_36470 mov eax, [rsp+68h+var_28] and eax, 8000h cmp eax, 0 jz short loc_36496 mov rdi, [rsp+68h+var_20] call is_strict_mode cmp eax, 0 jz short loc_36496 loc_36470: mov rdi, [rsp+68h+var_20] lea rsi, aCouldNotDelete; "could not delete property" mov al, 0 call JS_ThrowTypeError mov [rsp+68h+var_68], rax mov [rsp+68h+var_60], rdx mov [rsp+68h+var_4], 0FFFFFFFFh jmp short loc_3649E loc_36496: mov [rsp+68h+var_4], 0 loc_3649E: mov eax, [rsp+68h+var_4] add rsp, 68h retn
long long JS_DeleteProperty( long long a1, long long a2, long long a3, unsigned int a4, __int16 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { long long v13; // rdx long long v14; // rdx long long v15; // rcx long long v16; // r8 long long v17; // r9 __m128 v18; // xmm4 __m128 v19; // xmm5 char v21; // [rsp+0h] [rbp-68h] long long v22; // [rsp+10h] [rbp-58h] unsigned int v23; // [rsp+24h] [rbp-44h] long long v24; // [rsp+38h] [rbp-30h] v22 = JS_ToObject(a1, a2, a3); v24 = v13; if ( JS_IsException_1(v22, v13) ) { return (unsigned int)-1; } else { v23 = delete_property(a1, v22, a4); JS_FreeValue(a1, v22, v24); if ( v23 ) { return v23; } else if ( (a5 & 0x4000) != 0 || a5 < 0 && (unsigned int)is_strict_mode(a1) ) { JS_ThrowTypeError( a1, (long long)"could not delete property", v14, v15, v16, v17, a6, a7, a8, a9, v18, v19, a12, a13, v21); return (unsigned int)-1; } else { return 0; } } }
JS_DeleteProperty: SUB RSP,0x68 MOV qword ptr [RSP + 0x50],RSI MOV qword ptr [RSP + 0x58],RDX MOV qword ptr [RSP + 0x48],RDI MOV dword ptr [RSP + 0x44],ECX MOV dword ptr [RSP + 0x40],R8D MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x58] CALL 0x001364b0 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x38],RAX MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x38] CALL 0x00122a00 CMP EAX,0x0 JZ 0x001363ff MOV dword ptr [RSP + 0x64],0xffffffff JMP 0x0013649e LAB_001363ff: MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x28] MOV EDX,dword ptr [RSP + 0x44] CALL 0x001367a0 MOV dword ptr [RSP + 0x24],EAX MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] CALL 0x001229d0 CMP dword ptr [RSP + 0x24],0x0 JZ 0x00136445 MOV EAX,dword ptr [RSP + 0x24] MOV dword ptr [RSP + 0x64],EAX JMP 0x0013649e LAB_00136445: MOV EAX,dword ptr [RSP + 0x40] AND EAX,0x4000 CMP EAX,0x0 JNZ 0x00136470 MOV EAX,dword ptr [RSP + 0x40] AND EAX,0x8000 CMP EAX,0x0 JZ 0x00136496 MOV RDI,qword ptr [RSP + 0x48] CALL 0x00136c80 CMP EAX,0x0 JZ 0x00136496 LAB_00136470: MOV RDI,qword ptr [RSP + 0x48] LEA RSI,[0x20c63c] MOV AL,0x0 CALL 0x0012c040 MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],RDX MOV dword ptr [RSP + 0x64],0xffffffff JMP 0x0013649e LAB_00136496: MOV dword ptr [RSP + 0x64],0x0 LAB_0013649e: MOV EAX,dword ptr [RSP + 0x64] ADD RSP,0x68 RET
int JS_DeleteProperty(int8 param_1,int8 param_2,int8 param_3,int4 param_4, uint param_5) { int iVar1; int8 uVar2; int1 auVar3 [16]; int local_4; auVar3 = JS_ToObject(param_1,param_2,param_3); uVar2 = auVar3._0_8_; iVar1 = JS_IsException(uVar2,auVar3._8_8_); if (iVar1 == 0) { local_4 = delete_property(param_1,uVar2,param_4); JS_FreeValue(param_1,uVar2,auVar3._8_8_); if (local_4 == 0) { if (((param_5 & 0x4000) == 0) && (((param_5 & 0x8000) == 0 || (iVar1 = is_strict_mode(param_1), iVar1 == 0)))) { local_4 = 0; } else { JS_ThrowTypeError(param_1,"could not delete property"); local_4 = -1; } } } else { local_4 = -1; } return local_4; }
35,561
JS_DeleteProperty
bluesky950520[P]quickjs/quickjs.c
int JS_DeleteProperty(JSContext *ctx, JSValue obj, JSAtom prop, int flags) { JSValue obj1; JSObject *p; int res; obj1 = JS_ToObject(ctx, obj); if (JS_IsException(obj1)) return -1; p = JS_VALUE_GET_OBJ(obj1); res = delete_property(ctx, p, prop); JS_FreeValue(ctx, obj1); if (res != FALSE) return res; if ((flags & JS_PROP_THROW) || ((flags & JS_PROP_THROW_STRICT) && is_strict_mode(ctx))) { JS_ThrowTypeError(ctx, "could not delete property"); return -1; } return FALSE; }
O1
c
JS_DeleteProperty: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %r8d, %ebp movl %ecx, %r15d movq %rdi, %rbx callq 0x261c9 movq %rdx, %r12 movq %rax, (%rsp) movl $0xffffffff, %r14d # imm = 0xFFFFFFFF cmpl $0x6, %r12d je 0x261b7 movq (%rsp), %r13 movq %rbx, %rdi movq %r13, %rsi movl %r15d, %edx callq 0x26332 movl %eax, %r14d movq 0x18(%rbx), %rdi movq %r13, %rsi movq %r12, %rdx callq 0x1ccb2 testl %r14d, %r14d jne 0x261b7 btl $0xe, %ebp jb 0x261a0 xorl %r14d, %r14d testw %bp, %bp jns 0x261b7 movq 0x18(%rbx), %rax movq 0x108(%rax), %rax testq %rax, %rax je 0x261b7 cmpl $0x0, 0x40(%rax) jns 0x261b7 leaq 0x77499(%rip), %rsi # 0x9d640 movq %rbx, %rdi xorl %eax, %eax callq 0x21953 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
JS_DeleteProperty: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebp, r8d mov r15d, ecx mov rbx, rdi call JS_ToObject mov r12, rdx mov [rsp+38h+var_38], rax mov r14d, 0FFFFFFFFh cmp r12d, 6 jz short loc_261B7 mov r13, [rsp+38h+var_38] mov rdi, rbx mov rsi, r13 mov edx, r15d call delete_property mov r14d, eax mov rdi, [rbx+18h] mov rsi, r13 mov rdx, r12 call JS_FreeValueRT test r14d, r14d jnz short loc_261B7 bt ebp, 0Eh jb short loc_261A0 xor r14d, r14d test bp, bp jns short loc_261B7 mov rax, [rbx+18h] mov rax, [rax+108h] test rax, rax jz short loc_261B7 cmp dword ptr [rax+40h], 0 jns short loc_261B7 loc_261A0: lea rsi, aCouldNotDelete; "could not delete property" mov rdi, rbx xor eax, eax call JS_ThrowTypeError mov r14d, 0FFFFFFFFh loc_261B7: mov eax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long JS_DeleteProperty( long long a1, long long a2, long long a3, unsigned int a4, __int16 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { long long v15; // rax long long v16; // rdx long long v17; // r12 unsigned int v18; // r14d long long v19; // rdx long long v20; // rcx long long v21; // r8 long long v22; // r9 __m128 v23; // xmm4 __m128 v24; // xmm5 long long v25; // rax _DWORD *v27; // [rsp+0h] [rbp-38h] v15 = JS_ToObject(a1, a2, a3); v17 = v16; v27 = (_DWORD *)v15; v18 = -1; if ( (_DWORD)v16 != 6 ) { v18 = delete_property(a1, v15, a4); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v27, v17); if ( !v18 ) { if ( (a5 & 0x4000) != 0 || (v18 = 0, a5 < 0) && (v25 = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 264LL)) != 0 && *(int *)(v25 + 64) < 0 ) { JS_ThrowTypeError( a1, (long long)"could not delete property", v19, v20, v21, v22, a6, a7, a8, a9, v23, v24, a12, a13, (char)v27); return (unsigned int)-1; } } } return v18; }
JS_DeleteProperty: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBP,R8D MOV R15D,ECX MOV RBX,RDI CALL 0x001261c9 MOV R12,RDX MOV qword ptr [RSP],RAX MOV R14D,0xffffffff CMP R12D,0x6 JZ 0x001261b7 MOV R13,qword ptr [RSP] MOV RDI,RBX MOV RSI,R13 MOV EDX,R15D CALL 0x00126332 MOV R14D,EAX MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R13 MOV RDX,R12 CALL 0x0011ccb2 TEST R14D,R14D JNZ 0x001261b7 BT EBP,0xe JC 0x001261a0 XOR R14D,R14D TEST BP,BP JNS 0x001261b7 MOV RAX,qword ptr [RBX + 0x18] MOV RAX,qword ptr [RAX + 0x108] TEST RAX,RAX JZ 0x001261b7 CMP dword ptr [RAX + 0x40],0x0 JNS 0x001261b7 LAB_001261a0: LEA RSI,[0x19d640] MOV RDI,RBX XOR EAX,EAX CALL 0x00121953 MOV R14D,0xffffffff LAB_001261b7: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int JS_DeleteProperty(long param_1,int8 param_2,int8 param_3,int4 param_4, uint param_5) { long lVar1; int iVar2; int1 auVar3 [16]; auVar3 = JS_ToObject(); iVar2 = -1; if (auVar3._8_4_ != 6) { iVar2 = delete_property(param_1,auVar3._0_8_,param_4); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar3._0_8_,auVar3._8_8_); if (iVar2 == 0) { if ((param_5 >> 0xe & 1) == 0) { if (-1 < (short)param_5) { return 0; } lVar1 = *(long *)(*(long *)(param_1 + 0x18) + 0x108); if (lVar1 == 0) { return 0; } if (-1 < *(int *)(lVar1 + 0x40)) { return 0; } } JS_ThrowTypeError(param_1,"could not delete property"); iVar2 = -1; } } return iVar2; }
35,562
func_uni_ksc5601_onechar
eloqsql/strings/ctype-euc_kr.c
static int func_uni_ksc5601_onechar(int code){ if ((code>=0x00A1)&&(code<=0x0167)) return(tab_uni_ksc56010[code-0x00A1]); if ((code>=0x02C7)&&(code<=0x0451)) return(tab_uni_ksc56011[code-0x02C7]); if ((code>=0x2015)&&(code<=0x2312)) return(tab_uni_ksc56012[code-0x2015]); if ((code>=0x2460)&&(code<=0x266D)) return(tab_uni_ksc56013[code-0x2460]); if ((code>=0x3000)&&(code<=0x327F)) return(tab_uni_ksc56014[code-0x3000]); if ((code>=0x3380)&&(code<=0x33DD)) return(tab_uni_ksc56015[code-0x3380]); if ((code>=0x4E00)&&(code<=0x947F)) return(tab_uni_ksc56016[code-0x4E00]); if ((code>=0x9577)&&(code<=0x9F9C)) return(tab_uni_ksc56017[code-0x9577]); if ((code>=0xAC00)&&(code<=0xD7A3)) return(tab_uni_ksc56018[code-0xAC00]); if ((code>=0xF900)&&(code<=0xFA0B)) return(tab_uni_ksc56019[code-0xF900]); if ((code>=0xFF01)&&(code<=0xFFE6)) return(tab_uni_ksc560110[code-0xFF01]); return(0); }
O0
c
func_uni_ksc5601_onechar: pushq %rbp movq %rsp, %rbp movl %edi, -0x8(%rbp) cmpl $0xa1, -0x8(%rbp) jl 0x4e407 cmpl $0x167, -0x8(%rbp) # imm = 0x167 jg 0x4e407 movl -0x8(%rbp), %eax subl $0xa1, %eax movslq %eax, %rcx leaq 0xaf6c5(%rip), %rax # 0xfdac0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x4e5e5 cmpl $0x2c7, -0x8(%rbp) # imm = 0x2C7 jl 0x4e437 cmpl $0x451, -0x8(%rbp) # imm = 0x451 jg 0x4e437 movl -0x8(%rbp), %eax subl $0x2c7, %eax # imm = 0x2C7 movslq %eax, %rcx leaq 0xaf825(%rip), %rax # 0xfdc50 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x4e5e5 cmpl $0x2015, -0x8(%rbp) # imm = 0x2015 jl 0x4e467 cmpl $0x2312, -0x8(%rbp) # imm = 0x2312 jg 0x4e467 movl -0x8(%rbp), %eax subl $0x2015, %eax # imm = 0x2015 movslq %eax, %rcx leaq 0xafb15(%rip), %rax # 0xfdf70 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x4e5e5 cmpl $0x2460, -0x8(%rbp) # imm = 0x2460 jl 0x4e497 cmpl $0x266d, -0x8(%rbp) # imm = 0x266D jg 0x4e497 movl -0x8(%rbp), %eax subl $0x2460, %eax # imm = 0x2460 movslq %eax, %rcx leaq 0xb00e5(%rip), %rax # 0xfe570 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x4e5e5 cmpl $0x3000, -0x8(%rbp) # imm = 0x3000 jl 0x4e4c7 cmpl $0x327f, -0x8(%rbp) # imm = 0x327F jg 0x4e4c7 movl -0x8(%rbp), %eax subl $0x3000, %eax # imm = 0x3000 movslq %eax, %rcx leaq 0xb04d5(%rip), %rax # 0xfe990 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x4e5e5 cmpl $0x3380, -0x8(%rbp) # imm = 0x3380 jl 0x4e4f7 cmpl $0x33dd, -0x8(%rbp) # imm = 0x33DD jg 0x4e4f7 movl -0x8(%rbp), %eax subl $0x3380, %eax # imm = 0x3380 movslq %eax, %rcx leaq 0xb09a5(%rip), %rax # 0xfee90 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x4e5e5 cmpl $0x4e00, -0x8(%rbp) # imm = 0x4E00 jl 0x4e527 cmpl $0x947f, -0x8(%rbp) # imm = 0x947F jg 0x4e527 movl -0x8(%rbp), %eax subl $0x4e00, %eax # imm = 0x4E00 movslq %eax, %rcx leaq 0xb0a35(%rip), %rax # 0xfef50 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x4e5e5 cmpl $0x9577, -0x8(%rbp) # imm = 0x9577 jl 0x4e557 cmpl $0x9f9c, -0x8(%rbp) # imm = 0x9F9C jg 0x4e557 movl -0x8(%rbp), %eax subl $0x9577, %eax # imm = 0x9577 movslq %eax, %rcx leaq 0xb9705(%rip), %rax # 0x107c50 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x4e5e5 cmpl $0xac00, -0x8(%rbp) # imm = 0xAC00 jl 0x4e584 cmpl $0xd7a3, -0x8(%rbp) # imm = 0xD7A3 jg 0x4e584 movl -0x8(%rbp), %eax subl $0xac00, %eax # imm = 0xAC00 movslq %eax, %rcx leaq 0xbab25(%rip), %rax # 0x1090a0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x4e5e5 cmpl $0xf900, -0x8(%rbp) # imm = 0xF900 jl 0x4e5b1 cmpl $0xfa0b, -0x8(%rbp) # imm = 0xFA0B jg 0x4e5b1 movl -0x8(%rbp), %eax subl $0xf900, %eax # imm = 0xF900 movslq %eax, %rcx leaq 0xc0248(%rip), %rax # 0x10e7f0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x4e5e5 cmpl $0xff01, -0x8(%rbp) # imm = 0xFF01 jl 0x4e5de cmpl $0xffe6, -0x8(%rbp) # imm = 0xFFE6 jg 0x4e5de movl -0x8(%rbp), %eax subl $0xff01, %eax # imm = 0xFF01 movslq %eax, %rcx leaq 0xc043b(%rip), %rax # 0x10ea10 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x4e5e5 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
func_uni_ksc5601_onechar: push rbp mov rbp, rsp mov [rbp+var_8], edi cmp [rbp+var_8], 0A1h jl short loc_4E407 cmp [rbp+var_8], 167h jg short loc_4E407 mov eax, [rbp+var_8] sub eax, 0A1h movsxd rcx, eax lea rax, tab_uni_ksc56010 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_4E5E5 loc_4E407: cmp [rbp+var_8], 2C7h jl short loc_4E437 cmp [rbp+var_8], 451h jg short loc_4E437 mov eax, [rbp+var_8] sub eax, 2C7h movsxd rcx, eax lea rax, tab_uni_ksc56011 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_4E5E5 loc_4E437: cmp [rbp+var_8], 2015h jl short loc_4E467 cmp [rbp+var_8], 2312h jg short loc_4E467 mov eax, [rbp+var_8] sub eax, 2015h movsxd rcx, eax lea rax, tab_uni_ksc56012 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_4E5E5 loc_4E467: cmp [rbp+var_8], 2460h jl short loc_4E497 cmp [rbp+var_8], 266Dh jg short loc_4E497 mov eax, [rbp+var_8] sub eax, 2460h movsxd rcx, eax lea rax, tab_uni_ksc56013 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_4E5E5 loc_4E497: cmp [rbp+var_8], 3000h jl short loc_4E4C7 cmp [rbp+var_8], 327Fh jg short loc_4E4C7 mov eax, [rbp+var_8] sub eax, 3000h movsxd rcx, eax lea rax, tab_uni_ksc56014 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_4E5E5 loc_4E4C7: cmp [rbp+var_8], 3380h jl short loc_4E4F7 cmp [rbp+var_8], 33DDh jg short loc_4E4F7 mov eax, [rbp+var_8] sub eax, 3380h movsxd rcx, eax lea rax, tab_uni_ksc56015 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_4E5E5 loc_4E4F7: cmp [rbp+var_8], 4E00h jl short loc_4E527 cmp [rbp+var_8], 947Fh jg short loc_4E527 mov eax, [rbp+var_8] sub eax, 4E00h movsxd rcx, eax lea rax, tab_uni_ksc56016 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_4E5E5 loc_4E527: cmp [rbp+var_8], 9577h jl short loc_4E557 cmp [rbp+var_8], 9F9Ch jg short loc_4E557 mov eax, [rbp+var_8] sub eax, 9577h movsxd rcx, eax lea rax, tab_uni_ksc56017 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_4E5E5 loc_4E557: cmp [rbp+var_8], 0AC00h jl short loc_4E584 cmp [rbp+var_8], 0D7A3h jg short loc_4E584 mov eax, [rbp+var_8] sub eax, 0AC00h movsxd rcx, eax lea rax, tab_uni_ksc56018 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp short loc_4E5E5 loc_4E584: cmp [rbp+var_8], 0F900h jl short loc_4E5B1 cmp [rbp+var_8], 0FA0Bh jg short loc_4E5B1 mov eax, [rbp+var_8] sub eax, 0F900h movsxd rcx, eax lea rax, tab_uni_ksc56019 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp short loc_4E5E5 loc_4E5B1: cmp [rbp+var_8], 0FF01h jl short loc_4E5DE cmp [rbp+var_8], 0FFE6h jg short loc_4E5DE mov eax, [rbp+var_8] sub eax, 0FF01h movsxd rcx, eax lea rax, tab_uni_ksc560110 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp short loc_4E5E5 loc_4E5DE: mov [rbp+var_4], 0 loc_4E5E5: mov eax, [rbp+var_4] pop rbp retn
long long func_uni_ksc5601_onechar(int a1) { if ( a1 < 161 || a1 > 359 ) { if ( a1 < 711 || a1 > 1105 ) { if ( a1 < 8213 || a1 > 8978 ) { if ( a1 < 9312 || a1 > 9837 ) { if ( a1 < 12288 || a1 > 12927 ) { if ( a1 < 13184 || a1 > 13277 ) { if ( a1 < 19968 || a1 > 38015 ) { if ( a1 < 38263 || a1 > 40860 ) { if ( a1 < 44032 || a1 > 55203 ) { if ( a1 < 63744 || a1 > 64011 ) { if ( a1 < 65281 || a1 > 65510 ) return 0; else return tab_uni_ksc560110[a1 - 65281]; } else { return tab_uni_ksc56019[a1 - 63744]; } } else { return tab_uni_ksc56018[a1 - 44032]; } } else { return tab_uni_ksc56017[a1 - 38263]; } } else { return tab_uni_ksc56016[a1 - 19968]; } } else { return tab_uni_ksc56015[a1 - 13184]; } } else { return tab_uni_ksc56014[a1 - 12288]; } } else { return tab_uni_ksc56013[a1 - 9312]; } } else { return tab_uni_ksc56012[a1 - 8213]; } } else { return tab_uni_ksc56011[a1 - 711]; } } else { return tab_uni_ksc56010[a1 - 161]; } }
func_uni_ksc5601_onechar: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI CMP dword ptr [RBP + -0x8],0xa1 JL 0x0014e407 CMP dword ptr [RBP + -0x8],0x167 JG 0x0014e407 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0xa1 MOVSXD RCX,EAX LEA RAX,[0x1fdac0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0014e5e5 LAB_0014e407: CMP dword ptr [RBP + -0x8],0x2c7 JL 0x0014e437 CMP dword ptr [RBP + -0x8],0x451 JG 0x0014e437 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x2c7 MOVSXD RCX,EAX LEA RAX,[0x1fdc50] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0014e5e5 LAB_0014e437: CMP dword ptr [RBP + -0x8],0x2015 JL 0x0014e467 CMP dword ptr [RBP + -0x8],0x2312 JG 0x0014e467 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x2015 MOVSXD RCX,EAX LEA RAX,[0x1fdf70] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0014e5e5 LAB_0014e467: CMP dword ptr [RBP + -0x8],0x2460 JL 0x0014e497 CMP dword ptr [RBP + -0x8],0x266d JG 0x0014e497 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x2460 MOVSXD RCX,EAX LEA RAX,[0x1fe570] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0014e5e5 LAB_0014e497: CMP dword ptr [RBP + -0x8],0x3000 JL 0x0014e4c7 CMP dword ptr [RBP + -0x8],0x327f JG 0x0014e4c7 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x3000 MOVSXD RCX,EAX LEA RAX,[0x1fe990] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0014e5e5 LAB_0014e4c7: CMP dword ptr [RBP + -0x8],0x3380 JL 0x0014e4f7 CMP dword ptr [RBP + -0x8],0x33dd JG 0x0014e4f7 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x3380 MOVSXD RCX,EAX LEA RAX,[0x1fee90] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0014e5e5 LAB_0014e4f7: CMP dword ptr [RBP + -0x8],0x4e00 JL 0x0014e527 CMP dword ptr [RBP + -0x8],0x947f JG 0x0014e527 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x4e00 MOVSXD RCX,EAX LEA RAX,[0x1fef50] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0014e5e5 LAB_0014e527: CMP dword ptr [RBP + -0x8],0x9577 JL 0x0014e557 CMP dword ptr [RBP + -0x8],0x9f9c JG 0x0014e557 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x9577 MOVSXD RCX,EAX LEA RAX,[0x207c50] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0014e5e5 LAB_0014e557: CMP dword ptr [RBP + -0x8],0xac00 JL 0x0014e584 CMP dword ptr [RBP + -0x8],0xd7a3 JG 0x0014e584 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0xac00 MOVSXD RCX,EAX LEA RAX,[0x2090a0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0014e5e5 LAB_0014e584: CMP dword ptr [RBP + -0x8],0xf900 JL 0x0014e5b1 CMP dword ptr [RBP + -0x8],0xfa0b JG 0x0014e5b1 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0xf900 MOVSXD RCX,EAX LEA RAX,[0x20e7f0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0014e5e5 LAB_0014e5b1: CMP dword ptr [RBP + -0x8],0xff01 JL 0x0014e5de CMP dword ptr [RBP + -0x8],0xffe6 JG 0x0014e5de MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0xff01 MOVSXD RCX,EAX LEA RAX,[0x20ea10] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0014e5e5 LAB_0014e5de: MOV dword ptr [RBP + -0x4],0x0 LAB_0014e5e5: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int2 func_uni_ksc5601_onechar(int param_1) { int2 uVar1; if ((param_1 < 0xa1) || (0x167 < param_1)) { if ((param_1 < 0x2c7) || (0x451 < param_1)) { if ((param_1 < 0x2015) || (0x2312 < param_1)) { if ((param_1 < 0x2460) || (0x266d < param_1)) { if ((param_1 < 0x3000) || (0x327f < param_1)) { if ((param_1 < 0x3380) || (0x33dd < param_1)) { if ((param_1 < 0x4e00) || (0x947f < param_1)) { if ((param_1 < 0x9577) || (0x9f9c < param_1)) { if ((param_1 < 0xac00) || (0xd7a3 < param_1)) { if ((param_1 < 0xf900) || (0xfa0b < param_1)) { if ((param_1 < 0xff01) || (0xffe6 < param_1)) { uVar1 = 0; } else { uVar1 = *(int2 *)(tab_uni_ksc560110 + (long)(param_1 + -0xff01) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56019 + (long)(param_1 + -0xf900) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56018 + (long)(param_1 + -0xac00) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56017 + (long)(param_1 + -0x9577) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56016 + (long)(param_1 + -0x4e00) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56015 + (long)(param_1 + -0x3380) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56014 + (long)(param_1 + -0x3000) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56013 + (long)(param_1 + -0x2460) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56012 + (long)(param_1 + -0x2015) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56011 + (long)(param_1 + -0x2c7) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56010 + (long)(param_1 + -0xa1) * 2); } return uVar1; }
35,563
virtual thunk to nglog::LogMessage::LogStream::~LogStream()
ng-log[P]ng-log/src/ng-log/logging.h
class NGLOG_EXPORT LogStream : public std::ostream { NGLOG_MSVC_POP_WARNING() public: // In some cases, like when compiling glog as a static library with GCC and // linking against a Clang-built executable, this constructor will be // removed by the linker. We use this attribute to prevent the linker from // discarding it. NGLOG_USED LogStream(char* buf, int len, int64 ctr) : std::ostream(nullptr), streambuf_(buf, len), ctr_(ctr), self_(this) { rdbuf(&streambuf_); } LogStream(LogStream&& other) noexcept : std::ostream(nullptr), streambuf_(std::move(other.streambuf_)), ctr_(std::exchange(other.ctr_, 0)), self_(this) { rdbuf(&streambuf_); } LogStream& operator=(LogStream&& other) noexcept { streambuf_ = std::move(other.streambuf_); ctr_ = std::exchange(other.ctr_, 0); rdbuf(&streambuf_); return *this; } int64 ctr() const { return ctr_; } void set_ctr(int64 ctr) { ctr_ = ctr; } LogStream* self() const { return self_; } // Legacy std::streambuf methods. size_t pcount() const { return streambuf_.pcount(); } char* pbase() const { return streambuf_.pbase(); } char* str() const { return pbase(); } LogStream(const LogStream&) = delete; LogStream& operator=(const LogStream&) = delete; private: base_logging::LogStreamBuf streambuf_; int64 ctr_; // Counter hack (for the LOG_EVERY_X() macro) LogStream* self_; // Consistency check hack }
O1
c
virtual thunk to nglog::LogMessage::LogStream::~LogStream(): pushq %rbx movq (%rdi), %rax movq -0x18(%rax), %rax leaq 0x26a7f(%rip), %rcx # 0x303e8 leaq 0x58(%rdi,%rax), %rbx movq %rcx, -0x58(%rbx) leaq 0x26a97(%rip), %rcx # 0x30410 movq %rcx, (%rbx) movq 0x275b5(%rip), %rcx # 0x30f38 addq $0x10, %rcx movq %rcx, -0x50(%rbx) addq %rax, %rdi addq $0x40, %rdi callq 0x77b0 movq %rbx, %rdi popq %rbx jmp 0x7170
_ZTv0_n24_N5nglog10LogMessage9LogStreamD1Ev: push rbx mov rax, [rdi] mov rax, [rax-18h] lea rcx, off_303E8 lea rbx, [rdi+rax+58h] mov [rbx-58h], rcx lea rcx, off_30410 mov [rbx], rcx mov rcx, cs:_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ptr add rcx, 10h mov [rbx-50h], rcx add rdi, rax add rdi, 40h ; '@'; this call __ZNSt6localeD1Ev; std::locale::~locale() mov rdi, rbx; this pop rbx jmp __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
void `virtual thunk to'nglog::LogMessage::LogStream::~LogStream(nglog::LogMessage::LogStream *this) { long long v1; // rax std::ios_base *v2; // rbx v1 = *(_QWORD *)(*(_QWORD *)this - 24LL); v2 = (nglog::LogMessage::LogStream *)((char *)this + v1 + 88); *((_QWORD *)v2 - 11) = off_303E8; *(_QWORD *)v2 = off_30410; *((_QWORD *)v2 - 10) = (char *)&`vtable for'std::streambuf + 16; std::locale::~locale((nglog::LogMessage::LogStream *)((char *)this + v1 + 64)); std::ios_base::~ios_base(v2); }
~LogStream: PUSH RBX MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + -0x18] LEA RCX,[0x1303e8] LEA RBX,[RDI + RAX*0x1 + 0x58] MOV qword ptr [RBX + -0x58],RCX LEA RCX,[0x130410] MOV qword ptr [RBX],RCX MOV RCX,qword ptr [0x00130f38] ADD RCX,0x10 MOV qword ptr [RBX + -0x50],RCX ADD RDI,RAX ADD RDI,0x40 CALL 0x001077b0 MOV RDI,RBX POP RBX JMP 0x00107170
/* virtual thunk to nglog::LogMessage::LogStream::~LogStream() */ void __thiscall nglog::LogMessage::LogStream::~LogStream(LogStream *this) { ios_base *this_00; long lVar1; lVar1 = *(long *)(*(long *)this + -0x18); this_00 = (ios_base *)(this + lVar1 + 0x58); *(int ***)(this_00 + -0x58) = &PTR__LogStream_001303e8; *(int ***)this_00 = &PTR__LogStream_00130410; *(int **)(this_00 + -0x50) = PTR_vtable_00130f38 + 0x10; std::locale::~locale((locale *)(this + lVar1 + 0x40)); std::ios_base::~ios_base(this_00); return; }
35,564
virtual thunk to nglog::LogMessage::LogStream::~LogStream()
ng-log[P]ng-log/src/ng-log/logging.h
class NGLOG_EXPORT LogStream : public std::ostream { NGLOG_MSVC_POP_WARNING() public: // In some cases, like when compiling glog as a static library with GCC and // linking against a Clang-built executable, this constructor will be // removed by the linker. We use this attribute to prevent the linker from // discarding it. NGLOG_USED LogStream(char* buf, int len, int64 ctr) : std::ostream(nullptr), streambuf_(buf, len), ctr_(ctr), self_(this) { rdbuf(&streambuf_); } LogStream(LogStream&& other) noexcept : std::ostream(nullptr), streambuf_(std::move(other.streambuf_)), ctr_(std::exchange(other.ctr_, 0)), self_(this) { rdbuf(&streambuf_); } LogStream& operator=(LogStream&& other) noexcept { streambuf_ = std::move(other.streambuf_); ctr_ = std::exchange(other.ctr_, 0); rdbuf(&streambuf_); return *this; } int64 ctr() const { return ctr_; } void set_ctr(int64 ctr) { ctr_ = ctr; } LogStream* self() const { return self_; } // Legacy std::streambuf methods. size_t pcount() const { return streambuf_.pcount(); } char* pbase() const { return streambuf_.pbase(); } char* str() const { return pbase(); } LogStream(const LogStream&) = delete; LogStream& operator=(const LogStream&) = delete; private: base_logging::LogStreamBuf streambuf_; int64 ctr_; // Counter hack (for the LOG_EVERY_X() macro) LogStream* self_; // Consistency check hack }
O2
c
virtual thunk to nglog::LogMessage::LogStream::~LogStream(): pushq %rbx movq %rdi, %rbx callq 0xa2ca movq %rbx, %rdi popq %rbx jmp 0x86e0
_ZN5nglog10LogMessage9LogStreamD0Ev: push rbx mov rbx, rdi call _ZN5nglog10LogMessage9LogStreamD1Ev; nglog::LogMessage::LogStream::~LogStream() mov rdi, rbx pop rbx jmp _free
void nglog::LogMessage::LogStream::~LogStream(nglog::LogMessage::LogStream *this) { nglog::LogMessage::LogStream::~LogStream(this); free(this); }
~LogStream: PUSH RBX MOV RBX,RDI CALL 0x0010a2ca MOV RDI,RBX POP RBX JMP 0x001086e0
/* nglog::LogMessage::LogStream::~LogStream() */ void __thiscall nglog::LogMessage::LogStream::~LogStream(LogStream *this) { ~LogStream(this); free(this); return; }
35,565
virtual thunk to nglog::LogMessage::LogStream::~LogStream()
ng-log[P]ng-log/src/ng-log/logging.h
class NGLOG_EXPORT LogStream : public std::ostream { NGLOG_MSVC_POP_WARNING() public: // In some cases, like when compiling glog as a static library with GCC and // linking against a Clang-built executable, this constructor will be // removed by the linker. We use this attribute to prevent the linker from // discarding it. NGLOG_USED LogStream(char* buf, int len, int64 ctr) : std::ostream(nullptr), streambuf_(buf, len), ctr_(ctr), self_(this) { rdbuf(&streambuf_); } LogStream(LogStream&& other) noexcept : std::ostream(nullptr), streambuf_(std::move(other.streambuf_)), ctr_(std::exchange(other.ctr_, 0)), self_(this) { rdbuf(&streambuf_); } LogStream& operator=(LogStream&& other) noexcept { streambuf_ = std::move(other.streambuf_); ctr_ = std::exchange(other.ctr_, 0); rdbuf(&streambuf_); return *this; } int64 ctr() const { return ctr_; } void set_ctr(int64 ctr) { ctr_ = ctr; } LogStream* self() const { return self_; } // Legacy std::streambuf methods. size_t pcount() const { return streambuf_.pcount(); } char* pbase() const { return streambuf_.pbase(); } char* str() const { return pbase(); } LogStream(const LogStream&) = delete; LogStream& operator=(const LogStream&) = delete; private: base_logging::LogStreamBuf streambuf_; int64 ctr_; // Counter hack (for the LOG_EVERY_X() macro) LogStream* self_; // Consistency check hack }
O3
c
virtual thunk to nglog::LogMessage::LogStream::~LogStream(): pushq %r14 pushq %rbx pushq %rax movq (%rdi), %rax movq -0x18(%rax), %rax leaq (%rdi,%rax), %rbx leaq 0x26c1e(%rip), %rcx # 0x30428 leaq 0x58(%rdi,%rax), %r14 movq %rcx, -0x58(%r14) leaq 0x26c36(%rip), %rcx # 0x30450 movq %rcx, (%r14) movq 0x27714(%rip), %rcx # 0x30f38 addq $0x10, %rcx movq %rcx, -0x50(%r14) addq %rax, %rdi addq $0x40, %rdi callq 0x77b0 movq %r14, %rdi callq 0x7170 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x7670 nop
_ZTv0_n24_N5nglog10LogMessage9LogStreamD0Ev: push r14 push rbx push rax mov rax, [rdi] mov rax, [rax-18h] lea rbx, [rdi+rax] lea rcx, off_30428 lea r14, [rdi+rax+58h] mov [r14-58h], rcx lea rcx, off_30450 mov [r14], rcx mov rcx, cs:_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ptr add rcx, 10h mov [r14-50h], rcx add rdi, rax add rdi, 40h ; '@'; this call __ZNSt6localeD1Ev; std::locale::~locale() mov rdi, r14; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx add rsp, 8 pop rbx pop r14 jmp _free
void `virtual thunk to'nglog::LogMessage::LogStream::~LogStream(nglog::LogMessage::LogStream *this) { _QWORD *v1; // rbx v1 = (_QWORD *)((char *)this + *(_QWORD *)(*(_QWORD *)this - 24LL)); *v1 = off_30428; v1[11] = off_30450; v1[1] = (char *)&`vtable for'std::streambuf + 16; std::locale::~locale((std::locale *)(v1 + 8)); std::ios_base::~ios_base((std::ios_base *)(v1 + 11)); free(v1); }
~LogStream: PUSH R14 PUSH RBX PUSH RAX MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + -0x18] LEA RBX,[RDI + RAX*0x1] LEA RCX,[0x130428] LEA R14,[RDI + RAX*0x1 + 0x58] MOV qword ptr [R14 + -0x58],RCX LEA RCX,[0x130450] MOV qword ptr [R14],RCX MOV RCX,qword ptr [0x00130f38] ADD RCX,0x10 MOV qword ptr [R14 + -0x50],RCX ADD RDI,RAX ADD RDI,0x40 CALL 0x001077b0 MOV RDI,R14 CALL 0x00107170 MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x00107670
/* virtual thunk to nglog::LogMessage::LogStream::~LogStream() */ void __thiscall nglog::LogMessage::LogStream::~LogStream(LogStream *this) { ios_base *this_00; long lVar1; lVar1 = *(long *)(*(long *)this + -0x18); this_00 = (ios_base *)(this + lVar1 + 0x58); *(int ***)(this_00 + -0x58) = &PTR__LogStream_00130428; *(int ***)this_00 = &PTR__LogStream_00130450; *(int **)(this_00 + -0x50) = PTR_vtable_00130f38 + 0x10; std::locale::~locale((locale *)(this + lVar1 + 0x40)); std::ios_base::~ios_base(this_00); free(this + lVar1); return; }
35,566
make_type
eloqsql/mysys/typelib.c
void make_type(register char * to, register uint nr, register TYPELIB *typelib) { DBUG_ENTER("make_type"); if (!nr) to[0]=0; else (void) strmov(to,get_type(typelib,nr-1)); DBUG_VOID_RETURN; }
O0
c
make_type: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) cmpl $0x0, -0xc(%rbp) jne 0x836c2 movq -0x8(%rbp), %rax movb $0x0, (%rax) jmp 0x836e5 movq -0x8(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rdi movl -0xc(%rbp), %esi subl $0x1, %esi callq 0x836f0 movq -0x20(%rbp), %rdi movq %rax, %rsi callq 0x379c0 jmp 0x836e7 jmp 0x836e9 addq $0x20, %rsp popq %rbp retq nop
make_type: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx cmp [rbp+var_C], 0 jnz short loc_836C2 mov rax, [rbp+var_8] mov byte ptr [rax], 0 jmp short loc_836E5 loc_836C2: mov rax, [rbp+var_8] mov [rbp+var_20], rax mov rdi, [rbp+var_18] mov esi, [rbp+var_C] sub esi, 1 call get_type mov rdi, [rbp+var_20] mov rsi, rax call _stpcpy loc_836E5: jmp short $+2 loc_836E7: jmp short $+2 loc_836E9: add rsp, 20h pop rbp retn
long long make_type(_BYTE *a1, int a2, long long a3) { long long result; // rax long long type; // rax if ( a2 ) { type = get_type(a3, (unsigned int)(a2 - 1)); return stpcpy(a1, type); } else { result = (long long)a1; *a1 = 0; } return result; }
make_type: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX CMP dword ptr [RBP + -0xc],0x0 JNZ 0x001836c2 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX],0x0 JMP 0x001836e5 LAB_001836c2: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0xc] SUB ESI,0x1 CALL 0x001836f0 MOV RDI,qword ptr [RBP + -0x20] MOV RSI,RAX CALL 0x001379c0 LAB_001836e5: JMP 0x001836e7 LAB_001836e7: JMP 0x001836e9 LAB_001836e9: ADD RSP,0x20 POP RBP RET
void make_type(char *param_1,int param_2,int8 param_3) { char *__src; if (param_2 == 0) { *param_1 = '\0'; } else { __src = (char *)get_type(param_3,param_2 + -1); stpcpy(param_1,__src); } return; }
35,567
nglog::tools::ShutdownLoggingUtilities()
ng-log[P]ng-log/src/utilities.cc
void ShutdownLoggingUtilities() { CHECK(IsLoggingInitialized()) << "You called ShutdownLogging() without calling " "InitializeLogging() first!"; g_program_invocation_short_name = nullptr; #ifdef HAVE_SYSLOG_H closelog(); #endif }
O0
cpp
nglog::tools::ShutdownLoggingUtilities(): pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp callq 0x4aaa0 xorb $-0x1, %al movb $0x0, -0x69(%rbp) testb $0x1, %al jne 0x4adbc jmp 0x4ae39 leaq 0x41b3(%rip), %rsi # 0x4ef76 leaq -0x68(%rbp), %rdi movq %rdi, -0x90(%rbp) movl $0x134, %edx # imm = 0x134 callq 0x12960 movq -0x90(%rbp), %rdi movb $0x1, -0x69(%rbp) callq 0xe490 movq %rax, -0x88(%rbp) jmp 0x4adf1 movq -0x88(%rbp), %rdi leaq 0x420d(%rip), %rsi # 0x4f00c callq 0x96f0 movq %rax, -0x98(%rbp) jmp 0x4ae0d movq -0x98(%rbp), %rdi leaq 0x4217(%rip), %rsi # 0x4f032 callq 0x96f0 movq %rax, -0xa0(%rbp) jmp 0x4ae29 movq -0xa0(%rbp), %rsi leaq -0x1(%rbp), %rdi callq 0x17cd0 testb $0x1, -0x69(%rbp) jne 0x4ae41 jmp 0x4ae5e leaq -0x68(%rbp), %rdi callq 0x129d0 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x78(%rbp) movl %eax, -0x7c(%rbp) testb $0x1, -0x69(%rbp) jne 0x4ae77 jmp 0x4ae82 movq $0x0, 0x35dbf(%rip) # 0x80c28 callq 0x96e0 addq $0xa0, %rsp popq %rbp retq leaq -0x68(%rbp), %rdi callq 0x129d0 jmp 0x4ae82 jmp 0x4ae84 movq -0x78(%rbp), %rdi callq 0x9d00 movq %rax, %rdi callq 0xbf30 nopw %cs:(%rax,%rax)
_ZN5nglog5tools24ShutdownLoggingUtilitiesEv: push rbp mov rbp, rsp sub rsp, 0A0h call _ZN5nglog20IsLoggingInitializedEv; nglog::IsLoggingInitialized(void) xor al, 0FFh mov [rbp+var_69], 0 test al, 1 jnz short loc_4ADBC jmp short loc_4AE39 loc_4ADBC: lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rbp+var_68]; this mov [rbp+var_90], rdi mov edx, 134h; int call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int) mov rdi, [rbp+var_90]; this mov [rbp+var_69], 1 call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) mov [rbp+var_88], rax jmp short $+2 loc_4ADF1: mov rdi, [rbp+var_88] lea rsi, aCheckFailedIsl_0; "Check failed: IsLoggingInitialized() " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_98], rax jmp short $+2 loc_4AE0D: mov rdi, [rbp+var_98] lea rsi, aYouCalledShutd; "You called ShutdownLogging() without ca"... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_A0], rax jmp short $+2 loc_4AE29: mov rsi, [rbp+var_A0] lea rdi, [rbp+var_1] call _ZNK5nglog8internal17LogMessageVoidifyanERSo; nglog::internal::LogMessageVoidify::operator&(std::ostream &) loc_4AE39: test [rbp+var_69], 1 jnz short loc_4AE41 jmp short loc_4AE5E loc_4AE41: lea rdi, [rbp+var_68]; this call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal() mov rcx, rax mov eax, edx mov [rbp+var_78], rcx mov [rbp+var_7C], eax test [rbp+var_69], 1 jnz short loc_4AE77 jmp short loc_4AE82 loc_4AE5E: mov cs:_ZN5nglogL31g_program_invocation_short_nameE, 0; nglog::g_program_invocation_short_name call _closelog add rsp, 0A0h pop rbp retn loc_4AE77: lea rdi, [rbp+var_68]; this call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal() jmp short $+2 loc_4AE82: jmp short $+2 loc_4AE84: mov rdi, [rbp+var_78] call __Unwind_Resume mov rdi, rax call __clang_call_terminate
long long nglog::tools::ShutdownLoggingUtilities(nglog::tools *this, long long a2) { long long v3; // [rsp+8h] [rbp-98h] long long v4; // [rsp+18h] [rbp-88h] char v5; // [rsp+37h] [rbp-69h] nglog::LogDestination *v6[12]; // [rsp+38h] [rbp-68h] BYREF char v7; // [rsp+9Fh] [rbp-1h] BYREF v5 = 0; if ( !nglog::IsLoggingInitialized(this) ) { nglog::LogMessageFatal::LogMessageFatal( v6, (std::this_thread *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/utilities.cc", 0x134u); v5 = 1; v4 = nglog::LogMessage::stream((nglog::LogMessage *)v6); v3 = std::operator<<<std::char_traits<char>>(v4, "Check failed: IsLoggingInitialized() "); a2 = std::operator<<<std::char_traits<char>>( v3, "You called ShutdownLogging() without calling InitializeLogging() first!"); this = (nglog::tools *)&v7; nglog::internal::LogMessageVoidify::operator&(); } if ( (v5 & 1) != 0 ) nglog::LogMessageFatal::~LogMessageFatal(v6); nglog::g_program_invocation_short_name = 0LL; return closelog(this, a2); }
ShutdownLoggingUtilities: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 CALL 0x0014aaa0 XOR AL,0xff MOV byte ptr [RBP + -0x69],0x0 TEST AL,0x1 JNZ 0x0014adbc JMP 0x0014ae39 LAB_0014adbc: LEA RSI,[0x14ef76] LEA RDI,[RBP + -0x68] MOV qword ptr [RBP + -0x90],RDI MOV EDX,0x134 CALL 0x00112960 MOV RDI,qword ptr [RBP + -0x90] MOV byte ptr [RBP + -0x69],0x1 LAB_0014ade3: CALL 0x0010e490 MOV qword ptr [RBP + -0x88],RAX JMP 0x0014adf1 LAB_0014adf1: MOV RDI,qword ptr [RBP + -0x88] LEA RSI,[0x14f00c] CALL 0x001096f0 MOV qword ptr [RBP + -0x98],RAX JMP 0x0014ae0d LAB_0014ae0d: MOV RDI,qword ptr [RBP + -0x98] LEA RSI,[0x14f032] CALL 0x001096f0 LAB_0014ae20: MOV qword ptr [RBP + -0xa0],RAX JMP 0x0014ae29 LAB_0014ae29: MOV RSI,qword ptr [RBP + -0xa0] LEA RDI,[RBP + -0x1] CALL 0x00117cd0 LAB_0014ae39: TEST byte ptr [RBP + -0x69],0x1 JNZ 0x0014ae41 JMP 0x0014ae5e LAB_0014ae41: LEA RDI,[RBP + -0x68] CALL 0x001129d0 LAB_0014ae4a: MOV RCX,RAX MOV EAX,EDX MOV qword ptr [RBP + -0x78],RCX MOV dword ptr [RBP + -0x7c],EAX TEST byte ptr [RBP + -0x69],0x1 JNZ 0x0014ae77 JMP 0x0014ae82 LAB_0014ae5e: MOV qword ptr [0x00180c28],0x0 CALL 0x001096e0 ADD RSP,0xa0 POP RBP RET LAB_0014ae77: LEA RDI,[RBP + -0x68] CALL 0x001129d0 LAB_0014ae80: JMP 0x0014ae82 LAB_0014ae82: JMP 0x0014ae84 LAB_0014ae84: MOV RDI,qword ptr [RBP + -0x78] CALL 0x00109d00
/* nglog::tools::ShutdownLoggingUtilities() */ void nglog::tools::ShutdownLoggingUtilities(void) { byte bVar1; ostream *poVar2; int8 uVar3; bool bVar4; LogMessageFatal local_70 [103]; LogMessageVoidify local_9; bVar1 = IsLoggingInitialized(); bVar4 = ((bVar1 ^ 0xff) & 1) != 0; if (bVar4) { LogMessageFatal::LogMessageFatal (local_70,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/utilities.cc", 0x134); /* try { // try from 0014ade3 to 0014ae1f has its CatchHandler @ 0014ae4a */ poVar2 = (ostream *)LogMessage::stream((LogMessage *)local_70); poVar2 = std::operator<<(poVar2,"Check failed: IsLoggingInitialized() "); poVar2 = std::operator<<(poVar2, "You called ShutdownLogging() without calling InitializeLogging() first!" ); internal::LogMessageVoidify::operator&(&local_9,poVar2); uVar3 = LogMessageFatal::~LogMessageFatal(local_70); /* catch(type#1 @ 00000000) { ... } // from try @ 0014ade3 with catch @ 0014ae4a */ if (bVar4) { /* try { // try from 0014ae77 to 0014ae7f has its CatchHandler @ 0014ae8d */ LogMessageFatal::~LogMessageFatal(local_70); } /* WARNING: Subroutine does not return */ _Unwind_Resume(uVar3); } g_program_invocation_short_name = 0; closelog(); return; }
35,568
test_if_reopen
eloqsql/storage/myisam/mi_open.c
MI_INFO *test_if_reopen(char *filename) { LIST *pos; for (pos=myisam_open_list ; pos ; pos=pos->next) { MI_INFO *info=(MI_INFO*) pos->data; MYISAM_SHARE *share=info->s; DBUG_ASSERT(strcmp(share->unique_file_name,filename) || share->last_version); if (!strcmp(share->unique_file_name,filename) && share->last_version) return info; } return 0; }
O0
c
test_if_reopen: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) leaq 0xbc80cd(%rip), %rax # 0xc7a550 movq (%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0xb24eb movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) jmp 0xb24aa movq -0x28(%rbp), %rax movq 0x258(%rax), %rdi movq -0x10(%rbp), %rsi callq 0x2a660 cmpl $0x0, %eax jne 0xb24db movq -0x28(%rbp), %rax cmpq $0x0, 0x310(%rax) je 0xb24db movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xb24f3 jmp 0xb24dd movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rbp) jmp 0xb248a movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax)
test_if_reopen: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi lea rax, myisam_open_list mov rax, [rax] mov [rbp+var_18], rax loc_B248A: cmp [rbp+var_18], 0 jz short loc_B24EB mov rax, [rbp+var_18] mov rax, [rax+10h] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_28], rax jmp short $+2 loc_B24AA: mov rax, [rbp+var_28] mov rdi, [rax+258h] mov rsi, [rbp+var_10] call _strcmp cmp eax, 0 jnz short loc_B24DB mov rax, [rbp+var_28] cmp qword ptr [rax+310h], 0 jz short loc_B24DB mov rax, [rbp+var_20] mov [rbp+var_8], rax jmp short loc_B24F3 loc_B24DB: jmp short $+2 loc_B24DD: mov rax, [rbp+var_18] mov rax, [rax+8] mov [rbp+var_18], rax jmp short loc_B248A loc_B24EB: mov [rbp+var_8], 0 loc_B24F3: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long * test_if_reopen(long long a1) { long long v2; // [rsp+8h] [rbp-28h] long long *v3; // [rsp+10h] [rbp-20h] long long i; // [rsp+18h] [rbp-18h] for ( i = myisam_open_list; i; i = *(_QWORD *)(i + 8) ) { v3 = *(long long **)(i + 16); v2 = *v3; if ( !(unsigned int)strcmp(*(_QWORD *)(*v3 + 600), a1) && *(_QWORD *)(v2 + 784) ) return v3; } return 0LL; }
test_if_reopen: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI LEA RAX,[0xd7a550] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX LAB_001b248a: CMP qword ptr [RBP + -0x18],0x0 JZ 0x001b24eb MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX JMP 0x001b24aa LAB_001b24aa: MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX + 0x258] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0012a660 CMP EAX,0x0 JNZ 0x001b24db MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX + 0x310],0x0 JZ 0x001b24db MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX JMP 0x001b24f3 LAB_001b24db: JMP 0x001b24dd LAB_001b24dd: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x18],RAX JMP 0x001b248a LAB_001b24eb: MOV qword ptr [RBP + -0x8],0x0 LAB_001b24f3: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
long * test_if_reopen(char *param_1) { long *plVar1; long lVar2; int iVar3; long local_20; local_20 = myisam_open_list; while( true ) { if (local_20 == 0) { return (long *)0x0; } plVar1 = *(long **)(local_20 + 0x10); lVar2 = *plVar1; iVar3 = strcmp(*(char **)(lVar2 + 600),param_1); if ((iVar3 == 0) && (*(long *)(lVar2 + 0x310) != 0)) break; local_20 = *(long *)(local_20 + 8); } return plVar1; }
35,569
intern_filename
eloqsql/mysys/mf_pack.c
char *intern_filename(char *to, const char *from) { size_t length, to_length; char buff[FN_REFLEN + 1]; if (from == to) { /* Dirname may destroy from */ (void) strnmov(buff, from, FN_REFLEN); from=buff; } length= dirname_part(to, from, &to_length); /* Copy dirname & fix chars */ (void) strnmov(to + to_length, from + length, FN_REFLEN - to_length); return (to); }
O0
c
intern_filename: pushq %rbp movq %rsp, %rbp subq $0x240, %rsp # imm = 0x240 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x218(%rbp) movq %rsi, -0x220(%rbp) movq -0x220(%rbp), %rax cmpq -0x218(%rbp), %rax jne 0x2d52c leaq -0x210(%rbp), %rdi movq -0x220(%rbp), %rsi movl $0x200, %edx # imm = 0x200 callq 0x76fd0 leaq -0x210(%rbp), %rax movq %rax, -0x220(%rbp) movq -0x218(%rbp), %rdi movq -0x220(%rbp), %rsi leaq -0x230(%rbp), %rdx callq 0x2d000 movq %rax, -0x228(%rbp) movq -0x218(%rbp), %rdi movq -0x230(%rbp), %rax addq %rax, %rdi movq -0x220(%rbp), %rsi movq -0x228(%rbp), %rcx addq %rcx, %rsi movl $0x200, %edx # imm = 0x200 subq %rax, %rdx callq 0x76fd0 movq -0x218(%rbp), %rax movq %rax, -0x238(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x2d5ac movq -0x238(%rbp), %rax addq $0x240, %rsp # imm = 0x240 popq %rbp retq callq 0x242e0 nopw %cs:(%rax,%rax)
intern_filename: push rbp mov rbp, rsp sub rsp, 240h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], rdi mov [rbp+var_220], rsi mov rax, [rbp+var_220] cmp rax, [rbp+var_218] jnz short loc_2D52C lea rdi, [rbp+var_210] mov rsi, [rbp+var_220] mov edx, 200h call strnmov lea rax, [rbp+var_210] mov [rbp+var_220], rax loc_2D52C: mov rdi, [rbp+var_218] mov rsi, [rbp+var_220] lea rdx, [rbp+var_230] call dirname_part mov [rbp+var_228], rax mov rdi, [rbp+var_218] mov rax, [rbp+var_230] add rdi, rax mov rsi, [rbp+var_220] mov rcx, [rbp+var_228] add rsi, rcx mov edx, 200h sub rdx, rax call strnmov mov rax, [rbp+var_218] mov [rbp+var_238], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_2D5AC mov rax, [rbp+var_238] add rsp, 240h pop rbp retn loc_2D5AC: call ___stack_chk_fail
long long intern_filename(long long a1, _BYTE *a2) { long long v3; // [rsp+10h] [rbp-230h] BYREF long long v4; // [rsp+18h] [rbp-228h] _BYTE *v5; // [rsp+20h] [rbp-220h] long long v6; // [rsp+28h] [rbp-218h] _BYTE v7[520]; // [rsp+30h] [rbp-210h] BYREF unsigned long long v8; // [rsp+238h] [rbp-8h] v8 = __readfsqword(0x28u); v6 = a1; v5 = a2; if ( a2 == (_BYTE *)a1 ) { strnmov(v7, v5, 512LL); v5 = v7; } v4 = dirname_part(v6, v5, &v3); strnmov(v3 + v6, &v5[v4], 512 - v3); return v6; }
intern_filename: PUSH RBP MOV RBP,RSP SUB RSP,0x240 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x218],RDI MOV qword ptr [RBP + -0x220],RSI MOV RAX,qword ptr [RBP + -0x220] CMP RAX,qword ptr [RBP + -0x218] JNZ 0x0012d52c LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x220] MOV EDX,0x200 CALL 0x00176fd0 LEA RAX,[RBP + -0x210] MOV qword ptr [RBP + -0x220],RAX LAB_0012d52c: MOV RDI,qword ptr [RBP + -0x218] MOV RSI,qword ptr [RBP + -0x220] LEA RDX,[RBP + -0x230] CALL 0x0012d000 MOV qword ptr [RBP + -0x228],RAX MOV RDI,qword ptr [RBP + -0x218] MOV RAX,qword ptr [RBP + -0x230] ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x220] MOV RCX,qword ptr [RBP + -0x228] ADD RSI,RCX MOV EDX,0x200 SUB RDX,RAX CALL 0x00176fd0 MOV RAX,qword ptr [RBP + -0x218] MOV qword ptr [RBP + -0x238],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0012d5ac MOV RAX,qword ptr [RBP + -0x238] ADD RSP,0x240 POP RBP RET LAB_0012d5ac: CALL 0x001242e0
int1 * intern_filename(int1 *param_1,int1 *param_2) { long in_FS_OFFSET; long local_238; long local_230; int1 *local_228; int1 *local_220; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_228 = param_2; local_220 = param_1; if (param_2 == param_1) { strnmov(local_218,param_2,0x200); local_228 = local_218; } local_230 = dirname_part(local_220,local_228,&local_238); strnmov(local_220 + local_238,local_228 + local_230,0x200 - local_238); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_220; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
35,570
intern_filename
eloqsql/mysys/mf_pack.c
char *intern_filename(char *to, const char *from) { size_t length, to_length; char buff[FN_REFLEN + 1]; if (from == to) { /* Dirname may destroy from */ (void) strnmov(buff, from, FN_REFLEN); from=buff; } length= dirname_part(to, from, &to_length); /* Copy dirname & fix chars */ (void) strnmov(to + to_length, from + length, FN_REFLEN - to_length); return (to); }
O3
c
intern_filename: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x228, %rsp # imm = 0x228 movq %rsi, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x20(%rbp) cmpq %rdi, %rsi jne 0x2a0db leaq -0x230(%rbp), %r15 movl $0x200, %edx # imm = 0x200 movq %r15, %rdi movq %r14, %rsi callq 0x5a154 movq %r15, %r14 leaq -0x238(%rbp), %r15 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x29ded movq (%r15), %rcx leaq (%rbx,%rcx), %rdi addq %rax, %r14 movl $0x200, %edx # imm = 0x200 subq %rcx, %rdx movq %r14, %rsi callq 0x5a154 movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x2a12a movq %rbx, %rax addq $0x228, %rsp # imm = 0x228 popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x24330
intern_filename: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 228h mov r14, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_20], rax cmp rsi, rdi jnz short loc_2A0DB lea r15, [rbp+var_230] mov edx, 200h mov rdi, r15 mov rsi, r14 call strnmov mov r14, r15 loc_2A0DB: lea r15, [rbp+var_238] mov rdi, rbx mov rsi, r14 mov rdx, r15 call dirname_part mov rcx, [r15] lea rdi, [rbx+rcx] add r14, rax mov edx, 200h sub rdx, rcx mov rsi, r14 call strnmov mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_2A12A mov rax, rbx add rsp, 228h pop rbx pop r14 pop r15 pop rbp retn loc_2A12A: call ___stack_chk_fail
long long intern_filename(long long a1, _BYTE *a2) { _BYTE *v2; // r14 long long v3; // rax long long v5; // [rsp+8h] [rbp-238h] BYREF _BYTE v6[528]; // [rsp+10h] [rbp-230h] BYREF unsigned long long v7; // [rsp+220h] [rbp-20h] v2 = a2; v7 = __readfsqword(0x28u); if ( a2 == (_BYTE *)a1 ) { strnmov(v6, a2, 512LL); v2 = v6; } v3 = dirname_part(a1, v2, &v5); strnmov(a1 + v5, &v2[v3], 512 - v5); return a1; }
intern_filename: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x228 MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX CMP RSI,RDI JNZ 0x0012a0db LEA R15,[RBP + -0x230] MOV EDX,0x200 MOV RDI,R15 MOV RSI,R14 CALL 0x0015a154 MOV R14,R15 LAB_0012a0db: LEA R15,[RBP + -0x238] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00129ded MOV RCX,qword ptr [R15] LEA RDI,[RBX + RCX*0x1] ADD R14,RAX MOV EDX,0x200 SUB RDX,RCX MOV RSI,R14 CALL 0x0015a154 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x0012a12a MOV RAX,RBX ADD RSP,0x228 POP RBX POP R14 POP R15 POP RBP RET LAB_0012a12a: CALL 0x00124330
int1 * intern_filename(int1 *param_1,int1 *param_2) { long lVar1; int1 *puVar2; long in_FS_OFFSET; long local_240; int1 local_238 [528]; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); puVar2 = param_2; if (param_2 == param_1) { puVar2 = local_238; strnmov(puVar2,param_2,0x200); } lVar1 = dirname_part(param_1,puVar2,&local_240); strnmov(param_1 + local_240,puVar2 + lVar1,0x200 - local_240); if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return param_1; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
35,571
u07toa_shift
bluesky950520[P]quickjs/cutils.c
static size_t u07toa_shift(char dest[minimum_length(8)], uint32_t n, size_t len) { size_t i; dest += len; dest[7] = '\0'; for (i = 7; i-- > 1;) { uint32_t quo = n % 10; n /= 10; dest[i] = (char)('0' + quo); } dest[i] = (char)('0' + n); return len + 7; }
O0
c
u07toa_shift: movq %rdi, -0x8(%rsp) movl %esi, -0xc(%rsp) movq %rdx, -0x18(%rsp) movq -0x18(%rsp), %rax addq -0x8(%rsp), %rax movq %rax, -0x8(%rsp) movq -0x8(%rsp), %rax movb $0x0, 0x7(%rax) movq $0x7, -0x20(%rsp) movq -0x20(%rsp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x20(%rsp) cmpq $0x1, %rax jbe 0x1f940 movl -0xc(%rsp), %eax movl $0xa, %ecx xorl %edx, %edx divl %ecx movl %edx, -0x24(%rsp) movl -0xc(%rsp), %eax movl $0xa, %ecx xorl %edx, %edx divl %ecx movl %eax, -0xc(%rsp) movl -0x24(%rsp), %eax addl $0x30, %eax movb %al, %dl movq -0x8(%rsp), %rax movq -0x20(%rsp), %rcx movb %dl, (%rax,%rcx) jmp 0x1f8ef movl -0xc(%rsp), %eax addl $0x30, %eax movb %al, %dl movq -0x8(%rsp), %rax movq -0x20(%rsp), %rcx movb %dl, (%rax,%rcx) movq -0x18(%rsp), %rax addq $0x7, %rax retq
u07toa_shift: mov [rsp+var_8], rdi mov [rsp+var_C], esi mov [rsp+var_18], rdx mov rax, [rsp+var_18] add rax, [rsp+var_8] mov [rsp+var_8], rax mov rax, [rsp+var_8] mov byte ptr [rax+7], 0 mov [rsp+var_20], 7 loc_1F8EF: mov rax, [rsp+var_20] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rsp+var_20], rcx cmp rax, 1 jbe short loc_1F940 mov eax, [rsp+var_C] mov ecx, 0Ah xor edx, edx div ecx mov [rsp+var_24], edx mov eax, [rsp+var_C] mov ecx, 0Ah xor edx, edx div ecx mov [rsp+var_C], eax mov eax, [rsp+var_24] add eax, 30h ; '0' mov dl, al mov rax, [rsp+var_8] mov rcx, [rsp+var_20] mov [rax+rcx], dl jmp short loc_1F8EF loc_1F940: mov eax, [rsp+var_C] add eax, 30h ; '0' mov dl, al mov rax, [rsp+var_8] mov rcx, [rsp+var_20] mov [rax+rcx], dl mov rax, [rsp+var_18] add rax, 7 retn
long long u07toa_shift(long long a1, unsigned int a2, long long a3) { unsigned long long v3; // rax unsigned int v5; // [rsp+0h] [rbp-24h] long long i; // [rsp+4h] [rbp-20h] long long v8; // [rsp+1Ch] [rbp-8h] v8 = a1 + a3; *(_BYTE *)(a1 + a3 + 7) = 0; for ( i = 7LL; ; *(_BYTE *)(v8 + i) = v5 + 48 ) { v3 = i--; if ( v3 <= 1 ) break; v5 = a2 % 0xA; a2 /= 0xAu; } *(_BYTE *)(v8 + i) = a2 + 48; return a3 + 7; }
u07toa_shift: MOV qword ptr [RSP + -0x8],RDI MOV dword ptr [RSP + -0xc],ESI MOV qword ptr [RSP + -0x18],RDX MOV RAX,qword ptr [RSP + -0x18] ADD RAX,qword ptr [RSP + -0x8] MOV qword ptr [RSP + -0x8],RAX MOV RAX,qword ptr [RSP + -0x8] MOV byte ptr [RAX + 0x7],0x0 MOV qword ptr [RSP + -0x20],0x7 LAB_0011f8ef: MOV RAX,qword ptr [RSP + -0x20] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RSP + -0x20],RCX CMP RAX,0x1 JBE 0x0011f940 MOV EAX,dword ptr [RSP + -0xc] MOV ECX,0xa XOR EDX,EDX DIV ECX MOV dword ptr [RSP + -0x24],EDX MOV EAX,dword ptr [RSP + -0xc] MOV ECX,0xa XOR EDX,EDX DIV ECX MOV dword ptr [RSP + -0xc],EAX MOV EAX,dword ptr [RSP + -0x24] ADD EAX,0x30 MOV DL,AL MOV RAX,qword ptr [RSP + -0x8] MOV RCX,qword ptr [RSP + -0x20] MOV byte ptr [RAX + RCX*0x1],DL JMP 0x0011f8ef LAB_0011f940: MOV EAX,dword ptr [RSP + -0xc] ADD EAX,0x30 MOV DL,AL MOV RAX,qword ptr [RSP + -0x8] MOV RCX,qword ptr [RSP + -0x20] MOV byte ptr [RAX + RCX*0x1],DL MOV RAX,qword ptr [RSP + -0x18] ADD RAX,0x7 RET
long u07toa_shift(long param_1,uint param_2,long param_3) { ulong uVar1; uint uVar2; int8 local_20; int4 local_c; param_1 = param_3 + param_1; *(int1 *)(param_1 + 7) = 0; local_20 = 7; local_c = param_2; while (uVar1 = local_20 - 1, 1 < local_20) { uVar2 = local_c % 10; local_c = local_c / 10; *(char *)(param_1 + uVar1) = (char)uVar2 + '0'; local_20 = uVar1; } *(char *)(param_1 + uVar1) = (char)local_c + '0'; return param_3 + 7; }
35,572
u07toa_shift
bluesky950520[P]quickjs/cutils.c
static size_t u07toa_shift(char dest[minimum_length(8)], uint32_t n, size_t len) { size_t i; dest += len; dest[7] = '\0'; for (i = 7; i-- > 1;) { uint32_t quo = n % 10; n /= 10; dest[i] = (char)('0' + quo); } dest[i] = (char)('0' + n); return len + 7; }
O2
c
u07toa_shift: movq %rdx, %rcx movl %esi, %eax addq %rdx, %rdi pushq $0x7 popq %rsi xorl %edx, %edx pushq $0xa popq %r8 movb %dl, (%rdi,%rsi) cmpq $0x2, %rsi jb 0x1653c decq %rsi xorl %edx, %edx divl %r8d orb $0x30, %dl jmp 0x16526 addb $0x30, %al movb %al, (%rdi) addq $0x7, %rcx movq %rcx, %rax retq
u07toa_shift: mov rcx, rdx mov eax, esi add rdi, rdx push 7 pop rsi xor edx, edx push 0Ah pop r8 loc_16526: mov [rdi+rsi], dl cmp rsi, 2 jb short loc_1653C dec rsi xor edx, edx div r8d or dl, 30h jmp short loc_16526 loc_1653C: add al, 30h ; '0' mov [rdi], al add rcx, 7 mov rax, rcx retn
long long u07toa_shift(long long a1, unsigned int a2, long long a3) { _BYTE *v5; // rdi unsigned long long v6; // rsi char i; // dl unsigned int v8; // et2 v5 = (_BYTE *)(a3 + a1); v6 = 7LL; for ( i = 0; ; i = v8 | 0x30 ) { v5[v6] = i; if ( v6 < 2 ) break; --v6; v8 = a2 % 0xA; a2 /= 0xAu; } *v5 = a2 + 48; return a3 + 7; }
u07toa_shift: MOV RCX,RDX MOV EAX,ESI ADD RDI,RDX PUSH 0x7 POP RSI XOR EDX,EDX PUSH 0xa POP R8 LAB_00116526: MOV byte ptr [RDI + RSI*0x1],DL CMP RSI,0x2 JC 0x0011653c DEC RSI XOR EDX,EDX DIV R8D OR DL,0x30 JMP 0x00116526 LAB_0011653c: ADD AL,0x30 MOV byte ptr [RDI],AL ADD RCX,0x7 MOV RAX,RCX RET
long u07toa_shift(long param_1,uint param_2,long param_3) { ulong uVar1; ulong uVar2; uVar1 = 0; for (uVar2 = 7; ((char *)(param_1 + param_3))[uVar2] = (char)uVar1, 1 < uVar2; uVar2 = uVar2 - 1) { uVar1 = (ulong)param_2; param_2 = param_2 / 10; uVar1 = uVar1 % 10 | 0x30; } *(char *)(param_1 + param_3) = (char)param_2 + '0'; return param_3 + 7; }
35,573
int fmt::v10::detail::count_digits<4, unsigned long>(unsigned long)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
FMT_CONSTEXPR auto count_digits(UInt n) -> int { #ifdef FMT_BUILTIN_CLZ if (!is_constant_evaluated() && num_bits<UInt>() == 32) return (FMT_BUILTIN_CLZ(static_cast<uint32_t>(n) | 1) ^ 31) / BITS + 1; #endif // Lambda avoids unreachable code warnings from NVHPC. return [](UInt m) { int num_digits = 0; do { ++num_digits; } while ((m >>= BITS) != 0); return num_digits; }(n); }
O0
c
int fmt::v10::detail::count_digits<4, unsigned long>(unsigned long): subq $0x48, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x38(%rsp) movq 0x30(%rsp), %rax movq 0x38(%rsp), %rcx movq %rcx, 0x28(%rsp) movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax movq 0x28(%rsp), %rcx movq %rcx, 0x8(%rsp) movq %rax, (%rsp) movq (%rsp), %rsi movq 0x8(%rsp), %rdx leaq 0x1f(%rsp), %rdi callq 0xa8cf0 addq $0x48, %rsp retq nopl (%rax)
_ZN3fmt3v106detail12count_digitsILi3EoEEiT0_: sub rsp, 48h mov [rsp+48h+var_18], rdi mov [rsp+48h+var_10], rsi mov rax, [rsp+48h+var_18] mov rcx, [rsp+48h+var_10] mov [rsp+48h+var_20], rcx mov [rsp+48h+var_28], rax mov rax, [rsp+48h+var_28] mov rcx, [rsp+48h+var_20] mov [rsp+48h+var_40], rcx mov [rsp+48h+var_48], rax mov rsi, [rsp+48h+var_48] mov rdx, [rsp+48h+var_40] lea rdi, [rsp+48h+var_29] call _ZZN3fmt3v106detail12count_digitsILi3EoEEiT0_ENKUloE_clEo; fmt::v10::detail::count_digits<3,unsigned __int128>(unsigned __int128)::{lambda(unsigned __int128)#1}::operator()(unsigned __int128) add rsp, 48h retn
long long fmt::v10::detail::count_digits<3,unsigned __int128>(long long a1, long long a2) { char v3; // [rsp+1Fh] [rbp-29h] BYREF long long v4; // [rsp+20h] [rbp-28h] long long v5; // [rsp+28h] [rbp-20h] long long v6; // [rsp+30h] [rbp-18h] long long v7; // [rsp+38h] [rbp-10h] v6 = a1; v7 = a2; v5 = a2; v4 = a1; return fmt::v10::detail::count_digits<3,unsigned __int128>(unsigned __int128)::{lambda(unsigned __int128)#1}::operator()( &v3, a1, a2); }
count_digits<3,unsigned__int128>: SUB RSP,0x48 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x38],RSI MOV RAX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x28],RCX MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x8],RCX MOV qword ptr [RSP],RAX MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] LEA RDI,[RSP + 0x1f] CALL 0x001a8cf0 ADD RSP,0x48 RET
/* int fmt::v10::detail::count_digits<3, unsigned __int128>(unsigned __int128) */ int __thiscall fmt::v10::detail::count_digits<3,unsigned__int128>(detail *this,uint param_1) { int iVar1; int4 in_register_00000034; _lambda_unsigned__int128__1_ local_29; detail *local_28; int8 local_20; detail *local_18; int8 local_10; local_20 = CONCAT44(in_register_00000034,param_1); local_28 = this; local_18 = this; local_10 = local_20; iVar1 = count_digits<3,unsigned__int128>(unsigned__int128)::{lambda(unsigned__int128)#1}:: operator()(&local_29,(uint)this); return iVar1; }
35,574
llama_state_save_file
monkey531[P]llama/src/llama-context.cpp
bool llama_state_save_file(struct llama_context * ctx, const char * path_session, const llama_token * tokens, size_t n_token_count) { try { return llama_state_save_file_internal(ctx, path_session, tokens, n_token_count); } catch (const std::exception & err) { LLAMA_LOG_ERROR("%s: error saving session file: %s\n", __func__, err.what()); return false; } }
O3
cpp
llama_state_save_file: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rcx, %r14 movq %rdx, %r15 movq %rdi, %rbx leaq 0x75f5d(%rip), %rdx # 0x115179 movq %rsp, %rdi callq 0x6c400 movq %rsp, %rdi movl $0x6767736e, %esi # imm = 0x6767736E callq 0x666c0 movq %rsp, %rdi movl $0x9, %esi callq 0x666c0 movq %rsp, %rdi movl %r14d, %esi callq 0x666c0 shlq $0x2, %r14 movq %rsp, %r12 movq %r12, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x6ba50 movq 0xbd94b(%rip), %r15 # 0x15cbb0 addq $0x10, %r15 leaq 0x8(%rsp), %rsi movq %r15, (%rsi) movq %r12, 0x8(%rsi) xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rsi) movups %xmm0, 0x20(%rsi) movq %rbx, %rdi callq 0x9f34c movq %r15, 0x8(%rsp) movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x9f2a4 movq 0x30(%rsp), %rsi subq %rdi, %rsi callq 0x681a0 movq %rsp, %rdi callq 0x69c00 movb $0x1, %al addq $0x38, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rdx, %r14 movq %rax, %rbx movq %r15, 0x8(%rsp) movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x9f2ec movq 0x30(%rsp), %rsi subq %rdi, %rsi callq 0x681a0 jmp 0x9f2ec movq %rdx, %r14 movq %rax, %rbx jmp 0x9f2f4 movq %rdx, %r14 movq %rax, %rbx movq %rsp, %rdi callq 0x69c00 cmpl $0x1, %r14d jne 0x9f33c movq %rbx, %rdi callq 0x65780 movq (%rax), %rcx movq %rax, %rdi callq *0x10(%rcx) leaq 0x75723(%rip), %rsi # 0x114a35 leaq 0x7573f(%rip), %rdx # 0x114a58 movl $0x4, %edi movq %rax, %rcx xorl %eax, %eax callq 0x67d20 callq 0x6ab40 xorl %eax, %eax jmp 0x9f2ae movq %rax, %rbx callq 0x6ab40 movq %rbx, %rdi callq 0x6b5d0 movq %rax, %rdi callq 0x76683
llama_state_save_file: push r15 push r14 push r12 push rbx sub rsp, 38h mov r14, rcx mov r15, rdx mov rbx, rdi lea rdx, aWb; "wb" mov rdi, rsp; this call __ZN10llama_fileC2EPKcS1_; llama_file::llama_file(char const*,char const*) mov rdi, rsp; this mov esi, 6767736Eh; unsigned int call __ZNK10llama_file9write_u32Ej; llama_file::write_u32(uint) mov rdi, rsp; this mov esi, 9; unsigned int call __ZNK10llama_file9write_u32Ej; llama_file::write_u32(uint) mov rdi, rsp; this mov esi, r14d; unsigned int call __ZNK10llama_file9write_u32Ej; llama_file::write_u32(uint) shl r14, 2 mov r12, rsp mov rdi, r12; this mov rsi, r15; void * mov rdx, r14; unsigned __int64 call __ZNK10llama_file9write_rawEPKvm; llama_file::write_raw(void const*,ulong) mov r15, cs:_ZTV21llama_data_write_file_ptr add r15, 10h lea rsi, [rsp+58h+var_50]; this mov [rsi], r15 mov [rsi+8], r12 xorps xmm0, xmm0 movups xmmword ptr [rsi+10h], xmm0 movups xmmword ptr [rsi+20h], xmm0 mov rdi, rbx; llama_context * call _ZL29llama_state_get_data_internalP13llama_contextR16llama_data_write; llama_state_get_data_internal(llama_context *,llama_data_write &) mov [rsp+58h+var_50], r15 mov rdi, [rsp+58h+var_38]; void * test rdi, rdi jz short loc_9F2A4 mov rsi, [rsp+58h+var_28] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9F2A4: mov rdi, rsp; this call __ZN10llama_fileD2Ev; llama_file::~llama_file() mov al, 1 loc_9F2AE: add rsp, 38h pop rbx pop r12 pop r14 pop r15 retn mov r14, rdx mov rbx, rax mov [rsp+58h+var_50], r15 mov rdi, [rsp+58h+var_38]; void * test rdi, rdi jz short loc_9F2EC mov rsi, [rsp+58h+var_28] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9F2EC mov r14, rdx mov rbx, rax jmp short loc_9F2F4 mov r14, rdx mov rbx, rax loc_9F2EC: mov rdi, rsp; this call __ZN10llama_fileD2Ev; llama_file::~llama_file() loc_9F2F4: cmp r14d, 1 jnz short loc_9F33C mov rdi, rbx; void * call ___cxa_begin_catch mov rcx, [rax] mov rdi, rax call qword ptr [rcx+10h] lea rsi, aSErrorSavingSe; "%s: error saving session file: %s\n" lea rdx, aLlamaStateSave_0; "llama_state_save_file" mov edi, 4 mov rcx, rax xor eax, eax call __Z18llama_log_internal14ggml_log_levelPKcz; llama_log_internal(ggml_log_level,char const*,...) call ___cxa_end_catch xor eax, eax jmp loc_9F2AE mov rbx, rax call ___cxa_end_catch loc_9F33C: mov rdi, rbx call __Unwind_Resume mov rdi, rax call __clang_call_terminate
char llama_state_save_file(llama_context *a1, const char *a2, const void *a3, long long a4) { long long v7; // [rsp+0h] [rbp-58h] BYREF _QWORD v8[2]; // [rsp+8h] [rbp-50h] BYREF __int128 v9; // [rsp+18h] [rbp-40h] __int128 v10; // [rsp+28h] [rbp-30h] llama_file::llama_file((llama_file *)&v7, a2, "wb"); llama_file::write_u32((llama_file *)&v7, 0x6767736Eu); llama_file::write_u32((llama_file *)&v7, 9u); llama_file::write_u32((llama_file *)&v7, a4); llama_file::write_raw((llama_file *)&v7, a3, 4 * a4); v8[0] = &`vtable for'llama_data_write_file + 2; v8[1] = &v7; v9 = 0LL; v10 = 0LL; llama_state_get_data_internal(a1, (llama_data_write *)v8); v8[0] = &`vtable for'llama_data_write_file + 2; if ( *((_QWORD *)&v9 + 1) ) operator delete(*((void **)&v9 + 1), *((_QWORD *)&v10 + 1) - *((_QWORD *)&v9 + 1)); llama_file::~llama_file((llama_file *)&v7); return 1; }
llama_state_save_file: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,RCX MOV R15,RDX MOV RBX,RDI LAB_0019f215: LEA RDX,[0x215179] MOV RDI,RSP CALL 0x0016c400 LAB_0019f224: MOV RDI,RSP MOV ESI,0x6767736e CALL 0x001666c0 MOV RDI,RSP MOV ESI,0x9 CALL 0x001666c0 MOV RDI,RSP MOV ESI,R14D CALL 0x001666c0 SHL R14,0x2 MOV R12,RSP MOV RDI,R12 MOV RSI,R15 MOV RDX,R14 CALL 0x0016ba50 MOV R15,qword ptr [0x0025cbb0] ADD R15,0x10 LEA RSI,[RSP + 0x8] MOV qword ptr [RSI],R15 MOV qword ptr [RSI + 0x8],R12 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI + 0x10],XMM0 MOVUPS xmmword ptr [RSI + 0x20],XMM0 LAB_0019f280: MOV RDI,RBX CALL 0x0019f34c LAB_0019f288: MOV qword ptr [RSP + 0x8],R15 MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x0019f2a4 MOV RSI,qword ptr [RSP + 0x30] SUB RSI,RDI CALL 0x001681a0 LAB_0019f2a4: MOV RDI,RSP CALL 0x00169c00 MOV AL,0x1 LAB_0019f2ae: ADD RSP,0x38 POP RBX POP R12 POP R14 POP R15 RET
int1 llama_state_save_file(llama_context *param_1,char *param_2,void *param_3,long param_4) { int *puVar1; llama_file alStack_58 [8]; int *local_50; int1 *local_48; int8 local_40; void *pvStack_38; int8 local_30; long lStack_28; /* try { // try from 0019f215 to 0019f223 has its CatchHandler @ 0019f2de */ llama_file::llama_file(alStack_58,param_2,"wb"); /* try { // try from 0019f224 to 0019f25d has its CatchHandler @ 0019f2e6 */ llama_file::write_u32(alStack_58,0x6767736e); llama_file::write_u32(alStack_58,9); llama_file::write_u32(alStack_58,(uint)param_4); llama_file::write_raw(alStack_58,param_3,param_4 << 2); puVar1 = PTR_vtable_0025cbb0 + 0x10; local_40 = 0; pvStack_38 = (void *)0x0; local_30 = 0; lStack_28 = 0; local_50 = puVar1; local_48 = alStack_58; /* try { // try from 0019f280 to 0019f287 has its CatchHandler @ 0019f2ba */ llama_state_get_data_internal(param_1,(llama_data_write *)&local_50); local_50 = puVar1; if (pvStack_38 != (void *)0x0) { operator_delete(pvStack_38,lStack_28 - (long)pvStack_38); } llama_file::~llama_file(alStack_58); return 1; }
35,575
my_strdup
eloqsql/mysys/my_malloc.c
char *my_strdup(PSI_memory_key key, const char *from, myf my_flags) { char *ptr; size_t length= strlen(from)+1; DBUG_ENTER("my_strdup"); if ((ptr= (char*) my_malloc(key, length, my_flags))) memcpy(ptr, from, length); DBUG_RETURN(ptr); }
O0
c
my_strdup: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rdi callq 0x24120 addq $0x1, %rax movq %rax, -0x28(%rbp) movl -0x4(%rbp), %edi movq -0x28(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x2a4b0 movq %rax, -0x20(%rbp) cmpq $0x0, %rax je 0x2a97f movq -0x20(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x24200 jmp 0x2a981 movq -0x20(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_strdup: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rdi, [rbp+var_10] call _strlen add rax, 1 mov [rbp+var_28], rax mov edi, [rbp+var_4] mov rsi, [rbp+var_28] mov rdx, [rbp+var_18] call my_malloc mov [rbp+var_20], rax cmp rax, 0 jz short loc_2A97F mov rdi, [rbp+var_20] mov rsi, [rbp+var_10] mov rdx, [rbp+var_28] call _memcpy loc_2A97F: jmp short $+2 loc_2A981: mov rax, [rbp+var_20] mov [rbp+var_30], rax mov rax, [rbp+var_30] add rsp, 30h pop rbp retn
long long my_strdup(unsigned int a1, long long a2, int a3) { unsigned long long v4; // [rsp+8h] [rbp-28h] long long v5; // [rsp+10h] [rbp-20h] v4 = strlen(a2) + 1; v5 = my_malloc(a1, v4, a3); if ( v5 ) memcpy(v5, a2, v4); return v5; }
my_strdup: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00124120 ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x18] CALL 0x0012a4b0 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JZ 0x0012a97f MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x28] CALL 0x00124200 LAB_0012a97f: JMP 0x0012a981 LAB_0012a981: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x30 POP RBP RET
void * my_strdup(int4 param_1,char *param_2,int8 param_3) { size_t sVar1; void *__dest; sVar1 = strlen(param_2); __dest = (void *)my_malloc(param_1,sVar1 + 1,param_3); if (__dest != (void *)0x0) { memcpy(__dest,param_2,sVar1 + 1); } return __dest; }
35,576
my_mb_wc_sjis
eloqsql/strings/ctype-sjis.c
static int my_mb_wc_sjis(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e){ int hi; if (s >= e) return MY_CS_TOOSMALL; if ((hi= s[0]) < 0x80) /* ASCII: [00..7F] -> [U+0000..U+007F] */ { *pwc= hi; return 1; } /* JIS-X-0201 Half width Katakana: [A1..DF] -> [U+FF61..U+FF9F] */ if (hi >= 0xA1 && hi <= 0xDF) { *pwc= sjis_to_unicode[hi]; return 1; } if (s + 2 > e) return MY_CS_TOOSMALL2; /* JIS-X-0208 [81..9F,E0..FC][40..7E,80..FC] */ if (!(pwc[0]= sjis_to_unicode[(hi << 8) + s[1]])) return (issjishead(hi) && issjistail(s[1])) ? -2 : MY_CS_ILSEQ; return 2; }
O3
c
my_mb_wc_sjis: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0xb69ff movzbl (%rdx), %edi testb %dil, %dil js 0xb69e5 movq %rdi, (%rsi) jmp 0xb69fa leal 0x5f(%rdi), %eax cmpb $0x3e, %al ja 0xb6a01 leaq 0x16f81d(%rip), %rax # 0x226210 movzwl (%rax,%rdi,2), %eax movq %rax, (%rsi) movl $0x1, %eax popq %rbp retq leaq 0x2(%rdx), %r8 movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %r8 ja 0xb69ff movzbl 0x1(%rdx), %eax movl %edi, %ecx shll $0x9, %ecx leal (%rcx,%rax,2), %eax leaq 0x16f7ee(%rip), %rcx # 0x226210 movzwl (%rax,%rcx), %ecx movq %rcx, (%rsi) movl $0x2, %eax testq %rcx, %rcx jne 0xb69ff cmpb $-0x80, %dil setne %al cmpb $-0x60, %dil setb %cl andb %al, %cl addb $0x20, %dil cmpb $0x1d, %dil setb %sil orb %cl, %sil xorl %eax, %eax cmpb $0x1, %sil jne 0xb69ff movb 0x1(%rdx), %cl leal -0x40(%rcx), %edx movl $0xfffffffe, %eax # imm = 0xFFFFFFFE cmpb $0x3f, %dl jb 0xb69ff movl $0x0, %eax testb %cl, %cl jns 0xb69ff xorl %eax, %eax cmpb $-0x3, %cl setae %al leal -0x2(,%rax,2), %eax jmp 0xb69ff
my_mb_wc_sjis: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_B69FF movzx edi, byte ptr [rdx] test dil, dil js short loc_B69E5 mov [rsi], rdi jmp short loc_B69FA loc_B69E5: lea eax, [rdi+5Fh] cmp al, 3Eh ; '>' ja short loc_B6A01 lea rax, sjis_to_unicode movzx eax, word ptr [rax+rdi*2] mov [rsi], rax loc_B69FA: mov eax, 1 loc_B69FF: pop rbp retn loc_B6A01: lea r8, [rdx+2] mov eax, 0FFFFFF9Ah cmp r8, rcx ja short loc_B69FF movzx eax, byte ptr [rdx+1] mov ecx, edi shl ecx, 9 lea eax, [rcx+rax*2] lea rcx, sjis_to_unicode movzx ecx, word ptr [rax+rcx] mov [rsi], rcx mov eax, 2 test rcx, rcx jnz short loc_B69FF cmp dil, 80h setnz al cmp dil, 0A0h setb cl and cl, al add dil, 20h ; ' ' cmp dil, 1Dh setb sil or sil, cl xor eax, eax cmp sil, 1 jnz short loc_B69FF mov cl, [rdx+1] lea edx, [rcx-40h] mov eax, 0FFFFFFFEh cmp dl, 3Fh ; '?' jb short loc_B69FF mov eax, 0 test cl, cl jns short loc_B69FF xor eax, eax cmp cl, 0FDh setnb al lea eax, ds:0FFFFFFFFFFFFFFFEh[rax*2] jmp loc_B69FF
long long my_mb_wc_sjis(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { long long result; // rax long long v5; // rdi long long v6; // rcx char v7; // cl result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { v5 = *a3; if ( (v5 & 0x80u) == 0LL ) { *a2 = v5; return 1LL; } if ( (unsigned __int8)(v5 + 95) <= 0x3Eu ) { *a2 = sjis_to_unicode[v5]; return 1LL; } result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { v6 = sjis_to_unicode[256 * (_DWORD)v5 + a3[1]]; *a2 = v6; result = 2LL; if ( !v6 ) { result = 0LL; if ( (_BYTE)v5 != 0x80 && (unsigned __int8)v5 < 0xA0u || (unsigned __int8)(v5 + 32) < 0x1Du ) { v7 = a3[1]; result = 4294967294LL; if ( (unsigned __int8)(v7 - 64) >= 0x3Fu ) { result = 0LL; if ( v7 < 0 ) return 2 * (unsigned int)((unsigned __int8)v7 >= 0xFDu) - 2; } } } } } return result; }
my_mb_wc_sjis: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x001b69ff MOVZX EDI,byte ptr [RDX] TEST DIL,DIL JS 0x001b69e5 MOV qword ptr [RSI],RDI JMP 0x001b69fa LAB_001b69e5: LEA EAX,[RDI + 0x5f] CMP AL,0x3e JA 0x001b6a01 LEA RAX,[0x326210] MOVZX EAX,word ptr [RAX + RDI*0x2] MOV qword ptr [RSI],RAX LAB_001b69fa: MOV EAX,0x1 LAB_001b69ff: POP RBP RET LAB_001b6a01: LEA R8,[RDX + 0x2] MOV EAX,0xffffff9a CMP R8,RCX JA 0x001b69ff MOVZX EAX,byte ptr [RDX + 0x1] MOV ECX,EDI SHL ECX,0x9 LEA EAX,[RCX + RAX*0x2] LEA RCX,[0x326210] MOVZX ECX,word ptr [RAX + RCX*0x1] MOV qword ptr [RSI],RCX MOV EAX,0x2 TEST RCX,RCX JNZ 0x001b69ff CMP DIL,0x80 SETNZ AL CMP DIL,0xa0 SETC CL AND CL,AL ADD DIL,0x20 CMP DIL,0x1d SETC SIL OR SIL,CL XOR EAX,EAX CMP SIL,0x1 JNZ 0x001b69ff MOV CL,byte ptr [RDX + 0x1] LEA EDX,[RCX + -0x40] MOV EAX,0xfffffffe CMP DL,0x3f JC 0x001b69ff MOV EAX,0x0 TEST CL,CL JNS 0x001b69ff XOR EAX,EAX CMP CL,0xfd SETNC AL LEA EAX,[-0x2 + RAX*0x2] JMP 0x001b69ff
int my_mb_wc_sjis(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { byte bVar1; ushort uVar2; int iVar3; iVar3 = -0x65; if (param_3 < param_4) { bVar1 = *param_3; if ((char)bVar1 < '\0') { if (0x3e < (byte)(bVar1 + 0x5f)) { if (param_4 < param_3 + 2) { return -0x66; } uVar2 = *(ushort *)(sjis_to_unicode + ((uint)bVar1 * 0x200 + (uint)param_3[1] * 2)); *param_2 = (ulong)uVar2; if ((ulong)uVar2 != 0) { return 2; } if (0x1c < (byte)(bVar1 + 0x20) && (0x9f < bVar1 || bVar1 == 0x80)) { return 0; } bVar1 = param_3[1]; if ((byte)(bVar1 - 0x40) < 0x3f) { return -2; } if (-1 < (char)bVar1) { return 0; } return (uint)(0xfc < bVar1) * 2 + -2; } *param_2 = (ulong)*(ushort *)(sjis_to_unicode + (ulong)bVar1 * 2); } else { *param_2 = (ulong)bVar1; } iVar3 = 1; } return iVar3; }
35,577
test_number_literals
eshkol/tests/unit/test_lexer.c
static void test_number_literals(void) { printf("Testing number literals...\n"); // Create an arena Arena* arena = arena_create(1024); assert(arena != NULL); // Create a string table StringTable* strings = string_table_create(arena, 16); assert(strings != NULL); // Create a diagnostic context DiagnosticContext* diag = diagnostic_context_create(arena); assert(diag != NULL); // Create a lexer const char* source = "123 456.789"; Lexer* lexer = lexer_create(arena, strings, diag, source); assert(lexer != NULL); // Scan tokens Token token; // 123 token = lexer_scan_token(lexer); assert(token_is(&token, TOKEN_NUMBER)); assert(token.value.number == 123.0); // 456.789 token = lexer_scan_token(lexer); assert(token_is(&token, TOKEN_NUMBER)); assert(token.value.number == 456.789); // EOF token = lexer_scan_token(lexer); assert(token_is(&token, TOKEN_EOF)); // Destroy the arena arena_destroy(arena); printf("PASS: number_literals\n"); }
O0
c
test_number_literals: pushq %rbp movq %rsp, %rbp subq $0xf0, %rsp leaq 0x4b32(%rip), %rdi # 0x7744 movb $0x0, %al callq 0x1080 movl $0x400, %edi # imm = 0x400 callq 0x3a40 movq %rax, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0x2c30 jmp 0x2c4f leaq 0x4445(%rip), %rdi # 0x707c leaq 0x444c(%rip), %rsi # 0x708a movl $0x16e, %edx # imm = 0x16E leaq 0x4b16(%rip), %rcx # 0x7760 callq 0x10a0 movq -0x8(%rbp), %rdi movl $0x10, %esi callq 0x4140 movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) je 0x2c6a jmp 0x2c89 leaq 0x4476(%rip), %rdi # 0x70e7 leaq 0x4412(%rip), %rsi # 0x708a movl $0x172, %edx # imm = 0x172 leaq 0x4adc(%rip), %rcx # 0x7760 callq 0x10a0 movq -0x8(%rbp), %rdi callq 0x4830 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x2c9f jmp 0x2cbe leaq 0x4451(%rip), %rdi # 0x70f7 leaq 0x43dd(%rip), %rsi # 0x708a movl $0x176, %edx # imm = 0x176 leaq 0x4aa7(%rip), %rcx # 0x7760 callq 0x10a0 leaq 0x4abb(%rip), %rax # 0x7780 movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0x51c0 movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) je 0x2ceb jmp 0x2d0a leaq 0x4452(%rip), %rdi # 0x7144 leaq 0x4391(%rip), %rsi # 0x708a movl $0x17b, %edx # imm = 0x17B leaq 0x4a5b(%rip), %rcx # 0x7760 callq 0x10a0 movq -0x28(%rbp), %rsi leaq -0x88(%rbp), %rdi callq 0x5580 leaq -0x58(%rbp), %rdi leaq -0x88(%rbp), %rsi movl $0x30, %edx callq 0x10f0 leaq -0x58(%rbp), %rdi movl $0xd, %esi callq 0x5e40 testb $0x1, %al jne 0x2d43 jmp 0x2d45 jmp 0x2d64 leaq 0x466d(%rip), %rdi # 0x73b9 leaq 0x4337(%rip), %rsi # 0x708a movl $0x182, %edx # imm = 0x182 leaq 0x4a01(%rip), %rcx # 0x7760 callq 0x10a0 movsd -0x30(%rbp), %xmm0 movsd 0x42a7(%rip), %xmm1 # 0x7018 ucomisd %xmm1, %xmm0 jne 0x2d7b jp 0x2d7b jmp 0x2d9a leaq 0x4a0a(%rip), %rdi # 0x778c leaq 0x4301(%rip), %rsi # 0x708a movl $0x183, %edx # imm = 0x183 leaq 0x49cb(%rip), %rcx # 0x7760 callq 0x10a0 movq -0x28(%rbp), %rsi leaq -0xb8(%rbp), %rdi callq 0x5580 leaq -0x58(%rbp), %rdi leaq -0xb8(%rbp), %rsi movl $0x30, %edx callq 0x10f0 leaq -0x58(%rbp), %rdi movl $0xd, %esi callq 0x5e40 testb $0x1, %al jne 0x2dd3 jmp 0x2dd5 jmp 0x2df4 leaq 0x45dd(%rip), %rdi # 0x73b9 leaq 0x42a7(%rip), %rsi # 0x708a movl $0x187, %edx # imm = 0x187 leaq 0x4971(%rip), %rcx # 0x7760 callq 0x10a0 movsd -0x30(%rbp), %xmm0 movsd 0x421f(%rip), %xmm1 # 0x7020 ucomisd %xmm1, %xmm0 jne 0x2e0b jp 0x2e0b jmp 0x2e2a leaq 0x4996(%rip), %rdi # 0x77a8 leaq 0x4271(%rip), %rsi # 0x708a movl $0x188, %edx # imm = 0x188 leaq 0x493b(%rip), %rcx # 0x7760 callq 0x10a0 movq -0x28(%rbp), %rsi leaq -0xe8(%rbp), %rdi callq 0x5580 leaq -0x58(%rbp), %rdi leaq -0xe8(%rbp), %rsi movl $0x30, %edx callq 0x10f0 leaq -0x58(%rbp), %rdi xorl %esi, %esi callq 0x5e40 testb $0x1, %al jne 0x2e60 jmp 0x2e62 jmp 0x2e81 leaq 0x45f7(%rip), %rdi # 0x7460 leaq 0x421a(%rip), %rsi # 0x708a movl $0x18c, %edx # imm = 0x18C leaq 0x48e4(%rip), %rcx # 0x7760 callq 0x10a0 movq -0x8(%rbp), %rdi callq 0x4020 leaq 0x4935(%rip), %rdi # 0x77c6 movb $0x0, %al callq 0x1080 addq $0xf0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
test_number_literals: push rbp mov rbp, rsp sub rsp, 0F0h lea rdi, aTestingNumberL; "Testing number literals...\n" mov al, 0 call _printf mov edi, 400h call arena_create mov [rbp+var_8], rax cmp [rbp+var_8], 0 jz short loc_2C30 jmp short loc_2C4F loc_2C30: lea rdi, aArenaNull; "arena != NULL" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eshkol"... mov edx, 16Eh lea rcx, aVoidTestNumber; "void test_number_literals(void)" call ___assert_fail loc_2C4F: mov rdi, [rbp+var_8] mov esi, 10h call string_table_create mov [rbp+var_10], rax cmp [rbp+var_10], 0 jz short loc_2C6A jmp short loc_2C89 loc_2C6A: lea rdi, aStringsNull; "strings != NULL" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eshkol"... mov edx, 172h lea rcx, aVoidTestNumber; "void test_number_literals(void)" call ___assert_fail loc_2C89: mov rdi, [rbp+var_8] call diagnostic_context_create mov [rbp+var_18], rax cmp [rbp+var_18], 0 jz short loc_2C9F jmp short loc_2CBE loc_2C9F: lea rdi, aDiagNull; "diag != NULL" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eshkol"... mov edx, 176h lea rcx, aVoidTestNumber; "void test_number_literals(void)" call ___assert_fail loc_2CBE: lea rax, a123456789; "123 456.789" mov [rbp+var_20], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call lexer_create mov [rbp+var_28], rax cmp [rbp+var_28], 0 jz short loc_2CEB jmp short loc_2D0A loc_2CEB: lea rdi, aLexerNull; "lexer != NULL" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eshkol"... mov edx, 17Bh lea rcx, aVoidTestNumber; "void test_number_literals(void)" call ___assert_fail loc_2D0A: mov rsi, [rbp+var_28] lea rdi, [rbp+var_88] call lexer_scan_token lea rdi, [rbp+var_58] lea rsi, [rbp+var_88] mov edx, 30h ; '0' call _memcpy lea rdi, [rbp+var_58] mov esi, 0Dh call token_is test al, 1 jnz short loc_2D43 jmp short loc_2D45 loc_2D43: jmp short loc_2D64 loc_2D45: lea rdi, aTokenIsTokenTo_2; "token_is(&token, TOKEN_NUMBER)" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eshkol"... mov edx, 182h lea rcx, aVoidTestNumber; "void test_number_literals(void)" call ___assert_fail loc_2D64: movsd xmm0, [rbp+var_30] movsd xmm1, cs:qword_7018 ucomisd xmm0, xmm1 jnz short loc_2D7B jp short loc_2D7B jmp short loc_2D9A loc_2D7B: lea rdi, aTokenValueNumb_1; "token.value.number == 123.0" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eshkol"... mov edx, 183h lea rcx, aVoidTestNumber; "void test_number_literals(void)" call ___assert_fail loc_2D9A: mov rsi, [rbp+var_28] lea rdi, [rbp+var_B8] call lexer_scan_token lea rdi, [rbp+var_58] lea rsi, [rbp+var_B8] mov edx, 30h ; '0' call _memcpy lea rdi, [rbp+var_58] mov esi, 0Dh call token_is test al, 1 jnz short loc_2DD3 jmp short loc_2DD5 loc_2DD3: jmp short loc_2DF4 loc_2DD5: lea rdi, aTokenIsTokenTo_2; "token_is(&token, TOKEN_NUMBER)" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eshkol"... mov edx, 187h lea rcx, aVoidTestNumber; "void test_number_literals(void)" call ___assert_fail loc_2DF4: movsd xmm0, [rbp+var_30] movsd xmm1, cs:qword_7020 ucomisd xmm0, xmm1 jnz short loc_2E0B jp short loc_2E0B jmp short loc_2E2A loc_2E0B: lea rdi, aTokenValueNumb_2; "token.value.number == 456.789" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eshkol"... mov edx, 188h lea rcx, aVoidTestNumber; "void test_number_literals(void)" call ___assert_fail loc_2E2A: mov rsi, [rbp+var_28] lea rdi, [rbp+var_E8] call lexer_scan_token lea rdi, [rbp+var_58] lea rsi, [rbp+var_E8] mov edx, 30h ; '0' call _memcpy lea rdi, [rbp+var_58] xor esi, esi call token_is test al, 1 jnz short loc_2E60 jmp short loc_2E62 loc_2E60: jmp short loc_2E81 loc_2E62: lea rdi, aTokenIsTokenTo_3; "token_is(&token, TOKEN_EOF)" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eshkol"... mov edx, 18Ch lea rcx, aVoidTestNumber; "void test_number_literals(void)" call ___assert_fail loc_2E81: mov rdi, [rbp+var_8] call arena_destroy lea rdi, aPassNumberLite; "PASS: number_literals\n" mov al, 0 call _printf add rsp, 0F0h pop rbp retn
long long test_number_literals(long long a1, long long a2, long long a3) { char v3; // al char v4; // al long long v5; // rdx _BYTE v7[48]; // [rsp+8h] [rbp-E8h] BYREF _BYTE v8[48]; // [rsp+38h] [rbp-B8h] BYREF _BYTE v9[48]; // [rsp+68h] [rbp-88h] BYREF _BYTE v10[40]; // [rsp+98h] [rbp-58h] BYREF double v11; // [rsp+C0h] [rbp-30h] long long v12; // [rsp+C8h] [rbp-28h] const char *v13; // [rsp+D0h] [rbp-20h] long long v14; // [rsp+D8h] [rbp-18h] long long v15; // [rsp+E0h] [rbp-10h] long long v16; // [rsp+E8h] [rbp-8h] printf("Testing number literals...\n", a2, a3); v16 = arena_create(1024LL); if ( !v16 ) __assert_fail( "arena != NULL", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_lexer.c", 366LL, "void test_number_literals(void)"); v15 = string_table_create(v16, 16LL); if ( !v15 ) __assert_fail( "strings != NULL", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_lexer.c", 370LL, "void test_number_literals(void)"); v14 = diagnostic_context_create(v16); if ( !v14 ) __assert_fail( "diag != NULL", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_lexer.c", 374LL, "void test_number_literals(void)"); v13 = "123 456.789"; v12 = lexer_create(v16, v15, v14, "123 456.789"); if ( !v12 ) __assert_fail( "lexer != NULL", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_lexer.c", 379LL, "void test_number_literals(void)"); lexer_scan_token(v9, v12); memcpy(v10, v9, 48LL); if ( (token_is(v10, 13LL) & 1) == 0 ) __assert_fail( "token_is(&token, TOKEN_NUMBER)", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_lexer.c", 386LL, "void test_number_literals(void)"); if ( v11 != 123.0 ) __assert_fail( "token.value.number == 123.0", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_lexer.c", 387LL, "void test_number_literals(void)"); lexer_scan_token(v8, v12); memcpy(v10, v8, 48LL); v3 = token_is(v10, 13LL); if ( (v3 & 1) == 0 ) __assert_fail( "token_is(&token, TOKEN_NUMBER)", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_lexer.c", 391LL, "void test_number_literals(void)"); if ( v11 != 456.789 ) __assert_fail( "token.value.number == 456.789", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_lexer.c", 392LL, "void test_number_literals(void)"); lexer_scan_token(v7, v12); memcpy(v10, v7, 48LL); v4 = token_is(v10, 0LL); if ( (v4 & 1) == 0 ) __assert_fail( "token_is(&token, TOKEN_EOF)", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_lexer.c", 396LL, "void test_number_literals(void)"); arena_destroy(v16); return printf("PASS: number_literals\n", 0LL, v5); }
test_number_literals: PUSH RBP MOV RBP,RSP SUB RSP,0xf0 LEA RDI,[0x107744] MOV AL,0x0 CALL 0x00101080 MOV EDI,0x400 CALL 0x00103a40 MOV qword ptr [RBP + -0x8],RAX CMP qword ptr [RBP + -0x8],0x0 JZ 0x00102c30 JMP 0x00102c4f LAB_00102c30: LEA RDI,[0x10707c] LEA RSI,[0x10708a] MOV EDX,0x16e LEA RCX,[0x107760] CALL 0x001010a0 LAB_00102c4f: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x10 CALL 0x00104140 MOV qword ptr [RBP + -0x10],RAX CMP qword ptr [RBP + -0x10],0x0 JZ 0x00102c6a JMP 0x00102c89 LAB_00102c6a: LEA RDI,[0x1070e7] LEA RSI,[0x10708a] MOV EDX,0x172 LEA RCX,[0x107760] CALL 0x001010a0 LAB_00102c89: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00104830 MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x00102c9f JMP 0x00102cbe LAB_00102c9f: LEA RDI,[0x1070f7] LEA RSI,[0x10708a] MOV EDX,0x176 LEA RCX,[0x107760] CALL 0x001010a0 LAB_00102cbe: LEA RAX,[0x107780] MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x001051c0 MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],0x0 JZ 0x00102ceb JMP 0x00102d0a LAB_00102ceb: LEA RDI,[0x107144] LEA RSI,[0x10708a] MOV EDX,0x17b LEA RCX,[0x107760] CALL 0x001010a0 LAB_00102d0a: MOV RSI,qword ptr [RBP + -0x28] LEA RDI,[RBP + -0x88] CALL 0x00105580 LEA RDI,[RBP + -0x58] LEA RSI,[RBP + -0x88] MOV EDX,0x30 CALL 0x001010f0 LEA RDI,[RBP + -0x58] MOV ESI,0xd CALL 0x00105e40 TEST AL,0x1 JNZ 0x00102d43 JMP 0x00102d45 LAB_00102d43: JMP 0x00102d64 LAB_00102d45: LEA RDI,[0x1073b9] LEA RSI,[0x10708a] MOV EDX,0x182 LEA RCX,[0x107760] CALL 0x001010a0 LAB_00102d64: MOVSD XMM0,qword ptr [RBP + -0x30] MOVSD XMM1,qword ptr [0x00107018] UCOMISD XMM0,XMM1 JNZ 0x00102d7b JP 0x00102d7b JMP 0x00102d9a LAB_00102d7b: LEA RDI,[0x10778c] LEA RSI,[0x10708a] MOV EDX,0x183 LEA RCX,[0x107760] CALL 0x001010a0 LAB_00102d9a: MOV RSI,qword ptr [RBP + -0x28] LEA RDI,[RBP + -0xb8] CALL 0x00105580 LEA RDI,[RBP + -0x58] LEA RSI,[RBP + -0xb8] MOV EDX,0x30 CALL 0x001010f0 LEA RDI,[RBP + -0x58] MOV ESI,0xd CALL 0x00105e40 TEST AL,0x1 JNZ 0x00102dd3 JMP 0x00102dd5 LAB_00102dd3: JMP 0x00102df4 LAB_00102dd5: LEA RDI,[0x1073b9] LEA RSI,[0x10708a] MOV EDX,0x187 LEA RCX,[0x107760] CALL 0x001010a0 LAB_00102df4: MOVSD XMM0,qword ptr [RBP + -0x30] MOVSD XMM1,qword ptr [0x00107020] UCOMISD XMM0,XMM1 JNZ 0x00102e0b JP 0x00102e0b JMP 0x00102e2a LAB_00102e0b: LEA RDI,[0x1077a8] LEA RSI,[0x10708a] MOV EDX,0x188 LEA RCX,[0x107760] CALL 0x001010a0 LAB_00102e2a: MOV RSI,qword ptr [RBP + -0x28] LEA RDI,[RBP + -0xe8] CALL 0x00105580 LEA RDI,[RBP + -0x58] LEA RSI,[RBP + -0xe8] MOV EDX,0x30 CALL 0x001010f0 LEA RDI,[RBP + -0x58] XOR ESI,ESI CALL 0x00105e40 TEST AL,0x1 JNZ 0x00102e60 JMP 0x00102e62 LAB_00102e60: JMP 0x00102e81 LAB_00102e62: LEA RDI,[0x107460] LEA RSI,[0x10708a] MOV EDX,0x18c LEA RCX,[0x107760] CALL 0x001010a0 LAB_00102e81: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00104020 LEA RDI,[0x1077c6] MOV AL,0x0 CALL 0x00101080 ADD RSP,0xf0 POP RBP RET
void test_number_literals(void) { ulong uVar1; int1 local_f0 [48]; int1 local_c0 [48]; int1 local_90 [48]; int1 local_60 [40]; double local_38; long local_30; char *local_28; long local_20; long local_18; long local_10; printf("Testing number literals...\n"); local_10 = arena_create(0x400); if (local_10 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("arena != NULL","/workspace/llm4binary/github2025/eshkol/tests/unit/test_lexer.c", 0x16e,"void test_number_literals(void)"); } local_18 = string_table_create(local_10,0x10); if (local_18 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("strings != NULL", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_lexer.c",0x172, "void test_number_literals(void)"); } local_20 = diagnostic_context_create(local_10); if (local_20 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("diag != NULL","/workspace/llm4binary/github2025/eshkol/tests/unit/test_lexer.c", 0x176,"void test_number_literals(void)"); } local_28 = "123 456.789"; local_30 = lexer_create(local_10,local_18,local_20,"123 456.789"); if (local_30 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("lexer != NULL","/workspace/llm4binary/github2025/eshkol/tests/unit/test_lexer.c", 0x17b,"void test_number_literals(void)"); } lexer_scan_token(local_90,local_30); memcpy(local_60,local_90,0x30); uVar1 = token_is(local_60,0xd); if ((uVar1 & 1) == 0) { /* WARNING: Subroutine does not return */ __assert_fail("token_is(&token, TOKEN_NUMBER)", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_lexer.c",0x182, "void test_number_literals(void)"); } if ((local_38 != DAT_00107018) || (NAN(local_38) || NAN(DAT_00107018))) { /* WARNING: Subroutine does not return */ __assert_fail("token.value.number == 123.0", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_lexer.c",0x183, "void test_number_literals(void)"); } lexer_scan_token(local_c0,local_30); memcpy(local_60,local_c0,0x30); uVar1 = token_is(local_60,0xd); if ((uVar1 & 1) == 0) { /* WARNING: Subroutine does not return */ __assert_fail("token_is(&token, TOKEN_NUMBER)", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_lexer.c",0x187, "void test_number_literals(void)"); } if ((local_38 == DAT_00107020) && (!NAN(local_38) && !NAN(DAT_00107020))) { lexer_scan_token(local_f0,local_30); memcpy(local_60,local_f0,0x30); uVar1 = token_is(local_60,0); if ((uVar1 & 1) == 0) { /* WARNING: Subroutine does not return */ __assert_fail("token_is(&token, TOKEN_EOF)", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_lexer.c",0x18c, "void test_number_literals(void)"); } arena_destroy(local_10); printf("PASS: number_literals\n"); return; } /* WARNING: Subroutine does not return */ __assert_fail("token.value.number == 456.789", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_lexer.c",0x188, "void test_number_literals(void)"); }
35,578
common_chat_params_init_functionary_v3_2(minja::chat_template const&, common_chat_inputs const&)
monkey531[P]llama/common/chat.cpp
static common_chat_params common_chat_params_init_functionary_v3_2(const common_chat_template & tmpl, const struct common_chat_inputs & inputs) { // >>>all\nlet's call functions>>>fn1\n{"arg1": 1...}\n>>>fn2\n{"arg1": 1...}... // Using ">>>f1\n", ">>>f2\n"... as trigger words for the grammar common_chat_params data; data.prompt = tmpl.apply(inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt); data.format = COMMON_CHAT_FORMAT_FUNCTIONARY_V3_2; if (!inputs.tools.is_null() && !inputs.tools.empty()) { data.grammar_lazy = inputs.tool_choice != "required"; data.grammar = build_grammar([&](const common_grammar_builder & builder) { std::vector<std::string> first_tool_rules; std::vector<std::string> subsequent_tool_rules; foreach_function(inputs.tools, [&](const json & tool) { const auto & function = tool["function"]; std::string name = function["name"]; auto parameters = function["parameters"]; auto args_rule = builder.add_schema(name + "-args", parameters); first_tool_rules.push_back(builder.add_rule(name + "-call", "\"" + name + "\\n\" " + args_rule)); subsequent_tool_rules.push_back(builder.add_rule(name + "-call2", "\">>>" + name + "\\n\" " + args_rule)); data.grammar_triggers.push_back({name, /* .at_start = */ true}); data.grammar_triggers.push_back({">>>" + name, /* .at_start = */ false}); }); auto first_rule = first_tool_rules.empty() ? "" : builder.add_rule("first_tool_call", string_join(first_tool_rules, " | ")) + " space"; if (inputs.parallel_tool_calls) { auto subsequent_rule = builder.add_rule("subsequent_tool_call", string_join(subsequent_tool_rules, " | ")) + " space"; builder.add_rule("root", first_rule + " (" + subsequent_rule + ")*"); } else { builder.add_rule("root", first_rule); } }, grammar_options); } return data; }
O0
cpp
common_chat_params_init_functionary_v3_2(minja::chat_template const&, common_chat_inputs const&): subq $0x118, %rsp # imm = 0x118 movq %rdi, 0x28(%rsp) movq %rdi, %rax movq %rax, 0x30(%rsp) movq %rdi, 0x110(%rsp) movq %rsi, 0x108(%rsp) movq %rdx, 0x100(%rsp) movb $0x0, 0xff(%rsp) callq 0x213f60 movq 0x108(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x100(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x100(%rsp), %rdi addq $0x10, %rdi callq 0x16dc90 testb $0x1, %al jne 0x1e286a jmp 0x1e287d leaq 0xb8(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0xa18c0 jmp 0x1e289a movq 0x100(%rsp), %rsi addq $0x10, %rsi leaq 0xb8(%rsp), %rdi callq 0xe14e0 jmp 0x1e2898 jmp 0x1e289a movq 0x100(%rsp), %rax movzbl 0x68(%rax), %eax movl %eax, 0x1c(%rsp) xorl %eax, %eax movl %eax, %esi leaq 0x98(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0xa18c0 movl 0x1c(%rsp), %r8d movq 0x38(%rsp), %rsi movq 0x40(%rsp), %rdx movq 0x20(%rsp), %r9 movq %rsp, %rax movl $0x1, (%rax) andl $0x1, %r8d leaq 0xc8(%rsp), %rdi leaq 0xb8(%rsp), %rcx callq 0x213fd0 jmp 0x1e28f8 leaq 0xe8(%rsp), %rdi leaq 0xc8(%rsp), %rsi callq 0xfc070 jmp 0x1e290f movq 0x28(%rsp), %rdi addq $0x8, %rdi leaq 0xe8(%rsp), %rsi callq 0xe0050 leaq 0xe8(%rsp), %rdi callq 0xa1a90 leaq 0xc8(%rsp), %rdi callq 0x65a60 leaq 0x98(%rsp), %rdi callq 0xa1a90 leaq 0xb8(%rsp), %rdi callq 0xa1a90 movq 0x28(%rsp), %rax movl $0x7, (%rax) movq 0x100(%rsp), %rdi addq $0x10, %rdi callq 0xf5840 testb $0x1, %al jne 0x1e2aae movq 0x100(%rsp), %rdi addq $0x10, %rdi callq 0x16dc90 testb $0x1, %al jne 0x1e2aae movq 0x100(%rsp), %rdi addq $0x20, %rdi leaq 0x102477(%rip), %rsi # 0x2e4e20 callq 0x213f00 movb %al, %cl movq 0x28(%rsp), %rax movb %cl, 0x38(%rax) movq 0x100(%rsp), %rcx movq %rcx, 0x48(%rsp) movq %rax, 0x50(%rsp) leaq 0x58(%rsp), %rdi movq %rdi, 0x10(%rsp) leaq 0x48(%rsp), %rsi callq 0x1ede30 movq 0x10(%rsp), %rsi leaq 0x10df42(%rip), %rdx # 0x2f092c leaq 0x78(%rsp), %rdi callq 0x2b2bf0 jmp 0x1e29f6 movq 0x28(%rsp), %rdi addq $0x18, %rdi leaq 0x78(%rsp), %rsi callq 0x64b90 leaq 0x78(%rsp), %rdi callq 0x65a60 leaq 0x58(%rsp), %rdi callq 0x217250 jmp 0x1e2aae movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) jmp 0x1e2ad7 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) jmp 0x1e2a72 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) leaq 0xc8(%rsp), %rdi callq 0x65a60 leaq 0x98(%rsp), %rdi callq 0xa1a90 leaq 0xb8(%rsp), %rdi callq 0xa1a90 jmp 0x1e2ad7 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) leaq 0x58(%rsp), %rdi callq 0x217250 jmp 0x1e2ad7 movb $0x1, 0xff(%rsp) testb $0x1, 0xff(%rsp) jne 0x1e2aca movq 0x28(%rsp), %rdi callq 0xe00f0 movq 0x30(%rsp), %rax addq $0x118, %rsp # imm = 0x118 retq movq 0x28(%rsp), %rdi callq 0xe00f0 movq 0xb0(%rsp), %rdi callq 0x64e40 nop
_ZL40common_chat_params_init_functionary_v3_2RKN5minja13chat_templateERK18common_chat_inputs: sub rsp, 118h mov [rsp+118h+var_F0], rdi mov rax, rdi mov [rsp+118h+var_E8], rax mov [rsp+118h+var_8], rdi mov [rsp+118h+var_10], rsi mov [rsp+118h+var_18], rdx mov [rsp+118h+var_19], 0 call _ZN18common_chat_paramsC2Ev; common_chat_params::common_chat_params(void) mov rax, [rsp+118h+var_10] mov [rsp+118h+var_E0], rax mov rax, [rsp+118h+var_18] mov [rsp+118h+var_D8], rax mov rdi, [rsp+118h+var_18] add rdi, 10h call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5emptyEv; 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>::empty(void) test al, 1 jnz short loc_1E286A jmp short loc_1E287D loc_1E286A: lea rdi, [rsp+118h+var_60] xor eax, eax mov esi, eax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EDn; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(decltype(nullptr)) jmp short loc_1E289A loc_1E287D: mov rsi, [rsp+118h+var_18] add rsi, 10h lea rdi, [rsp+118h+var_60] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) jmp short $+2 loc_1E2898: jmp short $+2 loc_1E289A: mov rax, [rsp+118h+var_18] movzx eax, byte ptr [rax+68h] mov [rsp+118h+var_FC], eax xor eax, eax mov esi, eax lea rdi, [rsp+118h+var_80] mov [rsp+118h+var_F8], rdi call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EDn; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(decltype(nullptr)) mov r8d, [rsp+118h+var_FC] mov rsi, [rsp+118h+var_E0] mov rdx, [rsp+118h+var_D8] mov r9, [rsp+118h+var_F8] mov rax, rsp mov dword ptr [rax], 1 and r8d, 1 lea rdi, [rsp+118h+var_50] lea rcx, [rsp+118h+var_60] call _ZNK5minja13chat_template5applyERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_b; minja::chat_template::apply(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool) jmp short $+2 loc_1E28F8: lea rdi, [rsp+118h+var_30] lea rsi, [rsp+118h+var_50] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_ jmp short $+2 loc_1E290F: mov rdi, [rsp+118h+var_F0] add rdi, 8 lea rsi, [rsp+118h+var_30] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; 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=(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+118h+var_30] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() lea rdi, [rsp+118h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+118h+var_80] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() lea rdi, [rsp+118h+var_60] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() mov rax, [rsp+118h+var_F0] mov dword ptr [rax], 7 mov rdi, [rsp+118h+var_18] add rdi, 10h call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7is_nullEv; 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>::is_null(void) test al, 1 jnz loc_1E2AAE mov rdi, [rsp+118h+var_18] add rdi, 10h call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5emptyEv; 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>::empty(void) test al, 1 jnz loc_1E2AAE mov rdi, [rsp+118h+var_18] add rdi, 20h ; ' ' lea rsi, aPromptIsRequir+0Ch; "required" call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ mov cl, al mov rax, [rsp+118h+var_F0] mov [rax+38h], cl mov rcx, [rsp+118h+var_18] mov [rsp+118h+var_D0], rcx mov [rsp+118h+var_C8], rax lea rdi, [rsp+118h+var_C0] mov [rsp+118h+var_108], rdi lea rsi, [rsp+118h+var_D0] call _ZNSt8functionIFvRK22common_grammar_builderEEC2IZL40common_chat_params_init_functionary_v3_2RKN5minja13chat_templateERK18common_chat_inputsE3$_0vEEOT_; std::function<void ()(common_grammar_builder const&)>::function<common_chat_params_init_functionary_v3_2(minja::chat_template const&,common_chat_inputs const&)::$_0,void>(common_chat_params_init_functionary_v3_2(minja::chat_template const&,common_chat_inputs const&)::$_0 &&) mov rsi, [rsp+118h+var_108] lea rdx, _ZL15grammar_options; grammar_options lea rdi, [rsp+118h+var_A0] call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&) jmp short $+2 loc_1E29F6: mov rdi, [rsp+118h+var_F0] add rdi, 18h lea rsi, [rsp+118h+var_A0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rsp+118h+var_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+118h+var_C0] call _ZNSt8functionIFvRK22common_grammar_builderEED2Ev; std::function<void ()(common_grammar_builder const&)>::~function() jmp loc_1E2AAE mov rcx, rax mov eax, edx mov [rsp+arg_A8], rcx mov [rsp+arg_A4], eax jmp loc_1E2AD7 mov rcx, rax mov eax, edx mov [rsp+arg_A8], rcx mov [rsp+arg_A4], eax jmp short loc_1E2A72 mov rcx, rax mov eax, edx mov [rsp+arg_A8], rcx mov [rsp+arg_A4], eax lea rdi, [rsp+arg_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1E2A72: lea rdi, [rsp+arg_90] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() lea rdi, [rsp+arg_B0] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() jmp short loc_1E2AD7 mov rcx, rax mov eax, edx mov [rsp+arg_A8], rcx mov [rsp+arg_A4], eax lea rdi, [rsp+arg_50] call _ZNSt8functionIFvRK22common_grammar_builderEED2Ev; std::function<void ()(common_grammar_builder const&)>::~function() jmp short loc_1E2AD7 loc_1E2AAE: mov [rsp+118h+var_19], 1 test [rsp+118h+var_19], 1 jnz short loc_1E2ACA mov rdi, [rsp+118h+var_F0]; this call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params() loc_1E2ACA: mov rax, [rsp+118h+var_E8] add rsp, 118h retn loc_1E2AD7: mov rdi, [rsp+arg_20]; this call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params() mov rdi, [rsp+arg_A8] call __Unwind_Resume
const minja::chat_template * common_chat_params_init_functionary_v3_2( const minja::chat_template *a1, const common_chat_inputs *a2, long long a3) { int v4; // [rsp+0h] [rbp-118h] char v5; // [rsp+1Ch] [rbp-FCh] int v6; // [rsp+40h] [rbp-D8h] _QWORD v7[2]; // [rsp+48h] [rbp-D0h] BYREF _BYTE v8[32]; // [rsp+58h] [rbp-C0h] BYREF _BYTE v9[32]; // [rsp+78h] [rbp-A0h] BYREF _BYTE v10[32]; // [rsp+98h] [rbp-80h] BYREF _BYTE v11[16]; // [rsp+B8h] [rbp-60h] BYREF _BYTE v12[32]; // [rsp+C8h] [rbp-50h] BYREF _BYTE v13[24]; // [rsp+E8h] [rbp-30h] BYREF long long v14; // [rsp+100h] [rbp-18h] const common_chat_inputs *v15; // [rsp+108h] [rbp-10h] const minja::chat_template *v16; // [rsp+110h] [rbp-8h] v16 = a1; v15 = a2; v14 = a3; v13[23] = 0; common_chat_params::common_chat_params(a1); v6 = v14; 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>::empty(v14 + 16) & 1) != 0 ) 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)v11); else nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( (long long)v11, v14 + 16); v5 = *(_BYTE *)(v14 + 104); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json((long long)v10); minja::chat_template::apply((unsigned int)v12, (_DWORD)a2, v6, (unsigned int)v11, v5 & 1, (unsigned int)v10, 1); ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_( v13, (long long)v12); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=( (long long)a1 + 8, (long long)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>::~basic_json((long long)v13); std::string::~string(v12); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v10); 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)v11); *(_DWORD *)a1 = 7; 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>::is_null((_BYTE *)(v14 + 16)) && (nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::empty(v14 + 16) & 1) == 0 ) { *((_BYTE *)a1 + 56) = ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_( v14 + 32, "required"); v7[0] = v14; v7[1] = a1; std::function<void ()(common_grammar_builder const&)>::function<common_chat_params_init_functionary_v3_2(minja::chat_template const&,common_chat_inputs const&)::$_0,void>( v8, v7); build_grammar[abi:cxx11]((unsigned int)v9, v4); std::string::operator=((char *)a1 + 24, v9); std::string::~string(v9); std::function<void ()(common_grammar_builder const&)>::~function(v8); } return a1; }
vector: SUB RSP,0x68 MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x58] CALL 0x001a6200 MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0x58] CALL 0x001a6870 MOV RSI,RAX LEA RDI,[RSP + 0x57] MOV qword ptr [RSP + 0x28],RDI CALL 0x001e2900 MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x28] LAB_001e2852: CALL 0x001e2930 JMP 0x001e2859 LAB_001e2859: LEA RDI,[RSP + 0x57] CALL 0x001e2990 MOV RDI,qword ptr [RSP + 0x58] CALL 0x001a7270 MOV qword ptr [RSP + 0x38],RAX MOV RDI,qword ptr [RSP + 0x58] CALL 0x001a72a0 MOV RDI,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RDI] MOV qword ptr [RSP + 0x8],RAX CALL 0x001a67e0 MOV RDX,qword ptr [RSP + 0x8] MOV RCX,RAX MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x30] LAB_001e28a5: CALL 0x001e29a0 LAB_001e28aa: MOV qword ptr [RSP + 0x10],RAX JMP 0x001e28b1 LAB_001e28b1: MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x8],RCX ADD RSP,0x68 RET
/* 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(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> > > const&) */ void __thiscall std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::vector(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *this,vector *param_1) { int8 uVar1; ulong uVar2; int8 uVar3; int8 uVar4; int8 uVar5; basic_json *pbVar6; allocator local_11; _Vector_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *local_10; vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *local_8; local_10 = (_Vector_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,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>>> *)param_1; local_8 = this; uVar2 = size((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>>> *)param_1); _Vector_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::_M_get_Tp_allocator(local_10); __gnu_cxx:: __alloc_traits<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>>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::_S_select_on_copy(&local_11); /* try { // try from 001e2852 to 001e2856 has its CatchHandler @ 001e28c4 */ _Vector_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,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_base((_Vector_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,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,uVar2,&local_11); 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>> ::~allocator((allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)&local_11); uVar3 = begin((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *)local_10); uVar4 = end((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *)local_10); uVar1 = *(int8 *)this; uVar5 = _Vector_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::_M_get_Tp_allocator ((_Vector_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,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); /* try { // try from 001e28a5 to 001e28a9 has its CatchHandler @ 001e28de */ pbVar6 = __uninitialized_copy_a<__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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::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>>>>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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>> (uVar3,uVar4,uVar1,uVar5); *(basic_json **)(this + 8) = pbVar6; return; }
35,579
my_printv_error
eloqsql/mysys/my_error.c
void my_printv_error(uint error, const char *format, myf MyFlags, va_list ap) { char ebuff[ERRMSGSIZE]; DBUG_ENTER("my_printv_error"); DBUG_PRINT("my", ("nr: %d MyFlags: %lu errno: %d format: %s", error, MyFlags, errno, format)); (void) my_vsnprintf(ebuff, sizeof(ebuff), format, ap); (*error_handler_hook)(error, ebuff, MyFlags); DBUG_VOID_RETURN; }
O0
c
my_printv_error: pushq %rbp movq %rsp, %rbp subq $0x230, %rsp # imm = 0x230 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0x214(%rbp) movq %rsi, -0x220(%rbp) movq %rdx, -0x228(%rbp) movq %rcx, -0x230(%rbp) jmp 0x37915 leaq -0x210(%rbp), %rdi movq -0x220(%rbp), %rdx movq -0x230(%rbp), %rcx movl $0x200, %esi # imm = 0x200 callq 0x7f170 leaq 0x1a22d5(%rip), %rax # 0x1d9c10 movq (%rax), %rax movl -0x214(%rbp), %edi leaq -0x210(%rbp), %rsi movq -0x228(%rbp), %rdx callq *%rax jmp 0x37956 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x37971 addq $0x230, %rsp # imm = 0x230 popq %rbp retq callq 0x25330 nopw %cs:(%rax,%rax)
my_printv_error: push rbp mov rbp, rsp sub rsp, 230h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_214], edi mov [rbp+var_220], rsi mov [rbp+var_228], rdx mov [rbp+var_230], rcx jmp short $+2 loc_37915: lea rdi, [rbp+var_210] mov rdx, [rbp+var_220] mov rcx, [rbp+var_230] mov esi, 200h call my_vsnprintf lea rax, error_handler_hook mov rax, [rax] mov edi, [rbp+var_214] lea rsi, [rbp+var_210] mov rdx, [rbp+var_228] call rax jmp short $+2 loc_37956: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_37971 add rsp, 230h pop rbp retn loc_37971: call ___stack_chk_fail
unsigned long long my_printv_error(unsigned int a1, long long a2, __int16 a3, long long a4) { _BYTE v6[520]; // [rsp+20h] [rbp-210h] BYREF unsigned long long v7; // [rsp+228h] [rbp-8h] v7 = __readfsqword(0x28u); my_vsnprintf(v6, 512LL, a2, a4); ((void ( *)(long long, long long, __int16))error_handler_hook[0])(a1, (long long)v6, a3); return __readfsqword(0x28u); }
my_printv_error: PUSH RBP MOV RBP,RSP SUB RSP,0x230 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x214],EDI MOV qword ptr [RBP + -0x220],RSI MOV qword ptr [RBP + -0x228],RDX MOV qword ptr [RBP + -0x230],RCX JMP 0x00137915 LAB_00137915: LEA RDI,[RBP + -0x210] MOV RDX,qword ptr [RBP + -0x220] MOV RCX,qword ptr [RBP + -0x230] MOV ESI,0x200 CALL 0x0017f170 LEA RAX,[0x2d9c10] MOV RAX,qword ptr [RAX] MOV EDI,dword ptr [RBP + -0x214] LEA RSI,[RBP + -0x210] MOV RDX,qword ptr [RBP + -0x228] CALL RAX JMP 0x00137956 LAB_00137956: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00137971 ADD RSP,0x230 POP RBP RET LAB_00137971: CALL 0x00125330
void my_printv_error(int4 param_1,int8 param_2,int8 param_3,int8 param_4) { long in_FS_OFFSET; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); my_vsnprintf(local_218,0x200,param_2,param_4); (*(code *)error_handler_hook)(param_1,local_218,param_3); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
35,580
nglog::LogDestination::FlushLogFiles(int)
ng-log[P]ng-log/src/logging.cc
inline void LogDestination::FlushLogFiles(int min_severity) { // Prevent any subtle race conditions by wrapping a mutex lock around // all this stuff. std::lock_guard<std::mutex> l{log_mutex}; for (int i = min_severity; i < NUM_SEVERITIES; i++) { LogDestination* log = log_destination(static_cast<LogSeverity>(i)); if (log != nullptr) { log->logger_->Flush(); } } }
O3
cpp
nglog::LogDestination::FlushLogFiles(int): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movl %edi, %ebx leaq 0x2e358(%rip), %rdi # 0x3ec58 callq 0x7820 testl %eax, %eax jne 0x109a2 cmpl $0x3, %ebx jg 0x10988 leaq 0x1f287(%rip), %r13 # 0x2fba0 leaq 0x8(%rsp), %r14 movl %ebx, %r12d movq (%r13,%r12,8), %rax testq %rax, %rax jne 0x10974 movl $0xd0, %edi callq 0x7530 movq %rax, %r15 movq %rax, %rdi movl %ebx, %esi xorl %edx, %edx callq 0x949c leaq (,%r12,8), %r12 addq %r13, %r12 movq $0x0, 0x8(%rsp) movq %r12, %rdi movq %r15, %rsi callq 0x11886 movq %r14, %rdi callq 0x103ac movq (%r12), %rax testq %rax, %rax je 0x10981 movq 0xc8(%rax), %rdi movq (%rdi), %rax callq *0x18(%rax) incl %ebx cmpl $0x4, %ebx jne 0x1091e leaq 0x2e2c9(%rip), %rdi # 0x3ec58 callq 0x73e0 addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movl %eax, %edi callq 0x7350 movq %rax, %rbx movl $0xd0, %esi movq %r15, %rdi callq 0x7540 jmp 0x109be movq %rax, %rbx leaq 0x2e293(%rip), %rdi # 0x3ec58 callq 0x73e0 movq %rbx, %rdi callq 0x7980
_ZN5nglog14LogDestination13FlushLogFilesEi: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov ebx, edi lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_lock test eax, eax jnz loc_109A2 cmp ebx, 3 jg short loc_10988 lea r13, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_ lea r14, [rsp+38h+var_30] loc_1091E: mov r12d, ebx mov rax, [r13+r12*8+0] test rax, rax jnz short loc_10974 mov edi, 0D0h; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax mov esi, ebx xor edx, edx call _ZN5nglog14LogDestinationC2ENS_11LogSeverityEPKc; nglog::LogDestination::LogDestination(nglog::LogSeverity,char const*) lea r12, ds:0[r12*8] add r12, r13 mov [rsp+38h+var_30], 0 mov rdi, r12 mov rsi, r15 call _ZNSt15__uniq_ptr_implIN5nglog14LogDestinationESt14default_deleteIS1_EE5resetEPS1_; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(nglog::LogDestination*) mov rdi, r14 call _ZNSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS1_EED2Ev; std::unique_ptr<nglog::LogDestination>::~unique_ptr() mov rax, [r12] test rax, rax jz short loc_10981 loc_10974: mov rdi, [rax+0C8h] mov rax, [rdi] call qword ptr [rax+18h] loc_10981: inc ebx cmp ebx, 4 jnz short loc_1091E loc_10988: lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_unlock add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_109A2: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) mov rbx, rax mov esi, 0D0h; unsigned __int64 mov rdi, r15; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_109BE mov rbx, rax loc_109BE: lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_unlock mov rdi, rbx call __Unwind_Resume
long long nglog::LogDestination::FlushLogFiles(nglog::LogDestination *this) { int v1; // ebx int v2; // eax long long v3; // rax long long v4; // r15 nglog::LogDestination *v6; // [rsp+8h] [rbp-30h] BYREF v1 = (int)this; v2 = pthread_mutex_lock(&nglog::log_mutex); if ( v2 ) std::__throw_system_error(v2); if ( (int)this <= 3 ) { do { v3 = nglog::LogDestination::log_destinations_[v1]; if ( v3 || (v4 = operator new(0xD0uLL), nglog::LogDestination::LogDestination(v4, v1, 0LL), v6 = 0LL, std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset( &nglog::LogDestination::log_destinations_[v1], v4), std::unique_ptr<nglog::LogDestination>::~unique_ptr(&v6), (v3 = nglog::LogDestination::log_destinations_[v1]) != 0) ) { (*(void ( **)(_QWORD))(**(_QWORD **)(v3 + 200) + 24LL))(*(_QWORD *)(v3 + 200)); } ++v1; } while ( v1 != 4 ); } return pthread_mutex_unlock(&nglog::log_mutex); }
FlushLogFiles: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV EBX,EDI LEA RDI,[0x13ec58] CALL 0x00107820 TEST EAX,EAX JNZ 0x001109a2 CMP EBX,0x3 JG 0x00110988 LEA R13,[0x12fba0] LEA R14,[RSP + 0x8] LAB_0011091e: MOV R12D,EBX MOV RAX,qword ptr [R13 + R12*0x8] TEST RAX,RAX JNZ 0x00110974 LAB_0011092b: MOV EDI,0xd0 CALL 0x00107530 LAB_00110935: MOV R15,RAX MOV RDI,RAX MOV ESI,EBX XOR EDX,EDX CALL 0x0010949c LEA R12,[R12*0x8] ADD R12,R13 MOV qword ptr [RSP + 0x8],0x0 MOV RDI,R12 MOV RSI,R15 CALL 0x00111886 MOV RDI,R14 CALL 0x001103ac MOV RAX,qword ptr [R12] TEST RAX,RAX JZ 0x00110981 LAB_00110974: MOV RDI,qword ptr [RAX + 0xc8] MOV RAX,qword ptr [RDI] LAB_0011097e: CALL qword ptr [RAX + 0x18] LAB_00110981: INC EBX CMP EBX,0x4 JNZ 0x0011091e LAB_00110988: LEA RDI,[0x13ec58] CALL 0x001073e0 ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_001109a2: MOV EDI,EAX CALL 0x00107350
/* nglog::LogDestination::FlushLogFiles(int) */ void nglog::LogDestination::FlushLogFiles(int param_1) { int iVar1; LogDestination *pLVar2; long lVar3; uint uVar4; int8 local_30; ulong uVar5; uVar5 = (ulong)(uint)param_1; iVar1 = pthread_mutex_lock((pthread_mutex_t *)log_mutex); if (iVar1 != 0) { /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar1); } if (param_1 < 4) { do { lVar3 = (&log_destinations_)[uVar5]; if (lVar3 == 0) { /* try { // try from 0011092b to 00110934 has its CatchHandler @ 001109bb */ pLVar2 = (LogDestination *)operator_new(0xd0); /* try { // try from 00110935 to 00110943 has its CatchHandler @ 001109a9 */ LogDestination(pLVar2,uVar5,0); local_30 = 0; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>:: reset((__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *) (&log_destinations_ + uVar5),pLVar2); std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>:: ~unique_ptr((unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *) &local_30); lVar3 = *(long *)(&log_destinations_ + uVar5); if (lVar3 != 0) goto LAB_00110974; } else { LAB_00110974: /* try { // try from 0011097e to 00110980 has its CatchHandler @ 001109bb */ (**(code **)(**(long **)(lVar3 + 200) + 0x18))(); } uVar4 = (int)uVar5 + 1; uVar5 = (ulong)uVar4; } while (uVar4 != 4); } pthread_mutex_unlock((pthread_mutex_t *)log_mutex); return; }
35,581
my_strntoull_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static ulonglong my_strntoull_mb2_or_mb4(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative= 0; int overflow; int cnv; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; register ulonglong cutoff; register unsigned int cutlim; register ulonglong res; register const uchar *s= (const uchar*) nptr; register const uchar *e= (const uchar*) nptr + l; const uchar *save; *err= 0; do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { switch (wc) { case ' ' : break; case '\t': break; case '-' : negative= !negative; break; case '+' : break; default : goto bs; } } else /* No more characters or bad multibyte sequence */ { if (endptr !=NULL ) *endptr = (char*)s; err[0]= (cnv==MY_CS_ILSEQ) ? EILSEQ : EDOM; return 0; } s+=cnv; } while (1); bs: overflow = 0; res = 0; save = s; cutoff = (~(ulonglong) 0) / (unsigned long int) base; cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base); do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { s+=cnv; if ( wc>='0' && wc<='9') wc -= '0'; else if ( wc>='A' && wc<='Z') wc = wc - 'A' + 10; else if ( wc>='a' && wc<='z') wc = wc - 'a' + 10; else break; if ((int)wc >= base) break; if (res > cutoff || (res == cutoff && wc > cutlim)) overflow = 1; else { res *= (ulonglong) base; res += wc; } } else if (cnv==MY_CS_ILSEQ) { if (endptr !=NULL ) *endptr = (char*)s; err[0]= EILSEQ; return 0; } else { /* No more characters */ break; } } while(1); if (endptr != NULL) *endptr = (char *) s; if (s == save) { err[0]= EDOM; return 0L; } if (overflow) { err[0]= ERANGE; return (~(ulonglong) 0); } return (negative ? -((longlong) res) : (longlong) res); }
O0
c
my_strntoull_mb2_or_mb4: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movl $0x0, -0x3c(%rbp) movq -0x10(%rbp), %rax movq 0xb8(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x58(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x38(%rbp), %rax movl $0x0, (%rax) movq -0x58(%rbp), %rax movq -0x10(%rbp), %rdi movq -0x78(%rbp), %rdx movq -0x80(%rbp), %rcx leaq -0x50(%rbp), %rsi callq *%rax movl %eax, -0x44(%rbp) cmpl $0x0, %eax jle 0xb8651 movq -0x50(%rbp), %rax addq $-0x9, %rax movq %rax, -0x90(%rbp) subq $0x24, %rax ja 0xb864d movq -0x90(%rbp), %rax leaq 0x1611e1(%rip), %rcx # 0x21980c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax jmp 0xb864f jmp 0xb864f cmpl $0x0, -0x3c(%rbp) setne %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x3c(%rbp) jmp 0xb864f jmp 0xb864f jmp 0xb86a8 jmp 0xb8689 cmpq $0x0, -0x30(%rbp) je 0xb8663 movq -0x78(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movl -0x44(%rbp), %edx movl $0x21, %ecx movl $0x54, %eax cmpl $0x0, %edx cmovel %eax, %ecx movq -0x38(%rbp), %rax movl %ecx, (%rax) movq $0x0, -0x8(%rbp) jmp 0xb888c movl -0x44(%rbp), %ecx movq -0x78(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x78(%rbp) movb $0x1, %al testb $0x1, %al jne 0xb85ea jmp 0xb86a6 jmp 0xb86a8 movl $0x0, -0x40(%rbp) movq $0x0, -0x70(%rbp) movq -0x78(%rbp), %rax movq %rax, -0x88(%rbp) movslq -0x24(%rbp), %rcx movq $-0x1, %rax xorl %edx, %edx divq %rcx movq %rax, -0x60(%rbp) movslq -0x24(%rbp), %rcx movq $-0x1, %rax xorl %edx, %edx divq %rcx movl %edx, %eax movl %eax, -0x64(%rbp) movq -0x58(%rbp), %rax movq -0x10(%rbp), %rdi movq -0x78(%rbp), %rdx movq -0x80(%rbp), %rcx leaq -0x50(%rbp), %rsi callq *%rax movl %eax, -0x44(%rbp) cmpl $0x0, %eax jle 0xb87d5 movl -0x44(%rbp), %ecx movq -0x78(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x78(%rbp) cmpq $0x30, -0x50(%rbp) jb 0xb873a cmpq $0x39, -0x50(%rbp) ja 0xb873a movq -0x50(%rbp), %rax subq $0x30, %rax movq %rax, -0x50(%rbp) jmp 0xb8783 cmpq $0x41, -0x50(%rbp) jb 0xb875a cmpq $0x5a, -0x50(%rbp) ja 0xb875a movq -0x50(%rbp), %rax subq $0x41, %rax addq $0xa, %rax movq %rax, -0x50(%rbp) jmp 0xb8781 cmpq $0x61, -0x50(%rbp) jb 0xb877a cmpq $0x7a, -0x50(%rbp) ja 0xb877a movq -0x50(%rbp), %rax subq $0x61, %rax addq $0xa, %rax movq %rax, -0x50(%rbp) jmp 0xb877f jmp 0xb8814 jmp 0xb8781 jmp 0xb8783 movq -0x50(%rbp), %rax cmpl -0x24(%rbp), %eax jl 0xb8791 jmp 0xb8814 movq -0x70(%rbp), %rax cmpq -0x60(%rbp), %rax ja 0xb87b1 movq -0x70(%rbp), %rax cmpq -0x60(%rbp), %rax jne 0xb87ba movq -0x50(%rbp), %rax movl -0x64(%rbp), %ecx cmpq %rcx, %rax jbe 0xb87ba movl $0x1, -0x40(%rbp) jmp 0xb87d3 movslq -0x24(%rbp), %rax imulq -0x70(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x50(%rbp), %rax addq -0x70(%rbp), %rax movq %rax, -0x70(%rbp) jmp 0xb8806 cmpl $0x0, -0x44(%rbp) jne 0xb8804 cmpq $0x0, -0x30(%rbp) je 0xb87ed movq -0x78(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rax movl $0x54, (%rax) movq $0x0, -0x8(%rbp) jmp 0xb888c jmp 0xb8814 jmp 0xb8808 movb $0x1, %al testb $0x1, %al jne 0xb86eb jmp 0xb8814 cmpq $0x0, -0x30(%rbp) je 0xb8826 movq -0x78(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq -0x78(%rbp), %rax cmpq -0x88(%rbp), %rax jne 0xb8847 movq -0x38(%rbp), %rax movl $0x21, (%rax) movq $0x0, -0x8(%rbp) jmp 0xb888c cmpl $0x0, -0x40(%rbp) je 0xb8861 movq -0x38(%rbp), %rax movl $0x22, (%rax) movq $-0x1, -0x8(%rbp) jmp 0xb888c cmpl $0x0, -0x3c(%rbp) je 0xb8876 xorl %eax, %eax subq -0x70(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0xb8881 movq -0x70(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x98(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa0, %rsp popq %rbp retq nopl (%rax)
my_strntoull_mb2_or_mb4: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov [rbp+var_3C], 0 mov rax, [rbp+var_10] mov rax, [rax+0B8h] mov rax, [rax+28h] mov [rbp+var_58], rax mov rax, [rbp+var_18] mov [rbp+var_78], rax mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_80], rax mov rax, [rbp+var_38] mov dword ptr [rax], 0 loc_B85EA: mov rax, [rbp+var_58] mov rdi, [rbp+var_10] mov rdx, [rbp+var_78] mov rcx, [rbp+var_80] lea rsi, [rbp+var_50] call rax mov [rbp+var_44], eax cmp eax, 0 jle short loc_B8651 mov rax, [rbp+var_50] add rax, 0FFFFFFFFFFFFFFF7h; switch 37 cases mov [rbp+var_90], rax sub rax, 24h ja short def_B8632; jumptable 00000000000B8632 default case, cases 10-31,33-42,44 mov rax, [rbp+var_90] lea rcx, jpt_B8632 movsxd rax, ds:(jpt_B8632 - 21980Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_B8634: jmp short loc_B864F; jumptable 00000000000B8632 case 32 loc_B8636: jmp short loc_B864F; jumptable 00000000000B8632 case 9 loc_B8638: cmp [rbp+var_3C], 0; jumptable 00000000000B8632 case 45 setnz al xor al, 0FFh and al, 1 movzx eax, al mov [rbp+var_3C], eax jmp short loc_B864F loc_B864B: jmp short loc_B864F; jumptable 00000000000B8632 case 43 def_B8632: jmp short loc_B86A8; jumptable 00000000000B8632 default case, cases 10-31,33-42,44 loc_B864F: jmp short loc_B8689 loc_B8651: cmp [rbp+var_30], 0 jz short loc_B8663 mov rcx, [rbp+var_78] mov rax, [rbp+var_30] mov [rax], rcx loc_B8663: mov edx, [rbp+var_44] mov ecx, 21h ; '!' mov eax, 54h ; 'T' cmp edx, 0 cmovz ecx, eax mov rax, [rbp+var_38] mov [rax], ecx mov [rbp+var_8], 0 jmp loc_B888C loc_B8689: mov ecx, [rbp+var_44] mov rax, [rbp+var_78] movsxd rcx, ecx add rax, rcx mov [rbp+var_78], rax mov al, 1 test al, 1 jnz loc_B85EA jmp short $+2 loc_B86A6: jmp short $+2 loc_B86A8: mov [rbp+var_40], 0 mov [rbp+var_70], 0 mov rax, [rbp+var_78] mov [rbp+var_88], rax movsxd rcx, [rbp+var_24] mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx div rcx mov [rbp+var_60], rax movsxd rcx, [rbp+var_24] mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx div rcx mov eax, edx mov [rbp+var_64], eax loc_B86EB: mov rax, [rbp+var_58] mov rdi, [rbp+var_10] mov rdx, [rbp+var_78] mov rcx, [rbp+var_80] lea rsi, [rbp+var_50] call rax mov [rbp+var_44], eax cmp eax, 0 jle loc_B87D5 mov ecx, [rbp+var_44] mov rax, [rbp+var_78] movsxd rcx, ecx add rax, rcx mov [rbp+var_78], rax cmp [rbp+var_50], 30h ; '0' jb short loc_B873A cmp [rbp+var_50], 39h ; '9' ja short loc_B873A mov rax, [rbp+var_50] sub rax, 30h ; '0' mov [rbp+var_50], rax jmp short loc_B8783 loc_B873A: cmp [rbp+var_50], 41h ; 'A' jb short loc_B875A cmp [rbp+var_50], 5Ah ; 'Z' ja short loc_B875A mov rax, [rbp+var_50] sub rax, 41h ; 'A' add rax, 0Ah mov [rbp+var_50], rax jmp short loc_B8781 loc_B875A: cmp [rbp+var_50], 61h ; 'a' jb short loc_B877A cmp [rbp+var_50], 7Ah ; 'z' ja short loc_B877A mov rax, [rbp+var_50] sub rax, 61h ; 'a' add rax, 0Ah mov [rbp+var_50], rax jmp short loc_B877F loc_B877A: jmp loc_B8814 loc_B877F: jmp short $+2 loc_B8781: jmp short $+2 loc_B8783: mov rax, [rbp+var_50] cmp eax, [rbp+var_24] jl short loc_B8791 jmp loc_B8814 loc_B8791: mov rax, [rbp+var_70] cmp rax, [rbp+var_60] ja short loc_B87B1 mov rax, [rbp+var_70] cmp rax, [rbp+var_60] jnz short loc_B87BA mov rax, [rbp+var_50] mov ecx, [rbp+var_64] cmp rax, rcx jbe short loc_B87BA loc_B87B1: mov [rbp+var_40], 1 jmp short loc_B87D3 loc_B87BA: movsxd rax, [rbp+var_24] imul rax, [rbp+var_70] mov [rbp+var_70], rax mov rax, [rbp+var_50] add rax, [rbp+var_70] mov [rbp+var_70], rax loc_B87D3: jmp short loc_B8806 loc_B87D5: cmp [rbp+var_44], 0 jnz short loc_B8804 cmp [rbp+var_30], 0 jz short loc_B87ED mov rcx, [rbp+var_78] mov rax, [rbp+var_30] mov [rax], rcx loc_B87ED: mov rax, [rbp+var_38] mov dword ptr [rax], 54h ; 'T' mov [rbp+var_8], 0 jmp loc_B888C loc_B8804: jmp short loc_B8814 loc_B8806: jmp short $+2 loc_B8808: mov al, 1 test al, 1 jnz loc_B86EB jmp short $+2 loc_B8814: cmp [rbp+var_30], 0 jz short loc_B8826 mov rcx, [rbp+var_78] mov rax, [rbp+var_30] mov [rax], rcx loc_B8826: mov rax, [rbp+var_78] cmp rax, [rbp+var_88] jnz short loc_B8847 mov rax, [rbp+var_38] mov dword ptr [rax], 21h ; '!' mov [rbp+var_8], 0 jmp short loc_B888C loc_B8847: cmp [rbp+var_40], 0 jz short loc_B8861 mov rax, [rbp+var_38] mov dword ptr [rax], 22h ; '"' mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_B888C loc_B8861: cmp [rbp+var_3C], 0 jz short loc_B8876 xor eax, eax sub rax, [rbp+var_70] mov [rbp+var_98], rax jmp short loc_B8881 loc_B8876: mov rax, [rbp+var_70] mov [rbp+var_98], rax loc_B8881: mov rax, [rbp+var_98] mov [rbp+var_8], rax loc_B888C: mov rax, [rbp+var_8] add rsp, 0A0h pop rbp retn
long long my_strntoull_mb2_or_mb4(long long a1, long long a2, long long a3, int a4, _QWORD *a5, int *a6) { int v6; // ecx long long v9; // [rsp+18h] [rbp-88h] long long v10; // [rsp+20h] [rbp-80h] long long v11; // [rsp+28h] [rbp-78h] unsigned long long v12; // [rsp+30h] [rbp-70h] unsigned int v13; // [rsp+3Ch] [rbp-64h] unsigned long long v14; // [rsp+40h] [rbp-60h] long long ( *v15)(long long, unsigned long long *, long long, long long); // [rsp+48h] [rbp-58h] unsigned long long v16; // [rsp+50h] [rbp-50h] BYREF int v17; // [rsp+5Ch] [rbp-44h] int v18; // [rsp+60h] [rbp-40h] BOOL v19; // [rsp+64h] [rbp-3Ch] int *v20; // [rsp+68h] [rbp-38h] _QWORD *v21; // [rsp+70h] [rbp-30h] int v22; // [rsp+7Ch] [rbp-24h] long long v23; // [rsp+80h] [rbp-20h] long long v24; // [rsp+88h] [rbp-18h] long long v25; // [rsp+90h] [rbp-10h] v25 = a1; v24 = a2; v23 = a3; v22 = a4; v21 = a5; v20 = a6; v19 = 0; v15 = *(long long ( **)(long long, unsigned long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); v11 = a2; v10 = a3 + a2; *a6 = 0; while ( 2 ) { v17 = v15(v25, &v16, v11, v10); if ( v17 <= 0 ) { if ( v21 ) *v21 = v11; v6 = 33; if ( !v17 ) v6 = 84; *v20 = v6; return 0LL; } else { switch ( v16 ) { case 9uLL: case 0x20uLL: case 0x2BuLL: goto LABEL_10; case 0x2DuLL: v19 = !v19; LABEL_10: v11 += v17; continue; default: v18 = 0; v12 = 0LL; v9 = v11; v14 = 0xFFFFFFFFFFFFFFFFLL / v22; v13 = 0xFFFFFFFFFFFFFFFFLL % v22; break; } while ( 1 ) { v17 = v15(v25, &v16, v11, v10); if ( v17 <= 0 ) break; v11 += v17; if ( v16 < 0x30 || v16 > 0x39 ) { if ( v16 < 0x41 || v16 > 0x5A ) { if ( v16 < 0x61 || v16 > 0x7A ) goto LABEL_33; v16 = v16 - 97 + 10; } else { v16 = v16 - 65 + 10; } } else { v16 -= 48LL; } if ( (int)v16 >= v22 ) goto LABEL_33; if ( v12 > v14 || v12 == v14 && v16 > v13 ) v18 = 1; else v12 = v12 * v22 + v16; } if ( v17 ) { LABEL_33: if ( v21 ) *v21 = v11; if ( v11 == v9 ) { *v20 = 33; return 0LL; } else if ( v18 ) { *v20 = 34; return -1LL; } else if ( v19 ) { return -(long long)v12; } else { return v12; } } if ( v21 ) *v21 = v11; *v20 = 84; return 0LL; } } }
my_strntoull_mb2_or_mb4: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 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 qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 MOV dword ptr [RBP + -0x3c],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x0 LAB_001b85ea: MOV RAX,qword ptr [RBP + -0x58] MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x80] LEA RSI,[RBP + -0x50] CALL RAX MOV dword ptr [RBP + -0x44],EAX CMP EAX,0x0 JLE 0x001b8651 MOV RAX,qword ptr [RBP + -0x50] ADD RAX,-0x9 MOV qword ptr [RBP + -0x90],RAX SUB RAX,0x24 JA 0x001b864d MOV RAX,qword ptr [RBP + -0x90] LEA RCX,[0x31980c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_20: JMP 0x001b864f caseD_9: JMP 0x001b864f caseD_2d: CMP dword ptr [RBP + -0x3c],0x0 SETNZ AL XOR AL,0xff AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x3c],EAX JMP 0x001b864f caseD_2b: JMP 0x001b864f caseD_a: JMP 0x001b86a8 LAB_001b864f: JMP 0x001b8689 LAB_001b8651: CMP qword ptr [RBP + -0x30],0x0 JZ 0x001b8663 MOV RCX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_001b8663: MOV EDX,dword ptr [RBP + -0x44] MOV ECX,0x21 MOV EAX,0x54 CMP EDX,0x0 CMOVZ ECX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],ECX MOV qword ptr [RBP + -0x8],0x0 JMP 0x001b888c LAB_001b8689: MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x78] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x78],RAX MOV AL,0x1 TEST AL,0x1 JNZ 0x001b85ea JMP 0x001b86a6 LAB_001b86a6: JMP 0x001b86a8 LAB_001b86a8: MOV dword ptr [RBP + -0x40],0x0 MOV qword ptr [RBP + -0x70],0x0 MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x88],RAX MOVSXD RCX,dword ptr [RBP + -0x24] MOV RAX,-0x1 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x60],RAX MOVSXD RCX,dword ptr [RBP + -0x24] MOV RAX,-0x1 XOR EDX,EDX DIV RCX MOV EAX,EDX MOV dword ptr [RBP + -0x64],EAX LAB_001b86eb: MOV RAX,qword ptr [RBP + -0x58] MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x80] LEA RSI,[RBP + -0x50] CALL RAX MOV dword ptr [RBP + -0x44],EAX CMP EAX,0x0 JLE 0x001b87d5 MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x78] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x78],RAX CMP qword ptr [RBP + -0x50],0x30 JC 0x001b873a CMP qword ptr [RBP + -0x50],0x39 JA 0x001b873a MOV RAX,qword ptr [RBP + -0x50] SUB RAX,0x30 MOV qword ptr [RBP + -0x50],RAX JMP 0x001b8783 LAB_001b873a: CMP qword ptr [RBP + -0x50],0x41 JC 0x001b875a CMP qword ptr [RBP + -0x50],0x5a JA 0x001b875a MOV RAX,qword ptr [RBP + -0x50] SUB RAX,0x41 ADD RAX,0xa MOV qword ptr [RBP + -0x50],RAX JMP 0x001b8781 LAB_001b875a: CMP qword ptr [RBP + -0x50],0x61 JC 0x001b877a CMP qword ptr [RBP + -0x50],0x7a JA 0x001b877a MOV RAX,qword ptr [RBP + -0x50] SUB RAX,0x61 ADD RAX,0xa MOV qword ptr [RBP + -0x50],RAX JMP 0x001b877f LAB_001b877a: JMP 0x001b8814 LAB_001b877f: JMP 0x001b8781 LAB_001b8781: JMP 0x001b8783 LAB_001b8783: MOV RAX,qword ptr [RBP + -0x50] CMP EAX,dword ptr [RBP + -0x24] JL 0x001b8791 JMP 0x001b8814 LAB_001b8791: MOV RAX,qword ptr [RBP + -0x70] CMP RAX,qword ptr [RBP + -0x60] JA 0x001b87b1 MOV RAX,qword ptr [RBP + -0x70] CMP RAX,qword ptr [RBP + -0x60] JNZ 0x001b87ba MOV RAX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x64] CMP RAX,RCX JBE 0x001b87ba LAB_001b87b1: MOV dword ptr [RBP + -0x40],0x1 JMP 0x001b87d3 LAB_001b87ba: MOVSXD RAX,dword ptr [RBP + -0x24] IMUL RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x50] ADD RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x70],RAX LAB_001b87d3: JMP 0x001b8806 LAB_001b87d5: CMP dword ptr [RBP + -0x44],0x0 JNZ 0x001b8804 CMP qword ptr [RBP + -0x30],0x0 JZ 0x001b87ed MOV RCX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_001b87ed: MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x54 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001b888c LAB_001b8804: JMP 0x001b8814 LAB_001b8806: JMP 0x001b8808 LAB_001b8808: MOV AL,0x1 TEST AL,0x1 JNZ 0x001b86eb JMP 0x001b8814 LAB_001b8814: CMP qword ptr [RBP + -0x30],0x0 JZ 0x001b8826 MOV RCX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_001b8826: MOV RAX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RBP + -0x88] JNZ 0x001b8847 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x21 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001b888c LAB_001b8847: CMP dword ptr [RBP + -0x40],0x0 JZ 0x001b8861 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x22 MOV qword ptr [RBP + -0x8],-0x1 JMP 0x001b888c LAB_001b8861: CMP dword ptr [RBP + -0x3c],0x0 JZ 0x001b8876 XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x98],RAX JMP 0x001b8881 LAB_001b8876: MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x98],RAX LAB_001b8881: MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x8],RAX LAB_001b888c: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xa0 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x001b86a4) */ /* WARNING: Removing unreachable block (ram,0x001b8812) */ ulong my_strntoull_mb2_or_mb4 (long param_1,long param_2,long param_3,int param_4,long *param_5, int4 *param_6) { code *pcVar1; int1 auVar2 [16]; int1 auVar3 [16]; long lVar4; ulong uVar5; int4 uVar6; ulong local_a0; long local_80; ulong local_78; ulong local_58; int local_4c; int local_48; uint local_44; int4 *local_40; long *local_38; int local_2c; long local_28; long local_20; long local_18; ulong local_10; local_44 = 0; pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); *param_6 = 0; local_80 = param_2; local_40 = param_6; local_38 = param_5; local_2c = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; do { lVar4 = local_80; local_4c = (*pcVar1)(local_18,&local_58,local_80,param_2 + param_3); if (local_4c < 1) { if (local_38 != (long *)0x0) { *local_38 = local_80; } uVar6 = 0x21; if (local_4c == 0) { uVar6 = 0x54; } *local_40 = uVar6; return 0; } switch(local_58) { case 9: break; default: local_48 = 0; local_78 = 0; auVar2._8_8_ = 0; auVar2._0_8_ = (long)local_2c; uVar5 = SUB168((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) / auVar2,0); auVar3._8_8_ = 0; auVar3._0_8_ = (long)local_2c; goto LAB_001b86eb; case 0x20: break; case 0x2b: break; case 0x2d: local_44 = (uint)((local_44 != 0 ^ 0xffU) & 1); } local_80 = local_80 + local_4c; } while( true ); LAB_001b86eb: local_4c = (*pcVar1)(local_18,&local_58,local_80,param_2 + param_3); if (local_4c < 1) { if (local_4c == 0) { if (local_38 != (long *)0x0) { *local_38 = local_80; } *local_40 = 0x54; local_10 = 0; } else { LAB_001b8814: if (local_38 != (long *)0x0) { *local_38 = local_80; } if (local_80 == lVar4) { *local_40 = 0x21; local_10 = 0; } else if (local_48 == 0) { if (local_44 == 0) { local_a0 = local_78; } else { local_a0 = -local_78; } local_10 = local_a0; } else { *local_40 = 0x22; local_10 = 0xffffffffffffffff; } } return local_10; } local_80 = local_80 + local_4c; if ((local_58 < 0x30) || (0x39 < local_58)) { if ((local_58 < 0x41) || (0x5a < local_58)) { if ((local_58 < 0x61) || (0x7a < local_58)) goto LAB_001b8814; local_58 = local_58 - 0x57; } else { local_58 = local_58 - 0x37; } } else { local_58 = local_58 - 0x30; } if (local_2c <= (int)local_58) goto LAB_001b8814; if ((uVar5 < local_78) || ((local_78 == uVar5 && (SUB164((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) % auVar3,0) < local_58)))) { local_48 = 1; } else { local_78 = local_58 + (long)local_2c * local_78; } goto LAB_001b86eb; }
35,582
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::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>>::hex_bytes(unsigned char)
msxemulator/build_O3/_deps/picotool-src/lib/nlohmann_json/single_include/nlohmann/json.hpp
static std::string hex_bytes(std::uint8_t byte) { std::string result = "FF"; constexpr const char* nibble_to_hex = "0123456789ABCDEF"; result[0] = nibble_to_hex[byte / 16]; result[1] = nibble_to_hex[byte % 16]; return result; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::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>>::hex_bytes(unsigned char): pushq %r14 pushq %rbx pushq %rax movl %esi, %ebx movq %rdi, %r14 leaq 0x10(%rdi), %rax movq %rax, (%rdi) leaq 0x39b35(%rip), %rsi # 0xa73a6 leaq 0x39b30(%rip), %rdx # 0xa73a8 callq 0x5c00c movl %ebx, %eax shrl $0x4, %eax leaq 0x3a8fd(%rip), %rcx # 0xa8186 movb (%rax,%rcx), %al movq (%r14), %rdx movb %al, (%rdx) andl $0xf, %ebx movb (%rbx,%rcx), %al movq (%r14), %rcx movb %al, 0x1(%rcx) movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9hex_bytesEh: push r14 push rbx push rax mov ebx, esi mov r14, rdi lea rax, [rdi+10h] mov [rdi], rax lea rsi, aInvalidStringS_0+41h; "FF" lea rdx, aInvalidStringS_0+43h; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov eax, ebx shr eax, 4 lea rcx, a0123456789abcd; "0123456789ABCDEF" mov al, [rax+rcx] mov rdx, [r14] mov [rdx], al and ebx, 0Fh mov al, [rbx+rcx] mov rcx, [r14] mov [rcx+1], al mov rax, r14 add rsp, 8 pop rbx pop r14 retn
long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::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>>::hex_bytes( long long a1, unsigned int a2) { *(_QWORD *)a1 = a1 + 16; std::string::_M_construct<char const*>(a1, "FF", (long long)""); **(_BYTE **)a1 = a0123456789abcd[a2 >> 4]; *(_BYTE *)(*(_QWORD *)a1 + 1LL) = a0123456789abcd[a2 & 0xF]; return a1; }
hex_bytes: PUSH R14 PUSH RBX PUSH RAX MOV EBX,ESI MOV R14,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX LEA RSI,[0x1a73a6] LEA RDX,[0x1a73a8] CALL 0x0015c00c MOV EAX,EBX SHR EAX,0x4 LEA RCX,[0x1a8186] MOV AL,byte ptr [RAX + RCX*0x1] MOV RDX,qword ptr [R14] MOV byte ptr [RDX],AL AND EBX,0xf MOV AL,byte ptr [RBX + RCX*0x1] MOV RCX,qword ptr [R14] MOV byte ptr [RCX + 0x1],AL MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 RET
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::hex_bytes(unsigned char) */ serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> * __thiscall nlohmann::json_abi_v3_11_3::detail:: serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::hex_bytes(serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,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,uchar param_1) { int7 in_register_00000031; *(serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,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 = this + 0x10; std::__cxx11::string::_M_construct<char_const*>((string *)this,"FF",""); **(char **)this = "0123456789ABCDEF"[(CONCAT71(in_register_00000031,param_1) & 0xffffffff) >> 4]; *(char *)(*(long *)this + 1) = "0123456789ABCDEF"[(uint)CONCAT71(in_register_00000031,param_1) & 0xf]; return this; }
35,583
maria_page_filler_set_none
eloqsql/storage/maria/ma_pagecrc.c
my_bool maria_page_filler_set_none(PAGECACHE_IO_HOOK_ARGS *args __attribute__((unused))) { #ifdef HAVE_valgrind uchar *page= args->page; MARIA_SHARE *share= (MARIA_SHARE *)args->data; int4store_aligned(page + share->block_size - CRC_SIZE, 0); #endif return 0; }
O3
c
maria_page_filler_set_none: pushq %rbp movq %rsp, %rbp xorl %eax, %eax popq %rbp retq
maria_page_filler_set_none: push rbp mov rbp, rsp xor eax, eax pop rbp retn
long long maria_page_filler_set_none() { return 0LL; }
maria_page_filler_set_none: PUSH RBP MOV RBP,RSP XOR EAX,EAX POP RBP RET
int8 maria_page_filler_set_none(void) { return 0; }
35,584
std::enable_if<std::is_integral<unsigned int>::value, bool>::type llama_model_loader::get_arr_n<unsigned int>(llm_kv, unsigned int&, bool)
monkey531[P]llama/src/llama-model-loader.cpp
typename std::enable_if<std::is_integral<T>::value, bool>::type llama_model_loader::get_arr_n(enum llm_kv kid, T & result, bool required) { return get_arr_n(llm_kv(kid), result, required); }
O3
cpp
std::enable_if<std::is_integral<unsigned int>::value, bool>::type llama_model_loader::get_arr_n<unsigned int>(llm_kv, unsigned int&, bool): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movl %ecx, %ebx movq %rdx, %r14 movl %esi, %edx movq %rdi, %r15 leaq 0x108(%rdi), %rsi leaq 0x8(%rsp), %r12 movq %r12, %rdi callq 0x6a770 movq %r15, %rdi movq %r12, %rsi movq %r14, %rdx movl %ebx, %ecx callq 0x64500 movl %eax, %ebx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb1958 movq 0x18(%rsp), %rsi incq %rsi callq 0x681a0 movl %ebx, %eax addq $0x28, %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 0xb1984 movq 0x18(%rsp), %rsi incq %rsi callq 0x681a0 movq %rbx, %rdi callq 0x6b5d0
_ZN18llama_model_loader9get_arr_nIjEENSt9enable_ifIXsr3std11is_integralIT_EE5valueEbE4typeE6llm_kvRS2_b: push r15 push r14 push r12 push rbx sub rsp, 28h mov ebx, ecx mov r14, rdx mov edx, esi mov r15, rdi lea rsi, [rdi+108h] lea r12, [rsp+48h+var_40] mov rdi, r12 call __ZNK6LLM_KVclB5cxx11E6llm_kv; LLM_KV::operator()(llm_kv) mov rdi, r15 mov rsi, r12 mov rdx, r14 mov ecx, ebx call __ZN18llama_model_loader9get_arr_nIjEENSt9enable_ifIXsr3std11is_integralIT_EE5valueEbE4typeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS2_b mov ebx, eax lea rax, [rsp+48h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B1958 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B1958: mov eax, ebx add rsp, 28h 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_B1984 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B1984: mov rdi, rbx call __Unwind_Resume
long long llama_model_loader::get_arr_n<unsigned int>( long long a1, unsigned int a2, long long a3, unsigned int a4) { unsigned int arr; // ebx void *v8[2]; // [rsp+8h] [rbp-40h] BYREF long long v9; // [rsp+18h] [rbp-30h] BYREF LLM_KV::operator()[abi:cxx11](v8, a1 + 264, a2); arr = llama_model_loader::get_arr_n<unsigned int>(a1, v8, a3, a4); if ( v8[0] != &v9 ) operator delete(v8[0], v9 + 1); return arr; }
get_arr_n<unsigned_int>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBX,ECX MOV R14,RDX MOV EDX,ESI MOV R15,RDI LEA RSI,[RDI + 0x108] LEA R12,[RSP + 0x8] MOV RDI,R12 CALL 0x0016a770 LAB_001b192b: MOV RDI,R15 MOV RSI,R12 MOV RDX,R14 MOV ECX,EBX CALL 0x00164500 LAB_001b193b: MOV EBX,EAX LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001b1958 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001681a0 LAB_001b1958: MOV EAX,EBX ADD RSP,0x28 POP RBX POP R12 POP R14 POP R15 RET
/* std::enable_if<std::is_integral<unsigned int>::value, bool>::type llama_model_loader::get_arr_n<unsigned int>(llm_kv, unsigned int&, bool) */ int4 __thiscall llama_model_loader::get_arr_n<unsigned_int> (llama_model_loader *this,int4 param_2,uint *param_3,bool param_4) { int4 uVar1; long *local_40 [2]; long local_30 [2]; LLM_KV::operator()[abi_cxx11_((string *)local_40,this + 0x108,param_2); /* try { // try from 001b192b to 001b193a has its CatchHandler @ 001b1966 */ uVar1 = get_arr_n<unsigned_int>(this,(string *)local_40,param_3,param_4); if (local_40[0] != local_30) { operator_delete(local_40[0],local_30[0] + 1); } return uVar1; }
35,585
translog_relative_LSN_encode
eloqsql/storage/maria/ma_loghandler.c
static void translog_relative_LSN_encode(struct st_translog_parts *parts, LSN base_lsn, uint lsns, uchar *compressed_LSNs) { LEX_CUSTRING *part; uint lsns_len= lsns * LSN_STORE_SIZE; uchar buffer_src[MAX_NUMBER_OF_LSNS_PER_RECORD * LSN_STORE_SIZE]; uchar *buffer= buffer_src; const uchar *cbuffer; DBUG_ENTER("translog_relative_LSN_encode"); DBUG_ASSERT(parts->current != 0); part= parts->parts + parts->current; /* collect all LSN(s) in one chunk if it (they) is (are) divided */ if (part->length < lsns_len) { size_t copied= part->length; LEX_CUSTRING *next_part; DBUG_PRINT("info", ("Using buffer:%p", compressed_LSNs)); memcpy(buffer, part->str, part->length); next_part= parts->parts + parts->current + 1; do { DBUG_ASSERT(next_part < parts->parts + parts->elements); if ((next_part->length + copied) < lsns_len) { memcpy(buffer + copied, next_part->str, next_part->length); copied+= next_part->length; next_part->length= 0; next_part->str= 0; /* delete_dynamic_element(&parts->parts, parts->current + 1); */ next_part++; parts->current++; part= parts->parts + parts->current; } else { size_t len= lsns_len - copied; memcpy(buffer + copied, next_part->str, len); copied= lsns_len; next_part->str+= len; next_part->length-= len; } } while (copied < lsns_len); cbuffer= buffer; } else { cbuffer= part->str; part->str+= lsns_len; part->length-= lsns_len; parts->current--; part= parts->parts + parts->current; } { /* Compress */ LSN ref; int economy; const uchar *src_ptr; uchar *dst_ptr= compressed_LSNs + (MAX_NUMBER_OF_LSNS_PER_RECORD * COMPRESSED_LSN_MAX_STORE_SIZE); /* We write the result in backward direction with no special sense or tricks both directions are equal in complicity */ for (src_ptr= cbuffer + lsns_len - LSN_STORE_SIZE; src_ptr >= (const uchar*)cbuffer; src_ptr-= LSN_STORE_SIZE) { ref= lsn_korr(src_ptr); dst_ptr= translog_put_LSN_diff(base_lsn, ref, dst_ptr); } part->length= (size_t)((compressed_LSNs + (MAX_NUMBER_OF_LSNS_PER_RECORD * COMPRESSED_LSN_MAX_STORE_SIZE)) - dst_ptr); economy= lsns_len - (uint)part->length; parts->record_length-= economy; DBUG_PRINT("info", ("new length of LSNs: %lu economy: %d", (ulong)part->length, economy)); parts->total_record_length-= economy; part->str= dst_ptr; } DBUG_VOID_RETURN; }
O3
c
translog_relative_LSN_encode: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leal (,%rdx,8), %edi subl %edx, %edi movq 0x10(%rbx), %rax movl 0x8(%rbx), %edx shlq $0x4, %rdx leaq (%rax,%rdx), %r15 movq (%rax,%rdx), %rsi movq 0x8(%rax,%rdx), %r13 movq %r13, %rax subq %rdi, %rax movq %rdi, -0x48(%rbp) jae 0x505f1 movq %r14, -0x58(%rbp) movq %rcx, -0x60(%rbp) leaq -0x3e(%rbp), %r12 movl $0xe, %ecx movq %r12, %rdi movq %r13, %rdx callq 0x29420 movq -0x48(%rbp), %rdi movq %r15, %rcx addq $0x18, %r15 movq 0x18(%rcx), %r14 leaq (%r14,%r13), %rax cmpq %rdi, %rax movq %rbx, -0x68(%rbp) jae 0x50614 movq %r13, %rbx leaq -0x3e(,%r13), %rdi addq %rbp, %rdi movq -0x8(%r15), %rsi movq %r14, %rdx callq 0x29080 movq -0x48(%rbp), %rdi movq %r14, %r13 addq %rbx, %r13 movq -0x68(%rbp), %rbx xorps %xmm0, %xmm0 movups %xmm0, -0x8(%r15) movl 0x8(%rbx), %eax incl %eax movl %eax, 0x8(%rbx) cmpq %rdi, %r13 jae 0x50665 movq 0x10(%r15), %r14 addq $0x10, %r15 leaq (%r14,%r13), %rcx cmpq %rdi, %rcx jb 0x5058b movl %eax, %eax shlq $0x4, %rax addq 0x10(%rbx), %rax movq %rax, -0x50(%rbp) leaq -0x8(%r15), %rax jmp 0x5061c leaq (%rsi,%rdi), %rdx movq %rdx, (%r15) movq %rax, 0x8(%r15) movl 0x8(%rbx), %r15d decl %r15d movl %r15d, 0x8(%rbx) shlq $0x4, %r15 addq 0x10(%rbx), %r15 movq %rsi, %r12 jmp 0x50678 movq %rcx, -0x50(%rbp) leaq 0x10(%rcx), %rax movq %rax, -0x70(%rbp) movq %rdi, %rbx subq %r13, %rbx leaq -0x3e(,%r13), %rdi addq %rbp, %rdi movq (%rax), %r13 movq %r13, %rsi movq %rbx, %rdx callq 0x29080 movq -0x48(%rbp), %rdi addq %rbx, %r13 movq -0x70(%rbp), %rax movq %r13, (%rax) subq %rbx, %r14 movq %r14, (%r15) movq -0x68(%rbp), %rbx movq -0x60(%rbp), %rcx movq -0x58(%rbp), %r14 movq -0x50(%rbp), %r15 jmp 0x50678 movl %eax, %r15d shlq $0x4, %r15 addq 0x10(%rbx), %r15 movq -0x60(%rbp), %rcx movq -0x58(%rbp), %r14 addq $0x12, %rcx leaq (%r12,%rdi), %r11 addq $-0x7, %r11 movq %rcx, %rax cmpq %r12, %r11 jb 0x50773 movq %rcx, %rax movzbl (%r11), %esi movzbl 0x1(%r11), %edi movzbl 0x2(%r11), %r8d movq %r8, %rdx shlq $0x30, %rdx movq %rdi, %r9 shlq $0x28, %r9 movq %rsi, %r10 shlq $0x20, %r10 orq %r9, %r10 orq %rdx, %r10 movl 0x3(%r11), %r9d orq %r9, %r10 movq %r14, %rdx subq %r10, %rdx cmpq $0x3fff, %rdx # imm = 0x3FFF ja 0x506e3 rolw $0x8, %dx movw %dx, -0x2(%rax) addq $-0x2, %rax jmp 0x50766 cmpq $0x3fffff, %rdx # imm = 0x3FFFFF ja 0x50703 movl %edx, %esi shrl $0x10, %esi orb $0x40, %sil movb %sil, -0x3(%rax) movw %dx, -0x2(%rax) addq $-0x3, %rax jmp 0x50766 cmpq $0x3fffffff, %rdx # imm = 0x3FFFFFFF ja 0x5072b movl %edx, %esi shrl $0x18, %esi orb $-0x80, %sil movb %sil, -0x4(%rax) movb %dl, -0x3(%rax) movb %dh, -0x2(%rax) shrl $0x10, %edx movb %dl, -0x1(%rax) addq $-0x4, %rax jmp 0x50766 movq %rdx, %r10 shrq $0x26, %r10 jne 0x5074c movq %rdx, %rsi shrq $0x20, %rsi orb $-0x40, %sil movb %sil, -0x5(%rax) movl %edx, -0x4(%rax) addq $-0x5, %rax jmp 0x50766 movw $0x100, -0x9(%rax) # imm = 0x100 movb %sil, -0x7(%rax) movb %dil, -0x6(%rax) movb %r8b, -0x5(%rax) movl %r9d, -0x4(%rax) addq $-0x9, %rax addq $-0x7, %r11 cmpq %r12, %r11 jae 0x50693 subq %rax, %rcx movq %rcx, 0x8(%r15) subl -0x48(%rbp), %ecx movq (%rbx), %xmm0 movd %ecx, %xmm1 pshufd $0x50, %xmm1, %xmm1 # xmm1 = xmm1[0,0,1,1] paddd %xmm0, %xmm1 movq %xmm1, (%rbx) movq %rax, (%r15) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x507b3 addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29270
translog_relative_LSN_encode: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r14, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax lea edi, ds:0[rdx*8] sub edi, edx mov rax, [rbx+10h] mov edx, [rbx+8] shl rdx, 4 lea r15, [rax+rdx] mov rsi, [rax+rdx] mov r13, [rax+rdx+8] mov rax, r13 sub rax, rdi mov [rbp+var_48], rdi jnb loc_505F1 mov [rbp+var_58], r14 mov [rbp+var_60], rcx lea r12, [rbp+var_3E] mov ecx, 0Eh mov rdi, r12 mov rdx, r13 call ___memcpy_chk mov rdi, [rbp+var_48] mov rcx, r15 add r15, 18h mov r14, [rcx+18h] lea rax, [r14+r13] cmp rax, rdi mov [rbp+var_68], rbx jnb loc_50614 loc_5058B: mov rbx, r13 lea rdi, ds:0FFFFFFFFFFFFFFC2h[r13] add rdi, rbp mov rsi, [r15-8] mov rdx, r14 call _memcpy mov rdi, [rbp+var_48] mov r13, r14 add r13, rbx mov rbx, [rbp+var_68] xorps xmm0, xmm0 movups xmmword ptr [r15-8], xmm0 mov eax, [rbx+8] inc eax mov [rbx+8], eax cmp r13, rdi jnb loc_50665 mov r14, [r15+10h] add r15, 10h lea rcx, [r14+r13] cmp rcx, rdi jb short loc_5058B mov eax, eax shl rax, 4 add rax, [rbx+10h] mov [rbp+var_50], rax lea rax, [r15-8] jmp short loc_5061C loc_505F1: lea rdx, [rsi+rdi] mov [r15], rdx mov [r15+8], rax mov r15d, [rbx+8] dec r15d mov [rbx+8], r15d shl r15, 4 add r15, [rbx+10h] mov r12, rsi jmp short loc_50678 loc_50614: mov [rbp+var_50], rcx lea rax, [rcx+10h] loc_5061C: mov [rbp+var_70], rax mov rbx, rdi sub rbx, r13 lea rdi, ds:0FFFFFFFFFFFFFFC2h[r13] add rdi, rbp mov r13, [rax] mov rsi, r13 mov rdx, rbx call _memcpy mov rdi, [rbp+var_48] add r13, rbx mov rax, [rbp+var_70] mov [rax], r13 sub r14, rbx mov [r15], r14 mov rbx, [rbp+var_68] mov rcx, [rbp+var_60] mov r14, [rbp+var_58] mov r15, [rbp+var_50] jmp short loc_50678 loc_50665: mov r15d, eax shl r15, 4 add r15, [rbx+10h] mov rcx, [rbp+var_60] mov r14, [rbp+var_58] loc_50678: add rcx, 12h lea r11, [r12+rdi] add r11, 0FFFFFFFFFFFFFFF9h mov rax, rcx cmp r11, r12 jb loc_50773 mov rax, rcx loc_50693: movzx esi, byte ptr [r11] movzx edi, byte ptr [r11+1] movzx r8d, byte ptr [r11+2] mov rdx, r8 shl rdx, 30h mov r9, rdi shl r9, 28h mov r10, rsi shl r10, 20h or r10, r9 or r10, rdx mov r9d, [r11+3] or r10, r9 mov rdx, r14 sub rdx, r10 cmp rdx, 3FFFh ja short loc_506E3 rol dx, 8 mov [rax-2], dx add rax, 0FFFFFFFFFFFFFFFEh jmp loc_50766 loc_506E3: cmp rdx, offset unk_3FFFFF ja short loc_50703 mov esi, edx shr esi, 10h or sil, 40h mov [rax-3], sil mov [rax-2], dx add rax, 0FFFFFFFFFFFFFFFDh jmp short loc_50766 loc_50703: cmp rdx, 3FFFFFFFh ja short loc_5072B mov esi, edx shr esi, 18h or sil, 80h mov [rax-4], sil mov [rax-3], dl mov [rax-2], dh shr edx, 10h mov [rax-1], dl add rax, 0FFFFFFFFFFFFFFFCh jmp short loc_50766 loc_5072B: mov r10, rdx shr r10, 26h jnz short loc_5074C mov rsi, rdx shr rsi, 20h or sil, 0C0h mov [rax-5], sil mov [rax-4], edx add rax, 0FFFFFFFFFFFFFFFBh jmp short loc_50766 loc_5074C: mov word ptr [rax-9], 100h mov [rax-7], sil mov [rax-6], dil mov [rax-5], r8b mov [rax-4], r9d add rax, 0FFFFFFFFFFFFFFF7h loc_50766: add r11, 0FFFFFFFFFFFFFFF9h cmp r11, r12 jnb loc_50693 loc_50773: sub rcx, rax mov [r15+8], rcx sub ecx, dword ptr [rbp+var_48] movq xmm0, qword ptr [rbx] movd xmm1, ecx pshufd xmm1, xmm1, 50h ; 'P' paddd xmm1, xmm0 movq qword ptr [rbx], xmm1 mov [r15], rax mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_507B3 add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_507B3: call ___stack_chk_fail
unsigned long long translog_relative_LSN_encode(__m128i *a1, long long a2, int a3, long long a4) { unsigned long long v6; // rdi _QWORD *v7; // r15 unsigned __int8 *v8; // rsi unsigned long long v9; // r13 unsigned __int8 *v10; // r12 _QWORD *v11; // rcx _QWORD *v12; // r15 long long v13; // r14 unsigned int v14; // eax _QWORD *v15; // rax long long v16; // r15 _QWORD *v17; // r15 unsigned long long v18; // rbx char *v19; // rdi long long v20; // r13 long long v21; // rcx unsigned __int8 *v22; // r11 long long v23; // rax char v24; // si unsigned __int8 v25; // di unsigned __int8 v26; // r8 long long v27; // r9 unsigned long long v28; // rdx long long v29; // rcx _QWORD *v31; // [rsp+0h] [rbp-70h] __m128i *v32; // [rsp+8h] [rbp-68h] long long v33; // [rsp+10h] [rbp-60h] long long v34; // [rsp+18h] [rbp-58h] long long v35; // [rsp+20h] [rbp-50h] unsigned long long v36; // [rsp+28h] [rbp-48h] _BYTE v37[14]; // [rsp+32h] [rbp-3Eh] BYREF unsigned long long v38; // [rsp+40h] [rbp-30h] long long savedregs; // [rsp+70h] [rbp+0h] BYREF v38 = __readfsqword(0x28u); v6 = (unsigned int)(7 * a3); v7 = (_QWORD *)(a1[1].m128i_i64[0] + 16LL * a1->m128i_u32[2]); v8 = (unsigned __int8 *)*v7; v9 = v7[1]; v36 = v6; if ( v9 >= v6 ) { *v7 = &v8[v6]; v7[1] = v9 - v6; v16 = (unsigned int)(a1->m128i_i32[2] - 1); a1->m128i_i32[2] = v16; v17 = (_QWORD *)(a1[1].m128i_i64[0] + 16 * v16); v10 = v8; } else { v34 = a2; v33 = a4; v10 = v37; __memcpy_chk(v37, v8, v9, 14LL); v6 = v36; v11 = v7; v12 = v7 + 3; v13 = v11[3]; v32 = a1; if ( v13 + v9 >= v36 ) { v35 = (long long)v11; v15 = v11 + 2; LABEL_8: v31 = v15; v18 = v6 - v9; v19 = (char *)&savedregs + v9 - 62; v20 = *v15; memcpy(v19, *v15, v18); v6 = v36; *v31 = v18 + v20; *v12 = v13 - v18; a1 = v32; a4 = v33; a2 = v34; v17 = (_QWORD *)v35; } else { while ( 1 ) { memcpy((char *)&savedregs + v9 - 62, *(v12 - 1), v13); v6 = v36; v9 += v13; a1 = v32; *(_OWORD *)(v12 - 1) = 0LL; v14 = v32->m128i_i32[2] + 1; v32->m128i_i32[2] = v14; if ( v9 >= v6 ) break; v13 = v12[2]; v12 += 2; if ( v13 + v9 >= v6 ) { v35 = v32[1].m128i_i64[0] + 16LL * v14; v15 = v12 - 1; goto LABEL_8; } } v17 = (_QWORD *)(v32[1].m128i_i64[0] + 16LL * v14); a4 = v33; a2 = v34; } } v21 = a4 + 18; v22 = &v10[v6 - 7]; v23 = v21; if ( v22 >= v10 ) { v23 = v21; do { v24 = *v22; v25 = v22[1]; v26 = v22[2]; v27 = *(unsigned int *)(v22 + 3); v28 = a2 - (v27 | ((unsigned long long)v26 << 48) | ((unsigned long long)v25 << 40) | ((unsigned long long)*v22 << 32)); if ( v28 > 0x3FFF ) { if ( v28 > (unsigned long long)&unk_3FFFFF ) { if ( v28 > 0x3FFFFFFF ) { if ( v28 >> 38 ) { *(_WORD *)(v23 - 9) = 256; *(_BYTE *)(v23 - 7) = v24; *(_BYTE *)(v23 - 6) = v25; *(_BYTE *)(v23 - 5) = v26; *(_DWORD *)(v23 - 4) = v27; v23 -= 9LL; } else { *(_BYTE *)(v23 - 5) = BYTE4(v28) | 0xC0; *(_DWORD *)(v23 - 4) = v28; v23 -= 5LL; } } else { *(_BYTE *)(v23 - 4) = ((unsigned int)(a2 - v27) >> 24) | 0x80; *(_WORD *)(v23 - 3) = v28; *(_BYTE *)(v23 - 1) = BYTE2(v28); v23 -= 4LL; } } else { *(_BYTE *)(v23 - 3) = ((unsigned int)(a2 - v27) >> 16) | 0x40; *(_WORD *)(v23 - 2) = v28; v23 -= 3LL; } } else { *(_WORD *)(v23 - 2) = __ROL2__(a2 - v27, 8); v23 -= 2LL; } v22 -= 7; } while ( v22 >= v10 ); } v29 = v21 - v23; v17[1] = v29; a1->m128i_i64[0] = _mm_add_epi32(_mm_shuffle_epi32(_mm_cvtsi32_si128((int)v29 - (int)v36), 80), _mm_loadl_epi64(a1)).m128i_u64[0]; *v17 = v23; return __readfsqword(0x28u); }
translog_relative_LSN_encode: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA EDI,[RDX*0x8] SUB EDI,EDX MOV RAX,qword ptr [RBX + 0x10] MOV EDX,dword ptr [RBX + 0x8] SHL RDX,0x4 LEA R15,[RAX + RDX*0x1] MOV RSI,qword ptr [RAX + RDX*0x1] MOV R13,qword ptr [RAX + RDX*0x1 + 0x8] MOV RAX,R13 SUB RAX,RDI MOV qword ptr [RBP + -0x48],RDI JNC 0x001505f1 MOV qword ptr [RBP + -0x58],R14 MOV qword ptr [RBP + -0x60],RCX LEA R12,[RBP + -0x3e] MOV ECX,0xe MOV RDI,R12 MOV RDX,R13 CALL 0x00129420 MOV RDI,qword ptr [RBP + -0x48] MOV RCX,R15 ADD R15,0x18 MOV R14,qword ptr [RCX + 0x18] LEA RAX,[R14 + R13*0x1] CMP RAX,RDI MOV qword ptr [RBP + -0x68],RBX JNC 0x00150614 LAB_0015058b: MOV RBX,R13 LEA RDI,[-0x3e + R13*0x1] ADD RDI,RBP MOV RSI,qword ptr [R15 + -0x8] MOV RDX,R14 CALL 0x00129080 MOV RDI,qword ptr [RBP + -0x48] MOV R13,R14 ADD R13,RBX MOV RBX,qword ptr [RBP + -0x68] XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + -0x8],XMM0 MOV EAX,dword ptr [RBX + 0x8] INC EAX MOV dword ptr [RBX + 0x8],EAX CMP R13,RDI JNC 0x00150665 MOV R14,qword ptr [R15 + 0x10] ADD R15,0x10 LEA RCX,[R14 + R13*0x1] CMP RCX,RDI JC 0x0015058b MOV EAX,EAX SHL RAX,0x4 ADD RAX,qword ptr [RBX + 0x10] MOV qword ptr [RBP + -0x50],RAX LEA RAX,[R15 + -0x8] JMP 0x0015061c LAB_001505f1: LEA RDX,[RSI + RDI*0x1] MOV qword ptr [R15],RDX MOV qword ptr [R15 + 0x8],RAX MOV R15D,dword ptr [RBX + 0x8] DEC R15D MOV dword ptr [RBX + 0x8],R15D SHL R15,0x4 ADD R15,qword ptr [RBX + 0x10] MOV R12,RSI JMP 0x00150678 LAB_00150614: MOV qword ptr [RBP + -0x50],RCX LEA RAX,[RCX + 0x10] LAB_0015061c: MOV qword ptr [RBP + -0x70],RAX MOV RBX,RDI SUB RBX,R13 LEA RDI,[-0x3e + R13*0x1] ADD RDI,RBP MOV R13,qword ptr [RAX] MOV RSI,R13 MOV RDX,RBX CALL 0x00129080 MOV RDI,qword ptr [RBP + -0x48] ADD R13,RBX MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RAX],R13 SUB R14,RBX MOV qword ptr [R15],R14 MOV RBX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x60] MOV R14,qword ptr [RBP + -0x58] MOV R15,qword ptr [RBP + -0x50] JMP 0x00150678 LAB_00150665: MOV R15D,EAX SHL R15,0x4 ADD R15,qword ptr [RBX + 0x10] MOV RCX,qword ptr [RBP + -0x60] MOV R14,qword ptr [RBP + -0x58] LAB_00150678: ADD RCX,0x12 LEA R11,[R12 + RDI*0x1] ADD R11,-0x7 MOV RAX,RCX CMP R11,R12 JC 0x00150773 MOV RAX,RCX LAB_00150693: MOVZX ESI,byte ptr [R11] MOVZX EDI,byte ptr [R11 + 0x1] MOVZX R8D,byte ptr [R11 + 0x2] MOV RDX,R8 SHL RDX,0x30 MOV R9,RDI SHL R9,0x28 MOV R10,RSI SHL R10,0x20 OR R10,R9 OR R10,RDX MOV R9D,dword ptr [R11 + 0x3] OR R10,R9 MOV RDX,R14 SUB RDX,R10 CMP RDX,0x3fff JA 0x001506e3 ROL DX,0x8 MOV word ptr [RAX + -0x2],DX ADD RAX,-0x2 JMP 0x00150766 LAB_001506e3: CMP RDX,0x3fffff JA 0x00150703 MOV ESI,EDX SHR ESI,0x10 OR SIL,0x40 MOV byte ptr [RAX + -0x3],SIL MOV word ptr [RAX + -0x2],DX ADD RAX,-0x3 JMP 0x00150766 LAB_00150703: CMP RDX,0x3fffffff JA 0x0015072b MOV ESI,EDX SHR ESI,0x18 OR SIL,0x80 MOV byte ptr [RAX + -0x4],SIL MOV byte ptr [RAX + -0x3],DL MOV byte ptr [RAX + -0x2],DH SHR EDX,0x10 MOV byte ptr [RAX + -0x1],DL ADD RAX,-0x4 JMP 0x00150766 LAB_0015072b: MOV R10,RDX SHR R10,0x26 JNZ 0x0015074c MOV RSI,RDX SHR RSI,0x20 OR SIL,0xc0 MOV byte ptr [RAX + -0x5],SIL MOV dword ptr [RAX + -0x4],EDX ADD RAX,-0x5 JMP 0x00150766 LAB_0015074c: MOV word ptr [RAX + -0x9],0x100 MOV byte ptr [RAX + -0x7],SIL MOV byte ptr [RAX + -0x6],DIL MOV byte ptr [RAX + -0x5],R8B MOV dword ptr [RAX + -0x4],R9D ADD RAX,-0x9 LAB_00150766: ADD R11,-0x7 CMP R11,R12 JNC 0x00150693 LAB_00150773: SUB RCX,RAX MOV qword ptr [R15 + 0x8],RCX SUB ECX,dword ptr [RBP + -0x48] MOVQ XMM0,qword ptr [RBX] MOVD XMM1,ECX PSHUFD XMM1,XMM1,0x50 PADDD XMM1,XMM0 MOVQ qword ptr [RBX],XMM1 MOV qword ptr [R15],RAX MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001507b3 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001507b3: CALL 0x00129270
void translog_relative_LSN_encode(int8 *param_1,long param_2,int param_3,long param_4) { byte bVar1; byte bVar2; byte bVar3; void *__src; byte bVar4; uint uVar5; long *plVar6; long lVar7; int iVar8; ushort uVar9; long lVar10; size_t __n; ulong uVar11; byte *pbVar12; byte *pbVar13; ulong uVar14; size_t __n_00; long *plVar15; long in_FS_OFFSET; long *local_58; byte local_46 [14]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar11 = (ulong)(uint)(param_3 * 7); lVar7 = param_1[2]; lVar10 = (ulong)*(uint *)(param_1 + 1) * 0x10; local_58 = (long *)(lVar7 + lVar10); pbVar13 = *(byte **)(lVar7 + lVar10); uVar14 = *(ulong *)(lVar7 + 8 + lVar10); if (uVar14 < uVar11) { __memcpy_chk(local_46,pbVar13,uVar14,0xe); plVar15 = local_58 + 3; __n_00 = local_58[3]; pbVar13 = local_46; if (__n_00 + uVar14 < uVar11) { do { plVar6 = plVar15; memcpy(local_46 + uVar14,(void *)plVar6[-1],__n_00); uVar14 = __n_00 + uVar14; plVar6[-1] = 0; *plVar6 = 0; uVar5 = *(int *)(param_1 + 1) + 1; *(uint *)(param_1 + 1) = uVar5; if (uVar11 <= uVar14) { local_58 = (long *)((ulong)uVar5 * 0x10 + param_1[2]); goto LAB_00150678; } __n_00 = plVar6[2]; plVar15 = plVar6 + 2; } while (__n_00 + uVar14 < uVar11); local_58 = (long *)((ulong)uVar5 * 0x10 + param_1[2]); plVar6 = plVar6 + 1; } else { plVar6 = local_58 + 2; } __n = uVar11 - uVar14; __src = (void *)*plVar6; memcpy(local_46 + uVar14,__src,__n); *plVar6 = (long)__src + __n; *plVar15 = __n_00 - __n; } else { *local_58 = (long)(pbVar13 + uVar11); local_58[1] = uVar14 - uVar11; iVar8 = *(int *)(param_1 + 1); *(uint *)(param_1 + 1) = iVar8 - 1U; local_58 = (long *)((ulong)(iVar8 - 1U) * 0x10 + param_1[2]); } LAB_00150678: lVar7 = param_4 + 0x12; for (pbVar12 = pbVar13 + (uVar11 - 7); pbVar13 <= pbVar12; pbVar12 = pbVar12 + -7) { bVar1 = *pbVar12; bVar2 = pbVar12[1]; bVar3 = pbVar12[2]; uVar5 = *(uint *)(pbVar12 + 3); uVar14 = param_2 - ((ulong)bVar1 << 0x20 | (ulong)bVar2 << 0x28 | (ulong)bVar3 << 0x30 | (ulong)uVar5); uVar9 = (ushort)uVar14; if (uVar14 < 0x4000) { *(ushort *)(lVar7 + -2) = uVar9 << 8 | uVar9 >> 8; lVar7 = lVar7 + -2; } else { bVar4 = (byte)(uVar14 >> 0x10); if (uVar14 < 0x400000) { *(byte *)(lVar7 + -3) = bVar4 | 0x40; *(ushort *)(lVar7 + -2) = uVar9; lVar7 = lVar7 + -3; } else if (uVar14 < 0x40000000) { *(byte *)(lVar7 + -4) = (byte)(uVar14 >> 0x18) | 0x80; *(char *)(lVar7 + -3) = (char)uVar14; *(char *)(lVar7 + -2) = (char)(uVar14 >> 8); *(byte *)(lVar7 + -1) = bVar4; lVar7 = lVar7 + -4; } else if (uVar14 >> 0x26 == 0) { *(byte *)(lVar7 + -5) = (byte)(uVar14 >> 0x20) | 0xc0; *(int *)(lVar7 + -4) = (int)uVar14; lVar7 = lVar7 + -5; } else { *(int2 *)(lVar7 + -9) = 0x100; *(byte *)(lVar7 + -7) = bVar1; *(byte *)(lVar7 + -6) = bVar2; *(byte *)(lVar7 + -5) = bVar3; *(uint *)(lVar7 + -4) = uVar5; lVar7 = lVar7 + -9; } } } lVar10 = (param_4 + 0x12) - lVar7; local_58[1] = lVar10; iVar8 = (int)lVar10 + param_3 * -7; *param_1 = CONCAT44(iVar8 + (int)((ulong)*param_1 >> 0x20),iVar8 + (int)*param_1); *local_58 = lVar7; if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
35,586
r3d_drawcall_compare_back_to_front
r3d/src/details/r3d_drawcall.c
int r3d_drawcall_compare_back_to_front(const void* a, const void* b) { const r3d_drawcall_t* drawCallA = a; const r3d_drawcall_t* drawCallB = b; Vector3 posA = { 0 }; Vector3 posB = { 0 }; posA.x = drawCallA->transform.m12; posA.y = drawCallA->transform.m13; posA.z = drawCallA->transform.m14; posB.x = drawCallB->transform.m12; posB.y = drawCallB->transform.m13; posB.z = drawCallB->transform.m14; float distA = Vector3DistanceSqr(R3D.state.transform.position, posA); float distB = Vector3DistanceSqr(R3D.state.transform.position, posB); return (distA < distB) - (distA > distB); }
O3
c
r3d_drawcall_compare_back_to_front: pushq %rbp movq %rsp, %rbp movss 0xc(%rdi), %xmm4 movss 0x1c(%rdi), %xmm5 movss 0x2c(%rdi), %xmm0 movss 0xc(%rsi), %xmm2 movss 0x1c(%rsi), %xmm3 movss 0x2c(%rsi), %xmm1 leaq 0xde8a6(%rip), %rax # 0x1afc50 movsd 0x1664(%rax), %xmm6 movss 0x166c(%rax), %xmm7 subss %xmm6, %xmm4 subss %xmm6, %xmm2 shufps $0x55, %xmm6, %xmm6 # xmm6 = xmm6[1,1,1,1] subss %xmm6, %xmm5 subss %xmm7, %xmm0 mulss %xmm5, %xmm5 mulss %xmm4, %xmm4 addss %xmm5, %xmm4 mulss %xmm0, %xmm0 addss %xmm4, %xmm0 subss %xmm6, %xmm3 subss %xmm7, %xmm1 mulss %xmm3, %xmm3 mulss %xmm2, %xmm2 addss %xmm3, %xmm2 mulss %xmm1, %xmm1 addss %xmm2, %xmm1 xorl %eax, %eax ucomiss %xmm0, %xmm1 seta %al xorl %ecx, %ecx ucomiss %xmm1, %xmm0 seta %cl subl %ecx, %eax popq %rbp retq
r3d_drawcall_compare_back_to_front: push rbp mov rbp, rsp movss xmm4, dword ptr [rdi+0Ch] movss xmm5, dword ptr [rdi+1Ch] movss xmm0, dword ptr [rdi+2Ch] movss xmm2, dword ptr [rsi+0Ch] movss xmm3, dword ptr [rsi+1Ch] movss xmm1, dword ptr [rsi+2Ch] lea rax, R3D movsd xmm6, qword ptr [rax+1664h] movss xmm7, dword ptr [rax+166Ch] subss xmm4, xmm6 subss xmm2, xmm6 shufps xmm6, xmm6, 55h ; 'U' subss xmm5, xmm6 subss xmm0, xmm7 mulss xmm5, xmm5 mulss xmm4, xmm4 addss xmm4, xmm5 mulss xmm0, xmm0 addss xmm0, xmm4 subss xmm3, xmm6 subss xmm1, xmm7 mulss xmm3, xmm3 mulss xmm2, xmm2 addss xmm2, xmm3 mulss xmm1, xmm1 addss xmm1, xmm2 xor eax, eax ucomiss xmm1, xmm0 setnbe al xor ecx, ecx ucomiss xmm0, xmm1 setnbe cl sub eax, ecx pop rbp retn
unsigned long long r3d_drawcall_compare_back_to_front(float *a1, float *a2) { __m128 v2; // xmm6 float v3; // xmm7_4 float v4; // xmm4_4 float v5; // xmm2_4 unsigned int v6; // xmm0_4 unsigned int v7; // xmm1_4 v2 = (__m128)*(unsigned long long *)&R3D[5732]; v3 = *(float *)&R3D[5740]; v4 = a1[3] - v2.m128_f32[0]; v5 = a2[3] - v2.m128_f32[0]; v2.m128_f32[0] = _mm_shuffle_ps(v2, v2, 85).m128_f32[0]; *(float *)&v6 = (float)((float)(a1[11] - v3) * (float)(a1[11] - v3)) + (float)((float)(v4 * v4) + (float)((float)(a1[7] - v2.m128_f32[0]) * (float)(a1[7] - v2.m128_f32[0]))); *(float *)&v7 = (float)((float)(a2[11] - v3) * (float)(a2[11] - v3)) + (float)((float)(v5 * v5) + (float)((float)(a2[7] - v2.m128_f32[0]) * (float)(a2[7] - v2.m128_f32[0]))); return (__PAIR64__(*(float *)&v7 > *(float *)&v6, v7) - v6) >> 32; }
r3d_drawcall_compare_back_to_front: PUSH RBP MOV RBP,RSP MOVSS XMM4,dword ptr [RDI + 0xc] MOVSS XMM5,dword ptr [RDI + 0x1c] MOVSS XMM0,dword ptr [RDI + 0x2c] MOVSS XMM2,dword ptr [RSI + 0xc] MOVSS XMM3,dword ptr [RSI + 0x1c] MOVSS XMM1,dword ptr [RSI + 0x2c] LEA RAX,[0x2afc50] MOVSD XMM6,qword ptr [RAX + 0x1664] MOVSS XMM7,dword ptr [RAX + 0x166c] SUBSS XMM4,XMM6 SUBSS XMM2,XMM6 SHUFPS XMM6,XMM6,0x55 SUBSS XMM5,XMM6 SUBSS XMM0,XMM7 MULSS XMM5,XMM5 MULSS XMM4,XMM4 ADDSS XMM4,XMM5 MULSS XMM0,XMM0 ADDSS XMM0,XMM4 SUBSS XMM3,XMM6 SUBSS XMM1,XMM7 MULSS XMM3,XMM3 MULSS XMM2,XMM2 ADDSS XMM2,XMM3 MULSS XMM1,XMM1 ADDSS XMM1,XMM2 XOR EAX,EAX UCOMISS XMM1,XMM0 SETA AL XOR ECX,ECX UCOMISS XMM0,XMM1 SETA CL SUB EAX,ECX POP RBP RET
int r3d_drawcall_compare_back_to_front(long param_1,long param_2) { float fVar1; float fVar2; float fVar3; float fVar4; float fVar5; fVar4 = *(float *)(param_1 + 0xc) - (float)DAT_002b12b4; fVar2 = *(float *)(param_2 + 0xc) - (float)DAT_002b12b4; fVar3 = (float)((ulong)DAT_002b12b4 >> 0x20); fVar5 = *(float *)(param_1 + 0x1c) - fVar3; fVar1 = *(float *)(param_1 + 0x2c) - DAT_002b12bc; fVar1 = fVar1 * fVar1 + fVar4 * fVar4 + fVar5 * fVar5; fVar3 = *(float *)(param_2 + 0x1c) - fVar3; fVar4 = *(float *)(param_2 + 0x2c) - DAT_002b12bc; fVar4 = fVar4 * fVar4 + fVar2 * fVar2 + fVar3 * fVar3; return (uint)(fVar1 < fVar4) - (uint)(fVar4 < fVar1); }
35,587
uf_zerofill_skip_zero
eloqsql/storage/maria/ma_packrec.c
static void uf_zerofill_skip_zero(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff, uchar *to, uchar *end) { if (get_bit(bit_buff)) bzero((char*) to,(uint) (end-to)); else { end-=rec->space_length_bits; decode_bytes(rec,bit_buff,to,end); bzero((char*) end,rec->space_length_bits); } }
O3
c
uf_zerofill_skip_zero: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %r15 movl 0x4(%rsi), %eax testl %eax, %eax je 0x43a50 movl (%r12), %ecx decl %eax movl %eax, 0x4(%r12) btl %eax, %ecx jae 0x43a68 subl %r14d, %ebx movq %r14, %rdi xorl %esi, %esi movq %rbx, %rdx jmp 0x43a89 movq %r12, %rdi callq 0x439ec movl $0x1f, 0x4(%r12) cmpl $0x0, (%r12) js 0x43a43 movl 0x24(%r15), %eax subq %rax, %rbx movq %r15, %rdi movq %r12, %rsi movq %r14, %rdx movq %rbx, %rcx callq 0x43ba9 movl 0x24(%r15), %edx movq %rbx, %rdi xorl %esi, %esi popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x2a290
uf_zerofill_skip_zero: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rcx mov r14, rdx mov r12, rsi mov r15, rdi mov eax, [rsi+4] test eax, eax jz short loc_43A50 mov ecx, [r12] dec eax mov [r12+4], eax bt ecx, eax jnb short loc_43A68 loc_43A43: sub ebx, r14d mov rdi, r14 xor esi, esi mov rdx, rbx jmp short loc_43A89 loc_43A50: mov rdi, r12 call fill_buffer mov dword ptr [r12+4], 1Fh cmp dword ptr [r12], 0 js short loc_43A43 loc_43A68: mov eax, [r15+24h] sub rbx, rax mov rdi, r15 mov rsi, r12 mov rdx, r14 mov rcx, rbx call decode_bytes mov edx, [r15+24h] mov rdi, rbx xor esi, esi loc_43A89: pop rbx pop r12 pop r14 pop r15 pop rbp jmp _memset
long long uf_zerofill_skip_zero(long long a1, int *a2, long long a3, long long a4) { int v6; // eax int v7; // ecx unsigned int v8; // eax long long v10; // rbx v6 = a2[1]; if ( v6 ) { v7 = *a2; v8 = v6 - 1; a2[1] = v8; if ( _bittest(&v7, v8) ) return memset(a3, 0LL, (unsigned int)(a4 - a3)); } else { fill_buffer((long long)a2); a2[1] = 31; if ( *a2 < 0 ) return memset(a3, 0LL, (unsigned int)(a4 - a3)); } v10 = a4 - *(unsigned int *)(a1 + 36); decode_bytes(a1, a2, a3, v10); return memset(v10, 0LL, *(unsigned int *)(a1 + 36)); }
uf_zerofill_skip_zero: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RCX MOV R14,RDX MOV R12,RSI MOV R15,RDI MOV EAX,dword ptr [RSI + 0x4] TEST EAX,EAX JZ 0x00143a50 MOV ECX,dword ptr [R12] DEC EAX MOV dword ptr [R12 + 0x4],EAX BT ECX,EAX JNC 0x00143a68 LAB_00143a43: SUB EBX,R14D MOV RDI,R14 XOR ESI,ESI MOV RDX,RBX JMP 0x00143a89 LAB_00143a50: MOV RDI,R12 CALL 0x001439ec MOV dword ptr [R12 + 0x4],0x1f CMP dword ptr [R12],0x0 JS 0x00143a43 LAB_00143a68: MOV EAX,dword ptr [R15 + 0x24] SUB RBX,RAX MOV RDI,R15 MOV RSI,R12 MOV RDX,R14 MOV RCX,RBX CALL 0x00143ba9 MOV EDX,dword ptr [R15 + 0x24] MOV RDI,RBX XOR ESI,ESI LAB_00143a89: POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x0012a290
void uf_zerofill_skip_zero(long param_1,uint *param_2,void *param_3,long param_4) { uint uVar1; void *__s; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; if (-1 < (int)*param_2) goto LAB_00143a68; } else { uVar1 = param_2[1] - 1; param_2[1] = uVar1; if ((*param_2 >> (uVar1 & 0x1f) & 1) == 0) { LAB_00143a68: __s = (void *)(param_4 - (ulong)*(uint *)(param_1 + 0x24)); decode_bytes(param_1,param_2,param_3,__s); uVar1 = *(uint *)(param_1 + 0x24); goto LAB_00143a89; } } uVar1 = (int)param_4 - (int)param_3; __s = param_3; LAB_00143a89: memset(__s,0,(ulong)uVar1); return; }
35,588
Catch::BinaryExpr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char const (&) [5]>::streamReconstructedExpression(std::ostream&) const
11AgReS1SoR11[P]Graph/build_O3/_deps/catch2-src/src/catch2/../catch2/internal/catch_decomposer.hpp
void streamReconstructedExpression( std::ostream &os ) const override { formatReconstructedExpression ( os, Catch::Detail::stringify( m_lhs ), m_op, Catch::Detail::stringify( m_rhs ) ); }
O3
cpp
Catch::BinaryExpr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char const (&) [5]>::streamReconstructedExpression(std::ostream&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rsi, %rbx movq %rdi, %r12 movq 0x10(%rdi), %rax movzwl (%rax), %eax leaq 0x8(%rsp), %rsi movw %ax, (%rsi) leaq 0x28(%rsp), %rdi callq 0x269a6 movq 0x18(%r12), %r14 movq 0x20(%r12), %r15 movq 0x28(%r12), %rax movzwl (%rax), %eax leaq 0x6(%rsp), %rsi movw %ax, (%rsi) leaq 0x8(%rsp), %rdi callq 0x269a6 leaq 0x28(%rsp), %rsi leaq 0x8(%rsp), %r8 movq %rbx, %rdi movq %r14, %rdx movq %r15, %rcx callq 0x3d56c leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2884b movq 0x18(%rsp), %rsi incq %rsi callq 0x154d0 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x28866 movq 0x38(%rsp), %rsi incq %rsi callq 0x154d0 addq $0x48, %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 0x28895 movq 0x18(%rsp), %rsi incq %rsi callq 0x154d0 jmp 0x28895 movq %rax, %rbx leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x288b0 movq 0x38(%rsp), %rsi incq %rsi callq 0x154d0 movq %rbx, %rdi callq 0x158e0
_ZNK5Catch10BinaryExprIR7color_eS2_E29streamReconstructedExpressionERSo: push r15 push r14 push r12 push rbx sub rsp, 48h mov rbx, rsi mov r12, rdi mov rax, [rdi+10h] movzx eax, word ptr [rax] lea rsi, [rsp+68h+var_60] mov [rsi], ax lea rdi, [rsp+68h+var_40] call _ZN5Catch11StringMakerIsvE7convertIsEENSt9enable_ifIXgssr5Catch6Detail18IsStreamInsertableIT_EE5valueENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE4typeERKS4_ mov r14, [r12+18h] mov r15, [r12+20h] mov rax, [r12+28h] movzx eax, word ptr [rax] lea rsi, [rsp+68h+var_62] mov [rsi], ax lea rdi, [rsp+68h+var_60] call _ZN5Catch11StringMakerIsvE7convertIsEENSt9enable_ifIXgssr5Catch6Detail18IsStreamInsertableIT_EE5valueENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE4typeERKS4_ lea rsi, [rsp+68h+var_40] lea r8, [rsp+68h+var_60] mov rdi, rbx mov rdx, r14 mov rcx, r15 call _ZN5Catch29formatReconstructedExpressionERSoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_9StringRefES8_; Catch::formatReconstructedExpression(std::ostream &,std::string const&,Catch::StringRef,std::string const&) lea rax, [rsp+68h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_2884B mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2884B: lea rax, [rsp+68h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_28866 mov rsi, [rsp+68h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_28866: add rsp, 48h 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_28895 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_28895 mov rbx, rax loc_28895: lea rax, [rsp+arg_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_288B0 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_288B0: mov rdi, rbx call __Unwind_Resume
void Catch::BinaryExpr<color_e &,color_e &>::streamReconstructedExpression(long long a1, long long a2) { long long v2; // r14 long long v3; // r15 __int16 v4; // [rsp+6h] [rbp-62h] BYREF void *v5[2]; // [rsp+8h] [rbp-60h] BYREF long long v6; // [rsp+18h] [rbp-50h] BYREF void *v7[2]; // [rsp+28h] [rbp-40h] BYREF long long v8; // [rsp+38h] [rbp-30h] BYREF LOWORD(v5[0]) = **(_WORD **)(a1 + 16); Catch::StringMaker<short,void>::convert<short>((long long)v7, (__int16 *)v5); v2 = *(_QWORD *)(a1 + 24); v3 = *(_QWORD *)(a1 + 32); v4 = **(_WORD **)(a1 + 40); Catch::StringMaker<short,void>::convert<short>((long long)v5, &v4); Catch::formatReconstructedExpression(a2, v7, v2, v3, v5); if ( v5[0] != &v6 ) operator delete(v5[0], v6 + 1); if ( v7[0] != &v8 ) operator delete(v7[0], v8 + 1); }
streamReconstructedExpression: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RBX,RSI MOV R12,RDI MOV RAX,qword ptr [RDI + 0x10] MOVZX EAX,word ptr [RAX] LEA RSI,[RSP + 0x8] MOV word ptr [RSI],AX LEA RDI,[RSP + 0x28] CALL 0x001269a6 MOV R14,qword ptr [R12 + 0x18] MOV R15,qword ptr [R12 + 0x20] MOV RAX,qword ptr [R12 + 0x28] MOVZX EAX,word ptr [RAX] LEA RSI,[RSP + 0x6] MOV word ptr [RSI],AX LAB_0012880e: LEA RDI,[RSP + 0x8] CALL 0x001269a6 LAB_00128818: LEA RSI,[RSP + 0x28] LEA R8,[RSP + 0x8] MOV RDI,RBX MOV RDX,R14 MOV RCX,R15 CALL 0x0013d56c LAB_00128830: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0012884b MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001154d0 LAB_0012884b: LEA RAX,[RSP + 0x38] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00128866 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001154d0 LAB_00128866: ADD RSP,0x48 POP RBX POP R12 POP R14 POP R15 RET
/* Catch::BinaryExpr<color_e&, color_e&>::streamReconstructedExpression(std::ostream&) const */ void __thiscall Catch::BinaryExpr<color_e&,color_e&>::streamReconstructedExpression (BinaryExpr<color_e&,color_e&> *this,ostream *param_1) { int8 uVar1; int8 uVar2; short local_62; short local_60; int6 uStack_5e; long local_50 [2]; long *local_40 [2]; long local_30 [2]; local_60 = **(short **)(this + 0x10); StringMaker<short,void>::convert<short>((StringMaker<short,void> *)local_40,&local_60); uVar1 = *(int8 *)(this + 0x18); uVar2 = *(int8 *)(this + 0x20); local_62 = **(short **)(this + 0x28); /* try { // try from 0012880e to 00128817 has its CatchHandler @ 00128892 */ StringMaker<short,void>::convert<short>((StringMaker<short,void> *)&local_60,&local_62); /* try { // try from 00128818 to 0012882f has its CatchHandler @ 00128872 */ formatReconstructedExpression((Catch *)param_1,local_40,uVar1,uVar2,&local_60); if ((long *)CONCAT62(uStack_5e,local_60) != local_50) { operator_delete((long *)CONCAT62(uStack_5e,local_60),local_50[0] + 1); } if (local_40[0] != local_30) { operator_delete(local_40[0],local_30[0] + 1); } return; }
35,589
test_sum::build_graph(ggml_context*)
monkey531[P]llama/tests/test-backend-ops.cpp
ggml_tensor * build_graph(ggml_context * ctx) override { ggml_tensor * a = ggml_new_tensor(ctx, type, 4, ne.data()); ggml_set_param(ctx, a); ggml_set_name(a, "a"); ggml_tensor * out = ggml_sum(ctx, a); ggml_set_name(out, "out"); return out; }
O2
cpp
test_sum::build_graph(ggml_context*): pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movl 0x38(%rdi), %edx leaq 0x40(%rdi), %r8 pushq $0x4 popq %rcx callq 0x1d200 movq %rax, %r14 movq %rbx, %rdi movq %rax, %rsi callq 0xfac0 leaq 0x5ee2(%rip), %rsi # 0x30d8b movq %r14, %rdi callq 0xfb40 movq %rbx, %rdi movq %r14, %rsi callq 0xf060 movq %rax, %rbx leaq 0x646c(%rip), %rsi # 0x31332 movq %rax, %rdi callq 0xfb40 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN8test_sum11build_graphEP12ggml_context: push r14 push rbx push rax mov rbx, rsi mov edx, [rdi+38h] lea r8, [rdi+40h] push 4 pop rcx call _ZN9test_case15ggml_new_tensorEP12ggml_context9ggml_typeiPKl; test_case::ggml_new_tensor(ggml_context *,ggml_type,int,long const*) mov r14, rax mov rdi, rbx mov rsi, rax call _ggml_set_param lea rsi, aViewOfA+8; "a" mov rdi, r14 call _ggml_set_name mov rdi, rbx mov rsi, r14 call _ggml_sum mov rbx, rax lea rsi, aSumOfOut+7; "out" mov rdi, rax call _ggml_set_name mov rax, rbx add rsp, 8 pop rbx pop r14 retn
long long test_sum::build_graph(long long a1, long long a2) { long long v2; // r14 long long v3; // rbx v2 = test_case::ggml_new_tensor(a1, a2, *(_DWORD *)(a1 + 56), 4u, a1 + 64); ggml_set_param(a2, v2); ggml_set_name(v2, "a"); v3 = ggml_sum(a2, v2); ggml_set_name(v3, "out"); return v3; }
build_graph: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV EDX,dword ptr [RDI + 0x38] LEA R8,[RDI + 0x40] PUSH 0x4 POP RCX CALL 0x0011d200 MOV R14,RAX MOV RDI,RBX MOV RSI,RAX CALL 0x0010fac0 LEA RSI,[0x130d8b] MOV RDI,R14 CALL 0x0010fb40 MOV RDI,RBX MOV RSI,R14 CALL 0x0010f060 MOV RBX,RAX LEA RSI,[0x131332] MOV RDI,RAX CALL 0x0010fb40 MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* test_sum::build_graph(ggml_context*) */ int8 __thiscall test_sum::build_graph(test_sum *this,ggml_context *param_1) { int8 uVar1; uVar1 = test_case::ggml_new_tensor ((test_case *)this,param_1,*(int4 *)(this + 0x38),4,this + 0x40); ggml_set_param(param_1,uVar1); ggml_set_name(uVar1,"a"); uVar1 = ggml_sum(param_1,uVar1); ggml_set_name(uVar1,"out"); return uVar1; }
35,590
find_longest_bitstream
eloqsql/storage/maria/ma_packrec.c
static uint find_longest_bitstream(uint16 *table, uint16 *end) { uint length=1; uint length2; if (!(*table & IS_CHAR)) { uint16 *next= table + *table; if (next > end || next == table) { DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree")); return OFFSET_TABLE_SIZE; } length=find_longest_bitstream(next, end)+1; } table++; if (!(*table & IS_CHAR)) { uint16 *next= table + *table; if (next > end || next == table) { DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree")); return OFFSET_TABLE_SIZE; } length2= find_longest_bitstream(next, end) + 1; length=MY_MAX(length,length2); } return length; }
O0
c
find_longest_bitstream: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl $0x1, -0x1c(%rbp) movq -0x10(%rbp), %rax movzwl (%rax), %eax andl $0x8000, %eax # imm = 0x8000 cmpl $0x0, %eax jne 0x4f957 movq -0x10(%rbp), %rax movq -0x10(%rbp), %rcx movzwl (%rcx), %ecx movslq %ecx, %rcx shlq %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax cmpq -0x18(%rbp), %rax ja 0x4f934 movq -0x28(%rbp), %rax cmpq -0x10(%rbp), %rax jne 0x4f944 jmp 0x4f936 jmp 0x4f938 movl $0x200, -0x4(%rbp) # imm = 0x200 jmp 0x4f9e2 movq -0x28(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x4f8e0 addl $0x1, %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax addq $0x2, %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movzwl (%rax), %eax andl $0x8000, %eax # imm = 0x8000 cmpl $0x0, %eax jne 0x4f9dc movq -0x10(%rbp), %rax movq -0x10(%rbp), %rcx movzwl (%rcx), %ecx movslq %ecx, %rcx shlq %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq -0x18(%rbp), %rax ja 0x4f9a0 movq -0x30(%rbp), %rax cmpq -0x10(%rbp), %rax jne 0x4f9ad jmp 0x4f9a2 jmp 0x4f9a4 movl $0x200, -0x4(%rbp) # imm = 0x200 jmp 0x4f9e2 movq -0x30(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x4f8e0 addl $0x1, %eax movl %eax, -0x20(%rbp) movl -0x1c(%rbp), %eax cmpl -0x20(%rbp), %eax jbe 0x4f9d0 movl -0x1c(%rbp), %eax movl %eax, -0x34(%rbp) jmp 0x4f9d6 movl -0x20(%rbp), %eax movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax,%rax)
find_longest_bitstream: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], 1 mov rax, [rbp+var_10] movzx eax, word ptr [rax] and eax, 8000h cmp eax, 0 jnz short loc_4F957 mov rax, [rbp+var_10] mov rcx, [rbp+var_10] movzx ecx, word ptr [rcx] movsxd rcx, ecx shl rcx, 1 add rax, rcx mov [rbp+var_28], rax mov rax, [rbp+var_28] cmp rax, [rbp+var_18] ja short loc_4F934 mov rax, [rbp+var_28] cmp rax, [rbp+var_10] jnz short loc_4F944 loc_4F934: jmp short $+2 loc_4F936: jmp short $+2 loc_4F938: mov [rbp+var_4], 200h jmp loc_4F9E2 loc_4F944: mov rdi, [rbp+var_28] mov rsi, [rbp+var_18] call find_longest_bitstream add eax, 1 mov [rbp+var_1C], eax loc_4F957: mov rax, [rbp+var_10] add rax, 2 mov [rbp+var_10], rax mov rax, [rbp+var_10] movzx eax, word ptr [rax] and eax, 8000h cmp eax, 0 jnz short loc_4F9DC mov rax, [rbp+var_10] mov rcx, [rbp+var_10] movzx ecx, word ptr [rcx] movsxd rcx, ecx shl rcx, 1 add rax, rcx mov [rbp+var_30], rax mov rax, [rbp+var_30] cmp rax, [rbp+var_18] ja short loc_4F9A0 mov rax, [rbp+var_30] cmp rax, [rbp+var_10] jnz short loc_4F9AD loc_4F9A0: jmp short $+2 loc_4F9A2: jmp short $+2 loc_4F9A4: mov [rbp+var_4], 200h jmp short loc_4F9E2 loc_4F9AD: mov rdi, [rbp+var_30] mov rsi, [rbp+var_18] call find_longest_bitstream add eax, 1 mov [rbp+var_20], eax mov eax, [rbp+var_1C] cmp eax, [rbp+var_20] jbe short loc_4F9D0 mov eax, [rbp+var_1C] mov [rbp+var_34], eax jmp short loc_4F9D6 loc_4F9D0: mov eax, [rbp+var_20] mov [rbp+var_34], eax loc_4F9D6: mov eax, [rbp+var_34] mov [rbp+var_1C], eax loc_4F9DC: mov eax, [rbp+var_1C] mov [rbp+var_4], eax loc_4F9E2: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long find_longest_bitstream(unsigned __int16 *a1, unsigned long long a2) { unsigned __int16 *v4; // [rsp+10h] [rbp-30h] unsigned __int16 *v5; // [rsp+18h] [rbp-28h] unsigned int v6; // [rsp+20h] [rbp-20h] unsigned int v7; // [rsp+24h] [rbp-1Ch] unsigned __int16 *v8; // [rsp+30h] [rbp-10h] v7 = 1; if ( (*a1 & 0x8000) != 0 ) { LABEL_6: v8 = a1 + 1; if ( (a1[1] & 0x8000) == 0 ) { v4 = &v8[*v8]; if ( (unsigned long long)v4 > a2 || v4 == v8 ) return 512; v6 = find_longest_bitstream(v4, a2) + 1; if ( v7 <= v6 ) return v6; else return v7; } return v7; } v5 = &a1[*a1]; if ( (unsigned long long)v5 <= a2 && v5 != a1 ) { v7 = find_longest_bitstream(v5, a2) + 1; goto LABEL_6; } return 512; }
find_longest_bitstream: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],0x1 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX] AND EAX,0x8000 CMP EAX,0x0 JNZ 0x0014f957 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RCX] MOVSXD RCX,ECX SHL RCX,0x1 ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x18] JA 0x0014f934 MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x10] JNZ 0x0014f944 LAB_0014f934: JMP 0x0014f936 LAB_0014f936: JMP 0x0014f938 LAB_0014f938: MOV dword ptr [RBP + -0x4],0x200 JMP 0x0014f9e2 LAB_0014f944: MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0014f8e0 ADD EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX LAB_0014f957: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX] AND EAX,0x8000 CMP EAX,0x0 JNZ 0x0014f9dc MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RCX] MOVSXD RCX,ECX SHL RCX,0x1 ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x18] JA 0x0014f9a0 MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x10] JNZ 0x0014f9ad LAB_0014f9a0: JMP 0x0014f9a2 LAB_0014f9a2: JMP 0x0014f9a4 LAB_0014f9a4: MOV dword ptr [RBP + -0x4],0x200 JMP 0x0014f9e2 LAB_0014f9ad: MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0014f8e0 ADD EAX,0x1 MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x1c] CMP EAX,dword ptr [RBP + -0x20] JBE 0x0014f9d0 MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x34],EAX JMP 0x0014f9d6 LAB_0014f9d0: MOV EAX,dword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x34],EAX LAB_0014f9d6: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x1c],EAX LAB_0014f9dc: MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x4],EAX LAB_0014f9e2: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
uint find_longest_bitstream(ushort *param_1,ushort *param_2) { int iVar1; ushort *puVar2; uint local_3c; uint local_24; local_24 = 1; if ((*param_1 & 0x8000) == 0) { puVar2 = param_1 + (int)(uint)*param_1; if ((param_2 < puVar2) || (puVar2 == param_1)) { return 0x200; } iVar1 = find_longest_bitstream(puVar2,param_2); local_24 = iVar1 + 1; } param_1 = param_1 + 1; if ((*param_1 & 0x8000) == 0) { puVar2 = param_1 + (int)(uint)*param_1; if ((param_2 < puVar2) || (puVar2 == param_1)) { return 0x200; } iVar1 = find_longest_bitstream(puVar2,param_2); local_3c = iVar1 + 1; if (local_3c < local_24) { local_3c = local_24; } local_24 = local_3c; } return local_24; }
35,591
void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::number_float_t)
monkey531[P]llama/common/json.hpp
static void construct(BasicJsonType& j, typename BasicJsonType::number_float_t val) noexcept { j.m_data.m_value.destroy(j.m_data.m_type); j.m_data.m_type = value_t::number_float; j.m_data.m_value = val; j.assert_invariant(); }
O1
cpp
void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::number_float_t): pushq %rbx subq $0x10, %rsp movsd %xmm0, (%rsp) movq %rdi, %rbx addq $0x8, %rdi movzbl (%rbx), %esi callq 0x6286e movb $0x7, (%rbx) movsd (%rsp), %xmm0 movsd %xmm0, 0x8(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x8(%rbx) movq %rbx, %rdi movl $0x1, %esi addq $0x10, %rsp popq %rbx jmp 0x5cc1e movq %rax, %rdi callq 0x24da5
_ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE7EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_14number_float_tE: push rbx sub rsp, 10h movsd [rsp+18h+var_18], xmm0 mov rbx, rdi add rdi, 8 movzx esi, byte ptr [rbx] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_value7destroyENS0_6detail7value_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::json_value::destroy(nlohmann::json_abi_v3_11_3::detail::value_t) mov byte ptr [rbx], 7 movsd xmm0, [rsp+18h+var_18] movsd [rsp+18h+var_10], xmm0 mov rax, [rsp+18h+var_10] mov [rbx+8], rax mov rdi, rbx mov esi, 1 add rsp, 10h pop rbx jmp _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rax call __clang_call_terminate
long long nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( unsigned __int8 *a1, double a2) { long long result; // rax nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::json_value::destroy( (long long **)a1 + 1, *a1); *a1 = 7; result = *(_QWORD *)&a2; *((double *)a1 + 1) = a2; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); return result; }
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>: PUSH RBX SUB RSP,0x10 MOVSD qword ptr [RSP],XMM0 MOV RBX,RDI ADD RDI,0x8 MOVZX ESI,byte ptr [RBX] LAB_0016417e: CALL 0x0016286e MOV byte ptr [RBX],0x7 MOVSD XMM0,qword ptr [RSP] MOVSD qword ptr [RSP + 0x8],XMM0 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RBX + 0x8],RAX MOV RDI,RBX MOV ESI,0x1 ADD RSP,0x10 POP RBX JMP 0x0015cc1e
/* void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::number_float_t) */ void nlohmann::json_abi_v3_11_3::detail:: external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>:: construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (int8 param_1_00,int1 *param_1) { /* try { // try from 0016417e to 00164182 has its CatchHandler @ 001641ac */ basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::json_value::destroy((json_value *)(param_1 + 8),*param_1); *param_1 = 7; *(int8 *)(param_1 + 8) = param_1_00; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(param_1,0)); return; }
35,592
my_caseup_str_mb
eloqsql/strings/ctype-mb.c
size_t my_caseup_str_mb(CHARSET_INFO * cs, char *str) { register uint32 l; register const uchar *map= cs->to_upper; char *str_orig= str; while (*str) { /* Pointing after the '\0' is safe here. */ if ((l= my_ismbchar(cs, str, str + cs->mbmaxlen))) str+= l; else { *str= (char) map[(uchar)*str]; str++; } } return (size_t) (str - str_orig); }
O3
c
my_caseup_str_mb: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %rbx cmpb $0x0, (%rsi) movq %rsi, %rax je 0x72078 movq %rdi, %r14 movq 0x50(%rdi), %r12 movq %rbx, %r15 movl 0x9c(%r14), %edx addq %r15, %rdx movq 0xb8(%r14), %rax movq %r14, %rdi movq %r15, %rsi callq *0xc0(%rax) cmpl $0x2, %eax jge 0x72068 movzbl (%r15), %eax movb (%r12,%rax), %al movb %al, (%r15) movl $0x1, %ecx jmp 0x7206a movl %eax, %ecx leaq (%r15,%rcx), %rax cmpb $0x0, (%r15,%rcx) movq %rax, %r15 jne 0x72034 subq %rbx, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
my_caseup_str_mb: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rsi cmp byte ptr [rsi], 0 mov rax, rsi jz short loc_72078 mov r14, rdi mov r12, [rdi+50h] mov r15, rbx loc_72034: mov edx, [r14+9Ch] add rdx, r15 mov rax, [r14+0B8h] mov rdi, r14 mov rsi, r15 call qword ptr [rax+0C0h] cmp eax, 2 jge short loc_72068 movzx eax, byte ptr [r15] mov al, [r12+rax] mov [r15], al mov ecx, 1 jmp short loc_7206A loc_72068: mov ecx, eax loc_7206A: lea rax, [r15+rcx] cmp byte ptr [r15+rcx], 0 mov r15, rax jnz short loc_72034 loc_72078: sub rax, rbx pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long my_caseup_str_mb(long long a1, _BYTE *a2) { _BYTE *v2; // rax long long v3; // r12 _BYTE *v4; // r15 int v5; // eax long long v6; // rcx bool v7; // zf v2 = a2; if ( *a2 ) { v3 = *(_QWORD *)(a1 + 80); v4 = a2; do { v5 = (*(long long ( **)(long long, _BYTE *, _BYTE *))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v4, &v4[*(unsigned int *)(a1 + 156)]); if ( v5 >= 2 ) { v6 = (unsigned int)v5; } else { *v4 = *(_BYTE *)(v3 + (unsigned __int8)*v4); v6 = 1LL; } v2 = &v4[v6]; v7 = v4[v6] == 0; v4 += v6; } while ( !v7 ); } return v2 - a2; }
my_caseup_str_mb: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RSI CMP byte ptr [RSI],0x0 MOV RAX,RSI JZ 0x00172078 MOV R14,RDI MOV R12,qword ptr [RDI + 0x50] MOV R15,RBX LAB_00172034: MOV EDX,dword ptr [R14 + 0x9c] ADD RDX,R15 MOV RAX,qword ptr [R14 + 0xb8] MOV RDI,R14 MOV RSI,R15 CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 JGE 0x00172068 MOVZX EAX,byte ptr [R15] MOV AL,byte ptr [R12 + RAX*0x1] MOV byte ptr [R15],AL MOV ECX,0x1 JMP 0x0017206a LAB_00172068: MOV ECX,EAX LAB_0017206a: LEA RAX,[R15 + RCX*0x1] CMP byte ptr [R15 + RCX*0x1],0x0 MOV R15,RAX JNZ 0x00172034 LAB_00172078: SUB RAX,RBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
long my_caseup_str_mb(long param_1,byte *param_2) { byte *pbVar1; long lVar2; uint uVar3; byte *pbVar4; ulong uVar5; byte *pbVar6; pbVar4 = param_2; if (*param_2 != 0) { lVar2 = *(long *)(param_1 + 0x50); pbVar6 = param_2; do { uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0)) (param_1,pbVar6,pbVar6 + *(uint *)(param_1 + 0x9c)); if ((int)uVar3 < 2) { *pbVar6 = *(byte *)(lVar2 + (ulong)*pbVar6); uVar5 = 1; } else { uVar5 = (ulong)uVar3; } pbVar4 = pbVar6 + uVar5; pbVar1 = pbVar6 + uVar5; pbVar6 = pbVar4; } while (*pbVar1 != 0); } return (long)pbVar4 - (long)param_2; }
35,593
js_os_sleep
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_sleep(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { int64_t delay; int ret; if (JS_ToInt64(ctx, &delay, argv[0])) return JS_EXCEPTION; if (delay < 0) delay = 0; #if defined(_WIN32) { if (delay > INT32_MAX) delay = INT32_MAX; Sleep(delay); ret = 0; } #else { struct timespec ts; ts.tv_sec = delay / 1000; ts.tv_nsec = (delay % 1000) * 1000000; ret = js_get_errno(nanosleep(&ts, NULL)); } #endif return JS_NewInt32(ctx, ret); }
O0
c
js_os_sleep: subq $0x88, %rsp movq %rsi, 0x48(%rsp) movq %rdx, 0x50(%rsp) movq %rdi, 0x40(%rsp) movl %ecx, 0x3c(%rsp) movq %r8, 0x30(%rsp) movq 0x40(%rsp), %rdi movq 0x30(%rsp), %rax movq (%rax), %rdx movq 0x8(%rax), %rcx leaq 0x28(%rsp), %rsi callq 0x38bf0 cmpl $0x0, %eax je 0x1b335 movl $0x0, 0x58(%rsp) movq $0x6, 0x60(%rsp) jmp 0x1b3fe cmpq $0x0, 0x28(%rsp) jge 0x1b346 movq $0x0, 0x28(%rsp) movq 0x28(%rsp), %rax movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF imulq %rcx movq %rdx, %rax movq %rax, %rdx shrq $0x3f, %rdx sarq $0x7, %rax addq %rdx, %rax movq %rax, 0x10(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x8(%rsp) imulq %rcx movq 0x8(%rsp), %rax movq %rdx, %rcx movq %rcx, %rdx shrq $0x3f, %rdx sarq $0x7, %rcx addq %rdx, %rcx imulq $0x3e8, %rcx, %rcx # imm = 0x3E8 subq %rcx, %rax imulq $0xf4240, %rax, %rax # imm = 0xF4240 movq %rax, 0x18(%rsp) xorl %eax, %eax movl %eax, %esi leaq 0x10(%rsp), %rdi callq 0xe2f0 movslq %eax, %rdi callq 0x13a50 movl %eax, 0x24(%rsp) movq 0x40(%rsp), %rcx movl 0x24(%rsp), %eax movq %rcx, 0x70(%rsp) movl %eax, 0x6c(%rsp) movl 0x6c(%rsp), %eax movl %eax, 0x78(%rsp) movq $0x0, 0x80(%rsp) movq 0x78(%rsp), %rcx movq 0x80(%rsp), %rax movq %rcx, 0x58(%rsp) movq %rax, 0x60(%rsp) movq 0x58(%rsp), %rax movq 0x60(%rsp), %rdx addq $0x88, %rsp retq
js_os_sleep: sub rsp, 88h mov [rsp+88h+var_40], rsi mov [rsp+88h+var_38], rdx mov [rsp+88h+var_48], rdi mov [rsp+88h+var_4C], ecx mov [rsp+88h+var_58], r8 mov rdi, [rsp+88h+var_48] mov rax, [rsp+88h+var_58] mov rdx, [rax] mov rcx, [rax+8] lea rsi, [rsp+88h+var_60] call JS_ToInt64 cmp eax, 0 jz short loc_1B335 mov dword ptr [rsp+88h+var_30], 0 mov [rsp+88h+var_28], 6 jmp loc_1B3FE loc_1B335: cmp [rsp+88h+var_60], 0 jge short loc_1B346 mov [rsp+88h+var_60], 0 loc_1B346: mov rax, [rsp+88h+var_60] mov rcx, 20C49BA5E353F7CFh imul rcx mov rax, rdx mov rdx, rax shr rdx, 3Fh sar rax, 7 add rax, rdx mov [rsp+88h+var_78], rax mov rax, [rsp+88h+var_60] mov [rsp+88h+var_80], rax imul rcx mov rax, [rsp+88h+var_80] mov rcx, rdx mov rdx, rcx shr rdx, 3Fh sar rcx, 7 add rcx, rdx imul rcx, 3E8h sub rax, rcx imul rax, 0F4240h mov [rsp+88h+var_70], rax xor eax, eax mov esi, eax lea rdi, [rsp+88h+var_78] call _nanosleep movsxd rdi, eax call js_get_errno mov [rsp+88h+var_64], eax mov rcx, [rsp+88h+var_48] mov eax, [rsp+88h+var_64] mov [rsp+88h+var_18], rcx mov [rsp+88h+var_1C], eax mov eax, [rsp+88h+var_1C] mov dword ptr [rsp+88h+var_10], eax mov [rsp+88h+var_8], 0 mov rcx, [rsp+88h+var_10] mov rax, [rsp+88h+var_8] mov [rsp+88h+var_30], rcx mov [rsp+88h+var_28], rax loc_1B3FE: mov rax, [rsp+88h+var_30] mov rdx, [rsp+88h+var_28] add rsp, 88h retn
long long js_os_sleep(long long a1, long long a2, long long a3, int a4, _QWORD *a5) { int v5; // eax _QWORD v7[2]; // [rsp+10h] [rbp-78h] BYREF int errno; // [rsp+24h] [rbp-64h] _QWORD v9[2]; // [rsp+28h] [rbp-60h] BYREF int v10; // [rsp+3Ch] [rbp-4Ch] long long v11; // [rsp+40h] [rbp-48h] long long v12; // [rsp+48h] [rbp-40h] long long v13; // [rsp+50h] [rbp-38h] long long v14; // [rsp+58h] [rbp-30h] long long v15; // [rsp+60h] [rbp-28h] int v16; // [rsp+6Ch] [rbp-1Ch] long long v17; // [rsp+70h] [rbp-18h] long long v18; // [rsp+78h] [rbp-10h] long long v19; // [rsp+80h] [rbp-8h] v12 = a2; v13 = a3; v11 = a1; v10 = a4; v9[1] = a5; if ( (unsigned int)JS_ToInt64(a1, v9, *a5, a5[1]) ) { LODWORD(v14) = 0; v15 = 6LL; } else { if ( v9[0] < 0LL ) v9[0] = 0LL; v7[0] = v9[0] / 1000LL; v7[1] = 1000000 * (v9[0] % 1000LL); v5 = nanosleep(v7, 0LL); errno = js_get_errno(v5); v17 = v11; v16 = errno; LODWORD(v18) = errno; v19 = 0LL; v14 = v18; v15 = 0LL; } return v14; }
js_os_sleep: SUB RSP,0x88 MOV qword ptr [RSP + 0x48],RSI MOV qword ptr [RSP + 0x50],RDX MOV qword ptr [RSP + 0x40],RDI MOV dword ptr [RSP + 0x3c],ECX MOV qword ptr [RSP + 0x30],R8 MOV RDI,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x28] CALL 0x00138bf0 CMP EAX,0x0 JZ 0x0011b335 MOV dword ptr [RSP + 0x58],0x0 MOV qword ptr [RSP + 0x60],0x6 JMP 0x0011b3fe LAB_0011b335: CMP qword ptr [RSP + 0x28],0x0 JGE 0x0011b346 MOV qword ptr [RSP + 0x28],0x0 LAB_0011b346: MOV RAX,qword ptr [RSP + 0x28] MOV RCX,0x20c49ba5e353f7cf IMUL RCX MOV RAX,RDX MOV RDX,RAX SHR RDX,0x3f SAR RAX,0x7 ADD RAX,RDX MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x8],RAX IMUL RCX MOV RAX,qword ptr [RSP + 0x8] MOV RCX,RDX MOV RDX,RCX SHR RDX,0x3f SAR RCX,0x7 ADD RCX,RDX IMUL RCX,RCX,0x3e8 SUB RAX,RCX IMUL RAX,RAX,0xf4240 MOV qword ptr [RSP + 0x18],RAX XOR EAX,EAX MOV ESI,EAX LEA RDI,[RSP + 0x10] CALL 0x0010e2f0 MOVSXD RDI,EAX CALL 0x00113a50 MOV dword ptr [RSP + 0x24],EAX MOV RCX,qword ptr [RSP + 0x40] MOV EAX,dword ptr [RSP + 0x24] MOV qword ptr [RSP + 0x70],RCX MOV dword ptr [RSP + 0x6c],EAX MOV EAX,dword ptr [RSP + 0x6c] MOV dword ptr [RSP + 0x78],EAX MOV qword ptr [RSP + 0x80],0x0 MOV RCX,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x58],RCX MOV qword ptr [RSP + 0x60],RAX LAB_0011b3fe: MOV RAX,qword ptr [RSP + 0x58] MOV RDX,qword ptr [RSP + 0x60] ADD RSP,0x88 RET
int1 [16] js_os_sleep(int8 param_1,int8 param_2,int8 param_3,int4 param_4, int8 *param_5) { int1 auVar1 [16]; int iVar2; timespec local_78; long local_60; int8 *local_58; int4 local_4c; int8 local_48; int8 local_40; int8 local_38; int4 local_30; int4 uStack_2c; int8 local_28; int4 uStack_c; local_58 = param_5; local_4c = param_4; local_48 = param_1; local_40 = param_2; local_38 = param_3; iVar2 = JS_ToInt64(param_1,&local_60,*param_5,param_5[1]); if (iVar2 == 0) { if (local_60 < 0) { local_60 = 0; } local_78.tv_sec = local_60 / 1000; local_78.tv_nsec = (local_60 % 1000) * 1000000; iVar2 = nanosleep(&local_78,(timespec *)0x0); local_30 = js_get_errno((long)iVar2); uStack_2c = uStack_c; local_28 = 0; } else { local_30 = 0; local_28 = 6; } auVar1._4_4_ = uStack_2c; auVar1._0_4_ = local_30; auVar1._8_8_ = local_28; return auVar1; }
35,594
js_os_sleep
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_sleep(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { int64_t delay; int ret; if (JS_ToInt64(ctx, &delay, argv[0])) return JS_EXCEPTION; if (delay < 0) delay = 0; #if defined(_WIN32) { if (delay > INT32_MAX) delay = INT32_MAX; Sleep(delay); ret = 0; } #else { struct timespec ts; ts.tv_sec = delay / 1000; ts.tv_nsec = (delay % 1000) * 1000000; ret = js_get_errno(nanosleep(&ts, NULL)); } #endif return JS_NewInt32(ctx, ret); }
O2
c
js_os_sleep: pushq %rbx subq $0x20, %rsp movq (%r8), %rdx movq 0x8(%r8), %rcx leaq 0x8(%rsp), %rsi callq 0x214fe testl %eax, %eax je 0x1480c pushq $0x6 popq %rbx xorl %eax, %eax jmp 0x1484e movq 0x8(%rsp), %rax testq %rax, %rax jns 0x1481e andq $0x0, 0x8(%rsp) xorl %eax, %eax movl $0x3e8, %ecx # imm = 0x3E8 xorl %edx, %edx divq %rcx xorl %ebx, %ebx leaq 0x10(%rsp), %rdi movq %rax, (%rdi) imulq $0xf4240, %rdx, %rax # imm = 0xF4240 movq %rax, 0x8(%rdi) xorl %esi, %esi callq 0xe300 movslq %eax, %rdi callq 0x113ab movl %eax, %eax movq %rbx, %rdx addq $0x20, %rsp popq %rbx retq
js_os_sleep: push rbx sub rsp, 20h mov rdx, [r8] mov rcx, [r8+8] lea rsi, [rsp+28h+var_20] call JS_ToInt64 test eax, eax jz short loc_1480C push 6 pop rbx xor eax, eax jmp short loc_1484E loc_1480C: mov rax, [rsp+28h+var_20] test rax, rax jns short loc_1481E and [rsp+28h+var_20], 0 xor eax, eax loc_1481E: mov ecx, 3E8h xor edx, edx div rcx xor ebx, ebx lea rdi, [rsp+28h+var_18] mov [rdi], rax imul rax, rdx, 0F4240h mov [rdi+8], rax xor esi, esi call _nanosleep movsxd rdi, eax call js_get_errno mov eax, eax loc_1484E: mov rdx, rbx add rsp, 20h pop rbx retn
long long js_os_sleep(long long a1, long long a2, long long a3, long long a4, _QWORD *a5) { unsigned long long v6; // rax int v7; // eax long long v8; // [rsp+8h] [rbp-20h] BYREF _QWORD v9[3]; // [rsp+10h] [rbp-18h] BYREF if ( (unsigned int)JS_ToInt64(a1, &v8, *a5, a5[1]) ) return 0LL; v6 = v8; if ( v8 < 0 ) { v8 = 0LL; v6 = 0LL; } v9[0] = v6 / 0x3E8; v9[1] = 1000000 * (v6 % 0x3E8); v7 = nanosleep(v9, 0LL); return (unsigned int)js_get_errno(v7); }
js_os_sleep: PUSH RBX SUB RSP,0x20 MOV RDX,qword ptr [R8] MOV RCX,qword ptr [R8 + 0x8] LEA RSI,[RSP + 0x8] CALL 0x001214fe TEST EAX,EAX JZ 0x0011480c PUSH 0x6 POP RBX XOR EAX,EAX JMP 0x0011484e LAB_0011480c: MOV RAX,qword ptr [RSP + 0x8] TEST RAX,RAX JNS 0x0011481e AND qword ptr [RSP + 0x8],0x0 XOR EAX,EAX LAB_0011481e: MOV ECX,0x3e8 XOR EDX,EDX DIV RCX XOR EBX,EBX LEA RDI,[RSP + 0x10] MOV qword ptr [RDI],RAX IMUL RAX,RDX,0xf4240 MOV qword ptr [RDI + 0x8],RAX XOR ESI,ESI CALL 0x0010e300 MOVSXD RDI,EAX CALL 0x001113ab MOV EAX,EAX LAB_0011484e: MOV RDX,RBX ADD RSP,0x20 POP RBX RET
int4 js_os_sleep(int8 param_1) { int iVar1; int4 uVar2; int8 *in_R8; ulong local_20; timespec local_18; iVar1 = JS_ToInt64(param_1,&local_20,*in_R8,in_R8[1]); if (iVar1 == 0) { if ((long)local_20 < 0) { local_20 = 0; } local_18.tv_sec = local_20 / 1000; local_18.tv_nsec = (local_20 % 1000) * 1000000; iVar1 = nanosleep(&local_18,(timespec *)0x0); uVar2 = js_get_errno((long)iVar1); } else { uVar2 = 0; } return uVar2; }
35,595
stbi__resample_row_v_2(unsigned char*, unsigned char*, unsigned char*, int, int)
monkey531[P]llama/examples/llava/../../common/stb_image.h
static stbi_uc* stbi__resample_row_v_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) { // need to generate two samples vertically for every one in input int i; STBI_NOTUSED(hs); for (i=0; i < w; ++i) out[i] = stbi__div4(3*in_near[i] + in_far[i] + 2); return out; }
O2
c
stbi__resample_row_v_2(unsigned char*, unsigned char*, unsigned char*, int, int): movq %rdi, %rax xorl %edi, %edi testl %ecx, %ecx cmovlel %edi, %ecx cmpq %rdi, %rcx je 0x41055 movzbl (%rsi,%rdi), %r8d leal (%r8,%r8,2), %r8d movzbl (%rdx,%rdi), %r9d addl %r9d, %r8d addl $0x2, %r8d shrl $0x2, %r8d movb %r8b, (%rax,%rdi) incq %rdi jmp 0x4102e retq
_ZL22stbi__resample_row_v_2PhS_S_ii: mov rax, rdi xor edi, edi test ecx, ecx cmovle ecx, edi loc_4102E: cmp rcx, rdi jz short locret_41055 movzx r8d, byte ptr [rsi+rdi] lea r8d, [r8+r8*2] movzx r9d, byte ptr [rdx+rdi] add r8d, r9d add r8d, 2 shr r8d, 2 mov [rax+rdi], r8b inc rdi jmp short loc_4102E locret_41055: retn
unsigned __int8 * stbi__resample_row_v_2( unsigned __int8 *a1, unsigned __int8 *a2, unsigned __int8 *a3, long long a4) { unsigned __int8 *result; // rax long long v5; // rdi result = a1; v5 = 0LL; if ( (int)a4 <= 0 ) a4 = 0LL; while ( a4 != v5 ) { result[v5] = (a3[v5] + 3 * (unsigned int)a2[v5] + 2) >> 2; ++v5; } return result; }
stbi__resample_row_v_2: MOV RAX,RDI XOR EDI,EDI TEST ECX,ECX CMOVLE ECX,EDI LAB_0014102e: CMP RCX,RDI JZ 0x00141055 MOVZX R8D,byte ptr [RSI + RDI*0x1] LEA R8D,[R8 + R8*0x2] MOVZX R9D,byte ptr [RDX + RDI*0x1] ADD R8D,R9D ADD R8D,0x2 SHR R8D,0x2 MOV byte ptr [RAX + RDI*0x1],R8B INC RDI JMP 0x0014102e LAB_00141055: RET
/* stbi__resample_row_v_2(unsigned char*, unsigned char*, unsigned char*, int, int) */ void stbi__resample_row_v_2(uchar *param_1,uchar *param_2,uchar *param_3,int param_4,int param_5) { ulong uVar1; ulong uVar2; uVar2 = 0; uVar1 = (ulong)(uint)param_4; if (param_4 < 1) { uVar1 = uVar2; } for (; uVar1 != uVar2; uVar2 = uVar2 + 1) { param_1[uVar2] = (uchar)((uint)param_2[uVar2] + (uint)param_2[uVar2] * 2 + (uint)param_3[uVar2] + 2 >> 2); } return; }
35,596
find_set_from_flags
eloqsql/mysys/typelib.c
my_ulonglong find_set_from_flags(const TYPELIB *lib, uint default_name, my_ulonglong cur_set, my_ulonglong default_set, const char *str, uint length, char **err_pos, uint *err_len) { const char *end= str + length; my_ulonglong flags_to_set= 0, flags_to_clear= 0, res; my_bool set_defaults= 0; *err_pos= 0; /* No error yet */ if (str != end) { const char *start= str; for (;;) { const char *pos= start; uint flag_no, value; if (!(flag_no= parse_name(lib, &pos, end))) goto err; if (flag_no == default_name) { /* Using 'default' twice isn't allowed. */ if (set_defaults) goto err; set_defaults= TRUE; } else { my_ulonglong bit= (1ULL << (flag_no - 1)); /* parse the '=on|off|default' */ if ((flags_to_clear | flags_to_set) & bit || pos >= end || *pos++ != '=' || !(value= parse_name(&on_off_default_typelib, &pos, end))) goto err; if (value == 1) /* this is '=off' */ flags_to_clear|= bit; else if (value == 2) /* this is '=on' */ flags_to_set|= bit; else /* this is '=default' */ { if (default_set & bit) flags_to_set|= bit; else flags_to_clear|= bit; } } if (pos >= end) break; if (*pos++ != ',') goto err; start=pos; continue; err: *err_pos= (char*)start; *err_len= (uint)(end - start); break; } } res= set_defaults? default_set : cur_set; res|= flags_to_set; res&= ~flags_to_clear; return res; }
O0
c
find_set_from_flags: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq 0x18(%rbp), %rax movq 0x10(%rbp), %rax movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movl %r9d, -0x2c(%rbp) movq -0x28(%rbp), %rax movl -0x2c(%rbp), %ecx addq %rcx, %rax movq %rax, -0x38(%rbp) movq $0x0, -0x40(%rbp) movq $0x0, -0x48(%rbp) movb $0x0, -0x51(%rbp) movq 0x10(%rbp), %rax movq $0x0, (%rax) movq -0x28(%rbp), %rax cmpq -0x38(%rbp), %rax je 0x2dc71 movq -0x28(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x8(%rbp), %rdi movq -0x38(%rbp), %rdx leaq -0x68(%rbp), %rsi callq 0x2dcc0 movl %eax, -0x6c(%rbp) cmpl $0x0, %eax jne 0x2db43 jmp 0x2dc51 movl -0x6c(%rbp), %eax cmpl -0xc(%rbp), %eax jne 0x2db5f cmpb $0x0, -0x51(%rbp) je 0x2db56 jmp 0x2dc51 movb $0x1, -0x51(%rbp) jmp 0x2dc1f movl -0x6c(%rbp), %eax subl $0x1, %eax movl %eax, %eax movl %eax, %ecx movl $0x1, %eax shlq %cl, %rax movq %rax, -0x78(%rbp) movq -0x48(%rbp), %rax orq -0x40(%rbp), %rax andq -0x78(%rbp), %rax cmpq $0x0, %rax jne 0x2dbc4 movq -0x68(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x2dbc4 movq -0x68(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x68(%rbp) movsbl (%rax), %eax cmpl $0x3d, %eax jne 0x2dbc4 movq -0x38(%rbp), %rdx leaq 0x1ac0cd(%rip), %rdi # 0x1d9c80 leaq -0x68(%rbp), %rsi callq 0x2dcc0 movl %eax, -0x70(%rbp) cmpl $0x0, %eax jne 0x2dbc9 jmp 0x2dc51 cmpl $0x1, -0x70(%rbp) jne 0x2dbdd movq -0x78(%rbp), %rax orq -0x48(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0x2dc1d cmpl $0x2, -0x70(%rbp) jne 0x2dbf1 movq -0x78(%rbp), %rax orq -0x40(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0x2dc1b movq -0x20(%rbp), %rax andq -0x78(%rbp), %rax cmpq $0x0, %rax je 0x2dc0d movq -0x78(%rbp), %rax orq -0x40(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0x2dc19 movq -0x78(%rbp), %rax orq -0x48(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0x2dc1b jmp 0x2dc1d jmp 0x2dc1f movq -0x68(%rbp), %rax cmpq -0x38(%rbp), %rax jb 0x2dc2b jmp 0x2dc6f movq -0x68(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x68(%rbp) movsbl (%rax), %eax cmpl $0x2c, %eax je 0x2dc44 jmp 0x2dc51 movq -0x68(%rbp), %rax movq %rax, -0x60(%rbp) jmp 0x2db1d movq -0x60(%rbp), %rcx movq 0x10(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rax movq -0x60(%rbp), %rcx subq %rcx, %rax movl %eax, %ecx movq 0x18(%rbp), %rax movl %ecx, (%rax) jmp 0x2dc71 movsbl -0x51(%rbp), %eax cmpl $0x0, %eax je 0x2dc84 movq -0x20(%rbp), %rax movq %rax, -0x80(%rbp) jmp 0x2dc8c movq -0x18(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x80(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x40(%rbp), %rax orq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x48(%rbp), %rax xorq $-0x1, %rax andq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax addq $0x80, %rsp popq %rbp retq nopl (%rax)
find_set_from_flags: push rbp mov rbp, rsp sub rsp, 80h mov rax, [rbp+arg_8] mov rax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_2C], r9d mov rax, [rbp+var_28] mov ecx, [rbp+var_2C] add rax, rcx mov [rbp+var_38], rax mov [rbp+var_40], 0 mov [rbp+var_48], 0 mov [rbp+var_51], 0 mov rax, [rbp+arg_0] mov qword ptr [rax], 0 mov rax, [rbp+var_28] cmp rax, [rbp+var_38] jz loc_2DC71 mov rax, [rbp+var_28] mov [rbp+var_60], rax loc_2DB1D: mov rax, [rbp+var_60] mov [rbp+var_68], rax mov rdi, [rbp+var_8] mov rdx, [rbp+var_38] lea rsi, [rbp+var_68] call parse_name mov [rbp+var_6C], eax cmp eax, 0 jnz short loc_2DB43 jmp loc_2DC51 loc_2DB43: mov eax, [rbp+var_6C] cmp eax, [rbp+var_C] jnz short loc_2DB5F cmp [rbp+var_51], 0 jz short loc_2DB56 jmp loc_2DC51 loc_2DB56: mov [rbp+var_51], 1 jmp loc_2DC1F loc_2DB5F: mov eax, [rbp+var_6C] sub eax, 1 mov eax, eax mov ecx, eax mov eax, 1 shl rax, cl mov [rbp+var_78], rax mov rax, [rbp+var_48] or rax, [rbp+var_40] and rax, [rbp+var_78] cmp rax, 0 jnz short loc_2DBC4 mov rax, [rbp+var_68] cmp rax, [rbp+var_38] jnb short loc_2DBC4 mov rax, [rbp+var_68] mov rcx, rax add rcx, 1 mov [rbp+var_68], rcx movsx eax, byte ptr [rax] cmp eax, 3Dh ; '=' jnz short loc_2DBC4 mov rdx, [rbp+var_38] lea rdi, on_off_default_typelib lea rsi, [rbp+var_68] call parse_name mov [rbp+var_70], eax cmp eax, 0 jnz short loc_2DBC9 loc_2DBC4: jmp loc_2DC51 loc_2DBC9: cmp [rbp+var_70], 1 jnz short loc_2DBDD mov rax, [rbp+var_78] or rax, [rbp+var_48] mov [rbp+var_48], rax jmp short loc_2DC1D loc_2DBDD: cmp [rbp+var_70], 2 jnz short loc_2DBF1 mov rax, [rbp+var_78] or rax, [rbp+var_40] mov [rbp+var_40], rax jmp short loc_2DC1B loc_2DBF1: mov rax, [rbp+var_20] and rax, [rbp+var_78] cmp rax, 0 jz short loc_2DC0D mov rax, [rbp+var_78] or rax, [rbp+var_40] mov [rbp+var_40], rax jmp short loc_2DC19 loc_2DC0D: mov rax, [rbp+var_78] or rax, [rbp+var_48] mov [rbp+var_48], rax loc_2DC19: jmp short $+2 loc_2DC1B: jmp short $+2 loc_2DC1D: jmp short $+2 loc_2DC1F: mov rax, [rbp+var_68] cmp rax, [rbp+var_38] jb short loc_2DC2B jmp short loc_2DC6F loc_2DC2B: mov rax, [rbp+var_68] mov rcx, rax add rcx, 1 mov [rbp+var_68], rcx movsx eax, byte ptr [rax] cmp eax, 2Ch ; ',' jz short loc_2DC44 jmp short loc_2DC51 loc_2DC44: mov rax, [rbp+var_68] mov [rbp+var_60], rax jmp loc_2DB1D loc_2DC51: mov rcx, [rbp+var_60] mov rax, [rbp+arg_0] mov [rax], rcx mov rax, [rbp+var_38] mov rcx, [rbp+var_60] sub rax, rcx mov ecx, eax mov rax, [rbp+arg_8] mov [rax], ecx loc_2DC6F: jmp short $+2 loc_2DC71: movsx eax, [rbp+var_51] cmp eax, 0 jz short loc_2DC84 mov rax, [rbp+var_20] mov [rbp+var_80], rax jmp short loc_2DC8C loc_2DC84: mov rax, [rbp+var_18] mov [rbp+var_80], rax loc_2DC8C: mov rax, [rbp+var_80] mov [rbp+var_50], rax mov rax, [rbp+var_40] or rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_48] xor rax, 0FFFFFFFFFFFFFFFFh and rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_50] add rsp, 80h pop rbp retn
long long find_set_from_flags( long long a1, int a2, long long a3, long long a4, _BYTE *a5, unsigned int a6, _QWORD *a7, _DWORD *a8) { _BYTE *v8; // rax _BYTE *v9; // rax long long v11; // [rsp+0h] [rbp-80h] long long v12; // [rsp+8h] [rbp-78h] int v13; // [rsp+10h] [rbp-70h] int v14; // [rsp+14h] [rbp-6Ch] _BYTE *v15; // [rsp+18h] [rbp-68h] BYREF _BYTE *i; // [rsp+20h] [rbp-60h] char v17; // [rsp+2Fh] [rbp-51h] long long v18; // [rsp+38h] [rbp-48h] long long v19; // [rsp+40h] [rbp-40h] unsigned long long v20; // [rsp+48h] [rbp-38h] unsigned int v21; // [rsp+54h] [rbp-2Ch] _BYTE *v22; // [rsp+58h] [rbp-28h] long long v23; // [rsp+60h] [rbp-20h] long long v24; // [rsp+68h] [rbp-18h] int v25; // [rsp+74h] [rbp-Ch] long long v26; // [rsp+78h] [rbp-8h] v26 = a1; v25 = a2; v24 = a3; v23 = a4; v22 = a5; v21 = a6; v20 = (unsigned long long)&a5[a6]; v19 = 0LL; v18 = 0LL; v17 = 0; *a7 = 0LL; if ( v22 != (_BYTE *)v20 ) { for ( i = v22; ; i = v15 ) { v15 = i; v14 = parse_name(v26, &v15, v20); if ( !v14 ) break; if ( v14 == v25 ) { if ( v17 ) break; v17 = 1; } else { v12 = 1LL << ((unsigned __int8)v14 - 1); if ( (v12 & (v19 | v18)) != 0 ) break; if ( (unsigned long long)v15 >= v20 ) break; v8 = v15++; if ( *v8 != 61 ) break; v13 = parse_name(&on_off_default_typelib, &v15, v20); switch ( v13 ) { case 0: goto LABEL_22; case 1: v18 |= v12; break; case 2: v19 |= v12; break; default: if ( (v12 & v23) != 0 ) v19 |= v12; else v18 |= v12; break; } } if ( (unsigned long long)v15 >= v20 ) goto LABEL_23; v9 = v15++; if ( *v9 != 44 ) break; } LABEL_22: *a7 = i; *a8 = v20 - (_DWORD)i; } LABEL_23: if ( v17 ) v11 = v23; else v11 = v24; return (v11 | v19) & ~v18; }
find_set_from_flags: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV RAX,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV dword ptr [RBP + -0x2c],R9D MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RBP + -0x2c] ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV qword ptr [RBP + -0x40],0x0 MOV qword ptr [RBP + -0x48],0x0 MOV byte ptr [RBP + -0x51],0x0 MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x38] JZ 0x0012dc71 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x60],RAX LAB_0012db1d: MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x68],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x38] LEA RSI,[RBP + -0x68] CALL 0x0012dcc0 MOV dword ptr [RBP + -0x6c],EAX CMP EAX,0x0 JNZ 0x0012db43 JMP 0x0012dc51 LAB_0012db43: MOV EAX,dword ptr [RBP + -0x6c] CMP EAX,dword ptr [RBP + -0xc] JNZ 0x0012db5f CMP byte ptr [RBP + -0x51],0x0 JZ 0x0012db56 JMP 0x0012dc51 LAB_0012db56: MOV byte ptr [RBP + -0x51],0x1 JMP 0x0012dc1f LAB_0012db5f: MOV EAX,dword ptr [RBP + -0x6c] SUB EAX,0x1 MOV EAX,EAX MOV ECX,EAX MOV EAX,0x1 SHL RAX,CL MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x48] OR RAX,qword ptr [RBP + -0x40] AND RAX,qword ptr [RBP + -0x78] CMP RAX,0x0 JNZ 0x0012dbc4 MOV RAX,qword ptr [RBP + -0x68] CMP RAX,qword ptr [RBP + -0x38] JNC 0x0012dbc4 MOV RAX,qword ptr [RBP + -0x68] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x68],RCX MOVSX EAX,byte ptr [RAX] CMP EAX,0x3d JNZ 0x0012dbc4 MOV RDX,qword ptr [RBP + -0x38] LEA RDI,[0x2d9c80] LEA RSI,[RBP + -0x68] CALL 0x0012dcc0 MOV dword ptr [RBP + -0x70],EAX CMP EAX,0x0 JNZ 0x0012dbc9 LAB_0012dbc4: JMP 0x0012dc51 LAB_0012dbc9: CMP dword ptr [RBP + -0x70],0x1 JNZ 0x0012dbdd MOV RAX,qword ptr [RBP + -0x78] OR RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x48],RAX JMP 0x0012dc1d LAB_0012dbdd: CMP dword ptr [RBP + -0x70],0x2 JNZ 0x0012dbf1 MOV RAX,qword ptr [RBP + -0x78] OR RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x40],RAX JMP 0x0012dc1b LAB_0012dbf1: MOV RAX,qword ptr [RBP + -0x20] AND RAX,qword ptr [RBP + -0x78] CMP RAX,0x0 JZ 0x0012dc0d MOV RAX,qword ptr [RBP + -0x78] OR RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x40],RAX JMP 0x0012dc19 LAB_0012dc0d: MOV RAX,qword ptr [RBP + -0x78] OR RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x48],RAX LAB_0012dc19: JMP 0x0012dc1b LAB_0012dc1b: JMP 0x0012dc1d LAB_0012dc1d: JMP 0x0012dc1f LAB_0012dc1f: MOV RAX,qword ptr [RBP + -0x68] CMP RAX,qword ptr [RBP + -0x38] JC 0x0012dc2b JMP 0x0012dc6f LAB_0012dc2b: MOV RAX,qword ptr [RBP + -0x68] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x68],RCX MOVSX EAX,byte ptr [RAX] CMP EAX,0x2c JZ 0x0012dc44 JMP 0x0012dc51 LAB_0012dc44: MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x60],RAX JMP 0x0012db1d LAB_0012dc51: MOV RCX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x60] SUB RAX,RCX MOV ECX,EAX MOV RAX,qword ptr [RBP + 0x18] MOV dword ptr [RAX],ECX LAB_0012dc6f: JMP 0x0012dc71 LAB_0012dc71: MOVSX EAX,byte ptr [RBP + -0x51] CMP EAX,0x0 JZ 0x0012dc84 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x80],RAX JMP 0x0012dc8c LAB_0012dc84: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x80],RAX LAB_0012dc8c: MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x40] OR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x48] XOR RAX,-0x1 AND RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] ADD RSP,0x80 POP RBP RET
ulong find_set_from_flags(int8 param_1,int param_2,ulong param_3,ulong param_4,char *param_5, uint param_6,int8 *param_7,int *param_8) { char *pcVar1; int iVar2; ulong uVar3; ulong local_88; char *local_70; char *local_68; char local_59; ulong local_50; ulong local_48; char *local_40; uint local_34; char *local_30; ulong local_28; ulong local_20; int local_14; int8 local_10; local_40 = param_5 + param_6; local_48 = 0; local_50 = 0; local_59 = '\0'; *param_7 = 0; pcVar1 = param_5; local_34 = param_6; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_14 = param_2; local_10 = param_1; if (param_5 != local_40) { while( true ) { local_68 = pcVar1; local_70 = local_68; iVar2 = parse_name(local_10,&local_70,local_40); if (iVar2 == 0) break; if (iVar2 == local_14) { if (local_59 != '\0') break; local_59 = '\x01'; } else { uVar3 = 1L << ((char)iVar2 - 1U & 0x3f); if ((((((local_50 | local_48) & uVar3) != 0) || (local_40 <= local_70)) || (*local_70 != '=')) || (local_70 = local_70 + 1, iVar2 = parse_name(on_off_default_typelib,&local_70,local_40), iVar2 == 0)) break; if (iVar2 == 1) { local_50 = uVar3 | local_50; } else if (iVar2 == 2) { local_48 = uVar3 | local_48; } else if ((local_28 & uVar3) == 0) { local_50 = uVar3 | local_50; } else { local_48 = uVar3 | local_48; } } if (local_40 <= local_70) goto LAB_0012dc71; pcVar1 = local_70 + 1; if (*local_70 != ',') break; } *param_7 = local_68; *param_8 = (int)local_40 - (int)local_68; } LAB_0012dc71: if (local_59 == '\0') { local_88 = local_20; } else { local_88 = local_28; } return (local_50 ^ 0xffffffffffffffff) & (local_48 | local_88); }
35,597
diagnostic_info
eshkol/src/core/diagnostics/diagnostics.c
void diagnostic_info(DiagnosticContext* context, int line, int column, const char* message) { assert(context != NULL); assert(message != NULL); // Only add info messages if verbosity is verbose or debug if (context->verbosity >= VERBOSITY_VERBOSE) { // Create source location SourceLocation location = source_location_create(NULL, line, column, 0); // Add diagnostic diagnostic_context_add(context, DIAGNOSTIC_INFO, location, message, NULL); } }
O3
c
diagnostic_info: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp testq %rdi, %rdi je 0x2af1 testq %rcx, %rcx je 0x2b10 cmpl $0x0, 0x28(%rdi) je 0x2aeb movq $0x0, -0x18(%rbp) movl %esi, -0x10(%rbp) movl %edx, -0xc(%rbp) movl $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, 0x10(%rsp) movups -0x18(%rbp), %xmm0 movups %xmm0, (%rsp) xorl %esi, %esi movq %rcx, %rdx xorl %ecx, %ecx callq 0x25d2 addq $0x30, %rsp popq %rbp retq leaq 0xb5a1(%rip), %rdi # 0xe099 leaq 0xbd01(%rip), %rsi # 0xe800 leaq 0xc0a2(%rip), %rcx # 0xeba8 movl $0xf2, %edx callq 0x1130 leaq 0xbddb(%rip), %rdi # 0xe8f2 leaq 0xbce2(%rip), %rsi # 0xe800 leaq 0xc083(%rip), %rcx # 0xeba8 movl $0xf3, %edx callq 0x1130
diagnostic_info: push rbp mov rbp, rsp sub rsp, 30h test rdi, rdi jz short loc_2AF1 test rcx, rcx jz short loc_2B10 cmp dword ptr [rdi+28h], 0 jz short loc_2AEB mov qword ptr [rbp+var_18], 0 mov dword ptr [rbp+var_18+8], esi mov dword ptr [rbp+var_18+0Ch], edx mov dword ptr [rbp+var_8], 0 mov rax, [rbp+var_8] mov [rsp+30h+var_20], rax movups xmm0, [rbp+var_18] movups [rsp+30h+var_30], xmm0 xor esi, esi mov rdx, rcx xor ecx, ecx call diagnostic_context_add loc_2AEB: add rsp, 30h pop rbp retn loc_2AF1: lea rdi, aTypeContextNul+5; "context != NULL" lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eshkol"... lea rcx, aVoidDiagnostic_3; "void diagnostic_info(DiagnosticContext "... mov edx, 0F2h call ___assert_fail loc_2B10: lea rdi, aMessageNull; "message != NULL" lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eshkol"... lea rcx, aVoidDiagnostic_3; "void diagnostic_info(DiagnosticContext "... mov edx, 0F3h call ___assert_fail
long long diagnostic_info(long long a1, unsigned int a2, unsigned int a3, long long a4, long long a5, long long a6) { long long result; // rax __int128 v7; // [rsp+18h] [rbp-18h] long long v8; // [rsp+28h] [rbp-8h] if ( !a1 ) __assert_fail( "context != NULL", "/workspace/llm4binary/github2025/eshkol/src/core/diagnostics/diagnostics.c", 242LL, "void diagnostic_info(DiagnosticContext *, int, int, const char *)"); if ( !a4 ) __assert_fail( "message != NULL", "/workspace/llm4binary/github2025/eshkol/src/core/diagnostics/diagnostics.c", 243LL, "void diagnostic_info(DiagnosticContext *, int, int, const char *)"); if ( *(_DWORD *)(a1 + 40) ) { *(_QWORD *)&v7 = 0LL; *((_QWORD *)&v7 + 1) = __PAIR64__(a3, a2); LODWORD(v8) = 0; return diagnostic_context_add((long long *)a1, 0, a4, 0LL, a5, a6, v7, v8); } return result; }
diagnostic_info: PUSH RBP MOV RBP,RSP SUB RSP,0x30 TEST RDI,RDI JZ 0x00102af1 TEST RCX,RCX JZ 0x00102b10 CMP dword ptr [RDI + 0x28],0x0 JZ 0x00102aeb MOV qword ptr [RBP + -0x18],0x0 MOV dword ptr [RBP + -0x10],ESI MOV dword ptr [RBP + -0xc],EDX MOV dword ptr [RBP + -0x8],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [RBP + -0x18] MOVUPS xmmword ptr [RSP],XMM0 XOR ESI,ESI MOV RDX,RCX XOR ECX,ECX CALL 0x001025d2 LAB_00102aeb: ADD RSP,0x30 POP RBP RET LAB_00102af1: LEA RDI,[0x10e099] LEA RSI,[0x10e800] LEA RCX,[0x10eba8] MOV EDX,0xf2 CALL 0x00101130 LAB_00102b10: LEA RDI,[0x10e8f2] LEA RSI,[0x10e800] LEA RCX,[0x10eba8] MOV EDX,0xf3 CALL 0x00101130
void diagnostic_info(long param_1,int4 param_2,int8 param_3,long param_4, int8 param_5,int8 param_6) { uint uStack_c; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("context != NULL", "/workspace/llm4binary/github2025/eshkol/src/core/diagnostics/diagnostics.c",0xf2, "void diagnostic_info(DiagnosticContext *, int, int, const char *)"); } if (param_4 != 0) { if (*(int *)(param_1 + 0x28) != 0) { diagnostic_context_add(param_1,0,param_4,0,param_5,param_6,0,param_2,(ulong)uStack_c << 0x20); } return; } /* WARNING: Subroutine does not return */ __assert_fail("message != NULL", "/workspace/llm4binary/github2025/eshkol/src/core/diagnostics/diagnostics.c",0xf3, "void diagnostic_info(DiagnosticContext *, int, int, const char *)"); }
35,598
OpenSubdiv::v3_6_0::Bfr::Tessellation::GetRates(int*) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/../bfr/parameterization.h
int GetFaceSize() const { return _faceSize; }
O1
c
OpenSubdiv::v3_6_0::Bfr::Tessellation::GetRates(int*) const: movzwl 0x2(%rdi), %eax movl 0x10(%rdi), %r8d movl %r8d, %ecx subl %eax, %ecx cmovgel %eax, %r8d testl %r8d, %r8d jle 0x9f48a movq 0x28(%rdi), %rdx movl %r8d, %r8d xorl %r9d, %r9d movl (%rdx,%r9,4), %r10d movl %r10d, (%rsi,%r9,4) incq %r9 cmpq %r9, %r8 jne 0x9f47a testl %ecx, %ecx jle 0x9f4ae movl %ecx, %ecx leaq (%rsi,%rax,4), %rax xorl %edx, %edx xorl %esi, %esi testq %rdx, %rdx setne %sil movl 0x20(%rdi,%rsi,4), %esi movl %esi, (%rax,%rdx,4) incq %rdx cmpq %rdx, %rcx jne 0x9f496 movl 0x10(%rdi), %eax retq
_ZNK10OpenSubdiv6v3_6_03Bfr12Tessellation8GetRatesEPi: movzx eax, word ptr [rdi+2] mov r8d, [rdi+10h] mov ecx, r8d sub ecx, eax cmovge r8d, eax test r8d, r8d jle short loc_9F48A mov rdx, [rdi+28h] mov r8d, r8d xor r9d, r9d loc_9F47A: mov r10d, [rdx+r9*4] mov [rsi+r9*4], r10d inc r9 cmp r8, r9 jnz short loc_9F47A loc_9F48A: test ecx, ecx jle short loc_9F4AE mov ecx, ecx lea rax, [rsi+rax*4] xor edx, edx loc_9F496: xor esi, esi test rdx, rdx setnz sil mov esi, [rdi+rsi*4+20h] mov [rax+rdx*4], esi inc rdx cmp rcx, rdx jnz short loc_9F496 loc_9F4AE: mov eax, [rdi+10h] retn
long long OpenSubdiv::v3_6_0::Bfr::Tessellation::GetRates( OpenSubdiv::v3_6_0::Bfr::Tessellation *this, int *a2) { long long v2; // rax int v3; // r8d int v4; // ecx long long v5; // rdx long long i; // r9 int *v7; // rax long long j; // rdx v2 = *((unsigned __int16 *)this + 1); v3 = *((_DWORD *)this + 4); v4 = v3 - v2; if ( v3 >= (int)v2 ) v3 = *((unsigned __int16 *)this + 1); if ( v3 > 0 ) { v5 = *((_QWORD *)this + 5); for ( i = 0LL; i != v3; ++i ) a2[i] = *(_DWORD *)(v5 + 4 * i); } if ( v4 > 0 ) { v7 = &a2[v2]; for ( j = 0LL; j != v4; ++j ) v7[j] = *((_DWORD *)this + (j != 0) + 8); } return *((unsigned int *)this + 4); }
GetRates: MOVZX EAX,word ptr [RDI + 0x2] MOV R8D,dword ptr [RDI + 0x10] MOV ECX,R8D SUB ECX,EAX CMOVGE R8D,EAX TEST R8D,R8D JLE 0x0019f48a MOV RDX,qword ptr [RDI + 0x28] MOV R8D,R8D XOR R9D,R9D LAB_0019f47a: MOV R10D,dword ptr [RDX + R9*0x4] MOV dword ptr [RSI + R9*0x4],R10D INC R9 CMP R8,R9 JNZ 0x0019f47a LAB_0019f48a: TEST ECX,ECX JLE 0x0019f4ae MOV ECX,ECX LEA RAX,[RSI + RAX*0x4] XOR EDX,EDX LAB_0019f496: XOR ESI,ESI TEST RDX,RDX SETNZ SIL MOV ESI,dword ptr [RDI + RSI*0x4 + 0x20] MOV dword ptr [RAX + RDX*0x4],ESI INC RDX CMP RCX,RDX JNZ 0x0019f496 LAB_0019f4ae: MOV EAX,dword ptr [RDI + 0x10] RET
/* OpenSubdiv::v3_6_0::Bfr::Tessellation::GetRates(int*) const */ int4 __thiscall OpenSubdiv::v3_6_0::Bfr::Tessellation::GetRates(Tessellation *this,int *param_1) { ushort uVar1; long lVar2; uint uVar3; uint uVar4; ulong uVar5; uVar1 = *(ushort *)(this + 2); uVar4 = *(uint *)(this + 0x10); uVar3 = uVar4 - uVar1; if ((int)(uint)uVar1 <= (int)uVar4) { uVar4 = (uint)uVar1; } if (0 < (int)uVar4) { lVar2 = *(long *)(this + 0x28); uVar5 = 0; do { param_1[uVar5] = *(int *)(lVar2 + uVar5 * 4); uVar5 = uVar5 + 1; } while (uVar4 != uVar5); } if (0 < (int)uVar3) { uVar5 = 0; do { param_1[uVar1 + uVar5] = *(int *)(this + (ulong)(uVar5 != 0) * 4 + 0x20); uVar5 = uVar5 + 1; } while (uVar3 != uVar5); } return *(int4 *)(this + 0x10); }
35,599
OpenSubdiv::v3_6_0::Bfr::Tessellation::GetRates(int*) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/../bfr/parameterization.h
int GetFaceSize() const { return _faceSize; }
O2
c
OpenSubdiv::v3_6_0::Bfr::Tessellation::GetRates(int*) const: movzwl 0x2(%rdi), %ecx movl 0x10(%rdi), %edx movl %edx, %eax subl %ecx, %eax cmovgel %ecx, %edx movq 0x28(%rdi), %r8 xorl %r9d, %r9d testl %edx, %edx cmovlel %r9d, %edx cmpq %r9, %rdx je 0xaaffd movl (%r8,%r9,4), %r10d movl %r10d, (%rsi,%r9,4) incq %r9 jmp 0xaafeb xorl %edx, %edx testl %eax, %eax cmovlel %edx, %eax movl %ecx, %ecx leaq (%rsi,%rcx,4), %rcx cmpq %rdx, %rax je 0xab024 xorl %esi, %esi testq %rdx, %rdx setne %sil movl 0x20(%rdi,%rsi,4), %esi movl %esi, (%rcx,%rdx,4) incq %rdx jmp 0xab00a movl 0x10(%rdi), %eax retq
_ZNK10OpenSubdiv6v3_6_03Bfr12Tessellation8GetRatesEPi: movzx ecx, word ptr [rdi+2] mov edx, [rdi+10h] mov eax, edx sub eax, ecx cmovge edx, ecx mov r8, [rdi+28h] xor r9d, r9d test edx, edx cmovle edx, r9d loc_AAFEB: cmp rdx, r9 jz short loc_AAFFD mov r10d, [r8+r9*4] mov [rsi+r9*4], r10d inc r9 jmp short loc_AAFEB loc_AAFFD: xor edx, edx test eax, eax cmovle eax, edx mov ecx, ecx lea rcx, [rsi+rcx*4] loc_AB00A: cmp rax, rdx jz short loc_AB024 xor esi, esi test rdx, rdx setnz sil mov esi, [rdi+rsi*4+20h] mov [rcx+rdx*4], esi inc rdx jmp short loc_AB00A loc_AB024: mov eax, [rdi+10h] retn
long long OpenSubdiv::v3_6_0::Bfr::Tessellation::GetRates( OpenSubdiv::v3_6_0::Bfr::Tessellation *this, int *a2) { int v2; // ecx long long v3; // rdx int v4; // eax bool v5; // cc long long v6; // rax long long v7; // r8 long long v8; // r9 long long v9; // rdx int *v10; // rcx v2 = *((unsigned __int16 *)this + 1); v3 = *((unsigned int *)this + 4); v4 = *((_DWORD *)this + 4); v5 = v4 < v2; v6 = (unsigned int)(v4 - v2); if ( !v5 ) v3 = *((unsigned __int16 *)this + 1); v7 = *((_QWORD *)this + 5); v8 = 0LL; if ( (int)v3 <= 0 ) v3 = 0LL; while ( v3 != v8 ) { a2[v8] = *(_DWORD *)(v7 + 4 * v8); ++v8; } v9 = 0LL; if ( (int)v6 <= 0 ) v6 = 0LL; v10 = &a2[v2]; while ( v6 != v9 ) { v10[v9] = *((_DWORD *)this + (v9 != 0) + 8); ++v9; } return *((unsigned int *)this + 4); }
GetRates: MOVZX ECX,word ptr [RDI + 0x2] MOV EDX,dword ptr [RDI + 0x10] MOV EAX,EDX SUB EAX,ECX CMOVGE EDX,ECX MOV R8,qword ptr [RDI + 0x28] XOR R9D,R9D TEST EDX,EDX CMOVLE EDX,R9D LAB_001aafeb: CMP RDX,R9 JZ 0x001aaffd MOV R10D,dword ptr [R8 + R9*0x4] MOV dword ptr [RSI + R9*0x4],R10D INC R9 JMP 0x001aafeb LAB_001aaffd: XOR EDX,EDX TEST EAX,EAX CMOVLE EAX,EDX MOV ECX,ECX LEA RCX,[RSI + RCX*0x4] LAB_001ab00a: CMP RAX,RDX JZ 0x001ab024 XOR ESI,ESI TEST RDX,RDX SETNZ SIL MOV ESI,dword ptr [RDI + RSI*0x4 + 0x20] MOV dword ptr [RCX + RDX*0x4],ESI INC RDX JMP 0x001ab00a LAB_001ab024: MOV EAX,dword ptr [RDI + 0x10] RET
/* OpenSubdiv::v3_6_0::Bfr::Tessellation::GetRates(int*) const */ int4 __thiscall OpenSubdiv::v3_6_0::Bfr::Tessellation::GetRates(Tessellation *this,int *param_1) { ushort uVar1; uint uVar2; long lVar3; uint uVar4; ulong uVar5; ulong uVar6; uVar1 = *(ushort *)(this + 2); uVar2 = *(uint *)(this + 0x10); uVar4 = uVar2 - uVar1; if ((int)(uint)uVar1 <= (int)uVar2) { uVar2 = (uint)uVar1; } lVar3 = *(long *)(this + 0x28); uVar6 = 0; uVar5 = (ulong)uVar2; if ((int)uVar2 < 1) { uVar5 = uVar6; } for (; uVar5 != uVar6; uVar6 = uVar6 + 1) { param_1[uVar6] = *(int *)(lVar3 + uVar6 * 4); } uVar6 = 0; uVar5 = (ulong)uVar4; if ((int)uVar4 < 1) { uVar5 = uVar6; } for (; uVar5 != uVar6; uVar6 = uVar6 + 1) { param_1[(uint)uVar1 + uVar6] = *(int *)(this + (ulong)(uVar6 != 0) * 4 + 0x20); } return *(int4 *)(this + 0x10); }