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
33,700
maria_rtree_insert
eloqsql/storage/maria/ma_rt_index.c
my_bool maria_rtree_insert(MARIA_HA *info, MARIA_KEY *key) { int res; MARIA_SHARE *share= info->s; my_off_t *root, new_root; LSN lsn= LSN_IMPOSSIBLE; DBUG_ENTER("maria_rtree_insert"); if (!key) DBUG_RETURN(1); /* _ma_sp_make_key failed */ root= &share->state.key_root[key->keyinfo->key_nr]; new_root= *root; if ((res= (maria_rtree_insert_level(info, key, -1, &new_root) == -1))) goto err; if (share->now_transactional) res= _ma_write_undo_key_insert(info, key, root, new_root, &lsn); else { *root= new_root; _ma_fast_unlock_key_del(info); } _ma_unpin_all_pages_and_finalize_row(info, lsn); err: DBUG_RETURN(res != 0); }
O3
c
maria_rtree_insert: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq (%rdi), %r12 movq $0x0, -0x30(%rbp) movb $0x1, %al testq %rsi, %rsi je 0x6bcfb movq %rsi, %r15 movq %rdi, %rbx movq 0x118(%r12), %r13 movq 0x8(%rsi), %rax movzbl 0xa5(%rax), %r14d movq (%r13,%r14,8), %rax leaq -0x38(%rbp), %rcx movq %rax, (%rcx) movl $0xffffffff, %edx # imm = 0xFFFFFFFF callq 0x6b36e cmpl $-0x1, %eax movb $0x1, %al je 0x6bcfb leaq (,%r14,8), %rdx addq %r13, %rdx cmpb $0x0, 0x7e7(%r12) movq -0x38(%rbp), %rcx je 0x6bcc8 leaq -0x30(%rbp), %r12 movq %rbx, %rdi movq %r15, %rsi movq %r12, %r8 callq 0x66b31 testl %eax, %eax setne %r14b movq (%r12), %rsi jmp 0x6bce1 movq %rcx, (%rdx) cmpb $0x0, 0x67e(%rbx) je 0x6bcdc movq %rbx, %rdi callq 0x5aa7e xorl %esi, %esi xorl %r14d, %r14d movq %rbx, %rdi callq 0x593c4 movq 0x8(%rbx), %rax movq $0x0, 0x90(%rax) movq %r14, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
maria_rtree_insert: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12, [rdi] mov [rbp+var_30], 0 mov al, 1 test rsi, rsi jz loc_6BCFB mov r15, rsi mov rbx, rdi mov r13, [r12+118h] mov rax, [rsi+8] movzx r14d, byte ptr [rax+0A5h] mov rax, [r13+r14*8+0] lea rcx, [rbp+var_38] mov [rcx], rax mov edx, 0FFFFFFFFh call maria_rtree_insert_level cmp eax, 0FFFFFFFFh mov al, 1 jz short loc_6BCFB lea rdx, ds:0[r14*8] add rdx, r13 cmp byte ptr [r12+7E7h], 0 mov rcx, [rbp+var_38] jz short loc_6BCC8 lea r12, [rbp+var_30] mov rdi, rbx mov rsi, r15 mov r8, r12 call _ma_write_undo_key_insert test eax, eax setnz r14b mov rsi, [r12] jmp short loc_6BCE1 loc_6BCC8: mov [rdx], rcx cmp byte ptr [rbx+67Eh], 0 jz short loc_6BCDC mov rdi, rbx call _ma_unlock_key_del loc_6BCDC: xor esi, esi xor r14d, r14d loc_6BCE1: mov rdi, rbx call _ma_unpin_all_pages mov rax, [rbx+8] mov qword ptr [rax+90h], 0 mov rax, r14 loc_6BCFB: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char maria_rtree_insert(long long a1, long long a2) { long long v2; // r12 char result; // al long long v4; // r13 long long v5; // r14 bool v6; // zf _QWORD *v7; // rdx bool v8; // r14 signed long long v9; // rsi long long v10; // [rsp+8h] [rbp-38h] BYREF signed long long v11[6]; // [rsp+10h] [rbp-30h] BYREF v2 = *(_QWORD *)a1; v11[0] = 0LL; result = 1; if ( a2 ) { v4 = *(_QWORD *)(v2 + 280); v5 = *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + 165LL); v10 = *(_QWORD *)(v4 + 8 * v5); v6 = (unsigned int)maria_rtree_insert_level((long long *)a1, a2, 0xFFFFFFFF, &v10) == -1; result = 1; if ( !v6 ) { v7 = (_QWORD *)(v4 + 8 * v5); if ( *(_BYTE *)(v2 + 2023) ) { v8 = (unsigned int)ma_write_undo_key_insert((long long *)a1, a2, (long long)v7, v10, (unsigned long long)v11) != 0; v9 = v11[0]; } else { *v7 = v10; if ( *(_BYTE *)(a1 + 1662) ) ma_unlock_key_del((_BYTE *)a1); v9 = 0LL; v8 = 0; } ma_unpin_all_pages(a1, v9); *(_QWORD *)(*(_QWORD *)(a1 + 8) + 144LL) = 0LL; return v8; } } return result; }
maria_rtree_insert: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,qword ptr [RDI] MOV qword ptr [RBP + -0x30],0x0 MOV AL,0x1 TEST RSI,RSI JZ 0x0016bcfb MOV R15,RSI MOV RBX,RDI MOV R13,qword ptr [R12 + 0x118] MOV RAX,qword ptr [RSI + 0x8] MOVZX R14D,byte ptr [RAX + 0xa5] MOV RAX,qword ptr [R13 + R14*0x8] LEA RCX,[RBP + -0x38] MOV qword ptr [RCX],RAX MOV EDX,0xffffffff CALL 0x0016b36e CMP EAX,-0x1 MOV AL,0x1 JZ 0x0016bcfb LEA RDX,[R14*0x8] ADD RDX,R13 CMP byte ptr [R12 + 0x7e7],0x0 MOV RCX,qword ptr [RBP + -0x38] JZ 0x0016bcc8 LEA R12,[RBP + -0x30] MOV RDI,RBX MOV RSI,R15 MOV R8,R12 CALL 0x00166b31 TEST EAX,EAX SETNZ R14B MOV RSI,qword ptr [R12] JMP 0x0016bce1 LAB_0016bcc8: MOV qword ptr [RDX],RCX CMP byte ptr [RBX + 0x67e],0x0 JZ 0x0016bcdc MOV RDI,RBX CALL 0x0015aa7e LAB_0016bcdc: XOR ESI,ESI XOR R14D,R14D LAB_0016bce1: MOV RDI,RBX CALL 0x001593c4 MOV RAX,qword ptr [RBX + 0x8] MOV qword ptr [RAX + 0x90],0x0 MOV RAX,R14 LAB_0016bcfb: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
bool maria_rtree_insert(long *param_1,long param_2) { long lVar1; long lVar2; int iVar3; int8 *puVar4; int8 uVar5; ulong uVar6; bool bVar7; int8 local_38; lVar1 = *param_1; local_38 = 0; bVar7 = true; if (param_2 != 0) { lVar2 = *(long *)(lVar1 + 0x118); uVar6 = (ulong)*(byte *)(*(long *)(param_2 + 8) + 0xa5); uVar5 = *(int8 *)(lVar2 + uVar6 * 8); iVar3 = maria_rtree_insert_level(param_1,param_2,0xffffffff); bVar7 = true; if (iVar3 != -1) { puVar4 = (int8 *)(uVar6 * 8 + lVar2); if (*(char *)(lVar1 + 0x7e7) == '\0') { *puVar4 = uVar5; if (*(char *)((long)param_1 + 0x67e) != '\0') { _ma_unlock_key_del(param_1); } uVar5 = 0; bVar7 = false; } else { iVar3 = _ma_write_undo_key_insert(param_1,param_2,puVar4,uVar5,&local_38); bVar7 = iVar3 != 0; uVar5 = local_38; } _ma_unpin_all_pages(param_1,uVar5); *(int8 *)(param_1[1] + 0x90) = 0; } } return bVar7; }
33,701
ma_pvio_init
eloqsql/libmariadb/libmariadb/ma_pvio.c
MARIADB_PVIO *ma_pvio_init(MA_PVIO_CINFO *cinfo) { /* check connection type and load the required plugin. * Currently we support the following pvio types: * pvio_socket * pvio_namedpipe * pvio_sharedmed */ const char *pvio_plugins[] = {"pvio_socket", "pvio_npipe", "pvio_shmem"}; int type; MARIADB_PVIO_PLUGIN *pvio_plugin; MARIADB_PVIO *pvio= NULL; switch (cinfo->type) { case PVIO_TYPE_UNIXSOCKET: case PVIO_TYPE_SOCKET: type= 0; break; #ifdef _WIN32 case PVIO_TYPE_NAMEDPIPE: type= 1; break; case PVIO_TYPE_SHAREDMEM: type= 2; break; #endif default: return NULL; } if (!(pvio_plugin= (MARIADB_PVIO_PLUGIN *) mysql_client_find_plugin(cinfo->mysql, pvio_plugins[type], MARIADB_CLIENT_PVIO_PLUGIN))) { /* error already set in mysql_client_find_plugin */ return NULL; } /* coverity[var_deref_op] */ if (!(pvio= (MARIADB_PVIO *)calloc(1, sizeof(MARIADB_PVIO)))) { my_set_error(cinfo->mysql, CR_OUT_OF_MEMORY, unknown_sqlstate, 0); return NULL; } /* register error routine and methods */ pvio->methods= pvio_plugin->methods; pvio->set_error= my_set_error; pvio->type= cinfo->type; /* set timeout to connect timeout - after successful connect we will set * correct values for read and write */ if (pvio->methods->set_timeout) { pvio->methods->set_timeout(pvio, PVIO_CONNECT_TIMEOUT, cinfo->mysql->options.connect_timeout); pvio->methods->set_timeout(pvio, PVIO_READ_TIMEOUT, cinfo->mysql->options.connect_timeout); pvio->methods->set_timeout(pvio, PVIO_WRITE_TIMEOUT, cinfo->mysql->options.connect_timeout); } if (!(pvio->cache= calloc(1, PVIO_READ_AHEAD_CACHE_SIZE))) { PVIO_SET_ERROR(cinfo->mysql, CR_OUT_OF_MEMORY, unknown_sqlstate, 0); free(pvio); return NULL; } pvio->cache_size= 0; pvio->cache_pos= pvio->cache; return pvio; }
O0
c
ma_pvio_init: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq 0x397cd(%rip), %rax # 0x76f90 movq %rax, -0x20(%rbp) movaps 0x397b2(%rip), %xmm0 # 0x76f80 movaps %xmm0, -0x30(%rbp) movq $0x0, -0x48(%rbp) movq -0x10(%rbp), %rax movl 0x14(%rax), %eax subl $0x1, %eax ja 0x3d7f1 jmp 0x3d7e8 movl $0x0, -0x34(%rbp) jmp 0x3d7fe movq $0x0, -0x8(%rbp) jmp 0x3d9a3 movq -0x10(%rbp), %rax movq 0x18(%rax), %rdi movslq -0x34(%rbp), %rax movq -0x30(%rbp,%rax,8), %rsi movl $0x65, %edx callq 0x50a10 movq %rax, -0x40(%rbp) cmpq $0x0, %rax jne 0x3d830 movq $0x0, -0x8(%rbp) jmp 0x3d9a3 movl $0x1, %edi movl $0x70, %esi callq 0x142d0 movq %rax, -0x48(%rbp) cmpq $0x0, %rax jne 0x3d878 movq -0x10(%rbp), %rax movq 0x18(%rax), %rdi leaq 0x43648(%rip), %rax # 0x80ea0 movq (%rax), %rdx movl $0x7d8, %esi # imm = 0x7D8 xorl %eax, %eax movl %eax, %ecx movb $0x0, %al callq 0x307d0 movq $0x0, -0x8(%rbp) jmp 0x3d9a3 movq -0x40(%rbp), %rax movq 0x58(%rax), %rcx movq -0x48(%rbp), %rax movq %rcx, 0x48(%rax) movq -0x48(%rbp), %rax leaq -0xd0c3(%rip), %rcx # 0x307d0 movq %rcx, 0x50(%rax) movq -0x10(%rbp), %rax movl 0x14(%rax), %ecx movq -0x48(%rbp), %rax movl %ecx, 0x20(%rax) movq -0x48(%rbp), %rax movq 0x48(%rax), %rax cmpq $0x0, (%rax) je 0x3d91c movq -0x48(%rbp), %rax movq 0x48(%rax), %rax movq (%rax), %rax movq -0x48(%rbp), %rdi movq -0x10(%rbp), %rcx movq 0x18(%rcx), %rcx movl 0x390(%rcx), %edx xorl %esi, %esi callq *%rax movq -0x48(%rbp), %rax movq 0x48(%rax), %rax movq (%rax), %rax movq -0x48(%rbp), %rdi movq -0x10(%rbp), %rcx movq 0x18(%rcx), %rcx movl 0x390(%rcx), %edx movl $0x1, %esi callq *%rax movq -0x48(%rbp), %rax movq 0x48(%rax), %rax movq (%rax), %rax movq -0x48(%rbp), %rdi movq -0x10(%rbp), %rcx movq 0x18(%rcx), %rcx movl 0x390(%rcx), %edx movl $0x2, %esi callq *%rax movl $0x1, %edi movl $0x4000, %esi # imm = 0x4000 callq 0x142d0 movq -0x48(%rbp), %rcx movq %rax, 0x8(%rcx) cmpq $0x0, %rax jne 0x3d97f movq -0x48(%rbp), %rax cmpq $0x0, 0x50(%rax) je 0x3d96c movq -0x48(%rbp), %rax movq 0x50(%rax), %r8 movq -0x10(%rbp), %rax movq 0x18(%rax), %rdi leaq 0x43545(%rip), %rax # 0x80ea0 movq (%rax), %rdx movl $0x7d8, %esi # imm = 0x7D8 xorl %eax, %eax movl %eax, %ecx movb $0x0, %al callq *%r8 movq -0x48(%rbp), %rdi callq 0x14530 movq $0x0, -0x8(%rbp) jmp 0x3d9a3 movq -0x48(%rbp), %rax movq $0x0, 0x18(%rax) movq -0x48(%rbp), %rax movq 0x8(%rax), %rcx movq -0x48(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x48(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopl (%rax)
ma_pvio_init: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov rax, cs:off_76F90; "pvio_shmem" mov [rbp+var_20], rax movaps xmm0, xmmword ptr cs:off_76F80; "pvio_socket" movaps [rbp+var_30], xmm0 mov [rbp+var_48], 0 mov rax, [rbp+var_10] mov eax, [rax+14h] sub eax, 1 ja short loc_3D7F1 jmp short $+2 loc_3D7E8: mov [rbp+var_34], 0 jmp short loc_3D7FE loc_3D7F1: mov [rbp+var_8], 0 jmp loc_3D9A3 loc_3D7FE: mov rax, [rbp+var_10] mov rdi, [rax+18h] movsxd rax, [rbp+var_34] mov rsi, qword ptr [rbp+rax*8+var_30] mov edx, 65h ; 'e' call mysql_client_find_plugin mov [rbp+var_40], rax cmp rax, 0 jnz short loc_3D830 mov [rbp+var_8], 0 jmp loc_3D9A3 loc_3D830: mov edi, 1 mov esi, 70h ; 'p' call _calloc mov [rbp+var_48], rax cmp rax, 0 jnz short loc_3D878 mov rax, [rbp+var_10] mov rdi, [rax+18h] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov esi, 7D8h xor eax, eax mov ecx, eax mov al, 0 call my_set_error mov [rbp+var_8], 0 jmp loc_3D9A3 loc_3D878: mov rax, [rbp+var_40] mov rcx, [rax+58h] mov rax, [rbp+var_48] mov [rax+48h], rcx mov rax, [rbp+var_48] lea rcx, my_set_error mov [rax+50h], rcx mov rax, [rbp+var_10] mov ecx, [rax+14h] mov rax, [rbp+var_48] mov [rax+20h], ecx mov rax, [rbp+var_48] mov rax, [rax+48h] cmp qword ptr [rax], 0 jz short loc_3D91C mov rax, [rbp+var_48] mov rax, [rax+48h] mov rax, [rax] mov rdi, [rbp+var_48] mov rcx, [rbp+var_10] mov rcx, [rcx+18h] mov edx, [rcx+390h] xor esi, esi call rax mov rax, [rbp+var_48] mov rax, [rax+48h] mov rax, [rax] mov rdi, [rbp+var_48] mov rcx, [rbp+var_10] mov rcx, [rcx+18h] mov edx, [rcx+390h] mov esi, 1 call rax mov rax, [rbp+var_48] mov rax, [rax+48h] mov rax, [rax] mov rdi, [rbp+var_48] mov rcx, [rbp+var_10] mov rcx, [rcx+18h] mov edx, [rcx+390h] mov esi, 2 call rax loc_3D91C: mov edi, 1 mov esi, 4000h call _calloc mov rcx, [rbp+var_48] mov [rcx+8], rax cmp rax, 0 jnz short loc_3D97F mov rax, [rbp+var_48] cmp qword ptr [rax+50h], 0 jz short loc_3D96C mov rax, [rbp+var_48] mov r8, [rax+50h] mov rax, [rbp+var_10] mov rdi, [rax+18h] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov esi, 7D8h xor eax, eax mov ecx, eax mov al, 0 call r8 loc_3D96C: mov rdi, [rbp+var_48] call _free mov [rbp+var_8], 0 jmp short loc_3D9A3 loc_3D97F: mov rax, [rbp+var_48] mov qword ptr [rax+18h], 0 mov rax, [rbp+var_48] mov rcx, [rax+8] mov rax, [rbp+var_48] mov [rax+10h], rcx mov rax, [rbp+var_48] mov [rbp+var_8], rax loc_3D9A3: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
long long ma_pvio_init(long long a1) { long long plugin; // rax long long v2; // rax long long v4; // [rsp+8h] [rbp-48h] long long v5; // [rsp+10h] [rbp-40h] if ( *(_DWORD *)(a1 + 20) > 1u ) return 0LL; plugin = mysql_client_find_plugin(*(_QWORD *)(a1 + 24), "pvio_socket", 101LL); v5 = plugin; if ( !plugin ) return 0LL; v4 = calloc(1LL, 112LL); if ( v4 ) { *(_QWORD *)(v4 + 72) = *(_QWORD *)(v5 + 88); *(_QWORD *)(v4 + 80) = my_set_error; *(_DWORD *)(v4 + 32) = *(_DWORD *)(a1 + 20); if ( **(_QWORD **)(v4 + 72) ) { (**(void ( ***)(long long, _QWORD, _QWORD))(v4 + 72))( v4, 0LL, *(unsigned int *)(*(_QWORD *)(a1 + 24) + 912LL)); (**(void ( ***)(long long, long long, _QWORD))(v4 + 72))( v4, 1LL, *(unsigned int *)(*(_QWORD *)(a1 + 24) + 912LL)); (**(void ( ***)(long long, long long, _QWORD))(v4 + 72))( v4, 2LL, *(unsigned int *)(*(_QWORD *)(a1 + 24) + 912LL)); } v2 = calloc(1LL, 0x4000LL); *(_QWORD *)(v4 + 8) = v2; if ( v2 ) { *(_QWORD *)(v4 + 24) = 0LL; *(_QWORD *)(v4 + 16) = *(_QWORD *)(v4 + 8); return v4; } else { if ( *(_QWORD *)(v4 + 80) ) (*(void ( **)(_QWORD, long long, char *, _QWORD))(v4 + 80))( *(_QWORD *)(a1 + 24), 2008LL, SQLSTATE_UNKNOWN, 0LL); free(v4); return 0LL; } } else { my_set_error(*(_QWORD *)(a1 + 24), 0x7D8u, (long long)SQLSTATE_UNKNOWN, 0LL); return 0LL; } }
ma_pvio_init: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [0x00176f90] MOV qword ptr [RBP + -0x20],RAX MOVAPS XMM0,xmmword ptr [0x00176f80] MOVAPS xmmword ptr [RBP + -0x30],XMM0 MOV qword ptr [RBP + -0x48],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x14] SUB EAX,0x1 JA 0x0013d7f1 JMP 0x0013d7e8 LAB_0013d7e8: MOV dword ptr [RBP + -0x34],0x0 JMP 0x0013d7fe LAB_0013d7f1: MOV qword ptr [RBP + -0x8],0x0 JMP 0x0013d9a3 LAB_0013d7fe: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x18] MOVSXD RAX,dword ptr [RBP + -0x34] MOV RSI,qword ptr [RBP + RAX*0x8 + -0x30] MOV EDX,0x65 CALL 0x00150a10 MOV qword ptr [RBP + -0x40],RAX CMP RAX,0x0 JNZ 0x0013d830 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0013d9a3 LAB_0013d830: MOV EDI,0x1 MOV ESI,0x70 CALL 0x001142d0 MOV qword ptr [RBP + -0x48],RAX CMP RAX,0x0 JNZ 0x0013d878 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x18] LEA RAX,[0x180ea0] MOV RDX,qword ptr [RAX] MOV ESI,0x7d8 XOR EAX,EAX MOV ECX,EAX MOV AL,0x0 CALL 0x001307d0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0013d9a3 LAB_0013d878: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RAX + 0x58] MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RAX + 0x48],RCX MOV RAX,qword ptr [RBP + -0x48] LEA RCX,[0x1307d0] MOV qword ptr [RAX + 0x50],RCX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x14] MOV RAX,qword ptr [RBP + -0x48] MOV dword ptr [RAX + 0x20],ECX MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX + 0x48] CMP qword ptr [RAX],0x0 JZ 0x0013d91c MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX + 0x48] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x18] MOV EDX,dword ptr [RCX + 0x390] XOR ESI,ESI CALL RAX MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX + 0x48] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x18] MOV EDX,dword ptr [RCX + 0x390] MOV ESI,0x1 CALL RAX MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX + 0x48] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x18] MOV EDX,dword ptr [RCX + 0x390] MOV ESI,0x2 CALL RAX LAB_0013d91c: MOV EDI,0x1 MOV ESI,0x4000 CALL 0x001142d0 MOV RCX,qword ptr [RBP + -0x48] MOV qword ptr [RCX + 0x8],RAX CMP RAX,0x0 JNZ 0x0013d97f MOV RAX,qword ptr [RBP + -0x48] CMP qword ptr [RAX + 0x50],0x0 JZ 0x0013d96c MOV RAX,qword ptr [RBP + -0x48] MOV R8,qword ptr [RAX + 0x50] MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x18] LEA RAX,[0x180ea0] MOV RDX,qword ptr [RAX] MOV ESI,0x7d8 XOR EAX,EAX MOV ECX,EAX MOV AL,0x0 CALL R8 LAB_0013d96c: MOV RDI,qword ptr [RBP + -0x48] CALL 0x00114530 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0013d9a3 LAB_0013d97f: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RAX + 0x18],0x0 MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x8],RAX LAB_0013d9a3: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
/* WARNING: Restarted to delay deadcode elimination for space: stack */ void * ma_pvio_init(long param_1) { long lVar1; void *pvVar2; void *local_10; if (*(uint *)(param_1 + 0x14) < 2) { lVar1 = mysql_client_find_plugin (*(int8 *)(param_1 + 0x18), CONCAT44(PTR_s_pvio_socket_00176f80._4_4_,PTR_s_pvio_socket_00176f80._0_4_), 0x65); if (lVar1 == 0) { local_10 = (void *)0x0; } else { local_10 = calloc(1,0x70); if (local_10 == (void *)0x0) { my_set_error(*(int8 *)(param_1 + 0x18),0x7d8,SQLSTATE_UNKNOWN,0); local_10 = (void *)0x0; } else { *(int8 *)((long)local_10 + 0x48) = *(int8 *)(lVar1 + 0x58); *(code **)((long)local_10 + 0x50) = my_set_error; *(int4 *)((long)local_10 + 0x20) = *(int4 *)(param_1 + 0x14); if (**(long **)((long)local_10 + 0x48) != 0) { (*(code *)**(int8 **)((long)local_10 + 0x48)) (local_10,0,*(int4 *)(*(long *)(param_1 + 0x18) + 0x390)); (*(code *)**(int8 **)((long)local_10 + 0x48)) (local_10,1,*(int4 *)(*(long *)(param_1 + 0x18) + 0x390)); (*(code *)**(int8 **)((long)local_10 + 0x48)) (local_10,2,*(int4 *)(*(long *)(param_1 + 0x18) + 0x390)); } pvVar2 = calloc(1,0x4000); *(void **)((long)local_10 + 8) = pvVar2; if (pvVar2 == (void *)0x0) { if (*(long *)((long)local_10 + 0x50) != 0) { (**(code **)((long)local_10 + 0x50)) (*(int8 *)(param_1 + 0x18),0x7d8,SQLSTATE_UNKNOWN,0); } free(local_10); local_10 = (void *)0x0; } else { *(int8 *)((long)local_10 + 0x18) = 0; *(int8 *)((long)local_10 + 0x10) = *(int8 *)((long)local_10 + 8); } } } } else { local_10 = (void *)0x0; } return local_10; }
33,702
ma_pvio_init
eloqsql/libmariadb/libmariadb/ma_pvio.c
MARIADB_PVIO *ma_pvio_init(MA_PVIO_CINFO *cinfo) { /* check connection type and load the required plugin. * Currently we support the following pvio types: * pvio_socket * pvio_namedpipe * pvio_sharedmed */ const char *pvio_plugins[] = {"pvio_socket", "pvio_npipe", "pvio_shmem"}; int type; MARIADB_PVIO_PLUGIN *pvio_plugin; MARIADB_PVIO *pvio= NULL; switch (cinfo->type) { case PVIO_TYPE_UNIXSOCKET: case PVIO_TYPE_SOCKET: type= 0; break; #ifdef _WIN32 case PVIO_TYPE_NAMEDPIPE: type= 1; break; case PVIO_TYPE_SHAREDMEM: type= 2; break; #endif default: return NULL; } if (!(pvio_plugin= (MARIADB_PVIO_PLUGIN *) mysql_client_find_plugin(cinfo->mysql, pvio_plugins[type], MARIADB_CLIENT_PVIO_PLUGIN))) { /* error already set in mysql_client_find_plugin */ return NULL; } /* coverity[var_deref_op] */ if (!(pvio= (MARIADB_PVIO *)calloc(1, sizeof(MARIADB_PVIO)))) { my_set_error(cinfo->mysql, CR_OUT_OF_MEMORY, unknown_sqlstate, 0); return NULL; } /* register error routine and methods */ pvio->methods= pvio_plugin->methods; pvio->set_error= my_set_error; pvio->type= cinfo->type; /* set timeout to connect timeout - after successful connect we will set * correct values for read and write */ if (pvio->methods->set_timeout) { pvio->methods->set_timeout(pvio, PVIO_CONNECT_TIMEOUT, cinfo->mysql->options.connect_timeout); pvio->methods->set_timeout(pvio, PVIO_READ_TIMEOUT, cinfo->mysql->options.connect_timeout); pvio->methods->set_timeout(pvio, PVIO_WRITE_TIMEOUT, cinfo->mysql->options.connect_timeout); } if (!(pvio->cache= calloc(1, PVIO_READ_AHEAD_CACHE_SIZE))) { PVIO_SET_ERROR(cinfo->mysql, CR_OUT_OF_MEMORY, unknown_sqlstate, 0); free(pvio); return NULL; } pvio->cache_size= 0; pvio->cache_pos= pvio->cache; return pvio; }
O3
c
ma_pvio_init: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax cmpl $0x1, 0x14(%rdi) ja 0x2e83b movq %rdi, %r14 movq 0x18(%rdi), %rdi leaq 0x1d592(%rip), %rsi # 0x4bcc8 movl $0x65, %edx callq 0x39154 testq %rax, %rax je 0x2e83b movq %rax, %r15 movl $0x1, %edi movl $0x70, %esi callq 0x142f0 testq %rax, %rax je 0x2e7f0 movq %rax, %rbx movq 0x58(%r15), %rax movq %rax, 0x48(%rbx) leaq -0x78f1(%rip), %rcx # 0x26e85 movq %rcx, 0x50(%rbx) movl 0x14(%r14), %ecx movl %ecx, 0x20(%rbx) movq (%rax), %rax testq %rax, %rax je 0x2e7ca movq 0x18(%r14), %rcx movl 0x390(%rcx), %edx movq %rbx, %rdi xorl %esi, %esi callq *%rax movq 0x48(%rbx), %rax movq 0x18(%r14), %rcx movl 0x390(%rcx), %edx movq %rbx, %rdi movl $0x1, %esi callq *(%rax) movq 0x48(%rbx), %rax movq 0x18(%r14), %rcx movl 0x390(%rcx), %edx movq %rbx, %rdi movl $0x2, %esi callq *(%rax) movl $0x1, %edi movl $0x4000, %esi # imm = 0x4000 callq 0x142f0 movq %rax, 0x8(%rbx) testq %rax, %rax je 0x2e810 movq $0x0, 0x18(%rbx) movq %rax, 0x10(%rbx) jmp 0x2e83d movq 0x18(%r14), %rdi leaq 0x341f5(%rip), %rax # 0x629f0 movq (%rax), %rdx xorl %ebx, %ebx movl $0x7d8, %esi # imm = 0x7D8 xorl %ecx, %ecx xorl %eax, %eax callq 0x26e85 jmp 0x2e83d movq 0x50(%rbx), %r8 testq %r8, %r8 je 0x2e833 movq 0x18(%r14), %rdi leaq 0x341cc(%rip), %rax # 0x629f0 movq (%rax), %rdx movl $0x7d8, %esi # imm = 0x7D8 xorl %ecx, %ecx xorl %eax, %eax callq *%r8 movq %rbx, %rdi callq 0x14590 xorl %ebx, %ebx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
ma_pvio_init: push rbp mov rbp, rsp push r15 push r14 push rbx push rax cmp dword ptr [rdi+14h], 1 ja loc_2E83B mov r14, rdi mov rdi, [rdi+18h] lea rsi, aPvioSocket; "pvio_socket" mov edx, 65h ; 'e' call mysql_client_find_plugin test rax, rax jz loc_2E83B mov r15, rax mov edi, 1 mov esi, 70h ; 'p' call _calloc test rax, rax jz loc_2E7F0 mov rbx, rax mov rax, [r15+58h] mov [rbx+48h], rax lea rcx, my_set_error mov [rbx+50h], rcx mov ecx, [r14+14h] mov [rbx+20h], ecx mov rax, [rax] test rax, rax jz short loc_2E7CA mov rcx, [r14+18h] mov edx, [rcx+390h] mov rdi, rbx xor esi, esi call rax mov rax, [rbx+48h] mov rcx, [r14+18h] mov edx, [rcx+390h] mov rdi, rbx mov esi, 1 call qword ptr [rax] mov rax, [rbx+48h] mov rcx, [r14+18h] mov edx, [rcx+390h] mov rdi, rbx mov esi, 2 call qword ptr [rax] loc_2E7CA: mov edi, 1 mov esi, 4000h call _calloc mov [rbx+8], rax test rax, rax jz short loc_2E810 mov qword ptr [rbx+18h], 0 mov [rbx+10h], rax jmp short loc_2E83D loc_2E7F0: mov rdi, [r14+18h] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] xor ebx, ebx mov esi, 7D8h xor ecx, ecx xor eax, eax call my_set_error jmp short loc_2E83D loc_2E810: mov r8, [rbx+50h] test r8, r8 jz short loc_2E833 mov rdi, [r14+18h] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov esi, 7D8h xor ecx, ecx xor eax, eax call r8 loc_2E833: mov rdi, rbx call _free loc_2E83B: xor ebx, ebx loc_2E83D: mov rax, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long ma_pvio_init(long long a1) { long long plugin; // rax long long v2; // r15 long long v3; // rax long long v4; // rbx void ( **v5)(long long, _QWORD, _QWORD); // rax void ( *v6)(long long, _QWORD, _QWORD); // rax long long v7; // rax void ( *v8)(_QWORD, long long, char *, _QWORD); // r8 if ( *(_DWORD *)(a1 + 20) > 1u ) return 0LL; plugin = mysql_client_find_plugin(*(_QWORD *)(a1 + 24), "pvio_socket", 101LL); if ( !plugin ) return 0LL; v2 = plugin; v3 = calloc(1LL, 112LL); if ( !v3 ) { v4 = 0LL; my_set_error(*(_QWORD *)(a1 + 24), 2008, (long long)SQLSTATE_UNKNOWN, 0LL); return v4; } v4 = v3; v5 = *(void ( ***)(long long, _QWORD, _QWORD))(v2 + 88); *(_QWORD *)(v4 + 72) = v5; *(_QWORD *)(v4 + 80) = my_set_error; *(_DWORD *)(v4 + 32) = *(_DWORD *)(a1 + 20); v6 = *v5; if ( v6 ) { v6(v4, 0LL, *(unsigned int *)(*(_QWORD *)(a1 + 24) + 912LL)); (**(void ( ***)(long long, long long, _QWORD))(v4 + 72))( v4, 1LL, *(unsigned int *)(*(_QWORD *)(a1 + 24) + 912LL)); (**(void ( ***)(long long, long long, _QWORD))(v4 + 72))( v4, 2LL, *(unsigned int *)(*(_QWORD *)(a1 + 24) + 912LL)); } v7 = calloc(1LL, 0x4000LL); *(_QWORD *)(v4 + 8) = v7; if ( !v7 ) { v8 = *(void ( **)(_QWORD, long long, char *, _QWORD))(v4 + 80); if ( v8 ) v8(*(_QWORD *)(a1 + 24), 2008LL, SQLSTATE_UNKNOWN, 0LL); free(v4); return 0LL; } *(_QWORD *)(v4 + 24) = 0LL; *(_QWORD *)(v4 + 16) = v7; return v4; }
ma_pvio_init: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX CMP dword ptr [RDI + 0x14],0x1 JA 0x0012e83b MOV R14,RDI MOV RDI,qword ptr [RDI + 0x18] LEA RSI,[0x14bcc8] MOV EDX,0x65 CALL 0x00139154 TEST RAX,RAX JZ 0x0012e83b MOV R15,RAX MOV EDI,0x1 MOV ESI,0x70 CALL 0x001142f0 TEST RAX,RAX JZ 0x0012e7f0 MOV RBX,RAX MOV RAX,qword ptr [R15 + 0x58] MOV qword ptr [RBX + 0x48],RAX LEA RCX,[0x126e85] MOV qword ptr [RBX + 0x50],RCX MOV ECX,dword ptr [R14 + 0x14] MOV dword ptr [RBX + 0x20],ECX MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x0012e7ca MOV RCX,qword ptr [R14 + 0x18] MOV EDX,dword ptr [RCX + 0x390] MOV RDI,RBX XOR ESI,ESI CALL RAX MOV RAX,qword ptr [RBX + 0x48] MOV RCX,qword ptr [R14 + 0x18] MOV EDX,dword ptr [RCX + 0x390] MOV RDI,RBX MOV ESI,0x1 CALL qword ptr [RAX] MOV RAX,qword ptr [RBX + 0x48] MOV RCX,qword ptr [R14 + 0x18] MOV EDX,dword ptr [RCX + 0x390] MOV RDI,RBX MOV ESI,0x2 CALL qword ptr [RAX] LAB_0012e7ca: MOV EDI,0x1 MOV ESI,0x4000 CALL 0x001142f0 MOV qword ptr [RBX + 0x8],RAX TEST RAX,RAX JZ 0x0012e810 MOV qword ptr [RBX + 0x18],0x0 MOV qword ptr [RBX + 0x10],RAX JMP 0x0012e83d LAB_0012e7f0: MOV RDI,qword ptr [R14 + 0x18] LEA RAX,[0x1629f0] MOV RDX,qword ptr [RAX] XOR EBX,EBX MOV ESI,0x7d8 XOR ECX,ECX XOR EAX,EAX CALL 0x00126e85 JMP 0x0012e83d LAB_0012e810: MOV R8,qword ptr [RBX + 0x50] TEST R8,R8 JZ 0x0012e833 MOV RDI,qword ptr [R14 + 0x18] LEA RAX,[0x1629f0] MOV RDX,qword ptr [RAX] MOV ESI,0x7d8 XOR ECX,ECX XOR EAX,EAX CALL R8 LAB_0012e833: MOV RDI,RBX CALL 0x00114590 LAB_0012e83b: XOR EBX,EBX LAB_0012e83d: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void * ma_pvio_init(long param_1) { int8 *puVar1; code *pcVar2; long lVar3; void *__ptr; void *pvVar4; if ((*(uint *)(param_1 + 0x14) < 2) && (lVar3 = mysql_client_find_plugin(*(int8 *)(param_1 + 0x18),"pvio_socket",0x65), lVar3 != 0)) { __ptr = calloc(1,0x70); if (__ptr == (void *)0x0) { my_set_error(*(int8 *)(param_1 + 0x18),0x7d8,SQLSTATE_UNKNOWN,0); return (void *)0x0; } puVar1 = *(int8 **)(lVar3 + 0x58); *(int8 **)((long)__ptr + 0x48) = puVar1; *(code **)((long)__ptr + 0x50) = my_set_error; *(int4 *)((long)__ptr + 0x20) = *(int4 *)(param_1 + 0x14); pcVar2 = (code *)*puVar1; if (pcVar2 != (code *)0x0) { (*pcVar2)(__ptr,0,*(int4 *)(*(long *)(param_1 + 0x18) + 0x390)); (*(code *)**(int8 **)((long)__ptr + 0x48)) (__ptr,1,*(int4 *)(*(long *)(param_1 + 0x18) + 0x390)); (*(code *)**(int8 **)((long)__ptr + 0x48)) (__ptr,2,*(int4 *)(*(long *)(param_1 + 0x18) + 0x390)); } pvVar4 = calloc(1,0x4000); *(void **)((long)__ptr + 8) = pvVar4; if (pvVar4 != (void *)0x0) { *(int8 *)((long)__ptr + 0x18) = 0; *(void **)((long)__ptr + 0x10) = pvVar4; return __ptr; } if (*(code **)((long)__ptr + 0x50) != (code *)0x0) { (**(code **)((long)__ptr + 0x50))(*(int8 *)(param_1 + 0x18),0x7d8,SQLSTATE_UNKNOWN,0); } free(__ptr); } return (void *)0x0; }
33,703
bool 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>::contains<char const (&) [9], 0>(char const (&) [9]) const
monkey531[P]llama/common/./json.hpp
constexpr bool is_object() const noexcept { return m_data.m_type == value_t::object; }
O1
cpp
bool 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>::contains<char const (&) [9], 0>(char const (&) [9]) const: cmpb $0x1, (%rdi) jne 0x99408 pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x8(%rdi), %r12 movq (%r12), %r15 movq 0x8(%r12), %rax cmpq %rax, %r15 je 0x9940e movq %rsi, %r14 movq %r15, %rdi movq %r14, %rsi callq 0x18190 testl %eax, %eax je 0x9940b addq $0x30, %r15 movq 0x8(%r12), %rax cmpq %rax, %r15 jne 0x993e9 jmp 0x9940e xorl %eax, %eax retq movq %r15, %rax movq 0x8(%rbx), %rcx cmpq 0x8(%rcx), %rax setne %al addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_: cmp byte ptr [rdi], 1 jnz short loc_99408 push r15 push r14 push r12 push rbx push rax mov rbx, rdi mov r12, [rdi+8] mov r15, [r12] mov rax, [r12+8] cmp r15, rax jz short loc_9940E mov r14, rsi loc_993E9: mov rdi, r15 mov rsi, r14 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_9940B add r15, 30h ; '0' mov rax, [r12+8] cmp r15, rax jnz short loc_993E9 jmp short loc_9940E loc_99408: xor eax, eax retn loc_9940B: mov rax, r15 loc_9940E: mov rcx, [rbx+8] cmp rax, [rcx+8] setnz al add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
bool ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_( long long a1, long long a2) { long long *v2; // r12 long long v3; // r15 long long v4; // rax if ( *(_BYTE *)a1 != 1 ) return 0; v2 = *(long long **)(a1 + 8); v3 = *v2; v4 = v2[1]; if ( *v2 != v4 ) { while ( (unsigned int)std::string::compare(v3, a2) ) { v3 += 48LL; v4 = v2[1]; if ( v3 == v4 ) return v4 != *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL); } v4 = v3; } return v4 != *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL); }
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_: CMP byte ptr [RDI],0x1 JNZ 0x00199408 PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV R12,qword ptr [RDI + 0x8] MOV R15,qword ptr [R12] MOV RAX,qword ptr [R12 + 0x8] CMP R15,RAX JZ 0x0019940e MOV R14,RSI LAB_001993e9: MOV RDI,R15 MOV RSI,R14 CALL 0x00118190 TEST EAX,EAX JZ 0x0019940b ADD R15,0x30 MOV RAX,qword ptr [R12 + 0x8] CMP R15,RAX JNZ 0x001993e9 JMP 0x0019940e LAB_00199408: XOR EAX,EAX RET LAB_0019940b: MOV RAX,R15 LAB_0019940e: MOV RCX,qword ptr [RBX + 0x8] CMP RAX,qword ptr [RCX + 0x8] SETNZ AL ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
int8 _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ (char *param_1) { long *plVar1; int iVar2; char *pcVar3; char *pcVar4; if (*param_1 != '\x01') { return 0; } plVar1 = *(long **)(param_1 + 8); pcVar3 = (char *)plVar1[1]; pcVar4 = (char *)*plVar1; if ((char *)*plVar1 != pcVar3) { do { pcVar3 = pcVar4; iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) break; pcVar4 = pcVar3 + 0x30; pcVar3 = (char *)plVar1[1]; } while (pcVar4 != pcVar3); } return CONCAT71((int7)((ulong)pcVar3 >> 8),pcVar3 != *(char **)(*(long *)(param_1 + 8) + 8)); }
33,704
js_array_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_array_finalizer(JSRuntime *rt, JSValue val) { JSObject *p = JS_VALUE_GET_OBJ(val); int i; for(i = 0; i < p->u.array.count; i++) { JS_FreeValueRT(rt, p->u.array.u.values[i]); } js_free_rt(rt, p->u.array.u.values); }
O1
c
js_array_finalizer: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx cmpl $0x0, 0x40(%rsi) je 0x3a74a movl $0x8, %r15d xorl %r12d, %r12d movq 0x38(%r14), %rax movq -0x8(%rax,%r15), %rsi movq (%rax,%r15), %rdx movq %rbx, %rdi callq 0x1d8c6 incq %r12 movl 0x40(%r14), %eax addq $0x10, %r15 cmpq %rax, %r12 jb 0x3a725 movq 0x38(%r14), %r14 testq %r14, %r14 je 0x3a784 decq 0x28(%rbx) movq %r14, %rdi callq *0x20(%rbx) movq 0x10(%rbx), %rcx movq 0x30(%rbx), %rdx subq %rax, %rdx addq $-0x8, %rdx movq %rdx, 0x30(%rbx) movq 0x40(%rbx), %rdi movq %r14, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmpq *%rcx addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
js_array_finalizer: push r15 push r14 push r12 push rbx push rax mov r14, rsi mov rbx, rdi cmp dword ptr [rsi+40h], 0 jz short loc_3A74A mov r15d, 8 xor r12d, r12d loc_3A725: mov rax, [r14+38h] mov rsi, [rax+r15-8] mov rdx, [rax+r15] mov rdi, rbx call JS_FreeValueRT inc r12 mov eax, [r14+40h] add r15, 10h cmp r12, rax jb short loc_3A725 loc_3A74A: mov r14, [r14+38h] test r14, r14 jz short loc_3A784 dec qword ptr [rbx+28h] mov rdi, r14 call qword ptr [rbx+20h] mov rcx, [rbx+10h] mov rdx, [rbx+30h] sub rdx, rax add rdx, 0FFFFFFFFFFFFFFF8h mov [rbx+30h], rdx mov rdi, [rbx+40h] mov rsi, r14 add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp rcx loc_3A784: add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
unsigned long long js_array_finalizer(long long a1, long long a2) { long long v2; // r15 unsigned long long v3; // r12 unsigned long long result; // rax long long v5; // r14 long long v6; // rax long long ( *v7)(_QWORD, long long); // rcx if ( *(_DWORD *)(a2 + 64) ) { v2 = 8LL; v3 = 0LL; do { JS_FreeValueRT(a1, *(_DWORD **)(*(_QWORD *)(a2 + 56) + v2 - 8), *(_QWORD *)(*(_QWORD *)(a2 + 56) + v2)); ++v3; result = *(unsigned int *)(a2 + 64); v2 += 16LL; } while ( v3 < result ); } v5 = *(_QWORD *)(a2 + 56); if ( v5 ) { --*(_QWORD *)(a1 + 40); v6 = (*(long long ( **)(long long))(a1 + 32))(v5); v7 = *(long long ( **)(_QWORD, long long))(a1 + 16); *(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v6 - 8; return v7(*(_QWORD *)(a1 + 64), v5); } return result; }
js_array_finalizer: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI CMP dword ptr [RSI + 0x40],0x0 JZ 0x0013a74a MOV R15D,0x8 XOR R12D,R12D LAB_0013a725: MOV RAX,qword ptr [R14 + 0x38] MOV RSI,qword ptr [RAX + R15*0x1 + -0x8] MOV RDX,qword ptr [RAX + R15*0x1] MOV RDI,RBX CALL 0x0011d8c6 INC R12 MOV EAX,dword ptr [R14 + 0x40] ADD R15,0x10 CMP R12,RAX JC 0x0013a725 LAB_0013a74a: MOV R14,qword ptr [R14 + 0x38] TEST R14,R14 JZ 0x0013a784 DEC qword ptr [RBX + 0x28] MOV RDI,R14 CALL qword ptr [RBX + 0x20] MOV RCX,qword ptr [RBX + 0x10] MOV RDX,qword ptr [RBX + 0x30] SUB RDX,RAX ADD RDX,-0x8 MOV qword ptr [RBX + 0x30],RDX MOV RDI,qword ptr [RBX + 0x40] MOV RSI,R14 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP RCX LAB_0013a784: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
void js_array_finalizer(long param_1,long param_2) { long lVar1; ulong uVar2; long lVar3; if (*(int *)(param_2 + 0x40) != 0) { lVar3 = 8; uVar2 = 0; do { JS_FreeValueRT(param_1,*(int8 *)(*(long *)(param_2 + 0x38) + -8 + lVar3), *(int8 *)(*(long *)(param_2 + 0x38) + lVar3)); uVar2 = uVar2 + 1; lVar3 = lVar3 + 0x10; } while (uVar2 < *(uint *)(param_2 + 0x40)); } lVar3 = *(long *)(param_2 + 0x38); if (lVar3 != 0) { *(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1; lVar1 = (**(code **)(param_1 + 0x20))(lVar3); lVar1 = (*(long *)(param_1 + 0x30) - lVar1) + -8; *(long *)(param_1 + 0x30) = lVar1; /* WARNING: Could not recover jumptable at 0x0013a782. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(param_1 + 0x10)) (*(int8 *)(param_1 + 0x40),lVar3,lVar1,*(code **)(param_1 + 0x10)); return; } return; }
33,705
google::protobuf::internal::WireFormatLite::WriteFloatArray(float const*, int, google::protobuf::io::CodedOutputStream*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/wire_format_lite.cc
void WireFormatLite::WriteFloatArray(const float* a, int n, io::CodedOutputStream* output) { WriteArray<float>(a, n, output); }
O3
cpp
google::protobuf::internal::WireFormatLite::WriteFloatArray(float const*, int, google::protobuf::io::CodedOutputStream*): pushq %r15 pushq %r14 pushq %rbx movq %rdx, %rbx movl %esi, %edx movq %rdi, %rsi shll $0x2, %edx movq (%rbx), %rax movq 0x40(%rbx), %r14 subq %r14, %rax movslq %edx, %r15 cmpq %r15, %rax jl 0xa8f1e movq %r14, %rdi movq %r15, %rdx callq 0xf2f0 addq %r15, %r14 movq %r14, 0x40(%rbx) popq %rbx popq %r14 popq %r15 retq movq %rbx, %rdi movq %r14, %rcx callq 0x15e1c movq %rax, %r14 jmp 0xa8f14
_ZN6google8protobuf8internal14WireFormatLite15WriteFloatArrayEPKfiPNS0_2io17CodedOutputStreamE: push r15 push r14 push rbx mov rbx, rdx mov edx, esi mov rsi, rdi; void * shl edx, 2; int mov rax, [rbx] mov r14, [rbx+40h] sub rax, r14 movsxd r15, edx cmp rax, r15 jl short loc_A8F1E mov rdi, r14 mov rdx, r15 call _memcpy add r14, r15 loc_A8F14: mov [rbx+40h], r14 pop rbx pop r14 pop r15 retn loc_A8F1E: mov rdi, rbx; this mov rcx, r14; unsigned __int8 * call _ZN6google8protobuf2io19EpsCopyOutputStream16WriteRawFallbackEPKviPh; google::protobuf::io::EpsCopyOutputStream::WriteRawFallback(void const*,int,uchar *) mov r14, rax jmp short loc_A8F14
unsigned __int8 * google::protobuf::internal::WireFormatLite::WriteFloatArray( google::protobuf::internal::WireFormatLite *this, const float *a2, unsigned __int8 **a3, google::protobuf::io::CodedOutputStream *a4) { unsigned __int8 *v5; // r14 unsigned __int8 *result; // rax unsigned __int8 *v7; // r14 v5 = a3[8]; if ( *a3 - v5 < 4 * (int)a2 ) { result = google::protobuf::io::EpsCopyOutputStream::WriteRawFallback( (google::protobuf::io::EpsCopyOutputStream *)a3, (char *)this, 4 * (int)a2, a3[8]); v7 = result; } else { result = (unsigned __int8 *)memcpy(a3[8]); v7 = &v5[4 * (int)a2]; } a3[8] = v7; return result; }
WriteFloatArray: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDX MOV EDX,ESI MOV RSI,RDI SHL EDX,0x2 MOV RAX,qword ptr [RBX] MOV R14,qword ptr [RBX + 0x40] SUB RAX,R14 MOVSXD R15,EDX CMP RAX,R15 JL 0x001a8f1e MOV RDI,R14 MOV RDX,R15 CALL 0x0010f2f0 ADD R14,R15 LAB_001a8f14: MOV qword ptr [RBX + 0x40],R14 POP RBX POP R14 POP R15 RET LAB_001a8f1e: MOV RDI,RBX MOV RCX,R14 CALL 0x00115e1c MOV R14,RAX JMP 0x001a8f14
/* google::protobuf::internal::WireFormatLite::WriteFloatArray(float const*, int, google::protobuf::io::CodedOutputStream*) */ void google::protobuf::internal::WireFormatLite::WriteFloatArray (float *param_1,int param_2,CodedOutputStream *param_3) { uchar *puVar1; size_t __n; puVar1 = *(uchar **)(param_3 + 0x40); __n = (size_t)(param_2 << 2); if (*(long *)param_3 - (long)puVar1 < (long)__n) { puVar1 = (uchar *)io::EpsCopyOutputStream::WriteRawFallback ((EpsCopyOutputStream *)param_3,param_1,param_2 << 2,puVar1); } else { memcpy(puVar1,param_1,__n); puVar1 = puVar1 + __n; } *(uchar **)(param_3 + 0x40) = puVar1; return; }
33,706
DatabaseLoader::DatabaseLoader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int, std::basic_string_view<char, std::char_traits<char>>)
SylCore-WoTLK/src/server/database/Database/DatabaseLoader.cpp
DatabaseLoader::DatabaseLoader(std::string const& logger, uint32 const defaultUpdateMask, std::string_view modulesList) : _logger(logger), _modulesList(modulesList), _autoSetup(sConfigMgr->GetOption<bool>("Updates.AutoSetup", true)), _updateFlags(sConfigMgr->GetOption<uint32>("Updates.EnableDatabases", defaultUpdateMask)) { }
O0
cpp
DatabaseLoader::DatabaseLoader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int, std::basic_string_view<char, std::char_traits<char>>): subq $0x128, %rsp # imm = 0x128 movq %rcx, 0xd8(%rsp) movq %r8, 0xe0(%rsp) movq %rdi, 0xd0(%rsp) movq %rsi, 0xc8(%rsp) movl %edx, 0xc4(%rsp) movq 0xd0(%rsp), %rdi movq %rdi, 0x48(%rsp) movq %rdi, %rax movq %rax, 0x40(%rsp) movq 0xc8(%rsp), %rsi callq 0x6ca40 movq 0x48(%rsp), %rax movups 0xd8(%rsp), %xmm0 movups %xmm0, 0x20(%rax) addq $0x30, %rax movq %rax, 0x50(%rsp) callq 0x1840d0 movq %rax, 0x58(%rsp) jmp 0xb29b6 leaq 0x8f(%rsp), %rdx movq %rdx, 0xe8(%rsp) movq 0xe8(%rsp), %rax movq %rax, 0x120(%rsp) leaq 0x264a5c(%rip), %rsi # 0x317439 leaq 0x90(%rsp), %rdi callq 0x2dc40 jmp 0xb29ec movq 0x58(%rsp), %rdi movb $0x1, 0x8e(%rsp) leaq 0x90(%rsp), %rsi leaq 0x8e(%rsp), %rdx movl $0x1, %ecx callq 0x189d10 movb %al, 0x3f(%rsp) jmp 0xb2a19 leaq 0x90(%rsp), %rdi callq 0x2de90 movb 0x3f(%rsp), %dl movq 0x50(%rsp), %rcx movq 0x40(%rsp), %rax leaq 0x8f(%rsp), %rsi movq %rsi, 0xf8(%rsp) andb $0x1, %dl movb %dl, (%rcx) addq $0x34, %rax movq %rax, 0x28(%rsp) callq 0x1840d0 movq %rax, 0x30(%rsp) jmp 0xb2a5e leaq 0x67(%rsp), %rdx movq %rdx, 0xf0(%rsp) movq 0xf0(%rsp), %rax movq %rax, 0x118(%rsp) leaq 0x2649c9(%rip), %rsi # 0x31744b leaq 0x68(%rsp), %rdi callq 0x2dc40 jmp 0xb2a8e movq 0x30(%rsp), %rdi leaq 0x68(%rsp), %rsi leaq 0xc4(%rsp), %rdx movl $0x1, %ecx callq 0x196440 movl %eax, 0x24(%rsp) jmp 0xb2ab0 leaq 0x68(%rsp), %rdi callq 0x2de90 movl 0x24(%rsp), %ecx movq 0x28(%rsp), %rax movq 0x40(%rsp), %rdi leaq 0x67(%rsp), %rdx movq %rdx, 0x108(%rsp) movl %ecx, (%rax) addq $0x38, %rdi movq %rdi, 0x18(%rsp) callq 0xb3440 jmp 0xb2ae7 movq 0x40(%rsp), %rdi addq $0x88, %rdi movq %rdi, 0x10(%rsp) callq 0xb3440 jmp 0xb2aff movq 0x40(%rsp), %rdi addq $0xd8, %rdi movq %rdi, 0x8(%rsp) callq 0xb3440 jmp 0xb2b17 movq 0x40(%rsp), %rdi addq $0x128, %rdi # imm = 0x128 movq %rdi, (%rsp) callq 0xb3440 jmp 0xb2b2e movq 0x40(%rsp), %rdi addq $0x178, %rdi # imm = 0x178 callq 0xb3470 jmp 0xb2b41 addq $0x128, %rsp # imm = 0x128 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb8(%rsp) movl %eax, 0xb4(%rsp) jmp 0xb2c6e movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb8(%rsp) movl %eax, 0xb4(%rsp) jmp 0xb2b99 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb8(%rsp) movl %eax, 0xb4(%rsp) leaq 0x90(%rsp), %rdi callq 0x2de90 leaq 0x8f(%rsp), %rax movq %rax, 0x100(%rsp) jmp 0xb2c6e movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb8(%rsp) movl %eax, 0xb4(%rsp) jmp 0xb2be2 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb8(%rsp) movl %eax, 0xb4(%rsp) leaq 0x68(%rsp), %rdi callq 0x2de90 leaq 0x67(%rsp), %rax movq %rax, 0x110(%rsp) jmp 0xb2c6e movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb8(%rsp) movl %eax, 0xb4(%rsp) jmp 0xb2c64 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb8(%rsp) movl %eax, 0xb4(%rsp) jmp 0xb2c5a movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb8(%rsp) movl %eax, 0xb4(%rsp) jmp 0xb2c50 movq (%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb8(%rsp) movl %eax, 0xb4(%rsp) callq 0x65940 movq 0x8(%rsp), %rdi callq 0x65940 movq 0x10(%rsp), %rdi callq 0x65940 movq 0x18(%rsp), %rdi callq 0x65940 movq 0x48(%rsp), %rdi callq 0x2de90 movq 0xb8(%rsp), %rdi callq 0x21d50 nopw %cs:(%rax,%rax)
_ZN14DatabaseLoaderC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjSt17basic_string_viewIcS3_E: sub rsp, 128h; Alternative name is 'DatabaseLoader::DatabaseLoader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int, std::basic_string_view<char, std::char_traits<char>>)' mov qword ptr [rsp+128h+var_50], rcx mov qword ptr [rsp+128h+var_50+8], r8 mov [rsp+128h+var_58], rdi mov [rsp+128h+var_60], rsi mov [rsp+128h+var_64], edx mov rdi, [rsp+128h+var_58]; this mov [rsp+128h+var_E0], rdi mov rax, rdi mov [rsp+128h+var_E8], rax mov rsi, [rsp+128h+var_60] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) mov rax, [rsp+128h+var_E0] movups xmm0, [rsp+128h+var_50] movups xmmword ptr [rax+20h], xmm0 add rax, 30h ; '0' mov [rsp+128h+var_D8], rax call _ZN9ConfigMgr8instanceEv; ConfigMgr::instance(void) mov [rsp+128h+var_D0], rax jmp short $+2 loc_B29B6: lea rdx, [rsp+128h+var_99] mov [rsp+128h+var_40], rdx mov rax, [rsp+128h+var_40] mov [rsp+128h+var_8], rax lea rsi, aUpdatesAutoset; "Updates.AutoSetup" lea rdi, [rsp+128h+var_98] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_B29EC: mov rdi, [rsp+128h+var_D0] mov [rsp+128h+var_9A], 1 lea rsi, [rsp+128h+var_98] lea rdx, [rsp+128h+var_9A] mov ecx, 1 call _ZNK9ConfigMgr9GetOptionIbEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS1_b; ConfigMgr::GetOption<bool>(std::string const&,bool const&,bool) mov [rsp+128h+var_E9], al jmp short $+2 loc_B2A19: lea rdi, [rsp+128h+var_98]; this call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov dl, [rsp+128h+var_E9] mov rcx, [rsp+128h+var_D8] mov rax, [rsp+128h+var_E8] lea rsi, [rsp+128h+var_99] mov [rsp+128h+var_30], rsi and dl, 1 mov [rcx], dl add rax, 34h ; '4' mov [rsp+128h+var_100], rax call _ZN9ConfigMgr8instanceEv; ConfigMgr::instance(void) mov [rsp+128h+var_F8], rax jmp short $+2 loc_B2A5E: lea rdx, [rsp+128h+var_C1] mov [rsp+128h+var_38], rdx mov rax, [rsp+128h+var_38] mov [rsp+128h+var_10], rax lea rsi, aUpdatesEnabled; "Updates.EnableDatabases" lea rdi, [rsp+128h+var_C0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_B2A8E: mov rdi, [rsp+128h+var_F8] lea rsi, [rsp+128h+var_C0] lea rdx, [rsp+128h+var_64] mov ecx, 1 call _ZNK9ConfigMgr9GetOptionIjEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS1_b; ConfigMgr::GetOption<uint>(std::string const&,uint const&,bool) mov [rsp+128h+var_104], eax jmp short $+2 loc_B2AB0: lea rdi, [rsp+128h+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov ecx, [rsp+128h+var_104] mov rax, [rsp+128h+var_100] mov rdi, [rsp+128h+var_E8] lea rdx, [rsp+128h+var_C1] mov [rsp+128h+var_20], rdx mov [rax], ecx add rdi, 38h ; '8' mov [rsp+128h+var_110], rdi call _ZNSt5queueISt8functionIFbvEESt5dequeIS2_SaIS2_EEEC2IS5_vEEv; std::queue<std::function<bool ()(void)>>::queue<std::deque<std::function<bool ()(void)>>,void>(void) jmp short $+2 loc_B2AE7: mov rdi, [rsp+128h+var_E8] add rdi, 88h mov [rsp+128h+var_118], rdi call _ZNSt5queueISt8functionIFbvEESt5dequeIS2_SaIS2_EEEC2IS5_vEEv; std::queue<std::function<bool ()(void)>>::queue<std::deque<std::function<bool ()(void)>>,void>(void) jmp short $+2 loc_B2AFF: mov rdi, [rsp+128h+var_E8] add rdi, 0D8h mov [rsp+128h+var_120], rdi call _ZNSt5queueISt8functionIFbvEESt5dequeIS2_SaIS2_EEEC2IS5_vEEv; std::queue<std::function<bool ()(void)>>::queue<std::deque<std::function<bool ()(void)>>,void>(void) jmp short $+2 loc_B2B17: mov rdi, [rsp+128h+var_E8] add rdi, 128h mov [rsp+128h+var_128], rdi call _ZNSt5queueISt8functionIFbvEESt5dequeIS2_SaIS2_EEEC2IS5_vEEv; std::queue<std::function<bool ()(void)>>::queue<std::deque<std::function<bool ()(void)>>,void>(void) jmp short $+2 loc_B2B2E: mov rdi, [rsp+128h+var_E8] add rdi, 178h call _ZNSt5stackISt8functionIFvvEESt5dequeIS2_SaIS2_EEEC2IS5_vEEv; std::stack<std::function<void ()(void)>>::stack<std::deque<std::function<void ()(void)>>,void>(void) jmp short $+2 loc_B2B41: add rsp, 128h retn mov rcx, rax mov eax, edx mov [rsp+arg_B0], rcx mov [rsp+arg_AC], eax jmp loc_B2C6E mov rcx, rax mov eax, edx mov [rsp+arg_B0], rcx mov [rsp+arg_AC], eax jmp short loc_B2B99 mov rcx, rax mov eax, edx mov [rsp+arg_B0], rcx mov [rsp+arg_AC], eax lea rdi, [rsp+arg_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_B2B99: lea rax, [rsp+arg_87] mov [rsp+arg_F8], rax jmp loc_B2C6E mov rcx, rax mov eax, edx mov [rsp+arg_B0], rcx mov [rsp+arg_AC], eax jmp short loc_B2BE2 mov rcx, rax mov eax, edx mov [rsp+arg_B0], rcx mov [rsp+arg_AC], eax lea rdi, [rsp+arg_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_B2BE2: lea rax, [rsp+arg_5F] mov [rsp+arg_108], rax jmp short loc_B2C6E mov rcx, rax mov eax, edx mov [rsp+arg_B0], rcx mov [rsp+arg_AC], eax jmp short loc_B2C64 mov rcx, rax mov eax, edx mov [rsp+arg_B0], rcx mov [rsp+arg_AC], eax jmp short loc_B2C5A mov rcx, rax mov eax, edx mov [rsp+arg_B0], rcx mov [rsp+arg_AC], eax jmp short loc_B2C50 mov rdi, [rsp+0] mov rcx, rax mov eax, edx mov [rsp+arg_B0], rcx mov [rsp+arg_AC], eax call _ZNSt5queueISt8functionIFbvEESt5dequeIS2_SaIS2_EEED2Ev; std::queue<std::function<bool ()(void)>>::~queue() loc_B2C50: mov rdi, [rsp+arg_0] call _ZNSt5queueISt8functionIFbvEESt5dequeIS2_SaIS2_EEED2Ev; std::queue<std::function<bool ()(void)>>::~queue() loc_B2C5A: mov rdi, [rsp+arg_8] call _ZNSt5queueISt8functionIFbvEESt5dequeIS2_SaIS2_EEED2Ev; std::queue<std::function<bool ()(void)>>::~queue() loc_B2C64: mov rdi, [rsp+arg_10] call _ZNSt5queueISt8functionIFbvEESt5dequeIS2_SaIS2_EEED2Ev; std::queue<std::function<bool ()(void)>>::~queue() loc_B2C6E: mov rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, [rsp+arg_B0] call __Unwind_Resume
long long DatabaseLoader::DatabaseLoader(long long a1, long long a2, int a3, long long a4, long long a5) { int v6; // [rsp+24h] [rbp-104h] long long v7; // [rsp+30h] [rbp-F8h] char v8; // [rsp+3Fh] [rbp-E9h] long long v9; // [rsp+58h] [rbp-D0h] char v10; // [rsp+67h] [rbp-C1h] BYREF _BYTE v11[38]; // [rsp+68h] [rbp-C0h] BYREF char v12; // [rsp+8Eh] [rbp-9Ah] BYREF char v13; // [rsp+8Fh] [rbp-99h] BYREF _BYTE v14[52]; // [rsp+90h] [rbp-98h] BYREF int v15; // [rsp+C4h] [rbp-64h] BYREF long long v16; // [rsp+C8h] [rbp-60h] ConfigMgr *v17; // [rsp+D0h] [rbp-58h] __int128 v18; // [rsp+D8h] [rbp-50h] char *v19; // [rsp+E8h] [rbp-40h] char *v20; // [rsp+F0h] [rbp-38h] char *v21; // [rsp+F8h] [rbp-30h] char *v22; // [rsp+108h] [rbp-20h] char *v23; // [rsp+118h] [rbp-10h] char *v24; // [rsp+120h] [rbp-8h] *(_QWORD *)&v18 = a4; *((_QWORD *)&v18 + 1) = a5; v17 = (ConfigMgr *)a1; v16 = a2; v15 = a3; std::string::basic_string((_QWORD *)a1, a2); *(_OWORD *)(a1 + 32) = v18; v9 = ConfigMgr::instance((ConfigMgr *)a1); v19 = &v13; v24 = &v13; std::string::basic_string<std::allocator<char>>((long long)v14, (long long)"Updates.AutoSetup", (long long)&v13); v12 = 1; v8 = ConfigMgr::GetOption<bool>(v9, v14, &v12, 1LL); std::string::~string(v14); v21 = &v13; *(_BYTE *)(a1 + 48) = v8 & 1; v7 = ConfigMgr::instance((ConfigMgr *)v14); v20 = &v10; v23 = &v10; std::string::basic_string<std::allocator<char>>((long long)v11, (long long)"Updates.EnableDatabases", (long long)&v10); v6 = ConfigMgr::GetOption<unsigned int>(v7, v11, &v15, 1LL); std::string::~string(v11); v22 = &v10; *(_DWORD *)(a1 + 52) = v6; ((void (*)(void))std::queue<std::function<bool ()(void)>>::queue<std::deque<std::function<bool ()(void)>>,void>)(); ((void (*)(void))std::queue<std::function<bool ()(void)>>::queue<std::deque<std::function<bool ()(void)>>,void>)(); ((void (*)(void))std::queue<std::function<bool ()(void)>>::queue<std::deque<std::function<bool ()(void)>>,void>)(); std::queue<std::function<bool ()(void)>>::queue<std::deque<std::function<bool ()(void)>>,void>(a1 + 296); return std::stack<std::function<void ()(void)>>::stack<std::deque<std::function<void ()(void)>>,void>(a1 + 376); }
DatabaseLoader: SUB RSP,0x128 MOV qword ptr [RSP + 0xd8],RCX MOV qword ptr [RSP + 0xe0],R8 MOV qword ptr [RSP + 0xd0],RDI MOV qword ptr [RSP + 0xc8],RSI MOV dword ptr [RSP + 0xc4],EDX MOV RDI,qword ptr [RSP + 0xd0] MOV qword ptr [RSP + 0x48],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x40],RAX MOV RSI,qword ptr [RSP + 0xc8] CALL 0x0016ca40 MOV RAX,qword ptr [RSP + 0x48] MOVUPS XMM0,xmmword ptr [RSP + 0xd8] MOVUPS xmmword ptr [RAX + 0x20],XMM0 ADD RAX,0x30 MOV qword ptr [RSP + 0x50],RAX LAB_001b29aa: CALL 0x002840d0 MOV qword ptr [RSP + 0x58],RAX JMP 0x001b29b6 LAB_001b29b6: LEA RDX,[RSP + 0x8f] MOV qword ptr [RSP + 0xe8],RDX MOV RAX,qword ptr [RSP + 0xe8] MOV qword ptr [RSP + 0x120],RAX LAB_001b29d6: LEA RSI,[0x417439] LEA RDI,[RSP + 0x90] CALL 0x0012dc40 JMP 0x001b29ec LAB_001b29ec: MOV RDI,qword ptr [RSP + 0x58] MOV byte ptr [RSP + 0x8e],0x1 LAB_001b29f9: LEA RSI,[RSP + 0x90] LEA RDX,[RSP + 0x8e] MOV ECX,0x1 CALL 0x00289d10 MOV byte ptr [RSP + 0x3f],AL JMP 0x001b2a19 LAB_001b2a19: LEA RDI,[RSP + 0x90] CALL 0x0012de90 MOV DL,byte ptr [RSP + 0x3f] MOV RCX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x40] LEA RSI,[RSP + 0x8f] MOV qword ptr [RSP + 0xf8],RSI AND DL,0x1 MOV byte ptr [RCX],DL ADD RAX,0x34 MOV qword ptr [RSP + 0x28],RAX LAB_001b2a52: CALL 0x002840d0 MOV qword ptr [RSP + 0x30],RAX JMP 0x001b2a5e LAB_001b2a5e: LEA RDX,[RSP + 0x67] MOV qword ptr [RSP + 0xf0],RDX MOV RAX,qword ptr [RSP + 0xf0] MOV qword ptr [RSP + 0x118],RAX LAB_001b2a7b: LEA RSI,[0x41744b] LEA RDI,[RSP + 0x68] CALL 0x0012dc40 JMP 0x001b2a8e LAB_001b2a8e: MOV RDI,qword ptr [RSP + 0x30] LEA RSI,[RSP + 0x68] LEA RDX,[RSP + 0xc4] MOV ECX,0x1 CALL 0x00296440 MOV dword ptr [RSP + 0x24],EAX JMP 0x001b2ab0 LAB_001b2ab0: LEA RDI,[RSP + 0x68] CALL 0x0012de90 MOV ECX,dword ptr [RSP + 0x24] MOV RAX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RSP + 0x40] LEA RDX,[RSP + 0x67] MOV qword ptr [RSP + 0x108],RDX MOV dword ptr [RAX],ECX ADD RDI,0x38 MOV qword ptr [RSP + 0x18],RDI LAB_001b2ae0: CALL 0x001b3440 JMP 0x001b2ae7 LAB_001b2ae7: MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0x88 MOV qword ptr [RSP + 0x10],RDI LAB_001b2af8: CALL 0x001b3440 JMP 0x001b2aff LAB_001b2aff: MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0xd8 MOV qword ptr [RSP + 0x8],RDI LAB_001b2b10: CALL 0x001b3440 JMP 0x001b2b17 LAB_001b2b17: MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0x128 MOV qword ptr [RSP],RDI LAB_001b2b27: CALL 0x001b3440 JMP 0x001b2b2e LAB_001b2b2e: MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0x178 LAB_001b2b3a: CALL 0x001b3470 LAB_001b2b3f: JMP 0x001b2b41 LAB_001b2b41: ADD RSP,0x128 RET
/* DatabaseLoader::DatabaseLoader(std::__cxx11::string const&, unsigned int, std::basic_string_view<char, std::char_traits<char> >) */ void __thiscall DatabaseLoader::DatabaseLoader (DatabaseLoader *this,string *param_1,uint param_2,int8 param_4,int8 param_5) { DatabaseLoader DVar1; uint uVar2; ConfigMgr *pCVar3; allocator local_c1; string local_c0 [38]; bool local_9a; allocator local_99; string local_98 [52]; uint local_64; string *local_60; DatabaseLoader *local_58; int8 local_50; int8 uStack_48; allocator *local_40; allocator *local_38; allocator *local_30; allocator *local_20; allocator *local_10; allocator *local_8; local_64 = param_2; local_60 = param_1; local_58 = this; local_50 = param_4; uStack_48 = param_5; std::__cxx11::string::string((string *)this,param_1); *(int8 *)(this + 0x20) = local_50; *(int8 *)(this + 0x28) = uStack_48; /* try { // try from 001b29aa to 001b29ae has its CatchHandler @ 001b2b49 */ pCVar3 = (ConfigMgr *)ConfigMgr::instance(); local_40 = &local_99; /* try { // try from 001b29d6 to 001b29e9 has its CatchHandler @ 001b2b62 */ local_8 = local_40; std::__cxx11::string::string<std::allocator<char>>(local_98,"Updates.AutoSetup",local_40); local_9a = true; /* try { // try from 001b29f9 to 001b2a12 has its CatchHandler @ 001b2b78 */ DVar1 = (DatabaseLoader)ConfigMgr::GetOption<bool>(pCVar3,local_98,&local_9a,true); std::__cxx11::string::~string(local_98); local_30 = &local_99; this[0x30] = DVar1; /* try { // try from 001b2a52 to 001b2a56 has its CatchHandler @ 001b2b49 */ pCVar3 = (ConfigMgr *)ConfigMgr::instance(); local_38 = &local_c1; /* try { // try from 001b2a7b to 001b2a8b has its CatchHandler @ 001b2bae */ local_10 = local_38; std::__cxx11::string::string<std::allocator<char>>(local_c0,"Updates.EnableDatabases",local_38); /* try { // try from 001b2a8e to 001b2aa9 has its CatchHandler @ 001b2bc4 */ uVar2 = ConfigMgr::GetOption<unsigned_int>(pCVar3,local_c0,&local_64,true); std::__cxx11::string::~string(local_c0); local_20 = &local_c1; *(uint *)(this + 0x34) = uVar2; /* try { // try from 001b2ae0 to 001b2ae4 has its CatchHandler @ 001b2b49 */ std:: queue<std::function<bool()>,std::deque<std::function<bool()>,std::allocator<std::function<bool()>>>> ::queue<std::deque<std::function<bool()>,std::allocator<std::function<bool()>>>,void> ((queue<std::function<bool()>,std::deque<std::function<bool()>,std::allocator<std::function<bool()>>>> *)(this + 0x38)); /* try { // try from 001b2af8 to 001b2afc has its CatchHandler @ 001b2bf1 */ std:: queue<std::function<bool()>,std::deque<std::function<bool()>,std::allocator<std::function<bool()>>>> ::queue<std::deque<std::function<bool()>,std::allocator<std::function<bool()>>>,void> ((queue<std::function<bool()>,std::deque<std::function<bool()>,std::allocator<std::function<bool()>>>> *)(this + 0x88)); /* try { // try from 001b2b10 to 001b2b14 has its CatchHandler @ 001b2c07 */ std:: queue<std::function<bool()>,std::deque<std::function<bool()>,std::allocator<std::function<bool()>>>> ::queue<std::deque<std::function<bool()>,std::allocator<std::function<bool()>>>,void> ((queue<std::function<bool()>,std::deque<std::function<bool()>,std::allocator<std::function<bool()>>>> *)(this + 0xd8)); /* try { // try from 001b2b27 to 001b2b2b has its CatchHandler @ 001b2c1d */ std:: queue<std::function<bool()>,std::deque<std::function<bool()>,std::allocator<std::function<bool()>>>> ::queue<std::deque<std::function<bool()>,std::allocator<std::function<bool()>>>,void> ((queue<std::function<bool()>,std::deque<std::function<bool()>,std::allocator<std::function<bool()>>>> *)(this + 0x128)); /* try { // try from 001b2b3a to 001b2b3e has its CatchHandler @ 001b2c33 */ std:: stack<std::function<void()>,std::deque<std::function<void()>,std::allocator<std::function<void()>>>> ::stack<std::deque<std::function<void()>,std::allocator<std::function<void()>>>,void> ((stack<std::function<void()>,std::deque<std::function<void()>,std::allocator<std::function<void()>>>> *)(this + 0x178)); return; }
33,707
server_slot::get_timings() const
monkey531[P]llama/examples/server/server.cpp
result_timings get_timings() const { result_timings timings; timings.prompt_n = n_prompt_tokens_processed; timings.prompt_ms = t_prompt_processing; timings.prompt_per_token_ms = t_prompt_processing / n_prompt_tokens_processed; timings.prompt_per_second = 1e3 / t_prompt_processing * n_prompt_tokens_processed; timings.predicted_n = n_decoded; timings.predicted_ms = t_token_generation; timings.predicted_per_token_ms = t_token_generation / n_decoded; timings.predicted_per_second = 1e3 / t_token_generation * n_decoded; return timings; }
O2
cpp
server_slot::get_timings() const: movq %rdi, %rax movl 0x784(%rsi), %ecx movl %ecx, (%rdi) movsd 0x870(%rsi), %xmm0 movsd %xmm0, 0x8(%rdi) cvtsi2sd %ecx, %xmm1 movsd 0x6d59c(%rip), %xmm2 # 0xf04f8 movapd %xmm2, %xmm3 divsd %xmm0, %xmm3 divsd %xmm1, %xmm0 movsd %xmm0, 0x10(%rdi) mulsd %xmm1, %xmm3 movsd %xmm3, 0x18(%rdi) movl 0x770(%rsi), %ecx movl %ecx, 0x20(%rdi) movsd 0x878(%rsi), %xmm0 movsd %xmm0, 0x28(%rdi) cvtsi2sd %ecx, %xmm1 divsd %xmm0, %xmm2 divsd %xmm1, %xmm0 movsd %xmm0, 0x30(%rdi) mulsd %xmm1, %xmm2 movsd %xmm2, 0x38(%rdi) retq nop
_ZNK11server_slot11get_timingsEv: mov rax, rdi mov ecx, [rsi+784h] mov [rdi], ecx movsd xmm0, qword ptr [rsi+870h] movsd qword ptr [rdi+8], xmm0 cvtsi2sd xmm1, ecx movsd xmm2, cs:qword_F04F8 movapd xmm3, xmm2 divsd xmm3, xmm0 divsd xmm0, xmm1 movsd qword ptr [rdi+10h], xmm0 mulsd xmm3, xmm1 movsd qword ptr [rdi+18h], xmm3 mov ecx, [rsi+770h] mov [rdi+20h], ecx movsd xmm0, qword ptr [rsi+878h] movsd qword ptr [rdi+28h], xmm0 cvtsi2sd xmm1, ecx divsd xmm2, xmm0 divsd xmm0, xmm1 movsd qword ptr [rdi+30h], xmm0 mulsd xmm2, xmm1 movsd qword ptr [rdi+38h], xmm2 retn
server_slot * server_slot::get_timings(server_slot *this, long long a2) { server_slot *result; // rax int v3; // ecx double v4; // xmm0_8 int v5; // ecx double v6; // xmm0_8 result = this; v3 = *(_DWORD *)(a2 + 1924); *(_DWORD *)this = v3; v4 = *(double *)(a2 + 2160); *((double *)this + 1) = v4; *((double *)this + 2) = v4 / (double)v3; *((double *)this + 3) = 1000.0 / v4 * (double)v3; v5 = *(_DWORD *)(a2 + 1904); *((_DWORD *)this + 8) = v5; v6 = *(double *)(a2 + 2168); *((double *)this + 5) = v6; *((double *)this + 6) = v6 / (double)v5; *((double *)this + 7) = 1000.0 / v6 * (double)v5; return result; }
get_timings: MOV RAX,RDI MOV ECX,dword ptr [RSI + 0x784] MOV dword ptr [RDI],ECX MOVSD XMM0,qword ptr [RSI + 0x870] MOVSD qword ptr [RDI + 0x8],XMM0 CVTSI2SD XMM1,ECX MOVSD XMM2,qword ptr [0x001f04f8] MOVAPD XMM3,XMM2 DIVSD XMM3,XMM0 DIVSD XMM0,XMM1 MOVSD qword ptr [RDI + 0x10],XMM0 MULSD XMM3,XMM1 MOVSD qword ptr [RDI + 0x18],XMM3 MOV ECX,dword ptr [RSI + 0x770] MOV dword ptr [RDI + 0x20],ECX MOVSD XMM0,qword ptr [RSI + 0x878] MOVSD qword ptr [RDI + 0x28],XMM0 CVTSI2SD XMM1,ECX DIVSD XMM2,XMM0 DIVSD XMM0,XMM1 MOVSD qword ptr [RDI + 0x30],XMM0 MULSD XMM2,XMM1 MOVSD qword ptr [RDI + 0x38],XMM2 RET
/* server_slot::get_timings() const */ void server_slot::get_timings(void) { double dVar1; int iVar2; double dVar3; long in_RSI; int *in_RDI; double dVar4; double dVar5; iVar2 = *(int *)(in_RSI + 0x784); *in_RDI = iVar2; dVar1 = *(double *)(in_RSI + 0x870); *(double *)(in_RDI + 2) = dVar1; dVar3 = DAT_001f04f8; dVar4 = (double)iVar2; dVar5 = DAT_001f04f8 / dVar1; *(double *)(in_RDI + 4) = dVar1 / dVar4; *(double *)(in_RDI + 6) = dVar5 * dVar4; iVar2 = *(int *)(in_RSI + 0x770); in_RDI[8] = iVar2; dVar1 = *(double *)(in_RSI + 0x878); *(double *)(in_RDI + 10) = dVar1; dVar4 = (double)iVar2; *(double *)(in_RDI + 0xc) = dVar1 / dVar4; *(double *)(in_RDI + 0xe) = (dVar3 / dVar1) * dVar4; return; }
33,708
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; }
O3
c
my_printv_error: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x208, %rsp # imm = 0x208 movq %rdx, %rbx movq %rsi, %rdx movl %edi, %r14d movq %fs:0x28, %rax movq %rax, -0x20(%rbp) leaq -0x220(%rbp), %r15 movl $0x200, %esi # imm = 0x200 movq %r15, %rdi callq 0x91ffd leaq 0x2d82eb(%rip), %rax # 0x333990 movl %r14d, %edi movq %r15, %rsi movq %rbx, %rdx callq *(%rax) movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x5b6cd addq $0x208, %rsp # imm = 0x208 popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x28400
my_printv_error: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 208h mov rbx, rdx mov rdx, rsi mov r14d, edi mov rax, fs:28h mov [rbp+var_20], rax lea r15, [rbp+var_220] mov esi, 200h mov rdi, r15 call my_vsnprintf lea rax, error_handler_hook mov edi, r14d mov rsi, r15 mov rdx, rbx call qword ptr [rax] mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_5B6CD add rsp, 208h pop rbx pop r14 pop r15 pop rbp retn loc_5B6CD: call ___stack_chk_fail
unsigned long long my_printv_error(long long a1, long long a2) { _BYTE v3[512]; // [rsp+0h] [rbp-220h] BYREF unsigned long long v4; // [rsp+200h] [rbp-20h] v4 = __readfsqword(0x28u); my_vsnprintf(v3, 512LL, a2); error_handler_hook(); return __readfsqword(0x28u); }
my_printv_error: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x208 MOV RBX,RDX MOV RDX,RSI MOV R14D,EDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX LEA R15,[RBP + -0x220] MOV ESI,0x200 MOV RDI,R15 CALL 0x00191ffd LEA RAX,[0x433990] MOV EDI,R14D MOV RSI,R15 MOV RDX,RBX CALL qword ptr [RAX] MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x0015b6cd ADD RSP,0x208 POP RBX POP R14 POP R15 POP RBP RET LAB_0015b6cd: CALL 0x00128400
void my_printv_error(int4 param_1,int8 param_2,int8 param_3) { long in_FS_OFFSET; int1 local_228 [512]; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); my_vsnprintf(local_228,0x200,param_2); (*(code *)error_handler_hook)(param_1,local_228,param_3); if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
33,709
ma_cmp_static_unique
eloqsql/storage/maria/ma_statrec.c
my_bool _ma_cmp_static_unique(MARIA_HA *info, MARIA_UNIQUEDEF *def, const uchar *record, MARIA_RECORD_POS pos) { DBUG_ENTER("_ma_cmp_static_unique"); info->rec_cache.seek_not_done=1; /* We have done a seek */ if (info->s->file_read(info, info->rec_buff, info->s->base.reclength, pos, MYF(MY_NABP))) DBUG_RETURN(1); DBUG_RETURN(_ma_unique_comp(def, record, info->rec_buff, def->null_are_equal)); }
O3
c
ma_cmp_static_unique: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movl $0x1, 0x598(%rdi) movq (%rdi), %rax movq 0x3a0(%rdi), %rsi movq 0x398(%rax), %rdx movl $0x4, %r8d callq *0x6e0(%rax) testq %rax, %rax je 0x702d9 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq 0x3a0(%r15), %rdx movsbl 0x3(%r14), %ecx movq %r14, %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x58a3d
_ma_cmp_static_unique: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdx mov r14, rsi mov r15, rdi mov dword ptr [rdi+598h], 1 mov rax, [rdi] mov rsi, [rdi+3A0h] mov rdx, [rax+398h] mov r8d, 4 call qword ptr [rax+6E0h] test rax, rax jz short loc_702D9 mov al, 1 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_702D9: mov rdx, [r15+3A0h] movsx ecx, byte ptr [r14+3] mov rdi, r14 mov rsi, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _ma_unique_comp
char ma_cmp_static_unique(long long a1, long long a2, long long a3, long long a4) { *(_DWORD *)(a1 + 1432) = 1; if ( (*(long long ( **)(long long, _QWORD, _QWORD, long long, long long))(*(_QWORD *)a1 + 1760LL))( a1, *(_QWORD *)(a1 + 928), *(_QWORD *)(*(_QWORD *)a1 + 920LL), a4, 4LL) ) { return 1; } else { return ma_unique_comp(a2, a3, *(_QWORD *)(a1 + 928), *(_BYTE *)(a2 + 3)); } }
_ma_cmp_static_unique: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV dword ptr [RDI + 0x598],0x1 MOV RAX,qword ptr [RDI] MOV RSI,qword ptr [RDI + 0x3a0] MOV RDX,qword ptr [RAX + 0x398] MOV R8D,0x4 CALL qword ptr [RAX + 0x6e0] TEST RAX,RAX JZ 0x001702d9 MOV AL,0x1 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_001702d9: MOV RDX,qword ptr [R15 + 0x3a0] MOVSX ECX,byte ptr [R14 + 0x3] MOV RDI,R14 MOV RSI,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x00158a3d
int8 _ma_cmp_static_unique(long *param_1,long param_2,int8 param_3,int8 param_4) { long lVar1; int8 uVar2; *(int4 *)(param_1 + 0xb3) = 1; lVar1 = (**(code **)(*param_1 + 0x6e0)) (param_1,param_1[0x74],*(int8 *)(*param_1 + 0x398),param_4,4); if (lVar1 != 0) { return 1; } uVar2 = _ma_unique_comp(param_2,param_3,param_1[0x74],(int)*(char *)(param_2 + 3)); return uVar2; }
33,710
mysql_change_user_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_change_user_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_change_user, (parms->mysql, parms->user, parms->passwd, parms->db), parms->mysql, my_bool, r_my_bool) }
O0
c
mysql_change_user_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movq 0x8(%rax), %rsi movq -0x10(%rbp), %rax movq 0x10(%rax), %rdx movq -0x10(%rbp), %rax movq 0x18(%rax), %rcx callq 0xa63f0 movb %al, -0x11(%rbp) movb -0x11(%rbp), %cl movq -0x20(%rbp), %rax movb %cl, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
mysql_change_user_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_10] mov rsi, [rax+8] mov rax, [rbp+var_10] mov rdx, [rax+10h] mov rax, [rbp+var_10] mov rcx, [rax+18h] call mysql_change_user mov [rbp+var_11], al mov cl, [rbp+var_11] mov rax, [rbp+var_20] mov [rax+8], cl mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
long long mysql_change_user_start_internal(long long *a1) { long long result; // rax long long v2; // [rsp+0h] [rbp-20h] v2 = *(_QWORD *)(*(_QWORD *)(*a1 + 1152) + 40LL); *(_BYTE *)(v2 + 8) = mysql_change_user(*a1, a1[1], a1[2], a1[3]); result = v2; *(_DWORD *)v2 = 0; return result; }
mysql_change_user_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x18] CALL 0x001a63f0 MOV byte ptr [RBP + -0x11],AL MOV CL,byte ptr [RBP + -0x11] MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x8],CL MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_change_user_start_internal(long *param_1) { int4 *puVar1; int1 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_change_user(*param_1,param_1[1],param_1[2],param_1[3]); *(int1 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
33,711
my_strnxfrm_tis620
eloqsql/strings/ctype-tis620.c
static size_t my_strnxfrm_tis620(CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { size_t len, dstlen0= dstlen; len= MY_MIN(dstlen, srclen); memcpy(dst, src, len); len= thai2sortable(dst, len); set_if_smaller(dstlen, nweights); set_if_smaller(len, dstlen); len= my_strxfrm_pad_desc_and_reverse(cs, dst, dst + len, dst + dstlen, (uint)(dstlen - len), flags, 0); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len < dstlen0) { size_t fill_length= dstlen0 - len; my_ci_fill(cs, (char*) dst + len, fill_length, cs->pad_char); len= dstlen0; } return len; }
O0
c
my_strnxfrm_tis620: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movl 0x10(%rbp), %eax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x4f03e movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x4f046 movq -0x30(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x38(%rbp), %rdx callq 0x24230 movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rsi callq 0x4f130 movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movl -0x1c(%rbp), %ecx cmpq %rcx, %rax jbe 0x4f083 movl -0x1c(%rbp), %eax movq %rax, -0x18(%rbp) jmp 0x4f085 jmp 0x4f087 movq -0x38(%rbp), %rax cmpq -0x18(%rbp), %rax jbe 0x4f099 movq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0x4f09b movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x10(%rbp), %rdx addq -0x38(%rbp), %rdx movq -0x10(%rbp), %rcx addq -0x18(%rbp), %rcx movq -0x18(%rbp), %rax subq -0x38(%rbp), %rax movl %eax, %r8d movl 0x10(%rbp), %r9d xorl %eax, %eax movl $0x0, (%rsp) callq 0x496f0 movq %rax, -0x38(%rbp) movl 0x10(%rbp), %eax andl $0x80, %eax cmpl $0x0, %eax je 0x4f11f movq -0x38(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x4f11f movq -0x40(%rbp), %rax subq -0x38(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi addq -0x38(%rbp), %rsi movq -0x48(%rbp), %rdx movq -0x8(%rbp), %rax movzbl 0xb0(%rax), %ecx callq 0x4f2d0 movq -0x40(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax addq $0x60, %rsp popq %rbp retq nopl (%rax)
my_strnxfrm_tis620: push rbp mov rbp, rsp sub rsp, 60h mov eax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_18] cmp rax, [rbp+var_30] jnb short loc_4F03E mov rax, [rbp+var_18] mov [rbp+var_50], rax jmp short loc_4F046 loc_4F03E: mov rax, [rbp+var_30] mov [rbp+var_50], rax loc_4F046: mov rax, [rbp+var_50] mov [rbp+var_38], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] mov rdx, [rbp+var_38] call _memcpy mov rdi, [rbp+var_10] mov rsi, [rbp+var_38] call thai2sortable mov [rbp+var_38], rax mov rax, [rbp+var_18] mov ecx, [rbp+var_1C] cmp rax, rcx jbe short loc_4F083 mov eax, [rbp+var_1C] mov [rbp+var_18], rax loc_4F083: jmp short $+2 loc_4F085: jmp short $+2 loc_4F087: mov rax, [rbp+var_38] cmp rax, [rbp+var_18] jbe short loc_4F099 mov rax, [rbp+var_18] mov [rbp+var_38], rax loc_4F099: jmp short $+2 loc_4F09B: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_10] add rdx, [rbp+var_38] mov rcx, [rbp+var_10] add rcx, [rbp+var_18] mov rax, [rbp+var_18] sub rax, [rbp+var_38] mov r8d, eax mov r9d, [rbp+arg_0] xor eax, eax mov [rsp+60h+var_60], 0 call my_strxfrm_pad_desc_and_reverse mov [rbp+var_38], rax mov eax, [rbp+arg_0] and eax, 80h cmp eax, 0 jz short loc_4F11F mov rax, [rbp+var_38] cmp rax, [rbp+var_40] jnb short loc_4F11F mov rax, [rbp+var_40] sub rax, [rbp+var_38] mov [rbp+var_48], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] add rsi, [rbp+var_38] mov rdx, [rbp+var_48] mov rax, [rbp+var_8] movzx ecx, byte ptr [rax+0B0h] call my_ci_fill_1 mov rax, [rbp+var_40] mov [rbp+var_38], rax loc_4F11F: mov rax, [rbp+var_38] add rsp, 60h pop rbp retn
unsigned long long my_strnxfrm_tis620( long long a1, long long a2, unsigned long long a3, unsigned int a4, long long a5, unsigned long long a6, unsigned int a7) { unsigned long long v8; // [rsp+10h] [rbp-50h] unsigned long long v10; // [rsp+28h] [rbp-38h] unsigned long long v11; // [rsp+28h] [rbp-38h] unsigned long long v13; // [rsp+48h] [rbp-18h] v13 = a3; if ( a3 >= a6 ) v8 = a6; else v8 = a3; memcpy(a2, a5, v8); v10 = thai2sortable(a2, v8); if ( v13 > a4 ) v13 = a4; if ( v10 > v13 ) v10 = v13; v11 = my_strxfrm_pad_desc_and_reverse(a1, a2, v10 + a2, v13 + a2, (int)v13 - (int)v10, a7, 0); if ( (a7 & 0x80) != 0 && v11 < a3 ) { my_ci_fill_1(a1, v11 + a2, a3 - v11, *(unsigned __int8 *)(a1 + 176)); return a3; } return v11; }
my_strnxfrm_tis620: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x30] JNC 0x0014f03e MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX JMP 0x0014f046 LAB_0014f03e: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x50],RAX LAB_0014f046: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x38] CALL 0x00124230 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x38] CALL 0x0014f130 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x1c] CMP RAX,RCX JBE 0x0014f083 MOV EAX,dword ptr [RBP + -0x1c] MOV qword ptr [RBP + -0x18],RAX LAB_0014f083: JMP 0x0014f085 LAB_0014f085: JMP 0x0014f087 LAB_0014f087: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x18] JBE 0x0014f099 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX LAB_0014f099: JMP 0x0014f09b LAB_0014f09b: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x18] SUB RAX,qword ptr [RBP + -0x38] MOV R8D,EAX MOV R9D,dword ptr [RBP + 0x10] XOR EAX,EAX MOV dword ptr [RSP],0x0 CALL 0x001496f0 MOV qword ptr [RBP + -0x38],RAX MOV EAX,dword ptr [RBP + 0x10] AND EAX,0x80 CMP EAX,0x0 JZ 0x0014f11f MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x40] JNC 0x0014f11f MOV RAX,qword ptr [RBP + -0x40] SUB RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RAX + 0xb0] CALL 0x0014f2d0 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x38],RAX LAB_0014f11f: MOV RAX,qword ptr [RBP + -0x38] ADD RSP,0x60 POP RBP RET
ulong my_strnxfrm_tis620(long param_1,void *param_2,ulong param_3,uint param_4,void *param_5, ulong param_6,uint param_7) { size_t local_58; ulong local_40; ulong local_20; local_58 = param_6; if (param_3 < param_6) { local_58 = param_3; } memcpy(param_2,param_5,local_58); local_40 = thai2sortable(param_2,local_58); local_20 = param_3; if (param_4 < param_3) { local_20 = (ulong)param_4; } if (local_20 < local_40) { local_40 = local_20; } local_40 = my_strxfrm_pad_desc_and_reverse (param_1,param_2,(long)param_2 + local_40,(long)param_2 + local_20, (int)local_20 - (int)local_40,param_7,0); if (((param_7 & 0x80) != 0) && (local_40 < param_3)) { my_ci_fill(param_1,(long)param_2 + local_40,param_3 - local_40,*(int1 *)(param_1 + 0xb0)); local_40 = param_3; } return local_40; }
33,712
LefDefParser::lefwLayerAntennaAreaRatio(double)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwLayerAntennaAreaRatio(double value) { lefw54Num = LEFW_ANTENNAAREARATIO; if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_LAYERROUTING_START && lefwState != LEFW_LAYERROUTING && lefwState != LEFW_LAYER_START && lefwState != LEFW_LAYER) return LEFW_BAD_ORDER; // only routing or cut calls this func if (!lefwIsRouting && !lefwIsCut) return LEFW_BAD_DATA; if (versionNum < 5.4) return LEFW_WRONG_VERSION; if (lefwWriteEncrypt) encPrint(lefwFile, (char*) " ANTENNAAREARATIO %.11g ;\n", value); else fprintf(lefwFile, " ANTENNAAREARATIO %.11g ;\n", value); lefwLines++; return LEFW_OK; }
O0
cpp
LefDefParser::lefwLayerAntennaAreaRatio(double): subq $0x18, %rsp movsd %xmm0, 0x8(%rsp) movl $0x65, 0xa4838(%rip) # 0xc4f1c leaq 0xa4b65(%rip), %rax # 0xc5250 cmpq $0x0, (%rax) jne 0x206fe movl $0x1, 0x14(%rsp) jmp 0x207e0 leaq 0xa4d9b(%rip), %rax # 0xc54a0 cmpl $0x7, (%rax) je 0x2073b leaq 0xa4d8f(%rip), %rax # 0xc54a0 cmpl $0x1f, (%rax) je 0x2073b leaq 0xa4d83(%rip), %rax # 0xc54a0 cmpl $0x6, (%rax) je 0x2073b leaq 0xa4d77(%rip), %rax # 0xc54a0 cmpl $0x1c, (%rax) je 0x2073b movl $0x2, 0x14(%rsp) jmp 0x207e0 leaq 0xa4dd2(%rip), %rax # 0xc5514 cmpl $0x0, (%rax) jne 0x20760 leaq 0xa4d86(%rip), %rax # 0xc54d4 cmpl $0x0, (%rax) jne 0x20760 movl $0x3, 0x14(%rsp) jmp 0x207e0 movsd 0x824d8(%rip), %xmm0 # 0xa2c40 ucomisd 0xa47a0(%rip), %xmm0 # 0xc4f10 jbe 0x2077c movl $0x5, 0x14(%rsp) jmp 0x207e0 cmpl $0x0, 0xa4db9(%rip) # 0xc553c je 0x207a5 leaq 0xa4ac4(%rip), %rax # 0xc5250 movq (%rax), %rdi movsd 0x8(%rsp), %xmm0 leaq 0x72b7d(%rip), %rsi # 0x93319 movb $0x1, %al callq 0x8bf50 jmp 0x207c3 leaq 0xa4aa4(%rip), %rax # 0xc5250 movq (%rax), %rdi movsd 0x8(%rsp), %xmm0 leaq 0x72b5d(%rip), %rsi # 0x93319 movb $0x1, %al callq 0x2370 leaq 0xa4cd2(%rip), %rax # 0xc549c movl (%rax), %ecx addl $0x1, %ecx leaq 0xa4cc6(%rip), %rax # 0xc549c movl %ecx, (%rax) movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq nopl (%rax)
_ZN12LefDefParser25lefwLayerAntennaAreaRatioEd: sub rsp, 18h movsd [rsp+18h+var_10], xmm0 mov cs:_ZN12LefDefParserL9lefw54NumE, 65h ; 'e'; LefDefParser::lefw54Num lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile cmp qword ptr [rax], 0 jnz short loc_206FE mov [rsp+18h+var_4], 1 jmp loc_207E0 loc_206FE: lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 7 jz short loc_2073B lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 1Fh jz short loc_2073B lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 6 jz short loc_2073B lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 1Ch jz short loc_2073B mov [rsp+18h+var_4], 2 jmp loc_207E0 loc_2073B: lea rax, _ZN12LefDefParser13lefwIsRoutingE; LefDefParser::lefwIsRouting cmp dword ptr [rax], 0 jnz short loc_20760 lea rax, _ZN12LefDefParser9lefwIsCutE; LefDefParser::lefwIsCut cmp dword ptr [rax], 0 jnz short loc_20760 mov [rsp+18h+var_4], 3 jmp loc_207E0 loc_20760: movsd xmm0, cs:qword_A2C40 ucomisd xmm0, cs:_ZN12LefDefParserL10versionNumE; LefDefParser::versionNum jbe short loc_2077C mov [rsp+18h+var_4], 5 jmp short loc_207E0 loc_2077C: cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt jz short loc_207A5 lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] movsd xmm0, [rsp+18h+var_10] lea rsi, aAntennaarearat_0; " ANTENNAAREARATIO %.11g ;\n" mov al, 1 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_207C3 loc_207A5: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] movsd xmm0, [rsp+18h+var_10] lea rsi, aAntennaarearat_0; " ANTENNAAREARATIO %.11g ;\n" mov al, 1 call _fprintf loc_207C3: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov [rax], ecx mov [rsp+18h+var_4], 0 loc_207E0: mov eax, [rsp+18h+var_4] add rsp, 18h retn
long long LefDefParser::lefwLayerAntennaAreaRatio( LefDefParser *this, double a2, long long a3, int a4, int a5, int a6, int a7) { LefDefParser::lefw54Num = 101; if ( *(_QWORD *)&LefDefParser::lefwFile ) { if ( LefDefParser::lefwState == 7 || LefDefParser::lefwState == 31 || LefDefParser::lefwState == 6 || LefDefParser::lefwState == 28 ) { if ( LefDefParser::lefwIsRouting || LefDefParser::lefwIsCut ) { if ( *(double *)&LefDefParser::versionNum >= 5.4 ) { if ( LefDefParser::lefwWriteEncrypt ) LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)" ANTENNAAREARATIO %.11g ;\n", a4, a5, a6, a7); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, " ANTENNAAREARATIO %.11g ;\n", a2); ++LefDefParser::lefwLines; return 0; } else { return 5; } } else { return 3; } } else { return 2; } } else { return 1; } }
lefwLayerAntennaAreaRatio: SUB RSP,0x18 MOVSD qword ptr [RSP + 0x8],XMM0 MOV dword ptr [0x001c4f1c],0x65 LEA RAX,[0x1c5250] CMP qword ptr [RAX],0x0 JNZ 0x001206fe MOV dword ptr [RSP + 0x14],0x1 JMP 0x001207e0 LAB_001206fe: LEA RAX,[0x1c54a0] CMP dword ptr [RAX],0x7 JZ 0x0012073b LEA RAX,[0x1c54a0] CMP dword ptr [RAX],0x1f JZ 0x0012073b LEA RAX,[0x1c54a0] CMP dword ptr [RAX],0x6 JZ 0x0012073b LEA RAX,[0x1c54a0] CMP dword ptr [RAX],0x1c JZ 0x0012073b MOV dword ptr [RSP + 0x14],0x2 JMP 0x001207e0 LAB_0012073b: LEA RAX,[0x1c5514] CMP dword ptr [RAX],0x0 JNZ 0x00120760 LEA RAX,[0x1c54d4] CMP dword ptr [RAX],0x0 JNZ 0x00120760 MOV dword ptr [RSP + 0x14],0x3 JMP 0x001207e0 LAB_00120760: MOVSD XMM0,qword ptr [0x001a2c40] UCOMISD XMM0,qword ptr [0x001c4f10] JBE 0x0012077c MOV dword ptr [RSP + 0x14],0x5 JMP 0x001207e0 LAB_0012077c: CMP dword ptr [0x001c553c],0x0 JZ 0x001207a5 LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] MOVSD XMM0,qword ptr [RSP + 0x8] LEA RSI,[0x193319] MOV AL,0x1 CALL 0x0018bf50 JMP 0x001207c3 LAB_001207a5: LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] MOVSD XMM0,qword ptr [RSP + 0x8] LEA RSI,[0x193319] MOV AL,0x1 CALL 0x00102370 LAB_001207c3: LEA RAX,[0x1c549c] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x1c549c] MOV dword ptr [RAX],ECX MOV dword ptr [RSP + 0x14],0x0 LAB_001207e0: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
/* LefDefParser::lefwLayerAntennaAreaRatio(double) */ int4 LefDefParser::lefwLayerAntennaAreaRatio(double param_1) { int4 local_4; lefw54Num = 0x65; if (lefwFile == (_IO_FILE *)0x0) { local_4 = 1; } else if ((((lefwState == 7) || (lefwState == 0x1f)) || (lefwState == 6)) || (lefwState == 0x1c)) { if ((lefwIsRouting == 0) && (lefwIsCut == 0)) { local_4 = 3; } else if (DAT_001a2c40 <= versionNum) { if (lefwWriteEncrypt == 0) { fprintf(lefwFile," ANTENNAAREARATIO %.11g ;\n",param_1); } else { encPrint(lefwFile," ANTENNAAREARATIO %.11g ;\n",param_1); } lefwLines = lefwLines + 1; local_4 = 0; } else { local_4 = 5; } } else { local_4 = 2; } return local_4; }
33,713
LefDefParser::lefwLayerAntennaAreaRatio(double)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwLayerAntennaAreaRatio(double value) { lefw54Num = LEFW_ANTENNAAREARATIO; if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_LAYERROUTING_START && lefwState != LEFW_LAYERROUTING && lefwState != LEFW_LAYER_START && lefwState != LEFW_LAYER) return LEFW_BAD_ORDER; // only routing or cut calls this func if (!lefwIsRouting && !lefwIsCut) return LEFW_BAD_DATA; if (versionNum < 5.4) return LEFW_WRONG_VERSION; if (lefwWriteEncrypt) encPrint(lefwFile, (char*) " ANTENNAAREARATIO %.11g ;\n", value); else fprintf(lefwFile, " ANTENNAAREARATIO %.11g ;\n", value); lefwLines++; return LEFW_OK; }
O3
cpp
LefDefParser::lefwLayerAntennaAreaRatio(double): movl $0x65, 0x770c0(%rip) # 0x8cebc leaq 0x772ed(%rip), %rax # 0x8d0f0 movq (%rax), %rdi testq %rdi, %rdi je 0x15e72 leaq 0x7752e(%rip), %rax # 0x8d340 movl (%rax), %ecx movl $0x2, %eax cmpl $0x1f, %ecx ja 0x15e95 movl $0x900000c0, %edx # imm = 0x900000C0 btl %ecx, %edx jae 0x15e95 leaq 0x77585(%rip), %rcx # 0x8d3b4 leaq 0x7753e(%rip), %rax # 0x8d374 movl (%rax), %edx movl $0x3, %eax orl (%rcx), %edx je 0x15e95 movl $0x5, %eax movsd 0x54ca2(%rip), %xmm1 # 0x6aaf0 ucomisd 0x7705a(%rip), %xmm1 # 0x8ceb0 ja 0x15e95 pushq %rax cmpb $0x1, 0x7757c(%rip) # 0x8d3dc jne 0x15e78 leaq 0x45498(%rip), %rsi # 0x5b301 movb $0x1, %al callq 0x55afd jmp 0x15e86 movl $0x1, %eax retq leaq 0x45482(%rip), %rsi # 0x5b301 movb $0x1, %al callq 0x22e0 leaq 0x774af(%rip), %rax # 0x8d33c incl (%rax) xorl %eax, %eax addq $0x8, %rsp retq
_ZN12LefDefParser25lefwLayerAntennaAreaRatioEd: mov cs:_ZN12LefDefParserL9lefw54NumE, 65h ; 'e'; LefDefParser::lefw54Num lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] test rdi, rdi jz short loc_15E72 lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov ecx, [rax] mov eax, 2 cmp ecx, 1Fh ja short locret_15E95 mov edx, 900000C0h bt edx, ecx jnb short locret_15E95 lea rcx, _ZN12LefDefParser13lefwIsRoutingE; LefDefParser::lefwIsRouting lea rax, _ZN12LefDefParser9lefwIsCutE; LefDefParser::lefwIsCut mov edx, [rax] mov eax, 3 or edx, [rcx] jz short locret_15E95 mov eax, 5 movsd xmm1, cs:qword_6AAF0 ucomisd xmm1, cs:_ZN12LefDefParserL10versionNumE; LefDefParser::versionNum ja short locret_15E95 push rax cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_15E78 lea rsi, aAntennaarearat_0; " ANTENNAAREARATIO %.11g ;\n" mov al, 1 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_15E86 loc_15E72: mov eax, 1 retn loc_15E78: lea rsi, aAntennaarearat_0; " ANTENNAAREARATIO %.11g ;\n" mov al, 1 call _fprintf loc_15E86: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines inc dword ptr [rax] xor eax, eax add rsp, 8 locret_15E95: retn
long long LefDefParser::lefwLayerAntennaAreaRatio( LefDefParser *this, double a2, long long a3, long long a4, long long a5, int a6, int a7) { long long result; // rax int v8; // edx LefDefParser::lefw54Num = 101; if ( !*(_QWORD *)&LefDefParser::lefwFile ) return 1LL; result = 2LL; if ( LefDefParser::lefwState <= 0x1F ) { v8 = -1879048000; if ( _bittest(&v8, LefDefParser::lefwState) ) { result = 3LL; if ( LefDefParser::lefwIsRouting | LefDefParser::lefwIsCut ) { result = 5LL; if ( *(double *)&LefDefParser::versionNum >= 5.4 ) { if ( LefDefParser::lefwWriteEncrypt == 1 ) LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)" ANTENNAAREARATIO %.11g ;\n", LefDefParser::lefwIsRouting | LefDefParser::lefwIsCut, (unsigned int)&LefDefParser::lefwIsRouting, a6, a7); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, " ANTENNAAREARATIO %.11g ;\n", a2); ++LefDefParser::lefwLines; return 0LL; } } } } return result; }
lefwLayerAntennaAreaRatio: MOV dword ptr [0x0018cebc],0x65 LEA RAX,[0x18d0f0] MOV RDI,qword ptr [RAX] TEST RDI,RDI JZ 0x00115e72 LEA RAX,[0x18d340] MOV ECX,dword ptr [RAX] MOV EAX,0x2 CMP ECX,0x1f JA 0x00115e95 MOV EDX,0x900000c0 BT EDX,ECX JNC 0x00115e95 LEA RCX,[0x18d3b4] LEA RAX,[0x18d374] MOV EDX,dword ptr [RAX] MOV EAX,0x3 OR EDX,dword ptr [RCX] JZ 0x00115e95 MOV EAX,0x5 MOVSD XMM1,qword ptr [0x0016aaf0] UCOMISD XMM1,qword ptr [0x0018ceb0] JA 0x00115e95 PUSH RAX CMP byte ptr [0x0018d3dc],0x1 JNZ 0x00115e78 LEA RSI,[0x15b301] MOV AL,0x1 CALL 0x00155afd JMP 0x00115e86 LAB_00115e72: MOV EAX,0x1 RET LAB_00115e78: LEA RSI,[0x15b301] MOV AL,0x1 CALL 0x001022e0 LAB_00115e86: LEA RAX,[0x18d33c] INC dword ptr [RAX] XOR EAX,EAX ADD RSP,0x8 LAB_00115e95: RET
/* LefDefParser::lefwLayerAntennaAreaRatio(double) */ int8 LefDefParser::lefwLayerAntennaAreaRatio(double param_1) { int8 uVar1; lefw54Num = 0x65; if (lefwFile != (_IO_FILE *)0x0) { uVar1 = 2; if ((lefwState < 0x20) && ((0x900000c0U >> (lefwState & 0x1f) & 1) != 0)) { uVar1 = 3; if (lefwIsCut != 0 || lefwIsRouting != 0) { uVar1 = 5; if (DAT_0016aaf0 <= versionNum) { if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile," ANTENNAAREARATIO %.11g ;\n"); } else { fprintf(lefwFile," ANTENNAAREARATIO %.11g ;\n"); } lefwLines = lefwLines + 1; uVar1 = 0; } } } return uVar1; } return 1; }
33,714
end_slave_io_cache
eloqsql/mysys/mf_iocache.c
void end_slave_io_cache(IO_CACHE *cache) { /* Remove the cache from the next_file_user circular linked list. */ if (cache->next_file_user != cache) { IO_CACHE *p= cache->next_file_user; while (p->next_file_user != cache) p= p->next_file_user; p->next_file_user= cache->next_file_user; } my_free(cache->buffer); }
O0
c
end_slave_io_cache: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq 0xd8(%rax), %rax cmpq -0x8(%rbp), %rax je 0xdfd44 movq -0x8(%rbp), %rax movq 0xd8(%rax), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0xd8(%rax), %rax cmpq -0x8(%rbp), %rax je 0xdfd2e movq -0x10(%rbp), %rax movq 0xd8(%rax), %rax movq %rax, -0x10(%rbp) jmp 0xdfd0c movq -0x8(%rbp), %rax movq 0xd8(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0xd8(%rax) movq -0x8(%rbp), %rax movq 0x20(%rax), %rdi callq 0xf31b0 addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
end_slave_io_cache: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax+0D8h] cmp rax, [rbp+var_8] jz short loc_DFD44 mov rax, [rbp+var_8] mov rax, [rax+0D8h] mov [rbp+var_10], rax loc_DFD0C: mov rax, [rbp+var_10] mov rax, [rax+0D8h] cmp rax, [rbp+var_8] jz short loc_DFD2E mov rax, [rbp+var_10] mov rax, [rax+0D8h] mov [rbp+var_10], rax jmp short loc_DFD0C loc_DFD2E: mov rax, [rbp+var_8] mov rcx, [rax+0D8h] mov rax, [rbp+var_10] mov [rax+0D8h], rcx loc_DFD44: mov rax, [rbp+var_8] mov rdi, [rax+20h] call my_free add rsp, 10h pop rbp retn
long long end_slave_io_cache(long long a1, double a2) { long long i; // [rsp+0h] [rbp-10h] if ( *(_QWORD *)(a1 + 216) != a1 ) { for ( i = *(_QWORD *)(a1 + 216); *(_QWORD *)(i + 216) != a1; i = *(_QWORD *)(i + 216) ) ; *(_QWORD *)(i + 216) = *(_QWORD *)(a1 + 216); } return my_free(*(_QWORD *)(a1 + 32), a2); }
end_slave_io_cache: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xd8] CMP RAX,qword ptr [RBP + -0x8] JZ 0x001dfd44 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xd8] MOV qword ptr [RBP + -0x10],RAX LAB_001dfd0c: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xd8] CMP RAX,qword ptr [RBP + -0x8] JZ 0x001dfd2e MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xd8] MOV qword ptr [RBP + -0x10],RAX JMP 0x001dfd0c LAB_001dfd2e: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0xd8] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xd8],RCX LAB_001dfd44: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x20] CALL 0x001f31b0 ADD RSP,0x10 POP RBP RET
void end_slave_io_cache(long param_1) { int8 local_18; if (*(long *)(param_1 + 0xd8) != param_1) { for (local_18 = *(long *)(param_1 + 0xd8); *(long *)(local_18 + 0xd8) != param_1; local_18 = *(long *)(local_18 + 0xd8)) { } *(int8 *)(local_18 + 0xd8) = *(int8 *)(param_1 + 0xd8); } my_free(*(int8 *)(param_1 + 0x20)); return; }
33,715
nlohmann::json_abi_v3_11_3::detail::out_of_range nlohmann::json_abi_v3_11_3::detail::out_of_range::create<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*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*)
monkey531[P]llama/common/json.hpp
static out_of_range create(int id_, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("out_of_range", id_), exception::diagnostics(context), what_arg); return {id_, w.c_str()}; }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::out_of_range nlohmann::json_abi_v3_11_3::detail::out_of_range::create<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*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rdx, %r15 movl %esi, %ebp movq %rdi, %rbx leaq 0x38(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x3e029(%rip), %rsi # 0xadc0c leaq 0x3e02e(%rip), %rdx # 0xadc18 leaq 0x28(%rsp), %rdi callq 0x1ca8a leaq 0x48(%rsp), %rdi leaq 0x28(%rsp), %rsi movl %ebp, %edx callq 0x3e3bc leaq 0x78(%rsp), %r14 movq %r14, -0x10(%r14) xorl %eax, %eax movq %rax, -0x8(%r14) movb %al, (%r14) leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) movq %rax, -0x8(%r12) movb %al, (%r12) movq 0x8(%r15), %rsi addq 0x50(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x18a20 movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x181d0 movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x181d0 movq (%r15), %rsi movq 0x8(%r15), %rdx leaq 0x8(%rsp), %rdi callq 0x181d0 movq 0x68(%rsp), %rdi cmpq %r14, %rdi je 0x6fc8d movq 0x78(%rsp), %rsi incq %rsi callq 0x186a0 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x6fca8 movq 0x58(%rsp), %rsi incq %rsi callq 0x186a0 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x6fcbf movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 movq 0x8(%rsp), %rdx movq %rbx, %rdi movl %ebp, %esi callq 0x3e5b8 leaq 0x6d6f3(%rip), %rax # 0xdd3c8 addq $0x10, %rax movq %rax, (%rbx) movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x6fcf3 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 movq %rbx, %rax addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x6fd81 movq 0x18(%rsp), %rsi jmp 0x6fd79 movq %rax, %rbx jmp 0x6fd6a movq %rax, %rbx jmp 0x6fd81 movq %rdx, %rbx movq %rax, %r15 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x6fd43 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 leaq 0x68(%rsp), %rdi leaq 0x48(%rsp), %rdx leaq 0x88(%rsp), %r12 movq %r14, %rsi movq %r15, %rcx movl %ebx, %r8d movq %r12, %r9 callq 0x195eb movq (%r12), %rbx movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x6fd81 movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 movq %rbx, %rdi callq 0x18bb0 nop
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov r15, rdx mov ebp, esi mov rbx, rdi lea r13, [rsp+0C8h+var_90] mov [r13-10h], r13 lea rsi, aOutOfRange; "out_of_range" lea rdx, aOutOfRange+0Ch; "" lea rdi, [rsp+0C8h+var_A0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+0C8h+var_80]; int lea rsi, [rsp+0C8h+var_A0]; int mov edx, ebp; int call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int) lea r14, [rsp+0C8h+var_50] mov [r14-10h], r14 xor eax, eax mov [r14-8], rax mov [r14], al lea r12, [rsp+0C8h+var_B0] mov [r12-10h], r12 mov [r12-8], rax mov [r12], al mov rsi, [r15+8] add rsi, [rsp+0C8h+var_78] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rsi, qword ptr [rsp+0C8h+var_80] mov rdx, [rsp+0C8h+var_78] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rsi, [rsp+0C8h+var_60] mov rdx, [rsp+0C8h+var_58] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rsi, [r15] mov rdx, [r15+8] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+0C8h+var_60]; void * cmp rdi, r14 jz short loc_6FC8D mov rsi, [rsp+0C8h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6FC8D: lea rax, [rsp+0C8h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_6FCA8 mov rsi, [rsp+0C8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6FCA8: mov rdi, [rsp+0C8h+var_A0]; void * cmp rdi, r13 jz short loc_6FCBF mov rsi, [rsp+0C8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6FCBF: mov rdx, [rsp+0C8h+var_C0]; char * mov rdi, rbx; this mov esi, ebp; int call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_3::detail::exception::exception(int,char const*) lea rax, _ZTVN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; `vtable for'nlohmann::json_abi_v3_11_3::detail::out_of_range add rax, 10h mov [rbx], rax mov rdi, [rsp+0C8h+var_C0]; void * cmp rdi, r12 jz short loc_6FCF3 mov rsi, [rsp+0C8h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6FCF3: mov rax, rbx add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_0] cmp rdi, r12 jz short loc_6FD81 mov rsi, [rsp+arg_10] jmp short loc_6FD79 mov rbx, rax jmp short loc_6FD6A mov rbx, rax jmp short loc_6FD81 mov rbx, rdx mov r15, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_6FD43 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6FD43: lea rdi, [rsp+arg_60] lea rdx, [rsp+arg_40] lea r12, [rsp+arg_80] mov rsi, r14 mov rcx, r15 mov r8d, ebx mov r9, r12 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK__cold_1 mov rbx, [r12] loc_6FD6A: mov rdi, [rsp+arg_20]; void * cmp rdi, r13 jz short loc_6FD81 mov rsi, [rsp+arg_30] loc_6FD79: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6FD81: mov rdi, rbx call __Unwind_Resume
nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( nlohmann::json_abi_v3_11_3::detail::exception *this, int a2, _QWORD *a3) { char *v5[2]; // [rsp+8h] [rbp-C0h] BYREF _QWORD v6[2]; // [rsp+18h] [rbp-B0h] BYREF void *v7[2]; // [rsp+28h] [rbp-A0h] BYREF _QWORD v8[2]; // [rsp+38h] [rbp-90h] BYREF int v9[2]; // [rsp+48h] [rbp-80h] BYREF long long v10; // [rsp+50h] [rbp-78h] long long v11; // [rsp+58h] [rbp-70h] BYREF void *v12; // [rsp+68h] [rbp-60h] long long v13; // [rsp+70h] [rbp-58h] _QWORD v14[10]; // [rsp+78h] [rbp-50h] BYREF v7[0] = v8; std::string::_M_construct<char const*>(v7, "out_of_range", (long long)""); nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v9, (long long)v7, a2); v12 = v14; v13 = 0LL; LOBYTE(v14[0]) = 0; v5[0] = (char *)v6; v5[1] = 0LL; LOBYTE(v6[0]) = 0; std::string::reserve(v5, v10 + a3[1]); std::string::_M_append(v5, *(_QWORD *)v9); std::string::_M_append(v5, v12); std::string::_M_append(v5, *a3); if ( v12 != v14 ) operator delete(v12, v14[0] + 1LL); if ( *(long long **)v9 != &v11 ) operator delete(*(void **)v9, v11 + 1); if ( v7[0] != v8 ) operator delete(v7[0], v8[0] + 1LL); nlohmann::json_abi_v3_11_3::detail::exception::exception(this, a2, v5[0]); *(_QWORD *)this = &`vtable for'nlohmann::json_abi_v3_11_3::detail::out_of_range + 2; if ( (_QWORD *)v5[0] != v6 ) operator delete(v5[0], v6[0] + 1LL); return this; }
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV R15,RDX MOV EBP,ESI MOV RBX,RDI LEA R13,[RSP + 0x38] MOV qword ptr [R13 + -0x10],R13 LAB_0016fbdc: LEA RSI,[0x1adc0c] LEA RDX,[0x1adc18] LEA RDI,[RSP + 0x28] CALL 0x0011ca8a LAB_0016fbf4: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x28] MOV EDX,EBP CALL 0x0013e3bc LEA R14,[RSP + 0x78] MOV qword ptr [R14 + -0x10],R14 XOR EAX,EAX MOV qword ptr [R14 + -0x8],RAX MOV byte ptr [R14],AL LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 MOV qword ptr [R12 + -0x8],RAX MOV byte ptr [R12],AL MOV RSI,qword ptr [R15 + 0x8] ADD RSI,qword ptr [RSP + 0x50] LAB_0016fc33: LEA RDI,[RSP + 0x8] CALL 0x00118a20 MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] LEA RDI,[RSP + 0x8] CALL 0x001181d0 MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] LEA RDI,[RSP + 0x8] CALL 0x001181d0 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] LEA RDI,[RSP + 0x8] CALL 0x001181d0 MOV RDI,qword ptr [RSP + 0x68] CMP RDI,R14 JZ 0x0016fc8d MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x001186a0 LAB_0016fc8d: LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0016fca8 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x001186a0 LAB_0016fca8: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x0016fcbf MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001186a0 LAB_0016fcbf: MOV RDX,qword ptr [RSP + 0x8] LAB_0016fcc4: MOV RDI,RBX MOV ESI,EBP CALL 0x0013e5b8 LAB_0016fcce: LEA RAX,[0x1dd3c8] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x0016fcf3 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001186a0 LAB_0016fcf3: MOV RAX,RBX ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
exception * _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (exception *param_1,int param_2,ulong *param_3) { char *local_c0; int8 local_b8; char local_b0; int7 uStack_af; long *local_a0 [2]; long local_90 [2]; long *local_80 [2]; long local_70 [2]; int1 *local_60; int8 local_58; int1 local_50; int7 uStack_4f; /* try { // try from 0016fbdc to 0016fbf3 has its CatchHandler @ 0016fd21 */ local_a0[0] = local_90; std::__cxx11::string::_M_construct<char_const*>(local_a0,"out_of_range",""); /* try { // try from 0016fbf4 to 0016fc04 has its CatchHandler @ 0016fd1c */ nlohmann::json_abi_v3_11_3::detail::exception::name ((exception *)local_80,(string *)local_a0,param_2); local_58 = 0; local_50 = 0; local_b8 = 0; local_b0 = '\0'; /* try { // try from 0016fc33 to 0016fc75 has its CatchHandler @ 0016fd26 */ local_c0 = &local_b0; local_60 = &local_50; std::__cxx11::string::reserve((ulong)&local_c0); std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_80[0]); std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_60); std::__cxx11::string::_M_append((char *)&local_c0,*param_3); if (local_60 != &local_50) { operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1); } if (local_80[0] != local_70) { operator_delete(local_80[0],local_70[0] + 1); } if (local_a0[0] != local_90) { operator_delete(local_a0[0],local_90[0] + 1); } /* try { // try from 0016fcc4 to 0016fccd has its CatchHandler @ 0016fd08 */ nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,local_c0); *(int ***)param_1 = &PTR__exception_001dd3d8; if (local_c0 != &local_b0) { operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1); } return param_1; }
33,716
radix_sort_int
davidesantangelo[P]vsort/vsort.c
static void radix_sort_int(int arr[], int n) { if (n <= 1) return; // Find min and max to handle range and negative numbers int max_val = arr[0]; int min_val = arr[0]; for (int i = 1; i < n; i++) { if (arr[i] > max_val) max_val = arr[i]; if (arr[i] < min_val) min_val = arr[i]; } // Shift values to be non-negative for radix sort // Use unsigned int for intermediate calculations to avoid overflow with shift unsigned int *temp_arr = malloc(n * sizeof(unsigned int)); if (!temp_arr) { vsort_log_error("Memory allocation failed in radix_sort_int temp_arr, falling back to quicksort"); quicksort_int(arr, 0, n - 1); return; } unsigned int max_shifted = 0; long long current_val; // Use long long for intermediate addition unsigned int shift_amount = 0; // Determine shift amount carefully to avoid overflow if (min_val < 0) { // Need to shift by abs(min_val). Check if max_val + abs(min_val) overflows unsigned int current_val = (long long)max_val - (long long)min_val; // max_val + abs(min_val) if (current_val > UINT_MAX) { vsort_log_error("Radix sort range exceeds unsigned int capacity after shift, falling back to quicksort."); free(temp_arr); quicksort_int(arr, 0, n - 1); return; } shift_amount = (unsigned int)(-min_val); max_shifted = (unsigned int)current_val; } else { shift_amount = 0; max_shifted = (unsigned int)max_val; } // Apply shift for (int i = 0; i < n; ++i) { temp_arr[i] = (unsigned int)arr[i] + shift_amount; } // Temporary buffer for sorted output during passes unsigned int *output = malloc(n * sizeof(unsigned int)); if (!output) { vsort_log_error("Memory allocation failed in radix_sort_int output, falling back to quicksort"); free(temp_arr); quicksort_int(arr, 0, n - 1); return; } // Process 8 bits (1 byte) at a time const int bits_per_pass = 8; const int num_bins = 1 << bits_per_pass; // 256 bins const unsigned int mask = num_bins - 1; int count[256]; // Count array on stack // Determine number of passes needed based on max shifted value int passes = 0; if (max_shifted > 0) { // Calculate number of bits needed for max_shifted value using __builtin_clz int leading_zeros = __builtin_clz(max_shifted); int num_bits = sizeof(unsigned int) * 8 - leading_zeros; passes = (num_bits + bits_per_pass - 1) / bits_per_pass; // Ceiling division } else { passes = 1; // At least one pass even if all numbers are 0 after shift } if (passes <= 0) passes = 1; // Ensure at least one pass // LSD Radix Sort passes unsigned int *current_input = temp_arr; unsigned int *current_output = output; for (int p = 0; p < passes; ++p) { int bit_shift = p * bits_per_pass; // Clear count array memset(count, 0, sizeof(count)); // Count occurrences of each byte value from current_input for (int i = 0; i < n; i++) { unsigned int bin_index = (current_input[i] >> bit_shift) & mask; count[bin_index]++; } // Compute cumulative counts (prefix sum) for (int i = 1; i < num_bins; i++) { count[i] += count[i - 1]; } // Build the output array based on counts // Iterate backwards for stability for (int i = n - 1; i >= 0; i--) { unsigned int bin_index = (current_input[i] >> bit_shift) & mask; current_output[--count[bin_index]] = current_input[i]; // Place in correct sorted position } // Swap input and output buffers for the next pass unsigned int *swap_temp = current_input; current_input = current_output; current_output = swap_temp; } // The final sorted data is in current_input (which might be temp_arr or output) // Undo shift and copy back to original int array for (int i = 0; i < n; ++i) { arr[i] = (int)(current_input[i] - shift_amount); } free(temp_arr); // Free original temp buffer free(output); // Free the other buffer used for swapping }
O0
c
radix_sort_int: subq $0x4a8, %rsp # imm = 0x4A8 movq %rdi, 0x4a0(%rsp) movl %esi, 0x49c(%rsp) cmpl $0x1, 0x49c(%rsp) jg 0x2995 jmp 0x2e6e movq 0x4a0(%rsp), %rax movl (%rax), %eax movl %eax, 0x498(%rsp) movq 0x4a0(%rsp), %rax movl (%rax), %eax movl %eax, 0x494(%rsp) movl $0x1, 0x490(%rsp) movl 0x490(%rsp), %eax cmpl 0x49c(%rsp), %eax jge 0x2a5a movq 0x4a0(%rsp), %rax movslq 0x490(%rsp), %rcx movl (%rax,%rcx,4), %eax cmpl 0x498(%rsp), %eax jle 0x2a0c movq 0x4a0(%rsp), %rax movslq 0x490(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0x498(%rsp) movq 0x4a0(%rsp), %rax movslq 0x490(%rsp), %rcx movl (%rax,%rcx,4), %eax cmpl 0x494(%rsp), %eax jge 0x2a42 movq 0x4a0(%rsp), %rax movslq 0x490(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0x494(%rsp) jmp 0x2a44 movl 0x490(%rsp), %eax addl $0x1, %eax movl %eax, 0x490(%rsp) jmp 0x29c2 movslq 0x49c(%rsp), %rdi shlq $0x2, %rdi callq 0x1130 movq %rax, 0x488(%rsp) cmpq $0x0, 0x488(%rsp) jne 0x2aaa leaq 0x2c4b(%rip), %rdi # 0x56d0 movb $0x0, %al callq 0x4230 movq 0x4a0(%rsp), %rdi movl 0x49c(%rsp), %edx subl $0x1, %edx xorl %esi, %esi callq 0x2e80 jmp 0x2e6e movl $0x0, 0x484(%rsp) movl $0x0, 0x474(%rsp) cmpl $0x0, 0x494(%rsp) jge 0x2b52 movslq 0x498(%rsp), %rax movslq 0x494(%rsp), %rcx subq %rcx, %rax movq %rax, 0x478(%rsp) movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, 0x478(%rsp) jle 0x2b31 leaq 0x2c20(%rip), %rdi # 0x571f movb $0x0, %al callq 0x4230 movq 0x488(%rsp), %rdi callq 0x1030 movq 0x4a0(%rsp), %rdi movl 0x49c(%rsp), %edx subl $0x1, %edx xorl %esi, %esi callq 0x2e80 jmp 0x2e6e xorl %eax, %eax subl 0x494(%rsp), %eax movl %eax, 0x474(%rsp) movq 0x478(%rsp), %rax movl %eax, 0x484(%rsp) jmp 0x2b6b movl $0x0, 0x474(%rsp) movl 0x498(%rsp), %eax movl %eax, 0x484(%rsp) movl $0x0, 0x470(%rsp) movl 0x470(%rsp), %eax cmpl 0x49c(%rsp), %eax jge 0x2bc6 movq 0x4a0(%rsp), %rax movslq 0x470(%rsp), %rcx movl (%rax,%rcx,4), %edx addl 0x474(%rsp), %edx movq 0x488(%rsp), %rax movslq 0x470(%rsp), %rcx movl %edx, (%rax,%rcx,4) movl 0x470(%rsp), %eax addl $0x1, %eax movl %eax, 0x470(%rsp) jmp 0x2b76 movslq 0x49c(%rsp), %rdi shlq $0x2, %rdi callq 0x1130 movq %rax, 0x468(%rsp) cmpq $0x0, 0x468(%rsp) jne 0x2c23 leaq 0x2b85(%rip), %rdi # 0x5776 movb $0x0, %al callq 0x4230 movq 0x488(%rsp), %rdi callq 0x1030 movq 0x4a0(%rsp), %rdi movl 0x49c(%rsp), %edx subl $0x1, %edx xorl %esi, %esi callq 0x2e80 jmp 0x2e6e movl $0x8, 0x464(%rsp) movl $0x100, 0x460(%rsp) # imm = 0x100 movl $0xff, 0x45c(%rsp) movl $0x0, 0x4c(%rsp) cmpl $0x0, 0x484(%rsp) jbe 0x2c90 movl 0x484(%rsp), %eax bsrl %eax, %eax xorl $0x1f, %eax movl %eax, 0x48(%rsp) movslq 0x48(%rsp), %rcx movl $0x20, %eax subq %rcx, %rax movl %eax, 0x44(%rsp) movl 0x44(%rsp), %eax addl $0x8, %eax subl $0x1, %eax movl $0x8, %ecx cltd idivl %ecx movl %eax, 0x4c(%rsp) jmp 0x2c98 movl $0x1, 0x4c(%rsp) cmpl $0x0, 0x4c(%rsp) jg 0x2ca7 movl $0x1, 0x4c(%rsp) movq 0x488(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x468(%rsp), %rax movq %rax, 0x30(%rsp) movl $0x0, 0x2c(%rsp) movl 0x2c(%rsp), %eax cmpl 0x4c(%rsp), %eax jge 0x2e0e movl 0x2c(%rsp), %eax shll $0x3, %eax movl %eax, 0x28(%rsp) leaq 0x50(%rsp), %rdi xorl %esi, %esi movl $0x400, %edx # imm = 0x400 callq 0x10e0 movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax cmpl 0x49c(%rsp), %eax jge 0x2d40 movq 0x38(%rsp), %rax movslq 0x24(%rsp), %rcx movl (%rax,%rcx,4), %eax movl 0x28(%rsp), %ecx shrl %cl, %eax andl $0xff, %eax movl %eax, 0x20(%rsp) movl 0x20(%rsp), %eax movl 0x50(%rsp,%rax,4), %ecx addl $0x1, %ecx movl %ecx, 0x50(%rsp,%rax,4) movl 0x24(%rsp), %eax addl $0x1, %eax movl %eax, 0x24(%rsp) jmp 0x2cfb movl $0x1, 0x1c(%rsp) cmpl $0x100, 0x1c(%rsp) # imm = 0x100 jge 0x2d79 movl 0x1c(%rsp), %eax subl $0x1, %eax cltq movl 0x50(%rsp,%rax,4), %ecx movslq 0x1c(%rsp), %rax addl 0x50(%rsp,%rax,4), %ecx movl %ecx, 0x50(%rsp,%rax,4) movl 0x1c(%rsp), %eax addl $0x1, %eax movl %eax, 0x1c(%rsp) jmp 0x2d48 movl 0x49c(%rsp), %eax subl $0x1, %eax movl %eax, 0x18(%rsp) cmpl $0x0, 0x18(%rsp) jl 0x2de0 movq 0x38(%rsp), %rax movslq 0x18(%rsp), %rcx movl (%rax,%rcx,4), %eax movl 0x28(%rsp), %ecx shrl %cl, %eax andl $0xff, %eax movl %eax, 0x14(%rsp) movq 0x38(%rsp), %rax movslq 0x18(%rsp), %rcx movl (%rax,%rcx,4), %edx movq 0x30(%rsp), %rax movl 0x14(%rsp), %ecx movl %ecx, %esi movl 0x50(%rsp,%rsi,4), %ecx addl $-0x1, %ecx movl %ecx, 0x50(%rsp,%rsi,4) movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) movl 0x18(%rsp), %eax addl $-0x1, %eax movl %eax, 0x18(%rsp) jmp 0x2d87 movq 0x38(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x30(%rsp) movl 0x2c(%rsp), %eax addl $0x1, %eax movl %eax, 0x2c(%rsp) jmp 0x2cc9 movl $0x0, 0x4(%rsp) movl 0x4(%rsp), %eax cmpl 0x49c(%rsp), %eax jge 0x2e54 movq 0x38(%rsp), %rax movslq 0x4(%rsp), %rcx movl (%rax,%rcx,4), %edx subl 0x474(%rsp), %edx movq 0x4a0(%rsp), %rax movslq 0x4(%rsp), %rcx movl %edx, (%rax,%rcx,4) movl 0x4(%rsp), %eax addl $0x1, %eax movl %eax, 0x4(%rsp) jmp 0x2e16 movq 0x488(%rsp), %rdi callq 0x1030 movq 0x468(%rsp), %rdi callq 0x1030 addq $0x4a8, %rsp # imm = 0x4A8 retq nopw %cs:(%rax,%rax)
radix_sort_int: sub rsp, 4A8h mov [rsp+4A8h+var_8], rdi mov [rsp+4A8h+var_C], esi cmp [rsp+4A8h+var_C], 1 jg short loc_2995 jmp loc_2E6E loc_2995: mov rax, [rsp+4A8h+var_8] mov eax, [rax] mov [rsp+4A8h+var_10], eax mov rax, [rsp+4A8h+var_8] mov eax, [rax] mov [rsp+4A8h+var_14], eax mov [rsp+4A8h+var_18], 1 loc_29C2: mov eax, [rsp+4A8h+var_18] cmp eax, [rsp+4A8h+var_C] jge loc_2A5A mov rax, [rsp+4A8h+var_8] movsxd rcx, [rsp+4A8h+var_18] mov eax, [rax+rcx*4] cmp eax, [rsp+4A8h+var_10] jle short loc_2A0C mov rax, [rsp+4A8h+var_8] movsxd rcx, [rsp+4A8h+var_18] mov eax, [rax+rcx*4] mov [rsp+4A8h+var_10], eax loc_2A0C: mov rax, [rsp+4A8h+var_8] movsxd rcx, [rsp+4A8h+var_18] mov eax, [rax+rcx*4] cmp eax, [rsp+4A8h+var_14] jge short loc_2A42 mov rax, [rsp+4A8h+var_8] movsxd rcx, [rsp+4A8h+var_18] mov eax, [rax+rcx*4] mov [rsp+4A8h+var_14], eax loc_2A42: jmp short $+2 loc_2A44: mov eax, [rsp+4A8h+var_18] add eax, 1 mov [rsp+4A8h+var_18], eax jmp loc_29C2 loc_2A5A: movsxd rdi, [rsp+4A8h+var_C] shl rdi, 2 call _malloc mov [rsp+4A8h+var_20], rax cmp [rsp+4A8h+var_20], 0 jnz short loc_2AAA lea rdi, aMemoryAllocati_0; "Memory allocation failed in radix_sort_"... mov al, 0 call vsort_log_error mov rdi, [rsp+4A8h+var_8] mov edx, [rsp+4A8h+var_C] sub edx, 1 xor esi, esi call quicksort_int jmp loc_2E6E loc_2AAA: mov [rsp+4A8h+var_24], 0 mov [rsp+4A8h+var_34], 0 cmp [rsp+4A8h+var_14], 0 jge loc_2B52 movsxd rax, [rsp+4A8h+var_10] movsxd rcx, [rsp+4A8h+var_14] sub rax, rcx mov [rsp+4A8h+var_30], rax mov eax, 0FFFFFFFFh cmp [rsp+4A8h+var_30], rax jle short loc_2B31 lea rdi, aRadixSortRange; "Radix sort range exceeds unsigned int c"... mov al, 0 call vsort_log_error mov rdi, [rsp+4A8h+var_20] call _free mov rdi, [rsp+4A8h+var_8] mov edx, [rsp+4A8h+var_C] sub edx, 1 xor esi, esi call quicksort_int jmp loc_2E6E loc_2B31: xor eax, eax sub eax, [rsp+4A8h+var_14] mov [rsp+4A8h+var_34], eax mov rax, [rsp+4A8h+var_30] mov [rsp+4A8h+var_24], eax jmp short loc_2B6B loc_2B52: mov [rsp+4A8h+var_34], 0 mov eax, [rsp+4A8h+var_10] mov [rsp+4A8h+var_24], eax loc_2B6B: mov [rsp+4A8h+var_38], 0 loc_2B76: mov eax, [rsp+4A8h+var_38] cmp eax, [rsp+4A8h+var_C] jge short loc_2BC6 mov rax, [rsp+4A8h+var_8] movsxd rcx, [rsp+4A8h+var_38] mov edx, [rax+rcx*4] add edx, [rsp+4A8h+var_34] mov rax, [rsp+4A8h+var_20] movsxd rcx, [rsp+4A8h+var_38] mov [rax+rcx*4], edx mov eax, [rsp+4A8h+var_38] add eax, 1 mov [rsp+4A8h+var_38], eax jmp short loc_2B76 loc_2BC6: movsxd rdi, [rsp+4A8h+var_C] shl rdi, 2 call _malloc mov [rsp+4A8h+var_40], rax cmp [rsp+4A8h+var_40], 0 jnz short loc_2C23 lea rdi, aMemoryAllocati_1; "Memory allocation failed in radix_sort_"... mov al, 0 call vsort_log_error mov rdi, [rsp+4A8h+var_20] call _free mov rdi, [rsp+4A8h+var_8] mov edx, [rsp+4A8h+var_C] sub edx, 1 xor esi, esi call quicksort_int jmp loc_2E6E loc_2C23: mov [rsp+4A8h+var_44], 8 mov [rsp+4A8h+var_48], 100h mov [rsp+4A8h+var_4C], 0FFh mov [rsp+4A8h+var_45C], 0 cmp [rsp+4A8h+var_24], 0 jbe short loc_2C90 mov eax, [rsp+4A8h+var_24] bsr eax, eax xor eax, 1Fh mov [rsp+4A8h+var_460], eax movsxd rcx, [rsp+4A8h+var_460] mov eax, 20h ; ' ' sub rax, rcx mov [rsp+4A8h+var_464], eax mov eax, [rsp+4A8h+var_464] add eax, 8 sub eax, 1 mov ecx, 8 cdq idiv ecx mov [rsp+4A8h+var_45C], eax jmp short loc_2C98 loc_2C90: mov [rsp+4A8h+var_45C], 1 loc_2C98: cmp [rsp+4A8h+var_45C], 0 jg short loc_2CA7 mov [rsp+4A8h+var_45C], 1 loc_2CA7: mov rax, [rsp+4A8h+var_20] mov [rsp+4A8h+var_470], rax mov rax, [rsp+4A8h+var_40] mov [rsp+4A8h+var_478], rax mov [rsp+4A8h+var_47C], 0 loc_2CC9: mov eax, [rsp+4A8h+var_47C] cmp eax, [rsp+4A8h+var_45C] jge loc_2E0E mov eax, [rsp+4A8h+var_47C] shl eax, 3 mov [rsp+4A8h+var_480], eax lea rdi, [rsp+4A8h+var_458] xor esi, esi mov edx, 400h call _memset mov [rsp+4A8h+var_484], 0 loc_2CFB: mov eax, [rsp+4A8h+var_484] cmp eax, [rsp+4A8h+var_C] jge short loc_2D40 mov rax, [rsp+4A8h+var_470] movsxd rcx, [rsp+4A8h+var_484] mov eax, [rax+rcx*4] mov ecx, [rsp+4A8h+var_480] shr eax, cl and eax, 0FFh mov [rsp+4A8h+var_488], eax mov eax, [rsp+4A8h+var_488] mov ecx, [rsp+rax*4+4A8h+var_458] add ecx, 1 mov [rsp+rax*4+4A8h+var_458], ecx mov eax, [rsp+4A8h+var_484] add eax, 1 mov [rsp+4A8h+var_484], eax jmp short loc_2CFB loc_2D40: mov [rsp+4A8h+var_48C], 1 loc_2D48: cmp [rsp+4A8h+var_48C], 100h jge short loc_2D79 mov eax, [rsp+4A8h+var_48C] sub eax, 1 cdqe mov ecx, [rsp+rax*4+4A8h+var_458] movsxd rax, [rsp+4A8h+var_48C] add ecx, [rsp+rax*4+4A8h+var_458] mov [rsp+rax*4+4A8h+var_458], ecx mov eax, [rsp+4A8h+var_48C] add eax, 1 mov [rsp+4A8h+var_48C], eax jmp short loc_2D48 loc_2D79: mov eax, [rsp+4A8h+var_C] sub eax, 1 mov [rsp+4A8h+var_490], eax loc_2D87: cmp [rsp+4A8h+var_490], 0 jl short loc_2DE0 mov rax, [rsp+4A8h+var_470] movsxd rcx, [rsp+4A8h+var_490] mov eax, [rax+rcx*4] mov ecx, [rsp+4A8h+var_480] shr eax, cl and eax, 0FFh mov [rsp+4A8h+var_494], eax mov rax, [rsp+4A8h+var_470] movsxd rcx, [rsp+4A8h+var_490] mov edx, [rax+rcx*4] mov rax, [rsp+4A8h+var_478] mov ecx, [rsp+4A8h+var_494] mov esi, ecx mov ecx, [rsp+rsi*4+4A8h+var_458] add ecx, 0FFFFFFFFh mov [rsp+rsi*4+4A8h+var_458], ecx movsxd rcx, ecx mov [rax+rcx*4], edx mov eax, [rsp+4A8h+var_490] add eax, 0FFFFFFFFh mov [rsp+4A8h+var_490], eax jmp short loc_2D87 loc_2DE0: mov rax, [rsp+4A8h+var_470] mov [rsp+4A8h+var_4A0], rax mov rax, [rsp+4A8h+var_478] mov [rsp+4A8h+var_470], rax mov rax, [rsp+4A8h+var_4A0] mov [rsp+4A8h+var_478], rax mov eax, [rsp+4A8h+var_47C] add eax, 1 mov [rsp+4A8h+var_47C], eax jmp loc_2CC9 loc_2E0E: mov [rsp+4A8h+var_4A4], 0 loc_2E16: mov eax, [rsp+4A8h+var_4A4] cmp eax, [rsp+4A8h+var_C] jge short loc_2E54 mov rax, [rsp+4A8h+var_470] movsxd rcx, [rsp+4A8h+var_4A4] mov edx, [rax+rcx*4] sub edx, [rsp+4A8h+var_34] mov rax, [rsp+4A8h+var_8] movsxd rcx, [rsp+4A8h+var_4A4] mov [rax+rcx*4], edx mov eax, [rsp+4A8h+var_4A4] add eax, 1 mov [rsp+4A8h+var_4A4], eax jmp short loc_2E16 loc_2E54: mov rdi, [rsp+4A8h+var_20] call _free mov rdi, [rsp+4A8h+var_40] call _free loc_2E6E: add rsp, 4A8h retn
void radix_sort_int(signed int *a1, int a2) { int v2; // edx int v3; // ecx int v4; // r8d int v5; // r9d int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d unsigned int v10; // eax unsigned int v11; // edx int v12; // ecx int jj; // [rsp+4h] [rbp-4A4h] long long v14; // [rsp+8h] [rbp-4A0h] int ii; // [rsp+18h] [rbp-490h] int n; // [rsp+1Ch] [rbp-48Ch] int m; // [rsp+24h] [rbp-484h] char v18; // [rsp+28h] [rbp-480h] int k; // [rsp+2Ch] [rbp-47Ch] long long v20; // [rsp+30h] [rbp-478h] long long v21; // [rsp+38h] [rbp-470h] int v22; // [rsp+4Ch] [rbp-45Ch] _DWORD v23[262]; // [rsp+50h] [rbp-458h] BYREF long long v24; // [rsp+468h] [rbp-40h] int j; // [rsp+470h] [rbp-38h] int v26; // [rsp+474h] [rbp-34h] long long v27; // [rsp+478h] [rbp-30h] unsigned int v28; // [rsp+484h] [rbp-24h] long long v29; // [rsp+488h] [rbp-20h] int i; // [rsp+490h] [rbp-18h] int v31; // [rsp+494h] [rbp-14h] signed int v32; // [rsp+498h] [rbp-10h] int v33; // [rsp+49Ch] [rbp-Ch] signed int *v34; // [rsp+4A0h] [rbp-8h] v34 = a1; v33 = a2; if ( a2 > 1 ) { v32 = *v34; v31 = *v34; for ( i = 1; i < v33; ++i ) { if ( v34[i] > v32 ) v32 = v34[i]; if ( v34[i] < v31 ) v31 = v34[i]; } v29 = malloc(4LL * v33); if ( !v29 ) { vsort_log_error( (unsigned int)"Memory allocation failed in radix_sort_int temp_arr, falling back to quicksort", a2, v2, v3, v4, v5); quicksort_int(v34, 0LL, (unsigned int)(v33 - 1)); return; } v28 = 0; v26 = 0; if ( v31 >= 0 ) { v26 = 0; v28 = v32; } else { v27 = v32 - (long long)v31; if ( v27 > 0xFFFFFFFFLL ) { vsort_log_error( (unsigned int)"Radix sort range exceeds unsigned int capacity after shift, falling back to quicksort.", a2, v2, v31, v4, v5); free(v29); quicksort_int(v34, 0LL, (unsigned int)(v33 - 1)); return; } v26 = -v31; v28 = v27; } for ( j = 0; j < v33; ++j ) *(_DWORD *)(v29 + 4LL * j) = v26 + v34[j]; v24 = malloc(4LL * v33); if ( v24 ) { v23[261] = 8; v23[260] = 256; v23[259] = 255; if ( v28 ) { _BitScanReverse(&v10, v28); v22 = (int)(32 - (v10 ^ 0x1F) + 7) / 8; } else { v22 = 1; } if ( v22 <= 0 ) v22 = 1; v21 = v29; v20 = v24; for ( k = 0; k < v22; ++k ) { v18 = 8 * k; memset(v23, 0LL, 1024LL); for ( m = 0; m < v33; ++m ) ++v23[(unsigned __int8)(*(_DWORD *)(v21 + 4LL * m) >> v18)]; for ( n = 1; n < 256; ++n ) v23[n] += v23[n - 1]; for ( ii = v33 - 1; ii >= 0; --ii ) { v11 = *(_DWORD *)(v21 + 4LL * ii); v12 = v23[(unsigned __int8)(v11 >> v18)] - 1; v23[(unsigned __int8)(v11 >> v18)] = v12; *(_DWORD *)(v20 + 4LL * v12) = v11; } v14 = v21; v21 = v20; v20 = v14; } for ( jj = 0; jj < v33; ++jj ) v34[jj] = *(_DWORD *)(v21 + 4LL * jj) - v26; free(v29); free(v24); } else { vsort_log_error( (unsigned int)"Memory allocation failed in radix_sort_int output, falling back to quicksort", a2, v6, v7, v8, v9); free(v29); quicksort_int(v34, 0LL, (unsigned int)(v33 - 1)); } } }
radix_sort_int: SUB RSP,0x4a8 MOV qword ptr [RSP + 0x4a0],RDI MOV dword ptr [RSP + 0x49c],ESI CMP dword ptr [RSP + 0x49c],0x1 JG 0x00102995 JMP 0x00102e6e LAB_00102995: MOV RAX,qword ptr [RSP + 0x4a0] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x498],EAX MOV RAX,qword ptr [RSP + 0x4a0] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x494],EAX MOV dword ptr [RSP + 0x490],0x1 LAB_001029c2: MOV EAX,dword ptr [RSP + 0x490] CMP EAX,dword ptr [RSP + 0x49c] JGE 0x00102a5a MOV RAX,qword ptr [RSP + 0x4a0] MOVSXD RCX,dword ptr [RSP + 0x490] MOV EAX,dword ptr [RAX + RCX*0x4] CMP EAX,dword ptr [RSP + 0x498] JLE 0x00102a0c MOV RAX,qword ptr [RSP + 0x4a0] MOVSXD RCX,dword ptr [RSP + 0x490] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x498],EAX LAB_00102a0c: MOV RAX,qword ptr [RSP + 0x4a0] MOVSXD RCX,dword ptr [RSP + 0x490] MOV EAX,dword ptr [RAX + RCX*0x4] CMP EAX,dword ptr [RSP + 0x494] JGE 0x00102a42 MOV RAX,qword ptr [RSP + 0x4a0] MOVSXD RCX,dword ptr [RSP + 0x490] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x494],EAX LAB_00102a42: JMP 0x00102a44 LAB_00102a44: MOV EAX,dword ptr [RSP + 0x490] ADD EAX,0x1 MOV dword ptr [RSP + 0x490],EAX JMP 0x001029c2 LAB_00102a5a: MOVSXD RDI,dword ptr [RSP + 0x49c] SHL RDI,0x2 CALL 0x00101130 MOV qword ptr [RSP + 0x488],RAX CMP qword ptr [RSP + 0x488],0x0 JNZ 0x00102aaa LEA RDI,[0x1056d0] MOV AL,0x0 CALL 0x00104230 MOV RDI,qword ptr [RSP + 0x4a0] MOV EDX,dword ptr [RSP + 0x49c] SUB EDX,0x1 XOR ESI,ESI CALL 0x00102e80 JMP 0x00102e6e LAB_00102aaa: MOV dword ptr [RSP + 0x484],0x0 MOV dword ptr [RSP + 0x474],0x0 CMP dword ptr [RSP + 0x494],0x0 JGE 0x00102b52 MOVSXD RAX,dword ptr [RSP + 0x498] MOVSXD RCX,dword ptr [RSP + 0x494] SUB RAX,RCX MOV qword ptr [RSP + 0x478],RAX MOV EAX,0xffffffff CMP qword ptr [RSP + 0x478],RAX JLE 0x00102b31 LEA RDI,[0x10571f] MOV AL,0x0 CALL 0x00104230 MOV RDI,qword ptr [RSP + 0x488] CALL 0x00101030 MOV RDI,qword ptr [RSP + 0x4a0] MOV EDX,dword ptr [RSP + 0x49c] SUB EDX,0x1 XOR ESI,ESI CALL 0x00102e80 JMP 0x00102e6e LAB_00102b31: XOR EAX,EAX SUB EAX,dword ptr [RSP + 0x494] MOV dword ptr [RSP + 0x474],EAX MOV RAX,qword ptr [RSP + 0x478] MOV dword ptr [RSP + 0x484],EAX JMP 0x00102b6b LAB_00102b52: MOV dword ptr [RSP + 0x474],0x0 MOV EAX,dword ptr [RSP + 0x498] MOV dword ptr [RSP + 0x484],EAX LAB_00102b6b: MOV dword ptr [RSP + 0x470],0x0 LAB_00102b76: MOV EAX,dword ptr [RSP + 0x470] CMP EAX,dword ptr [RSP + 0x49c] JGE 0x00102bc6 MOV RAX,qword ptr [RSP + 0x4a0] MOVSXD RCX,dword ptr [RSP + 0x470] MOV EDX,dword ptr [RAX + RCX*0x4] ADD EDX,dword ptr [RSP + 0x474] MOV RAX,qword ptr [RSP + 0x488] MOVSXD RCX,dword ptr [RSP + 0x470] MOV dword ptr [RAX + RCX*0x4],EDX MOV EAX,dword ptr [RSP + 0x470] ADD EAX,0x1 MOV dword ptr [RSP + 0x470],EAX JMP 0x00102b76 LAB_00102bc6: MOVSXD RDI,dword ptr [RSP + 0x49c] SHL RDI,0x2 CALL 0x00101130 MOV qword ptr [RSP + 0x468],RAX CMP qword ptr [RSP + 0x468],0x0 JNZ 0x00102c23 LEA RDI,[0x105776] MOV AL,0x0 CALL 0x00104230 MOV RDI,qword ptr [RSP + 0x488] CALL 0x00101030 MOV RDI,qword ptr [RSP + 0x4a0] MOV EDX,dword ptr [RSP + 0x49c] SUB EDX,0x1 XOR ESI,ESI CALL 0x00102e80 JMP 0x00102e6e LAB_00102c23: MOV dword ptr [RSP + 0x464],0x8 MOV dword ptr [RSP + 0x460],0x100 MOV dword ptr [RSP + 0x45c],0xff MOV dword ptr [RSP + 0x4c],0x0 CMP dword ptr [RSP + 0x484],0x0 JBE 0x00102c90 MOV EAX,dword ptr [RSP + 0x484] BSR EAX,EAX XOR EAX,0x1f MOV dword ptr [RSP + 0x48],EAX MOVSXD RCX,dword ptr [RSP + 0x48] MOV EAX,0x20 SUB RAX,RCX MOV dword ptr [RSP + 0x44],EAX MOV EAX,dword ptr [RSP + 0x44] ADD EAX,0x8 SUB EAX,0x1 MOV ECX,0x8 CDQ IDIV ECX MOV dword ptr [RSP + 0x4c],EAX JMP 0x00102c98 LAB_00102c90: MOV dword ptr [RSP + 0x4c],0x1 LAB_00102c98: CMP dword ptr [RSP + 0x4c],0x0 JG 0x00102ca7 MOV dword ptr [RSP + 0x4c],0x1 LAB_00102ca7: MOV RAX,qword ptr [RSP + 0x488] MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0x468] MOV qword ptr [RSP + 0x30],RAX MOV dword ptr [RSP + 0x2c],0x0 LAB_00102cc9: MOV EAX,dword ptr [RSP + 0x2c] CMP EAX,dword ptr [RSP + 0x4c] JGE 0x00102e0e MOV EAX,dword ptr [RSP + 0x2c] SHL EAX,0x3 MOV dword ptr [RSP + 0x28],EAX LEA RDI,[RSP + 0x50] XOR ESI,ESI MOV EDX,0x400 CALL 0x001010e0 MOV dword ptr [RSP + 0x24],0x0 LAB_00102cfb: MOV EAX,dword ptr [RSP + 0x24] CMP EAX,dword ptr [RSP + 0x49c] JGE 0x00102d40 MOV RAX,qword ptr [RSP + 0x38] MOVSXD RCX,dword ptr [RSP + 0x24] MOV EAX,dword ptr [RAX + RCX*0x4] MOV ECX,dword ptr [RSP + 0x28] SHR EAX,CL AND EAX,0xff MOV dword ptr [RSP + 0x20],EAX MOV EAX,dword ptr [RSP + 0x20] MOV ECX,dword ptr [RSP + RAX*0x4 + 0x50] ADD ECX,0x1 MOV dword ptr [RSP + RAX*0x4 + 0x50],ECX MOV EAX,dword ptr [RSP + 0x24] ADD EAX,0x1 MOV dword ptr [RSP + 0x24],EAX JMP 0x00102cfb LAB_00102d40: MOV dword ptr [RSP + 0x1c],0x1 LAB_00102d48: CMP dword ptr [RSP + 0x1c],0x100 JGE 0x00102d79 MOV EAX,dword ptr [RSP + 0x1c] SUB EAX,0x1 CDQE MOV ECX,dword ptr [RSP + RAX*0x4 + 0x50] MOVSXD RAX,dword ptr [RSP + 0x1c] ADD ECX,dword ptr [RSP + RAX*0x4 + 0x50] MOV dword ptr [RSP + RAX*0x4 + 0x50],ECX MOV EAX,dword ptr [RSP + 0x1c] ADD EAX,0x1 MOV dword ptr [RSP + 0x1c],EAX JMP 0x00102d48 LAB_00102d79: MOV EAX,dword ptr [RSP + 0x49c] SUB EAX,0x1 MOV dword ptr [RSP + 0x18],EAX LAB_00102d87: CMP dword ptr [RSP + 0x18],0x0 JL 0x00102de0 MOV RAX,qword ptr [RSP + 0x38] MOVSXD RCX,dword ptr [RSP + 0x18] MOV EAX,dword ptr [RAX + RCX*0x4] MOV ECX,dword ptr [RSP + 0x28] SHR EAX,CL AND EAX,0xff MOV dword ptr [RSP + 0x14],EAX MOV RAX,qword ptr [RSP + 0x38] MOVSXD RCX,dword ptr [RSP + 0x18] MOV EDX,dword ptr [RAX + RCX*0x4] MOV RAX,qword ptr [RSP + 0x30] MOV ECX,dword ptr [RSP + 0x14] MOV ESI,ECX MOV ECX,dword ptr [RSP + RSI*0x4 + 0x50] ADD ECX,-0x1 MOV dword ptr [RSP + RSI*0x4 + 0x50],ECX MOVSXD RCX,ECX MOV dword ptr [RAX + RCX*0x4],EDX MOV EAX,dword ptr [RSP + 0x18] ADD EAX,-0x1 MOV dword ptr [RSP + 0x18],EAX JMP 0x00102d87 LAB_00102de0: MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x30],RAX MOV EAX,dword ptr [RSP + 0x2c] ADD EAX,0x1 MOV dword ptr [RSP + 0x2c],EAX JMP 0x00102cc9 LAB_00102e0e: MOV dword ptr [RSP + 0x4],0x0 LAB_00102e16: MOV EAX,dword ptr [RSP + 0x4] CMP EAX,dword ptr [RSP + 0x49c] JGE 0x00102e54 MOV RAX,qword ptr [RSP + 0x38] MOVSXD RCX,dword ptr [RSP + 0x4] MOV EDX,dword ptr [RAX + RCX*0x4] SUB EDX,dword ptr [RSP + 0x474] MOV RAX,qword ptr [RSP + 0x4a0] MOVSXD RCX,dword ptr [RSP + 0x4] MOV dword ptr [RAX + RCX*0x4],EDX MOV EAX,dword ptr [RSP + 0x4] ADD EAX,0x1 MOV dword ptr [RSP + 0x4],EAX JMP 0x00102e16 LAB_00102e54: MOV RDI,qword ptr [RSP + 0x488] CALL 0x00101030 MOV RDI,qword ptr [RSP + 0x468] CALL 0x00101030 LAB_00102e6e: ADD RSP,0x4a8 RET
void radix_sort_int(uint *param_1,int param_2) { int4 uVar1; int iVar2; void *pvVar3; uint uVar4; byte bVar5; int iStack_4a4; int iStack_490; int iStack_48c; int iStack_484; int iStack_47c; void *pvStack_478; void *pvStack_470; int local_45c; int aiStack_458 [259]; int4 local_4c; int4 local_48; int4 local_44; void *local_40; int local_38; int local_34; long local_30; uint local_24; void *local_20; int local_18; uint local_14; uint local_10; int local_c; uint *local_8; if (1 < param_2) { local_10 = *param_1; local_14 = *param_1; for (local_18 = 1; local_18 < param_2; local_18 = local_18 + 1) { if ((int)local_10 < (int)param_1[local_18]) { local_10 = param_1[local_18]; } if ((int)param_1[local_18] < (int)local_14) { local_14 = param_1[local_18]; } } local_c = param_2; local_8 = param_1; local_20 = malloc((long)param_2 << 2); if (local_20 == (void *)0x0) { vsort_log_error( "Memory allocation failed in radix_sort_int temp_arr, falling back to quicksort" ); quicksort_int(local_8,0,local_c + -1); } else { local_24 = 0; local_34 = 0; if ((int)local_14 < 0) { local_30 = (long)(int)local_10 - (long)(int)local_14; if (0xffffffff < local_30) { vsort_log_error( "Radix sort range exceeds unsigned int capacity after shift, falling back to quicksort." ); free(local_20); quicksort_int(local_8,0,local_c + -1); return; } local_34 = -local_14; local_24 = (uint)local_30; } else { local_34 = 0; local_24 = local_10; } for (local_38 = 0; local_38 < local_c; local_38 = local_38 + 1) { *(uint *)((long)local_20 + (long)local_38 * 4) = local_8[local_38] + local_34; } pvStack_478 = malloc((long)local_c << 2); local_40 = pvStack_478; if (pvStack_478 == (void *)0x0) { vsort_log_error( "Memory allocation failed in radix_sort_int output, falling back to quicksort" ); free(local_20); quicksort_int(local_8,0,local_c + -1); } else { local_44 = 8; local_48 = 0x100; local_4c = 0xff; if (local_24 == 0) { local_45c = 1; } else { uVar4 = 0x1f; if (local_24 != 0) { for (; local_24 >> uVar4 == 0; uVar4 = uVar4 - 1) { } } local_45c = (int)(0x27 - (uVar4 ^ 0x1f)) / 8; } if (local_45c < 1) { local_45c = 1; } pvStack_470 = local_20; for (iStack_47c = 0; iStack_47c < local_45c; iStack_47c = iStack_47c + 1) { memset(aiStack_458,0,0x400); for (iStack_484 = 0; bVar5 = (byte)(iStack_47c << 3), iStack_484 < local_c; iStack_484 = iStack_484 + 1) { uVar4 = *(uint *)((long)pvStack_470 + (long)iStack_484 * 4) >> (bVar5 & 0x1f) & 0xff; aiStack_458[uVar4] = aiStack_458[uVar4] + 1; } for (iStack_48c = 1; iStack_490 = local_c, iStack_48c < 0x100; iStack_48c = iStack_48c + 1 ) { aiStack_458[iStack_48c] = aiStack_458[iStack_48c + -1] + aiStack_458[iStack_48c]; } while (iStack_490 = iStack_490 + -1, -1 < iStack_490) { uVar4 = *(uint *)((long)pvStack_470 + (long)iStack_490 * 4) >> (bVar5 & 0x1f) & 0xff; uVar1 = *(int4 *)((long)pvStack_470 + (long)iStack_490 * 4); iVar2 = aiStack_458[uVar4]; aiStack_458[uVar4] = iVar2 + -1; *(int4 *)((long)pvStack_478 + (long)(iVar2 + -1) * 4) = uVar1; } pvVar3 = pvStack_478; pvStack_478 = pvStack_470; pvStack_470 = pvVar3; } for (iStack_4a4 = 0; iStack_4a4 < local_c; iStack_4a4 = iStack_4a4 + 1) { local_8[iStack_4a4] = *(int *)((long)pvStack_470 + (long)iStack_4a4 * 4) - local_34; } free(local_20); free(local_40); } } } return; }
33,717
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> 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>::insert_iterator<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::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> 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> const&)
monkey531[P]llama/common/json.hpp
iterator insert_iterator(const_iterator pos, Args&& ... args) { iterator result(this); JSON_ASSERT(m_data.m_value.array != nullptr); auto insert_pos = std::distance(m_data.m_value.array->begin(), pos.m_it.array_iterator); m_data.m_value.array->insert(pos.m_it.array_iterator, std::forward<Args>(args)...); result.m_it.array_iterator = m_data.m_value.array->begin() + insert_pos; // This could have been written as: // result.m_it.array_iterator = m_data.m_value.array->insert(pos.m_it.array_iterator, cnt, val); // but the return value of insert is missing in GCC 4.8, so it is written this way instead. set_parents(); return result; }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> 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>::insert_iterator<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::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> 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> const&): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rsi, (%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rdi) movq %rax, 0x18(%rdi) movzbl (%rsi), %esi cmpl $0x2, %esi je 0xaa9f1 cmpl $0x1, %esi jne 0xaa9fb leaq 0x8(%rbx), %rax movq $0x0, (%rax) jmp 0xaa9ff movq $0x0, 0x10(%rbx) jmp 0xaa9ff movq %rax, 0x18(%rbx) movq 0x8(%r14), %rdi testq %rdi, %rdi je 0xaaa2e movq 0x10(%rdx), %rsi movq %rsi, %r15 subq (%rdi), %r15 movq %rcx, %rdx callq 0xaaad8 movq 0x8(%r14), %rax addq (%rax), %r15 movq %r15, 0x10(%rbx) movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq leaq 0x421a4(%rip), %rdi # 0xecbd9 leaq 0x421e7(%rip), %rdx # 0xecc23 leaq 0x42270(%rip), %rcx # 0xeccb3 movl $0x582c, %esi # imm = 0x582C xorl %eax, %eax callq 0x1ae30
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE15insert_iteratorIJRKSD_EEENS0_6detail9iter_implISD_EENSI_ISF_EEDpOT_: push r15 push r14 push rbx mov r14, rsi mov rbx, rdi mov rax, 8000000000000000h mov [rdi], rsi xorps xmm0, xmm0 movups xmmword ptr [rdi+8], xmm0 mov [rdi+18h], rax movzx esi, byte ptr [rsi] cmp esi, 2 jz short loc_AA9F1 cmp esi, 1 jnz short loc_AA9FB lea rax, [rbx+8] mov qword ptr [rax], 0 jmp short loc_AA9FF loc_AA9F1: mov qword ptr [rbx+10h], 0 jmp short loc_AA9FF loc_AA9FB: mov [rbx+18h], rax loc_AA9FF: mov rdi, [r14+8] test rdi, rdi jz short loc_AAA2E mov rsi, [rdx+10h] mov r15, rsi sub r15, [rdi] mov rdx, rcx call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE6insertEN9__gnu_cxx17__normal_iteratorIPKSD_SF_EERSI_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::insert(__gnu_cxx::__normal_iterator<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*,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rax, [r14+8] add r15, [rax] mov [rbx+10h], r15 mov rax, rbx pop rbx pop r14 pop r15 retn loc_AAA2E: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMDataMTypeValu_0+23h; "m_data.m_value.array != nullptr" mov esi, 582Ch xor eax, eax call _ggml_abort
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&>( long long a1, unsigned __int8 *a2, long long a3, long long a4) { int v6; // esi _QWORD *v7; // rdi long long v8; // r15 *(_QWORD *)a1 = a2; *(_OWORD *)(a1 + 8) = 0LL; *(_QWORD *)(a1 + 24) = 0x8000000000000000LL; v6 = *a2; if ( v6 == 2 ) { *(_QWORD *)(a1 + 16) = 0LL; } else if ( v6 == 1 ) { *(_QWORD *)(a1 + 8) = 0LL; } else { *(_QWORD *)(a1 + 24) = 0x8000000000000000LL; } v7 = (_QWORD *)*((_QWORD *)a2 + 1); if ( v7 ) { v8 = *(_QWORD *)(a3 + 16) - *v7; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::insert( v7, *(_QWORD *)(a3 + 16), a4); *(_QWORD *)(a1 + 16) = **((_QWORD **)a2 + 1) + v8; return a1; } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 22572LL, "GGML_ASSERT(%s) failed", "m_data.m_value.array != nullptr"); return nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 22572LL); } }
insert_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&>: PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI MOV RAX,-0x8000000000000000 MOV qword ptr [RDI],RSI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x8],XMM0 MOV qword ptr [RDI + 0x18],RAX MOVZX ESI,byte ptr [RSI] CMP ESI,0x2 JZ 0x001aa9f1 CMP ESI,0x1 JNZ 0x001aa9fb LEA RAX,[RBX + 0x8] MOV qword ptr [RAX],0x0 JMP 0x001aa9ff LAB_001aa9f1: MOV qword ptr [RBX + 0x10],0x0 JMP 0x001aa9ff LAB_001aa9fb: MOV qword ptr [RBX + 0x18],RAX LAB_001aa9ff: MOV RDI,qword ptr [R14 + 0x8] TEST RDI,RDI JZ 0x001aaa2e MOV RSI,qword ptr [RDX + 0x10] MOV R15,RSI SUB R15,qword ptr [RDI] MOV RDX,RCX CALL 0x001aaad8 MOV RAX,qword ptr [R14 + 0x8] ADD R15,qword ptr [RAX] MOV qword ptr [RBX + 0x10],R15 MOV RAX,RBX POP RBX POP R14 POP R15 RET LAB_001aaa2e: LEA RDI,[0x1ecbd9] LEA RDX,[0x1ecc23] LEA RCX,[0x1eccb3] MOV ESI,0x582c XOR EAX,EAX CALL 0x0011ae30
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::insert_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&>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&) */ int8 * nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> :: insert_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&> (int8 *param_1,char *param_2,long param_3,int8 param_4) { 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>>> *pvVar1; long lVar2; long lVar3; *param_1 = param_2; param_1[1] = 0; param_1[2] = 0; param_1[3] = 0x8000000000000000; if (*param_2 == '\x02') { param_1[2] = 0; } else if (*param_2 == '\x01') { param_1[1] = 0; } else { param_1[3] = 0x8000000000000000; } pvVar1 = *(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_2 + 8); if (pvVar1 != (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>>> *)0x0) { lVar2 = *(long *)(param_3 + 0x10); lVar3 = *(long *)pvVar1; 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>>> ::insert(pvVar1,lVar2,param_4); param_1[2] = (lVar2 - lVar3) + **(long **)(param_2 + 8); return param_1; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x582c, "GGML_ASSERT(%s) failed","m_data.m_value.array != nullptr"); }
33,718
minja::Context::make(minja::Value&&, std::shared_ptr<minja::Context> const&)
monkey531[P]llama/common/minja.hpp
inline std::shared_ptr<Context> Context::make(Value && values, const std::shared_ptr<Context> & parent) { return std::make_shared<Context>(values.is_null() ? Value::object() : std::move(values), parent); }
O2
cpp
minja::Context::make(minja::Value&&, std::shared_ptr<minja::Context> const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x68, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movq %rsi, %rdi callq 0x4e678 movl %eax, %ebp testb %al, %al je 0x66d91 leaq 0x8(%rsp), %r15 movq %r15, %rdi callq 0x5a4d0 leaq 0x18(%rsp), %rdi movq %r15, %rsi callq 0x5c800 jmp 0x66d9e leaq 0x18(%rsp), %rdi movq %r15, %rsi callq 0x4d89e leaq 0x18(%rsp), %rsi movq %rbx, %rdi movq %r14, %rdx callq 0x67049 leaq 0x18(%rsp), %rdi callq 0x4da04 testb %bpl, %bpl je 0x66dc7 leaq 0x10(%rsp), %rdi callq 0x3542e movq %rbx, %rax addq $0x68, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x18(%rsp), %rdi callq 0x4da04 testb %bpl, %bpl je 0x66df1 leaq 0x10(%rsp), %rdi callq 0x3542e movq %rbx, %rdi callq 0x22da0 nop
_ZN5minja7Context4makeEONS_5ValueERKSt10shared_ptrIS0_E: push rbp push r15 push r14 push rbx sub rsp, 68h mov r14, rdx mov r15, rsi mov rbx, rdi mov rdi, rsi; this call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void) mov ebp, eax test al, al jz short loc_66D91 lea r15, [rsp+88h+var_80] mov rdi, r15 call _ZSt11make_sharedIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEEJEESt10shared_ptrIT_EDpOT0_; std::make_shared<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>>() lea rdi, [rsp+88h+var_70] mov rsi, r15 call _ZN5minja5ValueC2ERKSt10shared_ptrIN8nlohmann16json_abi_v3_11_311ordered_mapINS3_10basic_jsonIS4_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEES0_St4lessISG_ESaISt4pairIKSG_S0_EEEEE; minja::Value::Value(std::shared_ptr<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>> const&) jmp short loc_66D9E loc_66D91: lea rdi, [rsp+88h+var_70] mov rsi, r15 call _ZN5minja5ValueC2EOS0_; minja::Value::Value(minja::Value&&) loc_66D9E: lea rsi, [rsp+88h+var_70] mov rdi, rbx mov rdx, r14 call _ZSt11make_sharedIN5minja7ContextEJNS0_5ValueERKSt10shared_ptrIS1_EEES3_IT_EDpOT0_; std::make_shared<minja::Context,minja::Value,std::shared_ptr<minja::Context> const&>(minja::Value,std::shared_ptr<minja::Context> const&) lea rdi, [rsp+88h+var_70]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() test bpl, bpl jz short loc_66DC7 lea rdi, [rsp+88h+var_78] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() loc_66DC7: mov rax, rbx add rsp, 68h pop rbx pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_10]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() test bpl, bpl jz short loc_66DF1 lea rdi, [rsp+arg_8] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() loc_66DF1: mov rdi, rbx call __Unwind_Resume
long long minja::Context::make(long long a1, minja::Value *a2, long long a3) { bool is_null; // bp long long v6; // [rsp+8h] [rbp-80h] BYREF long long v7; // [rsp+10h] [rbp-78h] BYREF _BYTE v8[112]; // [rsp+18h] [rbp-70h] BYREF is_null = minja::Value::is_null(a2); if ( is_null ) { std::make_shared<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>>((long long)&v6); minja::Value::Value((long long)v8, &v6); } else { minja::Value::Value((long long)v8, (long long)a2); } std::make_shared<minja::Context,minja::Value,std::shared_ptr<minja::Context> const&>(a1, v8, a3); minja::Value::~Value((minja::Value *)v8); if ( is_null ) std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v7); return a1; }
make: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x68 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV RDI,RSI CALL 0x0014e678 MOV EBP,EAX TEST AL,AL JZ 0x00166d91 LEA R15,[RSP + 0x8] MOV RDI,R15 CALL 0x0015a4d0 LEA RDI,[RSP + 0x18] MOV RSI,R15 CALL 0x0015c800 JMP 0x00166d9e LAB_00166d91: LEA RDI,[RSP + 0x18] MOV RSI,R15 CALL 0x0014d89e LAB_00166d9e: LEA RSI,[RSP + 0x18] MOV RDI,RBX MOV RDX,R14 CALL 0x00167049 LAB_00166dae: LEA RDI,[RSP + 0x18] CALL 0x0014da04 TEST BPL,BPL JZ 0x00166dc7 LEA RDI,[RSP + 0x10] CALL 0x0013542e LAB_00166dc7: MOV RAX,RBX ADD RSP,0x68 POP RBX POP R14 POP R15 POP RBP RET
/* minja::Context::make(minja::Value&&, std::shared_ptr<minja::Context> const&) */ Value * minja::Context::make(Value *param_1,shared_ptr *param_2) { char cVar1; shared_ptr local_80 [8]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_78 [8]; Value local_70 [80]; cVar1 = Value::is_null((Value *)param_2); if (cVar1 == '\0') { Value::Value(local_70,(Value *)param_2); } else { std:: make_shared<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>> (); Value::Value(local_70,local_80); } /* try { // try from 00166d9e to 00166dad has its CatchHandler @ 00166dd5 */ std::make_shared<minja::Context,minja::Value,std::shared_ptr<minja::Context>const&> (param_1,local_70); Value::~Value(local_70); if (cVar1 != '\0') { std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_78); } return param_1; }
33,719
flux::parser::FunctionTypeExpr::clone() const
kvthweatt[P]FluxLang/src/parser/ast.cpp
std::unique_ptr<TypeExpr> FunctionTypeExpr::clone() const { std::vector<std::unique_ptr<TypeExpr>> clonedParameterTypes; for (const auto& paramType : parameterTypes) { clonedParameterTypes.push_back( static_cast<std::unique_ptr<TypeExpr>>(paramType->clone())); } return std::make_unique<FunctionTypeExpr>( std::move(clonedParameterTypes), static_cast<std::unique_ptr<TypeExpr>>(returnType->clone()), range); }
O2
cpp
flux::parser::FunctionTypeExpr::clone() const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 leaq 0x10(%rsp), %r15 andq $0x0, 0x10(%r15) movaps %xmm0, (%r15) movq 0x28(%rsi), %r13 movq 0x30(%rsi), %rbp movq %rsp, %r12 cmpq %rbp, %r13 je 0xd6d0 movq (%r13), %rsi movq (%rsi), %rax movq %r12, %rdi callq *0x18(%rax) movq %r15, %rdi movq %r12, %rsi callq 0x1204a movq (%rsp), %rdi testq %rdi, %rdi je 0xd6ca movq (%rdi), %rax callq *0x8(%rax) addq $0x8, %r13 jmp 0xd69e movq 0x40(%r14), %rsi movq (%rsi), %rax leaq 0x8(%rsp), %rdi callq *0x18(%rax) addq $0x8, %r14 movq %rsp, %rdi leaq 0x10(%rsp), %rsi leaq 0x8(%rsp), %rdx movq %r14, %rcx callq 0xf3b8 movq (%rsp), %rax andq $0x0, (%rsp) movq %rax, (%rbx) movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0xd714 movq (%rdi), %rax callq *0x8(%rax) leaq 0x10(%rsp), %rdi callq 0xf440 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x8(%rsp), %rdi jmp 0xd748 jmp 0xd73c movq %rax, %rbx jmp 0xd753 movq %rax, %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0xd753 movq (%rdi), %rax callq *0x8(%rax) leaq 0x10(%rsp), %rdi callq 0xf440 movq %rbx, %rdi callq 0x63e0 nop
_ZNK4flux6parser16FunctionTypeExpr5cloneEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 lea r15, [rsp+58h+var_48] and qword ptr [r15+10h], 0 movaps xmmword ptr [r15], xmm0 mov r13, [rsi+28h] mov rbp, [rsi+30h] mov r12, rsp loc_D69E: cmp r13, rbp jz short loc_D6D0 mov rsi, [r13+0] mov rax, [rsi] mov rdi, r12 call qword ptr [rax+18h] mov rdi, r15 mov rsi, r12 call _ZNSt6vectorISt10unique_ptrIN4flux6parser8TypeExprESt14default_deleteIS3_EESaIS6_EE12emplace_backIJS6_EEERS6_DpOT_; std::vector<std::unique_ptr<flux::parser::TypeExpr>>::emplace_back<std::unique_ptr<flux::parser::TypeExpr>>(std::unique_ptr<flux::parser::TypeExpr> &&) mov rdi, [rsp+58h+var_58] test rdi, rdi jz short loc_D6CA mov rax, [rdi] call qword ptr [rax+8] loc_D6CA: add r13, 8 jmp short loc_D69E loc_D6D0: mov rsi, [r14+40h] mov rax, [rsi] lea rdi, [rsp+58h+var_50] call qword ptr [rax+18h] add r14, 8 mov rdi, rsp lea rsi, [rsp+58h+var_48] lea rdx, [rsp+58h+var_50] mov rcx, r14 call _ZSt11make_uniqueIN4flux6parser16FunctionTypeExprEJSt6vectorISt10unique_ptrINS1_8TypeExprESt14default_deleteIS5_EESaIS8_EES8_RKNS0_6common11SourceRangeEEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<flux::parser::FunctionTypeExpr,std::vector<std::unique_ptr<flux::parser::TypeExpr>>,std::unique_ptr<flux::parser::TypeExpr>,flux::common::SourceRange const&>(std::vector<std::unique_ptr<flux::parser::TypeExpr>>,std::unique_ptr<flux::parser::TypeExpr>,flux::common::SourceRange const&) mov rax, [rsp+58h+var_58] and [rsp+58h+var_58], 0 mov [rbx], rax mov rdi, [rsp+58h+var_50] test rdi, rdi jz short loc_D714 mov rax, [rdi] call qword ptr [rax+8] loc_D714: lea rdi, [rsp+58h+var_48] call _ZNSt6vectorISt10unique_ptrIN4flux6parser8TypeExprESt14default_deleteIS3_EESaIS6_EED2Ev; std::vector<std::unique_ptr<flux::parser::TypeExpr>>::~vector() mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_0] jmp short loc_D748 jmp short $+2 loc_D73C: mov rbx, rax jmp short loc_D753 mov rbx, rax mov rdi, [rsp+0] loc_D748: test rdi, rdi jz short loc_D753 mov rax, [rdi] call qword ptr [rax+8] loc_D753: lea rdi, [rsp+arg_8] call _ZNSt6vectorISt10unique_ptrIN4flux6parser8TypeExprESt14default_deleteIS3_EESaIS6_EED2Ev; std::vector<std::unique_ptr<flux::parser::TypeExpr>>::~vector() mov rdi, rbx call __Unwind_Resume
flux::parser::FunctionTypeExpr * flux::parser::FunctionTypeExpr::clone( flux::parser::FunctionTypeExpr *this, long long a2) { long long v2; // r13 long long v3; // rbp long long v4; // rax long long v6; // [rsp+0h] [rbp-58h] BYREF long long v7; // [rsp+8h] [rbp-50h] BYREF __int128 v8; // [rsp+10h] [rbp-48h] BYREF long long v9; // [rsp+20h] [rbp-38h] v9 = 0LL; v8 = 0LL; v2 = *(_QWORD *)(a2 + 40); v3 = *(_QWORD *)(a2 + 48); while ( v2 != v3 ) { (*(void ( **)(long long *))(**(_QWORD **)v2 + 24LL))(&v6); std::vector<std::unique_ptr<flux::parser::TypeExpr>>::emplace_back<std::unique_ptr<flux::parser::TypeExpr>>( &v8, &v6); if ( v6 ) (*(void ( **)(long long))(*(_QWORD *)v6 + 8LL))(v6); v2 += 8LL; } (*(void ( **)(long long *))(**(_QWORD **)(a2 + 64) + 24LL))(&v7); std::make_unique<flux::parser::FunctionTypeExpr,std::vector<std::unique_ptr<flux::parser::TypeExpr>>,std::unique_ptr<flux::parser::TypeExpr>,flux::common::SourceRange const&>( &v6, &v8, &v7, a2 + 8); v4 = v6; v6 = 0LL; *(_QWORD *)this = v4; if ( v7 ) (*(void ( **)(long long))(*(_QWORD *)v7 + 8LL))(v7); std::vector<std::unique_ptr<flux::parser::TypeExpr>>::~vector(&v8); return this; }
clone: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 LEA R15,[RSP + 0x10] AND qword ptr [R15 + 0x10],0x0 MOVAPS xmmword ptr [R15],XMM0 MOV R13,qword ptr [RSI + 0x28] MOV RBP,qword ptr [RSI + 0x30] MOV R12,RSP LAB_0010d69e: CMP R13,RBP JZ 0x0010d6d0 MOV RSI,qword ptr [R13] MOV RAX,qword ptr [RSI] LAB_0010d6aa: MOV RDI,R12 CALL qword ptr [RAX + 0x18] LAB_0010d6b0: MOV RDI,R15 MOV RSI,R12 CALL 0x0011204a LAB_0010d6bb: MOV RDI,qword ptr [RSP] TEST RDI,RDI JZ 0x0010d6ca MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0010d6ca: ADD R13,0x8 JMP 0x0010d69e LAB_0010d6d0: MOV RSI,qword ptr [R14 + 0x40] MOV RAX,qword ptr [RSI] LAB_0010d6d7: LEA RDI,[RSP + 0x8] CALL qword ptr [RAX + 0x18] ADD R14,0x8 LAB_0010d6e3: MOV RDI,RSP LEA RSI,[RSP + 0x10] LEA RDX,[RSP + 0x8] MOV RCX,R14 CALL 0x0010f3b8 LAB_0010d6f8: MOV RAX,qword ptr [RSP] AND qword ptr [RSP],0x0 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x0010d714 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0010d714: LEA RDI,[RSP + 0x10] CALL 0x0010f440 MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* flux::parser::FunctionTypeExpr::clone() const */ void flux::parser::FunctionTypeExpr::clone(void) { int8 *puVar1; long *plVar2; long in_RSI; int8 *in_RDI; int8 *puVar3; long *local_58; long *local_50; int8 local_48; int8 uStack_40; int8 local_38; local_38 = 0; local_48 = 0; uStack_40 = 0; puVar1 = *(int8 **)(in_RSI + 0x30); for (puVar3 = *(int8 **)(in_RSI + 0x28); puVar3 != puVar1; puVar3 = puVar3 + 1) { /* try { // try from 0010d6aa to 0010d6af has its CatchHandler @ 0010d73c */ (**(code **)(*(long *)*puVar3 + 0x18))(&local_58); /* try { // try from 0010d6b0 to 0010d6ba has its CatchHandler @ 0010d741 */ std:: vector<std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>,std::allocator<std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>>> :: emplace_back<std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>> ((vector<std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>,std::allocator<std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>>> *)&local_48,(unique_ptr *)&local_58); if (local_58 != (long *)0x0) { (**(code **)(*local_58 + 8))(); } } /* try { // try from 0010d6d7 to 0010d6de has its CatchHandler @ 0010d73a */ (**(code **)(**(long **)(in_RSI + 0x40) + 0x18))(&local_50); /* try { // try from 0010d6e3 to 0010d6f7 has its CatchHandler @ 0010d730 */ std:: make_unique<flux::parser::FunctionTypeExpr,std::vector<std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>,std::allocator<std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>>>,std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>,flux::common::SourceRange_const&> ((vector *)&local_58,(unique_ptr *)&local_48,(SourceRange *)&local_50); plVar2 = local_58; local_58 = (long *)0x0; *in_RDI = plVar2; if (local_50 != (long *)0x0) { (**(code **)(*local_50 + 8))(); } std:: vector<std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>,std::allocator<std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>>> ::~vector((vector<std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>,std::allocator<std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>>> *)&local_48); return; }
33,720
Balloc
eloqsql/strings/dtoa.c
static Bigint *Balloc(int k, Stack_alloc *alloc) { Bigint *rv; DBUG_ASSERT(k <= Kmax); if (k <= Kmax && alloc->freelist[k]) { rv= alloc->freelist[k]; alloc->freelist[k]= rv->p.next; } else { int x, len; x= 1 << k; len= MY_ALIGN(sizeof(Bigint) + x * sizeof(ULong), SIZEOF_CHARP); if (alloc->free + len <= alloc->end) { rv= (Bigint*) alloc->free; alloc->free+= len; } else rv= (Bigint*) malloc(len); rv->k= k; rv->maxwds= x; } rv->sign= rv->wds= 0; rv->p.x= (ULong*) (rv + 1); return rv; }
O0
c
Balloc: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) jmp 0x74d71 cmpl $0xf, -0x4(%rbp) jg 0x74db1 movq -0x10(%rbp), %rax movslq -0x4(%rbp), %rcx cmpq $0x0, 0x18(%rax,%rcx,8) je 0x74db1 movq -0x10(%rbp), %rax movslq -0x4(%rbp), %rcx movq 0x18(%rax,%rcx,8), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rdx movq -0x10(%rbp), %rax movslq -0x4(%rbp), %rcx movq %rdx, 0x18(%rax,%rcx,8) jmp 0x74e36 movl -0x4(%rbp), %ecx movl $0x1, %eax shll %cl, %eax movl %eax, -0x1c(%rbp) movslq -0x1c(%rbp), %rax shlq $0x2, %rax addq $0x18, %rax addq $0x8, %rax subq $0x1, %rax andq $-0x8, %rax movl %eax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movslq -0x20(%rbp), %rcx addq %rcx, %rax movq -0x10(%rbp), %rcx cmpq 0x10(%rcx), %rax ja 0x74e15 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rbp) movl -0x20(%rbp), %edx movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movslq %edx, %rdx addq %rdx, %rcx movq %rcx, 0x8(%rax) jmp 0x74e22 movslq -0x20(%rbp), %rdi callq 0x24450 movq %rax, -0x18(%rbp) movl -0x4(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, 0x8(%rax) movl -0x1c(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, 0xc(%rax) movq -0x18(%rbp), %rax movl $0x0, 0x14(%rax) movq -0x18(%rbp), %rax movl $0x0, 0x10(%rax) movq -0x18(%rbp), %rcx addq $0x18, %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movq -0x18(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
Balloc: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi jmp short $+2 loc_74D71: cmp [rbp+var_4], 0Fh jg short loc_74DB1 mov rax, [rbp+var_10] movsxd rcx, [rbp+var_4] cmp qword ptr [rax+rcx*8+18h], 0 jz short loc_74DB1 mov rax, [rbp+var_10] movsxd rcx, [rbp+var_4] mov rax, [rax+rcx*8+18h] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov rdx, [rax] mov rax, [rbp+var_10] movsxd rcx, [rbp+var_4] mov [rax+rcx*8+18h], rdx jmp loc_74E36 loc_74DB1: mov ecx, [rbp+var_4] mov eax, 1 shl eax, cl mov [rbp+var_1C], eax movsxd rax, [rbp+var_1C] shl rax, 2 add rax, 18h add rax, 8 sub rax, 1 and rax, 0FFFFFFFFFFFFFFF8h mov [rbp+var_20], eax mov rax, [rbp+var_10] mov rax, [rax+8] movsxd rcx, [rbp+var_20] add rax, rcx mov rcx, [rbp+var_10] cmp rax, [rcx+10h] ja short loc_74E15 mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_18], rax mov edx, [rbp+var_20] mov rax, [rbp+var_10] mov rcx, [rax+8] movsxd rdx, edx add rcx, rdx mov [rax+8], rcx jmp short loc_74E22 loc_74E15: movsxd rdi, [rbp+var_20] call _malloc mov [rbp+var_18], rax loc_74E22: mov ecx, [rbp+var_4] mov rax, [rbp+var_18] mov [rax+8], ecx mov ecx, [rbp+var_1C] mov rax, [rbp+var_18] mov [rax+0Ch], ecx loc_74E36: mov rax, [rbp+var_18] mov dword ptr [rax+14h], 0 mov rax, [rbp+var_18] mov dword ptr [rax+10h], 0 mov rcx, [rbp+var_18] add rcx, 18h mov rax, [rbp+var_18] mov [rax], rcx mov rax, [rbp+var_18] add rsp, 20h pop rbp retn
long long Balloc(int a1, long long a2) { signed int v3; // [rsp+0h] [rbp-20h] long long v4; // [rsp+8h] [rbp-18h] if ( a1 <= 15 && *(_QWORD *)(a2 + 8LL * a1 + 24) ) { v4 = *(_QWORD *)(a2 + 8LL * a1 + 24); *(_QWORD *)(a2 + 8LL * a1 + 24) = *(_QWORD *)v4; } else { v3 = (4 * (1 << a1) + 31) & 0xFFFFFFF8; if ( (unsigned long long)(v3 + *(_QWORD *)(a2 + 8)) > *(_QWORD *)(a2 + 16) ) { v4 = malloc(v3); } else { v4 = *(_QWORD *)(a2 + 8); *(_QWORD *)(a2 + 8) = v3 + v4; } *(_DWORD *)(v4 + 8) = a1; *(_DWORD *)(v4 + 12) = 1 << a1; } *(_DWORD *)(v4 + 20) = 0; *(_DWORD *)(v4 + 16) = 0; *(_QWORD *)v4 = v4 + 24; return v4; }
Balloc: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI JMP 0x00174d71 LAB_00174d71: CMP dword ptr [RBP + -0x4],0xf JG 0x00174db1 MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x4] CMP qword ptr [RAX + RCX*0x8 + 0x18],0x0 JZ 0x00174db1 MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x4] MOV RAX,qword ptr [RAX + RCX*0x8 + 0x18] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x4] MOV qword ptr [RAX + RCX*0x8 + 0x18],RDX JMP 0x00174e36 LAB_00174db1: MOV ECX,dword ptr [RBP + -0x4] MOV EAX,0x1 SHL EAX,CL MOV dword ptr [RBP + -0x1c],EAX MOVSXD RAX,dword ptr [RBP + -0x1c] SHL RAX,0x2 ADD RAX,0x18 ADD RAX,0x8 SUB RAX,0x1 AND RAX,-0x8 MOV dword ptr [RBP + -0x20],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOVSXD RCX,dword ptr [RBP + -0x20] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x10] JA 0x00174e15 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x18],RAX MOV EDX,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOVSXD RDX,EDX ADD RCX,RDX MOV qword ptr [RAX + 0x8],RCX JMP 0x00174e22 LAB_00174e15: MOVSXD RDI,dword ptr [RBP + -0x20] CALL 0x00124450 MOV qword ptr [RBP + -0x18],RAX LAB_00174e22: MOV ECX,dword ptr [RBP + -0x4] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x8],ECX MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0xc],ECX LAB_00174e36: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x14],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x10],0x0 MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x18 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x18] ADD RSP,0x20 POP RBP RET
int8 * Balloc(int param_1,long param_2) { int iVar1; uint uVar2; int8 *local_20; if ((param_1 < 0x10) && (*(long *)(param_2 + 0x18 + (long)param_1 * 8) != 0)) { local_20 = *(int8 **)(param_2 + 0x18 + (long)param_1 * 8); *(int8 *)(param_2 + 0x18 + (long)param_1 * 8) = *local_20; } else { iVar1 = 1 << ((byte)param_1 & 0x1f); uVar2 = iVar1 * 4 + 0x1fU & 0xfffffff8; if (*(ulong *)(param_2 + 0x10) < (ulong)(*(long *)(param_2 + 8) + (long)(int)uVar2)) { local_20 = (int8 *)malloc((long)(int)uVar2); } else { local_20 = *(int8 **)(param_2 + 8); *(long *)(param_2 + 8) = *(long *)(param_2 + 8) + (long)(int)uVar2; } *(int *)(local_20 + 1) = param_1; *(int *)((long)local_20 + 0xc) = iVar1; } *(int4 *)((long)local_20 + 0x14) = 0; *(int4 *)(local_20 + 2) = 0; *local_20 = local_20 + 3; return local_20; }
33,721
R3D_SetMaterialAlbedo
r3d/src/r3d_utils.c
void R3D_SetMaterialAlbedo(Material* material, Texture2D* texture, Color color) { if (material == NULL) { return; } MaterialMap* map = &material->maps[MATERIAL_MAP_ALBEDO]; if (texture != NULL) { map->texture = *texture; } else if (map->texture.id == 0) { map->texture = R3D_GetWhiteTexture(); } map->color = color; }
O3
c
R3D_SetMaterialAlbedo: testq %rdi, %rdi je 0xbe61b pushq %rbp movq %rsp, %rbp movq 0x10(%rdi), %rax testq %rsi, %rsi je 0xbe5f8 movl 0x10(%rsi), %ecx movl %ecx, 0x10(%rax) movups (%rsi), %xmm0 movups %xmm0, (%rax) jmp 0xbe617 cmpl $0x0, (%rax) jne 0xbe617 leaq 0xf19ac(%rip), %rcx # 0x1affb0 movl 0x1530(%rcx), %ecx movl %ecx, (%rax) movaps 0x22f8d(%rip), %xmm0 # 0xe15a0 movups %xmm0, 0x4(%rax) movl %edx, 0x14(%rax) popq %rbp retq
R3D_SetMaterialAlbedo: test rdi, rdi jz short locret_BE61B push rbp mov rbp, rsp mov rax, [rdi+10h] test rsi, rsi jz short loc_BE5F8 mov ecx, [rsi+10h] mov [rax+10h], ecx movups xmm0, xmmword ptr [rsi] movups xmmword ptr [rax], xmm0 jmp short loc_BE617 loc_BE5F8: cmp dword ptr [rax], 0 jnz short loc_BE617 lea rcx, R3D mov ecx, [rcx+1530h] mov [rax], ecx movaps xmm0, cs:xmmword_E15A0 movups xmmword ptr [rax+4], xmm0 loc_BE617: mov [rax+14h], edx pop rbp locret_BE61B: retn
void R3D_SetMaterialAlbedo(long long a1, long long a2, int a3) { long long v3; // rax if ( a1 ) { v3 = *(_QWORD *)(a1 + 16); if ( a2 ) { *(_DWORD *)(v3 + 16) = *(_DWORD *)(a2 + 16); *(_OWORD *)v3 = *(_OWORD *)a2; } else if ( !*(_DWORD *)v3 ) { *(_DWORD *)v3 = *((_DWORD *)&R3D + 1356); *(_OWORD *)(v3 + 4) = xmmword_E15A0; } *(_DWORD *)(v3 + 20) = a3; } }
R3D_SetMaterialAlbedo: TEST RDI,RDI JZ 0x001be61b PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI + 0x10] TEST RSI,RSI JZ 0x001be5f8 MOV ECX,dword ptr [RSI + 0x10] MOV dword ptr [RAX + 0x10],ECX MOVUPS XMM0,xmmword ptr [RSI] MOVUPS xmmword ptr [RAX],XMM0 JMP 0x001be617 LAB_001be5f8: CMP dword ptr [RAX],0x0 JNZ 0x001be617 LEA RCX,[0x2affb0] MOV ECX,dword ptr [RCX + 0x1530] MOV dword ptr [RAX],ECX MOVAPS XMM0,xmmword ptr [0x001e15a0] MOVUPS xmmword ptr [RAX + 0x4],XMM0 LAB_001be617: MOV dword ptr [RAX + 0x14],EDX POP RBP LAB_001be61b: RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void R3D_SetMaterialAlbedo(long param_1,int8 *param_2,int param_3) { int *piVar1; int8 uVar2; if (param_1 != 0) { piVar1 = *(int **)(param_1 + 0x10); if (param_2 == (int8 *)0x0) { if (*piVar1 == 0) { *piVar1 = DAT_002b14e0; uVar2 = _UNK_001e15a8; *(int8 *)(piVar1 + 1) = _DAT_001e15a0; *(int8 *)(piVar1 + 3) = uVar2; } } else { piVar1[4] = *(int *)(param_2 + 2); uVar2 = param_2[1]; *(int8 *)piVar1 = *param_2; *(int8 *)(piVar1 + 2) = uVar2; } piVar1[5] = param_3; } return; }
33,722
ma_set_rpl_filename
eloqsql/libmariadb/libmariadb/mariadb_rpl.c
static int ma_set_rpl_filename(MARIADB_RPL *rpl, const unsigned char *filename, size_t len) { if (!rpl) return 1; free(rpl->filename); if (!(rpl->filename= (char *)malloc(len))) return 1; memcpy(rpl->filename, filename, len); rpl->filename_length= (uint32_t)len; return 0; }
O3
c
ma_set_rpl_filename: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r14 movq 0x10(%rdi), %rdi callq 0x13570 movq %rbx, %rdi callq 0x13600 movq %rax, 0x10(%r14) testq %rax, %rax je 0x2892d movq %rax, %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x13390 movl %ebx, 0x18(%r14) xorl %eax, %eax jmp 0x28932 movl $0x1, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
ma_set_rpl_filename: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdx mov r15, rsi mov r14, rdi mov rdi, [rdi+10h] call _free mov rdi, rbx call _malloc mov [r14+10h], rax test rax, rax jz short loc_2892D mov rdi, rax mov rsi, r15 mov rdx, rbx call _memcpy mov [r14+18h], ebx xor eax, eax jmp short loc_28932 loc_2892D: mov eax, 1 loc_28932: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long ma_set_rpl_filename(long long a1, long long a2, long long a3) { long long v4; // rax free(*(_QWORD *)(a1 + 16)); v4 = malloc(a3); *(_QWORD *)(a1 + 16) = v4; if ( !v4 ) return 1LL; memcpy(v4, a2, a3); *(_DWORD *)(a1 + 24) = a3; return 0LL; }
ma_set_rpl_filename: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDX MOV R15,RSI MOV R14,RDI MOV RDI,qword ptr [RDI + 0x10] CALL 0x00113570 MOV RDI,RBX CALL 0x00113600 MOV qword ptr [R14 + 0x10],RAX TEST RAX,RAX JZ 0x0012892d MOV RDI,RAX MOV RSI,R15 MOV RDX,RBX CALL 0x00113390 MOV dword ptr [R14 + 0x18],EBX XOR EAX,EAX JMP 0x00128932 LAB_0012892d: MOV EAX,0x1 LAB_00128932: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
bool ma_set_rpl_filename(long param_1,void *param_2,size_t param_3) { void *__dest; free(*(void **)(param_1 + 0x10)); __dest = malloc(param_3); *(void **)(param_1 + 0x10) = __dest; if (__dest != (void *)0x0) { memcpy(__dest,param_2,param_3); *(int *)(param_1 + 0x18) = (int)param_3; } return __dest == (void *)0x0; }
33,723
MyEndNode::exec(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
The-Pocket[P]PocketFlow-CPP/main.cpp
std::nullptr_t exec(std::string prepResult) override { std::cout << "Ending workflow with: " << prepResult << std::endl; // Since E is void (represented by nullptr_t), we don't return anything meaningful return nullptr; }
O1
cpp
MyEndNode::exec(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>): pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq 0xc428(%rip), %r14 # 0x17fb0 leaq 0x5a74(%rip), %rsi # 0x11603 movl $0x16, %edx movq %r14, %rdi callq 0x51c0 movq (%rbx), %rsi movq 0x8(%rbx), %rdx movq %r14, %rdi callq 0x51c0 movq %rax, %rbx movq (%rax), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x5160 movsbl %al, %esi movq %rbx, %rdi callq 0x5030 movq %rax, %rdi callq 0x5100 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN9MyEndNode4execENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r14 push rbx push rax mov rbx, rsi mov r14, cs:_ZSt4cout_ptr lea rsi, aEndingWorkflow; "Ending workflow with: " mov edx, 16h mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rsi, [rbx] mov rdx, [rbx+8] mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rbx, rax mov rax, [rax] mov rdi, [rax-18h] add rdi, rbx mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, rbx; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) xor eax, eax add rsp, 8 pop rbx pop r14 retn
long long MyEndNode::exec(long long a1, _QWORD *a2) { std::ostream *v2; // rbx char v3; // al std::ostream *v4; // rax std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Ending workflow with: ", 22LL); v2 = (std::ostream *)std::__ostream_insert<char,std::char_traits<char>>(&std::cout, *a2, a2[1]); v3 = std::ios::widen((char *)v2 + *(_QWORD *)(*(_QWORD *)v2 - 24LL), 10LL); v4 = (std::ostream *)std::ostream::put(v2, v3); std::ostream::flush(v4); return 0LL; }
exec: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,qword ptr [0x00117fb0] LEA RSI,[0x111603] MOV EDX,0x16 MOV RDI,R14 CALL 0x001051c0 MOV RSI,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] MOV RDI,R14 CALL 0x001051c0 MOV RBX,RAX MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + -0x18] ADD RDI,RBX MOV ESI,0xa CALL 0x00105160 MOVSX ESI,AL MOV RDI,RBX CALL 0x00105030 MOV RDI,RAX CALL 0x00105100 XOR EAX,EAX ADD RSP,0x8 POP RBX POP R14 RET
/* MyEndNode::exec(std::__cxx11::string) */ int8 __thiscall MyEndNode::exec(int8 param_1,int8 *param_2) { int *puVar1; ostream *poVar2; puVar1 = PTR_cout_00117fb0; std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cout_00117fb0,"Ending workflow with: ",0x16); poVar2 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)puVar1,(char *)*param_2,param_2[1]); std::ios::widen((char)*(int8 *)(*(long *)poVar2 + -0x18) + (char)poVar2); std::ostream::put((char)poVar2); std::ostream::flush(); return 0; }
33,724
start_transaction
eloqsql/client/mysqldump.c
static int start_transaction(MYSQL *mysql_con) { verbose_msg("-- Starting transaction...\n"); /* We use BEGIN for old servers. --single-transaction --master-data will fail on old servers, but that's ok as it was already silently broken (it didn't do a consistent read, so better tell people frankly, with the error). We want the first consistent read to be used for all tables to dump so we need the REPEATABLE READ level (not anything lower, for example READ COMMITTED would give one new consistent read per dumped table). */ if ((mysql_get_server_version(mysql_con) < 40100) && opt_master_data) { fprintf(stderr, "-- %s: the combination of --single-transaction and " "--master-data requires a MariaDB server version of at least 4.1 " "(current server's version is %s). %s\n", ignore_errors ? "Warning" : "Error", mysql_con->server_version ? mysql_con->server_version : "unknown", ignore_errors ? "Continuing due to --force, backup may not be consistent across all tables!" : "Aborting."); if (!ignore_errors) exit(EX_MYSQLERR); } return (mysql_query_with_error_report(mysql_con, 0, "SET SESSION TRANSACTION ISOLATION " "LEVEL REPEATABLE READ") || mysql_query_with_error_report(mysql_con, 0, "START TRANSACTION " "/*!40100 WITH CONSISTENT SNAPSHOT */")); }
O0
c
start_transaction: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) leaq 0xa07eb(%rip), %rdi # 0xdb92e movb $0x0, %al callq 0x393f0 movq -0x8(%rbp), %rdi callq 0x523b0 cmpq $0x9ca4, %rax # imm = 0x9CA4 jae 0x3b211 cmpl $0x0, 0x3c64c6(%rip) # 0x40162c je 0x3b211 movq 0x209e6d(%rip), %rax # 0x244fe0 movq (%rax), %rax movq %rax, -0x18(%rbp) movsbl 0x3c64f3(%rip), %edx # 0x401674 leaq 0xa0863(%rip), %rax # 0xdb9eb leaq 0xa0854(%rip), %rcx # 0xdb9e3 cmpl $0x0, %edx cmovneq %rcx, %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x2d0(%rax) je 0x3b1b9 movq -0x8(%rbp), %rax movq 0x2d0(%rax), %rax movq %rax, -0x20(%rbp) jmp 0x3b1c6 leaq 0xa0831(%rip), %rax # 0xdb9f1 movq %rax, -0x20(%rbp) jmp 0x3b1c6 movq -0x10(%rbp), %rdx movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rcx movsbl 0x3c649b(%rip), %esi # 0x401674 leaq 0xa0864(%rip), %r8 # 0xdba44 leaq 0xa0812(%rip), %rax # 0xdb9f9 cmpl $0x0, %esi cmovneq %rax, %r8 leaq 0xa0755(%rip), %rsi # 0xdb94a movb $0x0, %al callq 0x381d0 cmpb $0x0, 0x3c6471(%rip) # 0x401674 jne 0x3b20f movl $0x2, %edi callq 0x38680 jmp 0x3b211 movq -0x8(%rbp), %rdi xorl %eax, %eax movl %eax, %esi leaq 0xa082e(%rip), %rdx # 0xdba4e callq 0x39350 movl %eax, %ecx movb $0x1, %al cmpl $0x0, %ecx movb %al, -0x21(%rbp) jne 0x3b24e movq -0x8(%rbp), %rdi xorl %eax, %eax movl %eax, %esi leaq 0xa0846(%rip), %rdx # 0xdba86 callq 0x39350 cmpl $0x0, %eax setne %al movb %al, -0x21(%rbp) movb -0x21(%rbp), %al andb $0x1, %al movzbl %al, %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
start_transaction: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi lea rdi, aStartingTransa; "-- Starting transaction...\n" mov al, 0 call verbose_msg mov rdi, [rbp+var_8] call mysql_get_server_version cmp rax, 9CA4h jnb loc_3B211 cmp cs:opt_master_data, 0 jz loc_3B211 mov rax, cs:stderr_ptr mov rax, [rax] mov [rbp+var_18], rax movsx edx, cs:ignore_errors lea rax, aError; "Error" lea rcx, aWarning; "Warning" cmp edx, 0 cmovnz rax, rcx mov [rbp+var_10], rax mov rax, [rbp+var_8] cmp qword ptr [rax+2D0h], 0 jz short loc_3B1B9 mov rax, [rbp+var_8] mov rax, [rax+2D0h] mov [rbp+var_20], rax jmp short loc_3B1C6 loc_3B1B9: lea rax, aUnknown; "unknown" mov [rbp+var_20], rax jmp short $+2 loc_3B1C6: mov rdx, [rbp+var_10] mov rdi, [rbp+var_18] mov rcx, [rbp+var_20] movsx esi, cs:ignore_errors lea r8, aAborting; "Aborting." lea rax, aContinuingDueT; "Continuing due to --force, backup may n"... cmp esi, 0 cmovnz r8, rax lea rsi, aSTheCombinatio; "-- %s: the combination of --single-tran"... mov al, 0 call _fprintf cmp cs:ignore_errors, 0 jnz short loc_3B20F mov edi, 2 call _exit loc_3B20F: jmp short $+2 loc_3B211: mov rdi, [rbp+var_8] xor eax, eax mov esi, eax lea rdx, aSetSessionTran; "SET SESSION TRANSACTION ISOLATION LEVEL"... call mysql_query_with_error_report mov ecx, eax mov al, 1 cmp ecx, 0 mov [rbp+var_21], al jnz short loc_3B24E mov rdi, [rbp+var_8] xor eax, eax mov esi, eax lea rdx, aStartTransacti; "START TRANSACTION /*!40100 WITH CONSIST"... call mysql_query_with_error_report cmp eax, 0 setnz al mov [rbp+var_21], al loc_3B24E: mov al, [rbp+var_21] and al, 1 movzx eax, al add rsp, 30h pop rbp retn
_BOOL8 start_transaction( 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) { const char *v14; // rax const char *v15; // r8 char v17; // [rsp+0h] [rbp-30h] bool v18; // [rsp+Fh] [rbp-21h] const char *v19; // [rsp+10h] [rbp-20h] verbose_msg((long long)"-- Starting transaction...\n", a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v17); if ( (unsigned long long)mysql_get_server_version(a1, *(double *)a7.m128_u64) < 0x9CA4 && opt_master_data ) { v14 = "Error"; if ( ignore_errors ) v14 = "Warning"; if ( *(_QWORD *)(a1 + 720) ) v19 = *(const char **)(a1 + 720); else v19 = "unknown"; v15 = "Aborting."; if ( ignore_errors ) v15 = "Continuing due to --force, backup may not be consistent across all tables!"; fprintf( stderr, "-- %s: the combination of --single-transaction and --master-data requires a MariaDB server version of at least 4.1" " (current server's version is %s). %s\n", v14, v19, v15); if ( !ignore_errors ) exit(2LL); } v18 = 1; if ( !(unsigned int)mysql_query_with_error_report( a1, 0LL, (long long)"SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ") ) return (unsigned int)mysql_query_with_error_report( a1, 0LL, (long long)"START TRANSACTION /*!40100 WITH CONSISTENT SNAPSHOT */") != 0; return v18; }
start_transaction: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI LEA RDI,[0x1db92e] MOV AL,0x0 CALL 0x001393f0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x001523b0 CMP RAX,0x9ca4 JNC 0x0013b211 CMP dword ptr [0x0050162c],0x0 JZ 0x0013b211 MOV RAX,qword ptr [0x00344fe0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOVSX EDX,byte ptr [0x00501674] LEA RAX,[0x1db9eb] LEA RCX,[0x1db9e3] CMP EDX,0x0 CMOVNZ RAX,RCX MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x2d0],0x0 JZ 0x0013b1b9 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x2d0] MOV qword ptr [RBP + -0x20],RAX JMP 0x0013b1c6 LAB_0013b1b9: LEA RAX,[0x1db9f1] MOV qword ptr [RBP + -0x20],RAX JMP 0x0013b1c6 LAB_0013b1c6: MOV RDX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] MOVSX ESI,byte ptr [0x00501674] LEA R8,[0x1dba44] LEA RAX,[0x1db9f9] CMP ESI,0x0 CMOVNZ R8,RAX LEA RSI,[0x1db94a] MOV AL,0x0 CALL 0x001381d0 CMP byte ptr [0x00501674],0x0 JNZ 0x0013b20f MOV EDI,0x2 CALL 0x00138680 LAB_0013b20f: JMP 0x0013b211 LAB_0013b211: MOV RDI,qword ptr [RBP + -0x8] XOR EAX,EAX MOV ESI,EAX LEA RDX,[0x1dba4e] CALL 0x00139350 MOV ECX,EAX MOV AL,0x1 CMP ECX,0x0 MOV byte ptr [RBP + -0x21],AL JNZ 0x0013b24e MOV RDI,qword ptr [RBP + -0x8] XOR EAX,EAX MOV ESI,EAX LEA RDX,[0x1dba86] CALL 0x00139350 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x21],AL LAB_0013b24e: MOV AL,byte ptr [RBP + -0x21] AND AL,0x1 MOVZX EAX,AL ADD RSP,0x30 POP RBP RET
bool start_transaction(long param_1) { int iVar1; ulong uVar2; char *pcVar3; char *pcVar4; bool local_29; char *local_28; verbose_msg("-- Starting transaction...\n"); uVar2 = mysql_get_server_version(param_1); if ((uVar2 < 0x9ca4) && (opt_master_data != 0)) { pcVar3 = "Error"; if (ignore_errors != '\0') { pcVar3 = "Warning"; } if (*(long *)(param_1 + 0x2d0) == 0) { local_28 = "unknown"; } else { local_28 = *(char **)(param_1 + 0x2d0); } pcVar4 = "Aborting."; if (ignore_errors != '\0') { pcVar4 = "Continuing due to --force, backup may not be consistent across all tables!"; } fprintf(*(FILE **)PTR_stderr_00344fe0, "-- %s: the combination of --single-transaction and --master-data requires a MariaDB server version of at least 4.1 (current server\'s version is %s). %s\n" ,pcVar3,local_28,pcVar4); if (ignore_errors == '\0') { /* WARNING: Subroutine does not return */ exit(2); } } iVar1 = mysql_query_with_error_report (param_1,0,"SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ"); local_29 = true; if (iVar1 == 0) { iVar1 = mysql_query_with_error_report (param_1,0,"START TRANSACTION /*!40100 WITH CONSISTENT SNAPSHOT */"); local_29 = iVar1 != 0; } return local_29; }
33,725
mthd_stmt_flush_unbuffered
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
void mthd_stmt_flush_unbuffered(MYSQL_STMT *stmt) { ulong packet_len; int in_resultset= stmt->state > MYSQL_STMT_EXECUTED && stmt->state < MYSQL_STMT_FETCH_DONE; while ((packet_len = ma_net_safe_read(stmt->mysql)) != packet_error) { uchar *pos= stmt->mysql->net.read_pos; if (!in_resultset && *pos == 0) /* OK */ { pos++; net_field_length(&pos); net_field_length(&pos); stmt->mysql->server_status= uint2korr(pos); goto end; } if (packet_len < 8 && *pos == 254) /* EOF */ { if (mariadb_connection(stmt->mysql)) { stmt->mysql->server_status= uint2korr(pos + 3); if (in_resultset) goto end; in_resultset= 1; } else goto end; } } end: stmt->state= MYSQL_STMT_FETCH_DONE; }
O3
c
mthd_stmt_flush_unbuffered: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movl 0x50(%rdi), %r12d movq 0x38(%rdi), %rdi callq 0x154ef movl $0xffffffff, %r14d # imm = 0xFFFFFFFF cmpq %r14, %rax je 0x1e79e addl $-0x3, %r12d xorl %r15d, %r15d cmpl $0x3, %r12d setb %r15b movq 0x38(%rbx), %rdi movq 0x20(%rdi), %r12 testl %r15d, %r15d jne 0x1e733 cmpb $0x0, (%r12) je 0x1e774 cmpq $0x7, %rax ja 0x1e768 cmpb $-0x2, (%r12) jne 0x1e768 callq 0x1588b testb %al, %al je 0x1e79e movzwl 0x3(%r12), %eax movq 0x38(%rbx), %rcx movl %eax, 0x380(%rcx) testl %r15d, %r15d jne 0x1e79e movq 0x38(%rbx), %rdi movl $0x1, %r15d callq 0x154ef cmpq %r14, %rax jne 0x1e71f jmp 0x1e79e incq %r12 leaq -0x28(%rbp), %r14 movq %r12, (%r14) movq %r14, %rdi callq 0x158cd movq %r14, %rdi callq 0x158cd movq (%r14), %rax movzwl (%rax), %eax movq 0x38(%rbx), %rcx movl %eax, 0x380(%rcx) movl $0x6, 0x50(%rbx) addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
mthd_stmt_flush_unbuffered: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov rbx, rdi mov r12d, [rdi+50h] mov rdi, [rdi+38h] call ma_net_safe_read mov r14d, 0FFFFFFFFh cmp rax, r14 jz loc_1E79E add r12d, 0FFFFFFFDh xor r15d, r15d cmp r12d, 3 setb r15b loc_1E71F: mov rdi, [rbx+38h] mov r12, [rdi+20h] test r15d, r15d jnz short loc_1E733 cmp byte ptr [r12], 0 jz short loc_1E774 loc_1E733: cmp rax, 7 ja short loc_1E768 cmp byte ptr [r12], 0FEh jnz short loc_1E768 call mariadb_connection test al, al jz short loc_1E79E movzx eax, word ptr [r12+3] mov rcx, [rbx+38h] mov [rcx+380h], eax test r15d, r15d jnz short loc_1E79E mov rdi, [rbx+38h] mov r15d, 1 loc_1E768: call ma_net_safe_read cmp rax, r14 jnz short loc_1E71F jmp short loc_1E79E loc_1E774: inc r12 lea r14, [rbp+var_28] mov [r14], r12 mov rdi, r14 call net_field_length mov rdi, r14 call net_field_length mov rax, [r14] movzx eax, word ptr [rax] mov rcx, [rbx+38h] mov [rcx+380h], eax loc_1E79E: mov dword ptr [rbx+50h], 6 add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn
char mthd_stmt_flush_unbuffered(long long a1, long long a2, long long a3, long long a4, unsigned long long a5, int a6) { int v7; // r12d unsigned long long v8; // rax long long v9; // rdx long long v10; // rcx unsigned long long v11; // r8 int v12; // r9d BOOL v13; // r15d long long v14; // rdi long long v15; // r12 unsigned __int8 *v17[5]; // [rsp+8h] [rbp-28h] BYREF v7 = *(_DWORD *)(a1 + 80); v8 = ma_net_safe_read(*(_QWORD *)(a1 + 56), a2, a3, a4, a5, a6); if ( v8 != 0xFFFFFFFF ) { v13 = (unsigned int)(v7 - 3) < 3; while ( 1 ) { v14 = *(_QWORD *)(a1 + 56); v15 = *(_QWORD *)(v14 + 32); if ( !v13 && !*(_BYTE *)v15 ) break; if ( v8 <= 7 && *(_BYTE *)v15 == 0xFE ) { LOBYTE(v8) = mariadb_connection(v14); if ( !(_BYTE)v8 ) goto LABEL_13; LODWORD(v8) = *(unsigned __int16 *)(v15 + 3); v10 = *(_QWORD *)(a1 + 56); *(_DWORD *)(v10 + 896) = v8; if ( v13 ) goto LABEL_13; v14 = *(_QWORD *)(a1 + 56); v13 = 1; } v8 = ma_net_safe_read(v14, a2, v9, v10, v11, v12); if ( v8 == 0xFFFFFFFF ) goto LABEL_13; } v17[0] = (unsigned __int8 *)(v15 + 1); net_field_length(v17); net_field_length(v17); LODWORD(v8) = *(unsigned __int16 *)v17[0]; *(_DWORD *)(*(_QWORD *)(a1 + 56) + 896LL) = v8; } LABEL_13: *(_DWORD *)(a1 + 80) = 6; return v8; }
mthd_stmt_flush_unbuffered: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOV R12D,dword ptr [RDI + 0x50] MOV RDI,qword ptr [RDI + 0x38] CALL 0x001154ef MOV R14D,0xffffffff CMP RAX,R14 JZ 0x0011e79e ADD R12D,-0x3 XOR R15D,R15D CMP R12D,0x3 SETC R15B LAB_0011e71f: MOV RDI,qword ptr [RBX + 0x38] MOV R12,qword ptr [RDI + 0x20] TEST R15D,R15D JNZ 0x0011e733 CMP byte ptr [R12],0x0 JZ 0x0011e774 LAB_0011e733: CMP RAX,0x7 JA 0x0011e768 CMP byte ptr [R12],0xfe JNZ 0x0011e768 CALL 0x0011588b TEST AL,AL JZ 0x0011e79e MOVZX EAX,word ptr [R12 + 0x3] MOV RCX,qword ptr [RBX + 0x38] MOV dword ptr [RCX + 0x380],EAX TEST R15D,R15D JNZ 0x0011e79e MOV RDI,qword ptr [RBX + 0x38] MOV R15D,0x1 LAB_0011e768: CALL 0x001154ef CMP RAX,R14 JNZ 0x0011e71f JMP 0x0011e79e LAB_0011e774: INC R12 LEA R14,[RBP + -0x28] MOV qword ptr [R14],R12 MOV RDI,R14 CALL 0x001158cd MOV RDI,R14 CALL 0x001158cd MOV RAX,qword ptr [R14] MOVZX EAX,word ptr [RAX] MOV RCX,qword ptr [RBX + 0x38] MOV dword ptr [RCX + 0x380],EAX LAB_0011e79e: MOV dword ptr [RBX + 0x50],0x6 ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET
void mthd_stmt_flush_unbuffered(long param_1) { int iVar1; char *pcVar2; char cVar3; ulong uVar4; long lVar5; bool bVar6; ushort *local_30; iVar1 = *(int *)(param_1 + 0x50); uVar4 = ma_net_safe_read(*(int8 *)(param_1 + 0x38)); if (uVar4 != 0xffffffff) { bVar6 = iVar1 - 3U < 3; while( true ) { lVar5 = *(long *)(param_1 + 0x38); pcVar2 = *(char **)(lVar5 + 0x20); if ((!bVar6) && (*pcVar2 == '\0')) break; if ((uVar4 < 8) && (*pcVar2 == -2)) { cVar3 = mariadb_connection(); if ((cVar3 == '\0') || (*(uint *)(*(long *)(param_1 + 0x38) + 0x380) = (uint)*(ushort *)(pcVar2 + 3), bVar6)) goto LAB_0011e79e; lVar5 = *(long *)(param_1 + 0x38); bVar6 = true; } uVar4 = ma_net_safe_read(lVar5); if (uVar4 == 0xffffffff) goto LAB_0011e79e; } local_30 = (ushort *)(pcVar2 + 1); net_field_length(&local_30); net_field_length(&local_30); *(uint *)(*(long *)(param_1 + 0x38) + 0x380) = (uint)*local_30; } LAB_0011e79e: *(int4 *)(param_1 + 0x50) = 6; return; }
33,726
intx::internal::udivrem_by1(unsigned long*, int, unsigned long)
corpus-core[P]colibri-stateless/build_O3/_deps/intx-src/include/intx/intx.hpp
inline uint64_t udivrem_by1(uint64_t u[], int len, uint64_t d) noexcept { INTX_REQUIRE(len >= 2); const auto reciprocal = reciprocal_2by1(d); auto rem = u[len - 1]; // Set the top word as remainder. u[len - 1] = 0; // Reset the word being a part of the result quotient. auto it = &u[len - 2]; do { std::tie(*it, rem) = udivrem_2by1({*it, rem}, d, reciprocal); } while (it-- != &u[0]); return rem; }
O3
cpp
intx::internal::udivrem_by1(unsigned long*, int, unsigned long): pushq %r14 pushq %rbx subq $0x18, %rsp cmpl $0x1, %esi jle 0x3df71 movq %rdx, %rcx testq %rdx, %rdx jns 0x3df90 movq %rcx, %rax shrq $0x37, %rax leaq 0x43a1f(%rip), %rdx # 0x81850 movzwl -0x200(%rdx,%rax,2), %eax movq %rcx, %rdx shrq $0x18, %rdx incq %rdx movl %eax, %r8d shll $0xb, %r8d imull %eax, %eax imulq %rdx, %rax shrq $0x28, %rax notl %eax addl %r8d, %eax imulq %rax, %rdx movabsq $0x1000000000000000, %r8 # imm = 0x1000000000000000 subq %rdx, %r8 imulq %rax, %r8 shlq $0xd, %rax shrq $0x2f, %r8 addq %rax, %r8 movl %ecx, %edx andl $0x1, %edx movq %rcx, %r9 shrq %r9 addq %rdx, %r9 negq %rdx movq %r8, %rax shrq %rax andq %rdx, %rax imulq %r8, %r9 subq %r9, %rax mulq %r8 shrq %rdx shlq $0x1f, %r8 addq %rdx, %r8 movq %r8, %rax mulq %rcx leaq 0x8(%rsp), %r9 movq $0x0, (%r9) leaq 0x10(%rsp), %r14 movb $0x1, %r10b xorl %r11d, %r11d movq %rcx, %rbx movzbl %r11b, %r11d btl $0x0, %r11d adcq %rax, %rbx setb %r11b movq %rbx, (%r14) xorl %ebx, %ebx movq %rdx, %rax movq %r9, %r14 testb $0x1, %r10b movl $0x0, %r10d jne 0x3dec8 movq 0x8(%rsp), %rax addq %rcx, %rax subq %rax, %r8 movl %esi, %r9d movq -0x8(%rdi,%r9,8), %rsi movq $0x0, -0x8(%rdi,%r9,8) shlq $0x3, %r9 movq -0x10(%rdi,%r9), %r10 movq %rsi, %rax mulq %r8 addq %r10, %rax adcq %rsi, %rdx leaq 0x1(%rdx), %r11 movq %r11, %rsi imulq %rcx, %rsi subq %rsi, %r10 cmpq %rax, %r10 cmovaq %rdx, %r11 movl $0x0, %esi cmovaq %rcx, %rsi addq %r10, %rsi cmpq %rcx, %rsi sbbq $-0x1, %r11 cmpq %rcx, %rsi movl $0x0, %eax cmovaeq %rcx, %rax subq %rax, %rsi movq %r11, -0x10(%rdi,%r9) addq $-0x8, %r9 cmpq $0x8, %r9 jne 0x3df0f movq %rsi, %rax addq $0x18, %rsp popq %rbx popq %r14 retq leaq 0x43cdf(%rip), %rdi # 0x81c57 leaq 0x43c2f(%rip), %rsi # 0x81bae leaq 0x43cda(%rip), %rcx # 0x81c60 movl $0x644, %edx # imm = 0x644 callq 0x21130 leaq 0x43d09(%rip), %rdi # 0x81ca0 leaq 0x43c10(%rip), %rsi # 0x81bae leaq 0x43d12(%rip), %rcx # 0x81cb7 movl $0x274, %edx # imm = 0x274 callq 0x21130
_ZN4intx8internal11udivrem_by1EPmim: push r14 push rbx sub rsp, 18h cmp esi, 1 jle loc_3DF71 mov rcx, rdx test rdx, rdx jns loc_3DF90 mov rax, rcx shr rax, 37h lea rdx, _ZN4intx8internalL16reciprocal_tableE; intx::internal::reciprocal_table movzx eax, word ptr [rdx+rax*2-200h] mov rdx, rcx shr rdx, 18h inc rdx mov r8d, eax shl r8d, 0Bh imul eax, eax imul rax, rdx shr rax, 28h not eax add eax, r8d imul rdx, rax mov r8, 1000000000000000h sub r8, rdx imul r8, rax shl rax, 0Dh shr r8, 2Fh add r8, rax mov edx, ecx and edx, 1 mov r9, rcx shr r9, 1 add r9, rdx neg rdx mov rax, r8 shr rax, 1 and rax, rdx imul r9, r8 sub rax, r9 mul r8 shr rdx, 1 shl r8, 1Fh add r8, rdx mov rax, r8 mul rcx lea r9, [rsp+28h+var_20] mov qword ptr [r9], 0 lea r14, [rsp+28h+var_18] mov r10b, 1 xor r11d, r11d mov rbx, rcx loc_3DEC8: movzx r11d, r11b bt r11d, 0 adc rbx, rax setb r11b mov [r14], rbx xor ebx, ebx mov rax, rdx mov r14, r9 test r10b, 1 mov r10d, 0 jnz short loc_3DEC8 mov rax, [rsp+28h+var_20] add rax, rcx sub r8, rax mov r9d, esi mov rsi, [rdi+r9*8-8] mov qword ptr [rdi+r9*8-8], 0 shl r9, 3 loc_3DF0F: mov r10, [rdi+r9-10h] mov rax, rsi mul r8 add rax, r10 adc rdx, rsi lea r11, [rdx+1] mov rsi, r11 imul rsi, rcx sub r10, rsi cmp r10, rax cmova r11, rdx mov esi, 0 cmova rsi, rcx add rsi, r10 cmp rsi, rcx sbb r11, 0FFFFFFFFFFFFFFFFh cmp rsi, rcx mov eax, 0 cmovnb rax, rcx sub rsi, rax mov [rdi+r9-10h], r11 add r9, 0FFFFFFFFFFFFFFF8h cmp r9, 8 jnz short loc_3DF0F mov rax, rsi add rsp, 18h pop rbx pop r14 retn loc_3DF71: lea rdi, aLen2; "len >= 2" lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rcx, aUint64TIntxInt; "uint64_t intx::internal::udivrem_by1(ui"... mov edx, 644h call ___assert_fail loc_3DF90: lea rdi, aD0x80000000000; "d & 0x8000000000000000" lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rcx, aUint64TIntxRec; "uint64_t intx::reciprocal_2by1(uint64_t"... mov edx, 274h call ___assert_fail
unsigned long long intx::internal::udivrem_by1( intx::internal *this, unsigned long long *a2, unsigned long long a3) { int v4; // eax long long v5; // rdx long long v6; // rax unsigned long long v7; // r8 unsigned long long v8; // r8 unsigned __int128 v9; // rax long long *v10; // r14 char v11; // r10 char v12; // r11 unsigned long long v13; // rbx bool v14; // cf unsigned long long v15; // rbx bool v16; // zf unsigned long long v17; // r8 long long v18; // r9 unsigned long long v19; // rsi long long v20; // r9 unsigned long long v21; // r10 unsigned __int128 v22; // rax long long v23; // r11 unsigned long long v24; // r10 unsigned long long v25; // rsi unsigned long long v26; // rsi long long v27; // r11 unsigned long long v28; // rax long long v30; // [rsp+8h] [rbp-20h] BYREF char v31; // [rsp+10h] [rbp-18h] BYREF if ( (int)a2 <= 1 ) __assert_fail( "len >= 2", "/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O3/_deps/intx-src/include/intx/intx.hpp", 1604LL, "uint64_t intx::internal::udivrem_by1(uint64_t *, int, uint64_t)"); if ( (a3 & 0x8000000000000000LL) == 0LL ) __assert_fail( "d & 0x8000000000000000", "/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O3/_deps/intx-src/include/intx/intx.hpp", 628LL, "uint64_t intx::reciprocal_2by1(uint64_t)"); v4 = intx::internal::reciprocal_table[(a3 >> 55) - 256]; v5 = (a3 >> 24) + 1; v6 = (intx::internal::reciprocal_table[(a3 >> 55) - 256] << 11) + ~((unsigned int)((v5 * (unsigned long long)(unsigned int)(v4 * v4)) >> 32) >> 8); v7 = (v6 << 13) + ((unsigned long long)(v6 * (0x1000000000000000LL - v6 * v5)) >> 47); v8 = ((unsigned long long)((v7 * (unsigned __int128)((-(long long)(a3 & 1) & (v7 >> 1)) - v7 * ((a3 & 1) + (a3 >> 1)))) >> 64) >> 1) + (v7 << 31); v9 = a3 * (unsigned __int128)v8; v30 = 0LL; v10 = (long long *)&v31; v11 = 1; v12 = 0; v13 = a3; do { v14 = __CFADD__((v12 & 1) != 0, v13); v15 = ((v12 & 1) != 0) + v13; v12 = v14 | __CFADD__((_QWORD)v9, v15); *v10 = v9 + v15; v13 = 0LL; *(_QWORD *)&v9 = *((_QWORD *)&v9 + 1); v10 = &v30; v16 = (v11 & 1) == 0; v11 = 0; } while ( !v16 ); v17 = v8 - (a3 + v30); v18 = (unsigned int)a2; v19 = *((_QWORD *)this + (unsigned int)a2 - 1); *((_QWORD *)this + v18 - 1) = 0LL; v20 = 8 * v18; do { v21 = *(_QWORD *)((char *)this + v20 - 16); v22 = __PAIR128__(v19, v21) + v17 * (unsigned __int128)v19; v23 = *((_QWORD *)&v22 + 1) + 1LL; v24 = v21 - a3 * (*((_QWORD *)&v22 + 1) + 1LL); if ( v24 > (unsigned long long)v22 ) v23 = *((_QWORD *)&v22 + 1); v25 = 0LL; if ( v24 > (unsigned long long)v22 ) v25 = a3; v26 = v24 + v25; v27 = v23 - ((v26 < a3) - 1LL); v28 = 0LL; if ( v26 >= a3 ) v28 = a3; v19 = v26 - v28; *(_QWORD *)((char *)this + v20 - 16) = v27; v20 -= 8LL; } while ( v20 != 8 ); return v19; }
udivrem_by1: PUSH R14 PUSH RBX SUB RSP,0x18 CMP ESI,0x1 JLE 0x0013df71 MOV RCX,RDX TEST RDX,RDX JNS 0x0013df90 MOV RAX,RCX SHR RAX,0x37 LEA RDX,[0x181850] MOVZX EAX,word ptr [RDX + RAX*0x2 + -0x200] MOV RDX,RCX SHR RDX,0x18 INC RDX MOV R8D,EAX SHL R8D,0xb IMUL EAX,EAX IMUL RAX,RDX SHR RAX,0x28 NOT EAX ADD EAX,R8D IMUL RDX,RAX MOV R8,0x1000000000000000 SUB R8,RDX IMUL R8,RAX SHL RAX,0xd SHR R8,0x2f ADD R8,RAX MOV EDX,ECX AND EDX,0x1 MOV R9,RCX SHR R9,0x1 ADD R9,RDX NEG RDX MOV RAX,R8 SHR RAX,0x1 AND RAX,RDX IMUL R9,R8 SUB RAX,R9 MUL R8 SHR RDX,0x1 SHL R8,0x1f ADD R8,RDX MOV RAX,R8 MUL RCX LEA R9,[RSP + 0x8] MOV qword ptr [R9],0x0 LEA R14,[RSP + 0x10] MOV R10B,0x1 XOR R11D,R11D MOV RBX,RCX LAB_0013dec8: MOVZX R11D,R11B BT R11D,0x0 ADC RBX,RAX SETC R11B MOV qword ptr [R14],RBX XOR EBX,EBX MOV RAX,RDX MOV R14,R9 TEST R10B,0x1 MOV R10D,0x0 JNZ 0x0013dec8 MOV RAX,qword ptr [RSP + 0x8] ADD RAX,RCX SUB R8,RAX MOV R9D,ESI MOV RSI,qword ptr [RDI + R9*0x8 + -0x8] MOV qword ptr [RDI + R9*0x8 + -0x8],0x0 SHL R9,0x3 LAB_0013df0f: MOV R10,qword ptr [RDI + R9*0x1 + -0x10] MOV RAX,RSI MUL R8 ADD RAX,R10 ADC RDX,RSI LEA R11,[RDX + 0x1] MOV RSI,R11 IMUL RSI,RCX SUB R10,RSI CMP R10,RAX CMOVA R11,RDX MOV ESI,0x0 CMOVA RSI,RCX ADD RSI,R10 CMP RSI,RCX SBB R11,-0x1 CMP RSI,RCX MOV EAX,0x0 CMOVNC RAX,RCX SUB RSI,RAX MOV qword ptr [RDI + R9*0x1 + -0x10],R11 ADD R9,-0x8 CMP R9,0x8 JNZ 0x0013df0f MOV RAX,RSI ADD RSP,0x18 POP RBX POP R14 RET LAB_0013df71: LEA RDI,[0x181c57] LEA RSI,[0x181bae] LEA RCX,[0x181c60] MOV EDX,0x644 CALL 0x00121130 LAB_0013df90: LEA RDI,[0x181ca0] LEA RSI,[0x181bae] LEA RCX,[0x181cb7] MOV EDX,0x274 CALL 0x00121130
/* intx::internal::udivrem_by1(unsigned long*, int, unsigned long) */ ulong intx::internal::udivrem_by1(ulong *param_1,int param_2,ulong param_3) { ushort uVar1; long lVar2; int1 auVar3 [16]; int1 auVar4 [16]; int1 auVar5 [16]; int1 auVar6 [16]; int1 auVar7 [16]; int1 auVar8 [16]; int1 auVar9 [16]; bool bVar10; ulong uVar11; long lVar12; long lVar13; ulong uVar14; ulong uVar15; ulong uVar16; bool bVar17; long lVar18; long *plVar19; bool bVar20; long local_20; long local_18; if (param_2 < 2) { /* WARNING: Subroutine does not return */ __assert_fail("len >= 2", "/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O3/_deps/intx-src/include/intx/intx.hpp" ,0x644,"uint64_t intx::internal::udivrem_by1(uint64_t *, int, uint64_t)"); } if ((long)param_3 < 0) { uVar1 = *(ushort *)(&DAT_00181650 + (param_3 >> 0x37) * 2); lVar12 = (param_3 >> 0x18) + 1; uVar11 = (ulong)(~(uint)((ulong)((uint)uVar1 * (uint)uVar1) * lVar12 >> 0x28) + (uint)uVar1 * 0x800); uVar15 = ((0x1000000000000000 - lVar12 * uVar11) * uVar11 >> 0x2f) + uVar11 * 0x2000; uVar11 = (ulong)((uint)param_3 & 1); auVar3._8_8_ = 0; auVar3._0_8_ = (uVar15 >> 1 & -uVar11) - ((param_3 >> 1) + uVar11) * uVar15; auVar6._8_8_ = 0; auVar6._0_8_ = uVar15; uVar16 = uVar15 * 0x80000000 + (SUB168(auVar3 * auVar6,8) >> 1); auVar4._8_8_ = 0; auVar4._0_8_ = uVar16; auVar7._8_8_ = 0; auVar7._0_8_ = param_3; local_20 = 0; bVar20 = false; uVar11 = SUB168(auVar4 * auVar7,0); uVar15 = param_3; plVar19 = &local_18; bVar10 = true; do { bVar17 = bVar10; uVar14 = (ulong)bVar20; bVar20 = CARRY8(uVar15,uVar11) || CARRY8(uVar15 + uVar11,uVar14); *plVar19 = uVar15 + uVar11 + uVar14; uVar15 = 0; uVar11 = SUB168(auVar4 * auVar7,8); plVar19 = &local_20; bVar10 = false; } while (bVar17); uVar15 = (ulong)(uint)param_2; uVar11 = param_1[uVar15 - 1]; param_1[uVar15 - 1] = 0; lVar12 = uVar15 << 3; do { lVar2 = *(long *)((long)param_1 + lVar12 + -0x10); auVar9._8_8_ = uVar11; auVar9._0_8_ = lVar2; auVar5._8_8_ = 0; auVar5._0_8_ = uVar11; auVar8._8_8_ = 0; auVar8._0_8_ = uVar16 - (local_20 + param_3); auVar9 = auVar5 * auVar8 + auVar9; uVar11 = auVar9._0_8_; lVar13 = auVar9._8_8_; lVar18 = lVar13 + 1; uVar15 = lVar2 - lVar18 * param_3; if (uVar11 < uVar15) { lVar18 = lVar13; } uVar14 = 0; if (uVar11 < uVar15) { uVar14 = param_3; } uVar14 = uVar14 + uVar15; uVar11 = 0; if (param_3 <= uVar14) { uVar11 = param_3; } uVar11 = uVar14 - uVar11; *(ulong *)((long)param_1 + lVar12 + -0x10) = (lVar18 + 1) - (ulong)(uVar14 < param_3); lVar12 = lVar12 + -8; } while (lVar12 != 8); return uVar11; } /* WARNING: Subroutine does not return */ __assert_fail("d & 0x8000000000000000", "/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O3/_deps/intx-src/include/intx/intx.hpp" ,0x274,"uint64_t intx::reciprocal_2by1(uint64_t)"); }
33,727
client_mpvio_read_packet
eloqsql/libmariadb/plugins/auth/my_auth.c
static int client_mpvio_read_packet(struct st_plugin_vio *mpv, uchar **buf) { MCPVIO_EXT *mpvio= (MCPVIO_EXT*)mpv; MYSQL *mysql= mpvio->mysql; ulong pkt_len; /* there are cached data left, feed it to a plugin */ if (mpvio->cached_server_reply.pkt) { *buf= mpvio->cached_server_reply.pkt; mpvio->cached_server_reply.pkt= 0; mpvio->packets_read++; return mpvio->cached_server_reply.pkt_len; } if (mpvio->packets_read == 0) { /* the server handshake packet came from the wrong plugin, or it's mysql_change_user(). Either way, there is no data for a plugin to read. send a dummy packet to the server to initiate a dialog. */ if (client_mpvio_write_packet(mpv, 0, 0)) return (int)packet_error; } /* otherwise read the data */ if ((pkt_len= ma_net_safe_read(mysql)) == packet_error) return (int)packet_error; mpvio->last_read_packet_len= pkt_len; *buf= mysql->net.read_pos; /* was it a request to change plugins ? */ if (pkt_len && **buf == 254) return (int)packet_error; /* if yes, this plugin shan't continue */ /* the server sends \1\255 or \1\254 instead of just \255 or \254 - for us to not confuse it with an error or "change plugin" packets. We remove this escaping \1 here. See also server_mpvio_write_packet() where the escaping is done. */ if (pkt_len && **buf == 1) { (*buf)++; pkt_len--; } mpvio->packets_read++; return pkt_len; }
O0
c
client_mpvio_read_packet: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq $0x0, 0x30(%rax) je 0x71956 movq -0x20(%rbp), %rax movq 0x30(%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movq -0x20(%rbp), %rax movq $0x0, 0x30(%rax) movq -0x20(%rbp), %rax movl 0x40(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x40(%rax) movq -0x20(%rbp), %rax movl 0x38(%rax), %eax movl %eax, -0x4(%rbp) jmp 0x71a27 movq -0x20(%rbp), %rax cmpl $0x0, 0x40(%rax) jne 0x71983 movq -0x10(%rbp), %rdi xorl %eax, %eax movl %eax, %edx movq %rdx, %rsi callq 0x71a30 cmpl $0x0, %eax je 0x71981 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x71a27 jmp 0x71983 movq -0x28(%rbp), %rdi callq 0x478c0 movq %rax, -0x30(%rbp) movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rcx, %rax jne 0x719a6 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x71a27 movq -0x30(%rbp), %rax movl %eax, %ecx movq -0x20(%rbp), %rax movl %ecx, 0x4c(%rax) movq -0x28(%rbp), %rax movq 0x20(%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) cmpq $0x0, -0x30(%rbp) je 0x719e3 movq -0x18(%rbp), %rax movq (%rax), %rax movzbl (%rax), %eax cmpl $0xfe, %eax jne 0x719e3 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x71a27 cmpq $0x0, -0x30(%rbp) je 0x71a13 movq -0x18(%rbp), %rax movq (%rax), %rax movzbl (%rax), %eax cmpl $0x1, %eax jne 0x71a13 movq -0x18(%rbp), %rax movq (%rax), %rcx addq $0x1, %rcx movq %rcx, (%rax) movq -0x30(%rbp), %rax addq $-0x1, %rax movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rax movl 0x40(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x40(%rax) movq -0x30(%rbp), %rax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq
client_mpvio_read_packet: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov rax, [rax+18h] mov [rbp+var_28], rax mov rax, [rbp+var_20] cmp qword ptr [rax+30h], 0 jz short loc_71956 mov rax, [rbp+var_20] mov rcx, [rax+30h] mov rax, [rbp+var_18] mov [rax], rcx mov rax, [rbp+var_20] mov qword ptr [rax+30h], 0 mov rax, [rbp+var_20] mov ecx, [rax+40h] add ecx, 1 mov [rax+40h], ecx mov rax, [rbp+var_20] mov eax, [rax+38h] mov [rbp+var_4], eax jmp loc_71A27 loc_71956: mov rax, [rbp+var_20] cmp dword ptr [rax+40h], 0 jnz short loc_71983 mov rdi, [rbp+var_10] xor eax, eax mov edx, eax mov rsi, rdx call client_mpvio_write_packet cmp eax, 0 jz short loc_71981 mov [rbp+var_4], 0FFFFFFFFh jmp loc_71A27 loc_71981: jmp short $+2 loc_71983: mov rdi, [rbp+var_28] call ma_net_safe_read mov [rbp+var_30], rax mov ecx, 0FFFFFFFFh cmp rax, rcx jnz short loc_719A6 mov [rbp+var_4], 0FFFFFFFFh jmp loc_71A27 loc_719A6: mov rax, [rbp+var_30] mov ecx, eax mov rax, [rbp+var_20] mov [rax+4Ch], ecx mov rax, [rbp+var_28] mov rcx, [rax+20h] mov rax, [rbp+var_18] mov [rax], rcx cmp [rbp+var_30], 0 jz short loc_719E3 mov rax, [rbp+var_18] mov rax, [rax] movzx eax, byte ptr [rax] cmp eax, 0FEh jnz short loc_719E3 mov [rbp+var_4], 0FFFFFFFFh jmp short loc_71A27 loc_719E3: cmp [rbp+var_30], 0 jz short loc_71A13 mov rax, [rbp+var_18] mov rax, [rax] movzx eax, byte ptr [rax] cmp eax, 1 jnz short loc_71A13 mov rax, [rbp+var_18] mov rcx, [rax] add rcx, 1 mov [rax], rcx mov rax, [rbp+var_30] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_30], rax loc_71A13: mov rax, [rbp+var_20] mov ecx, [rax+40h] add ecx, 1 mov [rax+40h], ecx mov rax, [rbp+var_30] mov [rbp+var_4], eax loc_71A27: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long client_mpvio_read_packet(long long a1, _QWORD *a2, long long a3, long long a4, int a5, int a6) { long long v7; // [rsp+0h] [rbp-30h] long long v8; // [rsp+8h] [rbp-28h] _QWORD *v9; // [rsp+18h] [rbp-18h] v9 = a2; v8 = *(_QWORD *)(a1 + 24); if ( *(_QWORD *)(a1 + 48) ) { *a2 = *(_QWORD *)(a1 + 48); *(_QWORD *)(a1 + 48) = 0LL; ++*(_DWORD *)(a1 + 64); return *(unsigned int *)(a1 + 56); } else if ( *(_DWORD *)(a1 + 64) || (a2 = 0LL, !(unsigned int)client_mpvio_write_packet(a1, 0LL)) ) { v7 = ma_net_safe_read(v8, (long long)a2, a3, a4, a5, a6); if ( v7 == 0xFFFFFFFFLL ) { return (unsigned int)-1; } else { *(_DWORD *)(a1 + 76) = v7; *v9 = *(_QWORD *)(v8 + 32); if ( v7 && *(unsigned __int8 *)*v9 == 254 ) { return (unsigned int)-1; } else { if ( v7 && *(_BYTE *)*v9 == 1 ) { ++*v9; LODWORD(v7) = v7 - 1; } ++*(_DWORD *)(a1 + 64); return (unsigned int)v7; } } } else { return (unsigned int)-1; } }
client_mpvio_read_packet: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x30],0x0 JZ 0x00171956 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX + 0x30] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x30],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x40] ADD ECX,0x1 MOV dword ptr [RAX + 0x40],ECX MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x38] MOV dword ptr [RBP + -0x4],EAX JMP 0x00171a27 LAB_00171956: MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x40],0x0 JNZ 0x00171983 MOV RDI,qword ptr [RBP + -0x10] XOR EAX,EAX MOV EDX,EAX MOV RSI,RDX CALL 0x00171a30 CMP EAX,0x0 JZ 0x00171981 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00171a27 LAB_00171981: JMP 0x00171983 LAB_00171983: MOV RDI,qword ptr [RBP + -0x28] CALL 0x001478c0 MOV qword ptr [RBP + -0x30],RAX MOV ECX,0xffffffff CMP RAX,RCX JNZ 0x001719a6 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00171a27 LAB_001719a6: MOV RAX,qword ptr [RBP + -0x30] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x4c],ECX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX CMP qword ptr [RBP + -0x30],0x0 JZ 0x001719e3 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOVZX EAX,byte ptr [RAX] CMP EAX,0xfe JNZ 0x001719e3 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00171a27 LAB_001719e3: CMP qword ptr [RBP + -0x30],0x0 JZ 0x00171a13 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOVZX EAX,byte ptr [RAX] CMP EAX,0x1 JNZ 0x00171a13 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX] ADD RCX,0x1 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,-0x1 MOV qword ptr [RBP + -0x30],RAX LAB_00171a13: MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x40] ADD ECX,0x1 MOV dword ptr [RAX + 0x40],ECX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x4],EAX LAB_00171a27: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 client_mpvio_read_packet(long param_1,long *param_2) { long lVar1; int iVar2; long local_38; int4 local_c; lVar1 = *(long *)(param_1 + 0x18); if (*(long *)(param_1 + 0x30) == 0) { if ((*(int *)(param_1 + 0x40) == 0) && (iVar2 = client_mpvio_write_packet(param_1,0), iVar2 != 0)) { local_c = 0xffffffff; } else { local_38 = ma_net_safe_read(lVar1); if (local_38 == 0xffffffff) { local_c = 0xffffffff; } else { *(int *)(param_1 + 0x4c) = (int)local_38; *param_2 = *(long *)(lVar1 + 0x20); if ((local_38 == 0) || (*(char *)*param_2 != -2)) { if ((local_38 != 0) && (*(char *)*param_2 == '\x01')) { *param_2 = *param_2 + 1; local_38 = local_38 + -1; } *(int *)(param_1 + 0x40) = *(int *)(param_1 + 0x40) + 1; local_c = (int4)local_38; } else { local_c = 0xffffffff; } } } } else { *param_2 = *(long *)(param_1 + 0x30); *(int8 *)(param_1 + 0x30) = 0; *(int *)(param_1 + 0x40) = *(int *)(param_1 + 0x40) + 1; local_c = *(int4 *)(param_1 + 0x38); } return local_c; }
33,728
ma_stmt_execute_generate_request
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
unsigned char* ma_stmt_execute_generate_request(MYSQL_STMT *stmt, size_t *request_len, my_bool internal) { unsigned char *buf; if (stmt->request_buffer) { *request_len= stmt->request_length; buf= stmt->request_buffer; /* store actual stmt id */ int4store(buf, stmt->stmt_id); /* clear buffer, memory will be freed in execute */ stmt->request_buffer= NULL; stmt->request_length= 0; return buf; } if (stmt->array_size > 0) buf= ma_stmt_execute_generate_bulk_request(stmt, request_len); else buf= ma_stmt_execute_generate_simple_request(stmt, request_len); if (internal) { if (stmt->request_buffer) free(stmt->request_buffer); stmt->request_buffer= buf; stmt->request_length= *request_len; } return buf; }
O0
c
ma_stmt_execute_generate_request: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb %dl, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movb %al, -0x19(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x360(%rax) je 0x4294f movq -0x10(%rbp), %rax movq 0x398(%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movq 0x360(%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, (%rax) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax shrq $0x8, %rax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, 0x1(%rax) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax shrq $0x10, %rax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, 0x2(%rax) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax shrq $0x18, %rax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, 0x3(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x360(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x398(%rax) movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x429cd movq -0x10(%rbp), %rax cmpl $0x0, 0x368(%rax) jbe 0x4296f movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x42180 movq %rax, -0x28(%rbp) jmp 0x42980 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x41ab0 movq %rax, -0x28(%rbp) cmpb $0x0, -0x19(%rbp) je 0x429c5 movq -0x10(%rbp), %rax cmpq $0x0, 0x360(%rax) je 0x429a4 movq -0x10(%rbp), %rax movq 0x360(%rax), %rdi callq 0x14530 movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x360(%rax) movq -0x18(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x398(%rax) movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
ma_stmt_execute_generate_request: push rbp mov rbp, rsp sub rsp, 30h mov al, dl mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_19], al mov rax, [rbp+var_10] cmp qword ptr [rax+360h], 0 jz loc_4294F mov rax, [rbp+var_10] mov rcx, [rax+398h] mov rax, [rbp+var_18] mov [rax], rcx mov rax, [rbp+var_10] mov rax, [rax+360h] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rax, [rax+40h] mov cl, al mov rax, [rbp+var_28] mov [rax], cl mov rax, [rbp+var_10] mov rax, [rax+40h] shr rax, 8 mov cl, al mov rax, [rbp+var_28] mov [rax+1], cl mov rax, [rbp+var_10] mov rax, [rax+40h] shr rax, 10h mov cl, al mov rax, [rbp+var_28] mov [rax+2], cl mov rax, [rbp+var_10] mov rax, [rax+40h] shr rax, 18h mov cl, al mov rax, [rbp+var_28] mov [rax+3], cl mov rax, [rbp+var_10] mov qword ptr [rax+360h], 0 mov rax, [rbp+var_10] mov qword ptr [rax+398h], 0 mov rax, [rbp+var_28] mov [rbp+var_8], rax jmp short loc_429CD loc_4294F: mov rax, [rbp+var_10] cmp dword ptr [rax+368h], 0 jbe short loc_4296F mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call ma_stmt_execute_generate_bulk_request mov [rbp+var_28], rax jmp short loc_42980 loc_4296F: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call ma_stmt_execute_generate_simple_request mov [rbp+var_28], rax loc_42980: cmp [rbp+var_19], 0 jz short loc_429C5 mov rax, [rbp+var_10] cmp qword ptr [rax+360h], 0 jz short loc_429A4 mov rax, [rbp+var_10] mov rdi, [rax+360h] call _free loc_429A4: mov rcx, [rbp+var_28] mov rax, [rbp+var_10] mov [rax+360h], rcx mov rax, [rbp+var_18] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax+398h], rcx loc_429C5: mov rax, [rbp+var_28] mov [rbp+var_8], rax loc_429CD: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
char * ma_stmt_execute_generate_request(long long a1, _QWORD *a2, char a3) { long long v4; // [rsp+8h] [rbp-28h] char *bulk_request; // [rsp+8h] [rbp-28h] if ( *(_QWORD *)(a1 + 864) ) { *a2 = *(_QWORD *)(a1 + 920); v4 = *(_QWORD *)(a1 + 864); *(_WORD *)v4 = *(_QWORD *)(a1 + 64); *(_BYTE *)(v4 + 2) = BYTE2(*(_QWORD *)(a1 + 64)); *(_BYTE *)(v4 + 3) = BYTE3(*(_QWORD *)(a1 + 64)); *(_QWORD *)(a1 + 864) = 0LL; *(_QWORD *)(a1 + 920) = 0LL; return (char *)v4; } else { if ( *(_DWORD *)(a1 + 872) ) bulk_request = ma_stmt_execute_generate_bulk_request((_QWORD *)a1, a2); else bulk_request = ma_stmt_execute_generate_simple_request((_QWORD *)a1, a2); if ( a3 ) { if ( *(_QWORD *)(a1 + 864) ) free(*(_QWORD *)(a1 + 864)); *(_QWORD *)(a1 + 864) = bulk_request; *(_QWORD *)(a1 + 920) = *a2; } return bulk_request; } }
ma_stmt_execute_generate_request: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV AL,DL MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV byte ptr [RBP + -0x19],AL MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x360],0x0 JZ 0x0014294f MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x398] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x360] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x360],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x398],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX JMP 0x001429cd LAB_0014294f: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x368],0x0 JBE 0x0014296f MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00142180 MOV qword ptr [RBP + -0x28],RAX JMP 0x00142980 LAB_0014296f: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00141ab0 MOV qword ptr [RBP + -0x28],RAX LAB_00142980: CMP byte ptr [RBP + -0x19],0x0 JZ 0x001429c5 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x360],0x0 JZ 0x001429a4 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x360] CALL 0x00114530 LAB_001429a4: MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x360],RCX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x398],RCX LAB_001429c5: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX LAB_001429cd: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
int1 * ma_stmt_execute_generate_request(long param_1,int8 *param_2,char param_3) { int1 *local_30; int1 *local_10; if (*(long *)(param_1 + 0x360) == 0) { if (*(int *)(param_1 + 0x368) == 0) { local_30 = (int1 *)ma_stmt_execute_generate_simple_request(param_1,param_2); } else { local_30 = (int1 *)ma_stmt_execute_generate_bulk_request(param_1,param_2); } if (param_3 != '\0') { if (*(long *)(param_1 + 0x360) != 0) { free(*(void **)(param_1 + 0x360)); } *(int1 **)(param_1 + 0x360) = local_30; *(int8 *)(param_1 + 0x398) = *param_2; } local_10 = local_30; } else { *param_2 = *(int8 *)(param_1 + 0x398); local_10 = *(int1 **)(param_1 + 0x360); *local_10 = (char)*(int8 *)(param_1 + 0x40); local_10[1] = (char)((ulong)*(int8 *)(param_1 + 0x40) >> 8); local_10[2] = (char)((ulong)*(int8 *)(param_1 + 0x40) >> 0x10); local_10[3] = (char)((ulong)*(int8 *)(param_1 + 0x40) >> 0x18); *(int8 *)(param_1 + 0x360) = 0; *(int8 *)(param_1 + 0x398) = 0; } return local_10; }
33,729
my_strnncollsp_8bit_bin
eloqsql/strings/ctype-bin.c
static int my_strnncollsp_8bit_bin(CHARSET_INFO * cs __attribute__((unused)), const uchar *a, size_t a_length, const uchar *b, size_t b_length) { const uchar *end; size_t length; end= a + (length= MY_MIN(a_length, b_length)); while (a < end) { if (*a++ != *b++) return ((int) a[-1] - (int) b[-1]); } return a_length == b_length ? 0 : a_length < b_length ? -my_strnncollsp_padspace_bin(b, b_length - length) : my_strnncollsp_padspace_bin(a, a_length - length); }
O3
c
my_strnncollsp_8bit_bin: pushq %rbp movq %rsp, %rbp cmpq %r8, %rdx movq %r8, %rdi cmovbq %rdx, %rdi leaq (%rsi,%rdi), %r9 cmpq %r9, %rsi jae 0xac8c9 movzbl (%rsi), %eax incq %rsi movzbl (%rcx), %r10d incq %rcx cmpb %r10b, %al je 0xac8ad subl %r10d, %eax jmp 0xac8d0 xorl %eax, %eax cmpq %r8, %rdx jne 0xac8d2 popq %rbp retq jae 0xac8ef subq %rdi, %r8 je 0xac8d0 xorl %edx, %edx xorl %eax, %eax cmpb $0x20, (%rcx,%rdx) jb 0xac90a jne 0xac911 incq %rdx cmpq %rdx, %r8 jne 0xac8dd jmp 0xac8d0 subq %rdi, %rdx je 0xac8d0 xorl %ecx, %ecx xorl %eax, %eax cmpb $0x20, (%rsi,%rcx) jb 0xac911 jne 0xac90a incq %rcx cmpq %rcx, %rdx jne 0xac8f8 jmp 0xac8d0 movl $0x1, %eax jmp 0xac8d0 movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0xac8d0
my_strnncollsp_8bit_bin: push rbp mov rbp, rsp cmp rdx, r8 mov rdi, r8 cmovb rdi, rdx lea r9, [rsi+rdi] loc_AC8AD: cmp rsi, r9 jnb short loc_AC8C9 movzx eax, byte ptr [rsi] inc rsi movzx r10d, byte ptr [rcx] inc rcx cmp al, r10b jz short loc_AC8AD sub eax, r10d jmp short loc_AC8D0 loc_AC8C9: xor eax, eax cmp rdx, r8 jnz short loc_AC8D2 loc_AC8D0: pop rbp retn loc_AC8D2: jnb short loc_AC8EF sub r8, rdi jz short loc_AC8D0 xor edx, edx xor eax, eax loc_AC8DD: cmp byte ptr [rcx+rdx], 20h ; ' ' jb short loc_AC90A jnz short loc_AC911 inc rdx cmp r8, rdx jnz short loc_AC8DD jmp short loc_AC8D0 loc_AC8EF: sub rdx, rdi jz short loc_AC8D0 xor ecx, ecx xor eax, eax loc_AC8F8: cmp byte ptr [rsi+rcx], 20h ; ' ' jb short loc_AC911 jnz short loc_AC90A inc rcx cmp rdx, rcx jnz short loc_AC8F8 jmp short loc_AC8D0 loc_AC90A: mov eax, 1 jmp short loc_AC8D0 loc_AC911: mov eax, 0FFFFFFFFh jmp short loc_AC8D0
long long my_strnncollsp_8bit_bin( long long a1, unsigned __int8 *a2, unsigned long long a3, unsigned __int8 *a4, unsigned long long a5) { unsigned long long v5; // rdi unsigned __int8 *v6; // r9 int v7; // eax int v8; // r10d long long result; // rax unsigned long long v10; // r8 long long v11; // rdx unsigned long long v12; // rdx long long v13; // rcx v5 = a5; if ( a3 < a5 ) v5 = a3; v6 = &a2[v5]; while ( a2 < v6 ) { v7 = *a2++; v8 = *a4++; if ( (_BYTE)v7 != (_BYTE)v8 ) return (unsigned int)(v7 - v8); } result = 0LL; if ( a3 != a5 ) { if ( a3 >= a5 ) { v12 = a3 - v5; if ( v12 ) { v13 = 0LL; result = 0LL; while ( a2[v13] >= 0x20u ) { if ( a2[v13] != 32 ) return 1LL; if ( v12 == ++v13 ) return result; } return 0xFFFFFFFFLL; } } else { v10 = a5 - v5; if ( v10 ) { v11 = 0LL; result = 0LL; while ( a4[v11] >= 0x20u ) { if ( a4[v11] != 32 ) return 0xFFFFFFFFLL; if ( v10 == ++v11 ) return result; } return 1LL; } } } return result; }
my_strnncollsp_8bit_bin: PUSH RBP MOV RBP,RSP CMP RDX,R8 MOV RDI,R8 CMOVC RDI,RDX LEA R9,[RSI + RDI*0x1] LAB_001ac8ad: CMP RSI,R9 JNC 0x001ac8c9 MOVZX EAX,byte ptr [RSI] INC RSI MOVZX R10D,byte ptr [RCX] INC RCX CMP AL,R10B JZ 0x001ac8ad SUB EAX,R10D JMP 0x001ac8d0 LAB_001ac8c9: XOR EAX,EAX CMP RDX,R8 JNZ 0x001ac8d2 LAB_001ac8d0: POP RBP RET LAB_001ac8d2: JNC 0x001ac8ef SUB R8,RDI JZ 0x001ac8d0 XOR EDX,EDX XOR EAX,EAX LAB_001ac8dd: CMP byte ptr [RCX + RDX*0x1],0x20 JC 0x001ac90a JNZ 0x001ac911 INC RDX CMP R8,RDX JNZ 0x001ac8dd JMP 0x001ac8d0 LAB_001ac8ef: SUB RDX,RDI JZ 0x001ac8d0 XOR ECX,ECX XOR EAX,EAX LAB_001ac8f8: CMP byte ptr [RSI + RCX*0x1],0x20 JC 0x001ac911 JNZ 0x001ac90a INC RCX CMP RDX,RCX JNZ 0x001ac8f8 JMP 0x001ac8d0 LAB_001ac90a: MOV EAX,0x1 JMP 0x001ac8d0 LAB_001ac911: MOV EAX,0xffffffff JMP 0x001ac8d0
int my_strnncollsp_8bit_bin (int8 param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5) { byte *pbVar1; byte bVar2; byte bVar3; long lVar4; ulong uVar5; uVar5 = param_5; if (param_3 < param_5) { uVar5 = param_3; } pbVar1 = param_2 + uVar5; while (param_2 < pbVar1) { bVar2 = *param_2; param_2 = param_2 + 1; bVar3 = *param_4; param_4 = param_4 + 1; if (bVar2 != bVar3) { return (uint)bVar2 - (uint)bVar3; } } if (param_3 == param_5) { return 0; } if (param_3 < param_5) { if (param_5 == uVar5) { return 0; } lVar4 = 0; while( true ) { if (param_4[lVar4] < 0x20) { return 1; } if (param_4[lVar4] != 0x20) break; lVar4 = lVar4 + 1; if (param_5 - uVar5 == lVar4) { return 0; } } return -1; } if (param_3 != uVar5) { lVar4 = 0; while( true ) { if (param_2[lVar4] < 0x20) { return -1; } if (param_2[lVar4] != 0x20) break; lVar4 = lVar4 + 1; if (param_3 - uVar5 == lVar4) { return 0; } } return 1; } return 0; }
33,730
strxmov
eloqsql/strings/strxmov.c
char *strxmov(char *dst,const char *src, ...) { va_list pvar; va_start(pvar,src); while (src != NullS) { while ((*dst++ = *src++)) ; dst--; src = va_arg(pvar, char *); } va_end(pvar); *dst = 0; /* there might have been no sources! */ return dst; }
O3
c
strxmov: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl %eax, %r10d movq %rdi, %rax leaq -0xd0(%rbp), %rdi movq %rdx, 0x10(%rdi) movq %rcx, 0x18(%rdi) movq %r8, 0x20(%rdi) movq %r9, 0x28(%rdi) testb %r10b, %r10b je 0xd7280 movaps %xmm0, -0xa0(%rbp) movaps %xmm1, -0x90(%rbp) movaps %xmm2, -0x80(%rbp) movaps %xmm3, -0x70(%rbp) movaps %xmm4, -0x60(%rbp) movaps %xmm5, -0x50(%rbp) movaps %xmm6, -0x40(%rbp) movaps %xmm7, -0x30(%rbp) movq %rdi, -0x10(%rbp) leaq 0x10(%rbp), %rcx movq %rcx, -0x18(%rbp) movabsq $0x3000000010, %rcx # imm = 0x3000000010 movq %rcx, -0x20(%rbp) testq %rsi, %rsi je 0xd72ee movq -0x10(%rbp), %rcx movl -0x20(%rbp), %edx movq -0x18(%rbp), %rdi movq %rdi, %r8 movb (%rsi), %r9b movb %r9b, (%rax) testb %r9b, %r9b jne 0xd72e6 cmpl $0x28, %edx ja 0xd72ce movq %r8, %r9 movl %edx, %r8d addq %rcx, %r8 addl $0x8, %edx movl %edx, -0x20(%rbp) jmp 0xd72d9 leaq 0x8(%r8), %rdi movq %rdi, -0x18(%rbp) movq %rdi, %r9 movq (%r8), %rsi movq %r9, %r8 testq %rsi, %rsi jne 0xd72ad jmp 0xd72ee incq %rax incq %rsi jmp 0xd72aa movb $0x0, (%rax) addq $0x50, %rsp popq %rbp retq nop
strxmov: push rbp mov rbp, rsp sub rsp, 50h mov r10d, eax mov rax, rdi lea rdi, [rbp+var_D0] mov [rdi+10h], rdx mov [rdi+18h], rcx mov [rdi+20h], r8 mov [rdi+28h], r9 test r10b, r10b jz short loc_D7280 movaps [rbp+var_A0], xmm0 movaps [rbp+var_90], xmm1 movaps [rbp+var_80], xmm2 movaps [rbp+var_70], xmm3 movaps [rbp+var_60], xmm4 movaps [rbp+var_50], xmm5 movaps [rbp+var_40], xmm6 movaps [rbp+var_30], xmm7 loc_D7280: mov [rbp+var_10], rdi lea rcx, [rbp+arg_0] mov [rbp+var_18], rcx mov rcx, 3000000010h mov [rbp+var_20], rcx test rsi, rsi jz short loc_D72EE mov rcx, [rbp+var_10] mov edx, dword ptr [rbp+var_20] mov rdi, [rbp+var_18] loc_D72AA: mov r8, rdi loc_D72AD: mov r9b, [rsi] mov [rax], r9b test r9b, r9b jnz short loc_D72E6 cmp edx, 28h ; '(' ja short loc_D72CE mov r9, r8 mov r8d, edx add r8, rcx add edx, 8 mov dword ptr [rbp+var_20], edx jmp short loc_D72D9 loc_D72CE: lea rdi, [r8+8] mov [rbp+var_18], rdi mov r9, rdi loc_D72D9: mov rsi, [r8] mov r8, r9 test rsi, rsi jnz short loc_D72AD jmp short loc_D72EE loc_D72E6: inc rax inc rsi jmp short loc_D72AA loc_D72EE: mov byte ptr [rax], 0 add rsp, 50h pop rbp retn
char *strxmov(char *a1, char *a2, ...) { char *result; // rax char *reg_save_area; // rcx unsigned int gp_offset; // edx char *overflow_arg_area; // rdi char *v6; // r8 char v7; // r9 char *v8; // r9 va_list va; // [rsp+B0h] [rbp-20h] BYREF result = a1; va_start(va, a2); if ( a2 ) { reg_save_area = (char *)va[0].reg_save_area; gp_offset = va[0].gp_offset; overflow_arg_area = (char *)va[0].overflow_arg_area; while ( 1 ) { v6 = overflow_arg_area; while ( 1 ) { v7 = *a2; *result = *a2; if ( v7 ) break; if ( gp_offset > 0x28 ) { overflow_arg_area = v6 + 8; va[0].overflow_arg_area = v6 + 8; v8 = v6 + 8; } else { v8 = v6; v6 = &reg_save_area[gp_offset]; gp_offset += 8; va[0].gp_offset = gp_offset; } a2 = *(char **)v6; v6 = v8; if ( !a2 ) goto LABEL_11; } ++result; ++a2; } } LABEL_11: *result = 0; return result; }
strxmov: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV R10D,EAX MOV RAX,RDI LEA RDI,[RBP + -0xd0] MOV qword ptr [RDI + 0x10],RDX MOV qword ptr [RDI + 0x18],RCX MOV qword ptr [RDI + 0x20],R8 MOV qword ptr [RDI + 0x28],R9 TEST R10B,R10B JZ 0x001d7280 MOVAPS xmmword ptr [RBP + -0xa0],XMM0 MOVAPS xmmword ptr [RBP + -0x90],XMM1 MOVAPS xmmword ptr [RBP + -0x80],XMM2 MOVAPS xmmword ptr [RBP + -0x70],XMM3 MOVAPS xmmword ptr [RBP + -0x60],XMM4 MOVAPS xmmword ptr [RBP + -0x50],XMM5 MOVAPS xmmword ptr [RBP + -0x40],XMM6 MOVAPS xmmword ptr [RBP + -0x30],XMM7 LAB_001d7280: MOV qword ptr [RBP + -0x10],RDI LEA RCX,[RBP + 0x10] MOV qword ptr [RBP + -0x18],RCX MOV RCX,0x3000000010 MOV qword ptr [RBP + -0x20],RCX TEST RSI,RSI JZ 0x001d72ee MOV RCX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x20] MOV RDI,qword ptr [RBP + -0x18] LAB_001d72aa: MOV R8,RDI LAB_001d72ad: MOV R9B,byte ptr [RSI] MOV byte ptr [RAX],R9B TEST R9B,R9B JNZ 0x001d72e6 CMP EDX,0x28 JA 0x001d72ce MOV R9,R8 MOV R8D,EDX ADD R8,RCX ADD EDX,0x8 MOV dword ptr [RBP + -0x20],EDX JMP 0x001d72d9 LAB_001d72ce: LEA RDI,[R8 + 0x8] MOV qword ptr [RBP + -0x18],RDI MOV R9,RDI LAB_001d72d9: MOV RSI,qword ptr [R8] MOV R8,R9 TEST RSI,RSI JNZ 0x001d72ad JMP 0x001d72ee LAB_001d72e6: INC RAX INC RSI JMP 0x001d72aa LAB_001d72ee: MOV byte ptr [RAX],0x0 ADD RSP,0x50 POP RBP RET
void strxmov(char *param_1,char *param_2) { char cVar1; int8 *puVar2; int8 *puVar3; ulong uVar4; int8 *puVar5; int8 local_d8 [22]; uint local_28; puVar2 = (int8 *)&stack0x00000008; if (param_2 != (char *)0x0) { local_28 = 0x10; puVar3 = puVar2; do { for (; cVar1 = *param_2, *param_1 = cVar1, cVar1 != '\0'; param_2 = param_2 + 1) { param_1 = param_1 + 1; puVar3 = puVar2; } if (local_28 < 0x29) { uVar4 = (ulong)local_28; local_28 = local_28 + 8; puVar5 = (int8 *)((long)local_d8 + uVar4); } else { puVar2 = puVar3 + 1; puVar5 = puVar3; puVar3 = puVar2; } param_2 = (char *)*puVar5; } while (param_2 != (char *)0x0); } *param_1 = '\0'; return; }
33,731
common_context_params_to_llama(common_params const&)
monkey531[P]llama/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 0x1a0b0 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 0xfe8(%r14), %al movb %al, 0x60(%rbx) movb 0x1038(%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 0xfee(%r14), %al xorb $0x1, %al movb %al, 0x62(%rbx) movb 0xfe4(%r14), %al movb %al, 0x63(%rbx) movb 0xfe5(%r14), %al movb %al, 0x64(%rbx) cmpb $0x1, 0x1080(%r14) jne 0x755eb movb $0x1, 0x61(%rbx) movl $0x4, 0x1c(%rbx) movq 0xff4(%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+0FE8h] mov [rbx+60h], al mov al, [r14+1038h] 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+0FEEh] xor al, 1 mov [rbx+62h], al mov al, [r14+0FE4h] mov [rbx+63h], al mov al, [r14+0FE5h] mov [rbx+64h], al cmp byte ptr [r14+1080h], 1 jnz short loc_755EB mov byte ptr [rbx+61h], 1 mov dword ptr [rbx+1Ch], 4 loc_755EB: mov rax, [r14+0FF4h] 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 + 4072); *((_BYTE *)a1 + 97) = *(_BYTE *)(a2 + 4152); *(_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 + 4078) ^ 1; *((_BYTE *)a1 + 99) = *(_BYTE *)(a2 + 4068); *((_BYTE *)a1 + 100) = *(_BYTE *)(a2 + 4069); if ( *(_BYTE *)(a2 + 4224) == 1 ) { *((_BYTE *)a1 + 97) = 1; *((_DWORD *)a1 + 7) = 4; } *((_QWORD *)a1 + 11) = *(_QWORD *)(a2 + 4084); return a1; }
common_context_params_to_llama: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI CALL 0x0011a0b0 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 + 0xfe8] MOV byte ptr [RBX + 0x60],AL MOV AL,byte ptr [R14 + 0x1038] 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 + 0xfee] XOR AL,0x1 MOV byte ptr [RBX + 0x62],AL MOV AL,byte ptr [R14 + 0xfe4] MOV byte ptr [RBX + 0x63],AL MOV AL,byte ptr [R14 + 0xfe5] MOV byte ptr [RBX + 0x64],AL CMP byte ptr [R14 + 0x1080],0x1 JNZ 0x001755eb MOV byte ptr [RBX + 0x61],0x1 MOV dword ptr [RBX + 0x1c],0x4 LAB_001755eb: MOV RAX,qword ptr [R14 + 0xff4] 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 + 0xfe8); param_1[0x61] = *(common_params *)(in_RSI + 0x1038); 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 + 0xfee) ^ 1); param_1[99] = *(common_params *)(in_RSI + 0xfe4); param_1[100] = *(common_params *)(in_RSI + 0xfe5); if (*(char *)(in_RSI + 0x1080) == '\x01') { param_1[0x61] = (common_params)0x1; *(int4 *)(param_1 + 0x1c) = 4; } *(int8 *)(param_1 + 0x58) = *(int8 *)(in_RSI + 0xff4); return param_1; }
33,732
Item_decimal::Item_decimal(THD*, my_decimal const*)
eloqsql/sql/item.cc
Item_decimal::Item_decimal(THD *thd, const my_decimal *value_par): Item_num(thd) { my_decimal2decimal(value_par, &decimal_value); decimals= (uint8) decimal_value.frac; max_length= my_decimal_precision_to_length_no_truncation(decimal_value.intg + decimals, decimals, unsigned_flag); }
O3
cpp
Item_decimal::Item_decimal(THD*, my_decimal const*): pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdx, %r14 movq %rdi, %rbx callq 0x6c2736 leaq 0x9c4193(%rip), %rax # 0x108c330 movq %rax, 0x10(%rbx) movabsq $0x100000005, %rax # imm = 0x100000005 movq %rax, 0x18(%rbx) leaq 0x8a8552(%rip), %rax # 0xf70708 movq %rax, (%rbx) leaq 0x8a8b88(%rip), %rax # 0xf70d48 movq %rax, 0x68(%rbx) leaq 0x70(%rbx), %rcx movl $0x9, 0x78(%rbx) leaq 0x88(%rbx), %rax movq %rax, 0x80(%rbx) cmpq %r14, %rcx je 0x6c820b movq 0x10(%r14), %rdx movq %rdx, 0x10(%rcx) movups (%r14), %xmm0 movups %xmm0, (%rcx) xorl %ecx, %ecx movl 0x18(%r14,%rcx,4), %edx movl %edx, (%rax,%rcx,4) incq %rcx cmpq $0x9, %rcx jne 0x6c81f3 movq %rax, 0x80(%rbx) movl 0x74(%rbx), %eax movzbl %al, %ecx addl 0x70(%rbx), %ecx movb 0xe(%rbx), %dl xorb $0x1, %dl xorl %esi, %esi andw $0xff, %ax movw %ax, 0xc(%rbx) setne %sil addl %ecx, %esi testw %cx, %cx setne %al andb %dl, %al movzbl %al, %eax addl %esi, %eax movzwl %ax, %eax movl %eax, 0x8(%rbx) popq %rbx popq %r14 popq %rbp retq
_ZN12Item_decimalC2EP3THDPK10my_decimal: push rbp; Alternative name is 'Item_decimal::Item_decimal(THD *, my_decimal const*)' mov rbp, rsp push r14 push rbx mov r14, rdx mov rbx, rdi call _ZN4ItemC2EP3THD; Item::Item(THD *) lea rax, my_charset_latin1 mov [rbx+10h], rax mov rax, 100000005h mov [rbx+18h], rax lea rax, off_F70708 mov [rbx], rax lea rax, off_F70D48 mov [rbx+68h], rax lea rcx, [rbx+70h] mov dword ptr [rbx+78h], 9 lea rax, [rbx+88h] mov [rbx+80h], rax cmp rcx, r14 jz short loc_6C820B mov rdx, [r14+10h] mov [rcx+10h], rdx movups xmm0, xmmword ptr [r14] movups xmmword ptr [rcx], xmm0 xor ecx, ecx loc_6C81F3: mov edx, [r14+rcx*4+18h] mov [rax+rcx*4], edx inc rcx cmp rcx, 9 jnz short loc_6C81F3 mov [rbx+80h], rax loc_6C820B: mov eax, [rbx+74h] movzx ecx, al add ecx, [rbx+70h] mov dl, [rbx+0Eh] xor dl, 1 xor esi, esi and ax, 0FFh mov [rbx+0Ch], ax setnz sil add esi, ecx test cx, cx setnz al and al, dl movzx eax, al add eax, esi movzx eax, ax mov [rbx+8], eax pop rbx pop r14 pop rbp retn
void Item_decimal::Item_decimal(Item_decimal *this, THD *a2, const my_decimal *a3) { char *v4; // rax long long i; // rcx int v6; // ecx unsigned __int8 v7; // dl bool v8; // zf Item::Item(this, a2); *((_QWORD *)this + 2) = &my_charset_latin1; *((_QWORD *)this + 3) = 0x100000005LL; *(_QWORD *)this = off_F70708; *((_QWORD *)this + 13) = off_F70D48; *((_DWORD *)this + 30) = 9; v4 = (char *)this + 136; *((_QWORD *)this + 16) = (char *)this + 136; if ( (Item_decimal *)((char *)this + 112) != a3 ) { *((_QWORD *)this + 16) = *((_QWORD *)a3 + 2); *((_OWORD *)this + 7) = *(_OWORD *)a3; for ( i = 0LL; i != 9; ++i ) *(_DWORD *)&v4[4 * i] = *((_DWORD *)a3 + i + 6); *((_QWORD *)this + 16) = v4; } v6 = *((_DWORD *)this + 28) + (unsigned __int8)*((_DWORD *)this + 29); v7 = *((_BYTE *)this + 14) ^ 1; v8 = (unsigned __int16)(unsigned __int8)*((_DWORD *)this + 29) == 0; *((_WORD *)this + 6) = (unsigned __int8)*((_DWORD *)this + 29); *((_DWORD *)this + 2) = (unsigned __int16)(v6 + !v8 + (v7 & ((_WORD)v6 != 0))); }
protocol_send_type: PUSH RBP MOV RBP,RSP XOR EAX,EAX POP RBP RET
/* Type_handler_string_result::protocol_send_type() const */ int8 Type_handler_string_result::protocol_send_type(void) { return 0; }
33,733
js_error_set_stackTraceLimit
bluesky950520[P]quickjs/quickjs.c
static JSValue js_error_set_stackTraceLimit(JSContext *ctx, JSValue this_val, JSValue value) { if (JS_IsUndefined(this_val) || JS_IsNull(this_val)) return JS_ThrowTypeErrorNotAnObject(ctx); int limit; if (JS_ToInt32(ctx, &limit, value) < 0) return JS_EXCEPTION; ctx->error_stack_trace_limit = limit; return JS_UNDEFINED; }
O2
c
js_error_set_stackTraceLimit: pushq %rbx subq $0x10, %rsp movq %rdi, %rbx andl $-0x2, %edx cmpl $0x2, %edx jne 0x5ff51 movq %rbx, %rdi callq 0x1d5e1 jmp 0x5ff76 leaq 0xc(%rsp), %rsi movq %rbx, %rdi movq %rcx, %rdx movq %r8, %rcx callq 0x215d7 testl %eax, %eax js 0x5ff76 movl 0xc(%rsp), %eax movl %eax, 0x138(%rbx) pushq $0x3 jmp 0x5ff78 pushq $0x6 popq %rdx xorl %eax, %eax addq $0x10, %rsp popq %rbx retq
js_error_set_stackTraceLimit: push rbx sub rsp, 10h mov rbx, rdi and edx, 0FFFFFFFEh cmp edx, 2 jnz short loc_5FF51 mov rdi, rbx call JS_ThrowTypeErrorNotAnObject jmp short loc_5FF76 loc_5FF51: lea rsi, [rsp+18h+var_C] mov rdi, rbx mov rdx, rcx mov rcx, r8 call JS_ToInt32 test eax, eax js short loc_5FF76 mov eax, [rsp+18h+var_C] mov [rbx+138h], eax push 3 jmp short loc_5FF78 loc_5FF76: push 6 loc_5FF78: pop rdx xor eax, eax add rsp, 10h pop rbx retn
long long js_error_set_stackTraceLimit( long long a1, long long a2, int a3, _DWORD *a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // rdx char v16; // [rsp+0h] [rbp-18h] _DWORD v17[3]; // [rsp+Ch] [rbp-Ch] BYREF v14 = a3 & 0xFFFFFFFE; if ( (_DWORD)v14 == 2 ) { JS_ThrowTypeErrorNotAnObject(a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, v14, (long long)a4, a5, a6, v16); } else if ( (int)JS_ToInt32(a1, (long long)v17, a4, a5) >= 0 ) { *(_DWORD *)(a1 + 312) = v17[0]; } return 0LL; }
js_error_set_stackTraceLimit: PUSH RBX SUB RSP,0x10 MOV RBX,RDI AND EDX,0xfffffffe CMP EDX,0x2 JNZ 0x0015ff51 MOV RDI,RBX CALL 0x0011d5e1 JMP 0x0015ff76 LAB_0015ff51: LEA RSI,[RSP + 0xc] MOV RDI,RBX MOV RDX,RCX MOV RCX,R8 CALL 0x001215d7 TEST EAX,EAX JS 0x0015ff76 MOV EAX,dword ptr [RSP + 0xc] MOV dword ptr [RBX + 0x138],EAX PUSH 0x3 JMP 0x0015ff78 LAB_0015ff76: PUSH 0x6 LAB_0015ff78: POP RDX XOR EAX,EAX ADD RSP,0x10 POP RBX RET
int1 [16] js_error_set_stackTraceLimit (long param_1,int8 param_2,uint param_3,int8 param_4,int8 param_5) { int1 auVar1 [16]; int iVar2; ulong uStack_20; int4 local_c; if ((param_3 & 0xfffffffe) == 2) { JS_ThrowTypeErrorNotAnObject(param_1); } else { iVar2 = JS_ToInt32(param_1,&local_c,param_4,param_5); if (-1 < iVar2) { *(int4 *)(param_1 + 0x138) = local_c; uStack_20 = 3; goto LAB_0015ff78; } } uStack_20 = 6; LAB_0015ff78: auVar1._8_8_ = 0; auVar1._0_8_ = uStack_20; return auVar1 << 0x40; }
33,734
mi_search_first
eloqsql/storage/myisam/mi_search.c
int _mi_search_first(register MI_INFO *info, register MI_KEYDEF *keyinfo, register my_off_t pos) { uint nod_flag; uchar *page; DBUG_ENTER("_mi_search_first"); if (pos == HA_OFFSET_ERROR) { my_errno=HA_ERR_KEY_NOT_FOUND; info->lastpos= HA_OFFSET_ERROR; DBUG_RETURN(-1); } do { if (!_mi_fetch_keypage(info,keyinfo,pos,DFLT_INIT_HITS,info->buff,0)) { info->lastpos= HA_OFFSET_ERROR; DBUG_RETURN(-1); } nod_flag=mi_test_if_nod(info->buff); page=info->buff+2+nod_flag; } while ((pos=_mi_kpos(nod_flag,page)) != HA_OFFSET_ERROR); if (!(info->lastkey_length=(*keyinfo->get_key)(keyinfo,nod_flag,&page, info->lastkey))) DBUG_RETURN(-1); /* Crashed */ info->int_keypos=page; info->int_maxpos=info->buff+mi_getint(info->buff)-1; info->int_nod_flag=nod_flag; info->int_keytree_version=keyinfo->version; info->last_search_keypage=info->last_keypage; info->page_changed=info->buff_used=0; info->lastpos=_mi_dpos(info,0,info->lastkey+info->lastkey_length); DBUG_PRINT("exit",("found key at %lu", (ulong) info->lastpos)); DBUG_RETURN(0); }
O0
c
mi_search_first: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) cmpq $-0x1, -0x20(%rbp) jne 0xc2331 callq 0xf6090 movl $0x78, (%rax) movq -0x10(%rbp), %rax movq $-0x1, 0x170(%rax) movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xc2503 jmp 0xc2333 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x10(%rbp), %rax movq 0x100(%rax), %r8 movl $0x3, %ecx xorl %r9d, %r9d callq 0xbe020 cmpq $0x0, %rax jne 0xc2378 movq -0x10(%rbp), %rax movq $-0x1, 0x170(%rax) movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xc2503 movq -0x10(%rbp), %rax movq 0x100(%rax), %rax movzbl (%rax), %eax andl $0x80, %eax cmpl $0x0, %eax je 0xc23a2 movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x17c(%rax), %eax movl %eax, -0x34(%rbp) jmp 0xc23a9 xorl %eax, %eax movl %eax, -0x34(%rbp) jmp 0xc23a9 movl -0x34(%rbp), %eax movl %eax, -0x24(%rbp) movq -0x10(%rbp), %rax movq 0x100(%rax), %rax addq $0x2, %rax movl -0x24(%rbp), %ecx addq %rcx, %rax movq %rax, -0x30(%rbp) movl -0x24(%rbp), %edi movq -0x30(%rbp), %rsi callq 0xbef90 movq %rax, -0x20(%rbp) cmpq $-0x1, %rax jne 0xc2333 movq -0x18(%rbp), %rax movq 0x48(%rax), %rax movq -0x18(%rbp), %rdi movl -0x24(%rbp), %esi movq -0x10(%rbp), %rcx movq 0x108(%rcx), %rcx leaq -0x30(%rbp), %rdx callq *%rax movq -0x10(%rbp), %rcx movl %eax, 0x1d8(%rcx) cmpl $0x0, %eax jne 0xc241f jmp 0xc2413 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xc2503 movq -0x30(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x128(%rax) movq -0x10(%rbp), %rax movq 0x100(%rax), %rcx movq -0x10(%rbp), %rax movq 0x100(%rax), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x10(%rbp), %rdx movq 0x100(%rdx), %rdx movzbl (%rdx), %edx movzwl %dx, %edx shll $0x8, %edx orl %edx, %eax movzwl %ax, %eax andl $0x7fff, %eax # imm = 0x7FFF movl %eax, %eax addq %rax, %rcx addq $-0x1, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x130(%rax) movl -0x24(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x138(%rax) movq -0x18(%rbp), %rax movl 0x1c(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x13c(%rax) movq -0x10(%rbp), %rax movq 0x190(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x198(%rax) movq -0x10(%rbp), %rax movb $0x0, 0x33d(%rax) movq -0x10(%rbp), %rax movb $0x0, 0x33c(%rax) movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rax movq 0x108(%rax), %rdx movq -0x10(%rbp), %rax movl 0x1d8(%rax), %eax addq %rax, %rdx xorl %esi, %esi callq 0xbf210 movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x170(%rax) jmp 0xc24fa jmp 0xc24fc movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax)
_mi_search_first: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh jnz short loc_C2331 call _my_thread_var mov dword ptr [rax], 78h ; 'x' mov rax, [rbp+var_10] mov qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh mov [rbp+var_4], 0FFFFFFFFh jmp loc_C2503 loc_C2331: jmp short $+2 loc_C2333: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov rax, [rbp+var_10] mov r8, [rax+100h] mov ecx, 3 xor r9d, r9d call _mi_fetch_keypage cmp rax, 0 jnz short loc_C2378 mov rax, [rbp+var_10] mov qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh mov [rbp+var_4], 0FFFFFFFFh jmp loc_C2503 loc_C2378: mov rax, [rbp+var_10] mov rax, [rax+100h] movzx eax, byte ptr [rax] and eax, 80h cmp eax, 0 jz short loc_C23A2 mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax+17Ch] mov [rbp+var_34], eax jmp short loc_C23A9 loc_C23A2: xor eax, eax mov [rbp+var_34], eax jmp short $+2 loc_C23A9: mov eax, [rbp+var_34] mov [rbp+var_24], eax mov rax, [rbp+var_10] mov rax, [rax+100h] add rax, 2 mov ecx, [rbp+var_24] add rax, rcx mov [rbp+var_30], rax mov edi, [rbp+var_24] mov rsi, [rbp+var_30] call _mi_kpos mov [rbp+var_20], rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz loc_C2333 mov rax, [rbp+var_18] mov rax, [rax+48h] mov rdi, [rbp+var_18] mov esi, [rbp+var_24] mov rcx, [rbp+var_10] mov rcx, [rcx+108h] lea rdx, [rbp+var_30] call rax mov rcx, [rbp+var_10] mov [rcx+1D8h], eax cmp eax, 0 jnz short loc_C241F jmp short $+2 loc_C2413: mov [rbp+var_4], 0FFFFFFFFh jmp loc_C2503 loc_C241F: mov rcx, [rbp+var_30] mov rax, [rbp+var_10] mov [rax+128h], rcx mov rax, [rbp+var_10] mov rcx, [rax+100h] mov rax, [rbp+var_10] mov rax, [rax+100h] movzx eax, byte ptr [rax+1] movzx eax, ax mov rdx, [rbp+var_10] mov rdx, [rdx+100h] movzx edx, byte ptr [rdx] movzx edx, dx shl edx, 8 or eax, edx movzx eax, ax and eax, 7FFFh mov eax, eax add rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov rax, [rbp+var_10] mov [rax+130h], rcx mov ecx, [rbp+var_24] mov rax, [rbp+var_10] mov [rax+138h], ecx mov rax, [rbp+var_18] mov ecx, [rax+1Ch] mov rax, [rbp+var_10] mov [rax+13Ch], ecx mov rax, [rbp+var_10] mov rcx, [rax+190h] mov rax, [rbp+var_10] mov [rax+198h], rcx mov rax, [rbp+var_10] mov byte ptr [rax+33Dh], 0 mov rax, [rbp+var_10] mov byte ptr [rax+33Ch], 0 mov rdi, [rbp+var_10] mov rax, [rbp+var_10] mov rdx, [rax+108h] mov rax, [rbp+var_10] mov eax, [rax+1D8h] add rdx, rax xor esi, esi call _mi_dpos mov rcx, rax mov rax, [rbp+var_10] mov [rax+170h], rcx jmp short $+2 loc_C24FA: jmp short $+2 loc_C24FC: mov [rbp+var_4], 0 loc_C2503: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long mi_search_first(_QWORD *a1, const char *a2, long long a3) { int v3; // eax long long v4; // rax unsigned int v6; // [rsp+Ch] [rbp-34h] long long v7; // [rsp+10h] [rbp-30h] BYREF unsigned int v8; // [rsp+1Ch] [rbp-24h] long long v9; // [rsp+20h] [rbp-20h] const char *v10; // [rsp+28h] [rbp-18h] _QWORD *v11; // [rsp+30h] [rbp-10h] v11 = a1; v10 = a2; v9 = a3; if ( a3 == -1 ) { *(_DWORD *)my_thread_var(a1, a2) = 120; v11[46] = -1LL; return (unsigned int)-1; } else { do { if ( !mi_fetch_keypage(v11, (long long)v10, v9, 3, v11[32], 0) ) { v11[46] = -1LL; return (unsigned int)-1; } if ( (*(_BYTE *)v11[32] & 0x80) != 0 ) v6 = *(_DWORD *)(*v11 + 380LL); else v6 = 0; v8 = v6; v7 = v6 + v11[32] + 2LL; v9 = mi_kpos(v6, v7); } while ( v9 != -1 ); v3 = (*((long long ( **)(const char *, _QWORD, long long *, _QWORD))v10 + 9))(v10, v8, &v7, v11[33]); *((_DWORD *)v11 + 118) = v3; if ( v3 ) { v11[37] = v7; v11[38] = (_byteswap_ushort(*(_WORD *)v11[32]) & 0x7FFF) + v11[32] - 1LL; *((_DWORD *)v11 + 78) = v8; *((_DWORD *)v11 + 79) = *((_DWORD *)v10 + 7); v11[51] = v11[50]; *((_BYTE *)v11 + 829) = 0; *((_BYTE *)v11 + 828) = 0; v4 = mi_dpos((long long)v11, 0, *((unsigned int *)v11 + 118) + v11[33]); v11[46] = v4; return 0; } else { return (unsigned int)-1; } } }
_mi_search_first: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX CMP qword ptr [RBP + -0x20],-0x1 JNZ 0x001c2331 CALL 0x001f6090 MOV dword ptr [RAX],0x78 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x170],-0x1 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001c2503 LAB_001c2331: JMP 0x001c2333 LAB_001c2333: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV R8,qword ptr [RAX + 0x100] MOV ECX,0x3 XOR R9D,R9D CALL 0x001be020 CMP RAX,0x0 JNZ 0x001c2378 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x170],-0x1 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001c2503 LAB_001c2378: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x100] MOVZX EAX,byte ptr [RAX] AND EAX,0x80 CMP EAX,0x0 JZ 0x001c23a2 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x17c] MOV dword ptr [RBP + -0x34],EAX JMP 0x001c23a9 LAB_001c23a2: XOR EAX,EAX MOV dword ptr [RBP + -0x34],EAX JMP 0x001c23a9 LAB_001c23a9: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x100] ADD RAX,0x2 MOV ECX,dword ptr [RBP + -0x24] ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV EDI,dword ptr [RBP + -0x24] MOV RSI,qword ptr [RBP + -0x30] CALL 0x001bef90 MOV qword ptr [RBP + -0x20],RAX CMP RAX,-0x1 JNZ 0x001c2333 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x48] MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x108] LEA RDX,[RBP + -0x30] CALL RAX MOV RCX,qword ptr [RBP + -0x10] MOV dword ptr [RCX + 0x1d8],EAX CMP EAX,0x0 JNZ 0x001c241f JMP 0x001c2413 LAB_001c2413: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001c2503 LAB_001c241f: MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x128],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x100] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x100] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RDX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RDX + 0x100] MOVZX EDX,byte ptr [RDX] MOVZX EDX,DX SHL EDX,0x8 OR EAX,EDX MOVZX EAX,AX AND EAX,0x7fff MOV EAX,EAX ADD RCX,RAX ADD RCX,-0x1 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x130],RCX MOV ECX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x138],ECX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX + 0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x13c],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x190] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x198],RCX MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x33d],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x33c],0x0 MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x108] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x1d8] ADD RDX,RAX XOR ESI,ESI CALL 0x001bf210 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x170],RCX JMP 0x001c24fa LAB_001c24fa: JMP 0x001c24fc LAB_001c24fc: MOV dword ptr [RBP + -0x4],0x0 LAB_001c2503: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int4 _mi_search_first(long *param_1,long param_2,long param_3) { int iVar1; int4 *puVar2; long lVar3; uint local_3c; long local_38; uint local_2c; long local_28; long local_20; long *local_18; int4 local_c; local_28 = param_3; local_20 = param_2; local_18 = param_1; if (param_3 == -1) { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x78; local_18[0x2e] = -1; local_c = 0xffffffff; } else { do { lVar3 = _mi_fetch_keypage(local_18,local_20,local_28,3,local_18[0x20],0); if (lVar3 == 0) { local_18[0x2e] = -1; return 0xffffffff; } if ((*(byte *)local_18[0x20] & 0x80) == 0) { local_3c = 0; } else { local_3c = *(uint *)(*local_18 + 0x17c); } local_2c = local_3c; local_38 = local_18[0x20] + 2 + (ulong)local_3c; local_28 = _mi_kpos(local_3c,local_38); } while (local_28 != -1); iVar1 = (**(code **)(local_20 + 0x48))(local_20,local_2c,&local_38,local_18[0x21]); *(int *)(local_18 + 0x3b) = iVar1; if (iVar1 == 0) { local_c = 0xffffffff; } else { local_18[0x25] = local_38; local_18[0x26] = local_18[0x20] + (ulong)((uint)*(byte *)(local_18[0x20] + 1) | (*(byte *)local_18[0x20] & 0x7f) << 8) + -1 ; *(uint *)(local_18 + 0x27) = local_2c; *(int4 *)((long)local_18 + 0x13c) = *(int4 *)(local_20 + 0x1c); local_18[0x33] = local_18[0x32]; *(int1 *)((long)local_18 + 0x33d) = 0; *(int1 *)((long)local_18 + 0x33c) = 0; lVar3 = _mi_dpos(local_18,0,local_18[0x21] + (ulong)*(uint *)(local_18 + 0x3b)); local_18[0x2e] = lVar3; local_c = 0; } } return local_c; }
33,735
mi_search_first
eloqsql/storage/myisam/mi_search.c
int _mi_search_first(register MI_INFO *info, register MI_KEYDEF *keyinfo, register my_off_t pos) { uint nod_flag; uchar *page; DBUG_ENTER("_mi_search_first"); if (pos == HA_OFFSET_ERROR) { my_errno=HA_ERR_KEY_NOT_FOUND; info->lastpos= HA_OFFSET_ERROR; DBUG_RETURN(-1); } do { if (!_mi_fetch_keypage(info,keyinfo,pos,DFLT_INIT_HITS,info->buff,0)) { info->lastpos= HA_OFFSET_ERROR; DBUG_RETURN(-1); } nod_flag=mi_test_if_nod(info->buff); page=info->buff+2+nod_flag; } while ((pos=_mi_kpos(nod_flag,page)) != HA_OFFSET_ERROR); if (!(info->lastkey_length=(*keyinfo->get_key)(keyinfo,nod_flag,&page, info->lastkey))) DBUG_RETURN(-1); /* Crashed */ info->int_keypos=page; info->int_maxpos=info->buff+mi_getint(info->buff)-1; info->int_nod_flag=nod_flag; info->int_keytree_version=keyinfo->version; info->last_search_keypage=info->last_keypage; info->page_changed=info->buff_used=0; info->lastpos=_mi_dpos(info,0,info->lastkey+info->lastkey_length); DBUG_PRINT("exit",("found key at %lu", (ulong) info->lastpos)); DBUG_RETURN(0); }
O3
c
mi_search_first: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx cmpq $-0x1, %rdx je 0x8601b movq %rdx, %rax movq %rsi, %r14 movq 0x100(%rbx), %r12 movq %rbx, %rdi movq %r14, %rsi movq %rax, %rdx movl $0x3, %ecx movq %r12, %r8 xorl %r9d, %r9d callq 0x83bbc testq %rax, %rax je 0x86026 movq 0x100(%rbx), %r12 xorl %r15d, %r15d cmpb $0x0, (%r12) jns 0x85f6c movq (%rbx), %rax movl 0x17c(%rax), %r15d movl %r15d, %eax leaq (%r12,%rax), %rsi addq $0x2, %rsi movq %rsi, -0x28(%rbp) movl %r15d, %edi callq 0x84536 cmpq $-0x1, %rax jne 0x85f2f movq 0x108(%rbx), %rcx leaq -0x28(%rbp), %rdx movq %r14, %rdi movl %r15d, %esi callq *0x48(%r14) movl %eax, 0x1d8(%rbx) testl %eax, %eax je 0x8604a movq -0x28(%rbp), %rcx movq %rcx, 0x128(%rbx) movq 0x100(%rbx), %rcx movq 0x190(%rbx), %rdx movzbl 0x1(%rcx), %esi movzbl (%rcx), %edi andl $0x7f, %edi shll $0x8, %edi orq %rsi, %rdi addq %rdi, %rcx decq %rcx movq %rcx, 0x130(%rbx) movl %r15d, 0x138(%rbx) movl 0x1c(%r14), %ecx movl %ecx, 0x13c(%rbx) movq %rdx, 0x198(%rbx) movw $0x0, 0x33c(%rbx) movl %eax, %edx addq 0x108(%rbx), %rdx xorl %r14d, %r14d movq %rbx, %rdi xorl %esi, %esi callq 0x84615 jmp 0x86033 callq 0xa1a06 movl $0x78, (%rax) movl $0xffffffff, %r14d # imm = 0xFFFFFFFF movq $-0x1, %rax movq %rax, 0x170(%rbx) movl %r14d, %eax addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0xffffffff, %r14d # imm = 0xFFFFFFFF jmp 0x8603a
_mi_search_first: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov rbx, rdi cmp rdx, 0FFFFFFFFFFFFFFFFh jz loc_8601B mov rax, rdx mov r14, rsi mov r12, [rbx+100h] loc_85F2F: mov rdi, rbx mov rsi, r14 mov rdx, rax mov ecx, 3 mov r8, r12 xor r9d, r9d call _mi_fetch_keypage test rax, rax jz loc_86026 mov r12, [rbx+100h] xor r15d, r15d cmp byte ptr [r12], 0 jns short loc_85F6C mov rax, [rbx] mov r15d, [rax+17Ch] loc_85F6C: mov eax, r15d lea rsi, [r12+rax] add rsi, 2 mov [rbp+var_28], rsi mov edi, r15d call _mi_kpos cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_85F2F mov rcx, [rbx+108h] lea rdx, [rbp+var_28] mov rdi, r14 mov esi, r15d call qword ptr [r14+48h] mov [rbx+1D8h], eax test eax, eax jz loc_8604A mov rcx, [rbp+var_28] mov [rbx+128h], rcx mov rcx, [rbx+100h] mov rdx, [rbx+190h] movzx esi, byte ptr [rcx+1] movzx edi, byte ptr [rcx] and edi, 7Fh shl edi, 8 or rdi, rsi add rcx, rdi dec rcx mov [rbx+130h], rcx mov [rbx+138h], r15d mov ecx, [r14+1Ch] mov [rbx+13Ch], ecx mov [rbx+198h], rdx mov word ptr [rbx+33Ch], 0 mov edx, eax add rdx, [rbx+108h] xor r14d, r14d mov rdi, rbx xor esi, esi call _mi_dpos jmp short loc_86033 loc_8601B: call _my_thread_var mov dword ptr [rax], 78h ; 'x' loc_86026: mov r14d, 0FFFFFFFFh mov rax, 0FFFFFFFFFFFFFFFFh loc_86033: mov [rbx+170h], rax loc_8603A: mov eax, r14d add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_8604A: mov r14d, 0FFFFFFFFh jmp short loc_8603A
long long mi_search_first(long long *a1, long long a2, unsigned long long a3) { unsigned long long v3; // rax char *v4; // r12 unsigned int v5; // r15d unsigned int v6; // eax long long v7; // rdx unsigned int v8; // r14d unsigned long long v9; // rax char *v11; // [rsp+8h] [rbp-28h] BYREF if ( a3 == -1LL ) { *(_DWORD *)my_thread_var(a1, (const char *)a2) = 120; } else { v3 = a3; while ( mi_fetch_keypage(a1, a2, v3) ) { v4 = (char *)a1[32]; v5 = 0; if ( *v4 < 0 ) v5 = *(_DWORD *)(*a1 + 380); v11 = &v4[v5 + 2]; v3 = mi_kpos(v5, (long long)v11); if ( v3 == -1LL ) { v6 = (*(long long ( **)(long long, _QWORD, char **, long long))(a2 + 72))(a2, v5, &v11, a1[33]); *((_DWORD *)a1 + 118) = v6; if ( v6 ) { a1[37] = (long long)v11; v7 = a1[50]; a1[38] = (*(unsigned __int8 *)(a1[32] + 1) | (unsigned long long)((unsigned __int8)(*(_BYTE *)a1[32] & 0x7F) << 8)) + a1[32] - 1; *((_DWORD *)a1 + 78) = v5; *((_DWORD *)a1 + 79) = *(_DWORD *)(a2 + 28); a1[51] = v7; *((_WORD *)a1 + 414) = 0; v8 = 0; v9 = mi_dpos(a1, 0, a1[33] + v6); goto LABEL_11; } return (unsigned int)-1; } } } v8 = -1; v9 = -1LL; LABEL_11: a1[46] = v9; return v8; }
_mi_search_first: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RDI CMP RDX,-0x1 JZ 0x0018601b MOV RAX,RDX MOV R14,RSI MOV R12,qword ptr [RBX + 0x100] LAB_00185f2f: MOV RDI,RBX MOV RSI,R14 MOV RDX,RAX MOV ECX,0x3 MOV R8,R12 XOR R9D,R9D CALL 0x00183bbc TEST RAX,RAX JZ 0x00186026 MOV R12,qword ptr [RBX + 0x100] XOR R15D,R15D CMP byte ptr [R12],0x0 JNS 0x00185f6c MOV RAX,qword ptr [RBX] MOV R15D,dword ptr [RAX + 0x17c] LAB_00185f6c: MOV EAX,R15D LEA RSI,[R12 + RAX*0x1] ADD RSI,0x2 MOV qword ptr [RBP + -0x28],RSI MOV EDI,R15D CALL 0x00184536 CMP RAX,-0x1 JNZ 0x00185f2f MOV RCX,qword ptr [RBX + 0x108] LEA RDX,[RBP + -0x28] MOV RDI,R14 MOV ESI,R15D CALL qword ptr [R14 + 0x48] MOV dword ptr [RBX + 0x1d8],EAX TEST EAX,EAX JZ 0x0018604a MOV RCX,qword ptr [RBP + -0x28] MOV qword ptr [RBX + 0x128],RCX MOV RCX,qword ptr [RBX + 0x100] MOV RDX,qword ptr [RBX + 0x190] MOVZX ESI,byte ptr [RCX + 0x1] MOVZX EDI,byte ptr [RCX] AND EDI,0x7f SHL EDI,0x8 OR RDI,RSI ADD RCX,RDI DEC RCX MOV qword ptr [RBX + 0x130],RCX MOV dword ptr [RBX + 0x138],R15D MOV ECX,dword ptr [R14 + 0x1c] MOV dword ptr [RBX + 0x13c],ECX MOV qword ptr [RBX + 0x198],RDX MOV word ptr [RBX + 0x33c],0x0 MOV EDX,EAX ADD RDX,qword ptr [RBX + 0x108] XOR R14D,R14D MOV RDI,RBX XOR ESI,ESI CALL 0x00184615 JMP 0x00186033 LAB_0018601b: CALL 0x001a1a06 MOV dword ptr [RAX],0x78 LAB_00186026: MOV R14D,0xffffffff MOV RAX,-0x1 LAB_00186033: MOV qword ptr [RBX + 0x170],RAX LAB_0018603a: MOV EAX,R14D ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0018604a: MOV R14D,0xffffffff JMP 0x0018603a
int8 _mi_search_first(long *param_1,long param_2,long param_3) { byte *pbVar1; uint uVar2; long lVar3; int4 *puVar4; char *pcVar5; int8 uVar6; ulong uVar7; char *local_30; if (param_3 == -1) { puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0x78; LAB_00186026: uVar6 = 0xffffffff; lVar3 = -1; } else { pcVar5 = (char *)param_1[0x20]; do { lVar3 = _mi_fetch_keypage(param_1,param_2,param_3,3,pcVar5,0); if (lVar3 == 0) goto LAB_00186026; pcVar5 = (char *)param_1[0x20]; uVar7 = 0; if (*pcVar5 < '\0') { uVar7 = (ulong)*(uint *)(*param_1 + 0x17c); } local_30 = pcVar5 + uVar7 + 2; param_3 = _mi_kpos(uVar7); } while (param_3 != -1); uVar2 = (**(code **)(param_2 + 0x48))(param_2,uVar7,&local_30,param_1[0x21]); *(uint *)(param_1 + 0x3b) = uVar2; if (uVar2 == 0) { return 0xffffffff; } param_1[0x25] = (long)local_30; pbVar1 = (byte *)param_1[0x20]; param_1[0x26] = (long)(pbVar1 + (((ulong)((*pbVar1 & 0x7f) << 8) | (ulong)pbVar1[1]) - 1)); *(int *)(param_1 + 0x27) = (int)uVar7; *(int4 *)((long)param_1 + 0x13c) = *(int4 *)(param_2 + 0x1c); param_1[0x33] = param_1[0x32]; *(int2 *)((long)param_1 + 0x33c) = 0; uVar6 = 0; lVar3 = _mi_dpos(param_1,0,(ulong)uVar2 + param_1[0x21]); } param_1[0x2e] = lVar3; return uVar6; }
33,736
POINTonE2_double
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/e2.c
void blst_p2_add(POINTonE2 *out, const POINTonE2 *a, const POINTonE2 *b) { POINTonE2_add(out, a, b); }
O3
c
POINTonE2_double: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x258, %rsp # imm = 0x258 movq %rsi, %r15 movq %rdi, %r12 movl $0xc0, %r14d leaq (%rdi,%r14), %rbx movl $0x60, %esi movq %rbx, %rdi movq %rbx, -0x30(%rbp) callq 0x70940 movq %rax, -0x38(%rbp) leaq (%r15,%r14), %r13 movl $0x60, %esi movq %r13, %rdi callq 0x70940 movq %rax, %r14 leaq 0x2edc4(%rip), %rdx # 0x8cca0 leaq -0x100(%rbp), %rdi movabsq $-0x760c000300030003, %rcx # imm = 0x89F3FFFCFFFCFFFD movq %rbx, %rsi movq %rdx, %rbx callq 0x73ce0 leaq -0xa0(%rbp), %rdi movq %r13, %rsi movq %rbx, %rdx movabsq $-0x760c000300030003, %rcx # imm = 0x89F3FFFCFFFCFFFD callq 0x73ce0 leaq -0x1c0(%rbp), %rdi movq %r12, %rsi leaq -0xa0(%rbp), %rdx movq %rbx, %rcx movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD callq 0x73ba0 leaq -0x280(%rbp), %rdi movq %r15, %rsi leaq -0x100(%rbp), %rdx movq %rbx, %rcx movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD callq 0x73ba0 leaq -0x160(%rbp), %rdi addq $0x60, %r12 movq %r12, %rsi movq %r13, %rdx movq %rbx, %rcx movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD callq 0x73ba0 leaq -0x220(%rbp), %r12 addq $0x60, %r15 movq %r12, %rdi movq %r15, %rsi movq -0x30(%rbp), %rdx movq %rbx, %rcx movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD movq %r8, %r15 callq 0x73ba0 leaq -0x160(%rbp), %rdi movq %rdi, %rsi leaq -0xa0(%rbp), %rdx movq %rbx, %rcx movq %r15, %r8 callq 0x73ba0 movq %r12, %rdi movq %r12, %rsi leaq -0x100(%rbp), %rdx movq %rbx, %rcx movq %r15, %r8 callq 0x73ba0 movl $0xc0, %edx leaq -0x1c0(%rbp), %rdi leaq -0x280(%rbp), %rsi callq 0x70980 xorq -0x38(%rbp), %r14 xorq $0x1, %r14 andq %r14, %rax addq $0x258, %rsp # imm = 0x258 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
POINTonE2_is_equal: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 258h mov r15, rsi mov r12, rdi mov r14d, 0C0h lea rbx, [rdi+r14] mov esi, 60h ; '`' mov rdi, rbx mov [rbp+var_30], rbx call vec_is_zero_16x mov [rbp+var_38], rax lea r13, [r15+r14] mov esi, 60h ; '`' mov rdi, r13 call vec_is_zero_16x mov r14, rax lea rdx, BLS12_381_P lea rdi, [rbp+var_100] mov rcx, 89F3FFFCFFFCFFFDh mov rsi, rbx mov rbx, rdx call sqr_mont_384x lea rdi, [rbp+var_A0] mov rsi, r13 mov rdx, rbx mov rcx, 89F3FFFCFFFCFFFDh call sqr_mont_384x lea rdi, [rbp+var_1C0] mov rsi, r12 lea rdx, [rbp+var_A0] mov rcx, rbx mov r8, 89F3FFFCFFFCFFFDh call mul_mont_384x lea rdi, [rbp+var_280] mov rsi, r15 lea rdx, [rbp+var_100] mov rcx, rbx mov r8, 89F3FFFCFFFCFFFDh call mul_mont_384x lea rdi, [rbp+var_160] add r12, 60h ; '`' mov rsi, r12 mov rdx, r13 mov rcx, rbx mov r8, 89F3FFFCFFFCFFFDh call mul_mont_384x lea r12, [rbp+var_220] add r15, 60h ; '`' mov rdi, r12 mov rsi, r15 mov rdx, [rbp+var_30] mov rcx, rbx mov r8, 89F3FFFCFFFCFFFDh mov r15, r8 call mul_mont_384x lea rdi, [rbp+var_160] mov rsi, rdi lea rdx, [rbp+var_A0] mov rcx, rbx mov r8, r15 call mul_mont_384x mov rdi, r12 mov rsi, r12 lea rdx, [rbp+var_100] mov rcx, rbx mov r8, r15 call mul_mont_384x mov edx, 0C0h lea rdi, [rbp+var_1C0] lea rsi, [rbp+var_280] call vec_is_equal_16x xor r14, [rbp+var_38] xor r14, 1 and rax, r14 add rsp, 258h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long POINTonE2_is_equal(long long a1, long long a2) { long long v2; // r14 long long is_equal_16x; // rax _BYTE v5[96]; // [rsp+0h] [rbp-280h] BYREF _BYTE v6[96]; // [rsp+60h] [rbp-220h] BYREF _BYTE v7[96]; // [rsp+C0h] [rbp-1C0h] BYREF _BYTE v8[96]; // [rsp+120h] [rbp-160h] BYREF _BYTE v9[96]; // [rsp+180h] [rbp-100h] BYREF _BYTE v10[104]; // [rsp+1E0h] [rbp-A0h] BYREF long long is_zero_16x; // [rsp+248h] [rbp-38h] long long v12; // [rsp+250h] [rbp-30h] v12 = a1 + 192; is_zero_16x = vec_is_zero_16x(a1 + 192, 96LL); v2 = vec_is_zero_16x(a2 + 192, 96LL); sqr_mont_384x(v9, a1 + 192, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); sqr_mont_384x(v10, a2 + 192, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384x(v7, a1, v10, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384x(v5, a2, v9, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384x(v8, a1 + 96, a2 + 192, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384x(v6, a2 + 96, v12, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384x(v8, v8, v10, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384x(v6, v6, v9, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); is_equal_16x = vec_is_equal_16x(v7, v5, 192LL); return (is_zero_16x ^ v2 ^ 1) & is_equal_16x; }
POINTonE2_is_equal: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x258 MOV R15,RSI MOV R12,RDI MOV R14D,0xc0 LEA RBX,[RDI + R14*0x1] MOV ESI,0x60 MOV RDI,RBX MOV qword ptr [RBP + -0x30],RBX CALL 0x00170940 MOV qword ptr [RBP + -0x38],RAX LEA R13,[R15 + R14*0x1] MOV ESI,0x60 MOV RDI,R13 CALL 0x00170940 MOV R14,RAX LEA RDX,[0x18cca0] LEA RDI,[RBP + -0x100] MOV RCX,-0x760c000300030003 MOV RSI,RBX MOV RBX,RDX CALL 0x00173ce0 LEA RDI,[RBP + -0xa0] MOV RSI,R13 MOV RDX,RBX MOV RCX,-0x760c000300030003 CALL 0x00173ce0 LEA RDI,[RBP + -0x1c0] MOV RSI,R12 LEA RDX,[RBP + -0xa0] MOV RCX,RBX MOV R8,-0x760c000300030003 CALL 0x00173ba0 LEA RDI,[RBP + -0x280] MOV RSI,R15 LEA RDX,[RBP + -0x100] MOV RCX,RBX MOV R8,-0x760c000300030003 CALL 0x00173ba0 LEA RDI,[RBP + -0x160] ADD R12,0x60 MOV RSI,R12 MOV RDX,R13 MOV RCX,RBX MOV R8,-0x760c000300030003 CALL 0x00173ba0 LEA R12,[RBP + -0x220] ADD R15,0x60 MOV RDI,R12 MOV RSI,R15 MOV RDX,qword ptr [RBP + -0x30] MOV RCX,RBX MOV R8,-0x760c000300030003 MOV R15,R8 CALL 0x00173ba0 LEA RDI,[RBP + -0x160] MOV RSI,RDI LEA RDX,[RBP + -0xa0] MOV RCX,RBX MOV R8,R15 CALL 0x00173ba0 MOV RDI,R12 MOV RSI,R12 LEA RDX,[RBP + -0x100] MOV RCX,RBX MOV R8,R15 CALL 0x00173ba0 MOV EDX,0xc0 LEA RDI,[RBP + -0x1c0] LEA RSI,[RBP + -0x280] CALL 0x00170980 XOR R14,qword ptr [RBP + -0x38] XOR R14,0x1 AND RAX,R14 ADD RSP,0x258 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong POINTonE2_is_equal(long param_1,long param_2) { long lVar1; long lVar2; ulong uVar3; ulong uVar4; int1 local_288 [96]; int1 local_228 [96]; int1 local_1c8 [96]; int1 local_168 [96]; int1 local_108 [96]; int1 local_a8 [104]; ulong local_40; long local_38; lVar1 = param_1 + 0xc0; local_38 = lVar1; local_40 = vec_is_zero_16x(lVar1,0x60); lVar2 = param_2 + 0xc0; uVar3 = vec_is_zero_16x(lVar2,0x60); sqr_mont_384x(local_108,lVar1,BLS12_381_P,0x89f3fffcfffcfffd); sqr_mont_384x(local_a8,lVar2,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384x(local_1c8,param_1,local_a8,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384x(local_288,param_2,local_108,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384x(local_168,param_1 + 0x60,lVar2,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384x(local_228,param_2 + 0x60,local_38,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384x(local_168,local_168,local_a8,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384x(local_228,local_228,local_108,BLS12_381_P,0x89f3fffcfffcfffd); uVar4 = vec_is_equal_16x(local_1c8,local_288,0xc0); return uVar4 & (uVar3 ^ local_40 ^ 1); }
33,737
count_square
eloqsql/storage/myisam/rt_split.c
static double count_square(const double *a, int n_dim) { const double *end = a + n_dim * 2; double square = 1.0; do { square *= a[1] - a[0]; a += 2; }while (a != end); return square; }
O0
c
count_square: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq -0x8(%rbp), %rax movl -0xc(%rbp), %ecx shll %ecx movslq %ecx, %rcx shlq $0x3, %rcx addq %rcx, %rax movq %rax, -0x18(%rbp) movsd 0x8326e(%rip), %xmm0 # 0x158b28 movsd %xmm0, -0x20(%rbp) movq -0x8(%rbp), %rax movsd 0x8(%rax), %xmm0 movq -0x8(%rbp), %rax subsd (%rax), %xmm0 mulsd -0x20(%rbp), %xmm0 movsd %xmm0, -0x20(%rbp) movq -0x8(%rbp), %rax addq $0x10, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq -0x18(%rbp), %rax jne 0xd58bf movsd -0x20(%rbp), %xmm0 popq %rbp retq nopw (%rax,%rax)
count_square_0: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], esi mov rax, [rbp+var_8] mov ecx, [rbp+var_C] shl ecx, 1 movsxd rcx, ecx shl rcx, 3 add rax, rcx mov [rbp+var_18], rax movsd xmm0, cs:qword_158B28 movsd [rbp+var_20], xmm0 loc_D58BF: mov rax, [rbp+var_8] movsd xmm0, qword ptr [rax+8] mov rax, [rbp+var_8] subsd xmm0, qword ptr [rax] mulsd xmm0, [rbp+var_20] movsd [rbp+var_20], xmm0 mov rax, [rbp+var_8] add rax, 10h mov [rbp+var_8], rax mov rax, [rbp+var_8] cmp rax, [rbp+var_18] jnz short loc_D58BF movsd xmm0, [rbp+var_20] pop rbp retn
double count_square_0(double *a1, int a2) { double v3; // [rsp+0h] [rbp-20h] double *v4; // [rsp+18h] [rbp-8h] v4 = a1; v3 = 1.0; do { v3 = (v4[1] - *v4) * v3; v4 += 2; } while ( v4 != &a1[2 * a2] ); return v3; }
count_square: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0xc] SHL ECX,0x1 MOVSXD RCX,ECX SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOVSD XMM0,qword ptr [0x00258b28] MOVSD qword ptr [RBP + -0x20],XMM0 LAB_001d58bf: MOV RAX,qword ptr [RBP + -0x8] MOVSD XMM0,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x8] SUBSD XMM0,qword ptr [RAX] MULSD XMM0,qword ptr [RBP + -0x20] MOVSD qword ptr [RBP + -0x20],XMM0 MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x10 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x001d58bf MOVSD XMM0,qword ptr [RBP + -0x20] POP RBP RET
double count_square(double *param_1,int param_2) { double local_28; double *local_10; local_28 = DAT_00258b28; local_10 = param_1; do { local_28 = (local_10[1] - *local_10) * local_28; local_10 = local_10 + 2; } while (local_10 != param_1 + (param_2 << 1)); return local_28; }
33,738
ma_pvio_read
eloqsql/libmariadb/libmariadb/ma_pvio.c
ssize_t ma_pvio_read(MARIADB_PVIO *pvio, uchar *buffer, size_t length) { ssize_t r= -1; if (!pvio) return -1; if (IS_PVIO_ASYNC_ACTIVE(pvio)) { r= #if defined(HAVE_TLS) && !defined(HAVE_SCHANNEL) (pvio->ctls) ? ma_tls_read_async(pvio, buffer, length) : #endif (ssize_t)ma_pvio_read_async(pvio, buffer, length); goto end; } else { if (IS_PVIO_ASYNC(pvio)) { /* If switching from non-blocking to blocking API usage, set the socket back to blocking mode. */ my_bool old_mode; ma_pvio_blocking(pvio, TRUE, &old_mode); } } /* secure connection */ #ifdef HAVE_TLS if (pvio->ctls) { r= ma_pvio_tls_read(pvio->ctls, buffer, length); goto end; } #endif if (pvio->methods->read) r= pvio->methods->read(pvio, buffer, length); end: if (pvio_callback) { void (*callback)(int mode, MYSQL *mysql, const uchar *buffer, size_t length); LIST *p= pvio_callback; while (p) { callback= p->data; callback(0, pvio->mysql, buffer, r); p= p->next; } } if (r > 0) pvio->bytes_read+= r; return r; }
O3
c
ma_pvio_read: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp testq %rdi, %rdi je 0x21b43 movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movq 0x40(%rdi), %rdi testq %rdi, %rdi je 0x21b71 movq 0x480(%rdi), %rax testq %rax, %rax je 0x21b71 movq 0x28(%rax), %r13 testq %r13, %r13 je 0x21b4f cmpb $0x0, 0x14(%r13) je 0x21b4f cmpq $0x0, 0x38(%rbx) je 0x21beb movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x2cdba jmp 0x21b9f movq $-0x1, %r12 jmp 0x21bd0 cmpq $0x0, 0x28(%rax) je 0x21b71 movq 0x48(%rbx), %rax movq 0x38(%rax), %rax testq %rax, %rax je 0x21b71 leaq -0x29(%rbp), %rdx movq %rbx, %rdi movl $0x1, %esi callq *%rax movq 0x38(%rbx), %rdi testq %rdi, %rdi je 0x21b87 movq %r14, %rsi movq %r15, %rdx callq 0x222e2 jmp 0x21b9f movq 0x48(%rbx), %rax movq 0x10(%rax), %rax testq %rax, %rax je 0x21be2 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq *%rax movq %rax, %r12 leaq 0x2e97f(%rip), %rax # 0x50528 movq (%rax), %r15 testq %r15, %r15 je 0x21bc7 movq 0x40(%rbx), %rsi xorl %edi, %edi movq %r14, %rdx movq %r12, %rcx callq *0x10(%r15) movq 0x8(%r15), %r15 jmp 0x21bac testq %r12, %r12 jle 0x21bd0 addq %r12, 0x60(%rbx) movq %r12, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq $-0x1, %r12 jmp 0x21ba2 movq 0x48(%rbx), %rax cmpq $0x0, 0x18(%rax) je 0x21cad movl 0x28(%rbx), %eax movl %eax, -0x3c(%rbp) leaq 0x38(%r13), %rax movq %rax, -0x48(%rbp) movq $0x0, -0x38(%rbp) movq $-0x1, %r12 movq 0x48(%rbx), %rax movq 0x18(%rax), %rax testq %rax, %rax je 0x21c33 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq *%rax movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) jns 0x21ca4 callq 0x13060 movl (%rax), %eax cmpl $0xb, %eax je 0x21c4b cmpl $0x4, %eax jne 0x21ca4 movl $0x1, (%r13) movl -0x3c(%rbp), %eax testl %eax, %eax js 0x21c66 movl $0x9, (%r13) movl %eax, 0x10(%r13) movq 0x20(%r13), %rax testq %rax, %rax je 0x21c7a movq 0x28(%r13), %rsi movl $0x1, %edi callq *%rax movq -0x48(%rbp), %rdi callq 0x3225d movq 0x20(%r13), %rax testq %rax, %rax je 0x21c94 movq 0x28(%r13), %rsi xorl %edi, %edi callq *%rax testb $0x8, 0x4(%r13) je 0x21c17 jmp 0x21ba2 movq -0x38(%rbp), %r12 jmp 0x21ba2 movq 0x50(%rbx), %r8 movq $-0x1, %r12 testq %r8, %r8 je 0x21ba2 leaq 0x2e338(%rip), %rax # 0x50000 movq (%rax), %rdx movl $0x138a, %esi # imm = 0x138A xorl %ecx, %ecx xorl %eax, %eax callq *%r8 jmp 0x21ba2
ma_pvio_read: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h test rdi, rdi jz short loc_21B43 mov r15, rdx mov r14, rsi mov rbx, rdi mov rdi, [rdi+40h] test rdi, rdi jz short loc_21B71 mov rax, [rdi+480h] test rax, rax jz short loc_21B71 mov r13, [rax+28h] test r13, r13 jz short loc_21B4F cmp byte ptr [r13+14h], 0 jz short loc_21B4F cmp qword ptr [rbx+38h], 0 jz loc_21BEB mov rdi, rbx mov rsi, r14 mov rdx, r15 call ma_tls_read_async jmp short loc_21B9F loc_21B43: mov r12, 0FFFFFFFFFFFFFFFFh jmp loc_21BD0 loc_21B4F: cmp qword ptr [rax+28h], 0 jz short loc_21B71 mov rax, [rbx+48h] mov rax, [rax+38h] test rax, rax jz short loc_21B71 lea rdx, [rbp+var_29] mov rdi, rbx mov esi, 1 call rax loc_21B71: mov rdi, [rbx+38h] test rdi, rdi jz short loc_21B87 mov rsi, r14 mov rdx, r15 call ma_pvio_tls_read jmp short loc_21B9F loc_21B87: mov rax, [rbx+48h] mov rax, [rax+10h] test rax, rax jz short loc_21BE2 mov rdi, rbx mov rsi, r14 mov rdx, r15 call rax loc_21B9F: mov r12, rax loc_21BA2: lea rax, pvio_callback mov r15, [rax] loc_21BAC: test r15, r15 jz short loc_21BC7 mov rsi, [rbx+40h] xor edi, edi mov rdx, r14 mov rcx, r12 call qword ptr [r15+10h] mov r15, [r15+8] jmp short loc_21BAC loc_21BC7: test r12, r12 jle short loc_21BD0 add [rbx+60h], r12 loc_21BD0: mov rax, r12 add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_21BE2: mov r12, 0FFFFFFFFFFFFFFFFh jmp short loc_21BA2 loc_21BEB: mov rax, [rbx+48h] cmp qword ptr [rax+18h], 0 jz loc_21CAD mov eax, [rbx+28h] mov [rbp+var_3C], eax lea rax, [r13+38h] mov [rbp+var_48], rax mov [rbp+var_38], 0 mov r12, 0FFFFFFFFFFFFFFFFh loc_21C17: mov rax, [rbx+48h] mov rax, [rax+18h] test rax, rax jz short loc_21C33 mov rdi, rbx mov rsi, r14 mov rdx, r15 call rax mov [rbp+var_38], rax loc_21C33: cmp [rbp+var_38], 0 jns short loc_21CA4 call ___errno_location mov eax, [rax] cmp eax, 0Bh jz short loc_21C4B cmp eax, 4 jnz short loc_21CA4 loc_21C4B: mov dword ptr [r13+0], 1 mov eax, [rbp+var_3C] test eax, eax js short loc_21C66 mov dword ptr [r13+0], 9 mov [r13+10h], eax loc_21C66: mov rax, [r13+20h] test rax, rax jz short loc_21C7A mov rsi, [r13+28h] mov edi, 1 call rax loc_21C7A: mov rdi, [rbp+var_48] call my_context_yield mov rax, [r13+20h] test rax, rax jz short loc_21C94 mov rsi, [r13+28h] xor edi, edi call rax loc_21C94: test byte ptr [r13+4], 8 jz loc_21C17 jmp loc_21BA2 loc_21CA4: mov r12, [rbp+var_38] jmp loc_21BA2 loc_21CAD: mov r8, [rbx+50h] mov r12, 0FFFFFFFFFFFFFFFFh test r8, r8 jz loc_21BA2 lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov esi, 138Ah xor ecx, ecx xor eax, eax call r8 jmp loc_21BA2
long long ma_pvio_read(long long a1, long long a2, long long a3) { long long v5; // rdi long long v6; // rax long long v7; // r13 long long async; // rax long long v9; // r12 void ( *v10)(long long, long long, _BYTE *); // rax long long v11; // rdi long long ( *v12)(long long, long long, long long); // rax long long i; // r15 long long ( *v15)(long long, long long, long long); // rax int v16; // eax void ( *v17)(long long, _QWORD); // rax void ( *v18)(_QWORD, _QWORD); // rax void ( *v19)(long long, long long, char *, _QWORD); // r8 int v20; // [rsp+14h] [rbp-3Ch] long long v21; // [rsp+18h] [rbp-38h] _BYTE v22[41]; // [rsp+27h] [rbp-29h] BYREF if ( !a1 ) return -1LL; v5 = *(_QWORD *)(a1 + 64); if ( v5 ) { v6 = *(_QWORD *)(v5 + 1152); if ( v6 ) { v7 = *(_QWORD *)(v6 + 40); if ( v7 && *(_BYTE *)(v7 + 20) ) { if ( !*(_QWORD *)(a1 + 56) ) { if ( *(_QWORD *)(*(_QWORD *)(a1 + 72) + 24LL) ) { v20 = *(_DWORD *)(a1 + 40); v21 = 0LL; v9 = -1LL; while ( 1 ) { v15 = *(long long ( **)(long long, long long, long long))(*(_QWORD *)(a1 + 72) + 24LL); if ( v15 ) v21 = v15(a1, a2, a3); if ( v21 >= 0 ) break; v16 = *(_DWORD *)__errno_location(); if ( v16 != 11 && v16 != 4 ) break; *(_DWORD *)v7 = 1; if ( v20 >= 0 ) { *(_DWORD *)v7 = 9; *(_DWORD *)(v7 + 16) = v20; } v17 = *(void ( **)(long long, _QWORD))(v7 + 32); if ( v17 ) v17(1LL, *(_QWORD *)(v7 + 40)); my_context_yield(v7 + 56); v18 = *(void ( **)(_QWORD, _QWORD))(v7 + 32); if ( v18 ) v18(0LL, *(_QWORD *)(v7 + 40)); if ( (*(_BYTE *)(v7 + 4) & 8) != 0 ) goto LABEL_17; } v9 = v21; } else { v19 = *(void ( **)(long long, long long, char *, _QWORD))(a1 + 80); v9 = -1LL; if ( v19 ) v19(v5, 5002LL, SQLSTATE_UNKNOWN, 0LL); } goto LABEL_17; } async = ma_tls_read_async(a1, a2, a3); goto LABEL_16; } if ( *(_QWORD *)(v6 + 40) ) { v10 = *(void ( **)(long long, long long, _BYTE *))(*(_QWORD *)(a1 + 72) + 56LL); if ( v10 ) v10(a1, 1LL, v22); } } } v11 = *(_QWORD *)(a1 + 56); if ( v11 ) { async = ma_pvio_tls_read(v11, a2, a3); } else { v12 = *(long long ( **)(long long, long long, long long))(*(_QWORD *)(a1 + 72) + 16LL); if ( !v12 ) { v9 = -1LL; goto LABEL_17; } async = v12(a1, a2, a3); } LABEL_16: v9 = async; LABEL_17: for ( i = pvio_callback; i; i = *(_QWORD *)(i + 8) ) (*(void ( **)(_QWORD, _QWORD, long long, long long))(i + 16))(0LL, *(_QWORD *)(a1 + 64), a2, v9); if ( v9 > 0 ) *(_QWORD *)(a1 + 96) += v9; return v9; }
ma_pvio_read: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 TEST RDI,RDI JZ 0x00121b43 MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x40] TEST RDI,RDI JZ 0x00121b71 MOV RAX,qword ptr [RDI + 0x480] TEST RAX,RAX JZ 0x00121b71 MOV R13,qword ptr [RAX + 0x28] TEST R13,R13 JZ 0x00121b4f CMP byte ptr [R13 + 0x14],0x0 JZ 0x00121b4f CMP qword ptr [RBX + 0x38],0x0 JZ 0x00121beb MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x0012cdba JMP 0x00121b9f LAB_00121b43: MOV R12,-0x1 JMP 0x00121bd0 LAB_00121b4f: CMP qword ptr [RAX + 0x28],0x0 JZ 0x00121b71 MOV RAX,qword ptr [RBX + 0x48] MOV RAX,qword ptr [RAX + 0x38] TEST RAX,RAX JZ 0x00121b71 LEA RDX,[RBP + -0x29] MOV RDI,RBX MOV ESI,0x1 CALL RAX LAB_00121b71: MOV RDI,qword ptr [RBX + 0x38] TEST RDI,RDI JZ 0x00121b87 MOV RSI,R14 MOV RDX,R15 CALL 0x001222e2 JMP 0x00121b9f LAB_00121b87: MOV RAX,qword ptr [RBX + 0x48] MOV RAX,qword ptr [RAX + 0x10] TEST RAX,RAX JZ 0x00121be2 MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL RAX LAB_00121b9f: MOV R12,RAX LAB_00121ba2: LEA RAX,[0x150528] MOV R15,qword ptr [RAX] LAB_00121bac: TEST R15,R15 JZ 0x00121bc7 MOV RSI,qword ptr [RBX + 0x40] XOR EDI,EDI MOV RDX,R14 MOV RCX,R12 CALL qword ptr [R15 + 0x10] MOV R15,qword ptr [R15 + 0x8] JMP 0x00121bac LAB_00121bc7: TEST R12,R12 JLE 0x00121bd0 ADD qword ptr [RBX + 0x60],R12 LAB_00121bd0: MOV RAX,R12 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00121be2: MOV R12,-0x1 JMP 0x00121ba2 LAB_00121beb: MOV RAX,qword ptr [RBX + 0x48] CMP qword ptr [RAX + 0x18],0x0 JZ 0x00121cad MOV EAX,dword ptr [RBX + 0x28] MOV dword ptr [RBP + -0x3c],EAX LEA RAX,[R13 + 0x38] MOV qword ptr [RBP + -0x48],RAX MOV qword ptr [RBP + -0x38],0x0 MOV R12,-0x1 LAB_00121c17: MOV RAX,qword ptr [RBX + 0x48] MOV RAX,qword ptr [RAX + 0x18] TEST RAX,RAX JZ 0x00121c33 MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL RAX MOV qword ptr [RBP + -0x38],RAX LAB_00121c33: CMP qword ptr [RBP + -0x38],0x0 JNS 0x00121ca4 CALL 0x00113060 MOV EAX,dword ptr [RAX] CMP EAX,0xb JZ 0x00121c4b CMP EAX,0x4 JNZ 0x00121ca4 LAB_00121c4b: MOV dword ptr [R13],0x1 MOV EAX,dword ptr [RBP + -0x3c] TEST EAX,EAX JS 0x00121c66 MOV dword ptr [R13],0x9 MOV dword ptr [R13 + 0x10],EAX LAB_00121c66: MOV RAX,qword ptr [R13 + 0x20] TEST RAX,RAX JZ 0x00121c7a MOV RSI,qword ptr [R13 + 0x28] MOV EDI,0x1 CALL RAX LAB_00121c7a: MOV RDI,qword ptr [RBP + -0x48] CALL 0x0013225d MOV RAX,qword ptr [R13 + 0x20] TEST RAX,RAX JZ 0x00121c94 MOV RSI,qword ptr [R13 + 0x28] XOR EDI,EDI CALL RAX LAB_00121c94: TEST byte ptr [R13 + 0x4],0x8 JZ 0x00121c17 JMP 0x00121ba2 LAB_00121ca4: MOV R12,qword ptr [RBP + -0x38] JMP 0x00121ba2 LAB_00121cad: MOV R8,qword ptr [RBX + 0x50] MOV R12,-0x1 TEST R8,R8 JZ 0x00121ba2 LEA RAX,[0x150000] MOV RDX,qword ptr [RAX] MOV ESI,0x138a XOR ECX,ECX XOR EAX,EAX CALL R8 JMP 0x00121ba2
long ma_pvio_read(long param_1,int8 param_2,int8 param_3) { int iVar1; long lVar2; int4 *puVar3; code *pcVar4; long lVar5; int *piVar6; long lVar7; long local_40; int1 local_31; if (param_1 == 0) { return -1; } lVar2 = *(long *)(param_1 + 0x40); if ((lVar2 != 0) && (lVar7 = *(long *)(lVar2 + 0x480), lVar7 != 0)) { puVar3 = *(int4 **)(lVar7 + 0x28); if ((puVar3 != (int4 *)0x0) && (*(char *)(puVar3 + 5) != '\0')) { if (*(long *)(param_1 + 0x38) == 0) { if (*(long *)(*(long *)(param_1 + 0x48) + 0x18) == 0) { lVar7 = pvio_callback; lVar5 = -1; if (*(code **)(param_1 + 0x50) != (code *)0x0) { (**(code **)(param_1 + 0x50))(lVar2,0x138a,SQLSTATE_UNKNOWN,0); lVar7 = pvio_callback; } } else { iVar1 = *(int *)(param_1 + 0x28); local_40 = 0; do { pcVar4 = *(code **)(*(long *)(param_1 + 0x48) + 0x18); if (pcVar4 != (code *)0x0) { local_40 = (*pcVar4)(param_1,param_2,param_3); } lVar7 = pvio_callback; lVar5 = local_40; if (-1 < local_40) break; piVar6 = __errno_location(); if ((*piVar6 != 0xb) && (lVar7 = pvio_callback, *piVar6 != 4)) break; *puVar3 = 1; if (-1 < iVar1) { *puVar3 = 9; puVar3[4] = iVar1; } if (*(code **)(puVar3 + 8) != (code *)0x0) { (**(code **)(puVar3 + 8))(1,*(int8 *)(puVar3 + 10)); } my_context_yield(puVar3 + 0xe); if (*(code **)(puVar3 + 8) != (code *)0x0) { (**(code **)(puVar3 + 8))(0,*(int8 *)(puVar3 + 10)); } lVar7 = pvio_callback; lVar5 = -1; } while ((*(byte *)(puVar3 + 1) & 8) == 0); } } else { lVar5 = ma_tls_read_async(param_1,param_2,param_3); lVar7 = pvio_callback; } goto LAB_00121bac; } if ((*(long *)(lVar7 + 0x28) != 0) && (pcVar4 = *(code **)(*(long *)(param_1 + 0x48) + 0x38), pcVar4 != (code *)0x0)) { (*pcVar4)(param_1,1,&local_31); } } if (*(long *)(param_1 + 0x38) == 0) { pcVar4 = *(code **)(*(long *)(param_1 + 0x48) + 0x10); if (pcVar4 == (code *)0x0) { lVar7 = pvio_callback; lVar5 = -1; } else { lVar5 = (*pcVar4)(param_1,param_2,param_3); lVar7 = pvio_callback; } } else { lVar5 = ma_pvio_tls_read(*(long *)(param_1 + 0x38),param_2,param_3); lVar7 = pvio_callback; } LAB_00121bac: for (; lVar7 != 0; lVar7 = *(long *)(lVar7 + 8)) { (**(code **)(lVar7 + 0x10))(0,*(int8 *)(param_1 + 0x40),param_2,lVar5); } if (0 < lVar5) { *(long *)(param_1 + 0x60) = *(long *)(param_1 + 0x60) + lVar5; } return lVar5; }
33,739
js_regexp_constructor_internal
bluesky950520[P]quickjs/quickjs.c
static JSValue js_regexp_constructor_internal(JSContext *ctx, JSValue ctor, JSValue pattern, JSValue bc) { JSValue obj; JSObject *p; JSRegExp *re; /* sanity check */ if (JS_VALUE_GET_TAG(bc) != JS_TAG_STRING || JS_VALUE_GET_TAG(pattern) != JS_TAG_STRING) { JS_ThrowTypeError(ctx, "string expected"); fail: JS_FreeValue(ctx, bc); JS_FreeValue(ctx, pattern); return JS_EXCEPTION; } obj = js_create_from_ctor(ctx, ctor, JS_CLASS_REGEXP); if (JS_IsException(obj)) goto fail; p = JS_VALUE_GET_OBJ(obj); re = &p->u.regexp; re->pattern = JS_VALUE_GET_STRING(pattern); re->bytecode = JS_VALUE_GET_STRING(bc); JS_DefinePropertyValue(ctx, obj, JS_ATOM_lastIndex, js_int32(0), JS_PROP_WRITABLE); return obj; }
O0
c
js_regexp_constructor_internal: subq $0xa8, %rsp leaq 0xb0(%rsp), %rax movq %rax, 0x18(%rsp) movq %rsi, 0x88(%rsp) movq %rdx, 0x90(%rsp) movq %rcx, 0x78(%rsp) movq %r8, 0x80(%rsp) movq %rdi, 0x70(%rsp) movq 0x8(%rax), %rax cmpl $-0x7, %eax jne 0x6c1bc movq 0x80(%rsp), %rax cmpl $-0x7, %eax je 0x6c222 movq 0x70(%rsp), %rdi leaq 0xa8502(%rip), %rsi # 0x1146ca movb $0x0, %al callq 0x335f0 movq %rax, 0x40(%rsp) movq %rdx, 0x48(%rsp) movq 0x18(%rsp), %rax movq 0x70(%rsp), %rdi movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x29f80 movq 0x70(%rsp), %rdi movq 0x78(%rsp), %rsi movq 0x80(%rsp), %rdx callq 0x29f80 movl $0x0, 0x98(%rsp) movq $0x6, 0xa0(%rsp) jmp 0x6c30d movq 0x70(%rsp), %rdi movq 0x88(%rsp), %rsi movq 0x90(%rsp), %rdx movl $0x12, %ecx callq 0x5b0f0 movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x60(%rsp), %rdi movq 0x68(%rsp), %rsi callq 0x29fb0 cmpl $0x0, %eax je 0x6c278 jmp 0x6c1d9 movq 0x18(%rsp), %rax movq 0x60(%rsp), %rcx movq %rcx, 0x58(%rsp) movq 0x58(%rsp), %rcx addq $0x30, %rcx movq %rcx, 0x50(%rsp) movq 0x78(%rsp), %rdx movq 0x50(%rsp), %rcx movq %rdx, (%rcx) movq (%rax), %rcx movq 0x50(%rsp), %rax movq %rcx, 0x8(%rax) movq 0x70(%rsp), %rax movq %rax, 0x10(%rsp) xorl %edi, %edi callq 0x39fb0 movq 0x10(%rsp), %rdi movq %rax, 0x20(%rsp) movq %rdx, 0x28(%rsp) movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx movq 0x20(%rsp), %r8 movq 0x28(%rsp), %r9 movl $0x56, %ecx movl $0x2, (%rsp) callq 0x3d4a0 movq 0x60(%rsp), %rax movq %rax, 0x98(%rsp) movq 0x68(%rsp), %rax movq %rax, 0xa0(%rsp) movq 0x98(%rsp), %rax movq 0xa0(%rsp), %rdx addq $0xa8, %rsp retq nopw %cs:(%rax,%rax)
js_regexp_constructor_internal: sub rsp, 0A8h lea rax, [rsp+0A8h+arg_0] mov [rsp+0A8h+var_90], rax mov [rsp+0A8h+var_20], rsi mov [rsp+0A8h+var_18], rdx mov [rsp+0A8h+var_30], rcx mov [rsp+0A8h+var_28], r8 mov [rsp+0A8h+var_38], rdi mov rax, [rax+8] cmp eax, 0FFFFFFF9h jnz short loc_6C1BC mov rax, [rsp+0A8h+var_28] cmp eax, 0FFFFFFF9h jz short loc_6C222 loc_6C1BC: mov rdi, [rsp+0A8h+var_38] lea rsi, aStringExpected; "string expected" mov al, 0 call JS_ThrowTypeError mov [rsp+0A8h+var_68], rax mov [rsp+0A8h+var_60], rdx loc_6C1D9: mov rax, [rsp+0A8h+var_90] mov rdi, [rsp+0A8h+var_38] mov rsi, [rax] mov rdx, [rax+8] call JS_FreeValue mov rdi, [rsp+0A8h+var_38] mov rsi, [rsp+0A8h+var_30] mov rdx, [rsp+0A8h+var_28] call JS_FreeValue mov dword ptr [rsp+0A8h+var_10], 0 mov [rsp+0A8h+var_8], 6 jmp loc_6C30D loc_6C222: mov rdi, [rsp+0A8h+var_38] mov rsi, [rsp+0A8h+var_20] mov rdx, [rsp+0A8h+var_18] mov ecx, 12h call js_create_from_ctor mov [rsp+0A8h+var_78], rax mov [rsp+0A8h+var_70], rdx mov rax, [rsp+0A8h+var_78] mov [rsp+0A8h+var_48], rax mov rax, [rsp+0A8h+var_70] mov [rsp+0A8h+var_40], rax mov rdi, [rsp+0A8h+var_48] mov rsi, [rsp+0A8h+var_40] call JS_IsException_1 cmp eax, 0 jz short loc_6C278 jmp loc_6C1D9 loc_6C278: mov rax, [rsp+0A8h+var_90] mov rcx, [rsp+0A8h+var_48] mov [rsp+0A8h+var_50], rcx mov rcx, [rsp+0A8h+var_50] add rcx, 30h ; '0' mov [rsp+0A8h+var_58], rcx mov rdx, [rsp+0A8h+var_30] mov rcx, [rsp+0A8h+var_58] mov [rcx], rdx mov rcx, [rax] mov rax, [rsp+0A8h+var_58] mov [rax+8], rcx mov rax, [rsp+0A8h+var_38] mov [rsp+0A8h+var_98], rax xor edi, edi call js_int32 mov rdi, [rsp+0A8h+var_98] mov [rsp+0A8h+var_88], rax mov [rsp+0A8h+var_80], rdx mov rsi, [rsp+0A8h+var_48] mov rdx, [rsp+0A8h+var_40] mov r8, [rsp+0A8h+var_88] mov r9, [rsp+0A8h+var_80] mov ecx, 56h ; 'V' mov [rsp+0A8h+var_A8], 2 call JS_DefinePropertyValue mov rax, [rsp+0A8h+var_48] mov [rsp+0A8h+var_10], rax mov rax, [rsp+0A8h+var_40] mov [rsp+0A8h+var_8], rax loc_6C30D: mov rax, [rsp+0A8h+var_10] mov rdx, [rsp+0A8h+var_8] add rsp, 0A8h retn
long long js_regexp_constructor_internal( 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 a15, long long a16) { long long v16; // rdx long long v17; // rdx __m128 v18; // xmm4 __m128 v19; // xmm5 char v21; // [rsp+0h] [rbp-A8h] _DWORD *v22; // [rsp+20h] [rbp-88h] long long v23; // [rsp+30h] [rbp-78h] long long v24; // [rsp+68h] [rbp-40h] long long v27; // [rsp+98h] [rbp-10h] if ( (_DWORD)a16 == -7 && (_DWORD)a5 == -7 ) { v23 = js_create_from_ctor(a1, a2, a3, 18); v24 = v16; if ( !JS_IsException_1(v23, v16) ) { *(_QWORD *)(v23 + 48) = a4; *(_QWORD *)(v23 + 56) = a15; v22 = (_DWORD *)js_int32(0); JS_DefinePropertyValue(a1, v23, v24, 0x56u, v22, v17, a7, a8, a9, a10, v18, v19, a13, a14, 2); return v23; } } else { JS_ThrowTypeError(a1, (long long)"string expected", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v21); } JS_FreeValue(a1, a15, a16); JS_FreeValue(a1, a4, a5); LODWORD(v27) = 0; return v27; }
js_regexp_constructor_internal: SUB RSP,0xa8 LEA RAX,[RSP + 0xb0] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x88],RSI MOV qword ptr [RSP + 0x90],RDX MOV qword ptr [RSP + 0x78],RCX MOV qword ptr [RSP + 0x80],R8 MOV qword ptr [RSP + 0x70],RDI MOV RAX,qword ptr [RAX + 0x8] CMP EAX,-0x7 JNZ 0x0016c1bc MOV RAX,qword ptr [RSP + 0x80] CMP EAX,-0x7 JZ 0x0016c222 LAB_0016c1bc: MOV RDI,qword ptr [RSP + 0x70] LEA RSI,[0x2146ca] MOV AL,0x0 CALL 0x001335f0 MOV qword ptr [RSP + 0x40],RAX MOV qword ptr [RSP + 0x48],RDX LAB_0016c1d9: MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x00129f80 MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x80] CALL 0x00129f80 MOV dword ptr [RSP + 0x98],0x0 MOV qword ptr [RSP + 0xa0],0x6 JMP 0x0016c30d LAB_0016c222: MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x88] MOV RDX,qword ptr [RSP + 0x90] MOV ECX,0x12 CALL 0x0015b0f0 MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x68],RAX MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x68] CALL 0x00129fb0 CMP EAX,0x0 JZ 0x0016c278 JMP 0x0016c1d9 LAB_0016c278: MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x58],RCX MOV RCX,qword ptr [RSP + 0x58] ADD RCX,0x30 MOV qword ptr [RSP + 0x50],RCX MOV RDX,qword ptr [RSP + 0x78] MOV RCX,qword ptr [RSP + 0x50] MOV qword ptr [RCX],RDX MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x10],RAX XOR EDI,EDI CALL 0x00139fb0 MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RDX MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x68] MOV R8,qword ptr [RSP + 0x20] MOV R9,qword ptr [RSP + 0x28] MOV ECX,0x56 MOV dword ptr [RSP],0x2 CALL 0x0013d4a0 MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x98],RAX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0xa0],RAX LAB_0016c30d: MOV RAX,qword ptr [RSP + 0x98] MOV RDX,qword ptr [RSP + 0xa0] ADD RSP,0xa8 RET
/* WARNING: Restarted to delay deadcode elimination for space: stack */ int1 [16] js_regexp_constructor_internal (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8) { int iVar1; int1 auVar3 [16]; int1 auVar4 [16]; int4 local_10; int4 uStack_c; int8 local_8; long lVar2; if (((int)param_8 == -7) && ((int)param_5 == -7)) { auVar3 = js_create_from_ctor(param_1,param_2,param_3,0x12); local_8 = auVar3._8_8_; lVar2 = auVar3._0_8_; iVar1 = JS_IsException(lVar2,local_8); if (iVar1 == 0) { *(int8 *)(lVar2 + 0x30) = param_4; *(int8 *)(lVar2 + 0x38) = param_7; auVar4 = js_int32(0); JS_DefinePropertyValue(param_1,lVar2,local_8,0x56,auVar4._0_8_,auVar4._8_8_,2); local_10 = auVar3._0_4_; uStack_c = auVar3._4_4_; goto LAB_0016c30d; } } else { JS_ThrowTypeError(param_1,"string expected"); } JS_FreeValue(param_1,param_7,param_8); JS_FreeValue(param_1,param_4,param_5); local_10 = 0; local_8 = 6; LAB_0016c30d: auVar3._4_4_ = uStack_c; auVar3._0_4_ = local_10; auVar3._8_8_ = local_8; return auVar3; }
33,740
js_regexp_constructor_internal
bluesky950520[P]quickjs/quickjs.c
static JSValue js_regexp_constructor_internal(JSContext *ctx, JSValue ctor, JSValue pattern, JSValue bc) { JSValue obj; JSObject *p; JSRegExp *re; /* sanity check */ if (JS_VALUE_GET_TAG(bc) != JS_TAG_STRING || JS_VALUE_GET_TAG(pattern) != JS_TAG_STRING) { JS_ThrowTypeError(ctx, "string expected"); fail: JS_FreeValue(ctx, bc); JS_FreeValue(ctx, pattern); return JS_EXCEPTION; } obj = js_create_from_ctor(ctx, ctor, JS_CLASS_REGEXP); if (JS_IsException(obj)) goto fail; p = JS_VALUE_GET_OBJ(obj); re = &p->u.regexp; re->pattern = JS_VALUE_GET_STRING(pattern); re->bytecode = JS_VALUE_GET_STRING(bc); JS_DefinePropertyValue(ctx, obj, JS_ATOM_lastIndex, js_int32(0), JS_PROP_WRITABLE); return obj; }
O2
c
js_regexp_constructor_internal: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r15 movq %rcx, %r14 movq %rdi, %rbx leaq 0x40(%rsp), %rax movq 0x8(%rax), %r12 movl %r12d, %eax movl $0xfffffff9, %ecx # imm = 0xFFFFFFF9 xorq %rcx, %rax movl %r15d, %edi xorq %rcx, %rdi orq %rax, %rdi je 0x3b5f1 leaq 0x4e049(%rip), %rsi # 0x8962e movq %rbx, %rdi xorl %eax, %eax callq 0x201fd jmp 0x3b605 pushq $0x12 popq %rcx movq %rbx, %rdi callq 0x3400a movq %rdx, %r13 cmpl $0x6, %r13d jne 0x3b62e leaq 0x40(%rsp), %rax movq (%rax), %rsi movq %rbx, %rdi movq %r12, %rdx callq 0x1bbce movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x1bbce pushq $0x6 popq %r13 xorl %ebp, %ebp jmp 0x3b65f movq %rax, %rbp movq %r14, 0x30(%rax) leaq 0x40(%rsp), %rax movq (%rax), %rax movq %rax, 0x38(%rbp) movl $0x2, (%rsp) pushq $0x56 popq %rcx movq %rbx, %rdi movq %rbp, %rsi movq %r13, %rdx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x24422 movq %rbp, %rax movq %r13, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_regexp_constructor_internal: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r15, r8 mov r14, rcx mov rbx, rdi lea rax, [rsp+38h+arg_0] mov r12, [rax+8] mov eax, r12d mov ecx, 0FFFFFFF9h xor rax, rcx mov edi, r15d xor rdi, rcx or rdi, rax jz short loc_3B5F1 lea rsi, aStringExpected; "string expected" mov rdi, rbx xor eax, eax call JS_ThrowTypeError jmp short loc_3B605 loc_3B5F1: push 12h pop rcx mov rdi, rbx call js_create_from_ctor mov r13, rdx cmp r13d, 6 jnz short loc_3B62E loc_3B605: lea rax, [rsp+38h+arg_0] mov rsi, [rax] mov rdi, rbx mov rdx, r12 call JS_FreeValue mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_FreeValue push 6 pop r13 xor ebp, ebp jmp short loc_3B65F loc_3B62E: mov rbp, rax mov [rax+30h], r14 lea rax, [rsp+38h+arg_0] mov rax, [rax] mov [rbp+38h], rax mov [rsp+38h+var_38], 2 push 56h ; 'V' pop rcx mov rdi, rbx mov rsi, rbp mov rdx, r13 xor r8d, r8d xor r9d, r9d call JS_DefinePropertyValue loc_3B65F: mov rax, rbp mov rdx, r13 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long js_regexp_constructor_internal( 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 a15, long long a16) { char v16; // al unsigned long long v19; // rax long long v20; // rdx __m128 v21; // xmm4 __m128 v22; // xmm5 unsigned long long v23; // rbp if ( (unsigned int)a16 ^ 0xFFFFFFF9LL | (unsigned int)a5 ^ 0xFFFFFFF9LL ) { JS_ThrowTypeError( a1, (long long)"string expected", a3, 4294967289LL, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v16); } else { v19 = js_create_from_ctor(a1, a2, a3, 18); if ( (_DWORD)v20 != 6 ) { v23 = v19; *(_QWORD *)(v19 + 48) = a4; *(_QWORD *)(v19 + 56) = a15; JS_DefinePropertyValue(a1, v19, v20, 86LL, 0LL, 0LL, *(double *)a7.m128_u64, a8, a9, a10, v21, v22, a13, a14, 2); return v23; } } JS_FreeValue(a1, a15, a16); JS_FreeValue(a1, a4, a5); return 0LL; }
js_regexp_constructor_internal: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,R8 MOV R14,RCX MOV RBX,RDI LEA RAX,[RSP + 0x40] MOV R12,qword ptr [RAX + 0x8] MOV EAX,R12D MOV ECX,0xfffffff9 XOR RAX,RCX MOV EDI,R15D XOR RDI,RCX OR RDI,RAX JZ 0x0013b5f1 LEA RSI,[0x18962e] MOV RDI,RBX XOR EAX,EAX CALL 0x001201fd JMP 0x0013b605 LAB_0013b5f1: PUSH 0x12 POP RCX MOV RDI,RBX CALL 0x0013400a MOV R13,RDX CMP R13D,0x6 JNZ 0x0013b62e LAB_0013b605: LEA RAX,[RSP + 0x40] MOV RSI,qword ptr [RAX] MOV RDI,RBX MOV RDX,R12 CALL 0x0011bbce MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x0011bbce PUSH 0x6 POP R13 XOR EBP,EBP JMP 0x0013b65f LAB_0013b62e: MOV RBP,RAX MOV qword ptr [RAX + 0x30],R14 LEA RAX,[RSP + 0x40] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + 0x38],RAX MOV dword ptr [RSP],0x2 PUSH 0x56 POP RCX MOV RDI,RBX MOV RSI,RBP MOV RDX,R13 XOR R8D,R8D XOR R9D,R9D CALL 0x00124422 LAB_0013b65f: MOV RAX,RBP MOV RDX,R13 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_regexp_constructor_internal (int8 param_1,int8 param_2,int8 param_3,int8 param_4,ulong param_5 ,int8 param_6,int8 param_7,ulong param_8) { int8 in_RAX; int4 uVar2; long lVar1; int1 auVar3 [16]; uVar2 = (int4)((ulong)in_RAX >> 0x20); if ((param_5 & 0xffffffff) == 0xfffffff9 && (param_8 & 0xffffffff) == 0xfffffff9) { auVar3 = js_create_from_ctor(param_1,param_2,param_3,0x12); lVar1 = auVar3._0_8_; if (auVar3._8_4_ != 6) { *(int8 *)(lVar1 + 0x30) = param_4; *(int8 *)(lVar1 + 0x38) = param_7; JS_DefinePropertyValue(param_1,lVar1,auVar3._8_8_,0x56,0,0,CONCAT44(uVar2,2)); return auVar3; } } else { JS_ThrowTypeError(param_1,"string expected"); } JS_FreeValue(param_1,param_7,param_8); JS_FreeValue(param_1,param_4,param_5); return ZEXT816(6) << 0x40; }
33,741
madb_get_os_character_set
eloqsql/libmariadb/libmariadb/ma_charset.c
const char *madb_get_os_character_set() { unsigned int i= 0; char *p= NULL; #ifdef _WIN32 char codepage[FN_REFLEN]; snprintf(codepage, FN_REFLEN, "%u", GetConsoleCP() ? GetConsoleCP() : GetACP()); p= codepage; #elif defined(HAVE_NL_LANGINFO) && defined(HAVE_SETLOCALE) if (setlocale(LC_CTYPE, "")) p= nl_langinfo(CODESET); #endif if (!p) return MADB_DEFAULT_CHARSET_NAME; while (MADB_OS_CHARSET[i].identifier) { if (MADB_OS_CHARSET[i].supported > MADB_CS_UNSUPPORTED && strcasecmp(MADB_OS_CHARSET[i].identifier, p) == 0) return MADB_OS_CHARSET[i].charset; i++; } return MADB_DEFAULT_CHARSET_NAME; }
O0
c
madb_get_os_character_set: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl $0x0, -0xc(%rbp) movq $0x0, -0x18(%rbp) xorl %edi, %edi leaq 0x73ba1(%rip), %rsi # 0x1128c1 callq 0x3b900 cmpq $0x0, %rax je 0x9ed39 movl $0xe, %edi callq 0x3b870 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) jne 0x9ed50 leaq 0x76f1d(%rip), %rax # 0x115c64 movq %rax, -0x8(%rbp) jmp 0x9ede1 jmp 0x9ed52 movl -0xc(%rbp), %eax movl %eax, %ecx leaq 0x1edfe2(%rip), %rax # 0x28cd40 imulq $0x28, %rcx, %rcx addq %rcx, %rax cmpq $0x0, (%rax) je 0x9edd6 movl -0xc(%rbp), %eax movl %eax, %ecx leaq 0x1edfc9(%rip), %rax # 0x28cd40 imulq $0x28, %rcx, %rcx addq %rcx, %rax movzbl 0x20(%rax), %eax cmpl $0x0, %eax jle 0x9edc8 movl -0xc(%rbp), %eax movl %eax, %ecx leaq 0x1edfad(%rip), %rax # 0x28cd40 imulq $0x28, %rcx, %rcx addq %rcx, %rax movq (%rax), %rdi movq -0x18(%rbp), %rsi callq 0x3b950 cmpl $0x0, %eax jne 0x9edc8 movl -0xc(%rbp), %eax movl %eax, %ecx leaq 0x1edf89(%rip), %rax # 0x28cd40 imulq $0x28, %rcx, %rcx addq %rcx, %rax movq 0x10(%rax), %rax movq %rax, -0x8(%rbp) jmp 0x9ede1 movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) jmp 0x9ed52 leaq 0x76e87(%rip), %rax # 0x115c64 movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
madb_get_os_character_set: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_C], 0 mov [rbp+var_18], 0 xor edi, edi lea rsi, aDumpsAMariadbB+6Bh; "" call _setlocale cmp rax, 0 jz short loc_9ED39 mov edi, 0Eh call _nl_langinfo mov [rbp+var_18], rax loc_9ED39: cmp [rbp+var_18], 0 jnz short loc_9ED50 lea rax, aLatin1; "latin1" mov [rbp+var_8], rax jmp loc_9EDE1 loc_9ED50: jmp short $+2 loc_9ED52: mov eax, [rbp+var_C] mov ecx, eax lea rax, MADB_OS_CHARSET imul rcx, 28h ; '(' add rax, rcx cmp qword ptr [rax], 0 jz short loc_9EDD6 mov eax, [rbp+var_C] mov ecx, eax lea rax, MADB_OS_CHARSET imul rcx, 28h ; '(' add rax, rcx movzx eax, byte ptr [rax+20h] cmp eax, 0 jle short loc_9EDC8 mov eax, [rbp+var_C] mov ecx, eax lea rax, MADB_OS_CHARSET imul rcx, 28h ; '(' add rax, rcx mov rdi, [rax] mov rsi, [rbp+var_18] call _strcasecmp cmp eax, 0 jnz short loc_9EDC8 mov eax, [rbp+var_C] mov ecx, eax lea rax, MADB_OS_CHARSET imul rcx, 28h ; '(' add rax, rcx mov rax, [rax+10h] mov [rbp+var_8], rax jmp short loc_9EDE1 loc_9EDC8: mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax jmp loc_9ED52 loc_9EDD6: lea rax, aLatin1; "latin1" mov [rbp+var_8], rax loc_9EDE1: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
const char *madb_get_os_character_set() { long long v1; // [rsp+8h] [rbp-18h] unsigned int v2; // [rsp+14h] [rbp-Ch] v2 = 0; v1 = 0LL; if ( setlocale(0LL, "") ) v1 = nl_langinfo(14LL); if ( !v1 ) return "latin1"; while ( *(&MADB_OS_CHARSET + 5 * v2) ) { if ( *((_BYTE *)&MADB_OS_CHARSET + 40 * v2 + 32) && !(unsigned int)strcasecmp(*(&MADB_OS_CHARSET + 5 * v2), v1) ) return (const char *)*(&MADB_OS_CHARSET + 5 * v2 + 2); ++v2; } return "latin1"; }
madb_get_os_character_set: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0xc],0x0 MOV qword ptr [RBP + -0x18],0x0 XOR EDI,EDI LEA RSI,[0x2128c1] CALL 0x0013b900 CMP RAX,0x0 JZ 0x0019ed39 MOV EDI,0xe CALL 0x0013b870 MOV qword ptr [RBP + -0x18],RAX LAB_0019ed39: CMP qword ptr [RBP + -0x18],0x0 JNZ 0x0019ed50 LEA RAX,[0x215c64] MOV qword ptr [RBP + -0x8],RAX JMP 0x0019ede1 LAB_0019ed50: JMP 0x0019ed52 LAB_0019ed52: MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX LEA RAX,[0x38cd40] IMUL RCX,RCX,0x28 ADD RAX,RCX CMP qword ptr [RAX],0x0 JZ 0x0019edd6 MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX LEA RAX,[0x38cd40] IMUL RCX,RCX,0x28 ADD RAX,RCX MOVZX EAX,byte ptr [RAX + 0x20] CMP EAX,0x0 JLE 0x0019edc8 MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX LEA RAX,[0x38cd40] IMUL RCX,RCX,0x28 ADD RAX,RCX MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0013b950 CMP EAX,0x0 JNZ 0x0019edc8 MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX LEA RAX,[0x38cd40] IMUL RCX,RCX,0x28 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x8],RAX JMP 0x0019ede1 LAB_0019edc8: MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x1 MOV dword ptr [RBP + -0xc],EAX JMP 0x0019ed52 LAB_0019edd6: LEA RAX,[0x215c64] MOV qword ptr [RBP + -0x8],RAX LAB_0019ede1: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
char * madb_get_os_character_set(void) { int iVar1; char *pcVar2; char *local_20; uint local_14; char *local_10; local_14 = 0; local_20 = (char *)0x0; pcVar2 = setlocale(0,""); if (pcVar2 != (char *)0x0) { local_20 = nl_langinfo(0xe); } if (local_20 != (char *)0x0) { while (*(long *)(MADB_OS_CHARSET + (ulong)local_14 * 0x28) != 0) { if ((MADB_OS_CHARSET[(ulong)local_14 * 0x28 + 0x20] != '\0') && (iVar1 = strcasecmp(*(char **)(MADB_OS_CHARSET + (ulong)local_14 * 0x28),local_20), iVar1 == 0)) { return *(char **)(MADB_OS_CHARSET + (ulong)local_14 * 0x28 + 0x10); } local_14 = local_14 + 1; } } local_10 = "latin1"; return local_10; }
33,742
JS_IsInstanceOf
bluesky950520[P]quickjs/quickjs.c
int JS_IsInstanceOf(JSContext *ctx, JSValue val, JSValue obj) { JSValue method; if (!JS_IsObject(obj)) goto fail; method = JS_GetProperty(ctx, obj, JS_ATOM_Symbol_hasInstance); if (JS_IsException(method)) return -1; if (!JS_IsNull(method) && !JS_IsUndefined(method)) { JSValue ret; ret = JS_CallFree(ctx, method, obj, 1, &val); return JS_ToBoolFree(ctx, ret); } /* legacy case */ if (!JS_IsFunction(ctx, obj)) { fail: JS_ThrowTypeError(ctx, "invalid 'instanceof' right operand"); return -1; } return JS_OrdinaryIsInstanceOf(ctx, val, obj); }
O2
c
JS_IsInstanceOf: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, %r14 movq %rdi, %rbx movq %rsi, 0x8(%rsp) movq %rdx, 0x10(%rsp) pushq $-0x1 popq %rbp cmpl $-0x1, %r14d jne 0x1c1be movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %r13 movq %rbx, %rdi movq %rcx, %rsi movq %r14, %rdx movl $0xdc, %ecx callq 0x1a4c7 leal -0x2(%rdx), %ecx cmpl $0x2, %ecx jae 0x1c1e0 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x1c301 testl %eax, %eax je 0x1c1be movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx movq %r15, %rcx movq %r14, %r8 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1c33e leaq 0x68321(%rip), %rsi # 0x844e6 movq %rbx, %rdi xorl %eax, %eax callq 0x1bad1 movl %ebp, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpl $0x6, %edx je 0x1c1cf leaq 0x8(%rsp), %rcx movq %rcx, (%rsp) pushq $0x1 popq %r9 movq %rbx, %rdi movq %rax, %rsi movq %r15, %rcx movq %r14, %r8 callq 0x1c212 movq %rbx, %rdi movq %rax, %rsi callq 0x1c27e movl %eax, %ebp jmp 0x1c1cf
JS_IsInstanceOf: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, r8 mov rbx, rdi mov [rsp+48h+var_40], rsi mov [rsp+48h+var_38], rdx push 0FFFFFFFFFFFFFFFFh pop rbp cmp r14d, 0FFFFFFFFh jnz short loc_1C1BE mov r15, rcx mov r12, rdx mov r13, rsi mov rdi, rbx mov rsi, rcx mov rdx, r14 mov ecx, 0DCh call JS_GetProperty lea ecx, [rdx-2] cmp ecx, 2 jnb short loc_1C1E0 mov rdi, rbx mov rsi, r15 mov rdx, r14 call JS_IsFunction test eax, eax jz short loc_1C1BE mov rdi, rbx mov rsi, r13 mov rdx, r12 mov rcx, r15 mov r8, r14 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp JS_OrdinaryIsInstanceOf loc_1C1BE: lea rsi, aInvalidInstanc; "invalid 'instanceof' right operand" mov rdi, rbx xor eax, eax call JS_ThrowTypeError loc_1C1CF: mov eax, ebp add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1C1E0: cmp edx, 6 jz short loc_1C1CF lea rcx, [rsp+48h+var_40] mov [rsp+48h+var_48], rcx push 1 pop r9 mov rdi, rbx mov rsi, rax mov rcx, r15 mov r8, r14 call JS_CallFree mov rdi, rbx mov rsi, rax call JS_ToBoolFree mov ebp, eax jmp short loc_1C1CF
long long JS_IsInstanceOf( 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) { unsigned int v15; // ebp int Property; // eax int v19; // edx long long v21; // rax char v22; // [rsp+0h] [rbp-48h] _QWORD v23[8]; // [rsp+8h] [rbp-40h] BYREF v23[0] = a2; v23[1] = a3; v15 = -1; if ( (_DWORD)a5 == -1 ) { Property = JS_GetProperty(a1, a4, -1, 220); if ( (unsigned int)(v19 - 2) >= 2 ) { if ( v19 != 6 ) { v21 = JS_CallFree(a1, Property, v19, a4, a5, 1, (long long)v23); return (unsigned int)JS_ToBoolFree(a1, v21); } return v15; } if ( (unsigned int)JS_IsFunction(a1, a4) ) return JS_OrdinaryIsInstanceOf(a1, a2, a3, a4, a5); } JS_ThrowTypeError( a1, (long long)"invalid 'instanceof' right operand", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v22); return v15; }
JS_IsInstanceOf: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,R8 MOV RBX,RDI MOV qword ptr [RSP + 0x8],RSI MOV qword ptr [RSP + 0x10],RDX PUSH -0x1 POP RBP CMP R14D,-0x1 JNZ 0x0011c1be MOV R15,RCX MOV R12,RDX MOV R13,RSI MOV RDI,RBX MOV RSI,RCX MOV RDX,R14 MOV ECX,0xdc CALL 0x0011a4c7 LEA ECX,[RDX + -0x2] CMP ECX,0x2 JNC 0x0011c1e0 MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x0011c301 TEST EAX,EAX JZ 0x0011c1be MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 MOV RCX,R15 MOV R8,R14 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0011c33e LAB_0011c1be: LEA RSI,[0x1844e6] MOV RDI,RBX XOR EAX,EAX CALL 0x0011bad1 LAB_0011c1cf: MOV EAX,EBP ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011c1e0: CMP EDX,0x6 JZ 0x0011c1cf LEA RCX,[RSP + 0x8] MOV qword ptr [RSP],RCX PUSH 0x1 POP R9 MOV RDI,RBX MOV RSI,RAX MOV RCX,R15 MOV R8,R14 CALL 0x0011c212 MOV RDI,RBX MOV RSI,RAX CALL 0x0011c27e MOV EBP,EAX JMP 0x0011c1cf
ulong JS_IsInstanceOf(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { int iVar1; uint uVar2; ulong uVar3; int8 uVar4; int1 auVar5 [16]; int8 local_40; int8 local_38; uVar3 = 0xffffffffffffffff; local_40 = param_2; local_38 = param_3; if ((int)param_5 == -1) { auVar5 = JS_GetProperty(param_1,param_4,param_5,0xdc); if (1 < auVar5._8_4_ - 2U) { if (auVar5._8_4_ != 6) { uVar4 = JS_CallFree(param_1,auVar5._0_8_,auVar5._8_8_,param_4,param_5,1,&local_40); uVar2 = JS_ToBoolFree(param_1,uVar4); uVar3 = (ulong)uVar2; } goto LAB_0011c1cf; } iVar1 = JS_IsFunction(param_1,param_4,param_5); if (iVar1 != 0) { uVar3 = JS_OrdinaryIsInstanceOf(param_1,param_2,param_3,param_4,param_5); return uVar3; } } JS_ThrowTypeError(param_1,"invalid \'instanceof\' right operand"); LAB_0011c1cf: return uVar3 & 0xffffffff; }
33,743
JS_IsInstanceOf
bluesky950520[P]quickjs/quickjs.c
int JS_IsInstanceOf(JSContext *ctx, JSValue val, JSValue obj) { JSValue method; if (!JS_IsObject(obj)) goto fail; method = JS_GetProperty(ctx, obj, JS_ATOM_Symbol_hasInstance); if (JS_IsException(method)) return -1; if (!JS_IsNull(method) && !JS_IsUndefined(method)) { JSValue ret; ret = JS_CallFree(ctx, method, obj, 1, &val); return JS_ToBoolFree(ctx, ret); } /* legacy case */ if (!JS_IsFunction(ctx, obj)) { fail: JS_ThrowTypeError(ctx, "invalid 'instanceof' right operand"); return -1; } return JS_OrdinaryIsInstanceOf(ctx, val, obj); }
O3
c
JS_IsInstanceOf: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %r8, %r14 movq %rdi, %rbx movq %rsi, (%rsp) movq %rdx, 0x8(%rsp) cmpl $-0x1, %r14d jne 0x22885 movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %r13 movq %rbx, %rdi movq %rcx, %rsi movq %r14, %rdx movl $0xdc, %ecx movq %r15, %r8 movq %r14, %r9 pushq $0x0 pushq $0x0 callq 0x22c0f addq $0x10, %rsp leal -0x2(%rdx), %ecx cmpl $0x2, %ecx jae 0x22803 movzwl 0x6(%r15), %eax cmpl $0xd, %eax je 0x22864 cmpl $0x30, %eax jne 0x22846 movq 0x30(%r15), %rax movzbl 0x20(%rax), %eax jmp 0x22860 movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpl $0x6, %edx je 0x2289b subq $0x8, %rsp leaq 0x8(%rsp), %r10 movq %rbx, %rdi movq %rax, %rsi movq %r15, %rcx movq %r14, %r8 movl $0x1, %r9d pushq %r10 callq 0x228ab addq $0x10, %rsp movq %rbx, %rdi movq %rax, %rsi callq 0x2292e movl %eax, %ecx jmp 0x2289b movq 0x18(%rbx), %rcx movq 0x80(%rcx), %rcx leaq (%rax,%rax,4), %rdx xorl %eax, %eax cmpq $0x0, 0x18(%rcx,%rdx,8) setne %al testl %eax, %eax je 0x22885 movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx movq %r15, %rcx movq %r14, %r8 addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmp 0x22a1e leaq 0x7dcca(%rip), %rsi # 0xa0556 movq %rbx, %rdi xorl %eax, %eax callq 0x2214f movl $0xffffffff, %ecx # imm = 0xFFFFFFFF movl %ecx, %eax addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
JS_IsInstanceOf: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov r14, r8 mov rbx, rdi mov [rsp+38h+var_38], rsi mov [rsp+38h+var_30], rdx cmp r14d, 0FFFFFFFFh jnz loc_22885 mov r15, rcx mov r12, rdx mov r13, rsi mov rdi, rbx mov rsi, rcx mov rdx, r14 mov ecx, 0DCh mov r8, r15 mov r9, r14 push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h lea ecx, [rdx-2] cmp ecx, 2 jnb short loc_22803 movzx eax, word ptr [r15+6] cmp eax, 0Dh jz short loc_22864 cmp eax, 30h ; '0' jnz short loc_22846 mov rax, [r15+30h] movzx eax, byte ptr [rax+20h] jmp short loc_22860 loc_22803: mov ecx, 0FFFFFFFFh cmp edx, 6 jz loc_2289B sub rsp, 8 lea r10, [rsp+40h+var_38] mov rdi, rbx mov rsi, rax mov rcx, r15 mov r8, r14 mov r9d, 1 push r10 call JS_CallFree add rsp, 10h mov rdi, rbx mov rsi, rax call JS_ToBoolFree mov ecx, eax jmp short loc_2289B loc_22846: mov rcx, [rbx+18h] mov rcx, [rcx+80h] lea rdx, [rax+rax*4] xor eax, eax cmp qword ptr [rcx+rdx*8+18h], 0 setnz al loc_22860: test eax, eax jz short loc_22885 loc_22864: mov rdi, rbx mov rsi, r13 mov rdx, r12 mov rcx, r15 mov r8, r14 add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 jmp JS_OrdinaryIsInstanceOf loc_22885: lea rsi, aInvalidInstanc; "invalid 'instanceof' right operand" mov rdi, rbx xor eax, eax call JS_ThrowTypeError mov ecx, 0FFFFFFFFh loc_2289B: mov eax, ecx add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long JS_IsInstanceOf( 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 v15; // r15 long long v16; // r12 int PropertyInternal2; // eax long long v18; // rax int v19; // eax unsigned int v20; // ecx long long v21; // rax _QWORD v23[7]; // [rsp+0h] [rbp-38h] BYREF v23[0] = a2; v23[1] = a3; if ( (_DWORD)a5 == -1 ) { v15 = a4; v16 = a3; PropertyInternal2 = JS_GetPropertyInternal2(a1, a4, -1, 220, a4, -1, 0LL, 0); a4 = (unsigned int)(a3 - 2); if ( (unsigned int)a4 >= 2 ) { v20 = -1; if ( (_DWORD)a3 != 6 ) { v21 = JS_CallFree(a1, PropertyInternal2, a3, v15, a5, 1, (long long)v23); return (unsigned int)JS_ToBoolFree(a1, v21); } return v20; } v18 = *(unsigned __int16 *)(v15 + 6); if ( (_DWORD)v18 == 13 ) return JS_OrdinaryIsInstanceOf(a1, a2, v16, v15, a5); if ( (_DWORD)v18 == 48 ) { v19 = *(unsigned __int8 *)(*(_QWORD *)(v15 + 48) + 32LL); } else { a4 = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 128LL); a3 = 5 * v18; v19 = *(_QWORD *)(a4 + 40 * v18 + 24) != 0LL; } if ( v19 ) return JS_OrdinaryIsInstanceOf(a1, a2, v16, v15, a5); } JS_ThrowTypeError( a1, (long long)"invalid 'instanceof' right operand", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v23[0]); return (unsigned int)-1; }
JS_IsInstanceOf: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R14,R8 MOV RBX,RDI MOV qword ptr [RSP],RSI MOV qword ptr [RSP + 0x8],RDX CMP R14D,-0x1 JNZ 0x00122885 MOV R15,RCX MOV R12,RDX MOV R13,RSI MOV RDI,RBX MOV RSI,RCX MOV RDX,R14 MOV ECX,0xdc MOV R8,R15 MOV R9,R14 PUSH 0x0 PUSH 0x0 CALL 0x00122c0f ADD RSP,0x10 LEA ECX,[RDX + -0x2] CMP ECX,0x2 JNC 0x00122803 MOVZX EAX,word ptr [R15 + 0x6] CMP EAX,0xd JZ 0x00122864 CMP EAX,0x30 JNZ 0x00122846 MOV RAX,qword ptr [R15 + 0x30] MOVZX EAX,byte ptr [RAX + 0x20] JMP 0x00122860 LAB_00122803: MOV ECX,0xffffffff CMP EDX,0x6 JZ 0x0012289b SUB RSP,0x8 LEA R10,[RSP + 0x8] MOV RDI,RBX MOV RSI,RAX MOV RCX,R15 MOV R8,R14 MOV R9D,0x1 PUSH R10 CALL 0x001228ab ADD RSP,0x10 MOV RDI,RBX MOV RSI,RAX CALL 0x0012292e MOV ECX,EAX JMP 0x0012289b LAB_00122846: MOV RCX,qword ptr [RBX + 0x18] MOV RCX,qword ptr [RCX + 0x80] LEA RDX,[RAX + RAX*0x4] XOR EAX,EAX CMP qword ptr [RCX + RDX*0x8 + 0x18],0x0 SETNZ AL LAB_00122860: TEST EAX,EAX JZ 0x00122885 LAB_00122864: MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 MOV RCX,R15 MOV R8,R14 ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 JMP 0x00122a1e LAB_00122885: LEA RSI,[0x1a0556] MOV RDI,RBX XOR EAX,EAX CALL 0x0012214f MOV ECX,0xffffffff LAB_0012289b: MOV EAX,ECX ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
ulong JS_IsInstanceOf(long param_1,int8 param_2,int8 param_3,long param_4, int8 param_5) { ushort uVar1; uint uVar2; int8 uVar3; ulong uVar4; char cVar5; int1 auVar6 [16]; int8 local_38; int8 local_30; local_38 = param_2; local_30 = param_3; if ((int)param_5 != -1) { LAB_00122885: JS_ThrowTypeError(param_1,"invalid \'instanceof\' right operand"); return 0xffffffff; } auVar6 = JS_GetPropertyInternal2(param_1,param_4,param_5,0xdc,param_4,param_5,0,0); if (1 < auVar6._8_4_ - 2U) { if (auVar6._8_4_ == 6) { return 0xffffffff; } uVar3 = JS_CallFree(param_1,auVar6._0_8_,auVar6._8_8_,param_4,param_5,1,&local_38); uVar2 = JS_ToBoolFree(param_1,uVar3); return (ulong)uVar2; } uVar1 = *(ushort *)(param_4 + 6); if (uVar1 != 0xd) { if (uVar1 == 0x30) { cVar5 = *(char *)(*(long *)(param_4 + 0x30) + 0x20); } else { cVar5 = *(long *)(*(long *)(*(long *)(param_1 + 0x18) + 0x80) + 0x18 + (ulong)uVar1 * 0x28) != 0; } if (cVar5 == '\0') goto LAB_00122885; } uVar4 = JS_OrdinaryIsInstanceOf(param_1,param_2,param_3,param_4,param_5); return uVar4; }
33,744
minja::Parser::parseMathUnaryPlusMinus()
monkey531[P]llama/common/./minja.hpp
std::shared_ptr<Expression> parseMathUnaryPlusMinus() { static std::regex unary_plus_minus_tok(R"(\+|-(?![}%#]\}))"); auto op_str = consumeToken(unary_plus_minus_tok); auto expr = parseExpansion(); if (!expr) throw std::runtime_error("Expected expr of 'unary plus/minus/expansion' expression"); if (!op_str.empty()) { auto op = op_str == "+" ? UnaryOpExpr::Op::Plus : UnaryOpExpr::Op::Minus; return std::make_shared<UnaryOpExpr>(get_location(), std::move(expr), op); } return expr; }
O2
cpp
minja::Parser::parseMathUnaryPlusMinus(): pushq %r14 pushq %rbx subq $0x68, %rsp movq %rsi, %r14 movq %rdi, %rbx movb 0xa53eb(%rip), %al # 0xe2ee0 testb %al, %al je 0x3dbce leaq 0xa53bc(%rip), %rdx # 0xe2ec0 leaq 0x30(%rsp), %rdi pushq $0x1 popq %rcx movq %r14, %rsi callq 0x2f3f2 movq %rsp, %rdi movq %r14, %rsi callq 0x3dd3e movq (%rsp), %rax testq %rax, %rax je 0x3dc23 cmpq $0x0, 0x38(%rsp) je 0x3db98 leaq 0x60e2f(%rip), %rsi # 0x9e96a leaq 0x30(%rsp), %rdi callq 0x2b25d xorb $0x1, %al movzbl %al, %eax movl %eax, 0x14(%rsp) leaq 0x18(%rsp), %rdi movq %r14, %rsi callq 0x2efae leaq 0x50(%rsp), %rdi leaq 0x18(%rsp), %rsi movq %rsp, %rdx leaq 0x14(%rsp), %rcx callq 0x3df03 leaq 0x58(%rsp), %rdi movaps -0x8(%rdi), %xmm0 andq $0x0, (%rdi) movups %xmm0, (%rbx) andq $0x0, -0x8(%rdi) callq 0x2eeb2 leaq 0x20(%rsp), %rdi callq 0x2eeb2 jmp 0x3dbaf movq %rax, (%rbx) movq 0x8(%rsp), %rax andq $0x0, 0x8(%rsp) movq %rax, 0x8(%rbx) andq $0x0, (%rsp) leaq 0x8(%rsp), %rdi callq 0x2eeb2 leaq 0x30(%rsp), %rdi callq 0x20d78 movq %rbx, %rax addq $0x68, %rsp popq %rbx popq %r14 retq leaq 0xa530b(%rip), %rdi # 0xe2ee0 callq 0x20bf0 testl %eax, %eax je 0x3dafd leaq 0xa52d7(%rip), %rdi # 0xe2ec0 leaq 0x5c7dc(%rip), %rsi # 0x9a3cc pushq $0x10 popq %rdx callq 0x2ef2e leaq -0xec6b(%rip), %rdi # 0x2ef94 leaq 0xa52ba(%rip), %rsi # 0xe2ec0 leaq 0xa4abb(%rip), %rdx # 0xe26c8 callq 0x205f0 leaq 0xa52c7(%rip), %rdi # 0xe2ee0 callq 0x20480 jmp 0x3dafd pushq $0x10 popq %rdi callq 0x20390 movq %rax, %r14 leaq 0x5c881(%rip), %rsi # 0x9a4b6 movq %rax, %rdi callq 0x20280 movq 0xa43a4(%rip), %rsi # 0xe1fe8 movq 0xa4325(%rip), %rdx # 0xe1f70 movq %r14, %rdi callq 0x20b30 movq %rax, %rbx leaq 0xa5283(%rip), %rdi # 0xe2ee0 callq 0x20470 jmp 0x3dc9e jmp 0x3dc82 movq %rax, %rbx movq %r14, %rdi callq 0x20520 jmp 0x3dc85 movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x2eeb2 jmp 0x3dc85 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x2eeb2 jmp 0x3dc94 movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x20d78 movq %rbx, %rdi callq 0x20b90
_ZN5minja6Parser23parseMathUnaryPlusMinusEv: push r14 push rbx sub rsp, 68h mov r14, rsi mov rbx, rdi mov al, cs:_ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; `guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok test al, al jz loc_3DBCE loc_3DAFD: lea rdx, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok lea rdi, [rsp+78h+var_48] push 1 pop rcx mov rsi, r14 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) mov rdi, rsp; this mov rsi, r14 call _ZN5minja6Parser14parseExpansionEv; minja::Parser::parseExpansion(void) mov rax, [rsp+78h+var_78] test rax, rax jz loc_3DC23 cmp [rsp+78h+var_40], 0 jz short loc_3DB98 lea rsi, aSRN_0+0Bh; "+" lea rdi, [rsp+78h+var_48] call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) xor al, 1 movzx eax, al mov [rsp+78h+var_64], eax lea rdi, [rsp+78h+var_60]; this mov rsi, r14 call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void) lea rdi, [rsp+78h+var_28] lea rsi, [rsp+78h+var_60] mov rdx, rsp lea rcx, [rsp+78h+var_64] call _ZSt11make_sharedIN5minja11UnaryOpExprEJNS0_8LocationESt10shared_ptrINS0_10ExpressionEERNS1_2OpEEES3_IT_EDpOT0_; std::make_shared<minja::UnaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &>(minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &) lea rdi, [rsp+78h+var_20] movaps xmm0, xmmword ptr [rdi-8] and qword ptr [rdi], 0 movups xmmword ptr [rbx], xmm0 and qword ptr [rdi-8], 0 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+78h+var_58] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_3DBAF loc_3DB98: mov [rbx], rax mov rax, [rsp+78h+var_70] and [rsp+78h+var_70], 0 mov [rbx+8], rax and [rsp+78h+var_78], 0 loc_3DBAF: lea rdi, [rsp+78h+var_70] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+78h+var_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 68h pop rbx pop r14 retn loc_3DBCE: lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_3DAFD lea rdi, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok lea rsi, asc_9A3CC; "\\+|-(?![}%#]\\})" push 10h pop rdx call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_3DAFD loc_3DC23: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedExprOf; "Expected expr of 'unary plus/minus/expa"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_3DC9E jmp short loc_3DC82 mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_3DC85 mov rbx, rax lea rdi, [rsp+78h+var_58] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_3DC85 loc_3DC82: mov rbx, rax loc_3DC85: lea rdi, [rsp+78h+var_70] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_3DC94 mov rbx, rax loc_3DC94: lea rdi, [rsp+78h+var_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_3DC9E: mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::parseMathUnaryPlusMinus(minja::Parser *this, _QWORD *a2) { __int128 v2; // xmm0 long long v3; // rax std::runtime_error *exception; // r14 long long v6; // [rsp+0h] [rbp-78h] BYREF long long v7; // [rsp+8h] [rbp-70h] BYREF BOOL v8; // [rsp+14h] [rbp-64h] BYREF _BYTE v9[8]; // [rsp+18h] [rbp-60h] BYREF long long v10; // [rsp+20h] [rbp-58h] BYREF _QWORD v11[4]; // [rsp+30h] [rbp-48h] BYREF _OWORD v12[2]; // [rsp+50h] [rbp-28h] BYREF if ( !(_BYTE)`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11], "\\+|-(?![}%#]\\})", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11]); } minja::Parser::consumeToken( v11, (long long)a2, (int)&minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11], 1u); minja::Parser::parseExpansion((minja::Parser *)&v6); if ( !v6 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected expr of 'unary plus/minus/expansion' expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( v11[1] ) { v8 = !std::operator==<char>((long long)v11); minja::Parser::get_location((minja::Parser *)v9, a2); std::make_shared<minja::UnaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &>( v12, v9, &v6, &v8); v2 = v12[0]; *((_QWORD *)&v12[0] + 1) = 0LL; *(_OWORD *)this = v2; *(_QWORD *)&v12[0] = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v12 + 1); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v10); } else { *(_QWORD *)this = v6; v3 = v7; v7 = 0LL; *((_QWORD *)this + 1) = v3; v6 = 0LL; } std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v7); std::string::~string(v11); return this; }
33,745
minja::Parser::parseMathUnaryPlusMinus()
monkey531[P]llama/common/./minja.hpp
std::shared_ptr<Expression> parseMathUnaryPlusMinus() { static std::regex unary_plus_minus_tok(R"(\+|-(?![}%#]\}))"); auto op_str = consumeToken(unary_plus_minus_tok); auto expr = parseExpansion(); if (!expr) throw std::runtime_error("Expected expr of 'unary plus/minus/expansion' expression"); if (!op_str.empty()) { auto op = op_str == "+" ? UnaryOpExpr::Op::Plus : UnaryOpExpr::Op::Minus; return std::make_shared<UnaryOpExpr>(get_location(), std::move(expr), op); } return expr; }
O3
cpp
minja::Parser::parseMathUnaryPlusMinus(): pushq %r14 pushq %rbx subq $0x68, %rsp movq %rsi, %r14 movq %rdi, %rbx movb 0xb05cf(%rip), %al # 0xf0eb0 testb %al, %al je 0x40a09 leaq 0xb05a0(%rip), %rdx # 0xf0e90 leaq 0x30(%rsp), %rdi movq %r14, %rsi movl $0x1, %ecx callq 0x2fd6a leaq 0x10(%rsp), %rdi movq %r14, %rsi callq 0x40b90 movq 0x10(%rsp), %rax testq %rax, %rax je 0x40a60 cmpq $0x0, 0x38(%rsp) je 0x40968 leaq 0x7acc8(%rip), %rsi # 0xbb5f4 leaq 0x30(%rsp), %rdi callq 0x181a0 xorl %ecx, %ecx testl %eax, %eax setne %cl movl %ecx, 0xc(%rsp) movq (%r14), %rax movq %rax, 0x50(%rsp) movq 0x8(%r14), %rax movq %rax, 0x58(%rsp) testq %rax, %rax je 0x4097a movq 0xaf642(%rip), %rcx # 0xeffa0 cmpb $0x0, (%rcx) je 0x40976 incl 0x8(%rax) jmp 0x4097a movq %rax, (%rbx) movq 0x18(%rsp), %rax movq %rax, 0x8(%rbx) jmp 0x409e3 lock incl 0x8(%rax) movq 0x20(%r14), %rax subq 0x10(%r14), %rax leaq 0x50(%rsp), %rcx movq %rax, 0x10(%rcx) leaq 0x28(%rsp), %rdi movq $0x0, -0x8(%rdi) leaq 0x20(%rsp), %rsi leaq 0xb(%rsp), %rdx leaq 0x10(%rsp), %r8 leaq 0xc(%rsp), %r9 callq 0x566d4 movaps 0x20(%rsp), %xmm0 xorl %eax, %eax movq %rax, 0x28(%rsp) movups %xmm0, (%rbx) movq %rax, 0x20(%rsp) movq 0x58(%rsp), %rdi testq %rdi, %rdi je 0x409d4 callq 0x2f80e movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x409e3 callq 0x2f80e leaq 0x40(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x409fe movq 0x40(%rsp), %rsi incq %rsi callq 0x186a0 movq %rbx, %rax addq $0x68, %rsp popq %rbx popq %r14 retq leaq 0xb04a0(%rip), %rdi # 0xf0eb0 callq 0x18be0 testl %eax, %eax je 0x408e9 leaq 0xb046c(%rip), %rdi # 0xf0e90 leaq 0x76819(%rip), %rsi # 0xb7244 movl $0x10, %edx callq 0x2f87e leaq -0x11156(%rip), %rdi # 0x2f8e6 leaq 0xb044d(%rip), %rsi # 0xf0e90 leaq 0xafc4e(%rip), %rdx # 0xf0698 callq 0x185d0 leaq 0xb045a(%rip), %rdi # 0xf0eb0 callq 0x18450 jmp 0x408e9 movl $0x10, %edi callq 0x18360 movq %rax, %r14 leaq 0x768ba(%rip), %rsi # 0xb732e movq %rax, %rdi callq 0x18270 movq 0xaf56d(%rip), %rsi # 0xefff0 movq 0xaf4f6(%rip), %rdx # 0xeff80 movq %r14, %rdi callq 0x18b30 movq %rax, %rbx leaq 0xb0414(%rip), %rdi # 0xf0eb0 callq 0x18440 jmp 0x40af6 movq %rax, %rbx jmp 0x40ac7 movq %rax, %rbx movq %r14, %rdi callq 0x18500 jmp 0x40ac7 movq %rax, %rbx movq 0x58(%rsp), %rdi testq %rdi, %rdi je 0x40ac7 callq 0x2f80e movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x40adb callq 0x2f80e jmp 0x40adb movq %rax, %rbx leaq 0x40(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x40af6 movq 0x40(%rsp), %rsi incq %rsi callq 0x186a0 movq %rbx, %rdi callq 0x18b90
_ZN5minja6Parser23parseMathUnaryPlusMinusEv: push r14 push rbx sub rsp, 68h mov r14, rsi mov rbx, rdi mov al, cs:_ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; `guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok test al, al jz loc_40A09 loc_408E9: lea rdx, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok lea rdi, [rsp+78h+var_48] mov rsi, r14 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) lea rdi, [rsp+78h+var_68]; this mov rsi, r14 call _ZN5minja6Parser14parseExpansionEv; minja::Parser::parseExpansion(void) mov rax, [rsp+78h+var_68] test rax, rax jz loc_40A60 cmp [rsp+78h+var_40], 0 jz short loc_40968 lea rsi, aSRN_0+0Bh; "+" lea rdi, [rsp+78h+var_48] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) xor ecx, ecx test eax, eax setnz cl mov [rsp+78h+var_6C], ecx mov rax, [r14] mov [rsp+78h+var_28], rax mov rax, [r14+8] mov [rsp+78h+var_20], rax test rax, rax jz short loc_4097A mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_40976 inc dword ptr [rax+8] jmp short loc_4097A loc_40968: mov [rbx], rax mov rax, [rsp+78h+var_60] mov [rbx+8], rax jmp short loc_409E3 loc_40976: lock inc dword ptr [rax+8] loc_4097A: mov rax, [r14+20h] sub rax, [r14+10h] lea rcx, [rsp+78h+var_28] mov [rcx+10h], rax lea rdi, [rsp+78h+var_58+8] mov qword ptr [rdi-8], 0 lea rsi, [rsp+78h+var_58] lea rdx, [rsp+78h+var_6D] lea r8, [rsp+78h+var_68] lea r9, [rsp+78h+var_6C] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja11UnaryOpExprESaIS5_EJNS4_8LocationESt10shared_ptrINS4_10ExpressionEERNS5_2OpEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &>(minja::UnaryOpExpr *&,std::_Sp_alloc_shared_tag<std::allocator<minja::UnaryOpExpr>>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &) movaps xmm0, [rsp+78h+var_58] xor eax, eax mov qword ptr [rsp+78h+var_58+8], rax movups xmmword ptr [rbx], xmm0 mov qword ptr [rsp+78h+var_58], rax mov rdi, [rsp+78h+var_20] test rdi, rdi jz short loc_409D4 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_409D4: mov rdi, [rsp+78h+var_60] test rdi, rdi jz short loc_409E3 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_409E3: lea rax, [rsp+78h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_409FE mov rsi, [rsp+78h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_409FE: mov rax, rbx add rsp, 68h pop rbx pop r14 retn loc_40A09: lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_408E9 lea rdi, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok lea rsi, asc_B7244; "\\+|-(?![}%#]\\})" mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_408E9 loc_40A60: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedExprOf; "Expected expr of 'unary plus/minus/expa"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_40AF6 mov rbx, rax jmp short loc_40AC7 mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_40AC7 mov rbx, rax mov rdi, [rsp+78h+var_20] test rdi, rdi jz short loc_40AC7 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_40AC7: mov rdi, [rsp+78h+var_60] test rdi, rdi jz short loc_40ADB call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp short loc_40ADB mov rbx, rax loc_40ADB: lea rax, [rsp+78h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_40AF6 mov rsi, [rsp+78h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_40AF6: mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::parseMathUnaryPlusMinus(minja::Parser *this, long long *a2) { volatile signed __int32 *v2; // rax __int128 v3; // xmm0 std::runtime_error *exception; // r14 char v6; // [rsp+Bh] [rbp-6Dh] BYREF BOOL v7; // [rsp+Ch] [rbp-6Ch] BYREF long long v8; // [rsp+10h] [rbp-68h] BYREF volatile signed __int32 *v9; // [rsp+18h] [rbp-60h] __int128 v10; // [rsp+20h] [rbp-58h] BYREF void *v11[2]; // [rsp+30h] [rbp-48h] BYREF long long v12; // [rsp+40h] [rbp-38h] BYREF long long v13; // [rsp+50h] [rbp-28h] BYREF volatile signed __int32 *v14; // [rsp+58h] [rbp-20h] long long v15; // [rsp+60h] [rbp-18h] if ( !(_BYTE)`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11], "\\+|-(?![}%#]\\})", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11]); } minja::Parser::consumeToken( (long long)v11, (long long)a2, (long long)&minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11], 1u); minja::Parser::parseExpansion((minja::Parser *)&v8); if ( !v8 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected expr of 'unary plus/minus/expansion' expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( v11[1] ) { v7 = std::string::compare(v11, "+") != 0; v13 = *a2; v2 = (volatile signed __int32 *)a2[1]; v14 = v2; if ( v2 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v2 + 2); else _InterlockedIncrement(v2 + 2); } v15 = a2[4] - a2[2]; *(_QWORD *)&v10 = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &>( (char *)&v10 + 8, &v10, &v6, &v13, &v8, &v7); v3 = v10; *((_QWORD *)&v10 + 1) = 0LL; *(_OWORD *)this = v3; *(_QWORD *)&v10 = 0LL; if ( v14 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14); if ( v9 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v9); } else { *(_QWORD *)this = v8; *((_QWORD *)this + 1) = v9; } if ( v11[0] != &v12 ) operator delete(v11[0], v12 + 1); return this; }
parseMathUnaryPlusMinus: PUSH R14 PUSH RBX SUB RSP,0x68 MOV R14,RSI MOV RBX,RDI MOV AL,byte ptr [0x001f0eb0] TEST AL,AL JZ 0x00140a09 LAB_001408e9: LEA RDX,[0x1f0e90] LEA RDI,[RSP + 0x30] MOV RSI,R14 MOV ECX,0x1 CALL 0x0012fd6a LAB_00140902: LEA RDI,[RSP + 0x10] MOV RSI,R14 CALL 0x00140b90 MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x00140a60 CMP qword ptr [RSP + 0x38],0x0 JZ 0x00140968 LEA RSI,[0x1bb5f4] LEA RDI,[RSP + 0x30] CALL 0x001181a0 XOR ECX,ECX TEST EAX,EAX SETNZ CL MOV dword ptr [RSP + 0xc],ECX MOV RAX,qword ptr [R14] MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x58],RAX TEST RAX,RAX JZ 0x0014097a MOV RCX,qword ptr [0x001effa0] CMP byte ptr [RCX],0x0 JZ 0x00140976 INC dword ptr [RAX + 0x8] JMP 0x0014097a LAB_00140968: MOV qword ptr [RBX],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RBX + 0x8],RAX JMP 0x001409e3 LAB_00140976: INC.LOCK dword ptr [RAX + 0x8] LAB_0014097a: MOV RAX,qword ptr [R14 + 0x20] SUB RAX,qword ptr [R14 + 0x10] LEA RCX,[RSP + 0x50] MOV qword ptr [RCX + 0x10],RAX LEA RDI,[RSP + 0x28] MOV qword ptr [RDI + -0x8],0x0 LAB_00140998: LEA RSI,[RSP + 0x20] LEA RDX,[RSP + 0xb] LEA R8,[RSP + 0x10] LEA R9,[RSP + 0xc] CALL 0x001566d4 MOVAPS XMM0,xmmword ptr [RSP + 0x20] XOR EAX,EAX MOV qword ptr [RSP + 0x28],RAX MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0x58] TEST RDI,RDI JZ 0x001409d4 CALL 0x0012f80e LAB_001409d4: MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x001409e3 CALL 0x0012f80e LAB_001409e3: LEA RAX,[RSP + 0x40] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001409fe MOV RSI,qword ptr [RSP + 0x40] INC RSI CALL 0x001186a0 LAB_001409fe: MOV RAX,RBX ADD RSP,0x68 POP RBX POP R14 RET LAB_00140a09: LEA RDI,[0x1f0eb0] CALL 0x00118be0 TEST EAX,EAX JZ 0x001408e9 LAB_00140a1d: LEA RDI,[0x1f0e90] LEA RSI,[0x1b7244] MOV EDX,0x10 CALL 0x0012f87e LAB_00140a35: LEA RDI,[0x12f8e6] LEA RSI,[0x1f0e90] LEA RDX,[0x1f0698] CALL 0x001185d0 LEA RDI,[0x1f0eb0] CALL 0x00118450 JMP 0x001408e9 LAB_00140a60: MOV EDI,0x10 CALL 0x00118360 MOV R14,RAX LAB_00140a6d: LEA RSI,[0x1b732e] MOV RDI,RAX CALL 0x00118270 LAB_00140a7c: MOV RSI,qword ptr [0x001efff0] MOV RDX,qword ptr [0x001eff80] MOV RDI,R14 CALL 0x00118b30
/* minja::Parser::parseMathUnaryPlusMinus() */ void minja::Parser::parseMathUnaryPlusMinus(void) { long lVar1; int iVar2; runtime_error *this; int8 *in_RSI; long *in_RDI; int1 local_6d; uint local_6c; long local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60; long local_58; long lStack_50; long *local_48; long local_40; long local_38 [2]; int8 local_28; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_20; long local_18; if (parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_ == '\0') { iVar2 = __cxa_guard_acquire(&parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_); if (iVar2 != 0) { /* try { // try from 00140a1d to 00140a34 has its CatchHandler @ 00140a92 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_,"\\+|-(?![}%#]\\})",0x10 ); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_); } } consumeToken(&local_48); /* try { // try from 00140902 to 0014090e has its CatchHandler @ 00140ad8 */ parseExpansion(); if (local_68 != 0) { if (local_40 == 0) { *in_RDI = local_68; in_RDI[1] = (long)local_60; } else { iVar2 = std::__cxx11::string::compare((char *)&local_48); local_6c = (uint)(iVar2 != 0); local_28 = *in_RSI; local_20 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1]; if (local_20 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_001effa0 == '\0') { LOCK(); *(int *)(local_20 + 8) = *(int *)(local_20 + 8) + 1; UNLOCK(); } else { *(int *)(local_20 + 8) = *(int *)(local_20 + 8) + 1; } } local_18 = in_RSI[4] - in_RSI[2]; local_58 = 0; /* try { // try from 00140998 to 001409b0 has its CatchHandler @ 00140ab5 */ std::__shared_count<(__gnu_cxx::_Lock_policy)2>:: __shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op&> ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&lStack_50,&local_58,&local_6d, &local_28,&local_68,&local_6c); lVar1 = lStack_50; lStack_50 = 0; *in_RDI = local_58; in_RDI[1] = lVar1; local_58 = 0; if (local_20 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_20); } if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60); } } if (local_48 != local_38) { operator_delete(local_48,local_38[0] + 1); } return; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00140a6d to 00140a7b has its CatchHandler @ 00140aa8 */ std::runtime_error::runtime_error (this,"Expected expr of \'unary plus/minus/expansion\' expression"); /* try { // try from 00140a7c to 00140a91 has its CatchHandler @ 00140aa3 */ /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001efff0,PTR__runtime_error_001eff80); }
33,746
pocketflow::PocketFlowException::PocketFlowException(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::exception const&)
The-Pocket[P]PocketFlow-CPP/pocketflow.h
PocketFlowException(const std::string& message) : std::runtime_error(message) {}
O1
c
pocketflow::PocketFlowException::PocketFlowException(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::exception const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %r14 movq %rdi, %rbx leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) movq (%rsi), %rax movq 0x8(%rsi), %rdx addq %rax, %rdx leaq 0x8(%rsp), %r15 movq %r15, %rdi movq %rax, %rsi callq 0x84e8 leaq 0x6aa5(%rip), %rsi # 0x11583 movq %r15, %rdi callq 0x52d0 movq (%r14), %rax movq %r14, %rdi callq *0x10(%rax) leaq 0x8(%rsp), %rdi movq %rax, %rsi callq 0x52d0 leaq 0x38(%rsp), %r14 movq %r14, -0x10(%r14) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0xab23 movq %rdx, 0x28(%rsp) movq (%rcx), %rdx movq %rdx, 0x38(%rsp) jmp 0xab2a movups (%rcx), %xmm0 movups %xmm0, (%r14) movq 0x8(%rax), %rdx leaq 0x28(%rsp), %rdi movq %rdx, 0x8(%rdi) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x66d4(%rip), %rsi # 0x11221 callq 0x52d0 leaq 0x58(%rsp), %r15 movq %r15, -0x10(%r15) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0xab79 movq %rdx, 0x48(%rsp) movq (%rcx), %rdx movq %rdx, 0x58(%rsp) jmp 0xab80 movups (%rcx), %xmm0 movups %xmm0, (%r15) movq 0x8(%rax), %rdx leaq 0x48(%rsp), %rsi movq %rdx, 0x8(%rsi) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq %rbx, %rdi callq 0x5200 movq 0x48(%rsp), %rdi cmpq %r15, %rdi je 0xabbb movq 0x58(%rsp), %rsi incq %rsi callq 0x5180 movq 0x28(%rsp), %rdi cmpq %r14, %rdi je 0xabd2 movq 0x38(%rsp), %rsi incq %rsi callq 0x5180 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0xabe9 movq 0x18(%rsp), %rsi incq %rsi callq 0x5180 leaq 0xc8b0(%rip), %rax # 0x174a0 movq %rax, (%rbx) addq $0x68, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx movq 0x48(%rsp), %rdi cmpq %r15, %rdi je 0xac1e movq 0x58(%rsp), %rsi incq %rsi callq 0x5180 jmp 0xac1e movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r14, %rdi je 0xac3c movq 0x38(%rsp), %rsi incq %rsi callq 0x5180 jmp 0xac3c jmp 0xac39 movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0xac53 movq 0x18(%rsp), %rsi incq %rsi callq 0x5180 movq %rbx, %rdi callq 0x52a0 nop
_ZN10pocketflow19PocketFlowExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt9exception: push r15 push r14 push r12 push rbx sub rsp, 68h mov r14, rdx mov rbx, rdi lea r12, [rsp+88h+var_70] mov [r12-10h], r12 mov rax, [rsi] mov rdx, [rsi+8] add rdx, rax lea r15, [rsp+88h+var_80] mov rdi, r15 mov rsi, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aCausedBy; " (Caused by: " mov rdi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rax, [r14] mov rdi, r14 call qword ptr [rax+10h] lea rdi, [rsp+88h+var_80] mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r14, [rsp+88h+var_50] mov [r14-10h], r14 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_AB23 mov [rsp+88h+var_60], rdx mov rdx, [rcx] mov [rsp+88h+var_50], rdx jmp short loc_AB2A loc_AB23: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r14], xmm0 loc_AB2A: mov rdx, [rax+8] lea rdi, [rsp+88h+var_60] mov [rdi+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea rsi, aExpected30+0Eh; ")" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r15, [rsp+88h+var_30] mov [r15-10h], r15 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_AB79 mov [rsp+88h+var_40], rdx mov rdx, [rcx] mov [rsp+88h+var_30], rdx jmp short loc_AB80 loc_AB79: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r15], xmm0 loc_AB80: mov rdx, [rax+8] lea rsi, [rsp+88h+var_40] mov [rsi+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rdi, rbx call __ZNSt13runtime_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) mov rdi, [rsp+88h+var_40]; void * cmp rdi, r15 jz short loc_ABBB mov rsi, [rsp+88h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_ABBB: mov rdi, [rsp+88h+var_60]; void * cmp rdi, r14 jz short loc_ABD2 mov rsi, [rsp+88h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_ABD2: mov rdi, [rsp+88h+var_80]; void * cmp rdi, r12 jz short loc_ABE9 mov rsi, [rsp+88h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_ABE9: lea rax, off_174A0 mov [rbx], rax add rsp, 68h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax mov rdi, [rsp+arg_40]; void * cmp rdi, r15 jz short loc_AC1E mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_AC1E mov rbx, rax loc_AC1E: mov rdi, [rsp+arg_20]; void * cmp rdi, r14 jz short loc_AC3C mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_AC3C jmp short $+2 loc_AC39: mov rbx, rax loc_AC3C: mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_AC53 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AC53: mov rdi, rbx call __Unwind_Resume
void (** pocketflow::PocketFlowException::PocketFlowException( _QWORD *a1, long long a2, long long a3))(std::runtime_error *__hidden this) { long long v4; // rax long long v5; // rax __int128 *v6; // rcx long long v7; // rax _OWORD *v8; // rcx void (**result)(std::runtime_error *__hidden); // rax void *v10[2]; // [rsp+8h] [rbp-80h] BYREF _QWORD v11[2]; // [rsp+18h] [rbp-70h] BYREF void *v12[2]; // [rsp+28h] [rbp-60h] BYREF __int128 v13; // [rsp+38h] [rbp-50h] BYREF void *v14[2]; // [rsp+48h] [rbp-40h] BYREF _OWORD v15[3]; // [rsp+58h] [rbp-30h] BYREF v10[0] = v11; std::string::_M_construct<char *>(v10, *(_BYTE **)a2, *(_QWORD *)a2 + *(_QWORD *)(a2 + 8)); std::string::append(v10, " (Caused by: "); v4 = (*(long long ( **)(long long))(*(_QWORD *)a3 + 16LL))(a3); v5 = std::string::append(v10, v4); v12[0] = &v13; v6 = (__int128 *)(v5 + 16); if ( *(_QWORD *)v5 == v5 + 16 ) { v13 = *v6; } else { v12[0] = *(void **)v5; *(_QWORD *)&v13 = *(_QWORD *)v6; } v12[1] = *(void **)(v5 + 8); *(_QWORD *)v5 = v6; *(_QWORD *)(v5 + 8) = 0LL; *(_BYTE *)(v5 + 16) = 0; v7 = std::string::append(v12, ")"); v14[0] = v15; v8 = (_OWORD *)(v7 + 16); if ( *(_QWORD *)v7 == v7 + 16 ) { v15[0] = *v8; } else { v14[0] = *(void **)v7; *(_QWORD *)&v15[0] = *(_QWORD *)v8; } v14[1] = *(void **)(v7 + 8); *(_QWORD *)v7 = v8; *(_QWORD *)(v7 + 8) = 0LL; *(_BYTE *)(v7 + 16) = 0; std::runtime_error::runtime_error(a1, v14); if ( v14[0] != v15 ) operator delete(v14[0], *(_QWORD *)&v15[0] + 1LL); if ( v12[0] != &v13 ) operator delete(v12[0], v13 + 1); if ( v10[0] != v11 ) operator delete(v10[0], v11[0] + 1LL); result = off_174A0; *a1 = off_174A0; return result; }
PocketFlowException: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R14,RDX MOV RBX,RDI LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 MOV RAX,qword ptr [RSI] MOV RDX,qword ptr [RSI + 0x8] ADD RDX,RAX LEA R15,[RSP + 0x8] MOV RDI,R15 MOV RSI,RAX CALL 0x001084e8 LAB_0010aad7: LEA RSI,[0x111583] MOV RDI,R15 CALL 0x001052d0 LAB_0010aae6: MOV RAX,qword ptr [R14] MOV RDI,R14 CALL qword ptr [RAX + 0x10] LAB_0010aaef: LEA RDI,[RSP + 0x8] MOV RSI,RAX CALL 0x001052d0 LEA R14,[RSP + 0x38] MOV qword ptr [R14 + -0x10],R14 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x0010ab23 MOV qword ptr [RSP + 0x28],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x38],RDX JMP 0x0010ab2a LAB_0010ab23: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R14],XMM0 LAB_0010ab2a: MOV RDX,qword ptr [RAX + 0x8] LEA RDI,[RSP + 0x28] MOV qword ptr [RDI + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LAB_0010ab46: LEA RSI,[0x111221] CALL 0x001052d0 LEA R15,[RSP + 0x58] MOV qword ptr [R15 + -0x10],R15 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x0010ab79 MOV qword ptr [RSP + 0x48],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x58],RDX JMP 0x0010ab80 LAB_0010ab79: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R15],XMM0 LAB_0010ab80: MOV RDX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x48] MOV qword ptr [RSI + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LAB_0010ab9c: MOV RDI,RBX CALL 0x00105200 LAB_0010aba4: MOV RDI,qword ptr [RSP + 0x48] CMP RDI,R15 JZ 0x0010abbb MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x00105180 LAB_0010abbb: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R14 JZ 0x0010abd2 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x00105180 LAB_0010abd2: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x0010abe9 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00105180 LAB_0010abe9: LEA RAX,[0x1174a0] MOV qword ptr [RBX],RAX ADD RSP,0x68 POP RBX POP R12 POP R14 POP R15 RET
/* pocketflow::PocketFlowException::PocketFlowException(std::__cxx11::string const&, std::exception const&) */ void __thiscall pocketflow::PocketFlowException::PocketFlowException (PocketFlowException *this,string *param_1,exception *param_2) { long *plVar1; long *plVar2; long *local_80 [2]; long local_70 [2]; long *local_60; long local_58; long local_50; long lStack_48; long *local_40; long local_38; long local_30; long lStack_28; local_80[0] = local_70; std::__cxx11::string::_M_construct<char*> (local_80,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1); /* try { // try from 0010aad7 to 0010aae5 has its CatchHandler @ 0010ac39 */ std::__cxx11::string::append((char *)local_80); (**(code **)(*(long *)param_2 + 0x10))(param_2); /* try { // try from 0010aaef to 0010aafb has its CatchHandler @ 0010ac37 */ plVar1 = (long *)std::__cxx11::string::append((char *)local_80); plVar2 = plVar1 + 2; if ((long *)*plVar1 == plVar2) { local_50 = *plVar2; lStack_48 = plVar1[3]; local_60 = &local_50; } else { local_50 = *plVar2; local_60 = (long *)*plVar1; } local_58 = plVar1[1]; *plVar1 = (long)plVar2; plVar1[1] = 0; *(int1 *)(plVar1 + 2) = 0; /* try { // try from 0010ab46 to 0010ab51 has its CatchHandler @ 0010ac1b */ plVar1 = (long *)std::__cxx11::string::append((char *)&local_60); plVar2 = plVar1 + 2; if ((long *)*plVar1 == plVar2) { local_30 = *plVar2; lStack_28 = plVar1[3]; local_40 = &local_30; } else { local_30 = *plVar2; local_40 = (long *)*plVar1; } local_38 = plVar1[1]; *plVar1 = (long)plVar2; plVar1[1] = 0; *(int1 *)(plVar1 + 2) = 0; /* try { // try from 0010ab9c to 0010aba3 has its CatchHandler @ 0010abff */ std::runtime_error::runtime_error((runtime_error *)this,(string *)&local_40); if (local_40 != &local_30) { operator_delete(local_40,local_30 + 1); } if (local_60 != &local_50) { operator_delete(local_60,local_50 + 1); } if (local_80[0] != local_70) { operator_delete(local_80[0],local_70[0] + 1); } *(int ***)this = &PTR__runtime_error_001174a0; return; }
33,747
pocketflow::PocketFlowException::PocketFlowException(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::exception const&)
The-Pocket[P]PocketFlow-CPP/pocketflow.h
PocketFlowException(const std::string& message) : std::runtime_error(message) {}
O3
c
pocketflow::PocketFlowException::PocketFlowException(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::exception const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %r14 movq %rdi, %rbx leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) movq (%rsi), %rax movq 0x8(%rsi), %rdx addq %rax, %rdx leaq 0x8(%rsp), %r15 movq %r15, %rdi movq %rax, %rsi callq 0x8434 leaq 0x6b3d(%rip), %rsi # 0x11583 movq %r15, %rdi callq 0x52d0 movq (%r14), %rax movq %r14, %rdi callq *0x10(%rax) leaq 0x8(%rsp), %rdi movq %rax, %rsi callq 0x52d0 leaq 0x38(%rsp), %r14 movq %r14, -0x10(%r14) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0xaa8b movq %rdx, 0x28(%rsp) movq (%rcx), %rdx movq %rdx, 0x38(%rsp) jmp 0xaa92 movups (%rcx), %xmm0 movups %xmm0, (%r14) movq 0x8(%rax), %rdx leaq 0x28(%rsp), %rdi movq %rdx, 0x8(%rdi) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x676c(%rip), %rsi # 0x11221 callq 0x52d0 leaq 0x58(%rsp), %r15 movq %r15, -0x10(%r15) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0xaae1 movq %rdx, 0x48(%rsp) movq (%rcx), %rdx movq %rdx, 0x58(%rsp) jmp 0xaae8 movups (%rcx), %xmm0 movups %xmm0, (%r15) movq 0x8(%rax), %rdx leaq 0x48(%rsp), %rsi movq %rdx, 0x8(%rsi) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq %rbx, %rdi callq 0x5200 movq 0x48(%rsp), %rdi cmpq %r15, %rdi je 0xab23 movq 0x58(%rsp), %rsi incq %rsi callq 0x5180 movq 0x28(%rsp), %rdi cmpq %r14, %rdi je 0xab3a movq 0x38(%rsp), %rsi incq %rsi callq 0x5180 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0xab51 movq 0x18(%rsp), %rsi incq %rsi callq 0x5180 leaq 0xc948(%rip), %rax # 0x174a0 movq %rax, (%rbx) addq $0x68, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx movq 0x48(%rsp), %rdi cmpq %r15, %rdi je 0xab86 movq 0x58(%rsp), %rsi incq %rsi callq 0x5180 jmp 0xab86 movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r14, %rdi je 0xaba4 movq 0x38(%rsp), %rsi incq %rsi callq 0x5180 jmp 0xaba4 jmp 0xaba1 movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0xabbb movq 0x18(%rsp), %rsi incq %rsi callq 0x5180 movq %rbx, %rdi callq 0x52a0 nop
_ZN10pocketflow19PocketFlowExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt9exception: push r15 push r14 push r12 push rbx sub rsp, 68h mov r14, rdx mov rbx, rdi lea r12, [rsp+88h+var_70] mov [r12-10h], r12 mov rax, [rsi] mov rdx, [rsi+8] add rdx, rax lea r15, [rsp+88h+var_80] mov rdi, r15 mov rsi, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aCausedBy; " (Caused by: " mov rdi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rax, [r14] mov rdi, r14 call qword ptr [rax+10h] lea rdi, [rsp+88h+var_80] mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r14, [rsp+88h+var_50] mov [r14-10h], r14 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_AA8B mov [rsp+88h+var_60], rdx mov rdx, [rcx] mov [rsp+88h+var_50], rdx jmp short loc_AA92 loc_AA8B: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r14], xmm0 loc_AA92: mov rdx, [rax+8] lea rdi, [rsp+88h+var_60] mov [rdi+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea rsi, aExpected30+0Eh; ")" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r15, [rsp+88h+var_30] mov [r15-10h], r15 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_AAE1 mov [rsp+88h+var_40], rdx mov rdx, [rcx] mov [rsp+88h+var_30], rdx jmp short loc_AAE8 loc_AAE1: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r15], xmm0 loc_AAE8: mov rdx, [rax+8] lea rsi, [rsp+88h+var_40] mov [rsi+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rdi, rbx call __ZNSt13runtime_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) mov rdi, [rsp+88h+var_40]; void * cmp rdi, r15 jz short loc_AB23 mov rsi, [rsp+88h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AB23: mov rdi, [rsp+88h+var_60]; void * cmp rdi, r14 jz short loc_AB3A mov rsi, [rsp+88h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AB3A: mov rdi, [rsp+88h+var_80]; void * cmp rdi, r12 jz short loc_AB51 mov rsi, [rsp+88h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AB51: lea rax, off_174A0 mov [rbx], rax add rsp, 68h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax mov rdi, [rsp+arg_40]; void * cmp rdi, r15 jz short loc_AB86 mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_AB86 mov rbx, rax loc_AB86: mov rdi, [rsp+arg_20]; void * cmp rdi, r14 jz short loc_ABA4 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_ABA4 jmp short $+2 loc_ABA1: mov rbx, rax loc_ABA4: mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_ABBB mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_ABBB: mov rdi, rbx call __Unwind_Resume
void (** pocketflow::PocketFlowException::PocketFlowException( _QWORD *a1, long long a2, long long a3))(std::runtime_error *__hidden this) { long long v4; // rax long long v5; // rax __int128 *v6; // rcx long long v7; // rax _OWORD *v8; // rcx void (**result)(std::runtime_error *__hidden); // rax void *v10[2]; // [rsp+8h] [rbp-80h] BYREF _QWORD v11[2]; // [rsp+18h] [rbp-70h] BYREF void *v12[2]; // [rsp+28h] [rbp-60h] BYREF __int128 v13; // [rsp+38h] [rbp-50h] BYREF void *v14[2]; // [rsp+48h] [rbp-40h] BYREF _OWORD v15[3]; // [rsp+58h] [rbp-30h] BYREF v10[0] = v11; std::string::_M_construct<char *>((long long)v10, *(_BYTE **)a2, *(_QWORD *)a2 + *(_QWORD *)(a2 + 8)); std::string::append(v10, " (Caused by: "); v4 = (*(long long ( **)(long long))(*(_QWORD *)a3 + 16LL))(a3); v5 = std::string::append(v10, v4); v12[0] = &v13; v6 = (__int128 *)(v5 + 16); if ( *(_QWORD *)v5 == v5 + 16 ) { v13 = *v6; } else { v12[0] = *(void **)v5; *(_QWORD *)&v13 = *(_QWORD *)v6; } v12[1] = *(void **)(v5 + 8); *(_QWORD *)v5 = v6; *(_QWORD *)(v5 + 8) = 0LL; *(_BYTE *)(v5 + 16) = 0; v7 = std::string::append(v12, ")"); v14[0] = v15; v8 = (_OWORD *)(v7 + 16); if ( *(_QWORD *)v7 == v7 + 16 ) { v15[0] = *v8; } else { v14[0] = *(void **)v7; *(_QWORD *)&v15[0] = *(_QWORD *)v8; } v14[1] = *(void **)(v7 + 8); *(_QWORD *)v7 = v8; *(_QWORD *)(v7 + 8) = 0LL; *(_BYTE *)(v7 + 16) = 0; std::runtime_error::runtime_error(a1, v14); if ( v14[0] != v15 ) operator delete(v14[0], *(_QWORD *)&v15[0] + 1LL); if ( v12[0] != &v13 ) operator delete(v12[0], v13 + 1); if ( v10[0] != v11 ) operator delete(v10[0], v11[0] + 1LL); result = off_174A0; *a1 = off_174A0; return result; }
PocketFlowException: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R14,RDX MOV RBX,RDI LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 MOV RAX,qword ptr [RSI] MOV RDX,qword ptr [RSI + 0x8] ADD RDX,RAX LEA R15,[RSP + 0x8] MOV RDI,R15 MOV RSI,RAX CALL 0x00108434 LAB_0010aa3f: LEA RSI,[0x111583] MOV RDI,R15 CALL 0x001052d0 LAB_0010aa4e: MOV RAX,qword ptr [R14] MOV RDI,R14 CALL qword ptr [RAX + 0x10] LAB_0010aa57: LEA RDI,[RSP + 0x8] MOV RSI,RAX CALL 0x001052d0 LEA R14,[RSP + 0x38] MOV qword ptr [R14 + -0x10],R14 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x0010aa8b MOV qword ptr [RSP + 0x28],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x38],RDX JMP 0x0010aa92 LAB_0010aa8b: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R14],XMM0 LAB_0010aa92: MOV RDX,qword ptr [RAX + 0x8] LEA RDI,[RSP + 0x28] MOV qword ptr [RDI + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LAB_0010aaae: LEA RSI,[0x111221] CALL 0x001052d0 LEA R15,[RSP + 0x58] MOV qword ptr [R15 + -0x10],R15 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x0010aae1 MOV qword ptr [RSP + 0x48],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x58],RDX JMP 0x0010aae8 LAB_0010aae1: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R15],XMM0 LAB_0010aae8: MOV RDX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x48] MOV qword ptr [RSI + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LAB_0010ab04: MOV RDI,RBX CALL 0x00105200 LAB_0010ab0c: MOV RDI,qword ptr [RSP + 0x48] CMP RDI,R15 JZ 0x0010ab23 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x00105180 LAB_0010ab23: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R14 JZ 0x0010ab3a MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x00105180 LAB_0010ab3a: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x0010ab51 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00105180 LAB_0010ab51: LEA RAX,[0x1174a0] MOV qword ptr [RBX],RAX ADD RSP,0x68 POP RBX POP R12 POP R14 POP R15 RET
/* pocketflow::PocketFlowException::PocketFlowException(std::__cxx11::string const&, std::exception const&) */ void __thiscall pocketflow::PocketFlowException::PocketFlowException (PocketFlowException *this,string *param_1,exception *param_2) { long *plVar1; long *plVar2; long *local_80 [2]; long local_70 [2]; long *local_60; long local_58; long local_50; long lStack_48; long *local_40; long local_38; long local_30; long lStack_28; local_80[0] = local_70; std::__cxx11::string::_M_construct<char*> (local_80,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1); /* try { // try from 0010aa3f to 0010aa4d has its CatchHandler @ 0010aba1 */ std::__cxx11::string::append((char *)local_80); (**(code **)(*(long *)param_2 + 0x10))(param_2); /* try { // try from 0010aa57 to 0010aa63 has its CatchHandler @ 0010ab9f */ plVar1 = (long *)std::__cxx11::string::append((char *)local_80); plVar2 = plVar1 + 2; if ((long *)*plVar1 == plVar2) { local_50 = *plVar2; lStack_48 = plVar1[3]; local_60 = &local_50; } else { local_50 = *plVar2; local_60 = (long *)*plVar1; } local_58 = plVar1[1]; *plVar1 = (long)plVar2; plVar1[1] = 0; *(int1 *)(plVar1 + 2) = 0; /* try { // try from 0010aaae to 0010aab9 has its CatchHandler @ 0010ab83 */ plVar1 = (long *)std::__cxx11::string::append((char *)&local_60); plVar2 = plVar1 + 2; if ((long *)*plVar1 == plVar2) { local_30 = *plVar2; lStack_28 = plVar1[3]; local_40 = &local_30; } else { local_30 = *plVar2; local_40 = (long *)*plVar1; } local_38 = plVar1[1]; *plVar1 = (long)plVar2; plVar1[1] = 0; *(int1 *)(plVar1 + 2) = 0; /* try { // try from 0010ab04 to 0010ab0b has its CatchHandler @ 0010ab67 */ std::runtime_error::runtime_error((runtime_error *)this,(string *)&local_40); if (local_40 != &local_30) { operator_delete(local_40,local_30 + 1); } if (local_60 != &local_50) { operator_delete(local_60,local_50 + 1); } if (local_80[0] != local_70) { operator_delete(local_80[0],local_70[0] + 1); } *(int ***)this = &PTR__runtime_error_001174a0; return; }
33,748
print_defaults
eloqsql/mysys/my_default.c
void print_defaults(const char *conf_file, const char **groups) { const char **groups_save= groups; my_print_default_files(conf_file); fputs("The following groups are read:",stdout); for ( ; *groups ; groups++) { fputc(' ',stdout); fputs(*groups,stdout); } if (my_defaults_group_suffix) { groups= groups_save; for ( ; *groups ; groups++) { fputc(' ',stdout); fputs(*groups,stdout); fputs(my_defaults_group_suffix,stdout); } } puts("\nThe following options may be given as the first argument:\n\ --print-defaults Print the program argument list and exit.\n\ --no-defaults Don't read default options from any option file.\n\ The following specify which files/extra groups are read (specified before remaining options):\n\ --defaults-file=# Only read default options from the given file #.\n\ --defaults-extra-file=# Read this file after the global files are read.\n\ --defaults-group-suffix=# Additionally read default groups with # appended as a suffix."); }
O0
c
print_defaults: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rdi callq 0x37c50 movq 0x1ab068(%rip), %rax # 0x1e2fc0 movq (%rax), %rsi leaq 0x53913(%rip), %rdi # 0x8b875 callq 0x25360 movq -0x10(%rbp), %rax cmpq $0x0, (%rax) je 0x37fa9 movq 0x1ab048(%rip), %rax # 0x1e2fc0 movq (%rax), %rsi movl $0x20, %edi callq 0x253f0 movq -0x10(%rbp), %rax movq (%rax), %rdi movq 0x1ab02d(%rip), %rax # 0x1e2fc0 movq (%rax), %rsi callq 0x25360 movq -0x10(%rbp), %rax addq $0x8, %rax movq %rax, -0x10(%rbp) jmp 0x37f67 leaq 0x36eaa0(%rip), %rax # 0x3a6a50 cmpq $0x0, (%rax) je 0x3801b movq -0x18(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, (%rax) je 0x38019 movq 0x1aaff1(%rip), %rax # 0x1e2fc0 movq (%rax), %rsi movl $0x20, %edi callq 0x253f0 movq -0x10(%rbp), %rax movq (%rax), %rdi movq 0x1aafd6(%rip), %rax # 0x1e2fc0 movq (%rax), %rsi callq 0x25360 leaq 0x36ea57(%rip), %rax # 0x3a6a50 movq (%rax), %rdi movq 0x1aafbd(%rip), %rax # 0x1e2fc0 movq (%rax), %rsi callq 0x25360 movq -0x10(%rbp), %rax addq $0x8, %rax movq %rax, -0x10(%rbp) jmp 0x37fbe jmp 0x3801b leaq 0x53872(%rip), %rdi # 0x8b894 callq 0x25540 addq $0x20, %rsp popq %rbp retq nopl (%rax)
print_defaults: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov [rbp+var_18], rax mov rdi, [rbp+var_8] call my_print_default_files mov rax, cs:stdout_ptr mov rsi, [rax] lea rdi, aTheFollowingGr; "The following groups are read:" call _fputs loc_37F67: mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jz short loc_37FA9 mov rax, cs:stdout_ptr mov rsi, [rax] mov edi, 20h ; ' ' call _fputc mov rax, [rbp+var_10] mov rdi, [rax] mov rax, cs:stdout_ptr mov rsi, [rax] call _fputs mov rax, [rbp+var_10] add rax, 8 mov [rbp+var_10], rax jmp short loc_37F67 loc_37FA9: lea rax, my_defaults_group_suffix cmp qword ptr [rax], 0 jz short loc_3801B mov rax, [rbp+var_18] mov [rbp+var_10], rax loc_37FBE: mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jz short loc_38019 mov rax, cs:stdout_ptr mov rsi, [rax] mov edi, 20h ; ' ' call _fputc mov rax, [rbp+var_10] mov rdi, [rax] mov rax, cs:stdout_ptr mov rsi, [rax] call _fputs lea rax, my_defaults_group_suffix mov rdi, [rax] mov rax, cs:stdout_ptr mov rsi, [rax] call _fputs mov rax, [rbp+var_10] add rax, 8 mov [rbp+var_10], rax jmp short loc_37FBE loc_38019: jmp short $+2 loc_3801B: lea rdi, aTheFollowingOp; "\nThe following options may be given as"... call _puts add rsp, 20h pop rbp retn
long long print_defaults(_BYTE *a1, _QWORD *a2) { _QWORD *v3; // [rsp+10h] [rbp-10h] _QWORD *i; // [rsp+10h] [rbp-10h] v3 = a2; my_print_default_files(a1); fputs("The following groups are read:", stdout); while ( *v3 ) { fputc(32LL, stdout); fputs(*v3++, stdout); } if ( my_defaults_group_suffix ) { for ( i = a2; *i; ++i ) { fputc(32LL, stdout); fputs(*i, stdout); fputs(my_defaults_group_suffix, stdout); } } return puts( "\n" "The following options may be given as the first argument:\n" "--print-defaults Print the program argument list and exit.\n" "--no-defaults Don't read default options from any option file.\n" "The following specify which files/extra groups are read (specified before remaining options):\n" "--defaults-file=# Only read default options from the given file #.\n" "--defaults-extra-file=# Read this file after the global files are read.\n" "--defaults-group-suffix=# Additionally read default groups with # appended as a suffix."); }
print_defaults: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x00137c50 MOV RAX,qword ptr [0x002e2fc0] MOV RSI,qword ptr [RAX] LEA RDI,[0x18b875] CALL 0x00125360 LAB_00137f67: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JZ 0x00137fa9 MOV RAX,qword ptr [0x002e2fc0] MOV RSI,qword ptr [RAX] MOV EDI,0x20 CALL 0x001253f0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [0x002e2fc0] MOV RSI,qword ptr [RAX] CALL 0x00125360 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x8 MOV qword ptr [RBP + -0x10],RAX JMP 0x00137f67 LAB_00137fa9: LEA RAX,[0x4a6a50] CMP qword ptr [RAX],0x0 JZ 0x0013801b MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x10],RAX LAB_00137fbe: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JZ 0x00138019 MOV RAX,qword ptr [0x002e2fc0] MOV RSI,qword ptr [RAX] MOV EDI,0x20 CALL 0x001253f0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [0x002e2fc0] MOV RSI,qword ptr [RAX] CALL 0x00125360 LEA RAX,[0x4a6a50] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [0x002e2fc0] MOV RSI,qword ptr [RAX] CALL 0x00125360 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x8 MOV qword ptr [RBP + -0x10],RAX JMP 0x00137fbe LAB_00138019: JMP 0x0013801b LAB_0013801b: LEA RDI,[0x18b894] CALL 0x00125540 ADD RSP,0x20 POP RBP RET
void print_defaults(int8 param_1,long *param_2) { long *local_18; my_print_default_files(param_1); fputs("The following groups are read:",*(FILE **)PTR_stdout_002e2fc0); for (local_18 = param_2; *local_18 != 0; local_18 = local_18 + 1) { fputc(0x20,*(FILE **)PTR_stdout_002e2fc0); fputs((char *)*local_18,*(FILE **)PTR_stdout_002e2fc0); } local_18 = param_2; if (my_defaults_group_suffix != (char *)0x0) { for (; *local_18 != 0; local_18 = local_18 + 1) { fputc(0x20,*(FILE **)PTR_stdout_002e2fc0); fputs((char *)*local_18,*(FILE **)PTR_stdout_002e2fc0); fputs(my_defaults_group_suffix,*(FILE **)PTR_stdout_002e2fc0); } } puts( "\nThe following options may be given as the first argument:\n--print-defaults Print the program argument list and exit.\n--no-defaults Don\'t read default options from any option file.\nThe following specify which files/extra groups are read (specified before remaining options):\n--defaults-file=# Only read default options from the given file #.\n--defaults-extra-file=# Read this file after the global files are read.\n--defaults-group-suffix=# Additionally read default groups with # appended as a suffix." ); return; }
33,749
ft_simple_get_word
eloqsql/storage/myisam/ft_parser.c
uchar ft_simple_get_word(CHARSET_INFO *cs, uchar **start, const uchar *end, FT_WORD *word, my_bool skip_stopwords) { uchar *doc= *start; uint mwc, length; int mbl; int ctype; DBUG_ENTER("ft_simple_get_word"); do { for (;; doc+= (mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1))) { if (doc >= end) DBUG_RETURN(0); mbl= my_ci_ctype(cs, &ctype, (uchar*)doc, (uchar*)end); if (true_word_char(ctype, *doc)) break; } mwc= length= 0; for (word->pos= doc; doc < end; length++, doc+= (mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1))) { mbl= my_ci_ctype(cs, &ctype, (uchar*)doc, (uchar*)end); if (true_word_char(ctype, *doc)) mwc= 0; else if (!misc_word_char(*doc) || mwc) break; else mwc++; } word->len= (uint)(doc-word->pos) - mwc; if (skip_stopwords == FALSE || (length >= ft_min_word_len && length < ft_max_word_len && !is_stopword((char*) word->pos, word->len))) { *start= doc; DBUG_RETURN(1); } } while (doc < end); DBUG_RETURN(0); }
O3
c
ft_simple_get_word: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %r8d, -0x30(%rbp) movq %rcx, -0x38(%rbp) movq %rdx, %r12 movq %rdi, %r13 movq %rsi, -0x40(%rbp) movq (%rsi), %r15 leaq -0x2c(%rbp), %rbx movl $0x1, %r14d cmpq %r12, %r15 jae 0x73cbe movq 0xb8(%r13), %rax movq %r13, %rdi movq %rbx, %rsi movq %r15, %rdx movq %r12, %rcx callq *0x38(%rax) testb $0x7, -0x2c(%rbp) jne 0x73c16 cmpb $0x5f, (%r15) je 0x73c16 movl %eax, %ecx negl %ecx testl %eax, %eax cmovel %r14d, %ecx cmovgl %eax, %ecx addq %rcx, %r15 jmp 0x73bd9 movq -0x38(%rbp), %rax movq %r15, (%rax) xorl %r14d, %r14d cmpq %r12, %r15 jae 0x73c67 movq 0xb8(%r13), %rax movq %r13, %rdi movq %rbx, %rsi movq %r15, %rdx movq %r12, %rcx callq *0x38(%rax) testb $0x7, -0x2c(%rbp) jne 0x73c47 cmpb $0x5f, (%r15) jne 0x73c6e incl %r14d movl %eax, %ecx negl %ecx testl %eax, %eax movl $0x1, %edx cmovel %edx, %ecx cmovgl %eax, %ecx addq %rcx, %r15 cmpq %r12, %r15 jb 0x73c25 xorl %ecx, %ecx jmp 0x73c70 movq %r15, %rdi xorl %ecx, %ecx jmp 0x73c7a movb $0x1, %cl movq -0x38(%rbp), %rax movq (%rax), %rdi movl %r14d, %r14d movl %r15d, %esi subl %edi, %esi movq %rsi, 0x10(%rax) cmpb $0x0, -0x30(%rbp) je 0x73ccf leaq 0x310550(%rip), %rax # 0x3841e0 cmpq %r14, (%rax) ja 0x73cb0 leaq 0x31054c(%rip), %rax # 0x3841e8 cmpq %r14, (%rax) jbe 0x73cb0 movq %rcx, %r14 callq 0x7180d movq %r14, %rcx testl %eax, %eax je 0x73ccf testb %cl, %cl movl $0x1, %r14d jne 0x73bd9 xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq -0x40(%rbp), %rax movq %r15, (%rax) movb $0x1, %al jmp 0x73cc0
ft_simple_get_word: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_30], r8d mov [rbp+var_38], rcx mov r12, rdx mov r13, rdi mov [rbp+var_40], rsi mov r15, [rsi] lea rbx, [rbp+var_2C] mov r14d, 1 loc_73BD9: cmp r15, r12 jnb loc_73CBE mov rax, [r13+0B8h] mov rdi, r13 mov rsi, rbx mov rdx, r15 mov rcx, r12 call qword ptr [rax+38h] test [rbp+var_2C], 7 jnz short loc_73C16 cmp byte ptr [r15], 5Fh ; '_' jz short loc_73C16 mov ecx, eax neg ecx test eax, eax cmovz ecx, r14d cmovg ecx, eax add r15, rcx jmp short loc_73BD9 loc_73C16: mov rax, [rbp+var_38] mov [rax], r15 xor r14d, r14d cmp r15, r12 jnb short loc_73C67 loc_73C25: mov rax, [r13+0B8h] mov rdi, r13 mov rsi, rbx mov rdx, r15 mov rcx, r12 call qword ptr [rax+38h] test [rbp+var_2C], 7 jnz short loc_73C47 cmp byte ptr [r15], 5Fh ; '_' jnz short loc_73C6E loc_73C47: inc r14d mov ecx, eax neg ecx test eax, eax mov edx, 1 cmovz ecx, edx cmovg ecx, eax add r15, rcx cmp r15, r12 jb short loc_73C25 xor ecx, ecx jmp short loc_73C70 loc_73C67: mov rdi, r15 xor ecx, ecx jmp short loc_73C7A loc_73C6E: mov cl, 1 loc_73C70: mov rax, [rbp+var_38] mov rdi, [rax] mov r14d, r14d loc_73C7A: mov esi, r15d sub esi, edi mov [rax+10h], rsi cmp byte ptr [rbp+var_30], 0 jz short loc_73CCF lea rax, ft_min_word_len cmp [rax], r14 ja short loc_73CB0 lea rax, ft_max_word_len cmp [rax], r14 jbe short loc_73CB0 mov r14, rcx call is_stopword mov rcx, r14 test eax, eax jz short loc_73CCF loc_73CB0: test cl, cl mov r14d, 1 jnz loc_73BD9 loc_73CBE: xor eax, eax loc_73CC0: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_73CCF: mov rax, [rbp+var_40] mov [rax], r15 mov al, 1 jmp short loc_73CC0
char ft_simple_get_word(long long a1, _BYTE **a2, unsigned long long a3, long long *a4, char a5) { _BYTE *v7; // r15 int v8; // eax long long v9; // rcx long long *v10; // rax unsigned long long v11; // r14 int v12; // eax long long v13; // rcx char v14; // cl long long v15; // rdi long long v16; // rsi char v17; // r14 BOOL v18; // eax _BYTE v23[44]; // [rsp+14h] [rbp-2Ch] BYREF v7 = *a2; while ( 1 ) { while ( 1 ) { if ( (unsigned long long)v7 >= a3 ) return 0; v8 = (*(long long ( **)(long long, _BYTE *, _BYTE *, unsigned long long))(*(_QWORD *)(a1 + 184) + 56LL))( a1, v23, v7, a3); if ( (v23[0] & 7) != 0 || *v7 == 95 ) break; v9 = (unsigned int)-v8; if ( !v8 ) v9 = 1LL; if ( v8 > 0 ) v9 = (unsigned int)v8; v7 += v9; } v10 = a4; *a4 = (long long)v7; v11 = 0LL; if ( (unsigned long long)v7 >= a3 ) { v15 = (long long)v7; v14 = 0; } else { while ( 1 ) { v12 = (*(long long ( **)(long long, _BYTE *, _BYTE *, unsigned long long))(*(_QWORD *)(a1 + 184) + 56LL))( a1, v23, v7, a3); if ( (v23[0] & 7) == 0 && *v7 != 95 ) break; LODWORD(v11) = v11 + 1; v13 = (unsigned int)-v12; if ( !v12 ) v13 = 1LL; if ( v12 > 0 ) v13 = (unsigned int)v12; v7 += v13; if ( (unsigned long long)v7 >= a3 ) { v14 = 0; goto LABEL_21; } } v14 = 1; LABEL_21: v10 = a4; v15 = *a4; v11 = (unsigned int)v11; } v16 = (unsigned int)((_DWORD)v7 - v15); v10[2] = v16; if ( !a5 ) break; if ( ft_min_word_len <= v11 && ft_max_word_len > v11 ) { v17 = v14; v18 = is_stopword(v15, v16); v14 = v17; if ( !v18 ) break; } if ( !v14 ) return 0; } *a2 = v7; return 1; }
ft_simple_get_word: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV dword ptr [RBP + -0x30],R8D MOV qword ptr [RBP + -0x38],RCX MOV R12,RDX MOV R13,RDI MOV qword ptr [RBP + -0x40],RSI MOV R15,qword ptr [RSI] LEA RBX,[RBP + -0x2c] MOV R14D,0x1 LAB_00173bd9: CMP R15,R12 JNC 0x00173cbe MOV RAX,qword ptr [R13 + 0xb8] MOV RDI,R13 MOV RSI,RBX MOV RDX,R15 MOV RCX,R12 CALL qword ptr [RAX + 0x38] TEST byte ptr [RBP + -0x2c],0x7 JNZ 0x00173c16 CMP byte ptr [R15],0x5f JZ 0x00173c16 MOV ECX,EAX NEG ECX TEST EAX,EAX CMOVZ ECX,R14D CMOVG ECX,EAX ADD R15,RCX JMP 0x00173bd9 LAB_00173c16: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],R15 XOR R14D,R14D CMP R15,R12 JNC 0x00173c67 LAB_00173c25: MOV RAX,qword ptr [R13 + 0xb8] MOV RDI,R13 MOV RSI,RBX MOV RDX,R15 MOV RCX,R12 CALL qword ptr [RAX + 0x38] TEST byte ptr [RBP + -0x2c],0x7 JNZ 0x00173c47 CMP byte ptr [R15],0x5f JNZ 0x00173c6e LAB_00173c47: INC R14D MOV ECX,EAX NEG ECX TEST EAX,EAX MOV EDX,0x1 CMOVZ ECX,EDX CMOVG ECX,EAX ADD R15,RCX CMP R15,R12 JC 0x00173c25 XOR ECX,ECX JMP 0x00173c70 LAB_00173c67: MOV RDI,R15 XOR ECX,ECX JMP 0x00173c7a LAB_00173c6e: MOV CL,0x1 LAB_00173c70: MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX] MOV R14D,R14D LAB_00173c7a: MOV ESI,R15D SUB ESI,EDI MOV qword ptr [RAX + 0x10],RSI CMP byte ptr [RBP + -0x30],0x0 JZ 0x00173ccf LEA RAX,[0x4841e0] CMP qword ptr [RAX],R14 JA 0x00173cb0 LEA RAX,[0x4841e8] CMP qword ptr [RAX],R14 JBE 0x00173cb0 MOV R14,RCX CALL 0x0017180d MOV RCX,R14 TEST EAX,EAX JZ 0x00173ccf LAB_00173cb0: TEST CL,CL MOV R14D,0x1 JNZ 0x00173bd9 LAB_00173cbe: XOR EAX,EAX LAB_00173cc0: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00173ccf: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX],R15 MOV AL,0x1 JMP 0x00173cc0
int8 ft_simple_get_word(long param_1,int8 *param_2,char *param_3,int8 *param_4,char param_5) { bool bVar1; uint uVar2; int iVar3; ulong uVar4; ulong uVar5; uint uVar6; char *pcVar7; char *pcVar8; byte local_34 [4]; pcVar7 = (char *)*param_2; do { while( true ) { if (param_3 <= pcVar7) { return 0; } uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x38))(param_1,local_34,pcVar7); if (((local_34[0] & 7) != 0) || (*pcVar7 == '_')) break; uVar4 = (ulong)-uVar2; if (uVar2 == 0) { uVar4 = 1; } if (0 < (int)uVar2) { uVar4 = (ulong)uVar2; } pcVar7 = pcVar7 + uVar4; } *param_4 = pcVar7; uVar4 = 0; if (pcVar7 < param_3) { do { uVar6 = (uint)uVar4; uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x38))(param_1,local_34,pcVar7,param_3); if (((local_34[0] & 7) == 0) && (*pcVar7 != '_')) { bVar1 = true; pcVar8 = pcVar7; goto LAB_00173c70; } uVar6 = uVar6 + 1; uVar4 = (ulong)uVar6; uVar5 = (ulong)-uVar2; if (uVar2 == 0) { uVar5 = 1; } if (0 < (int)uVar2) { uVar5 = (ulong)uVar2; } pcVar7 = pcVar7 + uVar5; } while (pcVar7 < param_3); bVar1 = false; pcVar8 = pcVar7; LAB_00173c70: pcVar7 = (char *)*param_4; uVar4 = (ulong)uVar6; } else { bVar1 = false; pcVar8 = pcVar7; } param_4[2] = (ulong)(uint)((int)pcVar8 - (int)pcVar7); if ((param_5 == '\0') || (((ft_min_word_len <= uVar4 && (uVar4 < ft_max_word_len)) && (iVar3 = is_stopword(), iVar3 == 0)))) { *param_2 = pcVar8; return 1; } pcVar7 = pcVar8; if (!bVar1) { return 0; } } while( true ); }
33,750
misc_get_set_allocator_Test::~misc_get_set_allocator_Test()
magnetron/test/unittests/core/misc.cpp
TEST(misc, get_set_allocator) { ASSERT_NE(nullptr, allocator()); auto* prev {allocator()}; constexpr auto mock {static_cast<std::uintptr_t>(0xdeadbeef)}; allocator(std::bit_cast<alloc_fn*>(mock)); ASSERT_EQ(allocator(), std::bit_cast<alloc_fn*>(mock)); allocator(prev); ASSERT_EQ(allocator(), prev); }
O3
cpp
misc_get_set_allocator_Test::~misc_get_set_allocator_Test(): pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx callq 0x60c6c movl $0x10, %esi movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x106d0 nop
_ZN27misc_get_set_allocator_TestD0Ev: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi call _ZN7testing4TestD2Ev; testing::Test::~Test() mov esi, 10h; unsigned __int64 mov rdi, rbx; void * add rsp, 8 pop rbx pop rbp jmp __ZdlPvm; operator delete(void *,ulong)
void misc_get_set_allocator_Test::~misc_get_set_allocator_Test(misc_get_set_allocator_Test *this) { testing::Test::~Test(this); operator delete(this, 0x10uLL); }
~misc_get_set_allocator_Test: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x00160c6c MOV ESI,0x10 MOV RDI,RBX ADD RSP,0x8 POP RBX POP RBP JMP 0x001106d0
/* misc_get_set_allocator_Test::~misc_get_set_allocator_Test() */ void __thiscall misc_get_set_allocator_Test::~misc_get_set_allocator_Test(misc_get_set_allocator_Test *this) { testing::Test::~Test((Test *)this); operator_delete(this,0x10); return; }
33,751
my_string_repertoire
eloqsql/strings/ctype.c
my_repertoire_t my_string_repertoire(CHARSET_INFO *cs, const char *str, size_t length) { if (cs->mbminlen == 1 && !(cs->state & MY_CS_NONASCII)) { return my_string_repertoire_8bit(cs, str, length); } else { const char *strend= str + length; my_wc_t wc; int chlen; for (; (chlen= my_ci_mb_wc(cs, &wc, (uchar*) str, (uchar*) strend)) > 0; str+= chlen) { if (wc > 0x7F) return MY_REPERTOIRE_UNICODE30; } } return MY_REPERTOIRE_ASCII; }
O3
c
my_string_repertoire: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 cmpl $0x1, 0x98(%rdi) jne 0x35053 testb $0x20, 0xd(%r15) jne 0x35053 movl $0x1, %eax testq %rbx, %rbx jle 0x350b9 addq %r14, %rbx cmpb $0x0, (%r14) js 0x350c6 incq %r14 cmpq %rbx, %r14 jb 0x35043 jmp 0x350b9 addq %r14, %rbx movq 0xb8(%r15), %rax leaq -0x28(%rbp), %rsi movq %r15, %rdi movq %r14, %rdx movq %rbx, %rcx callq *0x28(%rax) testl %eax, %eax setg %cl jle 0x350af cmpq $0x7f, -0x28(%rbp) ja 0x350af leaq -0x28(%rbp), %r12 movq %r14, %rcx movl %eax, %r14d addq %rcx, %r14 movq 0xb8(%r15), %rax movq %r15, %rdi movq %r12, %rsi movq %r14, %rdx movq %rbx, %rcx callq *0x28(%rax) testl %eax, %eax setg %cl jle 0x350af cmpq $0x80, -0x28(%rbp) jb 0x3507f movzbl %cl, %eax leal 0x1(,%rax,2), %eax addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x3, %eax jmp 0x350b9
my_string_repertoire: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov rbx, rdx mov r14, rsi mov r15, rdi cmp dword ptr [rdi+98h], 1 jnz short loc_35053 test byte ptr [r15+0Dh], 20h jnz short loc_35053 mov eax, 1 test rbx, rbx jle short loc_350B9 add rbx, r14 loc_35043: cmp byte ptr [r14], 0 js short loc_350C6 inc r14 cmp r14, rbx jb short loc_35043 jmp short loc_350B9 loc_35053: add rbx, r14 mov rax, [r15+0B8h] lea rsi, [rbp+var_28] mov rdi, r15 mov rdx, r14 mov rcx, rbx call qword ptr [rax+28h] test eax, eax setnle cl jle short loc_350AF cmp [rbp+var_28], 7Fh ja short loc_350AF lea r12, [rbp+var_28] loc_3507F: mov rcx, r14 mov r14d, eax add r14, rcx mov rax, [r15+0B8h] mov rdi, r15 mov rsi, r12 mov rdx, r14 mov rcx, rbx call qword ptr [rax+28h] test eax, eax setnle cl jle short loc_350AF cmp [rbp+var_28], 80h jb short loc_3507F loc_350AF: movzx eax, cl lea eax, ds:1[rax*2] loc_350B9: add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_350C6: mov eax, 3 jmp short loc_350B9
long long my_string_repertoire(long long a1, char *a2, long long a3) { char *v3; // r14 long long result; // rax char *v5; // rbx int v6; // eax bool v7; // cl _QWORD v8[5]; // [rsp+8h] [rbp-28h] BYREF v3 = a2; if ( *(_DWORD *)(a1 + 152) != 1 || (*(_BYTE *)(a1 + 13) & 0x20) != 0 ) { v5 = &a2[a3]; v6 = (*(long long ( **)(long long, _QWORD *, char *, char *))(*(_QWORD *)(a1 + 184) + 40LL))( a1, v8, a2, &a2[a3]); v7 = v6 > 0; if ( v6 > 0 && v8[0] <= 0x7FuLL ) { do { v3 += (unsigned int)v6; v6 = (*(long long ( **)(long long, _QWORD *, char *, char *))(*(_QWORD *)(a1 + 184) + 40LL))( a1, v8, v3, v5); v7 = v6 > 0; } while ( v6 > 0 && v8[0] < 0x80uLL ); } return 2 * (unsigned int)v7 + 1; } else { result = 1LL; if ( a3 > 0 ) { while ( *v3 >= 0 ) { if ( ++v3 >= &a2[a3] ) return result; } return 3LL; } } return result; }
my_string_repertoire: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RDX MOV R14,RSI MOV R15,RDI CMP dword ptr [RDI + 0x98],0x1 JNZ 0x00135053 TEST byte ptr [R15 + 0xd],0x20 JNZ 0x00135053 MOV EAX,0x1 TEST RBX,RBX JLE 0x001350b9 ADD RBX,R14 LAB_00135043: CMP byte ptr [R14],0x0 JS 0x001350c6 INC R14 CMP R14,RBX JC 0x00135043 JMP 0x001350b9 LAB_00135053: ADD RBX,R14 MOV RAX,qword ptr [R15 + 0xb8] LEA RSI,[RBP + -0x28] MOV RDI,R15 MOV RDX,R14 MOV RCX,RBX CALL qword ptr [RAX + 0x28] TEST EAX,EAX SETG CL JLE 0x001350af CMP qword ptr [RBP + -0x28],0x7f JA 0x001350af LEA R12,[RBP + -0x28] LAB_0013507f: MOV RCX,R14 MOV R14D,EAX ADD R14,RCX MOV RAX,qword ptr [R15 + 0xb8] MOV RDI,R15 MOV RSI,R12 MOV RDX,R14 MOV RCX,RBX CALL qword ptr [RAX + 0x28] TEST EAX,EAX SETG CL JLE 0x001350af CMP qword ptr [RBP + -0x28],0x80 JC 0x0013507f LAB_001350af: MOVZX EAX,CL LEA EAX,[0x1 + RAX*0x2] LAB_001350b9: ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001350c6: MOV EAX,0x3 JMP 0x001350b9
char my_string_repertoire(long param_1,char *param_2,long param_3) { char cVar1; uint uVar2; bool bVar3; char *pcVar4; ulong local_30; if ((*(int *)(param_1 + 0x98) == 1) && ((*(byte *)(param_1 + 0xd) & 0x20) == 0)) { cVar1 = '\x01'; if (0 < param_3) { pcVar4 = param_2 + param_3; do { if (*param_2 < '\0') { return '\x03'; } param_2 = param_2 + 1; } while (param_2 < pcVar4); } } else { pcVar4 = param_2 + param_3; uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x28))(param_1,&local_30,param_2,pcVar4); bVar3 = 0 < (int)uVar2; if ((0 < (int)uVar2) && (local_30 < 0x80)) { do { param_2 = param_2 + uVar2; uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x28))(param_1,&local_30,param_2,pcVar4); bVar3 = 0 < (int)uVar2; if ((int)uVar2 < 1) break; } while (local_30 < 0x80); } cVar1 = bVar3 * '\x02' + '\x01'; } return cVar1; }
33,752
c4_eth_get_signblock_and_parent
corpus-core[P]colibri-stateless/src/chains/eth/proofer/beacon.c
c4_status_t c4_eth_get_signblock_and_parent(proofer_ctx_t* ctx, bytes32_t sign_hash, bytes32_t data_hash, ssz_ob_t* sig_block, ssz_ob_t* data_block) { beacon_head_t sign = {0}; beacon_head_t data = {0}; c4_status_t status = C4_SUCCESS; // handle sign_block if (!sign_hash && data_hash) { json_t header = {0}; // we need to find the next block first TRY_ASYNC(get_beacon_header_by_parent_hash(ctx, data_hash, &header, sign.root)); if (header.type == JSON_TYPE_NOT_FOUND) THROW_ERROR("The requested block has not been signed yet and cannot be verified!!"); } else if (sign_hash) memcpy(sign.root, sign_hash, 32); TRY_ADD_ASYNC(status, get_block(ctx, &sign, sig_block)); // handle data_block if (!data_hash && status == C4_SUCCESS) memcpy(data.root, ssz_get(sig_block, "parentRoot").bytes.data, 32); else if (data_hash) memcpy(data.root, data_hash, 32); else return status; TRY_ADD_ASYNC(status, get_block(ctx, &data, data_block)); return status; }
O1
c
c4_eth_get_signblock_and_parent: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x90, %rsp movq %r8, %rbx movq %rcx, %r15 movq %rdx, %r12 movq %rdi, %r14 xorps %xmm0, %xmm0 movaps %xmm0, 0x40(%rsp) movaps %xmm0, 0x30(%rsp) xorl %eax, %eax movq %rax, 0x50(%rsp) movq %rax, 0x20(%rsp) movaps %xmm0, 0x10(%rsp) movaps %xmm0, (%rsp) testq %rsi, %rsi setne %al testq %rdx, %rdx sete %cl orb %al, %cl jne 0x956b leaq 0x60(%rsp), %rdx movaps %xmm0, (%rdx) movq $0x0, 0x10(%rdx) leaq 0x38(%rsp), %rcx movq %r14, %rdi movq %r12, %rsi callq 0x965a movl %eax, %ebp testl %eax, %eax je 0x9583 xorl %eax, %eax jmp 0x9590 testq %rsi, %rsi je 0x9581 movups (%rsi), %xmm0 movups 0x10(%rsi), %xmm1 movups %xmm1, 0x48(%rsp) movups %xmm0, 0x38(%rsp) jmp 0x9598 movb $0x1, %al cmpl $-0x1, 0x70(%rsp) je 0x9643 testb %al, %al je 0x9631 leaq 0x30(%rsp), %rsi movq %r14, %rdi movq %r15, %rdx callq 0x986f xorl %ecx, %ecx cmpl $0x2, %eax sete %dl cmpl $-0x1, %eax cmovel %eax, %ebp je 0x9631 movb %dl, %cl movl %ecx, %ebp addl %ecx, %ebp cmpl $0x2, %eax sete %al testq %r12, %r12 setne %cl orb %al, %cl jne 0x95fd leaq 0x3423c(%rip), %rdx # 0x3d811 leaq 0x78(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi callq 0x14ddd movq 0x8(%r12), %rax movups (%rax), %xmm0 movups 0x10(%rax), %xmm1 movups %xmm0, 0x8(%rsp) movups %xmm1, 0x18(%rsp) jmp 0x9617 testq %r12, %r12 je 0x9631 movups (%r12), %xmm0 movups 0x10(%r12), %xmm1 movups %xmm1, 0x18(%rsp) movups %xmm0, 0x8(%rsp) movq %rsp, %rsi movq %r14, %rdi movq %rbx, %rdx callq 0x986f cmpl $0x2, %eax cmovel %eax, %ebp cmpl $-0x1, %eax cmovel %eax, %ebp movl %ebp, %eax addq $0x90, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x38(%r14), %rdi leaq 0x3417e(%rip), %rsi # 0x3d7cc callq 0x18879 movl %eax, %ebp jmp 0x9567
c4_eth_get_signblock_and_parent: push rbp push r15 push r14 push r12 push rbx sub rsp, 90h mov rbx, r8 mov r15, rcx mov r12, rdx mov r14, rdi xorps xmm0, xmm0 movaps [rsp+0B8h+var_78], xmm0 movaps [rsp+0B8h+var_88], xmm0 xor eax, eax mov [rsp+0B8h+var_68], rax mov [rsp+0B8h+var_98], rax movaps [rsp+0B8h+var_A8], xmm0 movaps [rsp+0B8h+var_B8], xmm0 test rsi, rsi setnz al test rdx, rdx setz cl or cl, al jnz short loc_956B lea rdx, [rsp+0B8h+var_58] movaps xmmword ptr [rdx], xmm0 mov qword ptr [rdx+10h], 0 lea rcx, [rsp+0B8h+var_88+8] mov rdi, r14 mov rsi, r12 call get_beacon_header_by_parent_hash mov ebp, eax test eax, eax jz short loc_9583 loc_9567: xor eax, eax jmp short loc_9590 loc_956B: test rsi, rsi jz short loc_9581 movups xmm0, xmmword ptr [rsi] movups xmm1, xmmword ptr [rsi+10h] movups [rsp+0B8h+var_78+8], xmm1 movups [rsp+0B8h+var_88+8], xmm0 loc_9581: jmp short loc_9598 loc_9583: mov al, 1 cmp [rsp+0B8h+var_48], 0FFFFFFFFh jz loc_9643 loc_9590: test al, al jz loc_9631 loc_9598: lea rsi, [rsp+0B8h+var_88] mov rdi, r14 mov rdx, r15 call get_block xor ecx, ecx cmp eax, 2 setz dl cmp eax, 0FFFFFFFFh cmovz ebp, eax jz short loc_9631 mov cl, dl mov ebp, ecx add ebp, ecx cmp eax, 2 setz al test r12, r12 setnz cl or cl, al jnz short loc_95FD lea rdx, aParentroot; "parentRoot" lea r12, [rsp+0B8h+var_40] mov rdi, r12 mov rsi, r15 call ssz_get mov rax, [r12+8] movups xmm0, xmmword ptr [rax] movups xmm1, xmmword ptr [rax+10h] movups [rsp+0B8h+var_B8+8], xmm0 movups [rsp+0B8h+var_A8+8], xmm1 jmp short loc_9617 loc_95FD: test r12, r12 jz short loc_9631 movups xmm0, xmmword ptr [r12] movups xmm1, xmmword ptr [r12+10h] movups [rsp+0B8h+var_A8+8], xmm1 movups [rsp+0B8h+var_B8+8], xmm0 loc_9617: mov rsi, rsp mov rdi, r14 mov rdx, rbx call get_block cmp eax, 2 cmovz ebp, eax cmp eax, 0FFFFFFFFh cmovz ebp, eax loc_9631: mov eax, ebp add rsp, 90h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_9643: lea rdi, [r14+38h] lea rsi, aTheRequestedBl; "The requested block has not been signed"... call c4_state_add_error mov ebp, eax jmp loc_9567
long long c4_eth_get_signblock_and_parent( long long a1, __int128 *a2, __int128 *a3, long long a4, long long a5, long long a6) { unsigned int beacon_header_by_parent_hash; // ebp char v10; // al __int128 v11; // xmm0 int block; // eax int v13; // ecx __int128 v14; // xmm1 __int128 v15; // xmm0 int v16; // eax _OWORD v18[3]; // [rsp+0h] [rbp-B8h] BYREF _OWORD v19[3]; // [rsp+30h] [rbp-88h] BYREF __int128 v20; // [rsp+60h] [rbp-58h] BYREF long long v21; // [rsp+70h] [rbp-48h] _BYTE v22[8]; // [rsp+78h] [rbp-40h] BYREF _OWORD *v23; // [rsp+80h] [rbp-38h] memset(v19, 0, 40); memset(v18, 0, 40); if ( a2 == 0LL && a3 != 0LL ) { v20 = 0LL; v21 = 0LL; beacon_header_by_parent_hash = get_beacon_header_by_parent_hash( a1, a3, &v20, (char *)v19 + 8, a5, a6, *(_QWORD *)&v18[0], *((_QWORD *)&v18[0] + 1), *(_QWORD *)&v18[1], *((_QWORD *)&v18[1] + 1), *(_QWORD *)&v18[2]); if ( !beacon_header_by_parent_hash ) { v10 = 1; if ( (_DWORD)v21 != -1 ) { LABEL_8: if ( !v10 ) return beacon_header_by_parent_hash; goto LABEL_9; } beacon_header_by_parent_hash = c4_state_add_error( a1 + 56, "The requested block has not been signed yet and cannot be verified!!"); } v10 = 0; goto LABEL_8; } if ( a2 ) { v11 = *a2; *(_OWORD *)((char *)&v19[1] + 8) = a2[1]; *(_OWORD *)((char *)v19 + 8) = v11; } LABEL_9: block = get_block(a1, v19, a4); v13 = 0; if ( block == -1 ) { return (unsigned int)-1; } else { LOBYTE(v13) = block == 2; beacon_header_by_parent_hash = 2 * v13; if ( block == 2 || a3 != 0LL ) { if ( !a3 ) return beacon_header_by_parent_hash; v15 = *a3; *(_OWORD *)((char *)&v18[1] + 8) = a3[1]; *(_OWORD *)((char *)v18 + 8) = v15; } else { ssz_get(v22, a4, "parentRoot"); v14 = v23[1]; *(_OWORD *)((char *)v18 + 8) = *v23; *(_OWORD *)((char *)&v18[1] + 8) = v14; } v16 = get_block(a1, v18, a5); if ( v16 == 2 ) beacon_header_by_parent_hash = 2; if ( v16 == -1 ) return (unsigned int)-1; } return beacon_header_by_parent_hash; }
c4_eth_get_signblock_and_parent: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x90 MOV RBX,R8 MOV R15,RCX MOV R12,RDX MOV R14,RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 XOR EAX,EAX MOV qword ptr [RSP + 0x50],RAX MOV qword ptr [RSP + 0x20],RAX MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS xmmword ptr [RSP],XMM0 TEST RSI,RSI SETNZ AL TEST RDX,RDX SETZ CL OR CL,AL JNZ 0x0010956b LEA RDX,[RSP + 0x60] MOVAPS xmmword ptr [RDX],XMM0 MOV qword ptr [RDX + 0x10],0x0 LEA RCX,[RSP + 0x38] MOV RDI,R14 MOV RSI,R12 CALL 0x0010965a MOV EBP,EAX TEST EAX,EAX JZ 0x00109583 LAB_00109567: XOR EAX,EAX JMP 0x00109590 LAB_0010956b: TEST RSI,RSI JZ 0x00109581 MOVUPS XMM0,xmmword ptr [RSI] MOVUPS XMM1,xmmword ptr [RSI + 0x10] MOVUPS xmmword ptr [RSP + 0x48],XMM1 MOVUPS xmmword ptr [RSP + 0x38],XMM0 LAB_00109581: JMP 0x00109598 LAB_00109583: MOV AL,0x1 CMP dword ptr [RSP + 0x70],-0x1 JZ 0x00109643 LAB_00109590: TEST AL,AL JZ 0x00109631 LAB_00109598: LEA RSI,[RSP + 0x30] MOV RDI,R14 MOV RDX,R15 CALL 0x0010986f XOR ECX,ECX CMP EAX,0x2 SETZ DL CMP EAX,-0x1 CMOVZ EBP,EAX JZ 0x00109631 MOV CL,DL MOV EBP,ECX ADD EBP,ECX CMP EAX,0x2 SETZ AL TEST R12,R12 SETNZ CL OR CL,AL JNZ 0x001095fd LEA RDX,[0x13d811] LEA R12,[RSP + 0x78] MOV RDI,R12 MOV RSI,R15 CALL 0x00114ddd MOV RAX,qword ptr [R12 + 0x8] MOVUPS XMM0,xmmword ptr [RAX] MOVUPS XMM1,xmmword ptr [RAX + 0x10] MOVUPS xmmword ptr [RSP + 0x8],XMM0 MOVUPS xmmword ptr [RSP + 0x18],XMM1 JMP 0x00109617 LAB_001095fd: TEST R12,R12 JZ 0x00109631 MOVUPS XMM0,xmmword ptr [R12] MOVUPS XMM1,xmmword ptr [R12 + 0x10] MOVUPS xmmword ptr [RSP + 0x18],XMM1 MOVUPS xmmword ptr [RSP + 0x8],XMM0 LAB_00109617: MOV RSI,RSP MOV RDI,R14 MOV RDX,RBX CALL 0x0010986f CMP EAX,0x2 CMOVZ EBP,EAX CMP EAX,-0x1 CMOVZ EBP,EAX LAB_00109631: MOV EAX,EBP ADD RSP,0x90 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00109643: LEA RDI,[R14 + 0x38] LEA RSI,[0x13d7cc] CALL 0x00118879 MOV EBP,EAX JMP 0x00109567
int c4_eth_get_signblock_and_parent (long param_1,int8 *param_2,int8 *param_3,int8 param_4, int8 param_5) { bool bVar1; int iVar2; int iVar3; int8 local_b8; int8 uStack_b0; int8 local_a8; int8 uStack_a0; int8 local_98; int8 local_88; int8 uStack_80; int8 local_78; int8 uStack_70; int8 local_68; int8 local_58; int8 uStack_50; int8 local_48; int1 local_40 [8]; int8 *local_38; local_78 = 0; uStack_70 = 0; local_88 = 0; uStack_80 = 0; local_68 = 0; local_98 = 0; local_a8 = 0; uStack_a0 = 0; local_b8 = 0; uStack_b0 = 0; if (param_3 == (int8 *)0x0 || param_2 != (int8 *)0x0) { if (param_2 != (int8 *)0x0) { uStack_80 = *param_2; local_78 = param_2[1]; uStack_70 = param_2[2]; local_68 = param_2[3]; } goto LAB_00109598; } local_58 = 0; uStack_50 = 0; local_48 = 0; iVar2 = get_beacon_header_by_parent_hash(param_1,param_3,&local_58,&uStack_80); if (iVar2 == 0) { bVar1 = true; if ((int)local_48 == -1) { iVar2 = c4_state_add_error(param_1 + 0x38, "The requested block has not been signed yet and cannot be verified!!" ); goto LAB_00109567; } } else { LAB_00109567: bVar1 = false; } if (!bVar1) { return iVar2; } LAB_00109598: iVar2 = get_block(param_1,&local_88,param_4); if (iVar2 == -1) { iVar3 = -1; } else { iVar3 = (uint)(iVar2 == 2) * 2; if (param_3 == (int8 *)0x0 && iVar2 != 2) { ssz_get(local_40,param_4,"parentRoot"); uStack_b0 = *local_38; local_a8 = local_38[1]; uStack_a0 = local_38[2]; local_98 = local_38[3]; } else { if (param_3 == (int8 *)0x0) { return iVar3; } uStack_b0 = *param_3; local_a8 = param_3[1]; uStack_a0 = param_3[2]; local_98 = param_3[3]; } iVar2 = get_block(param_1,&local_b8,param_5); if (iVar2 == 2) { iVar3 = 2; } if (iVar2 == -1) { iVar3 = -1; } } return iVar3; }
33,753
c4_eth_get_signblock_and_parent
corpus-core[P]colibri-stateless/src/chains/eth/proofer/beacon.c
c4_status_t c4_eth_get_signblock_and_parent(proofer_ctx_t* ctx, bytes32_t sign_hash, bytes32_t data_hash, ssz_ob_t* sig_block, ssz_ob_t* data_block) { beacon_head_t sign = {0}; beacon_head_t data = {0}; c4_status_t status = C4_SUCCESS; // handle sign_block if (!sign_hash && data_hash) { json_t header = {0}; // we need to find the next block first TRY_ASYNC(get_beacon_header_by_parent_hash(ctx, data_hash, &header, sign.root)); if (header.type == JSON_TYPE_NOT_FOUND) THROW_ERROR("The requested block has not been signed yet and cannot be verified!!"); } else if (sign_hash) memcpy(sign.root, sign_hash, 32); TRY_ADD_ASYNC(status, get_block(ctx, &sign, sig_block)); // handle data_block if (!data_hash && status == C4_SUCCESS) memcpy(data.root, ssz_get(sig_block, "parentRoot").bytes.data, 32); else if (data_hash) memcpy(data.root, data_hash, 32); else return status; TRY_ADD_ASYNC(status, get_block(ctx, &data, data_block)); return status; }
O2
c
c4_eth_get_signblock_and_parent: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x90, %rsp movq %r8, %rbx movq %rcx, %r15 movq %rdx, %r12 movq %rdi, %r14 xorps %xmm0, %xmm0 andq $0x0, 0x50(%rsp) movaps %xmm0, 0x40(%rsp) movaps %xmm0, 0x30(%rsp) movaps %xmm0, 0x10(%rsp) movaps %xmm0, (%rsp) andq $0x0, 0x20(%rsp) testq %rsi, %rsi setne %al testq %rdx, %rdx sete %cl orb %al, %cl jne 0x8f15 leaq 0x60(%rsp), %rdx movaps %xmm0, (%rdx) andq $0x0, 0x10(%rdx) leaq 0x38(%rsp), %rcx movq %r14, %rdi movq %r12, %rsi callq 0x8fd7 movl %eax, %ebp testl %eax, %eax jne 0x8fc5 cmpl $-0x1, 0x70(%rsp) jne 0x8f2b addq $0x38, %r14 leaq 0x2f8c6(%rip), %rsi # 0x387cc movq %r14, %rdi callq 0x16fd9 movl %eax, %ebp jmp 0x8fc5 testq %rsi, %rsi je 0x8f2b movups (%rsi), %xmm0 movups 0x10(%rsi), %xmm1 movups %xmm1, 0x48(%rsp) movups %xmm0, 0x38(%rsp) leaq 0x30(%rsp), %rsi movq %r14, %rdi movq %r15, %rdx callq 0x91e2 xorl %ebp, %ebp cmpl $0x2, %eax sete %cl cmpl $-0x1, %eax je 0x8f8c movb %cl, %bpl addl %ebp, %ebp cmpl $0x2, %eax sete %al testq %r12, %r12 setne %cl orb %al, %cl jne 0x8f91 leaq 0x2f8ad(%rip), %rdx # 0x38811 leaq 0x78(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi callq 0x13a7d movq 0x8(%r12), %rax movups (%rax), %xmm0 movups 0x10(%rax), %xmm1 movups %xmm0, 0x8(%rsp) movups %xmm1, 0x18(%rsp) jmp 0x8fab pushq $-0x1 popq %rbp jmp 0x8fc5 testq %r12, %r12 je 0x8fc5 movups (%r12), %xmm0 movups 0x10(%r12), %xmm1 movups %xmm1, 0x18(%rsp) movups %xmm0, 0x8(%rsp) movq %rsp, %rsi movq %r14, %rdi movq %rbx, %rdx callq 0x91e2 cmpl $0x2, %eax cmovel %eax, %ebp cmpl $-0x1, %eax cmovel %eax, %ebp movl %ebp, %eax addq $0x90, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
c4_eth_get_signblock_and_parent: push rbp push r15 push r14 push r12 push rbx sub rsp, 90h mov rbx, r8 mov r15, rcx mov r12, rdx mov r14, rdi xorps xmm0, xmm0 and [rsp+0B8h+var_68], 0 movaps [rsp+0B8h+var_78], xmm0 movaps [rsp+0B8h+var_88], xmm0 movaps [rsp+0B8h+var_A8], xmm0 movaps [rsp+0B8h+var_B8], xmm0 and [rsp+0B8h+var_98], 0 test rsi, rsi setnz al test rdx, rdx setz cl or cl, al jnz short loc_8F15 lea rdx, [rsp+0B8h+var_58] movaps xmmword ptr [rdx], xmm0 and qword ptr [rdx+10h], 0 lea rcx, [rsp+0B8h+var_88+8] mov rdi, r14 mov rsi, r12 call get_beacon_header_by_parent_hash mov ebp, eax test eax, eax jnz loc_8FC5 cmp [rsp+0B8h+var_48], 0FFFFFFFFh jnz short loc_8F2B add r14, 38h ; '8' lea rsi, aTheRequestedBl; "The requested block has not been signed"... mov rdi, r14 call c4_state_add_error mov ebp, eax jmp loc_8FC5 loc_8F15: test rsi, rsi jz short loc_8F2B movups xmm0, xmmword ptr [rsi] movups xmm1, xmmword ptr [rsi+10h] movups [rsp+0B8h+var_78+8], xmm1 movups [rsp+0B8h+var_88+8], xmm0 loc_8F2B: lea rsi, [rsp+0B8h+var_88] mov rdi, r14 mov rdx, r15 call get_block xor ebp, ebp cmp eax, 2 setz cl cmp eax, 0FFFFFFFFh jz short loc_8F8C mov bpl, cl add ebp, ebp cmp eax, 2 setz al test r12, r12 setnz cl or cl, al jnz short loc_8F91 lea rdx, aParentroot; "parentRoot" lea r12, [rsp+0B8h+var_40] mov rdi, r12 mov rsi, r15 call ssz_get mov rax, [r12+8] movups xmm0, xmmword ptr [rax] movups xmm1, xmmword ptr [rax+10h] movups [rsp+0B8h+var_B8+8], xmm0 movups [rsp+0B8h+var_A8+8], xmm1 jmp short loc_8FAB loc_8F8C: push 0FFFFFFFFFFFFFFFFh pop rbp jmp short loc_8FC5 loc_8F91: test r12, r12 jz short loc_8FC5 movups xmm0, xmmword ptr [r12] movups xmm1, xmmword ptr [r12+10h] movups [rsp+0B8h+var_A8+8], xmm1 movups [rsp+0B8h+var_B8+8], xmm0 loc_8FAB: mov rsi, rsp mov rdi, r14 mov rdx, rbx call get_block cmp eax, 2 cmovz ebp, eax cmp eax, 0FFFFFFFFh cmovz ebp, eax loc_8FC5: mov eax, ebp add rsp, 90h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long c4_eth_get_signblock_and_parent( long long a1, __int128 *a2, __int128 *a3, long long a4, long long a5, long long a6) { unsigned int beacon_header_by_parent_hash; // ebp __int128 v10; // xmm0 int block; // eax int v12; // ebp __int128 v13; // xmm1 __int128 v14; // xmm0 int v15; // eax _OWORD v17[3]; // [rsp+0h] [rbp-B8h] BYREF _OWORD v18[3]; // [rsp+30h] [rbp-88h] BYREF __int128 v19; // [rsp+60h] [rbp-58h] BYREF long long v20; // [rsp+70h] [rbp-48h] _BYTE v21[8]; // [rsp+78h] [rbp-40h] BYREF _OWORD *v22; // [rsp+80h] [rbp-38h] memset(v18, 0, 40); memset(v17, 0, 40); if ( a2 != 0LL || a3 == 0LL ) { if ( a2 ) { v10 = *a2; *(_OWORD *)((char *)&v18[1] + 8) = a2[1]; *(_OWORD *)((char *)v18 + 8) = v10; } } else { v19 = 0LL; v20 = 0LL; beacon_header_by_parent_hash = get_beacon_header_by_parent_hash( a1, a3, &v19, (char *)v18 + 8, a5, a6, *(_QWORD *)&v17[0], *((_QWORD *)&v17[0] + 1), *(_QWORD *)&v17[1], *((_QWORD *)&v17[1] + 1), *(_QWORD *)&v17[2]); if ( beacon_header_by_parent_hash ) return beacon_header_by_parent_hash; if ( (_DWORD)v20 == -1 ) return (unsigned int)c4_state_add_error( a1 + 56, "The requested block has not been signed yet and cannot be verified!!"); } block = get_block(a1, v18, a4); v12 = 0; if ( block == -1 ) { return (unsigned int)-1; } else { LOBYTE(v12) = block == 2; beacon_header_by_parent_hash = 2 * v12; if ( block == 2 || a3 != 0LL ) { if ( !a3 ) return beacon_header_by_parent_hash; v14 = *a3; *(_OWORD *)((char *)&v17[1] + 8) = a3[1]; *(_OWORD *)((char *)v17 + 8) = v14; } else { ssz_get(v21, a4, "parentRoot"); v13 = v22[1]; *(_OWORD *)((char *)v17 + 8) = *v22; *(_OWORD *)((char *)&v17[1] + 8) = v13; } v15 = get_block(a1, v17, a5); if ( v15 == 2 ) beacon_header_by_parent_hash = 2; if ( v15 == -1 ) return (unsigned int)-1; } return beacon_header_by_parent_hash; }
c4_eth_get_signblock_and_parent: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x90 MOV RBX,R8 MOV R15,RCX MOV R12,RDX MOV R14,RDI XORPS XMM0,XMM0 AND qword ptr [RSP + 0x50],0x0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS xmmword ptr [RSP],XMM0 AND qword ptr [RSP + 0x20],0x0 TEST RSI,RSI SETNZ AL TEST RDX,RDX SETZ CL OR CL,AL JNZ 0x00108f15 LEA RDX,[RSP + 0x60] MOVAPS xmmword ptr [RDX],XMM0 AND qword ptr [RDX + 0x10],0x0 LEA RCX,[RSP + 0x38] MOV RDI,R14 MOV RSI,R12 CALL 0x00108fd7 MOV EBP,EAX TEST EAX,EAX JNZ 0x00108fc5 CMP dword ptr [RSP + 0x70],-0x1 JNZ 0x00108f2b ADD R14,0x38 LEA RSI,[0x1387cc] MOV RDI,R14 CALL 0x00116fd9 MOV EBP,EAX JMP 0x00108fc5 LAB_00108f15: TEST RSI,RSI JZ 0x00108f2b MOVUPS XMM0,xmmword ptr [RSI] MOVUPS XMM1,xmmword ptr [RSI + 0x10] MOVUPS xmmword ptr [RSP + 0x48],XMM1 MOVUPS xmmword ptr [RSP + 0x38],XMM0 LAB_00108f2b: LEA RSI,[RSP + 0x30] MOV RDI,R14 MOV RDX,R15 CALL 0x001091e2 XOR EBP,EBP CMP EAX,0x2 SETZ CL CMP EAX,-0x1 JZ 0x00108f8c MOV BPL,CL ADD EBP,EBP CMP EAX,0x2 SETZ AL TEST R12,R12 SETNZ CL OR CL,AL JNZ 0x00108f91 LEA RDX,[0x138811] LEA R12,[RSP + 0x78] MOV RDI,R12 MOV RSI,R15 CALL 0x00113a7d MOV RAX,qword ptr [R12 + 0x8] MOVUPS XMM0,xmmword ptr [RAX] MOVUPS XMM1,xmmword ptr [RAX + 0x10] MOVUPS xmmword ptr [RSP + 0x8],XMM0 MOVUPS xmmword ptr [RSP + 0x18],XMM1 JMP 0x00108fab LAB_00108f8c: PUSH -0x1 POP RBP JMP 0x00108fc5 LAB_00108f91: TEST R12,R12 JZ 0x00108fc5 MOVUPS XMM0,xmmword ptr [R12] MOVUPS XMM1,xmmword ptr [R12 + 0x10] MOVUPS xmmword ptr [RSP + 0x18],XMM1 MOVUPS xmmword ptr [RSP + 0x8],XMM0 LAB_00108fab: MOV RSI,RSP MOV RDI,R14 MOV RDX,RBX CALL 0x001091e2 CMP EAX,0x2 CMOVZ EBP,EAX CMP EAX,-0x1 CMOVZ EBP,EAX LAB_00108fc5: MOV EAX,EBP ADD RSP,0x90 POP RBX POP R12 POP R14 POP R15 POP RBP RET
int c4_eth_get_signblock_and_parent (long param_1,int8 *param_2,int8 *param_3,int8 param_4, int8 param_5) { int iVar1; int iVar2; int8 local_b8; int8 uStack_b0; int8 local_a8; int8 uStack_a0; int8 local_98; int8 local_88; int8 uStack_80; int8 local_78; int8 uStack_70; int8 local_68; int8 local_58; int8 uStack_50; int8 local_48; int1 local_40 [8]; int8 *local_38; local_68 = 0; local_78 = 0; uStack_70 = 0; local_88 = 0; uStack_80 = 0; local_a8 = 0; uStack_a0 = 0; local_b8 = 0; uStack_b0 = 0; local_98 = 0; if (param_3 == (int8 *)0x0 || param_2 != (int8 *)0x0) { if (param_2 != (int8 *)0x0) { uStack_80 = *param_2; local_78 = param_2[1]; uStack_70 = param_2[2]; local_68 = param_2[3]; } } else { local_58 = 0; uStack_50 = 0; local_48 = 0; iVar1 = get_beacon_header_by_parent_hash(param_1,param_3,&local_58,&uStack_80); if (iVar1 != 0) { return iVar1; } if ((int)local_48 == -1) { iVar1 = c4_state_add_error(param_1 + 0x38, "The requested block has not been signed yet and cannot be verified!!" ); return iVar1; } } iVar1 = get_block(param_1,&local_88,param_4); if (iVar1 == -1) { iVar2 = -1; } else { iVar2 = (uint)(iVar1 == 2) * 2; if (param_3 == (int8 *)0x0 && iVar1 != 2) { ssz_get(local_40,param_4,"parentRoot"); uStack_b0 = *local_38; local_a8 = local_38[1]; uStack_a0 = local_38[2]; local_98 = local_38[3]; } else { if (param_3 == (int8 *)0x0) { return iVar2; } uStack_b0 = *param_3; local_a8 = param_3[1]; uStack_a0 = param_3[2]; local_98 = param_3[3]; } iVar1 = get_block(param_1,&local_b8,param_5); if (iVar1 == 2) { iVar2 = 2; } if (iVar1 == -1) { iVar2 = -1; } } return iVar2; }
33,754
c4_eth_get_signblock_and_parent
corpus-core[P]colibri-stateless/src/chains/eth/proofer/beacon.c
c4_status_t c4_eth_get_signblock_and_parent(proofer_ctx_t* ctx, bytes32_t sign_hash, bytes32_t data_hash, ssz_ob_t* sig_block, ssz_ob_t* data_block) { beacon_head_t sign = {0}; beacon_head_t data = {0}; c4_status_t status = C4_SUCCESS; // handle sign_block if (!sign_hash && data_hash) { json_t header = {0}; // we need to find the next block first TRY_ASYNC(get_beacon_header_by_parent_hash(ctx, data_hash, &header, sign.root)); if (header.type == JSON_TYPE_NOT_FOUND) THROW_ERROR("The requested block has not been signed yet and cannot be verified!!"); } else if (sign_hash) memcpy(sign.root, sign_hash, 32); TRY_ADD_ASYNC(status, get_block(ctx, &sign, sig_block)); // handle data_block if (!data_hash && status == C4_SUCCESS) memcpy(data.root, ssz_get(sig_block, "parentRoot").bytes.data, 32); else if (data_hash) memcpy(data.root, data_hash, 32); else return status; TRY_ADD_ASYNC(status, get_block(ctx, &data, data_block)); return status; }
O3
c
c4_eth_get_signblock_and_parent: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x90, %rsp movq %r8, %rbx movq %rcx, %r15 movq %rdx, %r12 movq %rdi, %r14 xorps %xmm0, %xmm0 movaps %xmm0, 0x40(%rsp) movaps %xmm0, 0x30(%rsp) xorl %eax, %eax movq %rax, 0x50(%rsp) movq %rax, 0x20(%rsp) movaps %xmm0, 0x10(%rsp) movaps %xmm0, (%rsp) testq %rsi, %rsi setne %al testq %rdx, %rdx sete %cl orb %al, %cl jne 0x9460 leaq 0x60(%rsp), %rdx movaps %xmm0, (%rdx) movq $0x0, 0x10(%rdx) leaq 0x38(%rsp), %rcx movq %r14, %rdi movq %r12, %rsi callq 0x9524 movl %eax, %ebp testl %eax, %eax jne 0x9512 cmpl $-0x1, 0x70(%rsp) jne 0x9476 addq $0x38, %r14 leaq 0x3437b(%rip), %rsi # 0x3d7cc movq %r14, %rdi callq 0x17ff5 movl %eax, %ebp jmp 0x9512 testq %rsi, %rsi je 0x9476 movups (%rsi), %xmm0 movups 0x10(%rsi), %xmm1 movups %xmm1, 0x48(%rsp) movups %xmm0, 0x38(%rsp) leaq 0x30(%rsp), %rsi movq %r14, %rdi movq %r15, %rdx callq 0x973f xorl %ebp, %ebp cmpl $0x2, %eax sete %cl cmpl $-0x1, %eax je 0x94d7 movb %cl, %bpl addl %ebp, %ebp cmpl $0x2, %eax sete %al testq %r12, %r12 setne %cl orb %al, %cl jne 0x94de leaq 0x34362(%rip), %rdx # 0x3d811 leaq 0x78(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi callq 0x14885 movq 0x8(%r12), %rax movups (%rax), %xmm0 movups 0x10(%rax), %xmm1 movups %xmm0, 0x8(%rsp) movups %xmm1, 0x18(%rsp) jmp 0x94f8 movl $0xffffffff, %ebp # imm = 0xFFFFFFFF jmp 0x9512 testq %r12, %r12 je 0x9512 movups (%r12), %xmm0 movups 0x10(%r12), %xmm1 movups %xmm1, 0x18(%rsp) movups %xmm0, 0x8(%rsp) movq %rsp, %rsi movq %r14, %rdi movq %rbx, %rdx callq 0x973f cmpl $0x2, %eax cmovel %eax, %ebp cmpl $-0x1, %eax cmovel %eax, %ebp movl %ebp, %eax addq $0x90, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
c4_eth_get_signblock_and_parent: push rbp push r15 push r14 push r12 push rbx sub rsp, 90h mov rbx, r8 mov r15, rcx mov r12, rdx mov r14, rdi xorps xmm0, xmm0 movaps [rsp+0B8h+var_78], xmm0 movaps [rsp+0B8h+var_88], xmm0 xor eax, eax mov [rsp+0B8h+var_68], rax mov [rsp+0B8h+var_98], rax movaps [rsp+0B8h+var_A8], xmm0 movaps [rsp+0B8h+var_B8], xmm0 test rsi, rsi setnz al test rdx, rdx setz cl or cl, al jnz short loc_9460 lea rdx, [rsp+0B8h+var_58] movaps xmmword ptr [rdx], xmm0 mov qword ptr [rdx+10h], 0 lea rcx, [rsp+0B8h+var_88+8] mov rdi, r14 mov rsi, r12 call get_beacon_header_by_parent_hash mov ebp, eax test eax, eax jnz loc_9512 cmp [rsp+0B8h+var_48], 0FFFFFFFFh jnz short loc_9476 add r14, 38h ; '8' lea rsi, aTheRequestedBl; "The requested block has not been signed"... mov rdi, r14 call c4_state_add_error mov ebp, eax jmp loc_9512 loc_9460: test rsi, rsi jz short loc_9476 movups xmm0, xmmword ptr [rsi] movups xmm1, xmmword ptr [rsi+10h] movups [rsp+0B8h+var_78+8], xmm1 movups [rsp+0B8h+var_88+8], xmm0 loc_9476: lea rsi, [rsp+0B8h+var_88] mov rdi, r14 mov rdx, r15 call get_block xor ebp, ebp cmp eax, 2 setz cl cmp eax, 0FFFFFFFFh jz short loc_94D7 mov bpl, cl add ebp, ebp cmp eax, 2 setz al test r12, r12 setnz cl or cl, al jnz short loc_94DE lea rdx, aParentroot; "parentRoot" lea r12, [rsp+0B8h+var_40] mov rdi, r12 mov rsi, r15 call ssz_get mov rax, [r12+8] movups xmm0, xmmword ptr [rax] movups xmm1, xmmword ptr [rax+10h] movups [rsp+0B8h+var_B8+8], xmm0 movups [rsp+0B8h+var_A8+8], xmm1 jmp short loc_94F8 loc_94D7: mov ebp, 0FFFFFFFFh jmp short loc_9512 loc_94DE: test r12, r12 jz short loc_9512 movups xmm0, xmmword ptr [r12] movups xmm1, xmmword ptr [r12+10h] movups [rsp+0B8h+var_A8+8], xmm1 movups [rsp+0B8h+var_B8+8], xmm0 loc_94F8: mov rsi, rsp mov rdi, r14 mov rdx, rbx call get_block cmp eax, 2 cmovz ebp, eax cmp eax, 0FFFFFFFFh cmovz ebp, eax loc_9512: mov eax, ebp add rsp, 90h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long c4_eth_get_signblock_and_parent( long long a1, __int128 *a2, __int128 *a3, long long a4, long long a5, long long a6) { unsigned int beacon_header_by_parent_hash; // ebp __int128 v10; // xmm0 int block; // eax int v12; // ebp __int128 v13; // xmm1 __int128 v14; // xmm0 int v15; // eax _OWORD v17[3]; // [rsp+0h] [rbp-B8h] BYREF _OWORD v18[3]; // [rsp+30h] [rbp-88h] BYREF __int128 v19; // [rsp+60h] [rbp-58h] BYREF long long v20; // [rsp+70h] [rbp-48h] _BYTE v21[8]; // [rsp+78h] [rbp-40h] BYREF _OWORD *v22; // [rsp+80h] [rbp-38h] memset(v18, 0, 40); memset(v17, 0, 40); if ( a2 != 0LL || a3 == 0LL ) { if ( a2 ) { v10 = *a2; *(_OWORD *)((char *)&v18[1] + 8) = a2[1]; *(_OWORD *)((char *)v18 + 8) = v10; } } else { v19 = 0LL; v20 = 0LL; beacon_header_by_parent_hash = get_beacon_header_by_parent_hash( a1, a3, &v19, (char *)v18 + 8, a5, a6, *(_QWORD *)&v17[0], *((_QWORD *)&v17[0] + 1), *(_QWORD *)&v17[1], *((_QWORD *)&v17[1] + 1), *(_QWORD *)&v17[2]); if ( beacon_header_by_parent_hash ) return beacon_header_by_parent_hash; if ( (_DWORD)v20 == -1 ) return (unsigned int)c4_state_add_error( a1 + 56, "The requested block has not been signed yet and cannot be verified!!"); } block = get_block(a1, v18, a4); v12 = 0; if ( block == -1 ) { return (unsigned int)-1; } else { LOBYTE(v12) = block == 2; beacon_header_by_parent_hash = 2 * v12; if ( block == 2 || a3 != 0LL ) { if ( !a3 ) return beacon_header_by_parent_hash; v14 = *a3; *(_OWORD *)((char *)&v17[1] + 8) = a3[1]; *(_OWORD *)((char *)v17 + 8) = v14; } else { ssz_get(v21, a4, "parentRoot"); v13 = v22[1]; *(_OWORD *)((char *)v17 + 8) = *v22; *(_OWORD *)((char *)&v17[1] + 8) = v13; } v15 = get_block(a1, v17, a5); if ( v15 == 2 ) beacon_header_by_parent_hash = 2; if ( v15 == -1 ) return (unsigned int)-1; } return beacon_header_by_parent_hash; }
c4_eth_get_signblock_and_parent: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x90 MOV RBX,R8 MOV R15,RCX MOV R12,RDX MOV R14,RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 XOR EAX,EAX MOV qword ptr [RSP + 0x50],RAX MOV qword ptr [RSP + 0x20],RAX MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS xmmword ptr [RSP],XMM0 TEST RSI,RSI SETNZ AL TEST RDX,RDX SETZ CL OR CL,AL JNZ 0x00109460 LEA RDX,[RSP + 0x60] MOVAPS xmmword ptr [RDX],XMM0 MOV qword ptr [RDX + 0x10],0x0 LEA RCX,[RSP + 0x38] MOV RDI,R14 MOV RSI,R12 CALL 0x00109524 MOV EBP,EAX TEST EAX,EAX JNZ 0x00109512 CMP dword ptr [RSP + 0x70],-0x1 JNZ 0x00109476 ADD R14,0x38 LEA RSI,[0x13d7cc] MOV RDI,R14 CALL 0x00117ff5 MOV EBP,EAX JMP 0x00109512 LAB_00109460: TEST RSI,RSI JZ 0x00109476 MOVUPS XMM0,xmmword ptr [RSI] MOVUPS XMM1,xmmword ptr [RSI + 0x10] MOVUPS xmmword ptr [RSP + 0x48],XMM1 MOVUPS xmmword ptr [RSP + 0x38],XMM0 LAB_00109476: LEA RSI,[RSP + 0x30] MOV RDI,R14 MOV RDX,R15 CALL 0x0010973f XOR EBP,EBP CMP EAX,0x2 SETZ CL CMP EAX,-0x1 JZ 0x001094d7 MOV BPL,CL ADD EBP,EBP CMP EAX,0x2 SETZ AL TEST R12,R12 SETNZ CL OR CL,AL JNZ 0x001094de LEA RDX,[0x13d811] LEA R12,[RSP + 0x78] MOV RDI,R12 MOV RSI,R15 CALL 0x00114885 MOV RAX,qword ptr [R12 + 0x8] MOVUPS XMM0,xmmword ptr [RAX] MOVUPS XMM1,xmmword ptr [RAX + 0x10] MOVUPS xmmword ptr [RSP + 0x8],XMM0 MOVUPS xmmword ptr [RSP + 0x18],XMM1 JMP 0x001094f8 LAB_001094d7: MOV EBP,0xffffffff JMP 0x00109512 LAB_001094de: TEST R12,R12 JZ 0x00109512 MOVUPS XMM0,xmmword ptr [R12] MOVUPS XMM1,xmmword ptr [R12 + 0x10] MOVUPS xmmword ptr [RSP + 0x18],XMM1 MOVUPS xmmword ptr [RSP + 0x8],XMM0 LAB_001094f8: MOV RSI,RSP MOV RDI,R14 MOV RDX,RBX CALL 0x0010973f CMP EAX,0x2 CMOVZ EBP,EAX CMP EAX,-0x1 CMOVZ EBP,EAX LAB_00109512: MOV EAX,EBP ADD RSP,0x90 POP RBX POP R12 POP R14 POP R15 POP RBP RET
int c4_eth_get_signblock_and_parent (long param_1,int8 *param_2,int8 *param_3,int8 param_4, int8 param_5) { int iVar1; int iVar2; int8 local_b8; int8 uStack_b0; int8 local_a8; int8 uStack_a0; int8 local_98; int8 local_88; int8 uStack_80; int8 local_78; int8 uStack_70; int8 local_68; int8 local_58; int8 uStack_50; int8 local_48; int1 local_40 [8]; int8 *local_38; local_78 = 0; uStack_70 = 0; local_88 = 0; uStack_80 = 0; local_68 = 0; local_98 = 0; local_a8 = 0; uStack_a0 = 0; local_b8 = 0; uStack_b0 = 0; if (param_3 == (int8 *)0x0 || param_2 != (int8 *)0x0) { if (param_2 != (int8 *)0x0) { uStack_80 = *param_2; local_78 = param_2[1]; uStack_70 = param_2[2]; local_68 = param_2[3]; } } else { local_58 = 0; uStack_50 = 0; local_48 = 0; iVar1 = get_beacon_header_by_parent_hash(param_1,param_3,&local_58,&uStack_80); if (iVar1 != 0) { return iVar1; } if ((int)local_48 == -1) { iVar1 = c4_state_add_error(param_1 + 0x38, "The requested block has not been signed yet and cannot be verified!!" ); return iVar1; } } iVar1 = get_block(param_1,&local_88,param_4); if (iVar1 == -1) { iVar2 = -1; } else { iVar2 = (uint)(iVar1 == 2) * 2; if (param_3 == (int8 *)0x0 && iVar1 != 2) { ssz_get(local_40,param_4,"parentRoot"); uStack_b0 = *local_38; local_a8 = local_38[1]; uStack_a0 = local_38[2]; local_98 = local_38[3]; } else { if (param_3 == (int8 *)0x0) { return iVar2; } uStack_b0 = *param_3; local_a8 = param_3[1]; uStack_a0 = param_3[2]; local_98 = param_3[3]; } iVar1 = get_block(param_1,&local_b8,param_5); if (iVar1 == 2) { iVar2 = 2; } if (iVar1 == -1) { iVar2 = -1; } } return iVar2; }
33,755
my_strntoll_8bit
eloqsql/strings/ctype-simple.c
longlong my_strntoll_8bit(CHARSET_INFO *cs __attribute__((unused)), const char *nptr, size_t l, int base, char **endptr,int *err) { int negative; register ulonglong cutoff; register uint cutlim; register ulonglong i; register const char *s, *e; const char *save; int overflow; *err= 0; /* Initialize error indicator */ s = nptr; e = nptr+l; for(; s<e && my_isspace(cs,*s); s++); if (s == e) { goto noconv; } if (*s == '-') { negative = 1; ++s; } else if (*s == '+') { negative = 0; ++s; } else negative = 0; save = s; cutoff = (~(ulonglong) 0) / (unsigned long int) base; cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base); overflow = 0; i = 0; for ( ; s != e; s++) { register uchar c= *s; if (c>='0' && c<='9') c -= '0'; else if (c>='A' && c<='Z') c = c - 'A' + 10; else if (c>='a' && c<='z') c = c - 'a' + 10; else break; if (c >= base) break; if (i > cutoff || (i == cutoff && c > cutlim)) overflow = 1; else { i *= (ulonglong) base; i += c; } } if (s == save) goto noconv; if (endptr != NULL) *endptr = (char *) s; if (negative) { if (i > (ulonglong) LONGLONG_MIN) overflow = 1; } else if (i > (ulonglong) LONGLONG_MAX) overflow = 1; if (overflow) { err[0]= ERANGE; return negative ? LONGLONG_MIN : LONGLONG_MAX; } return (negative ? -((longlong) i) : (longlong) i); noconv: err[0]= EDOM; if (endptr != NULL) *endptr = (char *) nptr; return 0L; }
O3
c
my_strntoll_8bit: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl $0x0, (%r9) leaq (%rsi,%rdx), %r11 movq %rsi, %r10 testq %rdx, %rdx jle 0x3d7ae movq 0x40(%rdi), %rax movq %rsi, %r10 movzbl (%r10), %edx testb $0x8, 0x1(%rax,%rdx) je 0x3d7ae incq %r10 cmpq %r11, %r10 jb 0x3d79b cmpq %r11, %r10 je 0x3d8bd movb (%r10), %bl leal -0x2b(%rbx), %eax andb $-0x3, %al cmpb $0x1, %al adcq $0x0, %r10 movslq %ecx, %rdi movq $-0x1, %rax xorl %edx, %edx movq %rdi, -0x38(%rbp) divq %rdi movq %rax, %rdi xorl %eax, %eax cmpq %r11, %r10 je 0x3d86b movq %rbx, -0x30(%rbp) xorl %r13d, %r13d movq %r10, %r14 xorl %ebx, %ebx movq %rbx, %rax movl %r13d, %r12d movb (%r14), %r13b leal -0x30(%r13), %ebx cmpb $0xa, %bl jb 0x3d823 leal -0x41(%r13), %ebx cmpb $0x19, %bl ja 0x3d813 addb $-0x37, %r13b jmp 0x3d820 leal -0x61(%r13), %ebx cmpb $0x19, %bl ja 0x3d865 addb $-0x57, %r13b movl %r13d, %ebx movzbl %bl, %r15d cmpl %ecx, %r15d jge 0x3d865 movl $0x1, %r13d cmpq %rdi, %rax jbe 0x3d83c movq %rax, %rbx jmp 0x3d854 jne 0x3d846 movq %rdi, %rbx cmpl %edx, %r15d ja 0x3d854 imulq -0x38(%rbp), %rax movl %r15d, %ebx addq %rax, %rbx movl %r12d, %r13d incq %r14 cmpq %r11, %r14 jne 0x3d7f2 movq %rbx, %rax movq %r11, %r14 movl %r13d, %r12d movq -0x30(%rbp), %rbx jmp 0x3d871 movq %r11, %r14 xorl %r12d, %r12d cmpq %r10, %r14 je 0x3d8bd testq %r8, %r8 je 0x3d87e movq %r14, (%r8) movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000 cmpq %rdx, %rax movl $0x1, %ecx movl %r12d, %esi cmoval %ecx, %esi testq %rax, %rax cmovsl %ecx, %r12d cmpb $0x2d, %bl cmovel %esi, %r12d testl %r12d, %r12d je 0x3d8dc leaq -0x1(%rdx), %rcx cmpb $0x2d, %bl movl $0x22, (%r9) cmoveq %rdx, %rcx jmp 0x3d8ce movl $0x21, (%r9) testq %r8, %r8 je 0x3d8cc movq %rsi, (%r8) xorl %ecx, %ecx movq %rcx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rcx negq %rcx cmpb $0x2d, %bl cmovneq %rax, %rcx jmp 0x3d8ce
my_strntoll_8bit: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx mov dword ptr [r9], 0 lea r11, [rsi+rdx] mov r10, rsi test rdx, rdx jle short loc_3D7AE mov rax, [rdi+40h] mov r10, rsi loc_3D79B: movzx edx, byte ptr [r10] test byte ptr [rax+rdx+1], 8 jz short loc_3D7AE inc r10 cmp r10, r11 jb short loc_3D79B loc_3D7AE: cmp r10, r11 jz loc_3D8BD mov bl, [r10] lea eax, [rbx-2Bh] and al, 0FDh cmp al, 1 adc r10, 0 movsxd rdi, ecx mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx mov [rbp+var_38], rdi div rdi mov rdi, rax xor eax, eax cmp r10, r11 jz loc_3D86B mov [rbp+var_30], rbx xor r13d, r13d mov r14, r10 xor ebx, ebx loc_3D7F2: mov rax, rbx mov r12d, r13d mov r13b, [r14] lea ebx, [r13-30h] cmp bl, 0Ah jb short loc_3D823 lea ebx, [r13-41h] cmp bl, 19h ja short loc_3D813 add r13b, 0C9h jmp short loc_3D820 loc_3D813: lea ebx, [r13-61h] cmp bl, 19h ja short loc_3D865 add r13b, 0A9h loc_3D820: mov ebx, r13d loc_3D823: movzx r15d, bl cmp r15d, ecx jge short loc_3D865 mov r13d, 1 cmp rax, rdi jbe short loc_3D83C mov rbx, rax jmp short loc_3D854 loc_3D83C: jnz short loc_3D846 mov rbx, rdi cmp r15d, edx ja short loc_3D854 loc_3D846: imul rax, [rbp+var_38] mov ebx, r15d add rbx, rax mov r13d, r12d loc_3D854: inc r14 cmp r14, r11 jnz short loc_3D7F2 mov rax, rbx mov r14, r11 mov r12d, r13d loc_3D865: mov rbx, [rbp+var_30] jmp short loc_3D871 loc_3D86B: mov r14, r11 xor r12d, r12d loc_3D871: cmp r14, r10 jz short loc_3D8BD test r8, r8 jz short loc_3D87E mov [r8], r14 loc_3D87E: mov rdx, 8000000000000000h cmp rax, rdx mov ecx, 1 mov esi, r12d cmova esi, ecx test rax, rax cmovs r12d, ecx cmp bl, 2Dh ; '-' cmovz r12d, esi test r12d, r12d jz short loc_3D8DC lea rcx, [rdx-1] cmp bl, 2Dh ; '-' mov dword ptr [r9], 22h ; '"' cmovz rcx, rdx jmp short loc_3D8CE loc_3D8BD: mov dword ptr [r9], 21h ; '!' test r8, r8 jz short loc_3D8CC mov [r8], rsi loc_3D8CC: xor ecx, ecx loc_3D8CE: mov rax, rcx pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3D8DC: mov rcx, rax neg rcx cmp bl, 2Dh ; '-' cmovnz rcx, rax jmp short loc_3D8CE
unsigned long long my_strntoll_8bit( long long a1, unsigned __int8 *a2, long long a3, int a4, unsigned __int8 **a5, _DWORD *a6) { unsigned __int8 *v6; // r11 unsigned __int8 *v7; // r10 unsigned __int8 v8; // bl unsigned __int8 *v9; // r10 unsigned long long v10; // rdi long long v11; // rax int v12; // r13d unsigned __int8 *v13; // r14 unsigned long long v14; // rbx int v15; // r12d unsigned __int8 v16; // r13 unsigned __int8 v17; // bl unsigned __int8 v18; // r13 unsigned int v19; // r15d int v20; // esi long long v21; // rcx unsigned __int8 v23; // [rsp+8h] [rbp-30h] *a6 = 0; v6 = &a2[a3]; v7 = a2; if ( a3 > 0 ) { v7 = a2; do { if ( (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v7 + 1LL) & 8) == 0 ) break; ++v7; } while ( v7 < v6 ); } if ( v7 == v6 ) goto LABEL_37; v8 = *v7; v9 = &v7[((*v7 - 43) & 0xFD) == 0]; v10 = 0xFFFFFFFFFFFFFFFFLL / a4; v11 = 0LL; if ( v9 == v6 ) { v13 = &a2[a3]; v15 = 0; } else { v23 = v8; v12 = 0; v13 = v9; v14 = 0LL; while ( 1 ) { v11 = v14; v15 = v12; v16 = *v13; v17 = *v13 - 48; if ( v17 >= 0xAu ) { if ( (unsigned __int8)(v16 - 65) > 0x19u ) { if ( (unsigned __int8)(v16 - 97) > 0x19u ) break; v18 = v16 - 87; } else { v18 = v16 - 55; } v17 = v18; } v19 = v17; if ( v17 >= a4 ) break; v12 = 1; if ( v11 <= v10 ) { if ( v11 != v10 || (v14 = 0xFFFFFFFFFFFFFFFFLL / a4, v19 <= (unsigned int)(0xFFFFFFFFFFFFFFFFLL % a4)) ) { v14 = a4 * v11 + v19; v12 = v15; } } else { v14 = v11; } if ( ++v13 == v6 ) { v11 = v14; v13 = &a2[a3]; v15 = v12; break; } } v8 = v23; } if ( v13 == v9 ) { LABEL_37: *a6 = 33; if ( a5 ) *a5 = a2; return 0LL; } else { if ( a5 ) *a5 = v13; v20 = v15; if ( (unsigned long long)v11 > 0x8000000000000000LL ) v20 = 1; if ( v11 < 0 ) v15 = 1; if ( v8 == 45 ) v15 = v20; if ( v15 ) { v21 = 0x7FFFFFFFFFFFFFFFLL; *a6 = 34; if ( v8 == 45 ) return 0x8000000000000000LL; } else { v21 = -v11; if ( v8 != 45 ) return v11; } } return v21; }
my_strntoll_8bit: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV dword ptr [R9],0x0 LEA R11,[RSI + RDX*0x1] MOV R10,RSI TEST RDX,RDX JLE 0x0013d7ae MOV RAX,qword ptr [RDI + 0x40] MOV R10,RSI LAB_0013d79b: MOVZX EDX,byte ptr [R10] TEST byte ptr [RAX + RDX*0x1 + 0x1],0x8 JZ 0x0013d7ae INC R10 CMP R10,R11 JC 0x0013d79b LAB_0013d7ae: CMP R10,R11 JZ 0x0013d8bd MOV BL,byte ptr [R10] LEA EAX,[RBX + -0x2b] AND AL,0xfd CMP AL,0x1 ADC R10,0x0 MOVSXD RDI,ECX MOV RAX,-0x1 XOR EDX,EDX MOV qword ptr [RBP + -0x38],RDI DIV RDI MOV RDI,RAX XOR EAX,EAX CMP R10,R11 JZ 0x0013d86b MOV qword ptr [RBP + -0x30],RBX XOR R13D,R13D MOV R14,R10 XOR EBX,EBX LAB_0013d7f2: MOV RAX,RBX MOV R12D,R13D MOV R13B,byte ptr [R14] LEA EBX,[R13 + -0x30] CMP BL,0xa JC 0x0013d823 LEA EBX,[R13 + -0x41] CMP BL,0x19 JA 0x0013d813 ADD R13B,0xc9 JMP 0x0013d820 LAB_0013d813: LEA EBX,[R13 + -0x61] CMP BL,0x19 JA 0x0013d865 ADD R13B,0xa9 LAB_0013d820: MOV EBX,R13D LAB_0013d823: MOVZX R15D,BL CMP R15D,ECX JGE 0x0013d865 MOV R13D,0x1 CMP RAX,RDI JBE 0x0013d83c MOV RBX,RAX JMP 0x0013d854 LAB_0013d83c: JNZ 0x0013d846 MOV RBX,RDI CMP R15D,EDX JA 0x0013d854 LAB_0013d846: IMUL RAX,qword ptr [RBP + -0x38] MOV EBX,R15D ADD RBX,RAX MOV R13D,R12D LAB_0013d854: INC R14 CMP R14,R11 JNZ 0x0013d7f2 MOV RAX,RBX MOV R14,R11 MOV R12D,R13D LAB_0013d865: MOV RBX,qword ptr [RBP + -0x30] JMP 0x0013d871 LAB_0013d86b: MOV R14,R11 XOR R12D,R12D LAB_0013d871: CMP R14,R10 JZ 0x0013d8bd TEST R8,R8 JZ 0x0013d87e MOV qword ptr [R8],R14 LAB_0013d87e: MOV RDX,-0x8000000000000000 CMP RAX,RDX MOV ECX,0x1 MOV ESI,R12D CMOVA ESI,ECX TEST RAX,RAX CMOVS R12D,ECX CMP BL,0x2d CMOVZ R12D,ESI TEST R12D,R12D JZ 0x0013d8dc LEA RCX,[RDX + -0x1] CMP BL,0x2d MOV dword ptr [R9],0x22 CMOVZ RCX,RDX JMP 0x0013d8ce LAB_0013d8bd: MOV dword ptr [R9],0x21 TEST R8,R8 JZ 0x0013d8cc MOV qword ptr [R8],RSI LAB_0013d8cc: XOR ECX,ECX LAB_0013d8ce: MOV RAX,RCX POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013d8dc: MOV RCX,RAX NEG RCX CMP BL,0x2d CMOVNZ RCX,RAX JMP 0x0013d8ce
ulong my_strntoll_8bit(long param_1,byte *param_2,long param_3,int param_4,ulong *param_5, int4 *param_6) { byte *pbVar1; byte bVar2; byte bVar3; int1 auVar4 [16]; int1 auVar5 [16]; bool bVar6; bool bVar7; ulong uVar8; ulong uVar9; ulong uVar10; byte *pbVar11; byte bVar12; byte *pbVar13; byte *pbVar14; *param_6 = 0; pbVar1 = param_2 + param_3; pbVar11 = param_2; if (0 < param_3) { do { if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*pbVar11) & 8) == 0) break; pbVar11 = pbVar11 + 1; } while (pbVar11 < pbVar1); } if (pbVar11 != pbVar1) { bVar2 = *pbVar11; pbVar11 = pbVar11 + ((bVar2 - 0x2b & 0xfd) == 0); auVar4._8_8_ = 0; auVar4._0_8_ = (long)param_4; auVar5 = ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff); uVar9 = SUB168(auVar5 / auVar4,0); uVar10 = 0; if (pbVar11 == pbVar1) { bVar6 = false; pbVar14 = pbVar1; } else { bVar6 = false; uVar10 = 0; pbVar13 = pbVar11; do { bVar3 = *pbVar13; bVar12 = bVar3 - 0x30; pbVar14 = pbVar13; if (9 < bVar12) { if ((byte)(bVar3 + 0xbf) < 0x1a) { bVar12 = bVar3 - 0x37; } else { if (0x19 < (byte)(bVar3 + 0x9f)) break; bVar12 = bVar3 + 0xa9; } } if (param_4 <= (int)(uint)bVar12) break; uVar8 = uVar10; bVar7 = true; if ((uVar10 <= uVar9) && ((uVar10 != uVar9 || (uVar8 = uVar9, (uint)bVar12 <= SUB164(auVar5 % auVar4,0))))) { uVar8 = (ulong)bVar12 + uVar10 * (long)param_4; bVar7 = bVar6; } bVar6 = bVar7; uVar10 = uVar8; pbVar13 = pbVar13 + 1; pbVar14 = pbVar1; } while (pbVar13 != pbVar1); } if (pbVar14 != pbVar11) { if (param_5 != (ulong *)0x0) { *param_5 = (ulong)pbVar14; } bVar7 = bVar6; if (0x8000000000000000 < uVar10) { bVar7 = true; } if ((long)uVar10 < 0) { bVar6 = true; } if (bVar2 == 0x2d) { bVar6 = bVar7; } if (bVar6) { *param_6 = 0x22; if (bVar2 != 0x2d) { return 0x7fffffffffffffff; } return 0x8000000000000000; } if (bVar2 == 0x2d) { return -uVar10; } return uVar10; } } *param_6 = 0x21; if (param_5 != (ulong *)0x0) { *param_5 = (ulong)param_2; } return 0; }
33,756
delete_dynamic_with_callback
eloqsql/mysys/array.c
void delete_dynamic_with_callback(DYNAMIC_ARRAY *array, FREE_FUNC f) { uint i; char *ptr= (char*) array->buffer; for (i= 0; i < array->elements; i++, ptr+= array->size_of_element) { f(ptr); } delete_dynamic(array); }
O3
c
delete_dynamic_with_callback: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %rbx cmpl $0x0, 0x8(%rdi) je 0x4d21a movq %rsi, %r14 movq (%rbx), %r15 xorl %r12d, %r12d movq %r15, %rdi callq *%r14 incl %r12d movl 0x14(%rbx), %eax addq %rax, %r15 cmpl 0x8(%rbx), %r12d jb 0x4d205 testb $0x1, 0x21(%rbx) jne 0x4d22d movq (%rbx), %rdi testq %rdi, %rdi je 0x4d22d callq 0x5a5f2 xorps %xmm0, %xmm0 movups %xmm0, (%rbx) popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
delete_dynamic_with_callback: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdi cmp dword ptr [rdi+8], 0 jz short loc_4D21A mov r14, rsi mov r15, [rbx] xor r12d, r12d loc_4D205: mov rdi, r15 call r14 inc r12d mov eax, [rbx+14h] add r15, rax cmp r12d, [rbx+8] jb short loc_4D205 loc_4D21A: test byte ptr [rbx+21h], 1 jnz short loc_4D22D mov rdi, [rbx] test rdi, rdi jz short loc_4D22D call my_free loc_4D22D: xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long delete_dynamic_with_callback(long long *a1, void ( *a2)(long long)) { long long v2; // r15 unsigned int v3; // r12d long long result; // rax if ( *((_DWORD *)a1 + 2) ) { v2 = *a1; v3 = 0; do { a2(v2); ++v3; result = *((unsigned int *)a1 + 5); v2 += result; } while ( v3 < *((_DWORD *)a1 + 2) ); } if ( (*((_BYTE *)a1 + 33) & 1) == 0 && *a1 ) result = my_free(*a1); *(_OWORD *)a1 = 0LL; return result; }
delete_dynamic_with_callback: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDI CMP dword ptr [RDI + 0x8],0x0 JZ 0x0014d21a MOV R14,RSI MOV R15,qword ptr [RBX] XOR R12D,R12D LAB_0014d205: MOV RDI,R15 CALL R14 INC R12D MOV EAX,dword ptr [RBX + 0x14] ADD R15,RAX CMP R12D,dword ptr [RBX + 0x8] JC 0x0014d205 LAB_0014d21a: TEST byte ptr [RBX + 0x21],0x1 JNZ 0x0014d22d MOV RDI,qword ptr [RBX] TEST RDI,RDI JZ 0x0014d22d CALL 0x0015a5f2 LAB_0014d22d: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 POP RBX POP R12 POP R14 POP R15 POP RBP RET
void delete_dynamic_with_callback(long *param_1,code *param_2) { uint uVar1; long lVar2; if ((int)param_1[1] != 0) { lVar2 = *param_1; uVar1 = 0; do { (*param_2)(lVar2); uVar1 = uVar1 + 1; lVar2 = lVar2 + (ulong)*(uint *)((long)param_1 + 0x14); } while (uVar1 < *(uint *)(param_1 + 1)); } if (((*(byte *)((long)param_1 + 0x21) & 1) == 0) && (*param_1 != 0)) { my_free(); } *param_1 = 0; param_1[1] = 0; return; }
33,757
get_partitioned_key_cache_statistics
eloqsql/mysys/mf_keycache.c
static void get_partitioned_key_cache_statistics(PARTITIONED_KEY_CACHE_CB *keycache, uint partition_no, KEY_CACHE_STATISTICS *keycache_stats) { uint i; SIMPLE_KEY_CACHE_CB *partition; uint partitions= keycache->partitions; DBUG_ENTER("get_partitioned_key_cache_statistics"); if (partition_no != 0) { partition= keycache->partition_array[partition_no-1]; get_simple_key_cache_statistics((void *) partition, 0, keycache_stats); DBUG_VOID_RETURN; } bzero(keycache_stats, sizeof(KEY_CACHE_STATISTICS)); keycache_stats->mem_size= (longlong) keycache->key_cache_mem_size; keycache_stats->block_size= (longlong) keycache->key_cache_block_size; for (i = 0; i < partitions; i++) { partition= keycache->partition_array[i]; keycache_stats->blocks_used+= partition->blocks_used; keycache_stats->blocks_unused+= partition->blocks_unused; keycache_stats->blocks_changed+= partition->global_blocks_changed; keycache_stats->blocks_warm+= partition->warm_blocks; keycache_stats->read_requests+= partition->global_cache_r_requests; keycache_stats->reads+= partition->global_cache_read; keycache_stats->write_requests+= partition->global_cache_w_requests; keycache_stats->writes+= partition->global_cache_write; } DBUG_VOID_RETURN; }
O3
c
get_partitioned_key_cache_statistics: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx testl %esi, %esi je 0x9abda movq 0x8(%rdi), %rax decl %esi movq (%rax,%rsi,8), %rax movq 0x8(%rax), %rcx movq %rcx, (%rdx) movl 0x18(%rax), %ecx movq %rcx, 0x8(%rdx) movq 0x50(%rax), %rcx movq %rcx, 0x10(%rdx) movq 0x58(%rax), %rcx movq %rcx, 0x18(%rdx) movq 0x138(%rax), %rcx movq %rcx, 0x20(%rdx) movq 0x68(%rax), %rcx movq %rcx, 0x28(%rdx) movq 0x150(%rax), %rcx movq %rcx, 0x30(%rdx) movq 0x158(%rax), %rcx movq %rcx, 0x38(%rdx) movq 0x140(%rax), %rcx movq %rcx, 0x40(%rdx) movq 0x148(%rax), %rax movq %rax, 0x48(%rdx) jmp 0x9ac94 movl 0x1c(%rdi), %eax xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rdx) movups %xmm0, 0x30(%rdx) movups %xmm0, 0x20(%rdx) movups %xmm0, 0x10(%rdx) movups %xmm0, (%rdx) movq 0x10(%rdi), %rcx movq %rcx, (%rdx) movl 0x18(%rdi), %ecx movq %rcx, 0x8(%rdx) testq %rax, %rax je 0x9ac94 movq 0x10(%rdx), %rcx movq 0x18(%rdx), %rsi movq 0x20(%rdx), %r8 movq 0x28(%rdx), %r9 movq 0x30(%rdx), %r10 movq 0x38(%rdx), %r11 movq 0x40(%rdx), %rbx movq 0x48(%rdx), %r14 xorl %r15d, %r15d movq 0x8(%rdi), %r12 movq (%r12,%r15,8), %r12 addq 0x50(%r12), %rcx movq %rcx, 0x10(%rdx) addq 0x58(%r12), %rsi movq %rsi, 0x18(%rdx) addq 0x138(%r12), %r8 movq %r8, 0x20(%rdx) addq 0x68(%r12), %r9 movq %r9, 0x28(%rdx) addq 0x150(%r12), %r10 movq %r10, 0x30(%rdx) addq 0x158(%r12), %r11 movq %r11, 0x38(%rdx) addq 0x140(%r12), %rbx movq %rbx, 0x40(%rdx) addq 0x148(%r12), %r14 movq %r14, 0x48(%rdx) incq %r15 cmpq %r15, %rax jne 0x9ac2d popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq nopl (%rax)
get_partitioned_key_cache_statistics: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx test esi, esi jz short loc_9ABDA mov rax, [rdi+8] dec esi mov rax, [rax+rsi*8] mov rcx, [rax+8] mov [rdx], rcx mov ecx, [rax+18h] mov [rdx+8], rcx mov rcx, [rax+50h] mov [rdx+10h], rcx mov rcx, [rax+58h] mov [rdx+18h], rcx mov rcx, [rax+138h] mov [rdx+20h], rcx mov rcx, [rax+68h] mov [rdx+28h], rcx mov rcx, [rax+150h] mov [rdx+30h], rcx mov rcx, [rax+158h] mov [rdx+38h], rcx mov rcx, [rax+140h] mov [rdx+40h], rcx mov rax, [rax+148h] mov [rdx+48h], rax jmp loc_9AC94 loc_9ABDA: mov eax, [rdi+1Ch] xorps xmm0, xmm0 movups xmmword ptr [rdx+40h], xmm0 movups xmmword ptr [rdx+30h], xmm0 movups xmmword ptr [rdx+20h], xmm0 movups xmmword ptr [rdx+10h], xmm0 movups xmmword ptr [rdx], xmm0 mov rcx, [rdi+10h] mov [rdx], rcx mov ecx, [rdi+18h] mov [rdx+8], rcx test rax, rax jz loc_9AC94 mov rcx, [rdx+10h] mov rsi, [rdx+18h] mov r8, [rdx+20h] mov r9, [rdx+28h] mov r10, [rdx+30h] mov r11, [rdx+38h] mov rbx, [rdx+40h] mov r14, [rdx+48h] xor r15d, r15d loc_9AC2D: mov r12, [rdi+8] mov r12, [r12+r15*8] add rcx, [r12+50h] mov [rdx+10h], rcx add rsi, [r12+58h] mov [rdx+18h], rsi add r8, [r12+138h] mov [rdx+20h], r8 add r9, [r12+68h] mov [rdx+28h], r9 add r10, [r12+150h] mov [rdx+30h], r10 add r11, [r12+158h] mov [rdx+38h], r11 add rbx, [r12+140h] mov [rdx+40h], rbx add r14, [r12+148h] mov [rdx+48h], r14 inc r15 cmp rax, r15 jnz short loc_9AC2D loc_9AC94: pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long get_partitioned_key_cache_statistics(long long a1, int a2, _QWORD *a3) { long long v3; // rax long long result; // rax long long v5; // rcx long long v6; // rsi long long v7; // r8 long long v8; // r9 long long v9; // r10 long long v10; // r11 long long v11; // rbx long long v12; // r14 long long i; // r15 _QWORD *v14; // r12 if ( a2 ) { v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL * (unsigned int)(a2 - 1)); *a3 = *(_QWORD *)(v3 + 8); a3[1] = *(unsigned int *)(v3 + 24); a3[2] = *(_QWORD *)(v3 + 80); a3[3] = *(_QWORD *)(v3 + 88); a3[4] = *(_QWORD *)(v3 + 312); a3[5] = *(_QWORD *)(v3 + 104); a3[6] = *(_QWORD *)(v3 + 336); a3[7] = *(_QWORD *)(v3 + 344); a3[8] = *(_QWORD *)(v3 + 320); result = *(_QWORD *)(v3 + 328); a3[9] = result; } else { result = *(unsigned int *)(a1 + 28); *((_OWORD *)a3 + 4) = 0LL; *((_OWORD *)a3 + 3) = 0LL; *((_OWORD *)a3 + 2) = 0LL; *((_OWORD *)a3 + 1) = 0LL; *(_OWORD *)a3 = 0LL; *a3 = *(_QWORD *)(a1 + 16); a3[1] = *(unsigned int *)(a1 + 24); if ( result ) { v5 = a3[2]; v6 = a3[3]; v7 = a3[4]; v8 = a3[5]; v9 = a3[6]; v10 = a3[7]; v11 = a3[8]; v12 = a3[9]; for ( i = 0LL; i != result; ++i ) { v14 = *(_QWORD **)(*(_QWORD *)(a1 + 8) + 8 * i); v5 += v14[10]; a3[2] = v5; v6 += v14[11]; a3[3] = v6; v7 += v14[39]; a3[4] = v7; v8 += v14[13]; a3[5] = v8; v9 += v14[42]; a3[6] = v9; v10 += v14[43]; a3[7] = v10; v11 += v14[40]; a3[8] = v11; v12 += v14[41]; a3[9] = v12; } } } return result; }
get_partitioned_key_cache_statistics: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX TEST ESI,ESI JZ 0x0019abda MOV RAX,qword ptr [RDI + 0x8] DEC ESI MOV RAX,qword ptr [RAX + RSI*0x8] MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RDX],RCX MOV ECX,dword ptr [RAX + 0x18] MOV qword ptr [RDX + 0x8],RCX MOV RCX,qword ptr [RAX + 0x50] MOV qword ptr [RDX + 0x10],RCX MOV RCX,qword ptr [RAX + 0x58] MOV qword ptr [RDX + 0x18],RCX MOV RCX,qword ptr [RAX + 0x138] MOV qword ptr [RDX + 0x20],RCX MOV RCX,qword ptr [RAX + 0x68] MOV qword ptr [RDX + 0x28],RCX MOV RCX,qword ptr [RAX + 0x150] MOV qword ptr [RDX + 0x30],RCX MOV RCX,qword ptr [RAX + 0x158] MOV qword ptr [RDX + 0x38],RCX MOV RCX,qword ptr [RAX + 0x140] MOV qword ptr [RDX + 0x40],RCX MOV RAX,qword ptr [RAX + 0x148] MOV qword ptr [RDX + 0x48],RAX JMP 0x0019ac94 LAB_0019abda: MOV EAX,dword ptr [RDI + 0x1c] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDX + 0x40],XMM0 MOVUPS xmmword ptr [RDX + 0x30],XMM0 MOVUPS xmmword ptr [RDX + 0x20],XMM0 MOVUPS xmmword ptr [RDX + 0x10],XMM0 MOVUPS xmmword ptr [RDX],XMM0 MOV RCX,qword ptr [RDI + 0x10] MOV qword ptr [RDX],RCX MOV ECX,dword ptr [RDI + 0x18] MOV qword ptr [RDX + 0x8],RCX TEST RAX,RAX JZ 0x0019ac94 MOV RCX,qword ptr [RDX + 0x10] MOV RSI,qword ptr [RDX + 0x18] MOV R8,qword ptr [RDX + 0x20] MOV R9,qword ptr [RDX + 0x28] MOV R10,qword ptr [RDX + 0x30] MOV R11,qword ptr [RDX + 0x38] MOV RBX,qword ptr [RDX + 0x40] MOV R14,qword ptr [RDX + 0x48] XOR R15D,R15D LAB_0019ac2d: MOV R12,qword ptr [RDI + 0x8] MOV R12,qword ptr [R12 + R15*0x8] ADD RCX,qword ptr [R12 + 0x50] MOV qword ptr [RDX + 0x10],RCX ADD RSI,qword ptr [R12 + 0x58] MOV qword ptr [RDX + 0x18],RSI ADD R8,qword ptr [R12 + 0x138] MOV qword ptr [RDX + 0x20],R8 ADD R9,qword ptr [R12 + 0x68] MOV qword ptr [RDX + 0x28],R9 ADD R10,qword ptr [R12 + 0x150] MOV qword ptr [RDX + 0x30],R10 ADD R11,qword ptr [R12 + 0x158] MOV qword ptr [RDX + 0x38],R11 ADD RBX,qword ptr [R12 + 0x140] MOV qword ptr [RDX + 0x40],RBX ADD R14,qword ptr [R12 + 0x148] MOV qword ptr [RDX + 0x48],R14 INC R15 CMP RAX,R15 JNZ 0x0019ac2d LAB_0019ac94: POP RBX POP R12 POP R14 POP R15 POP RBP RET
void get_partitioned_key_cache_statistics(long param_1,int param_2,int8 *param_3) { uint uVar1; long lVar2; long lVar3; long lVar4; long lVar5; long lVar6; long lVar7; long lVar8; long lVar9; long lVar10; ulong uVar11; if (param_2 == 0) { uVar1 = *(uint *)(param_1 + 0x1c); param_3[8] = 0; param_3[9] = 0; param_3[6] = 0; param_3[7] = 0; param_3[4] = 0; param_3[5] = 0; param_3[2] = 0; param_3[3] = 0; *param_3 = 0; param_3[1] = 0; *param_3 = *(int8 *)(param_1 + 0x10); param_3[1] = (ulong)*(uint *)(param_1 + 0x18); if ((ulong)uVar1 != 0) { lVar3 = param_3[2]; lVar5 = param_3[3]; lVar6 = param_3[4]; lVar7 = param_3[5]; lVar8 = param_3[6]; lVar9 = param_3[7]; lVar4 = param_3[8]; lVar10 = param_3[9]; uVar11 = 0; do { lVar2 = *(long *)(*(long *)(param_1 + 8) + uVar11 * 8); lVar3 = lVar3 + *(long *)(lVar2 + 0x50); param_3[2] = lVar3; lVar5 = lVar5 + *(long *)(lVar2 + 0x58); param_3[3] = lVar5; lVar6 = lVar6 + *(long *)(lVar2 + 0x138); param_3[4] = lVar6; lVar7 = lVar7 + *(long *)(lVar2 + 0x68); param_3[5] = lVar7; lVar8 = lVar8 + *(long *)(lVar2 + 0x150); param_3[6] = lVar8; lVar9 = lVar9 + *(long *)(lVar2 + 0x158); param_3[7] = lVar9; lVar4 = lVar4 + *(long *)(lVar2 + 0x140); param_3[8] = lVar4; lVar10 = lVar10 + *(long *)(lVar2 + 0x148); param_3[9] = lVar10; uVar11 = uVar11 + 1; } while (uVar1 != uVar11); } } else { lVar3 = *(long *)(*(long *)(param_1 + 8) + (ulong)(param_2 - 1) * 8); *param_3 = *(int8 *)(lVar3 + 8); param_3[1] = (ulong)*(uint *)(lVar3 + 0x18); param_3[2] = *(int8 *)(lVar3 + 0x50); param_3[3] = *(int8 *)(lVar3 + 0x58); param_3[4] = *(int8 *)(lVar3 + 0x138); param_3[5] = *(int8 *)(lVar3 + 0x68); param_3[6] = *(int8 *)(lVar3 + 0x150); param_3[7] = *(int8 *)(lVar3 + 0x158); param_3[8] = *(int8 *)(lVar3 + 0x140); param_3[9] = *(int8 *)(lVar3 + 0x148); } return; }
33,758
clz_dec
bluesky950520[P]quickjs/libbf.c
static int clz_dec(limb_t a) { if (a == 0) return LIMB_DIGITS; switch(LIMB_BITS - 1 - clz(a)) { case 0: /* 1-1 */ return LIMB_DIGITS - 1; case 1: /* 2-3 */ return LIMB_DIGITS - 1; case 2: /* 4-7 */ return LIMB_DIGITS - 1; case 3: /* 8-15 */ if (a < 10) return LIMB_DIGITS - 1; else return LIMB_DIGITS - 2; case 4: /* 16-31 */ return LIMB_DIGITS - 2; case 5: /* 32-63 */ return LIMB_DIGITS - 2; case 6: /* 64-127 */ if (a < 100) return LIMB_DIGITS - 2; else return LIMB_DIGITS - 3; case 7: /* 128-255 */ return LIMB_DIGITS - 3; case 8: /* 256-511 */ return LIMB_DIGITS - 3; case 9: /* 512-1023 */ if (a < 1000) return LIMB_DIGITS - 3; else return LIMB_DIGITS - 4; case 10: /* 1024-2047 */ return LIMB_DIGITS - 4; case 11: /* 2048-4095 */ return LIMB_DIGITS - 4; case 12: /* 4096-8191 */ return LIMB_DIGITS - 4; case 13: /* 8192-16383 */ if (a < 10000) return LIMB_DIGITS - 4; else return LIMB_DIGITS - 5; case 14: /* 16384-32767 */ return LIMB_DIGITS - 5; case 15: /* 32768-65535 */ return LIMB_DIGITS - 5; case 16: /* 65536-131071 */ if (a < 100000) return LIMB_DIGITS - 5; else return LIMB_DIGITS - 6; case 17: /* 131072-262143 */ return LIMB_DIGITS - 6; case 18: /* 262144-524287 */ return LIMB_DIGITS - 6; case 19: /* 524288-1048575 */ if (a < 1000000) return LIMB_DIGITS - 6; else return LIMB_DIGITS - 7; case 20: /* 1048576-2097151 */ return LIMB_DIGITS - 7; case 21: /* 2097152-4194303 */ return LIMB_DIGITS - 7; case 22: /* 4194304-8388607 */ return LIMB_DIGITS - 7; case 23: /* 8388608-16777215 */ if (a < 10000000) return LIMB_DIGITS - 7; else return LIMB_DIGITS - 8; case 24: /* 16777216-33554431 */ return LIMB_DIGITS - 8; case 25: /* 33554432-67108863 */ return LIMB_DIGITS - 8; case 26: /* 67108864-134217727 */ if (a < 100000000) return LIMB_DIGITS - 8; else return LIMB_DIGITS - 9; #if LIMB_BITS == 64 case 27: /* 134217728-268435455 */ return LIMB_DIGITS - 9; case 28: /* 268435456-536870911 */ return LIMB_DIGITS - 9; case 29: /* 536870912-1073741823 */ if (a < 1000000000) return LIMB_DIGITS - 9; else return LIMB_DIGITS - 10; case 30: /* 1073741824-2147483647 */ return LIMB_DIGITS - 10; case 31: /* 2147483648-4294967295 */ return LIMB_DIGITS - 10; case 32: /* 4294967296-8589934591 */ return LIMB_DIGITS - 10; case 33: /* 8589934592-17179869183 */ if (a < 10000000000) return LIMB_DIGITS - 10; else return LIMB_DIGITS - 11; case 34: /* 17179869184-34359738367 */ return LIMB_DIGITS - 11; case 35: /* 34359738368-68719476735 */ return LIMB_DIGITS - 11; case 36: /* 68719476736-137438953471 */ if (a < 100000000000) return LIMB_DIGITS - 11; else return LIMB_DIGITS - 12; case 37: /* 137438953472-274877906943 */ return LIMB_DIGITS - 12; case 38: /* 274877906944-549755813887 */ return LIMB_DIGITS - 12; case 39: /* 549755813888-1099511627775 */ if (a < 1000000000000) return LIMB_DIGITS - 12; else return LIMB_DIGITS - 13; case 40: /* 1099511627776-2199023255551 */ return LIMB_DIGITS - 13; case 41: /* 2199023255552-4398046511103 */ return LIMB_DIGITS - 13; case 42: /* 4398046511104-8796093022207 */ return LIMB_DIGITS - 13; case 43: /* 8796093022208-17592186044415 */ if (a < 10000000000000) return LIMB_DIGITS - 13; else return LIMB_DIGITS - 14; case 44: /* 17592186044416-35184372088831 */ return LIMB_DIGITS - 14; case 45: /* 35184372088832-70368744177663 */ return LIMB_DIGITS - 14; case 46: /* 70368744177664-140737488355327 */ if (a < 100000000000000) return LIMB_DIGITS - 14; else return LIMB_DIGITS - 15; case 47: /* 140737488355328-281474976710655 */ return LIMB_DIGITS - 15; case 48: /* 281474976710656-562949953421311 */ return LIMB_DIGITS - 15; case 49: /* 562949953421312-1125899906842623 */ if (a < 1000000000000000) return LIMB_DIGITS - 15; else return LIMB_DIGITS - 16; case 50: /* 1125899906842624-2251799813685247 */ return LIMB_DIGITS - 16; case 51: /* 2251799813685248-4503599627370495 */ return LIMB_DIGITS - 16; case 52: /* 4503599627370496-9007199254740991 */ return LIMB_DIGITS - 16; case 53: /* 9007199254740992-18014398509481983 */ if (a < 10000000000000000) return LIMB_DIGITS - 16; else return LIMB_DIGITS - 17; case 54: /* 18014398509481984-36028797018963967 */ return LIMB_DIGITS - 17; case 55: /* 36028797018963968-72057594037927935 */ return LIMB_DIGITS - 17; case 56: /* 72057594037927936-144115188075855871 */ if (a < 100000000000000000) return LIMB_DIGITS - 17; else return LIMB_DIGITS - 18; case 57: /* 144115188075855872-288230376151711743 */ return LIMB_DIGITS - 18; case 58: /* 288230376151711744-576460752303423487 */ return LIMB_DIGITS - 18; case 59: /* 576460752303423488-1152921504606846975 */ if (a < 1000000000000000000) return LIMB_DIGITS - 18; else return LIMB_DIGITS - 19; #endif default: return 0; } }
O0
c
clz_dec: subq $0x18, %rsp movq %rdi, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) jne 0xf35ae movl $0x13, 0x14(%rsp) jmp 0xf3abd movq 0x8(%rsp), %rdi callq 0xe6160 movl %eax, %ecx movl $0x3f, %eax subl %ecx, %eax movl %eax, %ecx movq %rcx, (%rsp) subl $0x3b, %eax ja 0xf3ab5 movq (%rsp), %rax leaq 0x1e341(%rip), %rcx # 0x11191c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl $0x12, 0x14(%rsp) jmp 0xf3abd movl $0x12, 0x14(%rsp) jmp 0xf3abd movl $0x12, 0x14(%rsp) jmp 0xf3abd cmpq $0xa, 0x8(%rsp) jae 0xf3620 movl $0x12, 0x14(%rsp) jmp 0xf3abd movl $0x11, 0x14(%rsp) jmp 0xf3abd movl $0x11, 0x14(%rsp) jmp 0xf3abd movl $0x11, 0x14(%rsp) jmp 0xf3abd cmpq $0x64, 0x8(%rsp) jae 0xf365c movl $0x11, 0x14(%rsp) jmp 0xf3abd movl $0x10, 0x14(%rsp) jmp 0xf3abd movl $0x10, 0x14(%rsp) jmp 0xf3abd movl $0x10, 0x14(%rsp) jmp 0xf3abd cmpq $0x3e8, 0x8(%rsp) # imm = 0x3E8 jae 0xf369b movl $0x10, 0x14(%rsp) jmp 0xf3abd movl $0xf, 0x14(%rsp) jmp 0xf3abd movl $0xf, 0x14(%rsp) jmp 0xf3abd movl $0xf, 0x14(%rsp) jmp 0xf3abd movl $0xf, 0x14(%rsp) jmp 0xf3abd cmpq $0x2710, 0x8(%rsp) # imm = 0x2710 jae 0xf36e7 movl $0xf, 0x14(%rsp) jmp 0xf3abd movl $0xe, 0x14(%rsp) jmp 0xf3abd movl $0xe, 0x14(%rsp) jmp 0xf3abd movl $0xe, 0x14(%rsp) jmp 0xf3abd cmpq $0x186a0, 0x8(%rsp) # imm = 0x186A0 jae 0xf3726 movl $0xe, 0x14(%rsp) jmp 0xf3abd movl $0xd, 0x14(%rsp) jmp 0xf3abd movl $0xd, 0x14(%rsp) jmp 0xf3abd movl $0xd, 0x14(%rsp) jmp 0xf3abd cmpq $0xf4240, 0x8(%rsp) # imm = 0xF4240 jae 0xf3765 movl $0xd, 0x14(%rsp) jmp 0xf3abd movl $0xc, 0x14(%rsp) jmp 0xf3abd movl $0xc, 0x14(%rsp) jmp 0xf3abd movl $0xc, 0x14(%rsp) jmp 0xf3abd movl $0xc, 0x14(%rsp) jmp 0xf3abd cmpq $0x989680, 0x8(%rsp) # imm = 0x989680 jae 0xf37b1 movl $0xc, 0x14(%rsp) jmp 0xf3abd movl $0xb, 0x14(%rsp) jmp 0xf3abd movl $0xb, 0x14(%rsp) jmp 0xf3abd movl $0xb, 0x14(%rsp) jmp 0xf3abd cmpq $0x5f5e100, 0x8(%rsp) # imm = 0x5F5E100 jae 0xf37f0 movl $0xb, 0x14(%rsp) jmp 0xf3abd movl $0xa, 0x14(%rsp) jmp 0xf3abd movl $0xa, 0x14(%rsp) jmp 0xf3abd movl $0xa, 0x14(%rsp) jmp 0xf3abd cmpq $0x3b9aca00, 0x8(%rsp) # imm = 0x3B9ACA00 jae 0xf382f movl $0xa, 0x14(%rsp) jmp 0xf3abd movl $0x9, 0x14(%rsp) jmp 0xf3abd movl $0x9, 0x14(%rsp) jmp 0xf3abd movl $0x9, 0x14(%rsp) jmp 0xf3abd movl $0x9, 0x14(%rsp) jmp 0xf3abd movabsq $0x2540be400, %rax # imm = 0x2540BE400 cmpq %rax, 0x8(%rsp) jae 0xf3881 movl $0x9, 0x14(%rsp) jmp 0xf3abd movl $0x8, 0x14(%rsp) jmp 0xf3abd movl $0x8, 0x14(%rsp) jmp 0xf3abd movl $0x8, 0x14(%rsp) jmp 0xf3abd movabsq $0x174876e800, %rax # imm = 0x174876E800 cmpq %rax, 0x8(%rsp) jae 0xf38c6 movl $0x8, 0x14(%rsp) jmp 0xf3abd movl $0x7, 0x14(%rsp) jmp 0xf3abd movl $0x7, 0x14(%rsp) jmp 0xf3abd movl $0x7, 0x14(%rsp) jmp 0xf3abd movabsq $0xe8d4a51000, %rax # imm = 0xE8D4A51000 cmpq %rax, 0x8(%rsp) jae 0xf390b movl $0x7, 0x14(%rsp) jmp 0xf3abd movl $0x6, 0x14(%rsp) jmp 0xf3abd movl $0x6, 0x14(%rsp) jmp 0xf3abd movl $0x6, 0x14(%rsp) jmp 0xf3abd movl $0x6, 0x14(%rsp) jmp 0xf3abd movabsq $0x9184e72a000, %rax # imm = 0x9184E72A000 cmpq %rax, 0x8(%rsp) jae 0xf395d movl $0x6, 0x14(%rsp) jmp 0xf3abd movl $0x5, 0x14(%rsp) jmp 0xf3abd movl $0x5, 0x14(%rsp) jmp 0xf3abd movl $0x5, 0x14(%rsp) jmp 0xf3abd movabsq $0x5af3107a4000, %rax # imm = 0x5AF3107A4000 cmpq %rax, 0x8(%rsp) jae 0xf39a2 movl $0x5, 0x14(%rsp) jmp 0xf3abd movl $0x4, 0x14(%rsp) jmp 0xf3abd movl $0x4, 0x14(%rsp) jmp 0xf3abd movl $0x4, 0x14(%rsp) jmp 0xf3abd movabsq $0x38d7ea4c68000, %rax # imm = 0x38D7EA4C68000 cmpq %rax, 0x8(%rsp) jae 0xf39e7 movl $0x4, 0x14(%rsp) jmp 0xf3abd movl $0x3, 0x14(%rsp) jmp 0xf3abd movl $0x3, 0x14(%rsp) jmp 0xf3abd movl $0x3, 0x14(%rsp) jmp 0xf3abd movl $0x3, 0x14(%rsp) jmp 0xf3abd movabsq $0x2386f26fc10000, %rax # imm = 0x2386F26FC10000 cmpq %rax, 0x8(%rsp) jae 0xf3a39 movl $0x3, 0x14(%rsp) jmp 0xf3abd movl $0x2, 0x14(%rsp) jmp 0xf3abd movl $0x2, 0x14(%rsp) jmp 0xf3abd movl $0x2, 0x14(%rsp) jmp 0xf3abd movabsq $0x16345785d8a0000, %rax # imm = 0x16345785D8A0000 cmpq %rax, 0x8(%rsp) jae 0xf3a72 movl $0x2, 0x14(%rsp) jmp 0xf3abd movl $0x1, 0x14(%rsp) jmp 0xf3abd movl $0x1, 0x14(%rsp) jmp 0xf3abd movl $0x1, 0x14(%rsp) jmp 0xf3abd movabsq $0xde0b6b3a7640000, %rax # imm = 0xDE0B6B3A7640000 cmpq %rax, 0x8(%rsp) jae 0xf3aab movl $0x1, 0x14(%rsp) jmp 0xf3abd movl $0x0, 0x14(%rsp) jmp 0xf3abd movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq nopw %cs:(%rax,%rax)
clz_dec: sub rsp, 18h mov [rsp+18h+var_10], rdi cmp [rsp+18h+var_10], 0 jnz short loc_F35AE mov [rsp+18h+var_4], 13h jmp loc_F3ABD loc_F35AE: mov rdi, [rsp+18h+var_10] call clz mov ecx, eax mov eax, 3Fh ; '?' sub eax, ecx mov ecx, eax mov [rsp+18h+var_18], rcx sub eax, 3Bh; switch 60 cases ja def_F35E2; jumptable 00000000000F35E2 default case mov rax, [rsp+18h+var_18] lea rcx, jpt_F35E2 movsxd rax, ds:(jpt_F35E2 - 11191Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_F35E4: mov [rsp+18h+var_4], 12h; jumptable 00000000000F35E2 case 0 jmp loc_F3ABD loc_F35F1: mov [rsp+18h+var_4], 12h; jumptable 00000000000F35E2 case 1 jmp loc_F3ABD loc_F35FE: mov [rsp+18h+var_4], 12h; jumptable 00000000000F35E2 case 2 jmp loc_F3ABD loc_F360B: cmp [rsp+18h+var_10], 0Ah; jumptable 00000000000F35E2 case 3 jnb short loc_F3620 mov [rsp+18h+var_4], 12h jmp loc_F3ABD loc_F3620: mov [rsp+18h+var_4], 11h jmp loc_F3ABD loc_F362D: mov [rsp+18h+var_4], 11h; jumptable 00000000000F35E2 case 4 jmp loc_F3ABD loc_F363A: mov [rsp+18h+var_4], 11h; jumptable 00000000000F35E2 case 5 jmp loc_F3ABD loc_F3647: cmp [rsp+18h+var_10], 64h ; 'd'; jumptable 00000000000F35E2 case 6 jnb short loc_F365C mov [rsp+18h+var_4], 11h jmp loc_F3ABD loc_F365C: mov [rsp+18h+var_4], 10h jmp loc_F3ABD loc_F3669: mov [rsp+18h+var_4], 10h; jumptable 00000000000F35E2 case 7 jmp loc_F3ABD loc_F3676: mov [rsp+18h+var_4], 10h; jumptable 00000000000F35E2 case 8 jmp loc_F3ABD loc_F3683: cmp [rsp+18h+var_10], 3E8h; jumptable 00000000000F35E2 case 9 jnb short loc_F369B mov [rsp+18h+var_4], 10h jmp loc_F3ABD loc_F369B: mov [rsp+18h+var_4], 0Fh jmp loc_F3ABD loc_F36A8: mov [rsp+18h+var_4], 0Fh; jumptable 00000000000F35E2 case 10 jmp loc_F3ABD loc_F36B5: mov [rsp+18h+var_4], 0Fh; jumptable 00000000000F35E2 case 11 jmp loc_F3ABD loc_F36C2: mov [rsp+18h+var_4], 0Fh; jumptable 00000000000F35E2 case 12 jmp loc_F3ABD loc_F36CF: cmp [rsp+18h+var_10], 2710h; jumptable 00000000000F35E2 case 13 jnb short loc_F36E7 mov [rsp+18h+var_4], 0Fh jmp loc_F3ABD loc_F36E7: mov [rsp+18h+var_4], 0Eh jmp loc_F3ABD loc_F36F4: mov [rsp+18h+var_4], 0Eh; jumptable 00000000000F35E2 case 14 jmp loc_F3ABD loc_F3701: mov [rsp+18h+var_4], 0Eh; jumptable 00000000000F35E2 case 15 jmp loc_F3ABD loc_F370E: cmp [rsp+18h+var_10], offset loc_186A0; jumptable 00000000000F35E2 case 16 jnb short loc_F3726 mov [rsp+18h+var_4], 0Eh jmp loc_F3ABD loc_F3726: mov [rsp+18h+var_4], 0Dh jmp loc_F3ABD loc_F3733: mov [rsp+18h+var_4], 0Dh; jumptable 00000000000F35E2 case 17 jmp loc_F3ABD loc_F3740: mov [rsp+18h+var_4], 0Dh; jumptable 00000000000F35E2 case 18 jmp loc_F3ABD loc_F374D: cmp [rsp+18h+var_10], 0F4240h; jumptable 00000000000F35E2 case 19 jnb short loc_F3765 mov [rsp+18h+var_4], 0Dh jmp loc_F3ABD loc_F3765: mov [rsp+18h+var_4], 0Ch jmp loc_F3ABD loc_F3772: mov [rsp+18h+var_4], 0Ch; jumptable 00000000000F35E2 case 20 jmp loc_F3ABD loc_F377F: mov [rsp+18h+var_4], 0Ch; jumptable 00000000000F35E2 case 21 jmp loc_F3ABD loc_F378C: mov [rsp+18h+var_4], 0Ch; jumptable 00000000000F35E2 case 22 jmp loc_F3ABD loc_F3799: cmp [rsp+18h+var_10], 989680h; jumptable 00000000000F35E2 case 23 jnb short loc_F37B1 mov [rsp+18h+var_4], 0Ch jmp loc_F3ABD loc_F37B1: mov [rsp+18h+var_4], 0Bh jmp loc_F3ABD loc_F37BE: mov [rsp+18h+var_4], 0Bh; jumptable 00000000000F35E2 case 24 jmp loc_F3ABD loc_F37CB: mov [rsp+18h+var_4], 0Bh; jumptable 00000000000F35E2 case 25 jmp loc_F3ABD loc_F37D8: cmp [rsp+18h+var_10], 5F5E100h; jumptable 00000000000F35E2 case 26 jnb short loc_F37F0 mov [rsp+18h+var_4], 0Bh jmp loc_F3ABD loc_F37F0: mov [rsp+18h+var_4], 0Ah jmp loc_F3ABD loc_F37FD: mov [rsp+18h+var_4], 0Ah; jumptable 00000000000F35E2 case 27 jmp loc_F3ABD loc_F380A: mov [rsp+18h+var_4], 0Ah; jumptable 00000000000F35E2 case 28 jmp loc_F3ABD loc_F3817: cmp [rsp+18h+var_10], 3B9ACA00h; jumptable 00000000000F35E2 case 29 jnb short loc_F382F mov [rsp+18h+var_4], 0Ah jmp loc_F3ABD loc_F382F: mov [rsp+18h+var_4], 9 jmp loc_F3ABD loc_F383C: mov [rsp+18h+var_4], 9; jumptable 00000000000F35E2 case 30 jmp loc_F3ABD loc_F3849: mov [rsp+18h+var_4], 9; jumptable 00000000000F35E2 case 31 jmp loc_F3ABD loc_F3856: mov [rsp+18h+var_4], 9; jumptable 00000000000F35E2 case 32 jmp loc_F3ABD loc_F3863: mov rax, 2540BE400h; jumptable 00000000000F35E2 case 33 cmp [rsp+18h+var_10], rax jnb short loc_F3881 mov [rsp+18h+var_4], 9 jmp loc_F3ABD loc_F3881: mov [rsp+18h+var_4], 8 jmp loc_F3ABD loc_F388E: mov [rsp+18h+var_4], 8; jumptable 00000000000F35E2 case 34 jmp loc_F3ABD loc_F389B: mov [rsp+18h+var_4], 8; jumptable 00000000000F35E2 case 35 jmp loc_F3ABD loc_F38A8: mov rax, 174876E800h; jumptable 00000000000F35E2 case 36 cmp [rsp+18h+var_10], rax jnb short loc_F38C6 mov [rsp+18h+var_4], 8 jmp loc_F3ABD loc_F38C6: mov [rsp+18h+var_4], 7 jmp loc_F3ABD loc_F38D3: mov [rsp+18h+var_4], 7; jumptable 00000000000F35E2 case 37 jmp loc_F3ABD loc_F38E0: mov [rsp+18h+var_4], 7; jumptable 00000000000F35E2 case 38 jmp loc_F3ABD loc_F38ED: mov rax, 0E8D4A51000h; jumptable 00000000000F35E2 case 39 cmp [rsp+18h+var_10], rax jnb short loc_F390B mov [rsp+18h+var_4], 7 jmp loc_F3ABD loc_F390B: mov [rsp+18h+var_4], 6 jmp loc_F3ABD loc_F3918: mov [rsp+18h+var_4], 6; jumptable 00000000000F35E2 case 40 jmp loc_F3ABD loc_F3925: mov [rsp+18h+var_4], 6; jumptable 00000000000F35E2 case 41 jmp loc_F3ABD loc_F3932: mov [rsp+18h+var_4], 6; jumptable 00000000000F35E2 case 42 jmp loc_F3ABD loc_F393F: mov rax, 9184E72A000h; jumptable 00000000000F35E2 case 43 cmp [rsp+18h+var_10], rax jnb short loc_F395D mov [rsp+18h+var_4], 6 jmp loc_F3ABD loc_F395D: mov [rsp+18h+var_4], 5 jmp loc_F3ABD loc_F396A: mov [rsp+18h+var_4], 5; jumptable 00000000000F35E2 case 44 jmp loc_F3ABD loc_F3977: mov [rsp+18h+var_4], 5; jumptable 00000000000F35E2 case 45 jmp loc_F3ABD loc_F3984: mov rax, 5AF3107A4000h; jumptable 00000000000F35E2 case 46 cmp [rsp+18h+var_10], rax jnb short loc_F39A2 mov [rsp+18h+var_4], 5 jmp loc_F3ABD loc_F39A2: mov [rsp+18h+var_4], 4 jmp loc_F3ABD loc_F39AF: mov [rsp+18h+var_4], 4; jumptable 00000000000F35E2 case 47 jmp loc_F3ABD loc_F39BC: mov [rsp+18h+var_4], 4; jumptable 00000000000F35E2 case 48 jmp loc_F3ABD loc_F39C9: mov rax, 38D7EA4C68000h; jumptable 00000000000F35E2 case 49 cmp [rsp+18h+var_10], rax jnb short loc_F39E7 mov [rsp+18h+var_4], 4 jmp loc_F3ABD loc_F39E7: mov [rsp+18h+var_4], 3 jmp loc_F3ABD loc_F39F4: mov [rsp+18h+var_4], 3; jumptable 00000000000F35E2 case 50 jmp loc_F3ABD loc_F3A01: mov [rsp+18h+var_4], 3; jumptable 00000000000F35E2 case 51 jmp loc_F3ABD loc_F3A0E: mov [rsp+18h+var_4], 3; jumptable 00000000000F35E2 case 52 jmp loc_F3ABD loc_F3A1B: mov rax, 2386F26FC10000h; jumptable 00000000000F35E2 case 53 cmp [rsp+18h+var_10], rax jnb short loc_F3A39 mov [rsp+18h+var_4], 3 jmp loc_F3ABD loc_F3A39: mov [rsp+18h+var_4], 2 jmp short loc_F3ABD loc_F3A43: mov [rsp+18h+var_4], 2; jumptable 00000000000F35E2 case 54 jmp short loc_F3ABD loc_F3A4D: mov [rsp+18h+var_4], 2; jumptable 00000000000F35E2 case 55 jmp short loc_F3ABD loc_F3A57: mov rax, 16345785D8A0000h; jumptable 00000000000F35E2 case 56 cmp [rsp+18h+var_10], rax jnb short loc_F3A72 mov [rsp+18h+var_4], 2 jmp short loc_F3ABD loc_F3A72: mov [rsp+18h+var_4], 1 jmp short loc_F3ABD loc_F3A7C: mov [rsp+18h+var_4], 1; jumptable 00000000000F35E2 case 57 jmp short loc_F3ABD loc_F3A86: mov [rsp+18h+var_4], 1; jumptable 00000000000F35E2 case 58 jmp short loc_F3ABD loc_F3A90: mov rax, 0DE0B6B3A7640000h; jumptable 00000000000F35E2 case 59 cmp [rsp+18h+var_10], rax jnb short loc_F3AAB mov [rsp+18h+var_4], 1 jmp short loc_F3ABD loc_F3AAB: mov [rsp+18h+var_4], 0 jmp short loc_F3ABD def_F35E2: mov [rsp+18h+var_4], 0; jumptable 00000000000F35E2 default case loc_F3ABD: mov eax, [rsp+18h+var_4] add rsp, 18h retn
long long clz_dec(unsigned long long a1) { unsigned int v2; // [rsp+14h] [rbp-4h] if ( a1 ) { switch ( 63 - (unsigned int)clz(a1) ) { case 0u: v2 = 18; break; case 1u: v2 = 18; break; case 2u: v2 = 18; break; case 3u: if ( a1 >= 0xA ) v2 = 17; else v2 = 18; break; case 4u: v2 = 17; break; case 5u: v2 = 17; break; case 6u: if ( a1 >= 0x64 ) v2 = 16; else v2 = 17; break; case 7u: v2 = 16; break; case 8u: v2 = 16; break; case 9u: if ( a1 >= 0x3E8 ) v2 = 15; else v2 = 16; break; case 0xAu: v2 = 15; break; case 0xBu: v2 = 15; break; case 0xCu: v2 = 15; break; case 0xDu: if ( a1 >= 0x2710 ) v2 = 14; else v2 = 15; break; case 0xEu: v2 = 14; break; case 0xFu: v2 = 14; break; case 0x10u: if ( a1 >= (unsigned long long)&loc_186A0 ) v2 = 13; else v2 = 14; break; case 0x11u: v2 = 13; break; case 0x12u: v2 = 13; break; case 0x13u: if ( a1 >= 0xF4240 ) v2 = 12; else v2 = 13; break; case 0x14u: v2 = 12; break; case 0x15u: v2 = 12; break; case 0x16u: v2 = 12; break; case 0x17u: if ( a1 >= 0x989680 ) v2 = 11; else v2 = 12; break; case 0x18u: v2 = 11; break; case 0x19u: v2 = 11; break; case 0x1Au: if ( a1 >= 0x5F5E100 ) v2 = 10; else v2 = 11; break; case 0x1Bu: v2 = 10; break; case 0x1Cu: v2 = 10; break; case 0x1Du: if ( a1 >= 0x3B9ACA00 ) v2 = 9; else v2 = 10; break; case 0x1Eu: v2 = 9; break; case 0x1Fu: v2 = 9; break; case 0x20u: v2 = 9; break; case 0x21u: if ( a1 >= 0x2540BE400LL ) v2 = 8; else v2 = 9; break; case 0x22u: v2 = 8; break; case 0x23u: v2 = 8; break; case 0x24u: if ( a1 >= 0x174876E800LL ) v2 = 7; else v2 = 8; break; case 0x25u: v2 = 7; break; case 0x26u: v2 = 7; break; case 0x27u: if ( a1 >= 0xE8D4A51000LL ) v2 = 6; else v2 = 7; break; case 0x28u: v2 = 6; break; case 0x29u: v2 = 6; break; case 0x2Au: v2 = 6; break; case 0x2Bu: if ( a1 >= 0x9184E72A000LL ) v2 = 5; else v2 = 6; break; case 0x2Cu: v2 = 5; break; case 0x2Du: v2 = 5; break; case 0x2Eu: if ( a1 >= 0x5AF3107A4000LL ) v2 = 4; else v2 = 5; break; case 0x2Fu: v2 = 4; break; case 0x30u: v2 = 4; break; case 0x31u: if ( a1 >= 0x38D7EA4C68000LL ) v2 = 3; else v2 = 4; break; case 0x32u: v2 = 3; break; case 0x33u: v2 = 3; break; case 0x34u: v2 = 3; break; case 0x35u: if ( a1 >= 0x2386F26FC10000LL ) v2 = 2; else v2 = 3; break; case 0x36u: v2 = 2; break; case 0x37u: v2 = 2; break; case 0x38u: if ( a1 >= 0x16345785D8A0000LL ) v2 = 1; else v2 = 2; break; case 0x39u: v2 = 1; break; case 0x3Au: v2 = 1; break; case 0x3Bu: v2 = a1 < 0xDE0B6B3A7640000LL; break; default: v2 = 0; break; } } else { return 19; } return v2; }
clz_dec: SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RDI CMP qword ptr [RSP + 0x8],0x0 JNZ 0x001f35ae MOV dword ptr [RSP + 0x14],0x13 JMP 0x001f3abd LAB_001f35ae: MOV RDI,qword ptr [RSP + 0x8] CALL 0x001e6160 MOV ECX,EAX MOV EAX,0x3f SUB EAX,ECX MOV ECX,EAX MOV qword ptr [RSP],RCX SUB EAX,0x3b JA 0x001f3ab5 MOV RAX,qword ptr [RSP] LEA RCX,[0x21191c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_ffffffc1: MOV dword ptr [RSP + 0x14],0x12 JMP 0x001f3abd caseD_ffffffc2: MOV dword ptr [RSP + 0x14],0x12 JMP 0x001f3abd caseD_ffffffc3: MOV dword ptr [RSP + 0x14],0x12 JMP 0x001f3abd caseD_ffffffc4: CMP qword ptr [RSP + 0x8],0xa JNC 0x001f3620 MOV dword ptr [RSP + 0x14],0x12 JMP 0x001f3abd LAB_001f3620: MOV dword ptr [RSP + 0x14],0x11 JMP 0x001f3abd caseD_ffffffc5: MOV dword ptr [RSP + 0x14],0x11 JMP 0x001f3abd caseD_ffffffc6: MOV dword ptr [RSP + 0x14],0x11 JMP 0x001f3abd caseD_ffffffc7: CMP qword ptr [RSP + 0x8],0x64 JNC 0x001f365c MOV dword ptr [RSP + 0x14],0x11 JMP 0x001f3abd LAB_001f365c: MOV dword ptr [RSP + 0x14],0x10 JMP 0x001f3abd caseD_ffffffc8: MOV dword ptr [RSP + 0x14],0x10 JMP 0x001f3abd caseD_ffffffc9: MOV dword ptr [RSP + 0x14],0x10 JMP 0x001f3abd caseD_ffffffca: CMP qword ptr [RSP + 0x8],0x3e8 JNC 0x001f369b MOV dword ptr [RSP + 0x14],0x10 JMP 0x001f3abd LAB_001f369b: MOV dword ptr [RSP + 0x14],0xf JMP 0x001f3abd caseD_ffffffcb: MOV dword ptr [RSP + 0x14],0xf JMP 0x001f3abd caseD_ffffffcc: MOV dword ptr [RSP + 0x14],0xf JMP 0x001f3abd caseD_ffffffcd: MOV dword ptr [RSP + 0x14],0xf JMP 0x001f3abd caseD_ffffffce: CMP qword ptr [RSP + 0x8],0x2710 JNC 0x001f36e7 MOV dword ptr [RSP + 0x14],0xf JMP 0x001f3abd LAB_001f36e7: MOV dword ptr [RSP + 0x14],0xe JMP 0x001f3abd caseD_ffffffcf: MOV dword ptr [RSP + 0x14],0xe JMP 0x001f3abd caseD_ffffffd0: MOV dword ptr [RSP + 0x14],0xe JMP 0x001f3abd caseD_ffffffd1: CMP qword ptr [RSP + 0x8],0x186a0 JNC 0x001f3726 MOV dword ptr [RSP + 0x14],0xe JMP 0x001f3abd LAB_001f3726: MOV dword ptr [RSP + 0x14],0xd JMP 0x001f3abd caseD_ffffffd2: MOV dword ptr [RSP + 0x14],0xd JMP 0x001f3abd caseD_ffffffd3: MOV dword ptr [RSP + 0x14],0xd JMP 0x001f3abd caseD_ffffffd4: CMP qword ptr [RSP + 0x8],0xf4240 JNC 0x001f3765 MOV dword ptr [RSP + 0x14],0xd JMP 0x001f3abd LAB_001f3765: MOV dword ptr [RSP + 0x14],0xc JMP 0x001f3abd caseD_ffffffd5: MOV dword ptr [RSP + 0x14],0xc JMP 0x001f3abd caseD_ffffffd6: MOV dword ptr [RSP + 0x14],0xc JMP 0x001f3abd caseD_ffffffd7: MOV dword ptr [RSP + 0x14],0xc JMP 0x001f3abd caseD_ffffffd8: CMP qword ptr [RSP + 0x8],0x989680 JNC 0x001f37b1 MOV dword ptr [RSP + 0x14],0xc JMP 0x001f3abd LAB_001f37b1: MOV dword ptr [RSP + 0x14],0xb JMP 0x001f3abd caseD_ffffffd9: MOV dword ptr [RSP + 0x14],0xb JMP 0x001f3abd caseD_ffffffda: MOV dword ptr [RSP + 0x14],0xb JMP 0x001f3abd caseD_ffffffdb: CMP qword ptr [RSP + 0x8],0x5f5e100 JNC 0x001f37f0 MOV dword ptr [RSP + 0x14],0xb JMP 0x001f3abd LAB_001f37f0: MOV dword ptr [RSP + 0x14],0xa JMP 0x001f3abd caseD_ffffffdc: MOV dword ptr [RSP + 0x14],0xa JMP 0x001f3abd caseD_ffffffdd: MOV dword ptr [RSP + 0x14],0xa JMP 0x001f3abd caseD_ffffffde: CMP qword ptr [RSP + 0x8],0x3b9aca00 JNC 0x001f382f MOV dword ptr [RSP + 0x14],0xa JMP 0x001f3abd LAB_001f382f: MOV dword ptr [RSP + 0x14],0x9 JMP 0x001f3abd caseD_ffffffdf: MOV dword ptr [RSP + 0x14],0x9 JMP 0x001f3abd caseD_ffffffe0: MOV dword ptr [RSP + 0x14],0x9 JMP 0x001f3abd caseD_ffffffe1: MOV dword ptr [RSP + 0x14],0x9 JMP 0x001f3abd caseD_ffffffe2: MOV RAX,0x2540be400 CMP qword ptr [RSP + 0x8],RAX JNC 0x001f3881 MOV dword ptr [RSP + 0x14],0x9 JMP 0x001f3abd LAB_001f3881: MOV dword ptr [RSP + 0x14],0x8 JMP 0x001f3abd caseD_ffffffe3: MOV dword ptr [RSP + 0x14],0x8 JMP 0x001f3abd caseD_ffffffe4: MOV dword ptr [RSP + 0x14],0x8 JMP 0x001f3abd caseD_ffffffe5: MOV RAX,0x174876e800 CMP qword ptr [RSP + 0x8],RAX JNC 0x001f38c6 MOV dword ptr [RSP + 0x14],0x8 JMP 0x001f3abd LAB_001f38c6: MOV dword ptr [RSP + 0x14],0x7 JMP 0x001f3abd caseD_ffffffe6: MOV dword ptr [RSP + 0x14],0x7 JMP 0x001f3abd caseD_ffffffe7: MOV dword ptr [RSP + 0x14],0x7 JMP 0x001f3abd caseD_ffffffe8: MOV RAX,0xe8d4a51000 CMP qword ptr [RSP + 0x8],RAX JNC 0x001f390b MOV dword ptr [RSP + 0x14],0x7 JMP 0x001f3abd LAB_001f390b: MOV dword ptr [RSP + 0x14],0x6 JMP 0x001f3abd caseD_ffffffe9: MOV dword ptr [RSP + 0x14],0x6 JMP 0x001f3abd caseD_ffffffea: MOV dword ptr [RSP + 0x14],0x6 JMP 0x001f3abd caseD_ffffffeb: MOV dword ptr [RSP + 0x14],0x6 JMP 0x001f3abd caseD_ffffffec: MOV RAX,0x9184e72a000 CMP qword ptr [RSP + 0x8],RAX JNC 0x001f395d MOV dword ptr [RSP + 0x14],0x6 JMP 0x001f3abd LAB_001f395d: MOV dword ptr [RSP + 0x14],0x5 JMP 0x001f3abd caseD_ffffffed: MOV dword ptr [RSP + 0x14],0x5 JMP 0x001f3abd caseD_ffffffee: MOV dword ptr [RSP + 0x14],0x5 JMP 0x001f3abd caseD_ffffffef: MOV RAX,0x5af3107a4000 CMP qword ptr [RSP + 0x8],RAX JNC 0x001f39a2 MOV dword ptr [RSP + 0x14],0x5 JMP 0x001f3abd LAB_001f39a2: MOV dword ptr [RSP + 0x14],0x4 JMP 0x001f3abd caseD_fffffff0: MOV dword ptr [RSP + 0x14],0x4 JMP 0x001f3abd caseD_fffffff1: MOV dword ptr [RSP + 0x14],0x4 JMP 0x001f3abd caseD_fffffff2: MOV RAX,0x38d7ea4c68000 CMP qword ptr [RSP + 0x8],RAX JNC 0x001f39e7 MOV dword ptr [RSP + 0x14],0x4 JMP 0x001f3abd LAB_001f39e7: MOV dword ptr [RSP + 0x14],0x3 JMP 0x001f3abd caseD_fffffff3: MOV dword ptr [RSP + 0x14],0x3 JMP 0x001f3abd caseD_fffffff4: MOV dword ptr [RSP + 0x14],0x3 JMP 0x001f3abd caseD_fffffff5: MOV dword ptr [RSP + 0x14],0x3 JMP 0x001f3abd caseD_fffffff6: MOV RAX,0x2386f26fc10000 CMP qword ptr [RSP + 0x8],RAX JNC 0x001f3a39 MOV dword ptr [RSP + 0x14],0x3 JMP 0x001f3abd LAB_001f3a39: MOV dword ptr [RSP + 0x14],0x2 JMP 0x001f3abd caseD_fffffff7: MOV dword ptr [RSP + 0x14],0x2 JMP 0x001f3abd caseD_fffffff8: MOV dword ptr [RSP + 0x14],0x2 JMP 0x001f3abd caseD_fffffff9: MOV RAX,0x16345785d8a0000 CMP qword ptr [RSP + 0x8],RAX JNC 0x001f3a72 MOV dword ptr [RSP + 0x14],0x2 JMP 0x001f3abd LAB_001f3a72: MOV dword ptr [RSP + 0x14],0x1 JMP 0x001f3abd caseD_fffffffa: MOV dword ptr [RSP + 0x14],0x1 JMP 0x001f3abd caseD_fffffffb: MOV dword ptr [RSP + 0x14],0x1 JMP 0x001f3abd caseD_fffffffc: MOV RAX,0xde0b6b3a7640000 CMP qword ptr [RSP + 0x8],RAX JNC 0x001f3aab MOV dword ptr [RSP + 0x14],0x1 JMP 0x001f3abd LAB_001f3aab: MOV dword ptr [RSP + 0x14],0x0 JMP 0x001f3abd default: MOV dword ptr [RSP + 0x14],0x0 LAB_001f3abd: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
int4 clz_dec(ulong param_1) { int iVar1; int4 local_4; if (param_1 == 0) { local_4 = 0x13; } else { iVar1 = clz(param_1); switch(-iVar1) { case -0x3f: local_4 = 0x12; break; case -0x3e: local_4 = 0x12; break; case -0x3d: local_4 = 0x12; break; case -0x3c: if (param_1 < 10) { local_4 = 0x12; } else { local_4 = 0x11; } break; case -0x3b: local_4 = 0x11; break; case -0x3a: local_4 = 0x11; break; case -0x39: if (param_1 < 100) { local_4 = 0x11; } else { local_4 = 0x10; } break; case -0x38: local_4 = 0x10; break; case -0x37: local_4 = 0x10; break; case -0x36: if (param_1 < 1000) { local_4 = 0x10; } else { local_4 = 0xf; } break; case -0x35: local_4 = 0xf; break; case -0x34: local_4 = 0xf; break; case -0x33: local_4 = 0xf; break; case -0x32: if (param_1 < 10000) { local_4 = 0xf; } else { local_4 = 0xe; } break; case -0x31: local_4 = 0xe; break; case -0x30: local_4 = 0xe; break; case -0x2f: if (param_1 < 100000) { local_4 = 0xe; } else { local_4 = 0xd; } break; case -0x2e: local_4 = 0xd; break; case -0x2d: local_4 = 0xd; break; case -0x2c: if (param_1 < 1000000) { local_4 = 0xd; } else { local_4 = 0xc; } break; case -0x2b: local_4 = 0xc; break; case -0x2a: local_4 = 0xc; break; case -0x29: local_4 = 0xc; break; case -0x28: if (param_1 < 10000000) { local_4 = 0xc; } else { local_4 = 0xb; } break; case -0x27: local_4 = 0xb; break; case -0x26: local_4 = 0xb; break; case -0x25: if (param_1 < 100000000) { local_4 = 0xb; } else { local_4 = 10; } break; case -0x24: local_4 = 10; break; case -0x23: local_4 = 10; break; case -0x22: if (param_1 < 1000000000) { local_4 = 10; } else { local_4 = 9; } break; case -0x21: local_4 = 9; break; case -0x20: local_4 = 9; break; case -0x1f: local_4 = 9; break; case -0x1e: if (param_1 < 10000000000) { local_4 = 9; } else { local_4 = 8; } break; case -0x1d: local_4 = 8; break; case -0x1c: local_4 = 8; break; case -0x1b: if (param_1 < 100000000000) { local_4 = 8; } else { local_4 = 7; } break; case -0x1a: local_4 = 7; break; case -0x19: local_4 = 7; break; case -0x18: if (param_1 < 1000000000000) { local_4 = 7; } else { local_4 = 6; } break; case -0x17: local_4 = 6; break; case -0x16: local_4 = 6; break; case -0x15: local_4 = 6; break; case -0x14: if (param_1 < 10000000000000) { local_4 = 6; } else { local_4 = 5; } break; case -0x13: local_4 = 5; break; case -0x12: local_4 = 5; break; case -0x11: if (param_1 < 100000000000000) { local_4 = 5; } else { local_4 = 4; } break; case -0x10: local_4 = 4; break; case -0xf: local_4 = 4; break; case -0xe: if (param_1 < 1000000000000000) { local_4 = 4; } else { local_4 = 3; } break; case -0xd: local_4 = 3; break; case -0xc: local_4 = 3; break; case -0xb: local_4 = 3; break; case -10: if (param_1 < 10000000000000000) { local_4 = 3; } else { local_4 = 2; } break; case -9: local_4 = 2; break; case -8: local_4 = 2; break; case -7: if (param_1 < 100000000000000000) { local_4 = 2; } else { local_4 = 1; } break; case -6: local_4 = 1; break; case -5: local_4 = 1; break; case -4: if (param_1 < 1000000000000000000) { local_4 = 1; } else { local_4 = 0; } break; default: local_4 = 0; } } return local_4; }
33,759
js_string_match
bluesky950520[P]quickjs/quickjs.c
static JSValue js_string_match(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int atom) { // match(rx), search(rx), matchAll(rx) // atom is JS_ATOM_Symbol_match, JS_ATOM_Symbol_search, or JS_ATOM_Symbol_matchAll JSValue O = this_val, regexp = argv[0], args[2]; JSValue matcher, S, rx, result, str; int args_len; if (JS_IsUndefined(O) || JS_IsNull(O)) return JS_ThrowTypeError(ctx, "cannot convert to object"); if (!JS_IsUndefined(regexp) && !JS_IsNull(regexp)) { matcher = JS_GetProperty(ctx, regexp, atom); if (JS_IsException(matcher)) return JS_EXCEPTION; if (atom == JS_ATOM_Symbol_matchAll) { if (check_regexp_g_flag(ctx, regexp) < 0) { JS_FreeValue(ctx, matcher); return JS_EXCEPTION; } } if (!JS_IsUndefined(matcher) && !JS_IsNull(matcher)) { return JS_CallFree(ctx, matcher, regexp, 1, &O); } } S = JS_ToString(ctx, O); if (JS_IsException(S)) return JS_EXCEPTION; args_len = 1; args[0] = regexp; str = JS_UNDEFINED; if (atom == JS_ATOM_Symbol_matchAll) { str = js_new_string8(ctx, "g"); if (JS_IsException(str)) goto fail; args[args_len++] = str; } rx = JS_CallConstructor(ctx, ctx->regexp_ctor, args_len, args); JS_FreeValue(ctx, str); if (JS_IsException(rx)) { fail: JS_FreeValue(ctx, S); return JS_EXCEPTION; } result = JS_InvokeFree(ctx, rx, atom, 1, &S); JS_FreeValue(ctx, S); return result; }
O2
c
js_string_match: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %r12 movq %rdi, %r14 movq %rsi, 0x30(%rsp) movq %rdx, 0x38(%rsp) movl %r12d, %eax andl $-0x2, %eax cmpl $0x2, %eax jne 0x67126 leaq 0x2090b(%rip), %rsi # 0x87a19 xorl %r15d, %r15d movq %r14, %rdi xorl %eax, %eax callq 0x1bad1 pushq $0x6 popq %r12 xorl %ecx, %ecx jmp 0x672bf movq %rsi, %rbp movq (%r8), %r15 movq 0x8(%r8), %r13 movl %r13d, %eax andl $-0x2, %eax cmpl $0x2, %eax jne 0x671c6 movl %r9d, 0xc(%rsp) movq %r14, %rdi movq %rbp, %rsi movq %r12, %rdx callq 0x1a4c0 movq %rdx, %r12 movq %rax, 0x20(%rsp) movq %rdx, 0x28(%rsp) cmpl $0x6, %r12d je 0x672b6 movq %rax, %rbx movq %r15, 0x40(%rsp) movq %r13, 0x48(%rsp) cmpl $0xd6, 0xc(%rsp) jne 0x6725f leaq 0x208c3(%rip), %rsi # 0x87a4e movq %r14, %rdi callq 0x20cda movq %rdx, %r15 cmpl $0x6, %r15d je 0x672a8 movq %rbx, 0x10(%rsp) movabsq $-0x100000000, %rdx # imm = 0xFFFFFFFF00000000 andq %rax, %rdx movq %rax, 0x50(%rsp) movq %r15, 0x58(%rsp) movl %eax, %ebx pushq $0x2 popq %rcx jmp 0x6726f movq %r14, %rdi movq %r15, %rsi movq %r13, %rdx movl %r9d, %ecx movl %r9d, %ebx callq 0x1a4c7 cmpl $0x6, %edx je 0x672b6 movq %rax, %rsi cmpl $0xd6, %ebx movl %ebx, %r9d jne 0x67221 movq %r14, %rdi movq %rsi, 0x18(%rsp) movq %r15, %rsi movq %rdx, 0x10(%rsp) movq %r13, %rdx movl %r9d, %ebx callq 0x68b02 movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdx movl %ebx, %r9d testl %eax, %eax js 0x67319 movl %edx, %eax andl $-0x2, %eax cmpl $0x2, %eax je 0x6713f leaq 0x30(%rsp), %rax movq %rax, (%rsp) pushq $0x1 popq %r9 movq %r14, %rdi movq %r15, %rcx movq %r13, %r8 callq 0x1c212 movq %rax, %r15 movq %rdx, %r12 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx jmp 0x672bf movq %rbx, 0x10(%rsp) pushq $0x3 popq %r15 pushq $0x1 popq %rcx xorl %ebx, %ebx xorl %edx, %edx orq %rdx, %rbx movq 0x78(%r14), %rsi movq 0x80(%r14), %rdx leaq 0x40(%rsp), %r8 movq %r14, %rdi callq 0x27876 movq %rax, %r13 movq %rdx, %rbp movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx callq 0x174a2 cmpl $0x6, %ebp movq 0x10(%rsp), %rbx jne 0x672d7 movq %r14, %rdi movq %rbx, %rsi movq %r12, %rdx callq 0x174a2 xorl %r15d, %r15d xorl %ecx, %ecx pushq $0x6 popq %r12 movl %r15d, %eax orq %rcx, %rax movq %r12, %rdx addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x1 popq %r8 leaq 0x20(%rsp), %rbx movq %r14, %rdi movq %r13, %rsi movq %rbp, %rdx movl 0xc(%rsp), %ecx movq %rbx, %r9 callq 0x46ff4 movq %rax, %r15 movq %rdx, %r12 movq (%rbx), %rsi movq 0x8(%rbx), %rdx movq %r14, %rdi callq 0x174a2 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %r15, %rcx jmp 0x672bf movq %r14, %rdi jmp 0x672b1
js_string_match: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r12, rdx mov r14, rdi mov [rsp+98h+var_68], rsi mov [rsp+98h+var_60], rdx mov eax, r12d and eax, 0FFFFFFFEh cmp eax, 2 jnz short loc_67126 lea rsi, aCannotConvertT_1; "cannot convert to object" xor r15d, r15d mov rdi, r14 xor eax, eax call JS_ThrowTypeError push 6 pop r12 xor ecx, ecx jmp loc_672BF loc_67126: mov rbp, rsi mov r15, [r8] mov r13, [r8+8] mov eax, r13d and eax, 0FFFFFFFEh cmp eax, 2 jnz loc_671C6 loc_6713F: mov [rsp+98h+var_8C], r9d mov rdi, r14 mov rsi, rbp mov rdx, r12 call JS_ToString mov r12, rdx mov [rsp+98h+var_78], rax mov [rsp+98h+var_70], rdx cmp r12d, 6 jz loc_672B6 mov rbx, rax mov [rsp+98h+var_58], r15 mov [rsp+98h+var_50], r13 cmp [rsp+98h+var_8C], 0D6h jnz loc_6725F lea rsi, aRegexpMustHave+1Ch; "g" mov rdi, r14 call js_new_string8 mov r15, rdx cmp r15d, 6 jz loc_672A8 mov [rsp+98h+var_88], rbx mov rdx, 0FFFFFFFF00000000h and rdx, rax mov [rsp+98h+var_48], rax mov [rsp+98h+var_40], r15 mov ebx, eax push 2 pop rcx jmp loc_6726F loc_671C6: mov rdi, r14 mov rsi, r15 mov rdx, r13 mov ecx, r9d mov ebx, r9d call JS_GetProperty cmp edx, 6 jz loc_672B6 mov rsi, rax cmp ebx, 0D6h mov r9d, ebx jnz short loc_67221 mov rdi, r14 mov [rsp+98h+var_80], rsi mov rsi, r15 mov [rsp+98h+var_88], rdx mov rdx, r13 mov ebx, r9d call check_regexp_g_flag mov rsi, [rsp+98h+var_80] mov rdx, [rsp+98h+var_88] mov r9d, ebx test eax, eax js loc_67319 loc_67221: mov eax, edx and eax, 0FFFFFFFEh cmp eax, 2 jz loc_6713F lea rax, [rsp+98h+var_68] mov [rsp+98h+var_98], rax push 1 pop r9 mov rdi, r14 mov rcx, r15 mov r8, r13 call JS_CallFree mov r15, rax mov r12, rdx mov rcx, 0FFFFFFFF00000000h and rcx, rax jmp short loc_672BF loc_6725F: mov [rsp+98h+var_88], rbx push 3 pop r15 push 1 pop rcx xor ebx, ebx xor edx, edx loc_6726F: or rbx, rdx mov rsi, [r14+78h] mov rdx, [r14+80h] lea r8, [rsp+98h+var_58] mov rdi, r14 call JS_CallConstructor mov r13, rax mov rbp, rdx mov rdi, r14 mov rsi, rbx mov rdx, r15 call JS_FreeValue cmp ebp, 6 mov rbx, [rsp+98h+var_88] jnz short loc_672D7 loc_672A8: mov rdi, r14 mov rsi, rbx mov rdx, r12 loc_672B1: call JS_FreeValue loc_672B6: xor r15d, r15d xor ecx, ecx push 6 pop r12 loc_672BF: mov eax, r15d or rax, rcx mov rdx, r12 add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_672D7: push 1 pop r8 lea rbx, [rsp+98h+var_78] mov rdi, r14 mov rsi, r13 mov rdx, rbp mov ecx, [rsp+98h+var_8C] mov r9, rbx call JS_InvokeFree mov r15, rax mov r12, rdx mov rsi, [rbx] mov rdx, [rbx+8] mov rdi, r14 call JS_FreeValue mov rcx, 0FFFFFFFF00000000h and rcx, r15 jmp short loc_672BF loc_67319: mov rdi, r14 jmp short loc_672B1
unsigned long long js_string_match( 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 v15; // r15 unsigned long long v16; // rcx long long v18; // r13 long long v19; // rax double v20; // xmm4_8 double v21; // xmm5_8 long long v22; // rdx long long v23; // r12 long long v24; // rbx long long v25; // rax long long v26; // rdx long long v27; // r15 unsigned long long v28; // rdx long long v29; // rbx unsigned int v30; // ecx int v31; // ebx long long Property; // rax long long v33; // rdx long long v34; // rsi int v35; // eax long long v36; // rax long long v37; // rbx unsigned long long v38; // r13 long long v39; // rdx long long v40; // rbp char v42; // [rsp+0h] [rbp-98h] int v43; // [rsp+Ch] [rbp-8Ch] long long v44; // [rsp+10h] [rbp-88h] long long v45; // [rsp+10h] [rbp-88h] long long v46; // [rsp+18h] [rbp-80h] long long v47; // [rsp+20h] [rbp-78h] BYREF long long v48; // [rsp+28h] [rbp-70h] _QWORD v49[2]; // [rsp+30h] [rbp-68h] BYREF _QWORD v50[11]; // [rsp+40h] [rbp-58h] BYREF v49[0] = a2; v49[1] = a3; if ( (a3 & 0xFFFFFFFE) != 2 ) { v15 = *a5; v18 = a5[1]; if ( (a5[1] & 0xFFFFFFFE) != 2 ) { v31 = a6; Property = JS_GetProperty(a1, *a5, a5[1], a6); if ( (_DWORD)v33 == 6 ) goto LABEL_17; v34 = Property; LODWORD(a6) = v31; if ( v31 == 214 ) { v46 = Property; v45 = v33; v35 = check_regexp_g_flag(a1, v15, v18); v34 = v46; v33 = v45; LODWORD(a6) = 214; if ( v35 < 0 ) goto LABEL_16; } if ( (v33 & 0xFFFFFFFE) != 2 ) { v36 = JS_CallFree(a1, v34, v33, v15, v18, 1, (long long)v49); LODWORD(v15) = v36; v16 = v36 & 0xFFFFFFFF00000000LL; return v16 | (unsigned int)v15; } } v43 = a6; v19 = JS_ToString(a1, a2, a3); v23 = v22; v47 = v19; v48 = v22; if ( (_DWORD)v22 != 6 ) { v24 = v19; v50[0] = v15; v50[1] = v18; if ( v43 == 214 ) { v25 = js_new_string8(a1, (long long)"g"); v27 = v26; if ( (_DWORD)v26 == 6 ) { LABEL_15: v34 = v24; v33 = v23; LABEL_16: JS_FreeValue(a1, v34, v33); goto LABEL_17; } v44 = v24; v28 = v25 & 0xFFFFFFFF00000000LL; v50[2] = v25; v50[3] = v27; v29 = (unsigned int)v25; v30 = 2; } else { v44 = v19; v27 = 3LL; v30 = 1; v29 = 0LL; v28 = 0LL; } v37 = v28 | v29; v38 = JS_CallConstructor( a1, *(_QWORD *)(a1 + 120), *(_QWORD *)(a1 + 128), v30, (long long)v50, a7, a8, a9, a10, v20, v21, a13, a14); v40 = v39; JS_FreeValue(a1, v37, v27); v24 = v44; if ( (_DWORD)v40 != 6 ) { v15 = JS_InvokeFree(a1, v38, v40, v43, 1, (long long)&v47); JS_FreeValue(a1, v47, v48); v16 = v15 & 0xFFFFFFFF00000000LL; return v16 | (unsigned int)v15; } goto LABEL_15; } LABEL_17: LODWORD(v15) = 0; v16 = 0LL; return v16 | (unsigned int)v15; } LODWORD(v15) = 0; JS_ThrowTypeError( a1, (long long)"cannot convert to object", a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v42); v16 = 0LL; return v16 | (unsigned int)v15; }
js_string_match: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R12,RDX MOV R14,RDI MOV qword ptr [RSP + 0x30],RSI MOV qword ptr [RSP + 0x38],RDX MOV EAX,R12D AND EAX,0xfffffffe CMP EAX,0x2 JNZ 0x00167126 LEA RSI,[0x187a19] XOR R15D,R15D MOV RDI,R14 XOR EAX,EAX CALL 0x0011bad1 PUSH 0x6 POP R12 XOR ECX,ECX JMP 0x001672bf LAB_00167126: MOV RBP,RSI MOV R15,qword ptr [R8] MOV R13,qword ptr [R8 + 0x8] MOV EAX,R13D AND EAX,0xfffffffe CMP EAX,0x2 JNZ 0x001671c6 LAB_0016713f: MOV dword ptr [RSP + 0xc],R9D MOV RDI,R14 MOV RSI,RBP MOV RDX,R12 CALL 0x0011a4c0 MOV R12,RDX MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RDX CMP R12D,0x6 JZ 0x001672b6 MOV RBX,RAX MOV qword ptr [RSP + 0x40],R15 MOV qword ptr [RSP + 0x48],R13 CMP dword ptr [RSP + 0xc],0xd6 JNZ 0x0016725f LEA RSI,[0x187a4e] MOV RDI,R14 CALL 0x00120cda MOV R15,RDX CMP R15D,0x6 JZ 0x001672a8 MOV qword ptr [RSP + 0x10],RBX MOV RDX,-0x100000000 AND RDX,RAX MOV qword ptr [RSP + 0x50],RAX MOV qword ptr [RSP + 0x58],R15 MOV EBX,EAX PUSH 0x2 POP RCX JMP 0x0016726f LAB_001671c6: MOV RDI,R14 MOV RSI,R15 MOV RDX,R13 MOV ECX,R9D MOV EBX,R9D CALL 0x0011a4c7 CMP EDX,0x6 JZ 0x001672b6 MOV RSI,RAX CMP EBX,0xd6 MOV R9D,EBX JNZ 0x00167221 MOV RDI,R14 MOV qword ptr [RSP + 0x18],RSI MOV RSI,R15 MOV qword ptr [RSP + 0x10],RDX MOV RDX,R13 MOV EBX,R9D CALL 0x00168b02 MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x10] MOV R9D,EBX TEST EAX,EAX JS 0x00167319 LAB_00167221: MOV EAX,EDX AND EAX,0xfffffffe CMP EAX,0x2 JZ 0x0016713f LEA RAX,[RSP + 0x30] MOV qword ptr [RSP],RAX PUSH 0x1 POP R9 MOV RDI,R14 MOV RCX,R15 MOV R8,R13 CALL 0x0011c212 MOV R15,RAX MOV R12,RDX MOV RCX,-0x100000000 AND RCX,RAX JMP 0x001672bf LAB_0016725f: MOV qword ptr [RSP + 0x10],RBX PUSH 0x3 POP R15 PUSH 0x1 POP RCX XOR EBX,EBX XOR EDX,EDX LAB_0016726f: OR RBX,RDX MOV RSI,qword ptr [R14 + 0x78] MOV RDX,qword ptr [R14 + 0x80] LEA R8,[RSP + 0x40] MOV RDI,R14 CALL 0x00127876 MOV R13,RAX MOV RBP,RDX MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 CALL 0x001174a2 CMP EBP,0x6 MOV RBX,qword ptr [RSP + 0x10] JNZ 0x001672d7 LAB_001672a8: MOV RDI,R14 MOV RSI,RBX MOV RDX,R12 LAB_001672b1: CALL 0x001174a2 LAB_001672b6: XOR R15D,R15D XOR ECX,ECX PUSH 0x6 POP R12 LAB_001672bf: MOV EAX,R15D OR RAX,RCX MOV RDX,R12 ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001672d7: PUSH 0x1 POP R8 LEA RBX,[RSP + 0x20] MOV RDI,R14 MOV RSI,R13 MOV RDX,RBP MOV ECX,dword ptr [RSP + 0xc] MOV R9,RBX CALL 0x00146ff4 MOV R15,RAX MOV R12,RDX MOV RSI,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] MOV RDI,R14 CALL 0x001174a2 MOV RCX,-0x100000000 AND RCX,R15 JMP 0x001672bf LAB_00167319: MOV RDI,R14 JMP 0x001672b1
int1 [16] js_string_match(long param_1,int8 param_2,int8 param_3,int8 param_4, int8 *param_5,int param_6) { int8 uVar1; int iVar2; int8 uVar3; ulong uVar4; ulong uVar5; int1 auVar6 [16]; int1 auVar7 [16]; int1 auVar8 [16]; int1 local_78 [16]; int8 local_68; int8 local_60; int8 local_58; int8 local_50; int8 local_48; int8 local_40; local_68 = param_2; local_60 = param_3; if (((uint)param_3 & 0xfffffffe) == 2) { JS_ThrowTypeError(param_1,"cannot convert to object"); auVar6 = ZEXT816(6) << 0x40; uVar4 = 0; goto LAB_001672bf; } uVar3 = *param_5; uVar1 = param_5[1]; if (((uint)uVar1 & 0xfffffffe) == 2) { LAB_0016713f: auVar6 = JS_ToString(param_1,param_2,param_3); if (auVar6._8_4_ != 6) { local_58 = uVar3; local_50 = uVar1; local_78 = auVar6; if (param_6 == 0xd6) { auVar7 = js_new_string8(param_1,"g"); if (auVar7._8_4_ == 6) goto LAB_001672b1; uVar4 = auVar7._0_8_ & 0xffffffff00000000; uVar5 = auVar7._0_8_ & 0xffffffff; uVar3 = 2; local_40 = auVar7._8_8_; } else { auVar7._8_8_ = 3; auVar7._0_8_ = local_48; uVar3 = 1; uVar5 = 0; uVar4 = 0; } local_48 = auVar7._0_8_; auVar8 = JS_CallConstructor(param_1,*(int8 *)(param_1 + 0x78), *(int8 *)(param_1 + 0x80),uVar3,&local_58); JS_FreeValue(param_1,uVar5 | uVar4,auVar7._8_8_); if (auVar8._8_4_ != 6) { auVar6 = JS_InvokeFree(param_1,auVar8._0_8_,auVar8._8_8_,param_6,1,local_78); JS_FreeValue(param_1,local_78._0_8_,local_78._8_8_); uVar4 = auVar6._0_8_ & 0xffffffff00000000; goto LAB_001672bf; } LAB_001672b1: JS_FreeValue(param_1,auVar6._0_8_,auVar6._8_8_); } } else { auVar6 = JS_GetProperty(param_1,uVar3,uVar1,param_6); if (auVar6._8_4_ != 6) { if (param_6 != 0xd6) { LAB_00167221: if ((auVar6._8_4_ & 0xfffffffe) != 2) { auVar6 = JS_CallFree(param_1,auVar6._0_8_,auVar6._8_8_,uVar3,uVar1,1,&local_68); uVar4 = auVar6._0_8_ & 0xffffffff00000000; goto LAB_001672bf; } goto LAB_0016713f; } iVar2 = check_regexp_g_flag(param_1,uVar3,uVar1); if (-1 < iVar2) goto LAB_00167221; goto LAB_001672b1; } } uVar4 = 0; auVar6 = ZEXT816(6) << 0x40; LAB_001672bf: auVar8._0_8_ = auVar6._0_8_ & 0xffffffff | uVar4; auVar8._8_8_ = auVar6._8_8_; return auVar8; }
33,760
js_string_match
bluesky950520[P]quickjs/quickjs.c
static JSValue js_string_match(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int atom) { // match(rx), search(rx), matchAll(rx) // atom is JS_ATOM_Symbol_match, JS_ATOM_Symbol_search, or JS_ATOM_Symbol_matchAll JSValue O = this_val, regexp = argv[0], args[2]; JSValue matcher, S, rx, result, str; int args_len; if (JS_IsUndefined(O) || JS_IsNull(O)) return JS_ThrowTypeError(ctx, "cannot convert to object"); if (!JS_IsUndefined(regexp) && !JS_IsNull(regexp)) { matcher = JS_GetProperty(ctx, regexp, atom); if (JS_IsException(matcher)) return JS_EXCEPTION; if (atom == JS_ATOM_Symbol_matchAll) { if (check_regexp_g_flag(ctx, regexp) < 0) { JS_FreeValue(ctx, matcher); return JS_EXCEPTION; } } if (!JS_IsUndefined(matcher) && !JS_IsNull(matcher)) { return JS_CallFree(ctx, matcher, regexp, 1, &O); } } S = JS_ToString(ctx, O); if (JS_IsException(S)) return JS_EXCEPTION; args_len = 1; args[0] = regexp; str = JS_UNDEFINED; if (atom == JS_ATOM_Symbol_matchAll) { str = js_new_string8(ctx, "g"); if (JS_IsException(str)) goto fail; args[args_len++] = str; } rx = JS_CallConstructor(ctx, ctx->regexp_ctor, args_len, args); JS_FreeValue(ctx, str); if (JS_IsException(rx)) { fail: JS_FreeValue(ctx, S); return JS_EXCEPTION; } result = JS_InvokeFree(ctx, rx, atom, 1, &S); JS_FreeValue(ctx, S); return result; }
O3
c
js_string_match: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %rbx movq %rdi, %r14 movq %rsi, 0x30(%rsp) movq %rdx, 0x38(%rsp) movl %ebx, %eax andl $-0x2, %eax cmpl $0x2, %eax jne 0x7d6a7 leaq 0x263fa(%rip), %rsi # 0xa3a89 xorl %r15d, %r15d movq %r14, %rdi xorl %eax, %eax callq 0x2214f movl $0x6, %r8d jmp 0x7d78b movq %rsi, %rbp movq (%r8), %r12 movq 0x8(%r8), %r13 movl %r13d, %eax andl $-0x2, %eax cmpl $0x2, %eax jne 0x7d75b movl %r9d, 0xc(%rsp) xorl %r15d, %r15d movq %r14, %rdi movq %rbp, %rsi movq %rbx, %rdx xorl %ecx, %ecx callq 0x27518 movq %rdx, %rbx movq %rax, 0x20(%rsp) movq %rdx, 0x28(%rsp) movl $0x6, %r8d cmpl $0x6, %ebx je 0x7d78b movq %rax, 0x18(%rsp) movq %r12, 0x40(%rsp) movq %r13, 0x48(%rsp) cmpl $0xd6, 0xc(%rsp) jne 0x7d832 leaq 0x263a6(%rip), %rsi # 0xa3abe movq %r14, %rdi movl $0x1, %edx callq 0x1fcd9 movq %rdx, %r15 cmpl $0x6, %r15d je 0x7d8a1 movq %rbx, 0x10(%rsp) movabsq $-0x100000000, %rbx # imm = 0xFFFFFFFF00000000 andq %rax, %rbx movq %rax, 0x50(%rsp) movq %r15, 0x58(%rsp) movl %eax, %ebp movl $0x2, %r9d jmp 0x7d847 movq %r14, %rdi movq %r12, %rsi movq %r13, %rdx movl %r9d, %ecx movq %r12, %r8 movl %r9d, %r15d movq %r13, %r9 pushq $0x0 pushq $0x0 callq 0x22c0f addq $0x10, %rsp movl $0x6, %r8d cmpl $0x6, %edx jne 0x7d7a5 xorl %r15d, %r15d xorl %ecx, %ecx movl %r15d, %eax orq %rcx, %rax movq %r8, %rdx addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rsi cmpl $0xd6, %r15d movl %r15d, %r9d jne 0x7d7ea movq %r14, %rdi movq %rsi, 0x18(%rsp) movq %r12, %rsi movq %rdx, 0x10(%rsp) movq %r13, %rdx movl %r9d, %r15d callq 0x7f771 movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdx movl %r15d, %r9d movl $0x6, %r8d testl %eax, %eax js 0x7d934 movl %edx, %eax andl $-0x2, %eax cmpl $0x2, %eax je 0x7d6c0 subq $0x8, %rsp leaq 0x38(%rsp), %rax movq %r14, %rdi movq %r12, %rcx movq %r13, %r8 movl $0x1, %r9d pushq %rax callq 0x228ab addq $0x10, %rsp movq %rax, %r15 movq %rdx, %r8 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx jmp 0x7d78d movq %rbx, 0x10(%rsp) movl $0x3, %r15d movl $0x1, %r9d xorl %ebp, %ebp xorl %ebx, %ebx movq 0x78(%r14), %rcx movq 0x80(%r14), %rdx leaq 0x40(%rsp), %rax movq %r14, %rdi movq %rcx, %rsi movq %rdx, %r8 pushq $0x2 pushq %rax callq 0x2fc36 addq $0x10, %rsp movq %rax, %r13 movq %rdx, %r12 cmpl $-0x9, %r15d jb 0x7d896 orq %rbp, %rbx movq 0x18(%r14), %rdi movl (%rbx), %eax leal -0x1(%rax), %ecx movl %ecx, (%rbx) cmpl $0x1, %eax jg 0x7d896 movq %rbx, %rsi movq %r15, %rdx callq 0x20d90 cmpl $0x6, %r12d movq 0x10(%rsp), %rbx jne 0x7d8d3 cmpl $-0x9, %ebx jb 0x7d8c3 movq 0x18(%r14), %rdi movq 0x18(%rsp), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x7d8c3 movq %rbx, %rdx callq 0x20d90 xorl %r15d, %r15d xorl %ecx, %ecx movl $0x6, %r8d jmp 0x7d78d leaq 0x20(%rsp), %rbx movq %r14, %rdi movq %r13, %rsi movq %r12, %rdx movl 0xc(%rsp), %ecx movl $0x1, %r8d movq %rbx, %r9 callq 0x55929 movq %rax, %r15 movq %rdx, %r8 movq 0x8(%rbx), %rdx cmpl $-0x9, %edx jb 0x7d922 movq 0x20(%rsp), %rsi movq 0x18(%r14), %rdi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x7d922 movq %r8, %rbx callq 0x20d90 movq %rbx, %r8 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %r15, %rcx jmp 0x7d78d cmpl $-0x9, %edx jb 0x7d788 movq 0x18(%r14), %rdi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x7d788 callq 0x20d90 movl $0x6, %r8d jmp 0x7d788
js_string_match: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov rbx, rdx mov r14, rdi mov [rsp+98h+var_68], rsi mov [rsp+98h+var_60], rdx mov eax, ebx and eax, 0FFFFFFFEh cmp eax, 2 jnz short loc_7D6A7 lea rsi, aCannotConvertT_1; "cannot convert to object" xor r15d, r15d mov rdi, r14 xor eax, eax call JS_ThrowTypeError mov r8d, 6 jmp loc_7D78B loc_7D6A7: mov rbp, rsi mov r12, [r8] mov r13, [r8+8] mov eax, r13d and eax, 0FFFFFFFEh cmp eax, 2 jnz loc_7D75B loc_7D6C0: mov [rsp+98h+var_8C], r9d xor r15d, r15d mov rdi, r14 mov rsi, rbp mov rdx, rbx xor ecx, ecx call JS_ToStringInternal mov rbx, rdx mov [rsp+98h+var_78], rax mov [rsp+98h+var_70], rdx mov r8d, 6 cmp ebx, 6 jz loc_7D78B mov [rsp+98h+var_80], rax mov [rsp+98h+var_58], r12 mov [rsp+98h+var_50], r13 cmp [rsp+98h+var_8C], 0D6h jnz loc_7D832 lea rsi, aRegexpMustHave+1Ch; "g" mov rdi, r14 mov edx, 1 call js_new_string8_len mov r15, rdx cmp r15d, 6 jz loc_7D8A1 mov [rsp+98h+var_88], rbx mov rbx, 0FFFFFFFF00000000h and rbx, rax mov [rsp+98h+var_48], rax mov [rsp+98h+var_40], r15 mov ebp, eax mov r9d, 2 jmp loc_7D847 loc_7D75B: mov rdi, r14 mov rsi, r12 mov rdx, r13 mov ecx, r9d mov r8, r12 mov r15d, r9d mov r9, r13 push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov r8d, 6 cmp edx, 6 jnz short loc_7D7A5 loc_7D788: xor r15d, r15d loc_7D78B: xor ecx, ecx loc_7D78D: mov eax, r15d or rax, rcx mov rdx, r8 add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7D7A5: mov rsi, rax cmp r15d, 0D6h mov r9d, r15d jnz short loc_7D7EA mov rdi, r14 mov [rsp+98h+var_80], rsi mov rsi, r12 mov [rsp+98h+var_88], rdx mov rdx, r13 mov r15d, r9d call check_regexp_g_flag mov rsi, [rsp+98h+var_80] mov rdx, [rsp+98h+var_88] mov r9d, r15d mov r8d, 6 test eax, eax js loc_7D934 loc_7D7EA: mov eax, edx and eax, 0FFFFFFFEh cmp eax, 2 jz loc_7D6C0 sub rsp, 8 lea rax, [rsp+0A0h+var_68] mov rdi, r14 mov rcx, r12 mov r8, r13 mov r9d, 1 push rax call JS_CallFree add rsp, 10h mov r15, rax mov r8, rdx mov rcx, 0FFFFFFFF00000000h and rcx, rax jmp loc_7D78D loc_7D832: mov [rsp+98h+var_88], rbx mov r15d, 3 mov r9d, 1 xor ebp, ebp xor ebx, ebx loc_7D847: mov rcx, [r14+78h] mov rdx, [r14+80h] lea rax, [rsp+98h+var_58] mov rdi, r14 mov rsi, rcx mov r8, rdx push 2 push rax call JS_CallConstructorInternal add rsp, 10h mov r13, rax mov r12, rdx cmp r15d, 0FFFFFFF7h jb short loc_7D896 or rbx, rbp mov rdi, [r14+18h] mov eax, [rbx] lea ecx, [rax-1] mov [rbx], ecx cmp eax, 1 jg short loc_7D896 mov rsi, rbx mov rdx, r15 call js_free_value_rt loc_7D896: cmp r12d, 6 mov rbx, [rsp+98h+var_88] jnz short loc_7D8D3 loc_7D8A1: cmp ebx, 0FFFFFFF7h jb short loc_7D8C3 mov rdi, [r14+18h] mov rsi, [rsp+98h+var_80] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_7D8C3 mov rdx, rbx call js_free_value_rt loc_7D8C3: xor r15d, r15d xor ecx, ecx mov r8d, 6 jmp loc_7D78D loc_7D8D3: lea rbx, [rsp+98h+var_78] mov rdi, r14 mov rsi, r13 mov rdx, r12 mov ecx, [rsp+98h+var_8C] mov r8d, 1 mov r9, rbx call JS_InvokeFree mov r15, rax mov r8, rdx mov rdx, [rbx+8] cmp edx, 0FFFFFFF7h jb short loc_7D922 mov rsi, [rsp+98h+var_78] mov rdi, [r14+18h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_7D922 mov rbx, r8 call js_free_value_rt mov r8, rbx loc_7D922: mov rcx, 0FFFFFFFF00000000h and rcx, r15 jmp loc_7D78D loc_7D934: cmp edx, 0FFFFFFF7h jb loc_7D788 mov rdi, [r14+18h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg loc_7D788 call js_free_value_rt mov r8d, 6 jmp loc_7D788
unsigned long long js_string_match( _QWORD *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) { unsigned long long v16; // r15 long long v18; // r12 long long v19; // r13 unsigned long long v20; // rax long long v21; // rdx __m128 v22; // xmm4 __m128 v23; // xmm5 long long v24; // rbx long long v25; // rax long long v26; // rdx long long v27; // r8 long long v28; // r9 long long v29; // r15 unsigned long long v30; // rbx long long v31; // rbp long long v32; // r9 unsigned int v33; // r15d unsigned long long PropertyInternal2; // rax long long v35; // rdx long long v36; // rcx unsigned long long v37; // rcx _QWORD *v39; // rsi int v40; // eax long long v41; // rax _QWORD *v42; // r13 long long v43; // rdx long long v44; // r12 _QWORD *v45; // rbx long long v46; // rdi int v47; // eax long long v48; // rcx long long v49; // rdi int v50; // eax long long v51; // rcx long long v52; // r9 long long v53; // rdx long long v54; // r8 long long v55; // rdx _QWORD *v56; // rsi long long v57; // rdi int v58; // eax long long v59; // rcx long long v60; // rdi int v61; // eax long long v62; // rcx char v63; // [rsp+0h] [rbp-98h] unsigned int v64; // [rsp+Ch] [rbp-8Ch] long long v65; // [rsp+10h] [rbp-88h] long long v66; // [rsp+10h] [rbp-88h] _QWORD *v67; // [rsp+18h] [rbp-80h] _QWORD *v68; // [rsp+18h] [rbp-80h] _DWORD *v69; // [rsp+20h] [rbp-78h] BYREF long long v70; // [rsp+28h] [rbp-70h] _QWORD v71[2]; // [rsp+30h] [rbp-68h] BYREF _QWORD v72[11]; // [rsp+40h] [rbp-58h] BYREF v71[0] = a2; v71[1] = a3; if ( (a3 & 0xFFFFFFFE) == 2 ) { LODWORD(v16) = 0; JS_ThrowTypeError( (long long)a1, (long long)"cannot convert to object", a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v63); LABEL_10: v37 = 0LL; return v37 | (unsigned int)v16; } v18 = *a5; v19 = a5[1]; if ( (a5[1] & 0xFFFFFFFE) != 2 ) { v33 = a6; PropertyInternal2 = JS_GetPropertyInternal2((long long)a1, *a5, a5[1], a6, *a5, v19, 0LL, 0); a5 = (_QWORD *)&byte_6; if ( (_DWORD)v35 != 6 ) { v39 = (_QWORD *)PropertyInternal2; a6 = v33; if ( v33 != 214 || (v68 = (_QWORD *)PropertyInternal2, v66 = v35, v40 = check_regexp_g_flag(a1, v18, v19, v36, 6LL), v39 = v68, v35 = v66, a6 = 214LL, a5 = (_QWORD *)&byte_6, v40 >= 0) ) { if ( (v35 & 0xFFFFFFFE) != 2 ) { v41 = JS_CallFree((long long)a1, v39, v35, v18, v19, 1, (long long)v71); LODWORD(v16) = v41; v37 = v41 & 0xFFFFFFFF00000000LL; return v37 | (unsigned int)v16; } goto LABEL_4; } if ( (unsigned int)v66 >= 0xFFFFFFF7 ) { v60 = a1[3]; v61 = *(_DWORD *)v68; v62 = (unsigned int)(*(_DWORD *)v68 - 1); *(_DWORD *)v68 = v62; if ( v61 <= 1 ) js_free_value_rt(v60, v68, v66, v62, 6LL, 214LL); } } LODWORD(v16) = 0; goto LABEL_10; } LABEL_4: v64 = a6; LODWORD(v16) = 0; v20 = JS_ToStringInternal((long long)a1, a2, a3, 0LL, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v24 = v21; v69 = (_DWORD *)v20; v70 = v21; if ( (_DWORD)v21 == 6 ) goto LABEL_10; v67 = (_QWORD *)v20; v72[0] = v18; v72[1] = v19; if ( v64 == 214 ) { v25 = js_new_string8_len((long long)a1, (long long)"g", 1); v29 = v26; if ( (_DWORD)v26 == 6 ) { LABEL_21: if ( (unsigned int)v24 >= 0xFFFFFFF7 ) { v49 = a1[3]; v50 = *(_DWORD *)v67; v51 = (unsigned int)(*(_DWORD *)v67 - 1); *(_DWORD *)v67 = v51; if ( v50 <= 1 ) js_free_value_rt(v49, v67, v24, v51, v27, v28); } LODWORD(v16) = 0; v37 = 0LL; return v37 | (unsigned int)v16; } v65 = v24; v30 = v25 & 0xFFFFFFFF00000000LL; v72[2] = v25; v72[3] = v26; v31 = (unsigned int)v25; v32 = 2LL; } else { v65 = v21; v29 = 3LL; v32 = 1LL; v31 = 0LL; v30 = 0LL; } v42 = (_QWORD *)JS_CallConstructorInternal( (long long)a1, a1[15], a1[16], a1[15], a1[16], v32, a7, a8, a9, a10, v22, v23, a13, a14, (long long)v72, 2); v44 = v43; if ( (unsigned int)v29 >= 0xFFFFFFF7 ) { v45 = (_QWORD *)(v31 | v30); v46 = a1[3]; v47 = *(_DWORD *)v45; v48 = (unsigned int)(*(_DWORD *)v45 - 1); *(_DWORD *)v45 = v48; if ( v47 <= 1 ) js_free_value_rt(v46, v45, v29, v48, v27, v28); } v24 = v65; if ( (_DWORD)v44 == 6 ) goto LABEL_21; v16 = (unsigned long long)JS_InvokeFree((long long)a1, v42, v44, v64, 1, (long long)&v69); v54 = v53; v55 = v70; if ( (unsigned int)v70 >= 0xFFFFFFF7 ) { v56 = v69; v57 = a1[3]; v58 = *v69; v59 = (unsigned int)(*v69 - 1); *v69 = v59; if ( v58 <= 1 ) js_free_value_rt(v57, v56, v55, v59, v54, v52); } v37 = v16 & 0xFFFFFFFF00000000LL; return v37 | (unsigned int)v16; }
js_string_match: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV RBX,RDX MOV R14,RDI MOV qword ptr [RSP + 0x30],RSI MOV qword ptr [RSP + 0x38],RDX MOV EAX,EBX AND EAX,0xfffffffe CMP EAX,0x2 JNZ 0x0017d6a7 LEA RSI,[0x1a3a89] XOR R15D,R15D MOV RDI,R14 XOR EAX,EAX CALL 0x0012214f MOV R8D,0x6 JMP 0x0017d78b LAB_0017d6a7: MOV RBP,RSI MOV R12,qword ptr [R8] MOV R13,qword ptr [R8 + 0x8] MOV EAX,R13D AND EAX,0xfffffffe CMP EAX,0x2 JNZ 0x0017d75b LAB_0017d6c0: MOV dword ptr [RSP + 0xc],R9D XOR R15D,R15D MOV RDI,R14 MOV RSI,RBP MOV RDX,RBX XOR ECX,ECX CALL 0x00127518 MOV RBX,RDX MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RDX MOV R8D,0x6 CMP EBX,0x6 JZ 0x0017d78b MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x40],R12 MOV qword ptr [RSP + 0x48],R13 CMP dword ptr [RSP + 0xc],0xd6 JNZ 0x0017d832 LEA RSI,[0x1a3abe] MOV RDI,R14 MOV EDX,0x1 CALL 0x0011fcd9 MOV R15,RDX CMP R15D,0x6 JZ 0x0017d8a1 MOV qword ptr [RSP + 0x10],RBX MOV RBX,-0x100000000 AND RBX,RAX MOV qword ptr [RSP + 0x50],RAX MOV qword ptr [RSP + 0x58],R15 MOV EBP,EAX MOV R9D,0x2 JMP 0x0017d847 LAB_0017d75b: MOV RDI,R14 MOV RSI,R12 MOV RDX,R13 MOV ECX,R9D MOV R8,R12 MOV R15D,R9D MOV R9,R13 PUSH 0x0 PUSH 0x0 CALL 0x00122c0f ADD RSP,0x10 MOV R8D,0x6 CMP EDX,0x6 JNZ 0x0017d7a5 LAB_0017d788: XOR R15D,R15D LAB_0017d78b: XOR ECX,ECX LAB_0017d78d: MOV EAX,R15D OR RAX,RCX MOV RDX,R8 ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017d7a5: MOV RSI,RAX CMP R15D,0xd6 MOV R9D,R15D JNZ 0x0017d7ea MOV RDI,R14 MOV qword ptr [RSP + 0x18],RSI MOV RSI,R12 MOV qword ptr [RSP + 0x10],RDX MOV RDX,R13 MOV R15D,R9D CALL 0x0017f771 MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x10] MOV R9D,R15D MOV R8D,0x6 TEST EAX,EAX JS 0x0017d934 LAB_0017d7ea: MOV EAX,EDX AND EAX,0xfffffffe CMP EAX,0x2 JZ 0x0017d6c0 SUB RSP,0x8 LEA RAX,[RSP + 0x38] MOV RDI,R14 MOV RCX,R12 MOV R8,R13 MOV R9D,0x1 PUSH RAX CALL 0x001228ab ADD RSP,0x10 MOV R15,RAX MOV R8,RDX MOV RCX,-0x100000000 AND RCX,RAX JMP 0x0017d78d LAB_0017d832: MOV qword ptr [RSP + 0x10],RBX MOV R15D,0x3 MOV R9D,0x1 XOR EBP,EBP XOR EBX,EBX LAB_0017d847: MOV RCX,qword ptr [R14 + 0x78] MOV RDX,qword ptr [R14 + 0x80] LEA RAX,[RSP + 0x40] MOV RDI,R14 MOV RSI,RCX MOV R8,RDX PUSH 0x2 PUSH RAX CALL 0x0012fc36 ADD RSP,0x10 MOV R13,RAX MOV R12,RDX CMP R15D,-0x9 JC 0x0017d896 OR RBX,RBP MOV RDI,qword ptr [R14 + 0x18] MOV EAX,dword ptr [RBX] LEA ECX,[RAX + -0x1] MOV dword ptr [RBX],ECX CMP EAX,0x1 JG 0x0017d896 MOV RSI,RBX MOV RDX,R15 CALL 0x00120d90 LAB_0017d896: CMP R12D,0x6 MOV RBX,qword ptr [RSP + 0x10] JNZ 0x0017d8d3 LAB_0017d8a1: CMP EBX,-0x9 JC 0x0017d8c3 MOV RDI,qword ptr [R14 + 0x18] MOV RSI,qword ptr [RSP + 0x18] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x0017d8c3 MOV RDX,RBX CALL 0x00120d90 LAB_0017d8c3: XOR R15D,R15D XOR ECX,ECX MOV R8D,0x6 JMP 0x0017d78d LAB_0017d8d3: LEA RBX,[RSP + 0x20] MOV RDI,R14 MOV RSI,R13 MOV RDX,R12 MOV ECX,dword ptr [RSP + 0xc] MOV R8D,0x1 MOV R9,RBX CALL 0x00155929 MOV R15,RAX MOV R8,RDX MOV RDX,qword ptr [RBX + 0x8] CMP EDX,-0x9 JC 0x0017d922 MOV RSI,qword ptr [RSP + 0x20] MOV RDI,qword ptr [R14 + 0x18] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x0017d922 MOV RBX,R8 CALL 0x00120d90 MOV R8,RBX LAB_0017d922: MOV RCX,-0x100000000 AND RCX,R15 JMP 0x0017d78d LAB_0017d934: CMP EDX,-0x9 JC 0x0017d788 MOV RDI,qword ptr [R14 + 0x18] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x0017d788 CALL 0x00120d90 MOV R8D,0x6 JMP 0x0017d788
int1 [16] js_string_match(long param_1,int8 param_2,int8 param_3,int8 param_4, int8 *param_5,int param_6) { int8 uVar1; int iVar2; int *piVar3; uint uVar4; int8 uVar5; ulong uVar6; int *piVar7; ulong uVar8; int8 uVar9; int1 auVar10 [16]; int1 auVar11 [16]; int1 local_78 [16]; int8 local_68; int8 local_60; int8 local_58; int8 local_50; int8 local_48; int8 local_40; local_68 = param_2; local_60 = param_3; if (((uint)param_3 & 0xfffffffe) == 2) { JS_ThrowTypeError(param_1,"cannot convert to object"); } else { uVar9 = *param_5; uVar1 = param_5[1]; if (((uint)uVar1 & 0xfffffffe) == 2) { LAB_0017d6c0: local_78 = JS_ToStringInternal(param_1,param_2,param_3,0); uVar5 = local_78._8_8_; piVar3 = local_78._0_8_; uVar4 = local_78._8_4_; if (uVar4 != 6) { local_58 = uVar9; local_50 = uVar1; if (param_6 == 0xd6) { auVar10 = js_new_string8_len(param_1,"g",1); if (auVar10._8_4_ != 6) { uVar6 = auVar10._0_8_ & 0xffffffff00000000; uVar8 = auVar10._0_8_ & 0xffffffff; uVar9 = 2; local_40 = auVar10._8_8_; goto LAB_0017d847; } } else { auVar10._8_8_ = 3; auVar10._0_8_ = local_48; uVar9 = 1; uVar8 = 0; uVar6 = 0; LAB_0017d847: local_48 = auVar10._0_8_; auVar11 = JS_CallConstructorInternal (param_1,*(int8 *)(param_1 + 0x78), *(int8 *)(param_1 + 0x80),*(int8 *)(param_1 + 0x78), *(int8 *)(param_1 + 0x80),uVar9,&local_58,2); if (0xfffffff6 < auVar10._8_4_) { piVar7 = (int *)(uVar6 | uVar8); uVar9 = *(int8 *)(param_1 + 0x18); iVar2 = *piVar7; *piVar7 = iVar2 + -1; if (iVar2 < 2) { js_free_value_rt(uVar9,piVar7,auVar10._8_8_); } } if (auVar11._8_4_ != 6) { auVar10 = JS_InvokeFree(param_1,auVar11._0_8_,auVar11._8_8_,param_6,1,local_78); if (0xfffffff6 < local_78._8_4_) { uVar9 = *(int8 *)(param_1 + 0x18); iVar2 = *(int *)local_78._0_8_; *(int *)local_78._0_8_ = iVar2 + -1; if (iVar2 < 2) { js_free_value_rt(uVar9); } } uVar6 = auVar10._0_8_ & 0xffffffff00000000; goto LAB_0017d78d; } } if (0xfffffff6 < uVar4) { uVar9 = *(int8 *)(param_1 + 0x18); iVar2 = *piVar3; *piVar3 = iVar2 + -1; if (iVar2 < 2) { js_free_value_rt(uVar9,piVar3,uVar5); } } uVar6 = 0; auVar10 = ZEXT816(6) << 0x40; goto LAB_0017d78d; } } else { auVar10 = JS_GetPropertyInternal2(param_1,uVar9,uVar1,param_6,uVar9,uVar1,0,0); piVar3 = auVar10._0_8_; uVar4 = auVar10._8_4_; if (uVar4 != 6) { if ((param_6 != 0xd6) || (iVar2 = check_regexp_g_flag(param_1,uVar9,uVar1), -1 < iVar2)) { if ((uVar4 & 0xfffffffe) != 2) { auVar10 = JS_CallFree(param_1,piVar3,auVar10._8_8_,uVar9,uVar1,1,&local_68); uVar6 = auVar10._0_8_ & 0xffffffff00000000; goto LAB_0017d78d; } goto LAB_0017d6c0; } if (0xfffffff6 < uVar4) { uVar9 = *(int8 *)(param_1 + 0x18); iVar2 = *piVar3; *piVar3 = iVar2 + -1; if (iVar2 < 2) { js_free_value_rt(uVar9); } } } } } auVar10 = ZEXT816(6) << 0x40; uVar6 = 0; LAB_0017d78d: auVar11._0_8_ = auVar10._0_8_ & 0xffffffff | uVar6; auVar11._8_8_ = auVar10._8_8_; return auVar11; }
33,761
my_get_err_msg
eloqsql/mysys/my_error.c
const char *my_get_err_msg(uint nr) { const char *format; struct my_err_head *meh_p; /* Search for the range this error is in. */ for (meh_p= my_errmsgs_list; meh_p; meh_p= meh_p->meh_next) if (nr <= meh_p->meh_last) break; /* If we found the range this error number is in, get the format string. If the string is empty, or a NULL pointer, or if we're out of return, we return NULL. */ if (!(format= (meh_p && (nr >= meh_p->meh_first)) ? meh_p->get_errmsgs(nr)[nr - meh_p->meh_first] : NULL) || !*format) return NULL; return format; }
O0
c
my_get_err_msg: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edi, -0xc(%rbp) movq 0x1a5dce(%rip), %rax # 0x1d5810 movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) je 0x2fa6a movl -0xc(%rbp), %eax movq -0x20(%rbp), %rcx cmpl 0x14(%rcx), %eax ja 0x2fa5b jmp 0x2fa6a jmp 0x2fa5d movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) jmp 0x2fa46 cmpq $0x0, -0x20(%rbp) je 0x2faa0 movl -0xc(%rbp), %eax movq -0x20(%rbp), %rcx cmpl 0x10(%rcx), %eax jb 0x2faa0 movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movl -0xc(%rbp), %edi callq *%rax movl -0xc(%rbp), %ecx movq -0x20(%rbp), %rdx subl 0x10(%rdx), %ecx movl %ecx, %ecx movq (%rax,%rcx,8), %rax movq %rax, -0x28(%rbp) jmp 0x2faa8 xorl %eax, %eax movq %rax, -0x28(%rbp) jmp 0x2faa8 movq -0x28(%rbp), %rax movq %rax, -0x18(%rbp) cmpq $0x0, %rax je 0x2fabf movq -0x18(%rbp), %rax cmpb $0x0, (%rax) jne 0x2fac9 movq $0x0, -0x8(%rbp) jmp 0x2fad1 movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
my_get_err_msg: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_C], edi mov rax, cs:my_errmsgs_list mov [rbp+var_20], rax loc_2FA46: cmp [rbp+var_20], 0 jz short loc_2FA6A mov eax, [rbp+var_C] mov rcx, [rbp+var_20] cmp eax, [rcx+14h] ja short loc_2FA5B jmp short loc_2FA6A loc_2FA5B: jmp short $+2 loc_2FA5D: mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_20], rax jmp short loc_2FA46 loc_2FA6A: cmp [rbp+var_20], 0 jz short loc_2FAA0 mov eax, [rbp+var_C] mov rcx, [rbp+var_20] cmp eax, [rcx+10h] jb short loc_2FAA0 mov rax, [rbp+var_20] mov rax, [rax+8] mov edi, [rbp+var_C] call rax mov ecx, [rbp+var_C] mov rdx, [rbp+var_20] sub ecx, [rdx+10h] mov ecx, ecx mov rax, [rax+rcx*8] mov [rbp+var_28], rax jmp short loc_2FAA8 loc_2FAA0: xor eax, eax mov [rbp+var_28], rax jmp short $+2 loc_2FAA8: mov rax, [rbp+var_28] mov [rbp+var_18], rax cmp rax, 0 jz short loc_2FABF mov rax, [rbp+var_18] cmp byte ptr [rax], 0 jnz short loc_2FAC9 loc_2FABF: mov [rbp+var_8], 0 jmp short loc_2FAD1 loc_2FAC9: mov rax, [rbp+var_18] mov [rbp+var_8], rax loc_2FAD1: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
_BYTE * my_get_err_msg(unsigned int a1) { _BYTE *v2; // [rsp+8h] [rbp-28h] long long *i; // [rsp+10h] [rbp-20h] for ( i = my_errmsgs_list; i && a1 > *((_DWORD *)i + 5); i = (long long *)*i ) ; if ( i && a1 >= *((_DWORD *)i + 4) ) v2 = *(_BYTE **)(((long long ( *)(_QWORD))i[1])(a1) + 8LL * (a1 - *((_DWORD *)i + 4))); else v2 = 0LL; if ( v2 && *v2 ) return v2; else return 0LL; }
my_get_err_msg: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0xc],EDI MOV RAX,qword ptr [0x002d5810] MOV qword ptr [RBP + -0x20],RAX LAB_0012fa46: CMP qword ptr [RBP + -0x20],0x0 JZ 0x0012fa6a MOV EAX,dword ptr [RBP + -0xc] MOV RCX,qword ptr [RBP + -0x20] CMP EAX,dword ptr [RCX + 0x14] JA 0x0012fa5b JMP 0x0012fa6a LAB_0012fa5b: JMP 0x0012fa5d LAB_0012fa5d: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX JMP 0x0012fa46 LAB_0012fa6a: CMP qword ptr [RBP + -0x20],0x0 JZ 0x0012faa0 MOV EAX,dword ptr [RBP + -0xc] MOV RCX,qword ptr [RBP + -0x20] CMP EAX,dword ptr [RCX + 0x10] JC 0x0012faa0 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV EDI,dword ptr [RBP + -0xc] CALL RAX MOV ECX,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x20] SUB ECX,dword ptr [RDX + 0x10] MOV ECX,ECX MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x28],RAX JMP 0x0012faa8 LAB_0012faa0: XOR EAX,EAX MOV qword ptr [RBP + -0x28],RAX JMP 0x0012faa8 LAB_0012faa8: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JZ 0x0012fabf MOV RAX,qword ptr [RBP + -0x18] CMP byte ptr [RAX],0x0 JNZ 0x0012fac9 LAB_0012fabf: MOV qword ptr [RBP + -0x8],0x0 JMP 0x0012fad1 LAB_0012fac9: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX LAB_0012fad1: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
char * my_get_err_msg(uint param_1) { long lVar1; char *local_30; int8 *local_28; char *local_10; for (local_28 = (int8 *)my_errmsgs_list; (local_28 != (int8 *)0x0 && (*(uint *)((long)local_28 + 0x14) < param_1)); local_28 = (int8 *)*local_28) { } if ((local_28 == (int8 *)0x0) || (param_1 < *(uint *)(local_28 + 2))) { local_30 = (char *)0x0; } else { lVar1 = (*(code *)local_28[1])(param_1); local_30 = *(char **)(lVar1 + (ulong)(param_1 - *(int *)(local_28 + 2)) * 8); } if ((local_30 == (char *)0x0) || (*local_30 == '\0')) { local_10 = (char *)0x0; } else { local_10 = local_30; } return local_10; }
33,762
allocate_small
seiftnesse[P]memoryallocator/src/custom_alloc_small.c
void *allocate_small(size_t size) { if (size > SMALL_ALLOCATION_THRESHOLD) { HEAP_LOG("Size %zu exceeds small allocation threshold\n", size); return NULL; } HEAP_LOG("Small allocation requested: %zu bytes\n", size); // Find a free block in the bitmap int blocks_needed = (size + SMALL_BLOCK_SIZE - 1) / SMALL_BLOCK_SIZE; int consecutive_blocks = 0; int start_block = -1; for (int i = 0; i < SMALL_POOL_SIZE / SMALL_BLOCK_SIZE; i++) { int bitmap_index = i / 32; int bit_index = i % 32; if (!(small_block_bitmap[bitmap_index] & (1 << bit_index))) { // This block is free if (consecutive_blocks == 0) { start_block = i; } consecutive_blocks++; if (consecutive_blocks >= blocks_needed) { // We found enough consecutive blocks for (int j = 0; j < blocks_needed; j++) { int block = start_block + j; int bmap_idx = block / 32; int bit_idx = block % 32; small_block_bitmap[bmap_idx] |= (1 << bit_idx); } // Update stats allocation_stats.small_pool_used += blocks_needed * SMALL_BLOCK_SIZE; update_stats_allocate(blocks_needed * SMALL_BLOCK_SIZE); void *result = &small_pool[start_block * SMALL_BLOCK_SIZE]; HEAP_LOG("Small allocation succeeded: %p, blocks=%d, total_size=%zu\n", result, blocks_needed, blocks_needed * SMALL_BLOCK_SIZE); return result; } } else { // This block is used, reset counter consecutive_blocks = 0; } } HEAP_LOG("Small allocation failed: no suitable blocks available for %zu bytes\n", size); return NULL; }
O3
c
allocate_small: xorl %eax, %eax cmpq $0x100, %rdi # imm = 0x100 ja 0x1c95 pushq %rbx movq %rdi, %rcx addq $0x1f, %rdi movq %rdi, %rdx shrq $0x5, %rdx movl $0xffffffff, %ebx # imm = 0xFFFFFFFF leaq 0x41034b2(%rip), %rsi # 0x41050c0 xorl %r8d, %r8d xorl %r9d, %r9d movl %r9d, %r10d shrl $0x5, %r10d movl (%rsi,%r10,4), %r11d xorl %r10d, %r10d btl %r9d, %r11d jae 0x1c2d movl %r10d, %r8d jmp 0x1c3c testl %r8d, %r8d cmovel %r9d, %ebx incl %r8d cmpl %edx, %r8d jge 0x1c4a incl %r9d cmpl $0x8000, %r9d # imm = 0x8000 jne 0x1c14 jmp 0x1c94 testq %rcx, %rcx je 0x1c71 movl %ebx, %ecx leal 0x1f(%rcx), %eax testl %ecx, %ecx cmovnsl %ecx, %eax sarl $0x5, %eax movl $0x1, %r8d shll %cl, %r8d cltq orl %r8d, (%rsi,%rax,4) incl %ecx decl %edx jne 0x1c51 andl $0x3e0, %edi # imm = 0x3E0 leaq 0x4104442(%rip), %rax # 0x41060c0 addq %rdi, 0x28(%rax) callq 0x2561 shll $0x5, %ebx movslq %ebx, %rax addq 0x3344(%rip), %rax # 0x4fd8 popq %rbx retq
allocate_small: xor eax, eax cmp rdi, 100h ja locret_1C95 push rbx mov rcx, rdi add rdi, 1Fh mov rdx, rdi shr rdx, 5 mov ebx, 0FFFFFFFFh lea rsi, small_block_bitmap xor r8d, r8d xor r9d, r9d loc_1C14: mov r10d, r9d shr r10d, 5 mov r11d, [rsi+r10*4] xor r10d, r10d bt r11d, r9d jnb short loc_1C2D mov r8d, r10d jmp short loc_1C3C loc_1C2D: test r8d, r8d cmovz ebx, r9d inc r8d cmp r8d, edx jge short loc_1C4A loc_1C3C: inc r9d cmp r9d, 8000h jnz short loc_1C14 jmp short loc_1C94 loc_1C4A: test rcx, rcx jz short loc_1C71 mov ecx, ebx loc_1C51: lea eax, [rcx+1Fh] test ecx, ecx cmovns eax, ecx sar eax, 5 mov r8d, 1 shl r8d, cl cdqe or [rsi+rax*4], r8d inc ecx dec edx jnz short loc_1C51 loc_1C71: and edi, 3E0h lea rax, allocation_stats add [rax+28h], rdi call update_stats_allocate shl ebx, 5 movsxd rax, ebx add rax, cs:small_pool_ptr loc_1C94: pop rbx locret_1C95: retn
char * allocate_small(unsigned long long a1) { char *result; // rax unsigned long long v3; // rdi unsigned long long v4; // rdx int v5; // ebx int v6; // r8d unsigned int v7; // r9d int v8; // r11d int v9; // ecx unsigned long long v10; // rdi result = 0LL; if ( a1 > 0x100 ) return result; v3 = a1 + 31; v4 = v3 >> 5; v5 = -1; v6 = 0; v7 = 0; while ( 1 ) { v8 = small_block_bitmap[v7 >> 5]; if ( !_bittest(&v8, v7) ) break; v6 = 0; LABEL_8: if ( ++v7 == 0x8000 ) return result; } if ( !v6 ) v5 = v7; if ( ++v6 < (int)v4 ) goto LABEL_8; if ( a1 ) { v9 = v5; do { small_block_bitmap[v9 / 32] |= 1 << v9; ++v9; LODWORD(v4) = v4 - 1; } while ( (_DWORD)v4 ); } v10 = v3 & 0x3E0; *(&allocation_stats + 5) += v10; update_stats_allocate(v10); return (char *)&small_pool + 32 * v5; }
allocate_small: XOR EAX,EAX CMP RDI,0x100 JA 0x00101c95 PUSH RBX MOV RCX,RDI ADD RDI,0x1f MOV RDX,RDI SHR RDX,0x5 MOV EBX,0xffffffff LEA RSI,[0x42050c0] XOR R8D,R8D XOR R9D,R9D LAB_00101c14: MOV R10D,R9D SHR R10D,0x5 MOV R11D,dword ptr [RSI + R10*0x4] XOR R10D,R10D BT R11D,R9D JNC 0x00101c2d MOV R8D,R10D JMP 0x00101c3c LAB_00101c2d: TEST R8D,R8D CMOVZ EBX,R9D INC R8D CMP R8D,EDX JGE 0x00101c4a LAB_00101c3c: INC R9D CMP R9D,0x8000 JNZ 0x00101c14 JMP 0x00101c94 LAB_00101c4a: TEST RCX,RCX JZ 0x00101c71 MOV ECX,EBX LAB_00101c51: LEA EAX,[RCX + 0x1f] TEST ECX,ECX CMOVNS EAX,ECX SAR EAX,0x5 MOV R8D,0x1 SHL R8D,CL CDQE OR dword ptr [RSI + RAX*0x4],R8D INC ECX DEC EDX JNZ 0x00101c51 LAB_00101c71: AND EDI,0x3e0 LEA RAX,[0x42060c0] ADD qword ptr [RAX + 0x28],RDI CALL 0x00102561 SHL EBX,0x5 MOVSXD RAX,EBX ADD RAX,qword ptr [0x00104fd8] LAB_00101c94: POP RBX LAB_00101c95: RET
int * allocate_small(ulong param_1) { int iVar1; int iVar2; ulong uVar3; int iVar4; ulong uVar5; uint uVar6; ulong uVar7; if (param_1 < 0x101) { uVar3 = param_1 + 0x1f >> 5; uVar5 = 0xffffffff; iVar4 = 0; uVar7 = 0; do { iVar1 = 0; if (((uint)(&small_block_bitmap)[uVar7 >> 5] >> ((uint)uVar7 & 0x1f) & 1) == 0) { if (iVar4 == 0) { uVar5 = uVar7; } iVar1 = iVar4 + 1; if ((int)uVar3 <= iVar4 + 1) { iVar4 = (int)uVar5; if (param_1 != 0) { do { iVar1 = (int)uVar5; iVar2 = iVar1 + 0x1f; if (-1 < iVar1) { iVar2 = iVar1; } (&small_block_bitmap)[iVar2 >> 5] = (&small_block_bitmap)[iVar2 >> 5] | 1 << ((byte)uVar5 & 0x1f); uVar5 = (ulong)(iVar1 + 1); uVar6 = (int)uVar3 - 1; uVar3 = (ulong)uVar6; } while (uVar6 != 0); } DAT_042060e8 = DAT_042060e8 + (ulong)((uint)(param_1 + 0x1f) & 0x3e0); update_stats_allocate(); return PTR_small_pool_00104fd8 + (iVar4 << 5); } } iVar4 = iVar1; uVar6 = (uint)uVar7 + 1; uVar7 = (ulong)uVar6; } while (uVar6 != 0x8000); } return (int *)0x0; }
33,763
atoi_octal
eloqsql/mysys/my_init.c
static ulong atoi_octal(const char *str) { long int tmp; while (*str && my_isspace(&my_charset_latin1, *str)) str++; str2int(str, (*str == '0' ? 8 : 10), /* Octalt or decimalt */ 0, INT_MAX, &tmp); return (ulong) tmp; }
O0
c
atoi_octal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x11(%rbp) je 0xf2900 leaq 0x2736ec(%rip), %rax # 0x365fd0 movq 0x40(%rax), %rax movq -0x8(%rbp), %rcx movzbl (%rcx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x8, %eax cmpl $0x0, %eax setne %al movb %al, -0x11(%rbp) movb -0x11(%rbp), %al testb $0x1, %al jne 0xf2909 jmp 0xf2917 movq -0x8(%rbp), %rax addq $0x1, %rax movq %rax, -0x8(%rbp) jmp 0xf28cc movq -0x8(%rbp), %rdi movq -0x8(%rbp), %rax movsbl (%rax), %ecx movl $0xa, %esi movl $0x8, %eax cmpl $0x30, %ecx cmovel %eax, %esi xorl %eax, %eax movl %eax, %edx movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF leaq -0x10(%rbp), %r8 callq 0x14da30 movq -0x10(%rbp), %rax addq $0x20, %rsp popq %rbp retq nop
atoi_octal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi loc_F28CC: mov rax, [rbp+var_8] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 0 mov [rbp+var_11], al jz short loc_F2900 lea rax, my_charset_latin1 mov rax, [rax+40h] mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx+1] and eax, 8 cmp eax, 0 setnz al mov [rbp+var_11], al loc_F2900: mov al, [rbp+var_11] test al, 1 jnz short loc_F2909 jmp short loc_F2917 loc_F2909: mov rax, [rbp+var_8] add rax, 1 mov [rbp+var_8], rax jmp short loc_F28CC loc_F2917: mov rdi, [rbp+var_8] mov rax, [rbp+var_8] movsx ecx, byte ptr [rax] mov esi, 0Ah mov eax, 8 cmp ecx, 30h ; '0' cmovz esi, eax xor eax, eax mov edx, eax mov ecx, 7FFFFFFFh lea r8, [rbp+var_10] call str2int mov rax, [rbp+var_10] add rsp, 20h pop rbp retn
long long atoi_octal(_BYTE *a1) { long long v1; // rsi bool v3; // [rsp+Fh] [rbp-11h] long long v4; // [rsp+10h] [rbp-10h] BYREF _BYTE *i; // [rsp+18h] [rbp-8h] for ( i = a1; ; ++i ) { v3 = 0; if ( *i ) v3 = (*(_BYTE *)(*((_QWORD *)&my_charset_latin1 + 8) + (unsigned __int8)*i + 1LL) & 8) != 0; if ( !v3 ) break; } v1 = 10LL; if ( *i == 48 ) v1 = 8LL; str2int(i, v1, 0LL, 0x7FFFFFFFLL, &v4); return v4; }
atoi_octal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI LAB_001f28cc: MOV RAX,qword ptr [RBP + -0x8] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x11],AL JZ 0x001f2900 LEA RAX,[0x465fd0] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x8 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x11],AL LAB_001f2900: MOV AL,byte ptr [RBP + -0x11] TEST AL,0x1 JNZ 0x001f2909 JMP 0x001f2917 LAB_001f2909: MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x1 MOV qword ptr [RBP + -0x8],RAX JMP 0x001f28cc LAB_001f2917: MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x8] MOVSX ECX,byte ptr [RAX] MOV ESI,0xa MOV EAX,0x8 CMP ECX,0x30 CMOVZ ESI,EAX XOR EAX,EAX MOV EDX,EAX MOV ECX,0x7fffffff LEA R8,[RBP + -0x10] CALL 0x0024da30 MOV RAX,qword ptr [RBP + -0x10] ADD RSP,0x20 POP RBP RET
int8 atoi_octal(byte *param_1) { int8 uVar1; bool bVar2; int8 local_18; byte *local_10; local_10 = param_1; while( true ) { bVar2 = false; if (*local_10 != 0) { bVar2 = (PTR_ctype_latin1_00466010[(ulong)*local_10 + 1] & 8) != 0; } if (!bVar2) break; local_10 = local_10 + 1; } uVar1 = 10; if (*local_10 == 0x30) { uVar1 = 8; } str2int(local_10,uVar1,0,0x7fffffff,&local_18); return local_18; }
33,764
ftxui::Screen::Screen(int, int)
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/screen/screen.cpp
Screen::Screen(int dimx, int dimy) : stencil{0, dimx - 1, 0, dimy - 1}, dimx_(dimx), dimy_(dimy), pixels_(dimy, std::vector<Pixel>(dimx)) { #if defined(_WIN32) // The placement of this call is a bit weird, however we can assume that // anybody who instantiates a Screen object eventually wants to output // something to the console. // As we require UTF8 for all input/output operations we will just switch to // UTF8 encoding here SetConsoleOutputCP(CP_UTF8); SetConsoleCP(CP_UTF8); WindowsEmulateVT100Terminal(); #endif }
O3
cpp
ftxui::Screen::Screen(int, int): pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movl %edx, %r15d movq %rdi, %r14 xorl %eax, %eax movl %eax, (%rdi) leal -0x1(%rsi), %ecx movl %ecx, 0x4(%rdi) movl %eax, 0x8(%rdi) leal -0x1(%r15), %eax movl %eax, 0xc(%rdi) movl %esi, 0x10(%rdi) movl %edx, 0x14(%rdi) movslq %esi, %rsi leaq 0x10(%rsp), %rdi leaq 0xe(%rsp), %rdx callq 0x30de0 leaq 0x18(%r14), %rbx movslq %r15d, %rsi leaq 0x10(%rsp), %rdx leaq 0xf(%rsp), %rcx movq %rbx, %rdi callq 0x30e76 leaq 0x10(%rsp), %rdi callq 0x14d6a movq $0x0, 0x30(%r14) leaq 0x20(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x3b45(%rip), %rdx # 0x3cc11 leaq 0x10(%rsp), %rdi movq %rdx, %rsi callq 0x10676 addq $0x40, %r14 leaq 0x10(%rsp), %rsi leaq 0xe(%rsp), %rcx movl $0x1, %edx movq %r14, %rdi callq 0x3a284 movq 0x10(%rsp), %rdi cmpq %r15, %rdi je 0x3910b movq 0x20(%rsp), %rsi incq %rsi callq 0xb400 addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq 0x10(%rsp), %rdi cmpq %r15, %rdi je 0x39134 movq 0x20(%rsp), %rsi incq %rsi callq 0xb400 jmp 0x39134 movq %rax, %r14 movq %rbx, %rdi callq 0x14d22 jmp 0x39150 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x14d6a jmp 0x39150 movq %rax, %r14 movq %r14, %rdi callq 0xb780
_ZN5ftxui6ScreenC2Eii: push r15; Alternative name is 'ftxui::Screen::Screen(int, int)' push r14 push rbx sub rsp, 30h mov r15d, edx mov r14, rdi xor eax, eax mov [rdi], eax lea ecx, [rsi-1] mov [rdi+4], ecx mov [rdi+8], eax lea eax, [r15-1] mov [rdi+0Ch], eax mov [rdi+10h], esi mov [rdi+14h], edx movsxd rsi, esi lea rdi, [rsp+48h+var_38] lea rdx, [rsp+48h+var_3A] call _ZNSt6vectorIN5ftxui5PixelESaIS1_EEC2EmRKS2_; std::vector<ftxui::Pixel>::vector(ulong,std::allocator<ftxui::Pixel> const&) lea rbx, [r14+18h] movsxd rsi, r15d lea rdx, [rsp+48h+var_38] lea rcx, [rsp+48h+var_39] mov rdi, rbx call _ZNSt6vectorIS_IN5ftxui5PixelESaIS1_EESaIS3_EEC2EmRKS3_RKS4_; std::vector<std::vector<ftxui::Pixel>>::vector(ulong,std::vector<ftxui::Pixel> const&,std::allocator<std::vector<ftxui::Pixel>> const&) lea rdi, [rsp+48h+var_38] call _ZNSt6vectorIN5ftxui5PixelESaIS1_EED2Ev; std::vector<ftxui::Pixel>::~vector() mov qword ptr [r14+30h], 0 lea r15, [rsp+48h+var_28] mov [r15-10h], r15 lea rdx, asc_3CC0F+2; "" lea rdi, [rsp+48h+var_38] mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) add r14, 40h ; '@' lea rsi, [rsp+48h+var_38] lea rcx, [rsp+48h+var_3A] mov edx, 1 mov rdi, r14 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ESt16initializer_listIS5_ERKS6_; std::vector<std::string>::vector(std::initializer_list<std::string>,std::allocator<std::string> const&) mov rdi, [rsp+48h+var_38]; void * cmp rdi, r15 jz short loc_3910B mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3910B: add rsp, 30h pop rbx pop r14 pop r15 retn mov r14, rax mov rdi, [rsp+arg_8]; void * cmp rdi, r15 jz short loc_39134 mov rsi, [rsp+arg_18] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_39134 mov r14, rax loc_39134: mov rdi, rbx call _ZNSt6vectorIS_IN5ftxui5PixelESaIS1_EESaIS3_EED2Ev; std::vector<std::vector<ftxui::Pixel>>::~vector() jmp short loc_39150 mov r14, rax lea rdi, [rsp+arg_8] call _ZNSt6vectorIN5ftxui5PixelESaIS1_EED2Ev; std::vector<ftxui::Pixel>::~vector() jmp short loc_39150 mov r14, rax loc_39150: mov rdi, r14 call __Unwind_Resume
void ftxui::Screen::Screen(ftxui::Screen *this, int a2, int a3) { char v4; // [rsp+Eh] [rbp-3Ah] BYREF void *v5[2]; // [rsp+10h] [rbp-38h] BYREF _QWORD v6[5]; // [rsp+20h] [rbp-28h] BYREF *(_DWORD *)this = 0; *(_QWORD *)((char *)this + 4) = (unsigned int)(a2 - 1); *((_DWORD *)this + 3) = a3 - 1; *((_DWORD *)this + 4) = a2; *((_DWORD *)this + 5) = a3; std::vector<ftxui::Pixel>::vector((long long)v5, a2); std::vector<std::vector<ftxui::Pixel>>::vector((long long)this + 24, a3, (long long)v5); std::vector<ftxui::Pixel>::~vector((long long)v5); *((_QWORD *)this + 6) = 0LL; v5[0] = v6; std::string::_M_construct<char const*>((long long)v5, "", (long long)""); std::vector<std::string>::vector((char *)this + 64, v5, 1LL, &v4); if ( v5[0] != v6 ) operator delete(v5[0], v6[0] + 1LL); }
Screen: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV R15D,EDX MOV R14,RDI XOR EAX,EAX MOV dword ptr [RDI],EAX LEA ECX,[RSI + -0x1] MOV dword ptr [RDI + 0x4],ECX MOV dword ptr [RDI + 0x8],EAX LEA EAX,[R15 + -0x1] MOV dword ptr [RDI + 0xc],EAX MOV dword ptr [RDI + 0x10],ESI MOV dword ptr [RDI + 0x14],EDX MOVSXD RSI,ESI LAB_00139082: LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xe] CALL 0x00130de0 LEA RBX,[R14 + 0x18] MOVSXD RSI,R15D LAB_00139098: LEA RDX,[RSP + 0x10] LEA RCX,[RSP + 0xf] MOV RDI,RBX CALL 0x00130e76 LEA RDI,[RSP + 0x10] CALL 0x00114d6a MOV qword ptr [R14 + 0x30],0x0 LEA R15,[RSP + 0x20] MOV qword ptr [R15 + -0x10],R15 LAB_001390c5: LEA RDX,[0x13cc11] LEA RDI,[RSP + 0x10] MOV RSI,RDX CALL 0x00110676 ADD R14,0x40 LAB_001390dd: LEA RSI,[RSP + 0x10] LEA RCX,[RSP + 0xe] MOV EDX,0x1 MOV RDI,R14 CALL 0x0013a284 LAB_001390f4: MOV RDI,qword ptr [RSP + 0x10] CMP RDI,R15 JZ 0x0013910b MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x0010b400 LAB_0013910b: ADD RSP,0x30 POP RBX POP R14 POP R15 RET
/* ftxui::Screen::Screen(int, int) */ void __thiscall ftxui::Screen::Screen(Screen *this,int param_1,int param_2) { int1 local_3a [2]; long *local_38 [2]; long local_28 [2]; *(int4 *)this = 0; *(int *)(this + 4) = param_1 + -1; *(int4 *)(this + 8) = 0; *(int *)(this + 0xc) = param_2 + -1; *(int *)(this + 0x10) = param_1; *(int *)(this + 0x14) = param_2; /* try { // try from 00139082 to 00139090 has its CatchHandler @ 0013914d */ std::vector<ftxui::Pixel,std::allocator<ftxui::Pixel>>::vector ((ulong)local_38,(allocator *)(long)param_1); /* try { // try from 00139098 to 001390a9 has its CatchHandler @ 0013913e */ std:: vector<std::vector<ftxui::Pixel,std::allocator<ftxui::Pixel>>,std::allocator<std::vector<ftxui::Pixel,std::allocator<ftxui::Pixel>>>> ::vector((ulong)(this + 0x18),(vector *)(long)param_2,(allocator *)local_38); std::vector<ftxui::Pixel,std::allocator<ftxui::Pixel>>::~vector ((vector<ftxui::Pixel,std::allocator<ftxui::Pixel>> *)local_38); *(int8 *)(this + 0x30) = 0; /* try { // try from 001390c5 to 001390d8 has its CatchHandler @ 00139131 */ local_38[0] = local_28; std::__cxx11::string::_M_construct<char_const*>(local_38,&DAT_0013cc11); /* try { // try from 001390dd to 001390f3 has its CatchHandler @ 00139115 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x40), local_38,1,local_3a); if (local_38[0] != local_28) { operator_delete(local_38[0],local_28[0] + 1); } return; }
33,765
ftxui::separatorDashed()
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/dom/separator.cpp
Element separatorDashed() { return std::make_shared<SeparatorAuto>(DASHED); }
O1
cpp
ftxui::separatorDashed(): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %r14 movl $0x70, %edi callq 0xb3e0 movq %rax, %rbx movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x8(%rbx) leaq 0x34123(%rip), %rax # 0x585f8 movq %rax, (%rbx) movq %rbx, %r15 addq $0x10, %r15 movq %r15, %rdi callq 0x240c8 leaq 0x3415a(%rip), %rax # 0x58648 movq %rax, 0x10(%rbx) movl $0x1, 0x6c(%rbx) movq %r15, (%r14) movq %rbx, 0x8(%r14) movq %r14, %rax popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movl $0x70, %esi movq %rbx, %rdi callq 0xb400 movq %r14, %rdi callq 0xb780
_ZN5ftxui15separatorDashedEv: push r15 push r14 push rbx mov r14, rdi mov edi, 70h ; 'p'; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax mov rax, 100000001h mov [rbx+8], rax lea rax, off_585F8 mov [rbx], rax mov r15, rbx add r15, 10h mov rdi, r15; this call _ZN5ftxui4NodeC2Ev; ftxui::Node::Node(void) lea rax, off_58648 mov [rbx+10h], rax mov dword ptr [rbx+6Ch], 1 mov [r14], r15 mov [r14+8], rbx mov rax, r14 pop rbx pop r14 pop r15 retn mov r14, rax mov esi, 70h ; 'p'; unsigned __int64 mov rdi, rbx; void * call __ZdlPvm; operator delete(void *,ulong) mov rdi, r14 call __Unwind_Resume
ftxui * ftxui::separatorDashed(ftxui *this) { long long v1; // rbx v1 = operator new(0x70uLL); *(_QWORD *)(v1 + 8) = 0x100000001LL; *(_QWORD *)v1 = off_585F8; ftxui::Node::Node((ftxui::Node *)(v1 + 16)); *(_QWORD *)(v1 + 16) = off_58648; *(_DWORD *)(v1 + 108) = 1; *(_QWORD *)this = v1 + 16; *((_QWORD *)this + 1) = v1; return this; }
separatorDashed: PUSH R15 PUSH R14 PUSH RBX MOV R14,RDI MOV EDI,0x70 CALL 0x0010b3e0 MOV RBX,RAX MOV RAX,0x100000001 MOV qword ptr [RBX + 0x8],RAX LEA RAX,[0x1585f8] MOV qword ptr [RBX],RAX MOV R15,RBX ADD R15,0x10 LAB_001244df: MOV RDI,R15 CALL 0x001240c8 LAB_001244e7: LEA RAX,[0x158648] MOV qword ptr [RBX + 0x10],RAX MOV dword ptr [RBX + 0x6c],0x1 MOV qword ptr [R14],R15 MOV qword ptr [R14 + 0x8],RBX MOV RAX,R14 POP RBX POP R14 POP R15 RET
/* ftxui::separatorDashed() */ ftxui * __thiscall ftxui::separatorDashed(ftxui *this) { int8 *puVar1; puVar1 = (int8 *)operator_new(0x70); puVar1[1] = 0x100000001; *puVar1 = &PTR___Sp_counted_ptr_inplace_001585f8; /* try { // try from 001244df to 001244e6 has its CatchHandler @ 00124509 */ Node::Node((Node *)(puVar1 + 2)); puVar1[2] = &PTR__Node_00158648; *(int4 *)((long)puVar1 + 0x6c) = 1; *(Node **)this = (Node *)(puVar1 + 2); *(int8 **)(this + 8) = puVar1; return this; }
33,766
my_hash_sort_simple
eloqsql/strings/ctype-simple.c
void my_hash_sort_simple(CHARSET_INFO *cs, const uchar *key, size_t len, ulong *nr1, ulong *nr2) { register const uchar *sort_order=cs->sort_order; const uchar *end; uint16 space_weight= sort_order[' ']; /* Remove all trailing characters that are equal to space. We have to do this to be able to compare 'A ' and 'A' as identical. If the key is long enough, cut the trailing spaces (0x20) using an optimized function implemented in skip_trailing_spaces(). "len > 16" is just some heuristic here. Calling skip_triling_space() for short values is not desirable, because its initialization block may be more expensive than the performance gained. */ end= len > 16 ? skip_trailing_space(key, len) : key + len; /* We removed all trailing characters that are binary equal to space 0x20. Now remove all trailing characters that have weights equal to space. Some 8bit simple collations may have such characters: - cp1250_general_ci 0xA0 NO-BREAK SPACE == 0x20 SPACE - cp1251_ukrainian_ci 0x60 GRAVE ACCENT == 0x20 SPACE - koi8u_general_ci 0x60 GRAVE ACCENT == 0x20 SPACE */ for ( ; key < end ; ) { if (sort_order[*--end] != space_weight) { end++; break; } } my_hash_sort_simple_nopad(cs, key, end - key, nr1, nr2); }
O3
c
my_hash_sort_simple: pushq %rbp movq %rsp, %rbp pushq %rbx movq 0x58(%rdi), %rax leaq (%rsi,%rdx), %rdi cmpq $0x11, %rdx jb 0x3e751 cmpq $0x15, %rdx jb 0x3e73c movq %rdi, %r10 andq $-0x4, %r10 cmpq %rsi, %r10 jbe 0x3e73c leaq 0x3(%rsi), %r9 andq $-0x4, %r9 movq %rdi, %rdx movb -0x1(%rdi), %r11b cmpq %r10, %rdi jbe 0x3e7bc leaq -0x1(%rdx), %rdi cmpb $0x20, %r11b je 0x3e720 jmp 0x3e73f movq %rdi, %rdx movq %rdx, %rdi cmpq %rsi, %rdx jbe 0x3e751 leaq -0x1(%rdi), %rdx cmpb $0x20, -0x1(%rdi) je 0x3e73f movb 0x20(%rax), %r9b movq %rdi, %r11 subq %rsi, %r11 movq %rdi, %rdx movq %r11, %r10 cmpq %rsi, %rdi jbe 0x3e778 leaq -0x1(%rdx), %rdi movzbl -0x1(%rdx), %ebx leaq -0x1(%r10), %r11 cmpb %r9b, (%rax,%rbx) je 0x3e75b movq (%rcx), %rdi movq (%r8), %r9 testq %r10, %r10 jle 0x3e7b3 movl %edi, %r10d andl $0x3f, %r10d addq %r9, %r10 movzbl (%rsi), %r11d movzbl (%rax,%r11), %r11d imulq %r10, %r11 movq %rdi, %r10 shlq $0x8, %r10 addq %r11, %r10 xorq %r10, %rdi addq $0x3, %r9 incq %rsi cmpq %rdx, %rsi jb 0x3e783 movq %rdi, (%rcx) movq %r9, (%r8) popq %rbx popq %rbp retq cmpb $0x20, %r11b setne %dil cmpq %r10, %r9 setae %r10b orb %dil, %r10b jne 0x3e73f movq %rdx, %rdi movq %rdi, %rdx cmpq %r9, %rdi jbe 0x3e73f leaq -0x4(%rdx), %rdi cmpl $0x20202020, -0x4(%rdx) # imm = 0x20202020 je 0x3e7d7 jmp 0x3e73f
my_hash_sort_simple: push rbp mov rbp, rsp push rbx mov rax, [rdi+58h] lea rdi, [rsi+rdx] cmp rdx, 11h jb short loc_3E751 cmp rdx, 15h jb short loc_3E73C mov r10, rdi and r10, 0FFFFFFFFFFFFFFFCh cmp r10, rsi jbe short loc_3E73C lea r9, [rsi+3] and r9, 0FFFFFFFFFFFFFFFCh loc_3E720: mov rdx, rdi mov r11b, [rdi-1] cmp rdi, r10 jbe loc_3E7BC lea rdi, [rdx-1] cmp r11b, 20h ; ' ' jz short loc_3E720 jmp short loc_3E73F loc_3E73C: mov rdx, rdi loc_3E73F: mov rdi, rdx cmp rdx, rsi jbe short loc_3E751 lea rdx, [rdi-1] cmp byte ptr [rdi-1], 20h ; ' ' jz short loc_3E73F loc_3E751: mov r9b, [rax+20h] mov r11, rdi sub r11, rsi loc_3E75B: mov rdx, rdi mov r10, r11 cmp rdi, rsi jbe short loc_3E778 lea rdi, [rdx-1] movzx ebx, byte ptr [rdx-1] lea r11, [r10-1] cmp [rax+rbx], r9b jz short loc_3E75B loc_3E778: mov rdi, [rcx] mov r9, [r8] test r10, r10 jle short loc_3E7B3 loc_3E783: mov r10d, edi and r10d, 3Fh add r10, r9 movzx r11d, byte ptr [rsi] movzx r11d, byte ptr [rax+r11] imul r11, r10 mov r10, rdi shl r10, 8 add r10, r11 xor rdi, r10 add r9, 3 inc rsi cmp rsi, rdx jb short loc_3E783 loc_3E7B3: mov [rcx], rdi mov [r8], r9 pop rbx pop rbp retn loc_3E7BC: cmp r11b, 20h ; ' ' setnz dil cmp r9, r10 setnb r10b or r10b, dil jnz loc_3E73F mov rdi, rdx loc_3E7D7: mov rdx, rdi cmp rdi, r9 jbe loc_3E73F lea rdi, [rdx-4] cmp dword ptr [rdx-4], 20202020h jz short loc_3E7D7 jmp loc_3E73F
long long my_hash_sort_simple(long long a1, unsigned __int8 *a2, unsigned long long a3, long long *a4, long long *a5) { long long result; // rax unsigned long long v6; // rdi unsigned long long v7; // r10 unsigned long long v8; // r9 unsigned __int8 *v9; // rdx char v10; // r11 long long v11; // r11 unsigned long long v12; // rdx long long v13; // r10 long long v14; // rdi long long v15; // r9 result = *(_QWORD *)(a1 + 88); v6 = (unsigned long long)&a2[a3]; if ( a3 >= 0x11 ) { if ( a3 < 0x15 || (v7 = v6 & 0xFFFFFFFFFFFFFFFCLL, (v6 & 0xFFFFFFFFFFFFFFFCLL) <= (unsigned long long)a2) ) { v9 = &a2[a3]; } else { v8 = (unsigned long long)(a2 + 3) & 0xFFFFFFFFFFFFFFFCLL; while ( 1 ) { v9 = (unsigned __int8 *)v6; v10 = *(_BYTE *)(v6 - 1); if ( v6 <= v7 ) break; --v6; if ( v10 != 32 ) goto LABEL_9; } if ( v10 == 32 && v8 < v7 ) { do { v9 = (unsigned __int8 *)v6; if ( v6 <= v8 ) break; v6 -= 4LL; } while ( *((_DWORD *)v9 - 1) == 538976288 ); } } do { LABEL_9: v6 = (unsigned long long)v9; if ( v9 <= a2 ) break; --v9; } while ( *(_BYTE *)(v6 - 1) == 32 ); } v11 = v6 - (_QWORD)a2; do { v12 = v6; v13 = v11; if ( v6 <= (unsigned long long)a2 ) break; --v6; --v11; } while ( *(_BYTE *)(result + *(unsigned __int8 *)(v12 - 1)) == *(_BYTE *)(result + 32) ); v14 = *a4; v15 = *a5; if ( v13 > 0 ) { do { v14 ^= (v15 + (v14 & 0x3F)) * *(unsigned __int8 *)(result + *a2) + (v14 << 8); v15 += 3LL; ++a2; } while ( (unsigned long long)a2 < v12 ); } *a4 = v14; *a5 = v15; return result; }
my_hash_sort_simple: PUSH RBP MOV RBP,RSP PUSH RBX MOV RAX,qword ptr [RDI + 0x58] LEA RDI,[RSI + RDX*0x1] CMP RDX,0x11 JC 0x0013e751 CMP RDX,0x15 JC 0x0013e73c MOV R10,RDI AND R10,-0x4 CMP R10,RSI JBE 0x0013e73c LEA R9,[RSI + 0x3] AND R9,-0x4 LAB_0013e720: MOV RDX,RDI MOV R11B,byte ptr [RDI + -0x1] CMP RDI,R10 JBE 0x0013e7bc LEA RDI,[RDX + -0x1] CMP R11B,0x20 JZ 0x0013e720 JMP 0x0013e73f LAB_0013e73c: MOV RDX,RDI LAB_0013e73f: MOV RDI,RDX CMP RDX,RSI JBE 0x0013e751 LEA RDX,[RDI + -0x1] CMP byte ptr [RDI + -0x1],0x20 JZ 0x0013e73f LAB_0013e751: MOV R9B,byte ptr [RAX + 0x20] MOV R11,RDI SUB R11,RSI LAB_0013e75b: MOV RDX,RDI MOV R10,R11 CMP RDI,RSI JBE 0x0013e778 LEA RDI,[RDX + -0x1] MOVZX EBX,byte ptr [RDX + -0x1] LEA R11,[R10 + -0x1] CMP byte ptr [RAX + RBX*0x1],R9B JZ 0x0013e75b LAB_0013e778: MOV RDI,qword ptr [RCX] MOV R9,qword ptr [R8] TEST R10,R10 JLE 0x0013e7b3 LAB_0013e783: MOV R10D,EDI AND R10D,0x3f ADD R10,R9 MOVZX R11D,byte ptr [RSI] MOVZX R11D,byte ptr [RAX + R11*0x1] IMUL R11,R10 MOV R10,RDI SHL R10,0x8 ADD R10,R11 XOR RDI,R10 ADD R9,0x3 INC RSI CMP RSI,RDX JC 0x0013e783 LAB_0013e7b3: MOV qword ptr [RCX],RDI MOV qword ptr [R8],R9 POP RBX POP RBP RET LAB_0013e7bc: CMP R11B,0x20 SETNZ DIL CMP R9,R10 SETNC R10B OR R10B,DIL JNZ 0x0013e73f MOV RDI,RDX LAB_0013e7d7: MOV RDX,RDI CMP RDI,R9 JBE 0x0013e73f LEA RDI,[RDX + -0x4] CMP dword ptr [RDX + -0x4],0x20202020 JZ 0x0013e7d7 JMP 0x0013e73f
void my_hash_sort_simple(long param_1,byte *param_2,ulong param_3,ulong *param_4,long *param_5) { byte *pbVar1; long lVar2; byte *pbVar3; ulong uVar4; byte *pbVar5; long lVar6; byte *pbVar7; long lVar8; lVar2 = *(long *)(param_1 + 0x58); pbVar5 = param_2 + param_3; if (param_3 < 0x11) goto LAB_0013e751; pbVar3 = pbVar5; if ((0x14 < param_3) && (pbVar7 = (byte *)((ulong)pbVar5 & 0xfffffffffffffffc), param_2 < pbVar7)) { do { pbVar1 = pbVar5 + -1; pbVar3 = pbVar5; if (pbVar5 <= pbVar7) { if ((byte *)((ulong)(param_2 + 3) & 0xfffffffffffffffc) < pbVar7 && *pbVar1 == 0x20) goto LAB_0013e7d7; break; } pbVar5 = pbVar5 + -1; } while (*pbVar1 == 0x20); } goto LAB_0013e73f; while (pbVar7 = pbVar5 + -4, pbVar5 = pbVar5 + -4, *(int *)pbVar7 == 0x20202020) { LAB_0013e7d7: pbVar3 = pbVar5; if (pbVar5 <= (byte *)((ulong)(param_2 + 3) & 0xfffffffffffffffc)) break; } LAB_0013e73f: do { pbVar5 = pbVar3; if (pbVar5 <= param_2) break; pbVar3 = pbVar5 + -1; } while (pbVar5[-1] == 0x20); LAB_0013e751: lVar6 = (long)pbVar5 - (long)param_2; do { lVar8 = lVar6; pbVar3 = pbVar5; if (pbVar3 <= param_2) break; pbVar5 = pbVar3 + -1; lVar6 = lVar8 + -1; } while (*(char *)(lVar2 + (ulong)pbVar3[-1]) == *(char *)(lVar2 + 0x20)); uVar4 = *param_4; lVar6 = *param_5; if (0 < lVar8) { do { uVar4 = uVar4 ^ uVar4 * 0x100 + (ulong)*(byte *)(lVar2 + (ulong)*param_2) * ((ulong)((uint)uVar4 & 0x3f) + lVar6); lVar6 = lVar6 + 3; param_2 = param_2 + 1; } while (param_2 < pbVar3); } *param_4 = uVar4; *param_5 = lVar6; return; }
33,767
my_copy_8bit
eloqsql/strings/ctype-simple.c
size_t my_copy_8bit(CHARSET_INFO *cs __attribute__((unused)), char *dst, size_t dst_length, const char *src, size_t src_length, size_t nchars, MY_STRCOPY_STATUS *status) { set_if_smaller(src_length, dst_length); set_if_smaller(src_length, nchars); if (src_length) memmove(dst, src, src_length); status->m_source_end_pos= src + src_length; status->m_well_formed_error_pos= NULL; return src_length; }
O3
c
my_copy_8bit: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rcx, %r14 movq %rdx, %rbx movq 0x10(%rbp), %r15 cmpq %rdx, %r8 cmovbq %r8, %rbx cmpq %r9, %rbx cmovaeq %r9, %rbx testq %rbx, %rbx je 0x71179 movq %rsi, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x28660 addq %rbx, %r14 movq %r14, (%r15) movq $0x0, 0x8(%r15) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
my_copy_8bit: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rcx mov rbx, rdx mov r15, [rbp+arg_0] cmp r8, rdx cmovb rbx, r8 cmp rbx, r9 cmovnb rbx, r9 test rbx, rbx jz short loc_71179 mov rdi, rsi mov rsi, r14 mov rdx, rbx call _memmove loc_71179: add r14, rbx mov [r15], r14 mov qword ptr [r15+8], 0 mov rax, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
unsigned long long my_copy_8bit( long long a1, long long a2, unsigned long long a3, long long a4, unsigned long long a5, unsigned long long a6, _QWORD *a7) { unsigned long long v8; // rbx v8 = a3; if ( a5 < a3 ) v8 = a5; if ( v8 >= a6 ) v8 = a6; if ( v8 ) memmove(a2, a4, v8); *a7 = v8 + a4; a7[1] = 0LL; return v8; }
my_copy_8bit: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RCX MOV RBX,RDX MOV R15,qword ptr [RBP + 0x10] CMP R8,RDX CMOVC RBX,R8 CMP RBX,R9 CMOVNC RBX,R9 TEST RBX,RBX JZ 0x00171179 MOV RDI,RSI MOV RSI,R14 MOV RDX,RBX CALL 0x00128660 LAB_00171179: ADD R14,RBX MOV qword ptr [R15],R14 MOV qword ptr [R15 + 0x8],0x0 MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
size_t my_copy_8bit(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5, ulong param_6,long *param_7) { if (param_5 < param_3) { param_3 = param_5; } if (param_6 <= param_3) { param_3 = param_6; } if (param_3 != 0) { memmove(param_2,param_4,param_3); } *param_7 = (long)param_4 + param_3; param_7[1] = 0; return param_3; }
33,768
set_dynamic
eloqsql/mysys/array.c
my_bool set_dynamic(DYNAMIC_ARRAY *array, const void *element, uint idx) { if (idx >= array->elements) { if (idx >= array->max_element && allocate_dynamic(array, idx)) return TRUE; bzero((uchar*) (array->buffer+array->elements*array->size_of_element), (idx - array->elements)*array->size_of_element); array->elements=idx+1; } memcpy(array->buffer+(idx * array->size_of_element),element, (size_t) array->size_of_element); return FALSE; }
O0
c
set_dynamic: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movl -0x1c(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0x8(%rcx), %eax jb 0xdc34a movl -0x1c(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0xc(%rcx), %eax jb 0xdc305 movq -0x10(%rbp), %rdi movl -0x1c(%rbp), %esi callq 0xdc380 movsbl %al, %eax cmpl $0x0, %eax je 0xdc305 movb $0x1, -0x1(%rbp) jmp 0xdc377 movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movl 0x8(%rax), %eax movq -0x10(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax addq %rax, %rdi movl -0x1c(%rbp), %eax movq -0x10(%rbp), %rcx subl 0x8(%rcx), %eax movq -0x10(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax movl %eax, %edx xorl %esi, %esi callq 0x2a2a0 movl -0x1c(%rbp), %ecx addl $0x1, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x10(%rbp), %rax movq (%rax), %rdi movl -0x1c(%rbp), %eax movq -0x10(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax addq %rax, %rdi movq -0x18(%rbp), %rsi movq -0x10(%rbp), %rax movl 0x14(%rax), %eax movl %eax, %edx callq 0x2a090 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq
set_dynamic: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov eax, [rbp+var_1C] mov rcx, [rbp+var_10] cmp eax, [rcx+8] jb short loc_DC34A mov eax, [rbp+var_1C] mov rcx, [rbp+var_10] cmp eax, [rcx+0Ch] jb short loc_DC305 mov rdi, [rbp+var_10] mov esi, [rbp+var_1C] call allocate_dynamic movsx eax, al cmp eax, 0 jz short loc_DC305 mov [rbp+var_1], 1 jmp short loc_DC377 loc_DC305: mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_10] mov eax, [rax+8] mov rcx, [rbp+var_10] imul eax, [rcx+14h] mov eax, eax add rdi, rax mov eax, [rbp+var_1C] mov rcx, [rbp+var_10] sub eax, [rcx+8] mov rcx, [rbp+var_10] imul eax, [rcx+14h] mov eax, eax mov edx, eax xor esi, esi call _memset mov ecx, [rbp+var_1C] add ecx, 1 mov rax, [rbp+var_10] mov [rax+8], ecx loc_DC34A: mov rax, [rbp+var_10] mov rdi, [rax] mov eax, [rbp+var_1C] mov rcx, [rbp+var_10] imul eax, [rcx+14h] mov eax, eax add rdi, rax mov rsi, [rbp+var_18] mov rax, [rbp+var_10] mov eax, [rax+14h] mov edx, eax call _memcpy mov [rbp+var_1], 0 loc_DC377: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char set_dynamic(long long a1, long long a2, unsigned int a3) { if ( a3 < *(_DWORD *)(a1 + 8) ) goto LABEL_6; if ( a3 < *(_DWORD *)(a1 + 12) || !(unsigned __int8)allocate_dynamic(a1, a3) ) { memset( (unsigned int)(*(_DWORD *)(a1 + 20) * *(_DWORD *)(a1 + 8)) + *(_QWORD *)a1, 0LL, *(_DWORD *)(a1 + 20) * (a3 - *(_DWORD *)(a1 + 8))); *(_DWORD *)(a1 + 8) = a3 + 1; LABEL_6: memcpy(*(_DWORD *)(a1 + 20) * a3 + *(_QWORD *)a1, a2, *(unsigned int *)(a1 + 20)); return 0; } return 1; }
set_dynamic: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV EAX,dword ptr [RBP + -0x1c] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x8] JC 0x001dc34a MOV EAX,dword ptr [RBP + -0x1c] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0xc] JC 0x001dc305 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x1c] CALL 0x001dc380 MOVSX EAX,AL CMP EAX,0x0 JZ 0x001dc305 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001dc377 LAB_001dc305: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX ADD RDI,RAX MOV EAX,dword ptr [RBP + -0x1c] MOV RCX,qword ptr [RBP + -0x10] SUB EAX,dword ptr [RCX + 0x8] MOV RCX,qword ptr [RBP + -0x10] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX MOV EDX,EAX XOR ESI,ESI CALL 0x0012a2a0 MOV ECX,dword ptr [RBP + -0x1c] ADD ECX,0x1 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x8],ECX LAB_001dc34a: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV EAX,dword ptr [RBP + -0x1c] MOV RCX,qword ptr [RBP + -0x10] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x14] MOV EDX,EAX CALL 0x0012a090 MOV byte ptr [RBP + -0x1],0x0 LAB_001dc377: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 set_dynamic(long *param_1,void *param_2,uint param_3) { char cVar1; if (*(uint *)(param_1 + 1) <= param_3) { if ((*(uint *)((long)param_1 + 0xc) <= param_3) && (cVar1 = allocate_dynamic(param_1), cVar1 != '\0')) { return 1; } memset((void *)(*param_1 + (ulong)(uint)((int)param_1[1] * *(int *)((long)param_1 + 0x14))),0, (ulong)((param_3 - (int)param_1[1]) * *(int *)((long)param_1 + 0x14))); *(uint *)(param_1 + 1) = param_3 + 1; } memcpy((void *)(*param_1 + (ulong)(param_3 * *(int *)((long)param_1 + 0x14))),param_2, (ulong)*(uint *)((long)param_1 + 0x14)); return 0; }
33,769
nlohmann::json_abi_v3_11_3::detail::serializer<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>>::~serializer()
hkr04[P]cpp-mcp/common/json.hpp
~serializer() = default;
O3
cpp
nlohmann::json_abi_v3_11_3::detail::serializer<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>>::~serializer(): pushq %rbx movq %rdi, %rbx movq 0x260(%rdi), %rdi leaq 0x270(%rbx), %rax cmpq %rax, %rdi je 0xdf68 movq (%rax), %rsi incq %rsi callq 0x8580 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0xdf77 popq %rbx jmp 0xb7b0 popq %rbx retq nop
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEED2Ev: push rbx mov rbx, rdi mov rdi, [rdi+260h]; void * lea rax, [rbx+270h] cmp rdi, rax jz short loc_DF68 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_DF68: mov rdi, [rbx+8] test rdi, rdi jz short loc_DF77 pop rbx jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_DF77: pop rbx retn
void nlohmann::json_abi_v3_11_3::detail::serializer<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>>::~serializer( _QWORD *a1) { _QWORD *v2; // rdi volatile signed __int32 *v3; // rdi v2 = (_QWORD *)a1[76]; if ( v2 != a1 + 78 ) operator delete(v2, a1[78] + 1LL); v3 = (volatile signed __int32 *)a1[1]; if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); }
~serializer: PUSH RBX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x260] LEA RAX,[RBX + 0x270] CMP RDI,RAX JZ 0x0010df68 MOV RSI,qword ptr [RAX] INC RSI CALL 0x00108580 LAB_0010df68: MOV RDI,qword ptr [RBX + 0x8] TEST RDI,RDI JZ 0x0010df77 POP RBX JMP 0x0010b7b0 LAB_0010df77: POP RBX RET
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::~serializer() */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::~serializer(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this) { if (*(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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 + 0x260) != this + 0x270) { operator_delete(*(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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 + 0x260),*(long *)(this + 0x270) + 1); } if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 8) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 8)); return; } return; }
33,770
ggml_compute_forward_norm
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp
void ggml_compute_forward_norm( const ggml_compute_params * params, ggml_tensor * dst) { const ggml_tensor * src0 = dst->src[0]; switch (src0->type) { case GGML_TYPE_F32: { ggml_compute_forward_norm_f32(params, dst); } break; default: { GGML_ABORT("fatal error"); } } }
O3
cpp
ggml_compute_forward_norm: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x118, %rsp # imm = 0x118 movq 0x98(%rsi), %rbx cmpl $0x0, (%rbx) jne 0x38372 movq %rdi, %r15 movq %rbx, %rdi movq %rsi, 0x58(%rsp) callq 0xaf20 testb %al, %al je 0x3838c cmpq $0x4, 0x30(%rbx) jne 0x383a8 movq 0x58(%rsp), %rsi vmovss 0x54(%rsi), %xmm3 vxorps %xmm0, %xmm0, %xmm0 vucomiss %xmm0, %xmm3 jb 0x383c4 movq %rbx, %rdi movq 0x28(%rbx), %rax movq %rax, 0x78(%rsp) testq %rax, %rax jle 0x3835d movslq (%r15), %rcx movslq 0x4(%r15), %r8 movq 0x10(%rdi), %rbp movq 0x18(%rdi), %r9 movq 0x20(%rdi), %rax movq %rax, 0x40(%rsp) movq 0x38(%rdi), %r10 movq 0x40(%rdi), %rax movq %rax, 0x80(%rsp) movq 0x48(%rdi), %rax movq %rax, 0x70(%rsp) movq 0x38(%rsi), %r11 vcvtsi2sd %rbp, %xmm1, %xmm4 movl %ebp, %ebx andl $-0x40, %ebx movslq %ebx, %rdx movslq %ebp, %r15 leaq 0x1(%rdx), %rax cmpq %r15, %rax cmovgq %rax, %r15 subq %rdx, %r15 leaq -0x1(%r15), %rax vpbroadcastq %rax, %zmm5 movq %r10, %rax imulq %rcx, %rax movq %rax, 0x8(%rsp) imulq %r8, %r10 movq %r11, %rax movq %rcx, 0x50(%rsp) imulq %rcx, %rax movq %rax, 0x38(%rsp) movq %r11, %r13 imulq %r8, %r13 addq $0x7, %r15 andq $-0x8, %r15 shlq $0x2, %rdx movq %rdx, 0x90(%rsp) vmovss 0x10044(%rip), %xmm6 # 0x480a0 vxorps %xmm7, %xmm7, %xmm7 vpmovsxbq 0x10eb6(%rip), %zmm8 # 0x48f20 movq 0x40(%rsi), %rax movq %rax, 0x48(%rsp) movq 0x48(%rsi), %rax movq %rax, 0x30(%rsp) movq $0x0, (%rsp) vmovss %xmm3, 0x2c(%rsp) movq %r8, 0xb8(%rsp) movq %r9, 0xb0(%rsp) movq %r10, 0xa8(%rsp) movq %r11, 0xa0(%rsp) vmovsd %xmm4, 0x98(%rsp) vmovdqu64 %zmm5, 0xd0(%rsp) movq %r13, 0x88(%rsp) cmpq $0x0, 0x40(%rsp) jle 0x3832e movq (%rsp), %rax imulq 0x30(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x18(%rsp) movq $0x0, 0x10(%rsp) cmpq 0x50(%rsp), %r9 jle 0x382f5 movq 0x10(%rsp), %rax imulq 0x48(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x20(%rsp), %rdx movq 0x18(%rsp), %rcx movq 0x50(%rsp), %r14 testq %rbp, %rbp movq %rdx, 0xc8(%rsp) movq %rcx, 0xc0(%rsp) jle 0x381ae movq 0xf8(%rdi), %rax addq %rcx, %rax vxorps %xmm0, %xmm0, %xmm0 xorl %ecx, %ecx vcvtss2sd (%rax,%rcx,4), %xmm9, %xmm1 vaddsd %xmm1, %xmm0, %xmm0 incq %rcx cmpq %rcx, %rbp jne 0x3814d vdivsd %xmm4, %xmm0, %xmm0 vcvtsd2ss %xmm0, %xmm0, %xmm0 movq 0xf8(%rsi), %rcx movq %r14, %r12 imulq %r11, %r12 addq 0x68(%rsp), %r12 addq 0x60(%rsp), %r12 addq %rcx, %r12 addq %rdx, %rcx vxorpd %xmm1, %xmm1, %xmm1 xorl %edx, %edx vmovss (%rax,%rdx,4), %xmm2 vsubss %xmm0, %xmm2, %xmm2 vmovss %xmm2, (%rcx,%rdx,4) vmulss %xmm2, %xmm2, %xmm2 vcvtss2sd %xmm2, %xmm2, %xmm2 vaddsd %xmm2, %xmm1, %xmm1 incq %rdx cmpq %rdx, %rbp jne 0x3818a jmp 0x381d0 movq %r14, %r12 imulq %r11, %r12 addq 0xf8(%rsi), %r12 movq 0x60(%rsp), %rax movq 0x68(%rsp), %rcx addq %rcx, %rax addq %rax, %r12 vxorpd %xmm1, %xmm1, %xmm1 vdivsd %xmm4, %xmm1, %xmm0 vcvtsd2ss %xmm0, %xmm0, %xmm0 vaddss %xmm0, %xmm3, %xmm0 vucomiss %xmm7, %xmm0 jb 0x381e8 vsqrtss %xmm0, %xmm0, %xmm0 jmp 0x38253 movq %rdi, %r13 vzeroupper callq 0xb090 vpmovsxbq 0x10d23(%rip), %zmm8 # 0x48f20 vxorps %xmm7, %xmm7, %xmm7 vmovss 0xfe97(%rip), %xmm6 # 0x480a0 vmovdqu64 0xd0(%rsp), %zmm5 vmovsd 0x98(%rsp), %xmm4 movq 0xa0(%rsp), %r11 movq 0xa8(%rsp), %r10 movq 0xb0(%rsp), %r9 movq 0xb8(%rsp), %r8 vmovss 0x2c(%rsp), %xmm3 movq %r13, %rdi movq 0x88(%rsp), %r13 movq 0x58(%rsp), %rsi vdivss %xmm0, %xmm6, %xmm0 testl %ebx, %ebx jle 0x38292 vbroadcastss %xmm0, %zmm1 movq %r12, %rax xorl %ecx, %ecx xorl %edx, %edx vmulps (%rax,%rdx), %zmm1, %zmm2 vmovups %zmm2, (%rax,%rdx) addq $0x40, %rdx cmpq $0x100, %rdx # imm = 0x100 jne 0x38268 addq $0x40, %rcx addq $0x100, %rax # imm = 0x100 cmpq %rbx, %rcx jb 0x38266 cmpl %ebp, %ebx je 0x382d3 vbroadcastss %xmm0, %ymm0 addq 0x90(%rsp), %r12 xorl %eax, %eax vpbroadcastq %rax, %zmm1 vporq %zmm8, %zmm1, %zmm1 vpcmpleuq %zmm5, %zmm1, %k1 vmovups (%r12,%rax,4), %ymm1 {%k1} {z} vmulps %ymm1, %ymm0, %ymm1 vmovups %ymm1, (%r12,%rax,4) {%k1} addq $0x8, %rax cmpq %rax, %r15 jne 0x382a5 addq %r8, %r14 movq 0xc0(%rsp), %rcx addq %r10, %rcx movq 0xc8(%rsp), %rdx addq %r13, %rdx cmpq %r9, %r14 jl 0x38128 movq 0x10(%rsp), %rcx incq %rcx movq 0x18(%rsp), %rax addq 0x80(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x20(%rsp), %rax addq 0x48(%rsp), %rax movq %rax, 0x20(%rsp) movq %rcx, 0x10(%rsp) cmpq 0x40(%rsp), %rcx jne 0x380fe movq (%rsp), %rcx incq %rcx movq 0x8(%rsp), %rax addq 0x70(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x30(%rsp), %rax addq %rax, 0x38(%rsp) movq %rcx, (%rsp) cmpq 0x78(%rsp), %rcx jne 0x380c6 addq $0x118, %rsp # imm = 0x118 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp vzeroupper retq leaq 0x1a727(%rip), %rdi # 0x52aa0 leaq 0x10300(%rip), %rdx # 0x48680 movl $0xc65, %esi # imm = 0xC65 xorl %eax, %eax callq 0xaf40 leaq 0x1a70d(%rip), %rdi # 0x52aa0 leaq 0x101d0(%rip), %rdx # 0x4856a leaq 0x1a012(%rip), %rcx # 0x523b3 movl $0xc2b, %esi # imm = 0xC2B jmp 0x383de leaq 0x1a6f1(%rip), %rdi # 0x52aa0 leaq 0x101b4(%rip), %rdx # 0x4856a leaq 0x1abf6(%rip), %rcx # 0x52fb3 movl $0xc2d, %esi # imm = 0xC2D jmp 0x383de leaq 0x1a6d5(%rip), %rdi # 0x52aa0 leaq 0x10198(%rip), %rdx # 0x4856a leaq 0x1ad60(%rip), %rcx # 0x53139 movl $0xc37, %esi # imm = 0xC37 xorl %eax, %eax callq 0xaf40
ggml_compute_forward_norm: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 118h mov rbx, [rsi+98h] cmp dword ptr [rbx], 0 jnz loc_38372 mov r15, rdi mov rdi, rbx mov [rsp+148h+var_F0], rsi call _ggml_are_same_shape test al, al jz loc_3838C cmp qword ptr [rbx+30h], 4 jnz loc_383A8 mov rsi, [rsp+148h+var_F0] vmovss xmm3, dword ptr [rsi+54h] vxorps xmm0, xmm0, xmm0 vucomiss xmm3, xmm0 jb loc_383C4 mov rdi, rbx mov rax, [rbx+28h] mov [rsp+148h+var_D0], rax test rax, rax jle loc_3835D movsxd rcx, dword ptr [r15] movsxd r8, dword ptr [r15+4] mov rbp, [rdi+10h] mov r9, [rdi+18h] mov rax, [rdi+20h] mov [rsp+148h+var_108], rax mov r10, [rdi+38h] mov rax, [rdi+40h] mov [rsp+148h+var_C8], rax mov rax, [rdi+48h] mov [rsp+148h+var_D8], rax mov r11, [rsi+38h] vcvtsi2sd xmm4, xmm1, rbp mov ebx, ebp and ebx, 0FFFFFFC0h movsxd rdx, ebx movsxd r15, ebp lea rax, [rdx+1] cmp rax, r15 cmovg r15, rax sub r15, rdx lea rax, [r15-1] vpbroadcastq zmm5, rax mov rax, r10 imul rax, rcx mov [rsp+148h+var_140], rax imul r10, r8 mov rax, r11 mov [rsp+148h+var_F8], rcx imul rax, rcx mov [rsp+148h+var_110], rax mov r13, r11 imul r13, r8 add r15, 7 and r15, 0FFFFFFFFFFFFFFF8h shl rdx, 2 mov [rsp+148h+var_B8], rdx vmovss xmm6, cs:dword_480A0 vxorps xmm7, xmm7, xmm7 vpmovsxbq zmm8, cs:qword_48F20 mov rax, [rsi+40h] mov [rsp+148h+var_100], rax mov rax, [rsi+48h] mov [rsp+148h+var_118], rax mov [rsp+148h+var_148], 0 vmovss [rsp+148h+var_11C], xmm3 mov [rsp+148h+var_90], r8 mov [rsp+148h+var_98], r9 mov [rsp+148h+var_A0], r10 mov [rsp+148h+var_A8], r11 vmovsd [rsp+148h+var_B0], xmm4 vmovdqu64 zmmword ptr [rsp+148h+var_78], zmm5 mov [rsp+148h+var_C0], r13 loc_380C6: cmp [rsp+148h+var_108], 0 jle loc_3832E mov rax, [rsp+148h+var_148] imul rax, [rsp+148h+var_118] mov [rsp+148h+var_E8], rax mov rax, [rsp+148h+var_110] mov [rsp+148h+var_128], rax mov rax, [rsp+148h+var_140] mov [rsp+148h+var_130], rax mov [rsp+148h+var_138], 0 loc_380FE: cmp r9, [rsp+148h+var_F8] jle loc_382F5 mov rax, [rsp+148h+var_138] imul rax, [rsp+148h+var_100] mov [rsp+148h+var_E0], rax mov rdx, [rsp+148h+var_128] mov rcx, [rsp+148h+var_130] mov r14, [rsp+148h+var_F8] loc_38128: test rbp, rbp mov [rsp+148h+var_80], rdx mov [rsp+148h+var_88], rcx jle short loc_381AE mov rax, [rdi+0F8h] add rax, rcx vxorps xmm0, xmm0, xmm0 xor ecx, ecx loc_3814D: vcvtss2sd xmm1, xmm9, dword ptr [rax+rcx*4] vaddsd xmm0, xmm0, xmm1 inc rcx cmp rbp, rcx jnz short loc_3814D vdivsd xmm0, xmm0, xmm4 vcvtsd2ss xmm0, xmm0, xmm0 mov rcx, [rsi+0F8h] mov r12, r14 imul r12, r11 add r12, [rsp+148h+var_E0] add r12, [rsp+148h+var_E8] add r12, rcx add rcx, rdx vxorpd xmm1, xmm1, xmm1 xor edx, edx loc_3818A: vmovss xmm2, dword ptr [rax+rdx*4] vsubss xmm2, xmm2, xmm0 vmovss dword ptr [rcx+rdx*4], xmm2 vmulss xmm2, xmm2, xmm2 vcvtss2sd xmm2, xmm2, xmm2 vaddsd xmm1, xmm1, xmm2 inc rdx cmp rbp, rdx jnz short loc_3818A jmp short loc_381D0 loc_381AE: mov r12, r14 imul r12, r11 add r12, [rsi+0F8h] mov rax, [rsp+148h+var_E8] mov rcx, [rsp+148h+var_E0] add rax, rcx add r12, rax vxorpd xmm1, xmm1, xmm1 loc_381D0: vdivsd xmm0, xmm1, xmm4 vcvtsd2ss xmm0, xmm0, xmm0 vaddss xmm0, xmm3, xmm0 vucomiss xmm0, xmm7 jb short loc_381E8 vsqrtss xmm0, xmm0, xmm0 jmp short loc_38253 loc_381E8: mov r13, rdi vzeroupper call _sqrtf vpmovsxbq zmm8, cs:qword_48F20 vxorps xmm7, xmm7, xmm7 vmovss xmm6, cs:dword_480A0 vmovdqu64 zmm5, zmmword ptr [rsp+148h+var_78] vmovsd xmm4, [rsp+148h+var_B0] mov r11, [rsp+148h+var_A8] mov r10, [rsp+148h+var_A0] mov r9, [rsp+148h+var_98] mov r8, [rsp+148h+var_90] vmovss xmm3, [rsp+148h+var_11C] mov rdi, r13 mov r13, [rsp+148h+var_C0] mov rsi, [rsp+148h+var_F0] loc_38253: vdivss xmm0, xmm6, xmm0 test ebx, ebx jle short loc_38292 vbroadcastss zmm1, xmm0 mov rax, r12 xor ecx, ecx loc_38266: xor edx, edx loc_38268: vmulps zmm2, zmm1, zmmword ptr [rax+rdx] vmovups zmmword ptr [rax+rdx], zmm2 add rdx, 40h ; '@' cmp rdx, 100h jnz short loc_38268 add rcx, 40h ; '@' add rax, 100h cmp rcx, rbx jb short loc_38266 loc_38292: cmp ebx, ebp jz short loc_382D3 vbroadcastss ymm0, xmm0 add r12, [rsp+148h+var_B8] xor eax, eax loc_382A5: vpbroadcastq zmm1, rax vporq zmm1, zmm1, zmm8 vpcmpleuq k1, zmm1, zmm5 vmovups ymm1{k1}{z}, ymmword ptr [r12+rax*4] vmulps ymm1, ymm0, ymm1 vmovups ymmword ptr [r12+rax*4]{k1}, ymm1 add rax, 8 cmp r15, rax jnz short loc_382A5 loc_382D3: add r14, r8 mov rcx, [rsp+148h+var_88] add rcx, r10 mov rdx, [rsp+148h+var_80] add rdx, r13 cmp r14, r9 jl loc_38128 loc_382F5: mov rcx, [rsp+148h+var_138] inc rcx mov rax, [rsp+148h+var_130] add rax, [rsp+148h+var_C8] mov [rsp+148h+var_130], rax mov rax, [rsp+148h+var_128] add rax, [rsp+148h+var_100] mov [rsp+148h+var_128], rax mov [rsp+148h+var_138], rcx cmp rcx, [rsp+148h+var_108] jnz loc_380FE loc_3832E: mov rcx, [rsp+148h+var_148] inc rcx mov rax, [rsp+148h+var_140] add rax, [rsp+148h+var_D8] mov [rsp+148h+var_140], rax mov rax, [rsp+148h+var_118] add [rsp+148h+var_110], rax mov [rsp+148h+var_148], rcx cmp rcx, [rsp+148h+var_D0] jnz loc_380C6 loc_3835D: add rsp, 118h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp vzeroupper retn loc_38372: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aFatalError; "fatal error" mov esi, 0C65h xor eax, eax call _ggml_abort loc_3838C: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlCanRepeatS+1Fh; "ggml_are_same_shape(src0, dst)" mov esi, 0C2Bh jmp short loc_383DE loc_383A8: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSrc0Nb0SizeofF; "src0->nb[0] == sizeof(float)" mov esi, 0C2Dh jmp short loc_383DE loc_383C4: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aEps00f; "eps >= 0.0f" mov esi, 0C37h loc_383DE: xor eax, eax call _ggml_abort
long long ggml_compute_forward_norm( int *a1, _QWORD *_RSI, __m128 _XMM0, __m128 _XMM1, double a5, double a6, double a7, double a8, double a9, __m128 _XMM7) { long long v11; // rbx long long v15; // rdi long long result; // rax long long v17; // rcx long long v18; // r8 long long v19; // rbp long long v20; // r9 long long v21; // r10 long long v22; // r11 unsigned long long v24; // rbx long long v25; // r15 long long v26; // r15 long long v29; // r10 long long v30; // r13 unsigned long long v31; // r15 long long v35; // rdx long long v36; // rcx long long v37; // r14 long long j; // rcx long long v44; // rcx long long v45; // r12 bool v52; // cf long long v53; // r12 unsigned long long k; // rcx long long v73; // [rsp+0h] [rbp-148h] long long v74; // [rsp+8h] [rbp-140h] long long i; // [rsp+10h] [rbp-138h] long long v76; // [rsp+18h] [rbp-130h] long long v77; // [rsp+20h] [rbp-128h] long long v79; // [rsp+30h] [rbp-118h] long long v80; // [rsp+38h] [rbp-110h] long long v81; // [rsp+40h] [rbp-108h] long long v82; // [rsp+48h] [rbp-100h] long long v83; // [rsp+50h] [rbp-F8h] _QWORD *v84; // [rsp+58h] [rbp-F0h] long long v85; // [rsp+60h] [rbp-E8h] long long v86; // [rsp+68h] [rbp-E0h] long long v87; // [rsp+70h] [rbp-D8h] long long v88; // [rsp+78h] [rbp-D0h] long long v89; // [rsp+80h] [rbp-C8h] long long v90; // [rsp+88h] [rbp-C0h] long long v92; // [rsp+A0h] [rbp-A8h] long long v93; // [rsp+A8h] [rbp-A0h] long long v94; // [rsp+B0h] [rbp-98h] long long v95; // [rsp+B8h] [rbp-90h] long long v96; // [rsp+C0h] [rbp-88h] long long v97; // [rsp+C8h] [rbp-80h] v11 = _RSI[19]; if ( *(_DWORD *)v11 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp", 3173LL, "fatal error"); goto LABEL_36; } v84 = _RSI; if ( !(unsigned __int8)ggml_are_same_shape(_RSI[19], _RSI) ) { LABEL_36: ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp", 3115LL, "GGML_ASSERT(%s) failed", "ggml_are_same_shape(src0, dst)"); return ggml_compute_forward_rms_norm(); } if ( *(_QWORD *)(v11 + 48) != 4LL ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp", 3117LL, "GGML_ASSERT(%s) failed", "src0->nb[0] == sizeof(float)"); return ggml_compute_forward_rms_norm(); } __asm { vmovss xmm3, dword ptr [rsi+54h] vxorps xmm0, xmm0, xmm0 vucomiss xmm3, xmm0 } if ( *(_QWORD *)(v11 + 48) < 4uLL ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp", 3127LL, "GGML_ASSERT(%s) failed", "eps >= 0.0f"); return ggml_compute_forward_rms_norm(); } v15 = v11; result = *(_QWORD *)(v11 + 40); v88 = result; if ( result > 0 ) { v17 = *a1; v18 = a1[1]; v19 = *(_QWORD *)(v11 + 16); v20 = *(_QWORD *)(v11 + 24); v81 = *(_QWORD *)(v11 + 32); v21 = *(_QWORD *)(v11 + 56); v89 = *(_QWORD *)(v11 + 64); v87 = *(_QWORD *)(v11 + 72); v22 = _RSI[7]; __asm { vcvtsi2sd xmm4, xmm1, rbp } v24 = (unsigned int)v19 & 0xFFFFFFC0; v25 = (int)v19; if ( (int)(v19 & 0xFFFFFFC0) + 1LL > (int)v19 ) v25 = (int)v24 + 1LL; v26 = v25 - (int)v24; _RAX = v26 - 1; __asm { vpbroadcastq zmm5, rax } v74 = v17 * v21; v29 = v18 * v21; v83 = v17; v80 = v17 * v22; v30 = v18 * v22; v31 = (v26 + 7) & 0xFFFFFFFFFFFFFFF8LL; __asm { vmovss xmm6, cs:dword_480A0 vxorps xmm7, xmm7, xmm7 vpmovsxbq zmm8, cs:qword_48F20 } v82 = _RSI[8]; v79 = _RSI[9]; v73 = 0LL; __asm { vmovss [rsp+148h+var_11C], xmm3 } v95 = v18; v94 = v20; v93 = v29; v92 = _RSI[7]; __asm { vmovsd [rsp+148h+var_B0], xmm4 vmovdqu64 zmmword ptr [rsp+148h+var_78], zmm5 } v90 = v18 * v22; do { if ( v81 > 0 ) { v85 = v79 * v73; v77 = v80; v76 = v74; for ( i = 0LL; i != v81; ++i ) { if ( v20 > v83 ) { v86 = v82 * i; v35 = v77; v36 = v76; v37 = v83; do { v97 = v35; v96 = v36; if ( v19 <= 0 ) { v53 = _RSI[31] + v22 * v37; v52 = __CFADD__(v86 + v85, v53); v45 = v86 + v85 + v53; __asm { vxorpd xmm1, xmm1, xmm1 } } else { _RAX = v36 + *(_QWORD *)(v15 + 248); __asm { vxorps xmm0, xmm0, xmm0 } for ( j = 0LL; j != v19; ++j ) { __asm { vcvtss2sd xmm1, xmm9, dword ptr [rax+rcx*4] vaddsd xmm0, xmm0, xmm1 } } __asm { vdivsd xmm0, xmm0, xmm4 vcvtsd2ss xmm0, xmm0, xmm0 } v44 = _RSI[31]; v45 = v44 + v85 + v86 + v22 * v37; _RCX = v35 + v44; __asm { vxorpd xmm1, xmm1, xmm1 } for ( _RDX = 0LL; _RDX != v19; v52 = v19 < _RDX ) { __asm { vmovss xmm2, dword ptr [rax+rdx*4] vsubss xmm2, xmm2, xmm0 vmovss dword ptr [rcx+rdx*4], xmm2 vmulss xmm2, xmm2, xmm2 vcvtss2sd xmm2, xmm2, xmm2 vaddsd xmm1, xmm1, xmm2 } ++_RDX; } } __asm { vdivsd xmm0, xmm1, xmm4 vcvtsd2ss xmm0, xmm0, xmm0 vaddss xmm0, xmm3, xmm0 vucomiss xmm0, xmm7 } if ( v52 ) { __asm { vzeroupper } sqrtf(); __asm { vpmovsxbq zmm8, cs:qword_48F20 vxorps xmm7, xmm7, xmm7 vmovss xmm6, cs:dword_480A0 vmovdqu64 zmm5, zmmword ptr [rsp+148h+var_78] vmovsd xmm4, [rsp+148h+var_B0] } v22 = v92; v29 = v93; v20 = v94; v18 = v95; __asm { vmovss xmm3, [rsp+148h+var_11C] } v30 = v90; _RSI = v84; } else { __asm { vsqrtss xmm0, xmm0, xmm0 } } __asm { vdivss xmm0, xmm6, xmm0 } if ( (int)v24 > 0 ) { __asm { vbroadcastss zmm1, xmm0 } _RAX = v45; for ( k = 0LL; k < v24; k += 64LL ) { for ( _RDX = 0LL; _RDX != 256; _RDX += 64LL ) { __asm { vmulps zmm2, zmm1, zmmword ptr [rax+rdx] vmovups zmmword ptr [rax+rdx], zmm2 } } _RAX += 256LL; } } if ( (_DWORD)v24 != (_DWORD)v19 ) { __asm { vbroadcastss ymm0, xmm0 } _R12 = 4LL * (int)v24 + v45; _RAX = 0LL; do { __asm { vpbroadcastq zmm1, rax vporq zmm1, zmm1, zmm8 vpcmpleuq k1, zmm1, zmm5 vmovups ymm1{k1}{z}, ymmword ptr [r12+rax*4] vmulps ymm1, ymm0, ymm1 vmovups ymmword ptr [r12+rax*4]{k1}, ymm1 } _RAX += 8LL; } while ( v31 != _RAX ); } v37 += v18; v36 = v29 + v96; v35 = v30 + v97; } while ( v37 < v20 ); } v76 += v89; v77 += v82; } } v74 += v87; result = v79; v80 += v79; ++v73; } while ( v73 != v88 ); } __asm { vzeroupper } return result; }
ggml_compute_forward_norm: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x118 MOV RBX,qword ptr [RSI + 0x98] CMP dword ptr [RBX],0x0 JNZ 0x00138372 MOV R15,RDI MOV RDI,RBX MOV qword ptr [RSP + 0x58],RSI CALL 0x0010af20 TEST AL,AL JZ 0x0013838c CMP qword ptr [RBX + 0x30],0x4 JNZ 0x001383a8 MOV RSI,qword ptr [RSP + 0x58] VMOVSS XMM3,dword ptr [RSI + 0x54] VXORPS XMM0,XMM0,XMM0 VUCOMISS XMM3,XMM0 JC 0x001383c4 MOV RDI,RBX MOV RAX,qword ptr [RBX + 0x28] MOV qword ptr [RSP + 0x78],RAX TEST RAX,RAX JLE 0x0013835d MOVSXD RCX,dword ptr [R15] MOVSXD R8,dword ptr [R15 + 0x4] MOV RBP,qword ptr [RDI + 0x10] MOV R9,qword ptr [RDI + 0x18] MOV RAX,qword ptr [RDI + 0x20] MOV qword ptr [RSP + 0x40],RAX MOV R10,qword ptr [RDI + 0x38] MOV RAX,qword ptr [RDI + 0x40] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RDI + 0x48] MOV qword ptr [RSP + 0x70],RAX MOV R11,qword ptr [RSI + 0x38] VCVTSI2SD XMM4,XMM1,RBP MOV EBX,EBP AND EBX,0xffffffc0 MOVSXD RDX,EBX MOVSXD R15,EBP LEA RAX,[RDX + 0x1] CMP RAX,R15 CMOVG R15,RAX SUB R15,RDX LEA RAX,[R15 + -0x1] VPBROADCASTQ ZMM5 MOV RAX,R10 IMUL RAX,RCX MOV qword ptr [RSP + 0x8],RAX IMUL R10,R8 MOV RAX,R11 MOV qword ptr [RSP + 0x50],RCX IMUL RAX,RCX MOV qword ptr [RSP + 0x38],RAX MOV R13,R11 IMUL R13,R8 ADD R15,0x7 AND R15,-0x8 SHL RDX,0x2 MOV qword ptr [RSP + 0x90],RDX VMOVSS XMM6,dword ptr [0x001480a0] VXORPS XMM7,XMM7,XMM7 VPMOVSXBQ ZMM8,qword ptr [0x00148f20] MOV RAX,qword ptr [RSI + 0x40] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSI + 0x48] MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP],0x0 VMOVSS dword ptr [RSP + 0x2c],XMM3 MOV qword ptr [RSP + 0xb8],R8 MOV qword ptr [RSP + 0xb0],R9 MOV qword ptr [RSP + 0xa8],R10 MOV qword ptr [RSP + 0xa0],R11 VMOVSD qword ptr [RSP + 0x98],XMM4 VMOVDQU64 zmmword ptr [RSP + 0xd0],ZMM5 MOV qword ptr [RSP + 0x88],R13 LAB_001380c6: CMP qword ptr [RSP + 0x40],0x0 JLE 0x0013832e MOV RAX,qword ptr [RSP] IMUL RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x10],0x0 LAB_001380fe: CMP R9,qword ptr [RSP + 0x50] JLE 0x001382f5 MOV RAX,qword ptr [RSP + 0x10] IMUL RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x68],RAX MOV RDX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x18] MOV R14,qword ptr [RSP + 0x50] LAB_00138128: TEST RBP,RBP MOV qword ptr [RSP + 0xc8],RDX MOV qword ptr [RSP + 0xc0],RCX JLE 0x001381ae MOV RAX,qword ptr [RDI + 0xf8] ADD RAX,RCX VXORPS XMM0,XMM0,XMM0 XOR ECX,ECX LAB_0013814d: VCVTSS2SD XMM1,XMM9,dword ptr [RAX + RCX*0x4] VADDSD XMM0,XMM0,XMM1 INC RCX CMP RBP,RCX JNZ 0x0013814d VDIVSD XMM0,XMM0,XMM4 VCVTSD2SS XMM0,XMM0,XMM0 MOV RCX,qword ptr [RSI + 0xf8] MOV R12,R14 IMUL R12,R11 ADD R12,qword ptr [RSP + 0x68] ADD R12,qword ptr [RSP + 0x60] ADD R12,RCX ADD RCX,RDX VXORPD XMM1,XMM1,XMM1 XOR EDX,EDX LAB_0013818a: VMOVSS XMM2,dword ptr [RAX + RDX*0x4] VSUBSS XMM2,XMM2,XMM0 VMOVSS dword ptr [RCX + RDX*0x4],XMM2 VMULSS XMM2,XMM2,XMM2 VCVTSS2SD XMM2,XMM2,XMM2 VADDSD XMM1,XMM1,XMM2 INC RDX CMP RBP,RDX JNZ 0x0013818a JMP 0x001381d0 LAB_001381ae: MOV R12,R14 IMUL R12,R11 ADD R12,qword ptr [RSI + 0xf8] MOV RAX,qword ptr [RSP + 0x60] MOV RCX,qword ptr [RSP + 0x68] ADD RAX,RCX ADD R12,RAX VXORPD XMM1,XMM1,XMM1 LAB_001381d0: VDIVSD XMM0,XMM1,XMM4 VCVTSD2SS XMM0,XMM0,XMM0 VADDSS XMM0,XMM3,XMM0 VUCOMISS XMM0,XMM7 JC 0x001381e8 VSQRTSS XMM0,XMM0,XMM0 JMP 0x00138253 LAB_001381e8: MOV R13,RDI VZEROUPPER CALL 0x0010b090 VPMOVSXBQ ZMM8,qword ptr [0x00148f20] VXORPS XMM7,XMM7,XMM7 VMOVSS XMM6,dword ptr [0x001480a0] VMOVDQU64 ZMM5,zmmword ptr [RSP + 0xd0] VMOVSD XMM4,qword ptr [RSP + 0x98] MOV R11,qword ptr [RSP + 0xa0] MOV R10,qword ptr [RSP + 0xa8] MOV R9,qword ptr [RSP + 0xb0] MOV R8,qword ptr [RSP + 0xb8] VMOVSS XMM3,dword ptr [RSP + 0x2c] MOV RDI,R13 MOV R13,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x58] LAB_00138253: VDIVSS XMM0,XMM6,XMM0 TEST EBX,EBX JLE 0x00138292 VBROADCASTSS ZMM1,XMM0 MOV RAX,R12 XOR ECX,ECX LAB_00138266: XOR EDX,EDX LAB_00138268: VMULPS ZMM2,ZMM1,zmmword ptr [RAX + RDX*0x1] VMOVUPS zmmword ptr [RAX + RDX*0x1],ZMM2 ADD RDX,0x40 CMP RDX,0x100 JNZ 0x00138268 ADD RCX,0x40 ADD RAX,0x100 CMP RCX,RBX JC 0x00138266 LAB_00138292: CMP EBX,EBP JZ 0x001382d3 VBROADCASTSS YMM0,XMM0 ADD R12,qword ptr [RSP + 0x90] XOR EAX,EAX LAB_001382a5: VPBROADCASTQ ZMM1 VPORQ ZMM1,ZMM1,ZMM8 VPCMPUQ K1 {K0},ZMM1,ZMM5,0x2 VMOVUPS YMM1{K1}{z},ymmword ptr [R12 + RAX*0x4] VMULPS YMM1,YMM0,YMM1 VMOVUPS ymmword ptr [R12 + RAX*0x4] {K1},YMM1 ADD RAX,0x8 CMP R15,RAX JNZ 0x001382a5 LAB_001382d3: ADD R14,R8 MOV RCX,qword ptr [RSP + 0xc0] ADD RCX,R10 MOV RDX,qword ptr [RSP + 0xc8] ADD RDX,R13 CMP R14,R9 JL 0x00138128 LAB_001382f5: MOV RCX,qword ptr [RSP + 0x10] INC RCX MOV RAX,qword ptr [RSP + 0x18] ADD RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x20] ADD RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x10],RCX CMP RCX,qword ptr [RSP + 0x40] JNZ 0x001380fe LAB_0013832e: MOV RCX,qword ptr [RSP] INC RCX MOV RAX,qword ptr [RSP + 0x8] ADD RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x30] ADD qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP],RCX CMP RCX,qword ptr [RSP + 0x78] JNZ 0x001380c6 LAB_0013835d: ADD RSP,0x118 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP VZEROUPPER RET LAB_00138372: LEA RDI,[0x152aa0] LEA RDX,[0x148680] MOV ESI,0xc65 XOR EAX,EAX CALL 0x0010af40 LAB_0013838c: LEA RDI,[0x152aa0] LEA RDX,[0x14856a] LEA RCX,[0x1523b3] MOV ESI,0xc2b JMP 0x001383de LAB_001383a8: LEA RDI,[0x152aa0] LEA RDX,[0x14856a] LEA RCX,[0x152fb3] MOV ESI,0xc2d JMP 0x001383de LAB_001383c4: LEA RDI,[0x152aa0] LEA RDX,[0x14856a] LEA RCX,[0x153139] MOV ESI,0xc37 LAB_001383de: XOR EAX,EAX CALL 0x0010af40
void ggml_compute_forward_norm(int *param_1,long param_2) { int *piVar1; uint *puVar2; float fVar3; int1 auVar4 [64]; int1 auVar5 [16]; int1 auVar6 [16]; int *piVar7; long lVar8; long lVar9; long lVar10; long lVar11; long lVar12; long lVar13; long lVar14; long lVar15; long lVar16; long lVar17; bool bVar18; bool bVar19; bool bVar20; bool bVar21; bool bVar22; bool bVar23; bool bVar24; bool bVar25; int iVar26; int iVar27; int iVar28; int iVar29; int iVar30; int iVar31; int iVar32; char cVar33; long lVar34; long lVar35; long lVar36; long lVar37; long lVar38; ulong uVar39; long lVar40; char *pcVar41; long lVar42; long lVar43; long lVar44; long lVar45; uint uVar46; uint uVar47; int8 uVar48; long lVar49; long lVar50; long lVar51; byte in_K0; ulong uVar52; int1 auVar53 [64]; int1 auVar54 [64]; int1 auVar55 [64]; float fVar56; double dVar57; int1 auVar58 [16]; double dVar59; int1 auVar60 [64]; int1 auVar61 [64]; long local_148; long local_140; long local_138; long local_130; long local_128; long local_110; piVar7 = *(int **)(param_2 + 0x98); if (*piVar7 != 0) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp" ,0xc65,"fatal error"); } cVar33 = ggml_are_same_shape(piVar7); if (cVar33 == '\0') { pcVar41 = "ggml_are_same_shape(src0, dst)"; uVar48 = 0xc2b; } else if (*(long *)(piVar7 + 0xc) == 4) { fVar3 = *(float *)(param_2 + 0x54); if (0.0 <= fVar3) { lVar8 = *(long *)(piVar7 + 10); if (0 < lVar8) { lVar37 = (long)*param_1; lVar49 = (long)param_1[1]; lVar9 = *(long *)(piVar7 + 4); lVar10 = *(long *)(piVar7 + 6); lVar11 = *(long *)(piVar7 + 8); lVar12 = *(long *)(piVar7 + 0xe); lVar13 = *(long *)(piVar7 + 0x10); lVar14 = *(long *)(piVar7 + 0x12); lVar15 = *(long *)(param_2 + 0x38); uVar47 = (uint)lVar9; uVar46 = uVar47 & 0xffffffc0; lVar42 = (long)(int)uVar46; lVar51 = (long)(int)uVar47; if ((long)(int)uVar47 < lVar42 + 1) { lVar51 = lVar42 + 1; } auVar53 = vpbroadcastq_avx512f(); local_140 = lVar12 * lVar37; local_110 = lVar15 * lVar37; auVar61 = ZEXT464(DAT_001480a0); auVar5._8_8_ = 0; auVar5._0_8_ = DAT_00148f20; auVar54 = vpmovsxbq_avx512f(auVar5); lVar16 = *(long *)(param_2 + 0x40); lVar17 = *(long *)(param_2 + 0x48); local_148 = 0; auVar4 = vmovdqu64_avx512f(auVar53); do { if (0 < lVar11) { lVar34 = local_148 * lVar17; local_128 = local_110; local_130 = local_140; local_138 = 0; do { if (lVar37 < lVar10) { lVar35 = local_138 * lVar16; lVar40 = local_130; lVar45 = local_128; lVar50 = lVar37; do { if (lVar9 < 1) { lVar38 = lVar50 * lVar15 + *(long *)(param_2 + 0xf8) + lVar34 + lVar35; dVar59 = 0.0; } else { lVar36 = *(long *)(piVar7 + 0x3e); dVar57 = 0.0; lVar38 = 0; do { dVar57 = dVar57 + (double)*(float *)(lVar36 + lVar40 + lVar38 * 4); lVar38 = lVar38 + 1; } while (lVar9 != lVar38); lVar44 = *(long *)(param_2 + 0xf8); lVar38 = lVar50 * lVar15 + lVar35 + lVar34 + lVar44; auVar60 = ZEXT1664(ZEXT816(0)); lVar43 = 0; do { fVar56 = *(float *)(lVar36 + lVar40 + lVar43 * 4) - (float)(dVar57 / (double)lVar9); *(float *)(lVar44 + lVar45 + lVar43 * 4) = fVar56; dVar59 = auVar60._0_8_ + (double)(fVar56 * fVar56); auVar60 = ZEXT864((ulong)dVar59); lVar43 = lVar43 + 1; } while (lVar9 != lVar43); } fVar56 = fVar3 + (float)(dVar59 / (double)lVar9); if (fVar56 < 0.0) { fVar56 = sqrtf(fVar56); auVar6._8_8_ = 0; auVar6._0_8_ = DAT_00148f20; auVar54 = vpmovsxbq_avx512f(auVar6); auVar61 = ZEXT464(DAT_001480a0); auVar53 = vmovdqu64_avx512f(auVar4); } else { auVar5 = vsqrtss_avx(ZEXT416((uint)fVar56),ZEXT416((uint)fVar56)); fVar56 = auVar5._0_4_; } auVar58._0_4_ = auVar61._0_4_ / fVar56; auVar58._4_12_ = auVar61._4_12_; if (0 < (int)uVar46) { auVar60 = vbroadcastss_avx512f(auVar58); uVar39 = 0; lVar36 = lVar38; do { lVar44 = 0; do { auVar55 = vmulps_avx512f(auVar60,*(int1 (*) [64])(lVar36 + lVar44)); *(int1 (*) [64])(lVar36 + lVar44) = auVar55; lVar44 = lVar44 + 0x40; } while (lVar44 != 0x100); uVar39 = uVar39 + 0x40; lVar36 = lVar36 + 0x100; } while (uVar39 < uVar46); } if (uVar46 != uVar47) { lVar38 = lVar38 + lVar42 * 4; uVar39 = 0; do { auVar60 = vpbroadcastq_avx512f(); auVar60 = vporq_avx512f(auVar60,auVar54); uVar52 = vpcmpuq_avx512f(auVar60,auVar53,2); uVar52 = in_K0 & uVar52; piVar1 = (int *)(lVar38 + uVar39 * 4); iVar26 = piVar1[1]; iVar27 = piVar1[2]; iVar28 = piVar1[3]; iVar29 = piVar1[4]; iVar30 = piVar1[5]; iVar31 = piVar1[6]; iVar32 = piVar1[7]; puVar2 = (uint *)(lVar38 + uVar39 * 4); bVar18 = (bool)((byte)uVar52 & 1); bVar19 = (bool)((byte)(uVar52 >> 1) & 1); bVar20 = (bool)((byte)(uVar52 >> 2) & 1); bVar21 = (bool)((byte)(uVar52 >> 3) & 1); bVar22 = (bool)((byte)(uVar52 >> 4) & 1); bVar23 = (bool)((byte)(uVar52 >> 5) & 1); bVar24 = (bool)((byte)(uVar52 >> 6) & 1); bVar25 = SUB81(uVar52 >> 7,0); *puVar2 = (uint)bVar18 * (int)(auVar58._0_4_ * (float)((uint)((byte)uVar52 & 1) * *piVar1)) | (uint)!bVar18 * *puVar2; puVar2[1] = (uint)bVar19 * (int)(auVar58._0_4_ * (float)((uint)((byte)(uVar52 >> 1) & 1) * iVar26)) | (uint)!bVar19 * puVar2[1]; puVar2[2] = (uint)bVar20 * (int)(auVar58._0_4_ * (float)((uint)((byte)(uVar52 >> 2) & 1) * iVar27)) | (uint)!bVar20 * puVar2[2]; puVar2[3] = (uint)bVar21 * (int)(auVar58._0_4_ * (float)((uint)((byte)(uVar52 >> 3) & 1) * iVar28)) | (uint)!bVar21 * puVar2[3]; puVar2[4] = (uint)bVar22 * (int)(auVar58._0_4_ * (float)((uint)((byte)(uVar52 >> 4) & 1) * iVar29)) | (uint)!bVar22 * puVar2[4]; puVar2[5] = (uint)bVar23 * (int)(auVar58._0_4_ * (float)((uint)((byte)(uVar52 >> 5) & 1) * iVar30)) | (uint)!bVar23 * puVar2[5]; puVar2[6] = (uint)bVar24 * (int)(auVar58._0_4_ * (float)((uint)((byte)(uVar52 >> 6) & 1) * iVar31)) | (uint)!bVar24 * puVar2[6]; puVar2[7] = (uint)bVar25 * (uint)(byte)(uVar52 >> 7) * iVar32 | (uint)!bVar25 * puVar2[7]; uVar39 = uVar39 + 8; } while (((lVar51 - lVar42) + 7U & 0xfffffffffffffff8) != uVar39); } lVar50 = lVar50 + lVar49; lVar40 = lVar40 + lVar12 * lVar49; lVar45 = lVar45 + lVar15 * lVar49; } while (lVar50 < lVar10); } local_138 = local_138 + 1; local_130 = local_130 + lVar13; local_128 = local_128 + lVar16; } while (local_138 != lVar11); } local_148 = local_148 + 1; local_140 = local_140 + lVar14; local_110 = local_110 + lVar17; } while (local_148 != lVar8); } return; } pcVar41 = "eps >= 0.0f"; uVar48 = 0xc37; } else { pcVar41 = "src0->nb[0] == sizeof(float)"; uVar48 = 0xc2d; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp", uVar48,"GGML_ASSERT(%s) failed",pcVar41); }
33,771
OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::initFaceNeighborhoodTopology(int, OpenSubdiv::v3_6_0::Bfr::FaceTopology*) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surfaceFactory.cpp
bool SurfaceFactory::initFaceNeighborhoodTopology(Index faceIndex, FaceTopology * faceTopologyPtr) const { FaceTopology & topology = *faceTopologyPtr; if (!gatherFaceNeighborhoodTopology(faceIndex, &topology)) { return false; } if (!topology.HasUnOrderedCorners()) { return true; } // Gather the indices to determine topology between unordered faces: typedef Vtr::internal::StackBuffer<Index,72,true> IndexBuffer; IndexBuffer indices(topology._numFaceVertsTotal); if (gatherFaceNeighborhoodIndices(faceIndex, topology, 0, indices) < 0) { return false; } topology.ResolveUnOrderedCorners(indices); return true; }
O1
cpp
OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::initFaceNeighborhoodTopology(int, OpenSubdiv::v3_6_0::Bfr::FaceTopology*) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x148, %rsp # imm = 0x148 movq %rdx, %rbx movq %rdi, %r14 movl %esi, 0x4(%rsp) callq 0x3b890 testb %al, %al je 0x9db40 movb $0x1, %r15b testb $0x1, 0x15(%rbx) je 0x9db74 movl 0x10(%rbx), %r15d leaq 0x20(%rsp), %rax movq %rax, -0x10(%rax) movl %r15d, -0x8(%rax) movl $0x48, -0x4(%rax) movq $0x0, 0x120(%rax) cmpq $0x49, %r15 jb 0x9daea movq %r15, %rdi shlq $0x2, %rdi callq 0x3a230 movq %rax, 0x140(%rsp) movq %rax, 0x10(%rsp) movl %r15d, 0x1c(%rsp) movslq 0x8(%rbx), %rax movq %rax, 0x8(%rsp) testq %rax, %rax jle 0x9db45 xorl %r15d, %r15d movl $0xa0, %r13d movq 0x10(%rsp), %r12 xorl %ebp, %ebp movq (%r14), %rax movq %r14, %rdi movl 0x4(%rsp), %esi movl %r15d, %edx movq %r12, %rcx callq *0x38(%rax) movq 0x18(%rbx), %rcx cmpl (%rcx,%r13), %eax jne 0x9db4a addl %eax, %ebp cltq leaq (%r12,%rax,4), %r12 incq %r15 addq $0xe0, %r13 cmpq %r15, 0x8(%rsp) jne 0x9db08 jmp 0x9db4f xorl %r15d, %r15d jmp 0x9db74 movb $0x1, %r15b jmp 0x9db55 movl $0xffffffff, %ebp # imm = 0xFFFFFFFF testl %ebp, %ebp setns %r15b testb %r15b, %r15b je 0x9db67 movq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x39750 movq 0x140(%rsp), %rdi callq 0x3a0c0 movl %r15d, %eax addq $0x148, %rsp # imm = 0x148 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x9db8b movq %rax, %rbx movq 0x140(%rsp), %rdi callq 0x3a0c0 movq %rbx, %rdi callq 0x3bd70 nop
_ZNK10OpenSubdiv6v3_6_03Bfr14SurfaceFactory28initFaceNeighborhoodTopologyEiPNS1_12FaceTopologyE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 148h mov rbx, rdx mov r14, rdi mov [rsp+178h+var_174], esi call __ZNK10OpenSubdiv6v3_6_03Bfr14SurfaceFactory30gatherFaceNeighborhoodTopologyEiPNS1_12FaceTopologyE; OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::gatherFaceNeighborhoodTopology(int,OpenSubdiv::v3_6_0::Bfr::FaceTopology *) test al, al jz loc_9DB40 mov r15b, 1 test byte ptr [rbx+15h], 1 jz loc_9DB74 mov r15d, [rbx+10h] lea rax, [rsp+178h+var_158] mov [rax-10h], rax mov [rax-8], r15d mov dword ptr [rax-4], 48h ; 'H' mov qword ptr [rax+120h], 0 cmp r15, 49h ; 'I' jb short loc_9DAEA mov rdi, r15 shl rdi, 2; unsigned __int64 call __Znwm; operator new(ulong) mov [rsp+178h+var_38], rax mov [rsp+178h+var_168], rax mov [rsp+178h+var_15C], r15d loc_9DAEA: movsxd rax, dword ptr [rbx+8] mov [rsp+178h+var_170], rax test rax, rax jle short loc_9DB45 xor r15d, r15d mov r13d, 0A0h mov r12, [rsp+178h+var_168] xor ebp, ebp loc_9DB08: mov rax, [r14] mov rdi, r14 mov esi, [rsp+178h+var_174] mov edx, r15d mov rcx, r12 call qword ptr [rax+38h] mov rcx, [rbx+18h] cmp eax, [rcx+r13] jnz short loc_9DB4A add ebp, eax cdqe lea r12, [r12+rax*4] inc r15 add r13, 0E0h cmp [rsp+178h+var_170], r15 jnz short loc_9DB08 jmp short loc_9DB4F loc_9DB40: xor r15d, r15d jmp short loc_9DB74 loc_9DB45: mov r15b, 1 jmp short loc_9DB55 loc_9DB4A: mov ebp, 0FFFFFFFFh loc_9DB4F: test ebp, ebp setns r15b loc_9DB55: test r15b, r15b jz short loc_9DB67 mov rsi, [rsp+178h+var_168]; int * mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Bfr12FaceTopology23ResolveUnOrderedCornersEPKi; OpenSubdiv::v3_6_0::Bfr::FaceTopology::ResolveUnOrderedCorners(int const*) loc_9DB67: mov rdi, [rsp+178h+var_38]; void * call __ZdlPv; operator delete(void *) loc_9DB74: mov eax, r15d add rsp, 148h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_9DB8B: mov rbx, rax mov rdi, [rsp+arg_138]; void * call __ZdlPv; operator delete(void *) mov rdi, rbx call __Unwind_Resume
long long OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::initFaceNeighborhoodTopology( OpenSubdiv::v3_6_0::Bfr::SurfaceFactory *this, unsigned int a2, OpenSubdiv::v3_6_0::Bfr::FaceTopology *a3) { unsigned long long v3; // r15 long long v5; // r13 int *v6; // r12 int v7; // ebp int v8; // eax long long v10; // [rsp+8h] [rbp-170h] int *v11; // [rsp+10h] [rbp-168h] char v12; // [rsp+20h] [rbp-158h] BYREF void *v13; // [rsp+140h] [rbp-38h] if ( (unsigned __int8)OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::gatherFaceNeighborhoodTopology(this, a2, a3) ) { LOBYTE(v3) = 1; if ( (*((_BYTE *)a3 + 21) & 1) != 0 ) { v3 = *((unsigned int *)a3 + 4); v11 = (int *)&v12; v13 = 0LL; if ( v3 >= 0x49 ) { v13 = (void *)operator new(4 * v3); v11 = (int *)v13; } v10 = *((int *)a3 + 2); if ( v10 <= 0 ) { LOBYTE(v3) = 1; } else { v3 = 0LL; v5 = 160LL; v6 = v11; v7 = 0; while ( 1 ) { v8 = (*(long long ( **)(OpenSubdiv::v3_6_0::Bfr::SurfaceFactory *, _QWORD, _QWORD, int *))(*(_QWORD *)this + 56LL))( this, a2, (unsigned int)v3, v6); if ( v8 != *(_DWORD *)(*((_QWORD *)a3 + 3) + v5) ) break; v7 += v8; v6 += v8; ++v3; v5 += 224LL; if ( v10 == v3 ) goto LABEL_13; } v7 = -1; LABEL_13: LOBYTE(v3) = v7 >= 0; } if ( (_BYTE)v3 ) OpenSubdiv::v3_6_0::Bfr::FaceTopology::ResolveUnOrderedCorners(a3, v11); operator delete(v13); } } else { LODWORD(v3) = 0; } return (unsigned int)v3; }
initFaceNeighborhoodTopology: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x148 MOV RBX,RDX MOV R14,RDI MOV dword ptr [RSP + 0x4],ESI CALL 0x0013b890 TEST AL,AL JZ 0x0019db40 MOV R15B,0x1 TEST byte ptr [RBX + 0x15],0x1 JZ 0x0019db74 MOV R15D,dword ptr [RBX + 0x10] LEA RAX,[RSP + 0x20] MOV qword ptr [RAX + -0x10],RAX MOV dword ptr [RAX + -0x8],R15D MOV dword ptr [RAX + -0x4],0x48 MOV qword ptr [RAX + 0x120],0x0 CMP R15,0x49 JC 0x0019daea MOV RDI,R15 SHL RDI,0x2 CALL 0x0013a230 MOV qword ptr [RSP + 0x140],RAX MOV qword ptr [RSP + 0x10],RAX MOV dword ptr [RSP + 0x1c],R15D LAB_0019daea: MOVSXD RAX,dword ptr [RBX + 0x8] MOV qword ptr [RSP + 0x8],RAX TEST RAX,RAX JLE 0x0019db45 XOR R15D,R15D MOV R13D,0xa0 MOV R12,qword ptr [RSP + 0x10] XOR EBP,EBP LAB_0019db08: MOV RAX,qword ptr [R14] LAB_0019db0b: MOV RDI,R14 MOV ESI,dword ptr [RSP + 0x4] MOV EDX,R15D MOV RCX,R12 CALL qword ptr [RAX + 0x38] MOV RCX,qword ptr [RBX + 0x18] CMP EAX,dword ptr [RCX + R13*0x1] JNZ 0x0019db4a ADD EBP,EAX CDQE LEA R12,[R12 + RAX*0x4] INC R15 ADD R13,0xe0 CMP qword ptr [RSP + 0x8],R15 JNZ 0x0019db08 JMP 0x0019db4f LAB_0019db40: XOR R15D,R15D JMP 0x0019db74 LAB_0019db45: MOV R15B,0x1 JMP 0x0019db55 LAB_0019db4a: MOV EBP,0xffffffff LAB_0019db4f: TEST EBP,EBP SETNS R15B LAB_0019db55: TEST R15B,R15B JZ 0x0019db67 MOV RSI,qword ptr [RSP + 0x10] LAB_0019db5f: MOV RDI,RBX CALL 0x00139750 LAB_0019db67: MOV RDI,qword ptr [RSP + 0x140] CALL 0x0013a0c0 LAB_0019db74: MOV EAX,R15D ADD RSP,0x148 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::initFaceNeighborhoodTopology(int, OpenSubdiv::v3_6_0::Bfr::FaceTopology*) const */ ulong __thiscall OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::initFaceNeighborhoodTopology (SurfaceFactory *this,int param_1,FaceTopology *param_2) { uint uVar1; int iVar2; char cVar3; int iVar4; int iVar5; int *piVar6; long lVar7; int8 unaff_R15; ulong uVar8; int *local_168; int local_158 [72]; int *local_38; cVar3 = gatherFaceNeighborhoodTopology(this,param_1,param_2); if (cVar3 == '\0') { uVar8 = 0; } else { uVar8 = CONCAT71((int7)((ulong)unaff_R15 >> 8),1); if (((byte)param_2[0x15] & 1) != 0) { uVar1 = *(uint *)(param_2 + 0x10); local_168 = local_158; local_38 = (int *)0x0; if (0x48 < (ulong)uVar1) { local_168 = (int *)operator_new((ulong)uVar1 << 2); local_38 = local_168; } iVar2 = *(int *)(param_2 + 8); if ((long)iVar2 < 1) { uVar8 = CONCAT71((uint7)(uint3)(uVar1 >> 8),1); } else { uVar8 = 0; lVar7 = 0xa0; iVar5 = 0; piVar6 = local_168; do { /* try { // try from 0019db0b to 0019db1a has its CatchHandler @ 0019db8b */ iVar4 = (**(code **)(*(long *)this + 0x38))(this,param_1,uVar8 & 0xffffffff,piVar6); if (iVar4 != *(int *)(*(long *)(param_2 + 0x18) + lVar7)) { iVar5 = -1; break; } iVar5 = iVar5 + iVar4; piVar6 = piVar6 + iVar4; uVar8 = uVar8 + 1; lVar7 = lVar7 + 0xe0; } while ((long)iVar2 != uVar8); uVar8 = CONCAT71((int7)(uVar8 >> 8),-1 < iVar5); } if ((char)uVar8 != '\0') { /* try { // try from 0019db5f to 0019db66 has its CatchHandler @ 0019db89 */ FaceTopology::ResolveUnOrderedCorners(param_2,local_168); } operator_delete(local_38); } } return uVar8 & 0xffffffff; }
33,772
OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::initFaceNeighborhoodTopology(int, OpenSubdiv::v3_6_0::Bfr::FaceTopology*) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surfaceFactory.cpp
bool SurfaceFactory::initFaceNeighborhoodTopology(Index faceIndex, FaceTopology * faceTopologyPtr) const { FaceTopology & topology = *faceTopologyPtr; if (!gatherFaceNeighborhoodTopology(faceIndex, &topology)) { return false; } if (!topology.HasUnOrderedCorners()) { return true; } // Gather the indices to determine topology between unordered faces: typedef Vtr::internal::StackBuffer<Index,72,true> IndexBuffer; IndexBuffer indices(topology._numFaceVertsTotal); if (gatherFaceNeighborhoodIndices(faceIndex, topology, 0, indices) < 0) { return false; } topology.ResolveUnOrderedCorners(indices); return true; }
O3
cpp
OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::initFaceNeighborhoodTopology(int, OpenSubdiv::v3_6_0::Bfr::FaceTopology*) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x148, %rsp # imm = 0x148 movq %rdx, %rbx movq %rdi, %r14 movl %esi, 0x4(%rsp) callq 0x3b850 testb %al, %al je 0xa0661 movb $0x1, %r12b testb $0x1, 0x15(%rbx) je 0xa0676 movl 0x10(%rbx), %r12d leaq 0x20(%rsp), %r15 movq %r15, -0x10(%r15) movl %r12d, -0x8(%r15) movl $0x48, -0x4(%r15) movq $0x0, 0x120(%r15) cmpq $0x49, %r12 jb 0xa05f8 movq %r12, %rdi shlq $0x2, %rdi callq 0x3a210 movq %rax, %r15 movq %rax, 0x140(%rsp) movq %rax, 0x10(%rsp) movl %r12d, 0x1c(%rsp) movslq 0x8(%rbx), %rax movq %rax, 0x8(%rsp) testq %rax, %rax jle 0xa0651 xorl %r12d, %r12d movl $0xa0, %ebp xorl %r13d, %r13d movq (%r14), %rax movq %r14, %rdi movl 0x4(%rsp), %esi movl %r12d, %edx movq %r15, %rcx callq *0x38(%rax) movq 0x18(%rbx), %rcx cmpl (%rcx,%rbp), %eax jne 0xa0666 addl %eax, %r13d cltq leaq (%r15,%rax,4), %r15 incq %r12 addq $0xe0, %rbp cmpq %r12, 0x8(%rsp) jne 0xa0611 testl %r13d, %r13d js 0xa0666 movq 0x10(%rsp), %r15 movb $0x1, %r12b movq %rbx, %rdi movq %r15, %rsi callq 0x39730 jmp 0xa0669 xorl %r12d, %r12d jmp 0xa0676 xorl %r12d, %r12d movq 0x140(%rsp), %rdi callq 0x3a0a0 movl %r12d, %eax addq $0x148, %rsp # imm = 0x148 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xa068d movq %rax, %rbx movq 0x140(%rsp), %rdi callq 0x3a0a0 movq %rbx, %rdi callq 0x3bd30 nop
_ZNK10OpenSubdiv6v3_6_03Bfr14SurfaceFactory28initFaceNeighborhoodTopologyEiPNS1_12FaceTopologyE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 148h mov rbx, rdx mov r14, rdi mov [rsp+178h+var_174], esi call __ZNK10OpenSubdiv6v3_6_03Bfr14SurfaceFactory30gatherFaceNeighborhoodTopologyEiPNS1_12FaceTopologyE; OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::gatherFaceNeighborhoodTopology(int,OpenSubdiv::v3_6_0::Bfr::FaceTopology *) test al, al jz loc_A0661 mov r12b, 1 test byte ptr [rbx+15h], 1 jz loc_A0676 mov r12d, [rbx+10h] lea r15, [rsp+178h+var_158] mov [r15-10h], r15 mov [r15-8], r12d mov dword ptr [r15-4], 48h ; 'H' mov qword ptr [r15+120h], 0 cmp r12, 49h ; 'I' jb short loc_A05F8 mov rdi, r12 shl rdi, 2; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax mov [rsp+178h+var_38], rax mov [rsp+178h+var_168], rax mov [rsp+178h+var_15C], r12d loc_A05F8: movsxd rax, dword ptr [rbx+8] mov [rsp+178h+var_170], rax test rax, rax jle short loc_A0651 xor r12d, r12d mov ebp, 0A0h xor r13d, r13d loc_A0611: mov rax, [r14] mov rdi, r14 mov esi, [rsp+178h+var_174] mov edx, r12d mov rcx, r15 call qword ptr [rax+38h] mov rcx, [rbx+18h] cmp eax, [rcx+rbp] jnz short loc_A0666 add r13d, eax cdqe lea r15, [r15+rax*4] inc r12 add rbp, 0E0h cmp [rsp+178h+var_170], r12 jnz short loc_A0611 test r13d, r13d js short loc_A0666 mov r15, [rsp+178h+var_168] loc_A0651: mov r12b, 1 mov rdi, rbx; this mov rsi, r15; int * call __ZN10OpenSubdiv6v3_6_03Bfr12FaceTopology23ResolveUnOrderedCornersEPKi; OpenSubdiv::v3_6_0::Bfr::FaceTopology::ResolveUnOrderedCorners(int const*) jmp short loc_A0669 loc_A0661: xor r12d, r12d jmp short loc_A0676 loc_A0666: xor r12d, r12d loc_A0669: mov rdi, [rsp+178h+var_38]; void * call __ZdlPv; operator delete(void *) loc_A0676: mov eax, r12d add rsp, 148h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_A068D: mov rbx, rax mov rdi, [rsp+arg_138]; void * call __ZdlPv; operator delete(void *) mov rdi, rbx call __Unwind_Resume
long long OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::initFaceNeighborhoodTopology( OpenSubdiv::v3_6_0::Bfr::SurfaceFactory *this, unsigned int a2, OpenSubdiv::v3_6_0::Bfr::FaceTopology *a3) { unsigned long long v3; // r12 int *v5; // r15 long long v6; // rbp int v7; // r13d int v8; // eax long long v10; // [rsp+8h] [rbp-170h] int *v11; // [rsp+10h] [rbp-168h] int v12[72]; // [rsp+20h] [rbp-158h] BYREF void *v13; // [rsp+140h] [rbp-38h] if ( (unsigned __int8)OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::gatherFaceNeighborhoodTopology(this, a2, a3) ) { LOBYTE(v3) = 1; if ( (*((_BYTE *)a3 + 21) & 1) != 0 ) { v3 = *((unsigned int *)a3 + 4); v5 = v12; v11 = v12; v13 = 0LL; if ( v3 >= 0x49 ) { v5 = (int *)operator new(4 * v3); v13 = v5; v11 = v5; } v10 = *((int *)a3 + 2); if ( v10 <= 0 ) { LABEL_11: LOBYTE(v3) = 1; OpenSubdiv::v3_6_0::Bfr::FaceTopology::ResolveUnOrderedCorners(a3, v5); } else { v3 = 0LL; v6 = 160LL; v7 = 0; while ( 1 ) { v8 = (*(long long ( **)(OpenSubdiv::v3_6_0::Bfr::SurfaceFactory *, _QWORD, _QWORD, int *))(*(_QWORD *)this + 56LL))( this, a2, (unsigned int)v3, v5); if ( v8 != *(_DWORD *)(*((_QWORD *)a3 + 3) + v6) ) break; v7 += v8; v5 += v8; ++v3; v6 += 224LL; if ( v10 == v3 ) { if ( v7 >= 0 ) { v5 = v11; goto LABEL_11; } break; } } LODWORD(v3) = 0; } operator delete(v13); } } else { LODWORD(v3) = 0; } return (unsigned int)v3; }
initFaceNeighborhoodTopology: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x148 MOV RBX,RDX MOV R14,RDI MOV dword ptr [RSP + 0x4],ESI CALL 0x0013b850 TEST AL,AL JZ 0x001a0661 MOV R12B,0x1 TEST byte ptr [RBX + 0x15],0x1 JZ 0x001a0676 MOV R12D,dword ptr [RBX + 0x10] LEA R15,[RSP + 0x20] MOV qword ptr [R15 + -0x10],R15 MOV dword ptr [R15 + -0x8],R12D MOV dword ptr [R15 + -0x4],0x48 MOV qword ptr [R15 + 0x120],0x0 CMP R12,0x49 JC 0x001a05f8 MOV RDI,R12 SHL RDI,0x2 CALL 0x0013a210 MOV R15,RAX MOV qword ptr [RSP + 0x140],RAX MOV qword ptr [RSP + 0x10],RAX MOV dword ptr [RSP + 0x1c],R12D LAB_001a05f8: MOVSXD RAX,dword ptr [RBX + 0x8] MOV qword ptr [RSP + 0x8],RAX TEST RAX,RAX JLE 0x001a0651 XOR R12D,R12D MOV EBP,0xa0 XOR R13D,R13D LAB_001a0611: MOV RAX,qword ptr [R14] LAB_001a0614: MOV RDI,R14 MOV ESI,dword ptr [RSP + 0x4] MOV EDX,R12D MOV RCX,R15 CALL qword ptr [RAX + 0x38] MOV RCX,qword ptr [RBX + 0x18] CMP EAX,dword ptr [RCX + RBP*0x1] JNZ 0x001a0666 ADD R13D,EAX CDQE LEA R15,[R15 + RAX*0x4] INC R12 ADD RBP,0xe0 CMP qword ptr [RSP + 0x8],R12 JNZ 0x001a0611 TEST R13D,R13D JS 0x001a0666 MOV R15,qword ptr [RSP + 0x10] LAB_001a0651: MOV R12B,0x1 LAB_001a0654: MOV RDI,RBX MOV RSI,R15 CALL 0x00139730 LAB_001a065f: JMP 0x001a0669 LAB_001a0661: XOR R12D,R12D JMP 0x001a0676 LAB_001a0666: XOR R12D,R12D LAB_001a0669: MOV RDI,qword ptr [RSP + 0x140] CALL 0x0013a0a0 LAB_001a0676: MOV EAX,R12D ADD RSP,0x148 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::initFaceNeighborhoodTopology(int, OpenSubdiv::v3_6_0::Bfr::FaceTopology*) const */ ulong __thiscall OpenSubdiv::v3_6_0::Bfr::SurfaceFactory::initFaceNeighborhoodTopology (SurfaceFactory *this,int param_1,FaceTopology *param_2) { int iVar1; char cVar2; int iVar3; int *piVar4; long lVar5; int8 unaff_R12; ulong uVar6; int iVar7; int *piVar8; int local_158 [72]; int *local_38; cVar2 = gatherFaceNeighborhoodTopology(this,param_1,param_2); if (cVar2 == '\0') { uVar6 = 0; goto LAB_001a0676; } uVar6 = CONCAT71((int7)((ulong)unaff_R12 >> 8),1); if (((byte)param_2[0x15] & 1) == 0) goto LAB_001a0676; uVar6 = (ulong)*(uint *)(param_2 + 0x10); piVar4 = local_158; local_38 = (int *)0x0; if (0x48 < uVar6) { piVar4 = (int *)operator_new(uVar6 << 2); local_38 = piVar4; } iVar1 = *(int *)(param_2 + 8); if ((long)iVar1 < 1) { LAB_001a0651: uVar6 = CONCAT71((int7)(uVar6 >> 8),1); /* try { // try from 001a0654 to 001a065e has its CatchHandler @ 001a068b */ FaceTopology::ResolveUnOrderedCorners(param_2,piVar4); } else { uVar6 = 0; lVar5 = 0xa0; iVar7 = 0; piVar8 = piVar4; do { /* try { // try from 001a0614 to 001a0623 has its CatchHandler @ 001a068d */ iVar3 = (**(code **)(*(long *)this + 0x38))(this,param_1,uVar6 & 0xffffffff,piVar8); if (iVar3 != *(int *)(*(long *)(param_2 + 0x18) + lVar5)) goto LAB_001a0666; iVar7 = iVar7 + iVar3; piVar8 = piVar8 + iVar3; uVar6 = uVar6 + 1; lVar5 = lVar5 + 0xe0; } while ((long)iVar1 != uVar6); if (-1 < iVar7) goto LAB_001a0651; LAB_001a0666: uVar6 = 0; } operator_delete(local_38); LAB_001a0676: return uVar6 & 0xffffffff; }
33,773
Bfree
eloqsql/strings/dtoa.c
static void Bfree(Bigint *v, Stack_alloc *alloc) { char *gptr= (char*) v; /* generic pointer */ if (gptr < alloc->begin || gptr >= alloc->end) free(gptr); else if (v->k <= Kmax) { /* Maintain free lists only for stack objects: this way we don't have to bother with freeing lists in the end of dtoa; heap should not be used normally anyway. */ v->p.next= alloc->freelist[v->k]; alloc->freelist[v->k]= v; } }
O0
c
Bfree: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx cmpq (%rcx), %rax jb 0xf1ba3 movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx cmpq 0x10(%rcx), %rax jb 0xf1bae movq -0x18(%rbp), %rdi callq 0x2a4a0 jmp 0xf1be7 movq -0x8(%rbp), %rax cmpl $0xf, 0x8(%rax) jg 0xf1be5 movq -0x10(%rbp), %rax movq -0x8(%rbp), %rcx movslq 0x8(%rcx), %rcx movq 0x18(%rax,%rcx,8), %rcx movq -0x8(%rbp), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rdx movq -0x10(%rbp), %rax movq -0x8(%rbp), %rcx movslq 0x8(%rcx), %rcx movq %rdx, 0x18(%rax,%rcx,8) jmp 0xf1be7 addq $0x20, %rsp popq %rbp retq nopl (%rax)
Bfree: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov rcx, [rbp+var_10] cmp rax, [rcx] jb short loc_F1BA3 mov rax, [rbp+var_18] mov rcx, [rbp+var_10] cmp rax, [rcx+10h] jb short loc_F1BAE loc_F1BA3: mov rdi, [rbp+var_18] call _free jmp short loc_F1BE7 loc_F1BAE: mov rax, [rbp+var_8] cmp dword ptr [rax+8], 0Fh jg short loc_F1BE5 mov rax, [rbp+var_10] mov rcx, [rbp+var_8] movsxd rcx, dword ptr [rcx+8] mov rcx, [rax+rcx*8+18h] mov rax, [rbp+var_8] mov [rax], rcx mov rdx, [rbp+var_8] mov rax, [rbp+var_10] mov rcx, [rbp+var_8] movsxd rcx, dword ptr [rcx+8] mov [rax+rcx*8+18h], rdx loc_F1BE5: jmp short $+2 loc_F1BE7: add rsp, 20h pop rbp retn
long long Bfree(unsigned long long a1, unsigned long long *a2) { long long result; // rax if ( a1 < *a2 || a1 >= a2[2] ) return free(a1); result = a1; if ( *(int *)(a1 + 8) <= 15 ) { *(_QWORD *)a1 = a2[*(int *)(a1 + 8) + 3]; result = (long long)a2; a2[*(int *)(a1 + 8) + 3] = a1; } return result; }
Bfree: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX] JC 0x001f1ba3 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x10] JC 0x001f1bae LAB_001f1ba3: MOV RDI,qword ptr [RBP + -0x18] CALL 0x0012a4a0 JMP 0x001f1be7 LAB_001f1bae: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x8],0xf JG 0x001f1be5 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RCX + 0x8] MOV RCX,qword ptr [RAX + RCX*0x8 + 0x18] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX MOV RDX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RCX + 0x8] MOV qword ptr [RAX + RCX*0x8 + 0x18],RDX LAB_001f1be5: JMP 0x001f1be7 LAB_001f1be7: ADD RSP,0x20 POP RBP RET
void Bfree(ulong *param_1,ulong *param_2) { if ((param_1 < (ulong *)*param_2) || ((ulong *)param_2[2] <= param_1)) { free(param_1); } else if ((int)param_1[1] < 0x10) { *param_1 = param_2[(long)(int)param_1[1] + 3]; param_2[(long)(int)param_1[1] + 3] = (ulong)param_1; } return; }
33,774
ma_ft_segiterator_init
eloqsql/storage/maria/ma_ft_update.c
void _ma_ft_segiterator_init(MARIA_HA *info, uint keynr, const uchar *record, FT_SEG_ITERATOR *ftsi) { DBUG_ENTER("_ma_ft_segiterator_init"); ftsi->num=info->s->keyinfo[keynr].keysegs; ftsi->seg=info->s->keyinfo[keynr].seg; ftsi->rec=record; ftsi->pos= 0; /* Avoid warnings from gcc */ ftsi->len= 0; /* Avoid warnings from gcc */ DBUG_VOID_RETURN; }
O3
c
ma_ft_segiterator_init: pushq %rbp movq %rsp, %rbp movq (%rdi), %rax movq 0x570(%rax), %rax movl %esi, %esi imulq $0x118, %rsi, %rsi # imm = 0x118 movzwl 0xa0(%rax,%rsi), %eax movl %eax, (%rcx) movq (%rdi), %rax movq 0x570(%rax), %rax movq 0xc0(%rax,%rsi), %rax movq %rax, 0x8(%rcx) movq %rdx, 0x10(%rcx) movq $0x0, 0x18(%rcx) movl $0x0, 0x4(%rcx) popq %rbp retq
_ma_ft_segiterator_init: push rbp mov rbp, rsp mov rax, [rdi] mov rax, [rax+570h] mov esi, esi imul rsi, 118h movzx eax, word ptr [rax+rsi+0A0h] mov [rcx], eax mov rax, [rdi] mov rax, [rax+570h] mov rax, [rax+rsi+0C0h] mov [rcx+8], rax mov [rcx+10h], rdx mov qword ptr [rcx+18h], 0 mov dword ptr [rcx+4], 0 pop rbp retn
long long ma_ft_segiterator_init(long long a1, unsigned int a2, long long a3, long long a4) { long long v4; // rsi long long result; // rax v4 = 280LL * a2; *(_DWORD *)a4 = *(unsigned __int16 *)(*(_QWORD *)(*(_QWORD *)a1 + 1392LL) + v4 + 160); result = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 1392LL) + v4 + 192); *(_QWORD *)(a4 + 8) = result; *(_QWORD *)(a4 + 16) = a3; *(_QWORD *)(a4 + 24) = 0LL; *(_DWORD *)(a4 + 4) = 0; return result; }
_ma_ft_segiterator_init: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x570] MOV ESI,ESI IMUL RSI,RSI,0x118 MOVZX EAX,word ptr [RAX + RSI*0x1 + 0xa0] MOV dword ptr [RCX],EAX MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x570] MOV RAX,qword ptr [RAX + RSI*0x1 + 0xc0] MOV qword ptr [RCX + 0x8],RAX MOV qword ptr [RCX + 0x10],RDX MOV qword ptr [RCX + 0x18],0x0 MOV dword ptr [RCX + 0x4],0x0 POP RBP RET
void _ma_ft_segiterator_init(long *param_1,uint param_2,int8 param_3,uint *param_4) { *param_4 = (uint)*(ushort *)(*(long *)(*param_1 + 0x570) + 0xa0 + (ulong)param_2 * 0x118); *(int8 *)(param_4 + 2) = *(int8 *)(*(long *)(*param_1 + 0x570) + 0xc0 + (ulong)param_2 * 0x118); *(int8 *)(param_4 + 4) = param_3; param_4[6] = 0; param_4[7] = 0; param_4[1] = 0; return; }
33,775
common_sampler_clone(common_sampler*)
monkey531[P]llama/common/sampling.cpp
struct common_sampler * common_sampler_clone(common_sampler * gsmpl) { return new common_sampler { /* .params = */ gsmpl->params, /* .grmr = */ llama_sampler_clone(gsmpl->grmr), /* .chain = */ llama_sampler_clone(gsmpl->chain), /* .prev = */ gsmpl->prev, /* .cur = */ gsmpl->cur, /* .cur_p = */ gsmpl->cur_p, }; }
O3
cpp
common_sampler_clone(common_sampler*): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %r14 movl $0x1b8, %edi # imm = 0x1B8 callq 0x1a870 movq %rax, %rbx movq %rax, %rdi movq %r14, %rsi callq 0x539c2 movq 0x138(%r14), %rdi callq 0x1a5e0 movq %rax, 0x138(%rbx) movq 0x140(%r14), %rdi callq 0x1a5e0 movq %rax, 0x140(%rbx) movups 0x148(%r14), %xmm0 movups 0x158(%r14), %xmm1 movups %xmm0, 0x148(%rbx) movups %xmm1, 0x158(%rbx) movl $0x168, %esi # imm = 0x168 leaq (%rbx,%rsi), %r15 addq %r14, %rsi movq %r15, %rdi callq 0x54008 movl $0x180, %esi # imm = 0x180 movq %rbx, %rdi addq %rsi, %rdi addq %r14, %rsi callq 0xcd968 movups 0x198(%r14), %xmm0 movups 0x1a8(%r14), %xmm1 movups %xmm1, 0x1a8(%rbx) movups %xmm0, 0x198(%rbx) movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq (%r15), %rdi testq %rdi, %rdi je 0xcc896 movq 0x178(%rbx), %rsi subq %rdi, %rsi callq 0x1a890 jmp 0xcc896 movq %rax, %r14 jmp 0xcc89e movq %rax, %r14 movq %rbx, %rdi callq 0x20e84 movl $0x1b8, %esi # imm = 0x1B8 movq %rbx, %rdi callq 0x1a890 movq %r14, %rdi callq 0x1af20
_Z20common_sampler_cloneP14common_sampler: push r15 push r14 push rbx mov r14, rdi mov edi, 1B8h; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax mov rdi, rax; this mov rsi, r14; common_params_sampling * call _ZN22common_params_samplingC2ERKS_; common_params_sampling::common_params_sampling(common_params_sampling const&) mov rdi, [r14+138h] call _llama_sampler_clone mov [rbx+138h], rax mov rdi, [r14+140h] call _llama_sampler_clone mov [rbx+140h], rax movups xmm0, xmmword ptr [r14+148h] movups xmm1, xmmword ptr [r14+158h] movups xmmword ptr [rbx+148h], xmm0 movups xmmword ptr [rbx+158h], xmm1 mov esi, 168h lea r15, [rbx+rsi] add rsi, r14 mov rdi, r15 call _ZNSt6vectorIiSaIiEEC2ERKS1_; std::vector<int>::vector(std::vector<int> const&) mov esi, 180h mov rdi, rbx add rdi, rsi add rsi, r14 call _ZNSt6vectorI16llama_token_dataSaIS0_EEC2ERKS2_; std::vector<llama_token_data>::vector(std::vector<llama_token_data> const&) movups xmm0, xmmword ptr [r14+198h] movups xmm1, xmmword ptr [r14+1A8h] movups xmmword ptr [rbx+1A8h], xmm1 movups xmmword ptr [rbx+198h], xmm0 mov rax, rbx pop rbx pop r14 pop r15 retn mov r14, rax mov rdi, [r15]; void * test rdi, rdi jz short loc_CC896 mov rsi, [rbx+178h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_CC896 mov r14, rax jmp short loc_CC89E mov r14, rax loc_CC896: mov rdi, rbx; this call _ZN22common_params_samplingD2Ev; common_params_sampling::~common_params_sampling() loc_CC89E: mov esi, 1B8h; unsigned __int64 mov rdi, rbx; void * call __ZdlPvm; operator delete(void *,ulong) mov rdi, r14 call __Unwind_Resume
long long common_sampler_clone(common_params_sampling *a1) { long long v1; // rbx __int128 v2; // xmm1 __int128 v3; // xmm0 v1 = operator new(0x1B8uLL); common_params_sampling::common_params_sampling((common_params_sampling *)v1, a1); *(_QWORD *)(v1 + 312) = llama_sampler_clone(*((_QWORD *)a1 + 39)); *(_QWORD *)(v1 + 320) = llama_sampler_clone(*((_QWORD *)a1 + 40)); v2 = *(_OWORD *)((char *)a1 + 344); *(_OWORD *)(v1 + 328) = *(_OWORD *)((char *)a1 + 328); *(_OWORD *)(v1 + 344) = v2; std::vector<int>::vector(v1 + 360, (long long *)a1 + 45); std::vector<llama_token_data>::vector(v1 + 384, (char *)a1 + 384); v3 = *(_OWORD *)((char *)a1 + 408); *(_OWORD *)(v1 + 424) = *(_OWORD *)((char *)a1 + 424); *(_OWORD *)(v1 + 408) = v3; return v1; }
common_sampler_clone: PUSH R15 PUSH R14 PUSH RBX MOV R14,RDI MOV EDI,0x1b8 CALL 0x0011a870 MOV RBX,RAX LAB_001cc7d5: MOV RDI,RAX MOV RSI,R14 CALL 0x001539c2 MOV RDI,qword ptr [R14 + 0x138] LAB_001cc7e7: CALL 0x0011a5e0 MOV qword ptr [RBX + 0x138],RAX MOV RDI,qword ptr [R14 + 0x140] CALL 0x0011a5e0 MOV qword ptr [RBX + 0x140],RAX MOVUPS XMM0,xmmword ptr [R14 + 0x148] MOVUPS XMM1,xmmword ptr [R14 + 0x158] MOVUPS xmmword ptr [RBX + 0x148],XMM0 MOVUPS xmmword ptr [RBX + 0x158],XMM1 MOV ESI,0x168 LEA R15,[RBX + RSI*0x1] ADD RSI,R14 MOV RDI,R15 CALL 0x00154008 MOV ESI,0x180 MOV RDI,RBX ADD RDI,RSI ADD RSI,R14 LAB_001cc846: CALL 0x001cd968 LAB_001cc84b: MOVUPS XMM0,xmmword ptr [R14 + 0x198] MOVUPS XMM1,xmmword ptr [R14 + 0x1a8] MOVUPS xmmword ptr [RBX + 0x1a8],XMM1 MOVUPS xmmword ptr [RBX + 0x198],XMM0 MOV RAX,RBX POP RBX POP R14 POP R15 RET
/* common_sampler_clone(common_sampler*) */ common_params_sampling * common_sampler_clone(common_sampler *param_1) { int8 uVar1; int8 uVar2; common_params_sampling *this; int8 uVar3; this = (common_params_sampling *)operator_new(0x1b8); /* try { // try from 001cc7d5 to 001cc7df has its CatchHandler @ 001cc88e */ common_params_sampling::common_params_sampling(this,(common_params_sampling *)param_1); /* try { // try from 001cc7e7 to 001cc837 has its CatchHandler @ 001cc893 */ uVar3 = llama_sampler_clone(*(int8 *)(param_1 + 0x138)); *(int8 *)(this + 0x138) = uVar3; uVar3 = llama_sampler_clone(*(int8 *)(param_1 + 0x140)); *(int8 *)(this + 0x140) = uVar3; uVar3 = *(int8 *)(param_1 + 0x150); uVar1 = *(int8 *)(param_1 + 0x158); uVar2 = *(int8 *)(param_1 + 0x160); *(int8 *)(this + 0x148) = *(int8 *)(param_1 + 0x148); *(int8 *)(this + 0x150) = uVar3; *(int8 *)(this + 0x158) = uVar1; *(int8 *)(this + 0x160) = uVar2; std::vector<int,std::allocator<int>>::vector ((vector<int,std::allocator<int>> *)(this + 0x168),(vector *)(param_1 + 0x168)); /* try { // try from 001cc846 to 001cc84a has its CatchHandler @ 001cc872 */ std::vector<llama_token_data,std::allocator<llama_token_data>>::vector ((vector<llama_token_data,std::allocator<llama_token_data>> *)(this + 0x180), (vector *)(param_1 + 0x180)); uVar3 = *(int8 *)(param_1 + 0x198); uVar1 = *(int8 *)(param_1 + 0x1a0); uVar2 = *(int8 *)(param_1 + 0x1b0); *(int8 *)(this + 0x1a8) = *(int8 *)(param_1 + 0x1a8); *(int8 *)(this + 0x1b0) = uVar2; *(int8 *)(this + 0x198) = uVar3; *(int8 *)(this + 0x1a0) = uVar1; return this; }
33,776
my_uni_utf16le
eloqsql/strings/ctype-ucs2.c
static int my_uni_utf16le(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { uint32 first, second, total; if (wc < MY_UTF16_SURROGATE_HIGH_FIRST || (wc > MY_UTF16_SURROGATE_LOW_LAST && wc <= 0xFFFF)) { if (s + 2 > e) return MY_CS_TOOSMALL2; int2store(s, wc); return 2; /* [0000-D7FF,E000-FFFF] */ } if (wc < 0xFFFF || wc > 0x10FFFF) return MY_CS_ILUNI; /* [D800-DFFF,10FFFF+] */ if (s + 4 > e) return MY_CS_TOOSMALL4; wc-= 0x10000; first= (0xD800 | ((wc >> 10) & 0x3FF)); second= (0xDC00 | (wc & 0x3FF)); total= first | (second << 16); int4store(s, total); return 4; /* [010000-10FFFF] */ }
O0
c
my_uni_utf16le: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) cmpq $0xd800, -0x18(%rbp) # imm = 0xD800 jb 0x5c8a2 cmpq $0xdfff, -0x18(%rbp) # imm = 0xDFFF jbe 0x5c8e0 cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF ja 0x5c8e0 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x5c8bc movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x5c972 jmp 0x5c8be movq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax movw %ax, %cx movq -0x40(%rbp), %rax movw %cx, (%rax) movl $0x2, -0x4(%rbp) jmp 0x5c972 cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF jb 0x5c8f4 cmpq $0x10ffff, -0x18(%rbp) # imm = 0x10FFFF jbe 0x5c8fd movl $0x0, -0x4(%rbp) jmp 0x5c972 movq -0x20(%rbp), %rax addq $0x4, %rax cmpq -0x28(%rbp), %rax jbe 0x5c914 movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98 jmp 0x5c972 movq -0x18(%rbp), %rax subq $0x10000, %rax # imm = 0x10000 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax shrq $0xa, %rax andq $0x3ff, %rax # imm = 0x3FF orq $0xd800, %rax # imm = 0xD800 movl %eax, -0x2c(%rbp) movq -0x18(%rbp), %rax andq $0x3ff, %rax # imm = 0x3FF orq $0xdc00, %rax # imm = 0xDC00 movl %eax, -0x30(%rbp) movl -0x2c(%rbp), %eax movl -0x30(%rbp), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, -0x34(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x48(%rbp) movl -0x34(%rbp), %ecx movq -0x48(%rbp), %rax movl %ecx, (%rax) movl $0x4, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
my_uni_utf16le: 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 cmp [rbp+var_18], 0D800h jb short loc_5C8A2 cmp [rbp+var_18], 0DFFFh jbe short loc_5C8E0 cmp [rbp+var_18], 0FFFFh ja short loc_5C8E0 loc_5C8A2: mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_5C8BC mov [rbp+var_4], 0FFFFFF9Ah jmp loc_5C972 loc_5C8BC: jmp short $+2 loc_5C8BE: mov rax, [rbp+var_20] mov [rbp+var_40], rax mov rax, [rbp+var_18] mov cx, ax mov rax, [rbp+var_40] mov [rax], cx mov [rbp+var_4], 2 jmp loc_5C972 loc_5C8E0: cmp [rbp+var_18], 0FFFFh jb short loc_5C8F4 cmp [rbp+var_18], offset unk_10FFFF jbe short loc_5C8FD loc_5C8F4: mov [rbp+var_4], 0 jmp short loc_5C972 loc_5C8FD: mov rax, [rbp+var_20] add rax, 4 cmp rax, [rbp+var_28] jbe short loc_5C914 mov [rbp+var_4], 0FFFFFF98h jmp short loc_5C972 loc_5C914: mov rax, [rbp+var_18] sub rax, 10000h mov [rbp+var_18], rax mov rax, [rbp+var_18] shr rax, 0Ah and rax, 3FFh or rax, 0D800h mov [rbp+var_2C], eax mov rax, [rbp+var_18] and rax, 3FFh or rax, 0DC00h mov [rbp+var_30], eax mov eax, [rbp+var_2C] mov ecx, [rbp+var_30] shl ecx, 10h or eax, ecx mov [rbp+var_34], eax mov rax, [rbp+var_20] mov [rbp+var_48], rax mov ecx, [rbp+var_34] mov rax, [rbp+var_48] mov [rax], ecx mov [rbp+var_4], 4 loc_5C972: mov eax, [rbp+var_4] pop rbp retn
long long my_uni_utf16le(long long a1, unsigned long long a2, _DWORD *a3, unsigned long long a4) { if ( a2 >= 0xD800 && (a2 <= 0xDFFF || a2 > 0xFFFF) ) { if ( a2 >= 0xFFFF && a2 <= (unsigned long long)&unk_10FFFF ) { if ( (unsigned long long)(a3 + 1) <= a4 ) { *a3 = ((a2 & 0x3FF | 0xDC00) << 16) | ((a2 - 0x10000) >> 10) & 0x3FF | 0xD800; return 4; } else { return (unsigned int)-104; } } else { return 0; } } else if ( (unsigned long long)a3 + 2 <= a4 ) { *(_WORD *)a3 = a2; return 2; } else { return (unsigned int)-102; } }
my_uni_utf16le: 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 CMP qword ptr [RBP + -0x18],0xd800 JC 0x0015c8a2 CMP qword ptr [RBP + -0x18],0xdfff JBE 0x0015c8e0 CMP qword ptr [RBP + -0x18],0xffff JA 0x0015c8e0 LAB_0015c8a2: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x0015c8bc MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x0015c972 LAB_0015c8bc: JMP 0x0015c8be LAB_0015c8be: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] MOV CX,AX MOV RAX,qword ptr [RBP + -0x40] MOV word ptr [RAX],CX MOV dword ptr [RBP + -0x4],0x2 JMP 0x0015c972 LAB_0015c8e0: CMP qword ptr [RBP + -0x18],0xffff JC 0x0015c8f4 CMP qword ptr [RBP + -0x18],0x10ffff JBE 0x0015c8fd LAB_0015c8f4: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0015c972 LAB_0015c8fd: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x4 CMP RAX,qword ptr [RBP + -0x28] JBE 0x0015c914 MOV dword ptr [RBP + -0x4],0xffffff98 JMP 0x0015c972 LAB_0015c914: MOV RAX,qword ptr [RBP + -0x18] SUB RAX,0x10000 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0xa AND RAX,0x3ff OR RAX,0xd800 MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x3ff OR RAX,0xdc00 MOV dword ptr [RBP + -0x30],EAX MOV EAX,dword ptr [RBP + -0x2c] MOV ECX,dword ptr [RBP + -0x30] SHL ECX,0x10 OR EAX,ECX MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x48],RAX MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x48] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x4 LAB_0015c972: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_uni_utf16le(int8 param_1,ulong param_2,uint *param_3,uint *param_4) { int4 local_c; if ((param_2 < 0xd800) || ((0xdfff < param_2 && (param_2 < 0x10000)))) { if (param_4 < (uint *)((long)param_3 + 2)) { local_c = 0xffffff9a; } else { *(short *)param_3 = (short)param_2; local_c = 2; } } else if ((param_2 < 0xffff) || (0x10ffff < param_2)) { local_c = 0; } else if (param_4 < param_3 + 1) { local_c = 0xffffff98; } else { *param_3 = (uint)(param_2 - 0x10000 >> 10) & 0x3ff | 0xd800 | ((uint)(param_2 - 0x10000) & 0x3ff | 0xdc00) << 0x10; local_c = 4; } return local_c; }
33,777
Cache::getAddr(Cache::Block&)
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp
uint32_t Cache::getAddr(Cache::Block &b) { uint32_t offsetBits = log2i(policy.blockSize); uint32_t idBits = log2i(policy.blockNum / policy.associativity); return (b.tag << (offsetBits + idBits)) | (b.id << offsetBits); }
O1
cpp
Cache::getAddr(Cache::Block&): movl 0x34(%rdi), %eax movl $0xffffffff, %ecx # imm = 0xFFFFFFFF movl $0xffffffff, %r8d # imm = 0xFFFFFFFF testl %eax, %eax je 0x13ffe xorl %r8d, %r8d cmpl $0x1, %eax je 0x13ffe cmpl $0x2, %eax jb 0x13ffe xorl %r8d, %r8d movl %eax, %edx shrl %edx incl %r8d cmpl $0x3, %eax movl %edx, %eax ja 0x13ff2 movl 0x38(%rdi), %eax xorl %edx, %edx divl 0x3c(%rdi) testl %eax, %eax je 0x14025 xorl %ecx, %ecx cmpl $0x1, %eax je 0x14025 cmpl $0x2, %eax jb 0x14025 xorl %ecx, %ecx movl %eax, %edx shrl %edx incl %ecx cmpl $0x3, %eax movl %edx, %eax ja 0x1401a addl %r8d, %ecx movl 0x4(%rsi), %edx movl 0x8(%rsi), %eax shll %cl, %edx movl %r8d, %ecx shll %cl, %eax orl %edx, %eax retq
_ZN5Cache7getAddrERNS_5BlockE: mov eax, [rdi+34h] mov ecx, 0FFFFFFFFh mov r8d, 0FFFFFFFFh test eax, eax jz short loc_13FFE xor r8d, r8d cmp eax, 1 jz short loc_13FFE cmp eax, 2 jb short loc_13FFE xor r8d, r8d mov edx, eax loc_13FF2: shr edx, 1 inc r8d cmp eax, 3 mov eax, edx ja short loc_13FF2 loc_13FFE: mov eax, [rdi+38h] xor edx, edx div dword ptr [rdi+3Ch] test eax, eax jz short loc_14025 xor ecx, ecx cmp eax, 1 jz short loc_14025 cmp eax, 2 jb short loc_14025 xor ecx, ecx mov edx, eax loc_1401A: shr edx, 1 inc ecx cmp eax, 3 mov eax, edx ja short loc_1401A loc_14025: add ecx, r8d mov edx, [rsi+4] mov eax, [rsi+8] shl edx, cl mov ecx, r8d shl eax, cl or eax, edx retn
long long Cache::getAddr(_DWORD *a1, long long a2) { unsigned int v2; // eax char v3; // cl char v4; // r8 unsigned int v5; // edx bool v6; // cc unsigned int v7; // eax unsigned int v8; // edx v2 = a1[13]; v3 = -1; v4 = -1; if ( v2 ) { v4 = 0; if ( v2 != 1 ) { v4 = 0; v5 = a1[13]; do { v5 >>= 1; ++v4; v6 = v2 <= 3; v2 = v5; } while ( !v6 ); } } v7 = a1[14] / a1[15]; if ( v7 ) { v3 = 0; if ( v7 != 1 ) { v3 = 0; v8 = a1[14] / a1[15]; do { v8 >>= 1; ++v3; v6 = v7 <= 3; v7 = v8; } while ( !v6 ); } } return (unsigned int)((*(_DWORD *)(a2 + 4) << (v4 + v3)) | (*(_DWORD *)(a2 + 8) << v4)); }
getAddr: MOV EAX,dword ptr [RDI + 0x34] MOV ECX,0xffffffff MOV R8D,0xffffffff TEST EAX,EAX JZ 0x00113ffe XOR R8D,R8D CMP EAX,0x1 JZ 0x00113ffe CMP EAX,0x2 JC 0x00113ffe XOR R8D,R8D MOV EDX,EAX LAB_00113ff2: SHR EDX,0x1 INC R8D CMP EAX,0x3 MOV EAX,EDX JA 0x00113ff2 LAB_00113ffe: MOV EAX,dword ptr [RDI + 0x38] XOR EDX,EDX DIV dword ptr [RDI + 0x3c] TEST EAX,EAX JZ 0x00114025 XOR ECX,ECX CMP EAX,0x1 JZ 0x00114025 CMP EAX,0x2 JC 0x00114025 XOR ECX,ECX MOV EDX,EAX LAB_0011401a: SHR EDX,0x1 INC ECX CMP EAX,0x3 MOV EAX,EDX JA 0x0011401a LAB_00114025: ADD ECX,R8D MOV EDX,dword ptr [RSI + 0x4] MOV EAX,dword ptr [RSI + 0x8] SHL EDX,CL MOV ECX,R8D SHL EAX,CL OR EAX,EDX RET
/* Cache::getAddr(Cache::Block&) */ uint __thiscall Cache::getAddr(Cache *this,Block *param_1) { bool bVar1; uint uVar2; char cVar3; ulong uVar4; byte bVar5; uVar2 = *(uint *)(this + 0x34); bVar5 = 0xff; if (uVar2 != 0) { bVar5 = 0; if ((uVar2 != 1) && (bVar5 = 0, 1 < uVar2)) { bVar5 = 0; do { bVar5 = bVar5 + 1; bVar1 = 3 < uVar2; uVar2 = uVar2 >> 1; } while (bVar1); } } uVar2 = (uint)((ulong)*(uint *)(this + 0x38) / (ulong)*(uint *)(this + 0x3c)); cVar3 = -1; if (uVar2 != 0) { cVar3 = '\0'; if ((uVar2 != 1) && (cVar3 = '\0', 1 < uVar2)) { cVar3 = '\0'; uVar4 = (ulong)*(uint *)(this + 0x38) / (ulong)*(uint *)(this + 0x3c); do { cVar3 = cVar3 + '\x01'; uVar2 = (uint)uVar4; uVar4 = uVar4 >> 1; } while (3 < uVar2); } } return *(int *)(param_1 + 8) << (bVar5 & 0x1f) | *(int *)(param_1 + 4) << (cVar3 + bVar5 & 0x1f); }
33,778
Cache::getAddr(Cache::Block&)
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp
uint32_t Cache::getAddr(Cache::Block &b) { uint32_t offsetBits = log2i(policy.blockSize); uint32_t idBits = log2i(policy.blockNum / policy.associativity); return (b.tag << (offsetBits + idBits)) | (b.id << offsetBits); }
O3
cpp
Cache::getAddr(Cache::Block&): movl 0x34(%rdi), %eax movl $0xffffffff, %ecx # imm = 0xFFFFFFFF movl $0xffffffff, %r8d # imm = 0xFFFFFFFF testl %eax, %eax je 0x13e34 xorl %r8d, %r8d cmpl $0x1, %eax je 0x13e34 movl %eax, %edx shrl %edx incl %r8d cmpl $0x3, %eax movl %edx, %eax ja 0x13e28 movl 0x38(%rdi), %eax xorl %edx, %edx divl 0x3c(%rdi) testl %eax, %eax je 0x13e54 xorl %ecx, %ecx cmpl $0x1, %eax je 0x13e54 movl %eax, %edx shrl %edx incl %ecx cmpl $0x3, %eax movl %edx, %eax ja 0x13e49 addl %r8d, %ecx movl 0x4(%rsi), %edx movl 0x8(%rsi), %eax shll %cl, %edx movl %r8d, %ecx shll %cl, %eax orl %edx, %eax retq nop
_ZN5Cache7getAddrERNS_5BlockE: mov eax, [rdi+34h] mov ecx, 0FFFFFFFFh mov r8d, 0FFFFFFFFh test eax, eax jz short loc_13E34 xor r8d, r8d cmp eax, 1 jz short loc_13E34 mov edx, eax loc_13E28: shr edx, 1 inc r8d cmp eax, 3 mov eax, edx ja short loc_13E28 loc_13E34: mov eax, [rdi+38h] xor edx, edx div dword ptr [rdi+3Ch] test eax, eax jz short loc_13E54 xor ecx, ecx cmp eax, 1 jz short loc_13E54 mov edx, eax loc_13E49: shr edx, 1 inc ecx cmp eax, 3 mov eax, edx ja short loc_13E49 loc_13E54: add ecx, r8d mov edx, [rsi+4] mov eax, [rsi+8] shl edx, cl mov ecx, r8d shl eax, cl or eax, edx retn
long long Cache::getAddr(_DWORD *a1, long long a2) { unsigned int v2; // eax char v3; // cl char v4; // r8 unsigned int v5; // edx bool v6; // cc unsigned int v7; // eax unsigned int v8; // edx v2 = a1[13]; v3 = -1; v4 = -1; if ( v2 ) { v4 = 0; if ( v2 != 1 ) { v5 = a1[13]; do { v5 >>= 1; ++v4; v6 = v2 <= 3; v2 = v5; } while ( !v6 ); } } v7 = a1[14] / a1[15]; if ( v7 ) { v3 = 0; if ( v7 != 1 ) { v8 = a1[14] / a1[15]; do { v8 >>= 1; ++v3; v6 = v7 <= 3; v7 = v8; } while ( !v6 ); } } return (unsigned int)((*(_DWORD *)(a2 + 4) << (v4 + v3)) | (*(_DWORD *)(a2 + 8) << v4)); }
getAddr: MOV EAX,dword ptr [RDI + 0x34] MOV ECX,0xffffffff MOV R8D,0xffffffff TEST EAX,EAX JZ 0x00113e34 XOR R8D,R8D CMP EAX,0x1 JZ 0x00113e34 MOV EDX,EAX LAB_00113e28: SHR EDX,0x1 INC R8D CMP EAX,0x3 MOV EAX,EDX JA 0x00113e28 LAB_00113e34: MOV EAX,dword ptr [RDI + 0x38] XOR EDX,EDX DIV dword ptr [RDI + 0x3c] TEST EAX,EAX JZ 0x00113e54 XOR ECX,ECX CMP EAX,0x1 JZ 0x00113e54 MOV EDX,EAX LAB_00113e49: SHR EDX,0x1 INC ECX CMP EAX,0x3 MOV EAX,EDX JA 0x00113e49 LAB_00113e54: ADD ECX,R8D MOV EDX,dword ptr [RSI + 0x4] MOV EAX,dword ptr [RSI + 0x8] SHL EDX,CL MOV ECX,R8D SHL EAX,CL OR EAX,EDX RET
/* Cache::getAddr(Cache::Block&) */ uint __thiscall Cache::getAddr(Cache *this,Block *param_1) { bool bVar1; uint uVar2; char cVar3; char cVar4; ulong uVar5; byte bVar6; byte bVar7; uVar2 = *(uint *)(this + 0x34); cVar3 = -1; bVar6 = 0xff; if (uVar2 != 0) { bVar7 = 0; bVar6 = 0; if (uVar2 != 1) { do { bVar6 = bVar7 + 1; bVar1 = 3 < uVar2; uVar2 = uVar2 >> 1; bVar7 = bVar6; } while (bVar1); } } uVar5 = (ulong)*(uint *)(this + 0x38) / (ulong)*(uint *)(this + 0x3c); if ((int)uVar5 != 0) { cVar4 = '\0'; cVar3 = '\0'; if ((int)uVar5 != 1) { do { cVar3 = cVar4 + '\x01'; uVar2 = (uint)uVar5; uVar5 = uVar5 >> 1; cVar4 = cVar3; } while (3 < uVar2); } } return *(int *)(param_1 + 8) << (bVar6 & 0x1f) | *(int *)(param_1 + 4) << (cVar3 + bVar6 & 0x1f); }
33,779
ma_search_last
eloqsql/storage/maria/ma_search.c
int _ma_search_last(MARIA_HA *info, MARIA_KEYDEF *keyinfo, my_off_t pos) { uchar *end_of_page; MARIA_PAGE page; DBUG_ENTER("_ma_search_last"); if (pos == HA_OFFSET_ERROR) { my_errno=HA_ERR_KEY_NOT_FOUND; /* Didn't find key */ info->cur_row.lastpos= HA_OFFSET_ERROR; DBUG_RETURN(-1); } do { if (_ma_fetch_keypage(&page, info, keyinfo, pos, PAGECACHE_LOCK_LEFT_UNLOCKED, DFLT_INIT_HITS, info->keyread_buff, 0)) { info->cur_row.lastpos= HA_OFFSET_ERROR; DBUG_RETURN(-1); } end_of_page= page.buff + page.size; } while ((pos= _ma_kpos(page.node, end_of_page)) != HA_OFFSET_ERROR); if (!_ma_get_last_key(&info->last_key, &page, end_of_page)) DBUG_RETURN(-1); info->cur_row.lastpos= _ma_row_pos_from_key(&info->last_key); info->cur_row.trid= _ma_trid_from_key(&info->last_key); info->int_keypos= info->int_maxpos= end_of_page; info->int_nod_flag= page.node; info->int_keytree_version= keyinfo->version; info->last_search_keypage= info->last_keypage; info->page_changed=info->keyread_buff_used=0; DBUG_PRINT("exit",("found key at %lu",(ulong) info->cur_row.lastpos)); DBUG_RETURN(0); }
O0
c
ma_search_last: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) cmpq $-0x1, -0x20(%rbp) jne 0x3c6b1 callq 0xfc990 movl $0x78, (%rax) movq -0x10(%rbp), %rax movq $-0x1, 0x98(%rax) movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x3c805 jmp 0x3c6b3 movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq 0x380(%rax), %rax leaq -0x60(%rbp), %rdi xorl %r8d, %r8d movl $0x3, %r9d movq %rax, (%rsp) movl $0x0, 0x8(%rsp) callq 0x3e080 cmpb $0x0, %al je 0x3c707 movq -0x10(%rbp), %rax movq $-0x1, 0x98(%rax) movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x3c805 movq -0x50(%rbp), %rax movl -0x40(%rbp), %ecx addq %rcx, %rax movq %rax, -0x28(%rbp) movl -0x38(%rbp), %edi movq -0x28(%rbp), %rsi callq 0x39d90 movq %rax, -0x20(%rbp) cmpq $-0x1, %rax jne 0x3c6b3 movq -0x10(%rbp), %rdi addq $0x200, %rdi # imm = 0x200 movq -0x28(%rbp), %rdx leaq -0x60(%rbp), %rsi callq 0x3bbb0 cmpq $0x0, %rax jne 0x3c757 jmp 0x3c74b movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x3c805 movq -0x10(%rbp), %rdi addq $0x200, %rdi # imm = 0x200 callq 0x3a280 movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x10(%rbp), %rdi addq $0x200, %rdi # imm = 0x200 callq 0x3a430 movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0xc0(%rax) movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x3b8(%rax) movq -0x10(%rbp), %rax movq %rcx, 0x3b0(%rax) movl -0x38(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x3d0(%rax) movq -0x18(%rbp), %rax movl 0xb8(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x3d4(%rax) movq -0x10(%rbp), %rax movq 0x440(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x448(%rax) movq -0x10(%rbp), %rax movb $0x0, 0x685(%rax) movq -0x10(%rbp), %rax movb $0x0, 0x684(%rax) jmp 0x3c7fc jmp 0x3c7fe movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x70, %rsp popq %rbp retq nop
_ma_search_last: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh jnz short loc_3C6B1 call _my_thread_var mov dword ptr [rax], 78h ; 'x' mov rax, [rbp+var_10] mov qword ptr [rax+98h], 0FFFFFFFFFFFFFFFFh mov [rbp+var_4], 0FFFFFFFFh jmp loc_3C805 loc_3C6B1: jmp short $+2 loc_3C6B3: mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] mov rax, [rbp+var_10] mov rax, [rax+380h] lea rdi, [rbp+var_60] xor r8d, r8d mov r9d, 3 mov [rsp+70h+var_70], rax mov [rsp+70h+var_68], 0 call _ma_fetch_keypage cmp al, 0 jz short loc_3C707 mov rax, [rbp+var_10] mov qword ptr [rax+98h], 0FFFFFFFFFFFFFFFFh mov [rbp+var_4], 0FFFFFFFFh jmp loc_3C805 loc_3C707: mov rax, [rbp+var_50] mov ecx, [rbp+var_40] add rax, rcx mov [rbp+var_28], rax mov edi, [rbp+var_38] mov rsi, [rbp+var_28] call _ma_kpos mov [rbp+var_20], rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_3C6B3 mov rdi, [rbp+var_10] add rdi, 200h mov rdx, [rbp+var_28] lea rsi, [rbp+var_60] call _ma_get_last_key cmp rax, 0 jnz short loc_3C757 jmp short $+2 loc_3C74B: mov [rbp+var_4], 0FFFFFFFFh jmp loc_3C805 loc_3C757: mov rdi, [rbp+var_10] add rdi, 200h call _ma_row_pos_from_key mov rcx, rax mov rax, [rbp+var_10] mov [rax+98h], rcx mov rdi, [rbp+var_10] add rdi, 200h call _ma_trid_from_key mov rcx, rax mov rax, [rbp+var_10] mov [rax+0C0h], rcx mov rcx, [rbp+var_28] mov rax, [rbp+var_10] mov [rax+3B8h], rcx mov rax, [rbp+var_10] mov [rax+3B0h], rcx mov ecx, [rbp+var_38] mov rax, [rbp+var_10] mov [rax+3D0h], ecx mov rax, [rbp+var_18] mov ecx, [rax+0B8h] mov rax, [rbp+var_10] mov [rax+3D4h], ecx mov rax, [rbp+var_10] mov rcx, [rax+440h] mov rax, [rbp+var_10] mov [rax+448h], rcx mov rax, [rbp+var_10] mov byte ptr [rax+685h], 0 mov rax, [rbp+var_10] mov byte ptr [rax+684h], 0 jmp short $+2 loc_3C7FC: jmp short $+2 loc_3C7FE: mov [rbp+var_4], 0 loc_3C805: mov eax, [rbp+var_4] add rsp, 70h pop rbp retn
long long ma_search_last(long long a1, const char *a2, long long a3) { long long v3; // rax long long v4; // rax unsigned long long v5; // rcx _BYTE v7[16]; // [rsp+10h] [rbp-60h] BYREF long long v8; // [rsp+20h] [rbp-50h] unsigned int v9; // [rsp+30h] [rbp-40h] unsigned int v10; // [rsp+38h] [rbp-38h] unsigned long long v11; // [rsp+48h] [rbp-28h] long long v12; // [rsp+50h] [rbp-20h] const char *v13; // [rsp+58h] [rbp-18h] long long v14; // [rsp+60h] [rbp-10h] v14 = a1; v13 = a2; v12 = a3; if ( a3 == -1 ) { *(_DWORD *)my_thread_var(a1, a2) = 120; *(_QWORD *)(v14 + 152) = -1LL; return (unsigned int)-1; } else { do { if ( (unsigned __int8)ma_fetch_keypage((unsigned int)v7, v14, (_DWORD)v13, v12, 0, 3, *(_QWORD *)(v14 + 896), 0) ) { *(_QWORD *)(v14 + 152) = -1LL; return (unsigned int)-1; } v11 = v9 + v8; v12 = ma_kpos(v10, v11); } while ( v12 != -1 ); if ( ma_get_last_key(v14 + 512, (long long)v7, v11) ) { v3 = ma_row_pos_from_key(v14 + 512); *(_QWORD *)(v14 + 152) = v3; v4 = ma_trid_from_key(v14 + 512); *(_QWORD *)(v14 + 192) = v4; v5 = v11; *(_QWORD *)(v14 + 952) = v11; *(_QWORD *)(v14 + 944) = v5; *(_DWORD *)(v14 + 976) = v10; *(_DWORD *)(v14 + 980) = *((_DWORD *)v13 + 46); *(_QWORD *)(v14 + 1096) = *(_QWORD *)(v14 + 1088); *(_BYTE *)(v14 + 1669) = 0; *(_BYTE *)(v14 + 1668) = 0; return 0; } else { return (unsigned int)-1; } } }
_ma_search_last: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX CMP qword ptr [RBP + -0x20],-0x1 JNZ 0x0013c6b1 CALL 0x001fc990 MOV dword ptr [RAX],0x78 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x98],-0x1 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0013c805 LAB_0013c6b1: JMP 0x0013c6b3 LAB_0013c6b3: MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x380] LEA RDI,[RBP + -0x60] XOR R8D,R8D MOV R9D,0x3 MOV qword ptr [RSP],RAX MOV dword ptr [RSP + 0x8],0x0 CALL 0x0013e080 CMP AL,0x0 JZ 0x0013c707 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x98],-0x1 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0013c805 LAB_0013c707: MOV RAX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x40] ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV EDI,dword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x28] CALL 0x00139d90 MOV qword ptr [RBP + -0x20],RAX CMP RAX,-0x1 JNZ 0x0013c6b3 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x200 MOV RDX,qword ptr [RBP + -0x28] LEA RSI,[RBP + -0x60] CALL 0x0013bbb0 CMP RAX,0x0 JNZ 0x0013c757 JMP 0x0013c74b LAB_0013c74b: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0013c805 LAB_0013c757: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x200 CALL 0x0013a280 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x98],RCX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x200 CALL 0x0013a430 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xc0],RCX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x3b8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x3b0],RCX MOV ECX,dword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x3d0],ECX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX + 0xb8] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x3d4],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x440] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x448],RCX MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x685],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x684],0x0 JMP 0x0013c7fc LAB_0013c7fc: JMP 0x0013c7fe LAB_0013c7fe: MOV dword ptr [RBP + -0x4],0x0 LAB_0013c805: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x70 POP RBP RET
int4 _ma_search_last(long param_1,long param_2,long param_3) { char cVar1; int4 *puVar2; long lVar3; int8 uVar4; int1 local_68 [16]; long local_58; uint local_48; int4 local_40; long local_30; long local_28; long local_20; long local_18; int4 local_c; local_28 = param_3; local_20 = param_2; local_18 = param_1; if (param_3 == -1) { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x78; *(int8 *)(local_18 + 0x98) = 0xffffffffffffffff; local_c = 0xffffffff; } else { do { cVar1 = _ma_fetch_keypage(local_68,local_18,local_20,local_28,0,3, *(int8 *)(local_18 + 0x380),0); if (cVar1 != '\0') { *(int8 *)(local_18 + 0x98) = 0xffffffffffffffff; return 0xffffffff; } local_30 = local_58 + (ulong)local_48; local_28 = _ma_kpos(local_40,local_30); } while (local_28 != -1); lVar3 = _ma_get_last_key(local_18 + 0x200,local_68,local_30); if (lVar3 == 0) { local_c = 0xffffffff; } else { uVar4 = _ma_row_pos_from_key(local_18 + 0x200); *(int8 *)(local_18 + 0x98) = uVar4; uVar4 = _ma_trid_from_key(local_18 + 0x200); *(int8 *)(local_18 + 0xc0) = uVar4; *(long *)(local_18 + 0x3b8) = local_30; *(long *)(local_18 + 0x3b0) = local_30; *(int4 *)(local_18 + 0x3d0) = local_40; *(int4 *)(local_18 + 0x3d4) = *(int4 *)(local_20 + 0xb8); *(int8 *)(local_18 + 0x448) = *(int8 *)(local_18 + 0x440); *(int1 *)(local_18 + 0x685) = 0; *(int1 *)(local_18 + 0x684) = 0; local_c = 0; } } return local_c; }
33,780
CLI::Formatter::make_footer[abi:cxx11](CLI::App const*) const
MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/impl/Formatter_inl.hpp
CLI11_INLINE std::string Formatter::make_footer(const App *app) const { std::string footer = app->get_footer(); if(footer.empty()) { return std::string{}; } return "\n" + footer + "\n"; }
O0
cpp
CLI::Formatter::make_footer[abi:cxx11](CLI::App const*) const: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x80(%rbp) movq %rdi, %rax movq %rax, -0x78(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x18(%rbp), %rsi leaq -0x38(%rbp), %rdi callq 0x4ca40 leaq -0x38(%rbp), %rdi callq 0x99c0 testb $0x1, %al jne 0x135ce jmp 0x135e0 movq -0x80(%rbp), %rdi callq 0x9890 movl $0x1, -0x3c(%rbp) jmp 0x13643 leaq 0x5ca26(%rip), %rsi # 0x7000d leaq -0x60(%rbp), %rdi leaq -0x38(%rbp), %rdx callq 0x16540 jmp 0x135f6 movq -0x80(%rbp), %rdi leaq 0x5ca0c(%rip), %rdx # 0x7000d leaq -0x60(%rbp), %rsi callq 0x1e250 jmp 0x1360c leaq -0x60(%rbp), %rdi callq 0x9b90 movl $0x1, -0x3c(%rbp) jmp 0x13643 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x68(%rbp) movl %eax, -0x6c(%rbp) jmp 0x13659 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x68(%rbp) movl %eax, -0x6c(%rbp) leaq -0x60(%rbp), %rdi callq 0x9b90 jmp 0x13659 leaq -0x38(%rbp), %rdi callq 0x9b90 movq -0x78(%rbp), %rax addq $0x80, %rsp popq %rbp retq leaq -0x38(%rbp), %rdi callq 0x9b90 movq -0x68(%rbp), %rdi callq 0x9a70 nopl (%rax,%rax)
_ZNK3CLI9Formatter11make_footerB5cxx11EPKNS_3AppE: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_80], rdi mov rax, rdi mov [rbp+var_78], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rsi, [rbp+var_18] lea rdi, [rbp+var_38] call _ZNK3CLI3App10get_footerB5cxx11Ev; CLI::App::get_footer(void) lea rdi, [rbp+var_38] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_135CE jmp short loc_135E0 loc_135CE: mov rdi, [rbp+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) mov [rbp+var_3C], 1 jmp short loc_13643 loc_135E0: lea rsi, asc_7000C+1; "\n" lea rdi, [rbp+var_60] lea rdx, [rbp+var_38] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) jmp short $+2 loc_135F6: mov rdi, [rbp+var_80] lea rdx, asc_7000C+1; "\n" lea rsi, [rbp+var_60] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_1360C: lea rdi, [rbp+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov [rbp+var_3C], 1 jmp short loc_13643 mov rcx, rax mov eax, edx mov [rbp+var_68], rcx mov [rbp+var_6C], eax jmp short loc_13659 mov rcx, rax mov eax, edx mov [rbp+var_68], rcx mov [rbp+var_6C], eax lea rdi, [rbp+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_13659 loc_13643: lea rdi, [rbp+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rbp+var_78] add rsp, 80h pop rbp retn loc_13659: lea rdi, [rbp+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rbp+var_68] call __Unwind_Resume
long long CLI::Formatter::make_footer[abi:cxx11](long long a1, long long a2, long long a3) { long long v4; // rdx long long v5; // rcx long long v6; // r8 long long v7; // r9 _BYTE v9[36]; // [rsp+20h] [rbp-60h] BYREF int v10; // [rsp+44h] [rbp-3Ch] _BYTE v11[32]; // [rsp+48h] [rbp-38h] BYREF long long v12; // [rsp+68h] [rbp-18h] long long v13; // [rsp+70h] [rbp-10h] long long v14; // [rsp+78h] [rbp-8h] v14 = a1; v13 = a2; v12 = a3; CLI::App::get_footer[abi:cxx11](v11, a3); if ( (std::string::empty(v11) & 1) != 0 ) { std::string::basic_string(a1, a3, v4, v5, v6, v7); } else { std::operator+<char>(v9, "\n", v11); std::operator+<char>(a1, v9, "\n"); std::string::~string(v9); } v10 = 1; std::string::~string(v11); return a1; }
make_footer[abi:cxx11]: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x80],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x78],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RSI,qword ptr [RBP + -0x18] LEA RDI,[RBP + -0x38] CALL 0x0014ca40 LEA RDI,[RBP + -0x38] CALL 0x001099c0 TEST AL,0x1 JNZ 0x001135ce JMP 0x001135e0 LAB_001135ce: MOV RDI,qword ptr [RBP + -0x80] CALL 0x00109890 MOV dword ptr [RBP + -0x3c],0x1 JMP 0x00113643 LAB_001135e0: LEA RSI,[0x17000d] LEA RDI,[RBP + -0x60] LEA RDX,[RBP + -0x38] CALL 0x00116540 JMP 0x001135f6 LAB_001135f6: MOV RDI,qword ptr [RBP + -0x80] LEA RDX,[0x17000d] LEA RSI,[RBP + -0x60] CALL 0x0011e250 LAB_0011360a: JMP 0x0011360c LAB_0011360c: LEA RDI,[RBP + -0x60] CALL 0x00109b90 MOV dword ptr [RBP + -0x3c],0x1 JMP 0x00113643 LAB_00113643: LEA RDI,[RBP + -0x38] CALL 0x00109b90 MOV RAX,qword ptr [RBP + -0x78] ADD RSP,0x80 POP RBP RET
/* CLI::Formatter::make_footer[abi:cxx11](CLI::App const*) const */ App * CLI::Formatter::make_footer_abi_cxx11_(App *param_1) { ulong uVar1; string local_68 [36]; int4 local_44; string local_40 [48]; App *local_10; local_10 = param_1; App::get_footer_abi_cxx11_(); uVar1 = std::__cxx11::string::empty(); if ((uVar1 & 1) == 0) { /* try { // try from 001135e0 to 001135f3 has its CatchHandler @ 0011361e */ std::operator+((char *)local_68,(string *)&DAT_0017000d); /* try { // try from 001135f6 to 00113609 has its CatchHandler @ 0011362c */ std::operator+((string *)param_1,(char *)local_68); std::__cxx11::string::~string(local_68); } else { std::__cxx11::string::string((string *)param_1); } local_44 = 1; std::__cxx11::string::~string(local_40); return param_1; }
33,781
OpenSubdiv::v3_6_0::Far::PatchBuilder::GetRegularPatchBoundaryMask(int, int, int) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchBuilder.cpp
int PatchBuilder::GetRegularPatchBoundaryMask(int levelIndex, Index faceIndex, int fvarChannel) const { if (_schemeIsLinear) { // Boundaries for patches not dependent on the 1-ring are ignored return 0; } Level const & level = _refiner.getLevel(levelIndex); // Gather tags for the four corners and edges. Regardless of the // options for treating non-manifold or inf-sharp patches, for a // regular patch we can infer all that we need from these tags: // Level::VTag vTags[4]; Level::ETag eTags[4]; level.getFaceVTags(faceIndex, vTags, fvarChannel); Level::VTag fTag = Level::VTag::BitwiseOr(vTags, _schemeRegFaceSize); if (!fTag._infSharpEdges) { return 0; } level.getFaceETags(faceIndex, eTags, fvarChannel); // // Test the edge tags for boundary features. For quads this is // sufficient, so return the edge bits. // bool testInfSharpFeatures = !_options.approxInfSharpWithSmooth; Level::ETag eFeatureTag(0); eFeatureTag._boundary = true; eFeatureTag._infSharp = testInfSharpFeatures; eFeatureTag._nonManifold = true; int eFeatureMask = eFeatureTag.getBits(); int eBits = (((eTags[0].getBits() & eFeatureMask) != 0) << 0) | (((eTags[1].getBits() & eFeatureMask) != 0) << 1) | (((eTags[2].getBits() & eFeatureMask) != 0) << 2); if (_schemeRegFaceSize == 4) { eBits |= (((eTags[3].getBits() & eFeatureMask) != 0) << 3); return eBits; } // // For triangles, test the vertex tags for boundary features (we // can have boundary vertices with no boundary edges) and return // the encoded result of the two sets of 3 bits: // Level::VTag vFeatureTag(0); vFeatureTag._boundary = true; vFeatureTag._infSharpEdges = testInfSharpFeatures; vFeatureTag._nonManifold = true; int vFeatureMask = vFeatureTag.getBits(); int vBits = (((vTags[0].getBits() & vFeatureMask) != 0) << 0) | (((vTags[1].getBits() & vFeatureMask) != 0) << 1) | (((vTags[2].getBits() & vFeatureMask) != 0) << 2); return (eBits || vBits) ? encodeTriBoundaryMask(eBits, vBits) : 0; }
O1
cpp
OpenSubdiv::v3_6_0::Far::PatchBuilder::GetRegularPatchBoundaryMask(int, int, int) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp xorl %ebx, %ebx cmpb $0x0, 0x24(%rdi) jne 0x65a8e movl %ecx, %ebp movl %edx, %r15d movq %rdi, %r14 movq 0x8(%rdi), %rax movslq %esi, %rcx movq 0x30(%rax), %rax movq (%rax,%rcx,8), %r12 leaq 0xc(%rsp), %rbx movq %r12, %rdi movl %edx, %esi movq %rbx, %rdx movl %ebp, %ecx callq 0x38530 movl 0x20(%r14), %esi movq %rbx, %rdi callq 0x38580 xorl %ebx, %ebx btl $0xd, %eax jae 0x65a8e leaq 0x14(%rsp), %r13 movq %r12, %rdi movl %r15d, %esi movq %r13, %rdx movl %ebp, %ecx callq 0x38400 movb 0x19(%r14), %cl xorb $0x1, %cl leal (,%rcx,4), %edx orb $0x3, %dl xorl %eax, %eax testb %dl, (%r13) setne %al xorl %esi, %esi testb %dl, 0x1(%r13) setne %sil leal (%rax,%rsi,2), %eax xorl %esi, %esi testb %dl, 0x2(%r13) setne %sil leal (%rax,%rsi,4), %eax cmpl $0x4, 0x20(%r14) jne 0x65a1f xorl %ecx, %ecx testb %dl, 0x17(%rsp) setne %cl leal (%rax,%rcx,8), %ebx jmp 0x65a8e movzbl %cl, %ecx shll $0xd, %ecx orl $0x5, %ecx xorl %edx, %edx testw %cx, 0xc(%rsp) setne %dl xorl %esi, %esi testw %cx, 0xe(%rsp) setne %sil leal (%rdx,%rsi,2), %edx xorl %esi, %esi testw %cx, 0x10(%rsp) setne %sil leal (%rdx,%rsi,4), %ecx movl %eax, %edx orl %ecx, %edx je 0x65a8e xorl %ebx, %ebx testl %ecx, %ecx je 0x65a8c testl %eax, %eax je 0x65a85 cmpl $0x7, %ecx jne 0x65a8c cmpl $0x4, %eax ja 0x65a8c movl $0x17, %ecx btl %eax, %ecx jae 0x65a8c movl %eax, %eax leaq 0x524ed(%rip), %rcx # 0xb7f68 movl (%rcx,%rax,4), %eax movl $0x10, %ebx jmp 0x65a8c movl $0x8, %ebx movl %ecx, %eax orl %eax, %ebx movl %ebx, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder27GetRegularPatchBoundaryMaskEiii: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h xor ebx, ebx cmp byte ptr [rdi+24h], 0 jnz loc_65A8E mov ebp, ecx mov r15d, edx mov r14, rdi mov rax, [rdi+8] movsxd rcx, esi mov rax, [rax+30h] mov r12, [rax+rcx*8] lea rbx, [rsp+48h+var_3C] mov rdi, r12 mov esi, edx mov rdx, rbx mov ecx, ebp call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level12getFaceVTagsEiPNS3_4VTagEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVTags(int,OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag *,int) mov esi, [r14+20h] mov rdi, rbx call __ZN10OpenSubdiv6v3_6_03Vtr8internal5Level4VTag9BitwiseOrEPKS4_i; OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag::BitwiseOr(OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag const*,int) xor ebx, ebx bt eax, 0Dh jnb loc_65A8E lea r13, [rsp+48h+var_34] mov rdi, r12 mov esi, r15d mov rdx, r13 mov ecx, ebp call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level12getFaceETagsEiPNS3_4ETagEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceETags(int,OpenSubdiv::v3_6_0::Vtr::internal::Level::ETag *,int) mov cl, [r14+19h] xor cl, 1 lea edx, ds:0[rcx*4] or dl, 3 xor eax, eax test [r13+0], dl setnz al xor esi, esi test [r13+1], dl setnz sil lea eax, [rax+rsi*2] xor esi, esi test [r13+2], dl setnz sil lea eax, [rax+rsi*4] cmp dword ptr [r14+20h], 4 jnz short loc_65A1F xor ecx, ecx test [rsp+48h+var_31], dl setnz cl lea ebx, [rax+rcx*8] jmp short loc_65A8E loc_65A1F: movzx ecx, cl shl ecx, 0Dh or ecx, 5 xor edx, edx test [rsp+48h+var_3C], cx setnz dl xor esi, esi test [rsp+48h+var_3A], cx setnz sil lea edx, [rdx+rsi*2] xor esi, esi test [rsp+48h+var_38], cx setnz sil lea ecx, [rdx+rsi*4] mov edx, eax or edx, ecx jz short loc_65A8E xor ebx, ebx test ecx, ecx jz short loc_65A8C test eax, eax jz short loc_65A85 cmp ecx, 7 jnz short loc_65A8C cmp eax, 4 ja short loc_65A8C mov ecx, 17h bt ecx, eax jnb short loc_65A8C mov eax, eax lea rcx, unk_B7F68 mov eax, [rcx+rax*4] mov ebx, 10h jmp short loc_65A8C loc_65A85: mov ebx, 8 mov eax, ecx loc_65A8C: or ebx, eax loc_65A8E: mov eax, ebx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long OpenSubdiv::v3_6_0::Far::PatchBuilder::GetRegularPatchBoundaryMask( OpenSubdiv::v3_6_0::Far::PatchBuilder *this, int a2, int a3, int a4) { unsigned int v4; // ebx _QWORD *v7; // r12 unsigned __int8 v8; // cl unsigned __int8 v9; // dl unsigned int v10; // eax int v11; // ecx int v12; // ebx int v13; // ecx __int16 v15[4]; // [rsp+Ch] [rbp-3Ch] BYREF _BYTE v16[52]; // [rsp+14h] [rbp-34h] BYREF v4 = 0; if ( !*((_BYTE *)this + 36) ) { v7 = *(_QWORD **)(*(_QWORD *)(*((_QWORD *)this + 1) + 48LL) + 8LL * a2); OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVTags(v7, a3, (long long)v15, a4); v4 = 0; if ( (OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag::BitwiseOr(v15, *((_DWORD *)this + 8)) & 0x2000) != 0 ) { OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceETags(v7, a3, (long long)v16, a4); v8 = *((_BYTE *)this + 25) ^ 1; v9 = (4 * v8) | 3; v10 = ((v9 & v16[0]) != 0) + 2 * ((v9 & v16[1]) != 0) + 4 * ((v9 & v16[2]) != 0); if ( *((_DWORD *)this + 8) == 4 ) { return v10 + 8 * ((v9 & v16[3]) != 0); } else { v11 = ((((unsigned __int16)(v8 << 13) | 5) & v15[0]) != 0) + 2 * ((((unsigned __int16)(v8 << 13) | 5) & v15[1]) != 0) + 4 * ((((unsigned __int16)(v8 << 13) | 5) & v15[2]) != 0); if ( v11 | v10 ) { v12 = 0; if ( v11 ) { if ( v10 ) { if ( v11 == 7 && v10 <= 4 ) { v13 = 23; if ( _bittest(&v13, v10) ) { v10 = dword_B7F68[v10]; v12 = 16; } } } else { v12 = 8; v10 = v11; } } return v10 | v12; } } } } return v4; }
GetRegularPatchBoundaryMask: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 XOR EBX,EBX CMP byte ptr [RDI + 0x24],0x0 JNZ 0x00165a8e MOV EBP,ECX MOV R15D,EDX MOV R14,RDI MOV RAX,qword ptr [RDI + 0x8] MOVSXD RCX,ESI MOV RAX,qword ptr [RAX + 0x30] MOV R12,qword ptr [RAX + RCX*0x8] LEA RBX,[RSP + 0xc] MOV RDI,R12 MOV ESI,EDX MOV RDX,RBX MOV ECX,EBP CALL 0x00138530 MOV ESI,dword ptr [R14 + 0x20] MOV RDI,RBX CALL 0x00138580 XOR EBX,EBX BT EAX,0xd JNC 0x00165a8e LEA R13,[RSP + 0x14] MOV RDI,R12 MOV ESI,R15D MOV RDX,R13 MOV ECX,EBP CALL 0x00138400 MOV CL,byte ptr [R14 + 0x19] XOR CL,0x1 LEA EDX,[RCX*0x4] OR DL,0x3 XOR EAX,EAX TEST byte ptr [R13],DL SETNZ AL XOR ESI,ESI TEST byte ptr [R13 + 0x1],DL SETNZ SIL LEA EAX,[RAX + RSI*0x2] XOR ESI,ESI TEST byte ptr [R13 + 0x2],DL SETNZ SIL LEA EAX,[RAX + RSI*0x4] CMP dword ptr [R14 + 0x20],0x4 JNZ 0x00165a1f XOR ECX,ECX TEST byte ptr [RSP + 0x17],DL SETNZ CL LEA EBX,[RAX + RCX*0x8] JMP 0x00165a8e LAB_00165a1f: MOVZX ECX,CL SHL ECX,0xd OR ECX,0x5 XOR EDX,EDX TEST word ptr [RSP + 0xc],CX SETNZ DL XOR ESI,ESI TEST word ptr [RSP + 0xe],CX SETNZ SIL LEA EDX,[RDX + RSI*0x2] XOR ESI,ESI TEST word ptr [RSP + 0x10],CX SETNZ SIL LEA ECX,[RDX + RSI*0x4] MOV EDX,EAX OR EDX,ECX JZ 0x00165a8e XOR EBX,EBX TEST ECX,ECX JZ 0x00165a8c TEST EAX,EAX JZ 0x00165a85 CMP ECX,0x7 JNZ 0x00165a8c CMP EAX,0x4 JA 0x00165a8c MOV ECX,0x17 BT ECX,EAX JNC 0x00165a8c MOV EAX,EAX LEA RCX,[0x1b7f68] MOV EAX,dword ptr [RCX + RAX*0x4] MOV EBX,0x10 JMP 0x00165a8c LAB_00165a85: MOV EBX,0x8 MOV EAX,ECX LAB_00165a8c: OR EBX,EAX LAB_00165a8e: MOV EAX,EBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Far::PatchBuilder::GetRegularPatchBoundaryMask(int, int, int) const */ uint __thiscall OpenSubdiv::v3_6_0::Far::PatchBuilder::GetRegularPatchBoundaryMask (PatchBuilder *this,int param_1,int param_2,int param_3) { Level *this_00; uint uVar1; ushort uVar2; uint uVar3; byte bVar4; uint uVar5; ushort local_3c; ushort local_3a; ushort local_38; ETag local_34; byte local_33; byte local_32; byte local_31; uVar5 = 0; if (this[0x24] == (PatchBuilder)0x0) { this_00 = *(Level **)(*(long *)(*(long *)(this + 8) + 0x30) + (long)param_1 * 8); Vtr::internal::Level::getFaceVTags(this_00,param_2,(VTag *)&local_3c,param_3); uVar1 = Vtr::internal::Level::VTag::BitwiseOr((VTag *)&local_3c,*(int *)(this + 0x20)); uVar5 = 0; if ((uVar1 >> 0xd & 1) != 0) { Vtr::internal::Level::getFaceETags(this_00,param_2,&local_34,param_3); bVar4 = (char)((byte)this[0x19] ^ 1) * '\x04' | 3; uVar1 = (uint)(((byte)local_34 & bVar4) != 0) + (uint)((local_33 & bVar4) != 0) * 2 + (uint)((local_32 & bVar4) != 0) * 4; if (*(int *)(this + 0x20) == 4) { uVar5 = uVar1 + (uint)((local_31 & bVar4) != 0) * 8; } else { uVar2 = (ushort)(((byte)this[0x19] ^ 1) << 0xd) | 5; uVar3 = (uint)((local_3c & uVar2) != 0) + (uint)((local_3a & uVar2) != 0) * 2 + (uint)((local_38 & uVar2) != 0) * 4; if (uVar1 != 0 || uVar3 != 0) { uVar5 = 0; if (uVar3 != 0) { if (uVar1 == 0) { uVar5 = 8; uVar1 = uVar3; } else if (((uVar3 == 7) && (uVar5 = 0, uVar1 < 5)) && ((0x17U >> uVar1 & 1) != 0)) { uVar5 = 0x10; uVar1 = *(uint *)(&DAT_001b7f68 + (ulong)uVar1 * 4); } } uVar5 = uVar5 | uVar1; } } } } return uVar5; }
33,782
OpenSubdiv::v3_6_0::Far::PatchBuilder::GetRegularPatchBoundaryMask(int, int, int) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchBuilder.cpp
int PatchBuilder::GetRegularPatchBoundaryMask(int levelIndex, Index faceIndex, int fvarChannel) const { if (_schemeIsLinear) { // Boundaries for patches not dependent on the 1-ring are ignored return 0; } Level const & level = _refiner.getLevel(levelIndex); // Gather tags for the four corners and edges. Regardless of the // options for treating non-manifold or inf-sharp patches, for a // regular patch we can infer all that we need from these tags: // Level::VTag vTags[4]; Level::ETag eTags[4]; level.getFaceVTags(faceIndex, vTags, fvarChannel); Level::VTag fTag = Level::VTag::BitwiseOr(vTags, _schemeRegFaceSize); if (!fTag._infSharpEdges) { return 0; } level.getFaceETags(faceIndex, eTags, fvarChannel); // // Test the edge tags for boundary features. For quads this is // sufficient, so return the edge bits. // bool testInfSharpFeatures = !_options.approxInfSharpWithSmooth; Level::ETag eFeatureTag(0); eFeatureTag._boundary = true; eFeatureTag._infSharp = testInfSharpFeatures; eFeatureTag._nonManifold = true; int eFeatureMask = eFeatureTag.getBits(); int eBits = (((eTags[0].getBits() & eFeatureMask) != 0) << 0) | (((eTags[1].getBits() & eFeatureMask) != 0) << 1) | (((eTags[2].getBits() & eFeatureMask) != 0) << 2); if (_schemeRegFaceSize == 4) { eBits |= (((eTags[3].getBits() & eFeatureMask) != 0) << 3); return eBits; } // // For triangles, test the vertex tags for boundary features (we // can have boundary vertices with no boundary edges) and return // the encoded result of the two sets of 3 bits: // Level::VTag vFeatureTag(0); vFeatureTag._boundary = true; vFeatureTag._infSharpEdges = testInfSharpFeatures; vFeatureTag._nonManifold = true; int vFeatureMask = vFeatureTag.getBits(); int vBits = (((vTags[0].getBits() & vFeatureMask) != 0) << 0) | (((vTags[1].getBits() & vFeatureMask) != 0) << 1) | (((vTags[2].getBits() & vFeatureMask) != 0) << 2); return (eBits || vBits) ? encodeTriBoundaryMask(eBits, vBits) : 0; }
O3
cpp
OpenSubdiv::v3_6_0::Far::PatchBuilder::GetRegularPatchBoundaryMask(int, int, int) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp xorl %ebx, %ebx cmpb $0x0, 0x24(%rdi) jne 0x66f90 movl %ecx, %ebp movl %edx, %r15d movq %rdi, %r14 movq 0x8(%rdi), %rax movslq %esi, %rcx movq 0x30(%rax), %rax movq (%rax,%rcx,8), %r12 leaq 0xc(%rsp), %rbx movq %r12, %rdi movl %edx, %esi movq %rbx, %rdx movl %ebp, %ecx callq 0x38530 movl 0x20(%r14), %esi movq %rbx, %rdi callq 0x38580 xorl %ebx, %ebx btl $0xd, %eax jae 0x66f90 leaq 0x14(%rsp), %r13 movq %r12, %rdi movl %r15d, %esi movq %r13, %rdx movl %ebp, %ecx callq 0x38400 movb 0x19(%r14), %cl xorb $0x1, %cl leal (,%rcx,4), %edx orb $0x3, %dl xorl %eax, %eax testb %dl, (%r13) setne %al xorl %esi, %esi testb %dl, 0x1(%r13) setne %sil leal (%rax,%rsi,2), %eax xorl %esi, %esi testb %dl, 0x2(%r13) setne %sil leal (%rax,%rsi,4), %eax cmpl $0x4, 0x20(%r14) jne 0x66f2d xorl %ecx, %ecx testb %dl, 0x17(%rsp) setne %cl leal (%rax,%rcx,8), %ebx jmp 0x66f90 movzbl %cl, %ecx shll $0xd, %ecx orl $0x5, %ecx xorl %edx, %edx testw %cx, 0xc(%rsp) setne %dl xorl %esi, %esi testw %cx, 0xe(%rsp) setne %sil leal (%rdx,%rsi,2), %edx xorl %esi, %esi testw %cx, 0x10(%rsp) setne %sil leal (%rdx,%rsi,4), %ecx movl %eax, %edx orl %ecx, %edx je 0x66f90 xorl %ebx, %ebx testl %ecx, %ecx je 0x66f8e testl %eax, %eax je 0x66f87 cmpl $0x7, %ecx jne 0x66f8e cmpl $0x4, %eax ja 0x66f8e movl $0x16, %ecx btl %eax, %ecx jae 0x66f8e movl $0x10, %ebx jmp 0x66f8e movl $0x8, %ebx movl %ecx, %eax orl %eax, %ebx movl %ebx, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder27GetRegularPatchBoundaryMaskEiii: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h xor ebx, ebx cmp byte ptr [rdi+24h], 0 jnz loc_66F90 mov ebp, ecx mov r15d, edx mov r14, rdi mov rax, [rdi+8] movsxd rcx, esi mov rax, [rax+30h] mov r12, [rax+rcx*8] lea rbx, [rsp+48h+var_3C] mov rdi, r12 mov esi, edx mov rdx, rbx mov ecx, ebp call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level12getFaceVTagsEiPNS3_4VTagEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVTags(int,OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag *,int) mov esi, [r14+20h] mov rdi, rbx call __ZN10OpenSubdiv6v3_6_03Vtr8internal5Level4VTag9BitwiseOrEPKS4_i; OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag::BitwiseOr(OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag const*,int) xor ebx, ebx bt eax, 0Dh jnb loc_66F90 lea r13, [rsp+48h+var_34] mov rdi, r12 mov esi, r15d mov rdx, r13 mov ecx, ebp call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level12getFaceETagsEiPNS3_4ETagEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceETags(int,OpenSubdiv::v3_6_0::Vtr::internal::Level::ETag *,int) mov cl, [r14+19h] xor cl, 1 lea edx, ds:0[rcx*4] or dl, 3 xor eax, eax test [r13+0], dl setnz al xor esi, esi test [r13+1], dl setnz sil lea eax, [rax+rsi*2] xor esi, esi test [r13+2], dl setnz sil lea eax, [rax+rsi*4] cmp dword ptr [r14+20h], 4 jnz short loc_66F2D xor ecx, ecx test [rsp+48h+var_31], dl setnz cl lea ebx, [rax+rcx*8] jmp short loc_66F90 loc_66F2D: movzx ecx, cl shl ecx, 0Dh or ecx, 5 xor edx, edx test [rsp+48h+var_3C], cx setnz dl xor esi, esi test [rsp+48h+var_3A], cx setnz sil lea edx, [rdx+rsi*2] xor esi, esi test [rsp+48h+var_38], cx setnz sil lea ecx, [rdx+rsi*4] mov edx, eax or edx, ecx jz short loc_66F90 xor ebx, ebx test ecx, ecx jz short loc_66F8E test eax, eax jz short loc_66F87 cmp ecx, 7 jnz short loc_66F8E cmp eax, 4 ja short loc_66F8E mov ecx, 16h bt ecx, eax jnb short loc_66F8E mov ebx, 10h jmp short loc_66F8E loc_66F87: mov ebx, 8 mov eax, ecx loc_66F8E: or ebx, eax loc_66F90: mov eax, ebx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long OpenSubdiv::v3_6_0::Far::PatchBuilder::GetRegularPatchBoundaryMask( OpenSubdiv::v3_6_0::Far::PatchBuilder *this, int a2, int a3, int a4) { unsigned int v4; // ebx _QWORD *v7; // r12 unsigned __int8 v8; // cl unsigned __int8 v9; // dl unsigned int v10; // eax int v11; // ecx int v12; // ebx int v13; // ecx __int16 v15[4]; // [rsp+Ch] [rbp-3Ch] BYREF _BYTE v16[52]; // [rsp+14h] [rbp-34h] BYREF v4 = 0; if ( !*((_BYTE *)this + 36) ) { v7 = *(_QWORD **)(*(_QWORD *)(*((_QWORD *)this + 1) + 48LL) + 8LL * a2); OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVTags(v7, a3, (long long)v15, a4); v4 = 0; if ( (OpenSubdiv::v3_6_0::Vtr::internal::Level::VTag::BitwiseOr(v15, *((_DWORD *)this + 8)) & 0x2000) != 0 ) { OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceETags(v7, a3, (long long)v16, a4); v8 = *((_BYTE *)this + 25) ^ 1; v9 = (4 * v8) | 3; v10 = ((v9 & v16[0]) != 0) + 2 * ((v9 & v16[1]) != 0) + 4 * ((v9 & v16[2]) != 0); if ( *((_DWORD *)this + 8) == 4 ) { return v10 + 8 * ((v9 & v16[3]) != 0); } else { v11 = ((((unsigned __int16)(v8 << 13) | 5) & v15[0]) != 0) + 2 * ((((unsigned __int16)(v8 << 13) | 5) & v15[1]) != 0) + 4 * ((((unsigned __int16)(v8 << 13) | 5) & v15[2]) != 0); if ( v11 | v10 ) { v12 = 0; if ( v11 ) { if ( v10 ) { if ( v11 == 7 && v10 <= 4 ) { v13 = 22; if ( _bittest(&v13, v10) ) v12 = 16; } } else { v12 = 8; v10 = v11; } } return v10 | v12; } } } } return v4; }
GetRegularPatchBoundaryMask: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 XOR EBX,EBX CMP byte ptr [RDI + 0x24],0x0 JNZ 0x00166f90 MOV EBP,ECX MOV R15D,EDX MOV R14,RDI MOV RAX,qword ptr [RDI + 0x8] MOVSXD RCX,ESI MOV RAX,qword ptr [RAX + 0x30] MOV R12,qword ptr [RAX + RCX*0x8] LEA RBX,[RSP + 0xc] MOV RDI,R12 MOV ESI,EDX MOV RDX,RBX MOV ECX,EBP CALL 0x00138530 MOV ESI,dword ptr [R14 + 0x20] MOV RDI,RBX CALL 0x00138580 XOR EBX,EBX BT EAX,0xd JNC 0x00166f90 LEA R13,[RSP + 0x14] MOV RDI,R12 MOV ESI,R15D MOV RDX,R13 MOV ECX,EBP CALL 0x00138400 MOV CL,byte ptr [R14 + 0x19] XOR CL,0x1 LEA EDX,[RCX*0x4] OR DL,0x3 XOR EAX,EAX TEST byte ptr [R13],DL SETNZ AL XOR ESI,ESI TEST byte ptr [R13 + 0x1],DL SETNZ SIL LEA EAX,[RAX + RSI*0x2] XOR ESI,ESI TEST byte ptr [R13 + 0x2],DL SETNZ SIL LEA EAX,[RAX + RSI*0x4] CMP dword ptr [R14 + 0x20],0x4 JNZ 0x00166f2d XOR ECX,ECX TEST byte ptr [RSP + 0x17],DL SETNZ CL LEA EBX,[RAX + RCX*0x8] JMP 0x00166f90 LAB_00166f2d: MOVZX ECX,CL SHL ECX,0xd OR ECX,0x5 XOR EDX,EDX TEST word ptr [RSP + 0xc],CX SETNZ DL XOR ESI,ESI TEST word ptr [RSP + 0xe],CX SETNZ SIL LEA EDX,[RDX + RSI*0x2] XOR ESI,ESI TEST word ptr [RSP + 0x10],CX SETNZ SIL LEA ECX,[RDX + RSI*0x4] MOV EDX,EAX OR EDX,ECX JZ 0x00166f90 XOR EBX,EBX TEST ECX,ECX JZ 0x00166f8e TEST EAX,EAX JZ 0x00166f87 CMP ECX,0x7 JNZ 0x00166f8e CMP EAX,0x4 JA 0x00166f8e MOV ECX,0x16 BT ECX,EAX JNC 0x00166f8e MOV EBX,0x10 JMP 0x00166f8e LAB_00166f87: MOV EBX,0x8 MOV EAX,ECX LAB_00166f8e: OR EBX,EAX LAB_00166f90: MOV EAX,EBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Far::PatchBuilder::GetRegularPatchBoundaryMask(int, int, int) const */ uint __thiscall OpenSubdiv::v3_6_0::Far::PatchBuilder::GetRegularPatchBoundaryMask (PatchBuilder *this,int param_1,int param_2,int param_3) { Level *this_00; uint uVar1; ushort uVar2; uint uVar3; byte bVar4; uint uVar5; ushort local_3c; ushort local_3a; ushort local_38; ETag local_34; byte local_33; byte local_32; byte local_31; uVar5 = 0; if (this[0x24] == (PatchBuilder)0x0) { this_00 = *(Level **)(*(long *)(*(long *)(this + 8) + 0x30) + (long)param_1 * 8); Vtr::internal::Level::getFaceVTags(this_00,param_2,(VTag *)&local_3c,param_3); uVar1 = Vtr::internal::Level::VTag::BitwiseOr((VTag *)&local_3c,*(int *)(this + 0x20)); uVar5 = 0; if ((uVar1 >> 0xd & 1) != 0) { Vtr::internal::Level::getFaceETags(this_00,param_2,&local_34,param_3); bVar4 = (char)((byte)this[0x19] ^ 1) * '\x04' | 3; uVar1 = (uint)(((byte)local_34 & bVar4) != 0) + (uint)((local_33 & bVar4) != 0) * 2 + (uint)((local_32 & bVar4) != 0) * 4; if (*(int *)(this + 0x20) == 4) { uVar5 = uVar1 + (uint)((local_31 & bVar4) != 0) * 8; } else { uVar2 = (ushort)(((byte)this[0x19] ^ 1) << 0xd) | 5; uVar3 = (uint)((local_3c & uVar2) != 0) + (uint)((local_3a & uVar2) != 0) * 2 + (uint)((local_38 & uVar2) != 0) * 4; if (uVar1 != 0 || uVar3 != 0) { uVar5 = 0; if (uVar3 != 0) { if (uVar1 == 0) { uVar5 = 8; uVar1 = uVar3; } else if (((uVar3 == 7) && (uVar5 = 0, uVar1 < 5)) && ((0x16U >> uVar1 & 1) != 0)) { uVar5 = 0x10; } } uVar5 = uVar5 | uVar1; } } } } return uVar5; }
33,783
evmone::instr::core::calldataload(evmone::StackTop, evmone::ExecutionState&)
corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/instructions.hpp
inline void calldataload(StackTop stack, ExecutionState& state) noexcept { auto& index = stack.top(); if (state.msg->input_size < index) index = 0; else { const auto begin = static_cast<size_t>(index); const auto end = std::min(begin + 32, state.msg->input_size); uint8_t data[32] = {}; for (size_t i = 0; i < (end - begin); ++i) data[i] = state.msg->input_data[begin + i]; index = intx::be::load<uint256>(data); } }
O0
cpp
evmone::instr::core::calldataload(evmone::StackTop, evmone::ExecutionState&): pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) leaq -0x8(%rbp), %rdi callq 0x611d0 movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x20(%rax), %rdi addq $0x48, %rdi movq -0x18(%rbp), %rsi callq 0x69080 testb $0x1, %al jne 0x68f7b jmp 0x68fae leaq -0x38(%rbp), %rdi xorl %esi, %esi callq 0x61cc0 movq -0x18(%rbp), %rax movq -0x38(%rbp), %rcx movq %rcx, (%rax) movq -0x30(%rbp), %rcx movq %rcx, 0x8(%rax) movq -0x28(%rbp), %rcx movq %rcx, 0x10(%rax) movq -0x20(%rbp), %rcx movq %rcx, 0x18(%rax) jmp 0x69075 movq -0x18(%rbp), %rdi callq 0x68550 movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax addq $0x20, %rax movq %rax, -0x50(%rbp) movq -0x10(%rbp), %rax movq 0x20(%rax), %rsi addq $0x48, %rsi leaq -0x50(%rbp), %rdi callq 0x3a680 movq (%rax), %rax movq %rax, -0x48(%rbp) leaq -0x70(%rbp), %rdi xorl %esi, %esi movl $0x20, %edx callq 0x231c0 movq $0x0, -0x78(%rbp) movq -0x78(%rbp), %rax movq -0x48(%rbp), %rcx subq -0x40(%rbp), %rcx cmpq %rcx, %rax jae 0x69039 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq 0x40(%rax), %rax movq -0x40(%rbp), %rcx addq -0x78(%rbp), %rcx movb (%rax,%rcx), %cl movq -0x78(%rbp), %rax movb %cl, -0x70(%rbp,%rax) movq -0x78(%rbp), %rax addq $0x1, %rax movq %rax, -0x78(%rbp) jmp 0x68ffb leaq -0x98(%rbp), %rdi leaq -0x70(%rbp), %rsi callq 0x68910 movq -0x18(%rbp), %rax movq -0x98(%rbp), %rcx movq %rcx, (%rax) movq -0x90(%rbp), %rcx movq %rcx, 0x8(%rax) movq -0x88(%rbp), %rcx movq %rcx, 0x10(%rax) movq -0x80(%rbp), %rcx movq %rcx, 0x18(%rax) addq $0xa0, %rsp popq %rbp retq nop
_ZN6evmone5instr4core12calldataloadENS_8StackTopERNS_14ExecutionStateE: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_8], rdi mov [rbp+var_10], rsi lea rdi, [rbp+var_8]; this call _ZN6evmone8StackTop3topEv; evmone::StackTop::top(void) mov [rbp+var_18], rax mov rax, [rbp+var_10] mov rdi, [rax+20h] add rdi, 48h ; 'H' mov rsi, [rbp+var_18] call _ZN4intxltILj256EmvEEbRKT0_RKNS_4uintIXT_EEE; intx::operator<<256u,ulong,void>(ulong const&,intx::uint<256u> const&) test al, 1 jnz short loc_68F7B jmp short loc_68FAE loc_68F7B: lea rdi, [rbp+var_38] xor esi, esi call _ZN4intx4uintILj256EEC2IJiEvEEDpT_; intx::uint<256u>::uint<int,void>(int) mov rax, [rbp+var_18] mov rcx, [rbp+var_38] mov [rax], rcx mov rcx, [rbp+var_30] mov [rax+8], rcx mov rcx, [rbp+var_28] mov [rax+10h], rcx mov rcx, [rbp+var_20] mov [rax+18h], rcx jmp loc_69075 loc_68FAE: mov rdi, [rbp+var_18] call _ZNK4intx4uintILj256EEcvT_ImvEEv; intx::uint<256u>::operator ulong<ulong,void>(void) mov [rbp+var_40], rax mov rax, [rbp+var_40] add rax, 20h ; ' ' mov [rbp+var_50], rax mov rax, [rbp+var_10] mov rsi, [rax+20h] add rsi, 48h ; 'H' lea rdi, [rbp+var_50] call _ZSt3minImERKT_S2_S2_; std::min<ulong>(ulong const&,ulong const&) mov rax, [rax] mov [rbp+var_48], rax lea rdi, [rbp+var_70] xor esi, esi mov edx, 20h ; ' ' call _memset mov [rbp+var_78], 0 loc_68FFB: mov rax, [rbp+var_78] mov rcx, [rbp+var_48] sub rcx, [rbp+var_40] cmp rax, rcx jnb short loc_69039 mov rax, [rbp+var_10] mov rax, [rax+20h] mov rax, [rax+40h] mov rcx, [rbp+var_40] add rcx, [rbp+var_78] mov cl, [rax+rcx] mov rax, [rbp+var_78] mov [rbp+rax+var_70], cl mov rax, [rbp+var_78] add rax, 1 mov [rbp+var_78], rax jmp short loc_68FFB loc_69039: lea rdi, [rbp+var_98] lea rsi, [rbp+var_70] call _ZN4intx2be4loadINS_4uintILj256EEELj32EEET_RAT0__Kh; intx::be::load<intx::uint<256u>,32u>(uchar const(&)[32u]) mov rax, [rbp+var_18] mov rcx, [rbp+var_98] mov [rax], rcx mov rcx, [rbp+var_90] mov [rax+8], rcx mov rcx, [rbp+var_88] mov [rax+10h], rcx mov rcx, [rbp+var_80] mov [rax+18h], rcx loc_69075: add rsp, 0A0h pop rbp retn
_QWORD * evmone::instr::core::calldataload(long long a1, long long a2) { _QWORD *result; // rax _QWORD v3[4]; // [rsp+8h] [rbp-98h] BYREF unsigned long long i; // [rsp+28h] [rbp-78h] _QWORD v5[4]; // [rsp+30h] [rbp-70h] BYREF long long v6; // [rsp+50h] [rbp-50h] BYREF long long v7; // [rsp+58h] [rbp-48h] long long v8; // [rsp+60h] [rbp-40h] _QWORD v9[4]; // [rsp+68h] [rbp-38h] BYREF _QWORD *v10; // [rsp+88h] [rbp-18h] long long v11; // [rsp+90h] [rbp-10h] long long v12; // [rsp+98h] [rbp-8h] BYREF v12 = a1; v11 = a2; v10 = (_QWORD *)evmone::StackTop::top((evmone::StackTop *)&v12); if ( (intx::operator<<256u,unsigned long,void>(*(_QWORD *)(a2 + 32) + 72LL, v10) & 1) != 0 ) { intx::uint<256u>::uint<int,void>(v9, 0); result = v10; *v10 = v9[0]; result[1] = v9[1]; result[2] = v9[2]; result[3] = v9[3]; } else { v8 = intx::uint<256u>::operator unsigned long<unsigned long,void>((long long)v10); v6 = v8 + 32; v7 = *std::min<unsigned long>(&v6, (_QWORD *)(*(_QWORD *)(v11 + 32) + 72LL)); memset(v5, 0LL, sizeof(v5)); for ( i = 0LL; i < v7 - v8; ++i ) *((_BYTE *)v5 + i) = *(_BYTE *)(*(_QWORD *)(*(_QWORD *)(v11 + 32) + 64LL) + i + v8); intx::be::load<intx::uint<256u>,32u>(v3, v5); result = v10; *v10 = v3[0]; result[1] = v3[1]; result[2] = v3[2]; result[3] = v3[3]; } return result; }
calldataload: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI LEA RDI,[RBP + -0x8] CALL 0x001611d0 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x20] ADD RDI,0x48 MOV RSI,qword ptr [RBP + -0x18] CALL 0x00169080 TEST AL,0x1 JNZ 0x00168f7b JMP 0x00168fae LAB_00168f7b: LEA RDI,[RBP + -0x38] XOR ESI,ESI CALL 0x00161cc0 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x18],RCX JMP 0x00169075 LAB_00168fae: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00168550 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] ADD RAX,0x20 MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x20] ADD RSI,0x48 LEA RDI,[RBP + -0x50] CALL 0x0013a680 MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x48],RAX LEA RDI,[RBP + -0x70] XOR ESI,ESI MOV EDX,0x20 CALL 0x001231c0 MOV qword ptr [RBP + -0x78],0x0 LAB_00168ffb: MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x48] SUB RCX,qword ptr [RBP + -0x40] CMP RAX,RCX JNC 0x00169039 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x40] ADD RCX,qword ptr [RBP + -0x78] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x78] MOV byte ptr [RBP + RAX*0x1 + -0x70],CL MOV RAX,qword ptr [RBP + -0x78] ADD RAX,0x1 MOV qword ptr [RBP + -0x78],RAX JMP 0x00168ffb LAB_00169039: LEA RDI,[RBP + -0x98] LEA RSI,[RBP + -0x70] CALL 0x00168910 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x98] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x90] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x88] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x80] MOV qword ptr [RAX + 0x18],RCX LAB_00169075: ADD RSP,0xa0 POP RBP RET
/* evmone::instr::core::calldataload(evmone::StackTop, evmone::ExecutionState&) */ void evmone::instr::core::calldataload(int8 param_1,long param_2) { bool bVar1; ulong *puVar2; int8 local_a0; int8 local_98; int8 local_90; int8 local_88; ulong local_80; unsigned_char local_78 [32]; ulong local_58; ulong local_50; ulong local_48; int8 local_40; int8 local_38; int8 local_30; int8 local_28; uint *local_20; long local_18; int8 local_10; local_18 = param_2; local_10 = param_1; local_20 = (uint *)StackTop::top((StackTop *)&local_10); bVar1 = intx::operator<((ulong *)(*(long *)(local_18 + 0x20) + 0x48),local_20); if (bVar1) { intx::uint<256u>::uint<int,void>((uint<256u> *)&local_40,0); *(int8 *)local_20 = local_40; *(int8 *)(local_20 + 8) = local_38; *(int8 *)(local_20 + 0x10) = local_30; *(int8 *)(local_20 + 0x18) = local_28; } else { local_48 = intx::uint::operator_cast_to_unsigned_long(local_20); local_58 = local_48 + 0x20; puVar2 = std::min<unsigned_long>(&local_58,(ulong *)(*(long *)(local_18 + 0x20) + 0x48)); local_50 = *puVar2; memset(local_78,0,0x20); for (local_80 = 0; local_80 < local_50 - local_48; local_80 = local_80 + 1) { local_78[local_80] = *(unsigned_char *)(*(long *)(*(long *)(local_18 + 0x20) + 0x40) + local_48 + local_80); } intx::be::load<intx::uint<256u>,32u>((be *)&local_a0,local_78); *(int8 *)local_20 = local_a0; *(int8 *)(local_20 + 8) = local_98; *(int8 *)(local_20 + 0x10) = local_90; *(int8 *)(local_20 + 0x18) = local_88; } return; }
33,784
js_finrec_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_finrec_finalizer(JSRuntime *rt, JSValue val) { JSFinalizationRegistryData *frd = JS_GetOpaque(val, JS_CLASS_FINALIZATION_REGISTRY); if (frd) { struct list_head *el, *el1; /* first pass to remove the weak ref entries and avoid having them modified by freeing a token / held value. */ list_for_each_safe(el, el1, &frd->entries) { JSFinRecEntry *fre = list_entry(el, JSFinRecEntry, link); delete_finrec_weakref(rt, fre); } /* second pass to actually free all objects. */ list_for_each_safe(el, el1, &frd->entries) { JSFinRecEntry *fre = list_entry(el, JSFinRecEntry, link); list_del(&fre->link); JS_FreeValueRT(rt, fre->held_val); JS_FreeValueRT(rt, fre->token); js_free_rt(rt, fre); } JS_FreeValueRT(rt, frd->cb); js_free_rt(rt, frd); } }
O2
c
js_finrec_finalizer: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax cmpl $-0x1, %edx jne 0x6e2e3 cmpw $0x3b, 0x6(%rsi) jne 0x6e2e3 movq 0x30(%rsi), %r14 testq %r14, %r14 je 0x6e2e3 movq %rdi, %rbx movq 0x8(%r14), %rsi cmpq %r14, %rsi je 0x6e2ef movq 0x8(%rsi), %r15 movq %rbx, %rdi callq 0x6e3e6 movq %r15, %rsi jmp 0x6e2cd addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq 0x8(%r14), %r15 cmpq %r14, %r15 je 0x6e33e movq (%r15), %rax movq 0x8(%r15), %r12 movq %r12, 0x8(%rax) movq %rax, (%r12) xorps %xmm0, %xmm0 movups %xmm0, (%r15) movq 0x30(%r15), %rsi movq 0x38(%r15), %rdx movq %rbx, %rdi callq 0x174b5 movq 0x40(%r15), %rsi movq 0x48(%r15), %rdx movq %rbx, %rdi callq 0x174b5 movq %rbx, %rdi movq %r15, %rsi callq 0x1654f movq %r12, %r15 jmp 0x6e2f3 movq 0x18(%r14), %rsi movq 0x20(%r14), %rdx movq %rbx, %rdi callq 0x174b5 movq %rbx, %rdi movq %r14, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x1654f
js_finrec_finalizer: push r15 push r14 push r12 push rbx push rax cmp edx, 0FFFFFFFFh jnz short loc_6E2E3 cmp word ptr [rsi+6], 3Bh ; ';' jnz short loc_6E2E3 mov r14, [rsi+30h] test r14, r14 jz short loc_6E2E3 mov rbx, rdi mov rsi, [r14+8] loc_6E2CD: cmp rsi, r14 jz short loc_6E2EF mov r15, [rsi+8] mov rdi, rbx call delete_finrec_weakref mov rsi, r15 jmp short loc_6E2CD loc_6E2E3: add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn loc_6E2EF: mov r15, [r14+8] loc_6E2F3: cmp r15, r14 jz short loc_6E33E mov rax, [r15] mov r12, [r15+8] mov [rax+8], r12 mov [r12], rax xorps xmm0, xmm0 movups xmmword ptr [r15], xmm0 mov rsi, [r15+30h] mov rdx, [r15+38h] mov rdi, rbx call JS_FreeValueRT mov rsi, [r15+40h] mov rdx, [r15+48h] mov rdi, rbx call JS_FreeValueRT mov rdi, rbx mov rsi, r15 call js_free_rt mov r15, r12 jmp short loc_6E2F3 loc_6E33E: mov rsi, [r14+18h] mov rdx, [r14+20h] mov rdi, rbx call JS_FreeValueRT mov rdi, rbx mov rsi, r14 add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp js_free_rt
long long js_finrec_finalizer(long long a1, long long a2, int a3) { long long v3; // r14 long long i; // rsi long long v5; // r15 long long j; // r15 long long v7; // rax _QWORD *v8; // r12 long long result; // rax if ( a3 == -1 && *(_WORD *)(a2 + 6) == 59 ) { v3 = *(_QWORD *)(a2 + 48); if ( v3 ) { for ( i = *(_QWORD *)(v3 + 8); i != v3; i = v5 ) { v5 = *(_QWORD *)(i + 8); delete_finrec_weakref(a1); } for ( j = *(_QWORD *)(v3 + 8); j != v3; j = (long long)v8 ) { v7 = *(_QWORD *)j; v8 = *(_QWORD **)(j + 8); *(_QWORD *)(v7 + 8) = v8; *v8 = v7; *(_OWORD *)j = 0LL; JS_FreeValueRT(a1, *(unsigned int **)(j + 48), *(_QWORD *)(j + 56)); JS_FreeValueRT(a1, *(unsigned int **)(j + 64), *(_QWORD *)(j + 72)); js_free_rt(a1, j); } JS_FreeValueRT(a1, *(unsigned int **)(v3 + 24), *(_QWORD *)(v3 + 32)); return js_free_rt(a1, v3); } } return result; }
js_finrec_finalizer: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX CMP EDX,-0x1 JNZ 0x0016e2e3 CMP word ptr [RSI + 0x6],0x3b JNZ 0x0016e2e3 MOV R14,qword ptr [RSI + 0x30] TEST R14,R14 JZ 0x0016e2e3 MOV RBX,RDI MOV RSI,qword ptr [R14 + 0x8] LAB_0016e2cd: CMP RSI,R14 JZ 0x0016e2ef MOV R15,qword ptr [RSI + 0x8] MOV RDI,RBX CALL 0x0016e3e6 MOV RSI,R15 JMP 0x0016e2cd LAB_0016e2e3: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET LAB_0016e2ef: MOV R15,qword ptr [R14 + 0x8] LAB_0016e2f3: CMP R15,R14 JZ 0x0016e33e MOV RAX,qword ptr [R15] MOV R12,qword ptr [R15 + 0x8] MOV qword ptr [RAX + 0x8],R12 MOV qword ptr [R12],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15],XMM0 MOV RSI,qword ptr [R15 + 0x30] MOV RDX,qword ptr [R15 + 0x38] MOV RDI,RBX CALL 0x001174b5 MOV RSI,qword ptr [R15 + 0x40] MOV RDX,qword ptr [R15 + 0x48] MOV RDI,RBX CALL 0x001174b5 MOV RDI,RBX MOV RSI,R15 CALL 0x0011654f MOV R15,R12 JMP 0x0016e2f3 LAB_0016e33e: MOV RSI,qword ptr [R14 + 0x18] MOV RDX,qword ptr [R14 + 0x20] MOV RDI,RBX CALL 0x001174b5 MOV RDI,RBX MOV RSI,R14 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x0011654f
void js_finrec_finalizer(int8 param_1,long param_2,int param_3) { long *plVar1; long lVar2; long *plVar3; long *plVar4; if (((param_3 == -1) && (*(short *)(param_2 + 6) == 0x3b)) && (plVar1 = *(long **)(param_2 + 0x30), plVar1 != (long *)0x0)) { plVar4 = (long *)plVar1[1]; while (plVar4 != plVar1) { plVar4 = (long *)plVar4[1]; delete_finrec_weakref(param_1); } plVar4 = (long *)plVar1[1]; while (plVar4 != plVar1) { lVar2 = *plVar4; plVar3 = (long *)plVar4[1]; *(long **)(lVar2 + 8) = plVar3; *plVar3 = lVar2; *plVar4 = 0; plVar4[1] = 0; JS_FreeValueRT(param_1,plVar4[6],plVar4[7]); JS_FreeValueRT(param_1,plVar4[8],plVar4[9]); js_free_rt(param_1,plVar4); plVar4 = plVar3; } JS_FreeValueRT(param_1,plVar1[3],plVar1[4]); js_free_rt(param_1,plVar1); return; } return; }
33,785
google::protobuf::PlanAllocationSize(google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto> const&, google::protobuf::internal::FlatAllocator&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
static void PlanAllocationSize( const RepeatedPtrField<DescriptorProto>& messages, internal::FlatAllocator& alloc) { alloc.PlanArray<Descriptor>(messages.size()); alloc.PlanArray<std::string>(2 * messages.size()); // name + full_name for (const auto& message : messages) { if (message.has_options()) alloc.PlanArray<MessageOptions>(1); PlanAllocationSize(message.nested_type(), alloc); PlanAllocationSize(message.field(), alloc); PlanAllocationSize(message.extension(), alloc); PlanAllocationSize(message.extension_range(), alloc); alloc.PlanArray<Descriptor::ReservedRange>(message.reserved_range_size()); alloc.PlanArray<const std::string*>(message.reserved_name_size()); alloc.PlanArray<std::string>(message.reserved_name_size()); PlanAllocationSize(message.enum_type(), alloc); PlanAllocationSize(message.oneof_decl(), alloc); } }
O0
cpp
google::protobuf::PlanAllocationSize(google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto> const&, google::protobuf::internal::FlatAllocator&): subq $0x58, %rsp movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x50(%rsp), %rdi callq 0x28cef0 movq 0x18(%rsp), %rdi movl %eax, %esi callq 0x252c50 movq 0x48(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x50(%rsp), %rdi callq 0x28cef0 movq 0x20(%rsp), %rdi movl %eax, %esi shll %esi callq 0x252960 movq 0x50(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rdi callq 0x290290 movq %rax, 0x38(%rsp) movq 0x40(%rsp), %rdi callq 0x2902d0 movq %rax, 0x30(%rsp) leaq 0x38(%rsp), %rdi leaq 0x30(%rsp), %rsi callq 0x290330 testb $0x1, %al jne 0x273360 jmp 0x273485 leaq 0x38(%rsp), %rdi callq 0x290350 movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rdi callq 0x285740 testb $0x1, %al jne 0x27337f jmp 0x27338e movq 0x48(%rsp), %rdi movl $0x1, %esi callq 0x273e50 movq 0x28(%rsp), %rdi callq 0x290370 movq %rax, %rdi movq 0x48(%rsp), %rsi callq 0x2732d0 movq 0x28(%rsp), %rdi callq 0x290390 movq %rax, %rdi movq 0x48(%rsp), %rsi callq 0x2735e0 movq 0x28(%rsp), %rdi callq 0x2903b0 movq %rax, %rdi movq 0x48(%rsp), %rsi callq 0x2735e0 movq 0x28(%rsp), %rdi callq 0x2903d0 movq %rax, %rdi movq 0x48(%rsp), %rsi callq 0x273f40 movq 0x48(%rsp), %rax movq %rax, (%rsp) movq 0x28(%rsp), %rdi callq 0x2856c0 movq (%rsp), %rdi movl %eax, %esi callq 0x273ff0 movq 0x48(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x28(%rsp), %rdi callq 0x285710 movq 0x8(%rsp), %rdi movl %eax, %esi callq 0x2740f0 movq 0x48(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x28(%rsp), %rdi callq 0x285710 movq 0x10(%rsp), %rdi movl %eax, %esi callq 0x252960 movq 0x28(%rsp), %rdi callq 0x2903f0 movq %rax, %rdi movq 0x48(%rsp), %rsi callq 0x273490 movq 0x28(%rsp), %rdi callq 0x290410 movq %rax, %rdi movq 0x48(%rsp), %rsi callq 0x2741f0 leaq 0x38(%rsp), %rdi callq 0x290430 jmp 0x273348 addq $0x58, %rsp retq nopw (%rax,%rax)
_ZN6google8protobufL18PlanAllocationSizeERKNS0_16RepeatedPtrFieldINS0_15DescriptorProtoEEERNS0_8internal13FlatAllocatorE: sub rsp, 58h mov [rsp+58h+var_8], rdi mov [rsp+58h+var_10], rsi mov rax, [rsp+58h+var_10] mov [rsp+58h+var_40], rax mov rdi, [rsp+58h+var_8] call _ZNK6google8protobuf16RepeatedPtrFieldINS0_15DescriptorProtoEE4sizeEv; google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto>::size(void) mov rdi, [rsp+58h+var_40] mov esi, eax call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayINS0_10DescriptorEEEvi; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<google::protobuf::Descriptor>(int) mov rax, [rsp+58h+var_10] mov [rsp+58h+var_38], rax mov rdi, [rsp+58h+var_8] call _ZNK6google8protobuf16RepeatedPtrFieldINS0_15DescriptorProtoEE4sizeEv; google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto>::size(void) mov rdi, [rsp+58h+var_38] mov esi, eax shl esi, 1 call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayIS8_EEvi; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<std::string>(int) mov rax, [rsp+58h+var_8] mov [rsp+58h+var_18], rax mov rdi, [rsp+58h+var_18] call _ZNK6google8protobuf16RepeatedPtrFieldINS0_15DescriptorProtoEE5beginEv; google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto>::begin(void) mov [rsp+58h+var_20], rax mov rdi, [rsp+58h+var_18] call _ZNK6google8protobuf16RepeatedPtrFieldINS0_15DescriptorProtoEE3endEv; google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto>::end(void) mov [rsp+58h+var_28], rax loc_273348: lea rdi, [rsp+58h+var_20] lea rsi, [rsp+58h+var_28] call _ZN6google8protobuf8internalneERKNS1_19RepeatedPtrIteratorIKNS0_15DescriptorProtoEEES7_; google::protobuf::internal::operator!=(google::protobuf::internal::RepeatedPtrIterator<google::protobuf::DescriptorProto const> const&,google::protobuf::internal::RepeatedPtrIterator<google::protobuf::DescriptorProto const> const&) test al, 1 jnz short loc_273360 jmp loc_273485 loc_273360: lea rdi, [rsp+58h+var_20] call _ZNK6google8protobuf8internal19RepeatedPtrIteratorIKNS0_15DescriptorProtoEEdeEv; google::protobuf::internal::RepeatedPtrIterator<google::protobuf::DescriptorProto const>::operator*(void) mov [rsp+58h+var_30], rax mov rdi, [rsp+58h+var_30]; this call _ZNK6google8protobuf15DescriptorProto11has_optionsEv; google::protobuf::DescriptorProto::has_options(void) test al, 1 jnz short loc_27337F jmp short loc_27338E loc_27337F: mov rdi, [rsp+58h+var_10] mov esi, 1 call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayISB_EEvi; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<google::protobuf::MessageOptions>(int) loc_27338E: mov rdi, [rsp+58h+var_30]; this call _ZNK6google8protobuf15DescriptorProto11nested_typeEv; google::protobuf::DescriptorProto::nested_type(void) mov rdi, rax mov rsi, [rsp+58h+var_10] call _ZN6google8protobufL18PlanAllocationSizeERKNS0_16RepeatedPtrFieldINS0_15DescriptorProtoEEERNS0_8internal13FlatAllocatorE; google::protobuf::PlanAllocationSize(google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto> const&,google::protobuf::internal::FlatAllocator &) mov rdi, [rsp+58h+var_30]; this call _ZNK6google8protobuf15DescriptorProto5fieldEv; google::protobuf::DescriptorProto::field(void) mov rdi, rax mov rsi, [rsp+58h+var_10] call _ZN6google8protobufL18PlanAllocationSizeERKNS0_16RepeatedPtrFieldINS0_20FieldDescriptorProtoEEERNS0_8internal13FlatAllocatorE; google::protobuf::PlanAllocationSize(google::protobuf::RepeatedPtrField<google::protobuf::FieldDescriptorProto> const&,google::protobuf::internal::FlatAllocator &) mov rdi, [rsp+58h+var_30]; this call _ZNK6google8protobuf15DescriptorProto9extensionEv; google::protobuf::DescriptorProto::extension(void) mov rdi, rax mov rsi, [rsp+58h+var_10] call _ZN6google8protobufL18PlanAllocationSizeERKNS0_16RepeatedPtrFieldINS0_20FieldDescriptorProtoEEERNS0_8internal13FlatAllocatorE; google::protobuf::PlanAllocationSize(google::protobuf::RepeatedPtrField<google::protobuf::FieldDescriptorProto> const&,google::protobuf::internal::FlatAllocator &) mov rdi, [rsp+58h+var_30]; this call _ZNK6google8protobuf15DescriptorProto15extension_rangeEv; google::protobuf::DescriptorProto::extension_range(void) mov rdi, rax mov rsi, [rsp+58h+var_10] call _ZN6google8protobufL18PlanAllocationSizeERKNS0_16RepeatedPtrFieldINS0_30DescriptorProto_ExtensionRangeEEERNS0_8internal13FlatAllocatorE; google::protobuf::PlanAllocationSize(google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto_ExtensionRange> const&,google::protobuf::internal::FlatAllocator &) mov rax, [rsp+58h+var_10] mov [rsp+58h+var_58], rax mov rdi, [rsp+58h+var_30]; this call _ZNK6google8protobuf15DescriptorProto19reserved_range_sizeEv; google::protobuf::DescriptorProto::reserved_range_size(void) mov rdi, [rsp+58h+var_58] mov esi, eax call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayINS0_10Descriptor13ReservedRangeEEEvi; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<google::protobuf::Descriptor::ReservedRange>(int) mov rax, [rsp+58h+var_10] mov [rsp+58h+var_50], rax mov rdi, [rsp+58h+var_30]; this call _ZNK6google8protobuf15DescriptorProto18reserved_name_sizeEv; google::protobuf::DescriptorProto::reserved_name_size(void) mov rdi, [rsp+58h+var_50] mov esi, eax call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayIPKS8_EEvi; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<std::string const*>(int) mov rax, [rsp+58h+var_10] mov [rsp+58h+var_48], rax mov rdi, [rsp+58h+var_30]; this call _ZNK6google8protobuf15DescriptorProto18reserved_name_sizeEv; google::protobuf::DescriptorProto::reserved_name_size(void) mov rdi, [rsp+58h+var_48] mov esi, eax call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayIS8_EEvi; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<std::string>(int) mov rdi, [rsp+58h+var_30]; this call _ZNK6google8protobuf15DescriptorProto9enum_typeEv; google::protobuf::DescriptorProto::enum_type(void) mov rdi, rax mov rsi, [rsp+58h+var_10] call _ZN6google8protobufL18PlanAllocationSizeERKNS0_16RepeatedPtrFieldINS0_19EnumDescriptorProtoEEERNS0_8internal13FlatAllocatorE; google::protobuf::PlanAllocationSize(google::protobuf::RepeatedPtrField<google::protobuf::EnumDescriptorProto> const&,google::protobuf::internal::FlatAllocator &) mov rdi, [rsp+58h+var_30]; this call _ZNK6google8protobuf15DescriptorProto10oneof_declEv; google::protobuf::DescriptorProto::oneof_decl(void) mov rdi, rax mov rsi, [rsp+58h+var_10] call _ZN6google8protobufL18PlanAllocationSizeERKNS0_16RepeatedPtrFieldINS0_20OneofDescriptorProtoEEERNS0_8internal13FlatAllocatorE; google::protobuf::PlanAllocationSize(google::protobuf::RepeatedPtrField<google::protobuf::OneofDescriptorProto> const&,google::protobuf::internal::FlatAllocator &) lea rdi, [rsp+58h+var_20] call _ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_15DescriptorProtoEEppEv; google::protobuf::internal::RepeatedPtrIterator<google::protobuf::DescriptorProto const>::operator++(void) jmp loc_273348 loc_273485: add rsp, 58h retn
long long google::protobuf::PlanAllocationSize(long long a1, long long a2) { int v2; // eax int v3; // eax long long result; // rax int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d long long v9; // rax long long v10; // rax long long v11; // rax long long v12; // rax int v13; // eax int v14; // edx int v15; // ecx int v16; // r8d int v17; // r9d int v18; // eax int v19; // edx int v20; // ecx int v21; // r8d int v22; // r9d int v23; // eax long long v24; // rax long long v25; // rax int v26; // [rsp+0h] [rbp-58h] int v27; // [rsp+0h] [rbp-58h] int v28; // [rsp+0h] [rbp-58h] int v29; // [rsp+8h] [rbp-50h] int v30; // [rsp+8h] [rbp-50h] long long v31; // [rsp+10h] [rbp-48h] int v32; // [rsp+10h] [rbp-48h] int v33; // [rsp+18h] [rbp-40h] int v34; // [rsp+18h] [rbp-40h] int v35; // [rsp+20h] [rbp-38h] int v36; // [rsp+20h] [rbp-38h] google::protobuf::DescriptorProto *v37; // [rsp+28h] [rbp-30h] google::protobuf::DescriptorProto *v38; // [rsp+28h] [rbp-30h] google::protobuf::DescriptorProto *v39; // [rsp+28h] [rbp-30h] long long v40; // [rsp+30h] [rbp-28h] BYREF _QWORD v41[2]; // [rsp+38h] [rbp-20h] BYREF long long v42; // [rsp+48h] [rbp-10h] long long v43; // [rsp+50h] [rbp-8h] v43 = a1; v42 = a2; v33 = a2; v2 = google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto>::size(a1); google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<google::protobuf::Descriptor>( a2, v2); v35 = a2; v3 = google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto>::size(a1); google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<std::string>( a2, 2 * v3); v41[1] = a1; v41[0] = google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto>::begin(a1); v40 = google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto>::end(a1); while ( 1 ) { result = google::protobuf::internal::operator!=(v41, &v40); if ( (result & 1) == 0 ) break; v37 = (google::protobuf::DescriptorProto *)google::protobuf::internal::RepeatedPtrIterator<google::protobuf::DescriptorProto const>::operator*(v41); if ( (google::protobuf::DescriptorProto::has_options(v37) & 1) != 0 ) google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<google::protobuf::MessageOptions>( v42, 1, v5, v6, v7, v8, v26, v29, v31, v33, v35, (long long)v37, v40, v41[0]); v9 = google::protobuf::DescriptorProto::nested_type(v37); google::protobuf::PlanAllocationSize(v9, v42); v10 = google::protobuf::DescriptorProto::field(v37); google::protobuf::PlanAllocationSize(v10, v42); v11 = google::protobuf::DescriptorProto::extension(v37); google::protobuf::PlanAllocationSize(v11, v42); v12 = google::protobuf::DescriptorProto::extension_range(v37); google::protobuf::PlanAllocationSize(v12, v42); v27 = v42; v13 = google::protobuf::DescriptorProto::reserved_range_size(v37); google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<google::protobuf::Descriptor::ReservedRange>( v27, v13, v14, v15, v16, v17, v27, v29, v31, v33, v35, (long long)v37, v40, v41[0]); v30 = v42; v18 = google::protobuf::DescriptorProto::reserved_name_size(v38); google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<std::string const*>( v30, v18, v19, v20, v21, v22, v28, v30, v32, v34, v36, (long long)v38, v40, v41[0]); v31 = v42; v23 = google::protobuf::DescriptorProto::reserved_name_size(v39); google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<std::string>( v31, v23); v24 = google::protobuf::DescriptorProto::enum_type(v39); google::protobuf::PlanAllocationSize(v24, v42); v25 = google::protobuf::DescriptorProto::oneof_decl(v39); google::protobuf::PlanAllocationSize(v25, v42); google::protobuf::internal::RepeatedPtrIterator<google::protobuf::DescriptorProto const>::operator++(v41); } return result; }
_M_ptr: PUSH RAX MOV qword ptr [RSP],RDI MOV RDI,qword ptr [RSP] CALL 0x0018e110 POP RCX RET
/* std::__uniq_ptr_impl<unsigned char, std::default_delete<unsigned char []> >::_M_ptr() */ void __thiscall std::__uniq_ptr_impl<unsigned_char,std::default_delete<unsigned_char[]>>::_M_ptr (__uniq_ptr_impl<unsigned_char,std::default_delete<unsigned_char[]>> *this) { get<0ul,unsigned_char*,std::default_delete<unsigned_char[]>>((tuple *)this); return; }
33,786
google::protobuf::PlanAllocationSize(google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto> const&, google::protobuf::internal::FlatAllocator&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
static void PlanAllocationSize( const RepeatedPtrField<DescriptorProto>& messages, internal::FlatAllocator& alloc) { alloc.PlanArray<Descriptor>(messages.size()); alloc.PlanArray<std::string>(2 * messages.size()); // name + full_name for (const auto& message : messages) { if (message.has_options()) alloc.PlanArray<MessageOptions>(1); PlanAllocationSize(message.nested_type(), alloc); PlanAllocationSize(message.field(), alloc); PlanAllocationSize(message.extension(), alloc); PlanAllocationSize(message.extension_range(), alloc); alloc.PlanArray<Descriptor::ReservedRange>(message.reserved_range_size()); alloc.PlanArray<const std::string*>(message.reserved_name_size()); alloc.PlanArray<std::string>(message.reserved_name_size()); PlanAllocationSize(message.enum_type(), alloc); PlanAllocationSize(message.oneof_decl(), alloc); } }
O3
cpp
google::protobuf::PlanAllocationSize(google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto> const&, google::protobuf::internal::FlatAllocator&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rsi, %rbx movq %rdi, %r14 movl 0x8(%rdi), %esi movq %rbx, %rdi callq 0xcb814 movl 0x8(%r14), %esi addl %esi, %esi movq %rbx, %rdi callq 0xcb692 movq 0x10(%r14), %rax leaq 0x8(%rax), %r12 testq %rax, %rax cmoveq %rax, %r12 movslq 0x8(%r14), %rax testq %rax, %rax je 0xde59c leaq (%r12,%rax,8), %rax movq %rax, 0x10(%rsp) leaq 0x20(%rsp), %r15 movq (%r12), %r14 testb $0x2, 0x10(%r14) je 0xde378 cmpq $0x0, (%rbx) je 0xde375 movq %r15, %rdi movl $0x3, %esi leaq 0x8db4c(%rip), %rdx # 0x16be93 movl $0x172, %ecx # imm = 0x172 callq 0x857c2 movq %r15, %rdi leaq 0x9020f(%rip), %rsi # 0x16e56a callq 0x852c0 leaq 0xf(%rsp), %rdi movq %rax, %rsi callq 0x8539a movq %r15, %rdi callq 0x857e0 incl 0x78(%rbx) movq %r12, 0x18(%rsp) leaq 0x30(%r14), %rdi movq %rbx, %rsi callq 0xde2d0 leaq 0x18(%r14), %rdi movq %rbx, %rsi callq 0xde7bd leaq 0x78(%r14), %rdi movq %rbx, %rsi callq 0xde7bd movl 0x68(%r14), %esi movq %rbx, %rdi callq 0xcb89c movq 0x70(%r14), %r12 leaq 0x8(%r12), %rax testq %r12, %r12 cmovneq %rax, %r12 movslq 0x68(%r14), %r13 testq %r13, %r13 je 0xde428 shlq $0x3, %r13 xorl %ebp, %ebp movq (%r12,%rbp), %rax testb $0x1, 0x10(%rax) je 0xde41f cmpq $0x0, (%rbx) je 0xde419 movq %r15, %rdi movl $0x3, %esi leaq 0x8daa8(%rip), %rdx # 0x16be93 movl $0x172, %ecx # imm = 0x172 callq 0x857c2 movq %r15, %rdi leaq 0x9016b(%rip), %rsi # 0x16e56a callq 0x852c0 leaq 0xf(%rsp), %rdi movq %rax, %rsi callq 0x8539a movq %r15, %rdi callq 0x857e0 incl 0x88(%rbx) addq $0x8, %rbp cmpq %rbp, %r13 jne 0xde3cc movl 0xb0(%r14), %ebp cmpq $0x0, (%rbx) je 0xde472 movq %r15, %rdi movl $0x3, %esi leaq 0x8da4f(%rip), %rdx # 0x16be93 movl $0x172, %ecx # imm = 0x172 callq 0x857c2 movq %r15, %rdi leaq 0x90112(%rip), %rsi # 0x16e56a callq 0x852c0 leaq 0xf(%rsp), %rdi movq %rax, %rsi callq 0x8539a movq %r15, %rdi callq 0x857e0 shll $0x3, %ebp addl %ebp, 0x68(%rbx) movl 0xc8(%r14), %esi movq %rbx, %rdi callq 0xdebe8 movl 0xc8(%r14), %esi movq %rbx, %rdi callq 0xcb692 leaq 0x48(%r14), %rdi movq %rbx, %rsi callq 0xde5d2 movl 0x98(%r14), %r12d cmpq $0x0, (%rbx) je 0xde4ec movq %r15, %rdi movl $0x3, %esi leaq 0x8d9d5(%rip), %rdx # 0x16be93 movl $0x172, %ecx # imm = 0x172 callq 0x857c2 movq %r15, %rdi leaq 0x90098(%rip), %rsi # 0x16e56a callq 0x852c0 leaq 0xf(%rsp), %rdi movq %rax, %rsi callq 0x8539a movq %r15, %rdi callq 0x857e0 leal (%r12,%r12,4), %eax shll $0x3, %eax addl %eax, 0x68(%rbx) movl 0x98(%r14), %esi addl %esi, %esi movq %rbx, %rdi callq 0xcb692 movq 0xa0(%r14), %rax leaq 0x8(%rax), %r12 testq %rax, %rax cmoveq %rax, %r12 movslq 0x98(%r14), %r14 testq %r14, %r14 je 0xde588 shlq $0x3, %r14 xorl %r13d, %r13d movq (%r12,%r13), %rax testb $0x2, 0x10(%rax) je 0xde57f cmpq $0x0, (%rbx) je 0xde579 movq %r15, %rdi movl $0x3, %esi leaq 0x8d948(%rip), %rdx # 0x16be93 movl $0x172, %ecx # imm = 0x172 callq 0x857c2 movq %r15, %rdi leaq 0x9000b(%rip), %rsi # 0x16e56a callq 0x852c0 leaq 0xf(%rsp), %rdi movq %rax, %rsi callq 0x8539a movq %r15, %rdi callq 0x857e0 incl 0x8c(%rbx) addq $0x8, %r13 cmpq %r13, %r14 jne 0xde52c movq 0x18(%rsp), %r12 addq $0x8, %r12 cmpq 0x10(%rsp), %r12 jne 0xde327 addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xde5bd jmp 0xde5bd jmp 0xde5bd jmp 0xde5bd jmp 0xde5bd jmp 0xde5bd jmp 0xde5bd jmp 0xde5bd jmp 0xde5bd movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x857e0 movq %rbx, %rdi callq 0x2e220
_ZN6google8protobufL18PlanAllocationSizeERKNS0_16RepeatedPtrFieldINS0_15DescriptorProtoEEERNS0_8internal13FlatAllocatorE: push rbp; int push r15; int push r14; int push r13; int push r12; int push rbx; int sub rsp, 58h mov rbx, rsi mov r14, rdi mov esi, [rdi+8] mov rdi, rbx call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayINS0_10DescriptorEEEvi; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<google::protobuf::Descriptor>(int) mov esi, [r14+8] add esi, esi mov rdi, rbx call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayIS8_EEvi; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<std::string>(int) mov rax, [r14+10h] lea r12, [rax+8] test rax, rax cmovz r12, rax movsxd rax, dword ptr [r14+8] test rax, rax jz loc_DE59C lea rax, [r12+rax*8] mov qword ptr [rsp+88h+var_78], rax; char lea r15, [rsp+88h+var_68] loc_DE327: mov r14, [r12] test byte ptr [r14+10h], 2 jz short loc_DE378 cmp qword ptr [rbx], 0 jz short loc_DE375 mov rdi, r15 mov esi, 3 lea rdx, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/aimrt_"... mov ecx, 172h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, r15 lea rsi, aCheckFailedHas_0; "CHECK failed: !has_allocated(): " call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rdi, [rsp+88h+var_79] mov rsi, rax call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) mov rdi, r15; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_DE375: inc dword ptr [rbx+78h] loc_DE378: mov qword ptr [rsp+88h+var_70], r12; int lea rdi, [r14+30h] mov rsi, rbx call _ZN6google8protobufL18PlanAllocationSizeERKNS0_16RepeatedPtrFieldINS0_15DescriptorProtoEEERNS0_8internal13FlatAllocatorE; google::protobuf::PlanAllocationSize(google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto> const&,google::protobuf::internal::FlatAllocator &) lea rdi, [r14+18h]; int mov rsi, rbx; int call _ZN6google8protobufL18PlanAllocationSizeERKNS0_16RepeatedPtrFieldINS0_20FieldDescriptorProtoEEERNS0_8internal13FlatAllocatorE; google::protobuf::PlanAllocationSize(google::protobuf::RepeatedPtrField<google::protobuf::FieldDescriptorProto> const&,google::protobuf::internal::FlatAllocator &) lea rdi, [r14+78h]; int mov rsi, rbx; int call _ZN6google8protobufL18PlanAllocationSizeERKNS0_16RepeatedPtrFieldINS0_20FieldDescriptorProtoEEERNS0_8internal13FlatAllocatorE; google::protobuf::PlanAllocationSize(google::protobuf::RepeatedPtrField<google::protobuf::FieldDescriptorProto> const&,google::protobuf::internal::FlatAllocator &) mov esi, [r14+68h] mov rdi, rbx call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayINS0_10Descriptor14ExtensionRangeEEEvi; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<google::protobuf::Descriptor::ExtensionRange>(int) mov r12, [r14+70h] lea rax, [r12+8] test r12, r12 cmovnz r12, rax movsxd r13, dword ptr [r14+68h] test r13, r13 jz short loc_DE428 shl r13, 3 xor ebp, ebp loc_DE3CC: mov rax, [r12+rbp] test byte ptr [rax+10h], 1 jz short loc_DE41F cmp qword ptr [rbx], 0 jz short loc_DE419 mov rdi, r15 mov esi, 3 lea rdx, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/aimrt_"... mov ecx, 172h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, r15 lea rsi, aCheckFailedHas_0; "CHECK failed: !has_allocated(): " call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rdi, [rsp+88h+var_79] mov rsi, rax call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) mov rdi, r15; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_DE419: inc dword ptr [rbx+88h] loc_DE41F: add rbp, 8 cmp r13, rbp jnz short loc_DE3CC loc_DE428: mov ebp, [r14+0B0h] cmp qword ptr [rbx], 0 jz short loc_DE472 mov rdi, r15 mov esi, 3 lea rdx, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/aimrt_"... mov ecx, 172h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, r15 lea rsi, aCheckFailedHas_0; "CHECK failed: !has_allocated(): " call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rdi, [rsp+88h+var_79] mov rsi, rax call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) mov rdi, r15; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_DE472: shl ebp, 3 add [rbx+68h], ebp mov esi, [r14+0C8h] mov rdi, rbx call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayIPKS8_EEvi; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<std::string const*>(int) mov esi, [r14+0C8h] mov rdi, rbx call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayIS8_EEvi; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<std::string>(int) lea rdi, [r14+48h] mov rsi, rbx call _ZN6google8protobufL18PlanAllocationSizeERKNS0_16RepeatedPtrFieldINS0_19EnumDescriptorProtoEEERNS0_8internal13FlatAllocatorE; google::protobuf::PlanAllocationSize(google::protobuf::RepeatedPtrField<google::protobuf::EnumDescriptorProto> const&,google::protobuf::internal::FlatAllocator &) mov r12d, [r14+98h] cmp qword ptr [rbx], 0 jz short loc_DE4EC mov rdi, r15 mov esi, 3 lea rdx, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/aimrt_"... mov ecx, 172h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, r15 lea rsi, aCheckFailedHas_0; "CHECK failed: !has_allocated(): " call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rdi, [rsp+88h+var_79] mov rsi, rax call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) mov rdi, r15; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_DE4EC: lea eax, [r12+r12*4] shl eax, 3 add [rbx+68h], eax mov esi, [r14+98h] add esi, esi mov rdi, rbx call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayIS8_EEvi; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<std::string>(int) mov rax, [r14+0A0h] lea r12, [rax+8] test rax, rax cmovz r12, rax movsxd r14, dword ptr [r14+98h] test r14, r14 jz short loc_DE588 shl r14, 3 xor r13d, r13d loc_DE52C: mov rax, [r12+r13] test byte ptr [rax+10h], 2 jz short loc_DE57F cmp qword ptr [rbx], 0 jz short loc_DE579 mov rdi, r15 mov esi, 3 lea rdx, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/aimrt_"... mov ecx, 172h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, r15 lea rsi, aCheckFailedHas_0; "CHECK failed: !has_allocated(): " call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rdi, [rsp+88h+var_79] mov rsi, rax call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) mov rdi, r15; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_DE579: inc dword ptr [rbx+8Ch] loc_DE57F: add r13, 8 cmp r14, r13 jnz short loc_DE52C loc_DE588: mov r12, qword ptr [rsp+88h+var_70] add r12, 8 cmp r12, qword ptr [rsp+88h+var_78] jnz loc_DE327 loc_DE59C: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_DE5BD jmp short loc_DE5BD jmp short loc_DE5BD jmp short loc_DE5BD jmp short loc_DE5BD jmp short loc_DE5BD jmp short loc_DE5BD jmp short loc_DE5BD jmp short $+2 loc_DE5BD: mov rbx, rax lea rdi, [rsp+arg_18]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() mov rdi, rbx call __Unwind_Resume
PlanAllocationSize: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RBX,RSI MOV R14,RDI MOV ESI,dword ptr [RDI + 0x8] MOV RDI,RBX CALL 0x001cb814 MOV ESI,dword ptr [R14 + 0x8] ADD ESI,ESI MOV RDI,RBX CALL 0x001cb692 MOV RAX,qword ptr [R14 + 0x10] LEA R12,[RAX + 0x8] TEST RAX,RAX CMOVZ R12,RAX MOVSXD RAX,dword ptr [R14 + 0x8] TEST RAX,RAX JZ 0x001de59c LEA RAX,[R12 + RAX*0x8] MOV qword ptr [RSP + 0x10],RAX LEA R15,[RSP + 0x20] LAB_001de327: MOV R14,qword ptr [R12] TEST byte ptr [R14 + 0x10],0x2 JZ 0x001de378 CMP qword ptr [RBX],0x0 JZ 0x001de375 MOV RDI,R15 MOV ESI,0x3 LEA RDX,[0x26be93] MOV ECX,0x172 CALL 0x001857c2 LAB_001de351: MOV RDI,R15 LEA RSI,[0x26e56a] CALL 0x001852c0 LAB_001de360: LEA RDI,[RSP + 0xf] MOV RSI,RAX CALL 0x0018539a LAB_001de36d: MOV RDI,R15 CALL 0x001857e0 LAB_001de375: INC dword ptr [RBX + 0x78] LAB_001de378: MOV qword ptr [RSP + 0x18],R12 LEA RDI,[R14 + 0x30] MOV RSI,RBX CALL 0x001de2d0 LEA RDI,[R14 + 0x18] MOV RSI,RBX CALL 0x001de7bd LEA RDI,[R14 + 0x78] MOV RSI,RBX CALL 0x001de7bd MOV ESI,dword ptr [R14 + 0x68] MOV RDI,RBX CALL 0x001cb89c MOV R12,qword ptr [R14 + 0x70] LEA RAX,[R12 + 0x8] TEST R12,R12 CMOVNZ R12,RAX MOVSXD R13,dword ptr [R14 + 0x68] TEST R13,R13 JZ 0x001de428 SHL R13,0x3 XOR EBP,EBP LAB_001de3cc: MOV RAX,qword ptr [R12 + RBP*0x1] TEST byte ptr [RAX + 0x10],0x1 JZ 0x001de41f CMP qword ptr [RBX],0x0 JZ 0x001de419 MOV RDI,R15 MOV ESI,0x3 LEA RDX,[0x26be93] MOV ECX,0x172 CALL 0x001857c2 LAB_001de3f5: MOV RDI,R15 LEA RSI,[0x26e56a] CALL 0x001852c0 LAB_001de404: LEA RDI,[RSP + 0xf] MOV RSI,RAX CALL 0x0018539a LAB_001de411: MOV RDI,R15 CALL 0x001857e0 LAB_001de419: INC dword ptr [RBX + 0x88] LAB_001de41f: ADD RBP,0x8 CMP R13,RBP JNZ 0x001de3cc LAB_001de428: MOV EBP,dword ptr [R14 + 0xb0] CMP qword ptr [RBX],0x0 JZ 0x001de472 MOV RDI,R15 MOV ESI,0x3 LEA RDX,[0x26be93] MOV ECX,0x172 CALL 0x001857c2 LAB_001de44e: MOV RDI,R15 LEA RSI,[0x26e56a] CALL 0x001852c0 LAB_001de45d: LEA RDI,[RSP + 0xf] MOV RSI,RAX CALL 0x0018539a LAB_001de46a: MOV RDI,R15 CALL 0x001857e0 LAB_001de472: SHL EBP,0x3 ADD dword ptr [RBX + 0x68],EBP MOV ESI,dword ptr [R14 + 0xc8] MOV RDI,RBX CALL 0x001debe8 MOV ESI,dword ptr [R14 + 0xc8] MOV RDI,RBX CALL 0x001cb692 LEA RDI,[R14 + 0x48] MOV RSI,RBX CALL 0x001de5d2 MOV R12D,dword ptr [R14 + 0x98] CMP qword ptr [RBX],0x0 JZ 0x001de4ec MOV RDI,R15 MOV ESI,0x3 LEA RDX,[0x26be93] MOV ECX,0x172 CALL 0x001857c2 LAB_001de4c8: MOV RDI,R15 LEA RSI,[0x26e56a] CALL 0x001852c0 LAB_001de4d7: LEA RDI,[RSP + 0xf] MOV RSI,RAX CALL 0x0018539a LAB_001de4e4: MOV RDI,R15 CALL 0x001857e0 LAB_001de4ec: LEA EAX,[R12 + R12*0x4] SHL EAX,0x3 ADD dword ptr [RBX + 0x68],EAX MOV ESI,dword ptr [R14 + 0x98] ADD ESI,ESI MOV RDI,RBX CALL 0x001cb692 MOV RAX,qword ptr [R14 + 0xa0] LEA R12,[RAX + 0x8] TEST RAX,RAX CMOVZ R12,RAX MOVSXD R14,dword ptr [R14 + 0x98] TEST R14,R14 JZ 0x001de588 SHL R14,0x3 XOR R13D,R13D LAB_001de52c: MOV RAX,qword ptr [R12 + R13*0x1] TEST byte ptr [RAX + 0x10],0x2 JZ 0x001de57f CMP qword ptr [RBX],0x0 JZ 0x001de579 MOV RDI,R15 MOV ESI,0x3 LEA RDX,[0x26be93] MOV ECX,0x172 CALL 0x001857c2 LAB_001de555: MOV RDI,R15 LEA RSI,[0x26e56a] CALL 0x001852c0 LAB_001de564: LEA RDI,[RSP + 0xf] MOV RSI,RAX CALL 0x0018539a LAB_001de571: MOV RDI,R15 CALL 0x001857e0 LAB_001de579: INC dword ptr [RBX + 0x8c] LAB_001de57f: ADD R13,0x8 CMP R14,R13 JNZ 0x001de52c LAB_001de588: MOV R12,qword ptr [RSP + 0x18] ADD R12,0x8 CMP R12,qword ptr [RSP + 0x10] JNZ 0x001de327 LAB_001de59c: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* google::protobuf::PlanAllocationSize(google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto> const&, google::protobuf::internal::FlatAllocator&) */ void google::protobuf::PlanAllocationSize(RepeatedPtrField *param_1,FlatAllocator *param_2) { int iVar1; LogMessage *pLVar2; long lVar3; long *plVar4; long lVar5; long lVar6; LogFinisher local_79; long *local_78; long *local_70; LogMessage local_68 [56]; (anonymous_namespace):: FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> ::PlanArray<google::protobuf::Descriptor> ((FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> *)param_2,*(int *)(param_1 + 8)); (anonymous_namespace):: FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> ::PlanArray<std::__cxx11::string> ((FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> *)param_2,*(int *)(param_1 + 8) * 2); plVar4 = (long *)(*(long *)(param_1 + 0x10) + 8); if (*(long *)(param_1 + 0x10) == 0) { plVar4 = (long *)0x0; } if ((long)*(int *)(param_1 + 8) != 0) { local_78 = plVar4 + *(int *)(param_1 + 8); do { lVar6 = *plVar4; if ((*(byte *)(lVar6 + 0x10) & 2) != 0) { if (*(long *)param_2 != 0) { internal::LogMessage::LogMessage (local_68,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc" ,0x172); /* try { // try from 001de351 to 001de35f has its CatchHandler @ 001de5ad */ pLVar2 = (LogMessage *) internal::LogMessage::operator<<(local_68,"CHECK failed: !has_allocated(): "); /* try { // try from 001de360 to 001de36c has its CatchHandler @ 001de5ab */ internal::LogFinisher::operator=(&local_79,pLVar2); internal::LogMessage::~LogMessage(local_68); } *(int *)(param_2 + 0x78) = *(int *)(param_2 + 0x78) + 1; } local_70 = plVar4; PlanAllocationSize((RepeatedPtrField *)(lVar6 + 0x30),param_2); PlanAllocationSize((RepeatedPtrField *)(lVar6 + 0x18),param_2); PlanAllocationSize((RepeatedPtrField *)(lVar6 + 0x78),param_2); (anonymous_namespace):: FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> ::PlanArray<google::protobuf::Descriptor::ExtensionRange> ((FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> *)param_2,*(int *)(lVar6 + 0x68)); lVar5 = *(long *)(lVar6 + 0x70); if (lVar5 != 0) { lVar5 = lVar5 + 8; } iVar1 = *(int *)(lVar6 + 0x68); if ((long)iVar1 != 0) { lVar3 = 0; do { if ((*(byte *)(*(long *)(lVar5 + lVar3) + 0x10) & 1) != 0) { if (*(long *)param_2 != 0) { internal::LogMessage::LogMessage (local_68,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc" ,0x172); /* try { // try from 001de3f5 to 001de403 has its CatchHandler @ 001de5bd */ pLVar2 = (LogMessage *) internal::LogMessage::operator<<(local_68,"CHECK failed: !has_allocated(): ") ; /* try { // try from 001de404 to 001de410 has its CatchHandler @ 001de5bb */ internal::LogFinisher::operator=(&local_79,pLVar2); internal::LogMessage::~LogMessage(local_68); } *(int *)(param_2 + 0x88) = *(int *)(param_2 + 0x88) + 1; } lVar3 = lVar3 + 8; } while ((long)iVar1 * 8 != lVar3); } iVar1 = *(int *)(lVar6 + 0xb0); if (*(long *)param_2 != 0) { internal::LogMessage::LogMessage (local_68,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc" ,0x172); /* try { // try from 001de44e to 001de45c has its CatchHandler @ 001de5af */ pLVar2 = (LogMessage *) internal::LogMessage::operator<<(local_68,"CHECK failed: !has_allocated(): "); /* try { // try from 001de45d to 001de469 has its CatchHandler @ 001de5b1 */ internal::LogFinisher::operator=(&local_79,pLVar2); internal::LogMessage::~LogMessage(local_68); } *(int *)(param_2 + 0x68) = *(int *)(param_2 + 0x68) + iVar1 * 8; (anonymous_namespace):: FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> ::PlanArray<std::__cxx11::string_const*> ((FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> *)param_2,*(int *)(lVar6 + 200)); (anonymous_namespace):: FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> ::PlanArray<std::__cxx11::string> ((FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> *)param_2,*(int *)(lVar6 + 200)); PlanAllocationSize((RepeatedPtrField *)(lVar6 + 0x48),param_2); iVar1 = *(int *)(lVar6 + 0x98); if (*(long *)param_2 != 0) { internal::LogMessage::LogMessage (local_68,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc" ,0x172); /* try { // try from 001de4c8 to 001de4d6 has its CatchHandler @ 001de5b3 */ pLVar2 = (LogMessage *) internal::LogMessage::operator<<(local_68,"CHECK failed: !has_allocated(): "); /* try { // try from 001de4d7 to 001de4e3 has its CatchHandler @ 001de5b5 */ internal::LogFinisher::operator=(&local_79,pLVar2); internal::LogMessage::~LogMessage(local_68); } *(int *)(param_2 + 0x68) = *(int *)(param_2 + 0x68) + iVar1 * 0x28; (anonymous_namespace):: FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> ::PlanArray<std::__cxx11::string> ((FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> *)param_2,*(int *)(lVar6 + 0x98) * 2); lVar5 = *(long *)(lVar6 + 0xa0) + 8; if (*(long *)(lVar6 + 0xa0) == 0) { lVar5 = 0; } iVar1 = *(int *)(lVar6 + 0x98); if ((long)iVar1 != 0) { lVar6 = 0; do { if ((*(byte *)(*(long *)(lVar5 + lVar6) + 0x10) & 2) != 0) { if (*(long *)param_2 != 0) { internal::LogMessage::LogMessage (local_68,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc" ,0x172); /* try { // try from 001de555 to 001de563 has its CatchHandler @ 001de5b9 */ pLVar2 = (LogMessage *) internal::LogMessage::operator<<(local_68,"CHECK failed: !has_allocated(): ") ; /* try { // try from 001de564 to 001de570 has its CatchHandler @ 001de5b7 */ internal::LogFinisher::operator=(&local_79,pLVar2); internal::LogMessage::~LogMessage(local_68); } *(int *)(param_2 + 0x8c) = *(int *)(param_2 + 0x8c) + 1; } lVar6 = lVar6 + 8; } while ((long)iVar1 * 8 != lVar6); } plVar4 = local_70 + 1; } while (plVar4 != local_78); } return; }
33,787
mysql_server_init
eloqsql/libmariadb/libmariadb/mariadb_lib.c
int STDCALL mysql_server_init(int argc __attribute__((unused)), char **argv __attribute__((unused)), char **groups __attribute__((unused))) { #ifdef _WIN32 BOOL ret = InitOnceExecuteOnce(&init_once, win_init_once, NULL, NULL); return ret? 0: 1; #else return pthread_once(&init_once, mysql_once_init); #endif }
O0
c
mysql_server_init: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) leaq 0x456e6(%rip), %rdi # 0x615b0 leaq 0x809f(%rip), %rsi # 0x23f70 callq 0x133d0 addq $0x20, %rsp popq %rbp retq nopl (%rax)
mysql_server_init: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx lea rdi, init_once lea rsi, mysql_once_init call _pthread_once add rsp, 20h pop rbp retn
long long mysql_server_init() { return pthread_once(&init_once, mysql_once_init); }
mysql_server_init: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX LEA RDI,[0x1615b0] LEA RSI,[0x123f70] CALL 0x001133d0 ADD RSP,0x20 POP RBP RET
void mysql_server_init(void) { pthread_once(&init_once,mysql_once_init); return; }
33,788
fill_uchar
eloqsql/strings/ctype.c
static int fill_uchar(uchar *a,uint size,const char *str, size_t len) { uint i= 0; const char *s, *b, *e=str+len; for (s=str ; s < e ; i++) { for ( ; (s < e) && strchr(" \t\r\n",s[0]); s++) ; b=s; for ( ; (s < e) && !strchr(" \t\r\n",s[0]); s++) ; if (s == b || i > size) break; a[i]= (uchar) strtoul(b,NULL,16); } return 0; }
O3
c
fill_uchar: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, -0x38(%rbp) testq %rcx, %rcx jle 0xd3064 movq %rcx, %rbx movq %rdx, %r12 addq %rdx, %rbx movl %esi, %eax movq %rax, -0x30(%rbp) xorl %r14d, %r14d leaq 0xe104(%rip), %r15 # 0xe10f5 movq %r12, %r13 movsbl (%r13), %esi movl $0x5, %edx movq %r15, %rdi callq 0x29390 testq %rax, %rax je 0xd3013 incq %r13 cmpq %rbx, %r13 jb 0xd2ff4 cmpq %rbx, %r13 jae 0xd3064 movq %r13, %r12 movsbl (%r12), %esi movl $0x5, %edx movq %r15, %rdi callq 0x29390 testq %rax, %rax jne 0xd303a incq %r12 cmpq %rbx, %r12 jb 0xd301b cmpq %r13, %r12 je 0xd3064 cmpq -0x30(%rbp), %r14 ja 0xd3064 movq %r13, %rdi xorl %esi, %esi movl $0x10, %edx callq 0x29070 movq -0x38(%rbp), %rcx movb %al, (%rcx,%r14) incq %r14 cmpq %rbx, %r12 jb 0xd2ff1 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
fill_uchar: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_38], rdi test rcx, rcx jle loc_D3064 mov rbx, rcx mov r12, rdx add rbx, rdx mov eax, esi mov [rbp+var_30], rax xor r14d, r14d lea r15, asc_E10F5; " \t\r\n" loc_D2FF1: mov r13, r12 loc_D2FF4: movsx esi, byte ptr [r13+0] mov edx, 5 mov rdi, r15 call _memchr test rax, rax jz short loc_D3013 inc r13 cmp r13, rbx jb short loc_D2FF4 loc_D3013: cmp r13, rbx jnb short loc_D3064 mov r12, r13 loc_D301B: movsx esi, byte ptr [r12] mov edx, 5 mov rdi, r15 call _memchr test rax, rax jnz short loc_D303A inc r12 cmp r12, rbx jb short loc_D301B loc_D303A: cmp r12, r13 jz short loc_D3064 cmp r14, [rbp+var_30] ja short loc_D3064 mov rdi, r13 xor esi, esi mov edx, 10h call ___isoc23_strtoul mov rcx, [rbp+var_38] mov [rcx+r14], al inc r14 cmp r12, rbx jb short loc_D2FF1 loc_D3064: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
void fill_uchar(long long a1, unsigned int a2, char *a3, long long a4) { char *v4; // r12 unsigned long long v5; // rbx unsigned long long v6; // r14 char *v7; // r13 if ( a4 > 0 ) { v4 = a3; v5 = (unsigned long long)&a3[a4]; v6 = 0LL; do { v7 = v4; do { if ( !memchr(" \t\r\n", (unsigned int)*v7, 5LL) ) break; ++v7; } while ( (unsigned long long)v7 < v5 ); if ( (unsigned long long)v7 >= v5 ) break; v4 = v7; do { if ( memchr(" \t\r\n", (unsigned int)*v4, 5LL) ) break; ++v4; } while ( (unsigned long long)v4 < v5 ); if ( v4 == v7 ) break; if ( v6 > a2 ) break; *(_BYTE *)(a1 + v6++) = __isoc23_strtoul(v7, 0LL, 16LL); } while ( (unsigned long long)v4 < v5 ); } }
fill_uchar: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x38],RDI TEST RCX,RCX JLE 0x001d3064 MOV RBX,RCX MOV R12,RDX ADD RBX,RDX MOV EAX,ESI MOV qword ptr [RBP + -0x30],RAX XOR R14D,R14D LEA R15,[0x1e10f5] LAB_001d2ff1: MOV R13,R12 LAB_001d2ff4: MOVSX ESI,byte ptr [R13] MOV EDX,0x5 MOV RDI,R15 CALL 0x00129390 TEST RAX,RAX JZ 0x001d3013 INC R13 CMP R13,RBX JC 0x001d2ff4 LAB_001d3013: CMP R13,RBX JNC 0x001d3064 MOV R12,R13 LAB_001d301b: MOVSX ESI,byte ptr [R12] MOV EDX,0x5 MOV RDI,R15 CALL 0x00129390 TEST RAX,RAX JNZ 0x001d303a INC R12 CMP R12,RBX JC 0x001d301b LAB_001d303a: CMP R12,R13 JZ 0x001d3064 CMP R14,qword ptr [RBP + -0x30] JA 0x001d3064 MOV RDI,R13 XOR ESI,ESI MOV EDX,0x10 CALL 0x00129070 MOV RCX,qword ptr [RBP + -0x38] MOV byte ptr [RCX + R14*0x1],AL INC R14 CMP R12,RBX JC 0x001d2ff1 LAB_001d3064: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void fill_uchar(long param_1,ulong param_2,char *param_3,long param_4) { int1 uVar1; void *pvVar2; char *pcVar3; char *pcVar4; ulong uVar5; if (param_4 < 1) { return; } pcVar3 = param_3 + param_4; uVar5 = 0; LAB_001d2ff4: do { pvVar2 = memchr(&DAT_001e10f5,(int)*param_3,5); pcVar4 = param_3; if (pvVar2 != (void *)0x0) { param_3 = param_3 + 1; pcVar4 = param_3; if (param_3 < pcVar3) goto LAB_001d2ff4; } param_3 = pcVar4; if (pcVar3 <= pcVar4) { return; } do { pvVar2 = memchr(&DAT_001e10f5,(int)*param_3,5); if (pvVar2 != (void *)0x0) break; param_3 = param_3 + 1; } while (param_3 < pcVar3); if (param_3 == pcVar4) { return; } if ((param_2 & 0xffffffff) < uVar5) { return; } uVar1 = __isoc23_strtoul(pcVar4,0,0x10); *(int1 *)(param_1 + uVar5) = uVar1; uVar5 = uVar5 + 1; if (pcVar3 <= param_3) { return; } } while( true ); }
33,789
copy_uca_collation
eloqsql/mysys/charset.c
static void copy_uca_collation(struct charset_info_st *to, CHARSET_INFO *from, CHARSET_INFO *loaded) { to->cset= from->cset; to->coll= from->coll; /* Single-level UCA collation have strnxfrm_multiple=8. In case of a multi-level UCA collation we use strnxfrm_multiply=4. That means MY_COLLATION_HANDLER::strnfrmlen() will request the caller to allocate a buffer smaller size for each level, for performance purpose, and to fit longer VARCHARs to @@max_sort_length. This makes filesort produce non-precise order for some rare Unicode characters that produce more than 4 weights (long expansions). UCA requires 2 bytes per weight multiplied by the number of levels. In case of a 2-level collation, each character requires 4*2=8 bytes. Therefore, the longest VARCHAR that fits into the default @@max_sort_length is 1024/8=VARCHAR(128). With strnxfrm_multiply==8, only VARCHAR(64) would fit. Note, the built-in collation utf8_thai_520_w2 also uses strnxfrm_multiply=4, for the same purpose. TODO: we could add a new LDML syntax to choose strxfrm_multiply value. */ to->strxfrm_multiply= loaded->levels_for_order > 1 ? 4 : from->strxfrm_multiply; to->min_sort_char= from->min_sort_char; to->max_sort_char= from->max_sort_char; to->mbminlen= from->mbminlen; to->mbmaxlen= from->mbmaxlen; to->caseup_multiply= from->caseup_multiply; to->casedn_multiply= from->casedn_multiply; to->state|= MY_CS_AVAILABLE | MY_CS_LOADED | MY_CS_STRNXFRM | MY_CS_UNICODE; }
O0
c
copy_uca_collation: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0xb8(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xb8(%rax) movq -0x10(%rbp), %rax movq 0xc0(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xc0(%rax) movq -0x18(%rbp), %rax movzbl 0xb2(%rax), %eax cmpl $0x1, %eax jle 0x2ce56 movl $0x4, %eax movl %eax, -0x1c(%rbp) jmp 0x2ce63 movq -0x10(%rbp), %rax movl 0x90(%rax), %eax movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x90(%rax) movq -0x10(%rbp), %rax movq 0xa0(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xa0(%rax) movq -0x10(%rbp), %rax movq 0xa8(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xa8(%rax) movq -0x10(%rbp), %rax movl 0x98(%rax), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x98(%rax) movq -0x10(%rbp), %rax movl 0x9c(%rax), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x9c(%rax) movq -0x10(%rbp), %rax movb 0x94(%rax), %cl movq -0x8(%rbp), %rax movb %cl, 0x94(%rax) movq -0x10(%rbp), %rax movb 0x95(%rax), %cl movq -0x8(%rbp), %rax movb %cl, 0x95(%rax) movq -0x8(%rbp), %rax movl 0xc(%rax), %ecx orl $0x2c8, %ecx # imm = 0x2C8 movl %ecx, 0xc(%rax) popq %rbp retq nop
copy_uca_collation: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_10] mov rcx, [rax+0B8h] mov rax, [rbp+var_8] mov [rax+0B8h], rcx mov rax, [rbp+var_10] mov rcx, [rax+0C0h] mov rax, [rbp+var_8] mov [rax+0C0h], rcx mov rax, [rbp+var_18] movzx eax, byte ptr [rax+0B2h] cmp eax, 1 jle short loc_2CE56 mov eax, 4 mov [rbp+var_1C], eax jmp short loc_2CE63 loc_2CE56: mov rax, [rbp+var_10] mov eax, [rax+90h] mov [rbp+var_1C], eax loc_2CE63: mov ecx, [rbp+var_1C] mov rax, [rbp+var_8] mov [rax+90h], ecx mov rax, [rbp+var_10] mov rcx, [rax+0A0h] mov rax, [rbp+var_8] mov [rax+0A0h], rcx mov rax, [rbp+var_10] mov rcx, [rax+0A8h] mov rax, [rbp+var_8] mov [rax+0A8h], rcx mov rax, [rbp+var_10] mov ecx, [rax+98h] mov rax, [rbp+var_8] mov [rax+98h], ecx mov rax, [rbp+var_10] mov ecx, [rax+9Ch] mov rax, [rbp+var_8] mov [rax+9Ch], ecx mov rax, [rbp+var_10] mov cl, [rax+94h] mov rax, [rbp+var_8] mov [rax+94h], cl mov rax, [rbp+var_10] mov cl, [rax+95h] mov rax, [rbp+var_8] mov [rax+95h], cl mov rax, [rbp+var_8] mov ecx, [rax+0Ch] or ecx, 2C8h mov [rax+0Ch], ecx pop rbp retn
long long copy_uca_collation(long long a1, long long a2, long long a3) { long long result; // rax int v4; // [rsp+0h] [rbp-1Ch] *(_QWORD *)(a1 + 184) = *(_QWORD *)(a2 + 184); *(_QWORD *)(a1 + 192) = *(_QWORD *)(a2 + 192); if ( *(unsigned __int8 *)(a3 + 178) <= 1u ) v4 = *(_DWORD *)(a2 + 144); else v4 = 4; *(_DWORD *)(a1 + 144) = v4; *(_QWORD *)(a1 + 160) = *(_QWORD *)(a2 + 160); *(_QWORD *)(a1 + 168) = *(_QWORD *)(a2 + 168); *(_DWORD *)(a1 + 152) = *(_DWORD *)(a2 + 152); *(_DWORD *)(a1 + 156) = *(_DWORD *)(a2 + 156); *(_BYTE *)(a1 + 148) = *(_BYTE *)(a2 + 148); *(_BYTE *)(a1 + 149) = *(_BYTE *)(a2 + 149); result = a1; *(_DWORD *)(a1 + 12) |= 0x2C8u; return result; }
copy_uca_collation: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xb8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xc0],RCX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0xb2] CMP EAX,0x1 JLE 0x0012ce56 MOV EAX,0x4 MOV dword ptr [RBP + -0x1c],EAX JMP 0x0012ce63 LAB_0012ce56: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x90] MOV dword ptr [RBP + -0x1c],EAX LAB_0012ce63: MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x90],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0xa0] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa0],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0xa8] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x98] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x98],ECX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x9c] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x9c],ECX MOV RAX,qword ptr [RBP + -0x10] MOV CL,byte ptr [RAX + 0x94] MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x94],CL MOV RAX,qword ptr [RBP + -0x10] MOV CL,byte ptr [RAX + 0x95] MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x95],CL MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0xc] OR ECX,0x2c8 MOV dword ptr [RAX + 0xc],ECX POP RBP RET
void copy_uca_collation(long param_1,long param_2,long param_3) { int4 local_24; *(int8 *)(param_1 + 0xb8) = *(int8 *)(param_2 + 0xb8); *(int8 *)(param_1 + 0xc0) = *(int8 *)(param_2 + 0xc0); if (*(byte *)(param_3 + 0xb2) < 2) { local_24 = *(int4 *)(param_2 + 0x90); } else { local_24 = 4; } *(int4 *)(param_1 + 0x90) = local_24; *(int8 *)(param_1 + 0xa0) = *(int8 *)(param_2 + 0xa0); *(int8 *)(param_1 + 0xa8) = *(int8 *)(param_2 + 0xa8); *(int4 *)(param_1 + 0x98) = *(int4 *)(param_2 + 0x98); *(int4 *)(param_1 + 0x9c) = *(int4 *)(param_2 + 0x9c); *(int1 *)(param_1 + 0x94) = *(int1 *)(param_2 + 0x94); *(int1 *)(param_1 + 0x95) = *(int1 *)(param_2 + 0x95); *(uint *)(param_1 + 0xc) = *(uint *)(param_1 + 0xc) | 0x2c8; return; }
33,790
ft_boolean_reinit_search
eloqsql/storage/myisam/ft_boolean_search.c
void ft_boolean_reinit_search(FT_INFO *ftb) { _ftb_init_index_search(ftb); }
O3
c
ft_boolean_reinit_search: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp cmpl $0x0, 0x348(%rdi) je 0x7792d movq %rdi, %rbx cmpl $-0x1, 0x340(%rdi) je 0x7792d movl $0x2, 0x348(%rbx) leaq 0x70(%rbx), %r14 movslq 0x80(%rbx), %r12 testq %r12, %r12 jle 0x77917 leaq 0xa0(%rbx), %r15 movq (%r14), %rax movq (%rax,%r12,8), %r13 testb $0x1, 0x8(%r13) je 0x778ec movq (%r13), %rax testq %rax, %rax je 0x77899 movq %r13, %rcx movl 0x8(%rax), %edx testb $0x1, %dl jne 0x77899 movl 0x8(%rcx), %esi testb $0x4, %sil jne 0x778a9 movl 0x48(%rax), %edi subl 0x4c(%rax), %edi btl $0x1, %esi sbbl $0x0, %edi ja 0x778a9 orl $0x1, %edx movl %edx, 0x8(%rax) movq (%rcx), %rcx movq (%rcx), %rax testq %rax, %rax jne 0x77868 cmpq $0x0, (%r15) je 0x778ca movq %r15, %rdi callq 0xabaf9 jmp 0x778ec movq $-0x1, 0x10(%r13) cmpq %rax, %r13 je 0x77905 testb $0x4, 0x8(%r13) jne 0x77905 movq (%r13), %rcx incl 0x4c(%rcx) movq (%r13), %r13 jmp 0x778b1 xorps %xmm0, %xmm0 movups %xmm0, (%rsp) movq %r15, %rdi xorl %esi, %esi xorl %edx, %edx movl $0x8, %ecx leaq 0x504(%rip), %r8 # 0x77de8 xorl %r9d, %r9d callq 0xab8f8 movb $0x0, 0x4c(%r13) movq %rbx, %rdi movq %r13, %rsi movl $0x1, %edx callq 0x77324 testl %eax, %eax jne 0x7792d leaq -0x1(%r12), %rax cmpq $0x1, %r12 movq %rax, %r12 jg 0x7784a movq %r14, %rdi addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xa97bf addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ft_boolean_reinit_search: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h cmp dword ptr [rdi+348h], 0 jz loc_7792D mov rbx, rdi cmp dword ptr [rdi+340h], 0FFFFFFFFh jz loc_7792D mov dword ptr [rbx+348h], 2 lea r14, [rbx+70h] movsxd r12, dword ptr [rbx+80h] test r12, r12 jle loc_77917 lea r15, [rbx+0A0h] loc_7784A: mov rax, [r14] mov r13, [rax+r12*8] test byte ptr [r13+8], 1 jz loc_778EC mov rax, [r13+0] test rax, rax jz short loc_77899 mov rcx, r13 loc_77868: mov edx, [rax+8] test dl, 1 jnz short loc_77899 mov esi, [rcx+8] test sil, 4 jnz short loc_778A9 mov edi, [rax+48h] sub edi, [rax+4Ch] bt esi, 1 sbb edi, 0 ja short loc_778A9 or edx, 1 mov [rax+8], edx mov rcx, [rcx] mov rax, [rcx] test rax, rax jnz short loc_77868 loc_77899: cmp qword ptr [r15], 0 jz short loc_778CA mov rdi, r15 call reset_tree jmp short loc_778EC loc_778A9: mov qword ptr [r13+10h], 0FFFFFFFFFFFFFFFFh loc_778B1: cmp r13, rax jz short loc_77905 test byte ptr [r13+8], 4 jnz short loc_77905 mov rcx, [r13+0] inc dword ptr [rcx+4Ch] mov r13, [r13+0] jmp short loc_778B1 loc_778CA: xorps xmm0, xmm0 movups [rsp+40h+var_40], xmm0 mov rdi, r15 xor esi, esi xor edx, edx mov ecx, 8 lea r8, _ftb_no_dupes_cmp xor r9d, r9d call init_tree loc_778EC: mov byte ptr [r13+4Ch], 0 mov rdi, rbx mov rsi, r13 mov edx, 1 call _ft2_search test eax, eax jnz short loc_7792D loc_77905: lea rax, [r12-1] cmp r12, 1 mov r12, rax jg loc_7784A loc_77917: mov rdi, r14 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp queue_fix loc_7792D: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
void ft_boolean_reinit_search(long long a1) { _QWORD *v1; // r14 long long v2; // r12 long long v3; // r13 _DWORD *v4; // rax _DWORD *v5; // rcx int v6; // edx if ( *(_DWORD *)(a1 + 840) && *(_DWORD *)(a1 + 832) != -1 ) { *(_DWORD *)(a1 + 840) = 2; v1 = (_QWORD *)(a1 + 112); v2 = *(int *)(a1 + 128); if ( v2 <= 0 ) { LABEL_20: queue_fix(a1 + 112); } else { while ( 1 ) { v3 = *(_QWORD *)(*v1 + 8 * v2); if ( (*(_BYTE *)(v3 + 8) & 1) != 0 ) { v4 = *(_DWORD **)v3; if ( *(_QWORD *)v3 ) { v5 = *(_DWORD **)(*v1 + 8 * v2); do { v6 = v4[2]; if ( (v6 & 1) != 0 ) break; if ( (v5[2] & 4) != 0 || v4[18] - v4[19] > (unsigned int)((v5[2] & 2) != 0) ) { *(_QWORD *)(v3 + 16) = -1LL; while ( (_DWORD *)v3 != v4 && (*(_BYTE *)(v3 + 8) & 4) == 0 ) { ++*(_DWORD *)(*(_QWORD *)v3 + 76LL); v3 = *(_QWORD *)v3; } goto LABEL_19; } v4[2] = v6 | 1; v5 = *(_DWORD **)v5; v4 = *(_DWORD **)v5; } while ( *(_QWORD *)v5 ); } if ( *(_QWORD *)(a1 + 160) ) reset_tree(a1 + 160); else init_tree(a1 + 160, 0, 0, 8, (unsigned int)ftb_no_dupes_cmp, 0, 0LL, 0LL); } *(_BYTE *)(v3 + 76) = 0; if ( (unsigned int)ft2_search(a1, v3, 1) ) break; LABEL_19: if ( v2-- <= 1 ) goto LABEL_20; } } } }
ft_boolean_reinit_search: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 CMP dword ptr [RDI + 0x348],0x0 JZ 0x0017792d MOV RBX,RDI CMP dword ptr [RDI + 0x340],-0x1 JZ 0x0017792d MOV dword ptr [RBX + 0x348],0x2 LEA R14,[RBX + 0x70] MOVSXD R12,dword ptr [RBX + 0x80] TEST R12,R12 JLE 0x00177917 LEA R15,[RBX + 0xa0] LAB_0017784a: MOV RAX,qword ptr [R14] MOV R13,qword ptr [RAX + R12*0x8] TEST byte ptr [R13 + 0x8],0x1 JZ 0x001778ec MOV RAX,qword ptr [R13] TEST RAX,RAX JZ 0x00177899 MOV RCX,R13 LAB_00177868: MOV EDX,dword ptr [RAX + 0x8] TEST DL,0x1 JNZ 0x00177899 MOV ESI,dword ptr [RCX + 0x8] TEST SIL,0x4 JNZ 0x001778a9 MOV EDI,dword ptr [RAX + 0x48] SUB EDI,dword ptr [RAX + 0x4c] BT ESI,0x1 SBB EDI,0x0 JA 0x001778a9 OR EDX,0x1 MOV dword ptr [RAX + 0x8],EDX MOV RCX,qword ptr [RCX] MOV RAX,qword ptr [RCX] TEST RAX,RAX JNZ 0x00177868 LAB_00177899: CMP qword ptr [R15],0x0 JZ 0x001778ca MOV RDI,R15 CALL 0x001abaf9 JMP 0x001778ec LAB_001778a9: MOV qword ptr [R13 + 0x10],-0x1 LAB_001778b1: CMP R13,RAX JZ 0x00177905 TEST byte ptr [R13 + 0x8],0x4 JNZ 0x00177905 MOV RCX,qword ptr [R13] INC dword ptr [RCX + 0x4c] MOV R13,qword ptr [R13] JMP 0x001778b1 LAB_001778ca: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,R15 XOR ESI,ESI XOR EDX,EDX MOV ECX,0x8 LEA R8,[0x177de8] XOR R9D,R9D CALL 0x001ab8f8 LAB_001778ec: MOV byte ptr [R13 + 0x4c],0x0 MOV RDI,RBX MOV RSI,R13 MOV EDX,0x1 CALL 0x00177324 TEST EAX,EAX JNZ 0x0017792d LAB_00177905: LEA RAX,[R12 + -0x1] CMP R12,0x1 MOV R12,RAX JG 0x0017784a LAB_00177917: MOV RDI,R14 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001a97bf LAB_0017792d: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void ft_boolean_reinit_search(long param_1) { long *plVar1; bool bVar2; int iVar3; long *plVar4; long *plVar5; long lVar6; long *plVar7; if ((*(int *)(param_1 + 0x348) == 0) || (*(int *)(param_1 + 0x340) == -1)) { return; } *(int4 *)(param_1 + 0x348) = 2; if (0 < (long)*(int *)(param_1 + 0x80)) { plVar1 = (long *)(param_1 + 0xa0); lVar6 = (long)*(int *)(param_1 + 0x80); do { plVar7 = *(long **)(*(long *)(param_1 + 0x70) + lVar6 * 8); if ((*(byte *)(plVar7 + 1) & 1) != 0) { plVar4 = (long *)*plVar7; plVar5 = plVar7; if (plVar4 != (long *)0x0) { LAB_00177868: if ((*(uint *)(plVar4 + 1) & 1) == 0) { if (((*(uint *)(plVar5 + 1) & 4) == 0) && ((uint)((int)plVar4[9] - *(int *)((long)plVar4 + 0x4c)) <= (uint)((*(uint *)(plVar5 + 1) >> 1 & 1) != 0))) goto code_r0x00177888; plVar7[2] = -1; for (; (plVar7 != plVar4 && ((*(byte *)(plVar7 + 1) & 4) == 0)); plVar7 = (long *)*plVar7) { *(int *)(*plVar7 + 0x4c) = *(int *)(*plVar7 + 0x4c) + 1; } goto LAB_00177905; } } LAB_00177899: if (*plVar1 == 0) { init_tree(plVar1,0,0,8,_ftb_no_dupes_cmp,0,0,0); } else { reset_tree(plVar1); } } *(int1 *)((long)plVar7 + 0x4c) = 0; iVar3 = _ft2_search(param_1,plVar7,1); if (iVar3 != 0) { return; } LAB_00177905: bVar2 = 1 < lVar6; lVar6 = lVar6 + -1; } while (bVar2); } queue_fix((long *)(param_1 + 0x70)); return; code_r0x00177888: *(uint *)(plVar4 + 1) = *(uint *)(plVar4 + 1) | 1; plVar4 = *(long **)*plVar5; plVar5 = (long *)*plVar5; if (plVar4 == (long *)0x0) goto LAB_00177899; goto LAB_00177868; }
33,791
spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::discard_counter()
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/details/mpmc_blocking_q.h
size_t discard_counter() { return discard_counter_.load(std::memory_order_relaxed); }
O0
c
spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::discard_counter(): subq $0x38, %rsp movq %rdi, 0x18(%rsp) movq 0x18(%rsp), %rax addq $0xc0, %rax movq %rax, 0x30(%rsp) movl $0x0, 0x2c(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x8(%rsp) movl 0x2c(%rsp), %edi movl $0xffff, %esi # imm = 0xFFFF callq 0x24460 movl %eax, 0x28(%rsp) movl 0x2c(%rsp), %eax movl %eax, 0x14(%rsp) decl %eax subl $0x2, %eax jb 0xc2fa8 jmp 0xc2f8e movl 0x14(%rsp), %eax subl $0x5, %eax je 0xc2fb7 jmp 0xc2f99 movq 0x8(%rsp), %rax movq (%rax), %rax movq %rax, 0x20(%rsp) jmp 0xc2fc4 movq 0x8(%rsp), %rax movq (%rax), %rax movq %rax, 0x20(%rsp) jmp 0xc2fc4 movq 0x8(%rsp), %rax movq (%rax), %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax addq $0x38, %rsp retq nop
_ZN6spdlog7details19mpmc_blocking_queueINS0_9async_msgEE15discard_counterEv: sub rsp, 38h mov [rsp+38h+var_20], rdi mov rax, [rsp+38h+var_20] add rax, 0C0h mov [rsp+38h+var_8], rax mov [rsp+38h+var_C], 0 mov rax, [rsp+38h+var_8] mov [rsp+38h+var_30], rax mov edi, [rsp+38h+var_C] mov esi, 0FFFFh call _ZStanSt12memory_orderSt23__memory_order_modifier; std::operator&(std::memory_order,std::__memory_order_modifier) mov [rsp+38h+var_10], eax mov eax, [rsp+38h+var_C] mov [rsp+38h+var_24], eax dec eax sub eax, 2 jb short loc_C2FA8 jmp short $+2 loc_C2F8E: mov eax, [rsp+38h+var_24] sub eax, 5 jz short loc_C2FB7 jmp short $+2 loc_C2F99: mov rax, [rsp+38h+var_30] mov rax, [rax] mov [rsp+38h+var_18], rax jmp short loc_C2FC4 loc_C2FA8: mov rax, [rsp+38h+var_30] mov rax, [rax] mov [rsp+38h+var_18], rax jmp short loc_C2FC4 loc_C2FB7: mov rax, [rsp+38h+var_30] mov rax, [rax] mov [rsp+38h+var_18], rax loc_C2FC4: mov rax, [rsp+38h+var_18] add rsp, 38h retn
long long spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::discard_counter(long long a1) { std::operator&(0, 0xFFFF); return *(_QWORD *)(a1 + 192); }
discard_counter: SUB RSP,0x38 MOV qword ptr [RSP + 0x18],RDI MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0xc0 MOV qword ptr [RSP + 0x30],RAX MOV dword ptr [RSP + 0x2c],0x0 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x8],RAX MOV EDI,dword ptr [RSP + 0x2c] MOV ESI,0xffff CALL 0x00124460 MOV dword ptr [RSP + 0x28],EAX MOV EAX,dword ptr [RSP + 0x2c] MOV dword ptr [RSP + 0x14],EAX DEC EAX SUB EAX,0x2 JC 0x001c2fa8 JMP 0x001c2f8e LAB_001c2f8e: MOV EAX,dword ptr [RSP + 0x14] SUB EAX,0x5 JZ 0x001c2fb7 JMP 0x001c2f99 LAB_001c2f99: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x20],RAX JMP 0x001c2fc4 LAB_001c2fa8: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x20],RAX JMP 0x001c2fc4 LAB_001c2fb7: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x20],RAX LAB_001c2fc4: MOV RAX,qword ptr [RSP + 0x20] ADD RSP,0x38 RET
/* WARNING: Removing unreachable block (ram,0x001c2fb7) */ /* WARNING: Removing unreachable block (ram,0x001c2fa8) */ /* spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::discard_counter() */ int8 __thiscall spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::discard_counter (mpmc_blocking_queue<spdlog::details::async_msg> *this) { std::operator&(0,0xffff); return *(int8 *)(this + 0xc0); }
33,792
alaya::SequentialStorageTest_InitTest_Test::~SequentialStorageTest_InitTest_Test()
AlayaLite/tests/storage/sequential_storage_test.cpp
TEST_F(SequentialStorageTest, InitTest) { alaya::SequentialStorage<int, uint32_t> storage; storage.init(sizeof(int), 10, 64); EXPECT_EQ(storage.item_size_, sizeof(int)); EXPECT_EQ(storage.capacity_, 10); EXPECT_EQ(storage.alignment_, 64); EXPECT_NE(storage.data_, nullptr); EXPECT_NE(storage.bitmap_, nullptr); }
O0
cpp
alaya::SequentialStorageTest_InitTest_Test::~SequentialStorageTest_InitTest_Test(): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0xf3d0 movq 0x8(%rsp), %rdi movl $0x10, %esi callq 0xb4a0 addq $0x18, %rsp retq nopl (%rax)
_ZN5alaya35SequentialStorageTest_InitTest_TestD0Ev: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rdi, [rsp+18h+var_8]; this mov [rsp+18h+var_10], rdi call _ZN5alaya35SequentialStorageTest_InitTest_TestD2Ev; alaya::SequentialStorageTest_InitTest_Test::~SequentialStorageTest_InitTest_Test() mov rdi, [rsp+18h+var_10]; void * mov esi, 10h; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) add rsp, 18h retn
void alaya::SequentialStorageTest_InitTest_Test::~SequentialStorageTest_InitTest_Test( alaya::SequentialStorageTest_InitTest_Test *this) { alaya::SequentialStorageTest_InitTest_Test::~SequentialStorageTest_InitTest_Test(this); operator delete(this, 0x10uLL); }
~SequentialStorageTest_InitTest_Test: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RDI CALL 0x0010f3d0 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x10 CALL 0x0010b4a0 ADD RSP,0x18 RET
/* alaya::SequentialStorageTest_InitTest_Test::~SequentialStorageTest_InitTest_Test() */ void __thiscall alaya::SequentialStorageTest_InitTest_Test::~SequentialStorageTest_InitTest_Test (SequentialStorageTest_InitTest_Test *this) { ~SequentialStorageTest_InitTest_Test(this); operator_delete(this,0x10); return; }
33,793
OpenSubdiv::v3_6_0::Bfr::fvar_plus::hasDependentSharpness(OpenSubdiv::v3_6_0::Bfr::FaceVertex const&, OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset const&)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/../bfr/../bfr/faceVertex.h
int GetNumFaces() const { return _vDesc._numFaces; }
O3
c
OpenSubdiv::v3_6_0::Bfr::fvar_plus::hasDependentSharpness(OpenSubdiv::v3_6_0::Bfr::FaceVertex const&, OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset const&): movswl 0x2(%rdi), %eax movswl 0x6(%rsi), %ecx subl %ecx, %eax cmpl $0x2, %eax jl 0x88c06 testb $0x24, 0x98(%rdi) je 0x88c06 testb $0x24, (%rsi) sete %al retq xorl %eax, %eax retq
_ZN10OpenSubdiv6v3_6_03Bfr9fvar_plus21hasDependentSharpnessERKNS1_10FaceVertexERKNS1_16FaceVertexSubsetE: movsx eax, word ptr [rdi+2] movsx ecx, word ptr [rsi+6] sub eax, ecx cmp eax, 2 jl short loc_88C06 test byte ptr [rdi+98h], 24h jz short loc_88C06 test byte ptr [rsi], 24h setz al retn loc_88C06: xor eax, eax retn
bool OpenSubdiv::v3_6_0::Bfr::fvar_plus::hasDependentSharpness(long long a1, long long a2) { return *(__int16 *)(a1 + 2) - *(__int16 *)(a2 + 6) >= 2 && (*(_BYTE *)(a1 + 152) & 0x24) != 0 && (*(_BYTE *)a2 & 0x24) == 0; }
hasDependentSharpness: MOVSX EAX,word ptr [RDI + 0x2] MOVSX ECX,word ptr [RSI + 0x6] SUB EAX,ECX CMP EAX,0x2 JL 0x00188c06 TEST byte ptr [RDI + 0x98],0x24 JZ 0x00188c06 TEST byte ptr [RSI],0x24 SETZ AL RET LAB_00188c06: XOR EAX,EAX RET
/* OpenSubdiv::v3_6_0::Bfr::fvar_plus::hasDependentSharpness(OpenSubdiv::v3_6_0::Bfr::FaceVertex const&, OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset const&) */ int4 OpenSubdiv::v3_6_0::Bfr::fvar_plus::hasDependentSharpness (FaceVertex *param_1,FaceVertexSubset *param_2) { if ((1 < (int)*(short *)(param_1 + 2) - (int)*(short *)(param_2 + 6)) && (((byte)param_1[0x98] & 0x24) != 0)) { return CONCAT31((int3)((uint)((int)*(short *)(param_1 + 2) - (int)*(short *)(param_2 + 6)) >> 8) ,((byte)*param_2 & 0x24) == 0); } return 0; }
33,794
cleanup_instruments()
eloqsql/storage/perfschema/pfs_instr.cc
void cleanup_instruments(void) { global_mutex_container.cleanup(); global_rwlock_container.cleanup(); global_cond_container.cleanup(); global_file_container.cleanup(); PFS_FREE_ARRAY(& builtin_memory_file_handle, file_handle_max, sizeof(PFS_file*), file_handle_array); file_handle_array= NULL; file_handle_max= 0; global_table_container.cleanup(); global_socket_container.cleanup(); global_mdl_container.cleanup(); global_thread_container.cleanup(); PFS_FREE_ARRAY(& builtin_memory_global_stages, stage_class_max, sizeof(PFS_stage_stat), global_instr_class_stages_array); global_instr_class_stages_array= NULL; PFS_FREE_ARRAY(& builtin_memory_global_statements, statement_class_max, sizeof(PFS_statement_stat), global_instr_class_statements_array); global_instr_class_statements_array= NULL; PFS_FREE_ARRAY(& builtin_memory_global_memory, memory_class_max, sizeof(PFS_memory_stat), global_instr_class_memory_array); global_instr_class_memory_array= NULL; }
O3
cpp
cleanup_instruments(): pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax leaq 0x35f0cb(%rip), %rbx # 0x38e3c0 movq (%rbx), %rdi callq 0x340d8 movq 0x8(%rbx), %rdi callq 0x340d8 leaq 0x35f0cb(%rip), %rdi # 0x38e3d8 callq 0x32afe leaq 0x36119f(%rip), %rdi # 0x3904b8 callq 0x32b94 leaq 0x361a73(%rip), %rdi # 0x390d98 callq 0x32c2a movq 0x39db17(%rip), %rsi # 0x3cce48 movq 0x39db80(%rip), %rcx # 0x3cceb8 leaq 0x398b01(%rip), %rdi # 0x3c7e40 movl $0x8, %edx callq 0x2cdb1 xorl %ebx, %ebx movq %rbx, 0x39db66(%rip) # 0x3cceb8 movq %rbx, 0x39daef(%rip) # 0x3cce48 leaq 0x370698(%rip), %rdi # 0x39f9f8 callq 0x32cc0 leaq 0x369b0c(%rip), %rdi # 0x398e78 callq 0x32d56 leaq 0x36a3e0(%rip), %rdi # 0x399758 callq 0x32dec leaq 0x397574(%rip), %rdi # 0x3c68f8 callq 0x32e82 leaq 0x39dd40(%rip), %rax # 0x3cd0d0 movq (%rax), %rsi movq 0x39db26(%rip), %rcx # 0x3ccec0 leaq 0x39935f(%rip), %rdi # 0x3c8700 movl $0x20, %edx callq 0x2cdb1 movq %rbx, 0x39db0e(%rip) # 0x3ccec0 leaq 0x39dd27(%rip), %rax # 0x3cd0e0 movq (%rax), %rsi movq 0x39db05(%rip), %rcx # 0x3ccec8 leaq 0x399476(%rip), %rdi # 0x3c8840 movl $0xb8, %edx callq 0x2cdb1 movq %rbx, 0x39daed(%rip) # 0x3ccec8 leaq 0x39dd1e(%rip), %rax # 0x3cd100 movq (%rax), %rsi movq 0x39dae4(%rip), %rcx # 0x3cced0 leaq 0x39958d(%rip), %rdi # 0x3c8980 movl $0x48, %edx callq 0x2cdb1 movq %rbx, 0x39dacc(%rip) # 0x3cced0 addq $0x8, %rsp popq %rbx popq %rbp retq
_Z19cleanup_instrumentsv: push rbp mov rbp, rsp push rbx push rax lea rbx, global_mutex_container mov rdi, [rbx] call _ZN29PFS_buffer_scalable_containerI9PFS_mutexLi1024ELi1024E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE7cleanupEv; PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>>::cleanup(void) mov rdi, [rbx+8] call _ZN29PFS_buffer_scalable_containerI9PFS_mutexLi1024ELi1024E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE7cleanupEv; PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>>::cleanup(void) lea rdi, global_rwlock_container call _ZN29PFS_buffer_scalable_containerI10PFS_rwlockLi1024ELi1024E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE7cleanupEv; PFS_buffer_scalable_container<PFS_rwlock,1024,1024,PFS_buffer_default_array<PFS_rwlock>,PFS_buffer_default_allocator<PFS_rwlock>>::cleanup(void) lea rdi, global_cond_container call _ZN29PFS_buffer_scalable_containerI8PFS_condLi256ELi256E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE7cleanupEv; PFS_buffer_scalable_container<PFS_cond,256,256,PFS_buffer_default_array<PFS_cond>,PFS_buffer_default_allocator<PFS_cond>>::cleanup(void) lea rdi, global_file_container call _ZN29PFS_buffer_scalable_containerI8PFS_fileLi4096ELi4096E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE7cleanupEv; PFS_buffer_scalable_container<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>>::cleanup(void) mov rsi, cs:file_handle_max mov rcx, cs:file_handle_array lea rdi, builtin_memory_file_handle mov edx, 8 call _Z14pfs_free_arrayP24PFS_builtin_memory_classmmPv; pfs_free_array(PFS_builtin_memory_class *,ulong,ulong,void *) xor ebx, ebx mov cs:file_handle_array, rbx mov cs:file_handle_max, rbx lea rdi, global_table_container call _ZN29PFS_buffer_scalable_containerI9PFS_tableLi1024ELi1024E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE7cleanupEv; PFS_buffer_scalable_container<PFS_table,1024,1024,PFS_buffer_default_array<PFS_table>,PFS_buffer_default_allocator<PFS_table>>::cleanup(void) lea rdi, global_socket_container call _ZN29PFS_buffer_scalable_containerI10PFS_socketLi256ELi256E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE7cleanupEv; PFS_buffer_scalable_container<PFS_socket,256,256,PFS_buffer_default_array<PFS_socket>,PFS_buffer_default_allocator<PFS_socket>>::cleanup(void) lea rdi, global_mdl_container call _ZN29PFS_buffer_scalable_containerI17PFS_metadata_lockLi1024ELi1024E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE7cleanupEv; PFS_buffer_scalable_container<PFS_metadata_lock,1024,1024,PFS_buffer_default_array<PFS_metadata_lock>,PFS_buffer_default_allocator<PFS_metadata_lock>>::cleanup(void) lea rdi, global_thread_container call _ZN29PFS_buffer_scalable_containerI10PFS_threadLi256ELi256E16PFS_thread_array20PFS_thread_allocatorE7cleanupEv; PFS_buffer_scalable_container<PFS_thread,256,256,PFS_thread_array,PFS_thread_allocator>::cleanup(void) lea rax, stage_class_max mov rsi, [rax] mov rcx, cs:global_instr_class_stages_array lea rdi, builtin_memory_global_stages mov edx, 20h ; ' ' call _Z14pfs_free_arrayP24PFS_builtin_memory_classmmPv; pfs_free_array(PFS_builtin_memory_class *,ulong,ulong,void *) mov cs:global_instr_class_stages_array, rbx lea rax, statement_class_max mov rsi, [rax] mov rcx, cs:global_instr_class_statements_array lea rdi, builtin_memory_global_statements mov edx, 0B8h call _Z14pfs_free_arrayP24PFS_builtin_memory_classmmPv; pfs_free_array(PFS_builtin_memory_class *,ulong,ulong,void *) mov cs:global_instr_class_statements_array, rbx lea rax, memory_class_max mov rsi, [rax] mov rcx, cs:global_instr_class_memory_array lea rdi, builtin_memory_global_memory mov edx, 48h ; 'H' call _Z14pfs_free_arrayP24PFS_builtin_memory_classmmPv; pfs_free_array(PFS_builtin_memory_class *,ulong,ulong,void *) mov cs:global_instr_class_memory_array, rbx add rsp, 8 pop rbx pop rbp retn
long long cleanup_instruments(void) { long long result; // rax PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>>::cleanup(global_mutex_container[0]); PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>>::cleanup(global_mutex_container[1]); PFS_buffer_scalable_container<PFS_rwlock,1024,1024,PFS_buffer_default_array<PFS_rwlock>,PFS_buffer_default_allocator<PFS_rwlock>>::cleanup(&global_rwlock_container); PFS_buffer_scalable_container<PFS_cond,256,256,PFS_buffer_default_array<PFS_cond>,PFS_buffer_default_allocator<PFS_cond>>::cleanup(&global_cond_container); PFS_buffer_scalable_container<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>>::cleanup(&global_file_container); pfs_free_array((long long)&builtin_memory_file_handle, file_handle_max, 8LL, file_handle_array); file_handle_array = 0LL; file_handle_max = 0LL; PFS_buffer_scalable_container<PFS_table,1024,1024,PFS_buffer_default_array<PFS_table>,PFS_buffer_default_allocator<PFS_table>>::cleanup(&global_table_container); PFS_buffer_scalable_container<PFS_socket,256,256,PFS_buffer_default_array<PFS_socket>,PFS_buffer_default_allocator<PFS_socket>>::cleanup(&global_socket_container); PFS_buffer_scalable_container<PFS_metadata_lock,1024,1024,PFS_buffer_default_array<PFS_metadata_lock>,PFS_buffer_default_allocator<PFS_metadata_lock>>::cleanup(&global_mdl_container); PFS_buffer_scalable_container<PFS_thread,256,256,PFS_thread_array,PFS_thread_allocator>::cleanup(&global_thread_container); pfs_free_array((long long)&builtin_memory_global_stages, stage_class_max, 32LL, global_instr_class_stages_array); global_instr_class_stages_array = 0LL; pfs_free_array( (long long)&builtin_memory_global_statements, statement_class_max, 184LL, global_instr_class_statements_array); global_instr_class_statements_array = 0LL; result = pfs_free_array( (long long)&builtin_memory_global_memory, memory_class_max, 72LL, (long long)global_instr_class_memory_array); global_instr_class_memory_array = 0LL; return result; }
cleanup_instruments: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX LEA RBX,[0x48e3c0] MOV RDI,qword ptr [RBX] CALL 0x001340d8 MOV RDI,qword ptr [RBX + 0x8] CALL 0x001340d8 LEA RDI,[0x48e3d8] CALL 0x00132afe LEA RDI,[0x4904b8] CALL 0x00132b94 LEA RDI,[0x490d98] CALL 0x00132c2a MOV RSI,qword ptr [0x004cce48] MOV RCX,qword ptr [0x004cceb8] LEA RDI,[0x4c7e40] MOV EDX,0x8 CALL 0x0012cdb1 XOR EBX,EBX MOV qword ptr [0x004cceb8],RBX MOV qword ptr [0x004cce48],RBX LEA RDI,[0x49f9f8] CALL 0x00132cc0 LEA RDI,[0x498e78] CALL 0x00132d56 LEA RDI,[0x499758] CALL 0x00132dec LEA RDI,[0x4c68f8] CALL 0x00132e82 LEA RAX,[0x4cd0d0] MOV RSI,qword ptr [RAX] MOV RCX,qword ptr [0x004ccec0] LEA RDI,[0x4c8700] MOV EDX,0x20 CALL 0x0012cdb1 MOV qword ptr [0x004ccec0],RBX LEA RAX,[0x4cd0e0] MOV RSI,qword ptr [RAX] MOV RCX,qword ptr [0x004ccec8] LEA RDI,[0x4c8840] MOV EDX,0xb8 CALL 0x0012cdb1 MOV qword ptr [0x004ccec8],RBX LEA RAX,[0x4cd100] MOV RSI,qword ptr [RAX] MOV RCX,qword ptr [0x004cced0] LEA RDI,[0x4c8980] MOV EDX,0x48 CALL 0x0012cdb1 MOV qword ptr [0x004cced0],RBX ADD RSP,0x8 POP RBX POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* cleanup_instruments() */ void cleanup_instruments(void) { PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>> ::cleanup(global_mutex_container); PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>> ::cleanup(DAT_0048e3c8); PFS_buffer_scalable_container<PFS_rwlock,1024,1024,PFS_buffer_default_array<PFS_rwlock>,PFS_buffer_default_allocator<PFS_rwlock>> ::cleanup((PFS_buffer_scalable_container<PFS_rwlock,1024,1024,PFS_buffer_default_array<PFS_rwlock>,PFS_buffer_default_allocator<PFS_rwlock>> *)global_rwlock_container); PFS_buffer_scalable_container<PFS_cond,256,256,PFS_buffer_default_array<PFS_cond>,PFS_buffer_default_allocator<PFS_cond>> ::cleanup((PFS_buffer_scalable_container<PFS_cond,256,256,PFS_buffer_default_array<PFS_cond>,PFS_buffer_default_allocator<PFS_cond>> *)global_cond_container); PFS_buffer_scalable_container<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>> ::cleanup((PFS_buffer_scalable_container<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>> *)&global_file_container); pfs_free_array((PFS_builtin_memory_class *)builtin_memory_file_handle,file_handle_max,8, file_handle_array); file_handle_array = (void *)0x0; file_handle_max = 0; PFS_buffer_scalable_container<PFS_table,1024,1024,PFS_buffer_default_array<PFS_table>,PFS_buffer_default_allocator<PFS_table>> ::cleanup((PFS_buffer_scalable_container<PFS_table,1024,1024,PFS_buffer_default_array<PFS_table>,PFS_buffer_default_allocator<PFS_table>> *)global_table_container); PFS_buffer_scalable_container<PFS_socket,256,256,PFS_buffer_default_array<PFS_socket>,PFS_buffer_default_allocator<PFS_socket>> ::cleanup((PFS_buffer_scalable_container<PFS_socket,256,256,PFS_buffer_default_array<PFS_socket>,PFS_buffer_default_allocator<PFS_socket>> *)global_socket_container); PFS_buffer_scalable_container<PFS_metadata_lock,1024,1024,PFS_buffer_default_array<PFS_metadata_lock>,PFS_buffer_default_allocator<PFS_metadata_lock>> ::cleanup((PFS_buffer_scalable_container<PFS_metadata_lock,1024,1024,PFS_buffer_default_array<PFS_metadata_lock>,PFS_buffer_default_allocator<PFS_metadata_lock>> *)global_mdl_container); PFS_buffer_scalable_container<PFS_thread,256,256,PFS_thread_array,PFS_thread_allocator>::cleanup ((PFS_buffer_scalable_container<PFS_thread,256,256,PFS_thread_array,PFS_thread_allocator> *)global_thread_container); pfs_free_array((PFS_builtin_memory_class *)builtin_memory_global_stages,stage_class_max,0x20, global_instr_class_stages_array); global_instr_class_stages_array = (void *)0x0; pfs_free_array((PFS_builtin_memory_class *)builtin_memory_global_statements,statement_class_max, 0xb8,global_instr_class_statements_array); global_instr_class_statements_array = (void *)0x0; pfs_free_array((PFS_builtin_memory_class *)builtin_memory_global_memory,memory_class_max,0x48, global_instr_class_memory_array); global_instr_class_memory_array = (void *)0x0; return; }
33,795
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>, unsigned long)
monkey531[P]llama/common/json.hpp
explicit iteration_proxy_value(IteratorType it, std::size_t array_index_ = 0) noexcept(std::is_nothrow_move_constructible<IteratorType>::value && std::is_nothrow_default_constructible<string_type>::value) : anchor(std::move(it)) , array_index(array_index_) {}
O0
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>, unsigned long): subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq %rdx, 0x20(%rsp) movq 0x30(%rsp), %rax movq %rax, (%rsp) movups (%rsi), %xmm0 movups 0x10(%rsi), %xmm1 movups %xmm1, 0x10(%rax) movups %xmm0, (%rax) movq 0x20(%rsp), %rcx movq %rcx, 0x20(%rax) movq $0x0, 0x28(%rax) addq $0x30, %rax movq %rax, 0x8(%rsp) leaq 0x1f(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x5c150 movq 0x8(%rsp), %rdi movq 0x10(%rsp), %rdx leaq 0x8ae54(%rip), %rsi # 0x21d6c8 callq 0x651c0 jmp 0x19287b leaq 0x1f(%rsp), %rdi callq 0x5c5e0 movq (%rsp), %rdi addq $0x50, %rdi callq 0x5b630 addq $0x38, %rsp retq movq %rax, %rdi callq 0x68410 nop
_ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESI_m: sub rsp, 38h mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov [rsp+38h+var_18], rdx mov rax, [rsp+38h+var_8] mov [rsp+38h+var_38], rax movups xmm0, xmmword ptr [rsi] movups xmm1, xmmword ptr [rsi+10h] movups xmmword ptr [rax+10h], xmm1 movups xmmword ptr [rax], xmm0 mov rcx, [rsp+38h+var_18] mov [rax+20h], rcx mov qword ptr [rax+28h], 0 add rax, 30h ; '0' mov [rsp+38h+var_30], rax lea rdi, [rsp+38h+var_19] mov [rsp+38h+var_28], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rsp+38h+var_30] mov rdx, [rsp+38h+var_28] lea rsi, aMinExp0+0Ah; "0" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_19287B: lea rdi, [rsp+38h+var_19] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rsp+38h+var_38] add rdi, 50h ; 'P' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) add rsp, 38h retn mov rdi, rax call __clang_call_terminate
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::iteration_proxy_value( long long a1, _OWORD *a2, long long a3) { __int128 v3; // xmm0 char v5; // [rsp+1Fh] [rbp-19h] BYREF long long v6; // [rsp+20h] [rbp-18h] _OWORD *v7; // [rsp+28h] [rbp-10h] long long v8; // [rsp+30h] [rbp-8h] v8 = a1; v7 = a2; v6 = a3; v3 = *a2; *(_OWORD *)(a1 + 16) = a2[1]; *(_OWORD *)a1 = v3; *(_QWORD *)(a1 + 32) = v6; *(_QWORD *)(a1 + 40) = 0LL; std::allocator<char>::allocator(&v5, a2); std::string::basic_string<std::allocator<char>>(a1 + 48, (long long)"0", (long long)&v5); std::allocator<char>::~allocator(&v5); return std::string::basic_string(a1 + 80); }
33,796
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>, unsigned long)
monkey531[P]llama/common/json.hpp
explicit iteration_proxy_value(IteratorType it, std::size_t array_index_ = 0) noexcept(std::is_nothrow_move_constructible<IteratorType>::value && std::is_nothrow_default_constructible<string_type>::value) : anchor(std::move(it)) , array_index(array_index_) {}
O1
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>, unsigned long): pushq %rbx movq %rdi, %rbx movups (%rsi), %xmm0 movups 0x10(%rsi), %xmm1 movups %xmm1, 0x10(%rdi) movups %xmm0, (%rdi) movq %rdx, 0x20(%rdi) movq $0x0, 0x28(%rdi) addq $0x30, %rdi leaq 0x40(%rbx), %rax movq %rax, 0x30(%rbx) leaq 0x452c6(%rip), %rsi # 0xf7c7d leaq 0x452c0(%rip), %rdx # 0xf7c7e callq 0x24db0 leaq 0x60(%rbx), %rax movq %rax, 0x50(%rbx) movq $0x0, 0x58(%rbx) movb $0x0, 0x60(%rbx) popq %rbx retq movq %rax, %rdi callq 0x24da5
_ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESH_m: push rbx mov rbx, rdi movups xmm0, xmmword ptr [rsi] movups xmm1, xmmword ptr [rsi+10h] movups xmmword ptr [rdi+10h], xmm1 movups xmmword ptr [rdi], xmm0 mov [rdi+20h], rdx mov qword ptr [rdi+28h], 0 add rdi, 30h ; '0' lea rax, [rbx+40h] mov [rbx+30h], rax lea rsi, aMinExp0+0Ah; "0" lea rdx, aMinExp0+0Bh; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rax, [rbx+60h] mov [rbx+50h], rax mov qword ptr [rbx+58h], 0 mov byte ptr [rbx+60h], 0 pop rbx retn mov rdi, rax call __clang_call_terminate
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::iteration_proxy_value( long long a1, __int128 *a2, long long a3) { __int128 v3; // xmm0 long long result; // rax v3 = *a2; *(_OWORD *)(a1 + 16) = a2[1]; *(_OWORD *)a1 = v3; *(_QWORD *)(a1 + 32) = a3; *(_QWORD *)(a1 + 40) = 0LL; *(_QWORD *)(a1 + 48) = a1 + 64; std::string::_M_construct<char const*>((_QWORD *)(a1 + 48), "0", (long long)""); result = a1 + 96; *(_QWORD *)(a1 + 80) = a1 + 96; *(_QWORD *)(a1 + 88) = 0LL; *(_BYTE *)(a1 + 96) = 0; return result; }
iteration_proxy_value: PUSH RBX MOV RBX,RDI MOVUPS XMM0,xmmword ptr [RSI] MOVUPS XMM1,xmmword ptr [RSI + 0x10] MOVUPS xmmword ptr [RDI + 0x10],XMM1 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x20],RDX MOV qword ptr [RDI + 0x28],0x0 ADD RDI,0x30 LEA RAX,[RBX + 0x40] MOV qword ptr [RBX + 0x30],RAX LAB_001b29b0: LEA RSI,[0x1f7c7d] LEA RDX,[0x1f7c7e] CALL 0x00124db0 LEA RAX,[RBX + 0x60] MOV qword ptr [RBX + 0x50],RAX MOV qword ptr [RBX + 0x58],0x0 MOV byte ptr [RBX + 0x60],0x0 POP RBX RET
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > >::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >, unsigned long) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::iteration_proxy_value (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *this,int4 *param_2,int8 param_3) { int4 uVar1; int4 uVar2; int4 uVar3; int4 uVar4; int4 uVar5; int4 uVar6; int4 uVar7; uVar1 = *param_2; uVar2 = param_2[1]; uVar3 = param_2[2]; uVar4 = param_2[3]; uVar5 = param_2[5]; uVar6 = param_2[6]; uVar7 = param_2[7]; *(int4 *)(this + 0x10) = param_2[4]; *(int4 *)(this + 0x14) = uVar5; *(int4 *)(this + 0x18) = uVar6; *(int4 *)(this + 0x1c) = uVar7; *(int4 *)this = uVar1; *(int4 *)(this + 4) = uVar2; *(int4 *)(this + 8) = uVar3; *(int4 *)(this + 0xc) = uVar4; *(int8 *)(this + 0x20) = param_3; *(int8 *)(this + 0x28) = 0; *(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(this + 0x30) = this + 0x40; /* try { // try from 001b29b0 to 001b29c2 has its CatchHandler @ 001b29d9 */ std::__cxx11::string::_M_construct<char_const*>(this + 0x30,"0",""); *(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(this + 0x50) = this + 0x60; *(int8 *)(this + 0x58) = 0; this[0x60] = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> )0x0; return; }
33,797
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>, unsigned long)
monkey531[P]llama/common/json.hpp
explicit iteration_proxy_value(IteratorType it, std::size_t array_index_ = 0) noexcept(std::is_nothrow_move_constructible<IteratorType>::value && std::is_nothrow_default_constructible<string_type>::value) : anchor(std::move(it)) , array_index(array_index_) {}
O3
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>, unsigned long): pushq %rbx movq %rdi, %rbx movups (%rsi), %xmm0 movups 0x10(%rsi), %xmm1 movups %xmm1, 0x10(%rdi) movups %xmm0, (%rdi) movq %rdx, 0x20(%rdi) movq $0x0, 0x28(%rdi) addq $0x30, %rdi leaq 0x40(%rbx), %rax movq %rax, 0x30(%rbx) leaq 0x3b642(%rip), %rsi # 0xf5c6d leaq 0x3b63c(%rip), %rdx # 0xf5c6e callq 0x24db4 leaq 0x60(%rbx), %rax movq %rax, 0x50(%rbx) movq $0x0, 0x58(%rbx) movb $0x0, 0x60(%rbx) popq %rbx retq movq %rax, %rdi callq 0x24da9 nop
_ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESI_m: push rbx mov rbx, rdi movups xmm0, xmmword ptr [rsi] movups xmm1, xmmword ptr [rsi+10h] movups xmmword ptr [rdi+10h], xmm1 movups xmmword ptr [rdi], xmm0 mov [rdi+20h], rdx mov qword ptr [rdi+28h], 0 add rdi, 30h ; '0' lea rax, [rbx+40h] mov [rbx+30h], rax lea rsi, aMinExp0+0Ah; "0" lea rdx, aMinExp0+0Bh; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rax, [rbx+60h] mov [rbx+50h], rax mov qword ptr [rbx+58h], 0 mov byte ptr [rbx+60h], 0 pop rbx retn mov rdi, rax call __clang_call_terminate
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::iteration_proxy_value( long long a1, __int128 *a2, long long a3) { __int128 v3; // xmm0 long long result; // rax v3 = *a2; *(_OWORD *)(a1 + 16) = a2[1]; *(_OWORD *)a1 = v3; *(_QWORD *)(a1 + 32) = a3; *(_QWORD *)(a1 + 40) = 0LL; *(_QWORD *)(a1 + 48) = a1 + 64; std::string::_M_construct<char const*>(a1 + 48, "0", (long long)""); result = a1 + 96; *(_QWORD *)(a1 + 80) = a1 + 96; *(_QWORD *)(a1 + 88) = 0LL; *(_BYTE *)(a1 + 96) = 0; return result; }
iteration_proxy_value: PUSH RBX MOV RBX,RDI MOVUPS XMM0,xmmword ptr [RSI] MOVUPS XMM1,xmmword ptr [RSI + 0x10] MOVUPS xmmword ptr [RDI + 0x10],XMM1 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x20],RDX MOV qword ptr [RDI + 0x28],0x0 ADD RDI,0x30 LEA RAX,[RBX + 0x40] MOV qword ptr [RBX + 0x30],RAX LAB_001ba624: LEA RSI,[0x1f5c6d] LEA RDX,[0x1f5c6e] CALL 0x00124db4 LEA RAX,[RBX + 0x60] MOV qword ptr [RBX + 0x50],RAX MOV qword ptr [RBX + 0x58],0x0 MOV byte ptr [RBX + 0x60],0x0 POP RBX RET
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, 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> >::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const>, unsigned long) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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>> ::iteration_proxy_value (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> *this,int4 *param_2,int8 param_3) { int4 uVar1; int4 uVar2; int4 uVar3; int4 uVar4; int4 uVar5; int4 uVar6; int4 uVar7; uVar1 = *param_2; uVar2 = param_2[1]; uVar3 = param_2[2]; uVar4 = param_2[3]; uVar5 = param_2[5]; uVar6 = param_2[6]; uVar7 = param_2[7]; *(int4 *)(this + 0x10) = param_2[4]; *(int4 *)(this + 0x14) = uVar5; *(int4 *)(this + 0x18) = uVar6; *(int4 *)(this + 0x1c) = uVar7; *(int4 *)this = uVar1; *(int4 *)(this + 4) = uVar2; *(int4 *)(this + 8) = uVar3; *(int4 *)(this + 0xc) = uVar4; *(int8 *)(this + 0x20) = param_3; *(int8 *)(this + 0x28) = 0; *(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> **)(this + 0x30) = this + 0x40; /* try { // try from 001ba624 to 001ba636 has its CatchHandler @ 001ba64d */ std::__cxx11::string::_M_construct<char_const*>(this + 0x30,"0",""); *(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> **)(this + 0x50) = this + 0x60; *(int8 *)(this + 0x58) = 0; this[0x60] = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> )0x0; return; }
33,798
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<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*)
monkey531[P]llama/common/json.hpp
static std::string diagnostics(const BasicJsonType* leaf_element) { #if JSON_DIAGNOSTICS std::vector<std::string> tokens; for (const auto* current = leaf_element; current != nullptr && current->m_parent != nullptr; current = current->m_parent) { switch (current->m_parent->type()) { case value_t::array: { for (std::size_t i = 0; i < current->m_parent->m_data.m_value.array->size(); ++i) { if (&current->m_parent->m_data.m_value.array->operator[](i) == current) { tokens.emplace_back(std::to_string(i)); break; } } break; } case value_t::object: { for (const auto& element : *current->m_parent->m_data.m_value.object) { if (&element.second == current) { tokens.emplace_back(element.first.c_str()); break; } } break; } case value_t::null: // LCOV_EXCL_LINE case value_t::string: // LCOV_EXCL_LINE case value_t::boolean: // LCOV_EXCL_LINE case value_t::number_integer: // LCOV_EXCL_LINE case value_t::number_unsigned: // LCOV_EXCL_LINE case value_t::number_float: // LCOV_EXCL_LINE case value_t::binary: // LCOV_EXCL_LINE case value_t::discarded: // LCOV_EXCL_LINE default: // LCOV_EXCL_LINE break; // LCOV_EXCL_LINE } } if (tokens.empty()) { return ""; } auto str = std::accumulate(tokens.rbegin(), tokens.rend(), std::string{}, [](const std::string & a, const std::string & b) { return concat(a, '/', detail::escape(b)); }); return concat('(', str, ") "); #else static_cast<void>(leaf_element); return ""; #endif }
O0
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<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*): subq $0x48, %rsp movq %rdi, 0x10(%rsp) movq %rdi, %rax movq %rax, 0x8(%rsp) movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) leaq 0x37(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x5b0f0 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rdx leaq 0x15cfa0(%rip), %rsi # 0x20e9cb callq 0x616d0 jmp 0xb1a32 leaq 0x37(%rsp), %rdi callq 0x5b560 movq 0x8(%rsp), %rax addq $0x48, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) leaq 0x37(%rsp), %rdi callq 0x5b560 movq 0x28(%rsp), %rdi callq 0x5abc0 nopl (%rax,%rax)
_ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEESC_PKT_: sub rsp, 48h mov [rsp+48h+var_38], rdi mov rax, rdi mov [rsp+48h+var_40], rax mov [rsp+48h+var_8], rdi mov [rsp+48h+var_10], rsi lea rdi, [rsp+48h+var_11] mov [rsp+48h+var_30], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rsp+48h+var_38] mov rdx, [rsp+48h+var_30] lea rsi, aExampleSpecifi+27h; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_B1A32: lea rdi, [rsp+48h+var_11] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rax, [rsp+48h+var_40] add rsp, 48h retn mov rcx, rax mov eax, edx mov [rsp+arg_20], rcx mov [rsp+arg_1C], eax lea rdi, [rsp+arg_2F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rsp+arg_20] call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( long long a1, long long a2) { char v3; // [rsp+37h] [rbp-11h] BYREF long long v4; // [rsp+38h] [rbp-10h] long long v5; // [rsp+40h] [rbp-8h] v5 = a1; v4 = a2; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>(a1, (long long)"", (long long)&v3); std::allocator<char>::~allocator(&v3); return a1; }
diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>: SUB RSP,0x48 MOV qword ptr [RSP + 0x10],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RSI LEA RDI,[RSP + 0x37] MOV qword ptr [RSP + 0x18],RDI CALL 0x0015b0f0 MOV RDI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] LAB_001b1a24: LEA RSI,[0x30e9cb] CALL 0x001616d0 LAB_001b1a30: JMP 0x001b1a32 LAB_001b1a32: LEA RDI,[RSP + 0x37] CALL 0x0015b560 MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x48 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, 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*) */ exception * __thiscall nlohmann::json_abi_v3_11_3::detail::exception:: diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (exception *this,basic_json *param_1) { allocator local_11; basic_json *local_10; exception *local_8; local_10 = param_1; local_8 = this; std::allocator<char>::allocator(); /* try { // try from 001b1a24 to 001b1a2f has its CatchHandler @ 001b1a46 */ std::__cxx11::string::string<std::allocator<char>>((string *)this,"",&local_11); std::allocator<char>::~allocator((allocator<char> *)&local_11); return this; }
33,799
findPeaks::_select_by_peak_distance(std::vector<unsigned long, std::allocator<unsigned long>> const&, std::vector<double, std::allocator<double>> const&, unsigned long)
giladroyz[P]FindPeaks/src/cpp/find_peaks.cpp
std::vector<bool> _select_by_peak_distance(const std::vector<size_t> &peaks, const std::vector<double> &priority, size_t distance) { size_t i, k, j; std::vector<bool> keep(peaks.size(), true); //Create map from `i` (index for `peaks` sorted by `priority`) to `j` (index //for `peaks` sorted by position). This allows to iterate `peaks` and `keep` //with `j` by order of `priority` while still maintaining the ability to //step to neighbouring peaks with (`j` + 1) or (`j` - 1). std::vector<size_t> priority_to_position = argsort(priority); // //Round up because actual peak distance can only be natural number // size_t distance_ = distance; // distance_ = distance_ == distance ? distance_ : distance_ + 1; //Highest priority first -> iterate in reverse order (decreasing) for (i = 0; i < peaks.size(); i++) { //"Translate" `i` to `j` which points to current peak whose //neighbours are to be evaluated j = priority_to_position[peaks.size() - 1 - i]; //Skip evaluation for peak already marked as "don't keep" if (keep[j] == 0) continue; k = 1; //Flag "earlier" peaks for removal until minimal distance is exceeded while (k <= j && peaks[j] - peaks[j - k] < distance) { keep[j - k] = false; k++; } k = j + 1; //Flag "later" peaks for removal until minimal distance is exceeded while (k < peaks.size() && peaks[k] - peaks[j] < distance) { keep[k] = false; k++; } } return keep; }
O1
cpp
findPeaks::_select_by_peak_distance(std::vector<unsigned long, std::allocator<unsigned long>> const&, std::vector<double, std::allocator<double>> const&, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rcx, %r14 movq %rdx, %r12 movq %rsi, %r15 movq 0x8(%rsi), %rsi subq (%r15), %rsi sarq $0x3, %rsi leaq 0x10(%rsp), %rdx movb $0x1, (%rdx) leaq 0x7(%rsp), %rcx movq %rdi, 0x8(%rsp) callq 0x3e82c leaq 0x10(%rsp), %rdi movq %r12, %rsi callq 0x3cbba movq (%r15), %rax movq 0x8(%r15), %rdx movq %rdx, %rsi subq %rax, %rsi subq %rax, %rdx je 0x3cf23 sarq $0x3, %rsi addq 0x10(%rsp), %rdx movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000 movq 0x8(%rsp), %rcx movq (%rcx), %r8 cmpq $0x1, %rsi movq %rsi, %r9 adcq $0x0, %r9 xorl %r10d, %r10d leaq 0x3f(%rdi), %r11 movq %r10, %rcx notq %rcx movq (%rdx,%rcx,8), %r15 leaq 0x3f(%r15), %rcx testq %r15, %r15 cmovnsq %r15, %rcx sarq $0x6, %rcx leaq (%r8,%rcx,8), %rcx movq %r15, %r12 andq %r11, %r12 xorl %r13d, %r13d cmpq %rdi, %r12 setbe %r13b movq -0x8(%rcx,%r13,8), %rcx btq %r15, %rcx jae 0x3cf17 testq %r15, %r15 je 0x3cec7 leaq -0x1(%r15), %rcx movl $0x1, %r12d movq (%rax,%r15,8), %r13 subq (%rax,%rcx,8), %r13 cmpq %r14, %r13 jae 0x3cec7 leaq 0x3f(%rcx), %r13 testq %rcx, %rcx cmovnsq %rcx, %r13 sarq $0x6, %r13 movq %rcx, %rbp andq %r11, %rbp xorl %ebx, %ebx cmpq %rdi, %rbp setbe %bl movq $-0x2, %rbp rolq %cl, %rbp leaq (%r8,%r13,8), %r13 andq %rbp, -0x8(%r13,%rbx,8) incq %r12 decq %rcx cmpq %r15, %r12 jbe 0x3ce7f leaq 0x1(%r15), %rcx cmpq %rsi, %rcx jae 0x3cf17 movq (%rax,%rcx,8), %rbx subq (%rax,%r15,8), %rbx cmpq %r14, %rbx jae 0x3cf17 leaq 0x3f(%rcx), %rbx testq %rcx, %rcx cmovnsq %rcx, %rbx sarq $0x6, %rbx movq %rcx, %r12 andq %r11, %r12 xorl %r13d, %r13d cmpq %rdi, %r12 setbe %r13b movq $-0x2, %r12 rolq %cl, %r12 leaq (%r8,%rbx,8), %rbx andq %r12, -0x8(%rbx,%r13,8) incq %rcx cmpq %rcx, %rsi jne 0x3ced0 incq %r10 cmpq %r9, %r10 jne 0x3ce34 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x3cf32 callq 0x8470 movq 0x8(%rsp), %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq 0x8(%rsp), %rdi callq 0x3f140 movq %r14, %rdi callq 0x8990 movq %rax, %rdi callq 0x326a4
_ZN9findPeaks24_select_by_peak_distanceERKSt6vectorImSaImEERKS0_IdSaIdEEm: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14, rcx mov r12, rdx mov r15, rsi mov rsi, [rsi+8] sub rsi, [r15] sar rsi, 3 lea rdx, [rsp+58h+var_48] mov byte ptr [rdx], 1 lea rcx, [rsp+58h+var_51] mov [rsp+58h+var_50], rdi call _ZNSt6vectorIbSaIbEEC2EmRKbRKS0_; std::vector<bool>::vector(ulong,bool const&,std::allocator<bool> const&) lea rdi, [rsp+58h+var_48] mov rsi, r12 call _ZN9findPeaks7argsortERKSt6vectorIdSaIdEE; findPeaks::argsort(std::vector<double> const&) mov rax, [r15] mov rdx, [r15+8] mov rsi, rdx sub rsi, rax sub rdx, rax jz loc_3CF23 sar rsi, 3 add rdx, [rsp+58h+var_48] mov rdi, 8000000000000000h mov rcx, [rsp+58h+var_50] mov r8, [rcx] cmp rsi, 1 mov r9, rsi adc r9, 0 xor r10d, r10d lea r11, [rdi+3Fh] loc_3CE34: mov rcx, r10 not rcx mov r15, [rdx+rcx*8] lea rcx, [r15+3Fh] test r15, r15 cmovns rcx, r15 sar rcx, 6 lea rcx, [r8+rcx*8] mov r12, r15 and r12, r11 xor r13d, r13d cmp r12, rdi setbe r13b mov rcx, [rcx+r13*8-8] bt rcx, r15 jnb loc_3CF17 test r15, r15 jz short loc_3CEC7 lea rcx, [r15-1] mov r12d, 1 loc_3CE7F: mov r13, [rax+r15*8] sub r13, [rax+rcx*8] cmp r13, r14 jnb short loc_3CEC7 lea r13, [rcx+3Fh] test rcx, rcx cmovns r13, rcx sar r13, 6 mov rbp, rcx and rbp, r11 xor ebx, ebx cmp rbp, rdi setbe bl mov rbp, 0FFFFFFFFFFFFFFFEh rol rbp, cl lea r13, [r8+r13*8] and [r13+rbx*8-8], rbp inc r12 dec rcx cmp r12, r15 jbe short loc_3CE7F loc_3CEC7: lea rcx, [r15+1] cmp rcx, rsi jnb short loc_3CF17 loc_3CED0: mov rbx, [rax+rcx*8] sub rbx, [rax+r15*8] cmp rbx, r14 jnb short loc_3CF17 lea rbx, [rcx+3Fh] test rcx, rcx cmovns rbx, rcx sar rbx, 6 mov r12, rcx and r12, r11 xor r13d, r13d cmp r12, rdi setbe r13b mov r12, 0FFFFFFFFFFFFFFFEh rol r12, cl lea rbx, [r8+rbx*8] and [rbx+r13*8-8], r12 inc rcx cmp rsi, rcx jnz short loc_3CED0 loc_3CF17: inc r10 cmp r10, r9 jnz loc_3CE34 loc_3CF23: mov rdi, [rsp+58h+var_48]; void * test rdi, rdi jz short loc_3CF32 call __ZdlPv; operator delete(void *) loc_3CF32: mov rax, [rsp+58h+var_50] add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [rsp+arg_0] call _ZNSt13_Bvector_baseISaIbEE13_M_deallocateEv; std::_Bvector_base<std::allocator<bool>>::_M_deallocate(void) mov rdi, r14 call __Unwind_Resume mov rdi, rax call __clang_call_terminate
long long * findPeaks::_select_by_peak_distance(long long *a1, long long *a2, _QWORD *a3, unsigned long long a4) { long long v7; // rsi long long v8; // rax long long v9; // rdx unsigned long long v10; // rsi char *v11; // rdx long long v12; // r8 long long v13; // r10 signed long long v14; // r15 long long v15; // rcx long long v16; // rcx signed long long v17; // rcx unsigned long long i; // r12 signed long long v19; // rcx char v21; // [rsp+7h] [rbp-51h] BYREF long long *v22; // [rsp+8h] [rbp-50h] void *v23[9]; // [rsp+10h] [rbp-48h] BYREF v7 = (a2[1] - *a2) >> 3; LOBYTE(v23[0]) = 1; v22 = a1; std::vector<bool>::vector(a1, v7, v23, &v21); findPeaks::argsort(v23, a3); v8 = *a2; v9 = a2[1] - *a2; if ( v9 ) { v10 = (a2[1] - *a2) >> 3; v11 = (char *)v23[0] + v9; v12 = *v22; v13 = 0LL; do { v14 = *(_QWORD *)&v11[8 * ~v13]; v15 = v14 + 63; if ( v14 >= 0 ) v15 = *(_QWORD *)&v11[8 * ~v13]; v16 = *(_QWORD *)(v12 + 8 * (v15 >> 6) + 8LL * ((v14 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8); if ( _bittest64(&v16, v14) ) { if ( v14 ) { v17 = v14 - 1; for ( i = 1LL; i <= v14; ++i ) { if ( *(_QWORD *)(v8 + 8 * v14) - *(_QWORD *)(v8 + 8 * v17) >= a4 ) break; *(_QWORD *)(v12 + 8 * (v17 / 64) + 8LL * ((v17 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8) &= __ROL8__(-2LL, v17); --v17; } } v19 = v14 + 1; if ( v14 + 1 < v10 ) { do { if ( *(_QWORD *)(v8 + 8 * v19) - *(_QWORD *)(v8 + 8 * v14) >= a4 ) break; *(_QWORD *)(v12 + 8 * (v19 / 64) + 8LL * ((v19 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8) &= __ROL8__(-2LL, v19); ++v19; } while ( v10 != v19 ); } } ++v13; } while ( v13 != (v10 == 0) + v10 ); } if ( v23[0] ) operator delete(v23[0]); return v22; }
_select_by_peak_distance: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,RCX MOV R12,RDX MOV R15,RSI MOV RSI,qword ptr [RSI + 0x8] SUB RSI,qword ptr [R15] SAR RSI,0x3 LEA RDX,[RSP + 0x10] MOV byte ptr [RDX],0x1 LEA RCX,[RSP + 0x7] MOV qword ptr [RSP + 0x8],RDI CALL 0x0013e82c LAB_0013cde4: LEA RDI,[RSP + 0x10] MOV RSI,R12 CALL 0x0013cbba MOV RAX,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] MOV RSI,RDX SUB RSI,RAX SUB RDX,RAX JZ 0x0013cf23 SAR RSI,0x3 ADD RDX,qword ptr [RSP + 0x10] MOV RDI,-0x8000000000000000 MOV RCX,qword ptr [RSP + 0x8] MOV R8,qword ptr [RCX] CMP RSI,0x1 MOV R9,RSI ADC R9,0x0 XOR R10D,R10D LEA R11,[RDI + 0x3f] LAB_0013ce34: MOV RCX,R10 NOT RCX MOV R15,qword ptr [RDX + RCX*0x8] LEA RCX,[R15 + 0x3f] TEST R15,R15 CMOVNS RCX,R15 SAR RCX,0x6 LEA RCX,[R8 + RCX*0x8] MOV R12,R15 AND R12,R11 XOR R13D,R13D CMP R12,RDI SETBE R13B MOV RCX,qword ptr [RCX + R13*0x8 + -0x8] BT RCX,R15 JNC 0x0013cf17 TEST R15,R15 JZ 0x0013cec7 LEA RCX,[R15 + -0x1] MOV R12D,0x1 LAB_0013ce7f: MOV R13,qword ptr [RAX + R15*0x8] SUB R13,qword ptr [RAX + RCX*0x8] CMP R13,R14 JNC 0x0013cec7 LEA R13,[RCX + 0x3f] TEST RCX,RCX CMOVNS R13,RCX SAR R13,0x6 MOV RBP,RCX AND RBP,R11 XOR EBX,EBX CMP RBP,RDI SETBE BL MOV RBP,-0x2 ROL RBP,CL LEA R13,[R8 + R13*0x8] AND qword ptr [R13 + RBX*0x8 + -0x8],RBP INC R12 DEC RCX CMP R12,R15 JBE 0x0013ce7f LAB_0013cec7: LEA RCX,[R15 + 0x1] CMP RCX,RSI JNC 0x0013cf17 LAB_0013ced0: MOV RBX,qword ptr [RAX + RCX*0x8] SUB RBX,qword ptr [RAX + R15*0x8] CMP RBX,R14 JNC 0x0013cf17 LEA RBX,[RCX + 0x3f] TEST RCX,RCX CMOVNS RBX,RCX SAR RBX,0x6 MOV R12,RCX AND R12,R11 XOR R13D,R13D CMP R12,RDI SETBE R13B MOV R12,-0x2 ROL R12,CL LEA RBX,[R8 + RBX*0x8] AND qword ptr [RBX + R13*0x8 + -0x8],R12 INC RCX CMP RSI,RCX JNZ 0x0013ced0 LAB_0013cf17: INC R10 CMP R10,R9 JNZ 0x0013ce34 LAB_0013cf23: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x0013cf32 CALL 0x00108470 LAB_0013cf32: MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* findPeaks::_select_by_peak_distance(std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<double, std::allocator<double> > const&, unsigned long) */ findPeaks * __thiscall findPeaks::_select_by_peak_distance(findPeaks *this,vector *param_1,vector *param_2,ulong param_3) { ulong *puVar1; long lVar2; long lVar3; ulong uVar4; byte bVar5; ulong uVar6; ulong uVar7; long lVar8; ulong uVar9; ulong uVar10; ulong uVar11; allocator local_48; int7 uStack_47; local_48 = (allocator)0x1; std::vector<bool,std::allocator<bool>>::vector ((ulong)this,(bool *)(*(long *)(param_1 + 8) - *(long *)param_1 >> 3),&local_48); /* try { // try from 0013cde4 to 0013cdf0 has its CatchHandler @ 0013cf46 */ argsort((findPeaks *)&local_48,param_2); lVar2 = *(long *)param_1; lVar8 = *(long *)(param_1 + 8) - lVar2; if (lVar8 != 0) { uVar9 = *(long *)(param_1 + 8) - lVar2 >> 3; lVar3 = *(long *)this; uVar10 = 0; do { uVar4 = *(ulong *)(lVar8 + CONCAT71(uStack_47,local_48) + ~uVar10 * 8); uVar7 = uVar4 + 0x3f; if (-1 < (long)uVar4) { uVar7 = uVar4; } if ((*(ulong *)(lVar3 + ((long)uVar7 >> 6) * 8 + -8 + (ulong)((uVar4 & 0x800000000000003f) < 0x8000000000000001) * 8) >> (uVar4 & 0x3f) & 1) != 0) { if (uVar4 != 0) { uVar11 = 1; uVar7 = uVar4; do { uVar6 = uVar7 - 1; if (param_3 <= (ulong)(*(long *)(lVar2 + uVar4 * 8) - *(long *)(lVar2 + uVar6 * 8))) break; uVar7 = uVar7 + 0x3e; if (-1 < (long)uVar6) { uVar7 = uVar6; } bVar5 = (byte)uVar6 & 0x3f; puVar1 = (ulong *)(lVar3 + ((long)uVar7 >> 6) * 8 + -8 + (ulong)((uVar6 & 0x800000000000003f) < 0x8000000000000001) * 8); *puVar1 = *puVar1 & (-2L << bVar5 | 0xfffffffffffffffeU >> 0x40 - bVar5); uVar11 = uVar11 + 1; uVar7 = uVar6; } while (uVar11 <= uVar4); } uVar7 = uVar4 + 1; if (uVar7 < uVar9) { do { if (param_3 <= (ulong)(*(long *)(lVar2 + uVar7 * 8) - *(long *)(lVar2 + uVar4 * 8))) break; uVar11 = uVar7 + 0x3f; if (-1 < (long)uVar7) { uVar11 = uVar7; } bVar5 = (byte)uVar7 & 0x3f; puVar1 = (ulong *)(lVar3 + ((long)uVar11 >> 6) * 8 + -8 + (ulong)((uVar7 & 0x800000000000003f) < 0x8000000000000001) * 8); *puVar1 = *puVar1 & (-2L << bVar5 | 0xfffffffffffffffeU >> 0x40 - bVar5); uVar7 = uVar7 + 1; } while (uVar9 != uVar7); } } uVar10 = uVar10 + 1; } while (uVar10 != uVar9 + (uVar9 == 0)); } if ((void *)CONCAT71(uStack_47,local_48) != (void *)0x0) { operator_delete((void *)CONCAT71(uStack_47,local_48)); } return this; }