index
int64
0
66.5k
func_name
stringlengths
2
5.36k
func_dep
stringlengths
16
2.19k
func
stringlengths
8
55.3k
test
stringlengths
0
7.07k
opt
stringclasses
4 values
language
stringclasses
2 values
asm
stringlengths
0
45.4k
ida_asm
stringlengths
0
44.7k
ida_pseudo
stringlengths
0
44.3k
ghidra_asm
stringlengths
0
49.1k
ghidra_pseudo
stringlengths
0
64.7k
13,200
mthd_my_read_one_row
eloqsql/libmariadb/libmariadb/mariadb_lib.c
int mthd_my_read_one_row(MYSQL *mysql,uint fields,MYSQL_ROW row, ulong *lengths) { uint field; ulong pkt_len,len; uchar *pos,*prev_pos, *end_pos; if ((pkt_len=(uint) ma_net_safe_read(mysql)) == packet_error) return -1; if (pkt_len <= 8 && mysql->net.read_pos[0] == 254) { mysql->warning_count= uint2korr(mysql->net.read_pos + 1); mysql->server_status= uint2korr(mysql->net.read_pos + 3); return 1; /* End of data */ } prev_pos= 0; /* allowed to write at packet[-1] */ pos=mysql->net.read_pos; end_pos=pos+pkt_len; for (field=0 ; field < fields ; field++) { if ((len=(ulong) net_field_length(&pos)) == NULL_LENGTH) { /* null field */ row[field] = 0; *lengths++=0; } else { if (len > (ulong) (end_pos - pos) || pos > end_pos) { mysql->net.last_errno=CR_UNKNOWN_ERROR; strncpy(mysql->net.last_error,ER(mysql->net.last_errno), MYSQL_ERRMSG_SIZE - 1); return -1; } row[field] = (char*) pos; pos+=len; *lengths++=len; } if (prev_pos) *prev_pos=0; /* Terminate prev field */ prev_pos=pos; } row[field]=(char*) prev_pos+1; /* End of last field */ *prev_pos=0; /* Terminate last field */ return 0; }
O0
c
mthd_my_read_one_row: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rdi callq 0x1a880 movl %eax, %eax movq %rax, -0x38(%rbp) movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rcx, %rax jne 0x1f2fc movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x1f4cf cmpq $0x8, -0x38(%rbp) ja 0x1f381 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movzbl (%rax), %eax cmpl $0xfe, %eax jne 0x1f381 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x10(%rbp), %rcx movq 0x20(%rcx), %rcx movzbl 0x2(%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx addl %ecx, %eax movzwl %ax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x388(%rax) movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movzbl 0x3(%rax), %eax movzwl %ax, %eax movq -0x10(%rbp), %rcx movq 0x20(%rcx), %rcx movzbl 0x4(%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx addl %ecx, %eax movzwl %ax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x380(%rax) movl $0x1, -0x4(%rbp) jmp 0x1f4cf movq $0x0, -0x50(%rbp) movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax addq -0x38(%rbp), %rax movq %rax, -0x58(%rbp) movl $0x0, -0x2c(%rbp) movl -0x2c(%rbp), %eax cmpl -0x14(%rbp), %eax jae 0x1f4ae leaq -0x48(%rbp), %rdi callq 0x1aea0 movq %rax, -0x40(%rbp) cmpq $-0x1, %rax jne 0x1f3f1 movq -0x20(%rbp), %rax movl -0x2c(%rbp), %ecx movq $0x0, (%rax,%rcx,8) movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x8, %rcx movq %rcx, -0x28(%rbp) movq $0x0, (%rax) jmp 0x1f48a movq -0x40(%rbp), %rax movq -0x58(%rbp), %rcx movq -0x48(%rbp), %rdx subq %rdx, %rcx cmpq %rcx, %rax ja 0x1f40f movq -0x48(%rbp), %rax cmpq -0x58(%rbp), %rax jbe 0x1f459 movq -0x10(%rbp), %rax movl $0x7d0, 0x90(%rax) # imm = 0x7D0 movq -0x10(%rbp), %rdi addq $0x97, %rdi movq -0x10(%rbp), %rax movl 0x90(%rax), %eax subl $0x7d0, %eax # imm = 0x7D0 movl %eax, %eax movl %eax, %ecx leaq 0x47d1e(%rip), %rax # 0x67160 movq (%rax,%rcx,8), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13210 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x1f4cf movq -0x48(%rbp), %rdx movq -0x20(%rbp), %rax movl -0x2c(%rbp), %ecx movq %rdx, (%rax,%rcx,8) movq -0x40(%rbp), %rax addq -0x48(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x40(%rbp), %rcx movq -0x28(%rbp), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, -0x28(%rbp) movq %rcx, (%rax) cmpq $0x0, -0x50(%rbp) je 0x1f498 movq -0x50(%rbp), %rax movb $0x0, (%rax) movq -0x48(%rbp), %rax movq %rax, -0x50(%rbp) movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0x1f3a8 movq -0x50(%rbp), %rdx addq $0x1, %rdx movq -0x20(%rbp), %rax movl -0x2c(%rbp), %ecx movq %rdx, (%rax,%rcx,8) movq -0x50(%rbp), %rax movb $0x0, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopl (%rax,%rax)
mthd_my_read_one_row: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rdi, [rbp+var_10] call ma_net_safe_read mov eax, eax mov [rbp+var_38], rax mov ecx, 0FFFFFFFFh cmp rax, rcx jnz short loc_1F2FC mov [rbp+var_4], 0FFFFFFFFh jmp loc_1F4CF loc_1F2FC: cmp [rbp+var_38], 8 ja short loc_1F381 mov rax, [rbp+var_10] mov rax, [rax+20h] movzx eax, byte ptr [rax] cmp eax, 0FEh jnz short loc_1F381 mov rax, [rbp+var_10] mov rax, [rax+20h] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_10] mov rcx, [rcx+20h] movzx ecx, byte ptr [rcx+2] movzx ecx, cx shl ecx, 8 add eax, ecx movzx ecx, ax mov rax, [rbp+var_10] mov [rax+388h], ecx mov rax, [rbp+var_10] mov rax, [rax+20h] movzx eax, byte ptr [rax+3] movzx eax, ax mov rcx, [rbp+var_10] mov rcx, [rcx+20h] movzx ecx, byte ptr [rcx+4] movzx ecx, cx shl ecx, 8 add eax, ecx movzx ecx, ax mov rax, [rbp+var_10] mov [rax+380h], ecx mov [rbp+var_4], 1 jmp loc_1F4CF loc_1F381: mov [rbp+var_50], 0 mov rax, [rbp+var_10] mov rax, [rax+20h] mov [rbp+var_48], rax mov rax, [rbp+var_48] add rax, [rbp+var_38] mov [rbp+var_58], rax mov [rbp+var_2C], 0 loc_1F3A8: mov eax, [rbp+var_2C] cmp eax, [rbp+var_14] jnb loc_1F4AE lea rdi, [rbp+var_48] call net_field_length mov [rbp+var_40], rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_1F3F1 mov rax, [rbp+var_20] mov ecx, [rbp+var_2C] mov qword ptr [rax+rcx*8], 0 mov rax, [rbp+var_28] mov rcx, rax add rcx, 8 mov [rbp+var_28], rcx mov qword ptr [rax], 0 jmp loc_1F48A loc_1F3F1: mov rax, [rbp+var_40] mov rcx, [rbp+var_58] mov rdx, [rbp+var_48] sub rcx, rdx cmp rax, rcx ja short loc_1F40F mov rax, [rbp+var_48] cmp rax, [rbp+var_58] jbe short loc_1F459 loc_1F40F: mov rax, [rbp+var_10] mov dword ptr [rax+90h], 7D0h mov rdi, [rbp+var_10] add rdi, 97h mov rax, [rbp+var_10] mov eax, [rax+90h] sub eax, 7D0h mov eax, eax mov ecx, eax lea rax, client_errors mov rsi, [rax+rcx*8] mov edx, 1FFh call _strncpy mov [rbp+var_4], 0FFFFFFFFh jmp short loc_1F4CF loc_1F459: mov rdx, [rbp+var_48] mov rax, [rbp+var_20] mov ecx, [rbp+var_2C] mov [rax+rcx*8], rdx mov rax, [rbp+var_40] add rax, [rbp+var_48] mov [rbp+var_48], rax mov rcx, [rbp+var_40] mov rax, [rbp+var_28] mov rdx, rax add rdx, 8 mov [rbp+var_28], rdx mov [rax], rcx loc_1F48A: cmp [rbp+var_50], 0 jz short loc_1F498 mov rax, [rbp+var_50] mov byte ptr [rax], 0 loc_1F498: mov rax, [rbp+var_48] mov [rbp+var_50], rax mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax jmp loc_1F3A8 loc_1F4AE: mov rdx, [rbp+var_50] add rdx, 1 mov rax, [rbp+var_20] mov ecx, [rbp+var_2C] mov [rax+rcx*8], rdx mov rax, [rbp+var_50] mov byte ptr [rax], 0 mov [rbp+var_4], 0 loc_1F4CF: mov eax, [rbp+var_4] add rsp, 60h pop rbp retn
long long mthd_my_read_one_row(long long a1, long long a2, long long a3, long long a4, int a5, int a6) { unsigned long long *v6; // rax unsigned long long *v7; // rax unsigned __int8 *v9; // [rsp+8h] [rbp-58h] unsigned __int8 *v10; // [rsp+10h] [rbp-50h] unsigned __int8 *v11; // [rsp+18h] [rbp-48h] BYREF unsigned long long v12; // [rsp+20h] [rbp-40h] unsigned long long v13; // [rsp+28h] [rbp-38h] unsigned int i; // [rsp+34h] [rbp-2Ch] unsigned long long *v15; // [rsp+38h] [rbp-28h] long long v16; // [rsp+40h] [rbp-20h] unsigned int v17; // [rsp+4Ch] [rbp-14h] long long v18; // [rsp+50h] [rbp-10h] v18 = a1; v17 = a2; v16 = a3; v15 = (unsigned long long *)a4; v13 = (unsigned int)ma_net_safe_read(a1, a2, a3, a4, a5, a6); if ( v13 == 0xFFFFFFFF ) { return (unsigned int)-1; } else if ( v13 <= 8 && **(unsigned __int8 **)(v18 + 32) == 254 ) { *(_DWORD *)(v18 + 904) = (unsigned __int16)((*(unsigned __int8 *)(*(_QWORD *)(v18 + 32) + 2LL) << 8) + *(unsigned __int8 *)(*(_QWORD *)(v18 + 32) + 1LL)); *(_DWORD *)(v18 + 896) = (unsigned __int16)((*(unsigned __int8 *)(*(_QWORD *)(v18 + 32) + 4LL) << 8) + *(unsigned __int8 *)(*(_QWORD *)(v18 + 32) + 3LL)); return 1; } else { v10 = 0LL; v11 = *(unsigned __int8 **)(v18 + 32); v9 = &v11[v13]; for ( i = 0; i < v17; ++i ) { v12 = net_field_length(&v11); if ( v12 == -1LL ) { *(_QWORD *)(v16 + 8LL * i) = 0LL; v6 = v15++; *v6 = 0LL; } else { if ( v12 > v9 - v11 || v11 > v9 ) { *(_DWORD *)(v18 + 144) = 2000; strncpy(v18 + 151, client_errors[*(_DWORD *)(v18 + 144) - 2000], 511LL); return (unsigned int)-1; } *(_QWORD *)(v16 + 8LL * i) = v11; v11 += v12; v7 = v15++; *v7 = v12; } if ( v10 ) *v10 = 0; v10 = v11; } *(_QWORD *)(v16 + 8LL * i) = v10 + 1; *v10 = 0; return 0; } }
mthd_my_read_one_row: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0011a880 MOV EAX,EAX MOV qword ptr [RBP + -0x38],RAX MOV ECX,0xffffffff CMP RAX,RCX JNZ 0x0011f2fc MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0011f4cf LAB_0011f2fc: CMP qword ptr [RBP + -0x38],0x8 JA 0x0011f381 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0xfe JNZ 0x0011f381 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x20] MOVZX ECX,byte ptr [RCX + 0x2] MOVZX ECX,CX SHL ECX,0x8 ADD EAX,ECX MOVZX ECX,AX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x388],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOVZX EAX,byte ptr [RAX + 0x3] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x20] MOVZX ECX,byte ptr [RCX + 0x4] MOVZX ECX,CX SHL ECX,0x8 ADD EAX,ECX MOVZX ECX,AX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x380],ECX MOV dword ptr [RBP + -0x4],0x1 JMP 0x0011f4cf LAB_0011f381: MOV qword ptr [RBP + -0x50],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] ADD RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x58],RAX MOV dword ptr [RBP + -0x2c],0x0 LAB_0011f3a8: MOV EAX,dword ptr [RBP + -0x2c] CMP EAX,dword ptr [RBP + -0x14] JNC 0x0011f4ae LEA RDI,[RBP + -0x48] CALL 0x0011aea0 MOV qword ptr [RBP + -0x40],RAX CMP RAX,-0x1 JNZ 0x0011f3f1 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x2c] MOV qword ptr [RAX + RCX*0x8],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x8 MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RAX],0x0 JMP 0x0011f48a LAB_0011f3f1: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x58] MOV RDX,qword ptr [RBP + -0x48] SUB RCX,RDX CMP RAX,RCX JA 0x0011f40f MOV RAX,qword ptr [RBP + -0x48] CMP RAX,qword ptr [RBP + -0x58] JBE 0x0011f459 LAB_0011f40f: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x90],0x7d0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x97 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x90] SUB EAX,0x7d0 MOV EAX,EAX MOV ECX,EAX LEA RAX,[0x167160] MOV RSI,qword ptr [RAX + RCX*0x8] MOV EDX,0x1ff CALL 0x00113210 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0011f4cf LAB_0011f459: MOV RDX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x2c] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RBP + -0x40] ADD RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x48],RAX MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x28] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RBP + -0x28],RDX MOV qword ptr [RAX],RCX LAB_0011f48a: CMP qword ptr [RBP + -0x50],0x0 JZ 0x0011f498 MOV RAX,qword ptr [RBP + -0x50] MOV byte ptr [RAX],0x0 LAB_0011f498: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x50],RAX MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x0011f3a8 LAB_0011f4ae: MOV RDX,qword ptr [RBP + -0x50] ADD RDX,0x1 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x2c] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RBP + -0x50] MOV byte ptr [RAX],0x0 MOV dword ptr [RBP + -0x4],0x0 LAB_0011f4cf: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x60 POP RBP RET
int4 mthd_my_read_one_row(long param_1,uint param_2,long param_3,ulong *param_4) { uint uVar1; int1 *puVar2; int1 *local_58; int1 *local_50; ulong local_48; ulong local_40; uint local_34; ulong *local_30; long local_28; uint local_1c; long local_18; int4 local_c; local_30 = param_4; local_28 = param_3; local_1c = param_2; local_18 = param_1; uVar1 = ma_net_safe_read(param_1); local_40 = (ulong)uVar1; if (local_40 == 0xffffffff) { local_c = 0xffffffff; } else if ((local_40 < 9) && (**(char **)(local_18 + 0x20) == -2)) { *(uint *)(local_18 + 0x388) = (uint)*(byte *)(*(long *)(local_18 + 0x20) + 1) + (uint)*(byte *)(*(long *)(local_18 + 0x20) + 2) * 0x100 & 0xffff; *(uint *)(local_18 + 0x380) = (uint)*(byte *)(*(long *)(local_18 + 0x20) + 3) + (uint)*(byte *)(*(long *)(local_18 + 0x20) + 4) * 0x100 & 0xffff; local_c = 1; } else { local_58 = (int1 *)0x0; local_50 = *(int1 **)(local_18 + 0x20); puVar2 = local_50 + local_40; for (local_34 = 0; local_34 < local_1c; local_34 = local_34 + 1) { local_48 = net_field_length(&local_50); if (local_48 == 0xffffffffffffffff) { *(int8 *)(local_28 + (ulong)local_34 * 8) = 0; *local_30 = 0; } else { if (((ulong)((long)puVar2 - (long)local_50) < local_48) || (puVar2 < local_50)) { *(int4 *)(local_18 + 0x90) = 2000; strncpy((char *)(local_18 + 0x97),(&client_errors)[*(int *)(local_18 + 0x90) - 2000],0x1ff ); return 0xffffffff; } *(int1 **)(local_28 + (ulong)local_34 * 8) = local_50; local_50 = local_50 + local_48; *local_30 = local_48; } local_30 = local_30 + 1; if (local_58 != (int1 *)0x0) { *local_58 = 0; } local_58 = local_50; } *(int1 **)(local_28 + (ulong)local_34 * 8) = local_58 + 1; *local_58 = 0; local_c = 0; } return local_c; }
13,201
list_add
eloqsql/libmariadb/libmariadb/ma_list.c
LIST *list_add(LIST *root, LIST *element) { if (root) { if (root->prev) /* If add in mid of list */ root->prev->next= element; element->prev=root->prev; root->prev=element; } else element->prev=0; element->next=root; return(element); /* New root */ }
O0
c
list_add: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) cmpq $0x0, -0x8(%rbp) je 0x2d907 movq -0x8(%rbp), %rax cmpq $0x0, (%rax) je 0x2d8ec movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq (%rax), %rax movq %rcx, 0x8(%rax) movq -0x8(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, (%rax) jmp 0x2d912 movq -0x10(%rbp), %rax movq $0x0, (%rax) movq -0x8(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax)
list_add: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi cmp [rbp+var_8], 0 jz short loc_2D907 mov rax, [rbp+var_8] cmp qword ptr [rax], 0 jz short loc_2D8EC mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov rax, [rax] mov [rax+8], rcx loc_2D8EC: mov rax, [rbp+var_8] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax], rcx jmp short loc_2D912 loc_2D907: mov rax, [rbp+var_10] mov qword ptr [rax], 0 loc_2D912: mov rcx, [rbp+var_8] mov rax, [rbp+var_10] mov [rax+8], rcx mov rax, [rbp+var_10] pop rbp retn
_QWORD * list_add(long long a1, _QWORD *a2) { if ( a1 ) { if ( *(_QWORD *)a1 ) *(_QWORD *)(*(_QWORD *)a1 + 8LL) = a2; *a2 = *(_QWORD *)a1; *(_QWORD *)a1 = a2; } else { *a2 = 0LL; } a2[1] = a1; return a2; }
list_add: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI CMP qword ptr [RBP + -0x8],0x0 JZ 0x0012d907 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX],0x0 JZ 0x0012d8ec MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x8],RCX LAB_0012d8ec: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX JMP 0x0012d912 LAB_0012d907: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],0x0 LAB_0012d912: MOV RCX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] POP RBP RET
long * list_add(long *param_1,long *param_2) { if (param_1 == (long *)0x0) { *param_2 = 0; } else { if (*param_1 != 0) { *(long **)(*param_1 + 8) = param_2; } *param_2 = *param_1; *param_1 = (long)param_2; } param_2[1] = (long)param_1; return param_2; }
13,202
my_init
eloqsql/mysys/my_init.c
my_bool my_init(void) { char *str; if (my_init_done) return 0; my_init_done= 1; mysys_usage_id++; my_umask= 0660; /* Default umask for new files */ my_umask_dir= 0700; /* Default umask for new directories */ my_global_flags= 0; /* Default creation of new files */ if ((str= getenv("UMASK")) != 0) my_umask= (int) (atoi_octal(str) | 0600); /* Default creation of new dir's */ if ((str= getenv("UMASK_DIR")) != 0) my_umask_dir= (int) (atoi_octal(str) | 0700); init_glob_errs(); instrumented_stdin.m_file= stdin; instrumented_stdin.m_psi= NULL; /* not yet instrumented */ mysql_stdin= & instrumented_stdin; my_progname_short= "unknown"; if (my_progname) my_progname_short= my_progname + dirname_length(my_progname); /* Initialize our mutex handling */ my_mutex_init(); if (my_thread_global_init()) return 1; #if defined(SAFEMALLOC) && !defined(DBUG_OFF) dbug_sanity= sf_sanity; #endif /* $HOME is needed early to parse configuration files located in ~/ */ if ((home_dir= getenv("HOME")) != 0) home_dir= intern_filename(home_dir_buff, home_dir); { DBUG_ENTER("my_init"); DBUG_PROCESS((char*) (my_progname ? my_progname : "unknown")); my_time_init(); my_win_init(); DBUG_PRINT("exit", ("home: '%s'", home_dir)); #ifdef _WIN32 if (win32_init_tcp_ip()) DBUG_RETURN(1); #endif #ifdef CHECK_UNLIKELY init_my_likely(); #endif DBUG_RETURN(0); } }
O0
c
my_init: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp leaq 0x3666f9(%rip), %rax # 0x391408 cmpb $0x0, (%rax) je 0x2ad1d movb $0x0, -0x1(%rbp) jmp 0x2aea6 leaq 0x3666e4(%rip), %rax # 0x391408 movb $0x1, (%rax) leaq 0x3666de(%rip), %rax # 0x39140c movl (%rax), %ecx addl $0x1, %ecx leaq 0x3666d2(%rip), %rax # 0x39140c movl %ecx, (%rax) leaq 0x1aee95(%rip), %rax # 0x1d9bd8 movl $0x1b0, (%rax) # imm = 0x1B0 leaq 0x1aee8c(%rip), %rax # 0x1d9bdc movl $0x1c0, (%rax) # imm = 0x1C0 leaq 0x366b7b(%rip), %rax # 0x3918d8 movq $0x0, (%rax) leaq 0x58050(%rip), %rdi # 0x82dbb callq 0x253e0 movq %rax, -0x10(%rbp) cmpq $0x0, %rax je 0x2ad94 movq -0x10(%rbp), %rdi callq 0x2aeb0 orq $0x180, %rax # imm = 0x180 movl %eax, %ecx leaq 0x1aee46(%rip), %rax # 0x1d9bd8 movl %ecx, (%rax) leaq 0x58026(%rip), %rdi # 0x82dc1 callq 0x253e0 movq %rax, -0x10(%rbp) cmpq $0x0, %rax je 0x2adc4 movq -0x10(%rbp), %rdi callq 0x2aeb0 orq $0x1c0, %rax # imm = 0x1C0 movl %eax, %ecx leaq 0x1aee1a(%rip), %rax # 0x1d9bdc movl %ecx, (%rax) callq 0x33bf0 movq 0x1ae200(%rip), %rax # 0x1d8fd0 movq (%rax), %rax movq %rax, 0x36663e(%rip) # 0x391418 movq $0x0, 0x36663b(%rip) # 0x391420 leaq 0x366624(%rip), %rax # 0x391410 leaq 0x366625(%rip), %rcx # 0x391418 movq %rcx, (%rax) leaq 0x3666bb(%rip), %rax # 0x3914b8 leaq 0x57fc7(%rip), %rcx # 0x82dcb movq %rcx, (%rax) leaq 0x3666a2(%rip), %rax # 0x3914b0 cmpq $0x0, (%rax) je 0x2ae42 leaq 0x366695(%rip), %rax # 0x3914b0 movq (%rax), %rax movq %rax, -0x18(%rbp) leaq 0x366687(%rip), %rax # 0x3914b0 movq (%rax), %rdi callq 0x35260 movq -0x18(%rbp), %rcx addq %rax, %rcx leaq 0x366679(%rip), %rax # 0x3914b8 movq %rcx, (%rax) callq 0x2ce20 callq 0x2c220 cmpb $0x0, %al je 0x2ae56 movb $0x1, -0x1(%rbp) jmp 0x2aea6 leaq 0x58c68(%rip), %rdi # 0x83ac5 callq 0x253e0 leaq 0x36663f(%rip), %rcx # 0x3914a8 movq %rax, (%rcx) cmpq $0x0, %rax je 0x2ae95 leaq 0x36662f(%rip), %rax # 0x3914a8 movq (%rax), %rsi leaq 0x36683d(%rip), %rdi # 0x3916c0 callq 0x35da0 movq %rax, %rcx leaq 0x366616(%rip), %rax # 0x3914a8 movq %rcx, (%rax) jmp 0x2ae97 jmp 0x2ae99 callq 0x38560 jmp 0x2aea0 jmp 0x2aea2 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nop
my_init: push rbp mov rbp, rsp sub rsp, 20h lea rax, my_init_done cmp byte ptr [rax], 0 jz short loc_2AD1D mov [rbp+var_1], 0 jmp loc_2AEA6 loc_2AD1D: lea rax, my_init_done mov byte ptr [rax], 1 lea rax, mysys_usage_id mov ecx, [rax] add ecx, 1 lea rax, mysys_usage_id mov [rax], ecx lea rax, my_umask mov dword ptr [rax], 1B0h lea rax, my_umask_dir mov dword ptr [rax], 1C0h lea rax, my_global_flags mov qword ptr [rax], 0 lea rdi, aUmask; "UMASK" call _getenv mov [rbp+var_10], rax cmp rax, 0 jz short loc_2AD94 mov rdi, [rbp+var_10] call atoi_octal or rax, 180h mov ecx, eax lea rax, my_umask mov [rax], ecx loc_2AD94: lea rdi, aUmaskDir; "UMASK_DIR" call _getenv mov [rbp+var_10], rax cmp rax, 0 jz short loc_2ADC4 mov rdi, [rbp+var_10] call atoi_octal or rax, 1C0h mov ecx, eax lea rax, my_umask_dir mov [rax], ecx loc_2ADC4: call init_glob_errs mov rax, cs:stdin_ptr mov rax, [rax] mov cs:instrumented_stdin, rax mov cs:qword_391420, 0 lea rax, mysql_stdin lea rcx, instrumented_stdin mov [rax], rcx lea rax, my_progname_short lea rcx, aUnknown; "unknown" mov [rax], rcx lea rax, my_progname cmp qword ptr [rax], 0 jz short loc_2AE42 lea rax, my_progname mov rax, [rax] mov [rbp+var_18], rax lea rax, my_progname mov rdi, [rax] call dirname_length mov rcx, [rbp+var_18] add rcx, rax lea rax, my_progname_short mov [rax], rcx loc_2AE42: call my_mutex_init call my_thread_global_init cmp al, 0 jz short loc_2AE56 mov [rbp+var_1], 1 jmp short loc_2AEA6 loc_2AE56: lea rdi, aMariadbHome+8; "HOME" call _getenv lea rcx, home_dir mov [rcx], rax cmp rax, 0 jz short loc_2AE95 lea rax, home_dir mov rsi, [rax] lea rdi, home_dir_buff call intern_filename mov rcx, rax lea rax, home_dir mov [rax], rcx loc_2AE95: jmp short $+2 loc_2AE97: jmp short $+2 loc_2AE99: call my_time_init jmp short $+2 loc_2AEA0: jmp short $+2 loc_2AEA2: mov [rbp+var_1], 0 loc_2AEA6: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char my_init() { long long v1; // [rsp+8h] [rbp-18h] long long v2; // [rsp+10h] [rbp-10h] long long v3; // [rsp+10h] [rbp-10h] if ( my_init_done ) return 0; my_init_done = 1; ++mysys_usage_id; my_umask = 432; my_umask_dir = 448; my_global_flags = 0LL; v2 = getenv("UMASK"); if ( v2 ) my_umask = atoi_octal(v2) | 0x180; v3 = getenv("UMASK_DIR"); if ( v3 ) my_umask_dir = atoi_octal(v3) | 0x1C0; init_glob_errs(); instrumented_stdin = stdin; qword_391420 = 0LL; mysql_stdin = &instrumented_stdin; my_progname_short = "unknown"; if ( my_progname ) { v1 = my_progname; my_progname_short = dirname_length(my_progname) + v1; } my_mutex_init(); if ( (unsigned __int8)my_thread_global_init() ) return 1; home_dir = getenv("HOME"); if ( home_dir ) home_dir = intern_filename(&home_dir_buff, home_dir); my_time_init(); return 0; }
my_init: PUSH RBP MOV RBP,RSP SUB RSP,0x20 LEA RAX,[0x491408] CMP byte ptr [RAX],0x0 JZ 0x0012ad1d MOV byte ptr [RBP + -0x1],0x0 JMP 0x0012aea6 LAB_0012ad1d: LEA RAX,[0x491408] MOV byte ptr [RAX],0x1 LEA RAX,[0x49140c] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x49140c] MOV dword ptr [RAX],ECX LEA RAX,[0x2d9bd8] MOV dword ptr [RAX],0x1b0 LEA RAX,[0x2d9bdc] MOV dword ptr [RAX],0x1c0 LEA RAX,[0x4918d8] MOV qword ptr [RAX],0x0 LEA RDI,[0x182dbb] CALL 0x001253e0 MOV qword ptr [RBP + -0x10],RAX CMP RAX,0x0 JZ 0x0012ad94 MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012aeb0 OR RAX,0x180 MOV ECX,EAX LEA RAX,[0x2d9bd8] MOV dword ptr [RAX],ECX LAB_0012ad94: LEA RDI,[0x182dc1] CALL 0x001253e0 MOV qword ptr [RBP + -0x10],RAX CMP RAX,0x0 JZ 0x0012adc4 MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012aeb0 OR RAX,0x1c0 MOV ECX,EAX LEA RAX,[0x2d9bdc] MOV dword ptr [RAX],ECX LAB_0012adc4: CALL 0x00133bf0 MOV RAX,qword ptr [0x002d8fd0] MOV RAX,qword ptr [RAX] MOV qword ptr [0x00491418],RAX MOV qword ptr [0x00491420],0x0 LEA RAX,[0x491410] LEA RCX,[0x491418] MOV qword ptr [RAX],RCX LEA RAX,[0x4914b8] LEA RCX,[0x182dcb] MOV qword ptr [RAX],RCX LEA RAX,[0x4914b0] CMP qword ptr [RAX],0x0 JZ 0x0012ae42 LEA RAX,[0x4914b0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX LEA RAX,[0x4914b0] MOV RDI,qword ptr [RAX] CALL 0x00135260 MOV RCX,qword ptr [RBP + -0x18] ADD RCX,RAX LEA RAX,[0x4914b8] MOV qword ptr [RAX],RCX LAB_0012ae42: CALL 0x0012ce20 CALL 0x0012c220 CMP AL,0x0 JZ 0x0012ae56 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012aea6 LAB_0012ae56: LEA RDI,[0x183ac5] CALL 0x001253e0 LEA RCX,[0x4914a8] MOV qword ptr [RCX],RAX CMP RAX,0x0 JZ 0x0012ae95 LEA RAX,[0x4914a8] MOV RSI,qword ptr [RAX] LEA RDI,[0x4916c0] CALL 0x00135da0 MOV RCX,RAX LEA RAX,[0x4914a8] MOV qword ptr [RAX],RCX LAB_0012ae95: JMP 0x0012ae97 LAB_0012ae97: JMP 0x0012ae99 LAB_0012ae99: CALL 0x00138560 JMP 0x0012aea0 LAB_0012aea0: JMP 0x0012aea2 LAB_0012aea2: MOV byte ptr [RBP + -0x1],0x0 LAB_0012aea6: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 my_init(void) { long lVar1; char cVar2; uint uVar3; char *pcVar4; long lVar5; int1 local_9; if (my_init_done == '\0') { my_init_done = '\x01'; mysys_usage_id = mysys_usage_id + 1; my_umask = 0x1b0; my_umask_dir = 0x1c0; my_global_flags = 0; pcVar4 = getenv("UMASK"); if (pcVar4 != (char *)0x0) { uVar3 = atoi_octal(pcVar4); my_umask = uVar3 | 0x180; } pcVar4 = getenv("UMASK_DIR"); if (pcVar4 != (char *)0x0) { uVar3 = atoi_octal(pcVar4); my_umask_dir = uVar3 | 0x1c0; } init_glob_errs(); lVar1 = my_progname; instrumented_stdin._0_8_ = *(int8 *)PTR_stdin_002d8fd0; instrumented_stdin._8_8_ = 0; mysql_stdin = instrumented_stdin; my_progname_short = "unknown"; if (my_progname != 0) { lVar5 = dirname_length(my_progname); my_progname_short = (char *)(lVar1 + lVar5); } my_mutex_init(); cVar2 = my_thread_global_init(); if (cVar2 == '\0') { home_dir = getenv("HOME"); if (home_dir != (char *)0x0) { home_dir = (char *)intern_filename(home_dir_buff,home_dir); } my_time_init(); local_9 = 0; } else { local_9 = 1; } } else { local_9 = 0; } return local_9; }
13,203
ma_ck_delete
eloqsql/storage/maria/ma_delete.c
my_bool _ma_ck_delete(MARIA_HA *info, MARIA_KEY *key) { MARIA_SHARE *share= info->s; int res; my_bool buff_alloced; LSN lsn= LSN_IMPOSSIBLE; my_off_t new_root= share->state.key_root[key->keyinfo->key_nr]; uchar *key_buff, *save_key_data; MARIA_KEY org_key; DBUG_ENTER("_ma_ck_delete"); LINT_INIT_STRUCT(org_key); alloc_on_stack(*info->stack_end_ptr, key_buff, buff_alloced, key->keyinfo->max_store_length); if (!key_buff) DBUG_RETURN(1); save_key_data= key->data; if (share->now_transactional) { /* Save original value as the key may change */ memcpy(key_buff, key->data, key->data_length + key->ref_length); org_key= *key; key->data= key_buff; } if ((res= _ma_ck_real_delete(info, key, &new_root))) { /* We have to mark the table crashed before unpin_all_pages() */ maria_mark_crashed(info); } key->data= save_key_data; if (!res && share->now_transactional) res= _ma_write_undo_key_delete(info, &org_key, new_root, &lsn); else { share->state.key_root[key->keyinfo->key_nr]= new_root; _ma_fast_unlock_key_del(info); } _ma_unpin_all_pages_and_finalize_row(info, lsn); stack_alloc_free(key_buff, buff_alloced); DBUG_RETURN(res != 0); }
O0
c
ma_ck_delete: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x18(%rbp) movq %rsi, -0x20(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq $0x0, -0x38(%rbp) movq -0x28(%rbp), %rax movq 0x118(%rax), %rax movq -0x20(%rbp), %rcx movq 0x8(%rcx), %rcx movzbl 0xa5(%rcx), %ecx movq (%rax,%rcx,8), %rax movq %rax, -0x40(%rbp) movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movzwl 0xb0(%rax), %eax movq %rax, -0x78(%rbp) movq -0x18(%rbp), %rax movq 0x78(%rax), %rax movq (%rax), %rax leaq -0x78(%rbp), %rcx subq %rcx, %rax movq %rax, -0x80(%rbp) movq -0x80(%rbp), %rax cmpq -0x78(%rbp), %rax jbe 0x86f51 movq -0x80(%rbp), %rcx subq -0x78(%rbp), %rcx movl $0x10000, %eax # imm = 0x10000 cmpq %rcx, %rax jb 0x86f27 movq -0x80(%rbp), %rcx subq -0x78(%rbp), %rcx movl $0x8000, %eax # imm = 0x8000 cmpq %rcx, %rax jae 0x86f51 movl $0x1000, %eax # imm = 0x1000 cmpq -0x78(%rbp), %rax ja 0x86f51 movb $0x0, -0x2d(%rbp) movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movzwl 0xb0(%rax), %eax addl $0xf, %eax andl $-0x10, %eax movl %eax, %ecx movq %rsp, %rax subq %rcx, %rax movq %rax, %rsp movq %rax, -0x48(%rbp) jmp 0x86f76 movb $0x1, -0x2d(%rbp) movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movzwl 0xb0(%rax), %eax movl %eax, %esi xorl %edi, %edi movl $0x10010, %edx # imm = 0x10010 callq 0xf2e30 movq %rax, -0x48(%rbp) jmp 0x86f78 cmpq $0x0, -0x48(%rbp) jne 0x86f8a jmp 0x86f81 movb $0x1, -0x9(%rbp) jmp 0x870be movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax cmpb $0x0, 0x7e7(%rax) je 0x86ff2 movq -0x48(%rbp), %rdi movq -0x20(%rbp), %rax movq (%rax), %rsi movq -0x20(%rbp), %rax movl 0x10(%rax), %eax movq -0x20(%rbp), %rcx addl 0x14(%rcx), %eax movl %eax, %eax movl %eax, %edx callq 0x2a0a0 movq -0x20(%rbp), %rax movq (%rax), %rcx movq %rcx, -0x70(%rbp) movq 0x8(%rax), %rcx movq %rcx, -0x68(%rbp) movq 0x10(%rax), %rcx movq %rcx, -0x60(%rbp) movq 0x18(%rax), %rax movq %rax, -0x58(%rbp) movq -0x48(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi leaq -0x40(%rbp), %rdx callq 0x870f0 movsbl %al, %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax je 0x8702c jmp 0x87010 movq -0x18(%rbp), %rax movq (%rax), %rax movl 0x170(%rax), %ecx orl $0x2, %ecx movl %ecx, 0x170(%rax) jmp 0x87028 jmp 0x8702a jmp 0x8702c movq -0x50(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) cmpl $0x0, -0x2c(%rbp) jne 0x8706a movq -0x28(%rbp), %rax movsbl 0x7e7(%rax), %eax cmpl $0x0, %eax je 0x8706a movq -0x18(%rbp), %rdi movq -0x40(%rbp), %rdx leaq -0x70(%rbp), %rsi leaq -0x38(%rbp), %rcx callq 0x87420 movsbl %al, %eax movl %eax, -0x2c(%rbp) jmp 0x87095 movq -0x40(%rbp), %rdx movq -0x28(%rbp), %rax movq 0x118(%rax), %rax movq -0x20(%rbp), %rcx movq 0x8(%rcx), %rcx movzbl 0xa5(%rcx), %ecx movq %rdx, (%rax,%rcx,8) movq -0x18(%rbp), %rdi callq 0x876b0 movq -0x18(%rbp), %rdi movq -0x38(%rbp), %rsi callq 0x876e0 movq -0x48(%rbp), %rdi movsbl -0x2d(%rbp), %esi callq 0x87710 cmpl $0x0, -0x2c(%rbp) setne %al andb $0x1, %al movzbl %al, %eax movb %al, -0x9(%rbp) movb -0x9(%rbp), %al movb %al, -0x81(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x870e4 movb -0x81(%rbp), %al movq %rbp, %rsp popq %rbp retq callq 0x2a260 nopl (%rax)
_ma_ck_delete: push rbp mov rbp, rsp sub rsp, 90h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_28], rax mov [rbp+var_38], 0 mov rax, [rbp+var_28] mov rax, [rax+118h] mov rcx, [rbp+var_20] mov rcx, [rcx+8] movzx ecx, byte ptr [rcx+0A5h] mov rax, [rax+rcx*8] mov [rbp+var_40], rax mov rax, [rbp+var_20] mov rax, [rax+8] movzx eax, word ptr [rax+0B0h] mov [rbp+var_78], rax mov rax, [rbp+var_18] mov rax, [rax+78h] mov rax, [rax] lea rcx, [rbp+var_78] sub rax, rcx mov [rbp+var_80], rax mov rax, [rbp+var_80] cmp rax, [rbp+var_78] jbe short loc_86F51 mov rcx, [rbp+var_80] sub rcx, [rbp+var_78] mov eax, offset stru_10000 cmp rax, rcx jb short loc_86F27 mov rcx, [rbp+var_80] sub rcx, [rbp+var_78] mov eax, 8000h cmp rax, rcx jnb short loc_86F51 mov eax, 1000h cmp rax, [rbp+var_78] ja short loc_86F51 loc_86F27: mov [rbp+var_2D], 0 mov rax, [rbp+var_20] mov rax, [rax+8] movzx eax, word ptr [rax+0B0h] add eax, 0Fh and eax, 0FFFFFFF0h mov ecx, eax mov rax, rsp sub rax, rcx mov rsp, rax mov [rbp+var_48], rax jmp short loc_86F76 loc_86F51: mov [rbp+var_2D], 1 mov rax, [rbp+var_20] mov rax, [rax+8] movzx eax, word ptr [rax+0B0h] mov esi, eax xor edi, edi mov edx, 10010h call my_malloc mov [rbp+var_48], rax loc_86F76: jmp short $+2 loc_86F78: cmp [rbp+var_48], 0 jnz short loc_86F8A jmp short $+2 loc_86F81: mov [rbp+var_9], 1 jmp loc_870BE loc_86F8A: mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_50], rax mov rax, [rbp+var_28] cmp byte ptr [rax+7E7h], 0 jz short loc_86FF2 mov rdi, [rbp+var_48] mov rax, [rbp+var_20] mov rsi, [rax] mov rax, [rbp+var_20] mov eax, [rax+10h] mov rcx, [rbp+var_20] add eax, [rcx+14h] mov eax, eax mov edx, eax call _memcpy mov rax, [rbp+var_20] mov rcx, [rax] mov [rbp+var_70], rcx mov rcx, [rax+8] mov [rbp+var_68], rcx mov rcx, [rax+10h] mov [rbp+var_60], rcx mov rax, [rax+18h] mov [rbp+var_58], rax mov rcx, [rbp+var_48] mov rax, [rbp+var_20] mov [rax], rcx loc_86FF2: mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] lea rdx, [rbp+var_40] call _ma_ck_real_delete movsx eax, al mov [rbp+var_2C], eax cmp eax, 0 jz short loc_8702C jmp short $+2 loc_87010: mov rax, [rbp+var_18] mov rax, [rax] mov ecx, [rax+170h] or ecx, 2 mov [rax+170h], ecx jmp short $+2 loc_87028: jmp short $+2 loc_8702A: jmp short $+2 loc_8702C: mov rcx, [rbp+var_50] mov rax, [rbp+var_20] mov [rax], rcx cmp [rbp+var_2C], 0 jnz short loc_8706A mov rax, [rbp+var_28] movsx eax, byte ptr [rax+7E7h] cmp eax, 0 jz short loc_8706A mov rdi, [rbp+var_18] mov rdx, [rbp+var_40] lea rsi, [rbp+var_70] lea rcx, [rbp+var_38] call _ma_write_undo_key_delete movsx eax, al mov [rbp+var_2C], eax jmp short loc_87095 loc_8706A: mov rdx, [rbp+var_40] mov rax, [rbp+var_28] mov rax, [rax+118h] mov rcx, [rbp+var_20] mov rcx, [rcx+8] movzx ecx, byte ptr [rcx+0A5h] mov [rax+rcx*8], rdx mov rdi, [rbp+var_18] call _ma_fast_unlock_key_del_1 loc_87095: mov rdi, [rbp+var_18] mov rsi, [rbp+var_38] call _ma_unpin_all_pages_and_finalize_row_2 mov rdi, [rbp+var_48] movsx esi, [rbp+var_2D] call stack_alloc_free_3 cmp [rbp+var_2C], 0 setnz al and al, 1 movzx eax, al mov [rbp+var_9], al loc_870BE: mov al, [rbp+var_9] mov [rbp+var_81], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_870E4 mov al, [rbp+var_81] mov rsp, rbp pop rbp retn loc_870E4: call ___stack_chk_fail
bool ma_ck_delete(long long *a1, long long *a2) { char v2; // al long long v4; // [rsp+0h] [rbp-90h] BYREF unsigned long long v5; // [rsp+10h] [rbp-80h] unsigned long long v6; // [rsp+18h] [rbp-78h] BYREF _QWORD v7[4]; // [rsp+20h] [rbp-70h] BYREF long long v8; // [rsp+40h] [rbp-50h] char *v9; // [rsp+48h] [rbp-48h] long long v10; // [rsp+50h] [rbp-40h] BYREF long long v11; // [rsp+58h] [rbp-38h] BYREF char v12; // [rsp+63h] [rbp-2Dh] int v13; // [rsp+64h] [rbp-2Ch] long long v14; // [rsp+68h] [rbp-28h] long long *v15; // [rsp+70h] [rbp-20h] long long *v16; // [rsp+78h] [rbp-18h] unsigned long long v18; // [rsp+88h] [rbp-8h] v18 = __readfsqword(0x28u); v16 = a1; v15 = a2; v14 = *a1; v11 = 0LL; v10 = *(_QWORD *)(*(_QWORD *)(v14 + 280) + 8LL * *(unsigned __int8 *)(a2[1] + 165)); v6 = *(unsigned __int16 *)(a2[1] + 176); v5 = *(_QWORD *)a1[15] - (_QWORD)&v6; if ( v5 <= v6 || (unsigned long long)&stru_10000 >= v5 - v6 && (v5 - v6 <= 0x8000 || v6 < 0x1000) ) { v12 = 1; v9 = (char *)my_malloc(0LL, *(unsigned __int16 *)(v15[1] + 176), 65552LL); } else { v12 = 0; v9 = (char *)&v4 - ((*(unsigned __int16 *)(v15[1] + 176) + 15) & 0xFFFFFFF0); } if ( !v9 ) return 1; v8 = *v15; if ( *(_BYTE *)(v14 + 2023) ) { memcpy(v9, *v15, (unsigned int)(*((_DWORD *)v15 + 5) + *((_DWORD *)v15 + 4))); v7[0] = *v15; v7[1] = v15[1]; v7[2] = v15[2]; v7[3] = v15[3]; *v15 = (long long)v9; } v2 = ma_ck_real_delete(v16, v15, &v10); v13 = v2; if ( v2 ) *(_DWORD *)(*v16 + 368) |= 2u; *v15 = v8; if ( v13 || !*(_BYTE *)(v14 + 2023) ) { *(_QWORD *)(*(_QWORD *)(v14 + 280) + 8LL * *(unsigned __int8 *)(v15[1] + 165)) = v10; ma_fast_unlock_key_del_1(v16); } else { v13 = (char)ma_write_undo_key_delete(v16, v7, v10, &v11); } ma_unpin_all_pages_and_finalize_row_2(v16, v11); stack_alloc_free_3(v9, (unsigned int)v12); return v13 != 0; }
_ma_ck_delete: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV qword ptr [RBP + -0x38],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x118] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX + 0x8] MOVZX ECX,byte ptr [RCX + 0xa5] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOVZX EAX,word ptr [RAX + 0xb0] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x78] MOV RAX,qword ptr [RAX] LEA RCX,[RBP + -0x78] SUB RAX,RCX MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x80] CMP RAX,qword ptr [RBP + -0x78] JBE 0x00186f51 MOV RCX,qword ptr [RBP + -0x80] SUB RCX,qword ptr [RBP + -0x78] MOV EAX,0x10000 CMP RAX,RCX JC 0x00186f27 MOV RCX,qword ptr [RBP + -0x80] SUB RCX,qword ptr [RBP + -0x78] MOV EAX,0x8000 CMP RAX,RCX JNC 0x00186f51 MOV EAX,0x1000 CMP RAX,qword ptr [RBP + -0x78] JA 0x00186f51 LAB_00186f27: MOV byte ptr [RBP + -0x2d],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOVZX EAX,word ptr [RAX + 0xb0] ADD EAX,0xf AND EAX,0xfffffff0 MOV ECX,EAX MOV RAX,RSP SUB RAX,RCX MOV RSP,RAX MOV qword ptr [RBP + -0x48],RAX JMP 0x00186f76 LAB_00186f51: MOV byte ptr [RBP + -0x2d],0x1 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOVZX EAX,word ptr [RAX + 0xb0] MOV ESI,EAX XOR EDI,EDI MOV EDX,0x10010 CALL 0x001f2e30 MOV qword ptr [RBP + -0x48],RAX LAB_00186f76: JMP 0x00186f78 LAB_00186f78: CMP qword ptr [RBP + -0x48],0x0 JNZ 0x00186f8a JMP 0x00186f81 LAB_00186f81: MOV byte ptr [RBP + -0x9],0x1 JMP 0x001870be LAB_00186f8a: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x28] CMP byte ptr [RAX + 0x7e7],0x0 JZ 0x00186ff2 MOV RDI,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x20] ADD EAX,dword ptr [RCX + 0x14] MOV EAX,EAX MOV EDX,EAX CALL 0x0012a0a0 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] MOV qword ptr [RBP + -0x70],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x68],RCX MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x60],RCX MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x58],RAX MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX LAB_00186ff2: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] LEA RDX,[RBP + -0x40] CALL 0x001870f0 MOVSX EAX,AL MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JZ 0x0018702c JMP 0x00187010 LAB_00187010: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RAX + 0x170] OR ECX,0x2 MOV dword ptr [RAX + 0x170],ECX JMP 0x00187028 LAB_00187028: JMP 0x0018702a LAB_0018702a: JMP 0x0018702c LAB_0018702c: MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX CMP dword ptr [RBP + -0x2c],0x0 JNZ 0x0018706a MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX + 0x7e7] CMP EAX,0x0 JZ 0x0018706a MOV RDI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x40] LEA RSI,[RBP + -0x70] LEA RCX,[RBP + -0x38] CALL 0x00187420 MOVSX EAX,AL MOV dword ptr [RBP + -0x2c],EAX JMP 0x00187095 LAB_0018706a: MOV RDX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x118] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX + 0x8] MOVZX ECX,byte ptr [RCX + 0xa5] MOV qword ptr [RAX + RCX*0x8],RDX MOV RDI,qword ptr [RBP + -0x18] CALL 0x001876b0 LAB_00187095: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x38] CALL 0x001876e0 MOV RDI,qword ptr [RBP + -0x48] MOVSX ESI,byte ptr [RBP + -0x2d] CALL 0x00187710 CMP dword ptr [RBP + -0x2c],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x9],AL LAB_001870be: MOV AL,byte ptr [RBP + -0x9] MOV byte ptr [RBP + -0x81],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001870e4 MOV AL,byte ptr [RBP + -0x81] MOV RSP,RBP POP RBP RET LAB_001870e4: CALL 0x0012a260
int8 _ma_ck_delete(long *param_1,int8 *param_2) { int iVar1; void *__src; int1 *puVar2; int8 uVar3; int8 *puVar4; long *plVar5; char cVar6; int1 *puVar7; int iVar8; long in_FS_OFFSET; int1 auStack_98 [15]; bool local_89; ulong local_88; ulong local_80; int8 local_78; int8 local_70; int8 local_68; int8 local_60; int8 local_58; int1 *local_50; int8 local_48; int8 local_40; char local_35; int local_34; long local_30; int8 *local_28; long *local_20; bool local_11; long local_10; puVar7 = auStack_98; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_30 = *param_1; local_40 = 0; local_48 = *(int8 *)(*(long *)(local_30 + 0x118) + (ulong)*(byte *)(param_2[1] + 0xa5) * 8); local_80 = (ulong)*(ushort *)(param_2[1] + 0xb0); local_88 = *(long *)param_1[0xf] - (long)&local_80; local_28 = param_2; local_20 = param_1; if ((local_80 < local_88) && ((0x10000 < local_88 - local_80 || ((0x8000 < local_88 - local_80 && (0xfff < local_80)))))) { local_35 = '\0'; puVar7 = auStack_98 + -(ulong)(*(ushort *)(param_2[1] + 0xb0) + 0xf & 0xfffffff0); local_50 = puVar7; } else { local_35 = '\x01'; local_50 = (int1 *)my_malloc(0,*(int2 *)(param_2[1] + 0xb0),0x10010); } puVar2 = local_50; if (local_50 == (int1 *)0x0) { local_11 = true; } else { local_58 = *local_28; if (*(char *)(local_30 + 0x7e7) != '\0') { __src = (void *)*local_28; iVar8 = *(int *)(local_28 + 2); iVar1 = *(int *)((long)local_28 + 0x14); *(int8 *)(puVar7 + -8) = 0x186fc4; memcpy(puVar2,__src,(ulong)(uint)(iVar8 + iVar1)); local_78 = *local_28; local_70 = local_28[1]; local_68 = local_28[2]; local_60 = local_28[3]; *local_28 = local_50; } plVar5 = local_20; puVar4 = local_28; *(int8 *)(puVar7 + -8) = 0x187003; cVar6 = _ma_ck_real_delete(plVar5,puVar4,&local_48); plVar5 = local_20; uVar3 = local_48; local_34 = (int)cVar6; if (local_34 != 0) { *(uint *)(*local_20 + 0x170) = *(uint *)(*local_20 + 0x170) | 2; } *local_28 = local_58; if ((local_34 == 0) && (*(char *)(local_30 + 0x7e7) != '\0')) { *(int8 *)(puVar7 + -8) = 0x187062; cVar6 = _ma_write_undo_key_delete(plVar5,&local_78,uVar3,&local_40); local_34 = (int)cVar6; } else { *(int8 *)(*(long *)(local_30 + 0x118) + (ulong)*(byte *)(local_28[1] + 0xa5) * 8) = local_48; *(int8 *)(puVar7 + -8) = 0x187095; _ma_fast_unlock_key_del(plVar5); } plVar5 = local_20; uVar3 = local_40; *(int8 *)(puVar7 + -8) = 0x1870a2; _ma_unpin_all_pages_and_finalize_row(plVar5,uVar3); puVar2 = local_50; iVar8 = (int)local_35; *(int8 *)(puVar7 + -8) = 0x1870af; stack_alloc_free(puVar2,iVar8); local_11 = local_34 != 0; } local_89 = local_11; if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_11); } /* WARNING: Subroutine does not return */ *(int8 *)(puVar7 + -8) = 0x1870e9; __stack_chk_fail(); }
13,204
ma_bitmap_set_pagecache_callbacks
eloqsql/storage/maria/ma_bitmap.c
void _ma_bitmap_set_pagecache_callbacks(PAGECACHE_FILE *file, MARIA_SHARE *share) { pagecache_file_set_null_hooks(file); file->callback_data= (uchar*) share; file->flush_log_callback= maria_flush_log_for_page_none; file->post_write_hook= maria_page_write_failure; if (share->temporary) { file->post_read_hook= &maria_page_crc_check_none; file->pre_write_hook= &maria_page_filler_set_none; } else { file->post_read_hook= &maria_page_crc_check_bitmap; if (share->options & HA_OPTION_PAGE_CHECKSUM) file->pre_write_hook= &maria_page_crc_set_normal; else file->pre_write_hook= &maria_page_filler_set_bitmap; if (share->now_transactional) file->flush_log_callback= flush_log_for_bitmap; } }
O0
c
ma_bitmap_set_pagecache_callbacks: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdi callq 0x41530 movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x40(%rax) movq -0x8(%rbp), %rax leaq -0x20aa0(%rip), %rcx # 0x43040 movq %rcx, 0x38(%rax) movq -0x8(%rbp), %rax leaq -0x20b8f(%rip), %rcx # 0x42f60 movq %rcx, 0x30(%rax) movq -0x10(%rbp), %rax cmpb $0x0, 0x7d9(%rax) je 0x63b20 movq -0x8(%rbp), %rax leaq -0x20c7b(%rip), %rcx # 0x42e90 movq %rcx, 0x20(%rax) movq -0x8(%rbp), %rax leaq -0x20bca(%rip), %rcx # 0x42f50 movq %rcx, 0x28(%rax) jmp 0x63b84 movq -0x8(%rbp), %rax leaq -0x20deb(%rip), %rcx # 0x42d40 movq %rcx, 0x20(%rax) movq -0x10(%rbp), %rax movq 0x720(%rax), %rax andq $0x800, %rax # imm = 0x800 cmpq $0x0, %rax je 0x63b57 movq -0x8(%rbp), %rax leaq -0x20fd1(%rip), %rcx # 0x42b80 movq %rcx, 0x28(%rax) jmp 0x63b66 movq -0x8(%rbp), %rax leaq -0x20c62(%rip), %rcx # 0x42f00 movq %rcx, 0x28(%rax) movq -0x10(%rbp), %rax cmpb $0x0, 0x7e7(%rax) je 0x63b82 movq -0x8(%rbp), %rax leaq 0x2b92(%rip), %rcx # 0x66710 movq %rcx, 0x38(%rax) jmp 0x63b84 addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
_ma_bitmap_set_pagecache_callbacks: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_8] call pagecache_file_set_null_hooks mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax+40h], rcx mov rax, [rbp+var_8] lea rcx, maria_flush_log_for_page_none mov [rax+38h], rcx mov rax, [rbp+var_8] lea rcx, maria_page_write_failure mov [rax+30h], rcx mov rax, [rbp+var_10] cmp byte ptr [rax+7D9h], 0 jz short loc_63B20 mov rax, [rbp+var_8] lea rcx, maria_page_crc_check_none mov [rax+20h], rcx mov rax, [rbp+var_8] lea rcx, maria_page_filler_set_none mov [rax+28h], rcx jmp short loc_63B84 loc_63B20: mov rax, [rbp+var_8] lea rcx, maria_page_crc_check_bitmap mov [rax+20h], rcx mov rax, [rbp+var_10] mov rax, [rax+720h] and rax, 800h cmp rax, 0 jz short loc_63B57 mov rax, [rbp+var_8] lea rcx, maria_page_crc_set_normal mov [rax+28h], rcx jmp short loc_63B66 loc_63B57: mov rax, [rbp+var_8] lea rcx, maria_page_filler_set_bitmap mov [rax+28h], rcx loc_63B66: mov rax, [rbp+var_10] cmp byte ptr [rax+7E7h], 0 jz short loc_63B82 mov rax, [rbp+var_8] lea rcx, flush_log_for_bitmap mov [rax+38h], rcx loc_63B82: jmp short $+2 loc_63B84: add rsp, 10h pop rbp retn
_QWORD * ma_bitmap_set_pagecache_callbacks(_QWORD *a1, long long a2) { _QWORD *result; // rax pagecache_file_set_null_hooks(a1); a1[8] = a2; a1[7] = maria_flush_log_for_page_none; a1[6] = maria_page_write_failure; if ( *(_BYTE *)(a2 + 2009) ) { a1[4] = maria_page_crc_check_none; result = a1; a1[5] = maria_page_filler_set_none; } else { a1[4] = maria_page_crc_check_bitmap; if ( (*(_QWORD *)(a2 + 1824) & 0x800LL) != 0 ) a1[5] = maria_page_crc_set_normal; else a1[5] = maria_page_filler_set_bitmap; result = (_QWORD *)a2; if ( *(_BYTE *)(a2 + 2023) ) { result = a1; a1[7] = flush_log_for_bitmap; } } return result; }
_ma_bitmap_set_pagecache_callbacks: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] CALL 0x00141530 MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x40],RCX MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x143040] MOV qword ptr [RAX + 0x38],RCX MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x142f60] MOV qword ptr [RAX + 0x30],RCX MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x7d9],0x0 JZ 0x00163b20 MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x142e90] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x142f50] MOV qword ptr [RAX + 0x28],RCX JMP 0x00163b84 LAB_00163b20: MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x142d40] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x720] AND RAX,0x800 CMP RAX,0x0 JZ 0x00163b57 MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x142b80] MOV qword ptr [RAX + 0x28],RCX JMP 0x00163b66 LAB_00163b57: MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x142f00] MOV qword ptr [RAX + 0x28],RCX LAB_00163b66: MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x7e7],0x0 JZ 0x00163b82 MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x166710] MOV qword ptr [RAX + 0x38],RCX LAB_00163b82: JMP 0x00163b84 LAB_00163b84: ADD RSP,0x10 POP RBP RET
void _ma_bitmap_set_pagecache_callbacks(long param_1,long param_2) { pagecache_file_set_null_hooks(param_1); *(long *)(param_1 + 0x40) = param_2; *(code **)(param_1 + 0x38) = maria_flush_log_for_page_none; *(code **)(param_1 + 0x30) = maria_page_write_failure; if (*(char *)(param_2 + 0x7d9) == '\0') { *(code **)(param_1 + 0x20) = maria_page_crc_check_bitmap; if ((*(ulong *)(param_2 + 0x720) & 0x800) == 0) { *(code **)(param_1 + 0x28) = maria_page_filler_set_bitmap; } else { *(code **)(param_1 + 0x28) = maria_page_crc_set_normal; } if (*(char *)(param_2 + 0x7e7) != '\0') { *(code **)(param_1 + 0x38) = flush_log_for_bitmap; } } else { *(code **)(param_1 + 0x20) = maria_page_crc_check_none; *(code **)(param_1 + 0x28) = maria_page_filler_set_none; } return; }
13,205
minja::Value::pop(minja::Value const&)
monkey531[P]llama/common/minja.hpp
Value pop(const Value& index) { if (is_array()) { if (array_->empty()) throw std::runtime_error("pop from empty list"); if (index.is_null()) { auto ret = array_->back(); array_->pop_back(); return ret; } else if (!index.is_number_integer()) { throw std::runtime_error("pop index must be an integer: " + index.dump()); } else { auto i = index.get<int>(); if (i < 0 || i >= static_cast<int>(array_->size())) throw std::runtime_error("pop index out of range: " + index.dump()); auto it = array_->begin() + (i < 0 ? array_->size() + i : i); auto ret = *it; array_->erase(it); return ret; } } else if (is_object()) { if (!index.is_hashable()) throw std::runtime_error("Unashable type: " + index.dump()); auto it = object_->find(index.primitive_); if (it == object_->end()) throw std::runtime_error("Key not found: " + index.dump()); auto ret = it->second; object_->erase(it); return ret; } else { throw std::runtime_error("Value is not an array or object: " + dump()); } }
O1
cpp
minja::Value::pop(minja::Value const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r13 movq 0x10(%rsi), %rax testq %rax, %rax je 0x939df movq 0x8(%rax), %rsi cmpq %rsi, (%rax) je 0x93aea cmpq $0x0, 0x20(%rbx) movb 0x40(%rbx), %al jne 0x93a44 cmpq $0x0, 0x10(%rbx) jne 0x93a44 testb %al, %al jne 0x93a44 cmpq $0x0, 0x30(%rbx) jne 0x93a44 addq $-0x50, %rsi movq %r13, %rdi callq 0x8e64c movq 0x10(%r15), %rdi movq 0x8(%rdi), %rsi addq $-0x50, %rsi movq %rsi, 0x8(%rdi) callq 0x8cb24 jmp 0x93ad8 movq 0x20(%r15), %r14 testq %r14, %r14 je 0x93b7c movq %r13, 0x40(%rsp) cmpq $0x0, 0x10(%rbx) jne 0x93bdc cmpq $0x0, 0x20(%rbx) jne 0x93bdc cmpq $0x0, 0x30(%rbx) jne 0x93bdc movq (%r14), %r13 movq 0x8(%r14), %r12 cmpq %r12, %r13 je 0x93aa7 leaq 0x40(%rbx), %rbp movq %r13, %rdi movq %rbp, %rsi callq 0x8df71 testb %al, %al jne 0x93aa4 addq $0x60, %r13 movq 0x8(%r14), %r12 cmpq %r12, %r13 jne 0x93a26 jmp 0x93aa7 addb $-0x5, %al cmpb $0x2, %al jae 0x93c99 movq %rbx, %rdi callq 0x91598 testl %eax, %eax js 0x93b1c movq 0x10(%r15), %rcx movq (%rcx), %r12 movq 0x8(%rcx), %rcx subq %r12, %rcx shrq $0x4, %rcx imull $0xcccccccd, %ecx, %ecx # imm = 0xCCCCCCCD cmpl %ecx, %eax jge 0x93b1c movl %eax, %eax leaq (%rax,%rax,4), %rax shlq $0x4, %rax addq %rax, %r12 movq %r13, %rdi movq %r12, %rsi callq 0x8e64c movq 0x10(%r15), %rdi movq %r12, %rsi callq 0x94fba jmp 0x93ad8 movq %r13, %r12 movq 0x20(%r15), %rax cmpq 0x8(%rax), %r12 je 0x93c3c leaq 0x10(%r12), %rsi movq 0x40(%rsp), %r13 movq %r13, %rdi callq 0x8e64c movq 0x20(%r15), %rdi leaq 0x60(%r12), %rdx movq %r12, %rsi callq 0x95032 movq %r13, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x1b440 movq %rax, %r14 leaq 0x60ae4(%rip), %rsi # 0xf45e2 movq %rax, %rdi callq 0x1b320 movq 0x9c4db(%rip), %rsi # 0x12ffe8 movq 0x9c43c(%rip), %rdx # 0x12ff50 movq %r14, %rdi callq 0x1bf00 movl $0x10, %edi callq 0x1b440 movq %rax, %r14 movq %rsp, %rdi movq %rbx, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x87128 leaq 0x60ad3(%rip), %rsi # 0xf4615 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x78f1b movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %r14, %rdi callq 0x1be10 xorl %ebp, %ebp movq 0x9c480(%rip), %rsi # 0x12ffe8 movq 0x9c3e1(%rip), %rdx # 0x12ff50 movq %r14, %rdi callq 0x1bf00 jmp 0x93cf4 movl $0x10, %edi callq 0x1b440 movq %rax, %r14 movq %rsp, %rdi movq %r15, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x87128 leaq 0x60738(%rip), %rsi # 0xf42da leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x78f1b movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %r14, %rdi callq 0x1be10 xorl %ebp, %ebp movq 0x9c420(%rip), %rsi # 0x12ffe8 movq 0x9c381(%rip), %rdx # 0x12ff50 movq %r14, %rdi callq 0x1bf00 jmp 0x93cf4 movl $0x10, %edi callq 0x1b440 movq %rax, %r14 movq %rsp, %rdi movq %rbx, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x87128 leaq 0x6058c(%rip), %rsi # 0xf418e leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x78f1b movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %r14, %rdi callq 0x1be10 xorl %ebp, %ebp movq 0x9c3c0(%rip), %rsi # 0x12ffe8 movq 0x9c321(%rip), %rdx # 0x12ff50 movq %r14, %rdi callq 0x1bf00 jmp 0x93cf4 movl $0x10, %edi callq 0x1b440 movq %rax, %r14 movq %rsp, %rdi movq %rbx, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x87128 leaq 0x609cc(%rip), %rsi # 0xf462e leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x78f1b movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %r14, %rdi callq 0x1be10 xorl %ebp, %ebp movq 0x9c360(%rip), %rsi # 0x12ffe8 movq 0x9c2c1(%rip), %rdx # 0x12ff50 movq %r14, %rdi callq 0x1bf00 jmp 0x93cf4 movl $0x10, %edi callq 0x1b440 movq %rax, %r14 movq %rsp, %rdi movq %rbx, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x87128 leaq 0x60937(%rip), %rsi # 0xf45f6 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x78f1b movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %r14, %rdi callq 0x1be10 xorl %ebp, %ebp movq 0x9c303(%rip), %rsi # 0x12ffe8 movq 0x9c264(%rip), %rdx # 0x12ff50 movq %r14, %rdi callq 0x1bf00 jmp 0x93d04 jmp 0x93d24 jmp 0x93d04 jmp 0x93d24 jmp 0x93d04 jmp 0x93d24 jmp 0x93d04 jmp 0x93d24 movq %rax, %rbx leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x93d2a movq 0x30(%rsp), %rsi incq %rsi callq 0x1b8c0 jmp 0x93d2a movq %rax, %rbx movb $0x1, %bpl leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x93d57 movq 0x10(%rsp), %rsi incq %rsi callq 0x1b8c0 jmp 0x93d57 jmp 0x93d51 jmp 0x93d51 jmp 0x93d51 jmp 0x93d51 jmp 0x93d6b movq %rax, %rbx movb $0x1, %bpl testb %bpl, %bpl jne 0x93d61 jmp 0x93d76 movq %rax, %rbx movq %r14, %rdi callq 0x1b660 jmp 0x93d76 movq %rax, %rbx movq %r13, %rdi callq 0x86e34 movq %rbx, %rdi callq 0x1bf90
_ZN5minja5Value3popERKS0_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov rbx, rdx mov r15, rsi mov r13, rdi mov rax, [rsi+10h] test rax, rax jz short loc_939DF mov rsi, [rax+8] cmp [rax], rsi jz loc_93AEA cmp qword ptr [rbx+20h], 0 mov al, [rbx+40h] jnz loc_93A44 cmp qword ptr [rbx+10h], 0 jnz loc_93A44 test al, al jnz loc_93A44 cmp qword ptr [rbx+30h], 0 jnz loc_93A44 add rsi, 0FFFFFFFFFFFFFFB0h; minja::Value * mov rdi, r13; this call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) mov rdi, [r15+10h] mov rsi, [rdi+8] add rsi, 0FFFFFFFFFFFFFFB0h mov [rdi+8], rsi call _ZN9__gnu_cxx13new_allocatorIN5minja5ValueEE7destroyIS2_EEvPT_; __gnu_cxx::new_allocator<minja::Value>::destroy<minja::Value>(minja::Value *) jmp loc_93AD8 loc_939DF: mov r14, [r15+20h] test r14, r14 jz loc_93B7C mov [rsp+78h+var_38], r13 cmp qword ptr [rbx+10h], 0 jnz loc_93BDC cmp qword ptr [rbx+20h], 0 jnz loc_93BDC cmp qword ptr [rbx+30h], 0 jnz loc_93BDC mov r13, [r14] mov r12, [r14+8] cmp r13, r12 jz loc_93AA7 lea rbp, [rbx+40h] loc_93A26: mov rdi, r13 mov rsi, rbp call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) test al, al jnz short loc_93AA4 add r13, 60h ; '`' mov r12, [r14+8] cmp r13, r12 jnz short loc_93A26 jmp short loc_93AA7 loc_93A44: add al, 0FBh cmp al, 2 jnb loc_93C99 mov rdi, rbx call _ZNK5minja5Value3getIiEET_v; minja::Value::get<int>(void) test eax, eax js loc_93B1C mov rcx, [r15+10h] mov r12, [rcx] mov rcx, [rcx+8] sub rcx, r12 shr rcx, 4 imul ecx, 0CCCCCCCDh cmp eax, ecx jge loc_93B1C mov eax, eax lea rax, [rax+rax*4] shl rax, 4 add r12, rax mov rdi, r13; this mov rsi, r12; minja::Value * call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) mov rdi, [r15+10h] mov rsi, r12 call _ZNSt6vectorIN5minja5ValueESaIS1_EE8_M_eraseEN9__gnu_cxx17__normal_iteratorIPS1_S3_EE; std::vector<minja::Value>::_M_erase(__gnu_cxx::__normal_iterator<minja::Value*,std::vector<minja::Value>>) jmp short loc_93AD8 loc_93AA4: mov r12, r13 loc_93AA7: mov rax, [r15+20h] cmp r12, [rax+8] jz loc_93C3C lea rsi, [r12+10h]; minja::Value * mov r13, [rsp+78h+var_38] mov rdi, r13; this call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) mov rdi, [r15+20h] lea rdx, [r12+60h] mov rsi, r12 call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEESR_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>) loc_93AD8: mov rax, r13 add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_93AEA: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aPopFromEmptyLi; "pop from empty list" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_93B1C: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax mov rdi, rsp mov rsi, rbx mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aPopIndexOutOfR; "pop index out of range: " lea rdi, [rsp+78h+var_58] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+78h+var_58] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp loc_93CF4 loc_93B7C: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax mov rdi, rsp mov rsi, r15 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aValueIsNotAnAr_0; "Value is not an array or object: " lea rdi, [rsp+78h+var_58] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+78h+var_58] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp loc_93CF4 loc_93BDC: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax mov rdi, rsp mov rsi, rbx mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUnashableType; "Unashable type: " lea rdi, [rsp+78h+var_58] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+78h+var_58] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp loc_93CF4 loc_93C3C: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax mov rdi, rsp mov rsi, rbx mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aKeyNotFound_0; "Key not found: " lea rdi, [rsp+78h+var_58] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+78h+var_58] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_93CF4 loc_93C99: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax mov rdi, rsp mov rsi, rbx mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aPopIndexMustBe; "pop index must be an integer: " lea rdi, [rsp+78h+var_58] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+78h+var_58] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_93CF4: jmp short loc_93D04 jmp short loc_93D24 jmp short loc_93D04 jmp short loc_93D24 jmp short loc_93D04 jmp short loc_93D24 jmp short loc_93D04 jmp short loc_93D24 loc_93D04: mov rbx, rax lea rax, [rsp+78h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_93D2A mov rsi, [rsp+78h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_93D2A loc_93D24: mov rbx, rax mov bpl, 1 loc_93D2A: lea rax, [rsp+78h+var_68] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_93D57 mov rsi, [rsp+78h+var_68] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_93D57 jmp short loc_93D51 jmp short loc_93D51 jmp short loc_93D51 jmp short loc_93D51 jmp short loc_93D6B loc_93D51: mov rbx, rax mov bpl, 1 loc_93D57: test bpl, bpl jnz short loc_93D61 jmp short loc_93D76 mov rbx, rax loc_93D61: mov rdi, r14; void * call ___cxa_free_exception jmp short loc_93D76 loc_93D6B: mov rbx, rax mov rdi, r13; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_93D76: mov rdi, rbx call __Unwind_Resume
minja::Value * minja::Value::pop(minja::Value *this, const minja::Value *a2, long long a3, __m128d a4) { minja::Value *v6; // r13 _QWORD *v7; // rax long long v8; // rsi char v9; // al long long v10; // rdi long long v11; // rsi unsigned __int8 **v12; // r14 unsigned __int8 *v13; // r13 unsigned __int8 *v14; // r12 int v15; // eax _QWORD *v16; // rcx const minja::Value *v17; // r12 std::runtime_error *exception; // r14 void *v20; // r14 void *v21; // r14 void *v22; // r14 void *v23; // r14 void *v24; // r14 _BYTE v25[16]; // [rsp+0h] [rbp-78h] BYREF _BYTE v26[16]; // [rsp+20h] [rbp-58h] BYREF minja::Value *v27; // [rsp+40h] [rbp-38h] v6 = this; v7 = (_QWORD *)*((_QWORD *)a2 + 2); if ( v7 ) { v8 = v7[1]; if ( *v7 == v8 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "pop from empty list"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v9 = *(_BYTE *)(a3 + 64); if ( *(_QWORD *)(a3 + 32) || *(_QWORD *)(a3 + 16) || v9 || *(_QWORD *)(a3 + 48) ) { if ( (unsigned __int8)(v9 - 5) >= 2u ) { v24 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v25, a3, 0xFFFFFFFF, 0); std::operator+<char>((long long)v26, (long long)"pop index must be an integer: ", (long long)v25); std::runtime_error::runtime_error(v24, v26); __cxa_throw( v24, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v15 = minja::Value::get<int>((_QWORD *)a3); if ( v15 < 0 || (v16 = (_QWORD *)*((_QWORD *)a2 + 2), v15 >= (int)(-858993459 * ((v16[1] - *v16) >> 4))) ) { v20 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v25, a3, 0xFFFFFFFF, 0); std::operator+<char>((long long)v26, (long long)"pop index out of range: ", (long long)v25); std::runtime_error::runtime_error(v20, v26); __cxa_throw( v20, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v17 = (const minja::Value *)(80LL * (unsigned int)v15 + *v16); minja::Value::Value(this, v17); std::vector<minja::Value>::_M_erase(*((_QWORD *)a2 + 2), v17); } else { minja::Value::Value(this, (const minja::Value *)(v8 - 80)); v10 = *((_QWORD *)a2 + 2); v11 = *(_QWORD *)(v10 + 8) - 80LL; *(_QWORD *)(v10 + 8) = v11; __gnu_cxx::new_allocator<minja::Value>::destroy<minja::Value>(v10, v11); } } else { v12 = (unsigned __int8 **)*((_QWORD *)a2 + 4); if ( !v12 ) { v21 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v25, (long long)a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v26, (long long)"Value is not an array or object: ", (long long)v25); std::runtime_error::runtime_error(v21, v26); __cxa_throw( v21, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v27 = this; if ( *(_QWORD *)(a3 + 16) || *(_QWORD *)(a3 + 32) || *(_QWORD *)(a3 + 48) ) { v22 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v25, a3, 0xFFFFFFFF, 0); std::operator+<char>((long long)v26, (long long)"Unashable type: ", (long long)v25); std::runtime_error::runtime_error(v22, v26); __cxa_throw( v22, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v13 = *v12; v14 = v12[1]; if ( *v12 != v14 ) { while ( !(unsigned __int8)nlohmann::json_abi_v3_11_3::operator==(v13, (unsigned __int8 *)(a3 + 64), a4) ) { v13 += 96; v14 = v12[1]; if ( v13 == v14 ) goto LABEL_21; } v14 = v13; } LABEL_21: if ( v14 == *(unsigned __int8 **)(*((_QWORD *)a2 + 4) + 8LL) ) { v23 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v25, a3, 0xFFFFFFFF, 0); std::operator+<char>((long long)v26, (long long)"Key not found: ", (long long)v25); std::runtime_error::runtime_error(v23, v26); __cxa_throw( v23, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v6 = v27; minja::Value::Value(v27, (const minja::Value *)(v14 + 16)); nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::erase( *((_QWORD *)a2 + 4), v14, v14 + 96); } return v6; }
pop: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RBX,RDX MOV R15,RSI MOV R13,RDI MOV RAX,qword ptr [RSI + 0x10] TEST RAX,RAX JZ 0x001939df MOV RSI,qword ptr [RAX + 0x8] CMP qword ptr [RAX],RSI JZ 0x00193aea CMP qword ptr [RBX + 0x20],0x0 MOV AL,byte ptr [RBX + 0x40] JNZ 0x00193a44 CMP qword ptr [RBX + 0x10],0x0 JNZ 0x00193a44 TEST AL,AL JNZ 0x00193a44 CMP qword ptr [RBX + 0x30],0x0 JNZ 0x00193a44 ADD RSI,-0x50 MOV RDI,R13 CALL 0x0018e64c MOV RDI,qword ptr [R15 + 0x10] MOV RSI,qword ptr [RDI + 0x8] ADD RSI,-0x50 MOV qword ptr [RDI + 0x8],RSI CALL 0x0018cb24 JMP 0x00193ad8 LAB_001939df: MOV R14,qword ptr [R15 + 0x20] TEST R14,R14 JZ 0x00193b7c MOV qword ptr [RSP + 0x40],R13 CMP qword ptr [RBX + 0x10],0x0 JNZ 0x00193bdc CMP qword ptr [RBX + 0x20],0x0 JNZ 0x00193bdc CMP qword ptr [RBX + 0x30],0x0 JNZ 0x00193bdc MOV R13,qword ptr [R14] MOV R12,qword ptr [R14 + 0x8] CMP R13,R12 JZ 0x00193aa7 LEA RBP,[RBX + 0x40] LAB_00193a26: MOV RDI,R13 MOV RSI,RBP CALL 0x0018df71 TEST AL,AL JNZ 0x00193aa4 ADD R13,0x60 MOV R12,qword ptr [R14 + 0x8] CMP R13,R12 JNZ 0x00193a26 JMP 0x00193aa7 LAB_00193a44: ADD AL,0xfb CMP AL,0x2 JNC 0x00193c99 MOV RDI,RBX CALL 0x00191598 TEST EAX,EAX JS 0x00193b1c MOV RCX,qword ptr [R15 + 0x10] MOV R12,qword ptr [RCX] MOV RCX,qword ptr [RCX + 0x8] SUB RCX,R12 SHR RCX,0x4 IMUL ECX,ECX,-0x33333333 CMP EAX,ECX JGE 0x00193b1c MOV EAX,EAX LEA RAX,[RAX + RAX*0x4] SHL RAX,0x4 ADD R12,RAX MOV RDI,R13 MOV RSI,R12 CALL 0x0018e64c MOV RDI,qword ptr [R15 + 0x10] LAB_00193a9a: MOV RSI,R12 CALL 0x00194fba LAB_00193aa2: JMP 0x00193ad8 LAB_00193aa4: MOV R12,R13 LAB_00193aa7: MOV RAX,qword ptr [R15 + 0x20] CMP R12,qword ptr [RAX + 0x8] JZ 0x00193c3c LEA RSI,[R12 + 0x10] MOV R13,qword ptr [RSP + 0x40] MOV RDI,R13 CALL 0x0018e64c MOV RDI,qword ptr [R15 + 0x20] LEA RDX,[R12 + 0x60] LAB_00193ad0: MOV RSI,R12 CALL 0x00195032 LAB_00193ad8: MOV RAX,R13 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00193aea: MOV EDI,0x10 CALL 0x0011b440 MOV R14,RAX LAB_00193af7: LEA RSI,[0x1f45e2] MOV RDI,RAX CALL 0x0011b320 LAB_00193b06: MOV RSI,qword ptr [0x0022ffe8] MOV RDX,qword ptr [0x0022ff50] MOV RDI,R14 CALL 0x0011bf00 LAB_00193b1c: MOV EDI,0x10 CALL 0x0011b440 MOV R14,RAX LAB_00193b29: MOV RDI,RSP MOV RSI,RBX MOV EDX,0xffffffff XOR ECX,ECX CALL 0x00187128 LAB_00193b3b: LEA RSI,[0x1f4615] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x00178f1b MOV BPL,0x1 LAB_00193b52: LEA RSI,[RSP + 0x20] MOV RDI,R14 CALL 0x0011be10 XOR EBP,EBP MOV RSI,qword ptr [0x0022ffe8] MOV RDX,qword ptr [0x0022ff50] MOV RDI,R14 CALL 0x0011bf00 LAB_00193b7c: MOV EDI,0x10 CALL 0x0011b440 MOV R14,RAX LAB_00193b89: MOV RDI,RSP MOV RSI,R15 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x00187128 LAB_00193b9b: LEA RSI,[0x1f42da] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x00178f1b MOV BPL,0x1 LAB_00193bb2: LEA RSI,[RSP + 0x20] MOV RDI,R14 CALL 0x0011be10 XOR EBP,EBP MOV RSI,qword ptr [0x0022ffe8] MOV RDX,qword ptr [0x0022ff50] MOV RDI,R14 CALL 0x0011bf00 LAB_00193bdc: MOV EDI,0x10 CALL 0x0011b440 MOV R14,RAX LAB_00193be9: MOV RDI,RSP MOV RSI,RBX MOV EDX,0xffffffff XOR ECX,ECX CALL 0x00187128 LAB_00193bfb: LEA RSI,[0x1f418e] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x00178f1b MOV BPL,0x1 LAB_00193c12: LEA RSI,[RSP + 0x20] MOV RDI,R14 CALL 0x0011be10 XOR EBP,EBP MOV RSI,qword ptr [0x0022ffe8] MOV RDX,qword ptr [0x0022ff50] MOV RDI,R14 CALL 0x0011bf00 LAB_00193c3c: MOV EDI,0x10 CALL 0x0011b440 MOV R14,RAX LAB_00193c49: MOV RDI,RSP MOV RSI,RBX MOV EDX,0xffffffff XOR ECX,ECX CALL 0x00187128 LAB_00193c5b: LEA RSI,[0x1f462e] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x00178f1b MOV BPL,0x1 LAB_00193c72: LEA RSI,[RSP + 0x20] MOV RDI,R14 CALL 0x0011be10 XOR EBP,EBP MOV RSI,qword ptr [0x0022ffe8] MOV RDX,qword ptr [0x0022ff50] MOV RDI,R14 CALL 0x0011bf00 LAB_00193c99: MOV EDI,0x10 CALL 0x0011b440 MOV R14,RAX LAB_00193ca6: MOV RDI,RSP MOV RSI,RBX MOV EDX,0xffffffff XOR ECX,ECX CALL 0x00187128 LAB_00193cb8: LEA RSI,[0x1f45f6] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x00178f1b MOV BPL,0x1 LAB_00193ccf: LEA RSI,[RSP + 0x20] MOV RDI,R14 CALL 0x0011be10 XOR EBP,EBP MOV RSI,qword ptr [0x0022ffe8] MOV RDX,qword ptr [0x0022ff50] MOV RDI,R14 CALL 0x0011bf00
/* minja::Value::pop(minja::Value const&) */ Value * minja::Value::pop(Value *param_1) { long *plVar1; new_allocator<minja::Value> *this; long lVar2; char cVar3; uint uVar4; runtime_error *prVar5; int iVar6; Value *in_RDX; bool bVar7; long in_RSI; int iVar8; Value *pVVar9; basic_json *pbVar10; basic_json *pbVar11; int1 auStack_78 [32]; string local_58 [32]; Value *local_38; plVar1 = *(long **)(in_RSI + 0x10); bVar7 = SUB81(in_RDX,0); iVar8 = (int)auStack_78; if (plVar1 == (long *)0x0) { plVar1 = *(long **)(in_RSI + 0x20); if (plVar1 == (long *)0x0) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00193b89 to 00193b9a has its CatchHandler @ 00193d4d */ dump_abi_cxx11_(iVar8,SUB81(in_RSI,0)); /* try { // try from 00193b9b to 00193bae has its CatchHandler @ 00193d02 */ std::operator+((char *)local_58,(string *)"Value is not an array or object: "); /* try { // try from 00193bb2 to 00193bd6 has its CatchHandler @ 00193d00 */ std::runtime_error::runtime_error(prVar5,local_58); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_0022ffe8,PTR__runtime_error_0022ff50); } local_38 = param_1; if (((*(long *)(in_RDX + 0x10) != 0) || (*(long *)(in_RDX + 0x20) != 0)) || (*(long *)(in_RDX + 0x30) != 0)) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00193be9 to 00193bfa has its CatchHandler @ 00193d4b */ dump_abi_cxx11_(iVar8,bVar7); /* try { // try from 00193bfb to 00193c0e has its CatchHandler @ 00193cfe */ std::operator+((char *)local_58,(string *)"Unashable type: "); /* try { // try from 00193c12 to 00193c36 has its CatchHandler @ 00193cfc */ std::runtime_error::runtime_error(prVar5,local_58); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_0022ffe8,PTR__runtime_error_0022ff50); } pbVar10 = (basic_json *)plVar1[1]; if ((basic_json *)*plVar1 != pbVar10) { pbVar11 = (basic_json *)*plVar1; do { pbVar10 = pbVar11; cVar3 = nlohmann::json_abi_v3_11_3::operator==(pbVar10,(basic_json *)(in_RDX + 0x40)); if (cVar3 != '\0') break; pbVar11 = pbVar10 + 0x60; pbVar10 = (basic_json *)plVar1[1]; } while (pbVar11 != pbVar10); } param_1 = local_38; if (pbVar10 == *(basic_json **)(*(long *)(in_RSI + 0x20) + 8)) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00193c49 to 00193c5a has its CatchHandler @ 00193d49 */ dump_abi_cxx11_(iVar8,bVar7); /* try { // try from 00193c5b to 00193c6e has its CatchHandler @ 00193cfa */ std::operator+((char *)local_58,(string *)"Key not found: "); /* try { // try from 00193c72 to 00193c96 has its CatchHandler @ 00193cf8 */ std::runtime_error::runtime_error(prVar5,local_58); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_0022ffe8,PTR__runtime_error_0022ff50); } Value(local_38,(Value *)(pbVar10 + 0x10)); /* try { // try from 00193ad0 to 00193ad7 has its CatchHandler @ 00193d6b */ nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::erase(*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> **)(in_RSI + 0x20),pbVar10,pbVar10 + 0x60); } else { if (*plVar1 == plVar1[1]) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00193af7 to 00193b05 has its CatchHandler @ 00193d5e */ std::runtime_error::runtime_error(prVar5,"pop from empty list"); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_0022ffe8,PTR__runtime_error_0022ff50); } if (((*(long *)(in_RDX + 0x20) == 0) && (*(long *)(in_RDX + 0x10) == 0)) && ((in_RDX[0x40] == (Value)0x0 && (*(long *)(in_RDX + 0x30) == 0)))) { Value(param_1,(Value *)(plVar1[1] + -0x50)); this = *(new_allocator<minja::Value> **)(in_RSI + 0x10); lVar2 = *(long *)(this + 8); *(Value **)(this + 8) = (Value *)(lVar2 + -0x50); __gnu_cxx::new_allocator<minja::Value>::destroy<minja::Value>(this,(Value *)(lVar2 + -0x50)); } else { if (1 < (byte)((char)in_RDX[0x40] - 5U)) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00193ca6 to 00193cb7 has its CatchHandler @ 00193d47 */ dump_abi_cxx11_(iVar8,bVar7); /* try { // try from 00193cb8 to 00193ccb has its CatchHandler @ 00193cf6 */ std::operator+((char *)local_58,(string *)"pop index must be an integer: "); /* try { // try from 00193ccf to 00193cf3 has its CatchHandler @ 00193cf4 */ std::runtime_error::runtime_error(prVar5,local_58); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_0022ffe8,PTR__runtime_error_0022ff50); } uVar4 = get<int>(in_RDX); if (((int)uVar4 < 0) || (lVar2 = **(long **)(in_RSI + 0x10), iVar6 = (int)((ulong)((*(long **)(in_RSI + 0x10))[1] - lVar2) >> 4), SBORROW4(uVar4,iVar6 * -0x33333333) == (int)(uVar4 + iVar6 * 0x33333333) < 0)) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00193b29 to 00193b3a has its CatchHandler @ 00193d51 */ dump_abi_cxx11_(iVar8,bVar7); /* try { // try from 00193b3b to 00193b4e has its CatchHandler @ 00193d24 */ std::operator+((char *)local_58,(string *)"pop index out of range: "); /* try { // try from 00193b52 to 00193b76 has its CatchHandler @ 00193d04 */ std::runtime_error::runtime_error(prVar5,local_58); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_0022ffe8,PTR__runtime_error_0022ff50); } pVVar9 = (Value *)(lVar2 + (ulong)uVar4 * 0x50); Value(param_1,pVVar9); /* try { // try from 00193a9a to 00193aa1 has its CatchHandler @ 00193d4f */ std::vector<minja::Value,std::allocator<minja::Value>>::_M_erase (*(vector<minja::Value,std::allocator<minja::Value>> **)(in_RSI + 0x10),pVVar9); } } return param_1; }
13,206
minja::Value::pop(minja::Value const&)
monkey531[P]llama/common/minja.hpp
Value pop(const Value& index) { if (is_array()) { if (array_->empty()) throw std::runtime_error("pop from empty list"); if (index.is_null()) { auto ret = array_->back(); array_->pop_back(); return ret; } else if (!index.is_number_integer()) { throw std::runtime_error("pop index must be an integer: " + index.dump()); } else { auto i = index.get<int>(); if (i < 0 || i >= static_cast<int>(array_->size())) throw std::runtime_error("pop index out of range: " + index.dump()); auto it = array_->begin() + (i < 0 ? array_->size() + i : i); auto ret = *it; array_->erase(it); return ret; } } else if (is_object()) { if (!index.is_hashable()) throw std::runtime_error("Unashable type: " + index.dump()); auto it = object_->find(index.primitive_); if (it == object_->end()) throw std::runtime_error("Key not found: " + index.dump()); auto ret = it->second; object_->erase(it); return ret; } else { throw std::runtime_error("Value is not an array or object: " + dump()); } }
O2
cpp
minja::Value::pop(minja::Value const&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r14 movq 0x10(%rsi), %rax testq %rax, %rax je 0x6d84d movq (%rax), %rcx cmpq 0x8(%rax), %rcx je 0x6d908 movq %rbx, %rdi callq 0x64182 testb %al, %al je 0x6d8a3 movq 0x10(%r15), %rax movq 0x8(%rax), %rsi addq $-0x50, %rsi movq %r14, %rdi callq 0x69380 movq 0x10(%r15), %rdi callq 0x6e8a2 jmp 0x6d8f8 cmpq $0x0, 0x20(%r15) je 0x6d994 movq %rbx, %rdi callq 0x63b88 testb %al, %al je 0x6d9f0 movq 0x20(%r15), %rdi leaq 0x40(%rbx), %rsi callq 0x6be48 movq %rax, %r12 movq 0x20(%r15), %rax cmpq 0x8(%rax), %r12 je 0x6da4c movq %r12, %rsi addq $0x10, %rsi movq %r14, %rdi callq 0x69380 movq 0x20(%r15), %rdi movq %r12, %rsi callq 0x6e8bc jmp 0x6d8f8 movb 0x40(%rbx), %al addb $-0x5, %al cmpb $0x2, %al jae 0x6daa5 movq %rbx, %rdi callq 0x6bd92 testl %eax, %eax js 0x6d938 movl %eax, %ecx movq 0x10(%r15), %rax movq (%rax), %r12 movq 0x8(%rax), %rax subq %r12, %rax pushq $0x50 popq %rsi cqto idivq %rsi cmpl %eax, %ecx jge 0x6d938 movl %ecx, %eax imulq $0x50, %rax, %rax addq %rax, %r12 movq %r14, %rdi movq %r12, %rsi callq 0x69380 movq 0x10(%r15), %rdi movq %r12, %rsi callq 0x6e8b6 movq %r14, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x24460 movq %rax, %r14 leaq 0x48ca8(%rip), %rsi # 0xb65c2 movq %rax, %rdi callq 0x24320 movq 0x936c7(%rip), %rsi # 0x100ff0 movq 0x93620(%rip), %rdx # 0x100f50 movq %r14, %rdi callq 0x24ef0 pushq $0x10 popq %rdi callq 0x24460 movq %rax, %r14 movq %rsp, %rdi pushq $-0x1 popq %rdx movq %rbx, %rsi xorl %ecx, %ecx callq 0x63b98 leaq 0x48c9b(%rip), %rsi # 0xb65f5 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x592be movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %r14, %rdi callq 0x24e20 xorl %ebp, %ebp movq 0x93670(%rip), %rsi # 0x100ff0 movq 0x935c9(%rip), %rdx # 0x100f50 movq %r14, %rdi callq 0x24ef0 jmp 0x6dafc pushq $0x10 popq %rdi callq 0x24460 movq %rax, %r14 movq %rsp, %rdi pushq $-0x1 popq %rdx movq %r15, %rsi xorl %ecx, %ecx callq 0x63b98 leaq 0x48904(%rip), %rsi # 0xb62ba leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x592be movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %r14, %rdi callq 0x24e20 xorl %ebp, %ebp movq 0x93614(%rip), %rsi # 0x100ff0 movq 0x9356d(%rip), %rdx # 0x100f50 movq %r14, %rdi callq 0x24ef0 jmp 0x6dafc pushq $0x10 popq %rdi callq 0x24460 movq %rax, %r14 movq %rsp, %rdi pushq $-0x1 popq %rdx movq %rbx, %rsi xorl %ecx, %ecx callq 0x63b98 leaq 0x4875c(%rip), %rsi # 0xb616e leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x592be movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %r14, %rdi callq 0x24e20 xorl %ebp, %ebp movq 0x935b8(%rip), %rsi # 0x100ff0 movq 0x93511(%rip), %rdx # 0x100f50 movq %r14, %rdi callq 0x24ef0 jmp 0x6dafc pushq $0x10 popq %rdi callq 0x24460 movq %rax, %r14 movq %rsp, %rdi pushq $-0x1 popq %rdx movq %rbx, %rsi xorl %ecx, %ecx callq 0x63b98 leaq 0x48ba0(%rip), %rsi # 0xb660e leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x592be movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %r14, %rdi callq 0x24e20 xorl %ebp, %ebp movq 0x9355c(%rip), %rsi # 0x100ff0 movq 0x934b5(%rip), %rdx # 0x100f50 movq %r14, %rdi callq 0x24ef0 jmp 0x6dafc pushq $0x10 popq %rdi callq 0x24460 movq %rax, %r14 movq %rsp, %rdi pushq $-0x1 popq %rdx movq %rbx, %rsi xorl %ecx, %ecx callq 0x63b98 leaq 0x48b0f(%rip), %rsi # 0xb65d6 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x592be movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %r14, %rdi callq 0x24e20 xorl %ebp, %ebp movq 0x93503(%rip), %rsi # 0x100ff0 movq 0x9345c(%rip), %rdx # 0x100f50 movq %r14, %rdi callq 0x24ef0 jmp 0x6db0c jmp 0x6db1b jmp 0x6db0c jmp 0x6db1b jmp 0x6db0c jmp 0x6db1b jmp 0x6db0c jmp 0x6db1b movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x251d8 jmp 0x6db21 movq %rax, %rbx movb $0x1, %bpl movq %rsp, %rdi callq 0x251d8 testb %bpl, %bpl jne 0x6db3f jmp 0x6db54 jmp 0x6db3c jmp 0x6db3c jmp 0x6db3c jmp 0x6db3c jmp 0x6db49 jmp 0x6db3c movq %rax, %rbx movq %r14, %rdi callq 0x24680 jmp 0x6db54 movq %rax, %rbx movq %r14, %rdi callq 0x639aa movq %rbx, %rdi callq 0x24f80
_ZN5minja5Value3popERKS0_: push rbp push r15 push r14 push r12 push rbx sub rsp, 40h mov rbx, rdx mov r15, rsi mov r14, rdi mov rax, [rsi+10h] test rax, rax jz short loc_6D84D mov rcx, [rax] cmp rcx, [rax+8] jz loc_6D908 mov rdi, rbx; this call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void) test al, al jz short loc_6D8A3 mov rax, [r15+10h] mov rsi, [rax+8] add rsi, 0FFFFFFFFFFFFFFB0h; minja::Value * mov rdi, r14; this call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) mov rdi, [r15+10h] call _ZNSt6vectorIN5minja5ValueESaIS1_EE8pop_backEv; std::vector<minja::Value>::pop_back(void) jmp loc_6D8F8 loc_6D84D: cmp qword ptr [r15+20h], 0 jz loc_6D994 mov rdi, rbx; this call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void) test al, al jz loc_6D9F0 mov rdi, [r15+20h] lea rsi, [rbx+40h] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE4findERSJ_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::find(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov r12, rax mov rax, [r15+20h] cmp r12, [rax+8] jz loc_6DA4C mov rsi, r12 add rsi, 10h; minja::Value * mov rdi, r14; this call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) mov rdi, [r15+20h] mov rsi, r12 call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEE; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>) jmp short loc_6D8F8 loc_6D8A3: mov al, [rbx+40h] add al, 0FBh cmp al, 2 jnb loc_6DAA5 mov rdi, rbx call _ZNK5minja5Value3getIiEET_v; minja::Value::get<int>(void) test eax, eax js short loc_6D938 mov ecx, eax mov rax, [r15+10h] mov r12, [rax] mov rax, [rax+8] sub rax, r12 push 50h ; 'P' pop rsi cqo idiv rsi cmp ecx, eax jge short loc_6D938 mov eax, ecx imul rax, 50h ; 'P' add r12, rax mov rdi, r14; this mov rsi, r12; minja::Value * call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) mov rdi, [r15+10h] mov rsi, r12 call _ZNSt6vectorIN5minja5ValueESaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EE; std::vector<minja::Value>::erase(__gnu_cxx::__normal_iterator<minja::Value const*,std::vector<minja::Value>>) loc_6D8F8: mov rax, r14 add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_6D908: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aPopFromEmptyLi; "pop from empty list" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_6D938: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax mov rdi, rsp push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, rbx xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aPopIndexOutOfR; "pop index out of range: " lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_48] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp loc_6DAFC loc_6D994: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax mov rdi, rsp push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r15 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aValueIsNotAnAr_0; "Value is not an array or object: " lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_48] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp loc_6DAFC loc_6D9F0: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax mov rdi, rsp push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, rbx xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUnashableType; "Unashable type: " lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_48] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp loc_6DAFC loc_6DA4C: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax mov rdi, rsp push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, rbx xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aKeyNotFound_0; "Key not found: " lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_48] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_6DAFC loc_6DAA5: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax mov rdi, rsp push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, rbx xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aPopIndexMustBe; "pop index must be an integer: " lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_48] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_6DAFC: jmp short loc_6DB0C jmp short loc_6DB1B jmp short loc_6DB0C jmp short loc_6DB1B jmp short loc_6DB0C jmp short loc_6DB1B jmp short loc_6DB0C jmp short loc_6DB1B loc_6DB0C: mov rbx, rax lea rdi, [rsp+68h+var_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6DB21 loc_6DB1B: mov rbx, rax mov bpl, 1 loc_6DB21: mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_6DB3F jmp short loc_6DB54 jmp short loc_6DB3C jmp short loc_6DB3C jmp short loc_6DB3C jmp short loc_6DB3C jmp short loc_6DB49 jmp short $+2 loc_6DB3C: mov rbx, rax loc_6DB3F: mov rdi, r14; void * call ___cxa_free_exception jmp short loc_6DB54 loc_6DB49: mov rbx, rax mov rdi, r14; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_6DB54: mov rdi, rbx call __Unwind_Resume
minja::Value * minja::Value::pop(minja::Value *this, const minja::Value *a2, unsigned __int8 *a3, __m128d a4) { _QWORD *v5; // rax unsigned __int8 *v6; // r12 int v7; // eax int v8; // ecx _QWORD *v9; // rax const minja::Value *v10; // r12 std::runtime_error *exception; // r14 void *v13; // r14 void *v14; // r14 void *v15; // r14 void *v16; // r14 void *v17; // r14 _BYTE v18[32]; // [rsp+0h] [rbp-68h] BYREF _BYTE v19[72]; // [rsp+20h] [rbp-48h] BYREF v5 = (_QWORD *)*((_QWORD *)a2 + 2); if ( v5 ) { if ( *v5 == v5[1] ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "pop from empty list"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( minja::Value::is_null((minja::Value *)a3) ) { minja::Value::Value(this, (const minja::Value *)(*(_QWORD *)(*((_QWORD *)a2 + 2) + 8LL) - 80LL)); std::vector<minja::Value>::pop_back(*((_QWORD *)a2 + 2)); } else { if ( (unsigned __int8)(a3[64] - 5) >= 2u ) { v17 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v18, (long long)a3, 0xFFFFFFFF, 0); std::operator+<char>((long long)v19, (long long)"pop index must be an integer: ", (long long)v18); std::runtime_error::runtime_error(v17, v19); __cxa_throw( v17, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v7 = minja::Value::get<int>((minja::Value *)a3); if ( v7 < 0 || (v8 = v7, v9 = (_QWORD *)*((_QWORD *)a2 + 2), v8 >= (int)((v9[1] - *v9) / 80LL)) ) { v13 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v18, (long long)a3, 0xFFFFFFFF, 0); std::operator+<char>((long long)v19, (long long)"pop index out of range: ", (long long)v18); std::runtime_error::runtime_error(v13, v19); __cxa_throw( v13, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v10 = (const minja::Value *)(80LL * (unsigned int)v8 + *v9); minja::Value::Value(this, v10); std::vector<minja::Value>::erase(*((_QWORD *)a2 + 2), v10); } } else { if ( !*((_QWORD *)a2 + 4) ) { v14 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v18, (long long)a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v19, (long long)"Value is not an array or object: ", (long long)v18); std::runtime_error::runtime_error(v14, v19); __cxa_throw( v14, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( !minja::Value::is_primitive((minja::Value *)a3) ) { v15 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v18, (long long)a3, 0xFFFFFFFF, 0); std::operator+<char>((long long)v19, (long long)"Unashable type: ", (long long)v18); std::runtime_error::runtime_error(v15, v19); __cxa_throw( v15, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v6 = nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::find( *((unsigned __int8 ***)a2 + 4), a3 + 64, a4); if ( v6 == *(unsigned __int8 **)(*((_QWORD *)a2 + 4) + 8LL) ) { v16 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v18, (long long)a3, 0xFFFFFFFF, 0); std::operator+<char>((long long)v19, (long long)"Key not found: ", (long long)v18); std::runtime_error::runtime_error(v16, v19); __cxa_throw( v16, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Value::Value(this, (const minja::Value *)(v6 + 16)); nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::erase( *((_QWORD *)a2 + 4), v6); } return this; }
pop: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV RBX,RDX MOV R15,RSI MOV R14,RDI MOV RAX,qword ptr [RSI + 0x10] TEST RAX,RAX JZ 0x0016d84d MOV RCX,qword ptr [RAX] CMP RCX,qword ptr [RAX + 0x8] JZ 0x0016d908 MOV RDI,RBX CALL 0x00164182 TEST AL,AL JZ 0x0016d8a3 MOV RAX,qword ptr [R15 + 0x10] MOV RSI,qword ptr [RAX + 0x8] ADD RSI,-0x50 MOV RDI,R14 CALL 0x00169380 MOV RDI,qword ptr [R15 + 0x10] CALL 0x0016e8a2 JMP 0x0016d8f8 LAB_0016d84d: CMP qword ptr [R15 + 0x20],0x0 JZ 0x0016d994 MOV RDI,RBX CALL 0x00163b88 TEST AL,AL JZ 0x0016d9f0 MOV RDI,qword ptr [R15 + 0x20] LEA RSI,[RBX + 0x40] CALL 0x0016be48 MOV R12,RAX MOV RAX,qword ptr [R15 + 0x20] CMP R12,qword ptr [RAX + 0x8] JZ 0x0016da4c MOV RSI,R12 ADD RSI,0x10 MOV RDI,R14 CALL 0x00169380 MOV RDI,qword ptr [R15 + 0x20] LAB_0016d899: MOV RSI,R12 CALL 0x0016e8bc LAB_0016d8a1: JMP 0x0016d8f8 LAB_0016d8a3: MOV AL,byte ptr [RBX + 0x40] ADD AL,0xfb CMP AL,0x2 JNC 0x0016daa5 MOV RDI,RBX CALL 0x0016bd92 TEST EAX,EAX JS 0x0016d938 MOV ECX,EAX MOV RAX,qword ptr [R15 + 0x10] MOV R12,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x8] SUB RAX,R12 PUSH 0x50 POP RSI CQO IDIV RSI CMP ECX,EAX JGE 0x0016d938 MOV EAX,ECX IMUL RAX,RAX,0x50 ADD R12,RAX MOV RDI,R14 MOV RSI,R12 CALL 0x00169380 MOV RDI,qword ptr [R15 + 0x10] LAB_0016d8f0: MOV RSI,R12 CALL 0x0016e8b6 LAB_0016d8f8: MOV RAX,R14 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0016d908: PUSH 0x10 POP RDI CALL 0x00124460 MOV R14,RAX LAB_0016d913: LEA RSI,[0x1b65c2] MOV RDI,RAX CALL 0x00124320 LAB_0016d922: MOV RSI,qword ptr [0x00200ff0] MOV RDX,qword ptr [0x00200f50] MOV RDI,R14 CALL 0x00124ef0 LAB_0016d938: PUSH 0x10 POP RDI CALL 0x00124460 MOV R14,RAX LAB_0016d943: MOV RDI,RSP PUSH -0x1 POP RDX MOV RSI,RBX XOR ECX,ECX CALL 0x00163b98 LAB_0016d953: LEA RSI,[0x1b65f5] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x001592be MOV BPL,0x1 LAB_0016d96a: LEA RSI,[RSP + 0x20] MOV RDI,R14 CALL 0x00124e20 XOR EBP,EBP MOV RSI,qword ptr [0x00200ff0] MOV RDX,qword ptr [0x00200f50] MOV RDI,R14 CALL 0x00124ef0 LAB_0016d994: PUSH 0x10 POP RDI CALL 0x00124460 MOV R14,RAX LAB_0016d99f: MOV RDI,RSP PUSH -0x1 POP RDX MOV RSI,R15 XOR ECX,ECX CALL 0x00163b98 LAB_0016d9af: LEA RSI,[0x1b62ba] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x001592be MOV BPL,0x1 LAB_0016d9c6: LEA RSI,[RSP + 0x20] MOV RDI,R14 CALL 0x00124e20 XOR EBP,EBP MOV RSI,qword ptr [0x00200ff0] MOV RDX,qword ptr [0x00200f50] MOV RDI,R14 CALL 0x00124ef0 LAB_0016d9f0: PUSH 0x10 POP RDI CALL 0x00124460 MOV R14,RAX LAB_0016d9fb: MOV RDI,RSP PUSH -0x1 POP RDX MOV RSI,RBX XOR ECX,ECX CALL 0x00163b98 LAB_0016da0b: LEA RSI,[0x1b616e] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x001592be MOV BPL,0x1 LAB_0016da22: LEA RSI,[RSP + 0x20] MOV RDI,R14 CALL 0x00124e20 XOR EBP,EBP MOV RSI,qword ptr [0x00200ff0] MOV RDX,qword ptr [0x00200f50] MOV RDI,R14 CALL 0x00124ef0 LAB_0016da4c: PUSH 0x10 POP RDI CALL 0x00124460 MOV R14,RAX LAB_0016da57: MOV RDI,RSP PUSH -0x1 POP RDX MOV RSI,RBX XOR ECX,ECX CALL 0x00163b98 LAB_0016da67: LEA RSI,[0x1b660e] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x001592be MOV BPL,0x1 LAB_0016da7e: LEA RSI,[RSP + 0x20] MOV RDI,R14 CALL 0x00124e20 XOR EBP,EBP MOV RSI,qword ptr [0x00200ff0] MOV RDX,qword ptr [0x00200f50] MOV RDI,R14 CALL 0x00124ef0 LAB_0016daa5: PUSH 0x10 POP RDI CALL 0x00124460 MOV R14,RAX LAB_0016dab0: MOV RDI,RSP PUSH -0x1 POP RDX MOV RSI,RBX XOR ECX,ECX CALL 0x00163b98 LAB_0016dac0: LEA RSI,[0x1b65d6] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x001592be MOV BPL,0x1 LAB_0016dad7: LEA RSI,[RSP + 0x20] MOV RDI,R14 CALL 0x00124e20 XOR EBP,EBP MOV RSI,qword ptr [0x00200ff0] MOV RDX,qword ptr [0x00200f50] MOV RDI,R14 CALL 0x00124ef0
/* minja::Value::pop(minja::Value const&) */ Value * minja::Value::pop(Value *param_1) { long *plVar1; char cVar2; uint uVar3; long lVar4; runtime_error *prVar5; Value *in_RDX; bool bVar6; long in_RSI; int iVar7; Value *pVVar8; int1 auStack_68 [32]; string local_48 [32]; plVar1 = *(long **)(in_RSI + 0x10); bVar6 = SUB81(in_RDX,0); iVar7 = (int)auStack_68; if (plVar1 == (long *)0x0) { if (*(long *)(in_RSI + 0x20) == 0) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016d99f to 0016d9ae has its CatchHandler @ 0016db36 */ dump_abi_cxx11_(iVar7,SUB81(in_RSI,0)); /* try { // try from 0016d9af to 0016d9c2 has its CatchHandler @ 0016db0a */ std::operator+((char *)local_48,(string *)"Value is not an array or object: "); /* try { // try from 0016d9c6 to 0016d9ea has its CatchHandler @ 0016db08 */ std::runtime_error::runtime_error(prVar5,local_48); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_00200ff0,PTR__runtime_error_00200f50); } cVar2 = is_primitive(in_RDX); if (cVar2 == '\0') { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016d9fb to 0016da0a has its CatchHandler @ 0016db34 */ dump_abi_cxx11_(iVar7,bVar6); /* try { // try from 0016da0b to 0016da1e has its CatchHandler @ 0016db06 */ std::operator+((char *)local_48,(string *)"Unashable type: "); /* try { // try from 0016da22 to 0016da46 has its CatchHandler @ 0016db04 */ std::runtime_error::runtime_error(prVar5,local_48); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_00200ff0,PTR__runtime_error_00200f50); } lVar4 = nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::find(*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> **)(in_RSI + 0x20),in_RDX + 0x40); if (lVar4 == *(long *)(*(long *)(in_RSI + 0x20) + 8)) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016da57 to 0016da66 has its CatchHandler @ 0016db32 */ dump_abi_cxx11_(iVar7,bVar6); /* try { // try from 0016da67 to 0016da7a has its CatchHandler @ 0016db02 */ std::operator+((char *)local_48,(string *)"Key not found: "); /* try { // try from 0016da7e to 0016daa2 has its CatchHandler @ 0016db00 */ std::runtime_error::runtime_error(prVar5,local_48); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_00200ff0,PTR__runtime_error_00200f50); } Value(param_1,(Value *)(lVar4 + 0x10)); /* try { // try from 0016d899 to 0016d8a0 has its CatchHandler @ 0016db49 */ nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::erase(*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> **)(in_RSI + 0x20),lVar4); } else { if (*plVar1 == plVar1[1]) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016d913 to 0016d921 has its CatchHandler @ 0016db3c */ std::runtime_error::runtime_error(prVar5,"pop from empty list"); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_00200ff0,PTR__runtime_error_00200f50); } cVar2 = is_null(in_RDX); if (cVar2 == '\0') { if (1 < (byte)((char)in_RDX[0x40] - 5U)) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016dab0 to 0016dabf has its CatchHandler @ 0016db30 */ dump_abi_cxx11_(iVar7,bVar6); /* try { // try from 0016dac0 to 0016dad3 has its CatchHandler @ 0016dafe */ std::operator+((char *)local_48,(string *)"pop index must be an integer: "); /* try { // try from 0016dad7 to 0016dafb has its CatchHandler @ 0016dafc */ std::runtime_error::runtime_error(prVar5,local_48); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_00200ff0,PTR__runtime_error_00200f50); } uVar3 = get<int>(in_RDX); if ((-1 < (int)uVar3) && (lVar4 = **(long **)(in_RSI + 0x10), (int)uVar3 < (int)(((*(long **)(in_RSI + 0x10))[1] - lVar4) / 0x50))) { pVVar8 = (Value *)(lVar4 + (ulong)uVar3 * 0x50); Value(param_1,pVVar8); /* try { // try from 0016d8f0 to 0016d8f7 has its CatchHandler @ 0016db38 */ std::vector<minja::Value,std::allocator<minja::Value>>::erase (*(vector<minja::Value,std::allocator<minja::Value>> **)(in_RSI + 0x10),pVVar8); return param_1; } prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016d943 to 0016d952 has its CatchHandler @ 0016db3a */ dump_abi_cxx11_(iVar7,bVar6); /* try { // try from 0016d953 to 0016d966 has its CatchHandler @ 0016db1b */ std::operator+((char *)local_48,(string *)"pop index out of range: "); /* try { // try from 0016d96a to 0016d98e has its CatchHandler @ 0016db0c */ std::runtime_error::runtime_error(prVar5,local_48); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_00200ff0,PTR__runtime_error_00200f50); } Value(param_1,(Value *)(*(long *)(*(long *)(in_RSI + 0x10) + 8) + -0x50)); std::vector<minja::Value,std::allocator<minja::Value>>::pop_back (*(vector<minja::Value,std::allocator<minja::Value>> **)(in_RSI + 0x10)); } return param_1; }
13,207
nglog::(anonymous namespace)::LogFileObject::LogSize()
ng-log[P]ng-log/src/logging.cc
uint32 LogSize() override { std::lock_guard<std::mutex> l{mutex_}; return file_length_; }
O3
cpp
nglog::(anonymous namespace)::LogFileObject::LogSize(): pushq %rbp pushq %r14 pushq %rbx movq %rdi, %r14 leaq 0x8(%rdi), %rbx movq %rbx, %rdi callq 0x7840 testl %eax, %eax jne 0x10761 movl 0xac(%r14), %ebp movq %rbx, %rdi callq 0x73e0 movl %ebp, %eax popq %rbx popq %r14 popq %rbp retq movl %eax, %edi callq 0x7350
_ZN5nglog12_GLOBAL__N_113LogFileObject7LogSizeEv: push rbp push r14 push rbx mov r14, rdi lea rbx, [rdi+8] mov rdi, rbx call _pthread_mutex_lock test eax, eax jnz short loc_10761 mov ebp, [r14+0ACh] mov rdi, rbx call _pthread_mutex_unlock mov eax, ebp pop rbx pop r14 pop rbp retn loc_10761: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int)
long long nglog::`anonymous namespace'::LogFileObject::LogSize( nglog::_anonymous_namespace_::LogFileObject *this) { int v1; // eax unsigned int v2; // ebp v1 = pthread_mutex_lock((char *)this + 8); if ( v1 ) std::__throw_system_error(v1); v2 = *((_DWORD *)this + 43); pthread_mutex_unlock((char *)this + 8); return v2; }
LogSize: PUSH RBP PUSH R14 PUSH RBX MOV R14,RDI LEA RBX,[RDI + 0x8] MOV RDI,RBX CALL 0x00107840 TEST EAX,EAX JNZ 0x00110761 MOV EBP,dword ptr [R14 + 0xac] MOV RDI,RBX CALL 0x001073e0 MOV EAX,EBP POP RBX POP R14 POP RBP RET LAB_00110761: MOV EDI,EAX CALL 0x00107350
/* nglog::(anonymous namespace)::LogFileObject::LogSize() */ int4 __thiscall nglog::(anonymous_namespace)::LogFileObject::LogSize(LogFileObject *this) { int4 uVar1; int iVar2; iVar2 = pthread_mutex_lock((pthread_mutex_t *)(this + 8)); if (iVar2 == 0) { uVar1 = *(int4 *)(this + 0xac); pthread_mutex_unlock((pthread_mutex_t *)(this + 8)); return uVar1; } /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar2); }
13,208
common_log::resume()
monkey531[P]llama/common/log.cpp
void resume() { std::lock_guard<std::mutex> lock(mtx); if (running) { return; } running = true; thrd = std::thread([this]() { while (true) { { std::unique_lock<std::mutex> lock(mtx); cv.wait(lock, [this]() { return head != tail; }); cur = entries[head]; head = (head + 1) % entries.size(); } if (cur.is_end) { break; } cur.print(); // stdout and stderr if (file) { cur.print(file); } } }); }
O1
cpp
common_log::resume(): pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx callq 0x1bcc0 testl %eax, %eax jne 0xcd29b cmpb $0x0, 0x6a(%rbx) jne 0xcd28b movb $0x1, 0x6a(%rbx) leaq 0x10(%rsp), %rsi movq %rbx, (%rsi) leaq 0x8(%rsp), %rdi callq 0xcdac6 cmpq $0x0, 0x28(%rbx) jne 0xcd2a2 movq 0x8(%rsp), %rax movq %rax, 0x28(%rbx) movq %rbx, %rdi callq 0x1b6a0 addq $0x18, %rsp popq %rbx popq %r14 retq movl %eax, %edi callq 0x1b5d0 callq 0x1b210 movq %rax, %r14 movq %rbx, %rdi callq 0x1b6a0 movq %r14, %rdi callq 0x1bf90
_ZN10common_log6resumeEv: push r14 push rbx sub rsp, 18h mov rbx, rdi call _pthread_mutex_lock test eax, eax jnz short loc_CD29B cmp byte ptr [rbx+6Ah], 0 jnz short loc_CD28B mov byte ptr [rbx+6Ah], 1 lea rsi, [rsp+28h+var_18] mov [rsi], rbx lea rdi, [rsp+28h+var_20] call _ZNSt6threadC2IZN10common_log6resumeEvEUlvE_JEvEEOT_DpOT0_ cmp qword ptr [rbx+28h], 0 jnz short loc_CD2A2 mov rax, [rsp+28h+var_20] mov [rbx+28h], rax loc_CD28B: mov rdi, rbx call _pthread_mutex_unlock add rsp, 18h pop rbx pop r14 retn loc_CD29B: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) loc_CD2A2: call __ZSt9terminatev; std::terminate(void) mov r14, rax mov rdi, rbx call _pthread_mutex_unlock mov rdi, r14 call __Unwind_Resume
long long common_log::resume(common_log *this) { int v1; // eax _QWORD v3[4]; // [rsp+8h] [rbp-20h] BYREF v1 = pthread_mutex_lock(); if ( v1 ) std::__throw_system_error(v1); if ( !*((_BYTE *)this + 106) ) { *((_BYTE *)this + 106) = 1; v3[1] = this; ZNSt6threadC2IZN10common_log6resumeEvEUlvE_JEvEEOT_DpOT0_(v3); if ( *((_QWORD *)this + 5) ) std::terminate(); *((_QWORD *)this + 5) = v3[0]; } return pthread_mutex_unlock(this); }
resume: PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RDI CALL 0x0011bcc0 TEST EAX,EAX JNZ 0x001cd29b CMP byte ptr [RBX + 0x6a],0x0 JNZ 0x001cd28b MOV byte ptr [RBX + 0x6a],0x1 LEA RSI,[RSP + 0x10] MOV qword ptr [RSI],RBX LAB_001cd271: LEA RDI,[RSP + 0x8] CALL 0x001cdac6 LAB_001cd27b: CMP qword ptr [RBX + 0x28],0x0 JNZ 0x001cd2a2 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RBX + 0x28],RAX LAB_001cd28b: MOV RDI,RBX CALL 0x0011b6a0 ADD RSP,0x18 POP RBX POP R14 RET LAB_001cd29b: MOV EDI,EAX CALL 0x0011b5d0 LAB_001cd2a2: CALL 0x0011b210
/* common_log::resume() */ void __thiscall common_log::resume(common_log *this) { int iVar1; int8 local_20; common_log *local_18; iVar1 = pthread_mutex_lock((pthread_mutex_t *)this); if (iVar1 != 0) { /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar1); } if (this[0x6a] == (common_log)0x0) { this[0x6a] = (common_log)0x1; /* try { // try from 001cd271 to 001cd27a has its CatchHandler @ 001cd2a7 */ local_18 = this; std::thread::thread<common_log::resume()::_lambda()_1_,,void> ((thread *)&local_20,(_lambda___1_ *)&local_18); if (*(long *)(this + 0x28) != 0) { /* WARNING: Subroutine does not return */ std::terminate(); } *(int8 *)(this + 0x28) = local_20; } pthread_mutex_unlock((pthread_mutex_t *)this); return; }
13,209
common_log::resume()
monkey531[P]llama/common/log.cpp
void resume() { std::lock_guard<std::mutex> lock(mtx); if (running) { return; } running = true; thrd = std::thread([this]() { while (true) { { std::unique_lock<std::mutex> lock(mtx); cv.wait(lock, [this]() { return head != tail; }); cur = entries[head]; head = (head + 1) % entries.size(); } if (cur.is_end) { break; } cur.print(); // stdout and stderr if (file) { cur.print(file); } } }); }
O3
cpp
common_log::resume(): pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx callq 0x1bcc0 testl %eax, %eax jne 0xcc751 cmpb $0x0, 0x6a(%rbx) jne 0xcc741 movb $0x1, 0x6a(%rbx) leaq 0x10(%rsp), %rsi movq %rbx, (%rsi) leaq 0x8(%rsp), %rdi callq 0xccf84 cmpq $0x0, 0x28(%rbx) jne 0xcc758 movq 0x8(%rsp), %rax movq %rax, 0x28(%rbx) movq %rbx, %rdi callq 0x1b6a0 addq $0x18, %rsp popq %rbx popq %r14 retq movl %eax, %edi callq 0x1b5d0 callq 0x1b210 movq %rax, %r14 movq %rbx, %rdi callq 0x1b6a0 movq %r14, %rdi callq 0x1bf90
_ZN10common_log6resumeEv: push r14 push rbx sub rsp, 18h mov rbx, rdi call _pthread_mutex_lock test eax, eax jnz short loc_CC751 cmp byte ptr [rbx+6Ah], 0 jnz short loc_CC741 mov byte ptr [rbx+6Ah], 1 lea rsi, [rsp+28h+var_18] mov [rsi], rbx lea rdi, [rsp+28h+var_20] call _ZNSt6threadC2IZN10common_log6resumeEvEUlvE_JEvEEOT_DpOT0_ cmp qword ptr [rbx+28h], 0 jnz short loc_CC758 mov rax, [rsp+28h+var_20] mov [rbx+28h], rax loc_CC741: mov rdi, rbx call _pthread_mutex_unlock add rsp, 18h pop rbx pop r14 retn loc_CC751: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) loc_CC758: call __ZSt9terminatev; std::terminate(void) mov r14, rax mov rdi, rbx call _pthread_mutex_unlock mov rdi, r14 call __Unwind_Resume
long long common_log::resume(common_log *this) { int v1; // eax _QWORD v3[4]; // [rsp+8h] [rbp-20h] BYREF v1 = pthread_mutex_lock(); if ( v1 ) std::__throw_system_error(v1); if ( !*((_BYTE *)this + 106) ) { *((_BYTE *)this + 106) = 1; v3[1] = this; ZNSt6threadC2IZN10common_log6resumeEvEUlvE_JEvEEOT_DpOT0_(v3); if ( *((_QWORD *)this + 5) ) std::terminate(); *((_QWORD *)this + 5) = v3[0]; } return pthread_mutex_unlock(this); }
resume: PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RDI CALL 0x0011bcc0 TEST EAX,EAX JNZ 0x001cc751 CMP byte ptr [RBX + 0x6a],0x0 JNZ 0x001cc741 MOV byte ptr [RBX + 0x6a],0x1 LEA RSI,[RSP + 0x10] MOV qword ptr [RSI],RBX LAB_001cc727: LEA RDI,[RSP + 0x8] CALL 0x001ccf84 LAB_001cc731: CMP qword ptr [RBX + 0x28],0x0 JNZ 0x001cc758 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RBX + 0x28],RAX LAB_001cc741: MOV RDI,RBX CALL 0x0011b6a0 ADD RSP,0x18 POP RBX POP R14 RET LAB_001cc751: MOV EDI,EAX CALL 0x0011b5d0 LAB_001cc758: CALL 0x0011b210
/* common_log::resume() */ void __thiscall common_log::resume(common_log *this) { int iVar1; int8 local_20; common_log *local_18; iVar1 = pthread_mutex_lock((pthread_mutex_t *)this); if (iVar1 != 0) { /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar1); } if (this[0x6a] == (common_log)0x0) { this[0x6a] = (common_log)0x1; /* try { // try from 001cc727 to 001cc730 has its CatchHandler @ 001cc75d */ local_18 = this; std::thread::thread<common_log::resume()::_lambda()_1_,,void> ((thread *)&local_20,(_lambda___1_ *)&local_18); if (*(long *)(this + 0x28) != 0) { /* WARNING: Subroutine does not return */ std::terminate(); } *(int8 *)(this + 0x28) = local_20; } pthread_mutex_unlock((pthread_mutex_t *)this); return; }
13,210
ma_get_prev_key
eloqsql/storage/maria/ma_search.c
static my_bool _ma_get_prev_key(MARIA_KEY *key, MARIA_PAGE *ma_page, uchar *keypos) { uint page_flag, nod_flag; MARIA_KEYDEF *keyinfo= key->keyinfo; DBUG_ENTER("_ma_get_prev_key"); page_flag= ma_page->flag; nod_flag= ma_page->node; if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY)) && ! (page_flag & KEYPAGE_FLAG_HAS_TRANSID)) { bmove(key->data, keypos - keyinfo->keylength - nod_flag, keyinfo->keylength); key->ref_length= keyinfo->share->rec_reflength; key->data_length= keyinfo->keylength - key->ref_length; key->flag= 0; DBUG_RETURN(0); } else { uchar *page; page= ma_page->buff + keyinfo->share->keypage_header + nod_flag; key->data[0]= 0; /* safety */ DBUG_ASSERT(page != keypos); while (page < keypos) { if (! (*keyinfo->get_key)(key, page_flag, nod_flag, &page)) { _ma_set_fatal_error_with_share(keyinfo->share, HA_ERR_CRASHED); DBUG_RETURN(1); } } } DBUG_RETURN(0); }
O3
c
ma_get_prev_key: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r9 movq %rdi, %rbx movq 0x8(%rdi), %r14 movl 0x28(%rsi), %r8d movl 0x2c(%rsi), %ecx testb $0x28, 0xa2(%r14) sete %al movl %ecx, -0x2c(%rbp) testb $0x2, %cl sete %cl andb %al, %cl cmpb $0x1, %cl jne 0x6f1e1 movq (%rbx), %rdi movzwl 0xaa(%r14), %edx subq %rdx, %r9 subq %r8, %r9 movq %r9, %rsi callq 0x29110 movq (%r14), %rax movl 0x740(%rax), %eax movl %eax, 0x14(%rbx) movzwl 0xaa(%r14), %ecx subl %eax, %ecx movl %ecx, 0x10(%rbx) movl $0x0, 0x18(%rbx) xorl %eax, %eax jmp 0x6f246 movq %r14, %r12 movq (%r14), %rax movl 0x744(%rax), %eax addq 0x10(%rsi), %rax movq %r8, %r14 addq %r8, %rax leaq -0x38(%rbp), %rcx movq %rax, (%rcx) movq %rbx, %r13 movq (%rbx), %rax movb $0x0, (%rax) movq -0x38(%rbp), %r15 cmpq %r9, %r15 jae 0x6f240 movq %r13, %rdi movl -0x2c(%rbp), %esi movl %r14d, %edx leaq -0x38(%rbp), %rcx movq %r9, %rbx callq *0xe0(%r12) movq %rbx, %r9 testl %eax, %eax jne 0x6f207 movq (%r12), %rdi movl $0x7e, %esi callq 0x3fdd6 movq %rbx, %r9 cmpq %r9, %r15 setb %al addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nopl (%rax)
_ma_get_prev_key: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r9, rdx mov rbx, rdi mov r14, [rdi+8] mov r8d, [rsi+28h] mov ecx, [rsi+2Ch] test byte ptr [r14+0A2h], 28h setz al mov [rbp+var_2C], ecx test cl, 2 setz cl and cl, al cmp cl, 1 jnz short loc_6F1E1 mov rdi, [rbx] movzx edx, word ptr [r14+0AAh] sub r9, rdx sub r9, r8 mov rsi, r9 call _memmove mov rax, [r14] mov eax, [rax+740h] mov [rbx+14h], eax movzx ecx, word ptr [r14+0AAh] sub ecx, eax mov [rbx+10h], ecx mov dword ptr [rbx+18h], 0 xor eax, eax jmp short loc_6F246 loc_6F1E1: mov r12, r14 mov rax, [r14] mov eax, [rax+744h] add rax, [rsi+10h] mov r14, r8 add rax, r8 lea rcx, [rbp+var_38] mov [rcx], rax mov r13, rbx mov rax, [rbx] mov byte ptr [rax], 0 loc_6F207: mov r15, [rbp+var_38] cmp r15, r9 jnb short loc_6F240 mov rdi, r13 mov esi, [rbp+var_2C] mov edx, r14d lea rcx, [rbp+var_38] mov rbx, r9 call qword ptr [r12+0E0h] mov r9, rbx test eax, eax jnz short loc_6F207 mov rdi, [r12] mov esi, 7Eh ; '~' call _ma_set_fatal_error_with_share mov r9, rbx loc_6F240: cmp r15, r9 setb al loc_6F246: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
bool ma_get_prev_key(long long a1, long long a2, unsigned long long a3) { unsigned long long v3; // r9 long long v4; // r14 long long v5; // r8 bool v6; // al int v7; // eax long long v9; // r12 long long v10; // rax unsigned int v11; // r14d unsigned long long v12; // r15 unsigned long long v13; // rbx int v14; // eax long long v15; // rdx long long v16; // rcx long long v17; // r8 unsigned long long v18; // [rsp+8h] [rbp-38h] BYREF unsigned int v19; // [rsp+14h] [rbp-2Ch] v3 = a3; v4 = *(_QWORD *)(a1 + 8); v5 = *(unsigned int *)(a2 + 40); v6 = (*(_BYTE *)(v4 + 162) & 0x28) == 0; v19 = *(_DWORD *)(a2 + 44); if ( v6 && (v19 & 2) == 0 ) { memmove(*(_QWORD *)a1, a3 - *(unsigned __int16 *)(v4 + 170) - v5, *(unsigned __int16 *)(v4 + 170)); v7 = *(_DWORD *)(*(_QWORD *)v4 + 1856LL); *(_DWORD *)(a1 + 20) = v7; *(_DWORD *)(a1 + 16) = *(unsigned __int16 *)(v4 + 170) - v7; *(_DWORD *)(a1 + 24) = 0; return 0; } else { v9 = v4; v10 = *(_QWORD *)(a2 + 16) + *(unsigned int *)(*(_QWORD *)v4 + 1860LL); v11 = v5; v18 = v5 + v10; **(_BYTE **)a1 = 0; while ( 1 ) { v12 = v18; if ( v18 >= v3 ) break; v13 = v3; v14 = (*(long long ( **)(long long, _QWORD, _QWORD, unsigned long long *))(v9 + 224))(a1, v19, v11, &v18); v3 = v13; if ( !v14 ) { ma_set_fatal_error_with_share(*(_QWORD *)v9, 126, v15, v16, v17, v13); v3 = v13; return v12 < v3; } } return v12 < v3; } }
_ma_get_prev_key: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R9,RDX MOV RBX,RDI MOV R14,qword ptr [RDI + 0x8] MOV R8D,dword ptr [RSI + 0x28] MOV ECX,dword ptr [RSI + 0x2c] TEST byte ptr [R14 + 0xa2],0x28 SETZ AL MOV dword ptr [RBP + -0x2c],ECX TEST CL,0x2 SETZ CL AND CL,AL CMP CL,0x1 JNZ 0x0016f1e1 MOV RDI,qword ptr [RBX] MOVZX EDX,word ptr [R14 + 0xaa] SUB R9,RDX SUB R9,R8 MOV RSI,R9 CALL 0x00129110 MOV RAX,qword ptr [R14] MOV EAX,dword ptr [RAX + 0x740] MOV dword ptr [RBX + 0x14],EAX MOVZX ECX,word ptr [R14 + 0xaa] SUB ECX,EAX MOV dword ptr [RBX + 0x10],ECX MOV dword ptr [RBX + 0x18],0x0 XOR EAX,EAX JMP 0x0016f246 LAB_0016f1e1: MOV R12,R14 MOV RAX,qword ptr [R14] MOV EAX,dword ptr [RAX + 0x744] ADD RAX,qword ptr [RSI + 0x10] MOV R14,R8 ADD RAX,R8 LEA RCX,[RBP + -0x38] MOV qword ptr [RCX],RAX MOV R13,RBX MOV RAX,qword ptr [RBX] MOV byte ptr [RAX],0x0 LAB_0016f207: MOV R15,qword ptr [RBP + -0x38] CMP R15,R9 JNC 0x0016f240 MOV RDI,R13 MOV ESI,dword ptr [RBP + -0x2c] MOV EDX,R14D LEA RCX,[RBP + -0x38] MOV RBX,R9 CALL qword ptr [R12 + 0xe0] MOV R9,RBX TEST EAX,EAX JNZ 0x0016f207 MOV RDI,qword ptr [R12] MOV ESI,0x7e CALL 0x0013fdd6 MOV R9,RBX LAB_0016f240: CMP R15,R9 SETC AL LAB_0016f246: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
bool _ma_get_prev_key(int8 *param_1,long param_2,ulong param_3) { long *plVar1; ulong uVar2; int iVar3; ulong uVar4; bool bVar5; ulong local_40; uint local_34; plVar1 = (long *)param_1[1]; uVar4 = (ulong)*(uint *)(param_2 + 0x28); local_34 = *(uint *)(param_2 + 0x2c); if ((local_34 & 2) == 0 && (*(byte *)((long)plVar1 + 0xa2) & 0x28) == 0) { memmove((void *)*param_1,(void *)((param_3 - *(ushort *)((long)plVar1 + 0xaa)) - uVar4), (ulong)*(ushort *)((long)plVar1 + 0xaa)); iVar3 = *(int *)(*plVar1 + 0x740); *(int *)((long)param_1 + 0x14) = iVar3; *(uint *)(param_1 + 2) = (uint)*(ushort *)((long)plVar1 + 0xaa) - iVar3; *(int4 *)(param_1 + 3) = 0; bVar5 = false; } else { local_40 = (ulong)*(uint *)(*plVar1 + 0x744) + *(long *)(param_2 + 0x10) + uVar4; *(int1 *)*param_1 = 0; do { uVar2 = local_40; if (param_3 <= local_40) goto LAB_0016f240; iVar3 = (*(code *)plVar1[0x1c])(param_1,local_34,uVar4,&local_40); } while (iVar3 != 0); _ma_set_fatal_error_with_share(*plVar1,0x7e); LAB_0016f240: bVar5 = uVar2 < param_3; } return bVar5; }
13,211
minja::IfTemplateToken::IfTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&)
monkey531[P]llama/common/minja.hpp
IfTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && c) : TemplateToken(Type::If, location, pre, post), condition(std::move(c)) {}
O2
cpp
minja::IfTemplateToken::IfTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&): pushq %r14 pushq %rbx pushq %rax movq %r8, %rbx movl %ecx, %r8d movl %edx, %ecx movq %rsi, %rdx movq %rdi, %r14 pushq $0x2 popq %rsi callq 0x402dc leaq 0x7d487(%rip), %rax # 0xd5b60 addq $0x10, %rax movq %rax, (%r14) andq $0x0, 0x38(%r14) movups (%rbx), %xmm0 andq $0x0, 0x8(%rbx) movups %xmm0, 0x30(%r14) andq $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN5minja15IfTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_OSt10shared_ptrINS_10ExpressionEE: push r14 push rbx push rax mov rbx, r8 mov r8d, ecx mov ecx, edx mov rdx, rsi mov r14, rdi push 2 pop rsi call _ZN5minja13TemplateTokenC2ENS0_4TypeERKNS_8LocationENS_13SpaceHandlingES5_; minja::TemplateToken::TemplateToken(minja::TemplateToken::Type,minja::Location const&,minja::SpaceHandling,minja::SpaceHandling) lea rax, _ZTVN5minja15IfTemplateTokenE; `vtable for'minja::IfTemplateToken add rax, 10h mov [r14], rax and qword ptr [r14+38h], 0 movups xmm0, xmmword ptr [rbx] and qword ptr [rbx+8], 0 movups xmmword ptr [r14+30h], xmm0 and qword ptr [rbx], 0 add rsp, 8 pop rbx pop r14 retn
long long * minja::IfTemplateToken::IfTemplateToken(long long a1, long long a2, int a3, int a4, __int128 *a5) { long long *result; // rax __int128 v7; // xmm0 minja::TemplateToken::TemplateToken(a1, 2, a2, a3, a4); result = &`vtable for'minja::IfTemplateToken + 2; *(_QWORD *)a1 = &`vtable for'minja::IfTemplateToken + 2; *(_QWORD *)(a1 + 56) = 0LL; v7 = *a5; *((_QWORD *)a5 + 1) = 0LL; *(_OWORD *)(a1 + 48) = v7; *(_QWORD *)a5 = 0LL; return result; }
IfTemplateToken: PUSH R14 PUSH RBX PUSH RAX MOV RBX,R8 MOV R8D,ECX MOV ECX,EDX MOV RDX,RSI MOV R14,RDI PUSH 0x2 POP RSI CALL 0x001402dc LEA RAX,[0x1d5b60] ADD RAX,0x10 MOV qword ptr [R14],RAX AND qword ptr [R14 + 0x38],0x0 MOVUPS XMM0,xmmword ptr [RBX] AND qword ptr [RBX + 0x8],0x0 MOVUPS xmmword ptr [R14 + 0x30],XMM0 AND qword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP R14 RET
/* minja::IfTemplateToken::IfTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&) */ void __thiscall minja::IfTemplateToken::IfTemplateToken (IfTemplateToken *this,int8 param_1,int4 param_3,int4 param_4, int8 *param_5) { int8 uVar1; TemplateToken::TemplateToken((TemplateToken *)this,2,param_1,param_3,param_4); *(int ***)this = &PTR__IfTemplateToken_001d5b70; *(int8 *)(this + 0x38) = 0; uVar1 = param_5[1]; param_5[1] = 0; *(int8 *)(this + 0x30) = *param_5; *(int8 *)(this + 0x38) = uVar1; *param_5 = 0; return; }
13,212
minja::IfTemplateToken::IfTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&)
monkey531[P]llama/common/minja.hpp
IfTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && c) : TemplateToken(Type::If, location, pre, post), condition(std::move(c)) {}
O3
cpp
minja::IfTemplateToken::IfTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&): pushq %rbx movq %rdi, %rbx leaq 0x83917(%rip), %rax # 0xe1b50 addq $0x10, %rax movq %rax, (%rdi) movq 0x38(%rdi), %rdi testq %rdi, %rdi je 0x5e24e callq 0x348da leaq 0x82f73(%rip), %rax # 0xe11c8 addq $0x10, %rax movq %rax, (%rbx) movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x5e26b popq %rbx jmp 0x348da popq %rbx retq nop
_ZN5minja15IfTemplateTokenD2Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja15IfTemplateTokenE; `vtable for'minja::IfTemplateToken add rax, 10h mov [rdi], rax mov rdi, [rdi+38h] test rdi, rdi jz short loc_5E24E call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5E24E: lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken add rax, 10h mov [rbx], rax mov rdi, [rbx+18h] test rdi, rdi jz short loc_5E26B pop rbx jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5E26B: pop rbx retn
void minja::IfTemplateToken::~IfTemplateToken(minja::IfTemplateToken *this) { volatile signed __int32 *v2; // rdi volatile signed __int32 *v3; // rdi *(_QWORD *)this = &`vtable for'minja::IfTemplateToken + 2; v2 = (volatile signed __int32 *)*((_QWORD *)this + 7); if ( v2 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2); *(_QWORD *)this = &`vtable for'minja::TemplateToken + 2; v3 = (volatile signed __int32 *)*((_QWORD *)this + 3); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); }
~IfTemplateToken: PUSH RBX MOV RBX,RDI LEA RAX,[0x1e1b50] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x38] TEST RDI,RDI JZ 0x0015e24e CALL 0x001348da LAB_0015e24e: LEA RAX,[0x1e11c8] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x18] TEST RDI,RDI JZ 0x0015e26b POP RBX JMP 0x001348da LAB_0015e26b: POP RBX RET
/* minja::IfTemplateToken::~IfTemplateToken() */ void __thiscall minja::IfTemplateToken::~IfTemplateToken(IfTemplateToken *this) { *(int ***)this = &PTR__IfTemplateToken_001e1b60; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38)); } *(int ***)this = &PTR__TemplateToken_001e11d8; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18)); return; } return; }
13,213
string_get_milliseconds
bluesky950520[P]quickjs/quickjs.c
static BOOL string_get_milliseconds(const uint8_t *sp, int *pp, int *pval) { /* parse optional fractional part as milliseconds and truncate. */ /* spec does not indicate which rounding should be used */ int mul = 100, ms = 0, c, p_start, p = *pp; c = sp[p]; if (c == '.' || c == ',') { p++; p_start = p; while ((c = sp[p]) >= '0' && c <= '9') { ms += (c - '0') * mul; mul /= 10; p++; if (p - p_start == 9) break; } if (p > p_start) { /* only consume the separator if digits are present */ *pval = ms; *pp = p; } } return TRUE; }
O1
c
string_get_milliseconds: movslq (%rsi), %rax movb (%rdi,%rax), %cl andb $-0x3, %cl cmpb $0x2c, %cl jne 0x5810a pushq %rbx leal 0x1(%rax), %ecx movslq %ecx, %r8 addl $0xa, %eax addq %r8, %rdi movl $0x64, %r10d xorl %r9d, %r9d xorl %r8d, %r8d movzbl (%rdi,%r9), %r11d leal -0x30(%r11), %ebx cmpb $0x9, %bl ja 0x580fa addl $-0x30, %r11d imull %r10d, %r11d addl %r11d, %r8d movslq %r10d, %r10 imulq $0x66666667, %r10, %r10 # imm = 0x66666667 movq %r10, %r11 shrq $0x3f, %r11 sarq $0x22, %r10 addl %r11d, %r10d incq %r9 cmpl $0x9, %r9d jne 0x580be jmp 0x58100 addl %ecx, %r9d movl %r9d, %eax cmpl %ecx, %eax jle 0x58109 movl %r8d, (%rdx) movl %eax, (%rsi) popq %rbx retq
string_get_milliseconds: movsxd rax, dword ptr [rsi] mov cl, [rdi+rax] and cl, 0FDh cmp cl, 2Ch ; ',' jnz short locret_5810A push rbx lea ecx, [rax+1] movsxd r8, ecx add eax, 0Ah add rdi, r8 mov r10d, 64h ; 'd' xor r9d, r9d xor r8d, r8d loc_580BE: movzx r11d, byte ptr [rdi+r9] lea ebx, [r11-30h] cmp bl, 9 ja short loc_580FA add r11d, 0FFFFFFD0h imul r11d, r10d add r8d, r11d movsxd r10, r10d imul r10, 66666667h mov r11, r10 shr r11, 3Fh sar r10, 22h add r10d, r11d inc r9 cmp r9d, 9 jnz short loc_580BE jmp short loc_58100 loc_580FA: add r9d, ecx mov eax, r9d loc_58100: cmp eax, ecx jle short loc_58109 mov [rdx], r8d mov [rsi], eax loc_58109: pop rbx locret_5810A: retn
long long string_get_milliseconds(long long a1, int *a2, _DWORD *a3) { long long result; // rax int v4; // ecx long long v5; // rdi int v6; // r10d long long v7; // r9 int v8; // r8d int v9; // r11d result = *a2; if ( (*(_BYTE *)(a1 + result) & 0xFD) == 0x2C ) { v4 = result + 1; result = (unsigned int)(result + 10); v5 = v4 + a1; v6 = 100; v7 = 0LL; v8 = 0; while ( 1 ) { v9 = *(unsigned __int8 *)(v5 + v7); if ( (unsigned __int8)(v9 - 48) > 9u ) break; v8 += v6 * (v9 - 48); v6 /= 10; if ( (_DWORD)++v7 == 9 ) goto LABEL_7; } result = (unsigned int)(v4 + v7); LABEL_7: if ( (int)result > v4 ) { *a3 = v8; *a2 = result; } } return result; }
13,214
string_get_milliseconds
bluesky950520[P]quickjs/quickjs.c
static BOOL string_get_milliseconds(const uint8_t *sp, int *pp, int *pval) { /* parse optional fractional part as milliseconds and truncate. */ /* spec does not indicate which rounding should be used */ int mul = 100, ms = 0, c, p_start, p = *pp; c = sp[p]; if (c == '.' || c == ',') { p++; p_start = p; while ((c = sp[p]) >= '0' && c <= '9') { ms += (c - '0') * mul; mul /= 10; p++; if (p - p_start == 9) break; } if (p > p_start) { /* only consume the separator if digits are present */ *pval = ms; *pp = p; } } return TRUE; }
O2
c
string_get_milliseconds: movslq (%rsi), %r8 movb (%rdi,%r8), %al andb $-0x3, %al cmpb $0x2c, %al jne 0x4b4e0 pushq %rbp pushq %rbx movq %rdx, %rcx leal 0x1(%r8), %r9d movslq %r9d, %rax addl $0xa, %r8d addq %rax, %rdi movl $0x64, %eax xorl %r11d, %r11d movl $0xa, %ebx xorl %r10d, %r10d movzbl (%rdi,%r11), %edx leal -0x30(%rdx), %ebp cmpb $0x9, %bpl ja 0x4b4cd addl $-0x30, %edx imull %eax, %edx addl %edx, %r10d cltd idivl %ebx incq %r11 cmpl $0x9, %r11d jne 0x4b4a8 jmp 0x4b4d3 addl %r9d, %r11d movl %r11d, %r8d cmpl %r9d, %r8d jle 0x4b4de movl %r10d, (%rcx) movl %r8d, (%rsi) popq %rbx popq %rbp retq
string_get_milliseconds: movsxd r8, dword ptr [rsi] mov al, [rdi+r8] and al, 0FDh cmp al, 2Ch ; ',' jnz short locret_4B4E0 push rbp push rbx mov rcx, rdx lea r9d, [r8+1] movsxd rax, r9d add r8d, 0Ah add rdi, rax mov eax, 64h ; 'd' xor r11d, r11d mov ebx, 0Ah xor r10d, r10d loc_4B4A8: movzx edx, byte ptr [rdi+r11] lea ebp, [rdx-30h] cmp bpl, 9 ja short loc_4B4CD add edx, 0FFFFFFD0h imul edx, eax add r10d, edx cdq idiv ebx inc r11 cmp r11d, 9 jnz short loc_4B4A8 jmp short loc_4B4D3 loc_4B4CD: add r11d, r9d mov r8d, r11d loc_4B4D3: cmp r8d, r9d jle short loc_4B4DE mov [rcx], r10d mov [rsi], r8d loc_4B4DE: pop rbx pop rbp locret_4B4E0: retn
char string_get_milliseconds(long long a1, int *a2, _DWORD *a3) { long long v3; // r8 int v4; // eax int v6; // r9d int v7; // r8d long long v8; // rdi long long v9; // r11 int v10; // r10d int v11; // edx v3 = *a2; LOBYTE(v4) = *(_BYTE *)(a1 + v3) & 0xFD; if ( (_BYTE)v4 == 44 ) { v6 = v3 + 1; v7 = v3 + 10; v8 = v6 + a1; v4 = 100; v9 = 0LL; v10 = 0; while ( 1 ) { v11 = *(unsigned __int8 *)(v8 + v9); if ( (unsigned __int8)(v11 - 48) > 9u ) break; v10 += v4 * (v11 - 48); v4 /= 10; if ( (_DWORD)++v9 == 9 ) goto LABEL_7; } v7 = v6 + v9; LABEL_7: if ( v7 > v6 ) { *a3 = v10; *a2 = v7; } } return v4; }
string_get_milliseconds: MOVSXD R8,dword ptr [RSI] MOV AL,byte ptr [RDI + R8*0x1] AND AL,0xfd CMP AL,0x2c JNZ 0x0014b4e0 PUSH RBP PUSH RBX MOV RCX,RDX LEA R9D,[R8 + 0x1] MOVSXD RAX,R9D ADD R8D,0xa ADD RDI,RAX MOV EAX,0x64 XOR R11D,R11D MOV EBX,0xa XOR R10D,R10D LAB_0014b4a8: MOVZX EDX,byte ptr [RDI + R11*0x1] LEA EBP,[RDX + -0x30] CMP BPL,0x9 JA 0x0014b4cd ADD EDX,-0x30 IMUL EDX,EAX ADD R10D,EDX CDQ IDIV EBX INC R11 CMP R11D,0x9 JNZ 0x0014b4a8 JMP 0x0014b4d3 LAB_0014b4cd: ADD R11D,R9D MOV R8D,R11D LAB_0014b4d3: CMP R8D,R9D JLE 0x0014b4de MOV dword ptr [RCX],R10D MOV dword ptr [RSI],R8D LAB_0014b4de: POP RBX POP RBP LAB_0014b4e0: RET
void string_get_milliseconds(long param_1,int *param_2,int *param_3) { byte bVar1; int iVar2; int iVar3; int iVar4; int iVar5; long lVar6; iVar3 = *param_2; if ((*(byte *)(param_1 + iVar3) & 0xfd) == 0x2c) { iVar4 = iVar3 + 1; iVar3 = iVar3 + 10; iVar2 = 100; lVar6 = 0; iVar5 = 0; do { bVar1 = *(byte *)(param_1 + iVar4 + lVar6); if (9 < (byte)(bVar1 - 0x30)) { iVar3 = (int)lVar6 + iVar4; break; } iVar5 = iVar5 + (bVar1 - 0x30) * iVar2; iVar2 = iVar2 / 10; lVar6 = lVar6 + 1; } while ((int)lVar6 != 9); if (iVar4 < iVar3) { *param_3 = iVar5; *param_2 = iVar3; } } return; }
13,215
stbi__parse_huffman_block(stbi__zbuf*)
mnn-tts/MNN/3rd_party/imageHelper/stb_image.h
static int stbi__parse_huffman_block(stbi__zbuf *a) { char *zout = a->zout; for(;;) { int z = stbi__zhuffman_decode(a, &a->z_length); if (z < 256) { if (z < 0) return stbi__err("bad huffman code","Corrupt PNG"); // error in huffman codes if (zout >= a->zout_end) { if (!stbi__zexpand(a, zout, 1)) return 0; zout = a->zout; } *zout++ = (char) z; } else { stbi_uc *p; int len,dist; if (z == 256) { a->zout = zout; return 1; } z -= 257; len = stbi__zlength_base[z]; if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]); z = stbi__zhuffman_decode(a, &a->z_distance); if (z < 0) return stbi__err("bad huffman code","Corrupt PNG"); dist = stbi__zdist_base[z]; if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]); if (zout - a->zout_start < dist) return stbi__err("bad dist","Corrupt PNG"); if (zout + len > a->zout_end) { if (!stbi__zexpand(a, zout, len)) return 0; zout = a->zout; } p = (stbi_uc *) (zout - dist); if (dist == 1) { // run of one byte; common in images. stbi_uc v = *p; if (len) { do *zout++ = v; while (--len); } } else { if (len) { do *zout++ = *p++; while (--len); } } } } }
O0
c
stbi__parse_huffman_block(stbi__zbuf*): subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq 0x28(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x20(%rsp) movq 0x28(%rsp), %rdi movq 0x28(%rsp), %rsi addq $0x34, %rsi callq 0x1da80 movl %eax, 0x1c(%rsp) cmpl $0x100, 0x1c(%rsp) # imm = 0x100 jge 0x1d5a6 cmpl $0x0, 0x1c(%rsp) jge 0x1d544 leaq 0x6fb3(%rip), %rdi # 0x244e9 callq 0x2630 movl %eax, 0x34(%rsp) jmp 0x1d7bc movq 0x20(%rsp), %rax movq 0x28(%rsp), %rcx cmpq 0x28(%rcx), %rax jb 0x1d588 movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rsi movl $0x1, %edx callq 0x1d890 cmpl $0x0, %eax jne 0x1d57a movl $0x0, 0x34(%rsp) jmp 0x1d7bc movq 0x28(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x20(%rsp) movl 0x1c(%rsp), %eax movb %al, %cl movq 0x20(%rsp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x20(%rsp) movb %cl, (%rax) jmp 0x1d7b7 cmpl $0x100, 0x1c(%rsp) # imm = 0x100 jne 0x1d5cb movq 0x20(%rsp), %rcx movq 0x28(%rsp), %rax movq %rcx, 0x18(%rax) movl $0x1, 0x34(%rsp) jmp 0x1d7bc movl 0x1c(%rsp), %eax subl $0x101, %eax # imm = 0x101 movl %eax, 0x1c(%rsp) movslq 0x1c(%rsp), %rcx leaq 0x7c0c(%rip), %rax # 0x251f0 movl (%rax,%rcx,4), %eax movl %eax, 0xc(%rsp) movslq 0x1c(%rsp), %rcx leaq 0x7c79(%rip), %rax # 0x25270 cmpl $0x0, (%rax,%rcx,4) je 0x1d61e movq 0x28(%rsp), %rdi movslq 0x1c(%rsp), %rcx leaq 0x7c62(%rip), %rax # 0x25270 movl (%rax,%rcx,4), %esi callq 0x1cbb0 addl 0xc(%rsp), %eax movl %eax, 0xc(%rsp) movq 0x28(%rsp), %rdi movq 0x28(%rsp), %rsi addq $0x818, %rsi # imm = 0x818 callq 0x1da80 movl %eax, 0x1c(%rsp) cmpl $0x0, 0x1c(%rsp) jge 0x1d654 leaq 0x6ea3(%rip), %rdi # 0x244e9 callq 0x2630 movl %eax, 0x34(%rsp) jmp 0x1d7bc movslq 0x1c(%rsp), %rcx leaq 0x7c90(%rip), %rax # 0x252f0 movl (%rax,%rcx,4), %eax movl %eax, 0x8(%rsp) movslq 0x1c(%rsp), %rcx leaq 0x7cfd(%rip), %rax # 0x25370 cmpl $0x0, (%rax,%rcx,4) je 0x1d69a movq 0x28(%rsp), %rdi movslq 0x1c(%rsp), %rcx leaq 0x7ce6(%rip), %rax # 0x25370 movl (%rax,%rcx,4), %esi callq 0x1cbb0 addl 0x8(%rsp), %eax movl %eax, 0x8(%rsp) movq 0x20(%rsp), %rax movq 0x28(%rsp), %rcx movq 0x20(%rcx), %rcx subq %rcx, %rax movslq 0x8(%rsp), %rcx cmpq %rcx, %rax jge 0x1d6ca leaq 0x7783(%rip), %rdi # 0x24e3f callq 0x2630 movl %eax, 0x34(%rsp) jmp 0x1d7bc movq 0x20(%rsp), %rax movslq 0xc(%rsp), %rcx addq %rcx, %rax movq 0x28(%rsp), %rcx cmpq 0x28(%rcx), %rax jbe 0x1d715 movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rsi movl 0xc(%rsp), %edx callq 0x1d890 cmpl $0x0, %eax jne 0x1d707 movl $0x0, 0x34(%rsp) jmp 0x1d7bc movq 0x28(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax movslq 0x8(%rsp), %rdx xorl %ecx, %ecx subq %rdx, %rcx addq %rcx, %rax movq %rax, 0x10(%rsp) cmpl $0x1, 0x8(%rsp) jne 0x1d772 movq 0x10(%rsp), %rax movb (%rax), %al movb %al, 0x7(%rsp) cmpl $0x0, 0xc(%rsp) je 0x1d770 jmp 0x1d747 movb 0x7(%rsp), %cl movq 0x20(%rsp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x20(%rsp) movb %cl, (%rax) movl 0xc(%rsp), %eax addl $-0x1, %eax movl %eax, 0xc(%rsp) cmpl $0x0, %eax jne 0x1d747 jmp 0x1d770 jmp 0x1d7b5 cmpl $0x0, 0xc(%rsp) je 0x1d7b3 jmp 0x1d77b movq 0x10(%rsp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x10(%rsp) movb (%rax), %cl movq 0x20(%rsp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x20(%rsp) movb %cl, (%rax) movl 0xc(%rsp), %eax addl $-0x1, %eax movl %eax, 0xc(%rsp) cmpl $0x0, %eax jne 0x1d77b jmp 0x1d7b3 jmp 0x1d7b5 jmp 0x1d7b7 jmp 0x1d507 movl 0x34(%rsp), %eax addq $0x38, %rsp retq nopw %cs:(%rax,%rax) nop
_ZL25stbi__parse_huffman_blockP10stbi__zbuf: sub rsp, 38h mov [rsp+38h+var_10], rdi mov rax, [rsp+38h+var_10] mov rax, [rax+18h] mov [rsp+38h+var_18], rax loc_1D507: mov rdi, [rsp+38h+var_10] mov rsi, [rsp+38h+var_10] add rsi, 34h ; '4' call _ZL21stbi__zhuffman_decodeP10stbi__zbufP14stbi__zhuffman; stbi__zhuffman_decode(stbi__zbuf *,stbi__zhuffman *) mov [rsp+38h+var_1C], eax cmp [rsp+38h+var_1C], 100h jge short loc_1D5A6 cmp [rsp+38h+var_1C], 0 jge short loc_1D544 lea rdi, aBadHuffmanCode; "bad huffman code" call _ZL9stbi__errPKc; stbi__err(char const*) mov [rsp+38h+var_4], eax jmp loc_1D7BC loc_1D544: mov rax, [rsp+38h+var_18] mov rcx, [rsp+38h+var_10] cmp rax, [rcx+28h] jb short loc_1D588 mov rdi, [rsp+38h+var_10] mov rsi, [rsp+38h+var_18] mov edx, 1 call _ZL13stbi__zexpandP10stbi__zbufPci; stbi__zexpand(stbi__zbuf *,char *,int) cmp eax, 0 jnz short loc_1D57A mov [rsp+38h+var_4], 0 jmp loc_1D7BC loc_1D57A: mov rax, [rsp+38h+var_10] mov rax, [rax+18h] mov [rsp+38h+var_18], rax loc_1D588: mov eax, [rsp+38h+var_1C] mov cl, al mov rax, [rsp+38h+var_18] mov rdx, rax add rdx, 1 mov [rsp+38h+var_18], rdx mov [rax], cl jmp loc_1D7B7 loc_1D5A6: cmp [rsp+38h+var_1C], 100h jnz short loc_1D5CB mov rcx, [rsp+38h+var_18] mov rax, [rsp+38h+var_10] mov [rax+18h], rcx mov [rsp+38h+var_4], 1 jmp loc_1D7BC loc_1D5CB: mov eax, [rsp+38h+var_1C] sub eax, 101h mov [rsp+38h+var_1C], eax movsxd rcx, [rsp+38h+var_1C] lea rax, _ZL18stbi__zlength_base; stbi__zlength_base mov eax, [rax+rcx*4] mov [rsp+38h+var_2C], eax movsxd rcx, [rsp+38h+var_1C] lea rax, _ZL19stbi__zlength_extra; stbi__zlength_extra cmp dword ptr [rax+rcx*4], 0 jz short loc_1D61E mov rdi, [rsp+38h+var_10] movsxd rcx, [rsp+38h+var_1C] lea rax, _ZL19stbi__zlength_extra; stbi__zlength_extra mov esi, [rax+rcx*4] call _ZL14stbi__zreceiveP10stbi__zbufi; stbi__zreceive(stbi__zbuf *,int) add eax, [rsp+38h+var_2C] mov [rsp+38h+var_2C], eax loc_1D61E: mov rdi, [rsp+38h+var_10] mov rsi, [rsp+38h+var_10] add rsi, 818h call _ZL21stbi__zhuffman_decodeP10stbi__zbufP14stbi__zhuffman; stbi__zhuffman_decode(stbi__zbuf *,stbi__zhuffman *) mov [rsp+38h+var_1C], eax cmp [rsp+38h+var_1C], 0 jge short loc_1D654 lea rdi, aBadHuffmanCode; "bad huffman code" call _ZL9stbi__errPKc; stbi__err(char const*) mov [rsp+38h+var_4], eax jmp loc_1D7BC loc_1D654: movsxd rcx, [rsp+38h+var_1C] lea rax, _ZL16stbi__zdist_base; stbi__zdist_base mov eax, [rax+rcx*4] mov [rsp+38h+var_30], eax movsxd rcx, [rsp+38h+var_1C] lea rax, _ZL17stbi__zdist_extra; stbi__zdist_extra cmp dword ptr [rax+rcx*4], 0 jz short loc_1D69A mov rdi, [rsp+38h+var_10] movsxd rcx, [rsp+38h+var_1C] lea rax, _ZL17stbi__zdist_extra; stbi__zdist_extra mov esi, [rax+rcx*4] call _ZL14stbi__zreceiveP10stbi__zbufi; stbi__zreceive(stbi__zbuf *,int) add eax, [rsp+38h+var_30] mov [rsp+38h+var_30], eax loc_1D69A: mov rax, [rsp+38h+var_18] mov rcx, [rsp+38h+var_10] mov rcx, [rcx+20h] sub rax, rcx movsxd rcx, [rsp+38h+var_30] cmp rax, rcx jge short loc_1D6CA lea rdi, aBadDist; "bad dist" call _ZL9stbi__errPKc; stbi__err(char const*) mov [rsp+38h+var_4], eax jmp loc_1D7BC loc_1D6CA: mov rax, [rsp+38h+var_18] movsxd rcx, [rsp+38h+var_2C] add rax, rcx mov rcx, [rsp+38h+var_10] cmp rax, [rcx+28h] jbe short loc_1D715 mov rdi, [rsp+38h+var_10] mov rsi, [rsp+38h+var_18] mov edx, [rsp+38h+var_2C] call _ZL13stbi__zexpandP10stbi__zbufPci; stbi__zexpand(stbi__zbuf *,char *,int) cmp eax, 0 jnz short loc_1D707 mov [rsp+38h+var_4], 0 jmp loc_1D7BC loc_1D707: mov rax, [rsp+38h+var_10] mov rax, [rax+18h] mov [rsp+38h+var_18], rax loc_1D715: mov rax, [rsp+38h+var_18] movsxd rdx, [rsp+38h+var_30] xor ecx, ecx sub rcx, rdx add rax, rcx mov [rsp+38h+var_28], rax cmp [rsp+38h+var_30], 1 jnz short loc_1D772 mov rax, [rsp+38h+var_28] mov al, [rax] mov [rsp+38h+var_31], al cmp [rsp+38h+var_2C], 0 jz short loc_1D770 jmp short $+2 loc_1D747: mov cl, [rsp+38h+var_31] mov rax, [rsp+38h+var_18] mov rdx, rax add rdx, 1 mov [rsp+38h+var_18], rdx mov [rax], cl mov eax, [rsp+38h+var_2C] add eax, 0FFFFFFFFh mov [rsp+38h+var_2C], eax cmp eax, 0 jnz short loc_1D747 jmp short $+2 loc_1D770: jmp short loc_1D7B5 loc_1D772: cmp [rsp+38h+var_2C], 0 jz short loc_1D7B3 jmp short $+2 loc_1D77B: mov rax, [rsp+38h+var_28] mov rcx, rax add rcx, 1 mov [rsp+38h+var_28], rcx mov cl, [rax] mov rax, [rsp+38h+var_18] mov rdx, rax add rdx, 1 mov [rsp+38h+var_18], rdx mov [rax], cl mov eax, [rsp+38h+var_2C] add eax, 0FFFFFFFFh mov [rsp+38h+var_2C], eax cmp eax, 0 jnz short loc_1D77B jmp short $+2 loc_1D7B3: jmp short $+2 loc_1D7B5: jmp short $+2 loc_1D7B7: jmp loc_1D507 loc_1D7BC: mov eax, [rsp+38h+var_4] add rsp, 38h retn
long long stbi__parse_huffman_block(_QWORD *a1) { _BYTE *v1; // rax _BYTE *v2; // rax char *v3; // rax char v4; // cl _BYTE *v5; // rax char i; // [rsp+7h] [rbp-31h] int v8; // [rsp+8h] [rbp-30h] unsigned int v9; // [rsp+Ch] [rbp-2Ch] char *v10; // [rsp+10h] [rbp-28h] int v11; // [rsp+1Ch] [rbp-1Ch] int v12; // [rsp+1Ch] [rbp-1Ch] int v13; // [rsp+1Ch] [rbp-1Ch] _BYTE *v14; // [rsp+20h] [rbp-18h] v14 = (_BYTE *)a1[3]; while ( 1 ) { while ( 1 ) { v11 = stbi__zhuffman_decode(a1, (char *)a1 + 52); if ( v11 >= 256 ) break; if ( v11 < 0 ) return (unsigned int)stbi__err("bad huffman code"); if ( (unsigned long long)v14 >= a1[5] ) { if ( !(unsigned int)stbi__zexpand(a1, v14, 1LL) ) return 0; v14 = (_BYTE *)a1[3]; } v1 = v14++; *v1 = v11; } if ( v11 == 256 ) { a1[3] = v14; return 1; } v12 = v11 - 257; v9 = stbi__zlength_base[v12]; if ( stbi__zlength_extra[v12] ) v9 += stbi__zreceive((long long)a1, stbi__zlength_extra[v12]); v13 = stbi__zhuffman_decode(a1, a1 + 259); if ( v13 < 0 ) return (unsigned int)stbi__err("bad huffman code"); v8 = stbi__zdist_base[v13]; if ( stbi__zdist_extra[v13] ) v8 += stbi__zreceive((long long)a1, stbi__zdist_extra[v13]); if ( (long long)&v14[-a1[4]] < v8 ) return (unsigned int)stbi__err("bad dist"); if ( (unsigned long long)&v14[v9] > a1[5] ) break; LABEL_23: v10 = &v14[-v8]; if ( v8 == 1 ) { for ( i = *v10; v9; --v9 ) { v2 = v14++; *v2 = i; } } else { for ( ; v9; --v9 ) { v3 = v10++; v4 = *v3; v5 = v14++; *v5 = v4; } } } if ( (unsigned int)stbi__zexpand(a1, v14, v9) ) { v14 = (_BYTE *)a1[3]; goto LABEL_23; } return 0; }
stbi__parse_huffman_block: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x20],RAX LAB_0011d507: MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x28] ADD RSI,0x34 CALL 0x0011da80 MOV dword ptr [RSP + 0x1c],EAX CMP dword ptr [RSP + 0x1c],0x100 JGE 0x0011d5a6 CMP dword ptr [RSP + 0x1c],0x0 JGE 0x0011d544 LEA RDI,[0x1244e9] CALL 0x00102630 MOV dword ptr [RSP + 0x34],EAX JMP 0x0011d7bc LAB_0011d544: MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x28] CMP RAX,qword ptr [RCX + 0x28] JC 0x0011d588 MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x20] MOV EDX,0x1 CALL 0x0011d890 CMP EAX,0x0 JNZ 0x0011d57a MOV dword ptr [RSP + 0x34],0x0 JMP 0x0011d7bc LAB_0011d57a: MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x20],RAX LAB_0011d588: MOV EAX,dword ptr [RSP + 0x1c] MOV CL,AL MOV RAX,qword ptr [RSP + 0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RSP + 0x20],RDX MOV byte ptr [RAX],CL JMP 0x0011d7b7 LAB_0011d5a6: CMP dword ptr [RSP + 0x1c],0x100 JNZ 0x0011d5cb MOV RCX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x18],RCX MOV dword ptr [RSP + 0x34],0x1 JMP 0x0011d7bc LAB_0011d5cb: MOV EAX,dword ptr [RSP + 0x1c] SUB EAX,0x101 MOV dword ptr [RSP + 0x1c],EAX MOVSXD RCX,dword ptr [RSP + 0x1c] LEA RAX,[0x1251f0] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0xc],EAX MOVSXD RCX,dword ptr [RSP + 0x1c] LEA RAX,[0x125270] CMP dword ptr [RAX + RCX*0x4],0x0 JZ 0x0011d61e MOV RDI,qword ptr [RSP + 0x28] MOVSXD RCX,dword ptr [RSP + 0x1c] LEA RAX,[0x125270] MOV ESI,dword ptr [RAX + RCX*0x4] CALL 0x0011cbb0 ADD EAX,dword ptr [RSP + 0xc] MOV dword ptr [RSP + 0xc],EAX LAB_0011d61e: MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x28] ADD RSI,0x818 CALL 0x0011da80 MOV dword ptr [RSP + 0x1c],EAX CMP dword ptr [RSP + 0x1c],0x0 JGE 0x0011d654 LEA RDI,[0x1244e9] CALL 0x00102630 MOV dword ptr [RSP + 0x34],EAX JMP 0x0011d7bc LAB_0011d654: MOVSXD RCX,dword ptr [RSP + 0x1c] LEA RAX,[0x1252f0] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x8],EAX MOVSXD RCX,dword ptr [RSP + 0x1c] LEA RAX,[0x125370] CMP dword ptr [RAX + RCX*0x4],0x0 JZ 0x0011d69a MOV RDI,qword ptr [RSP + 0x28] MOVSXD RCX,dword ptr [RSP + 0x1c] LEA RAX,[0x125370] MOV ESI,dword ptr [RAX + RCX*0x4] CALL 0x0011cbb0 ADD EAX,dword ptr [RSP + 0x8] MOV dword ptr [RSP + 0x8],EAX LAB_0011d69a: MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RCX + 0x20] SUB RAX,RCX MOVSXD RCX,dword ptr [RSP + 0x8] CMP RAX,RCX JGE 0x0011d6ca LEA RDI,[0x124e3f] CALL 0x00102630 MOV dword ptr [RSP + 0x34],EAX JMP 0x0011d7bc LAB_0011d6ca: MOV RAX,qword ptr [RSP + 0x20] MOVSXD RCX,dword ptr [RSP + 0xc] ADD RAX,RCX MOV RCX,qword ptr [RSP + 0x28] CMP RAX,qword ptr [RCX + 0x28] JBE 0x0011d715 MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x20] MOV EDX,dword ptr [RSP + 0xc] CALL 0x0011d890 CMP EAX,0x0 JNZ 0x0011d707 MOV dword ptr [RSP + 0x34],0x0 JMP 0x0011d7bc LAB_0011d707: MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x20],RAX LAB_0011d715: MOV RAX,qword ptr [RSP + 0x20] MOVSXD RDX,dword ptr [RSP + 0x8] XOR ECX,ECX SUB RCX,RDX ADD RAX,RCX MOV qword ptr [RSP + 0x10],RAX CMP dword ptr [RSP + 0x8],0x1 JNZ 0x0011d772 MOV RAX,qword ptr [RSP + 0x10] MOV AL,byte ptr [RAX] MOV byte ptr [RSP + 0x7],AL CMP dword ptr [RSP + 0xc],0x0 JZ 0x0011d770 JMP 0x0011d747 LAB_0011d747: MOV CL,byte ptr [RSP + 0x7] MOV RAX,qword ptr [RSP + 0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RSP + 0x20],RDX MOV byte ptr [RAX],CL MOV EAX,dword ptr [RSP + 0xc] ADD EAX,-0x1 MOV dword ptr [RSP + 0xc],EAX CMP EAX,0x0 JNZ 0x0011d747 JMP 0x0011d770 LAB_0011d770: JMP 0x0011d7b5 LAB_0011d772: CMP dword ptr [RSP + 0xc],0x0 JZ 0x0011d7b3 JMP 0x0011d77b LAB_0011d77b: MOV RAX,qword ptr [RSP + 0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RSP + 0x10],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RSP + 0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RSP + 0x20],RDX MOV byte ptr [RAX],CL MOV EAX,dword ptr [RSP + 0xc] ADD EAX,-0x1 MOV dword ptr [RSP + 0xc],EAX CMP EAX,0x0 JNZ 0x0011d77b JMP 0x0011d7b3 LAB_0011d7b3: JMP 0x0011d7b5 LAB_0011d7b5: JMP 0x0011d7b7 LAB_0011d7b7: JMP 0x0011d507 LAB_0011d7bc: MOV EAX,dword ptr [RSP + 0x34] ADD RSP,0x38 RET
/* stbi__parse_huffman_block(stbi__zbuf*) */ int4 stbi__parse_huffman_block(stbi__zbuf *param_1) { char cVar1; int iVar2; int4 uVar3; int iVar4; char *pcVar5; int local_30; int local_2c; char *local_18; local_18 = *(char **)(param_1 + 0x18); while( true ) { while (iVar2 = stbi__zhuffman_decode(param_1,(stbi__zhuffman *)(param_1 + 0x34)), iVar2 < 0x100) { if (iVar2 < 0) { uVar3 = stbi__err("bad huffman code"); return uVar3; } if (*(char **)(param_1 + 0x28) <= local_18) { iVar4 = stbi__zexpand(param_1,local_18,1); if (iVar4 == 0) { return 0; } local_18 = *(char **)(param_1 + 0x18); } *local_18 = (char)iVar2; local_18 = local_18 + 1; } if (iVar2 == 0x100) { *(char **)(param_1 + 0x18) = local_18; return 1; } iVar2 = iVar2 + -0x101; local_2c = *(int *)(stbi__zlength_base + (long)iVar2 * 4); if (*(int *)(stbi__zlength_extra + (long)iVar2 * 4) != 0) { iVar2 = stbi__zreceive(param_1,*(int *)(stbi__zlength_extra + (long)iVar2 * 4)); local_2c = iVar2 + local_2c; } iVar2 = stbi__zhuffman_decode(param_1,(stbi__zhuffman *)(param_1 + 0x818)); if (iVar2 < 0) break; local_30 = *(int *)(stbi__zdist_base + (long)iVar2 * 4); if (*(int *)(stbi__zdist_extra + (long)iVar2 * 4) != 0) { iVar2 = stbi__zreceive(param_1,*(int *)(stbi__zdist_extra + (long)iVar2 * 4)); local_30 = iVar2 + local_30; } if ((long)local_18 - *(long *)(param_1 + 0x20) < (long)local_30) { uVar3 = stbi__err("bad dist"); return uVar3; } if (*(char **)(param_1 + 0x28) < local_18 + local_2c) { iVar2 = stbi__zexpand(param_1,local_18,local_2c); if (iVar2 == 0) { return 0; } local_18 = *(char **)(param_1 + 0x18); } pcVar5 = local_18 + -(long)local_30; if (local_30 == 1) { cVar1 = *pcVar5; for (; local_2c != 0; local_2c = local_2c + -1) { *local_18 = cVar1; local_18 = local_18 + 1; } } else { for (; local_2c != 0; local_2c = local_2c + -1) { *local_18 = *pcVar5; pcVar5 = pcVar5 + 1; local_18 = local_18 + 1; } } } uVar3 = stbi__err("bad huffman code"); return uVar3; }
13,216
maria_page_get_lsn
eloqsql/storage/maria/ma_blockrec.c
TRANSLOG_ADDRESS maria_page_get_lsn(uchar *page, pgcache_page_no_t page_no __attribute__((unused)), uchar* data_ptr __attribute__((unused))) { #ifndef DBUG_OFF const MARIA_SHARE *share= (MARIA_SHARE*)data_ptr; DBUG_ASSERT(share->page_type == PAGECACHE_LSN_PAGE && share->now_transactional); #endif return lsn_korr(page); }
O0
c
maria_page_get_lsn: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movzbl (%rax), %eax movq -0x8(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x8(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, %eax shlq $0x20, %rax movq -0x8(%rbp), %rcx movl 0x3(%rcx), %ecx orq %rcx, %rax popq %rbp retq nopw %cs:(%rax,%rax)
maria_page_get_lsn: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] movzx eax, byte ptr [rax] mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx+1] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx+2] shl ecx, 10h or eax, ecx mov eax, eax shl rax, 20h mov rcx, [rbp+var_8] mov ecx, [rcx+3] or rax, rcx pop rbp retn
unsigned long long maria_page_get_lsn(unsigned __int16 *a1) { return *(unsigned int *)((char *)a1 + 3) | ((unsigned long long)((*((unsigned __int8 *)a1 + 2) << 16) | (unsigned int)*a1) << 32); }
maria_page_get_lsn: 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 + -0x8] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 OR EAX,ECX MOV EAX,EAX SHL RAX,0x20 MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x3] OR RAX,RCX POP RBP RET
ulong maria_page_get_lsn(int3 *param_1) { return (ulong)CONCAT34(*param_1,*(int4 *)((long)param_1 + 3)); }
13,217
find_global_var
bluesky950520[P]quickjs/quickjs.c
static JSGlobalVar *find_global_var(JSFunctionDef *fd, JSAtom name) { int i; for(i = 0; i < fd->global_var_count; i++) { JSGlobalVar *hf = &fd->global_vars[i]; if (hf->var_name == name) return hf; } return NULL; }
O2
c
find_global_var: movl 0x124(%rdi), %ecx xorl %eax, %eax testl %ecx, %ecx cmovlel %eax, %ecx shlq $0x4, %rcx pushq $-0x10 popq %rdx leaq 0x10(%rdx), %r8 cmpq %r8, %rcx je 0x549e3 movq 0x130(%rdi), %r9 cmpl %esi, 0x1c(%r9,%rdx) movq %r8, %rdx jne 0x549c3 addq %r8, %r9 movq %r9, %rax retq
find_global_var: mov ecx, [rdi+124h] xor eax, eax test ecx, ecx cmovle ecx, eax shl rcx, 4 push 0FFFFFFFFFFFFFFF0h pop rdx loc_549C3: lea r8, [rdx+10h] cmp rcx, r8 jz short locret_549E3 mov r9, [rdi+130h] cmp [r9+rdx+1Ch], esi mov rdx, r8 jnz short loc_549C3 add r9, r8 mov rax, r9 locret_549E3: retn
long long find_global_var(long long a1, int a2) { long long v2; // rcx long long result; // rax long long v4; // rcx long long i; // rdx long long v6; // r8 long long v7; // r9 v2 = *(unsigned int *)(a1 + 292); result = 0LL; if ( (int)v2 <= 0 ) v2 = 0LL; v4 = 16 * v2; for ( i = -16LL; ; i += 16LL ) { v6 = i + 16; if ( v4 == i + 16 ) break; v7 = *(_QWORD *)(a1 + 304); if ( *(_DWORD *)(v7 + i + 28) == a2 ) return v6 + v7; } return result; }
find_global_var: MOV ECX,dword ptr [RDI + 0x124] XOR EAX,EAX TEST ECX,ECX CMOVLE ECX,EAX SHL RCX,0x4 PUSH -0x10 POP RDX LAB_001549c3: LEA R8,[RDX + 0x10] CMP RCX,R8 JZ 0x001549e3 MOV R9,qword ptr [RDI + 0x130] CMP dword ptr [R9 + RDX*0x1 + 0x1c],ESI MOV RDX,R8 JNZ 0x001549c3 ADD R9,R8 MOV RAX,R9 LAB_001549e3: RET
long find_global_var(long param_1,int param_2) { long lVar1; int *piVar2; ulong uVar3; long lVar4; uVar3 = (ulong)*(uint *)(param_1 + 0x124); if ((int)*(uint *)(param_1 + 0x124) < 1) { uVar3 = 0; } lVar4 = -0x10; do { lVar1 = lVar4 + 0x10; if (uVar3 * 0x10 == lVar1) { return 0; } piVar2 = (int *)(*(long *)(param_1 + 0x130) + 0x1c + lVar4); lVar4 = lVar1; } while (*piVar2 != param_2); return *(long *)(param_1 + 0x130) + lVar1; }
13,218
tlsstate_make_hello
xtate/src/probe-modules/tls-state-probe.c
static void tlsstate_make_hello(DataPass *pass, ProbeState *state, ProbeTarget *target) { LOG(LEVEL_DETAIL, "(TSP Make HELLO) >>>\n"); if (state->data == NULL) goto error1; size_t offset = 0; struct TlsState *tls_state = state->data; ERR_clear_error(); int res = SSL_do_handshake(tls_state->ssl); int res_ex = SSL_ERROR_NONE; if (res < 0) { res_ex = SSL_get_error(tls_state->ssl, res); } if (res == 1) { // if success, but its impossible } else if (res < 0 && res_ex == SSL_ERROR_WANT_READ) { offset = 0; while (true) { /*extend if buffer is not enough*/ if (tls_state->data_size - offset <= 0) { _extend_buffer(&tls_state->data, &tls_state->data_size); } /*get ClientHello here*/ res = BIO_read(tls_state->wbio, tls_state->data + offset, (int)(tls_state->data_size - offset)); if (res > 0) { LOG(LEVEL_DETAIL, "(TSP Make HELLO) BIO_read: %d\n", res); offset += (size_t)res; } else if (res == 0 || res == -1) { LOG(LEVEL_DETAIL, "(TSP Make HELLO) BIO_read: %d\n", res); break; } else { LOG(LEVEL_WARN, "(TSP Make HELLO) BIO_read failed: %d\n", res); LOGopenssl(LEVEL_WARN); goto error1; } } } else { LOG(LEVEL_WARN, "(TSP Make HELLO) SSL_do_handshake failed: %d, ex_error: %d\n", res, res_ex); LOGopenssl(LEVEL_WARN); goto error1; } /*save state for openssl*/ tls_state->handshake_state = SSL_get_state(tls_state->ssl); /*telling underlayer to send ClientHello*/ datapass_set_data(pass, tls_state->data, offset, true); return; error1: pass->data = NULL; pass->len = 0; pass->is_close = 1; return; }
O3
c
tlsstate_make_hello: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %r15 leaq 0x3c01f(%rip), %rsi # 0x6ab01 movl $0x3, %edi xorl %eax, %eax callq 0x536da movq 0x8(%r14), %rbx testq %rbx, %rbx je 0x2eba8 callq 0x15b80 movq 0x28(%rbx), %rdi callq 0x15110 movl %eax, %ebp testl %eax, %eax js 0x2eb1c xorl %r14d, %r14d cmpl $0x1, %ebp jne 0x2eb8c jmp 0x2ebe5 movq 0x28(%rbx), %rdi movl %ebp, %esi callq 0x15dc0 movl %eax, %r14d cmpl $0x2, %eax jne 0x2eb8c movq %r15, (%rsp) leaq 0x20(%rbx), %r15 leaq 0x18(%rbx), %r12 leaq 0x3bfd5(%rip), %r13 # 0x6ab17 xorl %r14d, %r14d movq (%r15), %rdx cmpq %r14, %rdx jne 0x2eb5b movq %r12, %rdi movq %r15, %rsi callq 0x30297 movq (%r15), %rdx movq 0x38(%rbx), %rdi movq 0x18(%rbx), %rsi addq %r14, %rsi subl %r14d, %edx callq 0x158f0 movl %eax, %ebp testl %eax, %eax jle 0x2ebc3 movl $0x3, %edi movq %r13, %rsi movl %ebp, %edx xorl %eax, %eax callq 0x536da movl %ebp, %eax addq %rax, %r14 jmp 0x2eb45 leaq 0x3bfc9(%rip), %rsi # 0x6ab5c xorl %edi, %edi movl %ebp, %edx movl %r14d, %ecx xorl %eax, %eax callq 0x536da xorl %edi, %edi callq 0x53964 xorps %xmm0, %xmm0 movups %xmm0, (%r15) orb $0x2, 0x10(%r15) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %ebp, %eax incl %eax cmpl $0x1, %eax ja 0x2ec12 leaq 0x3bf44(%rip), %rsi # 0x6ab17 movl $0x3, %edi movl %ebp, %edx xorl %eax, %eax callq 0x536da movq (%rsp), %r15 movq 0x28(%rbx), %rdi callq 0x15cd0 movl %eax, (%rbx) movq 0x18(%rbx), %rsi movq %r15, %rdi movq %r14, %rdx movl $0x1, %ecx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x30310 leaq 0x3bf1d(%rip), %rsi # 0x6ab36 xorl %edi, %edi movl %ebp, %edx xorl %eax, %eax callq 0x536da movq (%rsp), %r15 jmp 0x2eba1
tlsstate_make_hello: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rsi mov r15, rdi lea rsi, aTspMakeHello; "(TSP Make HELLO) >>>\n" mov edi, 3 xor eax, eax call LOG mov rbx, [r14+8] test rbx, rbx jz loc_2EBA8 call _ERR_clear_error mov rdi, [rbx+28h] call _SSL_do_handshake mov ebp, eax test eax, eax js short loc_2EB1C xor r14d, r14d cmp ebp, 1 jnz short loc_2EB8C jmp loc_2EBE5 loc_2EB1C: mov rdi, [rbx+28h] mov esi, ebp call _SSL_get_error mov r14d, eax cmp eax, 2 jnz short loc_2EB8C mov [rsp+38h+var_38], r15 lea r15, [rbx+20h] lea r12, [rbx+18h] lea r13, aTspMakeHelloBi; "(TSP Make HELLO) BIO_read: %d\n" xor r14d, r14d loc_2EB45: mov rdx, [r15] cmp rdx, r14 jnz short loc_2EB5B mov rdi, r12 mov rsi, r15 call _extend_buffer mov rdx, [r15] loc_2EB5B: mov rdi, [rbx+38h] mov rsi, [rbx+18h] add rsi, r14 sub edx, r14d call _BIO_read mov ebp, eax test eax, eax jle short loc_2EBC3 mov edi, 3 mov rsi, r13 mov edx, ebp xor eax, eax call LOG mov eax, ebp add r14, rax jmp short loc_2EB45 loc_2EB8C: lea rsi, aTspMakeHelloSs; "(TSP Make HELLO) SSL_do_handshake faile"... xor edi, edi mov edx, ebp mov ecx, r14d xor eax, eax call LOG loc_2EBA1: xor edi, edi call LOGopenssl loc_2EBA8: xorps xmm0, xmm0 movups xmmword ptr [r15], xmm0 or byte ptr [r15+10h], 2 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2EBC3: mov eax, ebp inc eax cmp eax, 1 ja short loc_2EC12 lea rsi, aTspMakeHelloBi; "(TSP Make HELLO) BIO_read: %d\n" mov edi, 3 mov edx, ebp xor eax, eax call LOG mov r15, [rsp+38h+var_38] loc_2EBE5: mov rdi, [rbx+28h] call _SSL_get_state mov [rbx], eax mov rsi, [rbx+18h] mov rdi, r15 mov rdx, r14 mov ecx, 1 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp datapass_set_data loc_2EC12: lea rsi, aTspMakeHelloBi_0; "(TSP Make HELLO) BIO_read failed: %d\n" xor edi, edi mov edx, ebp xor eax, eax call LOG mov r15, [rsp+38h+var_38] jmp loc_2EBA1
long long tlsstate_make_hello(long long a1, long long a2, int a3, int a4, int a5, int a6) { long long v6; // r15 long long result; // rax long long v8; // rbx int v9; // eax int v10; // r8d int v11; // r9d int v12; // ebp long long i; // r14 long long *v14; // r15 long long v15; // rdx int v16; // eax int v17; // ecx int v18; // r8d int v19; // r9d unsigned int v20; // ebp v6 = a1; result = LOG(3, (unsigned int)"(TSP Make HELLO) >>>\n", a3, a4, a5, a6); v8 = *(_QWORD *)(a2 + 8); if ( !v8 ) goto LABEL_13; ERR_clear_error(3LL); v9 = SSL_do_handshake(*(_QWORD *)(v8 + 40)); v12 = v9; if ( v9 >= 0 ) { i = 0LL; if ( v9 == 1 ) goto LABEL_16; goto LABEL_11; } LODWORD(i) = SSL_get_error(*(_QWORD *)(v8 + 40), (unsigned int)v9); if ( (_DWORD)i != 2 ) { LABEL_11: LOG(0, (unsigned int)"(TSP Make HELLO) SSL_do_handshake failed: %d, ex_error: %d\n", v12, i, v10, v11); LABEL_12: result = LOGopenssl(0LL); LABEL_13: *(_OWORD *)v6 = 0LL; *(_BYTE *)(v6 + 16) |= 2u; return result; } v14 = (long long *)(v8 + 32); for ( i = 0LL; ; i += v20 ) { v15 = *v14; if ( *v14 == i ) { extend_buffer(v8 + 24, v8 + 32); v15 = *v14; } v16 = BIO_read(*(_QWORD *)(v8 + 56), i + *(_QWORD *)(v8 + 24), (unsigned int)(v15 - i)); v20 = v16; if ( v16 <= 0 ) break; LOG(3, (unsigned int)"(TSP Make HELLO) BIO_read: %d\n", v16, v17, v18, v19); } if ( (unsigned int)(v16 + 1) > 1 ) { LOG(0, (unsigned int)"(TSP Make HELLO) BIO_read failed: %d\n", v16, v17, v18, v19); v6 = a1; goto LABEL_12; } LOG(3, (unsigned int)"(TSP Make HELLO) BIO_read: %d\n", v16, v17, v18, v19); v6 = a1; LABEL_16: *(_DWORD *)v8 = SSL_get_state(*(_QWORD *)(v8 + 40)); return datapass_set_data(v6, *(_QWORD *)(v8 + 24), i, 1LL); }
tlsstate_make_hello: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV R15,RDI LEA RSI,[0x16ab01] MOV EDI,0x3 XOR EAX,EAX CALL 0x001536da MOV RBX,qword ptr [R14 + 0x8] TEST RBX,RBX JZ 0x0012eba8 CALL 0x00115b80 MOV RDI,qword ptr [RBX + 0x28] CALL 0x00115110 MOV EBP,EAX TEST EAX,EAX JS 0x0012eb1c XOR R14D,R14D CMP EBP,0x1 JNZ 0x0012eb8c JMP 0x0012ebe5 LAB_0012eb1c: MOV RDI,qword ptr [RBX + 0x28] MOV ESI,EBP CALL 0x00115dc0 MOV R14D,EAX CMP EAX,0x2 JNZ 0x0012eb8c MOV qword ptr [RSP],R15 LEA R15,[RBX + 0x20] LEA R12,[RBX + 0x18] LEA R13,[0x16ab17] XOR R14D,R14D LAB_0012eb45: MOV RDX,qword ptr [R15] CMP RDX,R14 JNZ 0x0012eb5b MOV RDI,R12 MOV RSI,R15 CALL 0x00130297 MOV RDX,qword ptr [R15] LAB_0012eb5b: MOV RDI,qword ptr [RBX + 0x38] MOV RSI,qword ptr [RBX + 0x18] ADD RSI,R14 SUB EDX,R14D CALL 0x001158f0 MOV EBP,EAX TEST EAX,EAX JLE 0x0012ebc3 MOV EDI,0x3 MOV RSI,R13 MOV EDX,EBP XOR EAX,EAX CALL 0x001536da MOV EAX,EBP ADD R14,RAX JMP 0x0012eb45 LAB_0012eb8c: LEA RSI,[0x16ab5c] XOR EDI,EDI MOV EDX,EBP MOV ECX,R14D XOR EAX,EAX CALL 0x001536da LAB_0012eba1: XOR EDI,EDI CALL 0x00153964 LAB_0012eba8: XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15],XMM0 OR byte ptr [R15 + 0x10],0x2 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012ebc3: MOV EAX,EBP INC EAX CMP EAX,0x1 JA 0x0012ec12 LEA RSI,[0x16ab17] MOV EDI,0x3 MOV EDX,EBP XOR EAX,EAX CALL 0x001536da MOV R15,qword ptr [RSP] LAB_0012ebe5: MOV RDI,qword ptr [RBX + 0x28] CALL 0x00115cd0 MOV dword ptr [RBX],EAX MOV RSI,qword ptr [RBX + 0x18] MOV RDI,R15 MOV RDX,R14 MOV ECX,0x1 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00130310 LAB_0012ec12: LEA RSI,[0x16ab36] XOR EDI,EDI MOV EDX,EBP XOR EAX,EAX CALL 0x001536da MOV R15,qword ptr [RSP] JMP 0x0012eba1
void tlsstate_make_hello(int8 *param_1,long param_2) { ulong *puVar1; int4 *puVar2; int ret_code; uint uVar3; int4 uVar4; ulong uVar5; ulong uVar6; LOG(3,"(TSP Make HELLO) >>>\n"); puVar2 = *(int4 **)(param_2 + 8); if (puVar2 == (int4 *)0x0) goto LAB_0012eba8; ERR_clear_error(); ret_code = SSL_do_handshake(*(SSL **)(puVar2 + 10)); if (ret_code < 0) { uVar3 = SSL_get_error(*(SSL **)(puVar2 + 10),ret_code); uVar6 = (ulong)uVar3; if (uVar3 != 2) goto LAB_0012eb8c; puVar1 = (ulong *)(puVar2 + 8); uVar6 = 0; while( true ) { uVar5 = *puVar1; if (uVar5 == uVar6) { _extend_buffer(puVar2 + 6,puVar1); uVar5 = *puVar1; } uVar3 = BIO_read(*(BIO **)(puVar2 + 0xe),(void *)(*(long *)(puVar2 + 6) + uVar6), (int)uVar5 - (int)uVar6); if ((int)uVar3 < 1) break; LOG(3,"(TSP Make HELLO) BIO_read: %d\n",uVar3); uVar6 = uVar6 + uVar3; } if (uVar3 + 1 < 2) { LOG(3,"(TSP Make HELLO) BIO_read: %d\n",uVar3); goto LAB_0012ebe5; } LOG(0,"(TSP Make HELLO) BIO_read failed: %d\n",uVar3); } else { uVar6 = 0; if (ret_code == 1) { LAB_0012ebe5: uVar4 = SSL_get_state(*(int8 *)(puVar2 + 10)); *puVar2 = uVar4; datapass_set_data(param_1,*(int8 *)(puVar2 + 6),uVar6,1); return; } LAB_0012eb8c: LOG(0,"(TSP Make HELLO) SSL_do_handshake failed: %d, ex_error: %d\n",ret_code,uVar6); } LOGopenssl(0); LAB_0012eba8: *param_1 = 0; param_1[1] = 0; *(byte *)(param_1 + 2) = *(byte *)(param_1 + 2) | 2; return; }
13,219
parse_prefixed_json_tool_call_array(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
monkey531[P]llama/common/chat.cpp
static common_chat_msg parse_prefixed_json_tool_call_array(const std::string& input, const std::string & prefix, size_t rstrip_prefix = 0) { auto content_end = input.find(prefix); size_t tc_start = std::string::npos; common_chat_msg result; result.role = "assistant"; const auto process_tool_calls = [&](const json & tool_calls) { for (const auto & tool_call : tool_calls) { const auto & arguments = tool_call["arguments"]; result.tool_calls.push_back({ tool_call["name"], arguments.is_string() ? arguments.get<std::string>() : arguments.dump(), tool_call.contains("id") ? tool_call["id"] : "", }); } }; if (content_end == std::string::npos) { result.content = input; } else { tc_start = content_end + prefix.size() - rstrip_prefix; result.content = input.substr(0, content_end); auto tool_calls = json::parse(input.substr(tc_start)); process_tool_calls(tool_calls); } return result; }
O2
cpp
parse_prefixed_json_tool_call_array(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %rbx movq %rdi, %r13 movq %rsi, %rdi movq %rdx, %rsi xorl %edx, %edx callq 0x27950 movq %rax, %r14 movq %r13, %rdi callq 0xc4b84 leaq 0xdf91(%rip), %rsi # 0xd0880 movq %r13, 0x8(%rsp) movq %r13, %rdi callq 0x27890 cmpq $-0x1, %r14 je 0xc2af1 movq 0x8(%r12), %r12 leaq 0x50(%rsp), %rdi movq %rbx, %rsi xorl %edx, %edx movq %r14, %rcx callq 0x26ce0 subq %r15, %r14 addq %r12, %r14 movq 0x8(%rsp), %rax leaq 0x20(%rax), %rdi leaq 0x50(%rsp), %r15 movq %r15, %rsi callq 0x26f10 movq %r15, %rdi callq 0x27998 leaq 0x50(%rsp), %rdi pushq $-0x1 popq %rcx movq %rbx, %rsi movq %r14, %rdx callq 0x26ce0 xorps %xmm0, %xmm0 leaq 0xb0(%rsp), %rdx movaps %xmm0, 0x10(%rdx) movaps %xmm0, (%rdx) leaq 0x10(%rsp), %rdi leaq 0x50(%rsp), %rsi pushq $0x1 popq %rcx xorl %r8d, %r8d callq 0x96b8e leaq 0xb0(%rsp), %rdi callq 0x45e20 leaq 0x50(%rsp), %r15 movq %r15, %rdi callq 0x27998 leaq 0x20(%rsp), %r12 leaq 0x10(%rsp), %rbx movq %r12, %rdi movq %rbx, %rsi callq 0x84150 leaq 0xd8(%rsp), %rdi movq %rbx, %rsi callq 0x843bc movq 0x8(%rsp), %rax leaq 0x40(%rax), %rbx leaq 0x40(%rsp), %rbp movq %r12, %rdi leaq 0xd8(%rsp), %rsi callq 0x83bf4 testb %al, %al je 0xc2ae0 movq %r12, %rdi callq 0x83dee movq %rax, %r13 movq %rax, %rdi leaq 0xf22d(%rip), %rsi # 0xd1c22 callq 0x971c8 movq %rax, %r14 movq %r13, %rdi leaq 0xf7b4(%rip), %rsi # 0xd21bb callq 0x971c8 movq %r15, %rdi movq %rax, %rsi callq 0x80052 cmpb $0x3, (%r14) jne 0xc2a2c leaq 0x70(%rsp), %rdi movq %r14, %rsi callq 0x80052 jmp 0xc2a45 leaq 0x70(%rsp), %rdi movq %r14, %rsi pushq $-0x1 popq %rdx pushq $0x20 popq %rcx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x7956c movq %r13, %rdi leaq 0xe27f(%rip), %rsi # 0xd0cce callq 0x971a6 testb %al, %al je 0xc2a74 movq %r13, %rdi leaq 0xe26c(%rip), %rsi # 0xd0cce callq 0x971c8 movq %rbp, %rdi movq %rax, %rsi callq 0x69646 jmp 0xc2a83 movq %rbp, %rdi leaq 0x26bc(%rip), %rsi # 0xc513a callq 0xa4852 leaq 0x90(%rsp), %rdi movq %rbp, %rsi callq 0x80052 movq %rbx, %rdi movq %r15, %rsi callq 0xc4c08 movq %r15, %rdi callq 0xa66ca movq %rbp, %rdi callq 0x69aaa movq 0x20(%rsp), %rax movzbl (%rax), %eax cmpl $0x2, %eax je 0xc2acb cmpl $0x1, %eax jne 0xc2ad6 addq $0x30, 0x28(%rsp) jmp 0xc29c8 addq $0x10, 0x30(%rsp) jmp 0xc29c8 incq 0x38(%rsp) jmp 0xc29c8 leaq 0x10(%rsp), %rdi callq 0x69aaa movq 0x8(%rsp), %r14 jmp 0xc2b02 movq 0x8(%rsp), %r14 leaq 0x20(%r14), %rdi movq %rbx, %rsi callq 0x26670 movq %r14, %rax addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xc2b39 movq %rax, %rbx leaq 0xb0(%rsp), %rdi callq 0x45e20 leaq 0x50(%rsp), %rdi callq 0x27998 jmp 0xc2b91 jmp 0xc2b39 jmp 0xc2b39 movq %rax, %rbx jmp 0xc2b91 movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0xa66ca xorl %ebp, %ebp jmp 0xc2b55 movq %rax, %rbx movb $0x1, %bpl leaq 0x40(%rsp), %rdi callq 0x69aaa testb %bpl, %bpl jne 0xc2b6e jmp 0xc2b87 movq %rax, %rbx jmp 0xc2b78 movq %rax, %rbx leaq 0x70(%rsp), %rdi callq 0x27998 leaq 0x50(%rsp), %rdi callq 0x27998 jmp 0xc2b87 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x69aaa movq 0x8(%rsp), %rdi callq 0x78828 movq %rbx, %rdi callq 0x27660
_ZL35parse_prefixed_json_tool_call_arrayRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_m: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0F8h mov r15, rcx mov r12, rdx mov rbx, rsi mov r13, rdi mov rdi, rsi mov rsi, rdx xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findERKS4_m; std::string::find(std::string const&,ulong) mov r14, rax mov rdi, r13; this call _ZN15common_chat_msgC2Ev; common_chat_msg::common_chat_msg(void) lea rsi, aYouAreAHelpful+12h; "assistant" mov [rsp+128h+var_120], r13 mov rdi, r13 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*) cmp r14, 0FFFFFFFFFFFFFFFFh jz loc_C2AF1 mov r12, [r12+8] lea rdi, [rsp+128h+var_D8] mov rsi, rbx xor edx, edx mov rcx, r14 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) sub r14, r15 add r14, r12 mov rax, [rsp+128h+var_120] lea rdi, [rax+20h] lea r15, [rsp+128h+var_D8] mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+128h+var_D8] push 0FFFFFFFFFFFFFFFFh pop rcx mov rsi, rbx mov rdx, r14 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) xorps xmm0, xmm0 lea rdx, [rsp+128h+var_78] movaps xmmword ptr [rdx+10h], xmm0 movaps xmmword ptr [rdx], xmm0 lea rdi, [rsp+128h+var_118] lea rsi, [rsp+128h+var_D8] push 1 pop rcx xor r8d, r8d call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb; 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>::parse<std::string>(std::string &&,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool,bool) lea rdi, [rsp+128h+var_78]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea r15, [rsp+128h+var_D8] mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea r12, [rsp+128h+var_108] lea rbx, [rsp+128h+var_118] mov rdi, r12 mov rsi, rbx call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6cbeginEv; 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>::cbegin(void) lea rdi, [rsp+128h+var_50] mov rsi, rbx call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4cendEv; 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>::cend(void) mov rax, [rsp+128h+var_120] lea rbx, [rax+40h] lea rbp, [rsp+128h+var_E8] loc_C29C8: mov rdi, r12 lea rsi, [rsp+128h+var_50] call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_ test al, al jz loc_C2AE0 mov rdi, r12 call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEdeEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::operator*(void) mov r13, rax mov rdi, rax lea rsi, aKeywordArgumen+9; "arguments" call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[]<char const>(char const *) mov r14, rax mov rdi, r13 lea rsi, aNamespacedSetO+2Fh; "name" call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[]<char const>(char const *) mov rdi, r15 mov rsi, rax call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE cmp byte ptr [r14], 3 jnz short loc_C2A2C lea rdi, [rsp+128h+var_B8] mov rsi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE jmp short loc_C2A45 loc_C2A2C: lea rdi, [rsp+128h+var_B8] mov rsi, r14 push 0FFFFFFFFFFFFFFFFh pop rdx push 20h ; ' ' pop rcx xor r8d, r8d xor r9d, r9d call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t) loc_C2A45: mov rdi, r13 lea rsi, aToolCallId+0Ah; "id" call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ test al, al jz short loc_C2A74 mov rdi, r13 lea rsi, aToolCallId+0Ah; "id" call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[]<char const>(char const *) mov rdi, rbp mov rsi, rax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) jmp short loc_C2A83 loc_C2A74: mov rdi, rbp lea rsi, aSFailedToLoadI+2Ah; "" call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_ loc_C2A83: lea rdi, [rsp+128h+var_98] mov rsi, rbp call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE mov rdi, rbx mov rsi, r15 call _ZNSt6vectorI16common_tool_callSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<common_tool_call>::emplace_back<common_tool_call>(common_tool_call &&) mov rdi, r15; this call _ZN16common_tool_callD2Ev; common_tool_call::~common_tool_call() mov rdi, rbp call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rax, [rsp+128h+var_108] movzx eax, byte ptr [rax] cmp eax, 2 jz short loc_C2ACB cmp eax, 1 jnz short loc_C2AD6 add [rsp+128h+var_100], 30h ; '0' jmp loc_C29C8 loc_C2ACB: add [rsp+128h+var_F8], 10h jmp loc_C29C8 loc_C2AD6: inc [rsp+128h+var_F0] jmp loc_C29C8 loc_C2AE0: lea rdi, [rsp+128h+var_118] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov r14, [rsp+128h+var_120] jmp short loc_C2B02 loc_C2AF1: mov r14, [rsp+128h+var_120] lea rdi, [r14+20h] mov rsi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) loc_C2B02: mov rax, r14 add rsp, 0F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_C2B39 mov rbx, rax lea rdi, [rsp+arg_A8]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea rdi, [rsp+arg_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_C2B91 jmp short loc_C2B39 jmp short $+2 loc_C2B39: mov rbx, rax jmp short loc_C2B91 mov rbx, rax lea rdi, [rsp+arg_48]; this call _ZN16common_tool_callD2Ev; common_tool_call::~common_tool_call() xor ebp, ebp jmp short loc_C2B55 mov rbx, rax mov bpl, 1 loc_C2B55: lea rdi, [rsp+arg_38] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() test bpl, bpl jnz short loc_C2B6E jmp short loc_C2B87 mov rbx, rax jmp short loc_C2B78 mov rbx, rax loc_C2B6E: lea rdi, [rsp+arg_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_C2B78: lea rdi, [rsp+arg_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_C2B87 mov rbx, rax loc_C2B87: lea rdi, [rsp+arg_8] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() loc_C2B91: mov rdi, [rsp+arg_0]; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() mov rdi, rbx call __Unwind_Resume
common_chat_msg * parse_prefixed_json_tool_call_array( common_chat_msg *this, long long a2, long long a3, long long a4) { long long v6; // r14 long long v7; // r12 long long v8; // r13 _BYTE *v9; // r14 long long v10; // rax unsigned __int8 *v11; // rax int v12; // eax common_chat_msg *v13; // r14 _BYTE v15[16]; // [rsp+10h] [rbp-118h] BYREF unsigned __int8 *v16; // [rsp+20h] [rbp-108h] BYREF long long v17; // [rsp+28h] [rbp-100h] long long v18; // [rsp+30h] [rbp-F8h] long long v19; // [rsp+38h] [rbp-F0h] unsigned __int8 v20[16]; // [rsp+40h] [rbp-E8h] BYREF long long v21[4]; // [rsp+50h] [rbp-D8h] BYREF _BYTE v22[32]; // [rsp+70h] [rbp-B8h] BYREF _BYTE v23[32]; // [rsp+90h] [rbp-98h] BYREF _BYTE v24[40]; // [rsp+B0h] [rbp-78h] BYREF _BYTE v25[80]; // [rsp+D8h] [rbp-50h] BYREF v6 = std::string::find(a2, a3, 0LL); common_chat_msg::common_chat_msg(this); std::string::assign(this, "assistant"); if ( v6 == -1 ) { v13 = this; std::string::_M_assign((char *)this + 32, a2); } else { v7 = *(_QWORD *)(a3 + 8); std::string::substr(v21, a2, 0LL, v6); std::string::operator=((char *)this + 32, v21); std::string::~string(v21); std::string::substr(v21, a2, v7 + v6 - a4, -1LL); memset(v24, 0, 32); 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>::parse<std::string>( v15, v21, (long long)v24, 1u, 0); std::_Function_base::~_Function_base((std::_Function_base *)v24); std::string::~string(v21); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::cbegin( (long long)&v16, (long long)v15); 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>::cend( (long long)v25, (long long)v15); while ( ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_((long long)&v16) ) { v8 = nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator*(&v16); v9 = (_BYTE *)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>( v8, (long long)"arguments"); v10 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>( v8, (long long)"name"); ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE( (long long)v21, v10); if ( *v9 == 3 ) ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE( (long long)v22, (long long)v9); else nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::dump( (long long)v22, (long long)v9, -1, 32, 0, 0); if ( ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_(v8) ) { v11 = (unsigned __int8 *)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>( v8, (long long)"id"); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( v20, v11); } else { ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_((char *)v20); } ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE( (long long)v23, (long long)v20); std::vector<common_tool_call>::emplace_back<common_tool_call>((char *)this + 64, v21); common_tool_call::~common_tool_call((common_tool_call *)v21); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v20); v12 = *v16; if ( v12 == 2 ) { v18 += 16LL; } else if ( v12 == 1 ) { v17 += 48LL; } else { ++v19; } } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v15); return this; } return v13; }
parse_prefixed_json_tool_call_array: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xf8 MOV R15,RCX MOV R12,RDX MOV RBX,RSI MOV R13,RDI MOV RDI,RSI MOV RSI,RDX XOR EDX,EDX CALL 0x00127950 MOV R14,RAX MOV RDI,R13 CALL 0x001c4b84 LAB_001c28e8: LEA RSI,[0x1d0880] MOV qword ptr [RSP + 0x8],R13 MOV RDI,R13 CALL 0x00127890 CMP R14,-0x1 JZ 0x001c2af1 MOV R12,qword ptr [R12 + 0x8] LAB_001c290b: LEA RDI,[RSP + 0x50] MOV RSI,RBX XOR EDX,EDX MOV RCX,R14 CALL 0x00126ce0 SUB R14,R15 ADD R14,R12 MOV RAX,qword ptr [RSP + 0x8] LEA RDI,[RAX + 0x20] LEA R15,[RSP + 0x50] MOV RSI,R15 CALL 0x00126f10 MOV RDI,R15 CALL 0x00127998 LAB_001c2941: LEA RDI,[RSP + 0x50] PUSH -0x1 POP RCX MOV RSI,RBX MOV RDX,R14 CALL 0x00126ce0 XORPS XMM0,XMM0 LEA RDX,[RSP + 0xb0] MOVAPS xmmword ptr [RDX + 0x10],XMM0 MOVAPS xmmword ptr [RDX],XMM0 LAB_001c2966: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x50] PUSH 0x1 POP RCX XOR R8D,R8D CALL 0x00196b8e LEA RDI,[RSP + 0xb0] CALL 0x00145e20 LEA R15,[RSP + 0x50] MOV RDI,R15 CALL 0x00127998 LEA R12,[RSP + 0x20] LEA RBX,[RSP + 0x10] MOV RDI,R12 MOV RSI,RBX CALL 0x00184150 LEA RDI,[RSP + 0xd8] MOV RSI,RBX CALL 0x001843bc MOV RAX,qword ptr [RSP + 0x8] LEA RBX,[RAX + 0x40] LEA RBP,[RSP + 0x40] LAB_001c29c8: MOV RDI,R12 LEA RSI,[RSP + 0xd8] CALL 0x00183bf4 TEST AL,AL JZ 0x001c2ae0 MOV RDI,R12 CALL 0x00183dee MOV R13,RAX MOV RDI,RAX LEA RSI,[0x1d1c22] CALL 0x001971c8 MOV R14,RAX MOV RDI,R13 LEA RSI,[0x1d21bb] CALL 0x001971c8 MOV RDI,R15 MOV RSI,RAX CALL 0x00180052 CMP byte ptr [R14],0x3 JNZ 0x001c2a2c LAB_001c2a1d: LEA RDI,[RSP + 0x70] MOV RSI,R14 CALL 0x00180052 JMP 0x001c2a45 LAB_001c2a2c: LEA RDI,[RSP + 0x70] MOV RSI,R14 PUSH -0x1 POP RDX PUSH 0x20 POP RCX XOR R8D,R8D XOR R9D,R9D CALL 0x0017956c LAB_001c2a45: MOV RDI,R13 LEA RSI,[0x1d0cce] CALL 0x001971a6 TEST AL,AL JZ 0x001c2a74 MOV RDI,R13 LEA RSI,[0x1d0cce] CALL 0x001971c8 MOV RDI,RBP MOV RSI,RAX CALL 0x00169646 JMP 0x001c2a83 LAB_001c2a74: MOV RDI,RBP LEA RSI,[0x1c513a] CALL 0x001a4852 LAB_001c2a83: LEA RDI,[RSP + 0x90] MOV RSI,RBP CALL 0x00180052 LAB_001c2a93: MOV RDI,RBX MOV RSI,R15 CALL 0x001c4c08 MOV RDI,R15 CALL 0x001a66ca MOV RDI,RBP CALL 0x00169aaa MOV RAX,qword ptr [RSP + 0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0x2 JZ 0x001c2acb CMP EAX,0x1 JNZ 0x001c2ad6 ADD qword ptr [RSP + 0x28],0x30 JMP 0x001c29c8 LAB_001c2acb: ADD qword ptr [RSP + 0x30],0x10 JMP 0x001c29c8 LAB_001c2ad6: INC qword ptr [RSP + 0x38] JMP 0x001c29c8 LAB_001c2ae0: LEA RDI,[RSP + 0x10] CALL 0x00169aaa MOV R14,qword ptr [RSP + 0x8] JMP 0x001c2b02 LAB_001c2af1: MOV R14,qword ptr [RSP + 0x8] LEA RDI,[R14 + 0x20] LAB_001c2afa: MOV RSI,RBX CALL 0x00126670 LAB_001c2b02: MOV RAX,R14 ADD RSP,0xf8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* parse_prefixed_json_tool_call_array(std::__cxx11::string const&, std::__cxx11::string const&, unsigned long) */ string * parse_prefixed_json_tool_call_array(string *param_1,string *param_2,ulong param_3) { char cVar1; long lVar2; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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; char *pcVar3; basic_json *pbVar4; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_118 [16]; char *local_108; long local_100; long local_f8; long local_f0; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_e8 [16]; string local_d8 [32]; int1 local_b8 [32]; int1 local_98 [32]; int8 local_78; int8 uStack_70; int8 local_68; int8 uStack_60; int1 local_50 [32]; lVar2 = std::__cxx11::string::find(param_2,param_3); common_chat_msg::common_chat_msg((common_chat_msg *)param_1); /* try { // try from 001c28e8 to 001c28fb has its CatchHandler @ 001c2b39 */ std::__cxx11::string::assign((char *)param_1); if (lVar2 == -1) { /* try { // try from 001c2afa to 001c2b01 has its CatchHandler @ 001c2b17 */ std::__cxx11::string::_M_assign(param_1 + 0x20); } else { /* try { // try from 001c290b to 001c291c has its CatchHandler @ 001c2b37 */ std::__cxx11::string::substr((ulong)local_d8,(ulong)param_2); std::__cxx11::string::operator=(param_1 + 0x20,local_d8); std::__cxx11::string::~string(local_d8); /* try { // try from 001c2941 to 001c2953 has its CatchHandler @ 001c2b35 */ std::__cxx11::string::substr((ulong)local_d8,(ulong)param_2); local_68 = 0; uStack_60 = 0; local_78 = 0; uStack_70 = 0; /* try { // try from 001c2966 to 001c297a has its CatchHandler @ 001c2b19 */ 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> ::parse<std::__cxx11::string>(local_118,local_d8,&local_78,1,0); std::_Function_base::~_Function_base((_Function_base *)&local_78); std::__cxx11::string::~string(local_d8); 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> ::cbegin(); 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> ::cend(); while( true ) { /* try { // try from 001c29c8 to 001c2a16 has its CatchHandler @ 001c2b84 */ cVar1 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_ ((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> *)&local_108,local_50); if (cVar1 == '\0') break; this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)nlohmann::json_abi_v3_11_3::detail:: iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> ::operator*((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> *)&local_108); pcVar3 = nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[]<char_const>(this,"arguments"); pbVar4 = nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[]<char_const>(this,"name"); _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE (local_d8,pbVar4); if (*pcVar3 == '\x03') { /* try { // try from 001c2a1d to 001c2a44 has its CatchHandler @ 001c2b66 */ _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE (local_b8,pcVar3); } else { 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> ::dump(local_b8,pcVar3,0xffffffffffffffff,0x20,0,0); } /* try { // try from 001c2a45 to 001c2a82 has its CatchHandler @ 001c2b6b */ cVar1 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ (this,"id"); if (cVar1 == '\0') { _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_ (local_e8,""); } else { pbVar4 = nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[]<char_const>(this,"id"); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_e8,pbVar4); } /* try { // try from 001c2a83 to 001c2a92 has its CatchHandler @ 001c2b4f */ _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE (local_98,local_e8); /* try { // try from 001c2a93 to 001c2a9d has its CatchHandler @ 001c2b3e */ std::vector<common_tool_call,std::allocator<common_tool_call>>::emplace_back<common_tool_call> ((vector<common_tool_call,std::allocator<common_tool_call>> *)(param_1 + 0x40), (common_tool_call *)local_d8); common_tool_call::~common_tool_call((common_tool_call *)local_d8); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_e8); if (*local_108 == '\x02') { local_f8 = local_f8 + 0x10; } else if (*local_108 == '\x01') { local_100 = local_100 + 0x30; } else { local_f0 = local_f0 + 1; } } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_118); } return param_1; }
13,220
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::unget()
llama.cpp/common/json.hpp
void unget() { next_unget = true; --position.chars_read_total; // in case we "unget" a newline, we have to also decrement the lines_read if (position.chars_read_current_line == 0) { if (position.lines_read > 0) { --position.lines_read; } } else { --position.chars_read_current_line; } if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof())) { JSON_ASSERT(!token_string.empty()); token_string.pop_back(); } }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::unget(): movb $0x1, 0x18(%rdi) decq 0x20(%rdi) movq 0x28(%rdi), %rax testq %rax, %rax je 0x8834f leaq 0x28(%rdi), %rcx jmp 0x8835c movq 0x30(%rdi), %rax testq %rax, %rax je 0x88362 leaq 0x30(%rdi), %rcx decq %rax movq %rax, (%rcx) cmpl $-0x1, 0x14(%rdi) je 0x88379 movq 0x40(%rdi), %rax cmpq %rax, 0x38(%rdi) je 0x8837a decq %rax movq %rax, 0x40(%rdi) retq pushq %rax leaq 0x93678(%rip), %rdi # 0x11b9fa leaq 0x936ac(%rip), %rdx # 0x11ba35 leaq 0x9382b(%rip), %rcx # 0x11bbbb movl $0x2240, %esi # imm = 0x2240 xorl %eax, %eax callq 0x21fc0
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv: mov byte ptr [rdi+18h], 1 dec qword ptr [rdi+20h] mov rax, [rdi+28h] test rax, rax jz short loc_8834F lea rcx, [rdi+28h] jmp short loc_8835C loc_8834F: mov rax, [rdi+30h] test rax, rax jz short loc_88362 lea rcx, [rdi+30h] loc_8835C: dec rax mov [rcx], rax loc_88362: cmp dword ptr [rdi+14h], 0FFFFFFFFh jz short locret_88379 mov rax, [rdi+40h] cmp [rdi+38h], rax jz short loc_8837A dec rax mov [rdi+40h], rax locret_88379: retn loc_8837A: push rax lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTokenStringEmp; "!token_string.empty()" mov esi, 2240h xor eax, eax call _ggml_abort
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget( long long a1) { long long result; // rax _QWORD *v2; // rcx long long v3; // rax *(_BYTE *)(a1 + 24) = 1; --*(_QWORD *)(a1 + 32); result = *(_QWORD *)(a1 + 40); if ( result ) { v2 = (_QWORD *)(a1 + 40); } else { result = *(_QWORD *)(a1 + 48); if ( !result ) goto LABEL_6; v2 = (_QWORD *)(a1 + 48); } *v2 = --result; LABEL_6: if ( *(_DWORD *)(a1 + 20) != -1 ) { v3 = *(_QWORD *)(a1 + 64); if ( *(_QWORD *)(a1 + 56) == v3 ) { ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 8768LL, "GGML_ASSERT(%s) failed", "!token_string.empty()"); return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::reset("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp"); } else { result = v3 - 1; *(_QWORD *)(a1 + 64) = result; } } return result; }
unget: MOV byte ptr [RDI + 0x18],0x1 DEC qword ptr [RDI + 0x20] MOV RAX,qword ptr [RDI + 0x28] TEST RAX,RAX JZ 0x0018834f LEA RCX,[RDI + 0x28] JMP 0x0018835c LAB_0018834f: MOV RAX,qword ptr [RDI + 0x30] TEST RAX,RAX JZ 0x00188362 LEA RCX,[RDI + 0x30] LAB_0018835c: DEC RAX MOV qword ptr [RCX],RAX LAB_00188362: CMP dword ptr [RDI + 0x14],-0x1 JZ 0x00188379 MOV RAX,qword ptr [RDI + 0x40] CMP qword ptr [RDI + 0x38],RAX JZ 0x0018837a DEC RAX MOV qword ptr [RDI + 0x40],RAX LAB_00188379: RET LAB_0018837a: PUSH RAX LEA RDI,[0x21b9fa] LEA RDX,[0x21ba35] LEA RCX,[0x21bbbb] MOV ESI,0x2240 XOR EAX,EAX CALL 0x00121fc0
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::unget() */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::unget(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { long lVar1; lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *plVar2; int8 in_R8; int8 in_R9; this[0x18] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> )0x1; *(long *)(this + 0x20) = *(long *)(this + 0x20) + -1; lVar1 = *(long *)(this + 0x28); if (lVar1 == 0) { lVar1 = *(long *)(this + 0x30); if (lVar1 == 0) goto LAB_00188362; plVar2 = this + 0x30; } else { plVar2 = this + 0x28; } *(long *)plVar2 = lVar1 + -1; LAB_00188362: if (*(int *)(this + 0x14) != -1) { lVar1 = *(long *)(this + 0x40); if (*(long *)(this + 0x38) == lVar1) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x2240, "GGML_ASSERT(%s) failed","!token_string.empty()",in_R8,in_R9,lVar1); } *(long *)(this + 0x40) = lVar1 + -1; } return; }
13,221
check_time_range_internal
eloqsql/sql-common/my_time.c
int check_time_range_internal(struct st_mysql_time *my_time, ulong max_hour, ulong err_hour, uint dec, int *warning) { ulonglong hour; static ulong max_sec_part[TIME_SECOND_PART_DIGITS+1]= {000000, 900000, 990000, 999000, 999900, 999990, 999999}; if (my_time->minute >= 60 || my_time->second >= 60 || my_time->hour > err_hour) { *warning|= MYSQL_TIME_WARN_TRUNCATED; return 1; } hour= my_time->hour + (24*my_time->day); if (dec == AUTO_SEC_PART_DIGITS) dec= TIME_SECOND_PART_DIGITS; if (hour <= max_hour && (hour != max_hour || my_time->minute != TIME_MAX_MINUTE || my_time->second != TIME_MAX_SECOND || my_time->second_part <= max_sec_part[dec])) return 0; my_time->day= 0; my_time->hour= max_hour; my_time->minute= TIME_MAX_MINUTE; my_time->second= TIME_MAX_SECOND; my_time->second_part= max_sec_part[dec]; *warning|= MYSQL_TIME_WARN_OUT_OF_RANGE; return 0; }
O0
c
check_time_range_internal: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq %r8, -0x30(%rbp) movq -0x10(%rbp), %rax cmpl $0x3c, 0x10(%rax) jae 0x12e0208 movq -0x10(%rbp), %rax cmpl $0x3c, 0x14(%rax) jae 0x12e0208 movq -0x10(%rbp), %rax movl 0xc(%rax), %eax cmpq -0x20(%rbp), %rax jbe 0x12e021f movq -0x30(%rbp), %rax movl (%rax), %ecx orl $0x1, %ecx movl %ecx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x12e02e6 movq -0x10(%rbp), %rax movl 0xc(%rax), %eax movq -0x10(%rbp), %rcx imull $0x18, 0x8(%rcx), %ecx addl %ecx, %eax movl %eax, %eax movq %rax, -0x38(%rbp) cmpl $0x27, -0x24(%rbp) jne 0x12e0243 movl $0x6, -0x24(%rbp) movq -0x38(%rbp), %rax cmpq -0x18(%rbp), %rax ja 0x12e028e movq -0x38(%rbp), %rax cmpq -0x18(%rbp), %rax jne 0x12e0285 movq -0x10(%rbp), %rax cmpl $0x3b, 0x10(%rax) jne 0x12e0285 movq -0x10(%rbp), %rax cmpl $0x3b, 0x14(%rax) jne 0x12e0285 movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movl -0x24(%rbp), %ecx movl %ecx, %edx leaq 0x82dde1(%rip), %rcx # 0x1b0e060 cmpq (%rcx,%rdx,8), %rax ja 0x12e028e movl $0x0, -0x4(%rbp) jmp 0x12e02e6 movq -0x10(%rbp), %rax movl $0x0, 0x8(%rax) movq -0x18(%rbp), %rax movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0xc(%rax) movq -0x10(%rbp), %rax movl $0x3b, 0x10(%rax) movq -0x10(%rbp), %rax movl $0x3b, 0x14(%rax) movl -0x24(%rbp), %eax movl %eax, %ecx leaq 0x82dd98(%rip), %rax # 0x1b0e060 movq (%rax,%rcx,8), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x30(%rbp), %rax movl (%rax), %ecx orl $0x2, %ecx movl %ecx, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
check_time_range_internal: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_30], r8 mov rax, [rbp+var_10] cmp dword ptr [rax+10h], 3Ch ; '<' jnb short loc_12E0208 mov rax, [rbp+var_10] cmp dword ptr [rax+14h], 3Ch ; '<' jnb short loc_12E0208 mov rax, [rbp+var_10] mov eax, [rax+0Ch] cmp rax, [rbp+var_20] jbe short loc_12E021F loc_12E0208: mov rax, [rbp+var_30] mov ecx, [rax] or ecx, 1 mov [rax], ecx mov [rbp+var_4], 1 jmp loc_12E02E6 loc_12E021F: mov rax, [rbp+var_10] mov eax, [rax+0Ch] mov rcx, [rbp+var_10] imul ecx, [rcx+8], 18h add eax, ecx mov eax, eax mov [rbp+var_38], rax cmp [rbp+var_24], 27h ; ''' jnz short loc_12E0243 mov [rbp+var_24], 6 loc_12E0243: mov rax, [rbp+var_38] cmp rax, [rbp+var_18] ja short loc_12E028E mov rax, [rbp+var_38] cmp rax, [rbp+var_18] jnz short loc_12E0285 mov rax, [rbp+var_10] cmp dword ptr [rax+10h], 3Bh ; ';' jnz short loc_12E0285 mov rax, [rbp+var_10] cmp dword ptr [rax+14h], 3Bh ; ';' jnz short loc_12E0285 mov rax, [rbp+var_10] mov rax, [rax+18h] mov ecx, [rbp+var_24] mov edx, ecx lea rcx, check_time_range_internal_max_sec_part cmp rax, [rcx+rdx*8] ja short loc_12E028E loc_12E0285: mov [rbp+var_4], 0 jmp short loc_12E02E6 loc_12E028E: mov rax, [rbp+var_10] mov dword ptr [rax+8], 0 mov rax, [rbp+var_18] mov ecx, eax mov rax, [rbp+var_10] mov [rax+0Ch], ecx mov rax, [rbp+var_10] mov dword ptr [rax+10h], 3Bh ; ';' mov rax, [rbp+var_10] mov dword ptr [rax+14h], 3Bh ; ';' mov eax, [rbp+var_24] mov ecx, eax lea rax, check_time_range_internal_max_sec_part mov rcx, [rax+rcx*8] mov rax, [rbp+var_10] mov [rax+18h], rcx mov rax, [rbp+var_30] mov ecx, [rax] or ecx, 2 mov [rax], ecx mov [rbp+var_4], 0 loc_12E02E6: mov eax, [rbp+var_4] pop rbp retn
long long check_time_range_internal( long long a1, unsigned long long a2, unsigned long long a3, unsigned int a4, _DWORD *a5) { unsigned long long v6; // [rsp+0h] [rbp-38h] unsigned int v7; // [rsp+14h] [rbp-24h] v7 = a4; if ( *(_DWORD *)(a1 + 16) < 0x3Cu && *(_DWORD *)(a1 + 20) < 0x3Cu && *(unsigned int *)(a1 + 12) <= a3 ) { v6 = (unsigned int)(24 * *(_DWORD *)(a1 + 8) + *(_DWORD *)(a1 + 12)); if ( a4 == 39 ) v7 = 6; if ( v6 > a2 || v6 == a2 && *(_DWORD *)(a1 + 16) == 59 && *(_DWORD *)(a1 + 20) == 59 && *(_QWORD *)(a1 + 24) > check_time_range_internal_max_sec_part[v7] ) { *(_DWORD *)(a1 + 8) = 0; *(_DWORD *)(a1 + 12) = a2; *(_DWORD *)(a1 + 16) = 59; *(_DWORD *)(a1 + 20) = 59; *(_QWORD *)(a1 + 24) = check_time_range_internal_max_sec_part[v7]; *a5 |= 2u; return 0; } else { return 0; } } else { *a5 |= 1u; return 1; } }
begin: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX] LEA RDI,[RBP + -0x8] CALL 0x01159fe0 MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x10 POP RBP RET
/* ilist<fil_space_t, named_spaces_tag_t>::begin() */ int8 __thiscall ilist<fil_space_t,named_spaces_tag_t>::begin(ilist<fil_space_t,named_spaces_tag_t> *this) { int8 local_10; Iterator::Iterator((Iterator *)&local_10,*(ilist_node **)this); return local_10; }
13,222
nglog::LogMessageTime::LogMessageTime(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>)
ng-log[P]ng-log/src/logging.cc
LogMessageTime::LogMessageTime(std::chrono::system_clock::time_point now) : timestamp_{now} { std::time_t timestamp; std::tie(tm_, timestamp, gmtoffset_) = Breakdown(now); usecs_ = std::chrono::duration_cast<std::chrono::microseconds>( now - std::chrono::system_clock::from_time_t(timestamp)); }
O3
cpp
nglog::LogMessageTime::LogMessageTime(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>): pushq %r14 pushq %rbx subq $0x78, %rsp movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rdi) movups %xmm0, (%rdi) movl $0x0, 0x20(%rdi) movups %xmm0, 0x28(%rdi) movq %rsi, 0x38(%rdi) movabsq $0x112e0be826d694b3, %rcx # imm = 0x112E0BE826D694B3 movq %rsi, %rax imulq %rcx movq %rdx, %rax shrq $0x3f, %rax sarq $0x1a, %rdx addq %rax, %rdx movq %rdx, (%rsp) leaq 0x21e62(%rip), %rax # 0x30b11 cmpb $0x1, (%rax) jne 0xecc3 movq %rsp, %rdi leaq 0x8(%rsp), %rsi callq 0x7a50 jmp 0xecd0 movq %rsp, %rdi leaq 0x8(%rsp), %rsi callq 0x7270 movq 0x30(%rsp), %rax movups 0x8(%rsp), %xmm0 movups 0x18(%rsp), %xmm1 movups 0x28(%rsp), %xmm2 movaps %xmm0, 0x40(%rsp) movaps %xmm1, 0x50(%rsp) movaps %xmm2, 0x60(%rsp) movq 0x38(%rsp), %rdx movq %rdx, 0x70(%rsp) imulq $-0x3b9aca00, (%rsp), %rcx # imm = 0xC4653600 movq %rdx, 0x30(%rbx) movups %xmm2, 0x20(%rbx) movups %xmm1, 0x10(%rbx) movups %xmm0, (%rbx) movabsq $0x48d159e26af37c05, %rdx # imm = 0x48D159E26AF37C05 imulq %rdx movq %rdx, %rax shrq $0x3f, %rax sarq $0xa, %rdx addq %rax, %rdx imulq $0xe10, %rdx, %rax # imm = 0xE10 movq %rax, 0x48(%rbx) addq %r14, %rcx movabsq $0x20c49ba5e353f7cf, %rdx # imm = 0x20C49BA5E353F7CF movq %rcx, %rax imulq %rdx movq %rdx, %rax shrq $0x3f, %rax sarq $0x7, %rdx addq %rax, %rdx movq %rdx, 0x40(%rbx) addq $0x78, %rsp popq %rbx popq %r14 retq nop
_ZN5nglog14LogMessageTimeC2ENSt6chrono10time_pointINS1_3_V212system_clockENS1_8durationIlSt5ratioILl1ELl1000000000EEEEEE: push r14; Alternative name is 'nglog::LogMessageTime::LogMessageTime(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>)' push rbx sub rsp, 78h mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi+10h], xmm0 movups xmmword ptr [rdi], xmm0 mov dword ptr [rdi+20h], 0 movups xmmword ptr [rdi+28h], xmm0 mov [rdi+38h], rsi mov rcx, 112E0BE826D694B3h mov rax, rsi imul rcx mov rax, rdx shr rax, 3Fh sar rdx, 1Ah add rdx, rax mov [rsp+88h+var_88], rdx lea rax, _ZN3fLB18FLAGS_log_utc_timeE; fLB::FLAGS_log_utc_time cmp byte ptr [rax], 1 jnz short loc_ECC3 mov rdi, rsp lea rsi, [rsp+88h+var_80] call _gmtime_r jmp short loc_ECD0 loc_ECC3: mov rdi, rsp lea rsi, [rsp+88h+var_80] call _localtime_r loc_ECD0: mov rax, [rsp+88h+var_58] movups xmm0, [rsp+88h+var_80] movups xmm1, [rsp+88h+var_70] movups xmm2, xmmword ptr [rsp+28h] movaps [rsp+88h+var_48], xmm0 movaps [rsp+88h+var_38], xmm1 movaps [rsp+88h+var_28], xmm2 mov rdx, [rsp+88h+var_50] mov [rsp+88h+var_18], rdx imul rcx, [rsp+88h+var_88], 0FFFFFFFFC4653600h mov [rbx+30h], rdx movups xmmword ptr [rbx+20h], xmm2 movups xmmword ptr [rbx+10h], xmm1 movups xmmword ptr [rbx], xmm0 mov rdx, 48D159E26AF37C05h imul rdx mov rax, rdx shr rax, 3Fh sar rdx, 0Ah add rdx, rax imul rax, rdx, 0E10h mov [rbx+48h], rax add rcx, r14 mov rdx, 20C49BA5E353F7CFh mov rax, rcx imul rdx mov rax, rdx shr rax, 3Fh sar rdx, 7 add rdx, rax mov [rbx+40h], rdx add rsp, 78h pop rbx pop r14 retn
unsigned long long nglog::LogMessageTime::LogMessageTime(long long a1, long long a2) { long long v2; // rax __int128 v3; // xmm0 __int128 v4; // xmm1 __int128 v5; // xmm2 long long v6; // rcx long long v7; // rcx unsigned long long result; // rax long long v9; // [rsp+0h] [rbp-88h] BYREF _OWORD v10[2]; // [rsp+8h] [rbp-80h] BYREF __int128 v11; // [rsp+28h] [rbp-60h] long long v12; // [rsp+38h] [rbp-50h] *(_OWORD *)(a1 + 16) = 0LL; *(_OWORD *)a1 = 0LL; *(_DWORD *)(a1 + 32) = 0; *(_OWORD *)(a1 + 40) = 0LL; *(_QWORD *)(a1 + 56) = a2; v9 = a2 / 1000000000; if ( fLB::FLAGS_log_utc_time == 1 ) gmtime_r(&v9, v10); else localtime_r(&v9, v10); v2 = *((_QWORD *)&v11 + 1); v3 = v10[0]; v4 = v10[1]; v5 = v11; v6 = -1000000000 * v9; *(_QWORD *)(a1 + 48) = v12; *(_OWORD *)(a1 + 32) = v5; *(_OWORD *)(a1 + 16) = v4; *(_OWORD *)a1 = v3; *(_QWORD *)(a1 + 72) = 3600 * (v2 / 3600); v7 = a2 + v6; result = (unsigned long long)((unsigned __int128)(0x20C49BA5E353F7CFLL * (__int128)v7) >> 64) >> 63; *(_QWORD *)(a1 + 64) = v7 / 1000; return result; }
LogMessageTime: PUSH R14 PUSH RBX SUB RSP,0x78 MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV dword ptr [RDI + 0x20],0x0 MOVUPS xmmword ptr [RDI + 0x28],XMM0 MOV qword ptr [RDI + 0x38],RSI MOV RCX,0x112e0be826d694b3 MOV RAX,RSI IMUL RCX MOV RAX,RDX SHR RAX,0x3f SAR RDX,0x1a ADD RDX,RAX MOV qword ptr [RSP],RDX LEA RAX,[0x130b11] CMP byte ptr [RAX],0x1 JNZ 0x0010ecc3 MOV RDI,RSP LEA RSI,[RSP + 0x8] CALL 0x00107a50 JMP 0x0010ecd0 LAB_0010ecc3: MOV RDI,RSP LEA RSI,[RSP + 0x8] CALL 0x00107270 LAB_0010ecd0: MOV RAX,qword ptr [RSP + 0x30] MOVUPS XMM0,xmmword ptr [RSP + 0x8] MOVUPS XMM1,xmmword ptr [RSP + 0x18] MOVUPS XMM2,xmmword ptr [RSP + 0x28] MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVAPS xmmword ptr [RSP + 0x50],XMM1 MOVAPS xmmword ptr [RSP + 0x60],XMM2 MOV RDX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x70],RDX IMUL RCX,qword ptr [RSP],-0x3b9aca00 MOV qword ptr [RBX + 0x30],RDX MOVUPS xmmword ptr [RBX + 0x20],XMM2 MOVUPS xmmword ptr [RBX + 0x10],XMM1 MOVUPS xmmword ptr [RBX],XMM0 MOV RDX,0x48d159e26af37c05 IMUL RDX MOV RAX,RDX SHR RAX,0x3f SAR RDX,0xa ADD RDX,RAX IMUL RAX,RDX,0xe10 MOV qword ptr [RBX + 0x48],RAX ADD RCX,R14 MOV RDX,0x20c49ba5e353f7cf MOV RAX,RCX IMUL RDX MOV RAX,RDX SHR RAX,0x3f SAR RDX,0x7 ADD RDX,RAX MOV qword ptr [RBX + 0x40],RDX ADD RSP,0x78 POP RBX POP R14 RET
/* nglog::LogMessageTime::LogMessageTime(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >) */ void __thiscall nglog::LogMessageTime::LogMessageTime(LogMessageTime *this,long param_2) { long local_88; tm local_80 [2]; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int4 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(long *)(this + 0x38) = param_2; local_88 = param_2 / 1000000000; if (fLB::FLAGS_log_utc_time == '\x01') { gmtime_r(&local_88,local_80); } else { localtime_r(&local_88,local_80); } *(char **)(this + 0x30) = local_80[0].tm_zone; *(int8 *)(this + 0x20) = local_80[0]._32_8_; *(long *)(this + 0x28) = local_80[0].tm_gmtoff; *(int8 *)(this + 0x10) = local_80[0]._16_8_; *(int8 *)(this + 0x18) = local_80[0]._24_8_; *(int8 *)this = local_80[0]._0_8_; *(int8 *)(this + 8) = local_80[0]._8_8_; *(long *)(this + 0x48) = (local_80[0].tm_gmtoff / 0xe10) * 0xe10; *(long *)(this + 0x40) = (local_88 * -1000000000 + param_2) / 1000; return; }
13,223
ftb_query_add_word
eloqsql/storage/myisam/ft_boolean_search.c
static int ftb_query_add_word(MYSQL_FTPARSER_PARAM *param, const char *word, int word_len, MYSQL_FTPARSER_BOOLEAN_INFO *info) { MY_FTB_PARAM *ftb_param= param->mysql_ftparam; FTB_WORD *ftbw; FTB_EXPR *ftbe, *tmp_expr; FT_WORD *phrase_word; LIST *tmp_element; int r= info->weight_adjust; float weight= (float) (info->wasign ? nwghts : wghts)[(r>5)?5:((r<-5)?-5:r)]; switch (info->type) { case FT_TOKEN_WORD: ftbw= (FTB_WORD *)alloc_root(&ftb_param->ftb->mem_root, sizeof(FTB_WORD) + HA_MAX_KEY_BUFF); ftbw->len= word_len + 1; ftbw->flags= 0; ftbw->off= 0; if (info->yesno > 0) ftbw->flags|= FTB_FLAG_YES; if (info->yesno < 0) ftbw->flags|= FTB_FLAG_NO; if (info->trunc) ftbw->flags|= FTB_FLAG_TRUNC; ftbw->weight= weight; ftbw->up= ftb_param->ftbe; ftbw->docid[0]= ftbw->docid[1]= HA_OFFSET_ERROR; ftbw->ndepth= (info->yesno < 0) + ftb_param->depth; ftbw->key_root= HA_OFFSET_ERROR; memcpy(ftbw->word + 1, word, word_len); ftbw->word[0]= word_len; if (info->yesno > 0) ftbw->up->ythresh++; ftb_param->ftb->queue.max_elements++; ftbw->prev= ftb_param->ftb->last_word; ftb_param->ftb->last_word= ftbw; ftb_param->ftb->with_scan|= (info->trunc & FTB_FLAG_TRUNC); for (tmp_expr= ftb_param->ftbe; tmp_expr->up; tmp_expr= tmp_expr->up) if (! (tmp_expr->flags & FTB_FLAG_YES)) break; ftbw->max_docid_expr= tmp_expr; /* fall through */ case FT_TOKEN_STOPWORD: if (! ftb_param->up_quot) break; phrase_word= (FT_WORD *)alloc_root(&ftb_param->ftb->mem_root, sizeof(FT_WORD)); tmp_element= (LIST *)alloc_root(&ftb_param->ftb->mem_root, sizeof(LIST)); phrase_word->pos= (uchar*) word; phrase_word->len= word_len; tmp_element->data= (void *)phrase_word; ftb_param->ftbe->phrase= list_add(ftb_param->ftbe->phrase, tmp_element); /* Allocate document list at this point. It allows to avoid huge amount of allocs/frees for each row.*/ tmp_element= (LIST *)alloc_root(&ftb_param->ftb->mem_root, sizeof(LIST)); tmp_element->data= alloc_root(&ftb_param->ftb->mem_root, sizeof(FT_WORD)); ftb_param->ftbe->document= list_add(ftb_param->ftbe->document, tmp_element); break; case FT_TOKEN_LEFT_PAREN: ftbe=(FTB_EXPR *)alloc_root(&ftb_param->ftb->mem_root, sizeof(FTB_EXPR)); ftbe->flags= 0; if (info->yesno > 0) ftbe->flags|= FTB_FLAG_YES; if (info->yesno < 0) ftbe->flags|= FTB_FLAG_NO; ftbe->weight= weight; ftbe->up= ftb_param->ftbe; ftbe->max_docid= ftbe->ythresh= ftbe->yweaks= 0; ftbe->docid[0]= ftbe->docid[1]= HA_OFFSET_ERROR; ftbe->phrase= NULL; ftbe->document= 0; if (info->quot) ftb_param->ftb->with_scan|= 2; if (info->yesno > 0) ftbe->up->ythresh++; ftb_param->ftbe= ftbe; ftb_param->depth++; ftb_param->up_quot= (uchar*) info->quot; break; case FT_TOKEN_RIGHT_PAREN: if (ftb_param->ftbe->document) { /* Circuit document list */ for (tmp_element= ftb_param->ftbe->document; tmp_element->next; tmp_element= tmp_element->next) /* no-op */; tmp_element->next= ftb_param->ftbe->document; ftb_param->ftbe->document->prev= tmp_element; } info->quot= 0; if (ftb_param->ftbe->up) { DBUG_ASSERT(ftb_param->depth); ftb_param->ftbe= ftb_param->ftbe->up; ftb_param->depth--; ftb_param->up_quot= 0; } break; case FT_TOKEN_EOF: default: break; } return(0); }
O3
c
ftb_query_add_word: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %rbx movl %edx, %r14d movq %rsi, %r15 movl (%rcx), %eax movl 0x8(%rcx), %edx cmpb $0x0, 0xc(%rcx) leaq 0x51cd5(%rip), %rsi # 0x9b6c0 leaq 0x51c6e(%rip), %rcx # 0x9b660 cmoveq %rsi, %rcx cmpl $-0x4, %edx movl $0xfffffffb, %esi # imm = 0xFFFFFFFB cmovgel %edx, %esi cmpl $0x5, %esi movl $0x5, %edx cmovll %esi, %edx decl %eax cmpl $0x3, %eax ja 0x49cd6 movslq %edx, %rdx cvtsd2ss 0x28(%rcx,%rdx,8), %xmm0 movq 0x18(%rdi), %r13 leaq 0x51c25(%rip), %rcx # 0x9b650 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movss %xmm0, -0x2c(%rbp) movq (%r13), %rdi addq $0x30, %rdi movl $0x508, %esi # imm = 0x508 callq 0x576e3 movq %rax, %r12 leal 0x1(%r14), %eax movl %eax, 0x48(%r12) movl $0x0, 0x8(%r12) movb $0x0, 0x4c(%r12) movl 0x4(%rbx), %ecx testl %ecx, %ecx jle 0x49b76 movl $0x2, 0x8(%r12) movl 0x4(%rbx), %ecx movl $0x2, %eax jmp 0x49b78 movss %xmm0, -0x2c(%rbp) movq (%r13), %rdi addq $0x30, %rdi movl $0x50, %esi callq 0x576e3 movl $0x0, 0x8(%rax) xorl %ecx, %ecx cmpl $0x0, 0x4(%rbx) setg %cl addl %ecx, %ecx movl %ecx, 0x8(%rax) cmpl $0x0, 0x4(%rbx) jns 0x49abf orl $0x4, %ecx movl %ecx, 0x8(%rax) movd -0x2c(%rbp), %xmm0 movd %xmm0, 0x28(%rax) movq 0x8(%r13), %rcx movq %rcx, (%rax) xorl %ecx, %ecx movq %rcx, 0x48(%rax) movq %rcx, 0x20(%rax) pcmpeqd %xmm0, %xmm0 movdqu %xmm0, 0x10(%rax) pxor %xmm0, %xmm0 movdqu %xmm0, 0x30(%rax) cmpq %rcx, 0x10(%rbx) je 0x49afd movq (%r13), %rcx orb $0x2, 0x344(%rcx) cmpl $0x0, 0x4(%rbx) jle 0x49b09 movq (%rax), %rcx incl 0x48(%rcx) movq %rax, 0x8(%r13) incl 0x18(%r13) movq 0x10(%rbx), %rax movq %rax, 0x10(%r13) jmp 0x49cd6 movq 0x8(%r13), %rax movq 0x38(%rax), %rax testq %rax, %rax je 0x49b49 movq %rax, %rdx movq %rdx, %rcx movq 0x8(%rdx), %rdx testq %rdx, %rdx jne 0x49b2e movq %rax, 0x8(%rcx) movq 0x8(%r13), %rax movq 0x38(%rax), %rax movq %rcx, (%rax) movq $0x0, 0x10(%rbx) movq 0x8(%r13), %rax movq (%rax), %rax testq %rax, %rax je 0x49cd6 movq %rax, 0x8(%r13) decl 0x18(%r13) movq $0x0, 0x10(%r13) jmp 0x49cd6 xorl %eax, %eax testl %ecx, %ecx movd -0x2c(%rbp), %xmm0 jns 0x49b89 orl $0x4, %eax movl %eax, 0x8(%r12) movq %r15, -0x38(%rbp) cmpb $0x0, 0xd(%rbx) je 0x49b9b orl $0x1, %eax movl %eax, 0x8(%r12) movd %xmm0, 0x40(%r12) movq 0x8(%r13), %r15 movq %r15, (%r12) pcmpeqd %xmm0, %xmm0 movdqu %xmm0, 0x10(%r12) movl 0x4(%rbx), %eax shrl $0x1f, %eax addl 0x18(%r13), %eax movl %eax, 0x44(%r12) movq $-0x1, 0x20(%r12) movq %r12, %rdi addq $0x4e, %rdi movslq %r14d, %rdx movq -0x38(%rbp), %rsi callq 0x282d0 movb %r14b, 0x4d(%r12) cmpl $0x0, 0x4(%rbx) jle 0x49bef incl 0x48(%r15) movq (%r13), %rax incl 0x84(%rax) movq (%r13), %rax movq 0x28(%rax), %rax movq %rax, 0x38(%r12) movq (%r13), %rax movq %r12, 0x28(%rax) movb 0xd(%rbx), %al andb $0x1, %al movq (%r13), %rcx orb %al, 0x344(%rcx) movq 0x8(%r13), %rax movq %rax, %rcx movq (%rax), %rax testq %rax, %rax je 0x49c32 testb $0x2, 0x8(%rcx) jne 0x49c21 movq %rcx, 0x28(%r12) movq -0x38(%rbp), %r15 cmpq $0x0, 0x10(%r13) je 0x49cd6 movq (%r13), %rdi addq $0x30, %rdi movl $0x18, %esi callq 0x576e3 movq %rax, %rbx movq (%r13), %rdi addq $0x30, %rdi movl $0x18, %esi callq 0x576e3 movq %r15, (%rbx) movslq %r14d, %rcx movq %rcx, 0x10(%rbx) movq %rbx, 0x10(%rax) movq 0x8(%r13), %rcx movq 0x30(%rcx), %rdi movq %rax, %rsi callq 0x4f1cc movq 0x8(%r13), %rcx movq %rax, 0x30(%rcx) movq (%r13), %rdi addq $0x30, %rdi movl $0x18, %esi callq 0x576e3 movq %rax, %rbx movq (%r13), %rdi addq $0x30, %rdi movl $0x18, %esi callq 0x576e3 movq %rax, 0x10(%rbx) movq 0x8(%r13), %rax movq 0x38(%rax), %rdi movq %rbx, %rsi callq 0x4f1cc movq 0x8(%r13), %rcx movq %rax, 0x38(%rcx) xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ftb_query_add_word: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rcx mov r14d, edx mov r15, rsi mov eax, [rcx] mov edx, [rcx+8] cmp byte ptr [rcx+0Ch], 0 lea rsi, _wghts lea rcx, _nwghts cmovz rcx, rsi cmp edx, 0FFFFFFFCh mov esi, 0FFFFFFFBh cmovge esi, edx cmp esi, 5 mov edx, 5 cmovl edx, esi dec eax; switch 4 cases cmp eax, 3 ja def_49A32; jumptable 0000000000049A32 default case movsxd rdx, edx cvtsd2ss xmm0, qword ptr [rcx+rdx*8+28h] mov r13, [rdi+18h] lea rcx, jpt_49A32 movsxd rax, ds:(jpt_49A32 - 9B650h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_49A34: movss [rbp+var_2C], xmm0; jumptable 0000000000049A32 case 1 mov rdi, [r13+0] add rdi, 30h ; '0' mov esi, 508h call alloc_root mov r12, rax lea eax, [r14+1] mov [r12+48h], eax mov dword ptr [r12+8], 0 mov byte ptr [r12+4Ch], 0 mov ecx, [rbx+4] test ecx, ecx jle loc_49B76 mov dword ptr [r12+8], 2 mov ecx, [rbx+4] mov eax, 2 jmp loc_49B78 loc_49A87: movss [rbp+var_2C], xmm0; jumptable 0000000000049A32 case 2 mov rdi, [r13+0] add rdi, 30h ; '0' mov esi, 50h ; 'P' call alloc_root mov dword ptr [rax+8], 0 xor ecx, ecx cmp dword ptr [rbx+4], 0 setnle cl add ecx, ecx mov [rax+8], ecx cmp dword ptr [rbx+4], 0 jns short loc_49ABF or ecx, 4 mov [rax+8], ecx loc_49ABF: movd xmm0, [rbp+var_2C] movd dword ptr [rax+28h], xmm0 mov rcx, [r13+8] mov [rax], rcx xor ecx, ecx mov [rax+48h], rcx mov [rax+20h], rcx pcmpeqd xmm0, xmm0 movdqu xmmword ptr [rax+10h], xmm0 pxor xmm0, xmm0 movdqu xmmword ptr [rax+30h], xmm0 cmp [rbx+10h], rcx jz short loc_49AFD mov rcx, [r13+0] or byte ptr [rcx+344h], 2 loc_49AFD: cmp dword ptr [rbx+4], 0 jle short loc_49B09 mov rcx, [rax] inc dword ptr [rcx+48h] loc_49B09: mov [r13+8], rax inc dword ptr [r13+18h] mov rax, [rbx+10h] mov [r13+10h], rax jmp def_49A32; jumptable 0000000000049A32 default case loc_49B1E: mov rax, [r13+8]; jumptable 0000000000049A32 case 3 mov rax, [rax+38h] test rax, rax jz short loc_49B49 mov rdx, rax loc_49B2E: mov rcx, rdx mov rdx, [rdx+8] test rdx, rdx jnz short loc_49B2E mov [rcx+8], rax mov rax, [r13+8] mov rax, [rax+38h] mov [rax], rcx loc_49B49: mov qword ptr [rbx+10h], 0 mov rax, [r13+8] mov rax, [rax] test rax, rax jz def_49A32; jumptable 0000000000049A32 default case mov [r13+8], rax dec dword ptr [r13+18h] mov qword ptr [r13+10h], 0 jmp def_49A32; jumptable 0000000000049A32 default case loc_49B76: xor eax, eax loc_49B78: test ecx, ecx movd xmm0, [rbp+var_2C] jns short loc_49B89 or eax, 4 mov [r12+8], eax loc_49B89: mov [rbp+var_38], r15 cmp byte ptr [rbx+0Dh], 0 jz short loc_49B9B or eax, 1 mov [r12+8], eax loc_49B9B: movd dword ptr [r12+40h], xmm0 mov r15, [r13+8] mov [r12], r15 pcmpeqd xmm0, xmm0 movdqu xmmword ptr [r12+10h], xmm0 mov eax, [rbx+4] shr eax, 1Fh add eax, [r13+18h] mov [r12+44h], eax mov qword ptr [r12+20h], 0FFFFFFFFFFFFFFFFh mov rdi, r12 add rdi, 4Eh ; 'N' movsxd rdx, r14d mov rsi, [rbp+var_38] call _memcpy mov [r12+4Dh], r14b cmp dword ptr [rbx+4], 0 jle short loc_49BEF inc dword ptr [r15+48h] loc_49BEF: mov rax, [r13+0] inc dword ptr [rax+84h] mov rax, [r13+0] mov rax, [rax+28h] mov [r12+38h], rax mov rax, [r13+0] mov [rax+28h], r12 mov al, [rbx+0Dh] and al, 1 mov rcx, [r13+0] or [rcx+344h], al mov rax, [r13+8] loc_49C21: mov rcx, rax mov rax, [rax] test rax, rax jz short loc_49C32 test byte ptr [rcx+8], 2 jnz short loc_49C21 loc_49C32: mov [r12+28h], rcx mov r15, [rbp+var_38] loc_49C3B: cmp qword ptr [r13+10h], 0; jumptable 0000000000049A32 case 4 jz def_49A32; jumptable 0000000000049A32 default case mov rdi, [r13+0] add rdi, 30h ; '0' mov esi, 18h call alloc_root mov rbx, rax mov rdi, [r13+0] add rdi, 30h ; '0' mov esi, 18h call alloc_root mov [rbx], r15 movsxd rcx, r14d mov [rbx+10h], rcx mov [rax+10h], rbx mov rcx, [r13+8] mov rdi, [rcx+30h] mov rsi, rax call list_add mov rcx, [r13+8] mov [rcx+30h], rax mov rdi, [r13+0] add rdi, 30h ; '0' mov esi, 18h call alloc_root mov rbx, rax mov rdi, [r13+0] add rdi, 30h ; '0' mov esi, 18h call alloc_root mov [rbx+10h], rax mov rax, [r13+8] mov rdi, [rax+38h] mov rsi, rbx call list_add mov rcx, [r13+8] mov [rcx+38h], rax def_49A32: xor eax, eax; jumptable 0000000000049A32 default case add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ftb_query_add_word(long long a1, long long a2, int a3, int *a4) { int v7; // eax int v8; // edx bool v9; // zf double *v10; // rcx int v11; // esi int v12; // edx long long v13; // r13 long long v14; // r12 int v15; // ecx int v16; // eax long long v17; // rax int v18; // ecx long long v19; // rax long long v20; // rdx long long v21; // rcx long long v22; // rax __m128i v23; // xmm0 long long v24; // r15 _QWORD *v25; // rax _QWORD *v26; // rcx _QWORD *v27; // rbx long long v28; // rax long long v29; // rbx long long v31; // [rsp+8h] [rbp-38h] float v32; // [rsp+14h] [rbp-2Ch] float v33; // [rsp+14h] [rbp-2Ch] v7 = *a4; v8 = a4[2]; v9 = *((_BYTE *)a4 + 12) == 0; v10 = (double *)&nwghts; if ( v9 ) v10 = (double *)&wghts; v11 = -5; if ( v8 >= -4 ) v11 = v8; v12 = 5; if ( v11 < 5 ) v12 = v11; v13 = *(_QWORD *)(a1 + 24); switch ( v7 ) { case 1: v32 = v10[v12 + 5]; v14 = alloc_root(*(_QWORD *)v13 + 48LL, 1288LL); *(_DWORD *)(v14 + 72) = a3 + 1; *(_DWORD *)(v14 + 8) = 0; *(_BYTE *)(v14 + 76) = 0; v15 = a4[1]; if ( v15 <= 0 ) { v16 = 0; } else { *(_DWORD *)(v14 + 8) = 2; v15 = a4[1]; v16 = 2; } v23 = _mm_cvtsi32_si128(LODWORD(v32)); if ( v15 < 0 ) { v16 |= 4u; *(_DWORD *)(v14 + 8) = v16; } v31 = a2; if ( *((_BYTE *)a4 + 13) ) *(_DWORD *)(v14 + 8) = v16 | 1; *(_DWORD *)(v14 + 64) = _mm_cvtsi128_si32(v23); v24 = *(_QWORD *)(v13 + 8); *(_QWORD *)v14 = v24; *(_OWORD *)(v14 + 16) = -1LL; *(_DWORD *)(v14 + 68) = *(_DWORD *)(v13 + 24) + ((unsigned int)a4[1] >> 31); *(_QWORD *)(v14 + 32) = -1LL; memcpy(v14 + 78, v31, a3); *(_BYTE *)(v14 + 77) = a3; if ( a4[1] > 0 ) ++*(_DWORD *)(v24 + 72); ++*(_DWORD *)(*(_QWORD *)v13 + 132LL); *(_QWORD *)(v14 + 56) = *(_QWORD *)(*(_QWORD *)v13 + 40LL); *(_QWORD *)(*(_QWORD *)v13 + 40LL) = v14; *(_BYTE *)(*(_QWORD *)v13 + 836LL) |= *((_BYTE *)a4 + 13) & 1; v25 = *(_QWORD **)(v13 + 8); do { v26 = v25; v25 = (_QWORD *)*v25; } while ( v25 && (v26[1] & 2) != 0 ); *(_QWORD *)(v14 + 40) = v26; a2 = v31; goto LABEL_34; case 2: v33 = v10[v12 + 5]; v17 = alloc_root(*(_QWORD *)v13 + 48LL, 80LL); *(_DWORD *)(v17 + 8) = 0; v18 = 2 * (a4[1] > 0); *(_DWORD *)(v17 + 8) = v18; if ( a4[1] < 0 ) *(_DWORD *)(v17 + 8) = v18 | 4; *(_DWORD *)(v17 + 40) = _mm_cvtsi128_si32(_mm_cvtsi32_si128(LODWORD(v33))); *(_QWORD *)v17 = *(_QWORD *)(v13 + 8); *(_QWORD *)(v17 + 72) = 0LL; *(_QWORD *)(v17 + 32) = 0LL; *(_OWORD *)(v17 + 16) = -1LL; *(_OWORD *)(v17 + 48) = 0LL; if ( *((_QWORD *)a4 + 2) ) *(_BYTE *)(*(_QWORD *)v13 + 836LL) |= 2u; if ( a4[1] > 0 ) ++*(_DWORD *)(*(_QWORD *)v17 + 72LL); *(_QWORD *)(v13 + 8) = v17; ++*(_DWORD *)(v13 + 24); *(_QWORD *)(v13 + 16) = *((_QWORD *)a4 + 2); break; case 3: v19 = *(_QWORD *)(*(_QWORD *)(v13 + 8) + 56LL); if ( v19 ) { v20 = *(_QWORD *)(*(_QWORD *)(v13 + 8) + 56LL); do { v21 = v20; v20 = *(_QWORD *)(v20 + 8); } while ( v20 ); *(_QWORD *)(v21 + 8) = v19; **(_QWORD **)(*(_QWORD *)(v13 + 8) + 56LL) = v21; } *((_QWORD *)a4 + 2) = 0LL; v22 = **(_QWORD **)(v13 + 8); if ( v22 ) { *(_QWORD *)(v13 + 8) = v22; --*(_DWORD *)(v13 + 24); *(_QWORD *)(v13 + 16) = 0LL; } break; case 4: LABEL_34: if ( *(_QWORD *)(v13 + 16) ) { v27 = (_QWORD *)alloc_root(*(_QWORD *)v13 + 48LL, 24LL); v28 = alloc_root(*(_QWORD *)v13 + 48LL, 24LL); *v27 = a2; v27[2] = a3; *(_QWORD *)(v28 + 16) = v27; *(_QWORD *)(*(_QWORD *)(v13 + 8) + 48LL) = list_add(*(_QWORD *)(*(_QWORD *)(v13 + 8) + 48LL), v28); v29 = alloc_root(*(_QWORD *)v13 + 48LL, 24LL); *(_QWORD *)(v29 + 16) = alloc_root(*(_QWORD *)v13 + 48LL, 24LL); *(_QWORD *)(*(_QWORD *)(v13 + 8) + 56LL) = list_add(*(_QWORD *)(*(_QWORD *)(v13 + 8) + 56LL), v29); } break; default: return 0LL; } return 0LL; }
ftb_query_add_word: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RCX MOV R14D,EDX MOV R15,RSI MOV EAX,dword ptr [RCX] MOV EDX,dword ptr [RCX + 0x8] CMP byte ptr [RCX + 0xc],0x0 LEA RSI,[0x19b6c0] LEA RCX,[0x19b660] CMOVZ RCX,RSI CMP EDX,-0x4 MOV ESI,0xfffffffb CMOVGE ESI,EDX CMP ESI,0x5 MOV EDX,0x5 CMOVL EDX,ESI DEC EAX CMP EAX,0x3 JA 0x00149cd6 MOVSXD RDX,EDX CVTSD2SS XMM0,qword ptr [RCX + RDX*0x8 + 0x28] MOV R13,qword ptr [RDI + 0x18] LEA RCX,[0x19b650] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOVSS dword ptr [RBP + -0x2c],XMM0 MOV RDI,qword ptr [R13] ADD RDI,0x30 MOV ESI,0x508 CALL 0x001576e3 MOV R12,RAX LEA EAX,[R14 + 0x1] MOV dword ptr [R12 + 0x48],EAX MOV dword ptr [R12 + 0x8],0x0 MOV byte ptr [R12 + 0x4c],0x0 MOV ECX,dword ptr [RBX + 0x4] TEST ECX,ECX JLE 0x00149b76 MOV dword ptr [R12 + 0x8],0x2 MOV ECX,dword ptr [RBX + 0x4] MOV EAX,0x2 JMP 0x00149b78 caseD_2: MOVSS dword ptr [RBP + -0x2c],XMM0 MOV RDI,qword ptr [R13] ADD RDI,0x30 MOV ESI,0x50 CALL 0x001576e3 MOV dword ptr [RAX + 0x8],0x0 XOR ECX,ECX CMP dword ptr [RBX + 0x4],0x0 SETG CL ADD ECX,ECX MOV dword ptr [RAX + 0x8],ECX CMP dword ptr [RBX + 0x4],0x0 JNS 0x00149abf OR ECX,0x4 MOV dword ptr [RAX + 0x8],ECX LAB_00149abf: MOVD XMM0,dword ptr [RBP + -0x2c] MOVD dword ptr [RAX + 0x28],XMM0 MOV RCX,qword ptr [R13 + 0x8] MOV qword ptr [RAX],RCX XOR ECX,ECX MOV qword ptr [RAX + 0x48],RCX MOV qword ptr [RAX + 0x20],RCX PCMPEQD XMM0,XMM0 MOVDQU xmmword ptr [RAX + 0x10],XMM0 PXOR XMM0,XMM0 MOVDQU xmmword ptr [RAX + 0x30],XMM0 CMP qword ptr [RBX + 0x10],RCX JZ 0x00149afd MOV RCX,qword ptr [R13] OR byte ptr [RCX + 0x344],0x2 LAB_00149afd: CMP dword ptr [RBX + 0x4],0x0 JLE 0x00149b09 MOV RCX,qword ptr [RAX] INC dword ptr [RCX + 0x48] LAB_00149b09: MOV qword ptr [R13 + 0x8],RAX INC dword ptr [R13 + 0x18] MOV RAX,qword ptr [RBX + 0x10] MOV qword ptr [R13 + 0x10],RAX JMP 0x00149cd6 caseD_3: MOV RAX,qword ptr [R13 + 0x8] MOV RAX,qword ptr [RAX + 0x38] TEST RAX,RAX JZ 0x00149b49 MOV RDX,RAX LAB_00149b2e: MOV RCX,RDX MOV RDX,qword ptr [RDX + 0x8] TEST RDX,RDX JNZ 0x00149b2e MOV qword ptr [RCX + 0x8],RAX MOV RAX,qword ptr [R13 + 0x8] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RAX],RCX LAB_00149b49: MOV qword ptr [RBX + 0x10],0x0 MOV RAX,qword ptr [R13 + 0x8] MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x00149cd6 MOV qword ptr [R13 + 0x8],RAX DEC dword ptr [R13 + 0x18] MOV qword ptr [R13 + 0x10],0x0 JMP 0x00149cd6 LAB_00149b76: XOR EAX,EAX LAB_00149b78: TEST ECX,ECX MOVD XMM0,dword ptr [RBP + -0x2c] JNS 0x00149b89 OR EAX,0x4 MOV dword ptr [R12 + 0x8],EAX LAB_00149b89: MOV qword ptr [RBP + -0x38],R15 CMP byte ptr [RBX + 0xd],0x0 JZ 0x00149b9b OR EAX,0x1 MOV dword ptr [R12 + 0x8],EAX LAB_00149b9b: MOVD dword ptr [R12 + 0x40],XMM0 MOV R15,qword ptr [R13 + 0x8] MOV qword ptr [R12],R15 PCMPEQD XMM0,XMM0 MOVDQU xmmword ptr [R12 + 0x10],XMM0 MOV EAX,dword ptr [RBX + 0x4] SHR EAX,0x1f ADD EAX,dword ptr [R13 + 0x18] MOV dword ptr [R12 + 0x44],EAX MOV qword ptr [R12 + 0x20],-0x1 MOV RDI,R12 ADD RDI,0x4e MOVSXD RDX,R14D MOV RSI,qword ptr [RBP + -0x38] CALL 0x001282d0 MOV byte ptr [R12 + 0x4d],R14B CMP dword ptr [RBX + 0x4],0x0 JLE 0x00149bef INC dword ptr [R15 + 0x48] LAB_00149bef: MOV RAX,qword ptr [R13] INC dword ptr [RAX + 0x84] MOV RAX,qword ptr [R13] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [R12 + 0x38],RAX MOV RAX,qword ptr [R13] MOV qword ptr [RAX + 0x28],R12 MOV AL,byte ptr [RBX + 0xd] AND AL,0x1 MOV RCX,qword ptr [R13] OR byte ptr [RCX + 0x344],AL MOV RAX,qword ptr [R13 + 0x8] LAB_00149c21: MOV RCX,RAX MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x00149c32 TEST byte ptr [RCX + 0x8],0x2 JNZ 0x00149c21 LAB_00149c32: MOV qword ptr [R12 + 0x28],RCX MOV R15,qword ptr [RBP + -0x38] caseD_4: CMP qword ptr [R13 + 0x10],0x0 JZ 0x00149cd6 MOV RDI,qword ptr [R13] ADD RDI,0x30 MOV ESI,0x18 CALL 0x001576e3 MOV RBX,RAX MOV RDI,qword ptr [R13] ADD RDI,0x30 MOV ESI,0x18 CALL 0x001576e3 MOV qword ptr [RBX],R15 MOVSXD RCX,R14D MOV qword ptr [RBX + 0x10],RCX MOV qword ptr [RAX + 0x10],RBX MOV RCX,qword ptr [R13 + 0x8] MOV RDI,qword ptr [RCX + 0x30] MOV RSI,RAX CALL 0x0014f1cc MOV RCX,qword ptr [R13 + 0x8] MOV qword ptr [RCX + 0x30],RAX MOV RDI,qword ptr [R13] ADD RDI,0x30 MOV ESI,0x18 CALL 0x001576e3 MOV RBX,RAX MOV RDI,qword ptr [R13] ADD RDI,0x30 MOV ESI,0x18 CALL 0x001576e3 MOV qword ptr [RBX + 0x10],RAX MOV RAX,qword ptr [R13 + 0x8] MOV RDI,qword ptr [RAX + 0x38] MOV RSI,RBX CALL 0x0014f1cc MOV RCX,qword ptr [R13 + 0x8] MOV qword ptr [RCX + 0x38],RAX LAB_00149cd6: XOR EAX,EAX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 ftb_query_add_word(long param_1,void *param_2,int param_3,int *param_4) { int *piVar1; double dVar2; long *plVar3; long *plVar4; long lVar5; uint uVar6; long *plVar7; long *plVar8; int8 *puVar9; long lVar10; int8 uVar11; int1 *puVar12; int iVar13; long lVar14; int iVar15; puVar12 = _nwghts; if ((char)param_4[3] == '\0') { puVar12 = _wghts; } iVar15 = -5; if (-5 < param_4[2]) { iVar15 = param_4[2]; } iVar13 = 5; if (iVar15 < 5) { iVar13 = iVar15; } if (*param_4 - 1U < 4) { dVar2 = *(double *)(puVar12 + (long)iVar13 * 8 + 0x28); plVar3 = *(long **)(param_1 + 0x18); switch(*param_4) { case 1: plVar7 = (long *)alloc_root(*plVar3 + 0x30,0x508); *(int *)(plVar7 + 9) = param_3 + 1; *(int4 *)(plVar7 + 1) = 0; *(int1 *)((long)plVar7 + 0x4c) = 0; iVar15 = param_4[1]; if (iVar15 < 1) { uVar6 = 0; } else { *(int4 *)(plVar7 + 1) = 2; iVar15 = param_4[1]; uVar6 = 2; } if (iVar15 < 0) { uVar6 = uVar6 | 4; *(uint *)(plVar7 + 1) = uVar6; } if (*(char *)((long)param_4 + 0xd) != '\0') { *(uint *)(plVar7 + 1) = uVar6 | 1; } *(float *)(plVar7 + 8) = (float)dVar2; lVar10 = plVar3[1]; *plVar7 = lVar10; *(int4 *)(plVar7 + 2) = 0xffffffff; *(int4 *)((long)plVar7 + 0x14) = 0xffffffff; *(int4 *)(plVar7 + 3) = 0xffffffff; *(int4 *)((long)plVar7 + 0x1c) = 0xffffffff; *(int *)((long)plVar7 + 0x44) = (int)plVar3[3] - (param_4[1] >> 0x1f); plVar7[4] = -1; memcpy((void *)((long)plVar7 + 0x4e),param_2,(long)param_3); *(char *)((long)plVar7 + 0x4d) = (char)param_3; if (0 < param_4[1]) { piVar1 = (int *)(lVar10 + 0x48); *piVar1 = *piVar1 + 1; } *(int *)(*plVar3 + 0x84) = *(int *)(*plVar3 + 0x84) + 1; plVar7[7] = *(long *)(*plVar3 + 0x28); *(long **)(*plVar3 + 0x28) = plVar7; *(byte *)(*plVar3 + 0x344) = *(byte *)(*plVar3 + 0x344) | *(byte *)((long)param_4 + 0xd) & 1; plVar4 = (long *)plVar3[1]; do { plVar8 = plVar4; if ((long *)*plVar8 == (long *)0x0) break; plVar4 = (long *)*plVar8; } while ((*(byte *)(plVar8 + 1) & 2) != 0); plVar7[5] = (long)plVar8; case 4: if (plVar3[2] != 0) { puVar9 = (int8 *)alloc_root(*plVar3 + 0x30,0x18); lVar10 = alloc_root(*plVar3 + 0x30,0x18); *puVar9 = param_2; puVar9[2] = (long)param_3; *(int8 **)(lVar10 + 0x10) = puVar9; uVar11 = list_add(*(int8 *)(plVar3[1] + 0x30),lVar10); *(int8 *)(plVar3[1] + 0x30) = uVar11; lVar10 = alloc_root(*plVar3 + 0x30,0x18); uVar11 = alloc_root(*plVar3 + 0x30,0x18); *(int8 *)(lVar10 + 0x10) = uVar11; uVar11 = list_add(*(int8 *)(plVar3[1] + 0x38),lVar10); *(int8 *)(plVar3[1] + 0x38) = uVar11; } break; case 2: plVar7 = (long *)alloc_root(*plVar3 + 0x30,0x50); *(int4 *)(plVar7 + 1) = 0; uVar6 = (uint)(0 < param_4[1]) * 2; *(uint *)(plVar7 + 1) = uVar6; if (param_4[1] < 0) { *(uint *)(plVar7 + 1) = uVar6 | 4; } *(float *)(plVar7 + 5) = (float)dVar2; *plVar7 = plVar3[1]; plVar7[9] = 0; plVar7[4] = 0; *(int4 *)(plVar7 + 2) = 0xffffffff; *(int4 *)((long)plVar7 + 0x14) = 0xffffffff; *(int4 *)(plVar7 + 3) = 0xffffffff; *(int4 *)((long)plVar7 + 0x1c) = 0xffffffff; *(int1 (*) [16])(plVar7 + 6) = (int1 [16])0x0; if (*(long *)(param_4 + 4) != 0) { *(byte *)(*plVar3 + 0x344) = *(byte *)(*plVar3 + 0x344) | 2; } if (0 < param_4[1]) { *(int *)(*plVar7 + 0x48) = *(int *)(*plVar7 + 0x48) + 1; } plVar3[1] = (long)plVar7; *(int *)(plVar3 + 3) = (int)plVar3[3] + 1; plVar3[2] = *(long *)(param_4 + 4); break; case 3: lVar10 = *(long *)(plVar3[1] + 0x38); lVar5 = lVar10; if (lVar10 != 0) { do { lVar14 = lVar5; lVar5 = *(long *)(lVar14 + 8); } while (*(long *)(lVar14 + 8) != 0); *(long *)(lVar14 + 8) = lVar10; **(long **)(plVar3[1] + 0x38) = lVar14; } param_4[4] = 0; param_4[5] = 0; if (*(long *)plVar3[1] != 0) { plVar3[1] = *(long *)plVar3[1]; *(int *)(plVar3 + 3) = (int)plVar3[3] + -1; plVar3[2] = 0; } } } return 0; }
13,224
common_sampler_print[abi:cxx11](common_sampler const*)
monkey531[P]llama/common/sampling.cpp
std::string common_sampler_print(const struct common_sampler * gsmpl) { std::string result = "logits "; for (int i = 0; i < llama_sampler_chain_n(gsmpl->chain); i++) { const auto * smpl = llama_sampler_chain_get(gsmpl->chain, i); result += std::string("-> ") + llama_sampler_name(smpl) + " "; } return result; }
O2
cpp
common_sampler_print[abi:cxx11](common_sampler const*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rsi, %r14 leaq 0x1a935(%rip), %rsi # 0xb4aee leaq 0x58(%rsp), %r15 movq %rdi, 0x10(%rsp) movq %r15, %rdx callq 0x27852 xorl %ebp, %ebp leaq 0x18(%rsp), %r13 leaq 0x38(%rsp), %r12 movq 0x140(%r14), %rdi callq 0x24f40 cmpl %eax, %ebp jge 0x9a260 movq 0x140(%r14), %rdi movl %ebp, %esi callq 0x249a0 movq %rax, %rbx movq %r13, %rdi leaq 0x21226(%rip), %rsi # 0xbb428 leaq 0xf(%rsp), %rdx callq 0x27852 movq %rbx, %rdi callq 0x24360 movq %r12, %rdi movq %r13, %rsi movq %rax, %rdx callq 0x38598 movq %r15, %rdi movq %r12, %rsi leaq 0x1b0de(%rip), %rdx # 0xb530d callq 0x38598 movq 0x10(%rsp), %rdi movq %r15, %rsi callq 0x25120 movq %r15, %rdi callq 0x251b8 movq %r12, %rdi callq 0x251b8 movq %r13, %rdi callq 0x251b8 incl %ebp jmp 0x9a1d7 movq 0x10(%rsp), %rax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x9a296 movq %rax, %r14 leaq 0x58(%rsp), %rdi callq 0x251b8 jmp 0x9a288 movq %rax, %r14 leaq 0x38(%rsp), %rdi callq 0x251b8 jmp 0x9a29e jmp 0x9a296 movq %rax, %r14 jmp 0x9a2a8 movq %rax, %r14 leaq 0x18(%rsp), %rdi callq 0x251b8 movq 0x10(%rsp), %rdi callq 0x251b8 movq %r14, %rdi callq 0x24f60
_Z20common_sampler_printB5cxx11PK14common_sampler: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov r14, rsi lea rsi, aLogits+2; "logits " lea r15, [rsp+0A8h+var_50] mov [rsp+0A8h+var_98], rdi mov rdx, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) xor ebp, ebp lea r13, [rsp+0A8h+var_90] lea r12, [rsp+0A8h+var_70] loc_9A1D7: mov rdi, [r14+140h] call _llama_sampler_chain_n cmp ebp, eax jge short loc_9A260 mov rdi, [r14+140h] mov esi, ebp call _llama_sampler_chain_get mov rbx, rax mov rdi, r13 lea rsi, asc_BB428; "-> " lea rdx, [rsp+0A8h+var_99] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, rbx call _llama_sampler_name mov rdi, r12 mov rsi, r13 mov rdx, rax call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) mov rdi, r15 mov rsi, r12 lea rdx, aForMessageInMe+144h; " " call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) mov rdi, [rsp+0A8h+var_98] mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r12; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r13; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() inc ebp jmp loc_9A1D7 loc_9A260: mov rax, [rsp+0A8h+var_98] add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_9A296 mov r14, rax lea rdi, [rsp+arg_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_9A288 mov r14, rax loc_9A288: lea rdi, [rsp+arg_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_9A29E jmp short $+2 loc_9A296: mov r14, rax jmp short loc_9A2A8 mov r14, rax loc_9A29E: lea rdi, [rsp+arg_10]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_9A2A8: mov rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
_QWORD * common_sampler_print[abi:cxx11](_QWORD *a1, long long a2) { int i; // ebp long long v3; // rbx long long v4; // rax _QWORD v6[4]; // [rsp+18h] [rbp-90h] BYREF _BYTE v7[32]; // [rsp+38h] [rbp-70h] BYREF _BYTE v8[80]; // [rsp+58h] [rbp-50h] BYREF std::string::basic_string<std::allocator<char>>(a1, (long long)"logits "); for ( i = 0; i < (int)llama_sampler_chain_n(*(_QWORD *)(a2 + 320)); ++i ) { v3 = llama_sampler_chain_get(*(_QWORD *)(a2 + 320), (unsigned int)i); std::string::basic_string<std::allocator<char>>(v6, (long long)"-> "); v4 = llama_sampler_name(v3); std::operator+<char>((long long)v7, (long long)v6, v4); std::operator+<char>((long long)v8, (long long)v7, (long long)" "); std::string::append(a1, v8); std::string::~string(v8); std::string::~string(v7); std::string::~string(v6); } return a1; }
common_sampler_print[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV R14,RSI LEA RSI,[0x1b4aee] LEA R15,[RSP + 0x58] MOV qword ptr [RSP + 0x10],RDI MOV RDX,R15 CALL 0x00127852 XOR EBP,EBP LEA R13,[RSP + 0x18] LEA R12,[RSP + 0x38] LAB_0019a1d7: MOV RDI,qword ptr [R14 + 0x140] LAB_0019a1de: CALL 0x00124f40 CMP EBP,EAX JGE 0x0019a260 MOV RDI,qword ptr [R14 + 0x140] LAB_0019a1ee: MOV ESI,EBP CALL 0x001249a0 LAB_0019a1f5: MOV RBX,RAX MOV RDI,R13 LEA RSI,[0x1bb428] LEA RDX,[RSP + 0xf] CALL 0x00127852 LAB_0019a20c: MOV RDI,RBX CALL 0x00124360 MOV RDI,R12 MOV RSI,R13 MOV RDX,RAX CALL 0x00138598 LAB_0019a222: MOV RDI,R15 MOV RSI,R12 LEA RDX,[0x1b530d] CALL 0x00138598 LAB_0019a234: MOV RDI,qword ptr [RSP + 0x10] MOV RSI,R15 CALL 0x00125120 LAB_0019a241: MOV RDI,R15 CALL 0x001251b8 MOV RDI,R12 CALL 0x001251b8 MOV RDI,R13 CALL 0x001251b8 INC EBP JMP 0x0019a1d7 LAB_0019a260: MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_sampler_print[abi:cxx11](common_sampler const*) */ common_sampler * common_sampler_print_abi_cxx11_(common_sampler *param_1) { int iVar1; int8 uVar2; int iVar3; long in_RSI; allocator local_99; common_sampler *local_98; string local_90 [32]; string local_70 [32]; string local_50 [32]; local_98 = param_1; std::__cxx11::string::string<std::allocator<char>> ((string *)param_1,"logits ",(allocator *)local_50); iVar3 = 0; while( true ) { /* try { // try from 0019a1de to 0019a1e2 has its CatchHandler @ 0019a296 */ iVar1 = llama_sampler_chain_n(*(int8 *)(in_RSI + 0x140)); if (iVar1 <= iVar3) break; /* try { // try from 0019a1ee to 0019a1f4 has its CatchHandler @ 0019a274 */ uVar2 = llama_sampler_chain_get(*(int8 *)(in_RSI + 0x140),iVar3); /* try { // try from 0019a1f5 to 0019a20b has its CatchHandler @ 0019a294 */ std::__cxx11::string::string<std::allocator<char>>(local_90,"-> ",&local_99); /* try { // try from 0019a20c to 0019a221 has its CatchHandler @ 0019a29b */ llama_sampler_name(uVar2); std::operator+(local_70,(char *)local_90); /* try { // try from 0019a222 to 0019a233 has its CatchHandler @ 0019a285 */ std::operator+(local_50,(char *)local_70); /* try { // try from 0019a234 to 0019a240 has its CatchHandler @ 0019a276 */ std::__cxx11::string::append((string *)local_98); std::__cxx11::string::~string(local_50); std::__cxx11::string::~string(local_70); std::__cxx11::string::~string(local_90); iVar3 = iVar3 + 1; } return local_98; }
13,225
common_sampler_print[abi:cxx11](common_sampler const*)
monkey531[P]llama/common/sampling.cpp
std::string common_sampler_print(const struct common_sampler * gsmpl) { std::string result = "logits "; for (int i = 0; i < llama_sampler_chain_n(gsmpl->chain); i++) { const auto * smpl = llama_sampler_chain_get(gsmpl->chain, i); result += std::string("-> ") + llama_sampler_name(smpl) + " "; } return result; }
O3
cpp
common_sampler_print[abi:cxx11](common_sampler const*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rsi, %r14 leaq 0x10(%rdi), %rax movq %rax, 0x8(%rsp) movq %rax, (%rdi) leaq 0x211ae(%rip), %rsi # 0xf0afe leaq 0x211ae(%rip), %rdx # 0xf0b05 movq %rdi, 0x10(%rsp) callq 0x21ce4 leaq 0x48(%rsp), %rbx xorl %ebp, %ebp leaq 0x28(%rsp), %r12 leaq 0x58(%rsp), %r13 movq 0x140(%r14), %rdi callq 0x1bf60 cmpl %eax, %ebp jge 0xcfac4 movq 0x140(%r14), %rdi movl %ebp, %esi callq 0x1b980 movq %rax, %r15 leaq 0x68(%rsp), %rax movq %rax, 0x58(%rsp) movq %r13, %rdi leaq 0x27aad(%rip), %rsi # 0xf7458 leaq 0x27aa9(%rip), %rdx # 0xf745b callq 0x21ce4 movq %r15, %rdi callq 0x1b360 movq %r13, %rdi movq %rax, %rsi callq 0x1c0d0 movq %rbx, 0x38(%rsp) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0xcf9ed movq %rdx, 0x38(%rsp) movq (%rcx), %rdx movq %rdx, 0x48(%rsp) jmp 0xcf9f3 movups (%rcx), %xmm0 movups %xmm0, (%rbx) movq 0x8(%rax), %rdx movq %rdx, 0x40(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x38(%rsp), %rdi leaq 0x21906(%rip), %rsi # 0xf131d callq 0x1c0d0 movq %r12, 0x18(%rsp) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0xcfa3f movq %rdx, 0x18(%rsp) movq (%rcx), %rdx movq %rdx, 0x28(%rsp) jmp 0xcfa47 movups (%rcx), %xmm0 movups %xmm0, (%r12) movq 0x8(%rax), %rdx movq %rdx, 0x20(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx movq 0x10(%rsp), %rdi callq 0x1b260 movq 0x18(%rsp), %rdi cmpq %r12, %rdi je 0xcfa8a movq 0x28(%rsp), %rsi incq %rsi callq 0x1b8b0 movq 0x38(%rsp), %rdi cmpq %rbx, %rdi je 0xcfaa1 movq 0x48(%rsp), %rsi incq %rsi callq 0x1b8b0 movq 0x58(%rsp), %rdi leaq 0x68(%rsp), %rax cmpq %rax, %rdi je 0xcfabd movq 0x68(%rsp), %rsi incq %rsi callq 0x1b8b0 incl %ebp jmp 0xcf972 movq 0x10(%rsp), %rax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xcfb14 movq %rax, %r14 movq 0x18(%rsp), %rdi cmpq %r12, %rdi je 0xcfaf9 movq 0x28(%rsp), %rsi incq %rsi callq 0x1b8b0 jmp 0xcfaf9 movq %rax, %r14 movq 0x38(%rsp), %rdi cmpq %rbx, %rdi je 0xcfb1c movq 0x48(%rsp), %rsi incq %rsi callq 0x1b8b0 jmp 0xcfb1c jmp 0xcfb14 movq %rax, %r14 jmp 0xcfb38 movq %rax, %r14 movq 0x58(%rsp), %rdi leaq 0x68(%rsp), %rax cmpq %rax, %rdi je 0xcfb38 movq 0x68(%rsp), %rsi incq %rsi callq 0x1b8b0 movq 0x8(%rsp), %rax movq 0x10(%rsp), %rcx movq (%rcx), %rdi cmpq %rax, %rdi je 0xcfb55 movq (%rax), %rsi incq %rsi callq 0x1b8b0 movq %r14, %rdi callq 0x1bf70
_Z20common_sampler_printB5cxx11PK14common_sampler: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov r14, rsi lea rax, [rdi+10h] mov [rsp+0A8h+var_A0], rax mov [rdi], rax lea rsi, aLogits+2; "logits " lea rdx, aLogits+9; "" mov [rsp+0A8h+var_98], rdi 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 rbx, [rsp+0A8h+var_60] xor ebp, ebp lea r12, [rsp+0A8h+var_80] lea r13, [rsp+0A8h+var_50] loc_CF972: mov rdi, [r14+140h] call _llama_sampler_chain_n cmp ebp, eax jge loc_CFAC4 mov rdi, [r14+140h] mov esi, ebp call _llama_sampler_chain_get mov r15, rax lea rax, [rsp+0A8h+var_40] mov [rsp+0A8h+var_50], rax mov rdi, r13 lea rsi, asc_F7458; "-> " lea rdx, asc_F7458+3; "" 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 rdi, r15 call _llama_sampler_name mov rdi, r13 mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov [rsp+0A8h+var_70], rbx mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_CF9ED mov [rsp+0A8h+var_70], rdx mov rdx, [rcx] mov [rsp+0A8h+var_60], rdx jmp short loc_CF9F3 loc_CF9ED: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rbx], xmm0 loc_CF9F3: mov rdx, [rax+8] mov [rsp+0A8h+var_68], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea rdi, [rsp+0A8h+var_70] lea rsi, aForMessageInMe+144h; " " call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov [rsp+0A8h+var_90], r12 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_CFA3F mov [rsp+0A8h+var_90], rdx mov rdx, [rcx] mov [rsp+0A8h+var_80], rdx jmp short loc_CFA47 loc_CFA3F: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r12], xmm0 loc_CFA47: mov rdx, [rax+8] mov [rsp+0A8h+var_88], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rsi, [rsp+0A8h+var_90] mov rdx, [rsp+0A8h+var_88] mov rdi, [rsp+0A8h+var_98] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+0A8h+var_90]; void * cmp rdi, r12 jz short loc_CFA8A mov rsi, [rsp+0A8h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CFA8A: mov rdi, [rsp+0A8h+var_70]; void * cmp rdi, rbx jz short loc_CFAA1 mov rsi, [rsp+0A8h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CFAA1: mov rdi, [rsp+0A8h+var_50]; void * lea rax, [rsp+0A8h+var_40] cmp rdi, rax jz short loc_CFABD mov rsi, [rsp+0A8h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CFABD: inc ebp jmp loc_CF972 loc_CFAC4: mov rax, [rsp+0A8h+var_98] add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_CFB14 mov r14, rax mov rdi, [rsp+arg_10]; void * cmp rdi, r12 jz short loc_CFAF9 mov rsi, [rsp+arg_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_CFAF9 mov r14, rax loc_CFAF9: mov rdi, [rsp+arg_30]; void * cmp rdi, rbx jz short loc_CFB1C mov rsi, [rsp+arg_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_CFB1C jmp short $+2 loc_CFB14: mov r14, rax jmp short loc_CFB38 mov r14, rax loc_CFB1C: mov rdi, [rsp+arg_50]; void * lea rax, [rsp+arg_60] cmp rdi, rax jz short loc_CFB38 mov rsi, [rsp+arg_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CFB38: mov rax, [rsp+arg_0] mov rcx, [rsp+arg_8] mov rdi, [rcx]; void * cmp rdi, rax jz short loc_CFB55 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CFB55: mov rdi, r14 call __Unwind_Resume
_QWORD * common_sampler_print[abi:cxx11](_QWORD *a1, long long a2) { int i; // ebp long long v3; // r15 long long v4; // rax long long v5; // rax __int128 *v6; // rcx long long v7; // rax __int128 *v8; // rcx __int128 *v10; // [rsp+18h] [rbp-90h] long long v11; // [rsp+20h] [rbp-88h] __int128 v12; // [rsp+28h] [rbp-80h] BYREF void *v13[2]; // [rsp+38h] [rbp-70h] BYREF __int128 v14; // [rsp+48h] [rbp-60h] BYREF void *v15[2]; // [rsp+58h] [rbp-50h] BYREF _QWORD v16[8]; // [rsp+68h] [rbp-40h] BYREF *a1 = a1 + 2; std::string::_M_construct<char const*>((long long)a1, "logits ", (long long)""); for ( i = 0; i < (int)llama_sampler_chain_n(*(_QWORD *)(a2 + 320)); ++i ) { v3 = llama_sampler_chain_get(*(_QWORD *)(a2 + 320), (unsigned int)i); v15[0] = v16; std::string::_M_construct<char const*>((long long)v15, "-> ", (long long)""); v4 = llama_sampler_name(v3); v5 = std::string::append(v15, v4); v13[0] = &v14; v6 = (__int128 *)(v5 + 16); if ( *(_QWORD *)v5 == v5 + 16 ) { v14 = *v6; } else { v13[0] = *(void **)v5; *(_QWORD *)&v14 = *(_QWORD *)v6; } v13[1] = *(void **)(v5 + 8); *(_QWORD *)v5 = v6; *(_QWORD *)(v5 + 8) = 0LL; *(_BYTE *)(v5 + 16) = 0; v7 = std::string::append(v13, " "); v10 = &v12; v8 = (__int128 *)(v7 + 16); if ( *(_QWORD *)v7 == v7 + 16 ) { v12 = *v8; } else { v10 = *(__int128 **)v7; *(_QWORD *)&v12 = *(_QWORD *)v8; } v11 = *(_QWORD *)(v7 + 8); *(_QWORD *)v7 = v8; *(_QWORD *)(v7 + 8) = 0LL; *(_BYTE *)(v7 + 16) = 0; std::string::_M_append(a1, v10, v11); if ( v10 != &v12 ) operator delete(v10, v12 + 1); if ( v13[0] != &v14 ) operator delete(v13[0], v14 + 1); if ( v15[0] != v16 ) operator delete(v15[0], v16[0] + 1LL); } return a1; }
13,226
void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, unsigned long, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, unsigned long&)
monkey531[P]llama/common/json.hpp
void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val) { switch (static_cast<value_t>(j)) { case value_t::number_unsigned: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>()); break; } case value_t::number_integer: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>()); break; } case value_t::number_float: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>()); break; } case value_t::null: case value_t::object: case value_t::array: case value_t::string: case value_t::boolean: case value_t::binary: case value_t::discarded: default: JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j)); } }
O1
cpp
void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, unsigned long, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, unsigned long&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 movzbl (%rdi), %eax cmpl $0x5, %eax je 0xb43f4 cmpl $0x7, %eax je 0xb43fa cmpl $0x6, %eax jne 0xb442b movq 0x8(%r14), %rax jmp 0xb441f movsd 0x8(%r14), %xmm0 cvttsd2si %xmm0, %rcx movq %rcx, %rdx sarq $0x3f, %rdx subsd 0x3dc5c(%rip), %xmm0 # 0xf2070 cvttsd2si %xmm0, %rax andq %rdx, %rax orq %rcx, %rax movq %rax, (%rsi) addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x20, %edi callq 0x1b440 movq %rax, %rbx movq %r14, %rdi callq 0x60058 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x3efa1(%rip), %rsi # 0xf33f0 leaq 0x10(%rsp), %rdi callq 0x88705 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0x88536 xorl %ebp, %ebp leaq 0x78a9e(%rip), %rsi # 0x12cf18 leaq -0x582e7(%rip), %rdx # 0x5c19a movq %rbx, %rdi callq 0x1bf30 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb44af movq 0x20(%rsp), %rsi incq %rsi callq 0x1b900 jmp 0xb44af movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0xb44bc movq %rbx, %rdi callq 0x1b680 movq %r14, %rdi callq 0x1bfc0
_ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov r14, rdi movzx eax, byte ptr [rdi] cmp eax, 5 jz short loc_B43F4 cmp eax, 7 jz short loc_B43FA cmp eax, 6 jnz short loc_B442B loc_B43F4: mov rax, [r14+8] jmp short loc_B441F loc_B43FA: movsd xmm0, qword ptr [r14+8] cvttsd2si rcx, xmm0 mov rdx, rcx sar rdx, 3Fh subsd xmm0, cs:qword_F2070 cvttsd2si rax, xmm0 and rax, rdx or rax, rcx loc_B441F: mov [rsi], rax add rsp, 30h pop rbx pop r14 pop rbp retn loc_B442B: 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, aTypeMustBeNumb; "type must be number, but is " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Eh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B44AF mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_B44AF mov r14, rax mov bpl, 1 loc_B44AF: test bpl, bpl jz short loc_B44BC mov rdi, rbx; void * call ___cxa_free_exception loc_B44BC: mov rdi, r14 call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_( double *a1, _QWORD *a2) { int v2; // eax long long result; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx const char *v5; // [rsp+8h] [rbp-40h] BYREF _QWORD v6[2]; // [rsp+10h] [rbp-38h] BYREF v2 = *(unsigned __int8 *)a1; if ( v2 != 5 ) { if ( v2 == 7 ) { result = (unsigned int)(int)a1[1]; goto LABEL_6; } if ( v2 != 6 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v5 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v6, (long long)"type must be number, but is ", &v5); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 302, v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } } result = *((_QWORD *)a1 + 1); LABEL_6: *a2 = result; return result; }
_ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI MOVZX EAX,byte ptr [RDI] CMP EAX,0x5 JZ 0x001b43f4 CMP EAX,0x7 JZ 0x001b43fa CMP EAX,0x6 JNZ 0x001b442b LAB_001b43f4: MOV RAX,qword ptr [R14 + 0x8] JMP 0x001b441f LAB_001b43fa: MOVSD XMM0,qword ptr [R14 + 0x8] CVTTSD2SI RCX,XMM0 MOV RDX,RCX SAR RDX,0x3f SUBSD XMM0,qword ptr [0x001f2070] CVTTSD2SI RAX,XMM0 AND RAX,RDX OR RAX,RCX LAB_001b441f: MOV qword ptr [RSI],RAX ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_001b442b: MOV EDI,0x20 CALL 0x0011b440 MOV RBX,RAX MOV RDI,R14 CALL 0x00160058 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_001b4448: LEA RSI,[0x1f33f0] LEA RDI,[RSP + 0x10] CALL 0x00188705 MOV BPL,0x1 LAB_001b445c: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12e MOV RCX,R14 CALL 0x00188536 XOR EBP,EBP LEA RSI,[0x22cf18] LEA RDX,[0x15c19a] MOV RDI,RBX CALL 0x0011bf30
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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,ulong *param_2) { basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> bVar1; int8 uVar2; ulong uVar3; char *local_40; detail local_38 [32]; bVar1 = *param_1; if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x5) { if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x7) { uVar3 = (ulong)*(double *)(param_1 + 8); uVar3 = (long)(*(double *)(param_1 + 8) - _DAT_001f2070) & (long)uVar3 >> 0x3f | uVar3; goto LAB_001b441f; } if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x6) { uVar2 = __cxa_allocate_exception(0x20); local_40 = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 001b4448 to 001b4458 has its CatchHandler @ 001b44a9 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"type must be number, but is ",&local_40); /* try { // try from 001b445c to 001b4488 has its CatchHandler @ 001b4489 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar2,0x12e,local_38,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } } uVar3 = *(ulong *)(param_1 + 8); LAB_001b441f: *param_2 = uVar3; return; }
13,227
void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, unsigned long, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, unsigned long&)
monkey531[P]llama/common/json.hpp
void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val) { switch (static_cast<value_t>(j)) { case value_t::number_unsigned: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>()); break; } case value_t::number_integer: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>()); break; } case value_t::number_float: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>()); break; } case value_t::null: case value_t::object: case value_t::array: case value_t::string: case value_t::boolean: case value_t::binary: case value_t::discarded: default: JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j)); } }
O2
cpp
void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, unsigned long, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, unsigned long&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 movzbl (%rdi), %eax cmpl $0x5, %eax je 0x83a4e cmpl $0x7, %eax je 0x83a54 cmpl $0x6, %eax jne 0x83a85 movq 0x8(%r14), %rax jmp 0x83a79 movsd 0x8(%r14), %xmm0 cvttsd2si %xmm0, %rcx movq %rcx, %rdx sarq $0x3f, %rdx subsd 0x2f5e2(%rip), %xmm0 # 0xb3050 cvttsd2si %xmm0, %rax andq %rdx, %rax orq %rcx, %rax movq %rax, (%rsi) addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x20 popq %rdi callq 0x23460 movq %rax, %rbx movq %r14, %rdi callq 0x43be8 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x30929(%rip), %rsi # 0xb43d0 leaq 0x10(%rsp), %rdi callq 0x63c3f movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0x63b52 xorl %ebp, %ebp leaq 0x78476(%rip), %rsi # 0xfbf48 leaq -0x43361(%rip), %rdx # 0x40778 movq %rbx, %rdi callq 0x23f30 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x24208 testb %bpl, %bpl jne 0x83af8 jmp 0x83b00 movq %rax, %r14 movq %rbx, %rdi callq 0x236a0 movq %r14, %rdi callq 0x23fc0
_ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_: push rbp; char push r14; int push rbx; int sub rsp, 30h mov r14, rdi movzx eax, byte ptr [rdi] cmp eax, 5 jz short loc_83A4E cmp eax, 7 jz short loc_83A54 cmp eax, 6 jnz short loc_83A85 loc_83A4E: mov rax, [r14+8] jmp short loc_83A79 loc_83A54: movsd xmm0, qword ptr [r14+8] cvttsd2si rcx, xmm0 mov rdx, rcx sar rdx, 3Fh subsd xmm0, cs:qword_B3050 cvttsd2si rax, xmm0 and rax, rdx or rax, rcx loc_83A79: mov [rsi], rax add rsp, 30h pop rbx pop r14 pop rbp retn loc_83A85: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aTypeMustBeNumb; "type must be number, but is " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Eh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_83AF8 jmp short loc_83B00 mov r14, rax loc_83AF8: mov rdi, rbx; void * call ___cxa_free_exception loc_83B00: mov rdi, r14 call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_( double *a1, _QWORD *a2) { int v2; // eax long long result; // rax nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx const char *v5; // [rsp+8h] [rbp-40h] BYREF _BYTE v6[56]; // [rsp+10h] [rbp-38h] BYREF v2 = *(unsigned __int8 *)a1; if ( v2 != 5 ) { if ( v2 == 7 ) { result = (unsigned int)(int)a1[1]; goto LABEL_6; } if ( v2 != 6 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v5 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v6, (long long)"type must be number, but is ", &v5); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 302, (long long)v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } } result = *((_QWORD *)a1 + 1); LABEL_6: *a2 = result; return result; }
_ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI MOVZX EAX,byte ptr [RDI] CMP EAX,0x5 JZ 0x00183a4e CMP EAX,0x7 JZ 0x00183a54 CMP EAX,0x6 JNZ 0x00183a85 LAB_00183a4e: MOV RAX,qword ptr [R14 + 0x8] JMP 0x00183a79 LAB_00183a54: MOVSD XMM0,qword ptr [R14 + 0x8] CVTTSD2SI RCX,XMM0 MOV RDX,RCX SAR RDX,0x3f SUBSD XMM0,qword ptr [0x001b3050] CVTTSD2SI RAX,XMM0 AND RAX,RDX OR RAX,RCX LAB_00183a79: MOV qword ptr [RSI],RAX ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_00183a85: PUSH 0x20 POP RDI CALL 0x00123460 MOV RBX,RAX MOV RDI,R14 CALL 0x00143be8 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_00183aa0: LEA RSI,[0x1b43d0] LEA RDI,[RSP + 0x10] CALL 0x00163c3f MOV BPL,0x1 LAB_00183ab4: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12e MOV RCX,R14 CALL 0x00163b52 XOR EBP,EBP LEA RSI,[0x1fbf48] LEA RDX,[0x140778] MOV RDI,RBX CALL 0x00123f30
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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,ulong *param_2) { basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> bVar1; int8 uVar2; ulong uVar3; char *local_40; detail local_38 [32]; bVar1 = *param_1; if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x5) { if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x7) { uVar3 = (ulong)*(double *)(param_1 + 8); uVar3 = (long)(*(double *)(param_1 + 8) - _DAT_001b3050) & (long)uVar3 >> 0x3f | uVar3; goto LAB_00183a79; } if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x6) { uVar2 = __cxa_allocate_exception(0x20); local_40 = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 00183aa0 to 00183ab0 has its CatchHandler @ 00183af5 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"type must be number, but is ",&local_40); /* try { // try from 00183ab4 to 00183ae0 has its CatchHandler @ 00183ae1 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar2,0x12e,local_38,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } } uVar3 = *(ulong *)(param_1 + 8); LAB_00183a79: *param_2 = uVar3; return; }
13,228
mi_ft_del
eloqsql/storage/myisam/ft_update.c
int _mi_ft_del(MI_INFO *info, uint keynr, uchar *keybuf, const uchar *record, my_off_t pos) { int error= -1; FT_WORD *wlist; DBUG_ENTER("_mi_ft_del"); DBUG_PRINT("enter",("keynr: %d",keynr)); if ((wlist=_mi_ft_parserecord(info, keynr, record, &info->ft_memroot))) error=_mi_ft_erase(info,keynr,keybuf,wlist,pos); free_root(&info->ft_memroot, MYF(MY_MARK_BLOCKS_FREE)); DBUG_PRINT("exit",("Return: %d",error)); DBUG_RETURN(error); }
O3
c
mi_ft_del: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r14 movq %rdx, %r15 movl %esi, %r12d movq %rdi, %r13 leaq 0x90(%rdi), %rbx movq %rcx, %rdx movq %rbx, %rcx callq 0x79443 testq %rax, %rax je 0x799e2 movq %r13, %rdi movl %r12d, %esi movq %r15, %rdx movq %rax, %rcx movq %r14, %r8 callq 0x79830 movl %eax, %r14d jmp 0x799e8 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF movl $0x2, %esi movq %rbx, %rdi callq 0xa1d07 movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_mi_ft_del: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r8 mov r15, rdx mov r12d, esi mov r13, rdi lea rbx, [rdi+90h] mov rdx, rcx mov rcx, rbx call _mi_ft_parserecord test rax, rax jz short loc_799E2 mov rdi, r13 mov esi, r12d mov rdx, r15 mov rcx, rax mov r8, r14 call _mi_ft_erase mov r14d, eax jmp short loc_799E8 loc_799E2: mov r14d, 0FFFFFFFFh loc_799E8: mov esi, 2 mov rdi, rbx call free_root mov eax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mi_ft_del(_QWORD *a1, unsigned int a2, long long a3, long long a4, long long a5, __m128i a6) { _QWORD *v8; // rax unsigned int v9; // r14d v8 = mi_ft_parserecord(a1, a2, a4, (long long)(a1 + 18)); if ( v8 ) v9 = mi_ft_erase((long long)a1, a2, a3, v8, a5, a6); else v9 = -1; free_root(a1 + 18, 2LL); return v9; }
_mi_ft_del: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R8 MOV R15,RDX MOV R12D,ESI MOV R13,RDI LEA RBX,[RDI + 0x90] MOV RDX,RCX MOV RCX,RBX CALL 0x00179443 TEST RAX,RAX JZ 0x001799e2 MOV RDI,R13 MOV ESI,R12D MOV RDX,R15 MOV RCX,RAX MOV R8,R14 CALL 0x00179830 MOV R14D,EAX JMP 0x001799e8 LAB_001799e2: MOV R14D,0xffffffff LAB_001799e8: MOV ESI,0x2 MOV RDI,RBX CALL 0x001a1d07 MOV EAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 _mi_ft_del(long param_1,ulong param_2,int8 param_3,int8 param_4,int8 param_5) { int4 uVar1; long lVar2; lVar2 = _mi_ft_parserecord(param_1,param_2,param_4,param_1 + 0x90); if (lVar2 == 0) { uVar1 = 0xffffffff; } else { uVar1 = _mi_ft_erase(param_1,param_2 & 0xffffffff,param_3,lVar2,param_5); } free_root(param_1 + 0x90,2); return uVar1; }
13,229
my_hash_sort_simple
eloqsql/strings/ctype-simple.c
void my_hash_sort_simple(CHARSET_INFO *cs, const uchar *key, size_t len, ulong *nr1, ulong *nr2) { register const uchar *sort_order=cs->sort_order; const uchar *end; uint16 space_weight= sort_order[' ']; /* Remove all trailing characters that are equal to space. We have to do this to be able to compare 'A ' and 'A' as identical. If the key is long enough, cut the trailing spaces (0x20) using an optimized function implemented in skip_trailing_spaces(). "len > 16" is just some heuristic here. Calling skip_triling_space() for short values is not desirable, because its initialization block may be more expensive than the performance gained. */ end= len > 16 ? skip_trailing_space(key, len) : key + len; /* We removed all trailing characters that are binary equal to space 0x20. Now remove all trailing characters that have weights equal to space. Some 8bit simple collations may have such characters: - cp1250_general_ci 0xA0 NO-BREAK SPACE == 0x20 SPACE - cp1251_ukrainian_ci 0x60 GRAVE ACCENT == 0x20 SPACE - koi8u_general_ci 0x60 GRAVE ACCENT == 0x20 SPACE */ for ( ; key < end ; ) { if (sort_order[*--end] != space_weight) { end++; break; } } my_hash_sort_simple_nopad(cs, key, end - key, nr1, nr2); }
O3
c
my_hash_sort_simple: pushq %rbp movq %rsp, %rbp pushq %rbx movq 0x58(%rdi), %rax leaq (%rsi,%rdx), %rdi cmpq $0x11, %rdx jb 0xb5215 cmpq $0x15, %rdx jb 0xb5200 movq %rdi, %r10 andq $-0x4, %r10 cmpq %rsi, %r10 jbe 0xb5200 leaq 0x3(%rsi), %r9 andq $-0x4, %r9 movq %rdi, %rdx movb -0x1(%rdi), %r11b cmpq %r10, %rdi jbe 0xb5280 leaq -0x1(%rdx), %rdi cmpb $0x20, %r11b je 0xb51e4 jmp 0xb5203 movq %rdi, %rdx movq %rdx, %rdi cmpq %rsi, %rdx jbe 0xb5215 leaq -0x1(%rdi), %rdx cmpb $0x20, -0x1(%rdi) je 0xb5203 movb 0x20(%rax), %r9b movq %rdi, %r11 subq %rsi, %r11 movq %rdi, %rdx movq %r11, %r10 cmpq %rsi, %rdi jbe 0xb523c leaq -0x1(%rdx), %rdi movzbl -0x1(%rdx), %ebx leaq -0x1(%r10), %r11 cmpb %r9b, (%rax,%rbx) je 0xb521f movq (%rcx), %rdi movq (%r8), %r9 testq %r10, %r10 jle 0xb5277 movl %edi, %r10d andl $0x3f, %r10d addq %r9, %r10 movzbl (%rsi), %r11d movzbl (%rax,%r11), %r11d imulq %r10, %r11 movq %rdi, %r10 shlq $0x8, %r10 addq %r11, %r10 xorq %r10, %rdi addq $0x3, %r9 incq %rsi cmpq %rdx, %rsi jb 0xb5247 movq %rdi, (%rcx) movq %r9, (%r8) popq %rbx popq %rbp retq cmpb $0x20, %r11b setne %dil cmpq %r10, %r9 setae %r10b orb %dil, %r10b jne 0xb5203 movq %rdx, %rdi movq %rdi, %rdx cmpq %r9, %rdi jbe 0xb5203 leaq -0x4(%rdx), %rdi cmpl $0x20202020, -0x4(%rdx) # imm = 0x20202020 je 0xb529b jmp 0xb5203
my_hash_sort_simple: push rbp mov rbp, rsp push rbx mov rax, [rdi+58h] lea rdi, [rsi+rdx] cmp rdx, 11h jb short loc_B5215 cmp rdx, 15h jb short loc_B5200 mov r10, rdi and r10, 0FFFFFFFFFFFFFFFCh cmp r10, rsi jbe short loc_B5200 lea r9, [rsi+3] and r9, 0FFFFFFFFFFFFFFFCh loc_B51E4: mov rdx, rdi mov r11b, [rdi-1] cmp rdi, r10 jbe loc_B5280 lea rdi, [rdx-1] cmp r11b, 20h ; ' ' jz short loc_B51E4 jmp short loc_B5203 loc_B5200: mov rdx, rdi loc_B5203: mov rdi, rdx cmp rdx, rsi jbe short loc_B5215 lea rdx, [rdi-1] cmp byte ptr [rdi-1], 20h ; ' ' jz short loc_B5203 loc_B5215: mov r9b, [rax+20h] mov r11, rdi sub r11, rsi loc_B521F: mov rdx, rdi mov r10, r11 cmp rdi, rsi jbe short loc_B523C lea rdi, [rdx-1] movzx ebx, byte ptr [rdx-1] lea r11, [r10-1] cmp [rax+rbx], r9b jz short loc_B521F loc_B523C: mov rdi, [rcx] mov r9, [r8] test r10, r10 jle short loc_B5277 loc_B5247: mov r10d, edi and r10d, 3Fh add r10, r9 movzx r11d, byte ptr [rsi] movzx r11d, byte ptr [rax+r11] imul r11, r10 mov r10, rdi shl r10, 8 add r10, r11 xor rdi, r10 add r9, 3 inc rsi cmp rsi, rdx jb short loc_B5247 loc_B5277: mov [rcx], rdi mov [r8], r9 pop rbx pop rbp retn loc_B5280: cmp r11b, 20h ; ' ' setnz dil cmp r9, r10 setnb r10b or r10b, dil jnz loc_B5203 mov rdi, rdx loc_B529B: mov rdx, rdi cmp rdi, r9 jbe loc_B5203 lea rdi, [rdx-4] cmp dword ptr [rdx-4], 20202020h jz short loc_B529B jmp loc_B5203
long long my_hash_sort_simple(long long a1, unsigned __int8 *a2, unsigned long long a3, long long *a4, long long *a5) { long long result; // rax unsigned long long v6; // rdi unsigned long long v7; // r10 unsigned long long v8; // r9 unsigned __int8 *v9; // rdx char v10; // r11 long long v11; // r11 unsigned long long v12; // rdx long long v13; // r10 long long v14; // rdi long long v15; // r9 result = *(_QWORD *)(a1 + 88); v6 = (unsigned long long)&a2[a3]; if ( a3 >= 0x11 ) { if ( a3 < 0x15 || (v7 = v6 & 0xFFFFFFFFFFFFFFFCLL, (v6 & 0xFFFFFFFFFFFFFFFCLL) <= (unsigned long long)a2) ) { v9 = &a2[a3]; } else { v8 = (unsigned long long)(a2 + 3) & 0xFFFFFFFFFFFFFFFCLL; while ( 1 ) { v9 = (unsigned __int8 *)v6; v10 = *(_BYTE *)(v6 - 1); if ( v6 <= v7 ) break; --v6; if ( v10 != 32 ) goto LABEL_9; } if ( v10 == 32 && v8 < v7 ) { do { v9 = (unsigned __int8 *)v6; if ( v6 <= v8 ) break; v6 -= 4LL; } while ( *((_DWORD *)v9 - 1) == 538976288 ); } } do { LABEL_9: v6 = (unsigned long long)v9; if ( v9 <= a2 ) break; --v9; } while ( *(_BYTE *)(v6 - 1) == 32 ); } v11 = v6 - (_QWORD)a2; do { v12 = v6; v13 = v11; if ( v6 <= (unsigned long long)a2 ) break; --v6; --v11; } while ( *(_BYTE *)(result + *(unsigned __int8 *)(v12 - 1)) == *(_BYTE *)(result + 32) ); v14 = *a4; v15 = *a5; if ( v13 > 0 ) { do { v14 ^= (v15 + (v14 & 0x3F)) * *(unsigned __int8 *)(result + *a2) + (v14 << 8); v15 += 3LL; ++a2; } while ( (unsigned long long)a2 < v12 ); } *a4 = v14; *a5 = v15; return result; }
my_hash_sort_simple: PUSH RBP MOV RBP,RSP PUSH RBX MOV RAX,qword ptr [RDI + 0x58] LEA RDI,[RSI + RDX*0x1] CMP RDX,0x11 JC 0x001b5215 CMP RDX,0x15 JC 0x001b5200 MOV R10,RDI AND R10,-0x4 CMP R10,RSI JBE 0x001b5200 LEA R9,[RSI + 0x3] AND R9,-0x4 LAB_001b51e4: MOV RDX,RDI MOV R11B,byte ptr [RDI + -0x1] CMP RDI,R10 JBE 0x001b5280 LEA RDI,[RDX + -0x1] CMP R11B,0x20 JZ 0x001b51e4 JMP 0x001b5203 LAB_001b5200: MOV RDX,RDI LAB_001b5203: MOV RDI,RDX CMP RDX,RSI JBE 0x001b5215 LEA RDX,[RDI + -0x1] CMP byte ptr [RDI + -0x1],0x20 JZ 0x001b5203 LAB_001b5215: MOV R9B,byte ptr [RAX + 0x20] MOV R11,RDI SUB R11,RSI LAB_001b521f: MOV RDX,RDI MOV R10,R11 CMP RDI,RSI JBE 0x001b523c LEA RDI,[RDX + -0x1] MOVZX EBX,byte ptr [RDX + -0x1] LEA R11,[R10 + -0x1] CMP byte ptr [RAX + RBX*0x1],R9B JZ 0x001b521f LAB_001b523c: MOV RDI,qword ptr [RCX] MOV R9,qword ptr [R8] TEST R10,R10 JLE 0x001b5277 LAB_001b5247: MOV R10D,EDI AND R10D,0x3f ADD R10,R9 MOVZX R11D,byte ptr [RSI] MOVZX R11D,byte ptr [RAX + R11*0x1] IMUL R11,R10 MOV R10,RDI SHL R10,0x8 ADD R10,R11 XOR RDI,R10 ADD R9,0x3 INC RSI CMP RSI,RDX JC 0x001b5247 LAB_001b5277: MOV qword ptr [RCX],RDI MOV qword ptr [R8],R9 POP RBX POP RBP RET LAB_001b5280: CMP R11B,0x20 SETNZ DIL CMP R9,R10 SETNC R10B OR R10B,DIL JNZ 0x001b5203 MOV RDI,RDX LAB_001b529b: MOV RDX,RDI CMP RDI,R9 JBE 0x001b5203 LEA RDI,[RDX + -0x4] CMP dword ptr [RDX + -0x4],0x20202020 JZ 0x001b529b JMP 0x001b5203
void my_hash_sort_simple(long param_1,byte *param_2,ulong param_3,ulong *param_4,long *param_5) { byte *pbVar1; long lVar2; byte *pbVar3; ulong uVar4; byte *pbVar5; long lVar6; byte *pbVar7; long lVar8; lVar2 = *(long *)(param_1 + 0x58); pbVar5 = param_2 + param_3; if (param_3 < 0x11) goto LAB_001b5215; pbVar3 = pbVar5; if ((0x14 < param_3) && (pbVar7 = (byte *)((ulong)pbVar5 & 0xfffffffffffffffc), param_2 < pbVar7)) { do { pbVar1 = pbVar5 + -1; pbVar3 = pbVar5; if (pbVar5 <= pbVar7) { if ((byte *)((ulong)(param_2 + 3) & 0xfffffffffffffffc) < pbVar7 && *pbVar1 == 0x20) goto LAB_001b529b; break; } pbVar5 = pbVar5 + -1; } while (*pbVar1 == 0x20); } goto LAB_001b5203; while (pbVar7 = pbVar5 + -4, pbVar5 = pbVar5 + -4, *(int *)pbVar7 == 0x20202020) { LAB_001b529b: pbVar3 = pbVar5; if (pbVar5 <= (byte *)((ulong)(param_2 + 3) & 0xfffffffffffffffc)) break; } LAB_001b5203: do { pbVar5 = pbVar3; if (pbVar5 <= param_2) break; pbVar3 = pbVar5 + -1; } while (pbVar5[-1] == 0x20); LAB_001b5215: lVar6 = (long)pbVar5 - (long)param_2; do { lVar8 = lVar6; pbVar3 = pbVar5; if (pbVar3 <= param_2) break; pbVar5 = pbVar3 + -1; lVar6 = lVar8 + -1; } while (*(char *)(lVar2 + (ulong)pbVar3[-1]) == *(char *)(lVar2 + 0x20)); uVar4 = *param_4; lVar6 = *param_5; if (0 < lVar8) { do { uVar4 = uVar4 ^ uVar4 * 0x100 + (ulong)*(byte *)(lVar2 + (ulong)*param_2) * ((ulong)((uint)uVar4 & 0x3f) + lVar6); lVar6 = lVar6 + 3; param_2 = param_2 + 1; } while (param_2 < pbVar3); } *param_4 = uVar4; *param_5 = lVar6; return; }
13,230
mysys_namespace::crc32c::Fast_CRC32(unsigned long*, unsigned char const**)
eloqsql/mysys/crc32/crc32c.cc
USE_SSE42 static inline void Fast_CRC32(uint64_t* l, uint8_t const **p) { # if (SIZEOF_SIZE_T == 8) *l = _mm_crc32_u64(*l, LE_LOAD64(*p)); *p += 8; # else *l = _mm_crc32_u32(static_cast<unsigned int>(*l), LE_LOAD32(*p)); *p += 4; *l = _mm_crc32_u32(static_cast<unsigned int>(*l), LE_LOAD32(*p)); *p += 4; # endif }
O0
cpp
mysys_namespace::crc32c::Fast_CRC32(unsigned long*, unsigned char const**): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x18(%rbp) movq %rsi, -0x20(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rdi callq 0x8f7b0 movq -0x28(%rbp), %rcx movq %rcx, -0x8(%rbp) movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rcx crc32q -0x10(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movq -0x20(%rbp), %rax movq (%rax), %rcx addq $0x8, %rcx movq %rcx, (%rax) addq $0x30, %rsp popq %rbp retq nopl (%rax)
_ZN15mysys_namespace6crc32cL10Fast_CRC32EPmPPKh: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_28], rax mov rax, [rbp+var_20] mov rdi, [rax]; this call _ZN15mysys_namespace6crc32cL9LE_LOAD64EPKh; mysys_namespace::crc32c::LE_LOAD64(uchar const*) mov rcx, [rbp+var_28] mov [rbp+var_8], rcx mov [rbp+var_10], rax mov rcx, [rbp+var_8] crc32 rcx, [rbp+var_10] mov rax, [rbp+var_18] mov [rax], rcx mov rax, [rbp+var_20] mov rcx, [rax] add rcx, 8 mov [rax], rcx add rsp, 30h pop rbp retn
const unsigned __int8 * mysys_namespace::crc32c::Fast_CRC32( mysys_namespace::crc32c *this, const unsigned __int8 *a2, const unsigned __int8 **a3) { const unsigned __int8 *result; // rax *(_QWORD *)this = _mm_crc32_u64( *(_QWORD *)this, mysys_namespace::crc32c::LE_LOAD64(*(mysys_namespace::crc32c **)a2, a2)); result = a2; *(_QWORD *)a2 += 8LL; return result; }
Fast_CRC32: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RDI,qword ptr [RAX] CALL 0x0018f7b0 MOV RCX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RCX MOV qword ptr [RBP + -0x10],RAX MOV RCX,qword ptr [RBP + -0x8] CRC32 RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] ADD RCX,0x8 MOV qword ptr [RAX],RCX ADD RSP,0x30 POP RBP RET
/* mysys_namespace::crc32c::Fast_CRC32(unsigned long*, unsigned char const**) */ void mysys_namespace::crc32c::Fast_CRC32(ulong *param_1,uchar **param_2) { int8 uVar1; ulong uVar2; uVar2 = *param_1; uVar1 = LE_LOAD64(*param_2); uVar2 = crc32(uVar2,uVar1); *param_1 = uVar2; *param_2 = *param_2 + 8; return; }
13,231
my_strnncollsp_8bit_bin
eloqsql/strings/ctype-bin.c
static int my_strnncollsp_8bit_bin(CHARSET_INFO * cs __attribute__((unused)), const uchar *a, size_t a_length, const uchar *b, size_t b_length) { const uchar *end; size_t length; end= a + (length= MY_MIN(a_length, b_length)); while (a < end) { if (*a++ != *b++) return ((int) a[-1] - (int) b[-1]); } return a_length == b_length ? 0 : a_length < b_length ? -my_strnncollsp_padspace_bin(b, b_length - length) : my_strnncollsp_padspace_bin(a, a_length - length); }
O0
c
my_strnncollsp_8bit_bin: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x36e38 movq -0x20(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x36e40 movq -0x30(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x48(%rbp), %rax movq -0x50(%rbp), %rcx movq %rcx, -0x40(%rbp) addq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x36e9e movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) movzbl (%rax), %eax movq -0x28(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x28(%rbp) movzbl (%rcx), %ecx cmpl %ecx, %eax je 0x36e9c movq -0x18(%rbp), %rax movzbl -0x1(%rax), %eax movq -0x28(%rbp), %rcx movzbl -0x1(%rcx), %ecx subl %ecx, %eax movl %eax, -0x4(%rbp) jmp 0x36ef5 jmp 0x36e53 movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax jne 0x36eaf xorl %eax, %eax movl %eax, -0x54(%rbp) jmp 0x36eef movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x36ed5 movq -0x28(%rbp), %rdi movq -0x30(%rbp), %rsi subq -0x40(%rbp), %rsi callq 0x36660 movl %eax, %ecx xorl %eax, %eax subl %ecx, %eax movl %eax, -0x58(%rbp) jmp 0x36ee9 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi subq -0x40(%rbp), %rsi callq 0x36660 movl %eax, -0x58(%rbp) movl -0x58(%rbp), %eax movl %eax, -0x54(%rbp) movl -0x54(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x60, %rsp popq %rbp retq nop
my_strnncollsp_8bit_bin: push rbp mov rbp, rsp sub rsp, 60h 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 rax, [rbp+var_18] mov [rbp+var_48], rax mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jnb short loc_36E38 mov rax, [rbp+var_20] mov [rbp+var_50], rax jmp short loc_36E40 loc_36E38: mov rax, [rbp+var_30] mov [rbp+var_50], rax loc_36E40: mov rax, [rbp+var_48] mov rcx, [rbp+var_50] mov [rbp+var_40], rcx add rax, rcx mov [rbp+var_38], rax loc_36E53: mov rax, [rbp+var_18] cmp rax, [rbp+var_38] jnb short loc_36E9E mov rax, [rbp+var_18] mov rcx, rax add rcx, 1 mov [rbp+var_18], rcx movzx eax, byte ptr [rax] mov rcx, [rbp+var_28] mov rdx, rcx add rdx, 1 mov [rbp+var_28], rdx movzx ecx, byte ptr [rcx] cmp eax, ecx jz short loc_36E9C mov rax, [rbp+var_18] movzx eax, byte ptr [rax-1] mov rcx, [rbp+var_28] movzx ecx, byte ptr [rcx-1] sub eax, ecx mov [rbp+var_4], eax jmp short loc_36EF5 loc_36E9C: jmp short loc_36E53 loc_36E9E: mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jnz short loc_36EAF xor eax, eax mov [rbp+var_54], eax jmp short loc_36EEF loc_36EAF: mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jnb short loc_36ED5 mov rdi, [rbp+var_28] mov rsi, [rbp+var_30] sub rsi, [rbp+var_40] call my_strnncollsp_padspace_bin mov ecx, eax xor eax, eax sub eax, ecx mov [rbp+var_58], eax jmp short loc_36EE9 loc_36ED5: mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] sub rsi, [rbp+var_40] call my_strnncollsp_padspace_bin mov [rbp+var_58], eax loc_36EE9: mov eax, [rbp+var_58] mov [rbp+var_54], eax loc_36EEF: mov eax, [rbp+var_54] mov [rbp+var_4], eax loc_36EF5: mov eax, [rbp+var_4] add rsp, 60h pop rbp retn
long long my_strnncollsp_8bit_bin( long long a1, unsigned __int8 *a2, unsigned long long a3, unsigned __int8 *a4, unsigned long long a5) { unsigned __int8 *v5; // rax unsigned __int8 *v6; // rcx unsigned long long v10; // [rsp+10h] [rbp-50h] unsigned __int8 *v12; // [rsp+48h] [rbp-18h] v12 = a2; if ( a3 >= a5 ) v10 = a5; else v10 = a3; while ( v12 < &a2[v10] ) { v5 = v12++; v6 = a4++; if ( *v5 != *v6 ) return (unsigned int)(*(v12 - 1) - *(a4 - 1)); } if ( a3 == a5 ) { return 0; } else if ( a3 >= a5 ) { return (unsigned int)my_strnncollsp_padspace_bin(v12, a3 - v10); } else { return (unsigned int)-(int)my_strnncollsp_padspace_bin(a4, a5 - v10); } }
my_strnncollsp_8bit_bin: 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 MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x30] JNC 0x00136e38 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x50],RAX JMP 0x00136e40 LAB_00136e38: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x50],RAX LAB_00136e40: MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x40],RCX ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX LAB_00136e53: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x38] JNC 0x00136e9e MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x28] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x28],RDX MOVZX ECX,byte ptr [RCX] CMP EAX,ECX JZ 0x00136e9c MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + -0x1] MOV RCX,qword ptr [RBP + -0x28] MOVZX ECX,byte ptr [RCX + -0x1] SUB EAX,ECX MOV dword ptr [RBP + -0x4],EAX JMP 0x00136ef5 LAB_00136e9c: JMP 0x00136e53 LAB_00136e9e: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00136eaf XOR EAX,EAX MOV dword ptr [RBP + -0x54],EAX JMP 0x00136eef LAB_00136eaf: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x30] JNC 0x00136ed5 MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x30] SUB RSI,qword ptr [RBP + -0x40] CALL 0x00136660 MOV ECX,EAX XOR EAX,EAX SUB EAX,ECX MOV dword ptr [RBP + -0x58],EAX JMP 0x00136ee9 LAB_00136ed5: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] SUB RSI,qword ptr [RBP + -0x40] CALL 0x00136660 MOV dword ptr [RBP + -0x58],EAX LAB_00136ee9: MOV EAX,dword ptr [RBP + -0x58] MOV dword ptr [RBP + -0x54],EAX LAB_00136eef: MOV EAX,dword ptr [RBP + -0x54] MOV dword ptr [RBP + -0x4],EAX LAB_00136ef5: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x60 POP RBP RET
int my_strnncollsp_8bit_bin (int8 param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5) { byte *pbVar1; byte *pbVar2; int local_60; int local_5c; ulong local_58; byte *local_30; byte *local_20; local_58 = param_5; if (param_3 < param_5) { local_58 = param_3; } pbVar1 = param_4; pbVar2 = param_2; do { local_20 = pbVar2; local_30 = pbVar1; if (param_2 + local_58 <= local_20) { if (param_3 == param_5) { local_5c = 0; } else { if (param_3 < param_5) { local_60 = my_strnncollsp_padspace_bin(local_30,param_5 - local_58); local_60 = -local_60; } else { local_60 = my_strnncollsp_padspace_bin(local_20,param_3 - local_58); } local_5c = local_60; } return local_5c; } pbVar1 = local_30 + 1; pbVar2 = local_20 + 1; } while (*local_20 == *local_30); return (uint)*local_20 - (uint)*local_30; }
13,232
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; }
O3
c
rw_pr_unlock: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx cmpb $0x0, 0x60(%rdi) je 0x389d0 movb $0x0, 0x60(%rbx) cmpl $0x0, 0x5c(%rbx) je 0x389dd leaq 0x28(%rbx), %rdi callq 0x33040 jmp 0x389dd movq %rbx, %rdi callq 0x334a0 decl 0x58(%rbx) je 0x389bf movq %rbx, %rdi callq 0x33210 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq nop
rw_pr_unlock: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi cmp byte ptr [rdi+60h], 0 jz short loc_389D0 mov byte ptr [rbx+60h], 0 loc_389BF: cmp dword ptr [rbx+5Ch], 0 jz short loc_389DD lea rdi, [rbx+28h] call _pthread_cond_signal jmp short loc_389DD loc_389D0: mov rdi, rbx call _pthread_mutex_lock dec dword ptr [rbx+58h] jz short loc_389BF loc_389DD: mov rdi, rbx call _pthread_mutex_unlock xor eax, eax add rsp, 8 pop rbx pop rbp retn
long long rw_pr_unlock(long long a1) { if ( *(_BYTE *)(a1 + 96) ) { *(_BYTE *)(a1 + 96) = 0; } else { pthread_mutex_lock(a1); if ( (*(_DWORD *)(a1 + 88))-- != 1 ) goto LABEL_6; } if ( *(_DWORD *)(a1 + 92) ) pthread_cond_signal(a1 + 40); LABEL_6: pthread_mutex_unlock(a1); return 0LL; }
rw_pr_unlock: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI CMP byte ptr [RDI + 0x60],0x0 JZ 0x001389d0 MOV byte ptr [RBX + 0x60],0x0 LAB_001389bf: CMP dword ptr [RBX + 0x5c],0x0 JZ 0x001389dd LEA RDI,[RBX + 0x28] CALL 0x00133040 JMP 0x001389dd LAB_001389d0: MOV RDI,RBX CALL 0x001334a0 DEC dword ptr [RBX + 0x58] JZ 0x001389bf LAB_001389dd: MOV RDI,RBX CALL 0x00133210 XOR EAX,EAX ADD RSP,0x8 POP RBX POP RBP RET
int8 rw_pr_unlock(pthread_mutex_t *param_1) { int *piVar1; if (*(char *)((long)param_1 + 0x60) == '\0') { pthread_mutex_lock(param_1); piVar1 = (int *)((long)param_1 + 0x58); *piVar1 = *piVar1 + -1; if (*piVar1 != 0) goto LAB_001389dd; } else { *(int1 *)((long)param_1 + 0x60) = 0; } if (*(int *)((long)param_1 + 0x5c) != 0) { pthread_cond_signal((pthread_cond_t *)(param_1 + 1)); } LAB_001389dd: pthread_mutex_unlock(param_1); return 0; }
13,233
inline_mysql_file_create
eloqsql/include/mysql/psi/mysql_file.h
static inline File inline_mysql_file_create( #ifdef HAVE_PSI_FILE_INTERFACE PSI_file_key key, const char *src_file, uint src_line, #endif const char *filename, int create_flags, int access_flags, myf myFlags) { File file; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_CREATE, filename, &locker); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); file= my_create(filename, create_flags, access_flags, myFlags); PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file); return file; } #endif file= my_create(filename, create_flags, access_flags, myFlags); return file; }
O0
c
inline_mysql_file_create: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq 0x10(%rbp), %rax movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movl %r9d, -0x28(%rbp) leaq 0x292204(%rip), %rax # 0x2c75a0 movq (%rax), %rax movq 0x148(%rax), %rax movl -0x8(%rbp), %esi movq -0x20(%rbp), %rcx leaq -0x80(%rbp), %rdi xorl %edx, %edx leaq -0x38(%rbp), %r8 callq *%rax movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x35433 leaq 0x2921bc(%rip), %rax # 0x2c75a0 movq (%rax), %rax movq 0x1f0(%rax), %rax movq -0x38(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx callq *%rax movq -0x20(%rbp), %rdi movl -0x24(%rbp), %esi movl -0x28(%rbp), %edx movq 0x10(%rbp), %rcx callq 0xf16e0 movl %eax, -0x2c(%rbp) leaq 0x292188(%rip), %rax # 0x2c75a0 movq (%rax), %rax movq 0x200(%rax), %rax movq -0x38(%rbp), %rdi movl -0x2c(%rbp), %esi callq *%rax movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x3544f movq -0x20(%rbp), %rdi movl -0x24(%rbp), %esi movl -0x28(%rbp), %edx movq 0x10(%rbp), %rcx callq 0xf16e0 movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x80, %rsp popq %rbp retq nopl (%rax,%rax)
inline_mysql_file_create: push rbp mov rbp, rsp sub rsp, 80h mov rax, [rbp+arg_0] mov [rbp+var_8], edi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov [rbp+var_28], r9d lea rax, PSI_server mov rax, [rax] mov rax, [rax+148h] mov esi, [rbp+var_8] mov rcx, [rbp+var_20] lea rdi, [rbp+var_80] xor edx, edx lea r8, [rbp+var_38] call rax mov [rbp+var_38], rax cmp [rbp+var_38], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_35433 lea rax, PSI_server mov rax, [rax] mov rax, [rax+1F0h] mov rdi, [rbp+var_38] mov rsi, [rbp+var_10] mov edx, [rbp+var_14] call rax mov rdi, [rbp+var_20] mov esi, [rbp+var_24] mov edx, [rbp+var_28] mov rcx, [rbp+arg_0] call my_create mov [rbp+var_2C], eax lea rax, PSI_server mov rax, [rax] mov rax, [rax+200h] mov rdi, [rbp+var_38] mov esi, [rbp+var_2C] call rax mov eax, [rbp+var_2C] mov [rbp+var_4], eax jmp short loc_3544F loc_35433: mov rdi, [rbp+var_20] mov esi, [rbp+var_24] mov edx, [rbp+var_28] mov rcx, [rbp+arg_0] call my_create mov [rbp+var_2C], eax mov eax, [rbp+var_2C] mov [rbp+var_4], eax loc_3544F: mov eax, [rbp+var_4] add rsp, 80h pop rbp retn
long long inline_mysql_file_create( unsigned int a1, long long a2, unsigned int a3, long long a4, unsigned int a5, unsigned int a6, long long a7) { _BYTE v8[72]; // [rsp+0h] [rbp-80h] BYREF long long v9; // [rsp+48h] [rbp-38h] BYREF unsigned int v10; // [rsp+54h] [rbp-2Ch] unsigned int v11; // [rsp+58h] [rbp-28h] unsigned int v12; // [rsp+5Ch] [rbp-24h] long long v13; // [rsp+60h] [rbp-20h] unsigned int v14; // [rsp+6Ch] [rbp-14h] long long v15; // [rsp+70h] [rbp-10h] unsigned int v16; // [rsp+78h] [rbp-8h] v16 = a1; v15 = a2; v14 = a3; v13 = a4; v12 = a5; v11 = a6; v9 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, long long, long long *))PSI_server[41])(v8, a1, 0LL, a4, &v9); if ( v9 ) { ((void ( *)(long long, long long, _QWORD))PSI_server[62])(v9, v15, v14); v10 = my_create(v13, v12, v11, a7); ((void ( *)(long long, _QWORD))PSI_server[64])(v9, v10); } else { return (unsigned int)my_create(v13, v12, v11, a7); } return v10; }
inline_mysql_file_create: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV RAX,qword ptr [RBP + 0x10] MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV dword ptr [RBP + -0x28],R9D LEA RAX,[0x3c75a0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x148] MOV ESI,dword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x20] LEA RDI,[RBP + -0x80] XOR EDX,EDX LEA R8,[RBP + -0x38] CALL RAX MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00135433 LEA RAX,[0x3c75a0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1f0] MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] CALL RAX MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x24] MOV EDX,dword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + 0x10] CALL 0x001f16e0 MOV dword ptr [RBP + -0x2c],EAX LEA RAX,[0x3c75a0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x200] MOV RDI,qword ptr [RBP + -0x38] MOV ESI,dword ptr [RBP + -0x2c] CALL RAX MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x4],EAX JMP 0x0013544f LAB_00135433: MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x24] MOV EDX,dword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + 0x10] CALL 0x001f16e0 MOV dword ptr [RBP + -0x2c],EAX MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x4],EAX LAB_0013544f: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x80 POP RBP RET
int4 inline_mysql_file_create (int4 param_1,int8 param_2,int4 param_3,int8 param_4, int4 param_5,int4 param_6,int8 param_7) { int1 local_88 [72]; long local_40; int4 local_34; int4 local_30; int4 local_2c; int8 local_28; int4 local_1c; int8 local_18; int4 local_10; int4 local_c; local_30 = param_6; local_2c = param_5; local_28 = param_4; local_1c = param_3; local_18 = param_2; local_10 = param_1; local_40 = (**(code **)(PSI_server + 0x148))(local_88,param_1,0,param_4,&local_40); if (local_40 == 0) { local_c = my_create(local_28,local_2c,local_30,param_7); } else { (**(code **)(PSI_server + 0x1f0))(local_40,local_18,local_1c); local_34 = my_create(local_28,local_2c,local_30,param_7); (**(code **)(PSI_server + 0x200))(local_40,local_34); local_c = local_34; } return local_c; }
13,234
mi_check_status
eloqsql/storage/myisam/mi_locking.c
my_bool mi_check_status(void *param) { MI_INFO *info=(MI_INFO*) param; DBUG_ENTER("mi_check_status"); DBUG_PRINT("info",("dellink: %ld r_locks: %u w_locks: %u", (long) info->s->state.dellink, (uint) info->s->r_locks, (uint) info->s->w_locks)); /* The test for w_locks == 1 is here because this thread has already done an external lock (in other words: w_locks == 1 means no other threads has a write lock) */ DBUG_RETURN((my_bool) !(info->s->state.dellink == HA_OFFSET_ERROR || (myisam_concurrent_insert == 2 && info->s->r_locks && info->s->w_locks == 1))); }
O0
c
mi_check_status: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0xd4572 jmp 0xd4574 movq -0x10(%rbp), %rax movq (%rax), %rcx movb $0x1, %al cmpq $-0x1, 0x58(%rcx) movb %al, -0x11(%rbp) je 0xd45c8 xorl %eax, %eax leaq 0x220590(%rip), %rcx # 0x2f4b20 cmpq $0x2, (%rcx) movb %al, -0x12(%rbp) jne 0xd45c2 movq -0x10(%rbp), %rax movq (%rax), %rcx xorl %eax, %eax cmpl $0x0, 0x364(%rcx) movb %al, -0x12(%rbp) je 0xd45c2 movq -0x10(%rbp), %rax movq (%rax), %rax cmpl $0x1, 0x360(%rax) sete %al movb %al, -0x12(%rbp) movb -0x12(%rbp), %al movb %al, -0x11(%rbp) movb -0x11(%rbp), %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax movb %al, -0x13(%rbp) movb -0x13(%rbp), %al popq %rbp retq nopw (%rax,%rax)
mi_check_status: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax jmp short $+2 loc_D4572: jmp short $+2 loc_D4574: mov rax, [rbp+var_10] mov rcx, [rax] mov al, 1 cmp qword ptr [rcx+58h], 0FFFFFFFFFFFFFFFFh mov [rbp+var_11], al jz short loc_D45C8 xor eax, eax lea rcx, myisam_concurrent_insert cmp qword ptr [rcx], 2 mov [rbp+var_12], al jnz short loc_D45C2 mov rax, [rbp+var_10] mov rcx, [rax] xor eax, eax cmp dword ptr [rcx+364h], 0 mov [rbp+var_12], al jz short loc_D45C2 mov rax, [rbp+var_10] mov rax, [rax] cmp dword ptr [rax+360h], 1 setz al mov [rbp+var_12], al loc_D45C2: mov al, [rbp+var_12] mov [rbp+var_11], al loc_D45C8: mov al, [rbp+var_11] xor al, 0FFh and al, 1 movzx eax, al mov [rbp+var_13], al mov al, [rbp+var_13] pop rbp retn
_BOOL8 mi_check_status(long long a1) { bool v2; // [rsp+2h] [rbp-12h] char v3; // [rsp+3h] [rbp-11h] v3 = 1; if ( *(_QWORD *)(*(_QWORD *)a1 + 88LL) != -1LL ) { v2 = 0; if ( myisam_concurrent_insert == 2LL ) { v2 = 0; if ( *(_DWORD *)(*(_QWORD *)a1 + 868LL) ) v2 = *(_DWORD *)(*(_QWORD *)a1 + 864LL) == 1; } v3 = v2; } return (v3 & 1) == 0; }
mi_check_status: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX JMP 0x001d4572 LAB_001d4572: JMP 0x001d4574 LAB_001d4574: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] MOV AL,0x1 CMP qword ptr [RCX + 0x58],-0x1 MOV byte ptr [RBP + -0x11],AL JZ 0x001d45c8 XOR EAX,EAX LEA RCX,[0x3f4b20] CMP qword ptr [RCX],0x2 MOV byte ptr [RBP + -0x12],AL JNZ 0x001d45c2 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] XOR EAX,EAX CMP dword ptr [RCX + 0x364],0x0 MOV byte ptr [RBP + -0x12],AL JZ 0x001d45c2 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0x360],0x1 SETZ AL MOV byte ptr [RBP + -0x12],AL LAB_001d45c2: MOV AL,byte ptr [RBP + -0x12] MOV byte ptr [RBP + -0x11],AL LAB_001d45c8: MOV AL,byte ptr [RBP + -0x11] XOR AL,0xff AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x13],AL MOV AL,byte ptr [RBP + -0x13] POP RBP RET
byte mi_check_status(long *param_1) { int1 local_1a; int1 local_19; local_19 = true; if (*(long *)(*param_1 + 0x58) != -1) { local_1a = false; if ((myisam_concurrent_insert == 2) && (local_1a = false, *(int *)(*param_1 + 0x364) != 0)) { local_1a = *(int *)(*param_1 + 0x360) == 1; } local_19 = local_1a; } return (local_19 ^ 0xffU) & 1; }
13,235
mi_ft_parse
eloqsql/storage/myisam/ft_update.c
uint _mi_ft_parse(TREE *parsed, MI_INFO *info, uint keynr, const uchar *record, MYSQL_FTPARSER_PARAM *param, MEM_ROOT *mem_root) { FT_SEG_ITERATOR ftsi; struct st_mysql_ftparser *parser; DBUG_ENTER("_mi_ft_parse"); _mi_ft_segiterator_init(info, keynr, record, &ftsi); ft_parse_init(parsed, info->s->keyinfo[keynr].seg->charset); parser= info->s->keyinfo[keynr].parser; while (_mi_ft_segiterator(&ftsi)) { if (ftsi.pos) if (ft_parse(parsed, (uchar *)ftsi.pos, ftsi.len, parser, param, mem_root)) DBUG_RETURN(1); } DBUG_RETURN(0); }
O3
c
mi_ft_parse: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %r9, %rbx movq %r8, %r14 movq %rsi, -0x30(%rbp) movq %rdi, %r15 movq (%rsi), %rax movq 0x218(%rax), %rax movl %edx, %edx imulq $0x70, %rdx, %r13 movzwl 0x8(%rax,%r13), %edx leaq -0x50(%rbp), %r12 movl %edx, (%r12) movq 0x28(%rax,%r13), %rax movq %rax, 0x8(%r12) movq %rcx, 0x10(%r12) movq $0x0, 0x18(%r12) movl $0x0, 0x4(%r12) movq (%rax), %rsi callq 0x76a6a movq -0x30(%rbp), %rax movq (%rax), %rax movq 0x218(%rax), %rax movq 0x38(%rax,%r13), %r13 movq %r12, %rdi callq 0x76e3e xorl %ecx, %ecx testl %eax, %eax je 0x76fb2 movq -0x38(%rbp), %rsi testq %rsi, %rsi je 0x76f9d movl -0x4c(%rbp), %edx movq %r15, %rdi movq %r13, %rcx movq %r14, %r8 movq %rbx, %r9 callq 0x76aba testl %eax, %eax jne 0x76fad movq %r12, %rdi callq 0x76e3e testl %eax, %eax jne 0x76f7c xorl %ecx, %ecx jmp 0x76fb2 movl $0x1, %ecx movl %ecx, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_mi_ft_parse: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, r9 mov r14, r8 mov [rbp+var_30], rsi mov r15, rdi mov rax, [rsi] mov rax, [rax+218h] mov edx, edx imul r13, rdx, 70h ; 'p' movzx edx, word ptr [rax+r13+8] lea r12, [rbp+var_50] mov [r12], edx mov rax, [rax+r13+28h] mov [r12+8], rax mov [r12+10h], rcx mov qword ptr [r12+18h], 0 mov dword ptr [r12+4], 0 mov rsi, [rax] call ft_parse_init mov rax, [rbp+var_30] mov rax, [rax] mov rax, [rax+218h] mov r13, [rax+r13+38h] mov rdi, r12 call _mi_ft_segiterator xor ecx, ecx test eax, eax jz short loc_76FB2 loc_76F7C: mov rsi, [rbp+var_38] test rsi, rsi jz short loc_76F9D mov edx, [rbp+var_4C] mov rdi, r15 mov rcx, r13 mov r8, r14 mov r9, rbx call ft_parse test eax, eax jnz short loc_76FAD loc_76F9D: mov rdi, r12 call _mi_ft_segiterator test eax, eax jnz short loc_76F7C xor ecx, ecx jmp short loc_76FB2 loc_76FAD: mov ecx, 1 loc_76FB2: mov eax, ecx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mi_ft_parse(_QWORD *a1, long long a2, unsigned int a3, long long a4, long long a5, long long a6) { long long v8; // rax long long v9; // r13 long long v10; // r13 int v11; // eax unsigned int v12; // ecx int v14; // [rsp+0h] [rbp-50h] BYREF int v15; // [rsp+4h] [rbp-4Ch] long long *v16; // [rsp+8h] [rbp-48h] long long v17; // [rsp+10h] [rbp-40h] long long v18; // [rsp+18h] [rbp-38h] long long v19; // [rsp+20h] [rbp-30h] v19 = a2; v8 = *(_QWORD *)(*(_QWORD *)a2 + 536LL); v9 = 112LL * a3; v14 = *(unsigned __int16 *)(v8 + v9 + 8); v16 = *(long long **)(v8 + v9 + 40); v17 = a4; v18 = 0LL; v15 = 0; ft_parse_init(a1, *v16); v10 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a2 + 536LL) + v9 + 56); v11 = mi_ft_segiterator((long long)&v14); v12 = 0; if ( v11 ) { while ( !v18 || !(unsigned int)ft_parse((long long)a1, v18, v15, v10, a5, a6) ) { if ( !(unsigned int)mi_ft_segiterator((long long)&v14) ) return 0; } return 1; } return v12; }
_mi_ft_parse: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,R9 MOV R14,R8 MOV qword ptr [RBP + -0x30],RSI MOV R15,RDI MOV RAX,qword ptr [RSI] MOV RAX,qword ptr [RAX + 0x218] MOV EDX,EDX IMUL R13,RDX,0x70 MOVZX EDX,word ptr [RAX + R13*0x1 + 0x8] LEA R12,[RBP + -0x50] MOV dword ptr [R12],EDX MOV RAX,qword ptr [RAX + R13*0x1 + 0x28] MOV qword ptr [R12 + 0x8],RAX MOV qword ptr [R12 + 0x10],RCX MOV qword ptr [R12 + 0x18],0x0 MOV dword ptr [R12 + 0x4],0x0 MOV RSI,qword ptr [RAX] CALL 0x00176a6a MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV R13,qword ptr [RAX + R13*0x1 + 0x38] MOV RDI,R12 CALL 0x00176e3e XOR ECX,ECX TEST EAX,EAX JZ 0x00176fb2 LAB_00176f7c: MOV RSI,qword ptr [RBP + -0x38] TEST RSI,RSI JZ 0x00176f9d MOV EDX,dword ptr [RBP + -0x4c] MOV RDI,R15 MOV RCX,R13 MOV R8,R14 MOV R9,RBX CALL 0x00176aba TEST EAX,EAX JNZ 0x00176fad LAB_00176f9d: MOV RDI,R12 CALL 0x00176e3e TEST EAX,EAX JNZ 0x00176f7c XOR ECX,ECX JMP 0x00176fb2 LAB_00176fad: MOV ECX,0x1 LAB_00176fb2: MOV EAX,ECX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 _mi_ft_parse(int8 param_1,long *param_2,uint param_3,int8 param_4,int8 param_5, int8 param_6) { int8 uVar1; int iVar2; long lVar3; uint local_58; int4 local_54; int8 *local_50; int8 local_48; long local_40; long *local_38; lVar3 = (ulong)param_3 * 0x70; local_58 = (uint)*(ushort *)(*(long *)(*param_2 + 0x218) + 8 + lVar3); local_50 = *(int8 **)(*(long *)(*param_2 + 0x218) + 0x28 + lVar3); local_40 = 0; local_54 = 0; local_48 = param_4; local_38 = param_2; ft_parse_init(param_1,*local_50); uVar1 = *(int8 *)(*(long *)(*local_38 + 0x218) + 0x38 + lVar3); iVar2 = _mi_ft_segiterator(&local_58); while( true ) { if (iVar2 == 0) { return 0; } if ((local_40 != 0) && (iVar2 = ft_parse(param_1,local_40,local_54,uVar1,param_5,param_6), iVar2 != 0)) break; iVar2 = _mi_ft_segiterator(&local_58); } return 1; }
13,236
evmone::Result evmone::instr::core::call_impl<(evmone::Opcode)241>(evmone::StackTop, long, evmone::ExecutionState&)
corpus-core[P]colibri-stateless/build_O2/_deps/evmone_external-src/lib/evmone/instructions_calls.cpp
Result call_impl(StackTop stack, int64_t gas_left, ExecutionState& state) noexcept { static_assert( Op == OP_CALL || Op == OP_CALLCODE || Op == OP_DELEGATECALL || Op == OP_STATICCALL); const auto gas = stack.pop(); const auto dst = intx::be::trunc<evmc::address>(stack.pop()); const auto value = (Op == OP_STATICCALL || Op == OP_DELEGATECALL) ? 0 : stack.pop(); const auto has_value = value != 0; const auto input_offset_u256 = stack.pop(); const auto input_size_u256 = stack.pop(); const auto output_offset_u256 = stack.pop(); const auto output_size_u256 = stack.pop(); stack.push(0); // Assume failure. state.return_data.clear(); if (state.rev >= EVMC_BERLIN && state.host.access_account(dst) == EVMC_ACCESS_COLD) { if ((gas_left -= instr::additional_cold_account_access_cost) < 0) return {EVMC_OUT_OF_GAS, gas_left}; } const auto target_addr_or_result = get_target_address(dst, gas_left, state); if (const auto* result = std::get_if<Result>(&target_addr_or_result)) return *result; const auto* addr_ptr = std::get_if<evmc::address>(&target_addr_or_result); const auto& code_addr = *addr_ptr; if (!check_memory(gas_left, state.memory, input_offset_u256, input_size_u256)) return {EVMC_OUT_OF_GAS, gas_left}; if (!check_memory(gas_left, state.memory, output_offset_u256, output_size_u256)) return {EVMC_OUT_OF_GAS, gas_left}; const auto input_offset = static_cast<size_t>(input_offset_u256); const auto input_size = static_cast<size_t>(input_size_u256); const auto output_offset = static_cast<size_t>(output_offset_u256); const auto output_size = static_cast<size_t>(output_size_u256); evmc_message msg{.kind = to_call_kind(Op)}; msg.flags = (Op == OP_STATICCALL) ? uint32_t{EVMC_STATIC} : state.msg->flags; if (dst != code_addr) msg.flags |= EVMC_DELEGATED; else msg.flags &= ~std::underlying_type_t<evmc_flags>{EVMC_DELEGATED}; msg.depth = state.msg->depth + 1; msg.recipient = (Op == OP_CALL || Op == OP_STATICCALL) ? dst : state.msg->recipient; msg.code_address = code_addr; msg.sender = (Op == OP_DELEGATECALL) ? state.msg->sender : state.msg->recipient; msg.value = (Op == OP_DELEGATECALL) ? state.msg->value : intx::be::store<evmc::uint256be>(value); if (input_size > 0) { // input_offset may be garbage if input_size == 0. msg.input_data = &state.memory[input_offset]; msg.input_size = input_size; } auto cost = has_value ? CALL_VALUE_COST : 0; if constexpr (Op == OP_CALL) { if (has_value && state.in_static_mode()) return {EVMC_STATIC_MODE_VIOLATION, gas_left}; if ((has_value || state.rev < EVMC_SPURIOUS_DRAGON) && !state.host.account_exists(dst)) cost += ACCOUNT_CREATION_COST; } if ((gas_left -= cost) < 0) return {EVMC_OUT_OF_GAS, gas_left}; msg.gas = std::numeric_limits<int64_t>::max(); if (gas < msg.gas) msg.gas = static_cast<int64_t>(gas); if (state.rev >= EVMC_TANGERINE_WHISTLE) // TODO: Always true for STATICCALL. msg.gas = std::min(msg.gas, gas_left - gas_left / 64); else if (msg.gas > gas_left) return {EVMC_OUT_OF_GAS, gas_left}; if (has_value) { msg.gas += 2300; // Add stipend. gas_left += 2300; } if (state.msg->depth >= 1024) return {EVMC_SUCCESS, gas_left}; // "Light" failure. if (has_value && intx::be::load<uint256>(state.host.get_balance(state.msg->recipient)) < value) return {EVMC_SUCCESS, gas_left}; // "Light" failure. const auto result = state.host.call(msg); state.return_data.assign(result.output_data, result.output_size); stack.top() = result.status_code == EVMC_SUCCESS; if (const auto copy_size = std::min(output_size, result.output_size); copy_size > 0) std::memcpy(&state.memory[output_offset], result.output_data, copy_size); const auto gas_used = msg.gas - result.gas_left; gas_left -= gas_used; state.gas_refund += result.gas_refund; return {EVMC_SUCCESS, gas_left}; }
O2
cpp
evmone::Result evmone::instr::core::call_impl<(evmone::Opcode)241>(evmone::StackTop, long, evmone::ExecutionState&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x268, %rsp # imm = 0x268 movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r14 movq %rsi, 0x10(%rsp) leaq -0x20(%rdi), %rsi movups (%rdi), %xmm0 movups 0x10(%rdi), %xmm1 movaps %xmm1, 0xe0(%rsp) movaps %xmm0, 0xd0(%rsp) leaq 0x1c(%rsp), %rdi callq 0x3a597 movups -0x40(%r14), %xmm0 movups -0x30(%r14), %xmm1 leaq 0xf0(%rsp), %rdi movaps %xmm1, 0x10(%rdi) movaps %xmm0, (%rdi) leaq 0x178(%rsp), %rsi andl $0x0, (%rsi) callq 0x37ff4 movl %eax, %ebp movups -0x60(%r14), %xmm0 movups -0x50(%r14), %xmm1 movaps %xmm1, 0xc0(%rsp) movaps %xmm0, 0xb0(%rsp) movups -0x80(%r14), %xmm0 movups -0x70(%r14), %xmm1 movaps %xmm1, 0xa0(%rsp) movaps %xmm0, 0x90(%rsp) movups -0xa0(%r14), %xmm0 movups -0x90(%r14), %xmm1 movaps %xmm1, 0x80(%rsp) movaps %xmm0, 0x70(%rsp) movdqu -0xc0(%r14), %xmm0 movdqu -0xb0(%r14), %xmm1 movdqa %xmm1, 0x60(%rsp) movdqa %xmm0, 0x50(%rsp) pxor %xmm0, %xmm0 movdqu %xmm0, -0xc0(%r14) movdqu %xmm0, -0xb0(%r14) andq $0x0, 0x50(%rbx) movq 0x48(%rbx), %rax movb $0x0, (%rax) cmpl $0x8, 0x40(%rbx) jl 0x40d7c leaq 0x28(%rbx), %rdi leaq 0x1c(%rsp), %rsi callq 0x2e6a8 testl %eax, %eax jne 0x40d7c leaq -0x9c4(%r15), %r12 movq %r12, 0x10(%rsp) cmpq $0x9c4, %r15 # imm = 0x9C4 jge 0x40d7c pushq $0x3 popq %r13 jmp 0x40f24 leaq 0x110(%rsp), %r15 leaq 0x1c(%rsp), %rsi leaq 0x10(%rsp), %rdx movq %r15, %rdi movq %rbx, %rcx callq 0x40b90 movb 0x18(%r15), %al cmpb $0x1, %al jne 0x40db6 movl 0x110(%rsp), %r13d movq 0x118(%rsp), %r12 jmp 0x40f24 pushq $0x3 popq %r13 xorl %r12d, %r12d testb %al, %al cmoveq %r15, %r12 leaq 0x8(%rbx), %r15 leaq 0x10(%rsp), %rdi leaq 0xb0(%rsp), %rdx leaq 0x90(%rsp), %rcx movq %r15, %rsi callq 0x3a338 testb %al, %al je 0x40f1f leaq 0x10(%rsp), %rdi leaq 0x70(%rsp), %rdx leaq 0x50(%rsp), %rcx movq %r15, %rsi callq 0x3a338 testb %al, %al je 0x40f1f movb %bpl, 0xf(%rsp) movq 0xb0(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x90(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x38(%rsp) leaq 0x178(%rsp), %r13 movl $0xb8, %edx movq %r13, %rdi xorl %esi, %esi callq 0x22120 movq 0x20(%rbx), %rax movl 0x4(%rax), %ebp leaq 0x1c(%rsp), %rdi movq %r12, %rsi callq 0x41172 andl $-0x3, %ebp movzbl %al, %eax leal (%rbp,%rax,2), %eax movq %r15, %rbp movl %eax, 0x4(%r13) movq 0x20(%rbx), %rax movl 0x8(%rax), %ecx incl %ecx movl %ecx, 0x8(%r13) leaq 0x1c(%rsp), %rcx movups (%rcx), %xmm0 movups %xmm0, 0x18(%r13) movl 0x10(%rcx), %ecx movl %ecx, 0x28(%r13) movups (%r12), %xmm0 movups %xmm0, 0x90(%r13) movl 0x10(%r12), %ecx movl %ecx, 0xa0(%r13) movdqu 0x18(%rax), %xmm0 movdqu %xmm0, 0x2c(%r13) movl 0x28(%rax), %eax movl %eax, 0x3c(%r13) leaq 0x1c8(%rsp), %rdi leaq 0xf0(%rsp), %rsi callq 0x3b31f movq 0x48(%rsp), %rax testq %rax, %rax je 0x40efe movq 0x40(%rsp), %rcx addq (%rbp), %rcx movq %rcx, 0x1b8(%rsp) movq %rax, 0x1c0(%rsp) xorl %eax, %eax movl $0x2328, %r15d # imm = 0x2328 cmpb $0x0, 0xf(%rsp) cmoveq %rax, %r15 je 0x40f3c movq 0x20(%rbx), %rax testb $0x1, 0x4(%rax) je 0x40f42 pushq $0xb popq %r13 movq 0x10(%rsp), %r12 movl %r13d, %eax movq %r12, %rdx addq $0x268, %rsp # imm = 0x268 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpl $0x2, 0x40(%rbx) jg 0x40f5f leaq 0x28(%rbx), %rdi leaq 0x1c(%rsp), %rsi callq 0x2e4f0 leaq 0x61a8(%r15), %rcx testb %al, %al cmovneq %r15, %rcx jmp 0x40f61 xorl %ecx, %ecx movq 0x10(%rsp), %r12 subq %rcx, %r12 movq %r12, 0x10(%rsp) pushq $0x3 popq %r13 js 0x40f24 leaq 0x188(%rsp), %rsi movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF movq %rax, (%rsi) leaq 0xd0(%rsp), %rdi callq 0x3adb5 testb %al, %al je 0x40faa movq 0xd0(%rsp), %rax movq %rax, 0x188(%rsp) cmpl $0x2, 0x40(%rbx) jl 0x40fdc movq 0x10(%rsp), %r12 pushq $-0x40 popq %rcx movq %r12, %rax cqto idivq %rcx addq %r12, %rax movq 0x188(%rsp), %rcx cmpq %rcx, %rax cmovgeq %rcx, %rax movq %rax, 0x188(%rsp) jmp 0x40ff2 movq 0x188(%rsp), %rax movq 0x10(%rsp), %r12 cmpq %r12, %rax jg 0x40f24 cmpb $0x0, 0xf(%rsp) je 0x41097 movl $0x8fc, %ecx # imm = 0x8FC addq %rcx, %rax movq %rax, 0x188(%rsp) addq %rcx, %r12 movq %r12, 0x10(%rsp) movq 0x20(%rbx), %rax xorl %r13d, %r13d cmpl $0x3ff, 0x8(%rax) # imm = 0x3FF jg 0x40f24 leaq 0x28(%rbx), %rsi movl 0x28(%rax), %ecx leaq 0x230(%rsp), %rdx movl %ecx, 0x10(%rdx) movups 0x18(%rax), %xmm0 movaps %xmm0, (%rdx) leaq 0x248(%rsp), %r15 movq %r15, %rdi callq 0x2e554 movdqu (%r15), %xmm0 movdqu 0x10(%r15), %xmm1 movdqa 0x3498b(%rip), %xmm2 # 0x759f0 pshufb %xmm2, %xmm1 leaq 0x130(%rsp), %rdi movdqa %xmm1, (%rdi) pshufb %xmm2, %xmm0 movdqa %xmm0, 0x10(%rdi) leaq 0xf0(%rsp), %rsi callq 0x39e57 testb %al, %al jne 0x40f1f jmp 0x410ab movq 0x20(%rbx), %rax xorl %r13d, %r13d cmpl $0x3ff, 0x8(%rax) # imm = 0x3FF jg 0x40f24 leaq 0x48(%rbx), %r15 leaq 0x28(%rbx), %rsi leaq 0x130(%rsp), %r12 leaq 0x178(%rsp), %rdx movq %r12, %rdi callq 0x2e606 movq 0x18(%r12), %rsi movq 0x20(%r12), %rdx movq %r15, %rdi callq 0x4117c leaq -0xc0(%r14), %rax addq $-0xb8, %r14 xorl %ecx, %ecx cmpl $0x0, 0x130(%rsp) sete %cl movq %rcx, (%rax) pxor %xmm0, %xmm0 movdqu %xmm0, (%r14) andq $0x0, 0x10(%r14) movq 0x150(%rsp), %rax movq 0x38(%rsp), %rdx cmpq %rdx, %rax cmovbq %rax, %rdx testq %rdx, %rdx je 0x41138 movq 0x30(%rsp), %rdi addq (%rbp), %rdi movq 0x148(%rsp), %rsi callq 0x221a0 leaq 0x130(%rsp), %rdi movq 0x8(%rdi), %r12 movq 0x10(%rdi), %rax subq 0x188(%rsp), %r12 addq 0x10(%rsp), %r12 movq %r12, 0x10(%rsp) addq %rax, (%rbx) callq 0x2d94c xorl %r13d, %r13d jmp 0x40f24 movq %rax, %rdi callq 0x2d941
_ZN6evmone5instr4core9call_implILNS_6OpcodeE241EEENS_6ResultENS_8StackTopElRNS_14ExecutionStateE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 268h mov rbx, rdx mov r15, rsi mov r14, rdi mov [rsp+298h+var_288], rsi lea rsi, [rdi-20h] movups xmm0, xmmword ptr [rdi] movups xmm1, xmmword ptr [rdi+10h] movaps [rsp+298h+var_1B8], xmm1 movaps [rsp+298h+var_1C8], xmm0 lea rdi, [rsp+298h+var_27C] call _ZN4intx2be5truncIN4evmc7addressELj256EEET_RKNS_4uintIXT0_EEE; intx::be::trunc<evmc::address,256u>(intx::uint<256u> const&) movups xmm0, xmmword ptr [r14-40h] movups xmm1, xmmword ptr [r14-30h] lea rdi, [rsp+298h+var_1A8] movaps xmmword ptr [rdi+10h], xmm1 movaps xmmword ptr [rdi], xmm0 lea rsi, [rsp+298h+var_120] and dword ptr [rsi], 0 call _ZN4intxneILj256EivEEbRKNS_4uintIXT_EEERKT0_; intx::operator!=<256u,int,void>(intx::uint<256u> const&,int const&) mov ebp, eax movups xmm0, xmmword ptr [r14-60h] movups xmm1, xmmword ptr [r14-50h] movaps [rsp+298h+var_1D8], xmm1 movaps [rsp+298h+var_1E8], xmm0 movups xmm0, xmmword ptr [r14-80h] movups xmm1, xmmword ptr [r14-70h] movaps [rsp+298h+var_1F8], xmm1 movaps [rsp+298h+var_208], xmm0 movups xmm0, xmmword ptr [r14-0A0h] movups xmm1, xmmword ptr [r14-90h] movaps [rsp+298h+var_218], xmm1 movaps [rsp+298h+var_228], xmm0 movdqu xmm0, xmmword ptr [r14-0C0h] movdqu xmm1, xmmword ptr [r14-0B0h] movdqa [rsp+298h+var_238], xmm1 movdqa [rsp+298h+var_248], xmm0 pxor xmm0, xmm0 movdqu xmmword ptr [r14-0C0h], xmm0 movdqu xmmword ptr [r14-0B0h], xmm0 and qword ptr [rbx+50h], 0 mov rax, [rbx+48h] mov byte ptr [rax], 0 cmp dword ptr [rbx+40h], 8 jl short loc_40D7C lea rdi, [rbx+28h] lea rsi, [rsp+298h+var_27C] call _ZN4evmc11HostContext14access_accountERKNS_7addressE; evmc::HostContext::access_account(evmc::address const&) test eax, eax jnz short loc_40D7C lea r12, [r15-9C4h] mov [rsp+298h+var_288], r12 cmp r15, 9C4h jge short loc_40D7C push 3 pop r13 jmp loc_40F24 loc_40D7C: lea r15, [rsp+298h+var_188] lea rsi, [rsp+298h+var_27C] lea rdx, [rsp+298h+var_288] mov rdi, r15 mov rcx, rbx call _ZN6evmone5instr4core12_GLOBAL__N_118get_target_addressERKN4evmc7addressERlRNS_14ExecutionStateE; evmone::instr::core::`anonymous namespace'::get_target_address(evmc::address const&,long &,evmone::ExecutionState &) mov al, [r15+18h] cmp al, 1 jnz short loc_40DB6 mov r13d, [rsp+298h+var_188] mov r12, [rsp+298h+var_180] jmp loc_40F24 loc_40DB6: push 3 pop r13 xor r12d, r12d test al, al cmovz r12, r15 lea r15, [rbx+8] lea rdi, [rsp+298h+var_288] lea rdx, [rsp+298h+var_1E8] lea rcx, [rsp+298h+var_208] mov rsi, r15 call _ZN6evmone12check_memoryERlRNS_6MemoryERKN4intx4uintILj256EEES7_; evmone::check_memory(long &,evmone::Memory &,intx::uint<256u> const&,intx::uint<256u> const&) test al, al jz loc_40F1F lea rdi, [rsp+298h+var_288] lea rdx, [rsp+298h+var_228] lea rcx, [rsp+298h+var_248] mov rsi, r15 call _ZN6evmone12check_memoryERlRNS_6MemoryERKN4intx4uintILj256EEES7_; evmone::check_memory(long &,evmone::Memory &,intx::uint<256u> const&,intx::uint<256u> const&) test al, al jz loc_40F1F mov [rsp+298h+var_289], bpl mov rax, qword ptr [rsp+298h+var_1E8] mov [rsp+298h+var_258], rax mov rax, qword ptr [rsp+298h+var_208] mov [rsp+298h+var_250], rax mov rax, qword ptr [rsp+298h+var_228] mov [rsp+298h+var_268], rax mov rax, qword ptr [rsp+298h+var_248] mov [rsp+298h+var_260], rax lea r13, [rsp+298h+var_120] mov edx, 0B8h mov rdi, r13 xor esi, esi call _memset mov rax, [rbx+20h] mov ebp, [rax+4] lea rdi, [rsp+298h+var_27C] mov rsi, r12 call _ZN4evmcneERKNS_7addressES2_; evmc::operator!=(evmc::address const&,evmc::address const&) and ebp, 0FFFFFFFDh movzx eax, al lea eax, [rbp+rax*2+0] mov rbp, r15 mov [r13+4], eax mov rax, [rbx+20h] mov ecx, [rax+8] inc ecx mov [r13+8], ecx lea rcx, [rsp+298h+var_27C] movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r13+18h], xmm0 mov ecx, [rcx+10h] mov [r13+28h], ecx movups xmm0, xmmword ptr [r12] movups xmmword ptr [r13+90h], xmm0 mov ecx, [r12+10h] mov [r13+0A0h], ecx movdqu xmm0, xmmword ptr [rax+18h] movdqu xmmword ptr [r13+2Ch], xmm0 mov eax, [rax+28h] mov [r13+3Ch], eax lea rdi, [rsp+298h+var_D0] lea rsi, [rsp+298h+var_1A8] call _ZN4intx2be5storeIN4evmc7bytes32ENS_4uintILj256EEEEET_RKT0_; intx::be::store<evmc::bytes32,intx::uint<256u>>(intx::uint<256u> const&) mov rax, [rsp+298h+var_250] test rax, rax jz short loc_40EFE mov rcx, [rsp+298h+var_258] add rcx, [rbp+0] mov [rsp+298h+var_E0], rcx mov [rsp+298h+var_D8], rax loc_40EFE: xor eax, eax mov r15d, 2328h cmp [rsp+298h+var_289], 0 cmovz r15, rax jz short loc_40F3C mov rax, [rbx+20h] test byte ptr [rax+4], 1 jz short loc_40F42 push 0Bh pop r13 loc_40F1F: mov r12, [rsp+298h+var_288] loc_40F24: mov eax, r13d mov rdx, r12 add rsp, 268h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_40F3C: cmp dword ptr [rbx+40h], 2 jg short loc_40F5F loc_40F42: lea rdi, [rbx+28h] lea rsi, [rsp+298h+var_27C] call _ZNK4evmc11HostContext14account_existsERKNS_7addressE; evmc::HostContext::account_exists(evmc::address const&) lea rcx, [r15+61A8h] test al, al cmovnz rcx, r15 jmp short loc_40F61 loc_40F5F: xor ecx, ecx loc_40F61: mov r12, [rsp+298h+var_288] sub r12, rcx mov [rsp+298h+var_288], r12 push 3 pop r13 js short loc_40F24 lea rsi, [rsp+298h+var_110] mov rax, 7FFFFFFFFFFFFFFFh mov [rsi], rax lea rdi, [rsp+298h+var_1C8] call _ZN4intxltILj256ElvEEbRKNS_4uintIXT_EEERKT0_; intx::operator<<256u,long,void>(intx::uint<256u> const&,long const&) test al, al jz short loc_40FAA mov rax, qword ptr [rsp+298h+var_1C8] mov [rsp+298h+var_110], rax loc_40FAA: cmp dword ptr [rbx+40h], 2 jl short loc_40FDC mov r12, [rsp+298h+var_288] push 0FFFFFFFFFFFFFFC0h pop rcx mov rax, r12 cqo idiv rcx add rax, r12 mov rcx, [rsp+298h+var_110] cmp rax, rcx cmovge rax, rcx mov [rsp+298h+var_110], rax jmp short loc_40FF2 loc_40FDC: mov rax, [rsp+298h+var_110] mov r12, [rsp+298h+var_288] cmp rax, r12 jg loc_40F24 loc_40FF2: cmp [rsp+298h+var_289], 0 jz loc_41097 mov ecx, 8FCh add rax, rcx mov [rsp+298h+var_110], rax add r12, rcx mov [rsp+298h+var_288], r12 mov rax, [rbx+20h] xor r13d, r13d cmp dword ptr [rax+8], 3FFh jg loc_40F24 lea rsi, [rbx+28h] mov ecx, [rax+28h] lea rdx, [rsp+298h+var_68] mov [rdx+10h], ecx movups xmm0, xmmword ptr [rax+18h] movaps xmmword ptr [rdx], xmm0 lea r15, [rsp+298h+var_50] mov rdi, r15 call _ZNK4evmc11HostContext11get_balanceERKNS_7addressE; evmc::HostContext::get_balance(evmc::address const&) movdqu xmm0, xmmword ptr [r15] movdqu xmm1, xmmword ptr [r15+10h] movdqa xmm2, cs:xmmword_759F0 pshufb xmm1, xmm2 lea rdi, [rsp+298h+var_168] movdqa xmmword ptr [rdi], xmm1 pshufb xmm0, xmm2 movdqa xmmword ptr [rdi+10h], xmm0 lea rsi, [rsp+298h+var_1A8] call _ZN4intxltERKNS_4uintILj256EEES3_; intx::operator<(intx::uint<256u> const&,intx::uint<256u> const&) test al, al jnz loc_40F1F jmp short loc_410AB loc_41097: mov rax, [rbx+20h] xor r13d, r13d cmp dword ptr [rax+8], 3FFh jg loc_40F24 loc_410AB: lea r15, [rbx+48h] lea rsi, [rbx+28h] lea r12, [rsp+298h+var_168] lea rdx, [rsp+298h+var_120] mov rdi, r12 call _ZN4evmc11HostContext4callERK12evmc_message; evmc::HostContext::call(evmc_message const&) mov rsi, [r12+18h] mov rdx, [r12+20h] mov rdi, r15 call _ZNSt7__cxx1112basic_stringIhN4evmc11byte_traitsIhEESaIhEE6assignEPKhm; std::basic_string<uchar,evmc::byte_traits<uchar>,std::allocator<uchar>>::assign(uchar const*,ulong) lea rax, [r14-0C0h] add r14, 0FFFFFFFFFFFFFF48h xor ecx, ecx cmp [rsp+298h+var_168], 0 setz cl mov [rax], rcx pxor xmm0, xmm0 movdqu xmmword ptr [r14], xmm0 and qword ptr [r14+10h], 0 mov rax, [rsp+298h+var_148] mov rdx, [rsp+298h+var_260] cmp rax, rdx cmovb rdx, rax test rdx, rdx jz short loc_41138 mov rdi, [rsp+298h+var_268] add rdi, [rbp+0] mov rsi, [rsp+298h+var_150] call _memcpy loc_41138: lea rdi, [rsp+298h+var_168]; this mov r12, [rdi+8] mov rax, [rdi+10h] sub r12, [rsp+298h+var_110] add r12, [rsp+298h+var_288] mov [rsp+298h+var_288], r12 add [rbx], rax call _ZN4evmc6ResultD2Ev; evmc::Result::~Result() xor r13d, r13d jmp loc_40F24 mov rdi, rax call __clang_call_terminate
long long evmone::instr::core::call_impl<(evmone::Opcode)241>(const __m128i *a1, long long a2, long long a3) { __m128i v4; // xmm0 __m128i v5; // xmm0 char v6; // bp __m128i v7; // xmm0 __m128i v8; // xmm0 __m128i v9; // xmm0 __m128i v10; // xmm0 unsigned int v11; // r13d unsigned int *v12; // r12 int v13; // ebp long long v14; // rax long long v15; // r15 char v17; // al long long v18; // rcx bool v19; // sf signed long long v20; // r12 signed long long v21; // rax long long v22; // rax __m128i v23; // xmm0 __m128i si128; // xmm2 __int8 *v25; // r14 _BOOL8 v26; // rcx unsigned long long v27; // rdx char v28; // [rsp+Fh] [rbp-289h] signed long long v29; // [rsp+10h] [rbp-288h] BYREF __int128 v30; // [rsp+1Ch] [rbp-27Ch] BYREF int v31; // [rsp+2Ch] [rbp-26Ch] long long v32; // [rsp+30h] [rbp-268h] unsigned long long v33; // [rsp+38h] [rbp-260h] long long v34; // [rsp+40h] [rbp-258h] long long v35; // [rsp+48h] [rbp-250h] _OWORD v36[2]; // [rsp+50h] [rbp-248h] BYREF _OWORD v37[2]; // [rsp+70h] [rbp-228h] BYREF _OWORD v38[2]; // [rsp+90h] [rbp-208h] BYREF _OWORD v39[2]; // [rsp+B0h] [rbp-1E8h] BYREF _OWORD v40[2]; // [rsp+D0h] [rbp-1C8h] BYREF __m128i v41[2]; // [rsp+F0h] [rbp-1A8h] BYREF unsigned int v42; // [rsp+110h] [rbp-188h] BYREF char v43; // [rsp+128h] [rbp-170h] __m128i v44; // [rsp+130h] [rbp-168h] BYREF __m128i v45; // [rsp+140h] [rbp-158h] unsigned long long v46; // [rsp+150h] [rbp-148h] _DWORD v47[4]; // [rsp+178h] [rbp-120h] BYREF signed long long v48; // [rsp+188h] [rbp-110h] BYREF __int128 v49; // [rsp+190h] [rbp-108h] int v50; // [rsp+1A0h] [rbp-F8h] __m128i v51; // [rsp+1A4h] [rbp-F4h] int v52; // [rsp+1B4h] [rbp-E4h] long long v53; // [rsp+1B8h] [rbp-E0h] long long v54; // [rsp+1C0h] [rbp-D8h] _OWORD v55[5]; // [rsp+1C8h] [rbp-D0h] BYREF unsigned int v56; // [rsp+218h] [rbp-80h] __int128 v57; // [rsp+230h] [rbp-68h] int v58; // [rsp+240h] [rbp-58h] __m128i v59; // [rsp+248h] [rbp-50h] BYREF __m128i v60[4]; // [rsp+258h] [rbp-40h] BYREF v29 = a2; v4 = *a1; v40[1] = a1[1]; v40[0] = v4; intx::be::trunc<evmc::address,256u>((long long)&v30); v5 = a1[-4]; v41[1] = a1[-3]; v41[0] = v5; v47[0] = 0; v6 = intx::operator!=<256u,int,void>(); v7 = a1[-6]; v39[1] = a1[-5]; v39[0] = v7; v8 = a1[-8]; v38[1] = a1[-7]; v38[0] = v8; v9 = a1[-10]; v37[1] = a1[-9]; v37[0] = v9; v10 = _mm_loadu_si128(a1 - 12); v36[1] = _mm_loadu_si128(a1 - 11); v36[0] = v10; a1[-12] = 0LL; a1[-11] = 0LL; *(_QWORD *)(a3 + 80) = 0LL; **(_BYTE **)(a3 + 72) = 0; if ( *(int *)(a3 + 64) >= 8 && !(unsigned int)evmc::HostContext::access_account(a3 + 40) ) { v29 = a2 - 2500; if ( a2 < 2500 ) return 3; } evmone::instr::core::`anonymous namespace'::get_target_address((long long)&v42, &v30, &v29, a3); if ( v43 == 1 ) return v42; v11 = 3; v12 = 0LL; if ( !v43 ) v12 = &v42; if ( !evmone::check_memory((long long)&v29, a3 + 8, (long long)v39, v38) || !evmone::check_memory((long long)&v29, a3 + 8, (long long)v37, v36) ) { return v11; } v28 = v6; v34 = *(_QWORD *)&v39[0]; v35 = *(_QWORD *)&v38[0]; v32 = *(_QWORD *)&v37[0]; v33 = *(_QWORD *)&v36[0]; memset(v47, 0LL, 184LL); v13 = *(_DWORD *)(*(_QWORD *)(a3 + 32) + 4LL); v47[1] = (v13 & 0xFFFFFFFD) + 2 * (unsigned __int8)evmc::operator!=(&v30, v12); v14 = *(_QWORD *)(a3 + 32); v47[2] = *(_DWORD *)(v14 + 8) + 1; v49 = v30; v50 = v31; v55[4] = *(_OWORD *)v12; v56 = v12[4]; v51 = _mm_loadu_si128((const __m128i *)(v14 + 24)); v52 = *(_DWORD *)(v14 + 40); intx::be::store<evmc::bytes32,intx::uint<256u>>(v55); if ( v35 ) { v53 = *(_QWORD *)(a3 + 8) + v34; v54 = v35; } v15 = 9000LL; if ( v28 ) { if ( (*(_BYTE *)(*(_QWORD *)(a3 + 32) + 4LL) & 1) != 0 ) return 11; goto LABEL_19; } v15 = 0LL; if ( *(int *)(a3 + 64) <= 2 ) { LABEL_19: v17 = evmc::HostContext::account_exists(a3 + 40); v18 = v15 + 25000; if ( v17 ) v18 = v15; goto LABEL_23; } v18 = 0LL; LABEL_23: v19 = v29 - v18 < 0; v29 -= v18; v11 = 3; if ( v19 ) return v11; v48 = 0x7FFFFFFFFFFFFFFFLL; if ( intx::operator<<256u,long,void>((unsigned long long *)v40, (unsigned long long *)&v48) ) v48 = *(_QWORD *)&v40[0]; if ( *(int *)(a3 + 64) < 2 ) { v21 = v48; v20 = v29; if ( v48 > v29 ) return v11; } else { v20 = v29; v21 = v29 + v29 / -64; if ( v21 >= v48 ) v21 = v48; v48 = v21; } if ( v28 ) { v48 = v21 + 2300; v29 = v20 + 2300; v22 = *(_QWORD *)(a3 + 32); v11 = 0; if ( *(int *)(v22 + 8) > 1023 ) return v11; v58 = *(_DWORD *)(v22 + 40); v57 = *(_OWORD *)(v22 + 24); evmc::HostContext::get_balance(&v59, a3 + 40); v23 = _mm_loadu_si128(&v59); si128 = _mm_load_si128((const __m128i *)&xmmword_759F0); v44 = _mm_shuffle_epi8(_mm_loadu_si128(v60), si128); v45 = _mm_shuffle_epi8(v23, si128); if ( intx::operator<((unsigned long long *)&v44, (unsigned long long *)v41) ) return v11; } else { v11 = 0; if ( *(int *)(*(_QWORD *)(a3 + 32) + 8LL) > 1023 ) return v11; } evmc::HostContext::call(&v44, a3 + 40); std::basic_string<unsigned char,evmc::byte_traits<unsigned char>,std::allocator<unsigned char>>::assign( a3 + 72, v45.m128i_i64[1], v46); v25 = &a1[-12].m128i_i8[8]; v26 = v44.m128i_i32[0] == 0; a1[-12].m128i_i64[0] = v26; *(_OWORD *)v25 = 0LL; *((_QWORD *)v25 + 2) = 0LL; v27 = v33; if ( v46 < v33 ) v27 = v46; if ( v27 ) memcpy(*(_QWORD *)(a3 + 8) + v32, v45.m128i_i64[1], v27, v26); v29 += v44.m128i_i64[1] - v48; *(_QWORD *)a3 += v45.m128i_i64[0]; evmc::Result::~Result((evmc::Result *)&v44); return 0; }
call_impl<(evmone::Opcode)241>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x268 MOV RBX,RDX MOV R15,RSI MOV R14,RDI MOV qword ptr [RSP + 0x10],RSI LEA RSI,[RDI + -0x20] MOVUPS XMM0,xmmword ptr [RDI] MOVUPS XMM1,xmmword ptr [RDI + 0x10] MOVAPS xmmword ptr [RSP + 0xe0],XMM1 MOVAPS xmmword ptr [RSP + 0xd0],XMM0 LEA RDI,[RSP + 0x1c] CALL 0x0013a597 MOVUPS XMM0,xmmword ptr [R14 + -0x40] MOVUPS XMM1,xmmword ptr [R14 + -0x30] LEA RDI,[RSP + 0xf0] MOVAPS xmmword ptr [RDI + 0x10],XMM1 MOVAPS xmmword ptr [RDI],XMM0 LEA RSI,[RSP + 0x178] AND dword ptr [RSI],0x0 CALL 0x00137ff4 MOV EBP,EAX MOVUPS XMM0,xmmword ptr [R14 + -0x60] MOVUPS XMM1,xmmword ptr [R14 + -0x50] MOVAPS xmmword ptr [RSP + 0xc0],XMM1 MOVAPS xmmword ptr [RSP + 0xb0],XMM0 MOVUPS XMM0,xmmword ptr [R14 + -0x80] MOVUPS XMM1,xmmword ptr [R14 + -0x70] MOVAPS xmmword ptr [RSP + 0xa0],XMM1 MOVAPS xmmword ptr [RSP + 0x90],XMM0 MOVUPS XMM0,xmmword ptr [R14 + -0xa0] MOVUPS XMM1,xmmword ptr [R14 + -0x90] MOVAPS xmmword ptr [RSP + 0x80],XMM1 MOVAPS xmmword ptr [RSP + 0x70],XMM0 MOVDQU XMM0,xmmword ptr [R14 + -0xc0] MOVDQU XMM1,xmmword ptr [R14 + -0xb0] MOVDQA xmmword ptr [RSP + 0x60],XMM1 MOVDQA xmmword ptr [RSP + 0x50],XMM0 PXOR XMM0,XMM0 MOVDQU xmmword ptr [R14 + -0xc0],XMM0 MOVDQU xmmword ptr [R14 + -0xb0],XMM0 AND qword ptr [RBX + 0x50],0x0 MOV RAX,qword ptr [RBX + 0x48] MOV byte ptr [RAX],0x0 CMP dword ptr [RBX + 0x40],0x8 JL 0x00140d7c LEA RDI,[RBX + 0x28] LEA RSI,[RSP + 0x1c] CALL 0x0012e6a8 TEST EAX,EAX JNZ 0x00140d7c LEA R12,[R15 + -0x9c4] MOV qword ptr [RSP + 0x10],R12 CMP R15,0x9c4 JGE 0x00140d7c PUSH 0x3 POP R13 JMP 0x00140f24 LAB_00140d7c: LEA R15,[RSP + 0x110] LEA RSI,[RSP + 0x1c] LEA RDX,[RSP + 0x10] MOV RDI,R15 MOV RCX,RBX CALL 0x00140b90 MOV AL,byte ptr [R15 + 0x18] CMP AL,0x1 JNZ 0x00140db6 MOV R13D,dword ptr [RSP + 0x110] MOV R12,qword ptr [RSP + 0x118] JMP 0x00140f24 LAB_00140db6: PUSH 0x3 POP R13 XOR R12D,R12D TEST AL,AL CMOVZ R12,R15 LEA R15,[RBX + 0x8] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xb0] LEA RCX,[RSP + 0x90] MOV RSI,R15 CALL 0x0013a338 TEST AL,AL JZ 0x00140f1f LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0x70] LEA RCX,[RSP + 0x50] MOV RSI,R15 CALL 0x0013a338 TEST AL,AL JZ 0x00140f1f MOV byte ptr [RSP + 0xf],BPL MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x38],RAX LEA R13,[RSP + 0x178] MOV EDX,0xb8 MOV RDI,R13 XOR ESI,ESI CALL 0x00122120 MOV RAX,qword ptr [RBX + 0x20] MOV EBP,dword ptr [RAX + 0x4] LEA RDI,[RSP + 0x1c] MOV RSI,R12 CALL 0x00141172 AND EBP,0xfffffffd MOVZX EAX,AL LEA EAX,[RBP + RAX*0x2] MOV RBP,R15 MOV dword ptr [R13 + 0x4],EAX MOV RAX,qword ptr [RBX + 0x20] MOV ECX,dword ptr [RAX + 0x8] INC ECX MOV dword ptr [R13 + 0x8],ECX LEA RCX,[RSP + 0x1c] MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R13 + 0x18],XMM0 MOV ECX,dword ptr [RCX + 0x10] MOV dword ptr [R13 + 0x28],ECX MOVUPS XMM0,xmmword ptr [R12] MOVUPS xmmword ptr [R13 + 0x90],XMM0 MOV ECX,dword ptr [R12 + 0x10] MOV dword ptr [R13 + 0xa0],ECX MOVDQU XMM0,xmmword ptr [RAX + 0x18] MOVDQU xmmword ptr [R13 + 0x2c],XMM0 MOV EAX,dword ptr [RAX + 0x28] MOV dword ptr [R13 + 0x3c],EAX LEA RDI,[RSP + 0x1c8] LEA RSI,[RSP + 0xf0] CALL 0x0013b31f MOV RAX,qword ptr [RSP + 0x48] TEST RAX,RAX JZ 0x00140efe MOV RCX,qword ptr [RSP + 0x40] ADD RCX,qword ptr [RBP] MOV qword ptr [RSP + 0x1b8],RCX MOV qword ptr [RSP + 0x1c0],RAX LAB_00140efe: XOR EAX,EAX MOV R15D,0x2328 CMP byte ptr [RSP + 0xf],0x0 CMOVZ R15,RAX JZ 0x00140f3c MOV RAX,qword ptr [RBX + 0x20] TEST byte ptr [RAX + 0x4],0x1 JZ 0x00140f42 PUSH 0xb POP R13 LAB_00140f1f: MOV R12,qword ptr [RSP + 0x10] LAB_00140f24: MOV EAX,R13D MOV RDX,R12 ADD RSP,0x268 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00140f3c: CMP dword ptr [RBX + 0x40],0x2 JG 0x00140f5f LAB_00140f42: LEA RDI,[RBX + 0x28] LEA RSI,[RSP + 0x1c] CALL 0x0012e4f0 LEA RCX,[R15 + 0x61a8] TEST AL,AL CMOVNZ RCX,R15 JMP 0x00140f61 LAB_00140f5f: XOR ECX,ECX LAB_00140f61: MOV R12,qword ptr [RSP + 0x10] SUB R12,RCX MOV qword ptr [RSP + 0x10],R12 PUSH 0x3 POP R13 JS 0x00140f24 LEA RSI,[RSP + 0x188] MOV RAX,0x7fffffffffffffff MOV qword ptr [RSI],RAX LEA RDI,[RSP + 0xd0] CALL 0x0013adb5 TEST AL,AL JZ 0x00140faa MOV RAX,qword ptr [RSP + 0xd0] MOV qword ptr [RSP + 0x188],RAX LAB_00140faa: CMP dword ptr [RBX + 0x40],0x2 JL 0x00140fdc MOV R12,qword ptr [RSP + 0x10] PUSH -0x40 POP RCX MOV RAX,R12 CQO IDIV RCX ADD RAX,R12 MOV RCX,qword ptr [RSP + 0x188] CMP RAX,RCX CMOVGE RAX,RCX MOV qword ptr [RSP + 0x188],RAX JMP 0x00140ff2 LAB_00140fdc: MOV RAX,qword ptr [RSP + 0x188] MOV R12,qword ptr [RSP + 0x10] CMP RAX,R12 JG 0x00140f24 LAB_00140ff2: CMP byte ptr [RSP + 0xf],0x0 JZ 0x00141097 MOV ECX,0x8fc ADD RAX,RCX MOV qword ptr [RSP + 0x188],RAX ADD R12,RCX MOV qword ptr [RSP + 0x10],R12 MOV RAX,qword ptr [RBX + 0x20] XOR R13D,R13D CMP dword ptr [RAX + 0x8],0x3ff JG 0x00140f24 LEA RSI,[RBX + 0x28] MOV ECX,dword ptr [RAX + 0x28] LEA RDX,[RSP + 0x230] MOV dword ptr [RDX + 0x10],ECX MOVUPS XMM0,xmmword ptr [RAX + 0x18] MOVAPS xmmword ptr [RDX],XMM0 LEA R15,[RSP + 0x248] MOV RDI,R15 CALL 0x0012e554 MOVDQU XMM0,xmmword ptr [R15] MOVDQU XMM1,xmmword ptr [R15 + 0x10] MOVDQA XMM2,xmmword ptr [0x001759f0] PSHUFB XMM1,XMM2 LEA RDI,[RSP + 0x130] MOVDQA xmmword ptr [RDI],XMM1 PSHUFB XMM0,XMM2 MOVDQA xmmword ptr [RDI + 0x10],XMM0 LEA RSI,[RSP + 0xf0] CALL 0x00139e57 TEST AL,AL JNZ 0x00140f1f JMP 0x001410ab LAB_00141097: MOV RAX,qword ptr [RBX + 0x20] XOR R13D,R13D CMP dword ptr [RAX + 0x8],0x3ff JG 0x00140f24 LAB_001410ab: LEA R15,[RBX + 0x48] LEA RSI,[RBX + 0x28] LEA R12,[RSP + 0x130] LEA RDX,[RSP + 0x178] MOV RDI,R12 CALL 0x0012e606 MOV RSI,qword ptr [R12 + 0x18] MOV RDX,qword ptr [R12 + 0x20] LAB_001410d5: MOV RDI,R15 CALL 0x0014117c LAB_001410dd: LEA RAX,[R14 + -0xc0] ADD R14,-0xb8 XOR ECX,ECX CMP dword ptr [RSP + 0x130],0x0 SETZ CL MOV qword ptr [RAX],RCX PXOR XMM0,XMM0 MOVDQU xmmword ptr [R14],XMM0 AND qword ptr [R14 + 0x10],0x0 MOV RAX,qword ptr [RSP + 0x150] MOV RDX,qword ptr [RSP + 0x38] CMP RAX,RDX CMOVC RDX,RAX TEST RDX,RDX JZ 0x00141138 MOV RDI,qword ptr [RSP + 0x30] ADD RDI,qword ptr [RBP] MOV RSI,qword ptr [RSP + 0x148] CALL 0x001221a0 LAB_00141138: LEA RDI,[RSP + 0x130] MOV R12,qword ptr [RDI + 0x8] MOV RAX,qword ptr [RDI + 0x10] SUB R12,qword ptr [RSP + 0x188] ADD R12,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x10],R12 ADD qword ptr [RBX],RAX CALL 0x0012d94c XOR R13D,R13D JMP 0x00140f24
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* evmone::Result evmone::instr::core::call_impl<(evmone::Opcode)241>(evmone::StackTop, long, evmone::ExecutionState&) */ int1 [16] evmone::instr::core::call_impl<(evmone::Opcode)241> (long *param_1,long param_2,ExecutionState *param_3) { Memory *pMVar1; uint uVar2; bool bVar3; char cVar4; byte bVar5; bool bVar6; int iVar7; long lVar8; ulong __n; address *paVar9; long lVar10; int1 auVar11 [16]; ulong uStack_2a0; long local_288; int8 local_27c; int8 uStack_274; int4 local_26c; long local_268; ulong local_260; long local_258; long local_250; ulong local_248; long lStack_240; long local_238; long lStack_230; long local_228; long lStack_220; long local_218; long lStack_210; long local_208; long lStack_200; long local_1f8; long lStack_1f0; long local_1e8; long lStack_1e0; long local_1d8; long lStack_1d0; long local_1c8; long lStack_1c0; long local_1b8; long lStack_1b0; long local_1a8; long lStack_1a0; long local_198; long lStack_190; uint local_188 [2]; long local_180; char local_170; int1 local_168 [16]; int1 local_158 [16]; ulong local_148; int local_120; int local_11c; int local_118; long local_110; int8 local_108; int8 uStack_100; int4 local_f8; int8 local_f4; int8 uStack_ec; int4 local_e4; long local_e0; long local_d8; be local_d0 [64]; int8 local_90; int8 uStack_88; int4 local_80; int8 local_68; int8 uStack_60; int4 local_58; HostContext local_50 [16]; int1 local_40 [16]; local_1c8 = *param_1; lStack_1c0 = param_1[1]; local_1b8 = param_1[2]; lStack_1b0 = param_1[3]; local_288 = param_2; intx::be::trunc<evmc::address,256u>((be *)&local_27c,(uint *)(param_1 + -4)); local_1a8 = param_1[-8]; lStack_1a0 = param_1[-7]; local_198 = param_1[-6]; lStack_190 = param_1[-5]; local_120 = 0; bVar3 = intx::operator!=((uint *)&local_1a8,&local_120); local_1e8 = param_1[-0xc]; lStack_1e0 = param_1[-0xb]; local_1d8 = param_1[-10]; lStack_1d0 = param_1[-9]; local_208 = param_1[-0x10]; lStack_200 = param_1[-0xf]; local_1f8 = param_1[-0xe]; lStack_1f0 = param_1[-0xd]; local_228 = param_1[-0x14]; lStack_220 = param_1[-0x13]; local_218 = param_1[-0x12]; lStack_210 = param_1[-0x11]; local_248 = param_1[-0x18]; lStack_240 = param_1[-0x17]; local_238 = param_1[-0x16]; lStack_230 = param_1[-0x15]; *(int1 (*) [16])(param_1 + -0x18) = (int1 [16])0x0; *(int1 (*) [16])(param_1 + -0x16) = (int1 [16])0x0; *(int8 *)(param_3 + 0x50) = 0; **(int1 **)(param_3 + 0x48) = 0; if (((7 < *(int *)(param_3 + 0x40)) && (iVar7 = evmc::HostContext::access_account((address *)(param_3 + 0x28)), iVar7 == 0)) && (local_288 = param_2 + -0x9c4, param_2 < 0x9c4)) { lVar10 = local_288; uStack_2a0 = 3; goto LAB_00140f24; } (anonymous_namespace)::get_target_address ((_anonymous_namespace_ *)local_188,(address *)&local_27c,&local_288,param_3); if (local_170 == '\x01') { lVar10 = local_180; uStack_2a0 = (ulong)local_188[0]; goto LAB_00140f24; } uStack_2a0 = 3; paVar9 = (address *)0x0; if (local_170 == '\0') { paVar9 = (address *)local_188; } pMVar1 = (Memory *)(param_3 + 8); cVar4 = check_memory(&local_288,pMVar1,(uint *)&local_1e8,(uint *)&local_208); lVar10 = local_288; if ((cVar4 == '\0') || (cVar4 = check_memory(&local_288,pMVar1,(uint *)&local_228,(uint *)&local_248), lVar10 = local_288, cVar4 == '\0')) goto LAB_00140f24; local_258 = local_1e8; local_250 = local_208; local_268 = local_228; local_260 = local_248; memset(&local_120,0,0xb8); uVar2 = *(uint *)(*(long *)(param_3 + 0x20) + 4); bVar5 = evmc::operator!=((address *)&local_27c,paVar9); local_11c = (uVar2 & 0xfffffffd) + (uint)bVar5 * 2; lVar10 = *(long *)(param_3 + 0x20); local_118 = *(int *)(lVar10 + 8) + 1; local_108 = local_27c; uStack_100 = uStack_274; local_f8 = local_26c; local_90 = *(int8 *)paVar9; uStack_88 = *(int8 *)(paVar9 + 8); local_80 = *(int4 *)(paVar9 + 0x10); local_f4 = *(int8 *)(lVar10 + 0x18); uStack_ec = *(int8 *)(lVar10 + 0x20); local_e4 = *(int4 *)(lVar10 + 0x28); intx::be::store<evmc::bytes32,intx::uint<256u>>(local_d0,(uint *)&local_1a8); if (local_250 != 0) { local_e0 = local_258 + *(long *)pMVar1; local_d8 = local_250; } lVar8 = 0; if (bVar3) { lVar8 = 9000; if ((*(byte *)(*(long *)(param_3 + 0x20) + 4) & 1) != 0) { uStack_2a0 = 0xb; lVar10 = local_288; goto LAB_00140f24; } LAB_00140f42: cVar4 = evmc::HostContext::account_exists((address *)(param_3 + 0x28)); lVar10 = lVar8 + 25000; if (cVar4 != '\0') { lVar10 = lVar8; } } else { if (*(int *)(param_3 + 0x40) < 3) goto LAB_00140f42; lVar10 = 0; } lVar10 = local_288 - lVar10; uStack_2a0 = 3; if (lVar10 < 0) goto LAB_00140f24; local_110 = 0x7fffffffffffffff; local_288 = lVar10; bVar6 = intx::operator<((uint *)&local_1c8,&local_110); if (bVar6) { local_110 = local_1c8; } lVar10 = local_288; if (*(int *)(param_3 + 0x40) < 2) { uStack_2a0 = 3; lVar8 = local_110; if (local_288 < local_110) goto LAB_00140f24; } else { lVar8 = local_288 / -0x40 + local_288; if (local_110 <= lVar8) { lVar8 = local_110; } } local_110 = lVar8; if (bVar3) { local_110 = local_110 + 0x8fc; lVar10 = local_288 + 0x8fc; lVar8 = *(long *)(param_3 + 0x20); uStack_2a0 = 0; if (0x3ff < *(int *)(lVar8 + 8)) goto LAB_00140f24; local_58 = *(int4 *)(lVar8 + 0x28); local_68 = *(int8 *)(lVar8 + 0x18); uStack_60 = *(int8 *)(lVar8 + 0x20); local_288 = lVar10; evmc::HostContext::get_balance(local_50,(address *)(param_3 + 0x28)); local_168 = pshufb(local_40,_DAT_001759f0); local_158 = pshufb((int1 [16])local_50,_DAT_001759f0); cVar4 = intx::operator<((uint *)local_168,(uint *)&local_1a8); lVar10 = local_288; if (cVar4 != '\0') goto LAB_00140f24; } else { uStack_2a0 = 0; if (0x3ff < *(int *)(*(long *)(param_3 + 0x20) + 8)) goto LAB_00140f24; } evmc::HostContext::call((HostContext *)local_168,(evmc_message *)(param_3 + 0x28)); /* try { // try from 001410d5 to 001410dc has its CatchHandler @ 0014116a */ std::__cxx11:: basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>::assign ((basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>> *)(param_3 + 0x48),(uchar *)local_158._8_8_,local_148); param_1[-0x18] = (ulong)(local_168._0_4_ == 0); *(int1 (*) [16])(param_1 + -0x17) = (int1 [16])0x0; param_1[-0x15] = 0; __n = local_260; if (local_148 < local_260) { __n = local_148; } if (__n != 0) { memcpy((void *)(local_268 + *(long *)pMVar1),(void *)local_158._8_8_,__n); } lVar10 = (local_168._8_8_ - local_110) + local_288; *(long *)param_3 = *(long *)param_3 + local_158._0_8_; local_288 = lVar10; evmc::Result::~Result((Result *)local_168); uStack_2a0 = 0; LAB_00140f24: auVar11._8_8_ = lVar10; auVar11._0_8_ = uStack_2a0; return auVar11; }
13,237
write_hook_for_redo
eloqsql/storage/maria/ma_blockrec.c
my_bool write_hook_for_redo(enum translog_record_type type __attribute__ ((unused)), TRN *trn, MARIA_HA *tbl_info __attribute__ ((unused)), LSN *lsn, void *hook_arg __attribute__ ((unused))) { /* Users of dummy_transaction_object must keep this TRN clean as it is used by many threads (like those manipulating non-transactional tables). It might be dangerous if one user sets rec_lsn or some other member and it is picked up by another user (like putting this rec_lsn into a page of a non-transactional table); it's safer if all members stay 0. So non-transactional log records (REPAIR, CREATE, RENAME, DROP) should not call this hook; we trust them but verify ;) */ DBUG_ASSERT(trn->trid != 0); /* If the hook stays so simple, it would be faster to pass !trn->rec_lsn ? trn->rec_lsn : some_dummy_lsn to translog_write_record(), like Monty did in his original code, and not have a hook. For now we keep it like this. */ if (trn->rec_lsn == 0) trn->rec_lsn= *lsn; return 0; }
O3
c
write_hook_for_redo: pushq %rbp movq %rsp, %rbp cmpq $0x0, 0x90(%rsi) jne 0x4d4bc movq (%rcx), %rax movq %rax, 0x90(%rsi) xorl %eax, %eax popq %rbp retq
write_hook_for_redo: push rbp mov rbp, rsp cmp qword ptr [rsi+90h], 0 jnz short loc_4D4BC mov rax, [rcx] mov [rsi+90h], rax loc_4D4BC: xor eax, eax pop rbp retn
long long write_hook_for_redo(long long a1, long long a2, long long a3, _QWORD *a4) { if ( !*(_QWORD *)(a2 + 144) ) *(_QWORD *)(a2 + 144) = *a4; return 0LL; }
write_hook_for_redo: PUSH RBP MOV RBP,RSP CMP qword ptr [RSI + 0x90],0x0 JNZ 0x0014d4bc MOV RAX,qword ptr [RCX] MOV qword ptr [RSI + 0x90],RAX LAB_0014d4bc: XOR EAX,EAX POP RBP RET
int8 write_hook_for_redo(int8 param_1,long param_2,int8 param_3,int8 *param_4) { if (*(long *)(param_2 + 0x90) == 0) { *(int8 *)(param_2 + 0x90) = *param_4; } return 0; }
13,238
simple_cs_is_full
eloqsql/mysys/charset.c
static my_bool simple_cs_is_full(CHARSET_INFO *cs) { return cs->number && cs->cs_name.str && cs->coll_name.str && simple_8bit_charset_data_is_full(cs) && (simple_8bit_collation_data_is_full(cs) || cs->tailoring); }
O3
c
simple_cs_is_full: pushq %rbp movq %rsp, %rbp cmpl $0x0, (%rdi) je 0x4ec13 cmpq $0x0, 0x10(%rdi) je 0x4ec13 cmpq $0x0, 0x20(%rdi) je 0x4ec13 cmpq $0x0, 0x40(%rdi) je 0x4ec13 cmpq $0x0, 0x50(%rdi) je 0x4ec13 cmpq $0x0, 0x48(%rdi) je 0x4ec13 cmpq $0x0, 0x68(%rdi) je 0x4ec13 movb $0x1, %al cmpq $0x0, 0x58(%rdi) jne 0x4ec15 testb $0x10, 0xc(%rdi) jne 0x4ec15 cmpq $0x0, 0x38(%rdi) setne %al jmp 0x4ec15 xorl %eax, %eax popq %rbp retq
simple_cs_is_full: push rbp mov rbp, rsp cmp dword ptr [rdi], 0 jz short loc_4EC13 cmp qword ptr [rdi+10h], 0 jz short loc_4EC13 cmp qword ptr [rdi+20h], 0 jz short loc_4EC13 cmp qword ptr [rdi+40h], 0 jz short loc_4EC13 cmp qword ptr [rdi+50h], 0 jz short loc_4EC13 cmp qword ptr [rdi+48h], 0 jz short loc_4EC13 cmp qword ptr [rdi+68h], 0 jz short loc_4EC13 mov al, 1 cmp qword ptr [rdi+58h], 0 jnz short loc_4EC15 test byte ptr [rdi+0Ch], 10h jnz short loc_4EC15 cmp qword ptr [rdi+38h], 0 setnz al jmp short loc_4EC15 loc_4EC13: xor eax, eax loc_4EC15: pop rbp retn
bool simple_cs_is_full(long long a1) { bool result; // al if ( !*(_DWORD *)a1 || !*(_QWORD *)(a1 + 16) || !*(_QWORD *)(a1 + 32) || !*(_QWORD *)(a1 + 64) || !*(_QWORD *)(a1 + 80) || !*(_QWORD *)(a1 + 72) || !*(_QWORD *)(a1 + 104) ) { return 0; } result = 1; if ( !*(_QWORD *)(a1 + 88) && (*(_BYTE *)(a1 + 12) & 0x10) == 0 ) return *(_QWORD *)(a1 + 56) != 0LL; return result; }
simple_cs_is_full: PUSH RBP MOV RBP,RSP CMP dword ptr [RDI],0x0 JZ 0x0014ec13 CMP qword ptr [RDI + 0x10],0x0 JZ 0x0014ec13 CMP qword ptr [RDI + 0x20],0x0 JZ 0x0014ec13 CMP qword ptr [RDI + 0x40],0x0 JZ 0x0014ec13 CMP qword ptr [RDI + 0x50],0x0 JZ 0x0014ec13 CMP qword ptr [RDI + 0x48],0x0 JZ 0x0014ec13 CMP qword ptr [RDI + 0x68],0x0 JZ 0x0014ec13 MOV AL,0x1 CMP qword ptr [RDI + 0x58],0x0 JNZ 0x0014ec15 TEST byte ptr [RDI + 0xc],0x10 JNZ 0x0014ec15 CMP qword ptr [RDI + 0x38],0x0 SETNZ AL JMP 0x0014ec15 LAB_0014ec13: XOR EAX,EAX LAB_0014ec15: POP RBP RET
bool simple_cs_is_full(int *param_1) { bool bVar1; if (((((*param_1 == 0) || (*(long *)(param_1 + 4) == 0)) || (*(long *)(param_1 + 8) == 0)) || ((*(long *)(param_1 + 0x10) == 0 || (*(long *)(param_1 + 0x14) == 0)))) || ((*(long *)(param_1 + 0x12) == 0 || (*(long *)(param_1 + 0x1a) == 0)))) { bVar1 = false; } else { bVar1 = true; if ((*(long *)(param_1 + 0x16) == 0) && ((*(byte *)(param_1 + 3) & 0x10) == 0)) { bVar1 = *(long *)(param_1 + 0xe) != 0; } } return bVar1; }
13,239
ma_scramble_41
eloqsql/libmariadb/libmariadb/ma_password.c
void ma_scramble_41(const unsigned char *buffer, const char *scramble, const char *password) { _MA_SHA1_CTX context; unsigned char sha1[SHA1_MAX_LENGTH]; unsigned char sha2[SHA1_MAX_LENGTH]; /* Phase 1: hash password */ ma_SHA1Init(&context); ma_SHA1Update(&context, (unsigned char *)password, strlen((char *)password)); ma_SHA1Final(sha1, &context); /* Phase 2: hash sha1 */ ma_SHA1Init(&context); ma_SHA1Update(&context, (unsigned char*)sha1, SHA1_MAX_LENGTH); ma_SHA1Final(sha2, &context); /* Phase 3: hash scramble + sha2 */ ma_SHA1Init(&context); ma_SHA1Update(&context, (unsigned char *)scramble, SCRAMBLE_LENGTH); ma_SHA1Update(&context, (unsigned char*)sha2, SHA1_MAX_LENGTH); ma_SHA1Final((unsigned char *)buffer, &context); /* let's crypt buffer now */ my_crypt((uchar *)buffer, (const unsigned char *)buffer, (const unsigned char *)sha1, SHA1_MAX_LENGTH); }
O0
c
ma_scramble_41: pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0xa8(%rbp) movq %rsi, -0xb0(%rbp) movq %rdx, -0xb8(%rbp) leaq -0x64(%rbp), %rdi movq %rdi, -0xd0(%rbp) callq 0x49930 movq -0xb8(%rbp), %rdi movq %rdi, -0xe0(%rbp) callq 0x131a0 movq -0xe0(%rbp), %rsi movq -0xd0(%rbp), %rdi movq %rax, %rdx callq 0x49990 movq -0xd0(%rbp), %rsi leaq -0x80(%rbp), %rdi movq %rdi, -0xc8(%rbp) callq 0x4b700 movq -0xd0(%rbp), %rdi callq 0x49930 movq -0xd0(%rbp), %rdi movq -0xc8(%rbp), %rsi movl $0x14, %edx movq %rdx, -0xc0(%rbp) callq 0x49990 movq -0xd0(%rbp), %rsi leaq -0xa0(%rbp), %rdi movq %rdi, -0xd8(%rbp) callq 0x4b700 movq -0xd0(%rbp), %rdi callq 0x49930 movq -0xd0(%rbp), %rdi movq -0xc0(%rbp), %rdx movq -0xb0(%rbp), %rsi callq 0x49990 movq -0xd8(%rbp), %rsi movq -0xd0(%rbp), %rdi movq -0xc0(%rbp), %rdx callq 0x49990 movq -0xd0(%rbp), %rsi movq -0xa8(%rbp), %rdi callq 0x4b700 movq -0xc8(%rbp), %rdx movq -0xc0(%rbp), %rcx movq -0xa8(%rbp), %rsi movq %rsi, %rdi callq 0x49390 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x4954d addq $0xe0, %rsp popq %rbp retq callq 0x134b0 nopw %cs:(%rax,%rax)
ma_scramble_41: push rbp mov rbp, rsp sub rsp, 0E0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_A8], rdi mov [rbp+var_B0], rsi mov [rbp+var_B8], rdx lea rdi, [rbp+var_64] mov [rbp+var_D0], rdi call ma_SHA1Init mov rdi, [rbp+var_B8] mov [rbp+var_E0], rdi call _strlen mov rsi, [rbp+var_E0] mov rdi, [rbp+var_D0] mov rdx, rax call ma_SHA1Update mov rsi, [rbp+var_D0] lea rdi, [rbp+var_80] mov [rbp+var_C8], rdi call ma_SHA1Final mov rdi, [rbp+var_D0] call ma_SHA1Init mov rdi, [rbp+var_D0] mov rsi, [rbp+var_C8] mov edx, 14h mov [rbp+var_C0], rdx call ma_SHA1Update mov rsi, [rbp+var_D0] lea rdi, [rbp+var_A0] mov [rbp+var_D8], rdi call ma_SHA1Final mov rdi, [rbp+var_D0] call ma_SHA1Init mov rdi, [rbp+var_D0] mov rdx, [rbp+var_C0] mov rsi, [rbp+var_B0] call ma_SHA1Update mov rsi, [rbp+var_D8] mov rdi, [rbp+var_D0] mov rdx, [rbp+var_C0] call ma_SHA1Update mov rsi, [rbp+var_D0] mov rdi, [rbp+var_A8] call ma_SHA1Final mov rdx, [rbp+var_C8] mov rcx, [rbp+var_C0] mov rsi, [rbp+var_A8] mov rdi, rsi call my_crypt mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_4954D add rsp, 0E0h pop rbp retn loc_4954D: call ___stack_chk_fail
unsigned long long ma_scramble_41(_BYTE *a1, long long a2, long long a3) { long long v3; // rax _BYTE v6[32]; // [rsp+40h] [rbp-A0h] BYREF _BYTE v7[28]; // [rsp+60h] [rbp-80h] BYREF _BYTE v8[92]; // [rsp+7Ch] [rbp-64h] BYREF unsigned long long v9; // [rsp+D8h] [rbp-8h] v9 = __readfsqword(0x28u); ((void (*)(void))ma_SHA1Init)(); v3 = strlen(a3); ma_SHA1Update(v8, a3, v3); ma_SHA1Final(v7, v8); ma_SHA1Init(v8); ma_SHA1Update(v8, v7, 20LL); ma_SHA1Final(v6, v8); ma_SHA1Init(v8); ma_SHA1Update(v8, a2, 20LL); ma_SHA1Update(v8, v6, 20LL); ma_SHA1Final(a1, v8); my_crypt(a1, a1, v7, 20LL); return __readfsqword(0x28u); }
ma_scramble_41: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0xa8],RDI MOV qword ptr [RBP + -0xb0],RSI MOV qword ptr [RBP + -0xb8],RDX LEA RDI,[RBP + -0x64] MOV qword ptr [RBP + -0xd0],RDI CALL 0x00149930 MOV RDI,qword ptr [RBP + -0xb8] MOV qword ptr [RBP + -0xe0],RDI CALL 0x001131a0 MOV RSI,qword ptr [RBP + -0xe0] MOV RDI,qword ptr [RBP + -0xd0] MOV RDX,RAX CALL 0x00149990 MOV RSI,qword ptr [RBP + -0xd0] LEA RDI,[RBP + -0x80] MOV qword ptr [RBP + -0xc8],RDI CALL 0x0014b700 MOV RDI,qword ptr [RBP + -0xd0] CALL 0x00149930 MOV RDI,qword ptr [RBP + -0xd0] MOV RSI,qword ptr [RBP + -0xc8] MOV EDX,0x14 MOV qword ptr [RBP + -0xc0],RDX CALL 0x00149990 MOV RSI,qword ptr [RBP + -0xd0] LEA RDI,[RBP + -0xa0] MOV qword ptr [RBP + -0xd8],RDI CALL 0x0014b700 MOV RDI,qword ptr [RBP + -0xd0] CALL 0x00149930 MOV RDI,qword ptr [RBP + -0xd0] MOV RDX,qword ptr [RBP + -0xc0] MOV RSI,qword ptr [RBP + -0xb0] CALL 0x00149990 MOV RSI,qword ptr [RBP + -0xd8] MOV RDI,qword ptr [RBP + -0xd0] MOV RDX,qword ptr [RBP + -0xc0] CALL 0x00149990 MOV RSI,qword ptr [RBP + -0xd0] MOV RDI,qword ptr [RBP + -0xa8] CALL 0x0014b700 MOV RDX,qword ptr [RBP + -0xc8] MOV RCX,qword ptr [RBP + -0xc0] MOV RSI,qword ptr [RBP + -0xa8] MOV RDI,RSI CALL 0x00149390 MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0014954d ADD RSP,0xe0 POP RBP RET LAB_0014954d: CALL 0x001134b0
void ma_scramble_41(int8 param_1,int8 param_2,char *param_3) { size_t sVar1; long in_FS_OFFSET; int1 local_a8 [32]; int1 local_88 [28]; int1 local_6c [92]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); ma_SHA1Init(); sVar1 = strlen(param_3); ma_SHA1Update(local_6c,param_3,sVar1); ma_SHA1Final(local_88,local_6c); ma_SHA1Init(local_6c); ma_SHA1Update(local_6c,local_88); ma_SHA1Final(local_a8,local_6c); ma_SHA1Init(local_6c); ma_SHA1Update(local_6c,param_2,0x14); ma_SHA1Update(local_6c,local_a8,0x14); ma_SHA1Final(param_1,local_6c); my_crypt(param_1,param_1,local_88,0x14); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
13,240
auth_old_password
eloqsql/libmariadb/plugins/auth/old_password.c
static int auth_old_password(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql) { uchar *pkt; int pkt_len; if (((MCPVIO_EXT *)vio)->mysql_change_user) { /* in mysql_change_user() the client sends the first packet. we use the old scramble. */ pkt= (uchar*)mysql->scramble_buff; } else { /* read the scramble */ if ((pkt_len= vio->read_packet(vio, &pkt)) < 0) return CR_ERROR; if (pkt_len != SCRAMBLE_LENGTH_323 + 1 && pkt_len != SCRAMBLE_LENGTH + 1) return CR_SERVER_HANDSHAKE_ERR; /* save it in MYSQL */ memmove(mysql->scramble_buff, pkt, pkt_len - 1); mysql->scramble_buff[pkt_len - 1] = 0; } if (mysql && mysql->passwd[0]) { char scrambled[SCRAMBLE_LENGTH_323 + 1]; ma_scramble_323(scrambled, (char*)pkt, mysql->passwd); if (vio->write_packet(vio, (uchar*)scrambled, SCRAMBLE_LENGTH_323 + 1)) return CR_ERROR; } else if (vio->write_packet(vio, 0, 0)) /* no password */ return CR_ERROR; return CR_OK; }
O0
c
auth_old_password: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x20(%rbp) movq %rsi, -0x28(%rbp) movq -0x20(%rbp), %rax cmpb $0x0, 0x48(%rax) je 0x40ac7 movq -0x28(%rbp), %rax addq $0x48e, %rax # imm = 0x48E movq %rax, -0x30(%rbp) jmp 0x40b36 movq -0x20(%rbp), %rax movq (%rax), %rax movq -0x20(%rbp), %rdi leaq -0x30(%rbp), %rsi callq *%rax movl %eax, -0x34(%rbp) cmpl $0x0, %eax jge 0x40aec movl $0x0, -0x18(%rbp) jmp 0x40bba cmpl $0x9, -0x34(%rbp) je 0x40b04 cmpl $0x15, -0x34(%rbp) je 0x40b04 movl $0x7dc, -0x18(%rbp) # imm = 0x7DC jmp 0x40bba movq -0x28(%rbp), %rdi addq $0x48e, %rdi # imm = 0x48E movq -0x30(%rbp), %rsi movl -0x34(%rbp), %eax subl $0x1, %eax movslq %eax, %rdx callq 0x136f0 movq -0x28(%rbp), %rax movl -0x34(%rbp), %ecx subl $0x1, %ecx movslq %ecx, %rcx movb $0x0, 0x48e(%rax,%rcx) cmpq $0x0, -0x28(%rbp) je 0x40b8f movq -0x28(%rbp), %rax movq 0x2c0(%rax), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0x40b8f leaq -0x11(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x28(%rbp), %rax movq 0x2c0(%rax), %rdx callq 0x48080 movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movq -0x20(%rbp), %rdi leaq -0x11(%rbp), %rsi movl $0x9, %edx callq *%rax cmpl $0x0, %eax je 0x40b8d movl $0x0, -0x18(%rbp) jmp 0x40bba jmp 0x40bb3 movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movq -0x20(%rbp), %rdi xorl %ecx, %ecx movl %ecx, %esi xorl %edx, %edx callq *%rax cmpl $0x0, %eax je 0x40bb1 movl $0x0, -0x18(%rbp) jmp 0x40bba jmp 0x40bb3 movl $0xffffffff, -0x18(%rbp) # imm = 0xFFFFFFFF movl -0x18(%rbp), %eax movl %eax, -0x38(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x40bdb movl -0x38(%rbp), %eax addq $0x40, %rsp popq %rbp retq callq 0x134b0
auth_old_password: push rbp mov rbp, rsp sub rsp, 40h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_20], rdi mov [rbp+var_28], rsi mov rax, [rbp+var_20] cmp byte ptr [rax+48h], 0 jz short loc_40AC7 mov rax, [rbp+var_28] add rax, 48Eh mov [rbp+var_30], rax jmp short loc_40B36 loc_40AC7: mov rax, [rbp+var_20] mov rax, [rax] mov rdi, [rbp+var_20] lea rsi, [rbp+var_30] call rax mov [rbp+var_34], eax cmp eax, 0 jge short loc_40AEC mov [rbp+var_18], 0 jmp loc_40BBA loc_40AEC: cmp [rbp+var_34], 9 jz short loc_40B04 cmp [rbp+var_34], 15h jz short loc_40B04 mov [rbp+var_18], 7DCh jmp loc_40BBA loc_40B04: mov rdi, [rbp+var_28] add rdi, 48Eh mov rsi, [rbp+var_30] mov eax, [rbp+var_34] sub eax, 1 movsxd rdx, eax call _memmove mov rax, [rbp+var_28] mov ecx, [rbp+var_34] sub ecx, 1 movsxd rcx, ecx mov byte ptr [rax+rcx+48Eh], 0 loc_40B36: cmp [rbp+var_28], 0 jz short loc_40B8F mov rax, [rbp+var_28] mov rax, [rax+2C0h] movsx eax, byte ptr [rax] cmp eax, 0 jz short loc_40B8F lea rdi, [rbp+var_11] mov rsi, [rbp+var_30] mov rax, [rbp+var_28] mov rdx, [rax+2C0h] call ma_scramble_323 mov rax, [rbp+var_20] mov rax, [rax+8] mov rdi, [rbp+var_20] lea rsi, [rbp+var_11] mov edx, 9 call rax cmp eax, 0 jz short loc_40B8D mov [rbp+var_18], 0 jmp short loc_40BBA loc_40B8D: jmp short loc_40BB3 loc_40B8F: mov rax, [rbp+var_20] mov rax, [rax+8] mov rdi, [rbp+var_20] xor ecx, ecx mov esi, ecx xor edx, edx call rax cmp eax, 0 jz short loc_40BB1 mov [rbp+var_18], 0 jmp short loc_40BBA loc_40BB1: jmp short $+2 loc_40BB3: mov [rbp+var_18], 0FFFFFFFFh loc_40BBA: mov eax, [rbp+var_18] mov [rbp+var_38], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_40BDB mov eax, [rbp+var_38] add rsp, 40h pop rbp retn loc_40BDB: call ___stack_chk_fail
long long auth_old_password(long long a1, long long a2) { int v3; // [rsp+Ch] [rbp-34h] long long v4; // [rsp+10h] [rbp-30h] BYREF long long v5; // [rsp+18h] [rbp-28h] long long v6; // [rsp+20h] [rbp-20h] _BYTE v8[9]; // [rsp+2Fh] [rbp-11h] BYREF unsigned long long v9; // [rsp+38h] [rbp-8h] v9 = __readfsqword(0x28u); v6 = a1; v5 = a2; if ( *(_BYTE *)(a1 + 72) ) { v4 = v5 + 1166; LABEL_9: if ( v5 && **(_BYTE **)(v5 + 704) ) { ma_scramble_323(v8, v4, *(_QWORD *)(v5 + 704)); if ( (*(unsigned int ( **)(long long, _BYTE *, long long))(v6 + 8))(v6, v8, 9LL) ) return 0; } else if ( (*(unsigned int ( **)(long long, _QWORD, _QWORD))(v6 + 8))(v6, 0LL, 0LL) ) { return 0; } return (unsigned int)-1; } v3 = (*(long long ( **)(long long, long long *))v6)(v6, &v4); if ( v3 >= 0 ) { if ( v3 == 9 || v3 == 21 ) { memmove(v5 + 1166, v4, v3 - 1); *(_BYTE *)(v5 + v3 - 1 + 1166) = 0; goto LABEL_9; } return 2012; } else { return 0; } }
auth_old_password: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x20],RDI MOV qword ptr [RBP + -0x28],RSI MOV RAX,qword ptr [RBP + -0x20] CMP byte ptr [RAX + 0x48],0x0 JZ 0x00140ac7 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x48e MOV qword ptr [RBP + -0x30],RAX JMP 0x00140b36 LAB_00140ac7: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0x30] CALL RAX MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JGE 0x00140aec MOV dword ptr [RBP + -0x18],0x0 JMP 0x00140bba LAB_00140aec: CMP dword ptr [RBP + -0x34],0x9 JZ 0x00140b04 CMP dword ptr [RBP + -0x34],0x15 JZ 0x00140b04 MOV dword ptr [RBP + -0x18],0x7dc JMP 0x00140bba LAB_00140b04: MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x48e MOV RSI,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + -0x34] SUB EAX,0x1 MOVSXD RDX,EAX CALL 0x001136f0 MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RBP + -0x34] SUB ECX,0x1 MOVSXD RCX,ECX MOV byte ptr [RAX + RCX*0x1 + 0x48e],0x0 LAB_00140b36: CMP qword ptr [RBP + -0x28],0x0 JZ 0x00140b8f MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x2c0] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x00140b8f LEA RDI,[RBP + -0x11] MOV RSI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RAX + 0x2c0] CALL 0x00148080 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV RDI,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0x11] MOV EDX,0x9 CALL RAX CMP EAX,0x0 JZ 0x00140b8d MOV dword ptr [RBP + -0x18],0x0 JMP 0x00140bba LAB_00140b8d: JMP 0x00140bb3 LAB_00140b8f: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV RDI,qword ptr [RBP + -0x20] XOR ECX,ECX MOV ESI,ECX XOR EDX,EDX CALL RAX CMP EAX,0x0 JZ 0x00140bb1 MOV dword ptr [RBP + -0x18],0x0 JMP 0x00140bba LAB_00140bb1: JMP 0x00140bb3 LAB_00140bb3: MOV dword ptr [RBP + -0x18],0xffffffff LAB_00140bba: MOV EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x38],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00140bdb MOV EAX,dword ptr [RBP + -0x38] ADD RSP,0x40 POP RBP RET LAB_00140bdb: CALL 0x001134b0
int4 auth_old_password(int8 *param_1,long param_2) { int iVar1; long in_FS_OFFSET; void *local_38; long local_30; int8 *local_28; int4 local_20; int1 local_19 [9]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_30 = param_2; local_28 = param_1; if (*(char *)(param_1 + 9) == '\0') { iVar1 = (*(code *)*param_1)(param_1,&local_38); if (iVar1 < 0) { local_20 = 0; goto LAB_00140bba; } if ((iVar1 != 9) && (iVar1 != 0x15)) { local_20 = 0x7dc; goto LAB_00140bba; } memmove((void *)(local_30 + 0x48e),local_38,(long)(iVar1 + -1)); *(int1 *)(local_30 + 0x48e + (long)(iVar1 + -1)) = 0; } else { local_38 = (void *)(param_2 + 0x48e); } if ((local_30 == 0) || (**(char **)(local_30 + 0x2c0) == '\0')) { iVar1 = (*(code *)local_28[1])(local_28,0,0); if (iVar1 != 0) { local_20 = 0; goto LAB_00140bba; } } else { ma_scramble_323(local_19,local_38,*(int8 *)(local_30 + 0x2c0)); iVar1 = (*(code *)local_28[1])(local_28,local_19,9); if (iVar1 != 0) { local_20 = 0; goto LAB_00140bba; } } local_20 = 0xffffffff; LAB_00140bba: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_20; }
13,241
fini_one_value
eloqsql/mysys/my_getopt.c
static void fini_one_value(const struct my_option *option, void *variable, longlong value __attribute__ ((unused))) { DBUG_ENTER("fini_one_value"); switch ((option->var_type & GET_TYPE_MASK)) { case GET_STR_ALLOC: my_free(*((char**) variable)); *((char**) variable)= NULL; break; default: /* dummy default to avoid compiler warnings */ break; } DBUG_VOID_RETURN; }
O0
c
fini_one_value: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movl 0x30(%rax), %eax andl $0x3f, %eax subl $0xa, %eax jne 0x7adae jmp 0x7ad95 movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x7d560 movq -0x10(%rbp), %rax movq $0x0, (%rax) jmp 0x7adb0 jmp 0x7adb0 jmp 0x7adb2 jmp 0x7adb4 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
fini_one_value: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov eax, [rax+30h] and eax, 3Fh sub eax, 0Ah jnz short loc_7ADAE jmp short $+2 loc_7AD95: mov rax, [rbp+var_10] mov rdi, [rax] call my_free mov rax, [rbp+var_10] mov qword ptr [rax], 0 jmp short loc_7ADB0 loc_7ADAE: jmp short $+2 loc_7ADB0: jmp short $+2 loc_7ADB2: jmp short $+2 loc_7ADB4: add rsp, 20h pop rbp retn
_QWORD * fini_one_value(long long a1, _QWORD *a2) { _QWORD *result; // rax result = (_QWORD *)((*(_DWORD *)(a1 + 48) & 0x3Fu) - 10); if ( (*(_DWORD *)(a1 + 48) & 0x3F) == 0xA ) { my_free(*a2); result = a2; *a2 = 0LL; } return result; }
fini_one_value: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x30] AND EAX,0x3f SUB EAX,0xa JNZ 0x0017adae JMP 0x0017ad95 LAB_0017ad95: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x0017d560 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],0x0 JMP 0x0017adb0 LAB_0017adae: JMP 0x0017adb0 LAB_0017adb0: JMP 0x0017adb2 LAB_0017adb2: JMP 0x0017adb4 LAB_0017adb4: ADD RSP,0x20 POP RBP RET
void fini_one_value(long param_1,int8 *param_2) { if ((*(uint *)(param_1 + 0x30) & 0x3f) == 10) { my_free(*param_2); *param_2 = 0; } return; }
13,242
freeze_size
eloqsql/mysys/array.c
void freeze_size(DYNAMIC_ARRAY *array) { uint elements; /* Do nothing if we are using a static buffer */ if (array->malloc_flags & MY_INIT_BUFFER_USED) return; elements= MY_MAX(array->elements, 1); if (array->buffer && array->max_element > elements) { array->buffer=(uchar*) my_realloc(array->m_psi_key, array->buffer, elements * array->size_of_element, MYF(MY_WME | array->malloc_flags)); array->max_element= elements; } }
O0
c
freeze_size: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq 0x20(%rax), %rax andq $0x100, %rax # imm = 0x100 cmpq $0x0, %rax je 0x303a2 jmp 0x30420 movq -0x8(%rbp), %rax cmpl $0x1, 0x8(%rax) jbe 0x303b8 movq -0x8(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x10(%rbp) jmp 0x303c2 movl $0x1, %eax movl %eax, -0x10(%rbp) jmp 0x303c2 movl -0x10(%rbp), %eax movl %eax, -0xc(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, (%rax) je 0x30420 movq -0x8(%rbp), %rax movl 0xc(%rax), %eax cmpl -0xc(%rbp), %eax jbe 0x30420 movq -0x8(%rbp), %rax movl 0x18(%rax), %edi movq -0x8(%rbp), %rax movq (%rax), %rsi movl -0xc(%rbp), %eax movq -0x8(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax movl %eax, %edx movq -0x8(%rbp), %rax movq 0x20(%rax), %rcx orq $0x10, %rcx callq 0x2e9c0 movq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, (%rax) movl -0xc(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0xc(%rax) addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
freeze_size: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax+20h] and rax, 100h cmp rax, 0 jz short loc_303A2 jmp short loc_30420 loc_303A2: mov rax, [rbp+var_8] cmp dword ptr [rax+8], 1 jbe short loc_303B8 mov rax, [rbp+var_8] mov eax, [rax+8] mov [rbp+var_10], eax jmp short loc_303C2 loc_303B8: mov eax, 1 mov [rbp+var_10], eax jmp short $+2 loc_303C2: mov eax, [rbp+var_10] mov [rbp+var_C], eax mov rax, [rbp+var_8] cmp qword ptr [rax], 0 jz short loc_30420 mov rax, [rbp+var_8] mov eax, [rax+0Ch] cmp eax, [rbp+var_C] jbe short loc_30420 mov rax, [rbp+var_8] mov edi, [rax+18h] mov rax, [rbp+var_8] mov rsi, [rax] mov eax, [rbp+var_C] mov rcx, [rbp+var_8] imul eax, [rcx+14h] mov eax, eax mov edx, eax mov rax, [rbp+var_8] mov rcx, [rax+20h] or rcx, 10h call my_realloc mov rcx, rax mov rax, [rbp+var_8] mov [rax], rcx mov ecx, [rbp+var_C] mov rax, [rbp+var_8] mov [rax+0Ch], ecx loc_30420: add rsp, 10h pop rbp retn
long long freeze_size(long long a1) { long long result; // rax unsigned int v2; // [rsp+0h] [rbp-10h] result = *(_QWORD *)(a1 + 32) & 0x100LL; if ( !result ) { if ( *(_DWORD *)(a1 + 8) <= 1u ) v2 = 1; else v2 = *(_DWORD *)(a1 + 8); result = a1; if ( *(_QWORD *)a1 ) { result = *(unsigned int *)(a1 + 12); if ( (unsigned int)result > v2 ) { *(_QWORD *)a1 = my_realloc( *(_DWORD *)(a1 + 24), *(_QWORD *)a1, *(_DWORD *)(a1 + 20) * v2, *(_BYTE *)(a1 + 32) | 0x10u); result = a1; *(_DWORD *)(a1 + 12) = v2; } } } return result; }
freeze_size: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x20] AND RAX,0x100 CMP RAX,0x0 JZ 0x001303a2 JMP 0x00130420 LAB_001303a2: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x8],0x1 JBE 0x001303b8 MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x10],EAX JMP 0x001303c2 LAB_001303b8: MOV EAX,0x1 MOV dword ptr [RBP + -0x10],EAX JMP 0x001303c2 LAB_001303c2: MOV EAX,dword ptr [RBP + -0x10] MOV dword ptr [RBP + -0xc],EAX MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX],0x0 JZ 0x00130420 MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0xc] CMP EAX,dword ptr [RBP + -0xc] JBE 0x00130420 MOV RAX,qword ptr [RBP + -0x8] MOV EDI,dword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RAX] MOV EAX,dword ptr [RBP + -0xc] MOV RCX,qword ptr [RBP + -0x8] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x20] OR RCX,0x10 CALL 0x0012e9c0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0xc],ECX LAB_00130420: ADD RSP,0x10 POP RBP RET
void freeze_size(long *param_1) { long lVar1; uint local_18; if ((param_1[4] & 0x100U) == 0) { if (*(uint *)(param_1 + 1) < 2) { local_18 = 1; } else { local_18 = *(uint *)(param_1 + 1); } if ((*param_1 != 0) && (local_18 < *(uint *)((long)param_1 + 0xc))) { lVar1 = my_realloc((int)param_1[3],*param_1,local_18 * *(int *)((long)param_1 + 0x14), param_1[4] | 0x10); *param_1 = lVar1; *(uint *)((long)param_1 + 0xc) = local_18; } } return; }
13,243
LefDefParser::defiComponent::Init()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiComponent.cpp
void defiComponent::Init() { id_ = 0; name_ = 0; regionName_ = 0; foreignName_ = 0; Fori_ = 0; EEQ_ = 0; generateName_ = 0; macroName_ = 0; generateNameSize_ = 0; maskShiftSize_ = 0; maskShift_ = 0; macroNameSize_ = 0; minLayerSize_ = 0; maxLayerSize_ = 0; minLayer_ = 0; maxLayer_ = 0; nets_ = 0; source_ = 0; numNets_ = 0; bumpName(16); bumpId(16); bumpRegionName(16); bumpEEQ(16); bumpNets(16); bumpForeignName(16); bumpMinLayer(16); bumpMaxLayer(16); numProps_ = 0; propsAllocated_ = 2; names_ = (char**)malloc(sizeof(char*)* 2); values_ = (char**)malloc(sizeof(char*)* 2); dvalues_ = (double*)malloc(sizeof(double)* 2); types_ = (char*)malloc(sizeof(char)* 2); clear(); numRects_ = 0; rectsAllocated_ = 1; rectXl_ = (int*)malloc(sizeof(int)*1); rectYl_ = (int*)malloc(sizeof(int)*1); rectXh_ = (int*)malloc(sizeof(int)*1); rectYh_ = (int*)malloc(sizeof(int)*1); }
O0
cpp
LefDefParser::defiComponent::Init(): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rdi movq %rdi, 0x8(%rsp) movq $0x0, (%rdi) movq $0x0, 0x8(%rdi) movq $0x0, 0x60(%rdi) movq $0x0, 0xb8(%rdi) movl $0x0, 0xcc(%rdi) movq $0x0, 0x70(%rdi) movq $0x0, 0xd8(%rdi) movq $0x0, 0xe8(%rdi) movl $0x0, 0xd0(%rdi) movl $0x0, 0xa0(%rdi) movq $0x0, 0x98(%rdi) movl $0x0, 0xe0(%rdi) movl $0x0, 0x10c(%rdi) movl $0x0, 0x118(%rdi) movq $0x0, 0x110(%rdi) movq $0x0, 0x120(%rdi) movq $0x0, 0x88(%rdi) movq $0x0, 0xa8(%rdi) movl $0x0, 0x7c(%rdi) movl $0x10, %esi callq 0x143a0 movq 0x8(%rsp), %rdi movl $0x10, %esi callq 0x14400 movq 0x8(%rsp), %rdi movl $0x10, %esi callq 0x14450 movq 0x8(%rsp), %rdi movl $0x10, %esi callq 0x144b0 movq 0x8(%rsp), %rdi movl $0x10, %esi callq 0x14510 movq 0x8(%rsp), %rdi movl $0x10, %esi callq 0x145c0 movq 0x8(%rsp), %rdi movl $0x10, %esi callq 0x14630 movq 0x8(%rsp), %rdi movl $0x10, %esi callq 0x146a0 movq 0x8(%rsp), %rax movl $0x0, 0x128(%rax) movl $0x2, 0x12c(%rax) movl $0x10, %edi callq 0x72d0 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x130(%rax) movl $0x10, %edi callq 0x72d0 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x138(%rax) movl $0x10, %edi callq 0x72d0 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x140(%rax) movl $0x2, %edi callq 0x72d0 movq 0x8(%rsp), %rdi movq %rax, 0x148(%rdi) callq 0x14710 movq 0x8(%rsp), %rax movl $0x0, 0x34(%rax) movl $0x1, 0x38(%rax) movl $0x4, %edi callq 0x72d0 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x40(%rax) movl $0x4, %edi callq 0x72d0 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x48(%rax) movl $0x4, %edi callq 0x72d0 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x50(%rax) movl $0x4, %edi callq 0x72d0 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x58(%rax) addq $0x18, %rsp retq nop
_ZN12LefDefParser13defiComponent4InitEv: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rdi, [rsp+18h+var_8]; this mov [rsp+18h+var_10], rdi mov qword ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov qword ptr [rdi+60h], 0 mov qword ptr [rdi+0B8h], 0 mov dword ptr [rdi+0CCh], 0 mov qword ptr [rdi+70h], 0 mov qword ptr [rdi+0D8h], 0 mov qword ptr [rdi+0E8h], 0 mov dword ptr [rdi+0D0h], 0 mov dword ptr [rdi+0A0h], 0 mov qword ptr [rdi+98h], 0 mov dword ptr [rdi+0E0h], 0 mov dword ptr [rdi+10Ch], 0 mov dword ptr [rdi+118h], 0 mov qword ptr [rdi+110h], 0 mov qword ptr [rdi+120h], 0 mov qword ptr [rdi+88h], 0 mov qword ptr [rdi+0A8h], 0 mov dword ptr [rdi+7Ch], 0 mov esi, 10h; int call _ZN12LefDefParser13defiComponent8bumpNameEi; LefDefParser::defiComponent::bumpName(int) mov rdi, [rsp+18h+var_10]; this mov esi, 10h; int call _ZN12LefDefParser13defiComponent6bumpIdEi; LefDefParser::defiComponent::bumpId(int) mov rdi, [rsp+18h+var_10]; this mov esi, 10h; int call _ZN12LefDefParser13defiComponent14bumpRegionNameEi; LefDefParser::defiComponent::bumpRegionName(int) mov rdi, [rsp+18h+var_10]; this mov esi, 10h; int call _ZN12LefDefParser13defiComponent7bumpEEQEi; LefDefParser::defiComponent::bumpEEQ(int) mov rdi, [rsp+18h+var_10]; this mov esi, 10h; int call _ZN12LefDefParser13defiComponent8bumpNetsEi; LefDefParser::defiComponent::bumpNets(int) mov rdi, [rsp+18h+var_10]; this mov esi, 10h; int call _ZN12LefDefParser13defiComponent15bumpForeignNameEi; LefDefParser::defiComponent::bumpForeignName(int) mov rdi, [rsp+18h+var_10]; this mov esi, 10h; int call _ZN12LefDefParser13defiComponent12bumpMinLayerEi; LefDefParser::defiComponent::bumpMinLayer(int) mov rdi, [rsp+18h+var_10]; this mov esi, 10h; int call _ZN12LefDefParser13defiComponent12bumpMaxLayerEi; LefDefParser::defiComponent::bumpMaxLayer(int) mov rax, [rsp+18h+var_10] mov dword ptr [rax+128h], 0 mov dword ptr [rax+12Ch], 2 mov edi, 10h call _malloc mov rcx, rax mov rax, [rsp+18h+var_10] mov [rax+130h], rcx mov edi, 10h call _malloc mov rcx, rax mov rax, [rsp+18h+var_10] mov [rax+138h], rcx mov edi, 10h call _malloc mov rcx, rax mov rax, [rsp+18h+var_10] mov [rax+140h], rcx mov edi, 2 call _malloc mov rdi, [rsp+18h+var_10]; this mov [rdi+148h], rax call _ZN12LefDefParser13defiComponent5clearEv; LefDefParser::defiComponent::clear(void) mov rax, [rsp+18h+var_10] mov dword ptr [rax+34h], 0 mov dword ptr [rax+38h], 1 mov edi, 4 call _malloc mov rcx, rax mov rax, [rsp+18h+var_10] mov [rax+40h], rcx mov edi, 4 call _malloc mov rcx, rax mov rax, [rsp+18h+var_10] mov [rax+48h], rcx mov edi, 4 call _malloc mov rcx, rax mov rax, [rsp+18h+var_10] mov [rax+50h], rcx mov edi, 4 call _malloc mov rcx, rax mov rax, [rsp+18h+var_10] mov [rax+58h], rcx add rsp, 18h retn
LefDefParser::defiComponent * LefDefParser::defiComponent::Init(LefDefParser::defiComponent *this) { long long v1; // rcx LefDefParser::defiComponent *result; // rax *(_QWORD *)this = 0LL; *((_QWORD *)this + 1) = 0LL; *((_QWORD *)this + 12) = 0LL; *((_QWORD *)this + 23) = 0LL; *((_DWORD *)this + 51) = 0; *((_QWORD *)this + 14) = 0LL; *((_QWORD *)this + 27) = 0LL; *((_QWORD *)this + 29) = 0LL; *((_DWORD *)this + 52) = 0; *((_DWORD *)this + 40) = 0; *((_QWORD *)this + 19) = 0LL; *((_DWORD *)this + 56) = 0; *((_DWORD *)this + 67) = 0; *((_DWORD *)this + 70) = 0; *((_QWORD *)this + 34) = 0LL; *((_QWORD *)this + 36) = 0LL; *((_QWORD *)this + 17) = 0LL; *((_QWORD *)this + 21) = 0LL; *((_DWORD *)this + 31) = 0; LefDefParser::defiComponent::bumpName(this, 16); LefDefParser::defiComponent::bumpId(this, 16); LefDefParser::defiComponent::bumpRegionName(this, 16); LefDefParser::defiComponent::bumpEEQ(this, 16); LefDefParser::defiComponent::bumpNets(this, 16); LefDefParser::defiComponent::bumpForeignName(this, 16); LefDefParser::defiComponent::bumpMinLayer(this, 16); LefDefParser::defiComponent::bumpMaxLayer(this, 16); *((_DWORD *)this + 74) = 0; *((_DWORD *)this + 75) = 2; *((_QWORD *)this + 38) = malloc(16LL); *((_QWORD *)this + 39) = malloc(16LL); *((_QWORD *)this + 40) = malloc(16LL); *((_QWORD *)this + 41) = malloc(2LL); LefDefParser::defiComponent::clear(this); *((_DWORD *)this + 13) = 0; *((_DWORD *)this + 14) = 1; *((_QWORD *)this + 8) = malloc(4LL); *((_QWORD *)this + 9) = malloc(4LL); *((_QWORD *)this + 10) = malloc(4LL); v1 = malloc(4LL); result = this; *((_QWORD *)this + 11) = v1; return result; }
Init: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RDI MOV qword ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x60],0x0 MOV qword ptr [RDI + 0xb8],0x0 MOV dword ptr [RDI + 0xcc],0x0 MOV qword ptr [RDI + 0x70],0x0 MOV qword ptr [RDI + 0xd8],0x0 MOV qword ptr [RDI + 0xe8],0x0 MOV dword ptr [RDI + 0xd0],0x0 MOV dword ptr [RDI + 0xa0],0x0 MOV qword ptr [RDI + 0x98],0x0 MOV dword ptr [RDI + 0xe0],0x0 MOV dword ptr [RDI + 0x10c],0x0 MOV dword ptr [RDI + 0x118],0x0 MOV qword ptr [RDI + 0x110],0x0 MOV qword ptr [RDI + 0x120],0x0 MOV qword ptr [RDI + 0x88],0x0 MOV qword ptr [RDI + 0xa8],0x0 MOV dword ptr [RDI + 0x7c],0x0 MOV ESI,0x10 CALL 0x001143a0 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x10 CALL 0x00114400 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x10 CALL 0x00114450 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x10 CALL 0x001144b0 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x10 CALL 0x00114510 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x10 CALL 0x001145c0 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x10 CALL 0x00114630 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x10 CALL 0x001146a0 MOV RAX,qword ptr [RSP + 0x8] MOV dword ptr [RAX + 0x128],0x0 MOV dword ptr [RAX + 0x12c],0x2 MOV EDI,0x10 CALL 0x001072d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x130],RCX MOV EDI,0x10 CALL 0x001072d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x138],RCX MOV EDI,0x10 CALL 0x001072d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x140],RCX MOV EDI,0x2 CALL 0x001072d0 MOV RDI,qword ptr [RSP + 0x8] MOV qword ptr [RDI + 0x148],RAX CALL 0x00114710 MOV RAX,qword ptr [RSP + 0x8] MOV dword ptr [RAX + 0x34],0x0 MOV dword ptr [RAX + 0x38],0x1 MOV EDI,0x4 CALL 0x001072d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x40],RCX MOV EDI,0x4 CALL 0x001072d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x48],RCX MOV EDI,0x4 CALL 0x001072d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x50],RCX MOV EDI,0x4 CALL 0x001072d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x58],RCX ADD RSP,0x18 RET
/* LefDefParser::defiComponent::Init() */ void __thiscall LefDefParser::defiComponent::Init(defiComponent *this) { void *pvVar1; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x60) = 0; *(int8 *)(this + 0xb8) = 0; *(int4 *)(this + 0xcc) = 0; *(int8 *)(this + 0x70) = 0; *(int8 *)(this + 0xd8) = 0; *(int8 *)(this + 0xe8) = 0; *(int4 *)(this + 0xd0) = 0; *(int4 *)(this + 0xa0) = 0; *(int8 *)(this + 0x98) = 0; *(int4 *)(this + 0xe0) = 0; *(int4 *)(this + 0x10c) = 0; *(int4 *)(this + 0x118) = 0; *(int8 *)(this + 0x110) = 0; *(int8 *)(this + 0x120) = 0; *(int8 *)(this + 0x88) = 0; *(int8 *)(this + 0xa8) = 0; *(int4 *)(this + 0x7c) = 0; bumpName(this,0x10); bumpId(this,0x10); bumpRegionName(this,0x10); bumpEEQ(this,0x10); bumpNets(this,0x10); bumpForeignName(this,0x10); bumpMinLayer(this,0x10); bumpMaxLayer(this,0x10); *(int4 *)(this + 0x128) = 0; *(int4 *)(this + 300) = 2; pvVar1 = malloc(0x10); *(void **)(this + 0x130) = pvVar1; pvVar1 = malloc(0x10); *(void **)(this + 0x138) = pvVar1; pvVar1 = malloc(0x10); *(void **)(this + 0x140) = pvVar1; pvVar1 = malloc(2); *(void **)(this + 0x148) = pvVar1; clear(this); *(int4 *)(this + 0x34) = 0; *(int4 *)(this + 0x38) = 1; pvVar1 = malloc(4); *(void **)(this + 0x40) = pvVar1; pvVar1 = malloc(4); *(void **)(this + 0x48) = pvVar1; pvVar1 = malloc(4); *(void **)(this + 0x50) = pvVar1; pvVar1 = malloc(4); *(void **)(this + 0x58) = pvVar1; return; }
13,244
stbi__at_eof
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h
stbi_inline static int stbi__at_eof(stbi__context *s) { if (s->io.read) { if (!(s->io.eof)(s->io_user_data)) return 0; // if feof() is true, check if buffer = end // special case: we've only got the special 0 character at the end if (s->read_from_callbacks == 0) return 1; } return s->img_buffer >= s->img_buffer_end; }
O2
c
stbi__at_eof: pushq %rbx movq %rdi, %rbx cmpq $0x0, 0x10(%rdi) je 0x13476 movq 0x28(%rbx), %rdi callq *0x20(%rbx) testl %eax, %eax je 0x1348b cmpl $0x0, 0x30(%rbx) je 0x1348f movq 0xc0(%rbx), %rcx xorl %eax, %eax cmpq 0xc8(%rbx), %rcx setae %al jmp 0x13492 xorl %eax, %eax jmp 0x13492 pushq $0x1 popq %rax popq %rbx retq
stbi__at_eof: push rbx mov rbx, rdi cmp qword ptr [rdi+10h], 0 jz short loc_13476 mov rdi, [rbx+28h] call qword ptr [rbx+20h] test eax, eax jz short loc_1348B cmp dword ptr [rbx+30h], 0 jz short loc_1348F loc_13476: mov rcx, [rbx+0C0h] xor eax, eax cmp rcx, [rbx+0C8h] setnb al jmp short loc_13492 loc_1348B: xor eax, eax jmp short loc_13492 loc_1348F: push 1 pop rax loc_13492: pop rbx retn
long long stbi__at_eof(long long a1) { if ( !*(_QWORD *)(a1 + 16) ) return *(_QWORD *)(a1 + 192) >= *(_QWORD *)(a1 + 200); if ( !(*(unsigned int ( **)(_QWORD))(a1 + 32))(*(_QWORD *)(a1 + 40)) ) return 0LL; if ( *(_DWORD *)(a1 + 48) ) return *(_QWORD *)(a1 + 192) >= *(_QWORD *)(a1 + 200); return 1LL; }
stbi__at_eof: PUSH RBX MOV RBX,RDI CMP qword ptr [RDI + 0x10],0x0 JZ 0x00113476 MOV RDI,qword ptr [RBX + 0x28] CALL qword ptr [RBX + 0x20] TEST EAX,EAX JZ 0x0011348b CMP dword ptr [RBX + 0x30],0x0 JZ 0x0011348f LAB_00113476: MOV RCX,qword ptr [RBX + 0xc0] XOR EAX,EAX CMP RCX,qword ptr [RBX + 0xc8] SETNC AL JMP 0x00113492 LAB_0011348b: XOR EAX,EAX JMP 0x00113492 LAB_0011348f: PUSH 0x1 POP RAX LAB_00113492: POP RBX RET
bool stbi__at_eof(long param_1) { int iVar1; if (*(long *)(param_1 + 0x10) != 0) { iVar1 = (**(code **)(param_1 + 0x20))(*(int8 *)(param_1 + 0x28)); if (iVar1 == 0) { return false; } if (*(int *)(param_1 + 0x30) == 0) { return true; } } return *(ulong *)(param_1 + 200) <= *(ulong *)(param_1 + 0xc0); }
13,245
common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&, templates_params const&)
llama.cpp/common/chat.cpp
static common_chat_params common_chat_params_init_functionary_v3_1_llama_3_1(const common_chat_template & tmpl, const struct templates_params & inputs) { // https://github.com/MeetKai/functionary/blob/main/tests/prompt_test_v3-llama3.1.txt common_chat_params data; json tools = inputs.tools.is_null() ? inputs.tools : json::array(); std::string python_code_argument_name; auto has_raw_python = false; data.grammar_lazy = inputs.tool_choice != COMMON_CHAT_TOOL_CHOICE_REQUIRED; data.grammar = build_grammar([&](const common_grammar_builder & builder) { std::vector<std::string> tool_rules; foreach_function(inputs.tools, [&](const json & tool) { const auto & function = tool.at("function"); const auto & parameters = function.at("parameters"); std::string name = function.at("name"); if (name == "python" || name == "ipython") { if (!parameters.contains("type")) { throw std::runtime_error("Missing type in python tool"); } has_raw_python = true; const auto & type = parameters.at("type"); if (type == "object") { auto properties = parameters.at("properties"); for (auto it = properties.begin(); it != properties.end(); ++it) { if (it.value().at("type") == "string") { if (!python_code_argument_name.empty()) { throw std::runtime_error("Multiple string arguments found in python tool"); } python_code_argument_name = it.key(); } } if (python_code_argument_name.empty()) { throw std::runtime_error("No string argument found in python tool"); } } else if (type != "string") { throw std::runtime_error("Invalid type in python tool: " + type.dump()); } } tool_rules.push_back(builder.add_rule(name + "-call", "\"<function=" + name + ">\" " + builder.add_schema(name + "-args", parameters) + " \"</function>\" space")); }); if (has_raw_python) { tool_rules.push_back(builder.add_rule("python-call", "\"<|python_tag|>\" .*")); data.grammar_triggers.push_back({COMMON_GRAMMAR_TRIGGER_TYPE_WORD, "<|python_tag|>"}); data.preserved_tokens.push_back("<|python_tag|>"); } auto tool_call = builder.add_rule("tool_call", string_join(tool_rules, " | ")) + " space"; builder.add_rule("root", inputs.parallel_tool_calls ? "(" + tool_call + ")+" : tool_call); data.grammar_triggers.push_back({COMMON_GRAMMAR_TRIGGER_TYPE_WORD, "<function="}); }); data.prompt = apply(tmpl, inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt); // TODO: if (has_raw_python) data.format = COMMON_CHAT_FORMAT_FUNCTIONARY_V3_1_LLAMA_3_1; return data; }
O3
cpp
common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&, templates_params const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, %r14 movq %rsi, %rbp movq %rdi, %rbx movl $0x0, (%rdi) leaq 0x18(%rdi), %rax movq %rax, 0x8(%rdi) xorl %eax, %eax movq %rax, 0x10(%rdi) movb %al, 0x18(%rdi) leaq 0x38(%rdi), %rcx movq %rcx, 0x28(%rdi) movq %rax, 0x30(%rdi) movb %al, 0x38(%rdi) movb %al, 0x48(%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x50(%rdi) movups %xmm0, 0x60(%rdi) movups %xmm0, 0x70(%rdi) movups %xmm0, 0x80(%rdi) movq %rax, 0x90(%rdi) leaq 0x10(%rdx), %r12 cmpb %al, 0x10(%rdx) je 0x9bc55 leaq 0x58(%rsp), %rdi xorl %esi, %esi xorl %edx, %edx xorl %ecx, %ecx movl $0x2, %r8d callq 0xb14a0 jmp 0x9bc62 leaq 0x58(%rsp), %rdi movq %r12, %rsi callq 0x895d8 leaq 0x78(%rsp), %r15 movq %r15, -0x10(%r15) xorl %eax, %eax movq %rax, -0x8(%r15) movb %al, (%r15) movb %al, 0x7(%rsp) cmpl $0x1, 0x20(%r14) setne 0x48(%rbx) movq %rax, 0x10(%rsp) movl $0x20, %edi callq 0x20210 movq %r14, (%rax) leaq 0x7(%rsp), %rcx movq %rcx, 0x8(%rax) leaq 0x68(%rsp), %rcx movq %rcx, 0x10(%rax) movq %rbx, 0x18(%rax) leaq 0x8(%rsp), %rsi movq %rax, (%rsi) leaq 0xb360(%rip), %rax # 0xa7018 movq %rax, 0x18(%rsi) leaq 0xbb25(%rip), %rax # 0xa77e8 movq %rax, 0x10(%rsi) leaq 0x28(%rsp), %rdx movb $0x0, (%rdx) leaq 0x38(%rsp), %rdi callq 0xfd0ee leaq 0x28(%rbx), %rdi leaq 0x38(%rsp), %r13 movq %r13, %rsi callq 0x208c0 movq (%r13), %rdi leaq 0x48(%rsp), %rax cmpq %rax, %rdi je 0x9bd05 movq 0x48(%rsp), %rsi incq %rsi callq 0x20180 movq 0x18(%rsp), %rax testq %rax, %rax je 0x9bd1e leaq 0x8(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movzbl (%r12), %eax testl %eax, %eax je 0x9bd50 cmpl $0x2, %eax je 0x9bd31 cmpl $0x1, %eax jne 0x9bd3e movq 0x18(%r14), %rax movq (%rax), %rcx cmpq 0x8(%rax), %rcx je 0x9bd50 movq %rbp, %r13 leaq 0x8(%rsp), %rdi movq %r12, %rsi callq 0x895d8 jmp 0x9bd80 movq %rbp, %r13 leaq 0x8(%rsp), %r12 movb $0x0, (%r12) movq $0x0, 0x8(%r12) movq %r12, %rdi movl $0x1, %esi callq 0x8538a movq %r12, %rdi movl $0x1, %esi callq 0x8538a movzbl 0x60(%r14), %ebp leaq 0x28(%rsp), %r12 movb $0x0, (%r12) movq $0x0, 0x8(%r12) movq %r12, %rdi movl $0x1, %esi callq 0x8538a movq %r12, %rdi movl $0x1, %esi callq 0x8538a leaq 0x38(%rsp), %rdi leaq 0x8(%rsp), %rcx movq %r13, %rsi movq %r14, %rdx movl %ebp, %r8d movq %r12, %r9 callq 0x9c8c5 leaq 0x8(%rbx), %rdi leaq 0x38(%rsp), %r14 movq %r14, %rsi callq 0x208c0 movq (%r14), %rdi leaq 0x48(%rsp), %rax cmpq %rax, %rdi je 0x9bdf8 movq 0x48(%rsp), %rsi incq %rsi callq 0x20180 leaq 0x28(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x8538a movq %r14, %rdi callq 0x89aa4 leaq 0x8(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x8538a movq %r14, %rdi callq 0x89aa4 movl $0x9, (%rbx) movq 0x68(%rsp), %rdi cmpq %r15, %rdi je 0x9be43 movq 0x78(%rsp), %rsi incq %rsi callq 0x20180 leaq 0x58(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x8538a movq %rbx, %rdi callq 0x89aa4 addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x9bec9 jmp 0x9bec1 movq %rax, %r14 leaq 0x28(%rsp), %r12 movq %r12, %rdi xorl %esi, %esi callq 0x8538a movq %r12, %rdi callq 0x89aa4 leaq 0x8(%rsp), %r12 movq %r12, %rdi xorl %esi, %esi callq 0x8538a movq %r12, %rdi callq 0x89aa4 jmp 0x9becc movq %rax, %r14 movq 0x18(%rsp), %rax testq %rax, %rax je 0x9becc leaq 0x8(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0x9becc movq %rax, %rdi callq 0x289b9 movq %rax, %r14 movq 0x68(%rsp), %rdi cmpq %r15, %rdi je 0x9bee3 movq 0x78(%rsp), %rsi incq %rsi callq 0x20180 leaq 0x58(%rsp), %r15 movq %r15, %rdi xorl %esi, %esi callq 0x8538a movq %r15, %rdi callq 0x89aa4 jmp 0x9beff movq %rax, %r14 movq %rbx, %rdi callq 0xb1d56 movq %r14, %rdi callq 0x20af0
_ZL50common_chat_params_init_functionary_v3_1_llama_3_1RKN5minja13chat_templateERK16templates_params: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov r14, rdx mov rbp, rsi mov rbx, rdi mov dword ptr [rdi], 0 lea rax, [rdi+18h] mov [rdi+8], rax xor eax, eax mov [rdi+10h], rax mov [rdi+18h], al lea rcx, [rdi+38h] mov [rdi+28h], rcx mov [rdi+30h], rax mov [rdi+38h], al mov [rdi+48h], al xorps xmm0, xmm0 movups xmmword ptr [rdi+50h], xmm0 movups xmmword ptr [rdi+60h], xmm0 movups xmmword ptr [rdi+70h], xmm0 movups xmmword ptr [rdi+80h], xmm0 mov [rdi+90h], rax lea r12, [rdx+10h] cmp [rdx+10h], al jz short loc_9BC55 lea rdi, [rsp+0B8h+var_60] xor esi, esi xor edx, edx xor ecx, ecx mov r8d, 2 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t) jmp short loc_9BC62 loc_9BC55: lea rdi, [rsp+0B8h+var_60] mov rsi, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) loc_9BC62: lea r15, [rsp+0B8h+var_40] mov [r15-10h], r15 xor eax, eax mov [r15-8], rax mov [r15], al mov [rsp+0B8h+var_B1], al cmp dword ptr [r14+20h], 1 setnz byte ptr [rbx+48h] mov [rsp+0B8h+var_A8], rax mov edi, 20h ; ' '; unsigned __int64 call __Znwm; operator new(ulong) mov [rax], r14 lea rcx, [rsp+0B8h+var_B1] mov [rax+8], rcx lea rcx, [rsp+0B8h+var_50] mov [rax+10h], rcx mov [rax+18h], rbx lea rsi, [rsp+0B8h+var_B0] mov [rsi], rax lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL50common_chat_params_init_functionary_v3_1_llama_3_1RKN5minja13chat_templateERK16templates_paramsE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,templates_params const&)::$_0>::_M_invoke(std::_Any_data const&,common_grammar_builder const&) mov [rsi+18h], rax lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL50common_chat_params_init_functionary_v3_1_llama_3_1RKN5minja13chat_templateERK16templates_paramsE3$_0E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,templates_params const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsi+10h], rax lea rdx, [rsp+0B8h+var_90] mov byte ptr [rdx], 0 lea rdi, [rsp+0B8h+var_80] call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&) lea rdi, [rbx+28h] lea r13, [rsp+0B8h+var_80] mov rsi, r13 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r13+0]; void * lea rax, [rsp+0B8h+var_70] cmp rdi, rax jz short loc_9BD05 mov rsi, [rsp+0B8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9BD05: mov rax, [rsp+0B8h+var_A0] test rax, rax jz short loc_9BD1E lea rdi, [rsp+0B8h+var_B0] mov rsi, rdi mov edx, 3 call rax loc_9BD1E: movzx eax, byte ptr [r12] test eax, eax jz short loc_9BD50 cmp eax, 2 jz short loc_9BD31 cmp eax, 1 jnz short loc_9BD3E loc_9BD31: mov rax, [r14+18h] mov rcx, [rax] cmp rcx, [rax+8] jz short loc_9BD50 loc_9BD3E: mov r13, rbp lea rdi, [rsp+0B8h+var_B0] mov rsi, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) jmp short loc_9BD80 loc_9BD50: mov r13, rbp lea r12, [rsp+0B8h+var_B0] mov byte ptr [r12], 0 mov qword ptr [r12+8], 0 mov rdi, r12 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r12 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) loc_9BD80: movzx ebp, byte ptr [r14+60h] lea r12, [rsp+0B8h+var_90] mov byte ptr [r12], 0 mov qword ptr [r12+8], 0 mov rdi, r12 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r12 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) lea rdi, [rsp+0B8h+var_80] lea rcx, [rsp+0B8h+var_B0] mov rsi, r13 mov rdx, r14 mov r8d, ebp mov r9, r12 call _ZL5applyRKN5minja13chat_templateERKN8nlohmann16json_abi_v3_11_310basic_jsonINS4_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS4_14adl_serializerES7_IhSaIhEEvEESJ_bSJ_; apply(minja::chat_template const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) lea rdi, [rbx+8] lea r14, [rsp+0B8h+var_80] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r14]; void * lea rax, [rsp+0B8h+var_70] cmp rdi, rax jz short loc_9BDF8 mov rsi, [rsp+0B8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9BDF8: lea r14, [rsp+0B8h+var_90] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea r14, [rsp+0B8h+var_B0] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov dword ptr [rbx], 9 mov rdi, [rsp+0B8h+var_50]; void * cmp rdi, r15 jz short loc_9BE43 mov rsi, [rsp+0B8h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9BE43: lea rbx, [rsp+0B8h+var_60] mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_9BEC9 jmp short loc_9BEC1 mov r14, rax lea r12, [rsp+0B8h+var_90] mov rdi, r12 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea r12, [rsp+0B8h+var_B0] mov rdi, r12 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_9BECC mov r14, rax mov rax, [rsp+0B8h+var_A0] test rax, rax jz short loc_9BECC lea rdi, [rsp+0B8h+var_B0] mov rsi, rdi mov edx, 3 call rax jmp short loc_9BECC loc_9BEC1: mov rdi, rax call __clang_call_terminate loc_9BEC9: mov r14, rax loc_9BECC: mov rdi, [rsp+0B8h+var_50]; void * cmp rdi, r15 jz short loc_9BEE3 mov rsi, [rsp+0B8h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9BEE3: lea r15, [rsp+0B8h+var_60] mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_9BEFF mov r14, rax loc_9BEFF: mov rdi, rbx; this call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params() mov rdi, r14 call __Unwind_Resume
long long common_chat_params_init_functionary_v3_1_llama_3_1(long long a1, int a2, long long a3) { unsigned __int8 *v4; // r12 _QWORD *v5; // rax int v6; // eax int v7; // r13d int v8; // ebp char v10; // [rsp+7h] [rbp-B1h] BYREF _QWORD *v11; // [rsp+8h] [rbp-B0h] BYREF long long v12; // [rsp+10h] [rbp-A8h] long long ( *v13)(); // [rsp+18h] [rbp-A0h] long long ( *v14)(); // [rsp+20h] [rbp-98h] char v15[8]; // [rsp+28h] [rbp-90h] BYREF long long v16; // [rsp+30h] [rbp-88h] void *v17[2]; // [rsp+38h] [rbp-80h] BYREF _QWORD v18[2]; // [rsp+48h] [rbp-70h] BYREF unsigned __int8 v19[16]; // [rsp+58h] [rbp-60h] BYREF void *v20[2]; // [rsp+68h] [rbp-50h] BYREF _QWORD v21[8]; // [rsp+78h] [rbp-40h] BYREF *(_DWORD *)a1 = 0; *(_QWORD *)(a1 + 8) = a1 + 24; *(_QWORD *)(a1 + 16) = 0LL; *(_BYTE *)(a1 + 24) = 0; *(_QWORD *)(a1 + 40) = a1 + 56; *(_QWORD *)(a1 + 48) = 0LL; *(_BYTE *)(a1 + 56) = 0; *(_BYTE *)(a1 + 72) = 0; *(_OWORD *)(a1 + 80) = 0LL; *(_OWORD *)(a1 + 96) = 0LL; *(_OWORD *)(a1 + 112) = 0LL; *(_OWORD *)(a1 + 128) = 0LL; *(_QWORD *)(a1 + 144) = 0LL; v4 = (unsigned __int8 *)(a3 + 16); if ( *(_BYTE *)(a3 + 16) ) nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( v19, 0LL, 0LL, 0LL, 2LL); else nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( v19, (unsigned __int8 *)(a3 + 16)); v20[0] = v21; v20[1] = 0LL; LOBYTE(v21[0]) = 0; v10 = 0; *(_BYTE *)(a1 + 72) = *(_DWORD *)(a3 + 32) != 1; v12 = 0LL; v5 = (_QWORD *)operator new(0x20uLL); *v5 = a3; v5[1] = &v10; v5[2] = v20; v5[3] = a1; v11 = v5; v14 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,templates_params const&)::$_0>::_M_invoke; v13 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,templates_params const&)::$_0>::_M_manager; v15[0] = 0; build_grammar[abi:cxx11](v17, &v11, v15); std::string::operator=(a1 + 40, v17); if ( v17[0] != v18 ) operator delete(v17[0], v18[0] + 1LL); if ( v13 ) ((void ( *)(_QWORD **, _QWORD **, long long))v13)(&v11, &v11, 3LL); v6 = *v4; if ( !*v4 || (v6 == 2 || v6 == 1) && **(_QWORD **)(a3 + 24) == *(_QWORD *)(*(_QWORD *)(a3 + 24) + 8LL) ) { v7 = a2; LOBYTE(v11) = 0; v12 = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v11); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v11); } else { v7 = a2; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( (unsigned __int8 *)&v11, v4); } v8 = *(unsigned __int8 *)(a3 + 96); v15[0] = 0; v16 = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v15); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v15); apply((unsigned int)v17, v7, a3, (unsigned int)&v11, v8, (unsigned int)v15); std::string::operator=(a1 + 8, v17); if ( v17[0] != v18 ) operator delete(v17[0], v18[0] + 1LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v15); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v15); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v11); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v11); *(_DWORD *)a1 = 9; if ( v20[0] != v21 ) operator delete(v20[0], v21[0] + 1LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v19); return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v19); }
common_chat_params_init_functionary_v3_1_llama_3_1: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV R14,RDX MOV RBP,RSI MOV RBX,RDI MOV dword ptr [RDI],0x0 LEA RAX,[RDI + 0x18] MOV qword ptr [RDI + 0x8],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x10],RAX MOV byte ptr [RDI + 0x18],AL LEA RCX,[RDI + 0x38] MOV qword ptr [RDI + 0x28],RCX MOV qword ptr [RDI + 0x30],RAX MOV byte ptr [RDI + 0x38],AL MOV byte ptr [RDI + 0x48],AL XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x50],XMM0 MOVUPS xmmword ptr [RDI + 0x60],XMM0 MOVUPS xmmword ptr [RDI + 0x70],XMM0 MOVUPS xmmword ptr [RDI + 0x80],XMM0 MOV qword ptr [RDI + 0x90],RAX LEA R12,[RDX + 0x10] CMP byte ptr [RDX + 0x10],AL JZ 0x0019bc55 LAB_0019bc3d: LEA RDI,[RSP + 0x58] XOR ESI,ESI XOR EDX,EDX XOR ECX,ECX MOV R8D,0x2 CALL 0x001b14a0 JMP 0x0019bc62 LAB_0019bc55: LEA RDI,[RSP + 0x58] MOV RSI,R12 CALL 0x001895d8 LAB_0019bc62: LEA R15,[RSP + 0x78] MOV qword ptr [R15 + -0x10],R15 XOR EAX,EAX MOV qword ptr [R15 + -0x8],RAX MOV byte ptr [R15],AL MOV byte ptr [RSP + 0x7],AL CMP dword ptr [R14 + 0x20],0x1 SETNZ byte ptr [RBX + 0x48] MOV qword ptr [RSP + 0x10],RAX LAB_0019bc86: MOV EDI,0x20 CALL 0x00120210 MOV qword ptr [RAX],R14 LEA RCX,[RSP + 0x7] MOV qword ptr [RAX + 0x8],RCX LEA RCX,[RSP + 0x68] MOV qword ptr [RAX + 0x10],RCX MOV qword ptr [RAX + 0x18],RBX LEA RSI,[RSP + 0x8] MOV qword ptr [RSI],RAX LEA RAX,[0x1a7018] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x1a77e8] MOV qword ptr [RSI + 0x10],RAX LEA RDX,[RSP + 0x28] MOV byte ptr [RDX],0x0 LAB_0019bccf: LEA RDI,[RSP + 0x38] CALL 0x001fd0ee LEA RDI,[RBX + 0x28] LEA R13,[RSP + 0x38] MOV RSI,R13 CALL 0x001208c0 MOV RDI,qword ptr [R13] LEA RAX,[RSP + 0x48] CMP RDI,RAX JZ 0x0019bd05 MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x00120180 LAB_0019bd05: MOV RAX,qword ptr [RSP + 0x18] TEST RAX,RAX JZ 0x0019bd1e LAB_0019bd0f: LEA RDI,[RSP + 0x8] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0019bd1e: MOVZX EAX,byte ptr [R12] TEST EAX,EAX JZ 0x0019bd50 CMP EAX,0x2 JZ 0x0019bd31 CMP EAX,0x1 JNZ 0x0019bd3e LAB_0019bd31: MOV RAX,qword ptr [R14 + 0x18] MOV RCX,qword ptr [RAX] CMP RCX,qword ptr [RAX + 0x8] JZ 0x0019bd50 LAB_0019bd3e: MOV R13,RBP LEA RDI,[RSP + 0x8] MOV RSI,R12 CALL 0x001895d8 JMP 0x0019bd80 LAB_0019bd50: MOV R13,RBP LEA R12,[RSP + 0x8] MOV byte ptr [R12],0x0 MOV qword ptr [R12 + 0x8],0x0 MOV RDI,R12 MOV ESI,0x1 CALL 0x0018538a MOV RDI,R12 MOV ESI,0x1 CALL 0x0018538a LAB_0019bd80: MOVZX EBP,byte ptr [R14 + 0x60] LEA R12,[RSP + 0x28] MOV byte ptr [R12],0x0 MOV qword ptr [R12 + 0x8],0x0 MOV RDI,R12 MOV ESI,0x1 CALL 0x0018538a MOV RDI,R12 MOV ESI,0x1 CALL 0x0018538a LAB_0019bdb2: LEA RDI,[RSP + 0x38] LEA RCX,[RSP + 0x8] MOV RSI,R13 MOV RDX,R14 MOV R8D,EBP MOV R9,R12 CALL 0x0019c8c5 LEA RDI,[RBX + 0x8] LEA R14,[RSP + 0x38] MOV RSI,R14 CALL 0x001208c0 MOV RDI,qword ptr [R14] LEA RAX,[RSP + 0x48] CMP RDI,RAX JZ 0x0019bdf8 MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x00120180 LAB_0019bdf8: LEA R14,[RSP + 0x28] MOV RDI,R14 XOR ESI,ESI CALL 0x0018538a MOV RDI,R14 CALL 0x00189aa4 LEA R14,[RSP + 0x8] MOV RDI,R14 XOR ESI,ESI CALL 0x0018538a MOV RDI,R14 CALL 0x00189aa4 MOV dword ptr [RBX],0x9 MOV RDI,qword ptr [RSP + 0x68] CMP RDI,R15 JZ 0x0019be43 MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x00120180 LAB_0019be43: LEA RBX,[RSP + 0x58] MOV RDI,RBX XOR ESI,ESI CALL 0x0018538a MOV RDI,RBX CALL 0x00189aa4 ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&, templates_params const&) */ void common_chat_params_init_functionary_v3_1_llama_3_1 (chat_template *param_1,templates_params *param_2) { basic_json *pbVar1; basic_json bVar2; basic_json *in_RDX; int1 local_b1; int8 *local_b0; int8 local_a8; code *local_a0; code *local_98; data local_90 [8]; int8 local_88; long *local_80 [2]; long local_70 [2]; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_60 [16]; int1 *local_50; int8 local_48; int1 local_40; int7 uStack_3f; *(int4 *)param_1 = 0; *(chat_template **)(param_1 + 8) = param_1 + 0x18; *(int8 *)(param_1 + 0x10) = 0; param_1[0x18] = (chat_template)0x0; *(chat_template **)(param_1 + 0x28) = param_1 + 0x38; *(int8 *)(param_1 + 0x30) = 0; param_1[0x38] = (chat_template)0x0; param_1[0x48] = (chat_template)0x0; *(int8 *)(param_1 + 0x50) = 0; *(int8 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 0x60) = 0; *(int8 *)(param_1 + 0x68) = 0; *(int8 *)(param_1 + 0x70) = 0; *(int8 *)(param_1 + 0x78) = 0; *(int8 *)(param_1 + 0x80) = 0; *(int8 *)(param_1 + 0x88) = 0; *(int8 *)(param_1 + 0x90) = 0; pbVar1 = in_RDX + 0x10; if (in_RDX[0x10] == (basic_json)0x0) { nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_60,pbVar1); } else { /* try { // try from 0019bc3d to 0019bc61 has its CatchHandler @ 0019befc */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_60,0,0,0,2); } local_48 = 0; local_40 = 0; local_b1 = 0; param_1[0x48] = (chat_template)(*(int *)(in_RDX + 0x20) != 1); local_a8 = 0; local_50 = &local_40; /* try { // try from 0019bc86 to 0019bc8f has its CatchHandler @ 0019bec9 */ local_b0 = (int8 *)operator_new(0x20); *local_b0 = in_RDX; local_b0[1] = &local_b1; local_b0[2] = &local_50; local_b0[3] = param_1; local_98 = std:: _Function_handler<void(common_grammar_builder_const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template_const&,templates_params_const&)::$_0> ::_M_invoke; local_a0 = std:: _Function_handler<void(common_grammar_builder_const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template_const&,templates_params_const&)::$_0> ::_M_manager; local_90[0] = (data)0x0; /* try { // try from 0019bccf to 0019bcd8 has its CatchHandler @ 0019bea3 */ build_grammar_abi_cxx11_((function *)local_80,(common_grammar_options *)&local_b0); std::__cxx11::string::operator=((string *)(param_1 + 0x28),(string *)local_80); if (local_80[0] != local_70) { operator_delete(local_80[0],local_70[0] + 1); } if (local_a0 != (code *)0x0) { /* try { // try from 0019bd0f to 0019bd1d has its CatchHandler @ 0019be6e */ (*local_a0)(&local_b0,&local_b0,3); } bVar2 = *pbVar1; if ((bVar2 == (basic_json)0x0) || (((bVar2 == (basic_json)0x2 || (bVar2 == (basic_json)0x1)) && (**(long **)(in_RDX + 0x18) == (*(long **)(in_RDX + 0x18))[1])))) { local_b0 = (int8 *)((ulong)local_b0 & 0xffffffffffffff00); local_a8 = 0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_b0,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_b0,0)); } else { /* try { // try from 0019bd3e to 0019bd4d has its CatchHandler @ 0019be6c */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)&local_b0,pbVar1); } bVar2 = in_RDX[0x60]; local_90[0] = (data)0x0; local_88 = 0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_90,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_90,0)); /* try { // try from 0019bdb2 to 0019bdcc has its CatchHandler @ 0019be70 */ apply((chat_template *)local_80,(basic_json *)param_2,in_RDX,SUB81(&local_b0,0), (basic_json *)(ulong)(byte)bVar2); std::__cxx11::string::operator=((string *)(param_1 + 8),(string *)local_80); if (local_80[0] != local_70) { operator_delete(local_80[0],local_70[0] + 1); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_90,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_90); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81((data *)&local_b0,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)&local_b0); *(int4 *)param_1 = 9; if (local_50 != &local_40) { operator_delete(local_50,CONCAT71(uStack_3f,local_40) + 1); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81((data *)local_60,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_60); return; }
13,246
mysql_reset_connection
eloqsql/libmariadb/libmariadb/mariadb_lib.c
int STDCALL mysql_reset_connection(MYSQL *mysql) { int rc; /* check if connection handler is active */ if (IS_CONNHDLR_ACTIVE(mysql)) { if (mysql->extension->conn_hdlr->plugin && mysql->extension->conn_hdlr->plugin->reset) return(mysql->extension->conn_hdlr->plugin->reset(mysql)); } /* skip result sets */ if (mysql->status == MYSQL_STATUS_USE_RESULT || mysql->status == MYSQL_STATUS_GET_RESULT || mysql->status & SERVER_MORE_RESULTS_EXIST) { mthd_my_skip_result(mysql); mysql->status= MYSQL_STATUS_READY; } rc= ma_simple_command(mysql, COM_RESET_CONNECTION, 0, 0, 0, 0); if (rc && mysql->options.reconnect) { /* There is no big sense in resetting but we need reconnect */ rc= ma_simple_command(mysql, COM_RESET_CONNECTION,0,0,0,0); } if (rc) return 1; /* reset the connection in all active statements */ ma_invalidate_stmts(mysql, "mysql_reset_connection()"); free_old_query(mysql); mysql->status= MYSQL_STATUS_READY; mysql->affected_rows= ~(my_ulonglong)0; mysql->insert_id= 0; return 0; }
O0
c
mysql_reset_connection: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x4f0(%rax) je 0x22942 movq -0x10(%rbp), %rax movq 0x4f0(%rax), %rax cmpq $0x0, (%rax) je 0x22942 movq -0x10(%rbp), %rax movq 0x4f0(%rax), %rax movq (%rax), %rax cmpq $0x0, (%rax) je 0x22940 movq -0x10(%rbp), %rax movq 0x4f0(%rax), %rax movq (%rax), %rax movq (%rax), %rax cmpq $0x0, 0x80(%rax) je 0x22940 movq -0x10(%rbp), %rax movq 0x4f0(%rax), %rax movq (%rax), %rax movq (%rax), %rax movq 0x80(%rax), %rax movq -0x10(%rbp), %rdi callq *%rax movl %eax, -0x4(%rbp) jmp 0x22a34 jmp 0x22942 movq -0x10(%rbp), %rax cmpl $0x2, 0x488(%rax) je 0x2296e movq -0x10(%rbp), %rax cmpl $0x1, 0x488(%rax) je 0x2296e movq -0x10(%rbp), %rax movl 0x488(%rax), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x22985 movq -0x10(%rbp), %rdi callq 0x16f10 movq -0x10(%rbp), %rax movl $0x0, 0x488(%rax) movq -0x10(%rbp), %rdi movl $0x1f, %esi xorl %eax, %eax movl %eax, %r9d xorl %r8d, %r8d movq %r9, %rdx movq %r9, %rcx callq 0x16c90 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x229d9 movq -0x10(%rbp), %rax movsbl 0x43b(%rax), %eax cmpl $0x0, %eax je 0x229d9 movq -0x10(%rbp), %rdi movl $0x1f, %esi xorl %eax, %eax movl %eax, %r9d xorl %r8d, %r8d movq %r9, %rdx movq %r9, %rcx callq 0x16c90 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x229e8 movl $0x1, -0x4(%rbp) jmp 0x22a34 movq -0x10(%rbp), %rdi leaq 0x2936a(%rip), %rsi # 0x4bd5d callq 0x1da40 movq -0x10(%rbp), %rdi callq 0x1dfe0 movq -0x10(%rbp), %rax movl $0x0, 0x488(%rax) movq -0x10(%rbp), %rax movq $-0x1, 0x338(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x340(%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax)
mysql_reset_connection: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rax, [rbp+var_10] cmp qword ptr [rax+4F0h], 0 jz short loc_22942 mov rax, [rbp+var_10] mov rax, [rax+4F0h] cmp qword ptr [rax], 0 jz short loc_22942 mov rax, [rbp+var_10] mov rax, [rax+4F0h] mov rax, [rax] cmp qword ptr [rax], 0 jz short loc_22940 mov rax, [rbp+var_10] mov rax, [rax+4F0h] mov rax, [rax] mov rax, [rax] cmp qword ptr [rax+80h], 0 jz short loc_22940 mov rax, [rbp+var_10] mov rax, [rax+4F0h] mov rax, [rax] mov rax, [rax] mov rax, [rax+80h] mov rdi, [rbp+var_10] call rax mov [rbp+var_4], eax jmp loc_22A34 loc_22940: jmp short $+2 loc_22942: mov rax, [rbp+var_10] cmp dword ptr [rax+488h], 2 jz short loc_2296E mov rax, [rbp+var_10] cmp dword ptr [rax+488h], 1 jz short loc_2296E mov rax, [rbp+var_10] mov eax, [rax+488h] and eax, 8 cmp eax, 0 jz short loc_22985 loc_2296E: mov rdi, [rbp+var_10] call mthd_my_skip_result mov rax, [rbp+var_10] mov dword ptr [rax+488h], 0 loc_22985: mov rdi, [rbp+var_10] mov esi, 1Fh xor eax, eax mov r9d, eax xor r8d, r8d mov rdx, r9 mov rcx, r9 call ma_simple_command mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_229D9 mov rax, [rbp+var_10] movsx eax, byte ptr [rax+43Bh] cmp eax, 0 jz short loc_229D9 mov rdi, [rbp+var_10] mov esi, 1Fh xor eax, eax mov r9d, eax xor r8d, r8d mov rdx, r9 mov rcx, r9 call ma_simple_command mov [rbp+var_14], eax loc_229D9: cmp [rbp+var_14], 0 jz short loc_229E8 mov [rbp+var_4], 1 jmp short loc_22A34 loc_229E8: mov rdi, [rbp+var_10] lea rsi, aMysqlResetConn; "mysql_reset_connection()" call ma_invalidate_stmts mov rdi, [rbp+var_10] call free_old_query mov rax, [rbp+var_10] mov dword ptr [rax+488h], 0 mov rax, [rbp+var_10] mov qword ptr [rax+338h], 0FFFFFFFFFFFFFFFFh mov rax, [rbp+var_10] mov qword ptr [rax+340h], 0 mov [rbp+var_4], 0 loc_22A34: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long mysql_reset_connection(long long a1, long long a2, long long a3, long long a4, int a5, int a6) { int v7; // [rsp+Ch] [rbp-14h] if ( *(_QWORD *)(a1 + 1264) && **(_QWORD **)(a1 + 1264) && ***(_QWORD ***)(a1 + 1264) && *(_QWORD *)(***(_QWORD ***)(a1 + 1264) + 128LL) ) { return (unsigned int)(*(long long ( **)(long long))(***(_QWORD ***)(a1 + 1264) + 128LL))(a1); } else { if ( *(_DWORD *)(a1 + 1160) == 2 || *(_DWORD *)(a1 + 1160) == 1 || (*(_DWORD *)(a1 + 1160) & 8) != 0 ) { mthd_my_skip_result(a1, a2, a3, a4, a5, a6); *(_DWORD *)(a1 + 1160) = 0; } v7 = ma_simple_command(a1, 0x1Fu, 0LL, 0LL, 0, 0LL); if ( v7 && *(_BYTE *)(a1 + 1083) ) v7 = ma_simple_command(a1, 0x1Fu, 0LL, 0LL, 0, 0LL); if ( v7 ) { return 1; } else { ma_invalidate_stmts(a1, (long long)"mysql_reset_connection()"); free_old_query(a1); *(_DWORD *)(a1 + 1160) = 0; *(_QWORD *)(a1 + 824) = -1LL; *(_QWORD *)(a1 + 832) = 0LL; return 0; } } }
mysql_reset_connection: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x4f0],0x0 JZ 0x00122942 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4f0] CMP qword ptr [RAX],0x0 JZ 0x00122942 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4f0] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX],0x0 JZ 0x00122940 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4f0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x80],0x0 JZ 0x00122940 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4f0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x80] MOV RDI,qword ptr [RBP + -0x10] CALL RAX MOV dword ptr [RBP + -0x4],EAX JMP 0x00122a34 LAB_00122940: JMP 0x00122942 LAB_00122942: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x488],0x2 JZ 0x0012296e MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x488],0x1 JZ 0x0012296e MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x488] AND EAX,0x8 CMP EAX,0x0 JZ 0x00122985 LAB_0012296e: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00116f10 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x488],0x0 LAB_00122985: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x1f XOR EAX,EAX MOV R9D,EAX XOR R8D,R8D MOV RDX,R9 MOV RCX,R9 CALL 0x00116c90 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x001229d9 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x43b] CMP EAX,0x0 JZ 0x001229d9 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x1f XOR EAX,EAX MOV R9D,EAX XOR R8D,R8D MOV RDX,R9 MOV RCX,R9 CALL 0x00116c90 MOV dword ptr [RBP + -0x14],EAX LAB_001229d9: CMP dword ptr [RBP + -0x14],0x0 JZ 0x001229e8 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00122a34 LAB_001229e8: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x14bd5d] CALL 0x0011da40 MOV RDI,qword ptr [RBP + -0x10] CALL 0x0011dfe0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x488],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x338],-0x1 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x340],0x0 MOV dword ptr [RBP + -0x4],0x0 LAB_00122a34: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 mysql_reset_connection(long param_1) { int local_1c; int4 local_c; if ((((*(long *)(param_1 + 0x4f0) == 0) || (**(long **)(param_1 + 0x4f0) == 0)) || (*(long *)**(int8 **)(param_1 + 0x4f0) == 0)) || (*(long *)(*(long *)**(int8 **)(param_1 + 0x4f0) + 0x80) == 0)) { if (((*(int *)(param_1 + 0x488) == 2) || (*(int *)(param_1 + 0x488) == 1)) || ((*(uint *)(param_1 + 0x488) & 8) != 0)) { mthd_my_skip_result(param_1); *(int4 *)(param_1 + 0x488) = 0; } local_1c = ma_simple_command(param_1,0x1f,0,0,0); if ((local_1c != 0) && (*(char *)(param_1 + 0x43b) != '\0')) { local_1c = ma_simple_command(param_1,0x1f,0,0,0); } if (local_1c == 0) { ma_invalidate_stmts(param_1,"mysql_reset_connection()"); free_old_query(param_1); *(int4 *)(param_1 + 0x488) = 0; *(int8 *)(param_1 + 0x338) = 0xffffffffffffffff; *(int8 *)(param_1 + 0x340) = 0; local_c = 0; } else { local_c = 1; } } else { local_c = (**(code **)(*(long *)**(int8 **)(param_1 + 0x4f0) + 0x80))(param_1); } return local_c; }
13,247
build_prefix(st_mysql_const_lex_string const*, char const*, char*, unsigned long*)
eloqsql/storage/perfschema/pfs.cc
static int build_prefix(const LEX_CSTRING *prefix, const char *category, char *output, size_t *output_length) { size_t len= strlen(category); char *out_ptr= output; size_t prefix_length= prefix->length; if (unlikely((prefix_length + len + 1) >= PFS_MAX_FULL_PREFIX_NAME_LENGTH)) { pfs_print_error("build_prefix: prefix+category is too long <%s> <%s>\n", prefix->str, category); return 1; } if (unlikely(strchr(category, '/') != NULL)) { pfs_print_error("build_prefix: invalid category <%s>\n", category); return 1; } /* output = prefix + category + '/' */ memcpy(out_ptr, prefix->str, prefix_length); out_ptr+= prefix_length; if (len > 0) { memcpy(out_ptr, category, len); out_ptr+= len; *out_ptr= '/'; out_ptr++; } *output_length= int(out_ptr - output); return 0; }
O3
cpp
build_prefix(st_mysql_const_lex_string const*, char const*, char*, unsigned long*): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, -0x30(%rbp) movq %rcx, %r14 movq %rdx, %r12 movq %rsi, %r15 movq %rdi, %rbx movq %rdx, %rdi callq 0x26150 movq %rax, %r13 addq %r15, %rax addq $-0x1f, %rax cmpq $-0x21, %rax jbe 0x3b438 movq %r12, %rdi movl $0x2f, %esi callq 0x26120 testq %rax, %rax jne 0x3b44e movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx callq 0x26290 addq %r14, %r15 testq %r13, %r13 je 0x3b41a movq %r15, %rdi movq %r12, %rsi movq %r13, %rdx callq 0x26290 movb $0x2f, (%r15,%r13) addq %r13, %r15 incq %r15 subl %r14d, %r15d movslq %r15d, %rax movq -0x30(%rbp), %rcx movq %rax, (%rcx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x40df6(%rip), %rdi # 0x7c235 movq %rbx, %rsi movq %r12, %rdx xorl %eax, %eax callq 0x2cdc5 jmp 0x3b45f leaq 0x40e15(%rip), %rdi # 0x7c26a movq %r12, %rsi xorl %eax, %eax callq 0x2cdc5 movl $0x1, %eax jmp 0x3b429
_ZL12build_prefixPK25st_mysql_const_lex_stringPKcPcPm: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov [rbp+var_30], r8 mov r14, rcx mov r12, rdx mov r15, rsi mov rbx, rdi mov rdi, rdx call _strlen mov r13, rax add rax, r15 add rax, 0FFFFFFFFFFFFFFE1h cmp rax, 0FFFFFFFFFFFFFFDFh jbe short loc_3B438 mov rdi, r12 mov esi, 2Fh ; '/' call _strchr test rax, rax jnz short loc_3B44E mov rdi, r14 mov rsi, rbx mov rdx, r15 call _memcpy add r15, r14 test r13, r13 jz short loc_3B41A mov rdi, r15 mov rsi, r12 mov rdx, r13 call _memcpy mov byte ptr [r15+r13], 2Fh ; '/' add r15, r13 inc r15 loc_3B41A: sub r15d, r14d movsxd rax, r15d mov rcx, [rbp+var_30] mov [rcx], rax xor eax, eax loc_3B429: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3B438: lea rdi, aBuildPrefixPre; "build_prefix: prefix+category is too lo"... mov rsi, rbx mov rdx, r12 xor eax, eax call _Z15pfs_print_errorPKcz; pfs_print_error(char const*,...) jmp short loc_3B45F loc_3B44E: lea rdi, aBuildPrefixInv; "build_prefix: invalid category <%s>\n" mov rsi, r12 xor eax, eax call _Z15pfs_print_errorPKcz; pfs_print_error(char const*,...) loc_3B45F: mov eax, 1 jmp short loc_3B429
long long build_prefix(long long a1, long long a2, long long a3, long long a4, _QWORD *a5) { long long v7; // r13 long long v8; // r15 v7 = strlen(a3); if ( (unsigned long long)(a2 + v7 - 31) <= 0xFFFFFFFFFFFFFFDFLL ) { pfs_print_error("build_prefix: prefix+category is too long <%s> <%s>\n"); return 1LL; } if ( strchr(a3, 47LL) ) { pfs_print_error("build_prefix: invalid category <%s>\n"); return 1LL; } memcpy(a4, a1, a2); v8 = a4 + a2; if ( v7 ) { memcpy(v8, a3, v7); *(_BYTE *)(v8 + v7) = 47; LODWORD(v8) = v7 + v8 + 1; } *a5 = (int)v8 - (int)a4; return 0LL; }
build_prefix: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV qword ptr [RBP + -0x30],R8 MOV R14,RCX MOV R12,RDX MOV R15,RSI MOV RBX,RDI MOV RDI,RDX CALL 0x00126150 MOV R13,RAX ADD RAX,R15 ADD RAX,-0x1f CMP RAX,-0x21 JBE 0x0013b438 MOV RDI,R12 MOV ESI,0x2f CALL 0x00126120 TEST RAX,RAX JNZ 0x0013b44e MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 CALL 0x00126290 ADD R15,R14 TEST R13,R13 JZ 0x0013b41a MOV RDI,R15 MOV RSI,R12 MOV RDX,R13 CALL 0x00126290 MOV byte ptr [R15 + R13*0x1],0x2f ADD R15,R13 INC R15 LAB_0013b41a: SUB R15D,R14D MOVSXD RAX,R15D MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RCX],RAX XOR EAX,EAX LAB_0013b429: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013b438: LEA RDI,[0x17c235] MOV RSI,RBX MOV RDX,R12 XOR EAX,EAX CALL 0x0012cdc5 JMP 0x0013b45f LAB_0013b44e: LEA RDI,[0x17c26a] MOV RSI,R12 XOR EAX,EAX CALL 0x0012cdc5 LAB_0013b45f: MOV EAX,0x1 JMP 0x0013b429
/* build_prefix(st_mysql_const_lex_string const*, char const*, char*, unsigned long*) */ int8 build_prefix(st_mysql_const_lex_string *param_1,char *param_2,char *param_3,ulong *param_4) { size_t __n; char *pcVar1; long *in_R8; __n = strlen(param_3); if (param_2 + (__n - 0x1f) < (char *)0xffffffffffffffe0) { pfs_print_error("build_prefix: prefix+category is too long <%s> <%s>\n",param_1,param_3); } else { pcVar1 = strchr(param_3,0x2f); if (pcVar1 == (char *)0x0) { memcpy(param_4,param_1,(size_t)param_2); pcVar1 = param_2 + (long)param_4; if (__n != 0) { memcpy(pcVar1,param_3,__n); pcVar1[__n] = '/'; pcVar1 = pcVar1 + __n + 1; } *in_R8 = (long)((int)pcVar1 - (int)param_4); return 0; } pfs_print_error("build_prefix: invalid category <%s>\n",param_3); } return 1; }
13,248
my_utf8mb3_uni_no_range
eloqsql/strings/ctype-utf8.c
static int my_utf8mb3_uni_no_range(CHARSET_INFO *cs __attribute__((unused)), my_wc_t * pwc, const uchar *s) { uchar c; c= s[0]; if (c < 0x80) { *pwc = c; return 1; } if (c < 0xc2) return MY_CS_ILSEQ; if (c < 0xe0) { if (!((s[1] ^ 0x80) < 0x40)) return MY_CS_ILSEQ; *pwc= UTF8MB2_CODE(c, s[1]); return 2; } if (c < 0xf0) { if (!IS_UTF8MB3_STEP2(c, s[1], s[2])) return MY_CS_ILSEQ; *pwc= UTF8MB3_CODE(c, s[1], s[2]); return 3; } return MY_CS_ILSEQ; }
O0
c
my_utf8mb3_uni_no_range: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x20(%rbp), %rax movb (%rax), %al movb %al, -0x21(%rbp) movzbl -0x21(%rbp), %eax cmpl $0x80, %eax jge 0x9ccfd movzbl -0x21(%rbp), %eax movl %eax, %ecx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x9ce13 movzbl -0x21(%rbp), %eax cmpl $0xc2, %eax jge 0x9cd14 movl $0x0, -0x4(%rbp) jmp 0x9ce13 movzbl -0x21(%rbp), %eax cmpl $0xe0, %eax jge 0x9cd70 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jl 0x9cd3d movl $0x0, -0x4(%rbp) jmp 0x9ce13 movzbl -0x21(%rbp), %eax andl $0x1f, %eax movslq %eax, %rcx shlq $0x6, %rcx movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cltq orq %rax, %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x2, -0x4(%rbp) jmp 0x9ce13 movzbl -0x21(%rbp), %eax cmpl $0xf0, %eax jge 0x9ce0c movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x9cdbd movq -0x20(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x9cdbd movzbl -0x21(%rbp), %eax cmpl $0xe1, %eax jge 0x9cdc6 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xa0, %eax jge 0x9cdc6 movl $0x0, -0x4(%rbp) jmp 0x9ce13 movzbl -0x21(%rbp), %eax andl $0xf, %eax movslq %eax, %rcx shlq $0xc, %rcx movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cltq shlq $0x6, %rax orq %rax, %rcx movq -0x20(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cltq orq %rax, %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x3, -0x4(%rbp) jmp 0x9ce13 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
my_utf8mb3_uni_no_range: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_20] mov al, [rax] mov [rbp+var_21], al movzx eax, [rbp+var_21] cmp eax, 80h jge short loc_9CCFD movzx eax, [rbp+var_21] mov ecx, eax mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_9CE13 loc_9CCFD: movzx eax, [rbp+var_21] cmp eax, 0C2h jge short loc_9CD14 mov [rbp+var_4], 0 jmp loc_9CE13 loc_9CD14: movzx eax, [rbp+var_21] cmp eax, 0E0h jge short loc_9CD70 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jl short loc_9CD3D mov [rbp+var_4], 0 jmp loc_9CE13 loc_9CD3D: movzx eax, [rbp+var_21] and eax, 1Fh movsxd rcx, eax shl rcx, 6 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] xor eax, 80h cdqe or rcx, rax mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 2 jmp loc_9CE13 loc_9CD70: movzx eax, [rbp+var_21] cmp eax, 0F0h jge loc_9CE0C mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jge short loc_9CDBD mov rax, [rbp+var_20] movzx eax, byte ptr [rax+2] xor eax, 80h cmp eax, 40h ; '@' jge short loc_9CDBD movzx eax, [rbp+var_21] cmp eax, 0E1h jge short loc_9CDC6 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0A0h jge short loc_9CDC6 loc_9CDBD: mov [rbp+var_4], 0 jmp short loc_9CE13 loc_9CDC6: movzx eax, [rbp+var_21] and eax, 0Fh movsxd rcx, eax shl rcx, 0Ch mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] xor eax, 80h cdqe shl rax, 6 or rcx, rax mov rax, [rbp+var_20] movzx eax, byte ptr [rax+2] xor eax, 80h cdqe or rcx, rax mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 3 jmp short loc_9CE13 loc_9CE0C: mov [rbp+var_4], 0 loc_9CE13: mov eax, [rbp+var_4] pop rbp retn
long long my_utf8mb3_uni_no_range(long long a1, unsigned long long *a2, unsigned __int8 *a3) { unsigned __int8 v4; // [rsp+1h] [rbp-21h] v4 = *a3; if ( *a3 >= 0x80u ) { if ( v4 >= 0xC2u ) { if ( v4 >= 0xE0u ) { if ( v4 >= 0xF0u ) { return 0; } else if ( (a3[1] ^ 0x80) < 64 && (a3[2] ^ 0x80) < 64 && (v4 >= 0xE1u || a3[1] >= 0xA0u) ) { *a2 = a3[2] ^ 0x80u | ((long long)(a3[1] ^ 0x80u) << 6) | ((unsigned long long)(v4 & 0xF) << 12); return 3; } else { return 0; } } else if ( (a3[1] ^ 0x80) < 64 ) { *a2 = a3[1] ^ 0x80u | ((unsigned long long)(v4 & 0x1F) << 6); return 2; } else { return 0; } } else { return 0; } } else { *a2 = v4; return 1; } }
my_utf8mb3_uni_no_range: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x20] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x21],AL MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0x80 JGE 0x0019ccfd MOVZX EAX,byte ptr [RBP + -0x21] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x0019ce13 LAB_0019ccfd: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xc2 JGE 0x0019cd14 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0019ce13 LAB_0019cd14: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xe0 JGE 0x0019cd70 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JL 0x0019cd3d MOV dword ptr [RBP + -0x4],0x0 JMP 0x0019ce13 LAB_0019cd3d: MOVZX EAX,byte ptr [RBP + -0x21] AND EAX,0x1f MOVSXD RCX,EAX SHL RCX,0x6 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CDQE OR RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x2 JMP 0x0019ce13 LAB_0019cd70: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf0 JGE 0x0019ce0c MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JGE 0x0019cdbd MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CMP EAX,0x40 JGE 0x0019cdbd MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xe1 JGE 0x0019cdc6 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xa0 JGE 0x0019cdc6 LAB_0019cdbd: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0019ce13 LAB_0019cdc6: MOVZX EAX,byte ptr [RBP + -0x21] AND EAX,0xf MOVSXD RCX,EAX SHL RCX,0xc MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CDQE SHL RAX,0x6 OR RCX,RAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CDQE OR RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x3 JMP 0x0019ce13 LAB_0019ce0c: MOV dword ptr [RBP + -0x4],0x0 LAB_0019ce13: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_utf8mb3_uni_no_range(int8 param_1,ulong *param_2,byte *param_3) { byte bVar1; int4 local_c; bVar1 = *param_3; if (bVar1 < 0x80) { *param_2 = (ulong)bVar1; local_c = 1; } else if (bVar1 < 0xc2) { local_c = 0; } else if (bVar1 < 0xe0) { if ((param_3[1] ^ 0x80) < 0x40) { *param_2 = (long)(int)(bVar1 & 0x1f) << 6 | (long)(int)(param_3[1] ^ 0x80); local_c = 2; } else { local_c = 0; } } else if (bVar1 < 0xf0) { if ((((param_3[1] ^ 0x80) < 0x40) && ((param_3[2] ^ 0x80) < 0x40)) && ((0xe0 < bVar1 || (0x9f < param_3[1])))) { *param_2 = (long)(int)(bVar1 & 0xf) << 0xc | (long)(int)(param_3[1] ^ 0x80) << 6 | (long)(int)(param_3[2] ^ 0x80); local_c = 3; } else { local_c = 0; } } else { local_c = 0; } return local_c; }
13,249
mysql_stmt_more_results
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
my_bool STDCALL mysql_stmt_more_results(MYSQL_STMT *stmt) { /* MDEV 4604: Server doesn't set MORE_RESULT flag for OutParam result set, so we need to check for SERVER_MORE_RESULTS_EXIST and for SERVER_PS_OUT_PARAMS) */ return (stmt && stmt->mysql && ((stmt->mysql->server_status & SERVER_MORE_RESULTS_EXIST) || (stmt->mysql->server_status & SERVER_PS_OUT_PARAMS))); }
O0
c
mysql_stmt_more_results: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) xorl %eax, %eax cmpq $0x0, -0x8(%rbp) movb %al, -0x9(%rbp) je 0xb48c1 movq -0x8(%rbp), %rcx xorl %eax, %eax cmpq $0x0, 0x38(%rcx) movb %al, -0x9(%rbp) je 0xb48c1 movq -0x8(%rbp), %rax movq 0x38(%rax), %rax movl 0x380(%rax), %ecx andl $0x8, %ecx movb $0x1, %al cmpl $0x0, %ecx movb %al, -0xa(%rbp) jne 0xb48bb movq -0x8(%rbp), %rax movq 0x38(%rax), %rax movl 0x380(%rax), %eax andl $0x1000, %eax # imm = 0x1000 cmpl $0x0, %eax setne %al movb %al, -0xa(%rbp) movb -0xa(%rbp), %al movb %al, -0x9(%rbp) movb -0x9(%rbp), %al andb $0x1, %al movzbl %al, %eax popq %rbp retq nopl (%rax,%rax)
mysql_stmt_more_results: push rbp mov rbp, rsp mov [rbp+var_8], rdi xor eax, eax cmp [rbp+var_8], 0 mov [rbp+var_9], al jz short loc_B48C1 mov rcx, [rbp+var_8] xor eax, eax cmp qword ptr [rcx+38h], 0 mov [rbp+var_9], al jz short loc_B48C1 mov rax, [rbp+var_8] mov rax, [rax+38h] mov ecx, [rax+380h] and ecx, 8 mov al, 1 cmp ecx, 0 mov [rbp+var_A], al jnz short loc_B48BB mov rax, [rbp+var_8] mov rax, [rax+38h] mov eax, [rax+380h] and eax, 1000h cmp eax, 0 setnz al mov [rbp+var_A], al loc_B48BB: mov al, [rbp+var_A] mov [rbp+var_9], al loc_B48C1: mov al, [rbp+var_9] and al, 1 movzx eax, al pop rbp retn
_BOOL8 mysql_stmt_more_results(long long a1) { bool v2; // [rsp+0h] [rbp-Ah] bool v3; // [rsp+1h] [rbp-9h] v3 = 0; if ( a1 ) { v3 = 0; if ( *(_QWORD *)(a1 + 56) ) { v2 = 1; if ( (*(_DWORD *)(*(_QWORD *)(a1 + 56) + 896LL) & 8) == 0 ) return (*(_DWORD *)(*(_QWORD *)(a1 + 56) + 896LL) & 0x1000) != 0; return v2; } } return v3; }
mysql_stmt_more_results: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI XOR EAX,EAX CMP qword ptr [RBP + -0x8],0x0 MOV byte ptr [RBP + -0x9],AL JZ 0x001b48c1 MOV RCX,qword ptr [RBP + -0x8] XOR EAX,EAX CMP qword ptr [RCX + 0x38],0x0 MOV byte ptr [RBP + -0x9],AL JZ 0x001b48c1 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x38] MOV ECX,dword ptr [RAX + 0x380] AND ECX,0x8 MOV AL,0x1 CMP ECX,0x0 MOV byte ptr [RBP + -0xa],AL JNZ 0x001b48bb MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x38] MOV EAX,dword ptr [RAX + 0x380] AND EAX,0x1000 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0xa],AL LAB_001b48bb: MOV AL,byte ptr [RBP + -0xa] MOV byte ptr [RBP + -0x9],AL LAB_001b48c1: MOV AL,byte ptr [RBP + -0x9] AND AL,0x1 MOVZX EAX,AL POP RBP RET
bool mysql_stmt_more_results(long param_1) { int1 local_12; int1 local_11; local_11 = false; if ((param_1 != 0) && (local_11 = false, *(long *)(param_1 + 0x38) != 0)) { local_12 = true; if ((*(uint *)(*(long *)(param_1 + 0x38) + 0x380) & 8) == 0) { local_12 = (*(uint *)(*(long *)(param_1 + 0x38) + 0x380) & 0x1000) != 0; } local_11 = local_12; } return local_11; }
13,250
google::protobuf::FileDescriptorSet::FileDescriptorSet(google::protobuf::FileDescriptorSet const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
FileDescriptorSet::FileDescriptorSet(const FileDescriptorSet& from) : ::PROTOBUF_NAMESPACE_ID::Message() { FileDescriptorSet* const _this = this; (void)_this; new (&_impl_) Impl_{ decltype(_impl_.file_){from._impl_.file_} , /*decltype(_impl_._cached_size_)*/{}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:google.protobuf.FileDescriptorSet) }
O0
cpp
google::protobuf::FileDescriptorSet::FileDescriptorSet(google::protobuf::FileDescriptorSet const&): subq $0xb8, %rsp movq %rdi, 0x68(%rsp) movq %rsi, 0x60(%rsp) movq 0x68(%rsp), %rdi movq %rdi, 0x38(%rsp) callq 0xd3f60 movq 0x38(%rsp), %rdi leaq 0x1cf764(%rip), %rax # 0x277d20 movq %rax, (%rdi) movq %rdi, 0x58(%rsp) addq $0x10, %rdi movq %rdi, 0x40(%rsp) movq 0x60(%rsp), %rsi addq $0x10, %rsi callq 0xd3f90 jmp 0xa85dd movq 0x40(%rsp), %rdi addq $0x18, %rdi movq %rdi, 0x20(%rsp) xorl %esi, %esi movl $0x4, %edx callq 0x13200 movq 0x20(%rsp), %rdi callq 0xd3ff0 movq 0x38(%rsp), %rcx addq $0x8, %rcx movq 0x60(%rsp), %rax addq $0x8, %rax movq %rcx, 0x78(%rsp) movq %rax, 0x70(%rsp) movq 0x78(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x80(%rsp), %rax movq %rax, 0xb0(%rsp) movq 0xb0(%rsp), %rax movq (%rax), %rax andq $0x1, %rax cmpq $0x0, %rax setne %al movb %al, 0x37(%rsp) movb 0x37(%rsp), %al testb $0x1, %al jne 0xa866b jmp 0xa8714 movq 0x70(%rsp), %rax movq %rax, 0x90(%rsp) movq $0x0, 0x88(%rsp) movq 0x90(%rsp), %rax movq %rax, 0x18(%rsp) movq %rax, 0xa0(%rsp) movq 0xa0(%rsp), %rax movq %rax, 0xa8(%rsp) movq 0xa8(%rsp), %rax movq (%rax), %rax andq $0x1, %rax cmpq $0x0, %rax je 0xa86d6 movq 0x18(%rsp), %rdi callq 0x9cd40 addq $0x8, %rax movq %rax, 0x98(%rsp) jmp 0xa86f4 movq 0x88(%rsp), %rax callq *%rax movq %rax, 0x10(%rsp) jmp 0xa86e7 movq 0x10(%rsp), %rax movq %rax, 0x98(%rsp) movq 0x98(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rsi movq 0x28(%rsp), %rdi callq 0xe0920 jmp 0xa8712 jmp 0xa8714 jmp 0xa8716 addq $0xb8, %rsp retq movq 0x38(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) callq 0xd3f50 movq 0x50(%rsp), %rdi callq 0x13750
_ZN6google8protobuf17FileDescriptorSetC2ERKS1_: sub rsp, 0B8h; Alternative name is 'google::protobuf::FileDescriptorSet::FileDescriptorSet(google::protobuf::FileDescriptorSet const&)' mov [rsp+0B8h+var_50], rdi mov [rsp+0B8h+var_58], rsi mov rdi, [rsp+0B8h+var_50]; this mov [rsp+0B8h+var_80], rdi call _ZN6google8protobuf7MessageC2Ev; google::protobuf::Message::Message(void) mov rdi, [rsp+0B8h+var_80] lea rax, off_277D20 mov [rdi], rax mov [rsp+0B8h+var_60], rdi add rdi, 10h mov [rsp+0B8h+var_78], rdi mov rsi, [rsp+0B8h+var_58] add rsi, 10h call _ZN6google8protobuf16RepeatedPtrFieldINS0_19FileDescriptorProtoEEC2ERKS3_; google::protobuf::RepeatedPtrField<google::protobuf::FileDescriptorProto>::RepeatedPtrField(google::protobuf::RepeatedPtrField<google::protobuf::FileDescriptorProto> const&) jmp short $+2 loc_A85DD: mov rdi, [rsp+0B8h+var_78] add rdi, 18h mov [rsp+0B8h+var_98], rdi xor esi, esi mov edx, 4 call _memset mov rdi, [rsp+0B8h+var_98]; this call _ZN6google8protobuf8internal10CachedSizeC2Ev; google::protobuf::internal::CachedSize::CachedSize(void) mov rcx, [rsp+0B8h+var_80] add rcx, 8 mov rax, [rsp+0B8h+var_58] add rax, 8 mov [rsp+0B8h+var_40], rcx mov [rsp+0B8h+var_48], rax mov rax, [rsp+0B8h+var_40] mov [rsp+0B8h+var_90], rax mov rax, [rsp+0B8h+var_48] mov [rsp+0B8h+var_38], rax mov rax, [rsp+0B8h+var_38] mov [rsp+0B8h+var_8], rax mov rax, [rsp+0B8h+var_8] mov rax, [rax] and rax, 1 cmp rax, 0 setnz al mov [rsp+0B8h+var_81], al mov al, [rsp+0B8h+var_81] test al, 1 jnz short loc_A866B jmp loc_A8714 loc_A866B: mov rax, [rsp+0B8h+var_48] mov [rsp+0B8h+var_28], rax mov [rsp+0B8h+var_30], 0 mov rax, [rsp+0B8h+var_28] mov [rsp+0B8h+var_A0], rax mov [rsp+0B8h+var_18], rax mov rax, [rsp+0B8h+var_18] mov [rsp+0B8h+var_10], rax mov rax, [rsp+0B8h+var_10] mov rax, [rax] and rax, 1 cmp rax, 0 jz short loc_A86D6 mov rdi, [rsp+0B8h+var_A0] call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS2_9ContainerINS0_15UnknownFieldSetEEEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(void) add rax, 8 mov [rsp+0B8h+var_20], rax jmp short loc_A86F4 loc_A86D6: mov rax, [rsp+0B8h+var_30] call rax mov [rsp+0B8h+var_A8], rax jmp short $+2 loc_A86E7: mov rax, [rsp+0B8h+var_A8] mov [rsp+0B8h+var_20], rax loc_A86F4: mov rax, [rsp+0B8h+var_20] mov qword ptr [rsp+0B8h+var_B0], rax mov rsi, qword ptr [rsp+0B8h+var_B0]; int mov rdi, [rsp+0B8h+var_90]; void * call _ZN6google8protobuf8internal16InternalMetadata11DoMergeFromINS0_15UnknownFieldSetEEEvRKT_; google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>(google::protobuf::UnknownFieldSet const&) jmp short $+2 loc_A8712: jmp short $+2 loc_A8714: jmp short $+2 loc_A8716: add rsp, 0B8h retn mov rdi, [rsp+arg_30]; this mov rcx, rax mov eax, edx mov [rsp+arg_48], rcx mov [rsp+arg_44], eax call _ZN6google8protobuf7MessageD2Ev; google::protobuf::Message::~Message() mov rdi, [rsp+arg_48] call __Unwind_Resume
char google::protobuf::FileDescriptorSet::FileDescriptorSet( google::protobuf::FileDescriptorSet *this, const google::protobuf::FileDescriptorSet *a2) { int v2; // edx int v3; // ecx int v4; // r8d int v5; // r9d char result; // al unsigned long long v7; // [rsp+98h] [rbp-20h] google::protobuf::Message::Message(this); *(_QWORD *)this = off_277D20; google::protobuf::RepeatedPtrField<google::protobuf::FileDescriptorProto>::RepeatedPtrField( (_DWORD)this + 16, (_DWORD)a2 + 16, v2, v3, v4, v5); memset((char *)this + 40, 0LL, 4LL); google::protobuf::internal::CachedSize::CachedSize((google::protobuf::FileDescriptorSet *)((char *)this + 40)); result = (*((_QWORD *)a2 + 1) & 1LL) != 0; if ( (*((_QWORD *)a2 + 1) & 1LL) != 0 ) { v7 = google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>((_QWORD *)a2 + 1) + 8; return google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>( (char *)this + 8, v7); } return result; }
FileDescriptorSet: SUB RSP,0xb8 MOV qword ptr [RSP + 0x68],RDI MOV qword ptr [RSP + 0x60],RSI MOV RDI,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x38],RDI CALL 0x001d3f60 MOV RDI,qword ptr [RSP + 0x38] LEA RAX,[0x377d20] MOV qword ptr [RDI],RAX MOV qword ptr [RSP + 0x58],RDI ADD RDI,0x10 MOV qword ptr [RSP + 0x40],RDI MOV RSI,qword ptr [RSP + 0x60] ADD RSI,0x10 LAB_001a85d6: CALL 0x001d3f90 LAB_001a85db: JMP 0x001a85dd LAB_001a85dd: MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0x18 MOV qword ptr [RSP + 0x20],RDI XOR ESI,ESI MOV EDX,0x4 CALL 0x00113200 MOV RDI,qword ptr [RSP + 0x20] CALL 0x001d3ff0 MOV RCX,qword ptr [RSP + 0x38] ADD RCX,0x8 MOV RAX,qword ptr [RSP + 0x60] ADD RAX,0x8 MOV qword ptr [RSP + 0x78],RCX MOV qword ptr [RSP + 0x70],RAX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0xb0],RAX MOV RAX,qword ptr [RSP + 0xb0] MOV RAX,qword ptr [RAX] AND RAX,0x1 CMP RAX,0x0 SETNZ AL MOV byte ptr [RSP + 0x37],AL MOV AL,byte ptr [RSP + 0x37] TEST AL,0x1 JNZ 0x001a866b JMP 0x001a8714 LAB_001a866b: MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x90],RAX MOV qword ptr [RSP + 0x88],0x0 MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0xa0],RAX MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0xa8],RAX MOV RAX,qword ptr [RSP + 0xa8] MOV RAX,qword ptr [RAX] AND RAX,0x1 CMP RAX,0x0 JZ 0x001a86d6 MOV RDI,qword ptr [RSP + 0x18] CALL 0x0019cd40 ADD RAX,0x8 MOV qword ptr [RSP + 0x98],RAX JMP 0x001a86f4 LAB_001a86d6: MOV RAX,qword ptr [RSP + 0x88] LAB_001a86de: CALL RAX MOV qword ptr [RSP + 0x10],RAX JMP 0x001a86e7 LAB_001a86e7: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x98],RAX LAB_001a86f4: MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x8],RAX MOV RSI,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP + 0x28] CALL 0x001e0920 LAB_001a8710: JMP 0x001a8712 LAB_001a8712: JMP 0x001a8714 LAB_001a8714: JMP 0x001a8716 LAB_001a8716: ADD RSP,0xb8 RET
/* google::protobuf::FileDescriptorSet::FileDescriptorSet(google::protobuf::FileDescriptorSet const&) */ void __thiscall google::protobuf::FileDescriptorSet::FileDescriptorSet (FileDescriptorSet *this,FileDescriptorSet *param_1) { InternalMetadata *this_00; UnknownFieldSet *local_20; Message::Message((Message *)this); *(int ***)this = &PTR__FileDescriptorSet_00377d20; /* try { // try from 001a85d6 to 001a85da has its CatchHandler @ 001a871e */ RepeatedPtrField<google::protobuf::FileDescriptorProto>::RepeatedPtrField ((RepeatedPtrField<google::protobuf::FileDescriptorProto> *)(this + 0x10), (RepeatedPtrField *)(param_1 + 0x10)); memset((CachedSize *)(this + 0x28),0,4); internal::CachedSize::CachedSize((CachedSize *)(this + 0x28)); this_00 = (InternalMetadata *)(param_1 + 8); if ((*(ulong *)this_00 & 1) != 0) { if ((*(ulong *)this_00 & 1) == 0) { /* try { // try from 001a86de to 001a870f has its CatchHandler @ 001a871e */ local_20 = (UnknownFieldSet *)(*(code *)0x0)(); } else { local_20 = (UnknownFieldSet *) internal::InternalMetadata:: PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>> (this_00); local_20 = (UnknownFieldSet *)((Container *)local_20 + 8); } internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet> ((InternalMetadata *)(this + 8),local_20); } return; }
13,251
google::protobuf::FileDescriptorSet::FileDescriptorSet(google::protobuf::FileDescriptorSet const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
FileDescriptorSet::FileDescriptorSet(const FileDescriptorSet& from) : ::PROTOBUF_NAMESPACE_ID::Message() { FileDescriptorSet* const _this = this; (void)_this; new (&_impl_) Impl_{ decltype(_impl_.file_){from._impl_.file_} , /*decltype(_impl_._cached_size_)*/{}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:google.protobuf.FileDescriptorSet) }
O3
cpp
google::protobuf::FileDescriptorSet::FileDescriptorSet(google::protobuf::FileDescriptorSet const&): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r15 movq %rdi, %r14 leaq 0x8(%rdi), %rbx xorl %eax, %eax movq %rax, 0x8(%rdi) leaq 0xb6ae2(%rip), %rcx # 0xfe4c0 movq %rcx, (%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rdi) movq %rax, 0x20(%rdi) cmpl $0x0, 0x18(%rsi) je 0x47a08 leaq 0x10(%r14), %rdi leaq 0x10(%r15), %rsi leaq 0x11df7(%rip), %rdx # 0x597f8 xorl %ecx, %ecx callq 0x4769a movl $0x0, 0x28(%r14) movq 0x8(%r15), %rsi testb $0x1, %sil je 0x47a2a andq $-0x4, %rsi addq $0x8, %rsi movq %rbx, %rdi callq 0x59718 popq %rbx popq %r14 popq %r15 retq movq %rax, %r15 leaq 0xb98e6(%rip), %rax # 0x101320 addq $0x10, %rax movq %rax, (%r14) movq %rbx, %rdi callq 0x59494 movq %r15, %rdi callq 0xf570 nop
_ZN6google8protobuf17FileDescriptorSetC2ERKS1_: push r15; Alternative name is 'google::protobuf::FileDescriptorSet::FileDescriptorSet(google::protobuf::FileDescriptorSet const&)' push r14 push rbx mov r15, rsi mov r14, rdi lea rbx, [rdi+8] xor eax, eax mov [rdi+8], rax lea rcx, off_FE4C0 mov [rdi], rcx xorps xmm0, xmm0 movups xmmword ptr [rdi+10h], xmm0 mov [rdi+20h], rax cmp dword ptr [rsi+18h], 0 jz short loc_47A08 lea rdi, [r14+10h] lea rsi, [r15+10h] lea rdx, _ZN6google8protobuf8internal20RepeatedPtrFieldBase18MergeFromInnerLoopINS0_16RepeatedPtrFieldINS0_19FileDescriptorProtoEE11TypeHandlerEEEvPPvS9_ii; google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<google::protobuf::RepeatedPtrField<google::protobuf::FileDescriptorProto>::TypeHandler>(void **,void **,int,int) xor ecx, ecx call _ZN6google8protobuf8internal20RepeatedPtrFieldBase17MergeFromInternalERKS2_MS2_FvPPvS6_iiE; google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInternal(google::protobuf::internal::RepeatedPtrFieldBase const&,void (google::protobuf::internal::RepeatedPtrFieldBase::*)(void **,void **,int,int)) loc_47A08: mov dword ptr [r14+28h], 0 mov rsi, [r15+8] test sil, 1 jz short loc_47A2A and rsi, 0FFFFFFFFFFFFFFFCh add rsi, 8 mov rdi, rbx call _ZN6google8protobuf8internal16InternalMetadata11DoMergeFromINS0_15UnknownFieldSetEEEvRKT_; google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>(google::protobuf::UnknownFieldSet const&) loc_47A2A: pop rbx pop r14 pop r15 retn mov r15, rax lea rax, _ZTVN6google8protobuf11MessageLiteE; `vtable for'google::protobuf::MessageLite add rax, 10h mov [r14], rax mov rdi, rbx; this call _ZN6google8protobuf8internal16InternalMetadataD2Ev; google::protobuf::internal::InternalMetadata::~InternalMetadata() mov rdi, r15 call __Unwind_Resume
signed int * google::protobuf::FileDescriptorSet::FileDescriptorSet( google::protobuf::FileDescriptorSet *this, const google::protobuf::FileDescriptorSet *a2) { signed int *result; // rax long long v3; // rsi result = 0LL; *((_QWORD *)this + 1) = 0LL; *(_QWORD *)this = off_FE4C0; *((_OWORD *)this + 1) = 0LL; *((_QWORD *)this + 4) = 0LL; if ( *((_DWORD *)a2 + 6) ) result = google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInternal( (long long)this + 16, (long long)a2 + 16, (char *)google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<google::protobuf::RepeatedPtrField<google::protobuf::FileDescriptorProto>::TypeHandler>, 0LL); *((_DWORD *)this + 10) = 0; v3 = *((_QWORD *)a2 + 1); if ( (v3 & 1) != 0 ) return (signed int *)google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>( (char *)this + 8, (v3 & 0xFFFFFFFFFFFFFFFCLL) + 8); return result; }
FileDescriptorSet: PUSH R15 PUSH R14 PUSH RBX MOV R15,RSI MOV R14,RDI LEA RBX,[RDI + 0x8] XOR EAX,EAX MOV qword ptr [RDI + 0x8],RAX LEA RCX,[0x1fe4c0] MOV qword ptr [RDI],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOV qword ptr [RDI + 0x20],RAX CMP dword ptr [RSI + 0x18],0x0 JZ 0x00147a08 LEA RDI,[R14 + 0x10] LEA RSI,[R15 + 0x10] LAB_001479fa: LEA RDX,[0x1597f8] XOR ECX,ECX CALL 0x0014769a LAB_00147a08: MOV dword ptr [R14 + 0x28],0x0 MOV RSI,qword ptr [R15 + 0x8] TEST SIL,0x1 JZ 0x00147a2a AND RSI,-0x4 ADD RSI,0x8 MOV RDI,RBX CALL 0x00159718 LAB_00147a2a: POP RBX POP R14 POP R15 RET
/* google::protobuf::FileDescriptorSet::FileDescriptorSet(google::protobuf::FileDescriptorSet const&) */ void __thiscall google::protobuf::FileDescriptorSet::FileDescriptorSet (FileDescriptorSet *this,FileDescriptorSet *param_1) { *(int8 *)(this + 8) = 0; *(int ***)this = &PTR__FileDescriptorSet_001fe4c0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; if (*(int *)(param_1 + 0x18) != 0) { /* try { // try from 001479fa to 00147a29 has its CatchHandler @ 00147a30 */ internal::RepeatedPtrFieldBase::MergeFromInternal ((RepeatedPtrFieldBase *)(this + 0x10), (_func_void_void_ptr_ptr_void_ptr_ptr_int_int *)(param_1 + 0x10)); } *(int4 *)(this + 0x28) = 0; if ((*(ulong *)(param_1 + 8) & 1) != 0) { internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet> ((InternalMetadata *)(this + 8), (UnknownFieldSet *)((*(ulong *)(param_1 + 8) & 0xfffffffffffffffc) + 8)); } return; }
13,252
mysql_read_query_result_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_read_query_result_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_read_query_result, (parms->mysql), parms->mysql, my_bool, r_my_bool) }
O3
c
mysql_read_query_result_start_internal: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rdi movq 0x480(%rdi), %rax movq 0x28(%rax), %rbx callq 0x78a28 movb %al, 0x8(%rbx) movl $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_read_query_result_start_internal: push rbp mov rbp, rsp push rbx push rax mov rdi, [rdi] mov rax, [rdi+480h] mov rbx, [rax+28h] call mysql_read_query_result mov [rbx+8], al mov dword ptr [rbx], 0 add rsp, 8 pop rbx pop rbp retn
bool mysql_read_query_result_start_internal(long long *a1) { long long v1; // rdi long long v2; // rbx bool result; // al v1 = *a1; v2 = *(_QWORD *)(*(_QWORD *)(v1 + 1152) + 40LL); result = mysql_read_query_result(v1); *(_BYTE *)(v2 + 8) = result; *(_DWORD *)v2 = 0; return result; }
mysql_read_query_result_start_internal: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RDI,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x480] MOV RBX,qword ptr [RAX + 0x28] CALL 0x00178a28 MOV byte ptr [RBX + 0x8],AL MOV dword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP RBP RET
void mysql_read_query_result_start_internal(long *param_1) { int4 *puVar1; int1 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_read_query_result(); *(int1 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
13,253
httplib::Server::handle_file_request(httplib::Request const&, httplib::Response&, bool)
hkr04[P]cpp-mcp/common/httplib.h
inline bool Server::handle_file_request(const Request &req, Response &res, bool head) { for (const auto &entry : base_dirs_) { // Prefix match if (!req.path.compare(0, entry.mount_point.size(), entry.mount_point)) { std::string sub_path = "/" + req.path.substr(entry.mount_point.size()); if (detail::is_valid_path(sub_path)) { auto path = entry.base_dir + sub_path; if (path.back() == '/') { path += "index.html"; } detail::FileStat stat(path); if (stat.is_dir()) { res.set_redirect(sub_path + "/", StatusCode::MovedPermanently_301); return true; } if (stat.is_file()) { for (const auto &kv : entry.headers) { res.set_header(kv.first, kv.second); } auto mm = std::make_shared<detail::mmap>(path.c_str()); if (!mm->is_open()) { return false; } res.set_content_provider( mm->size(), detail::find_content_type(path, file_extension_and_mimetype_map_, default_file_mimetype_), [mm](size_t offset, size_t length, DataSink &sink) -> bool { sink.write(mm->data() + offset, length); return true; }); if (!head && file_request_handler_) { file_request_handler_(req, res); } return true; } } } } return false; }
O0
c
httplib::Server::handle_file_request(httplib::Request const&, httplib::Response&, bool): subq $0x278, %rsp # imm = 0x278 movb %cl, %al movq %rdi, 0x268(%rsp) movq %rsi, 0x260(%rsp) movq %rdx, 0x258(%rsp) andb $0x1, %al movb %al, 0x257(%rsp) movq 0x268(%rsp), %rax movq %rax, 0x50(%rsp) addq $0x80, %rax movq %rax, 0x248(%rsp) movq 0x248(%rsp), %rdi callq 0x33730 movq %rax, 0x240(%rsp) movq 0x248(%rsp), %rdi callq 0x33760 movq %rax, 0x238(%rsp) leaq 0x240(%rsp), %rdi leaq 0x238(%rsp), %rsi callq 0x33790 testb $0x1, %al jne 0x3274d jmp 0x32d13 leaq 0x240(%rsp), %rdi callq 0x337d0 movq %rax, 0x230(%rsp) movq 0x260(%rsp), %rax addq $0x20, %rax movq %rax, 0x48(%rsp) movq 0x230(%rsp), %rdi callq 0xb590 movq 0x48(%rsp), %rdi movq %rax, %rdx movq 0x230(%rsp), %rcx xorl %eax, %eax movl %eax, %esi callq 0xbaa0 cmpl $0x0, %eax jne 0x32cff movq 0x260(%rsp), %rax addq $0x20, %rax movq %rax, 0x38(%rsp) movq 0x230(%rsp), %rdi callq 0xb590 movq 0x38(%rsp), %rsi movq %rax, %rdx leaq 0x1f0(%rsp), %rdi movq %rdi, 0x40(%rsp) movq $-0x1, %rcx callq 0xb880 movq 0x40(%rsp), %rdx leaq 0xa0d61(%rip), %rsi # 0xd354e leaq 0x210(%rsp), %rdi callq 0x225c0 jmp 0x327fc leaq 0x1f0(%rsp), %rdi callq 0xbfb0 leaq 0x210(%rsp), %rdi callq 0x337e0 movb %al, 0x37(%rsp) jmp 0x3281c movb 0x37(%rsp), %al testb $0x1, %al jne 0x32829 jmp 0x32cc7 movq 0x230(%rsp), %rsi addq $0x20, %rsi leaq 0x1c0(%rsp), %rdi leaq 0x210(%rsp), %rdx callq 0x33a30 jmp 0x3284c leaq 0x1c0(%rsp), %rdi callq 0xb5d0 movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x328d1 leaq 0x9bc44(%rip), %rsi # 0xce4ac leaq 0x1c0(%rsp), %rdi callq 0xb7f0 jmp 0x32877 jmp 0x328d1 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1e8(%rsp) movl %eax, 0x1e4(%rsp) leaq 0x1f0(%rsp), %rdi callq 0xbfb0 jmp 0x32d2c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1e8(%rsp) movl %eax, 0x1e4(%rsp) jmp 0x32cf0 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1e8(%rsp) movl %eax, 0x1e4(%rsp) jmp 0x32cb8 leaq 0x128(%rsp), %rdi leaq 0x1c0(%rsp), %rsi callq 0x33ac0 jmp 0x328e8 leaq 0x128(%rsp), %rdi callq 0x33b10 movb %al, 0x36(%rsp) jmp 0x328fb movb 0x36(%rsp), %al testb $0x1, %al jne 0x32908 jmp 0x32997 movq 0x258(%rsp), %rax movq %rax, 0x28(%rsp) leaq 0xa0c32(%rip), %rdx # 0xd354e leaq 0x108(%rsp), %rdi leaq 0x210(%rsp), %rsi callq 0x2a9b0 jmp 0x32933 movq 0x28(%rsp), %rdi leaq 0x108(%rsp), %rsi movl $0x12d, %edx # imm = 0x12D callq 0x33b50 jmp 0x3294c leaq 0x108(%rsp), %rdi callq 0xbfb0 movb $0x1, 0x277(%rsp) movl $0x1, 0x104(%rsp) jmp 0x32c9c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1e8(%rsp) movl %eax, 0x1e4(%rsp) leaq 0x108(%rsp), %rdi callq 0xbfb0 jmp 0x32cb8 leaq 0x128(%rsp), %rdi callq 0x33c50 movb %al, 0x27(%rsp) jmp 0x329aa movb 0x27(%rsp), %al testb $0x1, %al jne 0x329b7 jmp 0x32c91 movq 0x230(%rsp), %rax addq $0x40, %rax movq %rax, 0xf8(%rsp) movq 0xf8(%rsp), %rdi callq 0x2a960 movq %rax, 0xf0(%rsp) movq 0xf8(%rsp), %rdi callq 0x26650 movq %rax, 0xe8(%rsp) leaq 0xf0(%rsp), %rdi leaq 0xe8(%rsp), %rsi callq 0x217c0 testb $0x1, %al jne 0x32a10 jmp 0x32a54 leaq 0xf0(%rsp), %rdi callq 0x2a990 movq %rax, 0xe0(%rsp) movq 0x258(%rsp), %rdi movq 0xe0(%rsp), %rsi movq %rsi, %rdx addq $0x20, %rdx callq 0x18ab0 jmp 0x32a43 jmp 0x32a45 leaq 0xf0(%rsp), %rdi callq 0x24aa0 jmp 0x329f5 leaq 0x1c0(%rsp), %rdi callq 0xb2c0 movq %rax, 0xc8(%rsp) leaq 0xd0(%rsp), %rdi leaq 0xc8(%rsp), %rsi callq 0x18b60 jmp 0x32a80 leaq 0xd0(%rsp), %rdi callq 0x18be0 movq %rax, %rdi callq 0x18bf0 movb %al, 0x26(%rsp) jmp 0x32a9b movb 0x26(%rsp), %al testb $0x1, %al jne 0x32ad6 jmp 0x32aa5 movb $0x0, 0x277(%rsp) movl $0x1, 0x104(%rsp) jmp 0x32c73 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1e8(%rsp) movl %eax, 0x1e4(%rsp) jmp 0x32c82 movq 0x258(%rsp), %rax movq %rax, 0x10(%rsp) leaq 0xd0(%rsp), %rdi callq 0x18be0 movq %rax, %rdi callq 0x1a4b0 movq %rax, 0x18(%rsp) jmp 0x32aff movq 0x50(%rsp), %rcx movq %rcx, %rdx addq $0x98, %rdx addq $0xc8, %rcx leaq 0xa8(%rsp), %rdi leaq 0x1c0(%rsp), %rsi callq 0x18c90 jmp 0x32b2c leaq 0x78(%rsp), %rdi movq %rdi, 0x8(%rsp) leaq 0xd0(%rsp), %rsi callq 0x1a4c0 movq 0x8(%rsp), %rsi leaq 0x88(%rsp), %rdi callq 0x33c90 jmp 0x32b57 xorl %eax, %eax movl %eax, %esi leaq 0x58(%rsp), %rdi movq %rdi, (%rsp) callq 0x1a5a0 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi movq (%rsp), %r8 leaq 0xa8(%rsp), %rdx leaq 0x88(%rsp), %rcx callq 0x1a380 jmp 0x32b8e leaq 0x58(%rsp), %rdi callq 0x1a5e0 leaq 0x88(%rsp), %rdi callq 0x1a5f0 leaq 0x78(%rsp), %rdi callq 0x33d40 leaq 0xa8(%rsp), %rdi callq 0xbfb0 testb $0x1, 0x257(%rsp) jne 0x32c60 movq 0x50(%rsp), %rdi addq $0xe8, %rdi callq 0x21250 testb $0x1, %al jne 0x32be1 jmp 0x32c60 movq 0x50(%rsp), %rdi addq $0xe8, %rdi movq 0x260(%rsp), %rsi movq 0x258(%rsp), %rdx callq 0x21270 jmp 0x32c04 jmp 0x32c60 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1e8(%rsp) movl %eax, 0x1e4(%rsp) jmp 0x32c47 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1e8(%rsp) movl %eax, 0x1e4(%rsp) leaq 0x58(%rsp), %rdi callq 0x1a5e0 leaq 0x88(%rsp), %rdi callq 0x1a5f0 leaq 0x78(%rsp), %rdi callq 0x33d40 leaq 0xa8(%rsp), %rdi callq 0xbfb0 jmp 0x32c82 movb $0x1, 0x277(%rsp) movl $0x1, 0x104(%rsp) leaq 0xd0(%rsp), %rdi callq 0x1a610 jmp 0x32c9c leaq 0xd0(%rsp), %rdi callq 0x1a610 jmp 0x32cb8 movl $0x0, 0x104(%rsp) leaq 0x1c0(%rsp), %rdi callq 0xbfb0 movl 0x104(%rsp), %eax testl %eax, %eax jne 0x32cd2 jmp 0x32cb6 jmp 0x32cc7 leaq 0x1c0(%rsp), %rdi callq 0xbfb0 jmp 0x32cf0 movl $0x0, 0x104(%rsp) leaq 0x210(%rsp), %rdi callq 0xbfb0 movl 0x104(%rsp), %eax testl %eax, %eax je 0x32cee jmp 0x32cec jmp 0x32d1b jmp 0x32cff leaq 0x210(%rsp), %rdi callq 0xbfb0 jmp 0x32d2c jmp 0x32d01 leaq 0x240(%rsp), %rdi callq 0x33d50 jmp 0x3272f movb $0x0, 0x277(%rsp) movb 0x277(%rsp), %al andb $0x1, %al addq $0x278, %rsp # imm = 0x278 retq movq 0x1e8(%rsp), %rdi callq 0xbe10 nopl (%rax)
_ZN7httplib6Server19handle_file_requestERKNS_7RequestERNS_8ResponseEb: sub rsp, 278h mov al, cl mov [rsp+278h+var_10], rdi mov [rsp+278h+var_18], rsi mov [rsp+278h+var_20], rdx and al, 1 mov [rsp+278h+var_21], al mov rax, [rsp+278h+var_10] mov [rsp+278h+var_228], rax add rax, 80h mov [rsp+278h+var_30], rax mov rdi, [rsp+278h+var_30] call _ZNSt6vectorIN7httplib6Server15MountPointEntryESaIS2_EE5beginEv; std::vector<httplib::Server::MountPointEntry>::begin(void) mov [rsp+278h+var_38], rax mov rdi, [rsp+278h+var_30] call _ZNSt6vectorIN7httplib6Server15MountPointEntryESaIS2_EE3endEv; std::vector<httplib::Server::MountPointEntry>::end(void) mov [rsp+278h+var_40], rax loc_3272F: lea rdi, [rsp+278h+var_38] lea rsi, [rsp+278h+var_40] call _ZN9__gnu_cxxneIPN7httplib6Server15MountPointEntryESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_; __gnu_cxx::operator!=<httplib::Server::MountPointEntry *,std::vector<httplib::Server::MountPointEntry>>(__gnu_cxx::__normal_iterator<httplib::Server::MountPointEntry *,std::vector<httplib::Server::MountPointEntry>> const&,__gnu_cxx::__normal_iterator<httplib::Server::MountPointEntry *,std::vector<httplib::Server::MountPointEntry>> const&) test al, 1 jnz short loc_3274D jmp loc_32D13 loc_3274D: lea rdi, [rsp+278h+var_38] call _ZNK9__gnu_cxx17__normal_iteratorIPN7httplib6Server15MountPointEntryESt6vectorIS3_SaIS3_EEEdeEv; __gnu_cxx::__normal_iterator<httplib::Server::MountPointEntry *,std::vector<httplib::Server::MountPointEntry>>::operator*(void) mov [rsp+278h+var_48], rax mov rax, [rsp+278h+var_18] add rax, 20h ; ' ' mov [rsp+278h+var_230], rax mov rdi, [rsp+278h+var_48] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) mov rdi, [rsp+278h+var_230] mov rdx, rax mov rcx, [rsp+278h+var_48] xor eax, eax mov esi, eax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEmmRKS4_; std::string::compare(ulong,ulong,std::string const&) cmp eax, 0 jnz loc_32CFF mov rax, [rsp+278h+var_18] add rax, 20h ; ' ' mov [rsp+278h+var_240], rax mov rdi, [rsp+278h+var_48] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) mov rsi, [rsp+278h+var_240] mov rdx, rax lea rdi, [rsp+278h+var_88] mov [rsp+278h+var_238], rdi mov rcx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdx, [rsp+278h+var_238] lea rsi, aAbcdefghijklmn+3Fh; "/" lea rdi, [rsp+278h+var_68] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) jmp short $+2 loc_327FC: lea rdi, [rsp+278h+var_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+278h+var_68] call _ZN7httplib6detail13is_valid_pathERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; httplib::detail::is_valid_path(std::string const&) mov [rsp+278h+var_241], al jmp short $+2 loc_3281C: mov al, [rsp+278h+var_241] test al, 1 jnz short loc_32829 jmp loc_32CC7 loc_32829: mov rsi, [rsp+278h+var_48] add rsi, 20h ; ' '; int lea rdi, [rsp+278h+var_B8]; int lea rdx, [rsp+278h+var_68]; int call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_SA_; std::operator+<char>(std::string const&,std::string const&) jmp short $+2 loc_3284C: lea rdi, [rsp+278h+var_B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4backEv; std::string::back(void) movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_328D1 lea rsi, aIndexHtml; "index.html" lea rdi, [rsp+278h+var_B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*) jmp short $+2 loc_32877: jmp short loc_328D1 mov rcx, rax mov eax, edx mov [rsp+arg_1E0], rcx mov [rsp+arg_1DC], eax lea rdi, [rsp+arg_1E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_32D2C mov rcx, rax mov eax, edx mov [rsp+arg_1E0], rcx mov [rsp+arg_1DC], eax jmp loc_32CF0 mov rcx, rax mov eax, edx mov [rsp+arg_1E0], rcx mov [rsp+arg_1DC], eax jmp loc_32CB8 loc_328D1: lea rdi, [rsp+278h+var_150] lea rsi, [rsp+278h+var_B8] call _ZN7httplib6detail8FileStatC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; httplib::detail::FileStat::FileStat(std::string const&) jmp short $+2 loc_328E8: lea rdi, [rsp+278h+var_150]; this call _ZNK7httplib6detail8FileStat6is_dirEv; httplib::detail::FileStat::is_dir(void) mov [rsp+278h+var_242], al jmp short $+2 loc_328FB: mov al, [rsp+278h+var_242] test al, 1 jnz short loc_32908 jmp loc_32997 loc_32908: mov rax, [rsp+278h+var_20] mov [rsp+278h+var_250], rax lea rdx, aAbcdefghijklmn+3Fh; int lea rdi, [rsp+278h+var_170]; int lea rsi, [rsp+278h+var_68]; int call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) jmp short $+2 loc_32933: mov rdi, [rsp+278h+var_250] lea rsi, [rsp+278h+var_170] mov edx, 12Dh call _ZN7httplib8Response12set_redirectERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; httplib::Response::set_redirect(std::string const&,int) jmp short $+2 loc_3294C: lea rdi, [rsp+278h+var_170]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov [rsp+278h+var_1], 1 mov [rsp+278h+var_174], 1 jmp loc_32C9C mov rcx, rax mov eax, edx mov [rsp+arg_1E0], rcx mov [rsp+arg_1DC], eax lea rdi, [rsp+arg_100]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_32CB8 loc_32997: lea rdi, [rsp+278h+var_150]; this call _ZNK7httplib6detail8FileStat7is_fileEv; httplib::detail::FileStat::is_file(void) mov [rsp+278h+var_251], al jmp short $+2 loc_329AA: mov al, [rsp+278h+var_251] test al, 1 jnz short loc_329B7 jmp loc_32C91 loc_329B7: mov rax, [rsp+278h+var_48] add rax, 40h ; '@' mov [rsp+278h+var_180], rax mov rdi, [rsp+278h+var_180] call _ZNKSt18unordered_multimapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_N7httplib6detail11case_ignore4hashENS8_8equal_toESaISt4pairIKS5_S5_EEE5beginEv; std::unordered_multimap<std::string,std::string,httplib::detail::case_ignore::hash,httplib::detail::case_ignore::equal_to,std::allocator<std::pair<std::string const,std::string>>>::begin(void) mov [rsp+278h+var_188], rax mov rdi, [rsp+278h+var_180] call _ZNKSt18unordered_multimapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_N7httplib6detail11case_ignore4hashENS8_8equal_toESaISt4pairIKS5_S5_EEE3endEv; std::unordered_multimap<std::string,std::string,httplib::detail::case_ignore::hash,httplib::detail::case_ignore::equal_to,std::allocator<std::pair<std::string const,std::string>>>::end(void) mov [rsp+278h+var_190], rax loc_329F5: lea rdi, [rsp+278h+var_188] lea rsi, [rsp+278h+var_190] call _ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_ELb1EEESC_; std::__detail::operator!=(std::__detail::_Node_iterator_base<std::pair<std::string const,std::string>,true> const&,std::__detail::_Node_iterator_base<std::pair<std::string const,std::string>,true> const&) test al, 1 jnz short loc_32A10 jmp short loc_32A54 loc_32A10: lea rdi, [rsp+278h+var_188] call _ZNKSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_ELb0ELb1EEdeEv; std::__detail::_Node_const_iterator<std::pair<std::string const,std::string>,false,true>::operator*(void) mov [rsp+278h+var_198], rax mov rdi, [rsp+278h+var_20] mov rsi, [rsp+278h+var_198] mov rdx, rsi add rdx, 20h ; ' ' call _ZN7httplib8Response10set_headerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_; httplib::Response::set_header(std::string const&,std::string const&) jmp short $+2 loc_32A43: jmp short $+2 loc_32A45: lea rdi, [rsp+278h+var_188] call _ZNSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_ELb0ELb1EEppEv; std::__detail::_Node_const_iterator<std::pair<std::string const,std::string>,false,true>::operator++(void) jmp short loc_329F5 loc_32A54: lea rdi, [rsp+278h+var_B8] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov [rsp+278h+var_1B0], rax lea rdi, [rsp+278h+var_1A8] lea rsi, [rsp+278h+var_1B0] call _ZSt11make_sharedIN7httplib6detail4mmapEJPKcEESt10shared_ptrIT_EDpOT0_; std::make_shared<httplib::detail::mmap,char const*>(char const* &&) jmp short $+2 loc_32A80: lea rdi, [rsp+278h+var_1A8] call _ZNKSt19__shared_ptr_accessIN7httplib6detail4mmapELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<httplib::detail::mmap,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax; this call _ZNK7httplib6detail4mmap7is_openEv; httplib::detail::mmap::is_open(void) mov [rsp+278h+var_252], al jmp short $+2 loc_32A9B: mov al, [rsp+278h+var_252] test al, 1 jnz short loc_32AD6 jmp short $+2 loc_32AA5: mov [rsp+278h+var_1], 0 mov [rsp+278h+var_174], 1 jmp loc_32C73 mov rcx, rax mov eax, edx mov [rsp+arg_1E0], rcx mov [rsp+arg_1DC], eax jmp loc_32C82 loc_32AD6: mov rax, [rsp+278h+var_20] mov [rsp+278h+var_268], rax lea rdi, [rsp+278h+var_1A8] call _ZNKSt19__shared_ptr_accessIN7httplib6detail4mmapELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<httplib::detail::mmap,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax; this call _ZNK7httplib6detail4mmap4sizeEv; httplib::detail::mmap::size(void) mov [rsp+278h+var_260], rax jmp short $+2 loc_32AFF: mov rcx, [rsp+278h+var_228] mov rdx, rcx add rdx, 98h add rcx, 0C8h lea rdi, [rsp+278h+var_1D0] lea rsi, [rsp+278h+var_B8] call _ZN7httplib6detail17find_content_typeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt3mapIS6_S6_St4lessIS6_ESaISt4pairIS7_S6_EEES8_; httplib::detail::find_content_type(std::string const&,std::map<std::string,std::string> const&,std::string const&) jmp short $+2 loc_32B2C: lea rdi, [rsp+278h+var_200] mov [rsp+278h+var_270], rdi lea rsi, [rsp+278h+var_1A8] call _ZNSt10shared_ptrIN7httplib6detail4mmapEEC2ERKS3_; std::shared_ptr<httplib::detail::mmap>::shared_ptr(std::shared_ptr<httplib::detail::mmap> const&) mov rsi, [rsp+278h+var_270] lea rdi, [rsp+278h+var_1F0] call _ZNSt8functionIFbmmRN7httplib8DataSinkEEEC2IZNS0_6Server19handle_file_requestERKNS0_7RequestERNS0_8ResponseEbEUlmmS2_E_vEEOT_; std::function<bool ()(ulong,ulong,httplib::DataSink &)>::function<httplib::Server::handle_file_request(httplib::Request const&,httplib::Response &,bool)::{lambda(ulong,ulong,httplib::DataSink &)#1},void>(httplib::Server::handle_file_request(httplib::Request const&,httplib::Response &,bool)::{lambda(ulong,ulong,httplib::DataSink &)#1} &&) jmp short $+2 loc_32B57: xor eax, eax mov esi, eax lea rdi, [rsp+278h+var_220] mov [rsp+278h+var_278], rdi call _ZNSt8functionIFvbEEC2EDn; std::function<void ()(bool)>::function(decltype(nullptr)) mov rdi, [rsp+278h+var_268] mov rsi, [rsp+278h+var_260] mov r8, [rsp+278h+var_278] lea rdx, [rsp+278h+var_1D0] lea rcx, [rsp+278h+var_1F0] call _ZN7httplib8Response20set_content_providerEmRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt8functionIFbmmRNS_8DataSinkEEES9_IFvbEE; httplib::Response::set_content_provider(ulong,std::string const&,std::function<bool ()(ulong,ulong,httplib::DataSink &)>,std::function<void ()(bool)>) jmp short $+2 loc_32B8E: lea rdi, [rsp+278h+var_220] call _ZNSt8functionIFvbEED2Ev; std::function<void ()(bool)>::~function() lea rdi, [rsp+278h+var_1F0] call _ZNSt8functionIFbmmRN7httplib8DataSinkEEED2Ev; std::function<bool ()(ulong,ulong,httplib::DataSink &)>::~function() lea rdi, [rsp+278h+var_200] call _ZZN7httplib6Server19handle_file_requestERKNS_7RequestERNS_8ResponseEbENUlmmRNS_8DataSinkEE_D2Ev; httplib::Server::handle_file_request(httplib::Request const&,httplib::Response &,bool)::{lambda(ulong,ulong,httplib::DataSink &)#1}::~DataSink() lea rdi, [rsp+278h+var_1D0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() test [rsp+278h+var_21], 1 jnz loc_32C60 mov rdi, [rsp+278h+var_228] add rdi, 0E8h call _ZNKSt8functionIFvRKN7httplib7RequestERNS0_8ResponseEEEcvbEv; std::function<void ()(httplib::Request const&,httplib::Response &)>::operator bool(void) test al, 1 jnz short loc_32BE1 jmp short loc_32C60 loc_32BE1: mov rdi, [rsp+278h+var_228] add rdi, 0E8h mov rsi, [rsp+278h+var_18] mov rdx, [rsp+278h+var_20] call _ZNKSt8functionIFvRKN7httplib7RequestERNS0_8ResponseEEEclES3_S5_; std::function<void ()(httplib::Request const&,httplib::Response &)>::operator()(httplib::Request const&,httplib::Response &) jmp short $+2 loc_32C04: jmp short loc_32C60 mov rcx, rax mov eax, edx mov [rsp+arg_1E0], rcx mov [rsp+arg_1DC], eax jmp short loc_32C47 mov rcx, rax mov eax, edx mov [rsp+arg_1E0], rcx mov [rsp+arg_1DC], eax lea rdi, [rsp+arg_50] call _ZNSt8functionIFvbEED2Ev; std::function<void ()(bool)>::~function() lea rdi, [rsp+arg_80] call _ZNSt8functionIFbmmRN7httplib8DataSinkEEED2Ev; std::function<bool ()(ulong,ulong,httplib::DataSink &)>::~function() loc_32C47: lea rdi, [rsp+arg_70] call _ZZN7httplib6Server19handle_file_requestERKNS_7RequestERNS_8ResponseEbENUlmmRNS_8DataSinkEE_D2Ev; httplib::Server::handle_file_request(httplib::Request const&,httplib::Response &,bool)::{lambda(ulong,ulong,httplib::DataSink &)#1}::~DataSink() lea rdi, [rsp+arg_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_32C82 loc_32C60: mov [rsp+278h+var_1], 1 mov [rsp+278h+var_174], 1 loc_32C73: lea rdi, [rsp+278h+var_1A8] call _ZNSt10shared_ptrIN7httplib6detail4mmapEED2Ev; std::shared_ptr<httplib::detail::mmap>::~shared_ptr() jmp short loc_32C9C loc_32C82: lea rdi, [rsp+arg_C8] call _ZNSt10shared_ptrIN7httplib6detail4mmapEED2Ev; std::shared_ptr<httplib::detail::mmap>::~shared_ptr() jmp short loc_32CB8 loc_32C91: mov [rsp+278h+var_174], 0 loc_32C9C: lea rdi, [rsp+278h+var_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov eax, [rsp+278h+var_174] test eax, eax jnz short loc_32CD2 jmp short $+2 loc_32CB6: jmp short loc_32CC7 loc_32CB8: lea rdi, [rsp+arg_1B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_32CF0 loc_32CC7: mov [rsp+278h+var_174], 0 loc_32CD2: lea rdi, [rsp+278h+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov eax, [rsp+278h+var_174] test eax, eax jz short loc_32CEE jmp short $+2 loc_32CEC: jmp short loc_32D1B loc_32CEE: jmp short loc_32CFF loc_32CF0: lea rdi, [rsp+arg_208]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_32D2C loc_32CFF: jmp short $+2 loc_32D01: lea rdi, [rsp+278h+var_38] call _ZN9__gnu_cxx17__normal_iteratorIPN7httplib6Server15MountPointEntryESt6vectorIS3_SaIS3_EEEppEv; __gnu_cxx::__normal_iterator<httplib::Server::MountPointEntry *,std::vector<httplib::Server::MountPointEntry>>::operator++(void) jmp loc_3272F loc_32D13: mov [rsp+278h+var_1], 0 loc_32D1B: mov al, [rsp+278h+var_1] and al, 1 add rsp, 278h retn loc_32D2C: mov rdi, [rsp+arg_1E0] call __Unwind_Resume
char httplib::Server::handle_file_request( httplib::Server *this, const httplib::Request *a2, httplib::Response *a3, char a4) { long long v4; // rax long long v5; // rax int v6; // ecx int v7; // r8d int v8; // r9d int v9; // ecx int v10; // r8d int v11; // r9d httplib::detail::mmap *v12; // rax httplib::detail::mmap *v13; // rax int v14; // r8d int v15; // r9d int v16; // edx int v17; // ecx int v18; // r8d int v19; // r9d _BYTE *v21; // [rsp+0h] [rbp-278h] void *v22; // [rsp+8h] [rbp-270h] httplib::Response *v23; // [rsp+10h] [rbp-268h] long long v24; // [rsp+18h] [rbp-260h] int v25; // [rsp+20h] [rbp-258h] int v26; // [rsp+28h] [rbp-250h] char *v27; // [rsp+38h] [rbp-240h] char *v28; // [rsp+48h] [rbp-230h] _BYTE v29[32]; // [rsp+58h] [rbp-220h] BYREF _BYTE v30[16]; // [rsp+78h] [rbp-200h] BYREF _BYTE v31[32]; // [rsp+88h] [rbp-1F0h] BYREF _BYTE v32[32]; // [rsp+A8h] [rbp-1D0h] BYREF long long v33; // [rsp+C8h] [rbp-1B0h] BYREF _BYTE v34[16]; // [rsp+D0h] [rbp-1A8h] BYREF long long v35; // [rsp+E0h] [rbp-198h] long long v36; // [rsp+E8h] [rbp-190h] BYREF long long v37; // [rsp+F0h] [rbp-188h] BYREF long long v38; // [rsp+F8h] [rbp-180h] int v39; // [rsp+104h] [rbp-174h] int v40[8]; // [rsp+108h] [rbp-170h] BYREF _BYTE v41[152]; // [rsp+128h] [rbp-150h] BYREF int v42[12]; // [rsp+1C0h] [rbp-B8h] BYREF _BYTE v43[32]; // [rsp+1F0h] [rbp-88h] BYREF int v44[8]; // [rsp+210h] [rbp-68h] BYREF long long v45; // [rsp+230h] [rbp-48h] long long v46; // [rsp+238h] [rbp-40h] BYREF _QWORD v47[2]; // [rsp+240h] [rbp-38h] BYREF char v48; // [rsp+257h] [rbp-21h] httplib::Response *v49; // [rsp+258h] [rbp-20h] const httplib::Request *v50; // [rsp+260h] [rbp-18h] httplib::Server *v51; // [rsp+268h] [rbp-10h] char v52; // [rsp+277h] [rbp-1h] v51 = this; v50 = a2; v49 = a3; v48 = a4 & 1; v47[1] = (char *)this + 128; v47[0] = std::vector<httplib::Server::MountPointEntry>::begin((char *)this + 128); v46 = std::vector<httplib::Server::MountPointEntry>::end((char *)this + 128); while ( (__gnu_cxx::operator!=<httplib::Server::MountPointEntry *,std::vector<httplib::Server::MountPointEntry>>( v47, &v46) & 1) != 0 ) { v45 = __gnu_cxx::__normal_iterator<httplib::Server::MountPointEntry *,std::vector<httplib::Server::MountPointEntry>>::operator*(v47); v28 = (char *)v50 + 32; v4 = std::string::size(v45); if ( !(unsigned int)std::string::compare(v28, 0LL, v4, v45) ) { v27 = (char *)v50 + 32; v5 = std::string::size(v45); std::string::substr(v43, v27, v5, -1LL); std::operator+<char>((long long)v44, (long long)"/", (long long)v43); std::string::~string(v43); if ( (httplib::detail::is_valid_path(v44) & 1) == 0 ) goto LABEL_22; std::operator+<char>((int)v42, v45 + 32, (int)v44, v6, v7, v8, (int)v21, v22, (int)v23, v24); if ( *(_BYTE *)std::string::back(v42) == 47 ) std::string::operator+=(v42, "index.html"); httplib::detail::FileStat::FileStat(v41, v42); if ( (httplib::detail::FileStat::is_dir((httplib::detail::FileStat *)v41) & 1) != 0 ) { v26 = (int)v49; std::operator+<char>((long long)v40, (long long)v44, (long long)"/"); httplib::Response::set_redirect( v26, (unsigned int)v40, 301, v9, v10, v11, (_DWORD)v21, (_DWORD)v22, (_DWORD)v23, v24, v25, v26); std::string::~string(v40); v52 = 1; v39 = 1; } else if ( (httplib::detail::FileStat::is_file((httplib::detail::FileStat *)v41) & 1) != 0 ) { v38 = v45 + 64; v37 = std::unordered_multimap<std::string,std::string,httplib::detail::case_ignore::hash,httplib::detail::case_ignore::equal_to,std::allocator<std::pair<std::string const,std::string>>>::begin(v45 + 64); v36 = std::unordered_multimap<std::string,std::string,httplib::detail::case_ignore::hash,httplib::detail::case_ignore::equal_to,std::allocator<std::pair<std::string const,std::string>>>::end(v38); while ( std::__detail::operator!=(&v37, &v36) ) { v35 = std::__detail::_Node_const_iterator<std::pair<std::string const,std::string>,false,true>::operator*(&v37); httplib::Response::set_header((long long)v49, v35, v35 + 32); std::__detail::_Node_const_iterator<std::pair<std::string const,std::string>,false,true>::operator++((long long)&v37); } v33 = std::string::c_str(v42); std::make_shared<httplib::detail::mmap,char const*>((long long)v34, (long long)&v33); v12 = (httplib::detail::mmap *)std::__shared_ptr_access<httplib::detail::mmap,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((long long)v34); if ( httplib::detail::mmap::is_open(v12) ) { v23 = v49; v13 = (httplib::detail::mmap *)std::__shared_ptr_access<httplib::detail::mmap,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((long long)v34); v24 = httplib::detail::mmap::size(v13); httplib::detail::find_content_type( (long long)v32, (long long)v42, (long long)this + 152, (long long)this + 200, v14, v15); std::shared_ptr<httplib::detail::mmap>::shared_ptr((long long)v30, (long long)v34); std::function<bool ()(unsigned long,unsigned long,httplib::DataSink &)>::function<httplib::Server::handle_file_request(httplib::Request const&,httplib::Response &,bool)::{lambda(unsigned long,unsigned long,httplib::DataSink &)#1},void>( (unsigned int)v31, (unsigned int)v30, v16, v17, v18, v19, (_DWORD)v21, (long long)v30); v21 = v29; std::function<void ()(bool)>::function((std::_Function_base *)v29); httplib::Response::set_content_provider((long long)v23, v24, (long long)v32, (long long)v31, (long long)v29); std::function<void ()(bool)>::~function((std::_Function_base *)v29); std::function<bool ()(unsigned long,unsigned long,httplib::DataSink &)>::~function((std::_Function_base *)v31); httplib::Server::handle_file_request(httplib::Request const&,httplib::Response &,bool)::{lambda(unsigned long,unsigned long,httplib::DataSink &)#1}::~DataSink(v30); std::string::~string(v32); if ( (v48 & 1) == 0 && std::function<void ()(httplib::Request const&,httplib::Response &)>::operator bool((httplib::Server *)((char *)this + 232)) ) { std::function<void ()(httplib::Request const&,httplib::Response &)>::operator()( (httplib::Server *)((char *)this + 232), (long long)v50, (long long)v49); } v52 = 1; v39 = 1; } else { v52 = 0; v39 = 1; } std::shared_ptr<httplib::detail::mmap>::~shared_ptr((long long)v34); } else { v39 = 0; } std::string::~string(v42); if ( !v39 ) LABEL_22: v39 = 0; std::string::~string(v44); if ( v39 ) return v52 & 1; } __gnu_cxx::__normal_iterator<httplib::Server::MountPointEntry *,std::vector<httplib::Server::MountPointEntry>>::operator++(v47); } v52 = 0; return v52 & 1; }
handle_file_request: SUB RSP,0x278 MOV AL,CL MOV qword ptr [RSP + 0x268],RDI MOV qword ptr [RSP + 0x260],RSI MOV qword ptr [RSP + 0x258],RDX AND AL,0x1 MOV byte ptr [RSP + 0x257],AL MOV RAX,qword ptr [RSP + 0x268] MOV qword ptr [RSP + 0x50],RAX ADD RAX,0x80 MOV qword ptr [RSP + 0x248],RAX MOV RDI,qword ptr [RSP + 0x248] CALL 0x00133730 MOV qword ptr [RSP + 0x240],RAX MOV RDI,qword ptr [RSP + 0x248] CALL 0x00133760 MOV qword ptr [RSP + 0x238],RAX LAB_0013272f: LEA RDI,[RSP + 0x240] LEA RSI,[RSP + 0x238] CALL 0x00133790 TEST AL,0x1 JNZ 0x0013274d JMP 0x00132d13 LAB_0013274d: LEA RDI,[RSP + 0x240] CALL 0x001337d0 MOV qword ptr [RSP + 0x230],RAX MOV RAX,qword ptr [RSP + 0x260] ADD RAX,0x20 MOV qword ptr [RSP + 0x48],RAX MOV RDI,qword ptr [RSP + 0x230] CALL 0x0010b590 MOV RDI,qword ptr [RSP + 0x48] MOV RDX,RAX MOV RCX,qword ptr [RSP + 0x230] XOR EAX,EAX MOV ESI,EAX CALL 0x0010baa0 CMP EAX,0x0 JNZ 0x00132cff MOV RAX,qword ptr [RSP + 0x260] ADD RAX,0x20 MOV qword ptr [RSP + 0x38],RAX MOV RDI,qword ptr [RSP + 0x230] CALL 0x0010b590 MOV RSI,qword ptr [RSP + 0x38] MOV RDX,RAX LEA RDI,[RSP + 0x1f0] MOV qword ptr [RSP + 0x40],RDI MOV RCX,-0x1 CALL 0x0010b880 MOV RDX,qword ptr [RSP + 0x40] LAB_001327e6: LEA RSI,[0x1d354e] LEA RDI,[RSP + 0x210] CALL 0x001225c0 JMP 0x001327fc LAB_001327fc: LEA RDI,[RSP + 0x1f0] CALL 0x0010bfb0 LAB_00132809: LEA RDI,[RSP + 0x210] CALL 0x001337e0 MOV byte ptr [RSP + 0x37],AL JMP 0x0013281c LAB_0013281c: MOV AL,byte ptr [RSP + 0x37] TEST AL,0x1 JNZ 0x00132829 JMP 0x00132cc7 LAB_00132829: MOV RSI,qword ptr [RSP + 0x230] ADD RSI,0x20 LEA RDI,[RSP + 0x1c0] LEA RDX,[RSP + 0x210] CALL 0x00133a30 JMP 0x0013284c LAB_0013284c: LEA RDI,[RSP + 0x1c0] CALL 0x0010b5d0 MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x001328d1 LAB_00132861: LEA RSI,[0x1ce4ac] LEA RDI,[RSP + 0x1c0] CALL 0x0010b7f0 JMP 0x00132877 LAB_00132877: JMP 0x001328d1 LAB_001328d1: LEA RDI,[RSP + 0x128] LEA RSI,[RSP + 0x1c0] CALL 0x00133ac0 JMP 0x001328e8 LAB_001328e8: LEA RDI,[RSP + 0x128] CALL 0x00133b10 MOV byte ptr [RSP + 0x36],AL JMP 0x001328fb LAB_001328fb: MOV AL,byte ptr [RSP + 0x36] TEST AL,0x1 JNZ 0x00132908 JMP 0x00132997 LAB_00132908: MOV RAX,qword ptr [RSP + 0x258] MOV qword ptr [RSP + 0x28],RAX LEA RDX,[0x1d354e] LEA RDI,[RSP + 0x108] LEA RSI,[RSP + 0x210] CALL 0x0012a9b0 JMP 0x00132933 LAB_00132933: MOV RDI,qword ptr [RSP + 0x28] LEA RSI,[RSP + 0x108] MOV EDX,0x12d CALL 0x00133b50 JMP 0x0013294c LAB_0013294c: LEA RDI,[RSP + 0x108] CALL 0x0010bfb0 MOV byte ptr [RSP + 0x277],0x1 MOV dword ptr [RSP + 0x104],0x1 JMP 0x00132c9c LAB_00132997: LEA RDI,[RSP + 0x128] CALL 0x00133c50 MOV byte ptr [RSP + 0x27],AL JMP 0x001329aa LAB_001329aa: MOV AL,byte ptr [RSP + 0x27] TEST AL,0x1 JNZ 0x001329b7 JMP 0x00132c91 LAB_001329b7: MOV RAX,qword ptr [RSP + 0x230] ADD RAX,0x40 MOV qword ptr [RSP + 0xf8],RAX MOV RDI,qword ptr [RSP + 0xf8] CALL 0x0012a960 MOV qword ptr [RSP + 0xf0],RAX MOV RDI,qword ptr [RSP + 0xf8] CALL 0x00126650 MOV qword ptr [RSP + 0xe8],RAX LAB_001329f5: LEA RDI,[RSP + 0xf0] LEA RSI,[RSP + 0xe8] CALL 0x001217c0 TEST AL,0x1 JNZ 0x00132a10 JMP 0x00132a54 LAB_00132a10: LEA RDI,[RSP + 0xf0] CALL 0x0012a990 MOV qword ptr [RSP + 0xe0],RAX MOV RDI,qword ptr [RSP + 0x258] MOV RSI,qword ptr [RSP + 0xe0] MOV RDX,RSI ADD RDX,0x20 CALL 0x00118ab0 JMP 0x00132a43 LAB_00132a43: JMP 0x00132a45 LAB_00132a45: LEA RDI,[RSP + 0xf0] CALL 0x00124aa0 JMP 0x001329f5 LAB_00132a54: LEA RDI,[RSP + 0x1c0] CALL 0x0010b2c0 MOV qword ptr [RSP + 0xc8],RAX LEA RDI,[RSP + 0xd0] LEA RSI,[RSP + 0xc8] CALL 0x00118b60 JMP 0x00132a80 LAB_00132a80: LEA RDI,[RSP + 0xd0] CALL 0x00118be0 MOV RDI,RAX LAB_00132a90: CALL 0x00118bf0 MOV byte ptr [RSP + 0x26],AL JMP 0x00132a9b LAB_00132a9b: MOV AL,byte ptr [RSP + 0x26] TEST AL,0x1 JNZ 0x00132ad6 JMP 0x00132aa5 LAB_00132aa5: MOV byte ptr [RSP + 0x277],0x0 MOV dword ptr [RSP + 0x104],0x1 JMP 0x00132c73 LAB_00132ad6: MOV RAX,qword ptr [RSP + 0x258] MOV qword ptr [RSP + 0x10],RAX LEA RDI,[RSP + 0xd0] CALL 0x00118be0 MOV RDI,RAX CALL 0x0011a4b0 MOV qword ptr [RSP + 0x18],RAX JMP 0x00132aff LAB_00132aff: MOV RCX,qword ptr [RSP + 0x50] MOV RDX,RCX ADD RDX,0x98 ADD RCX,0xc8 LEA RDI,[RSP + 0xa8] LEA RSI,[RSP + 0x1c0] CALL 0x00118c90 JMP 0x00132b2c LAB_00132b2c: LEA RDI,[RSP + 0x78] MOV qword ptr [RSP + 0x8],RDI LEA RSI,[RSP + 0xd0] CALL 0x0011a4c0 MOV RSI,qword ptr [RSP + 0x8] LAB_00132b48: LEA RDI,[RSP + 0x88] CALL 0x00133c90 JMP 0x00132b57 LAB_00132b57: XOR EAX,EAX MOV ESI,EAX LEA RDI,[RSP + 0x58] MOV qword ptr [RSP],RDI CALL 0x0011a5a0 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x18] MOV R8,qword ptr [RSP] LAB_00132b77: LEA RDX,[RSP + 0xa8] LEA RCX,[RSP + 0x88] CALL 0x0011a380 JMP 0x00132b8e LAB_00132b8e: LEA RDI,[RSP + 0x58] CALL 0x0011a5e0 LEA RDI,[RSP + 0x88] CALL 0x0011a5f0 LEA RDI,[RSP + 0x78] CALL 0x00133d40 LEA RDI,[RSP + 0xa8] CALL 0x0010bfb0 TEST byte ptr [RSP + 0x257],0x1 JNZ 0x00132c60 MOV RDI,qword ptr [RSP + 0x50] ADD RDI,0xe8 CALL 0x00121250 TEST AL,0x1 JNZ 0x00132be1 JMP 0x00132c60 LAB_00132be1: MOV RDI,qword ptr [RSP + 0x50] ADD RDI,0xe8 MOV RSI,qword ptr [RSP + 0x260] MOV RDX,qword ptr [RSP + 0x258] LAB_00132bfd: CALL 0x00121270 LAB_00132c02: JMP 0x00132c04 LAB_00132c04: JMP 0x00132c60 LAB_00132c60: MOV byte ptr [RSP + 0x277],0x1 MOV dword ptr [RSP + 0x104],0x1 LAB_00132c73: LEA RDI,[RSP + 0xd0] CALL 0x0011a610 JMP 0x00132c9c LAB_00132c91: MOV dword ptr [RSP + 0x104],0x0 LAB_00132c9c: LEA RDI,[RSP + 0x1c0] CALL 0x0010bfb0 MOV EAX,dword ptr [RSP + 0x104] TEST EAX,EAX JNZ 0x00132cd2 JMP 0x00132cb6 LAB_00132cb6: JMP 0x00132cc7 LAB_00132cc7: MOV dword ptr [RSP + 0x104],0x0 LAB_00132cd2: LEA RDI,[RSP + 0x210] CALL 0x0010bfb0 MOV EAX,dword ptr [RSP + 0x104] TEST EAX,EAX JZ 0x00132cee JMP 0x00132cec LAB_00132cec: JMP 0x00132d1b LAB_00132cee: JMP 0x00132cff LAB_00132cff: JMP 0x00132d01 LAB_00132d01: LEA RDI,[RSP + 0x240] CALL 0x00133d50 JMP 0x0013272f LAB_00132d13: MOV byte ptr [RSP + 0x277],0x0 LAB_00132d1b: MOV AL,byte ptr [RSP + 0x277] AND AL,0x1 ADD RSP,0x278 RET
/* httplib::Server::handle_file_request(httplib::Request const&, httplib::Response&, bool) */ ulong __thiscall httplib::Server::handle_file_request(Server *this,Request *param_1,Response *param_2,bool param_3) { Response *pRVar1; bool bVar2; byte bVar3; int iVar4; int7 extraout_var; Request *pRVar5; string *psVar6; char *pcVar7; ulong uVar8; mmap *pmVar9; int8 uVar10; function<void(bool)> local_220 [32]; shared_ptr<httplib::detail::mmap> local_200 [16]; function<bool(unsigned_long,unsigned_long,httplib::DataSink&)> local_1f0 [32]; detail local_1d0 [32]; int8 local_1b0; __shared_ptr_access<httplib::detail::mmap,(__gnu_cxx::_Lock_policy)2,false,false> local_1a8 [16]; string *local_198; int8 local_190; int8 local_188; unordered_multimap<std::__cxx11::string,std::__cxx11::string,httplib::detail::case_ignore::hash,httplib::detail::case_ignore::equal_to,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *local_180; uint local_174; string local_170 [32]; FileStat local_150 [152]; string local_b8 [48]; string local_88 [32]; string local_68 [32]; long local_48; int8 local_40; int8 local_38; vector<httplib::Server::MountPointEntry,std::allocator<httplib::Server::MountPointEntry>> *local_30; byte local_21; Response *local_20; Request *local_18; Server *local_10; int1 local_1; local_30 = (vector<httplib::Server::MountPointEntry,std::allocator<httplib::Server::MountPointEntry>> *)(this + 0x80); local_21 = param_3; local_20 = param_2; local_18 = param_1; local_10 = this; local_38 = std:: vector<httplib::Server::MountPointEntry,std::allocator<httplib::Server::MountPointEntry>> ::begin(local_30); local_40 = std:: vector<httplib::Server::MountPointEntry,std::allocator<httplib::Server::MountPointEntry>> ::end(local_30); while( true ) { bVar2 = __gnu_cxx::operator!=((__normal_iterator *)&local_38,(__normal_iterator *)&local_40); uVar8 = CONCAT71(extraout_var,bVar2); if (!bVar2) break; local_48 = __gnu_cxx:: __normal_iterator<httplib::Server::MountPointEntry*,std::vector<httplib::Server::MountPointEntry,std::allocator<httplib::Server::MountPointEntry>>> ::operator*((__normal_iterator<httplib::Server::MountPointEntry*,std::vector<httplib::Server::MountPointEntry,std::allocator<httplib::Server::MountPointEntry>>> *)&local_38); pRVar5 = local_18 + 0x20; psVar6 = (string *)std::__cxx11::string::size(); iVar4 = std::__cxx11::string::compare((ulong)pRVar5,0,psVar6); if (iVar4 == 0) { pRVar5 = local_18 + 0x20; std::__cxx11::string::size(); std::__cxx11::string::substr((ulong)local_88,(ulong)pRVar5); /* try { // try from 001327e6 to 001327f9 has its CatchHandler @ 00132879 */ std::operator+((char *)local_68,(string *)0x1d354e); std::__cxx11::string::~string(local_88); /* try { // try from 00132809 to 00132849 has its CatchHandler @ 0013289f */ bVar3 = detail::is_valid_path(local_68); if ((bVar3 & 1) == 0) { LAB_00132cc7: local_174 = 0; } else { std::operator+(local_b8,(string *)(local_48 + 0x20)); pcVar7 = (char *)std::__cxx11::string::back(); if (*pcVar7 == '/') { /* try { // try from 00132861 to 00132930 has its CatchHandler @ 001328b8 */ std::__cxx11::string::operator+=(local_b8,"index.html"); } detail::FileStat::FileStat(local_150,local_b8); bVar3 = detail::FileStat::is_dir(local_150); pRVar1 = local_20; if ((bVar3 & 1) == 0) { /* try { // try from 00132997 to 00132a7d has its CatchHandler @ 001328b8 */ bVar3 = detail::FileStat::is_file(local_150); if ((bVar3 & 1) == 0) { local_174 = 0; } else { local_180 = (unordered_multimap<std::__cxx11::string,std::__cxx11::string,httplib::detail::case_ignore::hash,httplib::detail::case_ignore::equal_to,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)(local_48 + 0x40); local_188 = std:: unordered_multimap<std::__cxx11::string,std::__cxx11::string,httplib::detail::case_ignore::hash,httplib::detail::case_ignore::equal_to,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::begin(local_180); local_190 = std:: unordered_multimap<std::__cxx11::string,std::__cxx11::string,httplib::detail::case_ignore::hash,httplib::detail::case_ignore::equal_to,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::end(); while (uVar8 = std::__detail::operator!= ((_Node_iterator_base *)&local_188, (_Node_iterator_base *)&local_190), (uVar8 & 1) != 0) { local_198 = (string *) std::__detail:: _Node_const_iterator<std::pair<std::__cxx11::string_const,std::__cxx11::string>,false,true> ::operator*((_Node_const_iterator<std::pair<std::__cxx11::string_const,std::__cxx11::string>,false,true> *)&local_188); Response::set_header(local_20,local_198,local_198 + 0x20); std::__detail:: _Node_const_iterator<std::pair<std::__cxx11::string_const,std::__cxx11::string>,false,true> ::operator++((_Node_const_iterator<std::pair<std::__cxx11::string_const,std::__cxx11::string>,false,true> *)&local_188); } local_1b0 = std::__cxx11::string::c_str(); std::make_shared<httplib::detail::mmap,char_const*>((char **)local_1a8); pmVar9 = (mmap *)std:: __shared_ptr_access<httplib::detail::mmap,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->(local_1a8); /* try { // try from 00132a90 to 00132b29 has its CatchHandler @ 00132abd */ bVar3 = detail::mmap::is_open(pmVar9); pRVar1 = local_20; if ((bVar3 & 1) == 0) { local_1 = 0; } else { pmVar9 = (mmap *)std:: __shared_ptr_access<httplib::detail::mmap,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->(local_1a8); uVar10 = detail::mmap::size(pmVar9); detail::find_content_type (local_1d0,local_b8,(map *)(this + 0x98),(string *)(this + 200)); std::shared_ptr<httplib::detail::mmap>::shared_ptr(local_200,local_1a8); /* try { // try from 00132b48 to 00132b54 has its CatchHandler @ 00132c06 */ std::function<bool(unsigned_long,unsigned_long,httplib::DataSink&)>:: function<httplib::Server::handle_file_request(httplib::Request_const&,httplib::Response&,bool)::_lambda(unsigned_long,unsigned_long,httplib::DataSink&)_1_,void> (local_1f0, (_lambda_unsigned_long_unsigned_long_httplib__DataSink___1_ *)local_200); std::function<void(bool)>::function((_func_decltype_nullptr *)local_220); /* try { // try from 00132b77 to 00132b8b has its CatchHandler @ 00132c1c */ Response::set_content_provider(pRVar1,uVar10,local_1d0,local_1f0,local_220); std::function<void(bool)>::~function(local_220); std::function<bool(unsigned_long,unsigned_long,httplib::DataSink&)>::~function (local_1f0); handle_file_request(httplib::Request_const&,httplib::Response&,bool):: {lambda(unsigned_long,unsigned_long,httplib::DataSink&)#1}::~DataSink ((_lambda_unsigned_long_unsigned_long_httplib__DataSink___1_ *)local_200); std::__cxx11::string::~string((string *)local_1d0); if (((local_21 & 1) == 0) && (bVar2 = std::function::operator_cast_to_bool((function *)(this + 0xe8)), bVar2)) { /* try { // try from 00132bfd to 00132c01 has its CatchHandler @ 00132abd */ std::function<void(httplib::Request_const&,httplib::Response&)>::operator() ((function<void(httplib::Request_const&,httplib::Response&)> *) (this + 0xe8),local_18,local_20); } local_1 = 1; } local_174 = 1; std::shared_ptr<httplib::detail::mmap>::~shared_ptr ((shared_ptr<httplib::detail::mmap> *)local_1a8); } } else { std::operator+(local_170,(char *)local_68); /* try { // try from 00132933 to 00132949 has its CatchHandler @ 00132971 */ Response::set_redirect(pRVar1,local_170,0x12d); std::__cxx11::string::~string(local_170); local_1 = 1; local_174 = 1; } std::__cxx11::string::~string(local_b8); if (local_174 == 0) goto LAB_00132cc7; } std::__cxx11::string::~string(local_68); uVar8 = (ulong)local_174; if (local_174 != 0) goto LAB_00132d1b; } __gnu_cxx:: __normal_iterator<httplib::Server::MountPointEntry*,std::vector<httplib::Server::MountPointEntry,std::allocator<httplib::Server::MountPointEntry>>> ::operator++((__normal_iterator<httplib::Server::MountPointEntry*,std::vector<httplib::Server::MountPointEntry,std::allocator<httplib::Server::MountPointEntry>>> *)&local_38); } local_1 = 0; LAB_00132d1b: return CONCAT71((int7)(uVar8 >> 8),local_1) & 0xffffffffffffff01; }
13,254
LefDefParser::defiProp::setPropNameMapString(char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiProp.cpp
void defiProp::setPropNameMapString(const char* string) { int len; dataType_ = 'N'; hasNameMapString_ = 1; if ((len = strlen(string)+1) > stringLength_) bumpSize(len); strcpy(stringData_, defData->DEFCASE(string)); }
O0
cpp
LefDefParser::defiProp::setPropNameMapString(char const*): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x8(%rsp) movb $0x4e, 0x17(%rax) movb $0x1, 0x16(%rax) movq 0x18(%rsp), %rdi callq 0x70e0 movq 0x8(%rsp), %rcx addq $0x1, %rax movl %eax, 0x14(%rsp) cmpl 0x20(%rcx), %eax jle 0x49b7a movq 0x8(%rsp), %rdi movl 0x14(%rsp), %esi callq 0x49bb0 movq 0x8(%rsp), %rax movq 0x18(%rax), %rcx movq %rcx, (%rsp) movq 0x40(%rax), %rdi movq 0x18(%rsp), %rsi callq 0x27ed0 movq (%rsp), %rdi movq %rax, %rsi callq 0x7220 addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
_ZN12LefDefParser8defiProp20setPropNameMapStringEPKc: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov rax, [rsp+28h+var_8] mov [rsp+28h+var_20], rax mov byte ptr [rax+17h], 4Eh ; 'N' mov byte ptr [rax+16h], 1 mov rdi, [rsp+28h+var_10] call _strlen mov rcx, [rsp+28h+var_20] add rax, 1 mov [rsp+28h+var_14], eax cmp eax, [rcx+20h] jle short loc_49B7A mov rdi, [rsp+28h+var_20]; this mov esi, [rsp+28h+var_14]; int call _ZN12LefDefParser8defiProp8bumpSizeEi; LefDefParser::defiProp::bumpSize(int) loc_49B7A: mov rax, [rsp+28h+var_20] mov rcx, [rax+18h] mov [rsp+28h+var_28], rcx mov rdi, [rax+40h]; this mov rsi, [rsp+28h+var_10]; char * call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*) mov rdi, [rsp+28h+var_28] mov rsi, rax call _strcpy add rsp, 28h retn
long long LefDefParser::defiProp::setPropNameMapString(LefDefParser::defiProp *this, const char *a2) { const char *v2; // rax long long v3; // rdx long long v5; // [rsp+0h] [rbp-28h] int v6; // [rsp+14h] [rbp-14h] *((_BYTE *)this + 23) = 78; *((_BYTE *)this + 22) = 1; v6 = strlen(a2) + 1; if ( v6 > *((_DWORD *)this + 8) ) LefDefParser::defiProp::bumpSize(this, v6); v5 = *((_QWORD *)this + 3); v2 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 8), a2); return strcpy(v5, v2, v3); }
setPropNameMapString: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x8],RAX MOV byte ptr [RAX + 0x17],0x4e MOV byte ptr [RAX + 0x16],0x1 MOV RDI,qword ptr [RSP + 0x18] CALL 0x001070e0 MOV RCX,qword ptr [RSP + 0x8] ADD RAX,0x1 MOV dword ptr [RSP + 0x14],EAX CMP EAX,dword ptr [RCX + 0x20] JLE 0x00149b7a MOV RDI,qword ptr [RSP + 0x8] MOV ESI,dword ptr [RSP + 0x14] CALL 0x00149bb0 LAB_00149b7a: MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RAX + 0x18] MOV qword ptr [RSP],RCX MOV RDI,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RSP + 0x18] CALL 0x00127ed0 MOV RDI,qword ptr [RSP] MOV RSI,RAX CALL 0x00107220 ADD RSP,0x28 RET
/* LefDefParser::defiProp::setPropNameMapString(char const*) */ void __thiscall LefDefParser::defiProp::setPropNameMapString(defiProp *this,char *param_1) { char *__dest; int iVar1; size_t sVar2; char *__src; this[0x17] = (defiProp)0x4e; this[0x16] = (defiProp)0x1; sVar2 = strlen(param_1); iVar1 = (int)sVar2 + 1; if (*(int *)(this + 0x20) < iVar1) { bumpSize(this,iVar1); } __dest = *(char **)(this + 0x18); __src = (char *)defrData::DEFCASE(*(defrData **)(this + 0x40),param_1); strcpy(__dest,__src); return; }
13,255
collection_install_size
navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal_engine-src/src/tool/collection.c
struct clist* collection_install_size(struct collection * coll, const char *key, unsigned int keysize, unsigned int valuesize) { struct clist *np; unsigned hashval; if ((np = dict_lookup(coll, key, keysize)) == 0) { /* not found */ np = coll->key->alloc(coll, key, keysize, valuesize) ; if (np == 0) return 0; hashval = coll->key->hash(coll, key, keysize); np->next = coll->hashtab[hashval]; coll->hashtab[hashval] = np; coll->count++ ; } return np ; }
O3
c
collection_install_size: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %ecx, %r13d movl %edx, %r14d movq %rsi, %r15 movq %rdi, %rbx movq (%rdi), %rax callq *0x10(%rax) movl %eax, %eax leaq (%rbx,%rax,8), %r12 addq $0x18, %r12 movq (%r12), %r12 movq (%rbx), %rax movq %rbx, %rdi testq %r12, %r12 je 0xa638 movq %r12, %rsi movq %r15, %rdx movl %r14d, %ecx callq *0x18(%rax) testl %eax, %eax je 0xa617 jmp 0xa672 movq %r15, %rsi movl %r14d, %edx movl %r13d, %ecx callq *(%rax) testq %rax, %rax je 0xa66f movq %rax, %r12 movq (%rbx), %rax movq %rbx, %rdi movq %r15, %rsi movl %r14d, %edx callq *0x10(%rax) movl %eax, %eax movq 0x18(%rbx,%rax,8), %rcx movq %rcx, (%r12) movq %r12, 0x18(%rbx,%rax,8) incl 0xc(%rbx) jmp 0xa672 xorl %r12d, %r12d movq %r12, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
collection_install_size: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r13d, ecx mov r14d, edx mov r15, rsi mov rbx, rdi mov rax, [rdi] call qword ptr [rax+10h] mov eax, eax lea r12, [rbx+rax*8] add r12, 18h loc_A617: mov r12, [r12] mov rax, [rbx] mov rdi, rbx test r12, r12 jz short loc_A638 mov rsi, r12 mov rdx, r15 mov ecx, r14d call qword ptr [rax+18h] test eax, eax jz short loc_A617 jmp short loc_A672 loc_A638: mov rsi, r15 mov edx, r14d mov ecx, r13d call qword ptr [rax] test rax, rax jz short loc_A66F mov r12, rax mov rax, [rbx] mov rdi, rbx mov rsi, r15 mov edx, r14d call qword ptr [rax+10h] mov eax, eax mov rcx, [rbx+rax*8+18h] mov [r12], rcx mov [rbx+rax*8+18h], r12 inc dword ptr [rbx+0Ch] jmp short loc_A672 loc_A66F: xor r12d, r12d loc_A672: mov rax, r12 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_QWORD * collection_install_size(_DWORD *a1, long long a2, unsigned int a3, unsigned int a4) { _QWORD *v6; // r12 long long v7; // rax long long v8; // rax int v9; // eax v6 = &a1[2 * (*(unsigned int ( **)(_DWORD *))(*(_QWORD *)a1 + 16LL))(a1) + 6]; while ( 1 ) { v6 = (_QWORD *)*v6; v7 = *(_QWORD *)a1; if ( !v6 ) break; if ( (*(unsigned int ( **)(_DWORD *, _QWORD *, long long, _QWORD))(v7 + 24))(a1, v6, a2, a3) ) return v6; } v8 = (*(long long ( **)(_DWORD *, long long, _QWORD, _QWORD))v7)(a1, a2, a3, a4); if ( !v8 ) return 0LL; v6 = (_QWORD *)v8; v9 = (*(long long ( **)(_DWORD *, long long, _QWORD))(*(_QWORD *)a1 + 16LL))(a1, a2, a3); *v6 = *(_QWORD *)&a1[2 * v9 + 6]; *(_QWORD *)&a1[2 * v9 + 6] = v6; ++a1[3]; return v6; }
collection_install_size: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R13D,ECX MOV R14D,EDX MOV R15,RSI MOV RBX,RDI MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x10] MOV EAX,EAX LEA R12,[RBX + RAX*0x8] ADD R12,0x18 LAB_0010a617: MOV R12,qword ptr [R12] MOV RAX,qword ptr [RBX] MOV RDI,RBX TEST R12,R12 JZ 0x0010a638 MOV RSI,R12 MOV RDX,R15 MOV ECX,R14D CALL qword ptr [RAX + 0x18] TEST EAX,EAX JZ 0x0010a617 JMP 0x0010a672 LAB_0010a638: MOV RSI,R15 MOV EDX,R14D MOV ECX,R13D CALL qword ptr [RAX] TEST RAX,RAX JZ 0x0010a66f MOV R12,RAX MOV RAX,qword ptr [RBX] MOV RDI,RBX MOV RSI,R15 MOV EDX,R14D CALL qword ptr [RAX + 0x10] MOV EAX,EAX MOV RCX,qword ptr [RBX + RAX*0x8 + 0x18] MOV qword ptr [R12],RCX MOV qword ptr [RBX + RAX*0x8 + 0x18],R12 INC dword ptr [RBX + 0xc] JMP 0x0010a672 LAB_0010a66f: XOR R12D,R12D LAB_0010a672: MOV RAX,R12 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long * collection_install_size (long *param_1,int8 param_2,int4 param_3,int4 param_4) { uint uVar1; int iVar2; long *plVar3; uVar1 = (**(code **)(*param_1 + 0x10))(); plVar3 = param_1 + (ulong)uVar1 + 3; do { plVar3 = (long *)*plVar3; if (plVar3 == (long *)0x0) { plVar3 = (long *)(**(code **)*param_1)(param_1,param_2,param_3,param_4); if (plVar3 != (long *)0x0) { uVar1 = (**(code **)(*param_1 + 0x10))(param_1,param_2,param_3); *plVar3 = param_1[(ulong)uVar1 + 3]; param_1[(ulong)uVar1 + 3] = (long)plVar3; *(int *)((long)param_1 + 0xc) = *(int *)((long)param_1 + 0xc) + 1; return plVar3; } return (long *)0x0; } iVar2 = (*(code *)((int8 *)*param_1)[3])(param_1,plVar3,param_2,param_3); } while (iVar2 == 0); return plVar3; }
13,256
translog_write_data_on_page
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_write_data_on_page(TRANSLOG_ADDRESS *horizon, struct st_buffer_cursor *cursor, translog_size_t length, uchar *buffer) { DBUG_ENTER("translog_write_data_on_page"); DBUG_PRINT("enter", ("Chunk length: %lu Page size %u", (ulong) length, (uint) cursor->current_page_fill)); DBUG_ASSERT(length > 0); DBUG_ASSERT(length + cursor->current_page_fill <= TRANSLOG_PAGE_SIZE); DBUG_ASSERT(length + cursor->ptr <= cursor->buffer->buffer + TRANSLOG_WRITE_BUFFER); memcpy(cursor->ptr, buffer, length); cursor->ptr+= length; (*horizon)+= length; /* adds offset */ cursor->current_page_fill+= length; if (!cursor->chaser) cursor->buffer->size+= length; DBUG_PRINT("info", ("Write data buffer #%u: %p " "chaser: %d Size: %lu (%lu)", (uint) cursor->buffer->buffer_no, cursor->buffer, cursor->chaser, (ulong) cursor->buffer->size, (ulong) (cursor->ptr - cursor->buffer->buffer))); translog_check_cursor(cursor); DBUG_RETURN(0); }
O0
c
translog_write_data_on_page: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) jmp 0x38369 jmp 0x3836b jmp 0x3836d jmp 0x3836f jmp 0x38371 jmp 0x38373 jmp 0x38375 movq -0x10(%rbp), %rax movq 0x20(%rax), %rdi movq -0x20(%rbp), %rsi movl -0x14(%rbp), %eax movl %eax, %edx callq 0x2a0b0 movl -0x14(%rbp), %edx movq -0x10(%rbp), %rax movq 0x20(%rax), %rcx movl %edx, %edx addq %rdx, %rcx movq %rcx, 0x20(%rax) movl -0x14(%rbp), %eax movl %eax, %ecx movq -0x8(%rbp), %rax addq (%rax), %rcx movq %rcx, (%rax) movl -0x14(%rbp), %edx movq -0x10(%rbp), %rax movzwl 0x30(%rax), %ecx addl %edx, %ecx movw %cx, 0x30(%rax) movq -0x10(%rbp), %rax cmpb $0x0, 0x37(%rax) jne 0x383e0 movl -0x14(%rbp), %ecx movq -0x10(%rbp), %rax movq 0x28(%rax), %rax addl 0x100030(%rax), %ecx movl %ecx, 0x100030(%rax) jmp 0x383e2 jmp 0x383e4 movq -0x10(%rbp), %rdi callq 0x2ecb0 jmp 0x383ef xorl %eax, %eax addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
translog_write_data_on_page: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_20], rcx jmp short $+2 loc_38369: jmp short $+2 loc_3836B: jmp short $+2 loc_3836D: jmp short $+2 loc_3836F: jmp short $+2 loc_38371: jmp short $+2 loc_38373: jmp short $+2 loc_38375: mov rax, [rbp+var_10] mov rdi, [rax+20h] mov rsi, [rbp+var_20] mov eax, [rbp+var_14] mov edx, eax call _memcpy mov edx, [rbp+var_14] mov rax, [rbp+var_10] mov rcx, [rax+20h] mov edx, edx add rcx, rdx mov [rax+20h], rcx mov eax, [rbp+var_14] mov ecx, eax mov rax, [rbp+var_8] add rcx, [rax] mov [rax], rcx mov edx, [rbp+var_14] mov rax, [rbp+var_10] movzx ecx, word ptr [rax+30h] add ecx, edx mov [rax+30h], cx mov rax, [rbp+var_10] cmp byte ptr [rax+37h], 0 jnz short loc_383E0 mov ecx, [rbp+var_14] mov rax, [rbp+var_10] mov rax, [rax+28h] add ecx, dword ptr ds:my_rw_destroy[rax] mov dword ptr ds:my_rw_destroy[rax], ecx loc_383E0: jmp short $+2 loc_383E2: jmp short $+2 loc_383E4: mov rdi, [rbp+var_10] call translog_check_cursor jmp short $+2 loc_383EF: xor eax, eax add rsp, 20h pop rbp retn
long long translog_write_data_on_page(_QWORD *a1, long long a2, unsigned int a3, long long a4) { memcpy(*(_QWORD *)(a2 + 32), a4, a3); *(_QWORD *)(a2 + 32) += a3; *a1 += a3; *(_WORD *)(a2 + 48) += a3; if ( !*(_BYTE *)(a2 + 55) ) *(_DWORD *)((char *)my_rw_destroy + *(_QWORD *)(a2 + 40)) += a3; translog_check_cursor(); return 0LL; }
translog_write_data_on_page: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV qword ptr [RBP + -0x20],RCX JMP 0x00138369 LAB_00138369: JMP 0x0013836b LAB_0013836b: JMP 0x0013836d LAB_0013836d: JMP 0x0013836f LAB_0013836f: JMP 0x00138371 LAB_00138371: JMP 0x00138373 LAB_00138373: JMP 0x00138375 LAB_00138375: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x20] MOV RSI,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x14] MOV EDX,EAX CALL 0x0012a0b0 MOV EDX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x20] MOV EDX,EDX ADD RCX,RDX MOV qword ptr [RAX + 0x20],RCX MOV EAX,dword ptr [RBP + -0x14] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] ADD RCX,qword ptr [RAX] MOV qword ptr [RAX],RCX MOV EDX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RAX + 0x30] ADD ECX,EDX MOV word ptr [RAX + 0x30],CX MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x37],0x0 JNZ 0x001383e0 MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x28] ADD ECX,dword ptr [RAX + 0x100030] MOV dword ptr [RAX + 0x100030],ECX LAB_001383e0: JMP 0x001383e2 LAB_001383e2: JMP 0x001383e4 LAB_001383e4: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012ecb0 JMP 0x001383ef LAB_001383ef: XOR EAX,EAX ADD RSP,0x20 POP RBP RET
int8 translog_write_data_on_page(long *param_1,long param_2,uint param_3,void *param_4) { memcpy(*(void **)(param_2 + 0x20),param_4,(ulong)param_3); *(ulong *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + (ulong)param_3; *param_1 = (ulong)param_3 + *param_1; *(short *)(param_2 + 0x30) = *(short *)(param_2 + 0x30) + (short)param_3; if (*(char *)(param_2 + 0x37) == '\0') { *(uint *)(Elf64_Ehdr_00100000.e_ident_pad + *(long *)(param_2 + 0x28) + 0x27) = param_3 + *(int *)(Elf64_Ehdr_00100000.e_ident_pad + *(long *)(param_2 + 0x28) + 0x27); } translog_check_cursor(param_2); return 0; }
13,257
unifex::_then::_sender<unifex::_amre::_sender, unifex::_async_scope::async_scope::await_and_sync()::'lambda'()>::type& unifex::activate_union_member_with<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type, unifex::_async_scope::async_scope::complete()::'lambda'()>::type&&, unifex::_then::_sender<unifex::_amre::_sender, unifex::_async_scope::async_scope::await_and_sync()::'lambda'()>::type, unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type, unifex::_async_scope::async_scope::complete()::'lambda'()>::type>::type, unifex::_seq::_op<unifex::_then::_sender<unifex::_just::_sender<>::type, unifex::_async_scope::async_scope::complete()::'lambda'()>::type&&, unifex::_then::_sender<unifex::_amre::_sender, unifex::_async_scope::async_scope::await_and_sync()::'lambda'()>::type, unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type::type<unifex::_then::_sender<unifex::_amre::_sender, unifex::_async_scope::async_scope::await_and_sync()::'lambda'()>::type, unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>(unifex::_then::_sender<unifex::_just::_sender<>::type, unifex::_async_scope::async_scope::complete()::'lambda'()>::type&&, unifex::_then::_sender<unifex::_amre::_sender, unifex::_async_scope::async_scope::await_and_sync()::'lambda'()>::type&&, unifex::_sync_wait::_receiver<unifex::_unit::unit>::type&&)::'lambda'()>(unifex::manual_lifetime<unifex::_then::_sender<unifex::_amre::_sender, unifex::_async_scope::async_scope::await_and_sync()::'lambda'()>::type>&, unifex::_sync_wait::_receiver<unifex::_unit::unit>::type&&)
aimrt_mujoco_sim/_deps/libunifex-src/include/unifex/manual_lifetime.hpp
[[maybe_unused]] // T& activate_union_member_with(manual_lifetime<T>& box, Func&& func) noexcept( is_nothrow_callable_v<Func>) { auto* p = ::new (&box) manual_lifetime<T>{}; scope_guard guard = [=]() noexcept { p->~manual_lifetime(); }; auto& t = p->construct_with(static_cast<Func&&>(func)); guard.release(); return t; }
O0
cpp
unifex::_then::_sender<unifex::_amre::_sender, unifex::_async_scope::async_scope::await_and_sync()::'lambda'()>::type& unifex::activate_union_member_with<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type, unifex::_async_scope::async_scope::complete()::'lambda'()>::type&&, unifex::_then::_sender<unifex::_amre::_sender, unifex::_async_scope::async_scope::await_and_sync()::'lambda'()>::type, unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type, unifex::_async_scope::async_scope::complete()::'lambda'()>::type>::type, unifex::_seq::_op<unifex::_then::_sender<unifex::_just::_sender<>::type, unifex::_async_scope::async_scope::complete()::'lambda'()>::type&&, unifex::_then::_sender<unifex::_amre::_sender, unifex::_async_scope::async_scope::await_and_sync()::'lambda'()>::type, unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type::type<unifex::_then::_sender<unifex::_amre::_sender, unifex::_async_scope::async_scope::await_and_sync()::'lambda'()>::type, unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>(unifex::_then::_sender<unifex::_just::_sender<>::type, unifex::_async_scope::async_scope::complete()::'lambda'()>::type&&, unifex::_then::_sender<unifex::_amre::_sender, unifex::_async_scope::async_scope::await_and_sync()::'lambda'()>::type&&, unifex::_sync_wait::_receiver<unifex::_unit::unit>::type&&)::'lambda'()>(unifex::manual_lifetime<unifex::_then::_sender<unifex::_amre::_sender, unifex::_async_scope::async_scope::await_and_sync()::'lambda'()>::type>&, unifex::_sync_wait::_receiver<unifex::_unit::unit>::type&&): subq $0x68, %rsp movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movq 0x60(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0xf4130 movq 0x10(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x38(%rsp) leaq 0x40(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0xf4140 movq 0x50(%rsp), %rdi movq 0x58(%rsp), %rsi callq 0xf4160 movq %rax, 0x18(%rsp) jmp 0xf40d6 movq 0x18(%rsp), %rax movq %rax, 0x30(%rsp) leaq 0x40(%rsp), %rdi callq 0xf4190 movq 0x30(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x40(%rsp), %rdi callq 0xf41a0 movq 0x8(%rsp), %rax addq $0x68, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) leaq 0x40(%rsp), %rdi callq 0xf41a0 movq 0x28(%rsp), %rdi callq 0x90db0 nopw (%rax,%rax)
_ZN6unifex26activate_union_member_withINS_5_just3_opINS_5_then9_receiverINS_4_seq21_predecessor_receiverIONS3_7_senderINS1_7_senderIJEE4typeEZNS_12_async_scope11async_scope8completeEvEUlvE_E4typeENS7_INS_5_amre7_senderEZNSC_14await_and_syncEvEUlvE_E4typeENS_10_sync_wait9_receiverINS_5_unit4unitEE4typeEE4typeESD_E4typeEJEE4typeEZNS5_3_opISG_SL_SR_E4typeC1ISL_SR_EESG_OT_OT0_EUlvE_EERS12_RNS_15manual_lifetimeIS12_EES15_: sub rsp, 68h mov [rsp+68h+var_8], rdi mov [rsp+68h+var_10], rsi mov rdi, [rsp+68h+var_8] mov [rsp+68h+var_58], rdi call _ZN6unifex15manual_lifetimeINS_5_just3_opINS_5_then9_receiverINS_4_seq21_predecessor_receiverIONS3_7_senderINS1_7_senderIJEE4typeEZNS_12_async_scope11async_scope8completeEvEUlvE_E4typeENS7_INS_5_amre7_senderEZNSC_14await_and_syncEvEUlvE_E4typeENS_10_sync_wait9_receiverINS_5_unit4unitEE4typeEE4typeESD_E4typeEJEE4typeEEC2Ev; unifex::manual_lifetime<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type>::type>::manual_lifetime(void) mov rax, [rsp+68h+var_58] mov [rsp+68h+var_18], rax mov rax, [rsp+68h+var_18] mov [rsp+68h+var_30], rax lea rdi, [rsp+68h+var_28] lea rsi, [rsp+68h+var_30] call _ZN6unifex11scope_guardIZNS_26activate_union_member_withINS_5_just3_opINS_5_then9_receiverINS_4_seq21_predecessor_receiverIONS4_7_senderINS2_7_senderIJEE4typeEZNS_12_async_scope11async_scope8completeEvEUlvE_E4typeENS8_INS_5_amre7_senderEZNSD_14await_and_syncEvEUlvE_E4typeENS_10_sync_wait9_receiverINS_5_unit4unitEE4typeEE4typeESE_E4typeEJEE4typeEZNS6_3_opISH_SM_SS_E4typeC1ISM_SS_EESH_OT_OT0_EUlvE_EERS13_RNS_15manual_lifetimeIS13_EES16_EUlvE_EC2EOS1C_; unifex::scope_guard<unifex::activate_union_member_with<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type>::type,unifex::_seq::_op<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type::type<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>(unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type &&,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type &&)::{lambda(void)#1}>(unifex::manual_lifetime<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type> &,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type)::{lambda(void)#1}>::scope_guard(unifex::manual_lifetime<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type>&&) mov rdi, [rsp+68h+var_18] mov rsi, [rsp+68h+var_10] call _ZN6unifex15manual_lifetimeINS_5_just3_opINS_5_then9_receiverINS_4_seq21_predecessor_receiverIONS3_7_senderINS1_7_senderIJEE4typeEZNS_12_async_scope11async_scope8completeEvEUlvE_E4typeENS7_INS_5_amre7_senderEZNSC_14await_and_syncEvEUlvE_E4typeENS_10_sync_wait9_receiverINS_5_unit4unitEE4typeEE4typeESD_E4typeEJEE4typeEE14construct_withIZNS5_3_opISG_SL_SR_E4typeC1ISL_SR_EESG_OT_OT0_EUlvE_EERSX_S15_; unifex::manual_lifetime<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type>::type>::construct_with<unifex::_seq::_op<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type::type<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>(unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type &&,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type &&)::{lambda(void)#1}>(unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type &) mov [rsp+68h+var_50], rax jmp short $+2 loc_F40D6: mov rax, [rsp+68h+var_50] mov [rsp+68h+var_38], rax lea rdi, [rsp+68h+var_28] call _ZN6unifex11scope_guardIZNS_26activate_union_member_withINS_5_just3_opINS_5_then9_receiverINS_4_seq21_predecessor_receiverIONS4_7_senderINS2_7_senderIJEE4typeEZNS_12_async_scope11async_scope8completeEvEUlvE_E4typeENS8_INS_5_amre7_senderEZNSD_14await_and_syncEvEUlvE_E4typeENS_10_sync_wait9_receiverINS_5_unit4unitEE4typeEE4typeESE_E4typeEJEE4typeEZNS6_3_opISH_SM_SS_E4typeC1ISM_SS_EESH_OT_OT0_EUlvE_EERS13_RNS_15manual_lifetimeIS13_EES16_EUlvE_E7releaseEv; unifex::scope_guard<unifex::activate_union_member_with<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type>::type,unifex::_seq::_op<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type::type<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>(unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type &&,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type &&)::{lambda(void)#1}>(unifex::manual_lifetime<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type> &,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type)::{lambda(void)#1}>::release(void) mov rax, [rsp+68h+var_38] mov [rsp+68h+var_60], rax lea rdi, [rsp+68h+var_28] call _ZN6unifex11scope_guardIZNS_26activate_union_member_withINS_5_just3_opINS_5_then9_receiverINS_4_seq21_predecessor_receiverIONS4_7_senderINS2_7_senderIJEE4typeEZNS_12_async_scope11async_scope8completeEvEUlvE_E4typeENS8_INS_5_amre7_senderEZNSD_14await_and_syncEvEUlvE_E4typeENS_10_sync_wait9_receiverINS_5_unit4unitEE4typeEE4typeESE_E4typeEJEE4typeEZNS6_3_opISH_SM_SS_E4typeC1ISM_SS_EESH_OT_OT0_EUlvE_EERS13_RNS_15manual_lifetimeIS13_EES16_EUlvE_ED2Ev; unifex::scope_guard<unifex::activate_union_member_with<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type>::type,unifex::_seq::_op<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type::type<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>(unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type &&,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type &&)::{lambda(void)#1}>(unifex::manual_lifetime<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type> &,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type)::{lambda(void)#1}>::~scope_guard() mov rax, [rsp+68h+var_60] add rsp, 68h retn mov rcx, rax mov eax, edx mov [rsp+arg_20], rcx mov [rsp+arg_1C], eax lea rdi, [rsp+arg_38] call _ZN6unifex11scope_guardIZNS_26activate_union_member_withINS_5_just3_opINS_5_then9_receiverINS_4_seq21_predecessor_receiverIONS4_7_senderINS2_7_senderIJEE4typeEZNS_12_async_scope11async_scope8completeEvEUlvE_E4typeENS8_INS_5_amre7_senderEZNSD_14await_and_syncEvEUlvE_E4typeENS_10_sync_wait9_receiverINS_5_unit4unitEE4typeEE4typeESE_E4typeEJEE4typeEZNS6_3_opISH_SM_SS_E4typeC1ISM_SS_EESH_OT_OT0_EUlvE_EERS13_RNS_15manual_lifetimeIS13_EES16_EUlvE_ED2Ev; unifex::scope_guard<unifex::activate_union_member_with<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type>::type,unifex::_seq::_op<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type::type<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>(unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type &&,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type &&)::{lambda(void)#1}>(unifex::manual_lifetime<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type> &,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type)::{lambda(void)#1}>::~scope_guard() mov rdi, [rsp+arg_20] call __Unwind_Resume
long long unifex::activate_union_member_with<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type>::type,unifex::_seq::_op<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type::type<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>(unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type &&,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type &&)::{lambda(void)#1}>( long long a1, long long a2) { long long v3; // [rsp+30h] [rbp-38h] long long v4; // [rsp+38h] [rbp-30h] BYREF _BYTE v5[16]; // [rsp+40h] [rbp-28h] BYREF long long v6; // [rsp+50h] [rbp-18h] long long v7; // [rsp+58h] [rbp-10h] long long v8; // [rsp+60h] [rbp-8h] v8 = a1; v7 = a2; unifex::manual_lifetime<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type>::type>::manual_lifetime(); v6 = a1; v4 = a1; unifex::scope_guard<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type& unifex::activate_union_member_with<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type>::type,unifex::_seq::_op<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type::type<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>(unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type &&,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type &&)::{lambda(void)#1}>(unifex::manual_lifetime<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type> &,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type)::{lambda(void)#1}>::scope_guard( v5, &v4); v3 = unifex::manual_lifetime<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type>::type>::construct_with<unifex::_seq::_op<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type::type<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>(unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type &&,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type &&)::{lambda(void)#1}>( v6, v7); unifex::scope_guard<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type& unifex::activate_union_member_with<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type>::type,unifex::_seq::_op<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type::type<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>(unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type &&,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type &&)::{lambda(void)#1}>(unifex::manual_lifetime<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type> &,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type)::{lambda(void)#1}>::release(v5); unifex::scope_guard<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type& unifex::activate_union_member_with<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type>::type,unifex::_seq::_op<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type::type<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>(unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete(void)::{lambda(void)#1}>::type &,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type &&,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type &&)::{lambda(void)#1}>(unifex::manual_lifetime<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync(void)::{lambda(void)#1}>::type> &,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type)::{lambda(void)#1}>::~scope_guard(v5); return v3; }
activate_union_member_with<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type>::type,unifex::_seq::_op<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type::type<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>(unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&,unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type>::type&&,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type&&)::{lambda()#1}>: SUB RSP,0x68 MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI MOV RDI,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x10],RDI CALL 0x001f4130 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x38],RAX LEA RDI,[RSP + 0x40] LEA RSI,[RSP + 0x38] CALL 0x001f4140 MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x58] LAB_001f40ca: CALL 0x001f4160 LAB_001f40cf: MOV qword ptr [RSP + 0x18],RAX JMP 0x001f40d6 LAB_001f40d6: MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x30],RAX LEA RDI,[RSP + 0x40] CALL 0x001f4190 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0x40] CALL 0x001f41a0 MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x68 RET
/* unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type, unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&, unifex::_then::_sender<unifex::_amre::_sender, unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type, unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type, unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type>::type& unifex::activate_union_member_with<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type, unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&, unifex::_then::_sender<unifex::_amre::_sender, unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type, unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type, unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type>::type, unifex::_seq::_op<unifex::_then::_sender<unifex::_just::_sender<>::type, unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&, unifex::_then::_sender<unifex::_amre::_sender, unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type, unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type::type<unifex::_then::_sender<unifex::_amre::_sender, unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type, unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>(unifex::_then::_sender<unifex::_just::_sender<>::type, unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&, unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type, unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&, unifex::_then::_sender<unifex::_amre::_sender, unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type, unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type, unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type>::type&&, unifex::_sync_wait::_receiver<unifex::_unit::unit>::type&&)::{lambda()#1}>(unifex::manual_lifetime<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type, unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&, unifex::_then::_sender<unifex::_amre::_sender, unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type, unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type, unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type>::type>&, unifex::_sync_wait::_receiver<unifex::_unit::unit>::type&&) */ type * unifex:: activate_union_member_with<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::_lambda()_1_>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::_lambda()_1_>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete()::_lambda()_1_>::type>::type,unifex::_seq::_op<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::_lambda()_1_>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::_lambda()_1_>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type::type<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::_lambda()_1_>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>(unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::_lambda()_1_>::type&&,unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::_lambda()_1_>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::_lambda()_1_>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete()::_lambda()_1_>::type>::type&&,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type&&)::_lambda()_1_> (manual_lifetime *param_1,type *param_2) { type *ptVar1; manual_lifetime *local_30; scope_guard<unifex::activate_union_member_with<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::_lambda()_1_>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::_lambda()_1_>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete()::_lambda()_1_>::type>::type,unifex::_seq::_op<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::_lambda()_1_>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::_lambda()_1_>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type::type<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::_lambda()_1_>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>(unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::_lambda()_1_>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::_lambda()_1_>::type&&,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type&&)::_lambda()_1_>(unifex::manual_lifetime<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::_lambda()_1_>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::_lambda()_1_>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete()::_lambda()_1_>::type>::type>&,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type&&)::_lambda()_1_> local_28 [16]; type *local_18; type *local_10; manual_lifetime *local_8; local_10 = param_2; local_8 = param_1; manual_lifetime<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type>::type> ::manual_lifetime(); local_30 = param_1; local_18 = (type *)param_1; scope_guard<unifex::activate_union_member_with<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type>::type,unifex::_seq::_op<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type::type<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>(unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type&&,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type&&)::{lambda()#1}>(unifex::manual_lifetime<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type>::type>&,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type&&)::{lambda()#1}> ::scope_guard(local_28,(_lambda___1_ *)&local_30); /* try { // try from 001f40ca to 001f40ce has its CatchHandler @ 001f4108 */ ptVar1 = manual_lifetime<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type>::type> :: construct_with<unifex::_seq::_op<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::_lambda()_1_>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::_lambda()_1_>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type::type<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::_lambda()_1_>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>(unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::_lambda()_1_>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::_lambda()_1_>::type&&,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type&&)::_lambda()_1_> (local_18); scope_guard<unifex::activate_union_member_with<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type>::type,unifex::_seq::_op<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type::type<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>(unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type&&,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type&&)::{lambda()#1}>(unifex::manual_lifetime<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type>::type>&,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type&&)::{lambda()#1}> ::release(local_28); scope_guard<unifex::activate_union_member_with<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type>::type,unifex::_seq::_op<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type::type<unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>(unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type&&,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type&&)::{lambda()#1}>(unifex::manual_lifetime<unifex::_just::_op<unifex::_then::_receiver<unifex::_seq::_predecessor_receiver<unifex::_then::_sender<unifex::_just::_sender<>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type&&,unifex::_then::_sender<unifex::_amre::_sender,unifex::_async_scope::async_scope::await_and_sync()::{lambda()#1}>::type,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type>::type,unifex::_async_scope::async_scope::complete()::{lambda()#1}>::type>::type>&,unifex::_sync_wait::_receiver<unifex::_unit::unit>::type&&)::{lambda()#1}> ::~scope_guard(local_28); return ptVar1; }
13,258
translog_lock
eloqsql/storage/maria/ma_loghandler.c
void translog_lock() { uint8 current_buffer; DBUG_ENTER("translog_lock"); /* Locking the loghandler mean locking current buffer, but it can change during locking, so we should check it */ for (;;) { /* log_descriptor.bc.buffer_no is only one byte so its reading is an atomic operation */ current_buffer= log_descriptor.bc.buffer_no; translog_buffer_lock(log_descriptor.buffers + current_buffer); if (log_descriptor.bc.buffer_no == current_buffer) break; translog_buffer_unlock(log_descriptor.buffers + current_buffer); } DBUG_VOID_RETURN; }
O0
c
translog_lock: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movb 0xc54648(%rip), %al # 0xc80a16 movb %al, -0x1(%rbp) movzbl -0x1(%rbp), %eax cltq leaq 0x4539b2(%rip), %rdi # 0x47fd90 addq $0x2f8, %rdi # imm = 0x2F8 imulq $0x100120, %rax, %rax # imm = 0x100120 addq %rax, %rdi callq 0x2c440 movzbl 0xc5461b(%rip), %eax # 0xc80a16 movzbl -0x1(%rbp), %ecx cmpl %ecx, %eax jne 0x2c405 jmp 0x2c42a movzbl -0x1(%rbp), %eax cltq leaq 0x45397e(%rip), %rdi # 0x47fd90 addq $0x2f8, %rdi # imm = 0x2F8 imulq $0x100120, %rax, %rax # imm = 0x100120 addq %rax, %rdi callq 0x2c480 jmp 0x2c3c8 jmp 0x2c42c jmp 0x2c42e addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
translog_lock: push rbp mov rbp, rsp sub rsp, 10h loc_2C3C8: mov al, cs:byte_C80A16 mov [rbp+var_1], al movzx eax, [rbp+var_1] cdqe lea rdi, log_descriptor add rdi, 2F8h imul rax, 100120h add rdi, rax call translog_buffer_lock movzx eax, cs:byte_C80A16 movzx ecx, [rbp+var_1] cmp eax, ecx jnz short loc_2C405 jmp short loc_2C42A loc_2C405: movzx eax, [rbp+var_1] cdqe lea rdi, log_descriptor add rdi, 2F8h imul rax, 100120h add rdi, rax call translog_buffer_unlock jmp short loc_2C3C8 loc_2C42A: jmp short $+2 loc_2C42C: jmp short $+2 loc_2C42E: add rsp, 10h pop rbp retn
long long translog_lock() { long long result; // rax unsigned __int8 v1; // [rsp+Fh] [rbp-1h] while ( 1 ) { v1 = byte_C80A16; translog_buffer_lock(&log_descriptor[131108 * (unsigned __int8)byte_C80A16 + 95]); result = (unsigned __int8)byte_C80A16; if ( (unsigned __int8)byte_C80A16 == v1 ) break; translog_buffer_unlock(&log_descriptor[131108 * v1 + 95]); } return result; }
translog_lock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 LAB_0012c3c8: MOV AL,byte ptr [0x00d80a16] MOV byte ptr [RBP + -0x1],AL MOVZX EAX,byte ptr [RBP + -0x1] CDQE LEA RDI,[0x57fd90] ADD RDI,0x2f8 IMUL RAX,RAX,0x100120 ADD RDI,RAX CALL 0x0012c440 MOVZX EAX,byte ptr [0x00d80a16] MOVZX ECX,byte ptr [RBP + -0x1] CMP EAX,ECX JNZ 0x0012c405 JMP 0x0012c42a LAB_0012c405: MOVZX EAX,byte ptr [RBP + -0x1] CDQE LEA RDI,[0x57fd90] ADD RDI,0x2f8 IMUL RAX,RAX,0x100120 ADD RDI,RAX CALL 0x0012c480 JMP 0x0012c3c8 LAB_0012c42a: JMP 0x0012c42c LAB_0012c42c: JMP 0x0012c42e LAB_0012c42e: ADD RSP,0x10 POP RBP RET
void translog_lock(void) { byte bVar1; while( true ) { bVar1 = DAT_00d80a16; translog_buffer_lock(&DAT_00580088 + (long)(int)(uint)DAT_00d80a16 * 0x100120); if (DAT_00d80a16 == bVar1) break; translog_buffer_unlock(&DAT_00580088 + (long)(int)(uint)bVar1 * 0x100120); } return; }
13,259
ma_read_dynamic_record
eloqsql/storage/maria/ma_dynrec.c
int _ma_read_dynamic_record(MARIA_HA *info, uchar *buf, MARIA_RECORD_POS filepos) { int block_of_record; uint b_type; MARIA_BLOCK_INFO block_info; File file; uchar *UNINIT_VAR(to); uint UNINIT_VAR(left_length); MARIA_SHARE *share= info->s; myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0); DBUG_ENTER("_ma_read_dynamic_record"); if (filepos == HA_OFFSET_ERROR) goto err; file= info->dfile.file; block_of_record= 0; /* First block of record is numbered as zero. */ block_info.second_read= 0; do { /* A corrupted table can have wrong pointers. (Bug# 19835) */ if (filepos == HA_OFFSET_ERROR) goto panic; if (info->opt_flag & WRITE_CACHE_USED && (info->rec_cache.pos_in_file < filepos + MARIA_BLOCK_INFO_HEADER_LENGTH) && flush_io_cache(&info->rec_cache)) goto err; info->rec_cache.seek_not_done=1; if ((b_type= _ma_get_block_info(info, &block_info, file, filepos)) & (BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR | BLOCK_FATAL_ERROR)) { if (b_type & (BLOCK_SYNC_ERROR | BLOCK_DELETED)) my_errno=HA_ERR_RECORD_DELETED; goto err; } if (block_of_record++ == 0) /* First block */ { info->cur_row.total_length= block_info.rec_len; if (block_info.rec_len > (uint) share->base.max_pack_length) goto panic; if (share->base.blobs) { if (_ma_alloc_buffer(&info->rec_buff, &info->rec_buff_size, block_info.rec_len + share->base.extra_rec_buff_size, flag)) goto err; } to= info->rec_buff; left_length=block_info.rec_len; } if (left_length < block_info.data_len || ! block_info.data_len) goto panic; /* Wrong linked record */ /* copy information that is already read */ { uint offset= (uint) (block_info.filepos - filepos); uint prefetch_len= (sizeof(block_info.header) - offset); filepos+= sizeof(block_info.header); if (prefetch_len > block_info.data_len) prefetch_len= block_info.data_len; if (prefetch_len) { memcpy(to, block_info.header + offset, prefetch_len); block_info.data_len-= prefetch_len; left_length-= prefetch_len; to+= prefetch_len; } } /* read rest of record from file */ if (block_info.data_len) { if (info->opt_flag & WRITE_CACHE_USED && info->rec_cache.pos_in_file < filepos + block_info.data_len && flush_io_cache(&info->rec_cache)) goto err; /* What a pity that this method is not called 'file_pread' and that there is no equivalent without seeking. We are at the right position already. :( */ if (share->file_read(info, to, block_info.data_len, filepos, MYF(MY_NABP))) goto panic; left_length-=block_info.data_len; to+=block_info.data_len; } filepos= block_info.next_filepos; } while (left_length); info->update|= HA_STATE_AKTIV; /* We have a aktive record */ fast_ma_writeinfo(info); DBUG_RETURN(_ma_rec_unpack(info,buf,info->rec_buff,block_info.rec_len) != MY_FILE_ERROR ? 0 : my_errno); err: fast_ma_writeinfo(info); DBUG_RETURN(my_errno); panic: _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); goto err; }
O3
c
ma_read_dynamic_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %rsi, -0xb8(%rbp) movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq (%rdi), %r15 cmpb $0x0, 0x7d9(%r15) setne %al cmpq $-0x1, %rdx je 0x3f90e movq %rdx, %r12 xorl %ecx, %ecx movb %al, %cl shll $0x10, %ecx orq $0x10, %rcx movq %rcx, -0xc8(%rbp) movl 0x480(%rbx), %eax movl %eax, -0xa4(%rbp) leaq -0x88(%rbp), %rax movl $0x0, 0x50(%rax) leaq 0x4b8(%rbx), %rax movq %rax, -0x98(%rbp) leaq 0x3a0(%rbx), %rax movq %rax, -0xb0(%rbp) leaq 0x460(%rbx), %rax movq %rax, -0xc0(%rbp) xorl %r14d, %r14d movq %rbx, -0xd8(%rbp) movq %r15, -0xd0(%rbp) cmpq $-0x1, %r12 je 0x3f901 testb $0x10, 0x61c(%rbx) je 0x3f71d leaq 0x14(%r12), %rax movq -0x98(%rbp), %rcx cmpq %rax, (%rcx) jae 0x3f71d movq -0x98(%rbp), %rdi movl $0x1, %esi callq 0x9643d testl %eax, %eax jne 0x3f90e movl $0x1, 0x598(%rbx) movq %rbx, %rdi leaq -0x88(%rbp), %rsi movl -0xa4(%rbp), %edx movq %r12, %rcx callq 0x3e8ec cmpl $0x4, %eax jae 0x3f94c subl $0x1, %r14d jae 0x3f7b7 movq -0x70(%rbp), %r13 movq %r13, 0x110(%rbx) movl 0x3b0(%r15), %eax cmpq %rax, %r13 ja 0x3f901 cmpl $0x0, 0x3f0(%r15) je 0x3f7a6 movl 0x424(%r15), %eax addq %rax, %r13 movq -0xb0(%rbp), %rdi movq -0xc0(%rbp), %rsi movq %r13, %rdx movq -0xc8(%rbp), %rcx callq 0x55d87 testb %al, %al jne 0x3f90e movq -0x70(%rbp), %r13 movq -0xb0(%rbp), %rax movq (%rax), %rax movq %rax, -0xa0(%rbp) movl %r13d, %eax movq -0x68(%rbp), %rdx leaq -0x1(%rdx), %rcx cmpq %rax, %rcx jae 0x3f901 movl %r14d, -0x8c(%rbp) movq -0x50(%rbp), %rax subq %r12, %rax movl $0x14, %ecx subl %eax, %ecx cmpq %rcx, %rdx movl %edx, %r14d cmovael %ecx, %r14d testl %r14d, %r14d je 0x3f842 movl %eax, %eax leaq (%rax,%rbp), %rsi addq $-0x88, %rsi movl %r14d, %r15d movq -0xa0(%rbp), %rbx movq %rbx, %rdi movq %r15, %rdx callq 0x29080 movq -0x68(%rbp), %rdx subl %r14d, %r13d addq %r15, %rbx movq %rbx, -0xa0(%rbp) subq %r15, %rdx movq -0xd0(%rbp), %r15 movq -0xd8(%rbp), %rbx movq %rdx, -0x68(%rbp) movl -0x8c(%rbp), %r14d jne 0x3f849 jmp 0x3f8b0 movl -0x8c(%rbp), %r14d addq $0x14, %r12 testb $0x10, 0x61c(%rbx) je 0x3f883 leaq (%rdx,%r12), %rax movq -0x98(%rbp), %rcx cmpq %rax, (%rcx) jae 0x3f883 movq -0x98(%rbp), %rdi movl $0x1, %esi callq 0x9643d testl %eax, %eax jne 0x3f90e movq -0x68(%rbp), %rdx movl $0x4, %r8d movq %rbx, %rdi movq -0xa0(%rbp), %rsi movq %r12, %rcx callq *0x6e0(%r15) testq %rax, %rax jne 0x3f901 movq -0x68(%rbp), %rax subl %eax, %r13d addq %rax, -0xa0(%rbp) movq -0x48(%rbp), %r12 testl %r13d, %r13d jne 0x3f6e0 orb $0x2, 0x624(%rbx) movq (%rbx), %rax cmpl $0x0, 0x7b8(%rax) jne 0x3f8da movq %rbx, %rdi xorl %esi, %esi callq 0x38cc2 movq 0x3a0(%rbx), %rdx movq -0x70(%rbp), %rcx movq %rbx, %rdi movq -0xb8(%rbp), %rsi callq 0x3f1e7 movq %rax, %rcx xorl %eax, %eax cmpq $-0x1, %rcx jne 0x3f92b jmp 0x3f924 movq %rbx, %rdi movl $0x7f, %esi callq 0x37928 movq (%rbx), %rax cmpl $0x0, 0x7b8(%rax) jne 0x3f924 movq %rbx, %rdi xorl %esi, %esi callq 0x38cc2 callq 0xa29fe movl (%rax), %eax movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x3f95d addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testb $0x14, %al je 0x3f90e callq 0xa29fe movl $0x86, (%rax) jmp 0x3f90e callq 0x29270
_ma_read_dynamic_record: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov [rbp+var_B8], rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax mov r15, [rdi] cmp byte ptr [r15+7D9h], 0 setnz al cmp rdx, 0FFFFFFFFFFFFFFFFh jz loc_3F90E mov r12, rdx xor ecx, ecx mov cl, al shl ecx, 10h or rcx, 10h mov [rbp+var_C8], rcx mov eax, [rbx+480h] mov [rbp+var_A4], eax lea rax, [rbp+var_88] mov dword ptr [rax+50h], 0 lea rax, [rbx+4B8h] mov [rbp+var_98], rax lea rax, [rbx+3A0h] mov [rbp+var_B0], rax lea rax, [rbx+460h] mov [rbp+var_C0], rax xor r14d, r14d mov [rbp+var_D8], rbx mov [rbp+var_D0], r15 loc_3F6E0: cmp r12, 0FFFFFFFFFFFFFFFFh jz loc_3F901 test byte ptr [rbx+61Ch], 10h jz short loc_3F71D lea rax, [r12+14h] mov rcx, [rbp+var_98] cmp [rcx], rax jnb short loc_3F71D mov rdi, [rbp+var_98] mov esi, 1 call my_b_flush_io_cache test eax, eax jnz loc_3F90E loc_3F71D: mov dword ptr [rbx+598h], 1 mov rdi, rbx lea rsi, [rbp+var_88] mov edx, [rbp+var_A4] mov rcx, r12 call _ma_get_block_info cmp eax, 4 jnb loc_3F94C sub r14d, 1 jnb short loc_3F7B7 mov r13, [rbp+var_70] mov [rbx+110h], r13 mov eax, [r15+3B0h] cmp r13, rax ja loc_3F901 cmp dword ptr [r15+3F0h], 0 jz short loc_3F7A6 mov eax, [r15+424h] add r13, rax mov rdi, [rbp+var_B0] mov rsi, [rbp+var_C0] mov rdx, r13 mov rcx, [rbp+var_C8] call _ma_alloc_buffer test al, al jnz loc_3F90E mov r13, [rbp+var_70] loc_3F7A6: mov rax, [rbp+var_B0] mov rax, [rax] mov [rbp+var_A0], rax loc_3F7B7: mov eax, r13d mov rdx, [rbp+var_68] lea rcx, [rdx-1] cmp rcx, rax jnb loc_3F901 mov [rbp+var_8C], r14d mov rax, [rbp+var_50] sub rax, r12 mov ecx, 14h sub ecx, eax cmp rdx, rcx mov r14d, edx cmovnb r14d, ecx test r14d, r14d jz short loc_3F842 mov eax, eax lea rsi, [rax+rbp] add rsi, 0FFFFFFFFFFFFFF78h mov r15d, r14d mov rbx, [rbp+var_A0] mov rdi, rbx mov rdx, r15 call _memcpy mov rdx, [rbp+var_68] sub r13d, r14d add rbx, r15 mov [rbp+var_A0], rbx sub rdx, r15 mov r15, [rbp+var_D0] mov rbx, [rbp+var_D8] mov [rbp+var_68], rdx mov r14d, [rbp+var_8C] jnz short loc_3F849 jmp short loc_3F8B0 loc_3F842: mov r14d, [rbp+var_8C] loc_3F849: add r12, 14h test byte ptr [rbx+61Ch], 10h jz short loc_3F883 lea rax, [rdx+r12] mov rcx, [rbp+var_98] cmp [rcx], rax jnb short loc_3F883 mov rdi, [rbp+var_98] mov esi, 1 call my_b_flush_io_cache test eax, eax jnz loc_3F90E mov rdx, [rbp+var_68] loc_3F883: mov r8d, 4 mov rdi, rbx mov rsi, [rbp+var_A0] mov rcx, r12 call qword ptr [r15+6E0h] test rax, rax jnz short loc_3F901 mov rax, [rbp+var_68] sub r13d, eax add [rbp+var_A0], rax loc_3F8B0: mov r12, [rbp+var_48] test r13d, r13d jnz loc_3F6E0 or byte ptr [rbx+624h], 2 mov rax, [rbx] cmp dword ptr [rax+7B8h], 0 jnz short loc_3F8DA mov rdi, rbx xor esi, esi call _ma_writeinfo loc_3F8DA: mov rdx, [rbx+3A0h] mov rcx, [rbp+var_70] mov rdi, rbx mov rsi, [rbp+var_B8] call _ma_rec_unpack mov rcx, rax xor eax, eax cmp rcx, 0FFFFFFFFFFFFFFFFh jnz short loc_3F92B jmp short loc_3F924 loc_3F901: mov rdi, rbx mov esi, 7Fh call _ma_set_fatal_error loc_3F90E: mov rax, [rbx] cmp dword ptr [rax+7B8h], 0 jnz short loc_3F924 mov rdi, rbx xor esi, esi call _ma_writeinfo loc_3F924: call _my_thread_var mov eax, [rax] loc_3F92B: mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz short loc_3F95D add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3F94C: test al, 14h jz short loc_3F90E call _my_thread_var mov dword ptr [rax], 86h jmp short loc_3F90E loc_3F95D: call ___stack_chk_fail
long long ma_read_dynamic_record( _DWORD *a1, unsigned __int8 *a2, long long a3, long long a4, unsigned long long a5, int a6) { unsigned long long v6; // r13 long long v7; // rbx long long v8; // r15 long long v9; // r12 int v10; // r14d unsigned int block_info; // eax bool v12; // cf int v13; // r14d unsigned int v14; // r14d bool v15; // zf long long v16; // r12 long long result; // rax _DWORD *v18; // [rsp+8h] [rbp-D8h] long long v19; // [rsp+10h] [rbp-D0h] long long v20; // [rsp+18h] [rbp-C8h] unsigned __int8 *v21; // [rsp+20h] [rbp-C0h] unsigned __int8 *v22; // [rsp+28h] [rbp-B8h] _QWORD *v23; // [rsp+30h] [rbp-B0h] unsigned int v24; // [rsp+3Ch] [rbp-A4h] long long v25; // [rsp+40h] [rbp-A0h] _QWORD *v26; // [rsp+48h] [rbp-98h] int v27; // [rsp+54h] [rbp-8Ch] unsigned __int8 v28[24]; // [rsp+58h] [rbp-88h] BYREF unsigned long long v29; // [rsp+70h] [rbp-70h] unsigned long long v30; // [rsp+78h] [rbp-68h] long long v31; // [rsp+90h] [rbp-50h] long long v32; // [rsp+98h] [rbp-48h] int v33; // [rsp+A8h] [rbp-38h] unsigned long long v34; // [rsp+B0h] [rbp-30h] v22 = a2; v7 = (long long)a1; v34 = __readfsqword(0x28u); v8 = *(_QWORD *)a1; if ( a3 != -1 ) { v9 = a3; a4 = ((unsigned __int8)(*(_BYTE *)(*(_QWORD *)a1 + 2009LL) != 0) << 16) | 0x10LL; v20 = a4; v24 = a1[288]; v33 = 0; v26 = a1 + 302; v23 = a1 + 232; v21 = (unsigned __int8 *)(a1 + 280); v10 = 0; v18 = a1; v19 = v8; while ( 1 ) { if ( v9 == -1 ) { LABEL_32: a1 = (_DWORD *)v7; a2 = (_BYTE *)(&dword_7C + 3); ma_set_fatal_error((_DWORD *)v7, 127LL, a3, a4, a5, a6); goto LABEL_33; } if ( (*(_BYTE *)(v7 + 1564) & 0x10) != 0 && *v26 < (unsigned long long)(v9 + 20) ) { a1 = v26; a2 = (_BYTE *)(&dword_0 + 1); if ( (unsigned int)my_b_flush_io_cache(v26, 1LL) ) goto LABEL_33; } *(_DWORD *)(v7 + 1432) = 1; a1 = (_DWORD *)v7; a2 = v28; block_info = ma_get_block_info(v7, v28, v24, v9, a5, a6); if ( block_info >= 4 ) { if ( (block_info & 0x14) != 0 ) *(_DWORD *)my_thread_var(v7, v28, a3, a4, a5) = 134; goto LABEL_33; } v12 = v10 == 0; v13 = v10 - 1; if ( v12 ) { v6 = v29; *(_QWORD *)(v7 + 272) = v29; if ( v6 > *(unsigned int *)(v8 + 944) ) goto LABEL_32; if ( *(_DWORD *)(v8 + 1008) ) { a1 = v23; a2 = v21; if ( (unsigned __int8)ma_alloc_buffer(v23, v21, *(unsigned int *)(v8 + 1060) + v6, v20) ) goto LABEL_33; LODWORD(v6) = v29; } v25 = *v23; } a3 = v30; a4 = v30 - 1; if ( v30 - 1 >= (unsigned int)v6 ) goto LABEL_32; v27 = v13; v14 = v30; if ( v30 >= (unsigned int)(20 - (v31 - v9)) ) v14 = 20 - (v31 - v9); if ( !v14 ) break; memcpy(v25, &v28[(unsigned int)(v31 - v9)], v14); LODWORD(v6) = v6 - v14; v25 += v14; a3 = v30 - v14; v15 = v30 == v14; v8 = v19; v7 = (long long)v18; v30 = a3; v10 = v27; if ( !v15 ) goto LABEL_21; LABEL_27: v9 = v32; if ( !(_DWORD)v6 ) { *(_BYTE *)(v7 + 1572) |= 2u; if ( !*(_DWORD *)(*(_QWORD *)v7 + 1976LL) ) ma_writeinfo((long long *)v7, 0LL, a3, a4, a5); a1 = (_DWORD *)v7; a2 = v22; a4 = ma_rec_unpack((_DWORD *)v7, v22, *(_QWORD *)(v7 + 928), v29, a5, a6); result = 0LL; if ( a4 != -1 ) return result; return *(unsigned int *)my_thread_var(a1, a2, a3, a4, a5); } } v10 = v27; LABEL_21: v16 = v9 + 20; if ( (*(_BYTE *)(v7 + 1564) & 0x10) != 0 && *v26 < (unsigned long long)(a3 + v16) ) { a1 = v26; a2 = (_BYTE *)(&dword_0 + 1); if ( (unsigned int)my_b_flush_io_cache(v26, 1LL) ) goto LABEL_33; a3 = v30; } if ( (*(long long ( **)(long long, long long, long long, long long, long long))(v8 + 1760))(v7, v25, a3, v16, 4LL) ) goto LABEL_32; LODWORD(v6) = v6 - v30; v25 += v30; goto LABEL_27; } LABEL_33: if ( !*(_DWORD *)(*(_QWORD *)v7 + 1976LL) ) { a1 = (_DWORD *)v7; a2 = 0LL; ma_writeinfo((long long *)v7, 0LL, a3, a4, a5); } return *(unsigned int *)my_thread_var(a1, a2, a3, a4, a5); }
_ma_read_dynamic_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV qword ptr [RBP + -0xb8],RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R15,qword ptr [RDI] CMP byte ptr [R15 + 0x7d9],0x0 SETNZ AL CMP RDX,-0x1 JZ 0x0013f90e MOV R12,RDX XOR ECX,ECX MOV CL,AL SHL ECX,0x10 OR RCX,0x10 MOV qword ptr [RBP + -0xc8],RCX MOV EAX,dword ptr [RBX + 0x480] MOV dword ptr [RBP + -0xa4],EAX LEA RAX,[RBP + -0x88] MOV dword ptr [RAX + 0x50],0x0 LEA RAX,[RBX + 0x4b8] MOV qword ptr [RBP + -0x98],RAX LEA RAX,[RBX + 0x3a0] MOV qword ptr [RBP + -0xb0],RAX LEA RAX,[RBX + 0x460] MOV qword ptr [RBP + -0xc0],RAX XOR R14D,R14D MOV qword ptr [RBP + -0xd8],RBX MOV qword ptr [RBP + -0xd0],R15 LAB_0013f6e0: CMP R12,-0x1 JZ 0x0013f901 TEST byte ptr [RBX + 0x61c],0x10 JZ 0x0013f71d LEA RAX,[R12 + 0x14] MOV RCX,qword ptr [RBP + -0x98] CMP qword ptr [RCX],RAX JNC 0x0013f71d MOV RDI,qword ptr [RBP + -0x98] MOV ESI,0x1 CALL 0x0019643d TEST EAX,EAX JNZ 0x0013f90e LAB_0013f71d: MOV dword ptr [RBX + 0x598],0x1 MOV RDI,RBX LEA RSI,[RBP + -0x88] MOV EDX,dword ptr [RBP + -0xa4] MOV RCX,R12 CALL 0x0013e8ec CMP EAX,0x4 JNC 0x0013f94c SUB R14D,0x1 JNC 0x0013f7b7 MOV R13,qword ptr [RBP + -0x70] MOV qword ptr [RBX + 0x110],R13 MOV EAX,dword ptr [R15 + 0x3b0] CMP R13,RAX JA 0x0013f901 CMP dword ptr [R15 + 0x3f0],0x0 JZ 0x0013f7a6 MOV EAX,dword ptr [R15 + 0x424] ADD R13,RAX MOV RDI,qword ptr [RBP + -0xb0] MOV RSI,qword ptr [RBP + -0xc0] MOV RDX,R13 MOV RCX,qword ptr [RBP + -0xc8] CALL 0x00155d87 TEST AL,AL JNZ 0x0013f90e MOV R13,qword ptr [RBP + -0x70] LAB_0013f7a6: MOV RAX,qword ptr [RBP + -0xb0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0xa0],RAX LAB_0013f7b7: MOV EAX,R13D MOV RDX,qword ptr [RBP + -0x68] LEA RCX,[RDX + -0x1] CMP RCX,RAX JNC 0x0013f901 MOV dword ptr [RBP + -0x8c],R14D MOV RAX,qword ptr [RBP + -0x50] SUB RAX,R12 MOV ECX,0x14 SUB ECX,EAX CMP RDX,RCX MOV R14D,EDX CMOVNC R14D,ECX TEST R14D,R14D JZ 0x0013f842 MOV EAX,EAX LEA RSI,[RAX + RBP*0x1] ADD RSI,-0x88 MOV R15D,R14D MOV RBX,qword ptr [RBP + -0xa0] MOV RDI,RBX MOV RDX,R15 CALL 0x00129080 MOV RDX,qword ptr [RBP + -0x68] SUB R13D,R14D ADD RBX,R15 MOV qword ptr [RBP + -0xa0],RBX SUB RDX,R15 MOV R15,qword ptr [RBP + -0xd0] MOV RBX,qword ptr [RBP + -0xd8] MOV qword ptr [RBP + -0x68],RDX MOV R14D,dword ptr [RBP + -0x8c] JNZ 0x0013f849 JMP 0x0013f8b0 LAB_0013f842: MOV R14D,dword ptr [RBP + -0x8c] LAB_0013f849: ADD R12,0x14 TEST byte ptr [RBX + 0x61c],0x10 JZ 0x0013f883 LEA RAX,[RDX + R12*0x1] MOV RCX,qword ptr [RBP + -0x98] CMP qword ptr [RCX],RAX JNC 0x0013f883 MOV RDI,qword ptr [RBP + -0x98] MOV ESI,0x1 CALL 0x0019643d TEST EAX,EAX JNZ 0x0013f90e MOV RDX,qword ptr [RBP + -0x68] LAB_0013f883: MOV R8D,0x4 MOV RDI,RBX MOV RSI,qword ptr [RBP + -0xa0] MOV RCX,R12 CALL qword ptr [R15 + 0x6e0] TEST RAX,RAX JNZ 0x0013f901 MOV RAX,qword ptr [RBP + -0x68] SUB R13D,EAX ADD qword ptr [RBP + -0xa0],RAX LAB_0013f8b0: MOV R12,qword ptr [RBP + -0x48] TEST R13D,R13D JNZ 0x0013f6e0 OR byte ptr [RBX + 0x624],0x2 MOV RAX,qword ptr [RBX] CMP dword ptr [RAX + 0x7b8],0x0 JNZ 0x0013f8da MOV RDI,RBX XOR ESI,ESI CALL 0x00138cc2 LAB_0013f8da: MOV RDX,qword ptr [RBX + 0x3a0] MOV RCX,qword ptr [RBP + -0x70] MOV RDI,RBX MOV RSI,qword ptr [RBP + -0xb8] CALL 0x0013f1e7 MOV RCX,RAX XOR EAX,EAX CMP RCX,-0x1 JNZ 0x0013f92b JMP 0x0013f924 LAB_0013f901: MOV RDI,RBX MOV ESI,0x7f CALL 0x00137928 LAB_0013f90e: MOV RAX,qword ptr [RBX] CMP dword ptr [RAX + 0x7b8],0x0 JNZ 0x0013f924 MOV RDI,RBX XOR ESI,ESI CALL 0x00138cc2 LAB_0013f924: CALL 0x001a29fe MOV EAX,dword ptr [RAX] LAB_0013f92b: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x0013f95d ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013f94c: TEST AL,0x14 JZ 0x0013f90e CALL 0x001a29fe MOV dword ptr [RAX],0x86 JMP 0x0013f90e LAB_0013f95d: CALL 0x00129270
int4 _ma_read_dynamic_record(long *param_1,int8 param_2,long param_3) { ulong *puVar1; char cVar2; long lVar3; char cVar4; int iVar5; uint uVar6; uint uVar7; int4 uVar8; long lVar9; long lVar10; int4 *puVar11; uint uVar12; ulong unaff_R13; int iVar13; uint uVar14; ulong __n; long in_FS_OFFSET; bool bVar15; void *local_a8; int1 local_90 [24]; ulong local_78; ulong local_70; int8 local_58; long local_50; int4 local_40; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); lVar10 = *param_1; cVar2 = *(char *)(lVar10 + 0x7d9); if (param_3 == -1) { LAB_0013f90e: if (*(int *)(*param_1 + 0x7b8) == 0) { _ma_writeinfo(param_1,0); } } else { lVar3 = param_1[0x90]; local_40 = 0; puVar1 = (ulong *)(param_1 + 0x97); iVar13 = 0; do { if (param_3 == -1) { LAB_0013f901: _ma_set_fatal_error(param_1,0x7f); goto LAB_0013f90e; } if ((((*(byte *)((long)param_1 + 0x61c) & 0x10) != 0) && (*puVar1 < param_3 + 0x14U)) && (iVar5 = my_b_flush_io_cache(puVar1,1), iVar5 != 0)) goto LAB_0013f90e; *(int4 *)(param_1 + 0xb3) = 1; uVar6 = _ma_get_block_info(param_1,local_90,(int)lVar3,param_3); if (3 < uVar6) { if ((uVar6 & 0x14) != 0) { puVar11 = (int4 *)_my_thread_var(); *puVar11 = 0x86; } goto LAB_0013f90e; } bVar15 = iVar13 == 0; iVar13 = iVar13 + -1; if (bVar15) { param_1[0x22] = local_78; if (*(uint *)(lVar10 + 0x3b0) < local_78) goto LAB_0013f901; if ((*(int *)(lVar10 + 0x3f0) != 0) && (cVar4 = _ma_alloc_buffer(param_1 + 0x74,param_1 + 0x8c, local_78 + *(uint *)(lVar10 + 0x424), (ulong)(cVar2 != '\0') << 0x10 | 0x10), cVar4 != '\0')) goto LAB_0013f90e; local_a8 = (void *)param_1[0x74]; unaff_R13 = local_78; } uVar6 = (uint)unaff_R13; if ((unaff_R13 & 0xffffffff) <= local_70 - 1) goto LAB_0013f901; uVar7 = (int)local_58 - (int)param_3; uVar12 = 0x14 - uVar7; uVar14 = (uint)local_70; if (uVar12 <= local_70) { uVar14 = uVar12; } if (uVar14 == 0) { LAB_0013f849: if ((((*(byte *)((long)param_1 + 0x61c) & 0x10) != 0) && (*puVar1 < local_70 + param_3 + 0x14)) && (iVar5 = my_b_flush_io_cache(puVar1,1), iVar5 != 0)) goto LAB_0013f90e; lVar9 = (**(code **)(lVar10 + 0x6e0))(param_1,local_a8,local_70,param_3 + 0x14,4); if (lVar9 != 0) goto LAB_0013f901; uVar6 = uVar6 - (int)local_70; local_a8 = (void *)((long)local_a8 + local_70); } else { __n = (ulong)uVar14; memcpy(local_a8,local_90 + uVar7,__n); uVar6 = uVar6 - uVar14; local_a8 = (void *)((long)local_a8 + __n); local_70 = local_70 - __n; if (local_70 != 0) goto LAB_0013f849; } unaff_R13 = (ulong)uVar6; param_3 = local_50; } while (uVar6 != 0); *(byte *)((long)param_1 + 0x624) = *(byte *)((long)param_1 + 0x624) | 2; if (*(int *)(*param_1 + 0x7b8) == 0) { _ma_writeinfo(param_1,0); } lVar10 = _ma_rec_unpack(param_1,param_2,param_1[0x74],local_78); uVar8 = 0; if (lVar10 != -1) goto LAB_0013f92b; } puVar11 = (int4 *)_my_thread_var(); uVar8 = *puVar11; LAB_0013f92b: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar8; }
13,260
my_coll_rule_parse
eloqsql/strings/ctype-uca.c
static int my_coll_rule_parse(MY_COLL_RULES *rules, const char *str, const char *str_end) { MY_COLL_RULE_PARSER p; my_coll_parser_init(&p, rules, str, str_end); if (!my_coll_parser_exec(&p)) { my_coll_lexem_print_error(my_coll_parser_curr(&p), rules->loader->error, sizeof(rules->loader->error) - 1, p.errstr); return 1; } return 0; }
O0
c
my_coll_rule_parse: pushq %rbp movq %rsp, %rbp subq $0x1b0, %rsp # imm = 0x1B0 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x190(%rbp) movq %rsi, -0x198(%rbp) movq %rdx, -0x1a0(%rbp) movq -0x190(%rbp), %rsi movq -0x198(%rbp), %rdx movq -0x1a0(%rbp), %rcx leaq -0x180(%rbp), %rdi callq 0x9d860 leaq -0x180(%rbp), %rdi callq 0x9d910 cmpl $0x0, %eax jne 0x9d50d leaq -0x180(%rbp), %rdi callq 0x9da90 movq %rax, %rdi movq -0x190(%rbp), %rax movq 0x28(%rax), %rsi leaq -0x180(%rbp), %rcx addq $0xf8, %rcx movl $0x7f, %edx callq 0x9d980 movl $0x1, -0x184(%rbp) jmp 0x9d517 movl $0x0, -0x184(%rbp) movl -0x184(%rbp), %eax movl %eax, -0x1a4(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x9d544 movl -0x1a4(%rbp), %eax addq $0x1b0, %rsp # imm = 0x1B0 popq %rbp retq callq 0x362b0 nopl (%rax)
my_coll_rule_parse: push rbp mov rbp, rsp sub rsp, 1B0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_190], rdi mov [rbp+var_198], rsi mov [rbp+var_1A0], rdx mov rsi, [rbp+var_190] mov rdx, [rbp+var_198] mov rcx, [rbp+var_1A0] lea rdi, [rbp+var_180] call my_coll_parser_init lea rdi, [rbp+var_180] call my_coll_parser_exec cmp eax, 0 jnz short loc_9D50D lea rdi, [rbp+var_180] call my_coll_parser_curr mov rdi, rax mov rax, [rbp+var_190] mov rsi, [rax+28h] lea rcx, [rbp+var_180] add rcx, 0F8h mov edx, 7Fh call my_coll_lexem_print_error mov [rbp+var_184], 1 jmp short loc_9D517 loc_9D50D: mov [rbp+var_184], 0 loc_9D517: mov eax, [rbp+var_184] mov [rbp+var_1A4], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_9D544 mov eax, [rbp+var_1A4] add rsp, 1B0h pop rbp retn loc_9D544: call ___stack_chk_fail
long long my_coll_rule_parse(long long a1, long long a2, long long a3) { long long v3; // rax _BYTE v6[248]; // [rsp+30h] [rbp-180h] BYREF _QWORD v7[17]; // [rsp+128h] [rbp-88h] BYREF v7[16] = __readfsqword(0x28u); my_coll_parser_init(v6, a1, a2, a3); if ( (unsigned int)my_coll_parser_exec(v6) ) { return 0; } else { v3 = my_coll_parser_curr(v6); my_coll_lexem_print_error(v3, *(_QWORD *)(a1 + 40), 127LL, v7); return 1; } }
my_coll_rule_parse: PUSH RBP MOV RBP,RSP SUB RSP,0x1b0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x190],RDI MOV qword ptr [RBP + -0x198],RSI MOV qword ptr [RBP + -0x1a0],RDX MOV RSI,qword ptr [RBP + -0x190] MOV RDX,qword ptr [RBP + -0x198] MOV RCX,qword ptr [RBP + -0x1a0] LEA RDI,[RBP + -0x180] CALL 0x0019d860 LEA RDI,[RBP + -0x180] CALL 0x0019d910 CMP EAX,0x0 JNZ 0x0019d50d LEA RDI,[RBP + -0x180] CALL 0x0019da90 MOV RDI,RAX MOV RAX,qword ptr [RBP + -0x190] MOV RSI,qword ptr [RAX + 0x28] LEA RCX,[RBP + -0x180] ADD RCX,0xf8 MOV EDX,0x7f CALL 0x0019d980 MOV dword ptr [RBP + -0x184],0x1 JMP 0x0019d517 LAB_0019d50d: MOV dword ptr [RBP + -0x184],0x0 LAB_0019d517: MOV EAX,dword ptr [RBP + -0x184] MOV dword ptr [RBP + -0x1a4],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0019d544 MOV EAX,dword ptr [RBP + -0x1a4] ADD RSP,0x1b0 POP RBP RET LAB_0019d544: CALL 0x001362b0
bool my_coll_rule_parse(long param_1,int8 param_2,int8 param_3) { int iVar1; int8 uVar2; long in_FS_OFFSET; int1 local_188 [248]; int1 auStack_90 [128]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); my_coll_parser_init(local_188,param_1,param_2,param_3); iVar1 = my_coll_parser_exec(local_188); if (iVar1 == 0) { uVar2 = my_coll_parser_curr(local_188); my_coll_lexem_print_error(uVar2,*(int8 *)(param_1 + 0x28),0x7f,auStack_90); } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return iVar1 == 0; }
13,261
my_fread
eloqsql/mysys/my_fstream.c
size_t my_fread(FILE *stream, uchar *Buffer, size_t Count, myf MyFlags) { size_t readbytes; DBUG_ENTER("my_fread"); DBUG_PRINT("my",("stream: %p Buffer %p Count: %u MyFlags: %lu", stream, Buffer, (uint) Count, MyFlags)); if ((readbytes= fread(Buffer, sizeof(char), Count, stream)) != Count) { DBUG_PRINT("error",("Read only %d bytes", (int) readbytes)); if (MyFlags & (MY_WME | MY_FAE | MY_FNABP)) { if (ferror(stream)) my_error(EE_READ, MYF(ME_BELL), my_filename(my_fileno(stream)),errno); else if (MyFlags & (MY_NABP | MY_FNABP)) my_error(EE_EOFERR, MYF(ME_BELL), my_filename(my_fileno(stream)),errno); } my_errno=errno ? errno : -1; if (ferror(stream) || MyFlags & (MY_NABP | MY_FNABP)) DBUG_RETURN((size_t) -1); /* Return with error */ } if (MyFlags & (MY_NABP | MY_FNABP)) DBUG_RETURN(0); /* Read ok */ DBUG_RETURN(readbytes); }
O0
c
my_fread: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) jmp 0xf269a movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rdx movq -0x10(%rbp), %rcx movl $0x1, %esi callq 0x2a410 movq %rax, -0x30(%rbp) cmpq -0x20(%rbp), %rax je 0xf27b0 jmp 0xf26c0 jmp 0xf26c2 movq -0x28(%rbp), %rax andq $0x1a, %rax cmpq $0x0, %rax je 0xf2756 movq -0x10(%rbp), %rdi callq 0x2a5f0 cmpl $0x0, %eax je 0xf2714 movq -0x10(%rbp), %rdi callq 0xf27e0 movl %eax, %edi callq 0x109f80 movq %rax, -0x38(%rbp) callq 0x2a750 movq -0x38(%rbp), %rdx movl (%rax), %ecx movl $0x2, %edi movl $0x4, %esi movb $0x0, %al callq 0xf1ba0 jmp 0xf2754 movq -0x28(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0xf2752 movq -0x10(%rbp), %rdi callq 0xf27e0 movl %eax, %edi callq 0x109f80 movq %rax, -0x40(%rbp) callq 0x2a750 movq -0x40(%rbp), %rdx movl (%rax), %ecx movl $0x9, %edi movl $0x4, %esi movb $0x0, %al callq 0xf1ba0 jmp 0xf2754 jmp 0xf2756 callq 0x2a750 cmpl $0x0, (%rax) je 0xf276c callq 0x2a750 movl (%rax), %eax movl %eax, -0x44(%rbp) jmp 0xf2776 movl $0xffffffff, %eax # imm = 0xFFFFFFFF movl %eax, -0x44(%rbp) jmp 0xf2776 movl -0x44(%rbp), %eax movl %eax, -0x48(%rbp) callq 0xfc1b0 movl -0x48(%rbp), %ecx movl %ecx, (%rax) movq -0x10(%rbp), %rdi callq 0x2a5f0 cmpl $0x0, %eax jne 0xf27a2 movq -0x28(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0xf27ae jmp 0xf27a4 movq $-0x1, -0x8(%rbp) jmp 0xf27d4 jmp 0xf27b0 movq -0x28(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0xf27ca jmp 0xf27c0 movq $0x0, -0x8(%rbp) jmp 0xf27d4 jmp 0xf27cc movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nop
my_fread: 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 jmp short $+2 loc_F269A: mov rdi, [rbp+var_18] mov rdx, [rbp+var_20] mov rcx, [rbp+var_10] mov esi, 1 call _fread mov [rbp+var_30], rax cmp rax, [rbp+var_20] jz loc_F27B0 jmp short $+2 loc_F26C0: jmp short $+2 loc_F26C2: mov rax, [rbp+var_28] and rax, 1Ah cmp rax, 0 jz loc_F2756 mov rdi, [rbp+var_10] call _ferror cmp eax, 0 jz short loc_F2714 mov rdi, [rbp+var_10] call my_fileno mov edi, eax call my_filename mov [rbp+var_38], rax call ___errno_location mov rdx, [rbp+var_38] mov ecx, [rax] mov edi, 2 mov esi, 4 mov al, 0 call my_error jmp short loc_F2754 loc_F2714: mov rax, [rbp+var_28] and rax, 6 cmp rax, 0 jz short loc_F2752 mov rdi, [rbp+var_10] call my_fileno mov edi, eax call my_filename mov [rbp+var_40], rax call ___errno_location mov rdx, [rbp+var_40] mov ecx, [rax] mov edi, 9 mov esi, 4 mov al, 0 call my_error loc_F2752: jmp short $+2 loc_F2754: jmp short $+2 loc_F2756: call ___errno_location cmp dword ptr [rax], 0 jz short loc_F276C call ___errno_location mov eax, [rax] mov [rbp+var_44], eax jmp short loc_F2776 loc_F276C: mov eax, 0FFFFFFFFh mov [rbp+var_44], eax jmp short $+2 loc_F2776: mov eax, [rbp+var_44] mov [rbp+var_48], eax call _my_thread_var mov ecx, [rbp+var_48] mov [rax], ecx mov rdi, [rbp+var_10] call _ferror cmp eax, 0 jnz short loc_F27A2 mov rax, [rbp+var_28] and rax, 6 cmp rax, 0 jz short loc_F27AE loc_F27A2: jmp short $+2 loc_F27A4: mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_F27D4 loc_F27AE: jmp short $+2 loc_F27B0: mov rax, [rbp+var_28] and rax, 6 cmp rax, 0 jz short loc_F27CA jmp short $+2 loc_F27C0: mov [rbp+var_8], 0 jmp short loc_F27D4 loc_F27CA: jmp short $+2 loc_F27CC: mov rax, [rbp+var_30] mov [rbp+var_8], rax loc_F27D4: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
long long my_fread(long long a1, long long a2, long long a3, char a4) { const char *v5; // rsi unsigned int v6; // eax unsigned int *v7; // rax unsigned int v8; // eax unsigned int *v9; // rax int v11; // [rsp+Ch] [rbp-44h] long long v12; // [rsp+10h] [rbp-40h] long long v13; // [rsp+18h] [rbp-38h] long long v14; // [rsp+20h] [rbp-30h] v5 = (_BYTE *)(&dword_0 + 1); v14 = fread(a2, 1LL, a3, a1); if ( v14 == a3 ) goto LABEL_13; if ( (a4 & 0x1A) != 0 ) { a2 = a1; if ( (unsigned int)ferror(a1) ) { v6 = my_fileno(a1); v13 = my_filename(v6); v7 = (unsigned int *)__errno_location(); a2 = 2LL; v5 = &byte_4; my_error(2u, 4LL, v13, *v7); } else if ( (a4 & 6) != 0 ) { v8 = my_fileno(a1); v12 = my_filename(v8); v9 = (unsigned int *)__errno_location(); a2 = 9LL; v5 = &byte_4; my_error(9u, 4LL, v12, *v9); } } v11 = *(_DWORD *)__errno_location() ? *(_DWORD *)__errno_location() : -1; *(_DWORD *)my_thread_var(a2, v5) = v11; if ( (unsigned int)ferror(a1) || (a4 & 6) != 0 ) return -1LL; LABEL_13: if ( (a4 & 6) != 0 ) return 0LL; return v14; }
my_fread: 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 JMP 0x001f269a LAB_001f269a: MOV RDI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] MOV ESI,0x1 CALL 0x0012a410 MOV qword ptr [RBP + -0x30],RAX CMP RAX,qword ptr [RBP + -0x20] JZ 0x001f27b0 JMP 0x001f26c0 LAB_001f26c0: JMP 0x001f26c2 LAB_001f26c2: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x1a CMP RAX,0x0 JZ 0x001f2756 MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012a5f0 CMP EAX,0x0 JZ 0x001f2714 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001f27e0 MOV EDI,EAX CALL 0x00209f80 MOV qword ptr [RBP + -0x38],RAX CALL 0x0012a750 MOV RDX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX] MOV EDI,0x2 MOV ESI,0x4 MOV AL,0x0 CALL 0x001f1ba0 JMP 0x001f2754 LAB_001f2714: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x6 CMP RAX,0x0 JZ 0x001f2752 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001f27e0 MOV EDI,EAX CALL 0x00209f80 MOV qword ptr [RBP + -0x40],RAX CALL 0x0012a750 MOV RDX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RAX] MOV EDI,0x9 MOV ESI,0x4 MOV AL,0x0 CALL 0x001f1ba0 LAB_001f2752: JMP 0x001f2754 LAB_001f2754: JMP 0x001f2756 LAB_001f2756: CALL 0x0012a750 CMP dword ptr [RAX],0x0 JZ 0x001f276c CALL 0x0012a750 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x44],EAX JMP 0x001f2776 LAB_001f276c: MOV EAX,0xffffffff MOV dword ptr [RBP + -0x44],EAX JMP 0x001f2776 LAB_001f2776: MOV EAX,dword ptr [RBP + -0x44] MOV dword ptr [RBP + -0x48],EAX CALL 0x001fc1b0 MOV ECX,dword ptr [RBP + -0x48] MOV dword ptr [RAX],ECX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012a5f0 CMP EAX,0x0 JNZ 0x001f27a2 MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x6 CMP RAX,0x0 JZ 0x001f27ae LAB_001f27a2: JMP 0x001f27a4 LAB_001f27a4: MOV qword ptr [RBP + -0x8],-0x1 JMP 0x001f27d4 LAB_001f27ae: JMP 0x001f27b0 LAB_001f27b0: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x6 CMP RAX,0x0 JZ 0x001f27ca JMP 0x001f27c0 LAB_001f27c0: MOV qword ptr [RBP + -0x8],0x0 JMP 0x001f27d4 LAB_001f27ca: JMP 0x001f27cc LAB_001f27cc: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX LAB_001f27d4: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
size_t my_fread(FILE *param_1,void *param_2,size_t param_3,ulong param_4) { int iVar1; int4 uVar2; int8 uVar3; int *piVar4; int local_4c; size_t local_10; local_10 = fread(param_2,1,param_3,param_1); if (local_10 != param_3) { if ((param_4 & 0x1a) != 0) { iVar1 = ferror(param_1); if (iVar1 == 0) { if ((param_4 & 6) != 0) { uVar2 = my_fileno(param_1); uVar3 = my_filename(uVar2); piVar4 = __errno_location(); my_error(9,4,uVar3,*piVar4); } } else { uVar2 = my_fileno(param_1); uVar3 = my_filename(uVar2); piVar4 = __errno_location(); my_error(2,4,uVar3,*piVar4); } } piVar4 = __errno_location(); if (*piVar4 == 0) { local_4c = -1; } else { piVar4 = __errno_location(); local_4c = *piVar4; } piVar4 = (int *)_my_thread_var(); *piVar4 = local_4c; iVar1 = ferror(param_1); if ((iVar1 != 0) || ((param_4 & 6) != 0)) { return 0xffffffffffffffff; } } if ((param_4 & 6) != 0) { local_10 = 0; } return local_10; }
13,262
div_by_zz
corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/vect.c
static void div_by_zz(limb_t val[]) { static const limb_t zz[] = { TO_LIMB_T(0x0000000100000000), TO_LIMB_T(0xac45a4010001a402) }; size_t loop, zz_len = sizeof(zz)/sizeof(zz[0]); limb_t d_lo, d_hi; d_lo = zz[zz_len - 2]; d_hi = zz[zz_len - 1]; for (loop = zz_len, zz_len--; loop--;) { limb_t q = div_3_limbs(val + loop + zz_len, d_lo, d_hi); (void)quot_rem_128(val + loop, zz, q); } /* remainder is in low half of val[], quotient is in high */ }
O2
c
div_by_zz: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax addq $0x10, %rdi pushq $-0x2 popq %r13 movabsq $0x100000000, %rbx # imm = 0x100000000 movabsq $-0x53ba5bfefffe5bfe, %r14 # imm = 0xAC45A4010001A402 leaq 0x2443f(%rip), %r15 # 0x80050 testq %r13, %r13 je 0x5bc3b leaq -0x8(%rdi), %r12 movq %rbx, %rsi movq %r14, %rdx callq 0x6bd60 movq %r12, %rdi movq %r15, %rsi movq %rax, %rdx callq 0x6bdc0 incq %r13 movq %r12, %rdi jmp 0x5bc11 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
div_by_zz: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax add rdi, 10h push 0FFFFFFFFFFFFFFFEh pop r13 mov rbx, 100000000h mov r14, 0AC45A4010001A402h lea r15, div_by_zz_zz loc_5BC11: test r13, r13 jz short loc_5BC3B lea r12, [rdi-8] mov rsi, rbx mov rdx, r14 call div_3_limbs mov rdi, r12 mov rsi, r15 mov rdx, rax call quot_rem_128 inc r13 mov rdi, r12 jmp short loc_5BC11 loc_5BC3B: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long div_by_zz(long long a1) { long long v1; // rdi long long i; // r13 long long v3; // rax long long result; // rax v1 = a1 + 16; for ( i = -2LL; i; ++i ) { v3 = div_3_limbs(v1, 0x100000000LL, 0xAC45A4010001A402LL); result = quot_rem_128(v1 - 8, &div_by_zz_zz, v3); v1 -= 8LL; } return result; }
div_by_zz: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX ADD RDI,0x10 PUSH -0x2 POP R13 MOV RBX,0x100000000 MOV R14,-0x53ba5bfefffe5bfe LEA R15,[0x180050] LAB_0015bc11: TEST R13,R13 JZ 0x0015bc3b LEA R12,[RDI + -0x8] MOV RSI,RBX MOV RDX,R14 CALL 0x0016bd60 MOV RDI,R12 MOV RSI,R15 MOV RDX,RAX CALL 0x0016bdc0 INC R13 MOV RDI,R12 JMP 0x0015bc11 LAB_0015bc3b: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void div_by_zz(long param_1) { int8 uVar1; long lVar2; long lVar3; lVar2 = param_1 + 0x10; for (lVar3 = -2; lVar3 != 0; lVar3 = lVar3 + 1) { uVar1 = div_3_limbs(lVar2,0x100000000,0xac45a4010001a402); quot_rem_128(lVar2 + -8,div_by_zz_zz,uVar1); lVar2 = lVar2 + -8; } return; }
13,263
ma_log_del_prefix
eloqsql/storage/maria/ma_write.c
static my_bool _ma_log_del_prefix(MARIA_PAGE *ma_page, uint org_length, uint new_length, const uchar *key_pos, uint key_length, int move_length) { LSN lsn; uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + 2 + 2 + 12 + 7]; uchar *log_pos; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 4]; uint offset= (uint) (key_pos - ma_page->buff); uint diff_length= org_length + move_length - new_length; uint translog_parts, extra_length; MARIA_HA *info= ma_page->info; my_off_t page= ma_page->pos / info->s->block_size; DBUG_ENTER("_ma_log_del_prefix"); DBUG_PRINT("enter", ("page: %lu org_length: %u new_length: %u", (ulong) page, org_length, new_length)); DBUG_ASSERT((int) diff_length > 0); DBUG_ASSERT(ma_page->org_size == org_length); DBUG_ASSERT(ma_page->size == new_length); log_pos= log_data + FILEID_STORE_SIZE; page_store(log_pos, page); log_pos+= PAGE_STORE_SIZE; translog_parts= 1; extra_length= 0; #ifdef EXTRA_DEBUG_KEY_CHANGES *log_pos++= KEY_OP_DEBUG; *log_pos++= KEY_OP_DEBUG_LOG_DEL_PREFIX; #endif /* Store keypage_flag */ *log_pos++= KEY_OP_SET_PAGEFLAG; *log_pos++= _ma_get_keypage_flag(info->s, ma_page->buff); if (offset < diff_length + info->s->keypage_header) { /* Key is not anymore on page. Move data down, but take into account that the original page had grown with 'move_length bytes' */ DBUG_ASSERT(offset + key_length <= diff_length + info->s->keypage_header); log_pos[0]= KEY_OP_DEL_PREFIX; int2store(log_pos+1, diff_length - move_length); log_pos+= 3; } else { /* Correct position to key, as data before key has been delete and key has thus been moved down */ offset-= diff_length; key_pos-= diff_length; /* Move data down */ log_pos[0]= KEY_OP_DEL_PREFIX; int2store(log_pos+1, diff_length); log_pos+= 3; log_pos[0]= KEY_OP_OFFSET; int2store(log_pos+1, offset); log_pos+= 3; if (move_length) { log_pos[0]= KEY_OP_SHIFT; int2store(log_pos+1, move_length); log_pos+= 3; } log_pos[0]= KEY_OP_CHANGE; int2store(log_pos+1, key_length); log_pos+= 3; log_array[TRANSLOG_INTERNAL_PARTS + 1].str= key_pos; log_array[TRANSLOG_INTERNAL_PARTS + 1].length= key_length; translog_parts= 2; extra_length= key_length; } log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (uint) (log_pos - log_data); _ma_log_key_changes(ma_page, log_array + TRANSLOG_INTERNAL_PARTS + translog_parts, log_pos, &extra_length, &translog_parts); /* Remember new page length for future log entires for same page */ ma_page->org_size= ma_page->size; DBUG_RETURN(translog_write_record(&lsn, LOGREC_REDO_INDEX, info->trn, info, (translog_size_t) log_array[TRANSLOG_INTERNAL_PARTS + 0].length + extra_length, TRANSLOG_INTERNAL_PARTS + translog_parts, log_array, log_data, NULL)); }
O3
c
ma_log_del_prefix: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xa0, %rsp movq %rcx, %r10 movq %fs:0x28, %rax movq %rax, -0x28(%rbp) movq (%rdi), %rcx movq 0x10(%rdi), %r14 movl %r10d, %r11d subl %r14d, %r11d subl %edx, %esi leal (%rsi,%r9), %ebx movq 0x18(%rdi), %rax movq (%rcx), %r15 movl 0x7bc(%r15), %r12d xorl %edx, %edx divq %r12 movl %eax, -0x4e(%rbp) shrq $0x20, %rax movb %al, -0x4a(%rbp) movb $0xa, -0x49(%rbp) movl 0x744(%r15), %eax leal -0x3(%rax), %edx movb (%r14,%rdx), %dl movb %dl, -0x48(%rbp) addl %ebx, %eax cmpl %r11d, %eax jbe 0x5a982 leaq -0x44(%rbp), %rax movb $0x5, -0x3(%rax) movw %si, -0x2(%rax) movl $0x3, %r9d xorl %r8d, %r8d jmp 0x5a9d6 subl %ebx, %r11d movl %ebx, %eax subq %rax, %r10 movb $0x5, -0x47(%rbp) movw %bx, -0x46(%rbp) movb $0x1, -0x44(%rbp) movw %r11w, -0x43(%rbp) testl %r9d, %r9d je 0x5a9af leaq -0x3e(%rbp), %rax movb $0x2, -0x3(%rax) movw %r9w, -0x2(%rax) jmp 0x5a9b3 leaq -0x41(%rbp), %rax movb $0x3, (%rax) movw %r8w, 0x1(%rax) addq $0x3, %rax movq %r10, -0x90(%rbp) movl %r8d, %edx movq %rdx, -0x88(%rbp) movl $0x4, %r9d leaq -0x50(%rbp), %r10 leaq -0xc0(%rbp), %r11 movq %r10, 0x20(%r11) subq %r10, %rax movl %eax, %edx movq %rdx, 0x28(%r11) movl 0x20(%rdi), %edx movl %edx, 0x24(%rdi) movq 0x8(%rcx), %rdx addl %eax, %r8d subq $0x8, %rsp leaq -0x58(%rbp), %rdi movl $0xc, %esi pushq $0x0 pushq %r10 pushq %r11 callq 0x2d77c addq $0x20, %rsp movq %fs:0x28, %rcx cmpq -0x28(%rbp), %rcx jne 0x5aa36 addq $0xa0, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq callq 0x2b280 nop
_ma_log_del_prefix: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 0A0h mov r10, rcx mov rax, fs:28h mov [rbp+var_28], rax mov rcx, [rdi] mov r14, [rdi+10h] mov r11d, r10d sub r11d, r14d sub esi, edx lea ebx, [rsi+r9] mov rax, [rdi+18h] mov r15, [rcx] mov r12d, [r15+7BCh] xor edx, edx div r12 mov [rbp+var_4E], eax shr rax, 20h mov [rbp+var_4A], al mov [rbp+var_49], 0Ah mov eax, [r15+744h] lea edx, [rax-3] mov dl, [r14+rdx] mov [rbp+var_48], dl add eax, ebx cmp eax, r11d jbe short loc_5A982 lea rax, [rbp+var_44] mov byte ptr [rax-3], 5 mov [rax-2], si mov r9d, 3 xor r8d, r8d jmp short loc_5A9D6 loc_5A982: sub r11d, ebx mov eax, ebx sub r10, rax mov [rbp+var_47], 5 mov [rbp+var_46], bx mov [rbp+var_44], 1 mov [rbp+var_43], r11w test r9d, r9d jz short loc_5A9AF lea rax, [rbp+var_3E] mov byte ptr [rax-3], 2 mov [rax-2], r9w jmp short loc_5A9B3 loc_5A9AF: lea rax, [rbp+var_41] loc_5A9B3: mov byte ptr [rax], 3 mov [rax+1], r8w add rax, 3 mov [rbp+var_90], r10 mov edx, r8d mov [rbp+var_88], rdx mov r9d, 4 loc_5A9D6: lea r10, [rbp+var_50] lea r11, [rbp+var_C0] mov [r11+20h], r10 sub rax, r10 mov edx, eax mov [r11+28h], rdx mov edx, [rdi+20h] mov [rdi+24h], edx mov rdx, [rcx+8] add r8d, eax sub rsp, 8 lea rdi, [rbp+var_58] mov esi, 0Ch push 0 push r10 push r11 call translog_write_record add rsp, 20h mov rcx, fs:28h cmp rcx, [rbp+var_28] jnz short loc_5AA36 add rsp, 0A0h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_5AA36: call ___stack_chk_fail
long long ma_log_del_prefix(long long **a1, int a2, int a3, long long a4, unsigned int a5, int a6) { long long *v7; // rcx long long *v8; // r14 __int16 v9; // r11 int v10; // esi unsigned int v11; // ebx long long v12; // r15 unsigned long long v13; // rax char *v14; // rax int v15; // r9d long long v16; // r10 char *v17; // rax signed long long v18; // rax __int128 v20; // [rsp+0h] [rbp-C0h] BYREF __int16 *v21; // [rsp+20h] [rbp-A0h] long long v22; // [rsp+28h] [rbp-98h] long long v23; // [rsp+30h] [rbp-90h] long long v24; // [rsp+38h] [rbp-88h] _BYTE v25[8]; // [rsp+68h] [rbp-58h] BYREF __int16 v26; // [rsp+70h] [rbp-50h] BYREF int v27; // [rsp+72h] [rbp-4Eh] char v28; // [rsp+76h] [rbp-4Ah] char v29; // [rsp+77h] [rbp-49h] char v30; // [rsp+78h] [rbp-48h] char v31; // [rsp+79h] [rbp-47h] __int16 v32; // [rsp+7Ah] [rbp-46h] char v33; // [rsp+7Ch] [rbp-44h] BYREF __int16 v34; // [rsp+7Dh] [rbp-43h] char v35; // [rsp+7Fh] [rbp-41h] BYREF __int16 v36; // [rsp+80h] [rbp-40h] char v37; // [rsp+82h] [rbp-3Eh] BYREF unsigned long long v38; // [rsp+98h] [rbp-28h] v38 = __readfsqword(0x28u); v7 = *a1; v8 = a1[2]; v9 = a4 - (_WORD)v8; v10 = a2 - a3; v11 = v10 + a6; v12 = **a1; v13 = (unsigned long long)a1[3] / *(unsigned int *)(v12 + 1980); v27 = v13; v28 = BYTE4(v13); v29 = 10; LODWORD(v13) = *(_DWORD *)(v12 + 1860); v30 = *((_BYTE *)v8 + (unsigned int)(v13 - 3)); if ( v10 + a6 + (int)v13 <= (unsigned int)(a4 - (_DWORD)v8) ) { v16 = a4 - v11; v31 = 5; v32 = v10 + a6; v33 = 1; v34 = v9 - v11; if ( a6 ) { v17 = &v37; v35 = 2; v36 = a6; } else { v17 = &v35; } *v17 = 3; *(_WORD *)(v17 + 1) = a5; v14 = v17 + 3; v23 = v16; v24 = a5; v15 = 4; } else { v14 = &v33; v31 = 5; v32 = v10; v15 = 3; a5 = 0; } v21 = &v26; v18 = v14 - (char *)&v26; v22 = (unsigned int)v18; *((_DWORD *)a1 + 9) = *((_DWORD *)a1 + 8); return translog_write_record( (unsigned long long)v25, &byte_9[3], v7[1], v7, (unsigned int)v18 + a5, v15, &v20, &v26, 0LL); }
_ma_log_del_prefix: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0xa0 MOV R10,RCX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX MOV RCX,qword ptr [RDI] MOV R14,qword ptr [RDI + 0x10] MOV R11D,R10D SUB R11D,R14D SUB ESI,EDX LEA EBX,[RSI + R9*0x1] MOV RAX,qword ptr [RDI + 0x18] MOV R15,qword ptr [RCX] MOV R12D,dword ptr [R15 + 0x7bc] XOR EDX,EDX DIV R12 MOV dword ptr [RBP + -0x4e],EAX SHR RAX,0x20 MOV byte ptr [RBP + -0x4a],AL MOV byte ptr [RBP + -0x49],0xa MOV EAX,dword ptr [R15 + 0x744] LEA EDX,[RAX + -0x3] MOV DL,byte ptr [R14 + RDX*0x1] MOV byte ptr [RBP + -0x48],DL ADD EAX,EBX CMP EAX,R11D JBE 0x0015a982 LEA RAX,[RBP + -0x44] MOV byte ptr [RAX + -0x3],0x5 MOV word ptr [RAX + -0x2],SI MOV R9D,0x3 XOR R8D,R8D JMP 0x0015a9d6 LAB_0015a982: SUB R11D,EBX MOV EAX,EBX SUB R10,RAX MOV byte ptr [RBP + -0x47],0x5 MOV word ptr [RBP + -0x46],BX MOV byte ptr [RBP + -0x44],0x1 MOV word ptr [RBP + -0x43],R11W TEST R9D,R9D JZ 0x0015a9af LEA RAX,[RBP + -0x3e] MOV byte ptr [RAX + -0x3],0x2 MOV word ptr [RAX + -0x2],R9W JMP 0x0015a9b3 LAB_0015a9af: LEA RAX,[RBP + -0x41] LAB_0015a9b3: MOV byte ptr [RAX],0x3 MOV word ptr [RAX + 0x1],R8W ADD RAX,0x3 MOV qword ptr [RBP + -0x90],R10 MOV EDX,R8D MOV qword ptr [RBP + -0x88],RDX MOV R9D,0x4 LAB_0015a9d6: LEA R10,[RBP + -0x50] LEA R11,[RBP + -0xc0] MOV qword ptr [R11 + 0x20],R10 SUB RAX,R10 MOV EDX,EAX MOV qword ptr [R11 + 0x28],RDX MOV EDX,dword ptr [RDI + 0x20] MOV dword ptr [RDI + 0x24],EDX MOV RDX,qword ptr [RCX + 0x8] ADD R8D,EAX SUB RSP,0x8 LEA RDI,[RBP + -0x58] MOV ESI,0xc PUSH 0x0 PUSH R10 PUSH R11 CALL 0x0012d77c ADD RSP,0x20 MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x28] JNZ 0x0015aa36 ADD RSP,0xa0 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0015aa36: CALL 0x0012b280
void _ma_log_del_prefix(long *param_1,int param_2,int param_3,long param_4,uint param_5,int param_6) { long *plVar1; int1 auVar2 [16]; int iVar3; uint uVar4; int1 *puVar5; int8 uVar6; uint uVar7; long in_FS_OFFSET; int1 local_c8 [32]; int1 *local_a8; ulong local_a0; long local_98; ulong local_90; int1 local_60 [8]; int1 local_58 [2]; int4 local_56; int1 local_52; int1 local_51; int1 local_50; int1 local_4f; short local_4e; int1 local_4c; short local_4b; int1 local_49; int2 local_48; int1 local_46 [22]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); plVar1 = (long *)*param_1; uVar7 = (int)param_4 - (int)param_1[2]; uVar4 = (param_2 - param_3) + param_6; auVar2._8_8_ = 0; auVar2._0_8_ = param_1[3]; auVar2 = auVar2 / ZEXT416(*(uint *)(*plVar1 + 0x7bc)); local_56 = auVar2._0_4_; local_52 = auVar2[4]; local_51 = 10; iVar3 = *(int *)(*plVar1 + 0x744); local_50 = *(int1 *)(param_1[2] + (ulong)(iVar3 - 3)); if (uVar7 < iVar3 + uVar4) { iVar3 = (int)&local_4c; local_4e = (short)(param_2 - param_3); uVar6 = 3; param_5 = 0; } else { local_4e = (short)uVar4; local_4b = (short)uVar7 - local_4e; local_98 = param_4 - (ulong)uVar4; local_4c = 1; if (param_6 == 0) { puVar5 = &local_49; } else { puVar5 = local_46; local_49 = 2; local_48 = (int2)param_6; } *puVar5 = 3; *(short *)(puVar5 + 1) = (short)param_5; iVar3 = (int)puVar5 + 3; local_90 = (ulong)param_5; uVar6 = 4; } local_4f = 5; local_a8 = local_58; uVar4 = iVar3 - (int)local_a8; local_a0 = (ulong)uVar4; *(int *)((long)param_1 + 0x24) = (int)param_1[4]; translog_write_record(local_60,0xc,plVar1[1],plVar1,param_5 + uVar4,uVar6,local_c8,local_a8,0); if (*(long *)(in_FS_OFFSET + 0x28) == local_30) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
13,264
my_context_continue
eloqsql/libmariadb/libmariadb/ma_context.c
int my_context_continue(struct my_context *c) { int ret; __asm__ __volatile__ ( "movq (%[save]), %%rax\n\t" "movq %%rsp, (%[save])\n\t" "movq %%rax, %%rsp\n\t" "movq 8(%[save]), %%rax\n\t" "movq %%rbp, 8(%[save])\n\t" "movq %%rax, %%rbp\n\t" "movq 24(%[save]), %%rax\n\t" "movq %%r12, 24(%[save])\n\t" "movq %%rax, %%r12\n\t" "movq 32(%[save]), %%rax\n\t" "movq %%r13, 32(%[save])\n\t" "movq %%rax, %%r13\n\t" "movq 40(%[save]), %%rax\n\t" "movq %%r14, 40(%[save])\n\t" "movq %%rax, %%r14\n\t" "movq 48(%[save]), %%rax\n\t" "movq %%r15, 48(%[save])\n\t" "movq %%rax, %%r15\n\t" "leaq 1f(%%rip), %%rax\n\t" "leaq 2f(%%rip), %%rcx\n\t" "movq %%rax, 56(%[save])\n\t" "movq 64(%[save]), %%rax\n\t" "movq %%rcx, 64(%[save])\n\t" "movq 16(%[save]), %%rcx\n\t" "movq %%rbx, 16(%[save])\n\t" "movq %%rcx, %%rbx\n\t" "jmpq *%%rax\n" /* Come here when operation is done. Be sure to use the same callee-save register for %[save] here and in my_context_spawn(), so we preserve the value correctly at this point. */ "1:\n\t" "movq (%[save]), %%rsp\n\t" "movq 8(%[save]), %%rbp\n\t" /* %rbx is preserved from my_context_spawn() in this case. */ "movq 24(%[save]), %%r12\n\t" "movq 32(%[save]), %%r13\n\t" "movq 40(%[save]), %%r14\n\t" "movq 48(%[save]), %%r15\n\t" "xorl %[ret], %[ret]\n\t" "jmp 3f\n" /* Come here when operation is suspended. */ "2:\n\t" "movl $1, %[ret]\n" "3:\n" : [ret] "=a" (ret) : /* Need this in callee-save register to preserve in function call. */ [save] "b" (&c->save[0]) : "rcx", "rdx", "rsi", "rdi", "r8", "r9", "r10", "r11", "memory", "cc" ); return ret; }
O3
c
my_context_continue: pushq %rbp movq %rsp, %rbp pushq %rbx movq %rdi, %rbx movq (%rbx), %rax movq %rsp, (%rbx) movq %rax, %rsp movq 0x8(%rbx), %rax movq %rbp, 0x8(%rbx) movq %rax, %rbp movq 0x18(%rbx), %rax movq %r12, 0x18(%rbx) movq %rax, %r12 movq 0x20(%rbx), %rax movq %r13, 0x20(%rbx) movq %rax, %r13 movq 0x28(%rbx), %rax movq %r14, 0x28(%rbx) movq %rax, %r14 movq 0x30(%rbx), %rax movq %r15, 0x30(%rbx) movq %rax, %r15 leaq 0x20(%rip), %rax # 0x71a06 leaq 0x34(%rip), %rcx # 0x71a21 movq %rax, 0x38(%rbx) movq 0x40(%rbx), %rax movq %rcx, 0x40(%rbx) movq 0x10(%rbx), %rcx movq %rbx, 0x10(%rbx) movq %rcx, %rbx jmpq *%rax movq (%rbx), %rsp movq 0x8(%rbx), %rbp movq 0x18(%rbx), %r12 movq 0x20(%rbx), %r13 movq 0x28(%rbx), %r14 movq 0x30(%rbx), %r15 xorl %eax, %eax jmp 0x71a26 movl $0x1, %eax popq %rbx popq %rbp retq
my_context_continue: push rbp mov rbp, rsp push rbx mov rbx, rdi mov rax, [rbx] mov [rbx], rsp mov rsp, rax mov rax, [rbx+8] mov [rbx+8], rbp mov rbp, rax mov rax, [rbx+18h] mov [rbx+18h], r12 mov r12, rax mov rax, [rbx+20h] mov [rbx+20h], r13 mov r13, rax mov rax, [rbx+28h] mov [rbx+28h], r14 mov r14, rax mov rax, [rbx+30h] mov [rbx+30h], r15 mov r15, rax lea rax, sub_71A06 lea rcx, loc_71A21 mov [rbx+38h], rax mov rax, [rbx+40h] mov [rbx+40h], rcx mov rcx, [rbx+10h] mov [rbx+10h], rbx mov rbx, rcx jmp rax
long long my_context_continue(_QWORD *a1) { long long v1; // r12 long long v2; // r13 long long v3; // r14 long long v4; // r15 long long (*v5)(void); // rax long long v7; // [rsp+0h] [rbp-8h] BYREF long long savedregs; // [rsp+8h] [rbp+0h] BYREF *a1 = &v7; a1[1] = &savedregs; a1[3] = v1; a1[4] = v2; a1[5] = v3; a1[6] = v4; a1[7] = sub_71A06; v5 = (long long (*)(void))a1[8]; a1[8] = &loc_71A21; a1[2] = a1; return v5(); }
my_context_continue: PUSH RBP MOV RBP,RSP PUSH RBX MOV RBX,RDI MOV RAX,qword ptr [RBX] MOV qword ptr [RBX],RSP MOV RSP,RAX MOV RAX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x8],RBP MOV RBP,RAX MOV RAX,qword ptr [RBX + 0x18] MOV qword ptr [RBX + 0x18],R12 MOV R12,RAX MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [RBX + 0x20],R13 MOV R13,RAX MOV RAX,qword ptr [RBX + 0x28] MOV qword ptr [RBX + 0x28],R14 MOV R14,RAX MOV RAX,qword ptr [RBX + 0x30] MOV qword ptr [RBX + 0x30],R15 MOV R15,RAX LEA RAX,[0x171a06] LEA RCX,[0x171a21] MOV qword ptr [RBX + 0x38],RAX MOV RAX,qword ptr [RBX + 0x40] MOV qword ptr [RBX + 0x40],RCX MOV RCX,qword ptr [RBX + 0x10] MOV qword ptr [RBX + 0x10],RBX MOV RBX,RCX JMP RAX
void my_context_continue(long param_1) { code *UNRECOVERED_JUMPTABLE; int8 unaff_R12; int8 unaff_R13; int8 unaff_R14; int8 unaff_R15; *(int1 **)param_1 = &stack0xfffffffffffffff0; *(int1 **)(param_1 + 8) = &stack0xfffffffffffffff8; *(int8 *)(param_1 + 0x18) = unaff_R12; *(int8 *)(param_1 + 0x20) = unaff_R13; *(int8 *)(param_1 + 0x28) = unaff_R14; *(int8 *)(param_1 + 0x30) = unaff_R15; *(int1 **)(param_1 + 0x38) = &LAB_00171a06; UNRECOVERED_JUMPTABLE = *(code **)(param_1 + 0x40); *(int1 **)(param_1 + 0x40) = &LAB_00171a21; *(long *)(param_1 + 0x10) = param_1; /* WARNING: Could not recover jumptable at 0x00171a04. Too many branches */ /* WARNING: Treating indirect jump as call */ (*UNRECOVERED_JUMPTABLE)(); return; }
13,265
my_os_charset_to_mysql_charset
eloqsql/mysys/charset.c
static const char* my_os_charset_to_mysql_charset(const char* csname) { const MY_CSET_OS_NAME* csp; for (csp = charsets; csp->os_name; csp++) { if (!strcasecmp(csp->os_name, csname)) { switch (csp->param) { case my_cs_exact: return csp->my_name; case my_cs_approx: /* Maybe we should print a warning eventually: character set correspondence is not exact. */ return csp->my_name; default: return NULL; } } } return NULL; }
O0
c
my_os_charset_to_mysql_charset: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) leaq 0x1a02ad(%rip), %rax # 0x1d0850 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax cmpq $0x0, (%rax) je 0x30616 movq -0x18(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rsi callq 0x25310 cmpl $0x0, %eax jne 0x30606 movq -0x18(%rbp), %rax movl 0x10(%rax), %eax movl %eax, -0x1c(%rbp) testl %eax, %eax je 0x305e0 jmp 0x305d6 movl -0x1c(%rbp), %eax subl $0x1, %eax je 0x305ee jmp 0x305fc movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x8(%rbp) jmp 0x3061e movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x8(%rbp) jmp 0x3061e movq $0x0, -0x8(%rbp) jmp 0x3061e jmp 0x30608 movq -0x18(%rbp), %rax addq $0x18, %rax movq %rax, -0x18(%rbp) jmp 0x305a7 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
my_os_charset_to_mysql_charset: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi lea rax, charsets mov [rbp+var_18], rax loc_305A7: mov rax, [rbp+var_18] cmp qword ptr [rax], 0 jz short loc_30616 mov rax, [rbp+var_18] mov rdi, [rax] mov rsi, [rbp+var_10] call _strcasecmp cmp eax, 0 jnz short loc_30606 mov rax, [rbp+var_18] mov eax, [rax+10h] mov [rbp+var_1C], eax test eax, eax jz short loc_305E0 jmp short $+2 loc_305D6: mov eax, [rbp+var_1C] sub eax, 1 jz short loc_305EE jmp short loc_305FC loc_305E0: mov rax, [rbp+var_18] mov rax, [rax+8] mov [rbp+var_8], rax jmp short loc_3061E loc_305EE: mov rax, [rbp+var_18] mov rax, [rax+8] mov [rbp+var_8], rax jmp short loc_3061E loc_305FC: mov [rbp+var_8], 0 jmp short loc_3061E loc_30606: jmp short $+2 loc_30608: mov rax, [rbp+var_18] add rax, 18h mov [rbp+var_18], rax jmp short loc_305A7 loc_30616: mov [rbp+var_8], 0 loc_3061E: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
char * my_os_charset_to_mysql_charset(long long a1) { int v2; // [rsp+4h] [rbp-1Ch] char **i; // [rsp+8h] [rbp-18h] for ( i = charsets; ; i += 3 ) { if ( !*i ) return 0LL; if ( !(unsigned int)strcasecmp(*i, a1) ) break; } v2 = *((_DWORD *)i + 4); if ( !v2 ) return i[1]; if ( v2 == 1 ) return i[1]; return 0LL; }
my_os_charset_to_mysql_charset: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI LEA RAX,[0x2d0850] MOV qword ptr [RBP + -0x18],RAX LAB_001305a7: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX],0x0 JZ 0x00130616 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] CALL 0x00125310 CMP EAX,0x0 JNZ 0x00130606 MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x10] MOV dword ptr [RBP + -0x1c],EAX TEST EAX,EAX JZ 0x001305e0 JMP 0x001305d6 LAB_001305d6: MOV EAX,dword ptr [RBP + -0x1c] SUB EAX,0x1 JZ 0x001305ee JMP 0x001305fc LAB_001305e0: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x8],RAX JMP 0x0013061e LAB_001305ee: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x8],RAX JMP 0x0013061e LAB_001305fc: MOV qword ptr [RBP + -0x8],0x0 JMP 0x0013061e LAB_00130606: JMP 0x00130608 LAB_00130608: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x18 MOV qword ptr [RBP + -0x18],RAX JMP 0x001305a7 LAB_00130616: MOV qword ptr [RBP + -0x8],0x0 LAB_0013061e: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
int * my_os_charset_to_mysql_charset(char *param_1) { int iVar1; int **local_20; local_20 = &charsets; while( true ) { if (*local_20 == (int *)0x0) { return (int *)0x0; } iVar1 = strcasecmp(*local_20,param_1); if (iVar1 == 0) break; local_20 = local_20 + 3; } if (*(int *)(local_20 + 2) != 0) { if (*(int *)(local_20 + 2) != 1) { return (int *)0x0; } return local_20[1]; } return local_20[1]; }
13,266
delete_tails
eloqsql/storage/maria/ma_blockrec.c
static my_bool delete_tails(MARIA_HA *info, MARIA_RECORD_POS *tails) { my_bool res= 0; DBUG_ENTER("delete_tails"); for (; *tails; tails++) { if (delete_head_or_tail(info, ma_recordpos_to_page(*tails), ma_recordpos_to_dir_entry(*tails), 0, 1)) res= 1; } DBUG_RETURN(res); }
O0
c
delete_tails: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movb $0x0, -0x11(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, (%rax) je 0x814a1 movq -0x8(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x807d0 movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x807f0 movq -0x28(%rbp), %rdi movq -0x20(%rbp), %rsi movl %eax, %edx xorl %ecx, %ecx movl $0x1, %r8d callq 0x80430 cmpb $0x0, %al je 0x81491 movb $0x1, -0x11(%rbp) jmp 0x81493 movq -0x10(%rbp), %rax addq $0x8, %rax movq %rax, -0x10(%rbp) jmp 0x81444 jmp 0x814a3 movb -0x11(%rbp), %al movb %al, -0x29(%rbp) movb -0x29(%rbp), %al addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
delete_tails: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_11], 0 loc_81444: mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jz short loc_814A1 mov rax, [rbp+var_8] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rdi, [rax] call ma_recordpos_to_page mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] call ma_recordpos_to_dir_entry mov rdi, [rbp+var_28] mov rsi, [rbp+var_20] mov edx, eax xor ecx, ecx mov r8d, 1 call delete_head_or_tail cmp al, 0 jz short loc_81491 mov [rbp+var_11], 1 loc_81491: jmp short $+2 loc_81493: mov rax, [rbp+var_10] add rax, 8 mov [rbp+var_10], rax jmp short loc_81444 loc_814A1: jmp short $+2 loc_814A3: mov al, [rbp+var_11] mov [rbp+var_29], al mov al, [rbp+var_29] add rsp, 30h pop rbp retn
char delete_tails(long long *a1, unsigned long long *a2) { unsigned int v2; // eax unsigned long long v4; // [rsp+10h] [rbp-20h] char v5; // [rsp+1Fh] [rbp-11h] v5 = 0; while ( *a2 ) { v4 = ma_recordpos_to_page(*a2); v2 = ma_recordpos_to_dir_entry(*a2); if ( delete_head_or_tail(a1, v4, v2, 0, 1) ) v5 = 1; ++a2; } return v5; }
delete_tails: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV byte ptr [RBP + -0x11],0x0 LAB_00181444: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JZ 0x001814a1 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x001807d0 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x001807f0 MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,EAX XOR ECX,ECX MOV R8D,0x1 CALL 0x00180430 CMP AL,0x0 JZ 0x00181491 MOV byte ptr [RBP + -0x11],0x1 LAB_00181491: JMP 0x00181493 LAB_00181493: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x8 MOV qword ptr [RBP + -0x10],RAX JMP 0x00181444 LAB_001814a1: JMP 0x001814a3 LAB_001814a3: MOV AL,byte ptr [RBP + -0x11] MOV byte ptr [RBP + -0x29],AL MOV AL,byte ptr [RBP + -0x29] ADD RSP,0x30 POP RBP RET
int1 delete_tails(int8 param_1,long *param_2) { char cVar1; int4 uVar2; int8 uVar3; int1 local_19; long *local_18; local_19 = 0; for (local_18 = param_2; *local_18 != 0; local_18 = local_18 + 1) { uVar3 = ma_recordpos_to_page(*local_18); uVar2 = ma_recordpos_to_dir_entry(*local_18); cVar1 = delete_head_or_tail(param_1,uVar3,uVar2,0,1); if (cVar1 != '\0') { local_19 = 1; } } return local_19; }
13,267
LEX::sp_proc_stmt_statement_finalize_buf(THD*, st_mysql_const_lex_string const&)
eloqsql/sql/sql_lex.cc
bool LEX::sp_proc_stmt_statement_finalize_buf(THD *thd, const LEX_CSTRING &qbuf) { sphead->m_flags|= sp_get_flags_for_command(this); /* "USE db" doesn't work in a procedure */ if (unlikely(sql_command == SQLCOM_CHANGE_DB)) { my_error(ER_SP_BADSTATEMENT, MYF(0), "USE"); return true; } /* Don't add an instruction for SET statements, since all instructions for them were already added during processing of "set" rule. */ DBUG_ASSERT(sql_command != SQLCOM_SET_OPTION || var_list.is_empty()); if (sql_command != SQLCOM_SET_OPTION) return new_sp_instr_stmt(thd, empty_clex_str, qbuf); return false; }
O0
cpp
LEX::sp_proc_stmt_statement_finalize_buf(THD*, st_mysql_const_lex_string const&): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x28(%rbp) callq 0x9007e0 movl %eax, %edx movq -0x28(%rbp), %rax movq 0x1960(%rax), %rcx orl 0x90(%rcx), %edx movl %edx, 0x90(%rcx) cmpl $0x23, 0x8(%rax) sete %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x9c8578 movl $0x522, %edi # imm = 0x522 xorl %eax, %eax movl %eax, %esi leaq 0xa3b8af(%rip), %rdx # 0x1403e1a movb $0x0, %al callq 0x131c1e0 movb $0x1, -0x1(%rbp) jmp 0x9c85a9 jmp 0x9c857a jmp 0x9c857c movq -0x28(%rbp), %rax cmpl $0x1f, 0x8(%rax) je 0x9c85a5 movq -0x28(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rcx leaq 0x103000f(%rip), %rdx # 0x19f85a8 callq 0x9acab0 andb $0x1, %al movb %al, -0x1(%rbp) jmp 0x9c85a9 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN3LEX35sp_proc_stmt_statement_finalize_bufEP3THDRK25st_mysql_const_lex_string: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rdi, [rbp+var_10]; LEX * mov [rbp+var_28], rdi call _Z24sp_get_flags_for_commandP3LEX; sp_get_flags_for_command(LEX *) mov edx, eax mov rax, [rbp+var_28] mov rcx, [rax+1960h] or edx, [rcx+90h] mov [rcx+90h], edx cmp dword ptr [rax+8], 23h ; '#' setz al and al, 1 movzx eax, al cmp eax, 0 jz short loc_9C8578 mov edi, 522h xor eax, eax mov esi, eax lea rdx, aErTooManyDefin+23h; "USE" mov al, 0 call my_error mov [rbp+var_1], 1 jmp short loc_9C85A9 loc_9C8578: jmp short $+2 loc_9C857A: jmp short $+2 loc_9C857C: mov rax, [rbp+var_28] cmp dword ptr [rax+8], 1Fh jz short loc_9C85A5 mov rdi, [rbp+var_28] mov rsi, [rbp+var_18] mov rcx, [rbp+var_20] lea rdx, empty_clex_str call _ZN3LEX17new_sp_instr_stmtEP3THDRK25st_mysql_const_lex_stringS4_; LEX::new_sp_instr_stmt(THD *,st_mysql_const_lex_string const&,st_mysql_const_lex_string const&) and al, 1 mov [rbp+var_1], al jmp short loc_9C85A9 loc_9C85A5: mov [rbp+var_1], 0 loc_9C85A9: mov al, [rbp+var_1] and al, 1 add rsp, 30h pop rbp retn
bool LEX::sp_proc_stmt_statement_finalize_buf(long long a1, long long a2, _QWORD *a3) { int flags_for_command; // eax int v4; // r8d int v5; // r9d long long v6; // rcx flags_for_command = sp_get_flags_for_command((LEX *)a1); v6 = *(_QWORD *)(a1 + 6496); *(_DWORD *)(v6 + 144) |= flags_for_command; if ( *(_DWORD *)(a1 + 8) == 35 ) { my_error(1314, 0, (unsigned int)"USE", v6, v4, v5); return 1; } else { return *(_DWORD *)(a1 + 8) != 31 && LEX::new_sp_instr_stmt((sp_head **)a1, a2, &empty_clex_str, a3); } }
get_sel_arg_for_keypart: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX CMP qword ptr [RBP + -0x18],0x0 JNZ 0x009c8534 MOV byte ptr [RBP + -0x1],0x0 JMP 0x009c8609 LAB_009c8534: MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x100] TEST AL,0x1 JNZ 0x009c854f JMP 0x009c8563 LAB_009c854f: MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV byte ptr [RBP + -0x1],0x0 JMP 0x009c8609 LAB_009c8563: MOV qword ptr [RBP + -0x28],0x0 MOV RDI,qword ptr [RBP + -0x18] CALL 0x009aa9c0 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX LAB_009c8580: CMP qword ptr [RBP + -0x38],0x0 JZ 0x009c85fa MOV qword ptr [RBP + -0x40],0x0 MOV RAX,qword ptr [RBP + -0x38] CMP qword ptr [RAX + 0x58],0x0 JZ 0x009c85bd MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RAX + 0x58] LEA RDX,[RBP + -0x40] CALL 0x009c8510 TEST AL,0x1 JNZ 0x009c85b5 JMP 0x009c85bb LAB_009c85b5: MOV byte ptr [RBP + -0x1],0x1 JMP 0x009c8609 LAB_009c85bb: JMP 0x009c85bd LAB_009c85bd: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x009c85d1 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x28],RAX JMP 0x009c85ea LAB_009c85d1: MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x40] CALL 0x009c92b0 TEST AL,0x1 JNZ 0x009c85e8 MOV byte ptr [RBP + -0x1],0x1 JMP 0x009c8609 LAB_009c85e8: JMP 0x009c85ea LAB_009c85ea: JMP 0x009c85ec LAB_009c85ec: MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBP + -0x38],RAX JMP 0x009c8580 LAB_009c85fa: MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV byte ptr [RBP + -0x1],0x0 LAB_009c8609: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x40 POP RBP RET
/* get_sel_arg_for_keypart(Field*, SEL_ARG*, SEL_ARG**) */ int1 get_sel_arg_for_keypart(Field *param_1,SEL_ARG *param_2,SEL_ARG **param_3) { ulong uVar1; SEL_ARG *local_48; long local_40; long local_38; SEL_ARG *local_30; SEL_ARG **local_28; SEL_ARG *local_20; Field *local_18; if (param_2 != (SEL_ARG *)0x0) { local_28 = param_3; local_20 = param_2; local_18 = param_1; uVar1 = (**(code **)(**(long **)(param_2 + 0x18) + 0x100))(*(long **)(param_2 + 0x18),param_1); if ((uVar1 & 1) == 0) { local_30 = (SEL_ARG *)0x0; local_40 = SEL_ARG::first(local_20); local_38 = local_40; for (; local_40 != 0; local_40 = *(long *)(local_40 + 0x40)) { local_48 = (SEL_ARG *)0x0; if ((*(long *)(local_40 + 0x58) != 0) && (uVar1 = get_sel_arg_for_keypart(local_18,*(SEL_ARG **)(local_40 + 0x58),&local_48), (uVar1 & 1) != 0)) { return 1; } if (local_40 == local_38) { local_30 = local_48; } else { uVar1 = all_same(local_30,local_48); if ((uVar1 & 1) == 0) { return 1; } } } *local_28 = local_30; } else { *local_28 = local_20; } } return 0; }
13,268
LEX::sp_proc_stmt_statement_finalize_buf(THD*, st_mysql_const_lex_string const&)
eloqsql/sql/sql_lex.cc
bool LEX::sp_proc_stmt_statement_finalize_buf(THD *thd, const LEX_CSTRING &qbuf) { sphead->m_flags|= sp_get_flags_for_command(this); /* "USE db" doesn't work in a procedure */ if (unlikely(sql_command == SQLCOM_CHANGE_DB)) { my_error(ER_SP_BADSTATEMENT, MYF(0), "USE"); return true; } /* Don't add an instruction for SET statements, since all instructions for them were already added during processing of "set" rule. */ DBUG_ASSERT(sql_command != SQLCOM_SET_OPTION || var_list.is_empty()); if (sql_command != SQLCOM_SET_OPTION) return new_sp_instr_stmt(thd, empty_clex_str, qbuf); return false; }
O3
cpp
LEX::sp_proc_stmt_statement_finalize_buf(THD*, st_mysql_const_lex_string const&): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 callq 0x763d2f movq 0x1960(%r15), %rcx orl %eax, 0x90(%rcx) movl 0x8(%r15), %eax cmpl $0x1f, %eax je 0x7d2c2c cmpl $0x23, %eax je 0x7d2c39 leaq 0xbd8ff4(%rip), %rdx # 0x13abc08 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rcx addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x7c27fe xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x5b28b6(%rip), %rdx # 0xd854f6 movl $0x522, %edi # imm = 0x522 xorl %esi, %esi xorl %eax, %eax callq 0xcf1ebf movb $0x1, %al jmp 0x7d2c2e
_ZN3LEX35sp_proc_stmt_statement_finalize_bufEP3THDRK25st_mysql_const_lex_string: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdx mov r14, rsi mov r15, rdi call _Z24sp_get_flags_for_commandP3LEX; sp_get_flags_for_command(LEX *) mov rcx, [r15+1960h] or [rcx+90h], eax mov eax, [r15+8] cmp eax, 1Fh jz short loc_7D2C2C cmp eax, 23h ; '#' jz short loc_7D2C39 lea rdx, empty_clex_str mov rdi, r15 mov rsi, r14 mov rcx, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _ZN3LEX17new_sp_instr_stmtEP3THDRK25st_mysql_const_lex_stringS4_; LEX::new_sp_instr_stmt(THD *,st_mysql_const_lex_string const&,st_mysql_const_lex_string const&) loc_7D2C2C: xor eax, eax loc_7D2C2E: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_7D2C39: lea rdx, aErTooManyDefin+23h; "USE" mov edi, 522h xor esi, esi xor eax, eax call my_error mov al, 1 jmp short loc_7D2C2E
char LEX::sp_proc_stmt_statement_finalize_buf(long long a1, long long a2, _QWORD *a3) { int flags_for_command; // eax int v5; // r8d int v6; // r9d long long v7; // rcx int v8; // eax flags_for_command = sp_get_flags_for_command((LEX *)a1); v7 = *(_QWORD *)(a1 + 6496); *(_DWORD *)(v7 + 144) |= flags_for_command; v8 = *(_DWORD *)(a1 + 8); if ( v8 == 31 ) return 0; if ( v8 != 35 ) return LEX::new_sp_instr_stmt(a1, a2, &empty_clex_str, a3); my_error(1314, 0, (unsigned int)"USE", v7, v5, v6); return 1; }
13,269
ma_stmt_execute_generate_request
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
unsigned char* ma_stmt_execute_generate_request(MYSQL_STMT *stmt, size_t *request_len, my_bool internal) { unsigned char *buf; if (stmt->request_buffer) { *request_len= stmt->request_length; buf= stmt->request_buffer; /* store actual stmt id */ int4store(buf, stmt->stmt_id); /* clear buffer, memory will be freed in execute */ stmt->request_buffer= NULL; stmt->request_length= 0; return buf; } if (stmt->array_size > 0) buf= ma_stmt_execute_generate_bulk_request(stmt, request_len); else buf= ma_stmt_execute_generate_simple_request(stmt, request_len); if (internal) { if (stmt->request_buffer) free(stmt->request_buffer); stmt->request_buffer= buf; stmt->request_length= *request_len; } return buf; }
O0
c
ma_stmt_execute_generate_request: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb %dl, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movb %al, -0x19(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x360(%rax) je 0x2c24f movq -0x10(%rbp), %rax movq 0x398(%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movq 0x360(%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, (%rax) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax shrq $0x8, %rax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, 0x1(%rax) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax shrq $0x10, %rax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, 0x2(%rax) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax shrq $0x18, %rax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, 0x3(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x360(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x398(%rax) movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x2c2cd movq -0x10(%rbp), %rax cmpl $0x0, 0x368(%rax) jbe 0x2c26f movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x2ba80 movq %rax, -0x28(%rbp) jmp 0x2c280 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x2b3b0 movq %rax, -0x28(%rbp) cmpb $0x0, -0x19(%rbp) je 0x2c2c5 movq -0x10(%rbp), %rax cmpq $0x0, 0x360(%rax) je 0x2c2a4 movq -0x10(%rbp), %rax movq 0x360(%rax), %rdi callq 0x13520 movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x360(%rax) movq -0x18(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x398(%rax) movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
ma_stmt_execute_generate_request: push rbp mov rbp, rsp sub rsp, 30h mov al, dl mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_19], al mov rax, [rbp+var_10] cmp qword ptr [rax+360h], 0 jz loc_2C24F mov rax, [rbp+var_10] mov rcx, [rax+398h] mov rax, [rbp+var_18] mov [rax], rcx mov rax, [rbp+var_10] mov rax, [rax+360h] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rax, [rax+40h] mov cl, al mov rax, [rbp+var_28] mov [rax], cl mov rax, [rbp+var_10] mov rax, [rax+40h] shr rax, 8 mov cl, al mov rax, [rbp+var_28] mov [rax+1], cl mov rax, [rbp+var_10] mov rax, [rax+40h] shr rax, 10h mov cl, al mov rax, [rbp+var_28] mov [rax+2], cl mov rax, [rbp+var_10] mov rax, [rax+40h] shr rax, 18h mov cl, al mov rax, [rbp+var_28] mov [rax+3], cl mov rax, [rbp+var_10] mov qword ptr [rax+360h], 0 mov rax, [rbp+var_10] mov qword ptr [rax+398h], 0 mov rax, [rbp+var_28] mov [rbp+var_8], rax jmp short loc_2C2CD loc_2C24F: mov rax, [rbp+var_10] cmp dword ptr [rax+368h], 0 jbe short loc_2C26F mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call ma_stmt_execute_generate_bulk_request mov [rbp+var_28], rax jmp short loc_2C280 loc_2C26F: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call ma_stmt_execute_generate_simple_request mov [rbp+var_28], rax loc_2C280: cmp [rbp+var_19], 0 jz short loc_2C2C5 mov rax, [rbp+var_10] cmp qword ptr [rax+360h], 0 jz short loc_2C2A4 mov rax, [rbp+var_10] mov rdi, [rax+360h] call _free loc_2C2A4: mov rcx, [rbp+var_28] mov rax, [rbp+var_10] mov [rax+360h], rcx mov rax, [rbp+var_18] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax+398h], rcx loc_2C2C5: mov rax, [rbp+var_28] mov [rbp+var_8], rax loc_2C2CD: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
char * ma_stmt_execute_generate_request(long long a1, _QWORD *a2, char a3) { long long v4; // [rsp+8h] [rbp-28h] char *bulk_request; // [rsp+8h] [rbp-28h] if ( *(_QWORD *)(a1 + 864) ) { *a2 = *(_QWORD *)(a1 + 920); v4 = *(_QWORD *)(a1 + 864); *(_WORD *)v4 = *(_QWORD *)(a1 + 64); *(_BYTE *)(v4 + 2) = BYTE2(*(_QWORD *)(a1 + 64)); *(_BYTE *)(v4 + 3) = BYTE3(*(_QWORD *)(a1 + 64)); *(_QWORD *)(a1 + 864) = 0LL; *(_QWORD *)(a1 + 920) = 0LL; return (char *)v4; } else { if ( *(_DWORD *)(a1 + 872) ) bulk_request = ma_stmt_execute_generate_bulk_request((_QWORD *)a1, a2); else bulk_request = ma_stmt_execute_generate_simple_request((_QWORD *)a1, a2); if ( a3 ) { if ( *(_QWORD *)(a1 + 864) ) free(*(_QWORD *)(a1 + 864)); *(_QWORD *)(a1 + 864) = bulk_request; *(_QWORD *)(a1 + 920) = *a2; } return bulk_request; } }
ma_stmt_execute_generate_request: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV AL,DL MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV byte ptr [RBP + -0x19],AL MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x360],0x0 JZ 0x0012c24f MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x398] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x360] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x360],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x398],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX JMP 0x0012c2cd LAB_0012c24f: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x368],0x0 JBE 0x0012c26f MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0012ba80 MOV qword ptr [RBP + -0x28],RAX JMP 0x0012c280 LAB_0012c26f: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0012b3b0 MOV qword ptr [RBP + -0x28],RAX LAB_0012c280: CMP byte ptr [RBP + -0x19],0x0 JZ 0x0012c2c5 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x360],0x0 JZ 0x0012c2a4 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x360] CALL 0x00113520 LAB_0012c2a4: MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x360],RCX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x398],RCX LAB_0012c2c5: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX LAB_0012c2cd: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
int1 * ma_stmt_execute_generate_request(long param_1,int8 *param_2,char param_3) { int1 *local_30; int1 *local_10; if (*(long *)(param_1 + 0x360) == 0) { if (*(int *)(param_1 + 0x368) == 0) { local_30 = (int1 *)ma_stmt_execute_generate_simple_request(param_1,param_2); } else { local_30 = (int1 *)ma_stmt_execute_generate_bulk_request(param_1,param_2); } if (param_3 != '\0') { if (*(long *)(param_1 + 0x360) != 0) { free(*(void **)(param_1 + 0x360)); } *(int1 **)(param_1 + 0x360) = local_30; *(int8 *)(param_1 + 0x398) = *param_2; } local_10 = local_30; } else { *param_2 = *(int8 *)(param_1 + 0x398); local_10 = *(int1 **)(param_1 + 0x360); *local_10 = (char)*(int8 *)(param_1 + 0x40); local_10[1] = (char)((ulong)*(int8 *)(param_1 + 0x40) >> 8); local_10[2] = (char)((ulong)*(int8 *)(param_1 + 0x40) >> 0x10); local_10[3] = (char)((ulong)*(int8 *)(param_1 + 0x40) >> 0x18); *(int8 *)(param_1 + 0x360) = 0; *(int8 *)(param_1 + 0x398) = 0; } return local_10; }
13,270
strlength
eloqsql/mysys/mf_format.c
size_t strlength(const char *str) { reg1 const char * pos; reg2 const char * found; DBUG_ENTER("strlength"); pos= found= str; while (*pos) { if (*pos != ' ') { while (*++pos && *pos != ' ') {}; if (!*pos) { found=pos; /* String ends here */ break; } } found=pos; while (*++pos == ' ') {}; } DBUG_RETURN((size_t) (found - str)); }
O0
c
strlength: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax cmpb $0x0, (%rax) je 0x71313 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x20, %eax je 0x712ec jmp 0x7129f movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movsbl 0x1(%rax), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x19(%rbp) je 0x712cc movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x20, %eax setne %al movb %al, -0x19(%rbp) movb -0x19(%rbp), %al testb $0x1, %al jne 0x712d5 jmp 0x712d7 jmp 0x7129f movq -0x10(%rbp), %rax cmpb $0x0, (%rax) jne 0x712ea movq -0x10(%rbp), %rax movq %rax, -0x18(%rbp) jmp 0x71313 jmp 0x712ec movq -0x10(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movsbl 0x1(%rax), %eax cmpl $0x20, %eax jne 0x7130e jmp 0x712f4 jmp 0x71284 jmp 0x71315 movq -0x18(%rbp), %rax movq -0x8(%rbp), %rcx subq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax popq %rbp retq nopw (%rax,%rax)
strlength: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_18], rax mov [rbp+var_10], rax loc_71284: mov rax, [rbp+var_10] cmp byte ptr [rax], 0 jz loc_71313 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 20h ; ' ' jz short loc_712EC jmp short $+2 loc_7129F: mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx movsx ecx, byte ptr [rax+1] xor eax, eax cmp ecx, 0 mov [rbp+var_19], al jz short loc_712CC mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 20h ; ' ' setnz al mov [rbp+var_19], al loc_712CC: mov al, [rbp+var_19] test al, 1 jnz short loc_712D5 jmp short loc_712D7 loc_712D5: jmp short loc_7129F loc_712D7: mov rax, [rbp+var_10] cmp byte ptr [rax], 0 jnz short loc_712EA mov rax, [rbp+var_10] mov [rbp+var_18], rax jmp short loc_71313 loc_712EA: jmp short $+2 loc_712EC: mov rax, [rbp+var_10] mov [rbp+var_18], rax loc_712F4: mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx movsx eax, byte ptr [rax+1] cmp eax, 20h ; ' ' jnz short loc_7130E jmp short loc_712F4 loc_7130E: jmp loc_71284 loc_71313: jmp short $+2 loc_71315: mov rax, [rbp+var_18] mov rcx, [rbp+var_8] sub rax, rcx mov [rbp+var_28], rax mov rax, [rbp+var_28] pop rbp retn
long long strlength(_BYTE *a1) { _BYTE *v1; // rax _BYTE *v2; // rax bool v4; // [rsp+Fh] [rbp-19h] _BYTE *v5; // [rsp+10h] [rbp-18h] _BYTE *v6; // [rsp+18h] [rbp-10h] v5 = a1; v6 = a1; while ( *v6 ) { if ( *v6 != 32 ) { do { v1 = v6++; v4 = 0; if ( v1[1] ) v4 = *v6 != 32; } while ( v4 ); if ( !*v6 ) { v5 = v6; return v5 - a1; } } v5 = v6; do v2 = v6++; while ( v2[1] == 32 ); } return v5 - a1; }
strlength: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX MOV qword ptr [RBP + -0x10],RAX LAB_00171284: MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX],0x0 JZ 0x00171313 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x20 JZ 0x001712ec JMP 0x0017129f LAB_0017129f: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOVSX ECX,byte ptr [RAX + 0x1] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x19],AL JZ 0x001712cc MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x20 SETNZ AL MOV byte ptr [RBP + -0x19],AL LAB_001712cc: MOV AL,byte ptr [RBP + -0x19] TEST AL,0x1 JNZ 0x001712d5 JMP 0x001712d7 LAB_001712d5: JMP 0x0017129f LAB_001712d7: MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX],0x0 JNZ 0x001712ea MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x18],RAX JMP 0x00171313 LAB_001712ea: JMP 0x001712ec LAB_001712ec: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x18],RAX LAB_001712f4: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOVSX EAX,byte ptr [RAX + 0x1] CMP EAX,0x20 JNZ 0x0017130e JMP 0x001712f4 LAB_0017130e: JMP 0x00171284 LAB_00171313: JMP 0x00171315 LAB_00171315: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x8] SUB RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] POP RBP RET
long strlength(char *param_1) { char *pcVar1; char *pcVar2; bool bVar3; char *local_20; char *local_18; local_20 = param_1; local_18 = param_1; while (*local_18 != '\0') { if (*local_18 != ' ') { do { local_20 = local_18 + 1; bVar3 = false; if (local_18[1] != '\0') { bVar3 = *local_20 != ' '; } local_18 = local_20; } while (bVar3); if (*local_20 == '\0') break; } local_20 = local_18; do { pcVar2 = local_18 + 1; pcVar1 = local_18 + 1; local_18 = pcVar2; } while (*pcVar1 == ' '); } return (long)local_20 - (long)param_1; }
13,271
strlength
eloqsql/mysys/mf_format.c
size_t strlength(const char *str) { reg1 const char * pos; reg2 const char * found; DBUG_ENTER("strlength"); pos= found= str; while (*pos) { if (*pos != ' ') { while (*++pos && *pos != ' ') {}; if (!*pos) { found=pos; /* String ends here */ break; } } found=pos; while (*++pos == ' ') {}; } DBUG_RETURN((size_t) (found - str)); }
O3
c
strlength: pushq %rbp movq %rsp, %rbp movb (%rdi), %dl movq %rdi, %rax movq %rdi, %rcx cmpb $0x20, %dl je 0x52afd movzbl %dl, %edx testl %edx, %edx je 0x52b16 movzbl 0x1(%rcx), %eax incq %rcx testl %eax, %eax je 0x52b13 cmpl $0x20, %eax jne 0x52aed movq %rcx, %rsi movb 0x1(%rsi), %dl incq %rsi cmpb $0x20, %dl je 0x52b00 movq %rcx, %rax movq %rsi, %rcx jmp 0x52ae1 movq %rcx, %rax subq %rdi, %rax popq %rbp retq nop
strlength: push rbp mov rbp, rsp mov dl, [rdi] mov rax, rdi mov rcx, rdi loc_52AE1: cmp dl, 20h ; ' ' jz short loc_52AFD movzx edx, dl test edx, edx jz short loc_52B16 loc_52AED: movzx eax, byte ptr [rcx+1] inc rcx test eax, eax jz short loc_52B13 cmp eax, 20h ; ' ' jnz short loc_52AED loc_52AFD: mov rsi, rcx loc_52B00: mov dl, [rsi+1] inc rsi cmp dl, 20h ; ' ' jz short loc_52B00 mov rax, rcx mov rcx, rsi jmp short loc_52AE1 loc_52B13: mov rax, rcx loc_52B16: sub rax, rdi pop rbp retn
long long strlength(_BYTE *a1) { char v1; // dl _BYTE *v2; // rax _BYTE *v3; // rcx int v4; // eax _BYTE *v5; // rsi v1 = *a1; v2 = a1; v3 = a1; while ( v1 == 32 ) { LABEL_6: v5 = v3; do v1 = *++v5; while ( v1 == 32 ); v2 = v3; v3 = v5; } if ( v1 ) { while ( 1 ) { v4 = (unsigned __int8)*++v3; if ( !v4 ) break; if ( v4 == 32 ) goto LABEL_6; } v2 = v3; } return v2 - a1; }
strlength: PUSH RBP MOV RBP,RSP MOV DL,byte ptr [RDI] MOV RAX,RDI MOV RCX,RDI LAB_00152ae1: CMP DL,0x20 JZ 0x00152afd MOVZX EDX,DL TEST EDX,EDX JZ 0x00152b16 LAB_00152aed: MOVZX EAX,byte ptr [RCX + 0x1] INC RCX TEST EAX,EAX JZ 0x00152b13 CMP EAX,0x20 JNZ 0x00152aed LAB_00152afd: MOV RSI,RCX LAB_00152b00: MOV DL,byte ptr [RSI + 0x1] INC RSI CMP DL,0x20 JZ 0x00152b00 MOV RAX,RCX MOV RCX,RSI JMP 0x00152ae1 LAB_00152b13: MOV RAX,RCX LAB_00152b16: SUB RAX,RDI POP RBP RET
long strlength(char *param_1) { char *pcVar1; char *pcVar2; char *pcVar3; char cVar4; char *pcVar5; cVar4 = *param_1; pcVar3 = param_1; pcVar5 = param_1; do { pcVar2 = pcVar5; if (cVar4 != ' ') { if (cVar4 == '\0') { LAB_00152b16: return (long)pcVar3 - (long)param_1; } do { pcVar1 = pcVar5 + 1; pcVar3 = pcVar5 + 1; if (*pcVar1 == '\0') goto LAB_00152b16; pcVar5 = pcVar3; pcVar2 = pcVar3; } while (*pcVar1 != ' '); } do { pcVar3 = pcVar2; cVar4 = pcVar5[1]; pcVar5 = pcVar5 + 1; pcVar2 = pcVar3; } while (cVar4 == ' '); } while( true ); }
13,272
composition_clear
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-blend.c
static void composition_clear(uint32_t* dest, int length, const uint32_t* src, uint32_t const_alpha) { if(const_alpha == 255) { plutovg_memfill32(dest, length, 0); } else { uint32_t ialpha = 255 - const_alpha; for(int i = 0; i < length; i++) { dest[i] = BYTE_MUL(dest[i], ialpha); } } }
O1
c
composition_clear: cmpl $0xff, %ecx jne 0x21467 xorl %edx, %edx jmp 0x1f348 testl %esi, %esi jle 0x214d7 movl $0xff, %eax subl %ecx, %eax movl %esi, %ecx xorl %edx, %edx movl $0xff00ff, %esi # imm = 0xFF00FF movl $0x800080, %r8d # imm = 0x800080 movl (%rdi,%rdx,4), %r9d movl %r9d, %r10d andl %esi, %r10d imull %eax, %r10d movl %r10d, %r11d shrl $0x8, %r11d andl %esi, %r11d addl %r8d, %r10d addl %r11d, %r10d shrl $0x8, %r10d andl %esi, %r10d shrl $0x8, %r9d andl %esi, %r9d imull %eax, %r9d movl %r9d, %r11d shrl $0x8, %r11d andl %esi, %r11d addl %r8d, %r9d addl %r11d, %r9d andl $0xff00ff00, %r9d # imm = 0xFF00FF00 orl %r10d, %r9d movl %r9d, (%rdi,%rdx,4) incq %rdx cmpq %rdx, %rcx jne 0x21481 retq
composition_clear: cmp ecx, 0FFh jnz short loc_21467 xor edx, edx jmp plutovg_memfill32 loc_21467: test esi, esi jle short locret_214D7 mov eax, 0FFh sub eax, ecx mov ecx, esi xor edx, edx mov esi, 0FF00FFh mov r8d, 800080h loc_21481: mov r9d, [rdi+rdx*4] mov r10d, r9d and r10d, esi imul r10d, eax mov r11d, r10d shr r11d, 8 and r11d, esi add r10d, r8d add r10d, r11d shr r10d, 8 and r10d, esi shr r9d, 8 and r9d, esi imul r9d, eax mov r11d, r9d shr r11d, 8 and r11d, esi add r9d, r8d add r9d, r11d and r9d, 0FF00FF00h or r9d, r10d mov [rdi+rdx*4], r9d inc rdx cmp rcx, rdx jnz short loc_21481 locret_214D7: retn
void composition_clear(__m128i *a1, int a2, long long a3, int a4) { int v4; // eax long long i; // rdx if ( a4 == 255 ) { plutovg_memfill32(a1, a2, 0); } else if ( a2 > 0 ) { for ( i = 0LL; i != a2; ++i ) { v4 = 255 - a4; a1->m128i_i32[i] = (((((v4 * (a1->m128i_i32[i] & 0xFF00FFu)) >> 8) & 0xFF00FF) + v4 * (a1->m128i_i32[i] & 0xFF00FF) + 8388736) >> 8) & 0xFF00FF | ((((v4 * (((unsigned __int32)a1->m128i_i32[i] >> 8) & 0xFF00FF)) >> 8) & 0xFF00FF) + v4 * (((unsigned __int32)a1->m128i_i32[i] >> 8) & 0xFF00FF) + 8388736) & 0xFF00FF00; } } }
composition_clear: CMP ECX,0xff JNZ 0x00121467 XOR EDX,EDX JMP 0x0011f348 LAB_00121467: TEST ESI,ESI JLE 0x001214d7 MOV EAX,0xff SUB EAX,ECX MOV ECX,ESI XOR EDX,EDX MOV ESI,0xff00ff MOV R8D,0x800080 LAB_00121481: MOV R9D,dword ptr [RDI + RDX*0x4] MOV R10D,R9D AND R10D,ESI IMUL R10D,EAX MOV R11D,R10D SHR R11D,0x8 AND R11D,ESI ADD R10D,R8D ADD R10D,R11D SHR R10D,0x8 AND R10D,ESI SHR R9D,0x8 AND R9D,ESI IMUL R9D,EAX MOV R11D,R9D SHR R11D,0x8 AND R11D,ESI ADD R9D,R8D ADD R9D,R11D AND R9D,0xff00ff00 OR R9D,R10D MOV dword ptr [RDI + RDX*0x4],R9D INC RDX CMP RCX,RDX JNZ 0x00121481 LAB_001214d7: RET
void composition_clear(long param_1,ulong param_2,int8 param_3,int param_4) { ulong uVar1; uint uVar2; uint uVar3; if (param_4 == 0xff) { plutovg_memfill32(param_1,param_2,0); return; } if (0 < (int)param_2) { uVar1 = 0; do { uVar2 = *(uint *)(param_1 + uVar1 * 4); uVar3 = (uVar2 & 0xff00ff) * (0xff - param_4); uVar2 = (uVar2 >> 8 & 0xff00ff) * (0xff - param_4); *(uint *)(param_1 + uVar1 * 4) = uVar2 + 0x800080 + (uVar2 >> 8 & 0xff00ff) & 0xff00ff00 | uVar3 + 0x800080 + (uVar3 >> 8 & 0xff00ff) >> 8 & 0xff00ff; uVar1 = uVar1 + 1; } while ((param_2 & 0xffffffff) != uVar1); } return; }
13,273
composition_clear
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-blend.c
static void composition_clear(uint32_t* dest, int length, const uint32_t* src, uint32_t const_alpha) { if(const_alpha == 255) { plutovg_memfill32(dest, length, 0); } else { uint32_t ialpha = 255 - const_alpha; for(int i = 0; i < length; i++) { dest[i] = BYTE_MUL(dest[i], ialpha); } } }
O2
c
composition_clear: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %esi, %ebx movq %rdi, %r14 cmpl $0xff, %ecx jne 0x1c913 movq %r14, %rdi movl %ebx, %esi xorl %edx, %edx addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x1b0b8 movl $0xff, %ebp subl %ecx, %ebp xorl %r15d, %r15d testl %ebx, %ebx cmovlel %r15d, %ebx cmpq %r15, %rbx je 0x1c93c movl (%r14,%r15,4), %edi movl %ebp, %esi callq 0x1c849 movl %eax, (%r14,%r15,4) incq %r15 jmp 0x1c923 addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
composition_clear: push rbp push r15 push r14 push rbx push rax mov ebx, esi mov r14, rdi cmp ecx, 0FFh jnz short loc_1C913 mov rdi, r14 mov esi, ebx xor edx, edx add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp plutovg_memfill32 loc_1C913: mov ebp, 0FFh sub ebp, ecx xor r15d, r15d test ebx, ebx cmovle ebx, r15d loc_1C923: cmp rbx, r15 jz short loc_1C93C mov edi, [r14+r15*4] mov esi, ebp call BYTE_MUL mov [r14+r15*4], eax inc r15 jmp short loc_1C923 loc_1C93C: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
__m128i * composition_clear(__m128i *a1, int a2, long long a3, int a4) { long long v4; // rbx __m128i *result; // rax int v6; // ebp long long v7; // r15 v4 = (unsigned int)a2; if ( a4 == 255 ) return plutovg_memfill32(a1, a2, 0); v6 = 255 - a4; v7 = 0LL; if ( a2 <= 0 ) v4 = 0LL; while ( v4 != v7 ) { result = (__m128i *)BYTE_MUL(a1->m128i_u32[v7], v6); a1->m128i_i32[v7++] = (int)result; } return result; }
composition_clear: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBX,ESI MOV R14,RDI CMP ECX,0xff JNZ 0x0011c913 MOV RDI,R14 MOV ESI,EBX XOR EDX,EDX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x0011b0b8 LAB_0011c913: MOV EBP,0xff SUB EBP,ECX XOR R15D,R15D TEST EBX,EBX CMOVLE EBX,R15D LAB_0011c923: CMP RBX,R15 JZ 0x0011c93c MOV EDI,dword ptr [R14 + R15*0x4] MOV ESI,EBP CALL 0x0011c849 MOV dword ptr [R14 + R15*0x4],EAX INC R15 JMP 0x0011c923 LAB_0011c93c: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void composition_clear(long param_1,uint param_2,int8 param_3,int param_4) { int4 uVar1; ulong uVar2; ulong uVar3; if (param_4 == 0xff) { plutovg_memfill32(param_1,param_2,0); return; } uVar3 = 0; uVar2 = (ulong)param_2; if ((int)param_2 < 1) { uVar2 = uVar3; } for (; uVar2 != uVar3; uVar3 = uVar3 + 1) { uVar1 = BYTE_MUL(*(int4 *)(param_1 + uVar3 * 4),0xff - param_4); *(int4 *)(param_1 + uVar3 * 4) = uVar1; } return; }
13,274
minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
monkey531[P]llama/common/minja.hpp
static std::string error_location_suffix(const std::string & source, size_t pos) { auto get_line = [&](size_t line) { auto start = source.begin(); for (size_t i = 1; i < line; ++i) { start = std::find(start, source.end(), '\n') + 1; } auto end = std::find(start, source.end(), '\n'); return std::string(start, end); }; auto start = source.begin(); auto end = source.end(); auto it = start + pos; auto line = std::count(start, it, '\n') + 1; auto max_line = std::count(start, end, '\n') + 1; auto col = pos - std::string(start, it).rfind('\n'); std::ostringstream out; out << " at row " << line << ", column " << col << ":\n"; if (line > 1) out << get_line(line - 1) << "\n"; out << get_line(line) << "\n"; out << std::string(col - 1, ' ') << "^\n"; if (line < max_line) out << get_line(line + 1) << "\n"; return out.str(); }
O0
cpp
minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long): subq $0xb8, %rsp movq %rdi, 0x8(%rsp) movq %rdi, %rax movq %rax, 0x10(%rsp) movq %rdi, 0xb0(%rsp) movq %rsi, 0xa8(%rsp) movq %rdx, 0xa0(%rsp) movq 0xa8(%rsp), %rax movq %rax, 0x18(%rsp) movq (%rax), %rdi callq 0x5a3e0 movq %rax, 0x98(%rsp) movq $0x1, 0x90(%rsp) movq 0x90(%rsp), %rax cmpq 0xa0(%rsp), %rax jae 0xfd1fe movq 0x18(%rsp), %rax movq 0x98(%rsp), %rcx movq %rcx, 0x78(%rsp) movq (%rax), %rdi callq 0x5b3e0 movq %rax, 0x70(%rsp) movb $0xa, 0x6f(%rsp) movq 0x78(%rsp), %rdi movq 0x70(%rsp), %rsi leaq 0x6f(%rsp), %rdx callq 0x14d100 movq %rax, 0x80(%rsp) leaq 0x80(%rsp), %rdi movl $0x1, %esi callq 0x115c20 movq %rax, 0x88(%rsp) movq 0x88(%rsp), %rax movq %rax, 0x98(%rsp) movq 0x90(%rsp), %rax addq $0x1, %rax movq %rax, 0x90(%rsp) jmp 0xfd165 movq 0x18(%rsp), %rax movq 0x98(%rsp), %rcx movq %rcx, 0x58(%rsp) movq (%rax), %rdi callq 0x5b3e0 movq %rax, 0x50(%rsp) movb $0xa, 0x4f(%rsp) movq 0x58(%rsp), %rdi movq 0x50(%rsp), %rsi leaq 0x4f(%rsp), %rdx callq 0x14d100 movq %rax, 0x60(%rsp) movq 0x98(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x38(%rsp) leaq 0x37(%rsp), %rdi movq %rdi, (%rsp) callq 0x5b260 movq 0x8(%rsp), %rdi movq (%rsp), %rcx movq 0x40(%rsp), %rsi movq 0x38(%rsp), %rdx callq 0xf0400 jmp 0xfd27a leaq 0x37(%rsp), %rdi callq 0x5b6d0 movq 0x10(%rsp), %rax addq $0xb8, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) leaq 0x37(%rsp), %rdi callq 0x5b6d0 movq 0x28(%rsp), %rdi callq 0x5ac70 nopw %cs:(%rax,%rax)
_ZZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmENK3$_0clB5cxx11Em: sub rsp, 0B8h mov [rsp+0B8h+var_B0], rdi mov rax, rdi mov [rsp+0B8h+var_A8], rax mov [rsp+0B8h+var_8], rdi mov [rsp+0B8h+var_10], rsi mov [rsp+0B8h+var_18], rdx mov rax, [rsp+0B8h+var_10] mov [rsp+0B8h+var_A0], rax mov rdi, [rax] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void) mov [rsp+0B8h+var_20], rax mov [rsp+0B8h+var_28], 1 loc_FD165: mov rax, [rsp+0B8h+var_28] cmp rax, [rsp+0B8h+var_18] jnb loc_FD1FE mov rax, [rsp+0B8h+var_A0] mov rcx, [rsp+0B8h+var_20] mov [rsp+0B8h+var_40], rcx mov rdi, [rax] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void) mov [rsp+0B8h+var_48], rax mov [rsp+0B8h+var_49], 0Ah mov rdi, [rsp+0B8h+var_40] mov rsi, [rsp+0B8h+var_48] lea rdx, [rsp+0B8h+var_49] call _ZSt4findIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcET_SB_SB_RKT0_; std::find<__gnu_cxx::__normal_iterator<char const*,std::string>,char>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,char const&) mov [rsp+0B8h+var_38], rax lea rdi, [rsp+0B8h+var_38] mov esi, 1 call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEplEl; __gnu_cxx::__normal_iterator<char const*,std::string>::operator+(long) mov [rsp+0B8h+var_30], rax mov rax, [rsp+0B8h+var_30] mov [rsp+0B8h+var_20], rax mov rax, [rsp+0B8h+var_28] add rax, 1 mov [rsp+0B8h+var_28], rax jmp loc_FD165 loc_FD1FE: mov rax, [rsp+0B8h+var_A0] mov rcx, [rsp+0B8h+var_20] mov [rsp+0B8h+var_60], rcx mov rdi, [rax] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void) mov [rsp+0B8h+var_68], rax mov [rsp+0B8h+var_69], 0Ah mov rdi, [rsp+0B8h+var_60] mov rsi, [rsp+0B8h+var_68] lea rdx, [rsp+0B8h+var_69] call _ZSt4findIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcET_SB_SB_RKT0_; std::find<__gnu_cxx::__normal_iterator<char const*,std::string>,char>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,char const&) mov [rsp+0B8h+var_58], rax mov rax, [rsp+0B8h+var_20] mov [rsp+0B8h+var_78], rax mov rax, [rsp+0B8h+var_58] mov [rsp+0B8h+var_80], rax lea rdi, [rsp+0B8h+var_81] mov [rsp+0B8h+var_B8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rsp+0B8h+var_B0] mov rcx, [rsp+0B8h+var_B8] mov rsi, [rsp+0B8h+var_78] mov rdx, [rsp+0B8h+var_80] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IN9__gnu_cxx17__normal_iteratorIPKcS4_EEvEET_SB_RKS3_; std::string::basic_string<__gnu_cxx::__normal_iterator<char const*,std::string>,void>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<char> const&) jmp short $+2 loc_FD27A: lea rdi, [rsp+0B8h+var_81] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rax, [rsp+0B8h+var_A8] add rsp, 0B8h retn mov rcx, rax mov eax, edx mov [rsp+arg_20], rcx mov [rsp+arg_1C], eax lea rdi, [rsp+arg_2F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rsp+arg_20] call __Unwind_Resume
long long minja::error_location_suffix(std::string const&,unsigned long)::$_0::operator()[abi:cxx11]( long long a1, _QWORD *a2, unsigned long long a3) { char v4; // [rsp+37h] [rbp-81h] BYREF long long v5; // [rsp+38h] [rbp-80h] long long v6; // [rsp+40h] [rbp-78h] char v7; // [rsp+4Fh] [rbp-69h] BYREF long long v8; // [rsp+50h] [rbp-68h] long long v9; // [rsp+58h] [rbp-60h] long long v10; // [rsp+60h] [rbp-58h] char v11; // [rsp+6Fh] [rbp-49h] BYREF long long v12; // [rsp+70h] [rbp-48h] long long v13; // [rsp+78h] [rbp-40h] long long v14; // [rsp+80h] [rbp-38h] BYREF long long v15; // [rsp+88h] [rbp-30h] unsigned long long i; // [rsp+90h] [rbp-28h] long long v17; // [rsp+98h] [rbp-20h] unsigned long long v18; // [rsp+A0h] [rbp-18h] _QWORD *v19; // [rsp+A8h] [rbp-10h] long long v20; // [rsp+B0h] [rbp-8h] v20 = a1; v19 = a2; v18 = a3; v17 = std::string::begin(*a2); for ( i = 1LL; i < v18; ++i ) { v13 = v17; v12 = std::string::end(*a2); v11 = 10; v14 = std::find<__gnu_cxx::__normal_iterator<char const*,std::string>,char>(v13, v12, &v11); v15 = __gnu_cxx::__normal_iterator<char const*,std::string>::operator+(&v14, 1LL); v17 = v15; } v9 = v17; v8 = std::string::end(*a2); v7 = 10; v10 = std::find<__gnu_cxx::__normal_iterator<char const*,std::string>,char>(v9, v8, &v7); v6 = v17; v5 = v10; std::allocator<char>::allocator(); std::string::basic_string<__gnu_cxx::__normal_iterator<char const*,std::string>,void>(a1, v6, v5, (long long)&v4); std::allocator<char>::~allocator(&v4); return a1; }
operator()[abi:cxx11]: SUB RSP,0xb8 MOV qword ptr [RSP + 0x8],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0xb0],RDI MOV qword ptr [RSP + 0xa8],RSI MOV qword ptr [RSP + 0xa0],RDX MOV RAX,qword ptr [RSP + 0xa8] MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RAX] CALL 0x0015a3e0 MOV qword ptr [RSP + 0x98],RAX MOV qword ptr [RSP + 0x90],0x1 LAB_001fd165: MOV RAX,qword ptr [RSP + 0x90] CMP RAX,qword ptr [RSP + 0xa0] JNC 0x001fd1fe MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x78],RCX MOV RDI,qword ptr [RAX] CALL 0x0015b3e0 MOV qword ptr [RSP + 0x70],RAX MOV byte ptr [RSP + 0x6f],0xa MOV RDI,qword ptr [RSP + 0x78] MOV RSI,qword ptr [RSP + 0x70] LEA RDX,[RSP + 0x6f] CALL 0x0024d100 MOV qword ptr [RSP + 0x80],RAX LEA RDI,[RSP + 0x80] MOV ESI,0x1 CALL 0x00215c20 MOV qword ptr [RSP + 0x88],RAX MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x98],RAX MOV RAX,qword ptr [RSP + 0x90] ADD RAX,0x1 MOV qword ptr [RSP + 0x90],RAX JMP 0x001fd165 LAB_001fd1fe: MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x58],RCX MOV RDI,qword ptr [RAX] CALL 0x0015b3e0 MOV qword ptr [RSP + 0x50],RAX MOV byte ptr [RSP + 0x4f],0xa MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x50] LEA RDX,[RSP + 0x4f] CALL 0x0024d100 MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x38],RAX LEA RDI,[RSP + 0x37] MOV qword ptr [RSP],RDI CALL 0x0015b260 MOV RDI,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x38] LAB_001fd273: CALL 0x001f0400 LAB_001fd278: JMP 0x001fd27a LAB_001fd27a: LEA RDI,[RSP + 0x37] CALL 0x0015b6d0 MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0xb8 RET
/* operator()[abi:cxx11](unsigned long) const */ ulong minja::error_location_suffix(std::__cxx11::string_const&,unsigned_long)::$_0:: operator()[abi_cxx11_(ulong param_1) { ulong in_RDX; allocator<char> local_81; int8 local_80; int8 local_78; int1 local_69; int8 local_68; int8 local_60; int8 local_58; int1 local_49; int8 local_48; int8 local_40; int8 local_38; int8 local_30; ulong local_28; int8 local_20; ulong local_18; ulong local_8; local_18 = in_RDX; local_8 = param_1; local_20 = std::__cxx11::string::begin(); for (local_28 = 1; local_28 < local_18; local_28 = local_28 + 1) { local_40 = local_20; local_48 = std::__cxx11::string::end(); local_49 = 10; local_38 = std::find<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,char> (local_40,local_48,&local_49); local_30 = __gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator+ ((__normal_iterator<char_const*,std::__cxx11::string> *)&local_38,1); local_20 = local_30; } local_60 = local_20; local_68 = std::__cxx11::string::end(); local_69 = 10; local_80 = std::find<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,char> (local_60,local_68,&local_69); local_78 = local_20; local_58 = local_80; std::allocator<char>::allocator(); /* try { // try from 001fd273 to 001fd277 has its CatchHandler @ 001fd291 */ std::__cxx11::string::string<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,void> ((string *)param_1,local_78,local_80,&local_81); std::allocator<char>::~allocator(&local_81); return param_1; }
13,275
minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
monkey531[P]llama/common/minja.hpp
static std::string error_location_suffix(const std::string & source, size_t pos) { auto get_line = [&](size_t line) { auto start = source.begin(); for (size_t i = 1; i < line; ++i) { start = std::find(start, source.end(), '\n') + 1; } auto end = std::find(start, source.end(), '\n'); return std::string(start, end); }; auto start = source.begin(); auto end = source.end(); auto it = start + pos; auto line = std::count(start, it, '\n') + 1; auto max_line = std::count(start, end, '\n') + 1; auto col = pos - std::string(start, it).rfind('\n'); std::ostringstream out; out << " at row " << line << ", column " << col << ":\n"; if (line > 1) out << get_line(line - 1) << "\n"; out << get_line(line) << "\n"; out << std::string(col - 1, ' ') << "^\n"; if (line < max_line) out << get_line(line + 1) << "\n"; return out.str(); }
O2
cpp
minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx movq (%rsi), %rax movq (%rax), %r14 pushq $0x1 popq %rbp leaq 0x6(%rsp), %r13 movq (%r12), %rax movq (%rax), %rsi addq 0x8(%rax), %rsi cmpq %r15, %rbp jae 0xa2d97 movb $0xa, 0x6(%rsp) movq %r14, %rdi movq %r13, %rdx callq 0x7531a movq %rax, %r14 incq %r14 incq %rbp jmp 0xa2d6c leaq 0x7(%rsp), %rdx movb $0xa, (%rdx) movq %r14, %rdi callq 0x7531a leaq 0x10(%rbx), %rcx movq %rcx, (%rbx) movq %rbx, %rdi movq %r14, %rsi movq %rax, %rdx callq 0x55c2a movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmENK3$_0clB5cxx11Em_0: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r15, rdx mov r12, rsi mov rbx, rdi mov rax, [rsi] mov r14, [rax] push 1 pop rbp lea r13, [rsp+38h+var_32] loc_A2D6C: mov rax, [r12] mov rsi, [rax] add rsi, [rax+8] cmp rbp, r15 jnb short loc_A2D97 mov [rsp+38h+var_32], 0Ah mov rdi, r14 mov rdx, r13 call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag) mov r14, rax inc r14 inc rbp jmp short loc_A2D6C loc_A2D97: lea rdx, [rsp+38h+var_31] mov byte ptr [rdx], 0Ah mov rdi, r14 call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag) lea rcx, [rbx+10h] mov [rbx], rcx mov rdi, rbx mov rsi, r14 mov rdx, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag) mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_QWORD * minja::error_location_suffix(std::string const&,unsigned long)::$_0::operator()[abi:cxx11]( _QWORD *a1, _BYTE ***a2, unsigned long long a3) { long long v3; // rax _BYTE *v6; // r14 unsigned long long i; // rbp long long v8; // rsi _BYTE *v9; // rax _WORD v11[25]; // [rsp+0h] [rbp-32h] BYREF v11[0] = HIWORD(v3); v6 = **a2; for ( i = 1LL; ; ++i ) { v8 = (long long)&(**a2)[(_QWORD)(*a2)[1]]; if ( i >= a3 ) break; LOBYTE(v11[0]) = 10; v6 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>( (long long)v6, v8, (char *)v11) + 1; } HIBYTE(v11[0]) = 10; v9 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>( (long long)v6, v8, (char *)v11 + 1); *a1 = a1 + 2; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)a1, v6, (long long)v9); return a1; }
operator()[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,RDX MOV R12,RSI MOV RBX,RDI MOV RAX,qword ptr [RSI] MOV R14,qword ptr [RAX] PUSH 0x1 POP RBP LEA R13,[RSP + 0x6] LAB_001a2d6c: MOV RAX,qword ptr [R12] MOV RSI,qword ptr [RAX] ADD RSI,qword ptr [RAX + 0x8] CMP RBP,R15 JNC 0x001a2d97 MOV byte ptr [RSP + 0x6],0xa MOV RDI,R14 MOV RDX,R13 CALL 0x0017531a MOV R14,RAX INC R14 INC RBP JMP 0x001a2d6c LAB_001a2d97: LEA RDX,[RSP + 0x7] MOV byte ptr [RDX],0xa MOV RDI,R14 CALL 0x0017531a LEA RCX,[RBX + 0x10] MOV qword ptr [RBX],RCX MOV RDI,RBX MOV RSI,R14 MOV RDX,RAX CALL 0x00155c2a MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* operator()[abi:cxx11](unsigned long) const */ ulong minja::error_location_suffix(std::__cxx11::string_const&,unsigned_long)::$_0:: operator()[abi_cxx11_(ulong param_1) { int8 in_RAX; long lVar1; int8 uVar2; ulong in_RDX; ulong uVar3; long *in_RSI; long lVar4; int8 uStack_38; lVar1 = *(long *)*in_RSI; uStack_38 = in_RAX; for (uVar3 = 1; lVar4 = *(long *)*in_RSI + ((long *)*in_RSI)[1], uVar3 < in_RDX; uVar3 = uVar3 + 1 ) { uStack_38._0_7_ = CONCAT16(10,(int6)uStack_38); lVar1 = std:: __find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>> (lVar1,lVar4,(long)&uStack_38 + 6); lVar1 = lVar1 + 1; } uStack_38 = CONCAT17(10,(int7)uStack_38); uVar2 = std:: __find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>> (lVar1,lVar4); *(ulong *)param_1 = param_1 + 0x10; std::__cxx11::string::_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>> (param_1,lVar1,uVar2); return param_1; }
13,276
free_block
eloqsql/storage/maria/ma_pagecache.c
static my_bool free_block(PAGECACHE *pagecache, PAGECACHE_BLOCK_LINK *block, my_bool abort_if_pinned) { uint status= block->status; KEYCACHE_THREAD_TRACE("free block"); KEYCACHE_DBUG_PRINT("free_block", ("block: %u hash_link %p", PCBLOCK_NUMBER(pagecache, block), block->hash_link)); mysql_mutex_assert_owner(&pagecache->cache_lock); if (block->hash_link) { /* While waiting for readers to finish, new readers might request the block. But since we set block->status|= PCBLOCK_REASSIGNED, they will wait on block->wqueue[COND_FOR_SAVED]. They must be signaled later. */ block->status|= PCBLOCK_REASSIGNED; wait_for_readers(pagecache, block); if (unlikely(abort_if_pinned) && unlikely(block->pins)) { /* Block got pinned while waiting for readers. This can only happens when called from flush_pagecache_blocks_int() when flushing blocks as part of prepare for maria_close() or from flush_cached_blocks() */ block->status&= ~PCBLOCK_REASSIGNED; unreg_request(pagecache, block, 0); /* All pending requests for this page must be resubmitted. */ if (block->wqueue[COND_FOR_SAVED].last_thread) wqueue_release_queue(&block->wqueue[COND_FOR_SAVED]); return 1; } unlink_hash(pagecache, block->hash_link); } unlink_changed(block); DBUG_ASSERT(block->wlocks == 0); DBUG_ASSERT(block->rlocks == 0); DBUG_ASSERT(block->rlocks_queue == 0); DBUG_ASSERT(block->pins == 0); DBUG_ASSERT((block->status & ~(PCBLOCK_ERROR | PCBLOCK_READ | PCBLOCK_IN_FLUSH | PCBLOCK_CHANGED | PCBLOCK_REASSIGNED | PCBLOCK_DEL_WRITE)) == 0); DBUG_ASSERT(block->requests >= 1); DBUG_ASSERT(block->next_used == NULL); block->status= 0; #ifdef DBUG_ASSERT_EXISTS block->type= PAGECACHE_EMPTY_PAGE; #endif block->rec_lsn= LSN_MAX; DBUG_PRINT("hash", ("block (Free): %p, hash_link: %p -> NULL", block, block->hash_link)); block->hash_link= NULL; if (block->temperature == PCBLOCK_WARM) pagecache->warm_blocks--; block->temperature= PCBLOCK_COLD; KEYCACHE_THREAD_TRACE("free block"); KEYCACHE_DBUG_PRINT("free_block", ("block is freed")); unreg_request(pagecache, block, 0); /* Block->requests is != 0 if unreg_requests()/link_block() gave the block to a waiting thread */ if (!block->requests) { DBUG_ASSERT(block->next_used != 0); /* Remove the free block from the LRU ring. */ unlink_block(pagecache, block); /* Insert the free block in the free list. */ block->next_used= pagecache->free_block_list; pagecache->free_block_list= block; /* Keep track of the number of currently unused blocks. */ pagecache->blocks_unused++; } else { /* keep flag set by link_block() */ block->status= status & PCBLOCK_REASSIGNED; } /* All pending requests for this page must be resubmitted. */ if (block->wqueue[COND_FOR_SAVED].last_thread) wqueue_release_queue(&block->wqueue[COND_FOR_SAVED]); return 0; }
O3
c
free_block: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movzwl 0x74(%rsi), %r12d cmpq $0x0, 0x20(%rsi) je 0x34d24 movl %edx, %r15d movl %r12d, %eax orl $0x8, %eax movw %ax, 0x74(%rbx) callq 0xa1b22 movq 0x20(%rbx), %rcx cmpl $0x0, 0x68(%rcx) je 0x34d0f movq %rax, %rcx addq $0x8, %rax movq %rax, 0x28(%rbx) leaq 0xc8(%r14), %rsi cmpq $0x0, 0x38(%rcx) jne 0x34df0 movq %rax, %rdi callq 0x29430 movq $0x0, 0x28(%rbx) testb %r15b, %r15b jne 0x34dd0 movq 0x20(%rbx), %rsi movq %r14, %rdi callq 0x34b7d movq 0x10(%rbx), %rcx movq 0x18(%rbx), %rax testq %rcx, %rcx je 0x34d3b movq %rax, 0x18(%rcx) movq 0x10(%rbx), %rcx jmp 0x34d3d xorl %ecx, %ecx movq %rcx, (%rax) movw $0x0, 0x74(%rbx) movabsq $0xffffffffffffff, %rax # imm = 0xFFFFFFFFFFFFFF movq %rax, 0x88(%rbx) movq $0x0, 0x20(%rbx) cmpl $0x1, 0x78(%rbx) jne 0x34d69 decq 0x60(%r14) movl $0x0, 0x78(%rbx) movq %r14, %rdi movq %rbx, %rsi xorl %edx, %edx callq 0x320f7 cmpl $0x0, 0x60(%rbx) je 0x34d8e andl $0x8, %r12d movw %r12w, 0x74(%rbx) jmp 0x34dae movq %r14, %rdi movq %rbx, %rsi callq 0x34f69 movq 0xa0(%r14), %rax movq %rax, (%rbx) movq %rbx, 0xa0(%r14) incq 0x50(%r14) xorl %r14d, %r14d cmpq $0x0, 0x50(%rbx) je 0x34dc4 addq $0x50, %rbx movq %rbx, %rdi callq 0xa674f movl %r14d, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq cmpl $0x0, 0x64(%rbx) je 0x34d18 andb $-0x9, 0x74(%rbx) movq %r14, %rdi movq %rbx, %rsi xorl %edx, %edx callq 0x320f7 movb $0x1, %r14b jmp 0x34db1 leaq 0xa47bb(%rip), %rdx # 0xd95b2 movq %rax, %rdi movl $0x64d, %ecx # imm = 0x64D callq 0x2eea0 jmp 0x34d07
free_block: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rsi mov r14, rdi movzx r12d, word ptr [rsi+74h] cmp qword ptr [rsi+20h], 0 jz short loc_34D24 mov r15d, edx mov eax, r12d or eax, 8 mov [rbx+74h], ax call _my_thread_var mov rcx, [rbx+20h] cmp dword ptr [rcx+68h], 0 jz short loc_34D0F mov rcx, rax add rax, 8 mov [rbx+28h], rax lea rsi, [r14+0C8h] cmp qword ptr [rcx+38h], 0 jnz loc_34DF0 mov rdi, rax call _pthread_cond_wait loc_34D07: mov qword ptr [rbx+28h], 0 loc_34D0F: test r15b, r15b jnz loc_34DD0 loc_34D18: mov rsi, [rbx+20h] mov rdi, r14 call unlink_hash loc_34D24: mov rcx, [rbx+10h] mov rax, [rbx+18h] test rcx, rcx jz short loc_34D3B mov [rcx+18h], rax mov rcx, [rbx+10h] jmp short loc_34D3D loc_34D3B: xor ecx, ecx loc_34D3D: mov [rax], rcx mov word ptr [rbx+74h], 0 mov rax, 0FFFFFFFFFFFFFFh mov [rbx+88h], rax mov qword ptr [rbx+20h], 0 cmp dword ptr [rbx+78h], 1 jnz short loc_34D69 dec qword ptr [r14+60h] loc_34D69: mov dword ptr [rbx+78h], 0 mov rdi, r14 mov rsi, rbx xor edx, edx call unreg_request cmp dword ptr [rbx+60h], 0 jz short loc_34D8E and r12d, 8 mov [rbx+74h], r12w jmp short loc_34DAE loc_34D8E: mov rdi, r14 mov rsi, rbx call unlink_block mov rax, [r14+0A0h] mov [rbx], rax mov [r14+0A0h], rbx inc qword ptr [r14+50h] loc_34DAE: xor r14d, r14d loc_34DB1: cmp qword ptr [rbx+50h], 0 jz short loc_34DC4 add rbx, 50h ; 'P' mov rdi, rbx call wqueue_release_queue loc_34DC4: mov eax, r14d pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_34DD0: cmp dword ptr [rbx+64h], 0 jz loc_34D18 and byte ptr [rbx+74h], 0F7h mov rdi, r14 mov rsi, rbx xor edx, edx call unreg_request mov r14b, 1 jmp short loc_34DB1 loc_34DF0: lea rdx, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rax mov ecx, 64Dh call psi_cond_wait jmp loc_34D07
long long free_block(_QWORD *a1, long long a2, long long a3, long long a4, long long a5) { unsigned int v6; // r14d __int16 v7; // r12 char v8; // r15 long long v9; // rax long long v10; // rcx long long v11; // rax long long v12; // rsi long long v13; // rcx _QWORD *v14; // rax long long v15; // rcx v6 = (unsigned int)a1; v7 = *(_WORD *)(a2 + 116); if ( *(_QWORD *)(a2 + 32) ) { v8 = a3; *(_WORD *)(a2 + 116) = v7 | 8; v9 = my_thread_var(a1, a2, a3, a4, a5); if ( *(_DWORD *)(*(_QWORD *)(a2 + 32) + 104LL) ) { v10 = v9; v11 = v9 + 8; *(_QWORD *)(a2 + 40) = v11; v12 = (long long)(a1 + 25); if ( *(_QWORD *)(v10 + 56) ) psi_cond_wait( v11, v12, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x64Du); else pthread_cond_wait(v11, v12); *(_QWORD *)(a2 + 40) = 0LL; } if ( v8 && *(_DWORD *)(a2 + 100) ) { *(_BYTE *)(a2 + 116) &= ~8u; unreg_request(a1, a2, 0); LOBYTE(v6) = 1; goto LABEL_17; } unlink_hash(a1, *(long long **)(a2 + 32)); } v13 = *(_QWORD *)(a2 + 16); v14 = *(_QWORD **)(a2 + 24); if ( v13 ) { *(_QWORD *)(v13 + 24) = v14; v15 = *(_QWORD *)(a2 + 16); } else { v15 = 0LL; } *v14 = v15; *(_WORD *)(a2 + 116) = 0; *(_QWORD *)(a2 + 136) = 0xFFFFFFFFFFFFFFLL; *(_QWORD *)(a2 + 32) = 0LL; if ( *(_DWORD *)(a2 + 120) == 1 ) --a1[12]; *(_DWORD *)(a2 + 120) = 0; unreg_request(a1, a2, 0); if ( *(_DWORD *)(a2 + 96) ) { *(_WORD *)(a2 + 116) = v7 & 8; } else { unlink_block(a1, a2); *(_QWORD *)a2 = a1[20]; a1[20] = a2; ++a1[10]; } v6 = 0; LABEL_17: if ( *(_QWORD *)(a2 + 80) ) wqueue_release_queue(a2 + 80); return v6; }
free_block: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RSI MOV R14,RDI MOVZX R12D,word ptr [RSI + 0x74] CMP qword ptr [RSI + 0x20],0x0 JZ 0x00134d24 MOV R15D,EDX MOV EAX,R12D OR EAX,0x8 MOV word ptr [RBX + 0x74],AX CALL 0x001a1b22 MOV RCX,qword ptr [RBX + 0x20] CMP dword ptr [RCX + 0x68],0x0 JZ 0x00134d0f MOV RCX,RAX ADD RAX,0x8 MOV qword ptr [RBX + 0x28],RAX LEA RSI,[R14 + 0xc8] CMP qword ptr [RCX + 0x38],0x0 JNZ 0x00134df0 MOV RDI,RAX CALL 0x00129430 LAB_00134d07: MOV qword ptr [RBX + 0x28],0x0 LAB_00134d0f: TEST R15B,R15B JNZ 0x00134dd0 LAB_00134d18: MOV RSI,qword ptr [RBX + 0x20] MOV RDI,R14 CALL 0x00134b7d LAB_00134d24: MOV RCX,qword ptr [RBX + 0x10] MOV RAX,qword ptr [RBX + 0x18] TEST RCX,RCX JZ 0x00134d3b MOV qword ptr [RCX + 0x18],RAX MOV RCX,qword ptr [RBX + 0x10] JMP 0x00134d3d LAB_00134d3b: XOR ECX,ECX LAB_00134d3d: MOV qword ptr [RAX],RCX MOV word ptr [RBX + 0x74],0x0 MOV RAX,0xffffffffffffff MOV qword ptr [RBX + 0x88],RAX MOV qword ptr [RBX + 0x20],0x0 CMP dword ptr [RBX + 0x78],0x1 JNZ 0x00134d69 DEC qword ptr [R14 + 0x60] LAB_00134d69: MOV dword ptr [RBX + 0x78],0x0 MOV RDI,R14 MOV RSI,RBX XOR EDX,EDX CALL 0x001320f7 CMP dword ptr [RBX + 0x60],0x0 JZ 0x00134d8e AND R12D,0x8 MOV word ptr [RBX + 0x74],R12W JMP 0x00134dae LAB_00134d8e: MOV RDI,R14 MOV RSI,RBX CALL 0x00134f69 MOV RAX,qword ptr [R14 + 0xa0] MOV qword ptr [RBX],RAX MOV qword ptr [R14 + 0xa0],RBX INC qword ptr [R14 + 0x50] LAB_00134dae: XOR R14D,R14D LAB_00134db1: CMP qword ptr [RBX + 0x50],0x0 JZ 0x00134dc4 ADD RBX,0x50 MOV RDI,RBX CALL 0x001a674f LAB_00134dc4: MOV EAX,R14D POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00134dd0: CMP dword ptr [RBX + 0x64],0x0 JZ 0x00134d18 AND byte ptr [RBX + 0x74],0xf7 MOV RDI,R14 MOV RSI,RBX XOR EDX,EDX CALL 0x001320f7 MOV R14B,0x1 JMP 0x00134db1 LAB_00134df0: LEA RDX,[0x1d95b2] MOV RDI,RAX MOV ECX,0x64d CALL 0x0012eea0 JMP 0x00134d07
ulong free_block(long param_1,int8 *param_2,char param_3) { ushort uVar1; int8 *puVar2; long lVar3; pthread_cond_t *__cond; int8 uVar4; ulong uVar5; uVar1 = *(ushort *)((long)param_2 + 0x74); if (param_2[4] != 0) { *(ushort *)((long)param_2 + 0x74) = uVar1 | 8; lVar3 = _my_thread_var(); if (*(int *)(param_2[4] + 0x68) != 0) { __cond = (pthread_cond_t *)(lVar3 + 8); param_2[5] = __cond; if (*(long *)(lVar3 + 0x38) == 0) { pthread_cond_wait(__cond,(pthread_mutex_t *)(param_1 + 200)); } else { psi_cond_wait(__cond,(pthread_mutex_t *)(param_1 + 200), "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",0x64d) ; } param_2[5] = 0; } if ((param_3 != '\0') && (*(int *)((long)param_2 + 100) != 0)) { *(byte *)((long)param_2 + 0x74) = *(byte *)((long)param_2 + 0x74) & 0xf7; unreg_request(param_1,param_2,0); uVar5 = CONCAT71((int7)((ulong)param_1 >> 8),1); goto LAB_00134db1; } unlink_hash(param_1,param_2[4]); } puVar2 = (int8 *)param_2[3]; if (param_2[2] == 0) { uVar4 = 0; } else { *(int8 **)(param_2[2] + 0x18) = puVar2; uVar4 = param_2[2]; } *puVar2 = uVar4; *(int2 *)((long)param_2 + 0x74) = 0; param_2[0x11] = 0xffffffffffffff; param_2[4] = 0; if (*(int *)(param_2 + 0xf) == 1) { *(long *)(param_1 + 0x60) = *(long *)(param_1 + 0x60) + -1; } *(int4 *)(param_2 + 0xf) = 0; unreg_request(param_1,param_2,0); if (*(int *)(param_2 + 0xc) == 0) { unlink_block(param_1,param_2); *param_2 = *(int8 *)(param_1 + 0xa0); *(int8 **)(param_1 + 0xa0) = param_2; *(long *)(param_1 + 0x50) = *(long *)(param_1 + 0x50) + 1; } else { *(ushort *)((long)param_2 + 0x74) = uVar1 & 8; } uVar5 = 0; LAB_00134db1: if (param_2[10] != 0) { wqueue_release_queue(param_2 + 10); } return uVar5 & 0xffffffff; }
13,277
ma_read_static_record
eloqsql/storage/maria/ma_statrec.c
int _ma_read_static_record(register MARIA_HA *info, register uchar *record, MARIA_RECORD_POS pos) { int error; DBUG_ENTER("_ma_read_static_record"); if (pos != HA_OFFSET_ERROR) { if (info->opt_flag & WRITE_CACHE_USED && info->rec_cache.pos_in_file <= pos && flush_io_cache(&info->rec_cache)) DBUG_RETURN(my_errno); info->rec_cache.seek_not_done=1; /* We have done a seek */ error= (int) info->s->file_read(info, record,info->s->base.reclength, pos, MYF(MY_NABP)); if (! error) { fast_ma_writeinfo(info); if (!*record) { /* Record is deleted */ DBUG_PRINT("warning", ("Record is deleted")); DBUG_RETURN((my_errno=HA_ERR_RECORD_DELETED)); } info->update|= HA_STATE_AKTIV; /* Record is read */ DBUG_RETURN(0); } } fast_ma_writeinfo(info); /* No such record */ DBUG_RETURN(my_errno); }
O0
c
ma_read_static_record: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) cmpq $-0x1, -0x20(%rbp) je 0x74d70 movq -0x10(%rbp), %rax movl 0x61c(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0x74ccd movq -0x10(%rbp), %rax movq 0x4b8(%rax), %rax cmpq -0x20(%rbp), %rax ja 0x74ccd movq -0x10(%rbp), %rdi addq $0x4b8, %rdi # imm = 0x4B8 movl $0x1, %esi callq 0xe1f60 cmpl $0x0, %eax je 0x74ccd jmp 0x74cbe callq 0xf7440 movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x74d97 movq -0x10(%rbp), %rax movl $0x1, 0x598(%rax) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x6e0(%rax), %rax movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x10(%rbp), %rcx movq (%rcx), %rcx movq 0x398(%rcx), %rdx movq -0x20(%rbp), %rcx movl $0x4, %r8d callq *%rax movl %eax, -0x24(%rbp) cmpl $0x0, -0x24(%rbp) jne 0x74d6e movq -0x10(%rbp), %rax movq (%rax), %rax cmpl $0x0, 0x7b8(%rax) jne 0x74d2f movq -0x10(%rbp), %rdi xorl %esi, %esi callq 0x36ff0 movq -0x18(%rbp), %rax cmpb $0x0, (%rax) jne 0x74d52 jmp 0x74d3a jmp 0x74d3c jmp 0x74d3e callq 0xf7440 movl $0x86, (%rax) movl $0x86, -0x4(%rbp) jmp 0x74d97 movq -0x10(%rbp), %rax movl 0x624(%rax), %ecx orl $0x2, %ecx movl %ecx, 0x624(%rax) movl $0x0, -0x4(%rbp) jmp 0x74d97 jmp 0x74d70 movq -0x10(%rbp), %rax movq (%rax), %rax cmpl $0x0, 0x7b8(%rax) jne 0x74d8b movq -0x10(%rbp), %rdi xorl %esi, %esi callq 0x36ff0 jmp 0x74d8d callq 0xf7440 movl (%rax), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq
_ma_read_static_record: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh jz loc_74D70 mov rax, [rbp+var_10] mov eax, [rax+61Ch] and eax, 10h cmp eax, 0 jz short loc_74CCD mov rax, [rbp+var_10] mov rax, [rax+4B8h] cmp rax, [rbp+var_20] ja short loc_74CCD mov rdi, [rbp+var_10] add rdi, 4B8h mov esi, 1 call my_b_flush_io_cache cmp eax, 0 jz short loc_74CCD jmp short $+2 loc_74CBE: call _my_thread_var mov eax, [rax] mov [rbp+var_4], eax jmp loc_74D97 loc_74CCD: mov rax, [rbp+var_10] mov dword ptr [rax+598h], 1 mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+6E0h] mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rcx, [rbp+var_10] mov rcx, [rcx] mov rdx, [rcx+398h] mov rcx, [rbp+var_20] mov r8d, 4 call rax mov [rbp+var_24], eax cmp [rbp+var_24], 0 jnz short loc_74D6E mov rax, [rbp+var_10] mov rax, [rax] cmp dword ptr [rax+7B8h], 0 jnz short loc_74D2F mov rdi, [rbp+var_10] xor esi, esi call _ma_writeinfo loc_74D2F: mov rax, [rbp+var_18] cmp byte ptr [rax], 0 jnz short loc_74D52 jmp short $+2 loc_74D3A: jmp short $+2 loc_74D3C: jmp short $+2 loc_74D3E: call _my_thread_var mov dword ptr [rax], 86h mov [rbp+var_4], 86h jmp short loc_74D97 loc_74D52: mov rax, [rbp+var_10] mov ecx, [rax+624h] or ecx, 2 mov [rax+624h], ecx mov [rbp+var_4], 0 jmp short loc_74D97 loc_74D6E: jmp short $+2 loc_74D70: mov rax, [rbp+var_10] mov rax, [rax] cmp dword ptr [rax+7B8h], 0 jnz short loc_74D8B mov rdi, [rbp+var_10] xor esi, esi call _ma_writeinfo loc_74D8B: jmp short $+2 loc_74D8D: call _my_thread_var mov eax, [rax] mov [rbp+var_4], eax loc_74D97: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long ma_read_static_record(long long a1, const char *a2, unsigned long long a3) { char *v5; // [rsp+18h] [rbp-18h] long long v6; // [rsp+20h] [rbp-10h] v6 = a1; v5 = (char *)a2; if ( a3 == -1LL ) goto LABEL_17; if ( (*(_DWORD *)(a1 + 1564) & 0x10) != 0 && *(_QWORD *)(a1 + 1208) <= a3 ) { a1 += 1208LL; a2 = (_BYTE *)(&dword_0 + 1); if ( (unsigned int)my_b_flush_io_cache(v6 + 1208, 1LL) ) return *(unsigned int *)my_thread_var(a1, a2); } *(_DWORD *)(v6 + 1432) = 1; a1 = v6; a2 = v5; if ( (*(unsigned int ( **)(long long, char *, _QWORD, unsigned long long, long long))(*(_QWORD *)v6 + 1760LL))( v6, v5, *(_QWORD *)(*(_QWORD *)v6 + 920LL), a3, 4LL) ) { LABEL_17: if ( !*(_DWORD *)(*(_QWORD *)v6 + 1976LL) ) { a1 = v6; a2 = 0LL; ma_writeinfo((long long *)v6, 0); } return *(unsigned int *)my_thread_var(a1, a2); } if ( !*(_DWORD *)(*(_QWORD *)v6 + 1976LL) ) { a1 = v6; a2 = 0LL; ma_writeinfo((long long *)v6, 0); } if ( *v5 ) { *(_DWORD *)(v6 + 1572) |= 2u; return 0; } else { *(_DWORD *)my_thread_var(a1, a2) = 134; return 134; } }
_ma_read_static_record: 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 CMP qword ptr [RBP + -0x20],-0x1 JZ 0x00174d70 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x61c] AND EAX,0x10 CMP EAX,0x0 JZ 0x00174ccd MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4b8] CMP RAX,qword ptr [RBP + -0x20] JA 0x00174ccd MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x4b8 MOV ESI,0x1 CALL 0x001e1f60 CMP EAX,0x0 JZ 0x00174ccd JMP 0x00174cbe LAB_00174cbe: CALL 0x001f7440 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x00174d97 LAB_00174ccd: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x598],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x6e0] MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] MOV RDX,qword ptr [RCX + 0x398] MOV RCX,qword ptr [RBP + -0x20] MOV R8D,0x4 CALL RAX MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x24],0x0 JNZ 0x00174d6e MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0x7b8],0x0 JNZ 0x00174d2f MOV RDI,qword ptr [RBP + -0x10] XOR ESI,ESI CALL 0x00136ff0 LAB_00174d2f: MOV RAX,qword ptr [RBP + -0x18] CMP byte ptr [RAX],0x0 JNZ 0x00174d52 JMP 0x00174d3a LAB_00174d3a: JMP 0x00174d3c LAB_00174d3c: JMP 0x00174d3e LAB_00174d3e: CALL 0x001f7440 MOV dword ptr [RAX],0x86 MOV dword ptr [RBP + -0x4],0x86 JMP 0x00174d97 LAB_00174d52: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x624] OR ECX,0x2 MOV dword ptr [RAX + 0x624],ECX MOV dword ptr [RBP + -0x4],0x0 JMP 0x00174d97 LAB_00174d6e: JMP 0x00174d70 LAB_00174d70: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0x7b8],0x0 JNZ 0x00174d8b MOV RDI,qword ptr [RBP + -0x10] XOR ESI,ESI CALL 0x00136ff0 LAB_00174d8b: JMP 0x00174d8d LAB_00174d8d: CALL 0x001f7440 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX LAB_00174d97: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 _ma_read_static_record(long *param_1,char *param_2,ulong param_3) { int iVar1; int4 *puVar2; if (param_3 != 0xffffffffffffffff) { if ((((*(uint *)((long)param_1 + 0x61c) & 0x10) != 0) && ((ulong)param_1[0x97] <= param_3)) && (iVar1 = my_b_flush_io_cache(param_1 + 0x97,1), iVar1 != 0)) { puVar2 = (int4 *)_my_thread_var(); return *puVar2; } *(int4 *)(param_1 + 0xb3) = 1; iVar1 = (**(code **)(*param_1 + 0x6e0)) (param_1,param_2,*(int8 *)(*param_1 + 0x398),param_3,4); if (iVar1 == 0) { if (*(int *)(*param_1 + 0x7b8) == 0) { _ma_writeinfo(param_1,0); } if (*param_2 == '\0') { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x86; return 0x86; } *(uint *)((long)param_1 + 0x624) = *(uint *)((long)param_1 + 0x624) | 2; return 0; } } if (*(int *)(*param_1 + 0x7b8) == 0) { _ma_writeinfo(param_1,0); } puVar2 = (int4 *)_my_thread_var(); return *puVar2; }
13,278
ggml_soft_max_back_impl
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
static struct ggml_tensor * ggml_soft_max_back_impl( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, bool inplace) { bool is_node = false; if (a->grad || b->grad) { is_node = true; // TODO : implement backward pass } struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a); result->op = GGML_OP_SOFT_MAX_BACK; result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL; result->src[0] = a; result->src[1] = b; return result; }
O0
c
ggml_soft_max_back_impl: subq $0x38, %rsp movb %cl, %al movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq %rdx, 0x20(%rsp) andb $0x1, %al movb %al, 0x1f(%rsp) movb $0x0, 0x1e(%rsp) movq 0x28(%rsp), %rax cmpq $0x0, 0x98(%rax) jne 0x1243fe movq 0x20(%rsp), %rax cmpq $0x0, 0x98(%rax) je 0x124403 movb $0x1, 0x1e(%rsp) testb $0x1, 0x1f(%rsp) je 0x124420 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x11e7e0 movq %rax, 0x8(%rsp) jmp 0x124434 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x11cfc0 movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rax movl $0x28, 0x50(%rax) testb $0x1, 0x1e(%rsp) je 0x124466 movq 0x30(%rsp), %rdi movq 0x10(%rsp), %rsi callq 0x11cfc0 movq %rax, (%rsp) jmp 0x12446e xorl %eax, %eax movq %rax, (%rsp) jmp 0x12446e movq (%rsp), %rcx movq 0x10(%rsp), %rax movq %rcx, 0x98(%rax) movq 0x28(%rsp), %rcx movq 0x10(%rsp), %rax movq %rcx, 0xa0(%rax) movq 0x20(%rsp), %rcx movq 0x10(%rsp), %rax movq %rcx, 0xa8(%rax) movq 0x10(%rsp), %rax addq $0x38, %rsp retq nopw (%rax,%rax)
ggml_soft_max_back_impl: sub rsp, 38h mov al, cl mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov [rsp+38h+var_18], rdx and al, 1 mov [rsp+38h+var_19], al mov [rsp+38h+var_1A], 0 mov rax, [rsp+38h+var_10] cmp qword ptr [rax+98h], 0 jnz short loc_1243FE mov rax, [rsp+38h+var_18] cmp qword ptr [rax+98h], 0 jz short loc_124403 loc_1243FE: mov [rsp+38h+var_1A], 1 loc_124403: test [rsp+38h+var_19], 1 jz short loc_124420 mov rdi, [rsp+38h+var_8] mov rsi, [rsp+38h+var_10] call ggml_view_tensor mov [rsp+38h+var_30], rax jmp short loc_124434 loc_124420: mov rdi, [rsp+38h+var_8] mov rsi, [rsp+38h+var_10] call ggml_dup_tensor mov [rsp+38h+var_30], rax loc_124434: mov rax, [rsp+38h+var_30] mov [rsp+38h+var_28], rax mov rax, [rsp+38h+var_28] mov dword ptr [rax+50h], 28h ; '(' test [rsp+38h+var_1A], 1 jz short loc_124466 mov rdi, [rsp+38h+var_8] mov rsi, [rsp+38h+var_28] call ggml_dup_tensor mov [rsp+38h+var_38], rax jmp short loc_12446E loc_124466: xor eax, eax mov [rsp+38h+var_38], rax jmp short $+2 loc_12446E: mov rcx, [rsp+38h+var_38] mov rax, [rsp+38h+var_28] mov [rax+98h], rcx mov rcx, [rsp+38h+var_10] mov rax, [rsp+38h+var_28] mov [rax+0A0h], rcx mov rcx, [rsp+38h+var_18] mov rax, [rsp+38h+var_28] mov [rax+0A8h], rcx mov rax, [rsp+38h+var_28] add rsp, 38h retn
long long ggml_soft_max_back_impl( long long a1, long long a2, long long a3, char a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, double a9, double a10, __m128 a11, __m128 a12) { long long v13; // [rsp+0h] [rbp-38h] long long v14; // [rsp+8h] [rbp-30h] char v15; // [rsp+1Eh] [rbp-1Ah] v15 = 0; if ( *(_QWORD *)(a2 + 152) || *(_QWORD *)(a3 + 152) ) v15 = 1; if ( (a4 & 1) != 0 ) v14 = (long long)ggml_view_tensor(a1, a2, a5, a6, a7, a8, a9, a10, a11, a12); else v14 = ggml_dup_tensor(a1, (unsigned int *)a2); *(_DWORD *)(v14 + 80) = 40; if ( (v15 & 1) != 0 ) v13 = ggml_dup_tensor(a1, (unsigned int *)v14); else v13 = 0LL; *(_QWORD *)(v14 + 152) = v13; *(_QWORD *)(v14 + 160) = a2; *(_QWORD *)(v14 + 168) = a3; return v14; }
13,279
ggml_soft_max_back_impl
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
static struct ggml_tensor * ggml_soft_max_back_impl( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, bool inplace) { bool is_node = false; if (a->grad || b->grad) { is_node = true; // TODO : implement backward pass } struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a); result->op = GGML_OP_SOFT_MAX_BACK; result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL; result->src[0] = a; result->src[1] = b; return result; }
O2
c
ggml_soft_max_back_impl: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 cmpq $0x0, 0x98(%rsi) jne 0x6cd63 cmpq $0x0, 0x98(%rbx) je 0x6cdbe movb $0x1, %bpl movq %r15, %rdi movq %r14, %rsi testb %cl, %cl je 0x6cd77 callq 0x69922 jmp 0x6cd7c callq 0x68a65 movq %rax, %r12 movl $0x28, 0x50(%rax) testb %bpl, %bpl je 0x6cd98 movq %r15, %rdi movq %r12, %rsi callq 0x68a65 jmp 0x6cd9a xorl %eax, %eax movq %rax, 0x98(%r12) movq %r14, 0xa0(%r12) movq %rbx, 0xa8(%r12) movq %r12, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq xorl %ebp, %ebp jmp 0x6cd66
ggml_soft_max_back_impl: push rbp push r15 push r14 push r12 push rbx mov rbx, rdx mov r14, rsi mov r15, rdi cmp qword ptr [rsi+98h], 0 jnz short loc_6CD63 cmp qword ptr [rbx+98h], 0 jz short loc_6CDBE loc_6CD63: mov bpl, 1 loc_6CD66: mov rdi, r15 mov rsi, r14 test cl, cl jz short loc_6CD77 call ggml_view_tensor jmp short loc_6CD7C loc_6CD77: call ggml_dup_tensor loc_6CD7C: mov r12, rax mov dword ptr [rax+50h], 28h ; '(' test bpl, bpl jz short loc_6CD98 mov rdi, r15 mov rsi, r12 call ggml_dup_tensor jmp short loc_6CD9A loc_6CD98: xor eax, eax loc_6CD9A: mov [r12+98h], rax mov [r12+0A0h], r14 mov [r12+0A8h], rbx mov rax, r12 pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_6CDBE: xor ebp, ebp jmp short loc_6CD66
unsigned int * ggml_soft_max_back_impl( long long a1, long long a2, long long a3, char a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, double a9, double a10, __m128 a11, __m128 a12) { bool v13; // bp unsigned int *v14; // rax unsigned int *v15; // r12 long long v16; // rax v13 = *(_QWORD *)(a2 + 152) || *(_QWORD *)(a3 + 152); if ( a4 ) v14 = (unsigned int *)ggml_view_tensor(a1, a2, a5, a6, a7, a8, a9, a10, a11, a12); else v14 = (unsigned int *)ggml_dup_tensor(a1, (unsigned int *)a2); v15 = v14; v14[20] = 40; if ( v13 ) v16 = ggml_dup_tensor(a1, v14); else v16 = 0LL; *((_QWORD *)v15 + 19) = v16; *((_QWORD *)v15 + 20) = a2; *((_QWORD *)v15 + 21) = a3; return v15; }
ggml_soft_max_back_impl: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDX MOV R14,RSI MOV R15,RDI CMP qword ptr [RSI + 0x98],0x0 JNZ 0x0016cd63 CMP qword ptr [RBX + 0x98],0x0 JZ 0x0016cdbe LAB_0016cd63: MOV BPL,0x1 LAB_0016cd66: MOV RDI,R15 MOV RSI,R14 TEST CL,CL JZ 0x0016cd77 CALL 0x00169922 JMP 0x0016cd7c LAB_0016cd77: CALL 0x00168a65 LAB_0016cd7c: MOV R12,RAX MOV dword ptr [RAX + 0x50],0x28 TEST BPL,BPL JZ 0x0016cd98 MOV RDI,R15 MOV RSI,R12 CALL 0x00168a65 JMP 0x0016cd9a LAB_0016cd98: XOR EAX,EAX LAB_0016cd9a: MOV qword ptr [R12 + 0x98],RAX MOV qword ptr [R12 + 0xa0],R14 MOV qword ptr [R12 + 0xa8],RBX MOV RAX,R12 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0016cdbe: XOR EBP,EBP JMP 0x0016cd66
long ggml_soft_max_back_impl(int8 param_1,long param_2,long param_3,char param_4) { bool bVar1; long lVar2; int8 uVar3; if ((*(long *)(param_2 + 0x98) == 0) && (*(long *)(param_3 + 0x98) == 0)) { bVar1 = false; } else { bVar1 = true; } if (param_4 == '\0') { lVar2 = ggml_dup_tensor(param_1,param_2); } else { lVar2 = ggml_view_tensor(); } *(int4 *)(lVar2 + 0x50) = 0x28; if (bVar1) { uVar3 = ggml_dup_tensor(param_1,lVar2); } else { uVar3 = 0; } *(int8 *)(lVar2 + 0x98) = uVar3; *(long *)(lVar2 + 0xa0) = param_2; *(long *)(lVar2 + 0xa8) = param_3; return lVar2; }
13,280
glfwAllocJoystick
untodesu[P]riteg/build_O3/_deps/glfw-src/src/input.c
_GLFWjoystick* _glfwAllocJoystick(const char* name, const char* guid, int axisCount, int buttonCount, int hatCount) { int jid; _GLFWjoystick* js; for (jid = 0; jid <= GLFW_JOYSTICK_LAST; jid++) { if (!_glfw.joysticks[jid].present) break; } if (jid > GLFW_JOYSTICK_LAST) return NULL; js = _glfw.joysticks + jid; js->present = GLFW_TRUE; js->name = _glfw_strdup(name); js->axes = calloc(axisCount, sizeof(float)); js->buttons = calloc(buttonCount + (size_t) hatCount * 4, 1); js->hats = calloc(hatCount, 1); js->axisCount = axisCount; js->buttonCount = buttonCount; js->hatCount = hatCount; strncpy(js->guid, guid, sizeof(js->guid) - 1); js->mapping = findValidMapping(js); return js; }
O3
c
glfwAllocJoystick: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %r8d, %ebp movl %ecx, %r15d movl %edx, %r12d movq %rsi, %r14 movl $0x408, %ebx # imm = 0x408 addq 0x8d8a1(%rip), %rbx # 0xa6fc0 movl $0x10, %eax cmpl $0x0, (%rbx) je 0x19739 addq $0x1fa0, %rbx # imm = 0x1FA0 decq %rax jne 0x19724 xorl %ebx, %ebx jmp 0x197b5 movl $0x1, (%rbx) callq 0x18e44 movq %rax, 0x38(%rbx) movslq %r12d, %r12 movl $0x4, %esi movq %r12, %rdi callq 0xc550 movq %rax, 0x8(%rbx) movslq %r15d, %r13 movslq %ebp, %r15 leaq (,%r15,4), %rdi addq %r13, %rdi movl $0x1, %esi callq 0xc550 movq %rax, 0x18(%rbx) movl $0x1, %esi movq %r15, %rdi callq 0xc550 movq %rax, 0x28(%rbx) movl %r12d, 0x10(%rbx) movl %r13d, 0x20(%rbx) movl %r15d, 0x30(%rbx) leaq 0x48(%rbx), %rdi movl $0x20, %edx movq %r14, %rsi callq 0xc440 movq %rbx, %rdi callq 0x197c7 movq %rax, 0x70(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_glfwAllocJoystick: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebp, r8d mov r15d, ecx mov r12d, edx mov r14, rsi mov ebx, 408h add rbx, cs:_glfw_ptr mov eax, 10h loc_19724: cmp dword ptr [rbx], 0 jz short loc_19739 add rbx, 1FA0h dec rax jnz short loc_19724 xor ebx, ebx jmp short loc_197B5 loc_19739: mov dword ptr [rbx], 1 call _glfw_strdup mov [rbx+38h], rax movsxd r12, r12d mov esi, 4 mov rdi, r12 call _calloc mov [rbx+8], rax movsxd r13, r15d movsxd r15, ebp lea rdi, ds:0[r15*4] add rdi, r13 mov esi, 1 call _calloc mov [rbx+18h], rax mov esi, 1 mov rdi, r15 call _calloc mov [rbx+28h], rax mov [rbx+10h], r12d mov [rbx+20h], r13d mov [rbx+30h], r15d lea rdi, [rbx+48h] mov edx, 20h ; ' ' mov rsi, r14 call _strncpy mov rdi, rbx call findValidMapping mov [rbx+70h], rax loc_197B5: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_DWORD * glfwAllocJoystick(long long a1, long long a2, int a3, int a4, int a5) { _DWORD *v8; // rbx long long v9; // rax v8 = &glfw[258]; v9 = 16LL; while ( *v8 ) { v8 += 2024; if ( !--v9 ) return 0LL; } *v8 = 1; *((_QWORD *)v8 + 7) = glfw_strdup(a1); *((_QWORD *)v8 + 1) = calloc(a3, 4LL); *((_QWORD *)v8 + 3) = calloc(a4 + 4LL * a5, 1LL); *((_QWORD *)v8 + 5) = calloc(a5, 1LL); v8[4] = a3; v8[8] = a4; v8[12] = a5; strncpy(v8 + 18, a2, 32LL); *((_QWORD *)v8 + 14) = findValidMapping(v8); return v8; }
_glfwAllocJoystick: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBP,R8D MOV R15D,ECX MOV R12D,EDX MOV R14,RSI MOV EBX,0x408 ADD RBX,qword ptr [0x001a6fc0] MOV EAX,0x10 LAB_00119724: CMP dword ptr [RBX],0x0 JZ 0x00119739 ADD RBX,0x1fa0 DEC RAX JNZ 0x00119724 XOR EBX,EBX JMP 0x001197b5 LAB_00119739: MOV dword ptr [RBX],0x1 CALL 0x00118e44 MOV qword ptr [RBX + 0x38],RAX MOVSXD R12,R12D MOV ESI,0x4 MOV RDI,R12 CALL 0x0010c550 MOV qword ptr [RBX + 0x8],RAX MOVSXD R13,R15D MOVSXD R15,EBP LEA RDI,[R15*0x4] ADD RDI,R13 MOV ESI,0x1 CALL 0x0010c550 MOV qword ptr [RBX + 0x18],RAX MOV ESI,0x1 MOV RDI,R15 CALL 0x0010c550 MOV qword ptr [RBX + 0x28],RAX MOV dword ptr [RBX + 0x10],R12D MOV dword ptr [RBX + 0x20],R13D MOV dword ptr [RBX + 0x30],R15D LEA RDI,[RBX + 0x48] MOV EDX,0x20 MOV RSI,R14 CALL 0x0010c440 MOV RDI,RBX CALL 0x001197c7 MOV qword ptr [RBX + 0x70],RAX LAB_001197b5: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int * _glfwAllocJoystick(int8 param_1,char *param_2,int param_3,int param_4,int param_5) { long lVar1; int8 uVar2; void *pvVar3; int *piVar4; piVar4 = (int *)(PTR__glfw_001a6fc0 + 0x408); lVar1 = 0x10; do { if (*piVar4 == 0) { *piVar4 = 1; uVar2 = _glfw_strdup(); *(int8 *)(piVar4 + 0xe) = uVar2; pvVar3 = calloc((long)param_3,4); *(void **)(piVar4 + 2) = pvVar3; pvVar3 = calloc((long)param_5 * 4 + (long)param_4,1); *(void **)(piVar4 + 6) = pvVar3; pvVar3 = calloc((long)param_5,1); *(void **)(piVar4 + 10) = pvVar3; piVar4[4] = param_3; piVar4[8] = param_4; piVar4[0xc] = param_5; strncpy((char *)(piVar4 + 0x12),param_2,0x20); uVar2 = findValidMapping(piVar4); *(int8 *)(piVar4 + 0x1c) = uVar2; return piVar4; } piVar4 = piVar4 + 0x7e8; lVar1 = lVar1 + -1; } while (lVar1 != 0); return (int *)0x0; }
13,281
nlohmann::json_abi_v3_11_3::detail::output_adapter<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::output_adapter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
monkey531[P]llama/common/json.hpp
output_adapter(StringType& s) : oa(std::make_shared<output_string_adapter<CharType, StringType>>(s)) {}
O2
cpp
nlohmann::json_abi_v3_11_3::detail::output_adapter<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::output_adapter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movq %rsp, %rdi callq 0x865af leaq 0x8(%rsp), %rdi movaps -0x8(%rdi), %xmm0 andq $0x0, (%rdi) movups %xmm0, (%rbx) andq $0x0, -0x8(%rdi) callq 0x4f1f0 addq $0x10, %rsp popq %rbx retq
_ZN8nlohmann16json_abi_v3_11_36detail14output_adapterIcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2ERS8_: push rbx sub rsp, 10h mov rbx, rdi mov rdi, rsp call _ZSt11make_sharedIN8nlohmann16json_abi_v3_11_36detail21output_string_adapterIcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEJRS9_EESt10shared_ptrIT_EDpOT0_; std::make_shared<nlohmann::json_abi_v3_11_3::detail::output_string_adapter<char,std::string>,std::string&>(std::string&) lea rdi, [rsp+18h+var_10] movaps xmm0, xmmword ptr [rdi-8] and qword ptr [rdi], 0 movups xmmword ptr [rbx], xmm0 and qword ptr [rdi-8], 0 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() add rsp, 10h pop rbx retn
long long nlohmann::json_abi_v3_11_3::detail::output_adapter<char,std::string>::output_adapter(_OWORD *a1) { __int128 v1; // xmm0 __int128 v3; // [rsp+0h] [rbp-18h] BYREF std::make_shared<nlohmann::json_abi_v3_11_3::detail::output_string_adapter<char,std::string>,std::string&>(&v3); v1 = v3; *((_QWORD *)&v3 + 1) = 0LL; *a1 = v1; *(_QWORD *)&v3 = 0LL; return std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v3 + 1); }
output_adapter: PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOV RDI,RSP CALL 0x001865af LEA RDI,[RSP + 0x8] MOVAPS XMM0,xmmword ptr [RDI + -0x8] AND qword ptr [RDI],0x0 MOVUPS xmmword ptr [RBX],XMM0 AND qword ptr [RDI + -0x8],0x0 CALL 0x0014f1f0 ADD RSP,0x10 POP RBX RET
/* nlohmann::json_abi_v3_11_3::detail::output_adapter<char, std::__cxx11::string >::output_adapter(std::__cxx11::string&) */ void nlohmann::json_abi_v3_11_3::detail::output_adapter<char,std::__cxx11::string>::output_adapter (string *param_1) { int8 uVar1; int8 local_18; int8 uStack_10; std:: make_shared<nlohmann::json_abi_v3_11_3::detail::output_string_adapter<char,std::__cxx11::string>,std::__cxx11::string&> ((string *)&local_18); uVar1 = uStack_10; uStack_10 = 0; *(int8 *)param_1 = local_18; *(int8 *)(param_1 + 8) = uVar1; local_18 = 0; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_10); return; }
13,282
mthd_stmt_get_result_metadata
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
my_bool mthd_stmt_get_result_metadata(MYSQL_STMT *stmt) { MYSQL_DATA *result; MA_MEM_ROOT *fields_ma_alloc_root= &((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root; if (!(result= stmt->mysql->methods->db_read_rows(stmt->mysql, (MYSQL_FIELD *)0, 7 + ma_extended_type_info_rows(stmt->mysql)))) return(1); if (!(stmt->fields= unpack_fields(stmt->mysql, result, fields_ma_alloc_root, stmt->field_count, 0))) return(1); return(0); }
O0
c
mthd_stmt_get_result_metadata: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x340(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq 0x4d0(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi callq 0x2b420 movq -0x30(%rbp), %rdi movl %eax, %edx movq -0x28(%rbp), %rax addl $0x7, %edx xorl %ecx, %ecx movl %ecx, %esi callq *%rax movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x2b4be movb $0x1, -0x1(%rbp) jmp 0x2b4f5 movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x10(%rbp), %rax movl 0x60(%rax), %ecx xorl %r8d, %r8d callq 0x1a9c0 movq -0x10(%rbp), %rcx movq %rax, 0x58(%rcx) cmpq $0x0, %rax jne 0x2b4f1 movb $0x1, -0x1(%rbp) jmp 0x2b4f5 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nop
mthd_stmt_get_result_metadata: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax+340h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rax, [rax+38h] mov rax, [rax+4D0h] mov rax, [rax+28h] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rax, [rax+38h] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov rdi, [rax+38h] call ma_extended_type_info_rows mov rdi, [rbp+var_30] mov edx, eax mov rax, [rbp+var_28] add edx, 7 xor ecx, ecx mov esi, ecx call rax mov [rbp+var_18], rax cmp rax, 0 jnz short loc_2B4BE mov [rbp+var_1], 1 jmp short loc_2B4F5 loc_2B4BE: mov rax, [rbp+var_10] mov rdi, [rax+38h] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov rax, [rbp+var_10] mov ecx, [rax+60h] xor r8d, r8d call unpack_fields mov rcx, [rbp+var_10] mov [rcx+58h], rax cmp rax, 0 jnz short loc_2B4F1 mov [rbp+var_1], 1 jmp short loc_2B4F5 loc_2B4F1: mov [rbp+var_1], 0 loc_2B4F5: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
bool mthd_stmt_get_result_metadata(long long a1) { BOOL v1; // eax long long v2; // rax long long v4; // [rsp+0h] [rbp-30h] long long ( *v5)(long long, _QWORD, _QWORD); // [rsp+8h] [rbp-28h] long long v6; // [rsp+10h] [rbp-20h] _QWORD *v7; // [rsp+18h] [rbp-18h] v6 = *(_QWORD *)(a1 + 832); v5 = *(long long ( **)(long long, _QWORD, _QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 40LL); v4 = *(_QWORD *)(a1 + 56); v1 = ma_extended_type_info_rows(v4); v7 = (_QWORD *)v5(v4, 0LL, (unsigned int)(v1 + 7)); if ( !v7 ) return 1; v2 = unpack_fields(*(_QWORD *)(a1 + 56), v7, v6, *(_DWORD *)(a1 + 96), 0); *(_QWORD *)(a1 + 88) = v2; return v2 == 0; }
mthd_stmt_get_result_metadata: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x340] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] CALL 0x0012b420 MOV RDI,qword ptr [RBP + -0x30] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x28] ADD EDX,0x7 XOR ECX,ECX MOV ESI,ECX CALL RAX MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x0012b4be MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012b4f5 LAB_0012b4be: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x60] XOR R8D,R8D CALL 0x0011a9c0 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x58],RAX CMP RAX,0x0 JNZ 0x0012b4f1 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012b4f5 LAB_0012b4f1: MOV byte ptr [RBP + -0x1],0x0 LAB_0012b4f5: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 mthd_stmt_get_result_metadata(long param_1) { int8 uVar1; code *pcVar2; int8 uVar3; int iVar4; long lVar5; int1 local_9; uVar1 = *(int8 *)(param_1 + 0x340); pcVar2 = *(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x28); uVar3 = *(int8 *)(param_1 + 0x38); iVar4 = ma_extended_type_info_rows(*(int8 *)(param_1 + 0x38)); lVar5 = (*pcVar2)(uVar3,0,iVar4 + 7); if (lVar5 == 0) { local_9 = 1; } else { lVar5 = unpack_fields(*(int8 *)(param_1 + 0x38),lVar5,uVar1, *(int4 *)(param_1 + 0x60),0); *(long *)(param_1 + 0x58) = lVar5; if (lVar5 == 0) { local_9 = 1; } else { local_9 = 0; } } return local_9; }
13,283
ma_hashtbl_free
eloqsql/libmariadb/libmariadb/ma_hashtbl.c
void ma_hashtbl_free(MA_HASHTBL *hash) { if (hash->free) { uint i,records; MA_HASHTBL_LINK *data=dynamic_element(&hash->array,0,MA_HASHTBL_LINK*); for (i=0,records=hash->records ; i < records ; i++) (*hash->free)(data[i].data); hash->free=0; } ma_delete_dynamic(&hash->array); hash->records=0; return; }
O0
c
ma_hashtbl_free: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x38(%rax) je 0xa94df movq -0x8(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x18(%rbp) movl $0x0, -0xc(%rbp) movq -0x8(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x10(%rbp) movl -0xc(%rbp), %eax cmpl -0x10(%rbp), %eax jae 0xa94d3 movq -0x8(%rbp), %rax movq 0x38(%rax), %rax movq -0x18(%rbp), %rcx movl -0xc(%rbp), %edx shlq $0x4, %rdx addq %rdx, %rcx movq 0x8(%rcx), %rdi callq *%rax movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) jmp 0xa94a4 movq -0x8(%rbp), %rax movq $0x0, 0x38(%rax) movq -0x8(%rbp), %rdi addq $0x18, %rdi callq 0xa7810 movq -0x8(%rbp), %rax movl $0x0, 0x8(%rax) addq $0x20, %rsp popq %rbp retq nopl (%rax)
ma_hashtbl_free: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+38h], 0 jz short loc_A94DF mov rax, [rbp+var_8] mov rax, [rax+18h] mov [rbp+var_18], rax mov [rbp+var_C], 0 mov rax, [rbp+var_8] mov eax, [rax+8] mov [rbp+var_10], eax loc_A94A4: mov eax, [rbp+var_C] cmp eax, [rbp+var_10] jnb short loc_A94D3 mov rax, [rbp+var_8] mov rax, [rax+38h] mov rcx, [rbp+var_18] mov edx, [rbp+var_C] shl rdx, 4 add rcx, rdx mov rdi, [rcx+8] call rax mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax jmp short loc_A94A4 loc_A94D3: mov rax, [rbp+var_8] mov qword ptr [rax+38h], 0 loc_A94DF: mov rdi, [rbp+var_8] add rdi, 18h call ma_delete_dynamic mov rax, [rbp+var_8] mov dword ptr [rax+8], 0 add rsp, 20h pop rbp retn
long long ma_hashtbl_free(long long a1) { long long result; // rax long long v2; // [rsp+8h] [rbp-18h] unsigned int v3; // [rsp+10h] [rbp-10h] unsigned int v4; // [rsp+14h] [rbp-Ch] if ( *(_QWORD *)(a1 + 56) ) { v2 = *(_QWORD *)(a1 + 24); v4 = 0; v3 = *(_DWORD *)(a1 + 8); while ( v4 < v3 ) (*(void ( **)(_QWORD))(a1 + 56))(*(_QWORD *)(16LL * v4++ + v2 + 8)); *(_QWORD *)(a1 + 56) = 0LL; } ma_delete_dynamic(a1 + 24); result = a1; *(_DWORD *)(a1 + 8) = 0; return result; }
ma_hashtbl_free: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x38],0x0 JZ 0x001a94df MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x18],RAX MOV dword ptr [RBP + -0xc],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x10],EAX LAB_001a94a4: MOV EAX,dword ptr [RBP + -0xc] CMP EAX,dword ptr [RBP + -0x10] JNC 0x001a94d3 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x38] MOV RCX,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0xc] SHL RDX,0x4 ADD RCX,RDX MOV RDI,qword ptr [RCX + 0x8] CALL RAX MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x1 MOV dword ptr [RBP + -0xc],EAX JMP 0x001a94a4 LAB_001a94d3: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x38],0x0 LAB_001a94df: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x18 CALL 0x001a7810 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x8],0x0 ADD RSP,0x20 POP RBP RET
void ma_hashtbl_free(long param_1) { uint uVar1; long lVar2; int4 local_14; if (*(long *)(param_1 + 0x38) != 0) { lVar2 = *(long *)(param_1 + 0x18); local_14 = 0; uVar1 = *(uint *)(param_1 + 8); for (; local_14 < uVar1; local_14 = local_14 + 1) { (**(code **)(param_1 + 0x38))(*(int8 *)(lVar2 + (ulong)local_14 * 0x10 + 8)); } *(int8 *)(param_1 + 0x38) = 0; } ma_delete_dynamic(param_1 + 0x18); *(int4 *)(param_1 + 8) = 0; return; }
13,284
ma_hashtbl_free
eloqsql/libmariadb/libmariadb/ma_hashtbl.c
void ma_hashtbl_free(MA_HASHTBL *hash) { if (hash->free) { uint i,records; MA_HASHTBL_LINK *data=dynamic_element(&hash->array,0,MA_HASHTBL_LINK*); for (i=0,records=hash->records ; i < records ; i++) (*hash->free)(data[i].data); hash->free=0; } ma_delete_dynamic(&hash->array); hash->records=0; return; }
O3
c
ma_hashtbl_free: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %rbx cmpq $0x0, 0x38(%rdi) je 0x8dc93 movl 0x8(%rbx), %r14d testq %r14, %r14 je 0x8dc8b movq 0x18(%rbx), %r15 shlq $0x4, %r14 xorl %r12d, %r12d movq 0x8(%r15,%r12), %rdi callq *0x38(%rbx) addq $0x10, %r12 cmpq %r12, %r14 jne 0x8dc7a movq $0x0, 0x38(%rbx) leaq 0x18(%rbx), %rdi callq 0x8d06c movl $0x0, 0x8(%rbx) popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
ma_hashtbl_free: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdi cmp qword ptr [rdi+38h], 0 jz short loc_8DC93 mov r14d, [rbx+8] test r14, r14 jz short loc_8DC8B mov r15, [rbx+18h] shl r14, 4 xor r12d, r12d loc_8DC7A: mov rdi, [r15+r12+8] call qword ptr [rbx+38h] add r12, 10h cmp r14, r12 jnz short loc_8DC7A loc_8DC8B: mov qword ptr [rbx+38h], 0 loc_8DC93: lea rdi, [rbx+18h] call ma_delete_dynamic mov dword ptr [rbx+8], 0 pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long ma_hashtbl_free(long long a1) { long long v1; // r15 long long v2; // r14 long long v3; // r12 long long result; // rax if ( *(_QWORD *)(a1 + 56) ) { if ( *(_DWORD *)(a1 + 8) ) { v1 = *(_QWORD *)(a1 + 24); v2 = 16LL * *(unsigned int *)(a1 + 8); v3 = 0LL; do { (*(void ( **)(_QWORD))(a1 + 56))(*(_QWORD *)(v1 + v3 + 8)); v3 += 16LL; } while ( v2 != v3 ); } *(_QWORD *)(a1 + 56) = 0LL; } result = ma_delete_dynamic((long long *)(a1 + 24)); *(_DWORD *)(a1 + 8) = 0; return result; }
ma_hashtbl_free: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDI CMP qword ptr [RDI + 0x38],0x0 JZ 0x0018dc93 MOV R14D,dword ptr [RBX + 0x8] TEST R14,R14 JZ 0x0018dc8b MOV R15,qword ptr [RBX + 0x18] SHL R14,0x4 XOR R12D,R12D LAB_0018dc7a: MOV RDI,qword ptr [R15 + R12*0x1 + 0x8] CALL qword ptr [RBX + 0x38] ADD R12,0x10 CMP R14,R12 JNZ 0x0018dc7a LAB_0018dc8b: MOV qword ptr [RBX + 0x38],0x0 LAB_0018dc93: LEA RDI,[RBX + 0x18] CALL 0x0018d06c MOV dword ptr [RBX + 0x8],0x0 POP RBX POP R12 POP R14 POP R15 POP RBP RET
void ma_hashtbl_free(long param_1) { uint uVar1; long lVar2; long lVar3; if (*(long *)(param_1 + 0x38) != 0) { uVar1 = *(uint *)(param_1 + 8); if ((ulong)uVar1 != 0) { lVar2 = *(long *)(param_1 + 0x18); lVar3 = 0; do { (**(code **)(param_1 + 0x38))(*(int8 *)(lVar2 + 8 + lVar3)); lVar3 = lVar3 + 0x10; } while ((ulong)uVar1 << 4 != lVar3); } *(int8 *)(param_1 + 0x38) = 0; } ma_delete_dynamic(param_1 + 0x18); *(int4 *)(param_1 + 8) = 0; return; }
13,285
translog_fixed_length_header
eloqsql/storage/maria/ma_loghandler.c
static int translog_fixed_length_header(uchar *page, translog_size_t page_offset, TRANSLOG_HEADER_BUFFER *buff) { struct st_log_record_type_descriptor *desc= log_record_type_descriptor + buff->type; uchar *src= page + page_offset + 3; uchar *dst= buff->header; uchar *start= src; int lsns= desc->compressed_LSN; uint length= desc->fixed_length; DBUG_ENTER("translog_fixed_length_header"); buff->record_length= length; if (desc->rclass == LOGRECTYPE_PSEUDOFIXEDLENGTH) { DBUG_ASSERT(lsns > 0); src= translog_relative_LSN_decode(buff->lsn, src, dst, lsns); lsns*= LSN_STORE_SIZE; dst+= lsns; length-= lsns; buff->compressed_LSN_economy= (lsns - (int) (src - start)); } else buff->compressed_LSN_economy= 0; memcpy(dst, src, length); buff->non_header_data_start_offset= (uint16) (page_offset + ((src + length) - (page + page_offset))); buff->non_header_data_len= 0; DBUG_RETURN(buff->record_length); }
O0
c
translog_fixed_length_header: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq -0x18(%rbp), %rax movl 0x420(%rax), %eax movl %eax, %ecx leaq 0x46226a(%rip), %rax # 0x4ad540 imulq $0x48, %rcx, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rax movl -0xc(%rbp), %ecx addq %rcx, %rax addq $0x3, %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax addq $0x18, %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rax movswl 0x20(%rax), %eax movl %eax, -0x3c(%rbp) movq -0x20(%rbp), %rax movzwl 0x4(%rax), %eax movl %eax, -0x40(%rbp) movl -0x40(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, 0x14(%rax) movq -0x20(%rbp), %rax cmpl $0x2, (%rax) jne 0x4b392 jmp 0x4b332 jmp 0x4b334 movq -0x18(%rbp), %rax movq (%rax), %rdi movq -0x28(%rbp), %rsi movq -0x30(%rbp), %rdx movl -0x3c(%rbp), %ecx callq 0x51fd0 movq %rax, -0x28(%rbp) imull $0x7, -0x3c(%rbp), %eax movl %eax, -0x3c(%rbp) movl -0x3c(%rbp), %ecx movq -0x30(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movl -0x3c(%rbp), %ecx movl -0x40(%rbp), %eax subl %ecx, %eax movl %eax, -0x40(%rbp) movl -0x3c(%rbp), %eax movq -0x28(%rbp), %rcx movq -0x38(%rbp), %rdx subq %rdx, %rcx subl %ecx, %eax movw %ax, %cx movq -0x18(%rbp), %rax movw %cx, 0x430(%rax) jmp 0x4b39f movq -0x18(%rbp), %rax movw $0x0, 0x430(%rax) movq -0x30(%rbp), %rdi movq -0x28(%rbp), %rsi movl -0x40(%rbp), %eax movl %eax, %edx callq 0x2a0c0 movl -0xc(%rbp), %eax movq -0x28(%rbp), %rcx movl -0x40(%rbp), %edx addq %rdx, %rcx movq -0x8(%rbp), %rdx movl -0xc(%rbp), %esi addq %rsi, %rdx subq %rdx, %rcx addq %rcx, %rax movw %ax, %cx movq -0x18(%rbp), %rax movw %cx, 0x432(%rax) movq -0x18(%rbp), %rax movw $0x0, 0x434(%rax) movq -0x18(%rbp), %rax movl 0x14(%rax), %eax movl %eax, -0x44(%rbp) movl -0x44(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopl (%rax)
translog_fixed_length_header: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov rax, [rbp+var_18] mov eax, [rax+420h] mov ecx, eax lea rax, log_record_type_descriptor imul rcx, 48h ; 'H' add rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_8] mov ecx, [rbp+var_C] add rax, rcx add rax, 3 mov [rbp+var_28], rax mov rax, [rbp+var_18] add rax, 18h mov [rbp+var_30], rax mov rax, [rbp+var_28] mov [rbp+var_38], rax mov rax, [rbp+var_20] movsx eax, word ptr [rax+20h] mov [rbp+var_3C], eax mov rax, [rbp+var_20] movzx eax, word ptr [rax+4] mov [rbp+var_40], eax mov ecx, [rbp+var_40] mov rax, [rbp+var_18] mov [rax+14h], ecx mov rax, [rbp+var_20] cmp dword ptr [rax], 2 jnz short loc_4B392 jmp short $+2 loc_4B332: jmp short $+2 loc_4B334: mov rax, [rbp+var_18] mov rdi, [rax] mov rsi, [rbp+var_28] mov rdx, [rbp+var_30] mov ecx, [rbp+var_3C] call translog_relative_LSN_decode mov [rbp+var_28], rax imul eax, [rbp+var_3C], 7 mov [rbp+var_3C], eax mov ecx, [rbp+var_3C] mov rax, [rbp+var_30] movsxd rcx, ecx add rax, rcx mov [rbp+var_30], rax mov ecx, [rbp+var_3C] mov eax, [rbp+var_40] sub eax, ecx mov [rbp+var_40], eax mov eax, [rbp+var_3C] mov rcx, [rbp+var_28] mov rdx, [rbp+var_38] sub rcx, rdx sub eax, ecx mov cx, ax mov rax, [rbp+var_18] mov [rax+430h], cx jmp short loc_4B39F loc_4B392: mov rax, [rbp+var_18] mov word ptr [rax+430h], 0 loc_4B39F: mov rdi, [rbp+var_30] mov rsi, [rbp+var_28] mov eax, [rbp+var_40] mov edx, eax call _memcpy mov eax, [rbp+var_C] mov rcx, [rbp+var_28] mov edx, [rbp+var_40] add rcx, rdx mov rdx, [rbp+var_8] mov esi, [rbp+var_C] add rdx, rsi sub rcx, rdx add rax, rcx mov cx, ax mov rax, [rbp+var_18] mov [rax+432h], cx mov rax, [rbp+var_18] mov word ptr [rax+434h], 0 mov rax, [rbp+var_18] mov eax, [rax+14h] mov [rbp+var_44], eax mov eax, [rbp+var_44] add rsp, 50h pop rbp retn
long long translog_fixed_length_header(long long a1, unsigned int a2, long long a3) { unsigned int v4; // [rsp+10h] [rbp-40h] unsigned int v5; // [rsp+14h] [rbp-3Ch] int v6; // [rsp+14h] [rbp-3Ch] long long v7; // [rsp+20h] [rbp-30h] long long v8; // [rsp+28h] [rbp-28h] _DWORD *v9; // [rsp+30h] [rbp-20h] v9 = &log_record_type_descriptor[18 * *(unsigned int *)(a3 + 1056)]; v8 = a2 + a1 + 3; v7 = a3 + 24; v5 = *((__int16 *)v9 + 16); v4 = *((unsigned __int16 *)v9 + 2); *(_DWORD *)(a3 + 20) = v4; if ( *v9 == 2 ) { v8 = translog_relative_LSN_decode(*(_QWORD *)a3, v8, v7, v5); v6 = 7 * v5; v7 += v6; v4 -= v6; *(_WORD *)(a3 + 1072) = v6 - (v8 - (a2 + a1 + 3)); } else { *(_WORD *)(a3 + 1072) = 0; } memcpy(v7, v8, v4); *(_WORD *)(a3 + 1074) = v4 + v8 - a1; *(_WORD *)(a3 + 1076) = 0; return *(unsigned int *)(a3 + 20); }
translog_fixed_length_header: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x420] MOV ECX,EAX LEA RAX,[0x5ad540] IMUL RCX,RCX,0x48 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0xc] ADD RAX,RCX ADD RAX,0x3 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x18 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,word ptr [RAX + 0x20] MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX + 0x4] MOV dword ptr [RBP + -0x40],EAX MOV ECX,dword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x14],ECX MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX],0x2 JNZ 0x0014b392 JMP 0x0014b332 LAB_0014b332: JMP 0x0014b334 LAB_0014b334: MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RBP + -0x3c] CALL 0x00151fd0 MOV qword ptr [RBP + -0x28],RAX IMUL EAX,dword ptr [RBP + -0x3c],0x7 MOV dword ptr [RBP + -0x3c],EAX MOV ECX,dword ptr [RBP + -0x3c] MOV RAX,qword ptr [RBP + -0x30] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV ECX,dword ptr [RBP + -0x3c] MOV EAX,dword ptr [RBP + -0x40] SUB EAX,ECX MOV dword ptr [RBP + -0x40],EAX MOV EAX,dword ptr [RBP + -0x3c] MOV RCX,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x38] SUB RCX,RDX SUB EAX,ECX MOV CX,AX MOV RAX,qword ptr [RBP + -0x18] MOV word ptr [RAX + 0x430],CX JMP 0x0014b39f LAB_0014b392: MOV RAX,qword ptr [RBP + -0x18] MOV word ptr [RAX + 0x430],0x0 LAB_0014b39f: MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RBP + -0x40] MOV EDX,EAX CALL 0x0012a0c0 MOV EAX,dword ptr [RBP + -0xc] MOV RCX,qword ptr [RBP + -0x28] MOV EDX,dword ptr [RBP + -0x40] ADD RCX,RDX MOV RDX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] ADD RDX,RSI SUB RCX,RDX ADD RAX,RCX MOV CX,AX MOV RAX,qword ptr [RBP + -0x18] MOV word ptr [RAX + 0x432],CX MOV RAX,qword ptr [RBP + -0x18] MOV word ptr [RAX + 0x434],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x14] MOV dword ptr [RBP + -0x44],EAX MOV EAX,dword ptr [RBP + -0x44] ADD RSP,0x50 POP RBP RET
int4 translog_fixed_length_header(long param_1,uint param_2,int8 *param_3) { int iVar1; void *pvVar2; long lVar3; uint local_48; int8 *local_38; void *local_30; lVar3 = (ulong)*(uint *)(param_3 + 0x84) * 0x48; local_30 = (void *)(param_1 + (ulong)param_2 + 3); local_38 = param_3 + 3; iVar1 = (int)*(short *)(log_record_type_descriptor + lVar3 + 0x20); local_48 = (uint)*(ushort *)(log_record_type_descriptor + lVar3 + 4); *(uint *)((long)param_3 + 0x14) = local_48; if (*(int *)(log_record_type_descriptor + lVar3) == 2) { pvVar2 = (void *)translog_relative_LSN_decode(*param_3,local_30,local_38,iVar1); local_38 = (int8 *)((long)local_38 + (long)(iVar1 * 7)); local_48 = local_48 + iVar1 * -7; *(short *)(param_3 + 0x86) = (short)(iVar1 * 7) - ((short)pvVar2 - (short)local_30); local_30 = pvVar2; } else { *(int2 *)(param_3 + 0x86) = 0; } memcpy(local_38,local_30,(ulong)local_48); *(short *)((long)param_3 + 0x432) = ((short)local_30 + (short)local_48) - (short)param_1; *(int2 *)((long)param_3 + 0x434) = 0; return *(int4 *)((long)param_3 + 0x14); }
13,286
s2b
eloqsql/strings/dtoa.c
static Bigint *s2b(const char *s, int nd0, int nd, ULong y9, Stack_alloc *alloc) { Bigint *b; int i, k; Long x, y; x= (nd + 8) / 9; for (k= 0, y= 1; x > y; y <<= 1, k++) ; b= Balloc(k, alloc); b->p.x[0]= y9; b->wds= 1; i= 9; if (9 < nd0) { s+= 9; do b= multadd(b, 10, *s++ - '0', alloc); while (++i < nd0); s++; /* skip '.' */ } else s+= 10; /* now do the fractional part */ for(; i < nd; i++) b= multadd(b, 10, *s++ - '0', alloc); return b; }
O0
c
s2b: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movl %ecx, -0x14(%rbp) movq %r8, -0x20(%rbp) movl -0x10(%rbp), %eax addl $0x8, %eax movl $0x9, %ecx cltd idivl %ecx movl %eax, -0x34(%rbp) movl $0x0, -0x30(%rbp) movl $0x1, -0x38(%rbp) movl -0x34(%rbp), %eax cmpl -0x38(%rbp), %eax jle 0x81d85 jmp 0x81d72 movl -0x38(%rbp), %eax shll %eax movl %eax, -0x38(%rbp) movl -0x30(%rbp), %eax addl $0x1, %eax movl %eax, -0x30(%rbp) jmp 0x81d68 movl -0x30(%rbp), %edi movq -0x20(%rbp), %rsi callq 0x81e70 movq %rax, -0x28(%rbp) movl -0x14(%rbp), %ecx movq -0x28(%rbp), %rax movq (%rax), %rax movl %ecx, (%rax) movq -0x28(%rbp), %rax movl $0x1, 0x14(%rax) movl $0x9, -0x2c(%rbp) movl $0x9, %eax cmpl -0xc(%rbp), %eax jge 0x81e10 movq -0x8(%rbp), %rax addq $0x9, %rax movq %rax, -0x8(%rbp) movq -0x28(%rbp), %rdi movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movsbl (%rax), %edx subl $0x30, %edx movq -0x20(%rbp), %rcx movl $0xa, %esi callq 0x82b00 movq %rax, -0x28(%rbp) movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) cmpl -0xc(%rbp), %eax jl 0x81dc9 movq -0x8(%rbp), %rax addq $0x1, %rax movq %rax, -0x8(%rbp) jmp 0x81e1c movq -0x8(%rbp), %rax addq $0xa, %rax movq %rax, -0x8(%rbp) jmp 0x81e1e movl -0x2c(%rbp), %eax cmpl -0x10(%rbp), %eax jge 0x81e5c movq -0x28(%rbp), %rdi movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movsbl (%rax), %edx subl $0x30, %edx movq -0x20(%rbp), %rcx movl $0xa, %esi callq 0x82b00 movq %rax, -0x28(%rbp) movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0x81e1e movq -0x28(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
s2b: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov [rbp+var_14], ecx mov [rbp+var_20], r8 mov eax, [rbp+var_10] add eax, 8 mov ecx, 9 cdq idiv ecx mov [rbp+var_34], eax mov [rbp+var_30], 0 mov [rbp+var_38], 1 loc_81D68: mov eax, [rbp+var_34] cmp eax, [rbp+var_38] jle short loc_81D85 jmp short $+2 loc_81D72: mov eax, [rbp+var_38] shl eax, 1 mov [rbp+var_38], eax mov eax, [rbp+var_30] add eax, 1 mov [rbp+var_30], eax jmp short loc_81D68 loc_81D85: mov edi, [rbp+var_30] mov rsi, [rbp+var_20] call Balloc mov [rbp+var_28], rax mov ecx, [rbp+var_14] mov rax, [rbp+var_28] mov rax, [rax] mov [rax], ecx mov rax, [rbp+var_28] mov dword ptr [rax+14h], 1 mov [rbp+var_2C], 9 mov eax, 9 cmp eax, [rbp+var_C] jge short loc_81E10 mov rax, [rbp+var_8] add rax, 9 mov [rbp+var_8], rax loc_81DC9: mov rdi, [rbp+var_28] mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx movsx edx, byte ptr [rax] sub edx, 30h ; '0' mov rcx, [rbp+var_20] mov esi, 0Ah call multadd mov [rbp+var_28], rax mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax cmp eax, [rbp+var_C] jl short loc_81DC9 mov rax, [rbp+var_8] add rax, 1 mov [rbp+var_8], rax jmp short loc_81E1C loc_81E10: mov rax, [rbp+var_8] add rax, 0Ah mov [rbp+var_8], rax loc_81E1C: jmp short $+2 loc_81E1E: mov eax, [rbp+var_2C] cmp eax, [rbp+var_10] jge short loc_81E5C mov rdi, [rbp+var_28] mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx movsx edx, byte ptr [rax] sub edx, 30h ; '0' mov rcx, [rbp+var_20] mov esi, 0Ah call multadd mov [rbp+var_28], rax mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax jmp short loc_81E1E loc_81E5C: mov rax, [rbp+var_28] add rsp, 40h pop rbp retn
long long s2b(long long a1, int a2, int a3, int a4, long long a5) { char *v5; // rax char *v6; // rax int i; // [rsp+8h] [rbp-38h] unsigned int v9; // [rsp+10h] [rbp-30h] int v10; // [rsp+14h] [rbp-2Ch] long long v11; // [rsp+18h] [rbp-28h] char *v15; // [rsp+38h] [rbp-8h] char *v16; // [rsp+38h] [rbp-8h] v9 = 0; for ( i = 1; (a3 + 8) / 9 > i; i *= 2 ) ++v9; v11 = Balloc(v9, a5); **(_DWORD **)v11 = a4; *(_DWORD *)(v11 + 20) = 1; v10 = 9; if ( a2 <= 9 ) { v16 = (char *)(a1 + 10); } else { v15 = (char *)(a1 + 9); do { v5 = v15++; v11 = multadd(v11, 10LL, (unsigned int)(*v5 - 48), a5); ++v10; } while ( v10 < a2 ); v16 = v15 + 1; } while ( v10 < a3 ) { v6 = v16++; v11 = multadd(v11, 10LL, (unsigned int)(*v6 - 48), a5); ++v10; } return v11; }
s2b: PUSH RBP MOV RBP,RSP SUB RSP,0x40 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 qword ptr [RBP + -0x20],R8 MOV EAX,dword ptr [RBP + -0x10] ADD EAX,0x8 MOV ECX,0x9 CDQ IDIV ECX MOV dword ptr [RBP + -0x34],EAX MOV dword ptr [RBP + -0x30],0x0 MOV dword ptr [RBP + -0x38],0x1 LAB_00181d68: MOV EAX,dword ptr [RBP + -0x34] CMP EAX,dword ptr [RBP + -0x38] JLE 0x00181d85 JMP 0x00181d72 LAB_00181d72: MOV EAX,dword ptr [RBP + -0x38] SHL EAX,0x1 MOV dword ptr [RBP + -0x38],EAX MOV EAX,dword ptr [RBP + -0x30] ADD EAX,0x1 MOV dword ptr [RBP + -0x30],EAX JMP 0x00181d68 LAB_00181d85: MOV EDI,dword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x20] CALL 0x00181e70 MOV qword ptr [RBP + -0x28],RAX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x14],0x1 MOV dword ptr [RBP + -0x2c],0x9 MOV EAX,0x9 CMP EAX,dword ptr [RBP + -0xc] JGE 0x00181e10 MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x9 MOV qword ptr [RBP + -0x8],RAX LAB_00181dc9: MOV RDI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOVSX EDX,byte ptr [RAX] SUB EDX,0x30 MOV RCX,qword ptr [RBP + -0x20] MOV ESI,0xa CALL 0x00182b00 MOV qword ptr [RBP + -0x28],RAX MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX CMP EAX,dword ptr [RBP + -0xc] JL 0x00181dc9 MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x1 MOV qword ptr [RBP + -0x8],RAX JMP 0x00181e1c LAB_00181e10: MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0xa MOV qword ptr [RBP + -0x8],RAX LAB_00181e1c: JMP 0x00181e1e LAB_00181e1e: MOV EAX,dword ptr [RBP + -0x2c] CMP EAX,dword ptr [RBP + -0x10] JGE 0x00181e5c MOV RDI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOVSX EDX,byte ptr [RAX] SUB EDX,0x30 MOV RCX,qword ptr [RBP + -0x20] MOV ESI,0xa CALL 0x00182b00 MOV qword ptr [RBP + -0x28],RAX MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x00181e1e LAB_00181e5c: MOV RAX,qword ptr [RBP + -0x28] ADD RSP,0x40 POP RBP RET
int8 * s2b(long param_1,int param_2,int param_3,int4 param_4,int8 param_5) { char *pcVar1; int local_40; int local_38; int local_34; int8 *local_30; char *local_10; local_38 = 0; for (local_40 = 1; local_40 < (param_3 + 8) / 9; local_40 = local_40 << 1) { local_38 = local_38 + 1; } local_30 = (int8 *)Balloc(local_38,param_5,(long)(param_3 + 8) % 9 & 0xffffffff); *(int4 *)*local_30 = param_4; *(int4 *)((long)local_30 + 0x14) = 1; local_34 = 9; if (param_2 < 10) { local_10 = (char *)(param_1 + 10); } else { pcVar1 = (char *)(param_1 + 9); do { local_10 = pcVar1; local_30 = (int8 *)multadd(local_30,10,*local_10 + -0x30,param_5); local_34 = local_34 + 1; pcVar1 = local_10 + 1; } while (local_34 < param_2); local_10 = local_10 + 2; } for (; local_34 < param_3; local_34 = local_34 + 1) { local_30 = (int8 *)multadd(local_30,10,*local_10 + -0x30,param_5); local_10 = local_10 + 1; } return local_30; }
13,287
ma_net_write_command
eloqsql/libmariadb/libmariadb/ma_net.c
int ma_net_write_command(NET *net, uchar command, const char *packet, size_t len, my_bool disable_flush) { uchar buff[NET_HEADER_SIZE+1]; size_t buff_size= NET_HEADER_SIZE + 1; size_t length= 1 + len; /* 1 extra byte for command */ int rc; buff[NET_HEADER_SIZE]= 0; buff[4]=command; if (length >= MAX_PACKET_LENGTH) { len= MAX_PACKET_LENGTH - 1; do { int3store(buff, MAX_PACKET_LENGTH); buff[3]= (net->compress) ? 0 : (uchar) (net->pkt_nr++); if (ma_net_write_buff(net, (char *)buff, buff_size) || ma_net_write_buff(net, packet, len)) return(1); packet+= len; length-= MAX_PACKET_LENGTH; len= MAX_PACKET_LENGTH; buff_size= NET_HEADER_SIZE; /* don't send command for further packets */ } while (length >= MAX_PACKET_LENGTH); len= length; } int3store(buff,length); buff[3]= (net->compress) ? 0 :(uchar) (net->pkt_nr++); rc= test (ma_net_write_buff(net,(char *)buff, buff_size) || ma_net_write_buff(net,packet,len)); if (!rc && !disable_flush) return test(ma_net_flush(net)); return rc; }
O3
c
ma_net_write_command: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %r8d, -0x3c(%rbp) movq %rdx, %r15 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq 0x1(%rcx), %rax movb %sil, -0x31(%rbp) movl $0x5, %edx cmpq $0xffffff, %rax # imm = 0xFFFFFF jb 0x350aa movl $0xfffffe, %r14d # imm = 0xFFFFFE movq %rax, %r12 movb $0x1, %r13b movw $0xffff, -0x35(%rbp) # imm = 0xFFFF movb $-0x1, -0x33(%rbp) cmpb $0x0, 0x84(%rbx) je 0x35051 xorl %eax, %eax jmp 0x3505a movl 0x60(%rbx), %eax leal 0x1(%rax), %ecx movl %ecx, 0x60(%rbx) movb %al, -0x32(%rbp) movq %rbx, %rdi leaq -0x35(%rbp), %rsi callq 0x34ed5 testl %eax, %eax jne 0x35111 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x34ed5 testl %eax, %eax jne 0x35111 addq %r14, %r15 addq $-0xffffff, %r12 # imm = 0xFF000001 movl $0x4, %edx movl $0xffffff, %r14d # imm = 0xFFFFFF movq %r12, %rax cmpq $0xfffffe, %r12 # imm = 0xFFFFFE ja 0x3503a jmp 0x350ad movq %rcx, %r12 movb %al, -0x35(%rbp) movb %ah, -0x34(%rbp) shrl $0x10, %eax movb %al, -0x33(%rbp) cmpb $0x0, 0x84(%rbx) je 0x350c6 xorl %eax, %eax jmp 0x350cf movl 0x60(%rbx), %eax leal 0x1(%rax), %ecx movl %ecx, 0x60(%rbx) leaq -0x35(%rbp), %rsi movb %al, 0x3(%rsi) movq %rbx, %rdi callq 0x34ed5 movb $0x1, %r13b testl %eax, %eax jne 0x35111 movq %rbx, %rdi movq %r15, %rsi movq %r12, %rdx callq 0x34ed5 testl %eax, %eax setne %r13b cmpb $0x0, -0x3c(%rbp) jne 0x35111 testl %eax, %eax jne 0x35111 movq %rbx, %rdi callq 0x34b92 testl %eax, %eax setne %r13b movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x35133 movzbl %r13b, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x13500
ma_net_write_command: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_3C], r8d mov r15, rdx mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax lea rax, [rcx+1] mov [rbp+var_31], sil mov edx, 5 cmp rax, 0FFFFFFh jb short loc_350AA mov r14d, 0FFFFFEh mov r12, rax mov r13b, 1 loc_3503A: mov [rbp+var_35], 0FFFFh mov [rbp+var_33], 0FFh cmp byte ptr [rbx+84h], 0 jz short loc_35051 xor eax, eax jmp short loc_3505A loc_35051: mov eax, [rbx+60h] lea ecx, [rax+1] mov [rbx+60h], ecx loc_3505A: mov [rbp+var_32], al mov rdi, rbx lea rsi, [rbp+var_35] call ma_net_write_buff test eax, eax jnz loc_35111 mov rdi, rbx mov rsi, r15 mov rdx, r14 call ma_net_write_buff test eax, eax jnz loc_35111 add r15, r14 add r12, 0FFFFFFFFFF000001h mov edx, 4 mov r14d, 0FFFFFFh mov rax, r12 cmp r12, 0FFFFFEh ja short loc_3503A jmp short loc_350AD loc_350AA: mov r12, rcx loc_350AD: mov byte ptr [rbp+var_35], al mov byte ptr [rbp+var_35+1], ah shr eax, 10h mov [rbp+var_33], al cmp byte ptr [rbx+84h], 0 jz short loc_350C6 xor eax, eax jmp short loc_350CF loc_350C6: mov eax, [rbx+60h] lea ecx, [rax+1] mov [rbx+60h], ecx loc_350CF: lea rsi, [rbp+var_35] mov [rsi+3], al mov rdi, rbx call ma_net_write_buff mov r13b, 1 test eax, eax jnz short loc_35111 mov rdi, rbx mov rsi, r15 mov rdx, r12 call ma_net_write_buff test eax, eax setnz r13b cmp byte ptr [rbp+var_3C], 0 jnz short loc_35111 test eax, eax jnz short loc_35111 mov rdi, rbx call ma_net_flush test eax, eax setnz r13b loc_35111: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_35133 movzx eax, r13b add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_35133: call ___stack_chk_fail
_BOOL8 ma_net_write_command(long long a1, char a2, long long a3, unsigned long long a4, char a5) { int v6; // eax unsigned long long v7; // rdx unsigned long long v8; // r14 unsigned long long v9; // r12 bool v10; // r13 int v11; // eax int v12; // eax BOOL v13; // eax __int16 v16; // [rsp+Bh] [rbp-35h] BYREF char v17; // [rsp+Dh] [rbp-33h] char v18; // [rsp+Eh] [rbp-32h] char v19; // [rsp+Fh] [rbp-31h] unsigned long long v20; // [rsp+10h] [rbp-30h] v20 = __readfsqword(0x28u); v6 = a4 + 1; v19 = a2; v7 = 5LL; if ( a4 + 1 < 0xFFFFFF ) { v9 = a4; LABEL_11: v16 = v6; v17 = BYTE2(v6); if ( *(_BYTE *)(a1 + 132) ) { LOBYTE(v12) = 0; } else { v12 = *(_DWORD *)(a1 + 96); *(_DWORD *)(a1 + 96) = v12 + 1; } v18 = v12; v10 = 1; if ( !ma_net_write_buff(a1, (long long)&v16, v7) ) { v13 = ma_net_write_buff(a1, a3, v9); v10 = v13; if ( !a5 && !v13 ) return (unsigned int)ma_net_flush(a1) != 0; } } else { v8 = 16777214LL; v9 = a4 + 1; v10 = 1; while ( 1 ) { v16 = -1; v17 = -1; if ( *(_BYTE *)(a1 + 132) ) { LOBYTE(v11) = 0; } else { v11 = *(_DWORD *)(a1 + 96); *(_DWORD *)(a1 + 96) = v11 + 1; } v18 = v11; if ( ma_net_write_buff(a1, (long long)&v16, v7) || ma_net_write_buff(a1, a3, v8) ) break; a3 += v8; v9 -= 0xFFFFFFLL; v7 = 4LL; v8 = 0xFFFFFFLL; v6 = v9; if ( v9 <= 0xFFFFFE ) goto LABEL_11; } } return v10; }
ma_net_write_command: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV dword ptr [RBP + -0x3c],R8D MOV R15,RDX MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA RAX,[RCX + 0x1] MOV byte ptr [RBP + -0x31],SIL MOV EDX,0x5 CMP RAX,0xffffff JC 0x001350aa MOV R14D,0xfffffe MOV R12,RAX MOV R13B,0x1 LAB_0013503a: MOV word ptr [RBP + -0x35],0xffff MOV byte ptr [RBP + -0x33],0xff CMP byte ptr [RBX + 0x84],0x0 JZ 0x00135051 XOR EAX,EAX JMP 0x0013505a LAB_00135051: MOV EAX,dword ptr [RBX + 0x60] LEA ECX,[RAX + 0x1] MOV dword ptr [RBX + 0x60],ECX LAB_0013505a: MOV byte ptr [RBP + -0x32],AL MOV RDI,RBX LEA RSI,[RBP + -0x35] CALL 0x00134ed5 TEST EAX,EAX JNZ 0x00135111 MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x00134ed5 TEST EAX,EAX JNZ 0x00135111 ADD R15,R14 ADD R12,-0xffffff MOV EDX,0x4 MOV R14D,0xffffff MOV RAX,R12 CMP R12,0xfffffe JA 0x0013503a JMP 0x001350ad LAB_001350aa: MOV R12,RCX LAB_001350ad: MOV byte ptr [RBP + -0x35],AL MOV byte ptr [RBP + -0x34],AH SHR EAX,0x10 MOV byte ptr [RBP + -0x33],AL CMP byte ptr [RBX + 0x84],0x0 JZ 0x001350c6 XOR EAX,EAX JMP 0x001350cf LAB_001350c6: MOV EAX,dword ptr [RBX + 0x60] LEA ECX,[RAX + 0x1] MOV dword ptr [RBX + 0x60],ECX LAB_001350cf: LEA RSI,[RBP + -0x35] MOV byte ptr [RSI + 0x3],AL MOV RDI,RBX CALL 0x00134ed5 MOV R13B,0x1 TEST EAX,EAX JNZ 0x00135111 MOV RDI,RBX MOV RSI,R15 MOV RDX,R12 CALL 0x00134ed5 TEST EAX,EAX SETNZ R13B CMP byte ptr [RBP + -0x3c],0x0 JNZ 0x00135111 TEST EAX,EAX JNZ 0x00135111 MOV RDI,RBX CALL 0x00134b92 TEST EAX,EAX SETNZ R13B LAB_00135111: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00135133 MOVZX EAX,R13B ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00135133: CALL 0x00113500
bool ma_net_write_command(long param_1,int1 param_2,long param_3,ulong param_4,char param_5) { int iVar1; int8 uVar2; ulong uVar3; long lVar4; long in_FS_OFFSET; bool bVar5; int2 local_3d; int1 local_3b; int1 local_3a; int1 local_39; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar3 = param_4 + 1; uVar2 = 5; local_39 = param_2; if (0xfffffe < uVar3) { lVar4 = 0xfffffe; bVar5 = true; do { local_3d = 0xffff; local_3b = 0xff; if (*(char *)(param_1 + 0x84) == '\0') { iVar1 = *(int *)(param_1 + 0x60); *(int *)(param_1 + 0x60) = iVar1 + 1; } else { iVar1 = 0; } local_3a = (int1)iVar1; iVar1 = ma_net_write_buff(param_1,&local_3d,uVar2); if ((iVar1 != 0) || (iVar1 = ma_net_write_buff(param_1,param_3,lVar4), iVar1 != 0)) goto LAB_00135111; param_3 = param_3 + lVar4; uVar3 = uVar3 - 0xffffff; uVar2 = 4; lVar4 = 0xffffff; param_4 = uVar3; } while (0xfffffe < uVar3); } local_3d = (int2)uVar3; local_3b = (int1)(uVar3 >> 0x10); if (*(char *)(param_1 + 0x84) == '\0') { iVar1 = *(int *)(param_1 + 0x60); *(int *)(param_1 + 0x60) = iVar1 + 1; } else { iVar1 = 0; } local_3a = (int1)iVar1; iVar1 = ma_net_write_buff(param_1,&local_3d,uVar2); bVar5 = true; if (iVar1 == 0) { iVar1 = ma_net_write_buff(param_1,param_3,param_4); bVar5 = iVar1 != 0; if ((param_5 == '\0') && (iVar1 == 0)) { iVar1 = ma_net_flush(param_1); bVar5 = iVar1 != 0; } } LAB_00135111: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return bVar5; }
13,288
nlohmann::json_abi_v3_11_3::detail::lexer<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>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_number()
llama.cpp/common/json.hpp
token_type scan_number() // lgtm [cpp/use-of-goto] { // reset token_buffer to store the number's bytes reset(); // the type of the parsed number; initially set to unsigned; will be // changed if minus sign, decimal point or exponent is read token_type number_type = token_type::value_unsigned; // state (init): we just found out we need to scan a number switch (current) { case '-': { add(current); goto scan_number_minus; } case '0': { add(current); goto scan_number_zero; } case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any1; } // all other characters are rejected outside scan_number() default: // LCOV_EXCL_LINE JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE } scan_number_minus: // state: we just parsed a leading minus sign number_type = token_type::value_integer; switch (get()) { case '0': { add(current); goto scan_number_zero; } case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any1; } default: { error_message = "invalid number; expected digit after '-'"; return token_type::parse_error; } } scan_number_zero: // state: we just parse a zero (maybe with a leading minus sign) switch (get()) { case '.': { add(decimal_point_char); goto scan_number_decimal1; } case 'e': case 'E': { add(current); goto scan_number_exponent; } default: goto scan_number_done; } scan_number_any1: // state: we just parsed a number 0-9 (maybe with a leading minus sign) switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any1; } case '.': { add(decimal_point_char); goto scan_number_decimal1; } case 'e': case 'E': { add(current); goto scan_number_exponent; } default: goto scan_number_done; } scan_number_decimal1: // state: we just parsed a decimal point number_type = token_type::value_float; switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_decimal2; } default: { error_message = "invalid number; expected digit after '.'"; return token_type::parse_error; } } scan_number_decimal2: // we just parsed at least one number after a decimal point switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_decimal2; } case 'e': case 'E': { add(current); goto scan_number_exponent; } default: goto scan_number_done; } scan_number_exponent: // we just parsed an exponent number_type = token_type::value_float; switch (get()) { case '+': case '-': { add(current); goto scan_number_sign; } case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any2; } default: { error_message = "invalid number; expected '+', '-', or digit after exponent"; return token_type::parse_error; } } scan_number_sign: // we just parsed an exponent sign switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any2; } default: { error_message = "invalid number; expected digit after exponent sign"; return token_type::parse_error; } } scan_number_any2: // we just parsed a number after the exponent or exponent sign switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any2; } default: goto scan_number_done; } scan_number_done: // unget the character after the number (we only read it to know that // we are done scanning a number) unget(); char* endptr = nullptr; // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) errno = 0; // try to parse integers first and fall back to floats if (number_type == token_type::value_unsigned) { const auto x = std::strtoull(token_buffer.data(), &endptr, 10); // we checked the number format before JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); if (errno == 0) { value_unsigned = static_cast<number_unsigned_t>(x); if (value_unsigned == x) { return token_type::value_unsigned; } } } else if (number_type == token_type::value_integer) { const auto x = std::strtoll(token_buffer.data(), &endptr, 10); // we checked the number format before JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); if (errno == 0) { value_integer = static_cast<number_integer_t>(x); if (value_integer == x) { return token_type::value_integer; } } } // this code is reached if we parse a floating-point number or if an // integer conversion above failed strtof(value_float, token_buffer.data(), &endptr); // we checked the number format before JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); return token_type::value_float; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<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>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_number(): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx callq 0x74090 movl 0x14(%rbx), %eax leal -0x31(%rax), %ecx cmpl $0x9, %ecx jae 0x73e0a leaq 0x50(%rbx), %r14 movl $0x5, %ebp movsbl %al, %esi movq %r14, %rdi callq 0x213a0 leaq 0x50(%rbx), %r14 movq %rbx, %rdi callq 0x2154c leal -0x30(%rax), %ecx cmpl $0xa, %ecx jae 0x73d1a movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0x213a0 jmp 0x73cfc cmpl $0x2e, %eax je 0x73e7c cmpl $0x45, %eax je 0x73ed8 cmpl $0x65, %eax je 0x73ed8 movq %rbx, %rdi callq 0x7402c movq $0x0, (%rsp) callq 0x21100 movq %rax, %r14 movl $0x0, (%rax) movq 0x50(%rbx), %rdi movq %rsp, %r15 movq %r15, %rsi movl $0xa, %edx cmpl $0x5, %ebp jne 0x73d8f callq 0x20de0 movq 0x50(%rbx), %rcx addq 0x58(%rbx), %rcx cmpq %rcx, (%r15) jne 0x73fd2 cmpl $0x0, (%r14) jne 0x73dab movl $0x5, %ecx movl $0x80, %edx jmp 0x73e01 callq 0x20d40 movq 0x50(%rbx), %rcx addq 0x58(%rbx), %rcx cmpq %rcx, (%r15) jne 0x73fee cmpl $0x0, (%r14) je 0x73df7 movq 0x50(%rbx), %rdi movq %rsp, %r14 movq %r14, %rsi callq 0x21470 movsd %xmm0, 0x88(%rbx) movq 0x50(%rbx), %rax addq 0x58(%rbx), %rax movl $0x7, %ecx cmpq %rax, (%r14) je 0x73f12 leaq 0xa4943(%rip), %rdi # 0x118722 leaq 0xa4977(%rip), %rdx # 0x11875d leaq 0xa578e(%rip), %rcx # 0x11957b movl $0x21d6, %esi # imm = 0x21D6 jmp 0x74024 movl $0x6, %ecx movl $0x78, %edx movq %rax, (%rbx,%rdx) jmp 0x73f12 cmpl $0x30, %eax je 0x73e4a cmpl $0x2d, %eax jne 0x7400a leaq 0x50(%rbx), %r14 movq %r14, %rdi movl $0x2d, %esi callq 0x213a0 movq %rbx, %rdi callq 0x2154c leal -0x31(%rax), %ecx cmpl $0x9, %ecx jae 0x73fab movl 0x14(%rbx), %eax movl $0x6, %ebp jmp 0x73ced leaq 0x50(%rbx), %rdi movl $0x30, %esi callq 0x213a0 movl $0x5, %ebp movq %rbx, %rdi callq 0x2154c cmpl $0x65, %eax je 0x73ed4 cmpl $0x45, %eax je 0x73ed4 cmpl $0x2e, %eax jne 0x73d35 leaq 0x50(%rbx), %r14 movsbl 0x90(%rbx), %esi movq %r14, %rdi callq 0x213a0 movq %rbx, %rdi callq 0x2154c addl $-0x30, %eax cmpl $0x9, %eax ja 0x73ecb leaq 0x50(%rbx), %r14 movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0x213a0 movq %rbx, %rdi callq 0x2154c leal -0x30(%rax), %ecx cmpl $0xa, %ecx jb 0x73e9f cmpl $0x65, %eax je 0x73ed8 cmpl $0x45, %eax jne 0x73f5f jmp 0x73ed8 leaq 0xa5612(%rip), %rax # 0x1194e4 jmp 0x73f09 leaq 0x50(%rbx), %r14 movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0x213a0 movq %rbx, %rdi callq 0x2154c leal -0x30(%rax), %ecx cmpl $0xa, %ecx jb 0x73f1f cmpl $0x2d, %eax je 0x73f7f cmpl $0x2b, %eax je 0x73f7f leaq 0xa5604(%rip), %rax # 0x11950d movq %rax, 0x70(%rbx) movl $0xe, %ecx movl %ecx, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x50(%rbx), %r14 movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0x213a0 movq %rbx, %rdi callq 0x2154c addl $-0x30, %eax cmpl $0x9, %eax ja 0x73f5f leaq 0x50(%rbx), %r14 movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0x213a0 movq %rbx, %rdi callq 0x2154c addl $-0x30, %eax cmpl $0xa, %eax jb 0x73f43 movq %rbx, %rdi callq 0x7402c movq $0x0, (%rsp) callq 0x21100 movl $0x0, (%rax) jmp 0x73dab movsbl 0x14(%rbx), %esi leaq 0x50(%rbx), %r14 movq %r14, %rdi callq 0x213a0 movq %rbx, %rdi callq 0x2154c addl $-0x30, %eax cmpl $0xa, %eax jb 0x73f23 leaq 0xa55a2(%rip), %rax # 0x119548 jmp 0x73f09 cmpl $0x30, %eax je 0x73fbc leaq 0xa5504(%rip), %rax # 0x1194bb jmp 0x73f09 movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0x213a0 movl $0x6, %ebp jmp 0x73e5d leaq 0xa4749(%rip), %rdi # 0x118722 leaq 0xa477d(%rip), %rdx # 0x11875d leaq 0xa5594(%rip), %rcx # 0x11957b movl $0x21b5, %esi # imm = 0x21B5 jmp 0x74024 leaq 0xa472d(%rip), %rdi # 0x118722 leaq 0xa4761(%rip), %rdx # 0x11875d leaq 0xa5578(%rip), %rcx # 0x11957b movl $0x21c5, %esi # imm = 0x21C5 jmp 0x74024 leaq 0xa4711(%rip), %rdi # 0x118722 leaq 0xa4745(%rip), %rdx # 0x11875d leaq 0xa1061(%rip), %rcx # 0x115080 movl $0x20be, %esi # imm = 0x20BE xorl %eax, %eax callq 0x20e70 nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE11scan_numberEv: push rbp push r15 push r14 push rbx push rax mov rbx, rdi call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE5resetEv; nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::reset(void) mov eax, [rbx+14h] lea ecx, [rax-31h] cmp ecx, 9 jnb loc_73E0A lea r14, [rbx+50h] mov ebp, 5 loc_73CED: movsx esi, al mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) lea r14, [rbx+50h] loc_73CFC: mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(void) lea ecx, [rax-30h] cmp ecx, 0Ah jnb short loc_73D1A movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) jmp short loc_73CFC loc_73D1A: cmp eax, 2Eh ; '.' jz loc_73E7C cmp eax, 45h ; 'E' jz loc_73ED8 cmp eax, 65h ; 'e' jz loc_73ED8 loc_73D35: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::unget(void) mov [rsp+28h+var_28], 0 call ___errno_location mov r14, rax mov dword ptr [rax], 0 mov rdi, [rbx+50h] mov r15, rsp mov rsi, r15 mov edx, 0Ah cmp ebp, 5 jnz short loc_73D8F call _strtoull mov rcx, [rbx+50h] add rcx, [rbx+58h] cmp [r15], rcx jnz loc_73FD2 cmp dword ptr [r14], 0 jnz short loc_73DAB mov ecx, 5 mov edx, 80h jmp short loc_73E01 loc_73D8F: call _strtoll mov rcx, [rbx+50h] add rcx, [rbx+58h] cmp [r15], rcx jnz loc_73FEE cmp dword ptr [r14], 0 jz short loc_73DF7 loc_73DAB: mov rdi, [rbx+50h] mov r14, rsp mov rsi, r14 call _strtod movsd qword ptr [rbx+88h], xmm0 mov rax, [rbx+50h] add rax, [rbx+58h] mov ecx, 7 cmp [r14], rax jz loc_73F12 lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aEndptrTokenBuf; "endptr == token_buffer.data() + token_b"... mov esi, 21D6h jmp loc_74024 loc_73DF7: mov ecx, 6 mov edx, 78h ; 'x' loc_73E01: mov [rbx+rdx], rax jmp loc_73F12 loc_73E0A: cmp eax, 30h ; '0' jz short loc_73E4A cmp eax, 2Dh ; '-' jnz loc_7400A lea r14, [rbx+50h] mov rdi, r14 mov esi, 2Dh ; '-' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(void) lea ecx, [rax-31h] cmp ecx, 9 jnb loc_73FAB mov eax, [rbx+14h] mov ebp, 6 jmp loc_73CED loc_73E4A: lea rdi, [rbx+50h] mov esi, 30h ; '0' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov ebp, 5 loc_73E5D: mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(void) cmp eax, 65h ; 'e' jz short loc_73ED4 cmp eax, 45h ; 'E' jz short loc_73ED4 cmp eax, 2Eh ; '.' jnz loc_73D35 lea r14, [rbx+50h] loc_73E7C: movsx esi, byte ptr [rbx+90h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(void) add eax, 0FFFFFFD0h cmp eax, 9 ja short loc_73ECB lea r14, [rbx+50h] loc_73E9F: movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(void) lea ecx, [rax-30h] cmp ecx, 0Ah jb short loc_73E9F cmp eax, 65h ; 'e' jz short loc_73ED8 cmp eax, 45h ; 'E' jnz loc_73F5F jmp short loc_73ED8 loc_73ECB: lea rax, aInvalidNumberE; "invalid number; expected digit after '."... jmp short loc_73F09 loc_73ED4: lea r14, [rbx+50h] loc_73ED8: movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(void) lea ecx, [rax-30h] cmp ecx, 0Ah jb short loc_73F1F cmp eax, 2Dh ; '-' jz loc_73F7F cmp eax, 2Bh ; '+' jz short loc_73F7F lea rax, aInvalidNumberE_0; "invalid number; expected '+', '-', or d"... loc_73F09: mov [rbx+70h], rax mov ecx, 0Eh loc_73F12: mov eax, ecx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_73F1F: lea r14, [rbx+50h] loc_73F23: movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(void) add eax, 0FFFFFFD0h cmp eax, 9 ja short loc_73F5F lea r14, [rbx+50h] loc_73F43: movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(void) add eax, 0FFFFFFD0h cmp eax, 0Ah jb short loc_73F43 loc_73F5F: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::unget(void) mov [rsp+28h+var_28], 0 call ___errno_location mov dword ptr [rax], 0 jmp loc_73DAB loc_73F7F: movsx esi, byte ptr [rbx+14h] lea r14, [rbx+50h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(void) add eax, 0FFFFFFD0h cmp eax, 0Ah jb short loc_73F23 lea rax, aInvalidNumberE_1; "invalid number; expected digit after ex"... jmp loc_73F09 loc_73FAB: cmp eax, 30h ; '0' jz short loc_73FBC lea rax, aInvalidNumberE_2; "invalid number; expected digit after '-"... jmp loc_73F09 loc_73FBC: movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov ebp, 6 jmp loc_73E5D loc_73FD2: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aEndptrTokenBuf; "endptr == token_buffer.data() + token_b"... mov esi, 21B5h jmp short loc_74024 loc_73FEE: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aEndptrTokenBuf; "endptr == token_buffer.data() + token_b"... mov esi, 21C5h jmp short loc_74024 loc_7400A: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAdvancedOption+0ABh; "false" mov esi, 20BEh loc_74024: xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_number( __m128i *this) { long long v1; // rax __int32 v3; // eax __m128i *v4; // r14 int v5; // ebp __m128i *v6; // r14 int v7; // eax _DWORD *v8; // r14 long long v9; // rdi long long v10; // rax unsigned int v11; // ecx long long v12; // rdx int v13; // eax int v14; // eax int v15; // eax const char *v16; // rax int v17; // eax __m128i *v19; // r14 _QWORD v20[5]; // [rsp+0h] [rbp-28h] BYREF v20[0] = v1; nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::reset(this); v3 = this[1].m128i_i32[1]; if ( (unsigned int)(v3 - 49) >= 9 ) { if ( v3 == 48 ) { std::string::push_back(&this[5], 48LL); v5 = 5; } else { if ( v3 != 45 ) { ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 8382LL, "GGML_ASSERT(%s) failed", "false"); return nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::unget("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp"); } v4 = this + 5; std::string::push_back(&this[5], 45LL); v13 = nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(this); if ( (unsigned int)(v13 - 49) < 9 ) { v3 = this[1].m128i_i32[1]; v5 = 6; goto LABEL_3; } if ( v13 != 48 ) { v16 = "invalid number; expected digit after '-'"; goto LABEL_40; } std::string::push_back(&this[5], (unsigned int)this[1].m128i_i8[4]); v5 = 6; } v14 = nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(this); if ( v14 == 101 || v14 == 69 ) { v6 = this + 5; goto LABEL_36; } if ( v14 != 46 ) goto LABEL_9; v6 = this + 5; LABEL_28: std::string::push_back(v6, (unsigned int)this[9].m128i_i8[0]); if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(this) - 48 > 9 ) { v16 = "invalid number; expected digit after '.'"; LABEL_40: this[7].m128i_i64[0] = (long long)v16; return 14; } v6 = this + 5; do { std::string::push_back(&this[5], (unsigned int)this[1].m128i_i8[4]); v15 = nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(this); } while ( (unsigned int)(v15 - 48) < 0xA ); if ( v15 != 101 && v15 != 69 ) { LABEL_45: nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::unget(this); v20[0] = 0LL; *(_DWORD *)__errno_location(this) = 0; goto LABEL_15; } LABEL_36: std::string::push_back(v6, (unsigned int)this[1].m128i_i8[4]); v17 = nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(this); if ( (unsigned int)(v17 - 48) < 0xA ) { v19 = this + 5; } else { if ( v17 != 45 && v17 != 43 ) { v16 = "invalid number; expected '+', '-', or digit after exponent"; goto LABEL_40; } v19 = this + 5; std::string::push_back(&this[5], (unsigned int)this[1].m128i_i8[4]); if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(this) - 48 >= 0xA ) { v16 = "invalid number; expected digit after exponent sign"; goto LABEL_40; } } std::string::push_back(v19, (unsigned int)this[1].m128i_i8[4]); if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(this) - 48 <= 9 ) { do std::string::push_back(&this[5], (unsigned int)this[1].m128i_i8[4]); while ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(this) - 48 < 0xA ); } goto LABEL_45; } v4 = this + 5; v5 = 5; LABEL_3: std::string::push_back(v4, (unsigned int)(char)v3); v6 = this + 5; while ( 1 ) { v7 = nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(this); if ( (unsigned int)(v7 - 48) >= 0xA ) break; std::string::push_back(&this[5], (unsigned int)this[1].m128i_i8[4]); } if ( v7 == 46 ) goto LABEL_28; if ( v7 == 69 || v7 == 101 ) goto LABEL_36; LABEL_9: nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::unget(this); v20[0] = 0LL; v8 = (_DWORD *)__errno_location(this); *v8 = 0; v9 = this[5].m128i_i64[0]; if ( v5 == 5 ) { v10 = strtoull(v9, v20, 10LL); if ( v20[0] != this[5].m128i_i64[1] + this[5].m128i_i64[0] ) { ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 8629LL, "GGML_ASSERT(%s) failed", "endptr == token_buffer.data() + token_buffer.size()"); return nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::unget("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp"); } if ( !*v8 ) { v11 = 5; v12 = 16LL; LABEL_18: this->m128i_i64[v12] = v10; return v11; } } else { v10 = strtoll(v9, v20, 10LL); if ( v20[0] != this[5].m128i_i64[1] + this[5].m128i_i64[0] ) { ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 8645LL, "GGML_ASSERT(%s) failed", "endptr == token_buffer.data() + token_buffer.size()"); return nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::unget("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp"); } if ( !*v8 ) { v11 = 6; v12 = 15LL; goto LABEL_18; } } LABEL_15: *(double *)&this[8].m128i_i64[1] = strtod(this[5].m128i_i64[0], v20); v11 = 7; if ( v20[0] == this[5].m128i_i64[1] + this[5].m128i_i64[0] ) return v11; ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 8662LL, "GGML_ASSERT(%s) failed", "endptr == token_buffer.data() + token_buffer.size()"); return nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::unget("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp"); }
scan_number: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x00174090 MOV EAX,dword ptr [RBX + 0x14] LEA ECX,[RAX + -0x31] CMP ECX,0x9 JNC 0x00173e0a LEA R14,[RBX + 0x50] MOV EBP,0x5 LAB_00173ced: MOVSX ESI,AL MOV RDI,R14 CALL 0x001213a0 LEA R14,[RBX + 0x50] LAB_00173cfc: MOV RDI,RBX CALL 0x0012154c LEA ECX,[RAX + -0x30] CMP ECX,0xa JNC 0x00173d1a MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x001213a0 JMP 0x00173cfc LAB_00173d1a: CMP EAX,0x2e JZ 0x00173e7c CMP EAX,0x45 JZ 0x00173ed8 CMP EAX,0x65 JZ 0x00173ed8 LAB_00173d35: MOV RDI,RBX CALL 0x0017402c MOV qword ptr [RSP],0x0 CALL 0x00121100 MOV R14,RAX MOV dword ptr [RAX],0x0 MOV RDI,qword ptr [RBX + 0x50] MOV R15,RSP MOV RSI,R15 MOV EDX,0xa CMP EBP,0x5 JNZ 0x00173d8f CALL 0x00120de0 MOV RCX,qword ptr [RBX + 0x50] ADD RCX,qword ptr [RBX + 0x58] CMP qword ptr [R15],RCX JNZ 0x00173fd2 CMP dword ptr [R14],0x0 JNZ 0x00173dab MOV ECX,0x5 MOV EDX,0x80 JMP 0x00173e01 LAB_00173d8f: CALL 0x00120d40 MOV RCX,qword ptr [RBX + 0x50] ADD RCX,qword ptr [RBX + 0x58] CMP qword ptr [R15],RCX JNZ 0x00173fee CMP dword ptr [R14],0x0 JZ 0x00173df7 LAB_00173dab: MOV RDI,qword ptr [RBX + 0x50] MOV R14,RSP MOV RSI,R14 CALL 0x00121470 MOVSD qword ptr [RBX + 0x88],XMM0 MOV RAX,qword ptr [RBX + 0x50] ADD RAX,qword ptr [RBX + 0x58] MOV ECX,0x7 CMP qword ptr [R14],RAX JZ 0x00173f12 LEA RDI,[0x218722] LEA RDX,[0x21875d] LEA RCX,[0x21957b] MOV ESI,0x21d6 JMP 0x00174024 LAB_00173df7: MOV ECX,0x6 MOV EDX,0x78 LAB_00173e01: MOV qword ptr [RBX + RDX*0x1],RAX JMP 0x00173f12 LAB_00173e0a: CMP EAX,0x30 JZ 0x00173e4a CMP EAX,0x2d JNZ 0x0017400a LEA R14,[RBX + 0x50] MOV RDI,R14 MOV ESI,0x2d CALL 0x001213a0 MOV RDI,RBX CALL 0x0012154c LEA ECX,[RAX + -0x31] CMP ECX,0x9 JNC 0x00173fab MOV EAX,dword ptr [RBX + 0x14] MOV EBP,0x6 JMP 0x00173ced LAB_00173e4a: LEA RDI,[RBX + 0x50] MOV ESI,0x30 CALL 0x001213a0 MOV EBP,0x5 LAB_00173e5d: MOV RDI,RBX CALL 0x0012154c CMP EAX,0x65 JZ 0x00173ed4 CMP EAX,0x45 JZ 0x00173ed4 CMP EAX,0x2e JNZ 0x00173d35 LEA R14,[RBX + 0x50] LAB_00173e7c: MOVSX ESI,byte ptr [RBX + 0x90] MOV RDI,R14 CALL 0x001213a0 MOV RDI,RBX CALL 0x0012154c ADD EAX,-0x30 CMP EAX,0x9 JA 0x00173ecb LEA R14,[RBX + 0x50] LAB_00173e9f: MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x001213a0 MOV RDI,RBX CALL 0x0012154c LEA ECX,[RAX + -0x30] CMP ECX,0xa JC 0x00173e9f CMP EAX,0x65 JZ 0x00173ed8 CMP EAX,0x45 JNZ 0x00173f5f JMP 0x00173ed8 LAB_00173ecb: LEA RAX,[0x2194e4] JMP 0x00173f09 LAB_00173ed4: LEA R14,[RBX + 0x50] LAB_00173ed8: MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x001213a0 MOV RDI,RBX CALL 0x0012154c LEA ECX,[RAX + -0x30] CMP ECX,0xa JC 0x00173f1f CMP EAX,0x2d JZ 0x00173f7f CMP EAX,0x2b JZ 0x00173f7f LEA RAX,[0x21950d] LAB_00173f09: MOV qword ptr [RBX + 0x70],RAX MOV ECX,0xe LAB_00173f12: MOV EAX,ECX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_00173f1f: LEA R14,[RBX + 0x50] LAB_00173f23: MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x001213a0 MOV RDI,RBX CALL 0x0012154c ADD EAX,-0x30 CMP EAX,0x9 JA 0x00173f5f LEA R14,[RBX + 0x50] LAB_00173f43: MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x001213a0 MOV RDI,RBX CALL 0x0012154c ADD EAX,-0x30 CMP EAX,0xa JC 0x00173f43 LAB_00173f5f: MOV RDI,RBX CALL 0x0017402c MOV qword ptr [RSP],0x0 CALL 0x00121100 MOV dword ptr [RAX],0x0 JMP 0x00173dab LAB_00173f7f: MOVSX ESI,byte ptr [RBX + 0x14] LEA R14,[RBX + 0x50] MOV RDI,R14 CALL 0x001213a0 MOV RDI,RBX CALL 0x0012154c ADD EAX,-0x30 CMP EAX,0xa JC 0x00173f23 LEA RAX,[0x219548] JMP 0x00173f09 LAB_00173fab: CMP EAX,0x30 JZ 0x00173fbc LEA RAX,[0x2194bb] JMP 0x00173f09 LAB_00173fbc: MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x001213a0 MOV EBP,0x6 JMP 0x00173e5d LAB_00173fd2: LEA RDI,[0x218722] LEA RDX,[0x21875d] LEA RCX,[0x21957b] MOV ESI,0x21b5 JMP 0x00174024 LAB_00173fee: LEA RDI,[0x218722] LEA RDX,[0x21875d] LEA RCX,[0x21957b] MOV ESI,0x21c5 JMP 0x00174024 LAB_0017400a: LEA RDI,[0x218722] LEA RDX,[0x21875d] LEA RCX,[0x215080] MOV ESI,0x20be LAB_00174024: XOR EAX,EAX CALL 0x00120e70
/* nlohmann::json_abi_v3_11_3::detail::lexer<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>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_number() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> ::scan_number(lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> *this) { char cVar1; int iVar2; int iVar3; char *in_RAX; int *piVar4; ulonglong uVar5; int8 uVar6; char *pcVar7; long lVar8; double dVar9; char *local_28; local_28 = in_RAX; reset(this); iVar3 = *(int *)(this + 0x14); cVar1 = (char)this; if (iVar3 - 0x31U < 9) { iVar3 = 5; LAB_00173ced: std::__cxx11::string::push_back(cVar1 + 'P'); while (iVar2 = get(this), iVar2 - 0x30U < 10) { std::__cxx11::string::push_back(cVar1 + 'P'); } if (iVar2 == 0x2e) { LAB_00173e7c: std::__cxx11::string::push_back(cVar1 + 'P'); iVar3 = get(this); if (9 < iVar3 - 0x30U) { pcVar7 = "invalid number; expected digit after \'.\'"; goto LAB_00173f09; } do { std::__cxx11::string::push_back(cVar1 + 'P'); iVar3 = get(this); } while (iVar3 - 0x30U < 10); if ((iVar3 == 0x65) || (iVar3 == 0x45)) goto LAB_00173ed8; goto LAB_00173f5f; } if ((iVar2 == 0x45) || (iVar2 == 0x65)) goto LAB_00173ed8; LAB_00173d35: unget(this); local_28 = (char *)0x0; piVar4 = __errno_location(); *piVar4 = 0; if (iVar3 == 5) { uVar5 = strtoull(*(char **)(this + 0x50),&local_28,10); if (local_28 != (char *)(*(long *)(this + 0x50) + *(long *)(this + 0x58))) { pcVar7 = "endptr == token_buffer.data() + token_buffer.size()"; uVar6 = 0x21b5; goto LAB_00174024; } if (*piVar4 == 0) { uVar6 = 5; lVar8 = 0x80; LAB_00173e01: *(ulonglong *)(this + lVar8) = uVar5; return uVar6; } } else { uVar5 = strtoll(*(char **)(this + 0x50),&local_28,10); if (local_28 != (char *)(*(long *)(this + 0x50) + *(long *)(this + 0x58))) { pcVar7 = "endptr == token_buffer.data() + token_buffer.size()"; uVar6 = 0x21c5; goto LAB_00174024; } if (*piVar4 == 0) { uVar6 = 6; lVar8 = 0x78; goto LAB_00173e01; } } } else { if (iVar3 == 0x30) { std::__cxx11::string::push_back(cVar1 + 'P'); iVar3 = 5; } else { if (iVar3 != 0x2d) { pcVar7 = "false"; uVar6 = 0x20be; goto LAB_00174024; } std::__cxx11::string::push_back(cVar1 + 'P'); iVar3 = get(this); if (iVar3 - 0x31U < 9) { iVar3 = 6; goto LAB_00173ced; } if (iVar3 != 0x30) { pcVar7 = "invalid number; expected digit after \'-\'"; goto LAB_00173f09; } std::__cxx11::string::push_back(cVar1 + 'P'); iVar3 = 6; } iVar2 = get(this); if ((iVar2 != 0x65) && (iVar2 != 0x45)) { if (iVar2 != 0x2e) goto LAB_00173d35; goto LAB_00173e7c; } LAB_00173ed8: std::__cxx11::string::push_back(cVar1 + 'P'); iVar3 = get(this); if (9 < iVar3 - 0x30U) { if ((iVar3 != 0x2d) && (iVar3 != 0x2b)) { pcVar7 = "invalid number; expected \'+\', \'-\', or digit after exponent"; LAB_00173f09: *(char **)(this + 0x70) = pcVar7; return 0xe; } std::__cxx11::string::push_back(cVar1 + 'P'); iVar3 = get(this); if (9 < iVar3 - 0x30U) { pcVar7 = "invalid number; expected digit after exponent sign"; goto LAB_00173f09; } } std::__cxx11::string::push_back(cVar1 + 'P'); iVar3 = get(this); if (iVar3 - 0x30U < 10) { do { std::__cxx11::string::push_back(cVar1 + 'P'); iVar3 = get(this); } while (iVar3 - 0x30U < 10); } LAB_00173f5f: unget(this); local_28 = (char *)0x0; piVar4 = __errno_location(); *piVar4 = 0; } dVar9 = strtod(*(char **)(this + 0x50),&local_28); *(double *)(this + 0x88) = dVar9; if (local_28 == (char *)(*(long *)(this + 0x50) + *(long *)(this + 0x58))) { return 7; } pcVar7 = "endptr == token_buffer.data() + token_buffer.size()"; uVar6 = 0x21d6; LAB_00174024: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar6, "GGML_ASSERT(%s) failed",pcVar7); }
13,289
google::protobuf::FieldDescriptor::InternalTypeOnceInit() const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
void FieldDescriptor::InternalTypeOnceInit() const { GOOGLE_CHECK(file()->finished_building_ == true); const EnumDescriptor* enum_type = nullptr; const char* lazy_type_name = reinterpret_cast<const char*>(type_once_ + 1); const char* lazy_default_value_enum_name = lazy_type_name + strlen(lazy_type_name) + 1; Symbol result = file()->pool()->CrossLinkOnDemandHelper( lazy_type_name, type_ == FieldDescriptor::TYPE_ENUM); if (result.type() == Symbol::MESSAGE) { type_ = FieldDescriptor::TYPE_MESSAGE; type_descriptor_.message_type = result.descriptor(); } else if (result.type() == Symbol::ENUM) { type_ = FieldDescriptor::TYPE_ENUM; enum_type = type_descriptor_.enum_type = result.enum_descriptor(); } if (enum_type) { if (lazy_default_value_enum_name[0] != '\0') { // Have to build the full name now instead of at CrossLink time, // because enum_type may not be known at the time. std::string name = enum_type->full_name(); // Enum values reside in the same scope as the enum type. std::string::size_type last_dot = name.find_last_of('.'); if (last_dot != std::string::npos) { name = name.substr(0, last_dot) + "." + lazy_default_value_enum_name; } else { name = lazy_default_value_enum_name; } Symbol result = file()->pool()->CrossLinkOnDemandHelper(name, true); default_value_enum_ = result.enum_value_descriptor(); } else { default_value_enum_ = nullptr; } if (!default_value_enum_) { // We use the first defined value as the default // if a default is not explicitly defined. GOOGLE_CHECK(enum_type->value_count()); default_value_enum_ = enum_type->value(0); } } }
O0
cpp
google::protobuf::FieldDescriptor::InternalTypeOnceInit() const: subq $0x1c8, %rsp # imm = 0x1C8 movq %rdi, 0x1c0(%rsp) movq 0x1c0(%rsp), %rdi movq %rdi, 0x58(%rsp) callq 0x1bf1b0 movb 0x2(%rax), %al andb $0x1, %al movzbl %al, %eax movb $0x0, 0x187(%rsp) cmpl $0x1, %eax jne 0x26f0b8 jmp 0x26f111 leaq 0x17d114(%rip), %rdx # 0x3ec1d3 leaq 0x188(%rsp), %rdi movq %rdi, 0x48(%rsp) movl $0x3, %esi movl $0x1ffc, %ecx # imm = 0x1FFC callq 0x19a670 movq 0x48(%rsp), %rdi movb $0x1, 0x187(%rsp) leaq 0x17f636(%rip), %rsi # 0x3ee725 callq 0x199f30 movq %rax, 0x50(%rsp) jmp 0x26f0fb movq 0x50(%rsp), %rsi leaq 0x173(%rsp), %rdi callq 0x19a0e0 jmp 0x26f10f jmp 0x26f111 testb $0x1, 0x187(%rsp) jne 0x26f11d jmp 0x26f12a leaq 0x188(%rsp), %rdi callq 0x19a6b0 movq 0x58(%rsp), %rax movq $0x0, 0x168(%rsp) movq 0x18(%rax), %rax addq $0x4, %rax movq %rax, 0x160(%rsp) movq 0x160(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x160(%rsp), %rdi callq 0x8e730 movq 0x58(%rsp), %rdi movq %rax, %rcx movq 0x38(%rsp), %rax addq %rcx, %rax addq $0x1, %rax movq %rax, 0x158(%rsp) callq 0x1bf1b0 movq %rax, %rdi callq 0x1ddd80 movq %rax, 0x40(%rsp) movq 0x160(%rsp), %rsi leaq 0x140(%rsp), %rdi callq 0x17b210 movq 0x58(%rsp), %rax movq 0x40(%rsp), %rdi movzbl 0x2(%rax), %eax cmpl $0xe, %eax sete %al movq 0x140(%rsp), %rsi movq 0x148(%rsp), %rdx movzbl %al, %ecx andl $0x1, %ecx callq 0x26ef40 movq %rax, 0x150(%rsp) leaq 0x150(%rsp), %rdi callq 0x286b90 cmpl $0x1, %eax jne 0x26f247 movq 0x58(%rsp), %rax movb $0xb, 0x2(%rax) leaq 0x150(%rsp), %rdi callq 0x282420 movq %rax, %rcx movq 0x58(%rsp), %rax movq %rcx, 0x30(%rax) jmp 0x26f282 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x178(%rsp) movl %eax, 0x174(%rsp) testb $0x1, 0x187(%rsp) jne 0x26f235 jmp 0x26f242 leaq 0x188(%rsp), %rdi callq 0x19a6b0 jmp 0x26f5a3 leaq 0x150(%rsp), %rdi callq 0x286b90 cmpl $0x4, %eax jne 0x26f280 movq 0x58(%rsp), %rax movb $0xe, 0x2(%rax) leaq 0x150(%rsp), %rdi callq 0x2824a0 movq 0x58(%rsp), %rcx movq %rax, 0x30(%rcx) movq %rax, 0x168(%rsp) jmp 0x26f282 cmpq $0x0, 0x168(%rsp) je 0x26f59b movq 0x158(%rsp), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0x26f4ba movq 0x168(%rsp), %rdi callq 0x1c2080 movq %rax, %rsi leaq 0x120(%rsp), %rdi callq 0x8bd00 leaq 0x120(%rsp), %rdi movl $0x2e, %esi movq $-0x1, %rdx callq 0x8d280 movq %rax, 0x118(%rsp) cmpq $-0x1, 0x118(%rsp) je 0x26f3f2 movq 0x118(%rsp), %rcx xorl %eax, %eax movl %eax, %edx leaq 0xb8(%rsp), %rdi leaq 0x120(%rsp), %rsi callq 0x94ab0 jmp 0x26f315 leaq 0x17d551(%rip), %rdx # 0x3ec86d leaq 0xd8(%rsp), %rdi leaq 0xb8(%rsp), %rsi callq 0x8f1e0 jmp 0x26f333 movq 0x158(%rsp), %rdx leaq 0xf8(%rsp), %rdi leaq 0xd8(%rsp), %rsi callq 0x8f1e0 jmp 0x26f352 leaq 0x120(%rsp), %rdi leaq 0xf8(%rsp), %rsi callq 0x901e0 leaq 0xf8(%rsp), %rdi callq 0x921e0 leaq 0xd8(%rsp), %rdi callq 0x921e0 leaq 0xb8(%rsp), %rdi callq 0x921e0 jmp 0x26f40b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x178(%rsp) movl %eax, 0x174(%rsp) jmp 0x26f4a8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x178(%rsp) movl %eax, 0x174(%rsp) jmp 0x26f3e0 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x178(%rsp) movl %eax, 0x174(%rsp) leaq 0xd8(%rsp), %rdi callq 0x921e0 leaq 0xb8(%rsp), %rdi callq 0x921e0 jmp 0x26f4a8 movq 0x158(%rsp), %rsi leaq 0x120(%rsp), %rdi callq 0x90380 jmp 0x26f409 jmp 0x26f40b movq 0x58(%rsp), %rdi callq 0x1bf1b0 movq %rax, 0x30(%rsp) jmp 0x26f41c movq 0x30(%rsp), %rdi callq 0x1ddd80 movq %rax, 0x28(%rsp) jmp 0x26f42d leaq 0xa0(%rsp), %rdi leaq 0x120(%rsp), %rsi callq 0x158e50 jmp 0x26f444 movq 0x28(%rsp), %rdi movq 0xa0(%rsp), %rsi movq 0xa8(%rsp), %rdx movl $0x1, %ecx callq 0x26ef40 movq %rax, 0x20(%rsp) jmp 0x26f46a movq 0x20(%rsp), %rax movq %rax, 0xb0(%rsp) leaq 0xb0(%rsp), %rdi callq 0x2824e0 movq %rax, 0x18(%rsp) jmp 0x26f48b movq 0x58(%rsp), %rax movq 0x18(%rsp), %rcx movq %rcx, 0x40(%rax) leaq 0x120(%rsp), %rdi callq 0x921e0 jmp 0x26f4c7 leaq 0x120(%rsp), %rdi callq 0x921e0 jmp 0x26f5a3 movq 0x58(%rsp), %rax movq $0x0, 0x40(%rax) movq 0x58(%rsp), %rax cmpq $0x0, 0x40(%rax) jne 0x26f599 movq 0x168(%rsp), %rdi callq 0x1f0970 movb $0x0, 0x67(%rsp) cmpl $0x0, %eax je 0x26f4f0 jmp 0x26f540 leaq 0x17ccdc(%rip), %rdx # 0x3ec1d3 leaq 0x68(%rsp), %rdi movq %rdi, 0x8(%rsp) movl $0x3, %esi movl $0x201f, %ecx # imm = 0x201F callq 0x19a670 movq 0x8(%rsp), %rdi movb $0x1, 0x67(%rsp) leaq 0x17f237(%rip), %rsi # 0x3ee758 callq 0x199f30 movq %rax, 0x10(%rsp) jmp 0x26f52d movq 0x10(%rsp), %rsi leaq 0x66(%rsp), %rdi callq 0x19a0e0 jmp 0x26f53e jmp 0x26f540 testb $0x1, 0x67(%rsp) jne 0x26f549 jmp 0x26f553 leaq 0x68(%rsp), %rdi callq 0x19a6b0 movq 0x168(%rsp), %rdi xorl %esi, %esi callq 0x1f0980 movq %rax, %rcx movq 0x58(%rsp), %rax movq %rcx, 0x40(%rax) jmp 0x26f599 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x178(%rsp) movl %eax, 0x174(%rsp) testb $0x1, 0x67(%rsp) jne 0x26f58d jmp 0x26f597 leaq 0x68(%rsp), %rdi callq 0x19a6b0 jmp 0x26f5a3 jmp 0x26f59b addq $0x1c8, %rsp # imm = 0x1C8 retq movq 0x178(%rsp), %rdi callq 0x90db0
_ZNK6google8protobuf15FieldDescriptor20InternalTypeOnceInitEv: sub rsp, 1C8h mov [rsp+1C8h+var_8], rdi mov rdi, [rsp+1C8h+var_8]; this mov [rsp+1C8h+var_170], rdi call _ZNK6google8protobuf15FieldDescriptor4fileEv; google::protobuf::FieldDescriptor::file(void) mov al, [rax+2] and al, 1 movzx eax, al mov [rsp+1C8h+var_41], 0 cmp eax, 1 jnz short loc_26F0B8 jmp short loc_26F111 loc_26F0B8: lea rdx, aWorkspaceLlm4b_54; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+1C8h+var_40] mov [rsp+1C8h+var_180], rdi mov esi, 3 mov ecx, 1FFCh call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+1C8h+var_180] mov [rsp+1C8h+var_41], 1 lea rsi, aCheckFailedFil_3; "CHECK failed: file()->finished_building"... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+1C8h+var_178], rax jmp short $+2 loc_26F0FB: mov rsi, [rsp+1C8h+var_178] lea rdi, [rsp+1C8h+var_55] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_26F10F: jmp short $+2 loc_26F111: test [rsp+1C8h+var_41], 1 jnz short loc_26F11D jmp short loc_26F12A loc_26F11D: lea rdi, [rsp+1C8h+var_40]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_26F12A: mov rax, [rsp+1C8h+var_170] mov [rsp+1C8h+var_60], 0 mov rax, [rax+18h] add rax, 4 mov [rsp+1C8h+var_68], rax mov rax, [rsp+1C8h+var_68] mov [rsp+1C8h+var_190], rax mov rdi, [rsp+1C8h+var_68] call _strlen mov rdi, [rsp+1C8h+var_170]; this mov rcx, rax mov rax, [rsp+1C8h+var_190] add rax, rcx add rax, 1 mov [rsp+1C8h+var_70], rax call _ZNK6google8protobuf15FieldDescriptor4fileEv; google::protobuf::FieldDescriptor::file(void) mov rdi, rax; this call _ZNK6google8protobuf14FileDescriptor4poolEv; google::protobuf::FileDescriptor::pool(void) mov [rsp+1C8h+var_188], rax mov rsi, [rsp+1C8h+var_68]; char * lea rdi, [rsp+1C8h+var_88]; this call _ZN6google8protobuf20stringpiece_internal11StringPieceC2EPKc; google::protobuf::stringpiece_internal::StringPiece::StringPiece(char const*) mov rax, [rsp+1C8h+var_170] mov rdi, [rsp+1C8h+var_188] movzx eax, byte ptr [rax+2] cmp eax, 0Eh setz al mov rsi, [rsp+1C8h+var_88] mov rdx, [rsp+1C8h+var_80] movzx ecx, al and ecx, 1 call _ZNK6google8protobuf14DescriptorPool23CrossLinkOnDemandHelperENS0_20stringpiece_internal11StringPieceEb; google::protobuf::DescriptorPool::CrossLinkOnDemandHelper(google::protobuf::stringpiece_internal::StringPiece,bool) mov [rsp+1C8h+var_78], rax lea rdi, [rsp+1C8h+var_78]; this call _ZNK6google8protobuf6Symbol4typeEv; google::protobuf::Symbol::type(void) cmp eax, 1 jnz short loc_26F247 mov rax, [rsp+1C8h+var_170] mov byte ptr [rax+2], 0Bh lea rdi, [rsp+1C8h+var_78]; this call _ZNK6google8protobuf6Symbol10descriptorEv; google::protobuf::Symbol::descriptor(void) mov rcx, rax mov rax, [rsp+1C8h+var_170] mov [rax+30h], rcx jmp short loc_26F282 mov rcx, rax mov eax, edx mov [rsp+arg_170], rcx mov [rsp+arg_16C], eax test [rsp+arg_17F], 1 jnz short loc_26F235 jmp short loc_26F242 loc_26F235: lea rdi, [rsp+arg_180]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_26F242: jmp loc_26F5A3 loc_26F247: lea rdi, [rsp+1C8h+var_78]; this call _ZNK6google8protobuf6Symbol4typeEv; google::protobuf::Symbol::type(void) cmp eax, 4 jnz short loc_26F280 mov rax, [rsp+1C8h+var_170] mov byte ptr [rax+2], 0Eh lea rdi, [rsp+1C8h+var_78]; this call _ZNK6google8protobuf6Symbol15enum_descriptorEv; google::protobuf::Symbol::enum_descriptor(void) mov rcx, [rsp+1C8h+var_170] mov [rcx+30h], rax mov [rsp+1C8h+var_60], rax loc_26F280: jmp short $+2 loc_26F282: cmp [rsp+1C8h+var_60], 0 jz loc_26F59B mov rax, [rsp+1C8h+var_70] movsx eax, byte ptr [rax] cmp eax, 0 jz loc_26F4BA mov rdi, [rsp+1C8h+var_60] call _ZNK6google8protobuf14EnumDescriptor9full_nameB5cxx11Ev; google::protobuf::EnumDescriptor::full_name(void) mov rsi, rax lea rdi, [rsp+1C8h+var_A8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) lea rdi, [rsp+1C8h+var_A8] mov esi, 2Eh ; '.' mov rdx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12find_last_ofEcm; std::string::find_last_of(char,ulong) mov [rsp+1C8h+var_B0], rax cmp [rsp+1C8h+var_B0], 0FFFFFFFFFFFFFFFFh jz loc_26F3F2 mov rcx, [rsp+1C8h+var_B0] xor eax, eax mov edx, eax lea rdi, [rsp+1C8h+var_110] lea rsi, [rsp+1C8h+var_A8] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) jmp short $+2 loc_26F315: lea rdx, aWhichIsNotDefi+77h; "." lea rdi, [rsp+1C8h+var_F0] lea rsi, [rsp+1C8h+var_110] call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_26F333: mov rdx, [rsp+1C8h+var_70] lea rdi, [rsp+1C8h+var_D0] lea rsi, [rsp+1C8h+var_F0] call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_26F352: lea rdi, [rsp+1C8h+var_A8] lea rsi, [rsp+1C8h+var_D0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rsp+1C8h+var_D0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+1C8h+var_F0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+1C8h+var_110] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_26F40B mov rcx, rax mov eax, edx mov [rsp+arg_170], rcx mov [rsp+arg_16C], eax jmp loc_26F4A8 mov rcx, rax mov eax, edx mov [rsp+arg_170], rcx mov [rsp+arg_16C], eax jmp short loc_26F3E0 mov rcx, rax mov eax, edx mov [rsp+arg_170], rcx mov [rsp+arg_16C], eax lea rdi, [rsp+arg_D0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_26F3E0: lea rdi, [rsp+arg_B0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_26F4A8 loc_26F3F2: mov rsi, [rsp+1C8h+var_70] lea rdi, [rsp+1C8h+var_A8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*) jmp short $+2 loc_26F409: jmp short $+2 loc_26F40B: mov rdi, [rsp+1C8h+var_170]; this call _ZNK6google8protobuf15FieldDescriptor4fileEv; google::protobuf::FieldDescriptor::file(void) mov [rsp+1C8h+var_198], rax jmp short $+2 loc_26F41C: mov rdi, [rsp+1C8h+var_198]; this call _ZNK6google8protobuf14FileDescriptor4poolEv; google::protobuf::FileDescriptor::pool(void) mov [rsp+1C8h+var_1A0], rax jmp short $+2 loc_26F42D: lea rdi, [rsp+1C8h+var_128] lea rsi, [rsp+1C8h+var_A8] call _ZN6google8protobuf20stringpiece_internal11StringPieceC2ISaIcEEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcET_EE; google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(std::string const&) jmp short $+2 loc_26F444: mov rdi, [rsp+1C8h+var_1A0] mov rsi, [rsp+1C8h+var_128] mov rdx, [rsp+1C8h+var_120] mov ecx, 1 call _ZNK6google8protobuf14DescriptorPool23CrossLinkOnDemandHelperENS0_20stringpiece_internal11StringPieceEb; google::protobuf::DescriptorPool::CrossLinkOnDemandHelper(google::protobuf::stringpiece_internal::StringPiece,bool) mov [rsp+1C8h+var_1A8], rax jmp short $+2 loc_26F46A: mov rax, [rsp+1C8h+var_1A8] mov [rsp+1C8h+var_118], rax lea rdi, [rsp+1C8h+var_118]; this call _ZNK6google8protobuf6Symbol21enum_value_descriptorEv; google::protobuf::Symbol::enum_value_descriptor(void) mov [rsp+1C8h+var_1B0], rax jmp short $+2 loc_26F48B: mov rax, [rsp+1C8h+var_170] mov rcx, [rsp+1C8h+var_1B0] mov [rax+40h], rcx lea rdi, [rsp+1C8h+var_A8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_26F4C7 loc_26F4A8: lea rdi, [rsp+arg_118] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_26F5A3 loc_26F4BA: mov rax, [rsp+1C8h+var_170] mov qword ptr [rax+40h], 0 loc_26F4C7: mov rax, [rsp+1C8h+var_170] cmp qword ptr [rax+40h], 0 jnz loc_26F599 mov rdi, [rsp+1C8h+var_60]; this call _ZNK6google8protobuf14EnumDescriptor11value_countEv; google::protobuf::EnumDescriptor::value_count(void) mov [rsp+1C8h+var_161], 0 cmp eax, 0 jz short loc_26F4F0 jmp short loc_26F540 loc_26F4F0: lea rdx, aWorkspaceLlm4b_54; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+1C8h+var_160] mov [rsp+1C8h+var_1C0], rdi mov esi, 3 mov ecx, 201Fh call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+1C8h+var_1C0] mov [rsp+1C8h+var_161], 1 lea rsi, aCheckFailedEnu; "CHECK failed: enum_type->value_count():"... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+1C8h+var_1B8], rax jmp short $+2 loc_26F52D: mov rsi, [rsp+1C8h+var_1B8] lea rdi, [rsp+1C8h+var_162] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_26F53E: jmp short $+2 loc_26F540: test [rsp+1C8h+var_161], 1 jnz short loc_26F549 jmp short loc_26F553 loc_26F549: lea rdi, [rsp+1C8h+var_160]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_26F553: mov rdi, [rsp+1C8h+var_60]; this xor esi, esi; int call _ZNK6google8protobuf14EnumDescriptor5valueEi; google::protobuf::EnumDescriptor::value(int) mov rcx, rax mov rax, [rsp+1C8h+var_170] mov [rax+40h], rcx jmp short loc_26F599 mov rcx, rax mov eax, edx mov [rsp+arg_170], rcx mov [rsp+arg_16C], eax test [rsp+arg_5F], 1 jnz short loc_26F58D jmp short loc_26F597 loc_26F58D: lea rdi, [rsp+arg_60]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_26F597: jmp short loc_26F5A3 loc_26F599: jmp short $+2 loc_26F59B: add rsp, 1C8h retn loc_26F5A3: mov rdi, [rsp+arg_170] call __Unwind_Resume
google::protobuf::EnumDescriptor * google::protobuf::FieldDescriptor::InternalTypeOnceInit( google::protobuf::FieldDescriptor *this) { int v1; // eax google::protobuf::FileDescriptor *v2; // rax long long v3; // rcx google::protobuf::EnumDescriptor *result; // rax long long v5; // rax long long v6; // rcx google::protobuf::internal::LogMessage *v7; // [rsp+10h] [rbp-1B8h] google::protobuf::internal::WrappedMutex **v8; // [rsp+28h] [rbp-1A0h] google::protobuf::FileDescriptor *v9; // [rsp+30h] [rbp-198h] google::protobuf::internal::WrappedMutex **v10; // [rsp+40h] [rbp-188h] google::protobuf::internal::LogMessage *v11; // [rsp+50h] [rbp-178h] char v12; // [rsp+66h] [rbp-162h] BYREF char v13; // [rsp+67h] [rbp-161h] _BYTE v14[56]; // [rsp+68h] [rbp-160h] BYREF long long v15[2]; // [rsp+A0h] [rbp-128h] BYREF long long v16; // [rsp+B0h] [rbp-118h] BYREF _BYTE v17[32]; // [rsp+B8h] [rbp-110h] BYREF _BYTE v18[32]; // [rsp+D8h] [rbp-F0h] BYREF _BYTE v19[32]; // [rsp+F8h] [rbp-D0h] BYREF long long last_of; // [rsp+118h] [rbp-B0h] _BYTE v21[32]; // [rsp+120h] [rbp-A8h] BYREF long long v22[2]; // [rsp+140h] [rbp-88h] BYREF long long v23; // [rsp+150h] [rbp-78h] BYREF char *v24; // [rsp+158h] [rbp-70h] char *v25; // [rsp+160h] [rbp-68h] google::protobuf::EnumDescriptor *v26; // [rsp+168h] [rbp-60h] _BYTE v27[20]; // [rsp+173h] [rbp-55h] BYREF char v28; // [rsp+187h] [rbp-41h] _BYTE v29[56]; // [rsp+188h] [rbp-40h] BYREF google::protobuf::FieldDescriptor *v30; // [rsp+1C0h] [rbp-8h] v30 = this; v1 = *(_BYTE *)(google::protobuf::FieldDescriptor::file(this) + 2) & 1; v28 = 0; if ( v1 != 1 ) { google::protobuf::internal::LogMessage::LogMessage( (long long)v29, 3, (long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc", 8188); v28 = 1; v11 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<( (long long)v29, (long long)"CHECK failed: file()->finished_building_ == true: "); google::protobuf::internal::LogFinisher::operator=((long long)v27, v11); } if ( (v28 & 1) != 0 ) google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v29); v26 = 0LL; v25 = (char *)(*((_QWORD *)this + 3) + 4LL); v24 = &v25[strlen(v25) + 1]; v2 = (google::protobuf::FileDescriptor *)google::protobuf::FieldDescriptor::file(this); v10 = (google::protobuf::internal::WrappedMutex **)google::protobuf::FileDescriptor::pool(v2); google::protobuf::stringpiece_internal::StringPiece::StringPiece( (google::protobuf::stringpiece_internal::StringPiece *)v22, v25); v23 = google::protobuf::DescriptorPool::CrossLinkOnDemandHelper(v10, v22[0], v22[1], *((_BYTE *)this + 2) == 14); if ( (unsigned int)google::protobuf::Symbol::type((google::protobuf::Symbol *)&v23) == 1 ) { *((_BYTE *)this + 2) = 11; v3 = google::protobuf::Symbol::descriptor((google::protobuf::Symbol *)&v23); result = this; *((_QWORD *)this + 6) = v3; } else { result = (google::protobuf::EnumDescriptor *)google::protobuf::Symbol::type((google::protobuf::Symbol *)&v23); if ( (_DWORD)result == 4 ) { *((_BYTE *)this + 2) = 14; result = (google::protobuf::EnumDescriptor *)google::protobuf::Symbol::enum_descriptor((google::protobuf::Symbol *)&v23); *((_QWORD *)this + 6) = result; v26 = result; } } if ( v26 ) { if ( *v24 ) { v5 = google::protobuf::EnumDescriptor::full_name[abi:cxx11]((long long)v26); std::string::basic_string(v21, v5); last_of = std::string::find_last_of(v21, 46LL, -1LL); if ( last_of == -1 ) { std::string::operator=(v21, v24); } else { std::string::substr(v17, v21, 0LL, last_of); std::operator+<char>(v18, v17, "."); std::operator+<char>(v19, v18, v24); std::string::operator=(v21, v19); std::string::~string(v19); std::string::~string(v18); std::string::~string(v17); } v9 = (google::protobuf::FileDescriptor *)google::protobuf::FieldDescriptor::file(this); v8 = (google::protobuf::internal::WrappedMutex **)google::protobuf::FileDescriptor::pool(v9); google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(v15, (long long)v21); v16 = google::protobuf::DescriptorPool::CrossLinkOnDemandHelper(v8, v15[0], v15[1], 1); *((_QWORD *)this + 8) = google::protobuf::Symbol::enum_value_descriptor((google::protobuf::Symbol *)&v16); std::string::~string(v21); } else { *((_QWORD *)this + 8) = 0LL; } result = this; if ( !*((_QWORD *)this + 8) ) { v13 = 0; if ( !(unsigned int)google::protobuf::EnumDescriptor::value_count(v26) ) { google::protobuf::internal::LogMessage::LogMessage( (long long)v14, 3, (long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc", 8223); v13 = 1; v7 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<( (long long)v14, (long long)"CHECK failed: enum_type->value_count(): "); google::protobuf::internal::LogFinisher::operator=((long long)&v12, v7); } if ( (v13 & 1) != 0 ) google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v14); v6 = google::protobuf::EnumDescriptor::value(v26, 0); result = this; *((_QWORD *)this + 8) = v6; } } return result; }
13,290
google::protobuf::FieldDescriptor::InternalTypeOnceInit() const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
void FieldDescriptor::InternalTypeOnceInit() const { GOOGLE_CHECK(file()->finished_building_ == true); const EnumDescriptor* enum_type = nullptr; const char* lazy_type_name = reinterpret_cast<const char*>(type_once_ + 1); const char* lazy_default_value_enum_name = lazy_type_name + strlen(lazy_type_name) + 1; Symbol result = file()->pool()->CrossLinkOnDemandHelper( lazy_type_name, type_ == FieldDescriptor::TYPE_ENUM); if (result.type() == Symbol::MESSAGE) { type_ = FieldDescriptor::TYPE_MESSAGE; type_descriptor_.message_type = result.descriptor(); } else if (result.type() == Symbol::ENUM) { type_ = FieldDescriptor::TYPE_ENUM; enum_type = type_descriptor_.enum_type = result.enum_descriptor(); } if (enum_type) { if (lazy_default_value_enum_name[0] != '\0') { // Have to build the full name now instead of at CrossLink time, // because enum_type may not be known at the time. std::string name = enum_type->full_name(); // Enum values reside in the same scope as the enum type. std::string::size_type last_dot = name.find_last_of('.'); if (last_dot != std::string::npos) { name = name.substr(0, last_dot) + "." + lazy_default_value_enum_name; } else { name = lazy_default_value_enum_name; } Symbol result = file()->pool()->CrossLinkOnDemandHelper(name, true); default_value_enum_ = result.enum_value_descriptor(); } else { default_value_enum_ = nullptr; } if (!default_value_enum_) { // We use the first defined value as the default // if a default is not explicitly defined. GOOGLE_CHECK(enum_type->value_count()); default_value_enum_ = enum_type->value(0); } } }
O3
cpp
google::protobuf::FieldDescriptor::InternalTypeOnceInit() const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rdi, %rbx movq 0x10(%rdi), %r13 cmpb $0x0, 0x2(%r13) jne 0xdce7d leaq 0x8f053(%rip), %rdx # 0x16be93 movq %rsp, %r14 movq %r14, %rdi movl $0x3, %esi movl $0x1ffc, %ecx # imm = 0x1FFC callq 0x857c2 leaq 0x91480(%rip), %rsi # 0x16e2dc movq %r14, %rdi callq 0x852c0 leaq 0x58(%rsp), %rdi movq %rax, %rsi callq 0x8539a movq %rsp, %rdi callq 0x857e0 movq 0x10(%rbx), %r13 movq 0x18(%rbx), %r12 leaq 0x4(%r12), %r14 movq %r14, %rdi callq 0x2c700 movq %rax, %r15 movq 0x18(%r13), %rdi movq %r14, %rsi movq %rax, %rdx xorl %ecx, %ecx callq 0xdcd48 movq %rax, %r14 movzbl (%rax), %eax cmpl $0x4, %eax je 0xdcec3 cmpl $0x1, %eax jne 0xdd0e3 movb $0xb, 0x2(%rbx) movq %r14, 0x30(%rbx) jmp 0xdd0e3 addq %r12, %r15 addq $0x5, %r15 movb $0xe, 0x2(%rbx) movq %r14, 0x30(%rbx) cmpb $0x0, (%r15) je 0xdcf64 movq 0x8(%r14), %rax leaq 0x10(%rsp), %rbp movq %rbp, -0x10(%rbp) movq 0x20(%rax), %rsi movq 0x28(%rax), %rdx addq %rsi, %rdx movq %rsp, %r12 movq %r12, %rdi callq 0x2c640 movq %r12, %rdi movl $0x2e, %esi movq $-0x1, %rdx callq 0x2e5c0 cmpq $-0x1, %rax je 0xdcf71 leaq 0x78(%rsp), %rdi movq %rsp, %rsi xorl %edx, %edx movq %rax, %rcx callq 0x2d300 leaq 0x8f4f2(%rip), %rsi # 0x16c424 leaq 0x78(%rsp), %rdi callq 0x2e5a0 leaq 0x48(%rsp), %r12 movq %r12, -0x10(%r12) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0xdcf99 movq %rdx, 0x38(%rsp) movq (%rcx), %rdx movq %rdx, 0x48(%rsp) jmp 0xdcfa1 movq $0x0, 0x40(%rbx) jmp 0xdd094 movq %rsp, %r12 movq 0x8(%r12), %r13 movq %r15, %rdi callq 0x2c700 movq %r12, %rdi xorl %esi, %esi movq %r13, %rdx movq %r15, %rcx movq %rax, %r8 callq 0x2ce90 jmp 0xdd04d movups (%rcx), %xmm0 movups %xmm0, (%r12) movq 0x8(%rax), %rdx leaq 0x38(%rsp), %rdi movq %rdx, 0x8(%rdi) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq %r15, %rsi callq 0x2e5a0 leaq 0x68(%rsp), %r13 movq %r13, -0x10(%r13) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0xdcfec movq %rdx, 0x58(%rsp) movq (%rcx), %rdx movq %rdx, 0x68(%rsp) jmp 0xdcff4 movups (%rcx), %xmm0 movups %xmm0, (%r13) movq 0x8(%rax), %rdx leaq 0x58(%rsp), %r15 movq %rdx, 0x8(%r15) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq %rsp, %rdi movq %r15, %rsi callq 0x2c6a0 movq (%r15), %rdi cmpq %r13, %rdi je 0xdd028 callq 0x2d160 movq 0x38(%rsp), %rdi cmpq %r12, %rdi je 0xdd037 callq 0x2d160 leaq 0x88(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xdd04d callq 0x2d160 movq 0x10(%rbx), %rax movq 0x18(%rax), %rdi movq (%rsp), %rsi movq 0x8(%rsp), %rdx xorl %ecx, %ecx callq 0xdcd48 movzbl (%rax), %ecx cmpl $0x5, %ecx je 0xdd079 cmpl $0x6, %ecx jne 0xdd077 decq %rax jmp 0xdd079 xorl %eax, %eax movq %rax, 0x40(%rbx) movq (%rsp), %rdi cmpq %rbp, %rdi je 0xdd08f callq 0x2d160 movq 0x40(%rbx), %rax testq %rax, %rax jne 0xdd0e3 cmpl $0x0, 0x4(%r14) jne 0xdd0db leaq 0x8edf1(%rip), %rdx # 0x16be93 movq %rsp, %r15 movq %r15, %rdi movl $0x3, %esi movl $0x201f, %ecx # imm = 0x201F callq 0x857c2 leaq 0x91251(%rip), %rsi # 0x16e30f movq %r15, %rdi callq 0x852c0 leaq 0x58(%rsp), %rdi movq %rax, %rsi callq 0x8539a movq %rsp, %rdi callq 0x857e0 movq 0x28(%r14), %rax movq %rax, 0x40(%rbx) addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xdd141 jmp 0xdd141 jmp 0xdd12c movq %rax, %rbx movq 0x38(%rsp), %rdi cmpq %r12, %rdi je 0xdd112 callq 0x2d160 jmp 0xdd112 movq %rax, %rbx leaq 0x88(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xdd12f callq 0x2d160 jmp 0xdd12f jmp 0xdd12c movq %rax, %rbx movq (%rsp), %rdi cmpq %rbp, %rdi je 0xdd14c callq 0x2d160 jmp 0xdd14c jmp 0xdd141 movq %rax, %rbx movq %rsp, %rdi callq 0x857e0 movq %rbx, %rdi callq 0x2e220
_ZNK6google8protobuf15FieldDescriptor20InternalTypeOnceInitEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov rbx, rdi mov r13, [rdi+10h] cmp byte ptr [r13+2], 0 jnz short loc_DCE7D lea rdx, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/aimrt_"... mov r14, rsp mov rdi, r14 mov esi, 3 mov ecx, 1FFCh call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) lea rsi, aCheckFailedFil_3; "CHECK failed: file()->finished_building"... mov rdi, r14 call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rdi, [rsp+0C8h+var_70] mov rsi, rax call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) mov rdi, rsp; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() mov r13, [rbx+10h] loc_DCE7D: mov r12, [rbx+18h] lea r14, [r12+4] mov rdi, r14 call _strlen mov r15, rax mov rdi, [r13+18h] mov rsi, r14 mov rdx, rax xor ecx, ecx call _ZNK6google8protobuf14DescriptorPool23CrossLinkOnDemandHelperENS0_20stringpiece_internal11StringPieceEb; google::protobuf::DescriptorPool::CrossLinkOnDemandHelper(google::protobuf::stringpiece_internal::StringPiece,bool) mov r14, rax movzx eax, byte ptr [rax] cmp eax, 4 jz short loc_DCEC3 cmp eax, 1 jnz loc_DD0E3 mov byte ptr [rbx+2], 0Bh mov [rbx+30h], r14 jmp loc_DD0E3 loc_DCEC3: add r15, r12 add r15, 5 mov byte ptr [rbx+2], 0Eh mov [rbx+30h], r14 cmp byte ptr [r15], 0 jz loc_DCF64 mov rax, [r14+8] lea rbp, [rsp+0C8h+var_B8] mov [rbp-10h], rbp mov rsi, [rax+20h] mov rdx, [rax+28h] add rdx, rsi mov r12, rsp mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov rdi, r12 mov esi, 2Eh ; '.' mov rdx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm; std::string::rfind(char,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_DCF71 lea rdi, [rsp+0C8h+var_50] mov rsi, rsp xor edx, edx mov rcx, rax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rsi, aWhichIsNotDefi+77h; "." lea rdi, [rsp+0C8h+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r12, [rsp+0C8h+var_80] mov [r12-10h], r12 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_DCF99 mov [rsp+0C8h+var_90], rdx mov rdx, [rcx] mov [rsp+0C8h+var_80], rdx jmp short loc_DCFA1 loc_DCF64: mov qword ptr [rbx+40h], 0 jmp loc_DD094 loc_DCF71: mov r12, rsp mov r13, [r12+8] mov rdi, r15 call _strlen mov rdi, r12 xor esi, esi mov rdx, r13 mov rcx, r15 mov r8, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) jmp loc_DD04D loc_DCF99: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r12], xmm0 loc_DCFA1: mov rdx, [rax+8] lea rdi, [rsp+0C8h+var_90] mov [rdi+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r13, [rsp+0C8h+var_60] mov [r13-10h], r13 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_DCFEC mov [rsp+0C8h+var_70], rdx mov rdx, [rcx] mov [rsp+0C8h+var_60], rdx jmp short loc_DCFF4 loc_DCFEC: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r13+0], xmm0 loc_DCFF4: mov rdx, [rax+8] lea r15, [rsp+0C8h+var_70] mov [r15+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rdi, rsp mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r15]; void * cmp rdi, r13 jz short loc_DD028 call __ZdlPv; operator delete(void *) loc_DD028: mov rdi, [rsp+0C8h+var_90]; void * cmp rdi, r12 jz short loc_DD037 call __ZdlPv; operator delete(void *) loc_DD037: lea rax, [rsp+0C8h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_DD04D call __ZdlPv; operator delete(void *) loc_DD04D: mov rax, [rbx+10h] mov rdi, [rax+18h] mov rsi, [rsp+0C8h+var_C8] mov rdx, [rsp+0C8h+var_C0] xor ecx, ecx call _ZNK6google8protobuf14DescriptorPool23CrossLinkOnDemandHelperENS0_20stringpiece_internal11StringPieceEb; google::protobuf::DescriptorPool::CrossLinkOnDemandHelper(google::protobuf::stringpiece_internal::StringPiece,bool) movzx ecx, byte ptr [rax] cmp ecx, 5 jz short loc_DD079 cmp ecx, 6 jnz short loc_DD077 dec rax jmp short loc_DD079 loc_DD077: xor eax, eax loc_DD079: mov [rbx+40h], rax mov rdi, [rsp+0C8h+var_C8]; void * cmp rdi, rbp jz short loc_DD08F call __ZdlPv; operator delete(void *) mov rax, [rbx+40h] loc_DD08F: test rax, rax jnz short loc_DD0E3 loc_DD094: cmp dword ptr [r14+4], 0 jnz short loc_DD0DB lea rdx, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/aimrt_"... mov r15, rsp mov rdi, r15 mov esi, 3 mov ecx, 201Fh call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) lea rsi, aCheckFailedEnu; "CHECK failed: enum_type->value_count():"... mov rdi, r15 call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rdi, [rsp+0C8h+var_70] mov rsi, rax call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) mov rdi, rsp; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_DD0DB: mov rax, [r14+28h] mov [rbx+40h], rax loc_DD0E3: add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_DD141 jmp short loc_DD141 jmp short loc_DD12C mov rbx, rax mov rdi, [rsp+arg_30]; void * cmp rdi, r12 jz short loc_DD112 call __ZdlPv; operator delete(void *) jmp short loc_DD112 mov rbx, rax loc_DD112: lea rax, [rsp+arg_80] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_DD12F call __ZdlPv; operator delete(void *) jmp short loc_DD12F jmp short $+2 loc_DD12C: mov rbx, rax loc_DD12F: mov rdi, [rsp+0]; void * cmp rdi, rbp jz short loc_DD14C call __ZdlPv; operator delete(void *) jmp short loc_DD14C jmp short $+2 loc_DD141: mov rbx, rax mov rdi, rsp; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_DD14C: mov rdi, rbx call __Unwind_Resume
long long google::protobuf::FieldDescriptor::InternalTypeOnceInit(google::protobuf::FieldDescriptor *this) { long long v1; // r13 google::protobuf::internal::LogMessage *v2; // rax long long v3; // r12 long long v4; // r15 _BYTE *v5; // r14 long long result; // rax _BYTE *v7; // r15 long long v8; // rax long long v9; // rax long long v10; // rax __int128 *v11; // rcx long long v12; // r13 long long v13; // rax __int128 *v14; // rcx int v15; // ecx google::protobuf::internal::LogMessage *v16; // rax void *v17; // [rsp+0h] [rbp-C8h] BYREF long long v18; // [rsp+8h] [rbp-C0h] _BYTE v19[40]; // [rsp+10h] [rbp-B8h] BYREF void *v20[2]; // [rsp+38h] [rbp-90h] BYREF __int128 v21; // [rsp+48h] [rbp-80h] BYREF void *v22[2]; // [rsp+58h] [rbp-70h] BYREF __int128 v23; // [rsp+68h] [rbp-60h] BYREF void *v24[2]; // [rsp+78h] [rbp-50h] BYREF char v25; // [rsp+88h] [rbp-40h] BYREF v1 = *((_QWORD *)this + 2); if ( !*(_BYTE *)(v1 + 2) ) { google::protobuf::internal::LogMessage::LogMessage( (long long)&v17, 3, (long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc", 8188); v2 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<( (long long)&v17, (long long)"CHECK failed: file()->finished_building_ == true: "); google::protobuf::internal::LogFinisher::operator=((long long)v22, v2); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)&v17); v1 = *((_QWORD *)this + 2); } v3 = *((_QWORD *)this + 3); v4 = strlen(v3 + 4); v5 = google::protobuf::DescriptorPool::CrossLinkOnDemandHelper(*(_QWORD *)(v1 + 24), v3 + 4, v4); result = (unsigned __int8)*v5; if ( (_DWORD)result != 4 ) { if ( (_DWORD)result == 1 ) { *((_BYTE *)this + 2) = 11; *((_QWORD *)this + 6) = v5; } return result; } v7 = (_BYTE *)(v3 + v4 + 5); *((_BYTE *)this + 2) = 14; *((_QWORD *)this + 6) = v5; if ( !*v7 ) { *((_QWORD *)this + 8) = 0LL; LABEL_29: if ( !*((_DWORD *)v5 + 1) ) { google::protobuf::internal::LogMessage::LogMessage( (long long)&v17, 3, (long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc", 8223); v16 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<( (long long)&v17, (long long)"CHECK failed: enum_type->value_count(): "); google::protobuf::internal::LogFinisher::operator=((long long)v22, v16); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)&v17); } result = *((_QWORD *)v5 + 5); *((_QWORD *)this + 8) = result; return result; } v8 = *((_QWORD *)v5 + 1); v17 = v19; std::string::_M_construct<char *>(&v17, *(_QWORD *)(v8 + 32), *(_QWORD *)(v8 + 32) + *(_QWORD *)(v8 + 40)); v9 = std::string::rfind(&v17, 46LL, -1LL); if ( v9 == -1 ) { v12 = v18; strlen(v7); std::string::_M_replace(&v17, 0LL, v12); } else { std::string::substr(v24, &v17, 0LL, v9); v10 = std::string::append(v24, "."); v20[0] = &v21; v11 = (__int128 *)(v10 + 16); if ( *(_QWORD *)v10 == v10 + 16 ) { v21 = *v11; } else { v20[0] = *(void **)v10; *(_QWORD *)&v21 = *(_QWORD *)v11; } v20[1] = *(void **)(v10 + 8); *(_QWORD *)v10 = v11; *(_QWORD *)(v10 + 8) = 0LL; *(_BYTE *)(v10 + 16) = 0; v13 = std::string::append(v20, v7); v22[0] = &v23; v14 = (__int128 *)(v13 + 16); if ( *(_QWORD *)v13 == v13 + 16 ) { v23 = *v14; } else { v22[0] = *(void **)v13; *(_QWORD *)&v23 = *(_QWORD *)v14; } v22[1] = *(void **)(v13 + 8); *(_QWORD *)v13 = v14; *(_QWORD *)(v13 + 8) = 0LL; *(_BYTE *)(v13 + 16) = 0; std::string::operator=(&v17, (long long)v22); if ( v22[0] != &v23 ) operator delete(v22[0]); if ( v20[0] != &v21 ) operator delete(v20[0]); if ( v24[0] != &v25 ) operator delete(v24[0]); } result = (long long)google::protobuf::DescriptorPool::CrossLinkOnDemandHelper( *(_QWORD *)(*((_QWORD *)this + 2) + 24LL), (long long)v17, v18); v15 = *(unsigned __int8 *)result; if ( v15 != 5 ) { if ( v15 == 6 ) --result; else result = 0LL; } *((_QWORD *)this + 8) = result; if ( v17 != v19 ) { operator delete(v17); result = *((_QWORD *)this + 8); } if ( !result ) goto LABEL_29; return result; }
InternalTypeOnceInit: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV RBX,RDI MOV R13,qword ptr [RDI + 0x10] CMP byte ptr [R13 + 0x2],0x0 JNZ 0x001dce7d LEA RDX,[0x26be93] MOV R14,RSP MOV RDI,R14 MOV ESI,0x3 MOV ECX,0x1ffc CALL 0x001857c2 LAB_001dce55: LEA RSI,[0x26e2dc] MOV RDI,R14 CALL 0x001852c0 LAB_001dce64: LEA RDI,[RSP + 0x58] MOV RSI,RAX CALL 0x0018539a LAB_001dce71: MOV RDI,RSP CALL 0x001857e0 MOV R13,qword ptr [RBX + 0x10] LAB_001dce7d: MOV R12,qword ptr [RBX + 0x18] LEA R14,[R12 + 0x4] MOV RDI,R14 CALL 0x0012c700 MOV R15,RAX MOV RDI,qword ptr [R13 + 0x18] MOV RSI,R14 MOV RDX,RAX XOR ECX,ECX CALL 0x001dcd48 MOV R14,RAX MOVZX EAX,byte ptr [RAX] CMP EAX,0x4 JZ 0x001dcec3 CMP EAX,0x1 JNZ 0x001dd0e3 MOV byte ptr [RBX + 0x2],0xb MOV qword ptr [RBX + 0x30],R14 JMP 0x001dd0e3 LAB_001dcec3: ADD R15,R12 ADD R15,0x5 MOV byte ptr [RBX + 0x2],0xe MOV qword ptr [RBX + 0x30],R14 CMP byte ptr [R15],0x0 JZ 0x001dcf64 MOV RAX,qword ptr [R14 + 0x8] LEA RBP,[RSP + 0x10] MOV qword ptr [RBP + -0x10],RBP MOV RSI,qword ptr [RAX + 0x20] MOV RDX,qword ptr [RAX + 0x28] ADD RDX,RSI MOV R12,RSP MOV RDI,R12 CALL 0x0012c640 MOV RDI,R12 MOV ESI,0x2e MOV RDX,-0x1 CALL 0x0012e5c0 CMP RAX,-0x1 JZ 0x001dcf71 LAB_001dcf19: LEA RDI,[RSP + 0x78] MOV RSI,RSP XOR EDX,EDX MOV RCX,RAX CALL 0x0012d300 LAB_001dcf2b: LEA RSI,[0x26c424] LEA RDI,[RSP + 0x78] CALL 0x0012e5a0 LEA R12,[RSP + 0x48] MOV qword ptr [R12 + -0x10],R12 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x001dcf99 MOV qword ptr [RSP + 0x38],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x48],RDX JMP 0x001dcfa1 LAB_001dcf64: MOV qword ptr [RBX + 0x40],0x0 JMP 0x001dd094 LAB_001dcf71: MOV R12,RSP MOV R13,qword ptr [R12 + 0x8] MOV RDI,R15 CALL 0x0012c700 LAB_001dcf81: MOV RDI,R12 XOR ESI,ESI MOV RDX,R13 MOV RCX,R15 MOV R8,RAX CALL 0x0012ce90 JMP 0x001dd04d LAB_001dcf99: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R12],XMM0 LAB_001dcfa1: MOV RDX,qword ptr [RAX + 0x8] LEA RDI,[RSP + 0x38] MOV qword ptr [RDI + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LAB_001dcfbd: MOV RSI,R15 CALL 0x0012e5a0 LEA R13,[RSP + 0x68] MOV qword ptr [R13 + -0x10],R13 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x001dcfec MOV qword ptr [RSP + 0x58],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x68],RDX JMP 0x001dcff4 LAB_001dcfec: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R13],XMM0 LAB_001dcff4: MOV RDX,qword ptr [RAX + 0x8] LEA R15,[RSP + 0x58] MOV qword ptr [R15 + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 MOV RDI,RSP MOV RSI,R15 CALL 0x0012c6a0 MOV RDI,qword ptr [R15] CMP RDI,R13 JZ 0x001dd028 CALL 0x0012d160 LAB_001dd028: MOV RDI,qword ptr [RSP + 0x38] CMP RDI,R12 JZ 0x001dd037 CALL 0x0012d160 LAB_001dd037: LEA RAX,[RSP + 0x88] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001dd04d CALL 0x0012d160 LAB_001dd04d: MOV RAX,qword ptr [RBX + 0x10] MOV RDI,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] LAB_001dd05e: XOR ECX,ECX CALL 0x001dcd48 LAB_001dd065: MOVZX ECX,byte ptr [RAX] CMP ECX,0x5 JZ 0x001dd079 CMP ECX,0x6 JNZ 0x001dd077 DEC RAX JMP 0x001dd079 LAB_001dd077: XOR EAX,EAX LAB_001dd079: MOV qword ptr [RBX + 0x40],RAX MOV RDI,qword ptr [RSP] CMP RDI,RBP JZ 0x001dd08f CALL 0x0012d160 MOV RAX,qword ptr [RBX + 0x40] LAB_001dd08f: TEST RAX,RAX JNZ 0x001dd0e3 LAB_001dd094: CMP dword ptr [R14 + 0x4],0x0 JNZ 0x001dd0db LEA RDX,[0x26be93] MOV R15,RSP MOV RDI,R15 MOV ESI,0x3 MOV ECX,0x201f CALL 0x001857c2 LAB_001dd0b7: LEA RSI,[0x26e30f] MOV RDI,R15 CALL 0x001852c0 LAB_001dd0c6: LEA RDI,[RSP + 0x58] MOV RSI,RAX CALL 0x0018539a LAB_001dd0d3: MOV RDI,RSP CALL 0x001857e0 LAB_001dd0db: MOV RAX,qword ptr [R14 + 0x28] MOV qword ptr [RBX + 0x40],RAX LAB_001dd0e3: ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* google::protobuf::FieldDescriptor::InternalTypeOnceInit() const */ void __thiscall google::protobuf::FieldDescriptor::InternalTypeOnceInit(FieldDescriptor *this) { long lVar1; ulong uVar2; LogMessage *pLVar3; size_t sVar4; char *pcVar5; long lVar6; long *plVar7; long *plVar8; char *pcVar9; int1 *local_c8; ulong local_c0; int1 local_b8 [40]; long *local_90; long local_88; long local_80; long lStack_78; long *local_70; long local_68; long local_60; long lStack_58; int1 *local_50 [2]; int1 local_40 [16]; lVar6 = *(long *)(this + 0x10); if (*(char *)(lVar6 + 2) == '\0') { internal::LogMessage::LogMessage ((LogMessage *)&local_c8,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc" ,0x1ffc); /* try { // try from 001dce55 to 001dce63 has its CatchHandler @ 001dd141 */ pLVar3 = (LogMessage *) internal::LogMessage::operator<< ((LogMessage *)&local_c8,"CHECK failed: file()->finished_building_ == true: " ); /* try { // try from 001dce64 to 001dce70 has its CatchHandler @ 001dd13f */ internal::LogFinisher::operator=((LogFinisher *)&local_70,pLVar3); internal::LogMessage::~LogMessage((LogMessage *)&local_c8); lVar6 = *(long *)(this + 0x10); } lVar1 = *(long *)(this + 0x18); pcVar5 = (char *)(lVar1 + 4); sVar4 = strlen(pcVar5); pcVar5 = (char *)DescriptorPool::CrossLinkOnDemandHelper (*(DescriptorPool **)(lVar6 + 0x18),pcVar5,sVar4,0); if (*pcVar5 == '\x04') { pcVar9 = (char *)(sVar4 + lVar1 + 5); this[2] = (FieldDescriptor)0xe; *(char **)(this + 0x30) = pcVar5; if (*pcVar9 == '\0') { *(int8 *)(this + 0x40) = 0; } else { lVar6 = *(long *)(*(long *)(pcVar5 + 8) + 0x20); local_c8 = local_b8; std::__cxx11::string::_M_construct<char*> (&local_c8,lVar6,*(long *)(*(long *)(pcVar5 + 8) + 0x28) + lVar6); lVar6 = std::__cxx11::string::rfind((char)&local_c8,0x2e); uVar2 = local_c0; if (lVar6 == -1) { sVar4 = strlen(pcVar9); /* try { // try from 001dcf81 to 001dcf93 has its CatchHandler @ 001dd0f9 */ std::__cxx11::string::_M_replace((string *)&local_c8,0,uVar2,pcVar9,sVar4); } else { /* try { // try from 001dcf19 to 001dcf2a has its CatchHandler @ 001dd12a */ std::__cxx11::string::substr((ulong)local_50,(ulong)&local_c8); /* try { // try from 001dcf2b to 001dcf3b has its CatchHandler @ 001dd10f */ plVar7 = (long *)std::__cxx11::string::append((string *)local_50,"."); plVar8 = plVar7 + 2; if ((long *)*plVar7 == plVar8) { local_80 = *plVar8; lStack_78 = plVar7[3]; local_90 = &local_80; } else { local_80 = *plVar8; local_90 = (long *)*plVar7; } local_88 = plVar7[1]; *plVar7 = (long)plVar8; plVar7[1] = 0; *(int1 *)(plVar7 + 2) = 0; /* try { // try from 001dcfbd to 001dcfc4 has its CatchHandler @ 001dd0fb */ plVar7 = (long *)std::__cxx11::string::append((string *)&local_90,pcVar9); plVar8 = plVar7 + 2; if ((long *)*plVar7 == plVar8) { local_60 = *plVar8; lStack_58 = plVar7[3]; local_70 = &local_60; } else { local_60 = *plVar8; local_70 = (long *)*plVar7; } local_68 = plVar7[1]; *plVar7 = (long)plVar8; plVar7[1] = 0; *(int1 *)(plVar7 + 2) = 0; std::__cxx11::string::operator=((string *)&local_c8,(string *)&local_70); if (local_70 != &local_60) { operator_delete(local_70); } if (local_90 != &local_80) { operator_delete(local_90); } if (local_50[0] != local_40) { operator_delete(local_50[0]); } } /* try { // try from 001dd05e to 001dd064 has its CatchHandler @ 001dd12c */ pcVar9 = (char *)DescriptorPool::CrossLinkOnDemandHelper (*(DescriptorPool **)(*(long *)(this + 0x10) + 0x18),local_c8, local_c0,0); if (*pcVar9 != '\x05') { if (*pcVar9 == '\x06') { pcVar9 = pcVar9 + -1; } else { pcVar9 = (char *)0x0; } } *(char **)(this + 0x40) = pcVar9; if (local_c8 != local_b8) { operator_delete(local_c8); pcVar9 = *(char **)(this + 0x40); } if (pcVar9 != (char *)0x0) { return; } } if (*(int *)(pcVar5 + 4) == 0) { internal::LogMessage::LogMessage ((LogMessage *)&local_c8,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc" ,0x201f); /* try { // try from 001dd0b7 to 001dd0c5 has its CatchHandler @ 001dd0f7 */ pLVar3 = (LogMessage *) internal::LogMessage::operator<< ((LogMessage *)&local_c8,"CHECK failed: enum_type->value_count(): "); /* try { // try from 001dd0c6 to 001dd0d2 has its CatchHandler @ 001dd0f5 */ internal::LogFinisher::operator=((LogFinisher *)&local_70,pLVar3); internal::LogMessage::~LogMessage((LogMessage *)&local_c8); } *(int8 *)(this + 0x40) = *(int8 *)(pcVar5 + 0x28); } else if (*pcVar5 == '\x01') { this[2] = (FieldDescriptor)0xb; *(char **)(this + 0x30) = pcVar5; } return; }
13,291
my_realloc
eloqsql/mysys/my_malloc.c
void *my_realloc(PSI_memory_key key, void *old_point, size_t size, myf my_flags) { my_memory_header *old_mh, *mh; void *point; size_t old_size; my_bool old_flags; DBUG_ENTER("my_realloc"); DBUG_PRINT("my",("ptr: %p size: %zu flags: %lu", old_point, size, my_flags)); DBUG_ASSERT(size > 0); if (!old_point && (my_flags & MY_ALLOW_ZERO_PTR)) DBUG_RETURN(my_malloc(key, size, my_flags)); old_mh= USER_TO_HEADER(old_point); old_size= old_mh->m_size & ~1; old_flags= old_mh->m_size & 1; DBUG_ASSERT(old_mh->m_key == key || old_mh->m_key == PSI_NOT_INSTRUMENTED); DBUG_ASSERT(old_flags == MY_TEST(my_flags & MY_THREAD_SPECIFIC)); size= ALIGN_SIZE(size); mh= sf_realloc(old_mh, size + HEADER_SIZE, my_flags); if (mh == NULL) { if (size < old_size) DBUG_RETURN(old_point); my_errno=errno; if (my_flags & MY_FREE_ON_ERROR) { /* my_free will take care of size accounting */ my_free(old_point); old_point= 0; } if (my_flags & (MY_FAE+MY_WME)) my_error(EE_OUTOFMEMORY, MYF(ME_BELL + ME_FATAL), size); point= NULL; } else { mh->m_size= size | old_flags; mh->m_key= PSI_CALL_memory_realloc(key, old_size, size, & mh->m_owner); update_malloc_size((longlong)size - (longlong)old_size, old_flags); point= HEADER_TO_USER(mh); } DBUG_PRINT("exit",("ptr: %p", point)); DBUG_RETURN(point); }
O0
c
my_realloc: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl %edi, -0xc(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) jmp 0x80739 jmp 0x8073b jmp 0x8073d cmpq $0x0, -0x18(%rbp) jne 0x8076d movq -0x28(%rbp), %rax andq $0x40, %rax cmpq $0x0, %rax je 0x8076d jmp 0x80754 movl -0xc(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x80550 movq %rax, -0x8(%rbp) jmp 0x808b7 movq -0x18(%rbp), %rax addq $-0x18, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq 0x8(%rax), %rax andq $-0x2, %rax movq %rax, -0x48(%rbp) movq -0x30(%rbp), %rax movq 0x8(%rax), %rax andq $0x1, %rax movb %al, -0x49(%rbp) jmp 0x8079a jmp 0x8079c jmp 0x8079e movq -0x20(%rbp), %rax addq $0x8, %rax subq $0x1, %rax andq $-0x8, %rax movq %rax, -0x20(%rbp) movq -0x30(%rbp), %rdi movq -0x20(%rbp), %rsi addq $0x18, %rsi callq 0x285d0 movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) jne 0x80849 movq -0x20(%rbp), %rax cmpq -0x48(%rbp), %rax jae 0x807e7 jmp 0x807da movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x808b7 callq 0x28040 movl (%rax), %eax movl %eax, -0x50(%rbp) callq 0x82cc0 movl -0x50(%rbp), %ecx movl %ecx, (%rax) movq -0x28(%rbp), %rax andq $0x80, %rax cmpq $0x0, %rax je 0x8081c movq -0x18(%rbp), %rdi callq 0x808d0 movq $0x0, -0x18(%rbp) movq -0x28(%rbp), %rax andq $0x18, %rax cmpq $0x0, %rax je 0x8083f movq -0x20(%rbp), %rdx movl $0x5, %edi movl $0x1004, %esi # imm = 0x1004 movb $0x0, %al callq 0x7c950 movq $0x0, -0x40(%rbp) jmp 0x808a9 movq -0x20(%rbp), %rcx movsbq -0x49(%rbp), %rax orq %rax, %rcx movq -0x38(%rbp), %rax movq %rcx, 0x8(%rax) leaq 0x1b8c3c(%rip), %rax # 0x2394a0 movq (%rax), %rax movq 0x3e8(%rax), %rax movl -0xc(%rbp), %edi movq -0x48(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x38(%rbp), %rcx callq *%rax movl %eax, %ecx movq -0x38(%rbp), %rax movl %ecx, 0x10(%rax) movq 0x1b86f1(%rip), %rax # 0x238f80 movq -0x20(%rbp), %rdi subq -0x48(%rbp), %rdi movsbl -0x49(%rbp), %esi callq *%rax movq -0x38(%rbp), %rax addq $0x18, %rax movq %rax, -0x40(%rbp) jmp 0x808ab jmp 0x808ad jmp 0x808af movq -0x40(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_realloc: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_C], edi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx jmp short $+2 loc_80739: jmp short $+2 loc_8073B: jmp short $+2 loc_8073D: cmp [rbp+var_18], 0 jnz short loc_8076D mov rax, [rbp+var_28] and rax, 40h cmp rax, 0 jz short loc_8076D jmp short $+2 loc_80754: mov edi, [rbp+var_C] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] call my_malloc mov [rbp+var_8], rax jmp loc_808B7 loc_8076D: mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFE8h mov [rbp+var_30], rax mov rax, [rbp+var_30] mov rax, [rax+8] and rax, 0FFFFFFFFFFFFFFFEh mov [rbp+var_48], rax mov rax, [rbp+var_30] mov rax, [rax+8] and rax, 1 mov [rbp+var_49], al jmp short $+2 loc_8079A: jmp short $+2 loc_8079C: jmp short $+2 loc_8079E: mov rax, [rbp+var_20] add rax, 8 sub rax, 1 and rax, 0FFFFFFFFFFFFFFF8h mov [rbp+var_20], rax mov rdi, [rbp+var_30] mov rsi, [rbp+var_20] add rsi, 18h call _realloc mov [rbp+var_38], rax cmp [rbp+var_38], 0 jnz short loc_80849 mov rax, [rbp+var_20] cmp rax, [rbp+var_48] jnb short loc_807E7 jmp short $+2 loc_807DA: mov rax, [rbp+var_18] mov [rbp+var_8], rax jmp loc_808B7 loc_807E7: call ___errno_location mov eax, [rax] mov [rbp+var_50], eax call _my_thread_var mov ecx, [rbp+var_50] mov [rax], ecx mov rax, [rbp+var_28] and rax, 80h cmp rax, 0 jz short loc_8081C mov rdi, [rbp+var_18] call my_free mov [rbp+var_18], 0 loc_8081C: mov rax, [rbp+var_28] and rax, 18h cmp rax, 0 jz short loc_8083F mov rdx, [rbp+var_20] mov edi, 5 mov esi, 1004h mov al, 0 call my_error loc_8083F: mov [rbp+var_40], 0 jmp short loc_808A9 loc_80849: mov rcx, [rbp+var_20] movsx rax, [rbp+var_49] or rcx, rax mov rax, [rbp+var_38] mov [rax+8], rcx lea rax, PSI_server mov rax, [rax] mov rax, [rax+3E8h] mov edi, [rbp+var_C] mov rsi, [rbp+var_48] mov rdx, [rbp+var_20] mov rcx, [rbp+var_38] call rax mov ecx, eax mov rax, [rbp+var_38] mov [rax+10h], ecx mov rax, cs:update_malloc_size mov rdi, [rbp+var_20] sub rdi, [rbp+var_48] movsx esi, [rbp+var_49] call rax ; dummy mov rax, [rbp+var_38] add rax, 18h mov [rbp+var_40], rax loc_808A9: jmp short $+2 loc_808AB: jmp short $+2 loc_808AD: jmp short $+2 loc_808AF: mov rax, [rbp+var_40] mov [rbp+var_8], rax loc_808B7: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
long long my_realloc(unsigned int a1, long long a2, const char *a3, char a4) { int v5; // [rsp+0h] [rbp-50h] char v6; // [rsp+7h] [rbp-49h] unsigned long long v7; // [rsp+8h] [rbp-48h] long long v9; // [rsp+18h] [rbp-38h] unsigned long long v11; // [rsp+30h] [rbp-20h] if ( a2 || (a4 & 0x40) == 0 ) { v7 = *(_QWORD *)(a2 - 24 + 8) & 0xFFFFFFFFFFFFFFFELL; v6 = *(_BYTE *)(a2 - 24 + 8) & 1; v11 = (unsigned long long)(a3 + 7) & 0xFFFFFFFFFFFFFFF8LL; v9 = realloc(a2 - 24, v11 + 24); if ( v9 ) { *(_QWORD *)(v9 + 8) = v6 | v11; *(_DWORD *)(v9 + 16) = ((long long ( *)(_QWORD, unsigned long long, unsigned long long, long long))PSI_server[125])( a1, v7, v11, v9); update_malloc_size(v11 - v7, v6); return v9 + 24; } else { if ( v11 < v7 ) return a2; v5 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var(a2 - 24, (const char *)(v11 + 24)) = v5; if ( a4 < 0 ) my_free(a2); if ( (a4 & 0x18) != 0 ) my_error(5u, 4100LL, v11); return 0LL; } } return my_malloc(a1, a3, a4); }
my_realloc: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV dword ptr [RBP + -0xc],EDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX JMP 0x00180739 LAB_00180739: JMP 0x0018073b LAB_0018073b: JMP 0x0018073d LAB_0018073d: CMP qword ptr [RBP + -0x18],0x0 JNZ 0x0018076d MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x40 CMP RAX,0x0 JZ 0x0018076d JMP 0x00180754 LAB_00180754: MOV EDI,dword ptr [RBP + -0xc] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] CALL 0x00180550 MOV qword ptr [RBP + -0x8],RAX JMP 0x001808b7 LAB_0018076d: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x18 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] AND RAX,-0x2 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] AND RAX,0x1 MOV byte ptr [RBP + -0x49],AL JMP 0x0018079a LAB_0018079a: JMP 0x0018079c LAB_0018079c: JMP 0x0018079e LAB_0018079e: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x8 SUB RAX,0x1 AND RAX,-0x8 MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x20] ADD RSI,0x18 CALL 0x001285d0 MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],0x0 JNZ 0x00180849 MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x48] JNC 0x001807e7 JMP 0x001807da LAB_001807da: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX JMP 0x001808b7 LAB_001807e7: CALL 0x00128040 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x50],EAX CALL 0x00182cc0 MOV ECX,dword ptr [RBP + -0x50] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x80 CMP RAX,0x0 JZ 0x0018081c MOV RDI,qword ptr [RBP + -0x18] CALL 0x001808d0 MOV qword ptr [RBP + -0x18],0x0 LAB_0018081c: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x18 CMP RAX,0x0 JZ 0x0018083f MOV RDX,qword ptr [RBP + -0x20] MOV EDI,0x5 MOV ESI,0x1004 MOV AL,0x0 CALL 0x0017c950 LAB_0018083f: MOV qword ptr [RBP + -0x40],0x0 JMP 0x001808a9 LAB_00180849: MOV RCX,qword ptr [RBP + -0x20] MOVSX RAX,byte ptr [RBP + -0x49] OR RCX,RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x8],RCX LEA RAX,[0x3394a0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x3e8] MOV EDI,dword ptr [RBP + -0xc] MOV RSI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x38] CALL RAX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [0x00338f80] MOV RDI,qword ptr [RBP + -0x20] SUB RDI,qword ptr [RBP + -0x48] MOVSX ESI,byte ptr [RBP + -0x49] CALL RAX MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x18 MOV qword ptr [RBP + -0x40],RAX LAB_001808a9: JMP 0x001808ab LAB_001808ab: JMP 0x001808ad LAB_001808ad: JMP 0x001808af LAB_001808af: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x8],RAX LAB_001808b7: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
long my_realloc(int4 param_1,long param_2,long param_3,ulong param_4) { int iVar1; byte bVar2; int4 uVar3; ulong uVar4; ulong uVar5; void *pvVar6; int *piVar7; long local_48; long local_10; if ((param_2 == 0) && ((param_4 & 0x40) != 0)) { local_10 = my_malloc(param_1,param_3,param_4); } else { uVar4 = *(ulong *)(param_2 + -0x10) & 0xfffffffffffffffe; bVar2 = (byte)*(int8 *)(param_2 + -0x10) & 1; uVar5 = param_3 + 7U & 0xfffffffffffffff8; pvVar6 = realloc((void *)(param_2 + -0x18),uVar5 + 0x18); if (pvVar6 == (void *)0x0) { if (uVar5 < uVar4) { return param_2; } piVar7 = __errno_location(); iVar1 = *piVar7; piVar7 = (int *)_my_thread_var(); *piVar7 = iVar1; if ((param_4 & 0x80) != 0) { my_free(param_2); } if ((param_4 & 0x18) != 0) { my_error(5,0x1004,uVar5); } local_48 = 0; } else { *(ulong *)((long)pvVar6 + 8) = uVar5 | (long)(char)bVar2; uVar3 = (**(code **)(PSI_server + 1000))(param_1,uVar4,uVar5,pvVar6); *(int4 *)((long)pvVar6 + 0x10) = uVar3; (*(code *)update_malloc_size)(uVar5 - uVar4,bVar2); local_48 = (long)pvVar6 + 0x18; } local_10 = local_48; } return local_10; }
13,292
my_lengthsp_mb2
eloqsql/strings/ctype-ucs2.c
static size_t my_lengthsp_mb2(CHARSET_INFO *cs __attribute__((unused)), const char *ptr, size_t length) { const char *end= ptr + length; while (end > ptr + 1 && end[-1] == ' ' && end[-2] == '\0') end-= 2; return (size_t) (end - ptr); }
O0
c
my_lengthsp_mb2: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rdx addq $0x1, %rdx xorl %eax, %eax cmpq %rdx, %rcx movb %al, -0x21(%rbp) jbe 0x8e9a5 movq -0x20(%rbp), %rax movsbl -0x1(%rax), %ecx xorl %eax, %eax cmpl $0x20, %ecx movb %al, -0x21(%rbp) jne 0x8e9a5 movq -0x20(%rbp), %rax movsbl -0x2(%rax), %eax cmpl $0x0, %eax sete %al movb %al, -0x21(%rbp) movb -0x21(%rbp), %al testb $0x1, %al jne 0x8e9ae jmp 0x8e9bc movq -0x20(%rbp), %rax addq $-0x2, %rax movq %rax, -0x20(%rbp) jmp 0x8e96c movq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax popq %rbp retq nopl (%rax)
my_lengthsp_mb2: 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] add rax, [rbp+var_18] mov [rbp+var_20], rax loc_8E96C: mov rcx, [rbp+var_20] mov rdx, [rbp+var_10] add rdx, 1 xor eax, eax cmp rcx, rdx mov [rbp+var_21], al jbe short loc_8E9A5 mov rax, [rbp+var_20] movsx ecx, byte ptr [rax-1] xor eax, eax cmp ecx, 20h ; ' ' mov [rbp+var_21], al jnz short loc_8E9A5 mov rax, [rbp+var_20] movsx eax, byte ptr [rax-2] cmp eax, 0 setz al mov [rbp+var_21], al loc_8E9A5: mov al, [rbp+var_21] test al, 1 jnz short loc_8E9AE jmp short loc_8E9BC loc_8E9AE: mov rax, [rbp+var_20] add rax, 0FFFFFFFFFFFFFFFEh mov [rbp+var_20], rax jmp short loc_8E96C loc_8E9BC: mov rax, [rbp+var_20] mov rcx, [rbp+var_10] sub rax, rcx pop rbp retn
long long my_lengthsp_mb2(long long a1, long long a2, long long a3) { bool v4; // [rsp+1h] [rbp-21h] unsigned long long i; // [rsp+2h] [rbp-20h] for ( i = a3 + a2; ; i -= 2LL ) { v4 = 0; if ( i > a2 + 1 ) { v4 = 0; if ( *(_BYTE *)(i - 1) == 32 ) v4 = *(_BYTE *)(i - 2) == 0; } if ( !v4 ) break; } return i - a2; }
my_lengthsp_mb2: 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] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX LAB_0018e96c: MOV RCX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x10] ADD RDX,0x1 XOR EAX,EAX CMP RCX,RDX MOV byte ptr [RBP + -0x21],AL JBE 0x0018e9a5 MOV RAX,qword ptr [RBP + -0x20] MOVSX ECX,byte ptr [RAX + -0x1] XOR EAX,EAX CMP ECX,0x20 MOV byte ptr [RBP + -0x21],AL JNZ 0x0018e9a5 MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,byte ptr [RAX + -0x2] CMP EAX,0x0 SETZ AL MOV byte ptr [RBP + -0x21],AL LAB_0018e9a5: MOV AL,byte ptr [RBP + -0x21] TEST AL,0x1 JNZ 0x0018e9ae JMP 0x0018e9bc LAB_0018e9ae: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,-0x2 MOV qword ptr [RBP + -0x20],RAX JMP 0x0018e96c LAB_0018e9bc: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,RCX POP RBP RET
long my_lengthsp_mb2(int8 param_1,long param_2,long param_3) { bool bVar1; int8 local_28; local_28 = param_2 + param_3; while( true ) { bVar1 = false; if ((param_2 + 1U < local_28) && (bVar1 = false, *(char *)(local_28 - 1) == ' ')) { bVar1 = *(char *)(local_28 - 2) == '\0'; } if (!bVar1) break; local_28 = local_28 - 2; } return local_28 - param_2; }
13,293
ma_zlib_decompress
eloqsql/libmariadb/plugins/compress/c_zlib.c
my_bool ma_zlib_decompress(ma_compress_ctx *ctx, void *dst, size_t *dst_len, void *source, size_t *source_len) { int rc; if (!ctx) return 1; rc= uncompress((Bytef*) dst, (uLongf *)dst_len, (Bytef*) source, (uLongf)*source_len); if (rc != Z_OK) return 1; return 0; }
O3
c
ma_zlib_decompress: testq %rdi, %rdi je 0x2e892 pushq %rbp movq %rsp, %rbp movq (%r8), %rax movq %rsi, %rdi movq %rdx, %rsi movq %rcx, %rdx movq %rax, %rcx callq 0x131b0 testl %eax, %eax setne %al popq %rbp retq movb $0x1, %al retq
ma_zlib_decompress: test rdi, rdi jz short loc_2E892 push rbp mov rbp, rsp mov rax, [r8] mov rdi, rsi mov rsi, rdx mov rdx, rcx mov rcx, rax call _uncompress test eax, eax setnz al pop rbp retn loc_2E892: mov al, 1 retn
bool ma_zlib_decompress(long long a1, long long a2, long long a3, long long a4, _QWORD *a5) { return !a1 || (unsigned int)uncompress(a2, a3, a4, *a5) != 0; }
ma_zlib_decompress: TEST RDI,RDI JZ 0x0012e892 PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [R8] MOV RDI,RSI MOV RSI,RDX MOV RDX,RCX MOV RCX,RAX CALL 0x001131b0 TEST EAX,EAX SETNZ AL POP RBP RET LAB_0012e892: MOV AL,0x1 RET
bool ma_zlib_decompress(long param_1,int8 param_2,int8 param_3,int8 param_4, int8 *param_5) { int iVar1; if (param_1 != 0) { iVar1 = uncompress(param_2,param_3,param_4,*param_5); return iVar1 != 0; } return true; }
13,294
quantize_row_q5_1_ref
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
void quantize_row_q5_1_ref(const float * restrict x, block_q5_1 * restrict y, int64_t k) { const int qk = QK5_1; assert(k % qk == 0); const int nb = k / qk; for (int i = 0; i < nb; i++) { float min = FLT_MAX; float max = -FLT_MAX; for (int j = 0; j < qk; j++) { const float v = x[i*qk + j]; if (v < min) min = v; if (v > max) max = v; } const float d = (max - min) / ((1 << 5) - 1); const float id = d ? 1.0f/d : 0.0f; y[i].d = GGML_FP32_TO_FP16(d); y[i].m = GGML_FP32_TO_FP16(min); uint32_t qh = 0; for (int j = 0; j < qk/2; ++j) { const float x0 = (x[i*qk + 0 + j] - min)*id; const float x1 = (x[i*qk + qk/2 + j] - min)*id; const uint8_t xi0 = (uint8_t)(x0 + 0.5f); const uint8_t xi1 = (uint8_t)(x1 + 0.5f); y[i].qs[j] = (xi0 & 0x0F) | ((xi1 & 0x0F) << 4); // get the 5-th bit and store it in qh at the right position qh |= ((xi0 & 0x10u) >> 4) << (j + 0); qh |= ((xi1 & 0x10u) >> 4) << (j + qk/2); } memcpy(&y[i].qh, &qh, sizeof(y[i].qh)); } }
O0
c
quantize_row_q5_1_ref: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl $0x20, -0x1c(%rbp) movq -0x18(%rbp), %rax movl $0x20, %ecx cqto idivq %rcx cmpq $0x0, %rdx jne 0x6de81 jmp 0x6dea0 leaq 0x52ec8(%rip), %rdi # 0xc0d50 leaq 0x52ecd(%rip), %rsi # 0xc0d5c movl $0x98, %edx leaq 0x5300d(%rip), %rcx # 0xc0ea8 callq 0x44810 movq -0x18(%rbp), %rax movl $0x20, %ecx cqto idivq %rcx movl %eax, -0x20(%rbp) movl $0x0, -0x24(%rbp) movl -0x24(%rbp), %eax cmpl -0x20(%rbp), %eax jge 0x6e102 movss 0x48464(%rip), %xmm0 # 0xb6330 movss %xmm0, -0x28(%rbp) movss 0x48453(%rip), %xmm0 # 0xb632c movss %xmm0, -0x2c(%rbp) movl $0x0, -0x30(%rbp) cmpl $0x20, -0x30(%rbp) jge 0x6df40 movq -0x8(%rbp), %rax movl -0x24(%rbp), %ecx shll $0x5, %ecx addl -0x30(%rbp), %ecx movslq %ecx, %rcx movss (%rax,%rcx,4), %xmm0 movss %xmm0, -0x34(%rbp) movss -0x34(%rbp), %xmm1 movss -0x28(%rbp), %xmm0 ucomiss %xmm1, %xmm0 jbe 0x6df1e movss -0x34(%rbp), %xmm0 movss %xmm0, -0x28(%rbp) movss -0x34(%rbp), %xmm0 ucomiss -0x2c(%rbp), %xmm0 jbe 0x6df33 movss -0x34(%rbp), %xmm0 movss %xmm0, -0x2c(%rbp) jmp 0x6df35 movl -0x30(%rbp), %eax addl $0x1, %eax movl %eax, -0x30(%rbp) jmp 0x6dee5 movss -0x2c(%rbp), %xmm0 subss -0x28(%rbp), %xmm0 movss 0x483ee(%rip), %xmm1 # 0xb6340 divss %xmm1, %xmm0 movss %xmm0, -0x38(%rbp) movss -0x38(%rbp), %xmm0 xorps %xmm1, %xmm1 ucomiss %xmm1, %xmm0 jne 0x6df6c jp 0x6df6c jmp 0x6df80 movss 0x434b4(%rip), %xmm0 # 0xb1428 divss -0x38(%rbp), %xmm0 movss %xmm0, -0x54(%rbp) jmp 0x6df8a xorps %xmm0, %xmm0 movss %xmm0, -0x54(%rbp) jmp 0x6df8a movss -0x54(%rbp), %xmm0 movss %xmm0, -0x3c(%rbp) movss -0x38(%rbp), %xmm0 callq 0x6d750 movw %ax, %cx movq -0x10(%rbp), %rax movslq -0x24(%rbp), %rdx imulq $0x18, %rdx, %rdx addq %rdx, %rax movw %cx, (%rax) movss -0x28(%rbp), %xmm0 callq 0x6d750 movw %ax, %cx movq -0x10(%rbp), %rax movslq -0x24(%rbp), %rdx imulq $0x18, %rdx, %rdx addq %rdx, %rax movw %cx, 0x2(%rax) movl $0x0, -0x40(%rbp) movl $0x0, -0x44(%rbp) cmpl $0x10, -0x44(%rbp) jge 0x6e0df movq -0x8(%rbp), %rax movl -0x24(%rbp), %ecx shll $0x5, %ecx movl -0x44(%rbp), %edx addl %edx, %ecx movslq %ecx, %rcx movss (%rax,%rcx,4), %xmm0 movss -0x28(%rbp), %xmm1 subss %xmm1, %xmm0 movss -0x3c(%rbp), %xmm1 mulss %xmm1, %xmm0 movss %xmm0, -0x48(%rbp) movq -0x8(%rbp), %rax movl -0x24(%rbp), %esi shll $0x5, %esi movl -0x44(%rbp), %ecx movl %ecx, %edx movl %esi, %ecx leal 0x10(%rcx,%rdx), %ecx movslq %ecx, %rcx movss (%rax,%rcx,4), %xmm0 movss -0x28(%rbp), %xmm1 subss %xmm1, %xmm0 movss -0x3c(%rbp), %xmm1 mulss %xmm1, %xmm0 movss %xmm0, -0x4c(%rbp) movss -0x48(%rbp), %xmm0 movss 0x433c6(%rip), %xmm1 # 0xb1420 addss %xmm1, %xmm0 cvttss2si %xmm0, %eax movb %al, -0x4d(%rbp) movss -0x4c(%rbp), %xmm0 addss %xmm1, %xmm0 cvttss2si %xmm0, %eax movb %al, -0x4e(%rbp) movzbl -0x4d(%rbp), %eax andl $0xf, %eax movzbl -0x4e(%rbp), %ecx andl $0xf, %ecx shll $0x4, %ecx orl %ecx, %eax movb %al, %dl movq -0x10(%rbp), %rax movslq -0x24(%rbp), %rcx imulq $0x18, %rcx, %rcx addq %rcx, %rax movslq -0x44(%rbp), %rcx movb %dl, 0x8(%rax,%rcx) movzbl -0x4d(%rbp), %eax andl $0x10, %eax shrl $0x4, %eax movl -0x44(%rbp), %ecx addl $0x0, %ecx shll %cl, %eax orl -0x40(%rbp), %eax movl %eax, -0x40(%rbp) movzbl -0x4e(%rbp), %eax andl $0x10, %eax shrl $0x4, %eax movl -0x44(%rbp), %ecx addl $0x10, %ecx shll %cl, %eax orl -0x40(%rbp), %eax movl %eax, -0x40(%rbp) movl -0x44(%rbp), %eax addl $0x1, %eax movl %eax, -0x44(%rbp) jmp 0x6dfe1 movq -0x10(%rbp), %rax movslq -0x24(%rbp), %rcx imulq $0x18, %rcx, %rcx addq %rcx, %rax movl -0x40(%rbp), %ecx movl %ecx, 0x4(%rax) movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0x6deb8 addq $0x60, %rsp popq %rbp retq nopl (%rax,%rax)
quantize_row_q5_1_ref: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], 20h ; ' ' mov rax, [rbp+var_18] mov ecx, 20h ; ' ' cqo idiv rcx cmp rdx, 0 jnz short loc_6DE81 jmp short loc_6DEA0 loc_6DE81: lea rdi, aKQk0; "k % qk == 0" lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"... mov edx, 98h lea rcx, aVoidQuantizeRo_2; "void quantize_row_q5_1_ref(const float "... call ___assert_fail loc_6DEA0: mov rax, [rbp+var_18] mov ecx, 20h ; ' ' cqo idiv rcx mov [rbp+var_20], eax mov [rbp+var_24], 0 loc_6DEB8: mov eax, [rbp+var_24] cmp eax, [rbp+var_20] jge loc_6E102 movss xmm0, cs:dword_B6330 movss [rbp+var_28], xmm0 movss xmm0, cs:dword_B632C movss [rbp+var_2C], xmm0 mov [rbp+var_30], 0 loc_6DEE5: cmp [rbp+var_30], 20h ; ' ' jge short loc_6DF40 mov rax, [rbp+var_8] mov ecx, [rbp+var_24] shl ecx, 5 add ecx, [rbp+var_30] movsxd rcx, ecx movss xmm0, dword ptr [rax+rcx*4] movss [rbp+var_34], xmm0 movss xmm1, [rbp+var_34] movss xmm0, [rbp+var_28] ucomiss xmm0, xmm1 jbe short loc_6DF1E movss xmm0, [rbp+var_34] movss [rbp+var_28], xmm0 loc_6DF1E: movss xmm0, [rbp+var_34] ucomiss xmm0, [rbp+var_2C] jbe short loc_6DF33 movss xmm0, [rbp+var_34] movss [rbp+var_2C], xmm0 loc_6DF33: jmp short $+2 loc_6DF35: mov eax, [rbp+var_30] add eax, 1 mov [rbp+var_30], eax jmp short loc_6DEE5 loc_6DF40: movss xmm0, [rbp+var_2C] subss xmm0, [rbp+var_28] movss xmm1, cs:dword_B6340 divss xmm0, xmm1 movss [rbp+var_38], xmm0 movss xmm0, [rbp+var_38] xorps xmm1, xmm1 ucomiss xmm0, xmm1 jnz short loc_6DF6C jp short loc_6DF6C jmp short loc_6DF80 loc_6DF6C: movss xmm0, cs:dword_B1428 divss xmm0, [rbp+var_38] movss [rbp+var_54], xmm0 jmp short loc_6DF8A loc_6DF80: xorps xmm0, xmm0 movss [rbp+var_54], xmm0 jmp short $+2 loc_6DF8A: movss xmm0, [rbp+var_54] movss [rbp+var_3C], xmm0 movss xmm0, [rbp+var_38] call ggml_compute_fp32_to_fp16_0 mov cx, ax mov rax, [rbp+var_10] movsxd rdx, [rbp+var_24] imul rdx, 18h add rax, rdx mov [rax], cx movss xmm0, [rbp+var_28] call ggml_compute_fp32_to_fp16_0 mov cx, ax mov rax, [rbp+var_10] movsxd rdx, [rbp+var_24] imul rdx, 18h add rax, rdx mov [rax+2], cx mov [rbp+var_40], 0 mov [rbp+var_44], 0 loc_6DFE1: cmp [rbp+var_44], 10h jge loc_6E0DF mov rax, [rbp+var_8] mov ecx, [rbp+var_24] shl ecx, 5 mov edx, [rbp+var_44] add ecx, edx movsxd rcx, ecx movss xmm0, dword ptr [rax+rcx*4] movss xmm1, [rbp+var_28] subss xmm0, xmm1 movss xmm1, [rbp+var_3C] mulss xmm0, xmm1 movss [rbp+var_48], xmm0 mov rax, [rbp+var_8] mov esi, [rbp+var_24] shl esi, 5 mov ecx, [rbp+var_44] mov edx, ecx mov ecx, esi lea ecx, [rcx+rdx+10h] movsxd rcx, ecx movss xmm0, dword ptr [rax+rcx*4] movss xmm1, [rbp+var_28] subss xmm0, xmm1 movss xmm1, [rbp+var_3C] mulss xmm0, xmm1 movss [rbp+var_4C], xmm0 movss xmm0, [rbp+var_48] movss xmm1, cs:dword_B1420 addss xmm0, xmm1 cvttss2si eax, xmm0 mov [rbp+var_4D], al movss xmm0, [rbp+var_4C] addss xmm0, xmm1 cvttss2si eax, xmm0 mov [rbp+var_4E], al movzx eax, [rbp+var_4D] and eax, 0Fh movzx ecx, [rbp+var_4E] and ecx, 0Fh shl ecx, 4 or eax, ecx mov dl, al mov rax, [rbp+var_10] movsxd rcx, [rbp+var_24] imul rcx, 18h add rax, rcx movsxd rcx, [rbp+var_44] mov [rax+rcx+8], dl movzx eax, [rbp+var_4D] and eax, 10h shr eax, 4 mov ecx, [rbp+var_44] add ecx, 0 shl eax, cl or eax, [rbp+var_40] mov [rbp+var_40], eax movzx eax, [rbp+var_4E] and eax, 10h shr eax, 4 mov ecx, [rbp+var_44] add ecx, 10h shl eax, cl or eax, [rbp+var_40] mov [rbp+var_40], eax mov eax, [rbp+var_44] add eax, 1 mov [rbp+var_44], eax jmp loc_6DFE1 loc_6E0DF: mov rax, [rbp+var_10] movsxd rcx, [rbp+var_24] imul rcx, 18h add rax, rcx mov ecx, [rbp+var_40] mov [rax+4], ecx mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp loc_6DEB8 loc_6E102: add rsp, 60h pop rbp retn
long long quantize_row_q5_1_ref(long long a1, long long a2, long long a3) { long long result; // rax float v4; // [rsp+Ch] [rbp-54h] float v5; // [rsp+14h] [rbp-4Ch] float v6; // [rsp+18h] [rbp-48h] int k; // [rsp+1Ch] [rbp-44h] int v8; // [rsp+20h] [rbp-40h] float v9; // [rsp+28h] [rbp-38h] float v10; // [rsp+2Ch] [rbp-34h] int j; // [rsp+30h] [rbp-30h] float v12; // [rsp+34h] [rbp-2Ch] float v13; // [rsp+38h] [rbp-28h] int i; // [rsp+3Ch] [rbp-24h] if ( a3 % 32 ) __assert_fail( "k % qk == 0", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c", 152LL, "void quantize_row_q5_1_ref(const float *restrict, block_q5_1 *restrict, int64_t)"); for ( i = 0; ; ++i ) { result = (unsigned int)i; if ( i >= (int)(a3 / 32) ) break; v13 = 3.4028235e38; v12 = -3.4028235e38; for ( j = 0; j < 32; ++j ) { v10 = *(float *)(a1 + 4LL * (j + 32 * i)); if ( v13 > v10 ) v13 = *(float *)(a1 + 4LL * (j + 32 * i)); if ( v10 > v12 ) v12 = *(float *)(a1 + 4LL * (j + 32 * i)); } v9 = (float)(v12 - v13) / 31.0; if ( v9 == 0.0 ) v4 = 0.0; else v4 = 1.0 / v9; *(_WORD *)(24LL * i + a2) = ggml_compute_fp32_to_fp16_0(v9); *(_WORD *)(24LL * i + a2 + 2) = ggml_compute_fp32_to_fp16_0(v13); v8 = 0; for ( k = 0; k < 16; ++k ) { v6 = (float)(*(float *)(a1 + 4LL * (k + 32 * i)) - v13) * v4; v5 = (float)(*(float *)(a1 + 4LL * (32 * i + k + 16)) - v13) * v4; *(_BYTE *)(24LL * i + a2 + k + 8) = (16 * ((int)(float)(v5 + 0.5) & 0xF)) | (int)(float)(v6 + 0.5) & 0xF; v8 |= (((int)(float)(v6 + 0.5) & 0x10u) >> 4 << k) | (((int)(float)(v5 + 0.5) & 0x10u) >> 4 << (k + 16)); } *(_DWORD *)(24LL * i + a2 + 4) = v8; } return result; }
quantize_row_q5_1_ref: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],0x20 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,0x20 CQO IDIV RCX CMP RDX,0x0 JNZ 0x0016de81 JMP 0x0016dea0 LAB_0016de81: LEA RDI,[0x1c0d50] LEA RSI,[0x1c0d5c] MOV EDX,0x98 LEA RCX,[0x1c0ea8] CALL 0x00144810 LAB_0016dea0: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,0x20 CQO IDIV RCX MOV dword ptr [RBP + -0x20],EAX MOV dword ptr [RBP + -0x24],0x0 LAB_0016deb8: MOV EAX,dword ptr [RBP + -0x24] CMP EAX,dword ptr [RBP + -0x20] JGE 0x0016e102 MOVSS XMM0,dword ptr [0x001b6330] MOVSS dword ptr [RBP + -0x28],XMM0 MOVSS XMM0,dword ptr [0x001b632c] MOVSS dword ptr [RBP + -0x2c],XMM0 MOV dword ptr [RBP + -0x30],0x0 LAB_0016dee5: CMP dword ptr [RBP + -0x30],0x20 JGE 0x0016df40 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x24] SHL ECX,0x5 ADD ECX,dword ptr [RBP + -0x30] MOVSXD RCX,ECX MOVSS XMM0,dword ptr [RAX + RCX*0x4] MOVSS dword ptr [RBP + -0x34],XMM0 MOVSS XMM1,dword ptr [RBP + -0x34] MOVSS XMM0,dword ptr [RBP + -0x28] UCOMISS XMM0,XMM1 JBE 0x0016df1e MOVSS XMM0,dword ptr [RBP + -0x34] MOVSS dword ptr [RBP + -0x28],XMM0 LAB_0016df1e: MOVSS XMM0,dword ptr [RBP + -0x34] UCOMISS XMM0,dword ptr [RBP + -0x2c] JBE 0x0016df33 MOVSS XMM0,dword ptr [RBP + -0x34] MOVSS dword ptr [RBP + -0x2c],XMM0 LAB_0016df33: JMP 0x0016df35 LAB_0016df35: MOV EAX,dword ptr [RBP + -0x30] ADD EAX,0x1 MOV dword ptr [RBP + -0x30],EAX JMP 0x0016dee5 LAB_0016df40: MOVSS XMM0,dword ptr [RBP + -0x2c] SUBSS XMM0,dword ptr [RBP + -0x28] MOVSS XMM1,dword ptr [0x001b6340] DIVSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x38],XMM0 MOVSS XMM0,dword ptr [RBP + -0x38] XORPS XMM1,XMM1 UCOMISS XMM0,XMM1 JNZ 0x0016df6c JP 0x0016df6c JMP 0x0016df80 LAB_0016df6c: MOVSS XMM0,dword ptr [0x001b1428] DIVSS XMM0,dword ptr [RBP + -0x38] MOVSS dword ptr [RBP + -0x54],XMM0 JMP 0x0016df8a LAB_0016df80: XORPS XMM0,XMM0 MOVSS dword ptr [RBP + -0x54],XMM0 JMP 0x0016df8a LAB_0016df8a: MOVSS XMM0,dword ptr [RBP + -0x54] MOVSS dword ptr [RBP + -0x3c],XMM0 MOVSS XMM0,dword ptr [RBP + -0x38] CALL 0x0016d750 MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOVSXD RDX,dword ptr [RBP + -0x24] IMUL RDX,RDX,0x18 ADD RAX,RDX MOV word ptr [RAX],CX MOVSS XMM0,dword ptr [RBP + -0x28] CALL 0x0016d750 MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOVSXD RDX,dword ptr [RBP + -0x24] IMUL RDX,RDX,0x18 ADD RAX,RDX MOV word ptr [RAX + 0x2],CX MOV dword ptr [RBP + -0x40],0x0 MOV dword ptr [RBP + -0x44],0x0 LAB_0016dfe1: CMP dword ptr [RBP + -0x44],0x10 JGE 0x0016e0df MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x24] SHL ECX,0x5 MOV EDX,dword ptr [RBP + -0x44] ADD ECX,EDX MOVSXD RCX,ECX MOVSS XMM0,dword ptr [RAX + RCX*0x4] MOVSS XMM1,dword ptr [RBP + -0x28] SUBSS XMM0,XMM1 MOVSS XMM1,dword ptr [RBP + -0x3c] MULSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x48],XMM0 MOV RAX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0x24] SHL ESI,0x5 MOV ECX,dword ptr [RBP + -0x44] MOV EDX,ECX MOV ECX,ESI LEA ECX,[RCX + RDX*0x1 + 0x10] MOVSXD RCX,ECX MOVSS XMM0,dword ptr [RAX + RCX*0x4] MOVSS XMM1,dword ptr [RBP + -0x28] SUBSS XMM0,XMM1 MOVSS XMM1,dword ptr [RBP + -0x3c] MULSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x4c],XMM0 MOVSS XMM0,dword ptr [RBP + -0x48] MOVSS XMM1,dword ptr [0x001b1420] ADDSS XMM0,XMM1 CVTTSS2SI EAX,XMM0 MOV byte ptr [RBP + -0x4d],AL MOVSS XMM0,dword ptr [RBP + -0x4c] ADDSS XMM0,XMM1 CVTTSS2SI EAX,XMM0 MOV byte ptr [RBP + -0x4e],AL MOVZX EAX,byte ptr [RBP + -0x4d] AND EAX,0xf MOVZX ECX,byte ptr [RBP + -0x4e] AND ECX,0xf SHL ECX,0x4 OR EAX,ECX MOV DL,AL MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x24] IMUL RCX,RCX,0x18 ADD RAX,RCX MOVSXD RCX,dword ptr [RBP + -0x44] MOV byte ptr [RAX + RCX*0x1 + 0x8],DL MOVZX EAX,byte ptr [RBP + -0x4d] AND EAX,0x10 SHR EAX,0x4 MOV ECX,dword ptr [RBP + -0x44] ADD ECX,0x0 SHL EAX,CL OR EAX,dword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x40],EAX MOVZX EAX,byte ptr [RBP + -0x4e] AND EAX,0x10 SHR EAX,0x4 MOV ECX,dword ptr [RBP + -0x44] ADD ECX,0x10 SHL EAX,CL OR EAX,dword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x40],EAX MOV EAX,dword ptr [RBP + -0x44] ADD EAX,0x1 MOV dword ptr [RBP + -0x44],EAX JMP 0x0016dfe1 LAB_0016e0df: MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x24] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV ECX,dword ptr [RBP + -0x40] MOV dword ptr [RAX + 0x4],ECX MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x0016deb8 LAB_0016e102: ADD RSP,0x60 POP RBP RET
void quantize_row_q5_1_ref(long param_1,long param_2,long param_3) { int2 uVar1; uint uVar2; uint uVar3; float fVar4; float local_5c; int local_4c; uint local_48; int local_38; float local_34; float local_30; int local_2c; if (param_3 % 0x20 == 0) { for (local_2c = 0; local_2c < (int)(param_3 / 0x20); local_2c = local_2c + 1) { local_30 = DAT_001b6330; local_34 = DAT_001b632c; for (local_38 = 0; local_38 < 0x20; local_38 = local_38 + 1) { fVar4 = *(float *)(param_1 + (long)(local_2c * 0x20 + local_38) * 4); if (fVar4 < local_30) { local_30 = fVar4; } if (local_34 < fVar4) { local_34 = fVar4; } } fVar4 = (local_34 - local_30) / DAT_001b6340; if ((fVar4 != 0.0) || (NAN(fVar4))) { local_5c = DAT_001b1428 / fVar4; } else { local_5c = 0.0; } uVar1 = ggml_compute_fp32_to_fp16(fVar4); *(int2 *)(param_2 + (long)local_2c * 0x18) = uVar1; uVar1 = ggml_compute_fp32_to_fp16(local_30); *(int2 *)(param_2 + (long)local_2c * 0x18 + 2) = uVar1; local_48 = 0; for (local_4c = 0; local_4c < 0x10; local_4c = local_4c + 1) { uVar2 = (uint)((*(float *)(param_1 + (long)(local_2c * 0x20 + local_4c) * 4) - local_30) * local_5c + DAT_001b1420); uVar3 = (uint)((*(float *)(param_1 + (long)(local_2c * 0x20 + 0x10 + local_4c) * 4) - local_30) * local_5c + DAT_001b1420); *(byte *)(param_2 + (long)local_2c * 0x18 + 8 + (long)local_4c) = (byte)uVar2 & 0xf | (byte)((uVar3 & 0xf) << 4); local_48 = ((uVar3 & 0x10) >> 4) << ((byte)local_4c + 0x10 & 0x1f) | ((uVar2 & 0x10) >> 4) << ((byte)local_4c & 0x1f) | local_48; } *(uint *)(param_2 + (long)local_2c * 0x18 + 4) = local_48; } return; } /* WARNING: Subroutine does not return */ __assert_fail("k % qk == 0", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c" ,0x98, "void quantize_row_q5_1_ref(const float *restrict, block_q5_1 *restrict, int64_t)"); }
13,295
quantize_row_q5_1_ref
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
void quantize_row_q5_1_ref(const float * restrict x, block_q5_1 * restrict y, int64_t k) { const int qk = QK5_1; assert(k % qk == 0); const int nb = k / qk; for (int i = 0; i < nb; i++) { float min = FLT_MAX; float max = -FLT_MAX; for (int j = 0; j < qk; j++) { const float v = x[i*qk + j]; if (v < min) min = v; if (v > max) max = v; } const float d = (max - min) / ((1 << 5) - 1); const float id = d ? 1.0f/d : 0.0f; y[i].d = GGML_FP32_TO_FP16(d); y[i].m = GGML_FP32_TO_FP16(min); uint32_t qh = 0; for (int j = 0; j < qk/2; ++j) { const float x0 = (x[i*qk + 0 + j] - min)*id; const float x1 = (x[i*qk + qk/2 + j] - min)*id; const uint8_t xi0 = (uint8_t)(x0 + 0.5f); const uint8_t xi1 = (uint8_t)(x1 + 0.5f); y[i].qs[j] = (xi0 & 0x0F) | ((xi1 & 0x0F) << 4); // get the 5-th bit and store it in qh at the right position qh |= ((xi0 & 0x10u) >> 4) << (j + 0); qh |= ((xi1 & 0x10u) >> 4) << (j + qk/2); } memcpy(&y[i].qh, &qh, sizeof(y[i].qh)); } }
O3
c
quantize_row_q5_1_ref: pushq %rax testb $0x1f, %dl jne 0x2cc7d shrq $0x5, %rdx testl %edx, %edx jle 0x2cc7b andl $0x7fffffff, %edx # imm = 0x7FFFFFFF leaq 0x8(%rsi), %rax xorl %ecx, %ecx movaps 0x1f6bb(%rip), %xmm4 # 0x4c070 pxor %xmm7, %xmm7 movdqa 0x1f67f(%rip), %xmm5 # 0x4c040 movdqa 0x24486(%rip), %xmm9 # 0x50e50 movdqa 0x2457e(%rip), %xmm1 # 0x50f50 movdqa 0x24555(%rip), %xmm8 # 0x50f30 movdqa 0x2455c(%rip), %xmm10 # 0x50f40 xorl %r8d, %r8d movss 0x248c8(%rip), %xmm12 # 0x512b8 movss 0x248bb(%rip), %xmm11 # 0x512b4 movaps %xmm11, %xmm0 movaps %xmm12, %xmm2 movss (%rdi,%r8,4), %xmm11 movaps %xmm11, %xmm12 minss %xmm2, %xmm12 maxss %xmm0, %xmm11 incq %r8 cmpq $0x20, %r8 jne 0x2c9f9 subss %xmm12, %xmm11 divss 0x2489c(%rip), %xmm11 # 0x512c8 movaps %xmm11, %xmm0 unpcklps %xmm12, %xmm0 # xmm0 = xmm0[0],xmm12[0],xmm0[1],xmm12[1] movaps %xmm0, %xmm3 paddd %xmm0, %xmm3 pxor 0x1f63d(%rip), %xmm3 # 0x4c080 movdqa %xmm3, %xmm2 pcmpgtd 0x24431(%rip), %xmm2 # 0x50e80 movdqa %xmm0, %xmm13 pand 0x24433(%rip), %xmm13 # 0x50e90 paddd 0x2443a(%rip), %xmm13 # 0x50ea0 pand %xmm2, %xmm13 pandn 0x2443d(%rip), %xmm2 # 0x50eb0 por %xmm13, %xmm2 movaps %xmm0, %xmm13 andps 0x1f59c(%rip), %xmm13 # 0x4c020 mulps 0x243d4(%rip), %xmm13 # 0x50e60 mulps 0x243dc(%rip), %xmm13 # 0x50e70 addps %xmm13, %xmm2 movaps %xmm2, %xmm13 psrld $0xd, %xmm13 pand 0x24415(%rip), %xmm13 # 0x50ec0 andps 0x2441e(%rip), %xmm2 # 0x50ed0 paddd %xmm13, %xmm2 pcmpgtd 0x24431(%rip), %xmm3 # 0x50ef0 movdqa %xmm3, %xmm13 pandn %xmm2, %xmm13 leaq (%rcx,%rcx,2), %r8 leaq (%rsi,%r8,8), %r8 psrld $0x10, %xmm0 pand 0x24402(%rip), %xmm0 # 0x50ee0 pand 0x2441a(%rip), %xmm3 # 0x50f00 por %xmm0, %xmm3 por %xmm13, %xmm3 pshuflw $0xe8, %xmm3, %xmm0 # xmm0 = xmm3[0,2,2,3,4,5,6,7] movd %xmm0, (%r8) movss 0x1f5ef(%rip), %xmm0 # 0x4c0f0 divss %xmm11, %xmm0 cmpneqss 0x247b4(%rip), %xmm11 # 0x512c4 andps %xmm0, %xmm11 shufps $0x0, %xmm12, %xmm12 # xmm12 = xmm12[0,0,0,0] shufps $0x0, %xmm11, %xmm11 # xmm11 = xmm11[0,0,0,0] pxor %xmm13, %xmm13 xorl %r9d, %r9d movdqa 0x1f501(%rip), %xmm14 # 0x4c030 movdqa %xmm14, %xmm3 movups (%rdi,%r9,4), %xmm0 movups 0x40(%rdi,%r9,4), %xmm15 subps %xmm12, %xmm0 mulps %xmm11, %xmm0 subps %xmm12, %xmm15 mulps %xmm11, %xmm15 addps %xmm4, %xmm0 cvttps2dq %xmm0, %xmm2 packuswb %xmm2, %xmm2 packuswb %xmm2, %xmm2 addps %xmm4, %xmm15 movaps %xmm4, %xmm6 cvttps2dq %xmm15, %xmm4 packuswb %xmm4, %xmm4 packuswb %xmm4, %xmm4 movdqa %xmm2, %xmm15 pand 0x242c0(%rip), %xmm15 # 0x50e40 movdqa %xmm4, %xmm0 psllw $0x4, %xmm0 pand %xmm9, %xmm0 por %xmm15, %xmm0 movd %xmm0, (%rax,%r9) psrlw $0x4, %xmm2 pand %xmm8, %xmm2 punpcklbw %xmm7, %xmm2 # xmm2 = xmm2[0],xmm7[0],xmm2[1],xmm7[1],xmm2[2],xmm7[2],xmm2[3],xmm7[3],xmm2[4],xmm7[4],xmm2[5],xmm7[5],xmm2[6],xmm7[6],xmm2[7],xmm7[7] punpcklwd %xmm7, %xmm2 # xmm2 = xmm2[0],xmm7[0],xmm2[1],xmm7[1],xmm2[2],xmm7[2],xmm2[3],xmm7[3] movdqa %xmm3, %xmm0 pslld $0x17, %xmm0 paddd %xmm10, %xmm0 cvttps2dq %xmm0, %xmm0 pshufd $0xf5, %xmm2, %xmm15 # xmm15 = xmm2[1,1,3,3] pmuludq %xmm0, %xmm2 pshufd $0xe8, %xmm2, %xmm2 # xmm2 = xmm2[0,2,2,3] pshufd $0xf5, %xmm0, %xmm0 # xmm0 = xmm0[1,1,3,3] pmuludq %xmm15, %xmm0 pshufd $0xe8, %xmm0, %xmm0 # xmm0 = xmm0[0,2,2,3] punpckldq %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1] psrlw $0x4, %xmm4 pand %xmm8, %xmm4 punpcklbw %xmm7, %xmm4 # xmm4 = xmm4[0],xmm7[0],xmm4[1],xmm7[1],xmm4[2],xmm7[2],xmm4[3],xmm7[3],xmm4[4],xmm7[4],xmm4[5],xmm7[5],xmm4[6],xmm7[6],xmm4[7],xmm7[7] punpcklwd %xmm7, %xmm4 # xmm4 = xmm4[0],xmm7[0],xmm4[1],xmm7[1],xmm4[2],xmm7[2],xmm4[3],xmm7[3] movdqa %xmm14, %xmm0 paddd %xmm1, %xmm0 pslld $0x17, %xmm0 paddd %xmm10, %xmm0 cvttps2dq %xmm0, %xmm0 pshufd $0xf5, %xmm4, %xmm15 # xmm15 = xmm4[1,1,3,3] pmuludq %xmm0, %xmm4 pshufd $0xf5, %xmm0, %xmm0 # xmm0 = xmm0[1,1,3,3] pmuludq %xmm15, %xmm0 pshufd $0xe8, %xmm4, %xmm4 # xmm4 = xmm4[0,2,2,3] pshufd $0xe8, %xmm0, %xmm0 # xmm0 = xmm0[0,2,2,3] punpckldq %xmm0, %xmm4 # xmm4 = xmm4[0],xmm0[0],xmm4[1],xmm0[1] paddd %xmm2, %xmm4 por %xmm4, %xmm13 movaps %xmm6, %xmm4 addq $0x4, %r9 paddd %xmm5, %xmm3 paddd %xmm5, %xmm14 cmpq $0x10, %r9 jne 0x2cb34 pshufd $0xee, %xmm13, %xmm0 # xmm0 = xmm13[2,3,2,3] por %xmm13, %xmm0 pshufd $0x55, %xmm0, %xmm2 # xmm2 = xmm0[1,1,1,1] por %xmm0, %xmm2 movd %xmm2, 0x4(%r8) incq %rcx subq $-0x80, %rdi addq $0x18, %rax cmpq %rdx, %rcx jne 0x2c9e4 popq %rax retq leaq 0x2f064(%rip), %rdi # 0x5bce8 leaq 0x2f069(%rip), %rsi # 0x5bcf4 leaq 0x2f1ae(%rip), %rcx # 0x5be40 movl $0x98, %edx callq 0x16b00
quantize_row_q5_1_ref: push rax test dl, 1Fh jnz loc_2CC7D shr rdx, 5 test edx, edx jle loc_2CC7B and edx, 7FFFFFFFh lea rax, [rsi+8] xor ecx, ecx movaps xmm4, cs:xmmword_4C070 pxor xmm7, xmm7 movdqa xmm5, cs:xmmword_4C040 movdqa xmm9, cs:xmmword_50E50 movdqa xmm1, cs:xmmword_50F50 movdqa xmm8, cs:xmmword_50F30 movdqa xmm10, cs:xmmword_50F40 loc_2C9E4: xor r8d, r8d movss xmm12, cs:dword_512B8 movss xmm11, cs:dword_512B4 loc_2C9F9: movaps xmm0, xmm11 movaps xmm2, xmm12 movss xmm11, dword ptr [rdi+r8*4] movaps xmm12, xmm11 minss xmm12, xmm2 maxss xmm11, xmm0 inc r8 cmp r8, 20h ; ' ' jnz short loc_2C9F9 subss xmm11, xmm12 divss xmm11, cs:dword_512C8 movaps xmm0, xmm11 unpcklps xmm0, xmm12 movaps xmm3, xmm0 paddd xmm3, xmm0 pxor xmm3, cs:xmmword_4C080 movdqa xmm2, xmm3 pcmpgtd xmm2, cs:xmmword_50E80 movdqa xmm13, xmm0 pand xmm13, cs:xmmword_50E90 paddd xmm13, cs:xmmword_50EA0 pand xmm13, xmm2 pandn xmm2, cs:xmmword_50EB0 por xmm2, xmm13 movaps xmm13, xmm0 andps xmm13, cs:xmmword_4C020 mulps xmm13, cs:xmmword_50E60 mulps xmm13, cs:xmmword_50E70 addps xmm2, xmm13 movaps xmm13, xmm2 psrld xmm13, 0Dh pand xmm13, cs:xmmword_50EC0 andps xmm2, cs:xmmword_50ED0 paddd xmm2, xmm13 pcmpgtd xmm3, cs:xmmword_50EF0 movdqa xmm13, xmm3 pandn xmm13, xmm2 lea r8, [rcx+rcx*2] lea r8, [rsi+r8*8] psrld xmm0, 10h pand xmm0, cs:xmmword_50EE0 pand xmm3, cs:xmmword_50F00 por xmm3, xmm0 por xmm3, xmm13 pshuflw xmm0, xmm3, 0E8h movd dword ptr [r8], xmm0 movss xmm0, cs:dword_4C0F0 divss xmm0, xmm11 cmpneqss xmm11, cs:dword_512C4 andps xmm11, xmm0 shufps xmm12, xmm12, 0 shufps xmm11, xmm11, 0 pxor xmm13, xmm13 xor r9d, r9d movdqa xmm14, cs:xmmword_4C030 movdqa xmm3, xmm14 loc_2CB34: movups xmm0, xmmword ptr [rdi+r9*4] movups xmm15, xmmword ptr [rdi+r9*4+40h] subps xmm0, xmm12 mulps xmm0, xmm11 subps xmm15, xmm12 mulps xmm15, xmm11 addps xmm0, xmm4 cvttps2dq xmm2, xmm0 packuswb xmm2, xmm2 packuswb xmm2, xmm2 addps xmm15, xmm4 movaps xmm6, xmm4 cvttps2dq xmm4, xmm15 packuswb xmm4, xmm4 packuswb xmm4, xmm4 movdqa xmm15, xmm2 pand xmm15, cs:xmmword_50E40 movdqa xmm0, xmm4 psllw xmm0, 4 pand xmm0, xmm9 por xmm0, xmm15 movd dword ptr [rax+r9], xmm0 psrlw xmm2, 4 pand xmm2, xmm8 punpcklbw xmm2, xmm7 punpcklwd xmm2, xmm7 movdqa xmm0, xmm3 pslld xmm0, 17h paddd xmm0, xmm10 cvttps2dq xmm0, xmm0 pshufd xmm15, xmm2, 0F5h pmuludq xmm2, xmm0 pshufd xmm2, xmm2, 0E8h pshufd xmm0, xmm0, 0F5h pmuludq xmm0, xmm15 pshufd xmm0, xmm0, 0E8h punpckldq xmm2, xmm0 psrlw xmm4, 4 pand xmm4, xmm8 punpcklbw xmm4, xmm7 punpcklwd xmm4, xmm7 movdqa xmm0, xmm14 paddd xmm0, xmm1 pslld xmm0, 17h paddd xmm0, xmm10 cvttps2dq xmm0, xmm0 pshufd xmm15, xmm4, 0F5h pmuludq xmm4, xmm0 pshufd xmm0, xmm0, 0F5h pmuludq xmm0, xmm15 pshufd xmm4, xmm4, 0E8h pshufd xmm0, xmm0, 0E8h punpckldq xmm4, xmm0 paddd xmm4, xmm2 por xmm13, xmm4 movaps xmm4, xmm6 add r9, 4 paddd xmm3, xmm5 paddd xmm14, xmm5 cmp r9, 10h jnz loc_2CB34 pshufd xmm0, xmm13, 0EEh por xmm0, xmm13 pshufd xmm2, xmm0, 55h ; 'U' por xmm2, xmm0 movd dword ptr [r8+4], xmm2 inc rcx sub rdi, 0FFFFFFFFFFFFFF80h add rax, 18h cmp rcx, rdx jnz loc_2C9E4 loc_2CC7B: pop rax retn loc_2CC7D: lea rdi, aKQk0; "k % qk == 0" lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidQuantizeRo_2; "void quantize_row_q5_1_ref(const float "... mov edx, 98h call ___assert_fail
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm0,xmm4,xmm5> quantize_row_q5_1_ref( long long a1, long long a2, unsigned long long a3) { unsigned long long v3; // rdx long long v4; // rdx long long v5; // rax long long v6; // rcx __m128 v7; // xmm4 __m128i si128; // xmm5 __m128i v9; // xmm9 __m128i v10; // xmm1 __m128i v11; // xmm8 __m128i v12; // xmm10 long long v13; // r8 __m128 v14; // xmm12 __m128 v15; // xmm11 float v16; // xmm0_4 float v17; // xmm2_4 __m128 v18; // xmm0 __m128i v19; // xmm3 __m128i v20; // xmm2 __m128 v21; // xmm2 __m128i v22; // xmm3 _DWORD *v23; // r8 __m128 v24; // xmm0 __m128 v25; // rt1 __m128 v26; // xmm11 __m128 v27; // xmm12 __m128 v28; // xmm11 __m128i v29; // xmm13 long long v30; // r9 __m128i v31; // xmm14 __m128i v32; // xmm3 __m128i v33; // xmm2 __m128i v34; // xmm2 __m128i v35; // xmm2 __m128 v36; // xmm6 __m128i v37; // xmm4 __m128i v38; // xmm4 __m128i v39; // xmm4 __m128i v40; // xmm2 __m128i v41; // xmm0 __m128i v42; // xmm2 __m128i v43; // xmm4 __m128i v44; // xmm0 __m128i v45; // xmm0 if ( (a3 & 0x1F) != 0 ) __assert_fail( "k % qk == 0", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c", 152LL, "void quantize_row_q5_1_ref(const float *restrict, block_q5_1 *restrict, int64_t)"); v3 = a3 >> 5; if ( (int)v3 > 0 ) { v4 = v3 & 0x7FFFFFFF; v5 = a2 + 8; v6 = 0LL; v7 = (__m128)xmmword_4C070; si128 = _mm_load_si128((const __m128i *)&xmmword_4C040); v9 = _mm_load_si128((const __m128i *)&xmmword_50E50); v10 = _mm_load_si128((const __m128i *)&xmmword_50F50); v11 = _mm_load_si128((const __m128i *)&xmmword_50F30); v12 = _mm_load_si128((const __m128i *)&xmmword_50F40); do { v13 = 0LL; v14.m128_i32[0] = 2139095039; v15.m128_i32[0] = -8388609; do { v16 = v15.m128_f32[0]; v17 = v14.m128_f32[0]; v15 = (__m128)*(unsigned int *)(a1 + 4 * v13); v14 = v15; v14.m128_f32[0] = fminf(v15.m128_f32[0], v17); v15.m128_f32[0] = fmaxf(v15.m128_f32[0], v16); ++v13; } while ( v13 != 32 ); v15.m128_f32[0] = (float)(v15.m128_f32[0] - v14.m128_f32[0]) / 31.0; v18 = _mm_unpacklo_ps(v15, v14); v19 = _mm_xor_si128(_mm_add_epi32((__m128i)v18, (__m128i)v18), (__m128i)xmmword_4C080); v20 = _mm_cmpgt_epi32(v19, (__m128i)xmmword_50E80); v21 = _mm_add_ps( (__m128)_mm_or_si128( _mm_andnot_si128(v20, (__m128i)xmmword_50EB0), _mm_and_si128( _mm_add_epi32(_mm_and_si128((__m128i)v18, (__m128i)xmmword_50E90), (__m128i)xmmword_50EA0), v20)), _mm_mul_ps( _mm_mul_ps(_mm_and_ps(v18, (__m128)xmmword_4C020), (__m128)xmmword_50E60), (__m128)xmmword_50E70)); v22 = _mm_cmpgt_epi32(v19, (__m128i)xmmword_50EF0); v23 = (_DWORD *)(a2 + 24 * v6); *v23 = _mm_cvtsi128_si32( _mm_shufflelo_epi16( _mm_or_si128( _mm_or_si128( _mm_and_si128(v22, (__m128i)xmmword_50F00), _mm_and_si128(_mm_srli_epi32((__m128i)v18, 0x10u), (__m128i)xmmword_50EE0)), _mm_andnot_si128( v22, _mm_add_epi32( (__m128i)_mm_and_ps(v21, (__m128)xmmword_50ED0), _mm_and_si128(_mm_srli_epi32((__m128i)v21, 0xDu), (__m128i)xmmword_50EC0)))), 232)); v24 = (__m128)0x3F800000u; v24.m128_f32[0] = 1.0 / v15.m128_f32[0]; v25.m128_i32[0] = 0; v26 = _mm_and_ps(_mm_cmpneq_ss(v15, v25), v24); v27 = _mm_shuffle_ps(v14, v14, 0); v28 = _mm_shuffle_ps(v26, v26, 0); v29 = 0LL; v30 = 0LL; v31 = _mm_load_si128((const __m128i *)&xmmword_4C030); v32 = v31; do { v33 = _mm_cvttps_epi32(_mm_add_ps(_mm_mul_ps(_mm_sub_ps(*(__m128 *)(a1 + 4 * v30), v27), v28), v7)); v34 = _mm_packus_epi16(v33, v33); v35 = _mm_packus_epi16(v34, v34); v36 = v7; v37 = _mm_cvttps_epi32(_mm_add_ps(_mm_mul_ps(_mm_sub_ps(*(__m128 *)(a1 + 4 * v30 + 64), v27), v28), v7)); v38 = _mm_packus_epi16(v37, v37); v39 = _mm_packus_epi16(v38, v38); *(_DWORD *)(v5 + v30) = _mm_cvtsi128_si32( _mm_or_si128( _mm_and_si128(_mm_slli_epi16(v39, 4u), v9), _mm_and_si128(v35, (__m128i)xmmword_50E40))); v40 = _mm_unpacklo_epi16( _mm_unpacklo_epi8(_mm_and_si128(_mm_srli_epi16(v35, 4u), v11), (__m128i)0LL), (__m128i)0LL); v41 = _mm_cvttps_epi32((__m128)_mm_add_epi32(_mm_slli_epi32(v32, 0x17u), v12)); v42 = _mm_unpacklo_epi32( _mm_shuffle_epi32(_mm_mul_epu32(v40, v41), 232), _mm_shuffle_epi32(_mm_mul_epu32(_mm_shuffle_epi32(v41, 245), _mm_shuffle_epi32(v40, 245)), 232)); v43 = _mm_unpacklo_epi16( _mm_unpacklo_epi8(_mm_and_si128(_mm_srli_epi16(v39, 4u), v11), (__m128i)0LL), (__m128i)0LL); v44 = _mm_cvttps_epi32((__m128)_mm_add_epi32(_mm_slli_epi32(_mm_add_epi32(v31, v10), 0x17u), v12)); v29 = _mm_or_si128( v29, _mm_add_epi32( _mm_unpacklo_epi32( _mm_shuffle_epi32(_mm_mul_epu32(v43, v44), 232), _mm_shuffle_epi32(_mm_mul_epu32(_mm_shuffle_epi32(v44, 245), _mm_shuffle_epi32(v43, 245)), 232)), v42)); v7 = v36; v30 += 4LL; v32 = _mm_add_epi32(v32, si128); v31 = _mm_add_epi32(v31, si128); } while ( v30 != 16 ); v45 = _mm_or_si128(_mm_shuffle_epi32(v29, 238), v29); v23[1] = _mm_cvtsi128_si32(_mm_or_si128(_mm_shuffle_epi32(v45, 85), v45)); ++v6; a1 += 128LL; v5 += 24LL; } while ( v6 != v4 ); } }
quantize_row_q5_1_ref: PUSH RAX TEST DL,0x1f JNZ 0x0012cc7d SHR RDX,0x5 TEST EDX,EDX JLE 0x0012cc7b AND EDX,0x7fffffff LEA RAX,[RSI + 0x8] XOR ECX,ECX MOVAPS XMM4,xmmword ptr [0x0014c070] PXOR XMM7,XMM7 MOVDQA XMM5,xmmword ptr [0x0014c040] MOVDQA XMM9,xmmword ptr [0x00150e50] MOVDQA XMM1,xmmword ptr [0x00150f50] MOVDQA XMM8,xmmword ptr [0x00150f30] MOVDQA XMM10,xmmword ptr [0x00150f40] LAB_0012c9e4: XOR R8D,R8D MOVSS XMM12,dword ptr [0x001512b8] MOVSS XMM11,dword ptr [0x001512b4] LAB_0012c9f9: MOVAPS XMM0,XMM11 MOVAPS XMM2,XMM12 MOVSS XMM11,dword ptr [RDI + R8*0x4] MOVAPS XMM12,XMM11 MINSS XMM12,XMM2 MAXSS XMM11,XMM0 INC R8 CMP R8,0x20 JNZ 0x0012c9f9 SUBSS XMM11,XMM12 DIVSS XMM11,dword ptr [0x001512c8] MOVAPS XMM0,XMM11 UNPCKLPS XMM0,XMM12 MOVAPS XMM3,XMM0 PADDD XMM3,XMM0 PXOR XMM3,xmmword ptr [0x0014c080] MOVDQA XMM2,XMM3 PCMPGTD XMM2,xmmword ptr [0x00150e80] MOVDQA XMM13,XMM0 PAND XMM13,xmmword ptr [0x00150e90] PADDD XMM13,xmmword ptr [0x00150ea0] PAND XMM13,XMM2 PANDN XMM2,xmmword ptr [0x00150eb0] POR XMM2,XMM13 MOVAPS XMM13,XMM0 ANDPS XMM13,xmmword ptr [0x0014c020] MULPS XMM13,xmmword ptr [0x00150e60] MULPS XMM13,xmmword ptr [0x00150e70] ADDPS XMM2,XMM13 MOVAPS XMM13,XMM2 PSRLD XMM13,0xd PAND XMM13,xmmword ptr [0x00150ec0] ANDPS XMM2,xmmword ptr [0x00150ed0] PADDD XMM2,XMM13 PCMPGTD XMM3,xmmword ptr [0x00150ef0] MOVDQA XMM13,XMM3 PANDN XMM13,XMM2 LEA R8,[RCX + RCX*0x2] LEA R8,[RSI + R8*0x8] PSRLD XMM0,0x10 PAND XMM0,xmmword ptr [0x00150ee0] PAND XMM3,xmmword ptr [0x00150f00] POR XMM3,XMM0 POR XMM3,XMM13 PSHUFLW XMM0,XMM3,0xe8 MOVD dword ptr [R8],XMM0 MOVSS XMM0,dword ptr [0x0014c0f0] DIVSS XMM0,XMM11 CMPNEQSS XMM11,dword ptr [0x001512c4] ANDPS XMM11,XMM0 SHUFPS XMM12,XMM12,0x0 SHUFPS XMM11,XMM11,0x0 PXOR XMM13,XMM13 XOR R9D,R9D MOVDQA XMM14,xmmword ptr [0x0014c030] MOVDQA XMM3,XMM14 LAB_0012cb34: MOVUPS XMM0,xmmword ptr [RDI + R9*0x4] MOVUPS XMM15,xmmword ptr [RDI + R9*0x4 + 0x40] SUBPS XMM0,XMM12 MULPS XMM0,XMM11 SUBPS XMM15,XMM12 MULPS XMM15,XMM11 ADDPS XMM0,XMM4 CVTTPS2DQ XMM2,XMM0 PACKUSWB XMM2,XMM2 PACKUSWB XMM2,XMM2 ADDPS XMM15,XMM4 MOVAPS XMM6,XMM4 CVTTPS2DQ XMM4,XMM15 PACKUSWB XMM4,XMM4 PACKUSWB XMM4,XMM4 MOVDQA XMM15,XMM2 PAND XMM15,xmmword ptr [0x00150e40] MOVDQA XMM0,XMM4 PSLLW XMM0,0x4 PAND XMM0,XMM9 POR XMM0,XMM15 MOVD dword ptr [RAX + R9*0x1],XMM0 PSRLW XMM2,0x4 PAND XMM2,XMM8 PUNPCKLBW XMM2,XMM7 PUNPCKLWD XMM2,XMM7 MOVDQA XMM0,XMM3 PSLLD XMM0,0x17 PADDD XMM0,XMM10 CVTTPS2DQ XMM0,XMM0 PSHUFD XMM15,XMM2,0xf5 PMULUDQ XMM2,XMM0 PSHUFD XMM2,XMM2,0xe8 PSHUFD XMM0,XMM0,0xf5 PMULUDQ XMM0,XMM15 PSHUFD XMM0,XMM0,0xe8 PUNPCKLDQ XMM2,XMM0 PSRLW XMM4,0x4 PAND XMM4,XMM8 PUNPCKLBW XMM4,XMM7 PUNPCKLWD XMM4,XMM7 MOVDQA XMM0,XMM14 PADDD XMM0,XMM1 PSLLD XMM0,0x17 PADDD XMM0,XMM10 CVTTPS2DQ XMM0,XMM0 PSHUFD XMM15,XMM4,0xf5 PMULUDQ XMM4,XMM0 PSHUFD XMM0,XMM0,0xf5 PMULUDQ XMM0,XMM15 PSHUFD XMM4,XMM4,0xe8 PSHUFD XMM0,XMM0,0xe8 PUNPCKLDQ XMM4,XMM0 PADDD XMM4,XMM2 POR XMM13,XMM4 MOVAPS XMM4,XMM6 ADD R9,0x4 PADDD XMM3,XMM5 PADDD XMM14,XMM5 CMP R9,0x10 JNZ 0x0012cb34 PSHUFD XMM0,XMM13,0xee POR XMM0,XMM13 PSHUFD XMM2,XMM0,0x55 POR XMM2,XMM0 MOVD dword ptr [R8 + 0x4],XMM2 INC RCX SUB RDI,-0x80 ADD RAX,0x18 CMP RCX,RDX JNZ 0x0012c9e4 LAB_0012cc7b: POP RAX RET LAB_0012cc7d: LEA RDI,[0x15bce8] LEA RSI,[0x15bcf4] LEA RCX,[0x15be40] MOV EDX,0x98 CALL 0x00116b00
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int8 quantize_row_q5_1_ref(long param_1,long param_2,ulong param_3) { int4 *puVar1; float *pfVar2; float *pfVar3; char cVar4; short sVar9; short sVar10; short sVar11; short sVar12; short sVar13; short sVar14; short sVar15; short sVar16; char cVar17; char cVar18; char cVar19; char cVar20; char cVar21; int1 auVar22 [14]; int1 auVar23 [14]; int1 auVar24 [15]; int1 auVar25 [15]; int1 auVar26 [15]; int1 auVar27 [15]; int1 auVar28 [15]; int1 auVar29 [14]; int1 auVar30 [15]; int1 auVar31 [15]; int1 auVar32 [15]; int1 auVar33 [15]; int1 auVar34 [15]; int1 auVar35 [15]; int1 auVar36 [15]; unkuint9 Var37; int1 auVar38 [11]; int1 auVar39 [13]; int1 auVar40 [14]; int1 auVar41 [15]; int1 auVar42 [11]; int1 auVar43 [14]; int1 auVar44 [15]; int1 auVar45 [15]; int1 auVar46 [15]; int1 auVar47 [15]; uint6 uVar48; uint6 uVar49; int iVar50; int iVar51; int iVar52; int iVar53; float fVar54; float fVar55; float fVar56; float fVar57; uint uVar58; int1 auVar59 [16]; int iVar60; int iVar61; int iVar62; int iVar63; int iVar64; int iVar65; int iVar66; int iVar67; int8 in_RAX; long lVar68; ulong uVar69; uint uVar70; long lVar71; int1 auVar72 [16]; int1 auVar73 [16]; int1 auVar74 [16]; short sVar75; ushort uVar76; int1 auVar88 [15]; uint uVar77; float fVar78; uint uVar93; float fVar94; float fVar96; float fVar98; int1 auVar89 [16]; int iVar79; int iVar95; int iVar97; int iVar99; int1 auVar92 [16]; int iVar100; int iVar102; int iVar103; int1 auVar101 [16]; int iVar104; ushort uVar105; int1 auVar112 [15]; int6 uVar106; int1 auVar115 [16]; float fVar116; float fVar117; uint uVar118; uint uVar119; int iVar120; int iVar121; int iVar122; int iVar123; char cVar5; char cVar6; char cVar7; char cVar8; int4 uVar80; uint uVar81; int6 uVar82; int8 uVar83; int1 auVar84 [12]; int1 auVar85 [12]; int1 auVar86 [14]; int1 auVar87 [14]; int1 auVar90 [16]; int1 auVar91 [16]; int8 uVar107; int1 auVar108 [12]; int1 auVar109 [12]; int1 auVar110 [14]; int1 auVar111 [14]; int1 auVar113 [16]; int1 auVar114 [16]; iVar67 = _UNK_00150f5c; iVar66 = _UNK_00150f58; iVar65 = _UNK_00150f54; iVar64 = _DAT_00150f50; iVar63 = _UNK_00150f4c; iVar62 = _UNK_00150f48; iVar61 = _UNK_00150f44; iVar60 = _DAT_00150f40; auVar59 = _DAT_00150f30; uVar58 = _DAT_00150e50; fVar57 = _UNK_0014c07c; fVar56 = _UNK_0014c078; fVar55 = _UNK_0014c074; fVar54 = _DAT_0014c070; iVar53 = _UNK_0014c04c; iVar52 = _UNK_0014c048; iVar51 = _UNK_0014c044; iVar50 = _DAT_0014c040; if ((param_3 & 0x1f) == 0) { uVar70 = (uint)(param_3 >> 5); if (0 < (int)uVar70) { lVar68 = param_2 + 8; uVar69 = 0; do { lVar71 = 0; fVar78 = DAT_001512b4; fVar94 = DAT_001512b8; do { fVar96 = *(float *)(param_1 + lVar71 * 4); fVar117 = fVar96; if (fVar94 <= fVar96) { fVar117 = fVar94; } if (fVar96 <= fVar78) { fVar96 = fVar78; } lVar71 = lVar71 + 1; fVar78 = fVar96; fVar94 = fVar117; } while (lVar71 != 0x20); fVar116 = (fVar96 - fVar117) / _DAT_001512c8; uVar118 = (int)fVar116 * 2 ^ _DAT_0014c080; uVar119 = (int)fVar117 * 2 ^ _UNK_0014c084; uVar77 = -(uint)(_DAT_00150e80 < (int)uVar118); uVar93 = -(uint)(_UNK_00150e84 < (int)uVar119); fVar78 = (float)(~uVar77 & _DAT_00150eb0 | ((uint)fVar116 & _DAT_00150e90) + _DAT_00150ea0 & uVar77) + (float)((uint)fVar116 & _DAT_0014c020) * _DAT_00150e60 * _DAT_00150e70; fVar94 = (float)(~uVar93 & _UNK_00150eb4 | ((uint)fVar117 & _UNK_00150e94) + _UNK_00150ea4 & uVar93) + (float)((uint)fVar117 & _UNK_0014c024) * _UNK_00150e64 * _UNK_00150e74; fVar96 = (float)(~-(uint)(_UNK_00150e88 < _UNK_0014c088) & _UNK_00150eb8 | _UNK_00150ea8 & -(uint)(_UNK_00150e88 < _UNK_0014c088)) + _UNK_00150e68 * 0.0 * _UNK_00150e78; fVar98 = (float)(~-(uint)(_UNK_00150e8c < _UNK_0014c08c) & _UNK_00150ebc | _UNK_00150eac & -(uint)(_UNK_00150e8c < _UNK_0014c08c)) + _UNK_00150e6c * 0.0 * _UNK_00150e7c; auVar89._0_4_ = ((uint)fVar78 & _DAT_00150ed0) + ((uint)fVar78 >> 0xd & _DAT_00150ec0); auVar89._4_4_ = ((uint)fVar94 & _UNK_00150ed4) + ((uint)fVar94 >> 0xd & _UNK_00150ec4); auVar89._8_4_ = ((uint)fVar96 & _UNK_00150ed8) + ((uint)fVar96 >> 0xd & _UNK_00150ec8); auVar89._12_4_ = ((uint)fVar98 & _UNK_00150edc) + ((uint)fVar98 >> 0xd & _UNK_00150ecc); auVar101._0_4_ = -(uint)(_DAT_00150ef0 < (int)uVar118); auVar101._4_4_ = -(uint)(_UNK_00150ef4 < (int)uVar119); auVar101._8_4_ = -(uint)(_UNK_00150ef8 < _UNK_0014c088); auVar101._12_4_ = -(uint)(_UNK_00150efc < _UNK_0014c08c); puVar1 = (int4 *)(param_2 + uVar69 * 0x18); auVar72._0_4_ = (uint)fVar116 >> 0x10; auVar72._4_4_ = (uint)fVar117 >> 0x10; auVar72._8_8_ = 0; auVar72 = pshuflw(auVar72 & _DAT_00150ee0, auVar101 & _DAT_00150f00 | auVar72 & _DAT_00150ee0 | ~auVar101 & auVar89, 0xe8); *puVar1 = auVar72._0_4_; fVar78 = (float)(-(uint)(fVar116 != DAT_001512c4) & (uint)(DAT_0014c0f0 / fVar116)); uVar77 = 0; uVar93 = 0; uVar118 = 0; uVar119 = 0; lVar71 = 0; iVar100 = _DAT_0014c030; iVar102 = _UNK_0014c034; iVar103 = _UNK_0014c038; iVar104 = _UNK_0014c03c; iVar120 = _DAT_0014c030; iVar121 = _UNK_0014c034; iVar122 = _UNK_0014c038; iVar123 = _UNK_0014c03c; do { pfVar2 = (float *)(param_1 + lVar71 * 4); pfVar3 = (float *)(param_1 + 0x40 + lVar71 * 4); iVar79 = (int)((*pfVar2 - fVar117) * fVar78 + fVar54); iVar95 = (int)((pfVar2[1] - fVar117) * fVar78 + fVar55); iVar97 = (int)((pfVar2[2] - fVar117) * fVar78 + fVar56); iVar99 = (int)((pfVar2[3] - fVar117) * fVar78 + fVar57); sVar9 = (short)iVar79; cVar4 = (0 < sVar9) * (sVar9 < 0x100) * (char)iVar79 - (0xff < sVar9); sVar10 = (short)((uint)iVar79 >> 0x10); cVar17 = (char)((uint)iVar79 >> 0x10); sVar75 = CONCAT11((0 < sVar10) * (sVar10 < 0x100) * cVar17 - (0xff < sVar10),cVar4); sVar11 = (short)iVar95; cVar5 = (0 < sVar11) * (sVar11 < 0x100) * (char)iVar95 - (0xff < sVar11); sVar12 = (short)((uint)iVar95 >> 0x10); cVar18 = (char)((uint)iVar95 >> 0x10); uVar80 = CONCAT13((0 < sVar12) * (sVar12 < 0x100) * cVar18 - (0xff < sVar12), CONCAT12(cVar5,sVar75)); sVar13 = (short)iVar97; cVar6 = (0 < sVar13) * (sVar13 < 0x100) * (char)iVar97 - (0xff < sVar13); sVar14 = (short)((uint)iVar97 >> 0x10); cVar19 = (char)((uint)iVar97 >> 0x10); uVar82 = CONCAT15((0 < sVar14) * (sVar14 < 0x100) * cVar19 - (0xff < sVar14), CONCAT14(cVar6,uVar80)); sVar15 = (short)iVar99; cVar7 = (0 < sVar15) * (sVar15 < 0x100) * (char)iVar99 - (0xff < sVar15); sVar16 = (short)((uint)iVar99 >> 0x10); cVar20 = (char)((uint)iVar99 >> 0x10); uVar83 = CONCAT17((0 < sVar16) * (sVar16 < 0x100) * cVar20 - (0xff < sVar16), CONCAT16(cVar7,uVar82)); cVar8 = (0 < sVar9) * (sVar9 < 0x100) * (char)iVar79 - (0xff < sVar9); auVar84._0_10_ = CONCAT19((0 < sVar10) * (sVar10 < 0x100) * cVar17 - (0xff < sVar10), CONCAT18(cVar8,uVar83)); cVar17 = (0 < sVar11) * (sVar11 < 0x100) * (char)iVar95 - (0xff < sVar11); auVar84[10] = cVar17; auVar84[0xb] = (0 < sVar12) * (sVar12 < 0x100) * cVar18 - (0xff < sVar12); cVar18 = (0 < sVar13) * (sVar13 < 0x100) * (char)iVar97 - (0xff < sVar13); auVar86[0xc] = cVar18; auVar86._0_12_ = auVar84; auVar86[0xd] = (0 < sVar14) * (sVar14 < 0x100) * cVar19 - (0xff < sVar14); cVar19 = (0 < sVar15) * (sVar15 < 0x100) * (char)iVar99 - (0xff < sVar15); auVar90[0xe] = cVar19; auVar90._0_14_ = auVar86; auVar90[0xf] = (0 < sVar16) * (sVar16 < 0x100) * cVar20 - (0xff < sVar16); sVar9 = (short)((uint)uVar80 >> 0x10); uVar76 = CONCAT11((0 < sVar9) * (sVar9 < 0x100) * cVar5 - (0xff < sVar9), (0 < sVar75) * (sVar75 < 0x100) * cVar4 - (0xff < sVar75)); sVar10 = (short)((uint6)uVar82 >> 0x20); sVar11 = (short)((ulong)uVar83 >> 0x30); uVar81 = CONCAT13((0 < sVar11) * (sVar11 < 0x100) * cVar7 - (0xff < sVar11), CONCAT12((0 < sVar10) * (sVar10 < 0x100) * cVar6 - (0xff < sVar10), uVar76)); sVar12 = (short)((unkuint10)auVar84._0_10_ >> 0x40); sVar13 = auVar84._10_2_; uVar82 = CONCAT15((0 < sVar13) * (sVar13 < 0x100) * cVar17 - (0xff < sVar13), CONCAT14((0 < sVar12) * (sVar12 < 0x100) * cVar8 - (0xff < sVar12), uVar81)); sVar14 = auVar86._12_2_; sVar15 = auVar90._14_2_; uVar83 = CONCAT17((0 < sVar15) * (sVar15 < 0x100) * cVar19 - (0xff < sVar15), CONCAT16((0 < sVar14) * (sVar14 < 0x100) * cVar18 - (0xff < sVar14), uVar82)); auVar85._0_10_ = CONCAT19((0 < sVar9) * (sVar9 < 0x100) * cVar5 - (0xff < sVar9), CONCAT18((0 < sVar75) * (sVar75 < 0x100) * cVar4 - (0xff < sVar75),uVar83)); auVar85[10] = (0 < sVar10) * (sVar10 < 0x100) * cVar6 - (0xff < sVar10); auVar85[0xb] = (0 < sVar11) * (sVar11 < 0x100) * cVar7 - (0xff < sVar11); auVar87[0xc] = (0 < sVar12) * (sVar12 < 0x100) * cVar8 - (0xff < sVar12); auVar87._0_12_ = auVar85; auVar87[0xd] = (0 < sVar13) * (sVar13 < 0x100) * cVar17 - (0xff < sVar13); auVar91[0xe] = (0 < sVar14) * (sVar14 < 0x100) * cVar18 - (0xff < sVar14); auVar91._0_14_ = auVar87; auVar91[0xf] = (0 < sVar15) * (sVar15 < 0x100) * cVar19 - (0xff < sVar15); iVar79 = (int)((*pfVar3 - fVar117) * fVar78 + fVar54); iVar95 = (int)((pfVar3[1] - fVar117) * fVar78 + fVar55); iVar97 = (int)((pfVar3[2] - fVar117) * fVar78 + fVar56); iVar99 = (int)((pfVar3[3] - fVar117) * fVar78 + fVar57); sVar9 = (short)iVar79; cVar4 = (0 < sVar9) * (sVar9 < 0x100) * (char)iVar79 - (0xff < sVar9); sVar10 = (short)((uint)iVar79 >> 0x10); cVar6 = (char)((uint)iVar79 >> 0x10); sVar75 = CONCAT11((0 < sVar10) * (sVar10 < 0x100) * cVar6 - (0xff < sVar10),cVar4); sVar11 = (short)iVar95; cVar19 = (0 < sVar11) * (sVar11 < 0x100) * (char)iVar95 - (0xff < sVar11); sVar12 = (short)((uint)iVar95 >> 0x10); cVar7 = (char)((uint)iVar95 >> 0x10); uVar80 = CONCAT13((0 < sVar12) * (sVar12 < 0x100) * cVar7 - (0xff < sVar12), CONCAT12(cVar19,sVar75)); sVar13 = (short)iVar97; cVar18 = (0 < sVar13) * (sVar13 < 0x100) * (char)iVar97 - (0xff < sVar13); sVar14 = (short)((uint)iVar97 >> 0x10); cVar20 = (char)((uint)iVar97 >> 0x10); uVar106 = CONCAT15((0 < sVar14) * (sVar14 < 0x100) * cVar20 - (0xff < sVar14), CONCAT14(cVar18,uVar80)); sVar15 = (short)iVar99; cVar17 = (0 < sVar15) * (sVar15 < 0x100) * (char)iVar99 - (0xff < sVar15); sVar16 = (short)((uint)iVar99 >> 0x10); cVar21 = (char)((uint)iVar99 >> 0x10); uVar107 = CONCAT17((0 < sVar16) * (sVar16 < 0x100) * cVar21 - (0xff < sVar16), CONCAT16(cVar17,uVar106)); cVar5 = (0 < sVar9) * (sVar9 < 0x100) * (char)iVar79 - (0xff < sVar9); auVar108._0_10_ = CONCAT19((0 < sVar10) * (sVar10 < 0x100) * cVar6 - (0xff < sVar10), CONCAT18(cVar5,uVar107)); cVar8 = (0 < sVar11) * (sVar11 < 0x100) * (char)iVar95 - (0xff < sVar11); auVar108[10] = cVar8; auVar108[0xb] = (0 < sVar12) * (sVar12 < 0x100) * cVar7 - (0xff < sVar12); cVar7 = (0 < sVar13) * (sVar13 < 0x100) * (char)iVar97 - (0xff < sVar13); auVar110[0xc] = cVar7; auVar110._0_12_ = auVar108; auVar110[0xd] = (0 < sVar14) * (sVar14 < 0x100) * cVar20 - (0xff < sVar14); cVar6 = (0 < sVar15) * (sVar15 < 0x100) * (char)iVar99 - (0xff < sVar15); auVar113[0xe] = cVar6; auVar113._0_14_ = auVar110; auVar113[0xf] = (0 < sVar16) * (sVar16 < 0x100) * cVar21 - (0xff < sVar16); sVar9 = (short)((uint)uVar80 >> 0x10); uVar105 = CONCAT11((0 < sVar9) * (sVar9 < 0x100) * cVar19 - (0xff < sVar9), (0 < sVar75) * (sVar75 < 0x100) * cVar4 - (0xff < sVar75)); sVar10 = (short)((uint6)uVar106 >> 0x20); sVar11 = (short)((ulong)uVar107 >> 0x30); uVar80 = CONCAT13((0 < sVar11) * (sVar11 < 0x100) * cVar17 - (0xff < sVar11), CONCAT12((0 < sVar10) * (sVar10 < 0x100) * cVar18 - (0xff < sVar10), uVar105)); sVar12 = (short)((unkuint10)auVar108._0_10_ >> 0x40); sVar13 = auVar108._10_2_; uVar106 = CONCAT15((0 < sVar13) * (sVar13 < 0x100) * cVar8 - (0xff < sVar13), CONCAT14((0 < sVar12) * (sVar12 < 0x100) * cVar5 - (0xff < sVar12), uVar80)); sVar14 = auVar110._12_2_; sVar15 = auVar113._14_2_; uVar107 = CONCAT17((0 < sVar15) * (sVar15 < 0x100) * cVar6 - (0xff < sVar15), CONCAT16((0 < sVar14) * (sVar14 < 0x100) * cVar7 - (0xff < sVar14), uVar106)); auVar109._0_10_ = CONCAT19((0 < sVar9) * (sVar9 < 0x100) * cVar19 - (0xff < sVar9), CONCAT18((0 < sVar75) * (sVar75 < 0x100) * cVar4 - (0xff < sVar75),uVar107)) ; auVar109[10] = (0 < sVar10) * (sVar10 < 0x100) * cVar18 - (0xff < sVar10); auVar109[0xb] = (0 < sVar11) * (sVar11 < 0x100) * cVar17 - (0xff < sVar11); auVar111[0xc] = (0 < sVar12) * (sVar12 < 0x100) * cVar5 - (0xff < sVar12); auVar111._0_12_ = auVar109; auVar111[0xd] = (0 < sVar13) * (sVar13 < 0x100) * cVar8 - (0xff < sVar13); auVar114[0xe] = (0 < sVar14) * (sVar14 < 0x100) * cVar7 - (0xff < sVar14); auVar114._0_14_ = auVar111; auVar114[0xf] = (0 < sVar15) * (sVar15 < 0x100) * cVar6 - (0xff < sVar15); auVar72 = psllw(auVar114,4); *(uint *)(lVar68 + lVar71) = auVar72._0_4_ & uVar58 | uVar81 & SUB164(_DAT_00150e40,0); auVar92._0_2_ = uVar76 >> 4; auVar92._2_2_ = (ushort)(uVar81 >> 0x14); auVar92._4_2_ = (ushort)((uint6)uVar82 >> 0x24); auVar92._6_2_ = (ushort)((ulong)uVar83 >> 0x34); auVar92._8_2_ = (ushort)((unkuint10)auVar85._0_10_ >> 0x44); auVar92._10_2_ = auVar85._10_2_ >> 4; auVar92._12_2_ = auVar87._12_2_ >> 4; auVar92._14_2_ = auVar91._14_2_ >> 4; auVar88 = auVar92._0_15_ & auVar59._0_15_; auVar112[0xd] = 0; auVar112._0_13_ = auVar88._0_13_; auVar112[0xe] = auVar88[7]; auVar25[0xc] = auVar88[6]; auVar25._0_12_ = auVar88._0_12_; auVar25._13_2_ = auVar112._13_2_; auVar27[0xb] = 0; auVar27._0_11_ = auVar88._0_11_; auVar27._12_3_ = auVar25._12_3_; auVar30[10] = auVar88[5]; auVar30._0_10_ = auVar88._0_10_; auVar30._11_4_ = auVar27._11_4_; auVar32[9] = 0; auVar32._0_9_ = auVar88._0_9_; auVar32._10_5_ = auVar30._10_5_; auVar36._1_6_ = auVar32._9_6_; auVar36[0] = auVar88[4]; auVar36._7_8_ = 0; Var37 = CONCAT81(SUB158(auVar36 << 0x40,7),auVar88[3]); auVar44._9_6_ = 0; auVar44._0_9_ = Var37; auVar38._1_10_ = SUB1510(auVar44 << 0x30,5); auVar38[0] = auVar88[2]; auVar45._11_4_ = 0; auVar45._0_11_ = auVar38; auVar39._1_12_ = SUB1512(auVar45 << 0x20,3); auVar39[0] = auVar88[1]; uVar76 = CONCAT11(0,auVar88[0]); auVar35._2_13_ = auVar39; auVar35._0_2_ = uVar76; auVar23._10_2_ = 0; auVar23._0_10_ = auVar35._0_10_; auVar23._12_2_ = (short)Var37; uVar48 = CONCAT42(auVar23._10_4_,auVar38._0_2_); auVar40._6_8_ = 0; auVar40._0_6_ = uVar48; auVar73._4_4_ = (int)(float)(iVar102 * 0x800000 + iVar61); auVar73._12_4_ = (int)(float)(iVar104 * 0x800000 + iVar63); auVar73._0_4_ = auVar73._4_4_; auVar73._8_4_ = auVar73._12_4_; auVar115._0_2_ = uVar105 >> 4; auVar115._2_2_ = (ushort)((uint)uVar80 >> 0x14); auVar115._4_2_ = (ushort)((uint6)uVar106 >> 0x24); auVar115._6_2_ = (ushort)((ulong)uVar107 >> 0x34); auVar115._8_2_ = (ushort)((unkuint10)auVar109._0_10_ >> 0x44); auVar115._10_2_ = auVar109._10_2_ >> 4; auVar115._12_2_ = auVar111._12_2_ >> 4; auVar115._14_2_ = auVar114._14_2_ >> 4; auVar112 = auVar115._0_15_ & auVar59._0_15_; auVar88[0xd] = 0; auVar88._0_13_ = auVar112._0_13_; auVar88[0xe] = auVar112[7]; auVar24[0xc] = auVar112[6]; auVar24._0_12_ = auVar112._0_12_; auVar24._13_2_ = auVar88._13_2_; auVar26[0xb] = 0; auVar26._0_11_ = auVar112._0_11_; auVar26._12_3_ = auVar24._12_3_; auVar28[10] = auVar112[5]; auVar28._0_10_ = auVar112._0_10_; auVar28._11_4_ = auVar26._11_4_; auVar31[9] = 0; auVar31._0_9_ = auVar112._0_9_; auVar31._10_5_ = auVar28._10_5_; auVar41._1_6_ = auVar31._9_6_; auVar41[0] = auVar112[4]; auVar41._7_8_ = 0; Var37 = CONCAT81(SUB158(auVar41 << 0x40,7),auVar112[3]); auVar46._9_6_ = 0; auVar46._0_9_ = Var37; auVar42._1_10_ = SUB1510(auVar46 << 0x30,5); auVar42[0] = auVar112[2]; auVar47._11_4_ = 0; auVar47._0_11_ = auVar42; auVar33[2] = auVar112[1]; auVar33._0_2_ = auVar112._0_2_; auVar33._3_12_ = SUB1512(auVar47 << 0x20,3); auVar34._2_13_ = auVar33._2_13_; auVar34._0_2_ = auVar112._0_2_ & 0xff; auVar22._10_2_ = 0; auVar22._0_10_ = auVar34._0_10_; auVar22._12_2_ = (short)Var37; uVar49 = CONCAT42(auVar22._10_4_,auVar42._0_2_); auVar43._6_8_ = 0; auVar43._0_6_ = uVar49; auVar29._4_2_ = auVar33._2_2_; auVar29._0_4_ = auVar34._0_4_; auVar29._6_8_ = SUB148(auVar43 << 0x40,6); auVar74._4_4_ = (int)(float)((iVar121 + iVar65) * 0x800000 + iVar61); auVar74._12_4_ = (int)(float)((iVar123 + iVar67) * 0x800000 + iVar63); auVar74._0_4_ = auVar74._4_4_; auVar74._8_4_ = auVar74._12_4_; uVar77 = uVar77 | (auVar34._0_4_ & 0xffff) * (int)(float)((iVar120 + iVar64) * 0x800000 + iVar60) + (uint)uVar76 * (int)(float)(iVar100 * 0x800000 + iVar60); uVar93 = uVar93 | auVar74._4_4_ * auVar29._4_4_ + auVar73._4_4_ * (int)CONCAT82(SUB148(auVar40 << 0x40,6),auVar39._0_2_); uVar118 = uVar118 | (int)(((ulong)uVar49 & 0xffffffff) * (ulong)(uint)(int)(float)((iVar122 + iVar66) * 0x800000 + iVar62) ) + (int)(((ulong)uVar48 & 0xffffffff) * (ulong)(uint)(int)(float)(iVar103 * 0x800000 + iVar62)); uVar119 = uVar119 | (int)((auVar74._8_8_ & 0xffffffff) * (ulong)(auVar22._10_4_ >> 0x10)) + (int)((auVar73._8_8_ & 0xffffffff) * (ulong)(auVar23._10_4_ >> 0x10) ); lVar71 = lVar71 + 4; iVar100 = iVar100 + iVar50; iVar102 = iVar102 + iVar51; iVar103 = iVar103 + iVar52; iVar104 = iVar104 + iVar53; iVar120 = iVar120 + iVar50; iVar121 = iVar121 + iVar51; iVar122 = iVar122 + iVar52; iVar123 = iVar123 + iVar53; } while (lVar71 != 0x10); puVar1[1] = uVar119 | uVar93 | uVar118 | uVar77; uVar69 = uVar69 + 1; param_1 = param_1 + 0x80; lVar68 = lVar68 + 0x18; } while (uVar69 != (uVar70 & 0x7fffffff)); } return in_RAX; } /* WARNING: Subroutine does not return */ __assert_fail("k % qk == 0", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c" ,0x98, "void quantize_row_q5_1_ref(const float *restrict, block_q5_1 *restrict, int64_t)"); }
13,296
mysql_stmt_execute_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_execute_start(int *ret, MYSQL_STMT *stmt) { MK_ASYNC_START_BODY( mysql_stmt_execute, stmt->mysql, { WIN_SET_NONBLOCKING(stmt->mysql) parms.stmt= stmt; }, 1, r_int, /* If eg. mysql_change_user(), stmt->mysql will be NULL. In this case, we cannot block. */ if (!stmt->mysql) { *ret= mysql_stmt_execute(stmt); return 0; }) }
O0
c
mysql_stmt_execute_start: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rax cmpq $0x0, 0x38(%rax) jne 0x43288 movq -0x18(%rbp), %rdi callq 0x32470 movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) jmp 0x43399 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movb $0x1, 0x14(%rax) movq -0x28(%rbp), %rdi addq $0x38, %rdi leaq 0xf2(%rip), %rsi # 0x433b0 leaq -0x30(%rbp), %rdx callq 0x45a00 movl %eax, -0x1c(%rbp) movq -0x28(%rbp), %rax movb $0x0, 0x15(%rax) movq -0x28(%rbp), %rax movb $0x0, 0x14(%rax) cmpl $0x0, -0x1c(%rbp) jle 0x432f6 movq -0x28(%rbp), %rax movb $0x1, 0x15(%rax) movq -0x28(%rbp), %rax movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x43399 cmpl $0x0, -0x1c(%rbp) jge 0x43385 jmp 0x43302 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x25186(%rip), %rax # 0x684b0 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x29c(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x97, %rdi leaq 0x25164(%rip), %rax # 0x684c0 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13220 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x296(%rax) movq -0x10(%rbp), %rax movl $0x1, (%rax) jmp 0x43392 movq -0x28(%rbp), %rax movl 0x8(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_stmt_execute_start: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_18] cmp qword ptr [rax+38h], 0 jnz short loc_43288 mov rdi, [rbp+var_18] call mysql_stmt_execute mov ecx, eax mov rax, [rbp+var_10] mov [rax], ecx mov [rbp+var_4], 0 jmp loc_43399 loc_43288: mov rax, [rbp+var_18] mov rax, [rax+38h] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov [rbp+var_30], rax mov rax, [rbp+var_28] mov byte ptr [rax+14h], 1 mov rdi, [rbp+var_28] add rdi, 38h ; '8' lea rsi, mysql_stmt_execute_start_internal lea rdx, [rbp+var_30] call my_context_spawn mov [rbp+var_1C], eax mov rax, [rbp+var_28] mov byte ptr [rax+15h], 0 mov rax, [rbp+var_28] mov byte ptr [rax+14h], 0 cmp [rbp+var_1C], 0 jle short loc_432F6 mov rax, [rbp+var_28] mov byte ptr [rax+15h], 1 mov rax, [rbp+var_28] mov eax, [rax] mov [rbp+var_4], eax jmp loc_43399 loc_432F6: cmp [rbp+var_1C], 0 jge loc_43385 jmp short $+2 loc_43302: mov rax, [rbp+var_18] mov rax, [rax+38h] mov dword ptr [rax+90h], 7D8h mov rax, [rbp+var_18] mov rdi, [rax+38h] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_18] mov rax, [rax+38h] mov byte ptr [rax+29Ch], 0 mov rax, [rbp+var_18] mov rdi, [rax+38h] add rdi, 97h lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [rbp+var_18] mov rax, [rax+38h] mov byte ptr [rax+296h], 0 mov rax, [rbp+var_10] mov dword ptr [rax], 1 jmp short loc_43392 loc_43385: mov rax, [rbp+var_28] mov ecx, [rax+8] mov rax, [rbp+var_10] mov [rax], ecx loc_43392: mov [rbp+var_4], 0 loc_43399: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long mysql_stmt_execute_start(_DWORD *a1, long long a2) { long long v3; // [rsp+0h] [rbp-30h] BYREF unsigned int *v4; // [rsp+8h] [rbp-28h] int v5; // [rsp+14h] [rbp-1Ch] long long v6; // [rsp+18h] [rbp-18h] _DWORD *v7; // [rsp+20h] [rbp-10h] v7 = a1; v6 = a2; if ( *(_QWORD *)(a2 + 56) ) { v4 = *(unsigned int **)(*(_QWORD *)(*(_QWORD *)(v6 + 56) + 1152LL) + 40LL); v3 = v6; *((_BYTE *)v4 + 20) = 1; v5 = my_context_spawn(v4 + 14, mysql_stmt_execute_start_internal, &v3); *((_BYTE *)v4 + 21) = 0; *((_BYTE *)v4 + 20) = 0; if ( v5 <= 0 ) { if ( v5 >= 0 ) { *v7 = v4[2]; } else { *(_DWORD *)(*(_QWORD *)(v6 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(v6 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(v6 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(v6 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(v6 + 56) + 662LL) = 0; *v7 = 1; } return 0; } else { *((_BYTE *)v4 + 21) = 1; return *v4; } } else { *v7 = mysql_stmt_execute(v6); return 0; } }
mysql_stmt_execute_start: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x38],0x0 JNZ 0x00143288 MOV RDI,qword ptr [RBP + -0x18] CALL 0x00132470 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x0 JMP 0x00143399 LAB_00143288: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x14],0x1 MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x38 LEA RSI,[0x1433b0] LEA RDX,[RBP + -0x30] CALL 0x00145a00 MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x15],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x14],0x0 CMP dword ptr [RBP + -0x1c],0x0 JLE 0x001432f6 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x15],0x1 MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x00143399 LAB_001432f6: CMP dword ptr [RBP + -0x1c],0x0 JGE 0x00143385 JMP 0x00143302 LAB_00143302: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x297 LEA RAX,[0x1684b0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x29c],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x97 LEA RAX,[0x1684c0] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00113220 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x296],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],0x1 JMP 0x00143392 LAB_00143385: MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX LAB_00143392: MOV dword ptr [RBP + -0x4],0x0 LAB_00143399: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 mysql_stmt_execute_start(int4 *param_1,long param_2) { int4 uVar1; long local_38; int4 *local_30; int local_24; long local_20; int4 *local_18; int4 local_c; local_20 = param_2; local_18 = param_1; if (*(long *)(param_2 + 0x38) == 0) { uVar1 = mysql_stmt_execute(param_2); *local_18 = uVar1; local_c = 0; } else { local_30 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); *(int1 *)(local_30 + 5) = 1; local_38 = param_2; local_24 = my_context_spawn(local_30 + 0xe,mysql_stmt_execute_start_internal,&local_38); *(int1 *)((long)local_30 + 0x15) = 0; *(int1 *)(local_30 + 5) = 0; if (local_24 < 1) { if (local_24 < 0) { *(int4 *)(*(long *)(local_20 + 0x38) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(local_20 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(local_20 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(local_20 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_00168500, 0x1ff); *(int1 *)(*(long *)(local_20 + 0x38) + 0x296) = 0; *local_18 = 1; } else { *local_18 = local_30[2]; } local_c = 0; } else { *(int1 *)((long)local_30 + 0x15) = 1; local_c = *local_30; } } return local_c; }
13,297
Spg200::Reset()
sp1187[P]veesem/src/core/spg200/spg200.cc
void Spg200::Reset() { ram_.fill(0); cpu_.Reset(); ppu_.Reset(); spu_.Reset(); irq_.Reset(); timer_.Reset(); extmem_.Reset(); gpio_.Reset(); adc_.Reset(); uart_.Reset(); dma_.Reset(); random1_.Set(0x1418); random2_.Set(0x1658); }
O3
cpp
Spg200::Reset(): pushq %rbx movq %rdi, %rbx addq $0x20, %rdi movl $0x5000, %edx # imm = 0x5000 xorl %esi, %esi callq 0x62e0 leaq 0x5020(%rbx), %rdi callq 0xd5f8 leaq 0x5050(%rbx), %rdi callq 0xf3b0 leaq 0x2b6c0(%rbx), %rdi callq 0xbc66 leaq 0x31ad8(%rbx), %rdi callq 0xed30 leaq 0x31ae8(%rbx), %rdi callq 0xcd9c leaq 0x31b18(%rbx), %rdi callq 0xeae6 leaq 0x31b28(%rbx), %rdi callq 0xec00 leaq 0x31b50(%rbx), %rdi callq 0xd39e leaq 0x31b78(%rbx), %rdi callq 0xd128 leaq 0x31ba0(%rbx), %rdi callq 0xea64 leaq 0x31bb0(%rbx), %rdi movl $0x1418, %esi # imm = 0x1418 callq 0x1025c addq $0x31bb2, %rbx # imm = 0x31BB2 movq %rbx, %rdi movl $0x1658, %esi # imm = 0x1658 popq %rbx jmp 0x1025c
_ZN6Spg2005ResetEv: push rbx mov rbx, rdi add rdi, 20h ; ' ' mov edx, 5000h xor esi, esi call _memset lea rdi, [rbx+5020h]; this call _ZN3Cpu5ResetEv; Cpu::Reset(void) lea rdi, [rbx+5050h]; this call _ZN3Ppu5ResetEv; Ppu::Reset(void) lea rdi, loc_2B6C0[rbx]; this call _ZN3Spu5ResetEv; Spu::Reset(void) lea rdi, [rbx+31AD8h]; this call _ZN3Irq5ResetEv; Irq::Reset(void) lea rdi, loc_31AE8[rbx]; this call _ZN5Timer5ResetEv; Timer::Reset(void) lea rdi, [rbx+31B18h]; this call _ZN6Extmem5ResetEv; Extmem::Reset(void) lea rdi, [rbx+31B28h]; this call _ZN4Gpio5ResetEv; Gpio::Reset(void) lea rdi, [rbx+31B50h]; this call _ZN3Adc5ResetEv; Adc::Reset(void) lea rdi, [rbx+31B78h]; this call _ZN4Uart5ResetEv; Uart::Reset(void) lea rdi, [rbx+31BA0h]; this call _ZN3Dma5ResetEv; Dma::Reset(void) lea rdi, loc_31BB0[rbx]; this mov esi, 1418h; unsigned __int16 call _ZN6Random3SetEt; Random::Set(ushort) add rbx, 31BB2h mov rdi, rbx; this mov esi, 1658h; unsigned __int16 pop rbx jmp _ZN6Random3SetEt; Random::Set(ushort)
long long Spg200::Reset(Spg200 *this) { memset((char *)this + 32, 0LL, 20480LL); Cpu::Reset((Spg200 *)((char *)this + 20512)); Ppu::Reset((Spg200 *)((char *)this + 20560)); Spu::Reset((Spu *)((char *)&loc_2B6C0 + (_QWORD)this)); Irq::Reset((Spg200 *)((char *)this + 203480)); Timer::Reset((Timer *)((char *)&loc_31AE8 + (_QWORD)this)); Extmem::Reset((Spg200 *)((char *)this + 203544)); Gpio::Reset((Spg200 *)((char *)this + 203560)); Adc::Reset((Spg200 *)((char *)this + 203600)); Uart::Reset((Spg200 *)((char *)this + 203640)); Dma::Reset((Spg200 *)((char *)this + 203680)); Random::Set((Random *)((char *)&loc_31BB0 + (_QWORD)this), 0x1418u); return Random::Set((Spg200 *)((char *)this + 203698), 0x1658u); }
Reset: PUSH RBX MOV RBX,RDI ADD RDI,0x20 MOV EDX,0x5000 XOR ESI,ESI CALL 0x001062e0 LEA RDI,[RBX + 0x5020] CALL 0x0010d5f8 LEA RDI,[RBX + 0x5050] CALL 0x0010f3b0 LEA RDI,[RBX + 0x2b6c0] CALL 0x0010bc66 LEA RDI,[RBX + 0x31ad8] CALL 0x0010ed30 LEA RDI,[RBX + 0x31ae8] CALL 0x0010cd9c LEA RDI,[RBX + 0x31b18] CALL 0x0010eae6 LEA RDI,[RBX + 0x31b28] CALL 0x0010ec00 LEA RDI,[RBX + 0x31b50] CALL 0x0010d39e LEA RDI,[RBX + 0x31b78] CALL 0x0010d128 LEA RDI,[RBX + 0x31ba0] CALL 0x0010ea64 LEA RDI,[RBX + 0x31bb0] MOV ESI,0x1418 CALL 0x0011025c ADD RBX,0x31bb2 MOV RDI,RBX MOV ESI,0x1658 POP RBX JMP 0x0011025c
/* Spg200::Reset() */ void __thiscall Spg200::Reset(Spg200 *this) { memset(this + 0x20,0,0x5000); Cpu::Reset((Cpu *)(this + 0x5020)); Ppu::Reset((Ppu *)(this + 0x5050)); Spu::Reset((Spu *)(this + 0x2b6c0)); Irq::Reset((Irq *)(this + 0x31ad8)); Timer::Reset((Timer *)(this + 0x31ae8)); Extmem::Reset((Extmem *)(this + 0x31b18)); Gpio::Reset((Gpio *)(this + 0x31b28)); Adc::Reset((Adc *)(this + 0x31b50)); Uart::Reset((Uart *)(this + 0x31b78)); Dma::Reset((Dma *)(this + 0x31ba0)); Random::Set((Random *)(this + 0x31bb0),0x1418); Random::Set((Random *)(this + 0x31bb2),0x1658); return; }
13,298
pagecache_file_set_null_hooks
eloqsql/storage/maria/ma_pagecache.c
void pagecache_file_set_null_hooks(PAGECACHE_FILE *file) { file->pre_read_hook= null_pre_hook; file->post_read_hook= null_post_read_hook; file->pre_write_hook= null_pre_hook; file->post_write_hook= null_post_write_hook; file->flush_log_callback= null_pre_hook; file->callback_data= NULL; file->head_blocks= file->big_block_size= 0; }
O0
c
pagecache_file_set_null_hooks: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax leaq 0x6d(%rip), %rcx # 0x41c20 movq %rcx, 0x18(%rax) movq -0x8(%rbp), %rax leaq 0x6e(%rip), %rcx # 0x41c30 movq %rcx, 0x20(%rax) movq -0x8(%rbp), %rax leaq 0x4f(%rip), %rcx # 0x41c20 movq %rcx, 0x28(%rax) movq -0x8(%rbp), %rax leaq 0x70(%rip), %rcx # 0x41c50 movq %rcx, 0x30(%rax) movq -0x8(%rbp), %rax leaq 0x31(%rip), %rcx # 0x41c20 movq %rcx, 0x38(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x40(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x8(%rax) movq -0x8(%rbp), %rax movq $0x0, (%rax) popq %rbp retq nopl (%rax,%rax)
pagecache_file_set_null_hooks: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] lea rcx, null_pre_hook mov [rax+18h], rcx mov rax, [rbp+var_8] lea rcx, null_post_read_hook mov [rax+20h], rcx mov rax, [rbp+var_8] lea rcx, null_pre_hook mov [rax+28h], rcx mov rax, [rbp+var_8] lea rcx, null_post_write_hook mov [rax+30h], rcx mov rax, [rbp+var_8] lea rcx, null_pre_hook mov [rax+38h], rcx mov rax, [rbp+var_8] mov qword ptr [rax+40h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+8], 0 mov rax, [rbp+var_8] mov qword ptr [rax], 0 pop rbp retn
_QWORD * pagecache_file_set_null_hooks(_QWORD *a1) { _QWORD *result; // rax a1[3] = null_pre_hook; a1[4] = null_post_read_hook; a1[5] = null_pre_hook; a1[6] = null_post_write_hook; a1[7] = null_pre_hook; a1[8] = 0LL; a1[1] = 0LL; result = a1; *a1 = 0LL; return result; }
pagecache_file_set_null_hooks: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x141c20] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x141c30] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x141c20] MOV qword ptr [RAX + 0x28],RCX MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x141c50] MOV qword ptr [RAX + 0x30],RCX MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x141c20] MOV qword ptr [RAX + 0x38],RCX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x40],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],0x0 POP RBP RET
void pagecache_file_set_null_hooks(int8 *param_1) { param_1[3] = null_pre_hook; param_1[4] = null_post_read_hook; param_1[5] = null_pre_hook; param_1[6] = null_post_write_hook; param_1[7] = null_pre_hook; param_1[8] = 0; param_1[1] = 0; *param_1 = 0; return; }
13,299
fn_format
eloqsql/mysys/mf_format.c
char * fn_format(char * to, const char *name, const char *dir, const char *extension, uint flag) { char dev[FN_REFLEN], buff[FN_REFLEN], *pos, *startpos; const char *ext; reg1 size_t length; size_t dev_length; DBUG_ENTER("fn_format"); DBUG_ASSERT(name != NULL); DBUG_ASSERT(extension != NULL); DBUG_PRINT("enter",("name: %s dir: %s extension: %s flag: %d", name,dir,extension,flag)); /* Copy and skip directory */ name+=(length=dirname_part(dev, (startpos=(char *) name), &dev_length)); if (length == 0 || (flag & MY_REPLACE_DIR)) { /* Use given directory */ convert_dirname(dev,dir,NullS); /* Fix to this OS */ } else if ((flag & MY_RELATIVE_PATH) && !test_if_hard_path(dev)) { /* Put 'dir' before the given path */ strmake_buf(buff, dev); pos=convert_dirname(dev,dir,NullS); strmake(pos,buff,sizeof(buff)-1- (int) (pos-dev)); } if (flag & MY_PACK_FILENAME) pack_dirname(dev,dev); /* Put in ./.. and ~/.. */ if (flag & MY_UNPACK_FILENAME) (void) unpack_dirname(dev,dev); /* Replace ~/.. with dir */ if (!(flag & MY_APPEND_EXT) && (pos= (char*) strchr(name,FN_EXTCHAR)) != NullS) { if ((flag & MY_REPLACE_EXT) == 0) /* If we should keep old ext */ { length=strlength(name); /* Use old extension */ ext = ""; } else { length= (size_t) (pos-(char*) name); /* Change extension */ ext= extension; } } else { length=strlength(name); /* No ext, use the now one */ ext=extension; } if (strlen(dev)+length+strlen(ext) >= FN_REFLEN || length >= FN_LEN ) { /* To long path, return original or NULL */ size_t tmp_length; if (flag & MY_SAFE_PATH) DBUG_RETURN(NullS); tmp_length= strlength(startpos); DBUG_PRINT("error",("dev: '%s' ext: '%s' length: %u",dev,ext, (uint) length)); (void) strmake(to,startpos,MY_MIN(tmp_length,FN_REFLEN-1)); } else { if (to == startpos) { bmove(buff,(uchar*) name,length); /* Save name for last copy */ name=buff; } pos=strmake(strmov(to,dev),name,length); (void) strmov(pos,ext); /* Don't convert extension */ } if (flag & MY_RETURN_REAL_PATH) (void) my_realpath(to, to, MYF(0)); else if (flag & MY_RESOLVE_SYMLINKS) { strmov(buff,to); (void) my_readlink(to, buff, MYF(0)); } DBUG_RETURN(to); }
O3
c
fn_format: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x428, %rsp # imm = 0x428 movl %r8d, %r14d movq %rcx, -0x438(%rbp) movq %rdx, %r12 movq %rsi, %r15 movq %rdi, -0x440(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq -0x230(%rbp), %rdi leaq -0x448(%rbp), %rdx callq 0x2a67d movq %rax, %r13 testq %rax, %rax setne %al testb $0x1, %r14b sete %cl testb %al, %cl je 0x3497b testb %r14b, %r14b jns 0x3498c leaq -0x230(%rbp), %rdi callq 0x2f85a testl %eax, %eax jne 0x3498c leaq -0x430(%rbp), %rdi leaq -0x230(%rbp), %rsi movl $0x1ff, %ebx # imm = 0x1FF movl $0x1ff, %edx # imm = 0x1FF callq 0x631d4 leaq -0x230(%rbp), %rdi movq %r12, %rsi xorl %edx, %edx callq 0x2a6cf movl %eax, %ecx leaq -0x230(%rbp), %rdx subl %edx, %ecx movslq %ecx, %rcx subq %rcx, %rbx movq %rax, %rdi leaq -0x430(%rbp), %rsi movq %rbx, %rdx callq 0x631d4 jmp 0x3498c leaq -0x230(%rbp), %rdi movq %r12, %rsi xorl %edx, %edx callq 0x2a6cf testb $0x8, %r14b je 0x349a1 leaq -0x230(%rbp), %rdi movq %rdi, %rsi callq 0x34d48 testb $0x4, %r14b je 0x349b6 leaq -0x230(%rbp), %rdi movq %rdi, %rsi callq 0x352ce addq %r15, %r13 btl $0x8, %r14d jb 0x34a1b movq %r13, %rdi movl $0x2e, %esi callq 0x24130 testq %rax, %rax je 0x34a1b movq %rax, %r12 testb $0x2, %r14b jne 0x34a78 movb (%r13), %al movq %r13, %rcx movq %r13, %r12 cmpb $0x20, %al je 0x34a06 movzbl %al, %eax testl %eax, %eax je 0x34a67 movzbl 0x1(%r12), %eax incq %r12 testl %eax, %eax je 0x34a57 cmpl $0x20, %eax jne 0x349f4 movq %r12, %rdx movb 0x1(%rdx), %al incq %rdx cmpb $0x20, %al je 0x34a09 movq %r12, %rcx movq %rdx, %r12 jmp 0x349e9 movb (%r13), %al movq %r13, %rcx movq %r13, %r12 cmpb $0x20, %al je 0x34a42 movzbl %al, %eax testl %eax, %eax je 0x34a75 movzbl 0x1(%r12), %eax incq %r12 testl %eax, %eax je 0x34a78 cmpl $0x20, %eax jne 0x34a30 movq %r12, %rdx movb 0x1(%rdx), %al incq %rdx cmpb $0x20, %al je 0x34a45 movq %r12, %rcx movq %rdx, %r12 jmp 0x34a25 leaq 0x3401a(%rip), %rax # 0x68a78 movq %rax, -0x438(%rbp) jmp 0x34a78 leaq 0x3400a(%rip), %rax # 0x68a78 movq %rax, -0x438(%rbp) movq %rcx, %r12 subq %r13, %r12 leaq -0x230(%rbp), %rdi callq 0x24170 movq %rax, %rbx movq -0x438(%rbp), %rdi callq 0x24170 cmpq $0xff, %r12 ja 0x34b08 addq %r12, %rbx addq %rax, %rbx cmpq $0x200, %rbx # imm = 0x200 jae 0x34b08 movq -0x440(%rbp), %rax cmpq %r15, %rax movq %rax, %r15 jne 0x34ada leaq -0x430(%rbp), %rbx movl $0x200, %ecx # imm = 0x200 movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x24280 movq %rbx, %r13 leaq -0x230(%rbp), %rsi movq %r15, %rdi callq 0x24370 movq %rax, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x631d4 movq %rax, %rdi movq -0x438(%rbp), %rsi callq 0x24300 jmp 0x34b72 testb $0x40, %r14b jne 0x34b49 movb (%r15), %cl movq %r15, %rdx movq %r15, %rax cmpb $0x20, %cl je 0x34b33 movzbl %cl, %ecx testl %ecx, %ecx je 0x34b51 movzbl 0x1(%rax), %ecx incq %rax testl %ecx, %ecx je 0x34b4e cmpl $0x20, %ecx jne 0x34b23 movq %rax, %rsi movb 0x1(%rsi), %cl incq %rsi cmpb $0x20, %cl je 0x34b36 movq %rax, %rdx movq %rsi, %rax jmp 0x34b17 xorl %r15d, %r15d jmp 0x34bac movq %rax, %rdx subq %r15, %rdx movl $0x1ff, %eax # imm = 0x1FF cmpq %rax, %rdx cmovaeq %rax, %rdx movq -0x440(%rbp), %rdi movq %r15, %rsi movq %rdi, %r15 callq 0x631d4 testb $0x20, %r14b jne 0x34b9f testb $0x10, %r14b je 0x34bac leaq -0x430(%rbp), %rbx movq %rbx, %rdi movq %r15, %rsi callq 0x24300 movq %r15, %rdi movq %rbx, %rsi xorl %edx, %edx callq 0x30f1c jmp 0x34bac movq %r15, %rdi movq %r15, %rsi xorl %edx, %edx callq 0x31079 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x34bd0 movq %r15, %rax addq $0x428, %rsp # imm = 0x428 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x243e0
fn_format: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 428h mov r14d, r8d mov [rbp+var_438], rcx mov r12, rdx mov r15, rsi mov [rbp+var_440], rdi mov rax, fs:28h mov [rbp+var_30], rax lea rdi, [rbp+var_230] lea rdx, [rbp+var_448] call dirname_part mov r13, rax test rax, rax setnz al test r14b, 1 setz cl test cl, al jz short loc_3497B test r14b, r14b jns short loc_3498C lea rdi, [rbp+var_230] call test_if_hard_path test eax, eax jnz short loc_3498C lea rdi, [rbp+var_430] lea rsi, [rbp+var_230] mov ebx, 1FFh mov edx, 1FFh call strmake lea rdi, [rbp+var_230] mov rsi, r12 xor edx, edx call convert_dirname mov ecx, eax lea rdx, [rbp+var_230] sub ecx, edx movsxd rcx, ecx sub rbx, rcx mov rdi, rax lea rsi, [rbp+var_430] mov rdx, rbx call strmake jmp short loc_3498C loc_3497B: lea rdi, [rbp+var_230] mov rsi, r12 xor edx, edx call convert_dirname loc_3498C: test r14b, 8 jz short loc_349A1 lea rdi, [rbp+var_230] mov rsi, rdi call pack_dirname loc_349A1: test r14b, 4 jz short loc_349B6 lea rdi, [rbp+var_230] mov rsi, rdi call unpack_dirname loc_349B6: add r13, r15 bt r14d, 8 jb short loc_34A1B mov rdi, r13 mov esi, 2Eh ; '.' call _strchr test rax, rax jz short loc_34A1B mov r12, rax test r14b, 2 jnz loc_34A78 mov al, [r13+0] mov rcx, r13 mov r12, r13 loc_349E9: cmp al, 20h ; ' ' jz short loc_34A06 movzx eax, al test eax, eax jz short loc_34A67 loc_349F4: movzx eax, byte ptr [r12+1] inc r12 test eax, eax jz short loc_34A57 cmp eax, 20h ; ' ' jnz short loc_349F4 loc_34A06: mov rdx, r12 loc_34A09: mov al, [rdx+1] inc rdx cmp al, 20h ; ' ' jz short loc_34A09 mov rcx, r12 mov r12, rdx jmp short loc_349E9 loc_34A1B: mov al, [r13+0] mov rcx, r13 mov r12, r13 loc_34A25: cmp al, 20h ; ' ' jz short loc_34A42 movzx eax, al test eax, eax jz short loc_34A75 loc_34A30: movzx eax, byte ptr [r12+1] inc r12 test eax, eax jz short loc_34A78 cmp eax, 20h ; ' ' jnz short loc_34A30 loc_34A42: mov rdx, r12 loc_34A45: mov al, [rdx+1] inc rdx cmp al, 20h ; ' ' jz short loc_34A45 mov rcx, r12 mov r12, rdx jmp short loc_34A25 loc_34A57: lea rax, asc_68A74+4; "" mov [rbp+var_438], rax jmp short loc_34A78 loc_34A67: lea rax, asc_68A74+4; "" mov [rbp+var_438], rax loc_34A75: mov r12, rcx loc_34A78: sub r12, r13 lea rdi, [rbp+var_230] call _strlen mov rbx, rax mov rdi, [rbp+var_438] call _strlen cmp r12, 0FFh ja short loc_34B08 add rbx, r12 add rbx, rax cmp rbx, 200h jnb short loc_34B08 mov rax, [rbp+var_440] cmp rax, r15 mov r15, rax jnz short loc_34ADA lea rbx, [rbp+var_430] mov ecx, 200h mov rdi, rbx mov rsi, r13 mov rdx, r12 call ___memmove_chk mov r13, rbx loc_34ADA: lea rsi, [rbp+var_230] mov rdi, r15 call _stpcpy mov rdi, rax mov rsi, r13 mov rdx, r12 call strmake mov rdi, rax mov rsi, [rbp+var_438] call _strcpy jmp short loc_34B72 loc_34B08: test r14b, 40h jnz short loc_34B49 mov cl, [r15] mov rdx, r15 mov rax, r15 loc_34B17: cmp cl, 20h ; ' ' jz short loc_34B33 movzx ecx, cl test ecx, ecx jz short loc_34B51 loc_34B23: movzx ecx, byte ptr [rax+1] inc rax test ecx, ecx jz short loc_34B4E cmp ecx, 20h ; ' ' jnz short loc_34B23 loc_34B33: mov rsi, rax loc_34B36: mov cl, [rsi+1] inc rsi cmp cl, 20h ; ' ' jz short loc_34B36 mov rdx, rax mov rax, rsi jmp short loc_34B17 loc_34B49: xor r15d, r15d jmp short loc_34BAC loc_34B4E: mov rdx, rax loc_34B51: sub rdx, r15 mov eax, 1FFh cmp rdx, rax cmovnb rdx, rax mov rdi, [rbp+var_440] mov rsi, r15 mov r15, rdi call strmake loc_34B72: test r14b, 20h jnz short loc_34B9F test r14b, 10h jz short loc_34BAC lea rbx, [rbp+var_430] mov rdi, rbx mov rsi, r15 call _strcpy mov rdi, r15 mov rsi, rbx xor edx, edx call my_readlink jmp short loc_34BAC loc_34B9F: mov rdi, r15 mov rsi, r15 xor edx, edx call my_realpath loc_34BAC: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_34BD0 mov rax, r15 add rsp, 428h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_34BD0: call ___stack_chk_fail
long long fn_format(_BYTE *a1, _BYTE *a2, long long a3, char *a4, __int16 a5) { long long v8; // rdx long long v9; // r13 long long v10; // rcx _WORD *v11; // rax _BYTE *v12; // r13 long long v13; // rax _BYTE *v14; // r12 char v15; // al _BYTE *v16; // rcx int v17; // eax _BYTE *v18; // rdx char v19; // al int v20; // eax _BYTE *v21; // rdx unsigned long long v22; // r12 long long v23; // rbx long long v24; // rax long long v25; // r15 long long v26; // rax long long v27; // rax char v28; // cl _BYTE *v29; // rdx _BYTE *v30; // rax int v31; // ecx _BYTE *v32; // rsi unsigned long long v33; // rdx _BYTE *v34; // rsi long long v36; // [rsp+8h] [rbp-448h] BYREF _BYTE *v37; // [rsp+10h] [rbp-440h] char *v38; // [rsp+18h] [rbp-438h] _BYTE v39[512]; // [rsp+20h] [rbp-430h] BYREF _WORD v40[256]; // [rsp+220h] [rbp-230h] BYREF unsigned long long v41; // [rsp+420h] [rbp-30h] long long savedregs; // [rsp+450h] [rbp+0h] BYREF v38 = a4; v37 = a1; v41 = __readfsqword(0x28u); v9 = dirname_part((long long)v40, a2, &v36); LOBYTE(v10) = (a5 & 1) == 0; if ( ((v9 != 0) & (unsigned __int8)v10) != 0 ) { if ( (a5 & 0x80u) != 0 && !test_if_hard_path(v40) ) { strmake(v39, v40, 511LL); v11 = convert_dirname(v40, a3, 0LL); strmake(v11, v39, 511LL - (int)((_DWORD)v11 - ((unsigned int)&savedregs - 560))); } } else { convert_dirname(v40, a3, 0LL); } if ( (a5 & 8) != 0 ) pack_dirname(v40, v40); if ( (a5 & 4) != 0 ) unpack_dirname(v40, v40); v12 = &a2[v9]; if ( (a5 & 0x100) == 0 ) { v13 = strchr(v12, 46LL, v8, v10); if ( v13 ) { v14 = (_BYTE *)v13; if ( (a5 & 2) != 0 ) goto LABEL_32; v15 = *v12; v16 = v12; v14 = v12; while ( v15 == 32 ) { LABEL_18: v18 = v14; do v15 = *++v18; while ( v15 == 32 ); v16 = v14; v14 = v18; } if ( v15 ) { while ( 1 ) { v17 = (unsigned __int8)*++v14; if ( !v17 ) break; if ( v17 == 32 ) goto LABEL_18; } v38 = ""; goto LABEL_32; } v38 = ""; LABEL_31: v14 = v16; goto LABEL_32; } } v19 = *v12; v16 = v12; v14 = v12; while ( v19 == 32 ) { LABEL_26: v21 = v14; do v19 = *++v21; while ( v19 == 32 ); v16 = v14; v14 = v21; } if ( !v19 ) goto LABEL_31; while ( 1 ) { v20 = (unsigned __int8)*++v14; if ( !v20 ) break; if ( v20 == 32 ) goto LABEL_26; } LABEL_32: v22 = v14 - v12; v23 = strlen(v40); v24 = strlen(v38); if ( v22 > 0xFF || v24 + v22 + v23 >= 0x200 ) { if ( (a5 & 0x40) != 0 ) return 0LL; v28 = *a2; v29 = a2; v30 = a2; while ( v28 == 32 ) { LABEL_43: v32 = v30; do v28 = *++v32; while ( v28 == 32 ); v29 = v30; v30 = v32; } if ( v28 ) { while ( 1 ) { v31 = (unsigned __int8)*++v30; if ( !v31 ) break; if ( v31 == 32 ) goto LABEL_43; } v29 = v30; } v33 = v29 - a2; if ( v33 >= 0x1FF ) v33 = 511LL; v34 = a2; v25 = (long long)v37; strmake(v37, v34, v33); } else { v25 = (long long)v37; if ( v37 == a2 ) { __memmove_chk(v39, v12, v22, 512LL); v12 = v39; } v26 = stpcpy(v25, v40); v27 = strmake(v26, v12, v22); strcpy(v27, v38); } if ( (a5 & 0x20) != 0 ) { my_realpath(v25, v25, 0); } else if ( (a5 & 0x10) != 0 ) { strcpy(v39, v25); my_readlink(v25, (long long)v39, 0); } return v25; }
fn_format: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x428 MOV R14D,R8D MOV qword ptr [RBP + -0x438],RCX MOV R12,RDX MOV R15,RSI MOV qword ptr [RBP + -0x440],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA RDI,[RBP + -0x230] LEA RDX,[RBP + -0x448] CALL 0x0012a67d MOV R13,RAX TEST RAX,RAX SETNZ AL TEST R14B,0x1 SETZ CL TEST CL,AL JZ 0x0013497b TEST R14B,R14B JNS 0x0013498c LEA RDI,[RBP + -0x230] CALL 0x0012f85a TEST EAX,EAX JNZ 0x0013498c LEA RDI,[RBP + -0x430] LEA RSI,[RBP + -0x230] MOV EBX,0x1ff MOV EDX,0x1ff CALL 0x001631d4 LEA RDI,[RBP + -0x230] MOV RSI,R12 XOR EDX,EDX CALL 0x0012a6cf MOV ECX,EAX LEA RDX,[RBP + -0x230] SUB ECX,EDX MOVSXD RCX,ECX SUB RBX,RCX MOV RDI,RAX LEA RSI,[RBP + -0x430] MOV RDX,RBX CALL 0x001631d4 JMP 0x0013498c LAB_0013497b: LEA RDI,[RBP + -0x230] MOV RSI,R12 XOR EDX,EDX CALL 0x0012a6cf LAB_0013498c: TEST R14B,0x8 JZ 0x001349a1 LEA RDI,[RBP + -0x230] MOV RSI,RDI CALL 0x00134d48 LAB_001349a1: TEST R14B,0x4 JZ 0x001349b6 LEA RDI,[RBP + -0x230] MOV RSI,RDI CALL 0x001352ce LAB_001349b6: ADD R13,R15 BT R14D,0x8 JC 0x00134a1b MOV RDI,R13 MOV ESI,0x2e CALL 0x00124130 TEST RAX,RAX JZ 0x00134a1b MOV R12,RAX TEST R14B,0x2 JNZ 0x00134a78 MOV AL,byte ptr [R13] MOV RCX,R13 MOV R12,R13 LAB_001349e9: CMP AL,0x20 JZ 0x00134a06 MOVZX EAX,AL TEST EAX,EAX JZ 0x00134a67 LAB_001349f4: MOVZX EAX,byte ptr [R12 + 0x1] INC R12 TEST EAX,EAX JZ 0x00134a57 CMP EAX,0x20 JNZ 0x001349f4 LAB_00134a06: MOV RDX,R12 LAB_00134a09: MOV AL,byte ptr [RDX + 0x1] INC RDX CMP AL,0x20 JZ 0x00134a09 MOV RCX,R12 MOV R12,RDX JMP 0x001349e9 LAB_00134a1b: MOV AL,byte ptr [R13] MOV RCX,R13 MOV R12,R13 LAB_00134a25: CMP AL,0x20 JZ 0x00134a42 MOVZX EAX,AL TEST EAX,EAX JZ 0x00134a75 LAB_00134a30: MOVZX EAX,byte ptr [R12 + 0x1] INC R12 TEST EAX,EAX JZ 0x00134a78 CMP EAX,0x20 JNZ 0x00134a30 LAB_00134a42: MOV RDX,R12 LAB_00134a45: MOV AL,byte ptr [RDX + 0x1] INC RDX CMP AL,0x20 JZ 0x00134a45 MOV RCX,R12 MOV R12,RDX JMP 0x00134a25 LAB_00134a57: LEA RAX,[0x168a78] MOV qword ptr [RBP + -0x438],RAX JMP 0x00134a78 LAB_00134a67: LEA RAX,[0x168a78] MOV qword ptr [RBP + -0x438],RAX LAB_00134a75: MOV R12,RCX LAB_00134a78: SUB R12,R13 LEA RDI,[RBP + -0x230] CALL 0x00124170 MOV RBX,RAX MOV RDI,qword ptr [RBP + -0x438] CALL 0x00124170 CMP R12,0xff JA 0x00134b08 ADD RBX,R12 ADD RBX,RAX CMP RBX,0x200 JNC 0x00134b08 MOV RAX,qword ptr [RBP + -0x440] CMP RAX,R15 MOV R15,RAX JNZ 0x00134ada LEA RBX,[RBP + -0x430] MOV ECX,0x200 MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 CALL 0x00124280 MOV R13,RBX LAB_00134ada: LEA RSI,[RBP + -0x230] MOV RDI,R15 CALL 0x00124370 MOV RDI,RAX MOV RSI,R13 MOV RDX,R12 CALL 0x001631d4 MOV RDI,RAX MOV RSI,qword ptr [RBP + -0x438] CALL 0x00124300 JMP 0x00134b72 LAB_00134b08: TEST R14B,0x40 JNZ 0x00134b49 MOV CL,byte ptr [R15] MOV RDX,R15 MOV RAX,R15 LAB_00134b17: CMP CL,0x20 JZ 0x00134b33 MOVZX ECX,CL TEST ECX,ECX JZ 0x00134b51 LAB_00134b23: MOVZX ECX,byte ptr [RAX + 0x1] INC RAX TEST ECX,ECX JZ 0x00134b4e CMP ECX,0x20 JNZ 0x00134b23 LAB_00134b33: MOV RSI,RAX LAB_00134b36: MOV CL,byte ptr [RSI + 0x1] INC RSI CMP CL,0x20 JZ 0x00134b36 MOV RDX,RAX MOV RAX,RSI JMP 0x00134b17 LAB_00134b49: XOR R15D,R15D JMP 0x00134bac LAB_00134b4e: MOV RDX,RAX LAB_00134b51: SUB RDX,R15 MOV EAX,0x1ff CMP RDX,RAX CMOVNC RDX,RAX MOV RDI,qword ptr [RBP + -0x440] MOV RSI,R15 MOV R15,RDI CALL 0x001631d4 LAB_00134b72: TEST R14B,0x20 JNZ 0x00134b9f TEST R14B,0x10 JZ 0x00134bac LEA RBX,[RBP + -0x430] MOV RDI,RBX MOV RSI,R15 CALL 0x00124300 MOV RDI,R15 MOV RSI,RBX XOR EDX,EDX CALL 0x00130f1c JMP 0x00134bac LAB_00134b9f: MOV RDI,R15 MOV RSI,R15 XOR EDX,EDX CALL 0x00131079 LAB_00134bac: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00134bd0 MOV RAX,R15 ADD RSP,0x428 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00134bd0: CALL 0x001243e0
char * fn_format(char *param_1,char *param_2,int8 param_3,char *param_4,uint param_5) { char *pcVar1; char *pcVar2; char cVar3; int iVar4; long lVar5; int8 uVar6; char *pcVar7; size_t sVar8; size_t sVar9; char *pcVar10; ulong uVar11; char *pcVar12; long in_FS_OFFSET; int1 local_450 [8]; char *local_448; char *local_440; char local_438 [512]; char local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_448 = param_1; local_440 = param_4; lVar5 = dirname_part(local_238,param_2,local_450); if ((param_5 & 1) == 0 && lVar5 != 0) { if (((char)param_5 < '\0') && (iVar4 = test_if_hard_path(local_238), iVar4 == 0)) { strmake(local_438,local_238,0x1ff); uVar6 = convert_dirname(local_238,param_3,0); strmake(uVar6,local_438,0x1ff - (long)((int)uVar6 - (int)local_238)); } } else { convert_dirname(local_238,param_3,0); } if ((param_5 & 8) != 0) { pack_dirname(local_238,local_238); } if ((param_5 & 4) != 0) { unpack_dirname(local_238,local_238); } pcVar12 = param_2 + lVar5; if (((param_5 >> 8 & 1) != 0) || (pcVar7 = strchr(pcVar12,0x2e), pcVar7 == (char *)0x0)) { cVar3 = *pcVar12; pcVar7 = pcVar12; pcVar10 = pcVar12; do { pcVar2 = pcVar10; if (cVar3 != ' ') { if (cVar3 == '\0') goto LAB_00134a78; do { pcVar1 = pcVar10 + 1; pcVar10 = pcVar10 + 1; pcVar7 = pcVar10; if (*pcVar1 == '\0') goto LAB_00134a78; pcVar2 = pcVar10; } while (*pcVar1 != ' '); } do { pcVar7 = pcVar2; cVar3 = pcVar10[1]; pcVar10 = pcVar10 + 1; pcVar2 = pcVar7; } while (cVar3 == ' '); } while( true ); } if ((param_5 & 2) == 0) { cVar3 = *pcVar12; pcVar7 = pcVar12; pcVar10 = pcVar12; do { pcVar2 = pcVar10; if (cVar3 != ' ') { if (cVar3 == '\0') { local_440 = ""; break; } do { pcVar7 = pcVar10 + 1; pcVar10 = pcVar10 + 1; if (*pcVar7 == '\0') { local_440 = ""; pcVar7 = pcVar10; goto LAB_00134a78; } pcVar2 = pcVar10; } while (*pcVar7 != ' '); } do { pcVar7 = pcVar2; cVar3 = pcVar10[1]; pcVar10 = pcVar10 + 1; pcVar2 = pcVar7; } while (cVar3 == ' '); } while( true ); } LAB_00134a78: uVar11 = (long)pcVar7 - (long)pcVar12; sVar8 = strlen(local_238); sVar9 = strlen(local_440); pcVar7 = local_448; if ((0xff < uVar11) || (0x1ff < sVar8 + uVar11 + sVar9)) { if ((param_5 & 0x40) == 0) { cVar3 = *param_2; pcVar12 = param_2; pcVar10 = param_2; do { pcVar2 = pcVar12; if (cVar3 != ' ') { if (cVar3 == '\0') goto LAB_00134b51; do { pcVar1 = pcVar12 + 1; pcVar12 = pcVar12 + 1; pcVar10 = pcVar12; if (*pcVar1 == '\0') goto LAB_00134b51; pcVar2 = pcVar12; } while (*pcVar1 != ' '); } do { pcVar10 = pcVar2; cVar3 = pcVar12[1]; pcVar12 = pcVar12 + 1; pcVar2 = pcVar10; } while (cVar3 == ' '); } while( true ); } pcVar7 = (char *)0x0; goto LAB_00134bac; } pcVar10 = pcVar12; if (local_448 == param_2) { pcVar10 = local_438; __memmove_chk(pcVar10,pcVar12,uVar11,0x200); } pcVar12 = stpcpy(pcVar7,local_238); pcVar12 = (char *)strmake(pcVar12,pcVar10,uVar11); strcpy(pcVar12,local_440); LAB_00134b72: if ((param_5 & 0x20) == 0) { if ((param_5 & 0x10) != 0) { strcpy(local_438,pcVar7); my_readlink(pcVar7,local_438,0); } } else { my_realpath(pcVar7,pcVar7,0); } LAB_00134bac: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return pcVar7; LAB_00134b51: uVar11 = (long)pcVar10 - (long)param_2; if (0x1fe < uVar11) { uVar11 = 0x1ff; } strmake(local_448,param_2,uVar11); goto LAB_00134b72; }