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
10,300
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; }
O3
c
my_mb_wc_euc_jp: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0xe0f43 movzbl (%rdx), %edi testb %dil, %dil js 0xe0f45 movq %rdi, (%rsi) movl $0x1, %eax popq %rbp retq leal 0x5f(%rdi), %eax cmpb $0x5d, %al ja 0xe0f91 leaq 0x2(%rdx), %r8 movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %r8 ja 0xe0f43 movzbl 0x1(%rdx), %eax shll $0x9, %edi leal (%rdi,%rax,2), %eax leaq 0x249235(%rip), %rcx # 0x32a1a0 movzwl (%rax,%rcx), %ecx movq %rcx, (%rsi) movl $0x2, %eax testq %rcx, %rcx jne 0xe0f43 movb 0x1(%rdx), %al incb %al xorl %ecx, %ecx cmpb $-0x5e, %al setb %cl leal -0x2(,%rcx,2), %eax jmp 0xe0f43 cmpq $0x8f, %rdi je 0xe0fd5 cmpl $0x8e, %edi jne 0xe1017 leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0xe0f43 movzbl 0x1(%rdx), %ecx leal 0x20(%rcx), %edx movl $0x0, %eax cmpb $-0x3f, %dl jb 0xe0f43 addq $0xfec0, %rcx # imm = 0xFEC0 movq %rcx, (%rsi) movl $0x2, %eax jmp 0xe0f43 leaq 0x3(%rdx), %rdi movl $0xffffff99, %eax # imm = 0xFFFFFF99 cmpq %rcx, %rdi ja 0xe0f43 movzwl 0x1(%rdx), %eax rolw $0x8, %ax movzwl %ax, %eax leaq 0x2691a7(%rip), %rcx # 0x34a1a0 movzwl (%rcx,%rax,2), %ecx movq %rcx, (%rsi) movl $0x3, %eax testq %rcx, %rcx jne 0xe0f43 movb 0x1(%rdx), %al incb %al cmpb $-0x5e, %al jae 0xe101e xorl %eax, %eax jmp 0xe0f43 movb 0x2(%rdx), %cl movl $0x0, %eax cmpb $-0x5f, %cl jb 0xe0f43 xorl %eax, %eax cmpb $-0x1, %cl sete %al leal (%rax,%rax,2), %eax addl $-0x3, %eax jmp 0xe0f43
my_mb_wc_euc_jp: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_E0F43 movzx edi, byte ptr [rdx] test dil, dil js short loc_E0F45 mov [rsi], rdi mov eax, 1 loc_E0F43: pop rbp retn loc_E0F45: lea eax, [rdi+5Fh] cmp al, 5Dh ; ']' ja short loc_E0F91 lea r8, [rdx+2] mov eax, 0FFFFFF9Ah cmp r8, rcx ja short loc_E0F43 movzx eax, byte ptr [rdx+1] shl edi, 9 lea eax, [rdi+rax*2] lea rcx, jisx0208_eucjp_to_unicode movzx ecx, word ptr [rax+rcx] mov [rsi], rcx mov eax, 2 test rcx, rcx jnz short loc_E0F43 mov al, [rdx+1] inc al xor ecx, ecx cmp al, 0A2h setb cl lea eax, ds:0FFFFFFFFFFFFFFFEh[rcx*2] jmp short loc_E0F43 loc_E0F91: cmp rdi, 8Fh jz short loc_E0FD5 cmp edi, 8Eh jnz short loc_E1017 lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_E0F43 movzx ecx, byte ptr [rdx+1] lea edx, [rcx+20h] mov eax, 0 cmp dl, 0C1h jb short loc_E0F43 add rcx, 0FEC0h mov [rsi], rcx mov eax, 2 jmp loc_E0F43 loc_E0FD5: lea rdi, [rdx+3] mov eax, 0FFFFFF99h cmp rdi, rcx ja loc_E0F43 movzx eax, word ptr [rdx+1] rol ax, 8 movzx eax, ax lea rcx, jisx0212_eucjp_to_unicode movzx ecx, word ptr [rcx+rax*2] mov [rsi], rcx mov eax, 3 test rcx, rcx jnz loc_E0F43 mov al, [rdx+1] inc al cmp al, 0A2h jnb short loc_E101E loc_E1017: xor eax, eax jmp loc_E0F43 loc_E101E: mov cl, [rdx+2] mov eax, 0 cmp cl, 0A1h jb loc_E0F43 xor eax, eax cmp cl, 0FFh setz al lea eax, [rax+rax*2] add eax, 0FFFFFFFDh jmp loc_E0F43
long long my_mb_wc_euc_jp(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { long long result; // rax long long v5; // rdi long long v6; // rcx long long v7; // rcx long long v8; // rcx unsigned __int8 v9; // cl result = 4294967195LL; if ( (unsigned long long)a3 >= a4 ) return result; v5 = *a3; if ( (v5 & 0x80u) == 0LL ) { *a2 = v5; return 1LL; } if ( (unsigned __int8)(v5 + 95) <= 0x5Du ) { result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { v6 = jisx0208_eucjp_to_unicode[256 * (_DWORD)v5 + a3[1]]; *a2 = v6; result = 2LL; if ( !v6 ) return 2 * (unsigned int)((unsigned __int8)(a3[1] + 1) < 0xA2u) - 2; } return result; } if ( v5 != 143 ) { if ( (_DWORD)v5 == 142 ) { result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { v7 = a3[1]; result = 0LL; if ( (unsigned __int8)(v7 + 32) >= 0xC1u ) { *a2 = v7 + 65216; return 2LL; } } return result; } return 0LL; } result = 4294967193LL; if ( (unsigned long long)(a3 + 3) > a4 ) return result; v8 = jisx0212_eucjp_to_unicode[(unsigned __int16)__ROL2__(*(_WORD *)(a3 + 1), 8)]; *a2 = v8; result = 3LL; if ( v8 ) return result; if ( (unsigned __int8)(a3[1] + 1) < 0xA2u ) return 0LL; v9 = a3[2]; result = 0LL; if ( v9 >= 0xA1u ) return 3 * (unsigned int)(v9 == 0xFF) - 3; return result; }
my_mb_wc_euc_jp: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x001e0f43 MOVZX EDI,byte ptr [RDX] TEST DIL,DIL JS 0x001e0f45 MOV qword ptr [RSI],RDI MOV EAX,0x1 LAB_001e0f43: POP RBP RET LAB_001e0f45: LEA EAX,[RDI + 0x5f] CMP AL,0x5d JA 0x001e0f91 LEA R8,[RDX + 0x2] MOV EAX,0xffffff9a CMP R8,RCX JA 0x001e0f43 MOVZX EAX,byte ptr [RDX + 0x1] SHL EDI,0x9 LEA EAX,[RDI + RAX*0x2] LEA RCX,[0x42a1a0] MOVZX ECX,word ptr [RAX + RCX*0x1] MOV qword ptr [RSI],RCX MOV EAX,0x2 TEST RCX,RCX JNZ 0x001e0f43 MOV AL,byte ptr [RDX + 0x1] INC AL XOR ECX,ECX CMP AL,0xa2 SETC CL LEA EAX,[-0x2 + RCX*0x2] JMP 0x001e0f43 LAB_001e0f91: CMP RDI,0x8f JZ 0x001e0fd5 CMP EDI,0x8e JNZ 0x001e1017 LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x001e0f43 MOVZX ECX,byte ptr [RDX + 0x1] LEA EDX,[RCX + 0x20] MOV EAX,0x0 CMP DL,0xc1 JC 0x001e0f43 ADD RCX,0xfec0 MOV qword ptr [RSI],RCX MOV EAX,0x2 JMP 0x001e0f43 LAB_001e0fd5: LEA RDI,[RDX + 0x3] MOV EAX,0xffffff99 CMP RDI,RCX JA 0x001e0f43 MOVZX EAX,word ptr [RDX + 0x1] ROL AX,0x8 MOVZX EAX,AX LEA RCX,[0x44a1a0] MOVZX ECX,word ptr [RCX + RAX*0x2] MOV qword ptr [RSI],RCX MOV EAX,0x3 TEST RCX,RCX JNZ 0x001e0f43 MOV AL,byte ptr [RDX + 0x1] INC AL CMP AL,0xa2 JNC 0x001e101e LAB_001e1017: XOR EAX,EAX JMP 0x001e0f43 LAB_001e101e: MOV CL,byte ptr [RDX + 0x2] MOV EAX,0x0 CMP CL,0xa1 JC 0x001e0f43 XOR EAX,EAX CMP CL,0xff SETZ AL LEA EAX,[RAX + RAX*0x2] ADD EAX,-0x3 JMP 0x001e0f43
int my_mb_wc_euc_jp(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { byte bVar1; ushort uVar2; int iVar3; iVar3 = -0x65; if (param_3 < param_4) { bVar1 = *param_3; if ((char)bVar1 < '\0') { if ((byte)(bVar1 + 0x5f) < 0x5e) { iVar3 = -0x66; if (param_3 + 2 <= param_4) { uVar2 = *(ushort *) (jisx0208_eucjp_to_unicode + ((uint)bVar1 * 0x200 + (uint)param_3[1] * 2)); *param_2 = (ulong)uVar2; iVar3 = 2; if ((ulong)uVar2 == 0) { iVar3 = (uint)((byte)(param_3[1] + 1) < 0xa2) * 2 + -2; } } } else { if ((ulong)bVar1 == 0x8f) { if (param_4 < param_3 + 3) { return -0x67; } uVar2 = *(ushort *) (&jisx0212_eucjp_to_unicode + (ulong)(ushort)(*(ushort *)(param_3 + 1) << 8 | *(ushort *)(param_3 + 1) >> 8) * 2); *param_2 = (ulong)uVar2; if ((ulong)uVar2 != 0) { return 3; } if (0xa1 < (byte)(param_3[1] + 1)) { if (param_3[2] < 0xa1) { return 0; } return (uint)(param_3[2] == 0xff) * 3 + -3; } } else if (bVar1 == 0x8e) { if (param_4 < param_3 + 2) { return -0x66; } if ((byte)(param_3[1] + 0x20) < 0xc1) { return 0; } *param_2 = (ulong)param_3[1] + 0xfec0; return 2; } iVar3 = 0; } } else { *param_2 = (ulong)bVar1; iVar3 = 1; } } return iVar3; }
10,301
ft_nlq_read_next
eloqsql/storage/myisam/ft_nlq_search.c
int ft_nlq_read_next(FT_INFO *handler, char *record) { MI_INFO *info= (MI_INFO *) handler->info; if (++handler->curdoc >= handler->ndocs) { --handler->curdoc; return HA_ERR_END_OF_FILE; } info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED); info->lastpos=handler->doc[handler->curdoc].dpos; if (!(*info->read_record)(info,info->lastpos,(uchar*) record)) { info->update|= HA_STATE_AKTIV; /* Record is read */ return 0; } return my_errno; }
O0
c
ft_nlq_read_next: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rcx movl 0x14(%rcx), %eax addl $0x1, %eax movl %eax, 0x14(%rcx) movq -0x10(%rbp), %rcx cmpl 0x10(%rcx), %eax jl 0xa150b movq -0x10(%rbp), %rax movl 0x14(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x14(%rax) movl $0x89, -0x4(%rbp) jmp 0xa1591 movq -0x20(%rbp), %rax movl 0x1d0(%rax), %ecx andl $0x401, %ecx # imm = 0x401 movl %ecx, 0x1d0(%rax) movq -0x10(%rbp), %rax addq $0x18, %rax movq -0x10(%rbp), %rcx movslq 0x14(%rcx), %rcx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x170(%rax) movq -0x20(%rbp), %rax movq 0x140(%rax), %rax movq -0x20(%rbp), %rdi movq -0x20(%rbp), %rcx movq 0x170(%rcx), %rsi movq -0x18(%rbp), %rdx callq *%rax cmpl $0x0, %eax jne 0xa1587 movq -0x20(%rbp), %rax movl 0x1d0(%rax), %ecx orl $0x2, %ecx movl %ecx, 0x1d0(%rax) movl $0x0, -0x4(%rbp) jmp 0xa1591 callq 0xf6080 movl (%rax), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
ft_nlq_read_next: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_20], rax mov rcx, [rbp+var_10] mov eax, [rcx+14h] add eax, 1 mov [rcx+14h], eax mov rcx, [rbp+var_10] cmp eax, [rcx+10h] jl short loc_A150B mov rax, [rbp+var_10] mov ecx, [rax+14h] add ecx, 0FFFFFFFFh mov [rax+14h], ecx mov [rbp+var_4], 89h jmp loc_A1591 loc_A150B: mov rax, [rbp+var_20] mov ecx, [rax+1D0h] and ecx, 401h mov [rax+1D0h], ecx mov rax, [rbp+var_10] add rax, 18h mov rcx, [rbp+var_10] movsxd rcx, dword ptr [rcx+14h] shl rcx, 4 add rax, rcx mov rcx, [rax] mov rax, [rbp+var_20] mov [rax+170h], rcx mov rax, [rbp+var_20] mov rax, [rax+140h] mov rdi, [rbp+var_20] mov rcx, [rbp+var_20] mov rsi, [rcx+170h] mov rdx, [rbp+var_18] call rax cmp eax, 0 jnz short loc_A1587 mov rax, [rbp+var_20] mov ecx, [rax+1D0h] or ecx, 2 mov [rax+1D0h], ecx mov [rbp+var_4], 0 jmp short loc_A1591 loc_A1587: call _my_thread_var mov eax, [rax] mov [rbp+var_4], eax loc_A1591: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long ft_nlq_read_next(long long a1, long long a2) { int v2; // eax const char *v3; // rsi long long v5; // [rsp+0h] [rbp-20h] v5 = *(_QWORD *)(a1 + 8); v2 = *(_DWORD *)(a1 + 20) + 1; *(_DWORD *)(a1 + 20) = v2; if ( v2 < *(_DWORD *)(a1 + 16) ) { *(_DWORD *)(v5 + 464) &= 0x401u; *(_QWORD *)(v5 + 368) = *(_QWORD *)(16LL * *(int *)(a1 + 20) + a1 + 24); v3 = *(const char **)(v5 + 368); if ( (*(unsigned int ( **)(long long, const char *, long long))(v5 + 320))(v5, v3, a2) ) { return *(unsigned int *)my_thread_var(v5, v3); } else { *(_DWORD *)(v5 + 464) |= 2u; return 0; } } else { --*(_DWORD *)(a1 + 20); return 137; } }
ft_nlq_read_next: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x20],RAX MOV RCX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RCX + 0x14] ADD EAX,0x1 MOV dword ptr [RCX + 0x14],EAX MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x10] JL 0x001a150b MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x14] ADD ECX,-0x1 MOV dword ptr [RAX + 0x14],ECX MOV dword ptr [RBP + -0x4],0x89 JMP 0x001a1591 LAB_001a150b: MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x1d0] AND ECX,0x401 MOV dword ptr [RAX + 0x1d0],ECX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x18 MOV RCX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RCX + 0x14] SHL RCX,0x4 ADD RAX,RCX MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x170],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x140] MOV RDI,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RCX + 0x170] MOV RDX,qword ptr [RBP + -0x18] CALL RAX CMP EAX,0x0 JNZ 0x001a1587 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x1d0] OR ECX,0x2 MOV dword ptr [RAX + 0x1d0],ECX MOV dword ptr [RBP + -0x4],0x0 JMP 0x001a1591 LAB_001a1587: CALL 0x001f6080 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX LAB_001a1591: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 ft_nlq_read_next(long param_1,int8 param_2) { long lVar1; int iVar2; int4 *puVar3; int4 local_c; lVar1 = *(long *)(param_1 + 8); iVar2 = *(int *)(param_1 + 0x14) + 1; *(int *)(param_1 + 0x14) = iVar2; if (iVar2 < *(int *)(param_1 + 0x10)) { *(uint *)(lVar1 + 0x1d0) = *(uint *)(lVar1 + 0x1d0) & 0x401; *(int8 *)(lVar1 + 0x170) = *(int8 *)(param_1 + 0x18 + (long)*(int *)(param_1 + 0x14) * 0x10); iVar2 = (**(code **)(lVar1 + 0x140))(lVar1,*(int8 *)(lVar1 + 0x170),param_2); if (iVar2 == 0) { *(uint *)(lVar1 + 0x1d0) = *(uint *)(lVar1 + 0x1d0) | 2; local_c = 0; } else { puVar3 = (int4 *)_my_thread_var(); local_c = *puVar3; } } else { *(int *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + -1; local_c = 0x89; } return local_c; }
10,302
fmt::v10::detail::dragonbox::decimal_fp<float> fmt::v10::detail::write_padded<(fmt::v10::align::type)2, fmt::v10::appender, char, fmt::v10::appender fmt::v10::detail::do_write_float<fmt::v10::appender, fmt::v10::detail::dragonbox::decimal_fp<float>, char, fmt::v10::detail::digit_grouping<char>>(fmt::v10::appender, fmt::v10::detail::dragonbox::decimal_fp<float> const&, fmt::v10::format_specs<char> const&, fmt::v10::detail::float_specs, fmt::v10::detail::locale_ref)::'lambda'(fmt::v10::appender)&>(fmt::v10::detail::dragonbox::decimal_fp<float>, fmt::v10::format_specs<char> const&, unsigned long, unsigned long, fmt::v10::appender fmt::v10::detail::do_write_float<fmt::v10::appender, fmt::v10::detail::dragonbox::decimal_fp<float>, char, fmt::v10::detail::digit_grouping<char>>(fmt::v10::appender, fmt::v10::detail::dragonbox::decimal_fp<float> const&, fmt::v10::format_specs<char> const&, fmt::v10::detail::float_specs, fmt::v10::detail::locale_ref)::'lambda'(fmt::v10::appender)&)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
FMT_CONSTEXPR auto write_padded(OutputIt out, const format_specs<Char>& specs, size_t size, size_t width, F&& f) -> OutputIt { static_assert(align == align::left || align == align::right, ""); unsigned spec_width = to_unsigned(specs.width); size_t padding = spec_width > width ? spec_width - width : 0; // Shifts are encoded as string literals because static constexpr is not // supported in constexpr functions. auto* shifts = align == align::left ? "\x1f\x1f\x00\x01" : "\x00\x1f\x00\x01"; size_t left_padding = padding >> shifts[specs.align]; size_t right_padding = padding - left_padding; auto it = reserve(out, size + padding * specs.fill.size()); if (left_padding != 0) it = fill(it, left_padding, specs.fill); it = f(it); if (right_padding != 0) it = fill(it, right_padding, specs.fill); return base_iterator(out, it); }
O0
c
fmt::v10::detail::dragonbox::decimal_fp<float> fmt::v10::detail::write_padded<(fmt::v10::align::type)2, fmt::v10::appender, char, fmt::v10::appender fmt::v10::detail::do_write_float<fmt::v10::appender, fmt::v10::detail::dragonbox::decimal_fp<float>, char, fmt::v10::detail::digit_grouping<char>>(fmt::v10::appender, fmt::v10::detail::dragonbox::decimal_fp<float> const&, fmt::v10::format_specs<char> const&, fmt::v10::detail::float_specs, fmt::v10::detail::locale_ref)::'lambda'(fmt::v10::appender)&>(fmt::v10::detail::dragonbox::decimal_fp<float>, fmt::v10::format_specs<char> const&, unsigned long, unsigned long, fmt::v10::appender fmt::v10::detail::do_write_float<fmt::v10::appender, fmt::v10::detail::dragonbox::decimal_fp<float>, char, fmt::v10::detail::digit_grouping<char>>(fmt::v10::appender, fmt::v10::detail::dragonbox::decimal_fp<float> const&, fmt::v10::format_specs<char> const&, fmt::v10::detail::float_specs, fmt::v10::detail::locale_ref)::'lambda'(fmt::v10::appender)&): subq $0xb8, %rsp movq %rdi, 0xa8(%rsp) movq %rsi, 0xa0(%rsp) movq %rdx, 0x98(%rsp) movq %rcx, 0x90(%rsp) movq %r8, 0x88(%rsp) movq 0xa0(%rsp), %rax movl (%rax), %edi callq 0x87c40 movl %eax, 0x84(%rsp) movl 0x84(%rsp), %eax cmpq 0x90(%rsp), %rax jbe 0xafffc movl 0x84(%rsp), %eax subq 0x90(%rsp), %rax movq %rax, 0x10(%rsp) jmp 0xb0005 xorl %eax, %eax movq %rax, 0x10(%rsp) jmp 0xb0005 movq 0x10(%rsp), %rax movq %rax, 0x78(%rsp) leaq 0x608be(%rip), %rax # 0x1108d4 movq %rax, 0x70(%rsp) movq 0x78(%rsp), %rax movq 0x70(%rsp), %rcx movq 0xa0(%rsp), %rdx movw 0x9(%rdx), %dx andw $0xf, %dx movzbl %dl, %edx movsbl (%rcx,%rdx), %ecx movl %ecx, %ecx shrq %cl, %rax movq %rax, 0x68(%rsp) movq 0x78(%rsp), %rax subq 0x68(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x98(%rsp), %rax movq %rax, (%rsp) movq 0x78(%rsp), %rax movq %rax, 0x8(%rsp) movq 0xa0(%rsp), %rdi addq $0xb, %rdi callq 0x901d0 movq (%rsp), %rsi movq %rax, %rcx movq 0x8(%rsp), %rax imulq %rcx, %rax addq %rax, %rsi leaq 0xa8(%rsp), %rdi callq 0x8d9c0 movq (%rax), %rax movq %rax, 0x58(%rsp) cmpq $0x0, 0x68(%rsp) je 0xb00e0 movq 0x58(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x68(%rsp), %rsi movq 0xa0(%rsp), %rdx addq $0xb, %rdx movq 0x48(%rsp), %rdi callq 0x901e0 movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x88(%rsp), %rdi movq 0x58(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rsi callq 0xb0190 movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x58(%rsp) cmpq $0x0, 0x60(%rsp) je 0xb0147 movq 0x58(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x60(%rsp), %rsi movq 0xa0(%rsp), %rdx addq $0xb, %rdx movq 0x28(%rsp), %rdi callq 0x901e0 movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x58(%rsp) movq 0xa8(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x8daf0 movq %rax, 0xb0(%rsp) movq 0xb0(%rsp), %rax addq $0xb8, %rsp retq nopw %cs:(%rax,%rax) nop
_ZN3fmt3v106detail12write_paddedILNS0_5align4typeE2ENS0_8appenderEcZNS1_9write_intIS5_ocEET_S7_T0_jRKNS0_12format_specsIT1_EERKNS1_14digit_groupingISA_EEEUlS5_E_EES8_S8_SD_mmOT2_: sub rsp, 0B8h mov [rsp+0B8h+var_10], rdi mov [rsp+0B8h+var_18], rsi mov [rsp+0B8h+var_20], rdx mov [rsp+0B8h+var_28], rcx mov [rsp+0B8h+var_30], r8 mov rax, [rsp+0B8h+var_18] mov edi, [rax] call _ZN3fmt3v106detail11to_unsignedIiEENSt13make_unsignedIT_E4typeES4_; fmt::v10::detail::to_unsigned<int>(int) mov [rsp+0B8h+var_34], eax mov eax, [rsp+0B8h+var_34] cmp rax, [rsp+0B8h+var_28] jbe short loc_AFFFC mov eax, [rsp+0B8h+var_34] sub rax, [rsp+0B8h+var_28] mov [rsp+0B8h+var_A8], rax jmp short loc_B0005 loc_AFFFC: xor eax, eax mov [rsp+0B8h+var_A8], rax jmp short $+2 loc_B0005: mov rax, [rsp+0B8h+var_A8] mov [rsp+0B8h+var_40], rax lea rax, byte_1108D4 mov [rsp+0B8h+var_48], rax mov rax, [rsp+0B8h+var_40] mov rcx, [rsp+0B8h+var_48] mov rdx, [rsp+0B8h+var_18] mov dx, [rdx+9] and dx, 0Fh movzx edx, dl movsx ecx, byte ptr [rcx+rdx] mov ecx, ecx shr rax, cl mov [rsp+0B8h+var_50], rax mov rax, [rsp+0B8h+var_40] sub rax, [rsp+0B8h+var_50] mov [rsp+0B8h+var_58], rax mov rax, [rsp+0B8h+var_20] mov [rsp+0B8h+var_B8], rax mov rax, [rsp+0B8h+var_40] mov [rsp+0B8h+var_B0], rax mov rdi, [rsp+0B8h+var_18] add rdi, 0Bh call _ZNK3fmt3v106detail6fill_tIcE4sizeEv; fmt::v10::detail::fill_t<char>::size(void) mov rsi, [rsp+0B8h+var_B8] mov rcx, rax mov rax, [rsp+0B8h+var_B0] imul rax, rcx add rsi, rax lea rdi, [rsp+0B8h+var_10] call _ZN3fmt3v106detail7reserveINS0_8appenderEEERT_S5_m; fmt::v10::detail::reserve<fmt::v10::appender>(fmt::v10::appender &,ulong) mov rax, [rax] mov [rsp+0B8h+var_60], rax cmp [rsp+0B8h+var_50], 0 jz short loc_B00E0 mov rax, [rsp+0B8h+var_60] mov [rsp+0B8h+var_70], rax mov rsi, [rsp+0B8h+var_50] mov rdx, [rsp+0B8h+var_18] add rdx, 0Bh mov rdi, [rsp+0B8h+var_70] call _ZN3fmt3v106detail4fillINS0_8appenderEcEET_S4_mRKNS1_6fill_tIT0_EE; fmt::v10::detail::fill<fmt::v10::appender,char>(fmt::v10::appender,ulong,fmt::v10::detail::fill_t<char> const&) mov [rsp+0B8h+var_68], rax mov rax, [rsp+0B8h+var_68] mov [rsp+0B8h+var_60], rax loc_B00E0: mov rdi, [rsp+0B8h+var_30] mov rax, [rsp+0B8h+var_60] mov [rsp+0B8h+var_80], rax mov rsi, [rsp+0B8h+var_80] call _ZZN3fmt3v106detail9write_intINS0_8appenderEocEET_S4_T0_jRKNS0_12format_specsIT1_EERKNS1_14digit_groupingIS7_EEENKUlS3_E_clES3_; fmt::v10::detail::write_int<fmt::v10::appender,unsigned __int128,char>(fmt::v10::appender,unsigned __int128,uint,fmt::v10::format_specs<char> const&,fmt::v10::detail::digit_grouping<char> const&)::{lambda(fmt::v10::appender)#1}::operator()(fmt::v10::appender) mov [rsp+0B8h+var_78], rax mov rax, [rsp+0B8h+var_78] mov [rsp+0B8h+var_60], rax cmp [rsp+0B8h+var_58], 0 jz short loc_B0147 mov rax, [rsp+0B8h+var_60] mov [rsp+0B8h+var_90], rax mov rsi, [rsp+0B8h+var_58] mov rdx, [rsp+0B8h+var_18] add rdx, 0Bh mov rdi, [rsp+0B8h+var_90] call _ZN3fmt3v106detail4fillINS0_8appenderEcEET_S4_mRKNS1_6fill_tIT0_EE; fmt::v10::detail::fill<fmt::v10::appender,char>(fmt::v10::appender,ulong,fmt::v10::detail::fill_t<char> const&) mov [rsp+0B8h+var_88], rax mov rax, [rsp+0B8h+var_88] mov [rsp+0B8h+var_60], rax loc_B0147: mov rax, [rsp+0B8h+var_10] mov [rsp+0B8h+var_98], rax mov rax, [rsp+0B8h+var_60] mov [rsp+0B8h+var_A0], rax mov rdi, [rsp+0B8h+var_98] mov rsi, [rsp+0B8h+var_A0] call _ZN3fmt3v106detail13base_iteratorINS0_8appenderEEET_S4_S4_; fmt::v10::detail::base_iterator<fmt::v10::appender>(fmt::v10::appender,fmt::v10::appender) mov [rsp+0B8h+var_8], rax mov rax, [rsp+0B8h+var_8] add rsp, 0B8h retn
long long fmt::v10::detail::write_padded<(fmt::v10::align::type)2,fmt::v10::appender,char,fmt::v10::appender fmt::v10::detail::write_int<fmt::v10::appender,unsigned __int128,char>(fmt::v10::appender,unsigned __int128,unsigned int,fmt::v10::format_specs<char> const&,fmt::v10::detail::digit_grouping<char> const&)::{lambda(fmt::v10::appender)#1}>( long long a1, long long a2, long long a3, unsigned long long a4, long long a5) { unsigned long long v6; // [rsp+10h] [rbp-A8h] long long v7; // [rsp+58h] [rbp-60h] long long v8; // [rsp+58h] [rbp-60h] unsigned long long v9; // [rsp+60h] [rbp-58h] unsigned long long v10; // [rsp+68h] [rbp-50h] unsigned int v11; // [rsp+84h] [rbp-34h] long long v14; // [rsp+A8h] [rbp-10h] BYREF v14 = a1; v11 = fmt::v10::detail::to_unsigned<int>(*(_DWORD *)a2); if ( v11 <= a4 ) v6 = 0LL; else v6 = v11 - a4; v10 = v6 >> byte_1108D4[*(_WORD *)(a2 + 9) & 0xF]; v9 = v6 - v10; fmt::v10::detail::fill_t<char>::size(a2 + 11); v7 = *(_QWORD *)fmt::v10::detail::reserve<fmt::v10::appender>((long long)&v14); if ( v10 ) v7 = fmt::v10::detail::fill<fmt::v10::appender,char>(v7, v10, a2 + 11); v8 = fmt::v10::detail::write_int<fmt::v10::appender,unsigned __int128,char>(fmt::v10::appender,unsigned __int128,unsigned int,fmt::v10::format_specs<char> const&,fmt::v10::detail::digit_grouping<char> const&)::{lambda(fmt::v10::appender)#1}::operator()( a5, v7); if ( v9 ) v8 = fmt::v10::detail::fill<fmt::v10::appender,char>(v8, v9, a2 + 11); return fmt::v10::detail::base_iterator<fmt::v10::appender>(v14, v8); }
write_padded<(fmt::v10::align::type)2,fmt::v10::appender,char,fmt::v10::detail::write_int<fmt::v10::appender,unsigned__int128,char>(fmt::v10::appender,unsigned__int128,unsigned_int,fmt::v10::format_specs<char>const&,fmt::v10::detail::digit_grouping<char>const&)::{lambda(fmt::v10::appender)#1}>: SUB RSP,0xb8 MOV qword ptr [RSP + 0xa8],RDI MOV qword ptr [RSP + 0xa0],RSI MOV qword ptr [RSP + 0x98],RDX MOV qword ptr [RSP + 0x90],RCX MOV qword ptr [RSP + 0x88],R8 MOV RAX,qword ptr [RSP + 0xa0] MOV EDI,dword ptr [RAX] CALL 0x00187c40 MOV dword ptr [RSP + 0x84],EAX MOV EAX,dword ptr [RSP + 0x84] CMP RAX,qword ptr [RSP + 0x90] JBE 0x001afffc MOV EAX,dword ptr [RSP + 0x84] SUB RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x10],RAX JMP 0x001b0005 LAB_001afffc: XOR EAX,EAX MOV qword ptr [RSP + 0x10],RAX JMP 0x001b0005 LAB_001b0005: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x78],RAX LEA RAX,[0x2108d4] MOV qword ptr [RSP + 0x70],RAX MOV RAX,qword ptr [RSP + 0x78] MOV RCX,qword ptr [RSP + 0x70] MOV RDX,qword ptr [RSP + 0xa0] MOV DX,word ptr [RDX + 0x9] AND DX,0xf MOVZX EDX,DL MOVSX ECX,byte ptr [RCX + RDX*0x1] MOV ECX,ECX SHR RAX,CL MOV qword ptr [RSP + 0x68],RAX MOV RAX,qword ptr [RSP + 0x78] SUB RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP],RAX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0xa0] ADD RDI,0xb CALL 0x001901d0 MOV RSI,qword ptr [RSP] MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] IMUL RAX,RCX ADD RSI,RAX LEA RDI,[RSP + 0xa8] CALL 0x0018d9c0 MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x58],RAX CMP qword ptr [RSP + 0x68],0x0 JZ 0x001b00e0 MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x48],RAX MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0xa0] ADD RDX,0xb MOV RDI,qword ptr [RSP + 0x48] CALL 0x001901e0 MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x58],RAX LAB_001b00e0: MOV RDI,qword ptr [RSP + 0x88] MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x38],RAX MOV RSI,qword ptr [RSP + 0x38] CALL 0x001b0190 MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x58],RAX CMP qword ptr [RSP + 0x60],0x0 JZ 0x001b0147 MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x28],RAX MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0xa0] ADD RDX,0xb MOV RDI,qword ptr [RSP + 0x28] CALL 0x001901e0 MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x58],RAX LAB_001b0147: MOV RAX,qword ptr [RSP + 0xa8] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x0018daf0 MOV qword ptr [RSP + 0xb0],RAX MOV RAX,qword ptr [RSP + 0xb0] ADD RSP,0xb8 RET
/* fmt::v10::appender fmt::v10::detail::write_padded<(fmt::v10::align::type)2, fmt::v10::appender, char, fmt::v10::detail::write_int<fmt::v10::appender, unsigned __int128, char>(fmt::v10::appender, unsigned __int128, unsigned int, fmt::v10::format_specs<char> const&, fmt::v10::detail::digit_grouping<char> const&)::{lambda(fmt::v10::appender)#1}>(fmt::v10::appender, fmt::v10::format_specs<char> const&, unsigned long, unsigned long, fmt::v10::detail::write_int<fmt::v10::appender, unsigned __int128, char>(fmt::v10::appender, unsigned __int128, unsigned int, fmt::v10::format_specs<char> const&, fmt::v10::detail::digit_grouping<char> const&)::{lambda(fmt::v10::appender)#1}&&) */ int8 fmt::v10::detail:: write_padded<(fmt::v10::align::type)2,fmt::v10::appender,char,fmt::v10::detail::write_int<fmt::v10::appender,unsigned__int128,char>(fmt::v10::appender,unsigned__int128,unsigned_int,fmt::v10::format_specs<char>const&,fmt::v10::detail::digit_grouping<char>const&)::_lambda(fmt::v10::appender)_1_> (int8 param_1,int *param_2,long param_3,ulong param_4, _lambda_fmt__v10__appender__1_ *param_5) { uint uVar1; ulong uVar2; long lVar3; int8 *puVar4; int8 uVar5; ulong local_a8; int8 local_60; int8 local_10 [2]; local_10[0] = param_1; uVar1 = to_unsigned<int>(*param_2); if (param_4 < uVar1) { local_a8 = uVar1 - param_4; } else { local_a8 = 0; } uVar2 = local_a8 >> ((&DAT_002108d4)[(byte)*(int2 *)((long)param_2 + 9) & 0xf] & 0x3f); lVar3 = fill_t<char>::size((fill_t<char> *)((long)param_2 + 0xb)); puVar4 = (int8 *) reserve<fmt::v10::appender>((appender *)local_10,param_3 + local_a8 * lVar3); local_60 = *puVar4; if (uVar2 != 0) { local_60 = fill<fmt::v10::appender,char>(local_60,uVar2,(long)param_2 + 0xb); } local_60 = write_int<fmt::v10::appender,unsigned__int128,char>(fmt::v10::appender,unsigned__int128,unsigned_int,fmt::v10::format_specs<char>const&,fmt::v10::detail::digit_grouping<char>const&) ::{lambda(fmt::v10::appender)#1}::operator()(param_5,local_60); if (local_a8 - uVar2 != 0) { local_60 = fill<fmt::v10::appender,char>(local_60,local_a8 - uVar2,(long)param_2 + 0xb); } uVar5 = base_iterator<fmt::v10::appender>(local_10[0],local_60); return uVar5; }
10,303
mi_get_last_key
eloqsql/storage/myisam/mi_search.c
uchar *_mi_get_last_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *lastkey, uchar *endpos, uint *return_key_length) { uint nod_flag; uchar *lastpos; DBUG_ENTER("_mi_get_last_key"); DBUG_PRINT("enter",("page:%p endpos: %p", page, endpos)); nod_flag=mi_test_if_nod(page); if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY))) { lastpos=endpos-keyinfo->keylength-nod_flag; *return_key_length=keyinfo->keylength; if (lastpos > page) bmove((uchar*) lastkey,(uchar*) lastpos,keyinfo->keylength+nod_flag); } else { lastpos=(page+=2+nod_flag); lastkey[0]=0; while (page < endpos) { lastpos=page; *return_key_length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,lastkey); if (*return_key_length == 0) { DBUG_PRINT("error",("Couldn't find last key: page: %p", page)); mi_print_error(info->s, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; DBUG_RETURN(0); } } } DBUG_PRINT("exit",("lastpos: %p length: %u", lastpos, *return_key_length)); DBUG_RETURN(lastpos); }
O0
c
mi_get_last_key: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) jmp 0xc1302 movq -0x20(%rbp), %rax movzbl (%rax), %eax andl $0x80, %eax cmpl $0x0, %eax je 0xc1325 movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x17c(%rax), %eax movl %eax, -0x4c(%rbp) jmp 0xc132c xorl %eax, %eax movl %eax, -0x4c(%rbp) jmp 0xc132c movl -0x4c(%rbp), %eax movl %eax, -0x3c(%rbp) movq -0x18(%rbp), %rax movzwl 0xa(%rax), %eax andl $0x28, %eax cmpl $0x0, %eax jne 0xc13a3 movq -0x30(%rbp), %rax movq -0x18(%rbp), %rcx movzwl 0x12(%rcx), %ecx movslq %ecx, %rdx xorl %ecx, %ecx subq %rdx, %rcx addq %rcx, %rax movl -0x3c(%rbp), %ecx movl %ecx, %edx xorl %ecx, %ecx subq %rdx, %rcx addq %rcx, %rax movq %rax, -0x48(%rbp) movq -0x18(%rbp), %rax movzwl 0x12(%rax), %ecx movq -0x38(%rbp), %rax movl %ecx, (%rax) movq -0x48(%rbp), %rax cmpq -0x20(%rbp), %rax jbe 0xc139e movq -0x28(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x18(%rbp), %rax movzwl 0x12(%rax), %eax addl -0x3c(%rbp), %eax movl %eax, %eax movl %eax, %edx callq 0x2a140 jmp 0xc1432 movl -0x3c(%rbp), %ecx addl $0x2, %ecx movq -0x20(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x20(%rbp) movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rax movb $0x0, (%rax) movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0xc1430 movq -0x20(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x18(%rbp), %rax movq 0x48(%rax), %rax movq -0x18(%rbp), %rdi movl -0x3c(%rbp), %esi movq -0x28(%rbp), %rcx leaq -0x20(%rbp), %rdx callq *%rax movl %eax, %ecx movq -0x38(%rbp), %rax movl %ecx, (%rax) movq -0x38(%rbp), %rax cmpl $0x0, (%rax) jne 0xc142e jmp 0xc13ff jmp 0xc1401 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x268(%rax), %rsi movl $0x7e, %edi callq 0xade70 callq 0xfc1b0 movl $0x7e, (%rax) movq $0x0, -0x8(%rbp) jmp 0xc1440 jmp 0xc13c1 jmp 0xc1432 jmp 0xc1434 jmp 0xc1436 jmp 0xc1438 movq -0x48(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopw (%rax,%rax)
_mi_get_last_key: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_38], r9 jmp short $+2 loc_C1302: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] and eax, 80h cmp eax, 0 jz short loc_C1325 mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax+17Ch] mov [rbp+var_4C], eax jmp short loc_C132C loc_C1325: xor eax, eax mov [rbp+var_4C], eax jmp short $+2 loc_C132C: mov eax, [rbp+var_4C] mov [rbp+var_3C], eax mov rax, [rbp+var_18] movzx eax, word ptr [rax+0Ah] and eax, 28h cmp eax, 0 jnz short loc_C13A3 mov rax, [rbp+var_30] mov rcx, [rbp+var_18] movzx ecx, word ptr [rcx+12h] movsxd rdx, ecx xor ecx, ecx sub rcx, rdx add rax, rcx mov ecx, [rbp+var_3C] mov edx, ecx xor ecx, ecx sub rcx, rdx add rax, rcx mov [rbp+var_48], rax mov rax, [rbp+var_18] movzx ecx, word ptr [rax+12h] mov rax, [rbp+var_38] mov [rax], ecx mov rax, [rbp+var_48] cmp rax, [rbp+var_20] jbe short loc_C139E mov rdi, [rbp+var_28] mov rsi, [rbp+var_48] mov rax, [rbp+var_18] movzx eax, word ptr [rax+12h] add eax, [rbp+var_3C] mov eax, eax mov edx, eax call _memmove loc_C139E: jmp loc_C1432 loc_C13A3: mov ecx, [rbp+var_3C] add ecx, 2 mov rax, [rbp+var_20] mov ecx, ecx add rax, rcx mov [rbp+var_20], rax mov [rbp+var_48], rax mov rax, [rbp+var_28] mov byte ptr [rax], 0 loc_C13C1: mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jnb short loc_C1430 mov rax, [rbp+var_20] mov [rbp+var_48], rax mov rax, [rbp+var_18] mov rax, [rax+48h] mov rdi, [rbp+var_18] mov esi, [rbp+var_3C] mov rcx, [rbp+var_28] lea rdx, [rbp+var_20] call rax mov ecx, eax mov rax, [rbp+var_38] mov [rax], ecx mov rax, [rbp+var_38] cmp dword ptr [rax], 0 jnz short loc_C142E jmp short $+2 loc_C13FF: jmp short $+2 loc_C1401: mov rax, [rbp+var_10] mov rax, [rax] mov rsi, [rax+268h] mov edi, 7Eh ; '~' call mi_report_error call _my_thread_var mov dword ptr [rax], 7Eh ; '~' mov [rbp+var_8], 0 jmp short loc_C1440 loc_C142E: jmp short loc_C13C1 loc_C1430: jmp short $+2 loc_C1432: jmp short $+2 loc_C1434: jmp short $+2 loc_C1436: jmp short $+2 loc_C1438: mov rax, [rbp+var_48] mov [rbp+var_8], rax loc_C1440: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
_BYTE * mi_get_last_key(long long a1, long long a2, _BYTE *a3, _BYTE *a4, unsigned long long a5, _DWORD *a6) { const char *v6; // rsi unsigned int v8; // [rsp+4h] [rbp-4Ch] _BYTE *v9; // [rsp+8h] [rbp-48h] _BYTE *v13; // [rsp+30h] [rbp-20h] BYREF long long v14; // [rsp+38h] [rbp-18h] long long v15; // [rsp+40h] [rbp-10h] v15 = a1; v14 = a2; v13 = a3; if ( (*a3 & 0x80) != 0 ) v8 = *(_DWORD *)(*(_QWORD *)v15 + 380LL); else v8 = 0; if ( (*(_WORD *)(v14 + 10) & 0x28) != 0 ) { v13 += v8 + 2; v9 = v13; *a4 = 0; while ( (unsigned long long)v13 < a5 ) { v9 = v13; *a6 = (*(long long ( **)(long long, _QWORD, _BYTE **, _BYTE *))(v14 + 72))(v14, v8, &v13, a4); if ( !*a6 ) { v6 = *(const char **)(*(_QWORD *)v15 + 616LL); mi_report_error(126, (long long)v6); *(_DWORD *)my_thread_var(126LL, v6) = 126; return 0LL; } } } else { v9 = (_BYTE *)(a5 - *(unsigned __int16 *)(v14 + 18) - v8); *a6 = *(unsigned __int16 *)(v14 + 18); if ( v9 > v13 ) memmove(a4, v9, v8 + *(unsigned __int16 *)(v14 + 18)); } return v9; }
_mi_get_last_key: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 JMP 0x001c1302 LAB_001c1302: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] AND EAX,0x80 CMP EAX,0x0 JZ 0x001c1325 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x17c] MOV dword ptr [RBP + -0x4c],EAX JMP 0x001c132c LAB_001c1325: XOR EAX,EAX MOV dword ptr [RBP + -0x4c],EAX JMP 0x001c132c LAB_001c132c: MOV EAX,dword ptr [RBP + -0x4c] MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX + 0xa] AND EAX,0x28 CMP EAX,0x0 JNZ 0x001c13a3 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,word ptr [RCX + 0x12] MOVSXD RDX,ECX XOR ECX,ECX SUB RCX,RDX ADD RAX,RCX MOV ECX,dword ptr [RBP + -0x3c] MOV EDX,ECX XOR ECX,ECX SUB RCX,RDX ADD RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x18] MOVZX ECX,word ptr [RAX + 0x12] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x48] CMP RAX,qword ptr [RBP + -0x20] JBE 0x001c139e MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX + 0x12] ADD EAX,dword ptr [RBP + -0x3c] MOV EAX,EAX MOV EDX,EAX CALL 0x0012a140 LAB_001c139e: JMP 0x001c1432 LAB_001c13a3: MOV ECX,dword ptr [RBP + -0x3c] ADD ECX,0x2 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],0x0 LAB_001c13c1: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x30] JNC 0x001c1430 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x48] MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x3c] MOV RCX,qword ptr [RBP + -0x28] LEA RDX,[RBP + -0x20] CALL RAX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x38] CMP dword ptr [RAX],0x0 JNZ 0x001c142e JMP 0x001c13ff LAB_001c13ff: JMP 0x001c1401 LAB_001c1401: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x268] MOV EDI,0x7e CALL 0x001ade70 CALL 0x001fc1b0 MOV dword ptr [RAX],0x7e MOV qword ptr [RBP + -0x8],0x0 JMP 0x001c1440 LAB_001c142e: JMP 0x001c13c1 LAB_001c1430: JMP 0x001c1432 LAB_001c1432: JMP 0x001c1434 LAB_001c1434: JMP 0x001c1436 LAB_001c1436: JMP 0x001c1438 LAB_001c1438: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x8],RAX LAB_001c1440: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
byte * _mi_get_last_key(long *param_1,long param_2,byte *param_3,int1 *param_4,byte *param_5, uint *param_6) { uint uVar1; int4 *puVar2; uint local_54; byte *local_50; byte *local_28; long local_20; long *local_18; byte *local_10; if ((*param_3 & 0x80) == 0) { local_54 = 0; } else { local_54 = *(uint *)(*param_1 + 0x17c); } local_20 = param_2; local_18 = param_1; if ((*(ushort *)(param_2 + 10) & 0x28) == 0) { local_50 = param_5 + (-(ulong)local_54 - (long)(int)(uint)*(ushort *)(param_2 + 0x12)); *param_6 = (uint)*(ushort *)(param_2 + 0x12); if (param_3 < local_50) { local_28 = param_3; memmove(param_4,local_50,(ulong)(*(ushort *)(param_2 + 0x12) + local_54)); } LAB_001c1432: local_10 = local_50; } else { local_50 = param_3 + (local_54 + 2); *param_4 = 0; local_28 = local_50; do { if (param_5 <= local_28) goto LAB_001c1432; local_50 = local_28; uVar1 = (**(code **)(local_20 + 0x48))(local_20,local_54,&local_28,param_4); *param_6 = uVar1; } while (*param_6 != 0); mi_report_error(0x7e,*(int8 *)(*local_18 + 0x268)); puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x7e; local_10 = (byte *)0x0; } return local_10; }
10,304
escape_string_for_mysql
eloqsql/mysys/charset.c
size_t escape_string_for_mysql(CHARSET_INFO *charset_info, char *to, size_t to_length, const char *from, size_t length, my_bool *overflow) { const char *to_start= to; const char *end, *to_end=to_start + (to_length ? to_length-1 : 2*length); *overflow= FALSE; for (end= from + length; from < end; from++) { char escape= 0; #ifdef USE_MB int tmp_length= my_ci_charlen(charset_info, (const uchar *) from, (const uchar *) end); if (tmp_length > 1) { if (to + tmp_length > to_end) { *overflow= TRUE; break; } while (tmp_length--) *to++= *from++; from--; continue; } /* If the next character appears to begin a multi-byte character, we escape that first byte of that apparent multi-byte character. (The character just looks like a multi-byte character -- if it were actually a multi-byte character, it would have been passed through in the test above.) Without this check, we can create a problem by converting an invalid multi-byte character into a valid one. For example, 0xbf27 is not a valid GBK character, but 0xbf5c is. (0x27 = ', 0x5c = \) */ if (tmp_length < 1) /* Bad byte sequence */ escape= *from; else #endif switch (*from) { case 0: /* Must be escaped for 'mysql' */ escape= '0'; break; case '\n': /* Must be escaped for logs */ escape= 'n'; break; case '\r': escape= 'r'; break; case '\\': escape= '\\'; break; case '\'': escape= '\''; break; case '"': /* Better safe than sorry */ escape= '"'; break; case '\032': /* This gives problems on Win32 */ escape= 'Z'; break; } if (escape) { if (to + 2 > to_end) { *overflow= TRUE; break; } *to++= '\\'; *to++= escape; } else { if (to + 1 > to_end) { *overflow= TRUE; break; } *to++= *from; } } *to= 0; return (size_t) (to - to_start); }
O0
c
escape_string_for_mysql: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x58(%rbp) cmpq $0x0, -0x18(%rbp) je 0x300a5 movq -0x18(%rbp), %rax subq $0x1, %rax movq %rax, -0x60(%rbp) jmp 0x300b0 movq -0x28(%rbp), %rax shlq %rax movq %rax, -0x60(%rbp) movq -0x58(%rbp), %rax movq -0x60(%rbp), %rcx addq %rcx, %rax movq %rax, -0x48(%rbp) movq -0x30(%rbp), %rax movb $0x0, (%rax) movq -0x20(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x20(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x3026f movb $0x0, -0x49(%rbp) movq -0x8(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x40(%rbp), %rdx callq 0x30290 movl %eax, -0x50(%rbp) cmpl $0x1, -0x50(%rbp) jle 0x30162 movq -0x10(%rbp), %rax movslq -0x50(%rbp), %rcx addq %rcx, %rax cmpq -0x48(%rbp), %rax jbe 0x3011b movq -0x30(%rbp), %rax movb $0x1, (%rax) jmp 0x3026f jmp 0x3011d movl -0x50(%rbp), %eax movl %eax, %ecx addl $-0x1, %ecx movl %ecx, -0x50(%rbp) cmpl $0x0, %eax je 0x30151 movq -0x20(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x20(%rbp) movb (%rax), %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) jmp 0x3011d movq -0x20(%rbp), %rax addq $-0x1, %rax movq %rax, -0x20(%rbp) jmp 0x3025e cmpl $0x1, -0x50(%rbp) jge 0x30173 movq -0x20(%rbp), %rax movb (%rax), %al movb %al, -0x49(%rbp) jmp 0x301e9 movq -0x20(%rbp), %rax movsbl (%rax), %eax movl %eax, -0x64(%rbp) testl %eax, %eax je 0x301bf jmp 0x30183 movl -0x64(%rbp), %eax subl $0xa, %eax je 0x301c5 jmp 0x3018d movl -0x64(%rbp), %eax subl $0xd, %eax je 0x301cb jmp 0x30197 movl -0x64(%rbp), %eax subl $0x1a, %eax je 0x301e3 jmp 0x301a1 movl -0x64(%rbp), %eax subl $0x22, %eax je 0x301dd jmp 0x301ab movl -0x64(%rbp), %eax subl $0x27, %eax je 0x301d7 jmp 0x301b5 movl -0x64(%rbp), %eax subl $0x5c, %eax je 0x301d1 jmp 0x301e7 movb $0x30, -0x49(%rbp) jmp 0x301e7 movb $0x6e, -0x49(%rbp) jmp 0x301e7 movb $0x72, -0x49(%rbp) jmp 0x301e7 movb $0x5c, -0x49(%rbp) jmp 0x301e7 movb $0x27, -0x49(%rbp) jmp 0x301e7 movb $0x22, -0x49(%rbp) jmp 0x301e7 movb $0x5a, -0x49(%rbp) jmp 0x301e9 cmpb $0x0, -0x49(%rbp) je 0x3022e movq -0x10(%rbp), %rax addq $0x2, %rax cmpq -0x48(%rbp), %rax jbe 0x30206 movq -0x30(%rbp), %rax movb $0x1, (%rax) jmp 0x3026f movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb $0x5c, (%rax) movb -0x49(%rbp), %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) jmp 0x3025c movq -0x10(%rbp), %rax addq $0x1, %rax cmpq -0x48(%rbp), %rax jbe 0x30245 movq -0x30(%rbp), %rax movb $0x1, (%rax) jmp 0x3026f movq -0x20(%rbp), %rax movb (%rax), %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) jmp 0x3025e movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) jmp 0x300d2 movq -0x10(%rbp), %rax movb $0x0, (%rax) movq -0x10(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax addq $0x70, %rsp popq %rbp retq nopw (%rax,%rax)
escape_string_for_mysql: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_10] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_58], rax cmp [rbp+var_18], 0 jz short loc_300A5 mov rax, [rbp+var_18] sub rax, 1 mov [rbp+var_60], rax jmp short loc_300B0 loc_300A5: mov rax, [rbp+var_28] shl rax, 1 mov [rbp+var_60], rax loc_300B0: mov rax, [rbp+var_58] mov rcx, [rbp+var_60] add rax, rcx mov [rbp+var_48], rax mov rax, [rbp+var_30] mov byte ptr [rax], 0 mov rax, [rbp+var_20] add rax, [rbp+var_28] mov [rbp+var_40], rax loc_300D2: mov rax, [rbp+var_20] cmp rax, [rbp+var_40] jnb loc_3026F mov [rbp+var_49], 0 mov rdi, [rbp+var_8] mov rsi, [rbp+var_20] mov rdx, [rbp+var_40] call my_ci_charlen mov [rbp+var_50], eax cmp [rbp+var_50], 1 jle short loc_30162 mov rax, [rbp+var_10] movsxd rcx, [rbp+var_50] add rax, rcx cmp rax, [rbp+var_48] jbe short loc_3011B mov rax, [rbp+var_30] mov byte ptr [rax], 1 jmp loc_3026F loc_3011B: jmp short $+2 loc_3011D: mov eax, [rbp+var_50] mov ecx, eax add ecx, 0FFFFFFFFh mov [rbp+var_50], ecx cmp eax, 0 jz short loc_30151 mov rax, [rbp+var_20] mov rcx, rax add rcx, 1 mov [rbp+var_20], rcx mov cl, [rax] mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl jmp short loc_3011D loc_30151: mov rax, [rbp+var_20] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_20], rax jmp loc_3025E loc_30162: cmp [rbp+var_50], 1 jge short loc_30173 mov rax, [rbp+var_20] mov al, [rax] mov [rbp+var_49], al jmp short loc_301E9 loc_30173: mov rax, [rbp+var_20] movsx eax, byte ptr [rax] mov [rbp+var_64], eax test eax, eax jz short loc_301BF jmp short $+2 loc_30183: mov eax, [rbp+var_64] sub eax, 0Ah jz short loc_301C5 jmp short $+2 loc_3018D: mov eax, [rbp+var_64] sub eax, 0Dh jz short loc_301CB jmp short $+2 loc_30197: mov eax, [rbp+var_64] sub eax, 1Ah jz short loc_301E3 jmp short $+2 loc_301A1: mov eax, [rbp+var_64] sub eax, 22h ; '"' jz short loc_301DD jmp short $+2 loc_301AB: mov eax, [rbp+var_64] sub eax, 27h ; ''' jz short loc_301D7 jmp short $+2 loc_301B5: mov eax, [rbp+var_64] sub eax, 5Ch ; '\' jz short loc_301D1 jmp short loc_301E7 loc_301BF: mov [rbp+var_49], 30h ; '0' jmp short loc_301E7 loc_301C5: mov [rbp+var_49], 6Eh ; 'n' jmp short loc_301E7 loc_301CB: mov [rbp+var_49], 72h ; 'r' jmp short loc_301E7 loc_301D1: mov [rbp+var_49], 5Ch ; '\' jmp short loc_301E7 loc_301D7: mov [rbp+var_49], 27h ; ''' jmp short loc_301E7 loc_301DD: mov [rbp+var_49], 22h ; '"' jmp short loc_301E7 loc_301E3: mov [rbp+var_49], 5Ah ; 'Z' loc_301E7: jmp short $+2 loc_301E9: cmp [rbp+var_49], 0 jz short loc_3022E mov rax, [rbp+var_10] add rax, 2 cmp rax, [rbp+var_48] jbe short loc_30206 mov rax, [rbp+var_30] mov byte ptr [rax], 1 jmp short loc_3026F loc_30206: mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov byte ptr [rax], 5Ch ; '\' mov cl, [rbp+var_49] mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl jmp short loc_3025C loc_3022E: mov rax, [rbp+var_10] add rax, 1 cmp rax, [rbp+var_48] jbe short loc_30245 mov rax, [rbp+var_30] mov byte ptr [rax], 1 jmp short loc_3026F loc_30245: mov rax, [rbp+var_20] mov cl, [rax] mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl loc_3025C: jmp short $+2 loc_3025E: mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax jmp loc_300D2 loc_3026F: mov rax, [rbp+var_10] mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov rcx, [rbp+var_38] sub rax, rcx add rsp, 70h pop rbp retn
_BYTE * escape_string_for_mysql(long long a1, char *a2, long long a3, char *a4, long long a5, _BYTE *a6) { char *v7; // rax char v8; // cl char *v9; // rax char *v10; // rax char *v11; // rax int v13; // [rsp+Ch] [rbp-64h] long long v14; // [rsp+10h] [rbp-60h] int v15; // [rsp+20h] [rbp-50h] char v16; // [rsp+27h] [rbp-49h] unsigned long long v17; // [rsp+28h] [rbp-48h] unsigned long long v18; // [rsp+30h] [rbp-40h] char *v20; // [rsp+50h] [rbp-20h] char *v21; // [rsp+60h] [rbp-10h] v21 = a2; v20 = a4; if ( a3 ) v14 = a3 - 1; else v14 = 2 * a5; v17 = (unsigned long long)&a2[v14]; *a6 = 0; v18 = (unsigned long long)&a4[a5]; while ( (unsigned long long)v20 < v18 ) { v16 = 0; v15 = my_ci_charlen(a1, v20, v18); if ( v15 <= 1 ) { if ( v15 >= 1 ) { v13 = *v20; if ( *v20 ) { switch ( v13 ) { case 10: v16 = 110; break; case 13: v16 = 114; break; case 26: v16 = 90; break; case 34: v16 = 34; break; case 39: v16 = 39; break; case 92: v16 = 92; break; } } else { v16 = 48; } } else { v16 = *v20; } if ( v16 ) { if ( (unsigned long long)(v21 + 2) > v17 ) { *a6 = 1; break; } *v21 = 92; v10 = v21 + 1; v21 += 2; *v10 = v16; } else { if ( (unsigned long long)(v21 + 1) > v17 ) { *a6 = 1; break; } v11 = v21++; *v11 = *v20; } } else { if ( (unsigned long long)&v21[v15] > v17 ) { *a6 = 1; break; } while ( v15-- ) { v7 = v20++; v8 = *v7; v9 = v21++; *v9 = v8; } --v20; } ++v20; } *v21 = 0; return (_BYTE *)(v21 - a2); }
escape_string_for_mysql: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x58],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x001300a5 MOV RAX,qword ptr [RBP + -0x18] SUB RAX,0x1 MOV qword ptr [RBP + -0x60],RAX JMP 0x001300b0 LAB_001300a5: MOV RAX,qword ptr [RBP + -0x28] SHL RAX,0x1 MOV qword ptr [RBP + -0x60],RAX LAB_001300b0: MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x60] ADD RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x40],RAX LAB_001300d2: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x40] JNC 0x0013026f MOV byte ptr [RBP + -0x49],0x0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x40] CALL 0x00130290 MOV dword ptr [RBP + -0x50],EAX CMP dword ptr [RBP + -0x50],0x1 JLE 0x00130162 MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x50] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x48] JBE 0x0013011b MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x1 JMP 0x0013026f LAB_0013011b: JMP 0x0013011d LAB_0013011d: MOV EAX,dword ptr [RBP + -0x50] MOV ECX,EAX ADD ECX,-0x1 MOV dword ptr [RBP + -0x50],ECX CMP EAX,0x0 JZ 0x00130151 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x20],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL JMP 0x0013011d LAB_00130151: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,-0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x0013025e LAB_00130162: CMP dword ptr [RBP + -0x50],0x1 JGE 0x00130173 MOV RAX,qword ptr [RBP + -0x20] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x49],AL JMP 0x001301e9 LAB_00130173: MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x64],EAX TEST EAX,EAX JZ 0x001301bf JMP 0x00130183 LAB_00130183: MOV EAX,dword ptr [RBP + -0x64] SUB EAX,0xa JZ 0x001301c5 JMP 0x0013018d LAB_0013018d: MOV EAX,dword ptr [RBP + -0x64] SUB EAX,0xd JZ 0x001301cb JMP 0x00130197 LAB_00130197: MOV EAX,dword ptr [RBP + -0x64] SUB EAX,0x1a JZ 0x001301e3 JMP 0x001301a1 LAB_001301a1: MOV EAX,dword ptr [RBP + -0x64] SUB EAX,0x22 JZ 0x001301dd JMP 0x001301ab LAB_001301ab: MOV EAX,dword ptr [RBP + -0x64] SUB EAX,0x27 JZ 0x001301d7 JMP 0x001301b5 LAB_001301b5: MOV EAX,dword ptr [RBP + -0x64] SUB EAX,0x5c JZ 0x001301d1 JMP 0x001301e7 LAB_001301bf: MOV byte ptr [RBP + -0x49],0x30 JMP 0x001301e7 LAB_001301c5: MOV byte ptr [RBP + -0x49],0x6e JMP 0x001301e7 LAB_001301cb: MOV byte ptr [RBP + -0x49],0x72 JMP 0x001301e7 LAB_001301d1: MOV byte ptr [RBP + -0x49],0x5c JMP 0x001301e7 LAB_001301d7: MOV byte ptr [RBP + -0x49],0x27 JMP 0x001301e7 LAB_001301dd: MOV byte ptr [RBP + -0x49],0x22 JMP 0x001301e7 LAB_001301e3: MOV byte ptr [RBP + -0x49],0x5a LAB_001301e7: JMP 0x001301e9 LAB_001301e9: CMP byte ptr [RBP + -0x49],0x0 JZ 0x0013022e MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x48] JBE 0x00130206 MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x1 JMP 0x0013026f LAB_00130206: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV byte ptr [RAX],0x5c MOV CL,byte ptr [RBP + -0x49] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL JMP 0x0013025c LAB_0013022e: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x48] JBE 0x00130245 MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x1 JMP 0x0013026f LAB_00130245: MOV RAX,qword ptr [RBP + -0x20] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL LAB_0013025c: JMP 0x0013025e LAB_0013025e: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x001300d2 LAB_0013026f: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX ADD RSP,0x70 POP RBP RET
long escape_string_for_mysql (int8 param_1,char *param_2,long param_3,char *param_4,long param_5, int1 *param_6) { char cVar1; char *pcVar2; long local_68; int local_58; char local_51; char *local_28; char *local_18; if (param_3 == 0) { local_68 = param_5 << 1; } else { local_68 = param_3 + -1; } pcVar2 = param_2 + local_68; *param_6 = 0; local_28 = param_4; local_18 = param_2; do { if (param_4 + param_5 <= local_28) { LAB_0013026f: *local_18 = '\0'; return (long)local_18 - (long)param_2; } local_51 = '\0'; local_58 = my_ci_charlen(param_1,local_28,param_4 + param_5); if (local_58 < 2) { if (local_58 < 1) { local_51 = *local_28; } else { cVar1 = *local_28; if (cVar1 == '\0') { local_51 = '0'; } else if (cVar1 == '\n') { local_51 = 'n'; } else if (cVar1 == '\r') { local_51 = 'r'; } else if (cVar1 == '\x1a') { local_51 = 'Z'; } else if (cVar1 == '\"') { local_51 = '\"'; } else if (cVar1 == '\'') { local_51 = '\''; } else if (cVar1 == '\\') { local_51 = '\\'; } } if (local_51 == '\0') { if (pcVar2 < local_18 + 1) { *param_6 = 1; goto LAB_0013026f; } *local_18 = *local_28; local_18 = local_18 + 1; } else { if (pcVar2 < local_18 + 2) { *param_6 = 1; goto LAB_0013026f; } *local_18 = '\\'; local_18[1] = local_51; local_18 = local_18 + 2; } } else { if (pcVar2 < local_18 + local_58) { *param_6 = 1; goto LAB_0013026f; } while (local_58 != 0) { *local_18 = *local_28; local_58 = local_58 + -1; local_28 = local_28 + 1; local_18 = local_18 + 1; } local_28 = local_28 + -1; } local_28 = local_28 + 1; } while( true ); }
10,305
safe_hash_free
eloqsql/mysys/my_safehash.c
void safe_hash_free(SAFE_HASH *hash) { /* Test if safe_hash_init succeeded. This will also guard us against multiple free calls. */ if (hash->default_value) { my_hash_free(&hash->hash); mysql_rwlock_destroy(&hash->mutex); hash->default_value=0; } }
O3
c
safe_hash_free: cmpq $0x0, 0x108(%rdi) je 0xa6e1d pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx addq $0x98, %rdi callq 0x94acd movq 0x90(%rbx), %rdi testq %rdi, %rdi jne 0xa6e1e movq %rbx, %rdi callq 0xa5268 movq $0x0, 0x108(%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq leaq 0x2e129b(%rip), %rax # 0x3880c0 movq (%rax), %rax callq *0x58(%rax) movq $0x0, 0x90(%rbx) jmp 0xa6e04
safe_hash_free: cmp qword ptr [rdi+108h], 0 jz short locret_A6E1D push rbp mov rbp, rsp push rbx push rax mov rbx, rdi add rdi, 98h call my_hash_free mov rdi, [rbx+90h] test rdi, rdi jnz short loc_A6E1E loc_A6E04: mov rdi, rbx call my_rw_destroy mov qword ptr [rbx+108h], 0 add rsp, 8 pop rbx pop rbp locret_A6E1D: retn loc_A6E1E: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+58h] mov qword ptr [rbx+90h], 0 jmp short loc_A6E04
long long safe_hash_free(long long a1) { long long v2; // rdi long long result; // rax if ( *(_QWORD *)(a1 + 264) ) { my_hash_free(a1 + 152); v2 = *(_QWORD *)(a1 + 144); if ( v2 ) { ((void ( *)(long long))PSI_server[11])(v2); *(_QWORD *)(a1 + 144) = 0LL; } result = my_rw_destroy(a1); *(_QWORD *)(a1 + 264) = 0LL; } return result; }
safe_hash_free: CMP qword ptr [RDI + 0x108],0x0 JZ 0x001a6e1d PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI ADD RDI,0x98 CALL 0x00194acd MOV RDI,qword ptr [RBX + 0x90] TEST RDI,RDI JNZ 0x001a6e1e LAB_001a6e04: MOV RDI,RBX CALL 0x001a5268 MOV qword ptr [RBX + 0x108],0x0 ADD RSP,0x8 POP RBX POP RBP LAB_001a6e1d: RET LAB_001a6e1e: LEA RAX,[0x4880c0] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x58] MOV qword ptr [RBX + 0x90],0x0 JMP 0x001a6e04
void safe_hash_free(long param_1) { if (*(long *)(param_1 + 0x108) != 0) { my_hash_free(param_1 + 0x98); if (*(long *)(param_1 + 0x90) != 0) { (**(code **)(PSI_server + 0x58))(); *(int8 *)(param_1 + 0x90) = 0; } my_rw_destroy(param_1); *(int8 *)(param_1 + 0x108) = 0; } return; }
10,306
TestWaitingLogSink::~TestWaitingLogSink()
ng-log[P]ng-log/src/logging_unittest.cc
~TestWaitingLogSink() override { RemoveLogSink(this); writer_.Stop(); writer_.Join(); }
O1
cpp
TestWaitingLogSink::~TestWaitingLogSink(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x2cb3e(%rip), %rax # 0x45498 movq %rax, (%rdi) callq 0x1bfa7 leaq 0x10(%rbx), %rdi callq 0x19786 leaq 0x90(%rbx), %r14 movq %r14, %rdi callq 0x8b70 cmpq $0x0, (%r14) jne 0x18998 leaq 0x40(%rbx), %rdi callq 0x1929a movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x1bb64 callq 0x8140 movq %rax, %rdi callq 0x16adb nop
_ZN18TestWaitingLogSinkD2Ev: push r14 push rbx push rax mov rbx, rdi lea rax, off_45498 mov [rdi], rax call _ZN5nglog13RemoveLogSinkEPNS_7LogSinkE; nglog::RemoveLogSink(nglog::LogSink *) lea rdi, [rbx+10h]; this call _ZN17TestLogSinkWriter4StopEv; TestLogSinkWriter::Stop(void) lea r14, [rbx+90h] mov rdi, r14; this call __ZNSt6thread4joinEv; std::thread::join(void) cmp qword ptr [r14], 0 jnz short loc_18998 lea rdi, [rbx+40h] call _ZNSt5dequeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::deque<std::string>::~deque() mov rdi, rbx; this add rsp, 8 pop rbx pop r14 jmp _ZN5nglog7LogSinkD2Ev; nglog::LogSink::~LogSink() loc_18998: call __ZSt9terminatev; std::terminate(void) mov rdi, rax call __clang_call_terminate
void TestWaitingLogSink::~TestWaitingLogSink(TestWaitingLogSink *this, nglog::LogSink *a2) { *(_QWORD *)this = off_45498; nglog::RemoveLogSink(this, a2); TestLogSinkWriter::Stop((TestWaitingLogSink *)((char *)this + 16)); std::thread::join((TestWaitingLogSink *)((char *)this + 144)); if ( *((_QWORD *)this + 18) ) std::terminate(); std::deque<std::string>::~deque((char *)this + 64); nglog::LogSink::~LogSink(this); }
~TestWaitingLogSink: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI LEA RAX,[0x145498] MOV qword ptr [RDI],RAX LAB_0011895d: CALL 0x0011bfa7 LEA RDI,[RBX + 0x10] CALL 0x00119786 LEA R14,[RBX + 0x90] MOV RDI,R14 CALL 0x00108b70 LAB_0011897a: CMP qword ptr [R14],0x0 JNZ 0x00118998 LEA RDI,[RBX + 0x40] CALL 0x0011929a MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x0011bb64 LAB_00118998: CALL 0x00108140
/* TestWaitingLogSink::~TestWaitingLogSink() */ void __thiscall TestWaitingLogSink::~TestWaitingLogSink(TestWaitingLogSink *this) { *(int ***)this = &PTR__TestWaitingLogSink_00145498; /* try { // try from 0011895d to 00118979 has its CatchHandler @ 0011899d */ nglog::RemoveLogSink((LogSink *)this); TestLogSinkWriter::Stop((TestLogSinkWriter *)(this + 0x10)); std::thread::join(); if (*(long *)(this + 0x90) == 0) { std::deque<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~deque ((deque<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x40)); nglog::LogSink::~LogSink((LogSink *)this); return; } /* WARNING: Subroutine does not return */ std::terminate(); }
10,307
done() (.destroy)
tinyCoroLab/examples/wait_group.cpp
task<> done() { utils::sleep(2); wg.done(); log::info("done..."); co_return; }
O0
cpp
done() (.destroy): subq $0x78, %rsp movq %rdi, 0x38(%rsp) movq %rdi, 0x70(%rsp) movq %rdi, %rax addq $0x19, %rax movq %rax, 0x40(%rsp) movq %rdi, %rax addq $0x1a, %rax movq %rax, 0x48(%rsp) addq $0x10, %rdi movq %rdi, 0x50(%rsp) jmp 0xb040 jmp 0xae66 jmp 0xae68 xorl %eax, %eax testb %al, %al jne 0xae91 jmp 0xae70 xorl %eax, %eax testb %al, %al jne 0xb02f jmp 0xae7c movl $0x2, %eax movl %eax, 0x34(%rsp) jmp 0xae87 movl 0x34(%rsp), %eax movl %eax, 0x30(%rsp) jmp 0xaea9 movq 0x40(%rsp), %rdi callq 0xbaf0 xorl %eax, %eax movl %eax, 0x2c(%rsp) movl 0x2c(%rsp), %eax movl %eax, 0x30(%rsp) movl 0x30(%rsp), %eax cmpl $0x0, %eax movl %eax, 0x28(%rsp) je 0xaec3 movl 0x28(%rsp), %eax movl %eax, 0x24(%rsp) jmp 0xafff movl $0x2, %edi callq 0xbbb0 leaq 0x954d6(%rip), %rdi # 0xa03aa callq 0xbbf0 leaq 0x6183c(%rip), %rdi # 0x6c71c callq 0xbb10 jmp 0xaee7 movq 0x50(%rsp), %rdi callq 0xbb40 jmp 0xaf20 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x6c(%rsp) movq 0x60(%rsp), %rdi callq 0x9100 movq 0x50(%rsp), %rdi callq 0xbb50 callq 0x94d0 jmp 0xaf1c jmp 0xaf1e jmp 0xaf20 movq 0x50(%rsp), %rdi callq 0xbb90 movq 0x48(%rsp), %rdi callq 0xba70 testb $0x1, %al jne 0xafc0 movq 0x38(%rsp), %rax movq $0x0, (%rax) movb $0x1, 0x18(%rax) movq 0x38(%rsp), %rsi movq 0x48(%rsp), %rdi callq 0x9ef0 movb $-0x1, %al movb %al, 0x23(%rsp) jmp 0xaf6b movb $0x1, %al movb %al, 0x23(%rsp) jmp 0xaf6b movb 0x23(%rsp), %al movb %al, 0x22(%rsp) movb 0x22(%rsp), %al testb %al, %al je 0xafc0 jmp 0xaf7d movb 0x22(%rsp), %al subb $0x1, %al jne 0xb02f jmp 0xaf8b movl $0x2, %eax movl %eax, 0x1c(%rsp) jmp 0xaf96 movl 0x1c(%rsp), %eax movl %eax, 0x18(%rsp) jmp 0xafd8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x6c(%rsp) movq 0x38(%rsp), %rax movq $0x0, (%rax) movb $0x1, 0x18(%rax) jmp 0xb036 movq 0x48(%rsp), %rdi callq 0xbaf0 xorl %eax, %eax movl %eax, 0x14(%rsp) movl 0x14(%rsp), %eax movl %eax, 0x18(%rsp) movl 0x18(%rsp), %eax cmpl $0x0, %eax movl %eax, 0x10(%rsp) je 0xafef movl 0x10(%rsp), %eax movl %eax, 0x24(%rsp) jmp 0xafff xorl %eax, %eax movl %eax, 0xc(%rsp) jmp 0xaff7 movl 0xc(%rsp), %eax movl %eax, 0x24(%rsp) movq 0x50(%rsp), %rdi movl 0x24(%rsp), %eax movl %eax, 0x8(%rsp) callq 0xbba0 jmp 0xb021 xorl %eax, %eax movl %eax, %edi movl $0x20, %esi callq 0x92f0 movl 0x8(%rsp), %eax testl %eax, %eax je 0xb02d jmp 0xb02b jmp 0xb02f jmp 0xb02f jmp 0xb031 addq $0x78, %rsp retq movq 0x60(%rsp), %rdi callq 0x9520 movq 0x38(%rsp), %rax movb 0x18(%rax), %al testb %al, %al jne 0xaf63 jmp 0xb052 jmp 0xae64 nopw (%rax,%rax)
_Z4donev_cleanup: sub rsp, 78h mov [rsp+78h+var_40], rdi mov [rsp+78h+var_8], rdi mov rax, rdi add rax, 19h mov [rsp+78h+var_38], rax mov rax, rdi add rax, 1Ah mov [rsp+78h+var_30], rax add rdi, 10h mov [rsp+78h+var_28], rdi jmp loc_B040 loc_AE64: jmp short $+2 loc_AE66: jmp short $+2 loc_AE68: xor eax, eax test al, al jnz short loc_AE91 jmp short $+2 loc_AE70: xor eax, eax test al, al jnz loc_B02F jmp short $+2 loc_AE7C: mov eax, 2 mov [rsp+78h+var_44], eax jmp short $+2 loc_AE87: mov eax, [rsp+78h+var_44] mov [rsp+78h+var_48], eax jmp short loc_AEA9 loc_AE91: mov rdi, [rsp+78h+var_38]; this call _ZNKSt7__n486114suspend_always12await_resumeEv; std::__n4861::suspend_always::await_resume(void) xor eax, eax mov [rsp+78h+var_4C], eax mov eax, [rsp+78h+var_4C] mov [rsp+78h+var_48], eax loc_AEA9: mov eax, [rsp+78h+var_48] cmp eax, 0 mov [rsp+78h+var_50], eax jz short loc_AEC3 mov eax, [rsp+78h+var_50] mov [rsp+78h+var_54], eax jmp loc_AFFF loc_AEC3: mov edi, (offset dword_0+2); this call _ZN4coro5utils5sleepEl; coro::utils::sleep(long) lea rdi, wg; this call _ZN4coro10wait_group4doneEv; coro::wait_group::done(void) lea rdi, aDone; "done..." call _ZN4coro3log4infoIJEEEvPKcDpRKT_ jmp short $+2 loc_AEE7: mov rdi, [rsp+78h+var_28] call _ZN4coro6detail7promiseIvE11return_voidEv; coro::detail::promise<void>::return_void(void) jmp short loc_AF20 mov rcx, rax mov eax, edx mov [rsp+78h+var_18], rcx mov [rsp+78h+var_C], eax mov rdi, [rsp+78h+var_18]; void * call ___cxa_begin_catch mov rdi, [rsp+78h+var_28] call _ZN4coro6detail7promiseIvE19unhandled_exceptionEv; coro::detail::promise<void>::unhandled_exception(void) call ___cxa_end_catch jmp short $+2 loc_AF1C: jmp short $+2 loc_AF1E: jmp short $+2 loc_AF20: mov rdi, [rsp+78h+var_28]; this call _ZN4coro6detail12promise_base13final_suspendEv; coro::detail::promise_base::final_suspend(void) mov rdi, [rsp+78h+var_30]; this call _ZNKSt7__n486114suspend_always11await_readyEv; std::__n4861::suspend_always::await_ready(void) test al, 1 jnz loc_AFC0 mov rax, [rsp+78h+var_40] mov qword ptr [rax], 0 mov byte ptr [rax+18h], 1 mov rsi, [rsp+78h+var_40] mov rdi, [rsp+78h+var_30] call sub_9EF0 mov al, 0FFh mov [rsp+78h+var_55], al jmp short loc_AF6B loc_AF63: mov al, 1 mov [rsp+78h+var_55], al jmp short $+2 loc_AF6B: mov al, [rsp+78h+var_55] mov [rsp+78h+var_56], al mov al, [rsp+78h+var_56] test al, al jz short loc_AFC0 jmp short $+2 loc_AF7D: mov al, [rsp+78h+var_56] sub al, 1 jnz loc_B02F jmp short $+2 loc_AF8B: mov eax, 2 mov [rsp+78h+var_5C], eax jmp short $+2 loc_AF96: mov eax, [rsp+78h+var_5C] mov [rsp+78h+var_60], eax jmp short loc_AFD8 mov rcx, rax mov eax, edx mov [rsp+arg_58], rcx mov [rsp+arg_64], eax mov rax, [rsp+arg_30] mov qword ptr [rax], 0 mov byte ptr [rax+18h], 1 jmp short loc_B036 loc_AFC0: mov rdi, [rsp+78h+var_30]; this call _ZNKSt7__n486114suspend_always12await_resumeEv; std::__n4861::suspend_always::await_resume(void) xor eax, eax mov [rsp+78h+var_64], eax mov eax, [rsp+78h+var_64] mov [rsp+78h+var_60], eax loc_AFD8: mov eax, [rsp+78h+var_60] cmp eax, 0 mov [rsp+78h+var_68], eax jz short loc_AFEF mov eax, [rsp+78h+var_68] mov [rsp+78h+var_54], eax jmp short loc_AFFF loc_AFEF: xor eax, eax mov [rsp+78h+var_6C], eax jmp short $+2 loc_AFF7: mov eax, [rsp+78h+var_6C] mov [rsp+78h+var_54], eax loc_AFFF: mov rdi, [rsp+78h+var_28] mov eax, [rsp+78h+var_54] mov [rsp+78h+var_70], eax call _ZN4coro6detail7promiseIvED2Ev; coro::detail::promise<void>::~promise() jmp short loc_B021 xor eax, eax mov edi, eax; void * mov esi, 20h ; ' '; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B021: mov eax, [rsp+78h+var_70] test eax, eax jz short loc_B02D jmp short $+2 loc_B02B: jmp short loc_B02F loc_B02D: jmp short $+2 loc_B02F: jmp short $+2 loc_B031: add rsp, 78h retn loc_B036: mov rdi, [rsp+arg_58] call __Unwind_Resume loc_B040: mov rax, [rsp+78h+var_40] mov al, [rax+18h] test al, al jnz loc_AF63 jmp short $+2 loc_B052: jmp loc_AE64
char done(long long a1) { coro::detail::promise<void>::~promise(a1 + 16); return 2; }
_Z4donev.cleanup: SUB RSP,0x78 MOV qword ptr [RSP + 0x38],RDI MOV qword ptr [RSP + 0x70],RDI MOV RAX,RDI ADD RAX,0x19 MOV qword ptr [RSP + 0x40],RAX MOV RAX,RDI ADD RAX,0x1a MOV qword ptr [RSP + 0x48],RAX ADD RDI,0x10 MOV qword ptr [RSP + 0x50],RDI JMP 0x0010b040 LAB_0010ae64: JMP 0x0010ae66 LAB_0010ae66: JMP 0x0010ae68 LAB_0010ae68: XOR EAX,EAX TEST AL,AL JNZ 0x0010ae91 JMP 0x0010ae70 LAB_0010ae70: XOR EAX,EAX TEST AL,AL JNZ 0x0010b02f JMP 0x0010ae7c LAB_0010ae7c: MOV EAX,0x2 MOV dword ptr [RSP + 0x34],EAX JMP 0x0010ae87 LAB_0010ae87: MOV EAX,dword ptr [RSP + 0x34] MOV dword ptr [RSP + 0x30],EAX JMP 0x0010aea9 LAB_0010ae91: MOV RDI,qword ptr [RSP + 0x40] CALL 0x0010baf0 XOR EAX,EAX MOV dword ptr [RSP + 0x2c],EAX MOV EAX,dword ptr [RSP + 0x2c] MOV dword ptr [RSP + 0x30],EAX LAB_0010aea9: MOV EAX,dword ptr [RSP + 0x30] CMP EAX,0x0 MOV dword ptr [RSP + 0x28],EAX JZ 0x0010aec3 MOV EAX,dword ptr [RSP + 0x28] MOV dword ptr [RSP + 0x24],EAX JMP 0x0010afff LAB_0010aec3: MOV EDI,0x2 CALL 0x0010bbb0 LEA RDI,[0x1a03aa] CALL 0x0010bbf0 LAB_0010aed9: LEA RDI,[0x16c71c] CALL 0x0010bb10 LAB_0010aee5: JMP 0x0010aee7 LAB_0010aee7: MOV RDI,qword ptr [RSP + 0x50] CALL 0x0010bb40 JMP 0x0010af20 LAB_0010af20: MOV RDI,qword ptr [RSP + 0x50] CALL 0x0010bb90 MOV RDI,qword ptr [RSP + 0x48] CALL 0x0010ba70 TEST AL,0x1 JNZ 0x0010afc0 MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RAX],0x0 MOV byte ptr [RAX + 0x18],0x1 MOV RSI,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RSP + 0x48] CALL 0x00109ef0 MOV AL,0xff MOV byte ptr [RSP + 0x23],AL JMP 0x0010af6b LAB_0010af63: MOV AL,0x1 MOV byte ptr [RSP + 0x23],AL JMP 0x0010af6b LAB_0010af6b: MOV AL,byte ptr [RSP + 0x23] MOV byte ptr [RSP + 0x22],AL MOV AL,byte ptr [RSP + 0x22] TEST AL,AL JZ 0x0010afc0 JMP 0x0010af7d LAB_0010af7d: MOV AL,byte ptr [RSP + 0x22] SUB AL,0x1 JNZ 0x0010b02f JMP 0x0010af8b LAB_0010af8b: MOV EAX,0x2 MOV dword ptr [RSP + 0x1c],EAX JMP 0x0010af96 LAB_0010af96: MOV EAX,dword ptr [RSP + 0x1c] MOV dword ptr [RSP + 0x18],EAX JMP 0x0010afd8 LAB_0010afc0: MOV RDI,qword ptr [RSP + 0x48] CALL 0x0010baf0 XOR EAX,EAX MOV dword ptr [RSP + 0x14],EAX MOV EAX,dword ptr [RSP + 0x14] MOV dword ptr [RSP + 0x18],EAX LAB_0010afd8: MOV EAX,dword ptr [RSP + 0x18] CMP EAX,0x0 MOV dword ptr [RSP + 0x10],EAX JZ 0x0010afef MOV EAX,dword ptr [RSP + 0x10] MOV dword ptr [RSP + 0x24],EAX JMP 0x0010afff LAB_0010afef: XOR EAX,EAX MOV dword ptr [RSP + 0xc],EAX JMP 0x0010aff7 LAB_0010aff7: MOV EAX,dword ptr [RSP + 0xc] MOV dword ptr [RSP + 0x24],EAX LAB_0010afff: MOV RDI,qword ptr [RSP + 0x50] MOV EAX,dword ptr [RSP + 0x24] MOV dword ptr [RSP + 0x8],EAX CALL 0x0010bba0 JMP 0x0010b021 LAB_0010b021: MOV EAX,dword ptr [RSP + 0x8] TEST EAX,EAX JZ 0x0010b02d JMP 0x0010b02b LAB_0010b02b: JMP 0x0010b02f LAB_0010b02d: JMP 0x0010b02f LAB_0010b02f: JMP 0x0010b031 LAB_0010b031: ADD RSP,0x78 RET LAB_0010b040: MOV RAX,qword ptr [RSP + 0x38] MOV AL,byte ptr [RAX + 0x18] TEST AL,AL JNZ 0x0010af63 JMP 0x0010b052 LAB_0010b052: JMP 0x0010ae64
/* WARNING: Removing unreachable block (ram,0x0010ae91) */ /* WARNING: Removing unreachable block (ram,0x0010aec3) */ /* WARNING: Removing unreachable block (ram,0x0010af3c) */ /* WARNING: Removing unreachable block (ram,0x0010afc0) */ /* WARNING: Removing unreachable block (ram,0x0010afef) */ /* WARNING: Removing unreachable block (ram,0x0010b02d) */ void _Z4donev_cleanup(EVP_PKEY_CTX *ctx) { coro::detail::promise<void>::~promise((promise<void> *)(ctx + 0x10)); return; }
10,308
google::protobuf::DescriptorBuilder::RecordPublicDependencies(google::protobuf::FileDescriptor const*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
void DescriptorBuilder::RecordPublicDependencies(const FileDescriptor* file) { if (file == nullptr || !dependencies_.insert(file).second) return; for (int i = 0; file != nullptr && i < file->public_dependency_count(); i++) { RecordPublicDependencies(file->public_dependency(i)); } }
O0
cpp
google::protobuf::DescriptorBuilder::RecordPublicDependencies(google::protobuf::FileDescriptor const*): subq $0x48, %rsp movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x8(%rsp) movb $0x1, %al cmpq $0x0, 0x38(%rsp) movb %al, 0x13(%rsp) je 0x25137e movq 0x8(%rsp), %rdi addq $0x68, %rdi leaq 0x38(%rsp), %rsi callq 0x2847f0 movb %dl, 0x20(%rsp) movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x28(%rsp) movb 0x20(%rsp), %al movb %al, 0x30(%rsp) movb 0x30(%rsp), %al xorb $-0x1, %al movb %al, 0x13(%rsp) movb 0x13(%rsp), %al testb $0x1, %al jne 0x251388 jmp 0x25138a jmp 0x2513f1 movl $0x0, 0x14(%rsp) xorl %eax, %eax cmpq $0x0, 0x38(%rsp) movb %al, 0x7(%rsp) je 0x2513bf movl 0x14(%rsp), %eax movl %eax, (%rsp) movq 0x38(%rsp), %rdi callq 0x283600 movl %eax, %ecx movl (%rsp), %eax cmpl %ecx, %eax setl %al movb %al, 0x7(%rsp) movb 0x7(%rsp), %al testb $0x1, %al jne 0x2513c9 jmp 0x2513f1 movq 0x38(%rsp), %rdi movl 0x14(%rsp), %esi callq 0x284850 movq 0x8(%rsp), %rdi movq %rax, %rsi callq 0x251320 movl 0x14(%rsp), %eax addl $0x1, %eax movl %eax, 0x14(%rsp) jmp 0x251392 addq $0x48, %rsp retq nopw %cs:(%rax,%rax)
_ZN6google8protobuf17DescriptorBuilder24RecordPublicDependenciesEPKNS0_14FileDescriptorE: sub rsp, 48h mov [rsp+48h+var_8], rdi mov [rsp+48h+var_10], rsi mov rax, [rsp+48h+var_8] mov [rsp+48h+var_40], rax mov al, 1 cmp [rsp+48h+var_10], 0 mov [rsp+48h+var_35], al jz short loc_25137E mov rdi, [rsp+48h+var_40] add rdi, 68h ; 'h' lea rsi, [rsp+48h+var_10] call _ZNSt3setIPKN6google8protobuf14FileDescriptorESt4lessIS4_ESaIS4_EE6insertERKS4_; std::set<google::protobuf::FileDescriptor const*>::insert(google::protobuf::FileDescriptor const* const&) mov [rsp+48h+var_28], dl mov [rsp+48h+var_30], rax mov rax, [rsp+48h+var_30] mov [rsp+48h+var_20], rax mov al, [rsp+48h+var_28] mov [rsp+48h+var_18], al mov al, [rsp+48h+var_18] xor al, 0FFh mov [rsp+48h+var_35], al loc_25137E: mov al, [rsp+48h+var_35] test al, 1 jnz short loc_251388 jmp short loc_25138A loc_251388: jmp short loc_2513F1 loc_25138A: mov [rsp+48h+var_34], 0 loc_251392: xor eax, eax cmp [rsp+48h+var_10], 0 mov [rsp+48h+var_41], al jz short loc_2513BF mov eax, [rsp+48h+var_34] mov [rsp+48h+var_48], eax mov rdi, [rsp+48h+var_10]; this call _ZNK6google8protobuf14FileDescriptor23public_dependency_countEv; google::protobuf::FileDescriptor::public_dependency_count(void) mov ecx, eax mov eax, [rsp+48h+var_48] cmp eax, ecx setl al mov [rsp+48h+var_41], al loc_2513BF: mov al, [rsp+48h+var_41] test al, 1 jnz short loc_2513C9 jmp short loc_2513F1 loc_2513C9: mov rdi, [rsp+48h+var_10]; this mov esi, [rsp+48h+var_34]; int call _ZNK6google8protobuf14FileDescriptor17public_dependencyEi; google::protobuf::FileDescriptor::public_dependency(int) mov rdi, [rsp+48h+var_40]; this mov rsi, rax; google::protobuf::FileDescriptor * call _ZN6google8protobuf17DescriptorBuilder24RecordPublicDependenciesEPKNS0_14FileDescriptorE; google::protobuf::DescriptorBuilder::RecordPublicDependencies(google::protobuf::FileDescriptor const*) mov eax, [rsp+48h+var_34] add eax, 1 mov [rsp+48h+var_34], eax jmp short loc_251392 loc_2513F1: add rsp, 48h retn
char google::protobuf::DescriptorBuilder::RecordPublicDependencies( google::protobuf::DescriptorBuilder *this, const google::protobuf::FileDescriptor *a2) { char v2; // dl char result; // al const google::protobuf::FileDescriptor *v4; // rax bool v5; // [rsp+7h] [rbp-41h] char v6; // [rsp+13h] [rbp-35h] int i; // [rsp+14h] [rbp-34h] google::protobuf::FileDescriptor *v8[2]; // [rsp+38h] [rbp-10h] BYREF v8[1] = this; v8[0] = a2; v6 = 1; if ( a2 ) { std::set<google::protobuf::FileDescriptor const*>::insert((char *)this + 104, v8); v6 = ~v2; } result = v6; if ( (v6 & 1) == 0 ) { for ( i = 0; ; ++i ) { v5 = 0; if ( v8[0] ) v5 = i < (int)google::protobuf::FileDescriptor::public_dependency_count(v8[0]); result = v5; if ( !v5 ) break; v4 = (const google::protobuf::FileDescriptor *)google::protobuf::FileDescriptor::public_dependency(v8[0], i); google::protobuf::DescriptorBuilder::RecordPublicDependencies(this, v4); } } return result; }
set: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV RDI,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x18],RDI MOV RSI,qword ptr [RSP + 0x18] MOV EDX,0x4 CALL 0x00190da0 MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x10] CMP RAX,qword ptr [RSP + 0x18] JNZ 0x00251355 JMP 0x00251387 LAB_00251355: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RAX LAB_0025135f: CMP qword ptr [RSP + 0x8],0x0 JZ 0x00251387 MOV RSI,qword ptr [RSP + 0x8] LAB_0025136c: LEA RDI,[RSP + 0x8] CALL 0x002514f0 MOV qword ptr [RSP],RAX JMP 0x0025137c LAB_0025137c: MOV RDI,qword ptr [RSP] CALL 0x00251520 JMP 0x0025135f LAB_00251387: ADD RSP,0x28 RET
/* unifex::_amre::async_manual_reset_event::set() */ void __thiscall unifex::_amre::async_manual_reset_event::set(async_manual_reset_event *this) { _op_base *this_00; async_manual_reset_event *local_20; async_manual_reset_event *local_18; async_manual_reset_event *local_10; async_manual_reset_event *local_8; local_10 = this; local_8 = this; local_20 = (async_manual_reset_event *)std::atomic<void*>::exchange((atomic<void*> *)this,this,4); local_18 = local_20; if (local_20 != local_10) { while (local_20 != (async_manual_reset_event *)0x0) { /* try { // try from 0025136c to 00251375 has its CatchHandler @ 0025138c */ this_00 = std::exchange<unifex::_amre::_op_base*,unifex::_amre::_op_base*&> ((_op_base **)&local_20,(_op_base **)local_20); _op_base::set_value(this_00); } } return; }
10,309
get_charset_by_csname
eloqsql/mysys/charset.c
CHARSET_INFO * get_charset_by_csname(const char *cs_name, uint cs_flags, myf flags) { MY_CHARSET_LOADER loader; my_charset_loader_init_mysys(&loader); return my_charset_get_by_name(&loader, cs_name, cs_flags, flags); }
O3
c
get_charset_by_csname: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %rdx, %rcx movl %esi, %edx movq %rdi, %rsi movq %fs:0x28, %rax movq %rax, -0x8(%rbp) leaq -0xb8(%rbp), %rdi movb $0x0, (%rdi) leaq -0x1249(%rip), %rax # 0x48212 movq %rax, 0x80(%rdi) leaq -0x1248(%rip), %rax # 0x48221 movq %rax, 0x88(%rdi) leaq -0x123b(%rip), %rax # 0x4823c movq %rax, 0x90(%rdi) leaq -0x3f8b(%rip), %rax # 0x454fa movq %rax, 0x98(%rdi) leaq 0x2cea75(%rip), %rax # 0x317f08 movq (%rax), %rax movq %rax, 0xa0(%rdi) leaq -0x124a(%rip), %rax # 0x4825a movq %rax, 0xa8(%rdi) callq 0x49354 movq %fs:0x28, %rcx cmpq -0x8(%rbp), %rcx jne 0x494c8 addq $0xc0, %rsp popq %rbp retq callq 0x263a0
get_charset_by_csname: push rbp mov rbp, rsp sub rsp, 0C0h mov rcx, rdx mov edx, esi mov rsi, rdi mov rax, fs:28h mov [rbp+var_8], rax lea rdi, [rbp+var_B8] mov byte ptr [rdi], 0 lea rax, my_once_alloc_c mov [rdi+80h], rax lea rax, my_malloc_c mov [rdi+88h], rax lea rax, my_realloc_c mov [rdi+90h], rax lea rax, my_free mov [rdi+98h], rax lea rax, my_charset_error_reporter mov rax, [rax] mov [rdi+0A0h], rax lea rax, add_collation mov [rdi+0A8h], rax call my_charset_get_by_name mov rcx, fs:28h cmp rcx, [rbp+var_8] jnz short loc_494C8 add rsp, 0C0h pop rbp retn loc_494C8: call ___stack_chk_fail
long long get_charset_by_csname(long long a1, unsigned int a2, long long a3) { _BYTE v4[128]; // [rsp+8h] [rbp-B8h] BYREF long long ( *v5)(long long); // [rsp+88h] [rbp-38h] long long ( *v6)(unsigned long long); // [rsp+90h] [rbp-30h] long long ( *v7)(long long, unsigned long long); // [rsp+98h] [rbp-28h] long long ( *v8)(long long); // [rsp+A0h] [rbp-20h] long long ( *v9)(); // [rsp+A8h] [rbp-18h] long long ( *v10)(unsigned int *); // [rsp+B0h] [rbp-10h] unsigned long long v11; // [rsp+B8h] [rbp-8h] v11 = __readfsqword(0x28u); v4[0] = 0; v5 = my_once_alloc_c; v6 = my_malloc_c; v7 = my_realloc_c; v8 = my_free; v9 = my_charset_error_reporter; v10 = add_collation; return my_charset_get_by_name((long long)v4, a1, a2, a3); }
get_charset_by_csname: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV RCX,RDX MOV EDX,ESI MOV RSI,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX LEA RDI,[RBP + -0xb8] MOV byte ptr [RDI],0x0 LEA RAX,[0x148212] MOV qword ptr [RDI + 0x80],RAX LEA RAX,[0x148221] MOV qword ptr [RDI + 0x88],RAX LEA RAX,[0x14823c] MOV qword ptr [RDI + 0x90],RAX LEA RAX,[0x1454fa] MOV qword ptr [RDI + 0x98],RAX LEA RAX,[0x417f08] MOV RAX,qword ptr [RAX] MOV qword ptr [RDI + 0xa0],RAX LEA RAX,[0x14825a] MOV qword ptr [RDI + 0xa8],RAX CALL 0x00149354 MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x8] JNZ 0x001494c8 ADD RSP,0xc0 POP RBP RET LAB_001494c8: CALL 0x001263a0
void get_charset_by_csname(int8 param_1,int4 param_2,int8 param_3) { long in_FS_OFFSET; int1 local_c0 [128]; code *local_40; code *local_38; code *local_30; code *local_28; int *local_20; code *local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_c0[0] = 0; local_40 = my_once_alloc_c; local_38 = my_malloc_c; local_30 = my_realloc_c; local_28 = my_free; local_20 = my_charset_error_reporter; local_18 = add_collation; my_charset_get_by_name(local_c0,param_1,param_2,param_3); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
10,310
my_mutex_init
eloqsql/mysys/thr_mutex.c
void my_mutex_init() { /* Initialize mutex attributes */ #ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP /* Set mutex type to "fast" a.k.a "adaptive" In this case the thread may steal the mutex from some other thread that is waiting for the same mutex. This will save us some context switches but may cause a thread to 'starve forever' while waiting for the mutex (not likely if the code within the mutex is short). */ pthread_mutexattr_init(&my_fast_mutexattr); pthread_mutexattr_settype(&my_fast_mutexattr, PTHREAD_MUTEX_ADAPTIVE_NP); #endif #ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP /* Set mutex type to "errorcheck" */ pthread_mutexattr_init(&my_errorcheck_mutexattr); pthread_mutexattr_settype(&my_errorcheck_mutexattr, PTHREAD_MUTEX_ERRORCHECK); #endif #if defined(SAFE_MUTEX_DEFINED) safe_mutex_global_init(); #endif }
O0
c
my_mutex_init: pushq %rbp movq %rsp, %rbp leaq 0xb8fc45(%rip), %rdi # 0xc8e5a0 callq 0x2a7c0 leaq 0xb8fc39(%rip), %rdi # 0xc8e5a0 movl $0x3, %esi callq 0x2a460 leaq 0xb8fc2c(%rip), %rdi # 0xc8e5a4 callq 0x2a7c0 leaq 0xb8fc20(%rip), %rdi # 0xc8e5a4 movl $0x2, %esi callq 0x2a460 popq %rbp retq
my_mutex_init: push rbp mov rbp, rsp lea rdi, my_fast_mutexattr call _pthread_mutexattr_init lea rdi, my_fast_mutexattr mov esi, 3 call _pthread_mutexattr_settype lea rdi, my_errorcheck_mutexattr call _pthread_mutexattr_init lea rdi, my_errorcheck_mutexattr mov esi, 2 call _pthread_mutexattr_settype pop rbp retn
long long my_mutex_init() { pthread_mutexattr_init(&my_fast_mutexattr); pthread_mutexattr_settype(&my_fast_mutexattr, 3LL); pthread_mutexattr_init(&my_errorcheck_mutexattr); return pthread_mutexattr_settype(&my_errorcheck_mutexattr, 2LL); }
my_mutex_init: PUSH RBP MOV RBP,RSP LEA RDI,[0xd8e5a0] CALL 0x0012a7c0 LEA RDI,[0xd8e5a0] MOV ESI,0x3 CALL 0x0012a460 LEA RDI,[0xd8e5a4] CALL 0x0012a7c0 LEA RDI,[0xd8e5a4] MOV ESI,0x2 CALL 0x0012a460 POP RBP RET
void my_mutex_init(void) { pthread_mutexattr_init((pthread_mutexattr_t *)&my_fast_mutexattr); pthread_mutexattr_settype((pthread_mutexattr_t *)&my_fast_mutexattr,3); pthread_mutexattr_init((pthread_mutexattr_t *)&my_errorcheck_mutexattr); pthread_mutexattr_settype((pthread_mutexattr_t *)&my_errorcheck_mutexattr,2); return; }
10,311
get_leb128
bluesky950520[P]quickjs/quickjs.c
static int get_leb128(uint32_t *pval, const uint8_t *buf, const uint8_t *buf_end) { const uint8_t *ptr = buf; uint32_t v, a, i; v = 0; for(i = 0; i < 5; i++) { if (unlikely(ptr >= buf_end)) break; a = *ptr++; v |= (a & 0x7f) << (i * 7); if (!(a & 0x80)) { *pval = v; return ptr - buf; } } *pval = 0; return -1; }
O0
c
get_leb128: movq %rdi, -0x10(%rsp) movq %rsi, -0x18(%rsp) movq %rdx, -0x20(%rsp) movq -0x18(%rsp), %rax movq %rax, -0x28(%rsp) movl $0x0, -0x2c(%rsp) movl $0x0, -0x34(%rsp) cmpl $0x5, -0x34(%rsp) jae 0x730b0 movq -0x28(%rsp), %rax cmpq -0x20(%rsp), %rax setae %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x73044 jmp 0x730b0 movq -0x28(%rsp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rsp) movzbl (%rax), %eax movl %eax, -0x30(%rsp) movl -0x30(%rsp), %eax andl $0x7f, %eax imull $0x7, -0x34(%rsp), %ecx shll %cl, %eax orl -0x2c(%rsp), %eax movl %eax, -0x2c(%rsp) movl -0x30(%rsp), %eax andl $0x80, %eax cmpl $0x0, %eax jne 0x7309e movl -0x2c(%rsp), %ecx movq -0x10(%rsp), %rax movl %ecx, (%rax) movq -0x28(%rsp), %rax movq -0x18(%rsp), %rcx subq %rcx, %rax movl %eax, -0x4(%rsp) jmp 0x730c3 jmp 0x730a0 movl -0x34(%rsp), %eax addl $0x1, %eax movl %eax, -0x34(%rsp) jmp 0x73019 movq -0x10(%rsp), %rax movl $0x0, (%rax) movl $0xffffffff, -0x4(%rsp) # imm = 0xFFFFFFFF movl -0x4(%rsp), %eax retq nopl (%rax,%rax)
get_leb128: mov [rsp+var_10], rdi mov [rsp+var_18], rsi mov [rsp+var_20], rdx mov rax, [rsp+var_18] mov [rsp+var_28], rax mov [rsp+var_2C], 0 mov [rsp+var_34], 0 loc_73019: cmp [rsp+var_34], 5 jnb loc_730B0 mov rax, [rsp+var_28] cmp rax, [rsp+var_20] setnb al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_73044 jmp short loc_730B0 loc_73044: mov rax, [rsp+var_28] mov rcx, rax add rcx, 1 mov [rsp+var_28], rcx movzx eax, byte ptr [rax] mov [rsp+var_30], eax mov eax, [rsp+var_30] and eax, 7Fh imul ecx, [rsp+var_34], 7 shl eax, cl or eax, [rsp+var_2C] mov [rsp+var_2C], eax mov eax, [rsp+var_30] and eax, 80h cmp eax, 0 jnz short loc_7309E mov ecx, [rsp+var_2C] mov rax, [rsp+var_10] mov [rax], ecx mov rax, [rsp+var_28] mov rcx, [rsp+var_18] sub rax, rcx mov [rsp+var_4], eax jmp short loc_730C3 loc_7309E: jmp short $+2 loc_730A0: mov eax, [rsp+var_34] add eax, 1 mov [rsp+var_34], eax jmp loc_73019 loc_730B0: mov rax, [rsp+var_10] mov dword ptr [rax], 0 mov [rsp+var_4], 0FFFFFFFFh loc_730C3: mov eax, [rsp+var_4] retn
long long get_leb128(_DWORD *a1, _BYTE *a2, unsigned long long a3) { _BYTE *v3; // rax unsigned int i; // [rsp+0h] [rbp-34h] int v6; // [rsp+8h] [rbp-2Ch] _BYTE *v7; // [rsp+Ch] [rbp-28h] v7 = a2; v6 = 0; for ( i = 0; i < 5 && (unsigned long long)v7 < a3; ++i ) { v3 = v7++; v6 |= (*v3 & 0x7F) << (7 * i); if ( (*v3 & 0x80) == 0 ) { *a1 = v6; return (unsigned int)((_DWORD)v7 - (_DWORD)a2); } } *a1 = 0; return (unsigned int)-1; }
get_leb128: MOV qword ptr [RSP + -0x10],RDI MOV qword ptr [RSP + -0x18],RSI MOV qword ptr [RSP + -0x20],RDX MOV RAX,qword ptr [RSP + -0x18] MOV qword ptr [RSP + -0x28],RAX MOV dword ptr [RSP + -0x2c],0x0 MOV dword ptr [RSP + -0x34],0x0 LAB_00173019: CMP dword ptr [RSP + -0x34],0x5 JNC 0x001730b0 MOV RAX,qword ptr [RSP + -0x28] CMP RAX,qword ptr [RSP + -0x20] SETNC AL XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00173044 JMP 0x001730b0 LAB_00173044: MOV RAX,qword ptr [RSP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RSP + -0x28],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RSP + -0x30],EAX MOV EAX,dword ptr [RSP + -0x30] AND EAX,0x7f IMUL ECX,dword ptr [RSP + -0x34],0x7 SHL EAX,CL OR EAX,dword ptr [RSP + -0x2c] MOV dword ptr [RSP + -0x2c],EAX MOV EAX,dword ptr [RSP + -0x30] AND EAX,0x80 CMP EAX,0x0 JNZ 0x0017309e MOV ECX,dword ptr [RSP + -0x2c] MOV RAX,qword ptr [RSP + -0x10] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RSP + -0x28] MOV RCX,qword ptr [RSP + -0x18] SUB RAX,RCX MOV dword ptr [RSP + -0x4],EAX JMP 0x001730c3 LAB_0017309e: JMP 0x001730a0 LAB_001730a0: MOV EAX,dword ptr [RSP + -0x34] ADD EAX,0x1 MOV dword ptr [RSP + -0x34],EAX JMP 0x00173019 LAB_001730b0: MOV RAX,qword ptr [RSP + -0x10] MOV dword ptr [RAX],0x0 MOV dword ptr [RSP + -0x4],0xffffffff LAB_001730c3: MOV EAX,dword ptr [RSP + -0x4] RET
int get_leb128(uint *param_1,byte *param_2,byte *param_3) { uint local_34; uint local_2c; byte *local_28; local_2c = 0; local_34 = 0; local_28 = param_2; while ((local_34 < 5 && (local_28 < param_3))) { local_2c = (*local_28 & 0x7f) << ((char)local_34 * '\a' & 0x1fU) | local_2c; if ((*local_28 & 0x80) == 0) { *param_1 = local_2c; return (int)(local_28 + 1) - (int)param_2; } local_34 = local_34 + 1; local_28 = local_28 + 1; } *param_1 = 0; return -1; }
10,312
get_leb128
bluesky950520[P]quickjs/quickjs.c
static int get_leb128(uint32_t *pval, const uint8_t *buf, const uint8_t *buf_end) { const uint8_t *ptr = buf; uint32_t v, a, i; v = 0; for(i = 0; i < 5; i++) { if (unlikely(ptr >= buf_end)) break; a = *ptr++; v |= (a & 0x7f) << (i * 7); if (!(a & 0x80)) { *pval = v; return ptr - buf; } } *pval = 0; return -1; }
O2
c
get_leb128: xorl %ecx, %ecx xorl %eax, %eax xorl %r8d, %r8d leaq (%rsi,%rax), %r9 cmpl $0x5, %eax setb %r10b cmpq %rdx, %r9 setb %r11b andb %r10b, %r11b cmpb $0x1, %r11b jne 0x3b0b4 movzbl (%r9), %r9d movl %r9d, %r10d andl $0x7f, %r10d shll %cl, %r10d orl %r10d, %r8d incq %rax addl $0x7, %ecx testb %r9b, %r9b js 0x3b079 movl %r8d, (%rdi) retq andl $0x0, (%rdi) pushq $-0x1 popq %rax retq
get_leb128: xor ecx, ecx xor eax, eax xor r8d, r8d loc_3B079: lea r9, [rsi+rax] cmp eax, 5 setb r10b cmp r9, rdx setb r11b and r11b, r10b cmp r11b, 1 jnz short loc_3B0B4 movzx r9d, byte ptr [r9] mov r10d, r9d and r10d, 7Fh shl r10d, cl or r8d, r10d inc rax add ecx, 7 test r9b, r9b js short loc_3B079 mov [rdi], r8d retn loc_3B0B4: and dword ptr [rdi], 0 push 0FFFFFFFFFFFFFFFFh pop rax retn
long long get_leb128(_DWORD *a1, long long a2, unsigned long long a3) { int v3; // ecx long long result; // rax int v5; // r8d char v6; // r9 v3 = 0; result = 0LL; v5 = 0; while ( (unsigned int)result < 5 && a2 + result < a3 ) { v6 = *(_BYTE *)(a2 + result); v5 |= (v6 & 0x7F) << v3; ++result; v3 += 7; if ( v6 >= 0 ) { *a1 = v5; return result; } } *a1 = 0; return -1LL; }
get_leb128: XOR ECX,ECX XOR EAX,EAX XOR R8D,R8D LAB_0013b079: LEA R9,[RSI + RAX*0x1] CMP EAX,0x5 SETC R10B CMP R9,RDX SETC R11B AND R11B,R10B CMP R11B,0x1 JNZ 0x0013b0b4 MOVZX R9D,byte ptr [R9] MOV R10D,R9D AND R10D,0x7f SHL R10D,CL OR R8D,R10D INC RAX ADD ECX,0x7 TEST R9B,R9B JS 0x0013b079 MOV dword ptr [RDI],R8D RET LAB_0013b0b4: AND dword ptr [RDI],0x0 PUSH -0x1 POP RAX RET
long get_leb128(uint *param_1,long param_2,byte *param_3) { byte bVar1; long lVar2; byte bVar3; uint uVar4; bVar3 = 0; lVar2 = 0; uVar4 = 0; do { if (param_3 <= (byte *)(param_2 + lVar2) || 4 < (uint)lVar2) { *param_1 = 0; return -1; } bVar1 = *(byte *)(param_2 + lVar2); uVar4 = uVar4 | (bVar1 & 0x7f) << (bVar3 & 0x1f); lVar2 = lVar2 + 1; bVar3 = bVar3 + 7; } while ((char)bVar1 < '\0'); *param_1 = uVar4; return lVar2; }
10,313
minja::Parser::parseExpression(bool)
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Expression> parseExpression(bool allow_if_expr = true) { auto left = parseLogicalOr(); if (it == end) return left; if (!allow_if_expr) return left; static std::regex if_tok(R"(if\b)"); if (consumeToken(if_tok).empty()) { return left; } auto location = get_location(); auto [condition, else_expr] = parseIfExpression(); return std::make_shared<IfExpr>(location, std::move(condition), std::move(left), std::move(else_expr)); }
O1
cpp
minja::Parser::parseExpression(bool): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x50, %rsp movl %edx, %ebp movq %rsi, %r14 movq %rdi, %rbx movq %rsp, %rdi callq 0x6c132 movq 0x20(%r14), %rax cmpq 0x18(%r14), %rax je 0x60176 testb %bpl, %bpl je 0x60176 leaq 0x8be58(%rip), %rax # 0xebf60 movb (%rax), %al testb %al, %al je 0x60253 leaq 0x8be27(%rip), %rdx # 0xebf40 leaq 0x30(%rsp), %rdi movq %r14, %rsi movl $0x1, %ecx callq 0x602f8 leaq 0x40(%rsp), %rax movq -0x10(%rax), %rdi movq -0x8(%rax), %r15 cmpq %rax, %rdi je 0x6014a movq 0x40(%rsp), %rsi incq %rsi callq 0x197a0 testq %r15, %r15 je 0x60176 movq (%r14), %rax movq %rax, 0x18(%rsp) movq 0x8(%r14), %rax movq %rax, 0x20(%rsp) testq %rax, %rax je 0x601af movq 0x8ae24(%rip), %rcx # 0xeaf90 cmpb $0x0, (%rcx) je 0x601ab incl 0x8(%rax) jmp 0x601af xorl %eax, %eax movq %rax, 0x8(%rbx) movaps (%rsp), %xmm0 movq %rax, 0x8(%rsp) movups %xmm0, (%rbx) movq %rax, (%rsp) movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x6019b callq 0x34304 movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq lock incl 0x8(%rax) movq 0x20(%r14), %rax subq 0x10(%r14), %rax movq %rax, 0x28(%rsp) leaq 0x30(%rsp), %rdi movq %r14, %rsi callq 0x6c3c0 movl $0x60, %edi callq 0x19790 movq %rax, %r14 leaq 0x40(%rsp), %r8 movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x8(%r14) leaq 0x89c48(%rip), %rax # 0xe9e38 addq $0x10, %rax movq %rax, (%r14) movq %r14, %r15 addq $0x10, %r15 leaq 0x18(%rsp), %rsi leaq 0x30(%rsp), %r12 movq %rsp, %rcx movq %r15, %rdi movq %r12, %rdx callq 0x7a4b0 movq %r15, (%rbx) movq %r14, 0x8(%rbx) movq 0x18(%r12), %rdi testq %rdi, %rdi je 0x6022c callq 0x34304 movq 0x38(%rsp), %rdi testq %rdi, %rdi je 0x6023b callq 0x34304 movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x6018c callq 0x34304 jmp 0x6018c leaq 0x8bd06(%rip), %rdi # 0xebf60 callq 0x19e60 testl %eax, %eax je 0x60112 leaq 0x8bcd2(%rip), %rdi # 0xebf40 leaq 0x57690(%rip), %rsi # 0xb7905 movl $0x10, %edx callq 0x5fe3e leaq -0x3e0(%rip), %rdi # 0x5fea6 leaq 0x8bcb3(%rip), %rsi # 0xebf40 leaq 0x8b564(%rip), %rdx # 0xeb7f8 callq 0x19670 leaq 0x8bcc0(%rip), %rdi # 0xebf60 callq 0x194c0 jmp 0x60112 movq %rax, %rbx leaq 0x8bcac(%rip), %rdi # 0xebf60 callq 0x194b0 jmp 0x602e1 movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x6c5c8 jmp 0x602cd movq %rax, %rbx movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x602e1 callq 0x34304 jmp 0x602e1 movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x602f0 callq 0x34304 movq %rbx, %rdi callq 0x19e00
_ZN5minja6Parser15parseExpressionEb: push rbp push r15 push r14 push r12 push rbx sub rsp, 50h mov ebp, edx mov r14, rsi mov rbx, rdi mov rdi, rsp; this call _ZN5minja6Parser14parseLogicalOrEv; minja::Parser::parseLogicalOr(void) mov rax, [r14+20h] cmp rax, [r14+18h] jz short loc_60176 test bpl, bpl jz short loc_60176 lea rax, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; `guard variable for'minja::Parser::parseExpression(bool)::if_tok mov al, [rax] test al, al jz loc_60253 loc_60112: lea rdx, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok lea rdi, [rsp+78h+var_48] mov rsi, r14 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) lea rax, [rsp+78h+var_38] mov rdi, [rax-10h]; void * mov r15, [rax-8] cmp rdi, rax jz short loc_6014A mov rsi, [rsp+78h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6014A: test r15, r15 jz short loc_60176 mov rax, [r14] mov [rsp+78h+var_60], rax mov rax, [r14+8] mov [rsp+78h+var_58], rax test rax, rax jz short loc_601AF mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_601AB inc dword ptr [rax+8] jmp short loc_601AF loc_60176: xor eax, eax mov [rbx+8], rax movaps xmm0, [rsp+78h+var_78] mov qword ptr [rsp+78h+var_78+8], rax movups xmmword ptr [rbx], xmm0 mov qword ptr [rsp+78h+var_78], rax loc_6018C: mov rdi, qword ptr [rsp+78h+var_78+8] test rdi, rdi jz short loc_6019B call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6019B: mov rax, rbx add rsp, 50h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_601AB: lock inc dword ptr [rax+8] loc_601AF: mov rax, [r14+20h] sub rax, [r14+10h] mov [rsp+78h+var_50], rax lea rdi, [rsp+78h+var_48]; this mov rsi, r14 call _ZN5minja6Parser17parseIfExpressionEv; minja::Parser::parseIfExpression(void) mov edi, 60h ; '`'; unsigned __int64 call __Znwm; operator new(ulong) mov r14, rax lea r8, [rsp+78h+var_38] mov rax, 100000001h mov [r14+8], rax lea rax, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja6IfExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::IfExpr,std::allocator<minja::IfExpr>,(__gnu_cxx::_Lock_policy)2> add rax, 10h mov [r14], rax mov r15, r14 add r15, 10h lea rsi, [rsp+78h+var_60] lea r12, [rsp+78h+var_48] mov rcx, rsp mov rdi, r15 mov rdx, r12 call _ZN5minja6IfExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_S7_; minja::IfExpr::IfExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,std::shared_ptr<minja::Expression> &) mov [rbx], r15 mov [rbx+8], r14 mov rdi, [r12+18h] test rdi, rdi jz short loc_6022C call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6022C: mov rdi, [rsp+78h+var_40] test rdi, rdi jz short loc_6023B call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6023B: mov rdi, [rsp+78h+var_58] test rdi, rdi jz loc_6018C call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp loc_6018C loc_60253: lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_60112 lea rdi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok lea rsi, aIfB; "if\\b" mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_60112 mov rbx, rax lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_602E1 mov rbx, rax lea rdi, [rsp+arg_28] call _ZNSt4pairISt10shared_ptrIN5minja10ExpressionEES3_ED2Ev; std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>::~pair() jmp short loc_602CD mov rbx, rax loc_602CD: mov rdi, [rsp+arg_18] test rdi, rdi jz short loc_602E1 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp short loc_602E1 mov rbx, rax loc_602E1: mov rdi, [rsp+arg_0] test rdi, rdi jz short loc_602F0 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_602F0: mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::parseExpression(minja::Parser *this, long long *a2, char a3) { int v4; // r8d int v5; // r9d volatile signed __int32 *v6; // r15 volatile signed __int32 *v7; // rax __int128 v8; // xmm0 _QWORD *v10; // r14 __int128 v11; // [rsp+0h] [rbp-78h] BYREF long long v12; // [rsp+18h] [rbp-60h] BYREF volatile signed __int32 *v13; // [rsp+20h] [rbp-58h] long long v14; // [rsp+28h] [rbp-50h] long long *v15; // [rsp+30h] [rbp-48h] BYREF volatile signed __int32 *v16; // [rsp+38h] [rbp-40h] long long v17; // [rsp+40h] [rbp-38h] BYREF volatile signed __int32 *v18; // [rsp+48h] [rbp-30h] minja::Parser::parseLogicalOr((minja::Parser *)&v11); if ( a2[4] == a2[3] || !a3 ) goto LABEL_10; if ( !(_BYTE)`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11], "if\\b", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseExpression(bool)::if_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]); } minja::Parser::consumeToken( (unsigned int)&v15, (_DWORD)a2, (unsigned int)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11], 1, v4, v5, v11, *((long long *)&v11 + 1)); v6 = v16; if ( v15 != &v17 ) operator delete(v15, v17 + 1); if ( v6 ) { v12 = *a2; v7 = (volatile signed __int32 *)a2[1]; v13 = v7; if ( v7 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v7 + 2); else _InterlockedIncrement(v7 + 2); } v14 = a2[4] - a2[2]; minja::Parser::parseIfExpression((minja::Parser *)&v15); v10 = (_QWORD *)operator new(0x60uLL); v10[1] = 0x100000001LL; *v10 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::IfExpr,std::allocator<minja::IfExpr>,(__gnu_cxx::_Lock_policy)2> + 2; minja::IfExpr::IfExpr(v10 + 2, &v12, &v15, &v11, &v17); *(_QWORD *)this = v10 + 2; *((_QWORD *)this + 1) = v10; if ( v18 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v18); if ( v16 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v16); if ( v13 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v13); } else { LABEL_10: *((_QWORD *)this + 1) = 0LL; v8 = v11; *((_QWORD *)&v11 + 1) = 0LL; *(_OWORD *)this = v8; *(_QWORD *)&v11 = 0LL; } if ( *((_QWORD *)&v11 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v11 + 1)); return this; }
parseExpression: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x50 MOV EBP,EDX MOV R14,RSI MOV RBX,RDI MOV RDI,RSP CALL 0x0016c132 MOV RAX,qword ptr [R14 + 0x20] CMP RAX,qword ptr [R14 + 0x18] JZ 0x00160176 TEST BPL,BPL JZ 0x00160176 LEA RAX,[0x1ebf60] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x00160253 LAB_00160112: LEA RDX,[0x1ebf40] LEA RDI,[RSP + 0x30] MOV RSI,R14 MOV ECX,0x1 CALL 0x001602f8 LEA RAX,[RSP + 0x40] MOV RDI,qword ptr [RAX + -0x10] MOV R15,qword ptr [RAX + -0x8] CMP RDI,RAX JZ 0x0016014a MOV RSI,qword ptr [RSP + 0x40] INC RSI CALL 0x001197a0 LAB_0016014a: TEST R15,R15 JZ 0x00160176 MOV RAX,qword ptr [R14] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x20],RAX TEST RAX,RAX JZ 0x001601af MOV RCX,qword ptr [0x001eaf90] CMP byte ptr [RCX],0x0 JZ 0x001601ab INC dword ptr [RAX + 0x8] JMP 0x001601af LAB_00160176: XOR EAX,EAX MOV qword ptr [RBX + 0x8],RAX MOVAPS XMM0,xmmword ptr [RSP] MOV qword ptr [RSP + 0x8],RAX MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RSP],RAX LAB_0016018c: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x0016019b CALL 0x00134304 LAB_0016019b: MOV RAX,RBX ADD RSP,0x50 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001601ab: INC.LOCK dword ptr [RAX + 0x8] LAB_001601af: MOV RAX,qword ptr [R14 + 0x20] SUB RAX,qword ptr [R14 + 0x10] MOV qword ptr [RSP + 0x28],RAX LAB_001601bc: LEA RDI,[RSP + 0x30] MOV RSI,R14 CALL 0x0016c3c0 LAB_001601c9: MOV EDI,0x60 CALL 0x00119790 MOV R14,RAX LEA R8,[RSP + 0x40] MOV RAX,0x100000001 MOV qword ptr [R14 + 0x8],RAX LEA RAX,[0x1e9e38] ADD RAX,0x10 MOV qword ptr [R14],RAX MOV R15,R14 ADD R15,0x10 LEA RSI,[RSP + 0x18] LEA R12,[RSP + 0x30] MOV RCX,RSP MOV RDI,R15 MOV RDX,R12 CALL 0x0017a4b0 MOV qword ptr [RBX],R15 MOV qword ptr [RBX + 0x8],R14 MOV RDI,qword ptr [R12 + 0x18] TEST RDI,RDI JZ 0x0016022c CALL 0x00134304 LAB_0016022c: MOV RDI,qword ptr [RSP + 0x38] TEST RDI,RDI JZ 0x0016023b CALL 0x00134304 LAB_0016023b: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x0016018c CALL 0x00134304 JMP 0x0016018c LAB_00160253: LEA RDI,[0x1ebf60] CALL 0x00119e60 TEST EAX,EAX JZ 0x00160112 LAB_00160267: LEA RDI,[0x1ebf40] LEA RSI,[0x1b7905] MOV EDX,0x10 CALL 0x0015fe3e LAB_0016027f: LEA RDI,[0x15fea6] LEA RSI,[0x1ebf40] LEA RDX,[0x1eb7f8] CALL 0x00119670 LEA RDI,[0x1ebf60] CALL 0x001194c0 JMP 0x00160112
/* minja::Parser::parseExpression(bool) */ int8 * minja::Parser::parseExpression(bool param_1) { _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1; int iVar2; int8 *puVar3; char in_DL; int8 *in_RSI; int7 in_register_00000039; int8 *puVar4; int8 local_78; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_70; int8 local_60; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58; long local_50; long *local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40; long local_38; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_30; puVar4 = (int8 *)CONCAT71(in_register_00000039,param_1); parseLogicalOr(); if ((in_RSI[4] != in_RSI[3]) && (in_DL != '\0')) { if (parseExpression(bool)::if_tok_abi_cxx11_ == '\0') { iVar2 = __cxa_guard_acquire(&parseExpression(bool)::if_tok_abi_cxx11_); if (iVar2 != 0) { /* try { // try from 00160267 to 0016027e has its CatchHandler @ 001602aa */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseExpression(bool)::if_tok_abi_cxx11_,&DAT_001b7905,0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseExpression(bool)::if_tok_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseExpression(bool)::if_tok_abi_cxx11_); } } /* try { // try from 00160112 to 0016012a has its CatchHandler @ 001602de */ consumeToken(&local_48); p_Var1 = local_40; if (local_48 != &local_38) { operator_delete(local_48,local_38 + 1); } if (p_Var1 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { local_60 = *in_RSI; local_58 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1]; if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_001eaf90 == '\0') { LOCK(); *(int *)(local_58 + 8) = *(int *)(local_58 + 8) + 1; UNLOCK(); } else { *(int *)(local_58 + 8) = *(int *)(local_58 + 8) + 1; } } local_50 = in_RSI[4] - in_RSI[2]; /* try { // try from 001601bc to 001601c8 has its CatchHandler @ 001602ca */ parseIfExpression(); /* try { // try from 001601c9 to 001601d2 has its CatchHandler @ 001602bb */ puVar3 = (int8 *)operator_new(0x60); puVar3[1] = 0x100000001; *puVar3 = &PTR___Sp_counted_ptr_inplace_001e9e48; IfExpr::IfExpr((IfExpr *)(puVar3 + 2),(Location *)&local_60,(shared_ptr *)&local_48, (shared_ptr *)&local_78,(shared_ptr *)&local_38); *puVar4 = (IfExpr *)(puVar3 + 2); puVar4[1] = puVar3; if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_30); } 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_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58); } goto LAB_0016018c; } } p_Var1 = p_Stack_70; puVar4[1] = 0; p_Stack_70 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; *puVar4 = local_78; puVar4[1] = p_Var1; local_78 = 0; LAB_0016018c: if (p_Stack_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_70); } return puVar4; }
10,314
func_gb2312_uni_onechar
eloqsql/strings/ctype-gb2312.c
static int func_gb2312_uni_onechar(int code){ if ((code>=0x2121)&&(code<=0x2658)) return(tab_gb2312_uni0[code-0x2121]); if ((code>=0x2721)&&(code<=0x296F)) return(tab_gb2312_uni1[code-0x2721]); if ((code>=0x3021)&&(code<=0x777E)) return(tab_gb2312_uni2[code-0x3021]); return(0); }
O0
c
func_gb2312_uni_onechar: pushq %rbp movq %rsp, %rbp movl %edi, -0x8(%rbp) cmpl $0x2121, -0x8(%rbp) # imm = 0x2121 jl 0x9b884 cmpl $0x2658, -0x8(%rbp) # imm = 0x2658 jg 0x9b884 movl -0x8(%rbp), %eax subl $0x2121, %eax # imm = 0x2121 movslq %eax, %rcx leaq 0xc8c55(%rip), %rax # 0x1644d0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x9b8e5 cmpl $0x2721, -0x8(%rbp) # imm = 0x2721 jl 0x9b8b1 cmpl $0x296f, -0x8(%rbp) # imm = 0x296F jg 0x9b8b1 movl -0x8(%rbp), %eax subl $0x2721, %eax # imm = 0x2721 movslq %eax, %rcx leaq 0xc9698(%rip), %rax # 0x164f40 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x9b8e5 cmpl $0x3021, -0x8(%rbp) # imm = 0x3021 jl 0x9b8de cmpl $0x777e, -0x8(%rbp) # imm = 0x777E jg 0x9b8de movl -0x8(%rbp), %eax subl $0x3021, %eax # imm = 0x3021 movslq %eax, %rcx leaq 0xc9b0b(%rip), %rax # 0x1653e0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x9b8e5 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
func_gb2312_uni_onechar: push rbp mov rbp, rsp mov [rbp+var_8], edi cmp [rbp+var_8], 2121h jl short loc_9B884 cmp [rbp+var_8], 2658h jg short loc_9B884 mov eax, [rbp+var_8] sub eax, 2121h movsxd rcx, eax lea rax, tab_gb2312_uni0 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp short loc_9B8E5 loc_9B884: cmp [rbp+var_8], 2721h jl short loc_9B8B1 cmp [rbp+var_8], 296Fh jg short loc_9B8B1 mov eax, [rbp+var_8] sub eax, 2721h movsxd rcx, eax lea rax, tab_gb2312_uni1 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp short loc_9B8E5 loc_9B8B1: cmp [rbp+var_8], 3021h jl short loc_9B8DE cmp [rbp+var_8], 777Eh jg short loc_9B8DE mov eax, [rbp+var_8] sub eax, 3021h movsxd rcx, eax lea rax, tab_gb2312_uni2 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp short loc_9B8E5 loc_9B8DE: mov [rbp+var_4], 0 loc_9B8E5: mov eax, [rbp+var_4] pop rbp retn
long long func_gb2312_uni_onechar(int a1) { if ( a1 < 8481 || a1 > 9816 ) { if ( a1 < 10017 || a1 > 10607 ) { if ( a1 < 12321 || a1 > 30590 ) return 0; else return tab_gb2312_uni2[a1 - 12321]; } else { return tab_gb2312_uni1[a1 - 10017]; } } else { return tab_gb2312_uni0[a1 - 8481]; } }
func_gb2312_uni_onechar: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI CMP dword ptr [RBP + -0x8],0x2121 JL 0x0019b884 CMP dword ptr [RBP + -0x8],0x2658 JG 0x0019b884 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x2121 MOVSXD RCX,EAX LEA RAX,[0x2644d0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0019b8e5 LAB_0019b884: CMP dword ptr [RBP + -0x8],0x2721 JL 0x0019b8b1 CMP dword ptr [RBP + -0x8],0x296f JG 0x0019b8b1 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x2721 MOVSXD RCX,EAX LEA RAX,[0x264f40] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0019b8e5 LAB_0019b8b1: CMP dword ptr [RBP + -0x8],0x3021 JL 0x0019b8de CMP dword ptr [RBP + -0x8],0x777e JG 0x0019b8de MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x3021 MOVSXD RCX,EAX LEA RAX,[0x2653e0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0019b8e5 LAB_0019b8de: MOV dword ptr [RBP + -0x4],0x0 LAB_0019b8e5: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int2 func_gb2312_uni_onechar(int param_1) { int2 uVar1; if ((param_1 < 0x2121) || (0x2658 < param_1)) { if ((param_1 < 0x2721) || (0x296f < param_1)) { if ((param_1 < 0x3021) || (0x777e < param_1)) { uVar1 = 0; } else { uVar1 = *(int2 *)(tab_gb2312_uni2 + (long)(param_1 + -0x3021) * 2); } } else { uVar1 = *(int2 *)(tab_gb2312_uni1 + (long)(param_1 + -0x2721) * 2); } } else { uVar1 = *(int2 *)(tab_gb2312_uni0 + (long)(param_1 + -0x2121) * 2); } return uVar1; }
10,315
crossline_readline_internal
xtate/src/crossline/crossline.c
static char *crossline_readline_internal(const char *prompt, char *buf, int size, int has_input) { int not_support = 0, len; if ((NULL == buf) || (size <= 1)) { return NULL; } if (!isatty(STDIN_FILENO)) { // input is not from a terminal not_support = 1; } else { char *term = getenv("TERM"); if (NULL != term) { if (!strcasecmp(term, "dumb") || !strcasecmp(term, "cons25") || !strcasecmp(term, "emacs")) { not_support = 1; } } } if (not_support) { if (NULL == fgets(buf, size, stdin)) { return NULL; } for (len = (int)strlen(buf); (len > 0) && (('\n' == buf[len - 1]) || ('\r' == buf[len - 1])); --len) { buf[len - 1] = '\0'; } return buf; } return crossline_readline_edit(buf, size, prompt, has_input, 0); }
O3
c
crossline_readline_internal: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %ecx, %r14d testq %rsi, %rsi sete %al cmpl $0x2, %edx setl %cl orb %al, %cl jne 0x16f92 movl %edx, %ebp movq %rsi, %rbx movq %rdi, %r15 xorl %edi, %edi callq 0x15a00 testl %eax, %eax je 0x16f46 leaq 0x464c5(%rip), %rdi # 0x5d3aa callq 0x157c0 testq %rax, %rax je 0x16f2b movq %rax, %r12 leaq 0x464b6(%rip), %rsi # 0x5d3af movq %rax, %rdi callq 0x15890 testl %eax, %eax je 0x16f46 leaq 0x464a8(%rip), %rsi # 0x5d3b4 movq %r12, %rdi callq 0x15890 testl %eax, %eax je 0x16f46 leaq 0x4649c(%rip), %rsi # 0x5d3bb movq %r12, %rdi callq 0x15890 testl %eax, %eax je 0x16f46 movq %rbx, %rdi movl %ebp, %esi movq %r15, %rdx movl %r14d, %ecx xorl %r8d, %r8d popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x17970 movq 0x7e09b(%rip), %rax # 0x94fe8 movq (%rax), %rdx movq %rbx, %rdi movl %ebp, %esi callq 0x156a0 testq %rax, %rax je 0x16f92 movq %rbx, %rdi callq 0x15470 testl %eax, %eax jle 0x16f94 andl $0x7fffffff, %eax # imm = 0x7FFFFFFF incq %rax movzbl -0x2(%rbx,%rax), %ecx cmpl $0xd, %ecx je 0x16f82 cmpl $0xa, %ecx jne 0x16f94 movb $0x0, -0x2(%rbx,%rax) decq %rax cmpq $0x1, %rax jg 0x16f73 jmp 0x16f94 xorl %ebx, %ebx movq %rbx, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
crossline_readline_internal: push rbp push r15 push r14 push r12 push rbx mov r14d, ecx test rsi, rsi setz al cmp edx, 2 setl cl or cl, al jnz loc_16F92 mov ebp, edx mov rbx, rsi mov r15, rdi xor edi, edi call _isatty test eax, eax jz short loc_16F46 lea rdi, aTerm; "TERM" call _getenv test rax, rax jz short loc_16F2B mov r12, rax lea rsi, aDumb; "dumb" mov rdi, rax call _strcasecmp test eax, eax jz short loc_16F46 lea rsi, aCons25; "cons25" mov rdi, r12 call _strcasecmp test eax, eax jz short loc_16F46 lea rsi, aEmacs; "emacs" mov rdi, r12 call _strcasecmp test eax, eax jz short loc_16F46 loc_16F2B: mov rdi, rbx mov esi, ebp mov rdx, r15 mov ecx, r14d xor r8d, r8d pop rbx pop r12 pop r14 pop r15 pop rbp jmp crossline_readline_edit loc_16F46: mov rax, cs:stdin_ptr mov rdx, [rax] mov rdi, rbx mov esi, ebp call _fgets test rax, rax jz short loc_16F92 mov rdi, rbx call _strlen test eax, eax jle short loc_16F94 and eax, 7FFFFFFFh inc rax loc_16F73: movzx ecx, byte ptr [rbx+rax-2] cmp ecx, 0Dh jz short loc_16F82 cmp ecx, 0Ah jnz short loc_16F94 loc_16F82: mov byte ptr [rbx+rax-2], 0 dec rax cmp rax, 1 jg short loc_16F73 jmp short loc_16F94 loc_16F92: xor ebx, ebx loc_16F94: mov rax, rbx pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long crossline_readline_internal(long long a1, long long a2, unsigned int a3, unsigned int a4) { long long v6; // rbx long long v7; // rax long long v8; // r12 int v10; // eax long long v11; // rax int v12; // ecx if ( a2 == 0 || (int)a3 < 2 ) return 0LL; v6 = a2; if ( (unsigned int)isatty(0LL) ) { v7 = getenv("TERM"); if ( !v7 ) return crossline_readline_edit(a2, a3, a1, a4, 0LL); v8 = v7; if ( (unsigned int)strcasecmp(v7, "dumb") ) { if ( (unsigned int)strcasecmp(v8, "cons25") && (unsigned int)strcasecmp(v8, "emacs") ) return crossline_readline_edit(a2, a3, a1, a4, 0LL); } } if ( !fgets(a2, a3, stdin) ) return 0LL; v10 = strlen(a2); if ( v10 > 0 ) { v11 = (v10 & 0x7FFFFFFF) + 1LL; do { v12 = *(unsigned __int8 *)(a2 + v11 - 2); if ( v12 != 13 && v12 != 10 ) break; *(_BYTE *)(a2 + v11-- - 2) = 0; } while ( v11 > 1 ); } return v6; }
crossline_readline_internal: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14D,ECX TEST RSI,RSI SETZ AL CMP EDX,0x2 SETL CL OR CL,AL JNZ 0x00116f92 MOV EBP,EDX MOV RBX,RSI MOV R15,RDI XOR EDI,EDI CALL 0x00115a00 TEST EAX,EAX JZ 0x00116f46 LEA RDI,[0x15d3aa] CALL 0x001157c0 TEST RAX,RAX JZ 0x00116f2b MOV R12,RAX LEA RSI,[0x15d3af] MOV RDI,RAX CALL 0x00115890 TEST EAX,EAX JZ 0x00116f46 LEA RSI,[0x15d3b4] MOV RDI,R12 CALL 0x00115890 TEST EAX,EAX JZ 0x00116f46 LEA RSI,[0x15d3bb] MOV RDI,R12 CALL 0x00115890 TEST EAX,EAX JZ 0x00116f46 LAB_00116f2b: MOV RDI,RBX MOV ESI,EBP MOV RDX,R15 MOV ECX,R14D XOR R8D,R8D POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x00117970 LAB_00116f46: MOV RAX,qword ptr [0x00194fe8] MOV RDX,qword ptr [RAX] MOV RDI,RBX MOV ESI,EBP CALL 0x001156a0 TEST RAX,RAX JZ 0x00116f92 MOV RDI,RBX CALL 0x00115470 TEST EAX,EAX JLE 0x00116f94 AND EAX,0x7fffffff INC RAX LAB_00116f73: MOVZX ECX,byte ptr [RBX + RAX*0x1 + -0x2] CMP ECX,0xd JZ 0x00116f82 CMP ECX,0xa JNZ 0x00116f94 LAB_00116f82: MOV byte ptr [RBX + RAX*0x1 + -0x2],0x0 DEC RAX CMP RAX,0x1 JG 0x00116f73 JMP 0x00116f94 LAB_00116f92: XOR EBX,EBX LAB_00116f94: MOV RAX,RBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
char * crossline_readline_internal(int8 param_1,char *param_2,int param_3,int4 param_4) { int iVar1; char *pcVar2; size_t sVar3; long lVar4; if (1 < param_3 && param_2 != (char *)0x0) { iVar1 = isatty(0); if ((iVar1 != 0) && ((pcVar2 = getenv("TERM"), pcVar2 == (char *)0x0 || (((iVar1 = strcasecmp(pcVar2,"dumb"), iVar1 != 0 && (iVar1 = strcasecmp(pcVar2,"cons25"), iVar1 != 0)) && (iVar1 = strcasecmp(pcVar2,"emacs"), iVar1 != 0)))))) { pcVar2 = (char *)crossline_readline_edit(param_2,param_3,param_1,param_4,0); return pcVar2; } pcVar2 = fgets(param_2,param_3,*(FILE **)PTR_stdin_00194fe8); if (pcVar2 != (char *)0x0) { sVar3 = strlen(param_2); if ((int)(uint)sVar3 < 1) { return param_2; } lVar4 = (ulong)((uint)sVar3 & 0x7fffffff) + 1; while ((param_2[lVar4 + -2] == '\r' || (param_2[lVar4 + -2] == '\n'))) { param_2[lVar4 + -2] = '\0'; lVar4 = lVar4 + -1; if (lVar4 < 2) { return param_2; } } return param_2; } } return (char *)0x0; }
10,316
blst_sk_to_pk2_in_g2
corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/e2.c
void blst_sk_to_pk2_in_g2(unsigned char out[192], POINTonE2_affine *PK, const pow256 SK) { POINTonE2 P[1]; POINTonE2_sign(P, &BLS12_381_G2, SK); if (PK != NULL) vec_copy(PK, P, sizeof(*PK)); if (out != NULL) { limb_t sgn0_pty = POINTonE2_Serialize_BE(out, P); out[0] |= (sgn0_pty & 2) << 4; /* pre-decorate */ out[0] |= vec_is_zero(P->Z, sizeof(P->Z)) << 6; } }
O2
c
blst_sk_to_pk2_in_g2: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x120, %rsp # imm = 0x120 movq %rsi, %r14 movq %rdi, %rbx leaq 0x2a942(%rip), %rsi # 0x7e6e0 leaq -0x130(%rbp), %rdi callq 0x53c55 testq %r14, %r14 je 0x53dc3 leaq -0x130(%rbp), %rsi movl $0xc0, %edx movq %r14, %rdi callq 0x5013d testq %rbx, %rbx je 0x53def leaq -0x130(%rbp), %rsi movq %rbx, %rdi callq 0x53dfb shlb $0x4, %al andb $0x20, %al orb %al, (%rbx) leaq -0x70(%rbp), %rdi pushq $0x60 popq %rsi callq 0x501dd shlb $0x6, %al orb %al, (%rbx) addq $0x120, %rsp # imm = 0x120 popq %rbx popq %r14 popq %rbp retq
blst_sk_to_pk2_in_g2: push rbp mov rbp, rsp push r14 push rbx sub rsp, 120h mov r14, rsi mov rbx, rdi lea rsi, BLS12_381_G2 lea rdi, [rbp+var_130] call POINTonE2_sign test r14, r14 jz short loc_53DC3 lea rsi, [rbp+var_130] mov edx, 0C0h mov rdi, r14 call vec_copy loc_53DC3: test rbx, rbx jz short loc_53DEF lea rsi, [rbp+var_130] mov rdi, rbx call POINTonE2_Serialize_BE shl al, 4 and al, 20h or [rbx], al lea rdi, [rbp+var_70] push 60h ; '`' pop rsi call vec_is_zero shl al, 6 or [rbx], al loc_53DEF: add rsp, 120h pop rbx pop r14 pop rbp retn
char blst_sk_to_pk2_in_g2(_BYTE *a1, long long a2) { char result; // al _BYTE v3[192]; // [rsp+0h] [rbp-130h] BYREF _BYTE v4[112]; // [rsp+C0h] [rbp-70h] BYREF result = POINTonE2_sign((long long)v3); if ( a2 ) result = vec_copy(a2, (long long)v3, 0xC0uLL); if ( a1 ) { *a1 |= (16 * POINTonE2_Serialize_BE(a1, v3)) & 0x20; result = (unsigned __int8)vec_is_zero((long long)v4, 0x60uLL) << 6; *a1 |= result; } return result; }
blst_sk_to_pk2_in_g2: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x120 MOV R14,RSI MOV RBX,RDI LEA RSI,[0x17e6e0] LEA RDI,[RBP + -0x130] CALL 0x00153c55 TEST R14,R14 JZ 0x00153dc3 LEA RSI,[RBP + -0x130] MOV EDX,0xc0 MOV RDI,R14 CALL 0x0015013d LAB_00153dc3: TEST RBX,RBX JZ 0x00153def LEA RSI,[RBP + -0x130] MOV RDI,RBX CALL 0x00153dfb SHL AL,0x4 AND AL,0x20 OR byte ptr [RBX],AL LEA RDI,[RBP + -0x70] PUSH 0x60 POP RSI CALL 0x001501dd SHL AL,0x6 OR byte ptr [RBX],AL LAB_00153def: ADD RSP,0x120 POP RBX POP R14 POP RBP RET
void blst_sk_to_pk2_in_g2(byte *param_1,long param_2) { byte bVar1; char cVar2; int1 local_138 [192]; int1 local_78 [96]; POINTonE2_sign(local_138,BLS12_381_G2); if (param_2 != 0) { vec_copy(param_2,local_138,0xc0); } if (param_1 != (byte *)0x0) { bVar1 = POINTonE2_Serialize_BE(param_1,local_138); *param_1 = *param_1 | (bVar1 & 2) << 4; cVar2 = vec_is_zero(local_78,0x60); *param_1 = *param_1 | cVar2 << 6; } return; }
10,317
mysql_kill_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_kill_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_kill, (parms->mysql, parms->pid), parms->mysql, int, r_int) }
O0
c
mysql_kill_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movq 0x8(%rax), %rsi callq 0x206f0 movl %eax, -0x14(%rbp) movl -0x14(%rbp), %ecx movq -0x20(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
mysql_kill_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_10] mov rsi, [rax+8] call mysql_kill mov [rbp+var_14], eax mov ecx, [rbp+var_14] mov rax, [rbp+var_20] mov [rax+8], ecx mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
_DWORD * mysql_kill_start_internal(long long *a1) { _DWORD *result; // rax _DWORD *v2; // [rsp+0h] [rbp-20h] v2 = *(_DWORD **)(*(_QWORD *)(*a1 + 1152) + 40LL); v2[2] = mysql_kill(*a1, a1[1]); result = v2; *v2 = 0; return result; }
mysql_kill_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x8] CALL 0x001206f0 MOV dword ptr [RBP + -0x14],EAX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_kill_start_internal(long *param_1) { int4 *puVar1; int4 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_kill(*param_1,param_1[1]); puVar1[2] = uVar2; *puVar1 = 0; return; }
10,318
enable_optimizer_trace(st_connection*)
eloqsql/client/mysqltest.cc
void enable_optimizer_trace(struct st_connection *con) { MYSQL *mysql= con->mysql; my_bool save_ps_protocol_enabled= ps_protocol_enabled; my_bool save_view_protocol_enabled= view_protocol_enabled; DYNAMIC_STRING ds_result; DYNAMIC_STRING ds_warnings; struct st_command command; DBUG_ENTER("enable_optimizer_trace"); if (!mysql) DBUG_VOID_RETURN; ps_protocol_enabled= view_protocol_enabled= 0; init_dynamic_string(&ds_result, NULL, 0, 256); init_dynamic_string(&ds_warnings, NULL, 0, 256); bzero(&command, sizeof(command)); run_query_normal(con, &command, QUERY_SEND_FLAG | QUERY_REAP_FLAG, enable_optimizer_trace_query.str, enable_optimizer_trace_query.length, &ds_result, &ds_warnings); dynstr_free(&ds_result); dynstr_free(&ds_warnings); ps_protocol_enabled= save_ps_protocol_enabled; view_protocol_enabled= save_view_protocol_enabled; optimizer_trace_active= 1; DBUG_VOID_RETURN; }
O0
cpp
enable_optimizer_trace(st_connection*): pushq %rbp movq %rsp, %rbp subq $0x180, %rsp # imm = 0x180 movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x10(%rbp) movb 0x447e00(%rip), %al # 0x4bb680 movb %al, -0x11(%rbp) movb 0x447d8d(%rip), %al # 0x4bb616 movb %al, -0x12(%rbp) cmpq $0x0, -0x10(%rbp) jne 0x7389a jmp 0x73895 jmp 0x73941 movb $0x0, 0x447d75(%rip) # 0x4bb616 movb $0x0, 0x447dd8(%rip) # 0x4bb680 leaq -0x38(%rbp), %rdi xorl %eax, %eax movl %eax, %edx movl $0x100, %ecx # imm = 0x100 movq %rdx, %rsi callq 0xc5c30 leaq -0x58(%rbp), %rdi xorl %eax, %eax movl %eax, %edx movl $0x100, %ecx # imm = 0x100 movq %rdx, %rsi callq 0xc5c30 leaq -0x170(%rbp), %rdi xorl %esi, %esi movl $0x118, %edx # imm = 0x118 callq 0x60350 movq -0x8(%rbp), %rdi movq 0x28bc58(%rip), %rcx # 0x2ff548 movq 0x28bc59(%rip), %r8 # 0x2ff550 leaq -0x170(%rbp), %rsi movl $0x3, %edx leaq -0x38(%rbp), %r9 leaq -0x58(%rbp), %rax movq %rax, (%rsp) callq 0x6ef90 leaq -0x38(%rbp), %rdi callq 0xc6410 leaq -0x58(%rbp), %rdi callq 0xc6410 movb -0x11(%rbp), %al movb %al, 0x447d51(%rip) # 0x4bb680 movb -0x12(%rbp), %al movb %al, 0x447cde(%rip) # 0x4bb616 movb $0x1, 0x447e09(%rip) # 0x4bb748 jmp 0x73941 addq $0x180, %rsp # imm = 0x180 popq %rbp retq nopw (%rax,%rax)
_Z22enable_optimizer_traceP13st_connection: push rbp mov rbp, rsp sub rsp, 180h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_10], rax mov al, cs:_ZL19ps_protocol_enabled; ps_protocol_enabled mov [rbp+var_11], al mov al, cs:_ZL21view_protocol_enabled; view_protocol_enabled mov [rbp+var_12], al cmp [rbp+var_10], 0 jnz short loc_7389A jmp short $+2 loc_73895: jmp loc_73941 loc_7389A: mov cs:_ZL21view_protocol_enabled, 0; view_protocol_enabled mov cs:_ZL19ps_protocol_enabled, 0; ps_protocol_enabled lea rdi, [rbp+var_38] xor eax, eax mov edx, eax mov ecx, 100h mov rsi, rdx call init_dynamic_string lea rdi, [rbp+var_58] xor eax, eax mov edx, eax mov ecx, 100h mov rsi, rdx call init_dynamic_string lea rdi, [rbp+var_170] xor esi, esi mov edx, 118h call _memset mov rdi, [rbp+var_8] mov rcx, cs:enable_optimizer_trace_query mov r8, cs:qword_2FF550 lea rsi, [rbp+var_170] mov edx, 3 lea r9, [rbp+var_38] lea rax, [rbp+var_58] mov [rsp+180h+var_180], rax call _Z16run_query_normalP13st_connectionP10st_commandiPKcmP17st_dynamic_stringS6_; run_query_normal(st_connection *,st_command *,int,char const*,ulong,st_dynamic_string *,st_dynamic_string *) lea rdi, [rbp+var_38] call dynstr_free lea rdi, [rbp+var_58] call dynstr_free mov al, [rbp+var_11] mov cs:_ZL19ps_protocol_enabled, al; ps_protocol_enabled mov al, [rbp+var_12] mov cs:_ZL21view_protocol_enabled, al; view_protocol_enabled mov cs:_ZL22optimizer_trace_active, 1; optimizer_trace_active jmp short $+2 loc_73941: add rsp, 180h pop rbp retn
char enable_optimizer_trace(_QWORD *a1) { char result; // al _BYTE v2[280]; // [rsp+10h] [rbp-170h] BYREF _QWORD v3[4]; // [rsp+128h] [rbp-58h] BYREF _BYTE v4[38]; // [rsp+148h] [rbp-38h] BYREF char v5; // [rsp+16Eh] [rbp-12h] char v6; // [rsp+16Fh] [rbp-11h] long long v7; // [rsp+170h] [rbp-10h] _QWORD *v8; // [rsp+178h] [rbp-8h] v8 = a1; v7 = *a1; v6 = ps_protocol_enabled; result = view_protocol_enabled; v5 = view_protocol_enabled; if ( v7 ) { view_protocol_enabled = 0; ps_protocol_enabled = 0; init_dynamic_string(v4, 0LL, 0LL); init_dynamic_string(v3, 0LL, 0LL); memset(v2, 0LL, sizeof(v2)); run_query_normal((long long)v8, (long long)v2, 3, (long long)enable_optimizer_trace_query, qword_2FF550, (long long)v4, v3); dynstr_free(v4); dynstr_free(v3); ps_protocol_enabled = v6; result = v5; view_protocol_enabled = v5; optimizer_trace_active = 1; } return result; }
enable_optimizer_trace: PUSH RBP MOV RBP,RSP SUB RSP,0x180 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x10],RAX MOV AL,byte ptr [0x005bb680] MOV byte ptr [RBP + -0x11],AL MOV AL,byte ptr [0x005bb616] MOV byte ptr [RBP + -0x12],AL CMP qword ptr [RBP + -0x10],0x0 JNZ 0x0017389a JMP 0x00173895 LAB_00173895: JMP 0x00173941 LAB_0017389a: MOV byte ptr [0x005bb616],0x0 MOV byte ptr [0x005bb680],0x0 LEA RDI,[RBP + -0x38] XOR EAX,EAX MOV EDX,EAX MOV ECX,0x100 MOV RSI,RDX CALL 0x001c5c30 LEA RDI,[RBP + -0x58] XOR EAX,EAX MOV EDX,EAX MOV ECX,0x100 MOV RSI,RDX CALL 0x001c5c30 LEA RDI,[RBP + -0x170] XOR ESI,ESI MOV EDX,0x118 CALL 0x00160350 MOV RDI,qword ptr [RBP + -0x8] MOV RCX,qword ptr [0x003ff548] MOV R8,qword ptr [0x003ff550] LEA RSI,[RBP + -0x170] MOV EDX,0x3 LEA R9,[RBP + -0x38] LEA RAX,[RBP + -0x58] MOV qword ptr [RSP],RAX CALL 0x0016ef90 LEA RDI,[RBP + -0x38] CALL 0x001c6410 LEA RDI,[RBP + -0x58] CALL 0x001c6410 MOV AL,byte ptr [RBP + -0x11] MOV byte ptr [0x005bb680],AL MOV AL,byte ptr [RBP + -0x12] MOV byte ptr [0x005bb616],AL MOV byte ptr [0x005bb748],0x1 JMP 0x00173941 LAB_00173941: ADD RSP,0x180 POP RBP RET
/* enable_optimizer_trace(st_connection*) */ void enable_optimizer_trace(st_connection *param_1) { st_command local_178 [280]; st_dynamic_string local_60 [32]; st_dynamic_string local_40 [38]; int1 local_1a; int1 local_19; long local_18; st_connection *local_10; local_18 = *(long *)param_1; local_19 = ps_protocol_enabled; local_1a = view_protocol_enabled; if (local_18 != 0) { view_protocol_enabled = 0; ps_protocol_enabled = 0; local_10 = param_1; init_dynamic_string(local_40,0,0,0x100); init_dynamic_string(local_60,0,0,0x100); memset(local_178,0,0x118); run_query_normal(local_10,local_178,3,enable_optimizer_trace_query,DAT_003ff550,local_40, local_60); dynstr_free(local_40); dynstr_free(local_60); ps_protocol_enabled = local_19; view_protocol_enabled = local_1a; optimizer_trace_active = 1; } return; }
10,319
emittra::Emittra::try_dequeue_bulk(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::vector<std::any, std::allocator<std::any>>, std::allocator<std::vector<std::any, std::allocator<std::any>>>>&, unsigned long)
angrymouse[P]emittra/src/emittra.cpp
size_t Emittra::try_dequeue_bulk(const std::string& event_name, std::vector<std::vector<std::any>>& bulk_args, size_t max_items) { auto event_data = get_or_create_event_data(event_name); std::vector<QueuedEvent> events(max_items); moodycamel::ConsumerToken token(event_data->event_queue); size_t dequeued = event_data->event_queue.try_dequeue_bulk(token, events.begin(), max_items); bulk_args.clear(); bulk_args.reserve(dequeued); for (size_t i = 0; i < dequeued; ++i) { bulk_args.push_back(std::move(events[i].args)); } return dequeued; }
O0
cpp
emittra::Emittra::try_dequeue_bulk(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::vector<std::any, std::allocator<std::any>>, std::allocator<std::vector<std::any, std::allocator<std::any>>>>&, unsigned long): subq $0xc8, %rsp movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movq %rdx, 0xb0(%rsp) movq %rcx, 0xa8(%rsp) movq 0xc0(%rsp), %rsi movq 0xb8(%rsp), %rdx leaq 0x98(%rsp), %rdi callq 0xa3d0 movq 0xa8(%rsp), %rax movq %rax, 0x20(%rsp) leaq 0x7f(%rsp), %rdi movq %rdi, 0x28(%rsp) callq 0xf4d0 movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rdx leaq 0x80(%rsp), %rdi callq 0xf4e0 jmp 0xc269 leaq 0x7f(%rsp), %rdi callq 0xf560 leaq 0x98(%rsp), %rdi callq 0xe160 movq %rax, %rsi addq $0x18, %rsi leaq 0x48(%rsp), %rdi callq 0xf570 jmp 0xc293 leaq 0x98(%rsp), %rdi callq 0xe160 addq $0x18, %rax movq %rax, 0x10(%rsp) leaq 0x80(%rsp), %rdi callq 0xfb30 movq 0x10(%rsp), %rdi movq %rax, 0x38(%rsp) movq 0xa8(%rsp), %rcx movq 0x38(%rsp), %rdx leaq 0x48(%rsp), %rsi callq 0xf670 movq %rax, 0x18(%rsp) jmp 0xc2de movq 0x18(%rsp), %rax movq %rax, 0x40(%rsp) movq 0xb0(%rsp), %rdi callq 0xfb60 movq 0xb0(%rsp), %rdi movq 0x40(%rsp), %rsi callq 0xfb80 jmp 0xc309 movq $0x0, 0x30(%rsp) movq 0x30(%rsp), %rax cmpq 0x40(%rsp), %rax jae 0xc395 movq 0xb0(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x30(%rsp), %rsi leaq 0x80(%rsp), %rdi callq 0xfcc0 movq 0x8(%rsp), %rdi movq %rax, %rsi callq 0xfc90 jmp 0xc34c jmp 0xc34e movq 0x30(%rsp), %rax addq $0x1, %rax movq %rax, 0x30(%rsp) jmp 0xc312 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x70(%rsp) movl %eax, 0x6c(%rsp) leaq 0x7f(%rsp), %rdi callq 0xf560 jmp 0xc3c4 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x70(%rsp) movl %eax, 0x6c(%rsp) leaq 0x80(%rsp), %rdi callq 0xf470 jmp 0xc3c4 movq 0x40(%rsp), %rax movq %rax, (%rsp) leaq 0x80(%rsp), %rdi callq 0xf470 leaq 0x98(%rsp), %rdi callq 0x6970 movq (%rsp), %rax addq $0xc8, %rsp retq leaq 0x98(%rsp), %rdi callq 0x6970 movq 0x70(%rsp), %rdi callq 0x4490 nopl (%rax,%rax)
_ZN7emittra7Emittra16try_dequeue_bulkERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIS9_ISt3anySaISA_EESaISC_EEm: sub rsp, 0C8h mov [rsp+0C8h+var_8], rdi mov [rsp+0C8h+var_10], rsi mov [rsp+0C8h+var_18], rdx mov [rsp+0C8h+var_20], rcx mov rsi, [rsp+0C8h+var_8] mov rdx, [rsp+0C8h+var_10] lea rdi, [rsp+0C8h+var_30] call _ZN7emittra7Emittra24get_or_create_event_dataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; emittra::Emittra::get_or_create_event_data(std::string const&) mov rax, [rsp+0C8h+var_20] mov [rsp+0C8h+var_A8], rax lea rdi, [rsp+0C8h+var_49] mov [rsp+0C8h+var_A0], rdi call _ZNSaIN7emittra7Emittra11QueuedEventEEC2Ev; std::allocator<emittra::Emittra::QueuedEvent>::allocator(void) mov rsi, [rsp+0C8h+var_A8] mov rdx, [rsp+0C8h+var_A0] lea rdi, [rsp+0C8h+var_48] call _ZNSt6vectorIN7emittra7Emittra11QueuedEventESaIS2_EEC2EmRKS3_; std::vector<emittra::Emittra::QueuedEvent>::vector(ulong,std::allocator<emittra::Emittra::QueuedEvent> const&) jmp short $+2 loc_C269: lea rdi, [rsp+0C8h+var_49] call _ZNSaIN7emittra7Emittra11QueuedEventEED2Ev; std::allocator<emittra::Emittra::QueuedEvent>::~allocator() lea rdi, [rsp+0C8h+var_30] call _ZNKSt19__shared_ptr_accessIN7emittra7Emittra9EventDataELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rsi, rax add rsi, 18h lea rdi, [rsp+0C8h+var_80] call _ZN10moodycamel13ConsumerTokenC2IN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEEERNS_15ConcurrentQueueIT_T0_EE; moodycamel::ConsumerToken::ConsumerToken<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits> &) jmp short $+2 loc_C293: lea rdi, [rsp+0C8h+var_30] call _ZNKSt19__shared_ptr_accessIN7emittra7Emittra9EventDataELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) add rax, 18h mov [rsp+0C8h+var_B8], rax lea rdi, [rsp+0C8h+var_48] call _ZNSt6vectorIN7emittra7Emittra11QueuedEventESaIS2_EE5beginEv; std::vector<emittra::Emittra::QueuedEvent>::begin(void) mov rdi, [rsp+0C8h+var_B8] mov [rsp+0C8h+var_90], rax mov rcx, [rsp+0C8h+var_20] mov rdx, [rsp+0C8h+var_90] lea rsi, [rsp+0C8h+var_80] call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE16try_dequeue_bulkIN9__gnu_cxx17__normal_iteratorIPS3_St6vectorIS3_SaIS3_EEEEEEmRNS_13ConsumerTokenET_m; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::try_dequeue_bulk<__gnu_cxx::__normal_iterator<emittra::Emittra::QueuedEvent*,std::vector<emittra::Emittra::QueuedEvent>>>(moodycamel::ConsumerToken &,__gnu_cxx::__normal_iterator<emittra::Emittra::QueuedEvent*,std::vector<emittra::Emittra::QueuedEvent>>,ulong) mov [rsp+0C8h+var_B0], rax jmp short $+2 loc_C2DE: mov rax, [rsp+0C8h+var_B0] mov [rsp+0C8h+var_88], rax mov rdi, [rsp+0C8h+var_18] call _ZNSt6vectorIS_ISt3anySaIS0_EESaIS2_EE5clearEv; std::vector<std::vector<std::any>>::clear(void) mov rdi, [rsp+0C8h+var_18] mov rsi, [rsp+0C8h+var_88] call _ZNSt6vectorIS_ISt3anySaIS0_EESaIS2_EE7reserveEm; std::vector<std::vector<std::any>>::reserve(ulong) jmp short $+2 loc_C309: mov [rsp+0C8h+var_98], 0 loc_C312: mov rax, [rsp+0C8h+var_98] cmp rax, [rsp+0C8h+var_88] jnb short loc_C395 mov rax, [rsp+0C8h+var_18] mov [rsp+0C8h+var_C0], rax mov rsi, [rsp+0C8h+var_98] lea rdi, [rsp+0C8h+var_48] call _ZNSt6vectorIN7emittra7Emittra11QueuedEventESaIS2_EEixEm; std::vector<emittra::Emittra::QueuedEvent>::operator[](ulong) mov rdi, [rsp+0C8h+var_C0] mov rsi, rax call _ZNSt6vectorIS_ISt3anySaIS0_EESaIS2_EE9push_backEOS2_; std::vector<std::vector<std::any>>::push_back(std::vector<std::any>&&) jmp short $+2 loc_C34C: jmp short $+2 loc_C34E: mov rax, [rsp+0C8h+var_98] add rax, 1 mov [rsp+0C8h+var_98], rax jmp short loc_C312 mov rcx, rax mov eax, edx mov [rsp+arg_68], rcx mov [rsp+arg_64], eax lea rdi, [rsp+arg_77] call _ZNSaIN7emittra7Emittra11QueuedEventEED2Ev; std::allocator<emittra::Emittra::QueuedEvent>::~allocator() jmp short loc_C3C4 mov rcx, rax mov eax, edx mov [rsp+arg_68], rcx mov [rsp+arg_64], eax lea rdi, [rsp+arg_78] call _ZNSt6vectorIN7emittra7Emittra11QueuedEventESaIS2_EED2Ev; std::vector<emittra::Emittra::QueuedEvent>::~vector() jmp short loc_C3C4 loc_C395: mov rax, [rsp+0C8h+var_88] mov [rsp+0C8h+var_C8], rax lea rdi, [rsp+0C8h+var_48] call _ZNSt6vectorIN7emittra7Emittra11QueuedEventESaIS2_EED2Ev; std::vector<emittra::Emittra::QueuedEvent>::~vector() lea rdi, [rsp+0C8h+var_30] call _ZNSt10shared_ptrIN7emittra7Emittra9EventDataEED2Ev; std::shared_ptr<emittra::Emittra::EventData>::~shared_ptr() mov rax, [rsp+0C8h+var_C8] add rsp, 0C8h retn loc_C3C4: lea rdi, [rsp+arg_90] call _ZNSt10shared_ptrIN7emittra7Emittra9EventDataEED2Ev; std::shared_ptr<emittra::Emittra::EventData>::~shared_ptr() mov rdi, [rsp+arg_68] call __Unwind_Resume
unsigned long long emittra::Emittra::try_dequeue_bulk(long long a1, long long a2, long long a3, long long a4) { int v4; // ecx int v5; // r8d int v6; // r9d long long v7; // rax long long v8; // rax long long v10; // [rsp+8h] [rbp-C0h] long long v11; // [rsp+10h] [rbp-B8h] int v12; // [rsp+20h] [rbp-A8h] unsigned long long i; // [rsp+30h] [rbp-98h] long long v14; // [rsp+38h] [rbp-90h] unsigned long long v15; // [rsp+40h] [rbp-88h] _BYTE v16[55]; // [rsp+48h] [rbp-80h] BYREF char v17; // [rsp+7Fh] [rbp-49h] BYREF _BYTE v18[24]; // [rsp+80h] [rbp-48h] BYREF _BYTE v19[16]; // [rsp+98h] [rbp-30h] BYREF long long v20; // [rsp+A8h] [rbp-20h] long long v21; // [rsp+B0h] [rbp-18h] long long v22; // [rsp+B8h] [rbp-10h] long long v23; // [rsp+C0h] [rbp-8h] v23 = a1; v22 = a2; v21 = a3; v20 = a4; emittra::Emittra::get_or_create_event_data((long long)v19, a1, a2); v12 = v20; std::allocator<emittra::Emittra::QueuedEvent>::allocator(); std::vector<emittra::Emittra::QueuedEvent>::vector((unsigned int)v18, v12, (unsigned int)&v17, v4, v5, v6); std::allocator<emittra::Emittra::QueuedEvent>::~allocator(&v17); v7 = std::__shared_ptr_access<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v19); moodycamel::ConsumerToken::ConsumerToken<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>( v16, v7 + 24); v11 = std::__shared_ptr_access<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v19) + 24; v14 = std::vector<emittra::Emittra::QueuedEvent>::begin(v18); v15 = moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::try_dequeue_bulk<__gnu_cxx::__normal_iterator<emittra::Emittra::QueuedEvent*,std::vector<emittra::Emittra::QueuedEvent>>>( v11, v16, v14, v20); std::vector<std::vector<std::any>>::clear(v21); std::vector<std::vector<std::any>>::reserve(v21, v15); for ( i = 0LL; i < v15; ++i ) { v10 = v21; v8 = std::vector<emittra::Emittra::QueuedEvent>::operator[](v18, i); std::vector<std::vector<std::any>>::push_back(v10, v8); } std::vector<emittra::Emittra::QueuedEvent>::~vector(v18); std::shared_ptr<emittra::Emittra::EventData>::~shared_ptr((long long)v19); return v15; }
try_dequeue_bulk: SUB RSP,0xc8 MOV qword ptr [RSP + 0xc0],RDI MOV qword ptr [RSP + 0xb8],RSI MOV qword ptr [RSP + 0xb0],RDX MOV qword ptr [RSP + 0xa8],RCX MOV RSI,qword ptr [RSP + 0xc0] MOV RDX,qword ptr [RSP + 0xb8] LEA RDI,[RSP + 0x98] CALL 0x0010a3d0 MOV RAX,qword ptr [RSP + 0xa8] MOV qword ptr [RSP + 0x20],RAX LEA RDI,[RSP + 0x7f] MOV qword ptr [RSP + 0x28],RDI CALL 0x0010f4d0 MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x28] LAB_0010c25a: LEA RDI,[RSP + 0x80] CALL 0x0010f4e0 JMP 0x0010c269 LAB_0010c269: LEA RDI,[RSP + 0x7f] CALL 0x0010f560 LEA RDI,[RSP + 0x98] CALL 0x0010e160 MOV RSI,RAX ADD RSI,0x18 LAB_0010c287: LEA RDI,[RSP + 0x48] CALL 0x0010f570 JMP 0x0010c293 LAB_0010c293: LEA RDI,[RSP + 0x98] CALL 0x0010e160 ADD RAX,0x18 MOV qword ptr [RSP + 0x10],RAX LEA RDI,[RSP + 0x80] CALL 0x0010fb30 MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x38],RAX MOV RCX,qword ptr [RSP + 0xa8] MOV RDX,qword ptr [RSP + 0x38] LEA RSI,[RSP + 0x48] CALL 0x0010f670 MOV qword ptr [RSP + 0x18],RAX JMP 0x0010c2de LAB_0010c2de: MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x40],RAX MOV RDI,qword ptr [RSP + 0xb0] CALL 0x0010fb60 MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0x40] CALL 0x0010fb80 JMP 0x0010c309 LAB_0010c309: MOV qword ptr [RSP + 0x30],0x0 LAB_0010c312: MOV RAX,qword ptr [RSP + 0x30] CMP RAX,qword ptr [RSP + 0x40] JNC 0x0010c395 MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0x8],RAX MOV RSI,qword ptr [RSP + 0x30] LEA RDI,[RSP + 0x80] CALL 0x0010fcc0 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,RAX CALL 0x0010fc90 LAB_0010c34a: JMP 0x0010c34c LAB_0010c34c: JMP 0x0010c34e LAB_0010c34e: MOV RAX,qword ptr [RSP + 0x30] ADD RAX,0x1 MOV qword ptr [RSP + 0x30],RAX JMP 0x0010c312 LAB_0010c395: MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP],RAX LEA RDI,[RSP + 0x80] CALL 0x0010f470 LEA RDI,[RSP + 0x98] CALL 0x00106970 MOV RAX,qword ptr [RSP] ADD RSP,0xc8 RET
/* emittra::Emittra::try_dequeue_bulk(std::__cxx11::string const&, std::vector<std::vector<std::any, std::allocator<std::any> >, std::allocator<std::vector<std::any, std::allocator<std::any> > > >&, unsigned long) */ ulong __thiscall emittra::Emittra::try_dequeue_bulk(Emittra *this,string *param_1,vector *param_2,ulong param_3) { vector *this_00; long lVar1; int8 uVar2; ulong uVar3; vector *pvVar4; ulong local_98; ConsumerToken local_80 [55]; allocator<emittra::Emittra::QueuedEvent> local_49; vector<emittra::Emittra::QueuedEvent,std::allocator<emittra::Emittra::QueuedEvent>> local_48 [24]; string local_30 [16]; ulong local_20; vector *local_18; string *local_10; Emittra *local_8; local_20 = param_3; local_18 = param_2; local_10 = param_1; local_8 = this; get_or_create_event_data(local_30); uVar3 = local_20; std::allocator<emittra::Emittra::QueuedEvent>::allocator(&local_49); /* try { // try from 0010c25a to 0010c266 has its CatchHandler @ 0010c35e */ std::vector<emittra::Emittra::QueuedEvent,std::allocator<emittra::Emittra::QueuedEvent>>::vector (local_48,uVar3,(allocator *)&local_49); std::allocator<emittra::Emittra::QueuedEvent>::~allocator(&local_49); lVar1 = std:: __shared_ptr_access<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2,false,false>:: operator->((__shared_ptr_access<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2,false,false> *)local_30); /* try { // try from 0010c287 to 0010c349 has its CatchHandler @ 0010c378 */ moodycamel::ConsumerToken:: ConsumerToken<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits> (local_80,(ConcurrentQueue *)(lVar1 + 0x18)); lVar1 = std:: __shared_ptr_access<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2,false,false>:: operator->((__shared_ptr_access<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2,false,false> *)local_30); uVar2 = std::vector<emittra::Emittra::QueuedEvent,std::allocator<emittra::Emittra::QueuedEvent>>:: begin(local_48); uVar3 = moodycamel:: ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>:: try_dequeue_bulk<__gnu_cxx::__normal_iterator<emittra::Emittra::QueuedEvent*,std::vector<emittra::Emittra::QueuedEvent,std::allocator<emittra::Emittra::QueuedEvent>>>> ((ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits> *)(lVar1 + 0x18),local_80,uVar2,local_20); std:: vector<std::vector<std::any,std::allocator<std::any>>,std::allocator<std::vector<std::any,std::allocator<std::any>>>> ::clear((vector<std::vector<std::any,std::allocator<std::any>>,std::allocator<std::vector<std::any,std::allocator<std::any>>>> *)local_18); std:: vector<std::vector<std::any,std::allocator<std::any>>,std::allocator<std::vector<std::any,std::allocator<std::any>>>> ::reserve((vector<std::vector<std::any,std::allocator<std::any>>,std::allocator<std::vector<std::any,std::allocator<std::any>>>> *)local_18,uVar3); for (local_98 = 0; this_00 = local_18, local_98 < uVar3; local_98 = local_98 + 1) { pvVar4 = (vector *) std:: vector<emittra::Emittra::QueuedEvent,std::allocator<emittra::Emittra::QueuedEvent>>:: operator[](local_48,local_98); std:: vector<std::vector<std::any,std::allocator<std::any>>,std::allocator<std::vector<std::any,std::allocator<std::any>>>> ::push_back((vector<std::vector<std::any,std::allocator<std::any>>,std::allocator<std::vector<std::any,std::allocator<std::any>>>> *)this_00,pvVar4); } std::vector<emittra::Emittra::QueuedEvent,std::allocator<emittra::Emittra::QueuedEvent>>::~vector (local_48); std::shared_ptr<emittra::Emittra::EventData>::~shared_ptr ((shared_ptr<emittra::Emittra::EventData> *)local_30); return uVar3; }
10,320
emittra::Emittra::try_dequeue_bulk(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::vector<std::any, std::allocator<std::any>>, std::allocator<std::vector<std::any, std::allocator<std::any>>>>&, unsigned long)
angrymouse[P]emittra/src/emittra.cpp
size_t Emittra::try_dequeue_bulk(const std::string& event_name, std::vector<std::vector<std::any>>& bulk_args, size_t max_items) { auto event_data = get_or_create_event_data(event_name); std::vector<QueuedEvent> events(max_items); moodycamel::ConsumerToken token(event_data->event_queue); size_t dequeued = event_data->event_queue.try_dequeue_bulk(token, events.begin(), max_items); bulk_args.clear(); bulk_args.reserve(dequeued); for (size_t i = 0; i < dequeued; ++i) { bulk_args.push_back(std::move(events[i].args)); } return dequeued; }
O1
cpp
emittra::Emittra::try_dequeue_bulk(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::vector<std::any, std::allocator<std::any>>, std::allocator<std::vector<std::any, std::allocator<std::any>>>>&, unsigned long): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x50, %rsp movq %rcx, %r14 movq %rdx, %rbx movq %rsi, %rdx movq %rdi, %rsi leaq 0x8(%rsp), %rdi callq 0x4c50 leaq 0x18(%rsp), %rdi leaq 0x30(%rsp), %rdx movq %r14, %rsi callq 0x6ac0 movq 0x8(%rsp), %rax leaq 0x30(%rsp), %rsi movl $0x0, 0x8(%rsi) xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rsi) movl $0x1, %ecx lock xaddl %ecx, 0x274(%rax) movl %ecx, (%rsi) movl $0xffffffff, 0x4(%rsi) # imm = 0xFFFFFFFF movq 0x8(%rsp), %rdi addq $0x18, %rdi movq 0x18(%rsp), %rdx movq %r14, %rcx callq 0x6b48 movq %rax, %r14 movq (%rbx), %r12 movq 0x8(%rbx), %r13 cmpq %r12, %r13 je 0x61f6 movq %r12, %r15 movq %r15, %rdi callq 0x46fa addq $0x18, %r15 cmpq %r13, %r15 jne 0x61e1 movq %r12, 0x8(%rbx) movq %rbx, %rdi movq %r14, %rsi callq 0x6d34 testq %r14, %r14 je 0x6225 xorl %r15d, %r15d movq %r14, %r12 movq 0x18(%rsp), %rsi addq %r15, %rsi movq %rbx, %rdi callq 0xa8fe addq $0x28, %r15 decq %r12 jne 0x620c leaq 0x18(%rsp), %rdi callq 0x6a90 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x623e callq 0x4352 movq %r14, %rax addq $0x50, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %rbx jmp 0x6263 jmp 0x6256 movq %rax, %rbx leaq 0x18(%rsp), %rdi callq 0x6a90 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x6272 callq 0x4352 movq %rbx, %rdi callq 0x3450
_ZN7emittra7Emittra16try_dequeue_bulkERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIS9_ISt3anySaISA_EESaISC_EEm: push r15 push r14 push r13 push r12 push rbx sub rsp, 50h mov r14, rcx mov rbx, rdx mov rdx, rsi mov rsi, rdi lea rdi, [rsp+78h+var_70] call _ZN7emittra7Emittra24get_or_create_event_dataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; emittra::Emittra::get_or_create_event_data(std::string const&) lea rdi, [rsp+78h+var_60] lea rdx, [rsp+78h+var_48] mov rsi, r14 call _ZNSt6vectorIN7emittra7Emittra11QueuedEventESaIS2_EEC2EmRKS3_; std::vector<emittra::Emittra::QueuedEvent>::vector(ulong,std::allocator<emittra::Emittra::QueuedEvent> const&) mov rax, [rsp+78h+var_70] lea rsi, [rsp+78h+var_48] mov dword ptr [rsi+8], 0 xorps xmm0, xmm0 movups xmmword ptr [rsi+10h], xmm0 mov ecx, 1 lock xadd [rax+274h], ecx mov [rsi], ecx mov dword ptr [rsi+4], 0FFFFFFFFh mov rdi, [rsp+78h+var_70] add rdi, 18h mov rdx, [rsp+78h+var_60] mov rcx, r14 call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE16try_dequeue_bulkIN9__gnu_cxx17__normal_iteratorIPS3_St6vectorIS3_SaIS3_EEEEEEmRNS_13ConsumerTokenET_m; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::try_dequeue_bulk<__gnu_cxx::__normal_iterator<emittra::Emittra::QueuedEvent*,std::vector<emittra::Emittra::QueuedEvent>>>(moodycamel::ConsumerToken &,__gnu_cxx::__normal_iterator<emittra::Emittra::QueuedEvent*,std::vector<emittra::Emittra::QueuedEvent>>,ulong) mov r14, rax mov r12, [rbx] mov r13, [rbx+8] cmp r13, r12 jz short loc_61F6 mov r15, r12 loc_61E1: mov rdi, r15 call _ZNSt6vectorISt3anySaIS0_EED2Ev; std::vector<std::any>::~vector() add r15, 18h cmp r15, r13 jnz short loc_61E1 mov [rbx+8], r12 loc_61F6: mov rdi, rbx mov rsi, r14 call _ZNSt6vectorIS_ISt3anySaIS0_EESaIS2_EE7reserveEm; std::vector<std::vector<std::any>>::reserve(ulong) test r14, r14 jz short loc_6225 xor r15d, r15d mov r12, r14 loc_620C: mov rsi, [rsp+78h+var_60] add rsi, r15 mov rdi, rbx call _ZNSt6vectorIS_ISt3anySaIS0_EESaIS2_EE12emplace_backIJS2_EEERS2_DpOT_; std::vector<std::vector<std::any>>::emplace_back<std::vector<std::any>>(std::vector<std::any> &&) add r15, 28h ; '(' dec r12 jnz short loc_620C loc_6225: lea rdi, [rsp+78h+var_60] call _ZNSt6vectorIN7emittra7Emittra11QueuedEventESaIS2_EED2Ev; std::vector<emittra::Emittra::QueuedEvent>::~vector() mov rdi, [rsp+78h+var_68] test rdi, rdi jz short loc_623E call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_623E: mov rax, r14 add rsp, 50h pop rbx pop r12 pop r13 pop r14 pop r15 retn mov rbx, rax jmp short loc_6263 jmp short $+2 loc_6256: mov rbx, rax lea rdi, [rsp+arg_10] call _ZNSt6vectorIN7emittra7Emittra11QueuedEventESaIS2_EED2Ev; std::vector<emittra::Emittra::QueuedEvent>::~vector() loc_6263: mov rdi, [rsp+arg_8] test rdi, rdi jz short loc_6272 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6272: mov rdi, rbx call __Unwind_Resume
long long emittra::Emittra::try_dequeue_bulk( std::__shared_mutex_pthread *a1, long long a2, _QWORD *a3, long long a4) { long long v6; // r14 _QWORD *v7; // r12 _QWORD *v8; // r13 _QWORD *v9; // r15 long long v10; // r15 long long v11; // r12 long long v13; // [rsp+8h] [rbp-70h] BYREF volatile signed __int32 *v14; // [rsp+10h] [rbp-68h] _QWORD v15[3]; // [rsp+18h] [rbp-60h] BYREF _DWORD v16[4]; // [rsp+30h] [rbp-48h] BYREF __int128 v17; // [rsp+40h] [rbp-38h] emittra::Emittra::get_or_create_event_data(&v13, a1, a2); std::vector<emittra::Emittra::QueuedEvent>::vector(v15, a4, v16); v16[2] = 0; v17 = 0LL; v16[0] = _InterlockedExchangeAdd((volatile signed __int32 *)(v13 + 628), 1u); v16[1] = -1; v6 = moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::try_dequeue_bulk<__gnu_cxx::__normal_iterator<emittra::Emittra::QueuedEvent*,std::vector<emittra::Emittra::QueuedEvent>>>( v13 + 24, v16, v15[0], a4); v7 = (_QWORD *)*a3; v8 = (_QWORD *)a3[1]; if ( v8 != (_QWORD *)*a3 ) { v9 = (_QWORD *)*a3; do { std::vector<std::any>::~vector(v9); v9 += 3; } while ( v9 != v8 ); a3[1] = v7; } std::vector<std::vector<std::any>>::reserve(a3, v6); if ( v6 ) { v10 = 0LL; v11 = v6; do { std::vector<std::vector<std::any>>::emplace_back<std::vector<std::any>>(a3, v10 + v15[0]); v10 += 40LL; --v11; } while ( v11 ); } std::vector<emittra::Emittra::QueuedEvent>::~vector(v15); if ( v14 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14); return v6; }
try_dequeue_bulk: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x50 MOV R14,RCX MOV RBX,RDX MOV RDX,RSI MOV RSI,RDI LEA RDI,[RSP + 0x8] CALL 0x00104c50 LAB_00106179: LEA RDI,[RSP + 0x18] LEA RDX,[RSP + 0x30] MOV RSI,R14 CALL 0x00106ac0 MOV RAX,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x30] MOV dword ptr [RSI + 0x8],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI + 0x10],XMM0 MOV ECX,0x1 XADD.LOCK dword ptr [RAX + 0x274],ECX MOV dword ptr [RSI],ECX MOV dword ptr [RSI + 0x4],0xffffffff MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x18 MOV RDX,qword ptr [RSP + 0x18] LAB_001061c7: MOV RCX,R14 CALL 0x00106b48 MOV R14,RAX MOV R12,qword ptr [RBX] MOV R13,qword ptr [RBX + 0x8] CMP R13,R12 JZ 0x001061f6 MOV R15,R12 LAB_001061e1: MOV RDI,R15 CALL 0x001046fa ADD R15,0x18 CMP R15,R13 JNZ 0x001061e1 MOV qword ptr [RBX + 0x8],R12 LAB_001061f6: MOV RDI,RBX MOV RSI,R14 CALL 0x00106d34 TEST R14,R14 JZ 0x00106225 XOR R15D,R15D MOV R12,R14 LAB_0010620c: MOV RSI,qword ptr [RSP + 0x18] ADD RSI,R15 LAB_00106214: MOV RDI,RBX CALL 0x0010a8fe LAB_0010621c: ADD R15,0x28 DEC R12 JNZ 0x0010620c LAB_00106225: LEA RDI,[RSP + 0x18] CALL 0x00106a90 MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x0010623e CALL 0x00104352 LAB_0010623e: MOV RAX,R14 ADD RSP,0x50 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* emittra::Emittra::try_dequeue_bulk(std::__cxx11::string const&, std::vector<std::vector<std::any, std::allocator<std::any> >, std::allocator<std::vector<std::any, std::allocator<std::any> > > >&, unsigned long) */ ulong __thiscall emittra::Emittra::try_dequeue_bulk(Emittra *this,string *param_1,vector *param_2,ulong param_3) { int *piVar1; vector<std::any,std::allocator<std::any>> *pvVar2; vector<std::any,std::allocator<std::any>> *pvVar3; ulong uVar4; ulong uVar5; vector<std::any,std::allocator<std::any>> *this_00; long lVar6; long local_70; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68; long local_60 [3]; int local_48 [4]; int8 local_38; int8 uStack_30; get_or_create_event_data((string *)&local_70); /* try { // try from 00106179 to 0010618a has its CatchHandler @ 0010624f */ std::vector<emittra::Emittra::QueuedEvent,std::allocator<emittra::Emittra::QueuedEvent>>::vector ((ulong)local_60,(allocator *)param_3); local_48[2] = 0; local_38 = 0; uStack_30 = 0; LOCK(); piVar1 = (int *)(local_70 + 0x274); local_48[0] = *piVar1; *piVar1 = *piVar1 + 1; UNLOCK(); local_48[1] = 0xffffffff; /* try { // try from 001061c7 to 00106200 has its CatchHandler @ 00106254 */ uVar4 = moodycamel:: ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>:: try_dequeue_bulk<__gnu_cxx::__normal_iterator<emittra::Emittra::QueuedEvent*,std::vector<emittra::Emittra::QueuedEvent,std::allocator<emittra::Emittra::QueuedEvent>>>> ((ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits> *)(local_70 + 0x18),local_48,local_60[0],param_3); pvVar2 = *(vector<std::any,std::allocator<std::any>> **)param_2; pvVar3 = *(vector<std::any,std::allocator<std::any>> **)(param_2 + 8); this_00 = pvVar2; if (pvVar3 != pvVar2) { do { std::vector<std::any,std::allocator<std::any>>::~vector(this_00); this_00 = this_00 + 0x18; } while (this_00 != pvVar3); *(vector<std::any,std::allocator<std::any>> **)(param_2 + 8) = pvVar2; } std:: vector<std::vector<std::any,std::allocator<std::any>>,std::allocator<std::vector<std::any,std::allocator<std::any>>>> ::reserve((vector<std::vector<std::any,std::allocator<std::any>>,std::allocator<std::vector<std::any,std::allocator<std::any>>>> *)param_2,uVar4); if (uVar4 != 0) { lVar6 = 0; uVar5 = uVar4; do { /* try { // try from 00106214 to 0010621b has its CatchHandler @ 00106256 */ std:: vector<std::vector<std::any,std::allocator<std::any>>,std::allocator<std::vector<std::any,std::allocator<std::any>>>> ::emplace_back<std::vector<std::any,std::allocator<std::any>>> ((vector<std::vector<std::any,std::allocator<std::any>>,std::allocator<std::vector<std::any,std::allocator<std::any>>>> *)param_2,(vector *)(local_60[0] + lVar6)); lVar6 = lVar6 + 0x28; uVar5 = uVar5 - 1; } while (uVar5 != 0); } std::vector<emittra::Emittra::QueuedEvent,std::allocator<emittra::Emittra::QueuedEvent>>::~vector ((vector<emittra::Emittra::QueuedEvent,std::allocator<emittra::Emittra::QueuedEvent>> *) local_60); if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68); } return uVar4; }
10,321
emittra::Emittra::try_dequeue_bulk(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::vector<std::any, std::allocator<std::any>>, std::allocator<std::vector<std::any, std::allocator<std::any>>>>&, unsigned long)
angrymouse[P]emittra/src/emittra.cpp
size_t Emittra::try_dequeue_bulk(const std::string& event_name, std::vector<std::vector<std::any>>& bulk_args, size_t max_items) { auto event_data = get_or_create_event_data(event_name); std::vector<QueuedEvent> events(max_items); moodycamel::ConsumerToken token(event_data->event_queue); size_t dequeued = event_data->event_queue.try_dequeue_bulk(token, events.begin(), max_items); bulk_args.clear(); bulk_args.reserve(dequeued); for (size_t i = 0; i < dequeued; ++i) { bulk_args.push_back(std::move(events[i].args)); } return dequeued; }
O2
cpp
emittra::Emittra::try_dequeue_bulk(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::vector<std::any, std::allocator<std::any>>, std::allocator<std::vector<std::any, std::allocator<std::any>>>>&, unsigned long): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rcx, %r14 movq %rdx, %rbx movq %rsi, %rdx movq %rdi, %rsi movq %rsp, %rdi callq 0x4932 leaq 0x10(%rsp), %rdi leaq 0x28(%rsp), %rdx movq %r14, %rsi callq 0x61e4 leaq 0x28(%rsp), %rsi andl $0x0, 0x8(%rsi) movq (%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rsi) pushq $0x1 popq %rcx lock xaddl %ecx, 0x274(%rax) movl %ecx, (%rsi) orl $-0x1, 0x4(%rsi) movq (%rsp), %rdi addq $0x18, %rdi movq 0x10(%rsp), %rdx movq %r14, %rcx callq 0x6236 movq %rax, %r14 movq %rbx, %rdi callq 0x632e movq %rbx, %rdi movq %r14, %rsi callq 0x6336 xorl %r15d, %r15d movq %r14, %r12 subq $0x1, %r12 jb 0x5b2b movq 0x10(%rsp), %rsi addq %r15, %rsi movq %rbx, %rdi callq 0x98c8 addq $0x28, %r15 jmp 0x5b0f leaq 0x10(%rsp), %rdi callq 0x61c2 leaq 0x8(%rsp), %rdi callq 0x3f84 movq %r14, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx jmp 0x5b62 jmp 0x5b55 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x61c2 leaq 0x8(%rsp), %rdi callq 0x3f84 movq %rbx, %rdi callq 0x3440
_ZN7emittra7Emittra16try_dequeue_bulkERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIS9_ISt3anySaISA_EESaISC_EEm: push r15 push r14 push r12 push rbx sub rsp, 48h mov r14, rcx mov rbx, rdx mov rdx, rsi mov rsi, rdi mov rdi, rsp call _ZN7emittra7Emittra24get_or_create_event_dataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; emittra::Emittra::get_or_create_event_data(std::string const&) lea rdi, [rsp+68h+var_58] lea rdx, [rsp+68h+var_40] mov rsi, r14 call _ZNSt6vectorIN7emittra7Emittra11QueuedEventESaIS2_EEC2EmRKS3_; std::vector<emittra::Emittra::QueuedEvent>::vector(ulong,std::allocator<emittra::Emittra::QueuedEvent> const&) lea rsi, [rsp+68h+var_40] and dword ptr [rsi+8], 0 mov rax, [rsp+68h+var_68] xorps xmm0, xmm0 movups xmmword ptr [rsi+10h], xmm0 push 1 pop rcx lock xadd [rax+274h], ecx mov [rsi], ecx or dword ptr [rsi+4], 0FFFFFFFFh mov rdi, [rsp+68h+var_68] add rdi, 18h mov rdx, [rsp+68h+var_58] mov rcx, r14 call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE16try_dequeue_bulkIN9__gnu_cxx17__normal_iteratorIPS3_St6vectorIS3_SaIS3_EEEEEEmRNS_13ConsumerTokenET_m; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::try_dequeue_bulk<__gnu_cxx::__normal_iterator<emittra::Emittra::QueuedEvent*,std::vector<emittra::Emittra::QueuedEvent>>>(moodycamel::ConsumerToken &,__gnu_cxx::__normal_iterator<emittra::Emittra::QueuedEvent*,std::vector<emittra::Emittra::QueuedEvent>>,ulong) mov r14, rax mov rdi, rbx call _ZNSt6vectorIS_ISt3anySaIS0_EESaIS2_EE5clearEv; std::vector<std::vector<std::any>>::clear(void) mov rdi, rbx mov rsi, r14 call _ZNSt6vectorIS_ISt3anySaIS0_EESaIS2_EE7reserveEm; std::vector<std::vector<std::any>>::reserve(ulong) xor r15d, r15d mov r12, r14 loc_5B0F: sub r12, 1 jb short loc_5B2B mov rsi, [rsp+68h+var_58] add rsi, r15 mov rdi, rbx call _ZNSt6vectorIS_ISt3anySaIS0_EESaIS2_EE12emplace_backIJS2_EEERS2_DpOT_; std::vector<std::vector<std::any>>::emplace_back<std::vector<std::any>>(std::vector<std::any> &&) add r15, 28h ; '(' jmp short loc_5B0F loc_5B2B: lea rdi, [rsp+68h+var_58] call _ZNSt6vectorIN7emittra7Emittra11QueuedEventESaIS2_EED2Ev; std::vector<emittra::Emittra::QueuedEvent>::~vector() lea rdi, [rsp+68h+var_60] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rax, r14 add rsp, 48h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax jmp short loc_5B62 jmp short $+2 loc_5B55: mov rbx, rax lea rdi, [rsp+arg_8] call _ZNSt6vectorIN7emittra7Emittra11QueuedEventESaIS2_EED2Ev; std::vector<emittra::Emittra::QueuedEvent>::~vector() loc_5B62: lea rdi, [rsp+arg_0] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, rbx call __Unwind_Resume
long long emittra::Emittra::try_dequeue_bulk( std::__shared_mutex_pthread *a1, long long a2, long long a3, long long a4) { long long v6; // r14 long long v7; // r15 long long v8; // r12 long long v11; // [rsp+0h] [rbp-68h] BYREF long long v12; // [rsp+8h] [rbp-60h] BYREF _QWORD v13[3]; // [rsp+10h] [rbp-58h] BYREF _DWORD v14[4]; // [rsp+28h] [rbp-40h] BYREF __int128 v15; // [rsp+38h] [rbp-30h] emittra::Emittra::get_or_create_event_data((long long)&v11, a1, a2); std::vector<emittra::Emittra::QueuedEvent>::vector(v13, a4, v14); v14[2] = 0; v15 = 0LL; v14[0] = _InterlockedExchangeAdd((volatile signed __int32 *)(v11 + 628), 1u); v14[1] = -1; v6 = moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::try_dequeue_bulk<__gnu_cxx::__normal_iterator<emittra::Emittra::QueuedEvent*,std::vector<emittra::Emittra::QueuedEvent>>>( v11 + 24, v14, v13[0], a4); std::vector<std::vector<std::any>>::clear(a3); std::vector<std::vector<std::any>>::reserve(a3, v6); v7 = 0LL; v8 = v6; while ( v8-- != 0 ) { std::vector<std::vector<std::any>>::emplace_back<std::vector<std::any>>(a3, v7 + v13[0]); v7 += 40LL; } std::vector<emittra::Emittra::QueuedEvent>::~vector(v13); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v12); return v6; }
try_dequeue_bulk: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R14,RCX MOV RBX,RDX MOV RDX,RSI MOV RSI,RDI MOV RDI,RSP CALL 0x00104932 LAB_00105aa7: LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0x28] MOV RSI,R14 CALL 0x001061e4 LEA RSI,[RSP + 0x28] AND dword ptr [RSI + 0x8],0x0 MOV RAX,qword ptr [RSP] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI + 0x10],XMM0 PUSH 0x1 POP RCX XADD.LOCK dword ptr [RAX + 0x274],ECX MOV dword ptr [RSI],ECX OR dword ptr [RSI + 0x4],0xffffffff MOV RDI,qword ptr [RSP] ADD RDI,0x18 MOV RDX,qword ptr [RSP + 0x10] LAB_00105aeb: MOV RCX,R14 CALL 0x00106236 MOV R14,RAX MOV RDI,RBX CALL 0x0010632e MOV RDI,RBX MOV RSI,R14 CALL 0x00106336 XOR R15D,R15D MOV R12,R14 LAB_00105b0f: SUB R12,0x1 JC 0x00105b2b MOV RSI,qword ptr [RSP + 0x10] ADD RSI,R15 LAB_00105b1d: MOV RDI,RBX CALL 0x001098c8 LAB_00105b25: ADD R15,0x28 JMP 0x00105b0f LAB_00105b2b: LEA RDI,[RSP + 0x10] CALL 0x001061c2 LEA RDI,[RSP + 0x8] CALL 0x00103f84 MOV RAX,R14 ADD RSP,0x48 POP RBX POP R12 POP R14 POP R15 RET
/* emittra::Emittra::try_dequeue_bulk(std::__cxx11::string const&, std::vector<std::vector<std::any, std::allocator<std::any> >, std::allocator<std::vector<std::any, std::allocator<std::any> > > >&, unsigned long) */ ulong __thiscall emittra::Emittra::try_dequeue_bulk(Emittra *this,string *param_1,vector *param_2,ulong param_3) { int *piVar1; ulong uVar2; ulong uVar3; long lVar4; bool bVar5; long local_68; __shared_count<(__gnu_cxx::_Lock_policy)2> local_60 [8]; long local_58 [3]; int local_40 [4]; int8 local_30; int8 uStack_28; get_or_create_event_data((string *)&local_68); /* try { // try from 00105aa7 to 00105ab8 has its CatchHandler @ 00105b4e */ std::vector<emittra::Emittra::QueuedEvent,std::allocator<emittra::Emittra::QueuedEvent>>::vector ((vector<emittra::Emittra::QueuedEvent,std::allocator<emittra::Emittra::QueuedEvent>> *) local_58,param_3,(allocator *)local_40); local_40[2] = 0; local_30 = 0; uStack_28 = 0; LOCK(); piVar1 = (int *)(local_68 + 0x274); local_40[0] = *piVar1; *piVar1 = *piVar1 + 1; UNLOCK(); local_40[1] = 0xffffffff; /* try { // try from 00105aeb to 00105b08 has its CatchHandler @ 00105b53 */ uVar2 = moodycamel:: ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>:: try_dequeue_bulk<__gnu_cxx::__normal_iterator<emittra::Emittra::QueuedEvent*,std::vector<emittra::Emittra::QueuedEvent,std::allocator<emittra::Emittra::QueuedEvent>>>> ((ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits> *)(local_68 + 0x18),local_40,local_58[0],param_3); std:: vector<std::vector<std::any,std::allocator<std::any>>,std::allocator<std::vector<std::any,std::allocator<std::any>>>> ::clear((vector<std::vector<std::any,std::allocator<std::any>>,std::allocator<std::vector<std::any,std::allocator<std::any>>>> *)param_2); std:: vector<std::vector<std::any,std::allocator<std::any>>,std::allocator<std::vector<std::any,std::allocator<std::any>>>> ::reserve((vector<std::vector<std::any,std::allocator<std::any>>,std::allocator<std::vector<std::any,std::allocator<std::any>>>> *)param_2,uVar2); lVar4 = 0; uVar3 = uVar2; while (bVar5 = uVar3 != 0, uVar3 = uVar3 - 1, bVar5) { /* try { // try from 00105b1d to 00105b24 has its CatchHandler @ 00105b55 */ std:: vector<std::vector<std::any,std::allocator<std::any>>,std::allocator<std::vector<std::any,std::allocator<std::any>>>> ::emplace_back<std::vector<std::any,std::allocator<std::any>>> ((vector<std::vector<std::any,std::allocator<std::any>>,std::allocator<std::vector<std::any,std::allocator<std::any>>>> *)param_2,(vector *)(local_58[0] + lVar4)); lVar4 = lVar4 + 0x28; } std::vector<emittra::Emittra::QueuedEvent,std::allocator<emittra::Emittra::QueuedEvent>>::~vector ((vector<emittra::Emittra::QueuedEvent,std::allocator<emittra::Emittra::QueuedEvent>> *) local_58); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_60); return uVar2; }
10,322
emittra::Emittra::try_dequeue_bulk(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::vector<std::any, std::allocator<std::any>>, std::allocator<std::vector<std::any, std::allocator<std::any>>>>&, unsigned long)
angrymouse[P]emittra/src/emittra.cpp
size_t Emittra::try_dequeue_bulk(const std::string& event_name, std::vector<std::vector<std::any>>& bulk_args, size_t max_items) { auto event_data = get_or_create_event_data(event_name); std::vector<QueuedEvent> events(max_items); moodycamel::ConsumerToken token(event_data->event_queue); size_t dequeued = event_data->event_queue.try_dequeue_bulk(token, events.begin(), max_items); bulk_args.clear(); bulk_args.reserve(dequeued); for (size_t i = 0; i < dequeued; ++i) { bulk_args.push_back(std::move(events[i].args)); } return dequeued; }
O3
cpp
emittra::Emittra::try_dequeue_bulk(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::vector<std::any, std::allocator<std::any>>, std::allocator<std::vector<std::any, std::allocator<std::any>>>>&, unsigned long): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x50, %rsp movq %rcx, %r14 movq %rdx, %rbx movq %rsi, %rdx movq %rdi, %rsi leaq 0x8(%rsp), %rdi callq 0x4c28 leaq 0x18(%rsp), %rdi leaq 0x30(%rsp), %rdx movq %r14, %rsi callq 0x6a86 movq 0x8(%rsp), %rax leaq 0x30(%rsp), %rsi movl $0x0, 0x8(%rsi) xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rsi) movl $0x1, %ecx lock xaddl %ecx, 0x274(%rax) movl %ecx, (%rsi) movl $0xffffffff, 0x4(%rsi) # imm = 0xFFFFFFFF movq 0x8(%rsp), %rdi addq $0x18, %rdi movq 0x18(%rsp), %rdx movq %r14, %rcx callq 0x6b04 movq %rax, %r14 movq (%rbx), %r12 movq 0x8(%rbx), %r13 cmpq %r12, %r13 je 0x61e2 movq %r12, %r15 movq %r15, %rdi callq 0x46e8 addq $0x18, %r15 cmpq %r13, %r15 jne 0x61cd movq %r12, 0x8(%rbx) movq %rbx, %rdi movq %r14, %rsi callq 0x6ce8 testq %r14, %r14 je 0x6211 xorl %r15d, %r15d movq %r14, %r12 movq 0x18(%rsp), %rsi addq %r15, %rsi movq %rbx, %rdi callq 0xa76c addq $0x28, %r15 decq %r12 jne 0x61f8 leaq 0x18(%rsp), %rdi callq 0x6a56 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x622a callq 0x4334 movq %r14, %rax addq $0x50, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %rbx jmp 0x624f jmp 0x6242 movq %rax, %rbx leaq 0x18(%rsp), %rdi callq 0x6a56 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x625e callq 0x4334 movq %rbx, %rdi callq 0x3450
_ZN7emittra7Emittra16try_dequeue_bulkERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIS9_ISt3anySaISA_EESaISC_EEm: push r15 push r14 push r13 push r12 push rbx sub rsp, 50h mov r14, rcx mov rbx, rdx mov rdx, rsi mov rsi, rdi lea rdi, [rsp+78h+var_70] call _ZN7emittra7Emittra24get_or_create_event_dataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; emittra::Emittra::get_or_create_event_data(std::string const&) lea rdi, [rsp+78h+var_60] lea rdx, [rsp+78h+var_48] mov rsi, r14 call _ZNSt6vectorIN7emittra7Emittra11QueuedEventESaIS2_EEC2EmRKS3_; std::vector<emittra::Emittra::QueuedEvent>::vector(ulong,std::allocator<emittra::Emittra::QueuedEvent> const&) mov rax, [rsp+78h+var_70] lea rsi, [rsp+78h+var_48] mov dword ptr [rsi+8], 0 xorps xmm0, xmm0 movups xmmword ptr [rsi+10h], xmm0 mov ecx, 1 lock xadd [rax+274h], ecx mov [rsi], ecx mov dword ptr [rsi+4], 0FFFFFFFFh mov rdi, [rsp+78h+var_70] add rdi, 18h mov rdx, [rsp+78h+var_60] mov rcx, r14 call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE16try_dequeue_bulkIN9__gnu_cxx17__normal_iteratorIPS3_St6vectorIS3_SaIS3_EEEEEEmRNS_13ConsumerTokenET_m; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::try_dequeue_bulk<__gnu_cxx::__normal_iterator<emittra::Emittra::QueuedEvent*,std::vector<emittra::Emittra::QueuedEvent>>>(moodycamel::ConsumerToken &,__gnu_cxx::__normal_iterator<emittra::Emittra::QueuedEvent*,std::vector<emittra::Emittra::QueuedEvent>>,ulong) mov r14, rax mov r12, [rbx] mov r13, [rbx+8] cmp r13, r12 jz short loc_61E2 mov r15, r12 loc_61CD: mov rdi, r15 call _ZNSt6vectorISt3anySaIS0_EED2Ev; std::vector<std::any>::~vector() add r15, 18h cmp r15, r13 jnz short loc_61CD mov [rbx+8], r12 loc_61E2: mov rdi, rbx mov rsi, r14 call _ZNSt6vectorIS_ISt3anySaIS0_EESaIS2_EE7reserveEm; std::vector<std::vector<std::any>>::reserve(ulong) test r14, r14 jz short loc_6211 xor r15d, r15d mov r12, r14 loc_61F8: mov rsi, [rsp+78h+var_60] add rsi, r15 mov rdi, rbx call _ZNSt6vectorIS_ISt3anySaIS0_EESaIS2_EE12emplace_backIJS2_EEERS2_DpOT_; std::vector<std::vector<std::any>>::emplace_back<std::vector<std::any>>(std::vector<std::any> &&) add r15, 28h ; '(' dec r12 jnz short loc_61F8 loc_6211: lea rdi, [rsp+78h+var_60] call _ZNSt6vectorIN7emittra7Emittra11QueuedEventESaIS2_EED2Ev; std::vector<emittra::Emittra::QueuedEvent>::~vector() mov rdi, [rsp+78h+var_68] test rdi, rdi jz short loc_622A call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_622A: mov rax, r14 add rsp, 50h pop rbx pop r12 pop r13 pop r14 pop r15 retn mov rbx, rax jmp short loc_624F jmp short $+2 loc_6242: mov rbx, rax lea rdi, [rsp+arg_10] call _ZNSt6vectorIN7emittra7Emittra11QueuedEventESaIS2_EED2Ev; std::vector<emittra::Emittra::QueuedEvent>::~vector() loc_624F: mov rdi, [rsp+arg_8] test rdi, rdi jz short loc_625E call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_625E: mov rdi, rbx call __Unwind_Resume
long long emittra::Emittra::try_dequeue_bulk( std::__shared_mutex_pthread *a1, long long a2, _QWORD *a3, long long a4) { long long v6; // r14 _QWORD *v7; // r12 _QWORD *v8; // r13 _QWORD *v9; // r15 long long v10; // r15 long long v11; // r12 long long v13; // [rsp+8h] [rbp-70h] BYREF volatile signed __int32 *v14; // [rsp+10h] [rbp-68h] _QWORD v15[3]; // [rsp+18h] [rbp-60h] BYREF _DWORD v16[4]; // [rsp+30h] [rbp-48h] BYREF __int128 v17; // [rsp+40h] [rbp-38h] emittra::Emittra::get_or_create_event_data(&v13, a1, a2); std::vector<emittra::Emittra::QueuedEvent>::vector(v15, a4, v16); v16[2] = 0; v17 = 0LL; v16[0] = _InterlockedExchangeAdd((volatile signed __int32 *)(v13 + 628), 1u); v16[1] = -1; v6 = moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::try_dequeue_bulk<__gnu_cxx::__normal_iterator<emittra::Emittra::QueuedEvent*,std::vector<emittra::Emittra::QueuedEvent>>>( v13 + 24, v16, v15[0], a4); v7 = (_QWORD *)*a3; v8 = (_QWORD *)a3[1]; if ( v8 != (_QWORD *)*a3 ) { v9 = (_QWORD *)*a3; do { std::vector<std::any>::~vector(v9); v9 += 3; } while ( v9 != v8 ); a3[1] = v7; } std::vector<std::vector<std::any>>::reserve(a3, v6); if ( v6 ) { v10 = 0LL; v11 = v6; do { std::vector<std::vector<std::any>>::emplace_back<std::vector<std::any>>(a3, v10 + v15[0]); v10 += 40LL; --v11; } while ( v11 ); } std::vector<emittra::Emittra::QueuedEvent>::~vector(v15); if ( v14 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14); return v6; }
try_dequeue_bulk: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x50 MOV R14,RCX MOV RBX,RDX MOV RDX,RSI MOV RSI,RDI LEA RDI,[RSP + 0x8] CALL 0x00104c28 LAB_00106165: LEA RDI,[RSP + 0x18] LEA RDX,[RSP + 0x30] MOV RSI,R14 CALL 0x00106a86 MOV RAX,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x30] MOV dword ptr [RSI + 0x8],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI + 0x10],XMM0 MOV ECX,0x1 XADD.LOCK dword ptr [RAX + 0x274],ECX MOV dword ptr [RSI],ECX MOV dword ptr [RSI + 0x4],0xffffffff MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x18 MOV RDX,qword ptr [RSP + 0x18] LAB_001061b3: MOV RCX,R14 CALL 0x00106b04 MOV R14,RAX MOV R12,qword ptr [RBX] MOV R13,qword ptr [RBX + 0x8] CMP R13,R12 JZ 0x001061e2 MOV R15,R12 LAB_001061cd: MOV RDI,R15 CALL 0x001046e8 ADD R15,0x18 CMP R15,R13 JNZ 0x001061cd MOV qword ptr [RBX + 0x8],R12 LAB_001061e2: MOV RDI,RBX MOV RSI,R14 CALL 0x00106ce8 TEST R14,R14 JZ 0x00106211 XOR R15D,R15D MOV R12,R14 LAB_001061f8: MOV RSI,qword ptr [RSP + 0x18] ADD RSI,R15 LAB_00106200: MOV RDI,RBX CALL 0x0010a76c LAB_00106208: ADD R15,0x28 DEC R12 JNZ 0x001061f8 LAB_00106211: LEA RDI,[RSP + 0x18] CALL 0x00106a56 MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x0010622a CALL 0x00104334 LAB_0010622a: MOV RAX,R14 ADD RSP,0x50 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* emittra::Emittra::try_dequeue_bulk(std::__cxx11::string const&, std::vector<std::vector<std::any, std::allocator<std::any> >, std::allocator<std::vector<std::any, std::allocator<std::any> > > >&, unsigned long) */ ulong __thiscall emittra::Emittra::try_dequeue_bulk(Emittra *this,string *param_1,vector *param_2,ulong param_3) { int *piVar1; vector<std::any,std::allocator<std::any>> *pvVar2; vector<std::any,std::allocator<std::any>> *pvVar3; ulong uVar4; ulong uVar5; vector<std::any,std::allocator<std::any>> *this_00; long lVar6; long local_70; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68; long local_60 [3]; int local_48 [4]; int8 local_38; int8 uStack_30; get_or_create_event_data((string *)&local_70); /* try { // try from 00106165 to 00106176 has its CatchHandler @ 0010623b */ std::vector<emittra::Emittra::QueuedEvent,std::allocator<emittra::Emittra::QueuedEvent>>::vector ((ulong)local_60,(allocator *)param_3); local_48[2] = 0; local_38 = 0; uStack_30 = 0; LOCK(); piVar1 = (int *)(local_70 + 0x274); local_48[0] = *piVar1; *piVar1 = *piVar1 + 1; UNLOCK(); local_48[1] = 0xffffffff; /* try { // try from 001061b3 to 001061ec has its CatchHandler @ 00106240 */ uVar4 = moodycamel:: ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>:: try_dequeue_bulk<__gnu_cxx::__normal_iterator<emittra::Emittra::QueuedEvent*,std::vector<emittra::Emittra::QueuedEvent,std::allocator<emittra::Emittra::QueuedEvent>>>> ((ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits> *)(local_70 + 0x18),local_48,local_60[0],param_3); pvVar2 = *(vector<std::any,std::allocator<std::any>> **)param_2; pvVar3 = *(vector<std::any,std::allocator<std::any>> **)(param_2 + 8); this_00 = pvVar2; if (pvVar3 != pvVar2) { do { std::vector<std::any,std::allocator<std::any>>::~vector(this_00); this_00 = this_00 + 0x18; } while (this_00 != pvVar3); *(vector<std::any,std::allocator<std::any>> **)(param_2 + 8) = pvVar2; } std:: vector<std::vector<std::any,std::allocator<std::any>>,std::allocator<std::vector<std::any,std::allocator<std::any>>>> ::reserve((vector<std::vector<std::any,std::allocator<std::any>>,std::allocator<std::vector<std::any,std::allocator<std::any>>>> *)param_2,uVar4); if (uVar4 != 0) { lVar6 = 0; uVar5 = uVar4; do { /* try { // try from 00106200 to 00106207 has its CatchHandler @ 00106242 */ std:: vector<std::vector<std::any,std::allocator<std::any>>,std::allocator<std::vector<std::any,std::allocator<std::any>>>> ::emplace_back<std::vector<std::any,std::allocator<std::any>>> ((vector<std::vector<std::any,std::allocator<std::any>>,std::allocator<std::vector<std::any,std::allocator<std::any>>>> *)param_2,(vector *)(local_60[0] + lVar6)); lVar6 = lVar6 + 0x28; uVar5 = uVar5 - 1; } while (uVar5 != 0); } std::vector<emittra::Emittra::QueuedEvent,std::allocator<emittra::Emittra::QueuedEvent>>::~vector ((vector<emittra::Emittra::QueuedEvent,std::allocator<emittra::Emittra::QueuedEvent>> *) local_60); if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68); } return uVar4; }
10,323
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)
monkey531[P]llama/common/json.hpp
static ReferenceType get_ref_impl(ThisType& obj) { // delegate the call to get_ptr<>() auto* ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>(); if (JSON_HEDLEY_LIKELY(ptr != nullptr)) { return *ptr; } JSON_THROW(type_error::create(303, detail::concat("incompatible ReferenceType for get_ref, actual type is ", obj.type_name()), &obj)); }
O1
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x3, (%rdi) jne 0x7d43a movq 0x8(%r14), %rax testq %rax, %rax je 0x7d43a addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x20, %edi callq 0x18350 movq %rax, %rbx movq %r14, %rdi callq 0x3e11c leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x30a5e(%rip), %rsi # 0xadebc leaq 0x10(%rsp), %rdi callq 0x7630b movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12f, %esi # imm = 0x12F movq %r14, %rcx callq 0x4a102 xorl %ebp, %ebp leaq 0x5ee3f(%rip), %rsi # 0xdc2c8 leaq -0x30d0c(%rip), %rdx # 0x4c784 movq %rbx, %rdi callq 0x18b30 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x7d4be movq 0x20(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x7d4be movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x7d4cb movq %rbx, %rdi callq 0x184f0 movq %r14, %rdi callq 0x18ba0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12get_ref_implIRS9_SD_EET_RT0_: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 3 jnz short loc_7D43A mov rax, [r14+8] test rax, rax jz short loc_7D43A add rsp, 30h pop rbx pop r14 pop rbp retn loc_7D43A: 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, aIncompatibleRe; "incompatible ReferenceType for get_ref,"... lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA56_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>(char const(&)[56],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Fh; 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_7D4BE mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_7D4BE mov r14, rax mov bpl, 1 loc_7D4BE: test bpl, bpl jz short loc_7D4CB mov rdi, rbx; void * call ___cxa_free_exception loc_7D4CB: 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>::get_ref_impl<std::string&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( long long a1) { long long result; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx const char *v3; // [rsp+8h] [rbp-40h] BYREF _QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 3 || (result = *(_QWORD *)(a1 + 8)) == 0 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v3 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>( (long long)v4, (long long)"incompatible ReferenceType for get_ref, actual type is ", &v3); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 303, v4); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return result; }
get_ref_impl<std::__cxx11::string&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x3 JNZ 0x0017d43a MOV RAX,qword ptr [R14 + 0x8] TEST RAX,RAX JZ 0x0017d43a ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_0017d43a: MOV EDI,0x20 CALL 0x00118350 MOV RBX,RAX MOV RDI,R14 CALL 0x0013e11c LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0017d457: LEA RSI,[0x1adebc] LEA RDI,[RSP + 0x10] CALL 0x0017630b MOV BPL,0x1 LAB_0017d46b: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12f MOV RCX,R14 CALL 0x0014a102 XOR EBP,EBP LEA RSI,[0x1dc2c8] LEA RDX,[0x14c784] MOV RDI,RBX CALL 0x00118b30
/* std::__cxx11::string& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::get_ref_impl<std::__cxx11::string&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&) */ string * nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> :: get_ref_impl<std::__cxx11::string&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (basic_json *param_1) { int8 uVar1; char *local_40; detail local_38 [32]; if ((*param_1 == (basic_json)0x3) && (*(string **)(param_1 + 8) != (string *)0x0)) { return *(string **)(param_1 + 8); } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)param_1); /* try { // try from 0017d457 to 0017d467 has its CatchHandler @ 0017d4b8 */ detail::concat<std::__cxx11::string,char_const(&)[56],char_const*> (local_38,"incompatible ReferenceType for get_ref, actual type is ",&local_40); /* try { // try from 0017d46b to 0017d497 has its CatchHandler @ 0017d498 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar1,0x12f,local_38,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); }
10,324
find_or_create_digest(PFS_thread*, sql_digest_storage const*, char const*, unsigned int)
eloqsql/storage/perfschema/pfs_digest.cc
PFS_statement_stat* find_or_create_digest(PFS_thread *thread, const sql_digest_storage *digest_storage, const char *schema_name, uint schema_name_length) { assert(digest_storage != NULL); if (statements_digest_stat_array == NULL) return NULL; if (digest_storage->m_byte_count <= 0) return NULL; LF_PINS *pins= get_digest_hash_pins(thread); if (unlikely(pins == NULL)) return NULL; /* Note: the LF_HASH key is a block of memory, make sure to clean unused bytes, so that memcmp() can compare keys. */ PFS_digest_key hash_key; memset(& hash_key, 0, sizeof(hash_key)); /* Compute MD5 Hash of the tokens received. */ compute_digest_md5(digest_storage, hash_key.m_md5); memcpy((void*)& digest_storage->m_md5, &hash_key.m_md5, MD5_HASH_SIZE); /* Add the current schema to the key */ hash_key.m_schema_name_length= schema_name_length; if (schema_name_length > 0) memcpy(hash_key.m_schema_name, schema_name, schema_name_length); int res; uint retry_count= 0; const uint retry_max= 3; size_t safe_index; size_t attempts= 0; PFS_statements_digest_stat **entry; PFS_statements_digest_stat *pfs= NULL; pfs_dirty_state dirty_state; ulonglong now= my_hrtime().val; search: /* Lookup LF_HASH using this new key. */ entry= reinterpret_cast<PFS_statements_digest_stat**> (lf_hash_search(&digest_hash, pins, &hash_key, sizeof(PFS_digest_key))); if (entry && (entry != MY_ERRPTR)) { /* If digest already exists, update stats and return. */ pfs= *entry; pfs->m_last_seen= now; lf_hash_search_unpin(pins); return & pfs->m_stat; } lf_hash_search_unpin(pins); if (digest_full) { /* digest_stat array is full. Add stat at index 0 and return. */ pfs= &statements_digest_stat_array[0]; digest_lost++; if (pfs->m_first_seen == 0) pfs->m_first_seen= now; pfs->m_last_seen= now; return & pfs->m_stat; } while (++attempts <= digest_max) { safe_index= PFS_atomic::add_u32(& digest_monotonic_index.m_u32, 1) % digest_max; if (safe_index == 0) { /* Record [0] is reserved. */ continue; } /* Add a new record in digest stat array. */ assert(safe_index < digest_max); pfs= &statements_digest_stat_array[safe_index]; if (pfs->m_lock.is_free()) { if (pfs->m_lock.free_to_dirty(& dirty_state)) { /* Copy digest hash/LF Hash search key. */ memcpy(& pfs->m_digest_key, &hash_key, sizeof(PFS_digest_key)); /* Copy digest storage to statement_digest_stat_array so that it could be used later to generate digest text. */ pfs->m_digest_storage.copy(digest_storage); pfs->m_first_seen= now; pfs->m_last_seen= now; res= lf_hash_insert(&digest_hash, pins, &pfs); if (likely(res == 0)) { pfs->m_lock.dirty_to_allocated(& dirty_state); return & pfs->m_stat; } pfs->m_lock.dirty_to_free(& dirty_state); if (res > 0) { /* Duplicate insert by another thread */ if (++retry_count > retry_max) { /* Avoid infinite loops */ digest_lost++; return NULL; } goto search; } /* OOM in lf_hash_insert */ digest_lost++; return NULL; } } } /* The digest array is now full. */ digest_full= true; pfs= &statements_digest_stat_array[0]; if (pfs->m_first_seen == 0) pfs->m_first_seen= now; pfs->m_last_seen= now; return & pfs->m_stat; }
O3
cpp
find_or_create_digest(PFS_thread*, sql_digest_storage const*, char const*, unsigned int): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x108, %rsp # imm = 0x108 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) cmpq $0x0, 0x38f951(%rip) # 0x3d0390 je 0x40d35 movq %rsi, %rbx cmpl $0x0, 0x4(%rsi) je 0x40d35 movl %ecx, %r12d movq %rdx, %r15 movq %rdi, %r13 movq 0x840(%rdi), %r14 testq %r14, %r14 je 0x40d14 leaq -0x104(%rbp), %r13 movl $0xd4, %edx movq %r13, %rdi xorl %esi, %esi callq 0x261c0 movq %rbx, %rdi movq %r13, %rsi callq 0x4da2c movups (%r13), %xmm0 movups %xmm0, 0x8(%rbx) movl %r12d, 0xd0(%r13) testl %r12d, %r12d je 0x40ab8 leaq -0xf4(%rbp), %rdi movl %r12d, %edx movl $0xc4, %ecx movq %r15, %rsi callq 0x265f0 leaq 0x8(%rbx), %r15 leaq -0x110(%rbp), %rax movq $0x0, (%rax) callq 0x44dc0 movq %rax, %r13 leaq 0x38f92f(%rip), %rdi # 0x3d0408 leaq -0x104(%rbp), %rdx xorl %r12d, %r12d movl $0x0, -0x114(%rbp) movq %r14, %rsi movl $0xd4, %ecx callq 0x2c462 cmpq $0x2, %rax jae 0x40cd3 xorl %eax, %eax xchgq %rax, 0x10(%r14) cmpb $0x0, 0x38f8ef(%rip) # 0x3d0400 jne 0x40cec movq %r14, -0x128(%rbp) movq %r13, %r14 incq %r12 cmpq 0x38f855(%rip), %r12 # 0x3d0380 ja 0x40c90 movl $0x1, %eax lock xaddl %eax, 0x38f882(%rip) # 0x3d03c0 xorl %edx, %edx divq 0x38f839(%rip) # 0x3d0380 testq %rdx, %rdx je 0x40b21 movq 0x38f83d(%rip), %rax # 0x3d0390 shlq $0x9, %rdx leaq (%rax,%rdx), %rcx movq %rcx, -0x110(%rbp) movl (%rax,%rdx), %eax testb $0x3, %al jne 0x40b21 movq -0x110(%rbp), %rcx movl (%rcx), %r13d testb $0x3, %r13b jne 0x40b21 movl %r13d, %edx orl $0x1, %edx movl %r13d, %eax lock cmpxchgl %edx, (%rcx) jne 0x40b21 movq -0x110(%rbp), %rax movq %rax, -0x120(%rbp) leaq 0x4(%rax), %rdi movl $0xd4, %edx leaq -0x104(%rbp), %rsi callq 0x26290 movq -0x120(%rbp), %rdx movl 0x100(%rdx), %ecx movl 0x4(%rbx), %eax cmpl %eax, %ecx cmovbl %ecx, %eax testl %eax, %eax je 0x40c08 movb (%rbx), %cl movb %cl, 0xd8(%rdx) movl %eax, 0xdc(%rdx) movl 0x18(%rbx), %ecx movl %ecx, 0xf0(%rdx) movq 0xf8(%rdx), %rdi movq 0x20(%rbx), %rsi movl %eax, %edx callq 0x26290 movups (%r15), %xmm0 movq -0x120(%rbp), %rax movups %xmm0, 0xe0(%rax) movq -0x110(%rbp), %rdx jmp 0x40c1d movb $0x0, 0xd8(%rdx) xorl %eax, %eax movl %eax, 0xdc(%rdx) movl %eax, 0xf0(%rdx) movq %r14, 0x1c0(%rdx) movq %r14, 0x1c8(%rdx) leaq 0x38f7d6(%rip), %rdi # 0x3d0408 movq -0x128(%rbp), %rsi leaq -0x110(%rbp), %rdx callq 0x2bc03 movq -0x110(%rbp), %rcx testl %eax, %eax je 0x40cbe xchgl %r13d, (%rcx) jle 0x40c84 movl -0x114(%rbp), %eax incl %eax movl %eax, -0x114(%rbp) cmpl $0x4, %eax movq %r14, %r13 movq -0x128(%rbp), %r14 leaq 0x38f791(%rip), %rdi # 0x3d0408 leaq -0x104(%rbp), %rdx jne 0x40aed incq 0x38f6fd(%rip) # 0x3d0388 jmp 0x40d35 movb $0x1, 0x38f769(%rip) # 0x3d0400 movq 0x38f6f2(%rip), %rax # 0x3d0390 cmpq $0x0, 0x1c0(%rax) jne 0x40caf movq %r14, 0x1c0(%rax) movq %r14, 0x1c8(%rax) addq $0x108, %rax # imm = 0x108 jmp 0x40d37 addl $0x6, %r13d xchgl %r13d, (%rcx) movl $0x108, %eax # imm = 0x108 addq -0x110(%rbp), %rax jmp 0x40d37 movq (%rax), %rax movq %rax, -0x110(%rbp) movq %r13, 0x1c8(%rax) xorl %ecx, %ecx xchgq %rcx, 0x10(%r14) jmp 0x40cb6 incq 0x38f695(%rip) # 0x3d0388 movq 0x38f696(%rip), %rax # 0x3d0390 cmpq $0x0, 0x1c0(%rax) jne 0x40d0b movq %r13, 0x1c0(%rax) movq %r13, 0x1c8(%rax) jmp 0x40cb6 cmpb $0x1, 0x38f7bd(%rip) # 0x3d04d8 jne 0x40d35 leaq 0x38f70c(%rip), %rdi # 0x3d0430 callq 0x2ba28 movq %rax, 0x840(%r13) testq %rax, %rax jne 0x40d5d xorl %eax, %eax movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x40d58 addq $0x108, %rsp # imm = 0x108 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x263a0 movq %rax, %r14 jmp 0x40a6b
_Z21find_or_create_digestP10PFS_threadPK18sql_digest_storagePKcj: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 108h mov rax, fs:28h mov [rbp+var_30], rax cmp cs:statements_digest_stat_array, 0 jz loc_40D35 mov rbx, rsi cmp dword ptr [rsi+4], 0 jz loc_40D35 mov r12d, ecx mov r15, rdx mov r13, rdi mov r14, [rdi+840h] test r14, r14 jz loc_40D14 loc_40A6B: lea r13, [rbp+var_104] mov edx, 0D4h mov rdi, r13 xor esi, esi call _memset mov rdi, rbx mov rsi, r13 call _Z18compute_digest_md5PK18sql_digest_storagePh; compute_digest_md5(sql_digest_storage const*,uchar *) movups xmm0, xmmword ptr [r13+0] movups xmmword ptr [rbx+8], xmm0 mov [r13+0D0h], r12d test r12d, r12d jz short loc_40AB8 lea rdi, [rbp+var_F4] mov edx, r12d mov ecx, 0C4h mov rsi, r15 call ___memcpy_chk loc_40AB8: lea r15, [rbx+8] lea rax, [rbp+var_110] mov qword ptr [rax], 0 call my_hrtime mov r13, rax lea rdi, digest_hash lea rdx, [rbp+var_104] xor r12d, r12d mov [rbp+var_114], 0 loc_40AED: mov rsi, r14 mov ecx, 0D4h call lf_hash_search cmp rax, 2 jnb loc_40CD3 xor eax, eax xchg rax, [r14+10h] cmp cs:digest_full, 0 jnz loc_40CEC mov [rbp+var_128], r14 mov r14, r13 loc_40B21: inc r12 cmp r12, cs:digest_max ja loc_40C90 mov eax, 1 lock xadd cs:_ZL22digest_monotonic_index, eax; digest_monotonic_index xor edx, edx div cs:digest_max test rdx, rdx jz short loc_40B21 mov rax, cs:statements_digest_stat_array shl rdx, 9 lea rcx, [rax+rdx] mov [rbp+var_110], rcx mov eax, [rax+rdx] test al, 3 jnz short loc_40B21 mov rcx, [rbp+var_110] mov r13d, [rcx] test r13b, 3 jnz short loc_40B21 mov edx, r13d or edx, 1 mov eax, r13d lock cmpxchg [rcx], edx jnz short loc_40B21 mov rax, [rbp+var_110] mov [rbp+var_120], rax lea rdi, [rax+4] mov edx, 0D4h lea rsi, [rbp+var_104] call _memcpy mov rdx, [rbp+var_120] mov ecx, [rdx+100h] mov eax, [rbx+4] cmp ecx, eax cmovb eax, ecx test eax, eax jz short loc_40C08 mov cl, [rbx] mov [rdx+0D8h], cl mov [rdx+0DCh], eax mov ecx, [rbx+18h] mov [rdx+0F0h], ecx mov rdi, [rdx+0F8h] mov rsi, [rbx+20h] mov edx, eax call _memcpy movups xmm0, xmmword ptr [r15] mov rax, [rbp+var_120] movups xmmword ptr [rax+0E0h], xmm0 mov rdx, [rbp+var_110] jmp short loc_40C1D loc_40C08: mov byte ptr [rdx+0D8h], 0 xor eax, eax mov [rdx+0DCh], eax mov [rdx+0F0h], eax loc_40C1D: mov [rdx+1C0h], r14 mov [rdx+1C8h], r14 lea rdi, digest_hash mov rsi, [rbp+var_128] lea rdx, [rbp+var_110] call lf_hash_insert mov rcx, [rbp+var_110] test eax, eax jz short loc_40CBE xchg r13d, [rcx] jle short loc_40C84 mov eax, [rbp+var_114] inc eax mov [rbp+var_114], eax cmp eax, 4 mov r13, r14 mov r14, [rbp+var_128] lea rdi, digest_hash lea rdx, [rbp+var_104] jnz loc_40AED loc_40C84: inc cs:digest_lost jmp loc_40D35 loc_40C90: mov cs:digest_full, 1 mov rax, cs:statements_digest_stat_array cmp qword ptr [rax+1C0h], 0 jnz short loc_40CAF mov [rax+1C0h], r14 loc_40CAF: mov [rax+1C8h], r14 loc_40CB6: add rax, 108h jmp short loc_40D37 loc_40CBE: add r13d, 6 xchg r13d, [rcx] mov eax, 108h add rax, [rbp+var_110] jmp short loc_40D37 loc_40CD3: mov rax, [rax] mov [rbp+var_110], rax mov [rax+1C8h], r13 xor ecx, ecx xchg rcx, [r14+10h] jmp short loc_40CB6 loc_40CEC: inc cs:digest_lost mov rax, cs:statements_digest_stat_array cmp qword ptr [rax+1C0h], 0 jnz short loc_40D0B mov [rax+1C0h], r13 loc_40D0B: mov [rax+1C8h], r13 jmp short loc_40CB6 loc_40D14: cmp cs:_ZL18digest_hash_inited, 1; digest_hash_inited jnz short loc_40D35 lea rdi, unk_3D0430 call lf_pinbox_get_pins mov [r13+840h], rax test rax, rax jnz short loc_40D5D loc_40D35: xor eax, eax loc_40D37: mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz short loc_40D58 add rsp, 108h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_40D58: call ___stack_chk_fail loc_40D5D: mov r14, rax jmp loc_40A6B
volatile __int32 * find_or_create_digest(long long a1, long long a2, long long a3, unsigned int a4) { volatile long long *v6; // r14 long long v7; // r13 long long v8; // r12 long long *v9; // rax long long v10; // r14 unsigned long long v11; // rdx signed __int32 v12; // r13d volatile __int32 *v13; // rdx unsigned int v14; // eax int v15; // eax long long v16; // rax long long pins; // rax long long v19; // [rsp+8h] [rbp-128h] volatile __int32 *v20; // [rsp+10h] [rbp-120h] int v21; // [rsp+1Ch] [rbp-114h] volatile __int32 *v22; // [rsp+20h] [rbp-110h] BYREF __int128 v23; // [rsp+2Ch] [rbp-104h] BYREF _BYTE v24[192]; // [rsp+3Ch] [rbp-F4h] BYREF unsigned int v25; // [rsp+FCh] [rbp-34h] unsigned long long v26; // [rsp+100h] [rbp-30h] v26 = __readfsqword(0x28u); if ( !statements_digest_stat_array || !*(_DWORD *)(a2 + 4) ) return 0LL; v6 = *(volatile long long **)(a1 + 2112); if ( v6 ) goto LABEL_4; if ( digest_hash_inited != 1 ) return 0LL; pins = lf_pinbox_get_pins((long long)&unk_3D0430); *(_QWORD *)(a1 + 2112) = pins; if ( !pins ) return 0LL; v6 = (volatile long long *)pins; LABEL_4: memset(&v23, 0LL, 212LL); compute_digest_md5(a2, &v23); *(_OWORD *)(a2 + 8) = v23; v25 = a4; if ( a4 ) __memcpy_chk(v24, a3, a4, 196LL); v22 = 0LL; v7 = my_hrtime(); v8 = 0LL; v21 = 0; while ( 1 ) { v9 = (long long *)lf_hash_search((long long)&digest_hash, v6, (long long)&v23, 0xD4u); if ( (unsigned long long)v9 >= 2 ) { v16 = *v9; v22 = (volatile __int32 *)v16; *(_QWORD *)(v16 + 456) = v7; _InterlockedExchange64(v6 + 2, 0LL); return (volatile __int32 *)(v16 + 264); } _InterlockedExchange64(v6 + 2, 0LL); if ( digest_full ) break; v19 = (long long)v6; v10 = v7; while ( 1 ) { if ( ++v8 > (unsigned long long)digest_max ) { digest_full = 1; v16 = statements_digest_stat_array; if ( !*(_QWORD *)(statements_digest_stat_array + 448) ) *(_QWORD *)(statements_digest_stat_array + 448) = v10; *(_QWORD *)(v16 + 456) = v10; return (volatile __int32 *)(v16 + 264); } v11 = (unsigned int)_InterlockedExchangeAdd(&digest_monotonic_index, 1u) % (unsigned long long)digest_max; if ( v11 ) { v22 = (volatile __int32 *)(statements_digest_stat_array + (v11 << 9)); if ( (*v22 & 3) == 0 ) { v12 = *v22; if ( v12 == _InterlockedCompareExchange(v22, v12 | 1, v12) ) break; } } } v20 = v22; memcpy(v22 + 1, &v23, 212LL); v13 = v20; v14 = *(_DWORD *)(a2 + 4); if ( *((_DWORD *)v20 + 64) < v14 ) v14 = *((_DWORD *)v20 + 64); if ( v14 ) { *((_BYTE *)v20 + 216) = *(_BYTE *)a2; *((_DWORD *)v20 + 55) = v14; *((_DWORD *)v20 + 60) = *(_DWORD *)(a2 + 24); memcpy(*((_QWORD *)v20 + 31), *(_QWORD *)(a2 + 32), v14); *((_OWORD *)v20 + 14) = *(_OWORD *)(a2 + 8); v13 = v22; } else { *((_BYTE *)v20 + 216) = 0; *((_DWORD *)v20 + 55) = 0; *((_DWORD *)v20 + 60) = 0; } *((_QWORD *)v13 + 56) = v10; *((_QWORD *)v13 + 57) = v10; v15 = lf_hash_insert((long long)&digest_hash, v19, (long long)&v22); if ( !v15 ) { _InterlockedExchange(v22, v12 + 6); return v22 + 66; } _InterlockedExchange(v22, v12); if ( v15 > 0 ) { ++v21; v7 = v10; v6 = (volatile long long *)v19; if ( v21 != 4 ) continue; } ++digest_lost; return 0LL; } ++digest_lost; v16 = statements_digest_stat_array; if ( !*(_QWORD *)(statements_digest_stat_array + 448) ) *(_QWORD *)(statements_digest_stat_array + 448) = v7; *(_QWORD *)(v16 + 456) = v7; return (volatile __int32 *)(v16 + 264); }
find_or_create_digest: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x108 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [0x004d0390],0x0 JZ 0x00140d35 MOV RBX,RSI CMP dword ptr [RSI + 0x4],0x0 JZ 0x00140d35 MOV R12D,ECX MOV R15,RDX MOV R13,RDI MOV R14,qword ptr [RDI + 0x840] TEST R14,R14 JZ 0x00140d14 LAB_00140a6b: LEA R13,[RBP + -0x104] MOV EDX,0xd4 MOV RDI,R13 XOR ESI,ESI CALL 0x001261c0 MOV RDI,RBX MOV RSI,R13 CALL 0x0014da2c MOVUPS XMM0,xmmword ptr [R13] MOVUPS xmmword ptr [RBX + 0x8],XMM0 MOV dword ptr [R13 + 0xd0],R12D TEST R12D,R12D JZ 0x00140ab8 LEA RDI,[RBP + -0xf4] MOV EDX,R12D MOV ECX,0xc4 MOV RSI,R15 CALL 0x001265f0 LAB_00140ab8: LEA R15,[RBX + 0x8] LEA RAX,[RBP + -0x110] MOV qword ptr [RAX],0x0 CALL 0x00144dc0 MOV R13,RAX LEA RDI,[0x4d0408] LEA RDX,[RBP + -0x104] XOR R12D,R12D MOV dword ptr [RBP + -0x114],0x0 LAB_00140aed: MOV RSI,R14 MOV ECX,0xd4 CALL 0x0012c462 CMP RAX,0x2 JNC 0x00140cd3 XOR EAX,EAX XCHG qword ptr [R14 + 0x10],RAX CMP byte ptr [0x004d0400],0x0 JNZ 0x00140cec MOV qword ptr [RBP + -0x128],R14 MOV R14,R13 LAB_00140b21: INC R12 CMP R12,qword ptr [0x004d0380] JA 0x00140c90 MOV EAX,0x1 XADD.LOCK dword ptr [0x004d03c0],EAX XOR EDX,EDX DIV qword ptr [0x004d0380] TEST RDX,RDX JZ 0x00140b21 MOV RAX,qword ptr [0x004d0390] SHL RDX,0x9 LEA RCX,[RAX + RDX*0x1] MOV qword ptr [RBP + -0x110],RCX MOV EAX,dword ptr [RAX + RDX*0x1] TEST AL,0x3 JNZ 0x00140b21 MOV RCX,qword ptr [RBP + -0x110] MOV R13D,dword ptr [RCX] TEST R13B,0x3 JNZ 0x00140b21 MOV EDX,R13D OR EDX,0x1 MOV EAX,R13D CMPXCHG.LOCK dword ptr [RCX],EDX JNZ 0x00140b21 MOV RAX,qword ptr [RBP + -0x110] MOV qword ptr [RBP + -0x120],RAX LEA RDI,[RAX + 0x4] MOV EDX,0xd4 LEA RSI,[RBP + -0x104] CALL 0x00126290 MOV RDX,qword ptr [RBP + -0x120] MOV ECX,dword ptr [RDX + 0x100] MOV EAX,dword ptr [RBX + 0x4] CMP ECX,EAX CMOVC EAX,ECX TEST EAX,EAX JZ 0x00140c08 MOV CL,byte ptr [RBX] MOV byte ptr [RDX + 0xd8],CL MOV dword ptr [RDX + 0xdc],EAX MOV ECX,dword ptr [RBX + 0x18] MOV dword ptr [RDX + 0xf0],ECX MOV RDI,qword ptr [RDX + 0xf8] MOV RSI,qword ptr [RBX + 0x20] MOV EDX,EAX CALL 0x00126290 MOVUPS XMM0,xmmword ptr [R15] MOV RAX,qword ptr [RBP + -0x120] MOVUPS xmmword ptr [RAX + 0xe0],XMM0 MOV RDX,qword ptr [RBP + -0x110] JMP 0x00140c1d LAB_00140c08: MOV byte ptr [RDX + 0xd8],0x0 XOR EAX,EAX MOV dword ptr [RDX + 0xdc],EAX MOV dword ptr [RDX + 0xf0],EAX LAB_00140c1d: MOV qword ptr [RDX + 0x1c0],R14 MOV qword ptr [RDX + 0x1c8],R14 LEA RDI,[0x4d0408] MOV RSI,qword ptr [RBP + -0x128] LEA RDX,[RBP + -0x110] CALL 0x0012bc03 MOV RCX,qword ptr [RBP + -0x110] TEST EAX,EAX JZ 0x00140cbe XCHG dword ptr [RCX],R13D JLE 0x00140c84 MOV EAX,dword ptr [RBP + -0x114] INC EAX MOV dword ptr [RBP + -0x114],EAX CMP EAX,0x4 MOV R13,R14 MOV R14,qword ptr [RBP + -0x128] LEA RDI,[0x4d0408] LEA RDX,[RBP + -0x104] JNZ 0x00140aed LAB_00140c84: INC qword ptr [0x004d0388] JMP 0x00140d35 LAB_00140c90: MOV byte ptr [0x004d0400],0x1 MOV RAX,qword ptr [0x004d0390] CMP qword ptr [RAX + 0x1c0],0x0 JNZ 0x00140caf MOV qword ptr [RAX + 0x1c0],R14 LAB_00140caf: MOV qword ptr [RAX + 0x1c8],R14 LAB_00140cb6: ADD RAX,0x108 JMP 0x00140d37 LAB_00140cbe: ADD R13D,0x6 XCHG dword ptr [RCX],R13D MOV EAX,0x108 ADD RAX,qword ptr [RBP + -0x110] JMP 0x00140d37 LAB_00140cd3: MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x110],RAX MOV qword ptr [RAX + 0x1c8],R13 XOR ECX,ECX XCHG qword ptr [R14 + 0x10],RCX JMP 0x00140cb6 LAB_00140cec: INC qword ptr [0x004d0388] MOV RAX,qword ptr [0x004d0390] CMP qword ptr [RAX + 0x1c0],0x0 JNZ 0x00140d0b MOV qword ptr [RAX + 0x1c0],R13 LAB_00140d0b: MOV qword ptr [RAX + 0x1c8],R13 JMP 0x00140cb6 LAB_00140d14: CMP byte ptr [0x004d04d8],0x1 JNZ 0x00140d35 LEA RDI,[0x4d0430] CALL 0x0012ba28 MOV qword ptr [R13 + 0x840],RAX TEST RAX,RAX JNZ 0x00140d5d LAB_00140d35: XOR EAX,EAX LAB_00140d37: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x00140d58 ADD RSP,0x108 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00140d58: CALL 0x001263a0 LAB_00140d5d: MOV R14,RAX JMP 0x00140a6b
/* find_or_create_digest(PFS_thread*, sql_digest_storage const*, char const*, unsigned int) */ uint * find_or_create_digest (PFS_thread *param_1,sql_digest_storage *param_2,char *param_3,uint param_4) { uint uVar1; uint uVar2; uint uVar3; uint uVar4; int iVar5; int8 uVar6; int8 *puVar7; long lVar8; uint *puVar9; ulong uVar10; ulong uVar11; long in_FS_OFFSET; int local_11c; uint *local_118; int4 local_10c; int4 uStack_108; int4 uStack_104; int4 uStack_100; int1 local_fc [192]; uint local_3c; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); if ((statements_digest_stat_array == (uint *)0x0) || (*(int *)(param_2 + 4) == 0)) goto LAB_00140d35; lVar8 = *(long *)(param_1 + 0x840); if (lVar8 == 0) { if (digest_hash_inited != '\x01') goto LAB_00140d35; lVar8 = lf_pinbox_get_pins(0x4d0430); *(long *)(param_1 + 0x840) = lVar8; if (lVar8 == 0) goto LAB_00140d35; } memset(&local_10c,0,0xd4); compute_digest_md5(param_2,(uchar *)&local_10c); *(int4 *)(param_2 + 8) = local_10c; *(int4 *)(param_2 + 0xc) = uStack_108; *(int4 *)(param_2 + 0x10) = uStack_104; *(int4 *)(param_2 + 0x14) = uStack_100; local_3c = param_4; if (param_4 != 0) { __memcpy_chk(local_fc,param_3,param_4,0xc4); } local_118 = (uint *)0x0; uVar6 = my_hrtime(); uVar11 = 0; local_11c = 0; do { puVar7 = (int8 *)lf_hash_search(digest_hash,lVar8,&local_10c); if ((int8 *)0x1 < puVar7) { puVar9 = (uint *)*puVar7; *(int8 *)(puVar9 + 0x72) = uVar6; LOCK(); *(int8 *)(lVar8 + 0x10) = 0; UNLOCK(); local_118 = puVar9; LAB_00140cb6: puVar9 = puVar9 + 0x42; goto LAB_00140d37; } LOCK(); *(int8 *)(lVar8 + 0x10) = 0; puVar9 = statements_digest_stat_array; UNLOCK(); if (digest_full != '\0') { digest_lost = digest_lost + 1; if (*(long *)(statements_digest_stat_array + 0x70) == 0) { *(int8 *)(statements_digest_stat_array + 0x70) = uVar6; } *(int8 *)(puVar9 + 0x72) = uVar6; goto LAB_00140cb6; } do { do { puVar9 = statements_digest_stat_array; uVar11 = uVar11 + 1; if (digest_max < uVar11) { digest_full = '\x01'; if (*(long *)(statements_digest_stat_array + 0x70) == 0) { *(int8 *)(statements_digest_stat_array + 0x70) = uVar6; } *(int8 *)(puVar9 + 0x72) = uVar6; goto LAB_00140cb6; } LOCK(); uVar1 = digest_monotonic_index + 1; UNLOCK(); uVar10 = (ulong)digest_monotonic_index % digest_max; digest_monotonic_index = uVar1; } while (((uVar10 == 0) || (puVar9 = statements_digest_stat_array + uVar10 * 0x80, local_118 = puVar9, (statements_digest_stat_array[uVar10 * 0x80] & 3) != 0)) || (uVar1 = *puVar9, (uVar1 & 3) != 0)); LOCK(); uVar4 = *puVar9; if (uVar1 == uVar4) { *puVar9 = uVar1 | 1; } UNLOCK(); } while (uVar1 != uVar4); memcpy(puVar9 + 1,&local_10c,0xd4); uVar4 = *(uint *)(param_2 + 4); if (puVar9[0x40] < *(uint *)(param_2 + 4)) { uVar4 = puVar9[0x40]; } if (uVar4 == 0) { *(int1 *)(puVar9 + 0x36) = 0; puVar9[0x37] = 0; puVar9[0x3c] = 0; } else { *(sql_digest_storage *)(puVar9 + 0x36) = *param_2; puVar9[0x37] = uVar4; puVar9[0x3c] = *(uint *)(param_2 + 0x18); memcpy(*(void **)(puVar9 + 0x3e),*(void **)(param_2 + 0x20),(ulong)uVar4); uVar4 = *(uint *)(param_2 + 0xc); uVar2 = *(uint *)(param_2 + 0x10); uVar3 = *(uint *)(param_2 + 0x14); puVar9[0x38] = *(uint *)(param_2 + 8); puVar9[0x39] = uVar4; puVar9[0x3a] = uVar2; puVar9[0x3b] = uVar3; puVar9 = local_118; } *(int8 *)(puVar9 + 0x70) = uVar6; *(int8 *)(puVar9 + 0x72) = uVar6; iVar5 = lf_hash_insert(digest_hash,lVar8,&local_118); if (iVar5 == 0) { LOCK(); *local_118 = uVar1 + 6; UNLOCK(); puVar9 = local_118 + 0x42; goto LAB_00140d37; } LOCK(); *local_118 = uVar1; UNLOCK(); } while ((0 < iVar5) && (local_11c = local_11c + 1, local_11c != 4)); digest_lost = digest_lost + 1; LAB_00140d35: puVar9 = (uint *)0x0; LAB_00140d37: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return puVar9; }
10,325
get_one_option
eloqsql/storage/maria/aria_read_log.c
static my_bool get_one_option(const struct my_option *opt, const char *argument, const char *filename __attribute__((unused))) { switch (opt->id) { case '?': usage(); exit(0); case 'V': print_version(); exit(0); case 'E': opt_apply_undo= TRUE; break; case 'T': { char *pos; if (!my_hash_inited(&tables_to_redo)) { my_hash_init2(PSI_INSTRUMENT_ME, &tables_to_redo, 16, &my_charset_bin, 16, 0, 0, my_hash_get_string, 0, 0, HASH_UNIQUE); } do { pos= strcend(argument, ','); if (pos != argument) /* Skip empty strings */ my_hash_insert(&tables_to_redo, (uchar*) argument); argument= pos+1; } while (*(pos++)); break; } #ifndef DBUG_OFF case '#': DBUG_SET_INITIAL(argument ? argument : default_dbug_option); break; #endif } return 0; }
O0
c
get_one_option: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movl 0x8(%rax), %eax addl $-0x3f, %eax movl %eax, %ecx movq %rcx, -0x28(%rbp) subl $0x17, %eax ja 0x2b8d6 movq -0x28(%rbp), %rax leaq 0x151820(%rip), %rcx # 0x17d018 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax callq 0x2b950 xorl %edi, %edi callq 0x2a570 callq 0x2ba10 xorl %edi, %edi callq 0x2a570 movb $0x1, 0x4811d0(%rip) # 0x4ac9f0 jmp 0x2b8d6 leaq 0xc83ff4(%rip), %rax # 0xcaf820 cmpq $0x0, 0x10(%rax) jne 0x2b886 xorl %edi, %edi leaq 0xc83fe4(%rip), %rsi # 0xcaf820 movl $0x10, %edx leaq 0x2cd288(%rip), %rcx # 0x2f8ad0 movl $0x10, %r8d xorl %eax, %eax movl %eax, %r9d leaq 0x1e6(%rip), %rax # 0x2ba40 movq $0x0, (%rsp) movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) movq $0x0, 0x18(%rsp) movl $0x1, 0x20(%rsp) callq 0x103930 jmp 0x2b888 movq -0x10(%rbp), %rdi movl $0x2c, %esi callq 0x17a5c0 movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax cmpq -0x10(%rbp), %rax je 0x2b8b4 movq -0x10(%rbp), %rsi leaq 0xc83f71(%rip), %rdi # 0xcaf820 callq 0x103f50 movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) movq -0x20(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x20(%rbp) cmpb $0x0, (%rax) jne 0x2b888 jmp 0x2b8d6 xorl %eax, %eax addq $0x50, %rsp popq %rbp retq nop
get_one_option: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov eax, [rax+8] add eax, 0FFFFFFC1h; switch 24 cases mov ecx, eax mov [rbp+var_28], rcx sub eax, 17h ja def_2B7FF; jumptable 000000000002B7FF default case, cases 64-68,70-83,85 mov rax, [rbp+var_28] lea rcx, jpt_2B7FF movsxd rax, ds:(jpt_2B7FF - 17D018h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_2B801: call usage; jumptable 000000000002B7FF case 63 xor edi, edi call _exit loc_2B80D: call print_version; jumptable 000000000002B7FF case 86 xor edi, edi call _exit loc_2B819: mov cs:opt_apply_undo, 1; jumptable 000000000002B7FF case 69 jmp def_2B7FF; jumptable 000000000002B7FF default case, cases 64-68,70-83,85 loc_2B825: lea rax, tables_to_redo; jumptable 000000000002B7FF case 84 cmp qword ptr [rax+10h], 0 jnz short loc_2B886 xor edi, edi lea rsi, tables_to_redo mov edx, 10h lea rcx, my_charset_bin mov r8d, 10h xor eax, eax mov r9d, eax lea rax, my_hash_get_string mov [rsp+50h+var_50], 0 mov [rsp+50h+var_48], rax mov [rsp+50h+var_40], 0 mov [rsp+50h+var_38], 0 mov [rsp+50h+var_30], 1 call my_hash_init2 loc_2B886: jmp short $+2 loc_2B888: mov rdi, [rbp+var_10] mov esi, 2Ch ; ',' call strcend mov [rbp+var_20], rax mov rax, [rbp+var_20] cmp rax, [rbp+var_10] jz short loc_2B8B4 mov rsi, [rbp+var_10] lea rdi, tables_to_redo call my_hash_insert loc_2B8B4: mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_10], rax mov rax, [rbp+var_20] mov rcx, rax add rcx, 1 mov [rbp+var_20], rcx cmp byte ptr [rax], 0 jnz short loc_2B888 jmp short $+2; jumptable 000000000002B7FF default case, cases 64-68,70-83,85 def_2B7FF: xor eax, eax; jumptable 000000000002B7FF default case, cases 64-68,70-83,85 add rsp, 50h pop rbp retn
long long get_one_option(long long a1, _BYTE *a2) { _BYTE *v3; // [rsp+30h] [rbp-20h] switch ( *(_DWORD *)(a1 + 8) ) { case '?': usage(); exit(0LL); case 'E': opt_apply_undo = 1; break; case 'T': if ( !tables_to_redo[2] ) my_hash_init2( 0, (unsigned int)tables_to_redo, 16, (unsigned int)&my_charset_bin, 16, 0, 0LL, (long long)my_hash_get_string, 0LL, 0LL, 1); do { v3 = (_BYTE *)strcend(a2, 44LL); if ( v3 != a2 ) my_hash_insert(tables_to_redo, a2); a2 = v3 + 1; } while ( *v3 ); break; case 'V': print_version(); exit(0LL); default: return 0LL; } return 0LL; }
get_one_option: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x8] ADD EAX,-0x3f MOV ECX,EAX MOV qword ptr [RBP + -0x28],RCX SUB EAX,0x17 JA 0x0012b8d6 MOV RAX,qword ptr [RBP + -0x28] LEA RCX,[0x27d018] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_3f: CALL 0x0012b950 XOR EDI,EDI CALL 0x0012a570 caseD_56: CALL 0x0012ba10 XOR EDI,EDI CALL 0x0012a570 caseD_45: MOV byte ptr [0x005ac9f0],0x1 JMP 0x0012b8d6 caseD_54: LEA RAX,[0xdaf820] CMP qword ptr [RAX + 0x10],0x0 JNZ 0x0012b886 XOR EDI,EDI LEA RSI,[0xdaf820] MOV EDX,0x10 LEA RCX,[0x3f8ad0] MOV R8D,0x10 XOR EAX,EAX MOV R9D,EAX LEA RAX,[0x12ba40] MOV qword ptr [RSP],0x0 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],0x0 MOV dword ptr [RSP + 0x20],0x1 CALL 0x00203930 LAB_0012b886: JMP 0x0012b888 LAB_0012b888: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x2c CALL 0x0027a5c0 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x10] JZ 0x0012b8b4 MOV RSI,qword ptr [RBP + -0x10] LEA RDI,[0xdaf820] CALL 0x00203f50 LAB_0012b8b4: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x20],RCX CMP byte ptr [RAX],0x0 JNZ 0x0012b888 JMP 0x0012b8d6 caseD_40: XOR EAX,EAX ADD RSP,0x50 POP RBP RET
int8 get_one_option(long param_1,char *param_2) { char *pcVar1; char *local_18; switch(*(int4 *)(param_1 + 8)) { case 0x3f: usage(); /* WARNING: Subroutine does not return */ exit(0); case 0x45: opt_apply_undo = 1; break; case 0x54: local_18 = param_2; if (tables_to_redo._16_8_ == 0) { my_hash_init2(0,tables_to_redo,0x10,my_charset_bin,0x10,0,0,my_hash_get_string,0,0,1); } do { pcVar1 = (char *)strcend(local_18,0x2c); if (pcVar1 != local_18) { my_hash_insert(tables_to_redo,local_18); } local_18 = pcVar1 + 1; } while (*pcVar1 != '\0'); break; case 0x56: print_version(); /* WARNING: Subroutine does not return */ exit(0); } return 0; }
10,326
ftxui::focus(std::shared_ptr<ftxui::Node>)
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/dom/frame.cpp
Element focus(Element child) { return std::make_shared<Focus>(unpack(std::move(child))); }
O1
cpp
ftxui::focus(std::shared_ptr<ftxui::Node>): pushq %r15 pushq %r14 pushq %rbx subq $0x40, %rsp movq %rdi, %rbx movq (%rsi), %rcx leaq 0x18(%rsp), %rax movq %rcx, (%rax) xorl %ecx, %ecx movq %rcx, 0x8(%rax) movq 0x8(%rsi), %rdx movq %rcx, 0x8(%rsi) movq %rdx, 0x8(%rax) movq %rcx, (%rsi) movq %rsp, %rdi movq %rax, %rsi callq 0x22c33 movl $0x70, %edi callq 0xb3e0 movq %rax, %r14 movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x8(%r14) leaq 0x213b7(%rip), %rax # 0x59a18 movq %rax, (%r14) movq %r14, %r15 addq $0x10, %r15 movq (%rsp), %rax leaq 0x28(%rsp), %rsi movq %rax, (%rsi) movups 0x8(%rsp), %xmm0 movups %xmm0, 0x8(%rsi) xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movq $0x0, 0x10(%rsp) movq %r15, %rdi callq 0x39388 leaq 0x213c9(%rip), %rax # 0x59a68 movq %rax, 0x10(%r14) leaq 0x28(%rsp), %rdi callq 0x151c0 movq %r15, (%rbx) movq %r14, 0x8(%rbx) movq %rsp, %rdi callq 0x151c0 movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x386cb callq 0x14c7c movq %rbx, %rax addq $0x40, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x151c0 movl $0x70, %esi movq %r14, %rdi callq 0xb400 jmp 0x386f7 movq %rax, %rbx movq %rsp, %rdi callq 0x151c0 jmp 0x38704 movq %rax, %rbx movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x38713 callq 0x14c7c movq %rbx, %rdi callq 0xb780
_ZN5ftxui5focusESt10shared_ptrINS_4NodeEE: push r15 push r14 push rbx sub rsp, 40h mov rbx, rdi mov rcx, [rsi] lea rax, [rsp+58h+var_40] mov [rax], rcx xor ecx, ecx mov [rax+8], rcx mov rdx, [rsi+8] mov [rsi+8], rcx mov [rax+8], rdx mov [rsi], rcx mov rdi, rsp mov rsi, rax call _ZN5ftxui6unpackIJSt10shared_ptrINS_4NodeEEEEESt6vectorIS3_SaIS3_EEDpT_; ftxui::unpack<std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node>) mov edi, 70h ; 'p'; unsigned __int64 call __Znwm; operator new(ulong) mov r14, rax mov rax, 100000001h mov [r14+8], rax lea rax, off_59A18 mov [r14], rax mov r15, r14 add r15, 10h mov rax, qword ptr [rsp+58h+var_58] lea rsi, [rsp+58h+var_30] mov [rsi], rax movups xmm0, [rsp+58h+var_58+8] movups xmmword ptr [rsi+8], xmm0 xorps xmm0, xmm0 movaps [rsp+58h+var_58], xmm0 mov [rsp+58h+var_48], 0 mov rdi, r15 call _ZN5ftxui12_GLOBAL__N_16SelectC2ESt6vectorISt10shared_ptrINS_4NodeEESaIS5_EE; ftxui::`anonymous namespace'::Select::Select(std::vector<std::shared_ptr<ftxui::Node>>) lea rax, off_59A68 mov [r14+10h], rax lea rdi, [rsp+58h+var_30] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov [rbx], r15 mov [rbx+8], r14 mov rdi, rsp call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov rdi, [rsp+58h+var_38] test rdi, rdi jz short loc_386CB call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_386CB: mov rax, rbx add rsp, 40h pop rbx pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_20] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov esi, 70h ; 'p'; unsigned __int64 mov rdi, r14; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_386F7 mov rbx, rax loc_386F7: mov rdi, rsp call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() jmp short loc_38704 mov rbx, rax loc_38704: mov rdi, [rsp+arg_18] test rdi, rdi jz short loc_38713 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_38713: mov rdi, rbx call __Unwind_Resume
_QWORD * ftxui::focus(_QWORD *a1, long long *a2) { volatile signed __int32 *v2; // rdx _QWORD *v3; // r14 int v4; // edx int v5; // ecx int v6; // r8d int v7; // r9d void *v9; // [rsp+0h] [rbp-58h] BYREF __int128 v10; // [rsp+8h] [rbp-50h] long long v11; // [rsp+18h] [rbp-40h] BYREF volatile signed __int32 *v12; // [rsp+20h] [rbp-38h] void *v13; // [rsp+28h] [rbp-30h] BYREF __int128 v14; // [rsp+30h] [rbp-28h] v11 = *a2; v12 = 0LL; v2 = (volatile signed __int32 *)a2[1]; a2[1] = 0LL; v12 = v2; *a2 = 0LL; ftxui::unpack<std::shared_ptr<ftxui::Node>>((long long)&v9, &v11); v3 = (_QWORD *)operator new(0x70uLL); v3[1] = 0x100000001LL; *v3 = off_59A18; v13 = v9; v14 = v10; ftxui::`anonymous namespace'::Select::Select((_DWORD)v3 + 16, (unsigned int)&v13, v4, v5, v6, v7, 0LL, 0LL, 0LL); v3[2] = off_59A68; std::vector<std::shared_ptr<ftxui::Node>>::~vector(&v13); *a1 = v3 + 2; a1[1] = v3; std::vector<std::shared_ptr<ftxui::Node>>::~vector(&v9); if ( v12 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v12); return a1; }
focus: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x40 MOV RBX,RDI MOV RCX,qword ptr [RSI] LEA RAX,[RSP + 0x18] MOV qword ptr [RAX],RCX XOR ECX,ECX MOV qword ptr [RAX + 0x8],RCX MOV RDX,qword ptr [RSI + 0x8] MOV qword ptr [RSI + 0x8],RCX MOV qword ptr [RAX + 0x8],RDX MOV qword ptr [RSI],RCX LAB_00138634: MOV RDI,RSP MOV RSI,RAX CALL 0x00122c33 LAB_0013863f: MOV EDI,0x70 CALL 0x0010b3e0 MOV R14,RAX MOV RAX,0x100000001 MOV qword ptr [R14 + 0x8],RAX LEA RAX,[0x159a18] MOV qword ptr [R14],RAX MOV R15,R14 ADD R15,0x10 MOV RAX,qword ptr [RSP] LEA RSI,[RSP + 0x28] MOV qword ptr [RSI],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x8] MOVUPS xmmword ptr [RSI + 0x8],XMM0 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],0x0 LAB_00138690: MOV RDI,R15 CALL 0x00139388 LAB_00138698: LEA RAX,[0x159a68] MOV qword ptr [R14 + 0x10],RAX LEA RDI,[RSP + 0x28] CALL 0x001151c0 MOV qword ptr [RBX],R15 MOV qword ptr [RBX + 0x8],R14 MOV RDI,RSP CALL 0x001151c0 MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x001386cb CALL 0x00114c7c LAB_001386cb: MOV RAX,RBX ADD RSP,0x40 POP RBX POP R14 POP R15 RET
/* ftxui::focus(std::shared_ptr<ftxui::Node>) */ ftxui * __thiscall ftxui::focus(ftxui *this,int8 *param_2) { int8 *puVar1; int8 local_58; int8 uStack_50; int8 uStack_48; int8 local_40; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_38; int8 local_30; int8 local_28; int8 uStack_20; local_40 = *param_2; local_38 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_2[1]; param_2[1] = 0; *param_2 = 0; /* try { // try from 00138634 to 0013863e has its CatchHandler @ 00138701 */ unpack<std::shared_ptr<ftxui::Node>>((ftxui *)&local_58,&local_40); /* try { // try from 0013863f to 00138648 has its CatchHandler @ 001386f4 */ puVar1 = (int8 *)operator_new(0x70); puVar1[1] = 0x100000001; *puVar1 = &PTR___Sp_counted_ptr_inplace_00159a18; local_30 = local_58; local_28 = uStack_50; uStack_20 = uStack_48; local_58 = 0; uStack_50 = 0; uStack_48 = 0; /* try { // try from 00138690 to 00138697 has its CatchHandler @ 001386d8 */ (anonymous_namespace)::Select::Select((Select *)(puVar1 + 2)); puVar1[2] = &PTR__Node_00159a68; std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector ((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *) &local_30); *(Select **)this = (Select *)(puVar1 + 2); *(int8 **)(this + 8) = puVar1; std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector ((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *) &local_58); if (local_38 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_38); } return this; }
10,327
get_loc_or_ref
bluesky950520[P]quickjs/quickjs.c
static void get_loc_or_ref(DynBuf *bc, BOOL is_ref, int idx) { /* if the field is not initialized, the error is catched when accessing it */ if (is_ref) dbuf_putc(bc, OP_get_var_ref); else dbuf_putc(bc, OP_get_loc); dbuf_put_u16(bc, idx); }
O1
c
get_loc_or_ref: pushq %r14 pushq %rbx pushq %rax movl %edx, %ebx movq %rdi, %r14 testl %esi, %esi movl $0x58, %eax movl $0x5e, %esi cmovel %eax, %esi callq 0x1b4d0 leaq 0x6(%rsp), %rsi movw %bx, (%rsi) movl $0x2, %edx movq %r14, %rdi callq 0x1b422 addq $0x8, %rsp popq %rbx popq %r14 retq
get_loc_or_ref: push r14 push rbx push rax mov ebx, edx mov r14, rdi test esi, esi mov eax, 58h ; 'X' mov esi, 5Eh ; '^' cmovz esi, eax call dbuf_putc lea rsi, [rsp+18h+var_12] mov [rsi], bx mov edx, 2 mov rdi, r14 call dbuf_put add rsp, 8 pop rbx pop r14 retn
long long get_loc_or_ref(_QWORD *a1, int a2, __int16 a3) { long long v3; // rax bool v5; // zf char v6; // si _WORD v8[9]; // [rsp+0h] [rbp-12h] BYREF v8[0] = HIWORD(v3); v5 = a2 == 0; v6 = 94; if ( v5 ) v6 = 88; dbuf_putc(a1, v6); v8[0] = a3; return dbuf_put(a1, (long long)v8, 2LL); }
get_loc_or_ref: PUSH R14 PUSH RBX PUSH RAX MOV EBX,EDX MOV R14,RDI TEST ESI,ESI MOV EAX,0x58 MOV ESI,0x5e CMOVZ ESI,EAX CALL 0x0011b4d0 LEA RSI,[RSP + 0x6] MOV word ptr [RSI],BX MOV EDX,0x2 MOV RDI,R14 CALL 0x0011b422 ADD RSP,0x8 POP RBX POP R14 RET
void get_loc_or_ref(int8 param_1,int param_2,int2 param_3) { int8 in_RAX; int8 uVar1; int8 uStack_18; uVar1 = 0x5e; if (param_2 == 0) { uVar1 = 0x58; } uStack_18 = in_RAX; dbuf_putc(param_1,uVar1); uStack_18 = CONCAT26(param_3,(int6)uStack_18); dbuf_put(param_1,(long)&uStack_18 + 6,2); return; }
10,328
get_loc_or_ref
bluesky950520[P]quickjs/quickjs.c
static void get_loc_or_ref(DynBuf *bc, BOOL is_ref, int idx) { /* if the field is not initialized, the error is catched when accessing it */ if (is_ref) dbuf_putc(bc, OP_get_var_ref); else dbuf_putc(bc, OP_get_loc); dbuf_put_u16(bc, idx); }
O2
c
get_loc_or_ref: pushq %r14 pushq %rbx pushq %rax movl %edx, %ebx movq %rdi, %r14 testl %esi, %esi pushq $0x58 popq %rax pushq $0x5e popq %rsi cmovel %eax, %esi callq 0x15d33 movzwl %bx, %esi movq %r14, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x3cfc8
get_loc_or_ref: push r14 push rbx push rax mov ebx, edx mov r14, rdi test esi, esi push 58h ; 'X' pop rax push 5Eh ; '^' pop rsi cmovz esi, eax call dbuf_putc movzx esi, bx mov rdi, r14 add rsp, 8 pop rbx pop r14 jmp dbuf_put_u16
long long get_loc_or_ref(_QWORD *a1, int a2, __int16 a3) { bool v4; // zf char v5; // si v4 = a2 == 0; v5 = 94; if ( v4 ) v5 = 88; dbuf_putc(a1, v5); return dbuf_put_u16(a1, a3); }
get_loc_or_ref: PUSH R14 PUSH RBX PUSH RAX MOV EBX,EDX MOV R14,RDI TEST ESI,ESI PUSH 0x58 POP RAX PUSH 0x5e POP RSI CMOVZ ESI,EAX CALL 0x00115d33 MOVZX ESI,BX MOV RDI,R14 ADD RSP,0x8 POP RBX POP R14 JMP 0x0013cfc8
void get_loc_or_ref(int8 param_1,int param_2,int2 param_3) { int8 uVar1; uVar1 = 0x5e; if (param_2 == 0) { uVar1 = 0x58; } dbuf_putc(param_1,uVar1); dbuf_put_u16(param_1,param_3); return; }
10,329
tlsstate_conn_close
xtate/src/probe-modules/tls-state-probe.c
static void tlsstate_conn_close(ProbeState *state, ProbeTarget *target) { LOG(LEVEL_DETAIL, "(TSP Conn CLOSE) >>>\n"); if (!state->data) return; struct TlsState *tls_state = state->data; if (!tls_state) return; /*do conn close for subprobe*/ tlsstate_conf.subprobe->conn_close_cb(&tls_state->substate, target); if (tls_state->ssl) { /*cleanup ex data in SSL obj*/ void *ex_data = SSL_get_ex_data(tls_state->ssl, TSP_EXT_TGT_IDX); FREE(ex_data); SSL_free(tls_state->ssl); tls_state->ssl = NULL; tls_state->rbio = NULL; tls_state->wbio = NULL; } FREE(tls_state->data); tls_state->data_size = 0; FREE(tls_state); state->data = NULL; }
O3
c
tlsstate_conn_close: pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r15 movq %rdi, %rbx leaq 0x3b2a5(%rip), %rsi # 0x6b1ba movl $0x3, %edi xorl %eax, %eax callq 0x536da movq 0x8(%rbx), %r14 testq %r14, %r14 je 0x2ff91 movq 0x173e5f(%rip), %rax # 0x1a3d90 leaq 0x8(%r14), %rdi movq %r15, %rsi callq *0x70(%rax) movq 0x28(%r14), %rdi testq %rdi, %rdi je 0x2ff73 leaq 0x28(%r14), %r15 xorl %esi, %esi callq 0x15390 testq %rax, %rax je 0x2ff5c movq %rax, %rdi callq 0x151e0 movq (%r15), %rdi callq 0x150f0 xorps %xmm0, %xmm0 movups %xmm0, (%r15) movq $0x0, 0x10(%r15) movq 0x18(%r14), %rdi testq %rdi, %rdi je 0x2ff81 callq 0x151e0 movq %r14, %rdi callq 0x151e0 movq $0x0, 0x8(%rbx) popq %rbx popq %r14 popq %r15 retq
tlsstate_conn_close: push r15 push r14 push rbx mov r15, rsi mov rbx, rdi lea rsi, aTspConnClose; "(TSP Conn CLOSE) >>>\n" mov edi, 3 xor eax, eax call LOG mov r14, [rbx+8] test r14, r14 jz short loc_2FF91 mov rax, cs:tlsstate_conf_0 lea rdi, [r14+8] mov rsi, r15 call qword ptr [rax+70h] mov rdi, [r14+28h] test rdi, rdi jz short loc_2FF73 lea r15, [r14+28h] xor esi, esi call _SSL_get_ex_data test rax, rax jz short loc_2FF5C mov rdi, rax call _free loc_2FF5C: mov rdi, [r15] call _SSL_free xorps xmm0, xmm0 movups xmmword ptr [r15], xmm0 mov qword ptr [r15+10h], 0 loc_2FF73: mov rdi, [r14+18h] test rdi, rdi jz short loc_2FF81 call _free loc_2FF81: mov rdi, r14 call _free mov qword ptr [rbx+8], 0 loc_2FF91: pop rbx pop r14 pop r15 retn
long long tlsstate_conn_close(long long a1, long long a2, int a3, int a4, int a5, int a6) { long long result; // rax _QWORD *v8; // r14 long long v9; // rdi _QWORD *v10; // r15 long long v11; // rax long long v12; // rdi result = LOG(3, (unsigned int)"(TSP Conn CLOSE) >>>\n", a3, a4, a5, a6); v8 = *(_QWORD **)(a1 + 8); if ( v8 ) { (*(void ( **)(_QWORD *, long long))(tlsstate_conf_0 + 112))(v8 + 1, a2); v9 = v8[5]; if ( v9 ) { v10 = v8 + 5; v11 = SSL_get_ex_data(v9, 0LL); if ( v11 ) free(v11); SSL_free(*v10); *(_OWORD *)v10 = 0LL; v8[7] = 0LL; } v12 = v8[3]; if ( v12 ) free(v12); result = free(v8); *(_QWORD *)(a1 + 8) = 0LL; } return result; }
tlsstate_conn_close: PUSH R15 PUSH R14 PUSH RBX MOV R15,RSI MOV RBX,RDI LEA RSI,[0x16b1ba] MOV EDI,0x3 XOR EAX,EAX CALL 0x001536da MOV R14,qword ptr [RBX + 0x8] TEST R14,R14 JZ 0x0012ff91 MOV RAX,qword ptr [0x002a3d90] LEA RDI,[R14 + 0x8] MOV RSI,R15 CALL qword ptr [RAX + 0x70] MOV RDI,qword ptr [R14 + 0x28] TEST RDI,RDI JZ 0x0012ff73 LEA R15,[R14 + 0x28] XOR ESI,ESI CALL 0x00115390 TEST RAX,RAX JZ 0x0012ff5c MOV RDI,RAX CALL 0x001151e0 LAB_0012ff5c: MOV RDI,qword ptr [R15] CALL 0x001150f0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15],XMM0 MOV qword ptr [R15 + 0x10],0x0 LAB_0012ff73: MOV RDI,qword ptr [R14 + 0x18] TEST RDI,RDI JZ 0x0012ff81 CALL 0x001151e0 LAB_0012ff81: MOV RDI,R14 CALL 0x001151e0 MOV qword ptr [RBX + 0x8],0x0 LAB_0012ff91: POP RBX POP R14 POP R15 RET
void tlsstate_conn_close(long param_1) { void *__ptr; void *__ptr_00; LOG(3,"(TSP Conn CLOSE) >>>\n"); __ptr = *(void **)(param_1 + 8); if (__ptr != (void *)0x0) { (**(code **)(tlsstate_conf_0 + 0x70))((long)__ptr + 8); if (*(SSL **)((long)__ptr + 0x28) != (SSL *)0x0) { __ptr_00 = SSL_get_ex_data(*(SSL **)((long)__ptr + 0x28),0); if (__ptr_00 != (void *)0x0) { free(__ptr_00); } SSL_free(*(SSL **)((long)__ptr + 0x28)); *(int8 *)((long)__ptr + 0x28) = 0; *(int8 *)((long)__ptr + 0x30) = 0; *(int8 *)((long)__ptr + 0x38) = 0; } if (*(void **)((long)__ptr + 0x18) != (void *)0x0) { free(*(void **)((long)__ptr + 0x18)); } free(__ptr); *(int8 *)(param_1 + 8) = 0; } return; }
10,330
my_caseup_str_utf8mb4
eloqsql/strings/ctype-utf8.c
static size_t my_caseup_str_utf8mb4(CHARSET_INFO *cs, char *src) { my_wc_t wc; int srcres, dstres; char *dst= src, *dst0= src; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(cs->caseup_multiply == 1); while (*src && (srcres= my_mb_wc_utf8mb4_no_range(cs, &wc, (uchar *) src)) > 0) { my_toupper_utf8mb4(uni_plane, &wc); if ((dstres= my_wc_mb_utf8mb4_no_range(cs, wc, (uchar*) dst)) <= 0) break; src+= srcres; dst+= dstres; } *dst= '\0'; return (size_t) (dst - dst0); }
O0
c
my_caseup_str_utf8mb4: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x38(%rbp) jmp 0x7396e jmp 0x73970 movq -0x10(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x39(%rbp) je 0x7399e movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx leaq -0x18(%rbp), %rsi callq 0x77800 movl %eax, -0x1c(%rbp) cmpl $0x0, %eax setg %al movb %al, -0x39(%rbp) movb -0x39(%rbp), %al testb $0x1, %al jne 0x739a7 jmp 0x739f6 movq -0x38(%rbp), %rdi leaq -0x18(%rbp), %rsi callq 0x77a40 movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x77ab0 movl %eax, -0x20(%rbp) cmpl $0x0, %eax jg 0x739cf jmp 0x739f6 movl -0x1c(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) movl -0x20(%rbp), %ecx movq -0x28(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) jmp 0x73970 movq -0x28(%rbp), %rax movb $0x0, (%rax) movq -0x28(%rbp), %rax movq -0x30(%rbp), %rcx subq %rcx, %rax addq $0x40, %rsp popq %rbp retq nop
my_caseup_str_utf8mb4: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov [rbp+var_30], rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rbp+var_38], rax jmp short $+2 loc_7396E: jmp short $+2 loc_73970: mov rax, [rbp+var_10] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 0 mov [rbp+var_39], al jz short loc_7399E mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] lea rsi, [rbp+var_18] call my_mb_wc_utf8mb4_no_range mov [rbp+var_1C], eax cmp eax, 0 setnle al mov [rbp+var_39], al loc_7399E: mov al, [rbp+var_39] test al, 1 jnz short loc_739A7 jmp short loc_739F6 loc_739A7: mov rdi, [rbp+var_38] lea rsi, [rbp+var_18] call my_toupper_utf8mb4 mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] mov rdx, [rbp+var_28] call my_wc_mb_utf8mb4_no_range mov [rbp+var_20], eax cmp eax, 0 jg short loc_739CF jmp short loc_739F6 loc_739CF: mov ecx, [rbp+var_1C] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax mov ecx, [rbp+var_20] mov rax, [rbp+var_28] movsxd rcx, ecx add rax, rcx mov [rbp+var_28], rax jmp loc_73970 loc_739F6: mov rax, [rbp+var_28] mov byte ptr [rax], 0 mov rax, [rbp+var_28] mov rcx, [rbp+var_30] sub rax, rcx add rsp, 40h pop rbp retn
_BYTE * my_caseup_str_utf8mb4(long long a1, _BYTE *a2) { bool v3; // [rsp+7h] [rbp-39h] long long v4; // [rsp+8h] [rbp-38h] _BYTE *v5; // [rsp+18h] [rbp-28h] int v6; // [rsp+20h] [rbp-20h] int v7; // [rsp+24h] [rbp-1Ch] long long v8; // [rsp+28h] [rbp-18h] BYREF _BYTE *v9; // [rsp+30h] [rbp-10h] long long v10; // [rsp+38h] [rbp-8h] v10 = a1; v9 = a2; v5 = a2; v4 = *(_QWORD *)(a1 + 120); while ( 1 ) { v3 = 0; if ( *v9 ) { v7 = my_mb_wc_utf8mb4_no_range(v10, &v8, v9); v3 = v7 > 0; } if ( !v3 ) break; my_toupper_utf8mb4(v4, &v8); v6 = my_wc_mb_utf8mb4_no_range(v10, v8, v5); if ( v6 <= 0 ) break; v9 += v7; v5 += v6; } *v5 = 0; return (_BYTE *)(v5 - a2); }
my_caseup_str_utf8mb4: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x38],RAX JMP 0x0017396e LAB_0017396e: JMP 0x00173970 LAB_00173970: MOV RAX,qword ptr [RBP + -0x10] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x39],AL JZ 0x0017399e MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x18] CALL 0x00177800 MOV dword ptr [RBP + -0x1c],EAX CMP EAX,0x0 SETG AL MOV byte ptr [RBP + -0x39],AL LAB_0017399e: MOV AL,byte ptr [RBP + -0x39] TEST AL,0x1 JNZ 0x001739a7 JMP 0x001739f6 LAB_001739a7: MOV RDI,qword ptr [RBP + -0x38] LEA RSI,[RBP + -0x18] CALL 0x00177a40 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x28] CALL 0x00177ab0 MOV dword ptr [RBP + -0x20],EAX CMP EAX,0x0 JG 0x001739cf JMP 0x001739f6 LAB_001739cf: MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX MOV ECX,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x28] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX JMP 0x00173970 LAB_001739f6: MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] SUB RAX,RCX ADD RSP,0x40 POP RBP RET
long my_caseup_str_utf8mb4(long param_1,char *param_2) { int8 uVar1; bool bVar2; int iVar3; char *local_30; int local_24; int8 local_20; char *local_18; long local_10; uVar1 = *(int8 *)(param_1 + 0x78); local_30 = param_2; local_18 = param_2; local_10 = param_1; while( true ) { bVar2 = false; if (*local_18 != '\0') { local_24 = my_mb_wc_utf8mb4_no_range(local_10,&local_20,local_18); bVar2 = 0 < local_24; } if (!bVar2) break; my_toupper_utf8mb4(uVar1,&local_20); iVar3 = my_wc_mb_utf8mb4_no_range(local_10,local_20,local_30); if (iVar3 < 1) break; local_18 = local_18 + local_24; local_30 = local_30 + iVar3; } *local_30 = '\0'; return (long)local_30 - (long)param_2; }
10,331
get_head_or_tail_page
eloqsql/storage/maria/ma_blockrec.c
static my_bool get_head_or_tail_page(MARIA_HA *info, const MARIA_BITMAP_BLOCK *block, uchar *buff, uint length, uint page_type, enum pagecache_page_lock lock, struct st_row_pos_info *res) { uint block_size; MARIA_PINNED_PAGE page_link; MARIA_SHARE *share= info->s; DBUG_ENTER("get_head_or_tail_page"); DBUG_PRINT("enter", ("page_type: %u length: %u", page_type, length)); block_size= share->block_size; if (block->org_bitmap_value == 0) /* Empty block */ { /* New page */ make_empty_page(info, buff, page_type, 1); res->buff= buff; res->empty_space= res->length= (block_size - PAGE_OVERHEAD_SIZE(share)); res->data= (buff + PAGE_HEADER_SIZE(share)); res->dir= res->data + res->length; res->rownr= 0; DBUG_ASSERT(length <= res->length); } else { uchar *dir; /* Read old page */ page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK; res->buff= pagecache_read(share->pagecache, &info->dfile, block->page, 0, 0, share->page_type, lock, &page_link.link); page_link.changed= res->buff != 0; push_dynamic(&info->pinned_pages, (void*) &page_link); if (!page_link.changed) { _ma_set_fatal_error(info, my_errno); DBUG_RETURN(1); } DBUG_ASSERT((uint) (res->buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == page_type); if (!(dir= find_free_position(info, res->buff, block_size, &res->rownr, &res->length, &res->empty_space, page_type == HEAD_PAGE))) goto crashed; if (res->length < length) { if (res->empty_space + res->length >= length) { _ma_compact_block_page(share, res->buff, res->rownr, 1, (page_type == HEAD_PAGE ? info->trn->min_read_from : 0), (page_type == HEAD_PAGE ? share->base.min_block_length : 0)); /* All empty space are now after current position */ dir= dir_entry_pos(res->buff, block_size, res->rownr); res->length= res->empty_space= uint2korr(dir+2); } if (res->length < length) { DBUG_PRINT("error", ("length: %u res->length: %u empty_space: %u", length, res->length, res->empty_space)); goto crashed; /* Wrong bitmap information */ } } res->dir= dir; res->data= res->buff + uint2korr(dir); } DBUG_RETURN(0); crashed: DBUG_ASSERT(!maria_assert_if_crashed_table); _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); /* File crashed */ DBUG_RETURN(1); }
O3
c
get_head_or_tail_page: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r9, %rbx movl %ecx, %r12d movq %rdi, %r14 movq (%rdi), %rcx movl 0x7bc(%rcx), %r13d cmpb $0x0, 0x15(%rsi) je 0x3b911 movl %r8d, -0x2c(%rbp) leaq -0x58(%rbp), %r15 movl $0x6, 0x8(%r15) movq 0x600(%rcx), %rdi leaq 0x470(%r14), %rax movq (%rsi), %rdx movq %rcx, -0x38(%rbp) movl 0x7d4(%rcx), %r9d movq %rax, %rsi xorl %ecx, %ecx xorl %r8d, %r8d pushq %r15 pushq $0x4 callq 0x4c256 addq $0x10, %rsp movq %rax, (%rbx) testq %rax, %rax setne 0x10(%r15) leaq 0x2e8(%r14), %rdi movq %r15, %rsi callq 0xac68a cmpb $0x0, 0x10(%r15) je 0x3b964 movl %r12d, -0x30(%rbp) movq (%rbx), %r15 movq (%r14), %rdx movzbl 0x8(%r15), %r10d movzbl 0x9(%r15), %ecx leaq (%r15,%r13), %r12 movzwl 0xa(%r15), %eax movl %eax, 0x20(%rbx) cmpl $0xff, %ecx je 0x3b973 cmpb %r10b, %cl jae 0x3baed leal (,%rcx,4), %esi movq %r12, %rax subq %rsi, %rax movq $-0x8, %rdi subq %rsi, %rdi movzbl -0x5(%rax), %eax movb %al, 0x9(%r15) cmpq $0xff, %rax je 0x3b8e6 shll $0x2, %eax movq %r12, %r8 subq %rax, %r8 movb $-0x1, -0x6(%r8) leaq (%r12,%rdi), %rax cmpq $-0x9, %rdi jg 0x3b9da movzwl 0x4(%r12,%rdi), %r8d addq $0x4, %rdi testl %r8d, %r8d je 0x3b8ea movzwl 0x2(%r12,%rdi), %edi addl %r8d, %edi jmp 0x3b9e3 movq %rdx, %r15 movq %r14, %rdi movq %rdx, %rsi movl %r8d, %edx movq %rcx, %r14 movl $0x1, %ecx callq 0x37dda movq %r15, (%rbx) subl 0xc18(%r14), %r13d addl $-0x14, %r13d movl %r13d, 0x18(%rbx) movl %r13d, 0x20(%rbx) movl 0xc18(%r14), %eax addl $0xc, %eax addq %r15, %rax movq %rax, 0x8(%rbx) addq %rax, %r13 movq %r13, 0x10(%rbx) movl $0x0, 0x1c(%rbx) jmp 0x3bb0c callq 0xc14ee movl (%rax), %esi movq %r14, %rdi jmp 0x3baf5 cmpl $0xff, %r10d je 0x3baed leal -0x4(,%r10,4), %ecx subq %rcx, %r12 movq (%r14), %rdi testl %r10d, %r10d je 0x3bb1d leaq -0x8(%r12), %rsi movzwl -0x8(%r12), %edx movzwl -0x6(%r12), %ecx subl %r15d, %esi leal (%rcx,%rdx), %r8d addl $0x4, %r8d cmpl %esi, %r8d jbe 0x3ba15 leal -0x1(%r10), %edx cmpl $0x1, -0x2c(%rbp) movq %r10, -0x40(%rbp) jne 0x3ba19 movq 0x8(%r14), %rax movq 0x80(%rax), %r8 movl 0x3b8(%rdi), %r9d jmp 0x3ba1f movl 0xc18(%rdx), %edi addl $0xc, %edi movq %r13, %rdx subq %rsi, %rdx leaq (%rdx,%r15), %rsi addq $-0xb, %rsi movq %rsi, %rdx cmpb $0x0, -0x1(%rsi) jne 0x3ba03 leaq -0x4(%rdx), %rsi cmpb $0x0, (%rdx) je 0x3b9f1 movzwl -0x1(%rdx), %edx subl %edi, %edx movw %di, (%rax) leaq 0x2(%rax), %r12 movl %ecx, %r10d jmp 0x3ba71 addl %edx, %ecx jmp 0x3ba4c xorl %r8d, %r8d xorl %r9d, %r9d movq %r15, %rsi xorl %ecx, %ecx callq 0x34a78 movzwl -0x8(%r12), %edx movzwl -0x6(%r12), %ecx movzwl 0xa(%r15), %eax movl %eax, 0x20(%rbx) cmpl $0x4, %eax movq -0x40(%rbp), %r10 jb 0x3baed addl %edx, %ecx addl $-0x4, %eax movl %eax, 0x20(%rbx) leal 0x1(%r10), %eax movb %al, 0x8(%r15) leaq -0xc(%r12), %rax addl %ecx, %r15d movl %eax, %edx subl %r15d, %edx movw %cx, -0xc(%r12) addq $-0xa, %r12 movw $0x0, (%r12) movl %r10d, 0x1c(%rbx) movl %edx, 0x18(%rbx) movl -0x30(%rbp), %r15d cmpl %r15d, %edx jae 0x3bafe movl 0x20(%rbx), %ecx addl %edx, %ecx cmpl %r15d, %ecx jb 0x3bae8 movq (%rbx), %rsi cmpl $0x1, -0x2c(%rbp) jne 0x3bab3 movq 0x8(%r14), %rax movq 0x80(%rax), %r8 movq -0x38(%rbp), %rdi movl 0x3b8(%rdi), %r9d jmp 0x3babd xorl %r8d, %r8d xorl %r9d, %r9d movq -0x38(%rbp), %rdi movl %r10d, %edx movl $0x1, %ecx callq 0x34a78 addq (%rbx), %r13 movl 0x1c(%rbx), %eax shll $0x2, %eax subq %rax, %r13 movzwl -0x6(%r13), %edx addq $-0x8, %r13 movl %edx, 0x20(%rbx) movl %edx, 0x18(%rbx) movq %r13, %rax cmpl %r15d, %edx jae 0x3bafe movq %r14, %rdi movl $0x7f, %esi callq 0x5cab0 movb $0x1, %al jmp 0x3bb0e movq %rax, 0x10(%rbx) movzwl (%rax), %eax addq (%rbx), %rax movq %rax, 0x8(%rbx) xorl %eax, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl 0xc18(%rdi), %ecx addl $0xc, %ecx jmp 0x3ba4c
get_head_or_tail_page: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbx, r9 mov r12d, ecx mov r14, rdi mov rcx, [rdi] mov r13d, [rcx+7BCh] cmp byte ptr [rsi+15h], 0 jz loc_3B911 mov [rbp+var_2C], r8d lea r15, [rbp+var_58] mov dword ptr [r15+8], 6 mov rdi, [rcx+600h] lea rax, [r14+470h] mov rdx, [rsi] mov [rbp+var_38], rcx mov r9d, [rcx+7D4h] mov rsi, rax xor ecx, ecx xor r8d, r8d push r15 push 4 call pagecache_read add rsp, 10h mov [rbx], rax test rax, rax setnz byte ptr [r15+10h] lea rdi, [r14+2E8h] mov rsi, r15 call insert_dynamic cmp byte ptr [r15+10h], 0 jz loc_3B964 mov [rbp+var_30], r12d mov r15, [rbx] mov rdx, [r14] movzx r10d, byte ptr [r15+8] movzx ecx, byte ptr [r15+9] lea r12, [r15+r13] movzx eax, word ptr [r15+0Ah] mov [rbx+20h], eax cmp ecx, 0FFh jz loc_3B973 cmp cl, r10b jnb loc_3BAED lea esi, ds:0[rcx*4] mov rax, r12 sub rax, rsi mov rdi, 0FFFFFFFFFFFFFFF8h sub rdi, rsi movzx eax, byte ptr [rax-5] mov [r15+9], al cmp rax, 0FFh jz short loc_3B8E6 shl eax, 2 mov r8, r12 sub r8, rax mov byte ptr [r8-6], 0FFh loc_3B8E6: lea rax, [r12+rdi] loc_3B8EA: cmp rdi, 0FFFFFFFFFFFFFFF7h jg loc_3B9DA movzx r8d, word ptr [r12+rdi+4] add rdi, 4 test r8d, r8d jz short loc_3B8EA movzx edi, word ptr [r12+rdi+2] add edi, r8d jmp loc_3B9E3 loc_3B911: mov r15, rdx mov rdi, r14 mov rsi, rdx mov edx, r8d mov r14, rcx mov ecx, 1 call make_empty_page mov [rbx], r15 sub r13d, [r14+0C18h] add r13d, 0FFFFFFECh mov [rbx+18h], r13d mov [rbx+20h], r13d mov eax, [r14+0C18h] add eax, 0Ch add rax, r15 mov [rbx+8], rax add r13, rax mov [rbx+10h], r13 mov dword ptr [rbx+1Ch], 0 jmp loc_3BB0C loc_3B964: call _my_thread_var mov esi, [rax] mov rdi, r14 jmp loc_3BAF5 loc_3B973: cmp r10d, 0FFh jz loc_3BAED lea ecx, ds:0FFFFFFFFFFFFFFFCh[r10*4] sub r12, rcx mov rdi, [r14] test r10d, r10d jz loc_3BB1D lea rsi, [r12-8] movzx edx, word ptr [r12-8] movzx ecx, word ptr [r12-6] sub esi, r15d lea r8d, [rcx+rdx] add r8d, 4 cmp r8d, esi jbe short loc_3BA15 lea edx, [r10-1] cmp [rbp+var_2C], 1 mov [rbp+var_40], r10 jnz short loc_3BA19 mov rax, [r14+8] mov r8, [rax+80h] mov r9d, [rdi+3B8h] jmp short loc_3BA1F loc_3B9DA: mov edi, [rdx+0C18h] add edi, 0Ch loc_3B9E3: mov rdx, r13 sub rdx, rsi lea rsi, [rdx+r15] add rsi, 0FFFFFFFFFFFFFFF5h loc_3B9F1: mov rdx, rsi cmp byte ptr [rsi-1], 0 jnz short loc_3BA03 lea rsi, [rdx-4] cmp byte ptr [rdx], 0 jz short loc_3B9F1 loc_3BA03: movzx edx, word ptr [rdx-1] sub edx, edi mov [rax], di lea r12, [rax+2] mov r10d, ecx jmp short loc_3BA71 loc_3BA15: add ecx, edx jmp short loc_3BA4C loc_3BA19: xor r8d, r8d xor r9d, r9d loc_3BA1F: mov rsi, r15 xor ecx, ecx call _ma_compact_block_page movzx edx, word ptr [r12-8] movzx ecx, word ptr [r12-6] movzx eax, word ptr [r15+0Ah] mov [rbx+20h], eax cmp eax, 4 mov r10, [rbp+var_40] jb loc_3BAED add ecx, edx loc_3BA4C: add eax, 0FFFFFFFCh mov [rbx+20h], eax lea eax, [r10+1] mov [r15+8], al lea rax, [r12-0Ch] add r15d, ecx mov edx, eax sub edx, r15d mov [r12-0Ch], cx add r12, 0FFFFFFFFFFFFFFF6h loc_3BA71: mov word ptr [r12], 0 mov [rbx+1Ch], r10d mov [rbx+18h], edx mov r15d, [rbp+var_30] cmp edx, r15d jnb short loc_3BAFE mov ecx, [rbx+20h] add ecx, edx cmp ecx, r15d jb short loc_3BAE8 mov rsi, [rbx] cmp [rbp+var_2C], 1 jnz short loc_3BAB3 mov rax, [r14+8] mov r8, [rax+80h] mov rdi, [rbp+var_38] mov r9d, [rdi+3B8h] jmp short loc_3BABD loc_3BAB3: xor r8d, r8d xor r9d, r9d mov rdi, [rbp+var_38] loc_3BABD: mov edx, r10d mov ecx, 1 call _ma_compact_block_page add r13, [rbx] mov eax, [rbx+1Ch] shl eax, 2 sub r13, rax movzx edx, word ptr [r13-6] add r13, 0FFFFFFFFFFFFFFF8h mov [rbx+20h], edx mov [rbx+18h], edx mov rax, r13 loc_3BAE8: cmp edx, r15d jnb short loc_3BAFE loc_3BAED: mov rdi, r14 mov esi, 7Fh loc_3BAF5: call _ma_set_fatal_error mov al, 1 jmp short loc_3BB0E loc_3BAFE: mov [rbx+10h], rax movzx eax, word ptr [rax] add rax, [rbx] mov [rbx+8], rax loc_3BB0C: xor eax, eax loc_3BB0E: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3BB1D: mov ecx, [rdi+0C18h] add ecx, 0Ch jmp loc_3BA4C
char get_head_or_tail_page(long long *a1, long long *a2, _BYTE *a3, unsigned int a4, int a5, long long a6) { long long v9; // rcx long long v10; // r13 long long v11; // rdi long long v12; // rdx long long v13; // rax long long v14; // r15 long long v15; // rdx long long v16; // r10 int v17; // ecx long long v18; // r12 unsigned int v19; // eax long long v20; // rsi long long v21; // rdi long long v22; // rax _WORD *v23; // rax int v24; // r8d int v25; // edi long long v27; // r14 long long v28; // r13 _BYTE *v29; // rax long long v30; // rsi long long *v31; // rdi long long v32; // r12 long long v33; // rdi int v34; // edx int v35; // ecx unsigned long long v36; // r8 unsigned int v37; // r9d long long v38; // rsi _BYTE *v39; // rdx unsigned int v40; // edx _WORD *v41; // r12 int v42; // ecx int v43; // edx int v44; // ecx unsigned int v45; // r15d unsigned long long v46; // r8 long long v47; // rdi unsigned int v48; // r9d long long v49; // r13 char v51[8]; // [rsp+8h] [rbp-58h] BYREF int v52; // [rsp+10h] [rbp-50h] bool v53; // [rsp+18h] [rbp-48h] long long v54; // [rsp+20h] [rbp-40h] long long v55; // [rsp+28h] [rbp-38h] unsigned int v56; // [rsp+30h] [rbp-30h] int v57; // [rsp+34h] [rbp-2Ch] v9 = *a1; v10 = *(unsigned int *)(*a1 + 1980); if ( !*((_BYTE *)a2 + 21) ) { v27 = *a1; make_empty_page((long long)a1, a3, a5, 1); *(_QWORD *)a6 = a3; v28 = (unsigned int)(v10 - *(_DWORD *)(v27 + 3096) - 20); *(_DWORD *)(a6 + 24) = v28; *(_DWORD *)(a6 + 32) = v28; v29 = &a3[*(_DWORD *)(v27 + 3096) + 12]; *(_QWORD *)(a6 + 8) = v29; *(_QWORD *)(a6 + 16) = &v29[v28]; *(_DWORD *)(a6 + 28) = 0; return 0; } v57 = a5; v52 = 6; v11 = *(_QWORD *)(v9 + 1536); v12 = *a2; v55 = v9; v13 = pagecache_read(v11, (int)a1 + 1136, v12, 0, 0, *(_DWORD *)(v9 + 2004), 4, (long long)v51); *(_QWORD *)a6 = v13; v53 = v13 != 0; insert_dynamic(a1 + 93, v51); if ( !v53 ) { v30 = *(unsigned int *)my_thread_var(a1 + 93); v31 = a1; LABEL_36: ma_set_fatal_error(v31, v30); return 1; } v56 = a4; v14 = *(_QWORD *)a6; v15 = *a1; v16 = *(unsigned __int8 *)(*(_QWORD *)a6 + 8LL); v17 = *(unsigned __int8 *)(*(_QWORD *)a6 + 9LL); v18 = *(_QWORD *)a6 + v10; v19 = *(unsigned __int16 *)(*(_QWORD *)a6 + 10LL); *(_DWORD *)(a6 + 32) = v19; if ( v17 != 255 ) { if ( (unsigned __int8)v17 < (unsigned __int8)v16 ) { v20 = (unsigned int)(4 * v17); v21 = -8 - v20; v22 = *(unsigned __int8 *)(v18 - v20 - 5); *(_BYTE *)(v14 + 9) = v22; if ( v22 != 255 ) *(_BYTE *)(v18 - (unsigned int)(4 * v22) - 6) = -1; v23 = (_WORD *)(v18 + v21); while ( v21 <= -9 ) { v24 = *(unsigned __int16 *)(v18 + v21 + 4); v21 += 4LL; if ( v24 ) { v25 = v24 + *(unsigned __int16 *)(v18 + v21 + 2); goto LABEL_19; } } v25 = *(_DWORD *)(v15 + 3096) + 12; LABEL_19: v38 = v10 - v20 + v14 - 11; do { v39 = (_BYTE *)v38; if ( *(_BYTE *)(v38 - 1) ) break; v38 -= 4LL; } while ( !*v39 ); v40 = *(unsigned __int16 *)(v39 - 1) - v25; *v23 = v25; v41 = v23 + 1; LODWORD(v16) = v17; goto LABEL_28; } LABEL_35: v31 = a1; v30 = 127LL; goto LABEL_36; } if ( (_DWORD)v16 == 255 ) goto LABEL_35; v32 = v18 - (unsigned int)(4 * v16 - 4); v33 = *a1; if ( (_DWORD)v16 ) { v34 = *(unsigned __int16 *)(v32 - 8); v35 = *(unsigned __int16 *)(v32 - 6); if ( v35 + v34 + 4 <= (unsigned int)(v32 - 8 - v14) ) { v42 = v34 + v35; } else { v54 = v16; if ( v57 == 1 ) { v36 = *(_QWORD *)(a1[1] + 128); v37 = *(_DWORD *)(v33 + 952); } else { v36 = 0LL; v37 = 0; } ma_compact_block_page(v33, v14, v16 - 1, 0, v36, v37); v43 = *(unsigned __int16 *)(v32 - 8); v44 = *(unsigned __int16 *)(v32 - 6); v19 = *(unsigned __int16 *)(v14 + 10); *(_DWORD *)(a6 + 32) = v19; LODWORD(v16) = v54; if ( v19 < 4 ) goto LABEL_35; v42 = v43 + v44; } } else { v42 = *(_DWORD *)(v33 + 3096) + 12; } *(_DWORD *)(a6 + 32) = v19 - 4; *(_BYTE *)(v14 + 8) = v16 + 1; v23 = (_WORD *)(v32 - 12); v40 = v32 - 12 - (v42 + v14); *(_WORD *)(v32 - 12) = v42; v41 = (_WORD *)(v32 - 10); LABEL_28: *v41 = 0; *(_DWORD *)(a6 + 28) = v16; *(_DWORD *)(a6 + 24) = v40; v45 = v56; if ( v40 < v56 ) { if ( v40 + *(_DWORD *)(a6 + 32) >= v56 ) { if ( v57 == 1 ) { v46 = *(_QWORD *)(a1[1] + 128); v47 = v55; v48 = *(_DWORD *)(v55 + 952); } else { v46 = 0LL; v48 = 0; v47 = v55; } ma_compact_block_page(v47, *(_QWORD *)a6, v16, 1, v46, v48); v49 = *(_QWORD *)a6 + v10 - (unsigned int)(4 * *(_DWORD *)(a6 + 28)); v40 = *(unsigned __int16 *)(v49 - 6); *(_DWORD *)(a6 + 32) = v40; *(_DWORD *)(a6 + 24) = v40; v23 = (_WORD *)(v49 - 8); } if ( v40 < v45 ) goto LABEL_35; } *(_QWORD *)(a6 + 16) = v23; *(_QWORD *)(a6 + 8) = *(_QWORD *)a6 + (unsigned __int16)*v23; return 0; }
get_head_or_tail_page: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,R9 MOV R12D,ECX MOV R14,RDI MOV RCX,qword ptr [RDI] MOV R13D,dword ptr [RCX + 0x7bc] CMP byte ptr [RSI + 0x15],0x0 JZ 0x0013b911 MOV dword ptr [RBP + -0x2c],R8D LEA R15,[RBP + -0x58] MOV dword ptr [R15 + 0x8],0x6 MOV RDI,qword ptr [RCX + 0x600] LEA RAX,[R14 + 0x470] MOV RDX,qword ptr [RSI] MOV qword ptr [RBP + -0x38],RCX MOV R9D,dword ptr [RCX + 0x7d4] MOV RSI,RAX XOR ECX,ECX XOR R8D,R8D PUSH R15 PUSH 0x4 CALL 0x0014c256 ADD RSP,0x10 MOV qword ptr [RBX],RAX TEST RAX,RAX SETNZ byte ptr [R15 + 0x10] LEA RDI,[R14 + 0x2e8] MOV RSI,R15 CALL 0x001ac68a CMP byte ptr [R15 + 0x10],0x0 JZ 0x0013b964 MOV dword ptr [RBP + -0x30],R12D MOV R15,qword ptr [RBX] MOV RDX,qword ptr [R14] MOVZX R10D,byte ptr [R15 + 0x8] MOVZX ECX,byte ptr [R15 + 0x9] LEA R12,[R15 + R13*0x1] MOVZX EAX,word ptr [R15 + 0xa] MOV dword ptr [RBX + 0x20],EAX CMP ECX,0xff JZ 0x0013b973 CMP CL,R10B JNC 0x0013baed LEA ESI,[RCX*0x4] MOV RAX,R12 SUB RAX,RSI MOV RDI,-0x8 SUB RDI,RSI MOVZX EAX,byte ptr [RAX + -0x5] MOV byte ptr [R15 + 0x9],AL CMP RAX,0xff JZ 0x0013b8e6 SHL EAX,0x2 MOV R8,R12 SUB R8,RAX MOV byte ptr [R8 + -0x6],0xff LAB_0013b8e6: LEA RAX,[R12 + RDI*0x1] LAB_0013b8ea: CMP RDI,-0x9 JG 0x0013b9da MOVZX R8D,word ptr [R12 + RDI*0x1 + 0x4] ADD RDI,0x4 TEST R8D,R8D JZ 0x0013b8ea MOVZX EDI,word ptr [R12 + RDI*0x1 + 0x2] ADD EDI,R8D JMP 0x0013b9e3 LAB_0013b911: MOV R15,RDX MOV RDI,R14 MOV RSI,RDX MOV EDX,R8D MOV R14,RCX MOV ECX,0x1 CALL 0x00137dda MOV qword ptr [RBX],R15 SUB R13D,dword ptr [R14 + 0xc18] ADD R13D,-0x14 MOV dword ptr [RBX + 0x18],R13D MOV dword ptr [RBX + 0x20],R13D MOV EAX,dword ptr [R14 + 0xc18] ADD EAX,0xc ADD RAX,R15 MOV qword ptr [RBX + 0x8],RAX ADD R13,RAX MOV qword ptr [RBX + 0x10],R13 MOV dword ptr [RBX + 0x1c],0x0 JMP 0x0013bb0c LAB_0013b964: CALL 0x001c14ee MOV ESI,dword ptr [RAX] MOV RDI,R14 JMP 0x0013baf5 LAB_0013b973: CMP R10D,0xff JZ 0x0013baed LEA ECX,[-0x4 + R10*0x4] SUB R12,RCX MOV RDI,qword ptr [R14] TEST R10D,R10D JZ 0x0013bb1d LEA RSI,[R12 + -0x8] MOVZX EDX,word ptr [R12 + -0x8] MOVZX ECX,word ptr [R12 + -0x6] SUB ESI,R15D LEA R8D,[RCX + RDX*0x1] ADD R8D,0x4 CMP R8D,ESI JBE 0x0013ba15 LEA EDX,[R10 + -0x1] CMP dword ptr [RBP + -0x2c],0x1 MOV qword ptr [RBP + -0x40],R10 JNZ 0x0013ba19 MOV RAX,qword ptr [R14 + 0x8] MOV R8,qword ptr [RAX + 0x80] MOV R9D,dword ptr [RDI + 0x3b8] JMP 0x0013ba1f LAB_0013b9da: MOV EDI,dword ptr [RDX + 0xc18] ADD EDI,0xc LAB_0013b9e3: MOV RDX,R13 SUB RDX,RSI LEA RSI,[RDX + R15*0x1] ADD RSI,-0xb LAB_0013b9f1: MOV RDX,RSI CMP byte ptr [RSI + -0x1],0x0 JNZ 0x0013ba03 LEA RSI,[RDX + -0x4] CMP byte ptr [RDX],0x0 JZ 0x0013b9f1 LAB_0013ba03: MOVZX EDX,word ptr [RDX + -0x1] SUB EDX,EDI MOV word ptr [RAX],DI LEA R12,[RAX + 0x2] MOV R10D,ECX JMP 0x0013ba71 LAB_0013ba15: ADD ECX,EDX JMP 0x0013ba4c LAB_0013ba19: XOR R8D,R8D XOR R9D,R9D LAB_0013ba1f: MOV RSI,R15 XOR ECX,ECX CALL 0x00134a78 MOVZX EDX,word ptr [R12 + -0x8] MOVZX ECX,word ptr [R12 + -0x6] MOVZX EAX,word ptr [R15 + 0xa] MOV dword ptr [RBX + 0x20],EAX CMP EAX,0x4 MOV R10,qword ptr [RBP + -0x40] JC 0x0013baed ADD ECX,EDX LAB_0013ba4c: ADD EAX,-0x4 MOV dword ptr [RBX + 0x20],EAX LEA EAX,[R10 + 0x1] MOV byte ptr [R15 + 0x8],AL LEA RAX,[R12 + -0xc] ADD R15D,ECX MOV EDX,EAX SUB EDX,R15D MOV word ptr [R12 + -0xc],CX ADD R12,-0xa LAB_0013ba71: MOV word ptr [R12],0x0 MOV dword ptr [RBX + 0x1c],R10D MOV dword ptr [RBX + 0x18],EDX MOV R15D,dword ptr [RBP + -0x30] CMP EDX,R15D JNC 0x0013bafe MOV ECX,dword ptr [RBX + 0x20] ADD ECX,EDX CMP ECX,R15D JC 0x0013bae8 MOV RSI,qword ptr [RBX] CMP dword ptr [RBP + -0x2c],0x1 JNZ 0x0013bab3 MOV RAX,qword ptr [R14 + 0x8] MOV R8,qword ptr [RAX + 0x80] MOV RDI,qword ptr [RBP + -0x38] MOV R9D,dword ptr [RDI + 0x3b8] JMP 0x0013babd LAB_0013bab3: XOR R8D,R8D XOR R9D,R9D MOV RDI,qword ptr [RBP + -0x38] LAB_0013babd: MOV EDX,R10D MOV ECX,0x1 CALL 0x00134a78 ADD R13,qword ptr [RBX] MOV EAX,dword ptr [RBX + 0x1c] SHL EAX,0x2 SUB R13,RAX MOVZX EDX,word ptr [R13 + -0x6] ADD R13,-0x8 MOV dword ptr [RBX + 0x20],EDX MOV dword ptr [RBX + 0x18],EDX MOV RAX,R13 LAB_0013bae8: CMP EDX,R15D JNC 0x0013bafe LAB_0013baed: MOV RDI,R14 MOV ESI,0x7f LAB_0013baf5: CALL 0x0015cab0 MOV AL,0x1 JMP 0x0013bb0e LAB_0013bafe: MOV qword ptr [RBX + 0x10],RAX MOVZX EAX,word ptr [RAX] ADD RAX,qword ptr [RBX] MOV qword ptr [RBX + 0x8],RAX LAB_0013bb0c: XOR EAX,EAX LAB_0013bb0e: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013bb1d: MOV ECX,dword ptr [RDI + 0xc18] ADD ECX,0xc JMP 0x0013ba4c
int8 get_head_or_tail_page (long *param_1,int8 *param_2,long param_3,uint param_4,int param_5,long *param_6) { byte bVar1; byte bVar2; ushort uVar3; ushort uVar4; ushort uVar5; long lVar6; long lVar7; uint uVar8; char *pcVar9; long lVar10; int4 *puVar11; int8 uVar12; uint uVar13; int4 uVar14; ulong uVar15; char *pcVar16; int iVar17; long lVar18; ushort *puVar19; uint uVar20; ulong uVar21; ushort *puVar22; int1 local_60 [8]; int4 local_58; char local_50; ulong local_48; long local_40; uint local_38; int local_34; lVar10 = *param_1; uVar20 = *(uint *)(lVar10 + 0x7bc); uVar21 = (ulong)uVar20; if (*(char *)((long)param_2 + 0x15) == '\0') { make_empty_page(param_1,param_3,param_5,1); *param_6 = param_3; uVar20 = (uVar20 - *(int *)(lVar10 + 0xc18)) - 0x14; *(uint *)(param_6 + 3) = uVar20; *(uint *)(param_6 + 4) = uVar20; param_3 = (ulong)(*(int *)(lVar10 + 0xc18) + 0xc) + param_3; param_6[1] = param_3; param_6[2] = (ulong)uVar20 + param_3; *(int4 *)((long)param_6 + 0x1c) = 0; LAB_0013bb0c: uVar12 = 0; } else { local_58 = 6; local_40 = lVar10; local_34 = param_5; lVar10 = pagecache_read(*(int8 *)(lVar10 + 0x600),param_1 + 0x8e,*param_2,0,0, *(int4 *)(lVar10 + 0x7d4),4,local_60); *param_6 = lVar10; local_50 = lVar10 != 0; insert_dynamic(param_1 + 0x5d,local_60); if (local_50 == '\0') { puVar11 = (int4 *)_my_thread_var(); uVar14 = *puVar11; } else { lVar6 = *param_6; lVar7 = *param_1; bVar1 = *(byte *)(lVar6 + 8); bVar2 = *(byte *)(lVar6 + 9); lVar10 = lVar6 + uVar21; uVar13 = (uint)*(ushort *)(lVar6 + 10); *(uint *)(param_6 + 4) = (uint)*(ushort *)(lVar6 + 10); uVar20 = (uint)bVar2; local_38 = param_4; if (uVar20 == 0xff) { if (bVar1 != 0xff) { lVar10 = lVar10 - (ulong)((uint)bVar1 * 4 - 4); lVar7 = *param_1; uVar20 = (uint)bVar1; if (bVar1 == 0) { iVar17 = *(int *)(lVar7 + 0xc18) + 0xc; } else if ((uint)(((int)lVar10 + -8) - (int)lVar6) < (uint)*(ushort *)(lVar10 + -6) + (uint)*(ushort *)(lVar10 + -8) + 4) { if (local_34 == 1) { uVar12 = *(int8 *)(param_1[1] + 0x80); uVar14 = *(int4 *)(lVar7 + 0x3b8); } else { uVar12 = 0; uVar14 = 0; } local_48 = (ulong)bVar1; _ma_compact_block_page(lVar7,lVar6,bVar1 - 1,0,uVar12,uVar14); uVar3 = *(ushort *)(lVar10 + -8); uVar4 = *(ushort *)(lVar10 + -6); uVar5 = *(ushort *)(lVar6 + 10); uVar13 = (uint)uVar5; *(uint *)(param_6 + 4) = (uint)uVar5; if (uVar5 < 4) goto LAB_0013baed; iVar17 = (uint)uVar4 + (uint)uVar3; uVar20 = (uint)local_48; } else { iVar17 = (uint)*(ushort *)(lVar10 + -6) + (uint)*(ushort *)(lVar10 + -8); } *(uint *)(param_6 + 4) = uVar13 - 4; *(char *)(lVar6 + 8) = (char)uVar20 + '\x01'; puVar22 = (ushort *)(lVar10 + -0xc); uVar13 = (int)puVar22 - ((int)lVar6 + iVar17); *(short *)(lVar10 + -0xc) = (short)iVar17; puVar19 = (ushort *)(lVar10 + -10); goto LAB_0013ba71; } } else if (bVar2 < bVar1) { uVar15 = (ulong)((uint)bVar2 * 4); lVar18 = -8 - uVar15; bVar1 = *(byte *)((lVar10 - uVar15) + -5); *(byte *)(lVar6 + 9) = bVar1; if (bVar1 != 0xff) { *(int1 *)(lVar10 + (ulong)bVar1 * -4 + -6) = 0xff; } puVar22 = (ushort *)(lVar10 + lVar18); do { if (-9 < lVar18) { iVar17 = *(int *)(lVar7 + 0xc18) + 0xc; goto LAB_0013b9e3; } uVar3 = *(ushort *)(lVar10 + 4 + lVar18); lVar18 = lVar18 + 4; } while (uVar3 == 0); iVar17 = (uint)*(ushort *)(lVar10 + 2 + lVar18) + (uint)uVar3; LAB_0013b9e3: pcVar9 = (char *)((uVar21 - uVar15) + lVar6 + -0xb); do { pcVar16 = pcVar9; if (pcVar16[-1] != '\0') break; pcVar9 = pcVar16 + -4; } while (*pcVar16 == '\0'); uVar13 = (uint)*(ushort *)(pcVar16 + -1) - iVar17; *puVar22 = (ushort)iVar17; puVar19 = puVar22 + 1; LAB_0013ba71: uVar8 = local_38; *puVar19 = 0; *(uint *)((long)param_6 + 0x1c) = uVar20; *(uint *)(param_6 + 3) = uVar13; if (uVar13 < local_38) { if (local_38 <= (int)param_6[4] + uVar13) { if (local_34 == 1) { uVar12 = *(int8 *)(param_1[1] + 0x80); uVar14 = *(int4 *)(local_40 + 0x3b8); } else { uVar12 = 0; uVar14 = 0; } _ma_compact_block_page(local_40,*param_6,uVar20,1,uVar12,uVar14); lVar10 = (uVar21 + *param_6) - (ulong)(uint)(*(int *)((long)param_6 + 0x1c) << 2); uVar3 = *(ushort *)(lVar10 + -6); uVar13 = (uint)uVar3; puVar22 = (ushort *)(lVar10 + -8); *(uint *)(param_6 + 4) = (uint)uVar3; *(uint *)(param_6 + 3) = (uint)uVar3; } if (uVar13 < uVar8) goto LAB_0013baed; } param_6[2] = (long)puVar22; param_6[1] = (ulong)*puVar22 + *param_6; goto LAB_0013bb0c; } LAB_0013baed: uVar14 = 0x7f; } _ma_set_fatal_error(param_1,uVar14); uVar12 = 1; } return uVar12; }
10,332
my_b_cache_write_r
eloqsql/mysys/mf_iocache.c
static int _my_b_cache_write_r(IO_CACHE *info, const uchar *Buffer, size_t Count) { my_off_t old_pos_in_file= info->pos_in_file; int res= _my_b_cache_write(info, Buffer, Count); if (res) return res; DBUG_ASSERT(!(info->myflags & MY_ENCRYPT)); DBUG_ASSERT(info->share); copy_to_read_buffer(info, Buffer, old_pos_in_file); return 0; }
O0
c
my_b_cache_write_r: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0xe4ab0 movl %eax, -0x2c(%rbp) cmpl $0x0, -0x2c(%rbp) je 0xe35e1 movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xe3601 jmp 0xe35e3 jmp 0xe35e5 jmp 0xe35e7 jmp 0xe35e9 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0xe5070 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
_my_b_cache_write_r: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_28], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _my_b_cache_write mov [rbp+var_2C], eax cmp [rbp+var_2C], 0 jz short loc_E35E1 mov eax, [rbp+var_2C] mov [rbp+var_4], eax jmp short loc_E3601 loc_E35E1: jmp short $+2 loc_E35E3: jmp short $+2 loc_E35E5: jmp short $+2 loc_E35E7: jmp short $+2 loc_E35E9: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_28] call copy_to_read_buffer mov [rbp+var_4], 0 loc_E3601: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_b_cache_write_r(long long *a1, long long a2, long long a3) { unsigned int v4; // [rsp+4h] [rbp-2Ch] long long v5; // [rsp+8h] [rbp-28h] v5 = *a1; v4 = my_b_cache_write(a1, a2, a3); if ( v4 ) { return v4; } else { copy_to_read_buffer(a1, a2, v5); return 0; } }
_my_b_cache_write_r: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001e4ab0 MOV dword ptr [RBP + -0x2c],EAX CMP dword ptr [RBP + -0x2c],0x0 JZ 0x001e35e1 MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x4],EAX JMP 0x001e3601 LAB_001e35e1: JMP 0x001e35e3 LAB_001e35e3: JMP 0x001e35e5 LAB_001e35e5: JMP 0x001e35e7 LAB_001e35e7: JMP 0x001e35e9 LAB_001e35e9: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x28] CALL 0x001e5070 MOV dword ptr [RBP + -0x4],0x0 LAB_001e3601: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int _my_b_cache_write_r(int8 *param_1,int8 param_2,int8 param_3) { int8 uVar1; int4 local_c; uVar1 = *param_1; local_c = _my_b_cache_write(param_1,param_2,param_3); if (local_c == 0) { copy_to_read_buffer(param_1,param_2,uVar1); local_c = 0; } return local_c; }
10,333
ast_create_sequence
tsotchke[P]eshkol/src/frontend/ast/create/ast_create.c
AstNode* ast_create_sequence(Arena* arena, AstNode** exprs, size_t expr_count, size_t line, size_t column) { AstNode* node = ast_create_node(arena, AST_SEQUENCE, line, column); if (!node) { return NULL; } node->as.sequence.exprs = exprs; node->as.sequence.expr_count = expr_count; return node; }
O2
c
ast_create_sequence: pushq %r14 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 pushq $0x1a popq %rsi movq %rcx, %rdx movq %r8, %rcx callq 0x99ac testq %rax, %rax je 0x9ea1 movq %r14, 0x48(%rax) movq %rbx, 0x50(%rax) addq $0x8, %rsp popq %rbx popq %r14 retq
ast_create_sequence: push r14 push rbx push rax mov rbx, rdx mov r14, rsi push 1Ah pop rsi mov rdx, rcx mov rcx, r8 call ast_create_node test rax, rax jz short loc_9EA1 mov [rax+48h], r14 mov [rax+50h], rbx loc_9EA1: add rsp, 8 pop rbx pop r14 retn
long long ast_create_sequence(long long a1, long long a2, long long a3, long long a4, long long a5) { long long result; // rax result = ast_create_node(a1, 26, a4, a5); if ( result ) { *(_QWORD *)(result + 72) = a2; *(_QWORD *)(result + 80) = a3; } return result; }
ast_create_sequence: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI PUSH 0x1a POP RSI MOV RDX,RCX MOV RCX,R8 CALL 0x001099ac TEST RAX,RAX JZ 0x00109ea1 MOV qword ptr [RAX + 0x48],R14 MOV qword ptr [RAX + 0x50],RBX LAB_00109ea1: ADD RSP,0x8 POP RBX POP R14 RET
void ast_create_sequence(int8 param_1,int8 param_2,int8 param_3,int8 param_4 ,int8 param_5) { long lVar1; lVar1 = ast_create_node(param_1,0x1a,param_4,param_5); if (lVar1 != 0) { *(int8 *)(lVar1 + 0x48) = param_2; *(int8 *)(lVar1 + 0x50) = param_3; } return; }
10,334
google::protobuf::EnumValueOptions::ByteSizeLong() const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
size_t EnumValueOptions::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.EnumValueOptions) size_t total_size = 0; total_size += _impl_._extensions_.ByteSize(); uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; total_size += 2UL * this->_internal_uninterpreted_option_size(); for (const auto& msg : this->_impl_.uninterpreted_option_) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // optional bool deprecated = 1 [default = false]; cached_has_bits = _impl_._has_bits_[0]; if (cached_has_bits & 0x00000001u) { total_size += 1 + 1; } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); }
O0
cpp
google::protobuf::EnumValueOptions::ByteSizeLong() const: subq $0x58, %rsp movq %rdi, 0x40(%rsp) movq 0x40(%rsp), %rdi movq %rdi, 0x8(%rsp) movq $0x0, 0x38(%rsp) addq $0x10, %rdi callq 0x1a13c0 movq 0x8(%rsp), %rdi addq 0x38(%rsp), %rax movq %rax, 0x38(%rsp) movl $0x0, 0x34(%rsp) callq 0xa1800 movl %eax, %ecx movq 0x8(%rsp), %rax movslq %ecx, %rcx shlq %rcx addq 0x38(%rsp), %rcx movq %rcx, 0x38(%rsp) addq $0x10, %rax addq $0x20, %rax movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rdi callq 0xd6d40 movq %rax, 0x20(%rsp) movq 0x28(%rsp), %rdi callq 0xd6d80 movq %rax, 0x18(%rsp) leaq 0x20(%rsp), %rdi leaq 0x18(%rsp), %rsi callq 0xd6de0 testb $0x1, %al jne 0xc5f58 jmp 0xc5f87 leaq 0x20(%rsp), %rdi callq 0xd6e00 movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rdi callq 0xd6e20 addq 0x38(%rsp), %rax movq %rax, 0x38(%rsp) leaq 0x20(%rsp), %rdi callq 0xd6e40 jmp 0xc5f43 movq 0x8(%rsp), %rax addq $0x10, %rax addq $0x18, %rax movq %rax, 0x50(%rsp) movl $0x0, 0x4c(%rsp) movq 0x50(%rsp), %rax movslq 0x4c(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0x34(%rsp) movl 0x34(%rsp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0xc5fcc movq 0x38(%rsp), %rax addq $0x2, %rax movq %rax, 0x38(%rsp) movq 0x8(%rsp), %rdi movq 0x38(%rsp), %rsi movq %rdi, %rdx addq $0x10, %rdx addq $0x1c, %rdx callq 0x13aa50 addq $0x58, %rsp retq nopl (%rax,%rax)
_ZNK6google8protobuf16EnumValueOptions12ByteSizeLongEv: sub rsp, 58h mov [rsp+58h+var_18], rdi mov rdi, [rsp+58h+var_18] mov [rsp+58h+var_50], rdi mov [rsp+58h+var_20], 0 add rdi, 10h; this call _ZNK6google8protobuf8internal12ExtensionSet8ByteSizeEv; google::protobuf::internal::ExtensionSet::ByteSize(void) mov rdi, [rsp+58h+var_50]; this add rax, [rsp+58h+var_20] mov [rsp+58h+var_20], rax mov [rsp+58h+var_24], 0 call _ZNK6google8protobuf16EnumValueOptions35_internal_uninterpreted_option_sizeEv; google::protobuf::EnumValueOptions::_internal_uninterpreted_option_size(void) mov ecx, eax mov rax, [rsp+58h+var_50] movsxd rcx, ecx shl rcx, 1 add rcx, [rsp+58h+var_20] mov [rsp+58h+var_20], rcx add rax, 10h add rax, 20h ; ' ' mov [rsp+58h+var_30], rax mov rdi, [rsp+58h+var_30] call _ZNK6google8protobuf16RepeatedPtrFieldINS0_19UninterpretedOptionEE5beginEv; google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::begin(void) mov [rsp+58h+var_38], rax mov rdi, [rsp+58h+var_30] call _ZNK6google8protobuf16RepeatedPtrFieldINS0_19UninterpretedOptionEE3endEv; google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::end(void) mov [rsp+58h+var_40], rax loc_C5F43: lea rdi, [rsp+58h+var_38] lea rsi, [rsp+58h+var_40] call _ZN6google8protobuf8internalneERKNS1_19RepeatedPtrIteratorIKNS0_19UninterpretedOptionEEES7_; google::protobuf::internal::operator!=(google::protobuf::internal::RepeatedPtrIterator<google::protobuf::UninterpretedOption const> const&,google::protobuf::internal::RepeatedPtrIterator<google::protobuf::UninterpretedOption const> const&) test al, 1 jnz short loc_C5F58 jmp short loc_C5F87 loc_C5F58: lea rdi, [rsp+58h+var_38] call _ZNK6google8protobuf8internal19RepeatedPtrIteratorIKNS0_19UninterpretedOptionEEdeEv; google::protobuf::internal::RepeatedPtrIterator<google::protobuf::UninterpretedOption const>::operator*(void) mov [rsp+58h+var_48], rax mov rdi, [rsp+58h+var_48] call _ZN6google8protobuf8internal14WireFormatLite11MessageSizeINS0_19UninterpretedOptionEEEmRKT_; google::protobuf::internal::WireFormatLite::MessageSize<google::protobuf::UninterpretedOption>(google::protobuf::UninterpretedOption const&) add rax, [rsp+58h+var_20] mov [rsp+58h+var_20], rax lea rdi, [rsp+58h+var_38] call _ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_19UninterpretedOptionEEppEv; google::protobuf::internal::RepeatedPtrIterator<google::protobuf::UninterpretedOption const>::operator++(void) jmp short loc_C5F43 loc_C5F87: mov rax, [rsp+58h+var_50] add rax, 10h add rax, 18h mov [rsp+58h+var_8], rax mov [rsp+58h+var_C], 0 mov rax, [rsp+58h+var_8] movsxd rcx, [rsp+58h+var_C] mov eax, [rax+rcx*4] mov [rsp+58h+var_24], eax mov eax, [rsp+58h+var_24] and eax, 1 cmp eax, 0 jz short loc_C5FCC mov rax, [rsp+58h+var_20] add rax, 2 mov [rsp+58h+var_20], rax loc_C5FCC: mov rdi, [rsp+58h+var_50]; this mov rsi, [rsp+58h+var_20]; unsigned __int64 mov rdx, rdi add rdx, 10h add rdx, 1Ch; google::protobuf::internal::CachedSize * call _ZNK6google8protobuf7Message29MaybeComputeUnknownFieldsSizeEmPNS0_8internal10CachedSizeE; google::protobuf::Message::MaybeComputeUnknownFieldsSize(ulong,google::protobuf::internal::CachedSize *) add rsp, 58h retn
long long google::protobuf::EnumValueOptions::ByteSizeLong(google::protobuf::EnumValueOptions *this) { long long v1; // rax long long v3; // [rsp+10h] [rbp-48h] long long v4; // [rsp+18h] [rbp-40h] BYREF _QWORD v5[2]; // [rsp+20h] [rbp-38h] BYREF int v6; // [rsp+34h] [rbp-24h] unsigned long long v7; // [rsp+38h] [rbp-20h] google::protobuf::EnumValueOptions *v8; // [rsp+40h] [rbp-18h] int v9; // [rsp+4Ch] [rbp-Ch] char *v10; // [rsp+50h] [rbp-8h] v8 = this; v7 = google::protobuf::internal::ExtensionSet::ByteSize((google::protobuf::EnumValueOptions *)((char *)this + 16)); v6 = 0; v7 += 2LL * (int)google::protobuf::EnumValueOptions::_internal_uninterpreted_option_size(this); v5[1] = (char *)this + 48; v5[0] = google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::begin((char *)this + 48); v4 = google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::end((char *)this + 48); while ( (google::protobuf::internal::operator!=(v5, &v4) & 1) != 0 ) { v3 = google::protobuf::internal::RepeatedPtrIterator<google::protobuf::UninterpretedOption const>::operator*(v5); v1 = google::protobuf::internal::WireFormatLite::MessageSize<google::protobuf::UninterpretedOption>(v3); v7 += v1; google::protobuf::internal::RepeatedPtrIterator<google::protobuf::UninterpretedOption const>::operator++(v5); } v10 = (char *)this + 40; v9 = 0; v6 = *((_DWORD *)this + 10); if ( (v6 & 1) != 0 ) v7 += 2LL; return google::protobuf::Message::MaybeComputeUnknownFieldsSize( this, v7, (google::protobuf::EnumValueOptions *)((char *)this + 44)); }
ByteSizeLong: SUB RSP,0x58 MOV qword ptr [RSP + 0x40],RDI MOV RDI,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x8],RDI MOV qword ptr [RSP + 0x38],0x0 ADD RDI,0x10 CALL 0x002a13c0 MOV RDI,qword ptr [RSP + 0x8] ADD RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x38],RAX MOV dword ptr [RSP + 0x34],0x0 CALL 0x001a1800 MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x8] MOVSXD RCX,ECX SHL RCX,0x1 ADD RCX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x38],RCX ADD RAX,0x10 ADD RAX,0x20 MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x28] CALL 0x001d6d40 MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0x28] CALL 0x001d6d80 MOV qword ptr [RSP + 0x18],RAX LAB_001c5f43: LEA RDI,[RSP + 0x20] LEA RSI,[RSP + 0x18] CALL 0x001d6de0 TEST AL,0x1 JNZ 0x001c5f58 JMP 0x001c5f87 LAB_001c5f58: LEA RDI,[RSP + 0x20] CALL 0x001d6e00 MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x10] CALL 0x001d6e20 ADD RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x38],RAX LEA RDI,[RSP + 0x20] CALL 0x001d6e40 JMP 0x001c5f43 LAB_001c5f87: MOV RAX,qword ptr [RSP + 0x8] ADD RAX,0x10 ADD RAX,0x18 MOV qword ptr [RSP + 0x50],RAX MOV dword ptr [RSP + 0x4c],0x0 MOV RAX,qword ptr [RSP + 0x50] MOVSXD RCX,dword ptr [RSP + 0x4c] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x34],EAX MOV EAX,dword ptr [RSP + 0x34] AND EAX,0x1 CMP EAX,0x0 JZ 0x001c5fcc MOV RAX,qword ptr [RSP + 0x38] ADD RAX,0x2 MOV qword ptr [RSP + 0x38],RAX LAB_001c5fcc: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,RDI ADD RDX,0x10 ADD RDX,0x1c CALL 0x0023aa50 ADD RSP,0x58 RET
/* google::protobuf::EnumValueOptions::ByteSizeLong() const */ void __thiscall google::protobuf::EnumValueOptions::ByteSizeLong(EnumValueOptions *this) { int iVar1; long lVar2; ulong uVar3; UninterpretedOption *pUVar4; int8 local_40; int8 local_38; RepeatedPtrField<google::protobuf::UninterpretedOption> *local_30; uint local_24; ulong local_20; EnumValueOptions *local_18; int4 local_c; EnumValueOptions *local_8; local_20 = 0; local_18 = this; lVar2 = internal::ExtensionSet::ByteSize((ExtensionSet *)(this + 0x10)); local_20 = lVar2 + local_20; local_24 = 0; iVar1 = _internal_uninterpreted_option_size(this); local_20 = (long)iVar1 * 2 + local_20; local_30 = (RepeatedPtrField<google::protobuf::UninterpretedOption> *)(this + 0x30); local_38 = RepeatedPtrField<google::protobuf::UninterpretedOption>::begin(local_30); local_40 = RepeatedPtrField<google::protobuf::UninterpretedOption>::end(local_30); while( true ) { uVar3 = internal::operator!=((RepeatedPtrIterator *)&local_38,(RepeatedPtrIterator *)&local_40); if ((uVar3 & 1) == 0) break; pUVar4 = (UninterpretedOption *) internal::RepeatedPtrIterator<google::protobuf::UninterpretedOption_const>::operator* ((RepeatedPtrIterator<google::protobuf::UninterpretedOption_const> *) &local_38); uVar3 = internal::WireFormatLite::MessageSize<google::protobuf::UninterpretedOption>(pUVar4); local_20 = uVar3 + local_20; internal::RepeatedPtrIterator<google::protobuf::UninterpretedOption_const>::operator++ ((RepeatedPtrIterator<google::protobuf::UninterpretedOption_const> *)&local_38); } local_8 = this + 0x28; local_c = 0; local_24 = *(uint *)local_8; if ((local_24 & 1) != 0) { local_20 = local_20 + 2; } Message::MaybeComputeUnknownFieldsSize((Message *)this,local_20,(CachedSize *)(this + 0x2c)); return; }
10,335
my_setwd
eloqsql/mysys/my_getwd.c
int my_setwd(const char *dir, myf MyFlags) { int res; size_t length; char *start, *pos; DBUG_ENTER("my_setwd"); DBUG_PRINT("my",("dir: '%s' MyFlags %lu", dir, MyFlags)); start=(char *) dir; if (! dir[0] || (dir[0] == FN_LIBCHAR && dir[1] == 0)) dir=FN_ROOTDIR; if ((res=chdir((char*) dir)) != 0) { my_errno=errno; if (MyFlags & MY_WME) my_error(EE_SETWD,MYF(ME_BELL),start,errno); } else { if (test_if_hard_path(start)) { /* Hard pathname */ pos= strmake(&curr_dir[0],start,(size_t) FN_REFLEN-1); if (pos[-1] != FN_LIBCHAR) { length=(uint) (pos-(char*) curr_dir); curr_dir[length]=FN_LIBCHAR; /* must end with '/' */ curr_dir[length+1]='\0'; } } else curr_dir[0]='\0'; /* Don't save name */ } DBUG_RETURN(res); }
O3
c
my_setwd: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r15 movq %rdi, %r14 movzbl (%rdi), %eax testl %eax, %eax je 0x9f5df movq %r14, %rdi cmpl $0x2f, %eax jne 0x9f5e6 cmpb $0x0, 0x1(%r14) movq %r14, %rdi jne 0x9f5e6 leaq 0x3f193(%rip), %rdi # 0xde779 callq 0x29960 movl %eax, %ebx testl %eax, %eax je 0x9f624 callq 0x297b0 movq %rax, %r12 movl (%rax), %r13d callq 0xa29fe movl %r13d, (%rax) testb $0x10, %r15b je 0x9f681 movl (%r12), %ecx movl $0x4, %esi movl $0x11, %edi movq %r14, %rdx xorl %eax, %eax callq 0x9f0b3 jmp 0x9f681 leaq 0xb6aa1d(%rip), %rax # 0xc0a048 movq (%rax), %rax movq %r14, %rcx movzbl (%rcx), %edx cmpl $0x7e, %edx jne 0x9f649 cmpb $0x2f, 0x1(%rcx) jne 0x9f677 movq %rax, %rcx testq %rax, %rax jne 0x9f631 jmp 0x9f677 cmpl $0x2f, %edx jne 0x9f677 leaq 0xb6aa0b(%rip), %r15 # 0xc0a060 movl $0x1ff, %edx # imm = 0x1FF movq %r15, %rdi movq %r14, %rsi callq 0xd80b4 cmpb $0x2f, -0x1(%rax) je 0x9f681 subl %r15d, %eax movw $0x2f, (%r15,%rax) jmp 0x9f681 leaq 0xb6a9e2(%rip), %rax # 0xc0a060 movb $0x0, (%rax) movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_setwd: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r15, rsi mov r14, rdi movzx eax, byte ptr [rdi] test eax, eax jz short loc_9F5DF mov rdi, r14 cmp eax, 2Fh ; '/' jnz short loc_9F5E6 cmp byte ptr [r14+1], 0 mov rdi, r14 jnz short loc_9F5E6 loc_9F5DF: lea rdi, unk_DE779 loc_9F5E6: call _chdir mov ebx, eax test eax, eax jz short loc_9F624 call ___errno_location mov r12, rax mov r13d, [rax] call _my_thread_var mov [rax], r13d test r15b, 10h jz short loc_9F681 mov ecx, [r12] mov esi, 4 mov edi, 11h mov rdx, r14 xor eax, eax call my_error jmp short loc_9F681 loc_9F624: lea rax, home_dir mov rax, [rax] mov rcx, r14 loc_9F631: movzx edx, byte ptr [rcx] cmp edx, 7Eh ; '~' jnz short loc_9F649 cmp byte ptr [rcx+1], 2Fh ; '/' jnz short loc_9F677 mov rcx, rax test rax, rax jnz short loc_9F631 jmp short loc_9F677 loc_9F649: cmp edx, 2Fh ; '/' jnz short loc_9F677 lea r15, curr_dir mov edx, 1FFh mov rdi, r15 mov rsi, r14 call strmake cmp byte ptr [rax-1], 2Fh ; '/' jz short loc_9F681 sub eax, r15d mov word ptr [r15+rax], 2Fh ; '/' jmp short loc_9F681 loc_9F677: lea rax, curr_dir mov byte ptr [rax], 0 loc_9F681: mov eax, ebx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_setwd(unsigned __int8 *a1, const char *a2) { unsigned __int8 *v2; // r14 unsigned int v3; // ebx unsigned int *v4; // r12 unsigned int v5; // r13d unsigned __int8 *v6; // rcx int v7; // edx long long v8; // rax v2 = a1; if ( !*a1 || *a1 == 47 && !a1[1] ) a1 = (unsigned __int8 *)&unk_DE779; v3 = chdir(a1); if ( v3 ) { v4 = (unsigned int *)__errno_location(a1); v5 = *v4; *(_DWORD *)my_thread_var(a1, a2) = v5; if ( ((unsigned __int8)a2 & 0x10) != 0 ) my_error(0x11u, 4LL, v2, *v4); } else { v6 = v2; while ( 1 ) { v7 = *v6; if ( v7 != 126 ) break; if ( v6[1] == 47 ) { v6 = (unsigned __int8 *)home_dir; if ( home_dir ) continue; } goto LABEL_16; } if ( v7 != 47 ) { LABEL_16: curr_dir[0] = 0; return v3; } v8 = strmake(curr_dir, v2, 511LL); if ( *(_BYTE *)(v8 - 1) != 47 ) *(_WORD *)&curr_dir[(unsigned int)v8 - (unsigned int)curr_dir] = 47; } return v3; }
my_setwd: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,RSI MOV R14,RDI MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JZ 0x0019f5df MOV RDI,R14 CMP EAX,0x2f JNZ 0x0019f5e6 CMP byte ptr [R14 + 0x1],0x0 MOV RDI,R14 JNZ 0x0019f5e6 LAB_0019f5df: LEA RDI,[0x1de779] LAB_0019f5e6: CALL 0x00129960 MOV EBX,EAX TEST EAX,EAX JZ 0x0019f624 CALL 0x001297b0 MOV R12,RAX MOV R13D,dword ptr [RAX] CALL 0x001a29fe MOV dword ptr [RAX],R13D TEST R15B,0x10 JZ 0x0019f681 MOV ECX,dword ptr [R12] MOV ESI,0x4 MOV EDI,0x11 MOV RDX,R14 XOR EAX,EAX CALL 0x0019f0b3 JMP 0x0019f681 LAB_0019f624: LEA RAX,[0xd0a048] MOV RAX,qword ptr [RAX] MOV RCX,R14 LAB_0019f631: MOVZX EDX,byte ptr [RCX] CMP EDX,0x7e JNZ 0x0019f649 CMP byte ptr [RCX + 0x1],0x2f JNZ 0x0019f677 MOV RCX,RAX TEST RAX,RAX JNZ 0x0019f631 JMP 0x0019f677 LAB_0019f649: CMP EDX,0x2f JNZ 0x0019f677 LEA R15,[0xd0a060] MOV EDX,0x1ff MOV RDI,R15 MOV RSI,R14 CALL 0x001d80b4 CMP byte ptr [RAX + -0x1],0x2f JZ 0x0019f681 SUB EAX,R15D MOV word ptr [R15 + RAX*0x1],0x2f JMP 0x0019f681 LAB_0019f677: LEA RAX,[0xd0a060] MOV byte ptr [RAX],0x0 LAB_0019f681: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int my_setwd(char *param_1,ulong param_2) { int iVar1; int iVar2; int *piVar3; int *piVar4; long lVar5; char *pcVar6; if ((*param_1 == '\0') || ((pcVar6 = param_1, *param_1 == '/' && (param_1[1] == '\0')))) { pcVar6 = "/"; } iVar2 = chdir(pcVar6); pcVar6 = param_1; if (iVar2 == 0) { while (*pcVar6 == '~') { if ((pcVar6[1] != '/') || (pcVar6 = home_dir, home_dir == (char *)0x0)) goto LAB_0019f677; } if (*pcVar6 == '/') { lVar5 = strmake(&curr_dir,param_1,0x1ff); if (*(char *)(lVar5 + -1) == '/') { return 0; } *(int2 *)(&curr_dir + ((int)lVar5 - 0xd0a060)) = 0x2f; return 0; } LAB_0019f677: curr_dir = 0; } else { piVar3 = __errno_location(); iVar1 = *piVar3; piVar4 = (int *)_my_thread_var(); *piVar4 = iVar1; if ((param_2 & 0x10) != 0) { my_error(0x11,4,param_1,*piVar3); } } return iVar2; }
10,336
int testing::internal::AppropriateResolution<double>(double)
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/include/gtest/gtest-printers.h
int AppropriateResolution(FloatType val) { int full = std::numeric_limits<FloatType>::max_digits10; if (val < 0) val = -val; #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wfloat-equal" #endif if (val < 1000000) { FloatType mulfor6 = 1e10; // Without these static casts, the template instantiation for float would // fail to compile when -Wdouble-promotion is enabled, as the arithmetic and // comparison logic would promote floats to doubles. if (val >= static_cast<FloatType>(100000.0)) { // 100,000 to 999,999 mulfor6 = 1.0; } else if (val >= static_cast<FloatType>(10000.0)) { mulfor6 = 1e1; } else if (val >= static_cast<FloatType>(1000.0)) { mulfor6 = 1e2; } else if (val >= static_cast<FloatType>(100.0)) { mulfor6 = 1e3; } else if (val >= static_cast<FloatType>(10.0)) { mulfor6 = 1e4; } else if (val >= static_cast<FloatType>(1.0)) { mulfor6 = 1e5; } else if (val >= static_cast<FloatType>(0.1)) { mulfor6 = 1e6; } else if (val >= static_cast<FloatType>(0.01)) { mulfor6 = 1e7; } else if (val >= static_cast<FloatType>(0.001)) { mulfor6 = 1e8; } else if (val >= static_cast<FloatType>(0.0001)) { mulfor6 = 1e9; } if (static_cast<FloatType>(static_cast<int32_t>( val * mulfor6 + (static_cast<FloatType>(0.5)))) / mulfor6 == val) return 6; } else if (val < static_cast<FloatType>(1e10)) { FloatType divfor6 = static_cast<FloatType>(1.0); if (val >= static_cast<FloatType>(1e9)) { // 1,000,000,000 to 9,999,999,999 divfor6 = 10000; } else if (val >= static_cast<FloatType>(1e8)) { // 100,000,000 to 999,999,999 divfor6 = 1000; } else if (val >= static_cast<FloatType>(1e7)) { // 10,000,000 to 99,999,999 divfor6 = 100; } else if (val >= static_cast<FloatType>(1e6)) { // 1,000,000 to 9,999,999 divfor6 = 10; } if (static_cast<FloatType>(static_cast<int32_t>( val / divfor6 + (static_cast<FloatType>(0.5)))) * divfor6 == val) return 6; } #ifdef __GNUC__ #pragma GCC diagnostic pop #endif return full; }
O1
c
int testing::internal::AppropriateResolution<double>(double): movapd 0x31686(%rip), %xmm1 # 0x400a0 xorpd %xmm0, %xmm1 maxsd %xmm0, %xmm1 movsd 0x315ee(%rip), %xmm0 # 0x40018 ucomisd %xmm1, %xmm0 jbe 0xeacd ucomisd 0x31634(%rip), %xmm1 # 0x40070 jae 0xeb11 ucomisd 0x315de(%rip), %xmm1 # 0x40028 jae 0xeb1b ucomisd 0x315e0(%rip), %xmm1 # 0x40038 jae 0xeb2f ucomisd 0x315e2(%rip), %xmm1 # 0x40048 jae 0xeb43 ucomisd 0x315ec(%rip), %xmm1 # 0x40060 jae 0xeb57 ucomisd 0x315d6(%rip), %xmm1 # 0x40058 jae 0xeb87 ucomisd 0x315e8(%rip), %xmm1 # 0x40078 jae 0xeb8f ucomisd 0x315e2(%rip), %xmm1 # 0x40080 jae 0xebbf ucomisd 0x315dc(%rip), %xmm1 # 0x40088 jae 0xebc9 ucomisd 0x315d6(%rip), %xmm1 # 0x40090 jae 0xebd3 movsd 0x31558(%rip), %xmm0 # 0x40020 jmp 0xeb8f movsd 0x3154b(%rip), %xmm0 # 0x40020 ucomisd %xmm1, %xmm0 jbe 0xebb3 ucomisd 0x31549(%rip), %xmm1 # 0x40030 jae 0xeb25 ucomisd 0x3154f(%rip), %xmm1 # 0x40040 jae 0xeb39 ucomisd 0x31555(%rip), %xmm1 # 0x40050 jae 0xeb4d ucomisd 0x31513(%rip), %xmm1 # 0x40018 jae 0xeb61 movsd 0x31549(%rip), %xmm0 # 0x40058 jmp 0xeb69 movsd 0x3153f(%rip), %xmm0 # 0x40058 jmp 0xeb8f movsd 0x3153d(%rip), %xmm0 # 0x40060 jmp 0xeb8f movsd 0x314fb(%rip), %xmm0 # 0x40028 jmp 0xeb69 movsd 0x31511(%rip), %xmm0 # 0x40048 jmp 0xeb8f movsd 0x314f7(%rip), %xmm0 # 0x40038 jmp 0xeb69 movsd 0x314ed(%rip), %xmm0 # 0x40038 jmp 0xeb8f movsd 0x314f3(%rip), %xmm0 # 0x40048 jmp 0xeb69 movsd 0x314c9(%rip), %xmm0 # 0x40028 jmp 0xeb8f movsd 0x314f7(%rip), %xmm0 # 0x40060 movapd %xmm1, %xmm2 divsd %xmm0, %xmm2 addsd 0x314ef(%rip), %xmm2 # 0x40068 cvttpd2dq %xmm2, %xmm2 cvtdq2pd %xmm2, %xmm2 mulsd %xmm0, %xmm2 jmp 0xebab movsd 0x314e1(%rip), %xmm0 # 0x40070 movapd %xmm1, %xmm2 mulsd %xmm0, %xmm2 addsd 0x314c9(%rip), %xmm2 # 0x40068 cvttpd2dq %xmm2, %xmm2 cvtdq2pd %xmm2, %xmm2 divsd %xmm0, %xmm2 ucomisd %xmm1, %xmm2 jne 0xebb3 jnp 0xebb9 movl $0x11, %eax retq movl $0x6, %eax retq movsd 0x31489(%rip), %xmm0 # 0x40050 jmp 0xeb8f movsd 0x3146f(%rip), %xmm0 # 0x40040 jmp 0xeb8f movsd 0x31455(%rip), %xmm0 # 0x40030 jmp 0xeb8f
_ZN7testing8internal21AppropriateResolutionIdEEiT_: movapd xmm1, cs:xmmword_400A0 xorpd xmm1, xmm0 maxsd xmm1, xmm0 movsd xmm0, cs:qword_40018 ucomisd xmm0, xmm1 jbe loc_EACD ucomisd xmm1, cs:qword_40070 jnb loc_EB11 ucomisd xmm1, cs:qword_40028 jnb loc_EB1B ucomisd xmm1, cs:qword_40038 jnb loc_EB2F ucomisd xmm1, cs:qword_40048 jnb loc_EB43 ucomisd xmm1, cs:qword_40060 jnb loc_EB57 ucomisd xmm1, cs:qword_40058 jnb loc_EB87 ucomisd xmm1, cs:qword_40078 jnb loc_EB8F ucomisd xmm1, cs:qword_40080 jnb loc_EBBF ucomisd xmm1, cs:qword_40088 jnb loc_EBC9 ucomisd xmm1, cs:qword_40090 jnb loc_EBD3 movsd xmm0, cs:qword_40020 jmp loc_EB8F loc_EACD: movsd xmm0, cs:qword_40020 ucomisd xmm0, xmm1 jbe loc_EBB3 ucomisd xmm1, cs:qword_40030 jnb short loc_EB25 ucomisd xmm1, cs:qword_40040 jnb short loc_EB39 ucomisd xmm1, cs:qword_40050 jnb short loc_EB4D ucomisd xmm1, cs:qword_40018 jnb short loc_EB61 movsd xmm0, cs:qword_40058 jmp short loc_EB69 loc_EB11: movsd xmm0, cs:qword_40058 jmp short loc_EB8F loc_EB1B: movsd xmm0, cs:qword_40060 jmp short loc_EB8F loc_EB25: movsd xmm0, cs:qword_40028 jmp short loc_EB69 loc_EB2F: movsd xmm0, cs:qword_40048 jmp short loc_EB8F loc_EB39: movsd xmm0, cs:qword_40038 jmp short loc_EB69 loc_EB43: movsd xmm0, cs:qword_40038 jmp short loc_EB8F loc_EB4D: movsd xmm0, cs:qword_40048 jmp short loc_EB69 loc_EB57: movsd xmm0, cs:qword_40028 jmp short loc_EB8F loc_EB61: movsd xmm0, cs:qword_40060 loc_EB69: movapd xmm2, xmm1 divsd xmm2, xmm0 addsd xmm2, cs:qword_40068 cvttpd2dq xmm2, xmm2 cvtdq2pd xmm2, xmm2 mulsd xmm2, xmm0 jmp short loc_EBAB loc_EB87: movsd xmm0, cs:qword_40070 loc_EB8F: movapd xmm2, xmm1 mulsd xmm2, xmm0 addsd xmm2, cs:qword_40068 cvttpd2dq xmm2, xmm2 cvtdq2pd xmm2, xmm2 divsd xmm2, xmm0 loc_EBAB: ucomisd xmm2, xmm1 jnz short loc_EBB3 jnp short loc_EBB9 loc_EBB3: mov eax, 11h retn loc_EBB9: mov eax, 6 retn loc_EBBF: movsd xmm0, cs:qword_40050 jmp short loc_EB8F loc_EBC9: movsd xmm0, cs:qword_40040 jmp short loc_EB8F loc_EBD3: movsd xmm0, cs:qword_40030 jmp short loc_EB8F
long long testing::internal::AppropriateResolution<double>(__m128d a1) { __m128d v1; // xmm1 double v2; // xmm0_8 double v3; // xmm0_8 __m128d v4; // xmm2 double v5; // xmm2_8 __m128d v6; // xmm2 v1 = _mm_xor_pd((__m128d)xmmword_400A0, a1); v1.m128d_f64[0] = fmax(v1.m128d_f64[0], a1.m128d_f64[0]); v2 = 1000000.0; if ( v1.m128d_f64[0] >= 1000000.0 ) { if ( v1.m128d_f64[0] >= 1.0e10 ) return 17LL; if ( v1.m128d_f64[0] >= 1000000000.0 ) { v3 = 10000.0; } else if ( v1.m128d_f64[0] >= 100000000.0 ) { v3 = 1000.0; } else if ( v1.m128d_f64[0] >= 10000000.0 ) { v3 = 100.0; } else if ( v1.m128d_f64[0] >= 1000000.0 ) { v3 = 10.0; } else { v3 = 1.0; } v4.m128d_f64[1] = v1.m128d_f64[1]; v4.m128d_f64[0] = v1.m128d_f64[0] / v3 + 0.5; v5 = _mm_cvtepi32_pd(_mm_cvttpd_epi32(v4)).m128d_f64[0] * v3; } else { if ( v1.m128d_f64[0] >= 100000.0 ) { v2 = 1.0; } else if ( v1.m128d_f64[0] >= 10000.0 ) { v2 = 10.0; } else if ( v1.m128d_f64[0] >= 1000.0 ) { v2 = 100.0; } else if ( v1.m128d_f64[0] >= 100.0 ) { v2 = 1000.0; } else if ( v1.m128d_f64[0] >= 10.0 ) { v2 = 10000.0; } else if ( v1.m128d_f64[0] >= 1.0 ) { v2 = 100000.0; } else if ( v1.m128d_f64[0] < 0.1 ) { if ( v1.m128d_f64[0] >= 0.01 ) { v2 = 10000000.0; } else if ( v1.m128d_f64[0] >= 0.001 ) { v2 = 100000000.0; } else if ( v1.m128d_f64[0] >= 0.0001 ) { v2 = 1000000000.0; } else { v2 = 1.0e10; } } v6.m128d_f64[1] = v1.m128d_f64[1]; v6.m128d_f64[0] = v1.m128d_f64[0] * v2 + 0.5; v5 = _mm_cvtepi32_pd(_mm_cvttpd_epi32(v6)).m128d_f64[0] / v2; } if ( v5 == v1.m128d_f64[0] ) return 6LL; return 17LL; }
AppropriateResolution<double>: MOVAPD XMM1,xmmword ptr [0x001400a0] XORPD XMM1,XMM0 MAXSD XMM1,XMM0 MOVSD XMM0,qword ptr [0x00140018] UCOMISD XMM0,XMM1 JBE 0x0010eacd UCOMISD XMM1,qword ptr [0x00140070] JNC 0x0010eb11 UCOMISD XMM1,qword ptr [0x00140028] JNC 0x0010eb1b UCOMISD XMM1,qword ptr [0x00140038] JNC 0x0010eb2f UCOMISD XMM1,qword ptr [0x00140048] JNC 0x0010eb43 UCOMISD XMM1,qword ptr [0x00140060] JNC 0x0010eb57 UCOMISD XMM1,qword ptr [0x00140058] JNC 0x0010eb87 UCOMISD XMM1,qword ptr [0x00140078] JNC 0x0010eb8f UCOMISD XMM1,qword ptr [0x00140080] JNC 0x0010ebbf UCOMISD XMM1,qword ptr [0x00140088] JNC 0x0010ebc9 UCOMISD XMM1,qword ptr [0x00140090] JNC 0x0010ebd3 MOVSD XMM0,qword ptr [0x00140020] JMP 0x0010eb8f LAB_0010eacd: MOVSD XMM0,qword ptr [0x00140020] UCOMISD XMM0,XMM1 JBE 0x0010ebb3 UCOMISD XMM1,qword ptr [0x00140030] JNC 0x0010eb25 UCOMISD XMM1,qword ptr [0x00140040] JNC 0x0010eb39 UCOMISD XMM1,qword ptr [0x00140050] JNC 0x0010eb4d UCOMISD XMM1,qword ptr [0x00140018] JNC 0x0010eb61 MOVSD XMM0,qword ptr [0x00140058] JMP 0x0010eb69 LAB_0010eb11: MOVSD XMM0,qword ptr [0x00140058] JMP 0x0010eb8f LAB_0010eb1b: MOVSD XMM0,qword ptr [0x00140060] JMP 0x0010eb8f LAB_0010eb25: MOVSD XMM0,qword ptr [0x00140028] JMP 0x0010eb69 LAB_0010eb2f: MOVSD XMM0,qword ptr [0x00140048] JMP 0x0010eb8f LAB_0010eb39: MOVSD XMM0,qword ptr [0x00140038] JMP 0x0010eb69 LAB_0010eb43: MOVSD XMM0,qword ptr [0x00140038] JMP 0x0010eb8f LAB_0010eb4d: MOVSD XMM0,qword ptr [0x00140048] JMP 0x0010eb69 LAB_0010eb57: MOVSD XMM0,qword ptr [0x00140028] JMP 0x0010eb8f LAB_0010eb61: MOVSD XMM0,qword ptr [0x00140060] LAB_0010eb69: MOVAPD XMM2,XMM1 DIVSD XMM2,XMM0 ADDSD XMM2,qword ptr [0x00140068] CVTTPD2DQ XMM2,XMM2 CVTDQ2PD XMM2,XMM2 MULSD XMM2,XMM0 JMP 0x0010ebab LAB_0010eb87: MOVSD XMM0,qword ptr [0x00140070] LAB_0010eb8f: MOVAPD XMM2,XMM1 MULSD XMM2,XMM0 ADDSD XMM2,qword ptr [0x00140068] CVTTPD2DQ XMM2,XMM2 CVTDQ2PD XMM2,XMM2 DIVSD XMM2,XMM0 LAB_0010ebab: UCOMISD XMM2,XMM1 JNZ 0x0010ebb3 JNP 0x0010ebb9 LAB_0010ebb3: MOV EAX,0x11 RET LAB_0010ebb9: MOV EAX,0x6 RET LAB_0010ebbf: MOVSD XMM0,qword ptr [0x00140050] JMP 0x0010eb8f LAB_0010ebc9: MOVSD XMM0,qword ptr [0x00140040] JMP 0x0010eb8f LAB_0010ebd3: MOVSD XMM0,qword ptr [0x00140030] JMP 0x0010eb8f
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* int testing::internal::AppropriateResolution<double>(double) */ int testing::internal::AppropriateResolution<double>(double param_1) { double dVar1; double dVar2; dVar1 = (double)(_DAT_001400a0 ^ (ulong)param_1); if ((double)(_DAT_001400a0 ^ (ulong)param_1) <= param_1) { dVar1 = param_1; } if (DAT_00140018 <= dVar1) { if (DAT_00140020 <= dVar1) { return 0x11; } dVar2 = DAT_00140028; if ((((dVar1 < DAT_00140030) && (dVar2 = DAT_00140038, dVar1 < DAT_00140040)) && (dVar2 = DAT_00140048, dVar1 < DAT_00140050)) && (dVar2 = DAT_00140060, dVar1 < DAT_00140018)) { dVar2 = DAT_00140058; } dVar2 = (double)(int)(dVar1 / dVar2 + _DAT_00140068) * dVar2; } else { dVar2 = DAT_00140058; if ((((dVar1 < DAT_00140070) && (dVar2 = DAT_00140060, dVar1 < DAT_00140028)) && ((dVar2 = DAT_00140048, dVar1 < DAT_00140038 && ((dVar2 = DAT_00140038, dVar1 < DAT_00140048 && (dVar2 = DAT_00140028, dVar1 < DAT_00140060)))))) && ((dVar2 = DAT_00140070, dVar1 < DAT_00140058 && ((((dVar2 = DAT_00140018, dVar1 < _DAT_00140078 && (dVar2 = DAT_00140050, dVar1 < _DAT_00140080)) && (dVar2 = DAT_00140040, dVar1 < _DAT_00140088)) && (dVar2 = DAT_00140030, dVar1 < _DAT_00140090)))))) { dVar2 = DAT_00140020; } dVar2 = (double)(int)(dVar1 * dVar2 + _DAT_00140068) / dVar2; } if ((dVar2 == dVar1) && (!NAN(dVar2) && !NAN(dVar1))) { return 6; } return 0x11; }
10,337
my_uca_scanner_init_any
eloqsql/strings/ctype-uca.c
static void my_uca_scanner_init_any(my_uca_scanner *scanner, CHARSET_INFO *cs, const MY_UCA_WEIGHT_LEVEL *level, const uchar *str, size_t length) { /* Note, no needs to initialize scanner->wbeg */ scanner->sbeg= str; scanner->send= str + length; scanner->wbeg= nochar; scanner->level= level; scanner->cs= cs; }
O0
c
my_uca_scanner_init_any: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x20(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x20(%rbp), %rcx addq -0x28(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x8(%rbp), %rax leaq 0x163011(%rip), %rcx # 0x1c4690 movq %rcx, (%rax) movq -0x18(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x30(%rax) popq %rbp retq nopl (%rax)
my_uca_scanner_init_any: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rcx, [rbp+var_20] mov rax, [rbp+var_8] mov [rax+8], rcx mov rcx, [rbp+var_20] add rcx, [rbp+var_28] mov rax, [rbp+var_8] mov [rax+10h], rcx mov rax, [rbp+var_8] lea rcx, nochar mov [rax], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_8] mov [rax+18h], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax+30h], rcx pop rbp retn
_QWORD * my_uca_scanner_init_any(_QWORD *a1, long long a2, long long a3, long long a4, long long a5) { _QWORD *result; // rax a1[1] = a4; a1[2] = a5 + a4; *a1 = &nochar; a1[3] = a3; result = a1; a1[6] = a2; return result; }
my_uca_scanner_init_any: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x20] ADD RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x2c4690] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x18],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x30],RCX POP RBP RET
void my_uca_scanner_init_any (int8 *param_1,int8 param_2,int8 param_3,long param_4,long param_5) { param_1[1] = param_4; param_1[2] = param_4 + param_5; *param_1 = &nochar; param_1[3] = param_3; param_1[6] = param_2; return; }
10,338
bf_print_str
bluesky950520[P]quickjs/libbf.c
void bf_print_str(const char *str, const bf_t *a) { slimb_t i; printf("%s=", str); if (a->expn == BF_EXP_NAN) { printf("NaN"); } else { if (a->sign) putchar('-'); if (a->expn == BF_EXP_ZERO) { putchar('0'); } else if (a->expn == BF_EXP_INF) { printf("Inf"); } else { printf("0x0."); for(i = a->len - 1; i >= 0; i--) printf(FMT_LIMB, a->tab[i]); printf("p%" PRId_LIMB, a->expn); } } printf("\n"); }
O1
c
bf_print_str: pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %rsi leaq 0x1ddd5(%rip), %rdi # 0xa313e xorl %eax, %eax callq 0xe280 movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF cmpq %rax, 0x10(%rbx) jne 0x85389 leaq 0x1b2e0(%rip), %rdi # 0xa0667 jmp 0x853c4 cmpl $0x0, 0x8(%rbx) je 0x85399 movl $0x2d, %edi callq 0xe080 movq 0x10(%rbx), %rax movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE cmpq %rcx, %rax je 0x853bd negq %rax jno 0x853da movl $0x30, %edi callq 0xe080 jmp 0x853cb leaq 0x1dd7e(%rip), %rdi # 0xa3142 xorl %eax, %eax callq 0xe280 movl $0xa, %edi popq %rbx popq %r14 popq %r15 jmp 0xe080 leaq 0x1dd65(%rip), %rdi # 0xa3146 xorl %eax, %eax callq 0xe280 movq 0x18(%rbx), %r15 movq %r15, %rax decq %rax js 0x85416 leaq 0x1dd3c(%rip), %r14 # 0xa3137 movq 0x20(%rbx), %rax movq -0x8(%rax,%r15,8), %rsi movq %r14, %rdi xorl %eax, %eax callq 0xe280 decq %r15 testq %r15, %r15 jg 0x853fb movq 0x10(%rbx), %rsi leaq 0x1dd2a(%rip), %rdi # 0xa314b xorl %eax, %eax callq 0xe280 jmp 0x853cb
bf_print_str: push r15 push r14 push rbx mov rbx, rsi mov rsi, rdi lea rdi, aS_2; "%s=" xor eax, eax call _printf mov rax, 7FFFFFFFFFFFFFFFh cmp [rbx+10h], rax jnz short loc_85389 lea rdi, aDateValueIsNan+0Eh; "NaN" jmp short loc_853C4 loc_85389: cmp dword ptr [rbx+8], 0 jz short loc_85399 mov edi, 2Dh ; '-' call _putchar loc_85399: mov rax, [rbx+10h] mov rcx, 7FFFFFFFFFFFFFFEh cmp rax, rcx jz short loc_853BD neg rax jno short loc_853DA mov edi, 30h ; '0' call _putchar jmp short loc_853CB loc_853BD: lea rdi, aInf; "Inf" loc_853C4: xor eax, eax call _printf loc_853CB: mov edi, 0Ah pop rbx pop r14 pop r15 jmp _putchar loc_853DA: lea rdi, a0x0; "0x0." xor eax, eax call _printf mov r15, [rbx+18h] mov rax, r15 dec rax js short loc_85416 lea r14, a016lx; "%016lx" loc_853FB: mov rax, [rbx+20h] mov rsi, [rax+r15*8-8] mov rdi, r14 xor eax, eax call _printf dec r15 test r15, r15 jg short loc_853FB loc_85416: mov rsi, [rbx+10h] lea rdi, aPLd; "p%ld" xor eax, eax call _printf jmp short loc_853CB
long long bf_print_str(const char *a1, long long a2) { long long v2; // rax long long v4; // r15 printf("%s=", a1); if ( *(_QWORD *)(a2 + 16) == 0x7FFFFFFFFFFFFFFFLL ) { printf("NaN"); } else { if ( *(_DWORD *)(a2 + 8) ) putchar(45LL); v2 = *(_QWORD *)(a2 + 16); if ( v2 == 0x7FFFFFFFFFFFFFFELL ) { printf("Inf"); } else if ( __OFSUB__(-v2, 1LL) ) { putchar(48LL); } else { printf("0x0."); v4 = *(_QWORD *)(a2 + 24); if ( v4 - 1 >= 0 ) { do printf("%016lx", *(_QWORD *)(*(_QWORD *)(a2 + 32) + 8 * v4-- - 8)); while ( v4 > 0 ); } printf("p%ld", *(_QWORD *)(a2 + 16)); } } return putchar(10LL); }
10,339
bf_print_str
bluesky950520[P]quickjs/libbf.c
void bf_print_str(const char *str, const bf_t *a) { slimb_t i; printf("%s=", str); if (a->expn == BF_EXP_NAN) { printf("NaN"); } else { if (a->sign) putchar('-'); if (a->expn == BF_EXP_ZERO) { putchar('0'); } else if (a->expn == BF_EXP_INF) { printf("Inf"); } else { printf("0x0."); for(i = a->len - 1; i >= 0; i--) printf(FMT_LIMB, a->tab[i]); printf("p%" PRId_LIMB, a->expn); } } printf("\n"); }
O2
c
bf_print_str: pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %rsi leaq 0x1a3d2(%rip), %rdi # 0x8a07e xorl %eax, %eax callq 0xe290 movq 0x10(%rbx), %rax movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF cmpq %rcx, %rax jne 0x6fccf leaq 0x178d4(%rip), %rdi # 0x875a1 jmp 0x6fd06 cmpl $0x0, 0x8(%rbx) je 0x6fce1 pushq $0x2d popq %rdi callq 0xe080 movq 0x10(%rbx), %rax movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE cmpq %rcx, %rax je 0x6fcff negq %rax jno 0x6fd1a pushq $0x30 popq %rdi callq 0xe080 jmp 0x6fd0d leaq 0x1a37c(%rip), %rdi # 0x8a082 xorl %eax, %eax callq 0xe290 pushq $0xa popq %rdi popq %rbx popq %r14 popq %r15 jmp 0xe080 leaq 0x1a365(%rip), %rdi # 0x8a086 xorl %eax, %eax callq 0xe290 movq 0x18(%rbx), %r15 decq %r15 leaq 0x1a341(%rip), %r14 # 0x8a077 testq %r15, %r15 js 0x6fd52 movq 0x20(%rbx), %rax movq (%rax,%r15,8), %rsi movq %r14, %rdi xorl %eax, %eax callq 0xe290 decq %r15 jmp 0x6fd36 movq 0x10(%rbx), %rsi leaq 0x1a32e(%rip), %rdi # 0x8a08b xorl %eax, %eax callq 0xe290 jmp 0x6fd0d
bf_print_str: push r15 push r14 push rbx mov rbx, rsi mov rsi, rdi lea rdi, aS_2; "%s=" xor eax, eax call _printf mov rax, [rbx+10h] mov rcx, 7FFFFFFFFFFFFFFFh cmp rax, rcx jnz short loc_6FCCF lea rdi, aDateValueIsNan+0Eh; "NaN" jmp short loc_6FD06 loc_6FCCF: cmp dword ptr [rbx+8], 0 jz short loc_6FCE1 push 2Dh ; '-' pop rdi call _putchar mov rax, [rbx+10h] loc_6FCE1: mov rcx, 7FFFFFFFFFFFFFFEh cmp rax, rcx jz short loc_6FCFF neg rax jno short loc_6FD1A push 30h ; '0' pop rdi call _putchar jmp short loc_6FD0D loc_6FCFF: lea rdi, aInf; "Inf" loc_6FD06: xor eax, eax call _printf loc_6FD0D: push 0Ah pop rdi pop rbx pop r14 pop r15 jmp _putchar loc_6FD1A: lea rdi, a0x0; "0x0." xor eax, eax call _printf mov r15, [rbx+18h] dec r15 lea r14, a016lx; "%016lx" loc_6FD36: test r15, r15 js short loc_6FD52 mov rax, [rbx+20h] mov rsi, [rax+r15*8] mov rdi, r14 xor eax, eax call _printf dec r15 jmp short loc_6FD36 loc_6FD52: mov rsi, [rbx+10h] lea rdi, aPLd; "p%ld" xor eax, eax call _printf jmp short loc_6FD0D
long long bf_print_str(const char *a1, long long a2) { long long v2; // rax long long i; // r15 printf("%s=", a1); v2 = *(_QWORD *)(a2 + 16); if ( v2 == 0x7FFFFFFFFFFFFFFFLL ) { printf("NaN"); } else { if ( *(_DWORD *)(a2 + 8) ) { putchar(45LL); v2 = *(_QWORD *)(a2 + 16); } if ( v2 == 0x7FFFFFFFFFFFFFFELL ) { printf("Inf"); } else if ( __OFSUB__(-v2, 1LL) ) { putchar(48LL); } else { printf("0x0."); for ( i = *(_QWORD *)(a2 + 24) - 1LL; i >= 0; --i ) printf("%016lx", *(_QWORD *)(*(_QWORD *)(a2 + 32) + 8 * i)); printf("p%ld", *(_QWORD *)(a2 + 16)); } } return putchar(10LL); }
bf_print_str: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV RSI,RDI LEA RDI,[0x18a07e] XOR EAX,EAX CALL 0x0010e290 MOV RAX,qword ptr [RBX + 0x10] MOV RCX,0x7fffffffffffffff CMP RAX,RCX JNZ 0x0016fccf LEA RDI,[0x1875a1] JMP 0x0016fd06 LAB_0016fccf: CMP dword ptr [RBX + 0x8],0x0 JZ 0x0016fce1 PUSH 0x2d POP RDI CALL 0x0010e080 MOV RAX,qword ptr [RBX + 0x10] LAB_0016fce1: MOV RCX,0x7ffffffffffffffe CMP RAX,RCX JZ 0x0016fcff NEG RAX JNO 0x0016fd1a PUSH 0x30 POP RDI CALL 0x0010e080 JMP 0x0016fd0d LAB_0016fcff: LEA RDI,[0x18a082] LAB_0016fd06: XOR EAX,EAX CALL 0x0010e290 LAB_0016fd0d: PUSH 0xa POP RDI POP RBX POP R14 POP R15 JMP 0x0010e080 LAB_0016fd1a: LEA RDI,[0x18a086] XOR EAX,EAX CALL 0x0010e290 MOV R15,qword ptr [RBX + 0x18] DEC R15 LEA R14,[0x18a077] LAB_0016fd36: TEST R15,R15 JS 0x0016fd52 MOV RAX,qword ptr [RBX + 0x20] MOV RSI,qword ptr [RAX + R15*0x8] MOV RDI,R14 XOR EAX,EAX CALL 0x0010e290 DEC R15 JMP 0x0016fd36 LAB_0016fd52: MOV RSI,qword ptr [RBX + 0x10] LEA RDI,[0x18a08b] XOR EAX,EAX CALL 0x0010e290 JMP 0x0016fd0d
/* WARNING: Removing unreachable block (ram,0x0016fcf5) */ void bf_print_str(int8 param_1,long param_2) { char *__format; long lVar1; printf("%s=",param_1); lVar1 = *(long *)(param_2 + 0x10); if (lVar1 == 0x7fffffffffffffff) { __format = "NaN"; } else { if (*(int *)(param_2 + 8) != 0) { putchar(0x2d); lVar1 = *(long *)(param_2 + 0x10); } if (lVar1 != 0x7ffffffffffffffe) { printf("0x0."); lVar1 = *(long *)(param_2 + 0x18); while (lVar1 = lVar1 + -1, -1 < lVar1) { printf("%016lx",*(int8 *)(*(long *)(param_2 + 0x20) + lVar1 * 8)); } printf("p%ld",*(int8 *)(param_2 + 0x10)); goto LAB_0016fd0d; } __format = "Inf"; } printf(__format); LAB_0016fd0d: putchar(10); return; }
10,340
bf_print_str
bluesky950520[P]quickjs/libbf.c
void bf_print_str(const char *str, const bf_t *a) { slimb_t i; printf("%s=", str); if (a->expn == BF_EXP_NAN) { printf("NaN"); } else { if (a->sign) putchar('-'); if (a->expn == BF_EXP_ZERO) { putchar('0'); } else if (a->expn == BF_EXP_INF) { printf("Inf"); } else { printf("0x0."); for(i = a->len - 1; i >= 0; i--) printf(FMT_LIMB, a->tab[i]); printf("p%" PRId_LIMB, a->expn); } } printf("\n"); }
O3
c
bf_print_str: pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %rsi leaq 0x1e34f(%rip), %rdi # 0xa60ee xorl %eax, %eax callq 0xe280 movq 0x10(%rbx), %rax movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF cmpq %rcx, %rax jne 0x87dc2 leaq 0x1b851(%rip), %rdi # 0xa3611 jmp 0x87dfd cmpl $0x0, 0x8(%rbx) je 0x87dd6 movl $0x2d, %edi callq 0xe080 movq 0x10(%rbx), %rax movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE cmpq %rcx, %rax je 0x87df6 negq %rax jno 0x87e13 movl $0x30, %edi callq 0xe080 jmp 0x87e04 leaq 0x1e2f5(%rip), %rdi # 0xa60f2 xorl %eax, %eax callq 0xe280 movl $0xa, %edi popq %rbx popq %r14 popq %r15 jmp 0xe080 leaq 0x1e2dc(%rip), %rdi # 0xa60f6 xorl %eax, %eax callq 0xe280 movq 0x18(%rbx), %r15 movq %r15, %rax decq %rax js 0x87e4c leaq 0x1e2b3(%rip), %r14 # 0xa60e7 movq 0x20(%rbx), %rax movq -0x8(%rax,%r15,8), %rsi movq %r14, %rdi xorl %eax, %eax callq 0xe280 decq %r15 jne 0x87e34 movq 0x10(%rbx), %rsi leaq 0x1e2a4(%rip), %rdi # 0xa60fb xorl %eax, %eax callq 0xe280 jmp 0x87e04
bf_print_str: push r15 push r14 push rbx mov rbx, rsi mov rsi, rdi lea rdi, aS_2; "%s=" xor eax, eax call _printf mov rax, [rbx+10h] mov rcx, 7FFFFFFFFFFFFFFFh cmp rax, rcx jnz short loc_87DC2 lea rdi, aDateValueIsNan+0Eh; "NaN" jmp short loc_87DFD loc_87DC2: cmp dword ptr [rbx+8], 0 jz short loc_87DD6 mov edi, 2Dh ; '-' call _putchar mov rax, [rbx+10h] loc_87DD6: mov rcx, 7FFFFFFFFFFFFFFEh cmp rax, rcx jz short loc_87DF6 neg rax jno short loc_87E13 mov edi, 30h ; '0' call _putchar jmp short loc_87E04 loc_87DF6: lea rdi, aInf; "Inf" loc_87DFD: xor eax, eax call _printf loc_87E04: mov edi, 0Ah pop rbx pop r14 pop r15 jmp _putchar loc_87E13: lea rdi, a0x0; "0x0." xor eax, eax call _printf mov r15, [rbx+18h] mov rax, r15 dec rax js short loc_87E4C lea r14, a016lx; "%016lx" loc_87E34: mov rax, [rbx+20h] mov rsi, [rax+r15*8-8] mov rdi, r14 xor eax, eax call _printf dec r15 jnz short loc_87E34 loc_87E4C: mov rsi, [rbx+10h] lea rdi, aPLd; "p%ld" xor eax, eax call _printf jmp short loc_87E04
long long bf_print_str(const char *a1, long long a2) { long long v2; // rax long long v4; // r15 printf("%s=", a1); v2 = *(_QWORD *)(a2 + 16); if ( v2 == 0x7FFFFFFFFFFFFFFFLL ) { printf("NaN"); } else { if ( *(_DWORD *)(a2 + 8) ) { putchar(45LL); v2 = *(_QWORD *)(a2 + 16); } if ( v2 == 0x7FFFFFFFFFFFFFFELL ) { printf("Inf"); } else if ( __OFSUB__(-v2, 1LL) ) { putchar(48LL); } else { printf("0x0."); v4 = *(_QWORD *)(a2 + 24); if ( v4 - 1 >= 0 ) { do printf("%016lx", *(_QWORD *)(*(_QWORD *)(a2 + 32) + 8 * v4-- - 8)); while ( v4 ); } printf("p%ld", *(_QWORD *)(a2 + 16)); } } return putchar(10LL); }
bf_print_str: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV RSI,RDI LEA RDI,[0x1a60ee] XOR EAX,EAX CALL 0x0010e280 MOV RAX,qword ptr [RBX + 0x10] MOV RCX,0x7fffffffffffffff CMP RAX,RCX JNZ 0x00187dc2 LEA RDI,[0x1a3611] JMP 0x00187dfd LAB_00187dc2: CMP dword ptr [RBX + 0x8],0x0 JZ 0x00187dd6 MOV EDI,0x2d CALL 0x0010e080 MOV RAX,qword ptr [RBX + 0x10] LAB_00187dd6: MOV RCX,0x7ffffffffffffffe CMP RAX,RCX JZ 0x00187df6 NEG RAX JNO 0x00187e13 MOV EDI,0x30 CALL 0x0010e080 JMP 0x00187e04 LAB_00187df6: LEA RDI,[0x1a60f2] LAB_00187dfd: XOR EAX,EAX CALL 0x0010e280 LAB_00187e04: MOV EDI,0xa POP RBX POP R14 POP R15 JMP 0x0010e080 LAB_00187e13: LEA RDI,[0x1a60f6] XOR EAX,EAX CALL 0x0010e280 MOV R15,qword ptr [RBX + 0x18] MOV RAX,R15 DEC RAX JS 0x00187e4c LEA R14,[0x1a60e7] LAB_00187e34: MOV RAX,qword ptr [RBX + 0x20] MOV RSI,qword ptr [RAX + R15*0x8 + -0x8] MOV RDI,R14 XOR EAX,EAX CALL 0x0010e280 DEC R15 JNZ 0x00187e34 LAB_00187e4c: MOV RSI,qword ptr [RBX + 0x10] LEA RDI,[0x1a60fb] XOR EAX,EAX CALL 0x0010e280 JMP 0x00187e04
/* WARNING: Removing unreachable block (ram,0x00187dea) */ void bf_print_str(int8 param_1,long param_2) { char *__format; long lVar1; printf("%s=",param_1); lVar1 = *(long *)(param_2 + 0x10); if (lVar1 == 0x7fffffffffffffff) { __format = "NaN"; } else { if (*(int *)(param_2 + 8) != 0) { putchar(0x2d); lVar1 = *(long *)(param_2 + 0x10); } if (lVar1 != 0x7ffffffffffffffe) { printf("0x0."); lVar1 = *(long *)(param_2 + 0x18); if (-1 < lVar1 + -1) { do { printf("%016lx",*(int8 *)(*(long *)(param_2 + 0x20) + -8 + lVar1 * 8)); lVar1 = lVar1 + -1; } while (lVar1 != 0); } printf("p%ld",*(int8 *)(param_2 + 0x10)); goto LAB_00187e04; } __format = "Inf"; } printf(__format); LAB_00187e04: putchar(10); return; }
10,341
ma_crypt_data_pre_write_hook
eloqsql/storage/maria/ma_crypt.c
static my_bool ma_crypt_data_pre_write_hook(PAGECACHE_IO_HOOK_ARGS *args) { MARIA_SHARE *share= (MARIA_SHARE*) args->data; const uint size= share->block_size; uint key_version; uchar *crypt_buf= my_malloc(PSI_INSTRUMENT_ME, share->block_size, MYF(0)); if (crypt_buf == NULL) { args->crypt_buf= NULL; /* for post-hook */ return 1; } if (!share->base.born_transactional) { /* store a random number instead of LSN (for counter block) */ store_rand_lsn(args->page); } maria_page_crc_set_normal(args); { const uchar *src= args->page; uchar* dst= crypt_buf; uint pageno= (uint)args->pageno; LSN lsn= lsn_korr(src); const uchar page_type= src[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK; const uint head= (page_type <= TAIL_PAGE) ? PAGE_HEADER_SIZE(share) : FULL_PAGE_HEADER_SIZE(share); const uint tail= CRC_SIZE; const uint32 key_version_offset= (page_type <= TAIL_PAGE) ? KEY_VERSION_OFFSET : FULL_PAGE_KEY_VERSION_OFFSET; DBUG_ASSERT(page_type < MAX_PAGE_TYPE); /* 1 - copy head */ memcpy(dst, src, head); /* 2 - encrypt page */ if (ma_encrypt(share, share->crypt_data, src + head, dst + head, size - (head + tail), pageno, lsn, &key_version)) return 1; /* 3 - copy tail */ memcpy(dst + size - tail, src + size - tail, tail); /* 4 - store key version */ int4store(dst + key_version_offset, key_version); } /* swap pointers to instead write out the encrypted block */ args->crypt_buf= args->page; args->page= crypt_buf; return 0; }
O0
c
ma_crypt_data_pre_write_hook: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movl 0x7bc(%rax), %eax movl %eax, -0x1c(%rbp) movq -0x18(%rbp), %rax movl 0x7bc(%rax), %eax movl %eax, %esi xorl %edi, %edi xorl %eax, %eax movl %eax, %edx callq 0xfc020 movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) jne 0x8b58f movq -0x10(%rbp), %rax movq $0x0, 0x18(%rax) movb $0x1, -0x1(%rbp) jmp 0x8b715 movq -0x18(%rbp), %rax cmpb $0x0, 0x44c(%rax) jne 0x8b5a8 movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x8bda0 movq -0x10(%rbp), %rdi callq 0x431f0 movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movl %eax, -0x3c(%rbp) movq -0x30(%rbp), %rax movzbl (%rax), %eax movq -0x30(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x30(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, %eax shlq $0x20, %rax movq -0x30(%rbp), %rcx movl 0x3(%rcx), %ecx orq %rcx, %rax movq %rax, -0x48(%rbp) movq -0x30(%rbp), %rax movzbl 0x7(%rax), %eax andl $0x7, %eax movb %al, -0x49(%rbp) movzbl -0x49(%rbp), %eax cmpl $0x2, %eax jg 0x8b62d movq -0x18(%rbp), %rax movl 0xc18(%rax), %eax addl $0xc, %eax movl %eax, -0x64(%rbp) jmp 0x8b63d movq -0x18(%rbp), %rax movl 0xc18(%rax), %eax addl $0x8, %eax movl %eax, -0x64(%rbp) movl -0x64(%rbp), %eax movl %eax, -0x50(%rbp) movl $0x4, -0x54(%rbp) movzbl -0x49(%rbp), %edx movl $0x8, %eax movl $0xc, %ecx cmpl $0x2, %edx cmovlel %ecx, %eax movl %eax, -0x58(%rbp) jmp 0x8b663 movq -0x38(%rbp), %rdi movq -0x30(%rbp), %rsi movl -0x50(%rbp), %eax movl %eax, %edx callq 0x2a0b0 movq -0x18(%rbp), %rdi movq -0x18(%rbp), %rax movq 0xc20(%rax), %rsi movq -0x30(%rbp), %rdx movl -0x50(%rbp), %eax addq %rax, %rdx movq -0x38(%rbp), %rcx movl -0x50(%rbp), %eax addq %rax, %rcx movl -0x1c(%rbp), %r8d movl -0x50(%rbp), %eax addl $0x4, %eax subl %eax, %r8d movl -0x3c(%rbp), %r9d movq -0x48(%rbp), %r10 leaq -0x20(%rbp), %rax movq %r10, (%rsp) movq %rax, 0x8(%rsp) callq 0x8be50 cmpl $0x0, %eax je 0x8b6ca movb $0x1, -0x1(%rbp) jmp 0x8b715 movq -0x38(%rbp), %rax movl -0x1c(%rbp), %ecx movq -0x30(%rbp), %rdx movl -0x1c(%rbp), %esi movl -0x4(%rdx,%rsi), %edx movl %edx, -0x4(%rax,%rcx) movq -0x38(%rbp), %rax movl -0x58(%rbp), %ecx addq %rcx, %rax movq %rax, -0x60(%rbp) movl -0x20(%rbp), %ecx movq -0x60(%rbp), %rax movl %ecx, (%rax) movq -0x10(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_crypt_data_pre_write_hook: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov eax, [rax+7BCh] mov [rbp+var_1C], eax mov rax, [rbp+var_18] mov eax, [rax+7BCh] mov esi, eax xor edi, edi xor eax, eax mov edx, eax call my_malloc mov [rbp+var_28], rax cmp [rbp+var_28], 0 jnz short loc_8B58F mov rax, [rbp+var_10] mov qword ptr [rax+18h], 0 mov [rbp+var_1], 1 jmp loc_8B715 loc_8B58F: mov rax, [rbp+var_18] cmp byte ptr [rax+44Ch], 0 jnz short loc_8B5A8 mov rax, [rbp+var_10] mov rdi, [rax] call store_rand_lsn loc_8B5A8: mov rdi, [rbp+var_10] call maria_page_crc_set_normal mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_30], rax mov rax, [rbp+var_28] mov [rbp+var_38], rax mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_3C], eax mov rax, [rbp+var_30] movzx eax, byte ptr [rax] mov rcx, [rbp+var_30] movzx ecx, byte ptr [rcx+1] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_30] movzx ecx, byte ptr [rcx+2] shl ecx, 10h or eax, ecx mov eax, eax shl rax, 20h mov rcx, [rbp+var_30] mov ecx, [rcx+3] or rax, rcx mov [rbp+var_48], rax mov rax, [rbp+var_30] movzx eax, byte ptr [rax+7] and eax, 7 mov [rbp+var_49], al movzx eax, [rbp+var_49] cmp eax, 2 jg short loc_8B62D mov rax, [rbp+var_18] mov eax, [rax+0C18h] add eax, 0Ch mov [rbp+var_64], eax jmp short loc_8B63D loc_8B62D: mov rax, [rbp+var_18] mov eax, [rax+0C18h] add eax, 8 mov [rbp+var_64], eax loc_8B63D: mov eax, [rbp+var_64] mov [rbp+var_50], eax mov [rbp+var_54], 4 movzx edx, [rbp+var_49] mov eax, 8 mov ecx, 0Ch cmp edx, 2 cmovle eax, ecx mov [rbp+var_58], eax jmp short $+2 loc_8B663: mov rdi, [rbp+var_38] mov rsi, [rbp+var_30] mov eax, [rbp+var_50] mov edx, eax call _memcpy mov rdi, [rbp+var_18] mov rax, [rbp+var_18] mov rsi, [rax+0C20h] mov rdx, [rbp+var_30] mov eax, [rbp+var_50] add rdx, rax mov rcx, [rbp+var_38] mov eax, [rbp+var_50] add rcx, rax mov r8d, [rbp+var_1C] mov eax, [rbp+var_50] add eax, 4 sub r8d, eax mov r9d, [rbp+var_3C] mov r10, [rbp+var_48] lea rax, [rbp+var_20] mov [rsp+80h+var_80], r10 mov [rsp+80h+var_78], rax call ma_encrypt cmp eax, 0 jz short loc_8B6CA mov [rbp+var_1], 1 jmp short loc_8B715 loc_8B6CA: mov rax, [rbp+var_38] mov ecx, [rbp+var_1C] mov rdx, [rbp+var_30] mov esi, [rbp+var_1C] mov edx, [rdx+rsi-4] mov [rax+rcx-4], edx mov rax, [rbp+var_38] mov ecx, [rbp+var_58] add rax, rcx mov [rbp+var_60], rax mov ecx, [rbp+var_20] mov rax, [rbp+var_60] mov [rax], ecx mov rax, [rbp+var_10] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax+18h], rcx mov rcx, [rbp+var_28] mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_1], 0 loc_8B715: mov al, [rbp+var_1] add rsp, 80h pop rbp retn
char ma_crypt_data_pre_write_hook(long long *a1) { int v1; // eax int v2; // eax unsigned int v4; // [rsp+28h] [rbp-58h] unsigned int v5; // [rsp+30h] [rbp-50h] unsigned __int8 v6; // [rsp+37h] [rbp-49h] unsigned long long v7; // [rsp+38h] [rbp-48h] int v8; // [rsp+44h] [rbp-3Ch] unsigned __int16 *v9; // [rsp+50h] [rbp-30h] long long v10; // [rsp+58h] [rbp-28h] int v11; // [rsp+60h] [rbp-20h] BYREF unsigned int v12; // [rsp+64h] [rbp-1Ch] long long v13; // [rsp+68h] [rbp-18h] long long *v14; // [rsp+70h] [rbp-10h] v14 = a1; v13 = a1[2]; v12 = *(_DWORD *)(v13 + 1980); v10 = my_malloc(0LL, *(unsigned int *)(v13 + 1980), 0LL); if ( v10 ) { if ( !*(_BYTE *)(v13 + 1100) ) store_rand_lsn(*v14); maria_page_crc_set_normal(v14); v9 = (unsigned __int16 *)*v14; v8 = v14[1]; v7 = *(unsigned int *)((char *)v9 + 3) | ((unsigned long long)((*((unsigned __int8 *)v9 + 2) << 16) | (unsigned int)*v9) << 32); v6 = *(_BYTE *)(*v14 + 7) & 7; if ( v6 > 2u ) v1 = *(_DWORD *)(v13 + 3096) + 8; else v1 = *(_DWORD *)(v13 + 3096) + 12; v5 = v1; v2 = 8; if ( v6 <= 2u ) v2 = 12; v4 = v2; memcpy(v10, v9, v5); if ( (unsigned int)ma_encrypt( v13, *(_QWORD *)(v13 + 3104), v5 + (unsigned int)v9, v5 + (unsigned int)v10, v12 - (v5 + 4), v8, v7, (long long)&v11) ) { return 1; } else { *(_DWORD *)(v10 + v12 - 4) = *(_DWORD *)((char *)v9 + v12 - 4); *(_DWORD *)(v4 + v10) = v11; v14[3] = *v14; *v14 = v10; return 0; } } else { v14[3] = 0LL; return 1; } }
ma_crypt_data_pre_write_hook: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x7bc] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x7bc] MOV ESI,EAX XOR EDI,EDI XOR EAX,EAX MOV EDX,EAX CALL 0x001fc020 MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],0x0 JNZ 0x0018b58f MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],0x0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0018b715 LAB_0018b58f: MOV RAX,qword ptr [RBP + -0x18] CMP byte ptr [RAX + 0x44c],0x0 JNZ 0x0018b5a8 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x0018bda0 LAB_0018b5a8: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001431f0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x30] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x30] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 OR EAX,ECX MOV EAX,EAX SHL RAX,0x20 MOV RCX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RCX + 0x3] OR RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX + 0x7] AND EAX,0x7 MOV byte ptr [RBP + -0x49],AL MOVZX EAX,byte ptr [RBP + -0x49] CMP EAX,0x2 JG 0x0018b62d MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0xc18] ADD EAX,0xc MOV dword ptr [RBP + -0x64],EAX JMP 0x0018b63d LAB_0018b62d: MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0xc18] ADD EAX,0x8 MOV dword ptr [RBP + -0x64],EAX LAB_0018b63d: MOV EAX,dword ptr [RBP + -0x64] MOV dword ptr [RBP + -0x50],EAX MOV dword ptr [RBP + -0x54],0x4 MOVZX EDX,byte ptr [RBP + -0x49] MOV EAX,0x8 MOV ECX,0xc CMP EDX,0x2 CMOVLE EAX,ECX MOV dword ptr [RBP + -0x58],EAX JMP 0x0018b663 LAB_0018b663: MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + -0x50] MOV EDX,EAX CALL 0x0012a0b0 MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0xc20] MOV RDX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + -0x50] ADD RDX,RAX MOV RCX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RBP + -0x50] ADD RCX,RAX MOV R8D,dword ptr [RBP + -0x1c] MOV EAX,dword ptr [RBP + -0x50] ADD EAX,0x4 SUB R8D,EAX MOV R9D,dword ptr [RBP + -0x3c] MOV R10,qword ptr [RBP + -0x48] LEA RAX,[RBP + -0x20] MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX CALL 0x0018be50 CMP EAX,0x0 JZ 0x0018b6ca MOV byte ptr [RBP + -0x1],0x1 JMP 0x0018b715 LAB_0018b6ca: MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x1c] MOV RDX,qword ptr [RBP + -0x30] MOV ESI,dword ptr [RBP + -0x1c] MOV EDX,dword ptr [RDX + RSI*0x1 + -0x4] MOV dword ptr [RAX + RCX*0x1 + -0x4],EDX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x58] ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX MOV ECX,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x60] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],RCX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV byte ptr [RBP + -0x1],0x0 LAB_0018b715: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x80 POP RBP RET
int1 ma_crypt_data_pre_write_hook(int8 *param_1) { int4 uVar1; int3 *__src; ulong uVar2; int3 uVar3; byte bVar4; uint uVar5; int iVar6; void *__dest; uint local_6c; int4 local_28; uint local_24; long local_20; int8 *local_18; int1 local_9; local_20 = param_1[2]; local_24 = *(uint *)(local_20 + 0x7bc); local_18 = param_1; __dest = (void *)my_malloc(0,*(int4 *)(local_20 + 0x7bc),0); if (__dest == (void *)0x0) { local_18[3] = 0; local_9 = 1; } else { if (*(char *)(local_20 + 0x44c) == '\0') { store_rand_lsn(*local_18); } maria_page_crc_set_normal(local_18); __src = (int3 *)*local_18; uVar2 = local_18[1]; uVar3 = *__src; uVar1 = *(int4 *)((long)__src + 3); bVar4 = *(byte *)((long)__src + 7) & 7; if (bVar4 < 3) { local_6c = *(int *)(local_20 + 0xc18) + 0xc; } else { local_6c = *(int *)(local_20 + 0xc18) + 8; } uVar5 = 8; if (bVar4 < 3) { uVar5 = 0xc; } memcpy(__dest,__src,(ulong)local_6c); iVar6 = ma_encrypt(local_20,*(int8 *)(local_20 + 0xc20),(long)__src + (ulong)local_6c, (long)__dest + (ulong)local_6c,local_24 - (local_6c + 4),uVar2 & 0xffffffff, (ulong)CONCAT34(uVar3,uVar1),&local_28); if (iVar6 == 0) { *(int4 *)((long)__dest + ((ulong)local_24 - 4)) = *(int4 *)((long)__src + ((ulong)local_24 - 4)); *(int4 *)((long)__dest + (ulong)uVar5) = local_28; local_18[3] = *local_18; *local_18 = __dest; local_9 = 0; } else { local_9 = 1; } } return local_9; }
10,342
sparity
serhmarch[P]ModbusBridge/modbus/src/Modbus.cpp
const Char *sparity(Parity parity) { switch (parity) { case NoParity : return StringLiteral("No" ); case EvenParity : return StringLiteral("Even" ); case OddParity : return StringLiteral("Odd" ); case SpaceParity: return StringLiteral("Space"); case MarkParity : return StringLiteral("Mark" ); default: return nullptr; } }
O2
cpp
sparity: cmpl $0x4, %edi ja 0x752a movl %edi, %eax leaq 0xb522(%rip), %rcx # 0x12a44 movslq (%rcx,%rax,4), %rax addq %rcx, %rax retq xorl %eax, %eax retq
sparity: cmp edi, 4 ja short loc_752A mov eax, edi lea rcx, unk_12A44 movsxd rax, dword ptr [rcx+rax*4] add rax, rcx retn loc_752A: xor eax, eax retn
char * sparity(unsigned int a1) { if ( a1 > 4 ) return 0LL; else return (char *)dword_12A44 + dword_12A44[a1]; }
sparity: CMP EDI,0x4 JA 0x0010752a MOV EAX,EDI LEA RCX,[0x112a44] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX RET LAB_0010752a: XOR EAX,EAX RET
int * sparity(uint param_1) { if (param_1 < 5) { return &DAT_00112a44 + *(int *)(&DAT_00112a44 + (ulong)param_1 * 4); } return (int *)0x0; }
10,343
sparity
serhmarch[P]ModbusBridge/modbus/src/Modbus.cpp
const Char *sparity(Parity parity) { switch (parity) { case NoParity : return StringLiteral("No" ); case EvenParity : return StringLiteral("Even" ); case OddParity : return StringLiteral("Odd" ); case SpaceParity: return StringLiteral("Space"); case MarkParity : return StringLiteral("Mark" ); default: return nullptr; } }
O3
cpp
sparity: cmpl $0x4, %edi ja 0x81c6 movl %edi, %eax leaq 0x10886(%rip), %rcx # 0x18a44 movslq (%rcx,%rax,4), %rax addq %rcx, %rax retq xorl %eax, %eax retq
sparity: cmp edi, 4 ja short loc_81C6 mov eax, edi lea rcx, unk_18A44 movsxd rax, dword ptr [rcx+rax*4] add rax, rcx retn loc_81C6: xor eax, eax retn
char * sparity(unsigned int a1) { if ( a1 > 4 ) return 0LL; else return (char *)dword_18A44 + dword_18A44[a1]; }
sparity: CMP EDI,0x4 JA 0x001081c6 MOV EAX,EDI LEA RCX,[0x118a44] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX RET LAB_001081c6: XOR EAX,EAX RET
int * sparity(uint param_1) { if (param_1 < 5) { return &DAT_00118a44 + *(int *)(&DAT_00118a44 + (ulong)param_1 * 4); } return (int *)0x0; }
10,344
ftxui::TerminalInputParser::ParseCursorReporting(std::vector<int, std::allocator<int>>)
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/component/terminal_input_parser.cpp
TerminalInputParser::Output TerminalInputParser::ParseCursorReporting( std::vector<int> arguments) { if (arguments.size() != 2) { return SPECIAL; } Output output(CURSOR_REPORTING); output.cursor.y = arguments[0]; // NOLINT output.cursor.x = arguments[1]; // NOLINT return output; }
O0
cpp
ftxui::TerminalInputParser::ParseCursorReporting(std::vector<int, std::allocator<int>>): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdx, -0x28(%rbp) movq %rdi, %rax movq -0x28(%rbp), %rdi movq %rax, -0x20(%rbp) movq %rax, -0x18(%rbp) movq %rsi, -0x8(%rbp) movq %rdi, -0x10(%rbp) callq 0x37190 cmpq $0x2, %rax je 0x7343e movq -0x20(%rbp), %rdi movl $0x3, %esi callq 0x73b90 jmp 0x7347f movq -0x20(%rbp), %rdi movl $0x5, %esi callq 0x73b90 movq -0x28(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x73c40 movq -0x28(%rbp), %rdi movq %rax, %rcx movq -0x20(%rbp), %rax movl (%rcx), %ecx movl %ecx, 0x8(%rax) movl $0x1, %esi callq 0x73c40 movq %rax, %rcx movq -0x20(%rbp), %rax movl (%rcx), %ecx movl %ecx, 0x4(%rax) movq -0x18(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax)
_ZN5ftxui19TerminalInputParser20ParseCursorReportingESt6vectorIiSaIiEE: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_28], rdx mov rax, rdi mov rdi, [rbp+var_28] mov [rbp+var_20], rax mov [rbp+var_18], rax mov [rbp+var_8], rsi mov [rbp+var_10], rdi call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void) cmp rax, 2 jz short loc_7343E mov rdi, [rbp+var_20] mov esi, 3 call _ZN5ftxui19TerminalInputParser6OutputC2ENS0_4TypeE; ftxui::TerminalInputParser::Output::Output(ftxui::TerminalInputParser::Type) jmp short loc_7347F loc_7343E: mov rdi, [rbp+var_20] mov esi, 5 call _ZN5ftxui19TerminalInputParser6OutputC2ENS0_4TypeE; ftxui::TerminalInputParser::Output::Output(ftxui::TerminalInputParser::Type) mov rdi, [rbp+var_28] xor eax, eax mov esi, eax call _ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong) mov rdi, [rbp+var_28] mov rcx, rax mov rax, [rbp+var_20] mov ecx, [rcx] mov [rax+8], ecx mov esi, 1 call _ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong) mov rcx, rax mov rax, [rbp+var_20] mov ecx, [rcx] mov [rax+4], ecx loc_7347F: mov rax, [rbp+var_18] add rsp, 30h pop rbp retn
long long ftxui::TerminalInputParser::ParseCursorReporting(long long a1, long long a2, _QWORD *a3) { if ( std::vector<int>::size(a3) == 2 ) { ftxui::TerminalInputParser::Output::Output(a1, 5LL); *(_DWORD *)(a1 + 8) = *(_DWORD *)std::vector<int>::operator[](a3, 0LL); *(_DWORD *)(a1 + 4) = *(_DWORD *)std::vector<int>::operator[](a3, 1LL); } else { ftxui::TerminalInputParser::Output::Output(a1, 3LL); } return a1; }
ParseCursorReporting: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x28],RDX MOV RAX,RDI MOV RDI,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x20],RAX MOV qword ptr [RBP + -0x18],RAX MOV qword ptr [RBP + -0x8],RSI MOV qword ptr [RBP + -0x10],RDI CALL 0x00137190 CMP RAX,0x2 JZ 0x0017343e MOV RDI,qword ptr [RBP + -0x20] MOV ESI,0x3 CALL 0x00173b90 JMP 0x0017347f LAB_0017343e: MOV RDI,qword ptr [RBP + -0x20] MOV ESI,0x5 CALL 0x00173b90 MOV RDI,qword ptr [RBP + -0x28] XOR EAX,EAX MOV ESI,EAX CALL 0x00173c40 MOV RDI,qword ptr [RBP + -0x28] MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RCX] MOV dword ptr [RAX + 0x8],ECX MOV ESI,0x1 CALL 0x00173c40 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RCX] MOV dword ptr [RAX + 0x4],ECX LAB_0017347f: MOV RAX,qword ptr [RBP + -0x18] ADD RSP,0x30 POP RBP RET
/* ftxui::TerminalInputParser::ParseCursorReporting(std::vector<int, std::allocator<int> >) */ Output * ftxui::TerminalInputParser::ParseCursorReporting (Output *param_1,int8 param_2,vector<int,std::allocator<int>> *param_3) { long lVar1; int4 *puVar2; lVar1 = std::vector<int,std::allocator<int>>::size(param_3); if (lVar1 == 2) { Output::Output(param_1,5); puVar2 = (int4 *)std::vector<int,std::allocator<int>>::operator[](param_3,0); *(int4 *)(param_1 + 8) = *puVar2; puVar2 = (int4 *)std::vector<int,std::allocator<int>>::operator[](param_3,1); *(int4 *)(param_1 + 4) = *puVar2; } else { Output::Output(param_1,3); } return param_1; }
10,345
js_bound_function_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_bound_function_finalizer(JSRuntime *rt, JSValue val) { JSObject *p = JS_VALUE_GET_OBJ(val); JSBoundFunction *bf = p->u.bound_function; int i; JS_FreeValueRT(rt, bf->func_obj); JS_FreeValueRT(rt, bf->this_val); for(i = 0; i < bf->argc; i++) { JS_FreeValueRT(rt, bf->argv[i]); } js_free_rt(rt, bf); }
O1
c
js_bound_function_finalizer: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r14 movq 0x30(%rsi), %rbx movq (%rbx), %rsi movq 0x8(%rbx), %rdx callq 0x1d8c6 movq 0x10(%rbx), %rsi movq 0x18(%rbx), %rdx movq %r14, %rdi callq 0x1d8c6 cmpl $0x0, 0x20(%rbx) jle 0x3a9e8 leaq 0x30(%rbx), %r15 xorl %r12d, %r12d movq -0x8(%r15), %rsi movq (%r15), %rdx movq %r14, %rdi callq 0x1d8c6 incq %r12 movslq 0x20(%rbx), %rax addq $0x10, %r15 cmpq %rax, %r12 jl 0x3a9c9 decq 0x28(%r14) movq %rbx, %rdi callq *0x20(%r14) movq 0x10(%r14), %rcx movq 0x30(%r14), %rdx subq %rax, %rdx addq $-0x8, %rdx movq %rdx, 0x30(%r14) movq 0x40(%r14), %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmpq *%rcx
js_bound_function_finalizer: push r15 push r14 push r12 push rbx push rax mov r14, rdi mov rbx, [rsi+30h] mov rsi, [rbx] mov rdx, [rbx+8] call JS_FreeValueRT mov rsi, [rbx+10h] mov rdx, [rbx+18h] mov rdi, r14 call JS_FreeValueRT cmp dword ptr [rbx+20h], 0 jle short loc_3A9E8 lea r15, [rbx+30h] xor r12d, r12d loc_3A9C9: mov rsi, [r15-8] mov rdx, [r15] mov rdi, r14 call JS_FreeValueRT inc r12 movsxd rax, dword ptr [rbx+20h] add r15, 10h cmp r12, rax jl short loc_3A9C9 loc_3A9E8: dec qword ptr [r14+28h] mov rdi, rbx call qword ptr [r14+20h] mov rcx, [r14+10h] mov rdx, [r14+30h] sub rdx, rax add rdx, 0FFFFFFFFFFFFFFF8h mov [r14+30h], rdx mov rdi, [r14+40h] mov rsi, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp rcx
long long js_bound_function_finalizer(long long a1, long long a2) { long long v2; // rbx long long *v3; // r15 long long v4; // r12 long long v5; // rax long long ( *v6)(_QWORD, long long); // rcx v2 = *(_QWORD *)(a2 + 48); JS_FreeValueRT(a1, *(_DWORD **)v2, *(_QWORD *)(v2 + 8)); JS_FreeValueRT(a1, *(_DWORD **)(v2 + 16), *(_QWORD *)(v2 + 24)); if ( *(int *)(v2 + 32) > 0 ) { v3 = (long long *)(v2 + 48); v4 = 0LL; do { JS_FreeValueRT(a1, (_DWORD *)*(v3 - 1), *v3); ++v4; v3 += 2; } while ( v4 < *(int *)(v2 + 32) ); } --*(_QWORD *)(a1 + 40); v5 = (*(long long ( **)(long long))(a1 + 32))(v2); v6 = *(long long ( **)(_QWORD, long long))(a1 + 16); *(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v5 - 8; return v6(*(_QWORD *)(a1 + 64), v2); }
js_bound_function_finalizer: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDI MOV RBX,qword ptr [RSI + 0x30] MOV RSI,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] CALL 0x0011d8c6 MOV RSI,qword ptr [RBX + 0x10] MOV RDX,qword ptr [RBX + 0x18] MOV RDI,R14 CALL 0x0011d8c6 CMP dword ptr [RBX + 0x20],0x0 JLE 0x0013a9e8 LEA R15,[RBX + 0x30] XOR R12D,R12D LAB_0013a9c9: MOV RSI,qword ptr [R15 + -0x8] MOV RDX,qword ptr [R15] MOV RDI,R14 CALL 0x0011d8c6 INC R12 MOVSXD RAX,dword ptr [RBX + 0x20] ADD R15,0x10 CMP R12,RAX JL 0x0013a9c9 LAB_0013a9e8: DEC qword ptr [R14 + 0x28] MOV RDI,RBX CALL qword ptr [R14 + 0x20] MOV RCX,qword ptr [R14 + 0x10] MOV RDX,qword ptr [R14 + 0x30] SUB RDX,RAX ADD RDX,-0x8 MOV qword ptr [R14 + 0x30],RDX MOV RDI,qword ptr [R14 + 0x40] MOV RSI,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP RCX
void js_bound_function_finalizer(long param_1,long param_2) { int8 *puVar1; long lVar2; int8 *puVar3; puVar1 = *(int8 **)(param_2 + 0x30); JS_FreeValueRT(param_1,*puVar1,puVar1[1]); JS_FreeValueRT(param_1,puVar1[2],puVar1[3]); if (0 < *(int *)(puVar1 + 4)) { puVar3 = puVar1 + 6; lVar2 = 0; do { JS_FreeValueRT(param_1,puVar3[-1],*puVar3); lVar2 = lVar2 + 1; puVar3 = puVar3 + 2; } while (lVar2 < *(int *)(puVar1 + 4)); } *(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1; lVar2 = (**(code **)(param_1 + 0x20))(puVar1); lVar2 = (*(long *)(param_1 + 0x30) - lVar2) + -8; *(long *)(param_1 + 0x30) = lVar2; /* WARNING: Could not recover jumptable at 0x0013aa18. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(param_1 + 0x10)) (*(int8 *)(param_1 + 0x40),puVar1,lVar2,*(code **)(param_1 + 0x10)); return; }
10,346
js_bound_function_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_bound_function_finalizer(JSRuntime *rt, JSValue val) { JSObject *p = JS_VALUE_GET_OBJ(val); JSBoundFunction *bf = p->u.bound_function; int i; JS_FreeValueRT(rt, bf->func_obj); JS_FreeValueRT(rt, bf->this_val); for(i = 0; i < bf->argc; i++) { JS_FreeValueRT(rt, bf->argv[i]); } js_free_rt(rt, bf); }
O2
c
js_bound_function_finalizer: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r14 movq 0x30(%rsi), %rbx movq (%rbx), %rsi movq 0x8(%rbx), %rdx callq 0x18031 movq 0x10(%rbx), %rsi movq 0x18(%rbx), %rdx movq %r14, %rdi callq 0x18031 leaq 0x30(%rbx), %r15 xorl %r12d, %r12d movslq 0x20(%rbx), %rax cmpq %rax, %r12 jge 0x33a7f movq -0x8(%r15), %rsi movq (%r15), %rdx movq %r14, %rdi callq 0x18031 incq %r12 addq $0x10, %r15 jmp 0x33a5e movq %r14, %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x170cb
js_bound_function_finalizer: push r15 push r14 push r12 push rbx push rax mov r14, rdi mov rbx, [rsi+30h] mov rsi, [rbx] mov rdx, [rbx+8] call JS_FreeValueRT mov rsi, [rbx+10h] mov rdx, [rbx+18h] mov rdi, r14 call JS_FreeValueRT lea r15, [rbx+30h] xor r12d, r12d loc_33A5E: movsxd rax, dword ptr [rbx+20h] cmp r12, rax jge short loc_33A7F mov rsi, [r15-8] mov rdx, [r15] mov rdi, r14 call JS_FreeValueRT inc r12 add r15, 10h jmp short loc_33A5E loc_33A7F: mov rdi, r14 mov rsi, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp js_free_rt
long long js_bound_function_finalizer(long long a1, long long a2) { long long v2; // rbx _QWORD *v3; // r15 long long i; // r12 v2 = *(_QWORD *)(a2 + 48); JS_FreeValueRT(a1, *(unsigned int **)v2, *(_QWORD *)(v2 + 8)); JS_FreeValueRT(a1, *(unsigned int **)(v2 + 16), *(_QWORD *)(v2 + 24)); v3 = (_QWORD *)(v2 + 48); for ( i = 0LL; i < *(int *)(v2 + 32); ++i ) { JS_FreeValueRT(a1, (unsigned int *)*(v3 - 1), *v3); v3 += 2; } return js_free_rt(a1, v2); }
js_bound_function_finalizer: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDI MOV RBX,qword ptr [RSI + 0x30] MOV RSI,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] CALL 0x00118031 MOV RSI,qword ptr [RBX + 0x10] MOV RDX,qword ptr [RBX + 0x18] MOV RDI,R14 CALL 0x00118031 LEA R15,[RBX + 0x30] XOR R12D,R12D LAB_00133a5e: MOVSXD RAX,dword ptr [RBX + 0x20] CMP R12,RAX JGE 0x00133a7f MOV RSI,qword ptr [R15 + -0x8] MOV RDX,qword ptr [R15] MOV RDI,R14 CALL 0x00118031 INC R12 ADD R15,0x10 JMP 0x00133a5e LAB_00133a7f: MOV RDI,R14 MOV RSI,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x001170cb
void js_bound_function_finalizer(int8 param_1,long param_2) { int8 *puVar1; long lVar2; int8 *puVar3; puVar1 = *(int8 **)(param_2 + 0x30); JS_FreeValueRT(param_1,*puVar1,puVar1[1]); JS_FreeValueRT(param_1,puVar1[2],puVar1[3]); puVar3 = puVar1 + 6; for (lVar2 = 0; lVar2 < *(int *)(puVar1 + 4); lVar2 = lVar2 + 1) { JS_FreeValueRT(param_1,puVar3[-1],*puVar3); puVar3 = puVar3 + 2; } js_free_rt(param_1,puVar1); return; }
10,347
ma_checksum
eloqsql/storage/maria/ma_checksum.c
ha_checksum _ma_checksum(MARIA_HA *info, const uchar *record) { ha_checksum crc=0; uint i,end; MARIA_COLUMNDEF *base_column= info->s->columndef; uint16 *column_nr= info->s->column_nr; if (info->s->base.null_bytes) crc= my_checksum(crc, record, info->s->base.null_bytes); for (i= 0, end= info->s->base.fields ; i < end ; i++) { MARIA_COLUMNDEF *column= base_column + column_nr[i]; const uchar *pos; ulong length; if (record[column->null_pos] & column->null_bit) continue; /* Null field */ pos= record + column->offset; switch (column->type) { case FIELD_BLOB: { uint blob_size_length= column->length- portable_sizeof_char_ptr; length= _ma_calc_blob_length(blob_size_length, pos); if (length) { memcpy((char**) &pos, pos + blob_size_length, sizeof(char*)); crc= my_checksum(crc, pos, length); } continue; } case FIELD_VARCHAR: { uint pack_length= column->fill_length; if (pack_length == 1) length= (ulong) *pos; else length= uint2korr(pos); pos+= pack_length; /* Skip length information */ break; } default: length= column->length; break; } crc= my_checksum(crc, pos, length); } return crc; }
O0
c
ma_checksum: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl $0x0, -0x14(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x588(%rax), %rax movq %rax, -0x28(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x5a8(%rax), %rax movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax cmpl $0x0, 0x3fc(%rax) je 0x9bbc9 movl -0x14(%rbp), %edi movq -0x10(%rbp), %rsi movq -0x8(%rbp), %rax movq (%rax), %rax movl 0x3fc(%rax), %eax movl %eax, %edx callq 0x1020f0 movl %eax, -0x14(%rbp) movl $0x0, -0x18(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movl 0x3c8(%rax), %eax movl %eax, -0x1c(%rbp) movl -0x18(%rbp), %eax cmpl -0x1c(%rbp), %eax jae 0x9bd0d movq -0x28(%rbp), %rax movq -0x30(%rbp), %rcx movl -0x18(%rbp), %edx movzwl (%rcx,%rdx,2), %ecx movslq %ecx, %rcx imulq $0x38, %rcx, %rcx addq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq -0x38(%rbp), %rcx movzwl 0xe(%rcx), %ecx movzbl (%rax,%rcx), %eax movq -0x38(%rbp), %rcx movzbl 0x12(%rcx), %ecx andl %ecx, %eax cmpl $0x0, %eax je 0x9bc2d jmp 0x9bcff movq -0x10(%rbp), %rax movq -0x38(%rbp), %rcx movl 0x4(%rcx), %ecx addq %rcx, %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rax movl (%rax), %eax movl %eax, -0x54(%rbp) subl $0x4, %eax je 0x9bc5c jmp 0x9bc4f movl -0x54(%rbp), %eax subl $0x8, %eax je 0x9bca5 jmp 0x9bce0 movq -0x38(%rbp), %rax movzwl 0x8(%rax), %eax subl $0x8, %eax movl %eax, -0x4c(%rbp) movl -0x4c(%rbp), %edi movq -0x40(%rbp), %rsi callq 0x52550 movq %rax, -0x48(%rbp) cmpq $0x0, -0x48(%rbp) je 0x9bca3 movq -0x40(%rbp), %rax movl -0x4c(%rbp), %ecx movq (%rax,%rcx), %rax movq %rax, -0x40(%rbp) movl -0x14(%rbp), %edi movq -0x40(%rbp), %rsi movq -0x48(%rbp), %rdx callq 0x1020f0 movl %eax, -0x14(%rbp) jmp 0x9bcff movq -0x38(%rbp), %rax movzwl 0xc(%rax), %eax movl %eax, -0x50(%rbp) cmpl $0x1, -0x50(%rbp) jne 0x9bcc3 movq -0x40(%rbp), %rax movzbl (%rax), %eax movq %rax, -0x48(%rbp) jmp 0x9bcce movq -0x40(%rbp), %rax movzwl (%rax), %eax movq %rax, -0x48(%rbp) movl -0x50(%rbp), %ecx movq -0x40(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x40(%rbp) jmp 0x9bcec movq -0x38(%rbp), %rax movzwl 0x8(%rax), %eax movq %rax, -0x48(%rbp) movl -0x14(%rbp), %edi movq -0x40(%rbp), %rsi movq -0x48(%rbp), %rdx callq 0x1020f0 movl %eax, -0x14(%rbp) movl -0x18(%rbp), %eax addl $0x1, %eax movl %eax, -0x18(%rbp) jmp 0x9bbe0 movl -0x14(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_checksum: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], 0 mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+588h] mov [rbp+var_28], rax mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+5A8h] mov [rbp+var_30], rax mov rax, [rbp+var_8] mov rax, [rax] cmp dword ptr [rax+3FCh], 0 jz short loc_9BBC9 mov edi, [rbp+var_14] mov rsi, [rbp+var_10] mov rax, [rbp+var_8] mov rax, [rax] mov eax, [rax+3FCh] mov edx, eax call my_checksum mov [rbp+var_14], eax loc_9BBC9: mov [rbp+var_18], 0 mov rax, [rbp+var_8] mov rax, [rax] mov eax, [rax+3C8h] mov [rbp+var_1C], eax loc_9BBE0: mov eax, [rbp+var_18] cmp eax, [rbp+var_1C] jnb loc_9BD0D mov rax, [rbp+var_28] mov rcx, [rbp+var_30] mov edx, [rbp+var_18] movzx ecx, word ptr [rcx+rdx*2] movsxd rcx, ecx imul rcx, 38h ; '8' add rax, rcx mov [rbp+var_38], rax mov rax, [rbp+var_10] mov rcx, [rbp+var_38] movzx ecx, word ptr [rcx+0Eh] movzx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_38] movzx ecx, byte ptr [rcx+12h] and eax, ecx cmp eax, 0 jz short loc_9BC2D jmp loc_9BCFF loc_9BC2D: mov rax, [rbp+var_10] mov rcx, [rbp+var_38] mov ecx, [rcx+4] add rax, rcx mov [rbp+var_40], rax mov rax, [rbp+var_38] mov eax, [rax] mov [rbp+var_54], eax sub eax, 4 jz short loc_9BC5C jmp short $+2 loc_9BC4F: mov eax, [rbp+var_54] sub eax, 8 jz short loc_9BCA5 jmp loc_9BCE0 loc_9BC5C: mov rax, [rbp+var_38] movzx eax, word ptr [rax+8] sub eax, 8 mov [rbp+var_4C], eax mov edi, [rbp+var_4C] mov rsi, [rbp+var_40] call _ma_calc_blob_length mov [rbp+var_48], rax cmp [rbp+var_48], 0 jz short loc_9BCA3 mov rax, [rbp+var_40] mov ecx, [rbp+var_4C] mov rax, [rax+rcx] mov [rbp+var_40], rax mov edi, [rbp+var_14] mov rsi, [rbp+var_40] mov rdx, [rbp+var_48] call my_checksum mov [rbp+var_14], eax loc_9BCA3: jmp short loc_9BCFF loc_9BCA5: mov rax, [rbp+var_38] movzx eax, word ptr [rax+0Ch] mov [rbp+var_50], eax cmp [rbp+var_50], 1 jnz short loc_9BCC3 mov rax, [rbp+var_40] movzx eax, byte ptr [rax] mov [rbp+var_48], rax jmp short loc_9BCCE loc_9BCC3: mov rax, [rbp+var_40] movzx eax, word ptr [rax] mov [rbp+var_48], rax loc_9BCCE: mov ecx, [rbp+var_50] mov rax, [rbp+var_40] mov ecx, ecx add rax, rcx mov [rbp+var_40], rax jmp short loc_9BCEC loc_9BCE0: mov rax, [rbp+var_38] movzx eax, word ptr [rax+8] mov [rbp+var_48], rax loc_9BCEC: mov edi, [rbp+var_14] mov rsi, [rbp+var_40] mov rdx, [rbp+var_48] call my_checksum mov [rbp+var_14], eax loc_9BCFF: mov eax, [rbp+var_18] add eax, 1 mov [rbp+var_18], eax jmp loc_9BBE0 loc_9BD0D: mov eax, [rbp+var_14] add rsp, 60h pop rbp retn
long long ma_checksum(long long a1, long long a2) { unsigned int v3; // [rsp+14h] [rbp-4Ch] long long v4; // [rsp+18h] [rbp-48h] long long v5; // [rsp+18h] [rbp-48h] unsigned __int8 *v6; // [rsp+20h] [rbp-40h] long long v7; // [rsp+28h] [rbp-38h] long long v8; // [rsp+30h] [rbp-30h] long long v9; // [rsp+38h] [rbp-28h] unsigned int v10; // [rsp+44h] [rbp-1Ch] unsigned int v11; // [rsp+48h] [rbp-18h] unsigned int v12; // [rsp+4Ch] [rbp-14h] v12 = 0; v9 = *(_QWORD *)(*(_QWORD *)a1 + 1416LL); v8 = *(_QWORD *)(*(_QWORD *)a1 + 1448LL); if ( *(_DWORD *)(*(_QWORD *)a1 + 1020LL) ) v12 = my_checksum(0LL, a2, *(unsigned int *)(*(_QWORD *)a1 + 1020LL)); v11 = 0; v10 = *(_DWORD *)(*(_QWORD *)a1 + 968LL); while ( v11 < v10 ) { v7 = 56LL * *(unsigned __int16 *)(v8 + 2LL * v11) + v9; if ( (*(_BYTE *)(v7 + 18) & *(_BYTE *)(a2 + *(unsigned __int16 *)(v7 + 14))) == 0 ) { v6 = (unsigned __int8 *)(*(unsigned int *)(v7 + 4) + a2); if ( *(_DWORD *)v7 == 4 ) { v3 = *(unsigned __int16 *)(v7 + 8) - 8; v4 = ma_calc_blob_length(v3, v6); if ( v4 ) v12 = my_checksum(v12, *(_QWORD *)&v6[v3], v4); } else { if ( *(_DWORD *)v7 == 8 ) { if ( *(_WORD *)(v7 + 12) == 1 ) v5 = *v6; else v5 = *(unsigned __int16 *)v6; v6 += *(unsigned __int16 *)(v7 + 12); } else { v5 = *(unsigned __int16 *)(v7 + 8); } v12 = my_checksum(v12, v6, v5); } } ++v11; } return v12; }
_ma_checksum: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x588] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x5a8] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0x3fc],0x0 JZ 0x0019bbc9 MOV EDI,dword ptr [RBP + -0x14] MOV RSI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x3fc] MOV EDX,EAX CALL 0x002020f0 MOV dword ptr [RBP + -0x14],EAX LAB_0019bbc9: MOV dword ptr [RBP + -0x18],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x3c8] MOV dword ptr [RBP + -0x1c],EAX LAB_0019bbe0: MOV EAX,dword ptr [RBP + -0x18] CMP EAX,dword ptr [RBP + -0x1c] JNC 0x0019bd0d MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] MOV EDX,dword ptr [RBP + -0x18] MOVZX ECX,word ptr [RCX + RDX*0x2] MOVSXD RCX,ECX IMUL RCX,RCX,0x38 ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x38] MOVZX ECX,word ptr [RCX + 0xe] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x38] MOVZX ECX,byte ptr [RCX + 0x12] AND EAX,ECX CMP EAX,0x0 JZ 0x0019bc2d JMP 0x0019bcff LAB_0019bc2d: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RCX + 0x4] ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x54],EAX SUB EAX,0x4 JZ 0x0019bc5c JMP 0x0019bc4f LAB_0019bc4f: MOV EAX,dword ptr [RBP + -0x54] SUB EAX,0x8 JZ 0x0019bca5 JMP 0x0019bce0 LAB_0019bc5c: MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,word ptr [RAX + 0x8] SUB EAX,0x8 MOV dword ptr [RBP + -0x4c],EAX MOV EDI,dword ptr [RBP + -0x4c] MOV RSI,qword ptr [RBP + -0x40] CALL 0x00152550 MOV qword ptr [RBP + -0x48],RAX CMP qword ptr [RBP + -0x48],0x0 JZ 0x0019bca3 MOV RAX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RBP + -0x4c] MOV RAX,qword ptr [RAX + RCX*0x1] MOV qword ptr [RBP + -0x40],RAX MOV EDI,dword ptr [RBP + -0x14] MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x48] CALL 0x002020f0 MOV dword ptr [RBP + -0x14],EAX LAB_0019bca3: JMP 0x0019bcff LAB_0019bca5: MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,word ptr [RAX + 0xc] MOV dword ptr [RBP + -0x50],EAX CMP dword ptr [RBP + -0x50],0x1 JNZ 0x0019bcc3 MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,byte ptr [RAX] MOV qword ptr [RBP + -0x48],RAX JMP 0x0019bcce LAB_0019bcc3: MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,word ptr [RAX] MOV qword ptr [RBP + -0x48],RAX LAB_0019bcce: MOV ECX,dword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x40] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX JMP 0x0019bcec LAB_0019bce0: MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,word ptr [RAX + 0x8] MOV qword ptr [RBP + -0x48],RAX LAB_0019bcec: MOV EDI,dword ptr [RBP + -0x14] MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x48] CALL 0x002020f0 MOV dword ptr [RBP + -0x14],EAX LAB_0019bcff: MOV EAX,dword ptr [RBP + -0x18] ADD EAX,0x1 MOV dword ptr [RBP + -0x18],EAX JMP 0x0019bbe0 LAB_0019bd0d: MOV EAX,dword ptr [RBP + -0x14] ADD RSP,0x60 POP RBP RET
int4 _ma_checksum(long *param_1,long param_2) { uint uVar1; long lVar2; long lVar3; ushort uVar4; int *piVar5; long lVar6; ushort *local_48; uint local_20; int4 local_1c; local_1c = 0; lVar2 = *(long *)(*param_1 + 0x588); lVar3 = *(long *)(*param_1 + 0x5a8); if (*(int *)(*param_1 + 0x3fc) != 0) { local_1c = my_checksum(0,param_2,*(int4 *)(*param_1 + 0x3fc)); } local_20 = 0; uVar1 = *(uint *)(*param_1 + 0x3c8); for (; local_20 < uVar1; local_20 = local_20 + 1) { piVar5 = (int *)(lVar2 + (long)(int)(uint)*(ushort *)(lVar3 + (ulong)local_20 * 2) * 0x38); if ((*(byte *)(param_2 + (ulong)*(ushort *)((long)piVar5 + 0xe)) & *(byte *)((long)piVar5 + 0x12)) == 0) { local_48 = (ushort *)(param_2 + (ulong)(uint)piVar5[1]); if (*piVar5 == 4) { uVar4 = *(ushort *)(piVar5 + 2); lVar6 = _ma_calc_blob_length(uVar4 - 8,local_48); if (lVar6 != 0) { local_1c = my_checksum(local_1c,*(int8 *)((long)local_48 + (ulong)(uVar4 - 8)),lVar6 ); } } else { if (*piVar5 == 8) { if (*(ushort *)(piVar5 + 3) == 1) { uVar4 = (ushort)(byte)*local_48; } else { uVar4 = *local_48; } local_48 = (ushort *)((long)local_48 + (ulong)(uint)*(ushort *)(piVar5 + 3)); } else { uVar4 = *(ushort *)(piVar5 + 2); } local_1c = my_checksum(local_1c,local_48,uVar4); } } } return local_1c; }
10,348
js_std_file_fileno
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_std_file_fileno(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { FILE *f = js_std_file_get(ctx, this_val); if (!f) return JS_EXCEPTION; return JS_NewInt32(ctx, fileno(f)); }
O0
c
js_std_file_fileno: subq $0x68, %rsp movq %rsi, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq %rdi, 0x20(%rsp) movl %ecx, 0x1c(%rsp) movq %r8, 0x10(%rsp) movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx callq 0x127c0 movq %rax, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) jne 0x11de0 movl $0x0, 0x38(%rsp) movq $0x6, 0x40(%rsp) jmp 0x11e25 movq 0x20(%rsp), %rax movq %rax, (%rsp) movq 0x8(%rsp), %rdi callq 0xe5e0 movq (%rsp), %rcx movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) movl 0x4c(%rsp), %eax movl %eax, 0x58(%rsp) movq $0x0, 0x60(%rsp) movq 0x58(%rsp), %rcx movq 0x60(%rsp), %rax movq %rcx, 0x38(%rsp) movq %rax, 0x40(%rsp) movq 0x38(%rsp), %rax movq 0x40(%rsp), %rdx addq $0x68, %rsp retq nopw %cs:(%rax,%rax)
js_std_file_fileno: sub rsp, 68h mov [rsp+68h+var_40], rsi mov [rsp+68h+var_38], rdx mov [rsp+68h+var_48], rdi mov [rsp+68h+var_4C], ecx mov [rsp+68h+var_58], r8 mov rdi, [rsp+68h+var_48] mov rsi, [rsp+68h+var_40] mov rdx, [rsp+68h+var_38] call js_std_file_get mov [rsp+68h+var_60], rax cmp [rsp+68h+var_60], 0 jnz short loc_11DE0 mov dword ptr [rsp+68h+var_30], 0 mov [rsp+68h+var_28], 6 jmp short loc_11E25 loc_11DE0: mov rax, [rsp+68h+var_48] mov [rsp+68h+var_68], rax mov rdi, [rsp+68h+var_60] call _fileno mov rcx, [rsp+68h+var_68] mov [rsp+68h+var_18], rcx mov [rsp+68h+var_1C], eax mov eax, [rsp+68h+var_1C] mov dword ptr [rsp+68h+var_10], eax mov [rsp+68h+var_8], 0 mov rcx, [rsp+68h+var_10] mov rax, [rsp+68h+var_8] mov [rsp+68h+var_30], rcx mov [rsp+68h+var_28], rax loc_11E25: mov rax, [rsp+68h+var_30] mov rdx, [rsp+68h+var_28] add rsp, 68h retn
long long js_std_file_fileno(long long a1, long long a2, long long a3) { long long v4; // [rsp+8h] [rbp-60h] long long v5; // [rsp+38h] [rbp-30h] long long v6; // [rsp+58h] [rbp-10h] v4 = js_std_file_get(a1, a2, a3); if ( v4 ) { LODWORD(v6) = fileno(v4); return v6; } else { LODWORD(v5) = 0; } return v5; }
js_std_file_fileno: SUB RSP,0x68 MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RSP + 0x20],RDI MOV dword ptr [RSP + 0x1c],ECX MOV qword ptr [RSP + 0x10],R8 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] CALL 0x001127c0 MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x8],0x0 JNZ 0x00111de0 MOV dword ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x40],0x6 JMP 0x00111e25 LAB_00111de0: MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x8] CALL 0x0010e5e0 MOV RCX,qword ptr [RSP] MOV qword ptr [RSP + 0x50],RCX MOV dword ptr [RSP + 0x4c],EAX MOV EAX,dword ptr [RSP + 0x4c] MOV dword ptr [RSP + 0x58],EAX MOV qword ptr [RSP + 0x60],0x0 MOV RCX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x38],RCX MOV qword ptr [RSP + 0x40],RAX LAB_00111e25: MOV RAX,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] ADD RSP,0x68 RET
int1 [16] js_std_file_fileno(int8 param_1,int8 param_2,int8 param_3) { int1 auVar1 [16]; FILE *__stream; int4 local_30; int4 uStack_2c; int8 local_28; int4 uStack_c; __stream = (FILE *)js_std_file_get(param_1,param_2,param_3); if (__stream == (FILE *)0x0) { local_30 = 0; local_28 = 6; } else { local_30 = fileno(__stream); uStack_2c = uStack_c; local_28 = 0; } auVar1._4_4_ = uStack_2c; auVar1._0_4_ = local_30; auVar1._8_8_ = local_28; return auVar1; }
10,349
translog_new_page_header
eloqsql/storage/maria/ma_loghandler.c
static void translog_new_page_header(TRANSLOG_ADDRESS *horizon, struct st_buffer_cursor *cursor) { uchar *ptr; DBUG_ENTER("translog_new_page_header"); DBUG_ASSERT(cursor->ptr); cursor->protected= 0; ptr= cursor->ptr; /* Page number */ int3store(ptr, LSN_OFFSET(*horizon) / TRANSLOG_PAGE_SIZE); ptr+= 3; /* File number */ int3store(ptr, LSN_FILE_NO(*horizon)); ptr+= 3; DBUG_ASSERT(TRANSLOG_PAGE_FLAGS == (ptr - cursor->ptr)); cursor->ptr[TRANSLOG_PAGE_FLAGS]= (uchar) log_descriptor.flags; ptr++; if (log_descriptor.flags & TRANSLOG_PAGE_CRC) { #ifndef DBUG_OFF DBUG_PRINT("info", ("write 0x11223344 CRC to " LSN_FMT, LSN_IN_PARTS(*horizon))); /* This will be overwritten by real CRC; This is just for debugging */ int4store(ptr, 0x11223344); #endif /* CRC will be put when page is finished */ ptr+= CRC_SIZE; } if (log_descriptor.flags & TRANSLOG_SECTOR_PROTECTION) { /* translog_sector_randmo works like "random" values producer because it is enough to have such "random" for this purpose and it will not interfere with higher level pseudo random value generator */ ptr[0]= translog_sector_random++; ptr+= TRANSLOG_PAGE_SIZE / DISK_DRIVE_SECTOR_SIZE; } { size_t len= (ptr - cursor->ptr); (*horizon)+= len; /* increasing the offset part of the address */ cursor->current_page_fill= (uint16)len; if (!cursor->chaser) cursor->buffer->size+= (translog_size_t)len; } cursor->ptr= ptr; DBUG_PRINT("info", ("NewP buffer #%u: %p chaser: %d Size: %lu (%lu) " "Horizon: " LSN_FMT, (uint) cursor->buffer->buffer_no, cursor->buffer, cursor->chaser, (ulong) cursor->buffer->size, (ulong) (cursor->ptr - cursor->buffer->buffer), LSN_IN_PARTS(*horizon))); translog_check_cursor(cursor); DBUG_VOID_RETURN; }
O3
c
translog_new_page_header: pushq %rbp movq %rsp, %rbp movb $0x0, 0x38(%rsi) movq 0x20(%rsi), %rax movl (%rdi), %ecx shrl $0xd, %ecx movb %cl, (%rax) movl (%rdi), %ecx shrl $0x15, %ecx movb %cl, 0x1(%rax) movl (%rdi), %ecx shrl $0x1d, %ecx movb %cl, 0x2(%rax) movb 0x4(%rdi), %cl movb %cl, 0x3(%rax) movb 0x5(%rdi), %cl movb %cl, 0x4(%rax) movb 0x6(%rdi), %cl movb %cl, 0x5(%rax) movb 0x3c9e19(%rip), %cl # 0x3fdef8 movq 0x20(%rsi), %rdx movb %cl, 0x6(%rdx) movl 0x3c9e0c(%rip), %ecx # 0x3fdef8 movl %ecx, %edx andl $0x1, %edx leaq (%rax,%rdx,4), %rax addq $0x7, %rax testb $0x2, %cl je 0x34113 movb 0xbcad21(%rip), %cl # 0xbfee25 leal 0x1(%rcx), %edx movb %dl, 0xbcad18(%rip) # 0xbfee25 movb %cl, (%rax) addq $0x10, %rax movq %rax, %rcx subq 0x20(%rsi), %rcx addq %rcx, (%rdi) movw %cx, 0x30(%rsi) cmpb $0x0, 0x37(%rsi) jne 0x34131 movq 0x28(%rsi), %rdx addl %ecx, 0x100030(%rdx) movq %rax, 0x20(%rsi) popq %rbp retq
translog_new_page_header: push rbp mov rbp, rsp mov byte ptr [rsi+38h], 0 mov rax, [rsi+20h] mov ecx, [rdi] shr ecx, 0Dh mov [rax], cl mov ecx, [rdi] shr ecx, 15h mov [rax+1], cl mov ecx, [rdi] shr ecx, 1Dh mov [rax+2], cl mov cl, [rdi+4] mov [rax+3], cl mov cl, [rdi+5] mov [rax+4], cl mov cl, [rdi+6] mov [rax+5], cl mov cl, byte ptr cs:dword_3FDEF8 mov rdx, [rsi+20h] mov [rdx+6], cl mov ecx, cs:dword_3FDEF8 mov edx, ecx and edx, 1 lea rax, [rax+rdx*4] add rax, 7 test cl, 2 jz short loc_34113 mov cl, cs:translog_sector_random lea edx, [rcx+1] mov cs:translog_sector_random, dl mov [rax], cl add rax, 10h loc_34113: mov rcx, rax sub rcx, [rsi+20h] add [rdi], rcx mov [rsi+30h], cx cmp byte ptr [rsi+37h], 0 jnz short loc_34131 mov rdx, [rsi+28h] add dword ptr ds:qword_100030[rdx], ecx loc_34131: mov [rsi+20h], rax pop rbp retn
char * translog_new_page_header(long long a1, long long a2) { _BYTE *v2; // rax char *result; // rax char v4; // cl char *v5; // rcx *(_BYTE *)(a2 + 56) = 0; v2 = *(_BYTE **)(a2 + 32); *v2 = *(_DWORD *)a1 >> 13; v2[1] = *(_DWORD *)a1 >> 21; v2[2] = *(_DWORD *)a1 >> 29; v2[3] = *(_BYTE *)(a1 + 4); v2[4] = *(_BYTE *)(a1 + 5); v2[5] = *(_BYTE *)(a1 + 6); *(_BYTE *)(*(_QWORD *)(a2 + 32) + 6LL) = dword_3FDEF8; result = &v2[4 * (dword_3FDEF8 & 1) + 7]; if ( (dword_3FDEF8 & 2) != 0 ) { v4 = translog_sector_random++; *result = v4; result += 16; } v5 = &result[-*(_QWORD *)(a2 + 32)]; *(_QWORD *)a1 += v5; *(_WORD *)(a2 + 48) = (_WORD)v5; if ( !*(_BYTE *)(a2 + 55) ) *(_DWORD *)((char *)&qword_100030 + *(_QWORD *)(a2 + 40)) += (_DWORD)v5; *(_QWORD *)(a2 + 32) = result; return result; }
translog_new_page_header: PUSH RBP MOV RBP,RSP MOV byte ptr [RSI + 0x38],0x0 MOV RAX,qword ptr [RSI + 0x20] MOV ECX,dword ptr [RDI] SHR ECX,0xd MOV byte ptr [RAX],CL MOV ECX,dword ptr [RDI] SHR ECX,0x15 MOV byte ptr [RAX + 0x1],CL MOV ECX,dword ptr [RDI] SHR ECX,0x1d MOV byte ptr [RAX + 0x2],CL MOV CL,byte ptr [RDI + 0x4] MOV byte ptr [RAX + 0x3],CL MOV CL,byte ptr [RDI + 0x5] MOV byte ptr [RAX + 0x4],CL MOV CL,byte ptr [RDI + 0x6] MOV byte ptr [RAX + 0x5],CL MOV CL,byte ptr [0x004fdef8] MOV RDX,qword ptr [RSI + 0x20] MOV byte ptr [RDX + 0x6],CL MOV ECX,dword ptr [0x004fdef8] MOV EDX,ECX AND EDX,0x1 LEA RAX,[RAX + RDX*0x4] ADD RAX,0x7 TEST CL,0x2 JZ 0x00134113 MOV CL,byte ptr [0x00cfee25] LEA EDX,[RCX + 0x1] MOV byte ptr [0x00cfee25],DL MOV byte ptr [RAX],CL ADD RAX,0x10 LAB_00134113: MOV RCX,RAX SUB RCX,qword ptr [RSI + 0x20] ADD qword ptr [RDI],RCX MOV word ptr [RSI + 0x30],CX CMP byte ptr [RSI + 0x37],0x0 JNZ 0x00134131 MOV RDX,qword ptr [RSI + 0x28] ADD dword ptr [RDX + 0x100030],ECX LAB_00134131: MOV qword ptr [RSI + 0x20],RAX POP RBP RET
void translog_new_page_header(uint *param_1,long param_2) { int1 *puVar1; char cVar2; char *pcVar3; long lVar4; uint uVar5; *(int1 *)(param_2 + 0x38) = 0; puVar1 = *(int1 **)(param_2 + 0x20); *puVar1 = (char)(*param_1 >> 0xd); puVar1[1] = (char)(*param_1 >> 0x15); puVar1[2] = (byte)(*param_1 >> 0x1d); puVar1[3] = (char)param_1[1]; puVar1[4] = *(int1 *)((long)param_1 + 5); puVar1[5] = *(int1 *)((long)param_1 + 6); *(int1 *)(*(long *)(param_2 + 0x20) + 6) = (int1)DAT_004fdef8; uVar5 = DAT_004fdef8 & 1; pcVar3 = puVar1 + (ulong)uVar5 * 4 + 7; if ((DAT_004fdef8 & 2) != 0) { cVar2 = translog_sector_random + '\x01'; *pcVar3 = translog_sector_random; translog_sector_random = cVar2; pcVar3 = puVar1 + (ulong)uVar5 * 4 + 0x17; } lVar4 = (long)pcVar3 - *(long *)(param_2 + 0x20); *(long *)param_1 = *(long *)param_1 + lVar4; *(short *)(param_2 + 0x30) = (short)lVar4; if (*(char *)(param_2 + 0x37) == '\0') { *(int *)(Elf64_Ehdr_00100000.e_ident_pad + *(long *)(param_2 + 0x28) + 0x27) = *(int *)(Elf64_Ehdr_00100000.e_ident_pad + *(long *)(param_2 + 0x28) + 0x27) + (int)lVar4; } *(char **)(param_2 + 0x20) = pcVar3; return; }
10,350
inline_mysql_mutex_init
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_mutex_init( #ifdef HAVE_PSI_MUTEX_INTERFACE PSI_mutex_key key, #endif mysql_mutex_t *that, const pthread_mutexattr_t *attr #ifdef SAFE_MUTEX , const char *src_name, const char *src_file, uint src_line #endif ) { #ifdef HAVE_PSI_MUTEX_INTERFACE that->m_psi= PSI_MUTEX_CALL(init_mutex)(key, &that->m_mutex); #else that->m_psi= NULL; #endif #ifdef COROUTINE_ENABLED that->l.data= that; that->l.prev= that->l.next= NULL; #endif #ifdef SAFE_MUTEX return safe_mutex_init(&that->m_mutex, attr, src_name, src_file, src_line); #else return pthread_mutex_init(&that->m_mutex, attr); #endif }
O0
c
inline_mysql_mutex_init: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) leaq 0x1a999e(%rip), %rax # 0x1d9ef8 movq (%rax), %rax movq 0x40(%rax), %rax movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi callq *%rax movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x40(%rax) movq -0x10(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x38(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x30(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x28(%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x25530 addq $0x20, %rsp popq %rbp retq nopl (%rax)
inline_mysql_mutex_init: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx lea rax, PSI_server mov rax, [rax] mov rax, [rax+40h] mov edi, [rbp+var_4] mov rsi, [rbp+var_10] call rax mov rcx, rax mov rax, [rbp+var_10] mov [rax+40h], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_10] mov [rax+38h], rcx mov rax, [rbp+var_10] mov qword ptr [rax+30h], 0 mov rax, [rbp+var_10] mov qword ptr [rax+28h], 0 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call _pthread_mutex_init add rsp, 20h pop rbp retn
long long inline_mysql_mutex_init(unsigned int a1, _QWORD *a2, long long a3) { a2[8] = (*((long long ( **)(_QWORD, _QWORD *))PSI_server[0] + 8))(a1, a2); a2[7] = a2; a2[6] = 0LL; a2[5] = 0LL; return pthread_mutex_init(a2, a3); }
inline_mysql_mutex_init: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX LEA RAX,[0x2d9ef8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x40] MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] CALL RAX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x40],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x38],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x30],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x28],0x0 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00125530 ADD RSP,0x20 POP RBP RET
void inline_mysql_mutex_init (int4 param_1,pthread_mutex_t *param_2,pthread_mutexattr_t *param_3) { int8 uVar1; uVar1 = (**(code **)(PSI_server + 0x40))(param_1,param_2); *(int8 *)((long)param_2 + 0x40) = uVar1; *(pthread_mutex_t **)((long)param_2 + 0x38) = param_2; *(int8 *)((long)param_2 + 0x30) = 0; param_2[1].__align = 0; pthread_mutex_init(param_2,param_3); return; }
10,351
JS_ToInt64SatFree
bluesky950520[P]quickjs/quickjs.c
static int JS_ToInt64SatFree(JSContext *ctx, int64_t *pres, JSValue val) { uint32_t tag; redo: tag = JS_VALUE_GET_NORM_TAG(val); switch(tag) { case JS_TAG_INT: case JS_TAG_BOOL: case JS_TAG_NULL: case JS_TAG_UNDEFINED: *pres = JS_VALUE_GET_INT(val); return 0; case JS_TAG_EXCEPTION: *pres = 0; return -1; case JS_TAG_FLOAT64: { double d = JS_VALUE_GET_FLOAT64(val); if (isnan(d)) { *pres = 0; } else { if (d < INT64_MIN) *pres = INT64_MIN; else if (d >= 0x1p63) *pres = INT64_MAX; else *pres = (int64_t)d; } } return 0; default: val = JS_ToNumberFree(ctx, val); if (JS_IsException(val)) { *pres = 0; return -1; } goto redo; } }
O0
c
JS_ToInt64SatFree: subq $0x58, %rsp movq %rdx, 0x40(%rsp) movq %rcx, 0x48(%rsp) movq %rdi, 0x38(%rsp) movq %rsi, 0x30(%rsp) movl 0x48(%rsp), %eax movl %eax, 0x2c(%rsp) movl 0x2c(%rsp), %eax movl %eax, 0xc(%rsp) subl $0x4, %eax jb 0x389d8 jmp 0x389bf movl 0xc(%rsp), %eax subl $0x6, %eax je 0x389f2 jmp 0x389ca movl 0xc(%rsp), %eax subl $0x7, %eax je 0x38a0b jmp 0x38aa1 movslq 0x40(%rsp), %rcx movq 0x30(%rsp), %rax movq %rcx, (%rax) movl $0x0, 0x54(%rsp) jmp 0x38b02 movq 0x30(%rsp), %rax movq $0x0, (%rax) movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF jmp 0x38b02 movsd 0x40(%rsp), %xmm0 movsd %xmm0, 0x20(%rsp) movsd 0x20(%rsp), %xmm0 ucomisd %xmm0, %xmm0 setp %al testb $0x1, %al jne 0x38a2a jmp 0x38a38 movq 0x30(%rsp), %rax movq $0x0, (%rax) jmp 0x38a97 movsd 0xd4e18(%rip), %xmm0 # 0x10d858 ucomisd 0x20(%rsp), %xmm0 jbe 0x38a5c movq 0x30(%rsp), %rax movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 movq %rcx, (%rax) jmp 0x38a95 movsd 0x20(%rsp), %xmm0 movsd 0xd059e(%rip), %xmm1 # 0x109008 ucomisd %xmm1, %xmm0 jb 0x38a84 movq 0x30(%rsp), %rax movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF movq %rcx, (%rax) jmp 0x38a93 cvttsd2si 0x20(%rsp), %rcx movq 0x30(%rsp), %rax movq %rcx, (%rax) jmp 0x38a95 jmp 0x38a97 movl $0x0, 0x54(%rsp) jmp 0x38b02 movq 0x38(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx callq 0x50ab0 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x40(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0x38afd movq 0x30(%rsp), %rax movq $0x0, (%rax) movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF jmp 0x38b02 jmp 0x389a8 movl 0x54(%rsp), %eax addq $0x58, %rsp retq nopl (%rax,%rax)
JS_ToInt64SatFree: sub rsp, 58h mov [rsp+58h+var_18], rdx mov [rsp+58h+var_10], rcx mov [rsp+58h+var_20], rdi mov [rsp+58h+var_28], rsi loc_389A8: mov eax, dword ptr [rsp+58h+var_10] mov [rsp+58h+var_2C], eax mov eax, [rsp+58h+var_2C] mov [rsp+58h+var_4C], eax sub eax, 4 jb short loc_389D8 jmp short $+2 loc_389BF: mov eax, [rsp+58h+var_4C] sub eax, 6 jz short loc_389F2 jmp short $+2 loc_389CA: mov eax, [rsp+58h+var_4C] sub eax, 7 jz short loc_38A0B jmp loc_38AA1 loc_389D8: movsxd rcx, dword ptr [rsp+58h+var_18] mov rax, [rsp+58h+var_28] mov [rax], rcx mov [rsp+58h+var_4], 0 jmp loc_38B02 loc_389F2: mov rax, [rsp+58h+var_28] mov qword ptr [rax], 0 mov [rsp+58h+var_4], 0FFFFFFFFh jmp loc_38B02 loc_38A0B: movsd xmm0, [rsp+58h+var_18] movsd [rsp+58h+var_38], xmm0 movsd xmm0, [rsp+58h+var_38] ucomisd xmm0, xmm0 setp al test al, 1 jnz short loc_38A2A jmp short loc_38A38 loc_38A2A: mov rax, [rsp+58h+var_28] mov qword ptr [rax], 0 jmp short loc_38A97 loc_38A38: movsd xmm0, cs:qword_10D858 ucomisd xmm0, [rsp+58h+var_38] jbe short loc_38A5C mov rax, [rsp+58h+var_28] mov rcx, 8000000000000000h mov [rax], rcx jmp short loc_38A95 loc_38A5C: movsd xmm0, [rsp+58h+var_38] movsd xmm1, cs:qword_109008 ucomisd xmm0, xmm1 jb short loc_38A84 mov rax, [rsp+58h+var_28] mov rcx, 7FFFFFFFFFFFFFFFh mov [rax], rcx jmp short loc_38A93 loc_38A84: cvttsd2si rcx, [rsp+58h+var_38] mov rax, [rsp+58h+var_28] mov [rax], rcx loc_38A93: jmp short $+2 loc_38A95: jmp short $+2 loc_38A97: mov [rsp+58h+var_4], 0 jmp short loc_38B02 loc_38AA1: mov rdi, [rsp+58h+var_20] mov rsi, [rsp+58h+var_18] mov rdx, [rsp+58h+var_10] call JS_ToNumberFree mov [rsp+58h+var_48], rax mov [rsp+58h+var_40], rdx mov rax, [rsp+58h+var_48] mov [rsp+58h+var_18], rax mov rax, [rsp+58h+var_40] mov [rsp+58h+var_10], rax mov rdi, [rsp+58h+var_18] mov rsi, [rsp+58h+var_10] call JS_IsException_1 cmp eax, 0 jz short loc_38AFD mov rax, [rsp+58h+var_28] mov qword ptr [rax], 0 mov [rsp+58h+var_4], 0FFFFFFFFh jmp short loc_38B02 loc_38AFD: jmp loc_389A8 loc_38B02: mov eax, [rsp+58h+var_4] add rsp, 58h retn
long long JS_ToInt64SatFree(long long a1, _QWORD *a2, long long a3, long long a4) { long long v4; // rdx while ( 1 ) { if ( (unsigned int)a4 < 4 ) { *a2 = (int)a3; return 0; } if ( (_DWORD)a4 == 6 ) { *a2 = 0LL; return (unsigned int)-1; } if ( (_DWORD)a4 == 7 ) break; *(double *)&a3 = COERCE_DOUBLE(JS_ToNumberFree(a1, a3, a4)); a4 = v4; if ( JS_IsException_1(a3, v4) ) { *a2 = 0LL; return (unsigned int)-1; } } if ( *(double *)&a3 >= -9.223372036854776e18 ) { if ( *(double *)&a3 < 9.223372036854776e18 ) *a2 = (unsigned int)(int)*(double *)&a3; else *a2 = 0x7FFFFFFFFFFFFFFFLL; } else { *a2 = 0x8000000000000000LL; } return 0; }
JS_ToInt64SatFree: SUB RSP,0x58 MOV qword ptr [RSP + 0x40],RDX MOV qword ptr [RSP + 0x48],RCX MOV qword ptr [RSP + 0x38],RDI MOV qword ptr [RSP + 0x30],RSI LAB_001389a8: MOV EAX,dword ptr [RSP + 0x48] MOV dword ptr [RSP + 0x2c],EAX MOV EAX,dword ptr [RSP + 0x2c] MOV dword ptr [RSP + 0xc],EAX SUB EAX,0x4 JC 0x001389d8 JMP 0x001389bf LAB_001389bf: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x6 JZ 0x001389f2 JMP 0x001389ca LAB_001389ca: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x7 JZ 0x00138a0b JMP 0x00138aa1 LAB_001389d8: MOVSXD RCX,dword ptr [RSP + 0x40] MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX],RCX MOV dword ptr [RSP + 0x54],0x0 JMP 0x00138b02 LAB_001389f2: MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX],0x0 MOV dword ptr [RSP + 0x54],0xffffffff JMP 0x00138b02 LAB_00138a0b: MOVSD XMM0,qword ptr [RSP + 0x40] MOVSD qword ptr [RSP + 0x20],XMM0 MOVSD XMM0,qword ptr [RSP + 0x20] UCOMISD XMM0,XMM0 SETP AL TEST AL,0x1 JNZ 0x00138a2a JMP 0x00138a38 LAB_00138a2a: MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX],0x0 JMP 0x00138a97 LAB_00138a38: MOVSD XMM0,qword ptr [0x0020d858] UCOMISD XMM0,qword ptr [RSP + 0x20] JBE 0x00138a5c MOV RAX,qword ptr [RSP + 0x30] MOV RCX,-0x8000000000000000 MOV qword ptr [RAX],RCX JMP 0x00138a95 LAB_00138a5c: MOVSD XMM0,qword ptr [RSP + 0x20] MOVSD XMM1,qword ptr [0x00209008] UCOMISD XMM0,XMM1 JC 0x00138a84 MOV RAX,qword ptr [RSP + 0x30] MOV RCX,0x7fffffffffffffff MOV qword ptr [RAX],RCX JMP 0x00138a93 LAB_00138a84: CVTTSD2SI RCX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX],RCX LAB_00138a93: JMP 0x00138a95 LAB_00138a95: JMP 0x00138a97 LAB_00138a97: MOV dword ptr [RSP + 0x54],0x0 JMP 0x00138b02 LAB_00138aa1: MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] CALL 0x00150ab0 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x48],RAX MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x48] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x00138afd MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX],0x0 MOV dword ptr [RSP + 0x54],0xffffffff JMP 0x00138b02 LAB_00138afd: JMP 0x001389a8 LAB_00138b02: MOV EAX,dword ptr [RSP + 0x54] ADD RSP,0x58 RET
int4 JS_ToInt64SatFree(int8 param_1,long *param_2,int8 param_3,int8 param_4) { int8 uVar1; int iVar2; int1 auVar3 [16]; double local_18; int8 local_10; auVar3._8_8_ = param_4; auVar3._0_8_ = param_3; do { local_10 = auVar3._8_8_; uVar1 = local_10; local_18 = auVar3._0_8_; local_10._0_4_ = auVar3._8_4_; if ((uint)local_10 < 4) { local_18._0_4_ = auVar3._0_4_; *param_2 = (long)local_18._0_4_; return 0; } if ((uint)local_10 == 6) { *param_2 = 0; return 0xffffffff; } if ((uint)local_10 == 7) { if (NAN(local_18)) { *param_2 = 0; } else if (DAT_0020d858 <= local_18) { if (local_18 < DAT_00209008) { *param_2 = (long)local_18; } else { *param_2 = 0x7fffffffffffffff; } } else { *param_2 = -0x8000000000000000; } return 0; } auVar3 = JS_ToNumberFree(param_1,local_18,uVar1); iVar2 = JS_IsException(auVar3._0_8_,auVar3._8_8_); } while (iVar2 == 0); *param_2 = 0; return 0xffffffff; }
10,352
JS_ToInt64SatFree
bluesky950520[P]quickjs/quickjs.c
static int JS_ToInt64SatFree(JSContext *ctx, int64_t *pres, JSValue val) { uint32_t tag; redo: tag = JS_VALUE_GET_NORM_TAG(val); switch(tag) { case JS_TAG_INT: case JS_TAG_BOOL: case JS_TAG_NULL: case JS_TAG_UNDEFINED: *pres = JS_VALUE_GET_INT(val); return 0; case JS_TAG_EXCEPTION: *pres = 0; return -1; case JS_TAG_FLOAT64: { double d = JS_VALUE_GET_FLOAT64(val); if (isnan(d)) { *pres = 0; } else { if (d < INT64_MIN) *pres = INT64_MIN; else if (d >= 0x1p63) *pres = INT64_MAX; else *pres = (int64_t)d; } } return 0; default: val = JS_ToNumberFree(ctx, val); if (JS_IsException(val)) { *pres = 0; return -1; } goto redo; } }
O1
c
JS_ToInt64SatFree: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rax movq %rsi, %rbx movq %rdi, %r15 xorl %r12d, %r12d cmpl $0x4, %ecx jb 0x277ff movl $0xffffffff, %r14d # imm = 0xFFFFFFFF cmpl $0x6, %ecx je 0x27805 cmpl $0x7, %ecx je 0x27817 movq %r15, %rdi movq %rax, %rsi movq %rcx, %rdx xorl %ecx, %ecx callq 0x42b20 movq %rdx, %rcx cmpl $0x6, %ecx jne 0x277d0 jmp 0x27805 movslq %eax, %r12 xorl %r14d, %r14d movq %r12, (%rbx) movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %xmm0 xorl %r14d, %r14d ucomisd %xmm0, %xmm0 jp 0x27853 movabsq $0x7fffffffffffffff, %r12 # imm = 0x7FFFFFFFFFFFFFFF movsd 0x77081(%rip), %xmm1 # 0x9e8b8 ucomisd %xmm0, %xmm1 jbe 0x27842 incq %r12 jmp 0x27805 ucomisd 0x737be(%rip), %xmm0 # 0x9b008 jae 0x27805 cvttsd2si %xmm0, %r12 jmp 0x27805 xorl %r12d, %r12d jmp 0x27805
JS_ToInt64SatFree: push r15 push r14 push r12 push rbx push rax mov rax, rdx mov rbx, rsi mov r15, rdi xor r12d, r12d loc_277D0: cmp ecx, 4 jb short loc_277FF mov r14d, 0FFFFFFFFh cmp ecx, 6 jz short loc_27805 cmp ecx, 7 jz short loc_27817 mov rdi, r15 mov rsi, rax mov rdx, rcx xor ecx, ecx call JS_ToNumberHintFree mov rcx, rdx cmp ecx, 6 jnz short loc_277D0 jmp short loc_27805 loc_277FF: movsxd r12, eax xor r14d, r14d loc_27805: mov [rbx], r12 mov eax, r14d add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn loc_27817: movq xmm0, rax xor r14d, r14d ucomisd xmm0, xmm0 jp short loc_27853 mov r12, 7FFFFFFFFFFFFFFFh movsd xmm1, cs:qword_9E8B8 ucomisd xmm1, xmm0 jbe short loc_27842 inc r12 jmp short loc_27805 loc_27842: ucomisd xmm0, cs:qword_9B008 jnb short loc_27805 cvttsd2si r12, xmm0 jmp short loc_27805 loc_27853: xor r12d, r12d jmp short loc_27805
long long JS_ToInt64SatFree(long long a1, unsigned long long *a2, long long a3, long long a4) { unsigned long long v5; // r12 unsigned int v6; // r14d long long v7; // rdx v5 = 0LL; while ( 1 ) { if ( (unsigned int)a4 < 4 ) { v5 = (int)a3; v6 = 0; goto LABEL_8; } v6 = -1; if ( (_DWORD)a4 == 6 ) goto LABEL_8; if ( (_DWORD)a4 == 7 ) break; *(double *)&a3 = COERCE_DOUBLE(JS_ToNumberHintFree(a1, a3, a4, 0LL)); a4 = v7; if ( (_DWORD)v7 == 6 ) goto LABEL_8; } v6 = 0; v5 = 0x7FFFFFFFFFFFFFFFLL; if ( *(double *)&a3 >= -9.223372036854776e18 ) { if ( *(double *)&a3 < 9.223372036854776e18 ) v5 = (unsigned int)(int)*(double *)&a3; } else { v5 = 0x8000000000000000LL; } LABEL_8: *a2 = v5; return v6; }
JS_ToInt64SatFree: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RAX,RDX MOV RBX,RSI MOV R15,RDI XOR R12D,R12D LAB_001277d0: CMP ECX,0x4 JC 0x001277ff MOV R14D,0xffffffff CMP ECX,0x6 JZ 0x00127805 CMP ECX,0x7 JZ 0x00127817 MOV RDI,R15 MOV RSI,RAX MOV RDX,RCX XOR ECX,ECX CALL 0x00142b20 MOV RCX,RDX CMP ECX,0x6 JNZ 0x001277d0 JMP 0x00127805 LAB_001277ff: MOVSXD R12,EAX XOR R14D,R14D LAB_00127805: MOV qword ptr [RBX],R12 MOV EAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET LAB_00127817: MOVQ XMM0,RAX XOR R14D,R14D UCOMISD XMM0,XMM0 JP 0x00127853 MOV R12,0x7fffffffffffffff MOVSD XMM1,qword ptr [0x0019e8b8] UCOMISD XMM1,XMM0 JBE 0x00127842 INC R12 JMP 0x00127805 LAB_00127842: UCOMISD XMM0,qword ptr [0x0019b008] JNC 0x00127805 CVTTSD2SI R12,XMM0 JMP 0x00127805 LAB_00127853: XOR R12D,R12D JMP 0x00127805
int8 JS_ToInt64SatFree(int8 param_1,long *param_2,int8 param_3,int8 param_4) { double dVar1; uint uVar2; long lVar3; int8 uVar4; int8 uVar5; int1 auVar6 [16]; auVar6._8_8_ = param_4; auVar6._0_8_ = param_3; lVar3 = 0; while( true ) { dVar1 = auVar6._0_8_; uVar2 = auVar6._8_4_; if (uVar2 < 4) { lVar3 = (long)auVar6._0_4_; uVar4 = 0; goto LAB_00127805; } uVar4 = 0xffffffff; if (uVar2 == 6) goto LAB_00127805; if (uVar2 == 7) break; auVar6 = JS_ToNumberHintFree(param_1,dVar1,auVar6._8_8_,0); if (auVar6._8_4_ == 6) { LAB_00127805: *param_2 = lVar3; return uVar4; } } uVar5 = 0; uVar4 = 0; if (NAN(dVar1)) { lVar3 = 0; } else { lVar3 = 0x7fffffffffffffff; uVar4 = uVar5; if (DAT_0019e8b8 <= dVar1) { if (dVar1 < DAT_0019b008) { lVar3 = (long)dVar1; } } else { lVar3 = -0x8000000000000000; } } goto LAB_00127805; }
10,353
JS_ToInt64SatFree
bluesky950520[P]quickjs/quickjs.c
static int JS_ToInt64SatFree(JSContext *ctx, int64_t *pres, JSValue val) { uint32_t tag; redo: tag = JS_VALUE_GET_NORM_TAG(val); switch(tag) { case JS_TAG_INT: case JS_TAG_BOOL: case JS_TAG_NULL: case JS_TAG_UNDEFINED: *pres = JS_VALUE_GET_INT(val); return 0; case JS_TAG_EXCEPTION: *pres = 0; return -1; case JS_TAG_FLOAT64: { double d = JS_VALUE_GET_FLOAT64(val); if (isnan(d)) { *pres = 0; } else { if (d < INT64_MIN) *pres = INT64_MIN; else if (d >= 0x1p63) *pres = INT64_MAX; else *pres = (int64_t)d; } } return 0; default: val = JS_ToNumberFree(ctx, val); if (JS_IsException(val)) { *pres = 0; return -1; } goto redo; } }
O2
c
JS_ToInt64SatFree: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rax movq %rsi, %rbx movq %rdi, %r15 pushq $-0x1 popq %r14 xorl %r12d, %r12d cmpl $0x4, %ecx jb 0x2145e cmpl $0x6, %ecx je 0x21464 cmpl $0x7, %ecx je 0x21476 movq %r15, %rdi movq %rax, %rsi movq %rcx, %rdx callq 0x2e216 movq %rdx, %rcx cmpl $0x6, %ecx jne 0x21437 jmp 0x21464 movslq %eax, %r12 xorl %r14d, %r14d movq %r12, (%rbx) movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %xmm0 xorl %r14d, %r14d ucomisd %xmm0, %xmm0 jp 0x214b2 movabsq $0x7fffffffffffffff, %r12 # imm = 0x7FFFFFFFFFFFFFFF movsd 0x64352(%rip), %xmm1 # 0x857e8 ucomisd %xmm0, %xmm1 jbe 0x214a1 incq %r12 jmp 0x21464 ucomisd 0x60b5f(%rip), %xmm0 # 0x82008 jae 0x21464 cvttsd2si %xmm0, %r12 jmp 0x21464 xorl %r12d, %r12d jmp 0x21464
JS_ToInt64SatFree: push r15 push r14 push r12 push rbx push rax mov rax, rdx mov rbx, rsi mov r15, rdi push 0FFFFFFFFFFFFFFFFh pop r14 xor r12d, r12d loc_21437: cmp ecx, 4 jb short loc_2145E cmp ecx, 6 jz short loc_21464 cmp ecx, 7 jz short loc_21476 mov rdi, r15 mov rsi, rax mov rdx, rcx call JS_ToNumberFree mov rcx, rdx cmp ecx, 6 jnz short loc_21437 jmp short loc_21464 loc_2145E: movsxd r12, eax xor r14d, r14d loc_21464: mov [rbx], r12 mov eax, r14d add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn loc_21476: movq xmm0, rax xor r14d, r14d ucomisd xmm0, xmm0 jp short loc_214B2 mov r12, 7FFFFFFFFFFFFFFFh movsd xmm1, cs:qword_857E8 ucomisd xmm1, xmm0 jbe short loc_214A1 inc r12 jmp short loc_21464 loc_214A1: ucomisd xmm0, cs:qword_82008 jnb short loc_21464 cvttsd2si r12, xmm0 jmp short loc_21464 loc_214B2: xor r12d, r12d jmp short loc_21464
long long JS_ToInt64SatFree(long long a1, unsigned long long *a2, long long a3, long long a4) { unsigned int v5; // r14d unsigned long long v6; // r12 long long v7; // rdx v5 = -1; v6 = 0LL; while ( 1 ) { if ( (unsigned int)a4 < 4 ) { v6 = (int)a3; v5 = 0; goto LABEL_8; } if ( (_DWORD)a4 == 6 ) goto LABEL_8; if ( (_DWORD)a4 == 7 ) break; *(double *)&a3 = COERCE_DOUBLE(JS_ToNumberFree(a1, a3, a4)); a4 = v7; if ( (_DWORD)v7 == 6 ) goto LABEL_8; } v5 = 0; v6 = 0x7FFFFFFFFFFFFFFFLL; if ( *(double *)&a3 >= -9.223372036854776e18 ) { if ( *(double *)&a3 < 9.223372036854776e18 ) v6 = (unsigned int)(int)*(double *)&a3; } else { v6 = 0x8000000000000000LL; } LABEL_8: *a2 = v6; return v5; }
JS_ToInt64SatFree: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RAX,RDX MOV RBX,RSI MOV R15,RDI PUSH -0x1 POP R14 XOR R12D,R12D LAB_00121437: CMP ECX,0x4 JC 0x0012145e CMP ECX,0x6 JZ 0x00121464 CMP ECX,0x7 JZ 0x00121476 MOV RDI,R15 MOV RSI,RAX MOV RDX,RCX CALL 0x0012e216 MOV RCX,RDX CMP ECX,0x6 JNZ 0x00121437 JMP 0x00121464 LAB_0012145e: MOVSXD R12,EAX XOR R14D,R14D LAB_00121464: MOV qword ptr [RBX],R12 MOV EAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET LAB_00121476: MOVQ XMM0,RAX XOR R14D,R14D UCOMISD XMM0,XMM0 JP 0x001214b2 MOV R12,0x7fffffffffffffff MOVSD XMM1,qword ptr [0x001857e8] UCOMISD XMM1,XMM0 JBE 0x001214a1 INC R12 JMP 0x00121464 LAB_001214a1: UCOMISD XMM0,qword ptr [0x00182008] JNC 0x00121464 CVTTSD2SI R12,XMM0 JMP 0x00121464 LAB_001214b2: XOR R12D,R12D JMP 0x00121464
int4 JS_ToInt64SatFree(int8 param_1,long *param_2,int8 param_3,int8 param_4) { double dVar1; uint uVar2; long lVar3; int4 uVar4; int1 auVar5 [16]; auVar5._8_8_ = param_4; auVar5._0_8_ = param_3; uVar4 = 0xffffffff; lVar3 = 0; while( true ) { dVar1 = auVar5._0_8_; uVar2 = auVar5._8_4_; if (uVar2 < 4) { lVar3 = (long)auVar5._0_4_; uVar4 = 0; goto LAB_00121464; } if (uVar2 == 6) goto LAB_00121464; if (uVar2 == 7) break; auVar5 = JS_ToNumberFree(param_1,dVar1,auVar5._8_8_); if (auVar5._8_4_ == 6) { LAB_00121464: *param_2 = lVar3; return uVar4; } } if (NAN(dVar1)) { lVar3 = 0; uVar4 = 0; } else { lVar3 = 0x7fffffffffffffff; uVar4 = 0; if (DAT_001857e8 <= dVar1) { if (dVar1 < DAT_00182008) { lVar3 = (long)dVar1; uVar4 = 0; } } else { lVar3 = -0x8000000000000000; } } goto LAB_00121464; }
10,354
ma_pvio_tls_compare_fp
eloqsql/libmariadb/libmariadb/ma_tls.c
static my_bool ma_pvio_tls_compare_fp(const char *cert_fp, unsigned int cert_fp_len, const char *fp, unsigned int fp_len) { char *p= (char *)fp, *c; /* check length */ if (cert_fp_len != 20) return 1; /* We support two formats: 2 digits hex numbers, separated by colons (length=59) 20 * 2 digits hex numbers without separators (length = 40) */ if (fp_len != (strchr(fp, ':') ? 59 : 40)) return 1; for(c= (char *)cert_fp; c < cert_fp + cert_fp_len; c++) { signed char d1, d2; if (*p == ':') p++; if (p - fp > (int)fp_len -1) return 1; if ((d1 = ma_hex2int(*p)) == - 1 || (d2 = ma_hex2int(*(p+1))) == -1 || (char)(d1 * 16 + d2) != *c) return 1; p+= 2; } return 0; }
O3
c
ma_pvio_tls_compare_fp: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movb $0x1, %bl cmpl $0x14, %esi jne 0x24a3f movl %ecx, %r14d movq %rdx, %r15 movq %rdi, %r12 movq %rdx, %rdi movl $0x3a, %esi callq 0x13180 testq %rax, %rax movl $0x28, %eax movl $0x3b, %ecx cmovel %eax, %ecx cmpl %r14d, %ecx jne 0x24a3f decl %r14d xorl %eax, %eax movq %r15, %rdx xorl %ecx, %ecx cmpb $0x3a, (%rdx) sete %cl addq %rdx, %rcx movq %rcx, %rdx subq %r15, %rdx cmpq %r14, %rdx jg 0x24a3f movb (%rcx), %sil leal -0x30(%rsi), %edx cmpb $0xa, %dl jb 0x249f2 leal -0x41(%rsi), %edx cmpb $0x5, %dl ja 0x249e4 addb $-0x37, %sil jmp 0x249f0 leal -0x67(%rsi), %edx cmpb $-0x6, %dl jb 0x24a3f addb $-0x57, %sil movl %esi, %edx movb 0x1(%rcx), %sil leal -0x30(%rsi), %edi cmpb $0xa, %dil jb 0x24a1d leal -0x41(%rsi), %edi cmpb $0x5, %dil ja 0x24a0e addb $-0x37, %sil jmp 0x24a1b leal -0x67(%rsi), %edi cmpb $-0x6, %dil jb 0x24a3f addb $-0x57, %sil movl %esi, %edi shlb $0x4, %dl addb %dil, %dl cmpb (%r12,%rax), %dl jne 0x24a3f addq $0x2, %rcx incq %rax movq %rcx, %rdx cmpq $0x14, %rax jne 0x249b5 xorl %ebx, %ebx movl %ebx, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
ma_pvio_tls_compare_fp: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov bl, 1 cmp esi, 14h jnz loc_24A3F mov r14d, ecx mov r15, rdx mov r12, rdi mov rdi, rdx mov esi, 3Ah ; ':' call _strchr test rax, rax mov eax, 28h ; '(' mov ecx, 3Bh ; ';' cmovz ecx, eax cmp ecx, r14d jnz loc_24A3F dec r14d xor eax, eax mov rdx, r15 loc_249B5: xor ecx, ecx cmp byte ptr [rdx], 3Ah ; ':' setz cl add rcx, rdx mov rdx, rcx sub rdx, r15 cmp rdx, r14 jg short loc_24A3F mov sil, [rcx] lea edx, [rsi-30h] cmp dl, 0Ah jb short loc_249F2 lea edx, [rsi-41h] cmp dl, 5 ja short loc_249E4 add sil, 0C9h jmp short loc_249F0 loc_249E4: lea edx, [rsi-67h] cmp dl, 0FAh jb short loc_24A3F add sil, 0A9h loc_249F0: mov edx, esi loc_249F2: mov sil, [rcx+1] lea edi, [rsi-30h] cmp dil, 0Ah jb short loc_24A1D lea edi, [rsi-41h] cmp dil, 5 ja short loc_24A0E add sil, 0C9h jmp short loc_24A1B loc_24A0E: lea edi, [rsi-67h] cmp dil, 0FAh jb short loc_24A3F add sil, 0A9h loc_24A1B: mov edi, esi loc_24A1D: shl dl, 4 add dl, dil cmp dl, [r12+rax] jnz short loc_24A3F add rcx, 2 inc rax mov rdx, rcx cmp rax, 14h jnz loc_249B5 xor ebx, ebx loc_24A3F: mov eax, ebx pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long ma_pvio_tls_compare_fp(long long a1, int a2, _BYTE *a3, int a4) { unsigned int v4; // ebx long long v8; // rax int v9; // ecx long long v10; // r14 long long v11; // rax _BYTE *v12; // rdx char *v13; // rcx char v14; // si unsigned __int8 v15; // dl unsigned __int8 v16; // si char v17; // si char v18; // di char v19; // si LOBYTE(v4) = 1; if ( a2 == 20 ) { v8 = strchr(a3, 58LL); v9 = 59; if ( !v8 ) v9 = 40; if ( v9 == a4 ) { v10 = (unsigned int)(a4 - 1); v11 = 0LL; v12 = a3; while ( 1 ) { v13 = &v12[*v12 == 58]; if ( v13 - a3 > v10 ) break; v14 = *v13; v15 = *v13 - 48; if ( v15 >= 0xAu ) { if ( (unsigned __int8)(v14 - 65) > 5u ) { if ( (unsigned __int8)(v14 - 103) < 0xFAu ) return v4; v16 = v14 - 87; } else { v16 = v14 - 55; } v15 = v16; } v17 = v13[1]; v18 = v17 - 48; if ( (unsigned __int8)(v17 - 48) >= 0xAu ) { if ( (unsigned __int8)(v17 - 65) > 5u ) { if ( (unsigned __int8)(v17 - 103) < 0xFAu ) return v4; v19 = v17 - 87; } else { v19 = v17 - 55; } v18 = v19; } if ( v18 + 16 * v15 != *(_BYTE *)(a1 + v11) ) break; ++v11; v12 = v13 + 2; if ( v11 == 20 ) return 0; } } } return v4; }
ma_pvio_tls_compare_fp: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV BL,0x1 CMP ESI,0x14 JNZ 0x00124a3f MOV R14D,ECX MOV R15,RDX MOV R12,RDI MOV RDI,RDX MOV ESI,0x3a CALL 0x00113180 TEST RAX,RAX MOV EAX,0x28 MOV ECX,0x3b CMOVZ ECX,EAX CMP ECX,R14D JNZ 0x00124a3f DEC R14D XOR EAX,EAX MOV RDX,R15 LAB_001249b5: XOR ECX,ECX CMP byte ptr [RDX],0x3a SETZ CL ADD RCX,RDX MOV RDX,RCX SUB RDX,R15 CMP RDX,R14 JG 0x00124a3f MOV SIL,byte ptr [RCX] LEA EDX,[RSI + -0x30] CMP DL,0xa JC 0x001249f2 LEA EDX,[RSI + -0x41] CMP DL,0x5 JA 0x001249e4 ADD SIL,0xc9 JMP 0x001249f0 LAB_001249e4: LEA EDX,[RSI + -0x67] CMP DL,0xfa JC 0x00124a3f ADD SIL,0xa9 LAB_001249f0: MOV EDX,ESI LAB_001249f2: MOV SIL,byte ptr [RCX + 0x1] LEA EDI,[RSI + -0x30] CMP DIL,0xa JC 0x00124a1d LEA EDI,[RSI + -0x41] CMP DIL,0x5 JA 0x00124a0e ADD SIL,0xc9 JMP 0x00124a1b LAB_00124a0e: LEA EDI,[RSI + -0x67] CMP DIL,0xfa JC 0x00124a3f ADD SIL,0xa9 LAB_00124a1b: MOV EDI,ESI LAB_00124a1d: SHL DL,0x4 ADD DL,DIL CMP DL,byte ptr [R12 + RAX*0x1] JNZ 0x00124a3f ADD RCX,0x2 INC RAX MOV RDX,RCX CMP RAX,0x14 JNZ 0x001249b5 XOR EBX,EBX LAB_00124a3f: MOV EAX,EBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
ulong ma_pvio_tls_compare_fp(long param_1,int param_2,char *param_3,int param_4) { char cVar1; char *pcVar2; long lVar3; int iVar4; int8 unaff_RBX; ulong uVar5; byte bVar6; byte bVar7; uVar5 = CONCAT71((int7)((ulong)unaff_RBX >> 8),1); if (param_2 == 0x14) { pcVar2 = strchr(param_3,0x3a); iVar4 = 0x3b; if (pcVar2 == (char *)0x0) { iVar4 = 0x28; } if (iVar4 == param_4) { lVar3 = 0; pcVar2 = param_3; do { pcVar2 = pcVar2 + (*pcVar2 == ':'); if ((long)(ulong)(param_4 - 1) < (long)pcVar2 - (long)param_3) goto LAB_00124a3f; cVar1 = *pcVar2; bVar6 = cVar1 - 0x30; if (9 < bVar6) { if ((byte)(cVar1 + 0xbfU) < 6) { bVar6 = cVar1 - 0x37; } else { if ((byte)(cVar1 + 0x99U) < 0xfa) goto LAB_00124a3f; bVar6 = cVar1 + 0xa9; } } cVar1 = pcVar2[1]; bVar7 = cVar1 - 0x30; if (9 < bVar7) { if ((byte)(cVar1 + 0xbfU) < 6) { bVar7 = cVar1 - 0x37; } else { if ((byte)(cVar1 + 0x99U) < 0xfa) goto LAB_00124a3f; bVar7 = cVar1 + 0xa9; } } if ((byte)(bVar6 * '\x10' + bVar7) != *(char *)(param_1 + lVar3)) goto LAB_00124a3f; pcVar2 = pcVar2 + 2; lVar3 = lVar3 + 1; } while (lVar3 != 0x14); uVar5 = 0; } } LAB_00124a3f: return uVar5 & 0xffffffff; }
10,355
binding_system_register_define
tsotchke[P]eshkol/src/frontend/binding/core/binding_management.c
uint64_t binding_system_register_define(BindingSystem* system, uint64_t bind_id, AstNode* node) { assert(system != NULL); assert(node != NULL); assert(bind_id != 0); // Check if we need to resize the definitions table if(system->def_table.count >= system->def_table.capacity) { // Calculate new capacity size_t new_capacity = system->def_table.capacity == 0 ? 16 : system->def_table.capacity * 2; uint64_t* new_ids = arena_alloc(system->arena, sizeof(uint64_t) * new_capacity); uint64_t* new_binding_ids = arena_alloc(system->arena, sizeof(uint64_t) * new_capacity); AstNode** new_nodes = arena_alloc(system->arena, sizeof(AstNode*) * new_capacity); if(!new_ids || !new_nodes || !new_binding_ids) { return 0; } // Copy old data for(size_t i = 0; i < system->def_table.count; i++) { new_ids[i] = system->def_table.ids[i]; new_binding_ids[i] = system->def_table.binding_ids[i]; new_nodes[i] = system->def_table.nodes[i]; } // Update definitions table system->def_table.ids = new_ids; system->def_table.binding_ids = new_binding_ids; system->def_table.nodes = new_nodes; system->def_table.capacity = new_capacity; } // Create new definition uint64_t def_id = system->next_def_id++; system->def_table.ids[system->def_table.count] = def_id; system->def_table.binding_ids[system->def_table.count] = bind_id; system->def_table.nodes[system->def_table.count] = node; system->def_table.count++; return def_id; }
O0
c
binding_system_register_define: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) cmpq $0x0, -0x10(%rbp) je 0x11aad jmp 0x11acc leaq 0x531b(%rip), %rdi # 0x16dcf leaq 0x9f2c(%rip), %rsi # 0x1b9e7 movl $0xf1, %edx leaq 0xa17d(%rip), %rcx # 0x1bc44 callq 0x1120 cmpq $0x0, -0x20(%rbp) je 0x11ad5 jmp 0x11af4 leaq 0x55f2(%rip), %rdi # 0x170ce leaq 0x9f04(%rip), %rsi # 0x1b9e7 movl $0xf2, %edx leaq 0xa155(%rip), %rcx # 0x1bc44 callq 0x1120 cmpq $0x0, -0x18(%rbp) je 0x11afd jmp 0x11b1c leaq 0xa18e(%rip), %rdi # 0x1bc92 leaq 0x9edc(%rip), %rsi # 0x1b9e7 movl $0xf3, %edx leaq 0xa12d(%rip), %rcx # 0x1bc44 callq 0x1120 movq -0x10(%rbp), %rax movq 0x70(%rax), %rax movq -0x10(%rbp), %rcx cmpq 0x78(%rcx), %rax jb 0x11c71 movq -0x10(%rbp), %rax cmpq $0x0, 0x78(%rax) jne 0x11b48 movl $0x10, %eax movq %rax, -0x58(%rbp) jmp 0x11b57 movq -0x10(%rbp), %rax movq 0x78(%rax), %rax shlq %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x28(%rbp), %rsi shlq $0x3, %rsi callq 0x1c30 movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x28(%rbp), %rsi shlq $0x3, %rsi callq 0x1c30 movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x28(%rbp), %rsi shlq $0x3, %rsi callq 0x1c30 movq %rax, -0x40(%rbp) cmpq $0x0, -0x30(%rbp) je 0x11bbc cmpq $0x0, -0x40(%rbp) je 0x11bbc cmpq $0x0, -0x38(%rbp) jne 0x11bc9 movq $0x0, -0x8(%rbp) jmp 0x11cee movq $0x0, -0x48(%rbp) movq -0x48(%rbp), %rax movq -0x10(%rbp), %rcx cmpq 0x70(%rcx), %rax jae 0x11c41 movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movq -0x48(%rbp), %rcx movq (%rax,%rcx,8), %rdx movq -0x30(%rbp), %rax movq -0x48(%rbp), %rcx movq %rdx, (%rax,%rcx,8) movq -0x10(%rbp), %rax movq 0x60(%rax), %rax movq -0x48(%rbp), %rcx movq (%rax,%rcx,8), %rdx movq -0x38(%rbp), %rax movq -0x48(%rbp), %rcx movq %rdx, (%rax,%rcx,8) movq -0x10(%rbp), %rax movq 0x68(%rax), %rax movq -0x48(%rbp), %rcx movq (%rax,%rcx,8), %rdx movq -0x40(%rbp), %rax movq -0x48(%rbp), %rcx movq %rdx, (%rax,%rcx,8) movq -0x48(%rbp), %rax addq $0x1, %rax movq %rax, -0x48(%rbp) jmp 0x11bd1 movq -0x30(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x58(%rax) movq -0x38(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x60(%rax) movq -0x40(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x68(%rax) movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x78(%rax) movq -0x10(%rbp), %rcx movq 0x138(%rcx), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x138(%rcx) movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rdx movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movq -0x10(%rbp), %rcx movq 0x70(%rcx), %rcx movq %rdx, (%rax,%rcx,8) movq -0x18(%rbp), %rdx movq -0x10(%rbp), %rax movq 0x60(%rax), %rax movq -0x10(%rbp), %rcx movq 0x70(%rcx), %rcx movq %rdx, (%rax,%rcx,8) movq -0x20(%rbp), %rdx movq -0x10(%rbp), %rax movq 0x68(%rax), %rax movq -0x10(%rbp), %rcx movq 0x70(%rcx), %rcx movq %rdx, (%rax,%rcx,8) movq -0x10(%rbp), %rax movq 0x70(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x70(%rax) movq -0x50(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x60, %rsp popq %rbp retq nopl (%rax,%rax)
binding_system_register_define: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx cmp [rbp+var_10], 0 jz short loc_11AAD jmp short loc_11ACC loc_11AAD: lea rdi, aSystemNull; "system != NULL" lea rsi, aWorkspaceLlm4b_20; "/workspace/llm4binary/github/2025_star3"... mov edx, 0F1h lea rcx, aUint64TBinding_6; "uint64_t binding_system_register_define"... call ___assert_fail loc_11ACC: cmp [rbp+var_20], 0 jz short loc_11AD5 jmp short loc_11AF4 loc_11AD5: lea rdi, aNodeNull; "node != NULL" lea rsi, aWorkspaceLlm4b_20; "/workspace/llm4binary/github/2025_star3"... mov edx, 0F2h lea rcx, aUint64TBinding_6; "uint64_t binding_system_register_define"... call ___assert_fail loc_11AF4: cmp [rbp+var_18], 0 jz short loc_11AFD jmp short loc_11B1C loc_11AFD: lea rdi, aBindId0; "bind_id != 0" lea rsi, aWorkspaceLlm4b_20; "/workspace/llm4binary/github/2025_star3"... mov edx, 0F3h lea rcx, aUint64TBinding_6; "uint64_t binding_system_register_define"... call ___assert_fail loc_11B1C: mov rax, [rbp+var_10] mov rax, [rax+70h] mov rcx, [rbp+var_10] cmp rax, [rcx+78h] jb loc_11C71 mov rax, [rbp+var_10] cmp qword ptr [rax+78h], 0 jnz short loc_11B48 mov eax, 10h mov [rbp+var_58], rax jmp short loc_11B57 loc_11B48: mov rax, [rbp+var_10] mov rax, [rax+78h] shl rax, 1 mov [rbp+var_58], rax loc_11B57: mov rax, [rbp+var_58] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rdi, [rax] mov rsi, [rbp+var_28] shl rsi, 3 call arena_alloc mov [rbp+var_30], rax mov rax, [rbp+var_10] mov rdi, [rax] mov rsi, [rbp+var_28] shl rsi, 3 call arena_alloc mov [rbp+var_38], rax mov rax, [rbp+var_10] mov rdi, [rax] mov rsi, [rbp+var_28] shl rsi, 3 call arena_alloc mov [rbp+var_40], rax cmp [rbp+var_30], 0 jz short loc_11BBC cmp [rbp+var_40], 0 jz short loc_11BBC cmp [rbp+var_38], 0 jnz short loc_11BC9 loc_11BBC: mov [rbp+var_8], 0 jmp loc_11CEE loc_11BC9: mov [rbp+var_48], 0 loc_11BD1: mov rax, [rbp+var_48] mov rcx, [rbp+var_10] cmp rax, [rcx+70h] jnb short loc_11C41 mov rax, [rbp+var_10] mov rax, [rax+58h] mov rcx, [rbp+var_48] mov rdx, [rax+rcx*8] mov rax, [rbp+var_30] mov rcx, [rbp+var_48] mov [rax+rcx*8], rdx mov rax, [rbp+var_10] mov rax, [rax+60h] mov rcx, [rbp+var_48] mov rdx, [rax+rcx*8] mov rax, [rbp+var_38] mov rcx, [rbp+var_48] mov [rax+rcx*8], rdx mov rax, [rbp+var_10] mov rax, [rax+68h] mov rcx, [rbp+var_48] mov rdx, [rax+rcx*8] mov rax, [rbp+var_40] mov rcx, [rbp+var_48] mov [rax+rcx*8], rdx mov rax, [rbp+var_48] add rax, 1 mov [rbp+var_48], rax jmp short loc_11BD1 loc_11C41: mov rcx, [rbp+var_30] mov rax, [rbp+var_10] mov [rax+58h], rcx mov rcx, [rbp+var_38] mov rax, [rbp+var_10] mov [rax+60h], rcx mov rcx, [rbp+var_40] mov rax, [rbp+var_10] mov [rax+68h], rcx mov rcx, [rbp+var_28] mov rax, [rbp+var_10] mov [rax+78h], rcx loc_11C71: mov rcx, [rbp+var_10] mov rax, [rcx+138h] mov rdx, rax add rdx, 1 mov [rcx+138h], rdx mov [rbp+var_50], rax mov rdx, [rbp+var_50] mov rax, [rbp+var_10] mov rax, [rax+58h] mov rcx, [rbp+var_10] mov rcx, [rcx+70h] mov [rax+rcx*8], rdx mov rdx, [rbp+var_18] mov rax, [rbp+var_10] mov rax, [rax+60h] mov rcx, [rbp+var_10] mov rcx, [rcx+70h] mov [rax+rcx*8], rdx mov rdx, [rbp+var_20] mov rax, [rbp+var_10] mov rax, [rax+68h] mov rcx, [rbp+var_10] mov rcx, [rcx+70h] mov [rax+rcx*8], rdx mov rax, [rbp+var_10] mov rcx, [rax+70h] add rcx, 1 mov [rax+70h], rcx mov rax, [rbp+var_50] mov [rbp+var_8], rax loc_11CEE: mov rax, [rbp+var_8] add rsp, 60h pop rbp retn
long long binding_system_register_define(long long *a1, long long a2, long long a3) { long long v3; // rax long long v5; // [rsp+8h] [rbp-58h] unsigned long long i; // [rsp+18h] [rbp-48h] long long v7; // [rsp+20h] [rbp-40h] long long v8; // [rsp+28h] [rbp-38h] long long v9; // [rsp+30h] [rbp-30h] if ( !a1 ) __assert_fail( "system != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/core/binding_management.c", 241LL, "uint64_t binding_system_register_define(BindingSystem *, uint64_t, AstNode *)"); if ( !a3 ) __assert_fail( "node != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/core/binding_management.c", 242LL, "uint64_t binding_system_register_define(BindingSystem *, uint64_t, AstNode *)"); if ( !a2 ) __assert_fail( "bind_id != 0", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/core/binding_management.c", 243LL, "uint64_t binding_system_register_define(BindingSystem *, uint64_t, AstNode *)"); if ( a1[14] < (unsigned long long)a1[15] ) goto LABEL_19; if ( a1[15] ) v5 = 2 * a1[15]; else v5 = 16LL; v9 = arena_alloc(*a1, 8 * v5); v8 = arena_alloc(*a1, 8 * v5); v7 = arena_alloc(*a1, 8 * v5); if ( v9 && v7 && v8 ) { for ( i = 0LL; i < a1[14]; ++i ) { *(_QWORD *)(v9 + 8 * i) = *(_QWORD *)(a1[11] + 8 * i); *(_QWORD *)(v8 + 8 * i) = *(_QWORD *)(a1[12] + 8 * i); *(_QWORD *)(v7 + 8 * i) = *(_QWORD *)(a1[13] + 8 * i); } a1[11] = v9; a1[12] = v8; a1[13] = v7; a1[15] = v5; LABEL_19: v3 = a1[39]; a1[39] = v3 + 1; *(_QWORD *)(a1[11] + 8 * a1[14]) = v3; *(_QWORD *)(a1[12] + 8 * a1[14]) = a2; *(_QWORD *)(a1[13] + 8 * a1[14]++) = a3; return v3; } return 0LL; }
binding_system_register_define: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX CMP qword ptr [RBP + -0x10],0x0 JZ 0x00111aad JMP 0x00111acc LAB_00111aad: LEA RDI,[0x116dcf] LEA RSI,[0x11b9e7] MOV EDX,0xf1 LEA RCX,[0x11bc44] CALL 0x00101120 LAB_00111acc: CMP qword ptr [RBP + -0x20],0x0 JZ 0x00111ad5 JMP 0x00111af4 LAB_00111ad5: LEA RDI,[0x1170ce] LEA RSI,[0x11b9e7] MOV EDX,0xf2 LEA RCX,[0x11bc44] CALL 0x00101120 LAB_00111af4: CMP qword ptr [RBP + -0x18],0x0 JZ 0x00111afd JMP 0x00111b1c LAB_00111afd: LEA RDI,[0x11bc92] LEA RSI,[0x11b9e7] MOV EDX,0xf3 LEA RCX,[0x11bc44] CALL 0x00101120 LAB_00111b1c: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x70] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x78] JC 0x00111c71 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x78],0x0 JNZ 0x00111b48 MOV EAX,0x10 MOV qword ptr [RBP + -0x58],RAX JMP 0x00111b57 LAB_00111b48: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x78] SHL RAX,0x1 MOV qword ptr [RBP + -0x58],RAX LAB_00111b57: MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x28] SHL RSI,0x3 CALL 0x00101c30 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x28] SHL RSI,0x3 CALL 0x00101c30 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x28] SHL RSI,0x3 CALL 0x00101c30 MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x30],0x0 JZ 0x00111bbc CMP qword ptr [RBP + -0x40],0x0 JZ 0x00111bbc CMP qword ptr [RBP + -0x38],0x0 JNZ 0x00111bc9 LAB_00111bbc: MOV qword ptr [RBP + -0x8],0x0 JMP 0x00111cee LAB_00111bc9: MOV qword ptr [RBP + -0x48],0x0 LAB_00111bd1: MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x70] JNC 0x00111c41 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOV RCX,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x48] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x60] MOV RCX,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x48] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x68] MOV RCX,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x48] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RBP + -0x48] ADD RAX,0x1 MOV qword ptr [RBP + -0x48],RAX JMP 0x00111bd1 LAB_00111c41: MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x58],RCX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x60],RCX MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x68],RCX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x78],RCX LAB_00111c71: MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RCX + 0x138] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RCX + 0x138],RDX MOV qword ptr [RBP + -0x50],RAX MOV RDX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x70] MOV qword ptr [RAX + RCX*0x8],RDX MOV RDX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x60] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x70] MOV qword ptr [RAX + RCX*0x8],RDX MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x68] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x70] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x70] ADD RCX,0x1 MOV qword ptr [RAX + 0x70],RCX MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x8],RAX LAB_00111cee: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x60 POP RBP RET
long binding_system_register_define(int8 *param_1,long param_2,long param_3) { long lVar1; long lVar2; long lVar3; long local_60; ulong local_50; if (param_1 == (int8 *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("system != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/core/binding_management.c" ,0xf1, "uint64_t binding_system_register_define(BindingSystem *, uint64_t, AstNode *)"); } if (param_3 != 0) { if (param_2 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("bind_id != 0", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/core/binding_management.c" ,0xf3, "uint64_t binding_system_register_define(BindingSystem *, uint64_t, AstNode *)") ; } if ((ulong)param_1[0xf] <= (ulong)param_1[0xe]) { if (param_1[0xf] == 0) { local_60 = 0x10; } else { local_60 = param_1[0xf] << 1; } lVar1 = arena_alloc(*param_1,local_60 << 3); lVar2 = arena_alloc(*param_1,local_60 << 3); lVar3 = arena_alloc(*param_1,local_60 << 3); if (((lVar1 == 0) || (lVar3 == 0)) || (lVar2 == 0)) { return 0; } for (local_50 = 0; local_50 < (ulong)param_1[0xe]; local_50 = local_50 + 1) { *(int8 *)(lVar1 + local_50 * 8) = *(int8 *)(param_1[0xb] + local_50 * 8); *(int8 *)(lVar2 + local_50 * 8) = *(int8 *)(param_1[0xc] + local_50 * 8); *(int8 *)(lVar3 + local_50 * 8) = *(int8 *)(param_1[0xd] + local_50 * 8); } param_1[0xb] = lVar1; param_1[0xc] = lVar2; param_1[0xd] = lVar3; param_1[0xf] = local_60; } lVar1 = param_1[0x27]; param_1[0x27] = lVar1 + 1; *(long *)(param_1[0xb] + param_1[0xe] * 8) = lVar1; *(long *)(param_1[0xc] + param_1[0xe] * 8) = param_2; *(long *)(param_1[0xd] + param_1[0xe] * 8) = param_3; param_1[0xe] = param_1[0xe] + 1; return lVar1; } /* WARNING: Subroutine does not return */ __assert_fail("node != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/core/binding_management.c" ,0xf2, "uint64_t binding_system_register_define(BindingSystem *, uint64_t, AstNode *)"); }
10,356
string_advance_index
bluesky950520[P]quickjs/quickjs.c
static int64_t string_advance_index(JSString *p, int64_t index, BOOL unicode) { if (!unicode || index >= p->len || !p->is_wide_char) { index++; } else { int index32 = (int)index; string_getc(p, &index32); index = index32; } return index; }
O0
c
string_advance_index: subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq %rsi, 0x8(%rsp) movl %edx, 0x4(%rsp) cmpl $0x0, 0x4(%rsp) je 0x8522a movq 0x8(%rsp), %rax movq 0x10(%rsp), %rcx movq 0x4(%rcx), %rcx andq $0x7fffffff, %rcx # imm = 0x7FFFFFFF movl %ecx, %ecx cmpq %rcx, %rax jge 0x8522a movq 0x10(%rsp), %rax movq 0x4(%rax), %rax shrq $0x1f, %rax andq $0x1, %rax cmpb $0x0, %al jne 0x8523a movq 0x8(%rsp), %rax addq $0x1, %rax movq %rax, 0x8(%rsp) jmp 0x85258 movq 0x8(%rsp), %rax movl %eax, (%rsp) movq 0x10(%rsp), %rdi movq %rsp, %rsi callq 0x85b60 movslq (%rsp), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax addq $0x18, %rsp retq nopw %cs:(%rax,%rax)
string_advance_index: sub rsp, 18h mov [rsp+18h+var_8], rdi mov [rsp+18h+var_10], rsi mov [rsp+18h+var_14], edx cmp [rsp+18h+var_14], 0 jz short loc_8522A mov rax, [rsp+18h+var_10] mov rcx, [rsp+18h+var_8] mov rcx, [rcx+4] and rcx, 7FFFFFFFh mov ecx, ecx cmp rax, rcx jge short loc_8522A mov rax, [rsp+18h+var_8] mov rax, [rax+4] shr rax, 1Fh and rax, 1 cmp al, 0 jnz short loc_8523A loc_8522A: mov rax, [rsp+18h+var_10] add rax, 1 mov [rsp+18h+var_10], rax jmp short loc_85258 loc_8523A: mov rax, [rsp+18h+var_10] mov [rsp+18h+var_18], eax mov rdi, [rsp+18h+var_8] mov rsi, rsp call string_getc movsxd rax, [rsp+18h+var_18] mov [rsp+18h+var_10], rax loc_85258: mov rax, [rsp+18h+var_10] add rsp, 18h retn
long long string_advance_index(long long a1, long long a2, int a3) { _DWORD v4[2]; // [rsp+0h] [rbp-18h] BYREF long long v5; // [rsp+8h] [rbp-10h] long long v6; // [rsp+10h] [rbp-8h] v6 = a1; v5 = a2; v4[1] = a3; if ( a3 && v5 < (*(_QWORD *)(v6 + 4) & 0x7FFFFFFFLL) && (*(_QWORD *)(v6 + 4) & 0x80000000LL) != 0 ) { v4[0] = v5; string_getc(v6, v4); return v4[0]; } else { ++v5; } return v5; }
string_advance_index: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RSP + 0x8],RSI MOV dword ptr [RSP + 0x4],EDX CMP dword ptr [RSP + 0x4],0x0 JZ 0x0018522a MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RCX + 0x4] AND RCX,0x7fffffff MOV ECX,ECX CMP RAX,RCX JGE 0x0018522a MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x4] SHR RAX,0x1f AND RAX,0x1 CMP AL,0x0 JNZ 0x0018523a LAB_0018522a: MOV RAX,qword ptr [RSP + 0x8] ADD RAX,0x1 MOV qword ptr [RSP + 0x8],RAX JMP 0x00185258 LAB_0018523a: MOV RAX,qword ptr [RSP + 0x8] MOV dword ptr [RSP],EAX MOV RDI,qword ptr [RSP + 0x10] MOV RSI,RSP CALL 0x00185b60 MOVSXD RAX,dword ptr [RSP] MOV qword ptr [RSP + 0x8],RAX LAB_00185258: MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x18 RET
long string_advance_index(long param_1,long param_2,int param_3) { int local_18; int local_14; long local_10; long local_8; if (((param_3 == 0) || ((long)(ulong)((uint)*(int8 *)(param_1 + 4) & 0x7fffffff) <= param_2) ) || ((*(ulong *)(param_1 + 4) >> 0x1f & 1) == 0)) { local_10 = param_2 + 1; } else { local_18 = (int)param_2; local_14 = param_3; local_10 = param_2; local_8 = param_1; string_getc(param_1,&local_18); local_10 = (long)local_18; } return local_10; }
10,357
string_advance_index
bluesky950520[P]quickjs/quickjs.c
static int64_t string_advance_index(JSString *p, int64_t index, BOOL unicode) { if (!unicode || index >= p->len || !p->is_wide_char) { index++; } else { int index32 = (int)index; string_getc(p, &index32); index = index32; } return index; }
O1
c
string_advance_index: movq %rsi, %rax testl %edx, %edx je 0x4bfbd movq 0x4(%rdi), %rcx movl %ecx, %edx andl $0x7fffffff, %edx # imm = 0x7FFFFFFF cmpq %rax, %rdx setg %dl testl %ecx, %ecx sets %cl testb %cl, %dl jne 0x4bfc1 incq %rax retq pushq %rbx subq $0x10, %rsp leaq 0xc(%rsp), %rbx movl %eax, (%rbx) movq %rbx, %rsi callq 0x4c5ad movslq (%rbx), %rax addq $0x10, %rsp popq %rbx retq
string_advance_index: mov rax, rsi test edx, edx jz short loc_4BFBD mov rcx, [rdi+4] mov edx, ecx and edx, 7FFFFFFFh cmp rdx, rax setnle dl test ecx, ecx sets cl test dl, cl jnz short loc_4BFC1 loc_4BFBD: inc rax retn loc_4BFC1: push rbx sub rsp, 10h lea rbx, [rsp+18h+var_C] mov [rbx], eax mov rsi, rbx call string_getc movsxd rax, dword ptr [rbx] add rsp, 10h pop rbx retn
long long string_advance_index(long long a1, long long a2, int a3) { _DWORD v4[3]; // [rsp+0h] [rbp-Ch] BYREF if ( !a3 || (int)*(_QWORD *)(a1 + 4) >= 0 || (*(_QWORD *)(a1 + 4) & 0x7FFFFFFFLL) <= a2 ) return a2 + 1; v4[0] = a2; string_getc(a1, v4); return v4[0]; }
10,358
string_advance_index
bluesky950520[P]quickjs/quickjs.c
static int64_t string_advance_index(JSString *p, int64_t index, BOOL unicode) { if (!unicode || index >= p->len || !p->is_wide_char) { index++; } else { int index32 = (int)index; string_getc(p, &index32); index = index32; } return index; }
O2
c
string_advance_index: movq %rsi, %rax testl %edx, %edx je 0x41573 movq 0x4(%rdi), %rcx movl %ecx, %edx andl $0x7fffffff, %edx # imm = 0x7FFFFFFF cmpq %rax, %rdx setg %dl testl %ecx, %ecx sets %cl testb %cl, %dl jne 0x41577 incq %rax retq pushq %rbx subq $0x10, %rsp leaq 0xc(%rsp), %rbx movl %eax, (%rbx) movq %rbx, %rsi callq 0x41a28 movslq (%rbx), %rax addq $0x10, %rsp popq %rbx retq
string_advance_index: mov rax, rsi test edx, edx jz short loc_41573 mov rcx, [rdi+4] mov edx, ecx and edx, 7FFFFFFFh cmp rdx, rax setnle dl test ecx, ecx sets cl test dl, cl jnz short loc_41577 loc_41573: inc rax retn loc_41577: push rbx sub rsp, 10h lea rbx, [rsp+18h+var_C] mov [rbx], eax mov rsi, rbx call string_getc movsxd rax, dword ptr [rbx] add rsp, 10h pop rbx retn
long long string_advance_index(long long a1, long long a2, int a3) { _DWORD v4[3]; // [rsp+0h] [rbp-Ch] BYREF if ( !a3 || (int)*(_QWORD *)(a1 + 4) >= 0 || (*(_QWORD *)(a1 + 4) & 0x7FFFFFFFLL) <= a2 ) return a2 + 1; v4[0] = a2; string_getc(a1, v4); return v4[0]; }
string_advance_index: MOV RAX,RSI TEST EDX,EDX JZ 0x00141573 MOV RCX,qword ptr [RDI + 0x4] MOV EDX,ECX AND EDX,0x7fffffff CMP RDX,RAX SETG DL TEST ECX,ECX SETS CL TEST DL,CL JNZ 0x00141577 LAB_00141573: INC RAX RET LAB_00141577: PUSH RBX SUB RSP,0x10 LEA RBX,[RSP + 0xc] MOV dword ptr [RBX],EAX MOV RSI,RBX CALL 0x00141a28 MOVSXD RAX,dword ptr [RBX] ADD RSP,0x10 POP RBX RET
long string_advance_index(long param_1,long param_2,int param_3) { uint uVar1; int local_c; if (param_3 != 0) { uVar1 = (uint)*(int8 *)(param_1 + 4); if (param_2 < (long)(ulong)(uVar1 & 0x7fffffff) && (int)uVar1 < 0) { local_c = (int)param_2; string_getc(param_1,&local_c); return (long)local_c; } } return param_2 + 1; }
10,359
LefDefParser::lefiViaRule::Destroy()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiViaRule.cpp
void lefiViaRule::Destroy() { clear(); lefFree(name_); lefFree((char*) (vias_)); lefFree((char*) (names_)); lefFree((char*) (values_)); lefFree((char*) (dvalues_)); lefFree((char*) (types_)); layers_[0].Destroy(); layers_[1].Destroy(); layers_[2].Destroy(); }
O0
cpp
LefDefParser::lefiViaRule::Destroy(): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x49530 movq 0x8(%rsp), %rax movq (%rax), %rdi callq 0x52810 movq 0x8(%rsp), %rax movq 0x1d0(%rax), %rdi callq 0x52810 movq 0x8(%rsp), %rax movq 0x1e0(%rax), %rdi callq 0x52810 movq 0x8(%rsp), %rax movq 0x1e8(%rax), %rdi callq 0x52810 movq 0x8(%rsp), %rax movq 0x1f0(%rax), %rdi callq 0x52810 movq 0x8(%rsp), %rax movq 0x1f8(%rax), %rdi callq 0x52810 movq 0x8(%rsp), %rdi addq $0x18, %rdi callq 0x48bb0 movq 0x8(%rsp), %rdi addq $0x18, %rdi addq $0x90, %rdi callq 0x48bb0 movq 0x8(%rsp), %rdi addq $0x18, %rdi addq $0x120, %rdi # imm = 0x120 callq 0x48bb0 addq $0x18, %rsp retq nopw (%rax,%rax)
_ZN12LefDefParser11lefiViaRule7DestroyEv: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rdi, [rsp+18h+var_8]; this mov [rsp+18h+var_10], rdi call _ZN12LefDefParser11lefiViaRule5clearEv; LefDefParser::lefiViaRule::clear(void) mov rax, [rsp+18h+var_10] mov rdi, [rax]; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) mov rax, [rsp+18h+var_10] mov rdi, [rax+1D0h]; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) mov rax, [rsp+18h+var_10] mov rdi, [rax+1E0h]; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) mov rax, [rsp+18h+var_10] mov rdi, [rax+1E8h]; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) mov rax, [rsp+18h+var_10] mov rdi, [rax+1F0h]; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) mov rax, [rsp+18h+var_10] mov rdi, [rax+1F8h]; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) mov rdi, [rsp+18h+var_10] add rdi, 18h; this call _ZN12LefDefParser16lefiViaRuleLayer7DestroyEv; LefDefParser::lefiViaRuleLayer::Destroy(void) mov rdi, [rsp+18h+var_10] add rdi, 18h add rdi, 90h; this call _ZN12LefDefParser16lefiViaRuleLayer7DestroyEv; LefDefParser::lefiViaRuleLayer::Destroy(void) mov rdi, [rsp+18h+var_10] add rdi, 18h add rdi, 120h; this call _ZN12LefDefParser16lefiViaRuleLayer7DestroyEv; LefDefParser::lefiViaRuleLayer::Destroy(void) add rsp, 18h retn
LefDefParser ** LefDefParser::lefiViaRule::Destroy(LefDefParser **this, void *a2) { LefDefParser::lefiViaRule::clear((LefDefParser::lefiViaRule *)this, a2); LefDefParser::lefFree(*this, a2); LefDefParser::lefFree(this[58], a2); LefDefParser::lefFree(this[60], a2); LefDefParser::lefFree(this[61], a2); LefDefParser::lefFree(this[62], a2); LefDefParser::lefFree(this[63], a2); LefDefParser::lefiViaRuleLayer::Destroy(this + 3, a2); LefDefParser::lefiViaRuleLayer::Destroy(this + 21, a2); return LefDefParser::lefiViaRuleLayer::Destroy(this + 39, a2); }
Destroy: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RDI CALL 0x00149530 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX] CALL 0x00152810 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x1d0] CALL 0x00152810 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x1e0] CALL 0x00152810 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x1e8] CALL 0x00152810 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x1f0] CALL 0x00152810 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x1f8] CALL 0x00152810 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x18 CALL 0x00148bb0 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x18 ADD RDI,0x90 CALL 0x00148bb0 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x18 ADD RDI,0x120 CALL 0x00148bb0 ADD RSP,0x18 RET
/* LefDefParser::lefiViaRule::Destroy() */ void __thiscall LefDefParser::lefiViaRule::Destroy(lefiViaRule *this) { clear(this); lefFree(*(void **)this); lefFree(*(void **)(this + 0x1d0)); lefFree(*(void **)(this + 0x1e0)); lefFree(*(void **)(this + 0x1e8)); lefFree(*(void **)(this + 0x1f0)); lefFree(*(void **)(this + 0x1f8)); lefiViaRuleLayer::Destroy((lefiViaRuleLayer *)(this + 0x18)); lefiViaRuleLayer::Destroy((lefiViaRuleLayer *)(this + 0xa8)); lefiViaRuleLayer::Destroy((lefiViaRuleLayer *)(this + 0x138)); return; }
10,360
my_wc_mb_latin1
eloqsql/strings/ctype-latin1.c
static int my_wc_mb_latin1(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *str, uchar *end __attribute__((unused))) { const uchar *pl; if (str >= end) return MY_CS_TOOSMALL; if (wc > 0xFFFF) return MY_CS_ILUNI; pl= uni_to_cs[wc >> 8]; str[0]= pl ? pl[wc & 0xFF] : '\0'; return (!str[0] && wc) ? MY_CS_ILUNI : 1; }
O3
c
my_wc_mb_latin1: movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x6b198 xorl %eax, %eax cmpq $0xffff, %rsi # imm = 0xFFFF ja 0x6b198 pushq %rbp movq %rsp, %rbp movq %rsi, %rax shrq $0x8, %rax leaq 0x2bc0af(%rip), %rcx # 0x327220 movq (%rcx,%rax,8), %rax testq %rax, %rax je 0x6b183 movzbl %sil, %ecx movb (%rax,%rcx), %al jmp 0x6b185 xorl %eax, %eax movb %al, (%rdx) testb %al, %al setne %al testq %rsi, %rsi sete %cl orb %al, %cl movzbl %cl, %eax popq %rbp retq
my_wc_mb_latin1: mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short locret_6B198 xor eax, eax cmp rsi, 0FFFFh ja short locret_6B198 push rbp mov rbp, rsp mov rax, rsi shr rax, 8 lea rcx, uni_to_cs mov rax, [rcx+rax*8] test rax, rax jz short loc_6B183 movzx ecx, sil mov al, [rax+rcx] jmp short loc_6B185 loc_6B183: xor eax, eax loc_6B185: mov [rdx], al test al, al setnz al test rsi, rsi setz cl or cl, al movzx eax, cl pop rbp locret_6B198: retn
long long my_wc_mb_latin1(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { long long result; // rax long long v5; // rax char v6; // al result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { result = 0LL; if ( a2 <= 0xFFFF ) { v5 = (long long)*(&uni_to_cs + (a2 >> 8)); if ( v5 ) v6 = *(_BYTE *)(v5 + (unsigned __int8)a2); else v6 = 0; *a3 = v6; return (v6 != 0) | (unsigned __int8)(a2 == 0); } } return result; }
my_wc_mb_latin1: MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x0016b198 XOR EAX,EAX CMP RSI,0xffff JA 0x0016b198 PUSH RBP MOV RBP,RSP MOV RAX,RSI SHR RAX,0x8 LEA RCX,[0x427220] MOV RAX,qword ptr [RCX + RAX*0x8] TEST RAX,RAX JZ 0x0016b183 MOVZX ECX,SIL MOV AL,byte ptr [RAX + RCX*0x1] JMP 0x0016b185 LAB_0016b183: XOR EAX,EAX LAB_0016b185: MOV byte ptr [RDX],AL TEST AL,AL SETNZ AL TEST RSI,RSI SETZ CL OR CL,AL MOVZX EAX,CL POP RBP LAB_0016b198: RET
ulong my_wc_mb_latin1(int8 param_1,ulong param_2,char *param_3,char *param_4) { char cVar1; ulong uVar2; uVar2 = 0xffffff9b; if ((param_3 < param_4) && (uVar2 = 0, param_2 < 0x10000)) { if (*(long *)(uni_to_cs + (param_2 >> 8) * 8) == 0) { cVar1 = '\0'; } else { cVar1 = *(char *)(*(long *)(uni_to_cs + (param_2 >> 8) * 8) + (param_2 & 0xff)); } *param_3 = cVar1; uVar2 = (ulong)(param_2 == 0 || cVar1 != '\0'); } return uVar2; }
10,361
my_end
eloqsql/mysys/my_init.c
void my_end(int infoflag) { /* this code is suboptimal to workaround a bug in Sun CC: Sun C++ 5.6 2004/06/02 for x86, and should not be optimized until this compiler is not in use anymore */ FILE *info_file= DBUG_FILE; my_bool print_info= (info_file != stderr); if (!my_init_done) return; /* We do not use DBUG_ENTER here, as after cleanup DBUG is no longer operational, so we cannot use DBUG_RETURN. */ DBUG_PRINT("info",("Shutting down: infoflag: %d print_info: %d", infoflag, print_info)); if (!info_file) { info_file= stderr; print_info= 0; } if ((infoflag & MY_CHECK_ERROR) || print_info) { /* Test if some file is left open */ char ebuff[512]; uint i, open_files, open_streams; for (open_streams= open_files= i= 0 ; i < my_file_limit ; i++) { if (my_file_info[i].type == UNOPEN) continue; if (my_file_info[i].type == STREAM_BY_FOPEN || my_file_info[i].type == STREAM_BY_FDOPEN) open_streams++; else open_files++; #ifdef EXTRA_DEBUG fprintf(stderr, EE(EE_FILE_NOT_CLOSED), my_file_info[i].name, i); fputc('\n', stderr); #endif } if (open_files || open_streams) { my_snprintf(ebuff, sizeof(ebuff), EE(EE_OPEN_WARNING), open_files, open_streams); my_message_stderr(EE_OPEN_WARNING, ebuff, ME_BELL); DBUG_PRINT("error", ("%s", ebuff)); } #ifdef CHECK_UNLIKELY end_my_likely(info_file); #endif } free_charsets(); my_error_unregister_all(); my_once_free(); if ((infoflag & MY_GIVE_INFO) || print_info) { #ifdef HAVE_GETRUSAGE struct rusage rus; #ifdef HAVE_valgrind /* Purify assumes that rus is uninitialized after getrusage call */ bzero((char*) &rus, sizeof(rus)); #endif if (!getrusage(RUSAGE_SELF, &rus)) fprintf(info_file,"\n\ User time %.2f, System time %.2f\n\ Maximum resident set size %ld, Integral resident set size %ld\n\ Non-physical pagefaults %ld, Physical pagefaults %ld, Swaps %ld\n\ Blocks in %ld out %ld, Messages in %ld out %ld, Signals %ld\n\ Voluntary context switches %ld, Involuntary context switches %ld\n", (rus.ru_utime.tv_sec * SCALE_SEC + rus.ru_utime.tv_usec / SCALE_USEC) / 100.0, (rus.ru_stime.tv_sec * SCALE_SEC + rus.ru_stime.tv_usec / SCALE_USEC) / 100.0, rus.ru_maxrss, rus.ru_idrss, rus.ru_minflt, rus.ru_majflt, rus.ru_nswap, rus.ru_inblock, rus.ru_oublock, rus.ru_msgsnd, rus.ru_msgrcv, rus.ru_nsignals, rus.ru_nvcsw, rus.ru_nivcsw); #endif #if defined(_MSC_VER) _CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_WARN, _CRTDBG_FILE_STDERR ); _CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_ERROR, _CRTDBG_FILE_STDERR ); _CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDERR ); _CrtCheckMemory(); #endif } my_thread_end(); my_thread_global_end(); if (!(infoflag & MY_DONT_FREE_DBUG)) DBUG_END(); /* Must be done as late as possible */ my_mutex_end(); #if defined(SAFE_MUTEX) /* Check on destroying of mutexes. A few may be left that will get cleaned up by C++ destructors */ safe_mutex_end((infoflag & (MY_GIVE_INFO | MY_CHECK_ERROR)) ? stderr : (FILE *) 0); #endif /* defined(SAFE_MUTEX) */ #ifdef _WIN32 WSACleanup(); #endif /* At very last, delete mysys key, it is used everywhere including DBUG */ pthread_key_delete(THR_KEY_mysys); my_init_done= my_thr_key_mysys_exists= 0; }
O0
c
my_end: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x308, %rsp # imm = 0x308 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movl %edi, -0x234(%rbp) movq 0x1d0272(%rip), %rax # 0x289fe0 movq (%rax), %rax movq %rax, -0x240(%rbp) movq -0x240(%rbp), %rax movq 0x1d025a(%rip), %rcx # 0x289fe0 cmpq (%rcx), %rax setne %al andb $0x1, %al movzbl %al, %eax movb %al, -0x241(%rbp) leaq 0x395f12(%rip), %rax # 0x44fcb0 cmpb $0x0, (%rax) jne 0xb9da8 jmp 0xba0a1 jmp 0xb9daa jmp 0xb9dac cmpq $0x0, -0x240(%rbp) jne 0xb9dce movq 0x1d0223(%rip), %rax # 0x289fe0 movq (%rax), %rax movq %rax, -0x240(%rbp) movb $0x0, -0x241(%rbp) movl -0x234(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0xb9dec movsbl -0x241(%rbp), %eax cmpl $0x0, %eax je 0xb9f0a movl $0x0, -0x248(%rbp) movl $0x0, -0x24c(%rbp) movl $0x0, -0x250(%rbp) movl -0x248(%rbp), %eax leaq 0x1d4199(%rip), %rcx # 0x28dfb0 cmpl (%rcx), %eax jae 0xb9eae leaq 0x1d4192(%rip), %rax # 0x28dfb8 movq (%rax), %rax movl -0x248(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax cmpl $0x0, 0x8(%rax) jne 0xb9e3e jmp 0xb9e9a leaq 0x1d4173(%rip), %rax # 0x28dfb8 movq (%rax), %rax movl -0x248(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax cmpl $0x3, 0x8(%rax) je 0xb9e78 leaq 0x1d4156(%rip), %rax # 0x28dfb8 movq (%rax), %rax movl -0x248(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax cmpl $0x4, 0x8(%rax) jne 0xb9e89 movl -0x250(%rbp), %eax addl $0x1, %eax movl %eax, -0x250(%rbp) jmp 0xb9e98 movl -0x24c(%rbp), %eax addl $0x1, %eax movl %eax, -0x24c(%rbp) jmp 0xb9e9a movl -0x248(%rbp), %eax addl $0x1, %eax movl %eax, -0x248(%rbp) jmp 0xb9e0a cmpl $0x0, -0x24c(%rbp) jne 0xb9ec0 cmpl $0x0, -0x250(%rbp) je 0xb9f08 leaq -0x230(%rbp), %rdi leaq 0x1d4752(%rip), %rax # 0x28e620 movq 0x90(%rax), %rdx movl -0x24c(%rbp), %ecx movl -0x250(%rbp), %r8d movl $0x200, %esi # imm = 0x200 movb $0x0, %al callq 0x10bfb0 leaq -0x230(%rbp), %rsi movl $0x13, %edi movl $0x4, %edx callq 0xbaea0 jmp 0xb9f06 jmp 0xb9f08 jmp 0xb9f0a callq 0xa5040 callq 0xb53a0 callq 0xbb210 movl -0x234(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax jne 0xb9f37 movsbl -0x241(%rbp), %eax cmpl $0x0, %eax je 0xba05c xorl %edi, %edi leaq -0x2e0(%rbp), %rsi callq 0x3bcc0 cmpl $0x0, %eax jne 0xba05a movq -0x240(%rbp), %rdi imulq $0x64, -0x2e0(%rbp), %rax movq %rax, -0x2f0(%rbp) movq -0x2d8(%rbp), %rax movl $0x2710, %ecx # imm = 0x2710 cqto idivq %rcx movq %rax, %rcx movq -0x2f0(%rbp), %rax addq %rcx, %rax cvtsi2sd %rax, %xmm0 movsd 0x56c41(%rip), %xmm1 # 0x110bd0 divsd %xmm1, %xmm0 imulq $0x64, -0x2d0(%rbp), %rax movq %rax, -0x2e8(%rbp) movq -0x2c8(%rbp), %rax movl $0x2710, %ecx # imm = 0x2710 cqto idivq %rcx movq %rax, %rcx movq -0x2e8(%rbp), %rax addq %rcx, %rax cvtsi2sd %rax, %xmm1 movsd 0x56c03(%rip), %xmm2 # 0x110bd0 divsd %xmm2, %xmm1 movq -0x2c0(%rbp), %rdx movq -0x2b0(%rbp), %rcx movq -0x2a0(%rbp), %r8 movq -0x298(%rbp), %r9 movq -0x290(%rbp), %r13 movq -0x288(%rbp), %r12 movq -0x280(%rbp), %r15 movq -0x278(%rbp), %r14 movq -0x270(%rbp), %rbx movq -0x268(%rbp), %r11 movq -0x260(%rbp), %r10 movq -0x258(%rbp), %rax leaq 0x5eb62(%rip), %rsi # 0x118b8e movq %r13, (%rsp) movq %r12, 0x8(%rsp) movq %r15, 0x10(%rsp) movq %r14, 0x18(%rsp) movq %rbx, 0x20(%rsp) movq %r11, 0x28(%rsp) movq %r10, 0x30(%rsp) movq %rax, 0x38(%rsp) movb $0x2, %al callq 0x3b240 jmp 0xba05c callq 0xbcec0 callq 0xbcc30 movl -0x234(%rbp), %eax andl $0x4, %eax cmpl $0x0, %eax jne 0xba07a jmp 0xba076 jmp 0xba078 jmp 0xba07a callq 0xbd8f0 leaq 0x39692e(%rip), %rax # 0x4509b4 movl (%rax), %edi callq 0x3baa0 leaq 0x396658(%rip), %rax # 0x4506ec movb $0x0, (%rax) leaq 0x395c12(%rip), %rax # 0x44fcb0 movb $0x0, (%rax) movq %fs:0x28, %rax movq -0x30(%rbp), %rcx cmpq %rcx, %rax jne 0xba0c5 addq $0x308, %rsp # imm = 0x308 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x3b340 nopw (%rax,%rax)
my_end: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 308h mov rax, fs:28h mov [rbp+var_30], rax mov [rbp+var_234], edi mov rax, cs:stderr_ptr mov rax, [rax] mov [rbp+var_240], rax mov rax, [rbp+var_240] mov rcx, cs:stderr_ptr cmp rax, [rcx] setnz al and al, 1 movzx eax, al mov [rbp+var_241], al lea rax, my_init_done cmp byte ptr [rax], 0 jnz short loc_B9DA8 jmp loc_BA0A1 loc_B9DA8: jmp short $+2 loc_B9DAA: jmp short $+2 loc_B9DAC: cmp [rbp+var_240], 0 jnz short loc_B9DCE mov rax, cs:stderr_ptr mov rax, [rax] mov [rbp+var_240], rax mov [rbp+var_241], 0 loc_B9DCE: mov eax, [rbp+var_234] and eax, 1 cmp eax, 0 jnz short loc_B9DEC movsx eax, [rbp+var_241] cmp eax, 0 jz loc_B9F0A loc_B9DEC: mov [rbp+var_248], 0 mov [rbp+var_24C], 0 mov [rbp+var_250], 0 loc_B9E0A: mov eax, [rbp+var_248] lea rcx, my_file_limit cmp eax, [rcx] jnb loc_B9EAE lea rax, my_file_info mov rax, [rax] mov ecx, [rbp+var_248] shl rcx, 4 add rax, rcx cmp dword ptr [rax+8], 0 jnz short loc_B9E3E jmp short loc_B9E9A loc_B9E3E: lea rax, my_file_info mov rax, [rax] mov ecx, [rbp+var_248] shl rcx, 4 add rax, rcx cmp dword ptr [rax+8], 3 jz short loc_B9E78 lea rax, my_file_info mov rax, [rax] mov ecx, [rbp+var_248] shl rcx, 4 add rax, rcx cmp dword ptr [rax+8], 4 jnz short loc_B9E89 loc_B9E78: mov eax, [rbp+var_250] add eax, 1 mov [rbp+var_250], eax jmp short loc_B9E98 loc_B9E89: mov eax, [rbp+var_24C] add eax, 1 mov [rbp+var_24C], eax loc_B9E98: jmp short $+2 loc_B9E9A: mov eax, [rbp+var_248] add eax, 1 mov [rbp+var_248], eax jmp loc_B9E0A loc_B9EAE: cmp [rbp+var_24C], 0 jnz short loc_B9EC0 cmp [rbp+var_250], 0 jz short loc_B9F08 loc_B9EC0: lea rdi, [rbp+var_230] lea rax, globerrs mov rdx, [rax+90h] mov ecx, [rbp+var_24C] mov r8d, [rbp+var_250] mov esi, 200h mov al, 0 call my_snprintf lea rsi, [rbp+var_230] mov edi, 13h mov edx, 4 call my_message_stderr jmp short $+2 loc_B9F06: jmp short $+2 loc_B9F08: jmp short $+2 loc_B9F0A: call free_charsets call my_error_unregister_all call my_once_free mov eax, [rbp+var_234] and eax, 2 cmp eax, 0 jnz short loc_B9F37 movsx eax, [rbp+var_241] cmp eax, 0 jz loc_BA05C loc_B9F37: xor edi, edi lea rsi, [rbp+var_2E0] call _getrusage cmp eax, 0 jnz loc_BA05A mov rdi, [rbp+var_240] imul rax, [rbp+var_2E0], 64h ; 'd' mov [rbp+var_2F0], rax mov rax, [rbp+var_2D8] mov ecx, 2710h cqo idiv rcx mov rcx, rax mov rax, [rbp+var_2F0] add rax, rcx cvtsi2sd xmm0, rax movsd xmm1, cs:qword_110BD0 divsd xmm0, xmm1 imul rax, [rbp+var_2D0], 64h ; 'd' mov [rbp+var_2E8], rax mov rax, [rbp+var_2C8] mov ecx, 2710h cqo idiv rcx mov rcx, rax mov rax, [rbp+var_2E8] add rax, rcx cvtsi2sd xmm1, rax movsd xmm2, cs:qword_110BD0 divsd xmm1, xmm2 mov rdx, [rbp+var_2C0] mov rcx, [rbp+var_2B0] mov r8, [rbp+var_2A0] mov r9, [rbp+var_298] mov r13, [rbp+var_290] mov r12, [rbp+var_288] mov r15, [rbp+var_280] mov r14, [rbp+var_278] mov rbx, [rbp+var_270] mov r11, [rbp+var_268] mov r10, [rbp+var_260] mov rax, [rbp+var_258] lea rsi, aUserTime2fSyst; "\nUser time %.2f, System time %.2f\nMax"... mov [rsp+330h+var_330], r13 mov [rsp+330h+var_328], r12 mov [rsp+330h+var_320], r15 mov [rsp+330h+var_318], r14 mov [rsp+330h+var_310], rbx mov [rsp+330h+var_308], r11 mov [rsp+330h+var_300], r10 mov [rsp+330h+var_2F8], rax mov al, 2 call _fprintf loc_BA05A: jmp short $+2 loc_BA05C: call my_thread_end call my_thread_global_end mov eax, [rbp+var_234] and eax, 4 cmp eax, 0 jnz short loc_BA07A jmp short $+2 loc_BA076: jmp short $+2 loc_BA078: jmp short $+2 loc_BA07A: call my_mutex_end lea rax, THR_KEY_mysys mov edi, [rax] call _pthread_key_delete lea rax, my_thr_key_mysys_exists mov byte ptr [rax], 0 lea rax, my_init_done mov byte ptr [rax], 0 loc_BA0A1: mov rax, fs:28h mov rcx, [rbp+var_30] cmp rax, rcx jnz short loc_BA0C5 add rsp, 308h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_BA0C5: call ___stack_chk_fail
unsigned long long my_end(int a1, long long a2, long long a3, long long a4, long long a5, int a6) { _QWORD v7[2]; // [rsp+50h] [rbp-2E0h] BYREF long long v8; // [rsp+60h] [rbp-2D0h] long long v9; // [rsp+68h] [rbp-2C8h] long long v10; // [rsp+70h] [rbp-2C0h] long long v11; // [rsp+80h] [rbp-2B0h] long long v12; // [rsp+90h] [rbp-2A0h] long long v13; // [rsp+98h] [rbp-298h] long long v14; // [rsp+A0h] [rbp-290h] long long v15; // [rsp+A8h] [rbp-288h] long long v16; // [rsp+B0h] [rbp-280h] long long v17; // [rsp+B8h] [rbp-278h] long long v18; // [rsp+C0h] [rbp-270h] long long v19; // [rsp+C8h] [rbp-268h] long long v20; // [rsp+D0h] [rbp-260h] long long v21; // [rsp+D8h] [rbp-258h] int v22; // [rsp+E0h] [rbp-250h] int v23; // [rsp+E4h] [rbp-24Ch] unsigned int v24; // [rsp+E8h] [rbp-248h] char v25; // [rsp+EFh] [rbp-241h] long long v26; // [rsp+F0h] [rbp-240h] int v27; // [rsp+FCh] [rbp-234h] _BYTE v28[512]; // [rsp+100h] [rbp-230h] BYREF unsigned long long v29; // [rsp+300h] [rbp-30h] v29 = __readfsqword(0x28u); v27 = a1; v26 = stderr; v25 = 0; if ( my_init_done ) { if ( !v26 ) { v26 = stderr; v25 = 0; } if ( (v27 & 1) != 0 ) { v24 = 0; v23 = 0; v22 = 0; while ( v24 < my_file_limit[0] ) { if ( *((_DWORD *)my_file_info + 4 * v24 + 2) ) { if ( *((_DWORD *)my_file_info + 4 * v24 + 2) == 3 || *((_DWORD *)my_file_info + 4 * v24 + 2) == 4 ) ++v22; else ++v23; } ++v24; } if ( v23 || v22 ) { my_snprintf((unsigned int)v28, 512, (unsigned int)globerrs[18], v23, v22, a6); my_message_stderr(19LL, v28, 4LL); } } free_charsets(); my_error_unregister_all(); my_once_free(); if ( (v27 & 2) != 0 && !(unsigned int)getrusage(0LL, v7) ) fprintf( v26, "\n" "User time %.2f, System time %.2f\n" "Maximum resident set size %ld, Integral resident set size %ld\n" "Non-physical pagefaults %ld, Physical pagefaults %ld, Swaps %ld\n" "Blocks in %ld out %ld, Messages in %ld out %ld, Signals %ld\n" "Voluntary context switches %ld, Involuntary context switches %ld\n", (double)(int)(v7[1] / 10000LL + 100 * LODWORD(v7[0])) / 100.0, (double)(int)(v9 / 10000 + 100 * v8) / 100.0, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21); my_thread_end(); my_thread_global_end(); my_mutex_end(); pthread_key_delete(THR_KEY_mysys); my_thr_key_mysys_exists = 0; my_init_done = 0; } return __readfsqword(0x28u); }
my_end: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x308 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV dword ptr [RBP + -0x234],EDI MOV RAX,qword ptr [0x00389fe0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x240],RAX MOV RAX,qword ptr [RBP + -0x240] MOV RCX,qword ptr [0x00389fe0] CMP RAX,qword ptr [RCX] SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x241],AL LEA RAX,[0x54fcb0] CMP byte ptr [RAX],0x0 JNZ 0x001b9da8 JMP 0x001ba0a1 LAB_001b9da8: JMP 0x001b9daa LAB_001b9daa: JMP 0x001b9dac LAB_001b9dac: CMP qword ptr [RBP + -0x240],0x0 JNZ 0x001b9dce MOV RAX,qword ptr [0x00389fe0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x240],RAX MOV byte ptr [RBP + -0x241],0x0 LAB_001b9dce: MOV EAX,dword ptr [RBP + -0x234] AND EAX,0x1 CMP EAX,0x0 JNZ 0x001b9dec MOVSX EAX,byte ptr [RBP + -0x241] CMP EAX,0x0 JZ 0x001b9f0a LAB_001b9dec: MOV dword ptr [RBP + -0x248],0x0 MOV dword ptr [RBP + -0x24c],0x0 MOV dword ptr [RBP + -0x250],0x0 LAB_001b9e0a: MOV EAX,dword ptr [RBP + -0x248] LEA RCX,[0x38dfb0] CMP EAX,dword ptr [RCX] JNC 0x001b9eae LEA RAX,[0x38dfb8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x248] SHL RCX,0x4 ADD RAX,RCX CMP dword ptr [RAX + 0x8],0x0 JNZ 0x001b9e3e JMP 0x001b9e9a LAB_001b9e3e: LEA RAX,[0x38dfb8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x248] SHL RCX,0x4 ADD RAX,RCX CMP dword ptr [RAX + 0x8],0x3 JZ 0x001b9e78 LEA RAX,[0x38dfb8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x248] SHL RCX,0x4 ADD RAX,RCX CMP dword ptr [RAX + 0x8],0x4 JNZ 0x001b9e89 LAB_001b9e78: MOV EAX,dword ptr [RBP + -0x250] ADD EAX,0x1 MOV dword ptr [RBP + -0x250],EAX JMP 0x001b9e98 LAB_001b9e89: MOV EAX,dword ptr [RBP + -0x24c] ADD EAX,0x1 MOV dword ptr [RBP + -0x24c],EAX LAB_001b9e98: JMP 0x001b9e9a LAB_001b9e9a: MOV EAX,dword ptr [RBP + -0x248] ADD EAX,0x1 MOV dword ptr [RBP + -0x248],EAX JMP 0x001b9e0a LAB_001b9eae: CMP dword ptr [RBP + -0x24c],0x0 JNZ 0x001b9ec0 CMP dword ptr [RBP + -0x250],0x0 JZ 0x001b9f08 LAB_001b9ec0: LEA RDI,[RBP + -0x230] LEA RAX,[0x38e620] MOV RDX,qword ptr [RAX + 0x90] MOV ECX,dword ptr [RBP + -0x24c] MOV R8D,dword ptr [RBP + -0x250] MOV ESI,0x200 MOV AL,0x0 CALL 0x0020bfb0 LEA RSI,[RBP + -0x230] MOV EDI,0x13 MOV EDX,0x4 CALL 0x001baea0 JMP 0x001b9f06 LAB_001b9f06: JMP 0x001b9f08 LAB_001b9f08: JMP 0x001b9f0a LAB_001b9f0a: CALL 0x001a5040 CALL 0x001b53a0 CALL 0x001bb210 MOV EAX,dword ptr [RBP + -0x234] AND EAX,0x2 CMP EAX,0x0 JNZ 0x001b9f37 MOVSX EAX,byte ptr [RBP + -0x241] CMP EAX,0x0 JZ 0x001ba05c LAB_001b9f37: XOR EDI,EDI LEA RSI,[RBP + -0x2e0] CALL 0x0013bcc0 CMP EAX,0x0 JNZ 0x001ba05a MOV RDI,qword ptr [RBP + -0x240] IMUL RAX,qword ptr [RBP + -0x2e0],0x64 MOV qword ptr [RBP + -0x2f0],RAX MOV RAX,qword ptr [RBP + -0x2d8] MOV ECX,0x2710 CQO IDIV RCX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x2f0] ADD RAX,RCX CVTSI2SD XMM0,RAX MOVSD XMM1,qword ptr [0x00210bd0] DIVSD XMM0,XMM1 IMUL RAX,qword ptr [RBP + -0x2d0],0x64 MOV qword ptr [RBP + -0x2e8],RAX MOV RAX,qword ptr [RBP + -0x2c8] MOV ECX,0x2710 CQO IDIV RCX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x2e8] ADD RAX,RCX CVTSI2SD XMM1,RAX MOVSD XMM2,qword ptr [0x00210bd0] DIVSD XMM1,XMM2 MOV RDX,qword ptr [RBP + -0x2c0] MOV RCX,qword ptr [RBP + -0x2b0] MOV R8,qword ptr [RBP + -0x2a0] MOV R9,qword ptr [RBP + -0x298] MOV R13,qword ptr [RBP + -0x290] MOV R12,qword ptr [RBP + -0x288] MOV R15,qword ptr [RBP + -0x280] MOV R14,qword ptr [RBP + -0x278] MOV RBX,qword ptr [RBP + -0x270] MOV R11,qword ptr [RBP + -0x268] MOV R10,qword ptr [RBP + -0x260] MOV RAX,qword ptr [RBP + -0x258] LEA RSI,[0x218b8e] MOV qword ptr [RSP],R13 MOV qword ptr [RSP + 0x8],R12 MOV qword ptr [RSP + 0x10],R15 MOV qword ptr [RSP + 0x18],R14 MOV qword ptr [RSP + 0x20],RBX MOV qword ptr [RSP + 0x28],R11 MOV qword ptr [RSP + 0x30],R10 MOV qword ptr [RSP + 0x38],RAX MOV AL,0x2 CALL 0x0013b240 LAB_001ba05a: JMP 0x001ba05c LAB_001ba05c: CALL 0x001bcec0 CALL 0x001bcc30 MOV EAX,dword ptr [RBP + -0x234] AND EAX,0x4 CMP EAX,0x0 JNZ 0x001ba07a JMP 0x001ba076 LAB_001ba076: JMP 0x001ba078 LAB_001ba078: JMP 0x001ba07a LAB_001ba07a: CALL 0x001bd8f0 LEA RAX,[0x5509b4] MOV EDI,dword ptr [RAX] CALL 0x0013baa0 LEA RAX,[0x5506ec] MOV byte ptr [RAX],0x0 LEA RAX,[0x54fcb0] MOV byte ptr [RAX],0x0 LAB_001ba0a1: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x30] CMP RAX,RCX JNZ 0x001ba0c5 ADD RSP,0x308 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001ba0c5: CALL 0x0013b340
void my_end(uint param_1) { int iVar1; long in_FS_OFFSET; bool bVar2; bool bVar3; rusage local_2e8; int local_258; int local_254; uint local_250; bool local_249; FILE *local_248; uint local_23c; int1 local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_248 = *(FILE **)PTR_stderr_00389fe0; bVar2 = local_248 != *(FILE **)PTR_stderr_00389fe0; local_249 = bVar2; local_23c = param_1; if (my_init_done != '\0') { bVar3 = local_248 == (FILE *)0x0; if (bVar3) { local_248 = *(FILE **)PTR_stderr_00389fe0; } bVar3 = !bVar3; local_249 = bVar3 && bVar2; if (((param_1 & 1) != 0) || (bVar3 && bVar2)) { local_254 = 0; local_258 = 0; for (local_250 = 0; local_250 < my_file_limit; local_250 = local_250 + 1) { if (*(int *)(my_file_info + (ulong)local_250 * 0x10 + 8) != 0) { if ((*(int *)(my_file_info + (ulong)local_250 * 0x10 + 8) == 3) || (*(int *)(my_file_info + (ulong)local_250 * 0x10 + 8) == 4)) { local_258 = local_258 + 1; } else { local_254 = local_254 + 1; } } } if ((local_254 != 0) || (local_258 != 0)) { my_snprintf(local_238,0x200,globerrs._144_8_,local_254,local_258); my_message_stderr(0x13,local_238,4); } } free_charsets(); my_error_unregister_all(); my_once_free(); if ((((local_23c & 2) != 0) || (local_249 != false)) && (iVar1 = getrusage(RUSAGE_SELF,&local_2e8), iVar1 == 0)) { fprintf(local_248, "\nUser time %.2f, System time %.2f\nMaximum resident set size %ld, Integral resident set size %ld\nNon-physical pagefaults %ld, Physical pagefaults %ld, Swaps %ld\nBlocks in %ld out %ld, Messages in %ld out %ld, Signals %ld\nVoluntary context switches %ld, Involuntary context switches %ld\n" ,(double)(local_2e8.ru_utime.tv_sec * 100 + local_2e8.ru_utime.tv_usec / 10000) / DAT_00210bd0, (double)(local_2e8.ru_stime.tv_sec * 100 + local_2e8.ru_stime.tv_usec / 10000) / DAT_00210bd0,local_2e8.ru_maxrss,local_2e8.ru_idrss,local_2e8.ru_minflt, local_2e8.ru_majflt,local_2e8.ru_nswap,local_2e8.ru_inblock,local_2e8.ru_oublock, local_2e8.ru_msgsnd,local_2e8.ru_msgrcv,local_2e8.ru_nsignals,local_2e8.ru_nvcsw, local_2e8.ru_nivcsw); } my_thread_end(); my_thread_global_end(); my_mutex_end(); pthread_key_delete(THR_KEY_mysys); my_thr_key_mysys_exists = 0; my_init_done = '\0'; } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
10,362
js_array_buffer_get_detached
bluesky950520[P]quickjs/quickjs.c
static JSValue js_array_buffer_get_detached(JSContext *ctx, JSValue this_val) { JSArrayBuffer *abuf = JS_GetOpaque2(ctx, this_val, JS_CLASS_ARRAY_BUFFER); if (!abuf) return JS_EXCEPTION; if (abuf->shared) return JS_ThrowTypeError(ctx, "detached called on SharedArrayBuffer"); return js_bool(abuf->detached); }
O1
c
js_array_buffer_get_detached: pushq %r15 pushq %r14 pushq %rbx movq %rdi, %r15 movl $0x13, %ecx callq 0x275b5 movl $0x6, %ebx testq %rax, %rax je 0x7fc08 cmpb $0x0, 0x9(%rax) je 0x7fc0d leaq 0x22971(%rip), %rsi # 0xa256a xorl %r14d, %r14d movq %r15, %rdi xorl %eax, %eax callq 0x22567 jmp 0x7fc1d xorl %r14d, %r14d jmp 0x7fc1d xorl %r14d, %r14d cmpb $0x0, 0x8(%rax) setne %r14b movl $0x1, %ebx movq %r14, %rax movq %rbx, %rdx popq %rbx popq %r14 popq %r15 retq
js_array_buffer_get_detached: push r15 push r14 push rbx mov r15, rdi mov ecx, 13h call JS_GetOpaque2 mov ebx, 6 test rax, rax jz short loc_7FC08 cmp byte ptr [rax+9], 0 jz short loc_7FC0D lea rsi, aDetachedCalled; "detached called on SharedArrayBuffer" xor r14d, r14d mov rdi, r15 xor eax, eax call JS_ThrowTypeError jmp short loc_7FC1D loc_7FC08: xor r14d, r14d jmp short loc_7FC1D loc_7FC0D: xor r14d, r14d cmp byte ptr [rax+8], 0 setnz r14b mov ebx, 1 loc_7FC1D: mov rax, r14 mov rdx, rbx pop rbx pop r14 pop r15 retn
_BOOL8 js_array_buffer_get_detached( long long a1, long long a2, int a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { long long Opaque2; // rax long long v12; // rdx long long v13; // rcx long long v14; // r8 long long v15; // r9 __m128 v16; // xmm4 __m128 v17; // xmm5 long long v18; // r14 char v20; // [rsp+0h] [rbp-18h] Opaque2 = JS_GetOpaque2(a1, a2, a3, 0x13u); if ( !Opaque2 ) return 0LL; if ( !*(_BYTE *)(Opaque2 + 9) ) return *(_BYTE *)(Opaque2 + 8) != 0; v18 = 0LL; JS_ThrowTypeError( a1, (long long)"detached called on SharedArrayBuffer", v12, v13, v14, v15, a4, a5, a6, a7, v16, v17, a10, a11, v20); return v18; }
js_array_buffer_get_detached: PUSH R15 PUSH R14 PUSH RBX MOV R15,RDI MOV ECX,0x13 CALL 0x001275b5 MOV EBX,0x6 TEST RAX,RAX JZ 0x0017fc08 CMP byte ptr [RAX + 0x9],0x0 JZ 0x0017fc0d LEA RSI,[0x1a256a] XOR R14D,R14D MOV RDI,R15 XOR EAX,EAX CALL 0x00122567 JMP 0x0017fc1d LAB_0017fc08: XOR R14D,R14D JMP 0x0017fc1d LAB_0017fc0d: XOR R14D,R14D CMP byte ptr [RAX + 0x8],0x0 SETNZ R14B MOV EBX,0x1 LAB_0017fc1d: MOV RAX,R14 MOV RDX,RBX POP RBX POP R14 POP R15 RET
bool js_array_buffer_get_detached(int8 param_1) { long lVar1; bool bVar2; lVar1 = JS_GetOpaque2(); if (lVar1 == 0) { bVar2 = false; } else if (*(char *)(lVar1 + 9) == '\0') { bVar2 = *(char *)(lVar1 + 8) != '\0'; } else { bVar2 = false; JS_ThrowTypeError(param_1,"detached called on SharedArrayBuffer"); } return bVar2; }
10,363
js_array_buffer_get_detached
bluesky950520[P]quickjs/quickjs.c
static JSValue js_array_buffer_get_detached(JSContext *ctx, JSValue this_val) { JSArrayBuffer *abuf = JS_GetOpaque2(ctx, this_val, JS_CLASS_ARRAY_BUFFER); if (!abuf) return JS_EXCEPTION; if (abuf->shared) return JS_ThrowTypeError(ctx, "detached called on SharedArrayBuffer"); return js_bool(abuf->detached); }
O2
c
js_array_buffer_get_detached: pushq %r15 pushq %r14 pushq %rbx movq %rdi, %r15 pushq $0x13 popq %rcx callq 0x21207 pushq $0x6 popq %rbx testq %rax, %rax je 0x6b66f cmpb $0x0, 0x9(%rax) je 0x6b674 leaq 0x1de44(%rip), %rsi # 0x894a4 xorl %r14d, %r14d movq %r15, %rdi xorl %eax, %eax callq 0x1c64d jmp 0x6b682 xorl %r14d, %r14d jmp 0x6b682 xorl %r14d, %r14d cmpb $0x0, 0x8(%rax) setne %r14b pushq $0x1 popq %rbx movq %r14, %rax movq %rbx, %rdx popq %rbx popq %r14 popq %r15 retq
js_array_buffer_get_detached: push r15 push r14 push rbx mov r15, rdi push 13h pop rcx call JS_GetOpaque2 push 6 pop rbx test rax, rax jz short loc_6B66F cmp byte ptr [rax+9], 0 jz short loc_6B674 lea rsi, aDetachedCalled; "detached called on SharedArrayBuffer" xor r14d, r14d mov rdi, r15 xor eax, eax call JS_ThrowTypeError jmp short loc_6B682 loc_6B66F: xor r14d, r14d jmp short loc_6B682 loc_6B674: xor r14d, r14d cmp byte ptr [rax+8], 0 setnz r14b push 1 pop rbx loc_6B682: mov rax, r14 mov rdx, rbx pop rbx pop r14 pop r15 retn
_BOOL8 js_array_buffer_get_detached( long long a1, long long a2, int a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { long long Opaque2; // rax long long v12; // rdx long long v13; // rcx long long v14; // r8 long long v15; // r9 __m128 v16; // xmm4 __m128 v17; // xmm5 long long v18; // r14 char v20; // [rsp+0h] [rbp-18h] Opaque2 = JS_GetOpaque2(a1, a2, a3, 0x13u); if ( !Opaque2 ) return 0LL; if ( !*(_BYTE *)(Opaque2 + 9) ) return *(_BYTE *)(Opaque2 + 8) != 0; v18 = 0LL; JS_ThrowTypeError( a1, (long long)"detached called on SharedArrayBuffer", v12, v13, v14, v15, a4, a5, a6, a7, v16, v17, a10, a11, v20); return v18; }
js_array_buffer_get_detached: PUSH R15 PUSH R14 PUSH RBX MOV R15,RDI PUSH 0x13 POP RCX CALL 0x00121207 PUSH 0x6 POP RBX TEST RAX,RAX JZ 0x0016b66f CMP byte ptr [RAX + 0x9],0x0 JZ 0x0016b674 LEA RSI,[0x1894a4] XOR R14D,R14D MOV RDI,R15 XOR EAX,EAX CALL 0x0011c64d JMP 0x0016b682 LAB_0016b66f: XOR R14D,R14D JMP 0x0016b682 LAB_0016b674: XOR R14D,R14D CMP byte ptr [RAX + 0x8],0x0 SETNZ R14B PUSH 0x1 POP RBX LAB_0016b682: MOV RAX,R14 MOV RDX,RBX POP RBX POP R14 POP R15 RET
bool js_array_buffer_get_detached(int8 param_1) { long lVar1; bool bVar2; lVar1 = JS_GetOpaque2(); if (lVar1 == 0) { bVar2 = false; } else if (*(char *)(lVar1 + 9) == '\0') { bVar2 = *(char *)(lVar1 + 8) != '\0'; } else { bVar2 = false; JS_ThrowTypeError(param_1,"detached called on SharedArrayBuffer"); } return bVar2; }
10,364
PFS_memory_stat::full_aggregate_to(PFS_memory_stat*) const
eloqsql/storage/perfschema/pfs_stat.h
inline void full_aggregate_to(PFS_memory_stat *stat) const { if (! m_used) return; stat->m_used= true; stat->m_alloc_count+= m_alloc_count; stat->m_free_count+= m_free_count; stat->m_alloc_size+= m_alloc_size; stat->m_free_size+= m_free_size; stat->m_alloc_count_capacity+= m_alloc_count_capacity; stat->m_free_count_capacity+= m_free_count_capacity; stat->m_alloc_size_capacity+= m_alloc_size_capacity; stat->m_free_size_capacity+= m_free_size_capacity; }
O0
c
PFS_memory_stat::full_aggregate_to(PFS_memory_stat*) const: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) testb $0x1, (%rax) jne 0x3ee2e jmp 0x3eeb9 movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movb $0x1, (%rcx) movq 0x8(%rax), %rdx movq -0x10(%rbp), %rcx addq 0x8(%rcx), %rdx movq %rdx, 0x8(%rcx) movq 0x10(%rax), %rdx movq -0x10(%rbp), %rcx addq 0x10(%rcx), %rdx movq %rdx, 0x10(%rcx) movq 0x18(%rax), %rdx movq -0x10(%rbp), %rcx addq 0x18(%rcx), %rdx movq %rdx, 0x18(%rcx) movq 0x20(%rax), %rdx movq -0x10(%rbp), %rcx addq 0x20(%rcx), %rdx movq %rdx, 0x20(%rcx) movq 0x28(%rax), %rdx movq -0x10(%rbp), %rcx addq 0x28(%rcx), %rdx movq %rdx, 0x28(%rcx) movq 0x30(%rax), %rdx movq -0x10(%rbp), %rcx addq 0x30(%rcx), %rdx movq %rdx, 0x30(%rcx) movq 0x38(%rax), %rdx movq -0x10(%rbp), %rcx addq 0x38(%rcx), %rdx movq %rdx, 0x38(%rcx) movq 0x40(%rax), %rcx movq -0x10(%rbp), %rax addq 0x40(%rax), %rcx movq %rcx, 0x40(%rax) popq %rbp retq nopl (%rax,%rax)
_ZNK15PFS_memory_stat17full_aggregate_toEPS_: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_18], rax test byte ptr [rax], 1 jnz short loc_3EE2E jmp loc_3EEB9 loc_3EE2E: mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov byte ptr [rcx], 1 mov rdx, [rax+8] mov rcx, [rbp+var_10] add rdx, [rcx+8] mov [rcx+8], rdx mov rdx, [rax+10h] mov rcx, [rbp+var_10] add rdx, [rcx+10h] mov [rcx+10h], rdx mov rdx, [rax+18h] mov rcx, [rbp+var_10] add rdx, [rcx+18h] mov [rcx+18h], rdx mov rdx, [rax+20h] mov rcx, [rbp+var_10] add rdx, [rcx+20h] mov [rcx+20h], rdx mov rdx, [rax+28h] mov rcx, [rbp+var_10] add rdx, [rcx+28h] mov [rcx+28h], rdx mov rdx, [rax+30h] mov rcx, [rbp+var_10] add rdx, [rcx+30h] mov [rcx+30h], rdx mov rdx, [rax+38h] mov rcx, [rbp+var_10] add rdx, [rcx+38h] mov [rcx+38h], rdx mov rcx, [rax+40h] mov rax, [rbp+var_10] add rcx, [rax+40h] mov [rax+40h], rcx loc_3EEB9: pop rbp retn
PFS_memory_stat * PFS_memory_stat::full_aggregate_to(PFS_memory_stat *this, PFS_memory_stat *a2) { PFS_memory_stat *result; // rax result = this; if ( (*(_BYTE *)this & 1) != 0 ) { *(_BYTE *)a2 = 1; *((_QWORD *)a2 + 1) += *((_QWORD *)this + 1); *((_QWORD *)a2 + 2) += *((_QWORD *)this + 2); *((_QWORD *)a2 + 3) += *((_QWORD *)this + 3); *((_QWORD *)a2 + 4) += *((_QWORD *)this + 4); *((_QWORD *)a2 + 5) += *((_QWORD *)this + 5); *((_QWORD *)a2 + 6) += *((_QWORD *)this + 6); *((_QWORD *)a2 + 7) += *((_QWORD *)this + 7); result = a2; *((_QWORD *)a2 + 8) += *((_QWORD *)this + 8); } return result; }
full_aggregate_to: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX TEST byte ptr [RAX],0x1 JNZ 0x0013ee2e JMP 0x0013eeb9 LAB_0013ee2e: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV byte ptr [RCX],0x1 MOV RDX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RCX + 0x8] MOV qword ptr [RCX + 0x8],RDX MOV RDX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RCX + 0x10] MOV qword ptr [RCX + 0x10],RDX MOV RDX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RCX + 0x18] MOV qword ptr [RCX + 0x18],RDX MOV RDX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RCX + 0x20] MOV qword ptr [RCX + 0x20],RDX MOV RDX,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RCX + 0x28] MOV qword ptr [RCX + 0x28],RDX MOV RDX,qword ptr [RAX + 0x30] MOV RCX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RCX + 0x30] MOV qword ptr [RCX + 0x30],RDX MOV RDX,qword ptr [RAX + 0x38] MOV RCX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RCX + 0x38] MOV qword ptr [RCX + 0x38],RDX MOV RCX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RAX + 0x40] MOV qword ptr [RAX + 0x40],RCX LAB_0013eeb9: POP RBP RET
/* PFS_memory_stat::full_aggregate_to(PFS_memory_stat*) const */ void __thiscall PFS_memory_stat::full_aggregate_to(PFS_memory_stat *this,PFS_memory_stat *param_1) { if (((byte)*this & 1) != 0) { *param_1 = (PFS_memory_stat)0x1; *(long *)(param_1 + 8) = *(long *)(this + 8) + *(long *)(param_1 + 8); *(long *)(param_1 + 0x10) = *(long *)(this + 0x10) + *(long *)(param_1 + 0x10); *(long *)(param_1 + 0x18) = *(long *)(this + 0x18) + *(long *)(param_1 + 0x18); *(long *)(param_1 + 0x20) = *(long *)(this + 0x20) + *(long *)(param_1 + 0x20); *(long *)(param_1 + 0x28) = *(long *)(this + 0x28) + *(long *)(param_1 + 0x28); *(long *)(param_1 + 0x30) = *(long *)(this + 0x30) + *(long *)(param_1 + 0x30); *(long *)(param_1 + 0x38) = *(long *)(this + 0x38) + *(long *)(param_1 + 0x38); *(long *)(param_1 + 0x40) = *(long *)(this + 0x40) + *(long *)(param_1 + 0x40); } return; }
10,365
thr_print_lock
eloqsql/mysys/thr_lock.c
static void thr_print_lock(const char* name,struct st_lock_list *list) { THR_LOCK_DATA *data,**prev; uint count=0; if (list->data) { printf("%-10s: ",name); prev= &list->data; for (data=list->data; data && count++ < MAX_LOCKS ; data=data->next) { printf("%p (%lu:%d); ", data, (ulong) data->owner->thread_id, (int) data->type); if (data->prev != prev) printf("\nWarning: prev didn't point at previous lock\n"); prev= &data->next; } puts(""); if (prev != list->last) printf("Warning: last didn't point at last lock\n"); } }
O3
c
thr_print_lock: cmpq $0x0, (%rsi) je 0xa3e18 pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %rdx leaq 0x3882a(%rip), %rsi # 0xdc597 movl $0x1, %edi xorl %eax, %eax callq 0x29810 movq (%rbx), %r12 movq %rbx, %r14 testq %r12, %r12 je 0xa3de6 movl $0x3e9, %r13d # imm = 0x3E9 leaq 0x3880e(%rip), %r15 # 0xdc59f movq %rbx, %r14 decl %r13d je 0xa3de6 movq (%r12), %rax movq 0x8(%rax), %rcx movl 0x40(%r12), %r8d movl $0x1, %edi movq %r15, %rsi movq %r12, %rdx xorl %eax, %eax callq 0x29810 cmpq %r14, 0x10(%r12) je 0xa3dd2 movl $0x1, %edi leaq 0x387e2(%rip), %rsi # 0xdc5ad xorl %eax, %eax callq 0x29810 movq %r12, %r14 movq 0x8(%r12), %rax addq $0x8, %r14 movq %rax, %r12 testq %rax, %rax jne 0xa3d94 movl $0xa, %edi callq 0x29900 cmpq 0x8(%rbx), %r14 leaq 0x8(%rsp), %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp je 0xa3e18 leaq 0x387cf(%rip), %rsi # 0xdc5db movl $0x1, %edi xorl %eax, %eax jmp 0x29810 retq nopl (%rax)
thr_print_lock: cmp qword ptr [rsi], 0 jz locret_A3E18 push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi mov rdx, rdi lea rsi, a10s; "%-10s: " mov edi, 1 xor eax, eax call ___printf_chk mov r12, [rbx] mov r14, rbx test r12, r12 jz short loc_A3DE6 mov r13d, 3E9h lea r15, aPLuD; "%p (%lu:%d); " mov r14, rbx loc_A3D94: dec r13d jz short loc_A3DE6 mov rax, [r12] mov rcx, [rax+8] mov r8d, [r12+40h] mov edi, 1 mov rsi, r15 mov rdx, r12 xor eax, eax call ___printf_chk cmp [r12+10h], r14 jz short loc_A3DD2 mov edi, 1 lea rsi, aWarningPrevDid; "\nWarning: prev didn't point at previou"... xor eax, eax call ___printf_chk loc_A3DD2: mov r14, r12 mov rax, [r12+8] add r14, 8 mov r12, rax test rax, rax jnz short loc_A3D94 loc_A3DE6: mov edi, 0Ah call _putchar cmp r14, [rbx+8] lea rsp, [rsp+8] pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jz short locret_A3E18 lea rsi, aWarningLastDid; "Warning: last didn't point at last lock"... mov edi, 1 xor eax, eax jmp ___printf_chk locret_A3E18: retn
long long thr_print_lock(const char *a1, _QWORD *a2) { long long v2; // r12 _QWORD *v3; // r14 int v4; // r13d long long result; // rax if ( *a2 ) { __printf_chk(1LL, "%-10s: ", a1); v2 = *a2; v3 = a2; if ( *a2 ) { v4 = 1001; v3 = a2; do { if ( !--v4 ) break; __printf_chk(1LL, "%p (%lu:%d); ", (const void *)v2, *(_QWORD *)(*(_QWORD *)v2 + 8LL), *(_DWORD *)(v2 + 64)); if ( *(_QWORD **)(v2 + 16) != v3 ) __printf_chk(1LL, "\nWarning: prev didn't point at previous lock\n"); v3 = (_QWORD *)(v2 + 8); v2 = *(_QWORD *)(v2 + 8); } while ( v2 ); } result = putchar(10LL); if ( v3 != (_QWORD *)a2[1] ) return __printf_chk(1LL, "Warning: last didn't point at last lock\n"); } return result; }
thr_print_lock: CMP qword ptr [RSI],0x0 JZ 0x001a3e18 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV RDX,RDI LEA RSI,[0x1dc597] MOV EDI,0x1 XOR EAX,EAX CALL 0x00129810 MOV R12,qword ptr [RBX] MOV R14,RBX TEST R12,R12 JZ 0x001a3de6 MOV R13D,0x3e9 LEA R15,[0x1dc59f] MOV R14,RBX LAB_001a3d94: DEC R13D JZ 0x001a3de6 MOV RAX,qword ptr [R12] MOV RCX,qword ptr [RAX + 0x8] MOV R8D,dword ptr [R12 + 0x40] MOV EDI,0x1 MOV RSI,R15 MOV RDX,R12 XOR EAX,EAX CALL 0x00129810 CMP qword ptr [R12 + 0x10],R14 JZ 0x001a3dd2 MOV EDI,0x1 LEA RSI,[0x1dc5ad] XOR EAX,EAX CALL 0x00129810 LAB_001a3dd2: MOV R14,R12 MOV RAX,qword ptr [R12 + 0x8] ADD R14,0x8 MOV R12,RAX TEST RAX,RAX JNZ 0x001a3d94 LAB_001a3de6: MOV EDI,0xa CALL 0x00129900 CMP R14,qword ptr [RBX + 0x8] LEA RSP,[RSP + 0x8] POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JZ 0x001a3e18 LEA RSI,[0x1dc5db] MOV EDI,0x1 XOR EAX,EAX JMP 0x00129810 LAB_001a3e18: RET
void thr_print_lock(int8 param_1,long *param_2) { long *plVar1; long *plVar2; int iVar3; long *plVar4; if (*param_2 != 0) { __printf_chk(1,"%-10s: ",param_1); plVar4 = param_2; if ((long *)*param_2 != (long *)0x0) { iVar3 = 0x3e9; plVar2 = (long *)*param_2; do { iVar3 = iVar3 + -1; if (iVar3 == 0) break; __printf_chk(1,"%p (%lu:%d); ",plVar2,*(int8 *)(*plVar2 + 8),(int)plVar2[8]); if ((long *)plVar2[2] != plVar4) { __printf_chk(1,"\nWarning: prev didn\'t point at previous lock\n"); } plVar1 = plVar2 + 1; plVar4 = plVar2 + 1; plVar2 = (long *)*plVar1; } while ((long *)*plVar1 != (long *)0x0); } putchar(10); if (plVar4 != (long *)param_2[1]) { __printf_chk(1,"Warning: last didn\'t point at last lock\n"); return; } } return; }
10,366
js_get_length32
bluesky950520[P]quickjs/quickjs.c
static __exception int js_get_length32(JSContext *ctx, uint32_t *pres, JSValue obj) { JSValue len_val; len_val = JS_GetProperty(ctx, obj, JS_ATOM_length); if (JS_IsException(len_val)) { *pres = 0; return -1; } return JS_ToUint32Free(ctx, pres, len_val); }
O3
c
js_get_length32: pushq %r14 pushq %rbx pushq %rax movq %rcx, %r9 movq %rdx, %r8 movq %rsi, %rbx movq %rdi, %r14 movq %rdx, %rsi movq %rcx, %rdx movl $0x32, %ecx pushq $0x0 pushq $0x0 callq 0x27857 addq $0x10, %rsp movq %rdx, %rcx cmpl $0x6, %ecx jne 0x4703c movl $0x0, (%rbx) movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x8, %rsp popq %rbx popq %r14 retq movq %r14, %rdi movq %rbx, %rsi movq %rax, %rdx addq $0x8, %rsp popq %rbx popq %r14 jmp 0x2c050
js_get_length32: push r14 push rbx push rax mov r9, rcx mov r8, rdx mov rbx, rsi mov r14, rdi mov rsi, rdx mov rdx, rcx mov ecx, 32h ; '2' push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov rcx, rdx cmp ecx, 6 jnz short loc_4703C mov dword ptr [rbx], 0 mov eax, 0FFFFFFFFh add rsp, 8 pop rbx pop r14 retn loc_4703C: mov rdi, r14 mov rsi, rbx mov rdx, rax add rsp, 8 pop rbx pop r14 jmp JS_ToInt32Free
long long js_get_length32(long long a1, int *a2, long long a3, long long a4) { unsigned long long PropertyInternal2; // rax long long v5; // rdx PropertyInternal2 = JS_GetPropertyInternal2(a1, a3, a4, 0x32u, a3, a4, 0LL, 0); if ( (_DWORD)v5 != 6 ) return JS_ToInt32Free(a1, a2, PropertyInternal2, v5); *a2 = 0; return 0xFFFFFFFFLL; }
js_get_length32: PUSH R14 PUSH RBX PUSH RAX MOV R9,RCX MOV R8,RDX MOV RBX,RSI MOV R14,RDI MOV RSI,RDX MOV RDX,RCX MOV ECX,0x32 PUSH 0x0 PUSH 0x0 CALL 0x00127857 ADD RSP,0x10 MOV RCX,RDX CMP ECX,0x6 JNZ 0x0014703c MOV dword ptr [RBX],0x0 MOV EAX,0xffffffff ADD RSP,0x8 POP RBX POP R14 RET LAB_0014703c: MOV RDI,R14 MOV RSI,RBX MOV RDX,RAX ADD RSP,0x8 POP RBX POP R14 JMP 0x0012c050
int8 js_get_length32(int8 param_1,int4 *param_2,int8 param_3,int8 param_4) { int8 uVar1; int1 auVar2 [12]; auVar2 = JS_GetPropertyInternal2(param_1,param_3,param_4,0x32,param_3,param_4,0,0); if (auVar2._8_4_ == 6) { *param_2 = 0; return 0xffffffff; } uVar1 = JS_ToInt32Free(param_1,param_2,auVar2._0_8_); return uVar1; }
10,367
hex_decode
bluesky950520[P]quickjs/quickjs.c
static int hex_decode(JSContext *ctx, JSString *p, int k) { int c; if (k >= p->len || string_get(p, k) != '%') return js_throw_URIError(ctx, "expecting %%"); if (k + 2 >= p->len || (c = string_get_hex(p, k + 1, 2)) < 0) return js_throw_URIError(ctx, "expecting hex digit"); return c; }
O1
c
hex_decode: pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x4(%rsi), %rcx movl %ecx, %eax andl $0x7fffffff, %eax # imm = 0x7FFFFFFF leaq 0x27659(%rip), %r14 # 0xa076b cmpl %edx, %eax jle 0x79151 movslq %edx, %rdi testl %ecx, %ecx js 0x79124 movzbl 0x18(%rsi,%rdi), %ecx jmp 0x79129 movzwl 0x18(%rsi,%rdi,2), %ecx cmpl $0x25, %ecx jne 0x79151 leal 0x2(%rdx), %ecx leaq 0x27640(%rip), %r14 # 0xa0778 cmpl %eax, %ecx jge 0x79151 incl %edx movq %rsi, %rdi movl %edx, %esi movl $0x2, %edx callq 0x791fa testl %eax, %eax jns 0x79163 movq %rbx, %rdi movq %r14, %rsi xorl %eax, %eax callq 0x7916b movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x8, %rsp popq %rbx popq %r14 retq
hex_decode: push r14 push rbx push rax mov rbx, rdi mov rcx, [rsi+4] mov eax, ecx and eax, 7FFFFFFFh lea r14, aExpecting; "expecting %%" cmp eax, edx jle short loc_79151 movsxd rdi, edx test ecx, ecx js short loc_79124 movzx ecx, byte ptr [rsi+rdi+18h] jmp short loc_79129 loc_79124: movzx ecx, word ptr [rsi+rdi*2+18h] loc_79129: cmp ecx, 25h ; '%' jnz short loc_79151 lea ecx, [rdx+2] lea r14, aExpectingHexDi; "expecting hex digit" cmp ecx, eax jge short loc_79151 inc edx mov rdi, rsi mov esi, edx mov edx, 2 call string_get_hex test eax, eax jns short loc_79163 loc_79151: mov rdi, rbx mov rsi, r14 xor eax, eax call js_throw_URIError mov eax, 0FFFFFFFFh loc_79163: add rsp, 8 pop rbx pop r14 retn
long long hex_decode(int a1, long long a2, signed int a3, long long a4, int a5, int a6) { long long v6; // rcx int v7; // eax const char *v8; // r14 long long result; // rax v6 = *(_QWORD *)(a2 + 4); v7 = v6 & 0x7FFFFFFF; v8 = "expecting %%"; if ( (v6 & 0x7FFFFFFF) <= a3 || ((int)v6 < 0 ? (LODWORD(v6) = *(unsigned __int16 *)(a2 + 2LL * a3 + 24)) : (LODWORD(v6) = *(unsigned __int8 *)(a2 + a3 + 24)), (_DWORD)v6 != 37 || (LODWORD(v6) = a3 + 2, v8 = "expecting hex digit", a3 + 2 >= v7) || (result = string_get_hex(a2, (unsigned int)(a3 + 1), 2LL), (int)result < 0)) ) { js_throw_URIError(a1, (_DWORD)v8, a3, v6, a5, a6); return 0xFFFFFFFFLL; } return result; }
hex_decode: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV RCX,qword ptr [RSI + 0x4] MOV EAX,ECX AND EAX,0x7fffffff LEA R14,[0x1a076b] CMP EAX,EDX JLE 0x00179151 MOVSXD RDI,EDX TEST ECX,ECX JS 0x00179124 MOVZX ECX,byte ptr [RSI + RDI*0x1 + 0x18] JMP 0x00179129 LAB_00179124: MOVZX ECX,word ptr [RSI + RDI*0x2 + 0x18] LAB_00179129: CMP ECX,0x25 JNZ 0x00179151 LEA ECX,[RDX + 0x2] LEA R14,[0x1a0778] CMP ECX,EAX JGE 0x00179151 INC EDX MOV RDI,RSI MOV ESI,EDX MOV EDX,0x2 CALL 0x001791fa TEST EAX,EAX JNS 0x00179163 LAB_00179151: MOV RDI,RBX MOV RSI,R14 XOR EAX,EAX CALL 0x0017916b MOV EAX,0xffffffff LAB_00179163: ADD RSP,0x8 POP RBX POP R14 RET
int8 hex_decode(int8 param_1,long param_2,int param_3) { uint uVar1; int8 uVar2; ushort uVar3; uint uVar4; char *pcVar5; uVar4 = (uint)*(int8 *)(param_2 + 4); uVar1 = uVar4 & 0x7fffffff; pcVar5 = "expecting %%"; if (param_3 < (int)uVar1) { if ((int)uVar4 < 0) { uVar3 = *(ushort *)(param_2 + 0x18 + (long)param_3 * 2); } else { uVar3 = (ushort)*(byte *)(param_2 + 0x18 + (long)param_3); } if (((uVar3 == 0x25) && (pcVar5 = "expecting hex digit", param_3 + 2 < (int)uVar1)) && (uVar2 = string_get_hex(param_2,param_3 + 1,2), -1 < (int)uVar2)) { return uVar2; } } js_throw_URIError(param_1,pcVar5); return 0xffffffff; }
10,368
init_state_maps
eloqsql/mysys/charset.c
static my_bool init_state_maps(struct charset_info_st *cs) { uint i; uchar *state_map; uchar *ident_map; if (!(cs->state_map= state_map= (uchar*) my_once_alloc(256*2, MYF(MY_WME)))) return 1; cs->ident_map= ident_map= state_map + 256; /* Fill state_map with states to get a faster parser */ for (i=0; i < 256 ; i++) { if (my_isalpha(cs,i)) state_map[i]=(uchar) MY_LEX_IDENT; else if (my_isdigit(cs,i)) state_map[i]=(uchar) MY_LEX_NUMBER_IDENT; else if (is_multi_byte_ident(cs, i)) state_map[i]=(uchar) MY_LEX_IDENT; else if (my_isspace(cs,i)) state_map[i]=(uchar) MY_LEX_SKIP; else state_map[i]=(uchar) MY_LEX_CHAR; } state_map[(uchar)'_']=state_map[(uchar)'$']=(uchar) MY_LEX_IDENT; state_map[(uchar)'\'']=(uchar) MY_LEX_STRING; state_map[(uchar)'.']=(uchar) MY_LEX_REAL_OR_POINT; state_map[(uchar)'>']=state_map[(uchar)'=']=state_map[(uchar)'!']= (uchar) MY_LEX_CMP_OP; state_map[(uchar)'<']= (uchar) MY_LEX_LONG_CMP_OP; state_map[(uchar)'&']=state_map[(uchar)'|']=(uchar) MY_LEX_BOOL; state_map[(uchar)'#']=(uchar) MY_LEX_COMMENT; state_map[(uchar)';']=(uchar) MY_LEX_SEMICOLON; state_map[(uchar)':']=(uchar) MY_LEX_SET_VAR; state_map[0]=(uchar) MY_LEX_EOL; state_map[(uchar)'\\']= (uchar) MY_LEX_ESCAPE; state_map[(uchar)'/']= (uchar) MY_LEX_LONG_COMMENT; state_map[(uchar)'*']= (uchar) MY_LEX_END_LONG_COMMENT; state_map[(uchar)'@']= (uchar) MY_LEX_USER_END; state_map[(uchar) '`']= (uchar) MY_LEX_USER_VARIABLE_DELIMITER; state_map[(uchar)'"']= (uchar) MY_LEX_STRING_OR_DELIMITER; state_map[(uchar)'-']= (uchar) MY_LEX_MINUS_OR_COMMENT; state_map[(uchar)',']= (uchar) MY_LEX_COMMA; state_map[(uchar)'?']= (uchar) MY_LEX_PLACEHOLDER; /* Create a second map to make it faster to find identifiers */ for (i=0; i < 256 ; i++) { ident_map[i]= (uchar) (state_map[i] == MY_LEX_IDENT || state_map[i] == MY_LEX_NUMBER_IDENT); } /* Special handling of hex and binary strings */ state_map[(uchar)'x']= state_map[(uchar)'X']= (uchar) MY_LEX_IDENT_OR_HEX; state_map[(uchar)'b']= state_map[(uchar)'B']= (uchar) MY_LEX_IDENT_OR_BIN; state_map[(uchar)'n']= state_map[(uchar)'N']= (uchar) MY_LEX_IDENT_OR_NCHAR; return 0; }
O3
c
init_state_maps: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r14 movl $0x200, %edi # imm = 0x200 movl $0x10, %esi callq 0xa0334 movq %rax, 0x80(%r14) testq %rax, %rax je 0x937ae movq %rax, %rbx movq %rax, %r13 addq $0x100, %r13 # imm = 0x100 movq %r13, 0x88(%r14) xorl %r15d, %r15d leaq -0x29(%rbp), %r12 movq 0x40(%r14), %rax movzbl 0x1(%rax,%r15), %eax testb $0x3, %al je 0x936ba movb $0x2, (%rbx,%r15) jmp 0x936f9 testb $0x4, %al jne 0x936f4 movb %r15b, -0x29(%rbp) movq 0xb8(%r14), %rax movq %r14, %rdi movq %r12, %rsi leaq -0x28(%rbp), %rdx callq *0xc0(%rax) addl $0x64, %eax cmpl $-0x6, %eax jae 0x936b3 movq 0x40(%r14), %rax testb $0x8, 0x1(%rax,%r15) jne 0x93707 movb $0x1, (%rbx,%r15) jmp 0x936f9 movb $0xe, (%rbx,%r15) incq %r15 cmpq $0x100, %r15 # imm = 0x100 jne 0x936a5 jmp 0x9370e movb $0x1a, (%rbx,%r15) jmp 0x936f9 movw $0x1b02, 0x5f(%rbx) # imm = 0x1B02 movb $0x8, 0x3e(%rbx) movb $0x11, 0x7c(%rbx) movw $0xa11, 0x26(%rbx) # imm = 0xA11 movl $0x8091617, 0x3a(%rbx) # imm = 0x8091617 movb $0x12, (%rbx) movb $0x13, 0x5c(%rbx) movb $0x15, 0x2a(%rbx) movl $0x20b2108, 0x21(%rbx) # imm = 0x20B2108 movl $0x14102224, 0x2c(%rbx) # imm = 0x14102224 movw $0x1823, 0x3f(%rbx) # imm = 0x1823 movq $-0x100, %rax movdqa 0x459c9(%rip), %xmm0 # 0xd9120 movdqa 0x459d1(%rip), %xmm1 # 0xd9130 movdqa 0x459d9(%rip), %xmm2 # 0xd9140 movdqu (%r13,%rax), %xmm3 movdqa %xmm3, %xmm4 pcmpeqb %xmm0, %xmm4 pcmpeqb %xmm1, %xmm3 por %xmm4, %xmm3 pand %xmm2, %xmm3 movdqu %xmm3, 0x100(%r13,%rax) addq $0x10, %rax jne 0x93767 movb $0x1e, %al movb %al, 0x58(%rbx) movb %al, 0x78(%rbx) movb $0x1f, %al movb %al, 0x42(%rbx) movb %al, 0x62(%rbx) movb $0x20, %al movb %al, 0x4e(%rbx) movb %al, 0x6e(%rbx) xorl %eax, %eax jmp 0x937b0 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
init_state_maps: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdi mov edi, 200h mov esi, 10h call my_once_alloc mov [r14+80h], rax test rax, rax jz loc_937AE mov rbx, rax mov r13, rax add r13, 100h mov [r14+88h], r13 xor r15d, r15d lea r12, [rbp+var_29] loc_936A5: mov rax, [r14+40h] movzx eax, byte ptr [rax+r15+1] test al, 3 jz short loc_936BA loc_936B3: mov byte ptr [rbx+r15], 2 jmp short loc_936F9 loc_936BA: test al, 4 jnz short loc_936F4 mov [rbp+var_29], r15b mov rax, [r14+0B8h] mov rdi, r14 mov rsi, r12 lea rdx, [rbp+var_28] call qword ptr [rax+0C0h] add eax, 64h ; 'd' cmp eax, 0FFFFFFFAh jnb short loc_936B3 mov rax, [r14+40h] test byte ptr [rax+r15+1], 8 jnz short loc_93707 mov byte ptr [rbx+r15], 1 jmp short loc_936F9 loc_936F4: mov byte ptr [rbx+r15], 0Eh loc_936F9: inc r15 cmp r15, 100h jnz short loc_936A5 jmp short loc_9370E loc_93707: mov byte ptr [rbx+r15], 1Ah jmp short loc_936F9 loc_9370E: mov word ptr [rbx+5Fh], 1B02h mov byte ptr [rbx+3Eh], 8 mov byte ptr [rbx+7Ch], 11h mov word ptr [rbx+26h], 0A11h mov dword ptr [rbx+3Ah], 8091617h mov byte ptr [rbx], 12h mov byte ptr [rbx+5Ch], 13h mov byte ptr [rbx+2Ah], 15h mov dword ptr [rbx+21h], 20B2108h mov dword ptr [rbx+2Ch], 14102224h mov word ptr [rbx+3Fh], 1823h mov rax, 0FFFFFFFFFFFFFF00h movdqa xmm0, cs:xmmword_D9120 movdqa xmm1, cs:xmmword_D9130 movdqa xmm2, cs:xmmword_D9140 loc_93767: movdqu xmm3, xmmword ptr [r13+rax+0] movdqa xmm4, xmm3 pcmpeqb xmm4, xmm0 pcmpeqb xmm3, xmm1 por xmm3, xmm4 pand xmm3, xmm2 movdqu xmmword ptr [r13+rax+100h], xmm3 add rax, 10h jnz short loc_93767 mov al, 1Eh mov [rbx+58h], al mov [rbx+78h], al mov al, 1Fh mov [rbx+42h], al mov [rbx+62h], al mov al, 20h ; ' ' mov [rbx+4Eh], al mov [rbx+6Eh], al xor eax, eax jmp short loc_937B0 loc_937AE: mov al, 1 loc_937B0: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long init_state_maps(_QWORD *a1) { long long v1; // rax long long v2; // rax long long v3; // rbx long long v4; // r13 long long i; // r15 char v6; // al long long v7; // rax __m128i si128; // xmm0 __m128i v9; // xmm1 __m128i v10; // xmm2 __m128i v11; // xmm3 char v13; // [rsp+1h] [rbp-29h] BYREF _BYTE v14[40]; // [rsp+2h] [rbp-28h] BYREF v13 = HIBYTE(v1); v2 = my_once_alloc(512LL, 16LL); a1[16] = v2; if ( !v2 ) return 1LL; v3 = v2; v4 = v2 + 256; a1[17] = v2 + 256; for ( i = 0LL; i != 256; ++i ) { v6 = *(_BYTE *)(a1[8] + i + 1); if ( (v6 & 3) != 0 ) { LABEL_4: *(_BYTE *)(v3 + i) = 2; continue; } if ( (v6 & 4) != 0 ) { *(_BYTE *)(v3 + i) = 14; } else { v13 = i; if ( (*(unsigned int ( **)(_QWORD *, char *, _BYTE *))(a1[23] + 192LL))(a1, &v13, v14) + 100 >= 0xFFFFFFFA ) goto LABEL_4; if ( (*(_BYTE *)(a1[8] + i + 1) & 8) != 0 ) *(_BYTE *)(v3 + i) = 26; else *(_BYTE *)(v3 + i) = 1; } } *(_WORD *)(v3 + 95) = 6914; *(_BYTE *)(v3 + 62) = 8; *(_BYTE *)(v3 + 124) = 17; *(_WORD *)(v3 + 38) = 2577; *(_DWORD *)(v3 + 58) = 134813207; *(_BYTE *)v3 = 18; *(_BYTE *)(v3 + 92) = 19; *(_BYTE *)(v3 + 42) = 21; *(_DWORD *)(v3 + 33) = 34283784; *(_DWORD *)(v3 + 44) = 336601636; *(_WORD *)(v3 + 63) = 6179; v7 = -256LL; si128 = _mm_load_si128((const __m128i *)&xmmword_D9120); v9 = _mm_load_si128((const __m128i *)&xmmword_D9130); v10 = _mm_load_si128((const __m128i *)&xmmword_D9140); do { v11 = _mm_loadu_si128((const __m128i *)(v4 + v7)); *(__m128i *)(v4 + v7 + 256) = _mm_and_si128(_mm_or_si128(_mm_cmpeq_epi8(v11, v9), _mm_cmpeq_epi8(v11, si128)), v10); v7 += 16LL; } while ( v7 ); *(_BYTE *)(v3 + 88) = 30; *(_BYTE *)(v3 + 120) = 30; *(_BYTE *)(v3 + 66) = 31; *(_BYTE *)(v3 + 98) = 31; *(_BYTE *)(v3 + 78) = 32; *(_BYTE *)(v3 + 110) = 32; return 0LL; }
init_state_maps: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDI MOV EDI,0x200 MOV ESI,0x10 CALL 0x001a0334 MOV qword ptr [R14 + 0x80],RAX TEST RAX,RAX JZ 0x001937ae MOV RBX,RAX MOV R13,RAX ADD R13,0x100 MOV qword ptr [R14 + 0x88],R13 XOR R15D,R15D LEA R12,[RBP + -0x29] LAB_001936a5: MOV RAX,qword ptr [R14 + 0x40] MOVZX EAX,byte ptr [RAX + R15*0x1 + 0x1] TEST AL,0x3 JZ 0x001936ba LAB_001936b3: MOV byte ptr [RBX + R15*0x1],0x2 JMP 0x001936f9 LAB_001936ba: TEST AL,0x4 JNZ 0x001936f4 MOV byte ptr [RBP + -0x29],R15B MOV RAX,qword ptr [R14 + 0xb8] MOV RDI,R14 MOV RSI,R12 LEA RDX,[RBP + -0x28] CALL qword ptr [RAX + 0xc0] ADD EAX,0x64 CMP EAX,-0x6 JNC 0x001936b3 MOV RAX,qword ptr [R14 + 0x40] TEST byte ptr [RAX + R15*0x1 + 0x1],0x8 JNZ 0x00193707 MOV byte ptr [RBX + R15*0x1],0x1 JMP 0x001936f9 LAB_001936f4: MOV byte ptr [RBX + R15*0x1],0xe LAB_001936f9: INC R15 CMP R15,0x100 JNZ 0x001936a5 JMP 0x0019370e LAB_00193707: MOV byte ptr [RBX + R15*0x1],0x1a JMP 0x001936f9 LAB_0019370e: MOV word ptr [RBX + 0x5f],0x1b02 MOV byte ptr [RBX + 0x3e],0x8 MOV byte ptr [RBX + 0x7c],0x11 MOV word ptr [RBX + 0x26],0xa11 MOV dword ptr [RBX + 0x3a],0x8091617 MOV byte ptr [RBX],0x12 MOV byte ptr [RBX + 0x5c],0x13 MOV byte ptr [RBX + 0x2a],0x15 MOV dword ptr [RBX + 0x21],0x20b2108 MOV dword ptr [RBX + 0x2c],0x14102224 MOV word ptr [RBX + 0x3f],0x1823 MOV RAX,-0x100 MOVDQA XMM0,xmmword ptr [0x001d9120] MOVDQA XMM1,xmmword ptr [0x001d9130] MOVDQA XMM2,xmmword ptr [0x001d9140] LAB_00193767: MOVDQU XMM3,xmmword ptr [R13 + RAX*0x1] MOVDQA XMM4,XMM3 PCMPEQB XMM4,XMM0 PCMPEQB XMM3,XMM1 POR XMM3,XMM4 PAND XMM3,XMM2 MOVDQU xmmword ptr [R13 + RAX*0x1 + 0x100],XMM3 ADD RAX,0x10 JNZ 0x00193767 MOV AL,0x1e MOV byte ptr [RBX + 0x58],AL MOV byte ptr [RBX + 0x78],AL MOV AL,0x1f MOV byte ptr [RBX + 0x42],AL MOV byte ptr [RBX + 0x62],AL MOV AL,0x20 MOV byte ptr [RBX + 0x4e],AL MOV byte ptr [RBX + 0x6e],AL XOR EAX,EAX JMP 0x001937b0 LAB_001937ae: MOV AL,0x1 LAB_001937b0: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 init_state_maps(long param_1) { char *pcVar1; byte *pbVar2; byte bVar3; char cVar4; char cVar5; char cVar6; char cVar7; char cVar8; char cVar9; char cVar10; char cVar11; char cVar12; char cVar13; char cVar14; char cVar15; char cVar16; char cVar17; char cVar18; char cVar19; char cVar20; char cVar21; char cVar22; char cVar23; char cVar24; char cVar25; char cVar26; char cVar27; char cVar28; char cVar29; char cVar30; char cVar31; char cVar32; char cVar33; char cVar34; char cVar35; char cVar36; char cVar37; char cVar38; char cVar39; char cVar40; char cVar41; char cVar42; char cVar43; char cVar44; char cVar45; char cVar46; char cVar47; char cVar48; char cVar49; char cVar50; byte bVar51; byte bVar52; byte bVar53; byte bVar54; byte bVar55; byte bVar56; byte bVar57; byte bVar58; byte bVar59; byte bVar60; byte bVar61; byte bVar62; byte bVar63; byte bVar64; byte bVar65; int iVar66; int8 in_RAX; int1 *puVar67; int8 uVar68; long lVar69; int8 uStack_38; uStack_38 = in_RAX; puVar67 = (int1 *)my_once_alloc(0x200,0x10); *(int1 **)(param_1 + 0x80) = puVar67; if (puVar67 == (int1 *)0x0) { uVar68 = 1; } else { *(int1 **)(param_1 + 0x88) = puVar67 + 0x100; lVar69 = 0; do { bVar3 = *(byte *)(*(long *)(param_1 + 0x40) + 1 + lVar69); if ((bVar3 & 3) == 0) { if ((bVar3 & 4) == 0) { uStack_38 = CONCAT17((char)lVar69,(int7)uStack_38); iVar66 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0)) (param_1,(long)&uStack_38 + 7,&stack0xffffffffffffffd0); if (0xfffffff9 < iVar66 + 100U) goto LAB_001936b3; if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + lVar69) & 8) == 0) { puVar67[lVar69] = 1; } else { puVar67[lVar69] = 0x1a; } } else { puVar67[lVar69] = 0xe; } } else { LAB_001936b3: puVar67[lVar69] = 2; } lVar69 = lVar69 + 1; } while (lVar69 != 0x100); *(int2 *)(puVar67 + 0x5f) = 0x1b02; puVar67[0x3e] = 8; puVar67[0x7c] = 0x11; *(int2 *)(puVar67 + 0x26) = 0xa11; *(int4 *)(puVar67 + 0x3a) = 0x8091617; *puVar67 = 0x12; puVar67[0x5c] = 0x13; puVar67[0x2a] = 0x15; *(int4 *)(puVar67 + 0x21) = 0x20b2108; *(int4 *)(puVar67 + 0x2c) = 0x14102224; *(int2 *)(puVar67 + 0x3f) = 0x1823; bVar65 = UNK_001d914f; bVar64 = UNK_001d914e; bVar63 = UNK_001d914d; bVar62 = UNK_001d914c; bVar61 = UNK_001d914b; bVar60 = UNK_001d914a; bVar59 = UNK_001d9149; bVar58 = UNK_001d9148; bVar57 = UNK_001d9147; bVar56 = UNK_001d9146; bVar55 = UNK_001d9145; bVar54 = UNK_001d9144; bVar53 = UNK_001d9143; bVar52 = UNK_001d9142; bVar51 = UNK_001d9141; bVar3 = DAT_001d9140; cVar50 = UNK_001d913f; cVar49 = UNK_001d913e; cVar48 = UNK_001d913d; cVar47 = UNK_001d913c; cVar46 = UNK_001d913b; cVar45 = UNK_001d913a; cVar44 = UNK_001d9139; cVar43 = UNK_001d9138; cVar42 = UNK_001d9137; cVar41 = UNK_001d9136; cVar40 = UNK_001d9135; cVar39 = UNK_001d9134; cVar38 = UNK_001d9133; cVar37 = UNK_001d9132; cVar36 = UNK_001d9131; cVar35 = DAT_001d9130; cVar34 = UNK_001d912f; cVar33 = UNK_001d912e; cVar32 = UNK_001d912d; cVar31 = UNK_001d912c; cVar30 = UNK_001d912b; cVar29 = UNK_001d912a; cVar28 = UNK_001d9129; cVar27 = UNK_001d9128; cVar26 = UNK_001d9127; cVar25 = UNK_001d9126; cVar24 = UNK_001d9125; cVar23 = UNK_001d9124; cVar22 = UNK_001d9123; cVar21 = UNK_001d9122; cVar20 = UNK_001d9121; cVar19 = DAT_001d9120; lVar69 = -0x100; do { pcVar1 = puVar67 + 0x100 + lVar69; cVar4 = pcVar1[1]; cVar5 = pcVar1[2]; cVar6 = pcVar1[3]; cVar7 = pcVar1[4]; cVar8 = pcVar1[5]; cVar9 = pcVar1[6]; cVar10 = pcVar1[7]; cVar11 = pcVar1[8]; cVar12 = pcVar1[9]; cVar13 = pcVar1[10]; cVar14 = pcVar1[0xb]; cVar15 = pcVar1[0xc]; cVar16 = pcVar1[0xd]; cVar17 = pcVar1[0xe]; cVar18 = pcVar1[0xf]; pbVar2 = puVar67 + lVar69 + 0x200; *pbVar2 = (-(*pcVar1 == cVar35) | -(*pcVar1 == cVar19)) & bVar3; pbVar2[1] = (-(cVar4 == cVar36) | -(cVar4 == cVar20)) & bVar51; pbVar2[2] = (-(cVar5 == cVar37) | -(cVar5 == cVar21)) & bVar52; pbVar2[3] = (-(cVar6 == cVar38) | -(cVar6 == cVar22)) & bVar53; pbVar2[4] = (-(cVar7 == cVar39) | -(cVar7 == cVar23)) & bVar54; pbVar2[5] = (-(cVar8 == cVar40) | -(cVar8 == cVar24)) & bVar55; pbVar2[6] = (-(cVar9 == cVar41) | -(cVar9 == cVar25)) & bVar56; pbVar2[7] = (-(cVar10 == cVar42) | -(cVar10 == cVar26)) & bVar57; pbVar2[8] = (-(cVar11 == cVar43) | -(cVar11 == cVar27)) & bVar58; pbVar2[9] = (-(cVar12 == cVar44) | -(cVar12 == cVar28)) & bVar59; pbVar2[10] = (-(cVar13 == cVar45) | -(cVar13 == cVar29)) & bVar60; pbVar2[0xb] = (-(cVar14 == cVar46) | -(cVar14 == cVar30)) & bVar61; pbVar2[0xc] = (-(cVar15 == cVar47) | -(cVar15 == cVar31)) & bVar62; pbVar2[0xd] = (-(cVar16 == cVar48) | -(cVar16 == cVar32)) & bVar63; pbVar2[0xe] = (-(cVar17 == cVar49) | -(cVar17 == cVar33)) & bVar64; pbVar2[0xf] = (-(cVar18 == cVar50) | -(cVar18 == cVar34)) & bVar65; lVar69 = lVar69 + 0x10; } while (lVar69 != 0); puVar67[0x58] = 0x1e; puVar67[0x78] = 0x1e; puVar67[0x42] = 0x1f; puVar67[0x62] = 0x1f; puVar67[0x4e] = 0x20; puVar67[0x6e] = 0x20; uVar68 = 0; } return uVar68; }
10,369
decode_bytes
eloqsql/storage/myisam/mi_packrec.c
static void decode_bytes(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uchar *end) { reg1 uint bits,low_byte; reg3 uint16 *pos; reg4 uint table_bits,table_and; MI_DECODE_TREE *decode_tree; decode_tree=rec->huff_tree; bits=bit_buff->bits; /* Save in reg for quicker access */ table_bits=decode_tree->quick_table_bits; table_and= (1 << table_bits)-1; do { if (bits < table_bits) { if (bit_buff->pos > bit_buff->end+1) { bit_buff->error=1; return; /* Can't be right */ } #if BITS_SAVED == 32 bit_buff->current_byte= (bit_buff->current_byte << 24) | (((uint) ((uchar) bit_buff->pos[2]))) | (((uint) ((uchar) bit_buff->pos[1])) << 8) | (((uint) ((uchar) bit_buff->pos[0])) << 16); bit_buff->pos+=3; bits+=24; #else if (bits) /* We must have at leasts 9 bits */ { bit_buff->current_byte= (bit_buff->current_byte << 8) | (uint) ((uchar) bit_buff->pos[0]); bit_buff->pos++; bits+=8; } else { bit_buff->current_byte= ((uint) ((uchar) bit_buff->pos[0]) << 8) | ((uint) ((uchar) bit_buff->pos[1])); bit_buff->pos+=2; bits+=16; } #endif } /* First use info in quick_table */ low_byte=(bit_buff->current_byte >> (bits - table_bits)) & table_and; low_byte=decode_tree->table[low_byte]; if (low_byte & IS_CHAR) { *to++ = (low_byte & 255); /* Found char in quick table */ bits-= ((low_byte >> 8) & 31); /* Remove bits used */ } else { /* Map through rest of decode-table */ pos=decode_tree->table+low_byte; bits-=table_bits; for (;;) { if (bits < 8) { /* We don't need to check end */ #if BITS_SAVED == 32 bit_buff->current_byte= (bit_buff->current_byte << 24) | (((uint) ((uchar) bit_buff->pos[2]))) | (((uint) ((uchar) bit_buff->pos[1])) << 8) | (((uint) ((uchar) bit_buff->pos[0])) << 16); bit_buff->pos+=3; bits+=24; #else bit_buff->current_byte= (bit_buff->current_byte << 8) | (uint) ((uchar) bit_buff->pos[0]); bit_buff->pos+=1; bits+=8; #endif } low_byte=(uint) (bit_buff->current_byte >> (bits-8)); decode_bytes_test_bit(0); decode_bytes_test_bit(1); decode_bytes_test_bit(2); decode_bytes_test_bit(3); decode_bytes_test_bit(4); decode_bytes_test_bit(5); decode_bytes_test_bit(6); decode_bytes_test_bit(7); bits-=8; } *to++ = (uchar) *pos; } } while (to != end); bit_buff->bits=bits; return; }
O3
c
decode_bytes: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rcx, %rax movq 0x28(%rdi), %r8 movl 0x4(%rsi), %ebx movl 0x8(%r8), %edi movl $0xffffffff, %r9d # imm = 0xFFFFFFFF movl %edi, %ecx shll %cl, %r9d notl %r9d cmpl %edi, %ebx jae 0x82cff movq 0x8(%rsi), %rcx movq 0x10(%rsi), %r10 incq %r10 cmpq %r10, %rcx ja 0x82e9e movl (%rsi), %r10d shll $0x18, %r10d movzbl 0x2(%rcx), %r11d orl %r10d, %r11d movzbl 0x1(%rcx), %r14d shll $0x8, %r14d orl %r11d, %r14d movzbl (%rcx), %r10d shll $0x10, %r10d orl %r14d, %r10d movl %r10d, (%rsi) addq $0x3, %rcx movq %rcx, 0x8(%rsi) addl $0x18, %ebx jmp 0x82d02 movl (%rsi), %r10d movl %ebx, %ecx subl %edi, %ecx movl %r10d, %r11d shrl %cl, %r11d andl %r9d, %r11d movq (%r8), %r14 movzwl (%r14,%r11,2), %r11d testw %r11w, %r11w js 0x82e55 cmpl $0x7, %ecx ja 0x82d5b shll $0x18, %r10d movq 0x8(%rsi), %rbx movzbl 0x2(%rbx), %r15d orl %r10d, %r15d movzbl 0x1(%rbx), %r12d shll $0x8, %r12d orl %r15d, %r12d movzbl (%rbx), %r10d shll $0x10, %r10d orl %r12d, %r10d movl %r10d, (%rsi) addq $0x3, %rbx movq %rbx, 0x8(%rsi) orl $0x18, %ecx movl %ecx, %ebx movzwl %r11w, %ecx leaq (%r14,%rcx,2), %r15 leal -0x8(%rbx), %ecx movl %r10d, %r14d shrl %cl, %r14d movl %r14d, %r12d shrl $0x6, %r12d andl $0x2, %r12d movswq (%r15,%r12), %r11 testq %r11, %r11 js 0x82e66 addq %r12, %r15 leaq (%r15,%r11,2), %r15 movl %r14d, %r12d shrl $0x5, %r12d andl $0x2, %r12d movswq (%r12,%r15), %r11 testq %r11, %r11 js 0x82e6a addq %r12, %r15 leaq (%r15,%r11,2), %r15 movl %r14d, %r12d shrl $0x4, %r12d andl $0x2, %r12d movswq (%r12,%r15), %r11 testq %r11, %r11 js 0x82e6f addq %r12, %r15 leaq (%r15,%r11,2), %r15 movl %r14d, %r12d shrl $0x3, %r12d andl $0x2, %r12d movswq (%r12,%r15), %r11 testq %r11, %r11 js 0x82e74 addq %r12, %r15 leaq (%r15,%r11,2), %r15 movl %r14d, %r12d shrl $0x2, %r12d andl $0x2, %r12d movswq (%r12,%r15), %r11 testq %r11, %r11 js 0x82e79 addq %r12, %r15 leaq (%r15,%r11,2), %r15 movl %r14d, %r12d shrl %r12d andl $0x2, %r12d movswq (%r12,%r15), %r11 testq %r11, %r11 js 0x82e7e addq %r12, %r15 leaq (%r15,%r11,2), %r15 movl %r14d, %r12d andl $0x2, %r12d movswq (%r12,%r15), %r11 testq %r11, %r11 js 0x82e83 addq %r12, %r15 leaq (%r15,%r11,2), %r11 andl $0x1, %r14d leaq (%r11,%r14,2), %r14 movzwl (%r14), %r11d testw %r11w, %r11w jns 0x82d21 jmp 0x82e88 movzwl %r11w, %ecx movb %r11b, (%rdx) shrl $0x8, %ecx andl $0x1f, %ecx subl %ecx, %ebx jmp 0x82e8d decl %ebx jmp 0x82e86 addl $-0x2, %ebx jmp 0x82e86 addl $-0x3, %ebx jmp 0x82e86 addl $-0x4, %ebx jmp 0x82e86 addl $-0x5, %ebx jmp 0x82e86 addl $-0x6, %ebx jmp 0x82e86 addl $-0x7, %ebx movl %ebx, %ecx movb %r11b, (%rdx) movl %ecx, %ebx incq %rdx cmpq %rax, %rdx jne 0x82cb1 movl %ebx, 0x4(%rsi) jmp 0x82ea5 movl $0x1, 0x28(%rsi) popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
decode_bytes_0: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rax, rcx mov r8, [rdi+28h] mov ebx, [rsi+4] mov edi, [r8+8] mov r9d, 0FFFFFFFFh mov ecx, edi shl r9d, cl not r9d loc_82CB1: cmp ebx, edi jnb short loc_82CFF mov rcx, [rsi+8] mov r10, [rsi+10h] inc r10 cmp rcx, r10 ja loc_82E9E mov r10d, [rsi] shl r10d, 18h movzx r11d, byte ptr [rcx+2] or r11d, r10d movzx r14d, byte ptr [rcx+1] shl r14d, 8 or r14d, r11d movzx r10d, byte ptr [rcx] shl r10d, 10h or r10d, r14d mov [rsi], r10d add rcx, 3 mov [rsi+8], rcx add ebx, 18h jmp short loc_82D02 loc_82CFF: mov r10d, [rsi] loc_82D02: mov ecx, ebx sub ecx, edi mov r11d, r10d shr r11d, cl and r11d, r9d mov r14, [r8] movzx r11d, word ptr [r14+r11*2] test r11w, r11w js loc_82E55 loc_82D21: cmp ecx, 7 ja short loc_82D5B shl r10d, 18h mov rbx, [rsi+8] movzx r15d, byte ptr [rbx+2] or r15d, r10d movzx r12d, byte ptr [rbx+1] shl r12d, 8 or r12d, r15d movzx r10d, byte ptr [rbx] shl r10d, 10h or r10d, r12d mov [rsi], r10d add rbx, 3 mov [rsi+8], rbx or ecx, 18h loc_82D5B: mov ebx, ecx movzx ecx, r11w lea r15, [r14+rcx*2] lea ecx, [rbx-8] mov r14d, r10d shr r14d, cl mov r12d, r14d shr r12d, 6 and r12d, 2 movsx r11, word ptr [r15+r12] test r11, r11 js loc_82E66 add r15, r12 lea r15, [r15+r11*2] mov r12d, r14d shr r12d, 5 and r12d, 2 movsx r11, word ptr [r12+r15] test r11, r11 js loc_82E6A add r15, r12 lea r15, [r15+r11*2] mov r12d, r14d shr r12d, 4 and r12d, 2 movsx r11, word ptr [r12+r15] test r11, r11 js loc_82E6F add r15, r12 lea r15, [r15+r11*2] mov r12d, r14d shr r12d, 3 and r12d, 2 movsx r11, word ptr [r12+r15] test r11, r11 js loc_82E74 add r15, r12 lea r15, [r15+r11*2] mov r12d, r14d shr r12d, 2 and r12d, 2 movsx r11, word ptr [r12+r15] test r11, r11 js short loc_82E79 add r15, r12 lea r15, [r15+r11*2] mov r12d, r14d shr r12d, 1 and r12d, 2 movsx r11, word ptr [r12+r15] test r11, r11 js short loc_82E7E add r15, r12 lea r15, [r15+r11*2] mov r12d, r14d and r12d, 2 movsx r11, word ptr [r12+r15] test r11, r11 js short loc_82E83 add r15, r12 lea r11, [r15+r11*2] and r14d, 1 lea r14, [r11+r14*2] movzx r11d, word ptr [r14] test r11w, r11w jns loc_82D21 jmp short loc_82E88 loc_82E55: movzx ecx, r11w mov [rdx], r11b shr ecx, 8 and ecx, 1Fh sub ebx, ecx jmp short loc_82E8D loc_82E66: dec ebx jmp short loc_82E86 loc_82E6A: add ebx, 0FFFFFFFEh jmp short loc_82E86 loc_82E6F: add ebx, 0FFFFFFFDh jmp short loc_82E86 loc_82E74: add ebx, 0FFFFFFFCh jmp short loc_82E86 loc_82E79: add ebx, 0FFFFFFFBh jmp short loc_82E86 loc_82E7E: add ebx, 0FFFFFFFAh jmp short loc_82E86 loc_82E83: add ebx, 0FFFFFFF9h loc_82E86: mov ecx, ebx loc_82E88: mov [rdx], r11b mov ebx, ecx loc_82E8D: inc rdx cmp rdx, rax jnz loc_82CB1 mov [rsi+4], ebx jmp short loc_82EA5 loc_82E9E: mov dword ptr [rsi+28h], 1 loc_82EA5: pop rbx pop r12 pop r14 pop r15 pop rbp retn
_BYTE * decode_bytes_0(long long a1, long long a2, _BYTE *a3, _BYTE *a4) { _BYTE *result; // rax long long v5; // r8 unsigned int v6; // ebx unsigned int v7; // edi unsigned __int8 *v8; // rcx unsigned int v9; // r10d unsigned int v10; // ecx _WORD *v11; // r14 long long v12; // r11 unsigned __int8 *v13; // rbx unsigned int v14; // ebx _WORD *v15; // r15 unsigned int v16; // r14d long long v17; // r12 long long v18; // r15 long long v19; // r12 long long v20; // r15 long long v21; // r12 long long v22; // r15 long long v23; // r12 long long v24; // r15 long long v25; // r12 long long v26; // r15 long long v27; // r12 long long v28; // r15 long long v29; // r12 unsigned int v30; // ebx result = a4; v5 = *(_QWORD *)(a1 + 40); v6 = *(_DWORD *)(a2 + 4); v7 = *(_DWORD *)(v5 + 8); while ( 1 ) { if ( v6 >= v7 ) { v9 = *(_DWORD *)a2; goto LABEL_6; } v8 = *(unsigned __int8 **)(a2 + 8); if ( (unsigned long long)v8 > *(_QWORD *)(a2 + 16) + 1LL ) break; v9 = (*(_DWORD *)a2 << 24) | v8[2] | (v8[1] << 8) | (*v8 << 16); *(_DWORD *)a2 = v9; *(_QWORD *)(a2 + 8) = v8 + 3; v6 += 24; LABEL_6: v10 = v6 - v7; v11 = *(_WORD **)v5; LOWORD(v12) = *(_WORD *)(*(_QWORD *)v5 + 2LL * (~(-1 << v7) & (v9 >> (v6 - v7)))); if ( (v12 & 0x8000u) != 0LL ) { *a3 = v12; v6 -= BYTE1(v12) & 0x1F; } else { while ( 1 ) { if ( v10 <= 7 ) { v13 = *(unsigned __int8 **)(a2 + 8); v9 = (v9 << 24) | v13[2] | (v13[1] << 8) | (*v13 << 16); *(_DWORD *)a2 = v9; *(_QWORD *)(a2 + 8) = v13 + 3; v10 |= 0x18u; } v14 = v10; v15 = &v11[(unsigned __int16)v12]; v10 -= 8; v16 = v9 >> v10; v17 = (v9 >> v10 >> 6) & 2; v12 = *(__int16 *)((char *)v15 + v17); if ( v12 < 0 ) { v30 = v14 - 1; goto LABEL_26; } v18 = (long long)&v15[v12] + v17; v19 = (v16 >> 5) & 2; v12 = *(__int16 *)(v19 + v18); if ( v12 < 0 ) { v30 = v14 - 2; goto LABEL_26; } v20 = v19 + v18 + 2 * v12; v21 = (v16 >> 4) & 2; v12 = *(__int16 *)(v21 + v20); if ( v12 < 0 ) { v30 = v14 - 3; goto LABEL_26; } v22 = v21 + v20 + 2 * v12; v23 = (v16 >> 3) & 2; v12 = *(__int16 *)(v23 + v22); if ( v12 < 0 ) { v30 = v14 - 4; goto LABEL_26; } v24 = v23 + v22 + 2 * v12; v25 = (v16 >> 2) & 2; v12 = *(__int16 *)(v25 + v24); if ( v12 < 0 ) { v30 = v14 - 5; goto LABEL_26; } v26 = v25 + v24 + 2 * v12; v27 = (v16 >> 1) & 2; v12 = *(__int16 *)(v27 + v26); if ( v12 < 0 ) { v30 = v14 - 6; goto LABEL_26; } v28 = v27 + v26 + 2 * v12; v29 = v16 & 2; v12 = *(__int16 *)(v29 + v28); if ( v12 < 0 ) break; v11 = (_WORD *)(v29 + v28 + 2 * v12 + 2LL * (v16 & 1)); LOWORD(v12) = *v11; if ( (__int16)*v11 < 0 ) goto LABEL_27; } v30 = v14 - 7; LABEL_26: v10 = v30; LABEL_27: *a3 = v12; v6 = v10; } if ( ++a3 == result ) { *(_DWORD *)(a2 + 4) = v6; return result; } } *(_DWORD *)(a2 + 40) = 1; return result; }
decode_bytes: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RAX,RCX MOV R8,qword ptr [RDI + 0x28] MOV EBX,dword ptr [RSI + 0x4] MOV EDI,dword ptr [R8 + 0x8] MOV R9D,0xffffffff MOV ECX,EDI SHL R9D,CL NOT R9D LAB_00182cb1: CMP EBX,EDI JNC 0x00182cff MOV RCX,qword ptr [RSI + 0x8] MOV R10,qword ptr [RSI + 0x10] INC R10 CMP RCX,R10 JA 0x00182e9e MOV R10D,dword ptr [RSI] SHL R10D,0x18 MOVZX R11D,byte ptr [RCX + 0x2] OR R11D,R10D MOVZX R14D,byte ptr [RCX + 0x1] SHL R14D,0x8 OR R14D,R11D MOVZX R10D,byte ptr [RCX] SHL R10D,0x10 OR R10D,R14D MOV dword ptr [RSI],R10D ADD RCX,0x3 MOV qword ptr [RSI + 0x8],RCX ADD EBX,0x18 JMP 0x00182d02 LAB_00182cff: MOV R10D,dword ptr [RSI] LAB_00182d02: MOV ECX,EBX SUB ECX,EDI MOV R11D,R10D SHR R11D,CL AND R11D,R9D MOV R14,qword ptr [R8] MOVZX R11D,word ptr [R14 + R11*0x2] TEST R11W,R11W JS 0x00182e55 LAB_00182d21: CMP ECX,0x7 JA 0x00182d5b SHL R10D,0x18 MOV RBX,qword ptr [RSI + 0x8] MOVZX R15D,byte ptr [RBX + 0x2] OR R15D,R10D MOVZX R12D,byte ptr [RBX + 0x1] SHL R12D,0x8 OR R12D,R15D MOVZX R10D,byte ptr [RBX] SHL R10D,0x10 OR R10D,R12D MOV dword ptr [RSI],R10D ADD RBX,0x3 MOV qword ptr [RSI + 0x8],RBX OR ECX,0x18 LAB_00182d5b: MOV EBX,ECX MOVZX ECX,R11W LEA R15,[R14 + RCX*0x2] LEA ECX,[RBX + -0x8] MOV R14D,R10D SHR R14D,CL MOV R12D,R14D SHR R12D,0x6 AND R12D,0x2 MOVSX R11,word ptr [R15 + R12*0x1] TEST R11,R11 JS 0x00182e66 ADD R15,R12 LEA R15,[R15 + R11*0x2] MOV R12D,R14D SHR R12D,0x5 AND R12D,0x2 MOVSX R11,word ptr [R12 + R15*0x1] TEST R11,R11 JS 0x00182e6a ADD R15,R12 LEA R15,[R15 + R11*0x2] MOV R12D,R14D SHR R12D,0x4 AND R12D,0x2 MOVSX R11,word ptr [R12 + R15*0x1] TEST R11,R11 JS 0x00182e6f ADD R15,R12 LEA R15,[R15 + R11*0x2] MOV R12D,R14D SHR R12D,0x3 AND R12D,0x2 MOVSX R11,word ptr [R12 + R15*0x1] TEST R11,R11 JS 0x00182e74 ADD R15,R12 LEA R15,[R15 + R11*0x2] MOV R12D,R14D SHR R12D,0x2 AND R12D,0x2 MOVSX R11,word ptr [R12 + R15*0x1] TEST R11,R11 JS 0x00182e79 ADD R15,R12 LEA R15,[R15 + R11*0x2] MOV R12D,R14D SHR R12D,0x1 AND R12D,0x2 MOVSX R11,word ptr [R12 + R15*0x1] TEST R11,R11 JS 0x00182e7e ADD R15,R12 LEA R15,[R15 + R11*0x2] MOV R12D,R14D AND R12D,0x2 MOVSX R11,word ptr [R12 + R15*0x1] TEST R11,R11 JS 0x00182e83 ADD R15,R12 LEA R11,[R15 + R11*0x2] AND R14D,0x1 LEA R14,[R11 + R14*0x2] MOVZX R11D,word ptr [R14] TEST R11W,R11W JNS 0x00182d21 JMP 0x00182e88 LAB_00182e55: MOVZX ECX,R11W MOV byte ptr [RDX],R11B SHR ECX,0x8 AND ECX,0x1f SUB EBX,ECX JMP 0x00182e8d LAB_00182e66: DEC EBX JMP 0x00182e86 LAB_00182e6a: ADD EBX,-0x2 JMP 0x00182e86 LAB_00182e6f: ADD EBX,-0x3 JMP 0x00182e86 LAB_00182e74: ADD EBX,-0x4 JMP 0x00182e86 LAB_00182e79: ADD EBX,-0x5 JMP 0x00182e86 LAB_00182e7e: ADD EBX,-0x6 JMP 0x00182e86 LAB_00182e83: ADD EBX,-0x7 LAB_00182e86: MOV ECX,EBX LAB_00182e88: MOV byte ptr [RDX],R11B MOV EBX,ECX LAB_00182e8d: INC RDX CMP RDX,RAX JNZ 0x00182cb1 MOV dword ptr [RSI + 0x4],EBX JMP 0x00182ea5 LAB_00182e9e: MOV dword ptr [RSI + 0x28],0x1 LAB_00182ea5: POP RBX POP R12 POP R14 POP R15 POP RBP RET
void decode_bytes(long param_1,uint *param_2,int1 *param_3,int1 *param_4) { ushort uVar1; uint uVar2; int8 *puVar3; byte *pbVar4; long lVar5; uint uVar6; uint uVar7; uint uVar8; ulong uVar9; ulong uVar10; ulong uVar11; uint uVar12; ushort *puVar13; puVar3 = *(int8 **)(param_1 + 0x28); uVar7 = param_2[1]; uVar2 = *(uint *)(puVar3 + 1); do { if (uVar7 < uVar2) { pbVar4 = *(byte **)(param_2 + 2); if ((byte *)(*(long *)(param_2 + 4) + 1) < pbVar4) { param_2[10] = 1; return; } uVar8 = (uint)*pbVar4 << 0x10 | (uint)pbVar4[1] << 8 | (uint)pbVar4[2] | *param_2 << 0x18; *param_2 = uVar8; *(byte **)(param_2 + 2) = pbVar4 + 3; uVar7 = uVar7 + 0x18; } else { uVar8 = *param_2; } uVar6 = uVar7 - uVar2; puVar13 = (ushort *)*puVar3; uVar1 = puVar13[uVar8 >> ((byte)uVar6 & 0x1f) & ~(-1 << ((byte)uVar2 & 0x1f))]; uVar10 = (ulong)uVar1; if ((short)uVar1 < 0) { *param_3 = (char)uVar1; uVar7 = uVar7 - (uVar1 >> 8 & 0x1f); } else { do { uVar7 = uVar6; if (uVar6 < 8) { pbVar4 = *(byte **)(param_2 + 2); uVar8 = (uint)*pbVar4 << 0x10 | (uint)pbVar4[1] << 8 | (uint)pbVar4[2] | uVar8 << 0x18; *param_2 = uVar8; *(byte **)(param_2 + 2) = pbVar4 + 3; uVar7 = uVar6 | 0x18; } uVar6 = uVar7 - 8; uVar12 = uVar8 >> ((byte)uVar6 & 0x1f); uVar11 = (ulong)(uVar12 >> 6 & 2); uVar9 = (ulong)*(short *)((long)puVar13 + uVar11 + uVar10 * 2); if ((long)uVar9 < 0) { uVar10 = uVar9; uVar7 = uVar7 - 1; break; } lVar5 = uVar9 * 2 + uVar11 + uVar10 * 2; uVar9 = (ulong)(uVar12 >> 5 & 2); uVar10 = (ulong)*(short *)((long)puVar13 + uVar9 + lVar5); if ((long)uVar10 < 0) { uVar7 = uVar7 - 2; break; } lVar5 = uVar10 * 2 + uVar9 + lVar5; uVar9 = (ulong)(uVar12 >> 4 & 2); uVar10 = (ulong)*(short *)((long)puVar13 + uVar9 + lVar5); if ((long)uVar10 < 0) { uVar7 = uVar7 - 3; break; } lVar5 = uVar10 * 2 + uVar9 + lVar5; uVar9 = (ulong)(uVar12 >> 3 & 2); uVar10 = (ulong)*(short *)((long)puVar13 + uVar9 + lVar5); if ((long)uVar10 < 0) { uVar7 = uVar7 - 4; break; } lVar5 = uVar10 * 2 + uVar9 + lVar5; uVar9 = (ulong)(uVar12 >> 2 & 2); uVar10 = (ulong)*(short *)((long)puVar13 + uVar9 + lVar5); if ((long)uVar10 < 0) { uVar7 = uVar7 - 5; break; } lVar5 = uVar10 * 2 + uVar9 + lVar5; uVar9 = (ulong)(uVar12 >> 1 & 2); uVar10 = (ulong)*(short *)((long)puVar13 + uVar9 + lVar5); if ((long)uVar10 < 0) { uVar7 = uVar7 - 6; break; } lVar5 = uVar10 * 2 + uVar9 + lVar5; uVar10 = (ulong)*(short *)((long)puVar13 + (ulong)(uVar12 & 2) + lVar5); if ((long)uVar10 < 0) { uVar7 = uVar7 - 7; break; } puVar13 = (ushort *) ((long)puVar13 + (ulong)(uVar12 & 1) * 2 + uVar10 * 2 + (ulong)(uVar12 & 2) + lVar5); uVar10 = (ulong)*puVar13; uVar7 = uVar6; } while (-1 < (short)*puVar13); *param_3 = (char)uVar10; } param_3 = param_3 + 1; if (param_3 == param_4) { param_2[1] = uVar7; return; } } while( true ); }
10,370
my_stat
eloqsql/mysys/my_lib.c
MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags) { int m_used; DBUG_ENTER("my_stat"); DBUG_PRINT("my", ("path: '%s' stat_area: %p MyFlags: %lu", path, stat_area, my_flags)); if ((m_used= (stat_area == NULL))) if (!(stat_area= (MY_STAT *) my_malloc(key_memory_MY_STAT, sizeof(MY_STAT), my_flags))) goto error; #ifndef _WIN32 if (!stat((char *) path, (struct stat *) stat_area)) { MSAN_STAT_WORKAROUND(stat_area); DBUG_RETURN(stat_area); } #else if (!my_win_stat(path, stat_area)) DBUG_RETURN(stat_area); #endif DBUG_PRINT("error",("Got errno: %d from stat", errno)); my_errno= errno; if (m_used) /* Free if new area */ my_free(stat_area); error: if (my_flags & (MY_FAE+MY_WME)) { my_error(EE_STAT, MYF(ME_BELL), path, my_errno); DBUG_RETURN((MY_STAT *) NULL); } DBUG_RETURN((MY_STAT *) NULL); }
O0
c
my_stat: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) jmp 0x65606 cmpq $0x0, -0x18(%rbp) sete %al movb %al, %cl andb $0x1, %cl movzbl %cl, %ecx movl %ecx, -0x24(%rbp) testb $0x1, %al jne 0x6561f jmp 0x65644 leaq 0x3aacc2(%rip), %rax # 0x4102e8 movl (%rax), %edi movq -0x20(%rbp), %rdx movl $0x90, %esi callq 0x58f20 movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x65642 jmp 0x6568b jmp 0x65644 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x265c0 cmpl $0x0, %eax jne 0x65662 jmp 0x65658 movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x656d1 jmp 0x65664 jmp 0x65666 callq 0x26050 movl (%rax), %eax movl %eax, -0x28(%rbp) callq 0x5a430 movl -0x28(%rbp), %ecx movl %ecx, (%rax) cmpl $0x0, -0x24(%rbp) je 0x65689 movq -0x18(%rbp), %rdi callq 0x592a0 jmp 0x6568b movq -0x20(%rbp), %rax andq $0x18, %rax cmpq $0x0, %rax je 0x656c7 movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) callq 0x5a430 movq -0x30(%rbp), %rdx movl (%rax), %ecx movl $0xd, %edi movl $0x4, %esi movb $0x0, %al callq 0x64910 movq $0x0, -0x8(%rbp) jmp 0x656d1 jmp 0x656c9 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
my_stat: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx jmp short $+2 loc_65606: cmp [rbp+var_18], 0 setz al mov cl, al and cl, 1 movzx ecx, cl mov [rbp+var_24], ecx test al, 1 jnz short loc_6561F jmp short loc_65644 loc_6561F: lea rax, key_memory_MY_STAT mov edi, [rax] mov rdx, [rbp+var_20] mov esi, 90h call my_malloc mov [rbp+var_18], rax cmp rax, 0 jnz short loc_65642 jmp short loc_6568B loc_65642: jmp short $+2 loc_65644: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call _stat64 cmp eax, 0 jnz short loc_65662 jmp short $+2 loc_65658: mov rax, [rbp+var_18] mov [rbp+var_8], rax jmp short loc_656D1 loc_65662: jmp short $+2 loc_65664: jmp short $+2 loc_65666: call ___errno_location mov eax, [rax] mov [rbp+var_28], eax call _my_thread_var mov ecx, [rbp+var_28] mov [rax], ecx cmp [rbp+var_24], 0 jz short loc_65689 mov rdi, [rbp+var_18] call my_free loc_65689: jmp short $+2 loc_6568B: mov rax, [rbp+var_20] and rax, 18h cmp rax, 0 jz short loc_656C7 mov rax, [rbp+var_10] mov [rbp+var_30], rax call _my_thread_var mov rdx, [rbp+var_30] mov ecx, [rax] mov edi, 0Dh mov esi, 4 mov al, 0 call my_error mov [rbp+var_8], 0 jmp short loc_656D1 loc_656C7: jmp short $+2 loc_656C9: mov [rbp+var_8], 0 loc_656D1: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long my_stat(long long a1, long long a2, char a3) { unsigned int *v3; // rax int v5; // [rsp+8h] [rbp-28h] long long v7; // [rsp+18h] [rbp-18h] v7 = a2; if ( a2 || (v7 = my_malloc(key_memory_MY_STAT, 0x90uLL, a3)) != 0 ) { if ( !(unsigned int)stat64(a1, v7) ) return v7; v5 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var() = v5; if ( !a2 ) my_free(v7); } if ( (a3 & 0x18) != 0 ) { v3 = (unsigned int *)my_thread_var(); my_error(0xDu, 4LL, a1, *v3); } return 0LL; }
my_stat: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX JMP 0x00165606 LAB_00165606: CMP qword ptr [RBP + -0x18],0x0 SETZ AL MOV CL,AL AND CL,0x1 MOVZX ECX,CL MOV dword ptr [RBP + -0x24],ECX TEST AL,0x1 JNZ 0x0016561f JMP 0x00165644 LAB_0016561f: LEA RAX,[0x5102e8] MOV EDI,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x20] MOV ESI,0x90 CALL 0x00158f20 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x00165642 JMP 0x0016568b LAB_00165642: JMP 0x00165644 LAB_00165644: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001265c0 CMP EAX,0x0 JNZ 0x00165662 JMP 0x00165658 LAB_00165658: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX JMP 0x001656d1 LAB_00165662: JMP 0x00165664 LAB_00165664: JMP 0x00165666 LAB_00165666: CALL 0x00126050 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x28],EAX CALL 0x0015a430 MOV ECX,dword ptr [RBP + -0x28] MOV dword ptr [RAX],ECX CMP dword ptr [RBP + -0x24],0x0 JZ 0x00165689 MOV RDI,qword ptr [RBP + -0x18] CALL 0x001592a0 LAB_00165689: JMP 0x0016568b LAB_0016568b: MOV RAX,qword ptr [RBP + -0x20] AND RAX,0x18 CMP RAX,0x0 JZ 0x001656c7 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX CALL 0x0015a430 MOV RDX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RAX] MOV EDI,0xd MOV ESI,0x4 MOV AL,0x0 CALL 0x00164910 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001656d1 LAB_001656c7: JMP 0x001656c9 LAB_001656c9: MOV qword ptr [RBP + -0x8],0x0 LAB_001656d1: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
stat64 * my_stat(char *param_1,stat64 *param_2,ulong param_3) { int iVar1; int *piVar2; int4 *puVar3; stat64 *local_20; local_20 = param_2; if ((param_2 != (stat64 *)0x0) || (local_20 = (stat64 *)my_malloc(key_memory_MY_STAT,0x90,param_3), local_20 != (stat64 *)0x0)) { iVar1 = stat64(param_1,local_20); if (iVar1 == 0) { return local_20; } piVar2 = __errno_location(); iVar1 = *piVar2; piVar2 = (int *)_my_thread_var(); *piVar2 = iVar1; if (param_2 == (stat64 *)0x0) { my_free(local_20); } } if ((param_3 & 0x18) != 0) { puVar3 = (int4 *)_my_thread_var(); my_error(0xd,4,param_1,*puVar3); } return (stat64 *)0x0; }
10,371
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 0x88304(%rip), %rsi # 0xac6a3 leaq 0x88303(%rip), %rdx # 0xac6a9 leaq 0x28(%rsp), %rdi callq 0x1de7e leaq 0x48(%rsp), %rdi leaq 0x58(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x882e5(%rip), %rsi # 0xac6aa leaq 0x882f9(%rip), %rdx # 0xac6c5 callq 0x1de7e 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 0x87ab5(%rip), %rdx # 0xabeb5 movq %rdx, %rsi callq 0x1de7e leaq 0xa0(%rsp), %r14 leaq 0xb0(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x8820a(%rip), %rsi # 0xac62d leaq 0x88207(%rip), %rdx # 0xac631 movq %r14, %rdi callq 0x1de7e leaq 0xc0(%rsp), %rdi leaq 0xd0(%rsp), %rbx movq %rbx, -0x10(%rbx) leaq 0x88279(%rip), %rsi # 0xac6c6 leaq 0x88277(%rip), %rdx # 0xac6cb callq 0x1de7e 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 0x87a2a(%rip), %rdx # 0xabeb5 movq %rdx, %rsi callq 0x1de7e leaq 0x118(%rsp), %r14 leaq 0x128(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x8820e(%rip), %rsi # 0xac6bc leaq 0x88210(%rip), %rdx # 0xac6c5 movq %r14, %rdi callq 0x1de7e leaq 0x138(%rsp), %rdi leaq 0x148(%rsp), %rbx movq %rbx, -0x10(%rbx) leaq 0x881f4(%rip), %rsi # 0xac6cc leaq 0x881f5(%rip), %rdx # 0xac6d4 callq 0x1de7e 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 0x8799f(%rip), %rdx # 0xabeb5 movq %rdx, %rsi callq 0x1de7e leaq 0x190(%rsp), %r14 leaq 0x1a0(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x880f4(%rip), %rsi # 0xac62d leaq 0x880f1(%rip), %rdx # 0xac631 movq %r14, %rdi callq 0x1de7e leaq 0x1b0(%rsp), %rdi leaq 0x1c0(%rsp), %rbx movq %rbx, -0x10(%rbx) leaq 0x88172(%rip), %rsi # 0xac6d5 leaq 0x88177(%rip), %rdx # 0xac6e1 callq 0x1de7e 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 0x87914(%rip), %rdx # 0xabeb5 movq %rdx, %rsi callq 0x1de7e leaq 0x10(%rsp), %rdi leaq 0x28(%rsp), %rsi leaq 0xf(%rsp), %rcx movl $0x4, %edx callq 0x2ca1a movl $0x1e0, %r14d # imm = 0x1E0 leaq (%rsp,%r14), %rax addq $0x18, %rax movq -0x10(%rax), %rdi cmpq %rdi, %rax je 0x245e4 movq (%rax), %rsi incq %rsi callq 0x186a0 leaq (%rsp,%r14), %rbx addq $-0x10, %rbx movq %rbx, %rdi callq 0x2c9ea movq -0x20(%rbx), %rdi leaq (%rsp,%r14), %rax addq $-0x20, %rax cmpq %rdi, %rax je 0x24610 movq (%rax), %rsi incq %rsi callq 0x186a0 leaq (%rsp,%r14), %rax addq $-0x40, %rax movq -0x10(%rax), %rdi cmpq %rdi, %rax je 0x2462c movq (%rax), %rsi incq %rsi callq 0x186a0 addq $-0x78, %r14 jne 0x245c8 movzbl %bpl, %r8d leaq 0x10(%rsp), %rdx movq %r15, %rdi movq %r12, %rsi movl $0x1, %ecx callq 0x239c3 leaq 0x10(%rsp), %rdi callq 0x2c9ba 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 0x2c9ba jmp 0x24870 movq %rax, %r15 movl $0x168, %ebx # imm = 0x168 leaq (%rsp,%rbx), %rdi addq $0x28, %rdi callq 0x2ca62 addq $-0x78, %rbx cmpq $-0x78, %rbx jne 0x24684 xorl %ebp, %ebp jmp 0x246d2 movq %rax, %r15 movq %r13, %rdi callq 0x2c9ea movq 0x1b0(%rsp), %rdi movb $0x1, %bpl cmpq %rbx, %rdi je 0x246d2 movq 0x1c0(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x246d2 movq %rax, %r15 movb $0x1, %bpl testb %bpl, %bpl je 0x24704 movq 0x190(%rsp), %rdi leaq 0x1a0(%rsp), %rax cmpq %rax, %rdi je 0x24704 movq 0x1a0(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x24704 movq %rax, %r15 movb $0x1, %bpl xorl %r12d, %r12d jmp 0x2473f movq %rax, %r15 movq %r13, %rdi callq 0x2c9ea movq 0x138(%rsp), %rdi movb $0x1, %r12b cmpq %rbx, %rdi je 0x2473c movq 0x148(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x2473c movq %rax, %r15 movb $0x1, %r12b movb $0x1, %bpl testb %r12b, %r12b je 0x24771 movq 0x118(%rsp), %rdi leaq 0x128(%rsp), %rax cmpq %rax, %rdi je 0x24771 movq 0x128(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x24771 movq %rax, %r15 movb $0x1, %bpl xorl %r12d, %r12d jmp 0x247ac movq %rax, %r15 movq %r13, %rdi callq 0x2c9ea movq 0xc0(%rsp), %rdi movb $0x1, %r12b cmpq %rbx, %rdi je 0x247a9 movq 0xd0(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x247a9 movq %rax, %r15 movb $0x1, %r12b movb $0x1, %bpl testb %r12b, %r12b je 0x247de movq 0xa0(%rsp), %rdi leaq 0xb0(%rsp), %rax cmpq %rax, %rdi je 0x247de movq 0xb0(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x247de movq %rax, %r15 movb $0x1, %bpl xorl %ebx, %ebx testb %bl, %bl je 0x24846 movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x24846 movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x24846 movq %rax, %r15 movq %r14, %rdi callq 0x2c9ea leaq 0x28(%rsp), %r14 movq 0x20(%r14), %rdi movb $0x1, %bl cmpq %r13, %rdi je 0x24836 movq 0x58(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x24836 movq %rax, %r15 movb $0x1, %bl leaq 0x28(%rsp), %r14 movb $0x1, %bpl jmp 0x247e0 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 0x24870 leaq 0x28(%rsp), %rbx addq $-0x78, %r14 movq %r14, %rdi callq 0x2ca62 cmpq %rbx, %r14 jne 0x2485f movq %r15, %rdi callq 0x18bc0
_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, aEndIndexOutOfB+19h; "" 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, aEndIndexOutOfB+19h; "" 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, aEndIndexOutOfB+19h; "" 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, aEndIndexOutOfB+19h; "" 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_245C8: lea rax, [rsp+r14+238h+var_238] add rax, 18h mov rdi, [rax-10h]; void * cmp rax, rdi jz short loc_245E4 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_245E4: 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_24610 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_24610: lea rax, [rsp+r14+238h+var_238] add rax, 0FFFFFFFFFFFFFFC0h mov rdi, [rax-10h]; void * cmp rax, rdi jz short loc_2462C mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2462C: add r14, 0FFFFFFFFFFFFFF88h jnz short loc_245C8 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_24870 mov r15, rax mov ebx, 168h loc_24684: 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_24684 xor ebp, ebp jmp short loc_246D2 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_246D2 mov rsi, [rsp+arg_1B8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_246D2 mov r15, rax mov bpl, 1 loc_246D2: test bpl, bpl jz short loc_24704 mov rdi, [rsp+arg_188]; void * lea rax, [rsp+arg_198] cmp rdi, rax jz short loc_24704 mov rsi, [rsp+arg_198] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_24704 mov r15, rax mov bpl, 1 loc_24704: xor r12d, r12d jmp short loc_2473F 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_2473C mov rsi, [rsp+arg_140] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_2473C mov r15, rax mov r12b, 1 loc_2473C: mov bpl, 1 loc_2473F: test r12b, r12b jz short loc_24771 mov rdi, [rsp+arg_110]; void * lea rax, [rsp+arg_120] cmp rdi, rax jz short loc_24771 mov rsi, [rsp+arg_120] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_24771 mov r15, rax mov bpl, 1 loc_24771: xor r12d, r12d jmp short loc_247AC 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_247A9 mov rsi, [rsp+arg_C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_247A9 mov r15, rax mov r12b, 1 loc_247A9: mov bpl, 1 loc_247AC: test r12b, r12b jz short loc_247DE mov rdi, [rsp+arg_98]; void * lea rax, [rsp+arg_A8] cmp rdi, rax jz short loc_247DE mov rsi, [rsp+arg_A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_247DE mov r15, rax mov bpl, 1 loc_247DE: xor ebx, ebx loc_247E0: test bl, bl jz short loc_24846 mov rdi, [rsp+arg_20]; void * lea rax, [rsp+arg_30] cmp rdi, rax jz short loc_24846 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_24846 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_24836 mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_24836 mov r15, rax mov bl, 1 lea r14, [rsp+arg_20] loc_24836: mov bpl, 1 jmp short loc_247E0 mov r15, rax mov bpl, 1 lea r14, [rsp+arg_20] loc_24846: lea rax, [rsp+arg_20] cmp rax, r14 setz al xor bpl, 1 or bpl, al jnz short loc_24870 lea rbx, [rsp+arg_20] loc_2485F: add r14, 0FFFFFFFFFFFFFF88h mov rdi, r14; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() cmp r14, rbx jnz short loc_2485F loc_24870: 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_00124398: LEA RSI,[0x1ac6a3] LEA RDX,[0x1ac6a9] LEA RDI,[RSP + 0x28] CALL 0x0011de7e LEA RDI,[RSP + 0x48] LEA R13,[RSP + 0x58] MOV qword ptr [R13 + -0x10],R13 LAB_001243be: LEA RSI,[0x1ac6aa] LEA RDX,[0x1ac6c5] CALL 0x0011de7e 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_001243f9: LEA RDX,[0x1abeb5] MOV RSI,RDX CALL 0x0011de7e LEA R14,[RSP + 0xa0] LEA RAX,[RSP + 0xb0] MOV qword ptr [RAX + -0x10],RAX LAB_0012441c: LEA RSI,[0x1ac62d] LEA RDX,[0x1ac631] MOV RDI,R14 CALL 0x0011de7e LEA RDI,[RSP + 0xc0] LEA RBX,[RSP + 0xd0] MOV qword ptr [RBX + -0x10],RBX LAB_00124446: LEA RSI,[0x1ac6c6] LEA RDX,[0x1ac6cb] CALL 0x0011de7e 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_00124484: LEA RDX,[0x1abeb5] MOV RSI,RDX CALL 0x0011de7e LEA R14,[RSP + 0x118] LEA RAX,[RSP + 0x128] MOV qword ptr [RAX + -0x10],RAX LAB_001244a7: LEA RSI,[0x1ac6bc] LEA RDX,[0x1ac6c5] MOV RDI,R14 CALL 0x0011de7e LEA RDI,[RSP + 0x138] LEA RBX,[RSP + 0x148] MOV qword ptr [RBX + -0x10],RBX LAB_001244d1: LEA RSI,[0x1ac6cc] LEA RDX,[0x1ac6d4] CALL 0x0011de7e 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_0012450f: LEA RDX,[0x1abeb5] MOV RSI,RDX CALL 0x0011de7e LEA R14,[RSP + 0x190] LEA RAX,[RSP + 0x1a0] MOV qword ptr [RAX + -0x10],RAX LAB_00124532: LEA RSI,[0x1ac62d] LEA RDX,[0x1ac631] MOV RDI,R14 CALL 0x0011de7e LEA RDI,[RSP + 0x1b0] LEA RBX,[RSP + 0x1c0] MOV qword ptr [RBX + -0x10],RBX LAB_0012455c: LEA RSI,[0x1ac6d5] LEA RDX,[0x1ac6e1] CALL 0x0011de7e 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_0012459a: LEA RDX,[0x1abeb5] MOV RSI,RDX CALL 0x0011de7e LAB_001245a9: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x28] LEA RCX,[RSP + 0xf] MOV EDX,0x4 CALL 0x0012ca1a MOV R14D,0x1e0 LAB_001245c8: LEA RAX,[RSP + R14*0x1] ADD RAX,0x18 MOV RDI,qword ptr [RAX + -0x10] CMP RAX,RDI JZ 0x001245e4 MOV RSI,qword ptr [RAX] INC RSI CALL 0x001186a0 LAB_001245e4: LEA RBX,[RSP + R14*0x1] ADD RBX,-0x10 MOV RDI,RBX CALL 0x0012c9ea MOV RDI,qword ptr [RBX + -0x20] LEA RAX,[RSP + R14*0x1] ADD RAX,-0x20 CMP RAX,RDI JZ 0x00124610 MOV RSI,qword ptr [RAX] INC RSI CALL 0x001186a0 LAB_00124610: LEA RAX,[RSP + R14*0x1] ADD RAX,-0x40 MOV RDI,qword ptr [RAX + -0x10] CMP RAX,RDI JZ 0x0012462c MOV RSI,qword ptr [RAX] INC RSI CALL 0x001186a0 LAB_0012462c: ADD R14,-0x78 JNZ 0x001245c8 LAB_00124632: MOVZX R8D,BPL LEA RDX,[RSP + 0x10] MOV RDI,R15 MOV RSI,R12 MOV ECX,0x1 CALL 0x001239c3 LAB_0012464b: LEA RDI,[RSP + 0x10] CALL 0x0012c9ba 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 00124398 to 001243af has its CatchHandler @ 0012483b */ uStack_240 = 0x1243b0; std::__cxx11::string::_M_construct<char_const*>(local_210,"system",""); local_1f0[0] = local_1e0; /* try { // try from 001243be to 001243d0 has its CatchHandler @ 0012482c */ uStack_240 = 0x1243d1; 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 001243f9 to 00124407 has its CatchHandler @ 00124802 */ uStack_240 = 0x124408; std::__cxx11::string::_M_construct<char_const*>(local_1b8,""); local_198[0] = local_188; /* try { // try from 0012441c to 00124431 has its CatchHandler @ 001247d8 */ uStack_240 = 0x124432; std::__cxx11::string::_M_construct<char_const*>(local_198,&DAT_001ac62d,&DAT_001ac631); local_178[0] = local_168; /* try { // try from 00124446 to 00124458 has its CatchHandler @ 001247a3 */ uStack_240 = 0x124459; 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 00124484 to 00124492 has its CatchHandler @ 00124776 */ uStack_240 = 0x124493; std::__cxx11::string::_M_construct<char_const*>(local_140,""); local_120[0] = local_110; /* try { // try from 001244a7 to 001244bc has its CatchHandler @ 0012476b */ uStack_240 = 0x1244bd; std::__cxx11::string::_M_construct<char_const*>(local_120,"assistant",""); local_100[0] = local_f0; /* try { // try from 001244d1 to 001244e3 has its CatchHandler @ 00124736 */ uStack_240 = 0x1244e4; 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 0012450f to 0012451d has its CatchHandler @ 00124709 */ uStack_240 = 0x12451e; std::__cxx11::string::_M_construct<char_const*>(local_c8,""); local_a8[0] = local_98; /* try { // try from 00124532 to 00124547 has its CatchHandler @ 001246fe */ uStack_240 = 0x124548; std::__cxx11::string::_M_construct<char_const*>(local_a8,&DAT_001ac62d,&DAT_001ac631); local_88[0] = local_78; /* try { // try from 0012455c to 0012456e has its CatchHandler @ 001246cc */ uStack_240 = 0x12456f; 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 0012459a to 001245a8 has its CatchHandler @ 0012469f */ uStack_240 = 0x1245a9; std::__cxx11::string::_M_construct<char_const*>(local_50,""); /* try { // try from 001245a9 to 001245c1 has its CatchHandler @ 0012467c */ uStack_240 = 0x1245c2; 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 = 0x1245e4; operator_delete(*(long **)((long)&uStack_230 + lVar3),*(long *)((long)alStack_220 + lVar3) + 1 ); } uStack_240 = 0x1245f4; 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 = 0x124610; operator_delete(plVar2,*plVar1 + 1); } plVar2 = (long *)((long)alStack_288 + lVar3 + 0x10); if (plVar2 != *(long **)((long)alStack_288 + lVar3)) { uStack_240 = 0x12462c; operator_delete(*(long **)((long)alStack_288 + lVar3),*plVar2 + 1); } lVar3 = lVar3 + -0x78; } while (lVar3 != 0); /* try { // try from 00124632 to 0012464a has its CatchHandler @ 0012466a */ uStack_240 = 0x12464b; common_chat_apply_template_abi_cxx11_ (param_1,(vector *)CONCAT71(in_register_00000031,param_2),SUB81(local_228,0),true); uStack_240 = 0x124655; std::vector<common_chat_msg,std::allocator<common_chat_msg>>::~vector(local_228); return param_1; }
10,372
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); }
O2
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 0x66199(%rip), %rsi # 0x8e663 leaq 0x28(%rsp), %rbx leaq 0xf(%rsp), %rdx movq %rbx, %rdi callq 0x2336c leaq 0x48(%rsp), %r14 leaq 0x66182(%rip), %rsi # 0x8e66a leaq 0xe(%rsp), %rdx movq %r14, %rdi callq 0x2336c leaq 0x68(%rsp), %r13 leaq 0x80(%rsp), %rdi xorps %xmm0, %xmm0 movups %xmm0, -0x18(%rdi) andq $0x0, -0x8(%rdi) leaq 0x65960(%rip), %rsi # 0x8de75 leaq 0xa(%rsp), %rdx callq 0x2336c leaq 0xa0(%rsp), %r14 leaq 0x660bf(%rip), %rsi # 0x8e5ed leaq 0xa(%rsp), %rdx movq %r14, %rdi callq 0x2336c leaq 0xc0(%rsp), %r13 leaq 0x6613c(%rip), %rsi # 0x8e686 leaq 0xd(%rsp), %rdx movq %r13, %rdi callq 0x2336c leaq 0xf8(%rsp), %rdi xorps %xmm0, %xmm0 movups %xmm0, -0x18(%rdi) andq $0x0, -0x8(%rdi) leaq 0x65903(%rip), %rsi # 0x8de75 leaq 0x9(%rsp), %rdx callq 0x2336c leaq 0x118(%rsp), %r14 leaq 0x660f1(%rip), %rsi # 0x8e67c leaq 0x9(%rsp), %rdx movq %r14, %rdi callq 0x2336c leaq 0x138(%rsp), %r13 leaq 0x660e5(%rip), %rsi # 0x8e68c leaq 0xc(%rsp), %rdx movq %r13, %rdi callq 0x2336c leaq 0x170(%rsp), %rdi xorps %xmm0, %xmm0 movups %xmm0, -0x18(%rdi) andq $0x0, -0x8(%rdi) leaq 0x658a6(%rip), %rsi # 0x8de75 leaq 0x8(%rsp), %rdx callq 0x2336c leaq 0x190(%rsp), %r14 leaq 0x66005(%rip), %rsi # 0x8e5ed leaq 0x8(%rsp), %rdx movq %r14, %rdi callq 0x2336c leaq 0x1b0(%rsp), %r13 leaq 0x66091(%rip), %rsi # 0x8e695 leaq 0xb(%rsp), %rdx movq %r13, %rdi callq 0x2336c leaq 0x1e8(%rsp), %rdi xorps %xmm0, %xmm0 movups %xmm0, -0x18(%rdi) andq $0x0, -0x8(%rdi) leaq 0x65849(%rip), %rsi # 0x8de75 leaq 0x7(%rsp), %rdx callq 0x2336c leaq 0x10(%rsp), %rdi leaq 0x28(%rsp), %rsi pushq $0x4 popq %rdx leaq 0x7(%rsp), %rcx callq 0x2dade movl $0x168, %ebx # imm = 0x168 leaq (%rsp,%rbx), %rdi addq $0x28, %rdi callq 0x2db18 addq $-0x78, %rbx cmpq $-0x78, %rbx jne 0x28652 movzbl %bpl, %r8d leaq 0x10(%rsp), %rdx pushq $0x1 popq %rcx movq %r15, %rdi movq %r12, %rsi callq 0x27e46 leaq 0x10(%rsp), %rdi callq 0x2da9a 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 0x2da9a jmp 0x2872c movq %rax, %r15 movl $0x168, %ebx # imm = 0x168 leaq (%rsp,%rbx), %rdi addq $0x28, %rdi callq 0x2db18 addq $-0x78, %rbx cmpq $-0x78, %rbx jne 0x286b6 jmp 0x2872c movq %rax, %r15 leaq 0x1d0(%rsp), %rdi jmp 0x286fc jmp 0x2870b jmp 0x28718 movq %rax, %r15 leaq 0x158(%rsp), %rdi jmp 0x286fc jmp 0x2870b jmp 0x28718 movq %rax, %r15 leaq 0xe0(%rsp), %rdi callq 0x2dabc movq %r13, %rdi callq 0x20de8 jmp 0x2870e movq %rax, %r15 movq %r14, %rdi callq 0x20de8 jmp 0x2871b movq %rax, %r15 addq $-0x78, %r14 movq %r14, %rdi callq 0x2db18 cmpq %rbx, %r14 jne 0x2871b movq %r15, %rdi callq 0x20bf0 movq %rax, %r15 movq %r13, %rdi callq 0x2dabc movq %r14, %rdi callq 0x20de8 jmp 0x2874c movq %rax, %r15 leaq 0x28(%rsp), %rdi callq 0x20de8 jmp 0x2872c movq %rax, %r15 jmp 0x2872c
_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 rsi, aSystem; "system" lea rbx, [rsp+238h+var_210] lea rdx, [rsp+238h+var_229] mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea r14, [rsp+238h+var_1F0] lea rsi, aYouAreAHelpful; "You are a helpful assistant" lea rdx, [rsp+238h+var_22A] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea r13, [rsp+238h+var_1D0] lea rdi, [rsp+238h+var_1B8] xorps xmm0, xmm0 movups xmmword ptr [rdi-18h], xmm0 and qword ptr [rdi-8], 0 lea rsi, aEndIndexOutOfB+19h; "" lea rdx, [rsp+238h+var_22E] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea r14, [rsp+238h+var_198] lea rsi, aUser; "user" lea rdx, [rsp+238h+var_22E] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea r13, [rsp+238h+var_178] lea rsi, aHello; "Hello" lea rdx, [rsp+238h+var_22B] mov rdi, r13 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+238h+var_140] xorps xmm0, xmm0 movups xmmword ptr [rdi-18h], xmm0 and qword ptr [rdi-8], 0 lea rsi, aEndIndexOutOfB+19h; "" lea rdx, [rsp+238h+var_22F] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea r14, [rsp+238h+var_120] lea rsi, aYouAreAHelpful+12h; "assistant" lea rdx, [rsp+238h+var_22F] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea r13, [rsp+238h+var_100] lea rsi, aHiThere; "Hi there" lea rdx, [rsp+238h+var_22C] mov rdi, r13 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+238h+var_C8] xorps xmm0, xmm0 movups xmmword ptr [rdi-18h], xmm0 and qword ptr [rdi-8], 0 lea rsi, aEndIndexOutOfB+19h; "" lea rdx, [rsp+238h+var_230] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea r14, [rsp+238h+var_A8] lea rsi, aUser; "user" lea rdx, [rsp+238h+var_230] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea r13, [rsp+238h+var_88] lea rsi, aHowAreYou; "How are you?" lea rdx, [rsp+238h+var_22D] mov rdi, r13 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+238h+var_50] xorps xmm0, xmm0 movups xmmword ptr [rdi-18h], xmm0 and qword ptr [rdi-8], 0 lea rsi, aEndIndexOutOfB+19h; "" lea rdx, [rsp+238h+var_231] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+238h+var_228] lea rsi, [rsp+238h+var_210] push 4 pop rdx lea rcx, [rsp+238h+var_231] 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 ebx, 168h loc_28652: lea rdi, [rsp+rbx+238h+var_238] add rdi, 28h ; '('; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() add rbx, 0FFFFFFFFFFFFFF88h cmp rbx, 0FFFFFFFFFFFFFF88h jnz short loc_28652 movzx r8d, bpl lea rdx, [rsp+238h+var_228] push 1 pop rcx mov rdi, r15 mov rsi, r12 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 short loc_2872C mov r15, rax mov ebx, 168h loc_286B6: 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_286B6 jmp short loc_2872C mov r15, rax lea rdi, [rsp+arg_1C8] jmp short loc_286FC jmp short loc_2870B jmp short loc_28718 mov r15, rax lea rdi, [rsp+arg_150] jmp short loc_286FC jmp short loc_2870B jmp short loc_28718 mov r15, rax lea rdi, [rsp+arg_D8] loc_286FC: call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, r13; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_2870E loc_2870B: mov r15, rax loc_2870E: mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_2871B loc_28718: mov r15, rax loc_2871B: add r14, 0FFFFFFFFFFFFFF88h mov rdi, r14; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() cmp r14, rbx jnz short loc_2871B loc_2872C: mov rdi, r15 call __Unwind_Resume mov r15, rax mov rdi, r13 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_2874C mov r15, rax loc_2874C: lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_2872C mov r15, rax jmp short loc_2872C
_QWORD * common_chat_format_example[abi:cxx11](_QWORD *a1, common_chat_inputs *a2, unsigned __int8 a3) { long long i; // rbx char v6; // [rsp+7h] [rbp-231h] BYREF _QWORD v7[3]; // [rsp+10h] [rbp-228h] BYREF _QWORD v8[4]; // [rsp+28h] [rbp-210h] BYREF _QWORD v9[4]; // [rsp+48h] [rbp-1F0h] BYREF __int128 v10; // [rsp+68h] [rbp-1D0h] long long v11; // [rsp+78h] [rbp-1C0h] _QWORD v12[4]; // [rsp+80h] [rbp-1B8h] BYREF _QWORD v13[4]; // [rsp+A0h] [rbp-198h] BYREF _QWORD v14[4]; // [rsp+C0h] [rbp-178h] BYREF __int128 v15; // [rsp+E0h] [rbp-158h] long long v16; // [rsp+F0h] [rbp-148h] _QWORD v17[4]; // [rsp+F8h] [rbp-140h] BYREF _QWORD v18[4]; // [rsp+118h] [rbp-120h] BYREF _QWORD v19[4]; // [rsp+138h] [rbp-100h] BYREF __int128 v20; // [rsp+158h] [rbp-E0h] long long v21; // [rsp+168h] [rbp-D0h] _QWORD v22[4]; // [rsp+170h] [rbp-C8h] BYREF _QWORD v23[4]; // [rsp+190h] [rbp-A8h] BYREF _QWORD v24[4]; // [rsp+1B0h] [rbp-88h] BYREF __int128 v25; // [rsp+1D0h] [rbp-68h] long long v26; // [rsp+1E0h] [rbp-58h] _QWORD v27[10]; // [rsp+1E8h] [rbp-50h] BYREF std::string::basic_string<std::allocator<char>>(v8, (long long)"system"); std::string::basic_string<std::allocator<char>>(v9, (long long)"You are a helpful assistant"); v10 = 0LL; v11 = 0LL; std::string::basic_string<std::allocator<char>>(v12, (long long)""); std::string::basic_string<std::allocator<char>>(v13, (long long)"user"); std::string::basic_string<std::allocator<char>>(v14, (long long)"Hello"); v15 = 0LL; v16 = 0LL; std::string::basic_string<std::allocator<char>>(v17, (long long)""); std::string::basic_string<std::allocator<char>>(v18, (long long)"assistant"); std::string::basic_string<std::allocator<char>>(v19, (long long)"Hi there"); v20 = 0LL; v21 = 0LL; std::string::basic_string<std::allocator<char>>(v22, (long long)""); std::string::basic_string<std::allocator<char>>(v23, (long long)"user"); std::string::basic_string<std::allocator<char>>(v24, (long long)"How are you?"); v25 = 0LL; v26 = 0LL; std::string::basic_string<std::allocator<char>>(v27, (long long)""); std::vector<common_chat_msg>::vector(v7, v8, 4LL, &v6); for ( i = 45LL; i != -15; i -= 15LL ) common_chat_msg::~common_chat_msg((common_chat_msg *)&v8[i]); common_chat_apply_template[abi:cxx11](a1, a2, v7, 1u, a3); std::vector<common_chat_msg>::~vector(v7); 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 LAB_001284c3: LEA RSI,[0x18e663] LEA RBX,[RSP + 0x28] LEA RDX,[RSP + 0xf] MOV RDI,RBX CALL 0x0012336c LEA R14,[RSP + 0x48] LAB_001284e1: LEA RSI,[0x18e66a] LEA RDX,[RSP + 0xe] MOV RDI,R14 CALL 0x0012336c LEA R13,[RSP + 0x68] LEA RDI,[RSP + 0x80] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + -0x18],XMM0 AND qword ptr [RDI + -0x8],0x0 LAB_0012850e: LEA RSI,[0x18de75] LEA RDX,[RSP + 0xa] CALL 0x0012336c LEA R14,[RSP + 0xa0] LAB_00128527: LEA RSI,[0x18e5ed] LEA RDX,[RSP + 0xa] MOV RDI,R14 CALL 0x0012336c LEA R13,[RSP + 0xc0] LAB_00128543: LEA RSI,[0x18e686] LEA RDX,[RSP + 0xd] MOV RDI,R13 CALL 0x0012336c LEA RDI,[RSP + 0xf8] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + -0x18],XMM0 AND qword ptr [RDI + -0x8],0x0 LAB_0012856b: LEA RSI,[0x18de75] LEA RDX,[RSP + 0x9] CALL 0x0012336c LEA R14,[RSP + 0x118] LAB_00128584: LEA RSI,[0x18e67c] LEA RDX,[RSP + 0x9] MOV RDI,R14 CALL 0x0012336c LEA R13,[RSP + 0x138] LAB_001285a0: LEA RSI,[0x18e68c] LEA RDX,[RSP + 0xc] MOV RDI,R13 CALL 0x0012336c LEA RDI,[RSP + 0x170] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + -0x18],XMM0 AND qword ptr [RDI + -0x8],0x0 LAB_001285c8: LEA RSI,[0x18de75] LEA RDX,[RSP + 0x8] CALL 0x0012336c LEA R14,[RSP + 0x190] LAB_001285e1: LEA RSI,[0x18e5ed] LEA RDX,[RSP + 0x8] MOV RDI,R14 CALL 0x0012336c LEA R13,[RSP + 0x1b0] LAB_001285fd: LEA RSI,[0x18e695] LEA RDX,[RSP + 0xb] MOV RDI,R13 CALL 0x0012336c LEA RDI,[RSP + 0x1e8] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + -0x18],XMM0 AND qword ptr [RDI + -0x8],0x0 LAB_00128625: LEA RSI,[0x18de75] LEA RDX,[RSP + 0x7] CALL 0x0012336c LAB_00128636: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x28] PUSH 0x4 POP RDX LEA RCX,[RSP + 0x7] CALL 0x0012dade MOV EBX,0x168 LAB_00128652: LEA RDI,[RSP + RBX*0x1] ADD RDI,0x28 CALL 0x0012db18 ADD RBX,-0x78 CMP RBX,-0x78 JNZ 0x00128652 LAB_00128669: MOVZX R8D,BPL LEA RDX,[RSP + 0x10] PUSH 0x1 POP RCX MOV RDI,R15 MOV RSI,R12 CALL 0x00127e46 LAB_00128680: LEA RDI,[RSP + 0x10] CALL 0x0012da9a 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 lVar1; int7 in_register_00000031; allocator local_231; allocator local_230; allocator local_22f; allocator local_22e; allocator local_22d; allocator local_22c; allocator local_22b; allocator local_22a; allocator local_229; vector<common_chat_msg,std::allocator<common_chat_msg>> local_228 [24]; string local_210 [32]; string local_1f0 [32]; int8 local_1d0; int8 uStack_1c8; int8 local_1c0; string local_1b8 [32]; string local_198 [32]; string local_178 [32]; int8 local_158; int8 uStack_150; int8 local_148; string local_140 [32]; string local_120 [32]; string local_100 [32]; int8 local_e0; int8 uStack_d8; int8 local_d0; string local_c8 [32]; string local_a8 [32]; string local_88 [32]; int8 local_68; int8 uStack_60; int8 local_58; string local_50 [32]; /* try { // try from 001284c3 to 001284db has its CatchHandler @ 00128758 */ std::__cxx11::string::string<std::allocator<char>>(local_210,"system",&local_229); /* try { // try from 001284e1 to 001284f4 has its CatchHandler @ 00128749 */ std::__cxx11::string::string<std::allocator<char>> (local_1f0,"You are a helpful assistant",&local_22a); local_1d0 = 0; uStack_1c8 = 0; local_1c0 = 0; /* try { // try from 0012850e to 0012851e has its CatchHandler @ 00128734 */ std::__cxx11::string::string<std::allocator<char>>(local_1b8,"",&local_22e); /* try { // try from 00128527 to 0012853a has its CatchHandler @ 00128718 */ std::__cxx11::string::string<std::allocator<char>>(local_198,"user",&local_22e); /* try { // try from 00128543 to 00128556 has its CatchHandler @ 0012870b */ std::__cxx11::string::string<std::allocator<char>>(local_178,"Hello",&local_22b); local_158 = 0; uStack_150 = 0; local_148 = 0; /* try { // try from 0012856b to 0012857b has its CatchHandler @ 001286f1 */ std::__cxx11::string::string<std::allocator<char>>(local_140,"",&local_22f); /* try { // try from 00128584 to 00128597 has its CatchHandler @ 001286ef */ std::__cxx11::string::string<std::allocator<char>>(local_120,"assistant",&local_22f); /* try { // try from 001285a0 to 001285b3 has its CatchHandler @ 001286ed */ std::__cxx11::string::string<std::allocator<char>>(local_100,"Hi there",&local_22c); local_e0 = 0; uStack_d8 = 0; local_d0 = 0; /* try { // try from 001285c8 to 001285d8 has its CatchHandler @ 001286e0 */ std::__cxx11::string::string<std::allocator<char>>(local_c8,"",&local_230); /* try { // try from 001285e1 to 001285f4 has its CatchHandler @ 001286de */ std::__cxx11::string::string<std::allocator<char>>(local_a8,"user",&local_230); /* try { // try from 001285fd to 00128610 has its CatchHandler @ 001286dc */ std::__cxx11::string::string<std::allocator<char>>(local_88,"How are you?",&local_22d); local_68 = 0; uStack_60 = 0; local_58 = 0; /* try { // try from 00128625 to 00128635 has its CatchHandler @ 001286cf */ std::__cxx11::string::string<std::allocator<char>>(local_50,"",&local_231); /* try { // try from 00128636 to 0012864c has its CatchHandler @ 001286ae */ std::vector<common_chat_msg,std::allocator<common_chat_msg>>::vector (local_228,local_210,4,&local_231); lVar1 = 0x168; do { common_chat_msg::~common_chat_msg((common_chat_msg *)(local_210 + lVar1)); lVar1 = lVar1 + -0x78; } while (lVar1 != -0x78); /* try { // try from 00128669 to 0012867f has its CatchHandler @ 0012869f */ common_chat_apply_template_abi_cxx11_ (param_1,(vector *)CONCAT71(in_register_00000031,param_2),SUB81(local_228,0),true); std::vector<common_chat_msg,std::allocator<common_chat_msg>>::~vector(local_228); return param_1; }
10,373
pvio_socket_set_timeout
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
my_bool pvio_socket_set_timeout(MARIADB_PVIO *pvio, enum enum_pvio_timeout type, int timeout) { struct st_pvio_socket *csock= NULL; if (!pvio) return 1; csock= (struct st_pvio_socket *)pvio->data; pvio->timeout[type]= (timeout > 0) ? timeout * 1000 : -1; if (csock) return pvio_socket_change_timeout(pvio, type, timeout * 1000); return 0; }
O3
c
pvio_socket_set_timeout: pushq %rbp movq %rsp, %rbp testq %rdi, %rdi je 0x2f2dd movl %edx, %eax imull $0x3e8, %edx, %edx # imm = 0x3E8 testl %eax, %eax movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmovgl %edx, %eax movl %esi, %ecx cmpq $0x0, (%rdi) movl %eax, 0x24(%rdi,%rcx,4) je 0x2f2e1 popq %rbp jmp 0x2ff34 movb $0x1, %al jmp 0x2f2e3 xorl %eax, %eax popq %rbp retq
pvio_socket_set_timeout: push rbp mov rbp, rsp test rdi, rdi jz short loc_2F2DD mov eax, edx imul edx, 3E8h test eax, eax mov eax, 0FFFFFFFFh cmovg eax, edx mov ecx, esi cmp qword ptr [rdi], 0 mov [rdi+rcx*4+24h], eax jz short loc_2F2E1 pop rbp jmp pvio_socket_change_timeout loc_2F2DD: mov al, 1 jmp short loc_2F2E3 loc_2F2E1: xor eax, eax loc_2F2E3: pop rbp retn
char pvio_socket_set_timeout(_QWORD *a1, unsigned int a2, int a3) { int v4; // edx bool v5; // cc int v6; // eax bool v7; // zf if ( !a1 ) return 1; v4 = 1000 * a3; v5 = a3 <= 0; v6 = -1; if ( !v5 ) v6 = v4; v7 = *a1 == 0LL; *((_DWORD *)a1 + a2 + 9) = v6; if ( v7 ) return 0; else return pvio_socket_change_timeout(); }
pvio_socket_set_timeout: PUSH RBP MOV RBP,RSP TEST RDI,RDI JZ 0x0012f2dd MOV EAX,EDX IMUL EDX,EDX,0x3e8 TEST EAX,EAX MOV EAX,0xffffffff CMOVG EAX,EDX MOV ECX,ESI CMP qword ptr [RDI],0x0 MOV dword ptr [RDI + RCX*0x4 + 0x24],EAX JZ 0x0012f2e1 POP RBP JMP 0x0012ff34 LAB_0012f2dd: MOV AL,0x1 JMP 0x0012f2e3 LAB_0012f2e1: XOR EAX,EAX LAB_0012f2e3: POP RBP RET
int8 pvio_socket_set_timeout(long *param_1,uint param_2,int param_3) { long lVar1; int iVar2; int8 uVar3; if (param_1 == (long *)0x0) { uVar3 = 1; } else { iVar2 = -1; if (0 < param_3) { iVar2 = param_3 * 1000; } lVar1 = *param_1; *(int *)((long)param_1 + (ulong)param_2 * 4 + 0x24) = iVar2; if (lVar1 != 0) { uVar3 = pvio_socket_change_timeout(); return uVar3; } uVar3 = 0; } return uVar3; }
10,374
LoadUTF8
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtext.c
char *LoadUTF8(const int *codepoints, int length) { // We allocate enough memory to fit all possible codepoints // NOTE: 5 bytes for every codepoint should be enough char *text = (char *)RL_CALLOC(length*5, 1); const char *utf8 = NULL; int size = 0; for (int i = 0, bytes = 0; i < length; i++) { utf8 = CodepointToUTF8(codepoints[i], &bytes); memcpy(text + size, utf8, bytes); size += bytes; } // Resize memory to text length + string NULL terminator void *ptr = RL_REALLOC(text, size + 1); if (ptr != NULL) text = (char *)ptr; return text; }
O0
c
LoadUTF8: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) imull $0x5, -0xc(%rbp), %eax movslq %eax, %rdi movl $0x1, %esi callq 0xa340 movq %rax, -0x18(%rbp) movq $0x0, -0x20(%rbp) movl $0x0, -0x24(%rbp) movl $0x0, -0x28(%rbp) movl $0x0, -0x2c(%rbp) movl -0x28(%rbp), %eax cmpl -0xc(%rbp), %eax jge 0xe778d movq -0x8(%rbp), %rax movslq -0x28(%rbp), %rcx movl (%rax,%rcx,4), %edi leaq -0x2c(%rbp), %rsi callq 0xe77c0 movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rdi movslq -0x24(%rbp), %rax addq %rax, %rdi movq -0x20(%rbp), %rsi movslq -0x2c(%rbp), %rdx callq 0xa400 movl -0x2c(%rbp), %eax addl -0x24(%rbp), %eax movl %eax, -0x24(%rbp) movl -0x28(%rbp), %eax addl $0x1, %eax movl %eax, -0x28(%rbp) jmp 0xe7741 movq -0x18(%rbp), %rdi movl -0x24(%rbp), %eax addl $0x1, %eax movslq %eax, %rsi callq 0xa950 movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) je 0xe77b2 movq -0x38(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopl (%rax)
LoadUTF8: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_C], esi imul eax, [rbp+var_C], 5 movsxd rdi, eax mov esi, 1 call _calloc mov [rbp+var_18], rax mov [rbp+var_20], 0 mov [rbp+var_24], 0 mov [rbp+var_28], 0 mov [rbp+var_2C], 0 loc_E7741: mov eax, [rbp+var_28] cmp eax, [rbp+var_C] jge short loc_E778D mov rax, [rbp+var_8] movsxd rcx, [rbp+var_28] mov edi, [rax+rcx*4] lea rsi, [rbp+var_2C] call CodepointToUTF8 mov [rbp+var_20], rax mov rdi, [rbp+var_18] movsxd rax, [rbp+var_24] add rdi, rax mov rsi, [rbp+var_20] movsxd rdx, [rbp+var_2C] call _memcpy mov eax, [rbp+var_2C] add eax, [rbp+var_24] mov [rbp+var_24], eax mov eax, [rbp+var_28] add eax, 1 mov [rbp+var_28], eax jmp short loc_E7741 loc_E778D: mov rdi, [rbp+var_18] mov eax, [rbp+var_24] add eax, 1 movsxd rsi, eax call _realloc mov [rbp+var_38], rax cmp [rbp+var_38], 0 jz short loc_E77B2 mov rax, [rbp+var_38] mov [rbp+var_18], rax loc_E77B2: mov rax, [rbp+var_18] add rsp, 40h pop rbp retn
long long LoadUTF8(long long a1, int a2) { long long v3; // [rsp+8h] [rbp-38h] int v4; // [rsp+14h] [rbp-2Ch] BYREF int v5; // [rsp+18h] [rbp-28h] int v6; // [rsp+1Ch] [rbp-24h] long long v7; // [rsp+20h] [rbp-20h] long long v8; // [rsp+28h] [rbp-18h] int v9; // [rsp+34h] [rbp-Ch] long long v10; // [rsp+38h] [rbp-8h] v10 = a1; v9 = a2; v8 = calloc(5 * a2, 1LL); v7 = 0LL; v6 = 0; v5 = 0; v4 = 0; while ( v5 < v9 ) { v7 = CodepointToUTF8(*(unsigned int *)(v10 + 4LL * v5), &v4); memcpy(v6 + v8, v7, v4); v6 += v4; ++v5; } v3 = realloc(v8, v6 + 1); if ( v3 ) return v3; return v8; }
LoadUTF8: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI IMUL EAX,dword ptr [RBP + -0xc],0x5 MOVSXD RDI,EAX MOV ESI,0x1 CALL 0x0010a340 MOV qword ptr [RBP + -0x18],RAX MOV qword ptr [RBP + -0x20],0x0 MOV dword ptr [RBP + -0x24],0x0 MOV dword ptr [RBP + -0x28],0x0 MOV dword ptr [RBP + -0x2c],0x0 LAB_001e7741: MOV EAX,dword ptr [RBP + -0x28] CMP EAX,dword ptr [RBP + -0xc] JGE 0x001e778d MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x28] MOV EDI,dword ptr [RAX + RCX*0x4] LEA RSI,[RBP + -0x2c] CALL 0x001e77c0 MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x18] MOVSXD RAX,dword ptr [RBP + -0x24] ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x20] MOVSXD RDX,dword ptr [RBP + -0x2c] CALL 0x0010a400 MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x28] ADD EAX,0x1 MOV dword ptr [RBP + -0x28],EAX JMP 0x001e7741 LAB_001e778d: MOV RDI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOVSXD RSI,EAX CALL 0x0010a950 MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],0x0 JZ 0x001e77b2 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x18],RAX LAB_001e77b2: MOV RAX,qword ptr [RBP + -0x18] ADD RSP,0x40 POP RBP RET
void * LoadUTF8(long param_1,int param_2) { void *pvVar1; int local_34; int local_30; int local_2c; void *local_28; void *local_20; int local_14; long local_10; local_14 = param_2; local_10 = param_1; local_20 = calloc((long)(param_2 * 5),1); local_28 = (void *)0x0; local_2c = 0; local_34 = 0; for (local_30 = 0; local_30 < local_14; local_30 = local_30 + 1) { local_28 = (void *)CodepointToUTF8(*(int4 *)(local_10 + (long)local_30 * 4),&local_34); memcpy((void *)((long)local_20 + (long)local_2c),local_28,(long)local_34); local_2c = local_34 + local_2c; } pvVar1 = realloc(local_20,(long)(local_2c + 1)); if (pvVar1 != (void *)0x0) { local_20 = pvVar1; } return local_20; }
10,375
LoadUTF8
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtext.c
char *LoadUTF8(const int *codepoints, int length) { // We allocate enough memory to fit all possible codepoints // NOTE: 5 bytes for every codepoint should be enough char *text = (char *)RL_CALLOC(length*5, 1); const char *utf8 = NULL; int size = 0; for (int i = 0, bytes = 0; i < length; i++) { utf8 = CodepointToUTF8(codepoints[i], &bytes); memcpy(text + size, utf8, bytes); size += bytes; } // Resize memory to text length + string NULL terminator void *ptr = RL_REALLOC(text, size + 1); if (ptr != NULL) text = (char *)ptr; return text; }
O3
c
LoadUTF8: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %esi, %r12d movq %rdi, %r14 leal (%r12,%r12,4), %eax movslq %eax, %rdi movl $0x1, %r15d movl $0x1, %esi callq 0xa330 movq %rax, %rbx movl $0x0, 0x4(%rsp) testl %r12d, %r12d jle 0x85ffa movl %r12d, %ebp xorl %r12d, %r12d xorl %r15d, %r15d movl (%r14,%r12,4), %edi leaq 0x4(%rsp), %rsi callq 0x8601b movslq %r15d, %r13 leaq (%rbx,%r13), %rdi movslq 0x4(%rsp), %r15 leaq 0xbed5c(%rip), %rsi # 0x144d40 movq %r15, %rdx callq 0xa410 addq %r13, %r15 incq %r12 cmpq %r12, %rbp jne 0x85fc3 incq %r15 movq %rbx, %rdi movq %r15, %rsi callq 0xa940 testq %rax, %rax cmoveq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
LoadUTF8: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r12d, esi mov r14, rdi lea eax, [r12+r12*4] movsxd rdi, eax mov r15d, 1 mov esi, 1 call _calloc mov rbx, rax mov [rsp+38h+var_34], 0 test r12d, r12d jle short loc_85FFA mov ebp, r12d xor r12d, r12d xor r15d, r15d loc_85FC3: mov edi, [r14+r12*4] lea rsi, [rsp+38h+var_34] call CodepointToUTF8 movsxd r13, r15d lea rdi, [rbx+r13] movsxd r15, [rsp+38h+var_34] lea rsi, CodepointToUTF8_utf8 mov rdx, r15 call _memcpy add r15, r13 inc r12 cmp rbp, r12 jnz short loc_85FC3 inc r15 loc_85FFA: mov rdi, rbx mov rsi, r15 call _realloc test rax, rax cmovz rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long LoadUTF8(long long a1, int a2) { long long v3; // r15 long long v4; // rbx long long v5; // r12 long long v6; // r15 long long v7; // r13 long long v8; // rdi long long v9; // r15 long long result; // rax _DWORD v11[13]; // [rsp+0h] [rbp-34h] BYREF v3 = 1LL; v4 = calloc(5 * a2, 1LL); v11[0] = 0; if ( a2 > 0 ) { v5 = 0LL; LODWORD(v6) = 0; do { CodepointToUTF8(*(unsigned int *)(a1 + 4 * v5), v11); v7 = (int)v6; v8 = v4 + (int)v6; v9 = v11[0]; memcpy(v8); v6 = v7 + v9; ++v5; } while ( a2 != v5 ); v3 = v6 + 1; } result = realloc(v4, v3); if ( !result ) return v4; return result; }
LoadUTF8: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12D,ESI MOV R14,RDI LEA EAX,[R12 + R12*0x4] MOVSXD RDI,EAX MOV R15D,0x1 MOV ESI,0x1 CALL 0x0010a330 MOV RBX,RAX MOV dword ptr [RSP + 0x4],0x0 TEST R12D,R12D JLE 0x00185ffa MOV EBP,R12D XOR R12D,R12D XOR R15D,R15D LAB_00185fc3: MOV EDI,dword ptr [R14 + R12*0x4] LEA RSI,[RSP + 0x4] CALL 0x0018601b MOVSXD R13,R15D LEA RDI,[RBX + R13*0x1] MOVSXD R15,dword ptr [RSP + 0x4] LEA RSI,[0x244d40] MOV RDX,R15 CALL 0x0010a410 ADD R15,R13 INC R12 CMP RBP,R12 JNZ 0x00185fc3 INC R15 LAB_00185ffa: MOV RDI,RBX MOV RSI,R15 CALL 0x0010a940 TEST RAX,RAX CMOVZ RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void * LoadUTF8(long param_1,uint param_2) { uint in_EAX; void *__ptr; void *pvVar1; ulong uVar2; size_t sVar3; long lVar4; int8 uStack_38; sVar3 = 1; uStack_38._0_4_ = in_EAX; __ptr = calloc((long)(int)(param_2 * 5),1); uStack_38 = (ulong)(uint)uStack_38; if (0 < (int)param_2) { uVar2 = 0; lVar4 = 0; do { CodepointToUTF8(*(int4 *)(param_1 + uVar2 * 4),(long)&uStack_38 + 4); sVar3 = (size_t)uStack_38._4_4_; memcpy((void *)((long)__ptr + (long)(int)lVar4),&CodepointToUTF8_utf8,sVar3); lVar4 = sVar3 + (long)(int)lVar4; uVar2 = uVar2 + 1; } while (param_2 != uVar2); sVar3 = lVar4 + 1; } pvVar1 = realloc(__ptr,sVar3); if (pvVar1 == (void *)0x0) { pvVar1 = __ptr; } return pvVar1; }
10,376
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValues()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp
void FVarRefinement::populateChildValues() { // // Be sure to match the same vertex ordering as Refinement, i.e. face-vertices // first vs vertex-vertices first, etc. A few optimizations within the use of // face-varying data take advantage of this assumption, and it just makes sense // to be consistent (e.g. if there is a 1-to-1 correspondence between vertices // and their FVar-values, their children will correspond). // _childFVar._valueCount = 0; if (_refinement.hasFaceVerticesFirst()) { populateChildValuesFromFaceVertices(); populateChildValuesFromEdgeVertices(); populateChildValuesFromVertexVertices(); } else { populateChildValuesFromVertexVertices(); populateChildValuesFromFaceVertices(); populateChildValuesFromEdgeVertices(); } }
O0
cpp
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValues(): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq 0x20(%rax), %rcx movl $0x0, 0x10(%rcx) movq (%rax), %rdi callq 0xce460 testb $0x1, %al jne 0xe596d jmp 0xe598a movq -0x10(%rbp), %rdi callq 0xd3170 movq -0x10(%rbp), %rdi callq 0xd53e0 movq -0x10(%rbp), %rdi callq 0xd56f0 jmp 0xe59a5 movq -0x10(%rbp), %rdi callq 0xd56f0 movq -0x10(%rbp), %rdi callq 0xd3170 movq -0x10(%rbp), %rdi callq 0xd53e0 addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement19populateChildValuesEv: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rcx, [rax+20h] mov dword ptr [rcx+10h], 0 mov rdi, [rax]; this call __ZNK10OpenSubdiv6v3_6_03Vtr8internal10Refinement20hasFaceVerticesFirstEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::hasFaceVerticesFirst(void) test al, 1 jnz short loc_E596D jmp short loc_E598A loc_E596D: mov rdi, [rbp+var_10]; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement35populateChildValuesFromFaceVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromFaceVertices(void) mov rdi, [rbp+var_10]; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement35populateChildValuesFromEdgeVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromEdgeVertices(void) mov rdi, [rbp+var_10]; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement37populateChildValuesFromVertexVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromVertexVertices(void) jmp short loc_E59A5 loc_E598A: mov rdi, [rbp+var_10]; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement37populateChildValuesFromVertexVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromVertexVertices(void) mov rdi, [rbp+var_10]; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement35populateChildValuesFromFaceVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromFaceVertices(void) mov rdi, [rbp+var_10]; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement35populateChildValuesFromEdgeVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromEdgeVertices(void) loc_E59A5: add rsp, 10h pop rbp retn
long long OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValues( OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement *this) { *(_DWORD *)(*((_QWORD *)this + 4) + 16LL) = 0; if ( (OpenSubdiv::v3_6_0::Vtr::internal::Refinement::hasFaceVerticesFirst(*(OpenSubdiv::v3_6_0::Vtr::internal::Refinement **)this) & 1) != 0 ) { OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromFaceVertices(this); OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromEdgeVertices(this); return OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromVertexVertices(this); } else { OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromVertexVertices(this); OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromFaceVertices(this); return OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromEdgeVertices(this); } }
populateChildValues: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RCX,qword ptr [RAX + 0x20] MOV dword ptr [RCX + 0x10],0x0 MOV RDI,qword ptr [RAX] CALL 0x001ce460 TEST AL,0x1 JNZ 0x001e596d JMP 0x001e598a LAB_001e596d: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001d3170 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001d53e0 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001d56f0 JMP 0x001e59a5 LAB_001e598a: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001d56f0 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001d3170 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001d53e0 LAB_001e59a5: ADD RSP,0x10 POP RBP RET
/* OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValues() */ void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValues(FVarRefinement *this) { ulong uVar1; *(int4 *)(*(long *)(this + 0x20) + 0x10) = 0; uVar1 = Refinement::hasFaceVerticesFirst(*(Refinement **)this); if ((uVar1 & 1) == 0) { populateChildValuesFromVertexVertices(this); populateChildValuesFromFaceVertices(this); populateChildValuesFromEdgeVertices(this); } else { populateChildValuesFromFaceVertices(this); populateChildValuesFromEdgeVertices(this); populateChildValuesFromVertexVertices(this); } return; }
10,377
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValues()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp
void FVarRefinement::populateChildValues() { // // Be sure to match the same vertex ordering as Refinement, i.e. face-vertices // first vs vertex-vertices first, etc. A few optimizations within the use of // face-varying data take advantage of this assumption, and it just makes sense // to be consistent (e.g. if there is a 1-to-1 correspondence between vertices // and their FVar-values, their children will correspond). // _childFVar._valueCount = 0; if (_refinement.hasFaceVerticesFirst()) { populateChildValuesFromFaceVertices(); populateChildValuesFromEdgeVertices(); populateChildValuesFromVertexVertices(); } else { populateChildValuesFromVertexVertices(); populateChildValuesFromFaceVertices(); populateChildValuesFromEdgeVertices(); } }
O1
cpp
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValues(): pushq %rbx movq %rdi, %rbx movq 0x20(%rdi), %rax movl $0x0, 0x10(%rax) movq (%rdi), %rax cmpb $0x1, 0x25(%rax) jne 0x403ad movq %rbx, %rdi callq 0x3b480 movq %rbx, %rdi callq 0x3bc50 movq %rbx, %rdi popq %rbx jmp 0x3bd00 movq %rbx, %rdi callq 0x3bd00 movq %rbx, %rdi callq 0x3b480 movq %rbx, %rdi popq %rbx jmp 0x3bc50
_ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement19populateChildValuesEv: push rbx mov rbx, rdi mov rax, [rdi+20h] mov dword ptr [rax+10h], 0 mov rax, [rdi] cmp byte ptr [rax+25h], 1 jnz short loc_403AD mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement35populateChildValuesFromFaceVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromFaceVertices(void) mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement35populateChildValuesFromEdgeVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromEdgeVertices(void) mov rdi, rbx; this pop rbx jmp __ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement37populateChildValuesFromVertexVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromVertexVertices(void) loc_403AD: mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement37populateChildValuesFromVertexVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromVertexVertices(void) mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement35populateChildValuesFromFaceVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromFaceVertices(void) mov rdi, rbx; this pop rbx jmp __ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement35populateChildValuesFromEdgeVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromEdgeVertices(void)
long long OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValues( OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement *this) { *(_DWORD *)(*((_QWORD *)this + 4) + 16LL) = 0; if ( *(_BYTE *)(*(_QWORD *)this + 37LL) == 1 ) { OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromFaceVertices(this); OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromEdgeVertices(this); return OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromVertexVertices(this); } else { OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromVertexVertices(this); OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromFaceVertices(this); return OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromEdgeVertices(this); } }
populateChildValues: PUSH RBX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x20] MOV dword ptr [RAX + 0x10],0x0 MOV RAX,qword ptr [RDI] CMP byte ptr [RAX + 0x25],0x1 JNZ 0x001403ad MOV RDI,RBX CALL 0x0013b480 MOV RDI,RBX CALL 0x0013bc50 MOV RDI,RBX POP RBX JMP 0x0013bd00 LAB_001403ad: MOV RDI,RBX CALL 0x0013bd00 MOV RDI,RBX CALL 0x0013b480 MOV RDI,RBX POP RBX JMP 0x0013bc50
/* OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValues() */ void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValues(FVarRefinement *this) { *(int4 *)(*(long *)(this + 0x20) + 0x10) = 0; if (*(char *)(*(long *)this + 0x25) == '\x01') { populateChildValuesFromFaceVertices(this); populateChildValuesFromEdgeVertices(this); populateChildValuesFromVertexVertices(this); return; } populateChildValuesFromVertexVertices(this); populateChildValuesFromFaceVertices(this); populateChildValuesFromEdgeVertices(this); return; }
10,378
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValues()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp
void FVarRefinement::populateChildValues() { // // Be sure to match the same vertex ordering as Refinement, i.e. face-vertices // first vs vertex-vertices first, etc. A few optimizations within the use of // face-varying data take advantage of this assumption, and it just makes sense // to be consistent (e.g. if there is a 1-to-1 correspondence between vertices // and their FVar-values, their children will correspond). // _childFVar._valueCount = 0; if (_refinement.hasFaceVerticesFirst()) { populateChildValuesFromFaceVertices(); populateChildValuesFromEdgeVertices(); populateChildValuesFromVertexVertices(); } else { populateChildValuesFromVertexVertices(); populateChildValuesFromFaceVertices(); populateChildValuesFromEdgeVertices(); } }
O2
cpp
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValues(): pushq %rbx movq %rdi, %rbx movq 0x20(%rdi), %rax andl $0x0, 0x10(%rax) movq (%rdi), %rax cmpb $0x1, 0x25(%rax) jne 0x595ea movq %rbx, %rdi callq 0x54530 movq %rbx, %rdi callq 0x55170 movq %rbx, %rdi popq %rbx jmp 0x55260 movq %rbx, %rdi callq 0x55260 movq %rbx, %rdi callq 0x54530 movq %rbx, %rdi popq %rbx jmp 0x55170 nop
_ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement19populateChildValuesEv: push rbx mov rbx, rdi mov rax, [rdi+20h] and dword ptr [rax+10h], 0 mov rax, [rdi] cmp byte ptr [rax+25h], 1 jnz short loc_595EA mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement35populateChildValuesFromFaceVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromFaceVertices(void) mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement35populateChildValuesFromEdgeVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromEdgeVertices(void) mov rdi, rbx; this pop rbx jmp __ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement37populateChildValuesFromVertexVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromVertexVertices(void) loc_595EA: mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement37populateChildValuesFromVertexVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromVertexVertices(void) mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement35populateChildValuesFromFaceVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromFaceVertices(void) mov rdi, rbx; this pop rbx jmp __ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement35populateChildValuesFromEdgeVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromEdgeVertices(void)
long long OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValues( OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement *this) { *(_DWORD *)(*((_QWORD *)this + 4) + 16LL) = 0; if ( *(_BYTE *)(*(_QWORD *)this + 37LL) == 1 ) { OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromFaceVertices(this); OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromEdgeVertices(this); return OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromVertexVertices(this); } else { OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromVertexVertices(this); OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromFaceVertices(this); return OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesFromEdgeVertices(this); } }
populateChildValues: PUSH RBX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x20] AND dword ptr [RAX + 0x10],0x0 MOV RAX,qword ptr [RDI] CMP byte ptr [RAX + 0x25],0x1 JNZ 0x001595ea MOV RDI,RBX CALL 0x00154530 MOV RDI,RBX CALL 0x00155170 MOV RDI,RBX POP RBX JMP 0x00155260 LAB_001595ea: MOV RDI,RBX CALL 0x00155260 MOV RDI,RBX CALL 0x00154530 MOV RDI,RBX POP RBX JMP 0x00155170
/* OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValues() */ void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValues(FVarRefinement *this) { *(int4 *)(*(long *)(this + 0x20) + 0x10) = 0; if (*(char *)(*(long *)this + 0x25) == '\x01') { populateChildValuesFromFaceVertices(this); populateChildValuesFromEdgeVertices(this); populateChildValuesFromVertexVertices(this); return; } populateChildValuesFromVertexVertices(this); populateChildValuesFromFaceVertices(this); populateChildValuesFromEdgeVertices(this); return; }
10,379
google::protobuf::RepeatedField<double>::operator=(google::protobuf::RepeatedField<double> const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/repeated_field.h
inline RepeatedField<Element>& RepeatedField<Element>::operator=( const RepeatedField& other) { if (this != &other) CopyFrom(other); return *this; }
O3
c
google::protobuf::RepeatedField<double>::operator=(google::protobuf::RepeatedField<double> const&): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx cmpq %rsi, %rdi je 0xa5182 movq %rsi, %r14 movl $0x0, (%rbx) movl (%rsi), %esi testl %esi, %esi je 0xa5182 movq %rbx, %rdi callq 0xa5098 movl (%r14), %eax movq 0x8(%rbx), %rdi addl %eax, (%rbx) movq 0x8(%r14), %rsi movslq (%r14), %rdx shlq $0x3, %rdx callq 0xf2f0 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN6google8protobuf13RepeatedFieldIdEaSERKS2_: push r14 push rbx push rax mov rbx, rdi cmp rdi, rsi jz short loc_A5182 mov r14, rsi mov dword ptr [rbx], 0 mov esi, [rsi] test esi, esi jz short loc_A5182 mov rdi, rbx call _ZN6google8protobuf13RepeatedFieldIdE7ReserveEi; google::protobuf::RepeatedField<double>::Reserve(int) mov eax, [r14] mov rdi, [rbx+8] add [rbx], eax mov rsi, [r14+8] movsxd rdx, dword ptr [r14] shl rdx, 3 call _memcpy loc_A5182: mov rax, rbx add rsp, 8 pop rbx pop r14 retn
long long google::protobuf::RepeatedField<double>::operator=(long long a1, int *a2) { int v4; // esi long long v5; // rdi if ( (int *)a1 != a2 ) { *(_DWORD *)a1 = 0; v4 = *a2; if ( v4 ) { google::protobuf::RepeatedField<double>::Reserve((int *)a1, v4); v5 = *(_QWORD *)(a1 + 8); *(_DWORD *)a1 += *a2; memcpy(v5); } } return a1; }
operator=: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI CMP RDI,RSI JZ 0x001a5182 MOV R14,RSI MOV dword ptr [RBX],0x0 MOV ESI,dword ptr [RSI] TEST ESI,ESI JZ 0x001a5182 MOV RDI,RBX CALL 0x001a5098 MOV EAX,dword ptr [R14] MOV RDI,qword ptr [RBX + 0x8] ADD dword ptr [RBX],EAX MOV RSI,qword ptr [R14 + 0x8] MOVSXD RDX,dword ptr [R14] SHL RDX,0x3 CALL 0x0010f2f0 LAB_001a5182: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* google::protobuf::RepeatedField<double>::TEMPNAMEPLACEHOLDERVALUE(google::protobuf::RepeatedField<double> const&) */ RepeatedField<double> * __thiscall google::protobuf::RepeatedField<double>::operator= (RepeatedField<double> *this,RepeatedField *param_1) { if (this != (RepeatedField<double> *)param_1) { *(int4 *)this = 0; if (*(int *)param_1 != 0) { Reserve(this,*(int *)param_1); *(int *)this = *(int *)this + *(int *)param_1; memcpy(*(void **)(this + 8),*(void **)(param_1 + 8),(long)*(int *)param_1 << 3); } } return this; }
10,380
rw_pr_unlock
eloqsql/mysys/thr_rwlock.c
int rw_pr_unlock(rw_pr_lock_t *rwlock) { if (rwlock->active_writer) { /* We are unlocking wr-lock. */ #ifdef SAFE_MUTEX rwlock->writer_thread= 0; #endif rwlock->active_writer= FALSE; if (rwlock->writers_waiting_readers) { /* Avoid expensive cond signal in case when there is no contention or it is wr-only. Note that from view point of performance it would be better to signal on the condition variable after unlocking mutex (as it reduces number of contex switches). Unfortunately this would mean that such rwlock can't be safely used by MDL subsystem, which relies on the fact that it is OK to destroy rwlock once it is in unlocked state. */ pthread_cond_signal(&rwlock->no_active_readers); } pthread_mutex_unlock(&rwlock->lock); } else { /* We are unlocking rd-lock. */ pthread_mutex_lock(&rwlock->lock); rwlock->active_readers--; if (rwlock->active_readers == 0 && rwlock->writers_waiting_readers) { /* If we are last reader and there are waiting writers wake them up. */ pthread_cond_signal(&rwlock->no_active_readers); } pthread_mutex_unlock(&rwlock->lock); } return 0; }
O0
c
rw_pr_unlock: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpb $0x0, 0x60(%rax) je 0xfa370 movq -0x8(%rbp), %rax movb $0x0, 0x60(%rax) movq -0x8(%rbp), %rax cmpl $0x0, 0x5c(%rax) je 0xfa365 movq -0x8(%rbp), %rdi addq $0x28, %rdi callq 0x2a580 movq -0x8(%rbp), %rdi callq 0x2a1f0 jmp 0xfa3b0 movq -0x8(%rbp), %rdi callq 0x2a220 movq -0x8(%rbp), %rax movl 0x58(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x58(%rax) movq -0x8(%rbp), %rax cmpl $0x0, 0x58(%rax) jne 0xfa3a7 movq -0x8(%rbp), %rax cmpl $0x0, 0x5c(%rax) je 0xfa3a7 movq -0x8(%rbp), %rdi addq $0x28, %rdi callq 0x2a580 movq -0x8(%rbp), %rdi callq 0x2a1f0 xorl %eax, %eax addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
rw_pr_unlock: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp byte ptr [rax+60h], 0 jz short loc_FA370 mov rax, [rbp+var_8] mov byte ptr [rax+60h], 0 mov rax, [rbp+var_8] cmp dword ptr [rax+5Ch], 0 jz short loc_FA365 mov rdi, [rbp+var_8] add rdi, 28h ; '(' call _pthread_cond_signal loc_FA365: mov rdi, [rbp+var_8] call _pthread_mutex_unlock jmp short loc_FA3B0 loc_FA370: mov rdi, [rbp+var_8] call _pthread_mutex_lock mov rax, [rbp+var_8] mov ecx, [rax+58h] add ecx, 0FFFFFFFFh mov [rax+58h], ecx mov rax, [rbp+var_8] cmp dword ptr [rax+58h], 0 jnz short loc_FA3A7 mov rax, [rbp+var_8] cmp dword ptr [rax+5Ch], 0 jz short loc_FA3A7 mov rdi, [rbp+var_8] add rdi, 28h ; '(' call _pthread_cond_signal loc_FA3A7: mov rdi, [rbp+var_8] call _pthread_mutex_unlock loc_FA3B0: xor eax, eax add rsp, 10h pop rbp retn
long long rw_pr_unlock(long long a1) { if ( *(_BYTE *)(a1 + 96) ) { *(_BYTE *)(a1 + 96) = 0; if ( *(_DWORD *)(a1 + 92) ) pthread_cond_signal(a1 + 40); } else { pthread_mutex_lock(a1); if ( !--*(_DWORD *)(a1 + 88) && *(_DWORD *)(a1 + 92) ) pthread_cond_signal(a1 + 40); } pthread_mutex_unlock(a1); return 0LL; }
rw_pr_unlock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x60],0x0 JZ 0x001fa370 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x60],0x0 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x5c],0x0 JZ 0x001fa365 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 CALL 0x0012a580 LAB_001fa365: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012a1f0 JMP 0x001fa3b0 LAB_001fa370: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012a220 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x58] ADD ECX,-0x1 MOV dword ptr [RAX + 0x58],ECX MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x58],0x0 JNZ 0x001fa3a7 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x5c],0x0 JZ 0x001fa3a7 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 CALL 0x0012a580 LAB_001fa3a7: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012a1f0 LAB_001fa3b0: XOR EAX,EAX ADD RSP,0x10 POP RBP RET
int8 rw_pr_unlock(pthread_mutex_t *param_1) { if (*(char *)((long)param_1 + 0x60) == '\0') { pthread_mutex_lock(param_1); *(int *)((long)param_1 + 0x58) = *(int *)((long)param_1 + 0x58) + -1; if ((*(int *)((long)param_1 + 0x58) == 0) && (*(int *)((long)param_1 + 0x5c) != 0)) { pthread_cond_signal((pthread_cond_t *)(param_1 + 1)); } pthread_mutex_unlock(param_1); } else { *(int1 *)((long)param_1 + 0x60) = 0; if (*(int *)((long)param_1 + 0x5c) != 0) { pthread_cond_signal((pthread_cond_t *)(param_1 + 1)); } pthread_mutex_unlock(param_1); } return 0; }
10,381
sd_get_system_info
7CodeWizard[P]stablediffusion/util.cpp
const char* sd_get_system_info() { static char buffer[1024]; std::stringstream ss; ss << "System Info: \n"; ss << " BLAS = " << ggml_cpu_has_blas() << std::endl; ss << " SSE3 = " << ggml_cpu_has_sse3() << std::endl; ss << " AVX = " << ggml_cpu_has_avx() << std::endl; ss << " AVX2 = " << ggml_cpu_has_avx2() << std::endl; ss << " AVX512 = " << ggml_cpu_has_avx512() << std::endl; ss << " AVX512_VBMI = " << ggml_cpu_has_avx512_vbmi() << std::endl; ss << " AVX512_VNNI = " << ggml_cpu_has_avx512_vnni() << std::endl; ss << " FMA = " << ggml_cpu_has_fma() << std::endl; ss << " NEON = " << ggml_cpu_has_neon() << std::endl; ss << " ARM_FMA = " << ggml_cpu_has_arm_fma() << std::endl; ss << " F16C = " << ggml_cpu_has_f16c() << std::endl; ss << " FP16_VA = " << ggml_cpu_has_fp16_va() << std::endl; ss << " WASM_SIMD = " << ggml_cpu_has_wasm_simd() << std::endl; ss << " VSX = " << ggml_cpu_has_vsx() << std::endl; snprintf(buffer, sizeof(buffer), "%s", ss.str().c_str()); return buffer; }
O1
cpp
sd_get_system_info: pushq %r14 pushq %rbx subq $0x1a8, %rsp # imm = 0x1A8 leaq 0x20(%rsp), %rdi callq 0xa3f0 leaq 0x30(%rsp), %rbx leaq 0x48e74(%rip), %rsi # 0xc3538 movl $0xe, %edx movq %rbx, %rdi callq 0xa6a0 leaq 0x48e6f(%rip), %rsi # 0xc3547 movl $0xb, %edx movq %rbx, %rdi callq 0xa6a0 callq 0x9ee21 movq %rbx, %rdi movl %eax, %esi callq 0xaa90 movq %rax, %r14 movq (%rax), %rax movq -0x18(%rax), %rdi addq %r14, %rdi movl $0xa, %esi callq 0xa5b0 movsbl %al, %esi movq %r14, %rdi callq 0xa050 movq %rax, %rdi callq 0xa3d0 leaq 0x48e2e(%rip), %rsi # 0xc3553 movl $0xb, %edx movq %rbx, %rdi callq 0xa6a0 callq 0x9ee2d movq %rbx, %rdi movl %eax, %esi callq 0xaa90 movq %rax, %r14 movq (%rax), %rax movq -0x18(%rax), %rdi addq %r14, %rdi movl $0xa, %esi callq 0xa5b0 movsbl %al, %esi movq %r14, %rdi callq 0xa050 movq %rax, %rdi callq 0xa3d0 leaq 0x48ded(%rip), %rsi # 0xc355f movl $0xa, %edx movq %rbx, %rdi callq 0xa6a0 callq 0x9edee movq %rbx, %rdi movl %eax, %esi callq 0xaa90 movq %rax, %r14 movq (%rax), %rax movq -0x18(%rax), %rdi addq %r14, %rdi movl $0xa, %esi callq 0xa5b0 movsbl %al, %esi movq %r14, %rdi callq 0xa050 movq %rax, %rdi callq 0xa3d0 leaq 0x48dab(%rip), %rsi # 0xc356a movl $0xb, %edx movq %rbx, %rdi callq 0xa6a0 callq 0x9edf7 movq %rbx, %rdi movl %eax, %esi callq 0xaa90 movq %rax, %r14 movq (%rax), %rax movq -0x18(%rax), %rdi addq %r14, %rdi movl $0xa, %esi callq 0xa5b0 movsbl %al, %esi movq %r14, %rdi callq 0xa050 movq %rax, %rdi callq 0xa3d0 leaq 0x48d6a(%rip), %rsi # 0xc3576 movl $0xd, %edx movq %rbx, %rdi callq 0xa6a0 callq 0x9edfd movq %rbx, %rdi movl %eax, %esi callq 0xaa90 movq %rax, %r14 movq (%rax), %rax movq -0x18(%rax), %rdi addq %r14, %rdi movl $0xa, %esi callq 0xa5b0 movsbl %al, %esi movq %r14, %rdi callq 0xa050 movq %rax, %rdi callq 0xa3d0 leaq 0x48d2b(%rip), %rsi # 0xc3584 movl $0x12, %edx movq %rbx, %rdi callq 0xa6a0 callq 0x9ee00 movq %rbx, %rdi movl %eax, %esi callq 0xaa90 movq %rax, %r14 movq (%rax), %rax movq -0x18(%rax), %rdi addq %r14, %rdi movl $0xa, %esi callq 0xa5b0 movsbl %al, %esi movq %r14, %rdi callq 0xa050 movq %rax, %rdi callq 0xa3d0 leaq 0x48cf1(%rip), %rsi # 0xc3597 movl $0x12, %edx movq %rbx, %rdi callq 0xa6a0 callq 0x9ee03 movq %rbx, %rdi movl %eax, %esi callq 0xaa90 movq %rax, %r14 movq (%rax), %rax movq -0x18(%rax), %rdi addq %r14, %rdi movl $0xa, %esi callq 0xa5b0 movsbl %al, %esi movq %r14, %rdi callq 0xa050 movq %rax, %rdi callq 0xa3d0 leaq 0x48cb7(%rip), %rsi # 0xc35aa movl $0xa, %edx movq %rbx, %rdi callq 0xa6a0 callq 0x9ee06 movq %rbx, %rdi movl %eax, %esi callq 0xaa90 movq %rax, %r14 movq (%rax), %rax movq -0x18(%rax), %rdi addq %r14, %rdi movl $0xa, %esi callq 0xa5b0 movsbl %al, %esi movq %r14, %rdi callq 0xa050 movq %rax, %rdi callq 0xa3d0 leaq 0x48c75(%rip), %rsi # 0xc35b5 movl $0xb, %edx movq %rbx, %rdi callq 0xa6a0 callq 0x9ee0c movq %rbx, %rdi movl %eax, %esi callq 0xaa90 movq %rax, %r14 movq (%rax), %rax movq -0x18(%rax), %rdi addq %r14, %rdi movl $0xa, %esi callq 0xa5b0 movsbl %al, %esi movq %r14, %rdi callq 0xa050 movq %rax, %rdi callq 0xa3d0 leaq 0x48c34(%rip), %rsi # 0xc35c1 movl $0xe, %edx movq %rbx, %rdi callq 0xa6a0 callq 0x9ee0f movq %rbx, %rdi movl %eax, %esi callq 0xaa90 movq %rax, %r14 movq (%rax), %rax movq -0x18(%rax), %rdi addq %r14, %rdi movl $0xa, %esi callq 0xa5b0 movsbl %al, %esi movq %r14, %rdi callq 0xa050 movq %rax, %rdi callq 0xa3d0 leaq 0x48bf6(%rip), %rsi # 0xc35d0 movl $0xb, %edx movq %rbx, %rdi callq 0xa6a0 callq 0x9ee15 movq %rbx, %rdi movl %eax, %esi callq 0xaa90 movq %rax, %r14 movq (%rax), %rax movq -0x18(%rax), %rdi addq %r14, %rdi movl $0xa, %esi callq 0xa5b0 movsbl %al, %esi movq %r14, %rdi callq 0xa050 movq %rax, %rdi callq 0xa3d0 leaq 0x48bb5(%rip), %rsi # 0xc35dc movl $0xe, %edx movq %rbx, %rdi callq 0xa6a0 callq 0x9ee1b movq %rbx, %rdi movl %eax, %esi callq 0xaa90 movq %rax, %r14 movq (%rax), %rax movq -0x18(%rax), %rdi addq %r14, %rdi movl $0xa, %esi callq 0xa5b0 movsbl %al, %esi movq %r14, %rdi callq 0xa050 movq %rax, %rdi callq 0xa3d0 leaq 0x48b77(%rip), %rsi # 0xc35eb movl $0x10, %edx movq %rbx, %rdi callq 0xa6a0 callq 0x9ee1e movq %rbx, %rdi movl %eax, %esi callq 0xaa90 movq %rax, %r14 movq (%rax), %rax movq -0x18(%rax), %rdi addq %r14, %rdi movl $0xa, %esi callq 0xa5b0 movsbl %al, %esi movq %r14, %rdi callq 0xa050 movq %rax, %rdi callq 0xa3d0 leaq 0x48b3b(%rip), %rsi # 0xc35fc movl $0xa, %edx movq %rbx, %rdi callq 0xa6a0 callq 0x9ee39 movq %rbx, %rdi movl %eax, %esi callq 0xaa90 movq %rax, %rbx movq (%rax), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0xa5b0 movsbl %al, %esi movq %rbx, %rdi callq 0xa050 movq %rax, %rdi callq 0xa3d0 leaq 0x38(%rsp), %rsi movq %rsp, %rdi callq 0xa9c0 leaq 0x10(%rsp), %rbx movq -0x10(%rbx), %rcx leaq 0xfdaec(%rip), %rdi # 0x178610 leaq 0x4359f(%rip), %rdx # 0xbe0ca movl $0x400, %esi # imm = 0x400 xorl %eax, %eax callq 0xa9d0 movq -0x10(%rbx), %rdi cmpq %rbx, %rdi je 0x7ab4d movq 0x10(%rsp), %rsi incq %rsi callq 0xa5e0 movq 0x7c414(%rip), %rsi # 0xf6f68 leaq 0x20(%rsp), %rdi callq 0xa430 leaq 0xa0(%rsp), %rdi callq 0xa1a0 leaq 0xfda9e(%rip), %rax # 0x178610 addq $0x1a8, %rsp # imm = 0x1A8 popq %rbx popq %r14 retq jmp 0x7ab7f movq %rax, %rbx movq 0x7c3df(%rip), %rsi # 0xf6f68 leaq 0x20(%rsp), %rdi callq 0xa430 leaq 0xa0(%rsp), %rdi callq 0xa1a0 movq %rbx, %rdi callq 0xaae0
sd_get_system_info: push r14 push rbx sub rsp, 1A8h lea rdi, [rsp+1B8h+var_198] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea rbx, [rsp+1B8h+var_188] lea rsi, aSystemInfo; "System Info: \n" mov edx, 0Eh 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 rsi, aBlas; " BLAS = " mov edx, 0Bh 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) call ggml_cpu_has_blas mov rdi, rbx mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov r14, rax mov rax, [rax] mov rdi, [rax-18h] add rdi, r14 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, r14; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) lea rsi, aSse3; " SSE3 = " mov edx, 0Bh 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) call ggml_cpu_has_sse3 mov rdi, rbx mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov r14, rax mov rax, [rax] mov rdi, [rax-18h] add rdi, r14 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, r14; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) lea rsi, aAvx; " AVX = " mov edx, 0Ah 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) call ggml_cpu_has_avx mov rdi, rbx mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov r14, rax mov rax, [rax] mov rdi, [rax-18h] add rdi, r14 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, r14; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) lea rsi, aAvx2; " AVX2 = " mov edx, 0Bh 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) call ggml_cpu_has_avx2 mov rdi, rbx mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov r14, rax mov rax, [rax] mov rdi, [rax-18h] add rdi, r14 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, r14; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) lea rsi, aAvx512; " AVX512 = " mov edx, 0Dh 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) call ggml_cpu_has_avx512 mov rdi, rbx mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov r14, rax mov rax, [rax] mov rdi, [rax-18h] add rdi, r14 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, r14; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) lea rsi, aAvx512Vbmi; " AVX512_VBMI = " mov edx, 12h 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) call ggml_cpu_has_avx512_vbmi mov rdi, rbx mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov r14, rax mov rax, [rax] mov rdi, [rax-18h] add rdi, r14 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, r14; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) lea rsi, aAvx512Vnni; " AVX512_VNNI = " mov edx, 12h 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) call ggml_cpu_has_avx512_vnni mov rdi, rbx mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov r14, rax mov rax, [rax] mov rdi, [rax-18h] add rdi, r14 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, r14; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) lea rsi, aFma; " FMA = " mov edx, 0Ah 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) call ggml_cpu_has_fma mov rdi, rbx mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov r14, rax mov rax, [rax] mov rdi, [rax-18h] add rdi, r14 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, r14; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) lea rsi, aNeon; " NEON = " mov edx, 0Bh 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) call ggml_cpu_has_neon mov rdi, rbx mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov r14, rax mov rax, [rax] mov rdi, [rax-18h] add rdi, r14 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, r14; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) lea rsi, aArmFma; " ARM_FMA = " mov edx, 0Eh 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) call ggml_cpu_has_arm_fma mov rdi, rbx mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov r14, rax mov rax, [rax] mov rdi, [rax-18h] add rdi, r14 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, r14; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) lea rsi, aF16c; " F16C = " mov edx, 0Bh 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) call ggml_cpu_has_f16c mov rdi, rbx mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov r14, rax mov rax, [rax] mov rdi, [rax-18h] add rdi, r14 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, r14; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) lea rsi, aFp16Va; " FP16_VA = " mov edx, 0Eh 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) call ggml_cpu_has_fp16_va mov rdi, rbx mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov r14, rax mov rax, [rax] mov rdi, [rax-18h] add rdi, r14 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, r14; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) lea rsi, aWasmSimd; " WASM_SIMD = " mov edx, 10h 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) call ggml_cpu_has_wasm_simd mov rdi, rbx mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov r14, rax mov rax, [rax] mov rdi, [rax-18h] add rdi, r14 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, r14; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) lea rsi, aVsx; " VSX = " mov edx, 0Ah 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) call ggml_cpu_has_vsx mov rdi, rbx mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov rbx, rax mov rax, [rax] mov rdi, [rax-18h] add rdi, rbx mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, rbx; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) lea rsi, [rsp+1B8h+var_180] mov rdi, rsp call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) lea rbx, [rsp+1B8h+var_1A8] mov rcx, [rbx-10h] lea rdi, _ZZ18sd_get_system_infoE6buffer; sd_get_system_info::buffer lea rdx, aStableDiffusio_0+1Eh; "%s" mov esi, 400h xor eax, eax call _snprintf mov rdi, [rbx-10h]; void * cmp rdi, rbx jz short loc_7AB4D mov rsi, [rsp+1B8h+var_1A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7AB4D: mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+1B8h+var_198] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+1B8h+var_118]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() lea rax, _ZZ18sd_get_system_infoE6buffer; sd_get_system_info::buffer add rsp, 1A8h pop rbx pop r14 retn jmp short $+2 loc_7AB7F: mov rbx, rax mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_18] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+arg_98]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
void * sd_get_system_info() { unsigned int has_blas; // eax std::ostream *v1; // r14 char v2; // al std::ostream *v3; // rax unsigned int has_sse3; // eax std::ostream *v5; // r14 char v6; // al std::ostream *v7; // rax unsigned int has_avx; // eax std::ostream *v9; // r14 char v10; // al std::ostream *v11; // rax unsigned int has_avx2; // eax std::ostream *v13; // r14 char v14; // al std::ostream *v15; // rax unsigned int has_avx512; // eax std::ostream *v17; // r14 char v18; // al std::ostream *v19; // rax unsigned int has_avx512_vbmi; // eax std::ostream *v21; // r14 char v22; // al std::ostream *v23; // rax unsigned int has_avx512_vnni; // eax std::ostream *v25; // r14 char v26; // al std::ostream *v27; // rax unsigned int has_fma; // eax std::ostream *v29; // r14 char v30; // al std::ostream *v31; // rax unsigned int has_neon; // eax std::ostream *v33; // r14 char v34; // al std::ostream *v35; // rax unsigned int has_arm_fma; // eax std::ostream *v37; // r14 char v38; // al std::ostream *v39; // rax unsigned int has_f16c; // eax std::ostream *v41; // r14 char v42; // al std::ostream *v43; // rax unsigned int has_fp16_va; // eax std::ostream *v45; // r14 char v46; // al std::ostream *v47; // rax unsigned int has_wasm_simd; // eax std::ostream *v49; // r14 char v50; // al std::ostream *v51; // rax unsigned int has_vsx; // eax std::ostream *v53; // rbx char v54; // al std::ostream *v55; // rax char *v57; // [rsp+0h] [rbp-1B8h] BYREF long long v58; // [rsp+10h] [rbp-1A8h] BYREF _BYTE v59[16]; // [rsp+20h] [rbp-198h] BYREF _BYTE v60[8]; // [rsp+30h] [rbp-188h] BYREF _BYTE v61[104]; // [rsp+38h] [rbp-180h] BYREF _BYTE v62[280]; // [rsp+A0h] [rbp-118h] BYREF std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v59); std::__ostream_insert<char,std::char_traits<char>>(v60, "System Info: \n", 14LL); std::__ostream_insert<char,std::char_traits<char>>(v60, " BLAS = ", 11LL); has_blas = ggml_cpu_has_blas(); v1 = (std::ostream *)std::ostream::operator<<(v60, has_blas); v2 = std::ios::widen((char *)v1 + *(_QWORD *)(*(_QWORD *)v1 - 24LL), 10LL); v3 = (std::ostream *)std::ostream::put(v1, v2); std::ostream::flush(v3); std::__ostream_insert<char,std::char_traits<char>>(v60, " SSE3 = ", 11LL); has_sse3 = ggml_cpu_has_sse3(); v5 = (std::ostream *)std::ostream::operator<<(v60, has_sse3); v6 = std::ios::widen((char *)v5 + *(_QWORD *)(*(_QWORD *)v5 - 24LL), 10LL); v7 = (std::ostream *)std::ostream::put(v5, v6); std::ostream::flush(v7); std::__ostream_insert<char,std::char_traits<char>>(v60, " AVX = ", 10LL); has_avx = ggml_cpu_has_avx(); v9 = (std::ostream *)std::ostream::operator<<(v60, has_avx); v10 = std::ios::widen((char *)v9 + *(_QWORD *)(*(_QWORD *)v9 - 24LL), 10LL); v11 = (std::ostream *)std::ostream::put(v9, v10); std::ostream::flush(v11); std::__ostream_insert<char,std::char_traits<char>>(v60, " AVX2 = ", 11LL); has_avx2 = ggml_cpu_has_avx2(); v13 = (std::ostream *)std::ostream::operator<<(v60, has_avx2); v14 = std::ios::widen((char *)v13 + *(_QWORD *)(*(_QWORD *)v13 - 24LL), 10LL); v15 = (std::ostream *)std::ostream::put(v13, v14); std::ostream::flush(v15); std::__ostream_insert<char,std::char_traits<char>>(v60, " AVX512 = ", 13LL); has_avx512 = ggml_cpu_has_avx512(); v17 = (std::ostream *)std::ostream::operator<<(v60, has_avx512); v18 = std::ios::widen((char *)v17 + *(_QWORD *)(*(_QWORD *)v17 - 24LL), 10LL); v19 = (std::ostream *)std::ostream::put(v17, v18); std::ostream::flush(v19); std::__ostream_insert<char,std::char_traits<char>>(v60, " AVX512_VBMI = ", 18LL); has_avx512_vbmi = ggml_cpu_has_avx512_vbmi(); v21 = (std::ostream *)std::ostream::operator<<(v60, has_avx512_vbmi); v22 = std::ios::widen((char *)v21 + *(_QWORD *)(*(_QWORD *)v21 - 24LL), 10LL); v23 = (std::ostream *)std::ostream::put(v21, v22); std::ostream::flush(v23); std::__ostream_insert<char,std::char_traits<char>>(v60, " AVX512_VNNI = ", 18LL); has_avx512_vnni = ggml_cpu_has_avx512_vnni(); v25 = (std::ostream *)std::ostream::operator<<(v60, has_avx512_vnni); v26 = std::ios::widen((char *)v25 + *(_QWORD *)(*(_QWORD *)v25 - 24LL), 10LL); v27 = (std::ostream *)std::ostream::put(v25, v26); std::ostream::flush(v27); std::__ostream_insert<char,std::char_traits<char>>(v60, " FMA = ", 10LL); has_fma = ggml_cpu_has_fma(); v29 = (std::ostream *)std::ostream::operator<<(v60, has_fma); v30 = std::ios::widen((char *)v29 + *(_QWORD *)(*(_QWORD *)v29 - 24LL), 10LL); v31 = (std::ostream *)std::ostream::put(v29, v30); std::ostream::flush(v31); std::__ostream_insert<char,std::char_traits<char>>(v60, " NEON = ", 11LL); has_neon = ggml_cpu_has_neon(); v33 = (std::ostream *)std::ostream::operator<<(v60, has_neon); v34 = std::ios::widen((char *)v33 + *(_QWORD *)(*(_QWORD *)v33 - 24LL), 10LL); v35 = (std::ostream *)std::ostream::put(v33, v34); std::ostream::flush(v35); std::__ostream_insert<char,std::char_traits<char>>(v60, " ARM_FMA = ", 14LL); has_arm_fma = ggml_cpu_has_arm_fma(); v37 = (std::ostream *)std::ostream::operator<<(v60, has_arm_fma); v38 = std::ios::widen((char *)v37 + *(_QWORD *)(*(_QWORD *)v37 - 24LL), 10LL); v39 = (std::ostream *)std::ostream::put(v37, v38); std::ostream::flush(v39); std::__ostream_insert<char,std::char_traits<char>>(v60, " F16C = ", 11LL); has_f16c = ggml_cpu_has_f16c(); v41 = (std::ostream *)std::ostream::operator<<(v60, has_f16c); v42 = std::ios::widen((char *)v41 + *(_QWORD *)(*(_QWORD *)v41 - 24LL), 10LL); v43 = (std::ostream *)std::ostream::put(v41, v42); std::ostream::flush(v43); std::__ostream_insert<char,std::char_traits<char>>(v60, " FP16_VA = ", 14LL); has_fp16_va = ggml_cpu_has_fp16_va(); v45 = (std::ostream *)std::ostream::operator<<(v60, has_fp16_va); v46 = std::ios::widen((char *)v45 + *(_QWORD *)(*(_QWORD *)v45 - 24LL), 10LL); v47 = (std::ostream *)std::ostream::put(v45, v46); std::ostream::flush(v47); std::__ostream_insert<char,std::char_traits<char>>(v60, " WASM_SIMD = ", 16LL); has_wasm_simd = ggml_cpu_has_wasm_simd(); v49 = (std::ostream *)std::ostream::operator<<(v60, has_wasm_simd); v50 = std::ios::widen((char *)v49 + *(_QWORD *)(*(_QWORD *)v49 - 24LL), 10LL); v51 = (std::ostream *)std::ostream::put(v49, v50); std::ostream::flush(v51); std::__ostream_insert<char,std::char_traits<char>>(v60, " VSX = ", 10LL); has_vsx = ggml_cpu_has_vsx(); v53 = (std::ostream *)std::ostream::operator<<(v60, has_vsx); v54 = std::ios::widen((char *)v53 + *(_QWORD *)(*(_QWORD *)v53 - 24LL), 10LL); v55 = (std::ostream *)std::ostream::put(v53, v54); std::ostream::flush(v55); std::stringbuf::str(&v57, v61); snprintf(&sd_get_system_info::buffer, 1024LL, "%s", v57); if ( v57 != (char *)&v58 ) operator delete(v57, v58 + 1); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream( v59, &`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>); std::ios_base::~ios_base((std::ios_base *)v62); return &sd_get_system_info::buffer; }
10,382
sd_get_system_info
7CodeWizard[P]stablediffusion/util.cpp
const char* sd_get_system_info() { static char buffer[1024]; std::stringstream ss; ss << "System Info: \n"; ss << " BLAS = " << ggml_cpu_has_blas() << std::endl; ss << " SSE3 = " << ggml_cpu_has_sse3() << std::endl; ss << " AVX = " << ggml_cpu_has_avx() << std::endl; ss << " AVX2 = " << ggml_cpu_has_avx2() << std::endl; ss << " AVX512 = " << ggml_cpu_has_avx512() << std::endl; ss << " AVX512_VBMI = " << ggml_cpu_has_avx512_vbmi() << std::endl; ss << " AVX512_VNNI = " << ggml_cpu_has_avx512_vnni() << std::endl; ss << " FMA = " << ggml_cpu_has_fma() << std::endl; ss << " NEON = " << ggml_cpu_has_neon() << std::endl; ss << " ARM_FMA = " << ggml_cpu_has_arm_fma() << std::endl; ss << " F16C = " << ggml_cpu_has_f16c() << std::endl; ss << " FP16_VA = " << ggml_cpu_has_fp16_va() << std::endl; ss << " WASM_SIMD = " << ggml_cpu_has_wasm_simd() << std::endl; ss << " VSX = " << ggml_cpu_has_vsx() << std::endl; snprintf(buffer, sizeof(buffer), "%s", ss.str().c_str()); return buffer; }
O2
cpp
sd_get_system_info: pushq %r14 pushq %rbx subq $0x1a8, %rsp # imm = 0x1A8 leaq 0x20(%rsp), %rdi callq 0xa3e0 leaq 0x30(%rsp), %rbx leaq 0x49331(%rip), %rsi # 0x9f448 movq %rbx, %rdi callq 0xa5d0 leaq 0x49331(%rip), %rsi # 0x9f457 movq %rbx, %rdi callq 0xa5d0 movq %rax, %r14 callq 0x7903b movq %r14, %rdi movl %eax, %esi callq 0xaa60 movq %rax, %rdi callq 0xa260 leaq 0x49314(%rip), %rsi # 0x9f463 movq %rbx, %rdi callq 0xa5d0 movq %rax, %r14 callq 0x79047 movq %r14, %rdi movl %eax, %esi callq 0xaa60 movq %rax, %rdi callq 0xa260 leaq 0x492f7(%rip), %rsi # 0x9f46f movq %rbx, %rdi callq 0xa5d0 movq %rax, %r14 callq 0x79010 movq %r14, %rdi movl %eax, %esi callq 0xaa60 movq %rax, %rdi callq 0xa260 leaq 0x492d9(%rip), %rsi # 0x9f47a movq %rbx, %rdi callq 0xa5d0 movq %rax, %r14 callq 0x79017 movq %r14, %rdi movl %eax, %esi callq 0xaa60 movq %rax, %rdi callq 0xa260 leaq 0x492bc(%rip), %rsi # 0x9f486 movq %rbx, %rdi callq 0xa5d0 movq %rax, %r14 callq 0x7901b movq %r14, %rdi movl %eax, %esi callq 0xaa60 movq %rax, %rdi callq 0xa260 leaq 0x492a1(%rip), %rsi # 0x9f494 movq %rbx, %rdi callq 0xa5d0 movq %rax, %r14 callq 0x7901e movq %r14, %rdi movl %eax, %esi callq 0xaa60 movq %rax, %rdi callq 0xa260 leaq 0x4928b(%rip), %rsi # 0x9f4a7 movq %rbx, %rdi callq 0xa5d0 movq %rax, %r14 callq 0x79021 movq %r14, %rdi movl %eax, %esi callq 0xaa60 movq %rax, %rdi callq 0xa260 leaq 0x49275(%rip), %rsi # 0x9f4ba movq %rbx, %rdi callq 0xa5d0 movq %rax, %r14 callq 0x79024 movq %r14, %rdi movl %eax, %esi callq 0xaa60 movq %rax, %rdi callq 0xa260 leaq 0x49257(%rip), %rsi # 0x9f4c5 movq %rbx, %rdi callq 0xa5d0 movq %rax, %r14 callq 0x79028 movq %r14, %rdi movl %eax, %esi callq 0xaa60 movq %rax, %rdi callq 0xa260 leaq 0x4923a(%rip), %rsi # 0x9f4d1 movq %rbx, %rdi callq 0xa5d0 movq %rax, %r14 callq 0x7902b movq %r14, %rdi movl %eax, %esi callq 0xaa60 movq %rax, %rdi callq 0xa260 leaq 0x49220(%rip), %rsi # 0x9f4e0 movq %rbx, %rdi callq 0xa5d0 movq %rax, %r14 callq 0x79031 movq %r14, %rdi movl %eax, %esi callq 0xaa60 movq %rax, %rdi callq 0xa260 leaq 0x49203(%rip), %rsi # 0x9f4ec movq %rbx, %rdi callq 0xa5d0 movq %rax, %r14 callq 0x79035 movq %r14, %rdi movl %eax, %esi callq 0xaa60 movq %rax, %rdi callq 0xa260 leaq 0x491e9(%rip), %rsi # 0x9f4fb movq %rbx, %rdi callq 0xa5d0 movq %rax, %r14 callq 0x79038 movq %r14, %rdi movl %eax, %esi callq 0xaa60 movq %rax, %rdi callq 0xa260 leaq 0x491d1(%rip), %rsi # 0x9f50c movq %rbx, %rdi callq 0xa5d0 movq %rax, %rbx callq 0x7904f movq %rbx, %rdi movl %eax, %esi callq 0xaa60 movq %rax, %rdi callq 0xa260 leaq 0x38(%rsp), %rsi movq %rsp, %rdi callq 0xa9b0 movq %rsp, %rbx movq (%rbx), %rcx leaq 0x1012a9(%rip), %r14 # 0x157620 leaq 0x43c7c(%rip), %rdx # 0x99ffa movl $0x400, %esi # imm = 0x400 movq %r14, %rdi xorl %eax, %eax callq 0xa9d0 movq %rbx, %rdi callq 0xac60 leaq 0x20(%rsp), %rdi callq 0xa450 movq %r14, %rax addq $0x1a8, %rsp # imm = 0x1A8 popq %rbx popq %r14 retq jmp 0x563af movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0xa450 movq %rbx, %rdi callq 0xaab0
sd_get_system_info: push r14 push rbx sub rsp, 1A8h lea rdi, [rsp+1B8h+var_198] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea rbx, [rsp+1B8h+var_188] lea rsi, aSystemInfo; "System Info: \n" mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rsi, aBlas; " BLAS = " mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r14, rax call ggml_cpu_has_blas mov rdi, r14 mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) lea rsi, aSse3; " SSE3 = " mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r14, rax call ggml_cpu_has_sse3 mov rdi, r14 mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) lea rsi, aAvx; " AVX = " mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r14, rax call ggml_cpu_has_avx mov rdi, r14 mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) lea rsi, aAvx2; " AVX2 = " mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r14, rax call ggml_cpu_has_avx2 mov rdi, r14 mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) lea rsi, aAvx512; " AVX512 = " mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r14, rax call ggml_cpu_has_avx512 mov rdi, r14 mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) lea rsi, aAvx512Vbmi; " AVX512_VBMI = " mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r14, rax call ggml_cpu_has_avx512_vbmi mov rdi, r14 mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) lea rsi, aAvx512Vnni; " AVX512_VNNI = " mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r14, rax call ggml_cpu_has_avx512_vnni mov rdi, r14 mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) lea rsi, aFma; " FMA = " mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r14, rax call ggml_cpu_has_fma mov rdi, r14 mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) lea rsi, aNeon; " NEON = " mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r14, rax call ggml_cpu_has_neon mov rdi, r14 mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) lea rsi, aArmFma; " ARM_FMA = " mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r14, rax call ggml_cpu_has_arm_fma mov rdi, r14 mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) lea rsi, aF16c; " F16C = " mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r14, rax call ggml_cpu_has_f16c mov rdi, r14 mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) lea rsi, aFp16Va; " FP16_VA = " mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r14, rax call ggml_cpu_has_fp16_va mov rdi, r14 mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) lea rsi, aWasmSimd; " WASM_SIMD = " mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r14, rax call ggml_cpu_has_wasm_simd mov rdi, r14 mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) lea rsi, aVsx; " VSX = " mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rbx, rax call ggml_cpu_has_vsx mov rdi, rbx mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) lea rsi, [rsp+1B8h+var_180] mov rdi, rsp call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rbx, rsp mov rcx, [rbx] lea r14, _ZZ18sd_get_system_infoE6buffer; sd_get_system_info::buffer lea rdx, aStableDiffusio_0+1Eh; "%s" mov esi, 400h mov rdi, r14 xor eax, eax call _snprintf mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+1B8h+var_198] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rax, r14 add rsp, 1A8h pop rbx pop r14 retn jmp short $+2 loc_563AF: mov rbx, rax lea rdi, [rsp+arg_18] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rdi, rbx call __Unwind_Resume
void *sd_get_system_info() { long long v0; // r14 unsigned int has_blas; // eax long long v2; // rax long long v3; // r14 unsigned int has_sse3; // eax long long v5; // rax long long v6; // r14 unsigned int has_avx; // eax long long v8; // rax long long v9; // r14 unsigned int has_avx2; // eax long long v11; // rax long long v12; // r14 unsigned int has_avx512; // eax long long v14; // rax long long v15; // r14 unsigned int has_avx512_vbmi; // eax long long v17; // rax long long v18; // r14 unsigned int has_avx512_vnni; // eax long long v20; // rax long long v21; // r14 unsigned int has_fma; // eax long long v23; // rax long long v24; // r14 unsigned int has_neon; // eax long long v26; // rax long long v27; // r14 unsigned int has_arm_fma; // eax long long v29; // rax long long v30; // r14 unsigned int has_f16c; // eax long long v32; // rax long long v33; // r14 unsigned int has_fp16_va; // eax long long v35; // rax long long v36; // r14 unsigned int has_wasm_simd; // eax long long v38; // rax long long v39; // rbx unsigned int has_vsx; // eax long long v41; // rax const char *v43[4]; // [rsp+0h] [rbp-1B8h] BYREF _BYTE v44[16]; // [rsp+20h] [rbp-198h] BYREF _BYTE v45[8]; // [rsp+30h] [rbp-188h] BYREF _BYTE v46[384]; // [rsp+38h] [rbp-180h] BYREF std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v44); std::operator<<<std::char_traits<char>>(v45, "System Info: \n"); v0 = std::operator<<<std::char_traits<char>>(v45, " BLAS = "); has_blas = ggml_cpu_has_blas(); v2 = std::ostream::operator<<(v0, has_blas); std::endl<char,std::char_traits<char>>(v2); v3 = std::operator<<<std::char_traits<char>>(v45, " SSE3 = "); has_sse3 = ggml_cpu_has_sse3(); v5 = std::ostream::operator<<(v3, has_sse3); std::endl<char,std::char_traits<char>>(v5); v6 = std::operator<<<std::char_traits<char>>(v45, " AVX = "); has_avx = ggml_cpu_has_avx(); v8 = std::ostream::operator<<(v6, has_avx); std::endl<char,std::char_traits<char>>(v8); v9 = std::operator<<<std::char_traits<char>>(v45, " AVX2 = "); has_avx2 = ggml_cpu_has_avx2(); v11 = std::ostream::operator<<(v9, has_avx2); std::endl<char,std::char_traits<char>>(v11); v12 = std::operator<<<std::char_traits<char>>(v45, " AVX512 = "); has_avx512 = ggml_cpu_has_avx512(); v14 = std::ostream::operator<<(v12, has_avx512); std::endl<char,std::char_traits<char>>(v14); v15 = std::operator<<<std::char_traits<char>>(v45, " AVX512_VBMI = "); has_avx512_vbmi = ggml_cpu_has_avx512_vbmi(); v17 = std::ostream::operator<<(v15, has_avx512_vbmi); std::endl<char,std::char_traits<char>>(v17); v18 = std::operator<<<std::char_traits<char>>(v45, " AVX512_VNNI = "); has_avx512_vnni = ggml_cpu_has_avx512_vnni(); v20 = std::ostream::operator<<(v18, has_avx512_vnni); std::endl<char,std::char_traits<char>>(v20); v21 = std::operator<<<std::char_traits<char>>(v45, " FMA = "); has_fma = ggml_cpu_has_fma(); v23 = std::ostream::operator<<(v21, has_fma); std::endl<char,std::char_traits<char>>(v23); v24 = std::operator<<<std::char_traits<char>>(v45, " NEON = "); has_neon = ggml_cpu_has_neon(); v26 = std::ostream::operator<<(v24, has_neon); std::endl<char,std::char_traits<char>>(v26); v27 = std::operator<<<std::char_traits<char>>(v45, " ARM_FMA = "); has_arm_fma = ggml_cpu_has_arm_fma(); v29 = std::ostream::operator<<(v27, has_arm_fma); std::endl<char,std::char_traits<char>>(v29); v30 = std::operator<<<std::char_traits<char>>(v45, " F16C = "); has_f16c = ggml_cpu_has_f16c(); v32 = std::ostream::operator<<(v30, has_f16c); std::endl<char,std::char_traits<char>>(v32); v33 = std::operator<<<std::char_traits<char>>(v45, " FP16_VA = "); has_fp16_va = ggml_cpu_has_fp16_va(); v35 = std::ostream::operator<<(v33, has_fp16_va); std::endl<char,std::char_traits<char>>(v35); v36 = std::operator<<<std::char_traits<char>>(v45, " WASM_SIMD = "); has_wasm_simd = ggml_cpu_has_wasm_simd(); v38 = std::ostream::operator<<(v36, has_wasm_simd); std::endl<char,std::char_traits<char>>(v38); v39 = std::operator<<<std::char_traits<char>>(v45, " VSX = "); has_vsx = ggml_cpu_has_vsx(); v41 = std::ostream::operator<<(v39, has_vsx); std::endl<char,std::char_traits<char>>(v41); std::stringbuf::str(v43, v46); snprintf(&sd_get_system_info::buffer, 1024LL, "%s", v43[0]); std::string::~string(v43); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v44); return &sd_get_system_info::buffer; }
sd_get_system_info: PUSH R14 PUSH RBX SUB RSP,0x1a8 LEA RDI,[RSP + 0x20] CALL 0x0010a3e0 LEA RBX,[RSP + 0x30] LAB_00156110: LEA RSI,[0x19f448] MOV RDI,RBX CALL 0x0010a5d0 LEA RSI,[0x19f457] MOV RDI,RBX CALL 0x0010a5d0 MOV R14,RAX CALL 0x0017903b MOV RDI,R14 MOV ESI,EAX CALL 0x0010aa60 MOV RDI,RAX CALL 0x0010a260 LEA RSI,[0x19f463] MOV RDI,RBX CALL 0x0010a5d0 MOV R14,RAX CALL 0x00179047 MOV RDI,R14 MOV ESI,EAX CALL 0x0010aa60 MOV RDI,RAX CALL 0x0010a260 LEA RSI,[0x19f46f] MOV RDI,RBX CALL 0x0010a5d0 MOV R14,RAX CALL 0x00179010 MOV RDI,R14 MOV ESI,EAX CALL 0x0010aa60 MOV RDI,RAX CALL 0x0010a260 LEA RSI,[0x19f47a] MOV RDI,RBX CALL 0x0010a5d0 MOV R14,RAX CALL 0x00179017 MOV RDI,R14 MOV ESI,EAX CALL 0x0010aa60 MOV RDI,RAX CALL 0x0010a260 LEA RSI,[0x19f486] MOV RDI,RBX CALL 0x0010a5d0 MOV R14,RAX CALL 0x0017901b MOV RDI,R14 MOV ESI,EAX CALL 0x0010aa60 MOV RDI,RAX CALL 0x0010a260 LEA RSI,[0x19f494] MOV RDI,RBX CALL 0x0010a5d0 MOV R14,RAX CALL 0x0017901e MOV RDI,R14 MOV ESI,EAX CALL 0x0010aa60 MOV RDI,RAX CALL 0x0010a260 LEA RSI,[0x19f4a7] MOV RDI,RBX CALL 0x0010a5d0 MOV R14,RAX CALL 0x00179021 MOV RDI,R14 MOV ESI,EAX CALL 0x0010aa60 MOV RDI,RAX CALL 0x0010a260 LEA RSI,[0x19f4ba] MOV RDI,RBX CALL 0x0010a5d0 MOV R14,RAX CALL 0x00179024 MOV RDI,R14 MOV ESI,EAX CALL 0x0010aa60 MOV RDI,RAX CALL 0x0010a260 LEA RSI,[0x19f4c5] MOV RDI,RBX CALL 0x0010a5d0 MOV R14,RAX CALL 0x00179028 MOV RDI,R14 MOV ESI,EAX CALL 0x0010aa60 MOV RDI,RAX CALL 0x0010a260 LEA RSI,[0x19f4d1] MOV RDI,RBX CALL 0x0010a5d0 MOV R14,RAX CALL 0x0017902b MOV RDI,R14 MOV ESI,EAX CALL 0x0010aa60 MOV RDI,RAX CALL 0x0010a260 LEA RSI,[0x19f4e0] MOV RDI,RBX CALL 0x0010a5d0 MOV R14,RAX CALL 0x00179031 MOV RDI,R14 MOV ESI,EAX CALL 0x0010aa60 MOV RDI,RAX CALL 0x0010a260 LEA RSI,[0x19f4ec] MOV RDI,RBX CALL 0x0010a5d0 MOV R14,RAX CALL 0x00179035 MOV RDI,R14 MOV ESI,EAX CALL 0x0010aa60 MOV RDI,RAX CALL 0x0010a260 LEA RSI,[0x19f4fb] MOV RDI,RBX CALL 0x0010a5d0 MOV R14,RAX CALL 0x00179038 MOV RDI,R14 MOV ESI,EAX CALL 0x0010aa60 MOV RDI,RAX CALL 0x0010a260 LEA RSI,[0x19f50c] MOV RDI,RBX CALL 0x0010a5d0 MOV RBX,RAX CALL 0x0017904f MOV RDI,RBX MOV ESI,EAX CALL 0x0010aa60 MOV RDI,RAX CALL 0x0010a260 LEA RSI,[RSP + 0x38] LAB_00156362: MOV RDI,RSP CALL 0x0010a9b0 LAB_0015636a: MOV RBX,RSP MOV RCX,qword ptr [RBX] LEA R14,[0x257620] LEA RDX,[0x199ffa] MOV ESI,0x400 MOV RDI,R14 XOR EAX,EAX CALL 0x0010a9d0 MOV RDI,RBX CALL 0x0010ac60 LEA RDI,[RSP + 0x20] CALL 0x0010a450 MOV RAX,R14 ADD RSP,0x1a8 POP RBX POP R14 RET
int1 * sd_get_system_info(void) { int iVar1; ostream *poVar2; int8 local_1b8 [4]; stringstream local_198 [16]; ostream local_188 [376]; std::__cxx11::stringstream::stringstream(local_198); /* try { // try from 00156110 to 0015635c has its CatchHandler @ 001563af */ std::operator<<(local_188,"System Info: \n"); poVar2 = std::operator<<(local_188," BLAS = "); iVar1 = ggml_cpu_has_blas(); poVar2 = (ostream *)std::ostream::operator<<(poVar2,iVar1); std::endl<char,std::char_traits<char>>(poVar2); poVar2 = std::operator<<(local_188," SSE3 = "); iVar1 = ggml_cpu_has_sse3(); poVar2 = (ostream *)std::ostream::operator<<(poVar2,iVar1); std::endl<char,std::char_traits<char>>(poVar2); poVar2 = std::operator<<(local_188," AVX = "); iVar1 = ggml_cpu_has_avx(); poVar2 = (ostream *)std::ostream::operator<<(poVar2,iVar1); std::endl<char,std::char_traits<char>>(poVar2); poVar2 = std::operator<<(local_188," AVX2 = "); iVar1 = ggml_cpu_has_avx2(); poVar2 = (ostream *)std::ostream::operator<<(poVar2,iVar1); std::endl<char,std::char_traits<char>>(poVar2); poVar2 = std::operator<<(local_188," AVX512 = "); iVar1 = ggml_cpu_has_avx512(); poVar2 = (ostream *)std::ostream::operator<<(poVar2,iVar1); std::endl<char,std::char_traits<char>>(poVar2); poVar2 = std::operator<<(local_188," AVX512_VBMI = "); iVar1 = ggml_cpu_has_avx512_vbmi(); poVar2 = (ostream *)std::ostream::operator<<(poVar2,iVar1); std::endl<char,std::char_traits<char>>(poVar2); poVar2 = std::operator<<(local_188," AVX512_VNNI = "); iVar1 = ggml_cpu_has_avx512_vnni(); poVar2 = (ostream *)std::ostream::operator<<(poVar2,iVar1); std::endl<char,std::char_traits<char>>(poVar2); poVar2 = std::operator<<(local_188," FMA = "); iVar1 = ggml_cpu_has_fma(); poVar2 = (ostream *)std::ostream::operator<<(poVar2,iVar1); std::endl<char,std::char_traits<char>>(poVar2); poVar2 = std::operator<<(local_188," NEON = "); iVar1 = ggml_cpu_has_neon(); poVar2 = (ostream *)std::ostream::operator<<(poVar2,iVar1); std::endl<char,std::char_traits<char>>(poVar2); poVar2 = std::operator<<(local_188," ARM_FMA = "); iVar1 = ggml_cpu_has_arm_fma(); poVar2 = (ostream *)std::ostream::operator<<(poVar2,iVar1); std::endl<char,std::char_traits<char>>(poVar2); poVar2 = std::operator<<(local_188," F16C = "); iVar1 = ggml_cpu_has_f16c(); poVar2 = (ostream *)std::ostream::operator<<(poVar2,iVar1); std::endl<char,std::char_traits<char>>(poVar2); poVar2 = std::operator<<(local_188," FP16_VA = "); iVar1 = ggml_cpu_has_fp16_va(); poVar2 = (ostream *)std::ostream::operator<<(poVar2,iVar1); std::endl<char,std::char_traits<char>>(poVar2); poVar2 = std::operator<<(local_188," WASM_SIMD = "); iVar1 = ggml_cpu_has_wasm_simd(); poVar2 = (ostream *)std::ostream::operator<<(poVar2,iVar1); std::endl<char,std::char_traits<char>>(poVar2); poVar2 = std::operator<<(local_188," VSX = "); iVar1 = ggml_cpu_has_vsx(); poVar2 = (ostream *)std::ostream::operator<<(poVar2,iVar1); std::endl<char,std::char_traits<char>>(poVar2); /* try { // try from 00156362 to 00156369 has its CatchHandler @ 001563ad */ std::__cxx11::stringbuf::str(); snprintf(sd_get_system_info::buffer,0x400,"%s",local_1b8[0]); std::__cxx11::string::~string((string *)local_1b8); std::__cxx11::stringstream::~stringstream(local_198); return sd_get_system_info::buffer; }
10,383
generate_query
eloqsql/storage/maria/libmarias3/src/request.c
static char *generate_query(CURL *curl, const char *value, const char *continuation, uint8_t list_version, bool use_delimiter, char *query_buffer) { char *encoded; query_buffer[0] = '\0'; if (use_delimiter) { snprintf(query_buffer, 3072, "delimiter=%%2F"); } if (list_version == 2) { if (continuation) { encoded = curl_easy_escape(curl, continuation, (int)strlen(continuation)); if (strlen(query_buffer)) { snprintf(query_buffer + strlen(query_buffer), 3072 - strlen(query_buffer), "&continuation-token=%s&list-type=2", encoded); } else { snprintf(query_buffer, 3072, "continuation-token=%s&list-type=2", encoded); } curl_free(encoded); } else { if (strlen(query_buffer)) { snprintf(query_buffer + strlen(query_buffer), 3072 - strlen(query_buffer), "&list-type=2"); } else { sprintf(query_buffer, "list-type=2"); } } } else if (continuation) { // Continuation is really marker here encoded = curl_easy_escape(curl, continuation, (int)strlen(continuation)); if (strlen(query_buffer)) { snprintf(query_buffer + strlen(query_buffer), 3072 - strlen(query_buffer), "&marker=%s", encoded); } else { snprintf(query_buffer, 3072, "marker=%s", encoded); } curl_free(encoded); } if (value) { encoded = curl_easy_escape(curl, value, (int)strlen(value)); if (strlen(query_buffer)) { snprintf(query_buffer + strlen(query_buffer), 3072 - strlen(query_buffer), "&prefix=%s", encoded); } else { snprintf(query_buffer, 3072, "prefix=%s", encoded); } curl_free(encoded); } return query_buffer; }
O3
c
generate_query: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %rbx movl %ecx, %r13d movq %rdx, %r12 movq %rsi, %r14 movq %rdi, %r15 movb $0x0, (%r9) testl %r8d, %r8d je 0x10606 leaq 0x58eb(%rip), %r8 # 0x15ed6 movl $0xc00, %esi # imm = 0xC00 movq %rbx, %rdi movl $0x1, %edx movq $-0x1, %rcx xorl %eax, %eax callq 0xa360 cmpb $0x2, %r13b jne 0x10656 testq %r12, %r12 je 0x10699 movq %r12, %rdi callq 0xa220 movq %r15, %rdi movq %r12, %rsi movl %eax, %edx callq 0xa970 movq %rax, %r12 movq %rbx, %rdi callq 0xa220 testq %rax, %rax je 0x106d2 leaq (%rbx,%rax), %rdi movl $0xc00, %esi # imm = 0xC00 subq %rax, %rsi leaq 0x5894(%rip), %r8 # 0x15ee5 jmp 0x106ea testq %r12, %r12 je 0x10708 movq %r12, %rdi callq 0xa220 movq %r15, %rdi movq %r12, %rsi movl %eax, %edx callq 0xa970 movq %rax, %r12 movq %rbx, %rdi callq 0xa220 testq %rax, %rax je 0x106db leaq (%rbx,%rax), %rdi movl $0xc00, %esi # imm = 0xC00 subq %rax, %rsi leaq 0x5871(%rip), %r8 # 0x15f08 jmp 0x106ea movq %rbx, %rdi callq 0xa220 testq %rax, %rax je 0x10786 leaq (%rbx,%rax), %rdi movl $0xc00, %esi # imm = 0xC00 subq %rax, %rsi leaq 0x583e(%rip), %r8 # 0x15efb movl $0x1, %edx movq $-0x1, %rcx xorl %eax, %eax callq 0xa360 jmp 0x10708 leaq 0x580d(%rip), %r8 # 0x15ee6 jmp 0x106e2 leaq 0x5827(%rip), %r8 # 0x15f09 movl $0xc00, %esi # imm = 0xC00 movq %rbx, %rdi movl $0x1, %edx movq $-0x1, %rcx movq %r12, %r9 xorl %eax, %eax callq 0xa360 movq %r12, %rdi callq 0xa0f0 testq %r14, %r14 je 0x10774 movq %r14, %rdi callq 0xa220 movq %r15, %rdi movq %r14, %rsi movl %eax, %edx callq 0xa970 movq %rax, %r14 movq %rbx, %rdi callq 0xa220 testq %rax, %rax je 0x10747 leaq (%rbx,%rax), %rdi movl $0xc00, %esi # imm = 0xC00 subq %rax, %rsi leaq 0x57ce(%rip), %r8 # 0x15f13 jmp 0x10756 leaq 0x57c6(%rip), %r8 # 0x15f14 movl $0xc00, %esi # imm = 0xC00 movq %rbx, %rdi movl $0x1, %edx movq $-0x1, %rcx movq %r14, %r9 xorl %eax, %eax callq 0xa360 movq %r14, %rdi callq 0xa0f0 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x576f(%rip), %rcx # 0x15efc movq %rbx, %rdi movl $0x1, %esi movq $-0x1, %rdx xorl %eax, %eax callq 0xa340 jmp 0x10708
generate_query: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, r9 mov r13d, ecx mov r12, rdx mov r14, rsi mov r15, rdi mov byte ptr [r9], 0 test r8d, r8d jz short loc_10606 lea r8, aDelimiter2f; "delimiter=%%2F" mov esi, 0C00h mov rdi, rbx mov edx, 1 mov rcx, 0FFFFFFFFFFFFFFFFh xor eax, eax call ___snprintf_chk loc_10606: cmp r13b, 2 jnz short loc_10656 test r12, r12 jz loc_10699 mov rdi, r12 call _strlen mov rdi, r15 mov rsi, r12 mov edx, eax call _curl_easy_escape mov r12, rax mov rdi, rbx call _strlen test rax, rax jz loc_106D2 lea rdi, [rbx+rax] mov esi, 0C00h sub rsi, rax lea r8, aContinuationTo; "&continuation-token=%s&list-type=2" jmp loc_106EA loc_10656: test r12, r12 jz loc_10708 mov rdi, r12 call _strlen mov rdi, r15 mov rsi, r12 mov edx, eax call _curl_easy_escape mov r12, rax mov rdi, rbx call _strlen test rax, rax jz short loc_106DB lea rdi, [rbx+rax] mov esi, 0C00h sub rsi, rax lea r8, aMarkerS; "&marker=%s" jmp short loc_106EA loc_10699: mov rdi, rbx call _strlen test rax, rax jz loc_10786 lea rdi, [rbx+rax] mov esi, 0C00h sub rsi, rax lea r8, aContinuationTo+16h; "&list-type=2" mov edx, 1 mov rcx, 0FFFFFFFFFFFFFFFFh xor eax, eax call ___snprintf_chk jmp short loc_10708 loc_106D2: lea r8, aContinuationTo+1; "continuation-token=%s&list-type=2" jmp short loc_106E2 loc_106DB: lea r8, aMarkerS+1; "marker=%s" loc_106E2: mov esi, 0C00h mov rdi, rbx loc_106EA: mov edx, 1 mov rcx, 0FFFFFFFFFFFFFFFFh mov r9, r12 xor eax, eax call ___snprintf_chk mov rdi, r12 call _curl_free loc_10708: test r14, r14 jz short loc_10774 mov rdi, r14 call _strlen mov rdi, r15 mov rsi, r14 mov edx, eax call _curl_easy_escape mov r14, rax mov rdi, rbx call _strlen test rax, rax jz short loc_10747 lea rdi, [rbx+rax] mov esi, 0C00h sub rsi, rax lea r8, aPrefixS; "&prefix=%s" jmp short loc_10756 loc_10747: lea r8, aPrefixS+1; "prefix=%s" mov esi, 0C00h mov rdi, rbx loc_10756: mov edx, 1 mov rcx, 0FFFFFFFFFFFFFFFFh mov r9, r14 xor eax, eax call ___snprintf_chk mov rdi, r14 call _curl_free loc_10774: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_10786: lea rcx, aContinuationTo+17h; "list-type=2" mov rdi, rbx mov esi, 1 mov rdx, 0FFFFFFFFFFFFFFFFh xor eax, eax call ___sprintf_chk jmp loc_10708
_BYTE * generate_query(long long a1, long long a2, long long a3, char a4, int a5, _BYTE *a6) { long long v6; // rax unsigned int v10; // eax long long v11; // r12 long long v12; // rax unsigned int v13; // eax long long v14; // rax long long v15; // rax const char *v16; // r8 unsigned int v17; // eax long long v18; // r14 long long v19; // rax long long v21; // [rsp-8h] [rbp-30h] v21 = v6; *a6 = 0; if ( a5 ) __snprintf_chk(a6, 3072LL, 1LL, -1LL, "delimiter=%%2F"); if ( a4 != 2 ) { if ( !a3 ) goto LABEL_16; v13 = strlen(a3); v11 = curl_easy_escape(a1, a3, v13); v14 = strlen(a6); if ( v14 ) { __snprintf_chk(&a6[v14], 3072 - v14, 1LL, -1LL, "&marker=%s", v11); goto LABEL_15; } v16 = "marker=%s"; LABEL_14: __snprintf_chk(a6, 3072LL, 1LL, -1LL, v16, v11, v21); goto LABEL_15; } if ( a3 ) { v10 = strlen(a3); v11 = curl_easy_escape(a1, a3, v10); v12 = strlen(a6); if ( v12 ) { __snprintf_chk(&a6[v12], 3072 - v12, 1LL, -1LL, "&continuation-token=%s&list-type=2", v11); LABEL_15: curl_free(v11); goto LABEL_16; } v16 = "continuation-token=%s&list-type=2"; goto LABEL_14; } v15 = strlen(a6); if ( v15 ) __snprintf_chk(&a6[v15], 3072 - v15, 1LL, -1LL, "&list-type=2"); else __sprintf_chk(a6, 1LL, -1LL, "list-type=2"); LABEL_16: if ( a2 ) { v17 = strlen(a2); v18 = curl_easy_escape(a1, a2, v17); v19 = strlen(a6); if ( v19 ) __snprintf_chk(&a6[v19], 3072 - v19, 1LL, -1LL, "&prefix=%s", v18); else __snprintf_chk(a6, 3072LL, 1LL, -1LL, "prefix=%s", v18); curl_free(v18); } return a6; }
generate_query: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,R9 MOV R13D,ECX MOV R12,RDX MOV R14,RSI MOV R15,RDI MOV byte ptr [R9],0x0 TEST R8D,R8D JZ 0x00110606 LEA R8,[0x115ed6] MOV ESI,0xc00 MOV RDI,RBX MOV EDX,0x1 MOV RCX,-0x1 XOR EAX,EAX CALL 0x0010a360 LAB_00110606: CMP R13B,0x2 JNZ 0x00110656 TEST R12,R12 JZ 0x00110699 MOV RDI,R12 CALL 0x0010a220 MOV RDI,R15 MOV RSI,R12 MOV EDX,EAX CALL 0x0010a970 MOV R12,RAX MOV RDI,RBX CALL 0x0010a220 TEST RAX,RAX JZ 0x001106d2 LEA RDI,[RBX + RAX*0x1] MOV ESI,0xc00 SUB RSI,RAX LEA R8,[0x115ee5] JMP 0x001106ea LAB_00110656: TEST R12,R12 JZ 0x00110708 MOV RDI,R12 CALL 0x0010a220 MOV RDI,R15 MOV RSI,R12 MOV EDX,EAX CALL 0x0010a970 MOV R12,RAX MOV RDI,RBX CALL 0x0010a220 TEST RAX,RAX JZ 0x001106db LEA RDI,[RBX + RAX*0x1] MOV ESI,0xc00 SUB RSI,RAX LEA R8,[0x115f08] JMP 0x001106ea LAB_00110699: MOV RDI,RBX CALL 0x0010a220 TEST RAX,RAX JZ 0x00110786 LEA RDI,[RBX + RAX*0x1] MOV ESI,0xc00 SUB RSI,RAX LEA R8,[0x115efb] MOV EDX,0x1 MOV RCX,-0x1 XOR EAX,EAX CALL 0x0010a360 JMP 0x00110708 LAB_001106d2: LEA R8,[0x115ee6] JMP 0x001106e2 LAB_001106db: LEA R8,[0x115f09] LAB_001106e2: MOV ESI,0xc00 MOV RDI,RBX LAB_001106ea: MOV EDX,0x1 MOV RCX,-0x1 MOV R9,R12 XOR EAX,EAX CALL 0x0010a360 MOV RDI,R12 CALL 0x0010a0f0 LAB_00110708: TEST R14,R14 JZ 0x00110774 MOV RDI,R14 CALL 0x0010a220 MOV RDI,R15 MOV RSI,R14 MOV EDX,EAX CALL 0x0010a970 MOV R14,RAX MOV RDI,RBX CALL 0x0010a220 TEST RAX,RAX JZ 0x00110747 LEA RDI,[RBX + RAX*0x1] MOV ESI,0xc00 SUB RSI,RAX LEA R8,[0x115f13] JMP 0x00110756 LAB_00110747: LEA R8,[0x115f14] MOV ESI,0xc00 MOV RDI,RBX LAB_00110756: MOV EDX,0x1 MOV RCX,-0x1 MOV R9,R14 XOR EAX,EAX CALL 0x0010a360 MOV RDI,R14 CALL 0x0010a0f0 LAB_00110774: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00110786: LEA RCX,[0x115efc] MOV RDI,RBX MOV ESI,0x1 MOV RDX,-0x1 XOR EAX,EAX CALL 0x0010a340 JMP 0x00110708
char * generate_query(int8 param_1,char *param_2,char *param_3,char param_4,int param_5, char *param_6) { size_t sVar1; int8 uVar2; long lVar3; char *pcVar4; char *pcVar5; *param_6 = '\0'; if (param_5 != 0) { __snprintf_chk(param_6,0xc00,1,0xffffffffffffffff,"delimiter=%%2F"); } if (param_4 == '\x02') { if (param_3 == (char *)0x0) { sVar1 = strlen(param_6); if (sVar1 == 0) { __sprintf_chk(param_6,1,0xffffffffffffffff,"list-type=2"); } else { __snprintf_chk(param_6 + sVar1,0xc00 - sVar1,1,0xffffffffffffffff,"&list-type=2"); } goto LAB_00110708; } sVar1 = strlen(param_3); uVar2 = curl_easy_escape(param_1,param_3,sVar1 & 0xffffffff); sVar1 = strlen(param_6); if (sVar1 == 0) { pcVar4 = "&continuation-token=%s&list-type=2"; LAB_001106e2: pcVar4 = pcVar4 + 1; lVar3 = 0xc00; pcVar5 = param_6; } else { lVar3 = 0xc00 - sVar1; pcVar4 = "&continuation-token=%s&list-type=2"; pcVar5 = param_6 + sVar1; } } else { if (param_3 == (char *)0x0) goto LAB_00110708; sVar1 = strlen(param_3); uVar2 = curl_easy_escape(param_1,param_3,sVar1 & 0xffffffff); sVar1 = strlen(param_6); if (sVar1 == 0) { pcVar4 = "&marker=%s"; goto LAB_001106e2; } pcVar5 = param_6 + sVar1; lVar3 = 0xc00 - sVar1; pcVar4 = "&marker=%s"; } __snprintf_chk(pcVar5,lVar3,1,0xffffffffffffffff,pcVar4,uVar2); curl_free(uVar2); LAB_00110708: if (param_2 != (char *)0x0) { sVar1 = strlen(param_2); uVar2 = curl_easy_escape(param_1,param_2,sVar1 & 0xffffffff); sVar1 = strlen(param_6); if (sVar1 == 0) { pcVar5 = "prefix=%s"; lVar3 = 0xc00; pcVar4 = param_6; } else { lVar3 = 0xc00 - sVar1; pcVar5 = "&prefix=%s"; pcVar4 = param_6 + sVar1; } __snprintf_chk(pcVar4,lVar3,1,0xffffffffffffffff,pcVar5,uVar2); curl_free(uVar2); } return param_6; }
10,384
append_warnings(st_dynamic_string*, st_mysql*)
eloqsql/client/mysqltest.cc
int append_warnings(DYNAMIC_STRING *ds, MYSQL* mysql) { uint count; MYSQL_RES *warn_res; DYNAMIC_STRING res; DBUG_ENTER("append_warnings"); if (!(count= mysql_warning_count(mysql))) DBUG_RETURN(0); /* If one day we will support execution of multi-statements through PS API we should not issue SHOW WARNINGS until we have not read all results... */ DBUG_ASSERT(!mysql_more_results(mysql)); if (mysql_real_query(mysql, "SHOW WARNINGS", 13)) die("Error running query \"SHOW WARNINGS\": %s", mysql_error(mysql)); if (!(warn_res= mysql_store_result(mysql))) die("Warning count is %u but didn't get any warnings", count); init_dynamic_string(&res, "", 1024, 1024); append_result(&res, warn_res); mysql_free_result(warn_res); DBUG_PRINT("warnings", ("%s", res.str)); if (display_result_sorted) dynstr_append_sorted(ds, &res, 0); else dynstr_append_mem(ds, res.str, res.length); dynstr_free(&res); DBUG_RETURN(count); }
O3
cpp
append_warnings(st_dynamic_string*, st_mysql*): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rsi, %r15 movq %rdi, %r14 movq %rsi, %rdi callq 0x79cc0 movl %eax, %ebx testl %eax, %eax je 0x6bc3a leaq 0x8fecd(%rip), %rsi # 0xfba7c movl $0xd, %edx movq %r15, %rdi callq 0x6194c movq %r15, %rdi testl %eax, %eax jne 0x6bc49 callq 0x61b5c testq %rax, %rax je 0x6bc5f movq %rax, %r15 leaq 0xa8522(%rip), %rsi # 0x114101 leaq -0x40(%rbp), %r12 movl $0x400, %edx # imm = 0x400 movl $0x400, %ecx # imm = 0x400 movq %r12, %rdi callq 0x9eb38 movq %r12, %rdi movq %r15, %rsi callq 0x6b3eb movq %r15, %rdi callq 0x61bbf cmpb $0x1, 0x3f1472(%rip) # 0x45d081 jne 0x6bc21 leaq -0x40(%rbp), %rsi movq %r14, %rdi xorl %edx, %edx callq 0x66053 jmp 0x6bc31 movq -0x40(%rbp), %rsi movq -0x38(%rbp), %rdx movq %r14, %rdi callq 0x9ed13 leaq -0x40(%rbp), %rdi callq 0x9f03b movl %ebx, %eax addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq callq 0x79bbe leaq 0x868c6(%rip), %rdi # 0xf251b movq %rax, %rsi xorl %eax, %eax callq 0x62bd2 leaq 0x868dd(%rip), %rdi # 0xf2543 movl %ebx, %esi xorl %eax, %eax callq 0x62bd2
_Z15append_warningsP17st_dynamic_stringP8st_mysql: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 20h mov r15, rsi mov r14, rdi mov rdi, rsi call mysql_warning_count mov ebx, eax test eax, eax jz loc_6BC3A lea rsi, aFailedToLoadRo+49h; "SHOW WARNINGS" mov edx, 0Dh mov rdi, r15 call _Z21wrap_mysql_real_queryP8st_mysqlPKcm; wrap_mysql_real_query(st_mysql *,char const*,ulong) mov rdi, r15 test eax, eax jnz loc_6BC49 call _Z23wrap_mysql_store_resultP8st_mysql; wrap_mysql_store_result(st_mysql *) test rax, rax jz loc_6BC5F mov r15, rax lea rsi, byte_114101 lea r12, [rbp+var_40] mov edx, 400h mov ecx, 400h mov rdi, r12 call init_dynamic_string mov rdi, r12 mov rsi, r15 call _Z13append_resultP17st_dynamic_stringP12st_mysql_res; append_result(st_dynamic_string *,st_mysql_res *) mov rdi, r15 call _Z22wrap_mysql_free_resultP12st_mysql_res; wrap_mysql_free_result(st_mysql_res *) cmp cs:_ZL21display_result_sorted, 1; display_result_sorted jnz short loc_6BC21 lea rsi, [rbp+var_40] mov rdi, r14 xor edx, edx call _Z20dynstr_append_sortedP17st_dynamic_stringS0_b; dynstr_append_sorted(st_dynamic_string *,st_dynamic_string *,bool) jmp short loc_6BC31 loc_6BC21: mov rsi, [rbp+var_40] mov rdx, [rbp+var_38] mov rdi, r14 call dynstr_append_mem loc_6BC31: lea rdi, [rbp+var_40] call dynstr_free loc_6BC3A: mov eax, ebx add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_6BC49: call mysql_error lea rdi, aErrorRunningQu_0; "Error running query \"SHOW WARNINGS\": "... mov rsi, rax xor eax, eax call _ZL3diePKcz; die(char const*,...) loc_6BC5F: lea rdi, aWarningCountIs; "Warning count is %u but didn't get any "... mov esi, ebx xor eax, eax call _ZL3diePKcz; die(char const*,...)
long long append_warnings( long long a1, long long a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { unsigned int v10; // ebx long long v11; // rax long long v12; // rdx __va_list_tag *v13; // rcx long long v14; // r8 long long v15; // r9 __m128 v16; // xmm4 __m128 v17; // xmm5 long long v18; // r15 double v19; // xmm4_8 double v20; // xmm5_8 long long v22; // rax long long v23; // rdx __va_list_tag *v24; // rcx long long v25; // r8 long long v26; // r9 __m128 v27; // xmm4 __m128 v28; // xmm5 _QWORD v29[8]; // [rsp+0h] [rbp-40h] BYREF v10 = mysql_warning_count(a2); if ( v10 ) { if ( (unsigned int)wrap_mysql_real_query(a2, (long long)"SHOW WARNINGS", 13LL) ) { v22 = mysql_error(a2); die( "Error running query \"SHOW WARNINGS\": %s", v22, v23, v24, v25, v26, a3, a4, a5, a6, v27, v28, a9, a10, v29[0]); } v11 = wrap_mysql_store_result(a2); if ( !v11 ) die( "Warning count is %u but didn't get any warnings", v10, v12, v13, v14, v15, a3, a4, a5, a6, v16, v17, a9, a10, v29[0]); v18 = v11; init_dynamic_string(v29, &byte_114101, 1024LL, 1024LL); append_result((long long)v29, v18); wrap_mysql_free_result(v18); if ( display_result_sorted == 1 ) dynstr_append_sorted(a1, v29, 0, a3, a4, a5, a6, v19, v20, a9, a10); else dynstr_append_mem(a1, v29[0], v29[1]); dynstr_free(v29); } return v10; }
append_warnings: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV R15,RSI MOV R14,RDI MOV RDI,RSI CALL 0x00179cc0 MOV EBX,EAX TEST EAX,EAX JZ 0x0016bc3a LEA RSI,[0x1fba7c] MOV EDX,0xd MOV RDI,R15 CALL 0x0016194c MOV RDI,R15 TEST EAX,EAX JNZ 0x0016bc49 CALL 0x00161b5c TEST RAX,RAX JZ 0x0016bc5f MOV R15,RAX LEA RSI,[0x214101] LEA R12,[RBP + -0x40] MOV EDX,0x400 MOV ECX,0x400 MOV RDI,R12 CALL 0x0019eb38 MOV RDI,R12 MOV RSI,R15 CALL 0x0016b3eb MOV RDI,R15 CALL 0x00161bbf CMP byte ptr [0x0055d081],0x1 JNZ 0x0016bc21 LEA RSI,[RBP + -0x40] MOV RDI,R14 XOR EDX,EDX CALL 0x00166053 JMP 0x0016bc31 LAB_0016bc21: MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x38] MOV RDI,R14 CALL 0x0019ed13 LAB_0016bc31: LEA RDI,[RBP + -0x40] CALL 0x0019f03b LAB_0016bc3a: MOV EAX,EBX ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0016bc49: CALL 0x00179bbe LEA RDI,[0x1f251b] MOV RSI,RAX XOR EAX,EAX CALL 0x00162bd2 LAB_0016bc5f: LEA RDI,[0x1f2543] MOV ESI,EBX XOR EAX,EAX CALL 0x00162bd2
/* append_warnings(st_dynamic_string*, st_mysql*) */ ulong append_warnings(st_dynamic_string *param_1,st_mysql *param_2) { uint uVar1; int iVar2; st_mysql_res *psVar3; int8 uVar4; int8 local_48; int8 local_40; uVar1 = mysql_warning_count(param_2); if (uVar1 != 0) { iVar2 = wrap_mysql_real_query(param_2,"SHOW WARNINGS",0xd); if (iVar2 != 0) { uVar4 = mysql_error(); /* WARNING: Subroutine does not return */ die("Error running query \"SHOW WARNINGS\": %s",uVar4); } psVar3 = (st_mysql_res *)wrap_mysql_store_result(param_2); if (psVar3 == (st_mysql_res *)0x0) { /* WARNING: Subroutine does not return */ die("Warning count is %u but didn\'t get any warnings",(ulong)uVar1); } init_dynamic_string((st_dynamic_string *)&local_48,&DAT_00214101,0x400,0x400); append_result((st_dynamic_string *)&local_48,psVar3); wrap_mysql_free_result(psVar3); if (display_result_sorted == '\x01') { dynstr_append_sorted(param_1,(st_dynamic_string *)&local_48,false); } else { dynstr_append_mem(param_1,local_48,local_40); } dynstr_free(&local_48); } return (ulong)uVar1; }
10,385
my_convert_using_func
eloqsql/strings/ctype.c
uint32 my_convert_using_func(char *to, size_t to_length, CHARSET_INFO *to_cs, my_charset_conv_wc_mb wc_mb, const char *from, size_t from_length, CHARSET_INFO *from_cs, my_charset_conv_mb_wc mb_wc, uint *errors) { int cnvres; my_wc_t wc; const uchar *from_end= (const uchar*) from + from_length; char *to_start= to; uchar *to_end= (uchar*) to + to_length; uint error_count= 0; while (1) { if ((cnvres= (*mb_wc)(from_cs, &wc, (uchar*) from, from_end)) > 0) from+= cnvres; else if (cnvres == MY_CS_ILSEQ) { error_count++; from++; wc= '?'; } else if (cnvres > MY_CS_TOOSMALL) { /* A correct multibyte sequence detected But it doesn't have Unicode mapping. */ error_count++; from+= (-cnvres); wc= '?'; } else { if ((uchar *) from >= from_end) break; /* End of line */ /* Incomplete byte sequence */ error_count++; from++; wc= '?'; } outp: if ((cnvres= (*wc_mb)(to_cs, wc, (uchar*) to, to_end)) > 0) to+= cnvres; else if (cnvres == MY_CS_ILUNI && wc != '?') { error_count++; wc= '?'; goto outp; } else break; } *errors= error_count; return (uint32) (to - to_start); }
O0
c
my_convert_using_func: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq 0x20(%rbp), %rax movq 0x18(%rbp), %rax movq 0x10(%rbp), %rax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x28(%rbp), %rax addq -0x30(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rax addq -0x10(%rbp), %rax movq %rax, -0x58(%rbp) movl $0x0, -0x5c(%rbp) movq 0x18(%rbp), %rax movq 0x10(%rbp), %rdi movq -0x28(%rbp), %rdx movq -0x48(%rbp), %rcx leaq -0x40(%rbp), %rsi callq *%rax movl %eax, -0x34(%rbp) cmpl $0x0, %eax jle 0xa1e14 movl -0x34(%rbp), %ecx movq -0x28(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) jmp 0xa1e92 cmpl $0x0, -0x34(%rbp) jne 0xa1e39 movl -0x5c(%rbp), %eax addl $0x1, %eax movl %eax, -0x5c(%rbp) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq $0x3f, -0x40(%rbp) jmp 0xa1e90 cmpl $-0x65, -0x34(%rbp) jle 0xa1e65 movl -0x5c(%rbp), %eax addl $0x1, %eax movl %eax, -0x5c(%rbp) xorl %ecx, %ecx subl -0x34(%rbp), %ecx movq -0x28(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movq $0x3f, -0x40(%rbp) jmp 0xa1e8e movq -0x28(%rbp), %rax cmpq -0x48(%rbp), %rax jb 0xa1e71 jmp 0xa1eec movl -0x5c(%rbp), %eax addl $0x1, %eax movl %eax, -0x5c(%rbp) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq $0x3f, -0x40(%rbp) jmp 0xa1e90 jmp 0xa1e92 jmp 0xa1e94 movq -0x20(%rbp), %rax movq -0x18(%rbp), %rdi movq -0x40(%rbp), %rsi movq -0x8(%rbp), %rdx movq -0x58(%rbp), %rcx callq *%rax movl %eax, -0x34(%rbp) cmpl $0x0, %eax jle 0xa1ec5 movl -0x34(%rbp), %ecx movq -0x8(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0xa1ee7 cmpl $0x0, -0x34(%rbp) jne 0xa1ee5 cmpq $0x3f, -0x40(%rbp) je 0xa1ee5 movl -0x5c(%rbp), %eax addl $0x1, %eax movl %eax, -0x5c(%rbp) movq $0x3f, -0x40(%rbp) jmp 0xa1e94 jmp 0xa1eec jmp 0xa1de3 movl -0x5c(%rbp), %ecx movq 0x20(%rbp), %rax movl %ecx, (%rax) movq -0x8(%rbp), %rax movq -0x50(%rbp), %rcx subq %rcx, %rax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_convert_using_func: push rbp mov rbp, rsp sub rsp, 60h mov rax, [rbp+arg_10] mov rax, [rbp+arg_8] mov rax, [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_30], r9 mov rax, [rbp+var_28] add rax, [rbp+var_30] mov [rbp+var_48], rax mov rax, [rbp+var_8] mov [rbp+var_50], rax mov rax, [rbp+var_8] add rax, [rbp+var_10] mov [rbp+var_58], rax mov [rbp+var_5C], 0 loc_A1DE3: mov rax, [rbp+arg_8] mov rdi, [rbp+arg_0] mov rdx, [rbp+var_28] mov rcx, [rbp+var_48] lea rsi, [rbp+var_40] call rax mov [rbp+var_34], eax cmp eax, 0 jle short loc_A1E14 mov ecx, [rbp+var_34] mov rax, [rbp+var_28] movsxd rcx, ecx add rax, rcx mov [rbp+var_28], rax jmp short loc_A1E92 loc_A1E14: cmp [rbp+var_34], 0 jnz short loc_A1E39 mov eax, [rbp+var_5C] add eax, 1 mov [rbp+var_5C], eax mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax mov [rbp+var_40], 3Fh ; '?' jmp short loc_A1E90 loc_A1E39: cmp [rbp+var_34], 0FFFFFF9Bh jle short loc_A1E65 mov eax, [rbp+var_5C] add eax, 1 mov [rbp+var_5C], eax xor ecx, ecx sub ecx, [rbp+var_34] mov rax, [rbp+var_28] movsxd rcx, ecx add rax, rcx mov [rbp+var_28], rax mov [rbp+var_40], 3Fh ; '?' jmp short loc_A1E8E loc_A1E65: mov rax, [rbp+var_28] cmp rax, [rbp+var_48] jb short loc_A1E71 jmp short loc_A1EEC loc_A1E71: mov eax, [rbp+var_5C] add eax, 1 mov [rbp+var_5C], eax mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax mov [rbp+var_40], 3Fh ; '?' loc_A1E8E: jmp short $+2 loc_A1E90: jmp short $+2 loc_A1E92: jmp short $+2 loc_A1E94: mov rax, [rbp+var_20] mov rdi, [rbp+var_18] mov rsi, [rbp+var_40] mov rdx, [rbp+var_8] mov rcx, [rbp+var_58] call rax mov [rbp+var_34], eax cmp eax, 0 jle short loc_A1EC5 mov ecx, [rbp+var_34] mov rax, [rbp+var_8] movsxd rcx, ecx add rax, rcx mov [rbp+var_8], rax jmp short loc_A1EE7 loc_A1EC5: cmp [rbp+var_34], 0 jnz short loc_A1EE5 cmp [rbp+var_40], 3Fh ; '?' jz short loc_A1EE5 mov eax, [rbp+var_5C] add eax, 1 mov [rbp+var_5C], eax mov [rbp+var_40], 3Fh ; '?' jmp short loc_A1E94 loc_A1EE5: jmp short loc_A1EEC loc_A1EE7: jmp loc_A1DE3 loc_A1EEC: mov ecx, [rbp+var_5C] mov rax, [rbp+arg_10] mov [rax], ecx mov rax, [rbp+var_8] mov rcx, [rbp+var_50] sub rax, rcx add rsp, 60h pop rbp retn
long long my_convert_using_func( long long a1, long long a2, long long a3, long long ( *a4)(long long, long long, long long, long long), unsigned long long a5, long long a6, long long a7, long long ( *a8)(long long, long long *, unsigned long long, unsigned long long), _DWORD *a9) { int v10; // [rsp+4h] [rbp-5Ch] unsigned long long v11; // [rsp+18h] [rbp-48h] long long v12; // [rsp+20h] [rbp-40h] BYREF int v13; // [rsp+2Ch] [rbp-34h] long long v14; // [rsp+30h] [rbp-30h] unsigned long long v15; // [rsp+38h] [rbp-28h] long long ( *v16)(long long, long long, long long, long long); // [rsp+40h] [rbp-20h] long long v17; // [rsp+48h] [rbp-18h] long long v18; // [rsp+50h] [rbp-10h] long long v19; // [rsp+58h] [rbp-8h] v19 = a1; v18 = a2; v17 = a3; v16 = a4; v15 = a5; v14 = a6; v11 = a6 + a5; v10 = 0; while ( 1 ) { v13 = a8(a7, &v12, v15, v11); if ( v13 > 0 ) { v15 += v13; goto LABEL_10; } if ( !v13 ) { ++v10; ++v15; v12 = 63LL; goto LABEL_10; } if ( v13 > -101 ) { ++v10; v15 += -v13; v12 = 63LL; goto LABEL_10; } if ( v15 >= v11 ) break; ++v10; ++v15; v12 = 63LL; LABEL_10: while ( 1 ) { v13 = v16(v17, v12, v19, a2 + a1); if ( v13 > 0 ) break; if ( v13 || v12 == 63 ) goto LABEL_15; ++v10; v12 = 63LL; } v19 += v13; } LABEL_15: *a9 = v10; return v19 - a1; }
my_convert_using_func: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV RAX,qword ptr [RBP + 0x20] MOV RAX,qword ptr [RBP + 0x18] MOV RAX,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 qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x58],RAX MOV dword ptr [RBP + -0x5c],0x0 LAB_001a1de3: MOV RAX,qword ptr [RBP + 0x18] MOV RDI,qword ptr [RBP + 0x10] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x48] LEA RSI,[RBP + -0x40] CALL RAX MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JLE 0x001a1e14 MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x28] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX JMP 0x001a1e92 LAB_001a1e14: CMP dword ptr [RBP + -0x34],0x0 JNZ 0x001a1e39 MOV EAX,dword ptr [RBP + -0x5c] ADD EAX,0x1 MOV dword ptr [RBP + -0x5c],EAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX MOV qword ptr [RBP + -0x40],0x3f JMP 0x001a1e90 LAB_001a1e39: CMP dword ptr [RBP + -0x34],-0x65 JLE 0x001a1e65 MOV EAX,dword ptr [RBP + -0x5c] ADD EAX,0x1 MOV dword ptr [RBP + -0x5c],EAX XOR ECX,ECX SUB ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x28] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV qword ptr [RBP + -0x40],0x3f JMP 0x001a1e8e LAB_001a1e65: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x48] JC 0x001a1e71 JMP 0x001a1eec LAB_001a1e71: MOV EAX,dword ptr [RBP + -0x5c] ADD EAX,0x1 MOV dword ptr [RBP + -0x5c],EAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX MOV qword ptr [RBP + -0x40],0x3f LAB_001a1e8e: JMP 0x001a1e90 LAB_001a1e90: JMP 0x001a1e92 LAB_001a1e92: JMP 0x001a1e94 LAB_001a1e94: MOV RAX,qword ptr [RBP + -0x20] MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x58] CALL RAX MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JLE 0x001a1ec5 MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x001a1ee7 LAB_001a1ec5: CMP dword ptr [RBP + -0x34],0x0 JNZ 0x001a1ee5 CMP qword ptr [RBP + -0x40],0x3f JZ 0x001a1ee5 MOV EAX,dword ptr [RBP + -0x5c] ADD EAX,0x1 MOV dword ptr [RBP + -0x5c],EAX MOV qword ptr [RBP + -0x40],0x3f JMP 0x001a1e94 LAB_001a1ee5: JMP 0x001a1eec LAB_001a1ee7: JMP 0x001a1de3 LAB_001a1eec: MOV ECX,dword ptr [RBP + -0x5c] MOV RAX,qword ptr [RBP + 0x20] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x50] SUB RAX,RCX ADD RSP,0x60 POP RBP RET
long my_convert_using_func (long param_1,long param_2,int8 param_3,code *param_4,ulong param_5, long param_6,int8 param_7,code *param_8,int *param_9) { int local_64; long local_48; int local_3c; long local_38; ulong local_30; code *local_28; int8 local_20; long local_18; long local_10; local_64 = 0; local_38 = param_6; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; do { local_3c = (*param_8)(param_7,&local_48,local_30); if (local_3c < 1) { if (local_3c == 0) { local_30 = local_30 + 1; } else if (local_3c < -100) { if (param_5 + param_6 <= local_30) { LAB_001a1eec: *param_9 = local_64; return local_10 - param_1; } local_30 = local_30 + 1; } else { local_30 = local_30 + (long)-local_3c; } local_64 = local_64 + 1; local_48 = 0x3f; } else { local_30 = local_30 + (long)local_3c; } while (local_3c = (*local_28)(local_20,local_48,local_10,param_1 + param_2), local_3c < 1) { if ((local_3c != 0) || (local_48 == 0x3f)) goto LAB_001a1eec; local_64 = local_64 + 1; local_48 = 0x3f; local_3c = 0; } local_10 = local_10 + local_3c; } while( true ); }
10,386
digest_hash_get_key(unsigned char const*, unsigned long*, char)
eloqsql/storage/perfschema/pfs_digest.cc
C_MODE_START static uchar *digest_hash_get_key(const uchar *entry, size_t *length, my_bool) { const PFS_statements_digest_stat * const *typed_entry; const PFS_statements_digest_stat *digest; const void *result; typed_entry= reinterpret_cast<const PFS_statements_digest_stat*const*>(entry); assert(typed_entry != NULL); digest= *typed_entry; assert(digest != NULL); *length= sizeof (PFS_digest_key); result= & digest->m_digest_key; return const_cast<uchar*> (reinterpret_cast<const uchar*> (result)); }
O3
cpp
digest_hash_get_key(unsigned char const*, unsigned long*, char): pushq %rbp movq %rsp, %rbp movq (%rdi), %rax movq $0xd4, (%rsi) addq $0x4, %rax popq %rbp retq
_ZL19digest_hash_get_keyPKhPmc: push rbp mov rbp, rsp mov rax, [rdi] mov qword ptr [rsi], 0D4h add rax, 4 pop rbp retn
long long digest_hash_get_key(const unsigned __int8 *a1, unsigned long long *a2) { long long v2; // rax v2 = *(_QWORD *)a1; *a2 = 212LL; return v2 + 4; }
digest_hash_get_key: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI] MOV qword ptr [RSI],0xd4 ADD RAX,0x4 POP RBP RET
/* digest_hash_get_key(unsigned char const*, unsigned long*, char) */ long digest_hash_get_key(uchar *param_1,ulong *param_2,char param_3) { long lVar1; lVar1 = *(long *)param_1; *param_2 = 0xd4; return lVar1 + 4; }
10,387
js_array_sort
bluesky950520[P]quickjs/quickjs.c
static JSValue js_array_sort(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { struct array_sort_context asc = { ctx, 0, 0, argv[0] }; JSValue obj = JS_UNDEFINED; ValueSlot *array = NULL; size_t array_size = 0, pos = 0, n = 0; int64_t i, len, undefined_count = 0; int present; if (!JS_IsUndefined(asc.method)) { if (check_function(ctx, asc.method)) goto exception; asc.has_method = 1; } obj = JS_ToObject(ctx, this_val); if (js_get_length64(ctx, &len, obj)) goto exception; /* XXX: should special case fast arrays */ for (i = 0; i < len; i++) { if (pos >= array_size) { size_t new_size, slack; ValueSlot *new_array; new_size = (array_size + (array_size >> 1) + 31) & ~15; new_array = js_realloc2(ctx, array, new_size * sizeof(*array), &slack); if (new_array == NULL) goto exception; new_size += slack / sizeof(*new_array); array = new_array; array_size = new_size; } present = JS_TryGetPropertyInt64(ctx, obj, i, &array[pos].val); if (present < 0) goto exception; if (present == 0) continue; if (JS_IsUndefined(array[pos].val)) { undefined_count++; continue; } array[pos].str = NULL; array[pos].pos = i; pos++; } rqsort(array, pos, sizeof(*array), js_array_cmp_generic, &asc); if (asc.exception) goto exception; /* XXX: should special case fast arrays */ while (n < pos) { if (array[n].str) JS_FreeValue(ctx, JS_MKPTR(JS_TAG_STRING, array[n].str)); if (array[n].pos == n) { JS_FreeValue(ctx, array[n].val); } else { if (JS_SetPropertyInt64(ctx, obj, n, array[n].val) < 0) { n++; goto exception; } } n++; } js_free(ctx, array); for (i = n; undefined_count-- > 0; i++) { if (JS_SetPropertyInt64(ctx, obj, i, JS_UNDEFINED) < 0) goto fail; } for (; i < len; i++) { if (JS_DeletePropertyInt64(ctx, obj, i, JS_PROP_THROW) < 0) goto fail; } return obj; exception: for (; n < pos; n++) { JS_FreeValue(ctx, array[n].val); if (array[n].str) JS_FreeValue(ctx, JS_MKPTR(JS_TAG_STRING, array[n].str)); } js_free(ctx, array); fail: JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O0
c
js_array_sort: subq $0x108, %rsp # imm = 0x108 movq %rsi, 0xe8(%rsp) movq %rdx, 0xf0(%rsp) movq %rdi, 0xe0(%rsp) movl %ecx, 0xdc(%rsp) movq %r8, 0xd0(%rsp) movq 0xe0(%rsp), %rax movq %rax, 0xb0(%rsp) movl $0x0, 0xb8(%rsp) movl $0x0, 0xbc(%rsp) movq 0xd0(%rsp), %rax movq (%rax), %rcx movq %rcx, 0xc0(%rsp) movq 0x8(%rax), %rax movq %rax, 0xc8(%rsp) movq 0x42126(%rip), %rax # 0x10d980 movq %rax, 0xa0(%rsp) movq 0x4211f(%rip), %rax # 0x10d988 movq %rax, 0xa8(%rsp) movq $0x0, 0x98(%rsp) movq $0x0, 0x90(%rsp) movq $0x0, 0x88(%rsp) movq $0x0, 0x80(%rsp) movq $0x0, 0x68(%rsp) movq 0xc0(%rsp), %rdi movq 0xc8(%rsp), %rsi callq 0x2e260 cmpl $0x0, %eax jne 0xcb8f6 movq 0xe0(%rsp), %rdi movq 0xc0(%rsp), %rsi movq 0xc8(%rsp), %rdx callq 0x6da80 cmpl $0x0, %eax je 0xcb8eb jmp 0xcbd8f movl $0x1, 0xbc(%rsp) movq 0xe0(%rsp), %rdi movq 0xe8(%rsp), %rsi movq 0xf0(%rsp), %rdx callq 0x37770 movq %rax, 0x50(%rsp) movq %rdx, 0x58(%rsp) movq 0x50(%rsp), %rax movq %rax, 0xa0(%rsp) movq 0x58(%rsp), %rax movq %rax, 0xa8(%rsp) movq 0xe0(%rsp), %rdi movq 0xa0(%rsp), %rdx movq 0xa8(%rsp), %rcx leaq 0x70(%rsp), %rsi callq 0x2df60 cmpl $0x0, %eax je 0xcb963 jmp 0xcbd8f movq $0x0, 0x78(%rsp) movq 0x78(%rsp), %rax cmpq 0x70(%rsp), %rax jge 0xcbb0a movq 0x88(%rsp), %rax cmpq 0x90(%rsp), %rax jb 0xcba17 movq 0x90(%rsp), %rax movq 0x90(%rsp), %rcx shrq %rcx addq %rcx, %rax addq $0x1f, %rax andq $-0x10, %rax movq %rax, 0x48(%rsp) movq 0xe0(%rsp), %rdi movq 0x98(%rsp), %rsi movq 0x48(%rsp), %rdx shlq $0x5, %rdx leaq 0x40(%rsp), %rcx callq 0x21e80 movq %rax, 0x38(%rsp) cmpq $0x0, 0x38(%rsp) jne 0xcb9ea jmp 0xcbd8f movq 0x40(%rsp), %rax shrq $0x5, %rax addq 0x48(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x98(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x90(%rsp) movq 0xe0(%rsp), %rdi movq 0x78(%rsp), %rcx movq 0x98(%rsp), %r8 movq 0x88(%rsp), %rax shlq $0x5, %rax addq %rax, %r8 movq 0xa0(%rsp), %rsi movq 0xa8(%rsp), %rdx callq 0x87ba0 movl %eax, 0x64(%rsp) cmpl $0x0, 0x64(%rsp) jge 0xcba60 jmp 0xcbd8f cmpl $0x0, 0x64(%rsp) jne 0xcba6c jmp 0xcbaf7 movq 0x98(%rsp), %rax movq 0x88(%rsp), %rcx shlq $0x5, %rcx addq %rcx, %rax movq (%rax), %rdi movq 0x8(%rax), %rsi callq 0x2e260 cmpl $0x0, %eax je 0xcbaa4 movq 0x68(%rsp), %rax addq $0x1, %rax movq %rax, 0x68(%rsp) jmp 0xcbaf7 movq 0x98(%rsp), %rax movq 0x88(%rsp), %rcx shlq $0x5, %rcx addq %rcx, %rax movq $0x0, 0x10(%rax) movq 0x78(%rsp), %rcx movq 0x98(%rsp), %rax movq 0x88(%rsp), %rdx shlq $0x5, %rdx addq %rdx, %rax movq %rcx, 0x18(%rax) movq 0x88(%rsp), %rax addq $0x1, %rax movq %rax, 0x88(%rsp) movq 0x78(%rsp), %rax addq $0x1, %rax movq %rax, 0x78(%rsp) jmp 0xcb96c movq 0x98(%rsp), %rdi movq 0x88(%rsp), %rsi movl $0x20, %edx leaq 0x2d0a(%rip), %rcx # 0xce830 leaq 0xb0(%rsp), %r8 callq 0x202a0 cmpl $0x0, 0xb8(%rsp) je 0xcbb42 jmp 0xcbd8f jmp 0xcbb44 movq 0x80(%rsp), %rax cmpq 0x88(%rsp), %rax jae 0xcbc86 movq 0x98(%rsp), %rax movq 0x80(%rsp), %rcx shlq $0x5, %rcx addq %rcx, %rax cmpq $0x0, 0x10(%rax) je 0xcbbb8 movq 0xe0(%rsp), %rdi movq 0x98(%rsp), %rax movq 0x80(%rsp), %rcx shlq $0x5, %rcx addq %rcx, %rax movq 0x10(%rax), %rax movq %rax, 0x28(%rsp) movq $-0x7, 0x30(%rsp) movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx callq 0x23c90 movq 0x98(%rsp), %rax movq 0x80(%rsp), %rcx shlq $0x5, %rcx addq %rcx, %rax movq 0x18(%rax), %rax cmpq 0x80(%rsp), %rax jne 0xcbc0a movq 0xe0(%rsp), %rdi movq 0x98(%rsp), %rax movq 0x80(%rsp), %rcx shlq $0x5, %rcx addq %rcx, %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x23c90 jmp 0xcbc6d movq 0xe0(%rsp), %rdi movq 0x80(%rsp), %rcx movq 0x98(%rsp), %rax movq 0x80(%rsp), %rdx shlq $0x5, %rdx addq %rdx, %rax movq 0xa0(%rsp), %rsi movq 0xa8(%rsp), %rdx movq (%rax), %r8 movq 0x8(%rax), %r9 callq 0x33bb0 cmpl $0x0, %eax jge 0xcbc6b movq 0x80(%rsp), %rax addq $0x1, %rax movq %rax, 0x80(%rsp) jmp 0xcbd8f jmp 0xcbc6d movq 0x80(%rsp), %rax addq $0x1, %rax movq %rax, 0x80(%rsp) jmp 0xcbb44 movq 0xe0(%rsp), %rdi movq 0x98(%rsp), %rsi callq 0x21db0 movq 0x80(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x68(%rsp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, 0x68(%rsp) cmpq $0x0, %rax jle 0xcbd18 movq 0xe0(%rsp), %rdi movq 0x78(%rsp), %rcx movl $0x0, 0x18(%rsp) movq $0x3, 0x20(%rsp) movq 0xa0(%rsp), %rsi movq 0xa8(%rsp), %rdx movq 0x18(%rsp), %r8 movq 0x20(%rsp), %r9 callq 0x33bb0 cmpl $0x0, %eax jge 0xcbd06 jmp 0xcbe60 jmp 0xcbd08 movq 0x78(%rsp), %rax addq $0x1, %rax movq %rax, 0x78(%rsp) jmp 0xcbca8 jmp 0xcbd1a movq 0x78(%rsp), %rax cmpq 0x70(%rsp), %rax jge 0xcbd6a movq 0xe0(%rsp), %rdi movq 0x78(%rsp), %rcx movq 0xa0(%rsp), %rsi movq 0xa8(%rsp), %rdx movl $0x4000, %r8d # imm = 0x4000 callq 0x37f90 cmpl $0x0, %eax jge 0xcbd58 jmp 0xcbe60 jmp 0xcbd5a movq 0x78(%rsp), %rax addq $0x1, %rax movq %rax, 0x78(%rsp) jmp 0xcbd1a movq 0xa0(%rsp), %rax movq %rax, 0xf8(%rsp) movq 0xa8(%rsp), %rax movq %rax, 0x100(%rsp) jmp 0xcbe94 jmp 0xcbd91 movq 0x80(%rsp), %rax cmpq 0x88(%rsp), %rax jae 0xcbe4b movq 0xe0(%rsp), %rdi movq 0x98(%rsp), %rax movq 0x80(%rsp), %rcx shlq $0x5, %rcx addq %rcx, %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x23c90 movq 0x98(%rsp), %rax movq 0x80(%rsp), %rcx shlq $0x5, %rcx addq %rcx, %rax cmpq $0x0, 0x10(%rax) je 0xcbe30 movq 0xe0(%rsp), %rdi movq 0x98(%rsp), %rax movq 0x80(%rsp), %rcx shlq $0x5, %rcx addq %rcx, %rax movq 0x10(%rax), %rax movq %rax, 0x8(%rsp) movq $-0x7, 0x10(%rsp) movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx callq 0x23c90 jmp 0xcbe32 movq 0x80(%rsp), %rax addq $0x1, %rax movq %rax, 0x80(%rsp) jmp 0xcbd91 movq 0xe0(%rsp), %rdi movq 0x98(%rsp), %rsi callq 0x21db0 movq 0xe0(%rsp), %rdi movq 0xa0(%rsp), %rsi movq 0xa8(%rsp), %rdx callq 0x23c90 movl $0x0, 0xf8(%rsp) movq $0x6, 0x100(%rsp) movq 0xf8(%rsp), %rax movq 0x100(%rsp), %rdx addq $0x108, %rsp # imm = 0x108 retq nopl (%rax)
js_array_sort: sub rsp, 108h mov [rsp+108h+var_20], rsi mov [rsp+108h+var_18], rdx mov [rsp+108h+var_28], rdi mov [rsp+108h+var_2C], ecx mov [rsp+108h+var_38], r8 mov rax, [rsp+108h+var_28] mov [rsp+108h+var_58], rax mov [rsp+108h+var_50], 0 mov [rsp+108h+var_4C], 0 mov rax, [rsp+108h+var_38] mov rcx, [rax] mov [rsp+108h+var_48], rcx mov rax, [rax+8] mov [rsp+108h+var_40], rax mov rax, cs:qword_10D980 mov [rsp+108h+var_68], rax mov rax, cs:qword_10D988 mov [rsp+108h+var_60], rax mov [rsp+108h+var_70], 0 mov [rsp+108h+var_78], 0 mov [rsp+108h+var_80], 0 mov [rsp+108h+var_88], 0 mov [rsp+108h+var_A0], 0 mov rdi, [rsp+108h+var_48] mov rsi, [rsp+108h+var_40] call JS_IsUndefined_0 cmp eax, 0 jnz short loc_CB8F6 mov rdi, [rsp+108h+var_28] mov rsi, [rsp+108h+var_48] mov rdx, [rsp+108h+var_40] call check_function cmp eax, 0 jz short loc_CB8EB jmp loc_CBD8F loc_CB8EB: mov [rsp+108h+var_4C], 1 loc_CB8F6: mov rdi, [rsp+108h+var_28] mov rsi, [rsp+108h+var_20] mov rdx, [rsp+108h+var_18] call JS_ToObject mov [rsp+108h+var_B8], rax mov [rsp+108h+var_B0], rdx mov rax, [rsp+108h+var_B8] mov [rsp+108h+var_68], rax mov rax, [rsp+108h+var_B0] mov [rsp+108h+var_60], rax mov rdi, [rsp+108h+var_28] mov rdx, [rsp+108h+var_68] mov rcx, [rsp+108h+var_60] lea rsi, [rsp+108h+var_98] call js_get_length64 cmp eax, 0 jz short loc_CB963 jmp loc_CBD8F loc_CB963: mov [rsp+108h+var_90], 0 loc_CB96C: mov rax, [rsp+108h+var_90] cmp rax, [rsp+108h+var_98] jge loc_CBB0A mov rax, [rsp+108h+var_80] cmp rax, [rsp+108h+var_78] jb loc_CBA17 mov rax, [rsp+108h+var_78] mov rcx, [rsp+108h+var_78] shr rcx, 1 add rax, rcx add rax, 1Fh and rax, 0FFFFFFFFFFFFFFF0h mov [rsp+108h+var_C0], rax mov rdi, [rsp+108h+var_28] mov rsi, [rsp+108h+var_70] mov rdx, [rsp+108h+var_C0] shl rdx, 5 lea rcx, [rsp+108h+var_C8] call js_realloc2 mov [rsp+108h+var_D0], rax cmp [rsp+108h+var_D0], 0 jnz short loc_CB9EA jmp loc_CBD8F loc_CB9EA: mov rax, [rsp+108h+var_C8] shr rax, 5 add rax, [rsp+108h+var_C0] mov [rsp+108h+var_C0], rax mov rax, [rsp+108h+var_D0] mov [rsp+108h+var_70], rax mov rax, [rsp+108h+var_C0] mov [rsp+108h+var_78], rax loc_CBA17: mov rdi, [rsp+108h+var_28] mov rcx, [rsp+108h+var_90] mov r8, [rsp+108h+var_70] mov rax, [rsp+108h+var_80] shl rax, 5 add r8, rax mov rsi, [rsp+108h+var_68] mov rdx, [rsp+108h+var_60] call JS_TryGetPropertyInt64 mov [rsp+108h+var_A4], eax cmp [rsp+108h+var_A4], 0 jge short loc_CBA60 jmp loc_CBD8F loc_CBA60: cmp [rsp+108h+var_A4], 0 jnz short loc_CBA6C jmp loc_CBAF7 loc_CBA6C: mov rax, [rsp+108h+var_70] mov rcx, [rsp+108h+var_80] shl rcx, 5 add rax, rcx mov rdi, [rax] mov rsi, [rax+8] call JS_IsUndefined_0 cmp eax, 0 jz short loc_CBAA4 mov rax, [rsp+108h+var_A0] add rax, 1 mov [rsp+108h+var_A0], rax jmp short loc_CBAF7 loc_CBAA4: mov rax, [rsp+108h+var_70] mov rcx, [rsp+108h+var_80] shl rcx, 5 add rax, rcx mov qword ptr [rax+10h], 0 mov rcx, [rsp+108h+var_90] mov rax, [rsp+108h+var_70] mov rdx, [rsp+108h+var_80] shl rdx, 5 add rax, rdx mov [rax+18h], rcx mov rax, [rsp+108h+var_80] add rax, 1 mov [rsp+108h+var_80], rax loc_CBAF7: mov rax, [rsp+108h+var_90] add rax, 1 mov [rsp+108h+var_90], rax jmp loc_CB96C loc_CBB0A: mov rdi, [rsp+108h+var_70] mov rsi, [rsp+108h+var_80] mov edx, 20h ; ' ' lea rcx, js_array_cmp_generic lea r8, [rsp+108h+var_58] call rqsort cmp [rsp+108h+var_50], 0 jz short loc_CBB42 jmp loc_CBD8F loc_CBB42: jmp short $+2 loc_CBB44: mov rax, [rsp+108h+var_88] cmp rax, [rsp+108h+var_80] jnb loc_CBC86 mov rax, [rsp+108h+var_70] mov rcx, [rsp+108h+var_88] shl rcx, 5 add rax, rcx cmp qword ptr [rax+10h], 0 jz short loc_CBBB8 mov rdi, [rsp+108h+var_28] mov rax, [rsp+108h+var_70] mov rcx, [rsp+108h+var_88] shl rcx, 5 add rax, rcx mov rax, [rax+10h] mov [rsp+108h+var_E0], rax mov [rsp+108h+var_D8], 0FFFFFFFFFFFFFFF9h mov rsi, [rsp+108h+var_E0] mov rdx, [rsp+108h+var_D8] call JS_FreeValue loc_CBBB8: mov rax, [rsp+108h+var_70] mov rcx, [rsp+108h+var_88] shl rcx, 5 add rax, rcx mov rax, [rax+18h] cmp rax, [rsp+108h+var_88] jnz short loc_CBC0A mov rdi, [rsp+108h+var_28] mov rax, [rsp+108h+var_70] mov rcx, [rsp+108h+var_88] shl rcx, 5 add rax, rcx mov rsi, [rax] mov rdx, [rax+8] call JS_FreeValue jmp short loc_CBC6D loc_CBC0A: mov rdi, [rsp+108h+var_28] mov rcx, [rsp+108h+var_88] mov rax, [rsp+108h+var_70] mov rdx, [rsp+108h+var_88] shl rdx, 5 add rax, rdx mov rsi, [rsp+108h+var_68] mov rdx, [rsp+108h+var_60] mov r8, [rax] mov r9, [rax+8] call JS_SetPropertyInt64 cmp eax, 0 jge short loc_CBC6B mov rax, [rsp+108h+var_88] add rax, 1 mov [rsp+108h+var_88], rax jmp loc_CBD8F loc_CBC6B: jmp short $+2 loc_CBC6D: mov rax, [rsp+108h+var_88] add rax, 1 mov [rsp+108h+var_88], rax jmp loc_CBB44 loc_CBC86: mov rdi, [rsp+108h+var_28] mov rsi, [rsp+108h+var_70] call js_free mov rax, [rsp+108h+var_88] mov [rsp+108h+var_90], rax loc_CBCA8: mov rax, [rsp+108h+var_A0] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rsp+108h+var_A0], rcx cmp rax, 0 jle short loc_CBD18 mov rdi, [rsp+108h+var_28] mov rcx, [rsp+108h+var_90] mov dword ptr [rsp+108h+var_F0], 0 mov [rsp+108h+var_E8], 3 mov rsi, [rsp+108h+var_68] mov rdx, [rsp+108h+var_60] mov r8, [rsp+108h+var_F0] mov r9, [rsp+108h+var_E8] call JS_SetPropertyInt64 cmp eax, 0 jge short loc_CBD06 jmp loc_CBE60 loc_CBD06: jmp short $+2 loc_CBD08: mov rax, [rsp+108h+var_90] add rax, 1 mov [rsp+108h+var_90], rax jmp short loc_CBCA8 loc_CBD18: jmp short $+2 loc_CBD1A: mov rax, [rsp+108h+var_90] cmp rax, [rsp+108h+var_98] jge short loc_CBD6A mov rdi, [rsp+108h+var_28] mov rcx, [rsp+108h+var_90] mov rsi, [rsp+108h+var_68] mov rdx, [rsp+108h+var_60] mov r8d, 4000h call JS_DeletePropertyInt64 cmp eax, 0 jge short loc_CBD58 jmp loc_CBE60 loc_CBD58: jmp short $+2 loc_CBD5A: mov rax, [rsp+108h+var_90] add rax, 1 mov [rsp+108h+var_90], rax jmp short loc_CBD1A loc_CBD6A: mov rax, [rsp+108h+var_68] mov [rsp+108h+var_10], rax mov rax, [rsp+108h+var_60] mov [rsp+108h+var_8], rax jmp loc_CBE94 loc_CBD8F: jmp short $+2 loc_CBD91: mov rax, [rsp+108h+var_88] cmp rax, [rsp+108h+var_80] jnb loc_CBE4B mov rdi, [rsp+108h+var_28] mov rax, [rsp+108h+var_70] mov rcx, [rsp+108h+var_88] shl rcx, 5 add rax, rcx mov rsi, [rax] mov rdx, [rax+8] call JS_FreeValue mov rax, [rsp+108h+var_70] mov rcx, [rsp+108h+var_88] shl rcx, 5 add rax, rcx cmp qword ptr [rax+10h], 0 jz short loc_CBE30 mov rdi, [rsp+108h+var_28] mov rax, [rsp+108h+var_70] mov rcx, [rsp+108h+var_88] shl rcx, 5 add rax, rcx mov rax, [rax+10h] mov [rsp+108h+var_100], rax mov [rsp+108h+var_F8], 0FFFFFFFFFFFFFFF9h mov rsi, [rsp+108h+var_100] mov rdx, [rsp+108h+var_F8] call JS_FreeValue loc_CBE30: jmp short $+2 loc_CBE32: mov rax, [rsp+108h+var_88] add rax, 1 mov [rsp+108h+var_88], rax jmp loc_CBD91 loc_CBE4B: mov rdi, [rsp+108h+var_28] mov rsi, [rsp+108h+var_70] call js_free loc_CBE60: mov rdi, [rsp+108h+var_28] mov rsi, [rsp+108h+var_68] mov rdx, [rsp+108h+var_60] call JS_FreeValue mov dword ptr [rsp+108h+var_10], 0 mov [rsp+108h+var_8], 6 loc_CBE94: mov rax, [rsp+108h+var_10] mov rdx, [rsp+108h+var_8] add rsp, 108h retn
long long js_array_sort( long long a1, _DWORD *a2, long long a3, int a4, long long *a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { long long v13; // rcx long long v14; // r8 long long v15; // r9 __m128 v16; // xmm4 __m128 v17; // xmm5 long long v18; // rdx double v19; // xmm4_8 double v20; // xmm5_8 long long v21; // rax long long v23; // [rsp+18h] [rbp-F0h] long long v24; // [rsp+38h] [rbp-D0h] unsigned long long v25; // [rsp+40h] [rbp-C8h] BYREF unsigned long long v26; // [rsp+48h] [rbp-C0h] _DWORD *v27; // [rsp+50h] [rbp-B8h] long long v28; // [rsp+58h] [rbp-B0h] int PropertyInt64; // [rsp+64h] [rbp-A4h] long long v30; // [rsp+68h] [rbp-A0h] signed long long v31; // [rsp+70h] [rbp-98h] BYREF signed long long i; // [rsp+78h] [rbp-90h] unsigned long long v33; // [rsp+80h] [rbp-88h] unsigned long long v34; // [rsp+88h] [rbp-80h] unsigned long long v35; // [rsp+90h] [rbp-78h] long long v36; // [rsp+98h] [rbp-70h] _DWORD *v37; // [rsp+A0h] [rbp-68h] long long v38; // [rsp+A8h] [rbp-60h] long long v39; // [rsp+B0h] [rbp-58h] BYREF int v40; // [rsp+B8h] [rbp-50h] int v41; // [rsp+BCh] [rbp-4Ch] long long v42; // [rsp+C0h] [rbp-48h] long long v43; // [rsp+C8h] [rbp-40h] long long *v44; // [rsp+D0h] [rbp-38h] int v45; // [rsp+DCh] [rbp-2Ch] long long v46; // [rsp+E0h] [rbp-28h] _DWORD *v47; // [rsp+E8h] [rbp-20h] long long v48; // [rsp+F0h] [rbp-18h] long long v49; // [rsp+F8h] [rbp-10h] long long v50; // [rsp+100h] [rbp-8h] v47 = a2; v48 = a3; v46 = a1; v45 = a4; v44 = a5; v39 = a1; v40 = 0; v41 = 0; v42 = *a5; v43 = a5[1]; v37 = 0LL; v38 = 3LL; v36 = 0LL; v35 = 0LL; v34 = 0LL; v33 = 0LL; v30 = 0LL; if ( !JS_IsUndefined_0(v42, v43) ) { if ( (unsigned int)check_function( v46, v42, v43, a6, a7, a8, a9, *(double *)v16.m128_u64, *(double *)v17.m128_u64, a12, a13) ) { LABEL_33: while ( v33 < v34 ) { JS_FreeValue(v46, *(_QWORD *)(32 * v33 + v36), *(_QWORD *)(32 * v33 + v36 + 8)); if ( *(_QWORD *)(32 * v33 + v36 + 16) ) JS_FreeValue(v46, *(_QWORD *)(32 * v33 + v36 + 16), -7LL); ++v33; } js_free(v46, v36); LABEL_38: JS_FreeValue(v46, (long long)v37, v38); LODWORD(v49) = 0; v50 = 6LL; return v49; } v41 = 1; } v27 = JS_ToObject(v46, v47, v48, a6, a7, a8, a9, v16, v17, a12, a13, v13, v14, v15); v28 = v18; v37 = v27; v38 = v18; if ( (unsigned int)js_get_length64(v46, &v31, (int)v27, v18) ) goto LABEL_33; for ( i = 0LL; i < v31; ++i ) { if ( v34 >= v35 ) { v26 = ((v35 >> 1) + v35 + 31) & 0xFFFFFFFFFFFFFFF0LL; v24 = js_realloc2(v46, v36, 32 * v26, &v25); if ( !v24 ) goto LABEL_33; v26 += v25 >> 5; v36 = v24; v35 = v26; } PropertyInt64 = JS_TryGetPropertyInt64(v46, (long long)v37, v38, i, (long long *)(32 * v34 + v36)); if ( PropertyInt64 < 0 ) goto LABEL_33; if ( PropertyInt64 ) { if ( JS_IsUndefined_0(*(_QWORD *)(32 * v34 + v36), *(_QWORD *)(32 * v34 + v36 + 8)) ) { ++v30; } else { *(_QWORD *)(32 * v34 + v36 + 16) = 0LL; *(_QWORD *)(32 * v34++ + v36 + 24) = i; } } } rqsort( v36, v34, 32LL, (long long ( *)(unsigned long long, unsigned long long, long long))js_array_cmp_generic, (long long)&v39); if ( v40 ) goto LABEL_33; while ( v33 < v34 ) { if ( *(_QWORD *)(32 * v33 + v36 + 16) ) JS_FreeValue(v46, *(_QWORD *)(32 * v33 + v36 + 16), -7LL); if ( *(_QWORD *)(32 * v33 + v36 + 24) == v33 ) { JS_FreeValue(v46, *(_QWORD *)(32 * v33 + v36), *(_QWORD *)(32 * v33 + v36 + 8)); } else if ( (int)JS_SetPropertyInt64( v46, (long long)v37, v38, v33, *(_QWORD *)(32 * v33 + v36), *(_QWORD *)(32 * v33 + v36 + 8)) < 0 ) { ++v33; goto LABEL_33; } ++v33; } js_free(v46, v36); for ( i = v33; ; ++i ) { v21 = v30--; if ( v21 <= 0 ) break; LODWORD(v23) = 0; if ( (int)JS_SetPropertyInt64(v46, (long long)v37, v38, i, v23, 3LL) < 0 ) goto LABEL_38; } while ( i < v31 ) { if ( (int)JS_DeletePropertyInt64(v46, (long long)v37, v38, i, 0x4000, a6, a7, a8, a9, v19, v20, a12, a13) < 0 ) goto LABEL_38; ++i; } v49 = (long long)v37; v50 = v38; return v49; }
js_array_sort: SUB RSP,0x108 MOV qword ptr [RSP + 0xe8],RSI MOV qword ptr [RSP + 0xf0],RDX MOV qword ptr [RSP + 0xe0],RDI MOV dword ptr [RSP + 0xdc],ECX MOV qword ptr [RSP + 0xd0],R8 MOV RAX,qword ptr [RSP + 0xe0] MOV qword ptr [RSP + 0xb0],RAX MOV dword ptr [RSP + 0xb8],0x0 MOV dword ptr [RSP + 0xbc],0x0 MOV RAX,qword ptr [RSP + 0xd0] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP + 0xc0],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0xc8],RAX MOV RAX,qword ptr [0x0020d980] MOV qword ptr [RSP + 0xa0],RAX MOV RAX,qword ptr [0x0020d988] MOV qword ptr [RSP + 0xa8],RAX MOV qword ptr [RSP + 0x98],0x0 MOV qword ptr [RSP + 0x90],0x0 MOV qword ptr [RSP + 0x88],0x0 MOV qword ptr [RSP + 0x80],0x0 MOV qword ptr [RSP + 0x68],0x0 MOV RDI,qword ptr [RSP + 0xc0] MOV RSI,qword ptr [RSP + 0xc8] CALL 0x0012e260 CMP EAX,0x0 JNZ 0x001cb8f6 MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0xc0] MOV RDX,qword ptr [RSP + 0xc8] CALL 0x0016da80 CMP EAX,0x0 JZ 0x001cb8eb JMP 0x001cbd8f LAB_001cb8eb: MOV dword ptr [RSP + 0xbc],0x1 LAB_001cb8f6: MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0xe8] MOV RDX,qword ptr [RSP + 0xf0] CALL 0x00137770 MOV qword ptr [RSP + 0x50],RAX MOV qword ptr [RSP + 0x58],RDX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0xa0],RAX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0xa8],RAX MOV RDI,qword ptr [RSP + 0xe0] MOV RDX,qword ptr [RSP + 0xa0] MOV RCX,qword ptr [RSP + 0xa8] LEA RSI,[RSP + 0x70] CALL 0x0012df60 CMP EAX,0x0 JZ 0x001cb963 JMP 0x001cbd8f LAB_001cb963: MOV qword ptr [RSP + 0x78],0x0 LAB_001cb96c: MOV RAX,qword ptr [RSP + 0x78] CMP RAX,qword ptr [RSP + 0x70] JGE 0x001cbb0a MOV RAX,qword ptr [RSP + 0x88] CMP RAX,qword ptr [RSP + 0x90] JC 0x001cba17 MOV RAX,qword ptr [RSP + 0x90] MOV RCX,qword ptr [RSP + 0x90] SHR RCX,0x1 ADD RAX,RCX ADD RAX,0x1f AND RAX,-0x10 MOV qword ptr [RSP + 0x48],RAX MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0x98] MOV RDX,qword ptr [RSP + 0x48] SHL RDX,0x5 LEA RCX,[RSP + 0x40] CALL 0x00121e80 MOV qword ptr [RSP + 0x38],RAX CMP qword ptr [RSP + 0x38],0x0 JNZ 0x001cb9ea JMP 0x001cbd8f LAB_001cb9ea: MOV RAX,qword ptr [RSP + 0x40] SHR RAX,0x5 ADD RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x98],RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x90],RAX LAB_001cba17: MOV RDI,qword ptr [RSP + 0xe0] MOV RCX,qword ptr [RSP + 0x78] MOV R8,qword ptr [RSP + 0x98] MOV RAX,qword ptr [RSP + 0x88] SHL RAX,0x5 ADD R8,RAX MOV RSI,qword ptr [RSP + 0xa0] MOV RDX,qword ptr [RSP + 0xa8] CALL 0x00187ba0 MOV dword ptr [RSP + 0x64],EAX CMP dword ptr [RSP + 0x64],0x0 JGE 0x001cba60 JMP 0x001cbd8f LAB_001cba60: CMP dword ptr [RSP + 0x64],0x0 JNZ 0x001cba6c JMP 0x001cbaf7 LAB_001cba6c: MOV RAX,qword ptr [RSP + 0x98] MOV RCX,qword ptr [RSP + 0x88] SHL RCX,0x5 ADD RAX,RCX MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x8] CALL 0x0012e260 CMP EAX,0x0 JZ 0x001cbaa4 MOV RAX,qword ptr [RSP + 0x68] ADD RAX,0x1 MOV qword ptr [RSP + 0x68],RAX JMP 0x001cbaf7 LAB_001cbaa4: MOV RAX,qword ptr [RSP + 0x98] MOV RCX,qword ptr [RSP + 0x88] SHL RCX,0x5 ADD RAX,RCX MOV qword ptr [RAX + 0x10],0x0 MOV RCX,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RSP + 0x98] MOV RDX,qword ptr [RSP + 0x88] SHL RDX,0x5 ADD RAX,RDX MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RSP + 0x88] ADD RAX,0x1 MOV qword ptr [RSP + 0x88],RAX LAB_001cbaf7: MOV RAX,qword ptr [RSP + 0x78] ADD RAX,0x1 MOV qword ptr [RSP + 0x78],RAX JMP 0x001cb96c LAB_001cbb0a: MOV RDI,qword ptr [RSP + 0x98] MOV RSI,qword ptr [RSP + 0x88] MOV EDX,0x20 LEA RCX,[0x1ce830] LEA R8,[RSP + 0xb0] CALL 0x001202a0 CMP dword ptr [RSP + 0xb8],0x0 JZ 0x001cbb42 JMP 0x001cbd8f LAB_001cbb42: JMP 0x001cbb44 LAB_001cbb44: MOV RAX,qword ptr [RSP + 0x80] CMP RAX,qword ptr [RSP + 0x88] JNC 0x001cbc86 MOV RAX,qword ptr [RSP + 0x98] MOV RCX,qword ptr [RSP + 0x80] SHL RCX,0x5 ADD RAX,RCX CMP qword ptr [RAX + 0x10],0x0 JZ 0x001cbbb8 MOV RDI,qword ptr [RSP + 0xe0] MOV RAX,qword ptr [RSP + 0x98] MOV RCX,qword ptr [RSP + 0x80] SHL RCX,0x5 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x30],-0x7 MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] CALL 0x00123c90 LAB_001cbbb8: MOV RAX,qword ptr [RSP + 0x98] MOV RCX,qword ptr [RSP + 0x80] SHL RCX,0x5 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x18] CMP RAX,qword ptr [RSP + 0x80] JNZ 0x001cbc0a MOV RDI,qword ptr [RSP + 0xe0] MOV RAX,qword ptr [RSP + 0x98] MOV RCX,qword ptr [RSP + 0x80] SHL RCX,0x5 ADD RAX,RCX MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x00123c90 JMP 0x001cbc6d LAB_001cbc0a: MOV RDI,qword ptr [RSP + 0xe0] MOV RCX,qword ptr [RSP + 0x80] MOV RAX,qword ptr [RSP + 0x98] MOV RDX,qword ptr [RSP + 0x80] SHL RDX,0x5 ADD RAX,RDX MOV RSI,qword ptr [RSP + 0xa0] MOV RDX,qword ptr [RSP + 0xa8] MOV R8,qword ptr [RAX] MOV R9,qword ptr [RAX + 0x8] CALL 0x00133bb0 CMP EAX,0x0 JGE 0x001cbc6b MOV RAX,qword ptr [RSP + 0x80] ADD RAX,0x1 MOV qword ptr [RSP + 0x80],RAX JMP 0x001cbd8f LAB_001cbc6b: JMP 0x001cbc6d LAB_001cbc6d: MOV RAX,qword ptr [RSP + 0x80] ADD RAX,0x1 MOV qword ptr [RSP + 0x80],RAX JMP 0x001cbb44 LAB_001cbc86: MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0x98] CALL 0x00121db0 MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x78],RAX LAB_001cbca8: MOV RAX,qword ptr [RSP + 0x68] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RSP + 0x68],RCX CMP RAX,0x0 JLE 0x001cbd18 MOV RDI,qword ptr [RSP + 0xe0] MOV RCX,qword ptr [RSP + 0x78] MOV dword ptr [RSP + 0x18],0x0 MOV qword ptr [RSP + 0x20],0x3 MOV RSI,qword ptr [RSP + 0xa0] MOV RDX,qword ptr [RSP + 0xa8] MOV R8,qword ptr [RSP + 0x18] MOV R9,qword ptr [RSP + 0x20] CALL 0x00133bb0 CMP EAX,0x0 JGE 0x001cbd06 JMP 0x001cbe60 LAB_001cbd06: JMP 0x001cbd08 LAB_001cbd08: MOV RAX,qword ptr [RSP + 0x78] ADD RAX,0x1 MOV qword ptr [RSP + 0x78],RAX JMP 0x001cbca8 LAB_001cbd18: JMP 0x001cbd1a LAB_001cbd1a: MOV RAX,qword ptr [RSP + 0x78] CMP RAX,qword ptr [RSP + 0x70] JGE 0x001cbd6a MOV RDI,qword ptr [RSP + 0xe0] MOV RCX,qword ptr [RSP + 0x78] MOV RSI,qword ptr [RSP + 0xa0] MOV RDX,qword ptr [RSP + 0xa8] MOV R8D,0x4000 CALL 0x00137f90 CMP EAX,0x0 JGE 0x001cbd58 JMP 0x001cbe60 LAB_001cbd58: JMP 0x001cbd5a LAB_001cbd5a: MOV RAX,qword ptr [RSP + 0x78] ADD RAX,0x1 MOV qword ptr [RSP + 0x78],RAX JMP 0x001cbd1a LAB_001cbd6a: MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0xf8],RAX MOV RAX,qword ptr [RSP + 0xa8] MOV qword ptr [RSP + 0x100],RAX JMP 0x001cbe94 LAB_001cbd8f: JMP 0x001cbd91 LAB_001cbd91: MOV RAX,qword ptr [RSP + 0x80] CMP RAX,qword ptr [RSP + 0x88] JNC 0x001cbe4b MOV RDI,qword ptr [RSP + 0xe0] MOV RAX,qword ptr [RSP + 0x98] MOV RCX,qword ptr [RSP + 0x80] SHL RCX,0x5 ADD RAX,RCX MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x00123c90 MOV RAX,qword ptr [RSP + 0x98] MOV RCX,qword ptr [RSP + 0x80] SHL RCX,0x5 ADD RAX,RCX CMP qword ptr [RAX + 0x10],0x0 JZ 0x001cbe30 MOV RDI,qword ptr [RSP + 0xe0] MOV RAX,qword ptr [RSP + 0x98] MOV RCX,qword ptr [RSP + 0x80] SHL RCX,0x5 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],-0x7 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] CALL 0x00123c90 LAB_001cbe30: JMP 0x001cbe32 LAB_001cbe32: MOV RAX,qword ptr [RSP + 0x80] ADD RAX,0x1 MOV qword ptr [RSP + 0x80],RAX JMP 0x001cbd91 LAB_001cbe4b: MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0x98] CALL 0x00121db0 LAB_001cbe60: MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0xa0] MOV RDX,qword ptr [RSP + 0xa8] CALL 0x00123c90 MOV dword ptr [RSP + 0xf8],0x0 MOV qword ptr [RSP + 0x100],0x6 LAB_001cbe94: MOV RAX,qword ptr [RSP + 0xf8] MOV RDX,qword ptr [RSP + 0x100] ADD RSP,0x108 RET
int1 [16] js_array_sort(int8 param_1,int8 param_2,int8 param_3,int4 param_4, int8 *param_5) { bool bVar1; int1 auVar2 [16]; int iVar3; long lVar4; int8 *puVar5; uint uStack_ec; ulong local_c8; ulong local_c0; int1 local_b8 [16]; int local_a4; long local_a0; long local_98; ulong local_90; ulong local_88; ulong local_80; ulong local_78; long local_70; int1 local_68 [16]; int8 local_58; int local_50; int4 local_4c; int8 local_48; int8 local_40; int8 *local_38; int4 local_2c; int8 local_28; int8 local_20; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; local_50 = 0; local_4c = 0; local_48 = *param_5; local_40 = param_5[1]; local_68._0_8_ = DAT_0020d980; local_68._8_8_ = DAT_0020d988; local_70 = 0; local_78 = 0; local_80 = 0; local_88 = 0; local_a0 = 0; local_58 = param_1; local_38 = param_5; local_2c = param_4; local_28 = param_1; local_20 = param_2; local_18 = param_3; iVar3 = JS_IsUndefined(local_48,local_40); if (iVar3 == 0) { iVar3 = check_function(local_28,local_48,local_40); if (iVar3 == 0) { local_4c = 1; goto LAB_001cb8f6; } } else { LAB_001cb8f6: local_b8 = JS_ToObject(local_28,local_20,local_18); local_68 = local_b8; iVar3 = js_get_length64(local_28,&local_98,local_b8._0_8_,local_b8._8_8_); if (iVar3 == 0) { for (local_90 = 0; (long)local_90 < local_98; local_90 = local_90 + 1) { if (local_78 <= local_80) { local_c0 = local_78 + (local_78 >> 1) + 0x1f & 0xfffffffffffffff0; lVar4 = js_realloc2(local_28,local_70,local_c0 << 5,&local_c8); if (lVar4 == 0) goto LAB_001cbd91; local_c0 = (local_c8 >> 5) + local_c0; local_78 = local_c0; local_70 = lVar4; } local_a4 = JS_TryGetPropertyInt64 (local_28,local_68._0_8_,local_68._8_8_,local_90, local_70 + local_80 * 0x20); if (local_a4 < 0) goto LAB_001cbd91; if (local_a4 != 0) { puVar5 = (int8 *)(local_70 + local_80 * 0x20); iVar3 = JS_IsUndefined(*puVar5,puVar5[1]); if (iVar3 == 0) { *(int8 *)(local_70 + local_80 * 0x20 + 0x10) = 0; *(ulong *)(local_70 + local_80 * 0x20 + 0x18) = local_90; local_80 = local_80 + 1; } else { local_a0 = local_a0 + 1; } } } rqsort(local_70,local_80,0x20,js_array_cmp_generic,&local_58); if (local_50 == 0) { for (; local_88 < local_80; local_88 = local_88 + 1) { if (*(long *)(local_70 + local_88 * 0x20 + 0x10) != 0) { JS_FreeValue(local_28,*(int8 *)(local_70 + local_88 * 0x20 + 0x10), 0xfffffffffffffff9); } if (*(ulong *)(local_70 + local_88 * 0x20 + 0x18) == local_88) { puVar5 = (int8 *)(local_70 + local_88 * 0x20); JS_FreeValue(local_28,*puVar5,puVar5[1]); } else { puVar5 = (int8 *)(local_70 + local_88 * 0x20); iVar3 = JS_SetPropertyInt64(local_28,local_68._0_8_,local_68._8_8_,local_88,*puVar5, puVar5[1]); if (iVar3 < 0) { local_88 = local_88 + 1; goto LAB_001cbd91; } } } js_free(local_28,local_70); local_90 = local_88; while( true ) { lVar4 = local_a0 + -1; bVar1 = local_a0 < 1; local_a0 = lVar4; if (bVar1) break; iVar3 = JS_SetPropertyInt64(local_28,local_68._0_8_,local_68._8_8_,local_90, (ulong)uStack_ec << 0x20,3); if (iVar3 < 0) goto LAB_001cbe60; local_90 = local_90 + 1; } while( true ) { if (local_98 <= (long)local_90) break; iVar3 = JS_DeletePropertyInt64(local_28,local_68._0_8_,local_68._8_8_,local_90,0x4000); if (iVar3 < 0) goto LAB_001cbe60; local_90 = local_90 + 1; } local_10 = local_68._0_4_; uStack_c = local_68._4_4_; local_8 = local_68._8_8_; goto LAB_001cbe94; } } } LAB_001cbd91: for (; local_88 < local_80; local_88 = local_88 + 1) { puVar5 = (int8 *)(local_70 + local_88 * 0x20); JS_FreeValue(local_28,*puVar5,puVar5[1]); if (*(long *)(local_70 + local_88 * 0x20 + 0x10) != 0) { JS_FreeValue(local_28,*(int8 *)(local_70 + local_88 * 0x20 + 0x10),0xfffffffffffffff9); } } js_free(local_28,local_70); LAB_001cbe60: JS_FreeValue(local_28,local_68._0_8_,local_68._8_8_); local_10 = 0; local_8 = 6; LAB_001cbe94: auVar2._4_4_ = uStack_c; auVar2._0_4_ = local_10; auVar2._8_8_ = local_8; return auVar2; }
10,388
js_array_sort
bluesky950520[P]quickjs/quickjs.c
static JSValue js_array_sort(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { struct array_sort_context asc = { ctx, 0, 0, argv[0] }; JSValue obj = JS_UNDEFINED; ValueSlot *array = NULL; size_t array_size = 0, pos = 0, n = 0; int64_t i, len, undefined_count = 0; int present; if (!JS_IsUndefined(asc.method)) { if (check_function(ctx, asc.method)) goto exception; asc.has_method = 1; } obj = JS_ToObject(ctx, this_val); if (js_get_length64(ctx, &len, obj)) goto exception; /* XXX: should special case fast arrays */ for (i = 0; i < len; i++) { if (pos >= array_size) { size_t new_size, slack; ValueSlot *new_array; new_size = (array_size + (array_size >> 1) + 31) & ~15; new_array = js_realloc2(ctx, array, new_size * sizeof(*array), &slack); if (new_array == NULL) goto exception; new_size += slack / sizeof(*new_array); array = new_array; array_size = new_size; } present = JS_TryGetPropertyInt64(ctx, obj, i, &array[pos].val); if (present < 0) goto exception; if (present == 0) continue; if (JS_IsUndefined(array[pos].val)) { undefined_count++; continue; } array[pos].str = NULL; array[pos].pos = i; pos++; } rqsort(array, pos, sizeof(*array), js_array_cmp_generic, &asc); if (asc.exception) goto exception; /* XXX: should special case fast arrays */ while (n < pos) { if (array[n].str) JS_FreeValue(ctx, JS_MKPTR(JS_TAG_STRING, array[n].str)); if (array[n].pos == n) { JS_FreeValue(ctx, array[n].val); } else { if (JS_SetPropertyInt64(ctx, obj, n, array[n].val) < 0) { n++; goto exception; } } n++; } js_free(ctx, array); for (i = n; undefined_count-- > 0; i++) { if (JS_SetPropertyInt64(ctx, obj, i, JS_UNDEFINED) < 0) goto fail; } for (; i < len; i++) { if (JS_DeletePropertyInt64(ctx, obj, i, JS_PROP_THROW) < 0) goto fail; } return obj; exception: for (; n < pos; n++) { JS_FreeValue(ctx, array[n].val); if (array[n].str) JS_FreeValue(ctx, JS_MKPTR(JS_TAG_STRING, array[n].str)); } js_free(ctx, array); fail: JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O1
c
js_array_sort: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movq %rdi, 0x38(%rsp) movq $0x0, 0x40(%rsp) movups (%r8), %xmm0 movups %xmm0, 0x48(%rsp) movq 0x50(%rsp), %rdx cmpl $0x3, %edx je 0x7683c movq 0x48(%rsp), %rsi movq %rbx, %rdi callq 0x415b1 testl %eax, %eax je 0x76834 movl $0x3, %r12d xorl %ebp, %ebp xorl %r15d, %r15d movq $0x0, 0x8(%rsp) xorl %r13d, %r13d jmp 0x76a46 movl $0x1, 0x44(%rsp) movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x26ddd movq %rax, %r13 movq %rdx, %r12 leaq 0x28(%rsp), %rsi movq %rbx, %rdi movq %rax, %rdx movq %r12, %rcx callq 0x22adc xorl %ebp, %ebp testl %eax, %eax je 0x7687a xorl %r15d, %r15d movq $0x0, 0x8(%rsp) jmp 0x76a46 movq %r13, 0x10(%rsp) movq %r12, 0x18(%rsp) cmpq $0x0, 0x28(%rsp) jle 0x76962 xorl %ebp, %ebp movq $0x0, 0x8(%rsp) xorl %r13d, %r13d xorl %r15d, %r15d movq $0x0, 0x20(%rsp) xorl %r14d, %r14d cmpq %r13, %r15 jb 0x76904 movq %r13, %rax shrq %rax leaq (%rax,%r13), %r12 addq $0x1f, %r12 andq $-0x10, %r12 movq %r12, %rdx shlq $0x5, %rdx movq %rbx, %rdi movq 0x8(%rsp), %rbp movq %rbp, %rsi leaq 0x30(%rsp), %rcx callq 0x1cc0f movq 0x30(%rsp), %rcx shrq $0x5, %rcx addq %r12, %rcx testq %rax, %rax cmovneq %rcx, %r13 cmovneq %rax, %rbp movq %rbp, 0x8(%rsp) je 0x76a3a xorl %ebp, %ebp movq %r15, %r12 shlq $0x5, %r12 addq 0x8(%rsp), %r12 movq %rbx, %rdi movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx movq %r14, %rcx movq %r12, %r8 callq 0x4d6d1 testl %eax, %eax js 0x76a2e je 0x76952 cmpl $0x3, 0x8(%r12) jne 0x76941 incq 0x20(%rsp) jmp 0x76952 movq $0x0, 0x10(%r12) movq %r14, 0x18(%r12) incq %r15 incq %r14 cmpq 0x28(%rsp), %r14 jl 0x768ad jmp 0x76977 movq $0x0, 0x20(%rsp) xorl %r15d, %r15d movq $0x0, 0x8(%rsp) leaq 0x18ae(%rip), %rcx # 0x7822c leaq 0x38(%rsp), %r14 movl $0x20, %edx movq 0x8(%rsp), %rdi movq %r15, %rsi movq %r14, %r8 callq 0x1c031 cmpl $0x0, 0x8(%r14) movq 0x18(%rsp), %r12 movq 0x10(%rsp), %r13 jne 0x76a44 testq %r15, %r15 je 0x76ad4 movq 0x8(%rsp), %rax leaq 0x18(%rax), %r14 xorl %ebp, %ebp movq -0x8(%r14), %rsi testq %rsi, %rsi je 0x769e6 movq 0x18(%rbx), %rdi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x769e6 movq $-0x7, %rdx callq 0x21266 movq -0x18(%r14), %r8 movq -0x10(%r14), %r9 cmpq (%r14), %rbp jne 0x76a04 movq 0x18(%rbx), %rdi movq %r8, %rsi movq %r9, %rdx callq 0x1d8c6 jmp 0x76a1d movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx movq %rbp, %rcx callq 0x25356 testl %eax, %eax js 0x76b4a incq %rbp addq $0x20, %r14 cmpq %rbp, %r15 jne 0x769c1 jmp 0x76ad7 movq 0x18(%rsp), %r12 movq 0x10(%rsp), %r13 jmp 0x76a46 movq 0x18(%rsp), %r12 movq 0x10(%rsp), %r13 xorl %ebp, %ebp subq %rbp, %r15 jbe 0x76a9a shlq $0x5, %rbp movq 0x8(%rsp), %rax leaq (%rax,%rbp), %r14 addq $0x10, %r14 movq -0x10(%r14), %rsi movq -0x8(%r14), %rdx movq 0x18(%rbx), %rdi callq 0x1d8c6 movq (%r14), %rsi testq %rsi, %rsi je 0x76a91 movq 0x18(%rbx), %rdi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x76a91 movq $-0x7, %rdx callq 0x21266 addq $0x20, %r14 decq %r15 jne 0x76a5c movq %rbx, %rdi movq 0x8(%rsp), %rsi callq 0x1cb99 movq 0x18(%rbx), %rdi movq %r13, %rsi movq %r12, %rdx callq 0x1d8c6 movl $0x6, %r12d xorl %r13d, %r13d movq %r13, %rax movq %r12, %rdx addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq xorl %r15d, %r15d movq %rbx, %rdi movq 0x8(%rsp), %rsi callq 0x1cb99 movq 0x20(%rsp), %r14 testq %r14, %r14 jle 0x76b14 movl $0x3, %r9d movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx movq %r15, %rcx xorl %r8d, %r8d callq 0x25356 testl %eax, %eax js 0x76aa7 incq %r15 decq %r14 jne 0x76aee movq 0x28(%rsp), %r14 cmpq %r14, %r15 jge 0x76abf movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx movq %r15, %rcx movl $0x4000, %r8d # imm = 0x4000 callq 0x273f1 testl %eax, %eax js 0x76aa7 incq %r15 cmpq %r15, %r14 jne 0x76b1e jmp 0x76abf incq %rbp jmp 0x76a46
js_array_sort: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r14, rdx mov r15, rsi mov rbx, rdi mov [rsp+88h+var_50], rdi mov [rsp+88h+var_48], 0 movups xmm0, xmmword ptr [r8] movups [rsp+88h+var_40], xmm0 mov rdx, qword ptr [rsp+88h+var_40+8] cmp edx, 3 jz short loc_7683C mov rsi, qword ptr [rsp+88h+var_40] mov rdi, rbx call check_function test eax, eax jz short loc_76834 mov r12d, 3 xor ebp, ebp xor r15d, r15d mov [rsp+88h+var_80], 0 xor r13d, r13d jmp loc_76A46 loc_76834: mov dword ptr [rsp+88h+var_48+4], 1 loc_7683C: mov rdi, rbx mov rsi, r15 mov rdx, r14 call JS_ToObject mov r13, rax mov r12, rdx lea rsi, [rsp+88h+var_60] mov rdi, rbx mov rdx, rax mov rcx, r12 call js_get_length64 xor ebp, ebp test eax, eax jz short loc_7687A xor r15d, r15d mov [rsp+88h+var_80], 0 jmp loc_76A46 loc_7687A: mov [rsp+88h+var_78], r13 mov [rsp+88h+var_70], r12 cmp [rsp+88h+var_60], 0 jle loc_76962 xor ebp, ebp mov [rsp+88h+var_80], 0 xor r13d, r13d xor r15d, r15d mov [rsp+88h+var_68], 0 xor r14d, r14d loc_768AD: cmp r15, r13 jb short loc_76904 mov rax, r13 shr rax, 1 lea r12, [rax+r13] add r12, 1Fh and r12, 0FFFFFFFFFFFFFFF0h mov rdx, r12 shl rdx, 5 mov rdi, rbx mov rbp, [rsp+88h+var_80] mov rsi, rbp lea rcx, [rsp+88h+var_58] call js_realloc2 mov rcx, [rsp+88h+var_58] shr rcx, 5 add rcx, r12 test rax, rax cmovnz r13, rcx cmovnz rbp, rax mov [rsp+88h+var_80], rbp jz loc_76A3A xor ebp, ebp loc_76904: mov r12, r15 shl r12, 5 add r12, [rsp+88h+var_80] mov rdi, rbx mov rsi, [rsp+88h+var_78] mov rdx, [rsp+88h+var_70] mov rcx, r14 mov r8, r12 call JS_TryGetPropertyInt64 test eax, eax js loc_76A2E jz short loc_76952 cmp dword ptr [r12+8], 3 jnz short loc_76941 inc [rsp+88h+var_68] jmp short loc_76952 loc_76941: mov qword ptr [r12+10h], 0 mov [r12+18h], r14 inc r15 loc_76952: inc r14 cmp r14, [rsp+88h+var_60] jl loc_768AD jmp short loc_76977 loc_76962: mov [rsp+88h+var_68], 0 xor r15d, r15d mov [rsp+88h+var_80], 0 loc_76977: lea rcx, js_array_cmp_generic lea r14, [rsp+88h+var_50] mov edx, 20h ; ' ' mov rdi, [rsp+88h+var_80] mov rsi, r15 mov r8, r14 call rqsort cmp dword ptr [r14+8], 0 mov r12, [rsp+88h+var_70] mov r13, [rsp+88h+var_78] jnz loc_76A44 test r15, r15 jz loc_76AD4 mov rax, [rsp+88h+var_80] lea r14, [rax+18h] xor ebp, ebp loc_769C1: mov rsi, [r14-8] test rsi, rsi jz short loc_769E6 mov rdi, [rbx+18h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_769E6 mov rdx, 0FFFFFFFFFFFFFFF9h call js_free_value_rt loc_769E6: mov r8, [r14-18h] mov r9, [r14-10h] cmp rbp, [r14] jnz short loc_76A04 mov rdi, [rbx+18h] mov rsi, r8 mov rdx, r9 call JS_FreeValueRT jmp short loc_76A1D loc_76A04: mov rdi, rbx mov rsi, r13 mov rdx, r12 mov rcx, rbp call JS_SetPropertyInt64 test eax, eax js loc_76B4A loc_76A1D: inc rbp add r14, 20h ; ' ' cmp r15, rbp jnz short loc_769C1 jmp loc_76AD7 loc_76A2E: mov r12, [rsp+88h+var_70] mov r13, [rsp+88h+var_78] jmp short loc_76A46 loc_76A3A: mov r12, [rsp+88h+var_70] mov r13, [rsp+88h+var_78] loc_76A44: xor ebp, ebp loc_76A46: sub r15, rbp jbe short loc_76A9A shl rbp, 5 mov rax, [rsp+88h+var_80] lea r14, [rax+rbp] add r14, 10h loc_76A5C: mov rsi, [r14-10h] mov rdx, [r14-8] mov rdi, [rbx+18h] call JS_FreeValueRT mov rsi, [r14] test rsi, rsi jz short loc_76A91 mov rdi, [rbx+18h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_76A91 mov rdx, 0FFFFFFFFFFFFFFF9h call js_free_value_rt loc_76A91: add r14, 20h ; ' ' dec r15 jnz short loc_76A5C loc_76A9A: mov rdi, rbx mov rsi, [rsp+88h+var_80] call js_free loc_76AA7: mov rdi, [rbx+18h] mov rsi, r13 mov rdx, r12 call JS_FreeValueRT mov r12d, 6 xor r13d, r13d loc_76ABF: mov rax, r13 mov rdx, r12 add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_76AD4: xor r15d, r15d loc_76AD7: mov rdi, rbx mov rsi, [rsp+88h+var_80] call js_free mov r14, [rsp+88h+var_68] test r14, r14 jle short loc_76B14 loc_76AEE: mov r9d, 3 mov rdi, rbx mov rsi, r13 mov rdx, r12 mov rcx, r15 xor r8d, r8d call JS_SetPropertyInt64 test eax, eax js short loc_76AA7 inc r15 dec r14 jnz short loc_76AEE loc_76B14: mov r14, [rsp+88h+var_60] cmp r15, r14 jge short loc_76ABF loc_76B1E: mov rdi, rbx mov rsi, r13 mov rdx, r12 mov rcx, r15 mov r8d, 4000h call JS_DeletePropertyInt64 test eax, eax js loc_76AA7 inc r15 cmp r14, r15 jnz short loc_76B1E jmp loc_76ABF loc_76B4A: inc rbp jmp loc_76A46
_DWORD * js_array_sort( long long a1, long long a2, long long a3, long long a4, __m128 *a5, long long a6, double a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { __m128 v16; // xmm0 long long v17; // r12 unsigned long long v18; // rbp unsigned long long v19; // r15 _DWORD *v20; // r13 long long v21; // rdx unsigned long long v22; // r13 unsigned long long v23; // r14 long long v24; // rbp long long v25; // rax long long v26; // r12 int PropertyInt64; // eax double v28; // xmm4_8 double v29; // xmm5_8 _QWORD *v30; // r14 _DWORD *v31; // rbp _QWORD *v32; // rsi long long v33; // rdi int v34; // eax bool v35; // cc unsigned long long v36; // r15 _QWORD **v37; // r14 _QWORD *v38; // rsi long long v39; // rdi int v40; // eax double v42; // xmm4_8 double v43; // xmm5_8 long long v44; // r14 long long v45; // r14 long long v46; // [rsp+8h] [rbp-80h] unsigned long long v47; // [rsp+10h] [rbp-78h] unsigned long long v48; // [rsp+18h] [rbp-70h] long long v49; // [rsp+20h] [rbp-68h] long long v50; // [rsp+28h] [rbp-60h] BYREF unsigned long long v51; // [rsp+30h] [rbp-58h] BYREF long long v52; // [rsp+38h] [rbp-50h] BYREF long long v53; // [rsp+40h] [rbp-48h] __m128 v54; // [rsp+48h] [rbp-40h] v52 = a1; v53 = 0LL; v16 = *a5; v54 = *a5; if ( v54.m128_i32[2] != 3 ) { if ( (unsigned int)check_function( a1, v54.m128_i64[0], v54.m128_i32[2], v16, a8, a9, a10, *(double *)a11.m128_u64, *(double *)a12.m128_u64, a13, a14) ) { v17 = 3LL; v18 = 0LL; v19 = 0LL; v46 = 0LL; v20 = 0LL; goto LABEL_36; } HIDWORD(v53) = 1; } v20 = JS_ToObject(a1, a2, a3, a4, (long long)a5, a6, v16, a8, a9, a10, a11, a12, a13, a14); v17 = v21; v18 = 0LL; if ( (unsigned int)js_get_length64(a1, &v50, (int)v20, v21) ) { v19 = 0LL; v46 = 0LL; goto LABEL_36; } v47 = (unsigned long long)v20; v48 = v17; if ( v50 > 0 ) { v18 = 0LL; v46 = 0LL; v22 = 0LL; v19 = 0LL; v49 = 0LL; v23 = 0LL; while ( 1 ) { if ( v19 >= v22 ) { v24 = v46; v25 = js_realloc2(a1, v46, 32 * (((v22 >> 1) + v22 + 31) & 0xFFFFFFFFFFFFFFF0LL), &v51); if ( v25 ) { v22 = (((v22 >> 1) + v22 + 31) & 0xFFFFFFFFFFFFFFF0LL) + (v51 >> 5); v24 = v25; } v46 = v24; if ( !v25 ) { v17 = v48; v20 = (_DWORD *)v47; goto LABEL_35; } v18 = 0LL; } v26 = v46 + 32 * v19; PropertyInt64 = JS_TryGetPropertyInt64(a1, v47, v48, v23, v26); if ( PropertyInt64 < 0 ) { v17 = v48; v20 = (_DWORD *)v47; goto LABEL_36; } if ( PropertyInt64 ) { if ( *(_DWORD *)(v26 + 8) == 3 ) { ++v49; } else { *(_QWORD *)(v26 + 16) = 0LL; *(_QWORD *)(v26 + 24) = v23; ++v19; } } if ( (long long)++v23 >= v50 ) goto LABEL_22; } } v49 = 0LL; v19 = 0LL; v46 = 0LL; LABEL_22: rqsort( v46, v19, 32LL, (long long ( *)(unsigned long long, unsigned long long, long long))js_array_cmp_generic, (long long)&v52); v17 = v48; v20 = (_DWORD *)v47; if ( (_DWORD)v53 ) { LABEL_35: v18 = 0LL; goto LABEL_36; } if ( v19 ) { v30 = (_QWORD *)(v46 + 24); v31 = 0LL; while ( 1 ) { v32 = (_QWORD *)*(v30 - 1); if ( v32 ) { v33 = *(_QWORD *)(a1 + 24); v34 = (*(_DWORD *)v32)--; if ( v34 <= 1 ) js_free_value_rt(v33, v32, -7); } if ( v31 == (_DWORD *)*v30 ) { JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)*(v30 - 3), *(v30 - 2)); } else if ( (int)JS_SetPropertyInt64( a1, v47, v48, v31, (_DWORD *)*(v30 - 3), *(v30 - 2), *(double *)v16.m128_u64, a8, a9, a10, v28, v29, a13, a14) < 0 ) { v18 = (unsigned long long)v31 + 1; LABEL_36: v35 = v19 <= v18; v36 = v19 - v18; if ( !v35 ) { v37 = (_QWORD **)(v46 + 32 * v18 + 16); do { JS_FreeValueRT(*(_QWORD *)(a1 + 24), *(v37 - 2), (long long)*(v37 - 1)); v38 = *v37; if ( *v37 ) { v39 = *(_QWORD *)(a1 + 24); v40 = (*(_DWORD *)v38)--; if ( v40 <= 1 ) js_free_value_rt(v39, v38, -7); } v37 += 4; --v36; } while ( v36 ); } js_free(a1, v46); LABEL_43: JS_FreeValueRT(*(_QWORD *)(a1 + 24), v20, v17); return 0LL; } v31 = (_DWORD *)((char *)v31 + 1); v30 += 4; if ( (_DWORD *)v19 == v31 ) goto LABEL_46; } } v19 = 0LL; LABEL_46: js_free(a1, v46); v44 = v49; if ( v49 > 0 ) { while ( (int)JS_SetPropertyInt64( a1, v47, v48, (_DWORD *)v19, 0LL, 3LL, *(double *)v16.m128_u64, a8, a9, a10, v42, v43, a13, a14) >= 0 ) { ++v19; if ( !--v44 ) goto LABEL_49; } goto LABEL_43; } LABEL_49: v45 = v50; if ( (long long)v19 < v50 ) { while ( (int)JS_DeletePropertyInt64(a1, v47, v48, v19, 0x4000, v16, a8, a9, a10, v42, v43, a13, a14) >= 0 ) { if ( v45 == ++v19 ) return v20; } goto LABEL_43; } return v20; }
js_array_sort: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV qword ptr [RSP + 0x38],RDI MOV qword ptr [RSP + 0x40],0x0 MOVUPS XMM0,xmmword ptr [R8] MOVUPS xmmword ptr [RSP + 0x48],XMM0 MOV RDX,qword ptr [RSP + 0x50] CMP EDX,0x3 JZ 0x0017683c MOV RSI,qword ptr [RSP + 0x48] MOV RDI,RBX CALL 0x001415b1 TEST EAX,EAX JZ 0x00176834 MOV R12D,0x3 XOR EBP,EBP XOR R15D,R15D MOV qword ptr [RSP + 0x8],0x0 XOR R13D,R13D JMP 0x00176a46 LAB_00176834: MOV dword ptr [RSP + 0x44],0x1 LAB_0017683c: MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x00126ddd MOV R13,RAX MOV R12,RDX LEA RSI,[RSP + 0x28] MOV RDI,RBX MOV RDX,RAX MOV RCX,R12 CALL 0x00122adc XOR EBP,EBP TEST EAX,EAX JZ 0x0017687a XOR R15D,R15D MOV qword ptr [RSP + 0x8],0x0 JMP 0x00176a46 LAB_0017687a: MOV qword ptr [RSP + 0x10],R13 MOV qword ptr [RSP + 0x18],R12 CMP qword ptr [RSP + 0x28],0x0 JLE 0x00176962 XOR EBP,EBP MOV qword ptr [RSP + 0x8],0x0 XOR R13D,R13D XOR R15D,R15D MOV qword ptr [RSP + 0x20],0x0 XOR R14D,R14D LAB_001768ad: CMP R15,R13 JC 0x00176904 MOV RAX,R13 SHR RAX,0x1 LEA R12,[RAX + R13*0x1] ADD R12,0x1f AND R12,-0x10 MOV RDX,R12 SHL RDX,0x5 MOV RDI,RBX MOV RBP,qword ptr [RSP + 0x8] MOV RSI,RBP LEA RCX,[RSP + 0x30] CALL 0x0011cc0f MOV RCX,qword ptr [RSP + 0x30] SHR RCX,0x5 ADD RCX,R12 TEST RAX,RAX CMOVNZ R13,RCX CMOVNZ RBP,RAX MOV qword ptr [RSP + 0x8],RBP JZ 0x00176a3a XOR EBP,EBP LAB_00176904: MOV R12,R15 SHL R12,0x5 ADD R12,qword ptr [RSP + 0x8] MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] MOV RCX,R14 MOV R8,R12 CALL 0x0014d6d1 TEST EAX,EAX JS 0x00176a2e JZ 0x00176952 CMP dword ptr [R12 + 0x8],0x3 JNZ 0x00176941 INC qword ptr [RSP + 0x20] JMP 0x00176952 LAB_00176941: MOV qword ptr [R12 + 0x10],0x0 MOV qword ptr [R12 + 0x18],R14 INC R15 LAB_00176952: INC R14 CMP R14,qword ptr [RSP + 0x28] JL 0x001768ad JMP 0x00176977 LAB_00176962: MOV qword ptr [RSP + 0x20],0x0 XOR R15D,R15D MOV qword ptr [RSP + 0x8],0x0 LAB_00176977: LEA RCX,[0x17822c] LEA R14,[RSP + 0x38] MOV EDX,0x20 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,R15 MOV R8,R14 CALL 0x0011c031 CMP dword ptr [R14 + 0x8],0x0 MOV R12,qword ptr [RSP + 0x18] MOV R13,qword ptr [RSP + 0x10] JNZ 0x00176a44 TEST R15,R15 JZ 0x00176ad4 MOV RAX,qword ptr [RSP + 0x8] LEA R14,[RAX + 0x18] XOR EBP,EBP LAB_001769c1: MOV RSI,qword ptr [R14 + -0x8] TEST RSI,RSI JZ 0x001769e6 MOV RDI,qword ptr [RBX + 0x18] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x001769e6 MOV RDX,-0x7 CALL 0x00121266 LAB_001769e6: MOV R8,qword ptr [R14 + -0x18] MOV R9,qword ptr [R14 + -0x10] CMP RBP,qword ptr [R14] JNZ 0x00176a04 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R8 MOV RDX,R9 CALL 0x0011d8c6 JMP 0x00176a1d LAB_00176a04: MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 MOV RCX,RBP CALL 0x00125356 TEST EAX,EAX JS 0x00176b4a LAB_00176a1d: INC RBP ADD R14,0x20 CMP R15,RBP JNZ 0x001769c1 JMP 0x00176ad7 LAB_00176a2e: MOV R12,qword ptr [RSP + 0x18] MOV R13,qword ptr [RSP + 0x10] JMP 0x00176a46 LAB_00176a3a: MOV R12,qword ptr [RSP + 0x18] MOV R13,qword ptr [RSP + 0x10] LAB_00176a44: XOR EBP,EBP LAB_00176a46: SUB R15,RBP JBE 0x00176a9a SHL RBP,0x5 MOV RAX,qword ptr [RSP + 0x8] LEA R14,[RAX + RBP*0x1] ADD R14,0x10 LAB_00176a5c: MOV RSI,qword ptr [R14 + -0x10] MOV RDX,qword ptr [R14 + -0x8] MOV RDI,qword ptr [RBX + 0x18] CALL 0x0011d8c6 MOV RSI,qword ptr [R14] TEST RSI,RSI JZ 0x00176a91 MOV RDI,qword ptr [RBX + 0x18] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x00176a91 MOV RDX,-0x7 CALL 0x00121266 LAB_00176a91: ADD R14,0x20 DEC R15 JNZ 0x00176a5c LAB_00176a9a: MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x8] CALL 0x0011cb99 LAB_00176aa7: MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R13 MOV RDX,R12 CALL 0x0011d8c6 MOV R12D,0x6 XOR R13D,R13D LAB_00176abf: MOV RAX,R13 MOV RDX,R12 ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00176ad4: XOR R15D,R15D LAB_00176ad7: MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x8] CALL 0x0011cb99 MOV R14,qword ptr [RSP + 0x20] TEST R14,R14 JLE 0x00176b14 LAB_00176aee: MOV R9D,0x3 MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 MOV RCX,R15 XOR R8D,R8D CALL 0x00125356 TEST EAX,EAX JS 0x00176aa7 INC R15 DEC R14 JNZ 0x00176aee LAB_00176b14: MOV R14,qword ptr [RSP + 0x28] CMP R15,R14 JGE 0x00176abf LAB_00176b1e: MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 MOV RCX,R15 MOV R8D,0x4000 CALL 0x001273f1 TEST EAX,EAX JS 0x00176aa7 INC R15 CMP R14,R15 JNZ 0x00176b1e JMP 0x00176abf LAB_00176b4a: INC RBP JMP 0x00176a46
int1 [16] js_array_sort(long param_1,int8 param_2,int8 param_3,int8 param_4, int8 *param_5) { int8 uVar1; int *piVar2; int iVar3; int8 uVar4; long lVar5; int8 uVar6; ulong uVar7; ulong uVar8; ulong *puVar9; int8 *puVar10; long lVar11; ulong uVar12; int1 auVar13 [16]; long local_80; long local_68; ulong local_60; ulong local_58; long local_50; int8 local_48; int4 local_40; int4 uStack_3c; int iStack_38; int4 uStack_34; local_48 = 0; local_40 = *(int4 *)param_5; uStack_3c = *(int4 *)((long)param_5 + 4); iStack_38 = *(int *)(param_5 + 1); uStack_34 = *(int4 *)((long)param_5 + 0xc); local_50 = param_1; if (iStack_38 == 3) { LAB_0017683c: auVar13 = JS_ToObject(param_1,param_2,param_3); uVar6 = auVar13._8_8_; uVar4 = auVar13._0_8_; iVar3 = js_get_length64(param_1,&local_60,uVar4,uVar6); uVar7 = 0; if (iVar3 == 0) { if ((long)local_60 < 1) { local_68 = 0; uVar12 = 0; local_80 = 0; } else { local_80 = 0; uVar8 = 0; uVar12 = 0; local_68 = 0; lVar11 = 0; do { lVar5 = local_80; if (uVar8 <= uVar12) { uVar8 = (uVar8 >> 1) + uVar8 + 0x1f & 0xfffffffffffffff0; lVar5 = js_realloc2(param_1,local_80,uVar8 << 5,&local_58); uVar8 = (local_58 >> 5) + uVar8; if (lVar5 == 0) goto LAB_00176a44; } local_80 = lVar5; uVar7 = 0; lVar5 = uVar12 * 0x20 + local_80; iVar3 = JS_TryGetPropertyInt64(param_1,uVar4,uVar6,lVar11,lVar5); if (iVar3 < 0) goto LAB_00176a46; if (iVar3 != 0) { if (*(int *)(lVar5 + 8) == 3) { local_68 = local_68 + 1; } else { *(int8 *)(lVar5 + 0x10) = 0; *(long *)(lVar5 + 0x18) = lVar11; uVar12 = uVar12 + 1; } } lVar11 = lVar11 + 1; } while (lVar11 < (long)local_60); } rqsort(local_80,uVar12,0x20,js_array_cmp_generic,&local_50); if ((int)local_48 == 0) { if (uVar12 == 0) { uVar12 = 0; } else { puVar9 = (ulong *)(local_80 + 0x18); uVar7 = 0; do { piVar2 = (int *)puVar9[-1]; if (piVar2 != (int *)0x0) { uVar1 = *(int8 *)(param_1 + 0x18); iVar3 = *piVar2; *piVar2 = iVar3 + -1; if (iVar3 < 2) { js_free_value_rt(uVar1,piVar2,0xfffffffffffffff9); } } if (uVar7 == *puVar9) { JS_FreeValueRT(*(int8 *)(param_1 + 0x18),puVar9[-3],puVar9[-2]); } else { iVar3 = JS_SetPropertyInt64(param_1,uVar4,uVar6,uVar7); if (iVar3 < 0) { uVar7 = uVar7 + 1; goto LAB_00176a46; } } uVar7 = uVar7 + 1; puVar9 = puVar9 + 4; } while (uVar12 != uVar7); } js_free(param_1,local_80); if (0 < local_68) { do { iVar3 = JS_SetPropertyInt64(param_1,uVar4,uVar6,uVar12,0,3); if (iVar3 < 0) goto LAB_00176aa7; uVar12 = uVar12 + 1; local_68 = local_68 + -1; } while (local_68 != 0); } if ((long)local_60 <= (long)uVar12) { return auVar13; } while (iVar3 = JS_DeletePropertyInt64(param_1,uVar4,uVar6,uVar12,0x4000), -1 < iVar3) { uVar12 = uVar12 + 1; if (local_60 == uVar12) { return auVar13; } } goto LAB_00176aa7; } LAB_00176a44: uVar7 = 0; } else { uVar12 = 0; local_80 = 0; } } else { iVar3 = check_function(param_1,*param_5); if (iVar3 == 0) { local_48 = CONCAT44(1,(int)local_48); goto LAB_0017683c; } uVar7 = 0; uVar12 = 0; local_80 = 0; auVar13 = ZEXT816(3) << 0x40; } LAB_00176a46: lVar11 = uVar12 - uVar7; if (uVar7 <= uVar12 && lVar11 != 0) { puVar10 = (int8 *)(local_80 + uVar7 * 0x20 + 0x10); do { JS_FreeValueRT(*(int8 *)(param_1 + 0x18),puVar10[-2],puVar10[-1]); piVar2 = (int *)*puVar10; if (piVar2 != (int *)0x0) { uVar4 = *(int8 *)(param_1 + 0x18); iVar3 = *piVar2; *piVar2 = iVar3 + -1; if (iVar3 < 2) { js_free_value_rt(uVar4,piVar2,0xfffffffffffffff9); } } puVar10 = puVar10 + 4; lVar11 = lVar11 + -1; } while (lVar11 != 0); } js_free(param_1,local_80); LAB_00176aa7: JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar13._0_8_,auVar13._8_8_); return ZEXT816(6) << 0x40; }
10,389
js_array_sort
bluesky950520[P]quickjs/quickjs.c
static JSValue js_array_sort(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { struct array_sort_context asc = { ctx, 0, 0, argv[0] }; JSValue obj = JS_UNDEFINED; ValueSlot *array = NULL; size_t array_size = 0, pos = 0, n = 0; int64_t i, len, undefined_count = 0; int present; if (!JS_IsUndefined(asc.method)) { if (check_function(ctx, asc.method)) goto exception; asc.has_method = 1; } obj = JS_ToObject(ctx, this_val); if (js_get_length64(ctx, &len, obj)) goto exception; /* XXX: should special case fast arrays */ for (i = 0; i < len; i++) { if (pos >= array_size) { size_t new_size, slack; ValueSlot *new_array; new_size = (array_size + (array_size >> 1) + 31) & ~15; new_array = js_realloc2(ctx, array, new_size * sizeof(*array), &slack); if (new_array == NULL) goto exception; new_size += slack / sizeof(*new_array); array = new_array; array_size = new_size; } present = JS_TryGetPropertyInt64(ctx, obj, i, &array[pos].val); if (present < 0) goto exception; if (present == 0) continue; if (JS_IsUndefined(array[pos].val)) { undefined_count++; continue; } array[pos].str = NULL; array[pos].pos = i; pos++; } rqsort(array, pos, sizeof(*array), js_array_cmp_generic, &asc); if (asc.exception) goto exception; /* XXX: should special case fast arrays */ while (n < pos) { if (array[n].str) JS_FreeValue(ctx, JS_MKPTR(JS_TAG_STRING, array[n].str)); if (array[n].pos == n) { JS_FreeValue(ctx, array[n].val); } else { if (JS_SetPropertyInt64(ctx, obj, n, array[n].val) < 0) { n++; goto exception; } } n++; } js_free(ctx, array); for (i = n; undefined_count-- > 0; i++) { if (JS_SetPropertyInt64(ctx, obj, i, JS_UNDEFINED) < 0) goto fail; } for (; i < len; i++) { if (JS_DeletePropertyInt64(ctx, obj, i, JS_PROP_THROW) < 0) goto fail; } return obj; exception: for (; n < pos; n++) { JS_FreeValue(ctx, array[n].val); if (array[n].str) JS_FreeValue(ctx, JS_MKPTR(JS_TAG_STRING, array[n].str)); } js_free(ctx, array); fail: JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O2
c
js_array_sort: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movq %rdi, 0x38(%rsp) andq $0x0, 0x40(%rsp) movups (%r8), %xmm0 movups %xmm0, 0x48(%rsp) movq 0x50(%rsp), %rdx cmpl $0x3, %edx je 0x63a88 movq 0x48(%rsp), %rsi movq %rbx, %rdi callq 0x3949a testl %eax, %eax je 0x63a80 pushq $0x3 popq %rax movq %rax, 0x18(%rsp) xorl %r13d, %r13d xorl %r15d, %r15d xorl %r12d, %r12d movq $0x0, 0x10(%rsp) jmp 0x63cb5 movl $0x1, 0x44(%rsp) movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x20b92 movq %rdx, %r14 leaq 0x28(%rsp), %rsi movq %rbx, %rdi movq %rax, 0x10(%rsp) movq %rax, %rdx movq %r14, %rcx callq 0x1cc43 xorl %r13d, %r13d testl %eax, %eax movq %r14, 0x18(%rsp) je 0x63ac8 xorl %r15d, %r15d xorl %r12d, %r12d jmp 0x63cb5 xorl %r13d, %r13d xorl %r14d, %r14d movq $0x0, 0x20(%rsp) xorl %r15d, %r15d xorl %ebp, %ebp movq $0x0, 0x8(%rsp) cmpq 0x28(%rsp), %r14 jge 0x63b95 cmpq %rbp, %r15 jae 0x63afc movq 0x8(%rsp), %rax jmp 0x63b3f movq %rbp, %rax shrq %rax leaq (%rax,%rbp), %r12 addq $0x1f, %r12 andq $-0x10, %r12 movq %r12, %rdx shlq $0x5, %rdx movq %rbx, %rdi movq 0x8(%rsp), %rbp movq %rbp, %rsi leaq 0x30(%rsp), %rcx callq 0x172b1 testq %rax, %rax je 0x63bc6 movq 0x30(%rsp), %rbp shrq $0x5, %rbp addq %r12, %rbp movq %r15, %r12 shlq $0x5, %r12 movq %rax, 0x8(%rsp) addq %rax, %r12 movq %rbx, %rdi movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx movq %r14, %rcx movq %r12, %r8 callq 0x42688 testl %eax, %eax js 0x63cb0 je 0x63b8d cmpl $0x3, 0x8(%r12) jne 0x63b7f incq 0x20(%rsp) jmp 0x63b8d andq $0x0, 0x10(%r12) movq %r14, 0x18(%r12) incq %r15 incq %r14 jmp 0x63ae5 leaq 0x14b3(%rip), %rcx # 0x6504f pushq $0x20 popq %rdx leaq 0x38(%rsp), %r14 movq 0x8(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi movq %r14, %r8 callq 0x1683c cmpl $0x0, 0x8(%r14) je 0x63bce xorl %r13d, %r13d jmp 0x63cb5 movq %rbp, %r12 jmp 0x63cb5 addq $0x18, %r12 xorl %r13d, %r13d pushq $-0x7 popq %r14 movq 0x18(%rsp), %rbp cmpq %r13, %r15 je 0x63c38 movq -0x8(%r12), %rsi testq %rsi, %rsi je 0x63bf8 movq %rbx, %rdi movq %r14, %rdx callq 0x1801e movq -0x18(%r12), %r8 movq -0x10(%r12), %r9 cmpq (%r12), %r13 jne 0x63c18 movq %rbx, %rdi movq %r8, %rsi movq %r9, %rdx callq 0x1801e jmp 0x63c2f movq %rbx, %rdi movq 0x10(%rsp), %rsi movq %rbp, %rdx movq %r13, %rcx callq 0x1f0a6 testl %eax, %eax js 0x63cad incq %r13 addq $0x20, %r12 jmp 0x63bde movq %rbx, %rdi movq 0x8(%rsp), %rsi callq 0x1726e pushq $0x3 popq %r14 movq 0x10(%rsp), %r12 movq 0x20(%rsp), %r13 testq %r13, %r13 jle 0x63c7f movq %rbx, %rdi movq %r12, %rsi movq %rbp, %rdx movq %r15, %rcx xorl %r8d, %r8d movq %r14, %r9 callq 0x1f0a6 testl %eax, %eax js 0x63d13 incq %r15 decq %r13 jmp 0x63c53 movq 0x28(%rsp), %r14 cmpq %r14, %r15 jge 0x63d27 movq %rbx, %rdi movq %r12, %rsi movq %rbp, %rdx movq %r15, %rcx movl $0x4000, %r8d # imm = 0x4000 callq 0x210a9 incq %r15 testl %eax, %eax jns 0x63c84 jmp 0x63d13 incq %r13 movq 0x8(%rsp), %r12 movq %r13, %rax shlq $0x5, %rax movq %r12, %rbp addq %rax, %r12 addq $0x10, %r12 pushq $-0x7 popq %r14 cmpq %r15, %r13 jae 0x63cfe movq -0x10(%r12), %rsi movq -0x8(%r12), %rdx movq %rbx, %rdi callq 0x1801e movq (%r12), %rsi testq %rsi, %rsi je 0x63cf5 movq %rbx, %rdi movq %r14, %rdx callq 0x1801e incq %r13 addq $0x20, %r12 jmp 0x63cca movq %rbx, %rdi movq %rbp, %rsi callq 0x1726e movq 0x10(%rsp), %r12 movq 0x18(%rsp), %rbp movq %rbx, %rdi movq %r12, %rsi movq %rbp, %rdx callq 0x1801e pushq $0x6 popq %rbp xorl %r12d, %r12d movq %r12, %rax movq %rbp, %rdx addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_array_sort: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r14, rdx mov r15, rsi mov rbx, rdi mov [rsp+88h+var_50], rdi and [rsp+88h+var_48], 0 movups xmm0, xmmword ptr [r8] movups [rsp+88h+var_40], xmm0 mov rdx, qword ptr [rsp+88h+var_40+8] cmp edx, 3 jz short loc_63A88 mov rsi, qword ptr [rsp+88h+var_40] mov rdi, rbx call check_function test eax, eax jz short loc_63A80 push 3 pop rax mov [rsp+88h+var_70], rax xor r13d, r13d xor r15d, r15d xor r12d, r12d mov [rsp+88h+var_78], 0 jmp loc_63CB5 loc_63A80: mov dword ptr [rsp+88h+var_48+4], 1 loc_63A88: mov rdi, rbx mov rsi, r15 mov rdx, r14 call JS_ToObject mov r14, rdx lea rsi, [rsp+88h+var_60] mov rdi, rbx mov [rsp+88h+var_78], rax mov rdx, rax mov rcx, r14 call js_get_length64 xor r13d, r13d test eax, eax mov [rsp+88h+var_70], r14 jz short loc_63AC8 xor r15d, r15d xor r12d, r12d jmp loc_63CB5 loc_63AC8: xor r13d, r13d xor r14d, r14d mov [rsp+88h+var_68], 0 xor r15d, r15d xor ebp, ebp mov [rsp+88h+var_80], 0 loc_63AE5: cmp r14, [rsp+88h+var_60] jge loc_63B95 cmp r15, rbp jnb short loc_63AFC mov rax, [rsp+88h+var_80] jmp short loc_63B3F loc_63AFC: mov rax, rbp shr rax, 1 lea r12, [rax+rbp] add r12, 1Fh and r12, 0FFFFFFFFFFFFFFF0h mov rdx, r12 shl rdx, 5 mov rdi, rbx mov rbp, [rsp+88h+var_80] mov rsi, rbp lea rcx, [rsp+88h+var_58] call js_realloc2 test rax, rax jz loc_63BC6 mov rbp, [rsp+88h+var_58] shr rbp, 5 add rbp, r12 loc_63B3F: mov r12, r15 shl r12, 5 mov [rsp+88h+var_80], rax add r12, rax mov rdi, rbx mov rsi, [rsp+88h+var_78] mov rdx, [rsp+88h+var_70] mov rcx, r14 mov r8, r12 call JS_TryGetPropertyInt64 test eax, eax js loc_63CB0 jz short loc_63B8D cmp dword ptr [r12+8], 3 jnz short loc_63B7F inc [rsp+88h+var_68] jmp short loc_63B8D loc_63B7F: and qword ptr [r12+10h], 0 mov [r12+18h], r14 inc r15 loc_63B8D: inc r14 jmp loc_63AE5 loc_63B95: lea rcx, js_array_cmp_generic push 20h ; ' ' pop rdx lea r14, [rsp+88h+var_50] mov r12, [rsp+88h+var_80] mov rdi, r12 mov rsi, r15 mov r8, r14 call rqsort cmp dword ptr [r14+8], 0 jz short loc_63BCE xor r13d, r13d jmp loc_63CB5 loc_63BC6: mov r12, rbp jmp loc_63CB5 loc_63BCE: add r12, 18h xor r13d, r13d push 0FFFFFFFFFFFFFFF9h pop r14 mov rbp, [rsp+88h+var_70] loc_63BDE: cmp r15, r13 jz short loc_63C38 mov rsi, [r12-8] test rsi, rsi jz short loc_63BF8 mov rdi, rbx mov rdx, r14 call JS_FreeValue loc_63BF8: mov r8, [r12-18h] mov r9, [r12-10h] cmp r13, [r12] jnz short loc_63C18 mov rdi, rbx mov rsi, r8 mov rdx, r9 call JS_FreeValue jmp short loc_63C2F loc_63C18: mov rdi, rbx mov rsi, [rsp+88h+var_78] mov rdx, rbp mov rcx, r13 call JS_SetPropertyInt64 test eax, eax js short loc_63CAD loc_63C2F: inc r13 add r12, 20h ; ' ' jmp short loc_63BDE loc_63C38: mov rdi, rbx mov rsi, [rsp+88h+var_80] call js_free push 3 pop r14 mov r12, [rsp+88h+var_78] mov r13, [rsp+88h+var_68] loc_63C53: test r13, r13 jle short loc_63C7F mov rdi, rbx mov rsi, r12 mov rdx, rbp mov rcx, r15 xor r8d, r8d mov r9, r14 call JS_SetPropertyInt64 test eax, eax js loc_63D13 inc r15 dec r13 jmp short loc_63C53 loc_63C7F: mov r14, [rsp+88h+var_60] loc_63C84: cmp r15, r14 jge loc_63D27 mov rdi, rbx mov rsi, r12 mov rdx, rbp mov rcx, r15 mov r8d, 4000h call JS_DeletePropertyInt64 inc r15 test eax, eax jns short loc_63C84 jmp short loc_63D13 loc_63CAD: inc r13 loc_63CB0: mov r12, [rsp+88h+var_80] loc_63CB5: mov rax, r13 shl rax, 5 mov rbp, r12 add r12, rax add r12, 10h push 0FFFFFFFFFFFFFFF9h pop r14 loc_63CCA: cmp r13, r15 jnb short loc_63CFE mov rsi, [r12-10h] mov rdx, [r12-8] mov rdi, rbx call JS_FreeValue mov rsi, [r12] test rsi, rsi jz short loc_63CF5 mov rdi, rbx mov rdx, r14 call JS_FreeValue loc_63CF5: inc r13 add r12, 20h ; ' ' jmp short loc_63CCA loc_63CFE: mov rdi, rbx mov rsi, rbp call js_free mov r12, [rsp+88h+var_78] mov rbp, [rsp+88h+var_70] loc_63D13: mov rdi, rbx mov rsi, r12 mov rdx, rbp call JS_FreeValue push 6 pop rbp xor r12d, r12d loc_63D27: mov rax, r12 mov rdx, rbp add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_array_sort( long long a1, long long a2, long long a3, long long a4, __m128 *a5, long long a6, double a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { __m128 v15; // xmm0 unsigned long long v16; // r13 unsigned long long v17; // r15 long long v18; // r12 long long v19; // rdx signed long long v20; // r14 unsigned long long v21; // rbp long long v22; // rax long long v23; // r12 int PropertyInt64; // eax _QWORD *v25; // r12 unsigned long long v26; // r13 long long v27; // rbp long long v28; // rsi double v29; // xmm4_8 double v30; // xmm5_8 long long v31; // r12 long long i; // r13 signed long long v33; // r14 int v34; // eax long long v35; // rbp long long *v36; // r12 long long v38; // [rsp+8h] [rbp-80h] long long v39; // [rsp+10h] [rbp-78h] long long v40; // [rsp+18h] [rbp-70h] long long v41; // [rsp+20h] [rbp-68h] signed long long v42; // [rsp+28h] [rbp-60h] BYREF unsigned long long v43; // [rsp+30h] [rbp-58h] BYREF long long v44; // [rsp+38h] [rbp-50h] BYREF long long v45; // [rsp+40h] [rbp-48h] __m128 v46; // [rsp+48h] [rbp-40h] v44 = a1; v45 = 0LL; v15 = *a5; v46 = *a5; if ( v46.m128_i32[2] != 3 ) { if ( (unsigned int)check_function( a1, v46.m128_i64[0], v46.m128_i32[2], v15, a8, a9, a10, *(double *)a11.m128_u64, *(double *)a12.m128_u64, a13, a14) ) { v40 = 3LL; v16 = 0LL; v17 = 0LL; v18 = 0LL; v39 = 0LL; LABEL_40: v35 = v18; v36 = (long long *)(32 * v16 + v18 + 16); while ( v16 < v17 ) { JS_FreeValue(a1, *(v36 - 2), *(v36 - 1)); if ( *v36 ) JS_FreeValue(a1, *v36, -7LL); ++v16; v36 += 4; } js_free(a1, v35); v31 = v39; v27 = v40; LABEL_46: JS_FreeValue(a1, v31, v27); return 0LL; } HIDWORD(v45) = 1; } v39 = JS_ToObject(a1, a2, a3, a4, (long long)a5, a6, v15, a8, a9, a10, a11, a12, a13, a14); v16 = 0LL; v40 = v19; if ( (unsigned int)js_get_length64(a1, &v42, v39, v19) ) { v17 = 0LL; v18 = 0LL; goto LABEL_40; } v16 = 0LL; v20 = 0LL; v41 = 0LL; v17 = 0LL; v21 = 0LL; v38 = 0LL; while ( v20 < v42 ) { if ( v17 >= v21 ) { v22 = js_realloc2(a1, v38, 32 * (((v21 >> 1) + v21 + 31) & 0xFFFFFFFFFFFFFFF0LL), &v43); if ( !v22 ) { v18 = v38; goto LABEL_40; } v21 = (((v21 >> 1) + v21 + 31) & 0xFFFFFFFFFFFFFFF0LL) + (v43 >> 5); } else { v22 = v38; } v38 = v22; v23 = v22 + 32 * v17; PropertyInt64 = JS_TryGetPropertyInt64(a1, v39, v40, v20, v23); if ( PropertyInt64 < 0 ) { LABEL_39: v18 = v38; goto LABEL_40; } if ( PropertyInt64 ) { if ( *(_DWORD *)(v23 + 8) == 3 ) { ++v41; } else { *(_QWORD *)(v23 + 16) = 0LL; *(_QWORD *)(v23 + 24) = v20; ++v17; } } ++v20; } v18 = v38; rqsort( v38, v17, 32LL, (long long ( *)(unsigned long long, unsigned long long, long long))js_array_cmp_generic, (long long)&v44); if ( (_DWORD)v45 ) { v16 = 0LL; goto LABEL_40; } v25 = (_QWORD *)(v38 + 24); v26 = 0LL; v27 = v40; while ( v17 != v26 ) { v28 = *(v25 - 1); if ( v28 ) JS_FreeValue(a1, v28, -7LL); if ( v26 == *v25 ) { JS_FreeValue(a1, *(v25 - 3), *(v25 - 2)); } else if ( (int)JS_SetPropertyInt64(a1, v39, v40, v26, *(v25 - 3), *(v25 - 2)) < 0 ) { v16 = v26 + 1; goto LABEL_39; } ++v26; v25 += 4; } js_free(a1, v38); v31 = v39; for ( i = v41; i > 0; --i ) { if ( (int)JS_SetPropertyInt64(a1, v39, v40, v17, 0LL, 3LL) < 0 ) goto LABEL_46; ++v17; } v33 = v42; while ( (long long)v17 < v33 ) { v34 = JS_DeletePropertyInt64(a1, v39, v40, v17++, 0x4000, v15, a8, a9, a10, v29, v30, a13, a14); if ( v34 < 0 ) goto LABEL_46; } return v31; }
js_array_sort: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV qword ptr [RSP + 0x38],RDI AND qword ptr [RSP + 0x40],0x0 MOVUPS XMM0,xmmword ptr [R8] MOVUPS xmmword ptr [RSP + 0x48],XMM0 MOV RDX,qword ptr [RSP + 0x50] CMP EDX,0x3 JZ 0x00163a88 MOV RSI,qword ptr [RSP + 0x48] MOV RDI,RBX CALL 0x0013949a TEST EAX,EAX JZ 0x00163a80 PUSH 0x3 POP RAX MOV qword ptr [RSP + 0x18],RAX XOR R13D,R13D XOR R15D,R15D XOR R12D,R12D MOV qword ptr [RSP + 0x10],0x0 JMP 0x00163cb5 LAB_00163a80: MOV dword ptr [RSP + 0x44],0x1 LAB_00163a88: MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x00120b92 MOV R14,RDX LEA RSI,[RSP + 0x28] MOV RDI,RBX MOV qword ptr [RSP + 0x10],RAX MOV RDX,RAX MOV RCX,R14 CALL 0x0011cc43 XOR R13D,R13D TEST EAX,EAX MOV qword ptr [RSP + 0x18],R14 JZ 0x00163ac8 XOR R15D,R15D XOR R12D,R12D JMP 0x00163cb5 LAB_00163ac8: XOR R13D,R13D XOR R14D,R14D MOV qword ptr [RSP + 0x20],0x0 XOR R15D,R15D XOR EBP,EBP MOV qword ptr [RSP + 0x8],0x0 LAB_00163ae5: CMP R14,qword ptr [RSP + 0x28] JGE 0x00163b95 CMP R15,RBP JNC 0x00163afc MOV RAX,qword ptr [RSP + 0x8] JMP 0x00163b3f LAB_00163afc: MOV RAX,RBP SHR RAX,0x1 LEA R12,[RAX + RBP*0x1] ADD R12,0x1f AND R12,-0x10 MOV RDX,R12 SHL RDX,0x5 MOV RDI,RBX MOV RBP,qword ptr [RSP + 0x8] MOV RSI,RBP LEA RCX,[RSP + 0x30] CALL 0x001172b1 TEST RAX,RAX JZ 0x00163bc6 MOV RBP,qword ptr [RSP + 0x30] SHR RBP,0x5 ADD RBP,R12 LAB_00163b3f: MOV R12,R15 SHL R12,0x5 MOV qword ptr [RSP + 0x8],RAX ADD R12,RAX MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] MOV RCX,R14 MOV R8,R12 CALL 0x00142688 TEST EAX,EAX JS 0x00163cb0 JZ 0x00163b8d CMP dword ptr [R12 + 0x8],0x3 JNZ 0x00163b7f INC qword ptr [RSP + 0x20] JMP 0x00163b8d LAB_00163b7f: AND qword ptr [R12 + 0x10],0x0 MOV qword ptr [R12 + 0x18],R14 INC R15 LAB_00163b8d: INC R14 JMP 0x00163ae5 LAB_00163b95: LEA RCX,[0x16504f] PUSH 0x20 POP RDX LEA R14,[RSP + 0x38] MOV R12,qword ptr [RSP + 0x8] MOV RDI,R12 MOV RSI,R15 MOV R8,R14 CALL 0x0011683c CMP dword ptr [R14 + 0x8],0x0 JZ 0x00163bce XOR R13D,R13D JMP 0x00163cb5 LAB_00163bc6: MOV R12,RBP JMP 0x00163cb5 LAB_00163bce: ADD R12,0x18 XOR R13D,R13D PUSH -0x7 POP R14 MOV RBP,qword ptr [RSP + 0x18] LAB_00163bde: CMP R15,R13 JZ 0x00163c38 MOV RSI,qword ptr [R12 + -0x8] TEST RSI,RSI JZ 0x00163bf8 MOV RDI,RBX MOV RDX,R14 CALL 0x0011801e LAB_00163bf8: MOV R8,qword ptr [R12 + -0x18] MOV R9,qword ptr [R12 + -0x10] CMP R13,qword ptr [R12] JNZ 0x00163c18 MOV RDI,RBX MOV RSI,R8 MOV RDX,R9 CALL 0x0011801e JMP 0x00163c2f LAB_00163c18: MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x10] MOV RDX,RBP MOV RCX,R13 CALL 0x0011f0a6 TEST EAX,EAX JS 0x00163cad LAB_00163c2f: INC R13 ADD R12,0x20 JMP 0x00163bde LAB_00163c38: MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x8] CALL 0x0011726e PUSH 0x3 POP R14 MOV R12,qword ptr [RSP + 0x10] MOV R13,qword ptr [RSP + 0x20] LAB_00163c53: TEST R13,R13 JLE 0x00163c7f MOV RDI,RBX MOV RSI,R12 MOV RDX,RBP MOV RCX,R15 XOR R8D,R8D MOV R9,R14 CALL 0x0011f0a6 TEST EAX,EAX JS 0x00163d13 INC R15 DEC R13 JMP 0x00163c53 LAB_00163c7f: MOV R14,qword ptr [RSP + 0x28] LAB_00163c84: CMP R15,R14 JGE 0x00163d27 MOV RDI,RBX MOV RSI,R12 MOV RDX,RBP MOV RCX,R15 MOV R8D,0x4000 CALL 0x001210a9 INC R15 TEST EAX,EAX JNS 0x00163c84 JMP 0x00163d13 LAB_00163cad: INC R13 LAB_00163cb0: MOV R12,qword ptr [RSP + 0x8] LAB_00163cb5: MOV RAX,R13 SHL RAX,0x5 MOV RBP,R12 ADD R12,RAX ADD R12,0x10 PUSH -0x7 POP R14 LAB_00163cca: CMP R13,R15 JNC 0x00163cfe MOV RSI,qword ptr [R12 + -0x10] MOV RDX,qword ptr [R12 + -0x8] MOV RDI,RBX CALL 0x0011801e MOV RSI,qword ptr [R12] TEST RSI,RSI JZ 0x00163cf5 MOV RDI,RBX MOV RDX,R14 CALL 0x0011801e LAB_00163cf5: INC R13 ADD R12,0x20 JMP 0x00163cca LAB_00163cfe: MOV RDI,RBX MOV RSI,RBP CALL 0x0011726e MOV R12,qword ptr [RSP + 0x10] MOV RBP,qword ptr [RSP + 0x18] LAB_00163d13: MOV RDI,RBX MOV RSI,R12 MOV RDX,RBP CALL 0x0011801e PUSH 0x6 POP RBP XOR R12D,R12D LAB_00163d27: MOV RAX,R12 MOV RDX,RBP ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_array_sort(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 *param_5) { int iVar1; int8 uVar2; int8 uVar3; ulong uVar4; long lVar5; ulong *puVar6; long *plVar7; ulong uVar8; long lVar9; ulong uVar10; int1 auVar11 [16]; long local_80; long local_68; long local_60; ulong local_58; int8 local_50; int8 local_48; int4 local_40; int4 uStack_3c; int iStack_38; int4 uStack_34; local_48 = 0; local_40 = *(int4 *)param_5; uStack_3c = *(int4 *)((long)param_5 + 4); iStack_38 = *(int *)(param_5 + 1); uStack_34 = *(int4 *)((long)param_5 + 0xc); local_50 = param_1; if (iStack_38 == 3) { LAB_00163a88: auVar11 = JS_ToObject(param_1,param_2,param_3); uVar3 = auVar11._8_8_; uVar2 = auVar11._0_8_; iVar1 = js_get_length64(param_1,&local_60,uVar2,uVar3); uVar8 = 0; if (iVar1 == 0) { uVar8 = 0; local_68 = 0; uVar10 = 0; uVar4 = 0; local_80 = 0; for (lVar9 = 0; lVar9 < local_60; lVar9 = lVar9 + 1) { if (uVar4 <= uVar10) { uVar4 = (uVar4 >> 1) + uVar4 + 0x1f & 0xfffffffffffffff0; lVar5 = js_realloc2(param_1,local_80,uVar4 << 5,&local_58); if (lVar5 == 0) goto LAB_00163cb5; uVar4 = (local_58 >> 5) + uVar4; local_80 = lVar5; } lVar5 = uVar10 * 0x20 + local_80; iVar1 = JS_TryGetPropertyInt64(param_1,uVar2,uVar3,lVar9,lVar5); if (iVar1 < 0) goto LAB_00163cb5; if (iVar1 != 0) { if (*(int *)(lVar5 + 8) == 3) { local_68 = local_68 + 1; } else { *(int8 *)(lVar5 + 0x10) = 0; *(long *)(lVar5 + 0x18) = lVar9; uVar10 = uVar10 + 1; } } } rqsort(local_80,uVar10,0x20,js_array_cmp_generic,&local_50); if ((int)local_48 == 0) { puVar6 = (ulong *)(local_80 + 0x18); for (uVar8 = 0; uVar10 != uVar8; uVar8 = uVar8 + 1) { if (puVar6[-1] != 0) { JS_FreeValue(param_1,puVar6[-1],0xfffffffffffffff9); } if (uVar8 == *puVar6) { JS_FreeValue(param_1,puVar6[-3],puVar6[-2]); } else { iVar1 = JS_SetPropertyInt64(param_1,uVar2,uVar3,uVar8); if (iVar1 < 0) { uVar8 = uVar8 + 1; goto LAB_00163cb5; } } puVar6 = puVar6 + 4; } js_free(param_1,local_80); for (; 0 < local_68; local_68 = local_68 + -1) { iVar1 = JS_SetPropertyInt64(param_1,uVar2,uVar3,uVar10,0,3); if (iVar1 < 0) goto LAB_00163d13; uVar10 = uVar10 + 1; } do { if (local_60 <= (long)uVar10) { return auVar11; } iVar1 = JS_DeletePropertyInt64(param_1,uVar2,uVar3,uVar10,0x4000); uVar10 = uVar10 + 1; } while (-1 < iVar1); goto LAB_00163d13; } uVar8 = 0; } else { uVar10 = 0; local_80 = 0; } } else { iVar1 = check_function(param_1,*param_5); if (iVar1 == 0) { local_48 = CONCAT44(1,(int)local_48); goto LAB_00163a88; } uVar8 = 0; uVar10 = 0; local_80 = 0; auVar11 = ZEXT816(3) << 0x40; } LAB_00163cb5: plVar7 = (long *)(local_80 + uVar8 * 0x20 + 0x10); for (; uVar8 < uVar10; uVar8 = uVar8 + 1) { JS_FreeValue(param_1,plVar7[-2],plVar7[-1]); if (*plVar7 != 0) { JS_FreeValue(param_1,*plVar7,0xfffffffffffffff9); } plVar7 = plVar7 + 4; } js_free(param_1,local_80); LAB_00163d13: JS_FreeValue(param_1,auVar11._0_8_,auVar11._8_8_); return ZEXT816(6) << 0x40; }
10,390
translog_wait_for_closing
eloqsql/storage/maria/ma_loghandler.c
static void translog_wait_for_closing(struct st_translog_buffer *buffer) { DBUG_ENTER("translog_wait_for_closing"); DBUG_PRINT("enter", ("Buffer #%u %p copies in progress: %u " "is closing %u File: %d size: %lu", (uint) buffer->buffer_no, buffer, (uint) buffer->copy_to_buffer_in_progress, (uint) buffer->is_closing_buffer, (buffer->file ? buffer->file->handler.file : -1), (ulong) buffer->size)); translog_buffer_lock_assert_owner(buffer); while (buffer->is_closing_buffer) { DBUG_PRINT("info", ("wait for writers... buffer: #%u %p", (uint) buffer->buffer_no, buffer)); DBUG_ASSERT(buffer->file != NULL); mysql_cond_wait(&buffer->waiting_filling_buffer, &buffer->mutex); DBUG_PRINT("info", ("wait for writers done buffer: #%u %p", (uint) buffer->buffer_no, buffer)); } DBUG_VOID_RETURN; }
O0
c
translog_wait_for_closing: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) jmp 0x3c4de jmp 0x3c4e0 movq -0x8(%rbp), %rax cmpb $0x0, 0x1000d8(%rax) je 0x3c520 jmp 0x3c4ef jmp 0x3c4f1 jmp 0x3c4f3 jmp 0x3c4f5 movq -0x8(%rbp), %rdi addq $0x100040, %rdi # imm = 0x100040 movq -0x8(%rbp), %rsi addq $0x100090, %rsi # imm = 0x100090 leaq 0x1168d5(%rip), %rdx # 0x152de7 movl $0x7e6, %ecx # imm = 0x7E6 callq 0x2f8a0 jmp 0x3c51e jmp 0x3c4e0 jmp 0x3c522 jmp 0x3c524 addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
translog_wait_for_closing: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi jmp short $+2 loc_3C4DE: jmp short $+2 loc_3C4E0: mov rax, [rbp+var_8] cmp byte ptr ds:loc_1000D8[rax], 0 jz short loc_3C520 jmp short $+2 loc_3C4EF: jmp short $+2 loc_3C4F1: jmp short $+2 loc_3C4F3: jmp short $+2 loc_3C4F5: mov rdi, [rbp+var_8] add rdi, 100040h mov rsi, [rbp+var_8] add rsi, 100090h lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 7E6h call inline_mysql_cond_wait jmp short $+2 loc_3C51E: jmp short loc_3C4E0 loc_3C520: jmp short $+2 loc_3C522: jmp short $+2 loc_3C524: add rsp, 10h pop rbp retn
long long translog_wait_for_closing(long long a1) { long long result; // rax while ( 1 ) { result = a1; if ( !*((_BYTE *)&loc_1000D8 + a1) ) break; inline_mysql_cond_wait( a1 + 1048640, a1 + 1048720, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x7E6u); } return result; }
translog_wait_for_closing: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI JMP 0x0013c4de LAB_0013c4de: JMP 0x0013c4e0 LAB_0013c4e0: MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x1000d8],0x0 JZ 0x0013c520 JMP 0x0013c4ef LAB_0013c4ef: JMP 0x0013c4f1 LAB_0013c4f1: JMP 0x0013c4f3 LAB_0013c4f3: JMP 0x0013c4f5 LAB_0013c4f5: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x100040 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x100090 LEA RDX,[0x252de7] MOV ECX,0x7e6 CALL 0x0012f8a0 JMP 0x0013c51e LAB_0013c51e: JMP 0x0013c4e0 LAB_0013c520: JMP 0x0013c522 LAB_0013c522: JMP 0x0013c524 LAB_0013c524: ADD RSP,0x10 POP RBP RET
void translog_wait_for_closing(long param_1) { while (*(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1) != '\0') { inline_mysql_cond_wait ((long)&Elf64_Phdr_ARRAY_00100040[0].p_type + param_1,param_1 + 0x100090, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x7e6); } return; }
10,391
YogaTest_dirtied_propagation_Test::TestBody()
yoga-mod/tests/YGDirtiedTest.cpp
TEST(YogaTest, dirtied_propagation) { YGNodeRef root = YGNodeNew(); YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNew(); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNew(); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); int dirtiedCount = 0; YGNodeSetContext(root, &dirtiedCount); YGNodeSetDirtiedFunc(root, _dirtied); ASSERT_EQ(0, dirtiedCount); // `_dirtied` MUST be called for the first time. static_cast<yoga::Node*>(root_child0)->markDirtyAndPropagate(); ASSERT_EQ(1, dirtiedCount); // `_dirtied` must NOT be called for the second time. static_cast<yoga::Node*>(root_child0)->markDirtyAndPropagate(); ASSERT_EQ(1, dirtiedCount); }
O0
cpp
YogaTest_dirtied_propagation_Test::TestBody(): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x10(%rbp) callq 0xf4bc0 movq -0x10(%rbp), %rdi movl $0x10, %esi callq 0x354d0 addq $0x10, %rsp popq %rbp retq nopl (%rax)
_ZN33YogaTest_dirtied_propagation_TestD0Ev: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8]; this mov [rbp+var_10], rdi call _ZN33YogaTest_dirtied_propagation_TestD2Ev; YogaTest_dirtied_propagation_Test::~YogaTest_dirtied_propagation_Test() mov rdi, [rbp+var_10]; void * mov esi, 10h; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) add rsp, 10h pop rbp retn
void YogaTest_dirtied_propagation_Test::~YogaTest_dirtied_propagation_Test( YogaTest_dirtied_propagation_Test *this) { YogaTest_dirtied_propagation_Test::~YogaTest_dirtied_propagation_Test(this); operator delete(this, 0x10uLL); }
~YogaTest_dirtied_propagation_Test: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RDI CALL 0x001f4bc0 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x10 CALL 0x001354d0 ADD RSP,0x10 POP RBP RET
/* YogaTest_dirtied_propagation_Test::~YogaTest_dirtied_propagation_Test() */ void __thiscall YogaTest_dirtied_propagation_Test::~YogaTest_dirtied_propagation_Test (YogaTest_dirtied_propagation_Test *this) { ~YogaTest_dirtied_propagation_Test(this); operator_delete(this,0x10); return; }
10,392
wt_resource_init
eloqsql/mysys/waiting_threads.c
static void wt_resource_init(LF_HASH *hash __attribute__((unused)), WT_RESOURCE *rc, WT_RESOURCE_ID *id) { DBUG_ENTER("wt_resource_init"); rc->id= *id; rc->waiter_count= 0; rc->state= ACTIVE; #ifndef DBUG_OFF rc->cond_mutex= 0; #endif DBUG_VOID_RETURN; }
O0
c
wt_resource_init: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rax movq -0x18(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x10(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x14(%rax) jmp 0xffc8e popq %rbp retq
wt_resource_init: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_10] mov rcx, [rbp+var_18] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rax, [rbp+var_10] mov dword ptr [rax+10h], 0 mov rax, [rbp+var_10] mov dword ptr [rax+14h], 0 jmp short $+2 loc_FFC8E: pop rbp retn
long long wt_resource_init(long long a1, long long a2, _QWORD *a3) { long long result; // rax *(_QWORD *)a2 = *a3; *(_QWORD *)(a2 + 8) = a3[1]; *(_DWORD *)(a2 + 16) = 0; result = a2; *(_DWORD *)(a2 + 20) = 0; return result; }
wt_resource_init: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x10],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x14],0x0 JMP 0x001ffc8e LAB_001ffc8e: POP RBP RET
void wt_resource_init(int8 param_1,int8 *param_2,int8 *param_3) { *param_2 = *param_3; param_2[1] = param_3[1]; *(int4 *)(param_2 + 2) = 0; *(int4 *)((long)param_2 + 0x14) = 0; return; }
10,393
mbedtls_chachapoly_update
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/chachapoly.c
int mbedtls_chachapoly_update(mbedtls_chachapoly_context *ctx, size_t len, const unsigned char *input, unsigned char *output) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; CHACHAPOLY_VALIDATE_RET(ctx != NULL); CHACHAPOLY_VALIDATE_RET(len == 0 || input != NULL); CHACHAPOLY_VALIDATE_RET(len == 0 || output != NULL); if ((ctx->state != CHACHAPOLY_STATE_AAD) && (ctx->state != CHACHAPOLY_STATE_CIPHERTEXT)) { return MBEDTLS_ERR_CHACHAPOLY_BAD_STATE; } if (ctx->state == CHACHAPOLY_STATE_AAD) { ctx->state = CHACHAPOLY_STATE_CIPHERTEXT; ret = chachapoly_pad_aad(ctx); if (ret != 0) { return ret; } } ctx->ciphertext_len += len; if (ctx->mode == MBEDTLS_CHACHAPOLY_ENCRYPT) { ret = mbedtls_chacha20_update(&ctx->chacha20_ctx, len, input, output); if (ret != 0) { return ret; } ret = mbedtls_poly1305_update(&ctx->poly1305_ctx, output, len); if (ret != 0) { return ret; } } else { /* DECRYPT */ ret = mbedtls_poly1305_update(&ctx->poly1305_ctx, input, len); if (ret != 0) { return ret; } ret = mbedtls_chacha20_update(&ctx->chacha20_ctx, len, input, output); if (ret != 0) { return ret; } } return 0; }
O3
c
mbedtls_chachapoly_update: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %rbx movq %rdx, %r12 movl 0xe8(%rdi), %ecx leal -0x1(%rcx), %edx movl $0xffffffac, %eax # imm = 0xFFFFFFAC cmpl $0x1, %edx ja 0xa0384 movq %rsi, %r14 movq %rdi, %r15 cmpl $0x1, %ecx jne 0xa031a movl $0x2, 0xe8(%r15) movl 0xd8(%r15), %eax andl $0xf, %eax je 0xa031a xorl %ecx, %ecx leaq 0x8(%rsp), %rsi movq %rcx, 0x7(%rsi) movq %rcx, (%rsi) leaq 0x88(%r15), %rdi movl $0x10, %edx subl %eax, %edx callq 0xa07cb testl %eax, %eax jne 0xa0384 addq %r14, 0xe0(%r15) cmpl $0x0, 0xec(%r15) je 0xa0354 leaq 0x88(%r15), %rdi movq %r12, %rsi movq %r14, %rdx callq 0xa07cb testl %eax, %eax jne 0xa0384 movq %r15, %rdi movq %r14, %rsi movq %r12, %rdx movq %rbx, %rcx callq 0x9fb4a jmp 0xa037e movq %r15, %rdi movq %r14, %rsi movq %r12, %rdx movq %rbx, %rcx callq 0x9fb4a testl %eax, %eax jne 0xa0384 addq $0x88, %r15 movq %r15, %rdi movq %rbx, %rsi movq %r14, %rdx callq 0xa07cb testl %eax, %eax jne 0xa0384 xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
mbedtls_chachapoly_update: push r15 push r14 push r12 push rbx sub rsp, 18h mov rbx, rcx mov r12, rdx mov ecx, [rdi+0E8h] lea edx, [rcx-1] mov eax, 0FFFFFFACh cmp edx, 1 ja loc_A0384 mov r14, rsi mov r15, rdi cmp ecx, 1 jnz short loc_A031A mov dword ptr [r15+0E8h], 2 mov eax, [r15+0D8h] and eax, 0Fh jz short loc_A031A xor ecx, ecx lea rsi, [rsp+38h+var_30] mov [rsi+7], rcx mov [rsi], rcx lea rdi, [r15+88h] mov edx, 10h sub edx, eax call mbedtls_poly1305_update test eax, eax jnz short loc_A0384 loc_A031A: add [r15+0E0h], r14 cmp dword ptr [r15+0ECh], 0 jz short loc_A0354 lea rdi, [r15+88h] mov rsi, r12 mov rdx, r14 call mbedtls_poly1305_update test eax, eax jnz short loc_A0384 mov rdi, r15 mov rsi, r14 mov rdx, r12 mov rcx, rbx call mbedtls_chacha20_update jmp short loc_A037E loc_A0354: mov rdi, r15 mov rsi, r14 mov rdx, r12 mov rcx, rbx call mbedtls_chacha20_update test eax, eax jnz short loc_A0384 add r15, 88h mov rdi, r15 mov rsi, rbx mov rdx, r14 call mbedtls_poly1305_update loc_A037E: test eax, eax jnz short loc_A0384 xor eax, eax loc_A0384: add rsp, 18h pop rbx pop r12 pop r14 pop r15 retn
long long mbedtls_chachapoly_update(long long a1, long long a2, long long a3, long long a4) { int v6; // ecx long long result; // rax v6 = *(_DWORD *)(a1 + 232); result = 4294967212LL; if ( (unsigned int)(v6 - 1) <= 1 ) { if ( v6 != 1 || (*(_DWORD *)(a1 + 232) = 2, (*(_DWORD *)(a1 + 216) & 0xF) == 0) || (result = mbedtls_poly1305_update(a1 + 136), !(_DWORD)result) ) { *(_QWORD *)(a1 + 224) += a2; if ( *(_DWORD *)(a1 + 236) ) { result = mbedtls_poly1305_update(a1 + 136); if ( (_DWORD)result ) return result; result = mbedtls_chacha20_update(a1, a2, a3, a4); } else { result = mbedtls_chacha20_update(a1, a2, a3, a4); if ( (_DWORD)result ) return result; result = mbedtls_poly1305_update(a1 + 136); } if ( !(_DWORD)result ) return 0LL; } } return result; }
mbedtls_chachapoly_update: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RCX MOV R12,RDX MOV ECX,dword ptr [RDI + 0xe8] LEA EDX,[RCX + -0x1] MOV EAX,0xffffffac CMP EDX,0x1 JA 0x001a0384 MOV R14,RSI MOV R15,RDI CMP ECX,0x1 JNZ 0x001a031a MOV dword ptr [R15 + 0xe8],0x2 MOV EAX,dword ptr [R15 + 0xd8] AND EAX,0xf JZ 0x001a031a XOR ECX,ECX LEA RSI,[RSP + 0x8] MOV qword ptr [RSI + 0x7],RCX MOV qword ptr [RSI],RCX LEA RDI,[R15 + 0x88] MOV EDX,0x10 SUB EDX,EAX CALL 0x001a07cb TEST EAX,EAX JNZ 0x001a0384 LAB_001a031a: ADD qword ptr [R15 + 0xe0],R14 CMP dword ptr [R15 + 0xec],0x0 JZ 0x001a0354 LEA RDI,[R15 + 0x88] MOV RSI,R12 MOV RDX,R14 CALL 0x001a07cb TEST EAX,EAX JNZ 0x001a0384 MOV RDI,R15 MOV RSI,R14 MOV RDX,R12 MOV RCX,RBX CALL 0x0019fb4a JMP 0x001a037e LAB_001a0354: MOV RDI,R15 MOV RSI,R14 MOV RDX,R12 MOV RCX,RBX CALL 0x0019fb4a TEST EAX,EAX JNZ 0x001a0384 ADD R15,0x88 MOV RDI,R15 MOV RSI,RBX MOV RDX,R14 CALL 0x001a07cb LAB_001a037e: TEST EAX,EAX JNZ 0x001a0384 XOR EAX,EAX LAB_001a0384: ADD RSP,0x18 POP RBX POP R12 POP R14 POP R15 RET
int8 mbedtls_chachapoly_update(long param_1,long param_2,int8 param_3,int8 param_4) { uint uVar1; int8 uVar2; int7 local_30; int1 uStack_29; int7 uStack_28; uVar2 = 0xffffffac; if (*(int *)(param_1 + 0xe8) - 1U < 2) { if (*(int *)(param_1 + 0xe8) == 1) { *(int4 *)(param_1 + 0xe8) = 2; uVar1 = *(uint *)(param_1 + 0xd8) & 0xf; if (uVar1 != 0) { uStack_28 = 0; local_30 = 0; uStack_29 = 0; uVar2 = mbedtls_poly1305_update(param_1 + 0x88,&local_30,0x10 - uVar1); if ((int)uVar2 != 0) { return uVar2; } } } *(long *)(param_1 + 0xe0) = *(long *)(param_1 + 0xe0) + param_2; if (*(int *)(param_1 + 0xec) == 0) { uVar2 = mbedtls_chacha20_update(param_1,param_2,param_3,param_4); if ((int)uVar2 != 0) { return uVar2; } uVar2 = mbedtls_poly1305_update(param_1 + 0x88,param_4,param_2); } else { uVar2 = mbedtls_poly1305_update(param_1 + 0x88,param_3,param_2); if ((int)uVar2 != 0) { return uVar2; } uVar2 = mbedtls_chacha20_update(param_1,param_2,param_3,param_4); } if ((int)uVar2 == 0) { uVar2 = 0; } } return uVar2; }
10,394
PFS_table_share::aggregate_lock()
eloqsql/storage/perfschema/pfs_instr_class.cc
void PFS_table_share::aggregate_lock(void) { PFS_table_share_lock *lock_stat; lock_stat= find_lock_stat(); if (lock_stat != NULL) { global_table_lock_stat.aggregate(& lock_stat->m_stat); /* Reset lock stat. */ lock_stat->m_stat.reset(); } }
O0
cpp
PFS_table_share::aggregate_lock(): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x41a20 movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) je 0x44431 movq -0x10(%rbp), %rsi addq $0x8, %rsi leaq 0x3c8321(%rip), %rdi # 0x40c740 callq 0x3ddb0 movq -0x10(%rbp), %rdi addq $0x8, %rdi callq 0x45050 addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
_ZN15PFS_table_share14aggregate_lockEv: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8]; this call _ZNK15PFS_table_share14find_lock_statEv; PFS_table_share::find_lock_stat(void) mov [rbp+var_10], rax cmp [rbp+var_10], 0 jz short loc_44431 mov rsi, [rbp+var_10] add rsi, 8; PFS_table_lock_stat * lea rdi, global_table_lock_stat; this call _ZN19PFS_table_lock_stat9aggregateEPKS_; PFS_table_lock_stat::aggregate(PFS_table_lock_stat const*) mov rdi, [rbp+var_10] add rdi, 8; this call _ZN19PFS_table_lock_stat5resetEv; PFS_table_lock_stat::reset(void) loc_44431: add rsp, 10h pop rbp retn
long long PFS_table_share::aggregate_lock(PFS_table_share *this) { long long result; // rax long long v2; // [rsp+0h] [rbp-10h] result = PFS_table_share::find_lock_stat(this); v2 = result; if ( result ) { PFS_table_lock_stat::aggregate( (PFS_table_lock_stat *)&global_table_lock_stat, (const PFS_table_lock_stat *)(result + 8)); return PFS_table_lock_stat::reset((PFS_table_lock_stat *)(v2 + 8)); } return result; }
aggregate_lock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x00141a20 MOV qword ptr [RBP + -0x10],RAX CMP qword ptr [RBP + -0x10],0x0 JZ 0x00144431 MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x8 LEA RDI,[0x50c740] CALL 0x0013ddb0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x8 CALL 0x00145050 LAB_00144431: ADD RSP,0x10 POP RBP RET
/* PFS_table_share::aggregate_lock() */ void __thiscall PFS_table_share::aggregate_lock(PFS_table_share *this) { long lVar1; lVar1 = find_lock_stat(this); if (lVar1 != 0) { PFS_table_lock_stat::aggregate ((PFS_table_lock_stat *)global_table_lock_stat,(PFS_table_lock_stat *)(lVar1 + 8)); PFS_table_lock_stat::reset((PFS_table_lock_stat *)(lVar1 + 8)); } return; }
10,395
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::end_array()
llama.cpp/common/json.hpp
bool end_array() { bool keep = true; if (ref_stack.back()) { keep = callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::array_end, *ref_stack.back()); if (keep) { ref_stack.back()->set_parents(); } else { // discard array *ref_stack.back() = discarded; } } JSON_ASSERT(!ref_stack.empty()); JSON_ASSERT(!keep_stack.empty()); ref_stack.pop_back(); keep_stack.pop_back(); // remove discarded value if (!keep && !ref_stack.empty() && ref_stack.back()->is_array()) { ref_stack.back()->m_data.m_value.array->pop_back(); } return true; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::end_array(): pushq %rbp pushq %r14 pushq %rbx subq $0x20, %rsp movq %rdi, %rbx movq 0x10(%rdi), %rax movq -0x8(%rax), %rcx movb $0x1, %bpl testq %rcx, %rcx je 0x7ba6f subq 0x8(%rbx), %rax shrq $0x3, %rax decl %eax movl %eax, 0xc(%rsp) movb $0x3, 0xb(%rsp) cmpq $0x0, 0x90(%rbx) je 0x7bb37 leaq 0x80(%rbx), %rdi leaq 0xc(%rsp), %rsi leaq 0xb(%rsp), %rdx callq *0x98(%rbx) testb %al, %al jne 0x7ba6f leaq 0xa8(%rbx), %rsi leaq 0x10(%rsp), %r14 movq %r14, %rdi callq 0x7c8b8 movq 0x10(%rbx), %rax movq -0x8(%rax), %rdi movq %r14, %rsi callq 0x7a01c xorl %ebp, %ebp movq %r14, %rdi xorl %esi, %esi callq 0x772be movq %r14, %rdi callq 0x7cd98 movq 0x8(%rbx), %rcx movq 0x10(%rbx), %rax cmpq %rax, %rcx je 0x7bafa movq 0x30(%rbx), %rdx movl 0x38(%rbx), %esi cmpq %rdx, 0x20(%rbx) sete %dil testl %esi, %esi sete %r8b andb %dil, %r8b cmpb $0x1, %r8b je 0x7bb16 leaq -0x8(%rax), %rdi movq %rdi, 0x10(%rbx) subl $0x1, %esi movl %esi, 0x38(%rbx) jae 0x7bab9 movl $0x3f, 0x38(%rbx) addq $-0x8, %rdx movq %rdx, 0x30(%rbx) cmpq %rdi, %rcx sete %cl orb %cl, %bpl jne 0x7baef movq -0x10(%rax), %rax cmpb $0x2, (%rax) jne 0x7baef movq 0x8(%rax), %rax movq 0x8(%rax), %rbx addq $-0x10, %rbx movq %rbx, 0x8(%rax) movq %rbx, %rdi xorl %esi, %esi callq 0x772be movq %rbx, %rdi callq 0x7cd98 movb $0x1, %al addq $0x20, %rsp popq %rbx popq %r14 popq %rbp retq leaq 0xa127f(%rip), %rdi # 0x11cd80 leaq 0x996a3(%rip), %rdx # 0x1151ab leaq 0xa224d(%rip), %rcx # 0x11dd5c movl $0x1bf5, %esi # imm = 0x1BF5 jmp 0x7bb30 leaq 0xa1263(%rip), %rdi # 0x11cd80 leaq 0x99687(%rip), %rdx # 0x1151ab leaq 0xa21ab(%rip), %rcx # 0x11dcd6 movl $0x1bf6, %esi # imm = 0x1BF6 xorl %eax, %eax callq 0x20ed0 callq 0x21320
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9end_arrayEv: push rbp push r14 push rbx sub rsp, 20h mov rbx, rdi mov rax, [rdi+10h] mov rcx, [rax-8] mov bpl, 1 test rcx, rcx jz short loc_7BA6F sub rax, [rbx+8] shr rax, 3 dec eax mov [rsp+38h+var_2C], eax mov [rsp+38h+var_2D], 3 cmp qword ptr [rbx+90h], 0 jz loc_7BB37 lea rdi, [rbx+80h] lea rsi, [rsp+38h+var_2C] lea rdx, [rsp+38h+var_2D] call qword ptr [rbx+98h] test al, al jnz short loc_7BA6F lea rsi, [rbx+0A8h] lea r14, [rsp+38h+var_28] mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rax, [rbx+10h] mov rdi, [rax-8] mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>) xor ebp, ebp mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<std::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_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::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_7BA6F: mov rcx, [rbx+8] mov rax, [rbx+10h] cmp rcx, rax jz short loc_7BAFA mov rdx, [rbx+30h] mov esi, [rbx+38h] cmp [rbx+20h], rdx setz dil test esi, esi setz r8b and r8b, dil cmp r8b, 1 jz short loc_7BB16 lea rdi, [rax-8] mov [rbx+10h], rdi sub esi, 1 mov [rbx+38h], esi jnb short loc_7BAB9 mov dword ptr [rbx+38h], 3Fh ; '?' add rdx, 0FFFFFFFFFFFFFFF8h mov [rbx+30h], rdx loc_7BAB9: cmp rcx, rdi setz cl or bpl, cl jnz short loc_7BAEF mov rax, [rax-10h] cmp byte ptr [rax], 2 jnz short loc_7BAEF mov rax, [rax+8] mov rbx, [rax+8] add rbx, 0FFFFFFFFFFFFFFF0h mov [rax+8], rbx mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<std::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_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::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_7BAEF: mov al, 1 add rsp, 20h pop rbx pop r14 pop rbp retn loc_7BAFA: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRefStackEmpty; "!ref_stack.empty()" mov esi, 1BF5h jmp short loc_7BB30 loc_7BB16: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKeepStackEmpty; "!keep_stack.empty()" mov esi, 1BF6h loc_7BB30: xor eax, eax call _ggml_abort loc_7BB37: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::end_array( long long a1) { long long v1; // rax char v2; // bp long long v3; // rcx long long v4; // rax long long v5; // rdx int v6; // esi long long v7; // rax long long v8; // rax char *v9; // rbx char v11; // [rsp+Bh] [rbp-2Dh] BYREF int v12; // [rsp+Ch] [rbp-2Ch] BYREF char v13[40]; // [rsp+10h] [rbp-28h] BYREF v1 = *(_QWORD *)(a1 + 16); v2 = 1; if ( *(_QWORD *)(v1 - 8) ) { v12 = ((unsigned long long)(v1 - *(_QWORD *)(a1 + 8)) >> 3) - 1; v11 = 3; if ( !*(_QWORD *)(a1 + 144) ) goto LABEL_15; if ( !(*(unsigned __int8 ( **)(long long, int *, char *))(a1 + 152))(a1 + 128, &v12, &v11) ) { 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>::basic_json( v13, a1 + 168); 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>::operator=( *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL), (long long)v13); v2 = 0; 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>::assert_invariant(v13); 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>::data::~data(v13); } } v3 = *(_QWORD *)(a1 + 8); v4 = *(_QWORD *)(a1 + 16); if ( v3 == v4 ) { ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 7157LL, "GGML_ASSERT(%s) failed", "!ref_stack.empty()"); goto LABEL_15; } v5 = *(_QWORD *)(a1 + 48); v6 = *(_DWORD *)(a1 + 56); if ( *(_QWORD *)(a1 + 32) == v5 && v6 == 0 ) { ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 7158LL, "GGML_ASSERT(%s) failed", "!keep_stack.empty()"); LABEL_15: std::__throw_bad_function_call(); } *(_QWORD *)(a1 + 16) = v4 - 8; *(_DWORD *)(a1 + 56) = v6 - 1; if ( !v6 ) { *(_DWORD *)(a1 + 56) = 63; *(_QWORD *)(a1 + 48) = v5 - 8; } if ( !((v3 == v4 - 8) | (unsigned __int8)v2) ) { v7 = *(_QWORD *)(v4 - 16); if ( *(_BYTE *)v7 == 2 ) { v8 = *(_QWORD *)(v7 + 8); v9 = (char *)(*(_QWORD *)(v8 + 8) - 16LL); *(_QWORD *)(v8 + 8) = v9; 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>::assert_invariant(v9); 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>::data::~data(v9); } } return 1; }
end_array: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x20 MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x10] MOV RCX,qword ptr [RAX + -0x8] MOV BPL,0x1 TEST RCX,RCX JZ 0x0017ba6f SUB RAX,qword ptr [RBX + 0x8] SHR RAX,0x3 DEC EAX MOV dword ptr [RSP + 0xc],EAX MOV byte ptr [RSP + 0xb],0x3 CMP qword ptr [RBX + 0x90],0x0 JZ 0x0017bb37 LEA RDI,[RBX + 0x80] LEA RSI,[RSP + 0xc] LEA RDX,[RSP + 0xb] CALL qword ptr [RBX + 0x98] TEST AL,AL JNZ 0x0017ba6f LEA RSI,[RBX + 0xa8] LEA R14,[RSP + 0x10] MOV RDI,R14 CALL 0x0017c8b8 MOV RAX,qword ptr [RBX + 0x10] MOV RDI,qword ptr [RAX + -0x8] MOV RSI,R14 CALL 0x0017a01c XOR EBP,EBP MOV RDI,R14 XOR ESI,ESI CALL 0x001772be MOV RDI,R14 CALL 0x0017cd98 LAB_0017ba6f: MOV RCX,qword ptr [RBX + 0x8] MOV RAX,qword ptr [RBX + 0x10] CMP RCX,RAX JZ 0x0017bafa MOV RDX,qword ptr [RBX + 0x30] MOV ESI,dword ptr [RBX + 0x38] CMP qword ptr [RBX + 0x20],RDX SETZ DIL TEST ESI,ESI SETZ R8B AND R8B,DIL CMP R8B,0x1 JZ 0x0017bb16 LEA RDI,[RAX + -0x8] MOV qword ptr [RBX + 0x10],RDI SUB ESI,0x1 MOV dword ptr [RBX + 0x38],ESI JNC 0x0017bab9 MOV dword ptr [RBX + 0x38],0x3f ADD RDX,-0x8 MOV qword ptr [RBX + 0x30],RDX LAB_0017bab9: CMP RCX,RDI SETZ CL OR BPL,CL JNZ 0x0017baef MOV RAX,qword ptr [RAX + -0x10] CMP byte ptr [RAX],0x2 JNZ 0x0017baef MOV RAX,qword ptr [RAX + 0x8] MOV RBX,qword ptr [RAX + 0x8] ADD RBX,-0x10 MOV qword ptr [RAX + 0x8],RBX MOV RDI,RBX XOR ESI,ESI CALL 0x001772be MOV RDI,RBX CALL 0x0017cd98 LAB_0017baef: MOV AL,0x1 ADD RSP,0x20 POP RBX POP R14 POP RBP RET LAB_0017bafa: LEA RDI,[0x21cd80] LEA RDX,[0x2151ab] LEA RCX,[0x21dd5c] MOV ESI,0x1bf5 JMP 0x0017bb30 LAB_0017bb16: LEA RDI,[0x21cd80] LEA RDX,[0x2151ab] LEA RCX,[0x21dcd6] MOV ESI,0x1bf6 LAB_0017bb30: XOR EAX,EAX CALL 0x00120ed0 LAB_0017bb37: CALL 0x00121320
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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> >::end_array() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_callback_parser<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>> ::end_array(json_sax_dom_callback_parser<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) { int iVar1; long lVar2; byte bVar3; char cVar4; char *pcVar5; data *this_00; int8 uVar6; int1 local_2d; int local_2c; 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> local_28 [16]; bVar3 = 1; if (*(long *)(*(long *)(this + 0x10) + -8) != 0) { local_2c = (int)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3) + -1; local_2d = 3; if (*(long *)(this + 0x90) == 0) { /* WARNING: Subroutine does not return */ std::__throw_bad_function_call(); } cVar4 = (**(code **)(this + 0x98))(this + 0x80,&local_2c,&local_2d); if (cVar4 == '\0') { 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> ::basic_json(local_28,(basic_json *)(this + 0xa8)); 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> ::operator=(*(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> **)(*(long *)(this + 0x10) + -8),local_28); bVar3 = 0; 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> ::assert_invariant(SUB81(local_28,0)); 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> ::data::~data((data *)local_28); } } lVar2 = *(long *)(this + 0x10); if (*(long *)(this + 8) == lVar2) { pcVar5 = "!ref_stack.empty()"; uVar6 = 0x1bf5; } else { iVar1 = *(int *)(this + 0x38); if (iVar1 != 0 || *(long *)(this + 0x20) != *(long *)(this + 0x30)) { *(long *)(this + 0x10) = lVar2 + -8; *(int *)(this + 0x38) = iVar1 + -1; if (iVar1 == 0) { *(int4 *)(this + 0x38) = 0x3f; *(long *)(this + 0x30) = *(long *)(this + 0x30) + -8; } if ((!(bool)(bVar3 | *(long *)(this + 8) == lVar2 + -8)) && (**(char **)(lVar2 + -0x10) == '\x02')) { lVar2 = *(long *)(*(char **)(lVar2 + -0x10) + 8); this_00 = (data *)(*(long *)(lVar2 + 8) + -0x10); *(data **)(lVar2 + 8) = this_00; 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> ::assert_invariant(SUB81(this_00,0)); 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> ::data::~data(this_00); } return 1; } pcVar5 = "!keep_stack.empty()"; uVar6 = 0x1bf6; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar6, "GGML_ASSERT(%s) failed",pcVar5); }
10,396
minja::Parser::unterminated(minja::TemplateToken const&) const
monkey531[P]llama/common/minja.hpp
std::runtime_error unterminated(const TemplateToken & token) const { return std::runtime_error("Unterminated " + TemplateToken::typeToString(token.type) + error_location_suffix(*template_str, token.location.pos)); }
O1
cpp
minja::Parser::unterminated(minja::TemplateToken const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movl 0x8(%rdx), %esi leaq 0x68(%rsp), %r12 movq %r12, %rdi callq 0x9acf0 leaq 0x598be(%rip), %rcx # 0xf3ac6 movl $0xd, %r8d movq %r12, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x1b9f0 leaq 0x38(%rsp), %r12 movq %r12, -0x10(%r12) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x9a242 movq %rdx, 0x28(%rsp) movq (%rcx), %rdx movq %rdx, 0x38(%rsp) jmp 0x9a24a movups (%rcx), %xmm0 movups %xmm0, (%r12) movq 0x8(%rax), %rdx movq %rdx, 0x30(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq (%r15), %rsi movq 0x20(%r14), %rdx leaq 0x48(%rsp), %rdi callq 0x78104 movq 0x28(%rsp), %rcx movq 0x30(%rsp), %r8 movq 0x50(%rsp), %rdx leaq (%rdx,%r8), %rax movl $0xf, %esi cmpq %r12, %rcx je 0x9a295 movq 0x38(%rsp), %rsi cmpq %rsi, %rax jbe 0x9a2b4 leaq 0x58(%rsp), %rdi movl $0xf, %esi cmpq %rdi, -0x10(%rdi) je 0x9a2af movq 0x58(%rsp), %rsi cmpq %rsi, %rax jbe 0x9a2c5 movq 0x48(%rsp), %rsi leaq 0x28(%rsp), %rdi callq 0x1b270 jmp 0x9a2d3 leaq 0x48(%rsp), %rdi xorl %esi, %esi xorl %edx, %edx callq 0x1b9f0 leaq 0x18(%rsp), %rdx movq %rdx, -0x10(%rdx) movq (%rax), %rsi leaq 0x10(%rax), %rcx cmpq %rcx, %rsi je 0x9a2f7 movq %rsi, 0x8(%rsp) movq (%rcx), %rdx movq %rdx, 0x18(%rsp) jmp 0x9a2fd movups (%rcx), %xmm0 movups %xmm0, (%rdx) movq %rax, %rdx addq $0x8, %rdx movq 0x8(%rax), %rsi movq %rsi, 0x10(%rsp) movq %rcx, (%rax) movq $0x0, (%rdx) movb $0x0, (%rcx) leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x1be40 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9a342 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8f0 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9a35d movq 0x58(%rsp), %rsi incq %rsi callq 0x1b8f0 movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0x9a374 movq 0x38(%rsp), %rsi incq %rsi callq 0x1b8f0 leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9a38f movq 0x78(%rsp), %rsi incq %rsi callq 0x1b8f0 movq %rbx, %rax addq $0x88, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9a3c4 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8f0 jmp 0x9a3c4 movq %rax, %rbx leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9a3e4 movq 0x58(%rsp), %rsi incq %rsi callq 0x1b8f0 jmp 0x9a3e4 movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0x9a400 movq 0x38(%rsp), %rsi incq %rsi callq 0x1b8f0 jmp 0x9a400 movq %rax, %rbx leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9a41b movq 0x78(%rsp), %rsi incq %rsi callq 0x1b8f0 movq %rbx, %rdi callq 0x1bfd0 nop
_ZNK5minja6Parser12unterminatedERKNS_13TemplateTokenE: push r15; int push r14; int push r12; int push rbx; int sub rsp, 88h mov r14, rdx mov r15, rsi mov rbx, rdi mov esi, [rdx+8] lea r12, [rsp+0A8h+var_40] mov rdi, r12 call _ZN5minja13TemplateToken12typeToStringB5cxx11ENS0_4TypeE; minja::TemplateToken::typeToString(minja::TemplateToken::Type) lea rcx, aUnterminated; "Unterminated " mov r8d, 0Dh mov rdi, r12 xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) lea r12, [rsp+0A8h+var_70] mov [r12-10h], r12 mov rdx, [rax] mov rcx, rax add rcx, 10h; int cmp rdx, rcx jz short loc_9A242 mov [rsp+0A8h+var_80], rdx mov rdx, [rcx] mov [rsp+0A8h+var_70], rdx jmp short loc_9A24A loc_9A242: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r12], xmm0 loc_9A24A: mov rdx, [rax+8] mov qword ptr [rsp+0A8h+var_78], rdx; int mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rsi, [r15]; int mov rdx, [r14+20h]; int lea rdi, [rsp+0A8h+var_60]; int call _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; minja::error_location_suffix(std::string const&,ulong) mov rcx, [rsp+0A8h+var_80] mov r8, qword ptr [rsp+0A8h+var_78] mov rdx, [rsp+0A8h+var_58] lea rax, [rdx+r8] mov esi, 0Fh cmp rcx, r12 jz short loc_9A295 mov rsi, [rsp+0A8h+var_70] loc_9A295: cmp rax, rsi jbe short loc_9A2B4 lea rdi, [rsp+0A8h+var_50] mov esi, 0Fh cmp [rdi-10h], rdi jz short loc_9A2AF mov rsi, [rsp+0A8h+var_50] loc_9A2AF: cmp rax, rsi jbe short loc_9A2C5 loc_9A2B4: mov rsi, qword ptr [rsp+0A8h+var_60] lea rdi, [rsp+0A8h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) jmp short loc_9A2D3 loc_9A2C5: lea rdi, [rsp+0A8h+var_60] xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) loc_9A2D3: lea rdx, [rsp+0A8h+var_90] mov [rdx-10h], rdx mov rsi, [rax] lea rcx, [rax+10h] cmp rsi, rcx jz short loc_9A2F7 mov [rsp+0A8h+var_A0], rsi mov rdx, [rcx] mov [rsp+0A8h+var_90], rdx jmp short loc_9A2FD loc_9A2F7: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rdx], xmm0 loc_9A2FD: mov rdx, rax add rdx, 8 mov rsi, [rax+8] mov [rsp+0A8h+var_98], rsi mov [rax], rcx mov qword ptr [rdx], 0 mov byte ptr [rcx], 0 lea rsi, [rsp+0A8h+var_A0] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) lea rax, [rsp+0A8h+var_90] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9A342 mov rsi, [rsp+0A8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9A342: lea rax, [rsp+0A8h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9A35D mov rsi, [rsp+0A8h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9A35D: mov rdi, [rsp+0A8h+var_80]; void * cmp rdi, r12 jz short loc_9A374 mov rsi, [rsp+0A8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9A374: lea rax, [rsp+0A8h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9A38F mov rsi, [rsp+0A8h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9A38F: mov rax, rbx add rsp, 88h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9A3C4 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9A3C4 mov rbx, rax loc_9A3C4: lea rax, [rsp+arg_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9A3E4 mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9A3E4 mov rbx, rax loc_9A3E4: mov rdi, [rsp+arg_20]; void * cmp rdi, r12 jz short loc_9A400 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9A400 mov rbx, rax loc_9A400: lea rax, [rsp+arg_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9A41B mov rsi, [rsp+arg_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9A41B: mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::unterminated(minja::Parser *this, const minja::TemplateToken *a2, long long a3) { long long v4; // rax __int128 *v5; // rcx unsigned long long v6; // rax unsigned long long v7; // rsi unsigned long long v8; // rsi void **v9; // rax __int128 *v10; // rcx void *v12[2]; // [rsp+8h] [rbp-A0h] BYREF __int128 v13; // [rsp+18h] [rbp-90h] BYREF void *v14; // [rsp+28h] [rbp-80h] BYREF int v15[2]; // [rsp+30h] [rbp-78h] __int128 v16; // [rsp+38h] [rbp-70h] BYREF int v17[2]; // [rsp+48h] [rbp-60h] BYREF long long v18; // [rsp+50h] [rbp-58h] _QWORD v19[2]; // [rsp+58h] [rbp-50h] BYREF void *v20[2]; // [rsp+68h] [rbp-40h] BYREF long long v21; // [rsp+78h] [rbp-30h] BYREF minja::TemplateToken::typeToString[abi:cxx11](v20, *(unsigned int *)(a3 + 8)); v4 = std::string::replace(v20, 0LL, 0LL, "Unterminated ", 13LL); v14 = &v16; v5 = (__int128 *)(v4 + 16); if ( *(_QWORD *)v4 == v4 + 16 ) { v16 = *v5; } else { v14 = *(void **)v4; *(_QWORD *)&v16 = *(_QWORD *)v5; } *(_QWORD *)v15 = *(_QWORD *)(v4 + 8); *(_QWORD *)v4 = v5; *(_QWORD *)(v4 + 8) = 0LL; *(_BYTE *)(v4 + 16) = 0; minja::error_location_suffix((long long)v17, *(_QWORD *)a2, *(_QWORD *)(a3 + 32)); v6 = v18 + *(_QWORD *)v15; v7 = 15LL; if ( v14 != &v16 ) v7 = v16; if ( v6 <= v7 ) goto LABEL_10; v8 = 15LL; if ( *(_QWORD **)v17 != v19 ) v8 = v19[0]; if ( v6 <= v8 ) v9 = (void **)std::string::replace(v17, 0LL, 0LL, v14, *(_QWORD *)v15); else LABEL_10: v9 = (void **)std::string::_M_append(&v14, *(_QWORD *)v17, v18); v12[0] = &v13; v10 = (__int128 *)(v9 + 2); if ( *v9 == v9 + 2 ) { v13 = *v10; } else { v12[0] = *v9; *(_QWORD *)&v13 = *(_QWORD *)v10; } v12[1] = v9[1]; *v9 = v10; v9[1] = 0LL; *(_BYTE *)v10 = 0; std::runtime_error::runtime_error(this, v12); if ( v12[0] != &v13 ) operator delete(v12[0], v13 + 1); if ( *(_QWORD **)v17 != v19 ) operator delete(*(void **)v17, v19[0] + 1LL); if ( v14 != &v16 ) operator delete(v14, v16 + 1); if ( v20[0] != &v21 ) operator delete(v20[0], v21 + 1); return this; }
unterminated: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x88 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV ESI,dword ptr [RDX + 0x8] LEA R12,[RSP + 0x68] MOV RDI,R12 CALL 0x0019acf0 LAB_0019a201: LEA RCX,[0x1f3ac6] MOV R8D,0xd MOV RDI,R12 XOR ESI,ESI XOR EDX,EDX CALL 0x0011b9f0 LEA R12,[RSP + 0x38] MOV qword ptr [R12 + -0x10],R12 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x0019a242 MOV qword ptr [RSP + 0x28],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x38],RDX JMP 0x0019a24a LAB_0019a242: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R12],XMM0 LAB_0019a24a: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R14 + 0x20] LAB_0019a269: LEA RDI,[RSP + 0x48] CALL 0x00178104 MOV RCX,qword ptr [RSP + 0x28] MOV R8,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x50] LEA RAX,[RDX + R8*0x1] MOV ESI,0xf CMP RCX,R12 JZ 0x0019a295 MOV RSI,qword ptr [RSP + 0x38] LAB_0019a295: CMP RAX,RSI JBE 0x0019a2b4 LEA RDI,[RSP + 0x58] MOV ESI,0xf CMP qword ptr [RDI + -0x10],RDI JZ 0x0019a2af MOV RSI,qword ptr [RSP + 0x58] LAB_0019a2af: CMP RAX,RSI JBE 0x0019a2c5 LAB_0019a2b4: MOV RSI,qword ptr [RSP + 0x48] LAB_0019a2b9: LEA RDI,[RSP + 0x28] CALL 0x0011b270 JMP 0x0019a2d3 LAB_0019a2c5: LEA RDI,[RSP + 0x48] XOR ESI,ESI XOR EDX,EDX CALL 0x0011b9f0 LAB_0019a2d3: LEA RDX,[RSP + 0x18] MOV qword ptr [RDX + -0x10],RDX MOV RSI,qword ptr [RAX] LEA RCX,[RAX + 0x10] CMP RSI,RCX JZ 0x0019a2f7 MOV qword ptr [RSP + 0x8],RSI MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x18],RDX JMP 0x0019a2fd LAB_0019a2f7: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RDX],XMM0 LAB_0019a2fd: MOV RDX,RAX ADD RDX,0x8 MOV RSI,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RSI MOV qword ptr [RAX],RCX MOV qword ptr [RDX],0x0 MOV byte ptr [RCX],0x0 LAB_0019a31a: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x0011be40 LAB_0019a327: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0019a342 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b8f0 LAB_0019a342: LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0019a35d MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x0011b8f0 LAB_0019a35d: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R12 JZ 0x0019a374 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0011b8f0 LAB_0019a374: LEA RAX,[RSP + 0x78] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0019a38f MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x0011b8f0 LAB_0019a38f: MOV RAX,RBX ADD RSP,0x88 POP RBX POP R12 POP R14 POP R15 RET
/* minja::Parser::unterminated(minja::TemplateToken const&) const */ TemplateToken * minja::Parser::unterminated(TemplateToken *param_1) { long *plVar1; int8 *puVar2; ulong *puVar3; long in_RDX; int8 *in_RSI; ulong uVar4; long *local_a0; int8 local_98; long local_90; int8 uStack_88; ulong *local_80; long local_78; ulong local_70; long lStack_68; ulong *local_60; long local_58; ulong local_50 [2]; long *local_40 [2]; long local_30 [2]; TemplateToken::typeToString_abi_cxx11_((TemplateToken *)local_40); /* try { // try from 0019a201 to 0019a219 has its CatchHandler @ 0019a3fd */ plVar1 = (long *)std::__cxx11::string::replace((ulong)local_40,0,(char *)0x0,0x1f3ac6); puVar3 = (ulong *)(plVar1 + 2); if ((ulong *)*plVar1 == puVar3) { local_70 = *puVar3; lStack_68 = plVar1[3]; local_80 = &local_70; } else { local_70 = *puVar3; local_80 = (ulong *)*plVar1; } local_78 = plVar1[1]; *plVar1 = (long)puVar3; plVar1[1] = 0; *(int1 *)(plVar1 + 2) = 0; /* try { // try from 0019a269 to 0019a272 has its CatchHandler @ 0019a3e1 */ error_location_suffix((minja *)&local_60,(string *)*in_RSI,*(ulong *)(in_RDX + 0x20)); uVar4 = 0xf; if (local_80 != &local_70) { uVar4 = local_70; } if (uVar4 < (ulong)(local_58 + local_78)) { uVar4 = 0xf; if (local_60 != local_50) { uVar4 = local_50[0]; } if ((ulong)(local_58 + local_78) <= uVar4) { puVar2 = (int8 *) std::__cxx11::string::replace((ulong)&local_60,0,(char *)0x0,(ulong)local_80); goto LAB_0019a2d3; } } /* try { // try from 0019a2b9 to 0019a2d2 has its CatchHandler @ 0019a3c1 */ puVar2 = (int8 *)std::__cxx11::string::_M_append((char *)&local_80,(ulong)local_60); LAB_0019a2d3: local_a0 = &local_90; plVar1 = puVar2 + 2; if ((long *)*puVar2 == plVar1) { local_90 = *plVar1; uStack_88 = puVar2[3]; } else { local_90 = *plVar1; local_a0 = (long *)*puVar2; } local_98 = puVar2[1]; *puVar2 = plVar1; puVar2[1] = 0; *(int1 *)plVar1 = 0; /* try { // try from 0019a31a to 0019a326 has its CatchHandler @ 0019a3a1 */ std::runtime_error::runtime_error((runtime_error *)param_1,(string *)&local_a0); if (local_a0 != &local_90) { operator_delete(local_a0,local_90 + 1); } if (local_60 != local_50) { operator_delete(local_60,local_50[0] + 1); } if (local_80 != &local_70) { operator_delete(local_80,local_70 + 1); } if (local_40[0] != local_30) { operator_delete(local_40[0],local_30[0] + 1); } return param_1; }
10,397
AuthSession::CheckIpCallback(std::shared_ptr<PreparedResultSet>)
SylCore-WoTLK/src/server/apps/authserver/Server/AuthSession.cpp
void AuthSession::CheckIpCallback(PreparedQueryResult result) { if (result) { bool banned = false; for (auto const& fields : *result) { if (fields[0].Get<uint64>() != 0) { banned = true; break; } } if (banned) { ByteBuffer pkt; pkt << uint8(AUTH_LOGON_CHALLENGE); pkt << uint8(0x00); pkt << uint8(WOW_FAIL_BANNED); SendPacket(pkt); LOG_DEBUG("session", "[AuthSession::CheckIpCallback] Banned ip '{}:{}' tries to login!", GetRemoteIpAddress().to_string(), GetRemotePort()); return; } } AsyncRead(); }
O3
cpp
AuthSession::CheckIpCallback(std::shared_ptr<PreparedResultSet>): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0xd8, %rsp movq %rdi, %rbx movq (%rsi), %r14 testq %r14, %r14 je 0x43efb movq %r14, %rdi xorl %esi, %esi callq 0x7b1ae movq %rax, %rdi callq 0x64eb2 testq %rax, %rax jne 0x43f10 movq %r14, %rdi callq 0x7b0ce testb %al, %al jne 0x43ed8 movq %rbx, %rdi addq $0xd8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x46cac leaq 0x88(%rsp), %r14 movq %r14, %rdi callq 0x46c2c leaq 0x20(%rsp), %rsi movb $0x0, (%rsi) movl $0x1, %edx movq %r14, %rdi callq 0x4b332 leaq 0x20(%rsp), %rsi movb $0x0, (%rsi) leaq 0x88(%rsp), %rdi movl $0x1, %edx callq 0x4b332 leaq 0x20(%rsp), %rsi movb $0x3, (%rsi) leaq 0x88(%rsp), %rdi movl $0x1, %edx callq 0x4b332 leaq 0x88(%rsp), %rsi movq %rbx, %rdi callq 0x442ba callq 0xb4614 movq %rax, %r14 leaq 0x30(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0xb6f6c(%rip), %rsi # 0xfaefd leaq 0xb6f6c(%rip), %rdx # 0xfaf04 leaq 0x20(%rsp), %rdi callq 0x29098 leaq 0x20(%rsp), %rsi movq %r14, %rdi movl $0x5, %edx callq 0xb45e4 movl %eax, %ebp movq 0x20(%rsp), %rdi cmpq %r15, %rdi je 0x43fcd movq 0x30(%rsp), %rsi incq %rsi callq 0xd32e8 testb %bpl, %bpl je 0x440c1 callq 0xb4614 movq %rax, %r14 leaq 0x10(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0xb6f0f(%rip), %rsi # 0xfaefd leaq 0xb6f0f(%rip), %rdx # 0xfaf04 movq %rsp, %rdi callq 0x29098 movq 0x70(%rbx), %rax leaq 0xb8(%rsp), %rsi movq %rax, (%rsi) movups 0x78(%rbx), %xmm0 movups %xmm0, 0x8(%rsi) movl 0x88(%rbx), %eax movl %eax, 0x18(%rsi) leaq 0x68(%rsp), %rdi callq 0x31ecc movzwl 0x8c(%rbx), %eax movups 0x68(%rsp), %xmm0 leaq 0x20(%rsp), %r8 movaps %xmm0, (%r8) movq %rax, 0x10(%r8) leaq 0xb6f3b(%rip), %rsi # 0xfaf82 leaq 0x48(%rsp), %rdi movl $0x40, %edx movl $0x2d, %ecx callq 0xea7c3 movq 0x48(%rsp), %rcx movq 0x50(%rsp), %r8 movq %rsp, %rsi movq %r14, %rdi movl $0x5, %edx callq 0x285d8 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x44090 movq 0x58(%rsp), %rsi incq %rsi callq 0xd32e8 leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x440ab movq 0x78(%rsp), %rsi incq %rsi callq 0xd32e8 movq (%rsp), %rdi cmpq %r15, %rdi je 0x440c1 movq 0x10(%rsp), %rsi incq %rsi callq 0xd32e8 leaq 0x122648(%rip), %rax # 0x166710 movq %rax, 0x88(%rsp) movq 0xa0(%rsp), %rdi testq %rdi, %rdi je 0x440ed movq 0xb0(%rsp), %rsi subq %rdi, %rsi callq 0xd32e8 addq $0xd8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rdx, %r14 movq %rax, %rbx leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x44124 movq 0x58(%rsp), %rsi incq %rsi callq 0xd32e8 jmp 0x44124 movq %rdx, %r14 movq %rax, %rbx leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x44147 movq 0x78(%rsp), %rsi incq %rsi callq 0xd32e8 jmp 0x44147 movq %rdx, %r14 movq %rax, %rbx movq (%rsp), %rdi cmpq %r15, %rdi je 0x44167 movq 0x10(%rsp), %rsi incq %rsi callq 0xd32e8 jmp 0x44167 jmp 0x44161 movq %rdx, %r14 movq %rax, %rbx cmpl $0x1, %r14d jne 0x4425c movq %rbx, %rdi callq 0x1b0d0 movq %rax, %r14 callq 0xb4614 movq %rax, %rbx leaq 0x10(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0xb5054(%rip), %rsi # 0xf91e8 leaq 0xb5053(%rip), %rdx # 0xf91ee movq %rsp, %rdi callq 0x29098 movq (%r14), %rax movq %r14, %rdi callq *0x10(%rax) leaq 0x48(%rsp), %r9 movq %rax, (%r9) leaq 0x68(%rsp), %rax movl $0xd3, (%rax) leaq 0xb6d5b(%rip), %r10 # 0xfaf21 leaq 0xb5032(%rip), %rcx # 0xf91ff movq %rsp, %rsi movl $0x25, %r8d movq %rbx, %rdi movl $0x2, %edx pushq %rax pushq %r10 callq 0x46a38 addq $0x10, %rsp movq (%rsp), %rdi cmpq %r15, %rdi je 0x44200 movq 0x10(%rsp), %rsi incq %rsi callq 0xd32e8 callq 0x1be70 jmp 0x440c1 jmp 0x44259 movq %rax, %rbx movq (%rsp), %rdi cmpq %r15, %rdi je 0x4422c movq 0x10(%rsp), %rsi incq %rsi callq 0xd32e8 jmp 0x4422c jmp 0x44229 movq %rax, %rbx callq 0x1be70 jmp 0x4425c movq %rax, %rdi callq 0x2841d movq %rax, %rbx movq 0x20(%rsp), %rdi cmpq %r15, %rdi je 0x4425c movq 0x30(%rsp), %rsi incq %rsi callq 0xd32e8 jmp 0x4425c jmp 0x44259 movq %rax, %rbx leaq 0x1224ad(%rip), %rax # 0x166710 movq %rax, 0x88(%rsp) movq 0xa0(%rsp), %rdi testq %rdi, %rdi je 0x44288 movq 0xb0(%rsp), %rsi subq %rdi, %rsi callq 0xd32e8 movq %rbx, %rdi callq 0x1bba0
_ZN11AuthSession15CheckIpCallbackESt10shared_ptrI17PreparedResultSetE: push rbp push r15 push r14 push rbx sub rsp, 0D8h mov rbx, rdi mov r14, [rsi] test r14, r14 jz short loc_43EFB loc_43ED8: mov rdi, r14 xor esi, esi call _ZNK17PreparedResultSetixEm; PreparedResultSet::operator[](ulong) mov rdi, rax call _ZNK5Field7GetDataImEET_v; Field::GetData<ulong>(void) test rax, rax jnz short loc_43F10 mov rdi, r14; this call _ZN17PreparedResultSet7NextRowEv; PreparedResultSet::NextRow(void) test al, al jnz short loc_43ED8 loc_43EFB: mov rdi, rbx add rsp, 0D8h pop rbx pop r14 pop r15 pop rbp jmp _ZN6SocketI11AuthSessionE9AsyncReadEv; Socket<AuthSession>::AsyncRead(void) loc_43F10: lea r14, [rsp+0F8h+var_70] mov rdi, r14; this call _ZN10ByteBufferC2Ev; ByteBuffer::ByteBuffer(void) lea rsi, [rsp+0F8h+var_D8]; unsigned __int8 * mov byte ptr [rsi], 0 mov edx, 1; unsigned __int64 mov rdi, r14; this call _ZN10ByteBuffer6appendEPKhm; ByteBuffer::append(uchar const*,ulong) lea rsi, [rsp+0F8h+var_D8]; unsigned __int8 * mov byte ptr [rsi], 0 lea rdi, [rsp+0F8h+var_70]; this mov edx, 1; unsigned __int64 call _ZN10ByteBuffer6appendEPKhm; ByteBuffer::append(uchar const*,ulong) lea rsi, [rsp+0F8h+var_D8]; unsigned __int8 * mov byte ptr [rsi], 3 lea rdi, [rsp+0F8h+var_70]; this mov edx, 1; unsigned __int64 call _ZN10ByteBuffer6appendEPKhm; ByteBuffer::append(uchar const*,ulong) lea rsi, [rsp+0F8h+var_70]; ByteBuffer * mov rdi, rbx; this call _ZN11AuthSession10SendPacketER10ByteBuffer; AuthSession::SendPacket(ByteBuffer &) call _ZN3Log8instanceEv; Log::instance(void) mov r14, rax lea r15, [rsp+0F8h+var_C8] mov [r15-10h], r15 lea rsi, aSession; "session" lea rdx, aSession+7; "" lea rdi, [rsp+0F8h+var_D8] 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, [rsp+0F8h+var_D8] mov rdi, r14 mov edx, 5 call _ZNK3Log9ShouldLogERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE8LogLevel; Log::ShouldLog(std::string const&,LogLevel) mov ebp, eax mov rdi, [rsp+0F8h+var_D8]; this cmp rdi, r15 jz short loc_43FCD mov rsi, [rsp+0F8h+var_C8] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_43FCD: test bpl, bpl jz loc_440C1 call _ZN3Log8instanceEv; Log::instance(void) mov r14, rax lea r15, [rsp+0F8h+var_E8] mov [r15-10h], r15 lea rsi, aSession; "session" lea rdx, aSession+7; "" mov rdi, rsp 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 rax, [rbx+70h] lea rsi, [rsp+0F8h+var_40] mov [rsi], rax movups xmm0, xmmword ptr [rbx+78h] movups xmmword ptr [rsi+8], xmm0 mov eax, [rbx+88h] mov [rsi+18h], eax lea rdi, [rsp+0F8h+var_90] call _ZNK5boost4asio2ip7address9to_stringB5cxx11Ev; boost::asio::ip::address::to_string(void) movzx eax, word ptr [rbx+8Ch] movups xmm0, [rsp+0F8h+var_90] lea r8, [rsp+0F8h+var_D8]; int movaps xmmword ptr [r8], xmm0 mov [r8+10h], rax lea rsi, aAuthsessionChe; "[AuthSession::CheckIpCallback] Banned i"... lea rdi, [rsp+0F8h+var_B0]; int mov edx, 40h ; '@'; int mov ecx, 2Dh ; '-'; int call _ZN3fmt3v107vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE; fmt::v10::vformat(fmt::v10::basic_string_view<char>,fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>) mov rcx, qword ptr [rsp+0F8h+var_B0] mov r8, [rsp+0F8h+var_A8] mov rsi, rsp mov rdi, r14 mov edx, 5 call _ZN3Log10outMessageIJEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE8LogLevelN3fmt3v1019basic_format_stringIcJDpNSB_13type_identityIT_E4typeEEEEDpOSE_ lea rax, [rsp+0F8h+var_A0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_44090 mov rsi, [rsp+0F8h+var_A0] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_44090: lea rax, [rsp+0F8h+var_80] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_440AB mov rsi, [rsp+0F8h+var_80] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_440AB: mov rdi, [rsp+0F8h+var_F8]; void * cmp rdi, r15 jz short loc_440C1 mov rsi, [rsp+0F8h+var_E8] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_440C1: lea rax, off_166710 mov [rsp+0F8h+var_70], rax mov rdi, [rsp+0F8h+var_58]; void * test rdi, rdi jz short loc_440ED mov rsi, [rsp+0F8h+var_48] sub rsi, rdi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_440ED: add rsp, 0D8h pop rbx pop r14 pop r15 pop rbp retn mov r14, rdx mov rbx, rax lea rax, [rsp+0F8h+var_A0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_44124 mov rsi, [rsp+0F8h+var_A0] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) jmp short loc_44124 mov r14, rdx mov rbx, rax loc_44124: lea rax, [rsp+0F8h+var_80] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_44147 mov rsi, [rsp+0F8h+var_80] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) jmp short loc_44147 mov r14, rdx mov rbx, rax loc_44147: mov rdi, [rsp+0F8h+var_F8]; void * cmp rdi, r15 jz short loc_44167 mov rsi, [rsp+0F8h+var_E8] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) jmp short loc_44167 jmp short $+2 loc_44161: mov r14, rdx mov rbx, rax loc_44167: cmp r14d, 1 jnz loc_4425C mov rdi, rbx; this call ___cxa_begin_catch mov r14, rax call _ZN3Log8instanceEv; Log::instance(void) mov rbx, rax lea r15, [rsp+0F8h+var_E8] mov [r15-10h], r15 lea rsi, aServerAuthserv+0Bh; "server" lea rdx, aServerAuthserv+11h; "" mov rdi, rsp 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 rax, [r14] mov rdi, r14 call qword ptr [rax+10h] lea r9, [rsp+0F8h+var_B0] mov [r9], rax lea rax, [rsp+0F8h+var_90] mov dword ptr [rax], 0D3h lea r10, aWorkspaceLlm4b_4; "/workspace/llm4binary/github2025/SylCor"... lea rcx, aWrongFormatOcc; "Wrong format occurred ({}) at '{}:{}'" mov rsi, rsp mov r8d, 25h ; '%' mov rdi, rbx mov edx, 2 push rax push r10 call _ZN3Log10outMessageIJPKcRA97_S1_iEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE8LogLevelN3fmt3v1019basic_format_stringIcJDpNSF_13type_identityIT_E4typeEEEEDpOSI_; Log::outMessage<char const*,char const(&)[97],int>(std::string const&,LogLevel,fmt::v10::basic_format_string<char,fmt::v10::type_identity<char const*,char const(&)[97],int>::type>,char const*,char const(&)[97],int&&) add rsp, 10h mov rdi, [rsp+0F8h+var_F8]; void * cmp rdi, r15 jz short loc_44200 mov rsi, [rsp+0F8h+var_E8] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_44200: call ___cxa_end_catch jmp loc_440C1 jmp short loc_44259 mov rbx, rax mov rdi, [rsp+0F8h+var_F8]; void * cmp rdi, r15 jz short loc_4422C mov rsi, [rsp+0F8h+var_E8] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) jmp short loc_4422C jmp short $+2 loc_44229: mov rbx, rax loc_4422C: call ___cxa_end_catch jmp short loc_4425C mov rdi, rax call __clang_call_terminate mov rbx, rax mov rdi, [rsp+0F8h+var_D8]; void * cmp rdi, r15 jz short loc_4425C mov rsi, [rsp+0F8h+var_C8] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) jmp short loc_4425C jmp short $+2 loc_44259: mov rbx, rax loc_4425C: lea rax, off_166710 mov [rsp+0F8h+var_70], rax mov rdi, [rsp+0F8h+var_58]; void * test rdi, rdi jz short loc_44288 mov rsi, [rsp+0F8h+var_48] sub rsi, rdi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_44288: mov rdi, rbx call __Unwind_Resume
void AuthSession::CheckIpCallback(Log *this, PreparedResultSet **a2) { PreparedResultSet *v3; // r14 long long v4; // rax long long v5; // r14 char ShouldLog; // bp Log *v7; // rdi long long v8; // r14 long long v9; // rax int v10; // r9d int v11; // r9d void *v12; // [rsp+0h] [rbp-F8h] BYREF int v13; // [rsp+8h] [rbp-F0h] void *v14; // [rsp+10h] [rbp-E8h] BYREF int v15; // [rsp+18h] [rbp-E0h] Log *v16[2]; // [rsp+20h] [rbp-D8h] BYREF _QWORD v17[3]; // [rsp+30h] [rbp-C8h] BYREF int v18[2]; // [rsp+48h] [rbp-B0h] BYREF long long v19; // [rsp+50h] [rbp-A8h] long long v20; // [rsp+58h] [rbp-A0h] BYREF void *v21[2]; // [rsp+68h] [rbp-90h] BYREF long long v22; // [rsp+78h] [rbp-80h] BYREF _QWORD v23[3]; // [rsp+88h] [rbp-70h] BYREF void *v24; // [rsp+A0h] [rbp-58h] long long v25; // [rsp+B0h] [rbp-48h] long long v26; // [rsp+B8h] [rbp-40h] BYREF __int128 v27; // [rsp+C0h] [rbp-38h] int v28; // [rsp+D0h] [rbp-28h] v3 = *a2; if ( *a2 ) { while ( 1 ) { v4 = PreparedResultSet::operator[](v3, 0LL); if ( Field::GetData<unsigned long>(v4) ) break; if ( !(unsigned __int8)PreparedResultSet::NextRow(v3) ) goto LABEL_4; } ByteBuffer::ByteBuffer((ByteBuffer *)v23); LOBYTE(v16[0]) = 0; ByteBuffer::append((ByteBuffer *)v23, (const unsigned __int8 *)v16, 1uLL); LOBYTE(v16[0]) = 0; ByteBuffer::append((ByteBuffer *)v23, (const unsigned __int8 *)v16, 1uLL); LOBYTE(v16[0]) = 3; ByteBuffer::append((ByteBuffer *)v23, (const unsigned __int8 *)v16, 1uLL); AuthSession::SendPacket(this, (ByteBuffer *)v23); v5 = Log::instance(this); v16[0] = (Log *)v17; std::string::_M_construct<char const*>((long long)v16, "session", (long long)""); ShouldLog = Log::ShouldLog(v5, v16, 5LL); v7 = v16[0]; if ( (_QWORD *)v16[0] != v17 ) operator delete(v16[0], v17[0] + 1LL); if ( ShouldLog ) { v8 = Log::instance(v7); v12 = &v14; std::string::_M_construct<char const*>((long long)&v12, "session", (long long)""); v26 = *((_QWORD *)this + 14); v27 = *(_OWORD *)((char *)this + 120); v28 = *((_DWORD *)this + 34); boost::asio::ip::address::to_string[abi:cxx11](v21, &v26); v9 = *((unsigned __int16 *)this + 70); v16[1] = (Log *)v21[1]; v17[0] = v9; fmt::v10::vformat[abi:cxx11]( (int)v18, (int)"[AuthSession::CheckIpCallback] Banned ip '{}:{}' tries to login!", 64, 45, (int)v16, v10, (int)v12, v13, v14, v15, (unsigned long long)v21[0]); Log::outMessage<>(v8, (long long)&v12, 5u, v18[0], v19, v11); if ( *(long long **)v18 != &v20 ) operator delete(*(void **)v18, v20 + 1); if ( v21[0] != &v22 ) operator delete(v21[0], v22 + 1); if ( v12 != &v14 ) operator delete(v12, (unsigned long long)v14 + 1); } v23[0] = off_166710; if ( v24 ) operator delete(v24, v25 - (_QWORD)v24); } else { LABEL_4: Socket<AuthSession>::AsyncRead(this); } }
CheckIpCallback: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xd8 MOV RBX,RDI MOV R14,qword ptr [RSI] TEST R14,R14 JZ 0x00143efb LAB_00143ed8: MOV RDI,R14 XOR ESI,ESI CALL 0x0017b1ae MOV RDI,RAX CALL 0x00164eb2 TEST RAX,RAX JNZ 0x00143f10 MOV RDI,R14 CALL 0x0017b0ce TEST AL,AL JNZ 0x00143ed8 LAB_00143efb: MOV RDI,RBX ADD RSP,0xd8 POP RBX POP R14 POP R15 POP RBP JMP 0x00146cac LAB_00143f10: LEA R14,[RSP + 0x88] MOV RDI,R14 CALL 0x00146c2c LEA RSI,[RSP + 0x20] MOV byte ptr [RSI],0x0 LAB_00143f28: MOV EDX,0x1 MOV RDI,R14 CALL 0x0014b332 LEA RSI,[RSP + 0x20] MOV byte ptr [RSI],0x0 LEA RDI,[RSP + 0x88] MOV EDX,0x1 CALL 0x0014b332 LEA RSI,[RSP + 0x20] MOV byte ptr [RSI],0x3 LEA RDI,[RSP + 0x88] MOV EDX,0x1 CALL 0x0014b332 LEA RSI,[RSP + 0x88] MOV RDI,RBX CALL 0x001442ba CALL 0x001b4614 MOV R14,RAX LEA R15,[RSP + 0x30] MOV qword ptr [R15 + -0x10],R15 LAB_00143f8a: LEA RSI,[0x1faefd] LEA RDX,[0x1faf04] LEA RDI,[RSP + 0x20] CALL 0x00129098 LAB_00143fa2: LEA RSI,[RSP + 0x20] MOV RDI,R14 MOV EDX,0x5 CALL 0x001b45e4 MOV EBP,EAX MOV RDI,qword ptr [RSP + 0x20] CMP RDI,R15 JZ 0x00143fcd MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x001d32e8 LAB_00143fcd: TEST BPL,BPL JZ 0x001440c1 LAB_00143fd6: CALL 0x001b4614 MOV R14,RAX LEA R15,[RSP + 0x10] MOV qword ptr [R15 + -0x10],R15 LAB_00143fe7: LEA RSI,[0x1faefd] LEA RDX,[0x1faf04] MOV RDI,RSP CALL 0x00129098 MOV RAX,qword ptr [RBX + 0x70] LEA RSI,[RSP + 0xb8] MOV qword ptr [RSI],RAX MOVUPS XMM0,xmmword ptr [RBX + 0x78] MOVUPS xmmword ptr [RSI + 0x8],XMM0 MOV EAX,dword ptr [RBX + 0x88] MOV dword ptr [RSI + 0x18],EAX LAB_0014401d: LEA RDI,[RSP + 0x68] CALL 0x00131ecc MOVZX EAX,word ptr [RBX + 0x8c] MOVUPS XMM0,xmmword ptr [RSP + 0x68] LEA R8,[RSP + 0x20] MOVAPS xmmword ptr [R8],XMM0 MOV qword ptr [R8 + 0x10],RAX LAB_00144040: LEA RSI,[0x1faf82] LEA RDI,[RSP + 0x48] MOV EDX,0x40 MOV ECX,0x2d CALL 0x001ea7c3 MOV RCX,qword ptr [RSP + 0x48] MOV R8,qword ptr [RSP + 0x50] LAB_00144065: MOV RSI,RSP MOV RDI,R14 MOV EDX,0x5 CALL 0x001285d8 LAB_00144075: LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00144090 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x001d32e8 LAB_00144090: LEA RAX,[RSP + 0x78] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001440ab MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x001d32e8 LAB_001440ab: MOV RDI,qword ptr [RSP] CMP RDI,R15 JZ 0x001440c1 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x001d32e8 LAB_001440c1: LEA RAX,[0x266710] MOV qword ptr [RSP + 0x88],RAX MOV RDI,qword ptr [RSP + 0xa0] TEST RDI,RDI JZ 0x001440ed MOV RSI,qword ptr [RSP + 0xb0] SUB RSI,RDI CALL 0x001d32e8 LAB_001440ed: ADD RSP,0xd8 POP RBX POP R14 POP R15 POP RBP RET
/* AuthSession::CheckIpCallback(std::shared_ptr<PreparedResultSet>) */ void __thiscall AuthSession::CheckIpCallback(AuthSession *this,int8 *param_2) { PreparedResultSet *this_00; char cVar1; Field *this_01; ulong uVar2; Log *pLVar3; int8 uVar4; long *local_f8 [2]; long local_e8 [2]; int8 local_d8; int4 uStack_d0; int4 uStack_cc; ulong local_c8 [3]; long *local_b0; int8 local_a8; long local_a0 [2]; int4 local_90; int4 uStack_8c; int4 uStack_88; int4 uStack_84; long local_80 [2]; int **local_70 [3]; void *local_58; long local_48; int8 local_40; int8 local_38; int8 uStack_30; int4 local_28; this_00 = (PreparedResultSet *)*param_2; if (this_00 != (PreparedResultSet *)0x0) { do { this_01 = (Field *)PreparedResultSet::operator[](this_00,0); uVar2 = Field::GetData<unsigned_long>(this_01); if (uVar2 != 0) { ByteBuffer::ByteBuffer((ByteBuffer *)local_70); local_d8 = (ulong *)((ulong)local_d8 & 0xffffffffffffff00); /* try { // try from 00143f28 to 00143f7d has its CatchHandler @ 00144259 */ ByteBuffer::append((ByteBuffer *)local_70,(uchar *)&local_d8,1); local_d8 = (ulong *)((ulong)local_d8 & 0xffffffffffffff00); ByteBuffer::append((ByteBuffer *)local_70,(uchar *)&local_d8,1); local_d8 = (ulong *)CONCAT71(local_d8._1_7_,3); ByteBuffer::append((ByteBuffer *)local_70,(uchar *)&local_d8,1); SendPacket(this,(ByteBuffer *)local_70); pLVar3 = (Log *)Log::instance(); /* try { // try from 00143f8a to 00143fa1 has its CatchHandler @ 00144257 */ local_d8 = local_c8; std::__cxx11::string::_M_construct<char_const*>(&local_d8,"session",""); /* try { // try from 00143fa2 to 00143fb3 has its CatchHandler @ 0014423b */ cVar1 = Log::ShouldLog(pLVar3,&local_d8,5); if (local_d8 != local_c8) { operator_delete(local_d8,local_c8[0] + 1); } if (cVar1 != '\0') { /* try { // try from 00143fd6 to 00143fda has its CatchHandler @ 00144161 */ uVar4 = Log::instance(); local_f8[0] = local_e8; /* try { // try from 00143fe7 to 00143ffc has its CatchHandler @ 0014415f */ std::__cxx11::string::_M_construct<char_const*>(local_f8,"session",""); local_40 = *(int8 *)(this + 0x70); local_38 = *(int8 *)(this + 0x78); uStack_30 = *(int8 *)(this + 0x80); local_28 = *(int4 *)(this + 0x88); /* try { // try from 0014401d to 00144026 has its CatchHandler @ 00144141 */ boost::asio::ip::address::to_string_abi_cxx11_(); local_c8[0] = (ulong)*(ushort *)(this + 0x8c); local_d8 = (ulong *)CONCAT44(uStack_8c,local_90); uStack_d0 = uStack_88; uStack_cc = uStack_84; /* try { // try from 00144040 to 0014405a has its CatchHandler @ 0014411e */ fmt::v10::vformat_abi_cxx11_ (&local_b0,"[AuthSession::CheckIpCallback] Banned ip \'{}:{}\' tries to login!", 0x40,0x2d); /* try { // try from 00144065 to 00144074 has its CatchHandler @ 001440fb */ Log::outMessage<>(uVar4,local_f8,5,local_b0,local_a8); if (local_b0 != local_a0) { operator_delete(local_b0,local_a0[0] + 1); } if ((long *)CONCAT44(uStack_8c,local_90) != local_80) { operator_delete((long *)CONCAT44(uStack_8c,local_90),local_80[0] + 1); } if (local_f8[0] != local_e8) { operator_delete(local_f8[0],local_e8[0] + 1); } } local_70[0] = &PTR__ByteBuffer_00266710; if (local_58 != (void *)0x0) { operator_delete(local_58,local_48 - (long)local_58); } return; } cVar1 = PreparedResultSet::NextRow(this_00); } while (cVar1 != '\0'); } Socket<AuthSession>::AsyncRead((Socket<AuthSession> *)this); return; }
10,398
my_strnxfrm_win1250ch
eloqsql/strings/ctype-win1250ch.c
static size_t my_strnxfrm_win1250ch(CHARSET_INFO *cs __attribute__((unused)), uchar *dest, size_t len, uint nweights_arg __attribute__((unused)), const uchar *src, size_t srclen, uint flags) { int value; const uchar *p; int pass = 0; size_t totlen = 0; p = src; if (!(flags & 0x0F)) /* All levels by default */ flags|= 0x0F; while (totlen < len) { NEXT_CMP_VALUE(src, p, pass, value, (int)srclen); if (!value) break; if ((1 << pass) & flags) dest[totlen++] = value; } if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len > totlen) { memset(dest + totlen, 0x00, len - totlen); totlen= len; } return totlen; }
O3
c
my_strnxfrm_win1250ch: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %rbx movq %rsi, -0x50(%rbp) movl 0x10(%rbp), %eax movl %eax, %edx orl $0xf, %edx testb $0xf, %al cmovnel %eax, %edx xorl %r10d, %r10d testq %rbx, %rbx je 0xd3884 movslq %r9d, %rdi movl $0x1, %eax subq %r8, %rax movq %rax, -0x60(%rbp) leaq 0x28a229(%rip), %r14 # 0x35d950 leaq 0x2b2bd2(%rip), %r15 # 0x386300 xorl %eax, %eax movq %r8, %r11 movq %rbx, -0x48(%rbp) movq %r9, -0x40(%rbp) movq %r8, -0x38(%rbp) movl %edx, -0x2c(%rbp) movq %r11, %rsi subq %r8, %rsi cmpq %rdi, %rsi jge 0xd375e testl %r10d, %r10d je 0xd3820 movl $0x9, %r12d jmp 0xd377f testl %r9d, %r9d jle 0xd3888 testl %r10d, %r10d jne 0xd3888 movl $0x1, %r10d movl $0x9, %r12d movq %r8, %r11 movq %r14, %rsi movzbl (%r11), %ecx movb (%rsi,%rcx), %sil cmpb $-0x1, %sil jne 0xd3860 movq %r12, -0x68(%rbp) movq %r10, -0x58(%rbp) movq %r11, %rdx subq %r8, %rdx movq -0x60(%rbp), %rcx leaq (%rcx,%r11), %r13 xorl %r10d, %r10d movq %r10, %rbx shlq $0x4, %rbx movq (%rbx,%r15), %rsi movb (%rsi), %r9b testb %r9b, %r9b je 0xd37f0 cmpq %rdi, %rdx jge 0xd37f0 incq %rsi movq %r13, %r14 movq %r11, %r12 cmpb (%r12), %r9b jne 0xd37f8 incq %r12 movb (%rsi), %r9b testb %r9b, %r9b je 0xd37f3 leaq 0x1(%r14), %rcx incq %rsi cmpq %rdi, %r14 movq %rcx, %r14 jl 0xd37ce jmp 0xd37f3 movq %r11, %r12 testb %r9b, %r9b je 0xd3835 incq %r10 cmpq $0x50, %r10 jne 0xd37ad movb $-0x1, %sil movq -0x48(%rbp), %rbx movq -0x40(%rbp), %r9 movq -0x38(%rbp), %r8 movl -0x2c(%rbp), %edx movq -0x58(%rbp), %r10 leaq 0x28a132(%rip), %r14 # 0x35d950 jmp 0xd3865 xorl %r10d, %r10d movl $0x8, %r12d leaq 0x28a020(%rip), %rsi # 0x35d850 jmp 0xd3782 addq %r15, %rbx movq -0x68(%rbp), %rcx movb (%rbx,%rcx), %sil decq %r12 movq %r12, %r11 movq -0x48(%rbp), %rbx movq -0x40(%rbp), %r9 movq -0x38(%rbp), %r8 movl -0x2c(%rbp), %edx movq -0x58(%rbp), %r10 leaq 0x28a0f0(%rip), %r14 # 0x35d950 testb %sil, %sil je 0xd3888 btl %r10d, %edx jae 0xd3876 movq -0x50(%rbp), %rcx movb %sil, (%rcx,%rax) incq %rax incq %r11 cmpq %rbx, %rax jb 0xd3742 jmp 0xd38a3 xorl %eax, %eax jmp 0xd38a3 testb %dl, %dl jns 0xd38a3 movq -0x50(%rbp), %rdi addq %rax, %rdi movq %rbx, %rdx subq %rax, %rdx xorl %esi, %esi callq 0x29270 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strnxfrm_win1250ch: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov rbx, rdx mov [rbp+var_50], rsi mov eax, [rbp+arg_0] mov edx, eax or edx, 0Fh test al, 0Fh cmovnz edx, eax xor r10d, r10d test rbx, rbx jz loc_D3884 movsxd rdi, r9d mov eax, 1 sub rax, r8 mov [rbp+var_60], rax lea r14, _sort_order_win1250ch2 lea r15, doubles_0 xor eax, eax mov r11, r8 mov [rbp+var_48], rbx mov [rbp+var_40], r9 mov [rbp+var_38], r8 mov [rbp+var_2C], edx loc_D3742: mov rsi, r11 sub rsi, r8 cmp rsi, rdi jge short loc_D375E test r10d, r10d jz loc_D3820 mov r12d, 9 jmp short loc_D377F loc_D375E: test r9d, r9d jle loc_D3888 test r10d, r10d jnz loc_D3888 mov r10d, 1 mov r12d, 9 mov r11, r8 loc_D377F: mov rsi, r14 loc_D3782: movzx ecx, byte ptr [r11] mov sil, [rsi+rcx] cmp sil, 0FFh jnz loc_D3860 mov [rbp+var_68], r12 mov [rbp+var_58], r10 mov rdx, r11 sub rdx, r8 mov rcx, [rbp+var_60] lea r13, [rcx+r11] xor r10d, r10d loc_D37AD: mov rbx, r10 shl rbx, 4 mov rsi, [rbx+r15] mov r9b, [rsi] test r9b, r9b jz short loc_D37F0 cmp rdx, rdi jge short loc_D37F0 inc rsi mov r14, r13 mov r12, r11 loc_D37CE: cmp r9b, [r12] jnz short loc_D37F8 inc r12 mov r9b, [rsi] test r9b, r9b jz short loc_D37F3 lea rcx, [r14+1] inc rsi cmp r14, rdi mov r14, rcx jl short loc_D37CE jmp short loc_D37F3 loc_D37F0: mov r12, r11 loc_D37F3: test r9b, r9b jz short loc_D3835 loc_D37F8: inc r10 cmp r10, 50h ; 'P' jnz short loc_D37AD mov sil, 0FFh mov rbx, [rbp+var_48] mov r9, [rbp+var_40] mov r8, [rbp+var_38] mov edx, [rbp+var_2C] mov r10, [rbp+var_58] lea r14, _sort_order_win1250ch2 jmp short loc_D3865 loc_D3820: xor r10d, r10d mov r12d, 8 lea rsi, _sort_order_win1250ch1 jmp loc_D3782 loc_D3835: add rbx, r15 mov rcx, [rbp+var_68] mov sil, [rbx+rcx] dec r12 mov r11, r12 mov rbx, [rbp+var_48] mov r9, [rbp+var_40] mov r8, [rbp+var_38] mov edx, [rbp+var_2C] mov r10, [rbp+var_58] lea r14, _sort_order_win1250ch2 loc_D3860: test sil, sil jz short loc_D3888 loc_D3865: bt edx, r10d jnb short loc_D3876 mov rcx, [rbp+var_50] mov [rcx+rax], sil inc rax loc_D3876: inc r11 cmp rax, rbx jb loc_D3742 jmp short loc_D38A3 loc_D3884: xor eax, eax jmp short loc_D38A3 loc_D3888: test dl, dl jns short loc_D38A3 mov rdi, [rbp+var_50] add rdi, rax mov rdx, rbx sub rdx, rax xor esi, esi call _memset mov rax, rbx loc_D38A3: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long my_strnxfrm_win1250ch( long long a1, long long a2, unsigned long long a3, long long a4, unsigned __int8 *a5, int a6, int a7) { int v8; // edx long long v9; // r10 long long v10; // rdi unsigned long long result; // rax unsigned __int8 *v12; // r11 long long v13; // r12 _BYTE *v14; // rsi char v15; // si long long v16; // r10 char *v17; // rsi char v18; // r9 char *v19; // rsi unsigned __int8 *v20; // r14 _BYTE *v21; // r12 long long v23; // [rsp+8h] [rbp-68h] long long v24; // [rsp+10h] [rbp-60h] long long v25; // [rsp+18h] [rbp-58h] unsigned long long v27; // [rsp+28h] [rbp-48h] int v28; // [rsp+30h] [rbp-40h] unsigned __int8 *v29; // [rsp+38h] [rbp-38h] int v30; // [rsp+44h] [rbp-2Ch] v8 = a7 | 0xF; if ( (a7 & 0xF) != 0 ) v8 = a7; v9 = 0LL; if ( !a3 ) return 0LL; v10 = a6; v24 = 1LL - (_QWORD)a5; result = 0LL; v12 = a5; v27 = a3; v28 = a6; v29 = a5; v30 = v8; while ( 2 ) { if ( v12 - a5 >= v10 ) { if ( a6 <= 0 || (_DWORD)v9 ) break; v9 = 1LL; v13 = 9LL; v12 = a5; } else { if ( !(_DWORD)v9 ) { v9 = 0LL; v13 = 8LL; v14 = &sort_order_win1250ch1; goto LABEL_12; } v13 = 9LL; } v14 = &sort_order_win1250ch2; LABEL_12: v15 = v14[*v12]; if ( v15 != -1 ) goto LABEL_27; v23 = v13; v25 = v9; v16 = 0LL; while ( 1 ) { v17 = (char *)*(&doubles_0 + 2 * v16); v18 = *v17; if ( !*v17 || v12 - a5 >= v10 ) break; v19 = v17 + 1; v20 = &v12[v24]; v21 = v12; while ( v18 == *v21 ) { ++v21; v18 = *v19; if ( *v19 ) { ++v19; if ( (long long)v20++ < v10 ) continue; } goto LABEL_22; } LABEL_23: if ( ++v16 == 80 ) { v15 = -1; a3 = v27; a6 = v28; a5 = v29; v8 = v30; v9 = v25; goto LABEL_28; } } v21 = v12; LABEL_22: if ( v18 ) goto LABEL_23; v15 = *((_BYTE *)&doubles_0 + 16 * v16 + v23); v12 = v21 - 1; a3 = v27; a6 = v28; a5 = v29; v8 = v30; v9 = v25; LABEL_27: if ( v15 ) { LABEL_28: if ( _bittest(&v8, v9) ) *(_BYTE *)(a2 + result++) = v15; ++v12; if ( result >= a3 ) return result; continue; } break; } if ( (v8 & 0x80u) != 0 ) { memset(result + a2, 0LL, a3 - result); return a3; } return result; }
my_strnxfrm_win1250ch: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RBX,RDX MOV qword ptr [RBP + -0x50],RSI MOV EAX,dword ptr [RBP + 0x10] MOV EDX,EAX OR EDX,0xf TEST AL,0xf CMOVNZ EDX,EAX XOR R10D,R10D TEST RBX,RBX JZ 0x001d3884 MOVSXD RDI,R9D MOV EAX,0x1 SUB RAX,R8 MOV qword ptr [RBP + -0x60],RAX LEA R14,[0x45d950] LEA R15,[0x486300] XOR EAX,EAX MOV R11,R8 MOV qword ptr [RBP + -0x48],RBX MOV qword ptr [RBP + -0x40],R9 MOV qword ptr [RBP + -0x38],R8 MOV dword ptr [RBP + -0x2c],EDX LAB_001d3742: MOV RSI,R11 SUB RSI,R8 CMP RSI,RDI JGE 0x001d375e TEST R10D,R10D JZ 0x001d3820 MOV R12D,0x9 JMP 0x001d377f LAB_001d375e: TEST R9D,R9D JLE 0x001d3888 TEST R10D,R10D JNZ 0x001d3888 MOV R10D,0x1 MOV R12D,0x9 MOV R11,R8 LAB_001d377f: MOV RSI,R14 LAB_001d3782: MOVZX ECX,byte ptr [R11] MOV SIL,byte ptr [RSI + RCX*0x1] CMP SIL,0xff JNZ 0x001d3860 MOV qword ptr [RBP + -0x68],R12 MOV qword ptr [RBP + -0x58],R10 MOV RDX,R11 SUB RDX,R8 MOV RCX,qword ptr [RBP + -0x60] LEA R13,[RCX + R11*0x1] XOR R10D,R10D LAB_001d37ad: MOV RBX,R10 SHL RBX,0x4 MOV RSI,qword ptr [RBX + R15*0x1] MOV R9B,byte ptr [RSI] TEST R9B,R9B JZ 0x001d37f0 CMP RDX,RDI JGE 0x001d37f0 INC RSI MOV R14,R13 MOV R12,R11 LAB_001d37ce: CMP R9B,byte ptr [R12] JNZ 0x001d37f8 INC R12 MOV R9B,byte ptr [RSI] TEST R9B,R9B JZ 0x001d37f3 LEA RCX,[R14 + 0x1] INC RSI CMP R14,RDI MOV R14,RCX JL 0x001d37ce JMP 0x001d37f3 LAB_001d37f0: MOV R12,R11 LAB_001d37f3: TEST R9B,R9B JZ 0x001d3835 LAB_001d37f8: INC R10 CMP R10,0x50 JNZ 0x001d37ad MOV SIL,0xff MOV RBX,qword ptr [RBP + -0x48] MOV R9,qword ptr [RBP + -0x40] MOV R8,qword ptr [RBP + -0x38] MOV EDX,dword ptr [RBP + -0x2c] MOV R10,qword ptr [RBP + -0x58] LEA R14,[0x45d950] JMP 0x001d3865 LAB_001d3820: XOR R10D,R10D MOV R12D,0x8 LEA RSI,[0x45d850] JMP 0x001d3782 LAB_001d3835: ADD RBX,R15 MOV RCX,qword ptr [RBP + -0x68] MOV SIL,byte ptr [RBX + RCX*0x1] DEC R12 MOV R11,R12 MOV RBX,qword ptr [RBP + -0x48] MOV R9,qword ptr [RBP + -0x40] MOV R8,qword ptr [RBP + -0x38] MOV EDX,dword ptr [RBP + -0x2c] MOV R10,qword ptr [RBP + -0x58] LEA R14,[0x45d950] LAB_001d3860: TEST SIL,SIL JZ 0x001d3888 LAB_001d3865: BT EDX,R10D JNC 0x001d3876 MOV RCX,qword ptr [RBP + -0x50] MOV byte ptr [RCX + RAX*0x1],SIL INC RAX LAB_001d3876: INC R11 CMP RAX,RBX JC 0x001d3742 JMP 0x001d38a3 LAB_001d3884: XOR EAX,EAX JMP 0x001d38a3 LAB_001d3888: TEST DL,DL JNS 0x001d38a3 MOV RDI,qword ptr [RBP + -0x50] ADD RDI,RAX MOV RDX,RBX SUB RDX,RAX XOR ESI,ESI CALL 0x00129270 MOV RAX,RBX LAB_001d38a3: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong my_strnxfrm_win1250ch (int8 param_1,long param_2,ulong param_3,int8 param_4,byte *param_5, int param_6,uint param_7) { uint uVar1; byte *pbVar2; byte *pbVar3; byte *pbVar4; ulong uVar5; char cVar6; int1 *puVar7; byte *pbVar8; byte bVar9; int iVar10; long lVar11; byte *pbVar12; byte *pbVar13; long lVar14; uVar1 = param_7 | 0xf; if ((param_7 & 0xf) != 0) { uVar1 = param_7; } iVar10 = 0; if (param_3 == 0) { uVar5 = 0; } else { uVar5 = 0; pbVar12 = param_5; do { if ((long)pbVar12 - (long)param_5 < (long)param_6) { if (iVar10 != 0) goto LAB_001d377f; iVar10 = 0; lVar14 = 8; puVar7 = _sort_order_win1250ch1; } else { if ((param_6 < 1) || (iVar10 != 0)) goto LAB_001d3888; iVar10 = 1; pbVar12 = param_5; LAB_001d377f: lVar14 = 9; puVar7 = _sort_order_win1250ch2; } cVar6 = puVar7[*pbVar12]; if (cVar6 == -1) { lVar11 = 0; do { pbVar8 = (&doubles)[lVar11 * 2]; bVar9 = *pbVar8; pbVar13 = pbVar12; pbVar4 = pbVar12 + (1 - (long)param_5); pbVar3 = pbVar12 + -(long)param_5; if (bVar9 != 0) { while (pbVar2 = pbVar4, (long)pbVar3 < (long)param_6) { pbVar8 = pbVar8 + 1; if (bVar9 != *pbVar13) goto LAB_001d37f8; pbVar13 = pbVar13 + 1; bVar9 = *pbVar8; if (bVar9 == 0) break; pbVar4 = pbVar2 + 1; pbVar3 = pbVar2; } } if (bVar9 == 0) { cVar6 = *(char *)((long)&doubles + lVar14 + lVar11 * 0x10); pbVar12 = pbVar13 + -1; goto LAB_001d3860; } LAB_001d37f8: lVar11 = lVar11 + 1; } while (lVar11 != 0x50); cVar6 = -1; } else { LAB_001d3860: if (cVar6 == '\0') { LAB_001d3888: if (-1 < (char)uVar1) { return uVar5; } memset((void *)(param_2 + uVar5),0,param_3 - uVar5); return param_3; } } if ((uVar1 >> iVar10 & 1) != 0) { *(char *)(param_2 + uVar5) = cVar6; uVar5 = uVar5 + 1; } pbVar12 = pbVar12 + 1; } while (uVar5 < param_3); } return uVar5; }
10,399
Item_param::set_param_float(unsigned char**, unsigned long)
eloqsql/sql/sql_prepare.cc
void Item_param::set_param_float(uchar **pos, ulong len) { float data; #ifndef EMBEDDED_LIBRARY if (len < 4) return; float4get(data,*pos); #else floatget(data, *pos); #endif set_double((double) data); *pos+= 4; }
O0
cpp
Item_param::set_param_float(unsigned char**, unsigned long): 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 %rax, -0x28(%rbp) cmpq $0x4, -0x18(%rbp) jae 0xa14ff5 jmp 0xa15021 movq -0x28(%rbp), %rdi movq -0x10(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x1c(%rbp) movss -0x1c(%rbp), %xmm0 cvtss2sd %xmm0, %xmm0 callq 0xd2a970 movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
_ZN10Item_param15set_param_floatEPPhm: 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 [rbp+var_28], rax cmp [rbp+var_18], 4 jnb short loc_A14FF5 jmp short loc_A15021 loc_A14FF5: mov rdi, [rbp+var_28]; this mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax] mov [rbp+var_1C], eax movss xmm0, [rbp+var_1C] cvtss2sd xmm0, xmm0; double call _ZN10Item_param10set_doubleEd; Item_param::set_double(double) mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx loc_A15021: add rsp, 30h pop rbp retn
float ** Item_param::set_param_float(float **this, float **a2, unsigned long long a3) { float **result; // rax result = this; if ( a3 >= 4 ) { Item_param::set_double((Item_param *)this, **a2); result = a2; ++*a2; } return result; }
Dynamic_array: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV dword ptr [RBP + -0x14],ECX MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV EDX,dword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] CALL 0x00a15c40 ADD RSP,0x20 POP RBP RET
/* Dynamic_array<sp_variable*>::Dynamic_array(unsigned int, unsigned int, unsigned int) */ void __thiscall Dynamic_array<sp_variable*>::Dynamic_array (Dynamic_array<sp_variable*> *this,uint param_1,uint param_2,uint param_3) { init(this,param_1,param_2,param_3); return; }