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
4,600
nglog::LogMessage::RecordCrashReason(nglog::internal::CrashReason*)
ng-log[P]ng-log/src/logging.cc
void LogMessage::RecordCrashReason(internal::CrashReason* reason) { reason->filename = fatal_msg_data_exclusive.fullname_; reason->line_number = fatal_msg_data_exclusive.line_; reason->message = fatal_msg_data_exclusive.message_text_ + fatal_msg_data_exclusive.num_prefix_chars_; #ifdef HAVE_STACKTRACE // Retrieve the stack trace, omitting the logging frames that got us here. reason->depth = GetStackTrace(reason->stack, ARRAYSIZE(reason->stack), 4); #else reason->depth = 0; #endif }
O1
cpp
nglog::LogMessage::RecordCrashReason(nglog::internal::CrashReason*): pushq %rbx movq %rsi, %rbx leaq 0x270e3(%rip), %rax # 0x32de0 movq 0x2e7b4(%rip), %rcx # 0x3a4b8 movq %rcx, (%rsi) movl 0x2e76f(%rip), %ecx # 0x3a47c movl %ecx, 0x8(%rsi) movq 0x2e781(%rip), %rcx # 0x3a498 leaq 0x4(%rcx,%rax), %rax movq %rax, 0x10(%rsi) leaq 0x18(%rsi), %rdi movl $0x20, %esi movl $0x4, %edx callq 0x212a4 movl %eax, 0x118(%rbx) popq %rbx retq nop
_ZN5nglog10LogMessage17RecordCrashReasonEPNS_8internal11CrashReasonE: push rbx mov rbx, rsi lea rax, _ZN5nglogL24fatal_msg_data_exclusiveE; nglog::fatal_msg_data_exclusive mov rcx, cs:qword_3A4B8 mov [rsi], rcx mov ecx, cs:dword_3A47C mov [rsi+8], ecx mov rcx, cs:qword_3A498; int lea rax, [rcx+rax+4] mov [rsi+10h], rax lea rdi, [rsi+18h]; this mov esi, offset qword_20; void ** mov edx, 4; int call _ZN5nglog5tools13GetStackTraceEPPvii; nglog::tools::GetStackTrace(void **,int,int) mov [rbx+118h], eax pop rbx retn
long long nglog::LogMessage::RecordCrashReason(long long a1, long long a2) { int v2; // ecx long long result; // rax *(_QWORD *)a2 = qword_3A4B8; *(_DWORD *)(a2 + 8) = dword_3A47C; v2 = qword_3A498[0]; *(_QWORD *)(a2 + 16) = (char *)&nglog::fatal_msg_data_exclusive + *(_QWORD *)qword_3A498 + 4; result = nglog::tools::GetStackTrace((nglog::tools *)(a2 + 24), (void **)&qword_20, 4, v2); *(_DWORD *)(a2 + 280) = result; return result; }
RecordCrashReason: PUSH RBX MOV RBX,RSI LEA RAX,[0x132de0] MOV RCX,qword ptr [0x0013a4b8] MOV qword ptr [RSI],RCX MOV ECX,dword ptr [0x0013a47c] MOV dword ptr [RSI + 0x8],ECX MOV RCX,qword ptr [0x0013a498] LEA RAX,[RCX + RAX*0x1 + 0x4] MOV qword ptr [RSI + 0x10],RAX LEA RDI,[RSI + 0x18] MOV ESI,0x20 MOV EDX,0x4 CALL 0x001212a4 MOV dword ptr [RBX + 0x118],EAX POP RBX RET
/* nglog::LogMessage::RecordCrashReason(nglog::internal::CrashReason*) */ void __thiscall nglog::LogMessage::RecordCrashReason(LogMessage *this,CrashReason *param_1) { int4 uVar1; *(int8 *)param_1 = fatal_msg_data_exclusive._30424_8_; *(int4 *)(param_1 + 8) = fatal_msg_data_exclusive._30364_4_; *(long *)(param_1 + 0x10) = fatal_msg_data_exclusive._30392_8_ + 0x132de4; uVar1 = tools::GetStackTrace((void **)(param_1 + 0x18),0x20,4); *(int4 *)(param_1 + 0x118) = uVar1; return; }
4,601
ma_tls_write_async
eloqsql/libmariadb/libmariadb/secure/openssl.c
ssize_t ma_tls_write_async(MARIADB_PVIO *pvio, const unsigned char *buffer, size_t length) { int res; struct mysql_async_context *b= pvio->mysql->options.extension->async_context; MARIADB_TLS *ctls= pvio->ctls; for (;;) { res= SSL_write((SSL *)ctls->ssl, (void *)buffer, (int)length); if (ma_tls_async_check_result(res, b, (SSL *)ctls->ssl)) return res; } }
O3
c
ma_tls_write_async: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 movq 0x38(%rdi), %r13 movq 0x40(%rdi), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %r15 movq 0x10(%r13), %rdi movq %r14, %rsi movl %ebx, %edx callq 0x17b10 movl %eax, %r12d movq 0x10(%r13), %rdx movl %eax, %edi movq %r15, %rsi callq 0x3224e testb %al, %al je 0x322ee movslq %r12d, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ma_tls_write_async: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r14, rsi mov r13, [rdi+38h] mov rax, [rdi+40h] mov rax, [rax+480h] mov r15, [rax+28h] loc_322EE: mov rdi, [r13+10h] mov rsi, r14 mov edx, ebx call _SSL_write mov r12d, eax mov rdx, [r13+10h] mov edi, eax mov rsi, r15 call ma_tls_async_check_result test al, al jz short loc_322EE movsxd rax, r12d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_tls_write_async(long long a1, long long a2, unsigned int a3) { long long v4; // r13 long long v5; // r15 int v6; // r12d v4 = *(_QWORD *)(a1 + 56); v5 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) + 40LL); do v6 = SSL_write(*(_QWORD *)(v4 + 16), a2, a3); while ( !(unsigned __int8)ma_tls_async_check_result(v6, v5, *(_QWORD *)(v4 + 16)) ); return v6; }
ma_tls_write_async: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI MOV R13,qword ptr [RDI + 0x38] MOV RAX,qword ptr [RDI + 0x40] MOV RAX,qword ptr [RAX + 0x480] MOV R15,qword ptr [RAX + 0x28] LAB_001322ee: MOV RDI,qword ptr [R13 + 0x10] MOV RSI,R14 MOV EDX,EBX CALL 0x00117b10 MOV R12D,EAX MOV RDX,qword ptr [R13 + 0x10] MOV EDI,EAX MOV RSI,R15 CALL 0x0013224e TEST AL,AL JZ 0x001322ee MOVSXD RAX,R12D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long ma_tls_write_async(long param_1,void *param_2,int param_3) { long lVar1; int8 uVar2; char cVar3; int iVar4; lVar1 = *(long *)(param_1 + 0x38); uVar2 = *(int8 *)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28); do { iVar4 = SSL_write(*(SSL **)(lVar1 + 0x10),param_2,param_3); cVar3 = ma_tls_async_check_result(iVar4,uVar2,*(int8 *)(lVar1 + 0x10)); } while (cVar3 == '\0'); return (long)iVar4; }
4,602
ma_get_key
eloqsql/storage/maria/ma_search.c
uchar *_ma_get_key(MARIA_KEY *key, MARIA_PAGE *ma_page, uchar *keypos) { uint page_flag, nod_flag; MARIA_KEYDEF *keyinfo= key->keyinfo; uchar *page; DBUG_ENTER("_ma_get_key"); page= ma_page->buff; page_flag= ma_page->flag; nod_flag= ma_page->node; if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY)) && ! (page_flag & KEYPAGE_FLAG_HAS_TRANSID)) { bmove(key->data, keypos, keyinfo->keylength+nod_flag); key->ref_length= keyinfo->share->rec_reflength; key->data_length= keyinfo->keylength - key->ref_length; key->flag= 0; DBUG_RETURN(keypos+keyinfo->keylength+nod_flag); } else { page+= keyinfo->share->keypage_header + nod_flag; key->data[0]= 0; /* safety */ while (page <= keypos) { if (!(*keyinfo->get_key)(key, page_flag, nod_flag, &page)) { _ma_set_fatal_error_with_share(keyinfo->share, HA_ERR_CRASHED); DBUG_RETURN(0); } } } DBUG_PRINT("exit",("page: %p length: %u", page, key->data_length + key->ref_length)); DBUG_RETURN(page); }
O3
c
ma_get_key: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rdi, %r15 movq 0x8(%rdi), %r13 movl 0x28(%rsi), %r14d movl 0x2c(%rsi), %r12d testb $0x28, 0xa2(%r13) sete %al testb $0x2, %r12b sete %cl andb %al, %cl cmpb $0x1, %cl jne 0x6de4a movq (%r15), %rdi movzwl 0xaa(%r13), %edx addl %r14d, %edx movq %rbx, %rsi callq 0x29110 movq (%r13), %rax movl 0x740(%rax), %eax movl %eax, 0x14(%r15) movzwl 0xaa(%r13), %ecx subl %eax, %ecx movl %ecx, 0x10(%r15) movl $0x0, 0x18(%r15) movzwl 0xaa(%r13), %eax addq %r14, %rbx addq %rax, %rbx movq %rbx, %rax jmp 0x6de99 movq (%r13), %rax movl 0x744(%rax), %eax addl %r14d, %eax addq 0x10(%rsi), %rax leaq -0x30(%rbp), %rcx movq %rax, (%rcx) movq (%r15), %rax movb $0x0, (%rax) movq -0x30(%rbp), %rax cmpq %rbx, %rax ja 0x6de99 movq %r15, %rdi movl %r12d, %esi movl %r14d, %edx leaq -0x30(%rbp), %rcx callq *0xe0(%r13) testl %eax, %eax jne 0x6de68 movq (%r13), %rdi movl $0x7e, %esi callq 0x3fc7a xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ma_get_key: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r15, rdi mov r13, [rdi+8] mov r14d, [rsi+28h] mov r12d, [rsi+2Ch] test byte ptr [r13+0A2h], 28h setz al test r12b, 2 setz cl and cl, al cmp cl, 1 jnz short loc_6DE4A mov rdi, [r15] movzx edx, word ptr [r13+0AAh] add edx, r14d mov rsi, rbx call _memmove mov rax, [r13+0] mov eax, [rax+740h] mov [r15+14h], eax movzx ecx, word ptr [r13+0AAh] sub ecx, eax mov [r15+10h], ecx mov dword ptr [r15+18h], 0 movzx eax, word ptr [r13+0AAh] add rbx, r14 add rbx, rax mov rax, rbx jmp short loc_6DE99 loc_6DE4A: mov rax, [r13+0] mov eax, [rax+744h] add eax, r14d add rax, [rsi+10h] lea rcx, [rbp+var_30] mov [rcx], rax mov rax, [r15] mov byte ptr [rax], 0 loc_6DE68: mov rax, [rbp+var_30] cmp rax, rbx ja short loc_6DE99 mov rdi, r15 mov esi, r12d mov edx, r14d lea rcx, [rbp+var_30] call qword ptr [r13+0E0h] test eax, eax jnz short loc_6DE68 mov rdi, [r13+0] mov esi, 7Eh ; '~' call _ma_set_fatal_error_with_share xor eax, eax loc_6DE99: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_get_key(long long a1, long long a2, unsigned long long a3) { long long v3; // rax unsigned __int16 *v5; // r13 long long v6; // r14 unsigned int v7; // r12d int v8; // eax long long result; // rax long long v10; // rdx long long v11; // rcx long long v12; // r8 int v13; // r9d _QWORD v14[6]; // [rsp+0h] [rbp-30h] BYREF v14[0] = v3; v5 = *(unsigned __int16 **)(a1 + 8); v6 = *(unsigned int *)(a2 + 40); v7 = *(_DWORD *)(a2 + 44); if ( (v5[81] & 0x28) == 0 && (v7 & 2) == 0 ) { memmove(*(_QWORD *)a1, a3, (unsigned int)v6 + v5[85]); v8 = *(_DWORD *)(*(_QWORD *)v5 + 1856LL); *(_DWORD *)(a1 + 20) = v8; *(_DWORD *)(a1 + 16) = v5[85] - v8; *(_DWORD *)(a1 + 24) = 0; return v5[85] + v6 + a3; } else { v14[0] = *(_QWORD *)(a2 + 16) + (unsigned int)(v6 + *(_DWORD *)(*(_QWORD *)v5 + 1860LL)); **(_BYTE **)a1 = 0; while ( 1 ) { result = v14[0]; if ( v14[0] > a3 ) break; if ( !(*((unsigned int ( **)(long long, _QWORD, _QWORD, _QWORD *))v5 + 28))(a1, v7, (unsigned int)v6, v14) ) { ma_set_fatal_error_with_share(*(_QWORD *)v5, 126, v10, v11, v12, v13); return 0LL; } } } return result; }
_ma_get_key: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R15,RDI MOV R13,qword ptr [RDI + 0x8] MOV R14D,dword ptr [RSI + 0x28] MOV R12D,dword ptr [RSI + 0x2c] TEST byte ptr [R13 + 0xa2],0x28 SETZ AL TEST R12B,0x2 SETZ CL AND CL,AL CMP CL,0x1 JNZ 0x0016de4a MOV RDI,qword ptr [R15] MOVZX EDX,word ptr [R13 + 0xaa] ADD EDX,R14D MOV RSI,RBX CALL 0x00129110 MOV RAX,qword ptr [R13] MOV EAX,dword ptr [RAX + 0x740] MOV dword ptr [R15 + 0x14],EAX MOVZX ECX,word ptr [R13 + 0xaa] SUB ECX,EAX MOV dword ptr [R15 + 0x10],ECX MOV dword ptr [R15 + 0x18],0x0 MOVZX EAX,word ptr [R13 + 0xaa] ADD RBX,R14 ADD RBX,RAX MOV RAX,RBX JMP 0x0016de99 LAB_0016de4a: MOV RAX,qword ptr [R13] MOV EAX,dword ptr [RAX + 0x744] ADD EAX,R14D ADD RAX,qword ptr [RSI + 0x10] LEA RCX,[RBP + -0x30] MOV qword ptr [RCX],RAX MOV RAX,qword ptr [R15] MOV byte ptr [RAX],0x0 LAB_0016de68: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,RBX JA 0x0016de99 MOV RDI,R15 MOV ESI,R12D MOV EDX,R14D LEA RCX,[RBP + -0x30] CALL qword ptr [R13 + 0xe0] TEST EAX,EAX JNZ 0x0016de68 MOV RDI,qword ptr [R13] MOV ESI,0x7e CALL 0x0013fc7a XOR EAX,EAX LAB_0016de99: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void * _ma_get_key(int8 *param_1,long param_2,void *param_3) { uint uVar1; uint uVar2; long *plVar3; int iVar4; void *local_38; plVar3 = (long *)param_1[1]; uVar1 = *(uint *)(param_2 + 0x28); uVar2 = *(uint *)(param_2 + 0x2c); if ((uVar2 & 2) == 0 && (*(byte *)((long)plVar3 + 0xa2) & 0x28) == 0) { memmove((void *)*param_1,param_3,(ulong)(*(ushort *)((long)plVar3 + 0xaa) + uVar1)); iVar4 = *(int *)(*plVar3 + 0x740); *(int *)((long)param_1 + 0x14) = iVar4; *(uint *)(param_1 + 2) = (uint)*(ushort *)((long)plVar3 + 0xaa) - iVar4; *(int4 *)(param_1 + 3) = 0; param_3 = (void *)((long)param_3 + (ulong)*(ushort *)((long)plVar3 + 0xaa) + (ulong)uVar1); } else { local_38 = (void *)((ulong)(*(int *)(*plVar3 + 0x744) + uVar1) + *(long *)(param_2 + 0x10)); *(int1 *)*param_1 = 0; do { if (param_3 < local_38) { return local_38; } iVar4 = (*(code *)plVar3[0x1c])(param_1,uVar2,uVar1,&local_38); } while (iVar4 != 0); _ma_set_fatal_error_with_share(*plVar3,0x7e); param_3 = (void *)0x0; } return param_3; }
4,603
my_scan_mb2
eloqsql/strings/ctype-ucs2.c
static size_t my_scan_mb2(CHARSET_INFO *cs __attribute__((unused)), const char *str, const char *end, int sequence_type) { const char *str0= str; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; int res; switch (sequence_type) { case MY_SEQ_SPACES: for (res= mb_wc(cs, &wc, (const uchar *) str, (const uchar *) end); res > 0 && wc == ' '; str+= res, res= mb_wc(cs, &wc, (const uchar *) str, (const uchar *) end)) { } return (size_t) (str - str0); case MY_SEQ_NONSPACES: DBUG_ASSERT(0); /* Not implemented */ /* pass through */ default: return 0; } }
O3
c
my_scan_mb2: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp cmpl $0x2, %ecx jne 0x691c4 movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %r15 movq 0xb8(%rdi), %rax movq 0x28(%rax), %rbx leaq -0x38(%rbp), %rsi movq %r12, %rdx movq %r14, %rcx callq *%rbx movq %r12, -0x30(%rbp) testl %eax, %eax jle 0x691be cmpq $0x20, -0x38(%rbp) movq -0x30(%rbp), %r12 jne 0x691be leaq -0x38(%rbp), %r13 movq -0x30(%rbp), %r12 movq %r12, %rcx movl %eax, %r12d addq %rcx, %r12 movq %r15, %rdi movq %r13, %rsi movq %r12, %rdx movq %r14, %rcx callq *%rbx testl %eax, %eax jle 0x691be cmpq $0x20, -0x38(%rbp) je 0x6919c subq -0x30(%rbp), %r12 jmp 0x691c7 xorl %r12d, %r12d movq %r12, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_scan_mb2: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h cmp ecx, 2 jnz short loc_691C4 mov r14, rdx mov r12, rsi mov r15, rdi mov rax, [rdi+0B8h] mov rbx, [rax+28h] lea rsi, [rbp+var_38] mov rdx, r12 mov rcx, r14 call rbx mov [rbp+var_30], r12 test eax, eax jle short loc_691BE cmp [rbp+var_38], 20h ; ' ' mov r12, [rbp+var_30] jnz short loc_691BE lea r13, [rbp+var_38] mov r12, [rbp+var_30] loc_6919C: mov rcx, r12 mov r12d, eax add r12, rcx mov rdi, r15 mov rsi, r13 mov rdx, r12 mov rcx, r14 call rbx test eax, eax jle short loc_691BE cmp [rbp+var_38], 20h ; ' ' jz short loc_6919C loc_691BE: sub r12, [rbp+var_30] jmp short loc_691C7 loc_691C4: xor r12d, r12d loc_691C7: mov rax, r12 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_scan_mb2(long long a1, long long a2, long long a3, int a4) { long long v5; // r12 long long ( *v6)(long long, long long *, long long, long long); // rbx int v7; // eax long long v10; // [rsp+8h] [rbp-38h] BYREF long long v11; // [rsp+10h] [rbp-30h] if ( a4 != 2 ) return 0LL; v5 = a2; v6 = *(long long ( **)(long long, long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); v7 = v6(a1, &v10, a2, a3); v11 = a2; if ( v7 > 0 ) { v5 = v11; if ( v10 == 32 ) { v5 = v11; do { v5 += (unsigned int)v7; v7 = v6(a1, &v10, v5, a3); } while ( v7 > 0 && v10 == 32 ); } } return v5 - v11; }
my_scan_mb2: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 CMP ECX,0x2 JNZ 0x001691c4 MOV R14,RDX MOV R12,RSI MOV R15,RDI MOV RAX,qword ptr [RDI + 0xb8] MOV RBX,qword ptr [RAX + 0x28] LEA RSI,[RBP + -0x38] MOV RDX,R12 MOV RCX,R14 CALL RBX MOV qword ptr [RBP + -0x30],R12 TEST EAX,EAX JLE 0x001691be CMP qword ptr [RBP + -0x38],0x20 MOV R12,qword ptr [RBP + -0x30] JNZ 0x001691be LEA R13,[RBP + -0x38] MOV R12,qword ptr [RBP + -0x30] LAB_0016919c: MOV RCX,R12 MOV R12D,EAX ADD R12,RCX MOV RDI,R15 MOV RSI,R13 MOV RDX,R12 MOV RCX,R14 CALL RBX TEST EAX,EAX JLE 0x001691be CMP qword ptr [RBP + -0x38],0x20 JZ 0x0016919c LAB_001691be: SUB R12,qword ptr [RBP + -0x30] JMP 0x001691c7 LAB_001691c4: XOR R12D,R12D LAB_001691c7: MOV RAX,R12 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_scan_mb2(long param_1,long param_2,int8 param_3,int param_4) { code *pcVar1; uint uVar2; long local_40; long local_38; if (param_4 == 2) { pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); uVar2 = (*pcVar1)(param_1,&local_40,param_2,param_3); local_38 = param_2; if ((0 < (int)uVar2) && (local_40 == 0x20)) { do { param_2 = (ulong)uVar2 + param_2; uVar2 = (*pcVar1)(param_1,&local_40,param_2,param_3); if ((int)uVar2 < 1) break; } while (local_40 == 0x20); } param_2 = param_2 - local_38; } else { param_2 = 0; } return param_2; }
4,604
js_string_pad
bluesky950520[P]quickjs/quickjs.c
static JSValue js_string_pad(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int padEnd) { JSValue str, v = JS_UNDEFINED; StringBuffer b_s, *b = &b_s; JSString *p, *p1 = NULL; int n, len, c = ' '; str = JS_ToStringCheckObject(ctx, this_val); if (JS_IsException(str)) goto fail1; if (JS_ToInt32Sat(ctx, &n, argv[0])) goto fail2; p = JS_VALUE_GET_STRING(str); len = p->len; if (len >= n) return str; if (argc > 1 && !JS_IsUndefined(argv[1])) { v = JS_ToString(ctx, argv[1]); if (JS_IsException(v)) goto fail2; p1 = JS_VALUE_GET_STRING(v); if (p1->len == 0) { JS_FreeValue(ctx, v); return str; } if (p1->len == 1) { c = string_get(p1, 0); p1 = NULL; } } if (n > JS_STRING_LEN_MAX) { JS_ThrowRangeError(ctx, "invalid string length"); goto fail2; } if (string_buffer_init(ctx, b, n)) goto fail3; n -= len; if (padEnd) { if (string_buffer_concat(b, p, 0, len)) goto fail; } if (p1) { while (n > 0) { int chunk = min_int(n, p1->len); if (string_buffer_concat(b, p1, 0, chunk)) goto fail; n -= chunk; } } else { if (string_buffer_fill(b, c, n)) goto fail; } if (!padEnd) { if (string_buffer_concat(b, p, 0, len)) goto fail; } JS_FreeValue(ctx, v); JS_FreeValue(ctx, str); return string_buffer_end(b); fail: string_buffer_free(b); fail3: JS_FreeValue(ctx, v); fail2: JS_FreeValue(ctx, str); fail1: return JS_EXCEPTION; }
O2
c
js_string_pad: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %r9d, %r13d movq %r8, %rbp movl %ecx, %r14d movq %rdi, %r12 callq 0x3a290 movq %rdx, %r15 pushq $0x6 popq %rdx cmpl $0x6, %r15d jne 0x68ad2 xorl %ebx, %ebx jmp 0x68b06 movq %rax, %rbx movl %r13d, 0x10(%rsp) movq (%rbp), %rdx movq 0x8(%rbp), %rcx leaq 0x14(%rsp), %rsi movq %r12, %rdi callq 0x2133d testl %eax, %eax je 0x68b18 movq %r12, %rdi movq %rbx, %rsi movq %r15, %rdx callq 0x1801e xorl %ebx, %ebx pushq $0x6 popq %rdx movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x7fffffff, %eax # imm = 0x7FFFFFFF andl 0x4(%rbx), %eax movl 0x14(%rsp), %r9d movl %r9d, %r13d subl %eax, %r13d jle 0x68c3c pushq $0x3 popq %r8 pushq $0x20 popq %rcx xorl %esi, %esi cmpl $0x2, %r14d jl 0x68b4f movq 0x18(%rbp), %rdx xorl %esi, %esi cmpl $0x3, %edx jne 0x68bf9 xorl %r14d, %r14d cmpl $0x40000000, %r9d # imm = 0x40000000 jb 0x68b6e leaq 0x1cd5c(%rip), %rsi # 0x858be movq %r12, %rdi xorl %eax, %eax callq 0x1acb3 jmp 0x68af3 movl %ecx, %ebp movl %eax, 0xc(%rsp) movq %rsi, 0x18(%rsp) movq %r8, 0x20(%rsp) leaq 0x28(%rsp), %rsi movq %r12, %rdi movl %r9d, %edx callq 0x2e042 testl %eax, %eax jne 0x68ce0 cmpl $0x0, 0x10(%rsp) je 0x68bb8 leaq 0x28(%rsp), %rdi movq %rbx, %rsi xorl %edx, %edx movl 0xc(%rsp), %ecx callq 0x39dad testl %eax, %eax jne 0x68cd6 testq %r14, %r14 je 0x68c6a testl %r13d, %r13d jle 0x68c7d movq %r14, %rsi movl 0x4(%r14), %ebp movl $0x7fffffff, %eax # imm = 0x7FFFFFFF andl %eax, %ebp cmpl %ebp, %r13d cmovbl %r13d, %ebp leaq 0x28(%rsp), %rdi xorl %edx, %edx movl %ebp, %ecx callq 0x39dad subl %ebp, %r13d testl %eax, %eax je 0x68bc1 jmp 0x68cd6 movl %r9d, %r14d movl %eax, 0xc(%rsp) movq 0x10(%rbp), %rsi movq %r12, %rdi callq 0x1b03c movq %rdx, %r8 cmpl $0x6, %r8d je 0x68af3 movq %rax, %rsi movq 0x4(%rax), %rax movl %eax, %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF cmpl $0x1, %ecx je 0x68c44 testl %ecx, %ecx jne 0x68c58 movq %r12, %rdi movq %r8, %rdx callq 0x1801e movq %r15, %rdx jmp 0x68b06 testl %eax, %eax movl 0xc(%rsp), %eax movl %r14d, %r9d js 0x68cb6 movzbl 0x18(%rsi), %ecx jmp 0x68b4f movl %r14d, %r9d movq %rsi, %r14 movl 0xc(%rsp), %eax pushq $0x20 popq %rcx jmp 0x68b52 leaq 0x28(%rsp), %rdi movl %ebp, %esi movl %r13d, %edx callq 0x697c3 testl %eax, %eax jne 0x68cd6 cmpl $0x0, 0x10(%rsp) je 0x68cbf movq %r12, %rdi movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx callq 0x1801e movq %r12, %rdi movq %rbx, %rsi movq %r15, %rdx callq 0x1801e leaq 0x28(%rsp), %rdi callq 0x2cad4 movq %rax, %rbx jmp 0x68b06 movzwl 0x18(%rsi), %ecx jmp 0x68b4f leaq 0x28(%rsp), %rdi movq %rbx, %rsi xorl %edx, %edx movl 0xc(%rsp), %ecx callq 0x39dad testl %eax, %eax je 0x68c84 leaq 0x28(%rsp), %rdi callq 0x2ef01 movq %r12, %rdi movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx callq 0x1801e jmp 0x68af3
js_string_pad: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r13d, r9d mov rbp, r8 mov r14d, ecx mov r12, rdi call JS_ToStringCheckObject mov r15, rdx push 6 pop rdx cmp r15d, 6 jnz short loc_68AD2 xor ebx, ebx jmp short loc_68B06 loc_68AD2: mov rbx, rax mov [rsp+78h+var_68], r13d mov rdx, [rbp+0] mov rcx, [rbp+8] lea rsi, [rsp+78h+var_64] mov rdi, r12 call JS_ToInt32Sat test eax, eax jz short loc_68B18 loc_68AF3: mov rdi, r12 mov rsi, rbx mov rdx, r15 call JS_FreeValue xor ebx, ebx push 6 pop rdx loc_68B06: mov rax, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_68B18: mov eax, 7FFFFFFFh and eax, [rbx+4] mov r9d, [rsp+78h+var_64] mov r13d, r9d sub r13d, eax jle loc_68C3C push 3 pop r8 push 20h ; ' ' pop rcx xor esi, esi cmp r14d, 2 jl short loc_68B4F mov rdx, [rbp+18h] xor esi, esi cmp edx, 3 jnz loc_68BF9 loc_68B4F: xor r14d, r14d loc_68B52: cmp r9d, 40000000h jb short loc_68B6E lea rsi, aInvalidStringL; "invalid string length" mov rdi, r12 xor eax, eax call JS_ThrowRangeError jmp short loc_68AF3 loc_68B6E: mov ebp, ecx mov [rsp+78h+var_6C], eax mov [rsp+78h+var_60], rsi mov [rsp+78h+var_58], r8 lea rsi, [rsp+78h+var_50] mov rdi, r12 mov edx, r9d call string_buffer_init test eax, eax jnz loc_68CE0 cmp [rsp+78h+var_68], 0 jz short loc_68BB8 lea rdi, [rsp+78h+var_50] mov rsi, rbx xor edx, edx mov ecx, [rsp+78h+var_6C] call string_buffer_concat test eax, eax jnz loc_68CD6 loc_68BB8: test r14, r14 jz loc_68C6A loc_68BC1: test r13d, r13d jle loc_68C7D mov rsi, r14 mov ebp, [r14+4] mov eax, 7FFFFFFFh and ebp, eax cmp r13d, ebp cmovb ebp, r13d lea rdi, [rsp+78h+var_50] xor edx, edx mov ecx, ebp call string_buffer_concat sub r13d, ebp test eax, eax jz short loc_68BC1 jmp loc_68CD6 loc_68BF9: mov r14d, r9d mov [rsp+78h+var_6C], eax mov rsi, [rbp+10h] mov rdi, r12 call JS_ToString mov r8, rdx cmp r8d, 6 jz loc_68AF3 mov rsi, rax mov rax, [rax+4] mov ecx, eax and ecx, 7FFFFFFFh cmp ecx, 1 jz short loc_68C44 test ecx, ecx jnz short loc_68C58 mov rdi, r12 mov rdx, r8 call JS_FreeValue loc_68C3C: mov rdx, r15 jmp loc_68B06 loc_68C44: test eax, eax mov eax, [rsp+78h+var_6C] mov r9d, r14d js short loc_68CB6 movzx ecx, byte ptr [rsi+18h] jmp loc_68B4F loc_68C58: mov r9d, r14d mov r14, rsi mov eax, [rsp+78h+var_6C] push 20h ; ' ' pop rcx jmp loc_68B52 loc_68C6A: lea rdi, [rsp+78h+var_50] mov esi, ebp mov edx, r13d call string_buffer_fill test eax, eax jnz short loc_68CD6 loc_68C7D: cmp [rsp+78h+var_68], 0 jz short loc_68CBF loc_68C84: mov rdi, r12 mov rsi, [rsp+78h+var_60] mov rdx, [rsp+78h+var_58] call JS_FreeValue mov rdi, r12 mov rsi, rbx mov rdx, r15 call JS_FreeValue lea rdi, [rsp+78h+var_50] call string_buffer_end mov rbx, rax jmp loc_68B06 loc_68CB6: movzx ecx, word ptr [rsi+18h] jmp loc_68B4F loc_68CBF: lea rdi, [rsp+78h+var_50] mov rsi, rbx xor edx, edx mov ecx, [rsp+78h+var_6C] call string_buffer_concat test eax, eax jz short loc_68C84 loc_68CD6: lea rdi, [rsp+78h+var_50] call string_buffer_free loc_68CE0: mov rdi, r12 mov rsi, [rsp+78h+var_60] mov rdx, [rsp+78h+var_58] call JS_FreeValue jmp loc_68AF3
long long js_string_pad( 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) { int v14; // r13d int v16; // r14d long long v17; // rax long long v18; // rdx long long v19; // r15 long long v20; // rbx long long v21; // rdx __m128 v22; // xmm4 __m128 v23; // xmm5 int v25; // eax long long v26; // r9 int v27; // r13d long long v28; // r8 long long v29; // rcx long long v30; // rsi long long v31; // r14 unsigned int v32; // ebp unsigned int v33; // ebp unsigned int v34; // r14d long long v35; // rax long long v36; // rax bool v37; // sf char v38; // [rsp+0h] [rbp-78h] unsigned int v39; // [rsp+Ch] [rbp-6Ch] int v40; // [rsp+Ch] [rbp-6Ch] int v41; // [rsp+10h] [rbp-68h] unsigned int v42; // [rsp+14h] [rbp-64h] BYREF long long v43; // [rsp+18h] [rbp-60h] long long v44; // [rsp+20h] [rbp-58h] long long v45[10]; // [rsp+28h] [rbp-50h] BYREF v14 = a6; v16 = a4; v17 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v19 = v18; if ( (_DWORD)v18 != 6 ) { v20 = v17; v41 = v14; if ( (unsigned int)JS_ToInt32Sat(a1, (long long)&v42, *(_DWORD **)a5, *(_QWORD *)(a5 + 8)) ) { LABEL_4: JS_FreeValue(a1, v20, v19); return 0LL; } v25 = *(_DWORD *)(v20 + 4) & 0x7FFFFFFF; v26 = v42; v27 = v42 - v25; if ( (int)v42 <= v25 ) return v20; v28 = 3LL; v29 = 32LL; v30 = 0LL; if ( v16 >= 2 ) { v21 = *(_QWORD *)(a5 + 24); v30 = 0LL; if ( (_DWORD)v21 != 3 ) { v34 = v42; v40 = *(_DWORD *)(v20 + 4) & 0x7FFFFFFF; v35 = JS_ToString(a1, *(_QWORD *)(a5 + 16), v21); v28 = v21; if ( (_DWORD)v21 == 6 ) goto LABEL_4; v30 = v35; v36 = *(_QWORD *)(v35 + 4); if ( (v36 & 0x7FFFFFFF) != 1 ) { if ( (v36 & 0x7FFFFFFF) == 0 ) { JS_FreeValue(a1, v30, v21); return v20; } v26 = v34; v31 = v30; v25 = v40; v29 = 32LL; LABEL_10: if ( (unsigned int)v26 >= 0x40000000 ) { JS_ThrowRangeError( a1, (long long)"invalid string length", v21, v29, v28, v26, a7, a8, a9, a10, v22, v23, a13, a14, v38); goto LABEL_4; } v32 = v29; v39 = v25; v43 = v30; v44 = v28; if ( (unsigned int)string_buffer_init(a1, (long long)v45, v26) ) { LABEL_35: JS_FreeValue(a1, v43, v44); goto LABEL_4; } if ( !v41 || !(unsigned int)string_buffer_concat((long long)v45, v20, 0, v39) ) { if ( v31 ) { while ( v27 > 0 ) { v33 = *(_DWORD *)(v31 + 4) & 0x7FFFFFFF; if ( v27 < v33 ) v33 = v27; v27 -= v33; if ( (unsigned int)string_buffer_concat((long long)v45, v31, 0, v33) ) goto LABEL_34; } LABEL_30: if ( v41 || !(unsigned int)string_buffer_concat((long long)v45, v20, 0, v39) ) { JS_FreeValue(a1, v43, v44); JS_FreeValue(a1, v20, v19); return string_buffer_end(v45); } goto LABEL_34; } if ( !(unsigned int)string_buffer_fill(v45, v32, (unsigned int)v27) ) goto LABEL_30; } LABEL_34: string_buffer_free(v45); goto LABEL_35; } v37 = (int)v36 < 0; v25 = v40; v26 = v34; if ( v37 ) v29 = *(unsigned __int16 *)(v30 + 24); else v29 = *(unsigned __int8 *)(v30 + 24); } } v31 = 0LL; goto LABEL_10; } return 0LL; }
js_string_pad: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R13D,R9D MOV RBP,R8 MOV R14D,ECX MOV R12,RDI CALL 0x0013a290 MOV R15,RDX PUSH 0x6 POP RDX CMP R15D,0x6 JNZ 0x00168ad2 XOR EBX,EBX JMP 0x00168b06 LAB_00168ad2: MOV RBX,RAX MOV dword ptr [RSP + 0x10],R13D MOV RDX,qword ptr [RBP] MOV RCX,qword ptr [RBP + 0x8] LEA RSI,[RSP + 0x14] MOV RDI,R12 CALL 0x0012133d TEST EAX,EAX JZ 0x00168b18 LAB_00168af3: MOV RDI,R12 MOV RSI,RBX MOV RDX,R15 CALL 0x0011801e XOR EBX,EBX PUSH 0x6 POP RDX LAB_00168b06: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00168b18: MOV EAX,0x7fffffff AND EAX,dword ptr [RBX + 0x4] MOV R9D,dword ptr [RSP + 0x14] MOV R13D,R9D SUB R13D,EAX JLE 0x00168c3c PUSH 0x3 POP R8 PUSH 0x20 POP RCX XOR ESI,ESI CMP R14D,0x2 JL 0x00168b4f MOV RDX,qword ptr [RBP + 0x18] XOR ESI,ESI CMP EDX,0x3 JNZ 0x00168bf9 LAB_00168b4f: XOR R14D,R14D LAB_00168b52: CMP R9D,0x40000000 JC 0x00168b6e LEA RSI,[0x1858be] MOV RDI,R12 XOR EAX,EAX CALL 0x0011acb3 JMP 0x00168af3 LAB_00168b6e: MOV EBP,ECX MOV dword ptr [RSP + 0xc],EAX MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x20],R8 LEA RSI,[RSP + 0x28] MOV RDI,R12 MOV EDX,R9D CALL 0x0012e042 TEST EAX,EAX JNZ 0x00168ce0 CMP dword ptr [RSP + 0x10],0x0 JZ 0x00168bb8 LEA RDI,[RSP + 0x28] MOV RSI,RBX XOR EDX,EDX MOV ECX,dword ptr [RSP + 0xc] CALL 0x00139dad TEST EAX,EAX JNZ 0x00168cd6 LAB_00168bb8: TEST R14,R14 JZ 0x00168c6a LAB_00168bc1: TEST R13D,R13D JLE 0x00168c7d MOV RSI,R14 MOV EBP,dword ptr [R14 + 0x4] MOV EAX,0x7fffffff AND EBP,EAX CMP R13D,EBP CMOVC EBP,R13D LEA RDI,[RSP + 0x28] XOR EDX,EDX MOV ECX,EBP CALL 0x00139dad SUB R13D,EBP TEST EAX,EAX JZ 0x00168bc1 JMP 0x00168cd6 LAB_00168bf9: MOV R14D,R9D MOV dword ptr [RSP + 0xc],EAX MOV RSI,qword ptr [RBP + 0x10] MOV RDI,R12 CALL 0x0011b03c MOV R8,RDX CMP R8D,0x6 JZ 0x00168af3 MOV RSI,RAX MOV RAX,qword ptr [RAX + 0x4] MOV ECX,EAX AND ECX,0x7fffffff CMP ECX,0x1 JZ 0x00168c44 TEST ECX,ECX JNZ 0x00168c58 MOV RDI,R12 MOV RDX,R8 CALL 0x0011801e LAB_00168c3c: MOV RDX,R15 JMP 0x00168b06 LAB_00168c44: TEST EAX,EAX MOV EAX,dword ptr [RSP + 0xc] MOV R9D,R14D JS 0x00168cb6 MOVZX ECX,byte ptr [RSI + 0x18] JMP 0x00168b4f LAB_00168c58: MOV R9D,R14D MOV R14,RSI MOV EAX,dword ptr [RSP + 0xc] PUSH 0x20 POP RCX JMP 0x00168b52 LAB_00168c6a: LEA RDI,[RSP + 0x28] MOV ESI,EBP MOV EDX,R13D CALL 0x001697c3 TEST EAX,EAX JNZ 0x00168cd6 LAB_00168c7d: CMP dword ptr [RSP + 0x10],0x0 JZ 0x00168cbf LAB_00168c84: MOV RDI,R12 MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] CALL 0x0011801e MOV RDI,R12 MOV RSI,RBX MOV RDX,R15 CALL 0x0011801e LEA RDI,[RSP + 0x28] CALL 0x0012cad4 MOV RBX,RAX JMP 0x00168b06 LAB_00168cb6: MOVZX ECX,word ptr [RSI + 0x18] JMP 0x00168b4f LAB_00168cbf: LEA RDI,[RSP + 0x28] MOV RSI,RBX XOR EDX,EDX MOV ECX,dword ptr [RSP + 0xc] CALL 0x00139dad TEST EAX,EAX JZ 0x00168c84 LAB_00168cd6: LEA RDI,[RSP + 0x28] CALL 0x0012ef01 LAB_00168ce0: MOV RDI,R12 MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] CALL 0x0011801e JMP 0x00168af3
long js_string_pad(int8 param_1,int8 param_2,int8 param_3,int param_4, int8 *param_5,int param_6) { int iVar1; uint uVar2; long lVar3; ushort uVar4; uint uVar5; uint uVar6; long lVar7; int1 auVar8 [16]; int1 auVar9 [16]; uint local_64; int1 local_60 [16]; int1 local_50 [32]; auVar8 = JS_ToStringCheckObject(); lVar3 = auVar8._0_8_; if (auVar8._8_4_ == 6) { return 0; } iVar1 = JS_ToInt32Sat(param_1,&local_64,*param_5,param_5[1]); if (iVar1 != 0) goto LAB_00168af3; uVar2 = *(uint *)(lVar3 + 4) & 0x7fffffff; uVar6 = local_64 - uVar2; if (uVar6 == 0 || (int)local_64 < (int)uVar2) { return lVar3; } uVar4 = 0x20; auVar9 = ZEXT816(3) << 0x40; if ((param_4 < 2) || (auVar9 = ZEXT816(3) << 0x40, (int)param_5[3] == 3)) { LAB_00168b4f: lVar7 = 0; } else { auVar9 = JS_ToString(param_1,param_5[2]); lVar7 = auVar9._0_8_; if (auVar9._8_4_ == 6) goto LAB_00168af3; uVar5 = (uint)*(ulong *)(lVar7 + 4); if ((uVar5 & 0x7fffffff) == 1) { if ((int)uVar5 < 0) { uVar4 = *(ushort *)(lVar7 + 0x18); } else { uVar4 = (ushort)*(byte *)(lVar7 + 0x18); } goto LAB_00168b4f; } if ((*(ulong *)(lVar7 + 4) & 0x7fffffff) == 0) { JS_FreeValue(param_1,lVar7,auVar9._8_8_); return lVar3; } uVar4 = 0x20; } if (0x3fffffff < local_64) { JS_ThrowRangeError(param_1,"invalid string length"); goto LAB_00168af3; } local_60 = auVar9; iVar1 = string_buffer_init(param_1,local_50,local_64); if (iVar1 == 0) { if (param_6 == 0) { LAB_00168bb8: if (lVar7 == 0) { iVar1 = string_buffer_fill(local_50,uVar4,uVar6); if (iVar1 == 0) { LAB_00168c7d: if (param_6 != 0) { LAB_00168c84: JS_FreeValue(param_1,local_60._0_8_,local_60._8_8_); JS_FreeValue(param_1,lVar3,auVar8._8_8_); lVar3 = string_buffer_end(local_50); return lVar3; } iVar1 = string_buffer_concat(local_50,lVar3,0,uVar2); if (iVar1 == 0) goto LAB_00168c84; } } else { do { if ((int)uVar6 < 1) goto LAB_00168c7d; uVar5 = *(uint *)(lVar7 + 4) & 0x7fffffff; if (uVar6 < uVar5) { uVar5 = uVar6; } iVar1 = string_buffer_concat(local_50,lVar7,0,uVar5); uVar6 = uVar6 - uVar5; } while (iVar1 == 0); } } else { iVar1 = string_buffer_concat(local_50,lVar3,0,uVar2); if (iVar1 == 0) goto LAB_00168bb8; } string_buffer_free(local_50); } JS_FreeValue(param_1,local_60._0_8_,local_60._8_8_); LAB_00168af3: JS_FreeValue(param_1,lVar3,auVar8._8_8_); return 0; }
4,605
my_uni_utf16
eloqsql/strings/ctype-ucs2.c
int my_uni_utf16(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { if (wc <= 0xFFFF) { if (s + 2 > e) return MY_CS_TOOSMALL2; if (MY_UTF16_SURROGATE(wc)) return MY_CS_ILUNI; *s++= (uchar) (wc >> 8); *s= (uchar) (wc & 0xFF); return 2; } if (wc <= 0x10FFFF) { if (s + 4 > e) return MY_CS_TOOSMALL4; *s++= (uchar) ((wc-= 0x10000) >> 18) | 0xD8; *s++= (uchar) (wc >> 10) & 0xFF; *s++= (uchar) ((wc >> 8) & 3) | 0xDC; *s= (uchar) wc & 0xFF; return 4; } return MY_CS_ILUNI; }
O0
c
my_uni_utf16: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF ja 0x65aef movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x65a98 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x65bb2 movq -0x18(%rbp), %rax andq $0xf800, %rax # imm = 0xF800 cmpq $0xd800, %rax # imm = 0xD800 jne 0x65ab6 movl $0x0, -0x4(%rbp) jmp 0x65bb2 movq -0x18(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax andq $0xff, %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x2, -0x4(%rbp) jmp 0x65bb2 cmpq $0x10ffff, -0x18(%rbp) # imm = 0x10FFFF ja 0x65bab movq -0x20(%rbp), %rax addq $0x4, %rax cmpq -0x28(%rbp), %rax jbe 0x65b17 movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98 jmp 0x65bb2 movq -0x18(%rbp), %rax subq $0x10000, %rax # imm = 0x10000 movq %rax, -0x18(%rbp) shrq $0x12, %rax movzbl %al, %eax orl $0xd8, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax shrq $0xa, %rax movzbl %al, %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax shrq $0x8, %rax andq $0x3, %rax movzbl %al, %eax orl $0xdc, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax movzbl %al, %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x4, -0x4(%rbp) jmp 0x65bb2 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
my_uni_utf16: 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], 0FFFFh ja short loc_65AEF mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_65A98 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_65BB2 loc_65A98: mov rax, [rbp+var_18] and rax, 0F800h cmp rax, 0D800h jnz short loc_65AB6 mov [rbp+var_4], 0 jmp loc_65BB2 loc_65AB6: mov rax, [rbp+var_18] shr rax, 8 mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_18] and rax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 2 jmp loc_65BB2 loc_65AEF: cmp [rbp+var_18], offset unk_10FFFF ja loc_65BAB mov rax, [rbp+var_20] add rax, 4 cmp rax, [rbp+var_28] jbe short loc_65B17 mov [rbp+var_4], 0FFFFFF98h jmp loc_65BB2 loc_65B17: mov rax, [rbp+var_18] sub rax, offset stru_10000 mov [rbp+var_18], rax shr rax, 12h movzx eax, al or eax, 0D8h mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_18] shr rax, 0Ah movzx eax, al and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_18] shr rax, 8 and rax, 3 movzx eax, al or eax, 0DCh mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_18] movzx eax, al and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 4 jmp short loc_65BB2 loc_65BAB: mov [rbp+var_4], 0 loc_65BB2: mov eax, [rbp+var_4] pop rbp retn
long long my_uni_utf16(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { if ( a2 > 0xFFFF ) { if ( a2 > (unsigned long long)&unk_10FFFF ) { return 0; } else if ( (unsigned long long)(a3 + 4) <= a4 ) { *a3 = ((a2 - (unsigned long long)&stru_10000) >> 18) | 0xD8; a3[1] = (a2 - (unsigned long long)&stru_10000) >> 10; a3[2] = ((unsigned __int16)(a2 - (_QWORD)&stru_10000) >> 8) & 3 | 0xDC; a3[3] = a2 - (_QWORD)&stru_10000; return 4; } else { return (unsigned int)-104; } } else if ( (unsigned long long)(a3 + 2) <= a4 ) { if ( (a2 & 0xF800) == 0xD800 ) { return 0; } else { *a3 = BYTE1(a2); a3[1] = a2; return 2; } } else { return (unsigned int)-102; } }
my_uni_utf16: 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],0xffff JA 0x00165aef MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x00165a98 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00165bb2 LAB_00165a98: MOV RAX,qword ptr [RBP + -0x18] AND RAX,0xf800 CMP RAX,0xd800 JNZ 0x00165ab6 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00165bb2 LAB_00165ab6: MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] AND RAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x2 JMP 0x00165bb2 LAB_00165aef: CMP qword ptr [RBP + -0x18],0x10ffff JA 0x00165bab MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x4 CMP RAX,qword ptr [RBP + -0x28] JBE 0x00165b17 MOV dword ptr [RBP + -0x4],0xffffff98 JMP 0x00165bb2 LAB_00165b17: MOV RAX,qword ptr [RBP + -0x18] SUB RAX,0x10000 MOV qword ptr [RBP + -0x18],RAX SHR RAX,0x12 MOVZX EAX,AL OR EAX,0xd8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0xa MOVZX EAX,AL AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x8 AND RAX,0x3 MOVZX EAX,AL OR EAX,0xdc MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,AL AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x4 JMP 0x00165bb2 LAB_00165bab: MOV dword ptr [RBP + -0x4],0x0 LAB_00165bb2: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_uni_utf16(int8 param_1,ulong param_2,byte *param_3,byte *param_4) { int4 local_c; if (param_2 < 0x10000) { if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else if ((param_2 & 0xf800) == 0xd800) { local_c = 0; } else { *param_3 = (byte)(param_2 >> 8); param_3[1] = (byte)param_2; local_c = 2; } } else if (param_2 < 0x110000) { if (param_4 < param_3 + 4) { local_c = 0xffffff98; } else { param_2 = param_2 - 0x10000; *param_3 = (byte)(param_2 >> 0x12) | 0xd8; param_3[1] = (byte)(param_2 >> 10); param_3[2] = (byte)(param_2 >> 8) & 3 | 0xdc; param_3[3] = (byte)param_2; local_c = 4; } } else { local_c = 0; } return local_c; }
4,606
httplib::detail::gzip_compressor::gzip_compressor()
nickolajgrishuk[P]metricz-cpp/build_O2/_deps/httplib-src/httplib.h
inline gzip_compressor::gzip_compressor() { std::memset(&strm_, 0, sizeof(strm_)); strm_.zalloc = Z_NULL; strm_.zfree = Z_NULL; strm_.opaque = Z_NULL; is_valid_ = deflateInit2(&strm_, Z_DEFAULT_COMPRESSION, Z_DEFLATED, 31, 8, Z_DEFAULT_STRATEGY) == Z_OK; }
O2
c
httplib::detail::gzip_compressor::gzip_compressor(): pushq %rbx movq %rdi, %rbx leaq 0x24c65(%rip), %rax # 0x3f170 movq %rax, (%rdi) movb $0x0, 0x8(%rdi) addq $0x10, %rdi xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x30(%rbx) movups %xmm0, 0x40(%rbx) movups %xmm0, 0x50(%rbx) movups %xmm0, 0x60(%rbx) movups %xmm0, 0x70(%rbx) leaq 0xede1(%rip), %rax # 0x2931d pushq $-0x1 popq %rsi pushq $0x1f popq %rcx pushq $0x8 popq %rdx movl %edx, %r8d xorl %r9d, %r9d pushq $0x70 pushq %rax callq 0x8070 popq %rcx popq %rdx testl %eax, %eax sete 0x8(%rbx) popq %rbx retq nop
_ZN7httplib6detail15gzip_compressorC2Ev: push rbx mov rbx, rdi lea rax, off_3F170 mov [rdi], rax mov byte ptr [rdi+8], 0 add rdi, 10h xorps xmm0, xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+30h], xmm0 movups xmmword ptr [rbx+40h], xmm0 movups xmmword ptr [rbx+50h], xmm0 movups xmmword ptr [rbx+60h], xmm0 movups xmmword ptr [rbx+70h], xmm0 lea rax, a1211; "1.2.11" push 0FFFFFFFFFFFFFFFFh pop rsi push 1Fh pop rcx push 8 pop rdx mov r8d, edx xor r9d, r9d push 70h ; 'p' push rax call _deflateInit2_ pop rcx pop rdx test eax, eax setz byte ptr [rbx+8] pop rbx retn
long long httplib::detail::gzip_compressor::gzip_compressor(httplib::detail::gzip_compressor *this) { long long result; // rax *(_QWORD *)this = off_3F170; *((_BYTE *)this + 8) = 0; *((_OWORD *)this + 1) = 0LL; *((_OWORD *)this + 2) = 0LL; *((_OWORD *)this + 3) = 0LL; *((_OWORD *)this + 4) = 0LL; *((_OWORD *)this + 5) = 0LL; *((_OWORD *)this + 6) = 0LL; *((_OWORD *)this + 7) = 0LL; result = deflateInit2_((char *)this + 16, -1LL, 8LL, 31LL, 8LL, 0LL, "1.2.11"); *((_BYTE *)this + 8) = (_DWORD)result == 0; return result; }
gzip_compressor: PUSH RBX MOV RBX,RDI LEA RAX,[0x13f170] MOV qword ptr [RDI],RAX MOV byte ptr [RDI + 0x8],0x0 ADD RDI,0x10 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOVUPS xmmword ptr [RBX + 0x40],XMM0 MOVUPS xmmword ptr [RBX + 0x50],XMM0 MOVUPS xmmword ptr [RBX + 0x60],XMM0 MOVUPS xmmword ptr [RBX + 0x70],XMM0 LEA RAX,[0x12931d] PUSH -0x1 POP RSI PUSH 0x1f POP RCX PUSH 0x8 POP RDX MOV R8D,EDX XOR R9D,R9D PUSH 0x70 PUSH RAX CALL 0x00108070 POP RCX POP RDX TEST EAX,EAX SETZ byte ptr [RBX + 0x8] POP RBX RET
/* httplib::detail::gzip_compressor::gzip_compressor() */ void __thiscall httplib::detail::gzip_compressor::gzip_compressor(gzip_compressor *this) { int iVar1; *(int ***)this = &PTR__gzip_compressor_0013f170; this[8] = (gzip_compressor)0x0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x50) = 0; *(int8 *)(this + 0x58) = 0; *(int8 *)(this + 0x60) = 0; *(int8 *)(this + 0x68) = 0; *(int8 *)(this + 0x70) = 0; *(int8 *)(this + 0x78) = 0; iVar1 = deflateInit2_(this + 0x10,0xffffffffffffffff,8,0x1f,8,0,"1.2.11",0x70); this[8] = (gzip_compressor)(iVar1 == 0); return; }
4,607
mp_sub_mul1_dec
bluesky950520[P]quickjs/libbf.c
limb_t mp_sub_mul1_dec(limb_t *tabr, const limb_t *taba, mp_size_t n, limb_t b) { limb_t base = BF_DEC_BASE; mp_size_t i; limb_t l, t0, t1, r, a, v, c; /* XXX: optimize */ l = 0; for(i = 0; i < n; i++) { muldq(t1, t0, taba[i], b); adddq(t1, t0, 0, l); divdq_base(l, r, t1, t0); v = tabr[i]; a = v - r; c = a > v; if (c) a += base; /* never bigger than base because r = 0 when l = base - 1 */ l += c; tabr[i] = a; } return l; }
O1
c
mp_sub_mul1_dec: testq %rdx, %rdx jle 0x8db93 pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r8 movabsq $-0x7538dcfb76180000, %r14 # imm = 0x8AC7230489E80000 xorl %r15d, %r15d movabsq $-0x13e1b582496a9e5b, %r12 # imm = 0xEC1E4A7DB69561A5 movabsq $0x158e460913d00000, %r13 # imm = 0x158E460913D00000 xorl %r9d, %r9d movq %rcx, %rax mulq (%rsi,%r15,8) movq %rdx, %r10 movq %rax, %r11 addq %r9, %r11 adcq $0x0, %r10 movq %r10, %rax shldq $0x1, %r11, %rax mulq %r12 movq %rdx, %rbx movq %rdx, %rax mulq %r14 subq %rax, %r11 sbbq %rdx, %r10 subq %r13, %r11 movq $-0x1, %r9 sbbq $0x0, %r9 leaq (%r10,%r9), %rax sarq %rax leaq (%rbx,%rax), %rdx addq $0x2, %rdx andq %r14, %rax addq %r11, %rax adcq %r10, %r9 movq %r9, %r10 andq %r14, %r10 addq %r10, %rax movq (%rdi,%r15,8), %r10 subq %rax, %r10 leaq (%r10,%r14), %rax cmovaeq %r10, %rax adcq %rdx, %r9 movq %rax, (%rdi,%r15,8) incq %r15 cmpq %r15, %r8 jne 0x8db0d popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmp 0x8db96 xorl %r9d, %r9d movq %r9, %rax retq
mp_sub_mul1_dec: test rdx, rdx jle loc_8DB93 push r15 push r14 push r13 push r12 push rbx mov r8, rdx mov r14, 8AC7230489E80000h xor r15d, r15d mov r12, 0EC1E4A7DB69561A5h mov r13, 158E460913D00000h xor r9d, r9d loc_8DB0D: mov rax, rcx mul qword ptr [rsi+r15*8] mov r10, rdx mov r11, rax add r11, r9 adc r10, 0 mov rax, r10 shld rax, r11, 1 mul r12 mov rbx, rdx mov rax, rdx mul r14 sub r11, rax sbb r10, rdx sub r11, r13 mov r9, 0FFFFFFFFFFFFFFFFh sbb r9, 0 lea rax, [r10+r9] sar rax, 1 lea rdx, [rbx+rax] add rdx, 2 and rax, r14 add rax, r11 adc r9, r10 mov r10, r9 and r10, r14 add rax, r10 mov r10, [rdi+r15*8] sub r10, rax lea rax, [r10+r14] cmovnb rax, r10 adc r9, rdx mov [rdi+r15*8], rax inc r15 cmp r8, r15 jnz short loc_8DB0D pop rbx pop r12 pop r13 pop r14 pop r15 jmp short loc_8DB96 loc_8DB93: xor r9d, r9d loc_8DB96: mov rax, r9 retn
long long mp_sub_mul1_dec(long long a1, long long a2, long long a3, unsigned long long a4) { long long v5; // r15 long long v6; // r9 signed __int128 v7; // kr00_16 unsigned long long v8; // rbx unsigned long long v9; // r10 unsigned __int128 v10; // kr20_16 long long v11; // rax long long v12; // rdx long long v13; // r9 unsigned long long v14; // rax unsigned long long v15; // r10 bool v16; // cf unsigned long long v17; // r10 unsigned long long v18; // rax if ( a3 <= 0 ) return 0LL; v5 = 0LL; v6 = 0LL; do { v7 = (unsigned long long)v6 + *(unsigned long long *)(a2 + 8 * v5) * (unsigned __int128)a4; v8 = (0xEC1E4A7DB69561A5LL * (unsigned __int128)(unsigned long long)(v7 >> 63)) >> 64; v9 = (v7 - 0x8AC7230489E80000LL * (unsigned __int128)v8) >> 64; v10 = __PAIR128__(-1LL, (unsigned long long)v7 - 0x8AC7230489E80000LL * v8) - 0x158E460913D00000LL; v11 = (long long)(v9 + *((_QWORD *)&v10 + 1)) >> 1; v12 = v8 + v11 + 2; v13 = (v10 + __PAIR128__(v9, v11 & 0x8AC7230489E80000LL)) >> 64; v14 = (v13 & 0x8AC7230489E80000LL) + v10 + (v11 & 0x8AC7230489E80000LL); v15 = *(_QWORD *)(a1 + 8 * v5); v16 = v15 < v14; v17 = v15 - v14; v18 = v17 - 0x7538DCFB76180000LL; if ( !v16 ) v18 = v17; v6 = v12 + v16 + v13; *(_QWORD *)(a1 + 8 * v5++) = v18; } while ( a3 != v5 ); return v6; }
mp_sub_mul1_dec: TEST RDX,RDX JLE 0x0018db93 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R8,RDX MOV R14,-0x7538dcfb76180000 XOR R15D,R15D MOV R12,-0x13e1b582496a9e5b MOV R13,0x158e460913d00000 XOR R9D,R9D LAB_0018db0d: MOV RAX,RCX MUL qword ptr [RSI + R15*0x8] MOV R10,RDX MOV R11,RAX ADD R11,R9 ADC R10,0x0 MOV RAX,R10 SHLD RAX,R11,0x1 MUL R12 MOV RBX,RDX MOV RAX,RDX MUL R14 SUB R11,RAX SBB R10,RDX SUB R11,R13 MOV R9,-0x1 SBB R9,0x0 LEA RAX,[R10 + R9*0x1] SAR RAX,0x1 LEA RDX,[RBX + RAX*0x1] ADD RDX,0x2 AND RAX,R14 ADD RAX,R11 ADC R9,R10 MOV R10,R9 AND R10,R14 ADD RAX,R10 MOV R10,qword ptr [RDI + R15*0x8] SUB R10,RAX LEA RAX,[R10 + R14*0x1] CMOVNC RAX,R10 ADC R9,RDX MOV qword ptr [RDI + R15*0x8],RAX INC R15 CMP R8,R15 JNZ 0x0018db0d POP RBX POP R12 POP R13 POP R14 POP R15 JMP 0x0018db96 LAB_0018db93: XOR R9D,R9D LAB_0018db96: MOV RAX,R9 RET
ulong mp_sub_mul1_dec(long param_1,long param_2,long param_3,ulong param_4) { int1 auVar1 [16]; int1 auVar2 [16]; int1 auVar3 [16]; int1 auVar4 [16]; int1 auVar5 [16]; ulong uVar6; ulong uVar7; long lVar8; ulong uVar9; long lVar10; ulong uVar11; ulong uVar12; long lVar13; if (param_3 < 1) { uVar11 = 0; } else { lVar13 = 0; uVar11 = 0; do { auVar5._8_8_ = 0; auVar5._0_8_ = uVar11; auVar1._8_8_ = 0; auVar1._0_8_ = param_4; auVar4._8_8_ = 0; auVar4._0_8_ = *(ulong *)(param_2 + lVar13 * 8); auVar5 = auVar1 * auVar4 + auVar5; auVar2._8_8_ = 0; auVar2._0_8_ = auVar5._8_8_ << 1 | auVar5._0_8_ >> 0x3f; uVar7 = SUB168(auVar2 * ZEXT816(0xec1e4a7db69561a5),8); auVar3._8_8_ = 0; auVar3._0_8_ = uVar7; auVar5 = auVar5 - auVar3 * ZEXT816(10000000000000000000); uVar11 = auVar5._0_8_; lVar10 = auVar5._8_8_; uVar12 = uVar11 + 0xea71b9f6ec300000; lVar8 = -1 - (ulong)(uVar11 < 0x158e460913d00000); uVar6 = lVar10 + lVar8 >> 1; uVar11 = uVar6 & 10000000000000000000; uVar9 = lVar8 + lVar10 + (ulong)CARRY8(uVar11,uVar12); uVar12 = uVar11 + uVar12 + (uVar9 & 10000000000000000000); uVar11 = *(ulong *)(param_1 + lVar13 * 8); lVar8 = (uVar11 - uVar12) + -0x7538dcfb76180000; if (uVar11 >= uVar12) { lVar8 = uVar11 - uVar12; } uVar11 = uVar9 + uVar7 + uVar6 + 2 + (ulong)(uVar11 < uVar12); *(long *)(param_1 + lVar13 * 8) = lVar8; lVar13 = lVar13 + 1; } while (param_3 != lVar13); } return uVar11; }
4,608
mp_sub_mul1_dec
bluesky950520[P]quickjs/libbf.c
limb_t mp_sub_mul1_dec(limb_t *tabr, const limb_t *taba, mp_size_t n, limb_t b) { limb_t base = BF_DEC_BASE; mp_size_t i; limb_t l, t0, t1, r, a, v, c; /* XXX: optimize */ l = 0; for(i = 0; i < n; i++) { muldq(t1, t0, taba[i], b); adddq(t1, t0, 0, l); divdq_base(l, r, t1, t0); v = tabr[i]; a = v - r; c = a > v; if (c) a += base; /* never bigger than base because r = 0 when l = base - 1 */ l += c; tabr[i] = a; } return l; }
O2
c
mp_sub_mul1_dec: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r8 movabsq $-0x7538dcfb76180000, %rbx # imm = 0x8AC7230489E80000 xorl %r9d, %r9d testq %rdx, %rdx cmovleq %r9, %r8 movabsq $-0x13e1b582496a9e5b, %r14 # imm = 0xEC1E4A7DB69561A5 movabsq $0x158e460913d00000, %r15 # imm = 0x158E460913D00000 movabsq $-0x1, %r12 xorl %r13d, %r13d cmpq %r13, %r8 je 0x76616 movq %rcx, %rax mulq (%rsi,%r13,8) movq %rdx, %r10 addq %rax, %r9 adcq $0x0, %r10 movq %r10, %rax shldq $0x1, %r9, %rax mulq %r14 movq %rdx, %r11 movq %rdx, %rax mulq %rbx subq %rax, %r9 sbbq %rdx, %r10 subq %r15, %r9 movq %r12, %rax sbbq $0x0, %rax leaq (%r10,%rax), %rdx sarq %rdx addq %rdx, %r11 addq $0x2, %r11 andq %rbx, %rdx addq %r9, %rdx adcq %r10, %rax movq %rax, %r9 andq %rbx, %r9 addq %r9, %rdx movq (%rdi,%r13,8), %r9 subq %rdx, %r9 leaq (%r9,%rbx), %rdx cmovaeq %r9, %rdx adcq %r11, %rax movq %rdx, (%rdi,%r13,8) incq %r13 movq %rax, %r9 jmp 0x7659e movq %r9, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
mp_sub_mul1_dec: push r15 push r14 push r13 push r12 push rbx mov r8, rdx mov rbx, 8AC7230489E80000h xor r9d, r9d test rdx, rdx cmovle r8, r9 mov r14, 0EC1E4A7DB69561A5h mov r15, 158E460913D00000h mov r12, 0FFFFFFFFFFFFFFFFh xor r13d, r13d loc_7659E: cmp r8, r13 jz short loc_76616 mov rax, rcx mul qword ptr [rsi+r13*8] mov r10, rdx add r9, rax adc r10, 0 mov rax, r10 shld rax, r9, 1 mul r14 mov r11, rdx mov rax, rdx mul rbx sub r9, rax sbb r10, rdx sub r9, r15 mov rax, r12 sbb rax, 0 lea rdx, [r10+rax] sar rdx, 1 add r11, rdx add r11, 2 and rdx, rbx add rdx, r9 adc rax, r10 mov r9, rax and r9, rbx add rdx, r9 mov r9, [rdi+r13*8] sub r9, rdx lea rdx, [r9+rbx] cmovnb rdx, r9 adc rax, r11 mov [rdi+r13*8], rdx inc r13 mov r9, rax jmp short loc_7659E loc_76616: mov rax, r9 pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long mp_sub_mul1_dec(long long a1, long long a2, long long a3, unsigned long long a4) { long long v4; // r8 long long v5; // r9 long long i; // r13 signed __int128 v7; // kr00_16 unsigned long long v8; // r11 unsigned long long v9; // r10 unsigned __int128 v10; // kr20_16 long long v11; // rdx long long v12; // r11 long long v13; // rax unsigned long long v14; // rdx unsigned long long v15; // r9 bool v16; // cf unsigned long long v17; // r9 unsigned long long v18; // rdx v4 = a3; v5 = 0LL; if ( a3 <= 0 ) v4 = 0LL; for ( i = 0LL; v4 != i; ++i ) { v7 = *(unsigned long long *)(a2 + 8 * i) * (unsigned __int128)a4 + (unsigned long long)v5; v8 = (0xEC1E4A7DB69561A5LL * (unsigned __int128)(unsigned long long)(v7 >> 63)) >> 64; v9 = (v7 - 0x8AC7230489E80000LL * (unsigned __int128)v8) >> 64; v10 = __PAIR128__(-1LL, (unsigned long long)v7 - 0x8AC7230489E80000LL * v8) - 0x158E460913D00000LL; v11 = (long long)(v9 + *((_QWORD *)&v10 + 1)) >> 1; v12 = v11 + v8 + 2; v13 = (v10 + __PAIR128__(v9, v11 & 0x8AC7230489E80000LL)) >> 64; v14 = (v13 & 0x8AC7230489E80000LL) + v10 + (v11 & 0x8AC7230489E80000LL); v15 = *(_QWORD *)(a1 + 8 * i); v16 = v15 < v14; v17 = v15 - v14; v18 = v17 - 0x7538DCFB76180000LL; if ( !v16 ) v18 = v17; *(_QWORD *)(a1 + 8 * i) = v18; v5 = v12 + v16 + v13; } return v5; }
mp_sub_mul1_dec: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R8,RDX MOV RBX,-0x7538dcfb76180000 XOR R9D,R9D TEST RDX,RDX CMOVLE R8,R9 MOV R14,-0x13e1b582496a9e5b MOV R15,0x158e460913d00000 MOV R12,-0x1 XOR R13D,R13D LAB_0017659e: CMP R8,R13 JZ 0x00176616 MOV RAX,RCX MUL qword ptr [RSI + R13*0x8] MOV R10,RDX ADD R9,RAX ADC R10,0x0 MOV RAX,R10 SHLD RAX,R9,0x1 MUL R14 MOV R11,RDX MOV RAX,RDX MUL RBX SUB R9,RAX SBB R10,RDX SUB R9,R15 MOV RAX,R12 SBB RAX,0x0 LEA RDX,[R10 + RAX*0x1] SAR RDX,0x1 ADD R11,RDX ADD R11,0x2 AND RDX,RBX ADD RDX,R9 ADC RAX,R10 MOV R9,RAX AND R9,RBX ADD RDX,R9 MOV R9,qword ptr [RDI + R13*0x8] SUB R9,RDX LEA RDX,[R9 + RBX*0x1] CMOVNC RDX,R9 ADC RAX,R11 MOV qword ptr [RDI + R13*0x8],RDX INC R13 MOV R9,RAX JMP 0x0017659e LAB_00176616: MOV RAX,R9 POP RBX POP R12 POP R13 POP R14 POP R15 RET
ulong mp_sub_mul1_dec(long param_1,long param_2,ulong param_3,ulong param_4) { int1 auVar1 [16]; int1 auVar2 [16]; int1 auVar3 [16]; int1 auVar4 [16]; int1 auVar5 [16]; long lVar6; ulong uVar7; ulong uVar8; ulong uVar9; ulong uVar10; ulong uVar11; long lVar12; ulong uVar13; uVar10 = 0; if ((long)param_3 < 1) { param_3 = uVar10; } for (uVar13 = 0; auVar5._8_8_ = 0, auVar5._0_8_ = uVar10, param_3 != uVar13; uVar13 = uVar13 + 1) { auVar1._8_8_ = 0; auVar1._0_8_ = param_4; auVar4._8_8_ = 0; auVar4._0_8_ = *(ulong *)(param_2 + uVar13 * 8); auVar5 = auVar1 * auVar4 + auVar5; auVar2._8_8_ = 0; auVar2._0_8_ = auVar5._8_8_ << 1 | auVar5._0_8_ >> 0x3f; uVar8 = SUB168(auVar2 * ZEXT816(0xec1e4a7db69561a5),8); auVar3._8_8_ = 0; auVar3._0_8_ = uVar8; auVar5 = auVar5 - auVar3 * ZEXT816(10000000000000000000); uVar10 = auVar5._0_8_; lVar12 = auVar5._8_8_; uVar11 = uVar10 + 0xea71b9f6ec300000; lVar6 = -1 - (ulong)(uVar10 < 0x158e460913d00000); uVar9 = lVar12 + lVar6 >> 1; uVar10 = uVar9 & 10000000000000000000; uVar7 = lVar6 + lVar12 + (ulong)CARRY8(uVar10,uVar11); uVar11 = uVar10 + uVar11 + (uVar7 & 10000000000000000000); uVar10 = *(ulong *)(param_1 + uVar13 * 8); lVar6 = (uVar10 - uVar11) + -0x7538dcfb76180000; if (uVar10 >= uVar11) { lVar6 = uVar10 - uVar11; } uVar10 = uVar7 + uVar8 + uVar9 + 2 + (ulong)(uVar10 < uVar11); *(long *)(param_1 + uVar13 * 8) = lVar6; } return uVar10; }
4,609
VSmileJoy::PopTx()
sp1187[P]veesem/src/core/vsmile/vsmile_joy.cc
uint8_t VSmileJoy::PopTx() { if (tx_buffer_write_ == tx_buffer_read_) die("joy: empty send buffer"); auto value = tx_buffer_[tx_buffer_read_]; tx_buffer_read_ = (tx_buffer_read_ + 1) % tx_buffer_.size(); if (tx_buffer_write_ == tx_buffer_read_) { joy_send_.SetRts(true); rts_ = true; } return value; }
O1
cpp
VSmileJoy::PopTx(): pushq %rbp pushq %rbx pushq %rax movl 0x3c(%rdi), %eax movslq 0x40(%rdi), %rcx cmpl %ecx, %eax je 0xa8fd movq %rdi, %rbx movb 0x2c(%rdi,%rcx), %bpl incl %ecx andl $0xf, %ecx movl %ecx, 0x40(%rdi) cmpl %ecx, %eax jne 0xa8f4 movq (%rbx), %rdi movq (%rdi), %rax movl $0x1, %esi callq *0x10(%rax) movb $0x1, 0x4d(%rbx) movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %rbp retq leaq 0x8b10e(%rip), %rdi # 0x95a12 leaq 0xc0c7d(%rip), %rsi # 0xcb588 callq 0xa439
_ZN9VSmileJoy5PopTxEv: push rbp push rbx push rax mov eax, [rdi+3Ch] movsxd rcx, dword ptr [rdi+40h] cmp eax, ecx jz short loc_A8FD mov rbx, rdi mov bpl, [rdi+rcx+2Ch] inc ecx and ecx, 0Fh mov [rdi+40h], ecx cmp eax, ecx jnz short loc_A8F4 mov rdi, [rbx] mov rax, [rdi] mov esi, 1 call qword ptr [rax+10h] mov byte ptr [rbx+4Dh], 1 loc_A8F4: mov eax, ebp add rsp, 8 pop rbx pop rbp retn loc_A8FD: lea rdi, aJoyEmptySendBu; "joy: empty send buffer" lea rsi, off_CB588; "src/core/vsmile/vsmile_joy.cc" call _Z3diePKcSt15source_location; die(char const*,std::source_location)
long long VSmileJoy::PopTx(VSmileJoy *this) { unsigned int v1; // ebp int v2; // eax long long v3; // rcx int v4; // ecx v2 = *((_DWORD *)this + 15); v3 = *((int *)this + 16); if ( v2 == (_DWORD)v3 ) die((long long)"joy: empty send buffer", (long long)off_CB588); LOBYTE(v1) = *((_BYTE *)this + v3 + 44); v4 = ((_BYTE)v3 + 1) & 0xF; *((_DWORD *)this + 16) = v4; if ( v2 == v4 ) { (*(void ( **)(_QWORD, long long))(**(_QWORD **)this + 16LL))(*(_QWORD *)this, 1LL); *((_BYTE *)this + 77) = 1; } return v1; }
PopTx: PUSH RBP PUSH RBX PUSH RAX MOV EAX,dword ptr [RDI + 0x3c] MOVSXD RCX,dword ptr [RDI + 0x40] CMP EAX,ECX JZ 0x0010a8fd MOV RBX,RDI MOV BPL,byte ptr [RDI + RCX*0x1 + 0x2c] INC ECX AND ECX,0xf MOV dword ptr [RDI + 0x40],ECX CMP EAX,ECX JNZ 0x0010a8f4 MOV RDI,qword ptr [RBX] MOV RAX,qword ptr [RDI] MOV ESI,0x1 CALL qword ptr [RAX + 0x10] MOV byte ptr [RBX + 0x4d],0x1 LAB_0010a8f4: MOV EAX,EBP ADD RSP,0x8 POP RBX POP RBP RET LAB_0010a8fd: LEA RDI,[0x195a12] LEA RSI,[0x1cb588] CALL 0x0010a439
/* VSmileJoy::PopTx() */ ulong __thiscall VSmileJoy::PopTx(VSmileJoy *this) { VSmileJoy VVar1; uint uVar2; int8 unaff_RBP; uVar2 = *(uint *)(this + 0x40); if (*(uint *)(this + 0x3c) != uVar2) { VVar1 = this[(long)(int)uVar2 + 0x2c]; uVar2 = uVar2 + 1 & 0xf; *(uint *)(this + 0x40) = uVar2; if (*(uint *)(this + 0x3c) == uVar2) { (**(code **)(**(long **)this + 0x10))(*(long **)this,1); this[0x4d] = (VSmileJoy)0x1; } return CONCAT71((int7)((ulong)unaff_RBP >> 8),VVar1) & 0xffffffff; } /* WARNING: Subroutine does not return */ die("joy: empty send buffer",&PTR_s_src_core_vsmile_vsmile_joy_cc_001cb588); }
4,610
VSmileJoy::PopTx()
sp1187[P]veesem/src/core/vsmile/vsmile_joy.cc
uint8_t VSmileJoy::PopTx() { if (tx_buffer_write_ == tx_buffer_read_) die("joy: empty send buffer"); auto value = tx_buffer_[tx_buffer_read_]; tx_buffer_read_ = (tx_buffer_read_ + 1) % tx_buffer_.size(); if (tx_buffer_write_ == tx_buffer_read_) { joy_send_.SetRts(true); rts_ = true; } return value; }
O3
cpp
VSmileJoy::PopTx(): pushq %rbp pushq %rbx pushq %rax movl 0x3c(%rdi), %eax movslq 0x40(%rdi), %rcx cmpl %ecx, %eax je 0xa92b movq %rdi, %rbx movb 0x2c(%rdi,%rcx), %bpl incl %ecx andl $0xf, %ecx movl %ecx, 0x40(%rdi) cmpl %ecx, %eax jne 0xa922 movq (%rbx), %rdi movq (%rdi), %rax movl $0x1, %esi callq *0x10(%rax) movb $0x1, 0x4d(%rbx) movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %rbp retq leaq 0x870e8(%rip), %rdi # 0x91a1a leaq 0xbdc4f(%rip), %rsi # 0xc8588 callq 0xa46f
_ZN9VSmileJoy5PopTxEv: push rbp push rbx push rax mov eax, [rdi+3Ch] movsxd rcx, dword ptr [rdi+40h] cmp eax, ecx jz short loc_A92B mov rbx, rdi mov bpl, [rdi+rcx+2Ch] inc ecx and ecx, 0Fh mov [rdi+40h], ecx cmp eax, ecx jnz short loc_A922 mov rdi, [rbx] mov rax, [rdi] mov esi, 1 call qword ptr [rax+10h] mov byte ptr [rbx+4Dh], 1 loc_A922: mov eax, ebp add rsp, 8 pop rbx pop rbp retn loc_A92B: lea rdi, aJoyEmptySendBu; "joy: empty send buffer" lea rsi, off_C8588; "src/core/vsmile/vsmile_joy.cc" call _Z3diePKcSt15source_location; die(char const*,std::source_location)
long long VSmileJoy::PopTx(VSmileJoy *this) { unsigned int v1; // ebp int v2; // eax long long v3; // rcx int v4; // ecx v2 = *((_DWORD *)this + 15); v3 = *((int *)this + 16); if ( v2 == (_DWORD)v3 ) die((long long)"joy: empty send buffer", (long long)off_C8588); LOBYTE(v1) = *((_BYTE *)this + v3 + 44); v4 = ((_BYTE)v3 + 1) & 0xF; *((_DWORD *)this + 16) = v4; if ( v2 == v4 ) { (*(void ( **)(_QWORD, long long))(**(_QWORD **)this + 16LL))(*(_QWORD *)this, 1LL); *((_BYTE *)this + 77) = 1; } return v1; }
PopTx: PUSH RBP PUSH RBX PUSH RAX MOV EAX,dword ptr [RDI + 0x3c] MOVSXD RCX,dword ptr [RDI + 0x40] CMP EAX,ECX JZ 0x0010a92b MOV RBX,RDI MOV BPL,byte ptr [RDI + RCX*0x1 + 0x2c] INC ECX AND ECX,0xf MOV dword ptr [RDI + 0x40],ECX CMP EAX,ECX JNZ 0x0010a922 MOV RDI,qword ptr [RBX] MOV RAX,qword ptr [RDI] MOV ESI,0x1 CALL qword ptr [RAX + 0x10] MOV byte ptr [RBX + 0x4d],0x1 LAB_0010a922: MOV EAX,EBP ADD RSP,0x8 POP RBX POP RBP RET LAB_0010a92b: LEA RDI,[0x191a1a] LEA RSI,[0x1c8588] CALL 0x0010a46f
/* VSmileJoy::PopTx() */ ulong __thiscall VSmileJoy::PopTx(VSmileJoy *this) { VSmileJoy VVar1; uint uVar2; int8 unaff_RBP; uVar2 = *(uint *)(this + 0x40); if (*(uint *)(this + 0x3c) != uVar2) { VVar1 = this[(long)(int)uVar2 + 0x2c]; uVar2 = uVar2 + 1 & 0xf; *(uint *)(this + 0x40) = uVar2; if (*(uint *)(this + 0x3c) == uVar2) { (**(code **)(**(long **)this + 0x10))(*(long **)this,1); this[0x4d] = (VSmileJoy)0x1; } return CONCAT71((int7)((ulong)unaff_RBP >> 8),VVar1) & 0xffffffff; } /* WARNING: Subroutine does not return */ die("joy: empty send buffer",&PTR_s_src_core_vsmile_vsmile_joy_cc_001c8588); }
4,611
google::protobuf::compiler::python::Generator::FixOptionsForService(google::protobuf::ServiceDescriptor const&) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/python/generator.cc
void Generator::FixOptionsForService( const ServiceDescriptor& service_descriptor) const { std::string descriptor_name = ModuleLevelServiceDescriptorName(service_descriptor); std::string service_options = OptionsValue(service_descriptor.options().SerializeAsString()); if (service_options != "None") { PrintDescriptorOptionsFixingCode(descriptor_name, service_options, printer_); } for (int i = 0; i < service_descriptor.method_count(); ++i) { const MethodDescriptor* method = service_descriptor.method(i); std::string method_options = OptionsValue(method->options().SerializeAsString()); if (method_options != "None") { std::string method_name = descriptor_name + ".methods_by_name['" + method->name() + "']"; PrintDescriptorOptionsFixingCode(method_name, method_options, printer_); } } }
O0
cpp
google::protobuf::compiler::python::Generator::FixOptionsForService(google::protobuf::ServiceDescriptor const&) const: subq $0x168, %rsp # imm = 0x168 movq %rdi, 0x160(%rsp) movq %rsi, 0x158(%rsp) movq 0x160(%rsp), %rsi movq %rsi, 0x30(%rsp) movq 0x158(%rsp), %rdx leaq 0x138(%rsp), %rdi callq 0xb8d50 movq 0x158(%rsp), %rdi callq 0xc0b20 movq %rax, 0x38(%rsp) jmp 0xbeabd movq 0x38(%rsp), %rsi leaq 0xf8(%rsp), %rdi callq 0x1f4920 jmp 0xbead1 movq 0x30(%rsp), %rsi leaq 0x118(%rsp), %rdi leaq 0xf8(%rsp), %rdx callq 0xb6930 jmp 0xbeaed leaq 0xf8(%rsp), %rdi callq 0x21cc8 leaq 0x2f371c(%rip), %rsi # 0x3b221d leaq 0x118(%rsp), %rdi callq 0x38b90 movb %al, 0x2f(%rsp) jmp 0xbeb14 movb 0x2f(%rsp), %al testb $0x1, %al jne 0xbeb1e jmp 0xbeb98 movq 0x30(%rsp), %rax movq 0x58(%rax), %rdx leaq 0x138(%rsp), %rdi leaq 0x118(%rsp), %rsi callq 0xbdfe0 jmp 0xbeb3e jmp 0xbeb98 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0xbee18 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) leaq 0xf8(%rsp), %rdi callq 0x21cc8 jmp 0xbee18 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0xbee0b movl $0x0, 0xe8(%rsp) movl 0xe8(%rsp), %eax movl %eax, 0x24(%rsp) movq 0x158(%rsp), %rdi callq 0x590e0 movl %eax, 0x28(%rsp) jmp 0xbebc1 movl 0x24(%rsp), %eax movl 0x28(%rsp), %ecx cmpl %ecx, %eax jge 0xbede9 movq 0x158(%rsp), %rdi movl 0xe8(%rsp), %esi callq 0x590f0 movq %rax, 0x18(%rsp) jmp 0xbebec movq 0x18(%rsp), %rax movq %rax, 0xe0(%rsp) movq 0xe0(%rsp), %rdi callq 0xc0b30 movq %rax, 0x10(%rsp) jmp 0xbec0d movq 0x10(%rsp), %rsi leaq 0xa0(%rsp), %rdi callq 0x1f4920 jmp 0xbec21 movq 0x30(%rsp), %rsi leaq 0xc0(%rsp), %rdi leaq 0xa0(%rsp), %rdx callq 0xb6930 jmp 0xbec3d leaq 0xa0(%rsp), %rdi callq 0x21cc8 leaq 0x2f35cc(%rip), %rsi # 0x3b221d leaq 0xc0(%rsp), %rdi callq 0x38b90 movb %al, 0xf(%rsp) jmp 0xbec64 movb 0xf(%rsp), %al testb $0x1, %al jne 0xbec71 jmp 0xbedb7 leaq 0x2f8040(%rip), %rdx # 0x3b6cb8 leaq 0x40(%rsp), %rdi leaq 0x138(%rsp), %rsi callq 0x28900 jmp 0xbec8c movq 0xe0(%rsp), %rdi callq 0x77d90 movq %rax, (%rsp) jmp 0xbec9f movq (%rsp), %rdx leaq 0x60(%rsp), %rdi leaq 0x40(%rsp), %rsi callq 0x288b0 jmp 0xbecb4 leaq 0x2f7e10(%rip), %rdx # 0x3b6acb leaq 0x80(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x38840 jmp 0xbeccf leaq 0x60(%rsp), %rdi callq 0x21cc8 leaq 0x40(%rsp), %rdi callq 0x21cc8 movq 0x30(%rsp), %rax movq 0x58(%rax), %rdx leaq 0x80(%rsp), %rdi leaq 0xc0(%rsp), %rsi callq 0xbdfe0 jmp 0xbed03 leaq 0x80(%rsp), %rdi callq 0x21cc8 jmp 0xbedb7 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) leaq 0xa0(%rsp), %rdi callq 0x21cc8 jmp 0xbee0b movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0xbedda movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0xbed88 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) leaq 0x60(%rsp), %rdi callq 0x21cc8 leaq 0x40(%rsp), %rdi callq 0x21cc8 jmp 0xbedda movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) leaq 0x80(%rsp), %rdi callq 0x21cc8 jmp 0xbedda leaq 0xc0(%rsp), %rdi callq 0x21cc8 movl 0xe8(%rsp), %eax addl $0x1, %eax movl %eax, 0xe8(%rsp) jmp 0xbeba3 leaq 0xc0(%rsp), %rdi callq 0x21cc8 jmp 0xbee0b leaq 0x118(%rsp), %rdi callq 0x21cc8 leaq 0x138(%rsp), %rdi callq 0x21cc8 addq $0x168, %rsp # imm = 0x168 retq leaq 0x118(%rsp), %rdi callq 0x21cc8 leaq 0x138(%rsp), %rdi callq 0x21cc8 movq 0xf0(%rsp), %rdi callq 0x21700 nopw %cs:(%rax,%rax)
_ZNK6google8protobuf8compiler6python9Generator20FixOptionsForServiceERKNS0_17ServiceDescriptorE: sub rsp, 168h mov qword ptr [rsp+168h+var_8], rdi mov [rsp+168h+var_10], rsi mov rsi, qword ptr [rsp+168h+var_8] mov qword ptr [rsp+168h+var_138], rsi; char mov rdx, [rsp+168h+var_10] lea rdi, [rsp+168h+var_30]; char call _ZNK6google8protobuf8compiler6python9Generator32ModuleLevelServiceDescriptorNameB5cxx11ERKNS0_17ServiceDescriptorE; google::protobuf::compiler::python::Generator::ModuleLevelServiceDescriptorName(google::protobuf::ServiceDescriptor const&) mov rdi, [rsp+168h+var_10]; this call _ZNK6google8protobuf17ServiceDescriptor7optionsEv; google::protobuf::ServiceDescriptor::options(void) mov qword ptr [rsp+168h+var_130], rax jmp short $+2 loc_BEABD: mov rsi, qword ptr [rsp+168h+var_130]; int lea rdi, [rsp+168h+var_70]; int call _ZNK6google8protobuf11MessageLite17SerializeAsStringB5cxx11Ev; google::protobuf::MessageLite::SerializeAsString(void) jmp short $+2 loc_BEAD1: mov rsi, qword ptr [rsp+168h+var_138] lea rdi, [rsp+168h+var_50] lea rdx, [rsp+168h+var_70] call _ZNK6google8protobuf8compiler6python9Generator12OptionsValueERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::compiler::python::Generator::OptionsValue(std::string const&) jmp short $+2 loc_BEAED: lea rdi, [rsp+168h+var_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rsi, aGpbdescriptori+20h; "None" lea rdi, [rsp+168h+var_50] call _ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator!=<char>(std::string const&,char const*) mov [rsp+168h+var_139], al jmp short $+2 loc_BEB14: mov al, [rsp+168h+var_139] test al, 1 jnz short loc_BEB1E jmp short loc_BEB98 loc_BEB1E: mov rax, qword ptr [rsp+168h+var_138] mov rdx, [rax+58h] lea rdi, [rsp+168h+var_30] lea rsi, [rsp+168h+var_50] call _ZN6google8protobuf8compiler6python12_GLOBAL__N_132PrintDescriptorOptionsFixingCodeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_PNS0_2io7PrinterE; google::protobuf::compiler::python::`anonymous namespace'::PrintDescriptorOptionsFixingCode(std::string const&,std::string const&,google::protobuf::io::Printer *) jmp short $+2 loc_BEB3E: jmp short loc_BEB98 mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax jmp loc_BEE18 mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax lea rdi, [rsp+arg_F0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_BEE18 mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax jmp loc_BEE0B loc_BEB98: mov [rsp+168h+var_80], 0 loc_BEBA3: mov eax, [rsp+168h+var_80] mov [rsp+168h+var_144], eax mov rdi, [rsp+168h+var_10]; this call _ZNK6google8protobuf17ServiceDescriptor12method_countEv; google::protobuf::ServiceDescriptor::method_count(void) mov [rsp+168h+var_140], eax jmp short $+2 loc_BEBC1: mov eax, [rsp+168h+var_144] mov ecx, [rsp+168h+var_140] cmp eax, ecx jge loc_BEDE9 mov rdi, [rsp+168h+var_10]; this mov esi, [rsp+168h+var_80]; int call _ZNK6google8protobuf17ServiceDescriptor6methodEi; google::protobuf::ServiceDescriptor::method(int) mov [rsp+168h+var_150], rax; __int64 jmp short $+2 loc_BEBEC: mov rax, [rsp+168h+var_150] mov [rsp+168h+var_88], rax mov rdi, [rsp+168h+var_88]; this call _ZNK6google8protobuf16MethodDescriptor7optionsEv; google::protobuf::MethodDescriptor::options(void) mov [rsp+168h+var_158], rax; int jmp short $+2 loc_BEC0D: mov rsi, [rsp+168h+var_158]; int lea rdi, [rsp+168h+var_C8]; int call _ZNK6google8protobuf11MessageLite17SerializeAsStringB5cxx11Ev; google::protobuf::MessageLite::SerializeAsString(void) jmp short $+2 loc_BEC21: mov rsi, qword ptr [rsp+168h+var_138] lea rdi, [rsp+168h+var_A8] lea rdx, [rsp+168h+var_C8] call _ZNK6google8protobuf8compiler6python9Generator12OptionsValueERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::compiler::python::Generator::OptionsValue(std::string const&) jmp short $+2 loc_BEC3D: lea rdi, [rsp+168h+var_C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rsi, aGpbdescriptori+20h; "None" lea rdi, [rsp+168h+var_A8] call _ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator!=<char>(std::string const&,char const*) mov [rsp+168h+var_159], al jmp short $+2 loc_BEC64: mov al, [rsp+168h+var_159] test al, 1 jnz short loc_BEC71 jmp loc_BEDB7 loc_BEC71: lea rdx, aMethodsByName; ".methods_by_name['" lea rdi, [rsp+168h+var_128]; int lea rsi, [rsp+168h+var_30]; int call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) jmp short $+2 loc_BEC8C: mov rdi, [rsp+168h+var_88] call _ZNK6google8protobuf16MethodDescriptor4nameB5cxx11Ev; google::protobuf::MethodDescriptor::name(void) mov [rsp+168h+var_168], rax jmp short $+2 loc_BEC9F: mov rdx, [rsp+168h+var_168] lea rdi, [rsp+168h+var_108] lea rsi, [rsp+168h+var_128] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&) jmp short $+2 loc_BECB4: lea rdx, a012+9; "']" lea rdi, [rsp+168h+var_E8] lea rsi, [rsp+168h+var_108] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_BECCF: lea rdi, [rsp+168h+var_108]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+168h+var_128]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, qword ptr [rsp+168h+var_138] mov rdx, [rax+58h] lea rdi, [rsp+168h+var_E8] lea rsi, [rsp+168h+var_A8] call _ZN6google8protobuf8compiler6python12_GLOBAL__N_132PrintDescriptorOptionsFixingCodeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_PNS0_2io7PrinterE; google::protobuf::compiler::python::`anonymous namespace'::PrintDescriptorOptionsFixingCode(std::string const&,std::string const&,google::protobuf::io::Printer *) jmp short $+2 loc_BED03: lea rdi, [rsp+168h+var_E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_BEDB7 mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax lea rdi, [rsp+arg_98]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_BEE0B mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax jmp loc_BEDDA mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax jmp short loc_BED88 mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax lea rdi, [rsp+arg_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_BED88: lea rdi, [rsp+arg_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_BEDDA mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax lea rdi, [rsp+arg_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_BEDDA loc_BEDB7: lea rdi, [rsp+168h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov eax, [rsp+168h+var_80] add eax, 1 mov [rsp+168h+var_80], eax jmp loc_BEBA3 loc_BEDDA: lea rdi, [rsp+arg_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_BEE0B loc_BEDE9: lea rdi, [rsp+168h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+168h+var_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() add rsp, 168h retn loc_BEE0B: lea rdi, [rsp+arg_110]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_BEE18: lea rdi, [rsp+arg_130]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rsp+arg_E8] call __Unwind_Resume
void google::protobuf::compiler::python::Generator::FixOptionsForService( google::protobuf::compiler::python::Generator *this, const google::protobuf::ServiceDescriptor *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 int v10; // [rsp+0h] [rbp-168h] long long v11; // [rsp+0h] [rbp-168h] int v12; // [rsp+8h] [rbp-160h] int v13; // [rsp+8h] [rbp-160h] void *v14; // [rsp+10h] [rbp-158h] void *v15; // [rsp+10h] [rbp-158h] int v16; // [rsp+18h] [rbp-150h] google::protobuf::MethodDescriptor *v17; // [rsp+18h] [rbp-150h] long long v18; // [rsp+20h] [rbp-148h] long long v19; // [rsp+20h] [rbp-148h] int v20; // [rsp+38h] [rbp-130h] int v21[8]; // [rsp+40h] [rbp-128h] BYREF _BYTE v22[32]; // [rsp+60h] [rbp-108h] BYREF _BYTE v23[32]; // [rsp+80h] [rbp-E8h] BYREF int v24[8]; // [rsp+A0h] [rbp-C8h] BYREF _BYTE v25[32]; // [rsp+C0h] [rbp-A8h] BYREF google::protobuf::MethodDescriptor *v26; // [rsp+E0h] [rbp-88h] int i; // [rsp+E8h] [rbp-80h] int v28[8]; // [rsp+F8h] [rbp-70h] BYREF char v29[32]; // [rsp+118h] [rbp-50h] BYREF char v30[4]; // [rsp+138h] [rbp-30h] BYREF google::protobuf::ServiceDescriptor *v31; // [rsp+158h] [rbp-10h] char v32[8]; // [rsp+160h] [rbp-8h] *(_QWORD *)v32 = this; v31 = a2; google::protobuf::compiler::python::Generator::ModuleLevelServiceDescriptorName[abi:cxx11]( (long long)v30, (long long)this, a2); v20 = google::protobuf::ServiceDescriptor::options(v31); google::protobuf::MessageLite::SerializeAsString[abi:cxx11]((int)v28, v20, v2, v3, v4, v5, v10, v12, v14, v16, v18); google::protobuf::compiler::python::Generator::OptionsValue((long long)v29, this, (long long)v28); std::string::~string(v28); if ( std::operator!=<char>((long long)v29, (long long)"None") ) google::protobuf::compiler::python::`anonymous namespace'::PrintDescriptorOptionsFixingCode( v30, v29, *((_QWORD *)this + 11)); for ( i = 0; ; ++i ) { HIDWORD(v19) = i; if ( SHIDWORD(v19) >= (int)google::protobuf::ServiceDescriptor::method_count(v31) ) break; v17 = (google::protobuf::MethodDescriptor *)google::protobuf::ServiceDescriptor::method(v31, i); v26 = v17; v15 = (void *)google::protobuf::MethodDescriptor::options(v17); google::protobuf::MessageLite::SerializeAsString[abi:cxx11]( (int)v24, (int)v15, v6, v7, v8, v9, v11, v13, v15, (int)v17, v19); google::protobuf::compiler::python::Generator::OptionsValue((long long)v25, this, (long long)v24); std::string::~string(v24); if ( std::operator!=<char>((long long)v25, (long long)"None") ) { std::operator+<char>((long long)v21, (long long)v30, (long long)".methods_by_name['"); v11 = google::protobuf::MethodDescriptor::name[abi:cxx11]((long long)v26); std::operator+<char>((long long)v22, (long long)v21, v11); std::operator+<char>((long long)v23, (long long)v22, (long long)"']"); std::string::~string(v22); std::string::~string(v21); google::protobuf::compiler::python::`anonymous namespace'::PrintDescriptorOptionsFixingCode( v23, v25, *((_QWORD *)this + 11)); std::string::~string(v23); } std::string::~string(v25); } std::string::~string(v29); std::string::~string(v30); }
FixOptionsForService: SUB RSP,0x168 MOV qword ptr [RSP + 0x160],RDI MOV qword ptr [RSP + 0x158],RSI MOV RSI,qword ptr [RSP + 0x160] MOV qword ptr [RSP + 0x30],RSI MOV RDX,qword ptr [RSP + 0x158] LEA RDI,[RSP + 0x138] CALL 0x001b8d50 MOV RDI,qword ptr [RSP + 0x158] LAB_001beab1: CALL 0x001c0b20 MOV qword ptr [RSP + 0x38],RAX JMP 0x001beabd LAB_001beabd: MOV RSI,qword ptr [RSP + 0x38] LEA RDI,[RSP + 0xf8] CALL 0x002f4920 JMP 0x001bead1 LAB_001bead1: MOV RSI,qword ptr [RSP + 0x30] LEA RDI,[RSP + 0x118] LEA RDX,[RSP + 0xf8] CALL 0x001b6930 JMP 0x001beaed LAB_001beaed: LEA RDI,[RSP + 0xf8] CALL 0x00121cc8 LAB_001beafa: LEA RSI,[0x4b221d] LEA RDI,[RSP + 0x118] CALL 0x00138b90 MOV byte ptr [RSP + 0x2f],AL JMP 0x001beb14 LAB_001beb14: MOV AL,byte ptr [RSP + 0x2f] TEST AL,0x1 JNZ 0x001beb1e JMP 0x001beb98 LAB_001beb1e: MOV RAX,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RAX + 0x58] LEA RDI,[RSP + 0x138] LEA RSI,[RSP + 0x118] CALL 0x001bdfe0 JMP 0x001beb3e LAB_001beb3e: JMP 0x001beb98 LAB_001beb98: MOV dword ptr [RSP + 0xe8],0x0 LAB_001beba3: MOV EAX,dword ptr [RSP + 0xe8] MOV dword ptr [RSP + 0x24],EAX MOV RDI,qword ptr [RSP + 0x158] CALL 0x001590e0 MOV dword ptr [RSP + 0x28],EAX JMP 0x001bebc1 LAB_001bebc1: MOV EAX,dword ptr [RSP + 0x24] MOV ECX,dword ptr [RSP + 0x28] CMP EAX,ECX JGE 0x001bede9 MOV RDI,qword ptr [RSP + 0x158] MOV ESI,dword ptr [RSP + 0xe8] CALL 0x001590f0 MOV qword ptr [RSP + 0x18],RAX JMP 0x001bebec LAB_001bebec: MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0xe0],RAX MOV RDI,qword ptr [RSP + 0xe0] CALL 0x001c0b30 MOV qword ptr [RSP + 0x10],RAX JMP 0x001bec0d LAB_001bec0d: MOV RSI,qword ptr [RSP + 0x10] LEA RDI,[RSP + 0xa0] CALL 0x002f4920 JMP 0x001bec21 LAB_001bec21: MOV RSI,qword ptr [RSP + 0x30] LEA RDI,[RSP + 0xc0] LEA RDX,[RSP + 0xa0] CALL 0x001b6930 JMP 0x001bec3d LAB_001bec3d: LEA RDI,[RSP + 0xa0] CALL 0x00121cc8 LAB_001bec4a: LEA RSI,[0x4b221d] LEA RDI,[RSP + 0xc0] CALL 0x00138b90 MOV byte ptr [RSP + 0xf],AL JMP 0x001bec64 LAB_001bec64: MOV AL,byte ptr [RSP + 0xf] TEST AL,0x1 JNZ 0x001bec71 JMP 0x001bedb7 LAB_001bec71: LEA RDX,[0x4b6cb8] LEA RDI,[RSP + 0x40] LEA RSI,[RSP + 0x138] CALL 0x00128900 JMP 0x001bec8c LAB_001bec8c: MOV RDI,qword ptr [RSP + 0xe0] LAB_001bec94: CALL 0x00177d90 MOV qword ptr [RSP],RAX JMP 0x001bec9f LAB_001bec9f: MOV RDX,qword ptr [RSP] LEA RDI,[RSP + 0x60] LEA RSI,[RSP + 0x40] CALL 0x001288b0 JMP 0x001becb4 LAB_001becb4: LEA RDX,[0x4b6acb] LEA RDI,[RSP + 0x80] LEA RSI,[RSP + 0x60] CALL 0x00138840 JMP 0x001beccf LAB_001beccf: LEA RDI,[RSP + 0x60] CALL 0x00121cc8 LEA RDI,[RSP + 0x40] CALL 0x00121cc8 MOV RAX,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RAX + 0x58] LAB_001becec: LEA RDI,[RSP + 0x80] LEA RSI,[RSP + 0xc0] CALL 0x001bdfe0 LAB_001bed01: JMP 0x001bed03 LAB_001bed03: LEA RDI,[RSP + 0x80] CALL 0x00121cc8 JMP 0x001bedb7 LAB_001bedb7: LEA RDI,[RSP + 0xc0] CALL 0x00121cc8 MOV EAX,dword ptr [RSP + 0xe8] ADD EAX,0x1 MOV dword ptr [RSP + 0xe8],EAX JMP 0x001beba3 LAB_001bede9: LEA RDI,[RSP + 0x118] CALL 0x00121cc8 LEA RDI,[RSP + 0x138] CALL 0x00121cc8 ADD RSP,0x168 RET
/* google::protobuf::compiler::python::Generator::FixOptionsForService(google::protobuf::ServiceDescriptor const&) const */ void __thiscall google::protobuf::compiler::python::Generator::FixOptionsForService (Generator *this,ServiceDescriptor *param_1) { int iVar1; bool bVar2; int iVar3; string local_128 [32]; string local_108 [32]; string local_e8 [32]; string local_c8 [32]; string local_a8 [32]; MethodDescriptor *local_88; int local_80; string local_70 [32]; string local_50 [32]; ServiceDescriptor local_30 [32]; ServiceDescriptor *local_10; Generator *local_8; local_10 = param_1; local_8 = this; ModuleLevelServiceDescriptorName_abi_cxx11_(local_30); /* try { // try from 001beab1 to 001beace has its CatchHandler @ 001beb40 */ ServiceDescriptor::options(local_10); MessageLite::SerializeAsString_abi_cxx11_(); /* try { // try from 001bead1 to 001beaea has its CatchHandler @ 001beb59 */ OptionsValue(local_50); std::__cxx11::string::~string(local_70); /* try { // try from 001beafa to 001bec1e has its CatchHandler @ 001beb7f */ bVar2 = std::operator!=(local_50,"None"); if (bVar2) { (anonymous_namespace)::PrintDescriptorOptionsFixingCode ((string *)local_30,local_50,*(Printer **)(this + 0x58)); } for (local_80 = 0; iVar1 = local_80, iVar3 = ServiceDescriptor::method_count(local_10), iVar1 < iVar3; local_80 = local_80 + 1) { local_88 = (MethodDescriptor *)ServiceDescriptor::method(local_10,local_80); MethodDescriptor::options(local_88); MessageLite::SerializeAsString_abi_cxx11_(); /* try { // try from 001bec21 to 001bec3a has its CatchHandler @ 001bed15 */ OptionsValue(local_a8); std::__cxx11::string::~string(local_c8); /* try { // try from 001bec4a to 001bec89 has its CatchHandler @ 001bed3b */ bVar2 = std::operator!=(local_a8,"None"); if (bVar2) { std::operator+(local_128,(char *)local_30); /* try { // try from 001bec94 to 001becb1 has its CatchHandler @ 001bed54 */ MethodDescriptor::name_abi_cxx11_(local_88); std::operator+(local_108,local_128); /* try { // try from 001becb4 to 001beccc has its CatchHandler @ 001bed6a */ std::operator+(local_e8,(char *)local_108); std::__cxx11::string::~string(local_108); std::__cxx11::string::~string(local_128); /* try { // try from 001becec to 001bed00 has its CatchHandler @ 001bed94 */ (anonymous_namespace)::PrintDescriptorOptionsFixingCode (local_e8,local_a8,*(Printer **)(this + 0x58)); std::__cxx11::string::~string(local_e8); } std::__cxx11::string::~string(local_a8); } std::__cxx11::string::~string(local_50); std::__cxx11::string::~string((string *)local_30); return; }
4,612
minja::FilterNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override { if (!filter) throw std::runtime_error("FilterNode.filter is null"); if (!body) throw std::runtime_error("FilterNode.body is null"); auto filter_value = filter->evaluate(context); if (!filter_value.is_callable()) { throw std::runtime_error("Filter must be a callable: " + filter_value.dump()); } std::string rendered_body = body->render(context); ArgumentsValue filter_args = {{Value(rendered_body)}, {}}; auto result = filter_value.call(context, filter_args); out << result.to_str(); }
O3
cpp
minja::FilterNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x110, %rsp # imm = 0x110 movq %rsi, %rbx movq 0x20(%rdi), %rsi testq %rsi, %rsi je 0xa06dd movq %rdi, %r14 cmpq $0x0, 0x30(%rdi) je 0xa06fb movq %rdx, %r15 leaq 0xc0(%rsp), %r12 movq %r12, %rdi callq 0x85d64 cmpq $0x0, 0x30(%r12) je 0xa072d movq 0x30(%r14), %rsi leaq 0xa0(%rsp), %rdi movq %r15, %rdx callq 0x9eb6a leaq 0x50(%rsp), %rdi leaq 0xa0(%rsp), %rsi callq 0x8a0b4 movq %rsp, %rdi leaq 0x50(%rsp), %rsi leaq 0x30(%rsp), %rcx movl $0x1, %edx callq 0x9327c xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rsp) movq $0x0, 0x28(%rsp) leaq 0x90(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x586c0 movq %r14, %rdi callq 0x5dbae movq -0x8(%r14), %rdi testq %rdi, %rdi je 0xa04ee callq 0x6d59a movq 0x78(%rsp), %rdi testq %rdi, %rdi je 0xa04fd callq 0x6d59a movq 0x68(%rsp), %rdi testq %rdi, %rdi je 0xa050c callq 0x6d59a movq 0x58(%rsp), %rdi testq %rdi, %rdi je 0xa0542 movq 0x8ba6b(%rip), %rax # 0x12bf88 cmpb $0x0, (%rax) je 0xa052d movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0xa0537 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0xa0542 movq (%rdi), %rax callq *0x18(%rax) leaq 0x18(%rsp), %r14 leaq 0x50(%rsp), %rdi leaq 0xc0(%rsp), %rsi movq %rsp, %rcx movq %r15, %rdx callq 0x9365e leaq 0x30(%rsp), %rdi leaq 0x50(%rsp), %rsi callq 0x96956 movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx movq %rbx, %rdi callq 0x1aa00 leaq 0x40(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa059b movq 0x40(%rsp), %rsi incq %rsi callq 0x1a8d0 leaq 0x90(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x586c0 movq %rbx, %rdi callq 0x5dbae movq -0x8(%rbx), %rdi testq %rdi, %rdi je 0xa05c3 callq 0x6d59a movq 0x78(%rsp), %rdi testq %rdi, %rdi je 0xa05d2 callq 0x6d59a movq 0x68(%rsp), %rdi testq %rdi, %rdi je 0xa05e1 callq 0x6d59a movq 0x58(%rsp), %rdi testq %rdi, %rdi je 0xa0617 movq 0x8b996(%rip), %rax # 0x12bf88 cmpb $0x0, (%rax) je 0xa0602 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0xa060c movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0xa0617 movq (%rdi), %rax callq *0x18(%rax) movq %r14, %rdi callq 0x949a6 movq %rsp, %rdi callq 0x8d838 leaq 0xb0(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa0648 movq 0xb0(%rsp), %rsi incq %rsi callq 0x1a8d0 leaq 0x100(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x586c0 movq %rbx, %rdi callq 0x5dbae movq -0x8(%rbx), %rdi testq %rdi, %rdi je 0xa0670 callq 0x6d59a movq 0xe8(%rsp), %rdi testq %rdi, %rdi je 0xa0682 callq 0x6d59a movq 0xd8(%rsp), %rdi testq %rdi, %rdi je 0xa0694 callq 0x6d59a movq 0xc8(%rsp), %rdi testq %rdi, %rdi je 0xa06cd movq 0x8b8e0(%rip), %rax # 0x12bf88 cmpb $0x0, (%rax) je 0xa06b8 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0xa06c2 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0xa06cd movq (%rdi), %rax callq *0x18(%rax) addq $0x110, %rsp # imm = 0x110 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x1a450 movq %rax, %r14 leaq 0x506b7(%rip), %rsi # 0xf0da8 movq %rax, %rdi callq 0x1a330 jmp 0xa0717 movl $0x10, %edi callq 0x1a450 movq %rax, %r14 leaq 0x506b3(%rip), %rsi # 0xf0dc2 movq %rax, %rdi callq 0x1a330 movq 0x8b8d2(%rip), %rsi # 0x12bff0 movq 0x8b83b(%rip), %rdx # 0x12bf60 movq %r14, %rdi callq 0x1af40 movl $0x10, %edi callq 0x1a450 movq %rax, %r14 movq %rsp, %rdi leaq 0xc0(%rsp), %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x86378 leaq 0x50682(%rip), %rsi # 0xf0dda leaq 0x50(%rsp), %rdi movq %rsp, %rdx callq 0x78b0d movb $0x1, %bpl leaq 0x50(%rsp), %rsi movq %r14, %rdi callq 0x1ae50 xorl %ebp, %ebp movq 0x8b872(%rip), %rsi # 0x12bff0 movq 0x8b7db(%rip), %rdx # 0x12bf60 movq %r14, %rdi callq 0x1af40 movq %rax, %rbx leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa07ab movq 0x60(%rsp), %rsi incq %rsi callq 0x1a8d0 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa07c6 movq 0x10(%rsp), %rsi incq %rsi callq 0x1a8d0 testb %bpl, %bpl jne 0xa07f3 jmp 0xa088e movq %rax, %rbx leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa07f3 movq 0x10(%rsp), %rsi incq %rsi callq 0x1a8d0 jmp 0xa07f3 movq %rax, %rbx movq %r14, %rdi callq 0x1a680 jmp 0xa088e jmp 0xa0802 movq %rax, %rbx movq %r14, %rdi callq 0x1a680 jmp 0xa089b movq %rax, %rbx leaq 0x40(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa0835 movq 0x40(%rsp), %rsi incq %rsi callq 0x1a8d0 jmp 0xa0835 movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0x86056 jmp 0xa0844 movq %rax, %rbx movq %r14, %rdi callq 0x949a6 movq %rsp, %rdi callq 0x8d838 jmp 0xa0868 movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0x86056 jmp 0xa0868 movq %rax, %rbx leaq 0xb0(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa088e movq 0xb0(%rsp), %rsi incq %rsi callq 0x1a8d0 jmp 0xa088e movq %rax, %rbx leaq 0xc0(%rsp), %rdi callq 0x86056 movq %rbx, %rdi callq 0x1afc0 nop
_ZNK5minja10FilterNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r12 push rbx sub rsp, 110h mov rbx, rsi mov rsi, [rdi+20h] test rsi, rsi jz loc_A06DD mov r14, rdi cmp qword ptr [rdi+30h], 0 jz loc_A06FB mov r15, rdx lea r12, [rsp+138h+var_78] mov rdi, r12 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) cmp qword ptr [r12+30h], 0 jz loc_A072D mov rsi, [r14+30h] lea rdi, [rsp+138h+var_98] mov rdx, r15 call _ZNK5minja12TemplateNode6renderB5cxx11ERKSt10shared_ptrINS_7ContextEE; minja::TemplateNode::render(std::shared_ptr<minja::Context> const&) lea rdi, [rsp+138h+var_E8] lea rsi, [rsp+138h+var_98] call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, rsp lea rsi, [rsp+138h+var_E8] lea rcx, [rsp+138h+var_108] mov edx, 1 call _ZNSt6vectorIN5minja5ValueESaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<minja::Value>::vector(std::initializer_list<minja::Value>,std::allocator<minja::Value> const&) xorps xmm0, xmm0 movups [rsp+138h+var_120], xmm0 mov [rsp+138h+var_110], 0 lea r14, [rsp+138h+var_A8] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [r14-8] test rdi, rdi jz short loc_A04EE call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_A04EE: mov rdi, [rsp+138h+var_C0] test rdi, rdi jz short loc_A04FD call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_A04FD: mov rdi, [rsp+138h+var_D0] test rdi, rdi jz short loc_A050C call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_A050C: mov rdi, [rsp+138h+var_E0] test rdi, rdi jz short loc_A0542 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_A052D mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_A0537 loc_A052D: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_A0537: cmp eax, 1 jnz short loc_A0542 mov rax, [rdi] call qword ptr [rax+18h] loc_A0542: lea r14, [rsp+138h+var_120] lea rdi, [rsp+138h+var_E8] lea rsi, [rsp+138h+var_78] mov rcx, rsp mov rdx, r15 call _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE; minja::Value::call(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &) lea rdi, [rsp+138h+var_108] lea rsi, [rsp+138h+var_E8] call _ZNK5minja5Value6to_strB5cxx11Ev; minja::Value::to_str(void) mov rsi, [rsp+138h+var_108] mov rdx, [rsp+138h+var_100] mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rax, [rsp+138h+var_F8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A059B mov rsi, [rsp+138h+var_F8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A059B: lea rbx, [rsp+138h+var_A8] mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rbx-8] test rdi, rdi jz short loc_A05C3 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_A05C3: mov rdi, [rsp+138h+var_C0] test rdi, rdi jz short loc_A05D2 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_A05D2: mov rdi, [rsp+138h+var_D0] test rdi, rdi jz short loc_A05E1 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_A05E1: mov rdi, [rsp+138h+var_E0] test rdi, rdi jz short loc_A0617 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_A0602 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_A060C loc_A0602: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_A060C: cmp eax, 1 jnz short loc_A0617 mov rax, [rdi] call qword ptr [rax+18h] loc_A0617: mov rdi, r14 call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EED2Ev; std::vector<std::pair<std::string,minja::Value>>::~vector() mov rdi, rsp call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() lea rax, [rsp+138h+var_88] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A0648 mov rsi, [rsp+138h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A0648: lea rbx, [rsp+138h+var_38] mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rbx-8] test rdi, rdi jz short loc_A0670 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_A0670: mov rdi, [rsp+138h+var_50] test rdi, rdi jz short loc_A0682 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_A0682: mov rdi, [rsp+138h+var_60] test rdi, rdi jz short loc_A0694 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_A0694: mov rdi, [rsp+138h+var_70] test rdi, rdi jz short loc_A06CD mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_A06B8 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_A06C2 loc_A06B8: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_A06C2: cmp eax, 1 jnz short loc_A06CD mov rax, [rdi] call qword ptr [rax+18h] loc_A06CD: add rsp, 110h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_A06DD: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aFilternodeFilt; "FilterNode.filter is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_A0717 loc_A06FB: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aFilternodeBody; "FilterNode.body is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_A0717: mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_A072D: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax mov rdi, rsp lea rsi, [rsp+138h+var_78] mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aFilterMustBeAC; "Filter must be a callable: " lea rdi, [rsp+138h+var_E8] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+138h+var_E8] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax lea rax, [rsp+138h+var_D8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A07AB mov rsi, [rsp+138h+var_D8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A07AB: lea rax, [rsp+138h+var_128] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A07C6 mov rsi, [rsp+138h+var_128] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A07C6: test bpl, bpl jnz short loc_A07F3 jmp loc_A088E mov rbx, rax lea rax, [rsp+138h+var_128] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A07F3 mov rsi, [rsp+138h+var_128] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_A07F3 mov rbx, rax loc_A07F3: mov rdi, r14; void * call ___cxa_free_exception jmp loc_A088E jmp short $+2 loc_A0802: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp loc_A089B mov rbx, rax lea rax, [rsp+138h+var_F8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A0835 mov rsi, [rsp+138h+var_F8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_A0835 mov rbx, rax loc_A0835: lea rdi, [rsp+138h+var_E8]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_A0844 mov rbx, rax loc_A0844: mov rdi, r14 call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EED2Ev; std::vector<std::pair<std::string,minja::Value>>::~vector() mov rdi, rsp call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() jmp short loc_A0868 mov rbx, rax lea rdi, [rsp+138h+var_E8]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_A0868 mov rbx, rax loc_A0868: lea rax, [rsp+138h+var_88] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A088E mov rsi, [rsp+138h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_A088E mov rbx, rax loc_A088E: lea rdi, [rsp+138h+var_78]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_A089B: mov rdi, rbx call __Unwind_Resume
long long minja::FilterNode::do_render(long long a1, long long a2) { void (***v3)(void); // rsi long long v4; // rdi signed __int32 v5; // eax long long v6; // rdi signed __int32 v7; // eax long long result; // rax long long v9; // rdi std::runtime_error *exception; // r14 void *v11; // r14 _QWORD v12[2]; // [rsp+0h] [rbp-138h] BYREF __int128 v13; // [rsp+18h] [rbp-120h] BYREF long long v14; // [rsp+28h] [rbp-110h] void *v15[2]; // [rsp+30h] [rbp-108h] BYREF long long v16; // [rsp+40h] [rbp-F8h] BYREF _BYTE v17[8]; // [rsp+50h] [rbp-E8h] BYREF long long v18; // [rsp+58h] [rbp-E0h] volatile signed __int32 *v19; // [rsp+68h] [rbp-D0h] volatile signed __int32 *v20; // [rsp+78h] [rbp-C0h] volatile signed __int32 *v21; // [rsp+88h] [rbp-B0h] char v22[16]; // [rsp+90h] [rbp-A8h] BYREF void *v23[2]; // [rsp+A0h] [rbp-98h] BYREF long long v24; // [rsp+B0h] [rbp-88h] BYREF _BYTE v25[8]; // [rsp+C0h] [rbp-78h] BYREF long long v26; // [rsp+C8h] [rbp-70h] volatile signed __int32 *v27; // [rsp+D8h] [rbp-60h] volatile signed __int32 *v28; // [rsp+E8h] [rbp-50h] long long v29; // [rsp+F0h] [rbp-48h] volatile signed __int32 *v30; // [rsp+F8h] [rbp-40h] char v31[56]; // [rsp+100h] [rbp-38h] BYREF v3 = *(void (****)(void))(a1 + 32); if ( !v3 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "FilterNode.filter is null"); goto LABEL_47; } if ( !*(_QWORD *)(a1 + 48) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "FilterNode.body is null"); LABEL_47: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v25, v3); if ( !v29 ) { v11 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v12, (long long)v25, 0xFFFFFFFF, 0); std::operator+<char>((long long)v17, (long long)"Filter must be a callable: ", (long long)v12); std::runtime_error::runtime_error(v11, v17); __cxa_throw( v11, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::TemplateNode::render[abi:cxx11]((long long)v23, *(long long ( ****)(_QWORD))(a1 + 48)); minja::Value::Value((long long)v17, (long long)v23); std::vector<minja::Value>::vector((long long)v12, (long long)v17, 1LL); v13 = 0LL; v14 = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v22); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v22); if ( v21 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v21); if ( v20 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v20); if ( v19 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19); v4 = v18; if ( v18 ) { if ( _libc_single_threaded ) { v5 = *(_DWORD *)(v18 + 12); *(_DWORD *)(v18 + 12) = v5 - 1; } else { v5 = _InterlockedExchangeAdd((volatile signed __int32 *)(v18 + 12), 0xFFFFFFFF); } if ( v5 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v4 + 24LL))(v4, 0LL); } minja::Value::call((long long)v17, (long long)v25); minja::Value::to_str[abi:cxx11](v15, (long long)v17); std::__ostream_insert<char,std::char_traits<char>>(a2, v15[0], v15[1]); if ( v15[0] != &v16 ) operator delete(v15[0], v16 + 1); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v22); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v22); if ( v21 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v21); if ( v20 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v20); if ( v19 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19); v6 = v18; if ( v18 ) { if ( _libc_single_threaded ) { v7 = *(_DWORD *)(v18 + 12); *(_DWORD *)(v18 + 12) = v7 - 1; } else { v7 = _InterlockedExchangeAdd((volatile signed __int32 *)(v18 + 12), 0xFFFFFFFF); } if ( v7 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v6 + 24LL))(v6, 0LL); } std::vector<std::pair<std::string,minja::Value>>::~vector((char **)&v13); std::vector<minja::Value>::~vector(v12); if ( v23[0] != &v24 ) operator delete(v23[0], v24 + 1); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v31); result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v31); if ( v30 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v30); if ( v28 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v28); if ( v27 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v27); v9 = v26; if ( v26 ) { if ( _libc_single_threaded ) { result = *(unsigned int *)(v26 + 12); *(_DWORD *)(v26 + 12) = result - 1; } else { result = (unsigned int)_InterlockedExchangeAdd((volatile signed __int32 *)(v26 + 12), 0xFFFFFFFF); } if ( (_DWORD)result == 1 ) return (*(long long ( **)(long long, _QWORD))(*(_QWORD *)v9 + 24LL))(v9, 0LL); } return result; }
do_render: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x110 MOV RBX,RSI MOV RSI,qword ptr [RDI + 0x20] TEST RSI,RSI JZ 0x001a06dd MOV R14,RDI CMP qword ptr [RDI + 0x30],0x0 JZ 0x001a06fb MOV R15,RDX LEA R12,[RSP + 0xc0] MOV RDI,R12 CALL 0x00185d64 CMP qword ptr [R12 + 0x30],0x0 JZ 0x001a072d MOV RSI,qword ptr [R14 + 0x30] LAB_001a047c: LEA RDI,[RSP + 0xa0] MOV RDX,R15 CALL 0x0019eb6a LAB_001a048c: LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0xa0] CALL 0x0018a0b4 LAB_001a049e: MOV RDI,RSP LEA RSI,[RSP + 0x50] LEA RCX,[RSP + 0x30] MOV EDX,0x1 CALL 0x0019327c LAB_001a04b5: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOV qword ptr [RSP + 0x28],0x0 LEA R14,[RSP + 0x90] MOV RDI,R14 XOR ESI,ESI CALL 0x001586c0 MOV RDI,R14 CALL 0x0015dbae MOV RDI,qword ptr [R14 + -0x8] TEST RDI,RDI JZ 0x001a04ee CALL 0x0016d59a LAB_001a04ee: MOV RDI,qword ptr [RSP + 0x78] TEST RDI,RDI JZ 0x001a04fd CALL 0x0016d59a LAB_001a04fd: MOV RDI,qword ptr [RSP + 0x68] TEST RDI,RDI JZ 0x001a050c CALL 0x0016d59a LAB_001a050c: MOV RDI,qword ptr [RSP + 0x58] TEST RDI,RDI JZ 0x001a0542 MOV RAX,qword ptr [0x0022bf88] CMP byte ptr [RAX],0x0 JZ 0x001a052d MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001a0537 LAB_001a052d: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001a0537: CMP EAX,0x1 JNZ 0x001a0542 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001a0542: LEA R14,[RSP + 0x18] LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0xc0] MOV RCX,RSP MOV RDX,R15 CALL 0x0019365e LAB_001a055f: LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x50] CALL 0x00196956 MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] LAB_001a0578: MOV RDI,RBX CALL 0x0011aa00 LAB_001a0580: LEA RAX,[RSP + 0x40] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001a059b MOV RSI,qword ptr [RSP + 0x40] INC RSI CALL 0x0011a8d0 LAB_001a059b: LEA RBX,[RSP + 0x90] MOV RDI,RBX XOR ESI,ESI CALL 0x001586c0 MOV RDI,RBX CALL 0x0015dbae MOV RDI,qword ptr [RBX + -0x8] TEST RDI,RDI JZ 0x001a05c3 CALL 0x0016d59a LAB_001a05c3: MOV RDI,qword ptr [RSP + 0x78] TEST RDI,RDI JZ 0x001a05d2 CALL 0x0016d59a LAB_001a05d2: MOV RDI,qword ptr [RSP + 0x68] TEST RDI,RDI JZ 0x001a05e1 CALL 0x0016d59a LAB_001a05e1: MOV RDI,qword ptr [RSP + 0x58] TEST RDI,RDI JZ 0x001a0617 MOV RAX,qword ptr [0x0022bf88] CMP byte ptr [RAX],0x0 JZ 0x001a0602 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001a060c LAB_001a0602: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001a060c: CMP EAX,0x1 JNZ 0x001a0617 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001a0617: MOV RDI,R14 CALL 0x001949a6 MOV RDI,RSP CALL 0x0018d838 LEA RAX,[RSP + 0xb0] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001a0648 MOV RSI,qword ptr [RSP + 0xb0] INC RSI CALL 0x0011a8d0 LAB_001a0648: LEA RBX,[RSP + 0x100] MOV RDI,RBX XOR ESI,ESI CALL 0x001586c0 MOV RDI,RBX CALL 0x0015dbae MOV RDI,qword ptr [RBX + -0x8] TEST RDI,RDI JZ 0x001a0670 CALL 0x0016d59a LAB_001a0670: MOV RDI,qword ptr [RSP + 0xe8] TEST RDI,RDI JZ 0x001a0682 CALL 0x0016d59a LAB_001a0682: MOV RDI,qword ptr [RSP + 0xd8] TEST RDI,RDI JZ 0x001a0694 CALL 0x0016d59a LAB_001a0694: MOV RDI,qword ptr [RSP + 0xc8] TEST RDI,RDI JZ 0x001a06cd MOV RAX,qword ptr [0x0022bf88] CMP byte ptr [RAX],0x0 JZ 0x001a06b8 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001a06c2 LAB_001a06b8: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001a06c2: CMP EAX,0x1 JNZ 0x001a06cd MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001a06cd: ADD RSP,0x110 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001a06dd: MOV EDI,0x10 CALL 0x0011a450 MOV R14,RAX LAB_001a06ea: LEA RSI,[0x1f0da8] MOV RDI,RAX CALL 0x0011a330 LAB_001a06f9: JMP 0x001a0717 LAB_001a06fb: MOV EDI,0x10 CALL 0x0011a450 MOV R14,RAX LAB_001a0708: LEA RSI,[0x1f0dc2] MOV RDI,RAX CALL 0x0011a330 LAB_001a0717: MOV RSI,qword ptr [0x0022bff0] MOV RDX,qword ptr [0x0022bf60] MOV RDI,R14 CALL 0x0011af40 LAB_001a072d: MOV EDI,0x10 CALL 0x0011a450 MOV R14,RAX LAB_001a073a: MOV RDI,RSP LEA RSI,[RSP + 0xc0] MOV EDX,0xffffffff XOR ECX,ECX CALL 0x00186378 LAB_001a0751: LEA RSI,[0x1f0dda] LEA RDI,[RSP + 0x50] MOV RDX,RSP CALL 0x00178b0d MOV BPL,0x1 LAB_001a0768: LEA RSI,[RSP + 0x50] MOV RDI,R14 CALL 0x0011ae50 XOR EBP,EBP MOV RSI,qword ptr [0x0022bff0] MOV RDX,qword ptr [0x0022bf60] MOV RDI,R14 CALL 0x0011af40
/* minja::FilterNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&) const */ void minja::FilterNode::do_render(ostringstream *param_1,shared_ptr *param_2) { int *piVar1; int iVar2; runtime_error *prVar3; vector<minja::Value,std::allocator<minja::Value>> avStack_138 [24]; int8 local_120; int8 uStack_118; int8 local_110; long *local_108; long local_100; long local_f8 [2]; Value local_e8 [8]; long *local_e0; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_d0; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_c0; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_b0; data local_a8 [16]; long *local_98 [2]; long local_88 [2]; Expression local_78 [8]; long *local_70; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50; long local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40; data local_38 [16]; if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) { prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001a06ea to 001a06f8 has its CatchHandler @ 001a0802 */ std::runtime_error::runtime_error(prVar3,"FilterNode.filter is null"); } else { if (*(long *)(param_1 + 0x30) != 0) { Expression::evaluate(local_78,*(shared_ptr **)(param_1 + 0x20)); if (local_48 != 0) { /* try { // try from 001a047c to 001a048b has its CatchHandler @ 001a088b */ TemplateNode::render_abi_cxx11_((TemplateNode *)local_98,*(shared_ptr **)(param_1 + 0x30)); /* try { // try from 001a048c to 001a049d has its CatchHandler @ 001a0865 */ Value::Value(local_e8,(string *)local_98); /* try { // try from 001a049e to 001a04b4 has its CatchHandler @ 001a0856 */ std::vector<minja::Value,std::allocator<minja::Value>>::vector (avStack_138,local_e8,1,&local_108); local_120 = 0; uStack_118 = 0; local_110 = 0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_a8,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_a8); if (local_b0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_b0); } if (local_c0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_c0); } if (local_d0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_d0); } if (local_e0 != (long *)0x0) { if (*PTR___libc_single_threaded_0022bf88 == '\0') { LOCK(); piVar1 = (int *)((long)local_e0 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)local_e0 + 0xc); *(int *)((long)local_e0 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*local_e0 + 0x18))(); } } /* try { // try from 001a0542 to 001a055e has its CatchHandler @ 001a0841 */ Value::call((shared_ptr *)local_e8,(ArgumentsValue *)local_78); /* try { // try from 001a055f to 001a056d has its CatchHandler @ 001a0832 */ Value::to_str_abi_cxx11_(); /* try { // try from 001a0578 to 001a057f has its CatchHandler @ 001a0812 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)param_2,(char *)local_108,local_100); if (local_108 != local_f8) { operator_delete(local_108,local_f8[0] + 1); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_a8,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_a8); if (local_b0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_b0); } if (local_c0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_c0); } if (local_d0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_d0); } if (local_e0 != (long *)0x0) { if (*PTR___libc_single_threaded_0022bf88 == '\0') { LOCK(); piVar1 = (int *)((long)local_e0 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)local_e0 + 0xc); *(int *)((long)local_e0 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*local_e0 + 0x18))(); } } std:: vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>> ::~vector((vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>> *)&local_120); std::vector<minja::Value,std::allocator<minja::Value>>::~vector(avStack_138); if (local_98[0] != local_88) { operator_delete(local_98[0],local_88[0] + 1); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_38,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_38); if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40); } if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50); } 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_70 != (long *)0x0) { if (*PTR___libc_single_threaded_0022bf88 == '\0') { LOCK(); piVar1 = (int *)((long)local_70 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)local_70 + 0xc); *(int *)((long)local_70 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*local_70 + 0x18))(); } } return; } prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001a073a to 001a0750 has its CatchHandler @ 001a07f0 */ Value::dump_abi_cxx11_((int)avStack_138,SUB81(local_78,0)); /* try { // try from 001a0751 to 001a0764 has its CatchHandler @ 001a07d0 */ std::operator+((char *)local_e8,(string *)"Filter must be a callable: "); /* try { // try from 001a0768 to 001a078c has its CatchHandler @ 001a078d */ std::runtime_error::runtime_error(prVar3,(string *)local_e8); /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60); } prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001a0708 to 001a0716 has its CatchHandler @ 001a0800 */ std::runtime_error::runtime_error(prVar3,"FilterNode.body is null"); } /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60); }
4,613
js_date_Symbol_toPrimitive
bluesky950520[P]quickjs/quickjs.c
static JSValue js_date_Symbol_toPrimitive(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { // Symbol_toPrimitive(hint) JSValue obj = this_val; JSAtom hint = JS_ATOM_NULL; int hint_num; if (!JS_IsObject(obj)) return JS_ThrowTypeErrorNotAnObject(ctx); if (JS_IsString(argv[0])) { hint = JS_ValueToAtom(ctx, argv[0]); if (hint == JS_ATOM_NULL) return JS_EXCEPTION; JS_FreeAtom(ctx, hint); } switch (hint) { case JS_ATOM_number: case JS_ATOM_integer: hint_num = HINT_NUMBER; break; case JS_ATOM_string: case JS_ATOM_default: hint_num = HINT_STRING; break; default: return JS_ThrowTypeError(ctx, "invalid hint"); } return JS_ToPrimitive(ctx, obj, hint_num | HINT_FORCE_ORDINARY); }
O0
c
js_date_Symbol_toPrimitive: subq $0x58, %rsp movq %rsi, 0x38(%rsp) movq %rdx, 0x40(%rsp) movq %rdi, 0x30(%rsp) movl %ecx, 0x2c(%rsp) movq %r8, 0x20(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x18(%rsp) movl $0x0, 0xc(%rsp) movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x31260 cmpl $0x0, %eax jne 0x9e525 movq 0x30(%rsp), %rdi callq 0x35890 movq %rax, 0x48(%rsp) movq %rdx, 0x50(%rsp) jmp 0x9e608 movq 0x20(%rsp), %rax movq (%rax), %rdi movq 0x8(%rax), %rsi callq 0x56a00 cmpl $0x0, %eax je 0x9e580 movq 0x30(%rsp), %rdi movq 0x20(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x374f0 movl %eax, 0xc(%rsp) cmpl $0x0, 0xc(%rsp) jne 0x9e572 movl $0x0, 0x48(%rsp) movq $0x6, 0x50(%rsp) jmp 0x9e608 movq 0x30(%rsp), %rdi movl 0xc(%rsp), %esi callq 0x2f330 movl 0xc(%rsp), %eax movl %eax, 0x4(%rsp) subl $0x16, %eax je 0x9e5ba jmp 0x9e58f movl 0x4(%rsp), %eax subl $0x47, %eax je 0x9e5b0 jmp 0x9e59a movl 0x4(%rsp), %eax subl $0x49, %eax je 0x9e5ba jmp 0x9e5a5 movl 0x4(%rsp), %eax subl $0x4c, %eax jne 0x9e5c4 jmp 0x9e5b0 movl $0x1, 0x8(%rsp) jmp 0x9e5e3 movl $0x0, 0x8(%rsp) jmp 0x9e5e3 movq 0x30(%rsp), %rdi leaq 0x77386(%rip), %rsi # 0x115956 movb $0x0, %al callq 0x335f0 movq %rax, 0x48(%rsp) movq %rdx, 0x50(%rsp) jmp 0x9e608 movq 0x30(%rsp), %rdi movl 0x8(%rsp), %ecx orl $0x10, %ecx movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx callq 0x3f870 movq %rax, 0x48(%rsp) movq %rdx, 0x50(%rsp) movq 0x48(%rsp), %rax movq 0x50(%rsp), %rdx addq $0x58, %rsp retq nopw (%rax,%rax)
js_date_Symbol_toPrimitive: sub rsp, 58h mov [rsp+58h+var_20], rsi mov [rsp+58h+var_18], rdx mov [rsp+58h+var_28], rdi mov [rsp+58h+var_2C], ecx mov [rsp+58h+var_38], r8 mov rax, [rsp+58h+var_20] mov [rsp+58h+var_48], rax mov rax, [rsp+58h+var_18] mov [rsp+58h+var_40], rax mov [rsp+58h+var_4C], 0 mov rdi, [rsp+58h+var_48] mov rsi, [rsp+58h+var_40] call JS_IsObject cmp eax, 0 jnz short loc_9E525 mov rdi, [rsp+58h+var_28] call JS_ThrowTypeErrorNotAnObject mov [rsp+58h+var_10], rax mov [rsp+58h+var_8], rdx jmp loc_9E608 loc_9E525: mov rax, [rsp+58h+var_38] mov rdi, [rax] mov rsi, [rax+8] call JS_IsString_0 cmp eax, 0 jz short loc_9E580 mov rdi, [rsp+58h+var_28] mov rax, [rsp+58h+var_38] mov rsi, [rax] mov rdx, [rax+8] call JS_ValueToAtom mov [rsp+58h+var_4C], eax cmp [rsp+58h+var_4C], 0 jnz short loc_9E572 mov dword ptr [rsp+58h+var_10], 0 mov [rsp+58h+var_8], 6 jmp loc_9E608 loc_9E572: mov rdi, [rsp+58h+var_28] mov esi, [rsp+58h+var_4C] call JS_FreeAtom loc_9E580: mov eax, [rsp+58h+var_4C] mov [rsp+58h+var_54], eax sub eax, 16h jz short loc_9E5BA jmp short $+2 loc_9E58F: mov eax, [rsp+58h+var_54] sub eax, 47h ; 'G' jz short loc_9E5B0 jmp short $+2 loc_9E59A: mov eax, [rsp+58h+var_54] sub eax, 49h ; 'I' jz short loc_9E5BA jmp short $+2 loc_9E5A5: mov eax, [rsp+58h+var_54] sub eax, 4Ch ; 'L' jnz short loc_9E5C4 jmp short $+2 loc_9E5B0: mov [rsp+58h+var_50], 1 jmp short loc_9E5E3 loc_9E5BA: mov [rsp+58h+var_50], 0 jmp short loc_9E5E3 loc_9E5C4: mov rdi, [rsp+58h+var_28] lea rsi, aInvalidHint; "invalid hint" mov al, 0 call JS_ThrowTypeError mov [rsp+58h+var_10], rax mov [rsp+58h+var_8], rdx jmp short loc_9E608 loc_9E5E3: mov rdi, [rsp+58h+var_28] mov ecx, [rsp+58h+var_50] or ecx, 10h mov rsi, [rsp+58h+var_48] mov rdx, [rsp+58h+var_40] call JS_ToPrimitive mov [rsp+58h+var_10], rax mov [rsp+58h+var_8], rdx loc_9E608: mov rax, [rsp+58h+var_10] mov rdx, [rsp+58h+var_8] add rsp, 58h retn
long long js_date_Symbol_toPrimitive( long long a1, _DWORD *a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11, long long a12, long long *a13) { long long v15; // rdx long long v16; // rcx long long v17; // r8 long long v18; // r9 __m128 v19; // xmm4 __m128 v20; // xmm5 long long v21; // rdx long long v22; // rcx long long v23; // r8 long long v24; // r9 __m128 v25; // xmm4 __m128 v26; // xmm5 char v28; // [rsp+0h] [rbp-58h] int v29; // [rsp+8h] [rbp-50h] unsigned int v30; // [rsp+Ch] [rbp-4Ch] unsigned int v32; // [rsp+18h] [rbp-40h] long long v35; // [rsp+48h] [rbp-10h] v32 = a3; v30 = 0; if ( JS_IsObject((long long)a2, a3) ) { if ( JS_IsString_0(*a13, a13[1]) ) { v30 = JS_ValueToAtom(a1, *a13, a13[1]); if ( !v30 ) { LODWORD(v35) = 0; return v35; } JS_FreeAtom(a1, v30); } if ( v30 != 22 ) { if ( v30 == 71 ) { LABEL_11: v29 = 1; return JS_ToPrimitive(a1, a2, v32, v29 | 0x10u); } if ( v30 != 73 ) { if ( v30 != 76 ) return JS_ThrowTypeError( a1, (long long)"invalid hint", v21, v22, v23, v24, a4, a5, a6, a7, v25, v26, a10, a11, v28); goto LABEL_11; } } v29 = 0; return JS_ToPrimitive(a1, a2, v32, v29 | 0x10u); } return JS_ThrowTypeErrorNotAnObject(a1, a4, a5, a6, a7, v19, v20, a10, a11, a3, v15, v16, v17, v18); }
js_date_Symbol_toPrimitive: SUB RSP,0x58 MOV qword ptr [RSP + 0x38],RSI MOV qword ptr [RSP + 0x40],RDX MOV qword ptr [RSP + 0x30],RDI MOV dword ptr [RSP + 0x2c],ECX MOV qword ptr [RSP + 0x20],R8 MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x18],RAX MOV dword ptr [RSP + 0xc],0x0 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x18] CALL 0x00131260 CMP EAX,0x0 JNZ 0x0019e525 MOV RDI,qword ptr [RSP + 0x30] CALL 0x00135890 MOV qword ptr [RSP + 0x48],RAX MOV qword ptr [RSP + 0x50],RDX JMP 0x0019e608 LAB_0019e525: MOV RAX,qword ptr [RSP + 0x20] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x8] CALL 0x00156a00 CMP EAX,0x0 JZ 0x0019e580 MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x001374f0 MOV dword ptr [RSP + 0xc],EAX CMP dword ptr [RSP + 0xc],0x0 JNZ 0x0019e572 MOV dword ptr [RSP + 0x48],0x0 MOV qword ptr [RSP + 0x50],0x6 JMP 0x0019e608 LAB_0019e572: MOV RDI,qword ptr [RSP + 0x30] MOV ESI,dword ptr [RSP + 0xc] CALL 0x0012f330 LAB_0019e580: MOV EAX,dword ptr [RSP + 0xc] MOV dword ptr [RSP + 0x4],EAX SUB EAX,0x16 JZ 0x0019e5ba JMP 0x0019e58f LAB_0019e58f: MOV EAX,dword ptr [RSP + 0x4] SUB EAX,0x47 JZ 0x0019e5b0 JMP 0x0019e59a LAB_0019e59a: MOV EAX,dword ptr [RSP + 0x4] SUB EAX,0x49 JZ 0x0019e5ba JMP 0x0019e5a5 LAB_0019e5a5: MOV EAX,dword ptr [RSP + 0x4] SUB EAX,0x4c JNZ 0x0019e5c4 JMP 0x0019e5b0 LAB_0019e5b0: MOV dword ptr [RSP + 0x8],0x1 JMP 0x0019e5e3 LAB_0019e5ba: MOV dword ptr [RSP + 0x8],0x0 JMP 0x0019e5e3 LAB_0019e5c4: MOV RDI,qword ptr [RSP + 0x30] LEA RSI,[0x215956] MOV AL,0x0 CALL 0x001335f0 MOV qword ptr [RSP + 0x48],RAX MOV qword ptr [RSP + 0x50],RDX JMP 0x0019e608 LAB_0019e5e3: MOV RDI,qword ptr [RSP + 0x30] MOV ECX,dword ptr [RSP + 0x8] OR ECX,0x10 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] CALL 0x0013f870 MOV qword ptr [RSP + 0x48],RAX MOV qword ptr [RSP + 0x50],RDX LAB_0019e608: MOV RAX,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] ADD RSP,0x58 RET
int1 [16] js_date_Symbol_toPrimitive (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 *param_5) { int iVar1; int1 auVar2 [16]; uint local_50; int local_4c; int4 local_10; int4 uStack_c; int8 local_8; local_4c = 0; iVar1 = JS_IsObject(param_2,param_3); if (iVar1 == 0) { auVar2 = JS_ThrowTypeErrorNotAnObject(param_1); local_8 = auVar2._8_8_; local_10 = auVar2._0_4_; uStack_c = auVar2._4_4_; goto LAB_0019e608; } iVar1 = JS_IsString(*param_5,param_5[1]); if (iVar1 != 0) { local_4c = JS_ValueToAtom(param_1,*param_5,param_5[1]); if (local_4c == 0) { local_10 = 0; local_8 = 6; goto LAB_0019e608; } JS_FreeAtom(param_1,local_4c); } if (local_4c == 0x16) { LAB_0019e5ba: local_50 = 0; } else { if (local_4c != 0x47) { if (local_4c == 0x49) goto LAB_0019e5ba; if (local_4c != 0x4c) { auVar2 = JS_ThrowTypeError(param_1,"invalid hint"); local_8 = auVar2._8_8_; local_10 = auVar2._0_4_; uStack_c = auVar2._4_4_; goto LAB_0019e608; } } local_50 = 1; } auVar2 = JS_ToPrimitive(param_1,param_2,param_3,local_50 | 0x10); local_8 = auVar2._8_8_; local_10 = auVar2._0_4_; uStack_c = auVar2._4_4_; LAB_0019e608: auVar2._4_4_ = uStack_c; auVar2._0_4_ = local_10; auVar2._8_8_ = local_8; return auVar2; }
4,614
common_chat_format_example[abi:cxx11](minja::chat_template const&, bool)
monkey531[P]llama/common/common.cpp
std::string common_chat_format_example(const common_chat_template & tmpl, bool use_jinja) { std::vector<common_chat_msg> msgs = { {"system", "You are a helpful assistant", {}}, {"user", "Hello", {}}, {"assistant", "Hi there", {}}, {"user", "How are you?", {}}, }; return common_chat_apply_template(tmpl, msgs, true, use_jinja); }
O1
cpp
common_chat_format_example[abi:cxx11](minja::chat_template const&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x208, %rsp # imm = 0x208 movl %edx, %ebp movq %rsi, %r12 movq %rdi, %r15 leaq 0x38(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x7b26b(%rip), %rsi # 0xf74d2 leaq 0x7b26a(%rip), %rdx # 0xf74d8 leaq 0x28(%rsp), %rdi callq 0x28a68 leaq 0x48(%rsp), %rdi leaq 0x58(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x7b24c(%rip), %rsi # 0xf74d9 leaq 0x7b260(%rip), %rdx # 0xf74f4 callq 0x28a68 leaq 0x68(%rsp), %r14 leaq 0x80(%rsp), %rdi leaq 0x90(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x7872c(%rip), %rdx # 0xf49f4 movq %rdx, %rsi callq 0x28a68 leaq 0xa0(%rsp), %r14 leaq 0xb0(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x7b171(%rip), %rsi # 0xf745c leaq 0x7b16e(%rip), %rdx # 0xf7460 movq %r14, %rdi callq 0x28a68 leaq 0xc0(%rsp), %rdi leaq 0xd0(%rsp), %rbx movq %rbx, -0x10(%rbx) leaq 0x7b1e0(%rip), %rsi # 0xf74f5 leaq 0x7b1de(%rip), %rdx # 0xf74fa callq 0x28a68 leaq 0xe0(%rsp), %r13 leaq 0xf8(%rsp), %rdi leaq 0x108(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x786a1(%rip), %rdx # 0xf49f4 movq %rdx, %rsi callq 0x28a68 leaq 0x118(%rsp), %r14 leaq 0x128(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x7b175(%rip), %rsi # 0xf74eb leaq 0x7b177(%rip), %rdx # 0xf74f4 movq %r14, %rdi callq 0x28a68 leaq 0x138(%rsp), %rdi leaq 0x148(%rsp), %rbx movq %rbx, -0x10(%rbx) leaq 0x7b15b(%rip), %rsi # 0xf74fb leaq 0x7b15c(%rip), %rdx # 0xf7503 callq 0x28a68 leaq 0x158(%rsp), %r13 leaq 0x170(%rsp), %rdi leaq 0x180(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x78616(%rip), %rdx # 0xf49f4 movq %rdx, %rsi callq 0x28a68 leaq 0x190(%rsp), %r14 leaq 0x1a0(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x7b05b(%rip), %rsi # 0xf745c leaq 0x7b058(%rip), %rdx # 0xf7460 movq %r14, %rdi callq 0x28a68 leaq 0x1b0(%rsp), %rdi leaq 0x1c0(%rsp), %rbx movq %rbx, -0x10(%rbx) leaq 0x7b0d9(%rip), %rsi # 0xf7504 leaq 0x7b0de(%rip), %rdx # 0xf7510 callq 0x28a68 leaq 0x1d0(%rsp), %r13 leaq 0x1e8(%rsp), %rdi leaq 0x1f8(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x7858b(%rip), %rdx # 0xf49f4 movq %rdx, %rsi callq 0x28a68 leaq 0x10(%rsp), %rdi leaq 0x28(%rsp), %rsi leaq 0xf(%rsp), %rcx movl $0x4, %edx callq 0x8471a movl $0x1e0, %r14d # imm = 0x1E0 leaq (%rsp,%r14), %rax addq $0x18, %rax movq -0x10(%rax), %rdi cmpq %rdi, %rax je 0x7c4ac movq (%rax), %rsi incq %rsi callq 0x1b910 leaq (%rsp,%r14), %rbx addq $-0x10, %rbx movq %rbx, %rdi callq 0x846ea movq -0x20(%rbx), %rdi leaq (%rsp,%r14), %rax addq $-0x20, %rax cmpq %rdi, %rax je 0x7c4d8 movq (%rax), %rsi incq %rsi callq 0x1b910 leaq (%rsp,%r14), %rax addq $-0x40, %rax movq -0x10(%rax), %rdi cmpq %rdi, %rax je 0x7c4f4 movq (%rax), %rsi incq %rsi callq 0x1b910 addq $-0x78, %r14 jne 0x7c490 movzbl %bpl, %r8d leaq 0x10(%rsp), %rdx movq %r15, %rdi movq %r12, %rsi movl $0x1, %ecx callq 0x7b88b leaq 0x10(%rsp), %rdi callq 0x846ba movq %r15, %rax addq $0x208, %rsp # imm = 0x208 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 leaq 0x10(%rsp), %rdi callq 0x846ba jmp 0x7c738 movq %rax, %r15 movl $0x168, %ebx # imm = 0x168 leaq (%rsp,%rbx), %rdi addq $0x28, %rdi callq 0x84762 addq $-0x78, %rbx cmpq $-0x78, %rbx jne 0x7c54c xorl %ebp, %ebp jmp 0x7c59a movq %rax, %r15 movq %r13, %rdi callq 0x846ea movq 0x1b0(%rsp), %rdi movb $0x1, %bpl cmpq %rbx, %rdi je 0x7c59a movq 0x1c0(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0x7c59a movq %rax, %r15 movb $0x1, %bpl testb %bpl, %bpl je 0x7c5cc movq 0x190(%rsp), %rdi leaq 0x1a0(%rsp), %rax cmpq %rax, %rdi je 0x7c5cc movq 0x1a0(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0x7c5cc movq %rax, %r15 movb $0x1, %bpl xorl %r12d, %r12d jmp 0x7c607 movq %rax, %r15 movq %r13, %rdi callq 0x846ea movq 0x138(%rsp), %rdi movb $0x1, %r12b cmpq %rbx, %rdi je 0x7c604 movq 0x148(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0x7c604 movq %rax, %r15 movb $0x1, %r12b movb $0x1, %bpl testb %r12b, %r12b je 0x7c639 movq 0x118(%rsp), %rdi leaq 0x128(%rsp), %rax cmpq %rax, %rdi je 0x7c639 movq 0x128(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0x7c639 movq %rax, %r15 movb $0x1, %bpl xorl %r12d, %r12d jmp 0x7c674 movq %rax, %r15 movq %r13, %rdi callq 0x846ea movq 0xc0(%rsp), %rdi movb $0x1, %r12b cmpq %rbx, %rdi je 0x7c671 movq 0xd0(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0x7c671 movq %rax, %r15 movb $0x1, %r12b movb $0x1, %bpl testb %r12b, %r12b je 0x7c6a6 movq 0xa0(%rsp), %rdi leaq 0xb0(%rsp), %rax cmpq %rax, %rdi je 0x7c6a6 movq 0xb0(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0x7c6a6 movq %rax, %r15 movb $0x1, %bpl xorl %ebx, %ebx testb %bl, %bl je 0x7c70e movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x7c70e movq 0x38(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0x7c70e movq %rax, %r15 movq %r14, %rdi callq 0x846ea leaq 0x28(%rsp), %r14 movq 0x20(%r14), %rdi movb $0x1, %bl cmpq %r13, %rdi je 0x7c6fe movq 0x58(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0x7c6fe movq %rax, %r15 movb $0x1, %bl leaq 0x28(%rsp), %r14 movb $0x1, %bpl jmp 0x7c6a8 movq %rax, %r15 movb $0x1, %bpl leaq 0x28(%rsp), %r14 leaq 0x28(%rsp), %rax cmpq %r14, %rax sete %al xorb $0x1, %bpl orb %al, %bpl jne 0x7c738 leaq 0x28(%rsp), %rbx addq $-0x78, %r14 movq %r14, %rdi callq 0x84762 cmpq %rbx, %r14 jne 0x7c727 movq %r15, %rdi callq 0x1bff0
_Z26common_chat_format_exampleB5cxx11RKN5minja13chat_templateEb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 208h mov ebp, edx mov r12, rsi mov r15, rdi lea rax, [rsp+238h+var_200] mov [rax-10h], rax lea rsi, aSystem; "system" lea rdx, aSystem+6; "" lea rdi, [rsp+238h+var_210] 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+238h+var_1F0] lea r13, [rsp+238h+var_1E0] mov [r13-10h], r13 lea rsi, aYouAreAHelpful; "You are a helpful assistant" lea rdx, aYouAreAHelpful+1Bh; "" 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 r14, [rsp+238h+var_1D0] lea rdi, [rsp+238h+var_1B8] lea rax, [rsp+238h+var_1A8] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, aErrorWhileHand_0+34h; "" 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) lea r14, [rsp+238h+var_198] lea rax, [rsp+238h+var_188] mov [rax-10h], rax lea rsi, aUser; "user" lea rdx, aUser+4; "" mov rdi, r14 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+238h+var_178] lea rbx, [rsp+238h+var_168] mov [rbx-10h], rbx lea rsi, aHello; "Hello" lea rdx, aHello+5; "" 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 r13, [rsp+238h+var_158] lea rdi, [rsp+238h+var_140] lea rax, [rsp+238h+var_130] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, aErrorWhileHand_0+34h; "" 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) lea r14, [rsp+238h+var_120] lea rax, [rsp+238h+var_110] mov [rax-10h], rax lea rsi, aYouAreAHelpful+12h; "assistant" lea rdx, aYouAreAHelpful+1Bh; "" mov rdi, r14 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+238h+var_100] lea rbx, [rsp+238h+var_F0] mov [rbx-10h], rbx lea rsi, aHiThere; "Hi there" lea rdx, aHiThere+8; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r13, [rsp+238h+var_E0] lea rdi, [rsp+238h+var_C8] lea rax, [rsp+238h+var_B8] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, aErrorWhileHand_0+34h; "" 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) lea r14, [rsp+238h+var_A8] lea rax, [rsp+238h+var_98] mov [rax-10h], rax lea rsi, aUser; "user" lea rdx, aUser+4; "" mov rdi, r14 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+238h+var_88] lea rbx, [rsp+238h+var_78] mov [rbx-10h], rbx lea rsi, aHowAreYou; "How are you?" lea rdx, aHowAreYou+0Ch; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r13, [rsp+238h+var_68] lea rdi, [rsp+238h+var_50] lea rax, [rsp+238h+var_40] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, aErrorWhileHand_0+34h; "" 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) lea rdi, [rsp+238h+var_228] lea rsi, [rsp+238h+var_210] lea rcx, [rsp+238h+var_229] mov edx, 4 call _ZNSt6vectorI15common_chat_msgSaIS0_EEC2ESt16initializer_listIS0_ERKS1_; std::vector<common_chat_msg>::vector(std::initializer_list<common_chat_msg>,std::allocator<common_chat_msg> const&) mov r14d, 1E0h loc_7C490: lea rax, [rsp+r14+238h+var_238] add rax, 18h mov rdi, [rax-10h]; void * cmp rax, rdi jz short loc_7C4AC mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7C4AC: lea rbx, [rsp+r14+238h+var_238] add rbx, 0FFFFFFFFFFFFFFF0h mov rdi, rbx call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rbx-20h]; void * lea rax, [rsp+r14+238h+var_238] add rax, 0FFFFFFFFFFFFFFE0h cmp rax, rdi jz short loc_7C4D8 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7C4D8: lea rax, [rsp+r14+238h+var_238] add rax, 0FFFFFFFFFFFFFFC0h mov rdi, [rax-10h]; void * cmp rax, rdi jz short loc_7C4F4 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7C4F4: add r14, 0FFFFFFFFFFFFFF88h jnz short loc_7C490 movzx r8d, bpl lea rdx, [rsp+238h+var_228] mov rdi, r15 mov rsi, r12 mov ecx, 1 call _Z26common_chat_apply_templateB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EEbb; common_chat_apply_template(minja::chat_template const&,std::vector<common_chat_msg> const&,bool,bool) lea rdi, [rsp+238h+var_228] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() mov rax, r15 add rsp, 208h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r15, rax lea rdi, [rsp+arg_8] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() jmp loc_7C738 mov r15, rax mov ebx, 168h loc_7C54C: lea rdi, [rsp+rbx+0] add rdi, 28h ; '('; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() add rbx, 0FFFFFFFFFFFFFF88h cmp rbx, 0FFFFFFFFFFFFFF88h jnz short loc_7C54C xor ebp, ebp jmp short loc_7C59A mov r15, rax mov rdi, r13 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rsp+arg_1A8]; void * mov bpl, 1 cmp rdi, rbx jz short loc_7C59A mov rsi, [rsp+arg_1B8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_7C59A mov r15, rax mov bpl, 1 loc_7C59A: test bpl, bpl jz short loc_7C5CC mov rdi, [rsp+arg_188]; void * lea rax, [rsp+arg_198] cmp rdi, rax jz short loc_7C5CC mov rsi, [rsp+arg_198] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_7C5CC mov r15, rax mov bpl, 1 loc_7C5CC: xor r12d, r12d jmp short loc_7C607 mov r15, rax mov rdi, r13 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rsp+arg_130]; void * mov r12b, 1 cmp rdi, rbx jz short loc_7C604 mov rsi, [rsp+arg_140] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_7C604 mov r15, rax mov r12b, 1 loc_7C604: mov bpl, 1 loc_7C607: test r12b, r12b jz short loc_7C639 mov rdi, [rsp+arg_110]; void * lea rax, [rsp+arg_120] cmp rdi, rax jz short loc_7C639 mov rsi, [rsp+arg_120] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_7C639 mov r15, rax mov bpl, 1 loc_7C639: xor r12d, r12d jmp short loc_7C674 mov r15, rax mov rdi, r13 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rsp+arg_B8]; void * mov r12b, 1 cmp rdi, rbx jz short loc_7C671 mov rsi, [rsp+arg_C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_7C671 mov r15, rax mov r12b, 1 loc_7C671: mov bpl, 1 loc_7C674: test r12b, r12b jz short loc_7C6A6 mov rdi, [rsp+arg_98]; void * lea rax, [rsp+arg_A8] cmp rdi, rax jz short loc_7C6A6 mov rsi, [rsp+arg_A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_7C6A6 mov r15, rax mov bpl, 1 loc_7C6A6: xor ebx, ebx loc_7C6A8: test bl, bl jz short loc_7C70E mov rdi, [rsp+arg_20]; void * lea rax, [rsp+arg_30] cmp rdi, rax jz short loc_7C70E mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_7C70E mov r15, rax mov rdi, r14 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() lea r14, [rsp+arg_20] mov rdi, [r14+20h]; void * mov bl, 1 cmp rdi, r13 jz short loc_7C6FE mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_7C6FE mov r15, rax mov bl, 1 lea r14, [rsp+arg_20] loc_7C6FE: mov bpl, 1 jmp short loc_7C6A8 mov r15, rax mov bpl, 1 lea r14, [rsp+arg_20] loc_7C70E: lea rax, [rsp+arg_20] cmp rax, r14 setz al xor bpl, 1 or bpl, al jnz short loc_7C738 lea rbx, [rsp+arg_20] loc_7C727: add r14, 0FFFFFFFFFFFFFF88h mov rdi, r14; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() cmp r14, rbx jnz short loc_7C727 loc_7C738: mov rdi, r15 call __Unwind_Resume
_QWORD * common_chat_format_example[abi:cxx11](_QWORD *a1, common_chat_inputs *a2, unsigned __int8 a3) { unsigned long long v5; // r14 long long *v6; // rdi _QWORD *v7; // rdi _QWORD *v8; // rax _QWORD *v9; // rax _QWORD *v10; // rdi _BYTE v12[15]; // [rsp+0h] [rbp-238h] BYREF char v13; // [rsp+Fh] [rbp-229h] BYREF long long v14[3]; // [rsp+10h] [rbp-228h] BYREF _QWORD v15[2]; // [rsp+28h] [rbp-210h] BYREF char v16; // [rsp+38h] [rbp-200h] BYREF char *v17; // [rsp+48h] [rbp-1F0h] BYREF char v18; // [rsp+58h] [rbp-1E0h] BYREF __int128 v19; // [rsp+68h] [rbp-1D0h] long long v20; // [rsp+78h] [rbp-1C0h] char *v21; // [rsp+80h] [rbp-1B8h] BYREF char v22; // [rsp+90h] [rbp-1A8h] BYREF char *v23; // [rsp+A0h] [rbp-198h] BYREF char v24; // [rsp+B0h] [rbp-188h] BYREF char *v25; // [rsp+C0h] [rbp-178h] BYREF char v26; // [rsp+D0h] [rbp-168h] BYREF __int128 v27; // [rsp+E0h] [rbp-158h] long long v28; // [rsp+F0h] [rbp-148h] char *v29; // [rsp+F8h] [rbp-140h] BYREF char v30; // [rsp+108h] [rbp-130h] BYREF char *v31; // [rsp+118h] [rbp-120h] BYREF char v32; // [rsp+128h] [rbp-110h] BYREF char *v33; // [rsp+138h] [rbp-100h] BYREF char v34; // [rsp+148h] [rbp-F0h] BYREF __int128 v35; // [rsp+158h] [rbp-E0h] long long v36; // [rsp+168h] [rbp-D0h] char *v37; // [rsp+170h] [rbp-C8h] BYREF char v38; // [rsp+180h] [rbp-B8h] BYREF char *v39; // [rsp+190h] [rbp-A8h] BYREF char v40; // [rsp+1A0h] [rbp-98h] BYREF char *v41; // [rsp+1B0h] [rbp-88h] BYREF char v42; // [rsp+1C0h] [rbp-78h] BYREF __int128 v43; // [rsp+1D0h] [rbp-68h] long long v44; // [rsp+1E0h] [rbp-58h] char *v45; // [rsp+1E8h] [rbp-50h] BYREF char v46; // [rsp+1F8h] [rbp-40h] BYREF v15[0] = &v16; std::string::_M_construct<char const*>(v15, "system", (long long)""); v17 = &v18; std::string::_M_construct<char const*>(&v17, "You are a helpful assistant", (long long)""); v19 = 0LL; v20 = 0LL; v21 = &v22; std::string::_M_construct<char const*>(&v21, "", (long long)""); v23 = &v24; std::string::_M_construct<char const*>(&v23, "user", (long long)""); v25 = &v26; std::string::_M_construct<char const*>(&v25, "Hello", (long long)""); v27 = 0LL; v28 = 0LL; v29 = &v30; std::string::_M_construct<char const*>(&v29, "", (long long)""); v31 = &v32; std::string::_M_construct<char const*>(&v31, "assistant", (long long)""); v33 = &v34; std::string::_M_construct<char const*>(&v33, "Hi there", (long long)""); v35 = 0LL; v36 = 0LL; v37 = &v38; std::string::_M_construct<char const*>(&v37, "", (long long)""); v39 = &v40; std::string::_M_construct<char const*>(&v39, "user", (long long)""); v41 = &v42; std::string::_M_construct<char const*>(&v41, "How are you?", (long long)""); v43 = 0LL; v44 = 0LL; v45 = &v46; std::string::_M_construct<char const*>(&v45, "", (long long)""); std::vector<common_chat_msg>::vector(v14, v15, 4LL, &v13); v5 = 480LL; do { v6 = *(long long **)&v12[v5 + 8]; if ( &v14[v5 / 8 + 1] != v6 ) operator delete(v6, v14[v5 / 8 + 1] + 1); std::vector<common_tool_call>::~vector(&v12[v5 - 16]); v7 = *(_QWORD **)&v12[v5 - 48]; v8 = &v12[v5 - 32]; if ( v8 != v7 ) operator delete(v7, *v8 + 1LL); v9 = &v12[v5 - 64]; v10 = (_QWORD *)*(v9 - 2); if ( v9 != v10 ) operator delete(v10, *v9 + 1LL); v5 -= 120LL; } while ( v5 ); common_chat_apply_template[abi:cxx11](a1, a2, v14, 1u, a3); std::vector<common_chat_msg>::~vector(v14); return a1; }
common_chat_format_example[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x208 MOV EBP,EDX MOV R12,RSI MOV R15,RDI LEA RAX,[RSP + 0x38] MOV qword ptr [RAX + -0x10],RAX LAB_0017c260: LEA RSI,[0x1f74d2] LEA RDX,[0x1f74d8] LEA RDI,[RSP + 0x28] CALL 0x00128a68 LEA RDI,[RSP + 0x48] LEA R13,[RSP + 0x58] MOV qword ptr [R13 + -0x10],R13 LAB_0017c286: LEA RSI,[0x1f74d9] LEA RDX,[0x1f74f4] CALL 0x00128a68 LEA R14,[RSP + 0x68] LEA RDI,[RSP + 0x80] LEA RAX,[RSP + 0x90] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_0017c2c1: LEA RDX,[0x1f49f4] MOV RSI,RDX CALL 0x00128a68 LEA R14,[RSP + 0xa0] LEA RAX,[RSP + 0xb0] MOV qword ptr [RAX + -0x10],RAX LAB_0017c2e4: LEA RSI,[0x1f745c] LEA RDX,[0x1f7460] MOV RDI,R14 CALL 0x00128a68 LEA RDI,[RSP + 0xc0] LEA RBX,[RSP + 0xd0] MOV qword ptr [RBX + -0x10],RBX LAB_0017c30e: LEA RSI,[0x1f74f5] LEA RDX,[0x1f74fa] CALL 0x00128a68 LEA R13,[RSP + 0xe0] LEA RDI,[RSP + 0xf8] LEA RAX,[RSP + 0x108] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_0017c34c: LEA RDX,[0x1f49f4] MOV RSI,RDX CALL 0x00128a68 LEA R14,[RSP + 0x118] LEA RAX,[RSP + 0x128] MOV qword ptr [RAX + -0x10],RAX LAB_0017c36f: LEA RSI,[0x1f74eb] LEA RDX,[0x1f74f4] MOV RDI,R14 CALL 0x00128a68 LEA RDI,[RSP + 0x138] LEA RBX,[RSP + 0x148] MOV qword ptr [RBX + -0x10],RBX LAB_0017c399: LEA RSI,[0x1f74fb] LEA RDX,[0x1f7503] CALL 0x00128a68 LEA R13,[RSP + 0x158] LEA RDI,[RSP + 0x170] LEA RAX,[RSP + 0x180] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_0017c3d7: LEA RDX,[0x1f49f4] MOV RSI,RDX CALL 0x00128a68 LEA R14,[RSP + 0x190] LEA RAX,[RSP + 0x1a0] MOV qword ptr [RAX + -0x10],RAX LAB_0017c3fa: LEA RSI,[0x1f745c] LEA RDX,[0x1f7460] MOV RDI,R14 CALL 0x00128a68 LEA RDI,[RSP + 0x1b0] LEA RBX,[RSP + 0x1c0] MOV qword ptr [RBX + -0x10],RBX LAB_0017c424: LEA RSI,[0x1f7504] LEA RDX,[0x1f7510] CALL 0x00128a68 LEA R13,[RSP + 0x1d0] LEA RDI,[RSP + 0x1e8] LEA RAX,[RSP + 0x1f8] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_0017c462: LEA RDX,[0x1f49f4] MOV RSI,RDX CALL 0x00128a68 LAB_0017c471: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x28] LEA RCX,[RSP + 0xf] MOV EDX,0x4 CALL 0x0018471a MOV R14D,0x1e0 LAB_0017c490: LEA RAX,[RSP + R14*0x1] ADD RAX,0x18 MOV RDI,qword ptr [RAX + -0x10] CMP RAX,RDI JZ 0x0017c4ac MOV RSI,qword ptr [RAX] INC RSI CALL 0x0011b910 LAB_0017c4ac: LEA RBX,[RSP + R14*0x1] ADD RBX,-0x10 MOV RDI,RBX CALL 0x001846ea MOV RDI,qword ptr [RBX + -0x20] LEA RAX,[RSP + R14*0x1] ADD RAX,-0x20 CMP RAX,RDI JZ 0x0017c4d8 MOV RSI,qword ptr [RAX] INC RSI CALL 0x0011b910 LAB_0017c4d8: LEA RAX,[RSP + R14*0x1] ADD RAX,-0x40 MOV RDI,qword ptr [RAX + -0x10] CMP RAX,RDI JZ 0x0017c4f4 MOV RSI,qword ptr [RAX] INC RSI CALL 0x0011b910 LAB_0017c4f4: ADD R14,-0x78 JNZ 0x0017c490 LAB_0017c4fa: MOVZX R8D,BPL LEA RDX,[RSP + 0x10] MOV RDI,R15 MOV RSI,R12 MOV ECX,0x1 CALL 0x0017b88b LAB_0017c513: LEA RDI,[RSP + 0x10] CALL 0x001846ba MOV RAX,R15 ADD RSP,0x208 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_format_example[abi:cxx11](minja::chat_template const&, bool) */ chat_template * common_chat_format_example_abi_cxx11_(chat_template *param_1,bool param_2) { long *plVar1; long *plVar2; int7 in_register_00000031; long lVar3; long alStack_288 [8]; vector<common_tool_call,std::allocator<common_tool_call>> avStack_248 [8]; int8 uStack_240; int8 uStack_230; vector<common_chat_msg,std::allocator<common_chat_msg>> local_228 [8]; long alStack_220 [2]; int1 *local_210 [2]; int1 local_200 [16]; int1 *local_1f0 [2]; int1 local_1e0 [16]; int8 local_1d0; int8 uStack_1c8; int8 local_1c0; int1 *local_1b8 [2]; int1 local_1a8 [16]; int1 *local_198 [2]; int1 local_188 [16]; int1 *local_178 [2]; int1 local_168 [16]; int8 local_158; int8 uStack_150; int8 local_148; int1 *local_140 [2]; int1 local_130 [16]; int1 *local_120 [2]; int1 local_110 [16]; int1 *local_100 [2]; int1 local_f0 [16]; int8 local_e0; int8 uStack_d8; int8 local_d0; int1 *local_c8 [2]; int1 local_b8 [16]; int1 *local_a8 [2]; int1 local_98 [16]; int1 *local_88 [2]; int1 local_78 [16]; int8 local_68; int8 uStack_60; int8 local_58; int1 *local_50 [2]; int1 local_40 [16]; local_210[0] = local_200; /* try { // try from 0017c260 to 0017c277 has its CatchHandler @ 0017c703 */ uStack_240 = 0x17c278; std::__cxx11::string::_M_construct<char_const*>(local_210,"system",""); local_1f0[0] = local_1e0; /* try { // try from 0017c286 to 0017c298 has its CatchHandler @ 0017c6f4 */ uStack_240 = 0x17c299; std::__cxx11::string::_M_construct<char_const*>(local_1f0,"You are a helpful assistant",""); local_1b8[0] = local_1a8; local_1d0 = 0; uStack_1c8 = 0; local_1c0 = 0; /* try { // try from 0017c2c1 to 0017c2cf has its CatchHandler @ 0017c6ca */ uStack_240 = 0x17c2d0; std::__cxx11::string::_M_construct<char_const*>(local_1b8,""); local_198[0] = local_188; /* try { // try from 0017c2e4 to 0017c2f9 has its CatchHandler @ 0017c6a0 */ uStack_240 = 0x17c2fa; std::__cxx11::string::_M_construct<char_const*>(local_198,&DAT_001f745c,&DAT_001f7460); local_178[0] = local_168; /* try { // try from 0017c30e to 0017c320 has its CatchHandler @ 0017c66b */ uStack_240 = 0x17c321; std::__cxx11::string::_M_construct<char_const*>(local_178,"Hello",""); local_140[0] = local_130; local_158 = 0; uStack_150 = 0; local_148 = 0; /* try { // try from 0017c34c to 0017c35a has its CatchHandler @ 0017c63e */ uStack_240 = 0x17c35b; std::__cxx11::string::_M_construct<char_const*>(local_140,""); local_120[0] = local_110; /* try { // try from 0017c36f to 0017c384 has its CatchHandler @ 0017c633 */ uStack_240 = 0x17c385; std::__cxx11::string::_M_construct<char_const*>(local_120,"assistant",""); local_100[0] = local_f0; /* try { // try from 0017c399 to 0017c3ab has its CatchHandler @ 0017c5fe */ uStack_240 = 0x17c3ac; std::__cxx11::string::_M_construct<char_const*>(local_100,"Hi there",""); local_c8[0] = local_b8; local_e0 = 0; uStack_d8 = 0; local_d0 = 0; /* try { // try from 0017c3d7 to 0017c3e5 has its CatchHandler @ 0017c5d1 */ uStack_240 = 0x17c3e6; std::__cxx11::string::_M_construct<char_const*>(local_c8,""); local_a8[0] = local_98; /* try { // try from 0017c3fa to 0017c40f has its CatchHandler @ 0017c5c6 */ uStack_240 = 0x17c410; std::__cxx11::string::_M_construct<char_const*>(local_a8,&DAT_001f745c,&DAT_001f7460); local_88[0] = local_78; /* try { // try from 0017c424 to 0017c436 has its CatchHandler @ 0017c594 */ uStack_240 = 0x17c437; std::__cxx11::string::_M_construct<char_const*>(local_88,"How are you?",""); local_50[0] = local_40; local_68 = 0; uStack_60 = 0; local_58 = 0; /* try { // try from 0017c462 to 0017c470 has its CatchHandler @ 0017c567 */ uStack_240 = 0x17c471; std::__cxx11::string::_M_construct<char_const*>(local_50,""); /* try { // try from 0017c471 to 0017c489 has its CatchHandler @ 0017c544 */ uStack_240 = 0x17c48a; std::vector<common_chat_msg,std::allocator<common_chat_msg>>::vector (local_228,local_210,4,(long)&uStack_230 + 7); lVar3 = 0x1e0; do { if ((long *)((long)alStack_220 + lVar3) != *(long **)((long)&uStack_230 + lVar3)) { uStack_240 = 0x17c4ac; operator_delete(*(long **)((long)&uStack_230 + lVar3),*(long *)((long)alStack_220 + lVar3) + 1 ); } uStack_240 = 0x17c4bc; std::vector<common_tool_call,std::allocator<common_tool_call>>::~vector(avStack_248 + lVar3); plVar2 = *(long **)((long)alStack_288 + lVar3 + 0x20); plVar1 = (long *)((long)alStack_288 + lVar3 + 0x30); if (plVar1 != plVar2) { uStack_240 = 0x17c4d8; operator_delete(plVar2,*plVar1 + 1); } plVar2 = (long *)((long)alStack_288 + lVar3 + 0x10); if (plVar2 != *(long **)((long)alStack_288 + lVar3)) { uStack_240 = 0x17c4f4; operator_delete(*(long **)((long)alStack_288 + lVar3),*plVar2 + 1); } lVar3 = lVar3 + -0x78; } while (lVar3 != 0); /* try { // try from 0017c4fa to 0017c512 has its CatchHandler @ 0017c532 */ uStack_240 = 0x17c513; common_chat_apply_template_abi_cxx11_ (param_1,(vector *)CONCAT71(in_register_00000031,param_2),SUB81(local_228,0),true); uStack_240 = 0x17c51d; std::vector<common_chat_msg,std::allocator<common_chat_msg>>::~vector(local_228); return param_1; }
4,615
ma_tls_write_async
eloqsql/libmariadb/libmariadb/secure/openssl.c
ssize_t ma_tls_write_async(MARIADB_PVIO *pvio, const unsigned char *buffer, size_t length) { int res; struct mysql_async_context *b= pvio->mysql->options.extension->async_context; MARIADB_TLS *ctls= pvio->ctls; for (;;) { res= SSL_write((SSL *)ctls->ssl, (void *)buffer, (int)length); if (ma_tls_async_check_result(res, b, (SSL *)ctls->ssl)) return res; } }
O0
c
ma_tls_write_async: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movq 0x40(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x28(%rbp) movq -0x8(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq 0x10(%rax), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rax movl %eax, %edx callq 0x36510 movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %edi movq -0x28(%rbp), %rsi movq -0x30(%rbp), %rax movq 0x10(%rax), %rdx callq 0x5b1f0 cmpb $0x0, %al je 0x5b333 movslq -0x1c(%rbp), %rax addq $0x30, %rsp popq %rbp retq jmp 0x5b2f7 nopw %cs:(%rax,%rax)
ma_tls_write_async: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov rax, [rax+40h] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_28], rax mov rax, [rbp+var_8] mov rax, [rax+38h] mov [rbp+var_30], rax loc_5B2F7: mov rax, [rbp+var_30] mov rdi, [rax+10h] mov rsi, [rbp+var_10] mov rax, [rbp+var_18] mov edx, eax call _SSL_write mov [rbp+var_1C], eax mov edi, [rbp+var_1C] mov rsi, [rbp+var_28] mov rax, [rbp+var_30] mov rdx, [rax+10h] call ma_tls_async_check_result cmp al, 0 jz short loc_5B333 movsxd rax, [rbp+var_1C] add rsp, 30h pop rbp retn loc_5B333: jmp short loc_5B2F7
long long ma_tls_write_async(long long a1, long long a2, unsigned int a3) { long long v4; // [rsp+0h] [rbp-30h] long long v5; // [rsp+8h] [rbp-28h] int v6; // [rsp+14h] [rbp-1Ch] v5 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) + 40LL); v4 = *(_QWORD *)(a1 + 56); do v6 = SSL_write(*(_QWORD *)(v4 + 16), a2, a3); while ( !ma_tls_async_check_result(v6, v5, *(_QWORD *)(v4 + 16)) ); return v6; }
ma_tls_write_async: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x30],RAX LAB_0015b2f7: MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RAX + 0x10] MOV RSI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV EDX,EAX CALL 0x00136510 MOV dword ptr [RBP + -0x1c],EAX MOV EDI,dword ptr [RBP + -0x1c] MOV RSI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RAX + 0x10] CALL 0x0015b1f0 CMP AL,0x0 JZ 0x0015b333 MOVSXD RAX,dword ptr [RBP + -0x1c] ADD RSP,0x30 POP RBP RET LAB_0015b333: JMP 0x0015b2f7
long ma_tls_write_async(long param_1,void *param_2,int param_3) { int8 uVar1; long lVar2; char cVar3; int iVar4; uVar1 = *(int8 *)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28); lVar2 = *(long *)(param_1 + 0x38); do { iVar4 = SSL_write(*(SSL **)(lVar2 + 0x10),param_2,param_3); cVar3 = ma_tls_async_check_result(iVar4,uVar1,*(int8 *)(lVar2 + 0x10)); } while (cVar3 == '\0'); return (long)iVar4; }
4,616
void google::protobuf::internal::RepeatedPtrFieldBase::Destroy<google::protobuf::internal::GenericTypeHandler<google::protobuf::Message>>()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/repeated_ptr_field.h
void Destroy() { if (rep_ != nullptr && arena_ == nullptr) { int n = rep_->allocated_size; void* const* elements = rep_->elements; for (int i = 0; i < n; i++) { TypeHandler::Delete(cast<TypeHandler>(elements[i]), nullptr); } const size_t size = total_size_ * sizeof(elements[0]) + kRepHeaderSize; internal::SizedDelete(rep_, size); } rep_ = nullptr; }
O0
c
void google::protobuf::internal::RepeatedPtrFieldBase::Destroy<google::protobuf::internal::GenericTypeHandler<google::protobuf::Message>>(): subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x8(%rsp) cmpq $0x0, 0x10(%rax) je 0x1c5557 movq 0x8(%rsp), %rax cmpq $0x0, (%rax) jne 0x1c5557 movq 0x8(%rsp), %rax movq 0x10(%rax), %rcx movl (%rcx), %ecx movl %ecx, 0x2c(%rsp) movq 0x10(%rax), %rax addq $0x8, %rax movq %rax, 0x20(%rsp) movl $0x0, 0x1c(%rsp) movl 0x1c(%rsp), %eax cmpl 0x2c(%rsp), %eax jge 0x1c5533 movq 0x20(%rsp), %rax movslq 0x1c(%rsp), %rcx movq (%rax,%rcx,8), %rdi callq 0x1c4410 movq %rax, %rdi xorl %eax, %eax movl %eax, %esi callq 0x1c5690 movl 0x1c(%rsp), %eax addl $0x1, %eax movl %eax, 0x1c(%rsp) jmp 0x1c54fd movq 0x8(%rsp), %rax movslq 0xc(%rax), %rcx shlq $0x3, %rcx addq $0x8, %rcx movq %rcx, 0x10(%rsp) movq 0x10(%rax), %rdi movq 0x10(%rsp), %rsi callq 0x168dc0 movq 0x8(%rsp), %rax movq $0x0, 0x10(%rax) addq $0x38, %rsp retq nopl (%rax)
_ZN6google8protobuf8internal20RepeatedPtrFieldBase7DestroyINS1_18GenericTypeHandlerINS0_7MessageEEEEEvv: sub rsp, 38h mov [rsp+38h+var_8], rdi mov rax, [rsp+38h+var_8] mov [rsp+38h+var_30], rax cmp qword ptr [rax+10h], 0 jz loc_1C5557 mov rax, [rsp+38h+var_30] cmp qword ptr [rax], 0 jnz short loc_1C5557 mov rax, [rsp+38h+var_30] mov rcx, [rax+10h] mov ecx, [rcx] mov [rsp+38h+var_C], ecx mov rax, [rax+10h] add rax, 8 mov [rsp+38h+var_18], rax mov [rsp+38h+var_1C], 0 loc_1C54FD: mov eax, [rsp+38h+var_1C] cmp eax, [rsp+38h+var_C] jge short loc_1C5533 mov rax, [rsp+38h+var_18] movsxd rcx, [rsp+38h+var_1C] mov rdi, [rax+rcx*8] call _ZN6google8protobuf8internal20RepeatedPtrFieldBase4castINS1_18GenericTypeHandlerINS0_7MessageEEEEEPNT_4TypeEPv; google::protobuf::internal::RepeatedPtrFieldBase::cast<google::protobuf::internal::GenericTypeHandler<google::protobuf::Message>>(void *) mov rdi, rax xor eax, eax mov esi, eax call _ZN6google8protobuf8internal18GenericTypeHandlerINS0_7MessageEE6DeleteEPS3_PNS0_5ArenaE; google::protobuf::internal::GenericTypeHandler<google::protobuf::Message>::Delete(google::protobuf::Message*,google::protobuf::Arena *) mov eax, [rsp+38h+var_1C] add eax, 1 mov [rsp+38h+var_1C], eax jmp short loc_1C54FD loc_1C5533: mov rax, [rsp+38h+var_30] movsxd rcx, dword ptr [rax+0Ch] shl rcx, 3 add rcx, 8 mov [rsp+38h+var_28], rcx mov rdi, [rax+10h]; this mov rsi, [rsp+38h+var_28]; void * call _ZN6google8protobuf8internal11SizedDeleteEPvm; google::protobuf::internal::SizedDelete(void *,ulong) loc_1C5557: mov rax, [rsp+38h+var_30] mov qword ptr [rax+10h], 0 add rsp, 38h retn
long long google::protobuf::internal::RepeatedPtrFieldBase::Destroy<google::protobuf::internal::GenericTypeHandler<google::protobuf::Message>>( long long a1) { long long v1; // rax long long result; // rax int i; // [rsp+1Ch] [rbp-1Ch] long long v4; // [rsp+20h] [rbp-18h] int v5; // [rsp+2Ch] [rbp-Ch] if ( *(_QWORD *)(a1 + 16) && !*(_QWORD *)a1 ) { v5 = **(_DWORD **)(a1 + 16); v4 = *(_QWORD *)(a1 + 16) + 8LL; for ( i = 0; i < v5; ++i ) { v1 = google::protobuf::internal::RepeatedPtrFieldBase::cast<google::protobuf::internal::GenericTypeHandler<google::protobuf::Message>>(*(_QWORD *)(v4 + 8LL * i)); google::protobuf::internal::GenericTypeHandler<google::protobuf::Message>::Delete(v1, 0LL); } google::protobuf::internal::SizedDelete( *(google::protobuf::internal **)(a1 + 16), (void *)(8LL * *(int *)(a1 + 12) + 8)); } result = a1; *(_QWORD *)(a1 + 16) = 0LL; return result; }
4,617
void google::protobuf::internal::RepeatedPtrFieldBase::Destroy<google::protobuf::internal::GenericTypeHandler<google::protobuf::Message>>()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/repeated_ptr_field.h
void Destroy() { if (rep_ != nullptr && arena_ == nullptr) { int n = rep_->allocated_size; void* const* elements = rep_->elements; for (int i = 0; i < n; i++) { TypeHandler::Delete(cast<TypeHandler>(elements[i]), nullptr); } const size_t size = total_size_ * sizeof(elements[0]) + kRepHeaderSize; internal::SizedDelete(rep_, size); } rep_ = nullptr; }
O3
c
void google::protobuf::internal::RepeatedPtrFieldBase::Destroy<google::protobuf::internal::GenericTypeHandler<google::protobuf::Message>>(): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x10(%rdi), %r14 testq %r14, %r14 je 0x9d6af cmpq $0x0, (%rbx) jne 0x9d6af movslq (%r14), %r15 testq %r15, %r15 jle 0x9d6a7 xorl %r12d, %r12d movq 0x8(%r14,%r12,8), %rdi testq %rdi, %rdi je 0x9d69b movq (%rdi), %rax callq *0x8(%rax) incq %r12 cmpq %r12, %r15 jne 0x9d68b movq 0x10(%rbx), %r14 movq %r14, %rdi callq 0x2d160 movq $0x0, 0x10(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
_ZN6google8protobuf8internal20RepeatedPtrFieldBase7DestroyINS0_16RepeatedPtrFieldINS0_7MessageEE11TypeHandlerEEEvv: push r15 push r14 push r12 push rbx push rax mov rbx, rdi mov r14, [rdi+10h] test r14, r14 jz short loc_9D6AF cmp qword ptr [rbx], 0 jnz short loc_9D6AF movsxd r15, dword ptr [r14] test r15, r15 jle short loc_9D6A7 xor r12d, r12d loc_9D68B: mov rdi, [r14+r12*8+8] test rdi, rdi jz short loc_9D69B mov rax, [rdi] call qword ptr [rax+8] loc_9D69B: inc r12 cmp r15, r12 jnz short loc_9D68B mov r14, [rbx+10h] loc_9D6A7: mov rdi, r14; void * call __ZdlPv; operator delete(void *) loc_9D6AF: mov qword ptr [rbx+10h], 0 add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
void google::protobuf::internal::RepeatedPtrFieldBase::Destroy<google::protobuf::RepeatedPtrField<google::protobuf::Message>::TypeHandler>( _QWORD *a1) { int *v2; // r14 long long v3; // r15 long long i; // r12 long long v5; // rdi v2 = (int *)a1[2]; if ( v2 && !*a1 ) { v3 = *v2; if ( v3 > 0 ) { for ( i = 0LL; i != v3; ++i ) { v5 = *(_QWORD *)&v2[2 * i + 2]; if ( v5 ) (*(void ( **)(long long))(*(_QWORD *)v5 + 8LL))(v5); } v2 = (int *)a1[2]; } operator delete(v2); } a1[2] = 0LL; }
Destroy<google::protobuf::RepeatedPtrField<google::protobuf::Message>::TypeHandler>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV R14,qword ptr [RDI + 0x10] TEST R14,R14 JZ 0x0019d6af CMP qword ptr [RBX],0x0 JNZ 0x0019d6af MOVSXD R15,dword ptr [R14] TEST R15,R15 JLE 0x0019d6a7 XOR R12D,R12D LAB_0019d68b: MOV RDI,qword ptr [R14 + R12*0x8 + 0x8] TEST RDI,RDI JZ 0x0019d69b MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0019d69b: INC R12 CMP R15,R12 JNZ 0x0019d68b MOV R14,qword ptr [RBX + 0x10] LAB_0019d6a7: MOV RDI,R14 CALL 0x0012d160 LAB_0019d6af: MOV qword ptr [RBX + 0x10],0x0 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* void google::protobuf::internal::RepeatedPtrFieldBase::Destroy<google::protobuf::RepeatedPtrField<google::protobuf::Message>::TypeHandler>() */ void __thiscall google::protobuf::internal::RepeatedPtrFieldBase:: Destroy<google::protobuf::RepeatedPtrField<google::protobuf::Message>::TypeHandler> (RepeatedPtrFieldBase *this) { int iVar1; long lVar2; int *piVar3; piVar3 = *(int **)(this + 0x10); if ((piVar3 != (int *)0x0) && (*(long *)this == 0)) { iVar1 = *piVar3; if (0 < (long)iVar1) { lVar2 = 0; do { if (*(long **)(piVar3 + lVar2 * 2 + 2) != (long *)0x0) { (**(code **)(**(long **)(piVar3 + lVar2 * 2 + 2) + 8))(); } lVar2 = lVar2 + 1; } while (iVar1 != lVar2); piVar3 = *(int **)(this + 0x10); } operator_delete(piVar3); } *(int8 *)(this + 0x10) = 0; return; }
4,618
my_xml_parse
eloqsql/strings/xml.c
int my_xml_parse(MY_XML_PARSER *p,const char *str, size_t len) { my_xml_attr_rewind(p); p->beg=str; p->cur=str; p->end=str+len; while ( p->cur < p->end ) { MY_XML_ATTR a; if (p->cur[0] == '<') { int lex; int question=0; int exclam=0; lex=my_xml_scan(p,&a); if (MY_XML_COMMENT == lex) continue; if (lex == MY_XML_CDATA) { a.beg+= 9; a.end-= 3; my_xml_value(p, a.beg, (size_t) (a.end-a.beg)); continue; } lex=my_xml_scan(p,&a); if (MY_XML_SLASH == lex) { if (MY_XML_IDENT != (lex=my_xml_scan(p,&a))) { sprintf(p->errstr,"%s unexpected (ident wanted)",lex2str(lex)); return MY_XML_ERROR; } if (MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg))) return MY_XML_ERROR; lex=my_xml_scan(p,&a); goto gt; } if (MY_XML_EXCLAM == lex) { lex=my_xml_scan(p,&a); exclam=1; } else if (MY_XML_QUESTION == lex) { lex=my_xml_scan(p,&a); question=1; } if (MY_XML_IDENT == lex) { p->current_node_type= MY_XML_NODE_TAG; if (MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg))) return MY_XML_ERROR; } else { sprintf(p->errstr,"%s unexpected (ident or '/' wanted)", lex2str(lex)); return MY_XML_ERROR; } while ((MY_XML_IDENT == (lex=my_xml_scan(p,&a))) || ((MY_XML_STRING == lex && exclam))) { MY_XML_ATTR b; if (MY_XML_EQ == (lex=my_xml_scan(p,&b))) { lex=my_xml_scan(p,&b); if ( (lex == MY_XML_IDENT) || (lex == MY_XML_STRING) ) { p->current_node_type= MY_XML_NODE_ATTR; if ((MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg))) || (MY_XML_OK != my_xml_value(p,b.beg,(size_t) (b.end-b.beg))) || (MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg)))) return MY_XML_ERROR; } else { sprintf(p->errstr,"%s unexpected (ident or string wanted)", lex2str(lex)); return MY_XML_ERROR; } } else if (MY_XML_IDENT == lex) { p->current_node_type= MY_XML_NODE_ATTR; if ((MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg))) || (MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg)))) return MY_XML_ERROR; } else if ((MY_XML_STRING == lex) && exclam) { /* We are in <!DOCTYPE>, e.g. <!DOCTYPE name SYSTEM "SystemLiteral"> <!DOCTYPE name PUBLIC "PublidLiteral" "SystemLiteral"> Just skip "SystemLiteral" and "PublicidLiteral" */ } else break; } if (lex == MY_XML_SLASH) { if (MY_XML_OK != my_xml_leave(p,NULL,0)) return MY_XML_ERROR; lex=my_xml_scan(p,&a); } gt: if (question) { if (lex != MY_XML_QUESTION) { sprintf(p->errstr,"%s unexpected ('?' wanted)",lex2str(lex)); return MY_XML_ERROR; } if (MY_XML_OK != my_xml_leave(p,NULL,0)) return MY_XML_ERROR; lex=my_xml_scan(p,&a); } if (exclam) { if (MY_XML_OK != my_xml_leave(p,NULL,0)) return MY_XML_ERROR; } if (lex != MY_XML_GT) { sprintf(p->errstr,"%s unexpected ('>' wanted)",lex2str(lex)); return MY_XML_ERROR; } } else { a.beg=p->cur; for ( ; (p->cur < p->end) && (p->cur[0] != '<') ; p->cur++); a.end=p->cur; if (!(p->flags & MY_XML_FLAG_SKIP_TEXT_NORMALIZATION)) my_xml_norm_text(&a); if (a.beg != a.end) { my_xml_value(p,a.beg,(size_t) (a.end-a.beg)); } } } if (p->attr.start[0]) { sprintf(p->errstr,"unexpected END-OF-INPUT"); return MY_XML_ERROR; } return MY_XML_OK; }
O3
c
my_xml_parse: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movq 0x118(%rdi), %rcx movq %rcx, 0x120(%rdi) movq %rsi, 0x128(%rdi) movq %rsi, 0x130(%rdi) leaq (%rsi,%rdx), %rax movq %rax, 0x138(%rdi) testq %rdx, %rdx jle 0x7a4a5 leaq -0x40(%rbp), %r15 cmpb $0x3c, (%rsi) jne 0x7a1e7 movq %rbx, %rdi movq %r15, %rsi callq 0x7a56f cmpl $0x43, %eax je 0x7a487 cmpl $0x44, %eax jne 0x7a24c movq 0x150(%rbx), %rax testq %rax, %rax je 0x7a487 movq -0x40(%rbp), %rsi movq -0x38(%rbp), %rdx addq $0x9, %rsi subq %rsi, %rdx addq $-0x3, %rdx jmp 0x7a242 movq %rsi, -0x40(%rbp) movq %rsi, %rdx cmpq %rax, %rsi jae 0x7a20d subq %rsi, %rax movq %rsi, %rdx cmpb $0x3c, (%rdx) je 0x7a20d incq %rdx movq %rdx, 0x130(%rbx) decq %rax jne 0x7a1f9 movq %rdx, -0x38(%rbp) testb $0x2, (%rbx) jne 0x7a226 movq %r15, %rdi callq 0x7aba7 movq -0x40(%rbp), %rsi movq -0x38(%rbp), %rdx cmpq %rdx, %rsi je 0x7a487 movq 0x150(%rbx), %rax testq %rax, %rax je 0x7a487 subq %rsi, %rdx movq %rbx, %rdi callq *%rax jmp 0x7a487 movq %rbx, %rdi movq %r15, %rsi callq 0x7a56f cmpl $0x2f, %eax jne 0x7a29e movq %rbx, %rdi movq %r15, %rsi callq 0x7a56f cmpl $0x49, %eax jne 0x7a505 movq -0x40(%rbp), %rsi movq -0x38(%rbp), %rdx subq %rsi, %rdx movq %rbx, %rdi callq 0x7a86d testl %eax, %eax jne 0x7a557 movq %rbx, %rdi movq %r15, %rsi callq 0x7a56f movl %eax, %r13d jmp 0x7a481 movl %eax, %r14d cmpl $0x21, %eax sete %r12b cmpl $0x3f, %eax je 0x7a2b3 cmpl $0x21, %r14d jne 0x7a2c0 movq %rbx, %rdi movq %r15, %rsi callq 0x7a56f jmp 0x7a2c6 movb $0x1, %r12b movl %r14d, %eax cmpl $0x49, %eax jne 0x7a4f1 movl $0x0, 0x4(%rbx) movq -0x40(%rbp), %rsi movq -0x38(%rbp), %rdx subq %rsi, %rdx movq %rbx, %rdi callq 0x7aa30 testl %eax, %eax jne 0x7a557 movb %r12b, -0x29(%rbp) movl %r14d, %r12d xorl $0x21, %r12d movq %rbx, %rdi movq %r15, %rsi callq 0x7a56f movl %eax, %r13d xorl $0x53, %eax orl %r12d, %eax sete %al cmpl $0x49, %r13d je 0x7a321 testb %al, %al je 0x7a40a movq %rbx, %rdi leaq -0x50(%rbp), %rsi callq 0x7a56f cmpl $0x49, %eax je 0x7a3af movl %eax, %r13d cmpl $0x3d, %eax jne 0x7a3ee movq %rbx, %rdi leaq -0x50(%rbp), %rsi callq 0x7a56f cmpl $0x53, %eax je 0x7a358 cmpl $0x49, %eax jne 0x7a519 movl $0x1, 0x4(%rbx) movq -0x40(%rbp), %r13 movq -0x38(%rbp), %r15 subq %r13, %r15 movq %rbx, %rdi movq %r13, %rsi movq %r15, %rdx callq 0x7aa30 testl %eax, %eax jne 0x7a557 movq 0x150(%rbx), %rax testq %rax, %rax je 0x7a3a4 movq -0x50(%rbp), %rsi movq -0x48(%rbp), %rdx subq %rsi, %rdx movq %rbx, %rdi callq *%rax testl %eax, %eax jne 0x7a557 movq %rbx, %rdi movq %r13, %rsi movq %r15, %rdx jmp 0x7a3e0 movl $0x1, 0x4(%rbx) movq -0x40(%rbp), %r15 movq -0x38(%rbp), %r13 subq %r15, %r13 movq %rbx, %rdi movq %r15, %rsi movq %r13, %rdx callq 0x7aa30 testl %eax, %eax jne 0x7a557 movq %rbx, %rdi movq %r15, %rsi movq %r13, %rdx callq 0x7a86d testl %eax, %eax je 0x7a3fa jmp 0x7a557 cmpl $0x21, %r14d jne 0x7a406 cmpl $0x53, %r13d jne 0x7a406 movq %rbx, %rdi leaq -0x40(%rbp), %r15 jmp 0x7a2ff leaq -0x40(%rbp), %r15 cmpl $0x2f, %r13d movb -0x29(%rbp), %r12b jne 0x7a436 movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x7a86d testl %eax, %eax jne 0x7a557 movq %rbx, %rdi movq %r15, %rsi callq 0x7a56f movl %eax, %r13d testb %r12b, %r12b jne 0x7a467 cmpl $0x3f, %r13d jne 0x7a52d movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x7a86d testl %eax, %eax jne 0x7a557 movq %rbx, %rdi movq %r15, %rsi callq 0x7a56f movl %eax, %r13d cmpl $0x21, %r14d jne 0x7a481 movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x7a86d testl %eax, %eax jne 0x7a557 cmpl $0x3e, %r13d jne 0x7a4dc movq 0x130(%rbx), %rsi movq 0x138(%rbx), %rax cmpq %rax, %rsi jb 0x7a1a0 movq 0x118(%rbx), %rcx cmpb $0x0, (%rcx) je 0x7a4d4 addq $0x8, %rbx leaq 0x6674(%rip), %rcx # 0x80b29 movl $0x1, %r14d movl $0x80, %edx movq %rbx, %rdi movl $0x1, %esi xorl %eax, %eax callq 0x26200 jmp 0x7a55d xorl %r14d, %r14d jmp 0x7a55d addq $0x8, %rbx movl %r13d, %edi callq 0x7a7d2 leaq 0x661f(%rip), %rcx # 0x80b0e jmp 0x7a540 addq $0x8, %rbx movl %eax, %edi callq 0x7a7d2 leaq 0x65a5(%rip), %rcx # 0x80aa8 jmp 0x7a540 addq $0x8, %rbx movl %eax, %edi callq 0x7a7d2 leaq 0x6574(%rip), %rcx # 0x80a8b jmp 0x7a540 addq $0x8, %rbx movl %eax, %edi callq 0x7a7d2 leaq 0x65a1(%rip), %rcx # 0x80acc jmp 0x7a540 addq $0x8, %rbx movl %r13d, %edi callq 0x7a7d2 leaq 0x65b3(%rip), %rcx # 0x80af3 movl $0x80, %edx movq %rbx, %rdi movl $0x1, %esi movq %rax, %r8 xorl %eax, %eax callq 0x26200 movl $0x1, %r14d movl %r14d, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_xml_parse: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdi mov rcx, [rdi+118h] mov [rdi+120h], rcx mov [rdi+128h], rsi mov [rdi+130h], rsi lea rax, [rsi+rdx] mov [rdi+138h], rax test rdx, rdx jle loc_7A4A5 lea r15, [rbp+var_40] loc_7A1A0: cmp byte ptr [rsi], 3Ch ; '<' jnz short loc_7A1E7 mov rdi, rbx mov rsi, r15 call my_xml_scan cmp eax, 43h ; 'C' jz loc_7A487 cmp eax, 44h ; 'D' jnz loc_7A24C mov rax, [rbx+150h] test rax, rax jz loc_7A487 mov rsi, [rbp+var_40] mov rdx, [rbp+var_38] add rsi, 9 sub rdx, rsi add rdx, 0FFFFFFFFFFFFFFFDh jmp short loc_7A242 loc_7A1E7: mov [rbp+var_40], rsi mov rdx, rsi cmp rsi, rax jnb short loc_7A20D sub rax, rsi mov rdx, rsi loc_7A1F9: cmp byte ptr [rdx], 3Ch ; '<' jz short loc_7A20D inc rdx mov [rbx+130h], rdx dec rax jnz short loc_7A1F9 loc_7A20D: mov [rbp+var_38], rdx test byte ptr [rbx], 2 jnz short loc_7A226 mov rdi, r15 call my_xml_norm_text mov rsi, [rbp+var_40] mov rdx, [rbp+var_38] loc_7A226: cmp rsi, rdx jz loc_7A487 mov rax, [rbx+150h] test rax, rax jz loc_7A487 sub rdx, rsi loc_7A242: mov rdi, rbx call rax jmp loc_7A487 loc_7A24C: mov rdi, rbx mov rsi, r15 call my_xml_scan cmp eax, 2Fh ; '/' jnz short loc_7A29E mov rdi, rbx mov rsi, r15 call my_xml_scan cmp eax, 49h ; 'I' jnz loc_7A505 mov rsi, [rbp+var_40] mov rdx, [rbp+var_38] sub rdx, rsi mov rdi, rbx call my_xml_leave test eax, eax jnz loc_7A557 mov rdi, rbx mov rsi, r15 call my_xml_scan mov r13d, eax jmp loc_7A481 loc_7A29E: mov r14d, eax cmp eax, 21h ; '!' setz r12b cmp eax, 3Fh ; '?' jz short loc_7A2B3 cmp r14d, 21h ; '!' jnz short loc_7A2C0 loc_7A2B3: mov rdi, rbx mov rsi, r15 call my_xml_scan jmp short loc_7A2C6 loc_7A2C0: mov r12b, 1 mov eax, r14d loc_7A2C6: cmp eax, 49h ; 'I' jnz loc_7A4F1 mov dword ptr [rbx+4], 0 mov rsi, [rbp+var_40] mov rdx, [rbp+var_38] sub rdx, rsi mov rdi, rbx call my_xml_enter test eax, eax jnz loc_7A557 mov [rbp+var_29], r12b mov r12d, r14d xor r12d, 21h mov rdi, rbx loc_7A2FF: mov rsi, r15 call my_xml_scan mov r13d, eax xor eax, 53h or eax, r12d setz al cmp r13d, 49h ; 'I' jz short loc_7A321 test al, al jz loc_7A40A loc_7A321: mov rdi, rbx lea rsi, [rbp+var_50] call my_xml_scan cmp eax, 49h ; 'I' jz short loc_7A3AF mov r13d, eax cmp eax, 3Dh ; '=' jnz loc_7A3EE mov rdi, rbx lea rsi, [rbp+var_50] call my_xml_scan cmp eax, 53h ; 'S' jz short loc_7A358 cmp eax, 49h ; 'I' jnz loc_7A519 loc_7A358: mov dword ptr [rbx+4], 1 mov r13, [rbp+var_40] mov r15, [rbp+var_38] sub r15, r13 mov rdi, rbx mov rsi, r13 mov rdx, r15 call my_xml_enter test eax, eax jnz loc_7A557 mov rax, [rbx+150h] test rax, rax jz short loc_7A3A4 mov rsi, [rbp+var_50] mov rdx, [rbp+var_48] sub rdx, rsi mov rdi, rbx call rax test eax, eax jnz loc_7A557 loc_7A3A4: mov rdi, rbx mov rsi, r13 mov rdx, r15 jmp short loc_7A3E0 loc_7A3AF: mov dword ptr [rbx+4], 1 mov r15, [rbp+var_40] mov r13, [rbp+var_38] sub r13, r15 mov rdi, rbx mov rsi, r15 mov rdx, r13 call my_xml_enter test eax, eax jnz loc_7A557 mov rdi, rbx mov rsi, r15 mov rdx, r13 loc_7A3E0: call my_xml_leave test eax, eax jz short loc_7A3FA jmp loc_7A557 loc_7A3EE: cmp r14d, 21h ; '!' jnz short loc_7A406 cmp r13d, 53h ; 'S' jnz short loc_7A406 loc_7A3FA: mov rdi, rbx lea r15, [rbp+var_40] jmp loc_7A2FF loc_7A406: lea r15, [rbp+var_40] loc_7A40A: cmp r13d, 2Fh ; '/' mov r12b, [rbp+var_29] jnz short loc_7A436 mov rdi, rbx xor esi, esi xor edx, edx call my_xml_leave test eax, eax jnz loc_7A557 mov rdi, rbx mov rsi, r15 call my_xml_scan mov r13d, eax loc_7A436: test r12b, r12b jnz short loc_7A467 cmp r13d, 3Fh ; '?' jnz loc_7A52D mov rdi, rbx xor esi, esi xor edx, edx call my_xml_leave test eax, eax jnz loc_7A557 mov rdi, rbx mov rsi, r15 call my_xml_scan mov r13d, eax loc_7A467: cmp r14d, 21h ; '!' jnz short loc_7A481 mov rdi, rbx xor esi, esi xor edx, edx call my_xml_leave test eax, eax jnz loc_7A557 loc_7A481: cmp r13d, 3Eh ; '>' jnz short loc_7A4DC loc_7A487: mov rsi, [rbx+130h] mov rax, [rbx+138h] cmp rsi, rax jb loc_7A1A0 mov rcx, [rbx+118h] loc_7A4A5: cmp byte ptr [rcx], 0 jz short loc_7A4D4 add rbx, 8 lea rcx, aUnexpectedEndO; "unexpected END-OF-INPUT" mov r14d, 1 mov edx, 80h mov rdi, rbx mov esi, 1 xor eax, eax call ___sprintf_chk jmp loc_7A55D loc_7A4D4: xor r14d, r14d jmp loc_7A55D loc_7A4DC: add rbx, 8 mov edi, r13d call lex2str lea rcx, aSUnexpectedWan; "%s unexpected ('>' wanted)" jmp short loc_7A540 loc_7A4F1: add rbx, 8 mov edi, eax call lex2str lea rcx, aSUnexpectedIde; "%s unexpected (ident or '/' wanted)" jmp short loc_7A540 loc_7A505: add rbx, 8 mov edi, eax call lex2str lea rcx, aSUnexpectedIde_0; "%s unexpected (ident wanted)" jmp short loc_7A540 loc_7A519: add rbx, 8 mov edi, eax call lex2str lea rcx, aSUnexpectedIde_1; "%s unexpected (ident or string wanted)" jmp short loc_7A540 loc_7A52D: add rbx, 8 mov edi, r13d call lex2str lea rcx, aSUnexpectedWan_0; "%s unexpected ('?' wanted)" loc_7A540: mov edx, 80h mov rdi, rbx mov esi, 1 mov r8, rax xor eax, eax call ___sprintf_chk loc_7A557: mov r14d, 1 loc_7A55D: mov eax, r14d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_xml_parse(long long a1, _BYTE *a2, long long a3) { _BYTE *v4; // rcx _BYTE *v5; // rax int v6; // eax void ( *v7)(long long, _BYTE *, long long); // rax long long v8; // rdx _BYTE *v9; // rdx long long v10; // rax unsigned int v11; // eax unsigned int v12; // eax unsigned int v13; // r13d unsigned int v14; // r14d bool v15; // r12 long long i; // rdi unsigned int v17; // eax unsigned int v18; // eax _BYTE *v19; // r13 long long v20; // r15 unsigned int ( *v21)(long long, _QWORD, _QWORD); // rax long long v22; // rdi _BYTE *v23; // rsi long long v24; // rdx _BYTE *v25; // r15 long long v26; // r13 bool v27; // r12 unsigned int v28; // r14d long long v29; // rax long long v30; // rax long long v31; // rax long long v32; // rax long long v33; // rax _QWORD v35[2]; // [rsp+0h] [rbp-50h] BYREF _BYTE *v36; // [rsp+10h] [rbp-40h] BYREF _BYTE *v37; // [rsp+18h] [rbp-38h] bool v38; // [rsp+27h] [rbp-29h] v4 = *(_BYTE **)(a1 + 280); *(_QWORD *)(a1 + 288) = v4; *(_QWORD *)(a1 + 296) = a2; *(_QWORD *)(a1 + 304) = a2; v5 = &a2[a3]; *(_QWORD *)(a1 + 312) = &a2[a3]; if ( a3 <= 0 ) goto LABEL_57; while ( *a2 != 60 ) { v36 = a2; v9 = a2; if ( a2 < v5 ) { v10 = v5 - a2; v9 = a2; do { if ( *v9 == 60 ) break; *(_QWORD *)(a1 + 304) = ++v9; --v10; } while ( v10 ); } v37 = v9; if ( (*(_BYTE *)a1 & 2) == 0 ) { my_xml_norm_text(&v36); a2 = v36; v9 = v37; } if ( a2 != v9 ) { v7 = *(void ( **)(long long, _BYTE *, long long))(a1 + 336); if ( v7 ) { v8 = v9 - a2; LABEL_16: v7(a1, a2, v8); } } LABEL_55: a2 = *(_BYTE **)(a1 + 304); v5 = *(_BYTE **)(a1 + 312); if ( a2 >= v5 ) { v4 = *(_BYTE **)(a1 + 280); LABEL_57: if ( *v4 ) { v28 = 1; __sprintf_chk(a1 + 8, 1LL, 128LL, "unexpected END-OF-INPUT"); } else { return 0; } return v28; } } v6 = my_xml_scan(a1, &v36); if ( v6 == 67 ) goto LABEL_55; if ( v6 == 68 ) { v7 = *(void ( **)(long long, _BYTE *, long long))(a1 + 336); if ( !v7 ) goto LABEL_55; a2 = v36 + 9; v8 = v37 - (v36 + 9) - 3; goto LABEL_16; } v11 = my_xml_scan(a1, &v36); if ( v11 == 47 ) { v12 = my_xml_scan(a1, &v36); if ( v12 == 73 ) { if ( !(unsigned int)my_xml_leave(a1, v36, v37 - v36) ) { v13 = my_xml_scan(a1, &v36); goto LABEL_54; } } else { v31 = lex2str(v12); __sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident wanted)", v31); } return 1; } v14 = v11; v15 = v11 == 33; if ( v11 == 63 || v11 == 33 ) v11 = my_xml_scan(a1, &v36); else v15 = 1; if ( v11 != 73 ) { v30 = lex2str(v11); __sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident or '/' wanted)", v30); return 1; } *(_DWORD *)(a1 + 4) = 0; if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) ) return 1; v38 = v15; for ( i = a1; ; i = a1 ) { v13 = my_xml_scan(i, &v36); if ( v13 != 73 ) { if ( v14 ^ 0x21 | v13 ^ 0x53 ) break; } v17 = my_xml_scan(a1, v35); if ( v17 == 73 ) { *(_DWORD *)(a1 + 4) = 1; v25 = v36; v26 = v37 - v36; if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) ) return 1; v22 = a1; v23 = v25; v24 = v26; LABEL_40: if ( (unsigned int)my_xml_leave(v22, v23, v24) ) return 1; continue; } v13 = v17; if ( v17 == 61 ) { v18 = my_xml_scan(a1, v35); if ( v18 != 83 && v18 != 73 ) { v32 = lex2str(v18); __sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident or string wanted)", v32); return 1; } *(_DWORD *)(a1 + 4) = 1; v19 = v36; v20 = v37 - v36; if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) ) return 1; v21 = *(unsigned int ( **)(long long, _QWORD, _QWORD))(a1 + 336); if ( v21 ) { if ( v21(a1, v35[0], v35[1] - v35[0]) ) return 1; } v22 = a1; v23 = v19; v24 = v20; goto LABEL_40; } if ( v14 != 33 || v17 != 83 ) break; } v27 = v38; if ( v13 == 47 ) { if ( (unsigned int)my_xml_leave(a1, 0LL, 0LL) ) return 1; v13 = my_xml_scan(a1, &v36); } if ( v27 ) goto LABEL_52; if ( v13 == 63 ) { if ( (unsigned int)my_xml_leave(a1, 0LL, 0LL) ) return 1; v13 = my_xml_scan(a1, &v36); LABEL_52: if ( v14 != 33 || !(unsigned int)my_xml_leave(a1, 0LL, 0LL) ) { LABEL_54: if ( v13 == 62 ) goto LABEL_55; v29 = lex2str(v13); __sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected ('>' wanted)", v29); } } else { v33 = lex2str(v13); __sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected ('?' wanted)", v33); } return 1; }
my_xml_parse: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV RCX,qword ptr [RDI + 0x118] MOV qword ptr [RDI + 0x120],RCX MOV qword ptr [RDI + 0x128],RSI MOV qword ptr [RDI + 0x130],RSI LEA RAX,[RSI + RDX*0x1] MOV qword ptr [RDI + 0x138],RAX TEST RDX,RDX JLE 0x0017a4a5 LEA R15,[RBP + -0x40] LAB_0017a1a0: CMP byte ptr [RSI],0x3c JNZ 0x0017a1e7 MOV RDI,RBX MOV RSI,R15 CALL 0x0017a56f CMP EAX,0x43 JZ 0x0017a487 CMP EAX,0x44 JNZ 0x0017a24c MOV RAX,qword ptr [RBX + 0x150] TEST RAX,RAX JZ 0x0017a487 MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x38] ADD RSI,0x9 SUB RDX,RSI ADD RDX,-0x3 JMP 0x0017a242 LAB_0017a1e7: MOV qword ptr [RBP + -0x40],RSI MOV RDX,RSI CMP RSI,RAX JNC 0x0017a20d SUB RAX,RSI MOV RDX,RSI LAB_0017a1f9: CMP byte ptr [RDX],0x3c JZ 0x0017a20d INC RDX MOV qword ptr [RBX + 0x130],RDX DEC RAX JNZ 0x0017a1f9 LAB_0017a20d: MOV qword ptr [RBP + -0x38],RDX TEST byte ptr [RBX],0x2 JNZ 0x0017a226 MOV RDI,R15 CALL 0x0017aba7 MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x38] LAB_0017a226: CMP RSI,RDX JZ 0x0017a487 MOV RAX,qword ptr [RBX + 0x150] TEST RAX,RAX JZ 0x0017a487 SUB RDX,RSI LAB_0017a242: MOV RDI,RBX CALL RAX JMP 0x0017a487 LAB_0017a24c: MOV RDI,RBX MOV RSI,R15 CALL 0x0017a56f CMP EAX,0x2f JNZ 0x0017a29e MOV RDI,RBX MOV RSI,R15 CALL 0x0017a56f CMP EAX,0x49 JNZ 0x0017a505 MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x38] SUB RDX,RSI MOV RDI,RBX CALL 0x0017a86d TEST EAX,EAX JNZ 0x0017a557 MOV RDI,RBX MOV RSI,R15 CALL 0x0017a56f MOV R13D,EAX JMP 0x0017a481 LAB_0017a29e: MOV R14D,EAX CMP EAX,0x21 SETZ R12B CMP EAX,0x3f JZ 0x0017a2b3 CMP R14D,0x21 JNZ 0x0017a2c0 LAB_0017a2b3: MOV RDI,RBX MOV RSI,R15 CALL 0x0017a56f JMP 0x0017a2c6 LAB_0017a2c0: MOV R12B,0x1 MOV EAX,R14D LAB_0017a2c6: CMP EAX,0x49 JNZ 0x0017a4f1 MOV dword ptr [RBX + 0x4],0x0 MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x38] SUB RDX,RSI MOV RDI,RBX CALL 0x0017aa30 TEST EAX,EAX JNZ 0x0017a557 MOV byte ptr [RBP + -0x29],R12B MOV R12D,R14D XOR R12D,0x21 MOV RDI,RBX LAB_0017a2ff: MOV RSI,R15 CALL 0x0017a56f MOV R13D,EAX XOR EAX,0x53 OR EAX,R12D SETZ AL CMP R13D,0x49 JZ 0x0017a321 TEST AL,AL JZ 0x0017a40a LAB_0017a321: MOV RDI,RBX LEA RSI,[RBP + -0x50] CALL 0x0017a56f CMP EAX,0x49 JZ 0x0017a3af MOV R13D,EAX CMP EAX,0x3d JNZ 0x0017a3ee MOV RDI,RBX LEA RSI,[RBP + -0x50] CALL 0x0017a56f CMP EAX,0x53 JZ 0x0017a358 CMP EAX,0x49 JNZ 0x0017a519 LAB_0017a358: MOV dword ptr [RBX + 0x4],0x1 MOV R13,qword ptr [RBP + -0x40] MOV R15,qword ptr [RBP + -0x38] SUB R15,R13 MOV RDI,RBX MOV RSI,R13 MOV RDX,R15 CALL 0x0017aa30 TEST EAX,EAX JNZ 0x0017a557 MOV RAX,qword ptr [RBX + 0x150] TEST RAX,RAX JZ 0x0017a3a4 MOV RSI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x48] SUB RDX,RSI MOV RDI,RBX CALL RAX TEST EAX,EAX JNZ 0x0017a557 LAB_0017a3a4: MOV RDI,RBX MOV RSI,R13 MOV RDX,R15 JMP 0x0017a3e0 LAB_0017a3af: MOV dword ptr [RBX + 0x4],0x1 MOV R15,qword ptr [RBP + -0x40] MOV R13,qword ptr [RBP + -0x38] SUB R13,R15 MOV RDI,RBX MOV RSI,R15 MOV RDX,R13 CALL 0x0017aa30 TEST EAX,EAX JNZ 0x0017a557 MOV RDI,RBX MOV RSI,R15 MOV RDX,R13 LAB_0017a3e0: CALL 0x0017a86d TEST EAX,EAX JZ 0x0017a3fa JMP 0x0017a557 LAB_0017a3ee: CMP R14D,0x21 JNZ 0x0017a406 CMP R13D,0x53 JNZ 0x0017a406 LAB_0017a3fa: MOV RDI,RBX LEA R15,[RBP + -0x40] JMP 0x0017a2ff LAB_0017a406: LEA R15,[RBP + -0x40] LAB_0017a40a: CMP R13D,0x2f MOV R12B,byte ptr [RBP + -0x29] JNZ 0x0017a436 MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX CALL 0x0017a86d TEST EAX,EAX JNZ 0x0017a557 MOV RDI,RBX MOV RSI,R15 CALL 0x0017a56f MOV R13D,EAX LAB_0017a436: TEST R12B,R12B JNZ 0x0017a467 CMP R13D,0x3f JNZ 0x0017a52d MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX CALL 0x0017a86d TEST EAX,EAX JNZ 0x0017a557 MOV RDI,RBX MOV RSI,R15 CALL 0x0017a56f MOV R13D,EAX LAB_0017a467: CMP R14D,0x21 JNZ 0x0017a481 MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX CALL 0x0017a86d TEST EAX,EAX JNZ 0x0017a557 LAB_0017a481: CMP R13D,0x3e JNZ 0x0017a4dc LAB_0017a487: MOV RSI,qword ptr [RBX + 0x130] MOV RAX,qword ptr [RBX + 0x138] CMP RSI,RAX JC 0x0017a1a0 MOV RCX,qword ptr [RBX + 0x118] LAB_0017a4a5: CMP byte ptr [RCX],0x0 JZ 0x0017a4d4 ADD RBX,0x8 LEA RCX,[0x180b29] MOV R14D,0x1 MOV EDX,0x80 MOV RDI,RBX MOV ESI,0x1 XOR EAX,EAX CALL 0x00126200 JMP 0x0017a55d LAB_0017a4d4: XOR R14D,R14D JMP 0x0017a55d LAB_0017a4dc: ADD RBX,0x8 MOV EDI,R13D CALL 0x0017a7d2 LEA RCX,[0x180b0e] JMP 0x0017a540 LAB_0017a4f1: ADD RBX,0x8 MOV EDI,EAX CALL 0x0017a7d2 LEA RCX,[0x180aa8] JMP 0x0017a540 LAB_0017a505: ADD RBX,0x8 MOV EDI,EAX CALL 0x0017a7d2 LEA RCX,[0x180a8b] JMP 0x0017a540 LAB_0017a519: ADD RBX,0x8 MOV EDI,EAX CALL 0x0017a7d2 LEA RCX,[0x180acc] JMP 0x0017a540 LAB_0017a52d: ADD RBX,0x8 MOV EDI,R13D CALL 0x0017a7d2 LEA RCX,[0x180af3] LAB_0017a540: MOV EDX,0x80 MOV RDI,RBX MOV ESI,0x1 MOV R8,RAX XOR EAX,EAX CALL 0x00126200 LAB_0017a557: MOV R14D,0x1 LAB_0017a55d: MOV EAX,R14D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Type propagation algorithm not settling */ bool my_xml_parse(byte *param_1,char *param_2,long param_3) { char cVar1; int iVar2; int iVar3; code *pcVar4; int8 uVar5; char *pcVar6; char *pcVar7; long lVar8; bool bVar9; long local_58; long local_50; char *local_48; char *local_40; char local_31; pcVar7 = *(char **)(param_1 + 0x118); *(char **)(param_1 + 0x120) = pcVar7; *(char **)(param_1 + 0x128) = param_2; *(char **)(param_1 + 0x130) = param_2; pcVar6 = param_2 + param_3; *(char **)(param_1 + 0x138) = pcVar6; if (0 < param_3) { do { if (*param_2 == '<') { iVar2 = my_xml_scan(param_1,&local_48); if (iVar2 != 0x43) { if (iVar2 == 0x44) { pcVar4 = *(code **)(param_1 + 0x150); if (pcVar4 != (code *)0x0) { pcVar7 = local_40 + (-3 - (long)(local_48 + 9)); pcVar6 = local_48 + 9; goto LAB_0017a242; } } else { iVar2 = my_xml_scan(param_1,&local_48); if (iVar2 != 0x2f) { bVar9 = iVar2 == 0x21; if ((iVar2 == 0x3f) || (iVar2 == 0x21)) { iVar3 = my_xml_scan(param_1,&local_48); } else { bVar9 = true; iVar3 = iVar2; } if (iVar3 == 0x49) { param_1[4] = 0; param_1[5] = 0; param_1[6] = 0; param_1[7] = 0; iVar3 = my_xml_enter(param_1,local_48,(long)local_40 - (long)local_48); local_31 = bVar9; do { if (iVar3 != 0) { return true; } LAB_0017a2ff: iVar3 = my_xml_scan(param_1,&local_48); if ((iVar3 != 0x49) && (iVar3 != 0x53 || iVar2 != 0x21)) goto LAB_0017a40a; iVar3 = my_xml_scan(param_1,&local_58); pcVar6 = local_48; if (iVar3 == 0x49) { param_1[4] = 1; param_1[5] = 0; param_1[6] = 0; param_1[7] = 0; lVar8 = (long)local_40 - (long)local_48; iVar3 = my_xml_enter(param_1,local_48,lVar8); goto joined_r0x0017a3d1; } if (iVar3 != 0x3d) goto LAB_0017a3ee; iVar3 = my_xml_scan(param_1,&local_58); pcVar6 = local_48; if ((iVar3 != 0x53) && (iVar3 != 0x49)) { uVar5 = lex2str(iVar3); pcVar6 = "%s unexpected (ident or string wanted)"; goto LAB_0017a540; } param_1[4] = 1; param_1[5] = 0; param_1[6] = 0; param_1[7] = 0; lVar8 = (long)local_40 - (long)local_48; iVar3 = my_xml_enter(param_1,local_48,lVar8); if (iVar3 != 0) { return true; } if (*(code **)(param_1 + 0x150) != (code *)0x0) { iVar3 = (**(code **)(param_1 + 0x150))(param_1,local_58,local_50 - local_58); joined_r0x0017a3d1: if (iVar3 != 0) { return true; } } iVar3 = my_xml_leave(param_1,pcVar6,lVar8); } while( true ); } uVar5 = lex2str(iVar3); pcVar6 = "%s unexpected (ident or \'/\' wanted)"; LAB_0017a540: __sprintf_chk(param_1 + 8,1,0x80,pcVar6,uVar5); return true; } iVar2 = my_xml_scan(param_1,&local_48); if (iVar2 != 0x49) { uVar5 = lex2str(iVar2); pcVar6 = "%s unexpected (ident wanted)"; goto LAB_0017a540; } iVar2 = my_xml_leave(param_1,local_48,(long)local_40 - (long)local_48); if (iVar2 != 0) { return true; } iVar3 = my_xml_scan(param_1,&local_48); LAB_0017a481: if (iVar3 != 0x3e) { uVar5 = lex2str(iVar3); pcVar6 = "%s unexpected (\'>\' wanted)"; goto LAB_0017a540; } } } } else { local_40 = param_2; if (param_2 < pcVar6) { lVar8 = (long)pcVar6 - (long)param_2; do { if (*local_40 == '<') break; local_40 = local_40 + 1; *(char **)(param_1 + 0x130) = local_40; lVar8 = lVar8 + -1; } while (lVar8 != 0); } local_48 = param_2; if ((*param_1 & 2) == 0) { my_xml_norm_text(&local_48); } if ((local_48 != local_40) && (pcVar4 = *(code **)(param_1 + 0x150), pcVar4 != (code *)0x0)) { pcVar7 = local_40 + -(long)local_48; pcVar6 = local_48; LAB_0017a242: (*pcVar4)(param_1,pcVar6,pcVar7); } } param_2 = *(char **)(param_1 + 0x130); pcVar6 = *(char **)(param_1 + 0x138); } while (param_2 < pcVar6); pcVar7 = *(char **)(param_1 + 0x118); } cVar1 = *pcVar7; if (cVar1 != '\0') { __sprintf_chk(param_1 + 8,1,0x80,"unexpected END-OF-INPUT"); } return cVar1 != '\0'; LAB_0017a3ee: if ((iVar2 != 0x21) || (iVar3 != 0x53)) { LAB_0017a40a: cVar1 = local_31; if (iVar3 == 0x2f) { iVar3 = my_xml_leave(param_1,0,0); if (iVar3 != 0) { return true; } iVar3 = my_xml_scan(param_1,&local_48); } if (cVar1 == '\0') { if (iVar3 != 0x3f) { uVar5 = lex2str(iVar3); pcVar6 = "%s unexpected (\'?\' wanted)"; goto LAB_0017a540; } iVar3 = my_xml_leave(param_1,0,0); if (iVar3 != 0) { return true; } iVar3 = my_xml_scan(param_1,&local_48); } if ((iVar2 == 0x21) && (iVar2 = my_xml_leave(param_1,0,0), iVar2 != 0)) { return true; } goto LAB_0017a481; } goto LAB_0017a2ff; }
4,619
ssz_gindex
corpus-core[P]colibri-stateless/src/util/ssz_merkle.c
gindex_t ssz_gindex(const ssz_def_t* def, int num_elements, ...) { if (!def || num_elements <= 0) return 0; gindex_t gindex = 1; va_list args; va_start(args, num_elements); for (int i = 0; i < num_elements; i++) { uint64_t leafes = 0; uint64_t idx = 0; if (def->type == SSZ_TYPE_CONTAINER) { const char* path_element = va_arg(args, const char*); for (int i = 0; i < def->def.container.len; i++) { if (strcmp(def->def.container.elements[i].name, path_element) == 0) { idx = i; leafes = def->def.container.len; def = def->def.container.elements + i; break; } } } else if (def->type == SSZ_TYPE_LIST) { leafes = is_basic_type(def->def.vector.type) ? ((def->def.vector.len * ssz_fixed_length(def->def.vector.type) + 31) >> 5) * 2 : def->def.vector.len * 2; idx = (uint64_t) va_arg(args, int); } if (leafes == 0) { va_end(args); return 0; } uint32_t max_depth = log2_ceil(leafes); gindex = ssz_add_gindex(gindex, (((gindex_t) 1) << max_depth) + idx); } va_end(args); return gindex; }
O0
c
ssz_gindex: pushq %rbp movq %rsp, %rbp subq $0x160, %rsp # imm = 0x160 testb %al, %al je 0x1c294 movaps %xmm0, -0xf0(%rbp) movaps %xmm1, -0xe0(%rbp) movaps %xmm2, -0xd0(%rbp) movaps %xmm3, -0xc0(%rbp) movaps %xmm4, -0xb0(%rbp) movaps %xmm5, -0xa0(%rbp) movaps %xmm6, -0x90(%rbp) movaps %xmm7, -0x80(%rbp) movq %r9, -0xf8(%rbp) movq %r8, -0x100(%rbp) movq %rcx, -0x108(%rbp) movq %rdx, -0x110(%rbp) movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) cmpq $0x0, -0x10(%rbp) je 0x1c2c4 cmpl $0x0, -0x14(%rbp) jg 0x1c2d1 movq $0x0, -0x8(%rbp) jmp 0x1c547 movq $0x1, -0x20(%rbp) leaq -0x40(%rbp), %rax leaq -0x120(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x10, (%rax) movl $0x0, -0x44(%rbp) movl -0x44(%rbp), %eax cmpl -0x14(%rbp), %eax jge 0x1c53b movq $0x0, -0x50(%rbp) movq $0x0, -0x58(%rbp) movq -0x10(%rbp), %rax cmpl $0x2, 0x8(%rax) jne 0x1c409 leaq -0x40(%rbp), %rax movq %rax, -0x130(%rbp) movl -0x40(%rbp), %eax movl %eax, -0x124(%rbp) cmpl $0x28, %eax ja 0x1c369 movq -0x130(%rbp), %rcx movl -0x124(%rbp), %edx movslq %edx, %rax addq 0x10(%rcx), %rax addl $0x8, %edx movl %edx, (%rcx) movq %rax, -0x138(%rbp) jmp 0x1c386 movq -0x130(%rbp), %rcx movq 0x8(%rcx), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, 0x8(%rcx) movq %rax, -0x138(%rbp) movq -0x138(%rbp), %rax movq (%rax), %rax movq %rax, -0x60(%rbp) movl $0x0, -0x64(%rbp) movl -0x64(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0x18(%rcx), %eax jae 0x1c404 movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movslq -0x64(%rbp), %rcx shlq $0x5, %rcx addq %rcx, %rax movq (%rax), %rdi movq -0x60(%rbp), %rsi callq 0x5250 cmpl $0x0, %eax jne 0x1c3f7 movslq -0x64(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x10(%rbp), %rax movl 0x18(%rax), %eax movq %rax, -0x50(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movslq -0x64(%rbp), %rcx shlq $0x5, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) jmp 0x1c404 jmp 0x1c3f9 movl -0x64(%rbp), %eax addl $0x1, %eax movl %eax, -0x64(%rbp) jmp 0x1c39b jmp 0x1c4ec movq -0x10(%rbp), %rax cmpl $0x4, 0x8(%rax) jne 0x1c4ea movq -0x10(%rbp), %rax movq 0x10(%rax), %rdi callq 0x1c560 testb $0x1, %al jne 0x1c42a jmp 0x1c467 movq -0x10(%rbp), %rax movl 0x18(%rax), %eax movq %rax, -0x148(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rdi callq 0x1a210 movq %rax, %rcx movq -0x148(%rbp), %rax imulq %rcx, %rax addq $0x1f, %rax shrq $0x5, %rax shlq %rax movq %rax, -0x140(%rbp) jmp 0x1c479 movq -0x10(%rbp), %rax movl 0x18(%rax), %eax shll %eax movl %eax, %eax movq %rax, -0x140(%rbp) movq -0x140(%rbp), %rax movq %rax, -0x50(%rbp) leaq -0x40(%rbp), %rax movq %rax, -0x158(%rbp) movl -0x40(%rbp), %eax movl %eax, -0x14c(%rbp) cmpl $0x28, %eax ja 0x1c4bf movq -0x158(%rbp), %rcx movl -0x14c(%rbp), %edx movslq %edx, %rax addq 0x10(%rcx), %rax addl $0x8, %edx movl %edx, (%rcx) movq %rax, -0x160(%rbp) jmp 0x1c4dc movq -0x158(%rbp), %rcx movq 0x8(%rcx), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, 0x8(%rcx) movq %rax, -0x160(%rbp) movq -0x160(%rbp), %rax movslq (%rax), %rax movq %rax, -0x58(%rbp) jmp 0x1c4ec cmpq $0x0, -0x50(%rbp) jne 0x1c501 leaq -0x40(%rbp), %rax movq $0x0, -0x8(%rbp) jmp 0x1c547 movq -0x50(%rbp), %rax movl %eax, %edi callq 0x1c5a0 movl %eax, -0x68(%rbp) movq -0x20(%rbp), %rdi movl -0x68(%rbp), %eax movl %eax, %ecx movl $0x1, %esi shlq %cl, %rsi addq -0x58(%rbp), %rsi callq 0x1c600 movq %rax, -0x20(%rbp) movl -0x44(%rbp), %eax addl $0x1, %eax movl %eax, -0x44(%rbp) jmp 0x1c304 leaq -0x40(%rbp), %rax movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x160, %rsp # imm = 0x160 popq %rbp retq nopw %cs:(%rax,%rax)
ssz_gindex: push rbp mov rbp, rsp sub rsp, 160h test al, al jz short loc_1C294 movaps [rbp+var_F0], xmm0 movaps [rbp+var_E0], xmm1 movaps [rbp+var_D0], xmm2 movaps [rbp+var_C0], xmm3 movaps [rbp+var_B0], xmm4 movaps [rbp+var_A0], xmm5 movaps [rbp+var_90], xmm6 movaps [rbp+var_80], xmm7 loc_1C294: mov [rbp+var_F8], r9 mov [rbp+var_100], r8 mov [rbp+var_108], rcx mov [rbp+var_110], rdx mov [rbp+var_10], rdi mov [rbp+var_14], esi cmp [rbp+var_10], 0 jz short loc_1C2C4 cmp [rbp+var_14], 0 jg short loc_1C2D1 loc_1C2C4: mov [rbp+var_8], 0 jmp loc_1C547 loc_1C2D1: mov [rbp+var_20], 1 lea rax, [rbp+var_40] lea rcx, [rbp+var_120] mov [rax+10h], rcx lea rcx, [rbp+arg_0] mov [rax+8], rcx mov dword ptr [rax+4], 30h ; '0' mov dword ptr [rax], 10h mov [rbp+var_44], 0 loc_1C304: mov eax, [rbp+var_44] cmp eax, [rbp+var_14] jge loc_1C53B mov [rbp+var_50], 0 mov [rbp+var_58], 0 mov rax, [rbp+var_10] cmp dword ptr [rax+8], 2 jnz loc_1C409 lea rax, [rbp+var_40] mov [rbp+var_130], rax mov eax, [rbp+var_40] mov [rbp+var_124], eax cmp eax, 28h ; '(' ja short loc_1C369 mov rcx, [rbp+var_130] mov edx, [rbp+var_124] movsxd rax, edx add rax, [rcx+10h] add edx, 8 mov [rcx], edx mov [rbp+var_138], rax jmp short loc_1C386 loc_1C369: mov rcx, [rbp+var_130] mov rax, [rcx+8] mov rdx, rax add rdx, 8 mov [rcx+8], rdx mov [rbp+var_138], rax loc_1C386: mov rax, [rbp+var_138] mov rax, [rax] mov [rbp+var_60], rax mov [rbp+var_64], 0 loc_1C39B: mov eax, [rbp+var_64] mov rcx, [rbp+var_10] cmp eax, [rcx+18h] jnb short loc_1C404 mov rax, [rbp+var_10] mov rax, [rax+10h] movsxd rcx, [rbp+var_64] shl rcx, 5 add rax, rcx mov rdi, [rax] mov rsi, [rbp+var_60] call _strcmp cmp eax, 0 jnz short loc_1C3F7 movsxd rax, [rbp+var_64] mov [rbp+var_58], rax mov rax, [rbp+var_10] mov eax, [rax+18h] mov [rbp+var_50], rax mov rax, [rbp+var_10] mov rax, [rax+10h] movsxd rcx, [rbp+var_64] shl rcx, 5 add rax, rcx mov [rbp+var_10], rax jmp short loc_1C404 loc_1C3F7: jmp short $+2 loc_1C3F9: mov eax, [rbp+var_64] add eax, 1 mov [rbp+var_64], eax jmp short loc_1C39B loc_1C404: jmp loc_1C4EC loc_1C409: mov rax, [rbp+var_10] cmp dword ptr [rax+8], 4 jnz loc_1C4EA mov rax, [rbp+var_10] mov rdi, [rax+10h] call is_basic_type test al, 1 jnz short loc_1C42A jmp short loc_1C467 loc_1C42A: mov rax, [rbp+var_10] mov eax, [rax+18h] mov [rbp+var_148], rax mov rax, [rbp+var_10] mov rdi, [rax+10h] call ssz_fixed_length mov rcx, rax mov rax, [rbp+var_148] imul rax, rcx add rax, 1Fh shr rax, 5 shl rax, 1 mov [rbp+var_140], rax jmp short loc_1C479 loc_1C467: mov rax, [rbp+var_10] mov eax, [rax+18h] shl eax, 1 mov eax, eax mov [rbp+var_140], rax loc_1C479: mov rax, [rbp+var_140] mov [rbp+var_50], rax lea rax, [rbp+var_40] mov [rbp+var_158], rax mov eax, [rbp+var_40] mov [rbp+var_14C], eax cmp eax, 28h ; '(' ja short loc_1C4BF mov rcx, [rbp+var_158] mov edx, [rbp+var_14C] movsxd rax, edx add rax, [rcx+10h] add edx, 8 mov [rcx], edx mov [rbp+var_160], rax jmp short loc_1C4DC loc_1C4BF: mov rcx, [rbp+var_158] mov rax, [rcx+8] mov rdx, rax add rdx, 8 mov [rcx+8], rdx mov [rbp+var_160], rax loc_1C4DC: mov rax, [rbp+var_160] movsxd rax, dword ptr [rax] mov [rbp+var_58], rax loc_1C4EA: jmp short $+2 loc_1C4EC: cmp [rbp+var_50], 0 jnz short loc_1C501 lea rax, [rbp+var_40] mov [rbp+var_8], 0 jmp short loc_1C547 loc_1C501: mov rax, [rbp+var_50] mov edi, eax call log2_ceil mov [rbp+var_68], eax mov rdi, [rbp+var_20] mov eax, [rbp+var_68] mov ecx, eax mov esi, 1 shl rsi, cl add rsi, [rbp+var_58] call ssz_add_gindex mov [rbp+var_20], rax mov eax, [rbp+var_44] add eax, 1 mov [rbp+var_44], eax jmp loc_1C304 loc_1C53B: lea rax, [rbp+var_40] mov rax, [rbp+var_20] mov [rbp+var_8], rax loc_1C547: mov rax, [rbp+var_8] add rsp, 160h pop rbp retn
long long ssz_gindex(long long a1, int a2, ...) { long long *overflow_arg_area; // rax int *v3; // rax long long v5; // [rsp+18h] [rbp-148h] unsigned long long v6; // [rsp+20h] [rbp-140h] char v7; // [rsp+F8h] [rbp-68h] unsigned int j; // [rsp+FCh] [rbp-64h] long long v9; // [rsp+100h] [rbp-60h] long long v10; // [rsp+108h] [rbp-58h] unsigned long long v11; // [rsp+110h] [rbp-50h] int i; // [rsp+11Ch] [rbp-44h] va_list va; // [rsp+120h] [rbp-40h] BYREF long long v14; // [rsp+140h] [rbp-20h] int v15; // [rsp+14Ch] [rbp-14h] long long v16; // [rsp+150h] [rbp-10h] v16 = a1; v15 = a2; if ( !a1 || v15 <= 0 ) return 0LL; v14 = 1LL; va_start(va, a2); for ( i = 0; i < v15; ++i ) { v11 = 0LL; v10 = 0LL; if ( *(_DWORD *)(v16 + 8) == 2 ) { if ( va[0].gp_offset > 0x28 ) { overflow_arg_area = (long long *)va[0].overflow_arg_area; va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8; } else { overflow_arg_area = (long long *)((char *)va[0].reg_save_area + (int)va[0].gp_offset); va[0].gp_offset += 8; } v9 = *overflow_arg_area; for ( j = 0; j < *(_DWORD *)(v16 + 24); ++j ) { if ( !(unsigned int)strcmp(*(_QWORD *)(32LL * (int)j + *(_QWORD *)(v16 + 16)), v9) ) { v10 = (int)j; v11 = *(unsigned int *)(v16 + 24); v16 = 32LL * (int)j + *(_QWORD *)(v16 + 16); break; } } } else if ( *(_DWORD *)(v16 + 8) == 4 ) { if ( (is_basic_type(*(_QWORD *)(v16 + 16)) & 1) != 0 ) { v5 = *(unsigned int *)(v16 + 24); v6 = 2 * ((unsigned long long)(ssz_fixed_length(*(_DWORD **)(v16 + 16)) * v5 + 31) >> 5); } else { v6 = (unsigned int)(2 * *(_DWORD *)(v16 + 24)); } v11 = v6; if ( va[0].gp_offset > 0x28 ) { v3 = (int *)va[0].overflow_arg_area; va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8; } else { v3 = (int *)((char *)va[0].reg_save_area + (int)va[0].gp_offset); va[0].gp_offset += 8; } v10 = *v3; } if ( !v11 ) return 0LL; v7 = log2_ceil((unsigned int)v11); v14 = ssz_add_gindex(v14, v10 + (1LL << v7)); } return v14; }
ssz_gindex: PUSH RBP MOV RBP,RSP SUB RSP,0x160 TEST AL,AL JZ 0x0011c294 MOVAPS xmmword ptr [RBP + -0xf0],XMM0 MOVAPS xmmword ptr [RBP + -0xe0],XMM1 MOVAPS xmmword ptr [RBP + -0xd0],XMM2 MOVAPS xmmword ptr [RBP + -0xc0],XMM3 MOVAPS xmmword ptr [RBP + -0xb0],XMM4 MOVAPS xmmword ptr [RBP + -0xa0],XMM5 MOVAPS xmmword ptr [RBP + -0x90],XMM6 MOVAPS xmmword ptr [RBP + -0x80],XMM7 LAB_0011c294: MOV qword ptr [RBP + -0xf8],R9 MOV qword ptr [RBP + -0x100],R8 MOV qword ptr [RBP + -0x108],RCX MOV qword ptr [RBP + -0x110],RDX MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI CMP qword ptr [RBP + -0x10],0x0 JZ 0x0011c2c4 CMP dword ptr [RBP + -0x14],0x0 JG 0x0011c2d1 LAB_0011c2c4: MOV qword ptr [RBP + -0x8],0x0 JMP 0x0011c547 LAB_0011c2d1: MOV qword ptr [RBP + -0x20],0x1 LEA RAX,[RBP + -0x40] LEA RCX,[RBP + -0x120] MOV qword ptr [RAX + 0x10],RCX LEA RCX,[RBP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RAX + 0x4],0x30 MOV dword ptr [RAX],0x10 MOV dword ptr [RBP + -0x44],0x0 LAB_0011c304: MOV EAX,dword ptr [RBP + -0x44] CMP EAX,dword ptr [RBP + -0x14] JGE 0x0011c53b MOV qword ptr [RBP + -0x50],0x0 MOV qword ptr [RBP + -0x58],0x0 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x8],0x2 JNZ 0x0011c409 LEA RAX,[RBP + -0x40] MOV qword ptr [RBP + -0x130],RAX MOV EAX,dword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x124],EAX CMP EAX,0x28 JA 0x0011c369 MOV RCX,qword ptr [RBP + -0x130] MOV EDX,dword ptr [RBP + -0x124] MOVSXD RAX,EDX ADD RAX,qword ptr [RCX + 0x10] ADD EDX,0x8 MOV dword ptr [RCX],EDX MOV qword ptr [RBP + -0x138],RAX JMP 0x0011c386 LAB_0011c369: MOV RCX,qword ptr [RBP + -0x130] MOV RAX,qword ptr [RCX + 0x8] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RBP + -0x138],RAX LAB_0011c386: MOV RAX,qword ptr [RBP + -0x138] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x60],RAX MOV dword ptr [RBP + -0x64],0x0 LAB_0011c39b: MOV EAX,dword ptr [RBP + -0x64] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x18] JNC 0x0011c404 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RBP + -0x64] SHL RCX,0x5 ADD RAX,RCX MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x60] CALL 0x00105250 CMP EAX,0x0 JNZ 0x0011c3f7 MOVSXD RAX,dword ptr [RBP + -0x64] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RBP + -0x64] SHL RCX,0x5 ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX JMP 0x0011c404 LAB_0011c3f7: JMP 0x0011c3f9 LAB_0011c3f9: MOV EAX,dword ptr [RBP + -0x64] ADD EAX,0x1 MOV dword ptr [RBP + -0x64],EAX JMP 0x0011c39b LAB_0011c404: JMP 0x0011c4ec LAB_0011c409: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x8],0x4 JNZ 0x0011c4ea MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x10] CALL 0x0011c560 TEST AL,0x1 JNZ 0x0011c42a JMP 0x0011c467 LAB_0011c42a: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x148],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x10] CALL 0x0011a210 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x148] IMUL RAX,RCX ADD RAX,0x1f SHR RAX,0x5 SHL RAX,0x1 MOV qword ptr [RBP + -0x140],RAX JMP 0x0011c479 LAB_0011c467: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x18] SHL EAX,0x1 MOV EAX,EAX MOV qword ptr [RBP + -0x140],RAX LAB_0011c479: MOV RAX,qword ptr [RBP + -0x140] MOV qword ptr [RBP + -0x50],RAX LEA RAX,[RBP + -0x40] MOV qword ptr [RBP + -0x158],RAX MOV EAX,dword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x14c],EAX CMP EAX,0x28 JA 0x0011c4bf MOV RCX,qword ptr [RBP + -0x158] MOV EDX,dword ptr [RBP + -0x14c] MOVSXD RAX,EDX ADD RAX,qword ptr [RCX + 0x10] ADD EDX,0x8 MOV dword ptr [RCX],EDX MOV qword ptr [RBP + -0x160],RAX JMP 0x0011c4dc LAB_0011c4bf: MOV RCX,qword ptr [RBP + -0x158] MOV RAX,qword ptr [RCX + 0x8] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RBP + -0x160],RAX LAB_0011c4dc: MOV RAX,qword ptr [RBP + -0x160] MOVSXD RAX,dword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX LAB_0011c4ea: JMP 0x0011c4ec LAB_0011c4ec: CMP qword ptr [RBP + -0x50],0x0 JNZ 0x0011c501 LEA RAX,[RBP + -0x40] MOV qword ptr [RBP + -0x8],0x0 JMP 0x0011c547 LAB_0011c501: MOV RAX,qword ptr [RBP + -0x50] MOV EDI,EAX CALL 0x0011c5a0 MOV dword ptr [RBP + -0x68],EAX MOV RDI,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x68] MOV ECX,EAX MOV ESI,0x1 SHL RSI,CL ADD RSI,qword ptr [RBP + -0x58] CALL 0x0011c600 MOV qword ptr [RBP + -0x20],RAX MOV EAX,dword ptr [RBP + -0x44] ADD EAX,0x1 MOV dword ptr [RBP + -0x44],EAX JMP 0x0011c304 LAB_0011c53b: LEA RAX,[RBP + -0x40] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX LAB_0011c547: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x160 POP RBP RET
/* WARNING: Restarted to delay deadcode elimination for space: stack */ int8 ssz_gindex(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8,long param_9, int param_10,int8 param_11,int8 param_12,int8 param_13, int8 param_14) { uint uVar1; char in_AL; int iVar2; ulong uVar3; long lVar4; int *local_168; ulong local_148; int *local_140; int1 local_128 [16]; int8 local_118; int8 local_110; int8 local_108; int8 local_100; int8 local_f8; int8 local_e8; int8 local_d8; int8 local_c8; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int4 local_70; uint local_6c; char *local_68; long local_60; ulong local_58; int local_4c; uint local_48; int4 local_44; int *local_40; int1 *local_38; int8 local_28; int local_1c; long local_18; int8 local_10; if (in_AL != '\0') { local_f8 = param_1; local_e8 = param_2; local_d8 = param_3; local_c8 = param_4; local_b8 = param_5; local_a8 = param_6; local_98 = param_7; local_88 = param_8; } if ((param_9 == 0) || (param_10 < 1)) { local_10 = 0; } else { local_28 = 1; local_38 = local_128; local_40 = (int *)&stack0x00000008; local_44 = 0x30; local_48 = 0x10; local_118 = param_11; local_110 = param_12; local_108 = param_13; local_100 = param_14; local_1c = param_10; local_18 = param_9; for (local_4c = 0; local_4c < local_1c; local_4c = local_4c + 1) { local_58 = 0; local_60 = 0; if (*(int *)(local_18 + 8) == 2) { if (local_48 < 0x29) { local_140 = (int *)(local_38 + (int)local_48); local_48 = local_48 + 8; } else { local_140 = local_40; local_40 = local_40 + 2; } local_68 = *(char **)local_140; for (local_6c = 0; local_6c < *(uint *)(local_18 + 0x18); local_6c = local_6c + 1) { iVar2 = strcmp(*(char **)(*(long *)(local_18 + 0x10) + (long)(int)local_6c * 0x20), local_68); if (iVar2 == 0) { local_60 = (long)(int)local_6c; local_58 = (ulong)*(uint *)(local_18 + 0x18); local_18 = *(long *)(local_18 + 0x10) + (long)(int)local_6c * 0x20; break; } } } else if (*(int *)(local_18 + 8) == 4) { uVar3 = is_basic_type(*(int8 *)(local_18 + 0x10)); if ((uVar3 & 1) == 0) { local_148 = (ulong)(uint)(*(int *)(local_18 + 0x18) << 1); } else { uVar1 = *(uint *)(local_18 + 0x18); lVar4 = ssz_fixed_length(*(int8 *)(local_18 + 0x10)); local_148 = ((ulong)uVar1 * lVar4 + 0x1f >> 5) << 1; } local_58 = local_148; if (local_48 < 0x29) { local_168 = (int *)(local_38 + (int)local_48); local_48 = local_48 + 8; } else { local_168 = local_40; local_40 = local_40 + 2; } local_60 = (long)*local_168; } if (local_58 == 0) { return 0; } local_70 = log2_ceil(local_58 & 0xffffffff); local_28 = ssz_add_gindex(local_28,(1L << ((byte)local_70 & 0x3f)) + local_60); } local_10 = local_28; } return local_10; }
4,620
ssz_gindex
corpus-core[P]colibri-stateless/src/util/ssz_merkle.c
gindex_t ssz_gindex(const ssz_def_t* def, int num_elements, ...) { if (!def || num_elements <= 0) return 0; gindex_t gindex = 1; va_list args; va_start(args, num_elements); for (int i = 0; i < num_elements; i++) { uint64_t leafes = 0; uint64_t idx = 0; if (def->type == SSZ_TYPE_CONTAINER) { const char* path_element = va_arg(args, const char*); for (int i = 0; i < def->def.container.len; i++) { if (strcmp(def->def.container.elements[i].name, path_element) == 0) { idx = i; leafes = def->def.container.len; def = def->def.container.elements + i; break; } } } else if (def->type == SSZ_TYPE_LIST) { leafes = is_basic_type(def->def.vector.type) ? ((def->def.vector.len * ssz_fixed_length(def->def.vector.type) + 31) >> 5) * 2 : def->def.vector.len * 2; idx = (uint64_t) va_arg(args, int); } if (leafes == 0) { va_end(args); return 0; } uint32_t max_depth = log2_ceil(leafes); gindex = ssz_add_gindex(gindex, (((gindex_t) 1) << max_depth) + idx); } va_end(args); return gindex; }
O1
c
ssz_gindex: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movq %rdx, 0x50(%rsp) movq %rcx, 0x58(%rsp) movq %r8, 0x60(%rsp) movq %r9, 0x68(%rsp) testb %al, %al je 0x14b7e movaps %xmm0, 0x70(%rsp) movaps %xmm1, 0x80(%rsp) movaps %xmm2, 0x90(%rsp) movaps %xmm3, 0xa0(%rsp) movaps %xmm4, 0xb0(%rsp) movaps %xmm5, 0xc0(%rsp) movaps %xmm6, 0xd0(%rsp) movaps %xmm7, 0xe0(%rsp) testq %rdi, %rdi sete %al testl %esi, %esi setle %cl xorl %ebp, %ebp orb %al, %cl jne 0x14d37 movl %esi, %r13d movq %rdi, %r14 leaq 0x40(%rsp), %rax movq %rax, 0x20(%rsp) leaq 0x130(%rsp), %rax movq %rax, 0x18(%rsp) movabsq $0x3000000010, %rax # imm = 0x3000000010 movq %rax, 0x10(%rsp) movl $0x1, %edi movb $0x1, %bl movl %esi, 0xc(%rsp) movl 0x8(%r14), %eax cmpl $0x4, %eax je 0x14bf7 cmpl $0x2, %eax jne 0x14c91 movl 0x10(%rsp), %ecx cmpq $0x28, %rcx ja 0x14c39 movq %rcx, %rax addq 0x20(%rsp), %rax addl $0x8, %ecx movl %ecx, 0x10(%rsp) jmp 0x14c47 movq %rdi, %r13 movq 0x10(%r14), %rdi movl 0x8(%rdi), %eax cmpl $0x8, %eax ja 0x14ca5 movl $0x103, %ecx # imm = 0x103 btl %eax, %ecx jae 0x14ca5 movq %r14, %r15 movl 0x18(%r14), %r14d callq 0x13690 movq %rax, %r12 imulq %r14, %r12 addq $0x1f, %r12 shrq $0x4, %r12 andq $-0x2, %r12 jmp 0x14caf movq 0x18(%rsp), %rax leaq 0x8(%rax), %rcx movq %rcx, 0x18(%rsp) movl 0x18(%r14), %r12d testq %r12, %r12 je 0x14c91 movq %rdi, 0x30(%rsp) movq (%rax), %r13 movq %r14, 0x38(%rsp) movq 0x10(%r14), %r14 xorl %r15d, %r15d movq (%r14), %rdi movq %r13, %rsi callq 0x5280 testl %eax, %eax je 0x14c99 incq %r15 addq $0x20, %r14 cmpq %r15, %r12 jne 0x14c64 xorl %r12d, %r12d xorl %r15d, %r15d movl 0xc(%rsp), %r13d movq 0x38(%rsp), %r14 jmp 0x14c9e xorl %r12d, %r12d xorl %r15d, %r15d jmp 0x14ce6 movl 0xc(%rsp), %r13d movq 0x30(%rsp), %rdi jmp 0x14ce6 movq %r14, %r15 movl 0x18(%r14), %r12d addl %r12d, %r12d movl 0x10(%rsp), %ecx cmpq $0x28, %rcx movq %r13, %rdi ja 0x14ccd movq %rcx, %rax addq 0x20(%rsp), %rax addl $0x8, %ecx movl %ecx, 0x10(%rsp) jmp 0x14cdb movq 0x18(%rsp), %rax leaq 0x8(%rax), %rcx movq %rcx, 0x18(%rsp) movq %r15, %r14 movl 0xc(%rsp), %r13d movslq (%rax), %r15 testq %r12, %r12 je 0x14d1f cmpl $0x2, %r12d jae 0x14cf5 xorl %ecx, %ecx jmp 0x14d0c bsrl %r12d, %eax movl %eax, %ecx xorl $-0x20, %ecx leal -0x1(%r12), %edx addl $0x21, %ecx testl %edx, %r12d cmovel %eax, %ecx movl $0x1, %esi shlq %cl, %rsi addq %r15, %rsi callq 0x14d4e movq %rax, %rdi testq %r12, %r12 je 0x14d32 incl %ebp cmpl %r13d, %ebp setl %bl jne 0x14bca testb $0x1, %bl je 0x14d39 xorl %edi, %edi movq %rdi, %rax addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ssz_gindex: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0F8h mov [rsp+128h+var_D8], rdx mov [rsp+128h+var_D0], rcx mov [rsp+128h+var_C8], r8 mov [rsp+128h+var_C0], r9 test al, al jz short loc_14B7E movaps [rsp+128h+var_B8], xmm0 movaps [rsp+128h+var_A8], xmm1 movaps [rsp+128h+var_98], xmm2 movaps [rsp+128h+var_88], xmm3 movaps [rsp+128h+var_78], xmm4 movaps [rsp+128h+var_68], xmm5 movaps [rsp+128h+var_58], xmm6 movaps [rsp+128h+var_48], xmm7 loc_14B7E: test rdi, rdi setz al test esi, esi setle cl xor ebp, ebp or cl, al jnz loc_14D37 mov r13d, esi mov r14, rdi lea rax, [rsp+128h+var_E8] mov [rsp+128h+var_108], rax lea rax, [rsp+128h+arg_0] mov [rsp+128h+var_110], rax mov rax, 3000000010h mov [rsp+128h+var_118], rax mov edi, 1 mov bl, 1 mov [rsp+128h+var_11C], esi loc_14BCA: mov eax, [r14+8] cmp eax, 4 jz short loc_14BF7 cmp eax, 2 jnz loc_14C91 mov ecx, dword ptr [rsp+128h+var_118] cmp rcx, 28h ; '(' ja short loc_14C39 mov rax, rcx add rax, [rsp+128h+var_108] add ecx, 8 mov dword ptr [rsp+128h+var_118], ecx jmp short loc_14C47 loc_14BF7: mov r13, rdi mov rdi, [r14+10h] mov eax, [rdi+8] cmp eax, 8 ja loc_14CA5 mov ecx, 103h bt ecx, eax jnb loc_14CA5 mov r15, r14 mov r14d, [r14+18h] call ssz_fixed_length mov r12, rax imul r12, r14 add r12, 1Fh shr r12, 4 and r12, 0FFFFFFFFFFFFFFFEh jmp short loc_14CAF loc_14C39: mov rax, [rsp+128h+var_110] lea rcx, [rax+8] mov [rsp+128h+var_110], rcx loc_14C47: mov r12d, [r14+18h] test r12, r12 jz short loc_14C91 mov [rsp+128h+var_F8], rdi mov r13, [rax] mov [rsp+128h+var_F0], r14 mov r14, [r14+10h] xor r15d, r15d loc_14C64: mov rdi, [r14] mov rsi, r13 call _strcmp test eax, eax jz short loc_14C99 inc r15 add r14, 20h ; ' ' cmp r12, r15 jnz short loc_14C64 xor r12d, r12d xor r15d, r15d mov r13d, [rsp+128h+var_11C] mov r14, [rsp+128h+var_F0] jmp short loc_14C9E loc_14C91: xor r12d, r12d xor r15d, r15d jmp short loc_14CE6 loc_14C99: mov r13d, [rsp+128h+var_11C] loc_14C9E: mov rdi, [rsp+128h+var_F8] jmp short loc_14CE6 loc_14CA5: mov r15, r14 mov r12d, [r14+18h] add r12d, r12d loc_14CAF: mov ecx, dword ptr [rsp+128h+var_118] cmp rcx, 28h ; '(' mov rdi, r13 ja short loc_14CCD mov rax, rcx add rax, [rsp+128h+var_108] add ecx, 8 mov dword ptr [rsp+128h+var_118], ecx jmp short loc_14CDB loc_14CCD: mov rax, [rsp+128h+var_110] lea rcx, [rax+8] mov [rsp+128h+var_110], rcx loc_14CDB: mov r14, r15 mov r13d, [rsp+128h+var_11C] movsxd r15, dword ptr [rax] loc_14CE6: test r12, r12 jz short loc_14D1F cmp r12d, 2 jnb short loc_14CF5 xor ecx, ecx jmp short loc_14D0C loc_14CF5: bsr eax, r12d mov ecx, eax xor ecx, 0FFFFFFE0h lea edx, [r12-1] add ecx, 21h ; '!' test r12d, edx cmovz ecx, eax loc_14D0C: mov esi, 1 shl rsi, cl add rsi, r15 call ssz_add_gindex mov rdi, rax loc_14D1F: test r12, r12 jz short loc_14D32 inc ebp cmp ebp, r13d setl bl jnz loc_14BCA loc_14D32: test bl, 1 jz short loc_14D39 loc_14D37: xor edi, edi loc_14D39: mov rax, rdi add rsp, 0F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ssz_gindex(long long a1, int a2, ...) { int v2; // ebp int v3; // r13d long long v4; // r14 long long v5; // rdi bool v6; // bl int v7; // eax long long *v8; // rax long long v9; // r13 long long v10; // rdi unsigned int v11; // eax int v12; // ecx long long v13; // r15 long long v14; // r14 unsigned long long v15; // r12 long long v16; // kr00_8 long long v17; // r13 long long v18; // r15 long long *v19; // rax long long v20; // kr08_8 char v21; // cl int v22; // eax va_list va; // [rsp+10h] [rbp-118h] BYREF long long v25; // [rsp+38h] [rbp-F0h] v2 = 0; if ( a1 == 0 || a2 <= 0 ) return 0LL; v3 = a2; v4 = a1; va_start(va, a2); v5 = 1LL; v6 = 1; do { v7 = *(_DWORD *)(v4 + 8); if ( v7 == 4 ) { v9 = v5; v10 = *(_QWORD *)(v4 + 16); v11 = *(_DWORD *)(v10 + 8); if ( v11 <= 8 && (v12 = 259, _bittest(&v12, v11)) ) { v13 = v4; v14 = *(unsigned int *)(v4 + 24); v15 = ((unsigned long long)(v14 * ssz_fixed_length(v10) + 31) >> 4) & 0xFFFFFFFFFFFFFFFELL; } else { v13 = v4; v15 = (unsigned int)(2 * *(_DWORD *)(v4 + 24)); } v5 = v9; if ( va[0].gp_offset > 0x28uLL ) { v20 = va_arg(va, _QWORD); v19 = &v20; } else { v19 = (long long *)((char *)va[0].reg_save_area + va[0].gp_offset); va[0].gp_offset += 8; } v4 = v13; v3 = a2; v18 = *(int *)v19; } else if ( v7 == 2 && (va[0].gp_offset > 0x28uLL ? (v16 = va_arg(va, _QWORD), v8 = &v16) : (long long *)(v8 = (long long *)((char *)va[0].reg_save_area + va[0].gp_offset), va[0].gp_offset += 8), v15 = *(unsigned int *)(v4 + 24), *(_DWORD *)(v4 + 24)) ) { v17 = *v8; v25 = v4; v4 = *(_QWORD *)(v4 + 16); v18 = 0LL; while ( (unsigned int)strcmp(*(_QWORD *)v4, v17) ) { ++v18; v4 += 32LL; if ( v15 == v18 ) { v15 = 0LL; v18 = 0LL; v3 = a2; v4 = v25; goto LABEL_23; } } v3 = a2; } else { v15 = 0LL; v18 = 0LL; } LABEL_23: if ( v15 ) { if ( (unsigned int)v15 >= 2 ) { _BitScanReverse((unsigned int *)&v22, v15); v21 = (v22 ^ 0xE0) + 33; if ( (((_DWORD)v15 - 1) & (unsigned int)v15) == 0 ) v21 = v22; } else { v21 = 0; } v5 = ssz_add_gindex(v5, v18 + (1LL << v21)); } if ( !v15 ) break; v6 = ++v2 < v3; } while ( v2 != v3 ); if ( v6 ) return 0LL; return v5; }
ssz_gindex: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xf8 MOV qword ptr [RSP + 0x50],RDX MOV qword ptr [RSP + 0x58],RCX MOV qword ptr [RSP + 0x60],R8 MOV qword ptr [RSP + 0x68],R9 TEST AL,AL JZ 0x00114b7e MOVAPS xmmword ptr [RSP + 0x70],XMM0 MOVAPS xmmword ptr [RSP + 0x80],XMM1 MOVAPS xmmword ptr [RSP + 0x90],XMM2 MOVAPS xmmword ptr [RSP + 0xa0],XMM3 MOVAPS xmmword ptr [RSP + 0xb0],XMM4 MOVAPS xmmword ptr [RSP + 0xc0],XMM5 MOVAPS xmmword ptr [RSP + 0xd0],XMM6 MOVAPS xmmword ptr [RSP + 0xe0],XMM7 LAB_00114b7e: TEST RDI,RDI SETZ AL TEST ESI,ESI SETLE CL XOR EBP,EBP OR CL,AL JNZ 0x00114d37 MOV R13D,ESI MOV R14,RDI LEA RAX,[RSP + 0x40] MOV qword ptr [RSP + 0x20],RAX LEA RAX,[RSP + 0x130] MOV qword ptr [RSP + 0x18],RAX MOV RAX,0x3000000010 MOV qword ptr [RSP + 0x10],RAX MOV EDI,0x1 MOV BL,0x1 MOV dword ptr [RSP + 0xc],ESI LAB_00114bca: MOV EAX,dword ptr [R14 + 0x8] CMP EAX,0x4 JZ 0x00114bf7 CMP EAX,0x2 JNZ 0x00114c91 MOV ECX,dword ptr [RSP + 0x10] CMP RCX,0x28 JA 0x00114c39 MOV RAX,RCX ADD RAX,qword ptr [RSP + 0x20] ADD ECX,0x8 MOV dword ptr [RSP + 0x10],ECX JMP 0x00114c47 LAB_00114bf7: MOV R13,RDI MOV RDI,qword ptr [R14 + 0x10] MOV EAX,dword ptr [RDI + 0x8] CMP EAX,0x8 JA 0x00114ca5 MOV ECX,0x103 BT ECX,EAX JNC 0x00114ca5 MOV R15,R14 MOV R14D,dword ptr [R14 + 0x18] CALL 0x00113690 MOV R12,RAX IMUL R12,R14 ADD R12,0x1f SHR R12,0x4 AND R12,-0x2 JMP 0x00114caf LAB_00114c39: MOV RAX,qword ptr [RSP + 0x18] LEA RCX,[RAX + 0x8] MOV qword ptr [RSP + 0x18],RCX LAB_00114c47: MOV R12D,dword ptr [R14 + 0x18] TEST R12,R12 JZ 0x00114c91 MOV qword ptr [RSP + 0x30],RDI MOV R13,qword ptr [RAX] MOV qword ptr [RSP + 0x38],R14 MOV R14,qword ptr [R14 + 0x10] XOR R15D,R15D LAB_00114c64: MOV RDI,qword ptr [R14] MOV RSI,R13 CALL 0x00105280 TEST EAX,EAX JZ 0x00114c99 INC R15 ADD R14,0x20 CMP R12,R15 JNZ 0x00114c64 XOR R12D,R12D XOR R15D,R15D MOV R13D,dword ptr [RSP + 0xc] MOV R14,qword ptr [RSP + 0x38] JMP 0x00114c9e LAB_00114c91: XOR R12D,R12D XOR R15D,R15D JMP 0x00114ce6 LAB_00114c99: MOV R13D,dword ptr [RSP + 0xc] LAB_00114c9e: MOV RDI,qword ptr [RSP + 0x30] JMP 0x00114ce6 LAB_00114ca5: MOV R15,R14 MOV R12D,dword ptr [R14 + 0x18] ADD R12D,R12D LAB_00114caf: MOV ECX,dword ptr [RSP + 0x10] CMP RCX,0x28 MOV RDI,R13 JA 0x00114ccd MOV RAX,RCX ADD RAX,qword ptr [RSP + 0x20] ADD ECX,0x8 MOV dword ptr [RSP + 0x10],ECX JMP 0x00114cdb LAB_00114ccd: MOV RAX,qword ptr [RSP + 0x18] LEA RCX,[RAX + 0x8] MOV qword ptr [RSP + 0x18],RCX LAB_00114cdb: MOV R14,R15 MOV R13D,dword ptr [RSP + 0xc] MOVSXD R15,dword ptr [RAX] LAB_00114ce6: TEST R12,R12 JZ 0x00114d1f CMP R12D,0x2 JNC 0x00114cf5 XOR ECX,ECX JMP 0x00114d0c LAB_00114cf5: BSR EAX,R12D MOV ECX,EAX XOR ECX,0xffffffe0 LEA EDX,[R12 + -0x1] ADD ECX,0x21 TEST R12D,EDX CMOVZ ECX,EAX LAB_00114d0c: MOV ESI,0x1 SHL RSI,CL ADD RSI,R15 CALL 0x00114d4e MOV RDI,RAX LAB_00114d1f: TEST R12,R12 JZ 0x00114d32 INC EBP CMP EBP,R13D SETL BL JNZ 0x00114bca LAB_00114d32: TEST BL,0x1 JZ 0x00114d39 LAB_00114d37: XOR EDI,EDI LAB_00114d39: MOV RAX,RDI ADD RSP,0xf8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 ssz_gindex(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 *param_9,int param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char *__s2; bool bVar1; char in_AL; int iVar2; long lVar3; int *piVar4; byte bVar5; uint uVar6; int iVar7; int8 uVar8; uint uVar9; ulong uVar10; int8 *puVar11; ulong uVar12; int *local_110; int local_e8 [4]; int8 local_d8; int8 local_d0; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; if (in_AL != '\0') { local_b8 = param_1; local_a8 = param_2; local_98 = param_3; local_88 = param_4; local_78 = param_5; local_68 = param_6; local_58 = param_7; local_48 = param_8; } iVar7 = 0; if (0 < param_10 && param_9 != (int8 *)0x0) { local_110 = (int *)&stack0x00000008; uVar6 = 0x10; uVar8 = 1; bVar1 = true; local_d8 = param_11; local_d0 = param_12; local_c8 = param_13; local_c0 = param_14; do { puVar11 = param_9; if (*(int *)(param_9 + 1) == 4) { if ((*(uint *)(param_9[2] + 8) < 9) && ((0x103U >> (*(uint *)(param_9[2] + 8) & 0x1f) & 1) != 0)) { uVar9 = *(uint *)(param_9 + 3); lVar3 = ssz_fixed_length(); uVar10 = lVar3 * (ulong)uVar9 + 0x1f >> 4 & 0xfffffffffffffffe; } else { uVar10 = (ulong)(uint)(*(int *)(param_9 + 3) * 2); } uVar12 = (ulong)uVar6; if (uVar12 < 0x29) { uVar6 = uVar6 + 8; piVar4 = (int *)((long)local_e8 + uVar12); } else { piVar4 = local_110; local_110 = local_110 + 2; } uVar12 = (ulong)*piVar4; } else { if (*(int *)(param_9 + 1) == 2) { uVar10 = (ulong)uVar6; if (uVar10 < 0x29) { uVar6 = uVar6 + 8; piVar4 = (int *)((long)local_e8 + uVar10); } else { piVar4 = local_110; local_110 = local_110 + 2; } uVar10 = (ulong)*(uint *)(param_9 + 3); if (uVar10 != 0) { __s2 = *(char **)piVar4; puVar11 = (int8 *)param_9[2]; uVar12 = 0; do { iVar2 = strcmp((char *)*puVar11,__s2); if (iVar2 == 0) goto LAB_00114ce6; uVar12 = uVar12 + 1; puVar11 = puVar11 + 4; } while (uVar10 != uVar12); uVar10 = 0; uVar12 = 0; puVar11 = param_9; goto LAB_00114ce6; } } uVar10 = 0; uVar12 = 0; } LAB_00114ce6: if (uVar10 != 0) { uVar9 = (uint)uVar10; if (uVar9 < 2) { bVar5 = 0; } else { iVar2 = 0x1f; if (uVar9 != 0) { for (; uVar9 >> iVar2 == 0; iVar2 = iVar2 + -1) { } } bVar5 = ((byte)iVar2 ^ 0xe0) + 0x21; if ((uVar9 & uVar9 - 1) == 0) { bVar5 = (byte)iVar2; } } uVar8 = ssz_add_gindex(uVar8,(1L << (bVar5 & 0x3f)) + uVar12); } if (uVar10 == 0) break; iVar7 = iVar7 + 1; bVar1 = iVar7 < param_10; param_9 = puVar11; } while (iVar7 != param_10); if (!bVar1) { return uVar8; } } return 0; }
4,621
minja::Parser::parseConstant()
llama.cpp/common/minja/minja.hpp
std::shared_ptr<Value> parseConstant() { auto start = it; consumeSpaces(); if (it == end) return nullptr; if (*it == '"' || *it == '\'') { auto str = parseString(); if (str) return std::make_shared<Value>(*str); } static std::regex prim_tok(R"(true\b|True\b|false\b|False\b|None\b)"); auto token = consumeToken(prim_tok); if (!token.empty()) { if (token == "true" || token == "True") return std::make_shared<Value>(true); if (token == "false" || token == "False") return std::make_shared<Value>(false); if (token == "None") return std::make_shared<Value>(nullptr); throw std::runtime_error("Unknown constant token: " + token); } auto number = parseNumber(it, end); if (!number.is_null()) return std::make_shared<Value>(number); it = start; return nullptr; }
O3
cpp
minja::Parser::parseConstant(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rsi, %r15 movq %rdi, %rbx leaq 0x20(%rsi), %r14 movq 0x18(%rsi), %r12 movq 0x20(%rsi), %r13 movq %r13, %rbp cmpq %r12, %r13 je 0xe347b movq %r13, %rbp movsbl (%rbp), %edi callq 0x20ce0 testl %eax, %eax je 0xe347b incq %rbp movq %rbp, (%r14) cmpq %r12, %rbp jne 0xe3463 cmpq %r12, %rbp je 0xe34d1 movzbl (%rbp), %eax cmpl $0x27, %eax je 0xe348e cmpl $0x22, %eax jne 0xe34dc leaq 0x8(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi callq 0xe4806 movq (%r12), %rdx testq %rdx, %rdx je 0xe34dc leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0xe4df8 movq 0x8(%rsp), %rsi testq %rsi, %rsi je 0xe3639 leaq 0x8(%rsp), %rdi callq 0xe4f9e jmp 0xe3639 xorps %xmm0, %xmm0 movups %xmm0, (%rbx) jmp 0xe3639 leaq 0x7f115(%rip), %rax # 0x1625f8 movb (%rax), %al testb %al, %al je 0xe364b leaq 0x7f0e4(%rip), %rdx # 0x1625d8 leaq 0x8(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi movl $0x1, %ecx callq 0xde032 cmpq $0x0, 0x8(%r12) je 0xe35b8 leaq 0x2ed27(%rip), %rsi # 0x112243 leaq 0x8(%rsp), %rdi callq 0x20f30 testl %eax, %eax je 0xe35a1 leaq 0x3b3f6(%rip), %rsi # 0x11e927 leaq 0x8(%rsp), %rdi callq 0x20f30 testl %eax, %eax je 0xe35a1 leaq 0x31c2a(%rip), %rsi # 0x115170 leaq 0x8(%rsp), %rdi callq 0x20f30 testl %eax, %eax je 0xe35e7 leaq 0x3b3cd(%rip), %rsi # 0x11e92c leaq 0x8(%rsp), %rdi callq 0x20f30 testl %eax, %eax je 0xe35e7 leaq 0x3b723(%rip), %rsi # 0x11ec97 leaq 0x8(%rsp), %rdi callq 0x20f30 testl %eax, %eax jne 0xe36a2 leaq 0x28(%rsp), %rdx movq $0x0, (%rdx) leaq 0x7(%rsp), %rsi movq %rbx, %rdi callq 0xe50be jmp 0xe361e leaq 0x7(%rsp), %rdx movb $0x1, (%rdx) leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0xe4fcc jmp 0xe361e leaq 0x18(%r15), %rcx leaq 0x28(%rsp), %rdi movq %r15, %rsi movq %r14, %rdx callq 0xe4886 cmpb $0x0, 0x28(%rsp) je 0xe35fe leaq 0x7(%rsp), %rsi leaq 0x28(%rsp), %rdx movq %rbx, %rdi callq 0xe51a6 jmp 0xe3607 leaq 0x7(%rsp), %rdx movb $0x0, (%rdx) leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0xe4fcc jmp 0xe361e movq %r13, (%r14) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) leaq 0x28(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x84452 movq %r14, %rdi callq 0x88b6c leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xe3639 movq 0x18(%rsp), %rsi incq %rsi callq 0x20170 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x7efa6(%rip), %rdi # 0x1625f8 callq 0x20580 testl %eax, %eax je 0xe34ed leaq 0x7ef72(%rip), %rdi # 0x1625d8 leaq 0x3cee6(%rip), %rsi # 0x120553 movl $0x10, %edx callq 0x653f0 leaq -0x7e1e2(%rip), %rdi # 0x6549c leaq 0x7ef53(%rip), %rsi # 0x1625d8 leaq 0x7e3bc(%rip), %rdx # 0x161a48 callq 0x20eb0 leaq 0x7ef60(%rip), %rdi # 0x1625f8 callq 0x20940 jmp 0xe34ed movl $0x10, %edi callq 0x20630 movq %rax, %r14 leaq 0x3cec2(%rip), %rsi # 0x120578 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x63dc9 movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %r14, %rdi callq 0x20460 xorl %ebp, %ebp movq 0x7d8e2(%rip), %rsi # 0x160fc0 movq 0x7d89b(%rip), %rdx # 0x160f80 movq %r14, %rdi callq 0x20a30 movq %rax, %rbx leaq 0x7ef01(%rip), %rdi # 0x1625f8 callq 0x206b0 jmp 0xe378c movq %rax, %rbx leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xe371f movq 0x38(%rsp), %rsi incq %rsi callq 0x20170 testb %bpl, %bpl jne 0xe3729 jmp 0xe3758 movq %rax, %rbx movq %r14, %rdi callq 0x20ed0 jmp 0xe3758 jmp 0xe3755 jmp 0xe3755 movq %rax, %rbx leaq 0x28(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x84452 movq %r14, %rdi callq 0x88b6c jmp 0xe3758 jmp 0xe3755 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xe378c movq 0x18(%rsp), %rsi incq %rsi callq 0x20170 jmp 0xe378c movq %rax, %rbx movq 0x8(%rsp), %rsi testq %rsi, %rsi je 0xe378c leaq 0x8(%rsp), %rdi callq 0xe4f9e movq %rbx, %rdi callq 0x20ad0
_ZN5minja6Parser13parseConstantEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r15, rsi mov rbx, rdi lea r14, [rsi+20h] mov r12, [rsi+18h] mov r13, [rsi+20h] mov rbp, r13 cmp r13, r12 jz short loc_E347B mov rbp, r13 loc_E3463: movsx edi, byte ptr [rbp+0] call _isspace test eax, eax jz short loc_E347B inc rbp mov [r14], rbp cmp rbp, r12 jnz short loc_E3463 loc_E347B: cmp rbp, r12 jz short loc_E34D1 movzx eax, byte ptr [rbp+0] cmp eax, 27h ; ''' jz short loc_E348E cmp eax, 22h ; '"' jnz short loc_E34DC loc_E348E: lea r12, [rsp+78h+var_70] mov rdi, r12; int mov rsi, r15; void * call _ZN5minja6Parser11parseStringB5cxx11Ev; minja::Parser::parseString(void) mov rdx, [r12] test rdx, rdx jz short loc_E34DC lea rsi, [rsp+78h+var_50] mov rdi, rbx call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIvEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,std::string &>(std::_Sp_alloc_shared_tag<std::allocator<void>>,std::string &) mov rsi, qword ptr [rsp+78h+var_70] test rsi, rsi jz loc_E3639 lea rdi, [rsp+78h+var_70] call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) jmp loc_E3639 loc_E34D1: xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 jmp loc_E3639 loc_E34DC: lea rax, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; `guard variable for'minja::Parser::parseConstant(void)::prim_tok mov al, [rax] test al, al jz loc_E364B loc_E34ED: lea rdx, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; int lea r12, [rsp+78h+var_70] mov rdi, r12; int mov rsi, r15; int mov ecx, 1; int call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) cmp qword ptr [r12+8], 0 jz loc_E35B8 lea rsi, aTrue; "true" lea rdi, [rsp+78h+var_70] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_E35A1 lea rsi, aTrue_0; "True" lea rdi, [rsp+78h+var_70] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_E35A1 lea rsi, aAdvancedOption+0ABh; "false" lea rdi, [rsp+78h+var_70] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz loc_E35E7 lea rsi, aFalse; "False" lea rdi, [rsp+78h+var_70] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_E35E7 lea rsi, aNone_0; "None" lea rdi, [rsp+78h+var_70] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jnz loc_E36A2 lea rdx, [rsp+78h+var_50] mov qword ptr [rdx], 0 lea rsi, [rsp+78h+var_71] mov rdi, rbx call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIvEJDnEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,decltype(nullptr)>(std::_Sp_alloc_shared_tag<std::allocator<void>>,decltype(nullptr) &&) jmp short loc_E361E loc_E35A1: lea rdx, [rsp+78h+var_71] mov byte ptr [rdx], 1 lea rsi, [rsp+78h+var_50] mov rdi, rbx call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIvEJbEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,bool>(std::_Sp_alloc_shared_tag<std::allocator<void>>,bool &&) jmp short loc_E361E loc_E35B8: lea rcx, [r15+18h] lea rdi, [rsp+78h+var_50] mov rsi, r15 mov rdx, r14 call _ZN5minja6Parser11parseNumberERN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKSB_; minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*,std::string> &,__gnu_cxx::__normal_iterator<char const*,std::string> const&) cmp [rsp+78h+var_50], 0 jz short loc_E35FE lea rsi, [rsp+78h+var_71] lea rdx, [rsp+78h+var_50] mov rdi, rbx call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIvEJRN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS8_14adl_serializerESB_IhSaIhEEvEEEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &>(std::_Sp_alloc_shared_tag<std::allocator<void>>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &) jmp short loc_E3607 loc_E35E7: lea rdx, [rsp+78h+var_71] mov byte ptr [rdx], 0 lea rsi, [rsp+78h+var_50] mov rdi, rbx call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIvEJbEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,bool>(std::_Sp_alloc_shared_tag<std::allocator<void>>,bool &&) jmp short loc_E361E loc_E35FE: mov [r14], r13 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 loc_E3607: lea r14, [rsp+78h+var_50] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() loc_E361E: lea rax, [rsp+78h+var_60] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_E3639 mov rsi, [rsp+78h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_E3639: mov rax, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_E364B: lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_E34ED lea rdi, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; minja::Parser::parseConstant(void)::prim_tok lea rsi, aTrueBTrueBFals; "true\\b|True\\b|false\\b|False\\b|None"... mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_E34ED loc_E36A2: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aUnknownConstan; "Unknown constant token: " lea rdi, [rsp+78h+var_50] lea rdx, [rsp+78h+var_70] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov bpl, 1 lea rsi, [rsp+78h+var_50] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard * call ___cxa_guard_abort jmp loc_E378C mov rbx, rax lea rax, [rsp+78h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_E371F mov rsi, [rsp+78h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_E371F: test bpl, bpl jnz short loc_E3729 jmp short loc_E3758 mov rbx, rax loc_E3729: mov rdi, r14; void * call ___cxa_free_exception jmp short loc_E3758 jmp short loc_E3755 jmp short loc_E3755 mov rbx, rax lea r14, [rsp+78h+var_50] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_E3758 jmp short $+2 loc_E3755: mov rbx, rax loc_E3758: lea rax, [rsp+78h+var_60] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_E378C mov rsi, [rsp+78h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_E378C mov rbx, rax mov rsi, qword ptr [rsp+78h+var_70] test rsi, rsi jz short loc_E378C lea rdi, [rsp+78h+var_70] call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) loc_E378C: mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::parseConstant(minja::Parser *this, unsigned __int8 **a2) { unsigned __int8 **v2; // r14 char *v3; // r12 unsigned __int8 *v4; // r13 unsigned __int8 *v5; // rbp int v6; // eax void *exception; // r14 char v9; // [rsp+7h] [rbp-71h] BYREF int v10[2]; // [rsp+8h] [rbp-70h] BYREF long long v11; // [rsp+10h] [rbp-68h] long long v12; // [rsp+18h] [rbp-60h] BYREF _QWORD v13[2]; // [rsp+28h] [rbp-50h] BYREF v2 = a2 + 4; v3 = (char *)a2[3]; v4 = a2[4]; v5 = v4; if ( v4 != (unsigned __int8 *)v3 ) { v5 = a2[4]; do { if ( !(unsigned int)isspace((unsigned int)(char)*v5) ) break; *v2 = ++v5; } while ( v5 != (unsigned __int8 *)v3 ); } if ( v5 == (unsigned __int8 *)v3 ) { *(_OWORD *)this = 0LL; } else { v6 = *v5; if ( (v6 == 39 || v6 == 34) && (minja::Parser::parseString[abi:cxx11]((int)v10, a2), *(_QWORD *)v10) ) { std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,std::string &>( this, v13); if ( *(_QWORD *)v10 ) std::default_delete<std::string>::operator()(v10); } else { if ( !(_BYTE)`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseConstant(void)::prim_tok[abi:cxx11], (long long)"true\\b|True\\b|false\\b|False\\b|None\\b", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseConstant(void)::prim_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11]); } minja::Parser::consumeToken( v10, (long long)a2, (long long)&minja::Parser::parseConstant(void)::prim_tok[abi:cxx11], 1u); if ( v11 ) { if ( !(unsigned int)std::string::compare(v10, "true") || !(unsigned int)std::string::compare(v10, "True") ) { v9 = 1; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,bool>( this, v13, &v9); } else if ( !(unsigned int)std::string::compare(v10, "false") || !(unsigned int)std::string::compare(v10, "False") ) { v9 = 0; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,bool>( this, v13, &v9); } else { if ( (unsigned int)std::string::compare(v10, "None") ) { exception = __cxa_allocate_exception(0x10uLL); std::operator+<char>((long long)v13, (long long)"Unknown constant token: ", v10); std::runtime_error::runtime_error(exception, v13); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v13[0] = 0LL; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,decltype(nullptr)>( this, &v9, v13); } } else { minja::Parser::parseNumber(v13, a2, v2, a2 + 3); if ( LOBYTE(v13[0]) ) { std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &>( this, &v9, v13); } else { *v2 = v4; *(_OWORD *)this = 0LL; } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v13); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v13); } if ( *(long long **)v10 != &v12 ) operator delete(*(void **)v10, v12 + 1); } } return this; }
parseConstant: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R15,RSI MOV RBX,RDI LEA R14,[RSI + 0x20] MOV R12,qword ptr [RSI + 0x18] MOV R13,qword ptr [RSI + 0x20] MOV RBP,R13 CMP R13,R12 JZ 0x001e347b MOV RBP,R13 LAB_001e3463: MOVSX EDI,byte ptr [RBP] CALL 0x00120ce0 TEST EAX,EAX JZ 0x001e347b INC RBP MOV qword ptr [R14],RBP CMP RBP,R12 JNZ 0x001e3463 LAB_001e347b: CMP RBP,R12 JZ 0x001e34d1 MOVZX EAX,byte ptr [RBP] CMP EAX,0x27 JZ 0x001e348e CMP EAX,0x22 JNZ 0x001e34dc LAB_001e348e: LEA R12,[RSP + 0x8] MOV RDI,R12 MOV RSI,R15 CALL 0x001e4806 MOV RDX,qword ptr [R12] TEST RDX,RDX JZ 0x001e34dc LAB_001e34a7: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x001e4df8 LAB_001e34b4: MOV RSI,qword ptr [RSP + 0x8] TEST RSI,RSI JZ 0x001e3639 LEA RDI,[RSP + 0x8] CALL 0x001e4f9e JMP 0x001e3639 LAB_001e34d1: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 JMP 0x001e3639 LAB_001e34dc: LEA RAX,[0x2625f8] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x001e364b LAB_001e34ed: LEA RDX,[0x2625d8] LEA R12,[RSP + 0x8] MOV RDI,R12 MOV RSI,R15 MOV ECX,0x1 CALL 0x001de032 CMP qword ptr [R12 + 0x8],0x0 JZ 0x001e35b8 LEA RSI,[0x212243] LEA RDI,[RSP + 0x8] CALL 0x00120f30 TEST EAX,EAX JZ 0x001e35a1 LEA RSI,[0x21e927] LEA RDI,[RSP + 0x8] CALL 0x00120f30 TEST EAX,EAX JZ 0x001e35a1 LEA RSI,[0x215170] LEA RDI,[RSP + 0x8] CALL 0x00120f30 TEST EAX,EAX JZ 0x001e35e7 LEA RSI,[0x21e92c] LEA RDI,[RSP + 0x8] CALL 0x00120f30 TEST EAX,EAX JZ 0x001e35e7 LEA RSI,[0x21ec97] LEA RDI,[RSP + 0x8] CALL 0x00120f30 TEST EAX,EAX JNZ 0x001e36a2 LEA RDX,[RSP + 0x28] MOV qword ptr [RDX],0x0 LAB_001e3592: LEA RSI,[RSP + 0x7] MOV RDI,RBX CALL 0x001e50be JMP 0x001e361e LAB_001e35a1: LEA RDX,[RSP + 0x7] MOV byte ptr [RDX],0x1 LAB_001e35a9: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x001e4fcc JMP 0x001e361e LAB_001e35b8: LEA RCX,[R15 + 0x18] LEA RDI,[RSP + 0x28] MOV RSI,R15 MOV RDX,R14 CALL 0x001e4886 CMP byte ptr [RSP + 0x28],0x0 JZ 0x001e35fe LAB_001e35d3: LEA RSI,[RSP + 0x7] LEA RDX,[RSP + 0x28] MOV RDI,RBX CALL 0x001e51a6 JMP 0x001e3607 LAB_001e35e7: LEA RDX,[RSP + 0x7] MOV byte ptr [RDX],0x0 LAB_001e35ef: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x001e4fcc JMP 0x001e361e LAB_001e35fe: MOV qword ptr [R14],R13 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 LAB_001e3607: LEA R14,[RSP + 0x28] MOV RDI,R14 XOR ESI,ESI CALL 0x00184452 MOV RDI,R14 CALL 0x00188b6c LAB_001e361e: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001e3639 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00120170 LAB_001e3639: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001e364b: LEA RDI,[0x2625f8] CALL 0x00120580 TEST EAX,EAX JZ 0x001e34ed LAB_001e365f: LEA RDI,[0x2625d8] LEA RSI,[0x220553] MOV EDX,0x10 CALL 0x001653f0 LAB_001e3677: LEA RDI,[0x16549c] LEA RSI,[0x2625d8] LEA RDX,[0x261a48] CALL 0x00120eb0 LEA RDI,[0x2625f8] CALL 0x00120940 JMP 0x001e34ed LAB_001e36a2: MOV EDI,0x10 CALL 0x00120630 MOV R14,RAX LAB_001e36af: LEA RSI,[0x220578] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x00163dc9 MOV BPL,0x1 LAB_001e36c8: LEA RSI,[RSP + 0x28] MOV RDI,R14 CALL 0x00120460 XOR EBP,EBP MOV RSI,qword ptr [0x00260fc0] MOV RDX,qword ptr [0x00260f80] MOV RDI,R14 CALL 0x00120a30
/* minja::Parser::parseConstant() */ void minja::Parser::parseConstant(void) { char *pcVar1; char *pcVar2; int iVar3; runtime_error *this; char *pcVar4; __normal_iterator *in_RSI; int8 *in_RDI; string *local_70; long local_68; long local_60 [2]; int8 local_50 [4]; pcVar1 = *(char **)(in_RSI + 0x18); pcVar2 = *(char **)(in_RSI + 0x20); pcVar4 = pcVar2; while ((pcVar4 != pcVar1 && (iVar3 = isspace((int)*pcVar4), iVar3 != 0))) { pcVar4 = pcVar4 + 1; *(char **)(in_RSI + 0x20) = pcVar4; } if (pcVar4 == pcVar1) { *in_RDI = 0; in_RDI[1] = 0; } else if (((*pcVar4 == '\'') || (*pcVar4 == '\"')) && (parseString_abi_cxx11_(), local_70 != (string *)0x0)) { /* try { // try from 001e34a7 to 001e34b3 has its CatchHandler @ 001e3775 */ std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>:: __shared_ptr<std::allocator<void>,std::__cxx11::string&>(); if (local_70 != (string *)0x0) { std::default_delete<std::__cxx11::string>::operator() ((default_delete<std::__cxx11::string> *)&local_70,local_70); } } else { if ((parseConstant()::prim_tok_abi_cxx11_ == '\0') && (iVar3 = __cxa_guard_acquire(&parseConstant()::prim_tok_abi_cxx11_), iVar3 != 0)) { /* try { // try from 001e365f to 001e3676 has its CatchHandler @ 001e36ed */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseConstant()::prim_tok_abi_cxx11_,"true\\b|True\\b|false\\b|False\\b|None\\b", 0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseConstant()::prim_tok_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseConstant()::prim_tok_abi_cxx11_); } consumeToken(&local_70); if (local_68 == 0) { /* try { // try from 001e35b8 to 001e35cb has its CatchHandler @ 001e3753 */ parseNumber((__normal_iterator *)local_50,in_RSI); if (local_50[0]._0_1_ == (data)0x0) { *(char **)(in_RSI + 0x20) = pcVar2; *in_RDI = 0; in_RDI[1] = 0; } else { /* try { // try from 001e35d3 to 001e35e4 has its CatchHandler @ 001e3737 */ std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>:: __shared_ptr<std::allocator<void>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&> (); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81((data *)local_50,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_50); } else { iVar3 = std::__cxx11::string::compare((char *)&local_70); if ((iVar3 == 0) || (iVar3 = std::__cxx11::string::compare((char *)&local_70), iVar3 == 0)) { /* try { // try from 001e35a9 to 001e35b5 has its CatchHandler @ 001e3755 */ std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>:: __shared_ptr<std::allocator<void>,bool>(); } else { iVar3 = std::__cxx11::string::compare((char *)&local_70); if ((iVar3 == 0) || (iVar3 = std::__cxx11::string::compare((char *)&local_70), iVar3 == 0)) { /* try { // try from 001e35ef to 001e35fb has its CatchHandler @ 001e3735 */ std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>:: __shared_ptr<std::allocator<void>,bool>(); } else { iVar3 = std::__cxx11::string::compare((char *)&local_70); if (iVar3 != 0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001e36af to 001e36c4 has its CatchHandler @ 001e3726 */ std::operator+((char *)local_50,(string *)"Unknown constant token: "); /* try { // try from 001e36c8 to 001e36ec has its CatchHandler @ 001e3701 */ std::runtime_error::runtime_error(this,(string *)local_50); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00260fc0,PTR__runtime_error_00260f80); } local_50[0] = 0; /* try { // try from 001e3592 to 001e359e has its CatchHandler @ 001e3733 */ std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>:: __shared_ptr<std::allocator<void>,decltype(nullptr)>(); } } } if (local_70 != (string *)local_60) { operator_delete(local_70,local_60[0] + 1); } } return; }
4,622
stbi__fill_bits(stbi__zbuf*)
llama.cpp/examples/llava/../../common/stb_image.h
static void stbi__fill_bits(stbi__zbuf *z) { do { if (z->code_buffer >= (1U << z->num_bits)) { z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ return; } z->code_buffer |= (unsigned int) stbi__zget8(z) << z->num_bits; z->num_bits += 8; } while (z->num_bits <= 24); }
O3
c
stbi__fill_bits(stbi__zbuf*): movl 0x10(%rdi), %ecx movl 0x18(%rdi), %eax movl %eax, %edx shrl %cl, %edx testl %edx, %edx jne 0x36095 movq (%rdi), %rsi xorl %edx, %edx cmpq 0x8(%rdi), %rsi jae 0x36080 leaq 0x1(%rsi), %rdx movq %rdx, (%rdi) movzbl (%rsi), %edx shll %cl, %edx orl %edx, %eax movl %eax, 0x18(%rdi) leal 0x8(%rcx), %edx movl %edx, 0x10(%rdi) cmpl $0x11, %ecx movl %edx, %ecx jl 0x36063 retq movq 0x8(%rdi), %rax movq %rax, (%rdi) retq
_ZL15stbi__fill_bitsP10stbi__zbuf: mov ecx, [rdi+10h] mov eax, [rdi+18h] loc_36063: mov edx, eax shr edx, cl test edx, edx jnz short loc_36095 mov rsi, [rdi] xor edx, edx cmp rsi, [rdi+8] jnb short loc_36080 lea rdx, [rsi+1] mov [rdi], rdx movzx edx, byte ptr [rsi] loc_36080: shl edx, cl or eax, edx mov [rdi+18h], eax lea edx, [rcx+8] mov [rdi+10h], edx cmp ecx, 11h mov ecx, edx jl short loc_36063 retn loc_36095: mov rax, [rdi+8] mov [rdi], rax retn
unsigned __int8 * stbi__fill_bits(unsigned __int8 **a1) { int v1; // ecx unsigned __int8 *result; // rax unsigned __int8 *v3; // rsi int v4; // edx bool v5; // cc v1 = *((_DWORD *)a1 + 4); LODWORD(result) = *((_DWORD *)a1 + 6); while ( !((unsigned int)result >> v1) ) { v3 = *a1; v4 = 0; if ( *a1 < a1[1] ) { *a1 = v3 + 1; v4 = *v3; } result = (unsigned __int8 *)((v4 << v1) | (unsigned int)result); *((_DWORD *)a1 + 6) = (_DWORD)result; *((_DWORD *)a1 + 4) = v1 + 8; v5 = v1 < 17; v1 += 8; if ( !v5 ) return result; } result = a1[1]; *a1 = result; return result; }
stbi__fill_bits: MOV ECX,dword ptr [RDI + 0x10] MOV EAX,dword ptr [RDI + 0x18] LAB_00136063: MOV EDX,EAX SHR EDX,CL TEST EDX,EDX JNZ 0x00136095 MOV RSI,qword ptr [RDI] XOR EDX,EDX CMP RSI,qword ptr [RDI + 0x8] JNC 0x00136080 LEA RDX,[RSI + 0x1] MOV qword ptr [RDI],RDX MOVZX EDX,byte ptr [RSI] LAB_00136080: SHL EDX,CL OR EAX,EDX MOV dword ptr [RDI + 0x18],EAX LEA EDX,[RCX + 0x8] MOV dword ptr [RDI + 0x10],EDX CMP ECX,0x11 MOV ECX,EDX JL 0x00136063 RET LAB_00136095: MOV RAX,qword ptr [RDI + 0x8] MOV qword ptr [RDI],RAX RET
/* stbi__fill_bits(stbi__zbuf*) */ void stbi__fill_bits(stbi__zbuf *param_1) { byte *pbVar1; bool bVar2; byte bVar3; uint uVar4; int iVar5; uint uVar6; uVar4 = *(uint *)(param_1 + 0x18); iVar5 = *(int *)(param_1 + 0x10); do { bVar3 = (byte)iVar5 & 0x1f; if (uVar4 >> bVar3 != 0) { *(int8 *)param_1 = *(int8 *)(param_1 + 8); return; } pbVar1 = *(byte **)param_1; uVar6 = 0 >> bVar3; if (pbVar1 < *(byte **)(param_1 + 8)) { *(byte **)param_1 = pbVar1 + 1; uVar6 = (uint)*pbVar1; } uVar4 = uVar4 | uVar6 << ((byte)iVar5 & 0x1f); *(uint *)(param_1 + 0x18) = uVar4; *(int *)(param_1 + 0x10) = iVar5 + 8; bVar2 = iVar5 < 0x11; iVar5 = iVar5 + 8; } while (bVar2); return; }
4,623
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_float(double)
llama.cpp/common/json.hpp
void dump_float(number_float_t x) { // NaN / inf if (!std::isfinite(x)) { o->write_characters("null", 4); return; } // If number_float_t is an IEEE-754 single or double precision number, // use the Grisu2 algorithm to produce short numbers which are // guaranteed to round-trip, using strtof and strtod, resp. // // NB: The test below works if <long double> == <double>. static constexpr bool is_ieee_single_or_double = (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 24 && std::numeric_limits<number_float_t>::max_exponent == 128) || (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 53 && std::numeric_limits<number_float_t>::max_exponent == 1024); dump_float(x, std::integral_constant<bool, is_ieee_single_or_double>()); }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_float(double): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq %xmm0, %rax btrq $0x3f, %rax movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000 cmpq %rcx, %rax jl 0x7e189 movq (%rbx), %rdi movq (%rdi), %rax movq 0x8(%rax), %rax leaq 0xa36cd(%rip), %rsi # 0x121848 movl $0x4, %edx addq $0x8, %rsp popq %rbx popq %r14 jmpq *%rax leaq 0x10(%rbx), %r14 leaq 0x50(%rbx), %rsi movq %r14, %rdi callq 0x7e5a5 movq (%rbx), %rdi subq %r14, %rax movq (%rdi), %rcx movq 0x8(%rcx), %rcx movq %r14, %rsi movq %rax, %rdx addq $0x8, %rsp popq %rbx popq %r14 jmpq *%rcx nop
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEd: push r14 push rbx push rax mov rbx, rdi movq rax, xmm0 btr rax, 3Fh ; '?' mov rcx, 7FF0000000000000h cmp rax, rcx jl short loc_7E189 mov rdi, [rbx] mov rax, [rdi] mov rax, [rax+8] lea rsi, aOnNull_0+5; "null" mov edx, 4 add rsp, 8 pop rbx pop r14 jmp rax loc_7E189: lea r14, [rbx+10h] lea rsi, [rbx+50h] mov rdi, r14; this call _ZN8nlohmann16json_abi_v3_11_36detail8to_charsIdEEPcS3_PKcT_; nlohmann::json_abi_v3_11_3::detail::to_chars<double>(char *,char const*,double) mov rdi, [rbx] sub rax, r14 mov rcx, [rdi] mov rcx, [rcx+8] mov rsi, r14 mov rdx, rax add rsp, 8 pop rbx pop r14 jmp rcx
long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::dump_float( _QWORD *a1, double a2) { long long v3; // rax if ( (*(_QWORD *)&a2 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL ) return (*(long long ( **)(_QWORD, char *, long long))(*(_QWORD *)*a1 + 8LL))(*a1, "null", 4LL); v3 = nlohmann::json_abi_v3_11_3::detail::to_chars<double>((nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)(a1 + 2)); return (*(long long ( **)(_QWORD, _QWORD *, long long))(*(_QWORD *)*a1 + 8LL))( *a1, a1 + 2, v3 - (_QWORD)(a1 + 2)); }
dump_float: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOVQ RAX,XMM0 BTR RAX,0x3f MOV RCX,0x7ff0000000000000 CMP RAX,RCX JL 0x0017e189 MOV RDI,qword ptr [RBX] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x8] LEA RSI,[0x221848] MOV EDX,0x4 ADD RSP,0x8 POP RBX POP R14 JMP RAX LAB_0017e189: LEA R14,[RBX + 0x10] LEA RSI,[RBX + 0x50] MOV RDI,R14 CALL 0x0017e5a5 MOV RDI,qword ptr [RBX] SUB RAX,R14 MOV RCX,qword ptr [RDI] MOV RCX,qword ptr [RCX + 0x8] MOV RSI,R14 MOV RDX,RAX ADD RSP,0x8 POP RBX POP R14 JMP RCX
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::dump_float(double) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::dump_float(serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,double param_1) { serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *psVar1; code *UNRECOVERED_JUMPTABLE; char *pcVar2; if (0x7fefffffffffffff < (ulong)ABS(param_1)) { /* WARNING: Could not recover jumptable at 0x0017e187. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(**(long **)this + 8))(*(long **)this,"null",4); return; } psVar1 = this + 0x10; pcVar2 = to_chars<double>((char *)psVar1,(char *)(this + 0x50),param_1); UNRECOVERED_JUMPTABLE = *(code **)(**(long **)this + 8); /* WARNING: Could not recover jumptable at 0x0017e1b3. Too many branches */ /* WARNING: Treating indirect jump as call */ (*UNRECOVERED_JUMPTABLE)(*(long **)this,psVar1,(long)pcVar2 - (long)psVar1,UNRECOVERED_JUMPTABLE); return; }
4,624
ggml_opt_fit
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp
void ggml_opt_fit( ggml_backend_sched_t backend_sched, ggml_context * ctx_compute, ggml_tensor * inputs, ggml_tensor * outputs, ggml_opt_dataset_t dataset, enum ggml_opt_loss_type loss_type, ggml_opt_get_optimizer_params get_opt_pars, int64_t nepoch, int64_t nbatch_logical, float val_split, bool silent) { ggml_time_init(); const int64_t t_start_us = ggml_time_us(); const int64_t ndata = ggml_opt_dataset_data(dataset)->ne[1]; const int64_t nbatch_physical = inputs->ne[1]; GGML_ASSERT(ndata % nbatch_logical == 0); GGML_ASSERT(nbatch_logical % nbatch_physical == 0); const int64_t opt_period = nbatch_logical / nbatch_physical; const int64_t nbatches_logical = ndata / nbatch_logical; GGML_ASSERT(val_split >= 0.0f); GGML_ASSERT(val_split < 1.0f); const int64_t ibatch_split = int64_t(((1.0f - val_split) * nbatches_logical)) * opt_period; // train <-> val split index (physical) const int64_t idata_split = ibatch_split * nbatch_physical; int64_t epoch = 1; ggml_opt_params params = ggml_opt_default_params(backend_sched, ctx_compute, inputs, outputs, loss_type); params.opt_period = opt_period; params.get_opt_pars = get_opt_pars; params.get_opt_pars_ud = &epoch; ggml_opt_context_t opt_ctx = ggml_opt_init(params); // Shuffling the data is generally useful but there is only a point if not all data is used in a single batch. if (nbatch_logical < ndata) { ggml_opt_dataset_shuffle(opt_ctx, dataset, -1); // Shuffle all data (train + validation). } ggml_opt_result_t result_train = ggml_opt_result_init(); ggml_opt_result_t result_val = ggml_opt_result_init(); ggml_opt_epoch_callback epoch_callback = silent ? nullptr : ggml_opt_epoch_callback_progress_bar; for (; epoch <= nepoch; ++epoch) { if (nbatch_logical < idata_split) { ggml_opt_dataset_shuffle(opt_ctx, dataset, idata_split); } ggml_opt_result_reset(result_train); ggml_opt_result_reset(result_val); if (!silent) { fprintf(stderr, "%s: epoch %04" PRId64 "/%04" PRId64 ":\n", __func__, epoch, nepoch); } ggml_opt_epoch(opt_ctx, dataset, result_train, result_val, idata_split, epoch_callback, epoch_callback); if (!silent) { fprintf(stderr, "\n"); } } if (!silent) { int64_t t_total_s = (ggml_time_us() - t_start_us) / 1000000; const int64_t t_total_h = t_total_s / 3600; t_total_s -= t_total_h * 3600; const int64_t t_total_m = t_total_s / 60; t_total_s -= t_total_m * 60; fprintf(stderr, "%s: training took %02" PRId64 ":%02" PRId64 ":%02" PRId64 "\n", __func__, t_total_h, t_total_m, t_total_s); } ggml_opt_free(opt_ctx); ggml_opt_result_free(result_train); ggml_opt_result_free(result_val); }
O0
cpp
ggml_opt_fit: pushq %rbp movq %rsp, %rbp subq $0x170, %rsp # imm = 0x170 movb 0x28(%rbp), %al movq 0x20(%rbp), %r10 movq 0x18(%rbp), %r10 movq 0x10(%rbp), %r10 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movl %r9d, -0x2c(%rbp) movss %xmm0, -0x30(%rbp) andb $0x1, %al movb %al, -0x31(%rbp) callq 0x429b0 callq 0x48f40 movq %rax, -0x40(%rbp) movq -0x28(%rbp), %rdi callq 0x46c60 movq 0x18(%rax), %rax movq %rax, -0x48(%rbp) movq -0x18(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x50(%rbp) movq -0x48(%rbp), %rax cqto idivq 0x20(%rbp) cmpq $0x0, %rdx je 0x66ae8 leaq 0x4ee72(%rip), %rdi # 0xb5940 movl $0x31c, %esi # imm = 0x31C leaq 0x4ab2f(%rip), %rdx # 0xb1609 leaq 0x4f277(%rip), %rcx # 0xb5d58 movb $0x0, %al callq 0x48a00 movq 0x20(%rbp), %rax cqto idivq -0x50(%rbp) cmpq $0x0, %rdx je 0x66b19 leaq 0x4ee41(%rip), %rdi # 0xb5940 movl $0x31d, %esi # imm = 0x31D leaq 0x4aafe(%rip), %rdx # 0xb1609 leaq 0x4f262(%rip), %rcx # 0xb5d74 movb $0x0, %al callq 0x48a00 movq 0x20(%rbp), %rax cqto idivq -0x50(%rbp) movq %rax, -0x58(%rbp) movq -0x48(%rbp), %rax cqto idivq 0x20(%rbp) movq %rax, -0x60(%rbp) movss -0x30(%rbp), %xmm0 xorps %xmm1, %xmm1 ucomiss %xmm1, %xmm0 jae 0x66b63 leaq 0x4edf7(%rip), %rdi # 0xb5940 movl $0x322, %esi # imm = 0x322 leaq 0x4aab4(%rip), %rdx # 0xb1609 leaq 0x4f23e(%rip), %rcx # 0xb5d9a movb $0x0, %al callq 0x48a00 movss 0x4a8bd(%rip), %xmm0 # 0xb1428 ucomiss -0x30(%rbp), %xmm0 ja 0x66b92 leaq 0x4edc8(%rip), %rdi # 0xb5940 movl $0x323, %esi # imm = 0x323 leaq 0x4aa85(%rip), %rdx # 0xb1609 leaq 0x4f221(%rip), %rcx # 0xb5dac movb $0x0, %al callq 0x48a00 movss 0x4a88e(%rip), %xmm0 # 0xb1428 subss -0x30(%rbp), %xmm0 cvtsi2ssq -0x60(%rbp), %xmm1 mulss %xmm1, %xmm0 cvttss2si %xmm0, %rax imulq -0x58(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x68(%rbp), %rax imulq -0x50(%rbp), %rax movq %rax, -0x70(%rbp) movq $0x1, -0x78(%rbp) movq -0x8(%rbp), %rsi movq -0x10(%rbp), %rdx movq -0x18(%rbp), %rcx movq -0x20(%rbp), %r8 movl -0x2c(%rbp), %r9d leaq -0xb8(%rbp), %rdi callq 0x48150 movq -0x58(%rbp), %rax movl %eax, -0x90(%rbp) movq 0x10(%rbp), %rax movq %rax, -0x88(%rbp) leaq -0x78(%rbp), %rax movq %rax, -0x80(%rbp) leaq -0x100(%rbp), %rdi leaq -0xb8(%rbp), %rsi movl $0x40, %edx callq 0x453f0 movups -0x100(%rbp), %xmm0 movups -0xf0(%rbp), %xmm1 movups -0xe0(%rbp), %xmm2 movups -0xd0(%rbp), %xmm3 movq %rsp, %rax movups %xmm3, 0x30(%rax) movups %xmm2, 0x20(%rax) movups %xmm1, 0x10(%rax) movups %xmm0, (%rax) callq 0x47080 movq %rax, -0xc0(%rbp) movq 0x20(%rbp), %rax cmpq -0x48(%rbp), %rax jge 0x66c7c movq -0xc0(%rbp), %rdi movq -0x28(%rbp), %rsi movq $-0x1, %rdx callq 0x471a0 callq 0x479a0 movq %rax, -0x108(%rbp) callq 0x479a0 movq %rax, -0x110(%rbp) movb -0x31(%rbp), %dl movq 0x79342(%rip), %rax # 0xdffe0 xorl %ecx, %ecx testb $0x1, %dl cmovneq %rcx, %rax movq %rax, -0x118(%rbp) movq -0x78(%rbp), %rax cmpq 0x18(%rbp), %rax jg 0x66d84 movq 0x20(%rbp), %rax cmpq -0x70(%rbp), %rax jge 0x66cda movq -0xc0(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x70(%rbp), %rdx callq 0x471a0 movq -0x108(%rbp), %rdi callq 0x43de0 movq -0x110(%rbp), %rdi callq 0x43de0 testb $0x1, -0x31(%rbp) jne 0x66d1f movq 0x792d1(%rip), %rax # 0xdffd0 movq (%rax), %rdi movq -0x78(%rbp), %rcx movq 0x18(%rbp), %r8 leaq 0x4f0ac(%rip), %rsi # 0xb5dbd leaq 0x4f0bd(%rip), %rdx # 0xb5dd5 movb $0x0, %al callq 0x47a10 movq -0xc0(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x108(%rbp), %rdx movq -0x110(%rbp), %rcx movq -0x70(%rbp), %r8 movq -0x118(%rbp), %r9 movq -0x118(%rbp), %rax movq %rax, (%rsp) callq 0x46320 testb $0x1, -0x31(%rbp) jne 0x66d71 movq 0x79270(%rip), %rax # 0xdffd0 movq (%rax), %rdi leaq 0x5b812(%rip), %rsi # 0xc257c movb $0x0, %al callq 0x47a10 jmp 0x66d73 movq -0x78(%rbp), %rax addq $0x1, %rax movq %rax, -0x78(%rbp) jmp 0x66cae testb $0x1, -0x31(%rbp) jne 0x66e41 callq 0x48f40 subq -0x40(%rbp), %rax movl $0xf4240, %ecx # imm = 0xF4240 cqto idivq %rcx movq %rax, -0x120(%rbp) movq -0x120(%rbp), %rax movl $0xe10, %ecx # imm = 0xE10 cqto idivq %rcx movq %rax, -0x128(%rbp) imulq $0xe10, -0x128(%rbp), %rcx # imm = 0xE10 movq -0x120(%rbp), %rax subq %rcx, %rax movq %rax, -0x120(%rbp) movq -0x120(%rbp), %rax movl $0x3c, %ecx cqto idivq %rcx movq %rax, -0x130(%rbp) imulq $0x3c, -0x130(%rbp), %rcx movq -0x120(%rbp), %rax subq %rcx, %rax movq %rax, -0x120(%rbp) movq 0x791bc(%rip), %rax # 0xdffd0 movq (%rax), %rdi movq -0x128(%rbp), %rcx movq -0x130(%rbp), %r8 movq -0x120(%rbp), %r9 leaq 0x4efaf(%rip), %rsi # 0xb5de2 leaq 0x4ef9b(%rip), %rdx # 0xb5dd5 movb $0x0, %al callq 0x47a10 movq -0xc0(%rbp), %rdi callq 0x44280 movq -0x108(%rbp), %rdi callq 0x47b60 movq -0x110(%rbp), %rdi callq 0x47b60 addq $0x170, %rsp # imm = 0x170 popq %rbp retq nop
ggml_opt_fit: push rbp mov rbp, rsp sub rsp, 170h mov al, [rbp+arg_18] mov r10, [rbp+arg_10] mov r10, [rbp+arg_8] mov r10, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_2C], r9d movss [rbp+var_30], xmm0 and al, 1 mov [rbp+var_31], al call _ggml_time_init call _ggml_time_us mov [rbp+var_40], rax mov rdi, [rbp+var_28] call _ggml_opt_dataset_data mov rax, [rax+18h] mov [rbp+var_48], rax mov rax, [rbp+var_18] mov rax, [rax+18h] mov [rbp+var_50], rax mov rax, [rbp+var_48] cqo idiv [rbp+arg_10] cmp rdx, 0 jz short loc_66AE8 lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... mov esi, 31Ch lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNdataNbatchLog; "ndata % nbatch_logical == 0" mov al, 0 call _ggml_abort loc_66AE8: mov rax, [rbp+arg_10] cqo idiv [rbp+var_50] cmp rdx, 0 jz short loc_66B19 lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... mov esi, 31Dh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNbatchLogicalN; "nbatch_logical % nbatch_physical == 0" mov al, 0 call _ggml_abort loc_66B19: mov rax, [rbp+arg_10] cqo idiv [rbp+var_50] mov [rbp+var_58], rax mov rax, [rbp+var_48] cqo idiv [rbp+arg_10] mov [rbp+var_60], rax movss xmm0, [rbp+var_30] xorps xmm1, xmm1 ucomiss xmm0, xmm1 jnb short loc_66B63 lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... mov esi, 322h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aValSplit00f; "val_split >= 0.0f" mov al, 0 call _ggml_abort loc_66B63: movss xmm0, cs:dword_B1428 ucomiss xmm0, [rbp+var_30] ja short loc_66B92 lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... mov esi, 323h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aValSplit10f; "val_split < 1.0f" mov al, 0 call _ggml_abort loc_66B92: movss xmm0, cs:dword_B1428 subss xmm0, [rbp+var_30] cvtsi2ss xmm1, [rbp+var_60] mulss xmm0, xmm1 cvttss2si rax, xmm0 imul rax, [rbp+var_58] mov [rbp+var_68], rax mov rax, [rbp+var_68] imul rax, [rbp+var_50] mov [rbp+var_70], rax mov [rbp+var_78], 1 mov rsi, [rbp+var_8] mov rdx, [rbp+var_10] mov rcx, [rbp+var_18] mov r8, [rbp+var_20] mov r9d, [rbp+var_2C] lea rdi, [rbp+var_B8] call _ggml_opt_default_params mov rax, [rbp+var_58] mov [rbp+var_90], eax mov rax, [rbp+arg_0] mov [rbp+var_88], rax lea rax, [rbp+var_78] mov [rbp+var_80], rax lea rdi, [rbp+var_100] lea rsi, [rbp+var_B8] mov edx, 40h ; '@' call _memcpy movups xmm0, [rbp+var_100] movups xmm1, [rbp+var_F0] movups xmm2, [rbp+var_E0] movups xmm3, [rbp+var_D0] mov rax, rsp movups xmmword ptr [rax+30h], xmm3 movups xmmword ptr [rax+20h], xmm2 movups xmmword ptr [rax+10h], xmm1 movups xmmword ptr [rax], xmm0 call _ggml_opt_init mov [rbp+var_C0], rax mov rax, [rbp+arg_10] cmp rax, [rbp+var_48] jge short loc_66C7C mov rdi, [rbp+var_C0] mov rsi, [rbp+var_28] mov rdx, 0FFFFFFFFFFFFFFFFh call _ggml_opt_dataset_shuffle loc_66C7C: call _ggml_opt_result_init mov [rbp+var_108], rax call _ggml_opt_result_init mov [rbp+var_110], rax mov dl, [rbp+var_31] mov rax, cs:ggml_opt_epoch_callback_progress_bar_ptr xor ecx, ecx test dl, 1 cmovnz rax, rcx mov [rbp+var_118], rax loc_66CAE: mov rax, [rbp+var_78] cmp rax, [rbp+arg_8] jg loc_66D84 mov rax, [rbp+arg_10] cmp rax, [rbp+var_70] jge short loc_66CDA mov rdi, [rbp+var_C0] mov rsi, [rbp+var_28] mov rdx, [rbp+var_70] call _ggml_opt_dataset_shuffle loc_66CDA: mov rdi, [rbp+var_108] call _ggml_opt_result_reset mov rdi, [rbp+var_110] call _ggml_opt_result_reset test [rbp+var_31], 1 jnz short loc_66D1F mov rax, cs:stderr_ptr mov rdi, [rax] mov rcx, [rbp+var_78] mov r8, [rbp+arg_8] lea rsi, aSEpoch04ld04ld; "%s: epoch %04ld/%04ld:\n" lea rdx, aGgmlOptFit_0; "ggml_opt_fit" mov al, 0 call _fprintf loc_66D1F: mov rdi, [rbp+var_C0] mov rsi, [rbp+var_28] mov rdx, [rbp+var_108] mov rcx, [rbp+var_110] mov r8, [rbp+var_70] mov r9, [rbp+var_118] mov rax, [rbp+var_118] mov [rsp+170h+var_170], rax call _ggml_opt_epoch test [rbp+var_31], 1 jnz short loc_66D71 mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aSDuplicateKeyS+2Fh; "\n" mov al, 0 call _fprintf loc_66D71: jmp short $+2 loc_66D73: mov rax, [rbp+var_78] add rax, 1 mov [rbp+var_78], rax jmp loc_66CAE loc_66D84: test [rbp+var_31], 1 jnz loc_66E41 call _ggml_time_us sub rax, [rbp+var_40] mov ecx, offset unk_F4240 cqo idiv rcx mov [rbp+var_120], rax mov rax, [rbp+var_120] mov ecx, 0E10h cqo idiv rcx mov [rbp+var_128], rax imul rcx, [rbp+var_128], 0E10h mov rax, [rbp+var_120] sub rax, rcx mov [rbp+var_120], rax mov rax, [rbp+var_120] mov ecx, 3Ch ; '<' cqo idiv rcx mov [rbp+var_130], rax imul rcx, [rbp+var_130], 3Ch ; '<' mov rax, [rbp+var_120] sub rax, rcx mov [rbp+var_120], rax mov rax, cs:stderr_ptr mov rdi, [rax] mov rcx, [rbp+var_128] mov r8, [rbp+var_130] mov r9, [rbp+var_120] lea rsi, aSTrainingTook0; "%s: training took %02ld:%02ld:%02ld\n" lea rdx, aGgmlOptFit_0; "ggml_opt_fit" mov al, 0 call _fprintf loc_66E41: mov rdi, [rbp+var_C0] call _ggml_opt_free mov rdi, [rbp+var_108] call _ggml_opt_result_free mov rdi, [rbp+var_110] call _ggml_opt_result_free add rsp, 170h pop rbp retn
void ggml_opt_fit( long long a1, long long a2, long long a3, long long a4, long long a5, int a6, float a7, double a8, double a9, double a10, double a11, double a12, __m128 a13, __m128 a14, long long a15, long long a16, long long a17, char a18) { long long v18; // rdx long long *v19; // rdi char *v20; // rsi long long v21; // rdx long long v22; // rcx long long v23; // r8 long long v24; // r9 double v25; // xmm4_8 double v26; // xmm5_8 long long v27; // rdx void ( *v28)(long long, long long, _QWORD *, long long *, long long, long long, long long); // rax long long v29; // rax void ( *v30)(long long, long long, _QWORD *, long long *, long long, long long, long long); // [rsp+58h] [rbp-118h] ggml_opt_result *v31; // [rsp+60h] [rbp-110h] ggml_opt_result *v32; // [rsp+68h] [rbp-108h] long long v33[2]; // [rsp+70h] [rbp-100h] BYREF __m128 v34; // [rsp+80h] [rbp-F0h] __m128 v35; // [rsp+90h] [rbp-E0h] __m128 v36; // [rsp+A0h] [rbp-D0h] long long *v37; // [rsp+B0h] [rbp-C0h] _BYTE v38[40]; // [rsp+B8h] [rbp-B8h] BYREF int v39; // [rsp+E0h] [rbp-90h] long long v40; // [rsp+E8h] [rbp-88h] long long *v41; // [rsp+F0h] [rbp-80h] long long v42; // [rsp+F8h] [rbp-78h] BYREF long long v43; // [rsp+100h] [rbp-70h] long long v44; // [rsp+108h] [rbp-68h] long long v45; // [rsp+110h] [rbp-60h] long long v46; // [rsp+118h] [rbp-58h] long long v47; // [rsp+120h] [rbp-50h] long long v48; // [rsp+128h] [rbp-48h] long long v49; // [rsp+130h] [rbp-40h] char v50; // [rsp+13Fh] [rbp-31h] float v51; // [rsp+140h] [rbp-30h] int v52; // [rsp+144h] [rbp-2Ch] char *v53; // [rsp+148h] [rbp-28h] long long v54; // [rsp+150h] [rbp-20h] long long v55; // [rsp+158h] [rbp-18h] long long v56; // [rsp+160h] [rbp-10h] long long v57; // [rsp+168h] [rbp-8h] v57 = a1; v56 = a2; v55 = a3; v54 = a4; v53 = (char *)a5; v52 = a6; v51 = a7; v50 = a18 & 1; ggml_time_init(); v49 = ggml_time_us(a1, a2, v18); v48 = *(_QWORD *)(ggml_opt_dataset_data((long long)v53) + 24); v47 = *(_QWORD *)(v55 + 24); if ( v48 % a17 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp", 796, (long long)"GGML_ASSERT(%s) failed", "ndata % nbatch_logical == 0"); if ( a17 % v47 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp", 797, (long long)"GGML_ASSERT(%s) failed", "nbatch_logical % nbatch_physical == 0"); v46 = a17 / v47; v45 = v48 / a17; if ( v51 < 0.0 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp", 802, (long long)"GGML_ASSERT(%s) failed", "val_split >= 0.0f"); if ( v51 >= 1.0 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp", 803, (long long)"GGML_ASSERT(%s) failed", "val_split < 1.0f"); v44 = v46 * (unsigned int)(int)(float)((float)(1.0 - v51) * (float)(int)v45); v43 = v47 * v44; v42 = 1LL; ggml_opt_default_params((long long)v38, v57, v56, v55, v54, v52); v39 = v46; v40 = a15; v41 = &v42; v19 = v33; v20 = v38; memcpy(v33, v38, 64LL); v37 = ggml_opt_init( *(double *)v33, v34, v35, v36, v25, v26, a13, a14, (long long)v33, (long long)v38, v21, v22, v23, v24, v33[0], v33[1], v34.m128_i64[0], v34.m128_i64[1], v35.m128_i64[0], v35.m128_i32[2], v36.m128_i64[0], v36.m128_i64[1]); if ( a17 < v48 ) { v19 = v37; v20 = v53; ggml_opt_dataset_shuffle((long long)v37, (long long)v53, -1LL); } v32 = ggml_opt_result_init(); v31 = ggml_opt_result_init(); LOBYTE(v27) = v50; v28 = (void ( *)(long long, long long, _QWORD *, long long *, long long, long long, long long))ggml_opt_epoch_callback_progress_bar; if ( (v50 & 1) != 0 ) v28 = 0LL; v30 = v28; while ( v42 <= a16 ) { if ( a17 < v43 ) ggml_opt_dataset_shuffle((long long)v37, (long long)v53, v43); ggml_opt_result_reset(v32); ggml_opt_result_reset(v31); if ( (v50 & 1) == 0 ) fprintf(stderr, "%s: epoch %04ld/%04ld:\n", "ggml_opt_fit", v42, a16); v19 = v37; v20 = v53; ggml_opt_epoch( (long long)v37, (long long)v53, (long long *)v32, (long long)v31, v43, v30, (void ( *)(_QWORD, long long, _QWORD *, long long, long long, long long, long long))v30); if ( (v50 & 1) == 0 ) { v19 = (long long *)stderr; v20 = "\n"; fprintf(stderr, "\n"); } ++v42; } if ( (v50 & 1) == 0 ) { v29 = ggml_time_us(v19, v20, v27); v20 = "%s: training took %02ld:%02ld:%02ld\n"; fprintf( stderr, "%s: training took %02ld:%02ld:%02ld\n", "ggml_opt_fit", (v29 - v49) / (long long)&unk_F4240 / 3600, (v29 - v49) / (long long)&unk_F4240 % 3600 / 60, (v29 - v49) / (long long)&unk_F4240 % 3600 % 60); } ggml_opt_free(v37, (long long)v20); ggml_opt_result_free(v32); ggml_opt_result_free(v31); }
ggml_opt_fit: PUSH RBP MOV RBP,RSP SUB RSP,0x170 MOV AL,byte ptr [RBP + 0x28] MOV R10,qword ptr [RBP + 0x20] MOV R10,qword ptr [RBP + 0x18] MOV R10,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV dword ptr [RBP + -0x2c],R9D MOVSS dword ptr [RBP + -0x30],XMM0 AND AL,0x1 MOV byte ptr [RBP + -0x31],AL CALL 0x001429b0 CALL 0x00148f40 MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x28] CALL 0x00146c60 MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x48] CQO IDIV qword ptr [RBP + 0x20] CMP RDX,0x0 JZ 0x00166ae8 LEA RDI,[0x1b5940] MOV ESI,0x31c LEA RDX,[0x1b1609] LEA RCX,[0x1b5d58] MOV AL,0x0 CALL 0x00148a00 LAB_00166ae8: MOV RAX,qword ptr [RBP + 0x20] CQO IDIV qword ptr [RBP + -0x50] CMP RDX,0x0 JZ 0x00166b19 LEA RDI,[0x1b5940] MOV ESI,0x31d LEA RDX,[0x1b1609] LEA RCX,[0x1b5d74] MOV AL,0x0 CALL 0x00148a00 LAB_00166b19: MOV RAX,qword ptr [RBP + 0x20] CQO IDIV qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x48] CQO IDIV qword ptr [RBP + 0x20] MOV qword ptr [RBP + -0x60],RAX MOVSS XMM0,dword ptr [RBP + -0x30] XORPS XMM1,XMM1 UCOMISS XMM0,XMM1 JNC 0x00166b63 LEA RDI,[0x1b5940] MOV ESI,0x322 LEA RDX,[0x1b1609] LEA RCX,[0x1b5d9a] MOV AL,0x0 CALL 0x00148a00 LAB_00166b63: MOVSS XMM0,dword ptr [0x001b1428] UCOMISS XMM0,dword ptr [RBP + -0x30] JA 0x00166b92 LEA RDI,[0x1b5940] MOV ESI,0x323 LEA RDX,[0x1b1609] LEA RCX,[0x1b5dac] MOV AL,0x0 CALL 0x00148a00 LAB_00166b92: MOVSS XMM0,dword ptr [0x001b1428] SUBSS XMM0,dword ptr [RBP + -0x30] CVTSI2SS XMM1,qword ptr [RBP + -0x60] MULSS XMM0,XMM1 CVTTSS2SI RAX,XMM0 IMUL RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x68] IMUL RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x70],RAX MOV qword ptr [RBP + -0x78],0x1 MOV RSI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x20] MOV R9D,dword ptr [RBP + -0x2c] LEA RDI,[RBP + -0xb8] CALL 0x00148150 MOV RAX,qword ptr [RBP + -0x58] MOV dword ptr [RBP + -0x90],EAX MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x88],RAX LEA RAX,[RBP + -0x78] MOV qword ptr [RBP + -0x80],RAX LEA RDI,[RBP + -0x100] LEA RSI,[RBP + -0xb8] MOV EDX,0x40 CALL 0x001453f0 MOVUPS XMM0,xmmword ptr [RBP + -0x100] MOVUPS XMM1,xmmword ptr [RBP + -0xf0] MOVUPS XMM2,xmmword ptr [RBP + -0xe0] MOVUPS XMM3,xmmword ptr [RBP + -0xd0] MOV RAX,RSP MOVUPS xmmword ptr [RAX + 0x30],XMM3 MOVUPS xmmword ptr [RAX + 0x20],XMM2 MOVUPS xmmword ptr [RAX + 0x10],XMM1 MOVUPS xmmword ptr [RAX],XMM0 CALL 0x00147080 MOV qword ptr [RBP + -0xc0],RAX MOV RAX,qword ptr [RBP + 0x20] CMP RAX,qword ptr [RBP + -0x48] JGE 0x00166c7c MOV RDI,qword ptr [RBP + -0xc0] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,-0x1 CALL 0x001471a0 LAB_00166c7c: CALL 0x001479a0 MOV qword ptr [RBP + -0x108],RAX CALL 0x001479a0 MOV qword ptr [RBP + -0x110],RAX MOV DL,byte ptr [RBP + -0x31] MOV RAX,qword ptr [0x001dffe0] XOR ECX,ECX TEST DL,0x1 CMOVNZ RAX,RCX MOV qword ptr [RBP + -0x118],RAX LAB_00166cae: MOV RAX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RBP + 0x18] JG 0x00166d84 MOV RAX,qword ptr [RBP + 0x20] CMP RAX,qword ptr [RBP + -0x70] JGE 0x00166cda MOV RDI,qword ptr [RBP + -0xc0] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x70] CALL 0x001471a0 LAB_00166cda: MOV RDI,qword ptr [RBP + -0x108] CALL 0x00143de0 MOV RDI,qword ptr [RBP + -0x110] CALL 0x00143de0 TEST byte ptr [RBP + -0x31],0x1 JNZ 0x00166d1f MOV RAX,qword ptr [0x001dffd0] MOV RDI,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x78] MOV R8,qword ptr [RBP + 0x18] LEA RSI,[0x1b5dbd] LEA RDX,[0x1b5dd5] MOV AL,0x0 CALL 0x00147a10 LAB_00166d1f: MOV RDI,qword ptr [RBP + -0xc0] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x108] MOV RCX,qword ptr [RBP + -0x110] MOV R8,qword ptr [RBP + -0x70] MOV R9,qword ptr [RBP + -0x118] MOV RAX,qword ptr [RBP + -0x118] MOV qword ptr [RSP],RAX CALL 0x00146320 TEST byte ptr [RBP + -0x31],0x1 JNZ 0x00166d71 MOV RAX,qword ptr [0x001dffd0] MOV RDI,qword ptr [RAX] LEA RSI,[0x1c257c] MOV AL,0x0 CALL 0x00147a10 LAB_00166d71: JMP 0x00166d73 LAB_00166d73: MOV RAX,qword ptr [RBP + -0x78] ADD RAX,0x1 MOV qword ptr [RBP + -0x78],RAX JMP 0x00166cae LAB_00166d84: TEST byte ptr [RBP + -0x31],0x1 JNZ 0x00166e41 CALL 0x00148f40 SUB RAX,qword ptr [RBP + -0x40] MOV ECX,0xf4240 CQO IDIV RCX MOV qword ptr [RBP + -0x120],RAX MOV RAX,qword ptr [RBP + -0x120] MOV ECX,0xe10 CQO IDIV RCX MOV qword ptr [RBP + -0x128],RAX IMUL RCX,qword ptr [RBP + -0x128],0xe10 MOV RAX,qword ptr [RBP + -0x120] SUB RAX,RCX MOV qword ptr [RBP + -0x120],RAX MOV RAX,qword ptr [RBP + -0x120] MOV ECX,0x3c CQO IDIV RCX MOV qword ptr [RBP + -0x130],RAX IMUL RCX,qword ptr [RBP + -0x130],0x3c MOV RAX,qword ptr [RBP + -0x120] SUB RAX,RCX MOV qword ptr [RBP + -0x120],RAX MOV RAX,qword ptr [0x001dffd0] MOV RDI,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x128] MOV R8,qword ptr [RBP + -0x130] MOV R9,qword ptr [RBP + -0x120] LEA RSI,[0x1b5de2] LEA RDX,[0x1b5dd5] MOV AL,0x0 CALL 0x00147a10 LAB_00166e41: MOV RDI,qword ptr [RBP + -0xc0] CALL 0x00144280 MOV RDI,qword ptr [RBP + -0x108] CALL 0x00147b60 MOV RDI,qword ptr [RBP + -0x110] CALL 0x00147b60 ADD RSP,0x170 POP RBP RET
void ggml_opt_fit(float param_1,int8 param_2,int8 param_3,long param_4, int8 param_5,int8 param_6,int4 param_7,int8 param_8, long param_9,long param_10,byte param_11) { long lVar1; int8 uVar2; int8 uVar3; int *puVar4; long lVar5; int1 local_108 [64]; int8 local_c8; int1 local_c0 [40]; int4 local_98; int8 local_90; long *local_88; long local_80; long local_78; long local_70; long local_68; long local_60; long local_58; long local_50; long local_48; byte local_39; float local_38; int4 local_34; int8 local_30; int8 local_28; long local_20; int8 local_18; int8 local_10; local_39 = param_11 & 1; local_38 = param_1; local_34 = param_7; local_30 = param_6; local_28 = param_5; local_20 = param_4; local_18 = param_3; local_10 = param_2; ggml_time_init(); local_48 = ggml_time_us(); lVar1 = ggml_opt_dataset_data(local_30); local_50 = *(long *)(lVar1 + 0x18); local_58 = *(long *)(local_20 + 0x18); if (local_50 % param_10 != 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp" ,0x31c,"GGML_ASSERT(%s) failed","ndata % nbatch_logical == 0"); } if (param_10 % local_58 != 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp" ,0x31d,"GGML_ASSERT(%s) failed","nbatch_logical % nbatch_physical == 0"); } local_60 = param_10 / local_58; local_68 = local_50 / param_10; if (local_38 < 0.0) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp" ,0x322,"GGML_ASSERT(%s) failed","val_split >= 0.0f"); } if (DAT_001b1428 <= local_38) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp" ,0x323,"GGML_ASSERT(%s) failed","val_split < 1.0f"); } local_70 = (long)((DAT_001b1428 - local_38) * (float)local_68) * local_60; local_78 = local_70 * local_58; local_80 = 1; ggml_opt_default_params(local_c0,local_10,local_18,local_20,local_28,local_34); local_98 = (int4)local_60; local_90 = param_8; local_88 = &local_80; memcpy(local_108,local_c0,0x40); local_c8 = ggml_opt_init(); if (param_10 < local_50) { ggml_opt_dataset_shuffle(local_c8,local_30,0xffffffffffffffff); } uVar2 = ggml_opt_result_init(); uVar3 = ggml_opt_result_init(); puVar4 = PTR_ggml_opt_epoch_callback_progress_bar_001dffe0; if ((local_39 & 1) != 0) { puVar4 = (int *)0x0; } for (; local_80 <= param_9; local_80 = local_80 + 1) { if (param_10 < local_78) { ggml_opt_dataset_shuffle(local_c8,local_30,local_78); } ggml_opt_result_reset(uVar2); ggml_opt_result_reset(uVar3); if ((local_39 & 1) == 0) { fprintf(*(FILE **)PTR_stderr_001dffd0,"%s: epoch %04ld/%04ld:\n","ggml_opt_fit",local_80, param_9); } ggml_opt_epoch(local_c8,local_30,uVar2,uVar3,local_78,puVar4,puVar4); if ((local_39 & 1) == 0) { fprintf(*(FILE **)PTR_stderr_001dffd0,"\n"); } } if ((local_39 & 1) == 0) { lVar1 = ggml_time_us(); lVar1 = (lVar1 - local_48) / 1000000; lVar5 = lVar1 % 0xe10; fprintf(*(FILE **)PTR_stderr_001dffd0,"%s: training took %02ld:%02ld:%02ld\n","ggml_opt_fit", lVar1 / 0xe10,lVar5 / 0x3c,lVar5 % 0x3c); } ggml_opt_free(local_c8); ggml_opt_result_free(uVar2); ggml_opt_result_free(uVar3); return; }
4,625
ggml_opt_fit
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp
void ggml_opt_fit( ggml_backend_sched_t backend_sched, ggml_context * ctx_compute, ggml_tensor * inputs, ggml_tensor * outputs, ggml_opt_dataset_t dataset, enum ggml_opt_loss_type loss_type, ggml_opt_get_optimizer_params get_opt_pars, int64_t nepoch, int64_t nbatch_logical, float val_split, bool silent) { ggml_time_init(); const int64_t t_start_us = ggml_time_us(); const int64_t ndata = ggml_opt_dataset_data(dataset)->ne[1]; const int64_t nbatch_physical = inputs->ne[1]; GGML_ASSERT(ndata % nbatch_logical == 0); GGML_ASSERT(nbatch_logical % nbatch_physical == 0); const int64_t opt_period = nbatch_logical / nbatch_physical; const int64_t nbatches_logical = ndata / nbatch_logical; GGML_ASSERT(val_split >= 0.0f); GGML_ASSERT(val_split < 1.0f); const int64_t ibatch_split = int64_t(((1.0f - val_split) * nbatches_logical)) * opt_period; // train <-> val split index (physical) const int64_t idata_split = ibatch_split * nbatch_physical; int64_t epoch = 1; ggml_opt_params params = ggml_opt_default_params(backend_sched, ctx_compute, inputs, outputs, loss_type); params.opt_period = opt_period; params.get_opt_pars = get_opt_pars; params.get_opt_pars_ud = &epoch; ggml_opt_context_t opt_ctx = ggml_opt_init(params); // Shuffling the data is generally useful but there is only a point if not all data is used in a single batch. if (nbatch_logical < ndata) { ggml_opt_dataset_shuffle(opt_ctx, dataset, -1); // Shuffle all data (train + validation). } ggml_opt_result_t result_train = ggml_opt_result_init(); ggml_opt_result_t result_val = ggml_opt_result_init(); ggml_opt_epoch_callback epoch_callback = silent ? nullptr : ggml_opt_epoch_callback_progress_bar; for (; epoch <= nepoch; ++epoch) { if (nbatch_logical < idata_split) { ggml_opt_dataset_shuffle(opt_ctx, dataset, idata_split); } ggml_opt_result_reset(result_train); ggml_opt_result_reset(result_val); if (!silent) { fprintf(stderr, "%s: epoch %04" PRId64 "/%04" PRId64 ":\n", __func__, epoch, nepoch); } ggml_opt_epoch(opt_ctx, dataset, result_train, result_val, idata_split, epoch_callback, epoch_callback); if (!silent) { fprintf(stderr, "\n"); } } if (!silent) { int64_t t_total_s = (ggml_time_us() - t_start_us) / 1000000; const int64_t t_total_h = t_total_s / 3600; t_total_s -= t_total_h * 3600; const int64_t t_total_m = t_total_s / 60; t_total_s -= t_total_m * 60; fprintf(stderr, "%s: training took %02" PRId64 ":%02" PRId64 ":%02" PRId64 "\n", __func__, t_total_h, t_total_m, t_total_s); } ggml_opt_free(opt_ctx); ggml_opt_result_free(result_train); ggml_opt_result_free(result_val); }
O1
cpp
ggml_opt_fit: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movss %xmm0, 0x4c(%rsp) movl %r9d, 0x64(%rsp) movq %r8, %rbx movq %rcx, 0x80(%rsp) movq %rdx, %r13 movq %rsi, %rbp movq %rdi, %r15 movq 0x110(%rsp), %r14 callq 0x172b0 callq 0x18e50 movq %rax, 0x68(%rsp) movq %rbx, 0x50(%rsp) movq 0x10(%rbx), %rax movq %r14, %rbx movq 0x18(%rax), %r14 movq %r14, %rax cqto idivq %rbx movq %rax, 0x78(%rsp) testq %rdx, %rdx jne 0x2c919 movq 0x18(%r13), %rcx movq %rbx, %rax cqto movq %rcx, 0x70(%rsp) idivq %rcx testq %rdx, %rdx jne 0x2c935 xorps %xmm0, %xmm0 movss 0x4c(%rsp), %xmm1 ucomiss %xmm0, %xmm1 jb 0x2c951 movaps %xmm1, %xmm0 movss 0x1fa09(%rip), %xmm1 # 0x4c058 ucomiss %xmm0, %xmm1 jbe 0x2c96d movq %rax, %r12 movq 0x100(%rsp), %rax leaq 0x58(%rsp), %rcx movq $0x1, (%rcx) movq %r15, 0x88(%rsp) movq %rbp, 0x90(%rsp) movq %r13, 0x98(%rsp) movq 0x80(%rsp), %rdx movq %rdx, 0xa0(%rsp) movl 0x64(%rsp), %edx movl %edx, 0xa8(%rsp) movl $0x2, 0xac(%rsp) movl %r12d, 0xb0(%rsp) movq %rax, 0xb8(%rsp) movq %rcx, 0xc0(%rsp) movups 0x88(%rsp), %xmm0 movups 0x98(%rsp), %xmm1 movups 0xa8(%rsp), %xmm2 movups 0xb8(%rsp), %xmm3 movups %xmm3, 0x30(%rsp) movups %xmm2, 0x20(%rsp) movups %xmm1, 0x10(%rsp) movups %xmm0, (%rsp) callq 0x185e0 movq %rax, %r13 cmpq %rbx, %r14 jle 0x2c719 movq %r13, %rdi movq 0x50(%rsp), %rsi movq $-0x1, %rdx callq 0x18620 movl $0x50, %edi callq 0x18090 movq %rax, %rbp xorps %xmm0, %xmm0 movups %xmm0, (%rax) movups %xmm0, 0x10(%rax) movups %xmm0, 0x20(%rax) movups %xmm0, 0x30(%rax) movq $-0x1, %rbx movq %rbx, 0x40(%rax) xorl %r14d, %r14d movb %r14b, 0x48(%rax) movl $0x50, %edi callq 0x18090 movq %rax, %r15 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movups %xmm0, 0x10(%rax) movups %xmm0, 0x20(%rax) movups %xmm0, 0x30(%rax) movq %rbx, 0x40(%rax) movb %r14b, 0x48(%rax) cmpb $0x0, 0x118(%rsp) jne 0x2c782 movq 0x41856(%rip), %r14 # 0x6dfd8 movss 0x4c(%rsp), %xmm0 movq 0x108(%rsp), %rax cmpq %rax, 0x58(%rsp) jle 0x2c7cf cmpb $0x0, 0x118(%rsp) je 0x2c90a movq %r13, %rdi callq 0x179d0 movq %rbp, %rdi callq 0x18910 movq %r15, %rdi callq 0x18910 addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movss 0x1f881(%rip), %xmm1 # 0x4c058 subss %xmm0, %xmm1 xorps %xmm0, %xmm0 cvtsi2ssq 0x78(%rsp), %xmm0 mulss %xmm1, %xmm0 cvttss2si %xmm0, %rax imulq 0x70(%rsp), %r12 imulq %rax, %r12 xorl %ebx, %ebx cmpq 0x110(%rsp), %r12 jle 0x2c814 movq %r13, %rdi movq 0x50(%rsp), %rsi movq %r12, %rdx callq 0x18620 movq $0x0, (%rbp) movq 0x8(%rbp), %rax cmpq %rax, 0x10(%rbp) je 0x2c82a movq %rax, 0x10(%rbp) movq 0x20(%rbp), %rax cmpq %rax, 0x28(%rbp) je 0x2c838 movq %rax, 0x28(%rbp) movq %rbx, 0x38(%rbp) movq %rbx, (%r15) movq 0x8(%r15), %rax cmpq %rax, 0x10(%r15) je 0x2c84d movq %rax, 0x10(%r15) movq 0x20(%r15), %rax cmpq %rax, 0x28(%r15) je 0x2c85b movq %rax, 0x28(%r15) movq $0x0, 0x38(%r15) cmpb $0x0, 0x118(%rsp) je 0x2c8ab movq %r14, (%rsp) movq %r13, %rdi movq 0x50(%rsp), %rsi movq %rbp, %rdx movq %r15, %rcx movq %r12, %r8 movq %r14, %r9 callq 0x18260 movq 0x58(%rsp), %rax leaq 0x1(%rax), %rcx movq %rcx, 0x58(%rsp) cmpq 0x108(%rsp), %rax jl 0x2c7fa jmp 0x2c797 movq 0x41716(%rip), %rax # 0x6dfc8 movq (%rax), %rdi movq 0x58(%rsp), %rcx leaq 0x24062(%rip), %rsi # 0x50923 leaq 0x24073(%rip), %rdx # 0x5093b movq 0x108(%rsp), %r8 xorl %eax, %eax callq 0x188a0 movq %r14, (%rsp) movq %r13, %rdi movq 0x50(%rsp), %rsi movq %rbp, %rdx movq %r15, %rcx movq %r12, %r8 movq %r14, %r9 callq 0x18260 movq 0x416cd(%rip), %rax # 0x6dfc8 movq (%rax), %rsi movl $0xa, %edi callq 0x18540 jmp 0x2c88a movq 0x68(%rsp), %rdi callq 0x195e2 jmp 0x2c7a5 leaq 0x23b88(%rip), %rdi # 0x504a8 leaq 0x1fc9a(%rip), %rdx # 0x4c5c1 leaq 0x23f90(%rip), %rcx # 0x508be movl $0x31c, %esi # imm = 0x31C jmp 0x2c987 leaq 0x23b6c(%rip), %rdi # 0x504a8 leaq 0x1fc7e(%rip), %rdx # 0x4c5c1 leaq 0x23f90(%rip), %rcx # 0x508da movl $0x31d, %esi # imm = 0x31D jmp 0x2c987 leaq 0x23b50(%rip), %rdi # 0x504a8 leaq 0x1fc62(%rip), %rdx # 0x4c5c1 leaq 0x23f9a(%rip), %rcx # 0x50900 movl $0x322, %esi # imm = 0x322 jmp 0x2c987 leaq 0x23b34(%rip), %rdi # 0x504a8 leaq 0x1fc46(%rip), %rdx # 0x4c5c1 leaq 0x23f90(%rip), %rcx # 0x50912 movl $0x323, %esi # imm = 0x323 xorl %eax, %eax callq 0x18ce0
ggml_opt_fit: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h movss [rsp+0F8h+var_AC], xmm0 mov [rsp+0F8h+var_94], r9d mov rbx, r8 mov [rsp+0F8h+var_78], rcx mov r13, rdx mov rbp, rsi mov r15, rdi mov r14, [rsp+0F8h+arg_10] call _ggml_time_init call _ggml_time_us mov [rsp+0F8h+var_90], rax mov [rsp+0F8h+var_A8], rbx mov rax, [rbx+10h] mov rbx, r14 mov r14, [rax+18h] mov rax, r14 cqo idiv rbx mov [rsp+0F8h+var_80], rax test rdx, rdx jnz loc_2C919 mov rcx, [r13+18h] mov rax, rbx cqo mov [rsp+0F8h+var_88], rcx idiv rcx test rdx, rdx jnz loc_2C935 xorps xmm0, xmm0 movss xmm1, [rsp+0F8h+var_AC] ucomiss xmm1, xmm0 jb loc_2C951 movaps xmm0, xmm1 movss xmm1, cs:dword_4C058 ucomiss xmm1, xmm0 jbe loc_2C96D mov r12, rax mov rax, [rsp+0F8h+arg_0] lea rcx, [rsp+0F8h+var_A0] mov qword ptr [rcx], 1 mov qword ptr [rsp+0F8h+var_70], r15 mov qword ptr [rsp+0F8h+var_70+8], rbp mov qword ptr [rsp+0F8h+var_60], r13 mov rdx, [rsp+0F8h+var_78] mov qword ptr [rsp+0F8h+var_60+8], rdx mov edx, [rsp+0F8h+var_94] mov dword ptr [rsp+0F8h+var_50], edx mov dword ptr [rsp+0F8h+var_50+4], 2 mov dword ptr [rsp+0F8h+var_50+8], r12d mov qword ptr [rsp+0F8h+var_40], rax mov qword ptr [rsp+0F8h+var_40+8], rcx movups xmm0, [rsp+0F8h+var_70] movups xmm1, [rsp+0F8h+var_60] movups xmm2, [rsp+0F8h+var_50] movups xmm3, [rsp+0F8h+var_40] movups [rsp+0F8h+var_C8], xmm3 movups [rsp+0F8h+var_D8], xmm2 movups [rsp+0F8h+var_E8], xmm1 movups [rsp+0F8h+var_F8], xmm0 call _ggml_opt_init mov r13, rax cmp r14, rbx jle short loc_2C719 mov rdi, r13 mov rsi, [rsp+0F8h+var_A8] mov rdx, 0FFFFFFFFFFFFFFFFh call _ggml_opt_dataset_shuffle loc_2C719: mov edi, 50h ; 'P'; unsigned __int64 call __Znwm; operator new(ulong) mov rbp, rax xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 movups xmmword ptr [rax+10h], xmm0 movups xmmword ptr [rax+20h], xmm0 movups xmmword ptr [rax+30h], xmm0 mov rbx, 0FFFFFFFFFFFFFFFFh mov [rax+40h], rbx xor r14d, r14d mov [rax+48h], r14b mov edi, 50h ; 'P'; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 movups xmmword ptr [rax+10h], xmm0 movups xmmword ptr [rax+20h], xmm0 movups xmmword ptr [rax+30h], xmm0 mov [rax+40h], rbx mov [rax+48h], r14b cmp [rsp+0F8h+arg_18], 0 jnz short loc_2C782 mov r14, cs:ggml_opt_epoch_callback_progress_bar_ptr loc_2C782: movss xmm0, [rsp+0F8h+var_AC] mov rax, [rsp+0F8h+arg_8] cmp [rsp+0F8h+var_A0], rax jle short loc_2C7CF loc_2C797: cmp [rsp+0F8h+arg_18], 0 jz loc_2C90A loc_2C7A5: mov rdi, r13; void * call _ggml_opt_free mov rdi, rbp; void * call _ggml_opt_result_free mov rdi, r15; void * call _ggml_opt_result_free add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2C7CF: movss xmm1, cs:dword_4C058 subss xmm1, xmm0 xorps xmm0, xmm0 cvtsi2ss xmm0, [rsp+0F8h+var_80] mulss xmm0, xmm1 cvttss2si rax, xmm0 imul r12, [rsp+0F8h+var_88] imul r12, rax xor ebx, ebx loc_2C7FA: cmp r12, [rsp+0F8h+arg_10] jle short loc_2C814 mov rdi, r13 mov rsi, [rsp+0F8h+var_A8] mov rdx, r12 call _ggml_opt_dataset_shuffle loc_2C814: mov qword ptr [rbp+0], 0 mov rax, [rbp+8] cmp [rbp+10h], rax jz short loc_2C82A mov [rbp+10h], rax loc_2C82A: mov rax, [rbp+20h] cmp [rbp+28h], rax jz short loc_2C838 mov [rbp+28h], rax loc_2C838: mov [rbp+38h], rbx mov [r15], rbx mov rax, [r15+8] cmp [r15+10h], rax jz short loc_2C84D mov [r15+10h], rax loc_2C84D: mov rax, [r15+20h] cmp [r15+28h], rax jz short loc_2C85B mov [r15+28h], rax loc_2C85B: mov qword ptr [r15+38h], 0 cmp [rsp+0F8h+arg_18], 0 jz short loc_2C8AB mov qword ptr [rsp+0F8h+var_F8], r14 mov rdi, r13 mov rsi, [rsp+0F8h+var_A8] mov rdx, rbp mov rcx, r15 mov r8, r12 mov r9, r14 call _ggml_opt_epoch loc_2C88A: mov rax, [rsp+0F8h+var_A0] lea rcx, [rax+1] mov [rsp+0F8h+var_A0], rcx cmp rax, [rsp+0F8h+arg_8] jl loc_2C7FA jmp loc_2C797 loc_2C8AB: mov rax, cs:stderr_ptr mov rdi, [rax] mov rcx, [rsp+0F8h+var_A0] lea rsi, aSEpoch04ld04ld; "%s: epoch %04ld/%04ld:\n" lea rdx, aGgmlOptFit_0; "ggml_opt_fit" mov r8, [rsp+0F8h+arg_8] xor eax, eax call _fprintf mov qword ptr [rsp+0F8h+var_F8], r14 mov rdi, r13 mov rsi, [rsp+0F8h+var_A8] mov rdx, rbp mov rcx, r15 mov r8, r12 mov r9, r14 call _ggml_opt_epoch mov rax, cs:stderr_ptr mov rsi, [rax] mov edi, 0Ah call _fputc jmp short loc_2C88A loc_2C90A: mov rdi, [rsp+0F8h+var_90] call ggml_opt_fit_cold_1 jmp loc_2C7A5 loc_2C919: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNdataNbatchLog; "ndata % nbatch_logical == 0" mov esi, 31Ch jmp short loc_2C987 loc_2C935: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNbatchLogicalN; "nbatch_logical % nbatch_physical == 0" mov esi, 31Dh jmp short loc_2C987 loc_2C951: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aValSplit00f; "val_split >= 0.0f" mov esi, 322h jmp short loc_2C987 loc_2C96D: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aValSplit10f; "val_split < 1.0f" mov esi, 323h loc_2C987: xor eax, eax call _ggml_abort
long long ggml_opt_fit( __int128 a1, long long a2, long long a3, _QWORD *a4, unsigned int a5, float a6, double a7, double a8, double a9, double a10, double a11, __m128 a12, __m128 a13, long long a14, long long a15, long long a16, char a17) { long long v19; // r8 long long v20; // r9 double v21; // xmm4_8 double v22; // xmm5_8 long long v23; // r14 long long v24; // rcx long long v25; // r12 __m128 v26; // xmm2 __m128i v27; // xmm3 long long v28; // rax long long v29; // rcx int v30; // r8d int v31; // r9d _QWORD *v32; // r13 long long v33; // rbp long long ( *v34)(int, long long, long long, long long *, long long, long long, long long); // r14 long long v35; // rcx int v36; // r8d int v37; // r9d long long v38; // r15 double v39; // xmm4_8 double v40; // xmm5_8 __m128 v42; // xmm1 double v43; // xmm0_8 long long v44; // r12 long long v45; // rax long long v46; // rax long long v47; // rax long long v48; // rax long long v49; // rax double v50; // xmm4_8 double v51; // xmm5_8 long long v52; // rdx const char *v53; // rcx int v54; // esi long long v55; // [rsp+58h] [rbp-A0h] BYREF unsigned int v56; // [rsp+64h] [rbp-94h] long long v57; // [rsp+68h] [rbp-90h] long long v58; // [rsp+70h] [rbp-88h] long long v59; // [rsp+78h] [rbp-80h] unsigned long long v60; // [rsp+80h] [rbp-78h] __int128 v61; // [rsp+88h] [rbp-70h] __m128 v62; // [rsp+98h] [rbp-60h] __m128 v63; // [rsp+A8h] [rbp-50h] __m128i v64; // [rsp+B8h] [rbp-40h] v56 = a5; v60 = a3; ggml_time_init(); v57 = ggml_time_us(); v23 = *(_QWORD *)(a4[2] + 24LL); v59 = v23 / a16; if ( v23 % a16 ) { v53 = "ndata % nbatch_logical == 0"; v54 = 796; goto LABEL_33; } v24 = *(_QWORD *)(a2 + 24); v58 = v24; if ( a16 % v24 ) { v53 = "nbatch_logical % nbatch_physical == 0"; v54 = 797; goto LABEL_33; } if ( a6 < 0.0 ) { v53 = "val_split >= 0.0f"; v54 = 802; goto LABEL_33; } if ( a6 >= 1.0 ) { v53 = "val_split < 1.0f"; v54 = 803; LABEL_33: ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp", v54, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v53, v19, v20); } v25 = a16 / v24; v55 = 1LL; v61 = a1; v62.m128_u64[0] = a2; v62.m128_u64[1] = v60; v63.m128_u64[0] = v56 | 0x200000000LL; v63.m128_i32[2] = a16 / v24; v64.m128i_i64[0] = a14; v64.m128i_i64[1] = (long long)&v55; v26 = v63; v27 = v64; v28 = ggml_opt_init( *(double *)&v61, v62, v63, (__m128)v64, v21, v22, a12, a13, a1, *((long long *)&a1 + 1), v56, (long long)&v55, v19, v20, v61, *((long long *)&a1 + 1), a2, v60, v63.m128_i64[0], v63.m128_i32[2], a14, (long long)&v55); v32 = (_QWORD *)v28; if ( v23 > a16 ) ggml_opt_dataset_shuffle(v28, a4, -1LL, v29, v30, v31); v33 = operator new(0x50uLL); *(_OWORD *)v33 = 0LL; *(_OWORD *)(v33 + 16) = 0LL; *(_OWORD *)(v33 + 32) = 0LL; *(_OWORD *)(v33 + 48) = 0LL; *(_QWORD *)(v33 + 64) = -1LL; v34 = 0LL; *(_BYTE *)(v33 + 72) = 0; v38 = operator new(0x50uLL); *(_OWORD *)v38 = 0LL; *(_OWORD *)(v38 + 16) = 0LL; *(_OWORD *)(v38 + 32) = 0LL; *(_OWORD *)(v38 + 48) = 0LL; *(_QWORD *)(v38 + 64) = -1LL; *(_BYTE *)(v38 + 72) = 0; if ( !a17 ) v34 = ggml_opt_epoch_callback_progress_bar; if ( v55 <= a15 ) { v42 = (__m128)0x3F800000u; v42.m128_f32[0] = 1.0 - a6; HIDWORD(v43) = 0; *(float *)&v43 = (float)(int)v59 * (float)(1.0 - a6); v44 = (unsigned int)(int)*(float *)&v43 * v58 * v25; do { if ( v44 > a16 ) ggml_opt_dataset_shuffle((long long)v32, a4, v44, v35, v36, v37); *(_QWORD *)v33 = 0LL; v45 = *(_QWORD *)(v33 + 8); if ( *(_QWORD *)(v33 + 16) != v45 ) *(_QWORD *)(v33 + 16) = v45; v46 = *(_QWORD *)(v33 + 32); if ( *(_QWORD *)(v33 + 40) != v46 ) *(_QWORD *)(v33 + 40) = v46; *(_QWORD *)(v33 + 56) = 0LL; *(_QWORD *)v38 = 0LL; v47 = *(_QWORD *)(v38 + 8); if ( *(_QWORD *)(v38 + 16) != v47 ) *(_QWORD *)(v38 + 16) = v47; v48 = *(_QWORD *)(v38 + 32); if ( *(_QWORD *)(v38 + 40) != v48 ) *(_QWORD *)(v38 + 40) = v48; *(_QWORD *)(v38 + 56) = 0LL; if ( a17 ) { ggml_opt_epoch( v32, a4, (long long *)v33, (long long *)v38, v44, (void ( *)(long long, _QWORD *, _QWORD *, long long *, long long, long long, long long))v34, v43, v42, v26, v27, v39, v40, a12, a13, (void ( *)(_QWORD, _QWORD *, _QWORD *, long long *, long long, long long, long long))v34); } else { v43 = fprintf(stderr, "%s: epoch %04ld/%04ld:\n", "ggml_opt_fit", v55, a15); ggml_opt_epoch( v32, a4, (long long *)v33, (long long *)v38, v44, (void ( *)(long long, _QWORD *, _QWORD *, long long *, long long, long long, long long))v34, v43, v42, v26, v27, v50, v51, a12, a13, (void ( *)(_QWORD, _QWORD *, _QWORD *, long long *, long long, long long, long long))v34); fputc(10LL, stderr, v52); } v49 = v55; v35 = ++v55; } while ( v49 < a15 ); } if ( !a17 ) ggml_opt_fit_cold_1(v57); ggml_opt_free(v32); ggml_opt_result_free((void *)v33); return ggml_opt_result_free((void *)v38); }
ggml_opt_fit: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOVSS dword ptr [RSP + 0x4c],XMM0 MOV dword ptr [RSP + 0x64],R9D MOV RBX,R8 MOV qword ptr [RSP + 0x80],RCX MOV R13,RDX MOV RBP,RSI MOV R15,RDI MOV R14,qword ptr [RSP + 0x110] CALL 0x001172b0 CALL 0x00118e50 MOV qword ptr [RSP + 0x68],RAX MOV qword ptr [RSP + 0x50],RBX MOV RAX,qword ptr [RBX + 0x10] MOV RBX,R14 MOV R14,qword ptr [RAX + 0x18] MOV RAX,R14 CQO IDIV RBX MOV qword ptr [RSP + 0x78],RAX TEST RDX,RDX JNZ 0x0012c919 MOV RCX,qword ptr [R13 + 0x18] MOV RAX,RBX CQO MOV qword ptr [RSP + 0x70],RCX IDIV RCX TEST RDX,RDX JNZ 0x0012c935 XORPS XMM0,XMM0 MOVSS XMM1,dword ptr [RSP + 0x4c] UCOMISS XMM1,XMM0 JC 0x0012c951 MOVAPS XMM0,XMM1 MOVSS XMM1,dword ptr [0x0014c058] UCOMISS XMM1,XMM0 JBE 0x0012c96d MOV R12,RAX MOV RAX,qword ptr [RSP + 0x100] LEA RCX,[RSP + 0x58] MOV qword ptr [RCX],0x1 MOV qword ptr [RSP + 0x88],R15 MOV qword ptr [RSP + 0x90],RBP MOV qword ptr [RSP + 0x98],R13 MOV RDX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0xa0],RDX MOV EDX,dword ptr [RSP + 0x64] MOV dword ptr [RSP + 0xa8],EDX MOV dword ptr [RSP + 0xac],0x2 MOV dword ptr [RSP + 0xb0],R12D MOV qword ptr [RSP + 0xb8],RAX MOV qword ptr [RSP + 0xc0],RCX MOVUPS XMM0,xmmword ptr [RSP + 0x88] MOVUPS XMM1,xmmword ptr [RSP + 0x98] MOVUPS XMM2,xmmword ptr [RSP + 0xa8] MOVUPS XMM3,xmmword ptr [RSP + 0xb8] MOVUPS xmmword ptr [RSP + 0x30],XMM3 MOVUPS xmmword ptr [RSP + 0x20],XMM2 MOVUPS xmmword ptr [RSP + 0x10],XMM1 MOVUPS xmmword ptr [RSP],XMM0 CALL 0x001185e0 MOV R13,RAX CMP R14,RBX JLE 0x0012c719 MOV RDI,R13 MOV RSI,qword ptr [RSP + 0x50] MOV RDX,-0x1 CALL 0x00118620 LAB_0012c719: MOV EDI,0x50 CALL 0x00118090 MOV RBP,RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOVUPS xmmword ptr [RAX + 0x20],XMM0 MOVUPS xmmword ptr [RAX + 0x30],XMM0 MOV RBX,-0x1 MOV qword ptr [RAX + 0x40],RBX XOR R14D,R14D MOV byte ptr [RAX + 0x48],R14B MOV EDI,0x50 CALL 0x00118090 MOV R15,RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOVUPS xmmword ptr [RAX + 0x20],XMM0 MOVUPS xmmword ptr [RAX + 0x30],XMM0 MOV qword ptr [RAX + 0x40],RBX MOV byte ptr [RAX + 0x48],R14B CMP byte ptr [RSP + 0x118],0x0 JNZ 0x0012c782 MOV R14,qword ptr [0x0016dfd8] LAB_0012c782: MOVSS XMM0,dword ptr [RSP + 0x4c] MOV RAX,qword ptr [RSP + 0x108] CMP qword ptr [RSP + 0x58],RAX JLE 0x0012c7cf LAB_0012c797: CMP byte ptr [RSP + 0x118],0x0 JZ 0x0012c90a LAB_0012c7a5: MOV RDI,R13 CALL 0x001179d0 MOV RDI,RBP CALL 0x00118910 MOV RDI,R15 CALL 0x00118910 ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012c7cf: MOVSS XMM1,dword ptr [0x0014c058] SUBSS XMM1,XMM0 XORPS XMM0,XMM0 CVTSI2SS XMM0,qword ptr [RSP + 0x78] MULSS XMM0,XMM1 CVTTSS2SI RAX,XMM0 IMUL R12,qword ptr [RSP + 0x70] IMUL R12,RAX XOR EBX,EBX LAB_0012c7fa: CMP R12,qword ptr [RSP + 0x110] JLE 0x0012c814 MOV RDI,R13 MOV RSI,qword ptr [RSP + 0x50] MOV RDX,R12 CALL 0x00118620 LAB_0012c814: MOV qword ptr [RBP],0x0 MOV RAX,qword ptr [RBP + 0x8] CMP qword ptr [RBP + 0x10],RAX JZ 0x0012c82a MOV qword ptr [RBP + 0x10],RAX LAB_0012c82a: MOV RAX,qword ptr [RBP + 0x20] CMP qword ptr [RBP + 0x28],RAX JZ 0x0012c838 MOV qword ptr [RBP + 0x28],RAX LAB_0012c838: MOV qword ptr [RBP + 0x38],RBX MOV qword ptr [R15],RBX MOV RAX,qword ptr [R15 + 0x8] CMP qword ptr [R15 + 0x10],RAX JZ 0x0012c84d MOV qword ptr [R15 + 0x10],RAX LAB_0012c84d: MOV RAX,qword ptr [R15 + 0x20] CMP qword ptr [R15 + 0x28],RAX JZ 0x0012c85b MOV qword ptr [R15 + 0x28],RAX LAB_0012c85b: MOV qword ptr [R15 + 0x38],0x0 CMP byte ptr [RSP + 0x118],0x0 JZ 0x0012c8ab MOV qword ptr [RSP],R14 MOV RDI,R13 MOV RSI,qword ptr [RSP + 0x50] MOV RDX,RBP MOV RCX,R15 MOV R8,R12 MOV R9,R14 CALL 0x00118260 LAB_0012c88a: MOV RAX,qword ptr [RSP + 0x58] LEA RCX,[RAX + 0x1] MOV qword ptr [RSP + 0x58],RCX CMP RAX,qword ptr [RSP + 0x108] JL 0x0012c7fa JMP 0x0012c797 LAB_0012c8ab: MOV RAX,qword ptr [0x0016dfc8] MOV RDI,qword ptr [RAX] MOV RCX,qword ptr [RSP + 0x58] LEA RSI,[0x150923] LEA RDX,[0x15093b] MOV R8,qword ptr [RSP + 0x108] XOR EAX,EAX CALL 0x001188a0 MOV qword ptr [RSP],R14 MOV RDI,R13 MOV RSI,qword ptr [RSP + 0x50] MOV RDX,RBP MOV RCX,R15 MOV R8,R12 MOV R9,R14 CALL 0x00118260 MOV RAX,qword ptr [0x0016dfc8] MOV RSI,qword ptr [RAX] MOV EDI,0xa CALL 0x00118540 JMP 0x0012c88a LAB_0012c90a: MOV RDI,qword ptr [RSP + 0x68] CALL 0x001195e2 JMP 0x0012c7a5 LAB_0012c919: LEA RDI,[0x1504a8] LEA RDX,[0x14c5c1] LEA RCX,[0x1508be] MOV ESI,0x31c JMP 0x0012c987 LAB_0012c935: LEA RDI,[0x1504a8] LEA RDX,[0x14c5c1] LEA RCX,[0x1508da] MOV ESI,0x31d JMP 0x0012c987 LAB_0012c951: LEA RDI,[0x1504a8] LEA RDX,[0x14c5c1] LEA RCX,[0x150900] MOV ESI,0x322 JMP 0x0012c987 LAB_0012c96d: LEA RDI,[0x1504a8] LEA RDX,[0x14c5c1] LEA RCX,[0x150912] MOV ESI,0x323 LAB_0012c987: XOR EAX,EAX CALL 0x00118ce0
void ggml_opt_fit(float param_1,int8 param_2,int8 param_3,long param_4, int8 param_5,long param_6,int4 param_7,int8 param_8,long param_9, long param_10,char param_11) { bool bVar1; long lVar2; int8 uVar3; int8 *puVar4; int8 *puVar5; char *pcVar6; long lVar7; int *puVar8; long local_a0; int4 local_94; int8 local_90; long local_88; long local_80; int8 local_78; int8 local_70; int8 uStack_68; long local_60; int8 uStack_58; int4 local_50; int4 uStack_4c; int4 uStack_48; int8 local_40; long *plStack_38; local_94 = param_7; local_78 = param_5; ggml_time_init(); local_90 = ggml_time_us(); lVar7 = *(long *)(*(long *)(param_6 + 0x10) + 0x18); local_80 = lVar7 / param_10; if (lVar7 % param_10 == 0) { local_88 = *(long *)(param_4 + 0x18); lVar2 = param_10 / local_88; if (param_10 % local_88 == 0) { if (param_1 < 0.0) { pcVar6 = "val_split >= 0.0f"; uVar3 = 0x322; } else { if (param_1 < DAT_0014c058) { plStack_38 = &local_a0; local_a0 = 1; uStack_58 = local_78; local_50 = local_94; uStack_4c = 2; uStack_48 = (int4)lVar2; local_40 = param_8; local_70 = param_2; uStack_68 = param_3; local_60 = param_4; uVar3 = ggml_opt_init(); if (param_10 < lVar7) { ggml_opt_dataset_shuffle(uVar3,param_6,0xffffffffffffffff); } puVar4 = (int8 *)operator_new(0x50); *puVar4 = 0; puVar4[1] = 0; puVar4[2] = 0; puVar4[3] = 0; puVar4[4] = 0; puVar4[5] = 0; puVar4[6] = 0; puVar4[7] = 0; puVar4[8] = 0xffffffffffffffff; *(int1 *)(puVar4 + 9) = 0; puVar5 = (int8 *)operator_new(0x50); *puVar5 = 0; puVar5[1] = 0; puVar5[2] = 0; puVar5[3] = 0; puVar5[4] = 0; puVar5[5] = 0; puVar5[6] = 0; puVar5[7] = 0; puVar5[8] = 0xffffffffffffffff; *(int1 *)(puVar5 + 9) = 0; puVar8 = (int *)0x0; if (param_11 == '\0') { puVar8 = PTR_ggml_opt_epoch_callback_progress_bar_0016dfd8; } if (local_a0 <= param_9) { lVar7 = lVar2 * local_88 * (long)((float)local_80 * (DAT_0014c058 - param_1)); do { if (lVar7 - param_10 != 0 && param_10 <= lVar7) { ggml_opt_dataset_shuffle(uVar3,param_6,lVar7); } *puVar4 = 0; if (puVar4[2] != puVar4[1]) { puVar4[2] = puVar4[1]; } if (puVar4[5] != puVar4[4]) { puVar4[5] = puVar4[4]; } puVar4[7] = 0; *puVar5 = 0; if (puVar5[2] != puVar5[1]) { puVar5[2] = puVar5[1]; } if (puVar5[5] != puVar5[4]) { puVar5[5] = puVar5[4]; } puVar5[7] = 0; if (param_11 == '\0') { fprintf(*(FILE **)PTR_stderr_0016dfc8,"%s: epoch %04ld/%04ld:\n","ggml_opt_fit", local_a0,param_9); ggml_opt_epoch(uVar3,param_6,puVar4,puVar5,lVar7,puVar8,puVar8); fputc(10,*(FILE **)PTR_stderr_0016dfc8); } else { ggml_opt_epoch(uVar3,param_6,puVar4,puVar5,lVar7,puVar8,puVar8); } lVar2 = local_a0 + 1; bVar1 = local_a0 < param_9; local_a0 = lVar2; } while (bVar1); } if (param_11 == '\0') { ggml_opt_fit_cold_1(local_90); } ggml_opt_free(uVar3); ggml_opt_result_free(puVar4); ggml_opt_result_free(puVar5); return; } pcVar6 = "val_split < 1.0f"; uVar3 = 0x323; } } else { pcVar6 = "nbatch_logical % nbatch_physical == 0"; uVar3 = 0x31d; } } else { pcVar6 = "ndata % nbatch_logical == 0"; uVar3 = 0x31c; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp" ,uVar3,"GGML_ASSERT(%s) failed",pcVar6); }
4,626
resize_ic_hash
bluesky950520[P]quickjs/quickjs.c
int resize_ic_hash(JSContext *ctx, JSInlineCache *ic) { uint32_t new_capacity, i, h; JSInlineCacheHashSlot *ch, *ch_next; JSInlineCacheHashSlot **new_hash; new_capacity = 1 << (ic->hash_bits + 1); new_hash = js_mallocz(ctx, sizeof(ic->hash[0]) * new_capacity); if (unlikely(!new_hash)) goto fail; ic->hash_bits += 1; for (i = 0; i < ic->capacity; i++) { for (ch = ic->hash[i]; ch != NULL; ch = ch_next) { h = get_index_hash(ch->atom, ic->hash_bits); ch_next = ch->next; ch->next = new_hash[h]; new_hash[h] = ch; } } js_free(ctx, ic->hash); ic->hash = new_hash; ic->capacity = new_capacity; return 0; fail: return -1; }
O0
c
resize_ic_hash: subq $0x48, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq 0x28(%rsp), %rax movl 0x8(%rax), %ecx addl $0x1, %ecx movl $0x1, %eax shll %cl, %eax movl %eax, 0x24(%rsp) movq 0x30(%rsp), %rdi movl 0x24(%rsp), %eax movl %eax, %esi shlq $0x3, %rsi callq 0x21d30 movq %rax, (%rsp) cmpq $0x0, (%rsp) setne %al xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xb10ec jmp 0xb11e8 movq 0x28(%rsp), %rax movl 0x8(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x8(%rax) movl $0x0, 0x20(%rsp) movl 0x20(%rsp), %eax movq 0x28(%rsp), %rcx cmpl 0x4(%rcx), %eax jae 0xb11b2 movq 0x28(%rsp), %rax movq 0x10(%rax), %rax movl 0x20(%rsp), %ecx movq (%rax,%rcx,8), %rax movq %rax, 0x10(%rsp) cmpq $0x0, 0x10(%rsp) je 0xb11a0 movq 0x10(%rsp), %rax movl (%rax), %ecx movq 0x28(%rsp), %rax movl 0x8(%rax), %eax movl %ecx, 0x44(%rsp) movl %eax, 0x40(%rsp) imull $0x9e370001, 0x44(%rsp), %eax # imm = 0x9E370001 movl $0x20, %ecx subl 0x40(%rsp), %ecx shrl %cl, %eax movl %eax, 0x1c(%rsp) movq 0x10(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x8(%rsp) movq (%rsp), %rax movl 0x1c(%rsp), %ecx movq (%rax,%rcx,8), %rcx movq 0x10(%rsp), %rax movq %rcx, 0x8(%rax) movq 0x10(%rsp), %rdx movq (%rsp), %rax movl 0x1c(%rsp), %ecx movq %rdx, (%rax,%rcx,8) movq 0x8(%rsp), %rax movq %rax, 0x10(%rsp) jmp 0xb112a jmp 0xb11a2 movl 0x20(%rsp), %eax addl $0x1, %eax movl %eax, 0x20(%rsp) jmp 0xb1102 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rax movq 0x10(%rax), %rsi callq 0x21db0 movq (%rsp), %rcx movq 0x28(%rsp), %rax movq %rcx, 0x10(%rax) movl 0x24(%rsp), %ecx movq 0x28(%rsp), %rax movl %ecx, 0x4(%rax) movl $0x0, 0x3c(%rsp) jmp 0xb11f0 movl $0xffffffff, 0x3c(%rsp) # imm = 0xFFFFFFFF movl 0x3c(%rsp), %eax addq $0x48, %rsp retq nopl (%rax)
resize_ic_hash: sub rsp, 48h mov [rsp+48h+var_18], rdi mov [rsp+48h+var_20], rsi mov rax, [rsp+48h+var_20] mov ecx, [rax+8] add ecx, 1 mov eax, 1 shl eax, cl mov [rsp+48h+var_24], eax mov rdi, [rsp+48h+var_18] mov eax, [rsp+48h+var_24] mov esi, eax shl rsi, 3 call js_mallocz mov [rsp+48h+var_48], rax cmp [rsp+48h+var_48], 0 setnz al xor al, 0FFh xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_B10EC jmp loc_B11E8 loc_B10EC: mov rax, [rsp+48h+var_20] mov ecx, [rax+8] add ecx, 1 mov [rax+8], ecx mov [rsp+48h+var_28], 0 loc_B1102: mov eax, [rsp+48h+var_28] mov rcx, [rsp+48h+var_20] cmp eax, [rcx+4] jnb loc_B11B2 mov rax, [rsp+48h+var_20] mov rax, [rax+10h] mov ecx, [rsp+48h+var_28] mov rax, [rax+rcx*8] mov [rsp+48h+var_38], rax loc_B112A: cmp [rsp+48h+var_38], 0 jz short loc_B11A0 mov rax, [rsp+48h+var_38] mov ecx, [rax] mov rax, [rsp+48h+var_20] mov eax, [rax+8] mov [rsp+48h+var_4], ecx mov [rsp+48h+var_8], eax imul eax, [rsp+48h+var_4], 9E370001h mov ecx, 20h ; ' ' sub ecx, [rsp+48h+var_8] shr eax, cl mov [rsp+48h+var_2C], eax mov rax, [rsp+48h+var_38] mov rax, [rax+8] mov [rsp+48h+var_40], rax mov rax, [rsp+48h+var_48] mov ecx, [rsp+48h+var_2C] mov rcx, [rax+rcx*8] mov rax, [rsp+48h+var_38] mov [rax+8], rcx mov rdx, [rsp+48h+var_38] mov rax, [rsp+48h+var_48] mov ecx, [rsp+48h+var_2C] mov [rax+rcx*8], rdx mov rax, [rsp+48h+var_40] mov [rsp+48h+var_38], rax jmp short loc_B112A loc_B11A0: jmp short $+2 loc_B11A2: mov eax, [rsp+48h+var_28] add eax, 1 mov [rsp+48h+var_28], eax jmp loc_B1102 loc_B11B2: mov rdi, [rsp+48h+var_18] mov rax, [rsp+48h+var_20] mov rsi, [rax+10h] call js_free mov rcx, [rsp+48h+var_48] mov rax, [rsp+48h+var_20] mov [rax+10h], rcx mov ecx, [rsp+48h+var_24] mov rax, [rsp+48h+var_20] mov [rax+4], ecx mov [rsp+48h+var_C], 0 jmp short loc_B11F0 loc_B11E8: mov [rsp+48h+var_C], 0FFFFFFFFh loc_B11F0: mov eax, [rsp+48h+var_C] add rsp, 48h retn
long long resize_ic_hash(long long a1, long long a2) { long long v3; // [rsp+0h] [rbp-48h] long long v4; // [rsp+8h] [rbp-40h] long long j; // [rsp+10h] [rbp-38h] unsigned int v6; // [rsp+1Ch] [rbp-2Ch] unsigned int i; // [rsp+20h] [rbp-28h] unsigned int v8; // [rsp+24h] [rbp-24h] v8 = 1 << (*(_BYTE *)(a2 + 8) + 1); v3 = js_mallocz(a1, 8LL * v8); if ( v3 ) { ++*(_DWORD *)(a2 + 8); for ( i = 0; i < *(_DWORD *)(a2 + 4); ++i ) { for ( j = *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8LL * i); j; j = v4 ) { v6 = (unsigned int)(-1640562687 * *(_DWORD *)j) >> (32 - *(_DWORD *)(a2 + 8)); v4 = *(_QWORD *)(j + 8); *(_QWORD *)(j + 8) = *(_QWORD *)(v3 + 8LL * v6); *(_QWORD *)(v3 + 8LL * v6) = j; } } js_free(a1, *(_QWORD *)(a2 + 16)); *(_QWORD *)(a2 + 16) = v3; *(_DWORD *)(a2 + 4) = v8; return 0; } else { return (unsigned int)-1; } }
resize_ic_hash: SUB RSP,0x48 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV RAX,qword ptr [RSP + 0x28] MOV ECX,dword ptr [RAX + 0x8] ADD ECX,0x1 MOV EAX,0x1 SHL EAX,CL MOV dword ptr [RSP + 0x24],EAX MOV RDI,qword ptr [RSP + 0x30] MOV EAX,dword ptr [RSP + 0x24] MOV ESI,EAX SHL RSI,0x3 CALL 0x00121d30 MOV qword ptr [RSP],RAX CMP qword ptr [RSP],0x0 SETNZ AL XOR AL,0xff XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001b10ec JMP 0x001b11e8 LAB_001b10ec: MOV RAX,qword ptr [RSP + 0x28] MOV ECX,dword ptr [RAX + 0x8] ADD ECX,0x1 MOV dword ptr [RAX + 0x8],ECX MOV dword ptr [RSP + 0x20],0x0 LAB_001b1102: MOV EAX,dword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x28] CMP EAX,dword ptr [RCX + 0x4] JNC 0x001b11b2 MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x10] MOV ECX,dword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x10],RAX LAB_001b112a: CMP qword ptr [RSP + 0x10],0x0 JZ 0x001b11a0 MOV RAX,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RSP + 0x28] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RSP + 0x44],ECX MOV dword ptr [RSP + 0x40],EAX IMUL EAX,dword ptr [RSP + 0x44],-0x61c8ffff MOV ECX,0x20 SUB ECX,dword ptr [RSP + 0x40] SHR EAX,CL MOV dword ptr [RSP + 0x1c],EAX MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP] MOV ECX,dword ptr [RSP + 0x1c] MOV RCX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV RDX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP] MOV ECX,dword ptr [RSP + 0x1c] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x10],RAX JMP 0x001b112a LAB_001b11a0: JMP 0x001b11a2 LAB_001b11a2: MOV EAX,dword ptr [RSP + 0x20] ADD EAX,0x1 MOV dword ptr [RSP + 0x20],EAX JMP 0x001b1102 LAB_001b11b2: MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RAX + 0x10] CALL 0x00121db0 MOV RCX,qword ptr [RSP] MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x10],RCX MOV ECX,dword ptr [RSP + 0x24] MOV RAX,qword ptr [RSP + 0x28] MOV dword ptr [RAX + 0x4],ECX MOV dword ptr [RSP + 0x3c],0x0 JMP 0x001b11f0 LAB_001b11e8: MOV dword ptr [RSP + 0x3c],0xffffffff LAB_001b11f0: MOV EAX,dword ptr [RSP + 0x3c] ADD RSP,0x48 RET
int4 resize_ic_hash(int8 param_1,long param_2) { int *piVar1; uint uVar2; uint uVar3; long lVar4; int *local_38; uint local_28; int4 local_c; uVar2 = 1 << ((char)*(int4 *)(param_2 + 8) + 1U & 0x1f); lVar4 = js_mallocz(param_1,(ulong)uVar2 << 3); if (lVar4 == 0) { local_c = 0xffffffff; } else { *(int *)(param_2 + 8) = *(int *)(param_2 + 8) + 1; for (local_28 = 0; local_28 < *(uint *)(param_2 + 4); local_28 = local_28 + 1) { local_38 = *(int **)(*(long *)(param_2 + 0x10) + (ulong)local_28 * 8); while (local_38 != (int *)0x0) { uVar3 = (uint)(*local_38 * -0x61c8ffff) >> (0x20U - (char)*(int4 *)(param_2 + 8) & 0x1f); piVar1 = *(int **)(local_38 + 2); *(int8 *)(local_38 + 2) = *(int8 *)(lVar4 + (ulong)uVar3 * 8); *(int **)(lVar4 + (ulong)uVar3 * 8) = local_38; local_38 = piVar1; } } js_free(param_1,*(int8 *)(param_2 + 0x10)); *(long *)(param_2 + 0x10) = lVar4; *(uint *)(param_2 + 4) = uVar2; local_c = 0; } return local_c; }
4,627
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>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
monkey531[P]llama/common/json.hpp
void push_back(const basic_json& val) { // push_back only works for null objects or arrays if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array()))) { JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this)); } // transform null object into an array if (is_null()) { m_data.m_type = value_t::array; m_data.m_value = value_t::array; assert_invariant(); } // add element to array const auto old_capacity = m_data.m_value.array->capacity(); m_data.m_value.array->push_back(val); set_parent(m_data.m_value.array->back(), old_capacity); }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 movzbl (%rdi), %eax testl %eax, %eax jne 0x7f5cb movb $0x2, (%r14) callq 0x421cc movq %rax, 0x8(%r14) pushq $0x1 popq %rsi movq %r14, %rdi callq 0x42092 jmp 0x7f5d0 cmpl $0x2, %eax jne 0x7f5e4 movq 0x8(%r14), %rdi movq %rbx, %rsi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0x82d2c pushq $0x20 popq %rdi callq 0x24480 movq %rax, %rbx movq %r14, %rdi callq 0x479ee leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x39eba(%rip), %rsi # 0xb94c0 leaq 0x10(%rsp), %rdi callq 0x67813 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x134, %esi # imm = 0x134 movq %r14, %rcx callq 0x478a2 xorl %ebp, %ebp leaq 0x81917(%rip), %rsi # 0x100f48 leaq -0x3b0ba(%rip), %rdx # 0x4457e movq %rbx, %rdi callq 0x24fa0 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x25288 testb %bpl, %bpl jne 0x7f657 jmp 0x7f65f movq %rax, %r14 movq %rbx, %rdi callq 0x246c0 movq %r14, %rdi callq 0x25020 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backERKSD_: push rbp; char push r14; int push rbx; int sub rsp, 30h mov rbx, rsi mov r14, rdi movzx eax, byte ptr [rdi] test eax, eax jnz short loc_7F5CB mov byte ptr [r14], 2 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJEEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>() mov [r14+8], rax push 1 pop rsi mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_7F5D0 loc_7F5CB: cmp eax, 2 jnz short loc_7F5E4 loc_7F5D0: mov rdi, [r14+8] mov rsi, rbx add rsp, 30h pop rbx pop r14 pop rbp jmp _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE9push_backERKSD_; 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>>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) loc_7F5E4: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUsePushB; "cannot use push_back() with " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 134h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_7F657 jmp short loc_7F65F mov r14, rax loc_7F657: mov rdi, rbx; void * call ___cxa_free_exception loc_7F65F: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::push_back( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx const char *v4; // [rsp+8h] [rbp-40h] BYREF _BYTE v5[56]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 ) { if ( *(_BYTE *)a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v5, (long long)"cannot use push_back() with ", &v4); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 308, (long long)v5); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } } else { *(_BYTE *)a1 = 2; *(_QWORD *)(a1 + 8) = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>(); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); } return 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>>::push_back( *(_QWORD *)(a1 + 8), a2); }
push_back: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R14,RDI MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JNZ 0x0017f5cb MOV byte ptr [R14],0x2 CALL 0x001421cc MOV qword ptr [R14 + 0x8],RAX PUSH 0x1 POP RSI MOV RDI,R14 CALL 0x00142092 JMP 0x0017f5d0 LAB_0017f5cb: CMP EAX,0x2 JNZ 0x0017f5e4 LAB_0017f5d0: MOV RDI,qword ptr [R14 + 0x8] MOV RSI,RBX ADD RSP,0x30 POP RBX POP R14 POP RBP JMP 0x00182d2c LAB_0017f5e4: PUSH 0x20 POP RDI CALL 0x00124480 MOV RBX,RAX MOV RDI,R14 CALL 0x001479ee LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0017f5ff: LEA RSI,[0x1b94c0] LEA RDI,[RSP + 0x10] CALL 0x00167813 MOV BPL,0x1 LAB_0017f613: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x134 MOV RCX,R14 CALL 0x001478a2 XOR EBP,EBP LEA RSI,[0x200f48] LEA RDX,[0x14457e] MOV RDI,RBX CALL 0x00124fa0
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&) */ void __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::push_back(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,basic_json *param_1) { vector *pvVar1; int8 uVar2; char *local_40; detail local_38 [32]; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2; pvVar1 = create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> (); *(vector **)(this + 8) = pvVar1; assert_invariant(SUB81(this,0)); } else if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { uVar2 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 0017f5ff to 0017f60f has its CatchHandler @ 0017f654 */ detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"cannot use push_back() with ",&local_40); /* try { // try from 0017f613 to 0017f63f has its CatchHandler @ 0017f640 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x134,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception); } 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>>> ::push_back(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(this + 8),param_1); return; }
4,628
ma_bitmap_create_missing
eloqsql/storage/maria/ma_bitmap.c
static my_bool _ma_bitmap_create_missing(MARIA_HA *info, MARIA_FILE_BITMAP *bitmap, pgcache_page_no_t page) { MARIA_SHARE *share= info->s; uint block_size= bitmap->block_size; pgcache_page_no_t from, to; my_off_t data_file_length= share->state.state.data_file_length; DBUG_ENTER("_ma_bitmap_create_missing"); DBUG_PRINT("enter", ("page: %lld", (longlong) page)); /* First (in offset order) bitmap page to create */ if (data_file_length < block_size) goto err; /* corrupted, should have first bitmap page */ if (page * block_size >= share->base.max_data_file_length) { my_errno= HA_ERR_RECORD_FILE_FULL; goto err; } from= (data_file_length / block_size - 1) / bitmap->pages_covered + 1; from*= bitmap->pages_covered; /* page>=from because: (page + 1) * bs > dfl, and page == k * pc so: (k * pc + 1) * bs > dfl; k * pc + 1 > dfl / bs; k * pc > dfl / bs - 1 k > (dfl / bs - 1) / pc; k >= (dfl / bs - 1) / pc + 1 k * pc >= ((dfl / bs - 1) / pc + 1) * pc == from. */ DBUG_ASSERT(page >= from); if (share->now_transactional) { LSN lsn; uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE * 2]; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 1]; page_store(log_data + FILEID_STORE_SIZE, from); page_store(log_data + FILEID_STORE_SIZE + PAGE_STORE_SIZE, page); log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data); /* We don't use info->trn so that this REDO is always executed even though the UNDO does not reach disk due to crash. This is also consistent with the fact that the new bitmap pages are not pinned. */ if (translog_write_record(&lsn, LOGREC_REDO_BITMAP_NEW_PAGE, &dummy_transaction_object, info, (translog_size_t)sizeof(log_data), TRANSLOG_INTERNAL_PARTS + 1, log_array, log_data, NULL)) goto err; /* No need to flush the log: the bitmap pages we are going to create will flush it when they go to disk. */ } /* Last bitmap page. It has special creation: will go to the page cache only later as we are going to modify it very soon. */ bzero(bitmap->map, bitmap->block_size); bitmap->used_size= bitmap->full_head_size= bitmap->full_tail_size= 0; bitmap->changed=1; #ifndef DBUG_OFF /* Make a copy of the page to be able to print out bitmap changes during debugging */ memcpy(bitmap->map + bitmap->block_size, bitmap->map, bitmap->block_size); #endif /* Last bitmap page to create before 'page' */ DBUG_ASSERT(page >= bitmap->pages_covered); to= page - bitmap->pages_covered; /* In run-time situations, from>=to is always false, i.e. we always create one bitmap at a time ('page'). */ if ((from <= to) && _ma_bitmap_create_missing_into_pagecache(share, bitmap, from, to, bitmap->map)) goto err; share->state.state.data_file_length= (page + 1) * bitmap->block_size; DBUG_RETURN(FALSE); err: DBUG_RETURN(TRUE); }
O0
c
ma_bitmap_create_missing: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x20(%rbp) movq %rsi, -0x28(%rbp) movq %rdx, -0x30(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x28(%rbp), %rax movl 0x134(%rax), %eax movl %eax, -0x3c(%rbp) movq -0x38(%rbp), %rax movq 0x40(%rax), %rax movq %rax, -0x58(%rbp) jmp 0x46d1a movq -0x58(%rbp), %rax movl -0x3c(%rbp), %ecx cmpq %rcx, %rax jae 0x46d2b jmp 0x46f19 movq -0x30(%rbp), %rax movl -0x3c(%rbp), %ecx imulq %rcx, %rax movq -0x38(%rbp), %rcx cmpq 0x368(%rcx), %rax jb 0x46d53 callq 0xf7440 movl $0x87, (%rax) jmp 0x46f19 movq -0x58(%rbp), %rax movl -0x3c(%rbp), %ecx xorl %edx, %edx divq %rcx subq $0x1, %rax movq -0x28(%rbp), %rcx xorl %edx, %edx divq 0x138(%rcx) addq $0x1, %rax movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rax movq 0x138(%rax), %rax imulq -0x48(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0x46d8e movq -0x38(%rbp), %rax cmpb $0x0, 0x7e7(%rax) je 0x46e6b jmp 0x46da1 leaq -0x14(%rbp), %rax addq $0x2, %rax movq %rax, -0x98(%rbp) movq -0x48(%rbp), %rax movl %eax, %ecx movq -0x98(%rbp), %rax movl %ecx, (%rax) movq -0x48(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0x98(%rbp), %rax movb %cl, 0x4(%rax) jmp 0x46dd5 leaq -0x14(%rbp), %rax addq $0x2, %rax addq $0x5, %rax movq %rax, -0xa0(%rbp) movq -0x30(%rbp), %rax movl %eax, %ecx movq -0xa0(%rbp), %rax movl %ecx, (%rax) movq -0x30(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0xa0(%rbp), %rax movb %cl, 0x4(%rax) leaq -0x14(%rbp), %rax movq %rax, -0x70(%rbp) movq $0xc, -0x68(%rbp) movq -0x20(%rbp), %rcx leaq -0x90(%rbp), %r10 leaq -0x14(%rbp), %rax leaq -0x60(%rbp), %rdi movl $0x28, %esi leaq 0x432046(%rip), %rdx # 0x478e80 movl $0xc, %r8d movl $0x3, %r9d xorl %r11d, %r11d movq %r10, (%rsp) movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) callq 0x55370 cmpb $0x0, %al je 0x46e69 jmp 0x46f19 jmp 0x46e6b movq -0x28(%rbp), %rax movq 0x8(%rax), %rdi movq -0x28(%rbp), %rax movl 0x134(%rax), %eax movl %eax, %edx xorl %esi, %esi callq 0x2a2c0 movq -0x28(%rbp), %rax movl $0x0, 0x2c(%rax) movq -0x28(%rbp), %rax movl $0x0, 0x28(%rax) movq -0x28(%rbp), %rax movl $0x0, 0x24(%rax) movq -0x28(%rbp), %rax movb $0x1, 0x20(%rax) jmp 0x46eb1 movq -0x30(%rbp), %rax movq -0x28(%rbp), %rcx subq 0x138(%rcx), %rax movq %rax, -0x50(%rbp) movq -0x48(%rbp), %rax cmpq -0x50(%rbp), %rax ja 0x46ef5 movq -0x38(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x48(%rbp), %rdx movq -0x50(%rbp), %rcx movq -0x28(%rbp), %rax movq 0x8(%rax), %r8 callq 0x45970 movsbl %al, %eax cmpl $0x0, %eax je 0x46ef5 jmp 0x46f19 movq -0x30(%rbp), %rcx addq $0x1, %rcx movq -0x28(%rbp), %rax movl 0x134(%rax), %eax imulq %rax, %rcx movq -0x38(%rbp), %rax movq %rcx, 0x40(%rax) movb $0x0, -0x15(%rbp) jmp 0x46f1f jmp 0x46f1b movb $0x1, -0x15(%rbp) movb -0x15(%rbp), %al movb %al, -0xa1(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x46f49 movb -0xa1(%rbp), %al addq $0xc0, %rsp popq %rbp retq callq 0x2a270 nop
_ma_bitmap_create_missing: push rbp mov rbp, rsp sub rsp, 0C0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_20], rdi mov [rbp+var_28], rsi mov [rbp+var_30], rdx mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_38], rax mov rax, [rbp+var_28] mov eax, [rax+134h] mov [rbp+var_3C], eax mov rax, [rbp+var_38] mov rax, [rax+40h] mov [rbp+var_58], rax jmp short $+2 loc_46D1A: mov rax, [rbp+var_58] mov ecx, [rbp+var_3C] cmp rax, rcx jnb short loc_46D2B jmp loc_46F19 loc_46D2B: mov rax, [rbp+var_30] mov ecx, [rbp+var_3C] imul rax, rcx mov rcx, [rbp+var_38] cmp rax, [rcx+368h] jb short loc_46D53 call _my_thread_var mov dword ptr [rax], 87h jmp loc_46F19 loc_46D53: mov rax, [rbp+var_58] mov ecx, [rbp+var_3C] xor edx, edx div rcx sub rax, 1 mov rcx, [rbp+var_28] xor edx, edx div qword ptr [rcx+138h] add rax, 1 mov [rbp+var_48], rax mov rax, [rbp+var_28] mov rax, [rax+138h] imul rax, [rbp+var_48] mov [rbp+var_48], rax jmp short $+2 loc_46D8E: mov rax, [rbp+var_38] cmp byte ptr [rax+7E7h], 0 jz loc_46E6B jmp short $+2 loc_46DA1: lea rax, [rbp+var_14] add rax, 2 mov [rbp+var_98], rax mov rax, [rbp+var_48] mov ecx, eax mov rax, [rbp+var_98] mov [rax], ecx mov rax, [rbp+var_48] shr rax, 20h mov cl, al mov rax, [rbp+var_98] mov [rax+4], cl jmp short $+2 loc_46DD5: lea rax, [rbp+var_14] add rax, 2 add rax, 5 mov [rbp+var_A0], rax mov rax, [rbp+var_30] mov ecx, eax mov rax, [rbp+var_A0] mov [rax], ecx mov rax, [rbp+var_30] shr rax, 20h mov cl, al mov rax, [rbp+var_A0] mov [rax+4], cl lea rax, [rbp+var_14] mov [rbp+var_70], rax mov [rbp+var_68], 0Ch mov rcx, [rbp+var_20] lea r10, [rbp+var_90] lea rax, [rbp+var_14] lea rdi, [rbp+var_60] mov esi, 28h ; '(' lea rdx, dummy_transaction_object mov r8d, 0Ch mov r9d, 3 xor r11d, r11d mov [rsp+0C0h+var_C0], r10 mov [rsp+0C0h+var_B8], rax mov [rsp+0C0h+var_B0], 0 call translog_write_record cmp al, 0 jz short loc_46E69 jmp loc_46F19 loc_46E69: jmp short $+2 loc_46E6B: mov rax, [rbp+var_28] mov rdi, [rax+8] mov rax, [rbp+var_28] mov eax, [rax+134h] mov edx, eax xor esi, esi call _memset mov rax, [rbp+var_28] mov dword ptr [rax+2Ch], 0 mov rax, [rbp+var_28] mov dword ptr [rax+28h], 0 mov rax, [rbp+var_28] mov dword ptr [rax+24h], 0 mov rax, [rbp+var_28] mov byte ptr [rax+20h], 1 jmp short $+2 loc_46EB1: mov rax, [rbp+var_30] mov rcx, [rbp+var_28] sub rax, [rcx+138h] mov [rbp+var_50], rax mov rax, [rbp+var_48] cmp rax, [rbp+var_50] ja short loc_46EF5 mov rdi, [rbp+var_38] mov rsi, [rbp+var_28] mov rdx, [rbp+var_48] mov rcx, [rbp+var_50] mov rax, [rbp+var_28] mov r8, [rax+8] call _ma_bitmap_create_missing_into_pagecache movsx eax, al cmp eax, 0 jz short loc_46EF5 jmp short loc_46F19 loc_46EF5: mov rcx, [rbp+var_30] add rcx, 1 mov rax, [rbp+var_28] mov eax, [rax+134h] imul rcx, rax mov rax, [rbp+var_38] mov [rax+40h], rcx mov [rbp+var_15], 0 jmp short loc_46F1F loc_46F19: jmp short $+2 loc_46F1B: mov [rbp+var_15], 1 loc_46F1F: mov al, [rbp+var_15] mov [rbp+var_A1], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_46F49 mov al, [rbp+var_A1] add rsp, 0C0h pop rbp retn loc_46F49: call ___stack_chk_fail
char ma_bitmap_create_missing(long long *a1, long long a2, long long a3) { _BYTE v4[32]; // [rsp+30h] [rbp-90h] BYREF _BYTE *v5; // [rsp+50h] [rbp-70h] long long v6; // [rsp+58h] [rbp-68h] char v7; // [rsp+60h] [rbp-60h] BYREF unsigned long long v8; // [rsp+68h] [rbp-58h] unsigned long long v9; // [rsp+70h] [rbp-50h] unsigned long long v10; // [rsp+78h] [rbp-48h] unsigned int v11; // [rsp+84h] [rbp-3Ch] long long v12; // [rsp+88h] [rbp-38h] long long v13; // [rsp+90h] [rbp-30h] long long v14; // [rsp+98h] [rbp-28h] long long *v15; // [rsp+A0h] [rbp-20h] _BYTE v17[2]; // [rsp+ACh] [rbp-14h] BYREF int v18; // [rsp+AEh] [rbp-12h] char v19; // [rsp+B2h] [rbp-Eh] int v20; // [rsp+B3h] [rbp-Dh] char v21; // [rsp+B7h] [rbp-9h] unsigned long long v22; // [rsp+B8h] [rbp-8h] v22 = __readfsqword(0x28u); v15 = a1; v14 = a2; v13 = a3; v12 = *a1; v11 = *(_DWORD *)(a2 + 308); v8 = *(_QWORD *)(v12 + 64); if ( v8 < v11 ) return 1; if ( (unsigned long long)v11 * v13 >= *(_QWORD *)(v12 + 872) ) { *(_DWORD *)my_thread_var() = 135; return 1; } v10 = ((v8 / v11 - 1) / *(_QWORD *)(v14 + 312) + 1) * *(_QWORD *)(v14 + 312); if ( *(_BYTE *)(v12 + 2023) ) { v18 = v10; v19 = BYTE4(v10); v20 = v13; v21 = BYTE4(v13); v5 = v17; v6 = 12LL; if ( (unsigned __int8)translog_write_record( (unsigned int)&v7, 40, (unsigned int)&dummy_transaction_object, (_DWORD)v15, 12, 3, (long long)v4, (long long)v17, 0LL) ) return 1; } memset(*(_QWORD *)(v14 + 8), 0LL, *(unsigned int *)(v14 + 308)); *(_DWORD *)(v14 + 44) = 0; *(_DWORD *)(v14 + 40) = 0; *(_DWORD *)(v14 + 36) = 0; *(_BYTE *)(v14 + 32) = 1; v9 = v13 - *(_QWORD *)(v14 + 312); if ( v10 <= v9 ) { if ( ma_bitmap_create_missing_into_pagecache(v12, v14, v10, v9, *(_QWORD *)(v14 + 8)) ) return 1; } *(_QWORD *)(v12 + 64) = *(unsigned int *)(v14 + 308) * (v13 + 1); return 0; }
_ma_bitmap_create_missing: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x20],RDI MOV qword ptr [RBP + -0x28],RSI MOV qword ptr [RBP + -0x30],RDX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x134] MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBP + -0x58],RAX JMP 0x00146d1a LAB_00146d1a: MOV RAX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RBP + -0x3c] CMP RAX,RCX JNC 0x00146d2b JMP 0x00146f19 LAB_00146d2b: MOV RAX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RBP + -0x3c] IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RCX + 0x368] JC 0x00146d53 CALL 0x001f7440 MOV dword ptr [RAX],0x87 JMP 0x00146f19 LAB_00146d53: MOV RAX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RBP + -0x3c] XOR EDX,EDX DIV RCX SUB RAX,0x1 MOV RCX,qword ptr [RBP + -0x28] XOR EDX,EDX DIV qword ptr [RCX + 0x138] ADD RAX,0x1 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x138] IMUL RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x48],RAX JMP 0x00146d8e LAB_00146d8e: MOV RAX,qword ptr [RBP + -0x38] CMP byte ptr [RAX + 0x7e7],0x0 JZ 0x00146e6b JMP 0x00146da1 LAB_00146da1: LEA RAX,[RBP + -0x14] ADD RAX,0x2 MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x48] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x98] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x48] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0x98] MOV byte ptr [RAX + 0x4],CL JMP 0x00146dd5 LAB_00146dd5: LEA RAX,[RBP + -0x14] ADD RAX,0x2 ADD RAX,0x5 MOV qword ptr [RBP + -0xa0],RAX MOV RAX,qword ptr [RBP + -0x30] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0xa0] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x30] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0xa0] MOV byte ptr [RAX + 0x4],CL LEA RAX,[RBP + -0x14] MOV qword ptr [RBP + -0x70],RAX MOV qword ptr [RBP + -0x68],0xc MOV RCX,qword ptr [RBP + -0x20] LEA R10,[RBP + -0x90] LEA RAX,[RBP + -0x14] LEA RDI,[RBP + -0x60] MOV ESI,0x28 LEA RDX,[0x578e80] MOV R8D,0xc MOV R9D,0x3 XOR R11D,R11D MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 CALL 0x00155370 CMP AL,0x0 JZ 0x00146e69 JMP 0x00146f19 LAB_00146e69: JMP 0x00146e6b LAB_00146e6b: MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x134] MOV EDX,EAX XOR ESI,ESI CALL 0x0012a2c0 MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x2c],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x28],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x24],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x20],0x1 JMP 0x00146eb1 LAB_00146eb1: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x28] SUB RAX,qword ptr [RCX + 0x138] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x48] CMP RAX,qword ptr [RBP + -0x50] JA 0x00146ef5 MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x28] MOV R8,qword ptr [RAX + 0x8] CALL 0x00145970 MOVSX EAX,AL CMP EAX,0x0 JZ 0x00146ef5 JMP 0x00146f19 LAB_00146ef5: MOV RCX,qword ptr [RBP + -0x30] ADD RCX,0x1 MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x134] IMUL RCX,RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x40],RCX MOV byte ptr [RBP + -0x15],0x0 JMP 0x00146f1f LAB_00146f19: JMP 0x00146f1b LAB_00146f1b: MOV byte ptr [RBP + -0x15],0x1 LAB_00146f1f: MOV AL,byte ptr [RBP + -0x15] MOV byte ptr [RBP + -0xa1],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00146f49 MOV AL,byte ptr [RBP + -0xa1] ADD RSP,0xc0 POP RBP RET LAB_00146f49: CALL 0x0012a270
int8 _ma_bitmap_create_missing(long *param_1,long param_2,long param_3) { char cVar1; int4 *puVar2; long in_FS_OFFSET; int1 local_98 [32]; int1 *local_78; int8 local_70; int1 local_68 [8]; ulong local_60; ulong local_58; ulong local_50; uint local_44; long local_40; long local_38; long local_30; long *local_28; int1 local_1d; int1 local_1c [2]; int4 local_1a; int1 local_16; int4 local_15; int1 local_11; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_40 = *param_1; local_44 = *(uint *)(param_2 + 0x134); local_60 = *(ulong *)(local_40 + 0x40); local_38 = param_3; local_30 = param_2; local_28 = param_1; if (local_44 <= local_60) { if (param_3 * (ulong)local_44 < *(ulong *)(local_40 + 0x368)) { local_50 = *(long *)(param_2 + 0x138) * ((local_60 / local_44 - 1) / *(ulong *)(param_2 + 0x138) + 1); if (*(char *)(local_40 + 0x7e7) != '\0') { local_1a = (int4)local_50; local_16 = (int1)(local_50 >> 0x20); local_15 = (int4)param_3; local_11 = (int1)((ulong)param_3 >> 0x20); local_78 = local_1c; local_70 = 0xc; cVar1 = translog_write_record (local_68,0x28,dummy_transaction_object,param_1,0xc,3,local_98,local_1c,0) ; if (cVar1 != '\0') goto LAB_00146f19; } memset(*(void **)(local_30 + 8),0,(ulong)*(uint *)(local_30 + 0x134)); *(int4 *)(local_30 + 0x2c) = 0; *(int4 *)(local_30 + 0x28) = 0; *(int4 *)(local_30 + 0x24) = 0; *(int1 *)(local_30 + 0x20) = 1; local_58 = local_38 - *(long *)(local_30 + 0x138); if ((local_58 < local_50) || (cVar1 = _ma_bitmap_create_missing_into_pagecache (local_40,local_30,local_50,local_58,*(int8 *)(local_30 + 8)), cVar1 == '\0')) { *(ulong *)(local_40 + 0x40) = (local_38 + 1) * (ulong)*(uint *)(local_30 + 0x134); local_1d = 0; goto LAB_00146f1f; } } else { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x87; } } LAB_00146f19: local_1d = 1; LAB_00146f1f: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_1d); }
4,629
sort_maria_ft_key_read
eloqsql/storage/maria/ma_check.c
static int sort_maria_ft_key_read(MARIA_SORT_PARAM *sort_param, uchar *key) { int error; MARIA_SORT_INFO *sort_info=sort_param->sort_info; MARIA_HA *info=sort_info->info; FT_WORD *wptr=0; MARIA_KEY int_key; DBUG_ENTER("sort_maria_ft_key_read"); if (!sort_param->wordlist) { for (;;) { free_root(&sort_param->wordroot, MYF(MY_MARK_BLOCKS_FREE)); if ((error=sort_get_next_record(sort_param))) DBUG_RETURN(error); if ((error= _ma_sort_write_record(sort_param))) DBUG_RETURN(error); if (!(wptr= _ma_ft_parserecord(info,sort_param->key,sort_param->record, &sort_param->wordroot))) DBUG_RETURN(1); if (wptr->pos) break; } sort_param->wordptr=sort_param->wordlist=wptr; } else { error=0; wptr=(FT_WORD*)(sort_param->wordptr); } _ma_ft_make_key(info, &int_key, sort_param->key, key, wptr++, sort_param->current_filepos); sort_param->real_key_length= int_key.data_length + int_key.ref_length; #ifdef HAVE_valgrind if (sort_param->key_length > sort_param->real_key_length) bzero(key+sort_param->real_key_length, (sort_param->key_length-sort_param->real_key_length)); #endif if (!wptr->pos) { free_root(&sort_param->wordroot, MYF(MY_MARK_BLOCKS_FREE)); sort_param->wordlist=0; } else sort_param->wordptr=(void*)wptr; DBUG_RETURN(error); }
O3
c
sort_maria_ft_key_read: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %rcx movq %rdi, %rbx movq 0x380(%rdi), %rax movq 0x80(%rax), %r15 cmpq $0x0, 0x3a0(%rdi) je 0x7e6ff movq 0x3a8(%rbx), %r13 movl 0x640(%rbx), %edx movq 0x638(%rbx), %r9 leaq -0x50(%rbp), %r14 movq %r15, %rdi movq %r14, %rsi movq %r13, %r8 callq 0x8271d movl 0x14(%r14), %eax addl 0x10(%r14), %eax movl %eax, 0x648(%rbx) cmpq $0x0, 0x18(%r13) je 0x7e776 addq $0x18, %r13 movq %r13, 0x3a8(%rbx) jmp 0x7e792 movq %rcx, -0x30(%rbp) leaq 0x3b0(%rbx), %r12 movl $0x2, %esi movq %r12, %rdi callq 0xb9ab7 movq %rbx, %rdi callq 0x7a048 testl %eax, %eax jne 0x7e7a7 movq %rbx, %rdi callq 0x7b609 movl $0x1, %r14d testl %eax, %eax jne 0x7e795 movl 0x640(%rbx), %esi movq 0x3f0(%rbx), %rdx movq %r15, %rdi movq %r12, %rcx callq 0x823d0 testq %rax, %rax je 0x7e795 movq %rax, %r13 cmpq $0x0, (%rax) je 0x7e70a movq %r13, 0x3a0(%rbx) movq %r13, 0x3a8(%rbx) movq -0x30(%rbp), %rcx jmp 0x7e6b7 leaq 0x3b0(%rbx), %rdi movl $0x2, %esi callq 0xb9ab7 movq $0x0, 0x3a0(%rbx) xorl %r14d, %r14d movl %r14d, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %eax, %r14d jmp 0x7e795
sort_maria_ft_key_read: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rcx, rsi mov rbx, rdi mov rax, [rdi+380h] mov r15, [rax+80h] cmp qword ptr [rdi+3A0h], 0 jz short loc_7E6FF mov r13, [rbx+3A8h] loc_7E6B7: mov edx, [rbx+640h] mov r9, [rbx+638h] lea r14, [rbp+var_50] mov rdi, r15 mov rsi, r14 mov r8, r13 call _ma_ft_make_key mov eax, [r14+14h] add eax, [r14+10h] mov [rbx+648h], eax cmp qword ptr [r13+18h], 0 jz loc_7E776 add r13, 18h mov [rbx+3A8h], r13 jmp loc_7E792 loc_7E6FF: mov [rbp+var_30], rcx lea r12, [rbx+3B0h] loc_7E70A: mov esi, 2 mov rdi, r12 call free_root mov rdi, rbx call sort_get_next_record test eax, eax jnz loc_7E7A7 mov rdi, rbx call _ma_sort_write_record mov r14d, 1 test eax, eax jnz short loc_7E795 mov esi, [rbx+640h] mov rdx, [rbx+3F0h] mov rdi, r15 mov rcx, r12 call _ma_ft_parserecord test rax, rax jz short loc_7E795 mov r13, rax cmp qword ptr [rax], 0 jz short loc_7E70A mov [rbx+3A0h], r13 mov [rbx+3A8h], r13 mov rcx, [rbp+var_30] jmp loc_7E6B7 loc_7E776: lea rdi, [rbx+3B0h] mov esi, 2 call free_root mov qword ptr [rbx+3A0h], 0 loc_7E792: xor r14d, r14d loc_7E795: mov eax, r14d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7E7A7: mov r14d, eax jmp short loc_7E795
long long sort_maria_ft_key_read( unsigned long long a1, long long a2, __m128i a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { long long v10; // rcx long long v11; // r15 _QWORD *v12; // r13 double v13; // xmm4_8 double v14; // xmm5_8 unsigned int next_record; // eax unsigned int v16; // r14d _QWORD *v17; // rax _BYTE v19[16]; // [rsp+0h] [rbp-50h] BYREF int v20; // [rsp+10h] [rbp-40h] int v21; // [rsp+14h] [rbp-3Ch] long long v22; // [rsp+20h] [rbp-30h] v10 = a2; v11 = *(_QWORD *)(*(_QWORD *)(a1 + 896) + 128LL); if ( *(_QWORD *)(a1 + 928) ) { v12 = *(_QWORD **)(a1 + 936); LABEL_3: ma_ft_make_key(v11, v19, *(unsigned int *)(a1 + 1600), v10, v12, *(_QWORD *)(a1 + 1592)); *(_DWORD *)(a1 + 1608) = v20 + v21; if ( v12[3] ) { *(_QWORD *)(a1 + 936) = v12 + 3; } else { free_root(a1 + 944, 2LL); *(_QWORD *)(a1 + 928) = 0LL; } return 0; } else { v22 = a2; while ( 1 ) { free_root(a1 + 944, 2LL); next_record = sort_get_next_record(a1, a3, a4, a5, a6, v13, v14, a9, a10); if ( next_record ) return next_record; v16 = 1; if ( (unsigned int)ma_sort_write_record(a1) ) return v16; v17 = (_QWORD *)ma_ft_parserecord(v11, *(unsigned int *)(a1 + 1600), *(_QWORD *)(a1 + 1008), a1 + 944); if ( !v17 ) return v16; v12 = v17; if ( *v17 ) { *(_QWORD *)(a1 + 928) = v17; *(_QWORD *)(a1 + 936) = v17; v10 = v22; goto LABEL_3; } } } }
sort_maria_ft_key_read: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RCX,RSI MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x380] MOV R15,qword ptr [RAX + 0x80] CMP qword ptr [RDI + 0x3a0],0x0 JZ 0x0017e6ff MOV R13,qword ptr [RBX + 0x3a8] LAB_0017e6b7: MOV EDX,dword ptr [RBX + 0x640] MOV R9,qword ptr [RBX + 0x638] LEA R14,[RBP + -0x50] MOV RDI,R15 MOV RSI,R14 MOV R8,R13 CALL 0x0018271d MOV EAX,dword ptr [R14 + 0x14] ADD EAX,dword ptr [R14 + 0x10] MOV dword ptr [RBX + 0x648],EAX CMP qword ptr [R13 + 0x18],0x0 JZ 0x0017e776 ADD R13,0x18 MOV qword ptr [RBX + 0x3a8],R13 JMP 0x0017e792 LAB_0017e6ff: MOV qword ptr [RBP + -0x30],RCX LEA R12,[RBX + 0x3b0] LAB_0017e70a: MOV ESI,0x2 MOV RDI,R12 CALL 0x001b9ab7 MOV RDI,RBX CALL 0x0017a048 TEST EAX,EAX JNZ 0x0017e7a7 MOV RDI,RBX CALL 0x0017b609 MOV R14D,0x1 TEST EAX,EAX JNZ 0x0017e795 MOV ESI,dword ptr [RBX + 0x640] MOV RDX,qword ptr [RBX + 0x3f0] MOV RDI,R15 MOV RCX,R12 CALL 0x001823d0 TEST RAX,RAX JZ 0x0017e795 MOV R13,RAX CMP qword ptr [RAX],0x0 JZ 0x0017e70a MOV qword ptr [RBX + 0x3a0],R13 MOV qword ptr [RBX + 0x3a8],R13 MOV RCX,qword ptr [RBP + -0x30] JMP 0x0017e6b7 LAB_0017e776: LEA RDI,[RBX + 0x3b0] MOV ESI,0x2 CALL 0x001b9ab7 MOV qword ptr [RBX + 0x3a0],0x0 LAB_0017e792: XOR R14D,R14D LAB_0017e795: MOV EAX,R14D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017e7a7: MOV R14D,EAX JMP 0x0017e795
int sort_maria_ft_key_read(long param_1,int8 param_2) { int8 uVar1; int iVar2; long *plVar3; int1 local_58 [16]; int local_48; int local_44; int8 local_38; uVar1 = *(int8 *)(*(long *)(param_1 + 0x380) + 0x80); if (*(long *)(param_1 + 0x3a0) == 0) { local_38 = param_2; do { free_root(param_1 + 0x3b0,2); iVar2 = sort_get_next_record(param_1); if (iVar2 != 0) { return iVar2; } iVar2 = _ma_sort_write_record(param_1); if (iVar2 != 0) { return 1; } plVar3 = (long *)_ma_ft_parserecord(uVar1,*(int4 *)(param_1 + 0x640), *(int8 *)(param_1 + 0x3f0),param_1 + 0x3b0); if (plVar3 == (long *)0x0) { return 1; } } while (*plVar3 == 0); *(long **)(param_1 + 0x3a0) = plVar3; *(long **)(param_1 + 0x3a8) = plVar3; param_2 = local_38; } else { plVar3 = *(long **)(param_1 + 0x3a8); } _ma_ft_make_key(uVar1,local_58,*(int4 *)(param_1 + 0x640),param_2,plVar3, *(int8 *)(param_1 + 0x638)); *(int *)(param_1 + 0x648) = local_44 + local_48; if (plVar3[3] == 0) { free_root(param_1 + 0x3b0,2); *(int8 *)(param_1 + 0x3a0) = 0; } else { *(long **)(param_1 + 0x3a8) = plVar3 + 3; } return 0; }
4,630
my_mb_wc_euc_jp
eloqsql/strings/ctype-ujis.c
static int my_mb_wc_euc_jp(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { int hi; if (s >= e) return MY_CS_TOOSMALL; if ((hi= s[0]) < 0x80) /* ASCII code set: [00..7F] -> [U+0000..U+007F] */ { *pwc= hi; return 1; } if (hi >= 0xA1 && hi <= 0xFE) /* JIS-X-0208 code set: [A1..FE][A1..FE] */ { if (s + 2 > e) return MY_CS_TOOSMALL2; return (*pwc= jisx0208_eucjp_to_unicode[(hi << 8) + s[1]]) ? 2 : (s[1] < 0xA1 || s[1] > 0xFE) ? MY_CS_ILSEQ : -2; } /* JIS-X-0201 HALF WIDTH KATAKANA: [8E][A1..DF] -> [U+FF61..U+FF9F] */ if (hi == 0x8E) { if (s + 2 > e) return MY_CS_TOOSMALL2; if (s[1] < 0xA1 || s[1] > 0xDF) return MY_CS_ILSEQ; *pwc= 0xFEC0 + s[1]; /* 0xFFC0 = 0xFF61 - 0xA1 */ return 2; } if (hi == 0x8F) /* JIS X 0212 code set: [8F][A1..FE][A1..FE] */ { if (s + 3 > e) return MY_CS_TOOSMALL3; return (*pwc= jisx0212_eucjp_to_unicode[(((int) s[1]) << 8) + s[2]]) ? 3 : (s[1] < 0xA1 || s[1] > 0xFE || s[2] < 0xA1 || s[2] > 0xFE) ? MY_CS_ILSEQ : -3; } return MY_CS_ILSEQ; }
O0
c
my_mb_wc_euc_jp: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0xc1a2a movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0xc1c46 movq -0x20(%rbp), %rax movzbl (%rax), %eax movl %eax, -0x2c(%rbp) cmpl $0x80, %eax jge 0xc1a52 movslq -0x2c(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0xc1c46 cmpl $0xa1, -0x2c(%rbp) jl 0xc1b01 cmpl $0xfe, -0x2c(%rbp) jg 0xc1b01 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0xc1a86 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0xc1c46 movl -0x2c(%rbp), %eax shll $0x8, %eax movq -0x20(%rbp), %rcx movzbl 0x1(%rcx), %ecx addl %ecx, %eax movslq %eax, %rcx leaq 0x288160(%rip), %rax # 0x349c00 movzwl (%rax,%rcx,2), %eax movq -0x18(%rbp), %rcx movq %rax, (%rcx) cmpq $0x0, %rax je 0xc1abb movl $0x2, %eax movl %eax, -0x30(%rbp) jmp 0xc1af6 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %ecx movb $0x1, %al cmpl $0xa1, %ecx movb %al, -0x31(%rbp) jl 0xc1ae3 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xfe, %eax setg %al movb %al, -0x31(%rbp) movb -0x31(%rbp), %dl movl $0xfffffffe, %eax # imm = 0xFFFFFFFE xorl %ecx, %ecx testb $0x1, %dl cmovnel %ecx, %eax movl %eax, -0x30(%rbp) movl -0x30(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xc1c46 cmpl $0x8e, -0x2c(%rbp) jne 0xc1b71 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0xc1b24 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0xc1c46 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xa1, %eax jl 0xc1b42 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xdf, %eax jle 0xc1b4e movl $0x0, -0x4(%rbp) jmp 0xc1c46 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax addl $0xfec0, %eax # imm = 0xFEC0 movslq %eax, %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x2, -0x4(%rbp) jmp 0xc1c46 cmpl $0x8f, -0x2c(%rbp) jne 0xc1c3f movq -0x20(%rbp), %rax addq $0x3, %rax cmpq -0x28(%rbp), %rax jbe 0xc1b98 movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99 jmp 0xc1c46 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax shll $0x8, %eax movq -0x20(%rbp), %rcx movzbl 0x2(%rcx), %ecx addl %ecx, %eax movslq %eax, %rcx leaq 0x2a8049(%rip), %rax # 0x369c00 movzwl (%rax,%rcx,2), %eax movq -0x18(%rbp), %rcx movq %rax, (%rcx) cmpq $0x0, %rax je 0xc1bd2 movl $0x3, %eax movl %eax, -0x38(%rbp) jmp 0xc1c37 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %ecx movb $0x1, %al cmpl $0xa1, %ecx movb %al, -0x39(%rbp) jl 0xc1c24 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %ecx movb $0x1, %al cmpl $0xfe, %ecx movb %al, -0x39(%rbp) jg 0xc1c24 movq -0x20(%rbp), %rax movzbl 0x2(%rax), %ecx movb $0x1, %al cmpl $0xa1, %ecx movb %al, -0x39(%rbp) jl 0xc1c24 movq -0x20(%rbp), %rax movzbl 0x2(%rax), %eax cmpl $0xfe, %eax setg %al movb %al, -0x39(%rbp) movb -0x39(%rbp), %dl movl $0xfffffffd, %eax # imm = 0xFFFFFFFD xorl %ecx, %ecx testb $0x1, %dl cmovnel %ecx, %eax movl %eax, -0x38(%rbp) movl -0x38(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xc1c46 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
my_mb_wc_euc_jp: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_C1A2A mov [rbp+var_4], 0FFFFFF9Bh jmp loc_C1C46 loc_C1A2A: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] mov [rbp+var_2C], eax cmp eax, 80h jge short loc_C1A52 movsxd rcx, [rbp+var_2C] mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_C1C46 loc_C1A52: cmp [rbp+var_2C], 0A1h jl loc_C1B01 cmp [rbp+var_2C], 0FEh jg loc_C1B01 mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_C1A86 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_C1C46 loc_C1A86: mov eax, [rbp+var_2C] shl eax, 8 mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+1] add eax, ecx movsxd rcx, eax lea rax, jisx0208_eucjp_to_unicode movzx eax, word ptr [rax+rcx*2] mov rcx, [rbp+var_18] mov [rcx], rax cmp rax, 0 jz short loc_C1ABB mov eax, 2 mov [rbp+var_30], eax jmp short loc_C1AF6 loc_C1ABB: mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+1] mov al, 1 cmp ecx, 0A1h mov [rbp+var_31], al jl short loc_C1AE3 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0FEh setnle al mov [rbp+var_31], al loc_C1AE3: mov dl, [rbp+var_31] mov eax, 0FFFFFFFEh xor ecx, ecx test dl, 1 cmovnz eax, ecx mov [rbp+var_30], eax loc_C1AF6: mov eax, [rbp+var_30] mov [rbp+var_4], eax jmp loc_C1C46 loc_C1B01: cmp [rbp+var_2C], 8Eh jnz short loc_C1B71 mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_C1B24 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_C1C46 loc_C1B24: mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0A1h jl short loc_C1B42 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0DFh jle short loc_C1B4E loc_C1B42: mov [rbp+var_4], 0 jmp loc_C1C46 loc_C1B4E: mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] add eax, 0FEC0h movsxd rcx, eax mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 2 jmp loc_C1C46 loc_C1B71: cmp [rbp+var_2C], 8Fh jnz loc_C1C3F mov rax, [rbp+var_20] add rax, 3 cmp rax, [rbp+var_28] jbe short loc_C1B98 mov [rbp+var_4], 0FFFFFF99h jmp loc_C1C46 loc_C1B98: mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] shl eax, 8 mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+2] add eax, ecx movsxd rcx, eax lea rax, jisx0212_eucjp_to_unicode movzx eax, word ptr [rax+rcx*2] mov rcx, [rbp+var_18] mov [rcx], rax cmp rax, 0 jz short loc_C1BD2 mov eax, 3 mov [rbp+var_38], eax jmp short loc_C1C37 loc_C1BD2: mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+1] mov al, 1 cmp ecx, 0A1h mov [rbp+var_39], al jl short loc_C1C24 mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+1] mov al, 1 cmp ecx, 0FEh mov [rbp+var_39], al jg short loc_C1C24 mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+2] mov al, 1 cmp ecx, 0A1h mov [rbp+var_39], al jl short loc_C1C24 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+2] cmp eax, 0FEh setnle al mov [rbp+var_39], al loc_C1C24: mov dl, [rbp+var_39] mov eax, 0FFFFFFFDh xor ecx, ecx test dl, 1 cmovnz eax, ecx mov [rbp+var_38], eax loc_C1C37: mov eax, [rbp+var_38] mov [rbp+var_4], eax jmp short loc_C1C46 loc_C1C3F: mov [rbp+var_4], 0 loc_C1C46: mov eax, [rbp+var_4] pop rbp retn
long long my_mb_wc_euc_jp(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { long long v4; // rax unsigned int v5; // eax long long v6; // rax unsigned int v7; // eax bool v9; // [rsp+1h] [rbp-39h] bool v11; // [rsp+9h] [rbp-31h] unsigned int v13; // [rsp+Eh] [rbp-2Ch] if ( (unsigned long long)a3 < a4 ) { v13 = *a3; if ( v13 >= 0x80 ) { if ( *a3 < 0xA1u || *a3 == 255 ) { if ( v13 == 142 ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { if ( a3[1] >= 0xA1u && a3[1] <= 0xDFu ) { *a2 = a3[1] + 65216; return 2; } else { return 0; } } else { return (unsigned int)-102; } } else if ( v13 == 143 ) { if ( (unsigned long long)(a3 + 3) <= a4 ) { v6 = jisx0212_eucjp_to_unicode[256 * a3[1] + a3[2]]; *a2 = v6; if ( v6 ) { return 3; } else { v9 = 1; if ( a3[1] >= 0xA1u ) { v9 = 1; if ( a3[1] != 255 ) { v9 = 1; if ( a3[2] >= 0xA1u ) v9 = a3[2] == 255; } } v7 = -3; if ( v9 ) v7 = 0; return v7; } } else { return (unsigned int)-103; } } else { return 0; } } else if ( (unsigned long long)(a3 + 2) <= a4 ) { v4 = jisx0208_eucjp_to_unicode[a3[1] + (v13 << 8)]; *a2 = v4; if ( v4 ) { return 2; } else { v11 = 1; if ( a3[1] >= 0xA1u ) v11 = a3[1] == 255; v5 = -2; if ( v11 ) v5 = 0; return v5; } } else { return (unsigned int)-102; } } else { *a2 = *a3; return 1; } } else { return (unsigned int)-101; } }
my_mb_wc_euc_jp: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x001c1a2a MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x001c1c46 LAB_001c1a2a: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x80 JGE 0x001c1a52 MOVSXD RCX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x001c1c46 LAB_001c1a52: CMP dword ptr [RBP + -0x2c],0xa1 JL 0x001c1b01 CMP dword ptr [RBP + -0x2c],0xfe JG 0x001c1b01 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x001c1a86 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x001c1c46 LAB_001c1a86: MOV EAX,dword ptr [RBP + -0x2c] SHL EAX,0x8 MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x1] ADD EAX,ECX MOVSXD RCX,EAX LEA RAX,[0x449c00] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RCX],RAX CMP RAX,0x0 JZ 0x001c1abb MOV EAX,0x2 MOV dword ptr [RBP + -0x30],EAX JMP 0x001c1af6 LAB_001c1abb: MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x1] MOV AL,0x1 CMP ECX,0xa1 MOV byte ptr [RBP + -0x31],AL JL 0x001c1ae3 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xfe SETG AL MOV byte ptr [RBP + -0x31],AL LAB_001c1ae3: MOV DL,byte ptr [RBP + -0x31] MOV EAX,0xfffffffe XOR ECX,ECX TEST DL,0x1 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x30],EAX LAB_001c1af6: MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x4],EAX JMP 0x001c1c46 LAB_001c1b01: CMP dword ptr [RBP + -0x2c],0x8e JNZ 0x001c1b71 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x001c1b24 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x001c1c46 LAB_001c1b24: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xa1 JL 0x001c1b42 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xdf JLE 0x001c1b4e LAB_001c1b42: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001c1c46 LAB_001c1b4e: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] ADD EAX,0xfec0 MOVSXD RCX,EAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x2 JMP 0x001c1c46 LAB_001c1b71: CMP dword ptr [RBP + -0x2c],0x8f JNZ 0x001c1c3f MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x3 CMP RAX,qword ptr [RBP + -0x28] JBE 0x001c1b98 MOV dword ptr [RBP + -0x4],0xffffff99 JMP 0x001c1c46 LAB_001c1b98: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] SHL EAX,0x8 MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x2] ADD EAX,ECX MOVSXD RCX,EAX LEA RAX,[0x469c00] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RCX],RAX CMP RAX,0x0 JZ 0x001c1bd2 MOV EAX,0x3 MOV dword ptr [RBP + -0x38],EAX JMP 0x001c1c37 LAB_001c1bd2: MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x1] MOV AL,0x1 CMP ECX,0xa1 MOV byte ptr [RBP + -0x39],AL JL 0x001c1c24 MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x1] MOV AL,0x1 CMP ECX,0xfe MOV byte ptr [RBP + -0x39],AL JG 0x001c1c24 MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x2] MOV AL,0x1 CMP ECX,0xa1 MOV byte ptr [RBP + -0x39],AL JL 0x001c1c24 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x2] CMP EAX,0xfe SETG AL MOV byte ptr [RBP + -0x39],AL LAB_001c1c24: MOV DL,byte ptr [RBP + -0x39] MOV EAX,0xfffffffd XOR ECX,ECX TEST DL,0x1 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x38],EAX LAB_001c1c37: MOV EAX,dword ptr [RBP + -0x38] MOV dword ptr [RBP + -0x4],EAX JMP 0x001c1c46 LAB_001c1c3f: MOV dword ptr [RBP + -0x4],0x0 LAB_001c1c46: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_mb_wc_euc_jp(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { ushort uVar1; bool bVar2; uint uVar3; int4 local_40; int4 local_38; int4 local_c; if (param_3 < param_4) { uVar3 = (uint)*param_3; if (uVar3 < 0x80) { *param_2 = (long)(int)uVar3; local_c = 1; } else if ((uVar3 < 0xa1) || (0xfe < uVar3)) { if (uVar3 == 0x8e) { if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else if ((param_3[1] < 0xa1) || (0xdf < param_3[1])) { local_c = 0; } else { *param_2 = (long)(int)(param_3[1] + 0xfec0); local_c = 2; } } else if (uVar3 == 0x8f) { if (param_4 < param_3 + 3) { local_c = 0xffffff99; } else { uVar1 = *(ushort *) (&jisx0212_eucjp_to_unicode + (long)(int)((uint)param_3[1] * 0x100 + (uint)param_3[2]) * 2); *param_2 = (ulong)uVar1; if ((ulong)uVar1 == 0) { bVar2 = true; if (((0xa0 < param_3[1]) && (bVar2 = true, param_3[1] != 0xff)) && (bVar2 = true, 0xa0 < param_3[2])) { bVar2 = 0xfe < param_3[2]; } local_40 = 0xfffffffd; if (bVar2) { local_40 = 0; } } else { local_40 = 3; } local_c = local_40; } } else { local_c = 0; } } else if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else { uVar1 = *(ushort *) (jisx0208_eucjp_to_unicode + (long)(int)(uVar3 * 0x100 + (uint)param_3[1]) * 2); *param_2 = (ulong)uVar1; if ((ulong)uVar1 == 0) { bVar2 = true; if (0xa0 < param_3[1]) { bVar2 = 0xfe < param_3[1]; } local_38 = 0xfffffffe; if (bVar2) { local_38 = 0; } } else { local_38 = 2; } local_c = local_38; } } else { local_c = 0xffffff9b; } return local_c; }
4,631
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::~json_sax_dom_callback_parser()
monkey531[P]llama/common/json.hpp
~json_sax_dom_callback_parser() = default;
O3
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::~json_sax_dom_callback_parser(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0xa8(%rdi), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x5b2d4 movq %r14, %rdi callq 0x607c2 movq 0x90(%rbx), %rax testq %rax, %rax je 0x5dafd leaq 0x80(%rbx), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x48(%rbx), %rdi callq 0x5eb68 leaq 0x20(%rbx), %rdi callq 0x5eb68 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x5db2b movq 0x18(%rbx), %rsi subq %rdi, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x1b8e0 addq $0x8, %rsp popq %rbx popq %r14 retq jmp 0x5db37 jmp 0x5db37 movq %rax, %rdi callq 0x24259 nop
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEED2Ev: push r14 push rbx push rax mov rbx, rdi lea r14, [rdi+0A8h] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rax, [rbx+90h] test rax, rax jz short loc_5DAFD lea rdi, [rbx+80h] mov rsi, rdi mov edx, 3 call rax loc_5DAFD: lea rdi, [rbx+48h] call _ZNSt13_Bvector_baseISaIbEE13_M_deallocateEv; std::_Bvector_base<std::allocator<bool>>::_M_deallocate(void) lea rdi, [rbx+20h] call _ZNSt13_Bvector_baseISaIbEE13_M_deallocateEv; std::_Bvector_base<std::allocator<bool>>::_M_deallocate(void) mov rdi, [rbx+8]; void * test rdi, rdi jz short loc_5DB2B mov rsi, [rbx+18h] sub rsi, rdi; unsigned __int64 add rsp, 8 pop rbx pop r14 jmp __ZdlPvm; operator delete(void *,ulong) loc_5DB2B: add rsp, 8 pop rbx pop r14 retn jmp short loc_5DB37 jmp short $+2 loc_5DB37: mov rdi, rax call __clang_call_terminate
void nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::~json_sax_dom_callback_parser( long long a1) { long long v2; // rsi void ( *v3)(long long, long long, long long); // rax void *v4; // rdi v2 = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 168)); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(a1 + 168); v3 = *(void ( **)(long long, long long, long long))(a1 + 144); if ( v3 ) { v2 = a1 + 128; v3(a1 + 128, a1 + 128, 3LL); } std::_Bvector_base<std::allocator<bool>>::_M_deallocate(a1 + 72, v2); std::_Bvector_base<std::allocator<bool>>::_M_deallocate(a1 + 32, v2); v4 = *(void **)(a1 + 8); if ( v4 ) operator delete(v4, *(_QWORD *)(a1 + 24) - (_QWORD)v4); }
~json_sax_dom_callback_parser: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI LEA R14,[RDI + 0xa8] MOV RDI,R14 XOR ESI,ESI CALL 0x0015b2d4 MOV RDI,R14 CALL 0x001607c2 MOV RAX,qword ptr [RBX + 0x90] TEST RAX,RAX JZ 0x0015dafd LEA RDI,[RBX + 0x80] LAB_0015daf3: MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0015dafd: LEA RDI,[RBX + 0x48] LAB_0015db01: CALL 0x0015eb68 LEA RDI,[RBX + 0x20] LAB_0015db0a: CALL 0x0015eb68 MOV RDI,qword ptr [RBX + 0x8] TEST RDI,RDI JZ 0x0015db2b MOV RSI,qword ptr [RBX + 0x18] SUB RSI,RDI ADD RSP,0x8 POP RBX POP R14 JMP 0x0011b8e0 LAB_0015db2b: ADD RSP,0x8 POP RBX POP R14 RET
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::~json_sax_dom_callback_parser() */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::~json_sax_dom_callback_parser (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this) { void *pvVar1; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81((data *)(this + 0xa8),0)); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)(this + 0xa8)); if (*(code **)(this + 0x90) != (code *)0x0) { /* try { // try from 0015daf3 to 0015dafc has its CatchHandler @ 0015db33 */ (**(code **)(this + 0x90))(this + 0x80,this + 0x80,3); } /* try { // try from 0015db01 to 0015db05 has its CatchHandler @ 0015db37 */ std::_Bvector_base<std::allocator<bool>>::_M_deallocate ((_Bvector_base<std::allocator<bool>> *)(this + 0x48)); /* try { // try from 0015db0a to 0015db0e has its CatchHandler @ 0015db35 */ std::_Bvector_base<std::allocator<bool>>::_M_deallocate ((_Bvector_base<std::allocator<bool>> *)(this + 0x20)); pvVar1 = *(void **)(this + 8); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x18) - (long)pvVar1); return; } return; }
4,632
Settings::allMasterShipsSunk() const
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
bool Settings::allMasterShipsSunk() const { std::lock_guard<std::mutex> lock(settings_mutex); for (const auto& ship : masterShips) { if (!ship.isSunk()) return false; } return true; }
O1
cpp
Settings::allMasterShipsSunk() const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx callq 0x5520 testl %eax, %eax jne 0x7079 movq 0x90(%rbx), %r14 movq 0x98(%rbx), %r15 cmpq %r15, %r14 sete %bpl je 0x7060 movq %r14, %rdi callq 0x15506 testb %al, %al je 0x7060 addq $0x40, %r14 jmp 0x7045 movq %rbx, %rdi callq 0x52f0 andb $0x1, %bpl movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl %eax, %edi callq 0x5260 movq %rax, %r14 movq %rbx, %rdi callq 0x52f0 movq %r14, %rdi callq 0x5600 nop
_ZNK8Settings18allMasterShipsSunkEv: push rbp push r15 push r14 push rbx push rax mov rbx, rdi call _pthread_mutex_lock test eax, eax jnz short loc_7079 mov r14, [rbx+90h] mov r15, [rbx+98h] loc_7045: cmp r14, r15 setz bpl jz short loc_7060 mov rdi, r14; this call _ZNK4Ship6isSunkEv; Ship::isSunk(void) test al, al jz short loc_7060 add r14, 40h ; '@' jmp short loc_7045 loc_7060: mov rdi, rbx call _pthread_mutex_unlock and bpl, 1 mov eax, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_7079: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) mov r14, rax mov rdi, rbx call _pthread_mutex_unlock mov rdi, r14 call __Unwind_Resume
long long Settings::allMasterShipsSunk(Ship **this) { unsigned int v1; // ebp int v2; // eax Ship *v3; // r14 Ship *v4; // r15 v2 = pthread_mutex_lock(this); if ( v2 ) std::__throw_system_error(v2); v3 = this[18]; v4 = this[19]; while ( v3 != v4 && (unsigned __int8)Ship::isSunk(v3) ) v3 = (Ship *)((char *)v3 + 64); pthread_mutex_unlock(this); LOBYTE(v1) = v3 == v4; return v1; }
allMasterShipsSunk: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x00105520 TEST EAX,EAX JNZ 0x00107079 MOV R14,qword ptr [RBX + 0x90] MOV R15,qword ptr [RBX + 0x98] LAB_00107045: CMP R14,R15 SETZ BPL JZ 0x00107060 LAB_0010704e: MOV RDI,R14 CALL 0x00115506 LAB_00107056: TEST AL,AL JZ 0x00107060 ADD R14,0x40 JMP 0x00107045 LAB_00107060: MOV RDI,RBX CALL 0x001052f0 AND BPL,0x1 MOV EAX,EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_00107079: MOV EDI,EAX CALL 0x00105260
/* Settings::allMasterShipsSunk() const */ ulong __thiscall Settings::allMasterShipsSunk(Settings *this) { Ship *pSVar1; char cVar2; int iVar3; int8 unaff_RBP; int7 uVar4; Ship *this_00; bool bVar5; iVar3 = pthread_mutex_lock((pthread_mutex_t *)this); if (iVar3 != 0) { /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar3); } this_00 = *(Ship **)(this + 0x90); pSVar1 = *(Ship **)(this + 0x98); while( true ) { bVar5 = this_00 == pSVar1; uVar4 = (int7)((ulong)unaff_RBP >> 8); unaff_RBP = CONCAT71(uVar4,bVar5); if (bVar5) break; /* try { // try from 0010704e to 00107055 has its CatchHandler @ 00107080 */ cVar2 = Ship::isSunk(this_00); if (cVar2 == '\0') break; this_00 = this_00 + 0x40; } pthread_mutex_unlock((pthread_mutex_t *)this); return CONCAT71(uVar4,bVar5) & 0xffffffff; }
4,633
Settings::allMasterShipsSunk() const
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
bool Settings::allMasterShipsSunk() const { std::lock_guard<std::mutex> lock(settings_mutex); for (const auto& ship : masterShips) { if (!ship.isSunk()) return false; } return true; }
O2
cpp
Settings::allMasterShipsSunk() const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx callq 0x6d3c movq 0x90(%rbx), %rcx movq 0x98(%rbx), %r15 movq %rcx, %r14 cmpq %r15, %rcx je 0x6801 movq %r14, %rdi callq 0x134f2 leaq 0x40(%r14), %rcx testb %al, %al jne 0x67e9 cmpq %r15, %r14 sete %bpl movq %rbx, %rdi callq 0x52e0 movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq %rbx, %rdi callq 0x52e0 movq %r14, %rdi callq 0x55b0
_ZNK8Settings18allMasterShipsSunkEv: push rbp push r15 push r14 push rbx push rax mov rbx, rdi call _ZNSt5mutex4lockEv; std::mutex::lock(void) mov rcx, [rbx+90h] mov r15, [rbx+98h] loc_67E9: mov r14, rcx cmp rcx, r15 jz short loc_6801 mov rdi, r14; this call _ZNK4Ship6isSunkEv; Ship::isSunk(void) lea rcx, [r14+40h] test al, al jnz short loc_67E9 loc_6801: cmp r14, r15 setz bpl mov rdi, rbx call _pthread_mutex_unlock mov eax, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, rbx call _pthread_mutex_unlock mov rdi, r14 call __Unwind_Resume
long long Settings::allMasterShipsSunk(Ship **this) { unsigned int v1; // ebp Ship *v2; // rcx Ship *v3; // r15 Ship *v4; // r14 char isSunk; // al std::mutex::lock((std::mutex *)this); v2 = this[18]; v3 = this[19]; do { v4 = v2; if ( v2 == v3 ) break; isSunk = Ship::isSunk(v2); v2 = (Ship *)((char *)v4 + 64); } while ( isSunk ); LOBYTE(v1) = v4 == v3; pthread_mutex_unlock(this); return v1; }
allMasterShipsSunk: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x00106d3c MOV RCX,qword ptr [RBX + 0x90] MOV R15,qword ptr [RBX + 0x98] LAB_001067e9: MOV R14,RCX CMP RCX,R15 JZ 0x00106801 LAB_001067f1: MOV RDI,R14 CALL 0x001134f2 LAB_001067f9: LEA RCX,[R14 + 0x40] TEST AL,AL JNZ 0x001067e9 LAB_00106801: CMP R14,R15 SETZ BPL MOV RDI,RBX CALL 0x001052e0 MOV EAX,EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* Settings::allMasterShipsSunk() const */ ulong __thiscall Settings::allMasterShipsSunk(Settings *this) { Ship *pSVar1; Ship *pSVar2; char cVar3; Ship *this_00; int8 unaff_RBP; std::mutex::lock(); pSVar1 = *(Ship **)(this + 0x98); pSVar2 = *(Ship **)(this + 0x90); do { this_00 = pSVar2; if (this_00 == pSVar1) break; /* try { // try from 001067f1 to 001067f8 has its CatchHandler @ 0010681d */ cVar3 = Ship::isSunk(this_00); pSVar2 = this_00 + 0x40; } while (cVar3 != '\0'); pthread_mutex_unlock((pthread_mutex_t *)this); return CONCAT71((int7)((ulong)unaff_RBP >> 8),this_00 == pSVar1) & 0xffffffff; }
4,634
Settings::allMasterShipsSunk() const
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
bool Settings::allMasterShipsSunk() const { std::lock_guard<std::mutex> lock(settings_mutex); for (const auto& ship : masterShips) { if (!ship.isSunk()) return false; } return true; }
O3
cpp
Settings::allMasterShipsSunk() const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx callq 0x5520 testl %eax, %eax jne 0x7021 movq 0x90(%rbx), %r14 movq 0x98(%rbx), %r15 cmpq %r15, %r14 je 0x7009 movq %r14, %rdi callq 0x154c2 movl %eax, %ebp addq $0x40, %r14 cmpq %r15, %r14 setne %al testb %al, %bpl jne 0x6fee jmp 0x700c movb $0x1, %bpl movq %rbx, %rdi callq 0x52f0 movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl %eax, %edi callq 0x5260 movq %rax, %r14 movq %rbx, %rdi callq 0x52f0 movq %r14, %rdi callq 0x5600 nop
_ZNK8Settings18allMasterShipsSunkEv: push rbp push r15 push r14 push rbx push rax mov rbx, rdi call _pthread_mutex_lock test eax, eax jnz short loc_7021 mov r14, [rbx+90h] mov r15, [rbx+98h] cmp r14, r15 jz short loc_7009 loc_6FEE: mov rdi, r14; this call _ZNK4Ship6isSunkEv; Ship::isSunk(void) mov ebp, eax add r14, 40h ; '@' cmp r14, r15 setnz al test bpl, al jnz short loc_6FEE jmp short loc_700C loc_7009: mov bpl, 1 loc_700C: mov rdi, rbx call _pthread_mutex_unlock mov eax, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_7021: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) mov r14, rax mov rdi, rbx call _pthread_mutex_unlock mov rdi, r14 call __Unwind_Resume
long long Settings::allMasterShipsSunk(Ship **this) { unsigned int isSunk; // ebp int v2; // eax Ship *v3; // r14 Ship *v4; // r15 v2 = pthread_mutex_lock(this); if ( v2 ) std::__throw_system_error(v2); v3 = this[18]; v4 = this[19]; if ( v3 == v4 ) { LOBYTE(isSunk) = 1; } else { do { isSunk = Ship::isSunk(v3); v3 = (Ship *)((char *)v3 + 64); } while ( ((v3 != v4) & (unsigned __int8)isSunk) != 0 ); } pthread_mutex_unlock(this); return isSunk; }
allMasterShipsSunk: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x00105520 TEST EAX,EAX JNZ 0x00107021 MOV R14,qword ptr [RBX + 0x90] MOV R15,qword ptr [RBX + 0x98] CMP R14,R15 JZ 0x00107009 LAB_00106fee: MOV RDI,R14 CALL 0x001154c2 LAB_00106ff6: MOV EBP,EAX ADD R14,0x40 CMP R14,R15 SETNZ AL TEST BPL,AL JNZ 0x00106fee JMP 0x0010700c LAB_00107009: MOV BPL,0x1 LAB_0010700c: MOV RDI,RBX CALL 0x001052f0 MOV EAX,EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_00107021: MOV EDI,EAX CALL 0x00105260
/* Settings::allMasterShipsSunk() const */ ulong __thiscall Settings::allMasterShipsSunk(Settings *this) { Ship *pSVar1; int iVar2; uint uVar3; int8 unaff_RBP; ulong uVar4; Ship *this_00; iVar2 = pthread_mutex_lock((pthread_mutex_t *)this); if (iVar2 != 0) { /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar2); } this_00 = *(Ship **)(this + 0x90); pSVar1 = *(Ship **)(this + 0x98); if (this_00 == pSVar1) { uVar4 = CONCAT71((int7)((ulong)unaff_RBP >> 8),1); } else { do { /* try { // try from 00106fee to 00106ff5 has its CatchHandler @ 00107028 */ uVar3 = Ship::isSunk(this_00); uVar4 = (ulong)uVar3; this_00 = this_00 + 0x40; } while (((byte)uVar3 & this_00 != pSVar1) != 0); } pthread_mutex_unlock((pthread_mutex_t *)this); return uVar4 & 0xffffffff; }
4,635
fmt::v10::appender fmt::v10::vformat_to<fmt::v10::appender, 0>(fmt::v10::appender, fmt::v10::basic_string_view<char>, fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender, char>>)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/core.h
auto vformat_to(OutputIt out, string_view fmt, format_args args) -> OutputIt { auto&& buf = detail::get_buffer<char>(out); detail::vformat_to(buf, fmt, args, {}); return detail::get_iterator(buf, out); }
O0
c
fmt::v10::appender fmt::v10::vformat_to<fmt::v10::appender, 0>(fmt::v10::appender, fmt::v10::basic_string_view<char>, fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender, char>>): subq $0x1e8, %rsp # imm = 0x1E8 movq %rdi, 0x1b8(%rsp) movq %rsi, 0x1a8(%rsp) movq %rdx, 0x1b0(%rsp) movq %rcx, 0x198(%rsp) movq %r8, 0x1a0(%rsp) movq 0x1b8(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x60(%rsp), %rsi leaq 0x68(%rsp), %rdi callq 0x2a050 leaq 0x68(%rsp), %rax movq %rax, 0x190(%rsp) movq 0x190(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x1a8(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x1b0(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x198(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x1a0(%rsp), %rax movq %rax, 0x48(%rsp) leaq 0x38(%rsp), %rax movq %rax, 0x1c8(%rsp) movq 0x1c8(%rsp), %rax movq $0x0, (%rax) movq 0x18(%rsp), %rdi movq 0x50(%rsp), %rsi movq 0x58(%rsp), %rdx movq 0x40(%rsp), %rcx movq 0x48(%rsp), %r8 movq 0x38(%rsp), %r9 callq 0x913d0 jmp 0x2974a movq 0x190(%rsp), %rax movq 0x1b8(%rsp), %rcx movq %rcx, 0x20(%rsp) movq 0x20(%rsp), %rcx movq %rcx, 0x1d8(%rsp) movq %rax, 0x1d0(%rsp) movq 0x1d0(%rsp), %rdi callq 0x2a3a0 movq %rax, 0x10(%rsp) jmp 0x29788 movq 0x10(%rsp), %rax movq %rax, 0x1e0(%rsp) movq 0x1e0(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x1c0(%rsp) leaq 0x68(%rsp), %rdi callq 0x2a090 movq 0x1c0(%rsp), %rax addq $0x1e8, %rsp # imm = 0x1E8 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) leaq 0x68(%rsp), %rdi callq 0x2a090 movq 0x30(%rsp), %rdi callq 0x16cf0 nopl (%rax,%rax)
_ZN3fmt3v1010vformat_toINS0_8appenderETnNSt9enable_ifIXsr6detail18is_output_iteratorIT_cEE5valueEiE4typeELi0EEES4_S4_NS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextIS2_cEEEE: sub rsp, 1E8h mov [rsp+1E8h+var_30], rdi mov [rsp+1E8h+var_40], rsi mov [rsp+1E8h+var_38], rdx mov [rsp+1E8h+var_50], rcx mov [rsp+1E8h+var_48], r8 mov rax, [rsp+1E8h+var_30] mov [rsp+1E8h+var_188], rax mov rsi, [rsp+1E8h+var_188] lea rdi, [rsp+1E8h+var_180] call _ZN3fmt3v106detail10get_bufferIcNS0_8appenderEEENS1_15iterator_bufferIT0_T_NS1_13buffer_traitsEEES5_; fmt::v10::detail::get_buffer<char,fmt::v10::appender>(fmt::v10::appender) lea rax, [rsp+1E8h+var_180] mov [rsp+1E8h+var_58], rax mov rax, [rsp+1E8h+var_58] mov [rsp+1E8h+var_1D0], rax mov rax, [rsp+1E8h+var_40] mov [rsp+1E8h+var_198], rax mov rax, [rsp+1E8h+var_38] mov [rsp+1E8h+var_190], rax mov rax, [rsp+1E8h+var_50] mov [rsp+1E8h+var_1A8], rax mov rax, [rsp+1E8h+var_48] mov [rsp+1E8h+var_1A0], rax lea rax, [rsp+1E8h+var_1B0] mov [rsp+1E8h+var_20], rax mov rax, [rsp+1E8h+var_20] mov qword ptr [rax], 0 mov rdi, [rsp+1E8h+var_1D0] mov rsi, [rsp+1E8h+var_198] mov rdx, [rsp+1E8h+var_190] mov rcx, [rsp+1E8h+var_1A8] mov r8, [rsp+1E8h+var_1A0] mov r9, [rsp+1E8h+var_1B0] call _ZN3fmt3v106detail10vformat_toIcEEvRNS1_6bufferIT_EENS0_17basic_string_viewIS4_EENS1_12vformat_argsIS4_E4typeENS1_10locale_refE; fmt::v10::detail::vformat_to<char>(fmt::v10::detail::buffer<char> &,fmt::v10::basic_string_view<char>,fmt::v10::detail::vformat_args<char>::type,fmt::v10::detail::locale_ref) jmp short $+2 loc_2974A: mov rax, [rsp+1E8h+var_58] mov rcx, [rsp+1E8h+var_30] mov [rsp+1E8h+var_1C8], rcx mov rcx, [rsp+1E8h+var_1C8] mov [rsp+1E8h+var_10], rcx mov [rsp+1E8h+var_18], rax mov rdi, [rsp+1E8h+var_18] call _ZN3fmt3v106detail15iterator_bufferINS0_8appenderEcNS1_13buffer_traitsEE3outEv; fmt::v10::detail::iterator_buffer<fmt::v10::appender,char,fmt::v10::detail::buffer_traits>::out(void) mov [rsp+1E8h+var_1D8], rax jmp short $+2 loc_29788: mov rax, [rsp+1E8h+var_1D8] mov [rsp+1E8h+var_8], rax mov rax, [rsp+1E8h+var_8] mov [rsp+1E8h+var_1E0], rax mov rax, [rsp+1E8h+var_1E0] mov [rsp+1E8h+var_28], rax lea rdi, [rsp+1E8h+var_180] call _ZN3fmt3v106detail15iterator_bufferINS0_8appenderEcNS1_13buffer_traitsEED2Ev; fmt::v10::detail::iterator_buffer<fmt::v10::appender,char,fmt::v10::detail::buffer_traits>::~iterator_buffer() mov rax, [rsp+1E8h+var_28] add rsp, 1E8h retn mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax lea rdi, [rsp+arg_60] call _ZN3fmt3v106detail15iterator_bufferINS0_8appenderEcNS1_13buffer_traitsEED2Ev; fmt::v10::detail::iterator_buffer<fmt::v10::appender,char,fmt::v10::detail::buffer_traits>::~iterator_buffer() mov rdi, [rsp+arg_28] call __Unwind_Resume
long long ZN3fmt3v1010vformat_toINS0_8appenderETnNSt9enable_ifIXsr6detail18is_output_iteratorIT_cEE5valueEiE4typeELi0EEES4_S4_NS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextIS2_cEEEE( long long a1, long long a2, long long a3, long long a4, long long a5) { _QWORD v6[6]; // [rsp+38h] [rbp-1B0h] BYREF _BYTE v7[296]; // [rsp+68h] [rbp-180h] BYREF _BYTE *v8; // [rsp+190h] [rbp-58h] long long v9; // [rsp+198h] [rbp-50h] long long v10; // [rsp+1A0h] [rbp-48h] long long v11; // [rsp+1A8h] [rbp-40h] long long v12; // [rsp+1B0h] [rbp-38h] long long v13; // [rsp+1B8h] [rbp-30h] long long v14; // [rsp+1C0h] [rbp-28h] _QWORD *v15; // [rsp+1C8h] [rbp-20h] _BYTE *v16; // [rsp+1D0h] [rbp-18h] long long v17; // [rsp+1D8h] [rbp-10h] long long v18; // [rsp+1E0h] [rbp-8h] v13 = a1; v11 = a2; v12 = a3; v9 = a4; v10 = a5; v6[5] = a1; fmt::v10::detail::get_buffer<char,fmt::v10::appender>(v7, a1); v8 = v7; v6[3] = v11; v6[4] = v12; v6[1] = v9; v6[2] = v10; v15 = v6; v6[0] = 0LL; fmt::v10::detail::vformat_to<char>(v7, v11, v12, v9, v10, 0LL); v17 = v13; v16 = v8; v18 = fmt::v10::detail::iterator_buffer<fmt::v10::appender,char,fmt::v10::detail::buffer_traits>::out(v8); v14 = v18; fmt::v10::detail::iterator_buffer<fmt::v10::appender,char,fmt::v10::detail::buffer_traits>::~iterator_buffer(v7); return v14; }
_ZN3fmt3v1010vformat_toINS0_8appenderETnNSt9enable_ifIXsr6detail18is_output_iteratorIT_cEE5valueEiE4typeELi0EEES4_S4_NS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextIS2_cEEEE: SUB RSP,0x1e8 MOV qword ptr [RSP + 0x1b8],RDI MOV qword ptr [RSP + 0x1a8],RSI MOV qword ptr [RSP + 0x1b0],RDX MOV qword ptr [RSP + 0x198],RCX MOV qword ptr [RSP + 0x1a0],R8 MOV RAX,qword ptr [RSP + 0x1b8] MOV qword ptr [RSP + 0x60],RAX MOV RSI,qword ptr [RSP + 0x60] LEA RDI,[RSP + 0x68] CALL 0x0012a050 LEA RAX,[RSP + 0x68] MOV qword ptr [RSP + 0x190],RAX MOV RAX,qword ptr [RSP + 0x190] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x1a8] MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x1b0] MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x198] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x1a0] MOV qword ptr [RSP + 0x48],RAX LEA RAX,[RSP + 0x38] MOV qword ptr [RSP + 0x1c8],RAX MOV RAX,qword ptr [RSP + 0x1c8] MOV qword ptr [RAX],0x0 MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x58] MOV RCX,qword ptr [RSP + 0x40] MOV R8,qword ptr [RSP + 0x48] MOV R9,qword ptr [RSP + 0x38] LAB_00129743: CALL 0x001913d0 JMP 0x0012974a LAB_0012974a: MOV RAX,qword ptr [RSP + 0x190] MOV RCX,qword ptr [RSP + 0x1b8] MOV qword ptr [RSP + 0x20],RCX MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x1d8],RCX MOV qword ptr [RSP + 0x1d0],RAX MOV RDI,qword ptr [RSP + 0x1d0] CALL 0x0012a3a0 LAB_00129781: MOV qword ptr [RSP + 0x10],RAX JMP 0x00129788 LAB_00129788: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x1e0],RAX MOV RAX,qword ptr [RSP + 0x1e0] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x1c0],RAX LEA RDI,[RSP + 0x68] CALL 0x0012a090 MOV RAX,qword ptr [RSP + 0x1c0] ADD RSP,0x1e8 RET
int8 _ZN3fmt3v1010vformat_toINS0_8appenderETnNSt9enable_ifIXsr6detail18is_output_iteratorIT_cEE5valueEiE4typeELi0EEES4_S4_NS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextIS2_cEEEE (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { int1 local_1b0 [8]; int8 local_1a8; int8 local_1a0; int8 local_198; int8 local_190; int8 local_188; detail local_180 [296]; iterator_buffer<fmt::v10::appender,char,fmt::v10::detail::buffer_traits> *local_58; int8 local_50; int8 local_48; int8 local_40; int8 local_38; int8 local_30; int8 local_28; int1 *local_20; iterator_buffer<fmt::v10::appender,char,fmt::v10::detail::buffer_traits> *local_18; int8 local_10; int8 local_8; local_188 = param_1; local_50 = param_4; local_48 = param_5; local_40 = param_2; local_38 = param_3; local_30 = param_1; fmt::v10::detail::get_buffer<char,fmt::v10::appender>(local_180,param_1); local_58 = (iterator_buffer<fmt::v10::appender,char,fmt::v10::detail::buffer_traits> *)local_180; local_198 = local_40; local_190 = local_38; local_1a8 = local_50; local_1a0 = local_48; local_20 = local_1b0; /* try { // try from 00129743 to 00129780 has its CatchHandler @ 001297c9 */ fmt::v10::detail::vformat_to<char>(local_58,local_40,local_38,local_50,local_48,0); local_10 = local_30; local_18 = local_58; local_28 = fmt::v10::detail:: iterator_buffer<fmt::v10::appender,char,fmt::v10::detail::buffer_traits>::out(local_58) ; local_8 = local_28; fmt::v10::detail::iterator_buffer<fmt::v10::appender,char,fmt::v10::detail::buffer_traits>:: ~iterator_buffer((iterator_buffer<fmt::v10::appender,char,fmt::v10::detail::buffer_traits> *) local_180); return local_28; }
4,636
mi_ft_parse
eloqsql/storage/myisam/ft_update.c
uint _mi_ft_parse(TREE *parsed, MI_INFO *info, uint keynr, const uchar *record, MYSQL_FTPARSER_PARAM *param, MEM_ROOT *mem_root) { FT_SEG_ITERATOR ftsi; struct st_mysql_ftparser *parser; DBUG_ENTER("_mi_ft_parse"); _mi_ft_segiterator_init(info, keynr, record, &ftsi); ft_parse_init(parsed, info->s->keyinfo[keynr].seg->charset); parser= info->s->keyinfo[keynr].parser; while (_mi_ft_segiterator(&ftsi)) { if (ftsi.pos) if (ft_parse(parsed, (uchar *)ftsi.pos, ftsi.len, parser, param, mem_root)) DBUG_RETURN(1); } DBUG_RETURN(0); }
O3
c
mi_ft_parse: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %r9, %rbx movq %r8, %r14 movq %rsi, -0x30(%rbp) movq %rdi, %r15 movq (%rsi), %rax movq 0x218(%rax), %rax movl %edx, %edx imulq $0x70, %rdx, %r13 movzwl 0x8(%rax,%r13), %edx leaq -0x50(%rbp), %r12 movl %edx, (%r12) movq 0x28(%rax,%r13), %rax movq %rax, 0x8(%r12) movq %rcx, 0x10(%r12) movq $0x0, 0x18(%r12) movl $0x0, 0x4(%r12) movq (%rax), %rsi callq 0x7385e movq -0x30(%rbp), %rax movq (%rax), %rax movq 0x218(%rax), %rax movq 0x38(%rax,%r13), %r13 movq %r12, %rdi callq 0x73c32 xorl %ecx, %ecx testl %eax, %eax je 0x73da6 movq -0x38(%rbp), %rsi testq %rsi, %rsi je 0x73d91 movl -0x4c(%rbp), %edx movq %r15, %rdi movq %r13, %rcx movq %r14, %r8 movq %rbx, %r9 callq 0x738ae testl %eax, %eax jne 0x73da1 movq %r12, %rdi callq 0x73c32 testl %eax, %eax jne 0x73d70 xorl %ecx, %ecx jmp 0x73da6 movl $0x1, %ecx movl %ecx, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_mi_ft_parse: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, r9 mov r14, r8 mov [rbp+var_30], rsi mov r15, rdi mov rax, [rsi] mov rax, [rax+218h] mov edx, edx imul r13, rdx, 70h ; 'p' movzx edx, word ptr [rax+r13+8] lea r12, [rbp+var_50] mov [r12], edx mov rax, [rax+r13+28h] mov [r12+8], rax mov [r12+10h], rcx mov qword ptr [r12+18h], 0 mov dword ptr [r12+4], 0 mov rsi, [rax] call ft_parse_init mov rax, [rbp+var_30] mov rax, [rax] mov rax, [rax+218h] mov r13, [rax+r13+38h] mov rdi, r12 call _mi_ft_segiterator xor ecx, ecx test eax, eax jz short loc_73DA6 loc_73D70: mov rsi, [rbp+var_38] test rsi, rsi jz short loc_73D91 mov edx, [rbp+var_4C] mov rdi, r15 mov rcx, r13 mov r8, r14 mov r9, rbx call ft_parse test eax, eax jnz short loc_73DA1 loc_73D91: mov rdi, r12 call _mi_ft_segiterator test eax, eax jnz short loc_73D70 xor ecx, ecx jmp short loc_73DA6 loc_73DA1: mov ecx, 1 loc_73DA6: mov eax, ecx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mi_ft_parse(_QWORD *a1, long long a2, unsigned int a3, long long a4, long long a5, long long a6) { long long v8; // rax long long v9; // r13 long long v10; // r13 int v11; // eax unsigned int v12; // ecx int v14; // [rsp+0h] [rbp-50h] BYREF int v15; // [rsp+4h] [rbp-4Ch] long long *v16; // [rsp+8h] [rbp-48h] long long v17; // [rsp+10h] [rbp-40h] long long v18; // [rsp+18h] [rbp-38h] long long v19; // [rsp+20h] [rbp-30h] v19 = a2; v8 = *(_QWORD *)(*(_QWORD *)a2 + 536LL); v9 = 112LL * a3; v14 = *(unsigned __int16 *)(v8 + v9 + 8); v16 = *(long long **)(v8 + v9 + 40); v17 = a4; v18 = 0LL; v15 = 0; ft_parse_init(a1, *v16); v10 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a2 + 536LL) + v9 + 56); v11 = mi_ft_segiterator((long long)&v14); v12 = 0; if ( v11 ) { while ( !v18 || !(unsigned int)ft_parse((long long)a1, v18, v15, v10, a5, a6) ) { if ( !(unsigned int)mi_ft_segiterator((long long)&v14) ) return 0; } return 1; } return v12; }
_mi_ft_parse: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,R9 MOV R14,R8 MOV qword ptr [RBP + -0x30],RSI MOV R15,RDI MOV RAX,qword ptr [RSI] MOV RAX,qword ptr [RAX + 0x218] MOV EDX,EDX IMUL R13,RDX,0x70 MOVZX EDX,word ptr [RAX + R13*0x1 + 0x8] LEA R12,[RBP + -0x50] MOV dword ptr [R12],EDX MOV RAX,qword ptr [RAX + R13*0x1 + 0x28] MOV qword ptr [R12 + 0x8],RAX MOV qword ptr [R12 + 0x10],RCX MOV qword ptr [R12 + 0x18],0x0 MOV dword ptr [R12 + 0x4],0x0 MOV RSI,qword ptr [RAX] CALL 0x0017385e MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV R13,qword ptr [RAX + R13*0x1 + 0x38] MOV RDI,R12 CALL 0x00173c32 XOR ECX,ECX TEST EAX,EAX JZ 0x00173da6 LAB_00173d70: MOV RSI,qword ptr [RBP + -0x38] TEST RSI,RSI JZ 0x00173d91 MOV EDX,dword ptr [RBP + -0x4c] MOV RDI,R15 MOV RCX,R13 MOV R8,R14 MOV R9,RBX CALL 0x001738ae TEST EAX,EAX JNZ 0x00173da1 LAB_00173d91: MOV RDI,R12 CALL 0x00173c32 TEST EAX,EAX JNZ 0x00173d70 XOR ECX,ECX JMP 0x00173da6 LAB_00173da1: MOV ECX,0x1 LAB_00173da6: MOV EAX,ECX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 _mi_ft_parse(int8 param_1,long *param_2,uint param_3,int8 param_4,int8 param_5, int8 param_6) { int8 uVar1; int iVar2; long lVar3; uint local_58; int4 local_54; int8 *local_50; int8 local_48; long local_40; long *local_38; lVar3 = (ulong)param_3 * 0x70; local_58 = (uint)*(ushort *)(*(long *)(*param_2 + 0x218) + 8 + lVar3); local_50 = *(int8 **)(*(long *)(*param_2 + 0x218) + 0x28 + lVar3); local_40 = 0; local_54 = 0; local_48 = param_4; local_38 = param_2; ft_parse_init(param_1,*local_50); uVar1 = *(int8 *)(*(long *)(*local_38 + 0x218) + 0x38 + lVar3); iVar2 = _mi_ft_segiterator(&local_58); while( true ) { if (iVar2 == 0) { return 0; } if ((local_40 != 0) && (iVar2 = ft_parse(param_1,local_40,local_54,uVar1,param_5,param_6), iVar2 != 0)) break; iVar2 = _mi_ft_segiterator(&local_58); } return 1; }
4,637
realloc
seiftnesse[P]memoryallocator/src/custom_alloc_core.c
void *_realloc(void *ptr, size_t size) { HEAP_LOG("Realloc request: %p, new size: %zu bytes\n", ptr, size); // Handle special cases if (!ptr) { HEAP_LOG("Realloc with NULL pointer, equivalent to malloc(%zu)\n", size); return _malloc(size); } if (size == 0) { HEAP_LOG("Realloc with zero size, equivalent to free(%p)\n", ptr); _free(ptr); return NULL; } // Safety check to prevent unreasonable allocations if (size > HEAP_SIZE / 2) { HEAP_LOG("Realloc failed: requested size %zu exceeds limit\n", size); return NULL; } // Small allocations have different handling if (is_small_allocation(ptr)) { HEAP_LOG("Realloc of small allocation: %p, size=%zu\n", ptr, size); // For small allocations, we can't reuse the memory efficiently // so we allocate new memory, copy the data, and free the old memory void *new_ptr = _malloc(size); if (!new_ptr) { HEAP_LOG("Realloc failed: could not allocate new memory\n"); return NULL; } // Calculate original size based on bitmap size_t offset = (uint8_t *) ptr - small_pool; int start_block = offset / SMALL_BLOCK_SIZE; int blocks = 0; // Count allocated blocks while (start_block + blocks < SMALL_POOL_SIZE / SMALL_BLOCK_SIZE) { int bmap_idx = (start_block + blocks) / 32; int bit_idx = (start_block + blocks) % 32; if (!(small_block_bitmap[bmap_idx] & (1 << bit_idx))) { break; } blocks++; } // Calculate copy size (minimum of old and new sizes) size_t old_size = blocks * SMALL_BLOCK_SIZE; size_t copy_size = (size < old_size) ? size : old_size; HEAP_LOG("Small realloc: old size=%zu, copy size=%zu\n", old_size, copy_size); if (copy_size > 0) { _memcpy(new_ptr, ptr, copy_size); } // Free the old allocation _free(ptr); HEAP_LOG("Small realloc succeeded: old=%p, new=%p\n", ptr, new_ptr); return new_ptr; } // Ensure heap is initialized EnsureHeapInitialized(); // Convert user pointer back to segment segment_t *s = PtrToSegment(ptr); if (!s) { HEAP_LOG("Realloc failed: invalid pointer %p\n", ptr); return NULL; // Invalid pointer } // Verify segment integrity check_memory_corruption(s); int integrity_errors = verify_segment_integrity(s, 1); if (integrity_errors > 0) { HEAP_LOG("Fixed %d integrity errors during free operation\n", integrity_errors); } // If segment is already marked as free, something went wrong if (s->is_free) { HEAP_LOG("WARNING: Attempting to realloc an already freed pointer: %p\n", ptr); return NULL; } // Calculate data size available in current allocation void *user_ptr = SegmentToPtr(s); size_t current_data_size = ((char *) s + s->size * BLOCK_SIZE) - (char *) user_ptr; // Safety check if (current_data_size > s->size * BLOCK_SIZE) { HEAP_LOG("Warning: Data size calculation error, resetting to zero\n"); // Something went wrong with pointer calculations current_data_size = 0; } HEAP_LOG("Current data size available: %zu bytes\n", current_data_size); // Calculate required blocks for new size int required_blocks = GetNumBlock(size + sizeof(segment_t) + ALIGNMENT); HEAP_LOG("Required blocks for new size: %d\n", required_blocks); // If new size fits in current allocation, we can potentially reuse it if (s->size == required_blocks) { HEAP_LOG("Realloc: size unchanged, returning original pointer\n"); return ptr; // No change needed } // If new size is smaller, we can shrink the segment if (s->size > required_blocks) { HEAP_LOG("Shrinking allocation: current=%d blocks, required=%d blocks\n", s->size, required_blocks); if (s->size > required_blocks + GetNumBlock(sizeof(segment_t) + ALIGNMENT)) { // We have enough extra space to create a new free segment segment_t *remaining = CutSegment(s, s->size - required_blocks); remaining->is_free = 1; last_free_segment = remaining; // Update statistics update_stats_free(s->size - required_blocks); HEAP_LOG("Created new free segment from excess space: %p, size=%d blocks\n", remaining, remaining->size); } HEAP_LOG("Realloc shrink succeeded: same pointer %p, reduced size\n", ptr); return ptr; // Return original pointer with reduced allocation } // Try to expand in place if next segment is free and big enough if (s->next && s->next->is_free && (s->size + s->next->size) >= required_blocks) { // Remember original size for stats update int old_size = s->size; HEAP_LOG("Expanding in place: current=%d blocks, next free=%d blocks, required=%d\n", s->size, s->next->size, required_blocks); // Merge with next segment s = MergeSegment(s, s->next); // If we have excess space, split the segment if (s->size > required_blocks + GetNumBlock(sizeof(segment_t) + ALIGNMENT)) { segment_t *remaining = CutSegment(s, s->size - required_blocks); remaining->is_free = 1; last_free_segment = remaining; HEAP_LOG("Split excess space after in-place expansion: %p, size=%d blocks\n", remaining, remaining->size); } // Update allocation statistics update_stats_allocate(s->size - old_size); HEAP_LOG("Realloc in-place expand succeeded: same pointer %p, increased size\n", ptr); return ptr; // Return original pointer with expanded allocation } // We need to allocate new memory and move the data HEAP_LOG("Realloc requires new allocation and data copy\n"); // Update integrity metadata after reallocation initialize_segment_integrity(s); void *new_ptr = _malloc(size); if (!new_ptr) { HEAP_LOG("Realloc failed: could not allocate new memory of size %zu\n", size); return NULL; // Allocation failed } // Copy the data from old to new location size_t copy_size = (size < current_data_size) ? size : current_data_size; if (copy_size > 0 && ptr && new_ptr) { if (copy_size > HEAP_SIZE) { HEAP_LOG("Critical: copy size exceeds heap size, resetting to zero\n"); copy_size = 0; // Something is very wrong with the size calculation } HEAP_LOG("Copying %zu bytes from %p to %p\n", copy_size, ptr, new_ptr); _memcpy(new_ptr, ptr, copy_size); } // Free the old memory HEAP_LOG("Freeing original pointer %p after realloc\n", ptr); _free(ptr); HEAP_LOG("Realloc succeeded: old=%p, new=%p, size=%zu\n", ptr, new_ptr, size); return new_ptr; }
O3
c
realloc: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 testq %rdi, %rdi je 0x2294 movq %rdi, %rbx testq %r14, %r14 je 0x22aa cmpq $0x2000000, %r14 # imm = 0x2000000 ja 0x22b2 movq %rbx, %rdi callq 0x2673 testl %eax, %eax je 0x22c7 movq %r14, %rdi callq 0x1fcf testq %rax, %rax je 0x22b2 movq %rax, %r15 leaq 0x2ec1(%rip), %rax # 0x5100 movq %rbx, %rcx subq %rax, %rcx shrq $0x5, %rcx cmpl $0x8001, %ecx # imm = 0x8001 movl $0x8000, %edx # imm = 0x8000 cmovgel %ecx, %edx movl %edx, %esi subl %ecx, %esi movl $0xffffffff, %eax # imm = 0xFFFFFFFF leaq 0x4102e99(%rip), %rdi # 0x4105100 cmpl %ecx, %edx je 0x2353 leal 0x1f(%rcx), %r8d testl %ecx, %ecx cmovnsl %ecx, %r8d sarl $0x5, %r8d movslq %r8d, %r8 movl (%rdi,%r8,4), %r8d incl %eax btl %ecx, %r8d leal 0x1(%rcx), %ecx jb 0x2267 jmp 0x2355 movq %r14, %rdi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1fcf movq %rbx, %rdi callq 0x20dc xorl %r15d, %r15d movq %r15, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpl $0x0, 0x2e22(%rip) # 0x50f0 jne 0x22eb leaq 0x102e29(%rip), %rdi # 0x105100 movl $0x4000000, %esi # imm = 0x4000000 callq 0x1f44 movl $0x1, 0x2e05(%rip) # 0x50f0 movq %rbx, %rdi callq 0x283c testq %rax, %rax je 0x22b2 movq %rax, %r15 movq %rax, %rdi callq 0x2ee8 movq %r15, %rdi movl $0x1, %esi callq 0x295e cmpl $0x0, (%r15) jne 0x22b2 movq %r15, %rdi callq 0x282c movslq 0x4(%r15), %rcx shlq $0xc, %rcx movq %r15, %rdx addq %rcx, %rdx subq %rax, %rdx xorl %r13d, %r13d cmpq %rcx, %rdx cmovbeq %rdx, %r13 leaq 0x40(%r14), %rdi callq 0x26f3 movslq 0x4(%r15), %r12 cmpl %eax, %r12d jne 0x237e movq %rbx, %r15 jmp 0x22b5 movl %esi, %eax testl %eax, %eax je 0x2371 shll $0x5, %eax cmpq %r14, %rax cmovbq %rax, %r14 movq %r15, %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x2bae movq %rbx, %rdi callq 0x20dc jmp 0x22b5 movl %eax, %ebp cmpl %eax, %r12d jle 0x23c2 movl $0x40, %edi callq 0x26f3 addl %ebp, %eax cmpl %eax, %r12d jle 0x234b movl 0x4(%r15), %esi subl %ebp, %esi movq %r15, %rdi callq 0x270e movl $0x1, (%rax) movq %rax, 0x2d37(%rip) # 0x50e8 movslq 0x4(%r15), %rdi movslq %ebp, %rax subq %rax, %rdi callq 0x2e27 jmp 0x234b movq 0x8(%r15), %rsi testq %rsi, %rsi je 0x23da cmpl $0x0, (%rsi) je 0x23da movl 0x4(%rsi), %eax addl %r12d, %eax cmpl %ebp, %eax jge 0x240b movq %r15, %rdi callq 0x276b movq %r14, %rdi callq 0x1fcf testq %rax, %rax je 0x22b2 movq %rax, %r15 testq %r13, %r13 je 0x2371 cmpq %r14, %r13 cmovbq %r13, %r14 jmp 0x2363 movq %r15, %rdi callq 0x27b4 movq %rax, %r14 movl 0x4(%rax), %r15d movl $0x40, %edi callq 0x26f3 addl %ebp, %eax cmpl %eax, %r15d jle 0x2446 movl 0x4(%r14), %esi subl %ebp, %esi movq %r14, %rdi callq 0x270e movl $0x1, (%rax) movq %rax, 0x2ca2(%rip) # 0x50e8 movslq 0x4(%r14), %rdi subq %r12, %rdi callq 0x2e01 jmp 0x234b
_realloc: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rsi test rdi, rdi jz loc_2294 mov rbx, rdi test r14, r14 jz loc_22AA cmp r14, offset unk_2000000 ja loc_22B2 mov rdi, rbx call is_small_allocation test eax, eax jz loc_22C7 mov rdi, r14 call _malloc test rax, rax jz short loc_22B2 mov r15, rax lea rax, small_pool mov rcx, rbx sub rcx, rax shr rcx, 5 cmp ecx, 8001h mov edx, 8000h cmovge edx, ecx mov esi, edx sub esi, ecx mov eax, 0FFFFFFFFh lea rdi, small_block_bitmap loc_2267: cmp edx, ecx jz loc_2353 lea r8d, [rcx+1Fh] test ecx, ecx cmovns r8d, ecx sar r8d, 5 movsxd r8, r8d mov r8d, [rdi+r8*4] inc eax bt r8d, ecx lea ecx, [rcx+1] jb short loc_2267 jmp loc_2355 loc_2294: mov rdi, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _malloc loc_22AA: mov rdi, rbx call _free loc_22B2: xor r15d, r15d loc_22B5: mov rax, r15 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_22C7: cmp cs:heap_initialized, 0 jnz short loc_22EB lea rdi, memory mov esi, offset unk_4000000 call HeapInit mov cs:heap_initialized, 1 loc_22EB: mov rdi, rbx call PtrToSegment test rax, rax jz short loc_22B2 mov r15, rax mov rdi, rax call check_memory_corruption mov rdi, r15 mov esi, 1 call verify_segment_integrity cmp dword ptr [r15], 0 jnz short loc_22B2 mov rdi, r15 call SegmentToPtr movsxd rcx, dword ptr [r15+4] shl rcx, 0Ch mov rdx, r15 add rdx, rcx sub rdx, rax xor r13d, r13d cmp rdx, rcx cmovbe r13, rdx lea rdi, [r14+40h] call GetNumBlock movsxd r12, dword ptr [r15+4] cmp r12d, eax jnz short loc_237E loc_234B: mov r15, rbx jmp loc_22B5 loc_2353: mov eax, esi loc_2355: test eax, eax jz short loc_2371 shl eax, 5 cmp rax, r14 cmovb r14, rax loc_2363: mov rdi, r15 mov rsi, rbx mov rdx, r14 call _memcpy loc_2371: mov rdi, rbx call _free jmp loc_22B5 loc_237E: mov ebp, eax cmp r12d, eax jle short loc_23C2 mov edi, 40h ; '@' call GetNumBlock add eax, ebp cmp r12d, eax jle short loc_234B mov esi, [r15+4] sub esi, ebp mov rdi, r15 call CutSegment mov dword ptr [rax], 1 mov cs:last_free_segment, rax movsxd rdi, dword ptr [r15+4] movsxd rax, ebp sub rdi, rax call update_stats_free jmp short loc_234B loc_23C2: mov rsi, [r15+8] test rsi, rsi jz short loc_23DA cmp dword ptr [rsi], 0 jz short loc_23DA mov eax, [rsi+4] add eax, r12d cmp eax, ebp jge short loc_240B loc_23DA: mov rdi, r15 call initialize_segment_integrity mov rdi, r14 call _malloc test rax, rax jz loc_22B2 mov r15, rax test r13, r13 jz loc_2371 cmp r13, r14 cmovb r14, r13 jmp loc_2363 loc_240B: mov rdi, r15 call MergeSegment mov r14, rax mov r15d, [rax+4] mov edi, 40h ; '@' call GetNumBlock add eax, ebp cmp r15d, eax jle short loc_2446 mov esi, [r14+4] sub esi, ebp mov rdi, r14 call CutSegment mov dword ptr [rax], 1 mov cs:last_free_segment, rax loc_2446: movsxd rdi, dword ptr [r14+4] sub rdi, r12 call update_stats_allocate jmp loc_234B
long long realloc(long long a1, unsigned long long a2) { unsigned long long v2; // r14 long long v3; // rax long long v4; // r15 unsigned long long v5; // rcx int v6; // edx int v7; // esi int v8; // eax int v9; // r8d unsigned __int8 v10; // cf long long v12; // rax long long v13; // r15 long long v14; // rax unsigned long long v15; // rcx unsigned long long v16; // r13 int NumBlock; // eax long long v18; // r12 unsigned long long v19; // rax int v20; // ebp _DWORD *v21; // rax _DWORD *v22; // rsi long long v23; // rax long long v24; // r14 signed int v25; // r15d _DWORD *v26; // rax v2 = a2; if ( !a1 ) return malloc(a2); if ( a2 ) { if ( a2 <= (unsigned long long)&unk_2000000 ) { if ( (unsigned int)is_small_allocation(a1) ) { v3 = malloc(a2); if ( v3 ) { v4 = v3; v5 = (unsigned long long)(a1 - (_QWORD)&small_pool) >> 5; v6 = 0x8000; if ( (int)v5 >= 32769 ) v6 = (unsigned long long)(a1 - (_QWORD)&small_pool) >> 5; v7 = v6 - v5; v8 = -1; while ( v6 != (_DWORD)v5 ) { v9 = small_block_bitmap[(int)v5 / 32]; ++v8; v10 = _bittest(&v9, v5); v5 = (unsigned int)(v5 + 1); if ( !v10 ) goto LABEL_25; } v8 = v7; LABEL_25: if ( !v8 ) goto LABEL_29; v19 = (unsigned int)(32 * v8); if ( v19 < v2 ) v2 = v19; goto LABEL_28; } } else { if ( !heap_initialized ) { HeapInit((unsigned long long)&memory, (unsigned long long)&unk_4000000); heap_initialized = 1; } v12 = PtrToSegment(a1); if ( v12 ) { v13 = v12; check_memory_corruption(v12); verify_segment_integrity(v13, 1LL); if ( !*(_DWORD *)v13 ) { v14 = SegmentToPtr(v13); v15 = (long long)*(int *)(v13 + 4) << 12; v16 = 0LL; if ( v15 + v13 - v14 <= v15 ) v16 = v15 + v13 - v14; NumBlock = GetNumBlock(a2 + 64); v18 = *(int *)(v13 + 4); if ( (_DWORD)v18 != NumBlock ) { v20 = NumBlock; if ( (int)v18 <= NumBlock ) { v22 = *(_DWORD **)(v13 + 8); if ( !v22 || !*v22 || (int)v18 + v22[1] < NumBlock ) { initialize_segment_integrity(v13); v23 = malloc(v2); if ( v23 ) { v4 = v23; if ( !v16 ) goto LABEL_29; if ( v16 < v2 ) v2 = v16; LABEL_28: memcpy(v4, a1, v2, v5); LABEL_29: free(a1); return v4; } return 0LL; } v24 = MergeSegment(v13); v25 = *(_DWORD *)(v24 + 4); if ( v25 > (int)(v20 + GetNumBlock(64LL)) ) { v26 = (_DWORD *)CutSegment(v24, (unsigned int)(*(_DWORD *)(v24 + 4) - v20)); *v26 = 1; last_free_segment = (long long)v26; } update_stats_allocate(*(int *)(v24 + 4) - v18); } else if ( (int)v18 > (int)(NumBlock + GetNumBlock(64LL)) ) { v21 = (_DWORD *)CutSegment(v13, (unsigned int)(*(_DWORD *)(v13 + 4) - v20)); *v21 = 1; last_free_segment = (long long)v21; update_stats_free(*(int *)(v13 + 4) - (long long)v20); } } return a1; } } } } } else { free(a1); } return 0LL; }
_realloc: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI TEST RDI,RDI JZ 0x00102294 MOV RBX,RDI TEST R14,R14 JZ 0x001022aa CMP R14,0x2000000 JA 0x001022b2 MOV RDI,RBX CALL 0x00102673 TEST EAX,EAX JZ 0x001022c7 MOV RDI,R14 CALL 0x00101fcf TEST RAX,RAX JZ 0x001022b2 MOV R15,RAX LEA RAX,[0x105100] MOV RCX,RBX SUB RCX,RAX SHR RCX,0x5 CMP ECX,0x8001 MOV EDX,0x8000 CMOVGE EDX,ECX MOV ESI,EDX SUB ESI,ECX MOV EAX,0xffffffff LEA RDI,[0x4205100] LAB_00102267: CMP EDX,ECX JZ 0x00102353 LEA R8D,[RCX + 0x1f] TEST ECX,ECX CMOVNS R8D,ECX SAR R8D,0x5 MOVSXD R8,R8D MOV R8D,dword ptr [RDI + R8*0x4] INC EAX BT R8D,ECX LEA ECX,[RCX + 0x1] JC 0x00102267 JMP 0x00102355 LAB_00102294: MOV RDI,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00101fcf LAB_001022aa: MOV RDI,RBX CALL 0x001020dc LAB_001022b2: XOR R15D,R15D LAB_001022b5: MOV RAX,R15 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001022c7: CMP dword ptr [0x001050f0],0x0 JNZ 0x001022eb LEA RDI,[0x205100] MOV ESI,0x4000000 CALL 0x00101f44 MOV dword ptr [0x001050f0],0x1 LAB_001022eb: MOV RDI,RBX CALL 0x0010283c TEST RAX,RAX JZ 0x001022b2 MOV R15,RAX MOV RDI,RAX CALL 0x00102ee8 MOV RDI,R15 MOV ESI,0x1 CALL 0x0010295e CMP dword ptr [R15],0x0 JNZ 0x001022b2 MOV RDI,R15 CALL 0x0010282c MOVSXD RCX,dword ptr [R15 + 0x4] SHL RCX,0xc MOV RDX,R15 ADD RDX,RCX SUB RDX,RAX XOR R13D,R13D CMP RDX,RCX CMOVBE R13,RDX LEA RDI,[R14 + 0x40] CALL 0x001026f3 MOVSXD R12,dword ptr [R15 + 0x4] CMP R12D,EAX JNZ 0x0010237e LAB_0010234b: MOV R15,RBX JMP 0x001022b5 LAB_00102353: MOV EAX,ESI LAB_00102355: TEST EAX,EAX JZ 0x00102371 SHL EAX,0x5 CMP RAX,R14 CMOVC R14,RAX LAB_00102363: MOV RDI,R15 MOV RSI,RBX MOV RDX,R14 CALL 0x00102bae LAB_00102371: MOV RDI,RBX CALL 0x001020dc JMP 0x001022b5 LAB_0010237e: MOV EBP,EAX CMP R12D,EAX JLE 0x001023c2 MOV EDI,0x40 CALL 0x001026f3 ADD EAX,EBP CMP R12D,EAX JLE 0x0010234b MOV ESI,dword ptr [R15 + 0x4] SUB ESI,EBP MOV RDI,R15 CALL 0x0010270e MOV dword ptr [RAX],0x1 MOV qword ptr [0x001050e8],RAX MOVSXD RDI,dword ptr [R15 + 0x4] MOVSXD RAX,EBP SUB RDI,RAX CALL 0x00102e27 JMP 0x0010234b LAB_001023c2: MOV RSI,qword ptr [R15 + 0x8] TEST RSI,RSI JZ 0x001023da CMP dword ptr [RSI],0x0 JZ 0x001023da MOV EAX,dword ptr [RSI + 0x4] ADD EAX,R12D CMP EAX,EBP JGE 0x0010240b LAB_001023da: MOV RDI,R15 CALL 0x0010276b MOV RDI,R14 CALL 0x00101fcf TEST RAX,RAX JZ 0x001022b2 MOV R15,RAX TEST R13,R13 JZ 0x00102371 CMP R13,R14 CMOVC R14,R13 JMP 0x00102363 LAB_0010240b: MOV RDI,R15 CALL 0x001027b4 MOV R14,RAX MOV R15D,dword ptr [RAX + 0x4] MOV EDI,0x40 CALL 0x001026f3 ADD EAX,EBP CMP R15D,EAX JLE 0x00102446 MOV ESI,dword ptr [R14 + 0x4] SUB ESI,EBP MOV RDI,R14 CALL 0x0010270e MOV dword ptr [RAX],0x1 MOV qword ptr [0x001050e8],RAX LAB_00102446: MOVSXD RDI,dword ptr [R14 + 0x4] SUB RDI,R12 CALL 0x00102e01 JMP 0x0010234b
void * _realloc(void *__ptr,size_t __size) { int *piVar1; int iVar2; int iVar3; int iVar4; int iVar5; void *pvVar6; int *piVar7; long lVar8; uint uVar9; uint uVar10; ulong uVar11; uint uVar12; ulong uVar13; uint uVar14; if (__ptr == (void *)0x0) { pvVar6 = _malloc(__size); return pvVar6; } if (__size == 0) { _free(__ptr); return (void *)0x0; } if (0x2000000 < __size) { return (void *)0x0; } iVar2 = is_small_allocation(__ptr); if (iVar2 == 0) { if (heap_initialized == 0) { HeapInit(memory,0x4000000); heap_initialized = 1; } piVar7 = (int *)PtrToSegment(__ptr); if (piVar7 == (int *)0x0) { return (void *)0x0; } check_memory_corruption(piVar7); verify_segment_integrity(piVar7,1); if (*piVar7 != 0) { return (void *)0x0; } lVar8 = SegmentToPtr(piVar7); uVar13 = (long)piVar7 + ((long)piVar7[1] * 0x1000 - lVar8); uVar11 = 0; if (uVar13 <= (ulong)((long)piVar7[1] * 0x1000)) { uVar11 = uVar13; } iVar3 = GetNumBlock(__size + 0x40); iVar2 = piVar7[1]; if (iVar2 == iVar3) { return __ptr; } if (iVar3 < iVar2) { iVar4 = GetNumBlock(0x40); if (iVar4 + iVar3 < iVar2) { last_free_segment = (int4 *)CutSegment(piVar7,piVar7[1] - iVar3); *last_free_segment = 1; update_stats_free((long)piVar7[1] - (long)iVar3); return __ptr; } return __ptr; } piVar1 = *(int **)(piVar7 + 2); if (((piVar1 != (int *)0x0) && (*piVar1 != 0)) && (iVar3 <= piVar1[1] + iVar2)) { lVar8 = MergeSegment(piVar7); iVar4 = *(int *)(lVar8 + 4); iVar5 = GetNumBlock(0x40); if (iVar5 + iVar3 < iVar4) { last_free_segment = (int4 *)CutSegment(lVar8,*(int *)(lVar8 + 4) - iVar3); *last_free_segment = 1; } update_stats_allocate((long)*(int *)(lVar8 + 4) - (long)iVar2); return __ptr; } initialize_segment_integrity(piVar7); pvVar6 = _malloc(__size); if (pvVar6 == (void *)0x0) { return (void *)0x0; } if (uVar11 == 0) goto LAB_00102371; if (uVar11 < __size) { __size = uVar11; } } else { pvVar6 = _malloc(__size); if (pvVar6 == (void *)0x0) { return (void *)0x0; } uVar11 = (long)__ptr - 0x105100U >> 5; uVar9 = (uint)uVar11; uVar12 = 0x8000; if (0x8000 < (int)uVar9) { uVar12 = uVar9; } iVar2 = -1; do { uVar10 = (uint)uVar11; iVar3 = uVar12 - uVar9; if (uVar12 == uVar10) break; uVar14 = uVar10 + 0x1f; if (-1 < (int)uVar10) { uVar14 = uVar10; } iVar2 = iVar2 + 1; uVar11 = (ulong)(uVar10 + 1); iVar3 = iVar2; } while (((uint)(&small_block_bitmap)[(int)uVar14 >> 5] >> (uVar10 & 0x1f) & 1) != 0); if (iVar3 == 0) goto LAB_00102371; if ((uint)(iVar3 << 5) < __size) { __size = (ulong)(uint)(iVar3 << 5); } } _memcpy(pvVar6,__ptr,__size); LAB_00102371: _free(__ptr); return pvVar6; }
4,638
my_snprintf_mb2
eloqsql/strings/ctype-ucs2.c
static size_t my_snprintf_mb2(CHARSET_INFO *cs __attribute__((unused)), char* to, size_t n, const char* fmt, ...) { size_t ret; va_list args; va_start(args,fmt); ret= my_vsnprintf_mb2(to, n, fmt, args); va_end(args); return ret; }
O0
c
my_snprintf_mb2: pushq %rbp movq %rsp, %rbp subq $0xf0, %rsp testb %al, %al je 0x8dcbb movaps %xmm0, -0xc0(%rbp) movaps %xmm1, -0xb0(%rbp) movaps %xmm2, -0xa0(%rbp) movaps %xmm3, -0x90(%rbp) movaps %xmm4, -0x80(%rbp) movaps %xmm5, -0x70(%rbp) movaps %xmm6, -0x60(%rbp) movaps %xmm7, -0x50(%rbp) movq %r9, -0xc8(%rbp) movq %r8, -0xd0(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) leaq -0xf0(%rbp), %rax movq %rax, -0x30(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x38(%rbp) movl $0x30, -0x3c(%rbp) movl $0x20, -0x40(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx leaq -0x40(%rbp), %rcx callq 0x91130 movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax addq $0xf0, %rsp popq %rbp retq
my_snprintf_mb2: push rbp mov rbp, rsp sub rsp, 0F0h test al, al jz short loc_8DCBB movaps [rbp+var_C0], xmm0 movaps [rbp+var_B0], xmm1 movaps [rbp+var_A0], xmm2 movaps [rbp+var_90], xmm3 movaps [rbp+var_80], xmm4 movaps [rbp+var_70], xmm5 movaps [rbp+var_60], xmm6 movaps [rbp+var_50], xmm7 loc_8DCBB: mov [rbp+var_C8], r9 mov [rbp+var_D0], r8 mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx lea rax, [rbp+var_F0] mov [rbp+var_30], rax lea rax, [rbp+arg_0] mov [rbp+var_38], rax mov [rbp+var_3C], 30h ; '0' mov [rbp+var_40], 20h ; ' ' mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] lea rcx, [rbp+var_40] call my_vsnprintf_mb2 mov [rbp+var_28], rax mov rax, [rbp+var_28] add rsp, 0F0h pop rbp retn
long long my_snprintf_mb2( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { char v16; // [rsp+0h] [rbp-F0h] BYREF long long v17; // [rsp+20h] [rbp-D0h] long long v18; // [rsp+28h] [rbp-C8h] __m128 v19; // [rsp+30h] [rbp-C0h] __m128 v20; // [rsp+40h] [rbp-B0h] __m128 v21; // [rsp+50h] [rbp-A0h] __m128 v22; // [rsp+60h] [rbp-90h] __m128 v23; // [rsp+70h] [rbp-80h] __m128 v24; // [rsp+80h] [rbp-70h] __m128 v25; // [rsp+90h] [rbp-60h] __m128 v26; // [rsp+A0h] [rbp-50h] _DWORD v27[2]; // [rsp+B0h] [rbp-40h] BYREF char *v28; // [rsp+B8h] [rbp-38h] char *v29; // [rsp+C0h] [rbp-30h] long long v30; // [rsp+D0h] [rbp-20h] long long v31; // [rsp+D8h] [rbp-18h] long long v32; // [rsp+E0h] [rbp-10h] long long v33; // [rsp+E8h] [rbp-8h] v19 = a7; v20 = a8; v21 = a9; v22 = a10; v23 = a11; v24 = a12; v25 = a13; v26 = a14; v18 = a6; v17 = a5; v33 = a1; v32 = a2; v31 = a3; v30 = a4; v29 = &v16; v28 = &a15; v27[1] = 48; v27[0] = 32; return my_vsnprintf_mb2(a2, a3, a4, v27); }
my_snprintf_mb2: PUSH RBP MOV RBP,RSP SUB RSP,0xf0 TEST AL,AL JZ 0x0018dcbb MOVAPS xmmword ptr [RBP + -0xc0],XMM0 MOVAPS xmmword ptr [RBP + -0xb0],XMM1 MOVAPS xmmword ptr [RBP + -0xa0],XMM2 MOVAPS xmmword ptr [RBP + -0x90],XMM3 MOVAPS xmmword ptr [RBP + -0x80],XMM4 MOVAPS xmmword ptr [RBP + -0x70],XMM5 MOVAPS xmmword ptr [RBP + -0x60],XMM6 MOVAPS xmmword ptr [RBP + -0x50],XMM7 LAB_0018dcbb: MOV qword ptr [RBP + -0xc8],R9 MOV qword ptr [RBP + -0xd0],R8 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX LEA RAX,[RBP + -0xf0] MOV qword ptr [RBP + -0x30],RAX LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x38],RAX MOV dword ptr [RBP + -0x3c],0x30 MOV dword ptr [RBP + -0x40],0x20 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] LEA RCX,[RBP + -0x40] CALL 0x00191130 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RSP,0xf0 POP RBP RET
int8 my_snprintf_mb2(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; int8 uVar1; int1 local_f8 [32]; int8 local_d8; int8 local_d0; int8 local_c8; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int4 local_48; int4 local_44; int1 *local_40; int1 *local_38; int8 local_28; int8 local_20; int8 local_18; int8 local_10; if (in_AL != '\0') { local_c8 = param_1; local_b8 = param_2; local_a8 = param_3; local_98 = param_4; local_88 = param_5; local_78 = param_6; local_68 = param_7; local_58 = param_8; } local_38 = local_f8; local_40 = &stack0x00000008; local_44 = 0x30; local_48 = 0x20; local_d8 = param_13; local_d0 = param_14; local_28 = param_12; local_20 = param_11; local_18 = param_10; local_10 = param_9; uVar1 = my_vsnprintf_mb2(param_10,param_11,param_12,&local_48); return uVar1; }
4,639
reset_events_waits_current()
eloqsql/storage/perfschema/pfs_events_waits.cc
void reset_events_waits_current(void) { global_thread_container.apply_all(fct_reset_events_waits_current); }
O3
cpp
reset_events_waits_current(): pushq %rbp movq %rsp, %rbp xorl %eax, %eax leaq 0x3833db(%rip), %rcx # 0x3c68f8 movdqa 0x3d71b(%rip), %xmm0 # 0x80c40 movdqa 0x3d6f3(%rip), %xmm1 # 0x80c20 movdqa 0x3d71b(%rip), %xmm2 # 0x80c50 movdqa 0x3d733(%rip), %xmm3 # 0x80c70 pshufd $0xf5, %xmm3, %xmm4 # xmm4 = xmm3[1,1,3,3] movl $0x1640, %edx # imm = 0x1640 movq 0xa8(%rcx,%rax,8), %rsi testq %rsi, %rsi je 0x43643 movq 0x50(%rsi), %rdi testq %rdi, %rdi jle 0x43643 movq 0x48(%rsi), %rsi imulq $0x1640, %rdi, %rdi # imm = 0x1640 addq %rsi, %rdi leaq 0x8d0(%rsi), %r8 movq %r8, %r9 xorl %r10d, %r10d movq %r10, %xmm5 pshufd $0x44, %xmm5, %xmm5 # xmm5 = xmm5[0,1,0,1] movdqa %xmm5, %xmm6 por %xmm1, %xmm6 pxor %xmm2, %xmm6 movdqa %xmm3, %xmm7 pcmpgtd %xmm6, %xmm7 pshufd $0xf5, %xmm6, %xmm6 # xmm6 = xmm6[1,1,3,3] pcmpeqd %xmm4, %xmm6 pand %xmm7, %xmm6 movd %xmm6, %r11d testb $0x1, %r11b je 0x435bd movl $0x0, (%r9) pextrw $0x4, %xmm6, %r11d testb $0x1, %r11b je 0x435d4 movl $0x0, 0xb0(%r9) por %xmm0, %xmm5 pxor %xmm2, %xmm5 movdqa %xmm3, %xmm6 pcmpgtd %xmm5, %xmm6 pshufd $0xf5, %xmm5, %xmm5 # xmm5 = xmm5[1,1,3,3] pcmpeqd %xmm4, %xmm5 pand %xmm6, %xmm5 pextrw $0x0, %xmm5, %r11d testb $0x1, %r11b je 0x43608 movl $0x0, 0x160(%r9) pextrw $0x4, %xmm5, %r11d testb $0x1, %r11b je 0x4361f movl $0x0, 0x210(%r9) addq $0x4, %r10 addq $0x2c0, %r9 # imm = 0x2C0 cmpq $0x8, %r10 jne 0x43580 addq %rdx, %rsi addq %rdx, %r8 cmpq %rdi, %rsi jb 0x4357a incq %rax cmpq $0x100, %rax # imm = 0x100 jne 0x43547 popq %rbp retq
_Z26reset_events_waits_currentv: push rbp mov rbp, rsp xor eax, eax lea rcx, global_thread_container movdqa xmm0, cs:xmmword_80C40 movdqa xmm1, cs:xmmword_80C20 movdqa xmm2, cs:xmmword_80C50 movdqa xmm3, cs:xmmword_80C70 pshufd xmm4, xmm3, 0F5h mov edx, 1640h loc_43547: mov rsi, [rcx+rax*8+0A8h] test rsi, rsi jz loc_43643 mov rdi, [rsi+50h] test rdi, rdi jle loc_43643 mov rsi, [rsi+48h] imul rdi, 1640h add rdi, rsi lea r8, [rsi+8D0h] loc_4357A: mov r9, r8 xor r10d, r10d loc_43580: movq xmm5, r10 pshufd xmm5, xmm5, 44h ; 'D' movdqa xmm6, xmm5 por xmm6, xmm1 pxor xmm6, xmm2 movdqa xmm7, xmm3 pcmpgtd xmm7, xmm6 pshufd xmm6, xmm6, 0F5h pcmpeqd xmm6, xmm4 pand xmm6, xmm7 movd r11d, xmm6 test r11b, 1 jz short loc_435BD mov dword ptr [r9], 0 loc_435BD: pextrw r11d, xmm6, 4 test r11b, 1 jz short loc_435D4 mov dword ptr [r9+0B0h], 0 loc_435D4: por xmm5, xmm0 pxor xmm5, xmm2 movdqa xmm6, xmm3 pcmpgtd xmm6, xmm5 pshufd xmm5, xmm5, 0F5h pcmpeqd xmm5, xmm4 pand xmm5, xmm6 pextrw r11d, xmm5, 0 test r11b, 1 jz short loc_43608 mov dword ptr [r9+160h], 0 loc_43608: pextrw r11d, xmm5, 4 test r11b, 1 jz short loc_4361F mov dword ptr [r9+210h], 0 loc_4361F: add r10, 4 add r9, 2C0h cmp r10, 8 jnz loc_43580 add rsi, rdx add r8, rdx cmp rsi, rdi jb loc_4357A loc_43643: inc rax cmp rax, 100h jnz loc_43547 pop rbp retn
long long reset_events_waits_current(void) { long long result; // rax __m128i si128; // xmm0 __m128i v2; // xmm1 __m128i v3; // xmm2 __m128i v4; // xmm3 __m128i v5; // xmm4 long long v6; // rsi long long v7; // rdi unsigned long long v8; // rsi unsigned long long v9; // rdi _DWORD *v10; // r8 _DWORD *v11; // r9 unsigned long long i; // r10 __m128i v13; // xmm5 __m128i v14; // xmm6 __m128i v15; // xmm6 __m128i v16; // xmm5 __m128i v17; // xmm5 result = 0LL; si128 = _mm_load_si128((const __m128i *)&xmmword_80C40); v2 = _mm_load_si128((const __m128i *)&xmmword_80C20); v3 = _mm_load_si128((const __m128i *)&xmmword_80C50); v4 = _mm_load_si128((const __m128i *)&xmmword_80C70); v5 = _mm_shuffle_epi32(v4, 245); do { v6 = global_thread_container[result + 21]; if ( v6 ) { v7 = *(_QWORD *)(v6 + 80); if ( v7 > 0 ) { v8 = *(_QWORD *)(v6 + 72); v9 = v8 + 5696 * v7; v10 = (_DWORD *)(v8 + 2256); do { v11 = v10; for ( i = 0LL; i != 8; i += 4LL ) { v13 = _mm_shuffle_epi32((__m128i)i, 68); v14 = _mm_xor_si128(_mm_or_si128(v13, v2), v3); v15 = _mm_and_si128(_mm_cmpeq_epi32(_mm_shuffle_epi32(v14, 245), v5), _mm_cmpgt_epi32(v4, v14)); if ( (_mm_cvtsi128_si32(v15) & 1) != 0 ) *v11 = 0; if ( (_mm_extract_epi16(v15, 4) & 1) != 0 ) v11[44] = 0; v16 = _mm_xor_si128(_mm_or_si128(v13, si128), v3); v17 = _mm_and_si128(_mm_cmpeq_epi32(_mm_shuffle_epi32(v16, 245), v5), _mm_cmpgt_epi32(v4, v16)); if ( (_mm_extract_epi16(v17, 0) & 1) != 0 ) v11[88] = 0; if ( (_mm_extract_epi16(v17, 4) & 1) != 0 ) v11[132] = 0; v11 += 176; } v8 += 5696LL; v10 += 1424; } while ( v8 < v9 ); } } ++result; } while ( result != 256 ); return result; }
reset_events_waits_current: PUSH RBP MOV RBP,RSP XOR EAX,EAX LEA RCX,[0x4c68f8] MOVDQA XMM0,xmmword ptr [0x00180c40] MOVDQA XMM1,xmmword ptr [0x00180c20] MOVDQA XMM2,xmmword ptr [0x00180c50] MOVDQA XMM3,xmmword ptr [0x00180c70] PSHUFD XMM4,XMM3,0xf5 MOV EDX,0x1640 LAB_00143547: MOV RSI,qword ptr [RCX + RAX*0x8 + 0xa8] TEST RSI,RSI JZ 0x00143643 MOV RDI,qword ptr [RSI + 0x50] TEST RDI,RDI JLE 0x00143643 MOV RSI,qword ptr [RSI + 0x48] IMUL RDI,RDI,0x1640 ADD RDI,RSI LEA R8,[RSI + 0x8d0] LAB_0014357a: MOV R9,R8 XOR R10D,R10D LAB_00143580: MOVQ XMM5,R10 PSHUFD XMM5,XMM5,0x44 MOVDQA XMM6,XMM5 POR XMM6,XMM1 PXOR XMM6,XMM2 MOVDQA XMM7,XMM3 PCMPGTD XMM7,XMM6 PSHUFD XMM6,XMM6,0xf5 PCMPEQD XMM6,XMM4 PAND XMM6,XMM7 MOVD R11D,XMM6 TEST R11B,0x1 JZ 0x001435bd MOV dword ptr [R9],0x0 LAB_001435bd: PEXTRW R11D,XMM6,0x4 TEST R11B,0x1 JZ 0x001435d4 MOV dword ptr [R9 + 0xb0],0x0 LAB_001435d4: POR XMM5,XMM0 PXOR XMM5,XMM2 MOVDQA XMM6,XMM3 PCMPGTD XMM6,XMM5 PSHUFD XMM5,XMM5,0xf5 PCMPEQD XMM5,XMM4 PAND XMM5,XMM6 PEXTRW R11D,XMM5,0x0 TEST R11B,0x1 JZ 0x00143608 MOV dword ptr [R9 + 0x160],0x0 LAB_00143608: PEXTRW R11D,XMM5,0x4 TEST R11B,0x1 JZ 0x0014361f MOV dword ptr [R9 + 0x210],0x0 LAB_0014361f: ADD R10,0x4 ADD R9,0x2c0 CMP R10,0x8 JNZ 0x00143580 ADD RSI,RDX ADD R8,RDX CMP RSI,RDI JC 0x0014357a LAB_00143643: INC RAX CMP RAX,0x100 JNZ 0x00143547 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* reset_events_waits_current() */ void reset_events_waits_current(void) { int1 auVar1 [16]; int1 auVar2 [16]; int1 auVar3 [16]; int iVar4; int iVar5; long lVar6; ulong uVar7; ulong uVar8; int4 *puVar9; int4 *puVar10; long lVar11; int1 auVar12 [16]; int1 auVar13 [16]; iVar5 = _UNK_00180c74; iVar4 = _DAT_00180c70; auVar3 = _DAT_00180c50; auVar2 = _DAT_00180c40; auVar1 = _DAT_00180c20; lVar6 = 0; do { lVar11 = *(long *)(global_thread_container + lVar6 * 8 + 0xa8); if ((lVar11 != 0) && (0 < *(long *)(lVar11 + 0x50))) { uVar7 = *(ulong *)(lVar11 + 0x48); uVar8 = *(long *)(lVar11 + 0x50) * 0x1640 + uVar7; puVar9 = (int4 *)(uVar7 + 0x8d0); do { lVar11 = 0; puVar10 = puVar9; do { auVar12._8_4_ = (int)lVar11; auVar12._0_8_ = lVar11; auVar12._12_4_ = (int)((ulong)lVar11 >> 0x20); auVar13 = (auVar12 | auVar1) ^ auVar3; if (auVar13._4_4_ == iVar5 && auVar13._0_4_ < iVar4) { *puVar10 = 0; puVar10[0x2c] = 0; } auVar12 = (auVar12 | auVar2) ^ auVar3; if (auVar12._4_4_ == iVar5 && auVar12._0_4_ < iVar4) { puVar10[0x58] = 0; puVar10[0x84] = 0; } lVar11 = lVar11 + 4; puVar10 = puVar10 + 0xb0; } while (lVar11 != 8); uVar7 = uVar7 + 0x1640; puVar9 = puVar9 + 0x590; } while (uVar7 < uVar8); } lVar6 = lVar6 + 1; } while (lVar6 != 0x100); return; }
4,640
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>::at<char const (&) [10], 0>(char const (&) [10]) const
monkey531[P]llama/common/./json.hpp
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
O0
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> 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>::at<char const (&) [10], 0>(char const (&) [10]) const: subq $0xc8, %rsp movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movq 0xc0(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0xa2c80 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x1293f8 jmp 0x1294d4 movb $0x1, 0x83(%rsp) movl $0x20, %edi callq 0x50540 movq 0x20(%rsp), %rdi movq %rax, 0x18(%rsp) callq 0xa04c0 movq %rax, 0x90(%rsp) leaq 0xabd00(%rip), %rsi # 0x1d5128 leaq 0x98(%rsp), %rdi leaq 0x90(%rsp), %rdx callq 0x125a10 jmp 0x12943f movq 0x20(%rsp), %rcx movq 0x18(%rsp), %rdi movl $0x130, %esi # imm = 0x130 leaq 0x98(%rsp), %rdx callq 0xa0260 jmp 0x12945d movq 0x18(%rsp), %rdi movb $0x0, 0x83(%rsp) leaq 0x128c87(%rip), %rsi # 0x2520f8 leaq -0x88f08(%rip), %rdx # 0xa0570 callq 0x508f0 jmp 0x129651 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x1294b9 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x98(%rsp), %rdi callq 0x510c0 testb $0x1, 0x83(%rsp) jne 0x1294c5 jmp 0x1294cf movq 0x18(%rsp), %rdi callq 0x50c40 jmp 0x129644 movq 0x20(%rsp), %rax movq 0x8(%rax), %rdi movq 0xb8(%rsp), %rsi callq 0x126b60 movq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x78(%rsp) movq 0x8(%rax), %rdi callq 0xa2ac0 movq %rax, 0x70(%rsp) leaq 0x78(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0xbb9f0 testb $0x1, %al jne 0x12951d jmp 0x12962e movb $0x1, 0x2e(%rsp) movl $0x20, %edi callq 0x50540 movq %rax, (%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x2f(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x50d60 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x30(%rsp), %rdi callq 0x61bd0 jmp 0x129562 leaq 0xabdeb(%rip), %rsi # 0x1d5354 leaq 0xabdea(%rip), %rcx # 0x1d535a leaq 0x50(%rsp), %rdi leaq 0x30(%rsp), %rdx callq 0x126c30 jmp 0x129581 movq 0x20(%rsp), %rcx movq (%rsp), %rdi movl $0x193, %esi # imm = 0x193 leaq 0x50(%rsp), %rdx callq 0x127b20 jmp 0x12959b movq (%rsp), %rdi movb $0x0, 0x2e(%rsp) leaq 0x128c35(%rip), %rsi # 0x2521e0 leaq -0x70672(%rip), %rdx # 0xb8f40 callq 0x508f0 jmp 0x129651 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x129610 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x129606 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x50(%rsp), %rdi callq 0x510c0 leaq 0x30(%rsp), %rdi callq 0x510c0 leaq 0x2f(%rsp), %rdi callq 0x510a0 testb $0x1, 0x2e(%rsp) jne 0x129623 jmp 0x12962c movq (%rsp), %rdi callq 0x50c40 jmp 0x129644 leaq 0x78(%rsp), %rdi callq 0xbbbe0 addq $0x20, %rax addq $0xc8, %rsp retq movq 0x88(%rsp), %rdi callq 0x50940 nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: sub rsp, 0C8h mov [rsp+0C8h+var_8], rdi mov qword ptr [rsp+0C8h+var_10], rsi mov rdi, [rsp+0C8h+var_8] mov [rsp+0C8h+var_A8], rdi; int call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9is_objectEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_object(void) xor al, 0FFh xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_1293F8 jmp loc_1294D4 loc_1293F8: mov [rsp+0C8h+var_45], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rdi, [rsp+0C8h+var_A8] mov [rsp+0C8h+var_B0], rax; char call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov qword ptr [rsp+0C8h+var_38], rax; char lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+0C8h+var_30]; int lea rdx, [rsp+0C8h+var_38]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) jmp short $+2 loc_12943F: mov rcx, [rsp+0C8h+var_A8] mov rdi, [rsp+0C8h+var_B0]; int mov esi, 130h lea rdx, [rsp+0C8h+var_30] call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ jmp short $+2 loc_12945D: mov rdi, [rsp+0C8h+var_B0]; void * mov [rsp+0C8h+var_45], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *) call ___cxa_throw jmp loc_129651 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_1294B9 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1294B9: test [rsp+arg_7B], 1 jnz short loc_1294C5 jmp short loc_1294CF loc_1294C5: mov rdi, [rsp+arg_10]; void * call ___cxa_free_exception loc_1294CF: jmp loc_129644 loc_1294D4: mov rax, [rsp+0C8h+var_A8] mov rdi, [rax+8] mov rsi, qword ptr [rsp+0C8h+var_10] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA8_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ mov rcx, rax mov rax, [rsp+0C8h+var_A8] mov qword ptr [rsp+0C8h+var_50], rcx; int mov rdi, [rax+8] call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void) mov qword ptr [rsp+0C8h+var_58], rax; char lea rdi, [rsp+0C8h+var_50] lea rsi, [rsp+0C8h+var_58] call _ZN9__gnu_cxxeqIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESR_; __gnu_cxx::operator==<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&) test al, 1 jnz short loc_12951D jmp loc_12962E loc_12951D: mov [rsp+0C8h+var_9A], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov [rsp+0C8h+var_C8], rax; int mov rax, qword ptr [rsp+0C8h+var_10] mov qword ptr [rsp+0C8h+var_C0], rax; int lea rdi, [rsp+0C8h+var_99] mov qword ptr [rsp+0C8h+var_B8], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, qword ptr [rsp+0C8h+var_C0] mov rdx, qword ptr [rsp+0C8h+var_B8] lea rdi, [rsp+0C8h+var_99+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_129562: lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+0C8h+var_78]; int lea rdx, [rsp+0C8h+var_99+1]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) jmp short $+2 loc_129581: mov rcx, [rsp+0C8h+var_A8] mov rdi, [rsp+0C8h+var_C8]; int mov esi, 193h lea rdx, [rsp+0C8h+var_78] 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_ jmp short $+2 loc_12959B: mov rdi, [rsp+0C8h+var_C8]; void * mov [rsp+0C8h+var_9A], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail12out_of_rangeD2Ev; void (*)(void *) call ___cxa_throw jmp loc_129651 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_129610 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_129606 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_129606: lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_129610: lea rdi, [rsp+arg_27] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() test [rsp+arg_26], 1 jnz short loc_129623 jmp short loc_12962C loc_129623: mov rdi, [rsp+0]; void * call ___cxa_free_exception loc_12962C: jmp short loc_129644 loc_12962E: lea rdi, [rsp+0C8h+var_50] call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator->(void) add rax, 20h ; ' ' add rsp, 0C8h retn loc_129644: mov rdi, [rsp+arg_80] call __Unwind_Resume loc_129651: nop word ptr [rax+rax+00000000h] nop dword ptr [rax+rax+00h]
long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::out_of_range *v3; // [rsp+0h] [rbp-C8h] long long v4; // [rsp+8h] [rbp-C0h] void *exception; // [rsp+18h] [rbp-B0h] int v6[8]; // [rsp+2Fh] [rbp-99h] BYREF int v7[8]; // [rsp+50h] [rbp-78h] BYREF char v8[8]; // [rsp+70h] [rbp-58h] BYREF int v9[2]; // [rsp+78h] [rbp-50h] BYREF char v10; // [rsp+83h] [rbp-45h] char v11[8]; // [rsp+90h] [rbp-38h] BYREF int v12[8]; // [rsp+98h] [rbp-30h] BYREF int v13[2]; // [rsp+B8h] [rbp-10h] long long v14; // [rsp+C0h] [rbp-8h] v14 = a1; *(_QWORD *)v13 = a2; if ( !nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::is_object((_BYTE *)a1) ) { exception = __cxa_allocate_exception(0x20uLL); *(_QWORD *)v11 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((_BYTE *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>( (long long)v12, (long long)"cannot use at() with ", (nlohmann::json_abi_v3_11_3::detail **)v11); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( (long long)exception, 304, (long long)v12, a1); v10 = 0; __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::type_error::~type_error); } *(_QWORD *)v9 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA8_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_( *(_QWORD *)(a1 + 8), *(long long *)v13); *(_QWORD *)v8 = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(*(_QWORD *)(a1 + 8)); if ( __gnu_cxx::operator==<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>( (long long)v9, (long long)v8) ) { v3 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL); v4 = *(_QWORD *)v13; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v6 + 1, v4, (long long)v6); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( (long long)v7, (long long)"key '", (long long)v6 + 1, (long long)"' not found"); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( v3, 403, (long long)v7, a1); __cxa_throw( v3, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::out_of_range::~out_of_range); } return __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator->((long long)v9) + 32; }
4,641
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>::at<char const (&) [10], 0>(char const (&) [10]) const
monkey531[P]llama/common/./json.hpp
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> 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>::at<char const (&) [10], 0>(char const (&) [10]) const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0x835cd movq %rsi, %r15 movq 0x8(%r14), %rdi callq 0x6339a movq 0x8(%r14), %rcx cmpq 0x8(%rcx), %rax je 0x8362b addq $0x20, %rax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $0x20 popq %rdi callq 0x20390 movq %rax, %rbx movq %r14, %rdi callq 0x3b8b2 leaq 0x28(%rsp), %rdx movq %rax, (%rdx) leaq 0x1dddd(%rip), %rsi # 0xa13cc leaq 0x8(%rsp), %rdi callq 0x62ca1 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x3b766 xorl %ebp, %ebp leaq 0x5cc9e(%rip), %rsi # 0xe02b8 leaq -0x3c63f(%rip), %rdx # 0x46fe2 movq %rbx, %rdi callq 0x20b30 jmp 0x83695 pushq $0x20 popq %rdi callq 0x20390 movq %rax, %rbx leaq 0x28(%rsp), %rdi leaq 0x7(%rsp), %rdx movq %r15, %rsi callq 0x262e2 leaq 0x1dfa9(%rip), %rsi # 0xa15f8 leaq 0x1dfa8(%rip), %rcx # 0xa15fe leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rdx callq 0x632a9 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0x63712 xorl %ebp, %ebp leaq 0x5cd1a(%rip), %rsi # 0xe03a0 leaq -0x3c6ab(%rip), %rdx # 0x46fe2 movq %rbx, %rdi callq 0x20b30 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x20d78 jmp 0x836aa movq %rax, %r14 movb $0x1, %bpl leaq 0x28(%rsp), %rdi jmp 0x836bb jmp 0x836c7 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x20d78 testb %bpl, %bpl jne 0x836ca jmp 0x836d2 movq %rax, %r14 movq %rbx, %rdi callq 0x20520 movq %r14, %rdi callq 0x20b90
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: push rbp; char push r15; int push r14; int push rbx; int sub rsp, 48h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_835CD mov r15, rsi mov rdi, [r14+8] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ mov rcx, [r14+8] cmp rax, [rcx+8] jz short loc_8362B add rax, 20h ; ' ' add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_835CD: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+68h+var_40] mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_60] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_60] mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_83695 loc_8362B: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_61] mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_60] lea rdx, [rsp+68h+var_40] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_60] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 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_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_83695: mov r14, rax lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_836AA mov r14, rax mov bpl, 1 loc_836AA: lea rdi, [rsp+68h+var_40] jmp short loc_836BB jmp short loc_836C7 mov r14, rax lea rdi, [rsp+68h+var_60]; void * loc_836BB: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_836CA jmp short loc_836D2 loc_836C7: mov r14, rax loc_836CA: mov rdi, rbx; void * call ___cxa_free_exception loc_836D2: mov rdi, r14 call __Unwind_Resume
long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_( long long a1, long long a2) { long long v2; // rax nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx nlohmann::json_abi_v3_11_3::detail::out_of_range *v5; // rbx _BYTE v6[32]; // [rsp+8h] [rbp-60h] BYREF _QWORD v7[8]; // [rsp+28h] [rbp-40h] BYREF if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v7[0] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>( (long long)v6, (long long)"cannot use at() with ", v7); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 0x130u, (long long)v6, a1); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(*(long long **)(a1 + 8)); if ( v2 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) ) { v5 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL); std::string::basic_string<std::allocator<char>>(v7, a2); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( (long long)v6, (long long)"key '", (long long)v7, (long long)"' not found"); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( v5, 403, (long long)v6); __cxa_throw( v5, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return v2 + 32; }
4,642
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>::at<char const (&) [10], 0>(char const (&) [10]) const
monkey531[P]llama/common/./json.hpp
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0x69bb7 movq %rsi, %r15 movq 0x8(%r14), %r12 movq (%r12), %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx je 0x69ba1 movq %rbx, %rdi movq %r15, %rsi callq 0x181a0 testl %eax, %eax je 0x69b96 addq $0x30, %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx jne 0x69b77 jmp 0x69b99 movq %rbx, %rax movq 0x8(%r14), %rcx movq 0x8(%rcx), %rbx cmpq %rbx, %rax je 0x69c15 addq $0x20, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x18360 movq %rax, %rbx movq %r14, %rdi callq 0x3e096 movq %rsp, %rdx movq %rax, (%rdx) leaq 0x52b9a(%rip), %rsi # 0xbc773 leaq 0x20(%rsp), %rdi callq 0x6f3e3 movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x3de42 xorl %ebp, %ebp leaq 0x846b4(%rip), %rsi # 0xee2b8 leaq -0x1d85b(%rip), %rdx # 0x4c3b0 movq %rbx, %rdi callq 0x18b30 jmp 0x69c8e movl $0x20, %edi callq 0x18360 movq %rax, %rbx leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) movq %r15, %rdi callq 0x18310 leaq (%rax,%r15), %rdx movq %rsp, %rdi movq %r15, %rsi callq 0x590a2 leaq 0x52d55(%rip), %rsi # 0xbc99f leaq 0x52d54(%rip), %rcx # 0xbc9a5 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x6f9be movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0x6fd36 xorl %ebp, %ebp leaq 0x84721(%rip), %rsi # 0xee3a0 leaq -0x1d8d6(%rip), %rdx # 0x4c3b0 movq %rbx, %rdi callq 0x18b30 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x69cac movq 0x30(%rsp), %rsi incq %rsi callq 0x186a0 movq (%rsp), %rdi cmpq %r12, %rdi je 0x69cf7 movq 0x10(%rsp), %rsi jmp 0x69cef movq %rax, %r14 movq (%rsp), %rdi cmpq %r12, %rdi je 0x69d01 movq 0x10(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x69d01 jmp 0x69cfe movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x69cf7 movq 0x30(%rsp), %rsi incq %rsi callq 0x186a0 testb %bpl, %bpl jne 0x69d01 jmp 0x69d09 movq %rax, %r14 movq %rbx, %rdi callq 0x18500 movq %r14, %rdi callq 0x18b90 nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: push rbp; char push r15; int push r14; int push r12; int push rbx; char sub rsp, 40h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_69BB7 mov r15, rsi mov r12, [r14+8] mov rbx, [r12] mov rax, [r12+8] cmp rbx, rax jz short loc_69BA1 loc_69B77: mov rdi, rbx mov rsi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_69B96 add rbx, 30h ; '0' mov rax, [r12+8] cmp rbx, rax jnz short loc_69B77 jmp short loc_69B99 loc_69B96: mov rax, rbx loc_69B99: mov rcx, [r14+8] mov rbx, [rcx+8] loc_69BA1: cmp rax, rbx jz short loc_69C15 add rax, 20h ; ' ' add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_69BB7: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov rdx, rsp mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_48] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_69C8E loc_69C15: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r12, [rsp+68h+var_58] mov [r12-10h], r12 mov rdi, r15 call _strlen lea rdx, [rax+r15] mov rdi, rsp mov rsi, r15 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 rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 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_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_69C8E: mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_69CAC mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_69CAC: mov rdi, [rsp+68h+var_68] cmp rdi, r12 jz short loc_69CF7 mov rsi, [rsp+68h+var_58] jmp short loc_69CEF mov r14, rax mov rdi, [rsp+68h+var_68]; void * cmp rdi, r12 jz short loc_69D01 mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_69D01 jmp short loc_69CFE mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_69CF7 mov rsi, [rsp+68h+var_38] loc_69CEF: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_69CF7: test bpl, bpl jnz short loc_69D01 jmp short loc_69D09 loc_69CFE: mov r14, rax loc_69D01: mov rdi, rbx; void * call ___cxa_free_exception loc_69D09: mov rdi, r14 call __Unwind_Resume
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x00169bb7 MOV R15,RSI MOV R12,qword ptr [R14 + 0x8] MOV RBX,qword ptr [R12] MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JZ 0x00169ba1 LAB_00169b77: MOV RDI,RBX MOV RSI,R15 CALL 0x001181a0 TEST EAX,EAX JZ 0x00169b96 ADD RBX,0x30 MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JNZ 0x00169b77 JMP 0x00169b99 LAB_00169b96: MOV RAX,RBX LAB_00169b99: MOV RCX,qword ptr [R14 + 0x8] MOV RBX,qword ptr [RCX + 0x8] LAB_00169ba1: CMP RAX,RBX JZ 0x00169c15 ADD RAX,0x20 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00169bb7: MOV EDI,0x20 CALL 0x00118360 MOV RBX,RAX MOV RDI,R14 CALL 0x0013e096 MOV RDX,RSP MOV qword ptr [RDX],RAX LAB_00169bd2: LEA RSI,[0x1bc773] LEA RDI,[RSP + 0x20] CALL 0x0016f3e3 MOV BPL,0x1 LAB_00169be6: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x0013de42 XOR EBP,EBP LEA RSI,[0x1ee2b8] LEA RDX,[0x14c3b0] MOV RDI,RBX CALL 0x00118b30 LAB_00169c15: MOV EDI,0x20 CALL 0x00118360 MOV RBX,RAX LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 MOV RDI,R15 CALL 0x00118310 LEA RDX,[RAX + R15*0x1] LAB_00169c38: MOV RDI,RSP MOV RSI,R15 CALL 0x001590a2 LAB_00169c43: LEA RSI,[0x1bc99f] LEA RCX,[0x1bc9a5] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x0016f9be MOV BPL,0x1 LAB_00169c61: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x0016fd36 XOR EBP,EBP LEA RSI,[0x1ee3a0] LEA RDX,[0x14c3b0] MOV RDI,RBX CALL 0x00118b30
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { long *plVar1; int iVar2; char *pcVar3; int8 uVar4; size_t sVar5; char *pcVar6; char *local_68 [2]; char local_58 [16]; detail local_48 [32]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 00169bd2 to 00169be2 has its CatchHandler @ 00169cfe */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (local_48,"cannot use at() with ",local_68); /* try { // try from 00169be6 to 00169c12 has its CatchHandler @ 00169cd9 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x130,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } plVar1 = *(long **)(param_1 + 8); pcVar6 = (char *)*plVar1; pcVar3 = (char *)plVar1[1]; if (pcVar6 != pcVar3) { do { pcVar3 = pcVar6; iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) break; pcVar6 = pcVar3 + 0x30; pcVar3 = (char *)plVar1[1]; } while (pcVar6 != pcVar3); pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8); } if (pcVar3 == pcVar6) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = local_58; sVar5 = strlen(param_2); /* try { // try from 00169c38 to 00169c42 has its CatchHandler @ 00169cd7 */ std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5); /* try { // try from 00169c43 to 00169c5d has its CatchHandler @ 00169cbc */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (local_48,"key \'",(string *)local_68,"\' not found"); /* try { // try from 00169c61 to 00169c8d has its CatchHandler @ 00169c8e */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x193,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return pcVar3 + 0x20; }
4,643
wserver_handler_about2
navaro[P]qoraal-tictactoe/src/services/www/html/wabout.c
int32_t wserver_handler_about2(HTTP_USER_T *user, uint32_t method, char* endpoint) { #define ABOUT_CONTENT_SIZE 2048 static int i = 0 ; static const char about_start[] = \ "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\r\n" \ "<html><head>\r\n" \ "<meta http-equiv=\"refresh\" content=\"2; \">" "<title>" WSERVER_ABOUT_TEXT " About</title>\r\n" \ "</head><body>\r\n" \ "<H2>" WSERVER_ABOUT_TEXT " %d <H2>" ; static const char about_end[] = \ "\r\n</body></html>\r\n" ; static const char about_content[] = \ "abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890<br>\r\n" ; if (method == HTTP_HEADER_METHOD_GET) { if (ABOUT_CONTENT_SIZE >= sizeof(about_content)) { char * send = qoraal_malloc(QORAAL_HeapAuxiliary, ABOUT_CONTENT_SIZE) ; if (send) { uint32_t len = 0 ; sprintf (send, about_start, i++) ; len = strlen(send); while ((unsigned int)len <= ABOUT_CONTENT_SIZE - sizeof(about_content)) { strcpy (&send[len], about_content) ; len += sizeof(about_content) - 1 ; } strncpy (&send[len], about_end, ABOUT_CONTENT_SIZE - len) ; len = strlen(send) ; httpserver_write_response (user, 200, HTTP_SERVER_CONTENT_TYPE_HTML, 0, 0, send, len) ; qoraal_free(QORAAL_HeapAuxiliary, send) ; } else { return HTTP_SERVER_E_MEMORY ; } } } else { return HTTP_SERVER_WSERVER_E_METHOD ; } return HTTP_SERVER_WSERVER_E_OK ; }
O3
c
wserver_handler_about2: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl $0xffffffff, %r14d # imm = 0xFFFFFFFF cmpl $0x1, %esi jne 0x128c1 movq %rdi, %rbx movl $0x800, %esi # imm = 0x800 movl $0x1, %edi callq 0x14229 testq %rax, %rax je 0x128bb movq %rax, %r15 movl 0x2e0ed(%rip), %edx # 0x40900 leal 0x1(%rdx), %eax movl %eax, 0x2e0e4(%rip) # 0x40900 leaq 0x150ad(%rip), %rsi # 0x278d0 xorl %r14d, %r14d movq %r15, %rdi xorl %eax, %eax callq 0x64e0 movq %r15, %rdi callq 0x61a0 movl %eax, %r13d cmpq $0x7b1, %r13 # imm = 0x7B1 ja 0x1286c leaq 0x16b95(%rip), %r12 # 0x293e0 leaq (%r15,%r13), %rdi movl $0x4f, %edx movq %r12, %rsi callq 0x6340 leaq 0x4e(%r13), %rax cmpq $0x764, %r13 # imm = 0x764 movq %rax, %r13 jb 0x1284b movq %r15, %rdi addq %r13, %rdi movl $0x800, %edx # imm = 0x800 subl %eax, %edx leaq 0x15110(%rip), %rsi # 0x27990 callq 0x6090 movq %r15, %rdi callq 0x61a0 movl %eax, (%rsp) leaq 0x14efe(%rip), %rdx # 0x27795 movq %rbx, %rdi movl $0xc8, %esi xorl %ecx, %ecx xorl %r8d, %r8d movq %r15, %r9 callq 0x1d7ed movl $0x1, %edi movq %r15, %rsi callq 0x14243 jmp 0x128c1 movl $0xfffffffa, %r14d # imm = 0xFFFFFFFA movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
wserver_handler_about2: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14d, 0FFFFFFFFh cmp esi, 1 jnz loc_128C1 mov rbx, rdi mov esi, 800h mov edi, 1 call qoraal_malloc test rax, rax jz loc_128BB mov r15, rax mov edx, cs:wserver_handler_about2_i lea eax, [rdx+1] mov cs:wserver_handler_about2_i, eax lea rsi, wserver_handler_about2_about_start; "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HT"... xor r14d, r14d mov rdi, r15 xor eax, eax call _sprintf mov rdi, r15 call _strlen mov r13d, eax cmp r13, 7B1h ja short loc_1286C lea r12, wserver_handler_about2_about_content; "abcdefghijklmnopqrstuvwxyz1234567890abc"... loc_1284B: lea rdi, [r15+r13] mov edx, 4Fh ; 'O' mov rsi, r12 call _memcpy lea rax, [r13+4Eh] cmp r13, 764h mov r13, rax jb short loc_1284B loc_1286C: mov rdi, r15 add rdi, r13 mov edx, 800h sub edx, eax lea rsi, wserver_handler_about2_about_end; "\r\n</body></html>\r\n" call _strncpy mov rdi, r15 call _strlen mov [rsp+30h+var_30], eax lea rdx, aTextHtml; "text/html" mov rdi, rbx mov esi, 0C8h xor ecx, ecx xor r8d, r8d mov r9, r15 call httpserver_write_response mov edi, 1 mov rsi, r15 call qoraal_free jmp short loc_128C1 loc_128BB: mov r14d, 0FFFFFFFAh loc_128C1: mov eax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long wserver_handler_about2(int a1, int a2) { unsigned int v2; // r14d long long v3; // rax long long v4; // r15 int v5; // edx unsigned int v6; // eax unsigned long long v7; // r13 bool v8; // cf int v9; // eax v2 = -1; if ( a2 == 1 ) { v3 = qoraal_malloc(1LL, 2048LL); if ( v3 ) { v4 = v3; v5 = wserver_handler_about2_i++; v2 = 0; sprintf( v3, "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\r\n" "<html><head>\r\n" "<meta http-equiv=\"refresh\" content=\"2; \"><title>Qoraal About About</title>\r\n" "</head><body>\r\n" "<H2>Qoraal About %d <H2>", v5); v6 = strlen(v4); v7 = v6; if ( v6 <= 0x7B1uLL ) { do { memcpy(v4 + v7, wserver_handler_about2_about_content, 79LL); v6 = v7 + 78; v8 = v7 < 0x764; v7 += 78LL; } while ( v8 ); } strncpy(v7 + v4, wserver_handler_about2_about_end, 2048 - v6); v9 = strlen(v4); httpserver_write_response(a1, 200, (unsigned int)aTextHtml, 0, 0, v4, v9); qoraal_free(1LL, v4); } else { return (unsigned int)-6; } } return v2; }
wserver_handler_about2: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14D,0xffffffff CMP ESI,0x1 JNZ 0x001128c1 MOV RBX,RDI MOV ESI,0x800 MOV EDI,0x1 CALL 0x00114229 TEST RAX,RAX JZ 0x001128bb MOV R15,RAX MOV EDX,dword ptr [0x00140900] LEA EAX,[RDX + 0x1] MOV dword ptr [0x00140900],EAX LEA RSI,[0x1278d0] XOR R14D,R14D MOV RDI,R15 XOR EAX,EAX CALL 0x001064e0 MOV RDI,R15 CALL 0x001061a0 MOV R13D,EAX CMP R13,0x7b1 JA 0x0011286c LEA R12,[0x1293e0] LAB_0011284b: LEA RDI,[R15 + R13*0x1] MOV EDX,0x4f MOV RSI,R12 CALL 0x00106340 LEA RAX,[R13 + 0x4e] CMP R13,0x764 MOV R13,RAX JC 0x0011284b LAB_0011286c: MOV RDI,R15 ADD RDI,R13 MOV EDX,0x800 SUB EDX,EAX LEA RSI,[0x127990] CALL 0x00106090 MOV RDI,R15 CALL 0x001061a0 MOV dword ptr [RSP],EAX LEA RDX,[0x127795] MOV RDI,RBX MOV ESI,0xc8 XOR ECX,ECX XOR R8D,R8D MOV R9,R15 CALL 0x0011d7ed MOV EDI,0x1 MOV RSI,R15 CALL 0x00114243 JMP 0x001128c1 LAB_001128bb: MOV R14D,0xfffffffa LAB_001128c1: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 wserver_handler_about2(int8 param_1,int param_2) { int8 in_RAX; char *__s; size_t sVar1; ulong uVar2; int8 uVar3; bool bVar4; int4 uVar5; uVar3 = 0xffffffff; if (param_2 == 1) { __s = (char *)qoraal_malloc(1,0x800); if (__s == (char *)0x0) { uVar3 = 0xfffffffa; } else { wserver_handler_about2_i = wserver_handler_about2_i + 1; uVar3 = 0; sprintf(__s,wserver_handler_about2_about_start); sVar1 = strlen(__s); uVar5 = (int4)((ulong)in_RAX >> 0x20); uVar2 = sVar1 & 0xffffffff; if (uVar2 < 0x7b2) { do { memcpy(__s + uVar2,wserver_handler_about2_about_content,0x4f); uVar5 = (int4)((ulong)in_RAX >> 0x20); sVar1 = uVar2 + 0x4e; bVar4 = uVar2 < 0x764; uVar2 = sVar1; } while (bVar4); } strncpy(__s + uVar2,wserver_handler_about2_about_end,(ulong)(0x800 - (int)sVar1)); sVar1 = strlen(__s); httpserver_write_response(param_1,200,s_text_html_00127795,0,0,__s,CONCAT44(uVar5,(int)sVar1)) ; qoraal_free(1,__s); } } return uVar3; }
4,644
R3D_SetMaterialOcclusion
r3d/src/r3d_utils.c
void R3D_SetMaterialOcclusion(Material* material, Texture2D* texture, float value) { if (material == NULL) { return; } MaterialMap* map = &material->maps[MATERIAL_MAP_OCCLUSION]; if (texture != NULL) { map->texture = *texture; } else if (map->texture.id == 0) { map->texture = R3D_GetWhiteTexture(); } map->value = value; }
O3
c
R3D_SetMaterialOcclusion: testq %rdi, %rdi je 0xbe68c pushq %rbp movq %rsp, %rbp movq 0x10(%rdi), %rax leaq 0x70(%rax), %rcx testq %rsi, %rsi je 0xbe663 movl 0x10(%rsi), %edx movl %edx, 0x10(%rcx) movups (%rsi), %xmm1 movups %xmm1, (%rcx) jmp 0xbe683 cmpl $0x0, (%rcx) jne 0xbe683 leaq 0xf1941(%rip), %rcx # 0x1affb0 movl 0x1530(%rcx), %ecx movl %ecx, 0x70(%rax) movaps 0x22f21(%rip), %xmm1 # 0xe15a0 movups %xmm1, 0x74(%rax) movss %xmm0, 0x88(%rax) popq %rbp retq
R3D_SetMaterialOcclusion: test rdi, rdi jz short locret_BE68C push rbp mov rbp, rsp mov rax, [rdi+10h] lea rcx, [rax+70h] test rsi, rsi jz short loc_BE663 mov edx, [rsi+10h] mov [rcx+10h], edx movups xmm1, xmmword ptr [rsi] movups xmmword ptr [rcx], xmm1 jmp short loc_BE683 loc_BE663: cmp dword ptr [rcx], 0 jnz short loc_BE683 lea rcx, R3D mov ecx, [rcx+1530h] mov [rax+70h], ecx movaps xmm1, cs:xmmword_E15A0 movups xmmword ptr [rax+74h], xmm1 loc_BE683: movss dword ptr [rax+88h], xmm0 pop rbp locret_BE68C: retn
void R3D_SetMaterialOcclusion(long long a1, long long a2, float a3) { long long v3; // rax _OWORD *v4; // rcx if ( a1 ) { v3 = *(_QWORD *)(a1 + 16); v4 = (_OWORD *)(v3 + 112); if ( a2 ) { *(_DWORD *)(v3 + 128) = *(_DWORD *)(a2 + 16); *v4 = *(_OWORD *)a2; } else if ( !*(_DWORD *)v4 ) { *(_DWORD *)(v3 + 112) = *((_DWORD *)&R3D + 1356); *(_OWORD *)(v3 + 116) = xmmword_E15A0; } *(float *)(v3 + 136) = a3; } }
R3D_SetMaterialOcclusion: TEST RDI,RDI JZ 0x001be68c PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI + 0x10] LEA RCX,[RAX + 0x70] TEST RSI,RSI JZ 0x001be663 MOV EDX,dword ptr [RSI + 0x10] MOV dword ptr [RCX + 0x10],EDX MOVUPS XMM1,xmmword ptr [RSI] MOVUPS xmmword ptr [RCX],XMM1 JMP 0x001be683 LAB_001be663: CMP dword ptr [RCX],0x0 JNZ 0x001be683 LEA RCX,[0x2affb0] MOV ECX,dword ptr [RCX + 0x1530] MOV dword ptr [RAX + 0x70],ECX MOVAPS XMM1,xmmword ptr [0x001e15a0] MOVUPS xmmword ptr [RAX + 0x74],XMM1 LAB_001be683: MOVSS dword ptr [RAX + 0x88],XMM0 POP RBP LAB_001be68c: RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void R3D_SetMaterialOcclusion(int4 param_1,long param_2,int8 *param_3) { long lVar1; int8 uVar2; if (param_2 != 0) { lVar1 = *(long *)(param_2 + 0x10); if (param_3 == (int8 *)0x0) { if (*(int *)(lVar1 + 0x70) == 0) { *(int4 *)(lVar1 + 0x70) = DAT_002b14e0; uVar2 = _UNK_001e15a8; *(int8 *)(lVar1 + 0x74) = _DAT_001e15a0; *(int8 *)(lVar1 + 0x7c) = uVar2; } } else { *(int4 *)(lVar1 + 0x80) = *(int4 *)(param_3 + 2); uVar2 = param_3[1]; *(int8 *)(lVar1 + 0x70) = *param_3; *(int8 *)(lVar1 + 0x78) = uVar2; } *(int4 *)(lVar1 + 0x88) = param_1; } return; }
4,645
common_init()
monkey531[P]llama/common/common.cpp
void common_init() { llama_log_set([](ggml_log_level level, const char * text, void * /*user_data*/) { if (LOG_DEFAULT_LLAMA <= common_log_verbosity_thold) { common_log_add(common_log_main(), level, "%s", text); } }, NULL); #ifdef NDEBUG const char * build_type = ""; #else const char * build_type = " (debug)"; #endif LOG_INF("build: %d (%s) with %s for %s%s\n", LLAMA_BUILD_NUMBER, LLAMA_COMMIT, LLAMA_COMPILER, LLAMA_BUILD_TARGET, build_type); }
O2
cpp
common_init(): pushq %rax leaq 0x44f4(%rip), %rdi # 0x279f4 xorl %esi, %esi callq 0x20c30 leaq 0xadb12(%rip), %rax # 0xd1020 cmpl $0x0, (%rax) js 0x2355e callq 0x70132 leaq 0xad5f1(%rip), %rcx # 0xd0b10 movl (%rcx), %ecx leaq 0xad5f0(%rip), %rdx # 0xd0b18 movq (%rdx), %r8 leaq 0xad5ee(%rip), %rdx # 0xd0b20 movq (%rdx), %r9 leaq 0xad5ec(%rip), %r10 # 0xd0b28 leaq 0x69872(%rip), %r11 # 0x8cdb5 leaq 0x69897(%rip), %rdx # 0x8cde1 pushq $0x2 popq %rsi movq %rax, %rdi xorl %eax, %eax pushq %r11 pushq (%r10) callq 0x701ca popq %rax popq %rcx popq %rax retq
_Z11common_initv: push rax lea rdi, _ZZ11common_initvEN3$_08__invokeE14ggml_log_levelPKcPv; common_init(void)::$_0::__invoke(ggml_log_level,char const*,void *) xor esi, esi call _llama_log_set lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_2355E call _Z15common_log_mainv; common_log_main(void) lea rcx, LLAMA_BUILD_NUMBER mov ecx, [rcx] lea rdx, LLAMA_COMMIT mov r8, [rdx] lea rdx, LLAMA_COMPILER mov r9, [rdx] lea r10, LLAMA_BUILD_TARGET lea r11, aEndIndexOutOfB+19h; "" lea rdx, aBuildDSWithSFo; "build: %d (%s) with %s for %s%s\n" push 2 pop rsi mov rdi, rax xor eax, eax push r11 push qword ptr [r10] call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) pop rax pop rcx loc_2355E: pop rax retn
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> common_init(void) { int v0; // eax llama_log_set(common_init(void)::$_0::__invoke, 0LL); if ( common_log_verbosity_thold >= 0 ) { v0 = common_log_main(); common_log_add( v0, 2, (unsigned int)"build: %d (%s) with %s for %s%s\n", LLAMA_BUILD_NUMBER, LLAMA_COMMIT[0], LLAMA_COMPILER[0]); } }
common_init: PUSH RAX LEA RDI,[0x1279f4] XOR ESI,ESI CALL 0x00120c30 LEA RAX,[0x1d1020] CMP dword ptr [RAX],0x0 JS 0x0012355e CALL 0x00170132 LEA RCX,[0x1d0b10] MOV ECX,dword ptr [RCX] LEA RDX,[0x1d0b18] MOV R8,qword ptr [RDX] LEA RDX,[0x1d0b20] MOV R9,qword ptr [RDX] LEA R10,[0x1d0b28] LEA R11,[0x18cdb5] LEA RDX,[0x18cde1] PUSH 0x2 POP RSI MOV RDI,RAX XOR EAX,EAX PUSH R11 PUSH qword ptr [R10] CALL 0x001701ca POP RAX POP RCX LAB_0012355e: POP RAX RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* common_init() */ int8 common_init(void) { int8 in_RAX; int8 uVar1; llama_log_set(common_init()::$_0::__invoke,0); if (-1 < common_log_verbosity_thold) { uVar1 = common_log_main(); common_log_add(uVar1,2,"build: %d (%s) with %s for %s%s\n",LLAMA_BUILD_NUMBER,LLAMA_COMMIT, LLAMA_COMPILER,LLAMA_BUILD_TARGET,""); } return in_RAX; }
4,646
ImPlot::ApplyNextPlotData(int)
zkingston[P]unknot/build_O1/_deps/implot-src/implot.cpp
void ApplyNextPlotData(ImAxis idx) { ImPlotContext& gp = *GImPlot; ImPlotPlot& plot = *gp.CurrentPlot; ImPlotAxis& axis = plot.Axes[idx]; if (!axis.Enabled) return; double* npd_lmin = gp.NextPlotData.LinkedMin[idx]; double* npd_lmax = gp.NextPlotData.LinkedMax[idx]; bool npd_rngh = gp.NextPlotData.HasRange[idx]; ImPlotCond npd_rngc = gp.NextPlotData.RangeCond[idx]; ImPlotRange npd_rngv = gp.NextPlotData.Range[idx]; axis.LinkedMin = npd_lmin; axis.LinkedMax = npd_lmax; axis.PullLinks(); if (npd_rngh) { if (!plot.Initialized || npd_rngc == ImPlotCond_Always) axis.SetRange(npd_rngv); } axis.HasRange = npd_rngh; axis.RangeCond = npd_rngc; }
O1
cpp
ImPlot::ApplyNextPlotData(int): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x18, %rsp movq 0x27e91c(%rip), %rax # 0x336ca0 movq 0x50(%rax), %r15 movslq %edi, %rcx imulq $0x178, %rcx, %rdx # imm = 0x178 cmpb $0x1, 0x184(%r15,%rdx) jne 0xb8436 leaq (%r15,%rdx), %rbx addq $0x18, %rbx movq 0x4d8(%rax,%rcx,8), %rdx movq 0x508(%rax,%rcx,8), %rsi movb 0x4c8(%rax,%rcx), %bpl movl 0x450(%rax,%rcx,4), %r14d shlq $0x4, %rcx movsd 0x468(%rax,%rcx), %xmm0 movsd %xmm0, 0x10(%rsp) movsd 0x470(%rax,%rcx), %xmm0 movsd %xmm0, 0x8(%rsp) movq %rdx, 0xc0(%rbx) movq %rsi, 0xc8(%rbx) movq %rbx, %rdi callq 0xc873e cmpb $0x1, %bpl jne 0xb842b cmpl $0x1, %r14d setne %al testb %al, 0x9dd(%r15) jne 0xb842b movq %rbx, %rdi movsd 0x10(%rsp), %xmm0 movsd 0x8(%rsp), %xmm1 callq 0xc82a4 movb %bpl, 0x16f(%rbx) movl %r14d, 0x20(%rbx) addq $0x18, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_ZN6ImPlot17ApplyNextPlotDataEi: push rbp push r15 push r14 push rbx sub rsp, 18h mov rax, cs:GImPlot mov r15, [rax+50h] movsxd rcx, edi imul rdx, rcx, 178h cmp byte ptr [r15+rdx+184h], 1 jnz loc_B8436 lea rbx, [r15+rdx] add rbx, 18h mov rdx, [rax+rcx*8+4D8h] mov rsi, [rax+rcx*8+508h] mov bpl, [rax+rcx+4C8h] mov r14d, [rax+rcx*4+450h] shl rcx, 4 movsd xmm0, qword ptr [rax+rcx+468h] movsd [rsp+38h+var_28], xmm0 movsd xmm0, qword ptr [rax+rcx+470h] movsd [rsp+38h+var_30], xmm0 mov [rbx+0C0h], rdx mov [rbx+0C8h], rsi mov rdi, rbx; this call _ZN10ImPlotAxis9PullLinksEv; ImPlotAxis::PullLinks(void) cmp bpl, 1 jnz short loc_B842B cmp r14d, 1 setnz al test [r15+9DDh], al jnz short loc_B842B mov rdi, rbx; this movsd xmm0, [rsp+38h+var_28]; double movsd xmm1, [rsp+38h+var_30]; double call _ZN10ImPlotAxis8SetRangeEdd; ImPlotAxis::SetRange(double,double) loc_B842B: mov [rbx+16Fh], bpl mov [rbx+20h], r14d loc_B8436: add rsp, 18h pop rbx pop r14 pop r15 pop rbp retn
char ImPlot::ApplyNextPlotData(ImPlot *this) { char result; // al long long v2; // r15 long long v3; // rdx long long v4; // rbx long long v5; // rsi char v6; // bp int v7; // r14d long long v8; // rcx double v9; // [rsp+8h] [rbp-30h] double v10; // [rsp+10h] [rbp-28h] result = (char)GImPlot; v2 = *((_QWORD *)GImPlot + 10); v3 = 376LL * (int)this; if ( *(_BYTE *)(v2 + v3 + 388) == 1 ) { v4 = v2 + v3 + 24; v5 = *((_QWORD *)GImPlot + (int)this + 161); v6 = *((_BYTE *)GImPlot + (int)this + 1224); v7 = *((_DWORD *)GImPlot + (int)this + 276); v8 = 16LL * (int)this; v10 = *(double *)((char *)GImPlot + v8 + 1128); v9 = *(double *)((char *)GImPlot + v8 + 1136); *(_QWORD *)(v4 + 192) = *((_QWORD *)GImPlot + (int)this + 155); *(_QWORD *)(v4 + 200) = v5; result = ImPlotAxis::PullLinks((ImPlotAxis *)v4); if ( v6 == 1 ) { result = v7 != 1; if ( ((v7 != 1) & *(_BYTE *)(v2 + 2525)) == 0 ) result = ImPlotAxis::SetRange((ImPlotAxis *)v4, v10, v9); } *(_BYTE *)(v4 + 367) = v6; *(_DWORD *)(v4 + 32) = v7; } return result; }
ApplyNextPlotData: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x18 MOV RAX,qword ptr [0x00436ca0] MOV R15,qword ptr [RAX + 0x50] MOVSXD RCX,EDI IMUL RDX,RCX,0x178 CMP byte ptr [R15 + RDX*0x1 + 0x184],0x1 JNZ 0x001b8436 LEA RBX,[R15 + RDX*0x1] ADD RBX,0x18 MOV RDX,qword ptr [RAX + RCX*0x8 + 0x4d8] MOV RSI,qword ptr [RAX + RCX*0x8 + 0x508] MOV BPL,byte ptr [RAX + RCX*0x1 + 0x4c8] MOV R14D,dword ptr [RAX + RCX*0x4 + 0x450] SHL RCX,0x4 MOVSD XMM0,qword ptr [RAX + RCX*0x1 + 0x468] MOVSD qword ptr [RSP + 0x10],XMM0 MOVSD XMM0,qword ptr [RAX + RCX*0x1 + 0x470] MOVSD qword ptr [RSP + 0x8],XMM0 MOV qword ptr [RBX + 0xc0],RDX MOV qword ptr [RBX + 0xc8],RSI MOV RDI,RBX CALL 0x001c873e CMP BPL,0x1 JNZ 0x001b842b CMP R14D,0x1 SETNZ AL TEST byte ptr [R15 + 0x9dd],AL JNZ 0x001b842b MOV RDI,RBX MOVSD XMM0,qword ptr [RSP + 0x10] MOVSD XMM1,qword ptr [RSP + 0x8] CALL 0x001c82a4 LAB_001b842b: MOV byte ptr [RBX + 0x16f],BPL MOV dword ptr [RBX + 0x20],R14D LAB_001b8436: ADD RSP,0x18 POP RBX POP R14 POP R15 POP RBP RET
/* ImPlot::ApplyNextPlotData(int) */ void ImPlot::ApplyNextPlotData(int param_1) { long lVar1; double dVar2; double dVar3; char cVar4; int iVar5; long lVar6; int8 uVar7; long lVar8; lVar6 = *(long *)(GImPlot + 0x50); lVar8 = (long)param_1; if (*(char *)(lVar6 + 0x184 + lVar8 * 0x178) == '\x01') { lVar1 = lVar6 + lVar8 * 0x178; uVar7 = *(int8 *)(GImPlot + 0x508 + lVar8 * 8); cVar4 = *(char *)(GImPlot + 0x4c8 + lVar8); iVar5 = *(int *)(GImPlot + 0x450 + lVar8 * 4); dVar2 = *(double *)(GImPlot + 0x468 + lVar8 * 0x10); dVar3 = *(double *)(GImPlot + 0x470 + lVar8 * 0x10); *(int8 *)(lVar1 + 0xd8) = *(int8 *)(GImPlot + 0x4d8 + lVar8 * 8); *(int8 *)(lVar1 + 0xe0) = uVar7; ImPlotAxis::PullLinks((ImPlotAxis *)(lVar1 + 0x18)); if ((cVar4 == '\x01') && ((*(byte *)(lVar6 + 0x9dd) & iVar5 != 1) == 0)) { ImPlotAxis::SetRange((ImPlotAxis *)(lVar1 + 0x18),dVar2,dVar3); } *(char *)(lVar1 + 0x187) = cVar4; *(int *)(lVar1 + 0x38) = iVar5; } return; }
4,647
nglog::(anonymous namespace)::LogFileObject::FlushUnlocked(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&)
ng-log[P]ng-log/src/logging.cc
void LogFileObject::FlushUnlocked( const std::chrono::system_clock::time_point& now) { if (file_ != nullptr) { fflush(file_.get()); bytes_since_flush_ = 0; } // Figure out when we are due for another flush. next_flush_time_ = now + std::chrono::duration_cast<std::chrono::system_clock::duration>( std::chrono::duration<int32>{FLAGS_logbufsecs}); }
O0
cpp
nglog::(anonymous namespace)::LogFileObject::FlushUnlocked(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x30(%rbp) addq $0x98, %rdi xorl %eax, %eax movl %eax, %esi callq 0x1f570 testb $0x1, %al jne 0x1b21e jmp 0x1b244 movq -0x30(%rbp), %rdi addq $0x98, %rdi callq 0x10b10 movq %rax, %rdi callq 0x98b0 movq -0x30(%rbp), %rax movl $0x0, 0xa4(%rax) movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) leaq -0x24(%rbp), %rdi leaq 0x5ca89(%rip), %rsi # 0x77ce0 callq 0x1f4b0 leaq -0x24(%rbp), %rdi callq 0x1f5f0 movq -0x38(%rbp), %rdi movq %rax, -0x20(%rbp) leaq -0x20(%rbp), %rsi callq 0x1f5a0 movq %rax, %rcx movq -0x30(%rbp), %rax movq %rcx, -0x18(%rbp) movq -0x18(%rbp), %rcx movq %rcx, 0xb8(%rax) addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN5nglog12_GLOBAL__N_113LogFileObject13FlushUnlockedERKNSt6chrono10time_pointINS2_3_V212system_clockENS2_8durationIlSt5ratioILl1ELl1000000000EEEEEE: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_8] mov [rbp+var_30], rdi add rdi, 98h xor eax, eax mov esi, eax call _ZStneI8_IO_FILESt14default_deleteIS0_EEbRKSt10unique_ptrIT_T0_EDn; std::operator!=<_IO_FILE,std::default_delete<_IO_FILE>>(std::unique_ptr<_IO_FILE> const&,decltype(nullptr)) test al, 1 jnz short loc_1B21E jmp short loc_1B244 loc_1B21E: mov rdi, [rbp+var_30] add rdi, 98h call _ZNKSt10unique_ptrI8_IO_FILESt14default_deleteIS0_EE3getEv; std::unique_ptr<_IO_FILE>::get(void) mov rdi, rax call _fflush mov rax, [rbp+var_30] mov dword ptr [rax+0A4h], 0 loc_1B244: mov rax, [rbp+var_10] mov [rbp+var_38], rax lea rdi, [rbp+var_24] lea rsi, _ZN3fLI16FLAGS_logbufsecsE; fLI::FLAGS_logbufsecs call _ZNSt6chrono8durationIiSt5ratioILl1ELl1EEEC2IivEERKT_; std::chrono::duration<int,std::ratio<1l,1l>>::duration<int,void>(int const&) lea rdi, [rbp+var_24] call _ZNSt6chrono13duration_castINS_8durationIlSt5ratioILl1ELl1000000000EEEEiS2_ILl1ELl1EEEENSt9enable_ifIXsr13__is_durationIT_EE5valueES7_E4typeERKNS1_IT0_T1_EE mov rdi, [rbp+var_38] mov [rbp+var_20], rax lea rsi, [rbp+var_20] call _ZNSt6chronoplINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEElS5_EENS_10time_pointIT_NSt11common_typeIJT0_NS3_IT1_T2_EEEE4typeEEERKNS7_IS8_SA_EERKSD_; std::chrono::operator+<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>,long,std::ratio<1l,1000000000l>>(std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&,std::chrono::duration<long,std::ratio<1l,1000000000l>> const&) mov rcx, rax mov rax, [rbp+var_30] mov [rbp+var_18], rcx mov rcx, [rbp+var_18] mov [rax+0B8h], rcx add rsp, 40h pop rbp retn
long long nglog::`anonymous namespace'::LogFileObject::FlushUnlocked(long long a1, long long a2) { long long v2; // rax long long v3; // rcx long long result; // rax long long v5; // [rsp+8h] [rbp-38h] _BYTE v6[4]; // [rsp+1Ch] [rbp-24h] BYREF long long v7; // [rsp+20h] [rbp-20h] BYREF long long v8; // [rsp+30h] [rbp-10h] long long v9; // [rsp+38h] [rbp-8h] v9 = a1; v8 = a2; if ( (std::operator!=<_IO_FILE,std::default_delete<_IO_FILE>>(a1 + 152, 0LL) & 1) != 0 ) { v2 = std::unique_ptr<_IO_FILE>::get(); fflush(v2, 0LL); *(_DWORD *)(a1 + 164) = 0; } v5 = v8; std::chrono::duration<int,std::ratio<1l,1l>>::duration<int,void>(v6, &fLI::FLAGS_logbufsecs); v7 = std::chrono::duration_cast<std::chrono::duration<long,std::ratio<1l,1000000000l>>,int,std::ratio<1l,1l>>(v6); v3 = std::chrono::operator+<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>,long,std::ratio<1l,1000000000l>>( v5, &v7); result = a1; *(_QWORD *)(a1 + 184) = v3; return result; }
FlushUnlocked: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x30],RDI ADD RDI,0x98 XOR EAX,EAX MOV ESI,EAX CALL 0x0011f570 TEST AL,0x1 JNZ 0x0011b21e JMP 0x0011b244 LAB_0011b21e: MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0x98 CALL 0x00110b10 MOV RDI,RAX CALL 0x001098b0 MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0xa4],0x0 LAB_0011b244: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX LEA RDI,[RBP + -0x24] LEA RSI,[0x177ce0] CALL 0x0011f4b0 LEA RDI,[RBP + -0x24] CALL 0x0011f5f0 MOV RDI,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x20],RAX LEA RSI,[RBP + -0x20] CALL 0x0011f5a0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x18],RCX MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0xb8],RCX ADD RSP,0x40 POP RBP RET
/* nglog::(anonymous namespace)::LogFileObject::FlushUnlocked(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) */ void __thiscall nglog::(anonymous_namespace)::LogFileObject::FlushUnlocked(LogFileObject *this,time_point *param_1) { time_point *ptVar1; bool bVar2; FILE *__stream; int8 uVar3; duration<int,std::ratio<1l,1l>> local_2c [4]; int8 local_28 [2]; time_point *local_18; LogFileObject *local_10; local_18 = param_1; local_10 = this; bVar2 = std::operator!=((unique_ptr *)(this + 0x98),(_func_decltype_nullptr *)0x0); if (bVar2) { __stream = (FILE *)std::unique_ptr<_IO_FILE,std::default_delete<_IO_FILE>>::get ((unique_ptr<_IO_FILE,std::default_delete<_IO_FILE>> *) (this + 0x98)); fflush(__stream); *(int4 *)(this + 0xa4) = 0; } ptVar1 = local_18; std::chrono::duration<int,std::ratio<1l,1l>>::duration<int,void>(local_2c,&fLI::FLAGS_logbufsecs); local_28[0] = std::chrono:: duration_cast<std::chrono::duration<long,std::ratio<1l,1000000000l>>,int,std::ratio<1l,1l>> ((duration *)local_2c); uVar3 = std::chrono::operator+(ptVar1,(duration *)local_28); *(int8 *)(this + 0xb8) = uVar3; return; }
4,648
nglog::(anonymous namespace)::LogFileObject::FlushUnlocked(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&)
ng-log[P]ng-log/src/logging.cc
void LogFileObject::FlushUnlocked( const std::chrono::system_clock::time_point& now) { if (file_ != nullptr) { fflush(file_.get()); bytes_since_flush_ = 0; } // Figure out when we are due for another flush. next_flush_time_ = now + std::chrono::duration_cast<std::chrono::system_clock::duration>( std::chrono::duration<int32>{FLAGS_logbufsecs}); }
O2
cpp
nglog::(anonymous namespace)::LogFileObject::FlushUnlocked(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x98(%rdi), %rdi testq %rdi, %rdi je 0xf762 callq 0x86c0 andl $0x0, 0xa4(%rbx) leaq 0x223c7(%rip), %rax # 0x31b30 movslq (%rax), %rax imulq $0x3b9aca00, %rax, %rax # imm = 0x3B9ACA00 addq (%r14), %rax movq %rax, 0xb8(%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN5nglog12_GLOBAL__N_113LogFileObject13FlushUnlockedERKNSt6chrono10time_pointINS2_3_V212system_clockENS2_8durationIlSt5ratioILl1ELl1000000000EEEEEE: push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rdi, [rdi+98h] test rdi, rdi jz short loc_F762 call _fflush and dword ptr [rbx+0A4h], 0 loc_F762: lea rax, _ZN3fLI16FLAGS_logbufsecsE; fLI::FLAGS_logbufsecs movsxd rax, dword ptr [rax] imul rax, 3B9ACA00h add rax, [r14] mov [rbx+0B8h], rax add rsp, 8 pop rbx pop r14 retn
long long nglog::`anonymous namespace'::LogFileObject::FlushUnlocked(long long a1, _QWORD *a2) { long long v3; // rdi long long result; // rax v3 = *(_QWORD *)(a1 + 152); if ( v3 ) { fflush(v3); *(_DWORD *)(a1 + 164) = 0; } result = *a2 + 1000000000LL * fLI::FLAGS_logbufsecs; *(_QWORD *)(a1 + 184) = result; return result; }
FlushUnlocked: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x98] TEST RDI,RDI JZ 0x0010f762 CALL 0x001086c0 AND dword ptr [RBX + 0xa4],0x0 LAB_0010f762: LEA RAX,[0x131b30] MOVSXD RAX,dword ptr [RAX] IMUL RAX,RAX,0x3b9aca00 ADD RAX,qword ptr [R14] MOV qword ptr [RBX + 0xb8],RAX ADD RSP,0x8 POP RBX POP R14 RET
/* nglog::(anonymous namespace)::LogFileObject::FlushUnlocked(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) */ void __thiscall nglog::(anonymous_namespace)::LogFileObject::FlushUnlocked(LogFileObject *this,time_point *param_1) { if (*(FILE **)(this + 0x98) != (FILE *)0x0) { fflush(*(FILE **)(this + 0x98)); *(int4 *)(this + 0xa4) = 0; } *(long *)(this + 0xb8) = (long)fLI::FLAGS_logbufsecs * 1000000000 + *(long *)param_1; return; }
4,649
my_strnxfrm_simple_internal
eloqsql/strings/ctype-simple.c
size_t my_strnxfrm_simple_internal(CHARSET_INFO * cs, uchar *dst, size_t dstlen, uint *nweights, const uchar *src, size_t srclen) { const uchar *map= cs->sort_order; uchar *d0= dst; uint frmlen; if ((frmlen= (uint)MY_MIN(dstlen, *nweights)) > srclen) frmlen= (uint)srclen; if (dst != src) { const uchar *end; for (end= src + frmlen; src < end;) *dst++= map[*src++]; } else { const uchar *end; for (end= dst + frmlen; dst < end; dst++) *dst= map[(uchar) *dst]; } *nweights-= frmlen; return dst - d0; }
O3
c
my_strnxfrm_simple_internal: pushq %rbp movq %rsp, %rbp movq 0x58(%rdi), %rdi movl (%rcx), %eax cmpq %rdx, %rax cmovbel %eax, %edx cmpq %r9, %rdx cmovbel %edx, %r9d movq %rsi, %rax cmpq %r8, %rsi je 0xb4bf1 testq %r9, %r9 je 0xb4c10 leaq (%r8,%r9), %rdx movq %rsi, %rax movzbl (%r8), %r10d incq %r8 movb (%rdi,%r10), %r10b movb %r10b, (%rax) incq %rax cmpq %rdx, %r8 jb 0xb4bd9 jmp 0xb4c10 testq %r9, %r9 je 0xb4c10 leaq (%rsi,%r9), %rdx movq %rsi, %rax movzbl (%rax), %r8d movb (%rdi,%r8), %r8b movb %r8b, (%rax) incq %rax cmpq %rdx, %rax jb 0xb4bfd subl %r9d, (%rcx) subq %rsi, %rax popq %rbp retq
my_strnxfrm_simple_internal: push rbp mov rbp, rsp mov rdi, [rdi+58h] mov eax, [rcx] cmp rax, rdx cmovbe edx, eax cmp rdx, r9 cmovbe r9d, edx mov rax, rsi cmp rsi, r8 jz short loc_B4BF1 test r9, r9 jz short loc_B4C10 lea rdx, [r8+r9] mov rax, rsi loc_B4BD9: movzx r10d, byte ptr [r8] inc r8 mov r10b, [rdi+r10] mov [rax], r10b inc rax cmp r8, rdx jb short loc_B4BD9 jmp short loc_B4C10 loc_B4BF1: test r9, r9 jz short loc_B4C10 lea rdx, [rsi+r9] mov rax, rsi loc_B4BFD: movzx r8d, byte ptr [rax] mov r8b, [rdi+r8] mov [rax], r8b inc rax cmp rax, rdx jb short loc_B4BFD loc_B4C10: sub [rcx], r9d sub rax, rsi pop rbp retn
_BYTE * my_strnxfrm_simple_internal( long long a1, unsigned __int8 *a2, unsigned long long a3, _DWORD *a4, unsigned __int8 *a5, unsigned long long a6) { long long v6; // rdi unsigned long long v7; // rax unsigned __int8 *v8; // rax unsigned __int8 *v9; // rdx long long v10; // r10 v6 = *(_QWORD *)(a1 + 88); v7 = (unsigned int)*a4; if ( v7 <= a3 ) a3 = (unsigned int)v7; if ( a3 <= a6 ) a6 = (unsigned int)a3; v8 = a2; if ( a2 == a5 ) { if ( a6 ) { v8 = a2; do { *v8 = *(_BYTE *)(v6 + *v8); ++v8; } while ( v8 < &a2[a6] ); } } else if ( a6 ) { v9 = &a5[a6]; v8 = a2; do { v10 = *a5++; *v8++ = *(_BYTE *)(v6 + v10); } while ( a5 < v9 ); } *a4 -= a6; return (_BYTE *)(v8 - a2); }
my_strnxfrm_simple_internal: PUSH RBP MOV RBP,RSP MOV RDI,qword ptr [RDI + 0x58] MOV EAX,dword ptr [RCX] CMP RAX,RDX CMOVBE EDX,EAX CMP RDX,R9 CMOVBE R9D,EDX MOV RAX,RSI CMP RSI,R8 JZ 0x001b4bf1 TEST R9,R9 JZ 0x001b4c10 LEA RDX,[R8 + R9*0x1] MOV RAX,RSI LAB_001b4bd9: MOVZX R10D,byte ptr [R8] INC R8 MOV R10B,byte ptr [RDI + R10*0x1] MOV byte ptr [RAX],R10B INC RAX CMP R8,RDX JC 0x001b4bd9 JMP 0x001b4c10 LAB_001b4bf1: TEST R9,R9 JZ 0x001b4c10 LEA RDX,[RSI + R9*0x1] MOV RAX,RSI LAB_001b4bfd: MOVZX R8D,byte ptr [RAX] MOV R8B,byte ptr [RDI + R8*0x1] MOV byte ptr [RAX],R8B INC RAX CMP RAX,RDX JC 0x001b4bfd LAB_001b4c10: SUB dword ptr [RCX],R9D SUB RAX,RSI POP RBP RET
long my_strnxfrm_simple_internal (long param_1,byte *param_2,ulong param_3,uint *param_4,byte *param_5,ulong param_6) { byte *pbVar1; byte bVar2; long lVar3; byte *pbVar4; ulong uVar5; ulong uVar6; lVar3 = *(long *)(param_1 + 0x58); uVar5 = param_3 & 0xffffffff; if (*param_4 <= param_3) { uVar5 = (ulong)*param_4; } uVar6 = param_6 & 0xffffffff; if (uVar5 <= param_6) { uVar6 = uVar5; } pbVar4 = param_2; if (param_2 == param_5) { if (uVar6 != 0) { do { *pbVar4 = *(byte *)(lVar3 + (ulong)*pbVar4); pbVar4 = pbVar4 + 1; } while (pbVar4 < param_2 + uVar6); } } else if (uVar6 != 0) { pbVar1 = param_5 + uVar6; do { bVar2 = *param_5; param_5 = param_5 + 1; *pbVar4 = *(byte *)(lVar3 + (ulong)bVar2); pbVar4 = pbVar4 + 1; } while (param_5 < pbVar1); } *param_4 = *param_4 - (int)uVar6; return (long)pbVar4 - (long)param_2; }
4,650
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_object()
monkey531[P]llama/common/json.hpp
bool end_object() { JSON_ASSERT(!ref_stack.empty()); JSON_ASSERT(ref_stack.back()->is_object()); ref_stack.back()->set_parents(); ref_stack.pop_back(); return true; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_object(): pushq %rax movq 0x10(%rdi), %rax cmpq %rax, 0x8(%rdi) je 0x61a88 movq -0x8(%rax), %rcx cmpb $0x1, (%rcx) jne 0x61aa4 addq $-0x8, %rax movq %rax, 0x10(%rdi) movb $0x1, %al popq %rcx retq leaq 0x8a21a(%rip), %rdi # 0xebca9 leaq 0x8a25d(%rip), %rdx # 0xebcf3 leaq 0x8b20e(%rip), %rcx # 0xeccab movl $0x1aeb, %esi # imm = 0x1AEB jmp 0x61abe leaq 0x8a1fe(%rip), %rdi # 0xebca9 leaq 0x8a241(%rip), %rdx # 0xebcf3 leaq 0x8b1a0(%rip), %rcx # 0xecc59 movl $0x1aec, %esi # imm = 0x1AEC xorl %eax, %eax callq 0x1aeb0 nop
_ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10end_objectEv: push rax mov rax, [rdi+10h] cmp [rdi+8], rax jz short loc_61A88 mov rcx, [rax-8] cmp byte ptr [rcx], 1 jnz short loc_61AA4 add rax, 0FFFFFFFFFFFFFFF8h mov [rdi+10h], rax mov al, 1 pop rcx retn loc_61A88: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRefStackEmpty; "!ref_stack.empty()" mov esi, 1AEBh jmp short loc_61ABE loc_61AA4: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRefStackBackIs+20h; "ref_stack.back()->is_object()" mov esi, 1AECh loc_61ABE: xor eax, eax call _ggml_abort nop
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::end_object( long long a1) { long long v1; // rax long long v3; // rsi v1 = *(_QWORD *)(a1 + 16); if ( *(_QWORD *)(a1 + 8) == v1 ) { v3 = 6891LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 6891LL, "GGML_ASSERT(%s) failed", "!ref_stack.empty()"); } else { if ( **(_BYTE **)(v1 - 8) == 1 ) { *(_QWORD *)(a1 + 16) = v1 - 8; return 1; } v3 = 6892LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 6892LL, "GGML_ASSERT(%s) failed", "ref_stack.back()->is_object()"); } return nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::key( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", v3); }
end_object: PUSH RAX MOV RAX,qword ptr [RDI + 0x10] CMP qword ptr [RDI + 0x8],RAX JZ 0x00161a88 MOV RCX,qword ptr [RAX + -0x8] CMP byte ptr [RCX],0x1 JNZ 0x00161aa4 ADD RAX,-0x8 MOV qword ptr [RDI + 0x10],RAX MOV AL,0x1 POP RCX RET LAB_00161a88: LEA RDI,[0x1ebca9] LEA RDX,[0x1ebcf3] LEA RCX,[0x1eccab] MOV ESI,0x1aeb JMP 0x00161abe LAB_00161aa4: LEA RDI,[0x1ebca9] LEA RDX,[0x1ebcf3] LEA RCX,[0x1ecc59] MOV ESI,0x1aec LAB_00161abe: XOR EAX,EAX CALL 0x0011aeb0
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::end_object() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::end_object(json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this) { long lVar1; char *pcVar2; int8 uVar3; lVar1 = *(long *)(this + 0x10); if (*(long *)(this + 8) == lVar1) { pcVar2 = "!ref_stack.empty()"; uVar3 = 0x1aeb; } else { if (**(char **)(lVar1 + -8) == '\x01') { *(long *)(this + 0x10) = lVar1 + -8; return CONCAT71((int7)((ulong)(lVar1 + -8) >> 8),1); } pcVar2 = "ref_stack.back()->is_object()"; uVar3 = 0x1aec; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3, "GGML_ASSERT(%s) failed",pcVar2); }
4,651
my_wc_mb_euc_kr
eloqsql/strings/ctype-euc_kr.c
static int my_wc_mb_euc_kr(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; if (s >= e) return MY_CS_TOOSMALL; if ((uint) wc < 0x80) { s[0]= (uchar) wc; return 1; } if (!(code=func_uni_ksc5601_onechar(wc))) return MY_CS_ILUNI; if (s+2>e) return MY_CS_TOOSMALL2; s[0]=code>>8; s[1]=code&0xFF; return 2; }
O3
c
my_wc_mb_euc_kr: movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x3183e cmpl $0x7f, %esi ja 0x3183f movb %sil, (%rdx) movl $0x1, %eax retq leal -0xa1(%rsi), %eax cmpl $0xc6, %eax ja 0x3185a movl %eax, %eax leaq 0x9678b(%rip), %rsi # 0xc7fe0 jmp 0x31952 leal -0x2c7(%rsi), %eax cmpl $0x18a, %eax # imm = 0x18A ja 0x31875 movl %eax, %eax leaq 0x96900(%rip), %rsi # 0xc8170 jmp 0x31952 leal -0x2015(%rsi), %eax cmpl $0x2fd, %eax # imm = 0x2FD ja 0x31890 movl %eax, %eax leaq 0x96c05(%rip), %rsi # 0xc8490 jmp 0x31952 leal -0x2460(%rsi), %eax cmpl $0x20d, %eax # imm = 0x20D ja 0x318ab movl %eax, %eax leaq 0x971ea(%rip), %rsi # 0xc8a90 jmp 0x31952 leal -0x3000(%rsi), %eax cmpl $0x27f, %eax # imm = 0x27F ja 0x318c6 movl %eax, %eax leaq 0x975ef(%rip), %rsi # 0xc8eb0 jmp 0x31952 leal -0x3380(%rsi), %eax cmpl $0x5d, %eax ja 0x318dc movl %eax, %eax leaq 0x97ad6(%rip), %rsi # 0xc93b0 jmp 0x31952 leal -0x4e00(%rsi), %eax cmpl $0x467f, %eax # imm = 0x467F ja 0x318f4 movl %eax, %eax leaq 0x97b7e(%rip), %rsi # 0xc9470 jmp 0x31952 leal -0x9577(%rsi), %eax cmpl $0xa25, %eax # imm = 0xA25 ja 0x3190c movl %eax, %eax leaq 0xa0866(%rip), %rsi # 0xd2170 jmp 0x31952 leal -0xac00(%rsi), %eax cmpl $0x2ba3, %eax # imm = 0x2BA3 ja 0x31924 movl %eax, %eax leaq 0xa1c9e(%rip), %rsi # 0xd35c0 jmp 0x31952 leal -0xf900(%rsi), %eax cmpl $0x10b, %eax # imm = 0x10B ja 0x3193c movl %eax, %eax leaq 0xa73d6(%rip), %rsi # 0xd8d10 jmp 0x31952 leal -0xff01(%rsi), %eax cmpl $0xe5, %eax ja 0x31982 movl %eax, %eax leaq 0xa75de(%rip), %rsi # 0xd8f30 leaq (%rsi,%rax,2), %rax pushq %rbp movq %rsp, %rbp movzwl (%rax), %esi testw %si, %si je 0x3197e leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0x31980 rolw $0x8, %si movw %si, (%rdx) movl $0x2, %eax jmp 0x31980 xorl %eax, %eax popq %rbp retq xorl %eax, %eax retq
my_wc_mb_euc_kr: mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short locret_3183E cmp esi, 7Fh ja short loc_3183F mov [rdx], sil mov eax, 1 locret_3183E: retn loc_3183F: lea eax, [rsi-0A1h] cmp eax, 0C6h ja short loc_3185A mov eax, eax lea rsi, tab_uni_ksc56010 jmp loc_31952 loc_3185A: lea eax, [rsi-2C7h] cmp eax, 18Ah ja short loc_31875 mov eax, eax lea rsi, tab_uni_ksc56011 jmp loc_31952 loc_31875: lea eax, [rsi-2015h] cmp eax, 2FDh ja short loc_31890 mov eax, eax lea rsi, tab_uni_ksc56012 jmp loc_31952 loc_31890: lea eax, [rsi-2460h] cmp eax, 20Dh ja short loc_318AB mov eax, eax lea rsi, tab_uni_ksc56013 jmp loc_31952 loc_318AB: lea eax, [rsi-3000h] cmp eax, 27Fh ja short loc_318C6 mov eax, eax lea rsi, tab_uni_ksc56014 jmp loc_31952 loc_318C6: lea eax, [rsi-3380h] cmp eax, 5Dh ; ']' ja short loc_318DC mov eax, eax lea rsi, tab_uni_ksc56015 jmp short loc_31952 loc_318DC: lea eax, [rsi-4E00h] cmp eax, 467Fh ja short loc_318F4 mov eax, eax lea rsi, tab_uni_ksc56016 jmp short loc_31952 loc_318F4: lea eax, [rsi-9577h] cmp eax, 0A25h ja short loc_3190C mov eax, eax lea rsi, tab_uni_ksc56017 jmp short loc_31952 loc_3190C: lea eax, [rsi-0AC00h] cmp eax, 2BA3h ja short loc_31924 mov eax, eax lea rsi, tab_uni_ksc56018 jmp short loc_31952 loc_31924: lea eax, [rsi-0F900h] cmp eax, 10Bh ja short loc_3193C mov eax, eax lea rsi, tab_uni_ksc56019 jmp short loc_31952 loc_3193C: lea eax, [rsi-0FF01h] cmp eax, 0E5h ja short loc_31982 mov eax, eax lea rsi, tab_uni_ksc560110 loc_31952: lea rax, [rsi+rax*2] push rbp mov rbp, rsp movzx esi, word ptr [rax] test si, si jz short loc_3197E lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_31980 rol si, 8 mov [rdx], si mov eax, 2 jmp short loc_31980 loc_3197E: xor eax, eax loc_31980: pop rbp retn loc_31982: xor eax, eax retn
long long my_wc_mb_euc_kr(long long a1, unsigned int a2, _WORD *a3, unsigned long long a4) { long long result; // rax long long v5; // rax _WORD *v6; // rsi __int16 v7; // si result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { if ( a2 > 0x7F ) { LODWORD(v5) = a2 - 161; if ( a2 - 161 > 0xC6 ) { LODWORD(v5) = a2 - 711; if ( a2 - 711 > 0x18A ) { LODWORD(v5) = a2 - 8213; if ( a2 - 8213 > 0x2FD ) { LODWORD(v5) = a2 - 9312; if ( a2 - 9312 > 0x20D ) { LODWORD(v5) = a2 - 12288; if ( a2 - 12288 > 0x27F ) { LODWORD(v5) = a2 - 13184; if ( a2 - 13184 > 0x5D ) { LODWORD(v5) = a2 - 19968; if ( a2 - 19968 > 0x467F ) { LODWORD(v5) = a2 - 38263; if ( a2 - 38263 > 0xA25 ) { LODWORD(v5) = a2 - 44032; if ( a2 - 44032 > 0x2BA3 ) { LODWORD(v5) = a2 - 63744; if ( a2 - 63744 > 0x10B ) { LODWORD(v5) = a2 - 65281; if ( a2 - 65281 > 0xE5 ) return 0LL; v5 = (unsigned int)v5; v6 = &tab_uni_ksc560110; } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56019; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56018; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56017; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56016; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56015; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56014; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56013; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56012; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56011; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56010; } v7 = v6[v5]; if ( v7 ) { result = 4294967194LL; if ( (unsigned long long)(a3 + 1) <= a4 ) { *a3 = __ROL2__(v7, 8); return 2LL; } } else { return 0LL; } } else { *(_BYTE *)a3 = a2; return 1LL; } } return result; }
my_wc_mb_euc_kr: MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x0013183e CMP ESI,0x7f JA 0x0013183f MOV byte ptr [RDX],SIL MOV EAX,0x1 LAB_0013183e: RET LAB_0013183f: LEA EAX,[RSI + -0xa1] CMP EAX,0xc6 JA 0x0013185a MOV EAX,EAX LEA RSI,[0x1c7fe0] JMP 0x00131952 LAB_0013185a: LEA EAX,[RSI + -0x2c7] CMP EAX,0x18a JA 0x00131875 MOV EAX,EAX LEA RSI,[0x1c8170] JMP 0x00131952 LAB_00131875: LEA EAX,[RSI + -0x2015] CMP EAX,0x2fd JA 0x00131890 MOV EAX,EAX LEA RSI,[0x1c8490] JMP 0x00131952 LAB_00131890: LEA EAX,[RSI + -0x2460] CMP EAX,0x20d JA 0x001318ab MOV EAX,EAX LEA RSI,[0x1c8a90] JMP 0x00131952 LAB_001318ab: LEA EAX,[RSI + -0x3000] CMP EAX,0x27f JA 0x001318c6 MOV EAX,EAX LEA RSI,[0x1c8eb0] JMP 0x00131952 LAB_001318c6: LEA EAX,[RSI + -0x3380] CMP EAX,0x5d JA 0x001318dc MOV EAX,EAX LEA RSI,[0x1c93b0] JMP 0x00131952 LAB_001318dc: LEA EAX,[RSI + -0x4e00] CMP EAX,0x467f JA 0x001318f4 MOV EAX,EAX LEA RSI,[0x1c9470] JMP 0x00131952 LAB_001318f4: LEA EAX,[RSI + -0x9577] CMP EAX,0xa25 JA 0x0013190c MOV EAX,EAX LEA RSI,[0x1d2170] JMP 0x00131952 LAB_0013190c: LEA EAX,[RSI + -0xac00] CMP EAX,0x2ba3 JA 0x00131924 MOV EAX,EAX LEA RSI,[0x1d35c0] JMP 0x00131952 LAB_00131924: LEA EAX,[RSI + -0xf900] CMP EAX,0x10b JA 0x0013193c MOV EAX,EAX LEA RSI,[0x1d8d10] JMP 0x00131952 LAB_0013193c: LEA EAX,[RSI + -0xff01] CMP EAX,0xe5 JA 0x00131982 MOV EAX,EAX LEA RSI,[0x1d8f30] LAB_00131952: LEA RAX,[RSI + RAX*0x2] PUSH RBP MOV RBP,RSP MOVZX ESI,word ptr [RAX] TEST SI,SI JZ 0x0013197e LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x00131980 ROL SI,0x8 MOV word ptr [RDX],SI MOV EAX,0x2 JMP 0x00131980 LAB_0013197e: XOR EAX,EAX LAB_00131980: POP RBP RET LAB_00131982: XOR EAX,EAX RET
int8 my_wc_mb_euc_kr(int8 param_1,uint param_2,ushort *param_3,ushort *param_4) { ushort uVar1; int8 uVar2; ulong uVar3; int1 *puVar4; uVar2 = 0xffffff9b; if (param_3 < param_4) { if (0x7f < param_2) { if (param_2 - 0xa1 < 199) { uVar3 = (ulong)(param_2 - 0xa1); puVar4 = tab_uni_ksc56010; } else if (param_2 - 0x2c7 < 0x18b) { uVar3 = (ulong)(param_2 - 0x2c7); puVar4 = tab_uni_ksc56011; } else if (param_2 - 0x2015 < 0x2fe) { uVar3 = (ulong)(param_2 - 0x2015); puVar4 = tab_uni_ksc56012; } else if (param_2 - 0x2460 < 0x20e) { uVar3 = (ulong)(param_2 - 0x2460); puVar4 = tab_uni_ksc56013; } else if (param_2 - 0x3000 < 0x280) { uVar3 = (ulong)(param_2 - 0x3000); puVar4 = tab_uni_ksc56014; } else if (param_2 - 0x3380 < 0x5e) { uVar3 = (ulong)(param_2 - 0x3380); puVar4 = tab_uni_ksc56015; } else if (param_2 - 0x4e00 < 0x4680) { uVar3 = (ulong)(param_2 - 0x4e00); puVar4 = tab_uni_ksc56016; } else if (param_2 - 0x9577 < 0xa26) { uVar3 = (ulong)(param_2 - 0x9577); puVar4 = tab_uni_ksc56017; } else if (param_2 - 0xac00 < 0x2ba4) { uVar3 = (ulong)(param_2 - 0xac00); puVar4 = tab_uni_ksc56018; } else if (param_2 - 0xf900 < 0x10c) { uVar3 = (ulong)(param_2 - 0xf900); puVar4 = tab_uni_ksc56019; } else { uVar3 = (ulong)(param_2 - 0xff01); if (0xe5 < param_2 - 0xff01) { return 0; } puVar4 = tab_uni_ksc560110; } uVar1 = *(ushort *)(puVar4 + uVar3 * 2); if (uVar1 == 0) { uVar2 = 0; } else { uVar2 = 0xffffff9a; if (param_3 + 1 <= param_4) { *param_3 = uVar1 << 8 | uVar1 >> 8; uVar2 = 2; } } return uVar2; } *(char *)param_3 = (char)param_2; uVar2 = 1; } return uVar2; }
4,652
stbtt_GetFontOffsetForIndex_internal
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-truetype.h
static int stbtt_GetFontOffsetForIndex_internal(unsigned char *font_collection, int index) { // if it's just a font, there's only one valid index if (stbtt__isfont(font_collection)) return index == 0 ? 0 : -1; // check if it's a TTC if (stbtt_tag(font_collection, "ttcf")) { // version 1? if (ttULONG(font_collection+4) == 0x00010000 || ttULONG(font_collection+4) == 0x00020000) { stbtt_int32 n = ttLONG(font_collection+8); if (index >= n) return -1; return ttULONG(font_collection+12+index*4); } } return -1; }
O0
c
stbtt_GetFontOffsetForIndex_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq -0x10(%rbp), %rdi callq 0x71f0 cmpl $0x0, %eax je 0x7125 movl -0x14(%rbp), %edx movl $0xffffffff, %eax # imm = 0xFFFFFFFF xorl %ecx, %ecx cmpl $0x0, %edx cmovel %ecx, %eax movl %eax, -0x4(%rbp) jmp 0x71e7 movq -0x10(%rbp), %rax movzbl (%rax), %eax movsbl 0x342df(%rip), %ecx # 0x3b412 cmpl %ecx, %eax jne 0x71e0 movq -0x10(%rbp), %rax movzbl 0x1(%rax), %eax movsbl 0x342c9(%rip), %ecx # 0x3b413 cmpl %ecx, %eax jne 0x71e0 movq -0x10(%rbp), %rax movzbl 0x2(%rax), %eax movsbl 0x342b3(%rip), %ecx # 0x3b414 cmpl %ecx, %eax jne 0x71e0 movq -0x10(%rbp), %rax movzbl 0x3(%rax), %eax movsbl 0x342a1(%rip), %ecx # 0x3b415 cmpl %ecx, %eax jne 0x71e0 movq -0x10(%rbp), %rdi addq $0x4, %rdi callq 0x7390 cmpl $0x10000, %eax # imm = 0x10000 je 0x71a0 movq -0x10(%rbp), %rdi addq $0x4, %rdi callq 0x7390 cmpl $0x20000, %eax # imm = 0x20000 jne 0x71de movq -0x10(%rbp), %rdi addq $0x8, %rdi callq 0x73d0 movl %eax, -0x18(%rbp) movl -0x14(%rbp), %eax cmpl -0x18(%rbp), %eax jl 0x71c1 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x71e7 movq -0x10(%rbp), %rdi addq $0xc, %rdi movl -0x14(%rbp), %eax shll $0x2, %eax cltq addq %rax, %rdi callq 0x7390 movl %eax, -0x4(%rbp) jmp 0x71e7 jmp 0x71e0 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq
stbtt_GetFontOffsetForIndex_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov rdi, [rbp+var_10] call stbtt__isfont cmp eax, 0 jz short loc_7125 mov edx, [rbp+var_14] mov eax, 0FFFFFFFFh xor ecx, ecx cmp edx, 0 cmovz eax, ecx mov [rbp+var_4], eax jmp loc_71E7 loc_7125: mov rax, [rbp+var_10] movzx eax, byte ptr [rax] movsx ecx, cs:byte_3B412 cmp eax, ecx jnz loc_71E0 mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1] movsx ecx, cs:byte_3B413 cmp eax, ecx jnz loc_71E0 mov rax, [rbp+var_10] movzx eax, byte ptr [rax+2] movsx ecx, cs:byte_3B414 cmp eax, ecx jnz short loc_71E0 mov rax, [rbp+var_10] movzx eax, byte ptr [rax+3] movsx ecx, cs:byte_3B415 cmp eax, ecx jnz short loc_71E0 mov rdi, [rbp+var_10] add rdi, 4 call ttULONG cmp eax, 10000h jz short loc_71A0 mov rdi, [rbp+var_10] add rdi, 4 call ttULONG cmp eax, offset loc_20000 jnz short loc_71DE loc_71A0: mov rdi, [rbp+var_10] add rdi, 8 call ttLONG mov [rbp+var_18], eax mov eax, [rbp+var_14] cmp eax, [rbp+var_18] jl short loc_71C1 mov [rbp+var_4], 0FFFFFFFFh jmp short loc_71E7 loc_71C1: mov rdi, [rbp+var_10] add rdi, 0Ch mov eax, [rbp+var_14] shl eax, 2 cdqe add rdi, rax call ttULONG mov [rbp+var_4], eax jmp short loc_71E7 loc_71DE: jmp short $+2 loc_71E0: mov [rbp+var_4], 0FFFFFFFFh loc_71E7: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long stbtt_GetFontOffsetForIndex_internal(_BYTE *a1, int a2) { unsigned int v2; // eax if ( (unsigned int)stbtt__isfont(a1) ) { v2 = -1; if ( !a2 ) return 0; return v2; } else if ( *a1 == 116 && a1[1] == 116 && a1[2] == 99 && a1[3] == 102 && ((unsigned int)ttULONG(a1 + 4) == 0x10000 || (unsigned int)ttULONG(a1 + 4) == (_DWORD)&loc_20000) ) { if ( a2 < (int)ttLONG(a1 + 8) ) return (unsigned int)ttULONG(&a1[4 * a2 + 12]); else return (unsigned int)-1; } else { return (unsigned int)-1; } }
stbtt_GetFontOffsetForIndex_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV RDI,qword ptr [RBP + -0x10] CALL 0x001071f0 CMP EAX,0x0 JZ 0x00107125 MOV EDX,dword ptr [RBP + -0x14] MOV EAX,0xffffffff XOR ECX,ECX CMP EDX,0x0 CMOVZ EAX,ECX MOV dword ptr [RBP + -0x4],EAX JMP 0x001071e7 LAB_00107125: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [0x0013b412] CMP EAX,ECX JNZ 0x001071e0 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1] MOVSX ECX,byte ptr [0x0013b413] CMP EAX,ECX JNZ 0x001071e0 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x2] MOVSX ECX,byte ptr [0x0013b414] CMP EAX,ECX JNZ 0x001071e0 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x3] MOVSX ECX,byte ptr [0x0013b415] CMP EAX,ECX JNZ 0x001071e0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x4 CALL 0x00107390 CMP EAX,0x10000 JZ 0x001071a0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x4 CALL 0x00107390 CMP EAX,0x20000 JNZ 0x001071de LAB_001071a0: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x8 CALL 0x001073d0 MOV dword ptr [RBP + -0x18],EAX MOV EAX,dword ptr [RBP + -0x14] CMP EAX,dword ptr [RBP + -0x18] JL 0x001071c1 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001071e7 LAB_001071c1: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0xc MOV EAX,dword ptr [RBP + -0x14] SHL EAX,0x2 CDQE ADD RDI,RAX CALL 0x00107390 MOV dword ptr [RBP + -0x4],EAX JMP 0x001071e7 LAB_001071de: JMP 0x001071e0 LAB_001071e0: MOV dword ptr [RBP + -0x4],0xffffffff LAB_001071e7: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 stbtt_GetFontOffsetForIndex_internal(byte *param_1,int param_2) { int iVar1; int4 local_c; iVar1 = stbtt__isfont(param_1); if (iVar1 == 0) { if (((((uint)*param_1 == (int)DAT_0013b412) && ((uint)param_1[1] == (int)DAT_0013b413)) && ((uint)param_1[2] == (int)DAT_0013b414)) && (((uint)param_1[3] == (int)DAT_0013b415 && ((iVar1 = ttULONG(param_1 + 4), iVar1 == 0x10000 || (iVar1 = ttULONG(param_1 + 4), iVar1 == 0x20000)))))) { iVar1 = ttLONG(param_1 + 8); if (param_2 < iVar1) { local_c = ttULONG(param_1 + (long)(param_2 << 2) + 0xc); } else { local_c = 0xffffffff; } } else { local_c = 0xffffffff; } } else { local_c = 0xffffffff; if (param_2 == 0) { local_c = 0; } } return local_c; }
4,653
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator->() const
monkey531[P]llama/common/./json.hpp
pointer operator->() const { JSON_ASSERT(m_object != nullptr); switch (m_object->m_data.m_type) { case value_t::object: { JSON_ASSERT(m_it.object_iterator != m_object->m_data.m_value.object->end()); return &(m_it.object_iterator->second); } case value_t::array: { JSON_ASSERT(m_it.array_iterator != m_object->m_data.m_value.array->end()); return &*m_it.array_iterator; } case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: { if (JSON_HEDLEY_LIKELY(m_it.primitive_iterator.is_begin())) { return m_object; } JSON_THROW(invalid_iterator::create(214, "cannot get value", m_object)); } } }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator->() const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq (%rdi), %rax testq %rax, %rax je 0x36157 movq %rdi, %r14 movzbl (%rax), %ecx cmpl $0x2, %ecx je 0x360ba cmpl $0x1, %ecx jne 0x360e7 movq 0x8(%rax), %rcx movq 0x8(%r14), %rax cmpq 0x8(%rcx), %rax je 0x36173 addq $0x20, %rax jmp 0x360ee movq 0x8(%rax), %rcx movq 0x10(%r14), %rax cmpq 0x8(%rcx), %rax jne 0x360ee leaq 0x7f067(%rip), %rdi # 0xb5136 leaq 0x7f0ac(%rip), %rdx # 0xb5182 leaq 0x80101(%rip), %rcx # 0xb61de movl $0x3397, %esi # imm = 0x3397 jmp 0x3618d cmpq $0x0, 0x18(%r14) jne 0x360f9 addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x19370 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x80105(%rip), %rsi # 0xb621b leaq 0x8010e(%rip), %rdx # 0xb622b leaq 0x8(%rsp), %rdi callq 0x22878 movq (%r14), %rcx movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0xd6, %esi callq 0x3703e xorl %ebp, %ebp leaq 0xb3000(%rip), %rsi # 0xe9148 leaq -0x29cd(%rip), %rdx # 0x33782 movq %rbx, %rdi callq 0x19ba0 leaq 0x7efd8(%rip), %rdi # 0xb5136 leaq 0x7f01d(%rip), %rdx # 0xb5182 leaq 0x8184d(%rip), %rcx # 0xb79b9 movl $0x338b, %esi # imm = 0x338B jmp 0x3618d leaq 0x7efbc(%rip), %rdi # 0xb5136 leaq 0x7f001(%rip), %rdx # 0xb5182 leaq 0x80017(%rip), %rcx # 0xb619f movl $0x3391, %esi # imm = 0x3391 xorl %eax, %eax callq 0x19b30 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x361ae movq 0x18(%rsp), %rsi incq %rsi callq 0x196d0 testb %bpl, %bpl jne 0x361b8 jmp 0x361c0 movq %rax, %r14 movq %rbx, %rdi callq 0x19510 movq %r14, %rdi callq 0x19c00
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEptEv: push rbp; char push r15; int push r14; __int64 push rbx; int sub rsp, 28h mov rax, [rdi] test rax, rax jz loc_36157 mov r14, rdi movzx ecx, byte ptr [rax] cmp ecx, 2 jz short loc_360BA cmp ecx, 1 jnz short loc_360E7 mov rcx, [rax+8] mov rax, [r14+8] cmp rax, [rcx+8] jz loc_36173 add rax, 20h ; ' ' jmp short loc_360EE loc_360BA: mov rcx, [rax+8] mov rax, [r14+10h] cmp rax, [rcx+8] jnz short loc_360EE lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMItArrayIterat; "m_it.array_iterator != m_object->m_data"... mov esi, 3397h jmp loc_3618D loc_360E7: cmp qword ptr [r14+18h], 0 jnz short loc_360F9 loc_360EE: add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn loc_360F9: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+48h+var_30] mov [r15-10h], r15 lea rsi, aCannotGetValue; "cannot get value" lea rdx, aCannotGetValue+10h; "" lea rdi, [rsp+48h+var_40] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rcx, [r14] mov bpl, 1 lea rdx, [rsp+48h+var_40] mov rdi, rbx; this mov esi, 0D6h; int call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_36157: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN+7; "m_object != nullptr" mov esi, 338Bh jmp short loc_3618D loc_36173: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMItObjectItera; "m_it.object_iterator != m_object->m_dat"... mov esi, 3391h loc_3618D: xor eax, eax call _ggml_abort mov r14, rax mov rdi, [rsp+48h+var_40]; void * cmp rdi, r15 jz short loc_361AE mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_361AE: test bpl, bpl jnz short loc_361B8 jmp short loc_361C0 mov r14, rax loc_361B8: mov rdi, rbx; void * call ___cxa_free_exception loc_361C0: mov rdi, r14 call __Unwind_Resume
operator->: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x00136157 MOV R14,RDI MOVZX ECX,byte ptr [RAX] CMP ECX,0x2 JZ 0x001360ba CMP ECX,0x1 JNZ 0x001360e7 MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RCX + 0x8] JZ 0x00136173 ADD RAX,0x20 JMP 0x001360ee LAB_001360ba: MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [R14 + 0x10] CMP RAX,qword ptr [RCX + 0x8] JNZ 0x001360ee LEA RDI,[0x1b5136] LEA RDX,[0x1b5182] LEA RCX,[0x1b61de] MOV ESI,0x3397 JMP 0x0013618d LAB_001360e7: CMP qword ptr [R14 + 0x18],0x0 JNZ 0x001360f9 LAB_001360ee: ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET LAB_001360f9: MOV EDI,0x20 CALL 0x00119370 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_0013610f: LEA RSI,[0x1b621b] LEA RDX,[0x1b622b] LEA RDI,[RSP + 0x8] CALL 0x00122878 MOV RCX,qword ptr [R14] MOV BPL,0x1 LAB_0013612d: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0xd6 CALL 0x0013703e XOR EBP,EBP LEA RSI,[0x1e9148] LEA RDX,[0x133782] MOV RDI,RBX CALL 0x00119ba0 LAB_00136157: LEA RDI,[0x1b5136] LEA RDX,[0x1b5182] LEA RCX,[0x1b79b9] MOV ESI,0x338b JMP 0x0013618d LAB_00136173: LEA RDI,[0x1b5136] LEA RDX,[0x1b5182] LEA RCX,[0x1b619f] MOV ESI,0x3391 LAB_0013618d: XOR EAX,EAX CALL 0x00119b30
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::TEMPNAMEPLACEHOLDERVALUE() const */ char * __thiscall nlohmann::json_abi_v3_11_3::detail:: iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::operator->(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this) { long *plVar1; char *pcVar2; int8 uVar3; int1 *local_40 [2]; int1 local_30 [16]; pcVar2 = *(char **)this; if (pcVar2 == (char *)0x0) { pcVar2 = "m_object != nullptr"; uVar3 = 0x338b; LAB_0013618d: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",uVar3, "GGML_ASSERT(%s) failed",pcVar2); } if (*pcVar2 == '\x02') { plVar1 = (long *)(pcVar2 + 8); pcVar2 = *(char **)(this + 0x10); if (pcVar2 == *(char **)(*plVar1 + 8)) { pcVar2 = "m_it.array_iterator != m_object->m_data.m_value.array->end()"; uVar3 = 0x3397; goto LAB_0013618d; } } else if (*pcVar2 == '\x01') { if (*(long *)(this + 8) == *(long *)(*(long *)(pcVar2 + 8) + 8)) { pcVar2 = "m_it.object_iterator != m_object->m_data.m_value.object->end()"; uVar3 = 0x3391; goto LAB_0013618d; } pcVar2 = (char *)(*(long *)(this + 8) + 0x20); } else if (*(long *)(this + 0x18) != 0) { uVar3 = __cxa_allocate_exception(0x20); local_40[0] = local_30; /* try { // try from 0013610f to 00136126 has its CatchHandler @ 001361b5 */ std::__cxx11::string::_M_construct<char_const*>(local_40,"cannot get value",""); /* try { // try from 0013612d to 00136156 has its CatchHandler @ 00136194 */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar3,0xd6,local_40,*(int8 *)this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar3,&invalid_iterator::typeinfo,exception::~exception); } return pcVar2; }
4,654
mthd_my_read_one_row
eloqsql/libmariadb/libmariadb/mariadb_lib.c
int mthd_my_read_one_row(MYSQL *mysql,uint fields,MYSQL_ROW row, ulong *lengths) { uint field; ulong pkt_len,len; uchar *pos,*prev_pos, *end_pos; if ((pkt_len=(uint) ma_net_safe_read(mysql)) == packet_error) return -1; if (pkt_len <= 8 && mysql->net.read_pos[0] == 254) { mysql->warning_count= uint2korr(mysql->net.read_pos + 1); mysql->server_status= uint2korr(mysql->net.read_pos + 3); return 1; /* End of data */ } prev_pos= 0; /* allowed to write at packet[-1] */ pos=mysql->net.read_pos; end_pos=pos+pkt_len; for (field=0 ; field < fields ; field++) { if ((len=(ulong) net_field_length(&pos)) == NULL_LENGTH) { /* null field */ row[field] = 0; *lengths++=0; } else { if (len > (ulong) (end_pos - pos) || pos > end_pos) { mysql->net.last_errno=CR_UNKNOWN_ERROR; strncpy(mysql->net.last_error,ER(mysql->net.last_errno), MYSQL_ERRMSG_SIZE - 1); return -1; } row[field] = (char*) pos; pos+=len; *lengths++=len; } if (prev_pos) *prev_pos=0; /* Terminate prev field */ prev_pos=pos; } row[field]=(char*) prev_pos+1; /* End of last field */ *prev_pos=0; /* Terminate last field */ return 0; }
O0
c
mthd_my_read_one_row: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rdi callq 0x1b7d0 movl %eax, %eax movq %rax, -0x38(%rbp) movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rcx, %rax jne 0x2024c movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x2041f cmpq $0x8, -0x38(%rbp) ja 0x202d1 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movzbl (%rax), %eax cmpl $0xfe, %eax jne 0x202d1 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x10(%rbp), %rcx movq 0x20(%rcx), %rcx movzbl 0x2(%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx addl %ecx, %eax movzwl %ax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x388(%rax) movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movzbl 0x3(%rax), %eax movzwl %ax, %eax movq -0x10(%rbp), %rcx movq 0x20(%rcx), %rcx movzbl 0x4(%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx addl %ecx, %eax movzwl %ax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x380(%rax) movl $0x1, -0x4(%rbp) jmp 0x2041f movq $0x0, -0x50(%rbp) movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax addq -0x38(%rbp), %rax movq %rax, -0x58(%rbp) movl $0x0, -0x2c(%rbp) movl -0x2c(%rbp), %eax cmpl -0x14(%rbp), %eax jae 0x203fe leaq -0x48(%rbp), %rdi callq 0x1bdf0 movq %rax, -0x40(%rbp) cmpq $-0x1, %rax jne 0x20341 movq -0x20(%rbp), %rax movl -0x2c(%rbp), %ecx movq $0x0, (%rax,%rcx,8) movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x8, %rcx movq %rcx, -0x28(%rbp) movq $0x0, (%rax) jmp 0x203da movq -0x40(%rbp), %rax movq -0x58(%rbp), %rcx movq -0x48(%rbp), %rdx subq %rdx, %rcx cmpq %rcx, %rax ja 0x2035f movq -0x48(%rbp), %rax cmpq -0x58(%rbp), %rax jbe 0x203a9 movq -0x10(%rbp), %rax movl $0x7d0, 0x90(%rax) # imm = 0x7D0 movq -0x10(%rbp), %rdi addq $0x97, %rdi movq -0x10(%rbp), %rax movl 0x90(%rax), %eax subl $0x7d0, %eax # imm = 0x7D0 movl %eax, %eax movl %eax, %ecx leaq 0x46ebe(%rip), %rax # 0x67250 movq (%rax,%rcx,8), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13210 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x2041f movq -0x48(%rbp), %rdx movq -0x20(%rbp), %rax movl -0x2c(%rbp), %ecx movq %rdx, (%rax,%rcx,8) movq -0x40(%rbp), %rax addq -0x48(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x40(%rbp), %rcx movq -0x28(%rbp), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, -0x28(%rbp) movq %rcx, (%rax) cmpq $0x0, -0x50(%rbp) je 0x203e8 movq -0x50(%rbp), %rax movb $0x0, (%rax) movq -0x48(%rbp), %rax movq %rax, -0x50(%rbp) movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0x202f8 movq -0x50(%rbp), %rdx addq $0x1, %rdx movq -0x20(%rbp), %rax movl -0x2c(%rbp), %ecx movq %rdx, (%rax,%rcx,8) movq -0x50(%rbp), %rax movb $0x0, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopl (%rax,%rax)
mthd_my_read_one_row: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rdi, [rbp+var_10] call ma_net_safe_read mov eax, eax mov [rbp+var_38], rax mov ecx, 0FFFFFFFFh cmp rax, rcx jnz short loc_2024C mov [rbp+var_4], 0FFFFFFFFh jmp loc_2041F loc_2024C: cmp [rbp+var_38], 8 ja short loc_202D1 mov rax, [rbp+var_10] mov rax, [rax+20h] movzx eax, byte ptr [rax] cmp eax, 0FEh jnz short loc_202D1 mov rax, [rbp+var_10] mov rax, [rax+20h] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_10] mov rcx, [rcx+20h] movzx ecx, byte ptr [rcx+2] movzx ecx, cx shl ecx, 8 add eax, ecx movzx ecx, ax mov rax, [rbp+var_10] mov [rax+388h], ecx mov rax, [rbp+var_10] mov rax, [rax+20h] movzx eax, byte ptr [rax+3] movzx eax, ax mov rcx, [rbp+var_10] mov rcx, [rcx+20h] movzx ecx, byte ptr [rcx+4] movzx ecx, cx shl ecx, 8 add eax, ecx movzx ecx, ax mov rax, [rbp+var_10] mov [rax+380h], ecx mov [rbp+var_4], 1 jmp loc_2041F loc_202D1: mov [rbp+var_50], 0 mov rax, [rbp+var_10] mov rax, [rax+20h] mov [rbp+var_48], rax mov rax, [rbp+var_48] add rax, [rbp+var_38] mov [rbp+var_58], rax mov [rbp+var_2C], 0 loc_202F8: mov eax, [rbp+var_2C] cmp eax, [rbp+var_14] jnb loc_203FE lea rdi, [rbp+var_48] call net_field_length mov [rbp+var_40], rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_20341 mov rax, [rbp+var_20] mov ecx, [rbp+var_2C] mov qword ptr [rax+rcx*8], 0 mov rax, [rbp+var_28] mov rcx, rax add rcx, 8 mov [rbp+var_28], rcx mov qword ptr [rax], 0 jmp loc_203DA loc_20341: mov rax, [rbp+var_40] mov rcx, [rbp+var_58] mov rdx, [rbp+var_48] sub rcx, rdx cmp rax, rcx ja short loc_2035F mov rax, [rbp+var_48] cmp rax, [rbp+var_58] jbe short loc_203A9 loc_2035F: mov rax, [rbp+var_10] mov dword ptr [rax+90h], 7D0h mov rdi, [rbp+var_10] add rdi, 97h mov rax, [rbp+var_10] mov eax, [rax+90h] sub eax, 7D0h mov eax, eax mov ecx, eax lea rax, client_errors mov rsi, [rax+rcx*8] mov edx, 1FFh call _strncpy mov [rbp+var_4], 0FFFFFFFFh jmp short loc_2041F loc_203A9: mov rdx, [rbp+var_48] mov rax, [rbp+var_20] mov ecx, [rbp+var_2C] mov [rax+rcx*8], rdx mov rax, [rbp+var_40] add rax, [rbp+var_48] mov [rbp+var_48], rax mov rcx, [rbp+var_40] mov rax, [rbp+var_28] mov rdx, rax add rdx, 8 mov [rbp+var_28], rdx mov [rax], rcx loc_203DA: cmp [rbp+var_50], 0 jz short loc_203E8 mov rax, [rbp+var_50] mov byte ptr [rax], 0 loc_203E8: mov rax, [rbp+var_48] mov [rbp+var_50], rax mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax jmp loc_202F8 loc_203FE: mov rdx, [rbp+var_50] add rdx, 1 mov rax, [rbp+var_20] mov ecx, [rbp+var_2C] mov [rax+rcx*8], rdx mov rax, [rbp+var_50] mov byte ptr [rax], 0 mov [rbp+var_4], 0 loc_2041F: mov eax, [rbp+var_4] add rsp, 60h pop rbp retn
long long mthd_my_read_one_row(long long a1, long long a2, long long a3, long long a4, int a5, int a6) { unsigned long long *v6; // rax unsigned long long *v7; // rax unsigned __int8 *v9; // [rsp+8h] [rbp-58h] unsigned __int8 *v10; // [rsp+10h] [rbp-50h] unsigned __int8 *v11; // [rsp+18h] [rbp-48h] BYREF unsigned long long v12; // [rsp+20h] [rbp-40h] unsigned long long v13; // [rsp+28h] [rbp-38h] unsigned int i; // [rsp+34h] [rbp-2Ch] unsigned long long *v15; // [rsp+38h] [rbp-28h] long long v16; // [rsp+40h] [rbp-20h] unsigned int v17; // [rsp+4Ch] [rbp-14h] long long v18; // [rsp+50h] [rbp-10h] v18 = a1; v17 = a2; v16 = a3; v15 = (unsigned long long *)a4; v13 = (unsigned int)ma_net_safe_read(a1, a2, a3, a4, a5, a6); if ( v13 == 0xFFFFFFFF ) { return (unsigned int)-1; } else if ( v13 <= 8 && **(unsigned __int8 **)(v18 + 32) == 254 ) { *(_DWORD *)(v18 + 904) = (unsigned __int16)((*(unsigned __int8 *)(*(_QWORD *)(v18 + 32) + 2LL) << 8) + *(unsigned __int8 *)(*(_QWORD *)(v18 + 32) + 1LL)); *(_DWORD *)(v18 + 896) = (unsigned __int16)((*(unsigned __int8 *)(*(_QWORD *)(v18 + 32) + 4LL) << 8) + *(unsigned __int8 *)(*(_QWORD *)(v18 + 32) + 3LL)); return 1; } else { v10 = 0LL; v11 = *(unsigned __int8 **)(v18 + 32); v9 = &v11[v13]; for ( i = 0; i < v17; ++i ) { v12 = net_field_length(&v11); if ( v12 == -1LL ) { *(_QWORD *)(v16 + 8LL * i) = 0LL; v6 = v15++; *v6 = 0LL; } else { if ( v12 > v9 - v11 || v11 > v9 ) { *(_DWORD *)(v18 + 144) = 2000; strncpy(v18 + 151, client_errors[*(_DWORD *)(v18 + 144) - 2000], 511LL); return (unsigned int)-1; } *(_QWORD *)(v16 + 8LL * i) = v11; v11 += v12; v7 = v15++; *v7 = v12; } if ( v10 ) *v10 = 0; v10 = v11; } *(_QWORD *)(v16 + 8LL * i) = v10 + 1; *v10 = 0; return 0; } }
mthd_my_read_one_row: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0011b7d0 MOV EAX,EAX MOV qword ptr [RBP + -0x38],RAX MOV ECX,0xffffffff CMP RAX,RCX JNZ 0x0012024c MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0012041f LAB_0012024c: CMP qword ptr [RBP + -0x38],0x8 JA 0x001202d1 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0xfe JNZ 0x001202d1 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x20] MOVZX ECX,byte ptr [RCX + 0x2] MOVZX ECX,CX SHL ECX,0x8 ADD EAX,ECX MOVZX ECX,AX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x388],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOVZX EAX,byte ptr [RAX + 0x3] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x20] MOVZX ECX,byte ptr [RCX + 0x4] MOVZX ECX,CX SHL ECX,0x8 ADD EAX,ECX MOVZX ECX,AX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x380],ECX MOV dword ptr [RBP + -0x4],0x1 JMP 0x0012041f LAB_001202d1: MOV qword ptr [RBP + -0x50],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] ADD RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x58],RAX MOV dword ptr [RBP + -0x2c],0x0 LAB_001202f8: MOV EAX,dword ptr [RBP + -0x2c] CMP EAX,dword ptr [RBP + -0x14] JNC 0x001203fe LEA RDI,[RBP + -0x48] CALL 0x0011bdf0 MOV qword ptr [RBP + -0x40],RAX CMP RAX,-0x1 JNZ 0x00120341 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x2c] MOV qword ptr [RAX + RCX*0x8],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x8 MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RAX],0x0 JMP 0x001203da LAB_00120341: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x58] MOV RDX,qword ptr [RBP + -0x48] SUB RCX,RDX CMP RAX,RCX JA 0x0012035f MOV RAX,qword ptr [RBP + -0x48] CMP RAX,qword ptr [RBP + -0x58] JBE 0x001203a9 LAB_0012035f: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x90],0x7d0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x97 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x90] SUB EAX,0x7d0 MOV EAX,EAX MOV ECX,EAX LEA RAX,[0x167250] MOV RSI,qword ptr [RAX + RCX*0x8] MOV EDX,0x1ff CALL 0x00113210 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0012041f LAB_001203a9: MOV RDX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x2c] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RBP + -0x40] ADD RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x48],RAX MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x28] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RBP + -0x28],RDX MOV qword ptr [RAX],RCX LAB_001203da: CMP qword ptr [RBP + -0x50],0x0 JZ 0x001203e8 MOV RAX,qword ptr [RBP + -0x50] MOV byte ptr [RAX],0x0 LAB_001203e8: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x50],RAX MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x001202f8 LAB_001203fe: MOV RDX,qword ptr [RBP + -0x50] ADD RDX,0x1 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x2c] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RBP + -0x50] MOV byte ptr [RAX],0x0 MOV dword ptr [RBP + -0x4],0x0 LAB_0012041f: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x60 POP RBP RET
int4 mthd_my_read_one_row(long param_1,uint param_2,long param_3,ulong *param_4) { uint uVar1; int1 *puVar2; int1 *local_58; int1 *local_50; ulong local_48; ulong local_40; uint local_34; ulong *local_30; long local_28; uint local_1c; long local_18; int4 local_c; local_30 = param_4; local_28 = param_3; local_1c = param_2; local_18 = param_1; uVar1 = ma_net_safe_read(param_1); local_40 = (ulong)uVar1; if (local_40 == 0xffffffff) { local_c = 0xffffffff; } else if ((local_40 < 9) && (**(char **)(local_18 + 0x20) == -2)) { *(uint *)(local_18 + 0x388) = (uint)*(byte *)(*(long *)(local_18 + 0x20) + 1) + (uint)*(byte *)(*(long *)(local_18 + 0x20) + 2) * 0x100 & 0xffff; *(uint *)(local_18 + 0x380) = (uint)*(byte *)(*(long *)(local_18 + 0x20) + 3) + (uint)*(byte *)(*(long *)(local_18 + 0x20) + 4) * 0x100 & 0xffff; local_c = 1; } else { local_58 = (int1 *)0x0; local_50 = *(int1 **)(local_18 + 0x20); puVar2 = local_50 + local_40; for (local_34 = 0; local_34 < local_1c; local_34 = local_34 + 1) { local_48 = net_field_length(&local_50); if (local_48 == 0xffffffffffffffff) { *(int8 *)(local_28 + (ulong)local_34 * 8) = 0; *local_30 = 0; } else { if (((ulong)((long)puVar2 - (long)local_50) < local_48) || (puVar2 < local_50)) { *(int4 *)(local_18 + 0x90) = 2000; strncpy((char *)(local_18 + 0x97),(&client_errors)[*(int *)(local_18 + 0x90) - 2000],0x1ff ); return 0xffffffff; } *(int1 **)(local_28 + (ulong)local_34 * 8) = local_50; local_50 = local_50 + local_48; *local_30 = local_48; } local_30 = local_30 + 1; if (local_58 != (int1 *)0x0) { *local_58 = 0; } local_58 = local_50; } *(int1 **)(local_28 + (ulong)local_34 * 8) = local_58 + 1; *local_58 = 0; local_c = 0; } return local_c; }
4,655
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; } }
O3
c
Bfree: pushq %rbp movq %rsp, %rbp cmpq %rdi, (%rsi) ja 0x2c5bd cmpq %rdi, 0x10(%rsi) jbe 0x2c5bd movslq 0x8(%rdi), %rax cmpq $0xf, %rax jg 0x2c5bb movq 0x18(%rsi,%rax,8), %rcx movq %rcx, (%rdi) movq %rdi, 0x18(%rsi,%rax,8) popq %rbp retq popq %rbp jmp 0x24390
Bfree: push rbp mov rbp, rsp cmp [rsi], rdi ja short loc_2C5BD cmp [rsi+10h], rdi jbe short loc_2C5BD movsxd rax, dword ptr [rdi+8] cmp rax, 0Fh jg short loc_2C5BB mov rcx, [rsi+rax*8+18h] mov [rdi], rcx mov [rsi+rax*8+18h], rdi loc_2C5BB: pop rbp retn loc_2C5BD: pop rbp jmp _free
long long Bfree(unsigned long long a1, unsigned long long *a2) { long long result; // rax if ( *a2 > a1 || a2[2] <= a1 ) return free(a1); result = *(int *)(a1 + 8); if ( result <= 15 ) { *(_QWORD *)a1 = a2[result + 3]; a2[result + 3] = a1; } return result; }
Bfree: PUSH RBP MOV RBP,RSP CMP qword ptr [RSI],RDI JA 0x0012c5bd CMP qword ptr [RSI + 0x10],RDI JBE 0x0012c5bd MOVSXD RAX,dword ptr [RDI + 0x8] CMP RAX,0xf JG 0x0012c5bb MOV RCX,qword ptr [RSI + RAX*0x8 + 0x18] MOV qword ptr [RDI],RCX MOV qword ptr [RSI + RAX*0x8 + 0x18],RDI LAB_0012c5bb: POP RBP RET LAB_0012c5bd: POP RBP JMP 0x00124390
void Bfree(ulong *param_1,ulong *param_2) { long lVar1; if (((ulong *)*param_2 <= param_1) && (param_1 < (ulong *)param_2[2])) { lVar1 = (long)(int)param_1[1]; if (lVar1 < 0x10) { *param_1 = param_2[lVar1 + 3]; param_2[lVar1 + 3] = (ulong)param_1; } return; } free(param_1); return; }
4,656
get_collation_number_internal
eloqsql/mysys/charset.c
static uint get_collation_number_internal(const char *name) { CHARSET_INFO **cs; for (cs= all_charsets; cs < all_charsets + array_elements(all_charsets); cs++) { if (cs[0] && cs[0]->coll_name.str && !my_strcasecmp(&my_charset_latin1, cs[0]->coll_name.str, name)) return cs[0]->number; } return 0; }
O0
c
get_collation_number_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) leaq 0xb9e18d(%rip), %rax # 0xc796c0 movq %rax, -0x18(%rbp) leaq 0xb9e182(%rip), %rax # 0xc796c0 addq $0x4000, %rax # imm = 0x4000 cmpq %rax, -0x18(%rbp) jae 0xdb5af movq -0x18(%rbp), %rax cmpq $0x0, (%rax) je 0xdb59f movq -0x18(%rbp), %rax movq (%rax), %rax cmpq $0x0, 0x20(%rax) je 0xdb59f leaq 0x289a67(%rip), %rax # 0x364fd0 movq 0xc0(%rax), %rax movq 0x40(%rax), %rax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movq 0x20(%rcx), %rsi movq -0x10(%rbp), %rdx leaq 0x289a46(%rip), %rdi # 0x364fd0 callq *%rax cmpl $0x0, %eax jne 0xdb59f movq -0x18(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0xdb5b6 jmp 0xdb5a1 movq -0x18(%rbp), %rax addq $0x8, %rax movq %rax, -0x18(%rbp) jmp 0xdb537 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nop
get_collation_number_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi lea rax, all_charsets mov [rbp+var_18], rax loc_DB537: lea rax, all_charsets add rax, 4000h cmp [rbp+var_18], rax jnb short loc_DB5AF mov rax, [rbp+var_18] cmp qword ptr [rax], 0 jz short loc_DB59F mov rax, [rbp+var_18] mov rax, [rax] cmp qword ptr [rax+20h], 0 jz short loc_DB59F lea rax, my_charset_latin1 mov rax, [rax+0C0h] mov rax, [rax+40h] mov rcx, [rbp+var_18] mov rcx, [rcx] mov rsi, [rcx+20h] mov rdx, [rbp+var_10] lea rdi, my_charset_latin1 call rax cmp eax, 0 jnz short loc_DB59F mov rax, [rbp+var_18] mov rax, [rax] mov eax, [rax] mov [rbp+var_4], eax jmp short loc_DB5B6 loc_DB59F: jmp short $+2 loc_DB5A1: mov rax, [rbp+var_18] add rax, 8 mov [rbp+var_18], rax jmp short loc_DB537 loc_DB5AF: mov [rbp+var_4], 0 loc_DB5B6: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long get_collation_number_internal(long long a1) { unsigned int **i; // [rsp+8h] [rbp-18h] for ( i = (unsigned int **)all_charsets; i < &all_charsets[2048]; ++i ) { if ( *i && *((_QWORD *)*i + 4) && !(*(unsigned int ( **)(void *, _QWORD, long long))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, *((_QWORD *)*i + 4), a1) ) { return **i; } } return 0; }
get_collation_number_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI LEA RAX,[0xd796c0] MOV qword ptr [RBP + -0x18],RAX LAB_001db537: LEA RAX,[0xd796c0] ADD RAX,0x4000 CMP qword ptr [RBP + -0x18],RAX JNC 0x001db5af MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX],0x0 JZ 0x001db59f MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x20],0x0 JZ 0x001db59f LEA RAX,[0x464fd0] MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOV RSI,qword ptr [RCX + 0x20] MOV RDX,qword ptr [RBP + -0x10] LEA RDI,[0x464fd0] CALL RAX CMP EAX,0x0 JNZ 0x001db59f MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x001db5b6 LAB_001db59f: JMP 0x001db5a1 LAB_001db5a1: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x8 MOV qword ptr [RBP + -0x18],RAX JMP 0x001db537 LAB_001db5af: MOV dword ptr [RBP + -0x4],0x0 LAB_001db5b6: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 get_collation_number_internal(int8 param_1) { int iVar1; long *local_20; local_20 = &all_charsets; while( true ) { if ((long *)0xd7d6bf < local_20) { return 0; } if (((*local_20 != 0) && (*(long *)(*local_20 + 0x20) != 0)) && (iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00465090 + 0x40)) (&my_charset_latin1,*(int8 *)(*local_20 + 0x20),param_1), iVar1 == 0 )) break; local_20 = local_20 + 1; } return *(int4 *)*local_20; }
4,657
maria_change_to_newfile
eloqsql/storage/maria/ma_check.c
int maria_change_to_newfile(const char * filename, const char * old_ext, const char * new_ext, time_t backup_time, myf MyFlags) { char old_filename[FN_REFLEN],new_filename[FN_REFLEN]; /* Get real path to filename */ (void) fn_format(old_filename,filename,"",old_ext,2+4+32); return my_redel(old_filename, fn_format(new_filename,old_filename,"",new_ext,2+4), backup_time, MYF(MY_WME | MY_LINK_WARNING | MyFlags)); }
O0
c
maria_change_to_newfile: pushq %rbp movq %rsp, %rbp subq $0x450, %rsp # imm = 0x450 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x418(%rbp) movq %rsi, -0x420(%rbp) movq %rdx, -0x428(%rbp) movq %rcx, -0x430(%rbp) movq %r8, -0x438(%rbp) movq -0x418(%rbp), %rsi movq -0x420(%rbp), %rcx leaq 0xe0404(%rip), %rdx # 0x1813d4 movq %rdx, -0x450(%rbp) leaq -0x210(%rbp), %rdi movq %rdi, -0x448(%rbp) movl $0x26, %r8d callq 0x1055a0 movq -0x450(%rbp), %rdx movq -0x448(%rbp), %rsi movq -0x428(%rbp), %rcx leaq -0x410(%rbp), %rdi movl $0x6, %r8d callq 0x1055a0 movq -0x448(%rbp), %rdi movq %rax, %rsi movq -0x430(%rbp), %rdx movq -0x438(%rbp), %rcx orq $0x30, %rcx callq 0x120b80 movl %eax, -0x43c(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xa105f movl -0x43c(%rbp), %eax addq $0x450, %rsp # imm = 0x450 popq %rbp retq callq 0x2a290 nopw %cs:(%rax,%rax)
maria_change_to_newfile: push rbp mov rbp, rsp sub rsp, 450h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_418], rdi mov [rbp+var_420], rsi mov [rbp+var_428], rdx mov [rbp+var_430], rcx mov [rbp+var_438], r8 mov rsi, [rbp+var_418] mov rcx, [rbp+var_420] lea rdx, aTotalKeyblocks+30h; "" mov [rbp+var_450], rdx lea rdi, [rbp+var_210] mov [rbp+var_448], rdi mov r8d, 26h ; '&' call fn_format mov rdx, [rbp+var_450] mov rsi, [rbp+var_448] mov rcx, [rbp+var_428] lea rdi, [rbp+var_410] mov r8d, 6 call fn_format mov rdi, [rbp+var_448] mov rsi, rax mov rdx, [rbp+var_430] mov rcx, [rbp+var_438] or rcx, 30h call my_redel mov [rbp+var_43C], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_A105F mov eax, [rbp+var_43C] add rsp, 450h pop rbp retn loc_A105F: call ___stack_chk_fail
long long maria_change_to_newfile(long long a1, long long a2, long long a3, long long a4, long long a5) { long long v5; // rax _BYTE v10[512]; // [rsp+40h] [rbp-410h] BYREF _BYTE v11[520]; // [rsp+240h] [rbp-210h] BYREF unsigned long long v12; // [rsp+448h] [rbp-8h] v12 = __readfsqword(0x28u); fn_format(v11, a1, "", a2, 38LL); v5 = fn_format(v10, v11, "", a3, 6LL); return (unsigned int)my_redel(v11, v5, a4, a5 | 0x30); }
maria_change_to_newfile: PUSH RBP MOV RBP,RSP SUB RSP,0x450 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x418],RDI MOV qword ptr [RBP + -0x420],RSI MOV qword ptr [RBP + -0x428],RDX MOV qword ptr [RBP + -0x430],RCX MOV qword ptr [RBP + -0x438],R8 MOV RSI,qword ptr [RBP + -0x418] MOV RCX,qword ptr [RBP + -0x420] LEA RDX,[0x2813d4] MOV qword ptr [RBP + -0x450],RDX LEA RDI,[RBP + -0x210] MOV qword ptr [RBP + -0x448],RDI MOV R8D,0x26 CALL 0x002055a0 MOV RDX,qword ptr [RBP + -0x450] MOV RSI,qword ptr [RBP + -0x448] MOV RCX,qword ptr [RBP + -0x428] LEA RDI,[RBP + -0x410] MOV R8D,0x6 CALL 0x002055a0 MOV RDI,qword ptr [RBP + -0x448] MOV RSI,RAX MOV RDX,qword ptr [RBP + -0x430] MOV RCX,qword ptr [RBP + -0x438] OR RCX,0x30 CALL 0x00220b80 MOV dword ptr [RBP + -0x43c],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001a105f MOV EAX,dword ptr [RBP + -0x43c] ADD RSP,0x450 POP RBP RET LAB_001a105f: CALL 0x0012a290
int4 maria_change_to_newfile (int8 param_1,int8 param_2,int8 param_3,int8 param_4,ulong param_5 ) { int4 uVar1; int8 uVar2; long in_FS_OFFSET; int1 local_418 [512]; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); fn_format(local_218,param_1,"",param_2,0x26); uVar2 = fn_format(local_418,local_218,"",param_3,6); uVar1 = my_redel(local_218,uVar2,param_4,param_5 | 0x30); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return uVar1; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
4,658
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>>>::~iteration_proxy_value()
hkr04[P]cpp-mcp/common/json.hpp
~iteration_proxy_value() = default;
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>>>::~iteration_proxy_value(): pushq %rbx movq %rdi, %rbx movq 0x50(%rdi), %rdi leaq 0x60(%rbx), %rax cmpq %rax, %rdi je 0xfe96 movq (%rax), %rsi incq %rsi callq 0x5460 movq 0x30(%rbx), %rdi addq $0x40, %rbx cmpq %rbx, %rdi je 0xfeaf movq (%rbx), %rsi incq %rsi popq %rbx jmp 0x5460 popq %rbx retq nop
_ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEED2Ev: push rbx mov rbx, rdi mov rdi, [rdi+50h]; void * lea rax, [rbx+60h] cmp rdi, rax jz short loc_FE96 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_FE96: mov rdi, [rbx+30h]; void * add rbx, 40h ; '@' cmp rdi, rbx jz short loc_FEAF mov rsi, [rbx] inc rsi; unsigned __int64 pop rbx jmp __ZdlPvm; operator delete(void *,ulong) loc_FEAF: pop rbx retn
void 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( _QWORD *a1) { _QWORD *v2; // rdi _QWORD *v3; // rdi _QWORD *v4; // rbx v2 = (_QWORD *)a1[10]; if ( v2 != a1 + 12 ) operator delete(v2, a1[12] + 1LL); v3 = (_QWORD *)a1[6]; v4 = a1 + 8; if ( v3 != v4 ) operator delete(v3, *v4 + 1LL); }
~iteration_proxy_value: PUSH RBX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x50] LEA RAX,[RBX + 0x60] CMP RDI,RAX JZ 0x0010fe96 MOV RSI,qword ptr [RAX] INC RSI CALL 0x00105460 LAB_0010fe96: MOV RDI,qword ptr [RBX + 0x30] ADD RBX,0x40 CMP RDI,RBX JZ 0x0010feaf MOV RSI,qword ptr [RBX] INC RSI POP RBX JMP 0x00105460 LAB_0010feaf: 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() */ 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) { if (*(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) { operator_delete(*(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),*(long *)(this + 0x60) + 1); } if (*(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) { operator_delete(*(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),*(long *)(this + 0x40) + 1); return; } return; }
4,659
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>>>::~iteration_proxy_value()
hkr04[P]cpp-mcp/common/json.hpp
~iteration_proxy_value() = default;
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>>>::~iteration_proxy_value(): pushq %rbx movq %rdi, %rbx movq 0x50(%rdi), %rdi leaq 0x60(%rbx), %rax cmpq %rax, %rdi je 0xfb2e movq (%rax), %rsi incq %rsi callq 0x5460 movq 0x30(%rbx), %rdi addq $0x40, %rbx cmpq %rbx, %rdi je 0xfb47 movq (%rbx), %rsi incq %rsi popq %rbx jmp 0x5460 popq %rbx retq nop
_ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEED2Ev: push rbx mov rbx, rdi mov rdi, [rdi+50h]; void * lea rax, [rbx+60h] cmp rdi, rax jz short loc_FB2E mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_FB2E: mov rdi, [rbx+30h]; void * add rbx, 40h ; '@' cmp rdi, rbx jz short loc_FB47 mov rsi, [rbx] inc rsi; unsigned __int64 pop rbx jmp __ZdlPvm; operator delete(void *,ulong) loc_FB47: pop rbx retn
void 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( _QWORD *a1) { _QWORD *v2; // rdi _QWORD *v3; // rdi _QWORD *v4; // rbx v2 = (_QWORD *)a1[10]; if ( v2 != a1 + 12 ) operator delete(v2, a1[12] + 1LL); v3 = (_QWORD *)a1[6]; v4 = a1 + 8; if ( v3 != v4 ) operator delete(v3, *v4 + 1LL); }
~iteration_proxy_value: PUSH RBX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x50] LEA RAX,[RBX + 0x60] CMP RDI,RAX JZ 0x0010fb2e MOV RSI,qword ptr [RAX] INC RSI CALL 0x00105460 LAB_0010fb2e: MOV RDI,qword ptr [RBX + 0x30] ADD RBX,0x40 CMP RDI,RBX JZ 0x0010fb47 MOV RSI,qword ptr [RBX] INC RSI POP RBX JMP 0x00105460 LAB_0010fb47: 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() */ 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) { if (*(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) { operator_delete(*(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),*(long *)(this + 0x60) + 1); } if (*(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) { operator_delete(*(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),*(long *)(this + 0x40) + 1); return; } return; }
4,660
pvio_socket_wait_io_or_timeout
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
int pvio_socket_wait_io_or_timeout(MARIADB_PVIO *pvio, my_bool is_read, int timeout) { int rc; struct st_pvio_socket *csock= NULL; #ifndef _WIN32 struct pollfd p_fd; #else struct timeval tv= {0,0}; fd_set fds, exc_fds; #endif if (!pvio || !pvio->data) return 0; if (pvio->mysql->options.extension && pvio->mysql->options.extension->io_wait != NULL) { my_socket handle; if (pvio_socket_get_handle(pvio, &handle)) return 0; return pvio->mysql->options.extension->io_wait(handle, is_read, timeout); } csock= (struct st_pvio_socket *)pvio->data; { #ifndef _WIN32 memset(&p_fd, 0, sizeof(p_fd)); p_fd.fd= csock->socket; p_fd.events= (is_read) ? POLLIN : POLLOUT; if (!timeout) timeout= -1; do { rc= poll(&p_fd, 1, timeout); } while (rc == -1 && errno == EINTR); if (rc == 0) errno= ETIMEDOUT; #else FD_ZERO(&fds); FD_ZERO(&exc_fds); FD_SET(csock->socket, &fds); FD_SET(csock->socket, &exc_fds); if (timeout >= 0) { tv.tv_sec= timeout / 1000; tv.tv_usec= (timeout % 1000) * 1000; } rc= select(0, (is_read) ? &fds : NULL, (is_read) ? NULL : &fds, &exc_fds, (timeout >= 0) ? &tv : NULL); if (rc == SOCKET_ERROR) { errno= WSAGetLastError(); } else if (rc == 0) { rc= SOCKET_ERROR; WSASetLastError(WSAETIMEDOUT); errno= ETIMEDOUT; } else if (FD_ISSET(csock->socket, &exc_fds)) { int err; int len = sizeof(int); if (getsockopt(csock->socket, SOL_SOCKET, SO_ERROR, (char *)&err, &len) != SOCKET_ERROR) { WSASetLastError(err); errno= err; } rc= SOCKET_ERROR; } #endif } return rc; }
O0
c
pvio_socket_wait_io_or_timeout: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movb %sil, %al movq %rdi, -0x10(%rbp) movb %al, -0x11(%rbp) movl %edx, -0x18(%rbp) movq $0x0, -0x28(%rbp) cmpq $0x0, -0x10(%rbp) je 0x4261e movq -0x10(%rbp), %rax cmpq $0x0, (%rax) jne 0x4262a movl $0x0, -0x4(%rbp) jmp 0x42734 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax cmpq $0x0, 0x480(%rax) je 0x4269e movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq 0x480(%rax), %rax cmpq $0x0, 0x140(%rax) je 0x4269e movq -0x10(%rbp), %rdi leaq -0x34(%rbp), %rsi callq 0x43620 cmpb $0x0, %al je 0x42672 movl $0x0, -0x4(%rbp) jmp 0x42734 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq 0x480(%rax), %rax movq 0x140(%rax), %rax movl -0x34(%rbp), %edi movb -0x11(%rbp), %cl movl -0x18(%rbp), %edx movsbl %cl, %esi callq *%rax movl %eax, -0x4(%rbp) jmp 0x42734 movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) leaq -0x30(%rbp), %rdi xorl %esi, %esi movl $0x8, %edx callq 0x13250 movq -0x28(%rbp), %rax movl (%rax), %eax movl %eax, -0x30(%rbp) movsbl -0x11(%rbp), %edx movl $0x4, %eax movl $0x1, %ecx cmpl $0x0, %edx cmovnel %ecx, %eax movw %ax, -0x2c(%rbp) cmpl $0x0, -0x18(%rbp) jne 0x426e7 movl $0xffffffff, -0x18(%rbp) # imm = 0xFFFFFFFF jmp 0x426e9 movl -0x18(%rbp), %edx leaq -0x30(%rbp), %rdi movl $0x1, %esi callq 0x13690 movl %eax, -0x1c(%rbp) xorl %eax, %eax cmpl $-0x1, -0x1c(%rbp) movb %al, -0x35(%rbp) jne 0x42716 callq 0x13050 cmpl $0x4, (%rax) sete %al movb %al, -0x35(%rbp) movb -0x35(%rbp), %al testb $0x1, %al jne 0x426e9 cmpl $0x0, -0x1c(%rbp) jne 0x4272e callq 0x13050 movl $0x6e, (%rax) movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax)
pvio_socket_wait_io_or_timeout: push rbp mov rbp, rsp sub rsp, 40h mov al, sil mov [rbp+var_10], rdi mov [rbp+var_11], al mov [rbp+var_18], edx mov [rbp+var_28], 0 cmp [rbp+var_10], 0 jz short loc_4261E mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jnz short loc_4262A loc_4261E: mov [rbp+var_4], 0 jmp loc_42734 loc_4262A: mov rax, [rbp+var_10] mov rax, [rax+40h] cmp qword ptr [rax+480h], 0 jz short loc_4269E mov rax, [rbp+var_10] mov rax, [rax+40h] mov rax, [rax+480h] cmp qword ptr [rax+140h], 0 jz short loc_4269E mov rdi, [rbp+var_10] lea rsi, [rbp+var_34] call pvio_socket_get_handle cmp al, 0 jz short loc_42672 mov [rbp+var_4], 0 jmp loc_42734 loc_42672: mov rax, [rbp+var_10] mov rax, [rax+40h] mov rax, [rax+480h] mov rax, [rax+140h] mov edi, [rbp+var_34] mov cl, [rbp+var_11] mov edx, [rbp+var_18] movsx esi, cl call rax mov [rbp+var_4], eax jmp loc_42734 loc_4269E: mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_28], rax lea rdi, [rbp+var_30] xor esi, esi mov edx, 8 call _memset mov rax, [rbp+var_28] mov eax, [rax] mov [rbp+var_30], eax movsx edx, [rbp+var_11] mov eax, 4 mov ecx, 1 cmp edx, 0 cmovnz eax, ecx mov [rbp+var_2C], ax cmp [rbp+var_18], 0 jnz short loc_426E7 mov [rbp+var_18], 0FFFFFFFFh loc_426E7: jmp short $+2 loc_426E9: mov edx, [rbp+var_18] lea rdi, [rbp+var_30] mov esi, 1 call _poll mov [rbp+var_1C], eax xor eax, eax cmp [rbp+var_1C], 0FFFFFFFFh mov [rbp+var_35], al jnz short loc_42716 call ___errno_location cmp dword ptr [rax], 4 setz al mov [rbp+var_35], al loc_42716: mov al, [rbp+var_35] test al, 1 jnz short loc_426E9 cmp [rbp+var_1C], 0 jnz short loc_4272E call ___errno_location mov dword ptr [rax], 6Eh ; 'n' loc_4272E: mov eax, [rbp+var_1C] mov [rbp+var_4], eax loc_42734: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long pvio_socket_wait_io_or_timeout(int **a1, char a2, unsigned int a3) { __int16 v3; // ax bool v5; // [rsp+Bh] [rbp-35h] unsigned int v6; // [rsp+Ch] [rbp-34h] BYREF int v7; // [rsp+10h] [rbp-30h] BYREF __int16 v8; // [rsp+14h] [rbp-2Ch] int *v9; // [rsp+18h] [rbp-28h] unsigned int v10; // [rsp+24h] [rbp-1Ch] unsigned int v11; // [rsp+28h] [rbp-18h] char v12; // [rsp+2Fh] [rbp-11h] int **v13; // [rsp+30h] [rbp-10h] v13 = a1; v12 = a2; v11 = a3; v9 = 0LL; if ( a1 && *v13 ) { if ( *((_QWORD *)v13[8] + 144) && *(_QWORD *)(*((_QWORD *)v13[8] + 144) + 320LL) ) { if ( (unsigned __int8)pvio_socket_get_handle(v13, &v6) ) return 0; else return (unsigned int)(*(long long ( **)(_QWORD, _QWORD, _QWORD))(*((_QWORD *)v13[8] + 144) + 320LL))( v6, (unsigned int)v12, v11); } else { v9 = *v13; memset(&v7, 0LL, 8LL); v7 = *v9; v3 = 4; if ( v12 ) v3 = 1; v8 = v3; if ( !v11 ) v11 = -1; do { v10 = poll(&v7, 1LL, v11); v5 = 0; if ( v10 == -1 ) v5 = *(_DWORD *)__errno_location(&v7) == 4; } while ( v5 ); if ( !v10 ) *(_DWORD *)__errno_location(&v7) = 110; return v10; } } else { return 0; } }
pvio_socket_wait_io_or_timeout: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV AL,SIL MOV qword ptr [RBP + -0x10],RDI MOV byte ptr [RBP + -0x11],AL MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x28],0x0 CMP qword ptr [RBP + -0x10],0x0 JZ 0x0014261e MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JNZ 0x0014262a LAB_0014261e: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00142734 LAB_0014262a: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] CMP qword ptr [RAX + 0x480],0x0 JZ 0x0014269e MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RAX + 0x480] CMP qword ptr [RAX + 0x140],0x0 JZ 0x0014269e MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x34] CALL 0x00143620 CMP AL,0x0 JZ 0x00142672 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00142734 LAB_00142672: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x140] MOV EDI,dword ptr [RBP + -0x34] MOV CL,byte ptr [RBP + -0x11] MOV EDX,dword ptr [RBP + -0x18] MOVSX ESI,CL CALL RAX MOV dword ptr [RBP + -0x4],EAX JMP 0x00142734 LAB_0014269e: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX LEA RDI,[RBP + -0x30] XOR ESI,ESI MOV EDX,0x8 CALL 0x00113250 MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x30],EAX MOVSX EDX,byte ptr [RBP + -0x11] MOV EAX,0x4 MOV ECX,0x1 CMP EDX,0x0 CMOVNZ EAX,ECX MOV word ptr [RBP + -0x2c],AX CMP dword ptr [RBP + -0x18],0x0 JNZ 0x001426e7 MOV dword ptr [RBP + -0x18],0xffffffff LAB_001426e7: JMP 0x001426e9 LAB_001426e9: MOV EDX,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x30] MOV ESI,0x1 CALL 0x00113690 MOV dword ptr [RBP + -0x1c],EAX XOR EAX,EAX CMP dword ptr [RBP + -0x1c],-0x1 MOV byte ptr [RBP + -0x35],AL JNZ 0x00142716 CALL 0x00113050 CMP dword ptr [RAX],0x4 SETZ AL MOV byte ptr [RBP + -0x35],AL LAB_00142716: MOV AL,byte ptr [RBP + -0x35] TEST AL,0x1 JNZ 0x001426e9 CMP dword ptr [RBP + -0x1c],0x0 JNZ 0x0014272e CALL 0x00113050 MOV dword ptr [RAX],0x6e LAB_0014272e: MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x4],EAX LAB_00142734: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int pvio_socket_wait_io_or_timeout(long *param_1,char param_2,int param_3) { char cVar1; int *piVar2; bool bVar3; int4 local_3c; pollfd local_38; int *local_30; int local_24; int local_20; char local_19; long *local_18; int local_c; local_30 = (int *)0x0; if ((param_1 == (long *)0x0) || (*param_1 == 0)) { local_c = 0; } else { local_20 = param_3; local_19 = param_2; local_18 = param_1; if ((*(long *)(param_1[8] + 0x480) == 0) || (*(long *)(*(long *)(param_1[8] + 0x480) + 0x140) == 0)) { local_30 = (int *)*param_1; memset(&local_38,0,8); local_38.fd = *local_30; local_38.events = 4; if (local_19 != '\0') { local_38.events = 1; } if (local_20 == 0) { local_20 = -1; } do { local_24 = poll(&local_38,1,local_20); bVar3 = false; if (local_24 == -1) { piVar2 = __errno_location(); bVar3 = *piVar2 == 4; } } while (bVar3); if (local_24 == 0) { piVar2 = __errno_location(); *piVar2 = 0x6e; } local_c = local_24; } else { cVar1 = pvio_socket_get_handle(param_1,&local_3c); if (cVar1 == '\0') { local_c = (**(code **)(*(long *)(local_18[8] + 0x480) + 0x140)) (local_3c,(int)local_19,local_20,local_19); } else { local_c = 0; } } } return local_c; }
4,661
my_hash_reset
eloqsql/mysys/hash.c
void my_hash_reset(HASH *hash) { DBUG_ENTER("my_hash_reset"); DBUG_PRINT("enter",("hash:%p", hash)); my_hash_free_elements(hash); reset_dynamic(&hash->array); /* Set row pointers so that the hash can be reused at once */ hash->blength= 1; DBUG_VOID_RETURN; }
O3
c
my_hash_reset: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl 0x18(%rdi), %r14d testq %r14, %r14 je 0x4bda0 movq $0x0, 0x18(%rbx) cmpq $0x0, 0x60(%rbx) je 0x4bda0 movq 0x28(%rbx), %r15 shlq $0x4, %r14 addq %r15, %r14 movq 0x8(%r15), %rdi addq $0x10, %r15 callq *0x60(%rbx) cmpq %r14, %r15 jb 0x4bd90 movl $0x0, 0x30(%rbx) movq $0x1, 0x10(%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
my_hash_reset: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov r14d, [rdi+18h] test r14, r14 jz short loc_4BDA0 mov qword ptr [rbx+18h], 0 cmp qword ptr [rbx+60h], 0 jz short loc_4BDA0 mov r15, [rbx+28h] shl r14, 4 add r14, r15 loc_4BD90: mov rdi, [r15+8] add r15, 10h call qword ptr [rbx+60h] cmp r15, r14 jb short loc_4BD90 loc_4BDA0: mov dword ptr [rbx+30h], 0 mov qword ptr [rbx+10h], 1 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long my_hash_reset(long long a1) { long long v2; // r14 unsigned long long v3; // r15 unsigned long long v4; // r14 long long v5; // rdi long long result; // rax v2 = *(unsigned int *)(a1 + 24); if ( *(_DWORD *)(a1 + 24) ) { *(_QWORD *)(a1 + 24) = 0LL; if ( *(_QWORD *)(a1 + 96) ) { v3 = *(_QWORD *)(a1 + 40); v4 = v3 + 16 * v2; do { v5 = *(_QWORD *)(v3 + 8); v3 += 16LL; result = (*(long long ( **)(long long))(a1 + 96))(v5); } while ( v3 < v4 ); } } *(_DWORD *)(a1 + 48) = 0; *(_QWORD *)(a1 + 16) = 1LL; return result; }
my_hash_reset: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV R14D,dword ptr [RDI + 0x18] TEST R14,R14 JZ 0x0014bda0 MOV qword ptr [RBX + 0x18],0x0 CMP qword ptr [RBX + 0x60],0x0 JZ 0x0014bda0 MOV R15,qword ptr [RBX + 0x28] SHL R14,0x4 ADD R14,R15 LAB_0014bd90: MOV RDI,qword ptr [R15 + 0x8] ADD R15,0x10 CALL qword ptr [RBX + 0x60] CMP R15,R14 JC 0x0014bd90 LAB_0014bda0: MOV dword ptr [RBX + 0x30],0x0 MOV qword ptr [RBX + 0x10],0x1 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void my_hash_reset(long param_1) { int8 *puVar1; uint uVar2; ulong uVar3; ulong uVar4; uVar2 = *(uint *)(param_1 + 0x18); if (((ulong)uVar2 != 0) && (*(int8 *)(param_1 + 0x18) = 0, *(long *)(param_1 + 0x60) != 0)) { uVar4 = *(ulong *)(param_1 + 0x28); uVar3 = (ulong)uVar2 * 0x10 + uVar4; do { puVar1 = (int8 *)(uVar4 + 8); uVar4 = uVar4 + 0x10; (**(code **)(param_1 + 0x60))(*puVar1); } while (uVar4 < uVar3); } *(int4 *)(param_1 + 0x30) = 0; *(int8 *)(param_1 + 0x10) = 1; return; }
4,662
JS_AddIntrinsicWeakRef
bluesky950520[P]quickjs/quickjs.c
void JS_AddIntrinsicWeakRef(JSContext *ctx) { JSRuntime *rt = ctx->rt; /* WeakRef */ if (!JS_IsRegisteredClass(rt, JS_CLASS_WEAK_REF)) { init_class_range(rt, js_weakref_class_def, JS_CLASS_WEAK_REF, countof(js_weakref_class_def)); } ctx->class_proto[JS_CLASS_WEAK_REF] = JS_NewObject(ctx); JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_WEAK_REF], js_weakref_proto_funcs, countof(js_weakref_proto_funcs)); JS_NewGlobalCConstructor(ctx, "WeakRef", js_weakref_constructor, 1, ctx->class_proto[JS_CLASS_WEAK_REF]); /* FinalizationRegistry */ if (!JS_IsRegisteredClass(rt, JS_CLASS_FINALIZATION_REGISTRY)) { init_class_range(rt, js_finrec_class_def, JS_CLASS_FINALIZATION_REGISTRY, countof(js_finrec_class_def)); } ctx->class_proto[JS_CLASS_FINALIZATION_REGISTRY] = JS_NewObject(ctx); JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_FINALIZATION_REGISTRY], js_finrec_proto_funcs, countof(js_finrec_proto_funcs)); JS_NewGlobalCConstructor(ctx, "FinalizationRegistry", js_finrec_constructor, 1, ctx->class_proto[JS_CLASS_FINALIZATION_REGISTRY]); }
O0
c
JS_AddIntrinsicWeakRef: subq $0x68, %rsp movq %rdi, 0x60(%rsp) movq 0x60(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x58(%rsp) movq 0x58(%rsp), %rdi movl $0x3a, %esi callq 0x27f70 cmpl $0x0, %eax jne 0x26436 movq 0x58(%rsp), %rdi leaq 0x1090f9(%rip), %rsi # 0x12f520 movl $0x3a, %edx movl $0x1, %ecx callq 0x21230 movq 0x60(%rsp), %rax movq 0x40(%rax), %rax movq %rax, 0x10(%rsp) movq 0x60(%rsp), %rdi callq 0x292b0 movq %rax, %rcx movq 0x10(%rsp), %rax movq %rcx, 0x48(%rsp) movq %rdx, 0x50(%rsp) movq 0x48(%rsp), %rcx movq %rcx, 0x3a0(%rax) movq 0x50(%rsp), %rcx movq %rcx, 0x3a8(%rax) movq 0x60(%rsp), %rdi movq 0x60(%rsp), %rax movq 0x40(%rax), %rax movq 0x3a0(%rax), %rsi movq 0x3a8(%rax), %rdx leaq 0x10d5e5(%rip), %rcx # 0x133a80 movl $0x2, %r8d callq 0x4b840 movq 0x60(%rsp), %rdi movq 0x60(%rsp), %rax movq 0x40(%rax), %rax movq 0x3a0(%rax), %r8 movq 0x3a8(%rax), %r9 leaq 0xe62bf(%rip), %rsi # 0x10c788 leaq 0x32e60(%rip), %rdx # 0x59330 movl $0x1, %ecx callq 0x4ceb0 movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) movq 0x58(%rsp), %rdi movl $0x3b, %esi callq 0x27f70 cmpl $0x0, %eax jne 0x26513 movq 0x58(%rsp), %rdi leaq 0x10903c(%rip), %rsi # 0x12f540 movl $0x3b, %edx movl $0x1, %ecx callq 0x21230 movq 0x60(%rsp), %rax movq 0x40(%rax), %rax movq %rax, 0x8(%rsp) movq 0x60(%rsp), %rdi callq 0x292b0 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq 0x28(%rsp), %rcx movq %rcx, 0x3b0(%rax) movq 0x30(%rsp), %rcx movq %rcx, 0x3b8(%rax) movq 0x60(%rsp), %rdi movq 0x60(%rsp), %rax movq 0x40(%rax), %rax movq 0x3b0(%rax), %rsi movq 0x3b8(%rax), %rdx leaq 0x10d548(%rip), %rcx # 0x133ac0 movl $0x3, %r8d callq 0x4b840 movq 0x60(%rsp), %rdi movq 0x60(%rsp), %rax movq 0x40(%rax), %rax movq 0x3b0(%rax), %r8 movq 0x3b8(%rax), %r9 leaq 0xe61ea(%rip), %rsi # 0x10c790 leaq 0x32f93(%rip), %rdx # 0x59540 movl $0x1, %ecx callq 0x4ceb0 movq %rax, 0x18(%rsp) movq %rdx, 0x20(%rsp) addq $0x68, %rsp retq nopw %cs:(%rax,%rax)
JS_AddIntrinsicWeakRef: sub rsp, 68h mov [rsp+68h+var_8], rdi mov rax, [rsp+68h+var_8] mov rax, [rax+18h] mov [rsp+68h+var_10], rax mov rdi, [rsp+68h+var_10] mov esi, 3Ah ; ':' call JS_IsRegisteredClass cmp eax, 0 jnz short loc_26436 mov rdi, [rsp+68h+var_10] lea rsi, js_weakref_class_def mov edx, 3Ah ; ':' mov ecx, 1 call init_class_range loc_26436: mov rax, [rsp+68h+var_8] mov rax, [rax+40h] mov [rsp+68h+var_58], rax mov rdi, [rsp+68h+var_8] call JS_NewObject mov rcx, rax mov rax, [rsp+68h+var_58] mov [rsp+68h+var_20], rcx mov [rsp+68h+var_18], rdx mov rcx, [rsp+68h+var_20] mov [rax+3A0h], rcx mov rcx, [rsp+68h+var_18] mov [rax+3A8h], rcx mov rdi, [rsp+68h+var_8] mov rax, [rsp+68h+var_8] mov rax, [rax+40h] mov rsi, [rax+3A0h] mov rdx, [rax+3A8h] lea rcx, js_weakref_proto_funcs mov r8d, 2 call JS_SetPropertyFunctionList mov rdi, [rsp+68h+var_8] mov rax, [rsp+68h+var_8] mov rax, [rax+40h] mov r8, [rax+3A0h] mov r9, [rax+3A8h] lea rsi, aWeakref; "WeakRef" lea rdx, js_weakref_constructor mov ecx, 1 call JS_NewGlobalCConstructor mov [rsp+68h+var_30], rax mov [rsp+68h+var_28], rdx mov rdi, [rsp+68h+var_10] mov esi, 3Bh ; ';' call JS_IsRegisteredClass cmp eax, 0 jnz short loc_26513 mov rdi, [rsp+68h+var_10] lea rsi, js_finrec_class_def mov edx, 3Bh ; ';' mov ecx, 1 call init_class_range loc_26513: mov rax, [rsp+68h+var_8] mov rax, [rax+40h] mov [rsp+68h+var_60], rax mov rdi, [rsp+68h+var_8] call JS_NewObject mov rcx, rax mov rax, [rsp+68h+var_60] mov [rsp+68h+var_40], rcx mov [rsp+68h+var_38], rdx mov rcx, [rsp+68h+var_40] mov [rax+3B0h], rcx mov rcx, [rsp+68h+var_38] mov [rax+3B8h], rcx mov rdi, [rsp+68h+var_8] mov rax, [rsp+68h+var_8] mov rax, [rax+40h] mov rsi, [rax+3B0h] mov rdx, [rax+3B8h] lea rcx, js_finrec_proto_funcs mov r8d, 3 call JS_SetPropertyFunctionList mov rdi, [rsp+68h+var_8] mov rax, [rsp+68h+var_8] mov rax, [rax+40h] mov r8, [rax+3B0h] mov r9, [rax+3B8h] lea rsi, aFinalizationre; "FinalizationRegistry" lea rdx, js_finrec_constructor mov ecx, 1 call JS_NewGlobalCConstructor mov [rsp+68h+var_50], rax mov [rsp+68h+var_48], rdx add rsp, 68h retn
long long JS_AddIntrinsicWeakRef(long long a1) { long long v1; // rdx long long v2; // rdx long long v4; // [rsp+8h] [rbp-60h] long long v5; // [rsp+10h] [rbp-58h] long long v6; // [rsp+58h] [rbp-10h] v6 = *(_QWORD *)(a1 + 24); if ( !(unsigned int)JS_IsRegisteredClass(v6, 58LL) ) init_class_range(v6, (long long)&js_weakref_class_def, 58, 1); v5 = *(_QWORD *)(a1 + 64); *(_QWORD *)(v5 + 928) = JS_NewObject(a1); *(_QWORD *)(v5 + 936) = v1; JS_SetPropertyFunctionList( a1, *(_QWORD *)(*(_QWORD *)(a1 + 64) + 928LL), *(_QWORD *)(*(_QWORD *)(a1 + 64) + 936LL), &js_weakref_proto_funcs, 2LL); JS_NewGlobalCConstructor( a1, "WeakRef", js_weakref_constructor, 1LL, *(_QWORD *)(*(_QWORD *)(a1 + 64) + 928LL), *(_QWORD *)(*(_QWORD *)(a1 + 64) + 936LL)); if ( !(unsigned int)JS_IsRegisteredClass(v6, 59LL) ) init_class_range(v6, (long long)&js_finrec_class_def, 59, 1); v4 = *(_QWORD *)(a1 + 64); *(_QWORD *)(v4 + 944) = JS_NewObject(a1); *(_QWORD *)(v4 + 952) = v2; JS_SetPropertyFunctionList( a1, *(_QWORD *)(*(_QWORD *)(a1 + 64) + 944LL), *(_QWORD *)(*(_QWORD *)(a1 + 64) + 952LL), &js_finrec_proto_funcs, 3LL); return JS_NewGlobalCConstructor( a1, "FinalizationRegistry", js_finrec_constructor, 1LL, *(_QWORD *)(*(_QWORD *)(a1 + 64) + 944LL), *(_QWORD *)(*(_QWORD *)(a1 + 64) + 952LL)); }
JS_AddIntrinsicWeakRef: SUB RSP,0x68 MOV qword ptr [RSP + 0x60],RDI MOV RAX,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x58],RAX MOV RDI,qword ptr [RSP + 0x58] MOV ESI,0x3a CALL 0x00127f70 CMP EAX,0x0 JNZ 0x00126436 MOV RDI,qword ptr [RSP + 0x58] LEA RSI,[0x22f520] MOV EDX,0x3a MOV ECX,0x1 CALL 0x00121230 LAB_00126436: MOV RAX,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x60] CALL 0x001292b0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x48],RCX MOV qword ptr [RSP + 0x50],RDX MOV RCX,qword ptr [RSP + 0x48] MOV qword ptr [RAX + 0x3a0],RCX MOV RCX,qword ptr [RSP + 0x50] MOV qword ptr [RAX + 0x3a8],RCX MOV RDI,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RAX + 0x3a0] MOV RDX,qword ptr [RAX + 0x3a8] LEA RCX,[0x233a80] MOV R8D,0x2 CALL 0x0014b840 MOV RDI,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RAX + 0x40] MOV R8,qword ptr [RAX + 0x3a0] MOV R9,qword ptr [RAX + 0x3a8] LEA RSI,[0x20c788] LEA RDX,[0x159330] MOV ECX,0x1 CALL 0x0014ceb0 MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RDX MOV RDI,qword ptr [RSP + 0x58] MOV ESI,0x3b CALL 0x00127f70 CMP EAX,0x0 JNZ 0x00126513 MOV RDI,qword ptr [RSP + 0x58] LEA RSI,[0x22f540] MOV EDX,0x3b MOV ECX,0x1 CALL 0x00121230 LAB_00126513: MOV RAX,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x60] CALL 0x001292b0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x28],RCX MOV qword ptr [RSP + 0x30],RDX MOV RCX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x3b0],RCX MOV RCX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x3b8],RCX MOV RDI,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RAX + 0x3b0] MOV RDX,qword ptr [RAX + 0x3b8] LEA RCX,[0x233ac0] MOV R8D,0x3 CALL 0x0014b840 MOV RDI,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RAX + 0x40] MOV R8,qword ptr [RAX + 0x3b0] MOV R9,qword ptr [RAX + 0x3b8] LEA RSI,[0x20c790] LEA RDX,[0x159540] MOV ECX,0x1 CALL 0x0014ceb0 MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],RDX ADD RSP,0x68 RET
void JS_AddIntrinsicWeakRef(long param_1) { int8 uVar1; long lVar2; int iVar3; int1 auVar4 [16]; uVar1 = *(int8 *)(param_1 + 0x18); iVar3 = JS_IsRegisteredClass(uVar1,0x3a); if (iVar3 == 0) { init_class_range(uVar1,js_weakref_class_def,0x3a,1); } lVar2 = *(long *)(param_1 + 0x40); auVar4 = JS_NewObject(param_1); *(int1 (*) [16])(lVar2 + 0x3a0) = auVar4; JS_SetPropertyFunctionList (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x3a0), *(int8 *)(*(long *)(param_1 + 0x40) + 0x3a8),js_weakref_proto_funcs,2); JS_NewGlobalCConstructor (param_1,"WeakRef",js_weakref_constructor,1, *(int8 *)(*(long *)(param_1 + 0x40) + 0x3a0), *(int8 *)(*(long *)(param_1 + 0x40) + 0x3a8)); iVar3 = JS_IsRegisteredClass(uVar1,0x3b); if (iVar3 == 0) { init_class_range(uVar1,js_finrec_class_def,0x3b,1); } lVar2 = *(long *)(param_1 + 0x40); auVar4 = JS_NewObject(param_1); *(int1 (*) [16])(lVar2 + 0x3b0) = auVar4; JS_SetPropertyFunctionList (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x3b0), *(int8 *)(*(long *)(param_1 + 0x40) + 0x3b8),js_finrec_proto_funcs,3); JS_NewGlobalCConstructor (param_1,"FinalizationRegistry",js_finrec_constructor,1, *(int8 *)(*(long *)(param_1 + 0x40) + 0x3b0), *(int8 *)(*(long *)(param_1 + 0x40) + 0x3b8)); return; }
4,663
JS_AddIntrinsicWeakRef
bluesky950520[P]quickjs/quickjs.c
void JS_AddIntrinsicWeakRef(JSContext *ctx) { JSRuntime *rt = ctx->rt; /* WeakRef */ if (!JS_IsRegisteredClass(rt, JS_CLASS_WEAK_REF)) { init_class_range(rt, js_weakref_class_def, JS_CLASS_WEAK_REF, countof(js_weakref_class_def)); } ctx->class_proto[JS_CLASS_WEAK_REF] = JS_NewObject(ctx); JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_WEAK_REF], js_weakref_proto_funcs, countof(js_weakref_proto_funcs)); JS_NewGlobalCConstructor(ctx, "WeakRef", js_weakref_constructor, 1, ctx->class_proto[JS_CLASS_WEAK_REF]); /* FinalizationRegistry */ if (!JS_IsRegisteredClass(rt, JS_CLASS_FINALIZATION_REGISTRY)) { init_class_range(rt, js_finrec_class_def, JS_CLASS_FINALIZATION_REGISTRY, countof(js_finrec_class_def)); } ctx->class_proto[JS_CLASS_FINALIZATION_REGISTRY] = JS_NewObject(ctx); JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_FINALIZATION_REGISTRY], js_finrec_proto_funcs, countof(js_finrec_proto_funcs)); JS_NewGlobalCConstructor(ctx, "FinalizationRegistry", js_finrec_constructor, 1, ctx->class_proto[JS_CLASS_FINALIZATION_REGISTRY]); }
O1
c
JS_AddIntrinsicWeakRef: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx movq 0x18(%rdi), %r14 cmpl $0x3b, 0x78(%r14) jb 0x1eb77 movq 0x80(%r14), %rax cmpl $0x0, 0x910(%rax) jne 0x1eb90 leaq 0xa78b2(%rip), %rsi # 0xc6430 movq %r14, %rdi movl $0x3a, %edx movl $0x1, %ecx callq 0x1c235 movq 0x40(%rbx), %r15 movq 0x10(%r15), %rsi movq 0x18(%r15), %rdx movq %rbx, %rdi movl $0x1, %ecx callq 0x202f1 movq %rax, 0x3a0(%r15) movq %rdx, 0x3a8(%r15) movq 0x40(%rbx), %rax movq 0x3a0(%rax), %rsi movq 0x3a8(%rax), %rdx leaq 0xabdd0(%rip), %rcx # 0xca9a0 movq %rbx, %rdi movl $0x2, %r8d callq 0x32053 movq 0x40(%rbx), %rax movq 0x3a0(%rax), %r15 movq 0x3a8(%rax), %r12 leaq 0x48(%rbx), %rbp movups 0x48(%rbx), %xmm0 movups %xmm0, (%rsp) leaq 0x1ab58(%rip), %rsi # 0x3975b leaq 0x7eb82(%rip), %r13 # 0x9d78c movq %rbx, %rdi movq %r13, %rdx movl $0x1, %ecx movl $0x4, %r8d xorl %r9d, %r9d callq 0x203f2 movq %rbx, %rdi movq %rax, %rsi movq %r13, %rcx movq %r15, %r8 movq %r12, %r9 callq 0x35596 cmpl $0x3c, 0x78(%r14) jb 0x1ec4e movq 0x80(%r14), %rax cmpl $0x0, 0x938(%rax) jne 0x1ec67 leaq 0xa77fb(%rip), %rsi # 0xc6450 movq %r14, %rdi movl $0x3b, %edx movl $0x1, %ecx callq 0x1c235 movq 0x40(%rbx), %r14 movq 0x10(%r14), %rsi movq 0x18(%r14), %rdx movq %rbx, %rdi movl $0x1, %ecx callq 0x202f1 movq %rax, 0x3b0(%r14) movq %rdx, 0x3b8(%r14) movq 0x40(%rbx), %rax movq 0x3b0(%rax), %rsi movq 0x3b8(%rax), %rdx leaq 0xabd39(%rip), %rcx # 0xca9e0 movq %rbx, %rdi movl $0x3, %r8d callq 0x32053 movq 0x40(%rbx), %rax movq 0x3b0(%rax), %r14 movq 0x3b8(%rax), %r15 movups (%rbp), %xmm0 movups %xmm0, (%rsp) leaq 0x1abde(%rip), %rsi # 0x398b4 leaq 0x7eab7(%rip), %r12 # 0x9d794 movq %rbx, %rdi movq %r12, %rdx movl $0x1, %ecx movl $0x4, %r8d xorl %r9d, %r9d callq 0x203f2 movq %rbx, %rdi movq %rax, %rsi movq %r12, %rcx movq %r14, %r8 movq %r15, %r9 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x35596
JS_AddIntrinsicWeakRef: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi mov r14, [rdi+18h] cmp dword ptr [r14+78h], 3Bh ; ';' jb short loc_1EB77 mov rax, [r14+80h] cmp dword ptr [rax+910h], 0 jnz short loc_1EB90 loc_1EB77: lea rsi, js_weakref_class_def mov rdi, r14 mov edx, 3Ah ; ':' mov ecx, 1 call init_class_range loc_1EB90: mov r15, [rbx+40h] mov rsi, [r15+10h] mov rdx, [r15+18h] mov rdi, rbx mov ecx, 1 call JS_NewObjectProtoClass mov [r15+3A0h], rax mov [r15+3A8h], rdx mov rax, [rbx+40h] mov rsi, [rax+3A0h] mov rdx, [rax+3A8h] lea rcx, js_weakref_proto_funcs mov rdi, rbx mov r8d, 2 call JS_SetPropertyFunctionList mov rax, [rbx+40h] mov r15, [rax+3A0h] mov r12, [rax+3A8h] lea rbp, [rbx+48h] movups xmm0, xmmword ptr [rbx+48h] movups [rsp+48h+var_48], xmm0 lea rsi, js_weakref_constructor lea r13, aWeakref; "WeakRef" mov rdi, rbx mov rdx, r13 mov ecx, 1 mov r8d, 4 xor r9d, r9d call JS_NewCFunction3 mov rdi, rbx mov rsi, rax mov rcx, r13 mov r8, r15 mov r9, r12 call JS_NewGlobalCConstructor2 cmp dword ptr [r14+78h], 3Ch ; '<' jb short loc_1EC4E mov rax, [r14+80h] cmp dword ptr [rax+938h], 0 jnz short loc_1EC67 loc_1EC4E: lea rsi, js_finrec_class_def mov rdi, r14 mov edx, 3Bh ; ';' mov ecx, 1 call init_class_range loc_1EC67: mov r14, [rbx+40h] mov rsi, [r14+10h] mov rdx, [r14+18h] mov rdi, rbx mov ecx, 1 call JS_NewObjectProtoClass mov [r14+3B0h], rax mov [r14+3B8h], rdx mov rax, [rbx+40h] mov rsi, [rax+3B0h] mov rdx, [rax+3B8h] lea rcx, js_finrec_proto_funcs mov rdi, rbx mov r8d, 3 call JS_SetPropertyFunctionList mov rax, [rbx+40h] mov r14, [rax+3B0h] mov r15, [rax+3B8h] movups xmm0, xmmword ptr [rbp+0] movups [rsp+48h+var_48], xmm0 lea rsi, js_finrec_constructor lea r12, aFinalizationre; "FinalizationRegistry" mov rdi, rbx mov rdx, r12 mov ecx, 1 mov r8d, 4 xor r9d, r9d call JS_NewCFunction3 mov rdi, rbx mov rsi, rax mov rcx, r12 mov r8, r14 mov r9, r15 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp JS_NewGlobalCConstructor2
long long JS_AddIntrinsicWeakRef(long long *a1) { long long v1; // r14 _QWORD *v2; // r15 long long v3; // rdx long long v4; // rax long long v5; // r15 long long v6; // r12 long long v7; // rax long long v8; // rdx _QWORD *v9; // r14 long long v10; // rdx long long v11; // rax long long v12; // r14 long long v13; // r15 long long v14; // rax long long v15; // rdx v1 = a1[3]; if ( *(_DWORD *)(v1 + 120) < 0x3Bu || !*(_DWORD *)(*(_QWORD *)(v1 + 128) + 2320LL) ) init_class_range(a1[3], (long long)&js_weakref_class_def, 0x3Au, 1); v2 = (_QWORD *)a1[8]; v2[116] = JS_NewObjectProtoClass(a1, v2[2], v2[3], 1LL); v2[117] = v3; JS_SetPropertyFunctionList(a1, *(_QWORD *)(a1[8] + 928), *(_QWORD *)(a1[8] + 936), &js_weakref_proto_funcs, 2LL); v4 = a1[8]; v5 = *(_QWORD *)(v4 + 928); v6 = *(_QWORD *)(v4 + 936); v7 = JS_NewCFunction3( (_DWORD)a1, (unsigned int)js_weakref_constructor, (unsigned int)"WeakRef", 1, 4, 0, a1[9], a1[10]); JS_NewGlobalCConstructor2(a1, v7, v8, "WeakRef", v5, v6); if ( *(_DWORD *)(v1 + 120) < 0x3Cu || !*(_DWORD *)(*(_QWORD *)(v1 + 128) + 2360LL) ) init_class_range(v1, (long long)&js_finrec_class_def, 0x3Bu, 1); v9 = (_QWORD *)a1[8]; v9[118] = JS_NewObjectProtoClass(a1, v9[2], v9[3], 1LL); v9[119] = v10; JS_SetPropertyFunctionList(a1, *(_QWORD *)(a1[8] + 944), *(_QWORD *)(a1[8] + 952), &js_finrec_proto_funcs, 3LL); v11 = a1[8]; v12 = *(_QWORD *)(v11 + 944); v13 = *(_QWORD *)(v11 + 952); v14 = JS_NewCFunction3( (_DWORD)a1, (unsigned int)js_finrec_constructor, (unsigned int)"FinalizationRegistry", 1, 4, 0, a1[9], a1[10]); return JS_NewGlobalCConstructor2(a1, v14, v15, "FinalizationRegistry", v12, v13); }
JS_AddIntrinsicWeakRef: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI MOV R14,qword ptr [RDI + 0x18] CMP dword ptr [R14 + 0x78],0x3b JC 0x0011eb77 MOV RAX,qword ptr [R14 + 0x80] CMP dword ptr [RAX + 0x910],0x0 JNZ 0x0011eb90 LAB_0011eb77: LEA RSI,[0x1c6430] MOV RDI,R14 MOV EDX,0x3a MOV ECX,0x1 CALL 0x0011c235 LAB_0011eb90: MOV R15,qword ptr [RBX + 0x40] MOV RSI,qword ptr [R15 + 0x10] MOV RDX,qword ptr [R15 + 0x18] MOV RDI,RBX MOV ECX,0x1 CALL 0x001202f1 MOV qword ptr [R15 + 0x3a0],RAX MOV qword ptr [R15 + 0x3a8],RDX MOV RAX,qword ptr [RBX + 0x40] MOV RSI,qword ptr [RAX + 0x3a0] MOV RDX,qword ptr [RAX + 0x3a8] LEA RCX,[0x1ca9a0] MOV RDI,RBX MOV R8D,0x2 CALL 0x00132053 MOV RAX,qword ptr [RBX + 0x40] MOV R15,qword ptr [RAX + 0x3a0] MOV R12,qword ptr [RAX + 0x3a8] LEA RBP,[RBX + 0x48] MOVUPS XMM0,xmmword ptr [RBX + 0x48] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x13975b] LEA R13,[0x19d78c] MOV RDI,RBX MOV RDX,R13 MOV ECX,0x1 MOV R8D,0x4 XOR R9D,R9D CALL 0x001203f2 MOV RDI,RBX MOV RSI,RAX MOV RCX,R13 MOV R8,R15 MOV R9,R12 CALL 0x00135596 CMP dword ptr [R14 + 0x78],0x3c JC 0x0011ec4e MOV RAX,qword ptr [R14 + 0x80] CMP dword ptr [RAX + 0x938],0x0 JNZ 0x0011ec67 LAB_0011ec4e: LEA RSI,[0x1c6450] MOV RDI,R14 MOV EDX,0x3b MOV ECX,0x1 CALL 0x0011c235 LAB_0011ec67: MOV R14,qword ptr [RBX + 0x40] MOV RSI,qword ptr [R14 + 0x10] MOV RDX,qword ptr [R14 + 0x18] MOV RDI,RBX MOV ECX,0x1 CALL 0x001202f1 MOV qword ptr [R14 + 0x3b0],RAX MOV qword ptr [R14 + 0x3b8],RDX MOV RAX,qword ptr [RBX + 0x40] MOV RSI,qword ptr [RAX + 0x3b0] MOV RDX,qword ptr [RAX + 0x3b8] LEA RCX,[0x1ca9e0] MOV RDI,RBX MOV R8D,0x3 CALL 0x00132053 MOV RAX,qword ptr [RBX + 0x40] MOV R14,qword ptr [RAX + 0x3b0] MOV R15,qword ptr [RAX + 0x3b8] MOVUPS XMM0,xmmword ptr [RBP] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x1398b4] LEA R12,[0x19d794] MOV RDI,RBX MOV RDX,R12 MOV ECX,0x1 MOV R8D,0x4 XOR R9D,R9D CALL 0x001203f2 MOV RDI,RBX MOV RSI,RAX MOV RCX,R12 MOV R8,R14 MOV R9,R15 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00135596
void JS_AddIntrinsicWeakRef(long param_1) { long lVar1; long lVar2; int8 uVar3; int8 uVar4; int1 auVar5 [16]; lVar1 = *(long *)(param_1 + 0x18); if ((*(uint *)(lVar1 + 0x78) < 0x3b) || (*(int *)(*(long *)(lVar1 + 0x80) + 0x910) == 0)) { init_class_range(lVar1,js_weakref_class_def,0x3a,1); } lVar2 = *(long *)(param_1 + 0x40); auVar5 = JS_NewObjectProtoClass (param_1,*(int8 *)(lVar2 + 0x10),*(int8 *)(lVar2 + 0x18),1); *(int1 (*) [16])(lVar2 + 0x3a0) = auVar5; JS_SetPropertyFunctionList (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x3a0), *(int8 *)(*(long *)(param_1 + 0x40) + 0x3a8),js_weakref_proto_funcs,2); uVar3 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x3a0); uVar4 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x3a8); auVar5 = JS_NewCFunction3(param_1,js_weakref_constructor,"WeakRef",1,4,0, *(int4 *)(param_1 + 0x48),*(int4 *)(param_1 + 0x50)); JS_NewGlobalCConstructor2(param_1,auVar5._0_8_,auVar5._8_8_,"WeakRef",uVar3,uVar4); if ((*(uint *)(lVar1 + 0x78) < 0x3c) || (*(int *)(*(long *)(lVar1 + 0x80) + 0x938) == 0)) { init_class_range(lVar1,js_finrec_class_def,0x3b,1); } lVar1 = *(long *)(param_1 + 0x40); auVar5 = JS_NewObjectProtoClass (param_1,*(int8 *)(lVar1 + 0x10),*(int8 *)(lVar1 + 0x18),1); *(int1 (*) [16])(lVar1 + 0x3b0) = auVar5; JS_SetPropertyFunctionList (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x3b0), *(int8 *)(*(long *)(param_1 + 0x40) + 0x3b8),js_finrec_proto_funcs,3); uVar3 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x3b0); uVar4 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x3b8); auVar5 = JS_NewCFunction3(param_1,js_finrec_constructor,"FinalizationRegistry",1,4,0, *(int4 *)(param_1 + 0x48),*(int4 *)(param_1 + 0x50)); JS_NewGlobalCConstructor2(param_1,auVar5._0_8_,auVar5._8_8_,"FinalizationRegistry",uVar3,uVar4); return; }
4,664
JS_AddIntrinsicWeakRef
bluesky950520[P]quickjs/quickjs.c
void JS_AddIntrinsicWeakRef(JSContext *ctx) { JSRuntime *rt = ctx->rt; /* WeakRef */ if (!JS_IsRegisteredClass(rt, JS_CLASS_WEAK_REF)) { init_class_range(rt, js_weakref_class_def, JS_CLASS_WEAK_REF, countof(js_weakref_class_def)); } ctx->class_proto[JS_CLASS_WEAK_REF] = JS_NewObject(ctx); JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_WEAK_REF], js_weakref_proto_funcs, countof(js_weakref_proto_funcs)); JS_NewGlobalCConstructor(ctx, "WeakRef", js_weakref_constructor, 1, ctx->class_proto[JS_CLASS_WEAK_REF]); /* FinalizationRegistry */ if (!JS_IsRegisteredClass(rt, JS_CLASS_FINALIZATION_REGISTRY)) { init_class_range(rt, js_finrec_class_def, JS_CLASS_FINALIZATION_REGISTRY, countof(js_finrec_class_def)); } ctx->class_proto[JS_CLASS_FINALIZATION_REGISTRY] = JS_NewObject(ctx); JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_FINALIZATION_REGISTRY], js_finrec_proto_funcs, countof(js_finrec_proto_funcs)); JS_NewGlobalCConstructor(ctx, "FinalizationRegistry", js_finrec_constructor, 1, ctx->class_proto[JS_CLASS_FINALIZATION_REGISTRY]); }
O2
c
JS_AddIntrinsicWeakRef: pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx movq 0x18(%rdi), %r14 cmpl $0x3b, 0x78(%r14) jb 0x1918c movq 0x80(%r14), %rax cmpl $0x0, 0x910(%rax) jne 0x191a1 leaq 0x9b29d(%rip), %rsi # 0xb4430 pushq $0x3a popq %rdx pushq $0x1 popq %rcx movq %r14, %rdi callq 0x16a95 movq 0x40(%rbx), %r15 movq %rbx, %rdi callq 0x1a74d movq %rax, 0x3a0(%r15) movq %rdx, 0x3a8(%r15) movq 0x40(%rbx), %rax movq 0x3a0(%rax), %rsi movq 0x3a8(%rax), %rdx leaq 0x9f7cc(%rip), %rcx # 0xb89a0 pushq $0x2 popq %r8 movq %rbx, %rdi callq 0x2b883 movq 0x40(%rbx), %rax movq 0x3a0(%rax), %r8 movq 0x3a8(%rax), %r9 leaq 0x6b4f3(%rip), %rsi # 0x846ec leaq 0x196f2(%rip), %rdx # 0x328f2 pushq $0x1 popq %rcx movq %rbx, %rdi callq 0x2c210 cmpl $0x3c, 0x78(%r14) jb 0x19222 movq 0x80(%r14), %rax cmpl $0x0, 0x938(%rax) jne 0x19237 leaq 0x9b227(%rip), %rsi # 0xb4450 pushq $0x3b popq %rdx pushq $0x1 popq %rcx movq %r14, %rdi callq 0x16a95 movq 0x40(%rbx), %r14 movq %rbx, %rdi callq 0x1a74d movq %rax, 0x3b0(%r14) movq %rdx, 0x3b8(%r14) movq 0x40(%rbx), %rax movq 0x3b0(%rax), %rsi movq 0x3b8(%rax), %rdx leaq 0x9f776(%rip), %rcx # 0xb89e0 pushq $0x3 popq %r8 movq %rbx, %rdi callq 0x2b883 movq 0x40(%rbx), %rax movq 0x3b0(%rax), %r8 movq 0x3b8(%rax), %r9 leaq 0x6b465(%rip), %rsi # 0x846f4 leaq 0x1976c(%rip), %rdx # 0x32a02 pushq $0x1 popq %rcx movq %rbx, %rdi popq %rbx popq %r14 popq %r15 jmp 0x2c210
JS_AddIntrinsicWeakRef: push r15 push r14 push rbx mov rbx, rdi mov r14, [rdi+18h] cmp dword ptr [r14+78h], 3Bh ; ';' jb short loc_1918C mov rax, [r14+80h] cmp dword ptr [rax+910h], 0 jnz short loc_191A1 loc_1918C: lea rsi, js_weakref_class_def push 3Ah ; ':' pop rdx push 1 pop rcx mov rdi, r14 call init_class_range loc_191A1: mov r15, [rbx+40h] mov rdi, rbx call JS_NewObject mov [r15+3A0h], rax mov [r15+3A8h], rdx mov rax, [rbx+40h] mov rsi, [rax+3A0h] mov rdx, [rax+3A8h] lea rcx, js_weakref_proto_funcs push 2 pop r8 mov rdi, rbx call JS_SetPropertyFunctionList mov rax, [rbx+40h] mov r8, [rax+3A0h] mov r9, [rax+3A8h] lea rsi, aWeakref; "WeakRef" lea rdx, js_weakref_constructor push 1 pop rcx mov rdi, rbx call JS_NewGlobalCConstructor cmp dword ptr [r14+78h], 3Ch ; '<' jb short loc_19222 mov rax, [r14+80h] cmp dword ptr [rax+938h], 0 jnz short loc_19237 loc_19222: lea rsi, js_finrec_class_def push 3Bh ; ';' pop rdx push 1 pop rcx mov rdi, r14 call init_class_range loc_19237: mov r14, [rbx+40h] mov rdi, rbx call JS_NewObject mov [r14+3B0h], rax mov [r14+3B8h], rdx mov rax, [rbx+40h] mov rsi, [rax+3B0h] mov rdx, [rax+3B8h] lea rcx, js_finrec_proto_funcs push 3 pop r8 mov rdi, rbx call JS_SetPropertyFunctionList mov rax, [rbx+40h] mov r8, [rax+3B0h] mov r9, [rax+3B8h] lea rsi, aFinalizationre; "FinalizationRegistry" lea rdx, js_finrec_constructor push 1 pop rcx mov rdi, rbx pop rbx pop r14 pop r15 jmp JS_NewGlobalCConstructor
long long JS_AddIntrinsicWeakRef(long long a1) { long long v1; // r14 long long v2; // r15 long long v3; // rdx long long v4; // r14 long long v5; // rdx v1 = *(_QWORD *)(a1 + 24); if ( *(_DWORD *)(v1 + 120) < 0x3Bu || !*(_DWORD *)(*(_QWORD *)(v1 + 128) + 2320LL) ) init_class_range(*(_QWORD *)(a1 + 24), (long long)&js_weakref_class_def, 0x3Au, 1LL); v2 = *(_QWORD *)(a1 + 64); *(_QWORD *)(v2 + 928) = JS_NewObject(a1); *(_QWORD *)(v2 + 936) = v3; JS_SetPropertyFunctionList( a1, *(_QWORD *)(*(_QWORD *)(a1 + 64) + 928LL), *(_QWORD *)(*(_QWORD *)(a1 + 64) + 936LL), &js_weakref_proto_funcs, 2LL); JS_NewGlobalCConstructor( a1, "WeakRef", js_weakref_constructor, 1LL, *(_QWORD *)(*(_QWORD *)(a1 + 64) + 928LL), *(_QWORD *)(*(_QWORD *)(a1 + 64) + 936LL)); if ( *(_DWORD *)(v1 + 120) < 0x3Cu || !*(_DWORD *)(*(_QWORD *)(v1 + 128) + 2360LL) ) init_class_range(v1, (long long)&js_finrec_class_def, 0x3Bu, 1LL); v4 = *(_QWORD *)(a1 + 64); *(_QWORD *)(v4 + 944) = JS_NewObject(a1); *(_QWORD *)(v4 + 952) = v5; JS_SetPropertyFunctionList( a1, *(_QWORD *)(*(_QWORD *)(a1 + 64) + 944LL), *(_QWORD *)(*(_QWORD *)(a1 + 64) + 952LL), &js_finrec_proto_funcs, 3LL); return JS_NewGlobalCConstructor( a1, "FinalizationRegistry", js_finrec_constructor, 1LL, *(_QWORD *)(*(_QWORD *)(a1 + 64) + 944LL), *(_QWORD *)(*(_QWORD *)(a1 + 64) + 952LL)); }
JS_AddIntrinsicWeakRef: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDI MOV R14,qword ptr [RDI + 0x18] CMP dword ptr [R14 + 0x78],0x3b JC 0x0011918c MOV RAX,qword ptr [R14 + 0x80] CMP dword ptr [RAX + 0x910],0x0 JNZ 0x001191a1 LAB_0011918c: LEA RSI,[0x1b4430] PUSH 0x3a POP RDX PUSH 0x1 POP RCX MOV RDI,R14 CALL 0x00116a95 LAB_001191a1: MOV R15,qword ptr [RBX + 0x40] MOV RDI,RBX CALL 0x0011a74d MOV qword ptr [R15 + 0x3a0],RAX MOV qword ptr [R15 + 0x3a8],RDX MOV RAX,qword ptr [RBX + 0x40] MOV RSI,qword ptr [RAX + 0x3a0] MOV RDX,qword ptr [RAX + 0x3a8] LEA RCX,[0x1b89a0] PUSH 0x2 POP R8 MOV RDI,RBX CALL 0x0012b883 MOV RAX,qword ptr [RBX + 0x40] MOV R8,qword ptr [RAX + 0x3a0] MOV R9,qword ptr [RAX + 0x3a8] LEA RSI,[0x1846ec] LEA RDX,[0x1328f2] PUSH 0x1 POP RCX MOV RDI,RBX CALL 0x0012c210 CMP dword ptr [R14 + 0x78],0x3c JC 0x00119222 MOV RAX,qword ptr [R14 + 0x80] CMP dword ptr [RAX + 0x938],0x0 JNZ 0x00119237 LAB_00119222: LEA RSI,[0x1b4450] PUSH 0x3b POP RDX PUSH 0x1 POP RCX MOV RDI,R14 CALL 0x00116a95 LAB_00119237: MOV R14,qword ptr [RBX + 0x40] MOV RDI,RBX CALL 0x0011a74d MOV qword ptr [R14 + 0x3b0],RAX MOV qword ptr [R14 + 0x3b8],RDX MOV RAX,qword ptr [RBX + 0x40] MOV RSI,qword ptr [RAX + 0x3b0] MOV RDX,qword ptr [RAX + 0x3b8] LEA RCX,[0x1b89e0] PUSH 0x3 POP R8 MOV RDI,RBX CALL 0x0012b883 MOV RAX,qword ptr [RBX + 0x40] MOV R8,qword ptr [RAX + 0x3b0] MOV R9,qword ptr [RAX + 0x3b8] LEA RSI,[0x1846f4] LEA RDX,[0x132a02] PUSH 0x1 POP RCX MOV RDI,RBX POP RBX POP R14 POP R15 JMP 0x0012c210
void JS_AddIntrinsicWeakRef(long param_1) { long lVar1; long lVar2; int1 auVar3 [16]; lVar1 = *(long *)(param_1 + 0x18); if ((*(uint *)(lVar1 + 0x78) < 0x3b) || (*(int *)(*(long *)(lVar1 + 0x80) + 0x910) == 0)) { init_class_range(lVar1,js_weakref_class_def,0x3a,1); } lVar2 = *(long *)(param_1 + 0x40); auVar3 = JS_NewObject(param_1); *(int1 (*) [16])(lVar2 + 0x3a0) = auVar3; JS_SetPropertyFunctionList (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x3a0), *(int8 *)(*(long *)(param_1 + 0x40) + 0x3a8),js_weakref_proto_funcs,2); JS_NewGlobalCConstructor (param_1,"WeakRef",js_weakref_constructor,1, *(int8 *)(*(long *)(param_1 + 0x40) + 0x3a0), *(int8 *)(*(long *)(param_1 + 0x40) + 0x3a8)); if ((*(uint *)(lVar1 + 0x78) < 0x3c) || (*(int *)(*(long *)(lVar1 + 0x80) + 0x938) == 0)) { init_class_range(lVar1,js_finrec_class_def,0x3b,1); } lVar1 = *(long *)(param_1 + 0x40); auVar3 = JS_NewObject(param_1); *(int1 (*) [16])(lVar1 + 0x3b0) = auVar3; JS_SetPropertyFunctionList (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x3b0), *(int8 *)(*(long *)(param_1 + 0x40) + 0x3b8),js_finrec_proto_funcs,3); JS_NewGlobalCConstructor (param_1,"FinalizationRegistry",js_finrec_constructor,1, *(int8 *)(*(long *)(param_1 + 0x40) + 0x3b0), *(int8 *)(*(long *)(param_1 + 0x40) + 0x3b8)); return; }
4,665
engine_mask_event
qoraal-tictactoe/build_O0/_deps/qoraal_engine-src/src/engine.c
void engine_mask_event (uint32_t mask, uint16_t event_id, int32_t event_register) { int i = 0 ; if (_engine_instance_count) { engine_port_lock () ; while (mask && i < _engine_instance_count) { if ((mask & 0x1) && _engine_instance[i].statemachine) { _engine_instance[i].reg[ENGINE_VARIABLE_EVENT] = event_register ; _engine_event (&_engine_instance[i], event_id) ; } mask = mask >> 1 ; i++ ; } engine_port_unlock () ; } }
O0
c
engine_mask_event: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movw %si, %ax movl %edi, -0x4(%rbp) movw %ax, -0x6(%rbp) movl %edx, -0xc(%rbp) movl $0x0, -0x10(%rbp) cmpl $0x0, 0x38f9d(%rip) # 0x4d740 je 0x1484f callq 0x121c0 xorl %eax, %eax cmpl $0x0, -0x4(%rbp) movb %al, -0x11(%rbp) je 0x147c8 movl -0x10(%rbp), %eax cmpl 0x38f7e(%rip), %eax # 0x4d740 setb %al movb %al, -0x11(%rbp) movb -0x11(%rbp), %al testb $0x1, %al jne 0x147d1 jmp 0x1484a movl -0x4(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x14834 movslq -0x10(%rbp), %rcx leaq 0x38f69(%rip), %rax # 0x4d750 imulq $0xd8, %rcx, %rcx addq %rcx, %rax cmpq $0x0, 0x8(%rax) je 0x14834 movl -0xc(%rbp), %ecx movslq -0x10(%rbp), %rdx leaq 0x38f4a(%rip), %rax # 0x4d750 imulq $0xd8, %rdx, %rdx addq %rdx, %rax movl %ecx, 0x98(%rax) movslq -0x10(%rbp), %rax leaq 0x38f2f(%rip), %rdi # 0x4d750 imulq $0xd8, %rax, %rax addq %rax, %rdi movzwl -0x6(%rbp), %esi callq 0x14670 movl -0x4(%rbp), %eax shrl %eax movl %eax, -0x4(%rbp) movl -0x10(%rbp), %eax addl $0x1, %eax movl %eax, -0x10(%rbp) jmp 0x147ae callq 0x121e0 addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
engine_mask_event: push rbp mov rbp, rsp sub rsp, 20h mov ax, si mov [rbp+var_4], edi mov [rbp+var_6], ax mov [rbp+var_C], edx mov [rbp+var_10], 0 cmp cs:_engine_instance_count, 0 jz loc_1484F call engine_port_lock loc_147AE: xor eax, eax cmp [rbp+var_4], 0 mov [rbp+var_11], al jz short loc_147C8 mov eax, [rbp+var_10] cmp eax, cs:_engine_instance_count setb al mov [rbp+var_11], al loc_147C8: mov al, [rbp+var_11] test al, 1 jnz short loc_147D1 jmp short loc_1484A loc_147D1: mov eax, [rbp+var_4] and eax, 1 cmp eax, 0 jz short loc_14834 movsxd rcx, [rbp+var_10] lea rax, _engine_instance imul rcx, 0D8h add rax, rcx cmp qword ptr [rax+8], 0 jz short loc_14834 mov ecx, [rbp+var_C] movsxd rdx, [rbp+var_10] lea rax, _engine_instance imul rdx, 0D8h add rax, rdx mov [rax+98h], ecx movsxd rax, [rbp+var_10] lea rdi, _engine_instance imul rax, 0D8h add rdi, rax movzx esi, [rbp+var_6] call _engine_event loc_14834: mov eax, [rbp+var_4] shr eax, 1 mov [rbp+var_4], eax mov eax, [rbp+var_10] add eax, 1 mov [rbp+var_10], eax jmp loc_147AE loc_1484A: call engine_port_unlock loc_1484F: add rsp, 20h pop rbp retn
unsigned __int16 engine_mask_event(unsigned int a1, unsigned __int16 a2, int a3) { unsigned __int16 result; // ax bool v4; // [rsp+Fh] [rbp-11h] unsigned int v5; // [rsp+10h] [rbp-10h] result = a2; v5 = 0; if ( engine_instance_count ) { engine_port_lock(); while ( 1 ) { v4 = 0; if ( a1 ) v4 = v5 < engine_instance_count; if ( !v4 ) break; if ( (a1 & 1) != 0 ) { if ( engine_instance[27 * (int)v5 + 1] ) { LODWORD(engine_instance[27 * (int)v5 + 19]) = a3; engine_event((unsigned int *)&engine_instance[27 * (int)v5], a2); } } a1 >>= 1; ++v5; } return engine_port_unlock(); } return result; }
engine_mask_event: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV AX,SI MOV dword ptr [RBP + -0x4],EDI MOV word ptr [RBP + -0x6],AX MOV dword ptr [RBP + -0xc],EDX MOV dword ptr [RBP + -0x10],0x0 CMP dword ptr [0x0014d740],0x0 JZ 0x0011484f CALL 0x001121c0 LAB_001147ae: XOR EAX,EAX CMP dword ptr [RBP + -0x4],0x0 MOV byte ptr [RBP + -0x11],AL JZ 0x001147c8 MOV EAX,dword ptr [RBP + -0x10] CMP EAX,dword ptr [0x0014d740] SETC AL MOV byte ptr [RBP + -0x11],AL LAB_001147c8: MOV AL,byte ptr [RBP + -0x11] TEST AL,0x1 JNZ 0x001147d1 JMP 0x0011484a LAB_001147d1: MOV EAX,dword ptr [RBP + -0x4] AND EAX,0x1 CMP EAX,0x0 JZ 0x00114834 MOVSXD RCX,dword ptr [RBP + -0x10] LEA RAX,[0x14d750] IMUL RCX,RCX,0xd8 ADD RAX,RCX CMP qword ptr [RAX + 0x8],0x0 JZ 0x00114834 MOV ECX,dword ptr [RBP + -0xc] MOVSXD RDX,dword ptr [RBP + -0x10] LEA RAX,[0x14d750] IMUL RDX,RDX,0xd8 ADD RAX,RDX MOV dword ptr [RAX + 0x98],ECX MOVSXD RAX,dword ptr [RBP + -0x10] LEA RDI,[0x14d750] IMUL RAX,RAX,0xd8 ADD RDI,RAX MOVZX ESI,word ptr [RBP + -0x6] CALL 0x00114670 LAB_00114834: MOV EAX,dword ptr [RBP + -0x4] SHR EAX,0x1 MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x10] ADD EAX,0x1 MOV dword ptr [RBP + -0x10],EAX JMP 0x001147ae LAB_0011484a: CALL 0x001121e0 LAB_0011484f: ADD RSP,0x20 POP RBP RET
void engine_mask_event(uint param_1,int2 param_2,int4 param_3) { uint local_18; uint local_c; local_18 = 0; if (_engine_instance_count != 0) { engine_port_lock(); for (local_c = param_1; local_c != 0 && local_18 < _engine_instance_count; local_c = local_c >> 1) { if (((local_c & 1) != 0) && (*(long *)(_engine_instance + (long)(int)local_18 * 0xd8 + 8) != 0)) { *(int4 *)(_engine_instance + (long)(int)local_18 * 0xd8 + 0x98) = param_3; _engine_event(_engine_instance + (long)(int)local_18 * 0xd8,param_2); } local_18 = local_18 + 1; } engine_port_unlock(); } return; }
4,666
safe_lexcstrdup_root
eloqsql/mysys/my_alloc.c
LEX_CSTRING safe_lexcstrdup_root(MEM_ROOT *root, const LEX_CSTRING str) { LEX_CSTRING res; if (str.length) res.str= strmake_root(root, str.str, str.length); else res.str= (const char *)""; res.length= str.length; return res; }
O3
c
safe_lexcstrdup_root: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdx, %rbx testq %rdx, %rdx je 0x50de0 movq %rbx, %rdx callq 0x50d45 jmp 0x50de7 leaq 0x33950(%rip), %rax # 0x84737 movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %rbp retq nopl (%rax)
safe_lexcstrdup_root: push rbp mov rbp, rsp push rbx push rax mov rbx, rdx test rdx, rdx jz short loc_50DE0 mov rdx, rbx call strmake_root jmp short loc_50DE7 loc_50DE0: lea rax, asc_84733+4; "" loc_50DE7: mov rdx, rbx add rsp, 8 pop rbx pop rbp retn
char * safe_lexcstrdup_root(long long a1, long long a2, long long a3) { if ( a3 ) return strmake_root(a1, a2, a3); else return ""; }
safe_lexcstrdup_root: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDX TEST RDX,RDX JZ 0x00150de0 MOV RDX,RBX CALL 0x00150d45 JMP 0x00150de7 LAB_00150de0: LEA RAX,[0x184737] LAB_00150de7: MOV RDX,RBX ADD RSP,0x8 POP RBX POP RBP RET
int1 [16] safe_lexcstrdup_root(int8 param_1,int8 param_2,long param_3) { int *puVar1; int1 auVar2 [16]; if (param_3 == 0) { puVar1 = &DAT_00184737; } else { puVar1 = (int *)strmake_root(param_1,param_2,param_3); } auVar2._8_8_ = param_3; auVar2._0_8_ = puVar1; return auVar2; }
4,667
ImPlot3D::AddTicksCustom(double const*, char const* const*, int, ImPlot3DTicker&, int (*)(float, char*, int, void*), void*)
zkingston[P]unknot/build_O1/_deps/implot3d-src/implot3d.cpp
void AddTicksCustom(const double* values, const char* const labels[], int n, ImPlot3DTicker& ticker, ImPlot3DFormatter formatter, void* data) { for (int i = 0; i < n; i++) { if (labels != nullptr) ticker.AddTick(values[i], false, true, labels[i]); else ticker.AddTick(values[i], false, true, formatter, data); } }
O1
cpp
ImPlot3D::AddTicksCustom(double const*, char const* const*, int, ImPlot3DTicker&, int (*)(float, char*, int, void*), void*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, (%rsp) testl %edx, %edx jle 0x4f3db movq %r8, %r14 movq %rcx, %r15 movq %rsi, %r12 movq %rdi, %r13 movl %edx, %ebp xorl %ebx, %ebx movsd (%r13,%rbx,8), %xmm0 testq %r12, %r12 je 0x4f3bd movq (%r12,%rbx,8), %rcx movq %r15, %rdi xorl %esi, %esi movl $0x1, %edx callq 0x552a0 jmp 0x4f3d3 movq %r15, %rdi xorl %esi, %esi movl $0x1, %edx movq %r14, %rcx movq (%rsp), %r8 callq 0x55120 incq %rbx cmpq %rbx, %rbp jne 0x4f39c addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN8ImPlot3D14AddTicksCustomEPKdPKPKciR14ImPlot3DTickerPFifPciPvES9_: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov [rsp+38h+var_38], r9 test edx, edx jle short loc_4F3DB mov r14, r8 mov r15, rcx mov r12, rsi mov r13, rdi mov ebp, edx xor ebx, ebx loc_4F39C: movsd xmm0, qword ptr [r13+rbx*8+0]; double test r12, r12 jz short loc_4F3BD mov rcx, [r12+rbx*8]; char * mov rdi, r15; this xor esi, esi; bool mov edx, 1; bool call _ZN14ImPlot3DTicker7AddTickEdbbPKc; ImPlot3DTicker::AddTick(double,bool,bool,char const*) jmp short loc_4F3D3 loc_4F3BD: mov rdi, r15; this xor esi, esi; bool mov edx, 1; bool mov rcx, r14; int (*)(float, char *, int, void *) mov r8, [rsp+38h+var_38]; void * call _ZN14ImPlot3DTicker7AddTickEdbbPFifPciPvES1_; ImPlot3DTicker::AddTick(double,bool,bool,int (*)(float,char *,int,void *),void *) loc_4F3D3: inc rbx cmp rbp, rbx jnz short loc_4F39C loc_4F3DB: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ImPlot3D::AddTicksCustom( ImPlot3D *this, const double *a2, const char *const *a3, ImPlot3DTicker *a4, ImPlot3DTicker *a5, int (*a6)(float, char *, int, void *)) { long long v8; // rbp long long i; // rbx double v10; // xmm0_8 long long result; // rax if ( (int)a3 > 0 ) { v8 = (unsigned int)a3; for ( i = 0LL; i != v8; ++i ) { v10 = *((double *)this + i); if ( a2 ) result = ImPlot3DTicker::AddTick(a4, v10, 0, 1, *(const char **)&a2[i]); else result = ImPlot3DTicker::AddTick(a4, v10, 0, 1, (int (*)(float, char *, int, void *))a5, a6); } } return result; }
AddTicksCustom: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV qword ptr [RSP],R9 TEST EDX,EDX JLE 0x0014f3db MOV R14,R8 MOV R15,RCX MOV R12,RSI MOV R13,RDI MOV EBP,EDX XOR EBX,EBX LAB_0014f39c: MOVSD XMM0,qword ptr [R13 + RBX*0x8] TEST R12,R12 JZ 0x0014f3bd MOV RCX,qword ptr [R12 + RBX*0x8] MOV RDI,R15 XOR ESI,ESI MOV EDX,0x1 CALL 0x001552a0 JMP 0x0014f3d3 LAB_0014f3bd: MOV RDI,R15 XOR ESI,ESI MOV EDX,0x1 MOV RCX,R14 MOV R8,qword ptr [RSP] CALL 0x00155120 LAB_0014f3d3: INC RBX CMP RBP,RBX JNZ 0x0014f39c LAB_0014f3db: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* ImPlot3D::AddTicksCustom(double const*, char const* const*, int, ImPlot3DTicker&, int (*)(float, char*, int, void*), void*) */ void ImPlot3D::AddTicksCustom (double *param_1,char **param_2,int param_3,ImPlot3DTicker *param_4, _func_int_float_char_ptr_int_void_ptr *param_5,void *param_6) { ulong uVar1; if (0 < param_3) { uVar1 = 0; do { if (param_2 == (char **)0x0) { ImPlot3DTicker::AddTick(param_4,param_1[uVar1],false,true,param_5,param_6); } else { ImPlot3DTicker::AddTick(param_4,param_1[uVar1],false,true,param_2[uVar1]); } uVar1 = uVar1 + 1; } while ((uint)param_3 != uVar1); } return; }
4,668
reset_key_cache_counters
eloqsql/mysys/mf_keycache.c
int reset_key_cache_counters(const char *name __attribute__((unused)), KEY_CACHE *keycache, void *unused __attribute__((unused))) { int rc= 0; if (keycache->key_cache_inited) { pthread_mutex_lock(&keycache->op_lock); rc= keycache->interface_funcs->reset_counters(name, keycache->keycache_cb); pthread_mutex_unlock(&keycache->op_lock); } return rc; }
O0
c
reset_key_cache_counters: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl $0x0, -0x1c(%rbp) movq -0x10(%rbp), %rax cmpb $0x0, 0x48(%rax) je 0xe90bc movq -0x10(%rbp), %rdi addq $0x58, %rdi callq 0x2a220 movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq 0x38(%rax), %rax movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rcx movq 0x8(%rcx), %rsi callq *%rax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rdi addq $0x58, %rdi callq 0x2a1f0 movl -0x1c(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
reset_key_cache_counters: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], 0 mov rax, [rbp+var_10] cmp byte ptr [rax+48h], 0 jz short loc_E90BC mov rdi, [rbp+var_10] add rdi, 58h ; 'X' call _pthread_mutex_lock mov rax, [rbp+var_10] mov rax, [rax+10h] mov rax, [rax+38h] mov rdi, [rbp+var_8] mov rcx, [rbp+var_10] mov rsi, [rcx+8] call rax mov [rbp+var_1C], eax mov rdi, [rbp+var_10] add rdi, 58h ; 'X' call _pthread_mutex_unlock loc_E90BC: mov eax, [rbp+var_1C] add rsp, 20h pop rbp retn
long long reset_key_cache_counters(long long a1, long long a2) { unsigned int v3; // [rsp+4h] [rbp-1Ch] v3 = 0; if ( *(_BYTE *)(a2 + 72) ) { pthread_mutex_lock(a2 + 88); v3 = (*(long long ( **)(long long, _QWORD))(*(_QWORD *)(a2 + 16) + 56LL))(a1, *(_QWORD *)(a2 + 8)); pthread_mutex_unlock(a2 + 88); } return v3; }
reset_key_cache_counters: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],0x0 MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x48],0x0 JZ 0x001e90bc MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x58 CALL 0x0012a220 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RAX + 0x38] MOV RDI,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RCX + 0x8] CALL RAX MOV dword ptr [RBP + -0x1c],EAX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x58 CALL 0x0012a1f0 LAB_001e90bc: MOV EAX,dword ptr [RBP + -0x1c] ADD RSP,0x20 POP RBP RET
int4 reset_key_cache_counters(int8 param_1,long param_2) { int4 local_24; local_24 = 0; if (*(char *)(param_2 + 0x48) != '\0') { pthread_mutex_lock((pthread_mutex_t *)(param_2 + 0x58)); local_24 = (**(code **)(*(long *)(param_2 + 0x10) + 0x38))(param_1,*(int8 *)(param_2 + 8)) ; pthread_mutex_unlock((pthread_mutex_t *)(param_2 + 0x58)); } return local_24; }
4,669
reset_key_cache_counters
eloqsql/mysys/mf_keycache.c
int reset_key_cache_counters(const char *name __attribute__((unused)), KEY_CACHE *keycache, void *unused __attribute__((unused))) { int rc= 0; if (keycache->key_cache_inited) { pthread_mutex_lock(&keycache->op_lock); rc= keycache->interface_funcs->reset_counters(name, keycache->keycache_cb); pthread_mutex_unlock(&keycache->op_lock); } return rc; }
O3
c
reset_key_cache_counters: cmpb $0x0, 0x48(%rsi) je 0x9c1b9 pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx leaq 0x58(%rsi), %r15 movq %r15, %rdi callq 0x2a220 movq 0x8(%r14), %rsi movq 0x10(%r14), %rax movq %rbx, %rdi callq *0x38(%rax) movl %eax, %ebx movq %r15, %rdi callq 0x2a1e0 movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq xorl %eax, %eax retq
reset_key_cache_counters: cmp byte ptr [rsi+48h], 0 jz short loc_9C1B9 push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rsi mov rbx, rdi lea r15, [rsi+58h] mov rdi, r15 call _pthread_mutex_lock mov rsi, [r14+8] mov rax, [r14+10h] mov rdi, rbx call qword ptr [rax+38h] mov ebx, eax mov rdi, r15 call _pthread_mutex_unlock mov eax, ebx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_9C1B9: xor eax, eax retn
long long reset_key_cache_counters(long long a1, long long a2) { unsigned int v2; // ebx if ( !*(_BYTE *)(a2 + 72) ) return 0LL; pthread_mutex_lock(a2 + 88); v2 = (*(long long ( **)(long long, _QWORD))(*(_QWORD *)(a2 + 16) + 56LL))(a1, *(_QWORD *)(a2 + 8)); pthread_mutex_unlock(a2 + 88); return v2; }
reset_key_cache_counters: CMP byte ptr [RSI + 0x48],0x0 JZ 0x0019c1b9 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI LEA R15,[RSI + 0x58] MOV RDI,R15 CALL 0x0012a220 MOV RSI,qword ptr [R14 + 0x8] MOV RAX,qword ptr [R14 + 0x10] MOV RDI,RBX CALL qword ptr [RAX + 0x38] MOV EBX,EAX MOV RDI,R15 CALL 0x0012a1e0 MOV EAX,EBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_0019c1b9: XOR EAX,EAX RET
int4 reset_key_cache_counters(int8 param_1,long param_2) { int4 uVar1; if (*(char *)(param_2 + 0x48) != '\0') { pthread_mutex_lock((pthread_mutex_t *)(param_2 + 0x58)); uVar1 = (**(code **)(*(long *)(param_2 + 0x10) + 0x38))(param_1,*(int8 *)(param_2 + 8)); pthread_mutex_unlock((pthread_mutex_t *)(param_2 + 0x58)); return uVar1; } return 0; }
4,670
ma_unique_hash
eloqsql/storage/maria/ma_unique.c
ha_checksum _ma_unique_hash(MARIA_UNIQUEDEF *def, const uchar *record) { const uchar *pos, *end; ha_checksum crc= 0; ulong seed1=0, seed2= 4; HA_KEYSEG *keyseg; for (keyseg=def->seg ; keyseg < def->end ; keyseg++) { enum ha_base_keytype type=(enum ha_base_keytype) keyseg->type; uint length=keyseg->length; if (keyseg->null_bit) { if (record[keyseg->null_pos] & keyseg->null_bit) { /* Change crc in a way different from an empty string or 0. (This is an optimisation; The code will work even if this isn't done) */ crc=((crc << 8) + 511+ (crc >> (8*sizeof(ha_checksum)-8))); continue; } } pos= record+keyseg->start; if (keyseg->flag & HA_VAR_LENGTH_PART) { uint pack_length= keyseg->bit_start; uint tmp_length= (pack_length == 1 ? (uint) *pos : uint2korr(pos)); pos+= pack_length; /* Skip VARCHAR length */ set_if_smaller(length,tmp_length); } else if (keyseg->flag & HA_BLOB_PART) { uint tmp_length= _ma_calc_blob_length(keyseg->bit_start,pos); memcpy((void*) &pos,pos+keyseg->bit_start,sizeof(char*)); if (!length || length > tmp_length) length=tmp_length; /* The whole blob */ } end= pos+length; if (type == HA_KEYTYPE_TEXT || type == HA_KEYTYPE_VARTEXT1 || type == HA_KEYTYPE_VARTEXT2) { my_ci_hash_sort(keyseg->charset, (const uchar*) pos, length, &seed1, &seed2); crc+= seed1; } else { my_hash_sort_bin((CHARSET_INFO*) 0, pos, (size_t) (end-pos), &seed1, &seed2); crc+= seed1; } } return crc; }
O0
c
ma_unique_hash: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl $0x0, -0x24(%rbp) movq $0x0, -0x30(%rbp) movq $0x4, -0x38(%rbp) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x10(%rcx), %rax jae 0x6e020 movq -0x40(%rbp), %rax movzbl 0x18(%rax), %eax movl %eax, -0x44(%rbp) movq -0x40(%rbp), %rax movzwl 0x14(%rax), %eax movl %eax, -0x48(%rbp) movq -0x40(%rbp), %rax cmpb $0x0, 0x19(%rax) je 0x6ded0 movq -0x10(%rbp), %rax movq -0x40(%rbp), %rcx movl 0xc(%rcx), %ecx movzbl (%rax,%rcx), %eax movq -0x40(%rbp), %rcx movzbl 0x19(%rcx), %ecx andl %ecx, %eax cmpl $0x0, %eax je 0x6dece movl -0x24(%rbp), %eax shll $0x8, %eax addl $0x1ff, %eax # imm = 0x1FF movl -0x24(%rbp), %ecx shrl $0x18, %ecx addl %ecx, %eax movl %eax, -0x24(%rbp) jmp 0x6e00f jmp 0x6ded0 movq -0x10(%rbp), %rax movq -0x40(%rbp), %rcx movl 0x8(%rcx), %ecx addq %rcx, %rax movq %rax, -0x18(%rbp) movq -0x40(%rbp), %rax movzwl 0x12(%rax), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x6df41 movq -0x40(%rbp), %rax movzbl 0x1a(%rax), %eax movl %eax, -0x4c(%rbp) cmpl $0x1, -0x4c(%rbp) jne 0x6df0f movq -0x18(%rbp), %rax movzbl (%rax), %eax movl %eax, -0x58(%rbp) jmp 0x6df19 movq -0x18(%rbp), %rax movzwl (%rax), %eax movl %eax, -0x58(%rbp) movl -0x58(%rbp), %eax movl %eax, -0x50(%rbp) movl -0x4c(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x18(%rbp) movl -0x48(%rbp), %eax cmpl -0x50(%rbp), %eax jbe 0x6df3d movl -0x50(%rbp), %eax movl %eax, -0x48(%rbp) jmp 0x6df3f jmp 0x6df94 movq -0x40(%rbp), %rax movzwl 0x12(%rax), %eax andl $0x20, %eax cmpl $0x0, %eax je 0x6df92 movq -0x40(%rbp), %rax movzbl 0x1a(%rax), %edi movq -0x18(%rbp), %rsi callq 0x53f40 movl %eax, -0x54(%rbp) movq -0x18(%rbp), %rax movq -0x40(%rbp), %rcx movzbl 0x1a(%rcx), %ecx movslq %ecx, %rcx movq (%rax,%rcx), %rax movq %rax, -0x18(%rbp) cmpl $0x0, -0x48(%rbp) je 0x6df8a movl -0x48(%rbp), %eax cmpl -0x54(%rbp), %eax jbe 0x6df90 movl -0x54(%rbp), %eax movl %eax, -0x48(%rbp) jmp 0x6df92 jmp 0x6df94 movq -0x18(%rbp), %rax movl -0x48(%rbp), %ecx addq %rcx, %rax movq %rax, -0x20(%rbp) cmpl $0x1, -0x44(%rbp) je 0x6dfb4 cmpl $0xf, -0x44(%rbp) je 0x6dfb4 cmpl $0x11, -0x44(%rbp) jne 0x6dfe0 movq -0x40(%rbp), %rax movq (%rax), %rdi movq -0x18(%rbp), %rsi movl -0x48(%rbp), %eax movl %eax, %edx leaq -0x30(%rbp), %rcx leaq -0x38(%rbp), %r8 callq 0x6e030 movq -0x30(%rbp), %rcx movl -0x24(%rbp), %eax addq %rcx, %rax movl %eax, -0x24(%rbp) jmp 0x6e00d movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x18(%rbp), %rax subq %rax, %rdx xorl %eax, %eax movl %eax, %edi leaq -0x30(%rbp), %rcx leaq -0x38(%rbp), %r8 callq 0x10e9d0 movq -0x30(%rbp), %rcx movl -0x24(%rbp), %eax addq %rcx, %rax movl %eax, -0x24(%rbp) jmp 0x6e00f movq -0x40(%rbp), %rax addq $0x20, %rax movq %rax, -0x40(%rbp) jmp 0x6de63 movl -0x24(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopl (%rax)
_ma_unique_hash: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_24], 0 mov [rbp+var_30], 0 mov [rbp+var_38], 4 mov rax, [rbp+var_8] mov rax, [rax+8] mov [rbp+var_40], rax loc_6DE63: mov rax, [rbp+var_40] mov rcx, [rbp+var_8] cmp rax, [rcx+10h] jnb loc_6E020 mov rax, [rbp+var_40] movzx eax, byte ptr [rax+18h] mov [rbp+var_44], eax mov rax, [rbp+var_40] movzx eax, word ptr [rax+14h] mov [rbp+var_48], eax mov rax, [rbp+var_40] cmp byte ptr [rax+19h], 0 jz short loc_6DED0 mov rax, [rbp+var_10] mov rcx, [rbp+var_40] mov ecx, [rcx+0Ch] movzx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_40] movzx ecx, byte ptr [rcx+19h] and eax, ecx cmp eax, 0 jz short loc_6DECE mov eax, [rbp+var_24] shl eax, 8 add eax, 1FFh mov ecx, [rbp+var_24] shr ecx, 18h add eax, ecx mov [rbp+var_24], eax jmp loc_6E00F loc_6DECE: jmp short $+2 loc_6DED0: mov rax, [rbp+var_10] mov rcx, [rbp+var_40] mov ecx, [rcx+8] add rax, rcx mov [rbp+var_18], rax mov rax, [rbp+var_40] movzx eax, word ptr [rax+12h] and eax, 8 cmp eax, 0 jz short loc_6DF41 mov rax, [rbp+var_40] movzx eax, byte ptr [rax+1Ah] mov [rbp+var_4C], eax cmp [rbp+var_4C], 1 jnz short loc_6DF0F mov rax, [rbp+var_18] movzx eax, byte ptr [rax] mov [rbp+var_58], eax jmp short loc_6DF19 loc_6DF0F: mov rax, [rbp+var_18] movzx eax, word ptr [rax] mov [rbp+var_58], eax loc_6DF19: mov eax, [rbp+var_58] mov [rbp+var_50], eax mov ecx, [rbp+var_4C] mov rax, [rbp+var_18] mov ecx, ecx add rax, rcx mov [rbp+var_18], rax mov eax, [rbp+var_48] cmp eax, [rbp+var_50] jbe short loc_6DF3D mov eax, [rbp+var_50] mov [rbp+var_48], eax loc_6DF3D: jmp short $+2 loc_6DF3F: jmp short loc_6DF94 loc_6DF41: mov rax, [rbp+var_40] movzx eax, word ptr [rax+12h] and eax, 20h cmp eax, 0 jz short loc_6DF92 mov rax, [rbp+var_40] movzx edi, byte ptr [rax+1Ah] mov rsi, [rbp+var_18] call _ma_calc_blob_length mov [rbp+var_54], eax mov rax, [rbp+var_18] mov rcx, [rbp+var_40] movzx ecx, byte ptr [rcx+1Ah] movsxd rcx, ecx mov rax, [rax+rcx] mov [rbp+var_18], rax cmp [rbp+var_48], 0 jz short loc_6DF8A mov eax, [rbp+var_48] cmp eax, [rbp+var_54] jbe short loc_6DF90 loc_6DF8A: mov eax, [rbp+var_54] mov [rbp+var_48], eax loc_6DF90: jmp short $+2 loc_6DF92: jmp short $+2 loc_6DF94: mov rax, [rbp+var_18] mov ecx, [rbp+var_48] add rax, rcx mov [rbp+var_20], rax cmp [rbp+var_44], 1 jz short loc_6DFB4 cmp [rbp+var_44], 0Fh jz short loc_6DFB4 cmp [rbp+var_44], 11h jnz short loc_6DFE0 loc_6DFB4: mov rax, [rbp+var_40] mov rdi, [rax] mov rsi, [rbp+var_18] mov eax, [rbp+var_48] mov edx, eax lea rcx, [rbp+var_30] lea r8, [rbp+var_38] call my_ci_hash_sort mov rcx, [rbp+var_30] mov eax, [rbp+var_24] add rax, rcx mov [rbp+var_24], eax jmp short loc_6E00D loc_6DFE0: mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov rax, [rbp+var_18] sub rdx, rax xor eax, eax mov edi, eax lea rcx, [rbp+var_30] lea r8, [rbp+var_38] call my_hash_sort_bin mov rcx, [rbp+var_30] mov eax, [rbp+var_24] add rax, rcx mov [rbp+var_24], eax loc_6E00D: jmp short $+2 loc_6E00F: mov rax, [rbp+var_40] add rax, 20h ; ' ' mov [rbp+var_40], rax jmp loc_6DE63 loc_6E020: mov eax, [rbp+var_24] add rsp, 60h pop rbp retn
long long ma_unique_hash(long long a1, long long a2) { unsigned int v3; // [rsp+8h] [rbp-58h] unsigned int v4; // [rsp+Ch] [rbp-54h] unsigned int v5; // [rsp+18h] [rbp-48h] int v6; // [rsp+1Ch] [rbp-44h] unsigned long long i; // [rsp+20h] [rbp-40h] long long v8; // [rsp+28h] [rbp-38h] BYREF long long v9; // [rsp+30h] [rbp-30h] BYREF unsigned int v10; // [rsp+3Ch] [rbp-24h] unsigned __int8 *v11; // [rsp+40h] [rbp-20h] unsigned __int8 *v12; // [rsp+48h] [rbp-18h] long long v13; // [rsp+50h] [rbp-10h] long long v14; // [rsp+58h] [rbp-8h] v14 = a1; v13 = a2; v10 = 0; v9 = 0LL; v8 = 4LL; for ( i = *(_QWORD *)(a1 + 8); i < *(_QWORD *)(v14 + 16); i += 32LL ) { v6 = *(unsigned __int8 *)(i + 24); v5 = *(unsigned __int16 *)(i + 20); if ( *(_BYTE *)(i + 25) && (*(_BYTE *)(i + 25) & *(_BYTE *)(v13 + *(unsigned int *)(i + 12))) != 0 ) { v10 = HIBYTE(v10) + (v10 << 8) + 511; } else { v12 = (unsigned __int8 *)(*(unsigned int *)(i + 8) + v13); if ( (*(_WORD *)(i + 18) & 8) != 0 ) { if ( *(_BYTE *)(i + 26) == 1 ) v3 = *v12; else v3 = *(unsigned __int16 *)v12; v12 += *(unsigned __int8 *)(i + 26); if ( v5 > v3 ) v5 = v3; } else if ( (*(_WORD *)(i + 18) & 0x20) != 0 ) { v4 = ma_calc_blob_length(*(unsigned __int8 *)(i + 26), v12); v12 = *(unsigned __int8 **)&v12[*(unsigned __int8 *)(i + 26)]; if ( !v5 || v5 > v4 ) v5 = v4; } v11 = &v12[v5]; if ( v6 == 1 || v6 == 15 || v6 == 17 ) { my_ci_hash_sort(*(_QWORD *)i, v12, v5, &v9, &v8); v10 += v9; } else { my_hash_sort_bin(0LL, v12, v11 - v12, &v9, &v8); v10 += v9; } } } return v10; }
_ma_unique_hash: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x24],0x0 MOV qword ptr [RBP + -0x30],0x0 MOV qword ptr [RBP + -0x38],0x4 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x40],RAX LAB_0016de63: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x10] JNC 0x0016e020 MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,byte ptr [RAX + 0x18] MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,word ptr [RAX + 0x14] MOV dword ptr [RBP + -0x48],EAX MOV RAX,qword ptr [RBP + -0x40] CMP byte ptr [RAX + 0x19],0x0 JZ 0x0016ded0 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RCX + 0xc] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x40] MOVZX ECX,byte ptr [RCX + 0x19] AND EAX,ECX CMP EAX,0x0 JZ 0x0016dece MOV EAX,dword ptr [RBP + -0x24] SHL EAX,0x8 ADD EAX,0x1ff MOV ECX,dword ptr [RBP + -0x24] SHR ECX,0x18 ADD EAX,ECX MOV dword ptr [RBP + -0x24],EAX JMP 0x0016e00f LAB_0016dece: JMP 0x0016ded0 LAB_0016ded0: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RCX + 0x8] ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x8 CMP EAX,0x0 JZ 0x0016df41 MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,byte ptr [RAX + 0x1a] MOV dword ptr [RBP + -0x4c],EAX CMP dword ptr [RBP + -0x4c],0x1 JNZ 0x0016df0f MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x58],EAX JMP 0x0016df19 LAB_0016df0f: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX] MOV dword ptr [RBP + -0x58],EAX LAB_0016df19: MOV EAX,dword ptr [RBP + -0x58] MOV dword ptr [RBP + -0x50],EAX MOV ECX,dword ptr [RBP + -0x4c] MOV RAX,qword ptr [RBP + -0x18] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV EAX,dword ptr [RBP + -0x48] CMP EAX,dword ptr [RBP + -0x50] JBE 0x0016df3d MOV EAX,dword ptr [RBP + -0x50] MOV dword ptr [RBP + -0x48],EAX LAB_0016df3d: JMP 0x0016df3f LAB_0016df3f: JMP 0x0016df94 LAB_0016df41: MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x20 CMP EAX,0x0 JZ 0x0016df92 MOV RAX,qword ptr [RBP + -0x40] MOVZX EDI,byte ptr [RAX + 0x1a] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00153f40 MOV dword ptr [RBP + -0x54],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x40] MOVZX ECX,byte ptr [RCX + 0x1a] MOVSXD RCX,ECX MOV RAX,qword ptr [RAX + RCX*0x1] MOV qword ptr [RBP + -0x18],RAX CMP dword ptr [RBP + -0x48],0x0 JZ 0x0016df8a MOV EAX,dword ptr [RBP + -0x48] CMP EAX,dword ptr [RBP + -0x54] JBE 0x0016df90 LAB_0016df8a: MOV EAX,dword ptr [RBP + -0x54] MOV dword ptr [RBP + -0x48],EAX LAB_0016df90: JMP 0x0016df92 LAB_0016df92: JMP 0x0016df94 LAB_0016df94: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x48] ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX CMP dword ptr [RBP + -0x44],0x1 JZ 0x0016dfb4 CMP dword ptr [RBP + -0x44],0xf JZ 0x0016dfb4 CMP dword ptr [RBP + -0x44],0x11 JNZ 0x0016dfe0 LAB_0016dfb4: MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x48] MOV EDX,EAX LEA RCX,[RBP + -0x30] LEA R8,[RBP + -0x38] CALL 0x0016e030 MOV RCX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + -0x24] ADD RAX,RCX MOV dword ptr [RBP + -0x24],EAX JMP 0x0016e00d LAB_0016dfe0: MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] SUB RDX,RAX XOR EAX,EAX MOV EDI,EAX LEA RCX,[RBP + -0x30] LEA R8,[RBP + -0x38] CALL 0x0020e9d0 MOV RCX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + -0x24] ADD RAX,RCX MOV dword ptr [RBP + -0x24],EAX LAB_0016e00d: JMP 0x0016e00f LAB_0016e00f: MOV RAX,qword ptr [RBP + -0x40] ADD RAX,0x20 MOV qword ptr [RBP + -0x40],RAX JMP 0x0016de63 LAB_0016e020: MOV EAX,dword ptr [RBP + -0x24] ADD RSP,0x60 POP RBP RET
uint _ma_unique_hash(long param_1,long param_2) { char cVar1; uint uVar2; uint local_60; uint local_50; int8 *local_48; int8 local_40; int8 local_38; uint local_2c; byte *local_28; ushort *local_20; long local_18; long local_10; local_2c = 0; local_38 = 0; local_40 = 4; local_18 = param_2; local_10 = param_1; for (local_48 = *(int8 **)(param_1 + 8); local_48 < *(int8 **)(local_10 + 0x10); local_48 = local_48 + 4) { cVar1 = *(char *)(local_48 + 3); local_50 = (uint)*(ushort *)((long)local_48 + 0x14); if ((*(char *)((long)local_48 + 0x19) == '\0') || ((*(byte *)(local_18 + (ulong)*(uint *)((long)local_48 + 0xc)) & *(byte *)((long)local_48 + 0x19)) == 0)) { local_20 = (ushort *)(local_18 + (ulong)*(uint *)(local_48 + 1)); if ((*(ushort *)((long)local_48 + 0x12) & 8) == 0) { if ((*(ushort *)((long)local_48 + 0x12) & 0x20) != 0) { uVar2 = _ma_calc_blob_length(*(int1 *)((long)local_48 + 0x1a),local_20); local_20 = *(ushort **) ((long)local_20 + (long)(int)(uint)*(byte *)((long)local_48 + 0x1a)); if ((local_50 == 0) || (uVar2 < local_50)) { local_50 = uVar2; } } } else { if (*(byte *)((long)local_48 + 0x1a) == 1) { local_60 = (uint)(byte)*local_20; } else { local_60 = (uint)*local_20; } local_20 = (ushort *)((long)local_20 + (ulong)(uint)*(byte *)((long)local_48 + 0x1a)); if (local_60 < local_50) { local_50 = local_60; } } local_28 = (byte *)((long)local_20 + (ulong)local_50); if (((cVar1 == '\x01') || (cVar1 == '\x0f')) || (cVar1 == '\x11')) { my_ci_hash_sort(*local_48,local_20,local_50,&local_38,&local_40); local_2c = local_2c + (int)local_38; } else { my_hash_sort_bin(0,local_20,(long)local_28 - (long)local_20,&local_38,&local_40); local_2c = local_2c + (int)local_38; } } else { local_2c = local_2c * 0x100 + 0x1ff + (local_2c >> 0x18); } } return local_2c; }
4,671
ma_close
eloqsql/libmariadb/libmariadb/ma_io.c
int ma_close(MA_FILE *file) { int rc; if (!file) return -1; switch (file->type) { case MA_FILE_LOCAL: rc= fclose((FILE *)file->ptr); free(file); break; #ifdef HAVE_REMOTEIO case MA_FILE_REMOTE: rc= rio_plugin->methods->mclose(file); break; #endif default: return -1; } return rc; }
O0
c
ma_close: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) jne 0x50dfc movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x50e5d movq -0x10(%rbp), %rax movl (%rax), %eax movl %eax, -0x18(%rbp) subl $0x1, %eax je 0x50e16 jmp 0x50e0c movl -0x18(%rbp), %eax subl $0x2, %eax je 0x50e31 jmp 0x50e4e movq -0x10(%rbp), %rax movq 0x8(%rax), %rdi callq 0x14430 movl %eax, -0x14(%rbp) movq -0x10(%rbp), %rdi callq 0x14530 jmp 0x50e57 leaq 0x31e98(%rip), %rax # 0x82cd0 movq (%rax), %rax movq 0x58(%rax), %rax movq 0x8(%rax), %rax movq -0x10(%rbp), %rdi callq *%rax movl %eax, -0x14(%rbp) jmp 0x50e57 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x50e5d movl -0x14(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_close: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi cmp [rbp+var_10], 0 jnz short loc_50DFC mov [rbp+var_4], 0FFFFFFFFh jmp short loc_50E5D loc_50DFC: mov rax, [rbp+var_10] mov eax, [rax] mov [rbp+var_18], eax sub eax, 1 jz short loc_50E16 jmp short $+2 loc_50E0C: mov eax, [rbp+var_18] sub eax, 2 jz short loc_50E31 jmp short loc_50E4E loc_50E16: mov rax, [rbp+var_10] mov rdi, [rax+8] call _fclose mov [rbp+var_14], eax mov rdi, [rbp+var_10] call _free jmp short loc_50E57 loc_50E31: lea rax, rio_plugin mov rax, [rax] mov rax, [rax+58h] mov rax, [rax+8] mov rdi, [rbp+var_10] call rax mov [rbp+var_14], eax jmp short loc_50E57 loc_50E4E: mov [rbp+var_4], 0FFFFFFFFh jmp short loc_50E5D loc_50E57: mov eax, [rbp+var_14] mov [rbp+var_4], eax loc_50E5D: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long ma_close(long long a1) { unsigned int v2; // [rsp+Ch] [rbp-14h] if ( a1 ) { if ( *(_DWORD *)a1 == 1 ) { v2 = fclose(*(_QWORD *)(a1 + 8)); free(a1); } else { if ( *(_DWORD *)a1 != 2 ) return (unsigned int)-1; return (unsigned int)(*(long long ( **)(long long))(*(_QWORD *)(rio_plugin + 88LL) + 8LL))(a1); } return v2; } return (unsigned int)-1; }
ma_close: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI CMP qword ptr [RBP + -0x10],0x0 JNZ 0x00150dfc MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00150e5d LAB_00150dfc: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x18],EAX SUB EAX,0x1 JZ 0x00150e16 JMP 0x00150e0c LAB_00150e0c: MOV EAX,dword ptr [RBP + -0x18] SUB EAX,0x2 JZ 0x00150e31 JMP 0x00150e4e LAB_00150e16: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x8] CALL 0x00114430 MOV dword ptr [RBP + -0x14],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00114530 JMP 0x00150e57 LAB_00150e31: LEA RAX,[0x182cd0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x58] MOV RAX,qword ptr [RAX + 0x8] MOV RDI,qword ptr [RBP + -0x10] CALL RAX MOV dword ptr [RBP + -0x14],EAX JMP 0x00150e57 LAB_00150e4e: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00150e5d LAB_00150e57: MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x4],EAX LAB_00150e5d: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int ma_close(int *param_1) { int local_1c; int local_c; if (param_1 == (int *)0x0) { local_c = -1; } else { if (*param_1 == 1) { local_1c = fclose(*(FILE **)(param_1 + 2)); free(param_1); } else { if (*param_1 != 2) { return -1; } local_1c = (**(code **)(*(long *)(rio_plugin + 0x58) + 8))(param_1); } local_c = local_1c; } return local_c; }
4,672
st_select_lex_unit::optimize()
eloqsql/sql/sql_union.cc
bool st_select_lex_unit::optimize() { SELECT_LEX *lex_select_save= thd->lex->current_select; SELECT_LEX *select_cursor=first_select(); DBUG_ENTER("st_select_lex_unit::optimize"); if (optimized && !uncacheable && !describe) DBUG_RETURN(false); if (with_element && with_element->is_recursive && optimize_started) DBUG_RETURN(false); optimize_started= true; if (uncacheable || !item || !item->assigned() || describe) { if (item) item->reset_value_registration(); if (optimized && item) { if (item->assigned()) { item->assigned(0); // We will reinit & rexecute unit item->reset(); } if (table->is_created()) { table->file->ha_delete_all_rows(); table->file->info(HA_STATUS_VARIABLE); } /* re-enabling indexes for next subselect iteration */ if ((union_result->force_enable_index_if_needed() || union_distinct)) { if(table->file->ha_enable_indexes(HA_KEY_SWITCH_ALL)) DBUG_ASSERT(0); else table->no_keyread= 0; } } for (SELECT_LEX *sl= select_cursor; sl; sl= sl->next_select()) { if (sl->tvc) { sl->tvc->select_options= (lim.is_unlimited() || sl->braces) ? sl->options & ~OPTION_FOUND_ROWS : sl->options | found_rows_for_union; if (sl->tvc->optimize(thd)) { thd->lex->current_select= lex_select_save; DBUG_RETURN(TRUE); } if (derived) sl->increase_derived_records(sl->tvc->get_records()); continue; } thd->lex->current_select= sl; if (optimized) saved_error= sl->join->reinit(); else { set_limit(sl); if (sl == global_parameters() || describe) { lim.remove_offset(); /* We can't use LIMIT at this stage if we are using ORDER BY for the whole query */ if (sl->order_list.first || describe) lim.set_unlimited(); } /* When using braces, SQL_CALC_FOUND_ROWS affects the whole query: we don't calculate found_rows() per union part. Otherwise, SQL_CALC_FOUND_ROWS should be done on all sub parts. */ sl->join->select_options= (lim.is_unlimited() || sl->braces) ? sl->options & ~OPTION_FOUND_ROWS : sl->options | found_rows_for_union; saved_error= sl->join->optimize(); } if (unlikely(saved_error)) { thd->lex->current_select= lex_select_save; DBUG_RETURN(saved_error); } } } optimized= 1; thd->lex->current_select= lex_select_save; DBUG_RETURN(saved_error); }
O3
cpp
st_select_lex_unit::optimize(): movzwl 0x7f0(%rdi), %eax movb 0x40(%rdi), %cl testb %cl, %cl sete %dl movl %eax, %esi andl $0x402, %esi # imm = 0x402 cmpw $0x2, %si sete %sil testb %dl, %sil je 0x7eb66f xorl %eax, %eax retq pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %rbx movq 0x798(%rdi), %rdx movq 0x58(%rdx), %rdx movq 0xd28(%rdx), %r15 movq 0x18(%rdi), %r14 movq 0x788(%rdi), %rdx testq %rdx, %rdx je 0x7eb6b3 testb $0x40, %al je 0x7eb6b3 cmpb $0x0, 0xb8(%rdx) je 0x7eb6b3 xorl %eax, %eax jmp 0x7eb94f movl %eax, %edx orl $0x40, %edx movw %dx, 0x7f0(%rbx) movq 0x770(%rbx), %rdi testb %cl, %cl je 0x7eb6d8 leaq 0x770(%rbx), %r12 testq %rdi, %rdi jne 0x7eb6f4 jmp 0x7eb70d testq %rdi, %rdi je 0x7eb706 btl $0xa, %eax jb 0x7eb6ed cmpb $0x0, 0x79(%rdi) jne 0x7eb91a leaq 0x770(%rbx), %r12 movq (%rdi), %rax callq *0x650(%rax) movzwl 0x7f0(%rbx), %edx jmp 0x7eb70d leaq 0x770(%rbx), %r12 testb $0x2, %dl je 0x7eb911 movq (%r12), %rax testq %rax, %rax je 0x7eb911 cmpb $0x1, 0x79(%rax) jne 0x7eb73a movb $0x0, 0x79(%rax) movq (%r12), %rdi movq (%rdi), %rax callq *0x628(%rax) movq 0x738(%rbx), %rax cmpb $0x1, 0x2d9(%rax) jne 0x7eb76c movq 0x8(%rax), %rdi callq 0x9121c4 movq 0x738(%rbx), %rax movq 0x8(%rax), %rdi movq (%rdi), %rax movl $0x10, %esi callq *0x270(%rax) movq 0x728(%rbx), %rdi movq (%rdi), %rax callq *0xa8(%rax) testb %al, %al jne 0x7eb78e cmpq $0x0, 0x7b0(%rbx) je 0x7eb911 movq 0x738(%rbx), %rax movq 0x8(%rax), %rdi movl $0x1, %esi callq 0x912384 testl %eax, %eax jne 0x7eb911 movq 0x738(%rbx), %rax movb $0x0, 0x2b1(%rax) jmp 0x7eb911 movq 0x118(%r14), %rax testq %rax, %rax je 0x7eb837 cmpq $-0x1, 0x758(%rbx) je 0x7eb7eb testb $0x20, 0x388(%r14) jne 0x7eb7eb movq 0x730(%rbx), %rcx orq 0x38(%r14), %rcx jmp 0x7eb7f3 movq 0x38(%r14), %rcx andq $-0x21, %rcx movq %rcx, 0x40(%rax) movq 0x118(%r14), %rdi movq 0x798(%rbx), %rsi callq 0x89b524 testb %al, %al jne 0x7eb93b cmpq $0x0, 0x778(%rbx) je 0x7eb90e movq 0x118(%r14), %rax movl 0x18(%rax), %esi movq %r14, %rdi callq 0x7467f0 jmp 0x7eb90e movq 0x798(%rbx), %rax movq 0x58(%rax), %rax movq %r14, 0xd28(%rax) testb $0x2, 0x7f0(%rbx) jne 0x7eb8c8 movq %rbx, %rdi movq %r14, %rsi callq 0x744d9a movq 0x7a8(%rbx), %rax testq %rax, %rax jne 0x7eb86d movq 0x18(%rbx), %rax movq 0x7a0(%rbx), %rcx testq %rcx, %rcx cmovneq %rcx, %rax cmpq %rax, %r14 je 0x7eb889 testb $0x4, 0x7f1(%rbx) je 0x7eb8a7 movq $0x0, 0x760(%rbx) cmpq $0x0, 0x2f0(%r14) jne 0x7eb8d6 testb $0x4, 0x7f1(%rbx) jne 0x7eb8d6 cmpq $-0x1, 0x758(%rbx) je 0x7eb8e1 testb $0x20, 0x388(%r14) jne 0x7eb8e1 movq 0x730(%rbx), %rax orq 0x38(%r14), %rax jmp 0x7eb8e9 movq 0x108(%r14), %rdi callq 0x790c3e jmp 0x7eb903 movq $-0x1, 0x758(%rbx) movq 0x38(%r14), %rax andq $-0x21, %rax movq 0x108(%r14), %rcx movq %rax, 0x1f8(%rcx) movq 0x108(%r14), %rdi callq 0x783416 testl %eax, %eax setne 0x7f2(%rbx) jne 0x7eb921 movq (%r14), %r14 testq %r14, %r14 jne 0x7eb7be orb $0x2, 0x7f0(%rbx) movq 0x798(%rbx), %rax movq 0x58(%rax), %rax movq %r15, 0xd28(%rax) movb 0x7f2(%rbx), %al jmp 0x7eb94f movq 0x798(%rbx), %rax movq 0x58(%rax), %rax movq %r15, 0xd28(%rax) movb $0x1, %al popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ZN18st_select_lex_unit8optimizeEv: movzx eax, word ptr [rdi+7F0h] mov cl, [rdi+40h] test cl, cl setz dl mov esi, eax and esi, 402h cmp si, 2 setz sil test sil, dl jz short loc_7EB66F xor eax, eax retn loc_7EB66F: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdi mov rdx, [rdi+798h] mov rdx, [rdx+58h] mov r15, [rdx+0D28h] mov r14, [rdi+18h] mov rdx, [rdi+788h] test rdx, rdx jz short loc_7EB6B3 test al, 40h jz short loc_7EB6B3 cmp byte ptr [rdx+0B8h], 0 jz short loc_7EB6B3 xor eax, eax jmp loc_7EB94F loc_7EB6B3: mov edx, eax or edx, 40h mov [rbx+7F0h], dx mov rdi, [rbx+770h] test cl, cl jz short loc_7EB6D8 lea r12, [rbx+770h] test rdi, rdi jnz short loc_7EB6F4 jmp short loc_7EB70D loc_7EB6D8: test rdi, rdi jz short loc_7EB706 bt eax, 0Ah jb short loc_7EB6ED cmp byte ptr [rdi+79h], 0 jnz loc_7EB91A loc_7EB6ED: lea r12, [rbx+770h] loc_7EB6F4: mov rax, [rdi] call qword ptr [rax+650h] movzx edx, word ptr [rbx+7F0h] jmp short loc_7EB70D loc_7EB706: lea r12, [rbx+770h] loc_7EB70D: test dl, 2 jz loc_7EB911 mov rax, [r12] test rax, rax jz loc_7EB911 cmp byte ptr [rax+79h], 1 jnz short loc_7EB73A mov byte ptr [rax+79h], 0 mov rdi, [r12] mov rax, [rdi] call qword ptr [rax+628h] loc_7EB73A: mov rax, [rbx+738h] cmp byte ptr [rax+2D9h], 1 jnz short loc_7EB76C mov rdi, [rax+8]; this call _ZN7handler18ha_delete_all_rowsEv; handler::ha_delete_all_rows(void) mov rax, [rbx+738h] mov rdi, [rax+8] mov rax, [rdi] mov esi, 10h call qword ptr [rax+270h] loc_7EB76C: mov rdi, [rbx+728h] mov rax, [rdi] call qword ptr [rax+0A8h] test al, al jnz short loc_7EB78E cmp qword ptr [rbx+7B0h], 0 jz loc_7EB911 loc_7EB78E: mov rax, [rbx+738h] mov rdi, [rax+8]; this mov esi, 1; unsigned int call _ZN7handler17ha_enable_indexesEj; handler::ha_enable_indexes(uint) test eax, eax jnz loc_7EB911 mov rax, [rbx+738h] mov byte ptr [rax+2B1h], 0 jmp loc_7EB911 loc_7EB7BE: mov rax, [r14+118h] test rax, rax jz short loc_7EB837 cmp qword ptr [rbx+758h], 0FFFFFFFFFFFFFFFFh jz short loc_7EB7EB test byte ptr [r14+388h], 20h jnz short loc_7EB7EB mov rcx, [rbx+730h] or rcx, [r14+38h] jmp short loc_7EB7F3 loc_7EB7EB: mov rcx, [r14+38h] and rcx, 0FFFFFFFFFFFFFFDFh loc_7EB7F3: mov [rax+40h], rcx mov rdi, [r14+118h]; this mov rsi, [rbx+798h]; THD * call _ZN18table_value_constr8optimizeEP3THD; table_value_constr::optimize(THD *) test al, al jnz loc_7EB93B cmp qword ptr [rbx+778h], 0 jz loc_7EB90E mov rax, [r14+118h] mov esi, [rax+18h]; unsigned __int64 mov rdi, r14; this call _ZN13st_select_lex24increase_derived_recordsEy; st_select_lex::increase_derived_records(ulong long) jmp loc_7EB90E loc_7EB837: mov rax, [rbx+798h] mov rax, [rax+58h] mov [rax+0D28h], r14 test byte ptr [rbx+7F0h], 2 jnz short loc_7EB8C8 mov rdi, rbx; this mov rsi, r14; st_select_lex * call _ZN18st_select_lex_unit9set_limitEP13st_select_lex; st_select_lex_unit::set_limit(st_select_lex *) mov rax, [rbx+7A8h] test rax, rax jnz short loc_7EB86D mov rax, [rbx+18h] loc_7EB86D: mov rcx, [rbx+7A0h] test rcx, rcx cmovnz rax, rcx cmp r14, rax jz short loc_7EB889 test byte ptr [rbx+7F1h], 4 jz short loc_7EB8A7 loc_7EB889: mov qword ptr [rbx+760h], 0 cmp qword ptr [r14+2F0h], 0 jnz short loc_7EB8D6 test byte ptr [rbx+7F1h], 4 jnz short loc_7EB8D6 loc_7EB8A7: cmp qword ptr [rbx+758h], 0FFFFFFFFFFFFFFFFh jz short loc_7EB8E1 test byte ptr [r14+388h], 20h jnz short loc_7EB8E1 mov rax, [rbx+730h] or rax, [r14+38h] jmp short loc_7EB8E9 loc_7EB8C8: mov rdi, [r14+108h]; this call _ZN4JOIN6reinitEv; JOIN::reinit(void) jmp short loc_7EB903 loc_7EB8D6: mov qword ptr [rbx+758h], 0FFFFFFFFFFFFFFFFh loc_7EB8E1: mov rax, [r14+38h] and rax, 0FFFFFFFFFFFFFFDFh loc_7EB8E9: mov rcx, [r14+108h] mov [rcx+1F8h], rax mov rdi, [r14+108h]; this call _ZN4JOIN8optimizeEv; JOIN::optimize(void) loc_7EB903: test eax, eax setnz byte ptr [rbx+7F2h] jnz short loc_7EB921 loc_7EB90E: mov r14, [r14] loc_7EB911: test r14, r14 jnz loc_7EB7BE loc_7EB91A: or byte ptr [rbx+7F0h], 2 loc_7EB921: mov rax, [rbx+798h] mov rax, [rax+58h] mov [rax+0D28h], r15 mov al, [rbx+7F2h] jmp short loc_7EB94F loc_7EB93B: mov rax, [rbx+798h] mov rax, [rax+58h] mov [rax+0D28h], r15 mov al, 1 loc_7EB94F: pop rbx pop r12 pop r14 pop r15 pop rbp retn
char st_select_lex_unit::optimize(st_select_lex_unit *this) { __int16 v1; // ax char v2; // cl long long v5; // r15 st_select_lex *v6; // r14 long long v7; // rdx __int16 v8; // dx _BYTE *v9; // rdi _QWORD *v10; // r12 long long v11; // rax long long v12; // rax long long v13; // rax unsigned long long v14; // rcx long long *v15; // rax unsigned long long v16; // rax int v17; // eax v1 = *((_WORD *)this + 1016); v2 = *((_BYTE *)this + 64); if ( v2 == 0 && (v1 & 0x402) == 2 ) return 0; v5 = *(_QWORD *)(*(_QWORD *)(*((_QWORD *)this + 243) + 88LL) + 3368LL); v6 = (st_select_lex *)*((_QWORD *)this + 3); v7 = *((_QWORD *)this + 241); if ( v7 && (v1 & 0x40) != 0 && *(_BYTE *)(v7 + 184) ) return 0; LOBYTE(v8) = v1 | 0x40; *((_WORD *)this + 1016) = v1 | 0x40; v9 = (_BYTE *)*((_QWORD *)this + 238); if ( v2 ) { v10 = (_QWORD *)((char *)this + 1904); if ( !v9 ) goto LABEL_16; goto LABEL_14; } if ( !v9 ) { v10 = (_QWORD *)((char *)this + 1904); goto LABEL_16; } if ( (v1 & 0x400) != 0 || !v9[121] ) { v10 = (_QWORD *)((char *)this + 1904); LABEL_14: (*(void ( **)(_BYTE *))(*(_QWORD *)v9 + 1616LL))(v9); v8 = *((_WORD *)this + 1016); LABEL_16: if ( (v8 & 2) != 0 ) { v11 = *v10; if ( *v10 ) { if ( *(_BYTE *)(v11 + 121) == 1 ) { *(_BYTE *)(v11 + 121) = 0; (*(void ( **)(_QWORD))(*(_QWORD *)*v10 + 1576LL))(*v10); } v12 = *((_QWORD *)this + 231); if ( *(_BYTE *)(v12 + 729) == 1 ) { handler::ha_delete_all_rows(*(handler **)(v12 + 8)); (*(void ( **)(_QWORD, long long))(**(_QWORD **)(*((_QWORD *)this + 231) + 8LL) + 624LL))( *(_QWORD *)(*((_QWORD *)this + 231) + 8LL), 16LL); } if ( ((*(unsigned __int8 ( **)(_QWORD))(**((_QWORD **)this + 229) + 168LL))(*((_QWORD *)this + 229)) || *((_QWORD *)this + 246)) && !(unsigned int)handler::ha_enable_indexes(*(handler **)(*((_QWORD *)this + 231) + 8LL), 1u) ) { *(_BYTE *)(*((_QWORD *)this + 231) + 689LL) = 0; } } } while ( 1 ) { if ( !v6 ) goto LABEL_53; v13 = *((_QWORD *)v6 + 35); if ( !v13 ) break; if ( *((_QWORD *)this + 235) == -1LL || (*((_BYTE *)v6 + 904) & 0x20) != 0 ) v14 = *((_QWORD *)v6 + 7) & 0xFFFFFFFFFFFFFFDFLL; else v14 = *((_QWORD *)v6 + 7) | *((_QWORD *)this + 230); *(_QWORD *)(v13 + 64) = v14; if ( (unsigned __int8)table_value_constr::optimize(*((table_value_constr **)v6 + 35), *((THD **)this + 243)) ) { *(_QWORD *)(*(_QWORD *)(*((_QWORD *)this + 243) + 88LL) + 3368LL) = v5; return 1; } if ( *((_QWORD *)this + 239) ) st_select_lex::increase_derived_records(v6, *(unsigned int *)(*((_QWORD *)v6 + 35) + 24LL)); LABEL_51: v6 = *(st_select_lex **)v6; } *(_QWORD *)(*(_QWORD *)(*((_QWORD *)this + 243) + 88LL) + 3368LL) = v6; if ( (*((_BYTE *)this + 2032) & 2) != 0 ) { v17 = JOIN::reinit(*((JOIN **)v6 + 33)); goto LABEL_50; } st_select_lex_unit::set_limit(this, v6); v15 = (long long *)*((_QWORD *)this + 245); if ( !v15 ) v15 = (long long *)*((_QWORD *)this + 3); if ( *((_QWORD *)this + 244) ) v15 = (long long *)*((_QWORD *)this + 244); if ( (v6 == (st_select_lex *)v15 || (*((_BYTE *)this + 2033) & 4) != 0) && ((*((_QWORD *)this + 236) = 0LL, *((_QWORD *)v6 + 94)) || (*((_BYTE *)this + 2033) & 4) != 0) ) { *((_QWORD *)this + 235) = -1LL; } else if ( *((_QWORD *)this + 235) != -1LL && (*((_BYTE *)v6 + 904) & 0x20) == 0 ) { v16 = *((_QWORD *)v6 + 7) | *((_QWORD *)this + 230); LABEL_49: *(_QWORD *)(*((_QWORD *)v6 + 33) + 504LL) = v16; v17 = JOIN::optimize(*((JOIN **)v6 + 33)); LABEL_50: *((_BYTE *)this + 2034) = v17 != 0; if ( v17 ) goto LABEL_54; goto LABEL_51; } v16 = *((_QWORD *)v6 + 7) & 0xFFFFFFFFFFFFFFDFLL; goto LABEL_49; } LABEL_53: *((_BYTE *)this + 2032) |= 2u; LABEL_54: *(_QWORD *)(*(_QWORD *)(*((_QWORD *)this + 243) + 88LL) + 3368LL) = v5; return *((_BYTE *)this + 2034); }
print: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV R15D,dword ptr [RSI + 0x10] ADD RBX,0x8 LEA RSI,[R15 + 0xf] MOV RDI,RBX CALL 0x008cc592 TEST AL,AL JZ 0x007eb67b ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_007eb67b: MOV RAX,qword ptr [RBX] MOV byte ptr [RAX + R15*0x1 + 0xe],0x0 LEA RSI,[0xecb45e] MOV EDX,0x6 MOV RDI,RBX CALL 0x008cd592 MOV ESI,dword ptr [R14 + 0x34] MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x008cd60e
/* sp_instr_error::print(String*) */ void __thiscall sp_instr_error::print(sp_instr_error *this,String *param_1) { uint uVar1; char cVar2; Binary_string *this_00; uVar1 = *(uint *)(param_1 + 0x10); this_00 = (Binary_string *)(param_1 + 8); cVar2 = Binary_string::realloc_raw(this_00,(ulong)uVar1 + 0xf); if (cVar2 != '\0') { return; } *(int1 *)(*(long *)this_00 + 0xe + (ulong)uVar1) = 0; Binary_string::qs_append(this_00,"error ",6); Binary_string::qs_append(this_00,*(int *)(this + 0x34)); return; }
4,673
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>>::hex_bytes(unsigned char)
monkey531[P]llama/common/json.hpp
static std::string hex_bytes(std::uint8_t byte) { std::string result = "FF"; constexpr const char* nibble_to_hex = "0123456789ABCDEF"; result[0] = nibble_to_hex[byte / 16]; result[1] = nibble_to_hex[byte % 16]; return result; }
O1
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>>::hex_bytes(unsigned char): pushq %r14 pushq %rbx pushq %rax movl %esi, %ebx movq %rdi, %r14 leaq 0x10(%rdi), %rax movq %rax, (%rdi) leaq 0x37e80(%rip), %rsi # 0xf505b leaq 0x37e7b(%rip), %rdx # 0xf505d callq 0x28a68 movl %ebx, %eax shrl $0x4, %eax leaq 0x3c3a2(%rip), %rcx # 0xf9595 movb (%rax,%rcx), %al movq (%r14), %rdx movb %al, (%rdx) andl $0xf, %ebx movb (%rbx,%rcx), %al movq (%r14), %rcx movb %al, 0x1(%rcx) movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9hex_bytesEh: push r14 push rbx push rax mov ebx, esi mov r14, rdi lea rax, [rdi+10h] mov [rdi], rax lea rsi, aInvalidStringS_0+41h; "FF" lea rdx, aInvalidStringS_0+43h; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov eax, ebx shr eax, 4 lea rcx, a0123456789abcd; "0123456789ABCDEF" mov al, [rax+rcx] mov rdx, [r14] mov [rdx], al and ebx, 0Fh mov al, [rbx+rcx] mov rcx, [r14] mov [rcx+1], al mov rax, r14 add rsp, 8 pop rbx pop r14 retn
_QWORD * 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>>::hex_bytes( _QWORD *a1, unsigned int a2) { *a1 = a1 + 2; std::string::_M_construct<char const*>(a1, "FF", (long long)""); *(_BYTE *)*a1 = a0123456789abcd[a2 >> 4]; *(_BYTE *)(*a1 + 1LL) = a0123456789abcd[a2 & 0xF]; return a1; }
hex_bytes: PUSH R14 PUSH RBX PUSH RAX MOV EBX,ESI MOV R14,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX LEA RSI,[0x1f505b] LEA RDX,[0x1f505d] CALL 0x00128a68 MOV EAX,EBX SHR EAX,0x4 LEA RCX,[0x1f9595] MOV AL,byte ptr [RAX + RCX*0x1] MOV RDX,qword ptr [R14] MOV byte ptr [RDX],AL AND EBX,0xf MOV AL,byte ptr [RBX + RCX*0x1] MOV RCX,qword ptr [R14] MOV byte ptr [RCX + 0x1],AL MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 RET
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::hex_bytes(unsigned char) */ serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> * __thiscall nlohmann::json_abi_v3_11_3::detail:: serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::hex_bytes(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,uchar param_1) { int7 in_register_00000031; *(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> **)this = this + 0x10; std::__cxx11::string::_M_construct<char_const*>(this,"FF",""); **(char **)this = "0123456789ABCDEF"[(CONCAT71(in_register_00000031,param_1) & 0xffffffff) >> 4]; *(char *)(*(long *)this + 1) = "0123456789ABCDEF"[(uint)CONCAT71(in_register_00000031,param_1) & 0xf]; return this; }
4,674
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>>::hex_bytes(unsigned char)
monkey531[P]llama/common/json.hpp
static std::string hex_bytes(std::uint8_t byte) { std::string result = "FF"; constexpr const char* nibble_to_hex = "0123456789ABCDEF"; result[0] = nibble_to_hex[byte / 16]; result[1] = nibble_to_hex[byte % 16]; return result; }
O2
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>>::hex_bytes(unsigned char): pushq %r14 pushq %rbx pushq %rax movl %esi, %ebx movq %rdi, %r14 leaq 0x2a593(%rip), %rsi # 0xb606d leaq 0x7(%rsp), %rdx callq 0x2a75e movl %ebx, %eax shrl $0x4, %eax leaq 0x2eaa5(%rip), %rcx # 0xba595 movb (%rax,%rcx), %al movq (%r14), %rdx movb %al, (%rdx) andl $0xf, %ebx movb (%rbx,%rcx), %al movq (%r14), %rcx movb %al, 0x1(%rcx) movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9hex_bytesEh: push r14 push rbx push rax mov ebx, esi mov r14, rdi lea rsi, aInvalidStringS_0+41h; "FF" lea rdx, [rsp+18h+var_11] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov eax, ebx shr eax, 4 lea rcx, a0123456789abcd; "0123456789ABCDEF" mov al, [rax+rcx] mov rdx, [r14] mov [rdx], al and ebx, 0Fh mov al, [rbx+rcx] mov rcx, [r14] mov [rcx+1], al mov rax, r14 add rsp, 8 pop rbx pop r14 retn
_QWORD * 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>>::hex_bytes( _QWORD *a1, unsigned int a2) { std::string::basic_string<std::allocator<char>>(a1, (long long)"FF"); *(_BYTE *)*a1 = a0123456789abcd[a2 >> 4]; *(_BYTE *)(*a1 + 1LL) = a0123456789abcd[a2 & 0xF]; return a1; }
hex_bytes: PUSH R14 PUSH RBX PUSH RAX MOV EBX,ESI MOV R14,RDI LEA RSI,[0x1b606d] LEA RDX,[RSP + 0x7] CALL 0x0012a75e MOV EAX,EBX SHR EAX,0x4 LEA RCX,[0x1ba595] MOV AL,byte ptr [RAX + RCX*0x1] MOV RDX,qword ptr [R14] MOV byte ptr [RDX],AL AND EBX,0xf MOV AL,byte ptr [RBX + RCX*0x1] MOV RCX,qword ptr [R14] MOV byte ptr [RCX + 0x1],AL MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 RET
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::hex_bytes(unsigned char) */ serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> * __thiscall nlohmann::json_abi_v3_11_3::detail:: serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::hex_bytes(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,uchar param_1) { int7 in_register_00000031; allocator local_11; std::__cxx11::string::string<std::allocator<char>>((string *)this,"FF",&local_11); **(char **)this = "0123456789ABCDEF"[(CONCAT71(in_register_00000031,param_1) & 0xffffffff) >> 4]; *(char *)(*(long *)this + 1) = "0123456789ABCDEF"[(uint)CONCAT71(in_register_00000031,param_1) & 0xf]; return this; }
4,675
blst_p2_on_curve
corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/e2.c
int blst_p2_on_curve(const POINTonE2 *p) { return (int)POINTonE2_on_curve(p); }
O2
c
blst_p2_on_curve: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x128, %rsp # imm = 0x128 movq %rdi, %r15 leaq 0xc0(%rdi), %r13 pushq $0x60 popq %rsi movq %r13, %rdi callq 0x510f5 movq %rax, -0x30(%rbp) leaq -0x90(%rbp), %r12 movq %r12, %rdi movq %r13, %rsi callq 0x5ad98 movq %r12, %rdi movq %r12, %rsi movq %r13, %rdx callq 0x5ad73 leaq -0xf0(%rbp), %r13 movq %r13, %rdi movq %r12, %rsi callq 0x5ad98 leaq -0xc0(%rbp), %r14 movq %r12, %rdi movq %r13, %rsi movq %r14, %rdx callq 0x5aa6c leaq -0x60(%rbp), %rbx movq %rbx, %rdi movq %r13, %rsi movq %r14, %rdx callq 0x56a78 pushq $0x2 popq %r14 movq %r12, %rdi movq %r12, %rsi movq %r14, %rdx callq 0x5aabd movq %rbx, %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x5aabd movq %r13, %rdi movq %r15, %rsi callq 0x5ad98 movq %r13, %rdi movq %r13, %rsi movq %r15, %rdx callq 0x5ad73 movq %r13, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x5acb9 addq $0x60, %r15 leaq -0x150(%rbp), %rbx movq %rbx, %rdi movq %r15, %rsi callq 0x5ad98 movq %r13, %rdi movq %rbx, %rsi pushq $0x60 popq %rdx callq 0x52f34 orl -0x30(%rbp), %eax addq $0x128, %rsp # imm = 0x128 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
blst_p2_on_curve: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 128h mov r15, rdi lea r13, [rdi+0C0h] push 60h ; '`' pop rsi mov rdi, r13 call vec_is_zero mov [rbp+var_30], rax lea r12, [rbp+var_90] mov rdi, r12 mov rsi, r13 call sqr_fp2 mov rdi, r12 mov rsi, r12 mov rdx, r13 call mul_fp2 lea r13, [rbp+var_F0] mov rdi, r13 mov rsi, r12 call sqr_fp2 lea r14, [rbp+var_C0] mov rdi, r12 mov rsi, r13 mov rdx, r14 call _sub_fp lea rbx, [rbp+var_60] mov rdi, rbx mov rsi, r13 mov rdx, r14 call add_fp push 2 pop r14 mov rdi, r12 mov rsi, r12 mov rdx, r14 call lshift_fp mov rdi, rbx mov rsi, rbx mov rdx, r14 call lshift_fp mov rdi, r13 mov rsi, r15 call sqr_fp2 mov rdi, r13 mov rsi, r13 mov rdx, r15 call mul_fp2 mov rdi, r13 mov rsi, r13 mov rdx, r12 call add_fp2 add r15, 60h ; '`' lea rbx, [rbp+var_150] mov rdi, rbx mov rsi, r15 call sqr_fp2 mov rdi, r13 mov rsi, rbx push 60h ; '`' pop rdx call vec_is_equal or eax, dword ptr [rbp+var_30] add rsp, 128h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long blst_p2_on_curve(long long a1) { int is_equal; // eax _BYTE v3[96]; // [rsp+0h] [rbp-150h] BYREF _BYTE v4[48]; // [rsp+60h] [rbp-F0h] BYREF _BYTE v5[48]; // [rsp+90h] [rbp-C0h] BYREF _BYTE v6[48]; // [rsp+C0h] [rbp-90h] BYREF _BYTE v7[48]; // [rsp+F0h] [rbp-60h] BYREF unsigned long long is_zero; // [rsp+120h] [rbp-30h] is_zero = vec_is_zero(a1 + 192, 0x60uLL); sqr_fp2(v6, a1 + 192); mul_fp2(v6, v6, a1 + 192); sqr_fp2(v4, v6); sub_fp(v6, v4, v5); add_fp(v7, v4, v5); lshift_fp(v6, v6, 2LL); lshift_fp(v7, v7, 2LL); sqr_fp2(v4, a1); mul_fp2(v4, v4, a1); add_fp2(v4, v4, v6); sqr_fp2(v3, a1 + 96); is_equal = vec_is_equal((long long)v4, (long long)v3, 0x60uLL); return (unsigned int)is_zero | is_equal; }
blst_p2_on_curve: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x128 MOV R15,RDI LEA R13,[RDI + 0xc0] PUSH 0x60 POP RSI MOV RDI,R13 CALL 0x001510f5 MOV qword ptr [RBP + -0x30],RAX LEA R12,[RBP + -0x90] MOV RDI,R12 MOV RSI,R13 CALL 0x0015ad98 MOV RDI,R12 MOV RSI,R12 MOV RDX,R13 CALL 0x0015ad73 LEA R13,[RBP + -0xf0] MOV RDI,R13 MOV RSI,R12 CALL 0x0015ad98 LEA R14,[RBP + -0xc0] MOV RDI,R12 MOV RSI,R13 MOV RDX,R14 CALL 0x0015aa6c LEA RBX,[RBP + -0x60] MOV RDI,RBX MOV RSI,R13 MOV RDX,R14 CALL 0x00156a78 PUSH 0x2 POP R14 MOV RDI,R12 MOV RSI,R12 MOV RDX,R14 CALL 0x0015aabd MOV RDI,RBX MOV RSI,RBX MOV RDX,R14 CALL 0x0015aabd MOV RDI,R13 MOV RSI,R15 CALL 0x0015ad98 MOV RDI,R13 MOV RSI,R13 MOV RDX,R15 CALL 0x0015ad73 MOV RDI,R13 MOV RSI,R13 MOV RDX,R12 CALL 0x0015acb9 ADD R15,0x60 LEA RBX,[RBP + -0x150] MOV RDI,RBX MOV RSI,R15 CALL 0x0015ad98 MOV RDI,R13 MOV RSI,RBX PUSH 0x60 POP RDX CALL 0x00152f34 OR EAX,dword ptr [RBP + -0x30] ADD RSP,0x128 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
uint blst_p2_on_curve(long param_1) { long lVar1; uint uVar2; int1 local_158 [96]; int1 local_f8 [48]; int1 local_c8 [48]; int1 local_98 [48]; int1 local_68 [48]; int8 local_38; lVar1 = param_1 + 0xc0; local_38 = vec_is_zero(lVar1,0x60); sqr_fp2(local_98,lVar1); mul_fp2(local_98,local_98,lVar1); sqr_fp2(local_f8,local_98); sub_fp(local_98,local_f8,local_c8); add_fp(local_68,local_f8,local_c8); lshift_fp(local_98,local_98,2); lshift_fp(local_68,local_68,2); sqr_fp2(local_f8,param_1); mul_fp2(local_f8,local_f8,param_1); add_fp2(local_f8,local_f8,local_98); sqr_fp2(local_158,param_1 + 0x60); uVar2 = vec_is_equal(local_f8,local_158,0x60); return uVar2 | (uint)local_38; }
4,676
ma_dpointer
eloqsql/storage/maria/ma_search.c
void _ma_dpointer(MARIA_SHARE *share, uchar *buff, my_off_t pos) { if (pos != HA_OFFSET_ERROR) pos= (*share->recpos_to_keypos)(share, pos); switch (share->rec_reflength) { #if SIZEOF_OFF_T > 4 case 8: mi_int8store(buff,pos); break; case 7: mi_int7store(buff,pos); break; case 6: mi_int6store(buff,pos); break; case 5: mi_int5store(buff,pos); break; #else case 8: *buff++=0; /* fall through */ case 7: *buff++=0; /* fall through */ case 6: *buff++=0; /* fall through */ case 5: *buff++=0; /* fall through */ #endif case 4: mi_int4store(buff,pos); break; case 3: mi_int3store(buff,pos); break; case 2: mi_int2store(buff,(uint) pos); break; case 0: break; /* For NO_RECORD */ default: abort(); /* Impossible */ } }
O3
c
ma_dpointer: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 cmpq $-0x1, %rdx je 0x6d4da movq %r14, %rdi movq %rdx, %rsi callq *0x6d0(%r14) jmp 0x6d4e1 movq $-0x1, %rax movl 0x740(%r14), %ecx cmpq $0x8, %rcx ja 0x6d5c5 leaq 0x74007(%rip), %rdx # 0xe1500 movslq (%rdx,%rcx,4), %rcx addq %rdx, %rcx jmpq *%rcx movb %al, 0x1(%rbx) shrq $0x8, %rax jmp 0x6d5be movq %rax, %rcx shrq $0x20, %rcx bswapl %eax movl %eax, 0x1(%rbx) movq %rcx, %rax jmp 0x6d5be movq %rax, %rcx shrq $0x20, %rcx movl %eax, %edx bswapl %edx movl %edx, 0x2(%rbx) movb %cl, 0x1(%rbx) shrq $0x28, %rax jmp 0x6d5be movl %eax, %ecx rolw $0x8, %cx movw %cx, 0x1(%rbx) shrq $0x10, %rax jmp 0x6d5be movq %rax, %rcx shrq $0x20, %rcx movb %cl, 0x3(%rbx) movq %rax, %rcx shrq $0x28, %rcx movb %cl, 0x2(%rbx) movq %rax, %rcx shrq $0x30, %rcx movb %cl, 0x1(%rbx) movq %rax, %rcx shrq $0x38, %rcx movb %cl, (%rbx) movb %al, 0x7(%rbx) movb %ah, 0x6(%rbx) movl %eax, %ecx shrl $0x10, %ecx movb %cl, 0x5(%rbx) addq $0x4, %rbx jmp 0x6d599 movl %eax, %ecx rolw $0x8, %cx movw %cx, 0x2(%rbx) movl %eax, %ecx shrl $0x10, %ecx movb %cl, 0x1(%rbx) shrq $0x18, %rax jmp 0x6d5be movq %rax, %rcx shrq $0x20, %rcx movl %eax, %edx bswapl %edx movl %edx, 0x3(%rbx) movb %cl, 0x2(%rbx) movq %rax, %rcx shrq $0x28, %rcx movb %cl, 0x1(%rbx) shrq $0x30, %rax movb %al, (%rbx) popq %rbx popq %r14 popq %rbp retq callq 0x29600
_ma_dpointer: push rbp mov rbp, rsp push r14 push rbx mov rbx, rsi mov r14, rdi cmp rdx, 0FFFFFFFFFFFFFFFFh jz short loc_6D4DA mov rdi, r14 mov rsi, rdx call qword ptr [r14+6D0h] jmp short loc_6D4E1 loc_6D4DA: mov rax, 0FFFFFFFFFFFFFFFFh loc_6D4E1: mov ecx, [r14+740h] cmp rcx, 8; switch 9 cases ja def_6D500; jumptable 000000000006D500 default case, case 1 lea rdx, jpt_6D500 movsxd rcx, ds:(jpt_6D500 - 0E1500h)[rdx+rcx*4] add rcx, rdx jmp rcx; switch jump loc_6D502: mov [rbx+1], al; jumptable 000000000006D500 case 2 shr rax, 8 jmp loc_6D5BE loc_6D50E: mov rcx, rax; jumptable 000000000006D500 case 5 shr rcx, 20h bswap eax mov [rbx+1], eax mov rax, rcx jmp loc_6D5BE loc_6D522: mov rcx, rax; jumptable 000000000006D500 case 6 shr rcx, 20h mov edx, eax bswap edx mov [rbx+2], edx mov [rbx+1], cl shr rax, 28h jmp loc_6D5BE loc_6D53C: mov ecx, eax; jumptable 000000000006D500 case 3 rol cx, 8 mov [rbx+1], cx shr rax, 10h jmp short loc_6D5BE loc_6D54C: mov rcx, rax; jumptable 000000000006D500 case 8 shr rcx, 20h mov [rbx+3], cl mov rcx, rax shr rcx, 28h mov [rbx+2], cl mov rcx, rax shr rcx, 30h mov [rbx+1], cl mov rcx, rax shr rcx, 38h mov [rbx], cl mov [rbx+7], al mov [rbx+6], ah mov ecx, eax shr ecx, 10h mov [rbx+5], cl add rbx, 4 jmp short loc_6D599 loc_6D587: mov ecx, eax; jumptable 000000000006D500 case 4 rol cx, 8 mov [rbx+2], cx mov ecx, eax shr ecx, 10h mov [rbx+1], cl loc_6D599: shr rax, 18h jmp short loc_6D5BE loc_6D59F: mov rcx, rax; jumptable 000000000006D500 case 7 shr rcx, 20h mov edx, eax bswap edx mov [rbx+3], edx mov [rbx+2], cl mov rcx, rax shr rcx, 28h mov [rbx+1], cl shr rax, 30h loc_6D5BE: mov [rbx], al loc_6D5C0: pop rbx; jumptable 000000000006D500 case 0 pop r14 pop rbp retn def_6D500: call _abort; jumptable 000000000006D500 default case, case 1
unsigned long long ma_dpointer(long long a1, long long a2, long long a3) { long long v3; // rbx unsigned long long result; // rax v3 = a2; if ( a3 == -1 ) { result = -1LL; } else { a2 = a3; result = (*(long long ( **)(long long, long long))(a1 + 1744))(a1, a3); } switch ( *(_DWORD *)(a1 + 1856) ) { case 0: return result; case 2: *(_BYTE *)(v3 + 1) = result; result >>= 8; goto LABEL_13; case 3: *(_WORD *)(v3 + 1) = __ROL2__(result, 8); result >>= 16; goto LABEL_13; case 4: *(_WORD *)(v3 + 2) = __ROL2__(result, 8); *(_BYTE *)(v3 + 1) = BYTE2(result); goto LABEL_11; case 5: *(_DWORD *)(v3 + 1) = _byteswap_ulong(result); result >>= 32; goto LABEL_13; case 6: *(_DWORD *)(v3 + 2) = _byteswap_ulong(result); *(_BYTE *)(v3 + 1) = BYTE4(result); result >>= 40; goto LABEL_13; case 7: *(_DWORD *)(v3 + 3) = _byteswap_ulong(result); *(_BYTE *)(v3 + 2) = BYTE4(result); *(_BYTE *)(v3 + 1) = BYTE5(result); result >>= 48; goto LABEL_13; case 8: *(_BYTE *)(v3 + 3) = BYTE4(result); *(_BYTE *)(v3 + 2) = BYTE5(result); *(_BYTE *)(v3 + 1) = BYTE6(result); *(_BYTE *)v3 = HIBYTE(result); *(_BYTE *)(v3 + 7) = result; *(_BYTE *)(v3 + 6) = BYTE1(result); *(_BYTE *)(v3 + 5) = BYTE2(result); v3 += 4LL; LABEL_11: result >>= 24; LABEL_13: *(_BYTE *)v3 = result; return result; default: abort(a1, a2, a3); } }
_ma_dpointer: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RSI MOV R14,RDI CMP RDX,-0x1 JZ 0x0016d4da MOV RDI,R14 MOV RSI,RDX CALL qword ptr [R14 + 0x6d0] JMP 0x0016d4e1 LAB_0016d4da: MOV RAX,-0x1 LAB_0016d4e1: MOV ECX,dword ptr [R14 + 0x740] CMP RCX,0x8 JA 0x0016d5c5 LEA RDX,[0x1e1500] MOVSXD RCX,dword ptr [RDX + RCX*0x4] ADD RCX,RDX switchD: JMP RCX caseD_2: MOV byte ptr [RBX + 0x1],AL SHR RAX,0x8 JMP 0x0016d5be caseD_5: MOV RCX,RAX SHR RCX,0x20 BSWAP EAX MOV dword ptr [RBX + 0x1],EAX MOV RAX,RCX JMP 0x0016d5be caseD_6: MOV RCX,RAX SHR RCX,0x20 MOV EDX,EAX BSWAP EDX MOV dword ptr [RBX + 0x2],EDX MOV byte ptr [RBX + 0x1],CL SHR RAX,0x28 JMP 0x0016d5be caseD_3: MOV ECX,EAX ROL CX,0x8 MOV word ptr [RBX + 0x1],CX SHR RAX,0x10 JMP 0x0016d5be caseD_8: MOV RCX,RAX SHR RCX,0x20 MOV byte ptr [RBX + 0x3],CL MOV RCX,RAX SHR RCX,0x28 MOV byte ptr [RBX + 0x2],CL MOV RCX,RAX SHR RCX,0x30 MOV byte ptr [RBX + 0x1],CL MOV RCX,RAX SHR RCX,0x38 MOV byte ptr [RBX],CL MOV byte ptr [RBX + 0x7],AL MOV byte ptr [RBX + 0x6],AH MOV ECX,EAX SHR ECX,0x10 MOV byte ptr [RBX + 0x5],CL ADD RBX,0x4 JMP 0x0016d599 caseD_4: MOV ECX,EAX ROL CX,0x8 MOV word ptr [RBX + 0x2],CX MOV ECX,EAX SHR ECX,0x10 MOV byte ptr [RBX + 0x1],CL LAB_0016d599: SHR RAX,0x18 JMP 0x0016d5be caseD_7: MOV RCX,RAX SHR RCX,0x20 MOV EDX,EAX BSWAP EDX MOV dword ptr [RBX + 0x3],EDX MOV byte ptr [RBX + 0x2],CL MOV RCX,RAX SHR RCX,0x28 MOV byte ptr [RBX + 0x1],CL SHR RAX,0x30 LAB_0016d5be: MOV byte ptr [RBX],AL caseD_0: POP RBX POP R14 POP RBP RET caseD_1: CALL 0x00129600
void _ma_dpointer(long param_1,int1 *param_2,long param_3) { ushort uVar1; int1 uVar2; int1 uVar5; int8 uVar7; int1 uVar8; int1 uVar3; int1 uVar4; uint uVar6; if (param_3 == -1) { uVar7 = 0xffffffffffffffff; } else { uVar7 = (**(code **)(param_1 + 0x6d0))(param_1,param_3); } uVar6 = (uint)uVar7; uVar5 = (int1)((ulong)uVar7 >> 8); uVar2 = (int1)((ulong)uVar7 >> 0x20); uVar3 = (int1)((ulong)uVar7 >> 0x28); uVar8 = (int1)((ulong)uVar7 >> 0x30); uVar4 = (int1)((ulong)uVar7 >> 0x10); uVar1 = (ushort)uVar7; switch(*(int4 *)(param_1 + 0x740)) { case 0: goto switchD_0016d500_caseD_0; default: /* WARNING: Subroutine does not return */ abort(); case 2: param_2[1] = (char)uVar7; break; case 3: *(ushort *)(param_2 + 1) = uVar1 << 8 | uVar1 >> 8; uVar5 = uVar4; break; case 4: *(ushort *)(param_2 + 2) = uVar1 << 8 | uVar1 >> 8; param_2[1] = uVar4; goto LAB_0016d599; case 5: *(uint *)(param_2 + 1) = uVar6 >> 0x18 | (uVar6 & 0xff0000) >> 8 | (uVar6 & 0xff00) << 8 | uVar6 << 0x18; uVar5 = uVar2; break; case 6: *(uint *)(param_2 + 2) = uVar6 >> 0x18 | (uVar6 & 0xff0000) >> 8 | (uVar6 & 0xff00) << 8 | uVar6 << 0x18; param_2[1] = uVar2; uVar5 = uVar3; break; case 7: *(uint *)(param_2 + 3) = uVar6 >> 0x18 | (uVar6 & 0xff0000) >> 8 | (uVar6 & 0xff00) << 8 | uVar6 << 0x18; param_2[2] = uVar2; param_2[1] = uVar3; uVar5 = uVar8; break; case 8: param_2[3] = uVar2; param_2[2] = uVar3; param_2[1] = uVar8; *param_2 = (char)((ulong)uVar7 >> 0x38); param_2[7] = (char)uVar7; param_2[6] = uVar5; param_2[5] = uVar4; param_2 = param_2 + 4; LAB_0016d599: uVar5 = (char)((ulong)uVar7 >> 0x18); } *param_2 = uVar5; switchD_0016d500_caseD_0: return; }
4,677
common_chat_tool_choice_parse_oaicompat(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
llama.cpp/common/chat.cpp
common_chat_tool_choice common_chat_tool_choice_parse_oaicompat(const std::string & tool_choice) { if (tool_choice == "auto") { return COMMON_CHAT_TOOL_CHOICE_AUTO; } if (tool_choice == "none") { return COMMON_CHAT_TOOL_CHOICE_NONE; } if (tool_choice == "required") { return COMMON_CHAT_TOOL_CHOICE_REQUIRED; } throw std::runtime_error("Invalid tool_choice: " + tool_choice); }
O3
cpp
common_chat_tool_choice_parse_oaicompat(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r14 pushq %rbx subq $0x20, %rsp movq %rdi, %r14 leaq 0x8ecc2(%rip), %rsi # 0x11eb5c callq 0x20f50 testl %eax, %eax je 0x8ff15 leaq 0x84b59(%rip), %rsi # 0x114a03 movq %r14, %rdi callq 0x20f50 testl %eax, %eax je 0x8ff19 leaq 0x8eca4(%rip), %rsi # 0x11eb61 movq %r14, %rdi callq 0x20f50 movl %eax, %ecx movl $0x1, %eax testl %ecx, %ecx je 0x8ff1e movl $0x10, %edi callq 0x20640 movq %rax, %rbx leaq 0x8ec86(%rip), %rsi # 0x11eb6a movq %rsp, %rdi movq %r14, %rdx callq 0x64cb9 movb $0x1, %bpl movq %rsp, %rsi movq %rbx, %rdi callq 0x20470 xorl %ebp, %ebp movq 0xd20ba(%rip), %rsi # 0x161fc0 movq 0xd2073(%rip), %rdx # 0x161f80 movq %rbx, %rdi callq 0x20a40 xorl %eax, %eax jmp 0x8ff1e movl $0x2, %eax addq $0x20, %rsp popq %rbx popq %r14 popq %rbp retq movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x8ff45 movq 0x10(%rsp), %rsi incq %rsi callq 0x20180 testb %bpl, %bpl jne 0x8ff4f jmp 0x8ff57 movq %rax, %r14 movq %rbx, %rdi callq 0x20ef0 movq %r14, %rdi callq 0x20ae0
_Z39common_chat_tool_choice_parse_oaicompatRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r14 push rbx sub rsp, 20h mov r14, rdi lea rsi, aAuto; "auto" call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_8FF15 lea rsi, aNone; "none" mov rdi, r14 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_8FF19 lea rsi, aRequired; "required" mov rdi, r14 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) mov ecx, eax mov eax, 1 test ecx, ecx jz short loc_8FF1E mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aInvalidToolCho; "Invalid tool_choice: " mov rdi, rsp mov rdx, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov bpl, 1 mov rsi, rsp mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_8FF15: xor eax, eax jmp short loc_8FF1E loc_8FF19: mov eax, 2 loc_8FF1E: add rsp, 20h pop rbx pop r14 pop rbp retn mov r14, rax lea rax, [rsp+arg_8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_8FF45 mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8FF45: test bpl, bpl jnz short loc_8FF4F jmp short loc_8FF57 mov r14, rax loc_8FF4F: mov rdi, rbx; void * call ___cxa_free_exception loc_8FF57: mov rdi, r14 call __Unwind_Resume
long long common_chat_tool_choice_parse_oaicompat(_QWORD *a1) { int v1; // ecx long long result; // rax void *exception; // rbx _BYTE v4[56]; // [rsp+0h] [rbp-38h] BYREF if ( !(unsigned int)std::string::compare(a1, "auto") ) return 0LL; if ( !(unsigned int)std::string::compare(a1, "none") ) return 2LL; v1 = std::string::compare(a1, "required"); result = 1LL; if ( v1 ) { exception = __cxa_allocate_exception(0x10uLL); std::operator+<char>((long long)v4, (long long)"Invalid tool_choice: ", a1); std::runtime_error::runtime_error(exception, v4); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return result; }
common_chat_tool_choice_parse_oaicompat: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x20 MOV R14,RDI LEA RSI,[0x21eb5c] CALL 0x00120f50 TEST EAX,EAX JZ 0x0018ff15 LEA RSI,[0x214a03] MOV RDI,R14 CALL 0x00120f50 TEST EAX,EAX JZ 0x0018ff19 LEA RSI,[0x21eb61] MOV RDI,R14 CALL 0x00120f50 MOV ECX,EAX MOV EAX,0x1 TEST ECX,ECX JZ 0x0018ff1e MOV EDI,0x10 CALL 0x00120640 MOV RBX,RAX LAB_0018fedd: LEA RSI,[0x21eb6a] MOV RDI,RSP MOV RDX,R14 CALL 0x00164cb9 MOV BPL,0x1 LAB_0018fef2: MOV RSI,RSP MOV RDI,RBX CALL 0x00120470 XOR EBP,EBP MOV RSI,qword ptr [0x00261fc0] MOV RDX,qword ptr [0x00261f80] MOV RDI,RBX CALL 0x00120a40 LAB_0018ff15: XOR EAX,EAX JMP 0x0018ff1e LAB_0018ff19: MOV EAX,0x2 LAB_0018ff1e: ADD RSP,0x20 POP RBX POP R14 POP RBP RET
/* common_chat_tool_choice_parse_oaicompat(std::__cxx11::string const&) */ int8 common_chat_tool_choice_parse_oaicompat(string *param_1) { int iVar1; int8 uVar2; runtime_error *this; string asStack_38 [32]; iVar1 = std::__cxx11::string::compare((char *)param_1); if (iVar1 == 0) { uVar2 = 0; } else { iVar1 = std::__cxx11::string::compare((char *)param_1); if (iVar1 == 0) { uVar2 = 2; } else { iVar1 = std::__cxx11::string::compare((char *)param_1); uVar2 = 1; if (iVar1 != 0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0018fedd to 0018feee has its CatchHandler @ 0018ff4c */ std::operator+((char *)asStack_38,(string *)"Invalid tool_choice: "); /* try { // try from 0018fef2 to 0018ff14 has its CatchHandler @ 0018ff27 */ std::runtime_error::runtime_error(this,asStack_38); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00261fc0,PTR__runtime_error_00261f80); } } } return uVar2; }
4,678
ma_crypt_create
eloqsql/storage/maria/ma_crypt.c
int ma_crypt_create(MARIA_SHARE* share) { MARIA_CRYPT_DATA *crypt_data= (MARIA_CRYPT_DATA*)my_malloc(PSI_INSTRUMENT_ME, sizeof(MARIA_CRYPT_DATA), MYF(MY_ZEROFILL)); crypt_data->scheme.type= CRYPT_SCHEME_1; crypt_data->scheme.locker= crypt_data_scheme_locker; mysql_mutex_init(key_CRYPT_DATA_lock, &crypt_data->lock, MY_MUTEX_INIT_FAST); crypt_data->scheme.key_id= get_encryption_key_id(share); my_random_bytes(crypt_data->scheme.iv, sizeof(crypt_data->scheme.iv)); my_random_bytes((uchar*)&crypt_data->space, sizeof(crypt_data->space)); share->crypt_data= crypt_data; share->crypt_page_header_space= CRYPT_SCHEME_1_KEY_VERSION_SIZE; return 0; }
O3
c
ma_crypt_create: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl $0xb0, %esi movl $0x20, %edx xorl %edi, %edi callq 0x9fc99 movq %rax, %r14 movl $0x1, 0x54(%rax) leaq 0xae(%rip), %rax # 0x50b49 movq %rax, 0x58(%r14) movl 0xbaed67(%rip), %edi # 0xbff80c leaq 0x68(%r14), %r15 leaq 0x335560(%rip), %rax # 0x386010 movq (%rax), %rax movq %r15, %rsi callq *0x40(%rax) movq %rax, 0xa8(%r14) movq %r15, 0xa0(%r14) xorps %xmm0, %xmm0 movups %xmm0, 0x90(%r14) leaq 0xbb7f57(%rip), %rsi # 0xc08a30 movq %r15, %rdi callq 0x29340 testb $0x10, 0x720(%rbx) je 0x50b03 leaq 0x333527(%rip), %rax # 0x384018 movl $0x2, %r15d movl $0x2, %edi callq *(%rax) cmpl $-0x1, %eax jne 0x50b09 movl $0x1, %r15d movl %r15d, 0x50(%r14) movq %r14, %rdi movl $0x10, %esi callq 0xd81f0 movq %r14, %rdi addq $0x60, %rdi movl $0x4, %esi callq 0xd81f0 movq %r14, 0xc20(%rbx) movl $0x4, 0xc18(%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
ma_crypt_create: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov esi, 0B0h mov edx, 20h ; ' ' xor edi, edi call my_malloc mov r14, rax mov dword ptr [rax+54h], 1 lea rax, crypt_data_scheme_locker mov [r14+58h], rax mov edi, cs:key_CRYPT_DATA_lock lea r15, [r14+68h] lea rax, PSI_server mov rax, [rax] mov rsi, r15 call qword ptr [rax+40h] mov [r14+0A8h], rax mov [r14+0A0h], r15 xorps xmm0, xmm0 movups xmmword ptr [r14+90h], xmm0 lea rsi, my_fast_mutexattr mov rdi, r15 call _pthread_mutex_init test byte ptr [rbx+720h], 10h jz short loc_50B03 lea rax, encryption_handler mov r15d, 2 mov edi, 2 call qword ptr [rax] cmp eax, 0FFFFFFFFh jnz short loc_50B09 loc_50B03: mov r15d, 1 loc_50B09: mov [r14+50h], r15d mov rdi, r14 mov esi, 10h call my_random_bytes mov rdi, r14 add rdi, 60h ; '`' mov esi, 4 call my_random_bytes mov [rbx+0C20h], r14 mov dword ptr [rbx+0C18h], 4 xor eax, eax add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long ma_crypt_create(long long a1) { long long v1; // r14 int v2; // r15d v1 = my_malloc(0LL, 176LL, 32LL); *(_DWORD *)(v1 + 84) = 1; *(_QWORD *)(v1 + 88) = crypt_data_scheme_locker; *(_QWORD *)(v1 + 168) = ((long long ( *)(_QWORD, long long))PSI_server[8])( (unsigned int)key_CRYPT_DATA_lock, v1 + 104); *(_QWORD *)(v1 + 160) = v1 + 104; *(_OWORD *)(v1 + 144) = 0LL; pthread_mutex_init(v1 + 104, &my_fast_mutexattr); if ( (*(_BYTE *)(a1 + 1824) & 0x10) == 0 || (v2 = 2, (unsigned int)encryption_handler() == -1) ) v2 = 1; *(_DWORD *)(v1 + 80) = v2; my_random_bytes(v1, 16LL); my_random_bytes(v1 + 96, 4LL); *(_QWORD *)(a1 + 3104) = v1; *(_DWORD *)(a1 + 3096) = 4; return 0LL; }
ma_crypt_create: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV ESI,0xb0 MOV EDX,0x20 XOR EDI,EDI CALL 0x0019fc99 MOV R14,RAX MOV dword ptr [RAX + 0x54],0x1 LEA RAX,[0x150b49] MOV qword ptr [R14 + 0x58],RAX MOV EDI,dword ptr [0x00cff80c] LEA R15,[R14 + 0x68] LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] MOV RSI,R15 CALL qword ptr [RAX + 0x40] MOV qword ptr [R14 + 0xa8],RAX MOV qword ptr [R14 + 0xa0],R15 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x90],XMM0 LEA RSI,[0xd08a30] MOV RDI,R15 CALL 0x00129340 TEST byte ptr [RBX + 0x720],0x10 JZ 0x00150b03 LEA RAX,[0x484018] MOV R15D,0x2 MOV EDI,0x2 CALL qword ptr [RAX] CMP EAX,-0x1 JNZ 0x00150b09 LAB_00150b03: MOV R15D,0x1 LAB_00150b09: MOV dword ptr [R14 + 0x50],R15D MOV RDI,R14 MOV ESI,0x10 CALL 0x001d81f0 MOV RDI,R14 ADD RDI,0x60 MOV ESI,0x4 CALL 0x001d81f0 MOV qword ptr [RBX + 0xc20],R14 MOV dword ptr [RBX + 0xc18],0x4 XOR EAX,EAX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int8 ma_crypt_create(long param_1) { pthread_mutex_t *__mutex; int iVar1; long lVar2; int8 uVar3; int4 uVar4; lVar2 = my_malloc(0,0xb0,0x20); *(int4 *)(lVar2 + 0x54) = 1; *(code **)(lVar2 + 0x58) = crypt_data_scheme_locker; __mutex = (pthread_mutex_t *)(lVar2 + 0x68); uVar3 = (**(code **)(PSI_server + 0x40))(key_CRYPT_DATA_lock,__mutex); *(int8 *)(lVar2 + 0xa8) = uVar3; *(pthread_mutex_t **)(lVar2 + 0xa0) = __mutex; *(int8 *)(lVar2 + 0x90) = 0; *(int8 *)(lVar2 + 0x98) = 0; pthread_mutex_init(__mutex,(pthread_mutexattr_t *)&my_fast_mutexattr); if ((*(byte *)(param_1 + 0x720) & 0x10) != 0) { uVar4 = 2; iVar1 = (*(code *)encryption_handler)(2); if (iVar1 != -1) goto LAB_00150b09; } uVar4 = 1; LAB_00150b09: *(int4 *)(lVar2 + 0x50) = uVar4; my_random_bytes(lVar2,0x10); my_random_bytes(lVar2 + 0x60,4); *(long *)(param_1 + 0xc20) = lVar2; *(int4 *)(param_1 + 0xc18) = 4; return 0; }
4,679
is_not_initialized
eloqsql/build_O0/libmariadb/libmariadb/ma_client_plugin.c
static int is_not_initialized(MYSQL *mysql, const char *name) { if (initialized) return 0; my_set_error(mysql, CR_AUTH_PLUGIN_CANNOT_LOAD, SQLSTATE_UNKNOWN, ER(CR_AUTH_PLUGIN_CANNOT_LOAD), name, "not initialized"); return 1; }
O0
c
is_not_initialized: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) cmpb $0x0, 0x39ca69(%rip) # 0x4042e0 je 0x67882 movl $0x0, -0x4(%rbp) jmp 0x678bc movq -0x10(%rbp), %rdi leaq 0x1e2143(%rip), %rax # 0x2499d0 movq (%rax), %rdx leaq 0x1e2149(%rip), %rax # 0x2499e0 movq 0x1d8(%rax), %rcx movq -0x18(%rbp), %r8 movl $0x80b, %esi # imm = 0x80B leaq 0x78379(%rip), %r9 # 0xdfc27 movb $0x0, %al callq 0x47bd0 movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
is_not_initialized: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi cmp cs:initialized, 0 jz short loc_67882 mov [rbp+var_4], 0 jmp short loc_678BC loc_67882: mov rdi, [rbp+var_10] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, client_errors mov rcx, [rax+1D8h] mov r8, [rbp+var_18] mov esi, 80Bh lea r9, aNotInitialized; "not initialized" mov al, 0 call my_set_error mov [rbp+var_4], 1 loc_678BC: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long is_not_initialized(long long a1, long long a2) { if ( initialized ) { return 0; } else { my_set_error(a1, 0x80Bu, (long long)SQLSTATE_UNKNOWN, (long long)client_errors[59], a2, "not initialized"); return 1; } }
is_not_initialized: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI CMP byte ptr [0x005042e0],0x0 JZ 0x00167882 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001678bc LAB_00167882: MOV RDI,qword ptr [RBP + -0x10] LEA RAX,[0x3499d0] MOV RDX,qword ptr [RAX] LEA RAX,[0x3499e0] MOV RCX,qword ptr [RAX + 0x1d8] MOV R8,qword ptr [RBP + -0x18] MOV ESI,0x80b LEA R9,[0x1dfc27] MOV AL,0x0 CALL 0x00147bd0 MOV dword ptr [RBP + -0x4],0x1 LAB_001678bc: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
bool is_not_initialized(int8 param_1,int8 param_2) { bool bVar1; bVar1 = initialized == '\0'; if (bVar1) { my_set_error(param_1,0x80b,SQLSTATE_UNKNOWN,PTR_s_Plugin__s_could_not_be_loaded____00349bb8, param_2,"not initialized"); } return bVar1; }
4,680
svc_service_get
qoraal-tictactoe/build_O0/_deps/qoraal-src/src/svc/svc_services.c
SCV_SERVICE_HANDLE svc_service_get (SVC_SERVICES_T id) { SVC_SERVICE_T* pservice = 0 ; unsigned int i ; SCV_SERVICE_HANDLE handle = SVC_SERVICE_INVALID_HANDLE ; if (!_svc_service_list) return handle ; for (i=0; i<_cfg_service_cnt; i++) { pservice = &_svc_service_list[i] ; if (pservice->service == id) { handle = i ; break ; } } return handle ; }
O0
c
svc_service_get: pushq %rbp movq %rsp, %rbp movl %edi, -0x8(%rbp) movq $0x0, -0x10(%rbp) movl $0xffffffff, -0x18(%rbp) # imm = 0xFFFFFFFF cmpq $0x0, 0x2f93a(%rip) # 0x4edc8 jne 0x1f498 movl -0x18(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1f4e6 movl $0x0, -0x14(%rbp) movl -0x14(%rbp), %eax cmpl 0x2f928(%rip), %eax # 0x4edd0 jae 0x1f4e0 movq 0x2f917(%rip), %rax # 0x4edc8 movl -0x14(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movl 0x5c(%rax), %eax cmpl -0x8(%rbp), %eax jne 0x1f4d3 movl -0x14(%rbp), %eax movl %eax, -0x18(%rbp) jmp 0x1f4e0 jmp 0x1f4d5 movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0x1f49f movl -0x18(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
svc_service_get: push rbp mov rbp, rsp mov [rbp+var_8], edi mov [rbp+var_10], 0 mov [rbp+var_18], 0FFFFFFFFh cmp cs:_svc_service_list, 0 jnz short loc_1F498 mov eax, [rbp+var_18] mov [rbp+var_4], eax jmp short loc_1F4E6 loc_1F498: mov [rbp+var_14], 0 loc_1F49F: mov eax, [rbp+var_14] cmp eax, cs:_cfg_service_cnt jnb short loc_1F4E0 mov rax, cs:_svc_service_list mov ecx, [rbp+var_14] imul rcx, 70h ; 'p' add rax, rcx mov [rbp+var_10], rax mov rax, [rbp+var_10] mov eax, [rax+5Ch] cmp eax, [rbp+var_8] jnz short loc_1F4D3 mov eax, [rbp+var_14] mov [rbp+var_18], eax jmp short loc_1F4E0 loc_1F4D3: jmp short $+2 loc_1F4D5: mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax jmp short loc_1F49F loc_1F4E0: mov eax, [rbp+var_18] mov [rbp+var_4], eax loc_1F4E6: mov eax, [rbp+var_4] pop rbp retn
long long svc_service_get(int a1) { unsigned int v2; // [rsp+0h] [rbp-18h] unsigned int i; // [rsp+4h] [rbp-14h] v2 = -1; if ( svc_service_list ) { for ( i = 0; i < cfg_service_cnt; ++i ) { if ( *(_DWORD *)(112LL * i + svc_service_list + 92) == a1 ) { v2 = i; break; } } return v2; } else { return (unsigned int)-1; } }
svc_service_get: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],0x0 MOV dword ptr [RBP + -0x18],0xffffffff CMP qword ptr [0x0014edc8],0x0 JNZ 0x0011f498 MOV EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x4],EAX JMP 0x0011f4e6 LAB_0011f498: MOV dword ptr [RBP + -0x14],0x0 LAB_0011f49f: MOV EAX,dword ptr [RBP + -0x14] CMP EAX,dword ptr [0x0014edd0] JNC 0x0011f4e0 MOV RAX,qword ptr [0x0014edc8] MOV ECX,dword ptr [RBP + -0x14] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x5c] CMP EAX,dword ptr [RBP + -0x8] JNZ 0x0011f4d3 MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x18],EAX JMP 0x0011f4e0 LAB_0011f4d3: JMP 0x0011f4d5 LAB_0011f4d5: MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x0011f49f LAB_0011f4e0: MOV EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x4],EAX LAB_0011f4e6: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
uint svc_service_get(int param_1) { int4 local_20; int4 local_1c; int4 local_c; local_20 = 0xffffffff; if (_svc_service_list == 0) { local_c = 0xffffffff; } else { for (local_1c = 0; local_1c < _cfg_service_cnt; local_1c = local_1c + 1) { if (*(int *)(_svc_service_list + (ulong)local_1c * 0x70 + 0x5c) == param_1) { local_20 = local_1c; break; } } local_c = local_20; } return local_c; }
4,681
delete_head_or_tail
eloqsql/storage/maria/ma_blockrec.c
static my_bool delete_head_or_tail(MARIA_HA *info, pgcache_page_no_t page, uint record_number, my_bool head, my_bool from_update) { MARIA_SHARE *share= info->s; uint empty_space; int res; my_bool page_is_empty; uchar *buff; LSN lsn; MARIA_PINNED_PAGE page_link; enum pagecache_page_lock lock_at_write, lock_at_unpin; DBUG_ENTER("delete_head_or_tail"); DBUG_PRINT("enter", ("id: %lu (%lu:%u)", (ulong) ma_recordpos(page, record_number), (ulong) page, record_number)); buff= pagecache_read(share->pagecache, &info->dfile, page, 0, 0, share->page_type, PAGECACHE_LOCK_WRITE, &page_link.link); page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK; page_link.changed= buff != 0; push_dynamic(&info->pinned_pages, (void*) &page_link); if (!buff) { _ma_set_fatal_error(info, my_errno); DBUG_RETURN(1); } DBUG_ASSERT((buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == (head ? HEAD_PAGE : TAIL_PAGE)); if (from_update) { lock_at_write= PAGECACHE_LOCK_LEFT_WRITELOCKED; lock_at_unpin= PAGECACHE_LOCK_WRITE_UNLOCK; } else { lock_at_write= PAGECACHE_LOCK_WRITE_TO_READ; lock_at_unpin= PAGECACHE_LOCK_READ_UNLOCK; } res= delete_dir_entry(share, buff, record_number, &empty_space); if (res < 0) DBUG_RETURN(1); if (res == 0) /* after our deletion, page is still not empty */ { uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + DIRPOS_STORE_SIZE]; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 1]; page_is_empty= 0; if (share->now_transactional) { /* Log REDO data */ page_store(log_data + FILEID_STORE_SIZE, page); dirpos_store(log_data + FILEID_STORE_SIZE + PAGE_STORE_SIZE, record_number); log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data); if (translog_write_record(&lsn, (head ? LOGREC_REDO_PURGE_ROW_HEAD : LOGREC_REDO_PURGE_ROW_TAIL), info->trn, info, (translog_size_t) sizeof(log_data), TRANSLOG_INTERNAL_PARTS + 1, log_array, log_data, NULL)) DBUG_RETURN(1); } } else /* page is now empty */ { page_is_empty= 1; if (share->now_transactional) { uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE]; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 1]; page_store(log_data + FILEID_STORE_SIZE, page); log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data); if (translog_write_record(&lsn, LOGREC_REDO_FREE_HEAD_OR_TAIL, info->trn, info, (translog_size_t) sizeof(log_data), TRANSLOG_INTERNAL_PARTS + 1, log_array, log_data, NULL)) DBUG_RETURN(1); } /* Mark that this page must be written to disk by page cache, even if we could call pagecache_delete() on it. This is needed to ensure that repair finds the empty page on disk and not old data. */ pagecache_set_write_on_delete_by_link(page_link.link); DBUG_ASSERT(empty_space >= share->bitmap.sizes[0]); } pagecache_unlock_by_link(share->pagecache, page_link.link, lock_at_write, PAGECACHE_PIN_LEFT_PINNED, LSN_IMPOSSIBLE, LSN_IMPOSSIBLE, 1, FALSE); page_link.unlock= lock_at_unpin; set_dynamic(&info->pinned_pages, (void*) &page_link, info->pinned_pages.elements-1); DBUG_PRINT("info", ("empty_space: %u", empty_space)); /* If there is not enough space for all possible tails, mark the page full */ if (!head && !page_is_empty && !enough_free_entries(buff, share->block_size, 1 + share->base.blobs)) empty_space= 0; DBUG_RETURN(_ma_bitmap_set(info, page, head, empty_space)); }
O0
c
delete_head_or_tail: pushq %rbp movq %rsp, %rbp subq $0x120, %rsp # imm = 0x120 movb %r8b, %al movq %fs:0x28, %r8 movq %r8, -0x8(%rbp) movq %rdi, -0x20(%rbp) movq %rsi, -0x28(%rbp) movl %edx, -0x2c(%rbp) movb %cl, -0x2d(%rbp) movb %al, -0x2e(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) jmp 0x56339 movq -0x38(%rbp), %rax movq 0x600(%rax), %rdi movq -0x20(%rbp), %rsi addq $0x470, %rsi # imm = 0x470 movq -0x28(%rbp), %rdx movq -0x38(%rbp), %rax movl 0x7d4(%rax), %r9d leaq -0x70(%rbp), %rax xorl %ecx, %ecx xorl %r8d, %r8d movl $0x4, (%rsp) movq %rax, 0x8(%rsp) callq 0x3d190 movq %rax, -0x50(%rbp) movl $0x6, -0x68(%rbp) cmpq $0x0, -0x50(%rbp) setne %al andb $0x1, %al movzbl %al, %eax movb %al, -0x60(%rbp) movq -0x20(%rbp), %rdi addq $0x2e8, %rdi # imm = 0x2E8 leaq -0x70(%rbp), %rsi callq 0xda810 cmpq $0x0, -0x50(%rbp) jne 0x563d5 movq -0x20(%rbp), %rax movq %rax, -0x100(%rbp) callq 0xf6210 movq -0x100(%rbp), %rdi movl (%rax), %esi callq 0x43f20 movb $0x1, -0x18(%rbp) jmp 0x5666d jmp 0x563d7 jmp 0x563d9 cmpb $0x0, -0x2e(%rbp) je 0x563ef movl $0x2, -0x74(%rbp) movl $0x6, -0x78(%rbp) jmp 0x563fd movl $0x7, -0x74(%rbp) movl $0x5, -0x78(%rbp) movq -0x38(%rbp), %rdi movq -0x50(%rbp), %rsi movl -0x2c(%rbp), %edx leaq -0x3c(%rbp), %rcx callq 0x5b150 movl %eax, -0x40(%rbp) cmpl $0x0, -0x40(%rbp) jge 0x56425 jmp 0x5641c movb $0x1, -0x18(%rbp) jmp 0x5666d cmpl $0x0, -0x40(%rbp) jne 0x564ff movb $0x0, -0x41(%rbp) movq -0x38(%rbp), %rax cmpb $0x0, 0x7e7(%rax) je 0x564fa jmp 0x56446 leaq -0x10(%rbp), %rax addq $0x2, %rax movq %rax, -0xb8(%rbp) movq -0x28(%rbp), %rax movl %eax, %ecx movq -0xb8(%rbp), %rax movl %ecx, (%rax) movq -0x28(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0xb8(%rbp), %rax movb %cl, 0x4(%rax) movl -0x2c(%rbp), %eax movb %al, -0x9(%rbp) leaq -0x10(%rbp), %rax movq %rax, -0x90(%rbp) movq $0x8, -0x88(%rbp) movsbl -0x2d(%rbp), %ecx movl $0x7, %esi movl $0x6, %eax cmpl $0x0, %ecx cmovnel %eax, %esi movq -0x20(%rbp), %rax movq 0x8(%rax), %rdx movq -0x20(%rbp), %rcx leaq -0xb0(%rbp), %r10 leaq -0x10(%rbp), %rax leaq -0x58(%rbp), %rdi movl $0x8, %r8d movl $0x3, %r9d xorl %r11d, %r11d movq %r10, (%rsp) movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) callq 0x31fe0 cmpb $0x0, %al je 0x564f8 jmp 0x564ef movb $0x1, -0x18(%rbp) jmp 0x5666d jmp 0x564fa jmp 0x565c2 movb $0x1, -0x41(%rbp) movq -0x38(%rbp), %rax cmpb $0x0, 0x7e7(%rax) je 0x565b5 jmp 0x56516 leaq -0x17(%rbp), %rax addq $0x2, %rax movq %rax, -0xf8(%rbp) movq -0x28(%rbp), %rax movl %eax, %ecx movq -0xf8(%rbp), %rax movl %ecx, (%rax) movq -0x28(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0xf8(%rbp), %rax movb %cl, 0x4(%rax) leaq -0x17(%rbp), %rax movq %rax, -0xd0(%rbp) movq $0x7, -0xc8(%rbp) movq -0x20(%rbp), %rax movq 0x8(%rax), %rdx movq -0x20(%rbp), %rcx leaq -0xf0(%rbp), %r10 leaq -0x17(%rbp), %rax leaq -0x58(%rbp), %rdi movl $0x9, %esi movl $0x7, %r8d movl $0x3, %r9d xorl %r11d, %r11d movq %r10, (%rsp) movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) callq 0x31fe0 cmpb $0x0, %al je 0x565b3 jmp 0x565aa movb $0x1, -0x18(%rbp) jmp 0x5666d jmp 0x565b5 movq -0x70(%rbp), %rdi callq 0x3e140 jmp 0x565c0 jmp 0x565c2 movq -0x38(%rbp), %rax movq 0x600(%rax), %rdi movq -0x70(%rbp), %rsi movl -0x74(%rbp), %edx xorl %ecx, %ecx xorl %eax, %eax movl %eax, %r9d movq %r9, %r8 movl $0x1, (%rsp) movl $0x0, 0x8(%rsp) callq 0x3cf30 movl -0x78(%rbp), %eax movl %eax, -0x68(%rbp) movq -0x20(%rbp), %rdi addq $0x2e8, %rdi # imm = 0x2E8 movq -0x20(%rbp), %rax movl 0x2f0(%rax), %edx subl $0x1, %edx leaq -0x70(%rbp), %rsi callq 0xdaa60 jmp 0x5661b cmpb $0x0, -0x2d(%rbp) jne 0x56652 cmpb $0x0, -0x41(%rbp) jne 0x56652 movq -0x50(%rbp), %rdi movq -0x38(%rbp), %rax movl 0x7bc(%rax), %esi movq -0x38(%rbp), %rax movl 0x3f0(%rax), %edx addl $0x1, %edx callq 0x54f20 cmpb $0x0, %al jne 0x56652 movl $0x0, -0x3c(%rbp) jmp 0x56654 movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rsi movb -0x2d(%rbp), %al movl -0x3c(%rbp), %ecx movsbl %al, %edx callq 0x64ad0 movb %al, -0x18(%rbp) movb -0x18(%rbp), %al movb %al, -0x101(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x56697 movb -0x101(%rbp), %al addq $0x120, %rsp # imm = 0x120 popq %rbp retq callq 0x2a250 nopl (%rax)
delete_head_or_tail: push rbp mov rbp, rsp sub rsp, 120h mov al, r8b mov r8, fs:28h mov [rbp+var_8], r8 mov [rbp+var_20], rdi mov [rbp+var_28], rsi mov [rbp+var_2C], edx mov [rbp+var_2D], cl mov [rbp+var_2E], al mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_38], rax jmp short $+2 loc_56339: mov rax, [rbp+var_38] mov rdi, [rax+600h] mov rsi, [rbp+var_20] add rsi, 470h mov rdx, [rbp+var_28] mov rax, [rbp+var_38] mov r9d, [rax+7D4h] lea rax, [rbp+var_70] xor ecx, ecx xor r8d, r8d mov dword ptr [rsp+120h+var_120], 4 mov [rsp+120h+var_118], rax call pagecache_read mov [rbp+var_50], rax mov [rbp+var_68], 6 cmp [rbp+var_50], 0 setnz al and al, 1 movzx eax, al mov [rbp+var_60], al mov rdi, [rbp+var_20] add rdi, 2E8h lea rsi, [rbp+var_70] call insert_dynamic cmp [rbp+var_50], 0 jnz short loc_563D5 mov rax, [rbp+var_20] mov [rbp+var_100], rax call _my_thread_var mov rdi, [rbp+var_100] mov esi, [rax] call _ma_set_fatal_error mov [rbp+var_18], 1 jmp loc_5666D loc_563D5: jmp short $+2 loc_563D7: jmp short $+2 loc_563D9: cmp [rbp+var_2E], 0 jz short loc_563EF mov [rbp+var_74], 2 mov [rbp+var_78], 6 jmp short loc_563FD loc_563EF: mov [rbp+var_74], 7 mov [rbp+var_78], 5 loc_563FD: mov rdi, [rbp+var_38] mov rsi, [rbp+var_50] mov edx, [rbp+var_2C] lea rcx, [rbp+var_3C] call delete_dir_entry mov [rbp+var_40], eax cmp [rbp+var_40], 0 jge short loc_56425 jmp short $+2 loc_5641C: mov [rbp+var_18], 1 jmp loc_5666D loc_56425: cmp [rbp+var_40], 0 jnz loc_564FF mov [rbp+var_41], 0 mov rax, [rbp+var_38] cmp byte ptr [rax+7E7h], 0 jz loc_564FA jmp short $+2 loc_56446: lea rax, [rbp+var_10] add rax, 2 mov [rbp+var_B8], rax mov rax, [rbp+var_28] mov ecx, eax mov rax, [rbp+var_B8] mov [rax], ecx mov rax, [rbp+var_28] shr rax, 20h mov cl, al mov rax, [rbp+var_B8] mov [rax+4], cl mov eax, [rbp+var_2C] mov [rbp+var_9], al lea rax, [rbp+var_10] mov [rbp+var_90], rax mov [rbp+var_88], 8 movsx ecx, [rbp+var_2D] mov esi, 7 mov eax, 6 cmp ecx, 0 cmovnz esi, eax mov rax, [rbp+var_20] mov rdx, [rax+8] mov rcx, [rbp+var_20] lea r10, [rbp+var_B0] lea rax, [rbp+var_10] lea rdi, [rbp+var_58] mov r8d, 8 mov r9d, 3 xor r11d, r11d mov [rsp+120h+var_120], r10 mov [rsp+120h+var_118], rax mov [rsp+120h+var_110], 0 call translog_write_record cmp al, 0 jz short loc_564F8 jmp short $+2 loc_564EF: mov [rbp+var_18], 1 jmp loc_5666D loc_564F8: jmp short $+2 loc_564FA: jmp loc_565C2 loc_564FF: mov [rbp+var_41], 1 mov rax, [rbp+var_38] cmp byte ptr [rax+7E7h], 0 jz loc_565B5 jmp short $+2 loc_56516: lea rax, [rbp+var_17] add rax, 2 mov [rbp+var_F8], rax mov rax, [rbp+var_28] mov ecx, eax mov rax, [rbp+var_F8] mov [rax], ecx mov rax, [rbp+var_28] shr rax, 20h mov cl, al mov rax, [rbp+var_F8] mov [rax+4], cl lea rax, [rbp+var_17] mov [rbp+var_D0], rax mov [rbp+var_C8], 7 mov rax, [rbp+var_20] mov rdx, [rax+8] mov rcx, [rbp+var_20] lea r10, [rbp+var_F0] lea rax, [rbp+var_17] lea rdi, [rbp+var_58] mov esi, 9 mov r8d, 7 mov r9d, 3 xor r11d, r11d mov [rsp+120h+var_120], r10 mov [rsp+120h+var_118], rax mov [rsp+120h+var_110], 0 call translog_write_record cmp al, 0 jz short loc_565B3 jmp short $+2 loc_565AA: mov [rbp+var_18], 1 jmp loc_5666D loc_565B3: jmp short $+2 loc_565B5: mov rdi, [rbp+var_70] call pagecache_set_write_on_delete_by_link jmp short $+2 loc_565C0: jmp short $+2 loc_565C2: mov rax, [rbp+var_38] mov rdi, [rax+600h] mov rsi, [rbp+var_70] mov edx, [rbp+var_74] xor ecx, ecx xor eax, eax mov r9d, eax mov r8, r9 mov dword ptr [rsp+120h+var_120], 1 mov dword ptr [rsp+120h+var_118], 0 call pagecache_unlock_by_link mov eax, [rbp+var_78] mov [rbp+var_68], eax mov rdi, [rbp+var_20] add rdi, 2E8h mov rax, [rbp+var_20] mov edx, [rax+2F0h] sub edx, 1 lea rsi, [rbp+var_70] call set_dynamic jmp short $+2 loc_5661B: cmp [rbp+var_2D], 0 jnz short loc_56652 cmp [rbp+var_41], 0 jnz short loc_56652 mov rdi, [rbp+var_50] mov rax, [rbp+var_38] mov esi, [rax+7BCh] mov rax, [rbp+var_38] mov edx, [rax+3F0h] add edx, 1 call enough_free_entries cmp al, 0 jnz short loc_56652 mov [rbp+var_3C], 0 loc_56652: jmp short $+2 loc_56654: mov rdi, [rbp+var_20] mov rsi, [rbp+var_28] mov al, [rbp+var_2D] mov ecx, [rbp+var_3C] movsx edx, al call _ma_bitmap_set mov [rbp+var_18], al loc_5666D: mov al, [rbp+var_18] mov [rbp+var_101], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_56697 mov al, [rbp+var_101] add rsp, 120h pop rbp retn loc_56697: call ___stack_chk_fail
char delete_head_or_tail(long long *a1, long long a2, unsigned int a3, char a4, char a5) { int *v5; // rax long long v6; // rdx long long v7; // rcx long long v8; // r8 int v9; // r9d unsigned int v10; // esi long long *v12; // [rsp+20h] [rbp-100h] _QWORD v13[8]; // [rsp+30h] [rbp-F0h] BYREF _QWORD v14[7]; // [rsp+70h] [rbp-B0h] BYREF int v15; // [rsp+A8h] [rbp-78h] int v16; // [rsp+ACh] [rbp-74h] long long v17; // [rsp+B0h] [rbp-70h] BYREF int v18; // [rsp+B8h] [rbp-68h] bool v19; // [rsp+C0h] [rbp-60h] _BYTE v20[8]; // [rsp+C8h] [rbp-58h] BYREF long long v21; // [rsp+D0h] [rbp-50h] char v22; // [rsp+DFh] [rbp-41h] int v23; // [rsp+E0h] [rbp-40h] unsigned int v24; // [rsp+E4h] [rbp-3Ch] BYREF long long v25; // [rsp+E8h] [rbp-38h] char v26; // [rsp+F2h] [rbp-2Eh] char v27; // [rsp+F3h] [rbp-2Dh] unsigned int v28; // [rsp+F4h] [rbp-2Ch] long long v29; // [rsp+F8h] [rbp-28h] long long *v30; // [rsp+100h] [rbp-20h] __int16 v32; // [rsp+109h] [rbp-17h] BYREF int v33; // [rsp+10Bh] [rbp-15h] char v34; // [rsp+10Fh] [rbp-11h] __int16 v35; // [rsp+110h] [rbp-10h] BYREF int v36; // [rsp+112h] [rbp-Eh] BYREF char v37; // [rsp+116h] [rbp-Ah] char v38; // [rsp+117h] [rbp-9h] unsigned long long v39; // [rsp+118h] [rbp-8h] v39 = __readfsqword(0x28u); v30 = a1; v29 = a2; v28 = a3; v27 = a4; v26 = a5; v25 = *a1; v21 = pagecache_read( *(_QWORD **)(v25 + 1536), (long long)(a1 + 142), a2, 0, 0LL, *(_DWORD *)(v25 + 2004), 4u, (char *)&v17); v18 = 6; v19 = v21 != 0; insert_dynamic(v30 + 93, &v17); if ( v21 ) { if ( v26 ) { v16 = 2; v15 = 6; } else { v16 = 7; v15 = 5; } v23 = delete_dir_entry(v25, v21, v28, &v24); if ( v23 >= 0 ) { if ( v23 ) { v22 = 1; if ( *(_BYTE *)(v25 + 2023) ) { v33 = v29; v34 = BYTE4(v29); v13[4] = &v32; v13[5] = 7LL; if ( translog_write_record((long long)v20, 9u, v30[1], v30, 7, 3u, v13, &v32, 0LL) ) return 1; } pagecache_set_write_on_delete_by_link(v17); } else { v22 = 0; if ( *(_BYTE *)(v25 + 2023) ) { v13[7] = &v36; v36 = v29; v37 = BYTE4(v29); v38 = v28; v14[4] = &v35; v14[5] = 8LL; v10 = 7; if ( v27 ) v10 = 6; if ( translog_write_record((long long)v20, v10, v30[1], v30, 8, 3u, v14, &v35, 0LL) ) return 1; } } pagecache_unlock_by_link(*(_QWORD **)(v25 + 1536), v17, v16, 0, 0LL, 0LL, 1, 0); v18 = v15; set_dynamic(v30 + 93, &v17, (unsigned int)(*((_DWORD *)v30 + 188) - 1)); if ( !v27 && !v22 && !enough_free_entries(v21, *(_DWORD *)(v25 + 1980), *(_DWORD *)(v25 + 1008) + 1) ) v24 = 0; return ma_bitmap_set(v30, v29, (unsigned int)v27, v24); } else { return 1; } } else { v12 = v30; v5 = (int *)my_thread_var(); ma_set_fatal_error(v12, *v5, v6, v7, v8, v9); return 1; } }
delete_head_or_tail: PUSH RBP MOV RBP,RSP SUB RSP,0x120 MOV AL,R8B MOV R8,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],R8 MOV qword ptr [RBP + -0x20],RDI MOV qword ptr [RBP + -0x28],RSI MOV dword ptr [RBP + -0x2c],EDX MOV byte ptr [RBP + -0x2d],CL MOV byte ptr [RBP + -0x2e],AL MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX JMP 0x00156339 LAB_00156339: MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX + 0x600] MOV RSI,qword ptr [RBP + -0x20] ADD RSI,0x470 MOV RDX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x38] MOV R9D,dword ptr [RAX + 0x7d4] LEA RAX,[RBP + -0x70] XOR ECX,ECX XOR R8D,R8D MOV dword ptr [RSP],0x4 MOV qword ptr [RSP + 0x8],RAX CALL 0x0013d190 MOV qword ptr [RBP + -0x50],RAX MOV dword ptr [RBP + -0x68],0x6 CMP qword ptr [RBP + -0x50],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x60],AL MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x2e8 LEA RSI,[RBP + -0x70] CALL 0x001da810 CMP qword ptr [RBP + -0x50],0x0 JNZ 0x001563d5 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x100],RAX CALL 0x001f6210 MOV RDI,qword ptr [RBP + -0x100] MOV ESI,dword ptr [RAX] CALL 0x00143f20 MOV byte ptr [RBP + -0x18],0x1 JMP 0x0015666d LAB_001563d5: JMP 0x001563d7 LAB_001563d7: JMP 0x001563d9 LAB_001563d9: CMP byte ptr [RBP + -0x2e],0x0 JZ 0x001563ef MOV dword ptr [RBP + -0x74],0x2 MOV dword ptr [RBP + -0x78],0x6 JMP 0x001563fd LAB_001563ef: MOV dword ptr [RBP + -0x74],0x7 MOV dword ptr [RBP + -0x78],0x5 LAB_001563fd: MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x50] MOV EDX,dword ptr [RBP + -0x2c] LEA RCX,[RBP + -0x3c] CALL 0x0015b150 MOV dword ptr [RBP + -0x40],EAX CMP dword ptr [RBP + -0x40],0x0 JGE 0x00156425 JMP 0x0015641c LAB_0015641c: MOV byte ptr [RBP + -0x18],0x1 JMP 0x0015666d LAB_00156425: CMP dword ptr [RBP + -0x40],0x0 JNZ 0x001564ff MOV byte ptr [RBP + -0x41],0x0 MOV RAX,qword ptr [RBP + -0x38] CMP byte ptr [RAX + 0x7e7],0x0 JZ 0x001564fa JMP 0x00156446 LAB_00156446: LEA RAX,[RBP + -0x10] ADD RAX,0x2 MOV qword ptr [RBP + -0xb8],RAX MOV RAX,qword ptr [RBP + -0x28] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0xb8] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x28] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0xb8] MOV byte ptr [RAX + 0x4],CL MOV EAX,dword ptr [RBP + -0x2c] MOV byte ptr [RBP + -0x9],AL LEA RAX,[RBP + -0x10] MOV qword ptr [RBP + -0x90],RAX MOV qword ptr [RBP + -0x88],0x8 MOVSX ECX,byte ptr [RBP + -0x2d] MOV ESI,0x7 MOV EAX,0x6 CMP ECX,0x0 CMOVNZ ESI,EAX MOV RAX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x20] LEA R10,[RBP + -0xb0] LEA RAX,[RBP + -0x10] LEA RDI,[RBP + -0x58] MOV R8D,0x8 MOV R9D,0x3 XOR R11D,R11D MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 CALL 0x00131fe0 CMP AL,0x0 JZ 0x001564f8 JMP 0x001564ef LAB_001564ef: MOV byte ptr [RBP + -0x18],0x1 JMP 0x0015666d LAB_001564f8: JMP 0x001564fa LAB_001564fa: JMP 0x001565c2 LAB_001564ff: MOV byte ptr [RBP + -0x41],0x1 MOV RAX,qword ptr [RBP + -0x38] CMP byte ptr [RAX + 0x7e7],0x0 JZ 0x001565b5 JMP 0x00156516 LAB_00156516: LEA RAX,[RBP + -0x17] ADD RAX,0x2 MOV qword ptr [RBP + -0xf8],RAX MOV RAX,qword ptr [RBP + -0x28] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0xf8] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x28] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0xf8] MOV byte ptr [RAX + 0x4],CL LEA RAX,[RBP + -0x17] MOV qword ptr [RBP + -0xd0],RAX MOV qword ptr [RBP + -0xc8],0x7 MOV RAX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x20] LEA R10,[RBP + -0xf0] LEA RAX,[RBP + -0x17] LEA RDI,[RBP + -0x58] MOV ESI,0x9 MOV R8D,0x7 MOV R9D,0x3 XOR R11D,R11D MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 CALL 0x00131fe0 CMP AL,0x0 JZ 0x001565b3 JMP 0x001565aa LAB_001565aa: MOV byte ptr [RBP + -0x18],0x1 JMP 0x0015666d LAB_001565b3: JMP 0x001565b5 LAB_001565b5: MOV RDI,qword ptr [RBP + -0x70] CALL 0x0013e140 JMP 0x001565c0 LAB_001565c0: JMP 0x001565c2 LAB_001565c2: MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX + 0x600] MOV RSI,qword ptr [RBP + -0x70] MOV EDX,dword ptr [RBP + -0x74] XOR ECX,ECX XOR EAX,EAX MOV R9D,EAX MOV R8,R9 MOV dword ptr [RSP],0x1 MOV dword ptr [RSP + 0x8],0x0 CALL 0x0013cf30 MOV EAX,dword ptr [RBP + -0x78] MOV dword ptr [RBP + -0x68],EAX MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x2e8 MOV RAX,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RAX + 0x2f0] SUB EDX,0x1 LEA RSI,[RBP + -0x70] CALL 0x001daa60 JMP 0x0015661b LAB_0015661b: CMP byte ptr [RBP + -0x2d],0x0 JNZ 0x00156652 CMP byte ptr [RBP + -0x41],0x0 JNZ 0x00156652 MOV RDI,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x38] MOV ESI,dword ptr [RAX + 0x7bc] MOV RAX,qword ptr [RBP + -0x38] MOV EDX,dword ptr [RAX + 0x3f0] ADD EDX,0x1 CALL 0x00154f20 CMP AL,0x0 JNZ 0x00156652 MOV dword ptr [RBP + -0x3c],0x0 LAB_00156652: JMP 0x00156654 LAB_00156654: MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x28] MOV AL,byte ptr [RBP + -0x2d] MOV ECX,dword ptr [RBP + -0x3c] MOVSX EDX,AL CALL 0x00164ad0 MOV byte ptr [RBP + -0x18],AL LAB_0015666d: MOV AL,byte ptr [RBP + -0x18] MOV byte ptr [RBP + -0x101],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00156697 MOV AL,byte ptr [RBP + -0x101] ADD RSP,0x120 POP RBP RET LAB_00156697: CALL 0x0012a250
int8 delete_head_or_tail(long *param_1,int8 param_2,int4 param_3,char param_4,char param_5) { int1 uVar1; long *plVar2; char cVar3; int4 *puVar4; int8 uVar5; long in_FS_OFFSET; int8 in_stack_fffffffffffffed8; int1 *puVar6; int4 uVar7; int8 *puVar8; int1 local_f8 [32]; int1 *local_d8; int8 local_d0; int4 *local_c0; int1 local_b8 [32]; int1 *local_98; int8 local_90; int4 local_80; int4 local_7c; int8 local_78; int4 local_70; int1 local_68; int1 local_60 [8]; long local_58; char local_49; int local_48; int4 local_44; long local_40; char local_36; char local_35; int4 local_34; int8 local_30; long *local_28; int1 local_20; int1 local_1f [9]; int4 local_16; int1 local_12; int1 local_11; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_40 = *param_1; puVar8 = &local_78; uVar5 = CONCAT44((int)((ulong)in_stack_fffffffffffffed8 >> 0x20),4); local_36 = param_5; local_35 = param_4; local_34 = param_3; local_30 = param_2; local_28 = param_1; local_58 = pagecache_read(*(int8 *)(local_40 + 0x600),param_1 + 0x8e,param_2,0,0, *(int4 *)(local_40 + 0x7d4),uVar5,puVar8); uVar7 = (int4)((ulong)uVar5 >> 0x20); local_70 = 6; local_68 = local_58 != 0; insert_dynamic(local_28 + 0x5d,&local_78); plVar2 = local_28; if (local_58 == 0) { puVar4 = (int4 *)_my_thread_var(); _ma_set_fatal_error(plVar2,*puVar4); local_20 = 1; } else { if (local_36 == '\0') { local_7c = 7; local_80 = 5; } else { local_7c = 2; local_80 = 6; } local_48 = delete_dir_entry(local_40,local_58,local_34,&local_44); if (local_48 < 0) { local_20 = 1; } else { uVar1 = (int1)((ulong)local_30 >> 0x20); if (local_48 == 0) { local_49 = '\0'; if (*(char *)(local_40 + 0x7e7) != '\0') { local_c0 = &local_16; local_11 = (int1)local_34; local_98 = local_1f + 7; local_90 = 8; uVar5 = 7; if (local_35 != '\0') { uVar5 = 6; } puVar6 = local_b8; puVar8 = (int8 *)(local_1f + 7); local_16 = (int)local_30; local_12 = uVar1; cVar3 = translog_write_record(local_60,uVar5,local_28[1],local_28,8,3,puVar6,puVar8,0); uVar7 = (int4)((ulong)puVar6 >> 0x20); if (cVar3 != '\0') { local_20 = 1; goto LAB_0015666d; } } } else { local_49 = '\x01'; if (*(char *)(local_40 + 0x7e7) != '\0') { local_d8 = local_1f; local_d0 = 7; puVar6 = local_f8; puVar8 = (int8 *)local_1f; local_1f._2_4_ = (int)local_30; local_1f[6] = uVar1; cVar3 = translog_write_record(local_60,9,local_28[1],local_28,7,3,puVar6,puVar8,0); uVar7 = (int4)((ulong)puVar6 >> 0x20); if (cVar3 != '\0') { local_20 = 1; goto LAB_0015666d; } } pagecache_set_write_on_delete_by_link(local_78); } pagecache_unlock_by_link (*(int8 *)(local_40 + 0x600),local_78,local_7c,0,0,0,CONCAT44(uVar7,1), (ulong)puVar8 & 0xffffffff00000000); local_70 = local_80; set_dynamic(local_28 + 0x5d,&local_78,(int)local_28[0x5e] + -1); if (((local_35 == '\0') && (local_49 == '\0')) && (cVar3 = enough_free_entries(local_58,*(int4 *)(local_40 + 0x7bc), *(int *)(local_40 + 0x3f0) + 1), cVar3 == '\0')) { local_44 = 0; } local_20 = _ma_bitmap_set(local_28,local_30,(int)local_35,local_44); } } LAB_0015666d: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_20); }
4,682
ggml_vec_dot_iq1_m_q8_K
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-quants.c
void ggml_vec_dot_iq1_m_q8_K (int n, float * GGML_RESTRICT s, size_t bs, const void * GGML_RESTRICT vx, size_t bx, const void * GGML_RESTRICT vy, size_t by, int nrc) { assert(n % QK_K == 0); assert(nrc == 1); UNUSED(nrc); UNUSED(bx); UNUSED(by); UNUSED(bs); const block_iq1_m * GGML_RESTRICT x = vx; const block_q8_K * GGML_RESTRICT y = vy; const int nb = n / QK_K; iq1m_scale_t scale; #if defined __ARM_NEON const int32x4_t mask = vdupq_n_s32(0x7); const int32x4_t mone = vdupq_n_s32(1); const int32x4_t mzero = vdupq_n_s32(0); ggml_int8x16x4_t deltas; deltas.val[0] = vcombine_s8(vdup_n_s8(+1), vdup_n_s8(+1)); deltas.val[1] = vcombine_s8(vdup_n_s8(-1), vdup_n_s8(+1)); deltas.val[2] = vcombine_s8(vdup_n_s8(+1), vdup_n_s8(-1)); deltas.val[3] = vcombine_s8(vdup_n_s8(-1), vdup_n_s8(-1)); ggml_int8x16x4_t q1b; ggml_int8x16x4_t q8b; uint32_t aux32; const uint8_t * aux8 = (const uint8_t *)&aux32; float sumf = 0; for (int i = 0; i < nb; ++i) { const int8_t * q8 = y[i].qs; const uint8_t * qs = x[i].qs; const uint8_t * qh = x[i].qh; const uint16_t * sc = (const uint16_t *)x[i].scales; scale.u16 = (sc[0] >> 12) | ((sc[1] >> 8) & 0x00f0) | ((sc[2] >> 4) & 0x0f00) | (sc[3] & 0xf000); int32x4_t sumi1 = mzero; int32x4_t sumi2 = mzero; for (int ib = 0; ib < QK_K/32; ib += 2) { q1b.val[0] = vcombine_s8(vld1_s8((const int8_t *)(iq1s_grid + (qs[0] | ((qh[0] << 8) & 0x700)))), vld1_s8((const int8_t *)(iq1s_grid + (qs[1] | ((qh[0] << 4) & 0x700))))); q1b.val[1] = vcombine_s8(vld1_s8((const int8_t *)(iq1s_grid + (qs[2] | ((qh[1] << 8) & 0x700)))), vld1_s8((const int8_t *)(iq1s_grid + (qs[3] | ((qh[1] << 4) & 0x700))))); q1b.val[2] = vcombine_s8(vld1_s8((const int8_t *)(iq1s_grid + (qs[4] | ((qh[2] << 8) & 0x700)))), vld1_s8((const int8_t *)(iq1s_grid + (qs[5] | ((qh[2] << 4) & 0x700))))); q1b.val[3] = vcombine_s8(vld1_s8((const int8_t *)(iq1s_grid + (qs[6] | ((qh[3] << 8) & 0x700)))), vld1_s8((const int8_t *)(iq1s_grid + (qs[7] | ((qh[3] << 4) & 0x700))))); q8b = ggml_vld1q_s8_x4(q8); q8 += 64; const int32x4_t p1 = vpaddq_s32(ggml_vdotq_s32(mzero, q1b.val[0], q8b.val[0]), ggml_vdotq_s32(mzero, q1b.val[1], q8b.val[1])); const int32x4_t p2 = vpaddq_s32(ggml_vdotq_s32(mzero, q1b.val[2], q8b.val[2]), ggml_vdotq_s32(mzero, q1b.val[3], q8b.val[3])); const int32x4_t p12 = vpaddq_s32(p1, p2); const uint32_t * qh32 = (const uint32_t *)qh; // we are 4-byte aligned, so we can do that aux32 = ((qh32[0] >> 3) & 0x01010101) | ((qh32[0] >> 6) & 0x02020202); const int32x4_t p3 = vpaddq_s32(ggml_vdotq_s32(mzero, deltas.val[aux8[0]], q8b.val[0]), ggml_vdotq_s32(mzero, deltas.val[aux8[1]], q8b.val[1])); const int32x4_t p4 = vpaddq_s32(ggml_vdotq_s32(mzero, deltas.val[aux8[2]], q8b.val[2]), ggml_vdotq_s32(mzero, deltas.val[aux8[3]], q8b.val[3])); const int32x4_t p34 = vpaddq_s32(p3, p4); int32x4_t scales_4 = ggml_vld1q_u32(sc[ib/2] >> 0, sc[ib/2] >> 3, sc[ib/2] >> 6, sc[ib/2] >> 9); scales_4 = vaddq_s32(vshlq_n_s32(vandq_s32(scales_4, mask), 1), mone); sumi1 = vmlaq_s32(sumi1, scales_4, p12); sumi2 = vmlaq_s32(sumi2, scales_4, p34); qs += 8; qh += 4; } sumf += y[i].d * GGML_FP16_TO_FP32(scale.f16) * (vaddvq_s32(sumi1) + IQ1M_DELTA * vaddvq_s32(sumi2)); } *s = sumf; #elif defined __AVX2__ const __m256i mask = _mm256_set1_epi16(0x7); const __m256i mone = _mm256_set1_epi16(1); const __m256i mone8 = _mm256_set1_epi8(1); const __m256i mtwo8 = _mm256_set1_epi8(2); // VPSHUFB cannot cross 128-bit lanes so odd shifts go to upper half. const __m256i scales_shift = _mm256_set_epi64x(9, 3, 6, 0); __m256 accum1 = _mm256_setzero_ps(); __m256 accum2 = _mm256_setzero_ps(); for (int i = 0; i < nb; ++i) { const int8_t * q8 = y[i].qs; const uint8_t * qs = x[i].qs; const uint8_t * qh = x[i].qh; const uint16_t * sc = (const uint16_t *)x[i].scales; scale.u16 = (sc[0] >> 12) | ((sc[1] >> 8) & 0x00f0) | ((sc[2] >> 4) & 0x0f00) | (sc[3] & 0xf000); // Extract 3-bit scales (16 values) __m256i scales = _mm256_set1_epi64x(*(const uint64_t*)sc); scales = _mm256_srlv_epi64(scales, scales_shift); scales = _mm256_add_epi16(_mm256_slli_epi16(_mm256_and_si256(scales, mask), 1), mone); // Indices to repeat each scale 8 times. __m256i scales_idx1 = _mm256_set1_epi16(0x0100); __m256i scales_idx2 = _mm256_add_epi8(scales_idx1, _mm256_set1_epi8(8)); __m256i sumi1 = _mm256_setzero_si256(); __m256i sumi2 = _mm256_setzero_si256(); for (int ib = 0; ib < QK_K/32; ib += 2) { #ifdef __BMI2__ const uint64_t packed_idx1 = _pdep_u64(*(const uint32_t *)qs, 0x00ff00ff00ff00ffULL) | _pdep_u64(*(const uint16_t*)(qh) & 0x7777, 0xf000f000f000f00ULL); const uint64_t packed_idx2 = _pdep_u64(*(const uint32_t *)(qs + 4), 0x00ff00ff00ff00ffULL) | _pdep_u64(*(const uint16_t*)(qh + 2) & 0x7777, 0xf000f000f000f00ULL); const uint16_t *idx1 = (const uint16_t *)(&packed_idx1); const uint16_t *idx2 = (const uint16_t *)(&packed_idx2); const __m256i q1b_1 = _mm256_set_epi64x(iq1s_grid[idx1[3]], iq1s_grid[idx1[2]], iq1s_grid[idx1[1]], iq1s_grid[idx1[0]]); const __m256i q1b_2 = _mm256_set_epi64x(iq1s_grid[idx2[3]], iq1s_grid[idx2[2]], iq1s_grid[idx2[1]], iq1s_grid[idx2[0]]); // Convert signs to bytes 0x81 (negative) or 0x01 (positive) const uint64_t delta_sign = _pdep_u64(*(const uint32_t*)(qh) & 0x88888888, 0xf0f0f0f0f0f0f0f0ULL); const __m256i delta1 = _mm256_or_si256(mone8, _mm256_cvtepi8_epi64(_mm_set1_epi32(delta_sign))); const __m256i delta2 = _mm256_or_si256(mone8, _mm256_cvtepi8_epi64(_mm_set1_epi32(delta_sign >> 32))); #else const __m256i q1b_1 = _mm256_set_epi64x( iq1s_grid[qs[3] | (((uint16_t)qh[1] << 4) & 0x700)], iq1s_grid[qs[2] | (((uint16_t)qh[1] << 8) & 0x700)], iq1s_grid[qs[1] | (((uint16_t)qh[0] << 4) & 0x700)], iq1s_grid[qs[0] | (((uint16_t)qh[0] << 8) & 0x700)] ); const __m256i q1b_2 = _mm256_set_epi64x( iq1s_grid[qs[7] | (((uint16_t)qh[3] << 4) & 0x700)], iq1s_grid[qs[6] | (((uint16_t)qh[3] << 8) & 0x700)], iq1s_grid[qs[5] | (((uint16_t)qh[2] << 4) & 0x700)], iq1s_grid[qs[4] | (((uint16_t)qh[2] << 8) & 0x700)] ); const __m256i delta1 = _mm256_set_epi64x(qh[1] & 0x80 ? 0xffffffffffffffff : 0x0101010101010101, qh[1] & 0x08 ? 0xffffffffffffffff : 0x0101010101010101, qh[0] & 0x80 ? 0xffffffffffffffff : 0x0101010101010101, qh[0] & 0x08 ? 0xffffffffffffffff : 0x0101010101010101); const __m256i delta2 = _mm256_set_epi64x(qh[3] & 0x80 ? 0xffffffffffffffff : 0x0101010101010101, qh[3] & 0x08 ? 0xffffffffffffffff : 0x0101010101010101, qh[2] & 0x80 ? 0xffffffffffffffff : 0x0101010101010101, qh[2] & 0x08 ? 0xffffffffffffffff : 0x0101010101010101); #endif const __m256i q8b_1 = _mm256_loadu_si256((const __m256i*)q8); q8 += 32; const __m256i q8b_2 = _mm256_loadu_si256((const __m256i*)q8); q8 += 32; const __m256i dot1 = mul_add_epi8(q1b_1, q8b_1); const __m256i dot2 = mul_add_epi8(q1b_2, q8b_2); const __m256i dot3 = _mm256_maddubs_epi16(mone8, _mm256_sign_epi8(q8b_1, delta1)); const __m256i dot4 = _mm256_maddubs_epi16(mone8, _mm256_sign_epi8(q8b_2, delta2)); __m256i scale1 = _mm256_shuffle_epi8(scales, scales_idx1); __m256i scale2 = _mm256_shuffle_epi8(scales, scales_idx2); scales_idx1 = _mm256_add_epi8(scales_idx1, mtwo8); scales_idx2 = _mm256_add_epi8(scales_idx2, mtwo8); const __m256i p1 = _mm256_madd_epi16(dot1, scale1); const __m256i p2 = _mm256_madd_epi16(dot2, scale2); const __m256i p3 = _mm256_madd_epi16(dot3, scale1); const __m256i p4 = _mm256_madd_epi16(dot4, scale2); sumi1 = _mm256_add_epi32(sumi1, _mm256_add_epi32(p1, p2)); sumi2 = _mm256_add_epi32(sumi2, _mm256_add_epi32(p3, p4)); qs += 8; qh += 4; } const __m256 d = _mm256_set1_ps(y[i].d * GGML_FP16_TO_FP32(scale.f16)); accum1 = _mm256_fmadd_ps(d, _mm256_cvtepi32_ps(sumi1), accum1); accum2 = _mm256_fmadd_ps(d, _mm256_cvtepi32_ps(sumi2), accum2); } *s = hsum_float_8(accum1) + IQ1M_DELTA * hsum_float_8(accum2); #elif defined __AVX__ const __m128i mask = _mm_set1_epi16(0x7); const __m128i mone = _mm_set1_epi16(1); __m256 accum1 = _mm256_setzero_ps(); __m256 accum2 = _mm256_setzero_ps(); for (int i = 0; i < nb; ++i) { const int8_t * q8 = y[i].qs; const uint8_t * qs = x[i].qs; const uint8_t * qh = x[i].qh; const uint16_t * sc = (const uint16_t *)x[i].scales; scale.u16 = (sc[0] >> 12) | ((sc[1] >> 8) & 0x00f0) | ((sc[2] >> 4) & 0x0f00) | (sc[3] & 0xf000); __m128i sumi1_0 = _mm_setzero_si128(); __m128i sumi1_1 = _mm_setzero_si128(); __m128i sumi2_0 = _mm_setzero_si128(); __m128i sumi2_1 = _mm_setzero_si128(); for (int ib = 0; ib < QK_K/32; ib += 2) { const __m128i q1b_1_0 = _mm_set_epi64x( iq1s_grid[qs[1] | (((uint16_t)qh[0] << 4) & 0x700)], iq1s_grid[qs[0] | (((uint16_t)qh[0] << 8) & 0x700)]); const __m128i q1b_1_1 = _mm_set_epi64x( iq1s_grid[qs[3] | (((uint16_t)qh[1] << 4) & 0x700)], iq1s_grid[qs[2] | (((uint16_t)qh[1] << 8) & 0x700)]); const __m128i q1b_2_0 = _mm_set_epi64x( iq1s_grid[qs[5] | (((uint16_t)qh[2] << 4) & 0x700)], iq1s_grid[qs[4] | (((uint16_t)qh[2] << 8) & 0x700)]); const __m128i q1b_2_1 = _mm_set_epi64x( iq1s_grid[qs[7] | (((uint16_t)qh[3] << 4) & 0x700)], iq1s_grid[qs[6] | (((uint16_t)qh[3] << 8) & 0x700)]); const __m128i q8b_1_0 = _mm_loadu_si128((const __m128i *)q8); q8 += 16; const __m128i q8b_1_1 = _mm_loadu_si128((const __m128i *)q8); q8 += 16; const __m128i q8b_2_0 = _mm_loadu_si128((const __m128i *)q8); q8 += 16; const __m128i q8b_2_1 = _mm_loadu_si128((const __m128i *)q8); q8 += 16; const __m128i dot1_0 = mul_add_epi8_sse(q1b_1_0, q8b_1_0); const __m128i dot1_1 = mul_add_epi8_sse(q1b_1_1, q8b_1_1); const __m128i dot2_0 = mul_add_epi8_sse(q1b_2_0, q8b_2_0); const __m128i dot2_1 = mul_add_epi8_sse(q1b_2_1, q8b_2_1); const __m128i delta1_0 = _mm_set_epi64x(qh[0] & 0x80 ? 0xffffffffffffffff : 0x0101010101010101, qh[0] & 0x08 ? 0xffffffffffffffff : 0x0101010101010101); const __m128i delta1_1 = _mm_set_epi64x(qh[1] & 0x80 ? 0xffffffffffffffff : 0x0101010101010101, qh[1] & 0x08 ? 0xffffffffffffffff : 0x0101010101010101); const __m128i delta2_0 = _mm_set_epi64x(qh[2] & 0x80 ? 0xffffffffffffffff : 0x0101010101010101, qh[2] & 0x08 ? 0xffffffffffffffff : 0x0101010101010101); const __m128i delta2_1 = _mm_set_epi64x(qh[3] & 0x80 ? 0xffffffffffffffff : 0x0101010101010101, qh[3] & 0x08 ? 0xffffffffffffffff : 0x0101010101010101); const __m128i dot3_0 = mul_add_epi8_sse(delta1_0, q8b_1_0); const __m128i dot3_1 = mul_add_epi8_sse(delta1_1, q8b_1_1); const __m128i dot4_0 = mul_add_epi8_sse(delta2_0, q8b_2_0); const __m128i dot4_1 = mul_add_epi8_sse(delta2_1, q8b_2_1); __m128i scale1_0 = _mm_set1_epi16(sc[ib/2] >> 0); __m128i scale1_1 = _mm_set1_epi16(sc[ib/2] >> 3); __m128i scale2_0 = _mm_set1_epi16(sc[ib/2] >> 6); __m128i scale2_1 = _mm_set1_epi16(sc[ib/2] >> 9); scale1_0 = _mm_add_epi16(_mm_slli_epi16(_mm_and_si128(scale1_0, mask), 1), mone); scale1_1 = _mm_add_epi16(_mm_slli_epi16(_mm_and_si128(scale1_1, mask), 1), mone); scale2_0 = _mm_add_epi16(_mm_slli_epi16(_mm_and_si128(scale2_0, mask), 1), mone); scale2_1 = _mm_add_epi16(_mm_slli_epi16(_mm_and_si128(scale2_1, mask), 1), mone); const __m128i p1_0 = _mm_madd_epi16(dot1_0, scale1_0); const __m128i p1_1 = _mm_madd_epi16(dot1_1, scale1_1); const __m128i p2_0 = _mm_madd_epi16(dot2_0, scale2_0); const __m128i p2_1 = _mm_madd_epi16(dot2_1, scale2_1); const __m128i p3_0 = _mm_madd_epi16(dot3_0, scale1_0); const __m128i p3_1 = _mm_madd_epi16(dot3_1, scale1_1); const __m128i p4_0 = _mm_madd_epi16(dot4_0, scale2_0); const __m128i p4_1 = _mm_madd_epi16(dot4_1, scale2_1); sumi1_0 = _mm_add_epi32(sumi1_0, _mm_add_epi32(p1_0, p2_0)); sumi1_1 = _mm_add_epi32(sumi1_1, _mm_add_epi32(p1_1, p2_1)); sumi2_0 = _mm_add_epi32(sumi2_0, _mm_add_epi32(p3_0, p4_0)); sumi2_1 = _mm_add_epi32(sumi2_1, _mm_add_epi32(p3_1, p4_1)); qs += 8; qh += 4; } const __m256 d = _mm256_set1_ps(y[i].d * GGML_FP16_TO_FP32(scale.f16)); accum1 = _mm256_add_ps(_mm256_mul_ps(d, _mm256_cvtepi32_ps(MM256_SET_M128I(sumi1_1, sumi1_0))), accum1); accum2 = _mm256_add_ps(_mm256_mul_ps(d, _mm256_cvtepi32_ps(MM256_SET_M128I(sumi2_1, sumi2_0))), accum2); } *s = hsum_float_8(accum1) + IQ1M_DELTA * hsum_float_8(accum2); #else int sum1[2], sum2[2], delta[4]; float sumf = 0; for (int i = 0; i < nb; i++) { const int8_t * q8 = y[i].qs; const uint8_t * qs = x[i].qs; const uint8_t * qh = x[i].qh; const uint16_t * sc = (const uint16_t *)x[i].scales; scale.u16 = (sc[0] >> 12) | ((sc[1] >> 8) & 0x00f0) | ((sc[2] >> 4) & 0x0f00) | (sc[3] & 0xf000); int sumi1 = 0, sumi2 = 0; for (int ib = 0; ib < QK_K/32; ++ib) { delta[0] = qh[0] & 0x08 ? -1 : 1; delta[1] = qh[0] & 0x80 ? -1 : 1; delta[2] = qh[1] & 0x08 ? -1 : 1; delta[3] = qh[1] & 0x80 ? -1 : 1; sum1[0] = sum1[1] = sum2[0] = sum2[1] = 0; for (int l = 0; l < 4; ++l) { const int8_t * grid = (const int8_t *)(iq1s_grid + (qs[l] | (((uint16_t)qh[l/2] << (8 - 4*(l%2))) & 0x700))); int lsum1 = 0, lsum2 = 0; for (int j = 0; j < 8; ++j) { lsum1 += q8[j] * grid[j]; lsum2 += q8[j]; } q8 += 8; sum1[l/2] += lsum1; sum2[l/2] += lsum2*delta[l]; } const int ls1 = 2*((sc[ib/2] >> (6*(ib%2)+0)) & 0x7) + 1; const int ls2 = 2*((sc[ib/2] >> (6*(ib%2)+3)) & 0x7) + 1; sumi1 += sum1[0] * ls1 + sum1[1] * ls2; sumi2 += sum2[0] * ls1 + sum2[1] * ls2; qs += 4; qh += 2; } sumf += GGML_FP16_TO_FP32(scale.f16) * y[i].d * (sumi1 + IQ1M_DELTA * sumi2); } *s = sumf; #endif }
O1
c
ggml_vec_dot_iq1_m_q8_K: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %r9, -0x20(%rsp) movq %rcx, -0x30(%rsp) movq %rsi, -0x28(%rsp) vxorps %xmm9, %xmm9, %xmm9 vpxor %xmm10, %xmm10, %xmm10 movq %rdi, -0x38(%rsp) cmpl $0x100, %edi # imm = 0x100 jl 0x204b2 movq -0x38(%rsp), %rax shrl $0x8, %eax movq %rax, -0x38(%rsp) vxorps %xmm5, %xmm5, %xmm5 vpmovsxbq 0x2a3a4(%rip), %ymm21 # 0x4a57c vpbroadcastw 0x2a6d4(%rip), %ymm22 # 0x4a8b6 vpbroadcastw 0x2a6cc(%rip), %ymm23 # 0x4a8b8 xorl %eax, %eax vpbroadcastw 0x2a6c3(%rip), %ymm3 # 0x4a8ba vpbroadcastw 0x2a6bc(%rip), %ymm4 # 0x4a8bc movabsq $0xff00ff00ff00ff, %rdx # imm = 0xFF00FF00FF00FF movl $0x7777, %r8d # imm = 0x7777 movabsq $0xf000f000f000f00, %r10 # imm = 0xF000F000F000F00 leaq 0x2eeaf(%rip), %r11 # 0x4f0d0 movl $0xffff, %ebx # imm = 0xFFFF movl $0x88888888, %ebp # imm = 0x88888888 movabsq $-0xf0f0f0f0f0f0f10, %r14 # imm = 0xF0F0F0F0F0F0F0F0 vpbroadcastb 0x2a676(%rip), %ymm6 # 0x4a8b4 vpbroadcastb 0x2a66e(%rip), %ymm7 # 0x4a8b5 movq -0x30(%rsp), %r12 vxorps %xmm8, %xmm8, %xmm8 imulq $0x124, %rax, %rcx # imm = 0x124 movq -0x20(%rsp), %rsi leaq (%rsi,%rcx), %rdi movq %rdi, -0x8(%rsp) leaq (%rsi,%rcx), %rdi addq $0x4, %rdi imulq $0x38, %rax, %rcx movq -0x30(%rsp), %rsi movzwl 0x30(%rsi,%rcx), %r9d movq %r9, -0x10(%rsp) movzbl 0x33(%rsi,%rcx), %r9d andl $-0x10, %r9d movq %r9, -0x18(%rsp) movzwl 0x34(%rsi,%rcx), %r13d shrl $0x4, %r13d andl $0xf00, %r13d # imm = 0xF00 movzwl 0x36(%rsi,%rcx), %r9d andl $0xf000, %r9d # imm = 0xF000 vpbroadcastq 0x30(%rsi,%rcx), %ymm9 vpsrlvq %ymm21, %ymm9, %ymm9 vpaddw %ymm9, %ymm9, %ymm11 vpternlogq $0xec, %ymm23, %ymm22, %ymm11 xorl %r15d, %r15d vmovdqa %ymm4, %ymm12 vmovdqa %ymm3, %ymm13 vpxor %xmm10, %xmm10, %xmm10 vpxor %xmm9, %xmm9, %xmm9 movl (%r12,%r15,4), %ecx pdepq %rdx, %rcx, %rsi movzwl 0x20(%r12,%r15,2), %ecx andl %r8d, %ecx pdepq %r10, %rcx, %rcx orq %rsi, %rcx movq %rcx, %rsi shrq $0x30, %rsi vmovq (%r11,%rsi,8), %xmm14 movq %rcx, %rsi shrq $0x20, %rsi andl %ebx, %esi vmovq (%r11,%rsi,8), %xmm15 movl %ecx, %esi shrl $0xd, %esi vmovq (%rsi,%r11), %xmm16 movl 0x4(%r12,%r15,4), %esi pdepq %rdx, %rsi, %rsi andl %ebx, %ecx vmovq (%r11,%rcx,8), %xmm17 movzwl 0x22(%r12,%r15,2), %ecx andl %r8d, %ecx pdepq %r10, %rcx, %rcx orq %rsi, %rcx movq %rcx, %rsi shrq $0x30, %rsi vmovq (%r11,%rsi,8), %xmm18 movq %rcx, %rsi shrq $0x20, %rsi andl %ebx, %esi vmovq (%r11,%rsi,8), %xmm19 movl %ecx, %esi shrl $0xd, %esi vmovq (%rsi,%r11), %xmm20 vpunpcklqdq %xmm14, %xmm15, %xmm14 # xmm14 = xmm15[0],xmm14[0] vpunpcklqdq %xmm16, %xmm17, %xmm15 # xmm15 = xmm17[0],xmm16[0] vinserti128 $0x1, %xmm14, %ymm15, %ymm14 andl %ebx, %ecx vpunpcklqdq %xmm18, %xmm19, %xmm15 # xmm15 = xmm19[0],xmm18[0] vmovq (%r11,%rcx,8), %xmm16 vpunpcklqdq %xmm20, %xmm16, %xmm16 # xmm16 = xmm16[0],xmm20[0] vinserti32x4 $0x1, %xmm15, %ymm16, %ymm15 movl 0x20(%r12,%r15,2), %ecx andl %ebp, %ecx pdepq %r14, %rcx, %rcx vmovd %ecx, %xmm16 vpmovsxbq %xmm16, %ymm16 shrq $0x20, %rcx vmovd %ecx, %xmm17 vpmovsxbq %xmm17, %ymm17 vmovdqu (%rdi), %ymm0 vmovdqu 0x20(%rdi), %ymm1 vpsignb %ymm14, %ymm14, %ymm2 vpsignb %ymm14, %ymm0, %ymm14 vpmaddubsw %ymm14, %ymm2, %ymm2 vpsignb %ymm15, %ymm15, %ymm14 vpsignb %ymm15, %ymm1, %ymm15 vpmaddubsw %ymm15, %ymm14, %ymm14 vporq %ymm6, %ymm16, %ymm15 vpsignb %ymm15, %ymm0, %ymm0 vpmaddubsw %ymm0, %ymm6, %ymm0 vporq %ymm6, %ymm17, %ymm15 vpsignb %ymm15, %ymm1, %ymm1 vpmaddubsw %ymm1, %ymm6, %ymm1 vpshufb %ymm12, %ymm11, %ymm15 vpshufb %ymm13, %ymm11, %ymm16 vpaddb %ymm7, %ymm12, %ymm12 vpaddb %ymm7, %ymm13, %ymm13 vpmaddwd %ymm2, %ymm15, %ymm2 vpaddd %ymm2, %ymm10, %ymm2 vpmaddwd %ymm16, %ymm14, %ymm10 vpaddd %ymm2, %ymm10, %ymm10 vpmaddwd %ymm0, %ymm15, %ymm0 vpaddd %ymm0, %ymm9, %ymm0 vpmaddwd %ymm16, %ymm1, %ymm1 vpaddd %ymm1, %ymm0, %ymm9 addq $0x2, %r15 leal -0x2(%r15), %ecx addq $0x40, %rdi cmpl $0x6, %ecx jb 0x202dd movq -0x10(%rsp), %rcx shrl $0xc, %ecx orl -0x18(%rsp), %r13d orl %ecx, %r13d orl %r13d, %r9d movq -0x8(%rsp), %rcx vmovss (%rcx), %xmm11 movq 0x3bae8(%rip), %rcx # 0x5bf60 vmulss (%rcx,%r9,4), %xmm11, %xmm11 vbroadcastss %xmm11, %ymm11 vcvtdq2ps %ymm10, %ymm10 vfmadd213ps %ymm5, %ymm11, %ymm10 # ymm10 = (ymm11 * ymm10) + ymm5 vcvtdq2ps %ymm9, %ymm9 vfmadd213ps %ymm8, %ymm11, %ymm9 # ymm9 = (ymm11 * ymm9) + ymm8 incq %rax addq $0x38, %r12 vmovaps %ymm10, %ymm5 vmovaps %ymm9, %ymm8 cmpq -0x38(%rsp), %rax jne 0x20251 vextracti128 $0x1, %ymm10, %xmm0 vaddps %xmm0, %xmm10, %xmm0 vshufpd $0x1, %xmm0, %xmm0, %xmm1 # xmm1 = xmm0[1,0] vaddps %xmm1, %xmm0, %xmm0 vhaddps %xmm0, %xmm0, %xmm0 vextractf128 $0x1, %ymm9, %xmm1 vaddps %xmm1, %xmm9, %xmm1 vshufpd $0x1, %xmm1, %xmm1, %xmm2 # xmm2 = xmm1[1,0] vaddps %xmm2, %xmm1, %xmm1 vhaddps %xmm1, %xmm1, %xmm1 vfmadd132ss 0x2a087(%rip), %xmm0, %xmm1 # xmm1 = (xmm1 * mem) + xmm0 movq -0x28(%rsp), %rax vmovss %xmm1, (%rax) popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp vzeroupper retq
ggml_vec_dot_iq1_m_q8_K: push rbp push r15 push r14 push r13 push r12 push rbx mov [rsp+30h+var_50], r9 mov [rsp+30h+var_60], rcx mov [rsp+30h+var_58], rsi vxorps xmm9, xmm9, xmm9 vpxor xmm10, xmm10, xmm10 mov [rsp+30h+var_68], rdi cmp edi, 100h jl loc_204B2 mov rax, [rsp+30h+var_68] shr eax, 8 mov [rsp+30h+var_68], rax vxorps xmm5, xmm5, xmm5 vpmovsxbq ymm21, cs:dword_4A57C vpbroadcastw ymm22, cs:word_4A8B6 vpbroadcastw ymm23, cs:word_4A8B8 xor eax, eax vpbroadcastw ymm3, cs:word_4A8BA vpbroadcastw ymm4, cs:word_4A8BC mov rdx, 0FF00FF00FF00FFh mov r8d, 7777h mov r10, 0F000F000F000F00h lea r11, iq1s_grid mov ebx, 0FFFFh mov ebp, 88888888h mov r14, 0F0F0F0F0F0F0F0F0h vpbroadcastb ymm6, cs:byte_4A8B4 vpbroadcastb ymm7, cs:byte_4A8B5 mov r12, [rsp+30h+var_60] vxorps xmm8, xmm8, xmm8 loc_20251: imul rcx, rax, 124h mov rsi, [rsp+30h+var_50] lea rdi, [rsi+rcx] mov [rsp+30h+var_38], rdi lea rdi, [rsi+rcx] add rdi, 4 imul rcx, rax, 38h ; '8' mov rsi, [rsp+30h+var_60] movzx r9d, word ptr [rsi+rcx+30h] mov [rsp+30h+var_40], r9 movzx r9d, byte ptr [rsi+rcx+33h] and r9d, 0FFFFFFF0h mov [rsp+30h+var_48], r9 movzx r13d, word ptr [rsi+rcx+34h] shr r13d, 4 and r13d, 0F00h movzx r9d, word ptr [rsi+rcx+36h] and r9d, 0F000h vpbroadcastq ymm9, qword ptr [rsi+rcx+30h] vpsrlvq ymm9, ymm9, ymm21 vpaddw ymm11, ymm9, ymm9 vpternlogq ymm11, ymm22, ymm23, 0ECh xor r15d, r15d vmovdqa ymm12, ymm4 vmovdqa ymm13, ymm3 vpxor xmm10, xmm10, xmm10 vpxor xmm9, xmm9, xmm9 loc_202DD: mov ecx, [r12+r15*4] pdep rsi, rcx, rdx movzx ecx, word ptr [r12+r15*2+20h] and ecx, r8d pdep rcx, rcx, r10 or rcx, rsi mov rsi, rcx shr rsi, 30h vmovq xmm14, qword ptr [r11+rsi*8] mov rsi, rcx shr rsi, 20h and esi, ebx vmovq xmm15, qword ptr [r11+rsi*8] mov esi, ecx shr esi, 0Dh vmovq xmm16, qword ptr [rsi+r11] mov esi, [r12+r15*4+4] pdep rsi, rsi, rdx and ecx, ebx vmovq xmm17, qword ptr [r11+rcx*8] movzx ecx, word ptr [r12+r15*2+22h] and ecx, r8d pdep rcx, rcx, r10 or rcx, rsi mov rsi, rcx shr rsi, 30h vmovq xmm18, qword ptr [r11+rsi*8] mov rsi, rcx shr rsi, 20h and esi, ebx vmovq xmm19, qword ptr [r11+rsi*8] mov esi, ecx shr esi, 0Dh vmovq xmm20, qword ptr [rsi+r11] vpunpcklqdq xmm14, xmm15, xmm14 vpunpcklqdq xmm15, xmm17, xmm16 vinserti128 ymm14, ymm15, xmm14, 1 and ecx, ebx vpunpcklqdq xmm15, xmm19, xmm18 vmovq xmm16, qword ptr [r11+rcx*8] vpunpcklqdq xmm16, xmm16, xmm20 vinserti32x4 ymm15, ymm16, xmm15, 1 mov ecx, [r12+r15*2+20h] and ecx, ebp pdep rcx, rcx, r14 vmovd xmm16, ecx vpmovsxbq ymm16, xmm16 shr rcx, 20h vmovd xmm17, ecx vpmovsxbq ymm17, xmm17 vmovdqu ymm0, ymmword ptr [rdi] vmovdqu ymm1, ymmword ptr [rdi+20h] vpsignb ymm2, ymm14, ymm14 vpsignb ymm14, ymm0, ymm14 vpmaddubsw ymm2, ymm2, ymm14 vpsignb ymm14, ymm15, ymm15 vpsignb ymm15, ymm1, ymm15 vpmaddubsw ymm14, ymm14, ymm15 vporq ymm15, ymm16, ymm6 vpsignb ymm0, ymm0, ymm15 vpmaddubsw ymm0, ymm6, ymm0 vporq ymm15, ymm17, ymm6 vpsignb ymm1, ymm1, ymm15 vpmaddubsw ymm1, ymm6, ymm1 vpshufb ymm15, ymm11, ymm12 vpshufb ymm16, ymm11, ymm13 vpaddb ymm12, ymm12, ymm7 vpaddb ymm13, ymm13, ymm7 vpmaddwd ymm2, ymm15, ymm2 vpaddd ymm2, ymm10, ymm2 vpmaddwd ymm10, ymm14, ymm16 vpaddd ymm10, ymm10, ymm2 vpmaddwd ymm0, ymm15, ymm0 vpaddd ymm0, ymm9, ymm0 vpmaddwd ymm1, ymm1, ymm16 vpaddd ymm9, ymm0, ymm1 add r15, 2 lea ecx, [r15-2] add rdi, 40h ; '@' cmp ecx, 6 jb loc_202DD mov rcx, [rsp+30h+var_40] shr ecx, 0Ch or r13d, dword ptr [rsp+30h+var_48] or r13d, ecx or r9d, r13d mov rcx, [rsp+30h+var_38] vmovss xmm11, dword ptr [rcx] mov rcx, cs:ggml_table_f32_f16_ptr vmulss xmm11, xmm11, dword ptr [rcx+r9*4] vbroadcastss ymm11, xmm11 vcvtdq2ps ymm10, ymm10 vfmadd213ps ymm10, ymm11, ymm5 vcvtdq2ps ymm9, ymm9 vfmadd213ps ymm9, ymm11, ymm8 inc rax add r12, 38h ; '8' vmovaps ymm5, ymm10 vmovaps ymm8, ymm9 cmp rax, [rsp+30h+var_68] jnz loc_20251 loc_204B2: vextracti128 xmm0, ymm10, 1 vaddps xmm0, xmm10, xmm0 vshufpd xmm1, xmm0, xmm0, 1 vaddps xmm0, xmm0, xmm1 vhaddps xmm0, xmm0, xmm0 vextractf128 xmm1, ymm9, 1 vaddps xmm1, xmm9, xmm1 vshufpd xmm2, xmm1, xmm1, 1 vaddps xmm1, xmm1, xmm2 vhaddps xmm1, xmm1, xmm1 vfmadd132ss xmm1, xmm0, cs:dword_4A570 mov rax, [rsp+30h+var_58] vmovss dword ptr [rax], xmm1 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp vzeroupper retn
long long ggml_vec_dot_iq1_m_q8_K( int a1, long long a2, double a3, double a4, double a5, double a6, double a7, __m128 _XMM5, long long a9, long long a10, long long a11, long long a12) { long long v23; // rax long long v29; // r12 long long v38; // r15 long long result; // rax long long v115; // [rsp+0h] [rbp-68h] __asm { vxorps xmm9, xmm9, xmm9 vpxor xmm10, xmm10, xmm10 } if ( a1 >= 256 ) { v115 = (unsigned int)a1 >> 8; __asm { vxorps xmm5, xmm5, xmm5 vpmovsxbq ymm21, cs:dword_4A57C vpbroadcastw ymm22, cs:word_4A8B6 vpbroadcastw ymm23, cs:word_4A8B8 } v23 = 0LL; __asm { vpbroadcastw ymm3, cs:word_4A8BA vpbroadcastw ymm4, cs:word_4A8BC } _R11 = &iq1s_grid; __asm { vpbroadcastb ymm6, cs:byte_4A8B4 vpbroadcastb ymm7, cs:byte_4A8B5 } v29 = a10; __asm { vxorps xmm8, xmm8, xmm8 } do { _RDI = a12 + 292 * v23 + 4; _RCX = 56 * v23; _RSI = a10; __asm { vpbroadcastq ymm9, qword ptr [rsi+rcx+30h] vpsrlvq ymm9, ymm9, ymm21 vpaddw ymm11, ymm9, ymm9 vpternlogq ymm11, ymm22, ymm23, 0ECh } v38 = 0LL; __asm { vmovdqa ymm12, ymm4 vmovdqa ymm13, ymm3 vpxor xmm10, xmm10, xmm10 vpxor xmm9, xmm9, xmm9 } do { _RCX = *(unsigned int *)(v29 + 4 * v38); __asm { pdep rsi, rcx, rdx } _RCX = *(_WORD *)(v29 + 2 * v38 + 32) & 0x7777; __asm { pdep rcx, rcx, r10 } _RCX = _RSI | _RCX; _RSI = HIWORD(_RCX); __asm { vmovq xmm14, qword ptr [r11+rsi*8] } _RSI = WORD2(_RCX); __asm { vmovq xmm15, qword ptr [r11+rsi*8] } _RSI = (unsigned int)_RCX >> 13; __asm { vmovq xmm16, qword ptr [rsi+r11] } _RSI = *(unsigned int *)(v29 + 4 * v38 + 4); __asm { pdep rsi, rsi, rdx } _RCX = (unsigned __int16)_RCX; __asm { vmovq xmm17, qword ptr [r11+rcx*8] } _RCX = *(_WORD *)(v29 + 2 * v38 + 34) & 0x7777; __asm { pdep rcx, rcx, r10 } _RCX = _RSI | _RCX; _RSI = HIWORD(_RCX); __asm { vmovq xmm18, qword ptr [r11+rsi*8] } _RSI = WORD2(_RCX); __asm { vmovq xmm19, qword ptr [r11+rsi*8] } _RSI = (unsigned int)_RCX >> 13; __asm { vmovq xmm20, qword ptr [rsi+r11] vpunpcklqdq xmm14, xmm15, xmm14 vpunpcklqdq xmm15, xmm17, xmm16 vinserti128 ymm14, ymm15, xmm14, 1 } _RCX = (unsigned __int16)_RCX; __asm { vpunpcklqdq xmm15, xmm19, xmm18 vmovq xmm16, qword ptr [r11+rcx*8] vpunpcklqdq xmm16, xmm16, xmm20 vinserti32x4 ymm15, ymm16, xmm15, 1 } _RCX = *(_DWORD *)(v29 + 2 * v38 + 32) & 0x88888888; __asm { pdep rcx, rcx, r14 vmovd xmm16, ecx vpmovsxbq ymm16, xmm16 } _RCX >>= 32; __asm { vmovd xmm17, ecx vpmovsxbq ymm17, xmm17 vmovdqu ymm0, ymmword ptr [rdi] vmovdqu ymm1, ymmword ptr [rdi+20h] vpsignb ymm2, ymm14, ymm14 vpsignb ymm14, ymm0, ymm14 vpmaddubsw ymm2, ymm2, ymm14 vpsignb ymm14, ymm15, ymm15 vpsignb ymm15, ymm1, ymm15 vpmaddubsw ymm14, ymm14, ymm15 vporq ymm15, ymm16, ymm6 vpsignb ymm0, ymm0, ymm15 vpmaddubsw ymm0, ymm6, ymm0 vporq ymm15, ymm17, ymm6 vpsignb ymm1, ymm1, ymm15 vpmaddubsw ymm1, ymm6, ymm1 vpshufb ymm15, ymm11, ymm12 vpshufb ymm16, ymm11, ymm13 vpaddb ymm12, ymm12, ymm7 vpaddb ymm13, ymm13, ymm7 vpmaddwd ymm2, ymm15, ymm2 vpaddd ymm2, ymm10, ymm2 vpmaddwd ymm10, ymm14, ymm16 vpaddd ymm10, ymm10, ymm2 vpmaddwd ymm0, ymm15, ymm0 vpaddd ymm0, ymm9, ymm0 vpmaddwd ymm1, ymm1, ymm16 vpaddd ymm9, ymm0, ymm1 } v38 += 2LL; _RDI += 64LL; } while ( (unsigned int)(v38 - 2) < 6 ); _RCX = a12 + 292 * v23; __asm { vmovss xmm11, dword ptr [rcx] vmulss xmm11, xmm11, dword ptr [rcx+r9*4] vbroadcastss ymm11, xmm11 vcvtdq2ps ymm10, ymm10 vfmadd213ps ymm10, ymm11, ymm5 vcvtdq2ps ymm9, ymm9 vfmadd213ps ymm9, ymm11, ymm8 } ++v23; v29 += 56LL; __asm { vmovaps ymm5, ymm10 vmovaps ymm8, ymm9 } } while ( v23 != v115 ); } __asm { vextracti128 xmm0, ymm10, 1 vaddps xmm0, xmm10, xmm0 vshufpd xmm1, xmm0, xmm0, 1 vaddps xmm0, xmm0, xmm1 vhaddps xmm0, xmm0, xmm0 vextractf128 xmm1, ymm9, 1 vaddps xmm1, xmm9, xmm1 vshufpd xmm2, xmm1, xmm1, 1 vaddps xmm1, xmm1, xmm2 vhaddps xmm1, xmm1, xmm1 vfmadd132ss xmm1, xmm0, cs:dword_4A570 } result = a2; __asm { vmovss dword ptr [rax], xmm1 vzeroupper } return result; }
ggml_vec_dot_iq1_m_q8_K: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV qword ptr [RSP + -0x20],R9 MOV qword ptr [RSP + -0x30],RCX MOV qword ptr [RSP + -0x28],RSI VXORPS XMM9,XMM9,XMM9 VPXOR XMM10,XMM10,XMM10 MOV qword ptr [RSP + -0x38],RDI CMP EDI,0x100 JL 0x001204b2 MOV RAX,qword ptr [RSP + -0x38] SHR EAX,0x8 MOV qword ptr [RSP + -0x38],RAX VXORPS XMM5,XMM5,XMM5 VPMOVSXBQ YMM5,dword ptr [0x0014a57c] VPBROADCASTW YMM6,word ptr [0x0014a8b6] VPBROADCASTW YMM7,word ptr [0x0014a8b8] XOR EAX,EAX VPBROADCASTW YMM3,word ptr [0x0014a8ba] VPBROADCASTW YMM4,word ptr [0x0014a8bc] MOV RDX,0xff00ff00ff00ff MOV R8D,0x7777 MOV R10,0xf000f000f000f00 LEA R11,[0x14f0d0] MOV EBX,0xffff MOV EBP,0x88888888 MOV R14,-0xf0f0f0f0f0f0f10 VPBROADCASTB YMM6,byte ptr [0x0014a8b4] VPBROADCASTB YMM7,byte ptr [0x0014a8b5] MOV R12,qword ptr [RSP + -0x30] VXORPS XMM8,XMM8,XMM8 LAB_00120251: IMUL RCX,RAX,0x124 MOV RSI,qword ptr [RSP + -0x20] LEA RDI,[RSI + RCX*0x1] MOV qword ptr [RSP + -0x8],RDI LEA RDI,[RSI + RCX*0x1] ADD RDI,0x4 IMUL RCX,RAX,0x38 MOV RSI,qword ptr [RSP + -0x30] MOVZX R9D,word ptr [RSI + RCX*0x1 + 0x30] MOV qword ptr [RSP + -0x10],R9 MOVZX R9D,byte ptr [RSI + RCX*0x1 + 0x33] AND R9D,0xfffffff0 MOV qword ptr [RSP + -0x18],R9 MOVZX R13D,word ptr [RSI + RCX*0x1 + 0x34] SHR R13D,0x4 AND R13D,0xf00 MOVZX R9D,word ptr [RSI + RCX*0x1 + 0x36] AND R9D,0xf000 VPBROADCASTQ YMM9,qword ptr [RSI + RCX*0x1 + 0x30] VPSRLVQ YMM9,YMM9,YMM5 VPADDW YMM11,YMM9,YMM9 VPTERNLOGQ YMM11,YMM6,YMM7,0xec XOR R15D,R15D VMOVDQA YMM12,YMM4 VMOVDQA YMM13,YMM3 VPXOR XMM10,XMM10,XMM10 VPXOR XMM9,XMM9,XMM9 LAB_001202dd: MOV ECX,dword ptr [R12 + R15*0x4] PDEP RSI,RCX,RDX MOVZX ECX,word ptr [R12 + R15*0x2 + 0x20] AND ECX,R8D PDEP RCX,RCX,R10 OR RCX,RSI MOV RSI,RCX SHR RSI,0x30 VMOVQ XMM14,qword ptr [R11 + RSI*0x8] MOV RSI,RCX SHR RSI,0x20 AND ESI,EBX VMOVQ XMM15,qword ptr [R11 + RSI*0x8] MOV ESI,ECX SHR ESI,0xd VMOVQ XMM0,qword ptr [RSI + R11*0x1] MOV ESI,dword ptr [R12 + R15*0x4 + 0x4] PDEP RSI,RSI,RDX AND ECX,EBX VMOVQ XMM1,qword ptr [R11 + RCX*0x8] MOVZX ECX,word ptr [R12 + R15*0x2 + 0x22] AND ECX,R8D PDEP RCX,RCX,R10 OR RCX,RSI MOV RSI,RCX SHR RSI,0x30 VMOVQ XMM2,qword ptr [R11 + RSI*0x8] MOV RSI,RCX SHR RSI,0x20 AND ESI,EBX VMOVQ XMM3,qword ptr [R11 + RSI*0x8] MOV ESI,ECX SHR ESI,0xd VMOVQ XMM4,qword ptr [RSI + R11*0x1] VPUNPCKLQDQ XMM14,XMM15,XMM14 VPUNPCKLQDQ XMM15,XMM1,XMM0 VINSERTI128 YMM14,YMM15,XMM14,0x1 AND ECX,EBX VPUNPCKLQDQ XMM15,XMM3,XMM2 VMOVQ XMM0,qword ptr [R11 + RCX*0x8] VPUNPCKLQDQ XMM0,XMM0,XMM4 VINSERTI32X4 YMM15,YMM0,XMM15,0x1 MOV ECX,dword ptr [R12 + R15*0x2 + 0x20] AND ECX,EBP PDEP RCX,RCX,R14 VMOVD XMM0,ECX VPMOVSXBQ YMM0,XMM0 SHR RCX,0x20 VMOVD XMM1,ECX VPMOVSXBQ YMM1,XMM1 VMOVDQU YMM0,ymmword ptr [RDI] VMOVDQU YMM1,ymmword ptr [RDI + 0x20] VPSIGNB YMM2,YMM14,YMM14 VPSIGNB YMM14,YMM0,YMM14 VPMADDUBSW YMM2,YMM2,YMM14 VPSIGNB YMM14,YMM15,YMM15 VPSIGNB YMM15,YMM1,YMM15 VPMADDUBSW YMM14,YMM14,YMM15 VPORQ YMM15,YMM0,YMM6 VPSIGNB YMM0,YMM0,YMM15 VPMADDUBSW YMM0,YMM6,YMM0 VPORQ YMM15,YMM1,YMM6 VPSIGNB YMM1,YMM1,YMM15 VPMADDUBSW YMM1,YMM6,YMM1 VPSHUFB YMM15,YMM11,YMM12 VPSHUFB YMM0,YMM11,YMM13 VPADDB YMM12,YMM12,YMM7 VPADDB YMM13,YMM13,YMM7 VPMADDWD YMM2,YMM15,YMM2 VPADDD YMM2,YMM10,YMM2 VPMADDWD YMM10,YMM14,YMM0 VPADDD YMM10,YMM10,YMM2 VPMADDWD YMM0,YMM15,YMM0 VPADDD YMM0,YMM9,YMM0 VPMADDWD YMM1,YMM1,YMM0 VPADDD YMM9,YMM0,YMM1 ADD R15,0x2 LEA ECX,[R15 + -0x2] ADD RDI,0x40 CMP ECX,0x6 JC 0x001202dd MOV RCX,qword ptr [RSP + -0x10] SHR ECX,0xc OR R13D,dword ptr [RSP + -0x18] OR R13D,ECX OR R9D,R13D MOV RCX,qword ptr [RSP + -0x8] VMOVSS XMM11,dword ptr [RCX] MOV RCX,qword ptr [0x0015bf60] VMULSS XMM11,XMM11,dword ptr [RCX + R9*0x4] VBROADCASTSS YMM11,XMM11 VCVTDQ2PS YMM10,YMM10 VFMADD213PS YMM10,YMM11,YMM5 VCVTDQ2PS YMM9,YMM9 VFMADD213PS YMM9,YMM11,YMM8 INC RAX ADD R12,0x38 VMOVAPS YMM5,YMM10 VMOVAPS YMM8,YMM9 CMP RAX,qword ptr [RSP + -0x38] JNZ 0x00120251 LAB_001204b2: VEXTRACTI128 XMM0,YMM10,0x1 VADDPS XMM0,XMM10,XMM0 VSHUFPD XMM1,XMM0,XMM0,0x1 VADDPS XMM0,XMM0,XMM1 VHADDPS XMM0,XMM0,XMM0 VEXTRACTF128 XMM1,YMM9,0x1 VADDPS XMM1,XMM9,XMM1 VSHUFPD XMM2,XMM1,XMM1,0x1 VADDPS XMM1,XMM1,XMM2 VHADDPS XMM1,XMM1,XMM1 VFMADD132SS XMM1,XMM0,dword ptr [0x0014a570] MOV RAX,qword ptr [RSP + -0x28] VMOVSS dword ptr [RAX],XMM1 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP VZEROUPPER RET
void ggml_vec_dot_iq1_m_q8_K (ulong param_1,int4 *param_2,int8 param_3,long param_4,int8 param_5 ,long param_6) { int8 uVar1; int1 auVar2 [32]; float fVar3; int1 auVar4 [32]; ulong uVar5; ulong uVar6; uint uVar7; ulong uVar8; long lVar9; ulong uVar10; ulong uVar11; ulong uVar12; int1 (*pauVar13) [32]; long lVar14; long lVar15; int1 auVar16 [16]; int1 auVar17 [16]; int1 auVar18 [32]; int1 auVar19 [32]; int1 auVar20 [32]; int1 auVar21 [32]; int1 auVar22 [32]; int1 auVar23 [32]; int1 auVar24 [32]; int1 auVar25 [16]; int1 auVar26 [16]; int1 auVar27 [16]; int1 auVar28 [16]; int1 auVar29 [16]; int1 auVar30 [16]; int1 auVar31 [16]; int1 auVar32 [32]; int1 auVar33 [64]; int1 auVar34 [16]; int1 auVar35 [64]; int1 auVar36 [32]; int1 auVar37 [32]; int1 auVar38 [16]; int1 auVar39 [64]; int1 auVar40 [64]; int1 auVar41 [16]; int1 auVar42 [16]; auVar38 = ZEXT816(0) << 0x40; auVar19 = SUB6432(ZEXT1664((int1 [16])0x0),0); if (0xff < (int)param_1) { auVar18 = vpmovsxbq_avx512vl(ZEXT416(DAT_0014a57c)); vpbroadcastw_avx512vl(ZEXT216(DAT_0014a8b6)); vpbroadcastw_avx512vl(ZEXT216(DAT_0014a8b8)); uVar8 = 0; auVar33 = ZEXT3264(CONCAT230(DAT_0014a8ba, CONCAT228(DAT_0014a8ba, CONCAT226(DAT_0014a8ba, CONCAT224(DAT_0014a8ba, CONCAT222(DAT_0014a8ba, CONCAT220(DAT_0014a8ba, CONCAT218( DAT_0014a8ba, CONCAT216(DAT_0014a8ba, CONCAT214(DAT_0014a8ba, CONCAT212(DAT_0014a8ba, CONCAT210( DAT_0014a8ba, CONCAT28(DAT_0014a8ba, CONCAT26(DAT_0014a8ba, CONCAT24(DAT_0014a8ba, CONCAT22(DAT_0014a8ba, DAT_0014a8ba)) )))))))))))))); auVar35 = ZEXT3264(CONCAT230(DAT_0014a8bc, CONCAT228(DAT_0014a8bc, CONCAT226(DAT_0014a8bc, CONCAT224(DAT_0014a8bc, CONCAT222(DAT_0014a8bc, CONCAT220(DAT_0014a8bc, CONCAT218( DAT_0014a8bc, CONCAT216(DAT_0014a8bc, CONCAT214(DAT_0014a8bc, CONCAT212(DAT_0014a8bc, CONCAT210( DAT_0014a8bc, CONCAT28(DAT_0014a8bc, CONCAT26(DAT_0014a8bc, CONCAT24(DAT_0014a8bc, CONCAT22(DAT_0014a8bc, DAT_0014a8bc)) )))))))))))))); auVar36[1] = DAT_0014a8b4; auVar36[0] = DAT_0014a8b4; auVar36[2] = DAT_0014a8b4; auVar36[3] = DAT_0014a8b4; auVar36[4] = DAT_0014a8b4; auVar36[5] = DAT_0014a8b4; auVar36[6] = DAT_0014a8b4; auVar36[7] = DAT_0014a8b4; auVar36[8] = DAT_0014a8b4; auVar36[9] = DAT_0014a8b4; auVar36[10] = DAT_0014a8b4; auVar36[0xb] = DAT_0014a8b4; auVar36[0xc] = DAT_0014a8b4; auVar36[0xd] = DAT_0014a8b4; auVar36[0xe] = DAT_0014a8b4; auVar36[0xf] = DAT_0014a8b4; auVar36[0x10] = DAT_0014a8b4; auVar36[0x11] = DAT_0014a8b4; auVar36[0x12] = DAT_0014a8b4; auVar36[0x13] = DAT_0014a8b4; auVar36[0x14] = DAT_0014a8b4; auVar36[0x15] = DAT_0014a8b4; auVar36[0x16] = DAT_0014a8b4; auVar36[0x17] = DAT_0014a8b4; auVar36[0x18] = DAT_0014a8b4; auVar36[0x19] = DAT_0014a8b4; auVar36[0x1a] = DAT_0014a8b4; auVar36[0x1b] = DAT_0014a8b4; auVar36[0x1c] = DAT_0014a8b4; auVar36[0x1d] = DAT_0014a8b4; auVar36[0x1e] = DAT_0014a8b4; auVar36[0x1f] = DAT_0014a8b4; auVar37[1] = DAT_0014a8b5; auVar37[0] = DAT_0014a8b5; auVar37[2] = DAT_0014a8b5; auVar37[3] = DAT_0014a8b5; auVar37[4] = DAT_0014a8b5; auVar37[5] = DAT_0014a8b5; auVar37[6] = DAT_0014a8b5; auVar37[7] = DAT_0014a8b5; auVar37[8] = DAT_0014a8b5; auVar37[9] = DAT_0014a8b5; auVar37[10] = DAT_0014a8b5; auVar37[0xb] = DAT_0014a8b5; auVar37[0xc] = DAT_0014a8b5; auVar37[0xd] = DAT_0014a8b5; auVar37[0xe] = DAT_0014a8b5; auVar37[0xf] = DAT_0014a8b5; auVar37[0x10] = DAT_0014a8b5; auVar37[0x11] = DAT_0014a8b5; auVar37[0x12] = DAT_0014a8b5; auVar37[0x13] = DAT_0014a8b5; auVar37[0x14] = DAT_0014a8b5; auVar37[0x15] = DAT_0014a8b5; auVar37[0x16] = DAT_0014a8b5; auVar37[0x17] = DAT_0014a8b5; auVar37[0x18] = DAT_0014a8b5; auVar37[0x19] = DAT_0014a8b5; auVar37[0x1a] = DAT_0014a8b5; auVar37[0x1b] = DAT_0014a8b5; auVar37[0x1c] = DAT_0014a8b5; auVar37[0x1d] = DAT_0014a8b5; auVar37[0x1e] = DAT_0014a8b5; auVar37[0x1f] = DAT_0014a8b5; auVar38 = ZEXT816(0) << 0x40; lVar14 = param_4; do { pauVar13 = (int1 (*) [32])(param_6 + uVar8 * 0x124 + 4); lVar9 = uVar8 * 0x38; uVar1 = *(int8 *)(param_4 + 0x30 + lVar9); auVar19._8_8_ = uVar1; auVar19._0_8_ = uVar1; auVar19._16_8_ = uVar1; auVar19._24_8_ = uVar1; auVar19 = vpsrlvq_avx512vl(auVar19,auVar18); auVar19 = vpaddw_avx2(auVar19,auVar19); auVar20 = vpternlogq_avx512vl(auVar19,auVar36,auVar37,0xec); auVar19 = auVar35._0_32_; auVar32 = auVar33._0_32_; auVar40 = ZEXT1664((int1 [16])0x0); auVar39 = ZEXT1664((int1 [16])0x0); lVar15 = 0; do { uVar10 = (ulong)*(uint *)(lVar14 + lVar15 * 4); uVar5 = 1; uVar6 = 0; do { if ((uVar5 & 0xff00ff00ff00ff) != 0) { uVar6 = uVar6 | (uVar5 & 0xff00ff00ff00ff) * (uVar10 & 1); uVar10 = uVar10 >> 1; } uVar5 = uVar5 << 1; } while (uVar5 != 0); uVar10 = (ulong)(*(ushort *)(lVar14 + 0x20 + lVar15 * 2) & 0x7777); uVar5 = 1; uVar11 = 0; do { if ((uVar5 & 0xf000f000f000f00) != 0) { uVar11 = uVar11 | (uVar5 & 0xf000f000f000f00) * (uVar10 & 1); uVar10 = uVar10 >> 1; } uVar5 = uVar5 << 1; } while (uVar5 != 0); uVar11 = uVar11 | uVar6; uVar10 = (ulong)*(uint *)(lVar14 + 4 + lVar15 * 4); uVar5 = 1; uVar6 = 0; do { if ((uVar5 & 0xff00ff00ff00ff) != 0) { uVar6 = uVar6 | (uVar5 & 0xff00ff00ff00ff) * (uVar10 & 1); uVar10 = uVar10 >> 1; } uVar5 = uVar5 << 1; } while (uVar5 != 0); uVar10 = (ulong)(*(ushort *)(lVar14 + 0x22 + lVar15 * 2) & 0x7777); uVar5 = 1; uVar12 = 0; do { if ((uVar5 & 0xf000f000f000f00) != 0) { uVar12 = uVar12 | (uVar5 & 0xf000f000f000f00) * (uVar10 & 1); uVar10 = uVar10 >> 1; } uVar5 = uVar5 << 1; } while (uVar5 != 0); uVar12 = uVar12 | uVar6; auVar33 = ZEXT864(*(ulong *)(iq1s_grid + (ulong)((uint)(uVar12 >> 0x20) & 0xffff) * 8)); auVar35 = ZEXT864(*(ulong *)(iq1s_grid + (uVar12 >> 0xd & 0x7ffff))); auVar41._8_8_ = 0; auVar41._0_8_ = *(ulong *)(iq1s_grid + (uVar11 >> 0x30) * 8); auVar42._8_8_ = 0; auVar42._0_8_ = *(ulong *)(iq1s_grid + (ulong)((uint)(uVar11 >> 0x20) & 0xffff) * 8); auVar17 = vpunpcklqdq_avx(auVar42,auVar41); auVar16._8_8_ = 0; auVar16._0_8_ = *(ulong *)(iq1s_grid + (uVar11 >> 0xd & 0x7ffff)); auVar28._8_8_ = 0; auVar28._0_8_ = *(ulong *)(iq1s_grid + (ulong)((uint)uVar11 & 0xffff) * 8); auVar16 = vpunpcklqdq_avx512vl(auVar28,auVar16); auVar23._0_16_ = ZEXT116(0) * auVar17 + ZEXT116(1) * auVar16; auVar23._16_16_ = ZEXT116(1) * auVar17; auVar17._8_8_ = 0; auVar17._0_8_ = *(ulong *)(iq1s_grid + (uVar12 >> 0x30) * 8); auVar31._8_8_ = 0; auVar31._0_8_ = *(ulong *)(iq1s_grid + (ulong)((uint)(uVar12 >> 0x20) & 0xffff) * 8); auVar17 = vpunpcklqdq_avx512vl(auVar31,auVar17); auVar25._8_8_ = 0; auVar25._0_8_ = *(ulong *)(iq1s_grid + (ulong)((uint)uVar12 & 0xffff) * 8); auVar34._8_8_ = 0; auVar34._0_8_ = *(ulong *)(iq1s_grid + (uVar12 >> 0xd & 0x7ffff)); auVar16 = vpunpcklqdq_avx512vl(auVar25,auVar34); auVar21 = vinserti32x4_avx512vl(ZEXT1632(auVar16),auVar17,1); uVar10 = (ulong)(*(uint *)(lVar14 + 0x20 + lVar15 * 2) & 0x88888888); uVar5 = 1; uVar6 = 0; do { if ((uVar5 & 0xf0f0f0f0f0f0f0f0) != 0) { uVar6 = uVar6 | (uVar5 & 0xf0f0f0f0f0f0f0f0) * (uVar10 & 1); uVar10 = uVar10 >> 1; } uVar5 = uVar5 << 1; } while (uVar5 != 0); vpmovsxbq_avx512vl(ZEXT416((uint)uVar6)); vpmovsxbq_avx512vl(ZEXT416((uint)(uVar6 >> 0x20))); auVar24 = *pauVar13; auVar2 = pauVar13[1]; auVar4 = vpsignb_avx2(auVar23,auVar23); auVar23 = vpsignb_avx2(auVar24,auVar23); auVar23 = vpmaddubsw_avx2(auVar4,auVar23); auVar4 = vpsignb_avx2(auVar21,auVar21); auVar21 = vpsignb_avx2(auVar2,auVar21); auVar4 = vpmaddubsw_avx2(auVar4,auVar21); auVar21 = vporq_avx512vl(auVar24,auVar36); auVar21 = vpsignb_avx2(auVar24,auVar21); vpmaddubsw_avx2(auVar36,auVar21); auVar21 = vporq_avx512vl(auVar2,auVar36); auVar21 = vpsignb_avx2(auVar2,auVar21); auVar24 = vpmaddubsw_avx2(auVar36,auVar21); auVar2 = vpshufb_avx2(auVar20,auVar19); auVar22 = vpshufb_avx512vl(auVar20,auVar32); auVar19 = vpaddb_avx2(auVar19,auVar37); auVar32 = vpaddb_avx2(auVar32,auVar37); auVar21 = vpmaddwd_avx2(auVar2,auVar23); auVar21 = vpaddd_avx2(auVar40._0_32_,auVar21); auVar23 = vpmaddwd_avx512vl(auVar4,auVar22); auVar21 = vpaddd_avx2(auVar23,auVar21); auVar40 = ZEXT3264(auVar21); auVar23 = vpmaddwd_avx2(auVar2,auVar22); auVar23 = vpaddd_avx2(auVar39._0_32_,auVar23); auVar24 = vpmaddwd_avx512vl(auVar24,auVar23); auVar23 = vpaddd_avx2(auVar23,auVar24); auVar39 = ZEXT3264(auVar23); uVar7 = (uint)lVar15; pauVar13 = pauVar13 + 2; lVar15 = lVar15 + 2; } while (uVar7 < 6); fVar3 = *(float *)(param_6 + uVar8 * 0x124) * *(float *)(PTR_ggml_table_f32_f16_0015bf60 + (ulong)(*(ushort *)(param_4 + 0x36 + lVar9) & 0xf000 | *(ushort *)(param_4 + 0x34 + lVar9) >> 4 & 0xf00 | *(byte *)(param_4 + 0x33 + lVar9) & 0xfffffff0 | (uint)(*(ushort *)(param_4 + 0x30 + lVar9) >> 0xc)) * 4); auVar32._4_4_ = fVar3; auVar32._0_4_ = fVar3; auVar32._8_4_ = fVar3; auVar32._12_4_ = fVar3; auVar32._16_4_ = fVar3; auVar32._20_4_ = fVar3; auVar32._24_4_ = fVar3; auVar32._28_4_ = fVar3; auVar19 = vcvtdq2ps_avx(auVar21); auVar17 = vfmadd213ps_fma(auVar19,auVar32,auVar18); auVar19 = ZEXT1632(auVar17); auVar18 = vcvtdq2ps_avx(auVar23); auVar38 = vfmadd213ps_fma(auVar18,auVar32,ZEXT1632(auVar38)); uVar8 = uVar8 + 1; lVar14 = lVar14 + 0x38; auVar18 = ZEXT1632(auVar17); } while (uVar8 != (param_1 >> 8 & 0xffffff)); } auVar26._0_4_ = auVar19._0_4_ + auVar19._16_4_; auVar26._4_4_ = auVar19._4_4_ + auVar19._20_4_; auVar26._8_4_ = auVar19._8_4_ + auVar19._24_4_; auVar26._12_4_ = auVar19._12_4_ + auVar19._28_4_; auVar17 = vshufpd_avx(auVar26,auVar26,1); auVar27._0_4_ = auVar26._0_4_ + auVar17._0_4_; auVar27._4_4_ = auVar26._4_4_ + auVar17._4_4_; auVar27._8_4_ = auVar26._8_4_ + auVar17._8_4_; auVar27._12_4_ = auVar26._12_4_ + auVar17._12_4_; auVar17 = vhaddps_avx(auVar27,auVar27); auVar29._0_4_ = auVar38._0_4_ + 0.0; auVar29._4_4_ = auVar38._4_4_ + 0.0; auVar29._8_4_ = auVar38._8_4_ + 0.0; auVar29._12_4_ = auVar38._12_4_ + 0.0; auVar38 = vshufpd_avx(auVar29,auVar29,1); auVar30._0_4_ = auVar29._0_4_ + auVar38._0_4_; auVar30._4_4_ = auVar29._4_4_ + auVar38._4_4_; auVar30._8_4_ = auVar29._8_4_ + auVar38._8_4_; auVar30._12_4_ = auVar29._12_4_ + auVar38._12_4_; auVar38 = vhaddps_avx(auVar30,auVar30); auVar38 = vfmadd132ss_fma(auVar38,auVar17,ZEXT416(DAT_0014a570)); *param_2 = auVar38._0_4_; return; }
4,683
glfwPlatformGetScancodeName
untodesu[P]riteg/build_O2/_deps/glfw-src/src/x11_window.c
const char* _glfwPlatformGetScancodeName(int scancode) { if (!_glfw.x11.xkb.available) return NULL; const KeySym keysym = XkbKeycodeToKeysym(_glfw.x11.display, scancode, 0, 0); if (keysym == NoSymbol) return NULL; const long ch = _glfwKeySym2Unicode(keysym); if (ch == -1) return NULL; const size_t count = encodeUTF8(_glfw.x11.keyName, (unsigned int) ch); if (count == 0) return NULL; _glfw.x11.keyName[count] = '\0'; return _glfw.x11.keyName; }
O2
c
glfwPlatformGetScancodeName: pushq %r14 pushq %rbx pushq %rax leaq 0x7ae1e(%rip), %r14 # 0x9b648 cmpl $0x0, 0x20620(%r14) je 0x2088c movq 0x1fec0(%r14), %rax movzbl %dil, %esi xorl %ebx, %ebx movq %rax, %rdi xorl %edx, %edx xorl %ecx, %ecx callq 0xb340 testq %rax, %rax je 0x2088e movl %eax, %edi callq 0x211fc cmpq $-0x1, %rax je 0x2088c movl $0x1ff18, %edi # imm = 0x1FF18 addq 0x79755(%rip), %rdi # 0x99fc0 movl %eax, %esi callq 0x20899 testq %rax, %rax je 0x2088c movb $0x0, 0x1ff18(%r14,%rax) addq $0x1ff18, %r14 # imm = 0x1FF18 movq %r14, %rbx jmp 0x2088e xorl %ebx, %ebx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_glfwPlatformGetScancodeName: push r14 push rbx push rax lea r14, _glfw cmp dword ptr [r14+20620h], 0 jz short loc_2088C loc_20834: mov rax, [r14+1FEC0h] movzx esi, dil xor ebx, ebx mov rdi, rax loc_20844: xor edx, edx xor ecx, ecx loc_20848: call _XkbKeycodeToKeysym test rax, rax loc_20850: jz short loc_2088E mov edi, eax loc_20854: call _glfwKeySym2Unicode cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_2088C mov edi, 1FF18h add rdi, cs:_glfw_ptr mov esi, eax call encodeUTF8 test rax, rax jz short loc_2088C mov byte ptr [r14+rax+1FF18h], 0 add r14, 1FF18h mov rbx, r14 jmp short loc_2088E loc_2088C: xor ebx, ebx loc_2088E: mov rax, rbx add rsp, 8 pop rbx pop r14 locret_20898: retn
_DWORD * glfwPlatformGetScancodeName(unsigned __int8 a1) { long long v1; // rbx long long v2; // rax long long v3; // rax long long v4; // rax if ( !glfw[33160] ) return 0LL; v1 = 0LL; v2 = XkbKeycodeToKeysym(*(_QWORD *)&glfw[32688], a1, 0LL, 0LL); if ( v2 ) { v3 = glfwKeySym2Unicode((unsigned int)v2); if ( v3 != -1 ) { v4 = encodeUTF8(&glfw[32710], (unsigned int)v3); if ( v4 ) { *((_BYTE *)&glfw[32710] + v4) = 0; return &glfw[32710]; } } return 0LL; } return (_DWORD *)v1; }
_glfwPlatformGetScancodeName: PUSH R14 PUSH RBX PUSH RAX LEA R14,[0x19b648] CMP dword ptr [R14 + 0x20620],0x0 JZ 0x0012088c MOV RAX,qword ptr [R14 + 0x1fec0] MOVZX ESI,DIL XOR EBX,EBX MOV RDI,RAX XOR EDX,EDX XOR ECX,ECX CALL 0x0010b340 TEST RAX,RAX JZ 0x0012088e MOV EDI,EAX CALL 0x001211fc CMP RAX,-0x1 JZ 0x0012088c MOV EDI,0x1ff18 ADD RDI,qword ptr [0x00199fc0] MOV ESI,EAX CALL 0x00120899 TEST RAX,RAX JZ 0x0012088c MOV byte ptr [R14 + RAX*0x1 + 0x1ff18],0x0 ADD R14,0x1ff18 MOV RBX,R14 JMP 0x0012088e LAB_0012088c: XOR EBX,EBX LAB_0012088e: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
int * _glfwPlatformGetScancodeName(int1 param_1) { ulong uVar1; long lVar2; if (DAT_001bbc68 != 0) { uVar1 = XkbKeycodeToKeysym(DAT_001bb508,param_1,0,0); if (uVar1 == 0) { return (int *)0x0; } uVar1 = _glfwKeySym2Unicode(uVar1 & 0xffffffff); if ((uVar1 != 0xffffffffffffffff) && (lVar2 = encodeUTF8(PTR__glfw_00199fc0 + 0x1ff18,uVar1 & 0xffffffff), lVar2 != 0)) { (&DAT_001bb560)[lVar2] = 0; return &DAT_001bb560; } } return (int *)0x0; }
4,684
stbi__process_scan_header
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h
static int stbi__process_scan_header(stbi__jpeg *z) { int i; int Ls = stbi__get16be(z->s); z->scan_n = stbi__get8(z->s); if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int) z->s->img_n) return stbi__err("bad SOS component count","Corrupt JPEG"); if (Ls != 6+2*z->scan_n) return stbi__err("bad SOS len","Corrupt JPEG"); for (i=0; i < z->scan_n; ++i) { int id = stbi__get8(z->s), which; int q = stbi__get8(z->s); for (which = 0; which < z->s->img_n; ++which) if (z->img_comp[which].id == id) break; if (which == z->s->img_n) return 0; // no match z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return stbi__err("bad DC huff","Corrupt JPEG"); z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return stbi__err("bad AC huff","Corrupt JPEG"); z->order[i] = which; } { int aa; z->spec_start = stbi__get8(z->s); z->spec_end = stbi__get8(z->s); // should be 63, but might be 0 aa = stbi__get8(z->s); z->succ_high = (aa >> 4); z->succ_low = (aa & 15); if (z->progressive) { if (z->spec_start > 63 || z->spec_end > 63 || z->spec_start > z->spec_end || z->succ_high > 13 || z->succ_low > 13) return stbi__err("bad SOS", "Corrupt JPEG"); } else { if (z->spec_start != 0) return stbi__err("bad SOS","Corrupt JPEG"); if (z->succ_high != 0 || z->succ_low != 0) return stbi__err("bad SOS","Corrupt JPEG"); z->spec_end = 63; } } return 1; }
O0
c
stbi__process_scan_header: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x6bf10 movl %eax, -0x18(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x6a1b0 movzbl %al, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x4854(%rax) movq -0x10(%rbp), %rax cmpl $0x1, 0x4854(%rax) jl 0x79ab4 movq -0x10(%rbp), %rax cmpl $0x4, 0x4854(%rax) jg 0x79ab4 movq -0x10(%rbp), %rax movl 0x4854(%rax), %eax movq -0x10(%rbp), %rcx movq (%rcx), %rcx cmpl 0x8(%rcx), %eax jle 0x79ac8 leaq 0x171db(%rip), %rdi # 0x90c96 callq 0x66030 movl %eax, -0x4(%rbp) jmp 0x79d72 movl -0x18(%rbp), %eax movq -0x10(%rbp), %rcx movl 0x4854(%rcx), %ecx shll %ecx addl $0x6, %ecx cmpl %ecx, %eax je 0x79af2 leaq 0x171c9(%rip), %rdi # 0x90cae callq 0x66030 movl %eax, -0x4(%rbp) jmp 0x79d72 movl $0x0, -0x14(%rbp) movl -0x14(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0x4854(%rcx), %eax jge 0x79c46 movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x6a1b0 movzbl %al, %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x6a1b0 movzbl %al, %eax movl %eax, -0x24(%rbp) movl $0x0, -0x20(%rbp) movl -0x20(%rbp), %eax movq -0x10(%rbp), %rcx movq (%rcx), %rcx cmpl 0x8(%rcx), %eax jge 0x79b71 movq -0x10(%rbp), %rax addq $0x46a0, %rax # imm = 0x46A0 movslq -0x20(%rbp), %rcx imulq $0x60, %rcx, %rcx addq %rcx, %rax movl (%rax), %eax cmpl -0x1c(%rbp), %eax jne 0x79b64 jmp 0x79b71 jmp 0x79b66 movl -0x20(%rbp), %eax addl $0x1, %eax movl %eax, -0x20(%rbp) jmp 0x79b37 movl -0x20(%rbp), %eax movq -0x10(%rbp), %rcx movq (%rcx), %rcx cmpl 0x8(%rcx), %eax jne 0x79b8c movl $0x0, -0x4(%rbp) jmp 0x79d72 movl -0x24(%rbp), %ecx sarl $0x4, %ecx movq -0x10(%rbp), %rax addq $0x46a0, %rax # imm = 0x46A0 movslq -0x20(%rbp), %rdx imulq $0x60, %rdx, %rdx addq %rdx, %rax movl %ecx, 0x10(%rax) movq -0x10(%rbp), %rax addq $0x46a0, %rax # imm = 0x46A0 movslq -0x20(%rbp), %rcx imulq $0x60, %rcx, %rcx addq %rcx, %rax cmpl $0x3, 0x10(%rax) jle 0x79bd9 leaq 0x170ee(%rip), %rdi # 0x90cba callq 0x66030 movl %eax, -0x4(%rbp) jmp 0x79d72 movl -0x24(%rbp), %ecx andl $0xf, %ecx movq -0x10(%rbp), %rax addq $0x46a0, %rax # imm = 0x46A0 movslq -0x20(%rbp), %rdx imulq $0x60, %rdx, %rdx addq %rdx, %rax movl %ecx, 0x14(%rax) movq -0x10(%rbp), %rax addq $0x46a0, %rax # imm = 0x46A0 movslq -0x20(%rbp), %rcx imulq $0x60, %rcx, %rcx addq %rcx, %rax cmpl $0x3, 0x14(%rax) jle 0x79c26 leaq 0x170ad(%rip), %rdi # 0x90cc6 callq 0x66030 movl %eax, -0x4(%rbp) jmp 0x79d72 movl -0x20(%rbp), %edx movq -0x10(%rbp), %rax movslq -0x14(%rbp), %rcx movl %edx, 0x4858(%rax,%rcx,4) movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0x79af9 movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x6a1b0 movzbl %al, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x4834(%rax) movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x6a1b0 movzbl %al, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x4838(%rax) movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x6a1b0 movzbl %al, %eax movl %eax, -0x28(%rbp) movl -0x28(%rbp), %ecx sarl $0x4, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x483c(%rax) movl -0x28(%rbp), %ecx andl $0xf, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x4840(%rax) movq -0x10(%rbp), %rax cmpl $0x0, 0x4830(%rax) je 0x79d14 movq -0x10(%rbp), %rax cmpl $0x3f, 0x4834(%rax) jg 0x79d01 movq -0x10(%rbp), %rax cmpl $0x3f, 0x4838(%rax) jg 0x79d01 movq -0x10(%rbp), %rax movl 0x4834(%rax), %eax movq -0x10(%rbp), %rcx cmpl 0x4838(%rcx), %eax jg 0x79d01 movq -0x10(%rbp), %rax cmpl $0xd, 0x483c(%rax) jg 0x79d01 movq -0x10(%rbp), %rax cmpl $0xd, 0x4840(%rax) jle 0x79d12 leaq 0x16fca(%rip), %rdi # 0x90cd2 callq 0x66030 movl %eax, -0x4(%rbp) jmp 0x79d72 jmp 0x79d6b movq -0x10(%rbp), %rax cmpl $0x0, 0x4834(%rax) je 0x79d32 leaq 0x16faa(%rip), %rdi # 0x90cd2 callq 0x66030 movl %eax, -0x4(%rbp) jmp 0x79d72 movq -0x10(%rbp), %rax cmpl $0x0, 0x483c(%rax) jne 0x79d4c movq -0x10(%rbp), %rax cmpl $0x0, 0x4840(%rax) je 0x79d5d leaq 0x16f7f(%rip), %rdi # 0x90cd2 callq 0x66030 movl %eax, -0x4(%rbp) jmp 0x79d72 movq -0x10(%rbp), %rax movl $0x3f, 0x4838(%rax) movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
stbi__process_scan_header: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rdi, [rax] call stbi__get16be mov [rbp+var_18], eax mov rax, [rbp+var_10] mov rdi, [rax] call stbi__get8 movzx ecx, al mov rax, [rbp+var_10] mov [rax+4854h], ecx mov rax, [rbp+var_10] cmp dword ptr [rax+4854h], 1 jl short loc_79AB4 mov rax, [rbp+var_10] cmp dword ptr [rax+4854h], 4 jg short loc_79AB4 mov rax, [rbp+var_10] mov eax, [rax+4854h] mov rcx, [rbp+var_10] mov rcx, [rcx] cmp eax, [rcx+8] jle short loc_79AC8 loc_79AB4: lea rdi, aBadSosComponen; "bad SOS component count" call stbi__err mov [rbp+var_4], eax jmp loc_79D72 loc_79AC8: mov eax, [rbp+var_18] mov rcx, [rbp+var_10] mov ecx, [rcx+4854h] shl ecx, 1 add ecx, 6 cmp eax, ecx jz short loc_79AF2 lea rdi, aBadSosLen; "bad SOS len" call stbi__err mov [rbp+var_4], eax jmp loc_79D72 loc_79AF2: mov [rbp+var_14], 0 loc_79AF9: mov eax, [rbp+var_14] mov rcx, [rbp+var_10] cmp eax, [rcx+4854h] jge loc_79C46 mov rax, [rbp+var_10] mov rdi, [rax] call stbi__get8 movzx eax, al mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov rdi, [rax] call stbi__get8 movzx eax, al mov [rbp+var_24], eax mov [rbp+var_20], 0 loc_79B37: mov eax, [rbp+var_20] mov rcx, [rbp+var_10] mov rcx, [rcx] cmp eax, [rcx+8] jge short loc_79B71 mov rax, [rbp+var_10] add rax, 46A0h movsxd rcx, [rbp+var_20] imul rcx, 60h ; '`' add rax, rcx mov eax, [rax] cmp eax, [rbp+var_1C] jnz short loc_79B64 jmp short loc_79B71 loc_79B64: jmp short $+2 loc_79B66: mov eax, [rbp+var_20] add eax, 1 mov [rbp+var_20], eax jmp short loc_79B37 loc_79B71: mov eax, [rbp+var_20] mov rcx, [rbp+var_10] mov rcx, [rcx] cmp eax, [rcx+8] jnz short loc_79B8C mov [rbp+var_4], 0 jmp loc_79D72 loc_79B8C: mov ecx, [rbp+var_24] sar ecx, 4 mov rax, [rbp+var_10] add rax, 46A0h movsxd rdx, [rbp+var_20] imul rdx, 60h ; '`' add rax, rdx mov [rax+10h], ecx mov rax, [rbp+var_10] add rax, 46A0h movsxd rcx, [rbp+var_20] imul rcx, 60h ; '`' add rax, rcx cmp dword ptr [rax+10h], 3 jle short loc_79BD9 lea rdi, aBadDcHuff; "bad DC huff" call stbi__err mov [rbp+var_4], eax jmp loc_79D72 loc_79BD9: mov ecx, [rbp+var_24] and ecx, 0Fh mov rax, [rbp+var_10] add rax, 46A0h movsxd rdx, [rbp+var_20] imul rdx, 60h ; '`' add rax, rdx mov [rax+14h], ecx mov rax, [rbp+var_10] add rax, 46A0h movsxd rcx, [rbp+var_20] imul rcx, 60h ; '`' add rax, rcx cmp dword ptr [rax+14h], 3 jle short loc_79C26 lea rdi, aBadAcHuff; "bad AC huff" call stbi__err mov [rbp+var_4], eax jmp loc_79D72 loc_79C26: mov edx, [rbp+var_20] mov rax, [rbp+var_10] movsxd rcx, [rbp+var_14] mov [rax+rcx*4+4858h], edx mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax jmp loc_79AF9 loc_79C46: mov rax, [rbp+var_10] mov rdi, [rax] call stbi__get8 movzx ecx, al mov rax, [rbp+var_10] mov [rax+4834h], ecx mov rax, [rbp+var_10] mov rdi, [rax] call stbi__get8 movzx ecx, al mov rax, [rbp+var_10] mov [rax+4838h], ecx mov rax, [rbp+var_10] mov rdi, [rax] call stbi__get8 movzx eax, al mov [rbp+var_28], eax mov ecx, [rbp+var_28] sar ecx, 4 mov rax, [rbp+var_10] mov [rax+483Ch], ecx mov ecx, [rbp+var_28] and ecx, 0Fh mov rax, [rbp+var_10] mov [rax+4840h], ecx mov rax, [rbp+var_10] cmp dword ptr [rax+4830h], 0 jz short loc_79D14 mov rax, [rbp+var_10] cmp dword ptr [rax+4834h], 3Fh ; '?' jg short loc_79D01 mov rax, [rbp+var_10] cmp dword ptr [rax+4838h], 3Fh ; '?' jg short loc_79D01 mov rax, [rbp+var_10] mov eax, [rax+4834h] mov rcx, [rbp+var_10] cmp eax, [rcx+4838h] jg short loc_79D01 mov rax, [rbp+var_10] cmp dword ptr [rax+483Ch], 0Dh jg short loc_79D01 mov rax, [rbp+var_10] cmp dword ptr [rax+4840h], 0Dh jle short loc_79D12 loc_79D01: lea rdi, aBadSos; "bad SOS" call stbi__err mov [rbp+var_4], eax jmp short loc_79D72 loc_79D12: jmp short loc_79D6B loc_79D14: mov rax, [rbp+var_10] cmp dword ptr [rax+4834h], 0 jz short loc_79D32 lea rdi, aBadSos; "bad SOS" call stbi__err mov [rbp+var_4], eax jmp short loc_79D72 loc_79D32: mov rax, [rbp+var_10] cmp dword ptr [rax+483Ch], 0 jnz short loc_79D4C mov rax, [rbp+var_10] cmp dword ptr [rax+4840h], 0 jz short loc_79D5D loc_79D4C: lea rdi, aBadSos; "bad SOS" call stbi__err mov [rbp+var_4], eax jmp short loc_79D72 loc_79D5D: mov rax, [rbp+var_10] mov dword ptr [rax+4838h], 3Fh ; '?' loc_79D6B: mov [rbp+var_4], 1 loc_79D72: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long stbi__process_scan_header(long long a1) { unsigned __int8 v1; // al int v3; // [rsp+Ch] [rbp-24h] int j; // [rsp+10h] [rbp-20h] int v5; // [rsp+14h] [rbp-1Ch] int v6; // [rsp+18h] [rbp-18h] int i; // [rsp+1Ch] [rbp-14h] v6 = stbi__get16be(*(_QWORD *)a1); *(_DWORD *)(a1 + 18516) = (unsigned __int8)stbi__get8(*(_QWORD *)a1); if ( *(int *)(a1 + 18516) >= 1 && *(int *)(a1 + 18516) <= 4 && *(_DWORD *)(a1 + 18516) <= *(_DWORD *)(*(_QWORD *)a1 + 8LL) ) { if ( v6 != 2 * *(_DWORD *)(a1 + 18516) + 6 ) return (unsigned int)stbi__err((long long)"bad SOS len"); for ( i = 0; i < *(_DWORD *)(a1 + 18516); ++i ) { v5 = (unsigned __int8)stbi__get8(*(_QWORD *)a1); v3 = (unsigned __int8)stbi__get8(*(_QWORD *)a1); for ( j = 0; j < *(_DWORD *)(*(_QWORD *)a1 + 8LL) && *(_DWORD *)(96LL * j + a1 + 18080) != v5; ++j ) ; if ( j == *(_DWORD *)(*(_QWORD *)a1 + 8LL) ) return 0; *(_DWORD *)(96LL * j + a1 + 18080 + 16) = v3 >> 4; if ( *(int *)(96LL * j + a1 + 18080 + 16) > 3 ) return (unsigned int)stbi__err((long long)"bad DC huff"); *(_DWORD *)(96LL * j + a1 + 18080 + 20) = v3 & 0xF; if ( *(int *)(96LL * j + a1 + 18080 + 20) > 3 ) return (unsigned int)stbi__err((long long)"bad AC huff"); *(_DWORD *)(a1 + 4LL * i + 18520) = j; } *(_DWORD *)(a1 + 18484) = (unsigned __int8)stbi__get8(*(_QWORD *)a1); *(_DWORD *)(a1 + 18488) = (unsigned __int8)stbi__get8(*(_QWORD *)a1); v1 = stbi__get8(*(_QWORD *)a1); *(_DWORD *)(a1 + 18492) = (int)v1 >> 4; *(_DWORD *)(a1 + 18496) = v1 & 0xF; if ( *(_DWORD *)(a1 + 18480) ) { if ( *(int *)(a1 + 18484) > 63 || *(int *)(a1 + 18488) > 63 || *(_DWORD *)(a1 + 18484) > *(_DWORD *)(a1 + 18488) || *(int *)(a1 + 18492) > 13 || *(int *)(a1 + 18496) > 13 ) { return (unsigned int)stbi__err((long long)"bad SOS"); } } else { if ( *(_DWORD *)(a1 + 18484) || *(_DWORD *)(a1 + 18492) || *(_DWORD *)(a1 + 18496) ) return (unsigned int)stbi__err((long long)"bad SOS"); *(_DWORD *)(a1 + 18488) = 63; } return 1; } return (unsigned int)stbi__err((long long)"bad SOS component count"); }
stbi__process_scan_header: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x0016bf10 MOV dword ptr [RBP + -0x18],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x0016a1b0 MOVZX ECX,AL MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4854],ECX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4854],0x1 JL 0x00179ab4 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4854],0x4 JG 0x00179ab4 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4854] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] CMP EAX,dword ptr [RCX + 0x8] JLE 0x00179ac8 LAB_00179ab4: LEA RDI,[0x190c96] CALL 0x00166030 MOV dword ptr [RBP + -0x4],EAX JMP 0x00179d72 LAB_00179ac8: MOV EAX,dword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x4854] SHL ECX,0x1 ADD ECX,0x6 CMP EAX,ECX JZ 0x00179af2 LEA RDI,[0x190cae] CALL 0x00166030 MOV dword ptr [RBP + -0x4],EAX JMP 0x00179d72 LAB_00179af2: MOV dword ptr [RBP + -0x14],0x0 LAB_00179af9: MOV EAX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x4854] JGE 0x00179c46 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x0016a1b0 MOVZX EAX,AL MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x0016a1b0 MOVZX EAX,AL MOV dword ptr [RBP + -0x24],EAX MOV dword ptr [RBP + -0x20],0x0 LAB_00179b37: MOV EAX,dword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] CMP EAX,dword ptr [RCX + 0x8] JGE 0x00179b71 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x46a0 MOVSXD RCX,dword ptr [RBP + -0x20] IMUL RCX,RCX,0x60 ADD RAX,RCX MOV EAX,dword ptr [RAX] CMP EAX,dword ptr [RBP + -0x1c] JNZ 0x00179b64 JMP 0x00179b71 LAB_00179b64: JMP 0x00179b66 LAB_00179b66: MOV EAX,dword ptr [RBP + -0x20] ADD EAX,0x1 MOV dword ptr [RBP + -0x20],EAX JMP 0x00179b37 LAB_00179b71: MOV EAX,dword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] CMP EAX,dword ptr [RCX + 0x8] JNZ 0x00179b8c MOV dword ptr [RBP + -0x4],0x0 JMP 0x00179d72 LAB_00179b8c: MOV ECX,dword ptr [RBP + -0x24] SAR ECX,0x4 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x46a0 MOVSXD RDX,dword ptr [RBP + -0x20] IMUL RDX,RDX,0x60 ADD RAX,RDX MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x46a0 MOVSXD RCX,dword ptr [RBP + -0x20] IMUL RCX,RCX,0x60 ADD RAX,RCX CMP dword ptr [RAX + 0x10],0x3 JLE 0x00179bd9 LEA RDI,[0x190cba] CALL 0x00166030 MOV dword ptr [RBP + -0x4],EAX JMP 0x00179d72 LAB_00179bd9: MOV ECX,dword ptr [RBP + -0x24] AND ECX,0xf MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x46a0 MOVSXD RDX,dword ptr [RBP + -0x20] IMUL RDX,RDX,0x60 ADD RAX,RDX MOV dword ptr [RAX + 0x14],ECX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x46a0 MOVSXD RCX,dword ptr [RBP + -0x20] IMUL RCX,RCX,0x60 ADD RAX,RCX CMP dword ptr [RAX + 0x14],0x3 JLE 0x00179c26 LEA RDI,[0x190cc6] CALL 0x00166030 MOV dword ptr [RBP + -0x4],EAX JMP 0x00179d72 LAB_00179c26: MOV EDX,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x14] MOV dword ptr [RAX + RCX*0x4 + 0x4858],EDX MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x00179af9 LAB_00179c46: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x0016a1b0 MOVZX ECX,AL MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4834],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x0016a1b0 MOVZX ECX,AL MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4838],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x0016a1b0 MOVZX EAX,AL MOV dword ptr [RBP + -0x28],EAX MOV ECX,dword ptr [RBP + -0x28] SAR ECX,0x4 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x483c],ECX MOV ECX,dword ptr [RBP + -0x28] AND ECX,0xf MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4840],ECX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4830],0x0 JZ 0x00179d14 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4834],0x3f JG 0x00179d01 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4838],0x3f JG 0x00179d01 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4834] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x4838] JG 0x00179d01 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x483c],0xd JG 0x00179d01 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4840],0xd JLE 0x00179d12 LAB_00179d01: LEA RDI,[0x190cd2] CALL 0x00166030 MOV dword ptr [RBP + -0x4],EAX JMP 0x00179d72 LAB_00179d12: JMP 0x00179d6b LAB_00179d14: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4834],0x0 JZ 0x00179d32 LEA RDI,[0x190cd2] CALL 0x00166030 MOV dword ptr [RBP + -0x4],EAX JMP 0x00179d72 LAB_00179d32: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x483c],0x0 JNZ 0x00179d4c MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4840],0x0 JZ 0x00179d5d LAB_00179d4c: LEA RDI,[0x190cd2] CALL 0x00166030 MOV dword ptr [RBP + -0x4],EAX JMP 0x00179d72 LAB_00179d5d: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4838],0x3f LAB_00179d6b: MOV dword ptr [RBP + -0x4],0x1 LAB_00179d72: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 stbi__process_scan_header(long *param_1) { byte bVar1; byte bVar2; int iVar3; int4 uVar4; int local_28; int local_1c; int4 local_c; iVar3 = stbi__get16be(*param_1); bVar1 = stbi__get8(*param_1); *(uint *)((long)param_1 + 0x4854) = (uint)bVar1; if (((*(int *)((long)param_1 + 0x4854) < 1) || (4 < *(int *)((long)param_1 + 0x4854))) || (*(int *)(*param_1 + 8) < *(int *)((long)param_1 + 0x4854))) { local_c = stbi__err("bad SOS component count"); } else if (iVar3 == *(int *)((long)param_1 + 0x4854) * 2 + 6) { for (local_1c = 0; local_1c < *(int *)((long)param_1 + 0x4854); local_1c = local_1c + 1) { bVar1 = stbi__get8(*param_1); bVar2 = stbi__get8(*param_1); local_28 = 0; while ((local_28 < *(int *)(*param_1 + 8) && (*(uint *)(param_1 + (long)local_28 * 0xc + 0x8d4) != (uint)bVar1))) { local_28 = local_28 + 1; } if (local_28 == *(int *)(*param_1 + 8)) { return 0; } *(int *)(param_1 + (long)local_28 * 0xc + 0x8d6) = (int)(uint)bVar2 >> 4; if (3 < (int)param_1[(long)local_28 * 0xc + 0x8d6]) { uVar4 = stbi__err("bad DC huff"); return uVar4; } *(uint *)((long)param_1 + (long)local_28 * 0x60 + 0x46b4) = bVar2 & 0xf; if (3 < *(int *)((long)param_1 + (long)local_28 * 0x60 + 0x46b4)) { uVar4 = stbi__err("bad AC huff"); return uVar4; } *(int *)((long)param_1 + (long)local_1c * 4 + 0x4858) = local_28; } bVar1 = stbi__get8(*param_1); *(uint *)((long)param_1 + 0x4834) = (uint)bVar1; bVar1 = stbi__get8(*param_1); *(uint *)(param_1 + 0x907) = (uint)bVar1; bVar1 = stbi__get8(*param_1); *(int *)((long)param_1 + 0x483c) = (int)(uint)bVar1 >> 4; *(uint *)(param_1 + 0x908) = bVar1 & 0xf; if ((int)param_1[0x906] == 0) { if (*(int *)((long)param_1 + 0x4834) != 0) { uVar4 = stbi__err("bad SOS"); return uVar4; } if ((*(int *)((long)param_1 + 0x483c) != 0) || ((int)param_1[0x908] != 0)) { uVar4 = stbi__err("bad SOS"); return uVar4; } *(int4 *)(param_1 + 0x907) = 0x3f; } else if ((((0x3f < *(int *)((long)param_1 + 0x4834)) || (0x3f < (int)param_1[0x907])) || ((int)param_1[0x907] < *(int *)((long)param_1 + 0x4834))) || ((0xd < *(int *)((long)param_1 + 0x483c) || (0xd < (int)param_1[0x908])))) { uVar4 = stbi__err("bad SOS"); return uVar4; } local_c = 1; } else { local_c = stbi__err("bad SOS len"); } return local_c; }
4,685
resize_ic_hash
bluesky950520[P]quickjs/quickjs.c
int resize_ic_hash(JSContext *ctx, JSInlineCache *ic) { uint32_t new_capacity, i, h; JSInlineCacheHashSlot *ch, *ch_next; JSInlineCacheHashSlot **new_hash; new_capacity = 1 << (ic->hash_bits + 1); new_hash = js_mallocz(ctx, sizeof(ic->hash[0]) * new_capacity); if (unlikely(!new_hash)) goto fail; ic->hash_bits += 1; for (i = 0; i < ic->capacity; i++) { for (ch = ic->hash[i]; ch != NULL; ch = ch_next) { h = get_index_hash(ch->atom, ic->hash_bits); ch_next = ch->next; ch->next = new_hash[h]; new_hash[h] = ch; } } js_free(ctx, ic->hash); ic->hash = new_hash; ic->capacity = new_capacity; return 0; fail: return -1; }
O0
c
resize_ic_hash: subq $0x48, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq 0x28(%rsp), %rax movl 0x8(%rax), %ecx addl $0x1, %ecx movl $0x1, %eax shll %cl, %eax movl %eax, 0x24(%rsp) movq 0x30(%rsp), %rdi movl 0x24(%rsp), %eax movl %eax, %esi shlq $0x3, %rsi callq 0x21d30 movq %rax, (%rsp) cmpq $0x0, (%rsp) setne %al xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xb10ec jmp 0xb11e8 movq 0x28(%rsp), %rax movl 0x8(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x8(%rax) movl $0x0, 0x20(%rsp) movl 0x20(%rsp), %eax movq 0x28(%rsp), %rcx cmpl 0x4(%rcx), %eax jae 0xb11b2 movq 0x28(%rsp), %rax movq 0x10(%rax), %rax movl 0x20(%rsp), %ecx movq (%rax,%rcx,8), %rax movq %rax, 0x10(%rsp) cmpq $0x0, 0x10(%rsp) je 0xb11a0 movq 0x10(%rsp), %rax movl (%rax), %ecx movq 0x28(%rsp), %rax movl 0x8(%rax), %eax movl %ecx, 0x44(%rsp) movl %eax, 0x40(%rsp) imull $0x9e370001, 0x44(%rsp), %eax # imm = 0x9E370001 movl $0x20, %ecx subl 0x40(%rsp), %ecx shrl %cl, %eax movl %eax, 0x1c(%rsp) movq 0x10(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x8(%rsp) movq (%rsp), %rax movl 0x1c(%rsp), %ecx movq (%rax,%rcx,8), %rcx movq 0x10(%rsp), %rax movq %rcx, 0x8(%rax) movq 0x10(%rsp), %rdx movq (%rsp), %rax movl 0x1c(%rsp), %ecx movq %rdx, (%rax,%rcx,8) movq 0x8(%rsp), %rax movq %rax, 0x10(%rsp) jmp 0xb112a jmp 0xb11a2 movl 0x20(%rsp), %eax addl $0x1, %eax movl %eax, 0x20(%rsp) jmp 0xb1102 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rax movq 0x10(%rax), %rsi callq 0x21db0 movq (%rsp), %rcx movq 0x28(%rsp), %rax movq %rcx, 0x10(%rax) movl 0x24(%rsp), %ecx movq 0x28(%rsp), %rax movl %ecx, 0x4(%rax) movl $0x0, 0x3c(%rsp) jmp 0xb11f0 movl $0xffffffff, 0x3c(%rsp) # imm = 0xFFFFFFFF movl 0x3c(%rsp), %eax addq $0x48, %rsp retq nopl (%rax)
resize_ic_hash: sub rsp, 48h mov [rsp+48h+var_18], rdi mov [rsp+48h+var_20], rsi mov rax, [rsp+48h+var_20] mov ecx, [rax+8] add ecx, 1 mov eax, 1 shl eax, cl mov [rsp+48h+var_24], eax mov rdi, [rsp+48h+var_18] mov eax, [rsp+48h+var_24] mov esi, eax shl rsi, 3 call js_mallocz mov [rsp+48h+var_48], rax cmp [rsp+48h+var_48], 0 setnz al xor al, 0FFh xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_B10EC jmp loc_B11E8 loc_B10EC: mov rax, [rsp+48h+var_20] mov ecx, [rax+8] add ecx, 1 mov [rax+8], ecx mov [rsp+48h+var_28], 0 loc_B1102: mov eax, [rsp+48h+var_28] mov rcx, [rsp+48h+var_20] cmp eax, [rcx+4] jnb loc_B11B2 mov rax, [rsp+48h+var_20] mov rax, [rax+10h] mov ecx, [rsp+48h+var_28] mov rax, [rax+rcx*8] mov [rsp+48h+var_38], rax loc_B112A: cmp [rsp+48h+var_38], 0 jz short loc_B11A0 mov rax, [rsp+48h+var_38] mov ecx, [rax] mov rax, [rsp+48h+var_20] mov eax, [rax+8] mov [rsp+48h+var_4], ecx mov [rsp+48h+var_8], eax imul eax, [rsp+48h+var_4], 9E370001h mov ecx, 20h ; ' ' sub ecx, [rsp+48h+var_8] shr eax, cl mov [rsp+48h+var_2C], eax mov rax, [rsp+48h+var_38] mov rax, [rax+8] mov [rsp+48h+var_40], rax mov rax, [rsp+48h+var_48] mov ecx, [rsp+48h+var_2C] mov rcx, [rax+rcx*8] mov rax, [rsp+48h+var_38] mov [rax+8], rcx mov rdx, [rsp+48h+var_38] mov rax, [rsp+48h+var_48] mov ecx, [rsp+48h+var_2C] mov [rax+rcx*8], rdx mov rax, [rsp+48h+var_40] mov [rsp+48h+var_38], rax jmp short loc_B112A loc_B11A0: jmp short $+2 loc_B11A2: mov eax, [rsp+48h+var_28] add eax, 1 mov [rsp+48h+var_28], eax jmp loc_B1102 loc_B11B2: mov rdi, [rsp+48h+var_18] mov rax, [rsp+48h+var_20] mov rsi, [rax+10h] call js_free mov rcx, [rsp+48h+var_48] mov rax, [rsp+48h+var_20] mov [rax+10h], rcx mov ecx, [rsp+48h+var_24] mov rax, [rsp+48h+var_20] mov [rax+4], ecx mov [rsp+48h+var_C], 0 jmp short loc_B11F0 loc_B11E8: mov [rsp+48h+var_C], 0FFFFFFFFh loc_B11F0: mov eax, [rsp+48h+var_C] add rsp, 48h retn
long long resize_ic_hash(long long a1, long long a2) { long long v3; // [rsp+0h] [rbp-48h] long long v4; // [rsp+8h] [rbp-40h] long long j; // [rsp+10h] [rbp-38h] unsigned int v6; // [rsp+1Ch] [rbp-2Ch] unsigned int i; // [rsp+20h] [rbp-28h] unsigned int v8; // [rsp+24h] [rbp-24h] v8 = 1 << (*(_BYTE *)(a2 + 8) + 1); v3 = js_mallocz(a1, 8LL * v8); if ( v3 ) { ++*(_DWORD *)(a2 + 8); for ( i = 0; i < *(_DWORD *)(a2 + 4); ++i ) { for ( j = *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8LL * i); j; j = v4 ) { v6 = (unsigned int)(-1640562687 * *(_DWORD *)j) >> (32 - *(_DWORD *)(a2 + 8)); v4 = *(_QWORD *)(j + 8); *(_QWORD *)(j + 8) = *(_QWORD *)(v3 + 8LL * v6); *(_QWORD *)(v3 + 8LL * v6) = j; } } js_free(a1, *(_QWORD *)(a2 + 16)); *(_QWORD *)(a2 + 16) = v3; *(_DWORD *)(a2 + 4) = v8; return 0; } else { return (unsigned int)-1; } }
resize_ic_hash: SUB RSP,0x48 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV RAX,qword ptr [RSP + 0x28] MOV ECX,dword ptr [RAX + 0x8] ADD ECX,0x1 MOV EAX,0x1 SHL EAX,CL MOV dword ptr [RSP + 0x24],EAX MOV RDI,qword ptr [RSP + 0x30] MOV EAX,dword ptr [RSP + 0x24] MOV ESI,EAX SHL RSI,0x3 CALL 0x00121d30 MOV qword ptr [RSP],RAX CMP qword ptr [RSP],0x0 SETNZ AL XOR AL,0xff XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001b10ec JMP 0x001b11e8 LAB_001b10ec: MOV RAX,qword ptr [RSP + 0x28] MOV ECX,dword ptr [RAX + 0x8] ADD ECX,0x1 MOV dword ptr [RAX + 0x8],ECX MOV dword ptr [RSP + 0x20],0x0 LAB_001b1102: MOV EAX,dword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x28] CMP EAX,dword ptr [RCX + 0x4] JNC 0x001b11b2 MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x10] MOV ECX,dword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x10],RAX LAB_001b112a: CMP qword ptr [RSP + 0x10],0x0 JZ 0x001b11a0 MOV RAX,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RSP + 0x28] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RSP + 0x44],ECX MOV dword ptr [RSP + 0x40],EAX IMUL EAX,dword ptr [RSP + 0x44],-0x61c8ffff MOV ECX,0x20 SUB ECX,dword ptr [RSP + 0x40] SHR EAX,CL MOV dword ptr [RSP + 0x1c],EAX MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP] MOV ECX,dword ptr [RSP + 0x1c] MOV RCX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV RDX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP] MOV ECX,dword ptr [RSP + 0x1c] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x10],RAX JMP 0x001b112a LAB_001b11a0: JMP 0x001b11a2 LAB_001b11a2: MOV EAX,dword ptr [RSP + 0x20] ADD EAX,0x1 MOV dword ptr [RSP + 0x20],EAX JMP 0x001b1102 LAB_001b11b2: MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RAX + 0x10] CALL 0x00121db0 MOV RCX,qword ptr [RSP] MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x10],RCX MOV ECX,dword ptr [RSP + 0x24] MOV RAX,qword ptr [RSP + 0x28] MOV dword ptr [RAX + 0x4],ECX MOV dword ptr [RSP + 0x3c],0x0 JMP 0x001b11f0 LAB_001b11e8: MOV dword ptr [RSP + 0x3c],0xffffffff LAB_001b11f0: MOV EAX,dword ptr [RSP + 0x3c] ADD RSP,0x48 RET
int4 resize_ic_hash(int8 param_1,long param_2) { int *piVar1; uint uVar2; uint uVar3; long lVar4; int *local_38; uint local_28; int4 local_c; uVar2 = 1 << ((char)*(int4 *)(param_2 + 8) + 1U & 0x1f); lVar4 = js_mallocz(param_1,(ulong)uVar2 << 3); if (lVar4 == 0) { local_c = 0xffffffff; } else { *(int *)(param_2 + 8) = *(int *)(param_2 + 8) + 1; for (local_28 = 0; local_28 < *(uint *)(param_2 + 4); local_28 = local_28 + 1) { local_38 = *(int **)(*(long *)(param_2 + 0x10) + (ulong)local_28 * 8); while (local_38 != (int *)0x0) { uVar3 = (uint)(*local_38 * -0x61c8ffff) >> (0x20U - (char)*(int4 *)(param_2 + 8) & 0x1f); piVar1 = *(int **)(local_38 + 2); *(int8 *)(local_38 + 2) = *(int8 *)(lVar4 + (ulong)uVar3 * 8); *(int **)(lVar4 + (ulong)uVar3 * 8) = local_38; local_38 = piVar1; } } js_free(param_1,*(int8 *)(param_2 + 0x10)); *(long *)(param_2 + 0x10) = lVar4; *(uint *)(param_2 + 4) = uVar2; local_c = 0; } return local_c; }
4,686
my_rw_wrlock
eloqsql/mysys/thr_rwlock.c
int my_rw_wrlock(my_rw_lock_t *rwp) { pthread_mutex_lock(&rwp->lock); rwp->waiters++; /* another writer queued */ my_rw_lock_assert_not_write_owner(rwp); while (rwp->state) pthread_cond_wait(&rwp->writers, &rwp->lock); rwp->state = -1; rwp->waiters--; #ifdef SAFE_MUTEX rwp->write_thread= pthread_self(); #endif pthread_mutex_unlock(&rwp->lock); return(0); }
O0
c
my_rw_wrlock: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x2a220 movq -0x8(%rbp), %rax movl 0x8c(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x8c(%rax) movq -0x8(%rbp), %rax cmpl $0x0, 0x88(%rax) je 0xfa088 movq -0x8(%rbp), %rdi addq $0x58, %rdi movq -0x8(%rbp), %rsi callq 0x2a400 jmp 0xfa068 movq -0x8(%rbp), %rax movl $0xffffffff, 0x88(%rax) # imm = 0xFFFFFFFF movq -0x8(%rbp), %rax movl 0x8c(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x8c(%rax) movq -0x8(%rbp), %rdi callq 0x2a1f0 xorl %eax, %eax addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
my_rw_wrlock: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] call _pthread_mutex_lock mov rax, [rbp+var_8] mov ecx, [rax+8Ch] add ecx, 1 mov [rax+8Ch], ecx loc_FA068: mov rax, [rbp+var_8] cmp dword ptr [rax+88h], 0 jz short loc_FA088 mov rdi, [rbp+var_8] add rdi, 58h ; 'X' mov rsi, [rbp+var_8] call _pthread_cond_wait jmp short loc_FA068 loc_FA088: mov rax, [rbp+var_8] mov dword ptr [rax+88h], 0FFFFFFFFh mov rax, [rbp+var_8] mov ecx, [rax+8Ch] add ecx, 0FFFFFFFFh mov [rax+8Ch], ecx mov rdi, [rbp+var_8] call _pthread_mutex_unlock xor eax, eax add rsp, 10h pop rbp retn
long long my_rw_wrlock(long long a1) { pthread_mutex_lock(a1); ++*(_DWORD *)(a1 + 140); while ( *(_DWORD *)(a1 + 136) ) pthread_cond_wait(a1 + 88, a1); *(_DWORD *)(a1 + 136) = -1; --*(_DWORD *)(a1 + 140); pthread_mutex_unlock(a1); return 0LL; }
my_rw_wrlock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012a220 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x8c] ADD ECX,0x1 MOV dword ptr [RAX + 0x8c],ECX LAB_001fa068: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x88],0x0 JZ 0x001fa088 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x58 MOV RSI,qword ptr [RBP + -0x8] CALL 0x0012a400 JMP 0x001fa068 LAB_001fa088: MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x88],0xffffffff MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x8c] ADD ECX,-0x1 MOV dword ptr [RAX + 0x8c],ECX MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012a1f0 XOR EAX,EAX ADD RSP,0x10 POP RBP RET
int8 my_rw_wrlock(pthread_mutex_t *param_1) { pthread_mutex_lock(param_1); *(int *)((long)param_1 + 0x8c) = *(int *)((long)param_1 + 0x8c) + 1; while (*(int *)((long)param_1 + 0x88) != 0) { pthread_cond_wait((pthread_cond_t *)((long)param_1 + 0x58),param_1); } *(int4 *)((long)param_1 + 0x88) = 0xffffffff; *(int *)((long)param_1 + 0x8c) = *(int *)((long)param_1 + 0x8c) + -1; pthread_mutex_unlock(param_1); return 0; }
4,687
my_charset_get_by_name
eloqsql/mysys/charset.c
CHARSET_INFO * my_charset_get_by_name(MY_CHARSET_LOADER *loader, const char *cs_name, uint cs_flags, myf flags) { uint cs_number; CHARSET_INFO *cs; DBUG_ENTER("get_charset_by_csname"); DBUG_PRINT("enter",("name: '%s'", cs_name)); my_pthread_once(&charsets_initialized, init_available_charsets); cs_number= get_charset_number(cs_name, cs_flags, flags); cs= cs_number ? get_internal_charset(loader, cs_number, flags) : NULL; if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_name, index_file); } DBUG_RETURN(cs); }
O0
c
my_charset_get_by_name: pushq %rbp movq %rsp, %rbp subq $0x260, %rsp # imm = 0x260 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x228(%rbp) movq %rsi, -0x230(%rbp) movl %edx, -0x234(%rbp) movq %rcx, -0x240(%rbp) jmp 0xdc4b5 leaq 0xba6278(%rip), %rdi # 0xc82734 leaq -0xae3(%rip), %rsi # 0xdb9e0 callq 0x2a240 movq -0x230(%rbp), %rdi movl -0x234(%rbp), %esi movq -0x240(%rbp), %rdx callq 0xdbca0 movl %eax, -0x244(%rbp) cmpl $0x0, -0x244(%rbp) je 0xdc512 movq -0x228(%rbp), %rdi movl -0x244(%rbp), %esi movq -0x240(%rbp), %rdx callq 0xdc030 movq %rax, -0x258(%rbp) jmp 0xdc51d xorl %eax, %eax movq %rax, -0x258(%rbp) jmp 0xdc51d movq -0x258(%rbp), %rax movq %rax, -0x250(%rbp) cmpq $0x0, -0x250(%rbp) jne 0xdc580 movq -0x240(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0xdc580 leaq -0x220(%rbp), %rdi callq 0xdb6a0 movq %rax, %rdi leaq 0x7797e(%rip), %rsi # 0x153eda callq 0x2a730 movq -0x230(%rbp), %rdx leaq -0x220(%rbp), %rcx movl $0x16, %edi movl $0x4, %esi movb $0x0, %al callq 0xefb70 jmp 0xdc582 movq -0x250(%rbp), %rax movq %rax, -0x260(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xdc5b2 movq -0x260(%rbp), %rax addq $0x260, %rsp # imm = 0x260 popq %rbp retq callq 0x2a270 nopw (%rax,%rax)
my_charset_get_by_name: push rbp mov rbp, rsp sub rsp, 260h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_228], rdi mov [rbp+var_230], rsi mov [rbp+var_234], edx mov [rbp+var_240], rcx jmp short $+2 loc_DC4B5: lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once mov rdi, [rbp+var_230] mov esi, [rbp+var_234] mov rdx, [rbp+var_240] call get_charset_number mov [rbp+var_244], eax cmp [rbp+var_244], 0 jz short loc_DC512 mov rdi, [rbp+var_228] mov esi, [rbp+var_244] mov rdx, [rbp+var_240] call get_internal_charset mov [rbp+var_258], rax jmp short loc_DC51D loc_DC512: xor eax, eax mov [rbp+var_258], rax jmp short $+2 loc_DC51D: mov rax, [rbp+var_258] mov [rbp+var_250], rax cmp [rbp+var_250], 0 jnz short loc_DC580 mov rax, [rbp+var_240] and rax, 10h cmp rax, 0 jz short loc_DC580 lea rdi, [rbp+var_220] call get_charsets_dir mov rdi, rax lea rsi, aIndexXml; "Index.xml" call _stpcpy mov rdx, [rbp+var_230] lea rcx, [rbp+var_220] mov edi, 16h mov esi, 4 mov al, 0 call my_error loc_DC580: jmp short $+2 loc_DC582: mov rax, [rbp+var_250] mov [rbp+var_260], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_DC5B2 mov rax, [rbp+var_260] add rsp, 260h pop rbp retn loc_DC5B2: call ___stack_chk_fail
long long my_charset_get_by_name(long long a1, long long a2, unsigned int a3, long long a4) { long long charsets_dir; // rax int v5; // r8d int v6; // r9d long long internal_charset; // [rsp+8h] [rbp-258h] unsigned int charset_number; // [rsp+1Ch] [rbp-244h] _BYTE v12[536]; // [rsp+40h] [rbp-220h] BYREF unsigned long long v13; // [rsp+258h] [rbp-8h] v13 = __readfsqword(0x28u); pthread_once(&charsets_initialized, init_available_charsets); charset_number = get_charset_number(a2, a3, a4); if ( charset_number ) internal_charset = get_internal_charset(a1, charset_number, a4); else internal_charset = 0LL; if ( !internal_charset && (a4 & 0x10) != 0 ) { charsets_dir = get_charsets_dir((long long)v12); stpcpy(charsets_dir, "Index.xml"); my_error(22, 4, a2, (unsigned int)v12, v5, v6); } return internal_charset; }
my_charset_get_by_name: PUSH RBP MOV RBP,RSP SUB RSP,0x260 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x228],RDI MOV qword ptr [RBP + -0x230],RSI MOV dword ptr [RBP + -0x234],EDX MOV qword ptr [RBP + -0x240],RCX JMP 0x001dc4b5 LAB_001dc4b5: LEA RDI,[0xd82734] LEA RSI,[0x1db9e0] CALL 0x0012a240 MOV RDI,qword ptr [RBP + -0x230] MOV ESI,dword ptr [RBP + -0x234] MOV RDX,qword ptr [RBP + -0x240] CALL 0x001dbca0 MOV dword ptr [RBP + -0x244],EAX CMP dword ptr [RBP + -0x244],0x0 JZ 0x001dc512 MOV RDI,qword ptr [RBP + -0x228] MOV ESI,dword ptr [RBP + -0x244] MOV RDX,qword ptr [RBP + -0x240] CALL 0x001dc030 MOV qword ptr [RBP + -0x258],RAX JMP 0x001dc51d LAB_001dc512: XOR EAX,EAX MOV qword ptr [RBP + -0x258],RAX JMP 0x001dc51d LAB_001dc51d: MOV RAX,qword ptr [RBP + -0x258] MOV qword ptr [RBP + -0x250],RAX CMP qword ptr [RBP + -0x250],0x0 JNZ 0x001dc580 MOV RAX,qword ptr [RBP + -0x240] AND RAX,0x10 CMP RAX,0x0 JZ 0x001dc580 LEA RDI,[RBP + -0x220] CALL 0x001db6a0 MOV RDI,RAX LEA RSI,[0x253eda] CALL 0x0012a730 MOV RDX,qword ptr [RBP + -0x230] LEA RCX,[RBP + -0x220] MOV EDI,0x16 MOV ESI,0x4 MOV AL,0x0 CALL 0x001efb70 LAB_001dc580: JMP 0x001dc582 LAB_001dc582: MOV RAX,qword ptr [RBP + -0x250] MOV qword ptr [RBP + -0x260],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001dc5b2 MOV RAX,qword ptr [RBP + -0x260] ADD RSP,0x260 POP RBP RET LAB_001dc5b2: CALL 0x0012a270
long my_charset_get_by_name(int8 param_1,int8 param_2,int4 param_3,ulong param_4) { int iVar1; char *__dest; long in_FS_OFFSET; long local_260; int1 local_228 [536]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); pthread_once(&charsets_initialized,init_available_charsets); iVar1 = get_charset_number(param_2,param_3,param_4); if (iVar1 == 0) { local_260 = 0; } else { local_260 = get_internal_charset(param_1,iVar1,param_4); } if ((local_260 == 0) && ((param_4 & 0x10) != 0)) { __dest = (char *)get_charsets_dir(local_228); stpcpy(__dest,"Index.xml"); my_error(0x16,4,param_2,local_228); } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_260; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
4,688
testing::AssertionResult::operator!() const
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest-assertion-result.cc
AssertionResult AssertionResult::operator!() const { AssertionResult negation(!success_); if (message_.get() != nullptr) negation << *message_; return negation; }
O1
cpp
testing::AssertionResult::operator!() const: pushq %r14 pushq %rbx pushq %rax movq %rdi, %r14 movb (%rsi), %al xorb $0x1, %al movb %al, (%rdi) movq $0x0, 0x8(%rdi) movq 0x8(%rsi), %rsi testq %rsi, %rsi je 0x1208a leaq 0x8(%r14), %rbx movq %r14, %rdi callq 0x102b0 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %r14 movq (%rbx), %rsi testq %rsi, %rsi je 0x120a8 movq %rbx, %rdi callq 0xf756 movq $0x0, (%rbx) movq %r14, %rdi callq 0x99a0
_ZNK7testing15AssertionResultntEv: push r14 push rbx push rax; __int64 mov r14, rdi mov al, [rsi] xor al, 1 mov [rdi], al mov qword ptr [rdi+8], 0 mov rsi, [rsi+8] test rsi, rsi jz short loc_1208A lea rbx, [r14+8] mov rdi, r14; this call _ZN7testing15AssertionResultlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::AssertionResult::operator<<<std::string>(std::string const&) loc_1208A: mov rax, r14 add rsp, 8 pop rbx pop r14 retn mov r14, rax mov rsi, [rbx] test rsi, rsi jz short loc_120A8 mov rdi, rbx call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) loc_120A8: mov qword ptr [rbx], 0 mov rdi, r14 call __Unwind_Resume
testing::AssertionResult * testing::AssertionResult::operator!(testing::AssertionResult *this, long long a2) { _QWORD *v2; // rsi *(_BYTE *)this = *(_BYTE *)a2 ^ 1; *((_QWORD *)this + 1) = 0LL; v2 = *(_QWORD **)(a2 + 8); if ( v2 ) testing::AssertionResult::operator<<<std::string>(this, v2); return this; }
operator!: PUSH R14 PUSH RBX PUSH RAX MOV R14,RDI MOV AL,byte ptr [RSI] XOR AL,0x1 MOV byte ptr [RDI],AL MOV qword ptr [RDI + 0x8],0x0 MOV RSI,qword ptr [RSI + 0x8] TEST RSI,RSI JZ 0x0011208a LEA RBX,[R14 + 0x8] LAB_00112082: MOV RDI,R14 CALL 0x001102b0 LAB_0011208a: MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 RET
/* testing::AssertionResult::TEMPNAMEPLACEHOLDERVALUE() const */ AssertionResult * __thiscall testing::AssertionResult::operator!(AssertionResult *this) { byte *in_RSI; *this = (AssertionResult)(*in_RSI ^ 1); *(int8 *)(this + 8) = 0; if (*(string **)(in_RSI + 8) != (string *)0x0) { /* try { // try from 00112082 to 00112089 has its CatchHandler @ 00112095 */ operator<<(this,*(string **)(in_RSI + 8)); } return this; }
4,689
ma_net_flush
eloqsql/libmariadb/libmariadb/ma_net.c
int ma_net_flush(NET *net) { int error=0; /* don't flush if pipelined query is in progress */ if (net->extension->multi_status > COM_MULTI_OFF) return 0; if (net->buff != net->write_pos) { error=ma_net_real_write(net,(char*) net->buff, (size_t) (net->write_pos - net->buff)); net->write_pos=net->buff; } if (net->compress) net->pkt_nr= net->compress_pkt_nr; return(error); }
O0
c
ma_net_flush: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movl $0x0, -0x14(%rbp) movq -0x10(%rbp), %rax movq 0x2a0(%rax), %rax cmpl $0x0, (%rax) jbe 0x6ca1c movl $0x0, -0x4(%rbp) jmp 0x6ca86 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq -0x10(%rbp), %rcx cmpq 0x18(%rcx), %rax je 0x6ca65 movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rax movq 0x8(%rax), %rsi movq -0x10(%rbp), %rax movq 0x18(%rax), %rdx movq -0x10(%rbp), %rax movq 0x8(%rax), %rax subq %rax, %rdx callq 0x6ca90 movl %eax, -0x14(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x10(%rbp), %rax cmpb $0x0, 0x84(%rax) je 0x6ca80 movq -0x10(%rbp), %rax movl 0x64(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x60(%rax) movl -0x14(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nop
ma_net_flush: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_14], 0 mov rax, [rbp+var_10] mov rax, [rax+2A0h] cmp dword ptr [rax], 0 jbe short loc_6CA1C mov [rbp+var_4], 0 jmp short loc_6CA86 loc_6CA1C: mov rax, [rbp+var_10] mov rax, [rax+8] mov rcx, [rbp+var_10] cmp rax, [rcx+18h] jz short loc_6CA65 mov rdi, [rbp+var_10] mov rax, [rbp+var_10] mov rsi, [rax+8] mov rax, [rbp+var_10] mov rdx, [rax+18h] mov rax, [rbp+var_10] mov rax, [rax+8] sub rdx, rax call ma_net_real_write mov [rbp+var_14], eax mov rax, [rbp+var_10] mov rcx, [rax+8] mov rax, [rbp+var_10] mov [rax+18h], rcx loc_6CA65: mov rax, [rbp+var_10] cmp byte ptr [rax+84h], 0 jz short loc_6CA80 mov rax, [rbp+var_10] mov ecx, [rax+64h] mov rax, [rbp+var_10] mov [rax+60h], ecx loc_6CA80: mov eax, [rbp+var_14] mov [rbp+var_4], eax loc_6CA86: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long ma_net_flush(long long a1) { unsigned int v2; // [rsp+Ch] [rbp-14h] v2 = 0; if ( **(_DWORD **)(a1 + 672) ) { return 0; } else { if ( *(_QWORD *)(a1 + 8) != *(_QWORD *)(a1 + 24) ) { v2 = ma_net_real_write(a1, *(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 8)); *(_QWORD *)(a1 + 24) = *(_QWORD *)(a1 + 8); } if ( *(_BYTE *)(a1 + 132) ) *(_DWORD *)(a1 + 96) = *(_DWORD *)(a1 + 100); return v2; } }
ma_net_flush: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x2a0] CMP dword ptr [RAX],0x0 JBE 0x0016ca1c MOV dword ptr [RBP + -0x4],0x0 JMP 0x0016ca86 LAB_0016ca1c: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x18] JZ 0x0016ca65 MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] SUB RDX,RAX CALL 0x0016ca90 MOV dword ptr [RBP + -0x14],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],RCX LAB_0016ca65: MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x84],0x0 JZ 0x0016ca80 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x64] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x60],ECX LAB_0016ca80: MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x4],EAX LAB_0016ca86: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 ma_net_flush(long param_1) { int4 local_1c; int4 local_c; local_1c = 0; if (**(int **)(param_1 + 0x2a0) == 0) { if (*(long *)(param_1 + 8) != *(long *)(param_1 + 0x18)) { local_1c = ma_net_real_write(param_1,*(int8 *)(param_1 + 8), *(long *)(param_1 + 0x18) - *(long *)(param_1 + 8)); *(int8 *)(param_1 + 0x18) = *(int8 *)(param_1 + 8); } if (*(char *)(param_1 + 0x84) != '\0') { *(int4 *)(param_1 + 0x60) = *(int4 *)(param_1 + 100); } local_c = local_1c; } else { local_c = 0; } return local_c; }
4,690
minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling)
llama.cpp/common/minja/minja.hpp
std::vector<std::string> consumeTokenGroups(const std::regex & regex, SpaceHandling space_handling = SpaceHandling::Strip) { auto start = it; consumeSpaces(space_handling); std::smatch match; if (std::regex_search(it, end, match, regex) && match.position() == 0) { it += match[0].length(); std::vector<std::string> ret; for (size_t i = 0, n = match.size(); i < n; ++i) { ret.push_back(match[i].str()); } return ret; } it = start; return {}; }
O3
cpp
minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movq 0x20(%rsi), %r12 movq %rsi, %rdi movl %ecx, %esi callq 0xdfbc0 xorps %xmm0, %xmm0 leaq 0x10(%rsp), %rdx movaps %xmm0, 0x10(%rdx) movaps %xmm0, (%rdx) movq 0x18(%r14), %rsi movq 0x20(%r14), %rdi movl $0x0, (%rsp) movq %r15, %rcx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x7092a testb %al, %al je 0xde955 movq 0x28(%rsp), %rdx movq 0x10(%rsp), %rax movq 0x18(%rsp), %rcx movq %rcx, %r15 subq %rax, %r15 je 0xde93c movq (%rax), %rdi cmpq $0x48, %r15 jne 0xde94d cmpq %rdx, %rdi jne 0xde955 jmp 0xde943 cmpq %rdx, -0x48(%rax,%r15) jne 0xde955 leaq (%rax,%r15), %rsi addq $-0x48, %rsi jmp 0xde990 movq %rax, %rsi cmpq %rdx, %rdi je 0xde990 movq %r12, 0x20(%r14) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq $0x0, 0x10(%rbx) movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0xde97e movq 0x20(%rsp), %rsi subq %rdi, %rsi callq 0x21170 movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x8(%rsi), %rdi subq %rdx, %rdi xorl %edx, %edx cmpb $0x0, 0x10(%rsi) cmovneq %rdi, %rdx addq %rdx, 0x20(%r14) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq $0x0, 0x10(%rbx) cmpq %rcx, %rax je 0xde967 sarq $0x3, %r15 movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB imulq %rax, %r15 addq $-0x3, %r15 je 0xde967 leaq 0x48(%rsp), %r13 xorl %ebp, %ebp leaq 0x38(%rsp), %r14 xorl %r12d, %r12d movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rax subq %rsi, %rax je 0xdea11 movq %rax, %rcx sarq $0x3, %rcx movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB imulq %rdx, %rcx addq $-0x3, %rcx cmpq %r12, %rcx jbe 0xdea11 addq %rbp, %rsi jmp 0xdea18 addq %rax, %rsi addq $-0x48, %rsi movq %r14, %rdi callq 0x66202 movq %rbx, %rdi movq %r14, %rsi callq 0x72ab2 movq 0x38(%rsp), %rdi cmpq %r13, %rdi je 0xdea42 movq 0x48(%rsp), %rsi incq %rsi callq 0x21170 incq %r12 addq $0x18, %rbp cmpq %r12, %r15 jne 0xde9df jmp 0xde967 movq %rax, %r14 jmp 0xdea7f movq %rax, %r14 jmp 0xdea77 movq %rax, %r14 movq 0x38(%rsp), %rdi cmpq %r13, %rdi je 0xdea77 movq 0x48(%rsp), %rsi incq %rsi callq 0x21170 movq %rbx, %rdi callq 0x283f2 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0xdea96 movq 0x20(%rsp), %rsi subq %rdi, %rsi callq 0x21170 movq %r14, %rdi callq 0x21af0
_ZN5minja6Parser18consumeTokenGroupsERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r15, rdx mov r14, rsi mov rbx, rdi mov r12, [rsi+20h] mov rdi, rsi mov esi, ecx call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling) xorps xmm0, xmm0 lea rdx, [rsp+88h+var_78] movaps xmmword ptr [rdx+10h], xmm0 movaps xmmword ptr [rdx], xmm0 mov rsi, [r14+18h] mov rdi, [r14+20h] mov [rsp+88h+var_88], 0 mov rcx, r15 xor r8d, r8d xor r9d, r9d call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEEEEbT_SH_RNS5_13match_resultsISH_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeENS_20_RegexExecutorPolicyEb; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type,std::__detail::_RegexExecutorPolicy,bool) test al, al jz short loc_DE955 mov rdx, [rsp+88h+var_60] mov rax, [rsp+88h+var_78] mov rcx, [rsp+88h+var_70] mov r15, rcx sub r15, rax jz short loc_DE93C mov rdi, [rax] cmp r15, 48h ; 'H' jnz short loc_DE94D cmp rdi, rdx jnz short loc_DE955 jmp short loc_DE943 loc_DE93C: cmp [rax+r15-48h], rdx jnz short loc_DE955 loc_DE943: lea rsi, [rax+r15] add rsi, 0FFFFFFFFFFFFFFB8h jmp short loc_DE990 loc_DE94D: mov rsi, rax cmp rdi, rdx jz short loc_DE990 loc_DE955: mov [r14+20h], r12 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov qword ptr [rbx+10h], 0 loc_DE967: mov rdi, [rsp+88h+var_78]; void * test rdi, rdi jz short loc_DE97E mov rsi, [rsp+88h+var_68] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_DE97E: mov rax, rbx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_DE990: mov rdi, [rsi+8] sub rdi, rdx xor edx, edx cmp byte ptr [rsi+10h], 0 cmovnz rdx, rdi add [r14+20h], rdx xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov qword ptr [rbx+10h], 0 cmp rax, rcx jz short loc_DE967 sar r15, 3 mov rax, 0AAAAAAAAAAAAAAABh imul r15, rax add r15, 0FFFFFFFFFFFFFFFDh jz short loc_DE967 lea r13, [rsp+88h+var_40] xor ebp, ebp lea r14, [rsp+88h+var_50] xor r12d, r12d loc_DE9DF: mov rsi, [rsp+88h+var_78] mov rax, [rsp+88h+var_70] sub rax, rsi jz short loc_DEA11 mov rcx, rax sar rcx, 3 mov rdx, 0AAAAAAAAAAAAAAABh imul rcx, rdx add rcx, 0FFFFFFFFFFFFFFFDh cmp rcx, r12 jbe short loc_DEA11 add rsi, rbp jmp short loc_DEA18 loc_DEA11: add rsi, rax add rsi, 0FFFFFFFFFFFFFFB8h loc_DEA18: mov rdi, r14 call _ZNKSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEEE3strEv; std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str(void) mov rdi, rbx mov rsi, r14 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, [rsp+88h+var_50]; void * cmp rdi, r13 jz short loc_DEA42 mov rsi, [rsp+88h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_DEA42: inc r12 add rbp, 18h cmp r15, r12 jnz short loc_DE9DF jmp loc_DE967 mov r14, rax jmp short loc_DEA7F mov r14, rax jmp short loc_DEA77 mov r14, rax mov rdi, [rsp+arg_30]; void * cmp rdi, r13 jz short loc_DEA77 mov rsi, [rsp+arg_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_DEA77: mov rdi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_DEA7F: mov rdi, [rsp+arg_8]; void * test rdi, rdi jz short loc_DEA96 mov rsi, [rsp+arg_18] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_DEA96: mov rdi, r14 call __Unwind_Resume
long long minja::Parser::consumeTokenGroups(long long a1, long long a2, long long a3, unsigned int a4) { long long v7; // r12 __int128 v8; // kr00_16 long long v9; // r15 long long v10; // rdi long long v11; // rsi long long v13; // rdx unsigned long long v14; // r15 long long v15; // rbp unsigned long long i; // r12 long long *v17; // rsi __int128 v18; // [rsp+10h] [rbp-78h] BYREF __int128 v19; // [rsp+20h] [rbp-68h] void *v20[2]; // [rsp+38h] [rbp-50h] BYREF long long v21; // [rsp+48h] [rbp-40h] BYREF v7 = *(_QWORD *)(a2 + 32); minja::Parser::consumeSpaces(a2, a4); v19 = 0LL; v18 = 0LL; if ( !std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>( *(long long **)(a2 + 32), *(_QWORD *)(a2 + 24), (char **)&v18, a3, 0, 0, 0) ) goto LABEL_9; v8 = v18; v9 = *((_QWORD *)&v18 + 1) - v18; if ( *((_QWORD *)&v18 + 1) != (_QWORD)v18 ) { v10 = *(_QWORD *)v18; if ( v9 == 72 ) { if ( v10 == *((_QWORD *)&v19 + 1) ) goto LABEL_7; } else { v11 = v18; if ( v10 == *((_QWORD *)&v19 + 1) ) goto LABEL_13; } LABEL_9: *(_QWORD *)(a2 + 32) = v7; *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; goto LABEL_10; } if ( *(_QWORD *)(*((_QWORD *)&v18 + 1) - 72LL) != *((_QWORD *)&v19 + 1) ) goto LABEL_9; LABEL_7: v11 = *((_QWORD *)&v18 + 1) - 72LL; LABEL_13: v13 = 0LL; if ( *(_BYTE *)(v11 + 16) ) v13 = *(_QWORD *)(v11 + 8) - *((_QWORD *)&v19 + 1); *(_QWORD *)(a2 + 32) += v13; *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; if ( (_QWORD)v8 != *((_QWORD *)&v8 + 1) ) { v14 = 0xAAAAAAAAAAAAAAABLL * (v9 >> 3) - 3; if ( v14 ) { v15 = 0LL; for ( i = 0LL; i != v14; ++i ) { if ( *((_QWORD *)&v18 + 1) == (_QWORD)v18 || 0xAAAAAAAAAAAAAAABLL * ((long long)(*((_QWORD *)&v18 + 1) - v18) >> 3) - 3 <= i ) { v17 = (long long *)(*((_QWORD *)&v18 + 1) - 72LL); } else { v17 = (long long *)(v15 + v18); } std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str((long long)v20, v17); std::vector<std::string>::emplace_back<std::string>(a1, v20); if ( v20[0] != &v21 ) operator delete(v20[0], v21 + 1); v15 += 24LL; } } } LABEL_10: if ( (_QWORD)v18 ) operator delete((void *)v18, v19 - v18); return a1; }
consumeTokenGroups: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV R12,qword ptr [RSI + 0x20] MOV RDI,RSI MOV ESI,ECX CALL 0x001dfbc0 XORPS XMM0,XMM0 LEA RDX,[RSP + 0x10] MOVAPS xmmword ptr [RDX + 0x10],XMM0 MOVAPS xmmword ptr [RDX],XMM0 MOV RSI,qword ptr [R14 + 0x18] MOV RDI,qword ptr [R14 + 0x20] LAB_001de8fc: MOV dword ptr [RSP],0x0 MOV RCX,R15 XOR R8D,R8D XOR R9D,R9D CALL 0x0017092a TEST AL,AL JZ 0x001de955 MOV RDX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] MOV R15,RCX SUB R15,RAX JZ 0x001de93c MOV RDI,qword ptr [RAX] CMP R15,0x48 JNZ 0x001de94d CMP RDI,RDX JNZ 0x001de955 JMP 0x001de943 LAB_001de93c: CMP qword ptr [RAX + R15*0x1 + -0x48],RDX JNZ 0x001de955 LAB_001de943: LEA RSI,[RAX + R15*0x1] ADD RSI,-0x48 JMP 0x001de990 LAB_001de94d: MOV RSI,RAX CMP RDI,RDX JZ 0x001de990 LAB_001de955: MOV qword ptr [R14 + 0x20],R12 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBX + 0x10],0x0 LAB_001de967: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x001de97e MOV RSI,qword ptr [RSP + 0x20] SUB RSI,RDI CALL 0x00121170 LAB_001de97e: MOV RAX,RBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001de990: MOV RDI,qword ptr [RSI + 0x8] SUB RDI,RDX XOR EDX,EDX CMP byte ptr [RSI + 0x10],0x0 CMOVNZ RDX,RDI ADD qword ptr [R14 + 0x20],RDX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBX + 0x10],0x0 CMP RAX,RCX JZ 0x001de967 SAR R15,0x3 MOV RAX,-0x5555555555555555 IMUL R15,RAX ADD R15,-0x3 JZ 0x001de967 LEA R13,[RSP + 0x48] XOR EBP,EBP LEA R14,[RSP + 0x38] XOR R12D,R12D LAB_001de9df: MOV RSI,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x18] SUB RAX,RSI JZ 0x001dea11 MOV RCX,RAX SAR RCX,0x3 MOV RDX,-0x5555555555555555 IMUL RCX,RDX ADD RCX,-0x3 CMP RCX,R12 JBE 0x001dea11 ADD RSI,RBP JMP 0x001dea18 LAB_001dea11: ADD RSI,RAX ADD RSI,-0x48 LAB_001dea18: MOV RDI,R14 CALL 0x00166202 LAB_001dea20: MOV RDI,RBX MOV RSI,R14 CALL 0x00172ab2 LAB_001dea2b: MOV RDI,qword ptr [RSP + 0x38] CMP RDI,R13 JZ 0x001dea42 MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x00121170 LAB_001dea42: INC R12 ADD RBP,0x18 CMP R15,R12 JNZ 0x001de9df JMP 0x001de967
/* minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char> > const&, minja::SpaceHandling) */ vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> * minja::Parser::consumeTokenGroups (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *param_1, Parser *param_2,int8 param_3,int4 param_4) { int8 uVar1; bool bVar2; long *plVar3; long lVar4; long lVar5; long *local_78; long *plStack_70; long local_68; long lStack_60; long *local_50 [2]; long local_40 [2]; uVar1 = *(int8 *)(param_2 + 0x20); consumeSpaces(param_2,param_4); local_68 = 0; lStack_60 = 0; local_78 = (long *)0x0; plStack_70 = (long *)0x0; /* try { // try from 001de8fc to 001de910 has its CatchHandler @ 001dea53 */ bVar2 = std::__detail:: __regex_algo_impl<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>> (*(int8 *)(param_2 + 0x20),*(int8 *)(param_2 + 0x18),&local_78, param_3,0,0,0); if (bVar2) { lVar5 = (long)plStack_70 - (long)local_78; if (lVar5 == 0) { lVar4 = local_78[-9]; joined_r0x001de941: if (lVar4 != lStack_60) goto LAB_001de955; plVar3 = (long *)((long)local_78 + lVar5 + -0x48); } else { lVar4 = *local_78; if (lVar5 == 0x48) goto joined_r0x001de941; plVar3 = local_78; if (lVar4 != lStack_60) goto LAB_001de955; } lVar4 = 0; if ((char)plVar3[2] != '\0') { lVar4 = plVar3[1] - lStack_60; } *(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + lVar4; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; if ((local_78 != plStack_70) && (lVar5 = (lVar5 >> 3) * -0x5555555555555555, lVar5 != 3)) { lVar4 = 0; do { /* try { // try from 001dea18 to 001dea1f has its CatchHandler @ 001dea58 */ std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>::str (); /* try { // try from 001dea20 to 001dea2a has its CatchHandler @ 001dea5d */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string>(param_1,(string *)local_50); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } lVar4 = lVar4 + 1; } while (lVar5 + -3 != lVar4); } } else { LAB_001de955: *(int8 *)(param_2 + 0x20) = uVar1; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; } if (local_78 != (long *)0x0) { operator_delete(local_78,local_68 - (long)local_78); } return param_1; }
4,691
mi_calc_bin_pack_key_length
eloqsql/storage/myisam/mi_search.c
int _mi_calc_bin_pack_key_length(MI_KEYDEF *keyinfo,uint nod_flag,uchar *next_key, uchar *org_key, uchar *prev_key, uchar *key, MI_KEY_PARAM *s_temp) { uint length,key_length,ref_length; s_temp->totlength=key_length=_mi_keylength(keyinfo,key)+nod_flag; #ifdef HAVE_valgrind s_temp->n_length= s_temp->n_ref_length=0; /* For valgrind */ #endif s_temp->key=key; s_temp->prev_key=org_key; if (prev_key) /* If not first key in block */ { /* pack key against previous key */ /* As keys may be identical when running a sort in myisamchk, we have to guard against the case where keys may be identical */ uchar *end; end=key+key_length; for ( ; *key == *prev_key && key < end; key++,prev_key++) ; s_temp->ref_length= ref_length=(uint) (key-s_temp->key); length=key_length - ref_length + get_pack_length(ref_length); } else { /* No previous key */ s_temp->ref_length=ref_length=0; length=key_length+1; } if ((s_temp->next_key_pos=next_key)) /* If another key after */ { /* pack key against next key */ uint next_length,next_length_pack; get_key_pack_length(next_length,next_length_pack,next_key); /* If first key and next key is packed (only on delete) */ if (!prev_key && org_key && next_length) { uchar *end; for (key= s_temp->key, end=key+next_length ; *key == *org_key && key < end; key++,org_key++) ; ref_length= (uint) (key - s_temp->key); } if (next_length > ref_length) { /* We put a key with different case between two keys with the same prefix Extend next key to have same prefix as this key */ s_temp->n_ref_length= ref_length; s_temp->prev_length= next_length-ref_length; s_temp->prev_key+= ref_length; return (int) (length+ s_temp->prev_length - next_length_pack + get_pack_length(ref_length)); } /* Check how many characters are identical to next key */ key= s_temp->key+next_length; s_temp->prev_length= 0; while (*key++ == *next_key++) ; if ((ref_length= (uint) (key - s_temp->key)-1) == next_length) { s_temp->next_key_pos=0; return length; /* can't pack next key */ } s_temp->n_ref_length=ref_length; return (int) (length-(ref_length - next_length) - next_length_pack + get_pack_length(ref_length)); } return (int) length; }
O3
c
mi_calc_bin_pack_key_length: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %rbx movq %r8, %r15 movq %rcx, %r12 movq %rdx, %r14 movl %esi, %r13d movq %r9, %rsi callq 0x85a8c addl %r13d, %eax movq 0x10(%rbp), %r13 movl %eax, 0x10(%r13) movq %rbx, 0x20(%r13) movq %r12, 0x28(%r13) testq %r15, %r15 je 0x867eb movb (%rbx), %cl cmpb (%r15), %cl sete %cl testl %eax, %eax setne %sil andb %cl, %sil movq %rbx, %rdx cmpb $0x1, %sil jne 0x867d1 movl %eax, %ecx addq %rbx, %rcx leaq 0x1(%r15), %rsi leaq 0x1(%rbx), %rdi movb (%rdi), %r8b leaq 0x1(%rdi), %rdx cmpb (%rsi), %r8b jne 0x867ce incq %rsi cmpq %rcx, %rdi movq %rdx, %rdi jb 0x867b7 decq %rdx subl %ebx, %edx movl %edx, (%r13) subl %edx, %eax xorl %ecx, %ecx cmpl $0xff, %edx setae %cl leal (%rax,%rcx,2), %eax incl %eax jmp 0x867f7 movl $0x0, (%r13) incl %eax xorl %edx, %edx movq %r14, 0x30(%r13) testq %r14, %r14 je 0x868f9 movzbl (%r14), %esi cmpl $0xff, %esi je 0x8681c movl $0xffffffff, %ecx # imm = 0xFFFFFFFF movl $0x1, %edi jmp 0x86832 movzwl 0x1(%r14), %ecx rolw $0x8, %cx movzwl %cx, %esi movl $0xfffffffd, %ecx # imm = 0xFFFFFFFD movl $0x3, %edi testq %r12, %r12 je 0x86877 testq %r15, %r15 jne 0x86877 testl %esi, %esi je 0x86877 movb (%rbx), %r8b movq %rbx, %rdx cmpb (%r12), %r8b jne 0x86875 movl %esi, %r8d addq %rbx, %r8 leaq 0x1(%r12), %r9 leaq 0x1(%rbx), %r10 movb (%r10), %r11b leaq 0x1(%r10), %rdx cmpb (%r9), %r11b jne 0x86872 incq %r9 cmpq %r8, %r10 movq %rdx, %r10 jb 0x8685b decq %rdx subl %ebx, %edx movl %esi, %r8d subl %edx, %r8d jbe 0x868a8 movl %edx, 0x8(%r13) movl %r8d, 0x18(%r13) movl %edx, %esi addq %rsi, %r12 movq %r12, 0x28(%r13) xorl %esi, %esi cmpl $0xff, %edx setae %sil addl %eax, %ecx addl %r8d, %ecx leal (%rcx,%rsi,2), %eax incl %eax jmp 0x868f9 addq %rdi, %r14 movl %esi, %esi addq %rsi, %rbx movl $0x0, 0x18(%r13) xorl %edx, %edx movq %rdx, %rdi movb (%rbx,%rdx), %r8b incq %rdx cmpb (%r14,%rdi), %r8b je 0x868ba cmpl $0x1, %edx jne 0x868d9 movq $0x0, 0x30(%r13) jmp 0x868f9 addq %rdx, %rsi decq %rsi movl %esi, 0x8(%r13) xorl %edi, %edi cmpl $0xff, %esi setae %dil addl %ecx, %eax leal (%rax,%rdi,2), %eax subl %edx, %eax addl $0x2, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_mi_calc_bin_pack_key_length: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, r9 mov r15, r8 mov r12, rcx mov r14, rdx mov r13d, esi mov rsi, r9 call _mi_keylength add eax, r13d mov r13, [rbp+arg_0] mov [r13+10h], eax mov [r13+20h], rbx mov [r13+28h], r12 test r15, r15 jz short loc_867EB mov cl, [rbx] cmp cl, [r15] setz cl test eax, eax setnz sil and sil, cl mov rdx, rbx cmp sil, 1 jnz short loc_867D1 mov ecx, eax add rcx, rbx lea rsi, [r15+1] lea rdi, [rbx+1] loc_867B7: mov r8b, [rdi] lea rdx, [rdi+1] cmp r8b, [rsi] jnz short loc_867CE inc rsi cmp rdi, rcx mov rdi, rdx jb short loc_867B7 loc_867CE: dec rdx loc_867D1: sub edx, ebx mov [r13+0], edx sub eax, edx xor ecx, ecx cmp edx, 0FFh setnb cl lea eax, [rax+rcx*2] inc eax jmp short loc_867F7 loc_867EB: mov dword ptr [r13+0], 0 inc eax xor edx, edx loc_867F7: mov [r13+30h], r14 test r14, r14 jz loc_868F9 movzx esi, byte ptr [r14] cmp esi, 0FFh jz short loc_8681C mov ecx, 0FFFFFFFFh mov edi, 1 jmp short loc_86832 loc_8681C: movzx ecx, word ptr [r14+1] rol cx, 8 movzx esi, cx mov ecx, 0FFFFFFFDh mov edi, 3 loc_86832: test r12, r12 jz short loc_86877 test r15, r15 jnz short loc_86877 test esi, esi jz short loc_86877 mov r8b, [rbx] mov rdx, rbx cmp r8b, [r12] jnz short loc_86875 mov r8d, esi add r8, rbx lea r9, [r12+1] lea r10, [rbx+1] loc_8685B: mov r11b, [r10] lea rdx, [r10+1] cmp r11b, [r9] jnz short loc_86872 inc r9 cmp r10, r8 mov r10, rdx jb short loc_8685B loc_86872: dec rdx loc_86875: sub edx, ebx loc_86877: mov r8d, esi sub r8d, edx jbe short loc_868A8 mov [r13+8], edx mov [r13+18h], r8d mov esi, edx add r12, rsi mov [r13+28h], r12 xor esi, esi cmp edx, 0FFh setnb sil add ecx, eax add ecx, r8d lea eax, [rcx+rsi*2] inc eax jmp short loc_868F9 loc_868A8: add r14, rdi mov esi, esi add rbx, rsi mov dword ptr [r13+18h], 0 xor edx, edx loc_868BA: mov rdi, rdx mov r8b, [rbx+rdx] inc rdx cmp r8b, [r14+rdi] jz short loc_868BA cmp edx, 1 jnz short loc_868D9 mov qword ptr [r13+30h], 0 jmp short loc_868F9 loc_868D9: add rsi, rdx dec rsi mov [r13+8], esi xor edi, edi cmp esi, 0FFh setnb dil add eax, ecx lea eax, [rax+rdi*2] sub eax, edx add eax, 2 loc_868F9: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mi_calc_bin_pack_key_length( long long a1, int a2, unsigned __int8 *a3, _BYTE *a4, _BYTE *a5, unsigned __int8 *a6, long long a7) { int v11; // eax int v12; // edx _BYTE *v13; // rsi unsigned __int8 *v14; // rdi int v15; // edx bool v16; // cf unsigned int v17; // edx long long result; // rax unsigned int v19; // esi int v20; // ecx long long v21; // rdi int v22; // edx _BYTE *v23; // r9 unsigned __int8 *v24; // r10 int v25; // edx int v26; // r8d unsigned __int8 *v27; // r14 unsigned __int8 *v28; // rbx long long v29; // rdx long long v30; // rdi unsigned __int8 v31; // r8 unsigned int v32; // esi v11 = a2 + mi_keylength(a1, a6); *(_DWORD *)(a7 + 16) = v11; *(_QWORD *)(a7 + 32) = a6; *(_QWORD *)(a7 + 40) = a4; if ( a5 ) { v12 = (int)a6; if ( *a6 == *a5 && v11 != 0 ) { v13 = a5 + 1; v14 = a6 + 1; do { v15 = (_DWORD)v14 + 1; if ( *v14 != *v13 ) break; ++v13; v16 = v14++ < &a6[v11]; } while ( v16 ); v12 = v15 - 1; } v17 = v12 - (_DWORD)a6; *(_DWORD *)a7 = v17; result = v11 - v17 + 2 * (v17 >= 0xFF) + 1; } else { *(_DWORD *)a7 = 0; result = (unsigned int)(v11 + 1); v17 = 0; } *(_QWORD *)(a7 + 48) = a3; if ( a3 ) { v19 = *a3; if ( v19 == 255 ) { v19 = (unsigned __int16)__ROL2__(*(_WORD *)(a3 + 1), 8); v20 = -3; v21 = 3LL; } else { v20 = -1; v21 = 1LL; } if ( a4 && !a5 && v19 ) { v22 = (int)a6; if ( *a6 == *a4 ) { v23 = a4 + 1; v24 = a6 + 1; do { v25 = (_DWORD)v24 + 1; if ( *v24 != *v23 ) break; ++v23; v16 = v24++ < &a6[v19]; } while ( v16 ); v22 = v25 - 1; } v17 = v22 - (_DWORD)a6; } v26 = v19 - v17; if ( v19 <= v17 ) { v27 = &a3[v21]; v28 = &a6[v19]; *(_DWORD *)(a7 + 24) = 0; v29 = 0LL; do { v30 = v29; v31 = v28[v29++]; } while ( v31 == v27[v30] ); if ( (_DWORD)v29 == 1 ) { *(_QWORD *)(a7 + 48) = 0LL; } else { v32 = v29 + v19 - 1; *(_DWORD *)(a7 + 8) = v32; return v20 + (_DWORD)result + 2 * (v32 >= 0xFF) - (unsigned int)v29 + 2; } } else { *(_DWORD *)(a7 + 8) = v17; *(_DWORD *)(a7 + 24) = v26; *(_QWORD *)(a7 + 40) = &a4[v17]; return v26 + (_DWORD)result + v20 + 2 * (unsigned int)(v17 >= 0xFF) + 1; } } return result; }
_mi_calc_bin_pack_key_length: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,R9 MOV R15,R8 MOV R12,RCX MOV R14,RDX MOV R13D,ESI MOV RSI,R9 CALL 0x00185a8c ADD EAX,R13D MOV R13,qword ptr [RBP + 0x10] MOV dword ptr [R13 + 0x10],EAX MOV qword ptr [R13 + 0x20],RBX MOV qword ptr [R13 + 0x28],R12 TEST R15,R15 JZ 0x001867eb MOV CL,byte ptr [RBX] CMP CL,byte ptr [R15] SETZ CL TEST EAX,EAX SETNZ SIL AND SIL,CL MOV RDX,RBX CMP SIL,0x1 JNZ 0x001867d1 MOV ECX,EAX ADD RCX,RBX LEA RSI,[R15 + 0x1] LEA RDI,[RBX + 0x1] LAB_001867b7: MOV R8B,byte ptr [RDI] LEA RDX,[RDI + 0x1] CMP R8B,byte ptr [RSI] JNZ 0x001867ce INC RSI CMP RDI,RCX MOV RDI,RDX JC 0x001867b7 LAB_001867ce: DEC RDX LAB_001867d1: SUB EDX,EBX MOV dword ptr [R13],EDX SUB EAX,EDX XOR ECX,ECX CMP EDX,0xff SETNC CL LEA EAX,[RAX + RCX*0x2] INC EAX JMP 0x001867f7 LAB_001867eb: MOV dword ptr [R13],0x0 INC EAX XOR EDX,EDX LAB_001867f7: MOV qword ptr [R13 + 0x30],R14 TEST R14,R14 JZ 0x001868f9 MOVZX ESI,byte ptr [R14] CMP ESI,0xff JZ 0x0018681c MOV ECX,0xffffffff MOV EDI,0x1 JMP 0x00186832 LAB_0018681c: MOVZX ECX,word ptr [R14 + 0x1] ROL CX,0x8 MOVZX ESI,CX MOV ECX,0xfffffffd MOV EDI,0x3 LAB_00186832: TEST R12,R12 JZ 0x00186877 TEST R15,R15 JNZ 0x00186877 TEST ESI,ESI JZ 0x00186877 MOV R8B,byte ptr [RBX] MOV RDX,RBX CMP R8B,byte ptr [R12] JNZ 0x00186875 MOV R8D,ESI ADD R8,RBX LEA R9,[R12 + 0x1] LEA R10,[RBX + 0x1] LAB_0018685b: MOV R11B,byte ptr [R10] LEA RDX,[R10 + 0x1] CMP R11B,byte ptr [R9] JNZ 0x00186872 INC R9 CMP R10,R8 MOV R10,RDX JC 0x0018685b LAB_00186872: DEC RDX LAB_00186875: SUB EDX,EBX LAB_00186877: MOV R8D,ESI SUB R8D,EDX JBE 0x001868a8 MOV dword ptr [R13 + 0x8],EDX MOV dword ptr [R13 + 0x18],R8D MOV ESI,EDX ADD R12,RSI MOV qword ptr [R13 + 0x28],R12 XOR ESI,ESI CMP EDX,0xff SETNC SIL ADD ECX,EAX ADD ECX,R8D LEA EAX,[RCX + RSI*0x2] INC EAX JMP 0x001868f9 LAB_001868a8: ADD R14,RDI MOV ESI,ESI ADD RBX,RSI MOV dword ptr [R13 + 0x18],0x0 XOR EDX,EDX LAB_001868ba: MOV RDI,RDX MOV R8B,byte ptr [RBX + RDX*0x1] INC RDX CMP R8B,byte ptr [R14 + RDI*0x1] JZ 0x001868ba CMP EDX,0x1 JNZ 0x001868d9 MOV qword ptr [R13 + 0x30],0x0 JMP 0x001868f9 LAB_001868d9: ADD RSI,RDX DEC RSI MOV dword ptr [R13 + 0x8],ESI XOR EDI,EDI CMP ESI,0xff SETNC DIL ADD EAX,ECX LEA EAX,[RAX + RDI*0x2] SUB EAX,EDX ADD EAX,0x2 LAB_001868f9: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int _mi_calc_bin_pack_key_length (int8 param_1,int param_2,byte *param_3,char *param_4,char *param_5, char *param_6,uint *param_7) { char *pcVar1; long lVar2; long lVar3; int iVar4; uint uVar5; int iVar6; int iVar7; uint uVar8; int iVar9; long lVar10; long lVar11; char *pcVar12; char *pcVar13; long lVar14; uint uVar15; bool bVar16; iVar4 = _mi_keylength(param_1,param_6); uVar5 = iVar4 + param_2; param_7[4] = uVar5; *(char **)(param_7 + 8) = param_6; *(char **)(param_7 + 10) = param_4; iVar4 = (int)param_6; if (param_5 == (char *)0x0) { *param_7 = 0; uVar8 = 0; } else { iVar7 = iVar4; if (uVar5 != 0 && *param_6 == *param_5) { pcVar12 = param_5 + 1; pcVar13 = param_6 + 1; do { pcVar1 = pcVar13 + 1; if (*pcVar13 != *pcVar12) break; pcVar12 = pcVar12 + 1; bVar16 = pcVar13 < param_6 + uVar5; pcVar13 = pcVar1; } while (bVar16); iVar7 = (int)pcVar1 + -1; } uVar8 = iVar7 - iVar4; *param_7 = uVar8; uVar5 = (uVar5 - uVar8) + (uint)(0xfe < uVar8) * 2; } iVar7 = uVar5 + 1; *(byte **)(param_7 + 0xc) = param_3; if (param_3 != (byte *)0x0) { uVar5 = (uint)*param_3; if (*param_3 == 0xff) { uVar5 = (uint)(ushort)(*(ushort *)(param_3 + 1) << 8 | *(ushort *)(param_3 + 1) >> 8); iVar6 = -3; lVar14 = 3; } else { iVar6 = -1; lVar14 = 1; } if (((param_4 != (char *)0x0) && (param_5 == (char *)0x0)) && (uVar5 != 0)) { iVar9 = iVar4; if (*param_6 == *param_4) { pcVar12 = param_4 + 1; pcVar13 = param_6 + 1; do { pcVar1 = pcVar13 + 1; if (*pcVar13 != *pcVar12) break; pcVar12 = pcVar12 + 1; bVar16 = pcVar13 < param_6 + uVar5; pcVar13 = pcVar1; } while (bVar16); iVar9 = (int)pcVar1 + -1; } uVar8 = iVar9 - iVar4; } uVar15 = uVar5 - uVar8; if (uVar5 < uVar8 || uVar15 == 0) { param_7[6] = 0; lVar10 = 0; do { lVar3 = lVar10 + (ulong)uVar5; lVar11 = lVar10 + 1; lVar2 = lVar10 + lVar14; lVar10 = lVar11; } while (param_6[lVar3] == param_3[lVar2]); iVar4 = (int)lVar11; if (iVar4 == 1) { param_7[0xc] = 0; param_7[0xd] = 0; } else { uVar5 = (uVar5 + iVar4) - 1; param_7[2] = uVar5; iVar7 = ((iVar7 + iVar6 + (uint)(0xfe < uVar5) * 2) - iVar4) + 2; } } else { param_7[2] = uVar8; param_7[6] = uVar15; *(char **)(param_7 + 10) = param_4 + uVar8; iVar7 = iVar6 + iVar7 + uVar15 + (uint)(0xfe < uVar8) * 2 + 1; } } return iVar7; }
4,692
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long)
monkey531[P]llama/common/json.hpp
reference operator[](size_type idx) { // implicitly convert null value to an empty array if (is_null()) { m_data.m_type = value_t::array; m_data.m_value.array = create<array_t>(); assert_invariant(); } // operator[] only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { // fill up array with null values if given idx is outside range if (idx >= m_data.m_value.array->size()) { #if JSON_DIAGNOSTICS // remember array size & capacity before resizing const auto old_size = m_data.m_value.array->size(); const auto old_capacity = m_data.m_value.array->capacity(); #endif m_data.m_value.array->resize(idx + 1); #if JSON_DIAGNOSTICS if (JSON_HEDLEY_UNLIKELY(m_data.m_value.array->capacity() != old_capacity)) { // capacity has changed: update all parents set_parents(); } else { // set parent for values added above set_parents(begin() + static_cast<typename iterator::difference_type>(old_size), static_cast<typename iterator::difference_type>(idx + 1 - old_size)); } #endif assert_invariant(); } return m_data.m_value.array->operator[](idx); } JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this)); }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 movb (%rdi), %al testb %al, %al jne 0xae3e6 movb $0x2, (%r14) movl $0x18, %edi callq 0x1ba40 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x8(%r14) movq %r14, %rdi movl $0x1, %esi callq 0x5c5ee movb (%r14), %al cmpb $0x2, %al jne 0xae431 movq 0x8(%r14), %rdi movq (%rdi), %rax movq 0x8(%rdi), %rcx subq %rax, %rcx sarq $0x4, %rcx cmpq %rbx, %rcx ja 0xae41e leaq 0x1(%rbx), %rsi callq 0xae6a4 movq %r14, %rdi movl $0x1, %esi callq 0x5c5ee movq 0x8(%r14), %rax movq (%rax), %rax shlq $0x4, %rbx addq %rax, %rbx movq %rbx, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x20, %edi callq 0x1b4d0 movq %rax, %rbx movq %r14, %rdi callq 0x62a40 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x45dd2(%rip), %rsi # 0xf4227 leaq 0x10(%rsp), %rdi callq 0xa5157 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x131, %esi # imm = 0x131 movq %r14, %rcx callq 0x627e8 xorl %ebp, %ebp leaq 0x7fac8(%rip), %rsi # 0x12df48 leaq -0x4f78d(%rip), %rdx # 0x5ecfa movq %rbx, %rdi callq 0x1c1c0 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xae4ad movq 0x20(%rsp), %rsi incq %rsi callq 0x1ba60 testb %bpl, %bpl jne 0xae4b7 jmp 0xae4bf movq %rax, %r14 movq %rbx, %rdi callq 0x1b760 movq %r14, %rdi callq 0x1c250 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov rbx, rsi mov r14, rdi mov al, [rdi] test al, al jnz short loc_AE3E6 mov byte ptr [r14], 2 mov edi, 18h; unsigned __int64 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 mov [r14+8], rax mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov al, [r14] loc_AE3E6: cmp al, 2 jnz short loc_AE431 mov rdi, [r14+8] mov rax, [rdi] mov rcx, [rdi+8] sub rcx, rax sar rcx, 4 cmp rcx, rbx ja short loc_AE41E lea rsi, [rbx+1] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE6resizeEm; 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>>::resize(ulong) mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rax, [r14+8] mov rax, [rax] loc_AE41E: shl rbx, 4 add rbx, rax mov rax, rbx add rsp, 30h pop rbx pop r14 pop rbp retn loc_AE431: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"... lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 131h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_AE4AD mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AE4AD: test bpl, bpl jnz short loc_AE4B7 jmp short loc_AE4BF mov r14, rax loc_AE4B7: mov rdi, rbx; void * call ___cxa_free_exception loc_AE4BF: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( long long a1, unsigned long long a2) { char v3; // al long long v4; // rax long long *v5; // rdi long long v6; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx const char *v9; // [rsp+8h] [rbp-40h] BYREF _QWORD v10[2]; // [rsp+10h] [rbp-38h] BYREF v3 = *(_BYTE *)a1; if ( !*(_BYTE *)a1 ) { *(_BYTE *)a1 = 2; v4 = operator new(0x18uLL); *(_OWORD *)v4 = 0LL; *(_QWORD *)(v4 + 16) = 0LL; *(_QWORD *)(a1 + 8) = v4; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); v3 = *(_BYTE *)a1; } if ( v3 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v9 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>( (long long)v10, "cannot use operator[] with a numeric argument with ", &v9); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 305, v10); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v5 = *(long long **)(a1 + 8); v6 = *v5; if ( (v5[1] - *v5) >> 4 <= a2 ) { 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>>::resize( v5, a2 + 1); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); v6 = **(_QWORD **)(a1 + 8); } return v6 + 16 * a2; }
operator[]: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R14,RDI MOV AL,byte ptr [RDI] TEST AL,AL JNZ 0x001ae3e6 MOV byte ptr [R14],0x2 MOV EDI,0x18 CALL 0x0011ba40 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOV qword ptr [R14 + 0x8],RAX MOV RDI,R14 MOV ESI,0x1 CALL 0x0015c5ee MOV AL,byte ptr [R14] LAB_001ae3e6: CMP AL,0x2 JNZ 0x001ae431 MOV RDI,qword ptr [R14 + 0x8] MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x8] SUB RCX,RAX SAR RCX,0x4 CMP RCX,RBX JA 0x001ae41e LEA RSI,[RBX + 0x1] CALL 0x001ae6a4 MOV RDI,R14 MOV ESI,0x1 CALL 0x0015c5ee MOV RAX,qword ptr [R14 + 0x8] MOV RAX,qword ptr [RAX] LAB_001ae41e: SHL RBX,0x4 ADD RBX,RAX MOV RAX,RBX ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_001ae431: MOV EDI,0x20 CALL 0x0011b4d0 MOV RBX,RAX MOV RDI,R14 CALL 0x00162a40 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_001ae44e: LEA RSI,[0x1f4227] LEA RDI,[RSP + 0x10] CALL 0x001a5157 MOV BPL,0x1 LAB_001ae462: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x131 MOV RCX,R14 CALL 0x001627e8 XOR EBP,EBP LEA RSI,[0x22df48] LEA RDX,[0x15ecfa] MOV RDI,RBX CALL 0x0011c1c0
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::operator[](unsigned long) */ long __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,ulong param_1) { vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *this_00; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> bVar1; int8 *puVar2; long lVar3; int8 uVar4; char *local_40; detail local_38 [32]; bVar1 = *this; if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2; puVar2 = (int8 *)operator_new(0x18); *puVar2 = 0; puVar2[1] = 0; puVar2[2] = 0; *(int8 **)(this + 8) = puVar2; assert_invariant(SUB81(this,0)); bVar1 = *this; } if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { this_00 = *(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(this + 8); lVar3 = *(long *)this_00; if ((ulong)(*(long *)(this_00 + 8) - lVar3 >> 4) <= param_1) { 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>>> ::resize(this_00,param_1 + 1); assert_invariant(SUB81(this,0)); lVar3 = **(long **)(this + 8); } return param_1 * 0x10 + lVar3; } uVar4 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 001ae44e to 001ae45e has its CatchHandler @ 001ae4b4 */ detail::concat<std::__cxx11::string,char_const(&)[52],char_const*> (local_38,"cannot use operator[] with a numeric argument with ",&local_40); /* try { // try from 001ae462 to 001ae48e has its CatchHandler @ 001ae48f */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar4,0x131,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&detail::type_error::typeinfo,detail::exception::~exception); }
4,693
allocate_dynamic
eloqsql/mysys/array.c
my_bool allocate_dynamic(DYNAMIC_ARRAY *array, uint max_elements) { DBUG_ENTER("allocate_dynamic"); if (max_elements >= array->max_element) { uint size; uchar *new_ptr; size= (max_elements + array->alloc_increment)/array->alloc_increment; size*= array->alloc_increment; if (array->malloc_flags & MY_INIT_BUFFER_USED) { /* In this senerio, the buffer is statically preallocated, so we have to create an all-new malloc since we overflowed */ if (!(new_ptr= (uchar *) my_malloc(array->m_psi_key, size * array->size_of_element, MYF(array->malloc_flags | MY_WME)))) DBUG_RETURN(0); memcpy(new_ptr, array->buffer, array->elements * array->size_of_element); array->malloc_flags&= ~MY_INIT_BUFFER_USED; } else if (!(new_ptr= (uchar*) my_realloc(array->m_psi_key, array->buffer,size * array->size_of_element, MYF(MY_WME | MY_ALLOW_ZERO_PTR | array->malloc_flags)))) DBUG_RETURN(TRUE); array->buffer= new_ptr; array->max_element= size; } DBUG_RETURN(FALSE); }
O3
c
allocate_dynamic: cmpl %esi, 0xc(%rdi) jbe 0x454e9 xorl %eax, %eax retq pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %esi, %ebx movq %rdi, %r14 movl 0x10(%rdi), %ecx movl 0x18(%rdi), %edi addl %ecx, %ebx movl %ebx, %eax xorl %edx, %edx divl %ecx subl %edx, %ebx movq 0x20(%r14), %rcx btl $0x8, %ecx jb 0x45531 movq (%r14), %rsi movl 0x14(%r14), %edx imull %ebx, %edx orq $0x50, %rcx callq 0x45dd4 movq %rax, %r15 testq %rax, %rax jne 0x45569 movb $0x1, %al jmp 0x45572 movl 0x14(%r14), %esi imull %ebx, %esi orq $0x10, %rcx movq %rcx, %rdx callq 0x45cb1 testq %rax, %rax je 0x45570 movq %rax, %r15 movq (%r14), %rsi movl 0x14(%r14), %edx imull 0x8(%r14), %edx movq %rax, %rdi callq 0x26290 movl $0xfffffeff, %eax # imm = 0xFFFFFEFF andq %rax, 0x20(%r14) movq %r15, (%r14) movl %ebx, 0xc(%r14) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
allocate_dynamic: cmp [rdi+0Ch], esi jbe short loc_454E9 xor eax, eax retn loc_454E9: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov ebx, esi mov r14, rdi mov ecx, [rdi+10h] mov edi, [rdi+18h] add ebx, ecx mov eax, ebx xor edx, edx div ecx sub ebx, edx mov rcx, [r14+20h] bt ecx, 8 jb short loc_45531 mov rsi, [r14] mov edx, [r14+14h] imul edx, ebx or rcx, 50h call my_realloc mov r15, rax test rax, rax jnz short loc_45569 mov al, 1 jmp short loc_45572 loc_45531: mov esi, [r14+14h] imul esi, ebx or rcx, 10h mov rdx, rcx call my_malloc test rax, rax jz short loc_45570 mov r15, rax mov rsi, [r14] mov edx, [r14+14h] imul edx, [r14+8] mov rdi, rax call _memcpy mov eax, 0FFFFFEFFh and [r14+20h], rax loc_45569: mov [r14], r15 mov [r14+0Ch], ebx loc_45570: xor eax, eax loc_45572: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long allocate_dynamic(long long a1, unsigned int a2) { unsigned int v4; // ecx long long v5; // rdi unsigned int v6; // ebx long long v7; // rcx long long v8; // r15 long long v9; // rax if ( *(_DWORD *)(a1 + 12) > a2 ) return 0LL; v4 = *(_DWORD *)(a1 + 16); v5 = *(unsigned int *)(a1 + 24); v6 = v4 + a2 - (v4 + a2) % v4; v7 = *(_QWORD *)(a1 + 32); if ( (v7 & 0x100) == 0 ) { v8 = my_realloc(v5, *(_QWORD *)a1, v6 * *(_DWORD *)(a1 + 20), v7 | 0x50); if ( !v8 ) return 1LL; goto LABEL_8; } v9 = my_malloc(v5, v6 * *(_DWORD *)(a1 + 20), v7 | 0x10); if ( v9 ) { v8 = v9; memcpy(v9, *(_QWORD *)a1, (unsigned int)(*(_DWORD *)(a1 + 8) * *(_DWORD *)(a1 + 20))); *(_QWORD *)(a1 + 32) &= 0xFFFFFEFFuLL; LABEL_8: *(_QWORD *)a1 = v8; *(_DWORD *)(a1 + 12) = v6; } return 0LL; }
allocate_dynamic: CMP dword ptr [RDI + 0xc],ESI JBE 0x001454e9 XOR EAX,EAX RET LAB_001454e9: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBX,ESI MOV R14,RDI MOV ECX,dword ptr [RDI + 0x10] MOV EDI,dword ptr [RDI + 0x18] ADD EBX,ECX MOV EAX,EBX XOR EDX,EDX DIV ECX SUB EBX,EDX MOV RCX,qword ptr [R14 + 0x20] BT ECX,0x8 JC 0x00145531 MOV RSI,qword ptr [R14] MOV EDX,dword ptr [R14 + 0x14] IMUL EDX,EBX OR RCX,0x50 CALL 0x00145dd4 MOV R15,RAX TEST RAX,RAX JNZ 0x00145569 MOV AL,0x1 JMP 0x00145572 LAB_00145531: MOV ESI,dword ptr [R14 + 0x14] IMUL ESI,EBX OR RCX,0x10 MOV RDX,RCX CALL 0x00145cb1 TEST RAX,RAX JZ 0x00145570 MOV R15,RAX MOV RSI,qword ptr [R14] MOV EDX,dword ptr [R14 + 0x14] IMUL EDX,dword ptr [R14 + 0x8] MOV RDI,RAX CALL 0x00126290 MOV EAX,0xfffffeff AND qword ptr [R14 + 0x20],RAX LAB_00145569: MOV qword ptr [R14],R15 MOV dword ptr [R14 + 0xc],EBX LAB_00145570: XOR EAX,EAX LAB_00145572: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int8 allocate_dynamic(long *param_1,uint param_2) { ulong uVar1; void *__dest; int iVar2; if (param_2 < *(uint *)((long)param_1 + 0xc)) { return 0; } param_2 = param_2 + *(uint *)(param_1 + 2); iVar2 = param_2 - param_2 % *(uint *)(param_1 + 2); uVar1 = param_1[4]; if (((uint)uVar1 >> 8 & 1) == 0) { __dest = (void *)my_realloc((int)param_1[3],*param_1,*(int *)((long)param_1 + 0x14) * iVar2, uVar1 | 0x50); if (__dest == (void *)0x0) { return 1; } } else { __dest = (void *)my_malloc((int)param_1[3],*(int *)((long)param_1 + 0x14) * iVar2,uVar1 | 0x10); if (__dest == (void *)0x0) { return 0; } memcpy(__dest,(void *)*param_1,(ulong)(uint)(*(int *)((long)param_1 + 0x14) * (int)param_1[1])); param_1[4] = param_1[4] & 0xfffffeff; } *param_1 = (long)__dest; *(int *)((long)param_1 + 0xc) = iVar2; return 0; }
4,694
get_internal_charset
eloqsql/mysys/charset.c
static CHARSET_INFO * get_internal_charset(MY_CHARSET_LOADER *loader, uint cs_number, myf flags) { char buf[FN_REFLEN]; struct charset_info_st *cs; DBUG_ASSERT(cs_number < array_elements(all_charsets)); if ((cs= (struct charset_info_st*) all_charsets[cs_number])) { if (cs->state & MY_CS_READY) /* if CS is already initialized */ { my_collation_statistics_inc_use_count(cs_number); return cs; } /* To make things thread safe we are not allowing other threads to interfere while we may changing the cs_info_table */ mysql_mutex_lock(&THR_LOCK_charset); if (!(cs->state & (MY_CS_COMPILED|MY_CS_LOADED))) /* if CS is not in memory */ { MY_CHARSET_LOADER loader; strxmov(get_charsets_dir(buf), cs->cs_name.str, ".xml", NullS); my_charset_loader_init_mysys(&loader); my_read_charset_file(&loader, buf, flags); } if (cs->state & MY_CS_AVAILABLE) { if (!(cs->state & MY_CS_READY)) { if (!simple_8bit_charset_data_is_full(cs)) { CHARSET_INFO *refcs= find_charset_data_inheritance_source(cs); if (refcs) inherit_charset_data(cs, refcs); } if (!simple_8bit_collation_data_is_full(cs)) { CHARSET_INFO *refcl= find_collation_data_inheritance_source(cs, flags); if (refcl) inherit_collation_data(cs, refcl); } if (my_ci_init_charset(cs, loader) || my_ci_init_collation(cs, loader)) { cs= NULL; } else cs->state|= MY_CS_READY; } my_collation_statistics_inc_use_count(cs_number); } else cs= NULL; mysql_mutex_unlock(&THR_LOCK_charset); } return cs; }
O0
c
get_internal_charset: pushq %rbp movq %rsp, %rbp subq $0x300, %rsp # imm = 0x300 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x2d0(%rbp) movl %esi, -0x2d4(%rbp) movq %rdx, -0x2e0(%rbp) jmp 0xdbd7e movl -0x2d4(%rbp), %eax movl %eax, %ecx leaq 0xb9e5f3(%rip), %rax # 0xc7a380 movq (%rax,%rcx,8), %rax movq %rax, -0x2e8(%rbp) cmpq $0x0, %rax je 0xdbf87 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %eax andl $0x100, %eax # imm = 0x100 cmpl $0x0, %eax je 0xdbdd4 movl -0x2d4(%rbp), %edi callq 0xdd6e0 movq -0x2e8(%rbp), %rax movq %rax, -0x2c8(%rbp) jmp 0xdbf95 leaq 0xba73c5(%rip), %rdi # 0xc831a0 leaq 0x77f37(%rip), %rsi # 0x153d19 movl $0x36b, %edx # imm = 0x36B callq 0xdd710 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %eax andl $0x9, %eax cmpl $0x0, %eax jne 0xdbe50 leaq -0x210(%rbp), %rdi callq 0xdb3c0 movq %rax, %rdi movq -0x2e8(%rbp), %rax movq 0x10(%rax), %rsi leaq 0x77edd(%rip), %rdx # 0x153cfc xorl %eax, %eax movl %eax, %ecx movb $0x0, %al callq 0x14de40 leaq -0x2c0(%rbp), %rdi callq 0xdad20 leaq -0x210(%rbp), %rsi movq -0x2e0(%rbp), %rdx leaq -0x2c0(%rbp), %rdi callq 0xdd260 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %eax andl $0x200, %eax # imm = 0x200 cmpl $0x0, %eax je 0xdbf70 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %eax andl $0x100, %eax # imm = 0x100 cmpl $0x0, %eax jne 0xdbf63 movq -0x2e8(%rbp), %rdi callq 0xdd180 cmpb $0x0, %al jne 0xdbec2 movq -0x2e8(%rbp), %rdi callq 0xdd780 movq %rax, -0x2f0(%rbp) cmpq $0x0, -0x2f0(%rbp) je 0xdbec0 movq -0x2e8(%rbp), %rdi movq -0x2f0(%rbp), %rsi callq 0xdd7c0 jmp 0xdbec2 movq -0x2e8(%rbp), %rdi callq 0xdd1e0 cmpb $0x0, %al jne 0xdbf0b movq -0x2e8(%rbp), %rdi movq -0x2e0(%rbp), %rsi callq 0xdd840 movq %rax, -0x2f8(%rbp) cmpq $0x0, -0x2f8(%rbp) je 0xdbf09 movq -0x2e8(%rbp), %rdi movq -0x2f8(%rbp), %rsi callq 0xdd950 jmp 0xdbf0b movq -0x2e8(%rbp), %rdi movq -0x2d0(%rbp), %rsi callq 0xdd990 movsbl %al, %eax cmpl $0x0, %eax jne 0xdbf41 movq -0x2e8(%rbp), %rdi movq -0x2d0(%rbp), %rsi callq 0xdd9e0 movsbl %al, %eax cmpl $0x0, %eax je 0xdbf4e movq $0x0, -0x2e8(%rbp) jmp 0xdbf61 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %ecx orl $0x100, %ecx # imm = 0x100 movl %ecx, 0xc(%rax) jmp 0xdbf63 movl -0x2d4(%rbp), %edi callq 0xdd6e0 jmp 0xdbf7b movq $0x0, -0x2e8(%rbp) leaq 0xba721e(%rip), %rdi # 0xc831a0 callq 0xdda30 movq -0x2e8(%rbp), %rax movq %rax, -0x2c8(%rbp) movq -0x2c8(%rbp), %rax movq %rax, -0x300(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xdbfc5 movq -0x300(%rbp), %rax addq $0x300, %rsp # imm = 0x300 popq %rbp retq callq 0x2a250 nopw (%rax,%rax)
get_internal_charset: push rbp mov rbp, rsp sub rsp, 300h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_2D0], rdi mov [rbp+var_2D4], esi mov [rbp+var_2E0], rdx jmp short $+2 loc_DBD7E: mov eax, [rbp+var_2D4] mov ecx, eax lea rax, all_charsets mov rax, [rax+rcx*8] mov [rbp+var_2E8], rax cmp rax, 0 jz loc_DBF87 mov rax, [rbp+var_2E8] mov eax, [rax+0Ch] and eax, 100h cmp eax, 0 jz short loc_DBDD4 mov edi, [rbp+var_2D4] call my_collation_statistics_inc_use_count mov rax, [rbp+var_2E8] mov [rbp+var_2C8], rax jmp loc_DBF95 loc_DBDD4: lea rdi, THR_LOCK_charset lea rsi, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 36Bh call inline_mysql_mutex_lock_22 mov rax, [rbp+var_2E8] mov eax, [rax+0Ch] and eax, 9 cmp eax, 0 jnz short loc_DBE50 lea rdi, [rbp+var_210] call get_charsets_dir mov rdi, rax mov rax, [rbp+var_2E8] mov rsi, [rax+10h] lea rdx, aIndexXml+5; ".xml" xor eax, eax mov ecx, eax mov al, 0 call strxmov lea rdi, [rbp+var_2C0] call my_charset_loader_init_mysys lea rsi, [rbp+var_210] mov rdx, [rbp+var_2E0] lea rdi, [rbp+var_2C0] call my_read_charset_file loc_DBE50: mov rax, [rbp+var_2E8] mov eax, [rax+0Ch] and eax, 200h cmp eax, 0 jz loc_DBF70 mov rax, [rbp+var_2E8] mov eax, [rax+0Ch] and eax, 100h cmp eax, 0 jnz loc_DBF63 mov rdi, [rbp+var_2E8] call simple_8bit_charset_data_is_full cmp al, 0 jnz short loc_DBEC2 mov rdi, [rbp+var_2E8] call find_charset_data_inheritance_source mov [rbp+var_2F0], rax cmp [rbp+var_2F0], 0 jz short loc_DBEC0 mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2F0] call inherit_charset_data loc_DBEC0: jmp short $+2 loc_DBEC2: mov rdi, [rbp+var_2E8] call simple_8bit_collation_data_is_full cmp al, 0 jnz short loc_DBF0B mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2E0] call find_collation_data_inheritance_source mov [rbp+var_2F8], rax cmp [rbp+var_2F8], 0 jz short loc_DBF09 mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2F8] call inherit_collation_data loc_DBF09: jmp short $+2 loc_DBF0B: mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2D0] call my_ci_init_charset movsx eax, al cmp eax, 0 jnz short loc_DBF41 mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2D0] call my_ci_init_collation movsx eax, al cmp eax, 0 jz short loc_DBF4E loc_DBF41: mov [rbp+var_2E8], 0 jmp short loc_DBF61 loc_DBF4E: mov rax, [rbp+var_2E8] mov ecx, [rax+0Ch] or ecx, 100h mov [rax+0Ch], ecx loc_DBF61: jmp short $+2 loc_DBF63: mov edi, [rbp+var_2D4] call my_collation_statistics_inc_use_count jmp short loc_DBF7B loc_DBF70: mov [rbp+var_2E8], 0 loc_DBF7B: lea rdi, THR_LOCK_charset call inline_mysql_mutex_unlock_23 loc_DBF87: mov rax, [rbp+var_2E8] mov [rbp+var_2C8], rax loc_DBF95: mov rax, [rbp+var_2C8] mov [rbp+var_300], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_DBFC5 mov rax, [rbp+var_300] add rsp, 300h pop rbp retn loc_DBFC5: call ___stack_chk_fail
long long get_internal_charset(long long a1, unsigned int a2, long long a3) { int charsets_dir; // eax int v4; // r8d int v5; // r9d long long collation_data_inheritance_source; // [rsp+8h] [rbp-2F8h] long long charset_data_inheritance_source; // [rsp+10h] [rbp-2F0h] long long v9; // [rsp+18h] [rbp-2E8h] _BYTE v12[176]; // [rsp+40h] [rbp-2C0h] BYREF _BYTE v13[520]; // [rsp+F0h] [rbp-210h] BYREF unsigned long long v14; // [rsp+2F8h] [rbp-8h] v14 = __readfsqword(0x28u); v9 = all_charsets[a2]; if ( !v9 ) return v9; if ( (*(_DWORD *)(v9 + 12) & 0x100) == 0 ) { inline_mysql_mutex_lock_22(&THR_LOCK_charset, "/workspace/llm4binary/github2025/eloqsql/mysys/charset.c", 875LL); if ( (*(_DWORD *)(v9 + 12) & 9) == 0 ) { charsets_dir = get_charsets_dir((long long)v13); strxmov(charsets_dir, *(_QWORD *)(v9 + 16), (unsigned int)".xml", 0, v4, v5); my_charset_loader_init_mysys((long long)v12); my_read_charset_file(v12, v13, a3); } if ( (*(_DWORD *)(v9 + 12) & 0x200) != 0 ) { if ( (*(_DWORD *)(v9 + 12) & 0x100) == 0 ) { if ( !(unsigned __int8)simple_8bit_charset_data_is_full(v9) ) { charset_data_inheritance_source = find_charset_data_inheritance_source(v9); if ( charset_data_inheritance_source ) inherit_charset_data(v9, charset_data_inheritance_source); } if ( !(unsigned __int8)simple_8bit_collation_data_is_full(v9) ) { collation_data_inheritance_source = find_collation_data_inheritance_source(v9, a3); if ( collation_data_inheritance_source ) inherit_collation_data(v9, collation_data_inheritance_source); } if ( (unsigned __int8)my_ci_init_charset(v9, a1) || (unsigned __int8)my_ci_init_collation(v9, a1) ) v9 = 0LL; else *(_DWORD *)(v9 + 12) |= 0x100u; } my_collation_statistics_inc_use_count(a2); } else { v9 = 0LL; } inline_mysql_mutex_unlock_23(&THR_LOCK_charset); return v9; } my_collation_statistics_inc_use_count(a2); return v9; }
get_internal_charset: PUSH RBP MOV RBP,RSP SUB RSP,0x300 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x2d0],RDI MOV dword ptr [RBP + -0x2d4],ESI MOV qword ptr [RBP + -0x2e0],RDX JMP 0x001dbd7e LAB_001dbd7e: MOV EAX,dword ptr [RBP + -0x2d4] MOV ECX,EAX LEA RAX,[0xd7a380] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x2e8],RAX CMP RAX,0x0 JZ 0x001dbf87 MOV RAX,qword ptr [RBP + -0x2e8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x100 CMP EAX,0x0 JZ 0x001dbdd4 MOV EDI,dword ptr [RBP + -0x2d4] CALL 0x001dd6e0 MOV RAX,qword ptr [RBP + -0x2e8] MOV qword ptr [RBP + -0x2c8],RAX JMP 0x001dbf95 LAB_001dbdd4: LEA RDI,[0xd831a0] LEA RSI,[0x253d19] MOV EDX,0x36b CALL 0x001dd710 MOV RAX,qword ptr [RBP + -0x2e8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x9 CMP EAX,0x0 JNZ 0x001dbe50 LEA RDI,[RBP + -0x210] CALL 0x001db3c0 MOV RDI,RAX MOV RAX,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RAX + 0x10] LEA RDX,[0x253cfc] XOR EAX,EAX MOV ECX,EAX MOV AL,0x0 CALL 0x0024de40 LEA RDI,[RBP + -0x2c0] CALL 0x001dad20 LEA RSI,[RBP + -0x210] MOV RDX,qword ptr [RBP + -0x2e0] LEA RDI,[RBP + -0x2c0] CALL 0x001dd260 LAB_001dbe50: MOV RAX,qword ptr [RBP + -0x2e8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x200 CMP EAX,0x0 JZ 0x001dbf70 MOV RAX,qword ptr [RBP + -0x2e8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x100 CMP EAX,0x0 JNZ 0x001dbf63 MOV RDI,qword ptr [RBP + -0x2e8] CALL 0x001dd180 CMP AL,0x0 JNZ 0x001dbec2 MOV RDI,qword ptr [RBP + -0x2e8] CALL 0x001dd780 MOV qword ptr [RBP + -0x2f0],RAX CMP qword ptr [RBP + -0x2f0],0x0 JZ 0x001dbec0 MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2f0] CALL 0x001dd7c0 LAB_001dbec0: JMP 0x001dbec2 LAB_001dbec2: MOV RDI,qword ptr [RBP + -0x2e8] CALL 0x001dd1e0 CMP AL,0x0 JNZ 0x001dbf0b MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2e0] CALL 0x001dd840 MOV qword ptr [RBP + -0x2f8],RAX CMP qword ptr [RBP + -0x2f8],0x0 JZ 0x001dbf09 MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2f8] CALL 0x001dd950 LAB_001dbf09: JMP 0x001dbf0b LAB_001dbf0b: MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2d0] CALL 0x001dd990 MOVSX EAX,AL CMP EAX,0x0 JNZ 0x001dbf41 MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2d0] CALL 0x001dd9e0 MOVSX EAX,AL CMP EAX,0x0 JZ 0x001dbf4e LAB_001dbf41: MOV qword ptr [RBP + -0x2e8],0x0 JMP 0x001dbf61 LAB_001dbf4e: MOV RAX,qword ptr [RBP + -0x2e8] MOV ECX,dword ptr [RAX + 0xc] OR ECX,0x100 MOV dword ptr [RAX + 0xc],ECX LAB_001dbf61: JMP 0x001dbf63 LAB_001dbf63: MOV EDI,dword ptr [RBP + -0x2d4] CALL 0x001dd6e0 JMP 0x001dbf7b LAB_001dbf70: MOV qword ptr [RBP + -0x2e8],0x0 LAB_001dbf7b: LEA RDI,[0xd831a0] CALL 0x001dda30 LAB_001dbf87: MOV RAX,qword ptr [RBP + -0x2e8] MOV qword ptr [RBP + -0x2c8],RAX LAB_001dbf95: MOV RAX,qword ptr [RBP + -0x2c8] MOV qword ptr [RBP + -0x300],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001dbfc5 MOV RAX,qword ptr [RBP + -0x300] ADD RSP,0x300 POP RBP RET LAB_001dbfc5: CALL 0x0012a250
long get_internal_charset(int8 param_1,uint param_2,int8 param_3) { char cVar1; int8 uVar2; long lVar3; long in_FS_OFFSET; long local_2f0; int1 local_2c8 [176]; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_2f0 = (&all_charsets)[param_2]; if (local_2f0 != 0) { if ((*(uint *)(local_2f0 + 0xc) & 0x100) == 0) { inline_mysql_mutex_lock (THR_LOCK_charset,"/workspace/llm4binary/github2025/eloqsql/mysys/charset.c",0x36b); if ((*(uint *)(local_2f0 + 0xc) & 9) == 0) { uVar2 = get_charsets_dir(local_218); strxmov(uVar2,*(int8 *)(local_2f0 + 0x10),".xml",0); my_charset_loader_init_mysys(local_2c8); my_read_charset_file(local_2c8,local_218,param_3); } if ((*(uint *)(local_2f0 + 0xc) & 0x200) == 0) { local_2f0 = 0; } else { if ((*(uint *)(local_2f0 + 0xc) & 0x100) == 0) { cVar1 = simple_8bit_charset_data_is_full(local_2f0); if ((cVar1 == '\0') && (lVar3 = find_charset_data_inheritance_source(local_2f0), lVar3 != 0)) { inherit_charset_data(local_2f0,lVar3); } cVar1 = simple_8bit_collation_data_is_full(local_2f0); if ((cVar1 == '\0') && (lVar3 = find_collation_data_inheritance_source(local_2f0,param_3), lVar3 != 0)) { inherit_collation_data(local_2f0,lVar3); } cVar1 = my_ci_init_charset(local_2f0,param_1); if ((cVar1 == '\0') && (cVar1 = my_ci_init_collation(local_2f0,param_1), cVar1 == '\0')) { *(uint *)(local_2f0 + 0xc) = *(uint *)(local_2f0 + 0xc) | 0x100; } else { local_2f0 = 0; } } my_collation_statistics_inc_use_count(param_2); } inline_mysql_mutex_unlock(THR_LOCK_charset); } else { my_collation_statistics_inc_use_count(param_2); } } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_2f0; }
4,695
ModbusTcpServer::createTcpPort(ModbusTcpSocket*)
serhmarch[P]ModbusBridge/modbus/src/ModbusTcpServer.cpp
ModbusServerPort *ModbusTcpServer::createTcpPort(ModbusTcpSocket *socket) { ModbusTcpPort *tcp = new ModbusTcpPort(socket); tcp->setTimeout(timeout()); ModbusServerResource *c = new ModbusServerResource(tcp, device()); String host, service; if (ModbusTcpServerPrivate::getHostService(socket, host, service)) { String name = host + StringLiteral(":") + service; c->setObjectName(name.data()); } return c; }
O3
cpp
ModbusTcpServer::createTcpPort(ModbusTcpSocket*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rsi, %r14 movq %rdi, %r12 movl $0x10, %edi callq 0x5300 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x1031c movq 0x8(%r12), %rax movl 0xbc(%rax), %esi movq %r15, %rdi callq 0x91be movl $0x10, %edi callq 0x5300 movq %rax, %rbx movq %r12, %rdi callq 0xef68 movq %rbx, %rdi movq %r15, %rsi movq %rax, %rdx callq 0xdd20 leaq 0x78(%rsp), %r15 movq %r15, -0x10(%r15) xorl %eax, %eax movq %rax, -0x8(%r15) movb %al, (%r15) leaq 0x58(%rsp), %r12 movq %r12, -0x10(%r12) movq %rax, -0x8(%r12) movb %al, (%r12) leaq 0x68(%rsp), %rsi leaq 0x48(%rsp), %rdx movq %r14, %rdi callq 0x17ad8 testb %al, %al je 0xf899 leaq 0x18(%rsp), %r13 movq %r13, -0x10(%r13) movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx addq %rsi, %rdx leaq 0x8(%rsp), %rdi callq 0xfa86 leaq 0x8cec(%rip), %rsi # 0x184e3 leaq 0x8(%rsp), %rdi callq 0x5590 movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x5110 leaq 0x38(%rsp), %rbp movq %rbp, -0x10(%rbp) movq (%rax), %rsi movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rsi je 0xf83c movq %rsi, 0x28(%rsp) movq (%rcx), %rdx movq %rdx, 0x38(%rsp) jmp 0xf846 movups (%rcx), %xmm0 movups %xmm0, (%rbp) movq %rbp, %rsi movq 0x8(%rax), %rdx movq %rdx, 0x30(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0xf87a movq 0x18(%rsp), %rsi incq %rsi callq 0x5310 movq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x8a4c movq 0x28(%rsp), %rdi cmpq %rbp, %rdi je 0xf899 movq 0x38(%rsp), %rsi incq %rsi callq 0x5310 movq 0x48(%rsp), %rdi cmpq %r12, %rdi je 0xf8b0 movq 0x58(%rsp), %rsi incq %rsi callq 0x5310 movq 0x68(%rsp), %rdi cmpq %r15, %rdi je 0xf8c7 movq 0x78(%rsp), %rsi incq %rsi callq 0x5310 movq %rbx, %rax addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq 0x28(%rsp), %rdi cmpq %rbp, %rdi je 0xf913 movq 0x38(%rsp), %rsi jmp 0xf904 jmp 0xf8f2 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0xf913 movq 0x18(%rsp), %rsi incq %rsi callq 0x5310 jmp 0xf913 jmp 0xf910 movq %rax, %r14 movq 0x48(%rsp), %rdi cmpq %r12, %rdi je 0xf92a movq 0x58(%rsp), %rsi incq %rsi callq 0x5310 movq 0x68(%rsp), %rdi cmpq %r15, %rdi je 0xf95b movq 0x78(%rsp), %rsi incq %rsi jmp 0xf956 movq %rax, %r14 movl $0x10, %esi movq %r15, %rdi jmp 0xf956 movq %rax, %r14 movl $0x10, %esi movq %rbx, %rdi callq 0x5310 movq %r14, %rdi callq 0x5550 nop
_ZN15ModbusTcpServer13createTcpPortEP15ModbusTcpSocket: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov r14, rsi mov r12, rdi mov edi, 10h; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax mov rsi, r14 xor edx, edx call _ZN13ModbusTcpPortC2EP15ModbusTcpSocketb; ModbusTcpPort::ModbusTcpPort(ModbusTcpSocket *,bool) mov rax, [r12+8] mov esi, [rax+0BCh]; unsigned int mov rdi, r15; this call _ZN10ModbusPort10setTimeoutEj; ModbusPort::setTimeout(uint) mov edi, 10h; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax mov rdi, r12; this call _ZNK16ModbusServerPort6deviceEv; ModbusServerPort::device(void) mov rdi, rbx; this mov rsi, r15; ModbusPort * mov rdx, rax; ModbusInterface * call _ZN20ModbusServerResourceC2EP10ModbusPortP15ModbusInterface; ModbusServerResource::ModbusServerResource(ModbusPort *,ModbusInterface *) lea r15, [rsp+0B8h+var_40] mov [r15-10h], r15 xor eax, eax mov [r15-8], rax mov [r15], al lea r12, [rsp+0B8h+var_60] mov [r12-10h], r12 mov [r12-8], rax mov [r12], al lea rsi, [rsp+0B8h+var_50] lea rdx, [rsp+0B8h+var_70] mov rdi, r14 call _ZN22ModbusTcpServerPrivate14getHostServiceEP15ModbusTcpSocketRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_; ModbusTcpServerPrivate::getHostService(ModbusTcpSocket *,std::string &,std::string &) test al, al jz loc_F899 lea r13, [rsp+0B8h+var_A0] mov [r13-10h], r13 mov rsi, [rsp+0B8h+var_50] mov rdx, [rsp+0B8h+var_48] add rdx, rsi lea rdi, [rsp+0B8h+var_B0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, asc_184E2+1; ":" lea rdi, [rsp+0B8h+var_B0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [rsp+0B8h+var_70] mov rdx, [rsp+0B8h+var_68] lea rdi, [rsp+0B8h+var_B0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) lea rbp, [rsp+0B8h+var_80] mov [rbp-10h], rbp mov rsi, [rax] mov rcx, rax add rcx, 10h cmp rsi, rcx jz short loc_F83C mov [rsp+0B8h+var_90], rsi mov rdx, [rcx] mov [rsp+0B8h+var_80], rdx jmp short loc_F846 loc_F83C: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rbp+0], xmm0 mov rsi, rbp loc_F846: mov rdx, [rax+8] mov [rsp+0B8h+var_88], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rdi, [rsp+0B8h+var_B0]; void * cmp rdi, r13 jz short loc_F87A mov rsi, [rsp+0B8h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) mov rsi, [rsp+0B8h+var_90]; char * loc_F87A: mov rdi, rbx; this call _ZN12ModbusObject13setObjectNameEPKc; ModbusObject::setObjectName(char const*) mov rdi, [rsp+0B8h+var_90]; void * cmp rdi, rbp jz short loc_F899 mov rsi, [rsp+0B8h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F899: mov rdi, [rsp+0B8h+var_70]; void * cmp rdi, r12 jz short loc_F8B0 mov rsi, [rsp+0B8h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F8B0: mov rdi, [rsp+0B8h+var_50]; void * cmp rdi, r15 jz short loc_F8C7 mov rsi, [rsp+0B8h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F8C7: mov rax, rbx add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [rsp+arg_20] cmp rdi, rbp jz short loc_F913 mov rsi, [rsp+arg_30] jmp short loc_F904 jmp short $+2 loc_F8F2: mov r14, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r13 jz short loc_F913 mov rsi, [rsp+arg_10] loc_F904: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_F913 jmp short $+2 loc_F910: mov r14, rax loc_F913: mov rdi, [rsp+arg_40]; void * cmp rdi, r12 jz short loc_F92A mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F92A: mov rdi, [rsp+arg_60] cmp rdi, r15 jz short loc_F95B mov rsi, [rsp+arg_70] inc rsi jmp short loc_F956 mov r14, rax mov esi, 10h mov rdi, r15 jmp short loc_F956 mov r14, rax mov esi, 10h; unsigned __int64 mov rdi, rbx; void * loc_F956: call __ZdlPvm; operator delete(void *,ulong) loc_F95B: mov rdi, r14 call __Unwind_Resume
ModbusServerResource * ModbusTcpServer::createTcpPort(ModbusServerPort *this, long long a2) { ModbusPort *v2; // r15 ModbusServerResource *v3; // rbx ModbusInterface *v4; // rax long long v5; // rax const char *v6; // rsi __int128 *v7; // rcx void *v9[2]; // [rsp+8h] [rbp-B0h] BYREF _QWORD v10[2]; // [rsp+18h] [rbp-A0h] BYREF char *v11; // [rsp+28h] [rbp-90h] long long v12; // [rsp+30h] [rbp-88h] __int128 v13; // [rsp+38h] [rbp-80h] BYREF void *v14; // [rsp+48h] [rbp-70h] BYREF long long v15; // [rsp+50h] [rbp-68h] _QWORD v16[2]; // [rsp+58h] [rbp-60h] BYREF void *v17; // [rsp+68h] [rbp-50h] BYREF long long v18; // [rsp+70h] [rbp-48h] _QWORD v19[8]; // [rsp+78h] [rbp-40h] BYREF v2 = (ModbusPort *)operator new(0x10uLL); ModbusTcpPort::ModbusTcpPort(v2, a2, 0LL); ModbusPort::setTimeout(v2, *(_DWORD *)(*((_QWORD *)this + 1) + 188LL)); v3 = (ModbusServerResource *)operator new(0x10uLL); v4 = (ModbusInterface *)ModbusServerPort::device(this); ModbusServerResource::ModbusServerResource(v3, v2, v4); v17 = v19; v18 = 0LL; LOBYTE(v19[0]) = 0; v14 = v16; v15 = 0LL; LOBYTE(v16[0]) = 0; if ( (unsigned __int8)ModbusTcpServerPrivate::getHostService(a2, &v17, &v14) ) { v9[0] = v10; std::string::_M_construct<char *>(v9, v17, (char *)v17 + v18); std::string::append(v9, ":"); v5 = std::string::_M_append(v9, v14, v15); v11 = (char *)&v13; v6 = *(const char **)v5; v7 = (__int128 *)(v5 + 16); if ( *(_QWORD *)v5 == v5 + 16 ) { v13 = *v7; v6 = (const char *)&v13; } else { v11 = *(char **)v5; *(_QWORD *)&v13 = *(_QWORD *)v7; } v12 = *(_QWORD *)(v5 + 8); *(_QWORD *)v5 = v7; *(_QWORD *)(v5 + 8) = 0LL; *(_BYTE *)(v5 + 16) = 0; if ( v9[0] != v10 ) { operator delete(v9[0], v10[0] + 1LL); v6 = v11; } ModbusObject::setObjectName(v3, v6); if ( v11 != (char *)&v13 ) operator delete(v11, v13 + 1); } if ( v14 != v16 ) operator delete(v14, v16[0] + 1LL); if ( v17 != v19 ) operator delete(v17, v19[0] + 1LL); return v3; }
createTcpPort: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV R14,RSI MOV R12,RDI MOV EDI,0x10 CALL 0x00105300 MOV R15,RAX LAB_0010f74e: MOV RDI,RAX MOV RSI,R14 XOR EDX,EDX CALL 0x0011031c LAB_0010f75b: MOV RAX,qword ptr [R12 + 0x8] MOV ESI,dword ptr [RAX + 0xbc] MOV RDI,R15 CALL 0x001091be MOV EDI,0x10 CALL 0x00105300 MOV RBX,RAX LAB_0010f77b: MOV RDI,R12 CALL 0x0010ef68 MOV RDI,RBX MOV RSI,R15 MOV RDX,RAX CALL 0x0010dd20 LEA R15,[RSP + 0x78] MOV qword ptr [R15 + -0x10],R15 XOR EAX,EAX MOV qword ptr [R15 + -0x8],RAX MOV byte ptr [R15],AL LEA R12,[RSP + 0x58] MOV qword ptr [R12 + -0x10],R12 MOV qword ptr [R12 + -0x8],RAX MOV byte ptr [R12],AL LAB_0010f7b6: LEA RSI,[RSP + 0x68] LEA RDX,[RSP + 0x48] MOV RDI,R14 CALL 0x00117ad8 TEST AL,AL JZ 0x0010f899 LEA R13,[RSP + 0x18] MOV qword ptr [R13 + -0x10],R13 MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] ADD RDX,RSI LAB_0010f7e6: LEA RDI,[RSP + 0x8] CALL 0x0010fa86 LAB_0010f7f0: LEA RSI,[0x1184e3] LEA RDI,[RSP + 0x8] CALL 0x00105590 MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] LAB_0010f80b: LEA RDI,[RSP + 0x8] CALL 0x00105110 LEA RBP,[RSP + 0x38] MOV qword ptr [RBP + -0x10],RBP MOV RSI,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RSI,RCX JZ 0x0010f83c MOV qword ptr [RSP + 0x28],RSI MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x38],RDX JMP 0x0010f846 LAB_0010f83c: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RBP],XMM0 MOV RSI,RBP LAB_0010f846: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R13 JZ 0x0010f87a MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00105310 MOV RSI,qword ptr [RSP + 0x28] LAB_0010f87a: MOV RDI,RBX CALL 0x00108a4c LAB_0010f882: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,RBP JZ 0x0010f899 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x00105310 LAB_0010f899: MOV RDI,qword ptr [RSP + 0x48] CMP RDI,R12 JZ 0x0010f8b0 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x00105310 LAB_0010f8b0: MOV RDI,qword ptr [RSP + 0x68] CMP RDI,R15 JZ 0x0010f8c7 MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x00105310 LAB_0010f8c7: MOV RAX,RBX ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* ModbusTcpServer::createTcpPort(ModbusTcpSocket*) */ ModbusServerResource * __thiscall ModbusTcpServer::createTcpPort(ModbusTcpServer *this,ModbusTcpSocket *param_1) { char cVar1; ModbusTcpPort *this_00; ModbusServerResource *this_01; ModbusInterface *pMVar2; long *plVar3; long *plVar4; long *local_b0 [2]; long local_a0 [2]; long *local_90; long local_88; long local_80; long lStack_78; int1 *local_70; int8 local_68; int1 local_60; int7 uStack_5f; int1 *local_50; long local_48; int1 local_40; int7 uStack_3f; this_00 = (ModbusTcpPort *)operator_new(0x10); /* try { // try from 0010f74e to 0010f75a has its CatchHandler @ 0010f93e */ ModbusTcpPort::ModbusTcpPort(this_00,param_1,false); ModbusPort::setTimeout((ModbusPort *)this_00,*(uint *)(*(long *)(this + 8) + 0xbc)); this_01 = (ModbusServerResource *)operator_new(0x10); /* try { // try from 0010f77b to 0010f790 has its CatchHandler @ 0010f94b */ pMVar2 = (ModbusInterface *)ModbusServerPort::device((ModbusServerPort *)this); ModbusServerResource::ModbusServerResource(this_01,(ModbusPort *)this_00,pMVar2); local_48 = 0; local_40 = 0; local_68 = 0; local_60 = 0; /* try { // try from 0010f7b6 to 0010f7c7 has its CatchHandler @ 0010f910 */ local_70 = &local_60; local_50 = &local_40; cVar1 = ModbusTcpServerPrivate::getHostService(param_1,(string *)&local_50,(string *)&local_70); if (cVar1 != '\0') { /* try { // try from 0010f7e6 to 0010f7ef has its CatchHandler @ 0010f90e */ local_b0[0] = local_a0; std::__cxx11::string::_M_construct<char*>(local_b0,local_50,local_50 + local_48); /* try { // try from 0010f7f0 to 0010f800 has its CatchHandler @ 0010f8f2 */ std::__cxx11::string::append((char *)local_b0); /* try { // try from 0010f80b to 0010f814 has its CatchHandler @ 0010f8f0 */ plVar3 = (long *)std::__cxx11::string::_M_append((char *)local_b0,(ulong)local_70); plVar4 = plVar3 + 2; if ((long *)*plVar3 == plVar4) { local_80 = *plVar4; lStack_78 = plVar3[3]; local_90 = &local_80; } else { local_80 = *plVar4; local_90 = (long *)*plVar3; } local_88 = plVar3[1]; *plVar3 = (long)plVar4; plVar3[1] = 0; *(int1 *)(plVar3 + 2) = 0; if (local_b0[0] != local_a0) { operator_delete(local_b0[0],local_a0[0] + 1); } /* try { // try from 0010f87a to 0010f881 has its CatchHandler @ 0010f8dc */ ModbusObject::setObjectName((ModbusObject *)this_01,(char *)local_90); if (local_90 != &local_80) { operator_delete(local_90,local_80 + 1); } } if (local_70 != &local_60) { operator_delete(local_70,CONCAT71(uStack_5f,local_60) + 1); } if (local_50 != &local_40) { operator_delete(local_50,CONCAT71(uStack_3f,local_40) + 1); } return this_01; }
4,696
ft_boolean_check_syntax_string
eloqsql/storage/myisam/ft_parser.c
my_bool ft_boolean_check_syntax_string(const uchar *str, size_t length, CHARSET_INFO *cs) { uint i, j; if (cs->mbminlen != 1) { DBUG_ASSERT(0); return 1; } if (!str || (length + 1 != sizeof(DEFAULT_FTB_SYNTAX)) || (str[0] != ' ' && str[1] != ' ')) return 1; for (i=0; i<sizeof(DEFAULT_FTB_SYNTAX); i++) { /* limiting to 7-bit ascii only */ if ((unsigned char)(str[i]) > 127 || my_isalnum(cs, str[i])) return 1; for (j=0; j<i; j++) if (str[i] == str[j] && (i != 11 || j != 10)) return 1; } return 0; }
O0
c
ft_boolean_check_syntax_string: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x20(%rbp), %rax cmpl $0x1, 0x98(%rax) je 0x7d5fa jmp 0x7d5ef jmp 0x7d5f1 movb $0x1, -0x1(%rbp) jmp 0x7d6d7 cmpq $0x0, -0x10(%rbp) je 0x7d628 movq -0x18(%rbp), %rax addq $0x1, %rax cmpq $0xf, %rax jne 0x7d628 movq -0x10(%rbp), %rax movzbl (%rax), %eax cmpl $0x20, %eax je 0x7d631 movq -0x10(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x20, %eax je 0x7d631 movb $0x1, -0x1(%rbp) jmp 0x7d6d7 movl $0x0, -0x24(%rbp) movl -0x24(%rbp), %eax cmpq $0xf, %rax jae 0x7d6d3 movq -0x10(%rbp), %rax movl -0x24(%rbp), %ecx movzbl (%rax,%rcx), %eax cmpl $0x7f, %eax jg 0x7d675 movq -0x20(%rbp), %rax movq 0x40(%rax), %rax movq -0x10(%rbp), %rcx movl -0x24(%rbp), %edx movzbl (%rcx,%rdx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x7, %eax cmpl $0x0, %eax je 0x7d67b movb $0x1, -0x1(%rbp) jmp 0x7d6d7 movl $0x0, -0x28(%rbp) movl -0x28(%rbp), %eax cmpl -0x24(%rbp), %eax jae 0x7d6c3 movq -0x10(%rbp), %rax movl -0x24(%rbp), %ecx movzbl (%rax,%rcx), %eax movq -0x10(%rbp), %rcx movl -0x28(%rbp), %edx movzbl (%rcx,%rdx), %ecx cmpl %ecx, %eax jne 0x7d6b6 cmpl $0xb, -0x24(%rbp) jne 0x7d6b0 cmpl $0xa, -0x28(%rbp) je 0x7d6b6 movb $0x1, -0x1(%rbp) jmp 0x7d6d7 jmp 0x7d6b8 movl -0x28(%rbp), %eax addl $0x1, %eax movl %eax, -0x28(%rbp) jmp 0x7d682 jmp 0x7d6c5 movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0x7d638 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al popq %rbp retq nopl (%rax)
ft_boolean_check_syntax_string: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_20] cmp dword ptr [rax+98h], 1 jz short loc_7D5FA jmp short $+2 loc_7D5EF: jmp short $+2 loc_7D5F1: mov [rbp+var_1], 1 jmp loc_7D6D7 loc_7D5FA: cmp [rbp+var_10], 0 jz short loc_7D628 mov rax, [rbp+var_18] add rax, 1 cmp rax, 0Fh jnz short loc_7D628 mov rax, [rbp+var_10] movzx eax, byte ptr [rax] cmp eax, 20h ; ' ' jz short loc_7D631 mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1] cmp eax, 20h ; ' ' jz short loc_7D631 loc_7D628: mov [rbp+var_1], 1 jmp loc_7D6D7 loc_7D631: mov [rbp+var_24], 0 loc_7D638: mov eax, [rbp+var_24] cmp rax, 0Fh jnb loc_7D6D3 mov rax, [rbp+var_10] mov ecx, [rbp+var_24] movzx eax, byte ptr [rax+rcx] cmp eax, 7Fh jg short loc_7D675 mov rax, [rbp+var_20] mov rax, [rax+40h] mov rcx, [rbp+var_10] mov edx, [rbp+var_24] movzx ecx, byte ptr [rcx+rdx] movzx eax, byte ptr [rax+rcx+1] and eax, 7 cmp eax, 0 jz short loc_7D67B loc_7D675: mov [rbp+var_1], 1 jmp short loc_7D6D7 loc_7D67B: mov [rbp+var_28], 0 loc_7D682: mov eax, [rbp+var_28] cmp eax, [rbp+var_24] jnb short loc_7D6C3 mov rax, [rbp+var_10] mov ecx, [rbp+var_24] movzx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_10] mov edx, [rbp+var_28] movzx ecx, byte ptr [rcx+rdx] cmp eax, ecx jnz short loc_7D6B6 cmp [rbp+var_24], 0Bh jnz short loc_7D6B0 cmp [rbp+var_28], 0Ah jz short loc_7D6B6 loc_7D6B0: mov [rbp+var_1], 1 jmp short loc_7D6D7 loc_7D6B6: jmp short $+2 loc_7D6B8: mov eax, [rbp+var_28] add eax, 1 mov [rbp+var_28], eax jmp short loc_7D682 loc_7D6C3: jmp short $+2 loc_7D6C5: mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp loc_7D638 loc_7D6D3: mov [rbp+var_1], 0 loc_7D6D7: mov al, [rbp+var_1] pop rbp retn
char ft_boolean_check_syntax_string(_BYTE *a1, long long a2, long long a3) { unsigned int j; // [rsp+0h] [rbp-28h] unsigned int i; // [rsp+4h] [rbp-24h] if ( *(_DWORD *)(a3 + 152) != 1 ) return 1; if ( !a1 || a2 != 14 || *a1 != 32 && a1[1] != 32 ) return 1; for ( i = 0; i < 0xFuLL; ++i ) { if ( (unsigned __int8)a1[i] > 0x7Fu || (*(_BYTE *)(*(_QWORD *)(a3 + 64) + (unsigned __int8)a1[i] + 1LL) & 7) != 0 ) return 1; for ( j = 0; j < i; ++j ) { if ( a1[i] == a1[j] && (i != 11 || j != 10) ) return 1; } } return 0; }
ft_boolean_check_syntax_string: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x98],0x1 JZ 0x0017d5fa JMP 0x0017d5ef LAB_0017d5ef: JMP 0x0017d5f1 LAB_0017d5f1: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0017d6d7 LAB_0017d5fa: CMP qword ptr [RBP + -0x10],0x0 JZ 0x0017d628 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 CMP RAX,0xf JNZ 0x0017d628 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0x20 JZ 0x0017d631 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x20 JZ 0x0017d631 LAB_0017d628: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0017d6d7 LAB_0017d631: MOV dword ptr [RBP + -0x24],0x0 LAB_0017d638: MOV EAX,dword ptr [RBP + -0x24] CMP RAX,0xf JNC 0x0017d6d3 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x24] MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x7f JG 0x0017d675 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x24] MOVZX ECX,byte ptr [RCX + RDX*0x1] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x7 CMP EAX,0x0 JZ 0x0017d67b LAB_0017d675: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0017d6d7 LAB_0017d67b: MOV dword ptr [RBP + -0x28],0x0 LAB_0017d682: MOV EAX,dword ptr [RBP + -0x28] CMP EAX,dword ptr [RBP + -0x24] JNC 0x0017d6c3 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x24] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x28] MOVZX ECX,byte ptr [RCX + RDX*0x1] CMP EAX,ECX JNZ 0x0017d6b6 CMP dword ptr [RBP + -0x24],0xb JNZ 0x0017d6b0 CMP dword ptr [RBP + -0x28],0xa JZ 0x0017d6b6 LAB_0017d6b0: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0017d6d7 LAB_0017d6b6: JMP 0x0017d6b8 LAB_0017d6b8: MOV EAX,dword ptr [RBP + -0x28] ADD EAX,0x1 MOV dword ptr [RBP + -0x28],EAX JMP 0x0017d682 LAB_0017d6c3: JMP 0x0017d6c5 LAB_0017d6c5: MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x0017d638 LAB_0017d6d3: MOV byte ptr [RBP + -0x1],0x0 LAB_0017d6d7: MOV AL,byte ptr [RBP + -0x1] POP RBP RET
int1 ft_boolean_check_syntax_string(char *param_1,long param_2,long param_3) { uint local_30; uint local_2c; int1 local_9; if (*(int *)(param_3 + 0x98) == 1) { if (((param_1 == (char *)0x0) || (param_2 != 0xe)) || ((*param_1 != ' ' && (param_1[1] != ' '))) ) { local_9 = 1; } else { for (local_2c = 0; local_2c < 0xf; local_2c = local_2c + 1) { if ((0x7f < (byte)param_1[local_2c]) || ((*(byte *)(*(long *)(param_3 + 0x40) + 1 + (ulong)(byte)param_1[local_2c]) & 7) != 0)) { return 1; } for (local_30 = 0; local_30 < local_2c; local_30 = local_30 + 1) { if ((param_1[local_2c] == param_1[local_30]) && ((local_2c != 0xb || (local_30 != 10)))) { return 1; } } } local_9 = 0; } } else { local_9 = 1; } return local_9; }
4,697
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::boundaries nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(double)
monkey531[P]llama/common/json.hpp
boundaries compute_boundaries(FloatType value) { JSON_ASSERT(std::isfinite(value)); JSON_ASSERT(value > 0); // Convert the IEEE representation into a diyfp. // // If v is denormal: // value = 0.F * 2^(1 - bias) = ( F) * 2^(1 - bias - (p-1)) // If v is normalized: // value = 1.F * 2^(E - bias) = (2^(p-1) + F) * 2^(E - bias - (p-1)) static_assert(std::numeric_limits<FloatType>::is_iec559, "internal error: dtoa_short requires an IEEE-754 floating-point implementation"); constexpr int kPrecision = std::numeric_limits<FloatType>::digits; // = p (includes the hidden bit) constexpr int kBias = std::numeric_limits<FloatType>::max_exponent - 1 + (kPrecision - 1); constexpr int kMinExp = 1 - kBias; constexpr std::uint64_t kHiddenBit = std::uint64_t{1} << (kPrecision - 1); // = 2^(p-1) using bits_type = typename std::conditional<kPrecision == 24, std::uint32_t, std::uint64_t >::type; const auto bits = static_cast<std::uint64_t>(reinterpret_bits<bits_type>(value)); const std::uint64_t E = bits >> (kPrecision - 1); const std::uint64_t F = bits & (kHiddenBit - 1); const bool is_denormal = E == 0; const diyfp v = is_denormal ? diyfp(F, kMinExp) : diyfp(F + kHiddenBit, static_cast<int>(E) - kBias); // Compute the boundaries m- and m+ of the floating-point value // v = f * 2^e. // // Determine v- and v+, the floating-point predecessor and successor if v, // respectively. // // v- = v - 2^e if f != 2^(p-1) or e == e_min (A) // = v - 2^(e-1) if f == 2^(p-1) and e > e_min (B) // // v+ = v + 2^e // // Let m- = (v- + v) / 2 and m+ = (v + v+) / 2. All real numbers _strictly_ // between m- and m+ round to v, regardless of how the input rounding // algorithm breaks ties. // // ---+-------------+-------------+-------------+-------------+--- (A) // v- m- v m+ v+ // // -----------------+------+------+-------------+-------------+--- (B) // v- m- v m+ v+ const bool lower_boundary_is_closer = F == 0 && E > 1; const diyfp m_plus = diyfp(2 * v.f + 1, v.e - 1); const diyfp m_minus = lower_boundary_is_closer ? diyfp(4 * v.f - 1, v.e - 2) // (B) : diyfp(2 * v.f - 1, v.e - 1); // (A) // Determine the normalized w+ = m+. const diyfp w_plus = diyfp::normalize(m_plus); // Determine w- = m- such that e_(w-) = e_(w+). const diyfp w_minus = diyfp::normalize_to(m_minus, w_plus.e); return {diyfp::normalize(v), w_minus, w_plus}; }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::boundaries nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(double): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %xmm0, %rax movq %rax, %rcx btrq $0x3f, %rcx movabsq $0x7ff0000000000000, %rdx # imm = 0x7FF0000000000000 cmpq %rdx, %rcx jge 0x55524 xorpd %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jbe 0x55540 movq %rdi, %rbx movabsq $0x10000000000000, %rcx # imm = 0x10000000000000 decq %rcx andq %rax, %rcx movq %rax, %rdx shrq $0x34, %rdx movq %rcx, %r14 btsq $0x34, %r14 leal -0x433(%rdx), %esi testq %rdx, %rdx cmoveq %rcx, %r14 movl $0xfffffbce, %r15d # imm = 0xFFFFFBCE cmovnel %esi, %r15d testq %rcx, %rcx sete %cl shrq $0x35, %rax setne %al leaq (%r14,%r14), %rdx leal -0x1(%r15), %esi leaq (,%r14,4), %rdi testb %cl, %al cmoveq %rdx, %rdi leal -0x2(%r15), %eax cmovel %esi, %eax decq %rdi leaq 0x8(%rsp), %r12 movq %rdi, (%r12) movl %eax, 0x8(%r12) leaq 0x1(,%r14,2), %rdi callq 0x55692 movq %rax, (%rsp) movl %edx, %ebp movq %r12, %rdi movl %edx, %esi callq 0x556d4 movq %rax, %r12 movl %edx, %r13d movq %r14, %rdi movl %r15d, %esi callq 0x55692 movq %rax, (%rbx) movl %edx, 0x8(%rbx) movq %r12, 0x10(%rbx) movl %r13d, 0x18(%rbx) movq (%rsp), %rax movq %rax, 0x20(%rbx) movl %ebp, 0x28(%rbx) movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x64f07(%rip), %rdi # 0xba432 leaq 0x60898(%rip), %rdx # 0xb5dca leaq 0x65db3(%rip), %rcx # 0xbb2ec movl $0x42cb, %esi # imm = 0x42CB jmp 0x5555a leaq 0x64eeb(%rip), %rdi # 0xba432 leaq 0x6087c(%rip), %rdx # 0xb5dca leaq 0x65eb0(%rip), %rcx # 0xbb405 movl $0x42cc, %esi # imm = 0x42CC xorl %eax, %eax callq 0x19b10
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl18compute_boundariesIdEENS2_10boundariesET_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h movq rax, xmm0 mov rcx, rax btr rcx, 3Fh ; '?' mov rdx, 7FF0000000000000h cmp rcx, rdx jge loc_55524 xorpd xmm1, xmm1 ucomisd xmm0, xmm1 jbe loc_55540 mov rbx, rdi mov rcx, 10000000000000h dec rcx and rcx, rax mov rdx, rax shr rdx, 34h mov r14, rcx bts r14, 34h ; '4' lea esi, [rdx-433h] test rdx, rdx cmovz r14, rcx mov r15d, 0FFFFFBCEh cmovnz r15d, esi test rcx, rcx setz cl shr rax, 35h setnz al lea rdx, [r14+r14] lea esi, [r15-1] lea rdi, ds:0[r14*4] test al, cl cmovz rdi, rdx lea eax, [r15-2] cmovz eax, esi dec rdi lea r12, [rsp+48h+var_40] mov [r12], rdi mov [r12+8], eax lea rdi, ds:1[r14*2] call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp9normalizeES3_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) mov [rsp+48h+var_48], rax mov ebp, edx mov rdi, r12 mov esi, edx call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp12normalize_toERKS3_i; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize_to(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,int) mov r12, rax mov r13d, edx mov rdi, r14 mov esi, r15d call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp9normalizeES3_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) mov [rbx], rax mov [rbx+8], edx mov [rbx+10h], r12 mov [rbx+18h], r13d mov rax, [rsp+48h+var_48] mov [rbx+20h], rax mov [rbx+28h], ebp mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_55524: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aStdIsfiniteVal; "std::isfinite(value)" mov esi, 42CBh jmp short loc_5555A loc_55540: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aValue0; "value > 0" mov esi, 42CCh loc_5555A: xor eax, eax call _ggml_abort
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>( long long a1, double a2, long long a3, long long a4, long long a5, long long a6, long long a7, char a8, int a9, char a10, nlohmann::json_abi_v3_11_3::detail::dtoa_impl *a11) { long long v12; // r14 unsigned int v13; // r15d bool v14; // cl bool v15; // al long long v16; // rdi bool v17; // zf unsigned int v18; // eax unsigned int v19; // edx unsigned int v20; // ebp long long v21; // r12 int v22; // edx int v23; // r13d int v24; // edx int v26; // esi int v27; // edx int v28; // ecx int v29; // r8d int v30; // r9d long long v31; // [rsp+0h] [rbp-48h] long long v32; // [rsp+8h] [rbp-40h] BYREF unsigned int v33; // [rsp+10h] [rbp-38h] if ( (*(_QWORD *)&a2 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL ) { v26 = 17099; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17099LL, "GGML_ASSERT(%s) failed", "std::isfinite(value)"); return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2( (int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", v26, v27, v28, v29, v30, a8, a9, a10, a11); } if ( a2 <= 0.0 ) { v26 = 17100; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17100LL, "GGML_ASSERT(%s) failed", "value > 0"); return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2( (int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", v26, v27, v28, v29, v30, a8, a9, a10, a11); } v12 = *(_QWORD *)&a2 & 0xFFFFFFFFFFFFFLL | 0x10000000000000LL; if ( !(*(_QWORD *)&a2 >> 52) ) v12 = *(_QWORD *)&a2 & 0xFFFFFFFFFFFFFLL; v13 = -1074; if ( *(_QWORD *)&a2 >> 52 ) v13 = (*(_QWORD *)&a2 >> 52) - 1075; v14 = (*(_QWORD *)&a2 & 0xFFFFFFFFFFFFFLL) == 0; v15 = *(_QWORD *)&a2 >> 53 != 0LL; v16 = 4 * v12; v17 = !v14 || !v15; if ( !v14 || !v15 ) v16 = 2 * v12; v18 = v13 - 2; if ( v17 ) v18 = v13 - 1; v32 = v16 - 1; v33 = v18; v31 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(2 * v12 + 1, v13 - 1); v20 = v19; v21 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize_to(&v32, v19); v23 = v22; *(_QWORD *)a1 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(v12, v13); *(_DWORD *)(a1 + 8) = v24; *(_QWORD *)(a1 + 16) = v21; *(_DWORD *)(a1 + 24) = v23; *(_QWORD *)(a1 + 32) = v31; *(_DWORD *)(a1 + 40) = v20; return a1; }
compute_boundaries<double>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOVQ RAX,XMM0 MOV RCX,RAX BTR RCX,0x3f MOV RDX,0x7ff0000000000000 CMP RCX,RDX JGE 0x00155524 XORPD XMM1,XMM1 UCOMISD XMM0,XMM1 JBE 0x00155540 MOV RBX,RDI MOV RCX,0x10000000000000 DEC RCX AND RCX,RAX MOV RDX,RAX SHR RDX,0x34 MOV R14,RCX BTS R14,0x34 LEA ESI,[RDX + -0x433] TEST RDX,RDX CMOVZ R14,RCX MOV R15D,0xfffffbce CMOVNZ R15D,ESI TEST RCX,RCX SETZ CL SHR RAX,0x35 SETNZ AL LEA RDX,[R14 + R14*0x1] LEA ESI,[R15 + -0x1] LEA RDI,[R14*0x4] TEST AL,CL CMOVZ RDI,RDX LEA EAX,[R15 + -0x2] CMOVZ EAX,ESI DEC RDI LEA R12,[RSP + 0x8] MOV qword ptr [R12],RDI MOV dword ptr [R12 + 0x8],EAX LEA RDI,[0x1 + R14*0x2] CALL 0x00155692 MOV qword ptr [RSP],RAX MOV EBP,EDX MOV RDI,R12 MOV ESI,EDX CALL 0x001556d4 MOV R12,RAX MOV R13D,EDX MOV RDI,R14 MOV ESI,R15D CALL 0x00155692 MOV qword ptr [RBX],RAX MOV dword ptr [RBX + 0x8],EDX MOV qword ptr [RBX + 0x10],R12 MOV dword ptr [RBX + 0x18],R13D MOV RAX,qword ptr [RSP] MOV qword ptr [RBX + 0x20],RAX MOV dword ptr [RBX + 0x28],EBP MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00155524: LEA RDI,[0x1ba432] LEA RDX,[0x1b5dca] LEA RCX,[0x1bb2ec] MOV ESI,0x42cb JMP 0x0015555a LAB_00155540: LEA RDI,[0x1ba432] LEA RDX,[0x1b5dca] LEA RCX,[0x1bb405] MOV ESI,0x42cc LAB_0015555a: XOR EAX,EAX CALL 0x00119b10
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::boundaries nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(double) */ dtoa_impl * __thiscall nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double> (dtoa_impl *this,double param_1) { diyfp *pdVar1; char *pcVar2; int8 uVar3; diyfp *pdVar4; int iVar5; bool bVar6; int1 auVar7 [12]; int1 auVar8 [12]; int1 auVar9 [12]; long local_40; int local_38; if ((ulong)ABS(param_1) < 0x7ff0000000000000) { if (0.0 < param_1) { pdVar1 = (diyfp *)((ulong)param_1 & 0xfffffffffffff); bVar6 = (ulong)param_1 >> 0x34 == 0; pdVar4 = (diyfp *)((ulong)pdVar1 | 0x10000000000000); if (bVar6) { pdVar4 = pdVar1; } iVar5 = -0x432; if (!bVar6) { iVar5 = (uint)((ulong)param_1 >> 0x34) - 0x433; } bVar6 = (ulong)param_1 >> 0x35 == 0; local_40 = (long)pdVar4 * 4; if (bVar6 || pdVar1 != (diyfp *)0x0) { local_40 = (long)pdVar4 * 2; } local_38 = iVar5 + -2; if (bVar6 || pdVar1 != (diyfp *)0x0) { local_38 = iVar5 + -1; } local_40 = local_40 + -1; auVar7 = diyfp::normalize((diyfp *)((long)pdVar4 * 2 + 1)); auVar8 = diyfp::normalize_to((diyfp *)&local_40,auVar7._8_4_); auVar9 = diyfp::normalize(pdVar4,iVar5); *(int1 (*) [12])this = auVar9; *(int1 (*) [12])(this + 0x10) = auVar8; *(int1 (*) [12])(this + 0x20) = auVar7; return this; } pcVar2 = "value > 0"; uVar3 = 0x42cc; } else { pcVar2 = "std::isfinite(value)"; uVar3 = 0x42cb; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3, "GGML_ASSERT(%s) failed",pcVar2); }
4,698
my_hash_sort_utf8mb3
eloqsql/strings/ctype-utf8.c
static void my_hash_sort_utf8mb3(CHARSET_INFO *cs, const uchar *s, size_t slen, ulong *nr1, ulong *nr2) { /* Remove end space. We have to do this to be able to compare 'A ' and 'A' as identical */ const uchar *e= skip_trailing_space(s, slen); my_hash_sort_utf8mb3_nopad(cs, s, e - s, nr1, nr2); }
O3
c
my_hash_sort_utf8mb3: pushq %rbp movq %rsp, %rbp leaq (%rsi,%rdx), %r10 cmpq $0x15, %rdx jb 0x5040b movq %r10, %r9 andq $-0x4, %r9 cmpq %rsi, %r9 jbe 0x5040b leaq 0x3(%rsi), %rdx andq $-0x4, %rdx movq %r10, %rax movb -0x1(%r10), %r11b cmpq %r9, %r10 jbe 0x50430 leaq -0x1(%rax), %r10 cmpb $0x20, %r11b je 0x503f3 jmp 0x5040e movq %r10, %rax movq %rax, %r9 subq %rsi, %r9 movq %r9, %rdx cmpq %rsi, %rax jbe 0x5042a cmpb $0x20, -0x1(%rax) leaq -0x1(%rax), %rax leaq -0x1(%rdx), %r9 je 0x50414 popq %rbp jmp 0x50615 cmpb $0x20, %r11b setne %r10b cmpq %r9, %rdx setae %r9b orb %r10b, %r9b jne 0x5040e movq %rax, %r9 movq %r9, %rax cmpq %rdx, %r9 jbe 0x5040e leaq -0x4(%rax), %r9 cmpl $0x20202020, -0x4(%rax) # imm = 0x20202020 je 0x50447 jmp 0x5040e
my_hash_sort_utf8mb3: push rbp mov rbp, rsp lea r10, [rsi+rdx] cmp rdx, 15h jb short loc_5040B mov r9, r10 and r9, 0FFFFFFFFFFFFFFFCh cmp r9, rsi jbe short loc_5040B lea rdx, [rsi+3] and rdx, 0FFFFFFFFFFFFFFFCh loc_503F3: mov rax, r10 mov r11b, [r10-1] cmp r10, r9 jbe short loc_50430 lea r10, [rax-1] cmp r11b, 20h ; ' ' jz short loc_503F3 jmp short loc_5040E loc_5040B: mov rax, r10 loc_5040E: mov r9, rax sub r9, rsi loc_50414: mov rdx, r9 cmp rax, rsi jbe short loc_5042A cmp byte ptr [rax-1], 20h ; ' ' lea rax, [rax-1] lea r9, [rdx-1] jz short loc_50414 loc_5042A: pop rbp jmp my_hash_sort_utf8mb3_nopad loc_50430: cmp r11b, 20h ; ' ' setnz r10b cmp rdx, r9 setnb r9b or r9b, r10b jnz short loc_5040E mov r9, rax loc_50447: mov rax, r9 cmp r9, rdx jbe short loc_5040E lea r9, [rax-4] cmp dword ptr [rax-4], 20202020h jz short loc_50447 jmp short loc_5040E
long long my_hash_sort_utf8mb3(long long a1, unsigned long long a2, unsigned long long a3, long long a4, long long a5) { unsigned long long v5; // r10 unsigned long long v6; // r9 unsigned long long v7; // rdx unsigned long long v8; // rax char v9; // r11 unsigned long long v10; // r9 unsigned long long v11; // rdx bool v12; // zf unsigned long long v14; // r9 v5 = a2 + a3; if ( a3 < 0x15 || (v6 = v5 & 0xFFFFFFFFFFFFFFFCLL, (v5 & 0xFFFFFFFFFFFFFFFCLL) <= a2) ) { v8 = a2 + a3; } else { v7 = (a2 + 3) & 0xFFFFFFFFFFFFFFFCLL; while ( 1 ) { v8 = v5; v9 = *(_BYTE *)(v5 - 1); if ( v5 <= v6 ) break; --v5; if ( v9 != 32 ) goto LABEL_8; } if ( v9 == 32 && v7 < v6 ) { v14 = v5; do { v8 = v14; if ( v14 <= v7 ) break; v14 -= 4LL; } while ( *(_DWORD *)(v8 - 4) == 538976288 ); } } LABEL_8: v10 = v8 - a2; do { v11 = v10; if ( v8 <= a2 ) break; v12 = *(_BYTE *)--v8 == 32; --v10; } while ( v12 ); return my_hash_sort_utf8mb3_nopad(a1, a2, v11, a4, a5, v10); }
my_hash_sort_utf8mb3: PUSH RBP MOV RBP,RSP LEA R10,[RSI + RDX*0x1] CMP RDX,0x15 JC 0x0015040b MOV R9,R10 AND R9,-0x4 CMP R9,RSI JBE 0x0015040b LEA RDX,[RSI + 0x3] AND RDX,-0x4 LAB_001503f3: MOV RAX,R10 MOV R11B,byte ptr [R10 + -0x1] CMP R10,R9 JBE 0x00150430 LEA R10,[RAX + -0x1] CMP R11B,0x20 JZ 0x001503f3 JMP 0x0015040e LAB_0015040b: MOV RAX,R10 LAB_0015040e: MOV R9,RAX SUB R9,RSI LAB_00150414: MOV RDX,R9 CMP RAX,RSI JBE 0x0015042a CMP byte ptr [RAX + -0x1],0x20 LEA RAX,[RAX + -0x1] LEA R9,[RDX + -0x1] JZ 0x00150414 LAB_0015042a: POP RBP JMP 0x00150615 LAB_00150430: CMP R11B,0x20 SETNZ R10B CMP RDX,R9 SETNC R9B OR R9B,R10B JNZ 0x0015040e MOV R9,RAX LAB_00150447: MOV RAX,R9 CMP R9,RDX JBE 0x0015040e LEA R9,[RAX + -0x4] CMP dword ptr [RAX + -0x4],0x20202020 JZ 0x00150447 JMP 0x0015040e
void my_hash_sort_utf8mb3(int8 param_1,ulong param_2,ulong param_3) { char *pcVar1; ulong uVar2; ulong uVar3; ulong uVar4; ulong uVar5; uVar3 = param_2 + param_3; if ((0x14 < param_3) && (uVar5 = uVar3 & 0xfffffffffffffffc, param_2 < uVar5)) { uVar4 = param_2 + 3 & 0xfffffffffffffffc; uVar2 = uVar3; do { uVar3 = uVar2; if (uVar3 <= uVar5) { uVar2 = uVar3; if (uVar4 < uVar5 && *(char *)(uVar3 - 1) == ' ') goto LAB_00150447; break; } uVar2 = uVar3 - 1; } while (*(char *)(uVar3 - 1) == ' '); } goto LAB_00150414; while (uVar2 = uVar3 - 4, *(int *)(uVar3 - 4) == 0x20202020) { LAB_00150447: uVar3 = uVar2; if (uVar3 <= uVar4) break; } LAB_00150414: do { if (uVar3 <= param_2) break; pcVar1 = (char *)(uVar3 - 1); uVar3 = uVar3 - 1; } while (*pcVar1 == ' '); my_hash_sort_utf8mb3_nopad(); return; }
4,699
ma_net_write_command
eloqsql/libmariadb/libmariadb/ma_net.c
int ma_net_write_command(NET *net, uchar command, const char *packet, size_t len, my_bool disable_flush) { uchar buff[NET_HEADER_SIZE+1]; size_t buff_size= NET_HEADER_SIZE + 1; size_t length= 1 + len; /* 1 extra byte for command */ int rc; buff[NET_HEADER_SIZE]= 0; buff[4]=command; if (length >= MAX_PACKET_LENGTH) { len= MAX_PACKET_LENGTH - 1; do { int3store(buff, MAX_PACKET_LENGTH); buff[3]= (net->compress) ? 0 : (uchar) (net->pkt_nr++); if (ma_net_write_buff(net, (char *)buff, buff_size) || ma_net_write_buff(net, packet, len)) return(1); packet+= len; length-= MAX_PACKET_LENGTH; len= MAX_PACKET_LENGTH; buff_size= NET_HEADER_SIZE; /* don't send command for further packets */ } while (length >= MAX_PACKET_LENGTH); len= length; } int3store(buff,length); buff[3]= (net->compress) ? 0 :(uchar) (net->pkt_nr++); rc= test (ma_net_write_buff(net,(char *)buff, buff_size) || ma_net_write_buff(net,packet,len)); if (!rc && !disable_flush) return test(ma_net_flush(net)); return rc; }
O0
c
ma_net_write_command: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movb %r8b, %al movq %fs:0x28, %r8 movq %r8, -0x8(%rbp) movq %rdi, -0x20(%rbp) movb %sil, -0x21(%rbp) movq %rdx, -0x30(%rbp) movq %rcx, -0x38(%rbp) movb %al, -0x39(%rbp) movq $0x5, -0x48(%rbp) movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x50(%rbp) movb $0x0, -0x9(%rbp) movb -0x21(%rbp), %al movb %al, -0x9(%rbp) cmpq $0xffffff, -0x50(%rbp) # imm = 0xFFFFFF jb 0x77f97 movq $0xfffffe, -0x38(%rbp) # imm = 0xFFFFFE jmp 0x77ee1 movb $-0x1, -0xd(%rbp) movb $-0x1, -0xc(%rbp) movb $-0x1, -0xb(%rbp) movq -0x20(%rbp), %rax movsbl 0x84(%rax), %eax cmpl $0x0, %eax je 0x77f04 xorl %eax, %eax movl %eax, -0x58(%rbp) jmp 0x77f19 movq -0x20(%rbp), %rcx movl 0x60(%rcx), %eax movl %eax, %edx addl $0x1, %edx movl %edx, 0x60(%rcx) movzbl %al, %eax movl %eax, -0x58(%rbp) movl -0x58(%rbp), %eax movb %al, -0xa(%rbp) movq -0x20(%rbp), %rdi leaq -0xd(%rbp), %rsi movq -0x48(%rbp), %rdx callq 0x77ca0 cmpl $0x0, %eax jne 0x77f4b movq -0x20(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x38(%rbp), %rdx callq 0x77ca0 cmpl $0x0, %eax je 0x77f57 movl $0x1, -0x14(%rbp) jmp 0x78061 movq -0x38(%rbp), %rax addq -0x30(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x50(%rbp), %rax subq $0xffffff, %rax # imm = 0xFFFFFF movq %rax, -0x50(%rbp) movq $0xffffff, -0x38(%rbp) # imm = 0xFFFFFF movq $0x4, -0x48(%rbp) cmpq $0xffffff, -0x50(%rbp) # imm = 0xFFFFFF jae 0x77edf movq -0x50(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0x77f99 movq -0x50(%rbp), %rax movb %al, -0xd(%rbp) movq -0x50(%rbp), %rax shrq $0x8, %rax movb %al, -0xc(%rbp) movq -0x50(%rbp), %rax shrq $0x10, %rax movb %al, -0xb(%rbp) movq -0x20(%rbp), %rax movsbl 0x84(%rax), %eax cmpl $0x0, %eax je 0x77fcd xorl %eax, %eax movl %eax, -0x5c(%rbp) jmp 0x77fe2 movq -0x20(%rbp), %rcx movl 0x60(%rcx), %eax movl %eax, %edx addl $0x1, %edx movl %edx, 0x60(%rcx) movzbl %al, %eax movl %eax, -0x5c(%rbp) movl -0x5c(%rbp), %eax movb %al, -0xa(%rbp) movq -0x20(%rbp), %rdi leaq -0xd(%rbp), %rsi movq -0x48(%rbp), %rdx callq 0x77ca0 movl %eax, %ecx movb $0x1, %al cmpl $0x0, %ecx movb %al, -0x5d(%rbp) jne 0x7801f movq -0x20(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x38(%rbp), %rdx callq 0x77ca0 cmpl $0x0, %eax setne %al movb %al, -0x5d(%rbp) movb -0x5d(%rbp), %dl xorl %eax, %eax movl $0x1, %ecx testb $0x1, %dl cmovnel %ecx, %eax movl %eax, -0x54(%rbp) cmpl $0x0, -0x54(%rbp) jne 0x7805b cmpb $0x0, -0x39(%rbp) jne 0x7805b movq -0x20(%rbp), %rdi callq 0x77730 movl %eax, %edx xorl %eax, %eax movl $0x1, %ecx cmpl $0x0, %edx cmovnel %ecx, %eax movl %eax, -0x14(%rbp) jmp 0x78061 movl -0x54(%rbp), %eax movl %eax, -0x14(%rbp) movl -0x14(%rbp), %eax movl %eax, -0x64(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x78082 movl -0x64(%rbp), %eax addq $0x70, %rsp popq %rbp retq callq 0x382c0 nopw (%rax,%rax)
ma_net_write_command: push rbp mov rbp, rsp sub rsp, 70h mov al, r8b mov r8, fs:28h mov [rbp+var_8], r8 mov [rbp+var_20], rdi mov [rbp+var_21], sil mov [rbp+var_30], rdx mov [rbp+var_38], rcx mov [rbp+var_39], al mov [rbp+var_48], 5 mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_50], rax mov [rbp+var_9], 0 mov al, [rbp+var_21] mov [rbp+var_9], al cmp [rbp+var_50], 0FFFFFFh jb loc_77F97 mov [rbp+var_38], 0FFFFFEh loc_77EDF: jmp short $+2 loc_77EE1: mov [rbp+var_D], 0FFh mov [rbp+var_C], 0FFh mov [rbp+var_B], 0FFh mov rax, [rbp+var_20] movsx eax, byte ptr [rax+84h] cmp eax, 0 jz short loc_77F04 xor eax, eax mov [rbp+var_58], eax jmp short loc_77F19 loc_77F04: mov rcx, [rbp+var_20] mov eax, [rcx+60h] mov edx, eax add edx, 1 mov [rcx+60h], edx movzx eax, al mov [rbp+var_58], eax loc_77F19: mov eax, [rbp+var_58] mov [rbp+var_A], al mov rdi, [rbp+var_20] lea rsi, [rbp+var_D] mov rdx, [rbp+var_48] call ma_net_write_buff cmp eax, 0 jnz short loc_77F4B mov rdi, [rbp+var_20] mov rsi, [rbp+var_30] mov rdx, [rbp+var_38] call ma_net_write_buff cmp eax, 0 jz short loc_77F57 loc_77F4B: mov [rbp+var_14], 1 jmp loc_78061 loc_77F57: mov rax, [rbp+var_38] add rax, [rbp+var_30] mov [rbp+var_30], rax mov rax, [rbp+var_50] sub rax, 0FFFFFFh mov [rbp+var_50], rax mov [rbp+var_38], 0FFFFFFh mov [rbp+var_48], 4 cmp [rbp+var_50], 0FFFFFFh jnb loc_77EDF mov rax, [rbp+var_50] mov [rbp+var_38], rax loc_77F97: jmp short $+2 loc_77F99: mov rax, [rbp+var_50] mov [rbp+var_D], al mov rax, [rbp+var_50] shr rax, 8 mov [rbp+var_C], al mov rax, [rbp+var_50] shr rax, 10h mov [rbp+var_B], al mov rax, [rbp+var_20] movsx eax, byte ptr [rax+84h] cmp eax, 0 jz short loc_77FCD xor eax, eax mov [rbp+var_5C], eax jmp short loc_77FE2 loc_77FCD: mov rcx, [rbp+var_20] mov eax, [rcx+60h] mov edx, eax add edx, 1 mov [rcx+60h], edx movzx eax, al mov [rbp+var_5C], eax loc_77FE2: mov eax, [rbp+var_5C] mov [rbp+var_A], al mov rdi, [rbp+var_20] lea rsi, [rbp+var_D] mov rdx, [rbp+var_48] call ma_net_write_buff mov ecx, eax mov al, 1 cmp ecx, 0 mov [rbp+var_5D], al jnz short loc_7801F mov rdi, [rbp+var_20] mov rsi, [rbp+var_30] mov rdx, [rbp+var_38] call ma_net_write_buff cmp eax, 0 setnz al mov [rbp+var_5D], al loc_7801F: mov dl, [rbp+var_5D] xor eax, eax mov ecx, 1 test dl, 1 cmovnz eax, ecx mov [rbp+var_54], eax cmp [rbp+var_54], 0 jnz short loc_7805B cmp [rbp+var_39], 0 jnz short loc_7805B mov rdi, [rbp+var_20] call ma_net_flush mov edx, eax xor eax, eax mov ecx, 1 cmp edx, 0 cmovnz eax, ecx mov [rbp+var_14], eax jmp short loc_78061 loc_7805B: mov eax, [rbp+var_54] mov [rbp+var_14], eax loc_78061: mov eax, [rbp+var_14] mov [rbp+var_64], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_78082 mov eax, [rbp+var_64] add rsp, 70h pop rbp retn loc_78082: call ___stack_chk_fail
_BOOL8 ma_net_write_command(long long a1, char a2, long long a3, unsigned long long a4, char a5) { int v5; // eax int v6; // eax bool v8; // [rsp+13h] [rbp-5Dh] char v9; // [rsp+14h] [rbp-5Ch] char v10; // [rsp+18h] [rbp-58h] unsigned long long v11; // [rsp+20h] [rbp-50h] unsigned long long v12; // [rsp+28h] [rbp-48h] unsigned long long v14; // [rsp+38h] [rbp-38h] unsigned long long v15; // [rsp+38h] [rbp-38h] __int16 v18; // [rsp+63h] [rbp-Dh] BYREF char v19; // [rsp+65h] [rbp-Bh] char v20; // [rsp+66h] [rbp-Ah] char v21; // [rsp+67h] [rbp-9h] unsigned long long v22; // [rsp+68h] [rbp-8h] v22 = __readfsqword(0x28u); v14 = a4; v12 = 5LL; v11 = a4 + 1; v21 = a2; if ( a4 + 1 >= 0xFFFFFF ) { v15 = 16777214LL; do { v18 = -1; v19 = -1; if ( *(_BYTE *)(a1 + 132) ) { v10 = 0; } else { v5 = *(_DWORD *)(a1 + 96); *(_DWORD *)(a1 + 96) = v5 + 1; v10 = v5; } v20 = v10; if ( ma_net_write_buff(a1, (long long)&v18, v12) || ma_net_write_buff(a1, a3, v15) ) return 1; a3 += v15; v11 -= 0xFFFFFFLL; v15 = 0xFFFFFFLL; v12 = 4LL; } while ( v11 >= 0xFFFFFF ); v14 = v11; } v18 = v11; v19 = BYTE2(v11); if ( *(_BYTE *)(a1 + 132) ) { v9 = 0; } else { v6 = *(_DWORD *)(a1 + 96); *(_DWORD *)(a1 + 96) = v6 + 1; v9 = v6; } v20 = v9; v8 = 1; if ( !ma_net_write_buff(a1, (long long)&v18, v12) ) v8 = ma_net_write_buff(a1, a3, v14); if ( v8 || a5 ) return v8; else return ma_net_flush(a1) != 0; }
ma_net_write_command: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV AL,R8B MOV R8,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],R8 MOV qword ptr [RBP + -0x20],RDI MOV byte ptr [RBP + -0x21],SIL MOV qword ptr [RBP + -0x30],RDX MOV qword ptr [RBP + -0x38],RCX MOV byte ptr [RBP + -0x39],AL MOV qword ptr [RBP + -0x48],0x5 MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x50],RAX MOV byte ptr [RBP + -0x9],0x0 MOV AL,byte ptr [RBP + -0x21] MOV byte ptr [RBP + -0x9],AL CMP qword ptr [RBP + -0x50],0xffffff JC 0x00177f97 MOV qword ptr [RBP + -0x38],0xfffffe LAB_00177edf: JMP 0x00177ee1 LAB_00177ee1: MOV byte ptr [RBP + -0xd],0xff MOV byte ptr [RBP + -0xc],0xff MOV byte ptr [RBP + -0xb],0xff MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,byte ptr [RAX + 0x84] CMP EAX,0x0 JZ 0x00177f04 XOR EAX,EAX MOV dword ptr [RBP + -0x58],EAX JMP 0x00177f19 LAB_00177f04: MOV RCX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RCX + 0x60] MOV EDX,EAX ADD EDX,0x1 MOV dword ptr [RCX + 0x60],EDX MOVZX EAX,AL MOV dword ptr [RBP + -0x58],EAX LAB_00177f19: MOV EAX,dword ptr [RBP + -0x58] MOV byte ptr [RBP + -0xa],AL MOV RDI,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0xd] MOV RDX,qword ptr [RBP + -0x48] CALL 0x00177ca0 CMP EAX,0x0 JNZ 0x00177f4b MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x38] CALL 0x00177ca0 CMP EAX,0x0 JZ 0x00177f57 LAB_00177f4b: MOV dword ptr [RBP + -0x14],0x1 JMP 0x00178061 LAB_00177f57: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x50] SUB RAX,0xffffff MOV qword ptr [RBP + -0x50],RAX MOV qword ptr [RBP + -0x38],0xffffff MOV qword ptr [RBP + -0x48],0x4 CMP qword ptr [RBP + -0x50],0xffffff JNC 0x00177edf MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x38],RAX LAB_00177f97: JMP 0x00177f99 LAB_00177f99: MOV RAX,qword ptr [RBP + -0x50] MOV byte ptr [RBP + -0xd],AL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x8 MOV byte ptr [RBP + -0xc],AL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x10 MOV byte ptr [RBP + -0xb],AL MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,byte ptr [RAX + 0x84] CMP EAX,0x0 JZ 0x00177fcd XOR EAX,EAX MOV dword ptr [RBP + -0x5c],EAX JMP 0x00177fe2 LAB_00177fcd: MOV RCX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RCX + 0x60] MOV EDX,EAX ADD EDX,0x1 MOV dword ptr [RCX + 0x60],EDX MOVZX EAX,AL MOV dword ptr [RBP + -0x5c],EAX LAB_00177fe2: MOV EAX,dword ptr [RBP + -0x5c] MOV byte ptr [RBP + -0xa],AL MOV RDI,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0xd] MOV RDX,qword ptr [RBP + -0x48] CALL 0x00177ca0 MOV ECX,EAX MOV AL,0x1 CMP ECX,0x0 MOV byte ptr [RBP + -0x5d],AL JNZ 0x0017801f MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x38] CALL 0x00177ca0 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x5d],AL LAB_0017801f: MOV DL,byte ptr [RBP + -0x5d] XOR EAX,EAX MOV ECX,0x1 TEST DL,0x1 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x54],EAX CMP dword ptr [RBP + -0x54],0x0 JNZ 0x0017805b CMP byte ptr [RBP + -0x39],0x0 JNZ 0x0017805b MOV RDI,qword ptr [RBP + -0x20] CALL 0x00177730 MOV EDX,EAX XOR EAX,EAX MOV ECX,0x1 CMP EDX,0x0 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x14],EAX JMP 0x00178061 LAB_0017805b: MOV EAX,dword ptr [RBP + -0x54] MOV dword ptr [RBP + -0x14],EAX LAB_00178061: MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x64],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00178082 MOV EAX,dword ptr [RBP + -0x64] ADD RSP,0x70 POP RBP RET LAB_00178082: CALL 0x001382c0
bool ma_net_write_command(long param_1,int1 param_2,long param_3,ulong param_4,char param_5) { ulong uVar1; int iVar2; long in_FS_OFFSET; bool bVar3; int1 local_64; int1 local_60; ulong local_58; int8 local_50; ulong local_40; long local_38; int1 local_15; int1 local_14; int1 local_13; int1 local_12; int1 local_11; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_50 = 5; local_58 = param_4 + 1; uVar1 = param_4; local_38 = param_3; local_11 = param_2; if (0xfffffe < local_58) { local_40 = 0xfffffe; do { local_15 = 0xff; local_14 = 0xff; local_13 = 0xff; if (*(char *)(param_1 + 0x84) == '\0') { iVar2 = *(int *)(param_1 + 0x60); *(int *)(param_1 + 0x60) = iVar2 + 1; local_60 = (int1)iVar2; } else { local_60 = 0; } local_12 = local_60; iVar2 = ma_net_write_buff(param_1,&local_15,local_50); if ((iVar2 != 0) || (iVar2 = ma_net_write_buff(param_1,local_38,local_40), iVar2 != 0)) { bVar3 = true; goto LAB_00178061; } local_38 = local_40 + local_38; local_58 = local_58 - 0xffffff; local_40 = 0xffffff; local_50 = 4; uVar1 = local_58; } while (0xfffffe < local_58); } local_40 = uVar1; local_15 = (int1)local_58; local_14 = (int1)(local_58 >> 8); local_13 = (int1)(local_58 >> 0x10); if (*(char *)(param_1 + 0x84) == '\0') { iVar2 = *(int *)(param_1 + 0x60); *(int *)(param_1 + 0x60) = iVar2 + 1; local_64 = (int1)iVar2; } else { local_64 = 0; } local_12 = local_64; iVar2 = ma_net_write_buff(param_1,&local_15,local_50); bVar3 = true; if (iVar2 == 0) { iVar2 = ma_net_write_buff(param_1,local_38,local_40); bVar3 = iVar2 != 0; } if ((bVar3 == false) && (param_5 == '\0')) { iVar2 = ma_net_flush(param_1); bVar3 = iVar2 != 0; } LAB_00178061: if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return bVar3; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }