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
36,700
ma_hashtbl_delete
eloqsql/libmariadb/libmariadb/ma_hashtbl.c
my_bool ma_hashtbl_delete(MA_HASHTBL *hash,uchar *record) { uint blength,pos2,pos_hashnr,lastpos_hashnr,idx,empty_index; MA_HASHTBL_LINK *data,*lastpos,*gpos,*pos,*pos3,*empty; if (!hash->records) return(1); blength=hash->blength; data=dynamic_element(&hash->array,0,MA_HASHTBL_LINK*); /* Search after record with key */ pos=data+ hash_mask(rec_hashnr(hash,record),blength,hash->records); gpos = 0; while (pos->data != record) { gpos=pos; if (pos->next == NO_RECORD) return(1); /* Key not found */ pos=data+pos->next; } if ( --(hash->records) < hash->blength >> 1) hash->blength>>=1; hash->current_record= NO_RECORD; lastpos=data+hash->records; /* Remove link to record */ empty=pos; empty_index=(uint) (empty-data); if (gpos) gpos->next=pos->next; /* unlink current ptr */ else if (pos->next != NO_RECORD) { empty=data+(empty_index=pos->next); pos->data=empty->data; pos->next=empty->next; } if (empty == lastpos) /* last key at wrong pos or no next link */ goto exit; /* Move the last key (lastpos) */ lastpos_hashnr=rec_hashnr(hash,lastpos->data); /* pos is where lastpos should be */ pos=data+hash_mask(lastpos_hashnr,hash->blength,hash->records); if (pos == empty) /* Move to empty position. */ { empty[0]=lastpos[0]; goto exit; } pos_hashnr=rec_hashnr(hash,pos->data); /* pos3 is where the pos should be */ pos3= data+hash_mask(pos_hashnr,hash->blength,hash->records); if (pos != pos3) { /* pos is on wrong posit */ empty[0]=pos[0]; /* Save it here */ pos[0]=lastpos[0]; /* This should be here */ movelink(data,(uint) (pos-data),(uint) (pos3-data),empty_index); goto exit; } pos2= hash_mask(lastpos_hashnr,blength,hash->records+1); if (pos2 == hash_mask(pos_hashnr,blength,hash->records+1)) { /* Identical key-positions */ if (pos2 != hash->records) { empty[0]=lastpos[0]; movelink(data,(uint) (lastpos-data),(uint) (pos-data),empty_index); goto exit; } idx= (uint) (pos-data); /* Link pos->next after lastpos */ } else idx= NO_RECORD; /* Different positions merge */ empty[0]=lastpos[0]; movelink(data,idx,empty_index,pos->next); pos->next=empty_index; exit: ma_pop_dynamic(&hash->array); if (hash->free) (*hash->free)((uchar*) record); return(0); }
O0
c
ma_hashtbl_delete: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x8(%rax) jne 0x49e06 movb $0x1, -0x1(%rbp) jmp 0x4a181 movq -0x10(%rbp), %rax movl 0xc(%rax), %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x49d60 movl %eax, %edi movl -0x1c(%rbp), %esi movq -0x10(%rbp), %rax movl 0x8(%rax), %edx callq 0x49780 movl %eax, %ecx movq -0x68(%rbp), %rax movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x50(%rbp) movq $0x0, -0x48(%rbp) movq -0x50(%rbp), %rax movq 0x8(%rax), %rax cmpq -0x18(%rbp), %rax je 0x49e9c movq -0x50(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x50(%rbp), %rax cmpl $-0x1, (%rax) jne 0x49e85 movb $0x1, -0x1(%rbp) jmp 0x4a181 movq -0x38(%rbp), %rax movq -0x50(%rbp), %rcx movl (%rcx), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x50(%rbp) jmp 0x49e5d movq -0x10(%rbp), %rcx movl 0x8(%rcx), %eax addl $-0x1, %eax movl %eax, 0x8(%rcx) movq -0x10(%rbp), %rcx movl 0xc(%rcx), %ecx shrl %ecx cmpl %ecx, %eax jae 0x49ec2 movq -0x10(%rbp), %rax movl 0xc(%rax), %ecx shrl %ecx movl %ecx, 0xc(%rax) movq -0x10(%rbp), %rax movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF movq -0x38(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x8(%rcx), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x40(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, -0x30(%rbp) cmpq $0x0, -0x48(%rbp) je 0x49f12 movq -0x50(%rbp), %rax movl (%rax), %ecx movq -0x48(%rbp), %rax movl %ecx, (%rax) jmp 0x49f53 movq -0x50(%rbp), %rax cmpl $-0x1, (%rax) je 0x49f51 movq -0x38(%rbp), %rax movq -0x50(%rbp), %rcx movl (%rcx), %ecx movl %ecx, -0x30(%rbp) movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movq 0x8(%rax), %rcx movq -0x50(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x60(%rbp), %rax movl (%rax), %ecx movq -0x50(%rbp), %rax movl %ecx, (%rax) jmp 0x49f53 movq -0x60(%rbp), %rax cmpq -0x40(%rbp), %rax jne 0x49f62 jmp 0x4a157 movq -0x10(%rbp), %rdi movq -0x40(%rbp), %rax movq 0x8(%rax), %rsi callq 0x49d60 movl %eax, -0x28(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x70(%rbp) movl -0x28(%rbp), %edi movq -0x10(%rbp), %rax movl 0xc(%rax), %esi movq -0x10(%rbp), %rax movl 0x8(%rax), %edx callq 0x49780 movl %eax, %ecx movq -0x70(%rbp), %rax movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax cmpq -0x60(%rbp), %rax jne 0x49fcc movq -0x60(%rbp), %rax movq -0x40(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) jmp 0x4a157 movq -0x10(%rbp), %rdi movq -0x50(%rbp), %rax movq 0x8(%rax), %rsi callq 0x49d60 movl %eax, -0x24(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x78(%rbp) movl -0x24(%rbp), %edi movq -0x10(%rbp), %rax movl 0xc(%rax), %esi movq -0x10(%rbp), %rax movl 0x8(%rax), %edx callq 0x49780 movl %eax, %ecx movq -0x78(%rbp), %rax movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x58(%rbp) movq -0x50(%rbp), %rax cmpq -0x58(%rbp), %rax je 0x4a07a movq -0x60(%rbp), %rax movq -0x50(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x50(%rbp), %rax movq -0x40(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x38(%rbp), %rdi movq -0x50(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %esi movq -0x58(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %edx movl -0x30(%rbp), %ecx callq 0x49da0 jmp 0x4a157 movl -0x28(%rbp), %edi movl -0x1c(%rbp), %esi movq -0x10(%rbp), %rax movl 0x8(%rax), %edx addl $0x1, %edx callq 0x49780 movl %eax, -0x20(%rbp) movl -0x20(%rbp), %eax movl %eax, -0x7c(%rbp) movl -0x24(%rbp), %edi movl -0x1c(%rbp), %esi movq -0x10(%rbp), %rax movl 0x8(%rax), %edx addl $0x1, %edx callq 0x49780 movl %eax, %ecx movl -0x7c(%rbp), %eax cmpl %ecx, %eax jne 0x4a11c movl -0x20(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0x8(%rcx), %eax je 0x4a108 movq -0x60(%rbp), %rax movq -0x40(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x38(%rbp), %rdi movq -0x40(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %esi movq -0x50(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %edx movl -0x30(%rbp), %ecx callq 0x49da0 jmp 0x4a157 movq -0x50(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, -0x2c(%rbp) jmp 0x4a123 movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF movq -0x60(%rbp), %rax movq -0x40(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x38(%rbp), %rdi movl -0x2c(%rbp), %esi movl -0x30(%rbp), %edx movq -0x50(%rbp), %rax movl (%rax), %ecx callq 0x49da0 movl -0x30(%rbp), %ecx movq -0x50(%rbp), %rax movl %ecx, (%rax) movq -0x10(%rbp), %rdi addq $0x18, %rdi callq 0x47780 movq -0x10(%rbp), %rax cmpq $0x0, 0x38(%rax) je 0x4a17d movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq -0x18(%rbp), %rdi callq *%rax movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x80, %rsp popq %rbp retq nopl (%rax)
ma_hashtbl_delete: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] cmp dword ptr [rax+8], 0 jnz short loc_49E06 mov [rbp+var_1], 1 jmp loc_4A181 loc_49E06: mov rax, [rbp+var_10] mov eax, [rax+0Ch] mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_68], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call rec_hashnr mov edi, eax mov esi, [rbp+var_1C] mov rax, [rbp+var_10] mov edx, [rax+8] call hash_mask mov ecx, eax mov rax, [rbp+var_68] mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_50], rax mov [rbp+var_48], 0 loc_49E5D: mov rax, [rbp+var_50] mov rax, [rax+8] cmp rax, [rbp+var_18] jz short loc_49E9C mov rax, [rbp+var_50] mov [rbp+var_48], rax mov rax, [rbp+var_50] cmp dword ptr [rax], 0FFFFFFFFh jnz short loc_49E85 mov [rbp+var_1], 1 jmp loc_4A181 loc_49E85: mov rax, [rbp+var_38] mov rcx, [rbp+var_50] mov ecx, [rcx] shl rcx, 4 add rax, rcx mov [rbp+var_50], rax jmp short loc_49E5D loc_49E9C: mov rcx, [rbp+var_10] mov eax, [rcx+8] add eax, 0FFFFFFFFh mov [rcx+8], eax mov rcx, [rbp+var_10] mov ecx, [rcx+0Ch] shr ecx, 1 cmp eax, ecx jnb short loc_49EC2 mov rax, [rbp+var_10] mov ecx, [rax+0Ch] shr ecx, 1 mov [rax+0Ch], ecx loc_49EC2: mov rax, [rbp+var_10] mov dword ptr [rax+10h], 0FFFFFFFFh mov rax, [rbp+var_38] mov rcx, [rbp+var_10] mov ecx, [rcx+8] shl rcx, 4 add rax, rcx mov [rbp+var_40], rax mov rax, [rbp+var_50] mov [rbp+var_60], rax mov rax, [rbp+var_60] mov rcx, [rbp+var_38] sub rax, rcx sar rax, 4 mov [rbp+var_30], eax cmp [rbp+var_48], 0 jz short loc_49F12 mov rax, [rbp+var_50] mov ecx, [rax] mov rax, [rbp+var_48] mov [rax], ecx jmp short loc_49F53 loc_49F12: mov rax, [rbp+var_50] cmp dword ptr [rax], 0FFFFFFFFh jz short loc_49F51 mov rax, [rbp+var_38] mov rcx, [rbp+var_50] mov ecx, [rcx] mov [rbp+var_30], ecx mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_60], rax mov rax, [rbp+var_60] mov rcx, [rax+8] mov rax, [rbp+var_50] mov [rax+8], rcx mov rax, [rbp+var_60] mov ecx, [rax] mov rax, [rbp+var_50] mov [rax], ecx loc_49F51: jmp short $+2 loc_49F53: mov rax, [rbp+var_60] cmp rax, [rbp+var_40] jnz short loc_49F62 jmp loc_4A157 loc_49F62: mov rdi, [rbp+var_10] mov rax, [rbp+var_40] mov rsi, [rax+8] call rec_hashnr mov [rbp+var_28], eax mov rax, [rbp+var_38] mov [rbp+var_70], rax mov edi, [rbp+var_28] mov rax, [rbp+var_10] mov esi, [rax+0Ch] mov rax, [rbp+var_10] mov edx, [rax+8] call hash_mask mov ecx, eax mov rax, [rbp+var_70] mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_50], rax mov rax, [rbp+var_50] cmp rax, [rbp+var_60] jnz short loc_49FCC mov rax, [rbp+var_60] mov rcx, [rbp+var_40] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx jmp loc_4A157 loc_49FCC: mov rdi, [rbp+var_10] mov rax, [rbp+var_50] mov rsi, [rax+8] call rec_hashnr mov [rbp+var_24], eax mov rax, [rbp+var_38] mov [rbp+var_78], rax mov edi, [rbp+var_24] mov rax, [rbp+var_10] mov esi, [rax+0Ch] mov rax, [rbp+var_10] mov edx, [rax+8] call hash_mask mov ecx, eax mov rax, [rbp+var_78] mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_58], rax mov rax, [rbp+var_50] cmp rax, [rbp+var_58] jz short loc_4A07A mov rax, [rbp+var_60] mov rcx, [rbp+var_50] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rax, [rbp+var_50] mov rcx, [rbp+var_40] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rdi, [rbp+var_38] mov rax, [rbp+var_50] mov rcx, [rbp+var_38] sub rax, rcx sar rax, 4 mov esi, eax mov rax, [rbp+var_58] mov rcx, [rbp+var_38] sub rax, rcx sar rax, 4 mov edx, eax mov ecx, [rbp+var_30] call movelink jmp loc_4A157 loc_4A07A: mov edi, [rbp+var_28] mov esi, [rbp+var_1C] mov rax, [rbp+var_10] mov edx, [rax+8] add edx, 1 call hash_mask mov [rbp+var_20], eax mov eax, [rbp+var_20] mov [rbp+var_7C], eax mov edi, [rbp+var_24] mov esi, [rbp+var_1C] mov rax, [rbp+var_10] mov edx, [rax+8] add edx, 1 call hash_mask mov ecx, eax mov eax, [rbp+var_7C] cmp eax, ecx jnz short loc_4A11C mov eax, [rbp+var_20] mov rcx, [rbp+var_10] cmp eax, [rcx+8] jz short loc_4A108 mov rax, [rbp+var_60] mov rcx, [rbp+var_40] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rdi, [rbp+var_38] mov rax, [rbp+var_40] mov rcx, [rbp+var_38] sub rax, rcx sar rax, 4 mov esi, eax mov rax, [rbp+var_50] mov rcx, [rbp+var_38] sub rax, rcx sar rax, 4 mov edx, eax mov ecx, [rbp+var_30] call movelink jmp short loc_4A157 loc_4A108: mov rax, [rbp+var_50] mov rcx, [rbp+var_38] sub rax, rcx sar rax, 4 mov [rbp+var_2C], eax jmp short loc_4A123 loc_4A11C: mov [rbp+var_2C], 0FFFFFFFFh loc_4A123: mov rax, [rbp+var_60] mov rcx, [rbp+var_40] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rdi, [rbp+var_38] mov esi, [rbp+var_2C] mov edx, [rbp+var_30] mov rax, [rbp+var_50] mov ecx, [rax] call movelink mov ecx, [rbp+var_30] mov rax, [rbp+var_50] mov [rax], ecx loc_4A157: mov rdi, [rbp+var_10] add rdi, 18h call ma_pop_dynamic mov rax, [rbp+var_10] cmp qword ptr [rax+38h], 0 jz short loc_4A17D mov rax, [rbp+var_10] mov rax, [rax+38h] mov rdi, [rbp+var_18] call rax loc_4A17D: mov [rbp+var_1], 0 loc_4A181: mov al, [rbp+var_1] add rsp, 80h pop rbp retn
char ma_hashtbl_delete(long long a1, long long a2) { unsigned int v2; // eax unsigned int v3; // eax _QWORD *v5; // [rsp+20h] [rbp-60h] long long v6; // [rsp+28h] [rbp-58h] unsigned int *v7; // [rsp+30h] [rbp-50h] long long v8; // [rsp+30h] [rbp-50h] _DWORD *v9; // [rsp+38h] [rbp-48h] _QWORD *v10; // [rsp+40h] [rbp-40h] long long v11; // [rsp+48h] [rbp-38h] unsigned int v12; // [rsp+50h] [rbp-30h] int v13; // [rsp+54h] [rbp-2Ch] unsigned int v14; // [rsp+58h] [rbp-28h] unsigned int v15; // [rsp+5Ch] [rbp-24h] int v16; // [rsp+60h] [rbp-20h] unsigned int v17; // [rsp+64h] [rbp-1Ch] if ( !*(_DWORD *)(a1 + 8) ) return 1; v17 = *(_DWORD *)(a1 + 12); v11 = *(_QWORD *)(a1 + 24); v2 = rec_hashnr(a1, a2); v7 = (unsigned int *)(16LL * (unsigned int)hash_mask(v2, v17, *(_DWORD *)(a1 + 8)) + v11); v9 = 0LL; while ( *((_QWORD *)v7 + 1) != a2 ) { v9 = v7; if ( *v7 == -1 ) return 1; v7 = (unsigned int *)(16LL * *v7 + v11); } v3 = *(_DWORD *)(a1 + 8) - 1; *(_DWORD *)(a1 + 8) = v3; if ( v3 < *(_DWORD *)(a1 + 12) >> 1 ) *(_DWORD *)(a1 + 12) >>= 1; *(_DWORD *)(a1 + 16) = -1; v10 = (_QWORD *)(16LL * *(unsigned int *)(a1 + 8) + v11); v5 = v7; v12 = ((long long)v7 - v11) >> 4; if ( v9 ) { *v9 = *v7; } else if ( *v7 != -1 ) { v12 = *v7; v5 = (_QWORD *)(16LL * *v7 + v11); *((_QWORD *)v7 + 1) = v5[1]; *v7 = *(_DWORD *)v5; } if ( v5 != v10 ) { v14 = rec_hashnr(a1, v10[1]); v8 = 16LL * (unsigned int)hash_mask(v14, *(_DWORD *)(a1 + 12), *(_DWORD *)(a1 + 8)) + v11; if ( (_QWORD *)v8 == v5 ) { *v5 = *v10; v5[1] = v10[1]; } else { v15 = rec_hashnr(a1, *(_QWORD *)(v8 + 8)); v6 = 16LL * (unsigned int)hash_mask(v15, *(_DWORD *)(a1 + 12), *(_DWORD *)(a1 + 8)) + v11; if ( v8 == v6 ) { v16 = hash_mask(v14, v17, *(_DWORD *)(a1 + 8) + 1); if ( v16 == (unsigned int)hash_mask(v15, v17, *(_DWORD *)(a1 + 8) + 1) ) { if ( v16 != *(_DWORD *)(a1 + 8) ) { *v5 = *v10; v5[1] = v10[1]; movelink(v11, ((long long)v10 - v11) >> 4, (v8 - v11) >> 4, v12); goto LABEL_25; } v13 = (v8 - v11) >> 4; } else { v13 = -1; } *v5 = *v10; v5[1] = v10[1]; movelink(v11, v13, v12, *(_DWORD *)v8); *(_DWORD *)v8 = v12; goto LABEL_25; } *v5 = *(_QWORD *)v8; v5[1] = *(_QWORD *)(v8 + 8); *(_QWORD *)v8 = *v10; *(_QWORD *)(v8 + 8) = v10[1]; movelink(v11, (v8 - v11) >> 4, (v6 - v11) >> 4, v12); } } LABEL_25: ma_pop_dynamic((long long *)(a1 + 24)); if ( *(_QWORD *)(a1 + 56) ) (*(void ( **)(long long))(a1 + 56))(a2); return 0; }
ma_hashtbl_delete: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x8],0x0 JNZ 0x00149e06 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014a181 LAB_00149e06: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0xc] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x68],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00149d60 MOV EDI,EAX MOV ESI,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x8] CALL 0x00149780 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x68] MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV qword ptr [RBP + -0x48],0x0 LAB_00149e5d: MOV RAX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x18] JZ 0x00149e9c MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x50] CMP dword ptr [RAX],-0x1 JNZ 0x00149e85 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014a181 LAB_00149e85: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RCX] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX JMP 0x00149e5d LAB_00149e9c: MOV RCX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RCX + 0x8] ADD EAX,-0x1 MOV dword ptr [RCX + 0x8],EAX MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0xc] SHR ECX,0x1 CMP EAX,ECX JNC 0x00149ec2 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0xc] SHR ECX,0x1 MOV dword ptr [RAX + 0xc],ECX LAB_00149ec2: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x10],0xffffffff MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x8] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX SAR RAX,0x4 MOV dword ptr [RBP + -0x30],EAX CMP qword ptr [RBP + -0x48],0x0 JZ 0x00149f12 MOV RAX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x48] MOV dword ptr [RAX],ECX JMP 0x00149f53 LAB_00149f12: MOV RAX,qword ptr [RBP + -0x50] CMP dword ptr [RAX],-0x1 JZ 0x00149f51 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RCX] MOV dword ptr [RBP + -0x30],ECX MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x60] MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],ECX LAB_00149f51: JMP 0x00149f53 LAB_00149f53: MOV RAX,qword ptr [RBP + -0x60] CMP RAX,qword ptr [RBP + -0x40] JNZ 0x00149f62 JMP 0x0014a157 LAB_00149f62: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RAX + 0x8] CALL 0x00149d60 MOV dword ptr [RBP + -0x28],EAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x70],RAX MOV EDI,dword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x8] CALL 0x00149780 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x70] MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x60] JNZ 0x00149fcc MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX JMP 0x0014a157 LAB_00149fcc: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x50] MOV RSI,qword ptr [RAX + 0x8] CALL 0x00149d60 MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x78],RAX MOV EDI,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x8] CALL 0x00149780 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x78] MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x58] JZ 0x0014a07a MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RDI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX SAR RAX,0x4 MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX SAR RAX,0x4 MOV EDX,EAX MOV ECX,dword ptr [RBP + -0x30] CALL 0x00149da0 JMP 0x0014a157 LAB_0014a07a: MOV EDI,dword ptr [RBP + -0x28] MOV ESI,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x8] ADD EDX,0x1 CALL 0x00149780 MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x7c],EAX MOV EDI,dword ptr [RBP + -0x24] MOV ESI,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x8] ADD EDX,0x1 CALL 0x00149780 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x7c] CMP EAX,ECX JNZ 0x0014a11c MOV EAX,dword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x8] JZ 0x0014a108 MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RDI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX SAR RAX,0x4 MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX SAR RAX,0x4 MOV EDX,EAX MOV ECX,dword ptr [RBP + -0x30] CALL 0x00149da0 JMP 0x0014a157 LAB_0014a108: MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX SAR RAX,0x4 MOV dword ptr [RBP + -0x2c],EAX JMP 0x0014a123 LAB_0014a11c: MOV dword ptr [RBP + -0x2c],0xffffffff LAB_0014a123: MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RDI,qword ptr [RBP + -0x38] MOV ESI,dword ptr [RBP + -0x2c] MOV EDX,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RAX] CALL 0x00149da0 MOV ECX,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],ECX LAB_0014a157: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x18 CALL 0x00147780 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x38],0x0 JZ 0x0014a17d MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV RDI,qword ptr [RBP + -0x18] CALL RAX LAB_0014a17d: MOV byte ptr [RBP + -0x1],0x0 LAB_0014a181: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x80 POP RBP RET
int1 ma_hashtbl_delete(long param_1,long param_2) { int4 uVar1; long lVar2; int4 uVar3; uint uVar4; int4 uVar5; int iVar6; int iVar7; uint *puVar8; uint *puVar9; uint *puVar10; uint *local_68; uint *local_58; uint *local_50; uint local_38; int4 local_34; if (*(int *)(param_1 + 8) == 0) { return 1; } uVar1 = *(int4 *)(param_1 + 0xc); lVar2 = *(long *)(param_1 + 0x18); uVar3 = rec_hashnr(param_1,param_2); uVar4 = hash_mask(uVar3,uVar1,*(int4 *)(param_1 + 8)); local_50 = (uint *)0x0; while (local_58 = (uint *)(lVar2 + (ulong)uVar4 * 0x10), *(long *)(local_58 + 2) != param_2) { local_50 = local_58; if (*local_58 == 0xffffffff) { return 1; } uVar4 = *local_58; } uVar4 = *(int *)(param_1 + 8) - 1; *(uint *)(param_1 + 8) = uVar4; if (uVar4 < *(uint *)(param_1 + 0xc) >> 1) { *(uint *)(param_1 + 0xc) = *(uint *)(param_1 + 0xc) >> 1; } *(int4 *)(param_1 + 0x10) = 0xffffffff; puVar8 = (uint *)(lVar2 + (ulong)*(uint *)(param_1 + 8) * 0x10); local_68 = local_58; local_38 = (uint)((long)local_58 - lVar2 >> 4); if (local_50 == (uint *)0x0) { if (*local_58 != 0xffffffff) { local_38 = *local_58; local_68 = (uint *)(lVar2 + (ulong)local_38 * 0x10); *(int8 *)(local_58 + 2) = *(int8 *)(local_68 + 2); *local_58 = *local_68; } } else { *local_50 = *local_58; } if (local_68 != puVar8) { uVar3 = rec_hashnr(param_1,*(int8 *)(puVar8 + 2)); uVar4 = hash_mask(uVar3,*(int4 *)(param_1 + 0xc),*(int4 *)(param_1 + 8)); puVar9 = (uint *)(lVar2 + (ulong)uVar4 * 0x10); if (puVar9 == local_68) { *(int8 *)local_68 = *(int8 *)puVar8; *(int8 *)(local_68 + 2) = *(int8 *)(puVar8 + 2); } else { uVar5 = rec_hashnr(param_1,*(int8 *)(puVar9 + 2)); uVar4 = hash_mask(uVar5,*(int4 *)(param_1 + 0xc),*(int4 *)(param_1 + 8)); puVar10 = (uint *)(lVar2 + (ulong)uVar4 * 0x10); if (puVar9 == puVar10) { iVar6 = hash_mask(uVar3,uVar1,*(int *)(param_1 + 8) + 1); iVar7 = hash_mask(uVar5,uVar1,*(int *)(param_1 + 8) + 1); if (iVar6 == iVar7) { if (iVar6 != *(int *)(param_1 + 8)) { *(int8 *)local_68 = *(int8 *)puVar8; *(int8 *)(local_68 + 2) = *(int8 *)(puVar8 + 2); movelink(lVar2,(long)puVar8 - lVar2 >> 4 & 0xffffffff, (long)puVar9 - lVar2 >> 4 & 0xffffffff,local_38); goto LAB_0014a157; } local_34 = (int4)((long)puVar9 - lVar2 >> 4); } else { local_34 = 0xffffffff; } *(int8 *)local_68 = *(int8 *)puVar8; *(int8 *)(local_68 + 2) = *(int8 *)(puVar8 + 2); movelink(lVar2,local_34,local_38,*puVar9); *puVar9 = local_38; } else { *(int8 *)local_68 = *(int8 *)puVar9; *(int8 *)(local_68 + 2) = *(int8 *)(puVar9 + 2); *(int8 *)puVar9 = *(int8 *)puVar8; *(int8 *)(puVar9 + 2) = *(int8 *)(puVar8 + 2); movelink(lVar2,(long)puVar9 - lVar2 >> 4 & 0xffffffff, (long)puVar10 - lVar2 >> 4 & 0xffffffff,local_38); } } } LAB_0014a157: ma_pop_dynamic(param_1 + 0x18); if (*(long *)(param_1 + 0x38) != 0) { (**(code **)(param_1 + 0x38))(param_2); } return 0; }
36,701
ma_hashtbl_delete
eloqsql/libmariadb/libmariadb/ma_hashtbl.c
my_bool ma_hashtbl_delete(MA_HASHTBL *hash,uchar *record) { uint blength,pos2,pos_hashnr,lastpos_hashnr,idx,empty_index; MA_HASHTBL_LINK *data,*lastpos,*gpos,*pos,*pos3,*empty; if (!hash->records) return(1); blength=hash->blength; data=dynamic_element(&hash->array,0,MA_HASHTBL_LINK*); /* Search after record with key */ pos=data+ hash_mask(rec_hashnr(hash,record),blength,hash->records); gpos = 0; while (pos->data != record) { gpos=pos; if (pos->next == NO_RECORD) return(1); /* Key not found */ pos=data+pos->next; } if ( --(hash->records) < hash->blength >> 1) hash->blength>>=1; hash->current_record= NO_RECORD; lastpos=data+hash->records; /* Remove link to record */ empty=pos; empty_index=(uint) (empty-data); if (gpos) gpos->next=pos->next; /* unlink current ptr */ else if (pos->next != NO_RECORD) { empty=data+(empty_index=pos->next); pos->data=empty->data; pos->next=empty->next; } if (empty == lastpos) /* last key at wrong pos or no next link */ goto exit; /* Move the last key (lastpos) */ lastpos_hashnr=rec_hashnr(hash,lastpos->data); /* pos is where lastpos should be */ pos=data+hash_mask(lastpos_hashnr,hash->blength,hash->records); if (pos == empty) /* Move to empty position. */ { empty[0]=lastpos[0]; goto exit; } pos_hashnr=rec_hashnr(hash,pos->data); /* pos3 is where the pos should be */ pos3= data+hash_mask(pos_hashnr,hash->blength,hash->records); if (pos != pos3) { /* pos is on wrong posit */ empty[0]=pos[0]; /* Save it here */ pos[0]=lastpos[0]; /* This should be here */ movelink(data,(uint) (pos-data),(uint) (pos3-data),empty_index); goto exit; } pos2= hash_mask(lastpos_hashnr,blength,hash->records+1); if (pos2 == hash_mask(pos_hashnr,blength,hash->records+1)) { /* Identical key-positions */ if (pos2 != hash->records) { empty[0]=lastpos[0]; movelink(data,(uint) (lastpos-data),(uint) (pos-data),empty_index); goto exit; } idx= (uint) (pos-data); /* Link pos->next after lastpos */ } else idx= NO_RECORD; /* Different positions merge */ empty[0]=lastpos[0]; movelink(data,idx,empty_index,pos->next); pos->next=empty_index; exit: ma_pop_dynamic(&hash->array); if (hash->free) (*hash->free)((uchar*) record); return(0); }
O3
c
ma_hashtbl_delete: movb $0x1, %al cmpl $0x0, 0x8(%rdi) je 0x33e7c pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rsi, %rbx movq %rdi, %r14 movl 0xc(%rdi), %r12d movq 0x18(%rdi), %r13 movq 0x30(%rdi), %rax testq %rax, %rax je 0x33c10 leaq -0x58(%rbp), %r15 movq %rbx, %rdi movq %r15, %rsi xorl %edx, %edx callq *%rax movq %rax, %rdi movl (%r15), %esi jmp 0x33c1d movl 0x4(%r14), %esi movl %esi, -0x58(%rbp) movl (%r14), %edi addq %rbx, %rdi callq *0x40(%r14) movl %eax, %r15d movl 0x8(%r14), %esi leal -0x1(%r12), %r8d andl %r8d, %eax shrl %r12d decl %r12d movq %r12, -0x70(%rbp) andl %r12d, %r15d cmpl %esi, %eax cmovbl %eax, %r15d movq %r15, %rax shlq $0x4, %rax leaq (%rax,%r13), %r12 cmpq %rbx, 0x8(%r13,%rax) je 0x33c7a movl $0xffffffff, %ecx # imm = 0xFFFFFFFF movl (%r12), %r15d cmpq %rcx, %r15 je 0x33caf movq %r12, %rax movq %r15, %rdx shlq $0x4, %rdx leaq (%rdx,%r13), %r12 cmpq %rbx, 0x8(%r13,%rdx) jne 0x33c5a jmp 0x33c7c xorl %eax, %eax decl %esi movl %esi, 0x8(%r14) movl 0xc(%r14), %ecx shrl %ecx cmpl %ecx, %esi jae 0x33c90 movl %ecx, 0xc(%r14) movl $0xffffffff, 0x10(%r14) # imm = 0xFFFFFFFF movl %esi, %r9d shlq $0x4, %r9 addq %r13, %r9 movl (%r12), %ecx testq %rax, %rax je 0x33cb6 movl %ecx, (%rax) jmp 0x33cdc movb $0x1, %al jmp 0x33e6e cmpl $-0x1, %ecx je 0x33cdc movq %rcx, %rax shlq $0x4, %rax movq 0x8(%r13,%rax), %rdx movq %rdx, 0x8(%r12) movl (%r13,%rax), %edx movl %edx, (%r12) leaq (%rax,%r13), %r12 movl %ecx, %r15d leaq 0x18(%r14), %rdi cmpq %r9, %r12 je 0x33e59 movq %rdi, -0x38(%rbp) movl %r8d, -0x54(%rbp) movl %esi, -0x50(%rbp) movq %r9, -0x48(%rbp) movq 0x8(%r9), %rdi movq 0x30(%r14), %rax testq %rax, %rax movq %rbx, -0x40(%rbp) je 0x33d1b leaq -0x5c(%rbp), %rbx movq %rbx, %rsi xorl %edx, %edx callq *%rax movq %rax, %rdi movl (%rbx), %esi jmp 0x33d28 movl 0x4(%r14), %esi movl %esi, -0x5c(%rbp) movl (%r14), %eax addq %rax, %rdi callq *0x40(%r14) movl 0xc(%r14), %ebx leal -0x1(%rbx), %ecx andl %eax, %ecx shrl %ebx decl %ebx andl %eax, %ebx cmpl 0x8(%r14), %ecx cmovbl %ecx, %ebx movq %rbx, %rcx shlq $0x4, %rcx addq %r13, %rcx cmpq %r12, %rcx je 0x33d78 movl %eax, -0x4c(%rbp) movq %rcx, -0x68(%rbp) movq 0x8(%rcx), %rdi movq 0x30(%r14), %rax testq %rax, %rax je 0x33d89 leaq -0x2c(%rbp), %rsi xorl %edx, %edx callq *%rax movq %rax, %rdi leaq -0x2c(%rbp), %rax movl (%rax), %esi jmp 0x33d96 movq -0x48(%rbp), %rax movups (%rax), %xmm0 movups %xmm0, (%r12) jmp 0x33e51 movl 0x4(%r14), %esi movl %esi, -0x2c(%rbp) movl (%r14), %eax addq %rax, %rdi callq *0x40(%r14) movl 0x8(%r14), %ecx movl 0xc(%r14), %edx leal -0x1(%rdx), %esi andl %eax, %esi shrl %edx decl %edx andl %eax, %edx cmpl %ecx, %esi cmovbl %esi, %edx cmpl %edx, %ebx jne 0x33e25 leal 0x1(%rcx), %edx movl -0x4c(%rbp), %r9d movl %r9d, %esi movl -0x54(%rbp), %r8d andl %r8d, %esi movq -0x70(%rbp), %rdi andl %edi, %r9d cmpl %edx, %esi cmovbl %esi, %r9d andl %eax, %r8d andl %edi, %eax cmpl %edx, %r8d cmovbl %r8d, %eax movl $0xffffffff, %edx # imm = 0xFFFFFFFF cmpl %eax, %r9d movq -0x48(%rbp), %rax movq -0x68(%rbp), %rdi jne 0x33dfd cmpl %ecx, %r9d jne 0x33e7d movl %ebx, %edx movups (%rax), %xmm0 movups %xmm0, (%r12) movl (%rdi), %eax movl %r15d, %esi movl %esi, %ecx shlq $0x4, %rcx movl (%r13,%rcx), %esi cmpl %edx, %esi jne 0x33e0a addq %rcx, %r13 movl %eax, (%r13) movl %r15d, (%rdi) jmp 0x33e51 movq -0x68(%rbp), %rcx movups (%rcx), %xmm0 movups %xmm0, (%r12) movq -0x48(%rbp), %rax movups (%rax), %xmm0 movups %xmm0, (%rcx) movl %edx, %eax shlq $0x4, %rax movl (%r13,%rax), %edx cmpl %ebx, %edx jne 0x33e3b addq %rax, %r13 movl %r15d, (%r13) movq -0x40(%rbp), %rbx movq -0x38(%rbp), %rdi callq 0x32979 movq 0x38(%r14), %rax testq %rax, %rax je 0x33e6c movq %rbx, %rdi callq *%rax xorl %eax, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movups (%rax), %xmm0 movups %xmm0, (%r12) movl -0x50(%rbp), %ecx movl %ebx, %eax shlq $0x4, %rax movl (%r13,%rax), %ebx cmpl %ecx, %ebx jne 0x33e88 jmp 0x33e4a
ma_hashtbl_delete: mov al, 1 cmp dword ptr [rdi+8], 0 jz locret_33E7C push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov rbx, rsi mov r14, rdi mov r12d, [rdi+0Ch] mov r13, [rdi+18h] mov rax, [rdi+30h] test rax, rax jz short loc_33C10 lea r15, [rbp-58h] mov rdi, rbx mov rsi, r15 xor edx, edx call rax mov rdi, rax mov esi, [r15] jmp short loc_33C1D loc_33C10: mov esi, [r14+4] mov [rbp-58h], esi mov edi, [r14] add rdi, rbx loc_33C1D: call qword ptr [r14+40h] mov r15d, eax mov esi, [r14+8] lea r8d, [r12-1] and eax, r8d shr r12d, 1 dec r12d mov [rbp-70h], r12 and r15d, r12d cmp eax, esi cmovb r15d, eax mov rax, r15 shl rax, 4 lea r12, [rax+r13] cmp [r13+rax+8], rbx jz short loc_33C7A mov ecx, 0FFFFFFFFh loc_33C5A: mov r15d, [r12] cmp r15, rcx jz short loc_33CAF mov rax, r12 mov rdx, r15 shl rdx, 4 lea r12, [rdx+r13] cmp [r13+rdx+8], rbx jnz short loc_33C5A jmp short loc_33C7C loc_33C7A: xor eax, eax loc_33C7C: dec esi mov [r14+8], esi mov ecx, [r14+0Ch] shr ecx, 1 cmp esi, ecx jnb short loc_33C90 mov [r14+0Ch], ecx loc_33C90: mov dword ptr [r14+10h], 0FFFFFFFFh mov r9d, esi shl r9, 4 add r9, r13 mov ecx, [r12] test rax, rax jz short loc_33CB6 mov [rax], ecx jmp short loc_33CDC loc_33CAF: mov al, 1 jmp loc_33E6E loc_33CB6: cmp ecx, 0FFFFFFFFh jz short loc_33CDC mov rax, rcx shl rax, 4 mov rdx, [r13+rax+8] mov [r12+8], rdx mov edx, [r13+rax+0] mov [r12], edx lea r12, [rax+r13] mov r15d, ecx loc_33CDC: lea rdi, [r14+18h] cmp r12, r9 jz loc_33E59 mov [rbp-38h], rdi mov [rbp-54h], r8d mov [rbp-50h], esi mov [rbp-48h], r9 mov rdi, [r9+8] mov rax, [r14+30h] test rax, rax mov [rbp-40h], rbx jz short loc_33D1B lea rbx, [rbp-5Ch] mov rsi, rbx xor edx, edx call rax mov rdi, rax mov esi, [rbx] jmp short loc_33D28 loc_33D1B: mov esi, [r14+4] mov [rbp-5Ch], esi mov eax, [r14] add rdi, rax loc_33D28: call qword ptr [r14+40h] mov ebx, [r14+0Ch] lea ecx, [rbx-1] and ecx, eax shr ebx, 1 dec ebx and ebx, eax cmp ecx, [r14+8] cmovb ebx, ecx mov rcx, rbx shl rcx, 4 add rcx, r13 cmp rcx, r12 jz short loc_33D78 mov [rbp-4Ch], eax mov [rbp-68h], rcx mov rdi, [rcx+8] mov rax, [r14+30h] test rax, rax jz short loc_33D89 lea rsi, [rbp-2Ch] xor edx, edx call rax mov rdi, rax lea rax, [rbp-2Ch] mov esi, [rax] jmp short loc_33D96 loc_33D78: mov rax, [rbp-48h] movups xmm0, xmmword ptr [rax] movups xmmword ptr [r12], xmm0 jmp loc_33E51 loc_33D89: mov esi, [r14+4] mov [rbp-2Ch], esi mov eax, [r14] add rdi, rax loc_33D96: call qword ptr [r14+40h] mov ecx, [r14+8] mov edx, [r14+0Ch] lea esi, [rdx-1] and esi, eax shr edx, 1 dec edx and edx, eax cmp esi, ecx cmovb edx, esi cmp ebx, edx jnz short loc_33E25 lea edx, [rcx+1] mov r9d, [rbp-4Ch] mov esi, r9d mov r8d, [rbp-54h] and esi, r8d mov rdi, [rbp-70h] and r9d, edi cmp esi, edx cmovb r9d, esi and r8d, eax and eax, edi cmp r8d, edx cmovb eax, r8d mov edx, 0FFFFFFFFh cmp r9d, eax mov rax, [rbp-48h] mov rdi, [rbp-68h] jnz short loc_33DFD cmp r9d, ecx jnz loc_33E7D mov edx, ebx loc_33DFD: movups xmm0, xmmword ptr [rax] movups xmmword ptr [r12], xmm0 mov eax, [rdi] mov esi, r15d loc_33E0A: mov ecx, esi shl rcx, 4 mov esi, [r13+rcx+0] cmp esi, edx jnz short loc_33E0A add r13, rcx mov [r13+0], eax mov [rdi], r15d jmp short loc_33E51 loc_33E25: mov rcx, [rbp-68h] movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r12], xmm0 mov rax, [rbp-48h] movups xmm0, xmmword ptr [rax] movups xmmword ptr [rcx], xmm0 loc_33E3B: mov eax, edx shl rax, 4 mov edx, [r13+rax+0] cmp edx, ebx jnz short loc_33E3B loc_33E4A: add r13, rax mov [r13+0], r15d loc_33E51: mov rbx, [rbp-40h] mov rdi, [rbp-38h] loc_33E59: call ma_pop_dynamic mov rax, [r14+38h] test rax, rax jz short loc_33E6C mov rdi, rbx call rax loc_33E6C: xor eax, eax loc_33E6E: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp locret_33E7C: retn loc_33E7D: movups xmm0, xmmword ptr [rax] movups xmmword ptr [r12], xmm0 mov ecx, [rbp-50h] loc_33E88: mov eax, ebx shl rax, 4 mov ebx, [r13+rax+0] cmp ebx, ecx jnz short loc_33E88 jmp short loc_33E4A
char ma_hashtbl_delete(unsigned int *a1, long long a2) { char result; // al long long v3; // rbx unsigned int v5; // r12d long long v6; // r13 long long ( *v7)(long long, unsigned int *, _QWORD); // rax long long v8; // rdi long long v9; // rsi unsigned int v10; // r15d unsigned int v11; // esi unsigned int v12; // r8d unsigned int v13; // eax long long v14; // r15 unsigned int *v15; // r12 unsigned int *v16; // rax unsigned int v17; // esi unsigned int v18; // ecx long long v19; // r9 long long v20; // rcx long long v21; // rdi long long v22; // rdi long long ( *v23)(long long, unsigned int *, _QWORD); // rax long long v24; // rdi long long v25; // rsi unsigned int v26; // eax unsigned int v27; // ebx unsigned int v28; // ecx long long v29; // rbx long long v30; // rcx long long v31; // rdi long long ( *v32)(long long, unsigned int *, _QWORD); // rax long long v33; // rdi long long v34; // rsi int v35; // eax unsigned int v36; // ecx unsigned int v37; // edx unsigned int v38; // esi unsigned int v39; // edx int v40; // r9d unsigned int v41; // r8d int v42; // eax int v43; // edx unsigned int v44; // esi long long v45; // rcx long long v46; // rax void ( *v47)(long long); // rax int v48; // [rsp-78h] [rbp-78h] _DWORD *v49; // [rsp-70h] [rbp-70h] unsigned int v50; // [rsp-64h] [rbp-64h] BYREF unsigned int v51; // [rsp-60h] [rbp-60h] BYREF unsigned int v52; // [rsp-5Ch] [rbp-5Ch] unsigned int v53; // [rsp-58h] [rbp-58h] unsigned int v54; // [rsp-54h] [rbp-54h] _OWORD *v55; // [rsp-50h] [rbp-50h] long long v56; // [rsp-48h] [rbp-48h] unsigned int *v57; // [rsp-40h] [rbp-40h] unsigned int v58; // [rsp-34h] [rbp-34h] BYREF result = 1; if ( !a1[2] ) return result; v3 = a2; v5 = a1[3]; v6 = *((_QWORD *)a1 + 3); v7 = (long long ( *)(long long, unsigned int *, _QWORD))*((_QWORD *)a1 + 6); if ( v7 ) { v8 = v7(a2, &v51, 0LL); v9 = v51; } else { v9 = a1[1]; v51 = a1[1]; v8 = v3 + *a1; } v10 = (*((long long ( **)(long long, long long))a1 + 8))(v8, v9); v11 = a1[2]; v12 = v5 - 1; v13 = (v5 - 1) & v10; v48 = (v5 >> 1) - 1; v14 = v48 & v10; if ( v13 < v11 ) v14 = v13; v15 = (unsigned int *)(16 * v14 + v6); if ( *((_QWORD *)v15 + 1) == v3 ) { v16 = 0LL; LABEL_12: v17 = v11 - 1; a1[2] = v17; v18 = a1[3] >> 1; if ( v17 < v18 ) a1[3] = v18; a1[4] = -1; v19 = v6 + 16LL * v17; v20 = *v15; if ( v16 ) { *v16 = v20; } else if ( (_DWORD)v20 != -1 ) { *((_QWORD *)v15 + 1) = *(_QWORD *)(v6 + 16 * v20 + 8); *v15 = *(_DWORD *)(v6 + 16 * v20); v15 = (unsigned int *)(16 * v20 + v6); LODWORD(v14) = v20; } v21 = (long long)(a1 + 6); if ( v15 == (unsigned int *)v19 ) goto LABEL_47; v57 = a1 + 6; v52 = v12; v53 = v17; v55 = (_OWORD *)(v6 + 16LL * v17); v22 = *(_QWORD *)(v19 + 8); v23 = (long long ( *)(long long, unsigned int *, _QWORD))*((_QWORD *)a1 + 6); v56 = v3; if ( v23 ) { v24 = v23(v22, &v50, 0LL); v25 = v50; } else { v25 = a1[1]; v50 = a1[1]; v24 = *a1 + v22; } v26 = (*((long long ( **)(long long, long long))a1 + 8))(v24, v25); v27 = a1[3]; v28 = v26 & (v27 - 1); v29 = v26 & ((v27 >> 1) - 1); if ( v28 < a1[2] ) v29 = v28; v30 = v6 + 16 * v29; if ( (unsigned int *)v30 == v15 ) { *(_OWORD *)v15 = *v55; } else { v54 = v26; v49 = (_DWORD *)(v6 + 16 * v29); v31 = *(_QWORD *)(v30 + 8); v32 = (long long ( *)(long long, unsigned int *, _QWORD))*((_QWORD *)a1 + 6); if ( v32 ) { v33 = v32(v31, &v58, 0LL); v34 = v58; } else { v34 = a1[1]; v58 = a1[1]; v33 = *a1 + v31; } v35 = (*((long long ( **)(long long, long long))a1 + 8))(v33, v34); v36 = a1[2]; v37 = a1[3]; v38 = v35 & (v37 - 1); v39 = v35 & ((v37 >> 1) - 1); if ( v38 < v36 ) v39 = v38; if ( (_DWORD)v29 == v39 ) { v40 = v48 & v54; if ( (v52 & v54) < v36 + 1 ) v40 = v52 & v54; v41 = v35 & v52; v42 = v48 & v35; if ( v41 < v36 + 1 ) v42 = v41; v43 = -1; if ( v40 != v42 ) goto LABEL_40; if ( v40 == v36 ) { v43 = v29; LABEL_40: *(_OWORD *)v15 = *v55; v44 = v14; do { v45 = 16LL * v44; v44 = *(_DWORD *)(v6 + v45); } while ( v44 != v43 ); *(_DWORD *)(v45 + v6) = *v49; *v49 = v14; goto LABEL_46; } *(_OWORD *)v15 = *v55; do { v46 = 16LL * (unsigned int)v29; LODWORD(v29) = *(_DWORD *)(v6 + v46); } while ( (_DWORD)v29 != v53 ); } else { *(_OWORD *)v15 = *(_OWORD *)v49; *(_OWORD *)v49 = *v55; do { v46 = 16LL * v39; v39 = *(_DWORD *)(v6 + v46); } while ( v39 != (_DWORD)v29 ); } *(_DWORD *)(v46 + v6) = v14; } LABEL_46: v3 = v56; v21 = (long long)v57; LABEL_47: ma_pop_dynamic(v21); v47 = (void ( *)(long long))*((_QWORD *)a1 + 7); if ( v47 ) v47(v3); return 0; } while ( 1 ) { v14 = *v15; if ( v14 == 0xFFFFFFFFLL ) return 1; v16 = v15; v15 = (unsigned int *)(16 * v14 + v6); if ( *((_QWORD *)v15 + 1) == v3 ) goto LABEL_12; } }
ma_hashtbl_delete: MOV AL,0x1 CMP dword ptr [RDI + 0x8],0x0 JZ 0x00133e7c PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RBX,RSI MOV R14,RDI MOV R12D,dword ptr [RDI + 0xc] MOV R13,qword ptr [RDI + 0x18] MOV RAX,qword ptr [RDI + 0x30] TEST RAX,RAX JZ 0x00133c10 LEA R15,[RBP + -0x58] MOV RDI,RBX MOV RSI,R15 XOR EDX,EDX CALL RAX MOV RDI,RAX MOV ESI,dword ptr [R15] JMP 0x00133c1d LAB_00133c10: MOV ESI,dword ptr [R14 + 0x4] MOV dword ptr [RBP + -0x58],ESI MOV EDI,dword ptr [R14] ADD RDI,RBX LAB_00133c1d: CALL qword ptr [R14 + 0x40] MOV R15D,EAX MOV ESI,dword ptr [R14 + 0x8] LEA R8D,[R12 + -0x1] AND EAX,R8D SHR R12D,0x1 DEC R12D MOV qword ptr [RBP + -0x70],R12 AND R15D,R12D CMP EAX,ESI CMOVC R15D,EAX MOV RAX,R15 SHL RAX,0x4 LEA R12,[RAX + R13*0x1] CMP qword ptr [R13 + RAX*0x1 + 0x8],RBX JZ 0x00133c7a MOV ECX,0xffffffff LAB_00133c5a: MOV R15D,dword ptr [R12] CMP R15,RCX JZ 0x00133caf MOV RAX,R12 MOV RDX,R15 SHL RDX,0x4 LEA R12,[RDX + R13*0x1] CMP qword ptr [R13 + RDX*0x1 + 0x8],RBX JNZ 0x00133c5a JMP 0x00133c7c LAB_00133c7a: XOR EAX,EAX LAB_00133c7c: DEC ESI MOV dword ptr [R14 + 0x8],ESI MOV ECX,dword ptr [R14 + 0xc] SHR ECX,0x1 CMP ESI,ECX JNC 0x00133c90 MOV dword ptr [R14 + 0xc],ECX LAB_00133c90: MOV dword ptr [R14 + 0x10],0xffffffff MOV R9D,ESI SHL R9,0x4 ADD R9,R13 MOV ECX,dword ptr [R12] TEST RAX,RAX JZ 0x00133cb6 MOV dword ptr [RAX],ECX JMP 0x00133cdc LAB_00133caf: MOV AL,0x1 JMP 0x00133e6e LAB_00133cb6: CMP ECX,-0x1 JZ 0x00133cdc MOV RAX,RCX SHL RAX,0x4 MOV RDX,qword ptr [R13 + RAX*0x1 + 0x8] MOV qword ptr [R12 + 0x8],RDX MOV EDX,dword ptr [R13 + RAX*0x1] MOV dword ptr [R12],EDX LEA R12,[RAX + R13*0x1] MOV R15D,ECX LAB_00133cdc: LEA RDI,[R14 + 0x18] CMP R12,R9 JZ 0x00133e59 MOV qword ptr [RBP + -0x38],RDI MOV dword ptr [RBP + -0x54],R8D MOV dword ptr [RBP + -0x50],ESI MOV qword ptr [RBP + -0x48],R9 MOV RDI,qword ptr [R9 + 0x8] MOV RAX,qword ptr [R14 + 0x30] TEST RAX,RAX MOV qword ptr [RBP + -0x40],RBX JZ 0x00133d1b LEA RBX,[RBP + -0x5c] MOV RSI,RBX XOR EDX,EDX CALL RAX MOV RDI,RAX MOV ESI,dword ptr [RBX] JMP 0x00133d28 LAB_00133d1b: MOV ESI,dword ptr [R14 + 0x4] MOV dword ptr [RBP + -0x5c],ESI MOV EAX,dword ptr [R14] ADD RDI,RAX LAB_00133d28: CALL qword ptr [R14 + 0x40] MOV EBX,dword ptr [R14 + 0xc] LEA ECX,[RBX + -0x1] AND ECX,EAX SHR EBX,0x1 DEC EBX AND EBX,EAX CMP ECX,dword ptr [R14 + 0x8] CMOVC EBX,ECX MOV RCX,RBX SHL RCX,0x4 ADD RCX,R13 CMP RCX,R12 JZ 0x00133d78 MOV dword ptr [RBP + -0x4c],EAX MOV qword ptr [RBP + -0x68],RCX MOV RDI,qword ptr [RCX + 0x8] MOV RAX,qword ptr [R14 + 0x30] TEST RAX,RAX JZ 0x00133d89 LEA RSI,[RBP + -0x2c] XOR EDX,EDX CALL RAX MOV RDI,RAX LEA RAX,[RBP + -0x2c] MOV ESI,dword ptr [RAX] JMP 0x00133d96 LAB_00133d78: MOV RAX,qword ptr [RBP + -0x48] MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [R12],XMM0 JMP 0x00133e51 LAB_00133d89: MOV ESI,dword ptr [R14 + 0x4] MOV dword ptr [RBP + -0x2c],ESI MOV EAX,dword ptr [R14] ADD RDI,RAX LAB_00133d96: CALL qword ptr [R14 + 0x40] MOV ECX,dword ptr [R14 + 0x8] MOV EDX,dword ptr [R14 + 0xc] LEA ESI,[RDX + -0x1] AND ESI,EAX SHR EDX,0x1 DEC EDX AND EDX,EAX CMP ESI,ECX CMOVC EDX,ESI CMP EBX,EDX JNZ 0x00133e25 LEA EDX,[RCX + 0x1] MOV R9D,dword ptr [RBP + -0x4c] MOV ESI,R9D MOV R8D,dword ptr [RBP + -0x54] AND ESI,R8D MOV RDI,qword ptr [RBP + -0x70] AND R9D,EDI CMP ESI,EDX CMOVC R9D,ESI AND R8D,EAX AND EAX,EDI CMP R8D,EDX CMOVC EAX,R8D MOV EDX,0xffffffff CMP R9D,EAX MOV RAX,qword ptr [RBP + -0x48] MOV RDI,qword ptr [RBP + -0x68] JNZ 0x00133dfd CMP R9D,ECX JNZ 0x00133e7d MOV EDX,EBX LAB_00133dfd: MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [R12],XMM0 MOV EAX,dword ptr [RDI] MOV ESI,R15D LAB_00133e0a: MOV ECX,ESI SHL RCX,0x4 MOV ESI,dword ptr [R13 + RCX*0x1] CMP ESI,EDX JNZ 0x00133e0a ADD R13,RCX MOV dword ptr [R13],EAX MOV dword ptr [RDI],R15D JMP 0x00133e51 LAB_00133e25: MOV RCX,qword ptr [RBP + -0x68] MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R12],XMM0 MOV RAX,qword ptr [RBP + -0x48] MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [RCX],XMM0 LAB_00133e3b: MOV EAX,EDX SHL RAX,0x4 MOV EDX,dword ptr [R13 + RAX*0x1] CMP EDX,EBX JNZ 0x00133e3b LAB_00133e4a: ADD R13,RAX MOV dword ptr [R13],R15D LAB_00133e51: MOV RBX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RBP + -0x38] LAB_00133e59: CALL 0x00132979 MOV RAX,qword ptr [R14 + 0x38] TEST RAX,RAX JZ 0x00133e6c MOV RDI,RBX CALL RAX LAB_00133e6c: XOR EAX,EAX LAB_00133e6e: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP LAB_00133e7c: RET LAB_00133e7d: MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [R12],XMM0 MOV ECX,dword ptr [RBP + -0x50] LAB_00133e88: MOV EAX,EBX SHL RAX,0x4 MOV EBX,dword ptr [R13 + RAX*0x1] CMP EBX,ECX JNZ 0x00133e88 JMP 0x00133e4a
int8 ma_hashtbl_delete(uint *param_1,long param_2) { long lVar1; int8 uVar2; uint uVar3; uint uVar4; uint uVar5; long lVar6; uint *puVar7; ulong uVar8; uint uVar9; uint uVar10; uint *puVar11; uint uVar12; uint *puVar13; ulong uVar14; uint local_64; uint local_60; uint local_5c; uint local_58; uint local_54; uint *local_50; long local_48; uint *local_40; uint local_34; if (param_1[2] == 0) { return 1; } uVar9 = param_1[3]; lVar1 = *(long *)(param_1 + 6); if (*(code **)(param_1 + 0xc) == (code *)0x0) { local_60 = param_1[1]; lVar6 = (ulong)*param_1 + param_2; } else { lVar6 = (**(code **)(param_1 + 0xc))(param_2,&local_60,0); } uVar3 = (**(code **)(param_1 + 0x10))(lVar6,local_60); uVar4 = uVar9 - 1; uVar12 = (uVar9 >> 1) - 1; uVar9 = uVar3 & uVar12; if ((uVar3 & uVar4) < param_1[2]) { uVar9 = uVar3 & uVar4; } uVar14 = (ulong)uVar9; puVar13 = (uint *)(uVar14 * 0x10 + lVar1); if (*(long *)(lVar1 + 8 + uVar14 * 0x10) == param_2) { puVar7 = (uint *)0x0; } else { do { puVar7 = puVar13; uVar14 = (ulong)*puVar7; if (uVar14 == 0xffffffff) { return 1; } puVar13 = (uint *)(uVar14 * 0x10 + lVar1); } while (*(long *)(lVar1 + 8 + uVar14 * 0x10) != param_2); } uVar9 = param_1[2] - 1; param_1[2] = uVar9; if (uVar9 < param_1[3] >> 1) { param_1[3] = param_1[3] >> 1; } param_1[4] = 0xffffffff; puVar11 = (uint *)((ulong)uVar9 * 0x10 + lVar1); uVar3 = *puVar13; if (puVar7 == (uint *)0x0) { if (uVar3 != 0xffffffff) { lVar6 = (ulong)uVar3 * 0x10; *(int8 *)(puVar13 + 2) = *(int8 *)(lVar1 + 8 + lVar6); *puVar13 = *(uint *)(lVar1 + lVar6); puVar13 = (uint *)(lVar6 + lVar1); uVar14 = (ulong)uVar3; } } else { *puVar7 = uVar3; } puVar7 = param_1 + 6; if (puVar13 != puVar11) { local_5c = uVar4; local_58 = uVar9; local_50 = puVar11; local_48 = param_2; local_40 = puVar7; if (*(code **)(param_1 + 0xc) == (code *)0x0) { local_64 = param_1[1]; lVar6 = *(long *)(puVar11 + 2) + (ulong)*param_1; } else { lVar6 = (**(code **)(param_1 + 0xc))(*(long *)(puVar11 + 2),&local_64,0); } uVar4 = (**(code **)(param_1 + 0x10))(lVar6,local_64); uVar3 = param_1[3] - 1 & uVar4; uVar9 = (param_1[3] >> 1) - 1 & uVar4; if (uVar3 < param_1[2]) { uVar9 = uVar3; } uVar8 = (ulong)uVar9; puVar11 = (uint *)(uVar8 * 0x10 + lVar1); if (puVar11 == puVar13) { uVar9 = local_50[1]; uVar4 = local_50[2]; uVar3 = local_50[3]; *puVar13 = *local_50; puVar13[1] = uVar9; puVar13[2] = uVar4; puVar13[3] = uVar3; param_2 = local_48; puVar7 = local_40; } else { local_54 = uVar4; if (*(code **)(param_1 + 0xc) == (code *)0x0) { local_34 = param_1[1]; lVar6 = *(long *)(puVar11 + 2) + (ulong)*param_1; } else { lVar6 = (**(code **)(param_1 + 0xc))(*(long *)(puVar11 + 2),&local_34,0); } uVar5 = (**(code **)(param_1 + 0x10))(lVar6,local_34); uVar4 = param_1[2]; uVar10 = param_1[3] - 1 & uVar5; uVar3 = (param_1[3] >> 1) - 1 & uVar5; if (uVar10 < uVar4) { uVar3 = uVar10; } uVar10 = (uint)uVar14; param_2 = local_48; puVar7 = local_40; if (uVar9 == uVar3) { uVar3 = local_54 & uVar12; if ((local_54 & local_5c) < uVar4 + 1) { uVar3 = local_54 & local_5c; } uVar12 = uVar5 & uVar12; if ((local_5c & uVar5) < uVar4 + 1) { uVar12 = local_5c & uVar5; } uVar5 = 0xffffffff; if ((uVar3 != uVar12) || (uVar5 = uVar9, uVar3 == uVar4)) { uVar9 = local_50[1]; uVar4 = local_50[2]; uVar3 = local_50[3]; *puVar13 = *local_50; puVar13[1] = uVar9; puVar13[2] = uVar4; puVar13[3] = uVar3; do { lVar6 = uVar14 * 0x10; uVar9 = *(uint *)(lVar1 + lVar6); uVar14 = (ulong)uVar9; } while (uVar9 != uVar5); *(uint *)(lVar1 + lVar6) = *puVar11; *puVar11 = uVar10; goto LAB_00133e59; } uVar9 = local_50[1]; uVar4 = local_50[2]; uVar3 = local_50[3]; *puVar13 = *local_50; puVar13[1] = uVar9; puVar13[2] = uVar4; puVar13[3] = uVar3; do { lVar6 = uVar8 * 0x10; uVar8 = (ulong)*(uint *)(lVar1 + lVar6); } while (*(uint *)(lVar1 + lVar6) != local_58); } else { uVar2 = *(int8 *)(puVar11 + 2); *(int8 *)puVar13 = *(int8 *)puVar11; *(int8 *)(puVar13 + 2) = uVar2; uVar4 = local_50[1]; uVar12 = local_50[2]; uVar5 = local_50[3]; *puVar11 = *local_50; puVar11[1] = uVar4; puVar11[2] = uVar12; puVar11[3] = uVar5; do { lVar6 = (ulong)uVar3 * 0x10; uVar3 = *(uint *)(lVar1 + lVar6); } while (uVar3 != uVar9); } *(uint *)(lVar1 + lVar6) = uVar10; } } LAB_00133e59: ma_pop_dynamic(puVar7); if (*(code **)(param_1 + 0xe) != (code *)0x0) { (**(code **)(param_1 + 0xe))(param_2); } return 0; }
36,702
change_key_cache_param
eloqsql/mysys/mf_keycache.c
void change_key_cache_param(KEY_CACHE *keycache, uint division_limit, uint age_threshold) { if (keycache->key_cache_inited) { pthread_mutex_lock(&keycache->op_lock); keycache->interface_funcs->change_param(keycache->keycache_cb, division_limit, age_threshold); pthread_mutex_unlock(&keycache->op_lock); } }
O0
c
change_key_cache_param: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movq -0x8(%rbp), %rax cmpb $0x0, 0x48(%rax) je 0xe4a02 movq -0x8(%rbp), %rdi addq $0x58, %rdi callq 0x2a220 movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq 0x10(%rax), %rax movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rdi movl -0xc(%rbp), %esi movl -0x10(%rbp), %edx callq *%rax movq -0x8(%rbp), %rdi addq $0x58, %rdi callq 0x2a1f0 addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
change_key_cache_param: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov rax, [rbp+var_8] cmp byte ptr [rax+48h], 0 jz short loc_E4A02 mov rdi, [rbp+var_8] add rdi, 58h ; 'X' call _pthread_mutex_lock mov rax, [rbp+var_8] mov rax, [rax+10h] mov rax, [rax+10h] mov rcx, [rbp+var_8] mov rdi, [rcx+8] mov esi, [rbp+var_C] mov edx, [rbp+var_10] call rax mov rdi, [rbp+var_8] add rdi, 58h ; 'X' call _pthread_mutex_unlock loc_E4A02: add rsp, 10h pop rbp retn
long long change_key_cache_param(long long a1, unsigned int a2, unsigned int a3) { long long result; // rax result = a1; if ( *(_BYTE *)(a1 + 72) ) { pthread_mutex_lock(a1 + 88); (*(void ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)(a1 + 16) + 16LL))(*(_QWORD *)(a1 + 8), a2, a3); return pthread_mutex_unlock(a1 + 88); } return result; }
change_key_cache_param: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x48],0x0 JZ 0x001e4a02 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x58 CALL 0x0012a220 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x8] MOV ESI,dword ptr [RBP + -0xc] MOV EDX,dword ptr [RBP + -0x10] CALL RAX MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x58 CALL 0x0012a1f0 LAB_001e4a02: ADD RSP,0x10 POP RBP RET
void change_key_cache_param(long param_1,int4 param_2,int4 param_3) { if (*(char *)(param_1 + 0x48) != '\0') { pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x58)); (**(code **)(*(long *)(param_1 + 0x10) + 0x10))(*(int8 *)(param_1 + 8),param_2,param_3); pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x58)); } return; }
36,703
test_memory_instruments()
eloqsql/storage/perfschema/unittest/pfs-t.cc
void test_memory_instruments() { PSI *psi; PSI_thread *owner; diag("test_memory_instruments"); psi= load_perfschema(); PSI_memory_key memory_key_A; PSI_memory_info all_memory[]= { { & memory_key_A, "M-A", 0} }; PSI_thread_key thread_key_1; PSI_thread_info all_thread[]= { { & thread_key_1, "T-1", 0} }; psi->register_memory("test", all_memory, 1); psi->register_thread("test", all_thread, 1); PFS_memory_class *memory_class_A; PSI_thread *thread_1; PSI_memory_key key; /* Preparation */ thread_1= psi->new_thread(thread_key_1, NULL, 0); ok(thread_1 != NULL, "T-1"); psi->set_thread_id(thread_1, 1); memory_class_A= find_memory_class(memory_key_A); ok(memory_class_A != NULL, "memory info A"); /* Pretend thread T-1 is running, and enabled */ /* ------------------------------------------ */ psi->set_thread(thread_1); setup_thread(thread_1, true); /* Enable all instruments */ memory_class_A->m_enabled= true; /* for coverage, need to print stats collected. */ key= psi->memory_alloc(memory_key_A, 100, & owner); ok(key == memory_key_A, "alloc memory info A"); key= psi->memory_realloc(memory_key_A, 100, 200, & owner); ok(key == memory_key_A, "realloc memory info A"); key= psi->memory_realloc(memory_key_A, 200, 300, & owner); ok(key == memory_key_A, "realloc up memory info A"); key= psi->memory_realloc(memory_key_A, 300, 50, & owner); ok(key == memory_key_A, "realloc down memory info A"); psi->memory_free(memory_key_A, 50, owner); /* Use global instrumentation only */ /* ------------------------------- */ flag_thread_instrumentation= false; key= psi->memory_alloc(memory_key_A, 100, & owner); ok(key == memory_key_A, "alloc memory info A"); key= psi->memory_realloc(memory_key_A, 100, 200, & owner); ok(key == memory_key_A, "realloc memory info A"); key= psi->memory_realloc(memory_key_A, 200, 300, & owner); ok(key == memory_key_A, "realloc up memory info A"); key= psi->memory_realloc(memory_key_A, 300, 50, & owner); ok(key == memory_key_A, "realloc down memory info A"); psi->memory_free(memory_key_A, 50, owner); /* Garbage, for robustness */ /* ----------------------- */ key= psi->memory_alloc(9999, 100, & owner); ok(key == PSI_NOT_INSTRUMENTED, "alloc with unknown key"); key= psi->memory_realloc(PSI_NOT_INSTRUMENTED, 100, 200, & owner); ok(key == PSI_NOT_INSTRUMENTED, "realloc with unknown key"); psi->memory_free(PSI_NOT_INSTRUMENTED, 200, owner); shutdown_performance_schema(); }
O0
cpp
test_memory_instruments(): pushq %rbp movq %rsp, %rbp subq $0x70, %rsp leaq 0x84300(%rip), %rdi # 0xb2a5f movb $0x0, %al callq 0x2f190 callq 0x29e40 movq %rax, -0x8(%rbp) leaq -0x14(%rbp), %rax movq %rax, -0x30(%rbp) leaq 0x83c8e(%rip), %rax # 0xb240c movq %rax, -0x28(%rbp) movl $0x0, -0x20(%rbp) leaq -0x34(%rbp), %rax movq %rax, -0x50(%rbp) leaq 0x83c89(%rip), %rax # 0xb2421 movq %rax, -0x48(%rbp) movl $0x0, -0x40(%rbp) movq -0x8(%rbp), %rax movq 0x3d8(%rax), %rax leaq -0x30(%rbp), %rsi leaq 0x83c6c(%rip), %rdi # 0xb2425 movl $0x1, %edx callq *%rax movq -0x8(%rbp), %rax movq 0x18(%rax), %rax leaq -0x50(%rbp), %rsi leaq 0x83c52(%rip), %rdi # 0xb2425 movl $0x1, %edx callq *%rax movq -0x8(%rbp), %rax movq 0xc8(%rax), %rax movl -0x34(%rbp), %edi xorl %ecx, %ecx movl %ecx, %edx movq %rdx, %rsi callq *%rax movq %rax, -0x60(%rbp) cmpq $0x0, -0x60(%rbp) setne %al andb $0x1, %al movzbl %al, %edi leaq 0x83c18(%rip), %rsi # 0xb2421 movb $0x0, %al callq 0x2f450 movq -0x8(%rbp), %rax movq 0xd0(%rax), %rax movq -0x60(%rbp), %rdi movl $0x1, %esi callq *%rax movl -0x14(%rbp), %edi callq 0x43d20 movq %rax, -0x58(%rbp) cmpq $0x0, -0x58(%rbp) setne %al andb $0x1, %al movzbl %al, %edi leaq 0x84239(%rip), %rsi # 0xb2a7f movb $0x0, %al callq 0x2f450 movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movq -0x60(%rbp), %rdi callq *%rax movq -0x60(%rbp), %rdi movl $0x1, %esi callq 0x299f0 movq -0x58(%rbp), %rax movb $0x1, 0x4(%rax) movq -0x8(%rbp), %rax movq 0x3e0(%rax), %rax movl -0x14(%rbp), %edi movl $0x64, %esi leaq -0x10(%rbp), %rdx callq *%rax movl %eax, -0x64(%rbp) movl -0x64(%rbp), %eax cmpl -0x14(%rbp), %eax sete %al andb $0x1, %al movzbl %al, %edi leaq 0x841d4(%rip), %rsi # 0xb2a79 movb $0x0, %al callq 0x2f450 movq -0x8(%rbp), %rax movq 0x3e8(%rax), %rax movl -0x14(%rbp), %edi movl $0x64, %esi movl $0xc8, %edx leaq -0x10(%rbp), %rcx callq *%rax movl %eax, -0x64(%rbp) movl -0x64(%rbp), %eax cmpl -0x14(%rbp), %eax sete %al andb $0x1, %al movzbl %al, %edi leaq 0x84195(%rip), %rsi # 0xb2a77 movb $0x0, %al callq 0x2f450 movq -0x8(%rbp), %rax movq 0x3e8(%rax), %rax movl -0x14(%rbp), %edi movl $0xc8, %esi movl $0x12c, %edx # imm = 0x12C leaq -0x10(%rbp), %rcx callq *%rax movl %eax, -0x64(%rbp) movl -0x64(%rbp), %eax cmpl -0x14(%rbp), %eax sete %al andb $0x1, %al movzbl %al, %edi leaq 0x8416e(%rip), %rsi # 0xb2a8d movb $0x0, %al callq 0x2f450 movq -0x8(%rbp), %rax movq 0x3e8(%rax), %rax movl -0x14(%rbp), %edi movl $0x12c, %esi # imm = 0x12C movl $0x32, %edx leaq -0x10(%rbp), %rcx callq *%rax movl %eax, -0x64(%rbp) movl -0x64(%rbp), %eax cmpl -0x14(%rbp), %eax sete %al andb $0x1, %al movzbl %al, %edi leaq 0x8414a(%rip), %rsi # 0xb2aa6 movb $0x0, %al callq 0x2f450 movq -0x8(%rbp), %rax movq 0x3f8(%rax), %rax movl -0x14(%rbp), %edi movq -0x10(%rbp), %rdx movl $0x32, %esi callq *%rax leaq 0x3dfb3d(%rip), %rax # 0x40e4c0 movb $0x0, (%rax) movq -0x8(%rbp), %rax movq 0x3e0(%rax), %rax movl -0x14(%rbp), %edi movl $0x64, %esi leaq -0x10(%rbp), %rdx callq *%rax movl %eax, -0x64(%rbp) movl -0x64(%rbp), %eax cmpl -0x14(%rbp), %eax sete %al andb $0x1, %al movzbl %al, %edi leaq 0x840c2(%rip), %rsi # 0xb2a79 movb $0x0, %al callq 0x2f450 movq -0x8(%rbp), %rax movq 0x3e8(%rax), %rax movl -0x14(%rbp), %edi movl $0x64, %esi movl $0xc8, %edx leaq -0x10(%rbp), %rcx callq *%rax movl %eax, -0x64(%rbp) movl -0x64(%rbp), %eax cmpl -0x14(%rbp), %eax sete %al andb $0x1, %al movzbl %al, %edi leaq 0x84083(%rip), %rsi # 0xb2a77 movb $0x0, %al callq 0x2f450 movq -0x8(%rbp), %rax movq 0x3e8(%rax), %rax movl -0x14(%rbp), %edi movl $0xc8, %esi movl $0x12c, %edx # imm = 0x12C leaq -0x10(%rbp), %rcx callq *%rax movl %eax, -0x64(%rbp) movl -0x64(%rbp), %eax cmpl -0x14(%rbp), %eax sete %al andb $0x1, %al movzbl %al, %edi leaq 0x8405c(%rip), %rsi # 0xb2a8d movb $0x0, %al callq 0x2f450 movq -0x8(%rbp), %rax movq 0x3e8(%rax), %rax movl -0x14(%rbp), %edi movl $0x12c, %esi # imm = 0x12C movl $0x32, %edx leaq -0x10(%rbp), %rcx callq *%rax movl %eax, -0x64(%rbp) movl -0x64(%rbp), %eax cmpl -0x14(%rbp), %eax sete %al andb $0x1, %al movzbl %al, %edi leaq 0x84038(%rip), %rsi # 0xb2aa6 movb $0x0, %al callq 0x2f450 movq -0x8(%rbp), %rax movq 0x3f8(%rax), %rax movl -0x14(%rbp), %edi movq -0x10(%rbp), %rdx movl $0x32, %esi callq *%rax movq -0x8(%rbp), %rax movl $0x270f, %edi # imm = 0x270F movl $0x64, %esi leaq -0x10(%rbp), %rdx callq *0x3e0(%rax) movl %eax, -0x64(%rbp) cmpl $0x0, -0x64(%rbp) sete %al andb $0x1, %al movzbl %al, %edi leaq 0x84007(%rip), %rsi # 0xb2ac3 movb $0x0, %al callq 0x2f450 movq -0x8(%rbp), %rax xorl %edi, %edi movl $0x64, %esi movl $0xc8, %edx leaq -0x10(%rbp), %rcx callq *0x3e8(%rax) movl %eax, -0x64(%rbp) cmpl $0x0, -0x64(%rbp) sete %al andb $0x1, %al movzbl %al, %edi leaq 0x83fce(%rip), %rsi # 0xb2ac1 movb $0x0, %al callq 0x2f450 movq -0x8(%rbp), %rax movq 0x3f8(%rax), %rax movq -0x10(%rbp), %rdx xorl %edi, %edi movl $0xc8, %esi callq *%rax callq 0x475b0 addq $0x70, %rsp popq %rbp retq nopl (%rax)
_Z23test_memory_instrumentsv: push rbp mov rbp, rsp sub rsp, 70h lea rdi, aTestMemoryInst; "test_memory_instruments" mov al, 0 call diag call _Z15load_perfschemav; load_perfschema(void) mov [rbp+var_8], rax lea rax, [rbp+var_14] mov [rbp+var_30], rax lea rax, aMA; "M-A" mov [rbp+var_28], rax mov [rbp+var_20], 0 lea rax, [rbp+var_34] mov [rbp+var_50], rax lea rax, aT1; "T-1" mov [rbp+var_48], rax mov [rbp+var_40], 0 mov rax, [rbp+var_8] mov rax, [rax+3D8h] lea rsi, [rbp+var_30] lea rdi, aTest; "test" mov edx, 1 call rax mov rax, [rbp+var_8] mov rax, [rax+18h] lea rsi, [rbp+var_50] lea rdi, aTest; "test" mov edx, 1 call rax mov rax, [rbp+var_8] mov rax, [rax+0C8h] mov edi, [rbp+var_34] xor ecx, ecx mov edx, ecx mov rsi, rdx call rax mov [rbp+var_60], rax cmp [rbp+var_60], 0 setnz al and al, 1 movzx edi, al lea rsi, aT1; "T-1" mov al, 0 call ok mov rax, [rbp+var_8] mov rax, [rax+0D0h] mov rdi, [rbp+var_60] mov esi, 1 call rax mov edi, [rbp+var_14]; unsigned int call _Z17find_memory_classj; find_memory_class(uint) mov [rbp+var_58], rax cmp [rbp+var_58], 0 setnz al and al, 1 movzx edi, al lea rsi, aReallocMemoryI+8; "memory info A" mov al, 0 call ok mov rax, [rbp+var_8] mov rax, [rax+130h] mov rdi, [rbp+var_60] call rax mov rdi, [rbp+var_60] mov esi, 1 call _Z12setup_threadP10PSI_threadb; setup_thread(PSI_thread *,bool) mov rax, [rbp+var_58] mov byte ptr [rax+4], 1 mov rax, [rbp+var_8] mov rax, [rax+3E0h] mov edi, [rbp+var_14] mov esi, 64h ; 'd' lea rdx, [rbp+var_10] call rax mov [rbp+var_64], eax mov eax, [rbp+var_64] cmp eax, [rbp+var_14] setz al and al, 1 movzx edi, al lea rsi, aReallocMemoryI+2; "alloc memory info A" mov al, 0 call ok mov rax, [rbp+var_8] mov rax, [rax+3E8h] mov edi, [rbp+var_14] mov esi, 64h ; 'd' mov edx, 0C8h lea rcx, [rbp+var_10] call rax mov [rbp+var_64], eax mov eax, [rbp+var_64] cmp eax, [rbp+var_14] setz al and al, 1 movzx edi, al lea rsi, aReallocMemoryI; "realloc memory info A" mov al, 0 call ok mov rax, [rbp+var_8] mov rax, [rax+3E8h] mov edi, [rbp+var_14] mov esi, 0C8h mov edx, 12Ch lea rcx, [rbp+var_10] call rax mov [rbp+var_64], eax mov eax, [rbp+var_64] cmp eax, [rbp+var_14] setz al and al, 1 movzx edi, al lea rsi, aReallocUpMemor; "realloc up memory info A" mov al, 0 call ok mov rax, [rbp+var_8] mov rax, [rax+3E8h] mov edi, [rbp+var_14] mov esi, 12Ch mov edx, 32h ; '2' lea rcx, [rbp+var_10] call rax mov [rbp+var_64], eax mov eax, [rbp+var_64] cmp eax, [rbp+var_14] setz al and al, 1 movzx edi, al lea rsi, aReallocDownMem; "realloc down memory info A" mov al, 0 call ok mov rax, [rbp+var_8] mov rax, [rax+3F8h] mov edi, [rbp+var_14] mov rdx, [rbp+var_10] mov esi, 32h ; '2' call rax lea rax, flag_thread_instrumentation mov byte ptr [rax], 0 mov rax, [rbp+var_8] mov rax, [rax+3E0h] mov edi, [rbp+var_14] mov esi, 64h ; 'd' lea rdx, [rbp+var_10] call rax mov [rbp+var_64], eax mov eax, [rbp+var_64] cmp eax, [rbp+var_14] setz al and al, 1 movzx edi, al lea rsi, aReallocMemoryI+2; "alloc memory info A" mov al, 0 call ok mov rax, [rbp+var_8] mov rax, [rax+3E8h] mov edi, [rbp+var_14] mov esi, 64h ; 'd' mov edx, 0C8h lea rcx, [rbp+var_10] call rax mov [rbp+var_64], eax mov eax, [rbp+var_64] cmp eax, [rbp+var_14] setz al and al, 1 movzx edi, al lea rsi, aReallocMemoryI; "realloc memory info A" mov al, 0 call ok mov rax, [rbp+var_8] mov rax, [rax+3E8h] mov edi, [rbp+var_14] mov esi, 0C8h mov edx, 12Ch lea rcx, [rbp+var_10] call rax mov [rbp+var_64], eax mov eax, [rbp+var_64] cmp eax, [rbp+var_14] setz al and al, 1 movzx edi, al lea rsi, aReallocUpMemor; "realloc up memory info A" mov al, 0 call ok mov rax, [rbp+var_8] mov rax, [rax+3E8h] mov edi, [rbp+var_14] mov esi, 12Ch mov edx, 32h ; '2' lea rcx, [rbp+var_10] call rax mov [rbp+var_64], eax mov eax, [rbp+var_64] cmp eax, [rbp+var_14] setz al and al, 1 movzx edi, al lea rsi, aReallocDownMem; "realloc down memory info A" mov al, 0 call ok mov rax, [rbp+var_8] mov rax, [rax+3F8h] mov edi, [rbp+var_14] mov rdx, [rbp+var_10] mov esi, 32h ; '2' call rax mov rax, [rbp+var_8] mov edi, 270Fh mov esi, 64h ; 'd' lea rdx, [rbp+var_10] call qword ptr [rax+3E0h] mov [rbp+var_64], eax cmp [rbp+var_64], 0 setz al and al, 1 movzx edi, al lea rsi, aReallocWithUnk+2; "alloc with unknown key" mov al, 0 call ok mov rax, [rbp+var_8] xor edi, edi mov esi, 64h ; 'd' mov edx, 0C8h lea rcx, [rbp+var_10] call qword ptr [rax+3E8h] mov [rbp+var_64], eax cmp [rbp+var_64], 0 setz al and al, 1 movzx edi, al lea rsi, aReallocWithUnk; "realloc with unknown key" mov al, 0 call ok mov rax, [rbp+var_8] mov rax, [rax+3F8h] mov rdx, [rbp+var_10] xor edi, edi mov esi, 0C8h call rax call _Z27shutdown_performance_schemav; shutdown_performance_schema(void) add rsp, 70h pop rbp retn
long long test_memory_instruments(long long a1, int a2, int a3, int a4, int a5, int a6) { int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d int v10; // edx int v11; // ecx int v12; // r8d int v13; // r9d int v14; // eax int v15; // edx int v16; // ecx int v17; // r8d int v18; // r9d int v19; // eax int v20; // edx int v21; // ecx int v22; // r8d int v23; // r9d int v24; // eax int v25; // edx int v26; // ecx int v27; // r8d int v28; // r9d int v29; // eax int v30; // edx int v31; // ecx int v32; // r8d int v33; // r9d int v34; // eax int v35; // edx int v36; // ecx int v37; // r8d int v38; // r9d int v39; // eax int v40; // edx int v41; // ecx int v42; // r8d int v43; // r9d int v44; // eax int v45; // edx int v46; // ecx int v47; // r8d int v48; // r9d int v49; // eax int v50; // edx int v51; // ecx int v52; // r8d int v53; // r9d int v54; // eax int v55; // edx int v56; // ecx int v57; // r8d int v58; // r9d int v59; // edx int v60; // ecx int v61; // r8d int v62; // r9d int v64; // [rsp+Ch] [rbp-64h] long long v65; // [rsp+10h] [rbp-60h] long long memory_class; // [rsp+18h] [rbp-58h] _QWORD v67[2]; // [rsp+20h] [rbp-50h] BYREF int v68; // [rsp+30h] [rbp-40h] unsigned int v69; // [rsp+3Ch] [rbp-34h] BYREF _QWORD v70[2]; // [rsp+40h] [rbp-30h] BYREF int v71; // [rsp+50h] [rbp-20h] unsigned int v72; // [rsp+5Ch] [rbp-14h] BYREF long long v73; // [rsp+60h] [rbp-10h] BYREF long long perfschema; // [rsp+68h] [rbp-8h] diag((unsigned int)"test_memory_instruments", a2, a3, a4, a5, a6); perfschema = load_perfschema(); v70[0] = &v72; v70[1] = "M-A"; v71 = 0; v67[0] = &v69; v67[1] = "T-1"; v68 = 0; (*(void ( **)(const char *, _QWORD *, long long))(perfschema + 984))("test", v70, 1LL); (*(void ( **)(const char *, _QWORD *, long long))(perfschema + 24))("test", v67, 1LL); v65 = (*(long long ( **)(_QWORD, _QWORD))(perfschema + 200))(v69, 0LL); ok(v65 != 0, (unsigned int)"T-1", v6, v7, v8, v9); (*(void ( **)(long long, long long))(perfschema + 208))(v65, 1LL); memory_class = find_memory_class(v72); ok(memory_class != 0, (unsigned int)"memory info A", v10, v11, v12, v13); (*(void ( **)(long long))(perfschema + 304))(v65); setup_thread(v65, 1); *(_BYTE *)(memory_class + 4) = 1; v14 = (*(long long ( **)(_QWORD, long long, long long *))(perfschema + 992))(v72, 100LL, &v73); ok(v14 == v72, (unsigned int)"alloc memory info A", v15, v16, v17, v18); v19 = (*(long long ( **)(_QWORD, long long, long long, long long *))(perfschema + 1000))(v72, 100LL, 200LL, &v73); ok(v19 == v72, (unsigned int)"realloc memory info A", v20, v21, v22, v23); v24 = (*(long long ( **)(_QWORD, long long, long long, long long *))(perfschema + 1000))(v72, 200LL, 300LL, &v73); ok(v24 == v72, (unsigned int)"realloc up memory info A", v25, v26, v27, v28); v29 = (*(long long ( **)(_QWORD, long long, long long, long long *))(perfschema + 1000))(v72, 300LL, 50LL, &v73); ok(v29 == v72, (unsigned int)"realloc down memory info A", v30, v31, v32, v33); (*(void ( **)(_QWORD, long long, long long))(perfschema + 1016))(v72, 50LL, v73); flag_thread_instrumentation = 0; v34 = (*(long long ( **)(_QWORD, long long, long long *))(perfschema + 992))(v72, 100LL, &v73); ok(v34 == v72, (unsigned int)"alloc memory info A", v35, v36, v37, v38); v39 = (*(long long ( **)(_QWORD, long long, long long, long long *))(perfschema + 1000))(v72, 100LL, 200LL, &v73); ok(v39 == v72, (unsigned int)"realloc memory info A", v40, v41, v42, v43); v44 = (*(long long ( **)(_QWORD, long long, long long, long long *))(perfschema + 1000))(v72, 200LL, 300LL, &v73); ok(v44 == v72, (unsigned int)"realloc up memory info A", v45, v46, v47, v48); v49 = (*(long long ( **)(_QWORD, long long, long long, long long *))(perfschema + 1000))(v72, 300LL, 50LL, &v73); ok(v49 == v72, (unsigned int)"realloc down memory info A", v50, v51, v52, v53); (*(void ( **)(_QWORD, long long, long long))(perfschema + 1016))(v72, 50LL, v73); v54 = (*(long long ( **)(long long, long long, long long *))(perfschema + 992))(9999LL, 100LL, &v73); ok(v54 == 0, (unsigned int)"alloc with unknown key", v55, v56, v57, v58); v64 = (*(long long ( **)(_QWORD, long long, long long, long long *))(perfschema + 1000))(0LL, 100LL, 200LL, &v73); ok(v64 == 0, (unsigned int)"realloc with unknown key", v59, v60, v61, v62); (*(void ( **)(_QWORD, long long, long long))(perfschema + 1016))(0LL, 200LL, v73); return shutdown_performance_schema(); }
test_memory_instruments: PUSH RBP MOV RBP,RSP SUB RSP,0x70 LEA RDI,[0x1b2a5f] MOV AL,0x0 CALL 0x0012f190 CALL 0x00129e40 MOV qword ptr [RBP + -0x8],RAX LEA RAX,[RBP + -0x14] MOV qword ptr [RBP + -0x30],RAX LEA RAX,[0x1b240c] MOV qword ptr [RBP + -0x28],RAX MOV dword ptr [RBP + -0x20],0x0 LEA RAX,[RBP + -0x34] MOV qword ptr [RBP + -0x50],RAX LEA RAX,[0x1b2421] MOV qword ptr [RBP + -0x48],RAX MOV dword ptr [RBP + -0x40],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x3d8] LEA RSI,[RBP + -0x30] LEA RDI,[0x1b2425] MOV EDX,0x1 CALL RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] LEA RSI,[RBP + -0x50] LEA RDI,[0x1b2425] MOV EDX,0x1 CALL RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xc8] MOV EDI,dword ptr [RBP + -0x34] XOR ECX,ECX MOV EDX,ECX MOV RSI,RDX CALL RAX MOV qword ptr [RBP + -0x60],RAX CMP qword ptr [RBP + -0x60],0x0 SETNZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b2421] MOV AL,0x0 CALL 0x0012f450 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xd0] MOV RDI,qword ptr [RBP + -0x60] MOV ESI,0x1 CALL RAX MOV EDI,dword ptr [RBP + -0x14] CALL 0x00143d20 MOV qword ptr [RBP + -0x58],RAX CMP qword ptr [RBP + -0x58],0x0 SETNZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b2a7f] MOV AL,0x0 CALL 0x0012f450 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOV RDI,qword ptr [RBP + -0x60] CALL RAX MOV RDI,qword ptr [RBP + -0x60] MOV ESI,0x1 CALL 0x001299f0 MOV RAX,qword ptr [RBP + -0x58] MOV byte ptr [RAX + 0x4],0x1 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x3e0] MOV EDI,dword ptr [RBP + -0x14] MOV ESI,0x64 LEA RDX,[RBP + -0x10] CALL RAX MOV dword ptr [RBP + -0x64],EAX MOV EAX,dword ptr [RBP + -0x64] CMP EAX,dword ptr [RBP + -0x14] SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b2a79] MOV AL,0x0 CALL 0x0012f450 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x3e8] MOV EDI,dword ptr [RBP + -0x14] MOV ESI,0x64 MOV EDX,0xc8 LEA RCX,[RBP + -0x10] CALL RAX MOV dword ptr [RBP + -0x64],EAX MOV EAX,dword ptr [RBP + -0x64] CMP EAX,dword ptr [RBP + -0x14] SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b2a77] MOV AL,0x0 CALL 0x0012f450 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x3e8] MOV EDI,dword ptr [RBP + -0x14] MOV ESI,0xc8 MOV EDX,0x12c LEA RCX,[RBP + -0x10] CALL RAX MOV dword ptr [RBP + -0x64],EAX MOV EAX,dword ptr [RBP + -0x64] CMP EAX,dword ptr [RBP + -0x14] SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b2a8d] MOV AL,0x0 CALL 0x0012f450 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x3e8] MOV EDI,dword ptr [RBP + -0x14] MOV ESI,0x12c MOV EDX,0x32 LEA RCX,[RBP + -0x10] CALL RAX MOV dword ptr [RBP + -0x64],EAX MOV EAX,dword ptr [RBP + -0x64] CMP EAX,dword ptr [RBP + -0x14] SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b2aa6] MOV AL,0x0 CALL 0x0012f450 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x3f8] MOV EDI,dword ptr [RBP + -0x14] MOV RDX,qword ptr [RBP + -0x10] MOV ESI,0x32 CALL RAX LEA RAX,[0x50e4c0] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x3e0] MOV EDI,dword ptr [RBP + -0x14] MOV ESI,0x64 LEA RDX,[RBP + -0x10] CALL RAX MOV dword ptr [RBP + -0x64],EAX MOV EAX,dword ptr [RBP + -0x64] CMP EAX,dword ptr [RBP + -0x14] SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b2a79] MOV AL,0x0 CALL 0x0012f450 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x3e8] MOV EDI,dword ptr [RBP + -0x14] MOV ESI,0x64 MOV EDX,0xc8 LEA RCX,[RBP + -0x10] CALL RAX MOV dword ptr [RBP + -0x64],EAX MOV EAX,dword ptr [RBP + -0x64] CMP EAX,dword ptr [RBP + -0x14] SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b2a77] MOV AL,0x0 CALL 0x0012f450 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x3e8] MOV EDI,dword ptr [RBP + -0x14] MOV ESI,0xc8 MOV EDX,0x12c LEA RCX,[RBP + -0x10] CALL RAX MOV dword ptr [RBP + -0x64],EAX MOV EAX,dword ptr [RBP + -0x64] CMP EAX,dword ptr [RBP + -0x14] SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b2a8d] MOV AL,0x0 CALL 0x0012f450 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x3e8] MOV EDI,dword ptr [RBP + -0x14] MOV ESI,0x12c MOV EDX,0x32 LEA RCX,[RBP + -0x10] CALL RAX MOV dword ptr [RBP + -0x64],EAX MOV EAX,dword ptr [RBP + -0x64] CMP EAX,dword ptr [RBP + -0x14] SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b2aa6] MOV AL,0x0 CALL 0x0012f450 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x3f8] MOV EDI,dword ptr [RBP + -0x14] MOV RDX,qword ptr [RBP + -0x10] MOV ESI,0x32 CALL RAX MOV RAX,qword ptr [RBP + -0x8] MOV EDI,0x270f MOV ESI,0x64 LEA RDX,[RBP + -0x10] CALL qword ptr [RAX + 0x3e0] MOV dword ptr [RBP + -0x64],EAX CMP dword ptr [RBP + -0x64],0x0 SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b2ac3] MOV AL,0x0 CALL 0x0012f450 MOV RAX,qword ptr [RBP + -0x8] XOR EDI,EDI MOV ESI,0x64 MOV EDX,0xc8 LEA RCX,[RBP + -0x10] CALL qword ptr [RAX + 0x3e8] MOV dword ptr [RBP + -0x64],EAX CMP dword ptr [RBP + -0x64],0x0 SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b2ac1] MOV AL,0x0 CALL 0x0012f450 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x3f8] MOV RDX,qword ptr [RBP + -0x10] XOR EDI,EDI MOV ESI,0xc8 CALL RAX CALL 0x001475b0 ADD RSP,0x70 POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* test_memory_instruments() */ void test_memory_instruments(void) { uint uVar1; int iVar2; PSI_thread *pPVar3; long lVar4; int4 *local_58; int *local_50; int4 local_48; int4 local_3c; uint *local_38; int *local_30; int4 local_28; uint local_1c; int8 local_18; long local_10; diag("test_memory_instruments"); local_10 = load_perfschema(); local_38 = &local_1c; local_30 = &DAT_001b240c; local_28 = 0; local_58 = &local_3c; local_50 = &DAT_001b2421; local_48 = 0; (**(code **)(local_10 + 0x3d8))(&DAT_001b2425,&local_38,1); (**(code **)(local_10 + 0x18))(&DAT_001b2425,&local_58,1); pPVar3 = (PSI_thread *)(**(code **)(local_10 + 200))(local_3c,0); ok(pPVar3 != (PSI_thread *)0x0,&DAT_001b2421); (**(code **)(local_10 + 0xd0))(pPVar3,1); lVar4 = find_memory_class(local_1c); ok(lVar4 != 0,"memory info A"); (**(code **)(local_10 + 0x130))(pPVar3); setup_thread(pPVar3,true); *(int1 *)(lVar4 + 4) = 1; uVar1 = (**(code **)(local_10 + 0x3e0))(local_1c,100,&local_18); ok(uVar1 == local_1c,"alloc memory info A"); uVar1 = (**(code **)(local_10 + 1000))(local_1c,100,200,&local_18); ok(uVar1 == local_1c,"realloc memory info A"); uVar1 = (**(code **)(local_10 + 1000))(local_1c,200,300,&local_18); ok(uVar1 == local_1c,"realloc up memory info A"); uVar1 = (**(code **)(local_10 + 1000))(local_1c,300,0x32,&local_18); ok(uVar1 == local_1c,"realloc down memory info A"); (**(code **)(local_10 + 0x3f8))(local_1c,0x32,local_18); flag_thread_instrumentation = 0; uVar1 = (**(code **)(local_10 + 0x3e0))(local_1c,100,&local_18); ok(uVar1 == local_1c,"alloc memory info A"); uVar1 = (**(code **)(local_10 + 1000))(local_1c,100,200,&local_18); ok(uVar1 == local_1c,"realloc memory info A"); uVar1 = (**(code **)(local_10 + 1000))(local_1c,200,300,&local_18); ok(uVar1 == local_1c,"realloc up memory info A"); uVar1 = (**(code **)(local_10 + 1000))(local_1c,300,0x32,&local_18); ok(uVar1 == local_1c,"realloc down memory info A"); (**(code **)(local_10 + 0x3f8))(local_1c,0x32,local_18); iVar2 = (**(code **)(local_10 + 0x3e0))(9999,100,&local_18); ok(iVar2 == 0,"alloc with unknown key"); iVar2 = (**(code **)(local_10 + 1000))(0,100,200,&local_18); ok(iVar2 == 0,"realloc with unknown key"); (**(code **)(local_10 + 0x3f8))(0,200,local_18); shutdown_performance_schema(); return; }
36,704
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator++()
monkey531[P]llama/common/json.hpp
iter_impl& operator++() { JSON_ASSERT(m_object != nullptr); switch (m_object->m_data.m_type) { case value_t::object: { std::advance(m_it.object_iterator, 1); break; } case value_t::array: { std::advance(m_it.array_iterator, 1); break; } case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: { ++m_it.primitive_iterator; break; } } return *this; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator++(): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x8(%rsp) cmpq $0x0, (%rax) jne 0xb158a leaq 0x15de04(%rip), %rdi # 0x20f374 movl $0x33c0, %esi # imm = 0x33C0 leaq 0x157bce(%rip), %rdx # 0x20914a leaq 0x163501(%rip), %rcx # 0x214a84 movb $0x0, %al callq 0x5aed0 movq 0x8(%rsp), %rax movq (%rax), %rax movzbl (%rax), %eax movq %rax, (%rsp) subq $0x9, %rax ja 0xb15e3 movq (%rsp), %rax leaq 0x1587de(%rip), %rcx # 0x209d88 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x8(%rsp), %rdi addq $0x8, %rdi movl $0x1, %esi callq 0xb7390 jmp 0xb15f5 movq 0x8(%rsp), %rdi addq $0x8, %rdi addq $0x8, %rdi movl $0x1, %esi callq 0xb73e0 jmp 0xb15f5 jmp 0xb15e3 movq 0x8(%rsp), %rdi addq $0x8, %rdi addq $0x10, %rdi callq 0xb7430 movq 0x8(%rsp), %rax addq $0x18, %rsp retq nop
_ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rax, [rsp+18h+var_8] mov [rsp+18h+var_10], rax cmp qword ptr [rax], 0 jnz short loc_B158A lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 33C0h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN+7; "m_object != nullptr" mov al, 0 call _ggml_abort loc_B158A: mov rax, [rsp+18h+var_10] mov rax, [rax] movzx eax, byte ptr [rax] mov [rsp+18h+var_18], rax sub rax, 9; switch 10 cases ja short def_B15B1; jumptable 00000000000B15B1 default case mov rax, [rsp+18h+var_18] lea rcx, jpt_B15B1 movsxd rax, ds:(jpt_B15B1 - 209D88h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_B15B3: mov rdi, [rsp+18h+var_10]; jumptable 00000000000B15B1 case 1 add rdi, 8 mov esi, 1 call _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSB_11ordered_mapESt6vectorS8_blmdSaNSB_14adl_serializerESE_IhSaIhEEvEEESE_ISJ_SaISJ_EEEEiEvRT_T0_; std::advance<__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>,int>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> &,int) jmp short loc_B15F5 loc_B15C8: mov rdi, [rsp+18h+var_10]; jumptable 00000000000B15B1 case 2 add rdi, 8 add rdi, 8 mov esi, 1 call _ZSt7advanceIN9__gnu_cxx17__normal_iteratorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEES6_ISG_SaISG_EEEEiEvRT_T0_; std::advance<__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,int>(__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>> &,int) jmp short loc_B15F5 loc_B15E1: jmp short $+2; jumptable 00000000000B15B1 cases 0,3-9 def_B15B1: mov rdi, [rsp+18h+var_10]; jumptable 00000000000B15B1 default case add rdi, 8 add rdi, 10h call _ZN8nlohmann16json_abi_v3_11_36detail20primitive_iterator_tppEv; nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t::operator++(void) loc_B15F5: mov rax, [rsp+18h+var_10] add rsp, 18h retn
_QWORD * 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>>::operator++( _QWORD *a1) { if ( !*a1 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 13248LL, "GGML_ASSERT(%s) failed", "m_object != nullptr"); switch ( *(_BYTE *)*a1 ) { case 1: std::advance<__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>,int>( a1 + 1, 1LL); break; case 2: std::advance<__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>,int>( a1 + 2, 1LL); break; default: nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t::operator++(a1 + 3); break; } return a1; }
__advance<__gnu_cxx::__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,long>: SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RDI MOV qword ptr [RSP],RSI MOV RSI,qword ptr [RSP] MOV RDI,qword ptr [RSP + 0x8] CALL 0x001b15b0 JMP 0x001b156d LAB_001b156d: ADD RSP,0x18 RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* void std::__advance<__gnu_cxx::__normal_iterator<std::__cxx11::string*, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > >, long>(__gnu_cxx::__normal_iterator<std::__cxx11::string*, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > >&, long, std::random_access_iterator_tag) */ void std:: __advance<__gnu_cxx::__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,long> (__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *param_1,long param_2) { __gnu_cxx:: __normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator+=(param_1,param_2); return; }
36,705
common_log::set_colors(bool)
monkey531[P]llama/common/log.cpp
void set_colors(bool colors) { pause(); if (colors) { g_col[COMMON_LOG_COL_DEFAULT] = LOG_COL_DEFAULT; g_col[COMMON_LOG_COL_BOLD] = LOG_COL_BOLD; g_col[COMMON_LOG_COL_RED] = LOG_COL_RED; g_col[COMMON_LOG_COL_GREEN] = LOG_COL_GREEN; g_col[COMMON_LOG_COL_YELLOW] = LOG_COL_YELLOW; g_col[COMMON_LOG_COL_BLUE] = LOG_COL_BLUE; g_col[COMMON_LOG_COL_MAGENTA] = LOG_COL_MAGENTA; g_col[COMMON_LOG_COL_CYAN] = LOG_COL_CYAN; g_col[COMMON_LOG_COL_WHITE] = LOG_COL_WHITE; } else { for (size_t i = 0; i < g_col.size(); i++) { g_col[i] = ""; } } resume(); }
O2
cpp
common_log::set_colors(bool): pushq %rbp pushq %rbx pushq %rax movl %esi, %ebp movq %rdi, %rbx callq 0x964e2 testl %ebp, %ebp je 0x968c3 movq 0x66bf4(%rip), %rax # 0xfd440 leaq 0x21800(%rip), %rcx # 0xb8053 movq %rcx, (%rax) movq 0x66be3(%rip), %rax # 0xfd440 leaq 0x217f4(%rip), %rcx # 0xb8058 movq %rcx, 0x8(%rax) leaq 0x217ee(%rip), %rcx # 0xb805d movq %rcx, 0x10(%rax) leaq 0x217e9(%rip), %rcx # 0xb8063 movq %rcx, 0x18(%rax) leaq 0x217e4(%rip), %rcx # 0xb8069 movq %rcx, 0x20(%rax) leaq 0x217df(%rip), %rcx # 0xb806f movq %rcx, 0x28(%rax) leaq 0x217da(%rip), %rcx # 0xb8075 movq %rcx, 0x30(%rax) leaq 0x217d5(%rip), %rcx # 0xb807b movq %rcx, 0x38(%rax) leaq 0x217d0(%rip), %rcx # 0xb8081 movq %rcx, 0x40(%rax) movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x96558 xorl %eax, %eax leaq 0x1824d(%rip), %rcx # 0xaeb19 movq 0x66b75(%rip), %rsi # 0xfd448 movq 0x66b66(%rip), %rdx # 0xfd440 subq %rdx, %rsi sarq $0x3, %rsi cmpq %rsi, %rax jae 0x968b5 movq %rcx, (%rdx,%rax,8) incq %rax jmp 0x968cc nop
_ZN10common_log10set_colorsEb: push rbp push rbx push rax mov ebp, esi mov rbx, rdi call _ZN10common_log5pauseEv; common_log::pause(void) test ebp, ebp jz short loc_968C3 mov rax, cs:_ZL5g_col; g_col lea rcx, a0m; "\x1B[0m" mov [rax], rcx mov rax, cs:_ZL5g_col; g_col lea rcx, a1m; "\x1B[1m" mov [rax+8], rcx lea rcx, a31m; "\x1B[31m" mov [rax+10h], rcx lea rcx, a32m; "\x1B[32m" mov [rax+18h], rcx lea rcx, a33m; "\x1B[33m" mov [rax+20h], rcx lea rcx, a34m; "\x1B[34m" mov [rax+28h], rcx lea rcx, a35m; "\x1B[35m" mov [rax+30h], rcx lea rcx, a36m; "\x1B[36m" mov [rax+38h], rcx lea rcx, a37m; "\x1B[37m" mov [rax+40h], rcx loc_968B5: mov rdi, rbx; this add rsp, 8 pop rbx pop rbp jmp _ZN10common_log6resumeEv; common_log::resume(void) loc_968C3: xor eax, eax lea rcx, aErrorWhileHand_0+34h; "" loc_968CC: mov rsi, cs:qword_FD448 mov rdx, cs:_ZL5g_col; g_col sub rsi, rdx sar rsi, 3 cmp rax, rsi jnb short loc_968B5 mov [rdx+rax*8], rcx inc rax jmp short loc_968CC
long long common_log::set_colors(common_log *this, int a2) { _QWORD *v2; // rax unsigned long long i; // rax common_log::pause(this); if ( a2 ) { *(_QWORD *)g_col = "\x1B[0m"; v2 = (_QWORD *)g_col; *(_QWORD *)(g_col + 8) = "\x1B[1m"; v2[2] = "\x1B[31m"; v2[3] = "\x1B[32m"; v2[4] = "\x1B[33m"; v2[5] = "\x1B[34m"; v2[6] = "\x1B[35m"; v2[7] = "\x1B[36m"; v2[8] = "\x1B[37m"; } else { for ( i = 0LL; i < (qword_FD448 - g_col) >> 3; ++i ) *(_QWORD *)(g_col + 8 * i) = ""; } return common_log::resume(this); }
set_colors: PUSH RBP PUSH RBX PUSH RAX MOV EBP,ESI MOV RBX,RDI CALL 0x001964e2 TEST EBP,EBP JZ 0x001968c3 MOV RAX,qword ptr [0x001fd440] LEA RCX,[0x1b8053] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [0x001fd440] LEA RCX,[0x1b8058] MOV qword ptr [RAX + 0x8],RCX LEA RCX,[0x1b805d] MOV qword ptr [RAX + 0x10],RCX LEA RCX,[0x1b8063] MOV qword ptr [RAX + 0x18],RCX LEA RCX,[0x1b8069] MOV qword ptr [RAX + 0x20],RCX LEA RCX,[0x1b806f] MOV qword ptr [RAX + 0x28],RCX LEA RCX,[0x1b8075] MOV qword ptr [RAX + 0x30],RCX LEA RCX,[0x1b807b] MOV qword ptr [RAX + 0x38],RCX LEA RCX,[0x1b8081] MOV qword ptr [RAX + 0x40],RCX LAB_001968b5: MOV RDI,RBX ADD RSP,0x8 POP RBX POP RBP JMP 0x00196558 LAB_001968c3: XOR EAX,EAX LEA RCX,[0x1aeb19] LAB_001968cc: MOV RSI,qword ptr [0x001fd448] MOV RDX,qword ptr [0x001fd440] SUB RSI,RDX SAR RSI,0x3 CMP RAX,RSI JNC 0x001968b5 MOV qword ptr [RDX + RAX*0x8],RCX INC RAX JMP 0x001968cc
/* common_log::set_colors(bool) */ void __thiscall common_log::set_colors(common_log *this,bool param_1) { int8 *puVar1; ulong uVar2; int7 in_register_00000031; pause(this); if ((int)CONCAT71(in_register_00000031,param_1) == 0) { for (uVar2 = 0; uVar2 < (ulong)(DAT_001fd448 - (long)g_col >> 3); uVar2 = uVar2 + 1) { g_col[uVar2] = ""; } } else { *g_col = &DAT_001b8053; puVar1 = g_col; g_col[1] = &DAT_001b8058; puVar1[2] = &DAT_001b805d; puVar1[3] = &DAT_001b8063; puVar1[4] = &DAT_001b8069; puVar1[5] = &DAT_001b806f; puVar1[6] = &DAT_001b8075; puVar1[7] = &DAT_001b807b; puVar1[8] = &DAT_001b8081; } resume(this); return; }
36,706
sql_printer::print_header(cmd_params const&)
monkey531[P]llama/examples/llama-bench/llama-bench.cpp
void print_header(const cmd_params & params) override { std::vector<std::string> fields = test::get_fields(); fprintf(fout, "CREATE TABLE IF NOT EXISTS test (\n"); for (size_t i = 0; i < fields.size(); i++) { fprintf(fout, " %s %s%s\n", fields.at(i).c_str(), get_sql_field_type(fields.at(i)).c_str(), i < fields.size() - 1 ? "," : ""); } fprintf(fout, ");\n"); fprintf(fout, "\n"); (void) params; }
O2
cpp
sql_printer::print_header(cmd_params const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdi, %rbx callq 0x38df6 movq %rsp, %r14 movq %r14, %rdi movq %rax, %rsi callq 0x30dfe movq 0x8(%rbx), %rcx leaq 0x5ed9a(%rip), %rdi # 0x9b887 pushq $0x22 popq %rsi pushq $0x1 popq %rdx callq 0x22f00 leaq 0x18(%rsp), %r15 xorl %r13d, %r13d movq 0x8(%rsp), %rax subq (%rsp), %rax sarq $0x5, %rax movq 0x8(%rbx), %rbp cmpq %rax, %r13 jae 0x3cb88 movq %r14, %rdi movq %r13, %rsi callq 0x3cd2e movq (%rax), %r12 movq %r14, %rdi movq %r13, %rsi callq 0x3cd2e movq %r15, %rdi movq %rax, %rsi callq 0x3cd50 movq 0x18(%rsp), %rcx movq 0x8(%rsp), %rax subq (%rsp), %rax sarq $0x5, %rax decq %rax cmpq %rax, %r13 leaq 0x600e8(%rip), %r8 # 0x9cc41 leaq 0x5ec88(%rip), %rax # 0x9b7e8 cmovbq %rax, %r8 movq %rbp, %rdi leaq 0x5ed3c(%rip), %rsi # 0x9b8aa movq %r12, %rdx xorl %eax, %eax callq 0x22b40 movq %r15, %rdi callq 0x22f98 incq %r13 jmp 0x3cb00 leaq 0x5ed26(%rip), %rdi # 0x9b8b5 pushq $0x3 popq %rsi pushq $0x1 popq %rdx movq %rbp, %rcx callq 0x22f00 movq 0x8(%rbx), %rsi pushq $0xa popq %rdi callq 0x229c0 movq %rsp, %rdi callq 0x2922e addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x3cbc2 movq %rax, %rbx movq %rsp, %rdi callq 0x2922e movq %rbx, %rdi callq 0x22da0 nop
_ZN11sql_printer12print_headerERK10cmd_params: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbx, rdi call _ZN4test10get_fieldsB5cxx11Ev; test::get_fields(void) mov r14, rsp mov rdi, r14 mov rsi, rax call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) mov rcx, [rbx+8] lea rdi, aCreateTableIfN; "CREATE TABLE IF NOT EXISTS test (\n" push 22h ; '"' pop rsi push 1 pop rdx call _fwrite lea r15, [rsp+68h+var_50] xor r13d, r13d loc_3CB00: mov rax, [rsp+68h+var_60] sub rax, [rsp+68h+var_68] sar rax, 5 mov rbp, [rbx+8] cmp r13, rax jnb short loc_3CB88 mov rdi, r14 mov rsi, r13 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE2atEm; std::vector<std::string>::at(ulong) mov r12, [rax] mov rdi, r14 mov rsi, r13 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE2atEm; std::vector<std::string>::at(ulong) mov rdi, r15 mov rsi, rax call _ZN11sql_printer18get_sql_field_typeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; sql_printer::get_sql_field_type(std::string const&) mov rcx, [rsp+68h+var_50] mov rax, [rsp+68h+var_60] sub rax, [rsp+68h+var_68] sar rax, 5 dec rax cmp r13, rax lea r8, aEndIndexOutOfB+19h; "" lea rax, aSamplesNsS_0+14h; "," cmovb r8, rax mov rdi, rbp lea rsi, aSSS; " %s %s%s\n" mov rdx, r12 xor eax, eax call _fprintf mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() inc r13 jmp loc_3CB00 loc_3CB88: lea rdi, asc_9B8B5; ");\n" push 3 pop rsi push 1 pop rdx mov rcx, rbp call _fwrite mov rsi, [rbx+8] push 0Ah pop rdi call _fputc mov rdi, rsp; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_3CBC2: mov rbx, rax mov rdi, rsp; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, rbx call __Unwind_Resume
void sql_printer::print_header(sql_printer *this, const cmd_params *a2) { _QWORD *v2; // rax unsigned long long i; // r13 long long v4; // rbp const char *v5; // r12 long long v6; // rax const char *v7; // r8 void *v8; // [rsp+0h] [rbp-68h] BYREF long long v9; // [rsp+8h] [rbp-60h] const char *v10[10]; // [rsp+18h] [rbp-50h] BYREF v2 = test::get_fields[abi:cxx11](); std::vector<std::string>::vector(&v8, v2); fwrite("CREATE TABLE IF NOT EXISTS test (\n", 34LL, 1LL, *((_QWORD *)this + 1)); for ( i = 0LL; ; ++i ) { v4 = *((_QWORD *)this + 1); if ( i >= (v9 - (long long)v8) >> 5 ) break; v5 = *(const char **)std::vector<std::string>::at(&v8, i); v6 = std::vector<std::string>::at(&v8, i); sql_printer::get_sql_field_type(v10, v6); v7 = ""; if ( i < ((v9 - (long long)v8) >> 5) - 1 ) v7 = ","; fprintf(v4, " %s %s%s\n", v5, v10[0], v7); std::string::~string(v10); } fwrite(");\n", 3LL, 1LL, *((_QWORD *)this + 1)); fputc(10LL, *((_QWORD *)this + 1)); std::vector<std::string>::~vector(&v8); }
print_header: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,RDI CALL 0x00138df6 MOV R14,RSP MOV RDI,R14 MOV RSI,RAX CALL 0x00130dfe MOV RCX,qword ptr [RBX + 0x8] LEA RDI,[0x19b887] PUSH 0x22 POP RSI PUSH 0x1 POP RDX CALL 0x00122f00 LEA R15,[RSP + 0x18] XOR R13D,R13D LAB_0013cb00: MOV RAX,qword ptr [RSP + 0x8] SUB RAX,qword ptr [RSP] SAR RAX,0x5 MOV RBP,qword ptr [RBX + 0x8] CMP R13,RAX JNC 0x0013cb88 LAB_0013cb16: MOV RDI,R14 MOV RSI,R13 CALL 0x0013cd2e MOV R12,qword ptr [RAX] LAB_0013cb24: MOV RDI,R14 MOV RSI,R13 CALL 0x0013cd2e MOV RDI,R15 MOV RSI,RAX CALL 0x0013cd50 LAB_0013cb3a: MOV RCX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x8] SUB RAX,qword ptr [RSP] SAR RAX,0x5 DEC RAX CMP R13,RAX LEA R8,[0x19cc41] LEA RAX,[0x19b7e8] CMOVC R8,RAX MOV RDI,RBP LEA RSI,[0x19b8aa] MOV RDX,R12 XOR EAX,EAX CALL 0x00122b40 MOV RDI,R15 CALL 0x00122f98 INC R13 JMP 0x0013cb00 LAB_0013cb88: LEA RDI,[0x19b8b5] PUSH 0x3 POP RSI PUSH 0x1 POP RDX MOV RCX,RBP CALL 0x00122f00 MOV RSI,qword ptr [RBX + 0x8] PUSH 0xa POP RDI CALL 0x001229c0 MOV RDI,RSP CALL 0x0012922e ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* sql_printer::print_header(cmd_params const&) */ void sql_printer::print_header(cmd_params *param_1) { FILE *__s; int8 uVar1; vector *pvVar2; int8 *puVar3; string *psVar4; char *pcVar5; ulong uVar6; long local_68; long local_60; int8 local_50 [4]; pvVar2 = (vector *)test::get_fields_abi_cxx11_(); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_68,pvVar2); fwrite("CREATE TABLE IF NOT EXISTS test (\n",0x22,1,*(FILE **)(param_1 + 8)); for (uVar6 = 0; __s = *(FILE **)(param_1 + 8), uVar6 < (ulong)(local_60 - local_68 >> 5); uVar6 = uVar6 + 1) { /* try { // try from 0013cb16 to 0013cb20 has its CatchHandler @ 0013cbc0 */ puVar3 = (int8 *) std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::at ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *) &local_68,uVar6); uVar1 = *puVar3; /* try { // try from 0013cb24 to 0013cb39 has its CatchHandler @ 0013cbc2 */ psVar4 = (string *) std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::at ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *) &local_68,uVar6); get_sql_field_type((sql_printer *)local_50,psVar4); pcVar5 = ""; if (uVar6 < (local_60 - local_68 >> 5) - 1U) { pcVar5 = ","; } fprintf(__s," %s %s%s\n",uVar1,local_50[0],pcVar5); std::__cxx11::string::~string((string *)local_50); } fwrite(&DAT_0019b8b5,3,1,__s); fputc(10,*(FILE **)(param_1 + 8)); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_68); return; }
36,707
ma_pvio_read
eloqsql/libmariadb/libmariadb/ma_pvio.c
ssize_t ma_pvio_read(MARIADB_PVIO *pvio, uchar *buffer, size_t length) { ssize_t r= -1; if (!pvio) return -1; if (IS_PVIO_ASYNC_ACTIVE(pvio)) { r= #if defined(HAVE_TLS) && !defined(HAVE_SCHANNEL) (pvio->ctls) ? ma_tls_read_async(pvio, buffer, length) : #endif (ssize_t)ma_pvio_read_async(pvio, buffer, length); goto end; } else { if (IS_PVIO_ASYNC(pvio)) { /* If switching from non-blocking to blocking API usage, set the socket back to blocking mode. */ my_bool old_mode; ma_pvio_blocking(pvio, TRUE, &old_mode); } } /* secure connection */ #ifdef HAVE_TLS if (pvio->ctls) { r= ma_pvio_tls_read(pvio->ctls, buffer, length); goto end; } #endif if (pvio->methods->read) r= pvio->methods->read(pvio, buffer, length); end: if (pvio_callback) { void (*callback)(int mode, MYSQL *mysql, const uchar *buffer, size_t length); LIST *p= pvio_callback; while (p) { callback= p->data; callback(0, pvio->mysql, buffer, r); p= p->next; } } if (r > 0) pvio->bytes_read+= r; return r; }
O0
c
ma_pvio_read: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq $-0x1, -0x28(%rbp) cmpq $0x0, -0x10(%rbp) jne 0x87da0 movq $-0x1, -0x8(%rbp) jmp 0x87f48 movq -0x10(%rbp), %rax cmpq $0x0, 0x40(%rax) je 0x87e37 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax cmpq $0x0, 0x480(%rax) je 0x87e37 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq 0x480(%rax), %rax cmpq $0x0, 0x28(%rax) je 0x87e37 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movsbl 0x14(%rax), %eax cmpl $0x0, %eax je 0x87e37 movq -0x10(%rbp), %rax cmpq $0x0, 0x38(%rax) je 0x87e15 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x9bd10 movq %rax, -0x48(%rbp) jmp 0x87e2a movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x87f60 movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x28(%rbp) jmp 0x87ed3 movq -0x10(%rbp), %rax cmpq $0x0, 0x40(%rax) je 0x87e7c movq -0x10(%rbp), %rax movq 0x40(%rax), %rax cmpq $0x0, 0x480(%rax) je 0x87e7c movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq 0x480(%rax), %rax cmpq $0x0, 0x28(%rax) je 0x87e7c movq -0x10(%rbp), %rdi movl $0x1, %esi leaq -0x29(%rbp), %rdx callq 0x880e0 jmp 0x87e7e movq -0x10(%rbp), %rax cmpq $0x0, 0x38(%rax) je 0x87ea4 movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x88d70 movq %rax, -0x28(%rbp) jmp 0x87ed3 movq -0x10(%rbp), %rax movq 0x48(%rax), %rax cmpq $0x0, 0x10(%rax) je 0x87ed1 movq -0x10(%rbp), %rax movq 0x48(%rax), %rax movq 0x10(%rax), %rax movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq *%rax movq %rax, -0x28(%rbp) jmp 0x87ed3 leaq 0x433b96(%rip), %rax # 0x4bba70 cmpq $0x0, (%rax) je 0x87f29 leaq 0x433b89(%rip), %rax # 0x4bba70 movq (%rax), %rax movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) je 0x87f27 movq -0x40(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x40(%rcx), %rsi movq -0x18(%rbp), %rdx movq -0x28(%rbp), %rcx xorl %edi, %edi callq *%rax movq -0x40(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x40(%rbp) jmp 0x87eee jmp 0x87f29 cmpq $0x0, -0x28(%rbp) jle 0x87f40 movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax addq 0x60(%rax), %rcx movq %rcx, 0x60(%rax) movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_pvio_read: 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], 0FFFFFFFFFFFFFFFFh cmp [rbp+var_10], 0 jnz short loc_87DA0 mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp loc_87F48 loc_87DA0: mov rax, [rbp+var_10] cmp qword ptr [rax+40h], 0 jz loc_87E37 mov rax, [rbp+var_10] mov rax, [rax+40h] cmp qword ptr [rax+480h], 0 jz short loc_87E37 mov rax, [rbp+var_10] mov rax, [rax+40h] mov rax, [rax+480h] cmp qword ptr [rax+28h], 0 jz short loc_87E37 mov rax, [rbp+var_10] mov rax, [rax+40h] mov rax, [rax+480h] mov rax, [rax+28h] movsx eax, byte ptr [rax+14h] cmp eax, 0 jz short loc_87E37 mov rax, [rbp+var_10] cmp qword ptr [rax+38h], 0 jz short loc_87E15 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call ma_tls_read_async mov [rbp+var_48], rax jmp short loc_87E2A loc_87E15: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call ma_pvio_read_async mov [rbp+var_48], rax loc_87E2A: mov rax, [rbp+var_48] mov [rbp+var_28], rax jmp loc_87ED3 loc_87E37: mov rax, [rbp+var_10] cmp qword ptr [rax+40h], 0 jz short loc_87E7C mov rax, [rbp+var_10] mov rax, [rax+40h] cmp qword ptr [rax+480h], 0 jz short loc_87E7C mov rax, [rbp+var_10] mov rax, [rax+40h] mov rax, [rax+480h] cmp qword ptr [rax+28h], 0 jz short loc_87E7C mov rdi, [rbp+var_10] mov esi, 1 lea rdx, [rbp+var_29] call ma_pvio_blocking loc_87E7C: jmp short $+2 loc_87E7E: mov rax, [rbp+var_10] cmp qword ptr [rax+38h], 0 jz short loc_87EA4 mov rax, [rbp+var_10] mov rdi, [rax+38h] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call ma_pvio_tls_read mov [rbp+var_28], rax jmp short loc_87ED3 loc_87EA4: mov rax, [rbp+var_10] mov rax, [rax+48h] cmp qword ptr [rax+10h], 0 jz short loc_87ED1 mov rax, [rbp+var_10] mov rax, [rax+48h] mov rax, [rax+10h] mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call rax mov [rbp+var_28], rax loc_87ED1: jmp short $+2 loc_87ED3: lea rax, pvio_callback cmp qword ptr [rax], 0 jz short loc_87F29 lea rax, pvio_callback mov rax, [rax] mov [rbp+var_40], rax loc_87EEE: cmp [rbp+var_40], 0 jz short loc_87F27 mov rax, [rbp+var_40] mov rax, [rax+10h] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov rcx, [rbp+var_10] mov rsi, [rcx+40h] mov rdx, [rbp+var_18] mov rcx, [rbp+var_28] xor edi, edi call rax mov rax, [rbp+var_40] mov rax, [rax+8] mov [rbp+var_40], rax jmp short loc_87EEE loc_87F27: jmp short $+2 loc_87F29: cmp [rbp+var_28], 0 jle short loc_87F40 mov rcx, [rbp+var_28] mov rax, [rbp+var_10] add rcx, [rax+60h] mov [rax+60h], rcx loc_87F40: mov rax, [rbp+var_28] mov [rbp+var_8], rax loc_87F48: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
long long ma_pvio_read(_QWORD *a1, long long a2, long long a3) { long long async; // [rsp+8h] [rbp-48h] long long i; // [rsp+10h] [rbp-40h] char v6; // [rsp+27h] [rbp-29h] BYREF long long v7; // [rsp+28h] [rbp-28h] long long v8; // [rsp+30h] [rbp-20h] long long v9; // [rsp+38h] [rbp-18h] _QWORD *v10; // [rsp+40h] [rbp-10h] v10 = a1; v9 = a2; v8 = a3; v7 = -1LL; if ( !a1 ) return -1LL; if ( v10[8] && *(_QWORD *)(v10[8] + 1152LL) && *(_QWORD *)(*(_QWORD *)(v10[8] + 1152LL) + 40LL) && *(_BYTE *)(*(_QWORD *)(*(_QWORD *)(v10[8] + 1152LL) + 40LL) + 20LL) ) { if ( v10[7] ) async = ma_tls_read_async(v10, v9, v8); else async = ma_pvio_read_async(v10, v9, v8); v7 = async; } else { if ( v10[8] && *(_QWORD *)(v10[8] + 1152LL) && *(_QWORD *)(*(_QWORD *)(v10[8] + 1152LL) + 40LL) ) ma_pvio_blocking(v10, 1LL, &v6); if ( v10[7] ) { v7 = ma_pvio_tls_read(v10[7], v9, v8); } else if ( *(_QWORD *)(v10[9] + 16LL) ) { v7 = (*(long long ( **)(_QWORD *, long long, long long))(v10[9] + 16LL))(v10, v9, v8); } } if ( pvio_callback ) { for ( i = pvio_callback; i; i = *(_QWORD *)(i + 8) ) (*(void ( **)(_QWORD, _QWORD, long long, long long))(i + 16))(0LL, v10[8], v9, v7); } if ( v7 > 0 ) v10[12] += v7; return v7; }
ma_pvio_read: 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],-0x1 CMP qword ptr [RBP + -0x10],0x0 JNZ 0x00187da0 MOV qword ptr [RBP + -0x8],-0x1 JMP 0x00187f48 LAB_00187da0: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x40],0x0 JZ 0x00187e37 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] CMP qword ptr [RAX + 0x480],0x0 JZ 0x00187e37 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RAX + 0x480] CMP qword ptr [RAX + 0x28],0x0 JZ 0x00187e37 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOVSX EAX,byte ptr [RAX + 0x14] CMP EAX,0x0 JZ 0x00187e37 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x38],0x0 JZ 0x00187e15 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x0019bd10 MOV qword ptr [RBP + -0x48],RAX JMP 0x00187e2a LAB_00187e15: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00187f60 MOV qword ptr [RBP + -0x48],RAX LAB_00187e2a: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x28],RAX JMP 0x00187ed3 LAB_00187e37: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x40],0x0 JZ 0x00187e7c MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] CMP qword ptr [RAX + 0x480],0x0 JZ 0x00187e7c MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RAX + 0x480] CMP qword ptr [RAX + 0x28],0x0 JZ 0x00187e7c MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x1 LEA RDX,[RBP + -0x29] CALL 0x001880e0 LAB_00187e7c: JMP 0x00187e7e LAB_00187e7e: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x38],0x0 JZ 0x00187ea4 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00188d70 MOV qword ptr [RBP + -0x28],RAX JMP 0x00187ed3 LAB_00187ea4: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x48] CMP qword ptr [RAX + 0x10],0x0 JZ 0x00187ed1 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x48] MOV RAX,qword ptr [RAX + 0x10] MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL RAX MOV qword ptr [RBP + -0x28],RAX LAB_00187ed1: JMP 0x00187ed3 LAB_00187ed3: LEA RAX,[0x5bba70] CMP qword ptr [RAX],0x0 JZ 0x00187f29 LEA RAX,[0x5bba70] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX LAB_00187eee: CMP qword ptr [RBP + -0x40],0x0 JZ 0x00187f27 MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RCX + 0x40] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x28] XOR EDI,EDI CALL RAX MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x40],RAX JMP 0x00187eee LAB_00187f27: JMP 0x00187f29 LAB_00187f29: CMP qword ptr [RBP + -0x28],0x0 JLE 0x00187f40 MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RAX + 0x60] MOV qword ptr [RAX + 0x60],RCX LAB_00187f40: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX LAB_00187f48: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
long ma_pvio_read(long param_1,int8 param_2,int8 param_3) { long local_50; long local_48; int1 local_31; long local_30; int8 local_28; int8 local_20; long local_18; long local_10; local_30 = -1; if (param_1 == 0) { local_10 = -1; } else { local_28 = param_3; local_20 = param_2; local_18 = param_1; if ((((*(long *)(param_1 + 0x40) == 0) || (*(long *)(*(long *)(param_1 + 0x40) + 0x480) == 0)) || (*(long *)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28) == 0)) || (*(char *)(*(long *)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28) + 0x14) == '\0')) { if (((*(long *)(param_1 + 0x40) != 0) && (*(long *)(*(long *)(param_1 + 0x40) + 0x480) != 0)) && (*(long *)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28) != 0)) { ma_pvio_blocking(param_1,1,&local_31); } if (*(long *)(local_18 + 0x38) == 0) { if (*(long *)(*(long *)(local_18 + 0x48) + 0x10) != 0) { local_30 = (**(code **)(*(long *)(local_18 + 0x48) + 0x10))(local_18,local_20,local_28); } } else { local_30 = ma_pvio_tls_read(*(int8 *)(local_18 + 0x38),local_20,local_28); } } else { if (*(long *)(param_1 + 0x38) == 0) { local_50 = ma_pvio_read_async(param_1,param_2,param_3); } else { local_50 = ma_tls_read_async(param_1,param_2,param_3); } local_30 = local_50; } if (pvio_callback != 0) { for (local_48 = pvio_callback; local_48 != 0; local_48 = *(long *)(local_48 + 8)) { (**(code **)(local_48 + 0x10))(0,*(int8 *)(local_18 + 0x40),local_20,local_30); } } if (0 < local_30) { *(long *)(local_18 + 0x60) = local_30 + *(long *)(local_18 + 0x60); } local_10 = local_30; } return local_10; }
36,708
ftxui::StackedContainer::StackedContainer(std::vector<std::shared_ptr<ftxui::ComponentBase>, std::allocator<std::shared_ptr<ftxui::ComponentBase>>>)
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/component/container.cpp
explicit StackedContainer(Components children) : ContainerBase(std::move(children), nullptr) {}
O2
cpp
ftxui::StackedContainer::StackedContainer(std::vector<std::shared_ptr<ftxui::ComponentBase>, std::allocator<std::shared_ptr<ftxui::ComponentBase>>>): pushq %rbx subq $0x20, %rsp movq %rdi, %rbx movups (%rsi), %xmm0 movq %rsp, %rax movaps %xmm0, (%rax) movq 0x10(%rsi), %rcx movq %rcx, 0x10(%rax) xorps %xmm0, %xmm0 movups %xmm0, (%rsi) andq $0x0, 0x10(%rsi) movq %rax, %rsi xorl %edx, %edx callq 0x22498 movq %rsp, %rdi callq 0x1334e leaq 0x2d8e3(%rip), %rax # 0x51008 movq %rax, (%rbx) addq $0x20, %rsp popq %rbx retq movq %rax, %rbx movq %rsp, %rdi callq 0x1334e movq %rbx, %rdi callq 0xc7f0 nop
_ZN5ftxui16StackedContainerC2ESt6vectorISt10shared_ptrINS_13ComponentBaseEESaIS4_EE: push rbx sub rsp, 20h mov rbx, rdi movups xmm0, xmmword ptr [rsi] mov rax, rsp movaps xmmword ptr [rax], xmm0 mov rcx, [rsi+10h] mov [rax+10h], rcx xorps xmm0, xmm0 movups xmmword ptr [rsi], xmm0 and qword ptr [rsi+10h], 0 mov rsi, rax xor edx, edx call _ZN5ftxui13ContainerBaseC2ESt6vectorISt10shared_ptrINS_13ComponentBaseEESaIS4_EEPi; ftxui::ContainerBase::ContainerBase(std::vector<std::shared_ptr<ftxui::ComponentBase>>,int *) mov rdi, rsp call _ZNSt6vectorISt10shared_ptrIN5ftxui13ComponentBaseEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::ComponentBase>>::~vector() lea rax, off_51008 mov [rbx], rax add rsp, 20h pop rbx retn mov rbx, rax mov rdi, rsp call _ZNSt6vectorISt10shared_ptrIN5ftxui13ComponentBaseEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::ComponentBase>>::~vector() mov rdi, rbx call __Unwind_Resume
void ( ** ftxui::StackedContainer::StackedContainer( _QWORD *a1, __int128 *a2))(ftxui::ComponentBase *__hidden this) { void ( **result)(ftxui::ComponentBase *__hidden); // rax __int128 v3; // [rsp+0h] [rbp-28h] BYREF long long v4; // [rsp+10h] [rbp-18h] v3 = *a2; v4 = *((_QWORD *)a2 + 2); *a2 = 0LL; *((_QWORD *)a2 + 2) = 0LL; ftxui::ContainerBase::ContainerBase((long long)a1, (__int128 **)&v3, 0LL); std::vector<std::shared_ptr<ftxui::ComponentBase>>::~vector(&v3); result = off_51008; *a1 = off_51008; return result; }
StackedContainer: PUSH RBX SUB RSP,0x20 MOV RBX,RDI MOVUPS XMM0,xmmword ptr [RSI] MOV RAX,RSP MOVAPS xmmword ptr [RAX],XMM0 MOV RCX,qword ptr [RSI + 0x10] MOV qword ptr [RAX + 0x10],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI],XMM0 AND qword ptr [RSI + 0x10],0x0 LAB_0012370c: MOV RSI,RAX XOR EDX,EDX CALL 0x00122498 LAB_00123716: MOV RDI,RSP CALL 0x0011334e LEA RAX,[0x151008] MOV qword ptr [RBX],RAX ADD RSP,0x20 POP RBX RET
/* ftxui::StackedContainer::StackedContainer(std::vector<std::shared_ptr<ftxui::ComponentBase>, std::allocator<std::shared_ptr<ftxui::ComponentBase> > >) */ void __thiscall ftxui::StackedContainer::StackedContainer(StackedContainer *this,int8 *param_2) { int8 local_28; int8 uStack_20; int8 local_18; local_28 = *param_2; uStack_20 = param_2[1]; local_18 = param_2[2]; *param_2 = 0; param_2[1] = 0; param_2[2] = 0; /* try { // try from 0012370c to 00123715 has its CatchHandler @ 0012372e */ ContainerBase::ContainerBase((ContainerBase *)this,&local_28,0); std:: vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>> ::~vector((vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>> *)&local_28); *(int ***)this = &PTR__ComponentBase_00151008; return; }
36,709
fmt::v10::appender fmt::v10::detail::write_significand<fmt::v10::appender, char, char const*, fmt::v10::detail::digit_grouping<char>>(fmt::v10::appender, char const*, int, int, char, fmt::v10::detail::digit_grouping<char> const&)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
FMT_CONSTEXPR20 auto write_significand(OutputIt out, T significand, int significand_size, int integral_size, Char decimal_point, const Grouping& grouping) -> OutputIt { if (!grouping.has_separator()) { return write_significand(out, significand, significand_size, integral_size, decimal_point); } auto buffer = basic_memory_buffer<Char>(); write_significand(buffer_appender<Char>(buffer), significand, significand_size, integral_size, decimal_point); grouping.apply( out, basic_string_view<Char>(buffer.data(), to_unsigned(integral_size))); return detail::copy_str_noinline<Char>(buffer.data() + integral_size, buffer.end(), out); }
O0
c
fmt::v10::appender fmt::v10::detail::write_significand<fmt::v10::appender, char, char const*, fmt::v10::detail::digit_grouping<char>>(fmt::v10::appender, char const*, int, int, char, fmt::v10::detail::digit_grouping<char> const&): subq $0x2e8, %rsp # imm = 0x2E8 movb %r8b, %al movq %rdi, 0x2d0(%rsp) movq %rsi, 0x2c8(%rsp) movl %edx, 0x2c4(%rsp) movl %ecx, 0x2c0(%rsp) movb %al, 0x2bf(%rsp) movq %r9, 0x2b0(%rsp) movq 0x2b0(%rsp), %rdi callq 0x94a00 testb $0x1, %al jne 0x9e713 movq 0x2d0(%rsp), %rax movq %rax, 0x2a8(%rsp) movq 0x2c8(%rsp), %rsi movl 0x2c4(%rsp), %edx movl 0x2c0(%rsp), %ecx movb 0x2bf(%rsp), %al movq 0x2a8(%rsp), %rdi movsbl %al, %r8d callq 0x9dc70 movq %rax, 0x2d8(%rsp) jmp 0x9e8cb leaq 0x8f(%rsp), %rdi movq %rdi, 0x38(%rsp) callq 0x14c90 movq 0x38(%rsp), %rsi leaq 0x90(%rsp), %rdi callq 0x87c70 jmp 0x9e739 leaq 0x8f(%rsp), %rdi callq 0x14750 leaq 0x70(%rsp), %rdi leaq 0x90(%rsp), %rsi callq 0x23770 jmp 0x9e75a movq 0x2c8(%rsp), %rsi movl 0x2c4(%rsp), %edx movl 0x2c0(%rsp), %ecx movsbl 0x2bf(%rsp), %r8d movq 0x70(%rsp), %rdi callq 0x9dc70 movq %rax, 0x30(%rsp) jmp 0x9e78a movq 0x30(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x2b0(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x2d0(%rsp), %rax movq %rax, 0x60(%rsp) leaq 0x90(%rsp), %rdi callq 0x23b10 movq %rax, 0x20(%rsp) movl 0x2c0(%rsp), %edi callq 0x87c40 movl %eax, 0x2c(%rsp) jmp 0x9e7d2 movq 0x20(%rsp), %rsi movl 0x2c(%rsp), %eax movl %eax, %eax movl %eax, %edx leaq 0x50(%rsp), %rdi callq 0x23b30 movq 0x18(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x50(%rsp), %rdx movq 0x58(%rsp), %rcx callq 0x94a70 movq %rax, 0x10(%rsp) jmp 0x9e809 movq 0x10(%rsp), %rax movq %rax, 0x48(%rsp) leaq 0x90(%rsp), %rdi movq %rdi, (%rsp) callq 0x23b10 movq %rax, %rdi movq (%rsp), %rax movslq 0x2c0(%rsp), %rcx addq %rcx, %rdi movq %rax, 0x2e0(%rsp) movq 0x2e0(%rsp), %rax movq 0x8(%rax), %rsi movq 0x10(%rax), %rax addq %rax, %rsi movq 0x2d0(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rdx callq 0x8db60 movq %rax, 0x8(%rsp) jmp 0x9e86f movq 0x8(%rsp), %rax movq %rax, 0x2d8(%rsp) leaq 0x90(%rsp), %rdi callq 0x87cd0 jmp 0x9e8cb movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) leaq 0x8f(%rsp), %rdi callq 0x14750 jmp 0x9e8db movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) leaq 0x90(%rsp), %rdi callq 0x87cd0 jmp 0x9e8db movq 0x2d8(%rsp), %rax addq $0x2e8, %rsp # imm = 0x2E8 retq movq 0x80(%rsp), %rdi callq 0x14c80 nopl (%rax,%rax)
_ZN3fmt3v106detail17write_significandINS0_8appenderEcPKcNS1_14digit_groupingIcEEEET_S8_T1_iiT0_RKT2_: sub rsp, 2E8h mov al, r8b mov [rsp+2E8h+var_18], rdi mov [rsp+2E8h+var_20], rsi mov [rsp+2E8h+var_24], edx mov [rsp+2E8h+var_28], ecx mov [rsp+2E8h+var_29], al mov [rsp+2E8h+var_38], r9 mov rdi, [rsp+2E8h+var_38] call _ZNK3fmt3v106detail14digit_groupingIcE13has_separatorEv; fmt::v10::detail::digit_grouping<char>::has_separator(void) test al, 1 jnz short loc_9E713 mov rax, [rsp+2E8h+var_18] mov [rsp+2E8h+var_40], rax mov rsi, [rsp+2E8h+var_20] mov edx, [rsp+2E8h+var_24] mov ecx, [rsp+2E8h+var_28] mov al, [rsp+2E8h+var_29] mov rdi, [rsp+2E8h+var_40] movsx r8d, al call _ZN3fmt3v106detail17write_significandINS0_8appenderEcEET_S4_PKciiT0_; fmt::v10::detail::write_significand<fmt::v10::appender,char>(fmt::v10::appender,char const*,int,int,char) mov [rsp+2E8h+var_10], rax jmp loc_9E8CB loc_9E713: lea rdi, [rsp+2E8h+var_259] mov [rsp+2E8h+var_2B0], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rsp+2E8h+var_2B0] lea rdi, [rsp+2E8h+var_258] call _ZN3fmt3v1019basic_memory_bufferIcLm500ESaIcEEC2ERKS2_; fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::basic_memory_buffer(std::allocator<char> const&) jmp short $+2 loc_9E739: lea rdi, [rsp+2E8h+var_259] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+2E8h+var_278] lea rsi, [rsp+2E8h+var_258] call _ZN3fmt3v108appenderCI2St20back_insert_iteratorINS0_6detail6bufferIcEEEERS5_ jmp short $+2 loc_9E75A: mov rsi, [rsp+2E8h+var_20] mov edx, [rsp+2E8h+var_24] mov ecx, [rsp+2E8h+var_28] movsx r8d, [rsp+2E8h+var_29] mov rdi, [rsp+2E8h+var_278] call _ZN3fmt3v106detail17write_significandINS0_8appenderEcEET_S4_PKciiT0_; fmt::v10::detail::write_significand<fmt::v10::appender,char>(fmt::v10::appender,char const*,int,int,char) mov [rsp+2E8h+var_2B8], rax jmp short $+2 loc_9E78A: mov rax, [rsp+2E8h+var_2B8] mov [rsp+2E8h+var_280], rax mov rax, [rsp+2E8h+var_38] mov [rsp+2E8h+var_2D0], rax mov rax, [rsp+2E8h+var_18] mov [rsp+2E8h+var_288], rax lea rdi, [rsp+2E8h+var_258] call _ZN3fmt3v106detail6bufferIcE4dataEv; fmt::v10::detail::buffer<char>::data(void) mov [rsp+2E8h+var_2C8], rax mov edi, [rsp+2E8h+var_28] call _ZN3fmt3v106detail11to_unsignedIiEENSt13make_unsignedIT_E4typeES4_; fmt::v10::detail::to_unsigned<int>(int) mov [rsp+2E8h+var_2BC], eax jmp short $+2 loc_9E7D2: mov rsi, [rsp+2E8h+var_2C8] mov eax, [rsp+2E8h+var_2BC] mov eax, eax mov edx, eax lea rdi, [rsp+2E8h+var_298] call _ZN3fmt3v1017basic_string_viewIcEC2EPKcm; fmt::v10::basic_string_view<char>::basic_string_view(char const*,ulong) mov rdi, [rsp+2E8h+var_2D0] mov rsi, [rsp+2E8h+var_288] mov rdx, [rsp+2E8h+var_298] mov rcx, [rsp+2E8h+var_290] call _ZNK3fmt3v106detail14digit_groupingIcE5applyINS0_8appenderEcEET_S6_NS0_17basic_string_viewIT0_EE; fmt::v10::detail::digit_grouping<char>::apply<fmt::v10::appender,char>(fmt::v10::appender,fmt::v10::basic_string_view<char>) mov [rsp+2E8h+var_2D8], rax jmp short $+2 loc_9E809: mov rax, [rsp+2E8h+var_2D8] mov [rsp+2E8h+var_2A0], rax lea rdi, [rsp+2E8h+var_258] mov [rsp+2E8h+var_2E8], rdi call _ZN3fmt3v106detail6bufferIcE4dataEv; fmt::v10::detail::buffer<char>::data(void) mov rdi, rax mov rax, [rsp+2E8h+var_2E8] movsxd rcx, [rsp+2E8h+var_28] add rdi, rcx mov [rsp+2E8h+var_8], rax mov rax, [rsp+2E8h+var_8] mov rsi, [rax+8] mov rax, [rax+10h] add rsi, rax mov rax, [rsp+2E8h+var_18] mov [rsp+2E8h+var_2A8], rax mov rdx, [rsp+2E8h+var_2A8] call _ZN3fmt3v106detail17copy_str_noinlineIcPcNS0_8appenderEEET1_T0_S6_S5_; fmt::v10::detail::copy_str_noinline<char,char *,fmt::v10::appender>(char *,char *,fmt::v10::appender) mov [rsp+2E8h+var_2E0], rax jmp short $+2 loc_9E86F: mov rax, [rsp+2E8h+var_2E0] mov [rsp+2E8h+var_10], rax lea rdi, [rsp+2E8h+var_258] call _ZN3fmt3v1019basic_memory_bufferIcLm500ESaIcEED2Ev; fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer() jmp short loc_9E8CB mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax lea rdi, [rsp+arg_87] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_9E8DB mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax lea rdi, [rsp+arg_88] call _ZN3fmt3v1019basic_memory_bufferIcLm500ESaIcEED2Ev; fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer() jmp short loc_9E8DB loc_9E8CB: mov rax, [rsp+2E8h+var_10] add rsp, 2E8h retn loc_9E8DB: mov rdi, [rsp+arg_78] call __Unwind_Resume
long long fmt::v10::detail::write_significand<fmt::v10::appender,char,char const*,fmt::v10::detail::digit_grouping<char>>( long long a1, long long a2, int a3, int a4, char a5, long long a6) { long long v6; // rax const char *v7; // rsi long long v8; // r8 long long v9; // r9 long long v11; // [rsp+18h] [rbp-2D0h] long long v12; // [rsp+20h] [rbp-2C8h] unsigned int v13; // [rsp+2Ch] [rbp-2BCh] long long v14[2]; // [rsp+50h] [rbp-298h] BYREF long long v15; // [rsp+60h] [rbp-288h] long long v16; // [rsp+68h] [rbp-280h] long long v17[3]; // [rsp+70h] [rbp-278h] BYREF char v18; // [rsp+8Fh] [rbp-259h] BYREF long long v19; // [rsp+90h] [rbp-258h] BYREF long long v20; // [rsp+98h] [rbp-250h] long long v21; // [rsp+A0h] [rbp-248h] long long v22; // [rsp+2A8h] [rbp-40h] long long v23; // [rsp+2B0h] [rbp-38h] char v24; // [rsp+2BFh] [rbp-29h] int v25; // [rsp+2C0h] [rbp-28h] int v26; // [rsp+2C4h] [rbp-24h] long long v27; // [rsp+2C8h] [rbp-20h] long long v28; // [rsp+2D0h] [rbp-18h] long long v29; // [rsp+2D8h] [rbp-10h] long long *v30; // [rsp+2E0h] [rbp-8h] v28 = a1; v27 = a2; v26 = a3; v25 = a4; v24 = a5; v23 = a6; if ( fmt::v10::detail::digit_grouping<char>::has_separator(a6) ) { std::allocator<char>::allocator(); fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::basic_memory_buffer(&v19, (long long)&v18); std::allocator<char>::~allocator(&v18, &v18); ZN3fmt3v108appenderCI2St20back_insert_iteratorINS0_6detail6bufferIcEEEERS5_((long long)v17, (long long)&v19); v16 = fmt::v10::detail::write_significand<fmt::v10::appender,char>(v17[0], v27, v26, v25, v24); v11 = v23; v15 = v28; v12 = fmt::v10::detail::buffer<char>::data((long long)&v19); v13 = fmt::v10::detail::to_unsigned<int>(v25); fmt::v10::basic_string_view<char>::basic_string_view(v14, v12, v13); fmt::v10::detail::digit_grouping<char>::apply<fmt::v10::appender,char>(v11, v15, v14[0], v14[1]); v6 = fmt::v10::detail::buffer<char>::data((long long)&v19); v30 = &v19; v7 = (const char *)(v21 + v20); v29 = fmt::v10::detail::copy_str_noinline<char,char *,fmt::v10::appender>(v25 + v6, v21 + v20, v28, v25, v8, v9); fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer((long long)&v19, v7); } else { v22 = v28; return fmt::v10::detail::write_significand<fmt::v10::appender,char>(v28, v27, v26, v25, v24); } return v29; }
write_significand<fmt::v10::appender,char,char_const*,fmt::v10::detail::digit_grouping<char>>: SUB RSP,0x2e8 MOV AL,R8B MOV qword ptr [RSP + 0x2d0],RDI MOV qword ptr [RSP + 0x2c8],RSI MOV dword ptr [RSP + 0x2c4],EDX MOV dword ptr [RSP + 0x2c0],ECX MOV byte ptr [RSP + 0x2bf],AL MOV qword ptr [RSP + 0x2b0],R9 MOV RDI,qword ptr [RSP + 0x2b0] CALL 0x00194a00 TEST AL,0x1 JNZ 0x0019e713 MOV RAX,qword ptr [RSP + 0x2d0] MOV qword ptr [RSP + 0x2a8],RAX MOV RSI,qword ptr [RSP + 0x2c8] MOV EDX,dword ptr [RSP + 0x2c4] MOV ECX,dword ptr [RSP + 0x2c0] MOV AL,byte ptr [RSP + 0x2bf] MOV RDI,qword ptr [RSP + 0x2a8] MOVSX R8D,AL CALL 0x0019dc70 MOV qword ptr [RSP + 0x2d8],RAX JMP 0x0019e8cb LAB_0019e713: LEA RDI,[RSP + 0x8f] MOV qword ptr [RSP + 0x38],RDI CALL 0x00114c90 MOV RSI,qword ptr [RSP + 0x38] LAB_0019e72a: LEA RDI,[RSP + 0x90] CALL 0x00187c70 JMP 0x0019e739 LAB_0019e739: LEA RDI,[RSP + 0x8f] CALL 0x00114750 LAB_0019e746: LEA RDI,[RSP + 0x70] LEA RSI,[RSP + 0x90] CALL 0x00123770 JMP 0x0019e75a LAB_0019e75a: MOV RSI,qword ptr [RSP + 0x2c8] MOV EDX,dword ptr [RSP + 0x2c4] MOV ECX,dword ptr [RSP + 0x2c0] MOVSX R8D,byte ptr [RSP + 0x2bf] MOV RDI,qword ptr [RSP + 0x70] CALL 0x0019dc70 MOV qword ptr [RSP + 0x30],RAX JMP 0x0019e78a LAB_0019e78a: MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x68],RAX MOV RAX,qword ptr [RSP + 0x2b0] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x2d0] MOV qword ptr [RSP + 0x60],RAX LEA RDI,[RSP + 0x90] CALL 0x00123b10 MOV qword ptr [RSP + 0x20],RAX MOV EDI,dword ptr [RSP + 0x2c0] CALL 0x00187c40 MOV dword ptr [RSP + 0x2c],EAX JMP 0x0019e7d2 LAB_0019e7d2: MOV RSI,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RSP + 0x2c] MOV EAX,EAX MOV EDX,EAX LEA RDI,[RSP + 0x50] CALL 0x00123b30 MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x50] MOV RCX,qword ptr [RSP + 0x58] CALL 0x00194a70 MOV qword ptr [RSP + 0x10],RAX JMP 0x0019e809 LAB_0019e809: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x48],RAX LEA RDI,[RSP + 0x90] MOV qword ptr [RSP],RDI CALL 0x00123b10 MOV RDI,RAX MOV RAX,qword ptr [RSP] MOVSXD RCX,dword ptr [RSP + 0x2c0] ADD RDI,RCX MOV qword ptr [RSP + 0x2e0],RAX MOV RAX,qword ptr [RSP + 0x2e0] MOV RSI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x10] ADD RSI,RAX MOV RAX,qword ptr [RSP + 0x2d0] MOV qword ptr [RSP + 0x40],RAX MOV RDX,qword ptr [RSP + 0x40] CALL 0x0018db60 LAB_0019e868: MOV qword ptr [RSP + 0x8],RAX JMP 0x0019e86f LAB_0019e86f: MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x2d8],RAX LEA RDI,[RSP + 0x90] CALL 0x00187cd0 JMP 0x0019e8cb LAB_0019e8cb: MOV RAX,qword ptr [RSP + 0x2d8] ADD RSP,0x2e8 RET
/* fmt::v10::appender fmt::v10::detail::write_significand<fmt::v10::appender, char, char const*, fmt::v10::detail::digit_grouping<char> >(fmt::v10::appender, char const*, int, int, char, fmt::v10::detail::digit_grouping<char> const&) */ int8 fmt::v10::detail:: write_significand<fmt::v10::appender,char,char_const*,fmt::v10::detail::digit_grouping<char>> (int8 param_1,int8 param_2,int4 param_3,int param_4,char param_5, digit_grouping<char> *param_6) { digit_grouping<char> *pdVar1; uint uVar2; ulong uVar3; char *pcVar4; long lVar5; int8 local_298; int8 local_290; int8 local_288; int8 local_280; int8 local_278 [3]; allocator<char> local_259; allocator local_258 [8]; long local_250; long local_248; int8 local_40; digit_grouping<char> *local_38; char local_29; int local_28; int4 local_24; int8 local_20; int8 local_18; int8 local_10; buffer<char> *local_8; local_38 = param_6; local_29 = param_5; local_28 = param_4; local_24 = param_3; local_20 = param_2; local_18 = param_1; uVar3 = digit_grouping<char>::has_separator(param_6); if ((uVar3 & 1) == 0) { local_40 = local_18; local_10 = write_significand<fmt::v10::appender,char> (local_18,local_20,local_24,local_28,(int)local_29); } else { std::allocator<char>::allocator(); /* try { // try from 0019e72a to 0019e736 has its CatchHandler @ 0019e88b */ basic_memory_buffer<char,500ul,std::allocator<char>>::basic_memory_buffer(local_258); std::allocator<char>::~allocator(&local_259); /* try { // try from 0019e746 to 0019e867 has its CatchHandler @ 0019e8ab */ appender::back_insert_iterator((appender *)local_278,(buffer *)local_258); local_280 = write_significand<fmt::v10::appender,char> (local_278[0],local_20,local_24,local_28,(int)local_29); pdVar1 = local_38; local_288 = local_18; pcVar4 = (char *)buffer<char>::data((buffer<char> *)local_258); uVar2 = to_unsigned<int>(local_28); basic_string_view<char>::basic_string_view ((basic_string_view<char> *)&local_298,pcVar4,(ulong)uVar2); digit_grouping<char>::apply<fmt::v10::appender,char>(pdVar1,local_288,local_298,local_290); lVar5 = buffer<char>::data((buffer<char> *)local_258); local_8 = (buffer<char> *)local_258; local_10 = copy_str_noinline<char,char*,fmt::v10::appender> (lVar5 + local_28,local_250 + local_248,local_18); basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer ((basic_memory_buffer<char,500ul,std::allocator<char>> *)local_258); } return local_10; }
36,710
ggml_backend_cpu_get_extra_buffers_type()::$_0::operator()() const
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.cpp
std::vector<ggml_backend_buffer_type_t>& ggml_backend_cpu_get_extra_buffers_type() { static std::vector<ggml_backend_buffer_type_t> bufts = []() { std::vector<ggml_backend_buffer_type_t> bufts; #if defined(__AMX_INT8__) && defined(__AVX512VNNI__) if (ggml_backend_amx_buffer_type()) { bufts.push_back(ggml_backend_amx_buffer_type()); } #endif #ifdef GGML_USE_CPU_AARCH64 if (ggml_backend_cpu_aarch64_buffer_type()) { bufts.push_back(ggml_backend_cpu_aarch64_buffer_type()); } #endif bufts.push_back(NULL); return bufts; }(); return bufts; }
O0
cpp
ggml_backend_cpu_get_extra_buffers_type()::$_0::operator()() const: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x50(%rbp) movq %rdi, %rax movq %rax, -0x48(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movb $0x0, -0x11(%rbp) callq 0xe1b0 callq 0xe120 movq %rax, -0x40(%rbp) jmp 0x3df9f movq -0x40(%rbp), %rax cmpq $0x0, %rax je 0x3dfe4 callq 0xe120 movq %rax, -0x58(%rbp) jmp 0x3dfb4 movq -0x50(%rbp), %rdi movq -0x58(%rbp), %rax movq %rax, -0x30(%rbp) leaq -0x30(%rbp), %rsi callq 0xd9c0 jmp 0x3dfcb jmp 0x3dfe4 movq -0x50(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) callq 0xe738 jmp 0x3e018 movq -0x50(%rbp), %rdi movq $0x0, -0x38(%rbp) leaq -0x38(%rbp), %rsi callq 0xd9c0 jmp 0x3dffb movb $0x1, -0x11(%rbp) testb $0x1, -0x11(%rbp) jne 0x3e00e movq -0x50(%rbp), %rdi callq 0xe738 movq -0x48(%rbp), %rax addq $0x60, %rsp popq %rbp retq movq -0x20(%rbp), %rdi callq 0xe3e0 nopw %cs:(%rax,%rax)
_ZZ39ggml_backend_cpu_get_extra_buffers_typevENK3$_0clEv: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_50], rdi mov rax, rdi mov [rbp+var_48], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_11], 0 call __ZNSt6vectorIP24ggml_backend_buffer_typeSaIS1_EEC2Ev; std::vector<ggml_backend_buffer_type *>::vector(void) call __Z36ggml_backend_cpu_aarch64_buffer_typev; ggml_backend_cpu_aarch64_buffer_type(void) mov [rbp+var_40], rax jmp short $+2 loc_3DF9F: mov rax, [rbp+var_40] cmp rax, 0 jz short loc_3DFE4 call __Z36ggml_backend_cpu_aarch64_buffer_typev; ggml_backend_cpu_aarch64_buffer_type(void) mov [rbp+var_58], rax jmp short $+2 loc_3DFB4: mov rdi, [rbp+var_50] mov rax, [rbp+var_58] mov [rbp+var_30], rax lea rsi, [rbp+var_30] call __ZNSt6vectorIP24ggml_backend_buffer_typeSaIS1_EE9push_backEOS1_; std::vector<ggml_backend_buffer_type *>::push_back(ggml_backend_buffer_type *&&) jmp short $+2 loc_3DFCB: jmp short loc_3DFE4 mov rdi, [rbp+var_50]; void * mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax call j__ZNSt6vectorIP24ggml_backend_buffer_typeSaIS1_EED2Ev; std::vector<ggml_backend_buffer_type *>::~vector() jmp short loc_3E018 loc_3DFE4: mov rdi, [rbp+var_50] mov [rbp+var_38], 0 lea rsi, [rbp+var_38] call __ZNSt6vectorIP24ggml_backend_buffer_typeSaIS1_EE9push_backEOS1_; std::vector<ggml_backend_buffer_type *>::push_back(ggml_backend_buffer_type *&&) jmp short $+2 loc_3DFFB: mov [rbp+var_11], 1 test [rbp+var_11], 1 jnz short loc_3E00E mov rdi, [rbp+var_50]; void * call j__ZNSt6vectorIP24ggml_backend_buffer_typeSaIS1_EED2Ev; std::vector<ggml_backend_buffer_type *>::~vector() loc_3E00E: mov rax, [rbp+var_48] add rsp, 60h pop rbp retn loc_3E018: mov rdi, [rbp+var_20] call __Unwind_Resume
long long ggml_backend_cpu_get_extra_buffers_type(void)::$_0::operator()(long long a1, long long a2) { long long v3; // [rsp+28h] [rbp-38h] BYREF long long v4; // [rsp+30h] [rbp-30h] BYREF char v5; // [rsp+4Fh] [rbp-11h] long long v6; // [rsp+50h] [rbp-10h] long long v7; // [rsp+58h] [rbp-8h] v7 = a1; v6 = a2; v5 = 0; std::vector<ggml_backend_buffer_type *>::vector(); if ( ggml_backend_cpu_aarch64_buffer_type() ) { v4 = ggml_backend_cpu_aarch64_buffer_type(); std::vector<ggml_backend_buffer_type *>::push_back(a1, &v4); } v3 = 0LL; std::vector<ggml_backend_buffer_type *>::push_back(a1, &v3); return a1; }
operator(): PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x50],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x48],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV byte ptr [RBP + -0x11],0x0 CALL 0x0010e1b0 LAB_0013df94: CALL 0x0010e120 MOV qword ptr [RBP + -0x40],RAX JMP 0x0013df9f LAB_0013df9f: MOV RAX,qword ptr [RBP + -0x40] CMP RAX,0x0 JZ 0x0013dfe4 CALL 0x0010e120 MOV qword ptr [RBP + -0x58],RAX JMP 0x0013dfb4 LAB_0013dfb4: MOV RDI,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x30],RAX LEA RSI,[RBP + -0x30] CALL 0x0010d9c0 JMP 0x0013dfcb LAB_0013dfcb: JMP 0x0013dfe4 LAB_0013dfe4: MOV RDI,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x38],0x0 LEA RSI,[RBP + -0x38] CALL 0x0010d9c0 LAB_0013dff9: JMP 0x0013dffb LAB_0013dffb: MOV byte ptr [RBP + -0x11],0x1 TEST byte ptr [RBP + -0x11],0x1 JNZ 0x0013e00e MOV RDI,qword ptr [RBP + -0x50] CALL 0x0010e738 LAB_0013e00e: MOV RAX,qword ptr [RBP + -0x48] ADD RSP,0x60 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x0013e005) */ /* ggml_backend_cpu_get_extra_buffers_type()::$_0::TEMPNAMEPLACEHOLDERVALUE() const */ __0 * __thiscall ggml_backend_cpu_get_extra_buffers_type()::$_0::operator()(__0 *this) { long lVar1; ggml_backend_buffer_type *local_40; ggml_backend_buffer_type *local_38 [3]; int1 local_19; __0 *local_10; local_19 = 0; local_10 = this; std::vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>>::vector ((vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>> *)this); /* try { // try from 0013df94 to 0013dff8 has its CatchHandler @ 0013dfcd */ lVar1 = ggml_backend_cpu_aarch64_buffer_type(); if (lVar1 != 0) { local_38[0] = (ggml_backend_buffer_type *)ggml_backend_cpu_aarch64_buffer_type(); std::vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>>::push_back ((vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>> *)this, local_38); } local_40 = (ggml_backend_buffer_type *)0x0; std::vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>>::push_back ((vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>> *)this, &local_40); return this; }
36,711
ggml_backend_cpu_get_extra_buffers_type()::$_0::operator()() const
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.cpp
std::vector<ggml_backend_buffer_type_t>& ggml_backend_cpu_get_extra_buffers_type() { static std::vector<ggml_backend_buffer_type_t> bufts = []() { std::vector<ggml_backend_buffer_type_t> bufts; #if defined(__AMX_INT8__) && defined(__AVX512VNNI__) if (ggml_backend_amx_buffer_type()) { bufts.push_back(ggml_backend_amx_buffer_type()); } #endif #ifdef GGML_USE_CPU_AARCH64 if (ggml_backend_cpu_aarch64_buffer_type()) { bufts.push_back(ggml_backend_cpu_aarch64_buffer_type()); } #endif bufts.push_back(NULL); return bufts; }(); return bufts; }
O2
cpp
ggml_backend_cpu_get_extra_buffers_type()::$_0::operator()() const: pushq %rbx subq $0x10, %rsp movb 0x64e65(%rip), %al # 0x8a858 testb %al, %al je 0x25a04 leaq 0x64e42(%rip), %rax # 0x8a840 addq $0x10, %rsp popq %rbx retq leaq 0x64e4d(%rip), %rdi # 0x8a858 callq 0x8c20 testl %eax, %eax je 0x259f7 vxorps %xmm0, %xmm0, %xmm0 vmovups %xmm0, 0x64e20(%rip) # 0x8a840 andq $0x0, 0x64e28(%rip) # 0x8a850 callq 0x8a40 testq %rax, %rax je 0x25a4b callq 0x8a40 leaq 0x8(%rsp), %rsi movq %rax, (%rsi) leaq 0x64dfa(%rip), %rdi # 0x8a840 callq 0x80d0 leaq 0x8(%rsp), %rsi andq $0x0, (%rsi) leaq 0x64de5(%rip), %rdi # 0x8a840 callq 0x80d0 movq 0x20591(%rip), %rdi # 0x45ff8 leaq 0x64dd2(%rip), %rsi # 0x8a840 leaq 0x20c7b(%rip), %rdx # 0x466f0 callq 0x8620 leaq 0x64dd7(%rip), %rdi # 0x8a858 callq 0x8450 jmp 0x259f7 jmp 0x25a8f jmp 0x25a8f movq %rax, %rbx leaq 0x64da7(%rip), %rdi # 0x8a840 callq 0x82c0 leaq 0x64db3(%rip), %rdi # 0x8a858 callq 0x8440 movq %rbx, %rdi callq 0x8bd0
_Z39ggml_backend_cpu_get_extra_buffers_typev: push rbx sub rsp, 10h mov al, cs:_ZGVZ39ggml_backend_cpu_get_extra_buffers_typevE5bufts; `guard variable for'ggml_backend_cpu_get_extra_buffers_type(void)::bufts test al, al jz short loc_25A04 loc_259F7: lea rax, _ZZ39ggml_backend_cpu_get_extra_buffers_typevE5bufts; ggml_backend_cpu_get_extra_buffers_type(void)::bufts add rsp, 10h pop rbx retn loc_25A04: lea rdi, _ZGVZ39ggml_backend_cpu_get_extra_buffers_typevE5bufts; __guard * call ___cxa_guard_acquire test eax, eax jz short loc_259F7 vxorps xmm0, xmm0, xmm0 vmovups cs:_ZZ39ggml_backend_cpu_get_extra_buffers_typevE5bufts, xmm0; ggml_backend_cpu_get_extra_buffers_type(void)::bufts and cs:qword_8A850, 0 call __Z36ggml_backend_cpu_aarch64_buffer_typev; ggml_backend_cpu_aarch64_buffer_type(void) test rax, rax jz short loc_25A4B call __Z36ggml_backend_cpu_aarch64_buffer_typev; ggml_backend_cpu_aarch64_buffer_type(void) lea rsi, [rsp+18h+var_10] mov [rsi], rax lea rdi, _ZZ39ggml_backend_cpu_get_extra_buffers_typevE5bufts; ggml_backend_cpu_get_extra_buffers_type(void)::bufts call __ZNSt6vectorIP24ggml_backend_buffer_typeSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<ggml_backend_buffer_type *>::emplace_back<ggml_backend_buffer_type *>(ggml_backend_buffer_type * &&) loc_25A4B: lea rsi, [rsp+18h+var_10] and qword ptr [rsi], 0 lea rdi, _ZZ39ggml_backend_cpu_get_extra_buffers_typevE5bufts; ggml_backend_cpu_get_extra_buffers_type(void)::bufts call __ZNSt6vectorIP24ggml_backend_buffer_typeSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<ggml_backend_buffer_type *>::emplace_back<ggml_backend_buffer_type *>(ggml_backend_buffer_type * &&) mov rdi, cs:_ZNSt6vectorIP24ggml_backend_buffer_typeSaIS1_EED2Ev_ptr; lpfunc lea rsi, _ZZ39ggml_backend_cpu_get_extra_buffers_typevE5bufts; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZ39ggml_backend_cpu_get_extra_buffers_typevE5bufts; __guard * call ___cxa_guard_release jmp loc_259F7 jmp short loc_25A8F jmp short $+2 loc_25A8F: mov rbx, rax lea rdi, _ZZ39ggml_backend_cpu_get_extra_buffers_typevE5bufts; ggml_backend_cpu_get_extra_buffers_type(void)::bufts call __ZNSt12_Vector_baseIP24ggml_backend_buffer_typeSaIS1_EED2Ev; std::_Vector_base<ggml_backend_buffer_type *>::~_Vector_base() lea rdi, _ZGVZ39ggml_backend_cpu_get_extra_buffers_typevE5bufts; __guard * call ___cxa_guard_abort mov rdi, rbx call __Unwind_Resume
__int128 * ggml_backend_cpu_get_extra_buffers_type(__m128 _XMM0) { if ( !(_BYTE)`guard variable for'ggml_backend_cpu_get_extra_buffers_type(void)::bufts && __cxa_guard_acquire(&`guard variable for'ggml_backend_cpu_get_extra_buffers_type(void)::bufts) ) { __asm { vxorps xmm0, xmm0, xmm0 vmovups cs:_ZZ39ggml_backend_cpu_get_extra_buffers_typevE5bufts, xmm0; ggml_backend_cpu_get_extra_buffers_type(void)::bufts } qword_8A850 = 0LL; if ( ggml_backend_cpu_aarch64_buffer_type() ) { ggml_backend_cpu_aarch64_buffer_type(); std::vector<ggml_backend_buffer_type *>::emplace_back<ggml_backend_buffer_type *>(&ggml_backend_cpu_get_extra_buffers_type(void)::bufts); } std::vector<ggml_backend_buffer_type *>::emplace_back<ggml_backend_buffer_type *>(&ggml_backend_cpu_get_extra_buffers_type(void)::bufts); __cxa_atexit( (void (*)(void *))std::vector<ggml_backend_buffer_type *>::~vector, &ggml_backend_cpu_get_extra_buffers_type(void)::bufts, &_dso_handle); __cxa_guard_release(&`guard variable for'ggml_backend_cpu_get_extra_buffers_type(void)::bufts); } return &ggml_backend_cpu_get_extra_buffers_type(void)::bufts; }
ggml_backend_cpu_get_extra_buffers_type: PUSH RBX SUB RSP,0x10 MOV AL,byte ptr [0x0018a858] TEST AL,AL JZ 0x00125a04 LAB_001259f7: LEA RAX,[0x18a840] ADD RSP,0x10 POP RBX RET LAB_00125a04: LEA RDI,[0x18a858] CALL 0x00108c20 TEST EAX,EAX JZ 0x001259f7 VXORPS XMM0,XMM0,XMM0 VMOVUPS xmmword ptr [0x0018a840],XMM0 AND qword ptr [0x0018a850],0x0 LAB_00125a28: CALL 0x00108a40 TEST RAX,RAX JZ 0x00125a4b LAB_00125a32: CALL 0x00108a40 LEA RSI,[RSP + 0x8] MOV qword ptr [RSI],RAX LEA RDI,[0x18a840] CALL 0x001080d0 LAB_00125a4b: LEA RSI,[RSP + 0x8] AND qword ptr [RSI],0x0 LAB_00125a54: LEA RDI,[0x18a840] CALL 0x001080d0 LAB_00125a60: MOV RDI,qword ptr [0x00145ff8] LEA RSI,[0x18a840] LEA RDX,[0x1466f0] CALL 0x00108620 LEA RDI,[0x18a858] CALL 0x00108450 JMP 0x001259f7
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* ggml_backend_cpu_get_extra_buffers_type() */ int8 * ggml_backend_cpu_get_extra_buffers_type(void) { int iVar1; long lVar2; ggml_backend_buffer_type *local_10; if (ggml_backend_cpu_get_extra_buffers_type()::bufts == '\0') { iVar1 = __cxa_guard_acquire(&ggml_backend_cpu_get_extra_buffers_type()::bufts); if (iVar1 != 0) { ggml_backend_cpu_get_extra_buffers_type()::bufts = 0; DAT_0018a848 = 0; _DAT_0018a850 = 0; /* try { // try from 00125a28 to 00125a2c has its CatchHandler @ 00125a8d */ lVar2 = ggml_backend_cpu_aarch64_buffer_type(); if (lVar2 != 0) { /* try { // try from 00125a32 to 00125a4a has its CatchHandler @ 00125a8f */ local_10 = (ggml_backend_buffer_type *)ggml_backend_cpu_aarch64_buffer_type(); std::vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>>:: emplace_back<ggml_backend_buffer_type*> ((vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>> *) &ggml_backend_cpu_get_extra_buffers_type()::bufts,&local_10); } local_10 = (ggml_backend_buffer_type *)0x0; /* try { // try from 00125a54 to 00125a5f has its CatchHandler @ 00125a8b */ std::vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>>:: emplace_back<ggml_backend_buffer_type*> ((vector<ggml_backend_buffer_type*,std::allocator<ggml_backend_buffer_type*>> *) &ggml_backend_cpu_get_extra_buffers_type()::bufts,&local_10); __cxa_atexit(PTR__vector_00145ff8,&ggml_backend_cpu_get_extra_buffers_type()::bufts, &__dso_handle); __cxa_guard_release(&ggml_backend_cpu_get_extra_buffers_type()::bufts); } } return &ggml_backend_cpu_get_extra_buffers_type()::bufts; }
36,712
ggml_backend_cpu_get_extra_buffers_type()::$_0::operator()() const
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.cpp
std::vector<ggml_backend_buffer_type_t>& ggml_backend_cpu_get_extra_buffers_type() { static std::vector<ggml_backend_buffer_type_t> bufts = []() { std::vector<ggml_backend_buffer_type_t> bufts; #if defined(__AMX_INT8__) && defined(__AVX512VNNI__) if (ggml_backend_amx_buffer_type()) { bufts.push_back(ggml_backend_amx_buffer_type()); } #endif #ifdef GGML_USE_CPU_AARCH64 if (ggml_backend_cpu_aarch64_buffer_type()) { bufts.push_back(ggml_backend_cpu_aarch64_buffer_type()); } #endif bufts.push_back(NULL); return bufts; }(); return bufts; }
O3
cpp
ggml_backend_cpu_get_extra_buffers_type()::$_0::operator()() const: pushq %rbx movb 0x6552d(%rip), %al # 0x8d788 testb %al, %al je 0x28268 leaq 0x6550a(%rip), %rax # 0x8d770 popq %rbx retq leaq 0x65519(%rip), %rdi # 0x8d788 callq 0x8ac0 testl %eax, %eax je 0x2825f callq 0x282bc movq 0x20d74(%rip), %rdi # 0x48ff8 leaq 0x654e5(%rip), %rsi # 0x8d770 leaq 0x2138e(%rip), %rdx # 0x49620 callq 0x8560 leaq 0x654ea(%rip), %rdi # 0x8d788 callq 0x83a0 jmp 0x2825f movq %rax, %rbx leaq 0x654d9(%rip), %rdi # 0x8d788 callq 0x8390 movq %rbx, %rdi callq 0x8a70
_Z39ggml_backend_cpu_get_extra_buffers_typev: push rbx mov al, cs:_ZGVZ39ggml_backend_cpu_get_extra_buffers_typevE5bufts; `guard variable for'ggml_backend_cpu_get_extra_buffers_type(void)::bufts test al, al jz short loc_28268 loc_2825F: lea rax, _ZZ39ggml_backend_cpu_get_extra_buffers_typevE5bufts; ggml_backend_cpu_get_extra_buffers_type(void)::bufts pop rbx retn loc_28268: lea rdi, _ZGVZ39ggml_backend_cpu_get_extra_buffers_typevE5bufts; __guard * call ___cxa_guard_acquire test eax, eax jz short loc_2825F call _ZZ39ggml_backend_cpu_get_extra_buffers_typevENK3$_0clEv; ggml_backend_cpu_get_extra_buffers_type(void)::$_0::operator()(void) mov rdi, cs:_ZNSt6vectorIP24ggml_backend_buffer_typeSaIS1_EED2Ev_ptr; lpfunc lea rsi, _ZZ39ggml_backend_cpu_get_extra_buffers_typevE5bufts; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZ39ggml_backend_cpu_get_extra_buffers_typevE5bufts; __guard * call ___cxa_guard_release jmp short loc_2825F mov rbx, rax lea rdi, _ZGVZ39ggml_backend_cpu_get_extra_buffers_typevE5bufts; __guard * call ___cxa_guard_abort mov rdi, rbx call __Unwind_Resume
void **ggml_backend_cpu_get_extra_buffers_type(void) { if ( !(_BYTE)`guard variable for'ggml_backend_cpu_get_extra_buffers_type(void)::bufts && __cxa_guard_acquire(&`guard variable for'ggml_backend_cpu_get_extra_buffers_type(void)::bufts) ) { ggml_backend_cpu_get_extra_buffers_type(void)::$_0::operator()(); __cxa_atexit( (void (*)(void *))std::vector<ggml_backend_buffer_type *>::~vector, &ggml_backend_cpu_get_extra_buffers_type(void)::bufts, &_dso_handle); __cxa_guard_release(&`guard variable for'ggml_backend_cpu_get_extra_buffers_type(void)::bufts); } return &ggml_backend_cpu_get_extra_buffers_type(void)::bufts; }
ggml_backend_cpu_get_extra_buffers_type: PUSH RBX MOV AL,byte ptr [0x0018d788] TEST AL,AL JZ 0x00128268 LAB_0012825f: LEA RAX,[0x18d770] POP RBX RET LAB_00128268: LEA RDI,[0x18d788] CALL 0x00108ac0 TEST EAX,EAX JZ 0x0012825f LAB_00128278: CALL 0x001282bc LAB_0012827d: MOV RDI,qword ptr [0x00148ff8] LEA RSI,[0x18d770] LEA RDX,[0x149620] CALL 0x00108560 LEA RDI,[0x18d788] CALL 0x001083a0 JMP 0x0012825f
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* ggml_backend_cpu_get_extra_buffers_type() */ int8 * ggml_backend_cpu_get_extra_buffers_type(void) { int iVar1; __0 *this; if (ggml_backend_cpu_get_extra_buffers_type()::bufts == '\0') { this = (__0 *)&ggml_backend_cpu_get_extra_buffers_type()::bufts; iVar1 = __cxa_guard_acquire(); if (iVar1 != 0) { /* try { // try from 00128278 to 0012827c has its CatchHandler @ 001282a5 */ ggml_backend_cpu_get_extra_buffers_type()::$_0::operator()(this); __cxa_atexit(PTR__vector_00148ff8,&ggml_backend_cpu_get_extra_buffers_type()::bufts, &__dso_handle); __cxa_guard_release(&ggml_backend_cpu_get_extra_buffers_type()::bufts); } } return &ggml_backend_cpu_get_extra_buffers_type()::bufts; }
36,713
test_ast_create_number
tsotchke[P]eshkol/tests/unit/test_ast.c
static void test_ast_create_number(void) { printf("Testing number literal node creation...\n"); // Create an arena Arena* arena = arena_create(1024); assert(arena != NULL); // Create a number node AstNode* node = ast_create_number(arena, 42.0, 1, 1); assert(node != NULL); assert(node->type == AST_LITERAL_NUMBER); assert(node->line == 1); assert(node->column == 1); assert(node->as.number.value == 42.0); // Destroy the arena arena_destroy(arena); printf("PASS: ast_create_number\n"); }
O0
c
test_ast_create_number: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp leaq 0x7d89(%rip), %rdi # 0x9158 movb $0x0, %al callq 0x1070 movl $0x400, %edi # imm = 0x400 callq 0x43a0 movq %rax, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0x13ed jmp 0x140c leaq 0x7c7f(%rip), %rdi # 0x9073 leaq 0x7c86(%rip), %rsi # 0x9081 movl $0x2e, %edx leaq 0x7d7a(%rip), %rcx # 0x9181 callq 0x1080 movq -0x8(%rbp), %rdi movsd 0x7bf0(%rip), %xmm0 # 0x9008 movl $0x1, %edx movq %rdx, %rsi callq 0x54b0 movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) je 0x1432 jmp 0x1451 leaq 0x7cb8(%rip), %rdi # 0x90f1 leaq 0x7c41(%rip), %rsi # 0x9081 movl $0x32, %edx leaq 0x7d35(%rip), %rcx # 0x9181 callq 0x1080 movq -0x10(%rbp), %rax cmpl $0x0, (%rax) jne 0x145c jmp 0x147b leaq 0x7c9b(%rip), %rdi # 0x90fe leaq 0x7c17(%rip), %rsi # 0x9081 movl $0x33, %edx leaq 0x7d0b(%rip), %rcx # 0x9181 callq 0x1080 movq -0x10(%rbp), %rax cmpq $0x1, 0x8(%rax) jne 0x1488 jmp 0x14a7 leaq 0x7c90(%rip), %rdi # 0x911f leaq 0x7beb(%rip), %rsi # 0x9081 movl $0x34, %edx leaq 0x7cdf(%rip), %rcx # 0x9181 callq 0x1080 movq -0x10(%rbp), %rax cmpq $0x1, 0x10(%rax) jne 0x14b4 jmp 0x14d3 leaq 0x7c74(%rip), %rdi # 0x912f leaq 0x7bbf(%rip), %rsi # 0x9081 movl $0x35, %edx leaq 0x7cb3(%rip), %rcx # 0x9181 callq 0x1080 movq -0x10(%rbp), %rax movsd 0x48(%rax), %xmm0 movsd 0x7b24(%rip), %xmm1 # 0x9008 ucomisd %xmm1, %xmm0 jne 0x14ee jp 0x14ee jmp 0x150d leaq 0x7cae(%rip), %rdi # 0x91a3 leaq 0x7b85(%rip), %rsi # 0x9081 movl $0x36, %edx leaq 0x7c79(%rip), %rcx # 0x9181 callq 0x1080 movq -0x8(%rbp), %rdi callq 0x4980 leaq 0x7ca4(%rip), %rdi # 0x91c1 movb $0x0, %al callq 0x1070 addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
test_ast_create_number: push rbp mov rbp, rsp sub rsp, 10h lea rdi, aTestingNumberL; "Testing number literal node creation..."... mov al, 0 call _printf mov edi, 400h call arena_create mov [rbp+var_8], rax cmp [rbp+var_8], 0 jz short loc_13ED jmp short loc_140C loc_13ED: lea rdi, aArenaNull; "arena != NULL" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 2Eh ; '.' lea rcx, aVoidTestAstCre_0; "void test_ast_create_number(void)" call ___assert_fail loc_140C: mov rdi, [rbp+var_8] movsd xmm0, cs:qword_9008 mov edx, 1 mov rsi, rdx call ast_create_number mov [rbp+var_10], rax cmp [rbp+var_10], 0 jz short loc_1432 jmp short loc_1451 loc_1432: lea rdi, aNodeNull; "node != NULL" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 32h ; '2' lea rcx, aVoidTestAstCre_0; "void test_ast_create_number(void)" call ___assert_fail loc_1451: mov rax, [rbp+var_10] cmp dword ptr [rax], 0 jnz short loc_145C jmp short loc_147B loc_145C: lea rdi, aNodeTypeAstLit; "node->type == AST_LITERAL_NUMBER" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 33h ; '3' lea rcx, aVoidTestAstCre_0; "void test_ast_create_number(void)" call ___assert_fail loc_147B: mov rax, [rbp+var_10] cmp qword ptr [rax+8], 1 jnz short loc_1488 jmp short loc_14A7 loc_1488: lea rdi, aNodeLine1; "node->line == 1" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 34h ; '4' lea rcx, aVoidTestAstCre_0; "void test_ast_create_number(void)" call ___assert_fail loc_14A7: mov rax, [rbp+var_10] cmp qword ptr [rax+10h], 1 jnz short loc_14B4 jmp short loc_14D3 loc_14B4: lea rdi, aNodeColumn1; "node->column == 1" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 35h ; '5' lea rcx, aVoidTestAstCre_0; "void test_ast_create_number(void)" call ___assert_fail loc_14D3: mov rax, [rbp+var_10] movsd xmm0, qword ptr [rax+48h] movsd xmm1, cs:qword_9008 ucomisd xmm0, xmm1 jnz short loc_14EE jp short loc_14EE jmp short loc_150D loc_14EE: lea rdi, aNodeAsNumberVa; "node->as.number.value == 42.0" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 36h ; '6' lea rcx, aVoidTestAstCre_0; "void test_ast_create_number(void)" call ___assert_fail loc_150D: mov rdi, [rbp+var_8] call arena_destroy lea rdi, aPassAstCreateN_0; "PASS: ast_create_number\n" mov al, 0 call _printf add rsp, 10h pop rbp retn
long long test_ast_create_number(long long a1, long long a2, long long a3) { long long v3; // rdx long long number; // [rsp+0h] [rbp-10h] long long v6; // [rsp+8h] [rbp-8h] printf("Testing number literal node creation...\n", a2, a3); v6 = arena_create(1024LL); if ( !v6 ) __assert_fail( "arena != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_ast.c", 46LL, "void test_ast_create_number(void)"); number = ast_create_number(v6, 1LL, 42.0); if ( !number ) __assert_fail( "node != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_ast.c", 50LL, "void test_ast_create_number(void)"); if ( *(_DWORD *)number ) __assert_fail( "node->type == AST_LITERAL_NUMBER", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_ast.c", 51LL, "void test_ast_create_number(void)"); if ( *(_QWORD *)(number + 8) != 1LL ) __assert_fail( "node->line == 1", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_ast.c", 52LL, "void test_ast_create_number(void)"); if ( *(_QWORD *)(number + 16) != 1LL ) __assert_fail( "node->column == 1", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_ast.c", 53LL, "void test_ast_create_number(void)"); if ( *(double *)(number + 72) != 42.0 ) __assert_fail( "node->as.number.value == 42.0", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_ast.c", 54LL, "void test_ast_create_number(void)"); arena_destroy(v6); return printf("PASS: ast_create_number\n", 1LL, v3); }
test_ast_create_number: PUSH RBP MOV RBP,RSP SUB RSP,0x10 LEA RDI,[0x109158] MOV AL,0x0 CALL 0x00101070 MOV EDI,0x400 CALL 0x001043a0 MOV qword ptr [RBP + -0x8],RAX CMP qword ptr [RBP + -0x8],0x0 JZ 0x001013ed JMP 0x0010140c LAB_001013ed: LEA RDI,[0x109073] LEA RSI,[0x109081] MOV EDX,0x2e LEA RCX,[0x109181] CALL 0x00101080 LAB_0010140c: MOV RDI,qword ptr [RBP + -0x8] MOVSD XMM0,qword ptr [0x00109008] MOV EDX,0x1 MOV RSI,RDX CALL 0x001054b0 MOV qword ptr [RBP + -0x10],RAX CMP qword ptr [RBP + -0x10],0x0 JZ 0x00101432 JMP 0x00101451 LAB_00101432: LEA RDI,[0x1090f1] LEA RSI,[0x109081] MOV EDX,0x32 LEA RCX,[0x109181] CALL 0x00101080 LAB_00101451: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX],0x0 JNZ 0x0010145c JMP 0x0010147b LAB_0010145c: LEA RDI,[0x1090fe] LEA RSI,[0x109081] MOV EDX,0x33 LEA RCX,[0x109181] CALL 0x00101080 LAB_0010147b: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x8],0x1 JNZ 0x00101488 JMP 0x001014a7 LAB_00101488: LEA RDI,[0x10911f] LEA RSI,[0x109081] MOV EDX,0x34 LEA RCX,[0x109181] CALL 0x00101080 LAB_001014a7: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x10],0x1 JNZ 0x001014b4 JMP 0x001014d3 LAB_001014b4: LEA RDI,[0x10912f] LEA RSI,[0x109081] MOV EDX,0x35 LEA RCX,[0x109181] CALL 0x00101080 LAB_001014d3: MOV RAX,qword ptr [RBP + -0x10] MOVSD XMM0,qword ptr [RAX + 0x48] MOVSD XMM1,qword ptr [0x00109008] UCOMISD XMM0,XMM1 JNZ 0x001014ee JP 0x001014ee JMP 0x0010150d LAB_001014ee: LEA RDI,[0x1091a3] LEA RSI,[0x109081] MOV EDX,0x36 LEA RCX,[0x109181] CALL 0x00101080 LAB_0010150d: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00104980 LEA RDI,[0x1091c1] MOV AL,0x0 CALL 0x00101070 ADD RSP,0x10 POP RBP RET
void test_ast_create_number(void) { long lVar1; int *piVar2; printf("Testing number literal node creation...\n"); lVar1 = arena_create(0x400); if (lVar1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("arena != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_ast.c", 0x2e,"void test_ast_create_number(void)"); } piVar2 = (int *)ast_create_number(DAT_00109008,lVar1,1); if (piVar2 == (int *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("node != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_ast.c", 0x32,"void test_ast_create_number(void)"); } if (*piVar2 != 0) { /* WARNING: Subroutine does not return */ __assert_fail("node->type == AST_LITERAL_NUMBER", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_ast.c", 0x33,"void test_ast_create_number(void)"); } if (*(long *)(piVar2 + 2) == 1) { if (*(long *)(piVar2 + 4) != 1) { /* WARNING: Subroutine does not return */ __assert_fail("node->column == 1", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_ast.c" ,0x35,"void test_ast_create_number(void)"); } if ((*(double *)(piVar2 + 0x12) == DAT_00109008) && (!NAN(*(double *)(piVar2 + 0x12)) && !NAN(DAT_00109008))) { arena_destroy(lVar1); printf("PASS: ast_create_number\n"); return; } /* WARNING: Subroutine does not return */ __assert_fail("node->as.number.value == 42.0", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_ast.c", 0x36,"void test_ast_create_number(void)"); } /* WARNING: Subroutine does not return */ __assert_fail("node->line == 1", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_ast.c", 0x34,"void test_ast_create_number(void)"); }
36,714
File::GetCurrentDir[abi:cxx11]()
Dolphin-anty/Source/Core/Common/FileUtil.cpp
std::string GetCurrentDir() { std::error_code error; auto directory = PathToString(fs::current_path(error)); if (error) { ERROR_LOG_FMT(COMMON, "{} failed: {}", __func__, error.message()); return {}; } return directory; }
O3
cpp
File::GetCurrentDir[abi:cxx11](): pushq %r15 pushq %r14 pushq %rbx subq $0xa0, %rsp movq %rdi, %rbx leaq 0x30(%rsp), %r15 movl $0x0, (%r15) callq 0x76d0 movq %rax, 0x8(%r15) leaq 0x60(%rsp), %r14 movq %r14, %rdi movq %r15, %rsi callq 0x7730 leaq 0x10(%rsp), %rdi movq %r14, %rsi callq 0x14040 movq %r14, %rdi callq 0x1dbfc movl (%r15), %edx testl %edx, %edx je 0x1b796 movq 0x38(%rsp), %rsi movq (%rsi), %rax leaq 0x40(%rsp), %r15 movq %r15, %rdi callq *0x20(%rax) movups (%r15), %xmm0 leaq 0x2269f(%rip), %rax # 0x3dda2 movq %rax, 0x60(%rsp) movaps %xmm0, 0x70(%rsp) leaq 0x90(%rsp), %rax movq $0xdc, (%rax) movq %r14, 0x8(%rax) movq %rax, (%rsp) leaq 0x22589(%rip), %rdx # 0x3dcb4 leaq 0x22aa4(%rip), %r8 # 0x3e1d6 movl $0xd, %r9d movl $0x2, %edi movl $0x6, %esi movl $0x272, %ecx # imm = 0x272 callq 0xc12c movq (%r15), %rdi leaq 0x50(%rsp), %rax cmpq %rax, %rdi je 0x1b766 movq 0x50(%rsp), %rsi incq %rsi callq 0x7560 leaq 0x10(%rbx), %rax movq %rax, (%rbx) movq $0x0, 0x8(%rbx) movb $0x0, 0x10(%rbx) leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1b7c8 movq 0x20(%rsp), %rsi incq %rsi callq 0x7560 jmp 0x1b7c8 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x20(%rsp), %rcx movq -0x10(%rcx), %rdx cmpq %rcx, %rdx je 0x1b7b9 movq %rdx, (%rbx) movq 0x20(%rsp), %rax movq %rax, 0x10(%rbx) jmp 0x1b7bf movups (%rcx), %xmm0 movups %xmm0, (%rax) movq 0x18(%rsp), %rax movq %rax, 0x8(%rbx) movq %rbx, %rax addq $0xa0, %rsp popq %rbx popq %r14 popq %r15 retq
_ZN4File13GetCurrentDirB5cxx11Ev: push r15 push r14 push rbx sub rsp, 0A0h mov rbx, rdi lea r15, [rsp+0B8h+var_88] mov dword ptr [r15], 0 call __ZNSt3_V215system_categoryEv; std::_V2::system_category(void) mov [r15+8], rax lea r14, [rsp+0B8h+var_58] mov rdi, r14 mov rsi, r15 call __ZNSt10filesystem12current_pathB5cxx11ERSt10error_code; std::filesystem::current_path(std::error_code &) lea rdi, [rsp+0B8h+var_A8]; std::filesystem::__cxx11::path * mov rsi, r14 call _Z12PathToStringRKNSt10filesystem7__cxx114pathE; PathToString(std::filesystem::__cxx11::path const&) mov rdi, r14; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() mov edx, [r15] test edx, edx jz loc_1B796 mov rsi, [rsp+0B8h+var_80] mov rax, [rsi] lea r15, [rsp+0B8h+var_78] mov rdi, r15 call qword ptr [rax+20h] movups xmm0, xmmword ptr [r15] lea rax, aGetcurrentdir; "GetCurrentDir" mov [rsp+0B8h+var_58], rax movaps [rsp+0B8h+var_48], xmm0 lea rax, [rsp+0B8h+var_28] mov qword ptr [rax], 0DCh mov [rax+8], r14 mov [rsp+0B8h+var_B8], rax lea rdx, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/Dolphi"... lea r8, aFailed_3; "{} failed: {}" mov r9d, 0Dh mov edi, 2 mov esi, 6 mov ecx, 272h call _ZN6Common3Log17GenericLogFmtImplENS0_8LogLevelENS0_7LogTypeEPKciN3fmt3v1017basic_string_viewIcEERKNS6_17basic_format_argsINS6_20basic_format_contextINS6_8appenderEcEEEE; Common::Log::GenericLogFmtImpl(Common::Log::LogLevel,Common::Log::LogType,char const*,int,fmt::v10::basic_string_view<char>,fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>> const&) mov rdi, [r15]; void * lea rax, [rsp+0B8h+var_68] cmp rdi, rax jz short loc_1B766 mov rsi, [rsp+0B8h+var_68] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1B766: lea rax, [rbx+10h] mov [rbx], rax mov qword ptr [rbx+8], 0 mov byte ptr [rbx+10h], 0 lea rax, [rsp+0B8h+var_98] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_1B7C8 mov rsi, [rsp+0B8h+var_98] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_1B7C8 loc_1B796: lea rax, [rbx+10h] mov [rbx], rax lea rcx, [rsp+0B8h+var_98] mov rdx, [rcx-10h] cmp rdx, rcx jz short loc_1B7B9 mov [rbx], rdx mov rax, [rsp+0B8h+var_98] mov [rbx+10h], rax jmp short loc_1B7BF loc_1B7B9: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rax], xmm0 loc_1B7BF: mov rax, [rsp+0B8h+var_A0] mov [rbx+8], rax loc_1B7C8: mov rax, rbx add rsp, 0A0h pop rbx pop r14 pop r15 retn
long long File::GetCurrentDir[abi:cxx11](long long a1) { void *v2[2]; // [rsp+10h] [rbp-A8h] BYREF __int128 v3; // [rsp+20h] [rbp-98h] BYREF int v4; // [rsp+30h] [rbp-88h] BYREF long long v5; // [rsp+38h] [rbp-80h] __int128 v6; // [rsp+40h] [rbp-78h] BYREF long long v7; // [rsp+50h] [rbp-68h] BYREF _QWORD v8[2]; // [rsp+60h] [rbp-58h] BYREF __int128 v9; // [rsp+70h] [rbp-48h] _QWORD v10[5]; // [rsp+90h] [rbp-28h] BYREF v4 = 0; v5 = std::_V2::system_category((std::_V2 *)a1); std::filesystem::current_path[abi:cxx11](v8, &v4); PathToString((const std::filesystem::__cxx11::path *)v2, (long long)v8); std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)v8); if ( v4 ) { (*(void ( **)(__int128 *))(*(_QWORD *)v5 + 32LL))(&v6); v8[0] = "GetCurrentDir"; v9 = v6; v10[0] = 220LL; v10[1] = v8; Common::Log::GenericLogFmtImpl( 2u, 6u, (long long)"/workspace/llm4binary/github2025/Dolphin-anty/Source/Core/Common/FileUtil.cpp", 0x272u, (long long)"{} failed: {}", 13LL, v10); if ( (long long *)v6 != &v7 ) operator delete((void *)v6, v7 + 1); *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; if ( v2[0] != &v3 ) operator delete(v2[0], v3 + 1); } else { *(_QWORD *)a1 = a1 + 16; if ( v2[0] == &v3 ) { *(_OWORD *)(a1 + 16) = v3; } else { *(void **)a1 = v2[0]; *(_QWORD *)(a1 + 16) = v3; } *(void **)(a1 + 8) = v2[1]; } return a1; }
GetCurrentDir[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xa0 MOV RBX,RDI LEA R15,[RSP + 0x30] MOV dword ptr [R15],0x0 CALL 0x001076d0 MOV qword ptr [R15 + 0x8],RAX LEA R14,[RSP + 0x60] MOV RDI,R14 MOV RSI,R15 CALL 0x00107730 LEA RDI,[RSP + 0x10] MOV RSI,R14 CALL 0x00114040 MOV RDI,R14 CALL 0x0011dbfc MOV EDX,dword ptr [R15] TEST EDX,EDX JZ 0x0011b796 MOV RSI,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RSI] LEA R15,[RSP + 0x40] MOV RDI,R15 CALL qword ptr [RAX + 0x20] MOVUPS XMM0,xmmword ptr [R15] LEA RAX,[0x13dda2] MOV qword ptr [RSP + 0x60],RAX MOVAPS xmmword ptr [RSP + 0x70],XMM0 LEA RAX,[RSP + 0x90] MOV qword ptr [RAX],0xdc MOV qword ptr [RAX + 0x8],R14 MOV qword ptr [RSP],RAX LEA RDX,[0x13dcb4] LEA R8,[0x13e1d6] MOV R9D,0xd MOV EDI,0x2 MOV ESI,0x6 MOV ECX,0x272 CALL 0x0010c12c MOV RDI,qword ptr [R15] LEA RAX,[RSP + 0x50] CMP RDI,RAX JZ 0x0011b766 MOV RSI,qword ptr [RSP + 0x50] INC RSI CALL 0x00107560 LAB_0011b766: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX MOV qword ptr [RBX + 0x8],0x0 MOV byte ptr [RBX + 0x10],0x0 LEA RAX,[RSP + 0x20] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0011b7c8 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x00107560 JMP 0x0011b7c8 LAB_0011b796: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RCX,[RSP + 0x20] MOV RDX,qword ptr [RCX + -0x10] CMP RDX,RCX JZ 0x0011b7b9 MOV qword ptr [RBX],RDX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RBX + 0x10],RAX JMP 0x0011b7bf LAB_0011b7b9: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RAX],XMM0 LAB_0011b7bf: MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RBX + 0x8],RAX LAB_0011b7c8: MOV RAX,RBX ADD RSP,0xa0 POP RBX POP R14 POP R15 RET
/* File::GetCurrentDir[abi:cxx11]() */ File * __thiscall File::GetCurrentDir_abi_cxx11_(File *this) { long *local_a8; int8 local_a0; long local_98; int8 uStack_90; int local_88; long *local_80; int4 local_78; int4 uStack_74; int4 uStack_70; int4 uStack_6c; long local_68 [2]; char *local_58 [2]; int4 local_48; int4 uStack_44; int4 uStack_40; int4 uStack_3c; int8 local_28; error_code *local_20; local_88 = 0; local_80 = (long *)std::_V2::system_category(); std::filesystem::current_path_abi_cxx11_((error_code *)local_58); PathToString((path *)&local_a8); std::filesystem::__cxx11::path::~path((path *)local_58); if (local_88 == 0) { *(File **)this = this + 0x10; if (local_a8 == &local_98) { *(long *)(this + 0x10) = local_98; *(int8 *)(this + 0x18) = uStack_90; } else { *(long **)this = local_a8; *(long *)(this + 0x10) = local_98; } *(int8 *)(this + 8) = local_a0; } else { (**(code **)(*local_80 + 0x20))(&local_78); local_58[0] = "GetCurrentDir"; local_48 = local_78; uStack_44 = uStack_74; uStack_40 = uStack_70; uStack_3c = uStack_6c; local_28 = 0xdc; local_20 = (error_code *)local_58; Common::Log::GenericLogFmtImpl ((Log *)0x2,6, "/workspace/llm4binary/github2025/Dolphin-anty/Source/Core/Common/FileUtil.cpp",0x272 ,"{} failed: {}",0xd,&local_28); if ((long *)CONCAT44(uStack_74,local_78) != local_68) { operator_delete((long *)CONCAT44(uStack_74,local_78),local_68[0] + 1); } *(File **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (File)0x0; if (local_a8 != &local_98) { operator_delete(local_a8,local_98 + 1); } } return this; }
36,715
pvio_socket_wait_io_or_timeout
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
int pvio_socket_wait_io_or_timeout(MARIADB_PVIO *pvio, my_bool is_read, int timeout) { int rc; struct st_pvio_socket *csock= NULL; #ifndef _WIN32 struct pollfd p_fd; #else struct timeval tv= {0,0}; fd_set fds, exc_fds; #endif if (!pvio || !pvio->data) return 0; if (pvio->mysql->options.extension && pvio->mysql->options.extension->io_wait != NULL) { my_socket handle; if (pvio_socket_get_handle(pvio, &handle)) return 0; return pvio->mysql->options.extension->io_wait(handle, is_read, timeout); } csock= (struct st_pvio_socket *)pvio->data; { #ifndef _WIN32 memset(&p_fd, 0, sizeof(p_fd)); p_fd.fd= csock->socket; p_fd.events= (is_read) ? POLLIN : POLLOUT; if (!timeout) timeout= -1; do { rc= poll(&p_fd, 1, timeout); } while (rc == -1 && errno == EINTR); if (rc == 0) errno= ETIMEDOUT; #else FD_ZERO(&fds); FD_ZERO(&exc_fds); FD_SET(csock->socket, &fds); FD_SET(csock->socket, &exc_fds); if (timeout >= 0) { tv.tv_sec= timeout / 1000; tv.tv_usec= (timeout % 1000) * 1000; } rc= select(0, (is_read) ? &fds : NULL, (is_read) ? NULL : &fds, &exc_fds, (timeout >= 0) ? &tv : NULL); if (rc == SOCKET_ERROR) { errno= WSAGetLastError(); } else if (rc == 0) { rc= SOCKET_ERROR; WSASetLastError(WSAETIMEDOUT); errno= ETIMEDOUT; } else if (FD_ISSET(csock->socket, &exc_fds)) { int err; int len = sizeof(int); if (getsockopt(csock->socket, SOL_SOCKET, SO_ERROR, (char *)&err, &len) != SOCKET_ERROR) { WSASetLastError(err); errno= err; } rc= SOCKET_ERROR; } #endif } return rc; }
O0
c
pvio_socket_wait_io_or_timeout: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movb %sil, %al movq %rdi, -0x10(%rbp) movb %al, -0x11(%rbp) movl %edx, -0x18(%rbp) movq $0x0, -0x28(%rbp) cmpq $0x0, -0x10(%rbp) je 0x5ba7e movq -0x10(%rbp), %rax cmpq $0x0, (%rax) jne 0x5ba8a movl $0x0, -0x4(%rbp) jmp 0x5bb94 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax cmpq $0x0, 0x480(%rax) je 0x5bafe movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq 0x480(%rax), %rax cmpq $0x0, 0x140(%rax) je 0x5bafe movq -0x10(%rbp), %rdi leaq -0x34(%rbp), %rsi callq 0x5ca80 cmpb $0x0, %al je 0x5bad2 movl $0x0, -0x4(%rbp) jmp 0x5bb94 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq 0x480(%rax), %rax movq 0x140(%rax), %rax movl -0x34(%rbp), %edi movb -0x11(%rbp), %cl movl -0x18(%rbp), %edx movsbl %cl, %esi callq *%rax movl %eax, -0x4(%rbp) jmp 0x5bb94 movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) leaq -0x30(%rbp), %rdi xorl %esi, %esi movl $0x8, %edx callq 0x14260 movq -0x28(%rbp), %rax movl (%rax), %eax movl %eax, -0x30(%rbp) movsbl -0x11(%rbp), %edx movl $0x4, %eax movl $0x1, %ecx cmpl $0x0, %edx cmovnel %ecx, %eax movw %ax, -0x2c(%rbp) cmpl $0x0, -0x18(%rbp) jne 0x5bb47 movl $0xffffffff, -0x18(%rbp) # imm = 0xFFFFFFFF jmp 0x5bb49 movl -0x18(%rbp), %edx leaq -0x30(%rbp), %rdi movl $0x1, %esi callq 0x146a0 movl %eax, -0x1c(%rbp) xorl %eax, %eax cmpl $-0x1, -0x1c(%rbp) movb %al, -0x35(%rbp) jne 0x5bb76 callq 0x14050 cmpl $0x4, (%rax) sete %al movb %al, -0x35(%rbp) movb -0x35(%rbp), %al testb $0x1, %al jne 0x5bb49 cmpl $0x0, -0x1c(%rbp) jne 0x5bb8e callq 0x14050 movl $0x6e, (%rax) movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax)
pvio_socket_wait_io_or_timeout: push rbp mov rbp, rsp sub rsp, 40h mov al, sil mov [rbp+var_10], rdi mov [rbp+var_11], al mov [rbp+var_18], edx mov [rbp+var_28], 0 cmp [rbp+var_10], 0 jz short loc_5BA7E mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jnz short loc_5BA8A loc_5BA7E: mov [rbp+var_4], 0 jmp loc_5BB94 loc_5BA8A: mov rax, [rbp+var_10] mov rax, [rax+40h] cmp qword ptr [rax+480h], 0 jz short loc_5BAFE mov rax, [rbp+var_10] mov rax, [rax+40h] mov rax, [rax+480h] cmp qword ptr [rax+140h], 0 jz short loc_5BAFE mov rdi, [rbp+var_10] lea rsi, [rbp+var_34] call pvio_socket_get_handle cmp al, 0 jz short loc_5BAD2 mov [rbp+var_4], 0 jmp loc_5BB94 loc_5BAD2: mov rax, [rbp+var_10] mov rax, [rax+40h] mov rax, [rax+480h] mov rax, [rax+140h] mov edi, [rbp+var_34] mov cl, [rbp+var_11] mov edx, [rbp+var_18] movsx esi, cl call rax mov [rbp+var_4], eax jmp loc_5BB94 loc_5BAFE: mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_28], rax lea rdi, [rbp+var_30] xor esi, esi mov edx, 8 call _memset mov rax, [rbp+var_28] mov eax, [rax] mov [rbp+var_30], eax movsx edx, [rbp+var_11] mov eax, 4 mov ecx, 1 cmp edx, 0 cmovnz eax, ecx mov [rbp+var_2C], ax cmp [rbp+var_18], 0 jnz short loc_5BB47 mov [rbp+var_18], 0FFFFFFFFh loc_5BB47: jmp short $+2 loc_5BB49: mov edx, [rbp+var_18] lea rdi, [rbp+var_30] mov esi, 1 call _poll mov [rbp+var_1C], eax xor eax, eax cmp [rbp+var_1C], 0FFFFFFFFh mov [rbp+var_35], al jnz short loc_5BB76 call ___errno_location cmp dword ptr [rax], 4 setz al mov [rbp+var_35], al loc_5BB76: mov al, [rbp+var_35] test al, 1 jnz short loc_5BB49 cmp [rbp+var_1C], 0 jnz short loc_5BB8E call ___errno_location mov dword ptr [rax], 6Eh ; 'n' loc_5BB8E: mov eax, [rbp+var_1C] mov [rbp+var_4], eax loc_5BB94: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long pvio_socket_wait_io_or_timeout(int **a1, char a2, unsigned int a3) { __int16 v3; // ax bool v5; // [rsp+Bh] [rbp-35h] unsigned int v6; // [rsp+Ch] [rbp-34h] BYREF int v7; // [rsp+10h] [rbp-30h] BYREF __int16 v8; // [rsp+14h] [rbp-2Ch] int *v9; // [rsp+18h] [rbp-28h] unsigned int v10; // [rsp+24h] [rbp-1Ch] unsigned int v11; // [rsp+28h] [rbp-18h] char v12; // [rsp+2Fh] [rbp-11h] int **v13; // [rsp+30h] [rbp-10h] v13 = a1; v12 = a2; v11 = a3; v9 = 0LL; if ( a1 && *v13 ) { if ( *((_QWORD *)v13[8] + 144) && *(_QWORD *)(*((_QWORD *)v13[8] + 144) + 320LL) ) { if ( (unsigned __int8)pvio_socket_get_handle(v13, &v6) ) return 0; else return (unsigned int)(*(long long ( **)(_QWORD, _QWORD, _QWORD))(*((_QWORD *)v13[8] + 144) + 320LL))( v6, (unsigned int)v12, v11); } else { v9 = *v13; memset(&v7, 0LL, 8LL); v7 = *v9; v3 = 4; if ( v12 ) v3 = 1; v8 = v3; if ( !v11 ) v11 = -1; do { v10 = poll(&v7, 1LL, v11); v5 = 0; if ( v10 == -1 ) v5 = *(_DWORD *)__errno_location(&v7) == 4; } while ( v5 ); if ( !v10 ) *(_DWORD *)__errno_location(&v7) = 110; return v10; } } else { return 0; } }
pvio_socket_wait_io_or_timeout: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV AL,SIL MOV qword ptr [RBP + -0x10],RDI MOV byte ptr [RBP + -0x11],AL MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x28],0x0 CMP qword ptr [RBP + -0x10],0x0 JZ 0x0015ba7e MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JNZ 0x0015ba8a LAB_0015ba7e: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0015bb94 LAB_0015ba8a: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] CMP qword ptr [RAX + 0x480],0x0 JZ 0x0015bafe MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RAX + 0x480] CMP qword ptr [RAX + 0x140],0x0 JZ 0x0015bafe MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x34] CALL 0x0015ca80 CMP AL,0x0 JZ 0x0015bad2 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0015bb94 LAB_0015bad2: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x140] MOV EDI,dword ptr [RBP + -0x34] MOV CL,byte ptr [RBP + -0x11] MOV EDX,dword ptr [RBP + -0x18] MOVSX ESI,CL CALL RAX MOV dword ptr [RBP + -0x4],EAX JMP 0x0015bb94 LAB_0015bafe: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX LEA RDI,[RBP + -0x30] XOR ESI,ESI MOV EDX,0x8 CALL 0x00114260 MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x30],EAX MOVSX EDX,byte ptr [RBP + -0x11] MOV EAX,0x4 MOV ECX,0x1 CMP EDX,0x0 CMOVNZ EAX,ECX MOV word ptr [RBP + -0x2c],AX CMP dword ptr [RBP + -0x18],0x0 JNZ 0x0015bb47 MOV dword ptr [RBP + -0x18],0xffffffff LAB_0015bb47: JMP 0x0015bb49 LAB_0015bb49: MOV EDX,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x30] MOV ESI,0x1 CALL 0x001146a0 MOV dword ptr [RBP + -0x1c],EAX XOR EAX,EAX CMP dword ptr [RBP + -0x1c],-0x1 MOV byte ptr [RBP + -0x35],AL JNZ 0x0015bb76 CALL 0x00114050 CMP dword ptr [RAX],0x4 SETZ AL MOV byte ptr [RBP + -0x35],AL LAB_0015bb76: MOV AL,byte ptr [RBP + -0x35] TEST AL,0x1 JNZ 0x0015bb49 CMP dword ptr [RBP + -0x1c],0x0 JNZ 0x0015bb8e CALL 0x00114050 MOV dword ptr [RAX],0x6e LAB_0015bb8e: MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x4],EAX LAB_0015bb94: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int pvio_socket_wait_io_or_timeout(long *param_1,char param_2,int param_3) { char cVar1; int *piVar2; bool bVar3; int4 local_3c; pollfd local_38; int *local_30; int local_24; int local_20; char local_19; long *local_18; int local_c; local_30 = (int *)0x0; if ((param_1 == (long *)0x0) || (*param_1 == 0)) { local_c = 0; } else { local_20 = param_3; local_19 = param_2; local_18 = param_1; if ((*(long *)(param_1[8] + 0x480) == 0) || (*(long *)(*(long *)(param_1[8] + 0x480) + 0x140) == 0)) { local_30 = (int *)*param_1; memset(&local_38,0,8); local_38.fd = *local_30; local_38.events = 4; if (local_19 != '\0') { local_38.events = 1; } if (local_20 == 0) { local_20 = -1; } do { local_24 = poll(&local_38,1,local_20); bVar3 = false; if (local_24 == -1) { piVar2 = __errno_location(); bVar3 = *piVar2 == 4; } } while (bVar3); if (local_24 == 0) { piVar2 = __errno_location(); *piVar2 = 0x6e; } local_c = local_24; } else { cVar1 = pvio_socket_get_handle(param_1,&local_3c); if (cVar1 == '\0') { local_c = (**(code **)(*(long *)(local_18[8] + 0x480) + 0x140)) (local_3c,(int)local_19,local_20,local_19); } else { local_c = 0; } } } return local_c; }
36,716
my_casedn_utf16
eloqsql/strings/ctype-ucs2.c
static size_t my_casedn_utf16(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen) { my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; my_charset_conv_wc_mb wc_mb= cs->cset->wc_mb; int res; const char *srcend= src + srclen; char *dstend= dst + dstlen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(srclen <= dstlen); while ((src < srcend) && (res= mb_wc(cs, &wc, (uchar *) src, (uchar *) srcend)) > 0) { my_tolower_utf16(uni_plane, &wc); if (res != wc_mb(cs, wc, (uchar *) dst, (uchar *) dstend)) break; src+= res; dst+= res; } return srclen; }
O3
c
my_casedn_utf16: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, -0x38(%rbp) movq %rdx, -0x30(%rbp) testq %rdx, %rdx jle 0x4651f movq %rcx, %r15 movq %rsi, %r12 movq %rdi, %r13 movq 0x78(%rdi), %rax movq %rax, -0x50(%rbp) movq 0xb8(%rdi), %rax movq 0x28(%rax), %rcx movq %rcx, -0x58(%rbp) movq 0x30(%rax), %rax movq %rax, -0x48(%rbp) movq -0x30(%rbp), %rax leaq (%rsi,%rax), %r14 addq %r15, -0x38(%rbp) movq %r13, %rdi leaq -0x40(%rbp), %rsi movq %r12, %rdx movq %r14, %rcx callq *-0x58(%rbp) testl %eax, %eax jle 0x4651f movl %eax, %ebx movq -0x40(%rbp), %rsi movq -0x50(%rbp), %rax cmpq (%rax), %rsi ja 0x46501 movq 0x8(%rax), %rax movq %rsi, %rcx shrq $0x8, %rcx movq (%rax,%rcx,8), %rax testq %rax, %rax je 0x46501 movzbl %sil, %ecx leaq (%rcx,%rcx,2), %rcx movl 0x4(%rax,%rcx,4), %esi movq %rsi, -0x40(%rbp) movq %r13, %rdi movq %r15, %rdx movq -0x38(%rbp), %rcx callq *-0x48(%rbp) cmpl %eax, %ebx jne 0x4651f movl %ebx, %eax addq %rax, %r12 addq %rax, %r15 cmpq %r14, %r12 jb 0x464ba movq -0x30(%rbp), %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_casedn_utf16: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov [rbp+var_38], r8 mov [rbp+var_30], rdx test rdx, rdx jle loc_4651F mov r15, rcx mov r12, rsi mov r13, rdi mov rax, [rdi+78h] mov [rbp+var_50], rax mov rax, [rdi+0B8h] mov rcx, [rax+28h] mov [rbp+var_58], rcx mov rax, [rax+30h] mov [rbp+var_48], rax mov rax, [rbp+var_30] lea r14, [rsi+rax] add [rbp+var_38], r15 loc_464BA: mov rdi, r13 lea rsi, [rbp+var_40] mov rdx, r12 mov rcx, r14 call [rbp+var_58] test eax, eax jle short loc_4651F mov ebx, eax mov rsi, [rbp+var_40] mov rax, [rbp+var_50] cmp rsi, [rax] ja short loc_46501 mov rax, [rax+8] mov rcx, rsi shr rcx, 8 mov rax, [rax+rcx*8] test rax, rax jz short loc_46501 movzx ecx, sil lea rcx, [rcx+rcx*2] mov esi, [rax+rcx*4+4] mov [rbp+var_40], rsi loc_46501: mov rdi, r13 mov rdx, r15 mov rcx, [rbp+var_38] call [rbp+var_48] cmp ebx, eax jnz short loc_4651F mov eax, ebx add r12, rax add r15, rax cmp r12, r14 jb short loc_464BA loc_4651F: mov rax, [rbp+var_30] add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_casedn_utf16(long long a1, unsigned long long a2, long long a3, long long a4, long long a5) { long long v5; // r15 unsigned long long v6; // r12 long long v7; // rax unsigned long long v8; // r14 int v9; // eax unsigned int v10; // ebx unsigned long long v11; // rsi long long v12; // rax long long ( *v14)(long long, unsigned long long *, unsigned long long, unsigned long long); // [rsp+8h] [rbp-58h] unsigned long long *v15; // [rsp+10h] [rbp-50h] unsigned int ( *v16)(long long, unsigned long long, long long, long long); // [rsp+18h] [rbp-48h] unsigned long long v17; // [rsp+20h] [rbp-40h] BYREF long long v18; // [rsp+28h] [rbp-38h] long long v19; // [rsp+30h] [rbp-30h] v18 = a5; v19 = a3; if ( a3 > 0 ) { v5 = a4; v6 = a2; v15 = *(unsigned long long **)(a1 + 120); v7 = *(_QWORD *)(a1 + 184); v14 = *(long long ( **)(long long, unsigned long long *, unsigned long long, unsigned long long))(v7 + 40); v16 = *(unsigned int ( **)(long long, unsigned long long, long long, long long))(v7 + 48); v8 = a2 + v19; v18 += a4; do { v9 = v14(a1, &v17, v6, v8); if ( v9 <= 0 ) break; v10 = v9; v11 = v17; if ( v17 <= *v15 ) { v12 = *(_QWORD *)(v15[1] + 8 * (v17 >> 8)); if ( v12 ) { v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v17 + 4); v17 = v11; } } if ( v10 != v16(a1, v11, v5, v18) ) break; v6 += v10; v5 += v10; } while ( v6 < v8 ); } return v19; }
my_casedn_utf16: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV qword ptr [RBP + -0x38],R8 MOV qword ptr [RBP + -0x30],RDX TEST RDX,RDX JLE 0x0014651f MOV R15,RCX MOV R12,RSI MOV R13,RDI MOV RAX,qword ptr [RDI + 0x78] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RDI + 0xb8] MOV RCX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x58],RCX MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x30] LEA R14,[RSI + RAX*0x1] ADD qword ptr [RBP + -0x38],R15 LAB_001464ba: MOV RDI,R13 LEA RSI,[RBP + -0x40] MOV RDX,R12 MOV RCX,R14 CALL qword ptr [RBP + -0x58] TEST EAX,EAX JLE 0x0014651f MOV EBX,EAX MOV RSI,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x50] CMP RSI,qword ptr [RAX] JA 0x00146501 MOV RAX,qword ptr [RAX + 0x8] MOV RCX,RSI SHR RCX,0x8 MOV RAX,qword ptr [RAX + RCX*0x8] TEST RAX,RAX JZ 0x00146501 MOVZX ECX,SIL LEA RCX,[RCX + RCX*0x2] MOV ESI,dword ptr [RAX + RCX*0x4 + 0x4] MOV qword ptr [RBP + -0x40],RSI LAB_00146501: MOV RDI,R13 MOV RDX,R15 MOV RCX,qword ptr [RBP + -0x38] CALL qword ptr [RBP + -0x48] CMP EBX,EAX JNZ 0x0014651f MOV EAX,EBX ADD R12,RAX ADD R15,RAX CMP R12,R14 JC 0x001464ba LAB_0014651f: MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_casedn_utf16(long param_1,ulong param_2,long param_3,long param_4,long param_5) { ulong uVar1; ulong *puVar2; code *pcVar3; code *pcVar4; long lVar5; uint uVar6; uint uVar7; ulong local_48; long local_40; long local_38; local_38 = param_3; if (0 < param_3) { puVar2 = *(ulong **)(param_1 + 0x78); pcVar3 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); pcVar4 = *(code **)(*(long *)(param_1 + 0xb8) + 0x30); uVar1 = param_2 + param_3; local_40 = param_5 + param_4; do { uVar6 = (*pcVar3)(param_1,&local_48,param_2,uVar1); if ((int)uVar6 < 1) { return local_38; } if ((local_48 <= *puVar2) && (lVar5 = *(long *)(puVar2[1] + (local_48 >> 8) * 8), lVar5 != 0)) { local_48 = (ulong)*(uint *)(lVar5 + 4 + (local_48 & 0xff) * 0xc); } uVar7 = (*pcVar4)(param_1,local_48,param_4,local_40); if (uVar6 != uVar7) { return local_38; } param_2 = param_2 + uVar6; param_4 = param_4 + (ulong)uVar6; } while (param_2 < uVar1); } return local_38; }
36,717
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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>>&&, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O1
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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>>&&, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rdi), %r13 movq %r13, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi callq 0x1b3f0 movq %rax, %r12 movq (%r14), %rdi callq 0x1b3f0 addq %rax, %r12 movq %rbx, %rdi movq %r12, %rsi callq 0x1bdb0 movq %rbx, %rdi movq %r15, %rsi callq 0x1c110 movq (%r14), %rsi movq %rbx, %rdi callq 0x1c110 movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r13, %rdi je 0xb37c3 movq (%r13), %rsi incq %rsi callq 0x1b8d0 movq %r14, %rdi callq 0x1bfc0
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA56_KcPS9_EEET_DpOT0_: push r15 push r14 push r13 push r12 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi lea r13, [rdi+10h] mov [rdi], r13 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi call _strlen mov r12, rax mov rdi, [r14] call _strlen add r12, rax mov rdi, rbx mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rax, rbx pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, r13 jz short loc_B37C3 mov rsi, [r13+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B37C3: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>( long long a1, long long a2, _QWORD *a3) { long long v4; // r12 long long v5; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v4 = strlen(a2); v5 = strlen(*a3); std::string::reserve(a1, v5 + v4); std::string::append(a1, a2); std::string::append(a1, *a3); return a1; }
concat<std::__cxx11::string,char_const(&)[56],char_const*>: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R13,[RDI + 0x10] MOV qword ptr [RDI],R13 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RDI,RSI CALL 0x0011b3f0 MOV R12,RAX MOV RDI,qword ptr [R14] CALL 0x0011b3f0 ADD R12,RAX LAB_001b377e: MOV RDI,RBX MOV RSI,R12 CALL 0x0011bdb0 MOV RDI,RBX MOV RSI,R15 CALL 0x0011c110 MOV RSI,qword ptr [R14] MOV RDI,RBX CALL 0x0011c110 LAB_001b379f: MOV RAX,RBX POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [56], char const*>(char const (&) [56], char const*&&) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[56],char_const*> (detail *this,char *param_1,char **param_2) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; strlen(param_1); strlen(*param_2); /* try { // try from 001b377e to 001b379e has its CatchHandler @ 001b37ac */ std::__cxx11::string::reserve((ulong)this); std::__cxx11::string::append((char *)this); std::__cxx11::string::append((char *)this); return this; }
36,718
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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>>&&, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O2
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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>>&&, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) andq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi movq %rdx, %rsi callq 0x43767 movq %rbx, %rdi movq %rax, %rsi callq 0x23dc0 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x9210e movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq %rbx, %rdi callq 0x241f8 movq %r14, %rdi callq 0x23fc0
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA28_KcPS9_EEET_DpOT0_: push r15 push r14 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax and qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi mov rsi, rdx call _ZN8nlohmann16json_abi_v3_11_36detail13concat_lengthIJPKcEEEmS4_DpRKT_; nlohmann::json_abi_v3_11_3::detail::concat_length<char const*>(char const*,char const* const&) mov rdi, rbx mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r15 mov rdx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA28_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_ mov rax, rbx pop rbx pop r14 pop r15 retn mov r14, rax mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[28],char const*>( long long a1, long long a2, _QWORD *a3) { long long v4; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v4 = nlohmann::json_abi_v3_11_3::detail::concat_length<char const*>(a2, a3); std::string::reserve(a1, v4); ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA28_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_( a1, a2, a3); return a1; }
concat<std::__cxx11::string,char_const(&)[28],char_const*>: PUSH R15 PUSH R14 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX AND qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RDI,RSI MOV RSI,RDX CALL 0x00143767 LAB_001920c1: MOV RDI,RBX MOV RSI,RAX CALL 0x00123dc0 MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x0019210e LAB_001920da: MOV RAX,RBX POP RBX POP R14 POP R15 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [28], char const*>(char const (&) [28], char const*&&) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[28],char_const*> (detail *this,char *param_1,char **param_2) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; concat_length<char_const*>(param_1,param_2); /* try { // try from 001920c1 to 001920d9 has its CatchHandler @ 001920e3 */ std::__cxx11::string::reserve((ulong)this); _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA28_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_ (this,param_1,param_2); return this; }
36,719
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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>>&&, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O3
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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>>&&, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rdi), %r13 movq %r13, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi callq 0x1a3f0 movq %rax, %r12 movq (%r14), %rdi callq 0x1a3f0 addq %rax, %r12 movq %rbx, %rdi movq %r12, %rsi callq 0x1adb0 movq %rbx, %rdi movq %r15, %rsi callq 0x1b110 movq (%r14), %rsi movq %rbx, %rdi callq 0x1b110 movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r13, %rdi je 0xa1487 movq (%r13), %rsi incq %rsi callq 0x1a8d0 movq %r14, %rdi callq 0x1afc0 nop
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_: push r15 push r14 push r13 push r12 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi lea r13, [rdi+10h] mov [rdi], r13 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi call _strlen mov r12, rax mov rdi, [r14] call _strlen add r12, rax mov rdi, rbx mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rax, rbx pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, r13 jz short loc_A1487 mov rsi, [r13+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A1487: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>( long long a1, long long a2, _QWORD *a3) { long long v4; // r12 long long v5; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v4 = strlen(a2); v5 = strlen(*a3); std::string::reserve(a1, v5 + v4); std::string::append(a1, a2); std::string::append(a1, *a3); return a1; }
concat<std::__cxx11::string,char_const(&)[52],char_const*>: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R13,[RDI + 0x10] MOV qword ptr [RDI],R13 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RDI,RSI CALL 0x0011a3f0 MOV R12,RAX MOV RDI,qword ptr [R14] CALL 0x0011a3f0 ADD R12,RAX LAB_001a1442: MOV RDI,RBX MOV RSI,R12 CALL 0x0011adb0 MOV RDI,RBX MOV RSI,R15 CALL 0x0011b110 MOV RSI,qword ptr [R14] MOV RDI,RBX CALL 0x0011b110 LAB_001a1463: MOV RAX,RBX POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [52], char const*>(char const (&) [52], char const*&&) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[52],char_const*> (detail *this,char *param_1,char **param_2) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; strlen(param_1); strlen(*param_2); /* try { // try from 001a1442 to 001a1462 has its CatchHandler @ 001a1470 */ std::__cxx11::string::reserve((ulong)this); std::__cxx11::string::append((char *)this); std::__cxx11::string::append((char *)this); return this; }
36,720
JS_AddIntrinsicBasicObjects
bluesky950520[P]quickjs/quickjs.c
static void JS_AddIntrinsicBasicObjects(JSContext *ctx) { JSValue proto; int i; ctx->class_proto[JS_CLASS_OBJECT] = JS_NewObjectProto(ctx, JS_NULL); ctx->function_proto = JS_NewCFunction3(ctx, js_function_proto, "", 0, JS_CFUNC_generic, 0, ctx->class_proto[JS_CLASS_OBJECT]); ctx->class_proto[JS_CLASS_BYTECODE_FUNCTION] = js_dup(ctx->function_proto); ctx->class_proto[JS_CLASS_ERROR] = JS_NewObject(ctx); JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_ERROR], js_error_proto_funcs, countof(js_error_proto_funcs)); for(i = 0; i < JS_NATIVE_ERROR_COUNT; i++) { proto = JS_NewObjectProto(ctx, ctx->class_proto[JS_CLASS_ERROR]); JS_DefinePropertyValue(ctx, proto, JS_ATOM_name, JS_NewAtomString(ctx, native_error_name[i]), JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE); JS_DefinePropertyValue(ctx, proto, JS_ATOM_message, JS_AtomToString(ctx, JS_ATOM_empty_string), JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE); ctx->native_error_proto[i] = proto; } /* the array prototype is an array */ ctx->class_proto[JS_CLASS_ARRAY] = JS_NewObjectProtoClass(ctx, ctx->class_proto[JS_CLASS_OBJECT], JS_CLASS_ARRAY); ctx->array_shape = js_new_shape2(ctx, get_proto_obj(ctx->class_proto[JS_CLASS_ARRAY]), JS_PROP_INITIAL_HASH_SIZE, 1); add_shape_property(ctx, &ctx->array_shape, NULL, JS_ATOM_length, JS_PROP_WRITABLE | JS_PROP_LENGTH); /* XXX: could test it on first context creation to ensure that no new atoms are created in JS_AddIntrinsicBasicObjects(). It is necessary to avoid useless renumbering of atoms after JS_EvalBinary() if it is done just after JS_AddIntrinsicBasicObjects(). */ // assert(ctx->rt->atom_count == JS_ATOM_END); }
O0
c
JS_AddIntrinsicBasicObjects: subq $0x108, %rsp # imm = 0x108 movq %rdi, 0x100(%rsp) movq 0x100(%rsp), %rax movq 0x40(%rax), %rax movq %rax, 0x38(%rsp) movq 0x100(%rsp), %rdi movl $0x0, 0xc8(%rsp) movq $0x2, 0xd0(%rsp) movq 0xc8(%rsp), %rsi movq 0xd0(%rsp), %rdx callq 0x29210 movq %rax, %rcx movq 0x38(%rsp), %rax movq %rcx, 0xd8(%rsp) movq %rdx, 0xe0(%rsp) movq 0xd8(%rsp), %rcx movq %rcx, 0x10(%rax) movq 0xe0(%rsp), %rcx movq %rcx, 0x18(%rax) movq 0x100(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x100(%rsp), %rdi movq 0x100(%rsp), %rax movq 0x40(%rax), %rax addq $0x10, %rax leaq 0x99bd0(%rip), %rsi # 0xbcaf0 leaq 0xe939a(%rip), %rdx # 0x10c2c1 xorl %r9d, %r9d movl %r9d, %ecx movl %r9d, %r8d movq (%rax), %r10 movq %r10, (%rsp) movq 0x8(%rax), %rax movq %rax, 0x8(%rsp) callq 0x29360 movq %rax, %rcx movq 0x40(%rsp), %rax movq %rcx, 0xb8(%rsp) movq %rdx, 0xc0(%rsp) movq 0xb8(%rsp), %rcx movq %rcx, 0x48(%rax) movq 0xc0(%rsp), %rcx movq %rcx, 0x50(%rax) movq 0x100(%rsp), %rax movq 0x40(%rax), %rax movq %rax, 0x48(%rsp) movq 0x100(%rsp), %rax movq 0x48(%rax), %rdi movq 0x50(%rax), %rsi callq 0x20410 movq %rax, %rcx movq 0x48(%rsp), %rax movq %rcx, 0xa8(%rsp) movq %rdx, 0xb0(%rsp) movq 0xa8(%rsp), %rcx movq %rcx, 0xd0(%rax) movq 0xb0(%rsp), %rcx movq %rcx, 0xd8(%rax) movq 0x100(%rsp), %rax movq 0x40(%rax), %rax movq %rax, 0x50(%rsp) movq 0x100(%rsp), %rdi callq 0x292b0 movq %rax, %rcx movq 0x50(%rsp), %rax movq %rcx, 0x98(%rsp) movq %rdx, 0xa0(%rsp) movq 0x98(%rsp), %rcx movq %rcx, 0x30(%rax) movq 0xa0(%rsp), %rcx movq %rcx, 0x38(%rax) movq 0x100(%rsp), %rdi movq 0x100(%rsp), %rax movq 0x40(%rax), %rax movq 0x30(%rax), %rsi movq 0x38(%rax), %rdx leaq 0x10deee(%rip), %rcx # 0x130f30 movl $0x3, %r8d callq 0x4b840 movl $0x0, 0xec(%rsp) cmpl $0x8, 0xec(%rsp) jge 0x231c7 movq 0x100(%rsp), %rdi movq 0x100(%rsp), %rax movq 0x40(%rax), %rax movq 0x30(%rax), %rsi movq 0x38(%rax), %rdx callq 0x29210 movq %rax, 0x88(%rsp) movq %rdx, 0x90(%rsp) movq 0x88(%rsp), %rax movq %rax, 0xf0(%rsp) movq 0x90(%rsp), %rax movq %rax, 0xf8(%rsp) movq 0x100(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x100(%rsp), %rdi movslq 0xec(%rsp), %rcx leaq 0x10c1d5(%rip), %rax # 0x12f2b0 movq (%rax,%rcx,8), %rsi callq 0x28520 movq 0x28(%rsp), %rdi movq %rax, 0x78(%rsp) movq %rdx, 0x80(%rsp) movq 0xf0(%rsp), %rsi movq 0xf8(%rsp), %rdx movq 0x78(%rsp), %r8 movq 0x80(%rsp), %r9 movl $0x37, %ecx movl $0x3, (%rsp) callq 0x35ef0 movq 0x100(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x100(%rsp), %rdi movl $0x2f, %esi callq 0x27d40 movq 0x30(%rsp), %rdi movq %rax, 0x68(%rsp) movq %rdx, 0x70(%rsp) movq 0xf0(%rsp), %rsi movq 0xf8(%rsp), %rdx movq 0x68(%rsp), %r8 movq 0x70(%rsp), %r9 movl $0x33, %ecx movl $0x3, (%rsp) callq 0x35ef0 movq 0x100(%rsp), %rax addq $0x98, %rax movslq 0xec(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq 0xf0(%rsp), %rcx movq %rcx, (%rax) movq 0xf8(%rsp), %rcx movq %rcx, 0x8(%rax) movl 0xec(%rsp), %eax addl $0x1, %eax movl %eax, 0xec(%rsp) jmp 0x23058 movq 0x100(%rsp), %rax movq 0x40(%rax), %rax movq %rax, 0x18(%rsp) movq 0x100(%rsp), %rdi movq 0x100(%rsp), %rax movq 0x40(%rax), %rax movq 0x10(%rax), %rsi movq 0x18(%rax), %rdx movl $0x2, %ecx callq 0x28be0 movq %rax, %rcx movq 0x18(%rsp), %rax movq %rcx, 0x58(%rsp) movq %rdx, 0x60(%rsp) movq 0x58(%rsp), %rcx movq %rcx, 0x20(%rax) movq 0x60(%rsp), %rcx movq %rcx, 0x28(%rax) movq 0x100(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x100(%rsp), %rax movq 0x40(%rax), %rax movq 0x20(%rax), %rdi movq 0x28(%rax), %rsi callq 0x28cb0 movq 0x20(%rsp), %rdi movq %rax, %rsi movl $0x4, %edx movl $0x1, %ecx callq 0x5c660 movq %rax, %rcx movq 0x100(%rsp), %rax movq %rcx, 0x38(%rax) movq 0x100(%rsp), %rdi movq 0x100(%rsp), %rsi addq $0x38, %rsi xorl %eax, %eax movl %eax, %edx movl $0x32, %ecx movl $0xa, %r8d callq 0x5cfc0 addq $0x108, %rsp # imm = 0x108 retq nop
JS_AddIntrinsicBasicObjects: sub rsp, 108h mov [rsp+108h+var_8], rdi mov rax, [rsp+108h+var_8] mov rax, [rax+40h] mov [rsp+108h+var_D0], rax mov rdi, [rsp+108h+var_8] mov dword ptr [rsp+108h+var_40], 0 mov [rsp+108h+var_38], 2 mov rsi, [rsp+108h+var_40] mov rdx, [rsp+108h+var_38] call JS_NewObjectProto mov rcx, rax mov rax, [rsp+108h+var_D0] mov [rsp+108h+var_30], rcx mov [rsp+108h+var_28], rdx mov rcx, [rsp+108h+var_30] mov [rax+10h], rcx mov rcx, [rsp+108h+var_28] mov [rax+18h], rcx mov rax, [rsp+108h+var_8] mov [rsp+108h+var_C8], rax mov rdi, [rsp+108h+var_8] mov rax, [rsp+108h+var_8] mov rax, [rax+40h] add rax, 10h lea rsi, js_function_proto lea rdx, aQuickjsNgMemor+4Dh; "" xor r9d, r9d mov ecx, r9d mov r8d, r9d mov r10, [rax] mov [rsp+108h+var_108], r10 mov rax, [rax+8] mov [rsp+108h+var_100], rax call JS_NewCFunction3 mov rcx, rax mov rax, [rsp+108h+var_C8] mov [rsp+108h+var_50], rcx mov [rsp+108h+var_48], rdx mov rcx, [rsp+108h+var_50] mov [rax+48h], rcx mov rcx, [rsp+108h+var_48] mov [rax+50h], rcx mov rax, [rsp+108h+var_8] mov rax, [rax+40h] mov [rsp+108h+var_C0], rax mov rax, [rsp+108h+var_8] mov rdi, [rax+48h] mov rsi, [rax+50h] call js_dup mov rcx, rax mov rax, [rsp+108h+var_C0] mov [rsp+108h+var_60], rcx mov [rsp+108h+var_58], rdx mov rcx, [rsp+108h+var_60] mov [rax+0D0h], rcx mov rcx, [rsp+108h+var_58] mov [rax+0D8h], rcx mov rax, [rsp+108h+var_8] mov rax, [rax+40h] mov [rsp+108h+var_B8], rax mov rdi, [rsp+108h+var_8] call JS_NewObject mov rcx, rax mov rax, [rsp+108h+var_B8] mov [rsp+108h+var_70], rcx mov [rsp+108h+var_68], rdx mov rcx, [rsp+108h+var_70] mov [rax+30h], rcx mov rcx, [rsp+108h+var_68] mov [rax+38h], rcx mov rdi, [rsp+108h+var_8] mov rax, [rsp+108h+var_8] mov rax, [rax+40h] mov rsi, [rax+30h] mov rdx, [rax+38h] lea rcx, js_error_proto_funcs mov r8d, 3 call JS_SetPropertyFunctionList mov [rsp+108h+var_1C], 0 loc_23058: cmp [rsp+108h+var_1C], 8 jge loc_231C7 mov rdi, [rsp+108h+var_8] mov rax, [rsp+108h+var_8] mov rax, [rax+40h] mov rsi, [rax+30h] mov rdx, [rax+38h] call JS_NewObjectProto mov [rsp+108h+var_80], rax mov [rsp+108h+var_78], rdx mov rax, [rsp+108h+var_80] mov [rsp+108h+var_18], rax mov rax, [rsp+108h+var_78] mov [rsp+108h+var_10], rax mov rax, [rsp+108h+var_8] mov [rsp+108h+var_E0], rax mov rdi, [rsp+108h+var_8] movsxd rcx, [rsp+108h+var_1C] lea rax, native_error_name mov rsi, [rax+rcx*8] call JS_NewAtomString mov rdi, [rsp+108h+var_E0] mov [rsp+108h+var_90], rax mov [rsp+108h+var_88], rdx mov rsi, [rsp+108h+var_18] mov rdx, [rsp+108h+var_10] mov r8, [rsp+108h+var_90] mov r9, [rsp+108h+var_88] mov ecx, 37h ; '7' mov dword ptr [rsp+108h+var_108], 3 call JS_DefinePropertyValue mov rax, [rsp+108h+var_8] mov [rsp+108h+var_D8], rax mov rdi, [rsp+108h+var_8] mov esi, 2Fh ; '/' call JS_AtomToString mov rdi, [rsp+108h+var_D8] mov [rsp+108h+var_A0], rax mov [rsp+108h+var_98], rdx mov rsi, [rsp+108h+var_18] mov rdx, [rsp+108h+var_10] mov r8, [rsp+108h+var_A0] mov r9, [rsp+108h+var_98] mov ecx, 33h ; '3' mov dword ptr [rsp+108h+var_108], 3 call JS_DefinePropertyValue mov rax, [rsp+108h+var_8] add rax, 98h movsxd rcx, [rsp+108h+var_1C] shl rcx, 4 add rax, rcx mov rcx, [rsp+108h+var_18] mov [rax], rcx mov rcx, [rsp+108h+var_10] mov [rax+8], rcx mov eax, [rsp+108h+var_1C] add eax, 1 mov [rsp+108h+var_1C], eax jmp loc_23058 loc_231C7: mov rax, [rsp+108h+var_8] mov rax, [rax+40h] mov [rsp+108h+var_F0], rax mov rdi, [rsp+108h+var_8] mov rax, [rsp+108h+var_8] mov rax, [rax+40h] mov rsi, [rax+10h] mov rdx, [rax+18h] mov ecx, 2 call JS_NewObjectProtoClass mov rcx, rax mov rax, [rsp+108h+var_F0] mov [rsp+108h+var_B0], rcx mov [rsp+108h+var_A8], rdx mov rcx, [rsp+108h+var_B0] mov [rax+20h], rcx mov rcx, [rsp+108h+var_A8] mov [rax+28h], rcx mov rax, [rsp+108h+var_8] mov [rsp+108h+var_E8], rax mov rax, [rsp+108h+var_8] mov rax, [rax+40h] mov rdi, [rax+20h] mov rsi, [rax+28h] call get_proto_obj mov rdi, [rsp+108h+var_E8] mov rsi, rax mov edx, 4 mov ecx, 1 call js_new_shape2 mov rcx, rax mov rax, [rsp+108h+var_8] mov [rax+38h], rcx mov rdi, [rsp+108h+var_8] mov rsi, [rsp+108h+var_8] add rsi, 38h ; '8' xor eax, eax mov edx, eax mov ecx, 32h ; '2' mov r8d, 0Ah call add_shape_property add rsp, 108h retn
long long JS_AddIntrinsicBasicObjects(_QWORD *a1) { long long v1; // rdx long long v2; // rdx long long v3; // rdx long long v4; // rdx long long v5; // rdx int v6; // edx int v7; // edx long long *v8; // rax long long v9; // rdx long long proto_obj; // rax _QWORD *v12; // [rsp+18h] [rbp-F0h] long long v13; // [rsp+38h] [rbp-D0h] long long v14; // [rsp+48h] [rbp-C0h] long long v15; // [rsp+50h] [rbp-B8h] int v16; // [rsp+68h] [rbp-A0h] int v17; // [rsp+78h] [rbp-90h] long long v18; // [rsp+88h] [rbp-80h] int i; // [rsp+ECh] [rbp-1Ch] long long v20; // [rsp+F8h] [rbp-10h] v13 = a1[8]; *(_QWORD *)(v13 + 16) = JS_NewObjectProto(a1, 0, 2LL); *(_QWORD *)(v13 + 24) = v1; a1[9] = JS_NewCFunction3( (_DWORD)a1, (unsigned int)js_function_proto, (unsigned int)"", 0, 0, 0, *(_QWORD *)(a1[8] + 16LL), *(_QWORD *)(a1[8] + 24LL)); a1[10] = v2; v14 = a1[8]; *(_QWORD *)(v14 + 208) = js_dup((_DWORD *)a1[9], a1[10]); *(_QWORD *)(v14 + 216) = v3; v15 = a1[8]; *(_QWORD *)(v15 + 48) = JS_NewObject(a1); *(_QWORD *)(v15 + 56) = v4; JS_SetPropertyFunctionList(a1, *(_QWORD *)(a1[8] + 48LL), *(_QWORD *)(a1[8] + 56LL), &js_error_proto_funcs, 3LL); for ( i = 0; i < 8; ++i ) { v18 = JS_NewObjectProto(a1, *(_QWORD *)(a1[8] + 48LL), *(_QWORD *)(a1[8] + 56LL)); v20 = v5; v17 = JS_NewAtomString(a1, native_error_name[i]); JS_DefinePropertyValue((_DWORD)a1, v18, v20, 55, v17, v6, 3); v16 = JS_AtomToString(a1, 47LL); JS_DefinePropertyValue((_DWORD)a1, v18, v20, 51, v16, v7, 3); v8 = &a1[2 * i + 19]; *v8 = v18; v8[1] = v20; } v12 = (_QWORD *)a1[8]; v12[4] = JS_NewObjectProtoClass(a1, v12[2], v12[3], 2LL); v12[5] = v9; proto_obj = get_proto_obj(*(_QWORD *)(a1[8] + 32LL), *(_QWORD *)(a1[8] + 40LL)); a1[7] = js_new_shape2(a1, proto_obj, 4LL, 1LL); return add_shape_property(a1, a1 + 7, 0LL, 50LL, 10LL); }
JS_AddIntrinsicBasicObjects: SUB RSP,0x108 MOV qword ptr [RSP + 0x100],RDI MOV RAX,qword ptr [RSP + 0x100] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RSP + 0x38],RAX MOV RDI,qword ptr [RSP + 0x100] MOV dword ptr [RSP + 0xc8],0x0 MOV qword ptr [RSP + 0xd0],0x2 MOV RSI,qword ptr [RSP + 0xc8] MOV RDX,qword ptr [RSP + 0xd0] CALL 0x00129210 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0xd8],RCX MOV qword ptr [RSP + 0xe0],RDX MOV RCX,qword ptr [RSP + 0xd8] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RSP + 0xe0] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RSP + 0x100] MOV qword ptr [RSP + 0x40],RAX MOV RDI,qword ptr [RSP + 0x100] MOV RAX,qword ptr [RSP + 0x100] MOV RAX,qword ptr [RAX + 0x40] ADD RAX,0x10 LEA RSI,[0x1bcaf0] LEA RDX,[0x20c2c1] XOR R9D,R9D MOV ECX,R9D MOV R8D,R9D MOV R10,qword ptr [RAX] MOV qword ptr [RSP],R10 MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RAX CALL 0x00129360 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0xb8],RCX MOV qword ptr [RSP + 0xc0],RDX MOV RCX,qword ptr [RSP + 0xb8] MOV qword ptr [RAX + 0x48],RCX MOV RCX,qword ptr [RSP + 0xc0] MOV qword ptr [RAX + 0x50],RCX MOV RAX,qword ptr [RSP + 0x100] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x100] MOV RDI,qword ptr [RAX + 0x48] MOV RSI,qword ptr [RAX + 0x50] CALL 0x00120410 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0xa8],RCX MOV qword ptr [RSP + 0xb0],RDX MOV RCX,qword ptr [RSP + 0xa8] MOV qword ptr [RAX + 0xd0],RCX MOV RCX,qword ptr [RSP + 0xb0] MOV qword ptr [RAX + 0xd8],RCX MOV RAX,qword ptr [RSP + 0x100] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RSP + 0x50],RAX MOV RDI,qword ptr [RSP + 0x100] CALL 0x001292b0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x98],RCX MOV qword ptr [RSP + 0xa0],RDX MOV RCX,qword ptr [RSP + 0x98] MOV qword ptr [RAX + 0x30],RCX MOV RCX,qword ptr [RSP + 0xa0] MOV qword ptr [RAX + 0x38],RCX MOV RDI,qword ptr [RSP + 0x100] MOV RAX,qword ptr [RSP + 0x100] MOV RAX,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RAX + 0x30] MOV RDX,qword ptr [RAX + 0x38] LEA RCX,[0x230f30] MOV R8D,0x3 CALL 0x0014b840 MOV dword ptr [RSP + 0xec],0x0 LAB_00123058: CMP dword ptr [RSP + 0xec],0x8 JGE 0x001231c7 MOV RDI,qword ptr [RSP + 0x100] MOV RAX,qword ptr [RSP + 0x100] MOV RAX,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RAX + 0x30] MOV RDX,qword ptr [RAX + 0x38] CALL 0x00129210 MOV qword ptr [RSP + 0x88],RAX MOV qword ptr [RSP + 0x90],RDX MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0xf0],RAX MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0xf8],RAX MOV RAX,qword ptr [RSP + 0x100] MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x100] MOVSXD RCX,dword ptr [RSP + 0xec] LEA RAX,[0x22f2b0] MOV RSI,qword ptr [RAX + RCX*0x8] CALL 0x00128520 MOV RDI,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x78],RAX MOV qword ptr [RSP + 0x80],RDX MOV RSI,qword ptr [RSP + 0xf0] MOV RDX,qword ptr [RSP + 0xf8] MOV R8,qword ptr [RSP + 0x78] MOV R9,qword ptr [RSP + 0x80] MOV ECX,0x37 MOV dword ptr [RSP],0x3 CALL 0x00135ef0 MOV RAX,qword ptr [RSP + 0x100] MOV qword ptr [RSP + 0x30],RAX MOV RDI,qword ptr [RSP + 0x100] MOV ESI,0x2f CALL 0x00127d40 MOV RDI,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x68],RAX MOV qword ptr [RSP + 0x70],RDX MOV RSI,qword ptr [RSP + 0xf0] MOV RDX,qword ptr [RSP + 0xf8] MOV R8,qword ptr [RSP + 0x68] MOV R9,qword ptr [RSP + 0x70] MOV ECX,0x33 MOV dword ptr [RSP],0x3 CALL 0x00135ef0 MOV RAX,qword ptr [RSP + 0x100] ADD RAX,0x98 MOVSXD RCX,dword ptr [RSP + 0xec] SHL RCX,0x4 ADD RAX,RCX MOV RCX,qword ptr [RSP + 0xf0] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0xf8] MOV qword ptr [RAX + 0x8],RCX MOV EAX,dword ptr [RSP + 0xec] ADD EAX,0x1 MOV dword ptr [RSP + 0xec],EAX JMP 0x00123058 LAB_001231c7: MOV RAX,qword ptr [RSP + 0x100] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x100] MOV RAX,qword ptr [RSP + 0x100] MOV RAX,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RAX + 0x18] MOV ECX,0x2 CALL 0x00128be0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x58],RCX MOV qword ptr [RSP + 0x60],RDX MOV RCX,qword ptr [RSP + 0x58] MOV qword ptr [RAX + 0x20],RCX MOV RCX,qword ptr [RSP + 0x60] MOV qword ptr [RAX + 0x28],RCX MOV RAX,qword ptr [RSP + 0x100] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x100] MOV RAX,qword ptr [RAX + 0x40] MOV RDI,qword ptr [RAX + 0x20] MOV RSI,qword ptr [RAX + 0x28] CALL 0x00128cb0 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,RAX MOV EDX,0x4 MOV ECX,0x1 CALL 0x0015c660 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x100] MOV qword ptr [RAX + 0x38],RCX MOV RDI,qword ptr [RSP + 0x100] MOV RSI,qword ptr [RSP + 0x100] ADD RSI,0x38 XOR EAX,EAX MOV EDX,EAX MOV ECX,0x32 MOV R8D,0xa CALL 0x0015cfc0 ADD RSP,0x108 RET
void JS_AddIntrinsicBasicObjects(long param_1) { long lVar1; int8 uVar2; int1 auVar3 [16]; int1 auVar4 [16]; int4 uVar5; uint uStack_3c; int local_1c; lVar1 = *(long *)(param_1 + 0x40); auVar3 = JS_NewObjectProto(param_1,(ulong)uStack_3c << 0x20,2); *(int1 (*) [16])(lVar1 + 0x10) = auVar3; uVar2 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x10); auVar3 = JS_NewCFunction3(param_1,js_function_proto,"",0,0,0,uVar2, *(int8 *)(*(long *)(param_1 + 0x40) + 0x18)); *(int1 (*) [16])(param_1 + 0x48) = auVar3; lVar1 = *(long *)(param_1 + 0x40); auVar3 = js_dup(*(int8 *)(param_1 + 0x48),*(int8 *)(param_1 + 0x50)); *(int1 (*) [16])(lVar1 + 0xd0) = auVar3; lVar1 = *(long *)(param_1 + 0x40); auVar3 = JS_NewObject(param_1); *(int1 (*) [16])(lVar1 + 0x30) = auVar3; JS_SetPropertyFunctionList (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x30), *(int8 *)(*(long *)(param_1 + 0x40) + 0x38),js_error_proto_funcs,3); for (local_1c = 0; uVar5 = (int4)((ulong)uVar2 >> 0x20), local_1c < 8; local_1c = local_1c + 1) { auVar3 = JS_NewObjectProto(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x30), *(int8 *)(*(long *)(param_1 + 0x40) + 0x38)); auVar4 = JS_NewAtomString(param_1,*(int8 *)(native_error_name + (long)local_1c * 8)); uVar2 = CONCAT44(uVar5,3); JS_DefinePropertyValue(param_1,auVar3._0_8_,auVar3._8_8_,0x37,auVar4._0_8_,auVar4._8_8_,uVar2); uVar5 = (int4)((ulong)uVar2 >> 0x20); auVar4 = JS_AtomToString(param_1,0x2f); uVar2 = CONCAT44(uVar5,3); JS_DefinePropertyValue(param_1,auVar3._0_8_,auVar3._8_8_,0x33,auVar4._0_8_,auVar4._8_8_,uVar2); *(int1 (*) [16])(param_1 + 0x98 + (long)local_1c * 0x10) = auVar3; } lVar1 = *(long *)(param_1 + 0x40); auVar3 = JS_NewObjectProtoClass (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x10), *(int8 *)(*(long *)(param_1 + 0x40) + 0x18),2); *(int1 (*) [16])(lVar1 + 0x20) = auVar3; uVar2 = get_proto_obj(*(int8 *)(*(long *)(param_1 + 0x40) + 0x20), *(int8 *)(*(long *)(param_1 + 0x40) + 0x28)); uVar2 = js_new_shape2(param_1,uVar2,4,1); *(int8 *)(param_1 + 0x38) = uVar2; add_shape_property(param_1,param_1 + 0x38,0,0x32,10); return; }
36,721
inline_mysql_file_sync
eloqsql/include/mysql/psi/mysql_file.h
static inline int inline_mysql_file_sync( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File fd, myf flags) { int result= 0; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, fd, PSI_FILE_SYNC); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); result= my_sync(fd, flags); PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); return result; } #endif result= my_sync(fd, flags); return result; }
O0
c
inline_mysql_file_sync: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl $0x0, -0x24(%rbp) leaq 0x26c151(%rip), %rax # 0x2c2238 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x78(%rbp), %rdi movl $0x10, %edx callq *%rax movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%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 0x56175 leaq 0x26c10e(%rip), %rax # 0x2c2238 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x30(%rbp), %rdi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx xorl %esi, %esi callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi callq 0xf74a0 movl %eax, -0x24(%rbp) leaq 0x26c0df(%rip), %rax # 0x2c2238 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x30(%rbp), %rdi xorl %ecx, %ecx movl %ecx, %esi callq *%rax movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x5618a movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi callq 0xf74a0 movl %eax, -0x24(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_file_sync_2: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_24], 0 lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_78] mov edx, 10h call rax mov [rbp+var_30], rax cmp [rbp+var_30], 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_56175 lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_30] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] xor esi, esi call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] call my_sync mov [rbp+var_24], eax lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_30] xor ecx, ecx mov esi, ecx call rax mov eax, [rbp+var_24] mov [rbp+var_4], eax jmp short loc_5618A loc_56175: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] call my_sync mov [rbp+var_24], eax mov eax, [rbp+var_24] mov [rbp+var_4], eax loc_5618A: mov eax, [rbp+var_4] add rsp, 80h pop rbp retn
long long inline_mysql_file_sync_2(long long a1, unsigned int a2, unsigned int a3, long long a4) { _BYTE v5[72]; // [rsp+8h] [rbp-78h] BYREF long long v6; // [rsp+50h] [rbp-30h] unsigned int v7; // [rsp+5Ch] [rbp-24h] long long v8; // [rsp+60h] [rbp-20h] unsigned int v9; // [rsp+68h] [rbp-18h] unsigned int v10; // [rsp+6Ch] [rbp-14h] long long v11; // [rsp+70h] [rbp-10h] v11 = a1; v10 = a2; v9 = a3; v8 = a4; v7 = 0; v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v5, a3, 16LL); if ( v6 ) { ((void ( *)(long long, _QWORD, long long, _QWORD))PSI_server[66])(v6, 0LL, v11, v10); v7 = my_sync(v9, v8); ((void ( *)(long long, _QWORD))PSI_server[67])(v6, 0LL); } else { return (unsigned int)my_sync(v9, v8); } return v7; }
inline_mysql_file_sync: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],0x0 LEA RAX,[0x3c2238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x78] MOV EDX,0x10 CALL RAX MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],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 0x00156175 LEA RAX,[0x3c2238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] XOR ESI,ESI CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001f74a0 MOV dword ptr [RBP + -0x24],EAX LEA RAX,[0x3c2238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x30] XOR ECX,ECX MOV ESI,ECX CALL RAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX JMP 0x0015618a LAB_00156175: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001f74a0 MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX LAB_0015618a: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x80 POP RBP RET
int4 inline_mysql_file_sync(int8 param_1,int4 param_2,int4 param_3,int8 param_4) { int1 local_80 [72]; long local_38; int4 local_2c; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; int4 local_c; local_2c = 0; local_28 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; local_38 = (**(code **)(PSI_server + 0x158))(local_80,param_3,0x10); if (local_38 == 0) { local_c = my_sync(local_20,local_28); } else { (**(code **)(PSI_server + 0x210))(local_38,0,local_18,local_1c); local_2c = my_sync(local_20,local_28); (**(code **)(PSI_server + 0x218))(local_38,0); local_c = local_2c; } return local_c; }
36,722
js_iterator_helper_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_iterator_helper_finalizer(JSRuntime *rt, JSValue val) { JSObject *p = JS_VALUE_GET_OBJ(val); JSIteratorHelperData *it = p->u.iterator_helper_data; if (it) { JS_FreeValueRT(rt, it->obj); JS_FreeValueRT(rt, it->func); JS_FreeValueRT(rt, it->next); JS_FreeValueRT(rt, it->inner); js_free_rt(rt, it); } }
O0
c
js_iterator_helper_finalizer: subq $0x28, %rsp movq %rsi, 0x18(%rsp) movq %rdx, 0x20(%rsp) movq %rdi, 0x10(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax movq 0x30(%rax), %rax movq %rax, (%rsp) cmpq $0x0, (%rsp) je 0x5a8a6 movq 0x10(%rsp), %rdi movq (%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x22a50 movq 0x10(%rsp), %rdi movq (%rsp), %rax movq 0x20(%rax), %rsi movq 0x28(%rax), %rdx callq 0x22a50 movq 0x10(%rsp), %rdi movq (%rsp), %rax movq 0x10(%rax), %rsi movq 0x18(%rax), %rdx callq 0x22a50 movq 0x10(%rsp), %rdi movq (%rsp), %rax movq 0x30(%rax), %rsi movq 0x38(%rax), %rdx callq 0x22a50 movq 0x10(%rsp), %rdi movq (%rsp), %rsi callq 0x206a0 addq $0x28, %rsp retq nopl (%rax,%rax)
js_iterator_helper_finalizer: sub rsp, 28h mov [rsp+28h+var_10], rsi mov [rsp+28h+var_8], rdx mov [rsp+28h+var_18], rdi mov rax, [rsp+28h+var_10] mov [rsp+28h+var_20], rax mov rax, [rsp+28h+var_20] mov rax, [rax+30h] mov [rsp+28h+var_28], rax cmp [rsp+28h+var_28], 0 jz short loc_5A8A6 mov rdi, [rsp+28h+var_18] mov rax, [rsp+28h+var_28] mov rsi, [rax] mov rdx, [rax+8] call JS_FreeValueRT mov rdi, [rsp+28h+var_18] mov rax, [rsp+28h+var_28] mov rsi, [rax+20h] mov rdx, [rax+28h] call JS_FreeValueRT mov rdi, [rsp+28h+var_18] mov rax, [rsp+28h+var_28] mov rsi, [rax+10h] mov rdx, [rax+18h] call JS_FreeValueRT mov rdi, [rsp+28h+var_18] mov rax, [rsp+28h+var_28] mov rsi, [rax+30h] mov rdx, [rax+38h] call JS_FreeValueRT mov rdi, [rsp+28h+var_18] mov rsi, [rsp+28h+var_28] call js_free_rt loc_5A8A6: add rsp, 28h retn
void js_iterator_helper_finalizer(long long a1, long long a2) { long long v2; // [rsp+0h] [rbp-28h] v2 = *(_QWORD *)(a2 + 48); if ( v2 ) { JS_FreeValueRT(a1, *(_DWORD **)v2, *(_QWORD *)(v2 + 8)); JS_FreeValueRT(a1, *(_DWORD **)(v2 + 32), *(_QWORD *)(v2 + 40)); JS_FreeValueRT(a1, *(_DWORD **)(v2 + 16), *(_QWORD *)(v2 + 24)); JS_FreeValueRT(a1, *(_DWORD **)(v2 + 48), *(_QWORD *)(v2 + 56)); js_free_rt(a1, v2); } }
js_iterator_helper_finalizer: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [RSP + 0x10],RDI MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP],RAX CMP qword ptr [RSP],0x0 JZ 0x0015a8a6 MOV RDI,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x00122a50 MOV RDI,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP] MOV RSI,qword ptr [RAX + 0x20] MOV RDX,qword ptr [RAX + 0x28] CALL 0x00122a50 MOV RDI,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RAX + 0x18] CALL 0x00122a50 MOV RDI,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP] MOV RSI,qword ptr [RAX + 0x30] MOV RDX,qword ptr [RAX + 0x38] CALL 0x00122a50 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP] CALL 0x001206a0 LAB_0015a8a6: ADD RSP,0x28 RET
void js_iterator_helper_finalizer(int8 param_1,long param_2) { int8 *puVar1; puVar1 = *(int8 **)(param_2 + 0x30); if (puVar1 != (int8 *)0x0) { JS_FreeValueRT(param_1,*puVar1,puVar1[1]); JS_FreeValueRT(param_1,puVar1[4],puVar1[5]); JS_FreeValueRT(param_1,puVar1[2],puVar1[3]); JS_FreeValueRT(param_1,puVar1[6],puVar1[7]); js_free_rt(param_1,puVar1); } return; }
36,723
js_iterator_helper_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_iterator_helper_finalizer(JSRuntime *rt, JSValue val) { JSObject *p = JS_VALUE_GET_OBJ(val); JSIteratorHelperData *it = p->u.iterator_helper_data; if (it) { JS_FreeValueRT(rt, it->obj); JS_FreeValueRT(rt, it->func); JS_FreeValueRT(rt, it->next); JS_FreeValueRT(rt, it->inner); js_free_rt(rt, it); } }
O3
c
js_iterator_helper_finalizer: pushq %r14 pushq %rbx pushq %rax movq 0x30(%rsi), %rbx testq %rbx, %rbx je 0x3b99f movq %rdi, %r14 movq 0x8(%rbx), %rdx cmpl $-0x9, %edx jb 0x3b90e movq (%rbx), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x3b90e movq %r14, %rdi callq 0x20d90 movq 0x28(%rbx), %rdx cmpl $-0x9, %edx jb 0x3b92f movq 0x20(%rbx), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x3b92f movq %r14, %rdi callq 0x20d90 movq 0x18(%rbx), %rdx cmpl $-0x9, %edx jb 0x3b950 movq 0x10(%rbx), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x3b950 movq %r14, %rdi callq 0x20d90 movq 0x38(%rbx), %rdx cmpl $-0x9, %edx jb 0x3b971 movq 0x30(%rbx), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x3b971 movq %r14, %rdi callq 0x20d90 decq 0x28(%r14) movq %rbx, %rdi callq *0x20(%r14) movq 0x10(%r14), %rcx movq 0x30(%r14), %rdx subq %rax, %rdx addq $-0x8, %rdx movq %rdx, 0x30(%r14) movq 0x40(%r14), %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmpq *%rcx addq $0x8, %rsp popq %rbx popq %r14 retq
js_iterator_helper_finalizer: push r14 push rbx push rax mov rbx, [rsi+30h] test rbx, rbx jz loc_3B99F mov r14, rdi mov rdx, [rbx+8] cmp edx, 0FFFFFFF7h jb short loc_3B90E mov rsi, [rbx] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_3B90E mov rdi, r14 call js_free_value_rt loc_3B90E: mov rdx, [rbx+28h] cmp edx, 0FFFFFFF7h jb short loc_3B92F mov rsi, [rbx+20h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_3B92F mov rdi, r14 call js_free_value_rt loc_3B92F: mov rdx, [rbx+18h] cmp edx, 0FFFFFFF7h jb short loc_3B950 mov rsi, [rbx+10h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_3B950 mov rdi, r14 call js_free_value_rt loc_3B950: mov rdx, [rbx+38h] cmp edx, 0FFFFFFF7h jb short loc_3B971 mov rsi, [rbx+30h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_3B971 mov rdi, r14 call js_free_value_rt loc_3B971: dec qword ptr [r14+28h] mov rdi, rbx call qword ptr [r14+20h] mov rcx, [r14+10h] mov rdx, [r14+30h] sub rdx, rax add rdx, 0FFFFFFFFFFFFFFF8h mov [r14+30h], rdx mov rdi, [r14+40h] mov rsi, rbx add rsp, 8 pop rbx pop r14 jmp rcx loc_3B99F: add rsp, 8 pop rbx pop r14 retn
long long js_iterator_helper_finalizer(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6) { long long v6; // rbx long long v7; // rdx int *v8; // rsi int v9; // eax long long v10; // rcx long long v11; // rdx _QWORD *v12; // rsi int v13; // eax long long v14; // rcx long long v15; // rdx _QWORD *v16; // rsi int v17; // eax long long v18; // rcx long long v19; // rdx _QWORD *v20; // rsi int v21; // eax long long v22; // rcx long long v23; // rax long long ( *v24)(_QWORD, long long); // rcx long long result; // rax v6 = *(_QWORD *)(a2 + 48); if ( v6 ) { v7 = *(_QWORD *)(v6 + 8); if ( (unsigned int)v7 >= 0xFFFFFFF7 ) { v8 = *(int **)v6; v9 = **(_DWORD **)v6; v10 = (unsigned int)(v9 - 1); **(_DWORD **)v6 = v10; if ( v9 <= 1 ) js_free_value_rt(a1, v8, v7, v10, a5, a6); } v11 = *(_QWORD *)(v6 + 40); if ( (unsigned int)v11 >= 0xFFFFFFF7 ) { v12 = *(_QWORD **)(v6 + 32); v13 = *(_DWORD *)v12; v14 = (unsigned int)(*(_DWORD *)v12 - 1); *(_DWORD *)v12 = v14; if ( v13 <= 1 ) js_free_value_rt(a1, v12, v11, v14, a5, a6); } v15 = *(_QWORD *)(v6 + 24); if ( (unsigned int)v15 >= 0xFFFFFFF7 ) { v16 = *(_QWORD **)(v6 + 16); v17 = *(_DWORD *)v16; v18 = (unsigned int)(*(_DWORD *)v16 - 1); *(_DWORD *)v16 = v18; if ( v17 <= 1 ) js_free_value_rt(a1, v16, v15, v18, a5, a6); } v19 = *(_QWORD *)(v6 + 56); if ( (unsigned int)v19 >= 0xFFFFFFF7 ) { v20 = *(_QWORD **)(v6 + 48); v21 = *(_DWORD *)v20; v22 = (unsigned int)(*(_DWORD *)v20 - 1); *(_DWORD *)v20 = v22; if ( v21 <= 1 ) js_free_value_rt(a1, v20, v19, v22, a5, a6); } --*(_QWORD *)(a1 + 40); v23 = (*(long long ( **)(long long))(a1 + 32))(v6); v24 = *(long long ( **)(_QWORD, long long))(a1 + 16); *(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v23 - 8; return v24(*(_QWORD *)(a1 + 64), v6); } return result; }
js_iterator_helper_finalizer: PUSH R14 PUSH RBX PUSH RAX MOV RBX,qword ptr [RSI + 0x30] TEST RBX,RBX JZ 0x0013b99f MOV R14,RDI MOV RDX,qword ptr [RBX + 0x8] CMP EDX,-0x9 JC 0x0013b90e MOV RSI,qword ptr [RBX] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x0013b90e MOV RDI,R14 CALL 0x00120d90 LAB_0013b90e: MOV RDX,qword ptr [RBX + 0x28] CMP EDX,-0x9 JC 0x0013b92f MOV RSI,qword ptr [RBX + 0x20] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x0013b92f MOV RDI,R14 CALL 0x00120d90 LAB_0013b92f: MOV RDX,qword ptr [RBX + 0x18] CMP EDX,-0x9 JC 0x0013b950 MOV RSI,qword ptr [RBX + 0x10] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x0013b950 MOV RDI,R14 CALL 0x00120d90 LAB_0013b950: MOV RDX,qword ptr [RBX + 0x38] CMP EDX,-0x9 JC 0x0013b971 MOV RSI,qword ptr [RBX + 0x30] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x0013b971 MOV RDI,R14 CALL 0x00120d90 LAB_0013b971: DEC qword ptr [R14 + 0x28] MOV RDI,RBX CALL qword ptr [R14 + 0x20] MOV RCX,qword ptr [R14 + 0x10] MOV RDX,qword ptr [R14 + 0x30] SUB RDX,RAX ADD RDX,-0x8 MOV qword ptr [R14 + 0x30],RDX MOV RDI,qword ptr [R14 + 0x40] MOV RSI,RBX ADD RSP,0x8 POP RBX POP R14 JMP RCX LAB_0013b99f: ADD RSP,0x8 POP RBX POP R14 RET
void js_iterator_helper_finalizer(long param_1,long param_2) { int iVar1; int8 *puVar2; long lVar3; puVar2 = *(int8 **)(param_2 + 0x30); if (puVar2 != (int8 *)0x0) { if (0xfffffff6 < (uint)puVar2[1]) { iVar1 = *(int *)*puVar2; *(int *)*puVar2 = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(param_1); } } if (0xfffffff6 < (uint)puVar2[5]) { iVar1 = *(int *)puVar2[4]; *(int *)puVar2[4] = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(param_1); } } if (0xfffffff6 < (uint)puVar2[3]) { iVar1 = *(int *)puVar2[2]; *(int *)puVar2[2] = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(param_1); } } if (0xfffffff6 < (uint)puVar2[7]) { iVar1 = *(int *)puVar2[6]; *(int *)puVar2[6] = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(param_1); } } *(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1; lVar3 = (**(code **)(param_1 + 0x20))(puVar2); lVar3 = (*(long *)(param_1 + 0x30) - lVar3) + -8; *(long *)(param_1 + 0x30) = lVar3; /* WARNING: Could not recover jumptable at 0x0013b99d. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(param_1 + 0x10)) (*(int8 *)(param_1 + 0x40),puVar2,lVar3,*(code **)(param_1 + 0x10)); return; } return; }
36,724
maria_rtree_pick_key
eloqsql/storage/maria/ma_rt_index.c
static const uchar *maria_rtree_pick_key(const MARIA_KEY *key, const MARIA_PAGE *page) { const MARIA_HA *info= page->info; MARIA_SHARE *share= info->s; double increase; double best_incr= DBL_MAX; double area; double UNINIT_VAR(best_area); const uchar *best_key= NULL; const uchar *k= rt_PAGE_FIRST_KEY(share, page->buff, page->node); const uchar *last= rt_PAGE_END(page); for (; k < last; k= rt_PAGE_NEXT_KEY(share, k, key->data_length, page->node)) { /* The following is safe as -1.0 is an exact number */ if ((increase= maria_rtree_area_increase(key->keyinfo->seg, k, key->data, key->data_length + key->ref_length, &area)) == -1.0) return NULL; /* The following should be safe, even if we compare doubles */ if (!best_key || increase < best_incr || ((increase == best_incr) && (area < best_area))) { best_key= k; best_area= area; best_incr= increase; } } return best_key; }
O0
c
maria_rtree_pick_key: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movsd 0x8af12(%rip), %xmm0 # 0x125b80 movsd %xmm0, -0x38(%rbp) movsd -0x48(%rbp), %xmm0 movsd %xmm0, -0x48(%rbp) movq $0x0, -0x50(%rbp) movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq -0x28(%rbp), %rcx movl 0x744(%rcx), %ecx addq %rcx, %rax movq -0x18(%rbp), %rcx movl 0x28(%rcx), %ecx addq %rcx, %rax movq %rax, -0x58(%rbp) movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq -0x18(%rbp), %rcx movl 0x20(%rcx), %ecx addq %rcx, %rax movq %rax, -0x60(%rbp) movq -0x58(%rbp), %rax cmpq -0x60(%rbp), %rax jae 0x9adbc movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq 0xc0(%rax), %rdi movq -0x58(%rbp), %rsi movq -0x10(%rbp), %rax movq (%rax), %rdx movq -0x10(%rbp), %rax movl 0x10(%rax), %ecx movq -0x10(%rbp), %rax addl 0x14(%rax), %ecx leaq -0x40(%rbp), %r8 callq 0xa0830 movsd %xmm0, -0x30(%rbp) movsd 0x8ae7e(%rip), %xmm1 # 0x125b88 ucomisd %xmm1, %xmm0 jne 0x9ad1f jp 0x9ad1f movq $0x0, -0x8(%rbp) jmp 0x9adc4 cmpq $0x0, -0x50(%rbp) je 0x9ad54 movsd -0x30(%rbp), %xmm1 movsd -0x38(%rbp), %xmm0 ucomisd %xmm1, %xmm0 ja 0x9ad54 movsd -0x30(%rbp), %xmm0 ucomisd -0x38(%rbp), %xmm0 jne 0x9ad70 jp 0x9ad70 movsd -0x40(%rbp), %xmm1 movsd -0x48(%rbp), %xmm0 ucomisd %xmm1, %xmm0 jbe 0x9ad70 movq -0x58(%rbp), %rax movq %rax, -0x50(%rbp) movsd -0x40(%rbp), %xmm0 movsd %xmm0, -0x48(%rbp) movsd -0x30(%rbp), %xmm0 movsd %xmm0, -0x38(%rbp) jmp 0x9ad72 movq -0x58(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x10(%rcx), %ecx addq %rcx, %rax movq %rax, -0x68(%rbp) movq -0x18(%rbp), %rax cmpl $0x0, 0x28(%rax) je 0x9ad9a movq -0x18(%rbp), %rax movl 0x28(%rax), %eax movl %eax, -0x6c(%rbp) jmp 0x9ada7 movq -0x28(%rbp), %rax movl 0x3e0(%rax), %eax movl %eax, -0x6c(%rbp) movq -0x68(%rbp), %rax movl -0x6c(%rbp), %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x58(%rbp) jmp 0x9acbe movq -0x50(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x70, %rsp popq %rbp retq nop
maria_rtree_pick_key: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_28], rax movsd xmm0, cs:qword_125B80 movsd [rbp+var_38], xmm0 movsd xmm0, [rbp+var_48] movsd [rbp+var_48], xmm0 mov [rbp+var_50], 0 mov rax, [rbp+var_18] mov rax, [rax+10h] mov rcx, [rbp+var_28] mov ecx, [rcx+744h] add rax, rcx mov rcx, [rbp+var_18] mov ecx, [rcx+28h] add rax, rcx mov [rbp+var_58], rax mov rax, [rbp+var_18] mov rax, [rax+10h] mov rcx, [rbp+var_18] mov ecx, [rcx+20h] add rax, rcx mov [rbp+var_60], rax loc_9ACBE: mov rax, [rbp+var_58] cmp rax, [rbp+var_60] jnb loc_9ADBC mov rax, [rbp+var_10] mov rax, [rax+8] mov rdi, [rax+0C0h] mov rsi, [rbp+var_58] mov rax, [rbp+var_10] mov rdx, [rax] mov rax, [rbp+var_10] mov ecx, [rax+10h] mov rax, [rbp+var_10] add ecx, [rax+14h] lea r8, [rbp+var_40] call maria_rtree_area_increase movsd [rbp+var_30], xmm0 movsd xmm1, cs:qword_125B88 ucomisd xmm0, xmm1 jnz short loc_9AD1F jp short loc_9AD1F mov [rbp+var_8], 0 jmp loc_9ADC4 loc_9AD1F: cmp [rbp+var_50], 0 jz short loc_9AD54 movsd xmm1, [rbp+var_30] movsd xmm0, [rbp+var_38] ucomisd xmm0, xmm1 ja short loc_9AD54 movsd xmm0, [rbp+var_30] ucomisd xmm0, [rbp+var_38] jnz short loc_9AD70 jp short loc_9AD70 movsd xmm1, [rbp+var_40] movsd xmm0, [rbp+var_48] ucomisd xmm0, xmm1 jbe short loc_9AD70 loc_9AD54: mov rax, [rbp+var_58] mov [rbp+var_50], rax movsd xmm0, [rbp+var_40] movsd [rbp+var_48], xmm0 movsd xmm0, [rbp+var_30] movsd [rbp+var_38], xmm0 loc_9AD70: jmp short $+2 loc_9AD72: mov rax, [rbp+var_58] mov rcx, [rbp+var_10] mov ecx, [rcx+10h] add rax, rcx mov [rbp+var_68], rax mov rax, [rbp+var_18] cmp dword ptr [rax+28h], 0 jz short loc_9AD9A mov rax, [rbp+var_18] mov eax, [rax+28h] mov [rbp+var_6C], eax jmp short loc_9ADA7 loc_9AD9A: mov rax, [rbp+var_28] mov eax, [rax+3E0h] mov [rbp+var_6C], eax loc_9ADA7: mov rax, [rbp+var_68] mov ecx, [rbp+var_6C] mov ecx, ecx add rax, rcx mov [rbp+var_58], rax jmp loc_9ACBE loc_9ADBC: mov rax, [rbp+var_50] mov [rbp+var_8], rax loc_9ADC4: mov rax, [rbp+var_8] add rsp, 70h pop rbp retn
unsigned long long maria_rtree_pick_key(long long a1, long long a2) { unsigned int v3; // [rsp+4h] [rbp-6Ch] unsigned long long v4; // [rsp+10h] [rbp-60h] unsigned long long v5; // [rsp+18h] [rbp-58h] unsigned long long v6; // [rsp+20h] [rbp-50h] double v7; // [rsp+28h] [rbp-48h] double v8; // [rsp+30h] [rbp-40h] BYREF double v9; // [rsp+38h] [rbp-38h] double v10; // [rsp+40h] [rbp-30h] long long v11; // [rsp+48h] [rbp-28h] long long *v12; // [rsp+50h] [rbp-20h] long long v13; // [rsp+58h] [rbp-18h] long long v14; // [rsp+60h] [rbp-10h] v14 = a1; v13 = a2; v12 = *(long long **)a2; v11 = *v12; v9 = 1.797693134862316e308; v6 = 0LL; v5 = *(unsigned int *)(a2 + 40) + *(unsigned int *)(v11 + 1860) + *(_QWORD *)(a2 + 16); v4 = *(unsigned int *)(a2 + 32) + *(_QWORD *)(a2 + 16); while ( v5 < v4 ) { v10 = maria_rtree_area_increase( *(_QWORD *)(*(_QWORD *)(v14 + 8) + 192LL), v5, *(_QWORD *)v14, (unsigned int)(*(_DWORD *)(v14 + 20) + *(_DWORD *)(v14 + 16)), &v8); if ( v10 == -1.0 ) return 0LL; if ( !v6 || v9 > v10 || v10 == v9 && v7 > v8 ) { v6 = v5; v7 = v8; v9 = v10; } if ( *(_DWORD *)(v13 + 40) ) v3 = *(_DWORD *)(v13 + 40); else v3 = *(_DWORD *)(v11 + 992); v5 += v3 + (unsigned long long)*(unsigned int *)(v14 + 16); } return v6; }
maria_rtree_pick_key: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOVSD XMM0,qword ptr [0x00225b80] MOVSD qword ptr [RBP + -0x38],XMM0 MOVSD XMM0,qword ptr [RBP + -0x48] MOVSD qword ptr [RBP + -0x48],XMM0 MOV qword ptr [RBP + -0x50],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX + 0x744] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RCX + 0x28] ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RCX + 0x20] ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX LAB_0019acbe: MOV RAX,qword ptr [RBP + -0x58] CMP RAX,qword ptr [RBP + -0x60] JNC 0x0019adbc MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RDI,qword ptr [RAX + 0xc0] MOV RSI,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] ADD ECX,dword ptr [RAX + 0x14] LEA R8,[RBP + -0x40] CALL 0x001a0830 MOVSD qword ptr [RBP + -0x30],XMM0 MOVSD XMM1,qword ptr [0x00225b88] UCOMISD XMM0,XMM1 JNZ 0x0019ad1f JP 0x0019ad1f MOV qword ptr [RBP + -0x8],0x0 JMP 0x0019adc4 LAB_0019ad1f: CMP qword ptr [RBP + -0x50],0x0 JZ 0x0019ad54 MOVSD XMM1,qword ptr [RBP + -0x30] MOVSD XMM0,qword ptr [RBP + -0x38] UCOMISD XMM0,XMM1 JA 0x0019ad54 MOVSD XMM0,qword ptr [RBP + -0x30] UCOMISD XMM0,qword ptr [RBP + -0x38] JNZ 0x0019ad70 JP 0x0019ad70 MOVSD XMM1,qword ptr [RBP + -0x40] MOVSD XMM0,qword ptr [RBP + -0x48] UCOMISD XMM0,XMM1 JBE 0x0019ad70 LAB_0019ad54: MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x50],RAX MOVSD XMM0,qword ptr [RBP + -0x40] MOVSD qword ptr [RBP + -0x48],XMM0 MOVSD XMM0,qword ptr [RBP + -0x30] MOVSD qword ptr [RBP + -0x38],XMM0 LAB_0019ad70: JMP 0x0019ad72 LAB_0019ad72: MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x10] ADD RAX,RCX MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x28],0x0 JZ 0x0019ad9a MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x28] MOV dword ptr [RBP + -0x6c],EAX JMP 0x0019ada7 LAB_0019ad9a: MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x3e0] MOV dword ptr [RBP + -0x6c],EAX LAB_0019ada7: MOV RAX,qword ptr [RBP + -0x68] MOV ECX,dword ptr [RBP + -0x6c] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX JMP 0x0019acbe LAB_0019adbc: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x8],RAX LAB_0019adc4: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x70 POP RBP RET
ulong maria_rtree_pick_key(int8 *param_1,int8 *param_2) { uint uVar1; long lVar2; uint local_74; ulong local_60; ulong local_58; double local_50; double local_48; double local_40; double local_38; long local_30; long *local_28; int8 *local_20; int8 *local_18; local_28 = (long *)*param_2; local_30 = *local_28; local_40 = DAT_00225b80; local_58 = 0; local_60 = param_2[2] + (ulong)*(uint *)(local_30 + 0x744) + (ulong)*(uint *)(param_2 + 5); lVar2 = param_2[2]; uVar1 = *(uint *)(param_2 + 4); local_20 = param_2; local_18 = param_1; do { if (lVar2 + (ulong)uVar1 <= local_60) { return local_58; } local_38 = (double)maria_rtree_area_increase (*(int8 *)(local_18[1] + 0xc0),local_60,*local_18, *(int *)(local_18 + 2) + *(int *)((long)local_18 + 0x14),&local_48 ); if ((local_38 == DAT_00225b88) && (!NAN(local_38) && !NAN(DAT_00225b88))) { return 0; } if ((local_58 == 0) || (local_38 < local_40)) { LAB_0019ad54: local_58 = local_60; local_50 = local_48; local_40 = local_38; } else if ((local_38 == local_40) && ((!NAN(local_38) && !NAN(local_40) && (local_48 < local_50))) ) goto LAB_0019ad54; if (*(int *)(local_20 + 5) == 0) { local_74 = *(uint *)(local_30 + 0x3e0); } else { local_74 = *(uint *)(local_20 + 5); } local_60 = local_60 + *(uint *)(local_18 + 2) + (ulong)local_74; } while( true ); }
36,725
ftxui::(anonymous namespace)::SeparatorWithPixel::~SeparatorWithPixel()
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/dom/separator.cpp
explicit SeparatorWithPixel(Pixel pixel) : SeparatorAuto(LIGHT), pixel_(std::move(pixel)) { pixel_.automerge = true; }
O3
cpp
ftxui::(anonymous namespace)::SeparatorWithPixel::~SeparatorWithPixel(): pushq %rbx movq %rdi, %rbx leaq 0x32ce5(%rip), %rax # 0x57798 movq %rax, (%rdi) movq 0x68(%rdi), %rdi leaq 0x78(%rbx), %rax cmpq %rax, %rdi je 0x24ace movq (%rax), %rsi incq %rsi callq 0xb400 movq %rbx, %rdi popq %rbx jmp 0x23e42 nop
_ZN5ftxui12_GLOBAL__N_118SeparatorWithPixelD2Ev: push rbx mov rbx, rdi lea rax, off_57798 mov [rdi], rax mov rdi, [rdi+68h]; void * lea rax, [rbx+78h] cmp rdi, rax jz short loc_24ACE mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_24ACE: mov rdi, rbx; this pop rbx jmp _ZN5ftxui4NodeD2Ev; ftxui::Node::~Node()
void ftxui::`anonymous namespace'::SeparatorWithPixel::~SeparatorWithPixel( ftxui::_anonymous_namespace_::SeparatorWithPixel *this) { char *v2; // rdi *(_QWORD *)this = off_57798; v2 = (char *)*((_QWORD *)this + 13); if ( v2 != (char *)this + 120 ) operator delete(v2, *((_QWORD *)this + 15) + 1LL); ftxui::Node::~Node(this); }
~SeparatorWithPixel: PUSH RBX MOV RBX,RDI LEA RAX,[0x157798] MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x68] LEA RAX,[RBX + 0x78] CMP RDI,RAX JZ 0x00124ace MOV RSI,qword ptr [RAX] INC RSI CALL 0x0010b400 LAB_00124ace: MOV RDI,RBX POP RBX JMP 0x00123e42
/* ftxui::(anonymous namespace)::SeparatorWithPixel::~SeparatorWithPixel() */ void __thiscall ftxui::(anonymous_namespace)::SeparatorWithPixel::~SeparatorWithPixel(SeparatorWithPixel *this) { *(int ***)this = &PTR__SeparatorWithPixel_00157798; if (*(SeparatorWithPixel **)(this + 0x68) != this + 0x78) { operator_delete(*(SeparatorWithPixel **)(this + 0x68),*(long *)(this + 0x78) + 1); } Node::~Node((Node *)this); return; }
36,726
char const* fmt::v11::detail::parse_arg_id<char, char const* fmt::v11::detail::parse_replacement_field<char, fmt::v11::detail::format_handler<char>&>(char const*, char const*, fmt::v11::detail::format_handler<char>&)::id_adapter&>(char const*, char const*, fmt::v11::detail::format_handler<char>&)
zkingston[P]unknot/build_O1/_deps/fmt-src/include/fmt/base.h
FMT_CONSTEXPR auto parse_arg_id(const Char* begin, const Char* end, Handler&& handler) -> const Char* { Char c = *begin; if (c >= '0' && c <= '9') { int index = 0; if (c != '0') index = parse_nonnegative_int(begin, end, INT_MAX); else ++begin; if (begin == end || (*begin != '}' && *begin != ':')) report_error("invalid format string"); else handler.on_index(index); return begin; } if (FMT_OPTIMIZE_SIZE > 1 || !is_name_start(c)) { report_error("invalid format string"); return begin; } auto it = begin; do { ++it; } while (it != end && (is_name_start(*it) || ('0' <= *it && *it <= '9'))); handler.on_name({begin, to_unsigned(it - begin)}); return it; }
O1
c
char const* fmt::v11::detail::parse_arg_id<char, char const* fmt::v11::detail::parse_replacement_field<char, fmt::v11::detail::format_handler<char>&>(char const*, char const*, fmt::v11::detail::format_handler<char>&)::id_adapter&>(char const*, char const*, fmt::v11::detail::format_handler<char>&): pushq %r14 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %rsi movq %rdi, (%rsp) movb (%rdi), %al leal -0x30(%rax), %ecx cmpb $0x9, %cl ja 0x46154 cmpb $0x30, %al jne 0x461a3 incq %rsi movq %rsi, (%rsp) xorl %eax, %eax jmp 0x461b3 cmpb $0x5f, %al je 0x46164 andb $-0x21, %al addb $-0x41, %al cmpb $0x19, %al ja 0x461e7 leaq 0x1(%rsi), %rax cmpq %r14, %rax je 0x46190 movb (%rax), %cl leal -0x30(%rcx), %edx incq %rax cmpb $0xa, %dl jb 0x46168 cmpb $0x5f, %cl je 0x46168 andb $-0x21, %cl addb $-0x41, %cl cmpb $0x1a, %cl jb 0x46168 decq %rax movq %rax, %r14 movq %r14, %rdx subq %rsi, %rdx movq (%rbx), %rdi callq 0x467a2 movq %r14, %rcx jmp 0x461d9 movq %rsp, %rdi movq %r14, %rsi movl $0x7fffffff, %edx # imm = 0x7FFFFFFF callq 0x4673b movq (%rsp), %rcx cmpq %r14, %rcx je 0x461e7 movzbl (%rcx), %edx cmpl $0x3a, %edx je 0x461c9 cmpl $0x7d, %edx jne 0x461e7 movq (%rbx), %rdx cmpl $0x0, 0x10(%rdx) jg 0x461f3 movl $0xffffffff, 0x10(%rdx) # imm = 0xFFFFFFFF movl %eax, 0x8(%rbx) movq %rcx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq leaq 0x24d795(%rip), %rdi # 0x293983 callq 0x3d5e8 leaq 0x24d80e(%rip), %rdi # 0x293a08 callq 0x3d5e8 nop
_ZN3fmt3v116detail12parse_arg_idIcRZNS1_23parse_replacement_fieldIcRNS1_14format_handlerIcEEEEPKT_S9_S9_OT0_E10id_adapterEES9_S9_S9_SB_: push r14 push rbx push rax mov rbx, rdx mov r14, rsi mov rsi, rdi; char * mov [rsp+18h+var_18], rdi mov al, [rdi] lea ecx, [rax-30h] cmp cl, 9 ja short loc_46154 cmp al, 30h ; '0' jnz short loc_461A3 inc rsi mov [rsp+18h+var_18], rsi xor eax, eax jmp short loc_461B3 loc_46154: cmp al, 5Fh ; '_' jz short loc_46164 and al, 0DFh add al, 0BFh cmp al, 19h ja loc_461E7 loc_46164: lea rax, [rsi+1] loc_46168: cmp rax, r14 jz short loc_46190 mov cl, [rax] lea edx, [rcx-30h] inc rax cmp dl, 0Ah jb short loc_46168 cmp cl, 5Fh ; '_' jz short loc_46168 and cl, 0DFh add cl, 0BFh cmp cl, 1Ah jb short loc_46168 dec rax mov r14, rax loc_46190: mov rdx, r14 sub rdx, rsi mov rdi, [rbx] call _ZN3fmt3v116detail14format_handlerIcE9on_arg_idENS0_17basic_string_viewIcEE; fmt::v11::detail::format_handler<char>::on_arg_id(fmt::v11::basic_string_view<char>) mov rcx, r14 jmp short loc_461D9 loc_461A3: mov rdi, rsp mov rsi, r14; char * mov edx, 7FFFFFFFh call _ZN3fmt3v116detail21parse_nonnegative_intIcEEiRPKT_S5_i; fmt::v11::detail::parse_nonnegative_int<char>(char const*&,char const*,int) loc_461B3: mov rcx, [rsp+18h+var_18] cmp rcx, r14 jz short loc_461E7 movzx edx, byte ptr [rcx] cmp edx, 3Ah ; ':' jz short loc_461C9 cmp edx, 7Dh ; '}' jnz short loc_461E7 loc_461C9: mov rdx, [rbx] cmp dword ptr [rdx+10h], 0 jg short loc_461F3 mov dword ptr [rdx+10h], 0FFFFFFFFh loc_461D9: mov [rbx+8], eax mov rax, rcx add rsp, 8 pop rbx pop r14 retn loc_461E7: lea rdi, aInvalidFormatS; "invalid format string" call _ZN3fmt3v1112report_errorEPKc; fmt::v11::report_error(char const*) loc_461F3: lea rdi, aCannotSwitchFr_0; "cannot switch from automatic to manual "... call _ZN3fmt3v1112report_errorEPKc; fmt::v11::report_error(char const*)
char * fmt::v11::detail::parse_arg_id<char,char const* fmt::v11::detail::parse_replacement_field<char,fmt::v11::detail::format_handler<char> &>(char const*,char const*,fmt::v11::detail::format_handler<char> &)::id_adapter &>( char *a1, char *a2, _DWORD *a3) { const char *v5; // rsi char v6; // al int v7; // eax char *v8; // rax char v9; // cl char *v10; // rcx int v11; // edx char *v13; // [rsp+0h] [rbp-18h] BYREF v5 = a1; v13 = a1; v6 = *a1; if ( (unsigned __int8)(*a1 - 48) <= 9u ) { if ( v6 == 48 ) { v5 = a1 + 1; v13 = a1 + 1; v7 = 0; } else { v5 = a2; v7 = fmt::v11::detail::parse_nonnegative_int<char>(&v13, a2, 0x7FFFFFFFLL); } v10 = v13; if ( v13 != a2 ) { v11 = (unsigned __int8)*v13; if ( v11 == 58 || v11 == 125 ) { if ( *(int *)(*(_QWORD *)a3 + 16LL) > 0 ) fmt::v11::report_error((fmt::v11 *)"cannot switch from automatic to manual argument indexing", v5); *(_DWORD *)(*(_QWORD *)a3 + 16LL) = -1; goto LABEL_19; } } LABEL_20: fmt::v11::report_error((fmt::v11 *)"invalid format string", v5); } if ( v6 != 95 && (unsigned __int8)((v6 & 0xDF) - 65) > 0x19u ) goto LABEL_20; v8 = a1 + 1; while ( v8 != a2 ) { v9 = *v8++; if ( (unsigned __int8)(v9 - 48) >= 0xAu && v9 != 95 && (unsigned __int8)((v9 & 0xDF) - 65) >= 0x1Au ) { a2 = v8 - 1; break; } } v7 = fmt::v11::detail::format_handler<char>::on_arg_id(*(_QWORD *)a3, a1, a2 - a1); v10 = a2; LABEL_19: a3[2] = v7; return v10; }
parse_arg_id<char,fmt::v11::detail::parse_replacement_field<char,fmt::v11::detail::format_handler<char>&>(char_const*,char_const*,fmt::v11::detail::format_handler<char>&)::id_adapter&>: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI MOV RSI,RDI MOV qword ptr [RSP],RDI MOV AL,byte ptr [RDI] LEA ECX,[RAX + -0x30] CMP CL,0x9 JA 0x00146154 CMP AL,0x30 JNZ 0x001461a3 INC RSI MOV qword ptr [RSP],RSI XOR EAX,EAX JMP 0x001461b3 LAB_00146154: CMP AL,0x5f JZ 0x00146164 AND AL,0xdf ADD AL,0xbf CMP AL,0x19 JA 0x001461e7 LAB_00146164: LEA RAX,[RSI + 0x1] LAB_00146168: CMP RAX,R14 JZ 0x00146190 MOV CL,byte ptr [RAX] LEA EDX,[RCX + -0x30] INC RAX CMP DL,0xa JC 0x00146168 CMP CL,0x5f JZ 0x00146168 AND CL,0xdf ADD CL,0xbf CMP CL,0x1a JC 0x00146168 DEC RAX MOV R14,RAX LAB_00146190: MOV RDX,R14 SUB RDX,RSI MOV RDI,qword ptr [RBX] CALL 0x001467a2 MOV RCX,R14 JMP 0x001461d9 LAB_001461a3: MOV RDI,RSP MOV RSI,R14 MOV EDX,0x7fffffff CALL 0x0014673b LAB_001461b3: MOV RCX,qword ptr [RSP] CMP RCX,R14 JZ 0x001461e7 MOVZX EDX,byte ptr [RCX] CMP EDX,0x3a JZ 0x001461c9 CMP EDX,0x7d JNZ 0x001461e7 LAB_001461c9: MOV RDX,qword ptr [RBX] CMP dword ptr [RDX + 0x10],0x0 JG 0x001461f3 MOV dword ptr [RDX + 0x10],0xffffffff LAB_001461d9: MOV dword ptr [RBX + 0x8],EAX MOV RAX,RCX ADD RSP,0x8 POP RBX POP R14 RET LAB_001461e7: LEA RDI,[0x393983] CALL 0x0013d5e8 LAB_001461f3: LEA RDI,[0x393a08] CALL 0x0013d5e8
/* char const* fmt::v11::detail::parse_arg_id<char, fmt::v11::detail::parse_replacement_field<char, fmt::v11::detail::format_handler<char>&>(char const*, char const*, fmt::v11::detail::format_handler<char>&)::id_adapter&>(char const*, char const*, fmt::v11::detail::format_handler<char>&) */ char * fmt::v11::detail:: parse_arg_id<char,fmt::v11::detail::parse_replacement_field<char,fmt::v11::detail::format_handler<char>&>(char_const*,char_const*,fmt::v11::detail::format_handler<char>&)::id_adapter&> (char *param_1,char *param_2,format_handler *param_3) { byte bVar1; int iVar2; byte *pbVar3; byte *pbVar4; byte *pbVar5; byte *local_18; bVar1 = *param_1; local_18 = (byte *)param_1; if ((byte)(bVar1 - 0x30) < 10) { if (bVar1 == 0x30) { local_18 = (byte *)(param_1 + 1); iVar2 = 0; } else { iVar2 = parse_nonnegative_int<char>((char **)&local_18,param_2,0x7fffffff); } if ((local_18 == (byte *)param_2) || ((*local_18 != 0x3a && (*local_18 != 0x7d)))) { LAB_001461e7: /* WARNING: Subroutine does not return */ report_error("invalid format string"); } if (0 < *(int *)(*(long *)param_3 + 0x10)) { /* WARNING: Subroutine does not return */ report_error("cannot switch from automatic to manual argument indexing"); } *(int4 *)(*(long *)param_3 + 0x10) = 0xffffffff; pbVar5 = local_18; } else { if ((bVar1 != 0x5f) && (0x19 < (byte)((bVar1 & 0xdf) + 0xbf))) goto LAB_001461e7; pbVar4 = (byte *)(param_1 + 1); do { pbVar3 = pbVar4; pbVar5 = (byte *)param_2; if (pbVar3 == (byte *)param_2) break; bVar1 = *pbVar3; pbVar4 = pbVar3 + 1; } while ((((byte)(bVar1 - 0x30) < 10) || (bVar1 == 0x5f)) || (pbVar5 = pbVar3, (byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)); iVar2 = format_handler<char>::on_arg_id (*(int8 *)param_3,param_1,(long)pbVar5 - (long)param_1); } *(int *)(param_3 + 8) = iVar2; return (char *)pbVar5; }
36,727
js_create_module_var
bluesky950520[P]quickjs/quickjs.c
static JSVarRef *js_create_module_var(JSContext *ctx, BOOL is_lexical) { JSVarRef *var_ref; var_ref = js_malloc(ctx, sizeof(JSVarRef)); if (!var_ref) return NULL; var_ref->header.ref_count = 1; if (is_lexical) var_ref->value = JS_UNINITIALIZED; else var_ref->value = JS_UNDEFINED; var_ref->pvalue = &var_ref->value; var_ref->is_detached = TRUE; add_gc_object(ctx->rt, &var_ref->header, JS_GC_OBJ_TYPE_VAR_REF); return var_ref; }
O1
c
js_create_module_var: pushq %rbp pushq %rbx pushq %rax movl %esi, %ebp movq %rdi, %rbx pushq $0x30 popq %rsi callq 0xede6 testq %rax, %rax je 0x110a6 movl $0x1, (%rax) leaq 0x20(%rax), %rcx andl $0x0, 0x20(%rax) cmpl $0x1, %ebp pushq $0x4 popq %rdx sbbq $0x0, %rdx movq %rdx, 0x28(%rax) movq %rcx, 0x18(%rax) orb $0x1, 0x5(%rax) movq 0x18(%rbx), %rcx movb $0x3, 0x4(%rax) movq %rax, %rdx addq $0x8, %rdx leaq 0x98(%rcx), %rsi movq 0x98(%rcx), %rdi movq %rdx, 0x8(%rdi) movq %rdi, 0x8(%rax) movq %rsi, 0x10(%rax) movq %rdx, 0x98(%rcx) jmp 0x110a8 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq
js_create_module_var: push rbp push rbx push rax mov ebp, esi mov rbx, rdi push 30h ; '0' pop rsi call js_malloc test rax, rax jz short loc_110A6 mov dword ptr [rax], 1 lea rcx, [rax+20h] and dword ptr [rax+20h], 0 cmp ebp, 1 push 4 pop rdx sbb rdx, 0 mov [rax+28h], rdx mov [rax+18h], rcx or byte ptr [rax+5], 1 mov rcx, [rbx+18h] mov byte ptr [rax+4], 3 mov rdx, rax add rdx, 8 lea rsi, [rcx+98h] mov rdi, [rcx+98h] mov [rdi+8], rdx mov [rax+8], rdi mov [rax+10h], rsi mov [rcx+98h], rdx jmp short loc_110A8 loc_110A6: xor eax, eax loc_110A8: add rsp, 8 pop rbx pop rbp retn
long long js_create_module_var(long long a1, int a2) { long long result; // rax long long v3; // rcx long long v4; // rdi result = js_malloc(a1, 48LL); if ( !result ) return 0LL; *(_DWORD *)result = 1; *(_DWORD *)(result + 32) = 0; *(_QWORD *)(result + 40) = 4LL - (a2 == 0); *(_QWORD *)(result + 24) = result + 32; *(_BYTE *)(result + 5) |= 1u; v3 = *(_QWORD *)(a1 + 24); *(_BYTE *)(result + 4) = 3; v4 = *(_QWORD *)(v3 + 152); *(_QWORD *)(v4 + 8) = result + 8; *(_QWORD *)(result + 8) = v4; *(_QWORD *)(result + 16) = v3 + 152; *(_QWORD *)(v3 + 152) = result + 8; return result; }
36,728
js_create_module_var
bluesky950520[P]quickjs/quickjs.c
static JSVarRef *js_create_module_var(JSContext *ctx, BOOL is_lexical) { JSVarRef *var_ref; var_ref = js_malloc(ctx, sizeof(JSVarRef)); if (!var_ref) return NULL; var_ref->header.ref_count = 1; if (is_lexical) var_ref->value = JS_UNINITIALIZED; else var_ref->value = JS_UNDEFINED; var_ref->pvalue = &var_ref->value; var_ref->is_detached = TRUE; add_gc_object(ctx->rt, &var_ref->header, JS_GC_OBJ_TYPE_VAR_REF); return var_ref; }
O2
c
js_create_module_var: pushq %rbp pushq %rbx pushq %rax movl %esi, %ebp movq %rdi, %rbx pushq $0x30 popq %rsi callq 0x17214 testq %rax, %rax je 0x3c19b movl $0x1, (%rax) cmpl $0x1, %ebp pushq $0x4 popq %rcx sbbq $0x0, %rcx leaq 0x20(%rax), %rdx andl $0x0, 0x20(%rax) movq %rcx, 0x28(%rax) movq %rdx, 0x18(%rax) orb $0x1, 0x5(%rax) movq 0x18(%rbx), %rcx movb $0x3, 0x4(%rax) movq %rax, %rdx addq $0x8, %rdx leaq 0x98(%rcx), %rsi movq 0x98(%rcx), %rdi movq %rdx, 0x8(%rdi) movq %rdi, 0x8(%rax) movq %rsi, 0x10(%rax) movq %rdx, 0x98(%rcx) addq $0x8, %rsp popq %rbx popq %rbp retq
js_create_module_var: push rbp push rbx push rax mov ebp, esi mov rbx, rdi push 30h ; '0' pop rsi call js_malloc test rax, rax jz short loc_3C19B mov dword ptr [rax], 1 cmp ebp, 1 push 4 pop rcx sbb rcx, 0 lea rdx, [rax+20h] and dword ptr [rax+20h], 0 mov [rax+28h], rcx mov [rax+18h], rdx or byte ptr [rax+5], 1 mov rcx, [rbx+18h] mov byte ptr [rax+4], 3 mov rdx, rax add rdx, 8 lea rsi, [rcx+98h] mov rdi, [rcx+98h] mov [rdi+8], rdx mov [rax+8], rdi mov [rax+10h], rsi mov [rcx+98h], rdx loc_3C19B: add rsp, 8 pop rbx pop rbp retn
long long js_create_module_var(long long a1, int a2) { long long result; // rax long long v3; // rcx long long v4; // rdi result = js_malloc(a1, 48LL); if ( result ) { *(_DWORD *)result = 1; *(_DWORD *)(result + 32) = 0; *(_QWORD *)(result + 40) = 4LL - (a2 == 0); *(_QWORD *)(result + 24) = result + 32; *(_BYTE *)(result + 5) |= 1u; v3 = *(_QWORD *)(a1 + 24); *(_BYTE *)(result + 4) = 3; v4 = *(_QWORD *)(v3 + 152); *(_QWORD *)(v4 + 8) = result + 8; *(_QWORD *)(result + 8) = v4; *(_QWORD *)(result + 16) = v3 + 152; *(_QWORD *)(v3 + 152) = result + 8; } return result; }
js_create_module_var: PUSH RBP PUSH RBX PUSH RAX MOV EBP,ESI MOV RBX,RDI PUSH 0x30 POP RSI CALL 0x00117214 TEST RAX,RAX JZ 0x0013c19b MOV dword ptr [RAX],0x1 CMP EBP,0x1 PUSH 0x4 POP RCX SBB RCX,0x0 LEA RDX,[RAX + 0x20] AND dword ptr [RAX + 0x20],0x0 MOV qword ptr [RAX + 0x28],RCX MOV qword ptr [RAX + 0x18],RDX OR byte ptr [RAX + 0x5],0x1 MOV RCX,qword ptr [RBX + 0x18] MOV byte ptr [RAX + 0x4],0x3 MOV RDX,RAX ADD RDX,0x8 LEA RSI,[RCX + 0x98] MOV RDI,qword ptr [RCX + 0x98] MOV qword ptr [RDI + 0x8],RDX MOV qword ptr [RAX + 0x8],RDI MOV qword ptr [RAX + 0x10],RSI MOV qword ptr [RCX + 0x98],RDX LAB_0013c19b: ADD RSP,0x8 POP RBX POP RBP RET
void js_create_module_var(long param_1,int param_2) { long lVar1; long lVar2; int4 *puVar3; puVar3 = (int4 *)js_malloc(param_1,0x30); if (puVar3 != (int4 *)0x0) { *puVar3 = 1; puVar3[8] = 0; *(ulong *)(puVar3 + 10) = 4 - (ulong)(param_2 == 0); *(int4 **)(puVar3 + 6) = puVar3 + 8; *(byte *)((long)puVar3 + 5) = *(byte *)((long)puVar3 + 5) | 1; lVar1 = *(long *)(param_1 + 0x18); *(int1 *)(puVar3 + 1) = 3; lVar2 = *(long *)(lVar1 + 0x98); *(int4 **)(lVar2 + 8) = puVar3 + 2; *(long *)(puVar3 + 2) = lVar2; *(long *)(puVar3 + 4) = lVar1 + 0x98; *(int4 **)(lVar1 + 0x98) = puVar3 + 2; } return; }
36,729
js_map_get
bluesky950520[P]quickjs/quickjs.c
static JSValue js_map_get(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSMapState *s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic); JSMapRecord *mr; JSValue key; if (!s) return JS_EXCEPTION; key = map_normalize_key(ctx, argv[0]); mr = map_find_record(ctx, s, key); if (!mr) return JS_UNDEFINED; else return js_dup(mr->value); }
O2
c
js_map_get: pushq %r14 pushq %rbx pushq %rax movq %r8, %rbx movq %rdi, %r14 leal 0x23(%r9), %ecx callq 0x21207 testq %rax, %rax je 0x4472b movq (%rbx), %rdx movq 0x8(%rbx), %rcx movl %ecx, %esi xorq $0x7, %rsi movq %rdx, %rdi btrq $0x3f, %rdi xorl %ebx, %ebx orq %rsi, %rdi cmoveq %rbx, %rdx cmoveq %rbx, %rcx movq %r14, %rdi movq %rax, %rsi callq 0x3d80d testq %rax, %rax je 0x44732 movq 0x40(%rax), %rcx movq 0x48(%rax), %rdx cmpl $-0x9, %edx jb 0x4471a incl (%rcx) movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 andq %rcx, %rax movl %ecx, %ebx jmp 0x44737 pushq $0x6 popq %rdx xorl %ebx, %ebx jmp 0x44735 pushq $0x3 popq %rdx xorl %eax, %eax orq %rax, %rbx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
js_map_get: push r14 push rbx push rax mov rbx, r8 mov r14, rdi lea ecx, [r9+23h] call JS_GetOpaque2 test rax, rax jz short loc_4472B mov rdx, [rbx] mov rcx, [rbx+8] mov esi, ecx xor rsi, 7 mov rdi, rdx btr rdi, 3Fh ; '?' xor ebx, ebx or rdi, rsi cmovz rdx, rbx cmovz rcx, rbx mov rdi, r14 mov rsi, rax call map_find_record test rax, rax jz short loc_44732 mov rcx, [rax+40h] mov rdx, [rax+48h] cmp edx, 0FFFFFFF7h jb short loc_4471A inc dword ptr [rcx] loc_4471A: mov rax, 0FFFFFFFF00000000h and rax, rcx mov ebx, ecx jmp short loc_44737 loc_4472B: push 6 pop rdx xor ebx, ebx jmp short loc_44735 loc_44732: push 3 pop rdx loc_44735: xor eax, eax loc_44737: or rbx, rax mov rax, rbx add rsp, 8 pop rbx pop r14 retn
unsigned long long js_map_get(long long a1, long long a2, int a3, __m128d a4, long long a5, long long a6, int a7) { long long Opaque2; // rax _DWORD *v10; // rdx long long v11; // rcx __int128 v12; // rdi long long v13; // rbx long long record; // rax unsigned long long v15; // rcx unsigned long long v16; // rax Opaque2 = JS_GetOpaque2(a1, a2, a3, a7 + 35); if ( !Opaque2 ) { v13 = 0LL; LABEL_9: v16 = 0LL; return v16 | v13; } v10 = *(_DWORD **)a6; v11 = *(_QWORD *)(a6 + 8); *((_QWORD *)&v12 + 1) = (unsigned int)v11 ^ 7LL; *(_QWORD *)&v12 = *(_QWORD *)a6 & 0x7FFFFFFFFFFFFFFFLL; v13 = 0LL; if ( v12 == 0 ) { v10 = 0LL; v11 = 0LL; } record = map_find_record(a1, Opaque2, v10, v11, a4); if ( !record ) goto LABEL_9; v15 = *(_QWORD *)(record + 64); if ( (unsigned int)*(_QWORD *)(record + 72) >= 0xFFFFFFF7 ) ++*(_DWORD *)v15; v16 = v15 & 0xFFFFFFFF00000000LL; v13 = (unsigned int)v15; return v16 | v13; }
js_map_get: PUSH R14 PUSH RBX PUSH RAX MOV RBX,R8 MOV R14,RDI LEA ECX,[R9 + 0x23] CALL 0x00121207 TEST RAX,RAX JZ 0x0014472b MOV RDX,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x8] MOV ESI,ECX XOR RSI,0x7 MOV RDI,RDX BTR RDI,0x3f XOR EBX,EBX OR RDI,RSI CMOVZ RDX,RBX CMOVZ RCX,RBX MOV RDI,R14 MOV RSI,RAX CALL 0x0013d80d TEST RAX,RAX JZ 0x00144732 MOV RCX,qword ptr [RAX + 0x40] MOV RDX,qword ptr [RAX + 0x48] CMP EDX,-0x9 JC 0x0014471a INC dword ptr [RCX] LAB_0014471a: MOV RAX,-0x100000000 AND RAX,RCX MOV EBX,ECX JMP 0x00144737 LAB_0014472b: PUSH 0x6 POP RDX XOR EBX,EBX JMP 0x00144735 LAB_00144732: PUSH 0x3 POP RDX LAB_00144735: XOR EAX,EAX LAB_00144737: OR RBX,RAX MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
int1 [16] js_map_get(int8 param_1) { int *piVar1; long lVar2; ulong uVar3; ulong uVar4; int8 uVar5; ulong *in_R8; int1 auVar6 [16]; lVar2 = JS_GetOpaque2(); if (lVar2 == 0) { uVar5 = 6; } else { uVar4 = in_R8[1]; uVar3 = *in_R8; if ((*in_R8 & 0x7fffffffffffffff) == 0 && (in_R8[1] & 0xffffffff) == 7) { uVar4 = 0; uVar3 = 0; } lVar2 = map_find_record(param_1,lVar2,uVar3,uVar4); if (lVar2 != 0) { piVar1 = *(int **)(lVar2 + 0x40); uVar5 = *(int8 *)(lVar2 + 0x48); if (0xfffffff6 < (uint)uVar5) { *piVar1 = *piVar1 + 1; } uVar3 = (ulong)piVar1 & 0xffffffff00000000; uVar4 = (ulong)piVar1 & 0xffffffff; goto LAB_00144737; } uVar5 = 3; } uVar4 = 0; uVar3 = 0; LAB_00144737: auVar6._8_8_ = uVar5; auVar6._0_8_ = uVar4 | uVar3; return auVar6; }
36,730
LoadAutomationEventList
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c
AutomationEventList LoadAutomationEventList(const char *fileName) { AutomationEventList list = { 0 }; // Allocate and empty automation event list, ready to record new events list.events = (AutomationEvent *)RL_CALLOC(MAX_AUTOMATION_EVENTS, sizeof(AutomationEvent)); list.capacity = MAX_AUTOMATION_EVENTS; #if defined(SUPPORT_AUTOMATION_EVENTS) if (fileName == NULL) TRACELOG(LOG_INFO, "AUTOMATION: New empty events list loaded successfully"); else { // Load automation events file (binary) /* //int dataSize = 0; //unsigned char *data = LoadFileData(fileName, &dataSize); FILE *raeFile = fopen(fileName, "rb"); unsigned char fileId[4] = { 0 }; fread(fileId, 1, 4, raeFile); if ((fileId[0] == 'r') && (fileId[1] == 'A') && (fileId[2] == 'E') && (fileId[1] == ' ')) { fread(&eventCount, sizeof(int), 1, raeFile); TRACELOG(LOG_WARNING, "Events loaded: %i\n", eventCount); fread(events, sizeof(AutomationEvent), eventCount, raeFile); } fclose(raeFile); */ // Load events file (text) //unsigned char *buffer = LoadFileText(fileName); FILE *raeFile = fopen(fileName, "rt"); if (raeFile != NULL) { unsigned int counter = 0; char buffer[256] = { 0 }; char eventDesc[64] = { 0 }; fgets(buffer, 256, raeFile); while (!feof(raeFile)) { switch (buffer[0]) { case 'c': sscanf(buffer, "c %i", &list.count); break; case 'e': { sscanf(buffer, "e %d %d %d %d %d %d %[^\n]s", &list.events[counter].frame, &list.events[counter].type, &list.events[counter].params[0], &list.events[counter].params[1], &list.events[counter].params[2], &list.events[counter].params[3], eventDesc); counter++; } break; default: break; } fgets(buffer, 256, raeFile); } if (counter != list.count) { TRACELOG(LOG_WARNING, "AUTOMATION: Events read from file [%i] do not mach event count specified [%i]", counter, list.count); list.count = counter; } fclose(raeFile); TRACELOG(LOG_INFO, "AUTOMATION: Events file loaded successfully"); } TRACELOG(LOG_INFO, "AUTOMATION: Events loaded from file: %i", list.count); } #endif return list; }
O2
c
LoadAutomationEventList: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x158, %rsp # imm = 0x158 movq %rdi, %r14 andq $0x0, (%rsp) pushq $0x18 popq %rsi movl $0x4000, %edi # imm = 0x4000 callq 0x9320 movq %rax, 0x8(%rsp) movl $0x4000, (%rsp) # imm = 0x4000 testq %r14, %r14 je 0x6496d leaq 0x5e738(%rip), %rsi # 0xc2f6b movq %r14, %rdi callq 0x9620 testq %rax, %rax je 0x64983 movq %rax, %rbx leaq 0x50(%rsp), %r14 movl $0x100, %edx # imm = 0x100 movq %r14, %rdi xorl %esi, %esi callq 0x92c0 xorps %xmm0, %xmm0 leaq 0x10(%rsp), %r15 movaps %xmm0, 0x30(%r15) movaps %xmm0, 0x20(%r15) movaps %xmm0, 0x10(%r15) movaps %xmm0, (%r15) movq %r14, %rdi movl $0x100, %esi # imm = 0x100 movq %rbx, %rdx callq 0x98b0 leaq 0x61cad(%rip), %r12 # 0xc653a leaq 0x61ca1(%rip), %r13 # 0xc6535 xorl %ebp, %ebp movq %rbx, %rdi callq 0x9870 testl %eax, %eax jne 0x6492f movzbl 0x50(%rsp), %eax cmpl $0x65, %eax je 0x648c9 cmpl $0x63, %eax jne 0x6491a movq %r14, %rdi movq %r13, %rsi leaq 0x4(%rsp), %rdx xorl %eax, %eax callq 0x94f0 jmp 0x6491a movq 0x8(%rsp), %rax movl %ebp, %ecx imulq $0x18, %rcx, %rsi leaq (%rax,%rsi), %rdx leaq (%rax,%rsi), %rcx addq $0x4, %rcx leaq 0x8(%rax,%rsi), %r8 leaq (%rax,%rsi), %r9 addq $0xc, %r9 leaq (%rax,%rsi), %r10 addq $0x10, %r10 leaq (%rax,%rsi), %r11 addq $0x14, %r11 subq $0x8, %rsp movq %r14, %rdi movq %r12, %rsi xorl %eax, %eax pushq %r15 pushq %r11 pushq %r10 callq 0x94f0 addq $0x20, %rsp incl %ebp movq %r14, %rdi movl $0x100, %esi # imm = 0x100 movq %rbx, %rdx callq 0x98b0 jmp 0x64896 movl 0x4(%rsp), %ecx cmpl %ecx, %ebp je 0x6494e leaq 0x61c17(%rip), %rsi # 0xc6555 pushq $0x4 popq %rdi movl %ebp, %edx xorl %eax, %eax callq 0xa128b movl %ebp, 0x4(%rsp) movq %rbx, %rdi callq 0x9510 leaq 0x61c46(%rip), %rsi # 0xc65a3 pushq $0x3 popq %rdi xorl %eax, %eax callq 0xa128b movl 0x4(%rsp), %edx jmp 0x64985 movq %rax, %rbx leaq 0x61b88(%rip), %rsi # 0xc64ff pushq $0x3 popq %rdi xorl %eax, %eax callq 0xa128b jmp 0x6499b xorl %edx, %edx leaq 0x61c43(%rip), %rsi # 0xc65cf pushq $0x3 popq %rdi xorl %eax, %eax callq 0xa128b movq 0x8(%rsp), %rbx movq (%rsp), %rax movq %rbx, %rdx addq $0x158, %rsp # imm = 0x158 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
LoadAutomationEventList: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 158h mov r14, rdi and [rsp+188h+var_188], 0 push 18h pop rsi mov edi, 4000h call _calloc mov [rsp+188h+var_180], rax mov dword ptr [rsp+188h+var_188], 4000h test r14, r14 jz loc_6496D lea rsi, aLeftPageEndRig+1Eh; "rt" mov rdi, r14 call _fopen test rax, rax jz loc_64983 mov rbx, rax lea r14, [rsp+188h+var_138] mov edx, 100h mov rdi, r14 xor esi, esi call _memset xorps xmm0, xmm0 lea r15, [rsp+188h+var_178] movaps xmmword ptr [r15+30h], xmm0 movaps xmmword ptr [r15+20h], xmm0 movaps xmmword ptr [r15+10h], xmm0 movaps xmmword ptr [r15], xmm0 mov rdi, r14 mov esi, 100h mov rdx, rbx call _fgets lea r12, aEDDDDDDS; "e %d %d %d %d %d %d %[^\n]s" lea r13, aCI; "c %i" xor ebp, ebp loc_64896: mov rdi, rbx call _feof test eax, eax jnz loc_6492F movzx eax, [rsp+188h+var_138] cmp eax, 65h ; 'e' jz short loc_648C9 cmp eax, 63h ; 'c' jnz short loc_6491A mov rdi, r14 mov rsi, r13 lea rdx, [rsp+188h+var_188+4] xor eax, eax call ___isoc99_sscanf jmp short loc_6491A loc_648C9: mov rax, [rsp+188h+var_180] mov ecx, ebp imul rsi, rcx, 18h lea rdx, [rax+rsi] lea rcx, [rax+rsi] add rcx, 4 lea r8, [rax+rsi+8] lea r9, [rax+rsi] add r9, 0Ch lea r10, [rax+rsi] add r10, 10h lea r11, [rax+rsi] add r11, 14h sub rsp, 8 mov rdi, r14 mov rsi, r12 xor eax, eax push r15 push r11 push r10 call ___isoc99_sscanf add rsp, 20h inc ebp loc_6491A: mov rdi, r14 mov esi, 100h mov rdx, rbx call _fgets jmp loc_64896 loc_6492F: mov ecx, dword ptr [rsp+188h+var_188+4] cmp ebp, ecx jz short loc_6494E lea rsi, aAutomationEven; "AUTOMATION: Events read from file [%i] "... push 4 pop rdi mov edx, ebp xor eax, eax call TraceLog mov dword ptr [rsp+188h+var_188+4], ebp loc_6494E: mov rdi, rbx call _fclose lea rsi, aAutomationEven_0; "AUTOMATION: Events file loaded successf"... push 3 pop rdi xor eax, eax call TraceLog mov edx, dword ptr [rsp+188h+var_188+4] jmp short loc_64985 loc_6496D: mov rbx, rax lea rsi, aAutomationNewE; "AUTOMATION: New empty events list loade"... push 3 pop rdi xor eax, eax call TraceLog jmp short loc_6499B loc_64983: xor edx, edx loc_64985: lea rsi, aAutomationEven_1; "AUTOMATION: Events loaded from file: %i" push 3 pop rdi xor eax, eax call TraceLog mov rbx, [rsp+188h+var_180] loc_6499B: mov rax, [rsp+188h+var_188] mov rdx, rbx add rsp, 158h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long LoadAutomationEventList(long long a1) { int v1; // edx int v2; // ecx int v3; // r8d int v4; // r9d long long v5; // rax int v6; // ecx int v7; // r8d int v8; // r9d long long v9; // rbx long long v10; // rdx long long v11; // rcx unsigned int v12; // ebp int v13; // r8d int v14; // r9d int v15; // edx int v16; // ecx int v17; // r8d int v18; // r9d int v19; // edx long long v21; // [rsp+0h] [rbp-188h] BYREF long long v22; // [rsp+8h] [rbp-180h] __int128 v23; // [rsp+10h] [rbp-178h] BYREF __int128 v24; // [rsp+20h] [rbp-168h] __int128 v25; // [rsp+30h] [rbp-158h] __int128 v26; // [rsp+40h] [rbp-148h] _BYTE v27[312]; // [rsp+50h] [rbp-138h] BYREF v22 = calloc(0x4000LL, 24LL); v21 = 0x4000LL; if ( a1 ) { v5 = fopen(a1, "rt"); if ( v5 ) { v9 = v5; memset(v27, 0LL, 256LL); v26 = 0LL; v25 = 0LL; v24 = 0LL; v23 = 0LL; fgets(v27, 256LL, v9); v12 = 0; while ( !(unsigned int)feof(v9, 256LL, v10, v11) ) { if ( v27[0] == 101 ) { __isoc99_sscanf( v27, "e %d %d %d %d %d %d %[^\n]s", v22 + 24LL * v12, v22 + 24LL * v12 + 4, v22 + 24LL * v12 + 8, v22 + 24LL * v12 + 12, v22 + 24LL * v12 + 16, v22 + 24LL * v12 + 20, &v23); ++v12; } else if ( v27[0] == 99 ) { __isoc99_sscanf(v27, "c %i", (char *)&v21 + 4); } fgets(v27, 256LL, v9); } if ( v12 != HIDWORD(v21) ) { TraceLog( 4, (unsigned int)"AUTOMATION: Events read from file [%i] do not mach event count specified [%i]", v12, HIDWORD(v21), v13, v14); HIDWORD(v21) = v12; } fclose(v9); TraceLog(3, (unsigned int)"AUTOMATION: Events file loaded successfully", v15, v16, v17, v18); v19 = HIDWORD(v21); } else { v19 = 0; } TraceLog(3, (unsigned int)"AUTOMATION: Events loaded from file: %i", v19, v6, v7, v8); } else { TraceLog(3, (unsigned int)"AUTOMATION: New empty events list loaded successfully", v1, v2, v3, v4); } return v21; }
LoadAutomationEventList: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x158 MOV R14,RDI AND qword ptr [RSP],0x0 PUSH 0x18 POP RSI MOV EDI,0x4000 CALL 0x00109320 MOV qword ptr [RSP + 0x8],RAX MOV dword ptr [RSP],0x4000 TEST R14,R14 JZ 0x0016496d LEA RSI,[0x1c2f6b] MOV RDI,R14 CALL 0x00109620 TEST RAX,RAX JZ 0x00164983 MOV RBX,RAX LEA R14,[RSP + 0x50] MOV EDX,0x100 MOV RDI,R14 XOR ESI,ESI CALL 0x001092c0 XORPS XMM0,XMM0 LEA R15,[RSP + 0x10] MOVAPS xmmword ptr [R15 + 0x30],XMM0 MOVAPS xmmword ptr [R15 + 0x20],XMM0 MOVAPS xmmword ptr [R15 + 0x10],XMM0 MOVAPS xmmword ptr [R15],XMM0 MOV RDI,R14 MOV ESI,0x100 MOV RDX,RBX CALL 0x001098b0 LEA R12,[0x1c653a] LEA R13,[0x1c6535] XOR EBP,EBP LAB_00164896: MOV RDI,RBX CALL 0x00109870 TEST EAX,EAX JNZ 0x0016492f MOVZX EAX,byte ptr [RSP + 0x50] CMP EAX,0x65 JZ 0x001648c9 CMP EAX,0x63 JNZ 0x0016491a MOV RDI,R14 MOV RSI,R13 LEA RDX,[RSP + 0x4] XOR EAX,EAX CALL 0x001094f0 JMP 0x0016491a LAB_001648c9: MOV RAX,qword ptr [RSP + 0x8] MOV ECX,EBP IMUL RSI,RCX,0x18 LEA RDX,[RAX + RSI*0x1] LEA RCX,[RAX + RSI*0x1] ADD RCX,0x4 LEA R8,[RAX + RSI*0x1 + 0x8] LEA R9,[RAX + RSI*0x1] ADD R9,0xc LEA R10,[RAX + RSI*0x1] ADD R10,0x10 LEA R11,[RAX + RSI*0x1] ADD R11,0x14 SUB RSP,0x8 MOV RDI,R14 MOV RSI,R12 XOR EAX,EAX PUSH R15 PUSH R11 PUSH R10 CALL 0x001094f0 ADD RSP,0x20 INC EBP LAB_0016491a: MOV RDI,R14 MOV ESI,0x100 MOV RDX,RBX CALL 0x001098b0 JMP 0x00164896 LAB_0016492f: MOV ECX,dword ptr [RSP + 0x4] CMP EBP,ECX JZ 0x0016494e LEA RSI,[0x1c6555] PUSH 0x4 POP RDI MOV EDX,EBP XOR EAX,EAX CALL 0x001a128b MOV dword ptr [RSP + 0x4],EBP LAB_0016494e: MOV RDI,RBX CALL 0x00109510 LEA RSI,[0x1c65a3] PUSH 0x3 POP RDI XOR EAX,EAX CALL 0x001a128b MOV EDX,dword ptr [RSP + 0x4] JMP 0x00164985 LAB_0016496d: MOV RBX,RAX LEA RSI,[0x1c64ff] PUSH 0x3 POP RDI XOR EAX,EAX CALL 0x001a128b JMP 0x0016499b LAB_00164983: XOR EDX,EDX LAB_00164985: LEA RSI,[0x1c65cf] PUSH 0x3 POP RDI XOR EAX,EAX CALL 0x001a128b MOV RBX,qword ptr [RSP + 0x8] LAB_0016499b: MOV RAX,qword ptr [RSP] MOV RDX,RBX ADD RSP,0x158 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] LoadAutomationEventList(char *param_1) { int iVar1; void *pvVar2; FILE *__stream; int4 uVar3; int iVar4; ulong uVar5; long lVar6; int1 auVar7 [16]; int8 local_188; void *local_180; int8 local_178; int8 uStack_170; int8 local_168; int8 uStack_160; int8 local_158; int8 uStack_150; int8 local_148; int8 uStack_140; char local_138 [264]; local_188 = 0; pvVar2 = calloc(0x4000,0x18); local_188 = CONCAT44(local_188._4_4_,0x4000); local_180 = pvVar2; if (param_1 == (char *)0x0) { TraceLog(3,"AUTOMATION: New empty events list loaded successfully"); } else { __stream = fopen(param_1,"rt"); if (__stream == (FILE *)0x0) { uVar3 = 0; } else { memset(local_138,0,0x100); local_148 = 0; uStack_140 = 0; local_158 = 0; uStack_150 = 0; local_168 = 0; uStack_160 = 0; local_178 = 0; uStack_170 = 0; fgets(local_138,0x100,__stream); uVar5 = 0; while( true ) { iVar1 = feof(__stream); iVar4 = (int)uVar5; if (iVar1 != 0) break; if (local_138[0] == 'e') { lVar6 = uVar5 * 0x18; __isoc99_sscanf(local_138,"e %d %d %d %d %d %d %[^\n]s",(void *)((long)local_180 + lVar6), (long)local_180 + lVar6 + 4,(long)local_180 + lVar6 + 8, (long)local_180 + lVar6 + 0xc,(long)local_180 + lVar6 + 0x10, (long)local_180 + lVar6 + 0x14,&local_178); uVar5 = (ulong)(iVar4 + 1); } else if (local_138[0] == 'c') { __isoc99_sscanf(local_138,&DAT_001c6535,(long)&local_188 + 4); } fgets(local_138,0x100,__stream); } if (iVar4 != local_188._4_4_) { TraceLog(4,"AUTOMATION: Events read from file [%i] do not mach event count specified [%i]", uVar5); local_188 = CONCAT44(iVar4,(int4)local_188); } fclose(__stream); TraceLog(3,"AUTOMATION: Events file loaded successfully"); uVar3 = local_188._4_4_; } TraceLog(3,"AUTOMATION: Events loaded from file: %i",uVar3); pvVar2 = local_180; } auVar7._8_8_ = pvVar2; auVar7._0_8_ = local_188; return auVar7; }
36,731
inline_mysql_file_sync
eloqsql/include/mysql/psi/mysql_file.h
static inline int inline_mysql_file_sync( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File fd, myf flags) { int result= 0; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, fd, PSI_FILE_SYNC); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); result= my_sync(fd, flags); PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); return result; } #endif result= my_sync(fd, flags); return result; }
O0
c
inline_mysql_file_sync: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl $0x0, -0x24(%rbp) leaq 0x266f31(%rip), %rax # 0x2c00b8 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x78(%rbp), %rdi movl $0x10, %edx callq *%rax movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%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 0x59215 leaq 0x266eee(%rip), %rax # 0x2c00b8 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x30(%rbp), %rdi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx xorl %esi, %esi callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi callq 0xf5af0 movl %eax, -0x24(%rbp) leaq 0x266ebf(%rip), %rax # 0x2c00b8 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x30(%rbp), %rdi xorl %ecx, %ecx movl %ecx, %esi callq *%rax movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x5922a movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi callq 0xf5af0 movl %eax, -0x24(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_file_sync_3: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_24], 0 lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_78] mov edx, 10h call rax mov [rbp+var_30], rax cmp [rbp+var_30], 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_59215 lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_30] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] xor esi, esi call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] call my_sync mov [rbp+var_24], eax lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_30] xor ecx, ecx mov esi, ecx call rax mov eax, [rbp+var_24] mov [rbp+var_4], eax jmp short loc_5922A loc_59215: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] call my_sync mov [rbp+var_24], eax mov eax, [rbp+var_24] mov [rbp+var_4], eax loc_5922A: mov eax, [rbp+var_4] add rsp, 80h pop rbp retn
long long inline_mysql_file_sync_3(long long a1, unsigned int a2, unsigned int a3, long long a4) { _BYTE v5[72]; // [rsp+8h] [rbp-78h] BYREF long long v6; // [rsp+50h] [rbp-30h] unsigned int v7; // [rsp+5Ch] [rbp-24h] long long v8; // [rsp+60h] [rbp-20h] unsigned int v9; // [rsp+68h] [rbp-18h] unsigned int v10; // [rsp+6Ch] [rbp-14h] long long v11; // [rsp+70h] [rbp-10h] v11 = a1; v10 = a2; v9 = a3; v8 = a4; v7 = 0; v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v5, a3, 16LL); if ( v6 ) { ((void ( *)(long long, _QWORD, long long, _QWORD))PSI_server[66])(v6, 0LL, v11, v10); v7 = my_sync(v9, v8); ((void ( *)(long long, _QWORD))PSI_server[67])(v6, 0LL); } else { return (unsigned int)my_sync(v9, v8); } return v7; }
inline_mysql_file_sync: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],0x0 LEA RAX,[0x3c00b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x78] MOV EDX,0x10 CALL RAX MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],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 0x00159215 LEA RAX,[0x3c00b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] XOR ESI,ESI CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001f5af0 MOV dword ptr [RBP + -0x24],EAX LEA RAX,[0x3c00b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x30] XOR ECX,ECX MOV ESI,ECX CALL RAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX JMP 0x0015922a LAB_00159215: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001f5af0 MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX LAB_0015922a: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x80 POP RBP RET
int4 inline_mysql_file_sync(int8 param_1,int4 param_2,int4 param_3,int8 param_4) { int1 local_80 [72]; long local_38; int4 local_2c; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; int4 local_c; local_2c = 0; local_28 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; local_38 = (**(code **)(PSI_server + 0x158))(local_80,param_3,0x10); if (local_38 == 0) { local_c = my_sync(local_20,local_28); } else { (**(code **)(PSI_server + 0x210))(local_38,0,local_18,local_1c); local_2c = my_sync(local_20,local_28); (**(code **)(PSI_server + 0x218))(local_38,0); local_c = local_2c; } return local_c; }
36,732
mi_check_index_tuple
eloqsql/storage/myisam/mi_key.c
check_result_t mi_check_index_tuple(MI_INFO *info, uint keynr, uchar *record) { int need_unpack= TRUE; check_result_t res= CHECK_POS; if (info->index_cond_func) { if (mi_unpack_index_tuple(info, keynr, record)) res= CHECK_ERROR; else if ((res= info->index_cond_func(info->index_cond_func_arg)) == CHECK_OUT_OF_RANGE) { /* We got beyond the end of scanned range */ info->lastpos= HA_OFFSET_ERROR; /* No active record */ my_errno= HA_ERR_END_OF_FILE; } /* If we got an error, out-of-range condition, or ICP condition computed to FALSE - we don't need to check the Rowid Filter. */ if (res != CHECK_POS) return res; need_unpack= FALSE; } /* Check the Rowid Filter, if present */ if (mi_check_rowid_filter_is_active(info)) { /* Unpack the index tuple if we haven't done it already */ if (need_unpack && mi_unpack_index_tuple(info, keynr, record)) res= CHECK_ERROR; else { if ((res= info->rowid_filter_func(info->rowid_filter_func_arg)) == CHECK_OUT_OF_RANGE) { /* We got beyond the end of scanned range */ info->lastpos= HA_OFFSET_ERROR; /* No active record */ my_errno= HA_ERR_END_OF_FILE; } } } return res; }
O0
c
mi_check_index_tuple: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movl $0x1, -0x24(%rbp) movl $0x1, -0x28(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x340(%rax) je 0xaf86e movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi movq -0x20(%rbp), %rdx callq 0xaf8f0 cmpl $0x0, %eax je 0xaf81d movl $0xffffffff, -0x28(%rbp) # imm = 0xFFFFFFFF jmp 0xaf859 movq -0x10(%rbp), %rax movq 0x340(%rax), %rax movq -0x10(%rbp), %rcx movq 0x348(%rcx), %rdi callq *%rax movl %eax, -0x28(%rbp) cmpl $0x2, %eax jne 0xaf857 movq -0x10(%rbp), %rax movq $-0x1, 0x170(%rax) callq 0xf6060 movl $0x89, (%rax) jmp 0xaf859 cmpl $0x1, -0x28(%rbp) je 0xaf867 movl -0x28(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xaf8e4 movl $0x0, -0x24(%rbp) movq -0x10(%rbp), %rdi callq 0xaf970 cmpl $0x0, %eax je 0xaf8de cmpl $0x0, -0x24(%rbp) je 0xaf8a0 movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi movq -0x20(%rbp), %rdx callq 0xaf8f0 cmpl $0x0, %eax je 0xaf8a0 movl $0xffffffff, -0x28(%rbp) # imm = 0xFFFFFFFF jmp 0xaf8dc movq -0x10(%rbp), %rax movq 0x350(%rax), %rax movq -0x10(%rbp), %rcx movq 0x360(%rcx), %rdi callq *%rax movl %eax, -0x28(%rbp) cmpl $0x2, %eax jne 0xaf8da movq -0x10(%rbp), %rax movq $-0x1, 0x170(%rax) callq 0xf6060 movl $0x89, (%rax) jmp 0xaf8dc jmp 0xaf8de movl -0x28(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
mi_check_index_tuple: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_24], 1 mov [rbp+var_28], 1 mov rax, [rbp+var_10] cmp qword ptr [rax+340h], 0 jz short loc_AF86E mov rdi, [rbp+var_10] mov esi, [rbp+var_14] mov rdx, [rbp+var_20] call mi_unpack_index_tuple cmp eax, 0 jz short loc_AF81D mov [rbp+var_28], 0FFFFFFFFh jmp short loc_AF859 loc_AF81D: mov rax, [rbp+var_10] mov rax, [rax+340h] mov rcx, [rbp+var_10] mov rdi, [rcx+348h] call rax mov [rbp+var_28], eax cmp eax, 2 jnz short loc_AF857 mov rax, [rbp+var_10] mov qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh call _my_thread_var mov dword ptr [rax], 89h loc_AF857: jmp short $+2 loc_AF859: cmp [rbp+var_28], 1 jz short loc_AF867 mov eax, [rbp+var_28] mov [rbp+var_4], eax jmp short loc_AF8E4 loc_AF867: mov [rbp+var_24], 0 loc_AF86E: mov rdi, [rbp+var_10] call mi_check_rowid_filter_is_active cmp eax, 0 jz short loc_AF8DE cmp [rbp+var_24], 0 jz short loc_AF8A0 mov rdi, [rbp+var_10] mov esi, [rbp+var_14] mov rdx, [rbp+var_20] call mi_unpack_index_tuple cmp eax, 0 jz short loc_AF8A0 mov [rbp+var_28], 0FFFFFFFFh jmp short loc_AF8DC loc_AF8A0: mov rax, [rbp+var_10] mov rax, [rax+350h] mov rcx, [rbp+var_10] mov rdi, [rcx+360h] call rax mov [rbp+var_28], eax cmp eax, 2 jnz short loc_AF8DA mov rax, [rbp+var_10] mov qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh call _my_thread_var mov dword ptr [rax], 89h loc_AF8DA: jmp short $+2 loc_AF8DC: jmp short $+2 loc_AF8DE: mov eax, [rbp+var_28] mov [rbp+var_4], eax loc_AF8E4: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long mi_check_index_tuple(long long a1, const char *a2, long long a3) { long long v3; // rdi long long v4; // rdi unsigned int v6; // [rsp+8h] [rbp-28h] int v7; // [rsp+Ch] [rbp-24h] v7 = 1; v6 = 1; if ( *(_QWORD *)(a1 + 832) ) { a2 = (const char *)(unsigned int)a2; if ( (unsigned int)mi_unpack_index_tuple(a1, (unsigned int)a2, a3) ) { v6 = -1; } else { v3 = *(_QWORD *)(a1 + 840); v6 = (*(long long ( **)(long long))(a1 + 832))(v3); if ( v6 == 2 ) { *(_QWORD *)(a1 + 368) = -1LL; *(_DWORD *)my_thread_var(v3, (const char *)(unsigned int)a2) = 137; } } if ( v6 != 1 ) return v6; v7 = 0; } if ( (unsigned int)mi_check_rowid_filter_is_active(a1) ) { if ( v7 && (a2 = (const char *)(unsigned int)a2, (unsigned int)mi_unpack_index_tuple(a1, (unsigned int)a2, a3)) ) { return (unsigned int)-1; } else { v4 = *(_QWORD *)(a1 + 864); v6 = (*(long long ( **)(long long))(a1 + 848))(v4); if ( v6 == 2 ) { *(_QWORD *)(a1 + 368) = -1LL; *(_DWORD *)my_thread_var(v4, a2) = 137; } } } return v6; }
mi_check_index_tuple: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],0x1 MOV dword ptr [RBP + -0x28],0x1 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x340],0x0 JZ 0x001af86e MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001af8f0 CMP EAX,0x0 JZ 0x001af81d MOV dword ptr [RBP + -0x28],0xffffffff JMP 0x001af859 LAB_001af81d: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x340] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x348] CALL RAX MOV dword ptr [RBP + -0x28],EAX CMP EAX,0x2 JNZ 0x001af857 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x170],-0x1 CALL 0x001f6060 MOV dword ptr [RAX],0x89 LAB_001af857: JMP 0x001af859 LAB_001af859: CMP dword ptr [RBP + -0x28],0x1 JZ 0x001af867 MOV EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x4],EAX JMP 0x001af8e4 LAB_001af867: MOV dword ptr [RBP + -0x24],0x0 LAB_001af86e: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001af970 CMP EAX,0x0 JZ 0x001af8de CMP dword ptr [RBP + -0x24],0x0 JZ 0x001af8a0 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001af8f0 CMP EAX,0x0 JZ 0x001af8a0 MOV dword ptr [RBP + -0x28],0xffffffff JMP 0x001af8dc LAB_001af8a0: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x350] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x360] CALL RAX MOV dword ptr [RBP + -0x28],EAX CMP EAX,0x2 JNZ 0x001af8da MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x170],-0x1 CALL 0x001f6060 MOV dword ptr [RAX],0x89 LAB_001af8da: JMP 0x001af8dc LAB_001af8dc: JMP 0x001af8de LAB_001af8de: MOV EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x4],EAX LAB_001af8e4: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int mi_check_index_tuple(long param_1,int4 param_2,int8 param_3) { bool bVar1; int iVar2; int4 *puVar3; int local_30; bVar1 = true; local_30 = 1; if (*(long *)(param_1 + 0x340) != 0) { iVar2 = mi_unpack_index_tuple(param_1,param_2,param_3); if (iVar2 == 0) { local_30 = (**(code **)(param_1 + 0x340))(*(int8 *)(param_1 + 0x348)); if (local_30 == 2) { *(int8 *)(param_1 + 0x170) = 0xffffffffffffffff; puVar3 = (int4 *)_my_thread_var(); *puVar3 = 0x89; } } else { local_30 = -1; } if (local_30 != 1) { return local_30; } bVar1 = false; } iVar2 = mi_check_rowid_filter_is_active(param_1); if (iVar2 != 0) { if ((bVar1) && (iVar2 = mi_unpack_index_tuple(param_1,param_2,param_3), iVar2 != 0)) { local_30 = -1; } else { local_30 = (**(code **)(param_1 + 0x350))(*(int8 *)(param_1 + 0x360)); if (local_30 == 2) { *(int8 *)(param_1 + 0x170) = 0xffffffffffffffff; puVar3 = (int4 *)_my_thread_var(); *puVar3 = 0x89; } } } return local_30; }
36,733
glfwInitVulkan
untodesu[P]riteg/build_O0/_deps/glfw-src/src/vulkan.c
GLFWbool _glfwInitVulkan(int mode) { VkResult err; VkExtensionProperties* ep; uint32_t i, count; if (_glfw.vk.available) return GLFW_TRUE; #if !defined(_GLFW_VULKAN_STATIC) #if defined(_GLFW_VULKAN_LIBRARY) _glfw.vk.handle = _glfw_dlopen(_GLFW_VULKAN_LIBRARY); #elif defined(_GLFW_WIN32) _glfw.vk.handle = _glfw_dlopen("vulkan-1.dll"); #elif defined(_GLFW_COCOA) _glfw.vk.handle = _glfw_dlopen("libvulkan.1.dylib"); #else _glfw.vk.handle = _glfw_dlopen("libvulkan.so.1"); #endif if (!_glfw.vk.handle) { if (mode == _GLFW_REQUIRE_LOADER) _glfwInputError(GLFW_API_UNAVAILABLE, "Vulkan: Loader not found"); return GLFW_FALSE; } _glfw.vk.GetInstanceProcAddr = (PFN_vkGetInstanceProcAddr) _glfw_dlsym(_glfw.vk.handle, "vkGetInstanceProcAddr"); if (!_glfw.vk.GetInstanceProcAddr) { _glfwInputError(GLFW_API_UNAVAILABLE, "Vulkan: Loader does not export vkGetInstanceProcAddr"); _glfwTerminateVulkan(); return GLFW_FALSE; } _glfw.vk.EnumerateInstanceExtensionProperties = (PFN_vkEnumerateInstanceExtensionProperties) vkGetInstanceProcAddr(NULL, "vkEnumerateInstanceExtensionProperties"); if (!_glfw.vk.EnumerateInstanceExtensionProperties) { _glfwInputError(GLFW_API_UNAVAILABLE, "Vulkan: Failed to retrieve vkEnumerateInstanceExtensionProperties"); _glfwTerminateVulkan(); return GLFW_FALSE; } #endif // _GLFW_VULKAN_STATIC err = vkEnumerateInstanceExtensionProperties(NULL, &count, NULL); if (err) { // NOTE: This happens on systems with a loader but without any Vulkan ICD if (mode == _GLFW_REQUIRE_LOADER) { _glfwInputError(GLFW_API_UNAVAILABLE, "Vulkan: Failed to query instance extension count: %s", _glfwGetVulkanResultString(err)); } _glfwTerminateVulkan(); return GLFW_FALSE; } ep = calloc(count, sizeof(VkExtensionProperties)); err = vkEnumerateInstanceExtensionProperties(NULL, &count, ep); if (err) { _glfwInputError(GLFW_API_UNAVAILABLE, "Vulkan: Failed to query instance extensions: %s", _glfwGetVulkanResultString(err)); free(ep); _glfwTerminateVulkan(); return GLFW_FALSE; } for (i = 0; i < count; i++) { if (strcmp(ep[i].extensionName, "VK_KHR_surface") == 0) _glfw.vk.KHR_surface = GLFW_TRUE; #if defined(_GLFW_WIN32) else if (strcmp(ep[i].extensionName, "VK_KHR_win32_surface") == 0) _glfw.vk.KHR_win32_surface = GLFW_TRUE; #elif defined(_GLFW_COCOA) else if (strcmp(ep[i].extensionName, "VK_MVK_macos_surface") == 0) _glfw.vk.MVK_macos_surface = GLFW_TRUE; #elif defined(_GLFW_X11) else if (strcmp(ep[i].extensionName, "VK_KHR_xlib_surface") == 0) _glfw.vk.KHR_xlib_surface = GLFW_TRUE; else if (strcmp(ep[i].extensionName, "VK_KHR_xcb_surface") == 0) _glfw.vk.KHR_xcb_surface = GLFW_TRUE; #elif defined(_GLFW_WAYLAND) else if (strcmp(ep[i].extensionName, "VK_KHR_wayland_surface") == 0) _glfw.vk.KHR_wayland_surface = GLFW_TRUE; #endif } free(ep); _glfw.vk.available = GLFW_TRUE; _glfwPlatformGetRequiredInstanceExtensions(_glfw.vk.extensions); return GLFW_TRUE; }
O0
c
glfwInitVulkan: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x8(%rbp) leaq 0xb9656(%rip), %rax # 0xe0c68 cmpl $0x0, 0x1fe70(%rax) je 0x27627 movl $0x1, -0x4(%rbp) jmp 0x278ff leaq 0x911fc(%rip), %rdi # 0xb882a movl $0x1, %esi callq 0xcc40 movq %rax, %rcx leaq 0xb9626(%rip), %rax # 0xe0c68 movq %rcx, 0x1fe78(%rax) leaq 0xb9618(%rip), %rax # 0xe0c68 cmpq $0x0, 0x1fe78(%rax) jne 0x2767f cmpl $0x2, -0x8(%rbp) jne 0x27673 movl $0x10006, %edi # imm = 0x10006 leaq 0x911cd(%rip), %rsi # 0xb8839 movb $0x0, %al callq 0x221a0 movl $0x0, -0x4(%rbp) jmp 0x278ff leaq 0xb95e2(%rip), %rax # 0xe0c68 movq 0x1fe78(%rax), %rdi leaq 0x911dd(%rip), %rsi # 0xb8871 callq 0xc8d0 movq %rax, %rcx leaq 0xb95c5(%rip), %rax # 0xe0c68 movq %rcx, 0x1fe98(%rax) leaq 0xb95b7(%rip), %rax # 0xe0c68 cmpq $0x0, 0x1fe98(%rax) jne 0x276df movl $0x10006, %edi # imm = 0x10006 leaq 0x9118b(%rip), %rsi # 0xb8852 movb $0x0, %al callq 0x221a0 callq 0x27910 movl $0x0, -0x4(%rbp) jmp 0x278ff xorl %eax, %eax movl %eax, %edi leaq 0x911b8(%rip), %rsi # 0xb88a2 leaq 0xb9577(%rip), %rax # 0xe0c68 callq *0x1fe98(%rax) movq %rax, %rcx leaq 0xb9567(%rip), %rax # 0xe0c68 movq %rcx, 0x1fe90(%rax) leaq 0xb9559(%rip), %rax # 0xe0c68 cmpq $0x0, 0x1fe90(%rax) jne 0x2773d movl $0x10006, %edi # imm = 0x10006 leaq 0x91162(%rip), %rsi # 0xb8887 movb $0x0, %al callq 0x221a0 callq 0x27910 movl $0x0, -0x4(%rbp) jmp 0x278ff xorl %eax, %eax movl %eax, %edx leaq -0x20(%rbp), %rsi leaq 0xb951c(%rip), %rax # 0xe0c68 movq %rdx, %rdi callq *0x1fe90(%rax) movl %eax, -0xc(%rbp) cmpl $0x0, -0xc(%rbp) je 0x27793 cmpl $0x2, -0x8(%rbp) jne 0x27782 movl -0xc(%rbp), %edi callq 0x27940 movq %rax, %rdx movl $0x10006, %edi # imm = 0x10006 leaq 0x9114e(%rip), %rsi # 0xb88c9 movb $0x0, %al callq 0x221a0 callq 0x27910 movl $0x0, -0x4(%rbp) jmp 0x278ff movl -0x20(%rbp), %eax movl %eax, %edi movl $0x104, %esi # imm = 0x104 callq 0xc5b0 movq %rax, -0x18(%rbp) leaq 0xb94bb(%rip), %rax # 0xe0c68 movq 0x1fe90(%rax), %rax movq -0x18(%rbp), %rdx xorl %ecx, %ecx movl %ecx, %edi leaq -0x20(%rbp), %rsi callq *%rax movl %eax, -0xc(%rbp) cmpl $0x0, -0xc(%rbp) je 0x27803 movl -0xc(%rbp), %edi callq 0x27940 movq %rax, %rdx movl $0x10006, %edi # imm = 0x10006 leaq 0x9111c(%rip), %rsi # 0xb88fe movb $0x0, %al callq 0x221a0 movq -0x18(%rbp), %rdi callq 0xcb20 callq 0x27910 movl $0x0, -0x4(%rbp) jmp 0x278ff movl $0x0, -0x1c(%rbp) movl -0x1c(%rbp), %eax cmpl -0x20(%rbp), %eax jae 0x278c7 movq -0x18(%rbp), %rdi movl -0x1c(%rbp), %eax imulq $0x104, %rax, %rax # imm = 0x104 addq %rax, %rdi leaq 0x91100(%rip), %rsi # 0xb892e callq 0xcc60 cmpl $0x0, %eax jne 0x2784b leaq 0xb9429(%rip), %rax # 0xe0c68 movl $0x1, 0x1fea0(%rax) jmp 0x278b7 movq -0x18(%rbp), %rdi movl -0x1c(%rbp), %eax imulq $0x104, %rax, %rax # imm = 0x104 addq %rax, %rdi leaq 0x910da(%rip), %rsi # 0xb893d callq 0xcc60 cmpl $0x0, %eax jne 0x27880 leaq 0xb93f4(%rip), %rax # 0xe0c68 movl $0x1, 0x1fea4(%rax) jmp 0x278b5 movq -0x18(%rbp), %rdi movl -0x1c(%rbp), %eax imulq $0x104, %rax, %rax # imm = 0x104 addq %rax, %rdi leaq 0x910b9(%rip), %rsi # 0xb8951 callq 0xcc60 cmpl $0x0, %eax jne 0x278b3 leaq 0xb93bf(%rip), %rax # 0xe0c68 movl $0x1, 0x1fea8(%rax) jmp 0x278b5 jmp 0x278b7 jmp 0x278b9 movl -0x1c(%rbp), %eax addl $0x1, %eax movl %eax, -0x1c(%rbp) jmp 0x2780a movq -0x18(%rbp), %rdi callq 0xcb20 leaq 0xb9391(%rip), %rax # 0xe0c68 movl $0x1, 0x1fe70(%rax) leaq 0xb9380(%rip), %rdi # 0xe0c68 addq $0x1fe70, %rdi # imm = 0x1FE70 addq $0x10, %rdi callq 0x355e0 movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
_glfwInitVulkan: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], edi lea rax, _glfw cmp dword ptr [rax+1FE70h], 0 jz short loc_27627 mov [rbp+var_4], 1 jmp loc_278FF loc_27627: lea rdi, aLibvulkanSo1; "libvulkan.so.1" mov esi, 1 call _dlopen mov rcx, rax lea rax, _glfw mov [rax+1FE78h], rcx lea rax, _glfw cmp qword ptr [rax+1FE78h], 0 jnz short loc_2767F cmp [rbp+var_8], 2 jnz short loc_27673 mov edi, 10006h lea rsi, aVulkanLoaderNo; "Vulkan: Loader not found" mov al, 0 call _glfwInputError loc_27673: mov [rbp+var_4], 0 jmp loc_278FF loc_2767F: lea rax, _glfw mov rdi, [rax+1FE78h] lea rsi, aVulkanLoaderDo+1Fh; "vkGetInstanceProcAddr" call _dlsym mov rcx, rax lea rax, _glfw mov [rax+1FE98h], rcx lea rax, _glfw cmp qword ptr [rax+1FE98h], 0 jnz short loc_276DF mov edi, 10006h lea rsi, aVulkanLoaderDo; "Vulkan: Loader does not export vkGetIns"... mov al, 0 call _glfwInputError call _glfwTerminateVulkan mov [rbp+var_4], 0 jmp loc_278FF loc_276DF: xor eax, eax mov edi, eax lea rsi, aVulkanFailedTo+1Bh; "vkEnumerateInstanceExtensionProperties" lea rax, _glfw call qword ptr [rax+1FE98h] mov rcx, rax lea rax, _glfw mov [rax+1FE90h], rcx lea rax, _glfw cmp qword ptr [rax+1FE90h], 0 jnz short loc_2773D mov edi, 10006h lea rsi, aVulkanFailedTo; "Vulkan: Failed to retrieve vkEnumerateI"... mov al, 0 call _glfwInputError call _glfwTerminateVulkan mov [rbp+var_4], 0 jmp loc_278FF loc_2773D: xor eax, eax mov edx, eax lea rsi, [rbp+var_20] lea rax, _glfw mov rdi, rdx call qword ptr [rax+1FE90h] mov [rbp+var_C], eax cmp [rbp+var_C], 0 jz short loc_27793 cmp [rbp+var_8], 2 jnz short loc_27782 mov edi, [rbp+var_C] call _glfwGetVulkanResultString mov rdx, rax mov edi, 10006h lea rsi, aVulkanFailedTo_0; "Vulkan: Failed to query instance extens"... mov al, 0 call _glfwInputError loc_27782: call _glfwTerminateVulkan mov [rbp+var_4], 0 jmp loc_278FF loc_27793: mov eax, [rbp+var_20] mov edi, eax mov esi, 104h call _calloc mov [rbp+var_18], rax lea rax, _glfw mov rax, [rax+1FE90h] mov rdx, [rbp+var_18] xor ecx, ecx mov edi, ecx lea rsi, [rbp+var_20] call rax mov [rbp+var_C], eax cmp [rbp+var_C], 0 jz short loc_27803 mov edi, [rbp+var_C] call _glfwGetVulkanResultString mov rdx, rax mov edi, 10006h lea rsi, aVulkanFailedTo_1; "Vulkan: Failed to query instance extens"... mov al, 0 call _glfwInputError mov rdi, [rbp+var_18] call _free call _glfwTerminateVulkan mov [rbp+var_4], 0 jmp loc_278FF loc_27803: mov [rbp+var_1C], 0 loc_2780A: mov eax, [rbp+var_1C] cmp eax, [rbp+var_20] jnb loc_278C7 mov rdi, [rbp+var_18] mov eax, [rbp+var_1C] imul rax, 104h add rdi, rax lea rsi, aVkKhrSurface; "VK_KHR_surface" call _strcmp cmp eax, 0 jnz short loc_2784B lea rax, _glfw mov dword ptr ds:loc_1FEA0[rax], 1 jmp short loc_278B7 loc_2784B: mov rdi, [rbp+var_18] mov eax, [rbp+var_1C] imul rax, 104h add rdi, rax lea rsi, aVkKhrXlibSurfa; "VK_KHR_xlib_surface" call _strcmp cmp eax, 0 jnz short loc_27880 lea rax, _glfw mov dword ptr [rax+1FEA4h], 1 jmp short loc_278B5 loc_27880: mov rdi, [rbp+var_18] mov eax, [rbp+var_1C] imul rax, 104h add rdi, rax lea rsi, aVkKhrXcbSurfac; "VK_KHR_xcb_surface" call _strcmp cmp eax, 0 jnz short loc_278B3 lea rax, _glfw mov dword ptr [rax+1FEA8h], 1 loc_278B3: jmp short $+2 loc_278B5: jmp short $+2 loc_278B7: jmp short $+2 loc_278B9: mov eax, [rbp+var_1C] add eax, 1 mov [rbp+var_1C], eax jmp loc_2780A loc_278C7: mov rdi, [rbp+var_18] call _free lea rax, _glfw mov dword ptr [rax+1FE70h], 1 lea rdi, _glfw add rdi, 1FE70h add rdi, 10h call _glfwPlatformGetRequiredInstanceExtensions mov [rbp+var_4], 1 loc_278FF: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long glfwInitVulkan(int a1) { const char *VulkanResultString; // rax const char *v2; // rax unsigned int v4; // [rsp+0h] [rbp-20h] BYREF unsigned int i; // [rsp+4h] [rbp-1Ch] long long v6; // [rsp+8h] [rbp-18h] unsigned int v7; // [rsp+14h] [rbp-Ch] int v8; // [rsp+18h] [rbp-8h] v8 = a1; if ( glfw[32668] ) { return 1; } else { *(_QWORD *)&glfw[32670] = dlopen("libvulkan.so.1", 1LL); if ( *(_QWORD *)&glfw[32670] ) { *(_QWORD *)&glfw[32678] = dlsym(*(_QWORD *)&glfw[32670], "vkGetInstanceProcAddr"); if ( *(_QWORD *)&glfw[32678] ) { *(_QWORD *)&glfw[32676] = (*(long long ( **)(_QWORD, char *))&glfw[32678])( 0LL, "vkEnumerateInstanceExtensionProperties"); if ( *(_QWORD *)&glfw[32676] ) { v7 = (*(long long ( **)(_QWORD, unsigned int *))&glfw[32676])(0LL, &v4); if ( v7 ) { if ( v8 == 2 ) { VulkanResultString = (const char *)glfwGetVulkanResultString(v7); glfwInputError( 0x10006u, (long long)"Vulkan: Failed to query instance extension count: %s", VulkanResultString); } glfwTerminateVulkan(); return 0; } else { v6 = calloc(v4, 260LL); v7 = (*(long long ( **)(_QWORD, unsigned int *, long long))&glfw[32676])(0LL, &v4, v6); if ( v7 ) { v2 = (const char *)glfwGetVulkanResultString(v7); glfwInputError(0x10006u, (long long)"Vulkan: Failed to query instance extensions: %s", v2); free(v6); glfwTerminateVulkan(); return 0; } else { for ( i = 0; i < v4; ++i ) { if ( !(unsigned int)strcmp(260LL * i + v6, "VK_KHR_surface") ) { *(_DWORD *)((char *)&loc_1FEA0 + (_QWORD)glfw) = 1; } else if ( !(unsigned int)strcmp(260LL * i + v6, "VK_KHR_xlib_surface") ) { glfw[32681] = 1; } else if ( !(unsigned int)strcmp(260LL * i + v6, "VK_KHR_xcb_surface") ) { glfw[32682] = 1; } } free(v6); glfw[32668] = 1; glfwPlatformGetRequiredInstanceExtensions(&glfw[32672]); return 1; } } } else { glfwInputError(0x10006u, (long long)"Vulkan: Failed to retrieve vkEnumerateInstanceExtensionProperties"); glfwTerminateVulkan(); return 0; } } else { glfwInputError(0x10006u, (long long)"Vulkan: Loader does not export vkGetInstanceProcAddr"); glfwTerminateVulkan(); return 0; } } else { if ( v8 == 2 ) glfwInputError(0x10006u, (long long)"Vulkan: Loader not found"); return 0; } } }
_glfwInitVulkan: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x8],EDI LEA RAX,[0x1e0c68] CMP dword ptr [RAX + 0x1fe70],0x0 JZ 0x00127627 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001278ff LAB_00127627: LEA RDI,[0x1b882a] MOV ESI,0x1 CALL 0x0010cc40 MOV RCX,RAX LEA RAX,[0x1e0c68] MOV qword ptr [RAX + 0x1fe78],RCX LEA RAX,[0x1e0c68] CMP qword ptr [RAX + 0x1fe78],0x0 JNZ 0x0012767f CMP dword ptr [RBP + -0x8],0x2 JNZ 0x00127673 MOV EDI,0x10006 LEA RSI,[0x1b8839] MOV AL,0x0 CALL 0x001221a0 LAB_00127673: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001278ff LAB_0012767f: LEA RAX,[0x1e0c68] MOV RDI,qword ptr [RAX + 0x1fe78] LEA RSI,[0x1b8871] CALL 0x0010c8d0 MOV RCX,RAX LEA RAX,[0x1e0c68] MOV qword ptr [RAX + 0x1fe98],RCX LEA RAX,[0x1e0c68] CMP qword ptr [RAX + 0x1fe98],0x0 JNZ 0x001276df MOV EDI,0x10006 LEA RSI,[0x1b8852] MOV AL,0x0 CALL 0x001221a0 CALL 0x00127910 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001278ff LAB_001276df: XOR EAX,EAX MOV EDI,EAX LEA RSI,[0x1b88a2] LEA RAX,[0x1e0c68] CALL qword ptr [RAX + 0x1fe98] MOV RCX,RAX LEA RAX,[0x1e0c68] MOV qword ptr [RAX + 0x1fe90],RCX LEA RAX,[0x1e0c68] CMP qword ptr [RAX + 0x1fe90],0x0 JNZ 0x0012773d MOV EDI,0x10006 LEA RSI,[0x1b8887] MOV AL,0x0 CALL 0x001221a0 CALL 0x00127910 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001278ff LAB_0012773d: XOR EAX,EAX MOV EDX,EAX LEA RSI,[RBP + -0x20] LEA RAX,[0x1e0c68] MOV RDI,RDX CALL qword ptr [RAX + 0x1fe90] MOV dword ptr [RBP + -0xc],EAX CMP dword ptr [RBP + -0xc],0x0 JZ 0x00127793 CMP dword ptr [RBP + -0x8],0x2 JNZ 0x00127782 MOV EDI,dword ptr [RBP + -0xc] CALL 0x00127940 MOV RDX,RAX MOV EDI,0x10006 LEA RSI,[0x1b88c9] MOV AL,0x0 CALL 0x001221a0 LAB_00127782: CALL 0x00127910 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001278ff LAB_00127793: MOV EAX,dword ptr [RBP + -0x20] MOV EDI,EAX MOV ESI,0x104 CALL 0x0010c5b0 MOV qword ptr [RBP + -0x18],RAX LEA RAX,[0x1e0c68] MOV RAX,qword ptr [RAX + 0x1fe90] MOV RDX,qword ptr [RBP + -0x18] XOR ECX,ECX MOV EDI,ECX LEA RSI,[RBP + -0x20] CALL RAX MOV dword ptr [RBP + -0xc],EAX CMP dword ptr [RBP + -0xc],0x0 JZ 0x00127803 MOV EDI,dword ptr [RBP + -0xc] CALL 0x00127940 MOV RDX,RAX MOV EDI,0x10006 LEA RSI,[0x1b88fe] MOV AL,0x0 CALL 0x001221a0 MOV RDI,qword ptr [RBP + -0x18] CALL 0x0010cb20 CALL 0x00127910 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001278ff LAB_00127803: MOV dword ptr [RBP + -0x1c],0x0 LAB_0012780a: MOV EAX,dword ptr [RBP + -0x1c] CMP EAX,dword ptr [RBP + -0x20] JNC 0x001278c7 MOV RDI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x1c] IMUL RAX,RAX,0x104 ADD RDI,RAX LEA RSI,[0x1b892e] CALL 0x0010cc60 CMP EAX,0x0 JNZ 0x0012784b LEA RAX,[0x1e0c68] MOV dword ptr [RAX + 0x1fea0],0x1 JMP 0x001278b7 LAB_0012784b: MOV RDI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x1c] IMUL RAX,RAX,0x104 ADD RDI,RAX LEA RSI,[0x1b893d] CALL 0x0010cc60 CMP EAX,0x0 JNZ 0x00127880 LEA RAX,[0x1e0c68] MOV dword ptr [RAX + 0x1fea4],0x1 JMP 0x001278b5 LAB_00127880: MOV RDI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x1c] IMUL RAX,RAX,0x104 ADD RDI,RAX LEA RSI,[0x1b8951] CALL 0x0010cc60 CMP EAX,0x0 JNZ 0x001278b3 LEA RAX,[0x1e0c68] MOV dword ptr [RAX + 0x1fea8],0x1 LAB_001278b3: JMP 0x001278b5 LAB_001278b5: JMP 0x001278b7 LAB_001278b7: JMP 0x001278b9 LAB_001278b9: MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX JMP 0x0012780a LAB_001278c7: MOV RDI,qword ptr [RBP + -0x18] CALL 0x0010cb20 LEA RAX,[0x1e0c68] MOV dword ptr [RAX + 0x1fe70],0x1 LEA RDI,[0x1e0c68] ADD RDI,0x1fe70 ADD RDI,0x10 CALL 0x001355e0 MOV dword ptr [RBP + -0x4],0x1 LAB_001278ff: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 _glfwInitVulkan(int param_1) { int iVar1; int8 uVar2; uint local_28; uint local_24; void *local_20; int local_14; int local_10; int4 local_c; if (DAT_00200ad8 == 0) { local_10 = param_1; DAT_00200ae0 = dlopen("libvulkan.so.1",1); if (DAT_00200ae0 == 0) { if (local_10 == 2) { _glfwInputError(0x10006,"Vulkan: Loader not found"); } local_c = 0; } else { DAT_00200b00 = (code *)dlsym(DAT_00200ae0,"vkGetInstanceProcAddr"); if (DAT_00200b00 == (code *)0x0) { _glfwInputError(0x10006,"Vulkan: Loader does not export vkGetInstanceProcAddr"); _glfwTerminateVulkan(); local_c = 0; } else { DAT_00200af8 = (code *)(*DAT_00200b00)(0,"vkEnumerateInstanceExtensionProperties"); if (DAT_00200af8 == (code *)0x0) { _glfwInputError(0x10006, "Vulkan: Failed to retrieve vkEnumerateInstanceExtensionProperties"); _glfwTerminateVulkan(); local_c = 0; } else { local_14 = (*DAT_00200af8)(0,&local_28); if (local_14 == 0) { local_20 = calloc((ulong)local_28,0x104); local_14 = (*DAT_00200af8)(0,&local_28,local_20); if (local_14 == 0) { local_14 = 0; for (local_24 = 0; local_24 < local_28; local_24 = local_24 + 1) { iVar1 = strcmp((char *)((long)local_20 + (ulong)local_24 * 0x104),"VK_KHR_surface"); if (iVar1 == 0) { DAT_00200b08 = 1; } else { iVar1 = strcmp((char *)((long)local_20 + (ulong)local_24 * 0x104), "VK_KHR_xlib_surface"); if (iVar1 == 0) { DAT_00200b0c = 1; } else { iVar1 = strcmp((char *)((long)local_20 + (ulong)local_24 * 0x104), "VK_KHR_xcb_surface"); if (iVar1 == 0) { DAT_00200b10 = 1; } } } } free(local_20); DAT_00200ad8 = 1; _glfwPlatformGetRequiredInstanceExtensions(&DAT_00200ae8); local_c = 1; } else { uVar2 = _glfwGetVulkanResultString(local_14); _glfwInputError(0x10006,"Vulkan: Failed to query instance extensions: %s",uVar2); free(local_20); _glfwTerminateVulkan(); local_c = 0; } } else { if (local_10 == 2) { uVar2 = _glfwGetVulkanResultString(local_14); _glfwInputError(0x10006,"Vulkan: Failed to query instance extension count: %s",uVar2); } _glfwTerminateVulkan(); local_c = 0; } } } } } else { local_c = 1; } return local_c; }
36,734
ma_once_end_block_record
eloqsql/storage/maria/ma_blockrec.c
my_bool _ma_once_end_block_record(MARIA_SHARE *share) { int res= _ma_bitmap_end(share); if (share->bitmap.file.file >= 0) { if (flush_pagecache_blocks(share->pagecache, &share->bitmap.file, share->deleting ? FLUSH_IGNORE_CHANGED : FLUSH_RELEASE)) res= 1; /* File must be synced as it is going out of the maria_open_list and so becoming unknown to Checkpoint. */ if (!share->s3_path) { if (share->now_transactional && mysql_file_sync(share->bitmap.file.file, MYF(MY_WME))) res= 1; if (mysql_file_close(share->bitmap.file.file, MYF(MY_WME))) res= 1; } /* Trivial assignment to guard against multiple invocations (May happen if file are closed but we want to keep the maria object around a bit longer) */ share->bitmap.file.file= -1; } if (share->id != 0) { /* We de-assign the id even though index has not been flushed, this is ok as close_lock serializes us with a Checkpoint looking at our share. */ translog_deassign_id_from_share(share); } return res; }
O0
c
ma_once_end_block_record: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x41a40 movsbl %al, %eax movl %eax, -0xc(%rbp) movq -0x8(%rbp), %rax cmpl $0x0, 0xa60(%rax) jl 0x74040 movq -0x8(%rbp), %rax movq 0x600(%rax), %rdi movq -0x8(%rbp), %rsi addq $0xa10, %rsi # imm = 0xA10 addq $0x40, %rsi movq -0x8(%rbp), %rax movsbl 0x7ea(%rax), %ecx movl $0x1, %edx movl $0x2, %eax cmpl $0x0, %ecx cmovnel %eax, %edx xorl %eax, %eax movl %eax, %r8d movq %r8, %rcx callq 0x2f7b0 cmpl $0x0, %eax je 0x73fba movl $0x1, -0xc(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x798(%rax) jne 0x74032 movq -0x8(%rbp), %rax movsbl 0x7e7(%rax), %eax cmpl $0x0, %eax je 0x74004 movq -0x8(%rbp), %rax movl 0xa60(%rax), %edx leaq 0xdea63(%rip), %rdi # 0x152a4c movl $0x1cd, %esi # imm = 0x1CD movl $0x10, %ecx callq 0x74070 cmpl $0x0, %eax je 0x74004 movl $0x1, -0xc(%rbp) movq -0x8(%rbp), %rax movl 0xa60(%rax), %edx leaq 0xdea37(%rip), %rdi # 0x152a4c movl $0x1cf, %esi # imm = 0x1CF movl $0x10, %ecx callq 0x74150 cmpl $0x0, %eax je 0x74030 movl $0x1, -0xc(%rbp) jmp 0x74032 movq -0x8(%rbp), %rax movl $0xffffffff, 0xa60(%rax) # imm = 0xFFFFFFFF movq -0x8(%rbp), %rax movzwl 0x620(%rax), %eax cmpl $0x0, %eax je 0x74059 movq -0x8(%rbp), %rdi callq 0x56e70 movl -0xc(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_once_end_block_record: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] call _ma_bitmap_end movsx eax, al mov [rbp+var_C], eax mov rax, [rbp+var_8] cmp dword ptr [rax+0A60h], 0 jl loc_74040 mov rax, [rbp+var_8] mov rdi, [rax+600h] mov rsi, [rbp+var_8] add rsi, 0A10h add rsi, 40h ; '@' mov rax, [rbp+var_8] movsx ecx, byte ptr [rax+7EAh] mov edx, 1 mov eax, 2 cmp ecx, 0 cmovnz edx, eax xor eax, eax mov r8d, eax mov rcx, r8 call flush_pagecache_blocks_with_filter cmp eax, 0 jz short loc_73FBA mov [rbp+var_C], 1 loc_73FBA: mov rax, [rbp+var_8] cmp qword ptr [rax+798h], 0 jnz short loc_74032 mov rax, [rbp+var_8] movsx eax, byte ptr [rax+7E7h] cmp eax, 0 jz short loc_74004 mov rax, [rbp+var_8] mov edx, [rax+0A60h] lea rdi, aWorkspaceLlm4b_18; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 1CDh mov ecx, 10h call inline_mysql_file_sync_4 cmp eax, 0 jz short loc_74004 mov [rbp+var_C], 1 loc_74004: mov rax, [rbp+var_8] mov edx, [rax+0A60h] lea rdi, aWorkspaceLlm4b_18; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 1CFh mov ecx, 10h call inline_mysql_file_close_4 cmp eax, 0 jz short loc_74030 mov [rbp+var_C], 1 loc_74030: jmp short $+2 loc_74032: mov rax, [rbp+var_8] mov dword ptr [rax+0A60h], 0FFFFFFFFh loc_74040: mov rax, [rbp+var_8] movzx eax, word ptr [rax+620h] cmp eax, 0 jz short loc_74059 mov rdi, [rbp+var_8] call translog_deassign_id_from_share loc_74059: mov eax, [rbp+var_C] add rsp, 10h pop rbp retn
long long ma_once_end_block_record(long long a1) { unsigned int v1; // edx unsigned int v3; // [rsp+4h] [rbp-Ch] v3 = ma_bitmap_end(a1); if ( *(int *)(a1 + 2656) >= 0 ) { v1 = 1; if ( *(_BYTE *)(a1 + 2026) ) v1 = 2; if ( (unsigned int)flush_pagecache_blocks_with_filter(*(_QWORD *)(a1 + 1536), a1 + 2640, v1, 0LL, 0LL) ) v3 = 1; if ( !*(_QWORD *)(a1 + 1944) ) { if ( *(_BYTE *)(a1 + 2023) && (unsigned int)inline_mysql_file_sync_4( "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_blockrec.c", 461LL, *(unsigned int *)(a1 + 2656), 16LL) ) { v3 = 1; } if ( (unsigned int)inline_mysql_file_close_4( "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_blockrec.c", 463LL, *(unsigned int *)(a1 + 2656), 16LL) ) v3 = 1; } *(_DWORD *)(a1 + 2656) = -1; } if ( *(_WORD *)(a1 + 1568) ) translog_deassign_id_from_share(a1); return v3; }
_ma_once_end_block_record: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x00141a40 MOVSX EAX,AL MOV dword ptr [RBP + -0xc],EAX MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0xa60],0x0 JL 0x00174040 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x600] MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0xa10 ADD RSI,0x40 MOV RAX,qword ptr [RBP + -0x8] MOVSX ECX,byte ptr [RAX + 0x7ea] MOV EDX,0x1 MOV EAX,0x2 CMP ECX,0x0 CMOVNZ EDX,EAX XOR EAX,EAX MOV R8D,EAX MOV RCX,R8 CALL 0x0012f7b0 CMP EAX,0x0 JZ 0x00173fba MOV dword ptr [RBP + -0xc],0x1 LAB_00173fba: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x798],0x0 JNZ 0x00174032 MOV RAX,qword ptr [RBP + -0x8] MOVSX EAX,byte ptr [RAX + 0x7e7] CMP EAX,0x0 JZ 0x00174004 MOV RAX,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RAX + 0xa60] LEA RDI,[0x252a4c] MOV ESI,0x1cd MOV ECX,0x10 CALL 0x00174070 CMP EAX,0x0 JZ 0x00174004 MOV dword ptr [RBP + -0xc],0x1 LAB_00174004: MOV RAX,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RAX + 0xa60] LEA RDI,[0x252a4c] MOV ESI,0x1cf MOV ECX,0x10 CALL 0x00174150 CMP EAX,0x0 JZ 0x00174030 MOV dword ptr [RBP + -0xc],0x1 LAB_00174030: JMP 0x00174032 LAB_00174032: MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0xa60],0xffffffff LAB_00174040: MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,word ptr [RAX + 0x620] CMP EAX,0x0 JZ 0x00174059 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00156e70 LAB_00174059: MOV EAX,dword ptr [RBP + -0xc] ADD RSP,0x10 POP RBP RET
int _ma_once_end_block_record(long param_1) { char cVar1; int iVar2; int8 uVar3; int local_14; cVar1 = _ma_bitmap_end(param_1); local_14 = (int)cVar1; if (-1 < *(int *)(param_1 + 0xa60)) { uVar3 = 1; if (*(char *)(param_1 + 0x7ea) != '\0') { uVar3 = 2; } iVar2 = flush_pagecache_blocks_with_filter (*(int8 *)(param_1 + 0x600),param_1 + 0xa50,uVar3,0); if (iVar2 != 0) { local_14 = 1; } if (*(long *)(param_1 + 0x798) == 0) { if ((*(char *)(param_1 + 0x7e7) != '\0') && (iVar2 = inline_mysql_file_sync ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_blockrec.c", 0x1cd,*(int4 *)(param_1 + 0xa60),0x10), iVar2 != 0)) { local_14 = 1; } iVar2 = inline_mysql_file_close ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_blockrec.c", 0x1cf,*(int4 *)(param_1 + 0xa60),0x10); if (iVar2 != 0) { local_14 = 1; } } *(int4 *)(param_1 + 0xa60) = 0xffffffff; } if (*(short *)(param_1 + 0x620) != 0) { translog_deassign_id_from_share(param_1); } return local_14; }
36,735
fold(std::vector<float, std::allocator<float>> const&, long, long, long, long, std::vector<float, std::allocator<float>>&)
monkey531[P]llama/examples/tts/tts.cpp
static void fold(const std::vector<float> & data, int64_t n_out, int64_t n_win, int64_t n_hop, int64_t n_pad, std::vector<float> & output) { int64_t output_height = n_out; int64_t kernel_w = n_win; int64_t stride_w = n_hop; int64_t width = n_out; output.resize(width, 0.0f); int64_t col_idx = 0; for (int64_t w_col = 0; w_col < width; ++w_col) { int64_t start = w_col * stride_w - n_pad; int64_t end = start + kernel_w; for (int64_t w_im = start; w_im < end; ++w_im) { if (w_im >= 0 && w_im < output_height && col_idx < (int64_t) data.size()) { output[w_im] += data[col_idx]; } col_idx++; } } output.resize(n_out - 2 * n_pad); }
O1
cpp
fold(std::vector<float, std::allocator<float>> const&, long, long, long, long, std::vector<float, std::allocator<float>>&): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 leaq 0xc(%rsp), %rdx movl $0x0, (%rdx) movq %rbx, %rdi callq 0x3488a testq %r14, %r14 jle 0x23fb0 movq $-0x1e1, %rax # imm = 0xFE1F xorl %ecx, %ecx xorl %edx, %edx leaq (%rdx,%rdx,4), %rsi shlq $0x6, %rsi movq (%r15), %rdi movq 0x8(%r15), %r8 subq %rdi, %r8 sarq $0x2, %r8 movq (%rbx), %r9 addq $0x31f, %rsi # imm = 0x31F movq %rax, %r10 movq %r10, %r11 incq %r10 cmpq %r14, %r10 jae 0x23f9a cmpq %r8, %rcx jge 0x23f9a movss (%rdi,%rcx,4), %xmm0 addss 0x4(%r9,%r11,4), %xmm0 movss %xmm0, 0x4(%r9,%r11,4) incq %rcx cmpq %rsi, %r10 jl 0x23f77 incq %rdx addq $0x140, %rax # imm = 0x140 cmpq %r14, %rdx jne 0x23f54 addq $-0x3c0, %r14 # imm = 0xFC40 movq %rbx, %rdi movq %r14, %rsi callq 0x348be addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq
_ZL4foldRKSt6vectorIfSaIfEEllllRS1_: push r15 push r14 push rbx sub rsp, 10h mov rbx, rdx mov r14, rsi mov r15, rdi lea rdx, [rsp+28h+var_1C] mov dword ptr [rdx], 0 mov rdi, rbx call _ZNSt6vectorIfSaIfEE6resizeEmRKf; std::vector<float>::resize(ulong,float const&) test r14, r14 jle short loc_23FB0 mov rax, 0FFFFFFFFFFFFFE1Fh xor ecx, ecx xor edx, edx loc_23F54: lea rsi, [rdx+rdx*4] shl rsi, 6 mov rdi, [r15] mov r8, [r15+8] sub r8, rdi sar r8, 2 mov r9, [rbx] add rsi, 31Fh mov r10, rax loc_23F77: mov r11, r10 inc r10 cmp r10, r14 jnb short loc_23F9A cmp rcx, r8 jge short loc_23F9A movss xmm0, dword ptr [rdi+rcx*4] addss xmm0, dword ptr [r9+r11*4+4] movss dword ptr [r9+r11*4+4], xmm0 loc_23F9A: inc rcx cmp r10, rsi jl short loc_23F77 inc rdx add rax, 140h cmp rdx, r14 jnz short loc_23F54 loc_23FB0: add r14, 0FFFFFFFFFFFFFC40h mov rdi, rbx mov rsi, r14 call _ZNSt6vectorIfSaIfEE6resizeEm; std::vector<float>::resize(ulong) add rsp, 10h pop rbx pop r14 pop r15 retn
long long fold(long long *a1, long long a2, long long *a3) { long long v5; // rax long long v6; // rcx long long i; // rdx long long v8; // rdi long long v9; // r8 long long v10; // r9 long long v11; // r10 long long v12; // r11 _DWORD v14[7]; // [rsp+Ch] [rbp-1Ch] BYREF v14[0] = 0; std::vector<float>::resize(a3, a2, v14); if ( a2 > 0 ) { v5 = -481LL; v6 = 0LL; for ( i = 0LL; i != a2; ++i ) { v8 = *a1; v9 = (a1[1] - *a1) >> 2; v10 = *a3; v11 = v5; do { v12 = v11++; if ( v11 < (unsigned long long)a2 && v6 < v9 ) *(float *)(v10 + 4 * v12 + 4) = *(float *)(v8 + 4 * v6) + *(float *)(v10 + 4 * v12 + 4); ++v6; } while ( v11 < 320 * i + 799 ); v5 += 320LL; } } return std::vector<float>::resize(a3, a2 - 960); }
fold: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV RBX,RDX MOV R14,RSI MOV R15,RDI LEA RDX,[RSP + 0xc] MOV dword ptr [RDX],0x0 MOV RDI,RBX CALL 0x0013488a TEST R14,R14 JLE 0x00123fb0 MOV RAX,-0x1e1 XOR ECX,ECX XOR EDX,EDX LAB_00123f54: LEA RSI,[RDX + RDX*0x4] SHL RSI,0x6 MOV RDI,qword ptr [R15] MOV R8,qword ptr [R15 + 0x8] SUB R8,RDI SAR R8,0x2 MOV R9,qword ptr [RBX] ADD RSI,0x31f MOV R10,RAX LAB_00123f77: MOV R11,R10 INC R10 CMP R10,R14 JNC 0x00123f9a CMP RCX,R8 JGE 0x00123f9a MOVSS XMM0,dword ptr [RDI + RCX*0x4] ADDSS XMM0,dword ptr [R9 + R11*0x4 + 0x4] MOVSS dword ptr [R9 + R11*0x4 + 0x4],XMM0 LAB_00123f9a: INC RCX CMP R10,RSI JL 0x00123f77 INC RDX ADD RAX,0x140 CMP RDX,R14 JNZ 0x00123f54 LAB_00123fb0: ADD R14,-0x3c0 MOV RDI,RBX MOV RSI,R14 CALL 0x001348be ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* fold(std::vector<float, std::allocator<float> > const&, long, long, long, long, std::vector<float, std::allocator<float> >&) */ void fold(vector *param_1,long param_2,long param_3,long param_4,long param_5,vector *param_6) { long lVar1; long lVar2; long lVar3; ulong uVar4; long lVar5; long lVar6; ulong uVar7; ulong uVar8; float local_1c; local_1c = 0.0; std::vector<float,std::allocator<float>>::resize ((vector<float,std::allocator<float>> *)param_3,param_2,&local_1c); if (0 < param_2) { uVar4 = 0xfffffffffffffe1f; lVar5 = 0; lVar6 = 0; do { lVar1 = *(long *)param_1; lVar2 = *(long *)(param_1 + 8); lVar3 = *(long *)param_3; uVar7 = uVar4; do { uVar8 = uVar7 + 1; if ((uVar8 < (ulong)param_2) && (lVar5 < lVar2 - lVar1 >> 2)) { *(float *)(lVar3 + 4 + uVar7 * 4) = *(float *)(lVar1 + lVar5 * 4) + *(float *)(lVar3 + 4 + uVar7 * 4); } lVar5 = lVar5 + 1; uVar7 = uVar8; } while ((long)uVar8 < lVar6 * 0x140 + 799); lVar6 = lVar6 + 1; uVar4 = uVar4 + 0x140; } while (lVar6 != param_2); } std::vector<float,std::allocator<float>>::resize ((vector<float,std::allocator<float>> *)param_3,param_2 - 0x3c0); return; }
36,736
fold(std::vector<float, std::allocator<float>> const&, long, long, long, long, std::vector<float, std::allocator<float>>&)
monkey531[P]llama/examples/tts/tts.cpp
static void fold(const std::vector<float> & data, int64_t n_out, int64_t n_win, int64_t n_hop, int64_t n_pad, std::vector<float> & output) { int64_t output_height = n_out; int64_t kernel_w = n_win; int64_t stride_w = n_hop; int64_t width = n_out; output.resize(width, 0.0f); int64_t col_idx = 0; for (int64_t w_col = 0; w_col < width; ++w_col) { int64_t start = w_col * stride_w - n_pad; int64_t end = start + kernel_w; for (int64_t w_im = start; w_im < end; ++w_im) { if (w_im >= 0 && w_im < output_height && col_idx < (int64_t) data.size()) { output[w_im] += data[col_idx]; } col_idx++; } } output.resize(n_out - 2 * n_pad); }
O2
cpp
fold(std::vector<float, std::allocator<float>> const&, long, long, long, long, std::vector<float, std::allocator<float>>&): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 leaq 0xc(%rsp), %rdx andl $0x0, (%rdx) movq %rbx, %rdi callq 0x37fb2 xorl %eax, %eax testq %r14, %r14 movl $0x0, %ecx cmovgq %r14, %rcx xorl %edx, %edx cmpq %rcx, %rax je 0x29941 imulq $0x140, %rax, %rsi # imm = 0x140 leaq -0x1e0(%rsi), %rdi addq $0x320, %rsi # imm = 0x320 movq (%r15), %r8 movq 0x8(%r15), %r9 subq %r8, %r9 sarq $0x2, %r9 movq (%rbx), %r10 cmpq %rsi, %rdi jge 0x2993c testq %rdi, %rdi js 0x29934 cmpq %r14, %rdi jge 0x29934 cmpq %r9, %rdx jge 0x29934 movss (%r8,%rdx,4), %xmm0 addss (%r10,%rdi,4), %xmm0 movss %xmm0, (%r10,%rdi,4) incq %rdx incq %rdi jmp 0x2990e incq %rax jmp 0x298e3 addq $-0x3c0, %r14 # imm = 0xFC40 movq %rbx, %rdi movq %r14, %rsi callq 0x37fe6 addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq nop
_ZL4foldRKSt6vectorIfSaIfEEllllRS1_: push r15 push r14 push rbx sub rsp, 10h mov rbx, rdx mov r14, rsi mov r15, rdi lea rdx, [rsp+28h+var_1C] and dword ptr [rdx], 0 mov rdi, rbx call _ZNSt6vectorIfSaIfEE6resizeEmRKf; std::vector<float>::resize(ulong,float const&) xor eax, eax test r14, r14 mov ecx, 0 cmovg rcx, r14 xor edx, edx loc_298E3: cmp rax, rcx jz short loc_29941 imul rsi, rax, 140h lea rdi, [rsi-1E0h] add rsi, 320h mov r8, [r15] mov r9, [r15+8] sub r9, r8 sar r9, 2 mov r10, [rbx] loc_2990E: cmp rdi, rsi jge short loc_2993C test rdi, rdi js short loc_29934 cmp rdi, r14 jge short loc_29934 cmp rdx, r9 jge short loc_29934 movss xmm0, dword ptr [r8+rdx*4] addss xmm0, dword ptr [r10+rdi*4] movss dword ptr [r10+rdi*4], xmm0 loc_29934: inc rdx inc rdi jmp short loc_2990E loc_2993C: inc rax jmp short loc_298E3 loc_29941: add r14, 0FFFFFFFFFFFFFC40h mov rdi, rbx mov rsi, r14 call _ZNSt6vectorIfSaIfEE6resizeEm; std::vector<float>::resize(ulong) add rsp, 10h pop rbx pop r14 pop r15 retn
long long fold(long long *a1, long long a2, long long *a3) { long long v5; // rax long long v6; // rcx long long v7; // rdx long long v8; // rdi long long v9; // r8 long long v10; // r9 long long v11; // r10 _DWORD v13[7]; // [rsp+Ch] [rbp-1Ch] BYREF v13[0] = 0; std::vector<float>::resize(a3, a2, v13); v5 = 0LL; v6 = 0LL; if ( a2 > 0 ) v6 = a2; v7 = 0LL; while ( v5 != v6 ) { v8 = 320 * v5 - 480; v9 = *a1; v10 = (a1[1] - *a1) >> 2; v11 = *a3; while ( v8 < 320 * v5 + 800 ) { if ( v8 >= 0 && v8 < a2 && v7 < v10 ) *(float *)(v11 + 4 * v8) = *(float *)(v9 + 4 * v7) + *(float *)(v11 + 4 * v8); ++v7; ++v8; } ++v5; } return std::vector<float>::resize(a3, a2 - 960, v7); }
fold: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV RBX,RDX MOV R14,RSI MOV R15,RDI LEA RDX,[RSP + 0xc] AND dword ptr [RDX],0x0 MOV RDI,RBX CALL 0x00137fb2 XOR EAX,EAX TEST R14,R14 MOV ECX,0x0 CMOVG RCX,R14 XOR EDX,EDX LAB_001298e3: CMP RAX,RCX JZ 0x00129941 IMUL RSI,RAX,0x140 LEA RDI,[RSI + -0x1e0] ADD RSI,0x320 MOV R8,qword ptr [R15] MOV R9,qword ptr [R15 + 0x8] SUB R9,R8 SAR R9,0x2 MOV R10,qword ptr [RBX] LAB_0012990e: CMP RDI,RSI JGE 0x0012993c TEST RDI,RDI JS 0x00129934 CMP RDI,R14 JGE 0x00129934 CMP RDX,R9 JGE 0x00129934 MOVSS XMM0,dword ptr [R8 + RDX*0x4] ADDSS XMM0,dword ptr [R10 + RDI*0x4] MOVSS dword ptr [R10 + RDI*0x4],XMM0 LAB_00129934: INC RDX INC RDI JMP 0x0012990e LAB_0012993c: INC RAX JMP 0x001298e3 LAB_00129941: ADD R14,-0x3c0 MOV RDI,RBX MOV RSI,R14 CALL 0x00137fe6 ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* fold(std::vector<float, std::allocator<float> > const&, long, long, long, long, std::vector<float, std::allocator<float> >&) */ void fold(vector *param_1,long param_2,long param_3,long param_4,long param_5,vector *param_6) { long lVar1; long lVar2; long lVar3; long lVar4; long lVar5; long lVar6; long lVar7; float local_1c; local_1c = 0.0; std::vector<float,std::allocator<float>>::resize ((vector<float,std::allocator<float>> *)param_3,param_2,&local_1c); lVar4 = 0; lVar5 = 0; if (0 < param_2) { lVar5 = param_2; } lVar6 = 0; for (; lVar4 != lVar5; lVar4 = lVar4 + 1) { lVar1 = *(long *)param_1; lVar2 = *(long *)(param_1 + 8); lVar3 = *(long *)param_3; for (lVar7 = lVar4 * 0x140 + -0x1e0; lVar7 < lVar4 * 0x140 + 800; lVar7 = lVar7 + 1) { if (((-1 < lVar7) && (lVar7 < param_2)) && (lVar6 < lVar2 - lVar1 >> 2)) { *(float *)(lVar3 + lVar7 * 4) = *(float *)(lVar1 + lVar6 * 4) + *(float *)(lVar3 + lVar7 * 4); } lVar6 = lVar6 + 1; } } std::vector<float,std::allocator<float>>::resize ((vector<float,std::allocator<float>> *)param_3,param_2 - 0x3c0); return; }
36,737
multi_delete::do_deletes()
eloqsql/sql/sql_delete.cc
int multi_delete::do_deletes() { DBUG_ENTER("do_deletes"); DBUG_ASSERT(do_delete); do_delete= 0; // Mark called if (!found) DBUG_RETURN(0); table_being_deleted= (delete_while_scanning ? delete_tables->next_local : delete_tables); for (uint counter= 0; table_being_deleted; table_being_deleted= table_being_deleted->next_local, counter++) { TABLE *table = table_being_deleted->table; int local_error; if (unlikely(tempfiles[counter]->get(table))) DBUG_RETURN(1); local_error= do_table_deletes(table, &tempfiles[counter]->sort, thd->lex->ignore); if (unlikely(thd->killed) && likely(!local_error)) DBUG_RETURN(1); if (unlikely(local_error == -1)) // End of file local_error= 0; if (unlikely(local_error)) DBUG_RETURN(local_error); } DBUG_RETURN(0); }
O0
cpp
multi_delete::do_deletes(): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0xa85256 movq -0x30(%rbp), %rax movb $0x0, 0x58(%rax) cmpq $0x0, 0x48(%rax) jne 0xa85273 jmp 0xa85267 movl $0x0, -0x4(%rbp) jmp 0xa853b7 movq -0x30(%rbp), %rax testb $0x1, 0x5b(%rax) je 0xa8528e movq -0x30(%rbp), %rax movq 0x28(%rax), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) jmp 0xa8529a movq -0x30(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax movq -0x38(%rbp), %rcx movq %rcx, 0x30(%rax) movl $0x0, -0x14(%rbp) movq -0x30(%rbp), %rax cmpq $0x0, 0x30(%rax) je 0xa853ae movq -0x30(%rbp), %rax movq 0x30(%rax), %rcx movq 0x100(%rcx), %rcx movq %rcx, -0x20(%rbp) movq 0x38(%rax), %rax movl -0x14(%rbp), %ecx movq (%rax,%rcx,8), %rdi movq -0x20(%rbp), %rsi callq 0x6f4850 andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0xa852fb jmp 0xa852ef movl $0x1, -0x4(%rbp) jmp 0xa853b7 movq -0x30(%rbp), %rdi movq -0x20(%rbp), %rsi movq 0x38(%rdi), %rax movl -0x14(%rbp), %ecx movq (%rax,%rcx,8), %rdx addq $0x3f8, %rdx # imm = 0x3F8 movq 0x8(%rdi), %rax movq 0x58(%rax), %rax movl 0x17c6(%rax), %ecx shrl $0xc, %ecx andl $0x1, %ecx andl $0x1, %ecx callq 0xa853c0 movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, -0x24(%rbp) movq 0x8(%rax), %rax movl 0x3ebc(%rax), %eax cmpl $0x0, %eax je 0xa85367 cmpl $0x0, -0x24(%rbp) setne %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0xa85367 jmp 0xa8535e movl $0x1, -0x4(%rbp) jmp 0xa853b7 cmpl $-0x1, -0x24(%rbp) sete %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0xa8537f movl $0x0, -0x24(%rbp) cmpl $0x0, -0x24(%rbp) je 0xa8538f jmp 0xa85387 movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xa853b7 jmp 0xa85391 movq -0x30(%rbp), %rax movq 0x30(%rax), %rcx movq (%rcx), %rcx movq %rcx, 0x30(%rax) movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0xa852ad jmp 0xa853b0 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq
_ZN12multi_delete10do_deletesEv: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov [rbp+var_30], rax jmp short $+2 loc_A85256: mov rax, [rbp+var_30] mov byte ptr [rax+58h], 0 cmp qword ptr [rax+48h], 0 jnz short loc_A85273 jmp short $+2 loc_A85267: mov [rbp+var_4], 0 jmp loc_A853B7 loc_A85273: mov rax, [rbp+var_30] test byte ptr [rax+5Bh], 1 jz short loc_A8528E mov rax, [rbp+var_30] mov rax, [rax+28h] mov rax, [rax] mov [rbp+var_38], rax jmp short loc_A8529A loc_A8528E: mov rax, [rbp+var_30] mov rax, [rax+28h] mov [rbp+var_38], rax loc_A8529A: mov rax, [rbp+var_30] mov rcx, [rbp+var_38] mov [rax+30h], rcx mov [rbp+var_14], 0 loc_A852AD: mov rax, [rbp+var_30] cmp qword ptr [rax+30h], 0 jz loc_A853AE mov rax, [rbp+var_30] mov rcx, [rax+30h] mov rcx, [rcx+100h] mov [rbp+var_20], rcx mov rax, [rax+38h] mov ecx, [rbp+var_14] mov rdi, [rax+rcx*8]; this mov rsi, [rbp+var_20]; TABLE * call _ZN6Unique3getEP5TABLE; Unique::get(TABLE *) and al, 1 movzx eax, al cmp eax, 0 jz short loc_A852FB jmp short $+2 loc_A852EF: mov [rbp+var_4], 1 jmp loc_A853B7 loc_A852FB: mov rdi, [rbp+var_30]; this mov rsi, [rbp+var_20]; TABLE * mov rax, [rdi+38h] mov ecx, [rbp+var_14] mov rdx, [rax+rcx*8] add rdx, 3F8h; SORT_INFO * mov rax, [rdi+8] mov rax, [rax+58h] mov ecx, [rax+17C6h] shr ecx, 0Ch and ecx, 1 and ecx, 1; bool call _ZN12multi_delete16do_table_deletesEP5TABLEP9SORT_INFOb; multi_delete::do_table_deletes(TABLE *,SORT_INFO *,bool) mov ecx, eax mov rax, [rbp+var_30] mov [rbp+var_24], ecx mov rax, [rax+8] mov eax, [rax+3EBCh] cmp eax, 0 jz short loc_A85367 cmp [rbp+var_24], 0 setnz al xor al, 0FFh and al, 1 movzx eax, al cmp eax, 0 jz short loc_A85367 jmp short $+2 loc_A8535E: mov [rbp+var_4], 1 jmp short loc_A853B7 loc_A85367: cmp [rbp+var_24], 0FFFFFFFFh setz al and al, 1 movzx eax, al cmp eax, 0 jz short loc_A8537F mov [rbp+var_24], 0 loc_A8537F: cmp [rbp+var_24], 0 jz short loc_A8538F jmp short $+2 loc_A85387: mov eax, [rbp+var_24] mov [rbp+var_4], eax jmp short loc_A853B7 loc_A8538F: jmp short $+2 loc_A85391: mov rax, [rbp+var_30] mov rcx, [rax+30h] mov rcx, [rcx] mov [rax+30h], rcx mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax jmp loc_A852AD loc_A853AE: jmp short $+2 loc_A853B0: mov [rbp+var_4], 0 loc_A853B7: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long multi_delete::do_deletes(multi_delete *this) { long long v2; // [rsp+8h] [rbp-38h] unsigned int v3; // [rsp+1Ch] [rbp-24h] TABLE *v4; // [rsp+20h] [rbp-20h] unsigned int v5; // [rsp+2Ch] [rbp-14h] *((_BYTE *)this + 88) = 0; if ( *((_QWORD *)this + 9) ) { if ( (*((_BYTE *)this + 91) & 1) != 0 ) v2 = **((_QWORD **)this + 5); else v2 = *((_QWORD *)this + 5); *((_QWORD *)this + 6) = v2; v5 = 0; while ( *((_QWORD *)this + 6) ) { v4 = *(TABLE **)(*((_QWORD *)this + 6) + 256LL); if ( (Unique::get(*(Unique **)(*((_QWORD *)this + 7) + 8LL * v5), v4) & 1) != 0 ) return 1; v3 = multi_delete::do_table_deletes( this, v4, (SORT_INFO *)(*(_QWORD *)(*((_QWORD *)this + 7) + 8LL * v5) + 1016LL), (*(_DWORD *)(*(_QWORD *)(*((_QWORD *)this + 1) + 88LL) + 6086LL) & 0x1000) != 0); if ( *(_DWORD *)(*((_QWORD *)this + 1) + 16060LL) && !v3 ) return 1; if ( v3 == -1 ) v3 = 0; if ( v3 ) return v3; *((_QWORD *)this + 6) = **((_QWORD **)this + 6); ++v5; } return 0; } else { return 0; } }
~Create_func_geometry_from_wkb: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x00a4f3f0 ADD RSP,0x10 POP RBP RET
/* Create_func_geometry_from_wkb::~Create_func_geometry_from_wkb() */ void __thiscall Create_func_geometry_from_wkb::~Create_func_geometry_from_wkb(Create_func_geometry_from_wkb *this) { Create_native_func::~Create_native_func((Create_native_func *)this); return; }
36,738
my_charpos_mb
eloqsql/strings/ctype-mb.c
size_t my_charpos_mb(CHARSET_INFO *cs __attribute__((unused)), const char *pos, const char *end, size_t length) { const char *start= pos; while (length && pos < end) { uint mb_len; pos+= (mb_len= my_ismbchar(cs, pos, end)) ? mb_len : 1; length--; } return (size_t) (length ? end+2-start : pos-start); }
O3
c
my_charpos_mb: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r15 movq %rdx, %rbx testq %rcx, %rcx setne %cl sete %al cmpq %rdx, %rsi setae %dl orb %al, %dl movq %rsi, -0x30(%rbp) movq %rsi, %rax jne 0x35f3e movq %rdi, %r12 decq %r15 movl $0x1, %r14d movq -0x30(%rbp), %rax movq %rax, %r13 movq 0xb8(%r12), %rax movq %r12, %rdi movq %r13, %rsi movq %rbx, %rdx callq *0xc0(%rax) cmpl $0x2, %eax cmovbl %r14d, %eax cmovll %r14d, %eax addq %r13, %rax addq $-0x1, %r15 setb %cl jae 0x35f3e cmpq %rbx, %rax jb 0x35f08 addq $0x2, %rbx testb %cl, %cl cmoveq %rax, %rbx subq -0x30(%rbp), %rbx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_charpos_mb: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r15, rcx mov rbx, rdx test rcx, rcx setnz cl setz al cmp rsi, rdx setnb dl or dl, al mov [rbp+var_30], rsi mov rax, rsi jnz short loc_35F3E mov r12, rdi dec r15 mov r14d, 1 mov rax, [rbp+var_30] loc_35F08: mov r13, rax mov rax, [r12+0B8h] mov rdi, r12 mov rsi, r13 mov rdx, rbx call qword ptr [rax+0C0h] cmp eax, 2 cmovb eax, r14d cmovl eax, r14d add rax, r13 add r15, 0FFFFFFFFFFFFFFFFh setb cl jnb short loc_35F3E cmp rax, rbx jb short loc_35F08 loc_35F3E: add rbx, 2 test cl, cl cmovz rbx, rax sub rbx, [rbp+var_30] mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long my_charpos_mb(long long a1, unsigned long long a2, unsigned long long a3, long long a4) { long long v4; // r15 bool v6; // zf unsigned long long v7; // rax long long v8; // r15 unsigned long long v9; // r13 long long v10; // rax bool v11; // cc bool v12; // cf unsigned long long v13; // rbx v4 = a4; v6 = a4 == 0; LOBYTE(a4) = a4 != 0; v7 = a2; if ( !v6 && a2 < a3 ) { v8 = v4 - 1; v7 = a2; do { v9 = v7; v10 = (*(long long ( **)(long long, unsigned long long, unsigned long long, long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v7, a3, a4); v11 = (int)v10 < 2; if ( (unsigned int)v10 < 2 ) v10 = 1LL; if ( v11 ) v10 = 1LL; v7 = v9 + v10; v12 = v8-- != 0; LOBYTE(a4) = v12; } while ( v12 && v7 < a3 ); } v13 = a3 + 2; if ( !(_BYTE)a4 ) v13 = v7; return v13 - a2; }
my_charpos_mb: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,RCX MOV RBX,RDX TEST RCX,RCX SETNZ CL SETZ AL CMP RSI,RDX SETNC DL OR DL,AL MOV qword ptr [RBP + -0x30],RSI MOV RAX,RSI JNZ 0x00135f3e MOV R12,RDI DEC R15 MOV R14D,0x1 MOV RAX,qword ptr [RBP + -0x30] LAB_00135f08: MOV R13,RAX MOV RAX,qword ptr [R12 + 0xb8] MOV RDI,R12 MOV RSI,R13 MOV RDX,RBX CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 CMOVC EAX,R14D CMOVL EAX,R14D ADD RAX,R13 ADD R15,-0x1 SETC CL JNC 0x00135f3e CMP RAX,RBX JC 0x00135f08 LAB_00135f3e: ADD RBX,0x2 TEST CL,CL CMOVZ RBX,RAX SUB RBX,qword ptr [RBP + -0x30] MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_charpos_mb(long param_1,ulong param_2,ulong param_3,long param_4) { uint uVar1; ulong uVar2; ulong uVar3; bool bVar4; bVar4 = param_4 != 0; uVar3 = param_2; if (param_2 < param_3 && bVar4) { do { param_4 = param_4 + -1; uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,uVar3,param_3); uVar2 = (ulong)uVar1; if (uVar1 < 2) { uVar2 = 1; } if ((int)uVar1 < 2) { uVar2 = 1; } uVar3 = uVar2 + uVar3; bVar4 = param_4 != 0; } while ((bVar4) && (uVar3 < param_3)); } uVar2 = param_3 + 2; if (!bVar4) { uVar2 = uVar3; } return uVar2 - param_2; }
36,739
minja::Value::get(minja::Value const&)
monkey531[P]llama/common/minja.hpp
Value get(const Value& key) { if (array_) { if (!key.is_number_integer()) { return Value(); } auto index = key.get<int>(); return array_->at(index < 0 ? array_->size() + index : index); } else if (object_) { if (!key.is_hashable()) throw std::runtime_error("Unashable type: " + dump()); auto it = object_->find(key.primitive_); if (it == object_->end()) return Value(); return it->second; } return Value(); }
O2
cpp
minja::Value::get(minja::Value const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx cmpq $0x0, 0x10(%rsi) je 0x5dc78 movb 0x40(%r15), %al addb $-0x5, %al cmpb $0x2, %al jae 0x5dcab movq %r15, %rdi callq 0x5de7a movl %eax, %ecx movq 0x10(%r14), %rdi testl %eax, %eax js 0x5dcb5 movl %ecx, %esi jmp 0x5dcca cmpq $0x0, 0x20(%r14) je 0x5dcab movq %r15, %rdi callq 0x4dcb6 testb %al, %al je 0x5dce8 movq 0x20(%r14), %rdi addq $0x40, %r15 movq %r15, %rsi callq 0x5df30 movq 0x20(%r14), %rcx cmpq 0x8(%rcx), %rax je 0x5dcab addq $0x10, %rax jmp 0x5dccf movq %rbx, %rdi callq 0x518f4 jmp 0x5dcda movq 0x8(%rdi), %rax subq (%rdi), %rax pushq $0x50 popq %rsi cqto idivq %rsi movslq %ecx, %rsi addq %rax, %rsi callq 0x5dd7c movq %rbx, %rdi movq %rax, %rsi callq 0x5b468 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x223e0 movq %rax, %rbx leaq 0x8(%rsp), %rdi pushq $-0x1 popq %rdx movq %r14, %rsi xorl %ecx, %ecx callq 0x4dcc6 leaq 0x41943(%rip), %rsi # 0x9f64f leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x3a58f movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x22c80 xorl %ebp, %ebp movq 0x852bc(%rip), %rsi # 0xe2ff0 movq 0x8522d(%rip), %rdx # 0xe2f68 movq %rbx, %rdi callq 0x22d40 movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x22f98 jmp 0x5dd58 movq %rax, %r14 movb $0x1, %bpl leaq 0x8(%rsp), %rdi callq 0x22f98 testb %bpl, %bpl jne 0x5dd6c jmp 0x5dd74 movq %rax, %r14 movq %rbx, %rdi callq 0x225c0 movq %r14, %rdi callq 0x22da0
_ZN5minja5Value3getERKS0_: push rbp push r15 push r14 push rbx sub rsp, 48h mov r15, rdx mov r14, rsi mov rbx, rdi cmp qword ptr [rsi+10h], 0 jz short loc_5DC78 mov al, [r15+40h] add al, 0FBh cmp al, 2 jnb short loc_5DCAB mov rdi, r15 call _ZNK5minja5Value3getIiEET_v; minja::Value::get<int>(void) mov ecx, eax mov rdi, [r14+10h] test eax, eax js short loc_5DCB5 mov esi, ecx jmp short loc_5DCCA loc_5DC78: cmp qword ptr [r14+20h], 0 jz short loc_5DCAB mov rdi, r15; this call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void) test al, al jz short loc_5DCE8 mov rdi, [r14+20h] add r15, 40h ; '@' mov rsi, r15 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 rcx, [r14+20h] cmp rax, [rcx+8] jz short loc_5DCAB add rax, 10h jmp short loc_5DCCF loc_5DCAB: mov rdi, rbx; this call _ZN5minja5ValueC2Ev; minja::Value::Value(void) jmp short loc_5DCDA loc_5DCB5: mov rax, [rdi+8] sub rax, [rdi] push 50h ; 'P' pop rsi cqo idiv rsi movsxd rsi, ecx add rsi, rax loc_5DCCA: call _ZNSt6vectorIN5minja5ValueESaIS1_EE2atEm; std::vector<minja::Value>::at(ulong) loc_5DCCF: mov rdi, rbx; this mov rsi, rax; minja::Value * call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) loc_5DCDA: mov rax, rbx add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_5DCE8: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_60] push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r14 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUnashableType; "Unashable type: " lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_60] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_40] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+68h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_5DD58 mov r14, rax mov bpl, 1 loc_5DD58: lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_5DD6C jmp short loc_5DD74 mov r14, rax loc_5DD6C: mov rdi, rbx; void * call ___cxa_free_exception loc_5DD74: mov rdi, r14 call __Unwind_Resume
minja::Value * minja::Value::get(minja::Value *this, const minja::Value *a2, minja::Value *a3) { int v5; // ecx _QWORD *v6; // rdi long long v7; // rsi long long v8; // rax const minja::Value *v9; // rax void *exception; // rbx _BYTE v12[32]; // [rsp+8h] [rbp-60h] BYREF _BYTE v13[64]; // [rsp+28h] [rbp-40h] BYREF if ( *((_QWORD *)a2 + 2) ) { if ( (unsigned __int8)(*((_BYTE *)a3 + 64) - 5) < 2u ) { v5 = minja::Value::get<int>(a3); v6 = (_QWORD *)*((_QWORD *)a2 + 2); if ( v5 < 0 ) v7 = (v6[1] - *v6) / 80LL + v5; else v7 = (unsigned int)v5; v9 = (const minja::Value *)std::vector<minja::Value>::at(v6, v7); goto LABEL_12; } } else if ( *((_QWORD *)a2 + 4) ) { if ( !minja::Value::is_primitive(a3) ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v12, (long long)a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v13, (long long)"Unashable type: ", (long long)v12); std::runtime_error::runtime_error(exception, v13); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v8 = 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( *((_QWORD *)a2 + 4), (char *)a3 + 64); if ( v8 != *(_QWORD *)(*((_QWORD *)a2 + 4) + 8LL) ) { v9 = (const minja::Value *)(v8 + 16); LABEL_12: minja::Value::Value(this, v9); return this; } } minja::Value::Value(this); return this; }
get: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R15,RDX MOV R14,RSI MOV RBX,RDI CMP qword ptr [RSI + 0x10],0x0 JZ 0x0015dc78 MOV AL,byte ptr [R15 + 0x40] ADD AL,0xfb CMP AL,0x2 JNC 0x0015dcab MOV RDI,R15 CALL 0x0015de7a MOV ECX,EAX MOV RDI,qword ptr [R14 + 0x10] TEST EAX,EAX JS 0x0015dcb5 MOV ESI,ECX JMP 0x0015dcca LAB_0015dc78: CMP qword ptr [R14 + 0x20],0x0 JZ 0x0015dcab MOV RDI,R15 CALL 0x0014dcb6 TEST AL,AL JZ 0x0015dce8 MOV RDI,qword ptr [R14 + 0x20] ADD R15,0x40 MOV RSI,R15 CALL 0x0015df30 MOV RCX,qword ptr [R14 + 0x20] CMP RAX,qword ptr [RCX + 0x8] JZ 0x0015dcab ADD RAX,0x10 JMP 0x0015dccf LAB_0015dcab: MOV RDI,RBX CALL 0x001518f4 JMP 0x0015dcda LAB_0015dcb5: MOV RAX,qword ptr [RDI + 0x8] SUB RAX,qword ptr [RDI] PUSH 0x50 POP RSI CQO IDIV RSI MOVSXD RSI,ECX ADD RSI,RAX LAB_0015dcca: CALL 0x0015dd7c LAB_0015dccf: MOV RDI,RBX MOV RSI,RAX CALL 0x0015b468 LAB_0015dcda: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_0015dce8: PUSH 0x10 POP RDI CALL 0x001223e0 MOV RBX,RAX LAB_0015dcf3: LEA RDI,[RSP + 0x8] PUSH -0x1 POP RDX MOV RSI,R14 XOR ECX,ECX CALL 0x0014dcc6 LAB_0015dd05: LEA RSI,[0x19f64f] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x0013a58f MOV BPL,0x1 LAB_0015dd1e: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x00122c80 XOR EBP,EBP MOV RSI,qword ptr [0x001e2ff0] MOV RDX,qword ptr [0x001e2f68] MOV RDI,RBX CALL 0x00122d40
/* minja::Value::get(minja::Value const&) */ Value * minja::Value::get(Value *param_1) { vector<minja::Value,std::allocator<minja::Value>> *this; char cVar1; uint uVar2; long lVar3; Value *pVVar4; runtime_error *this_00; Value *in_RDX; long in_RSI; ulong uVar5; int1 local_60 [32]; string local_40 [32]; if (*(long *)(in_RSI + 0x10) == 0) { if (*(long *)(in_RSI + 0x20) != 0) { cVar1 = is_primitive(in_RDX); if (cVar1 == '\0') { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0015dcf3 to 0015dd04 has its CatchHandler @ 0015dd69 */ dump_abi_cxx11_((int)local_60,SUB81(in_RSI,0)); /* try { // try from 0015dd05 to 0015dd1a has its CatchHandler @ 0015dd52 */ std::operator+((char *)local_40,(string *)"Unashable type: "); /* try { // try from 0015dd1e to 0015dd42 has its CatchHandler @ 0015dd43 */ std::runtime_error::runtime_error(this_00,local_40); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001e2ff0,PTR__runtime_error_001e2f68); } lVar3 = 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 (lVar3 != *(long *)(*(long *)(in_RSI + 0x20) + 8)) { pVVar4 = (Value *)(lVar3 + 0x10); goto LAB_0015dccf; } } } else if ((byte)((char)in_RDX[0x40] - 5U) < 2) { uVar2 = get<int>(in_RDX); this = *(vector<minja::Value,std::allocator<minja::Value>> **)(in_RSI + 0x10); if ((int)uVar2 < 0) { uVar5 = (long)(int)uVar2 + (*(long *)(this + 8) - *(long *)this) / 0x50; } else { uVar5 = (ulong)uVar2; } pVVar4 = (Value *)std::vector<minja::Value,std::allocator<minja::Value>>::at(this,uVar5); LAB_0015dccf: Value(param_1,pVVar4); return param_1; } Value(param_1); return param_1; }
36,740
r3d_gbuffer_enable_stencil_write
r3d/src/r3d_core.c
void r3d_gbuffer_enable_stencil_write(void) { // Re-attach the depth/stencil buffer to the framebuffer glFramebufferTexture2D( GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_TEXTURE_2D, R3D.framebuffer.gBuffer.depth, 0 ); // Setup the stencil: write 1 everywhere where geometry exists glEnable(GL_STENCIL_TEST); glStencilMask(0xFF); // Permit writing to stencil buffer glStencilFunc(GL_ALWAYS, 1, 0xFF); // Always pass the test, write 1 glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); // Replace stencil value with 1 }
O3
c
r3d_gbuffer_enable_stencil_write: pushq %rbp movq %rsp, %rbp leaq 0xb29e1(%rip), %rax # 0x183f28 leaq 0xe0672(%rip), %rcx # 0x1b1bc0 movl 0x18(%rcx), %ecx movl $0x8d40, %edi # imm = 0x8D40 movl $0x821a, %esi # imm = 0x821A movl $0xde1, %edx # imm = 0xDE1 xorl %r8d, %r8d callq *(%rax) leaq 0xb28a4(%rip), %rax # 0x183e10 movl $0xb90, %edi # imm = 0xB90 callq *(%rax) leaq 0xb384e(%rip), %rax # 0x184dc8 movl $0xff, %edi callq *(%rax) leaq 0xb3830(%rip), %rax # 0x184db8 movl $0x207, %edi # imm = 0x207 movl $0x1, %esi movl $0xff, %edx callq *(%rax) leaq 0xb3838(%rip), %rax # 0x184dd8 movq (%rax), %rax movl $0x1e00, %edi # imm = 0x1E00 movl $0x1e00, %esi # imm = 0x1E00 movl $0x1e01, %edx # imm = 0x1E01 popq %rbp jmpq *%rax
r3d_gbuffer_enable_stencil_write: push rbp mov rbp, rsp lea rax, glad_glFramebufferTexture2D lea rcx, R3D mov ecx, [rcx+18h] mov edi, 8D40h mov esi, 821Ah mov edx, 0DE1h xor r8d, r8d call qword ptr [rax] lea rax, glad_glEnable mov edi, 0B90h call qword ptr [rax] lea rax, glad_glStencilMask mov edi, 0FFh call qword ptr [rax] lea rax, glad_glStencilFunc mov edi, 207h mov esi, 1 mov edx, 0FFh call qword ptr [rax] lea rax, glad_glStencilOp mov rax, [rax] mov edi, 1E00h mov esi, 1E00h mov edx, 1E01h pop rbp jmp rax
long long r3d_gbuffer_enable_stencil_write() { glad_glFramebufferTexture2D(36160LL, 33306LL, 3553LL, *(unsigned int *)&R3D[24], 0LL); glad_glEnable(2960LL); glad_glStencilMask(255LL); glad_glStencilFunc(519LL, 1LL, 255LL); return glad_glStencilOp(7680LL, 7680LL, 7681LL); }
r3d_gbuffer_enable_stencil_write: PUSH RBP MOV RBP,RSP LEA RAX,[0x283f28] LEA RCX,[0x2b1bc0] MOV ECX,dword ptr [RCX + 0x18] MOV EDI,0x8d40 MOV ESI,0x821a MOV EDX,0xde1 XOR R8D,R8D CALL qword ptr [RAX] LEA RAX,[0x283e10] MOV EDI,0xb90 CALL qword ptr [RAX] LEA RAX,[0x284dc8] MOV EDI,0xff CALL qword ptr [RAX] LEA RAX,[0x284db8] MOV EDI,0x207 MOV ESI,0x1 MOV EDX,0xff CALL qword ptr [RAX] LEA RAX,[0x284dd8] MOV RAX,qword ptr [RAX] MOV EDI,0x1e00 MOV ESI,0x1e00 MOV EDX,0x1e01 POP RBP JMP RAX
void r3d_gbuffer_enable_stencil_write(void) { (*glad_glFramebufferTexture2D)(0x8d40,0x821a,0xde1,DAT_002b1bd8,0); (*glad_glEnable)(0xb90); (*glad_glStencilMask)(0xff); (*glad_glStencilFunc)(0x207,1,0xff); /* WARNING: Could not recover jumptable at 0x001d15b3. Too many branches */ /* WARNING: Treating indirect jump as call */ (*glad_glStencilOp)(0x1e00,0x1e00,0x1e01); return; }
36,741
my_write
eloqsql/mysys/my_write.c
size_t my_write(File Filedes, const uchar *Buffer, size_t Count, myf MyFlags) { size_t writtenbytes, written; uint errors; DBUG_ENTER("my_write"); DBUG_PRINT("my",("fd: %d Buffer: %p Count: %lu MyFlags: %lu", Filedes, Buffer, (ulong) Count, MyFlags)); errors= 0; written= 0; if (!(MyFlags & (MY_WME | MY_FAE | MY_FNABP))) MyFlags|= my_global_flags; /* The behavior of write(fd, buf, 0) is not portable */ if (unlikely(!Count)) DBUG_RETURN(0); for (;;) { #ifdef _WIN32 if(Filedes < 0) { my_errno= errno= EBADF; DBUG_RETURN((size_t)-1); } writtenbytes= my_win_write(Filedes, Buffer, Count); #else writtenbytes= write(Filedes, Buffer, Count); #endif /** To simulate the write error set the errno = error code and the number pf written bytes to -1. */ DBUG_EXECUTE_IF ("simulate_file_write_error", if (!errors) { errno= ENOSPC; writtenbytes= (size_t) -1; }); if (writtenbytes == Count) break; if (writtenbytes != (size_t) -1) { /* Safeguard */ written+= writtenbytes; Buffer+= writtenbytes; Count-= writtenbytes; } my_errno= errno; DBUG_PRINT("error",("Write only %ld bytes, error: %d", (long) writtenbytes, my_errno)); #ifndef NO_BACKGROUND if (my_thread_var->abort) MyFlags&= ~ MY_WAIT_IF_FULL; /* End if aborted by user */ if ((my_errno == ENOSPC || my_errno == EDQUOT) && (MyFlags & MY_WAIT_IF_FULL)) { wait_for_free_space(my_filename(Filedes), errors); errors++; continue; } if ((writtenbytes == 0 || writtenbytes == (size_t) -1)) { if (my_errno == EINTR) { DBUG_PRINT("debug", ("my_write() was interrupted and returned %ld", (long) writtenbytes)); continue; /* Interrupted */ } if (!writtenbytes && !errors++) /* Retry once */ { /* We may come here if the file quota is exeeded */ errno= EFBIG; /* Assume this is the error */ continue; } } else continue; /* Retry */ #endif /* Don't give a warning if it's ok that we only write part of the data */ if (MyFlags & (MY_NABP | MY_FNABP)) { if (MyFlags & (MY_WME | MY_FAE | MY_FNABP)) { my_error(EE_WRITE, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))), my_filename(Filedes),my_errno); } DBUG_RETURN(MY_FILE_ERROR); /* Error on read */ } break; /* Return bytes written */ } if (MyFlags & (MY_NABP | MY_FNABP)) DBUG_RETURN(0); /* Want only errors */ DBUG_RETURN(writtenbytes+written); }
O0
c
my_write: 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 0xbd699 movl $0x0, -0x3c(%rbp) movq $0x0, -0x38(%rbp) movq -0x28(%rbp), %rax andq $0x1a, %rax cmpq $0x0, %rax jne 0xbd6c8 leaq 0x392acb(%rip), %rax # 0x450188 movq (%rax), %rax orq -0x28(%rbp), %rax movq %rax, -0x28(%rbp) cmpq $0x0, -0x20(%rbp) setne %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xbd6f9 jmp 0xbd6ec movq $0x0, -0x8(%rbp) jmp 0xbd8a3 jmp 0xbd6fb movl -0xc(%rbp), %edi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x3bb60 movq %rax, -0x30(%rbp) jmp 0xbd711 movq -0x30(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0xbd720 jmp 0xbd87b cmpq $-0x1, -0x30(%rbp) je 0xbd74e movq -0x30(%rbp), %rax addq -0x38(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x30(%rbp), %rcx movq -0x20(%rbp), %rax subq %rcx, %rax movq %rax, -0x20(%rbp) callq 0x3bb30 movl (%rax), %eax movl %eax, -0x40(%rbp) callq 0xbc9e0 movl -0x40(%rbp), %ecx movl %ecx, (%rax) jmp 0xbd764 callq 0xbc9e0 movl 0xe0(%rax), %eax cmpl $0x0, %eax je 0xbd786 movabsq $0xffffffdf, %rax # imm = 0xFFFFFFDF andq -0x28(%rbp), %rax movq %rax, -0x28(%rbp) callq 0xbc9e0 cmpl $0x1c, (%rax) je 0xbd79a callq 0xbc9e0 cmpl $0x7a, (%rax) jne 0xbd7c9 movq -0x28(%rbp), %rax andq $0x20, %rax cmpq $0x0, %rax je 0xbd7c9 movl -0xc(%rbp), %edi callq 0xc2290 movq %rax, %rdi movl -0x3c(%rbp), %esi callq 0xc0600 movl -0x3c(%rbp), %eax addl $0x1, %eax movl %eax, -0x3c(%rbp) jmp 0xbd6fb cmpq $0x0, -0x30(%rbp) je 0xbd7d7 cmpq $-0x1, -0x30(%rbp) jne 0xbd813 callq 0xbc9e0 cmpl $0x4, (%rax) jne 0xbd7ea jmp 0xbd7e3 jmp 0xbd7e5 jmp 0xbd6fb cmpq $0x0, -0x30(%rbp) jne 0xbd811 movl -0x3c(%rbp), %eax movl %eax, %ecx addl $0x1, %ecx movl %ecx, -0x3c(%rbp) cmpl $0x0, %eax jne 0xbd811 callq 0x3bb30 movl $0x1b, (%rax) jmp 0xbd6fb jmp 0xbd818 jmp 0xbd6fb movq -0x28(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0xbd879 movq -0x28(%rbp), %rax andq $0x1a, %rax cmpq $0x0, %rax je 0xbd86d movq -0x28(%rbp), %rax andq $0x440, %rax # imm = 0x440 orq $0x4, %rax movq %rax, -0x50(%rbp) movl -0xc(%rbp), %edi callq 0xc2290 movq %rax, -0x48(%rbp) callq 0xbc9e0 movq -0x50(%rbp), %rsi movq -0x48(%rbp), %rdx movl (%rax), %ecx movl $0x3, %edi movb $0x0, %al callq 0xb4ed0 jmp 0xbd86f movq $-0x1, -0x8(%rbp) jmp 0xbd8a3 jmp 0xbd87b movq -0x28(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0xbd895 jmp 0xbd88b movq $0x0, -0x8(%rbp) jmp 0xbd8a3 jmp 0xbd897 movq -0x30(%rbp), %rax addq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopl (%rax)
my_write: 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_BD699: mov [rbp+var_3C], 0 mov [rbp+var_38], 0 mov rax, [rbp+var_28] and rax, 1Ah cmp rax, 0 jnz short loc_BD6C8 lea rax, my_global_flags mov rax, [rax] or rax, [rbp+var_28] mov [rbp+var_28], rax loc_BD6C8: cmp [rbp+var_20], 0 setnz al xor al, 0FFh and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_BD6F9 jmp short $+2 loc_BD6EC: mov [rbp+var_8], 0 jmp loc_BD8A3 loc_BD6F9: jmp short $+2 loc_BD6FB: mov edi, [rbp+var_C] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _write mov [rbp+var_30], rax jmp short $+2 loc_BD711: mov rax, [rbp+var_30] cmp rax, [rbp+var_20] jnz short loc_BD720 jmp loc_BD87B loc_BD720: cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh jz short loc_BD74E mov rax, [rbp+var_30] add rax, [rbp+var_38] mov [rbp+var_38], rax mov rax, [rbp+var_30] add rax, [rbp+var_18] mov [rbp+var_18], rax mov rcx, [rbp+var_30] mov rax, [rbp+var_20] sub rax, rcx mov [rbp+var_20], rax loc_BD74E: call ___errno_location mov eax, [rax] mov [rbp+var_40], eax call _my_thread_var mov ecx, [rbp+var_40] mov [rax], ecx jmp short $+2 loc_BD764: call _my_thread_var mov eax, [rax+0E0h] cmp eax, 0 jz short loc_BD786 mov rax, 0FFFFFFDFh and rax, [rbp+var_28] mov [rbp+var_28], rax loc_BD786: call _my_thread_var cmp dword ptr [rax], 1Ch jz short loc_BD79A call _my_thread_var cmp dword ptr [rax], 7Ah ; 'z' jnz short loc_BD7C9 loc_BD79A: mov rax, [rbp+var_28] and rax, 20h cmp rax, 0 jz short loc_BD7C9 mov edi, [rbp+var_C] call my_filename mov rdi, rax mov esi, [rbp+var_3C] call wait_for_free_space mov eax, [rbp+var_3C] add eax, 1 mov [rbp+var_3C], eax jmp loc_BD6FB loc_BD7C9: cmp [rbp+var_30], 0 jz short loc_BD7D7 cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh jnz short loc_BD813 loc_BD7D7: call _my_thread_var cmp dword ptr [rax], 4 jnz short loc_BD7EA jmp short $+2 loc_BD7E3: jmp short $+2 loc_BD7E5: jmp loc_BD6FB loc_BD7EA: cmp [rbp+var_30], 0 jnz short loc_BD811 mov eax, [rbp+var_3C] mov ecx, eax add ecx, 1 mov [rbp+var_3C], ecx cmp eax, 0 jnz short loc_BD811 call ___errno_location mov dword ptr [rax], 1Bh jmp loc_BD6FB loc_BD811: jmp short loc_BD818 loc_BD813: jmp loc_BD6FB loc_BD818: mov rax, [rbp+var_28] and rax, 6 cmp rax, 0 jz short loc_BD879 mov rax, [rbp+var_28] and rax, 1Ah cmp rax, 0 jz short loc_BD86D mov rax, [rbp+var_28] and rax, 440h or rax, 4 mov [rbp+var_50], rax mov edi, [rbp+var_C] call my_filename mov [rbp+var_48], rax call _my_thread_var mov rsi, [rbp+var_50] mov rdx, [rbp+var_48] mov ecx, [rax] mov edi, 3 mov al, 0 call my_error loc_BD86D: jmp short $+2 loc_BD86F: mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_BD8A3 loc_BD879: jmp short $+2 loc_BD87B: mov rax, [rbp+var_28] and rax, 6 cmp rax, 0 jz short loc_BD895 jmp short $+2 loc_BD88B: mov [rbp+var_8], 0 jmp short loc_BD8A3 loc_BD895: jmp short $+2 loc_BD897: mov rax, [rbp+var_30] add rax, [rbp+var_38] mov [rbp+var_8], rax loc_BD8A3: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
long long my_write(unsigned int a1, long long a2, long long a3, __int16 a4) { long long v4; // rax unsigned int *v6; // rax long long v8; // [rsp+8h] [rbp-48h] int v9; // [rsp+10h] [rbp-40h] unsigned int v10; // [rsp+14h] [rbp-3Ch] long long v11; // [rsp+18h] [rbp-38h] long long v12; // [rsp+20h] [rbp-30h] __int16 v13; // [rsp+28h] [rbp-28h] long long v14; // [rsp+30h] [rbp-20h] v14 = a3; v13 = a4; v10 = 0; v11 = 0LL; if ( (a4 & 0x1A) == 0 ) v13 = a4 | my_global_flags; if ( !a3 ) return 0LL; while ( 1 ) { do { while ( 1 ) { v12 = write(a1, a2, v14); if ( v12 == v14 ) goto LABEL_26; if ( v12 != -1 ) { v11 += v12; a2 += v12; v14 -= v12; } v9 = *(_DWORD *)__errno_location(a1); *(_DWORD *)my_thread_var() = v9; if ( *(_DWORD *)(my_thread_var() + 224) ) v13 &= ~0x20u; if ( *(_DWORD *)my_thread_var() != 28 && *(_DWORD *)my_thread_var() != 122 || (v13 & 0x20) == 0 ) break; v4 = my_filename(a1); wait_for_free_space(v4, v10++); } } while ( v12 && v12 != -1 || *(_DWORD *)my_thread_var() == 4 ); if ( v12 ) break; if ( v10++ ) break; *(_DWORD *)__errno_location(a1) = 27; } if ( (v13 & 6) == 0 ) { LABEL_26: if ( (v13 & 6) != 0 ) return 0LL; else return v11 + v12; } if ( (v13 & 0x1A) != 0 ) { v8 = my_filename(a1); v6 = (unsigned int *)my_thread_var(); my_error(3u, v13 & 0x440 | 4LL, v8, *v6); } return -1LL; }
my_write: 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 0x001bd699 LAB_001bd699: MOV dword ptr [RBP + -0x3c],0x0 MOV qword ptr [RBP + -0x38],0x0 MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x1a CMP RAX,0x0 JNZ 0x001bd6c8 LEA RAX,[0x550188] MOV RAX,qword ptr [RAX] OR RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x28],RAX LAB_001bd6c8: CMP qword ptr [RBP + -0x20],0x0 SETNZ AL XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001bd6f9 JMP 0x001bd6ec LAB_001bd6ec: MOV qword ptr [RBP + -0x8],0x0 JMP 0x001bd8a3 LAB_001bd6f9: JMP 0x001bd6fb LAB_001bd6fb: MOV EDI,dword ptr [RBP + -0xc] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x0013bb60 MOV qword ptr [RBP + -0x30],RAX JMP 0x001bd711 LAB_001bd711: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x001bd720 JMP 0x001bd87b LAB_001bd720: CMP qword ptr [RBP + -0x30],-0x1 JZ 0x001bd74e MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x18],RAX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x20] SUB RAX,RCX MOV qword ptr [RBP + -0x20],RAX LAB_001bd74e: CALL 0x0013bb30 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x40],EAX CALL 0x001bc9e0 MOV ECX,dword ptr [RBP + -0x40] MOV dword ptr [RAX],ECX JMP 0x001bd764 LAB_001bd764: CALL 0x001bc9e0 MOV EAX,dword ptr [RAX + 0xe0] CMP EAX,0x0 JZ 0x001bd786 MOV RAX,0xffffffdf AND RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x28],RAX LAB_001bd786: CALL 0x001bc9e0 CMP dword ptr [RAX],0x1c JZ 0x001bd79a CALL 0x001bc9e0 CMP dword ptr [RAX],0x7a JNZ 0x001bd7c9 LAB_001bd79a: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x20 CMP RAX,0x0 JZ 0x001bd7c9 MOV EDI,dword ptr [RBP + -0xc] CALL 0x001c2290 MOV RDI,RAX MOV ESI,dword ptr [RBP + -0x3c] CALL 0x001c0600 MOV EAX,dword ptr [RBP + -0x3c] ADD EAX,0x1 MOV dword ptr [RBP + -0x3c],EAX JMP 0x001bd6fb LAB_001bd7c9: CMP qword ptr [RBP + -0x30],0x0 JZ 0x001bd7d7 CMP qword ptr [RBP + -0x30],-0x1 JNZ 0x001bd813 LAB_001bd7d7: CALL 0x001bc9e0 CMP dword ptr [RAX],0x4 JNZ 0x001bd7ea JMP 0x001bd7e3 LAB_001bd7e3: JMP 0x001bd7e5 LAB_001bd7e5: JMP 0x001bd6fb LAB_001bd7ea: CMP qword ptr [RBP + -0x30],0x0 JNZ 0x001bd811 MOV EAX,dword ptr [RBP + -0x3c] MOV ECX,EAX ADD ECX,0x1 MOV dword ptr [RBP + -0x3c],ECX CMP EAX,0x0 JNZ 0x001bd811 CALL 0x0013bb30 MOV dword ptr [RAX],0x1b JMP 0x001bd6fb LAB_001bd811: JMP 0x001bd818 LAB_001bd813: JMP 0x001bd6fb LAB_001bd818: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x6 CMP RAX,0x0 JZ 0x001bd879 MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x1a CMP RAX,0x0 JZ 0x001bd86d MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x440 OR RAX,0x4 MOV qword ptr [RBP + -0x50],RAX MOV EDI,dword ptr [RBP + -0xc] CALL 0x001c2290 MOV qword ptr [RBP + -0x48],RAX CALL 0x001bc9e0 MOV RSI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RAX] MOV EDI,0x3 MOV AL,0x0 CALL 0x001b4ed0 LAB_001bd86d: JMP 0x001bd86f LAB_001bd86f: MOV qword ptr [RBP + -0x8],-0x1 JMP 0x001bd8a3 LAB_001bd879: JMP 0x001bd87b LAB_001bd87b: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x6 CMP RAX,0x0 JZ 0x001bd895 JMP 0x001bd88b LAB_001bd88b: MOV qword ptr [RBP + -0x8],0x0 JMP 0x001bd8a3 LAB_001bd895: JMP 0x001bd897 LAB_001bd897: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_001bd8a3: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
long my_write(int param_1,void *param_2,size_t param_3,ulong param_4) { int iVar1; size_t sVar2; int *piVar3; long lVar4; int8 uVar5; int4 *puVar6; int local_44; long local_40; ulong local_30; size_t local_28; void *local_20; long local_10; local_44 = 0; local_40 = 0; local_30 = param_4; if ((param_4 & 0x1a) == 0) { local_30 = my_global_flags | param_4; } local_28 = param_3; local_20 = param_2; if (param_3 == 0) { local_10 = 0; } else { while (sVar2 = write(param_1,local_20,local_28), sVar2 != local_28) { if (sVar2 != 0xffffffffffffffff) { local_40 = sVar2 + local_40; local_20 = (void *)(sVar2 + (long)local_20); local_28 = local_28 - sVar2; } piVar3 = __errno_location(); iVar1 = *piVar3; piVar3 = (int *)_my_thread_var(); *piVar3 = iVar1; lVar4 = _my_thread_var(); if (*(int *)(lVar4 + 0xe0) != 0) { local_30 = local_30 & 0xffffffdf; } piVar3 = (int *)_my_thread_var(); if (((*piVar3 == 0x1c) || (piVar3 = (int *)_my_thread_var(), *piVar3 == 0x7a)) && ((local_30 & 0x20) != 0)) { uVar5 = my_filename(param_1); wait_for_free_space(uVar5,local_44); local_44 = local_44 + 1; } else if (((sVar2 == 0) || (sVar2 == 0xffffffffffffffff)) && (piVar3 = (int *)_my_thread_var(), *piVar3 != 4)) { if ((sVar2 != 0) || (local_44 != 0)) { if ((local_30 & 6) != 0) { if ((local_30 & 0x1a) != 0) { uVar5 = my_filename(param_1); puVar6 = (int4 *)_my_thread_var(); my_error(3,local_30 & 0x440 | 4,uVar5,*puVar6); } return -1; } break; } piVar3 = __errno_location(); *piVar3 = 0x1b; local_44 = local_44 + 1; } } if ((local_30 & 6) == 0) { local_10 = sVar2 + local_40; } else { local_10 = 0; } } return local_10; }
36,742
my_write
eloqsql/mysys/my_write.c
size_t my_write(File Filedes, const uchar *Buffer, size_t Count, myf MyFlags) { size_t writtenbytes, written; uint errors; DBUG_ENTER("my_write"); DBUG_PRINT("my",("fd: %d Buffer: %p Count: %lu MyFlags: %lu", Filedes, Buffer, (ulong) Count, MyFlags)); errors= 0; written= 0; if (!(MyFlags & (MY_WME | MY_FAE | MY_FNABP))) MyFlags|= my_global_flags; /* The behavior of write(fd, buf, 0) is not portable */ if (unlikely(!Count)) DBUG_RETURN(0); for (;;) { #ifdef _WIN32 if(Filedes < 0) { my_errno= errno= EBADF; DBUG_RETURN((size_t)-1); } writtenbytes= my_win_write(Filedes, Buffer, Count); #else writtenbytes= write(Filedes, Buffer, Count); #endif /** To simulate the write error set the errno = error code and the number pf written bytes to -1. */ DBUG_EXECUTE_IF ("simulate_file_write_error", if (!errors) { errno= ENOSPC; writtenbytes= (size_t) -1; }); if (writtenbytes == Count) break; if (writtenbytes != (size_t) -1) { /* Safeguard */ written+= writtenbytes; Buffer+= writtenbytes; Count-= writtenbytes; } my_errno= errno; DBUG_PRINT("error",("Write only %ld bytes, error: %d", (long) writtenbytes, my_errno)); #ifndef NO_BACKGROUND if (my_thread_var->abort) MyFlags&= ~ MY_WAIT_IF_FULL; /* End if aborted by user */ if ((my_errno == ENOSPC || my_errno == EDQUOT) && (MyFlags & MY_WAIT_IF_FULL)) { wait_for_free_space(my_filename(Filedes), errors); errors++; continue; } if ((writtenbytes == 0 || writtenbytes == (size_t) -1)) { if (my_errno == EINTR) { DBUG_PRINT("debug", ("my_write() was interrupted and returned %ld", (long) writtenbytes)); continue; /* Interrupted */ } if (!writtenbytes && !errors++) /* Retry once */ { /* We may come here if the file quota is exeeded */ errno= EFBIG; /* Assume this is the error */ continue; } } else continue; /* Retry */ #endif /* Don't give a warning if it's ok that we only write part of the data */ if (MyFlags & (MY_NABP | MY_FNABP)) { if (MyFlags & (MY_WME | MY_FAE | MY_FNABP)) { my_error(EE_WRITE, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))), my_filename(Filedes),my_errno); } DBUG_RETURN(MY_FILE_ERROR); /* Error on read */ } break; /* Return bytes written */ } if (MyFlags & (MY_NABP | MY_FNABP)) DBUG_RETURN(0); /* Want only errors */ DBUG_RETURN(writtenbytes+written); }
O3
c
my_write: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %r15 movl %edi, %r12d xorl %ebx, %ebx movl $0x0, %r13d testb $0x1a, %cl jne 0x3d089 leaq 0x3b3f72(%rip), %rax # 0x3f0ff8 movq (%rax), %r13 testq %r15, %r15 je 0x3d1cd orq %rcx, %r13 movl %r12d, %edi movq %rsi, -0x40(%rbp) movq %r15, %rdx callq 0x3abb0 cmpq %r15, %rax jne 0x3d0bf movq %r15, %rcx xorl %ebx, %ebx testb $0x6, %r13b je 0x3d1ca xorl %ebx, %ebx jmp 0x3d1cd movq %rax, %r14 movq $0x0, -0x38(%rbp) callq 0x3ab70 movq %r15, %rcx movq %rax, -0x48(%rbp) xorl %ebx, %ebx movq -0x40(%rbp), %r15 movl %r12d, -0x2c(%rbp) movq %r13, %r12 movq %rbx, %rax cmpq $-0x1, %r14 movl $0x0, %ebx cmovneq %r14, %rbx addq %rbx, %r15 subq %rbx, %rcx movq %rcx, -0x40(%rbp) addq %rax, %rbx movq -0x48(%rbp), %rax movl (%rax), %r13d callq 0x85d6a movl %r13d, (%rax) callq 0x85d6a movl %r12d, %r13d andl $-0x21, %r13d cmpl $0x0, 0xe0(%rax) cmoveq %r12, %r13 callq 0x85d6a cmpl $0x1c, (%rax) jne 0x3d13c testb $0x20, %r13b movl -0x2c(%rbp), %r12d je 0x3d152 jmp 0x3d18c callq 0x85d6a cmpl $0x7a, (%rax) movl -0x2c(%rbp), %r12d jne 0x3d152 movl %r13d, %eax andl $0x20, %eax jne 0x3d18c leaq 0x1(%r14), %rax cmpq $0x1, %rax ja 0x3d166 callq 0x85d6a cmpl $0x4, (%rax) jne 0x3d1ac movl %r12d, %edi movq %r15, %rsi movq -0x40(%rbp), %r14 movq %r14, %rdx callq 0x3abb0 movq %r14, %rcx movq %rax, %r14 cmpq %rcx, %rax jne 0x3d0e0 jmp 0x3d0ae movl %r12d, %edi callq 0x88884 movq %rax, %rdi movq -0x38(%rbp), %r14 movl %r14d, %esi callq 0x87eb2 incl %r14d movq %r14, -0x38(%rbp) jmp 0x3d166 testq %r14, %r14 jne 0x3d1df cmpl $0x0, -0x38(%rbp) jne 0x3d1df movq -0x48(%rbp), %rax movl $0x1b, (%rax) pushq $0x1 popq %rax movq %rax, -0x38(%rbp) jmp 0x3d166 addq %rcx, %rbx movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testb $0x6, %r13b je 0x3d21d pushq $-0x1 popq %rbx testb $0x1a, %r13b je 0x3d1cd andl $0x440, %r13d # imm = 0x440 orq $0x4, %r13 movl %r12d, %edi callq 0x88884 movq %rax, %r14 callq 0x85d6a movl (%rax), %ecx pushq $0x3 popq %rdi movq %r13, %rsi movq %r14, %rdx xorl %eax, %eax callq 0x80bfb jmp 0x3d1cd movq %r14, %rcx jmp 0x3d0ae
my_write: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r15, rdx mov r12d, edi xor ebx, ebx mov r13d, 0 test cl, 1Ah jnz short loc_3D089 lea rax, my_global_flags mov r13, [rax] loc_3D089: test r15, r15 jz loc_3D1CD or r13, rcx mov edi, r12d mov [rbp+var_40], rsi mov rdx, r15 call _write cmp rax, r15 jnz short loc_3D0BF mov rcx, r15 xor ebx, ebx loc_3D0AE: test r13b, 6 jz loc_3D1CA xor ebx, ebx jmp loc_3D1CD loc_3D0BF: mov r14, rax mov [rbp+var_38], 0 call ___errno_location mov rcx, r15 mov [rbp+var_48], rax xor ebx, ebx mov r15, [rbp+var_40] mov [rbp+var_2C], r12d loc_3D0E0: mov r12, r13 mov rax, rbx cmp r14, 0FFFFFFFFFFFFFFFFh mov ebx, 0 cmovnz rbx, r14 add r15, rbx sub rcx, rbx mov [rbp+var_40], rcx add rbx, rax mov rax, [rbp+var_48] mov r13d, [rax] call _my_thread_var mov [rax], r13d call _my_thread_var mov r13d, r12d and r13d, 0FFFFFFDFh cmp dword ptr [rax+0E0h], 0 cmovz r13, r12 call _my_thread_var cmp dword ptr [rax], 1Ch jnz short loc_3D13C test r13b, 20h mov r12d, [rbp+var_2C] jz short loc_3D152 jmp short loc_3D18C loc_3D13C: call _my_thread_var cmp dword ptr [rax], 7Ah ; 'z' mov r12d, [rbp+var_2C] jnz short loc_3D152 mov eax, r13d and eax, 20h jnz short loc_3D18C loc_3D152: lea rax, [r14+1] cmp rax, 1 ja short loc_3D166 call _my_thread_var cmp dword ptr [rax], 4 jnz short loc_3D1AC loc_3D166: mov edi, r12d mov rsi, r15 mov r14, [rbp+var_40] mov rdx, r14 call _write mov rcx, r14 mov r14, rax cmp rax, rcx jnz loc_3D0E0 jmp loc_3D0AE loc_3D18C: mov edi, r12d call my_filename mov rdi, rax mov r14, [rbp+var_38] mov esi, r14d call wait_for_free_space inc r14d mov [rbp+var_38], r14 jmp short loc_3D166 loc_3D1AC: test r14, r14 jnz short loc_3D1DF cmp dword ptr [rbp+var_38], 0 jnz short loc_3D1DF mov rax, [rbp+var_48] mov dword ptr [rax], 1Bh push 1 pop rax mov [rbp+var_38], rax jmp short loc_3D166 loc_3D1CA: add rbx, rcx loc_3D1CD: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3D1DF: test r13b, 6 jz short loc_3D21D push 0FFFFFFFFFFFFFFFFh pop rbx test r13b, 1Ah jz short loc_3D1CD and r13d, 440h or r13, 4 mov edi, r12d call my_filename mov r14, rax call _my_thread_var mov ecx, [rax] push 3 pop rdi mov rsi, r13 mov rdx, r14 xor eax, eax call my_error jmp short loc_3D1CD loc_3D21D: mov rcx, r14 jmp loc_3D0AE
long long my_write(unsigned int a1, long long a2, long long a3, long long a4) { long long v5; // rbx long long v6; // r13 long long v7; // r13 long long v8; // rax long long v9; // rcx long long v10; // rbx long long v11; // r14 long long v12; // rax long long v13; // r15 long long v14; // r12 long long v15; // rax long long v16; // rbx int v17; // r13d unsigned int v18; // r12d long long v19; // rax long long v20; // rax int v22; // r14d _DWORD *v23; // rax int v24; // r8d int v25; // r9d int *v26; // [rsp+8h] [rbp-48h] long long v27; // [rsp+10h] [rbp-40h] unsigned int v28; // [rsp+18h] [rbp-38h] v5 = 0LL; v6 = 0LL; if ( (a4 & 0x1A) == 0 ) v6 = my_global_flags; if ( a3 ) { v7 = a4 | v6; v8 = write(a1, a2, a3); if ( v8 == a3 ) { v9 = a3; v10 = 0LL; goto LABEL_6; } v11 = v8; v28 = 0; v12 = __errno_location(); v9 = a3; v26 = (int *)v12; v10 = 0LL; v13 = a2; while ( 1 ) { v14 = v7; v15 = v10; v16 = 0LL; if ( v11 != -1 ) v16 = v11; v13 += v16; v27 = v9 - v16; v10 = v15 + v16; v17 = *v26; *(_DWORD *)my_thread_var() = v17; v7 = (unsigned int)v14 & 0xFFFFFFDF; if ( !*(_DWORD *)(my_thread_var() + 224) ) v7 = v14; if ( *(_DWORD *)my_thread_var() == 28 ) { v18 = a1; if ( (v7 & 0x20) != 0 ) goto LABEL_22; } else { v18 = a1; if ( *(_DWORD *)my_thread_var() == 122 && (v7 & 0x20) != 0 ) { LABEL_22: v20 = my_filename(v18); wait_for_free_space(v20, v28++); goto LABEL_20; } } if ( (unsigned long long)(v11 + 1) <= 1 && *(_DWORD *)my_thread_var() != 4 ) { if ( v11 || v28 ) { if ( (v7 & 6) != 0 ) { v5 = -1LL; if ( (v7 & 0x1A) != 0 ) { v22 = my_filename(v18); v23 = (_DWORD *)my_thread_var(); my_error(3, v7 & 0x440 | 4, v22, *v23, v24, v25); } return v5; } v9 = v11; LABEL_6: if ( (v7 & 6) != 0 ) return 0LL; else return v9 + v10; } *v26 = 27; v28 = 1; } LABEL_20: v19 = write(v18, v13, v27); v9 = v27; v11 = v19; if ( v19 == v27 ) goto LABEL_6; } } return v5; }
my_write: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15,RDX MOV R12D,EDI XOR EBX,EBX MOV R13D,0x0 TEST CL,0x1a JNZ 0x0013d089 LEA RAX,[0x4f0ff8] MOV R13,qword ptr [RAX] LAB_0013d089: TEST R15,R15 JZ 0x0013d1cd OR R13,RCX MOV EDI,R12D MOV qword ptr [RBP + -0x40],RSI MOV RDX,R15 CALL 0x0013abb0 CMP RAX,R15 JNZ 0x0013d0bf MOV RCX,R15 XOR EBX,EBX LAB_0013d0ae: TEST R13B,0x6 JZ 0x0013d1ca XOR EBX,EBX JMP 0x0013d1cd LAB_0013d0bf: MOV R14,RAX MOV qword ptr [RBP + -0x38],0x0 CALL 0x0013ab70 MOV RCX,R15 MOV qword ptr [RBP + -0x48],RAX XOR EBX,EBX MOV R15,qword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x2c],R12D LAB_0013d0e0: MOV R12,R13 MOV RAX,RBX CMP R14,-0x1 MOV EBX,0x0 CMOVNZ RBX,R14 ADD R15,RBX SUB RCX,RBX MOV qword ptr [RBP + -0x40],RCX ADD RBX,RAX MOV RAX,qword ptr [RBP + -0x48] MOV R13D,dword ptr [RAX] CALL 0x00185d6a MOV dword ptr [RAX],R13D CALL 0x00185d6a MOV R13D,R12D AND R13D,0xffffffdf CMP dword ptr [RAX + 0xe0],0x0 CMOVZ R13,R12 CALL 0x00185d6a CMP dword ptr [RAX],0x1c JNZ 0x0013d13c TEST R13B,0x20 MOV R12D,dword ptr [RBP + -0x2c] JZ 0x0013d152 JMP 0x0013d18c LAB_0013d13c: CALL 0x00185d6a CMP dword ptr [RAX],0x7a MOV R12D,dword ptr [RBP + -0x2c] JNZ 0x0013d152 MOV EAX,R13D AND EAX,0x20 JNZ 0x0013d18c LAB_0013d152: LEA RAX,[R14 + 0x1] CMP RAX,0x1 JA 0x0013d166 CALL 0x00185d6a CMP dword ptr [RAX],0x4 JNZ 0x0013d1ac LAB_0013d166: MOV EDI,R12D MOV RSI,R15 MOV R14,qword ptr [RBP + -0x40] MOV RDX,R14 CALL 0x0013abb0 MOV RCX,R14 MOV R14,RAX CMP RAX,RCX JNZ 0x0013d0e0 JMP 0x0013d0ae LAB_0013d18c: MOV EDI,R12D CALL 0x00188884 MOV RDI,RAX MOV R14,qword ptr [RBP + -0x38] MOV ESI,R14D CALL 0x00187eb2 INC R14D MOV qword ptr [RBP + -0x38],R14 JMP 0x0013d166 LAB_0013d1ac: TEST R14,R14 JNZ 0x0013d1df CMP dword ptr [RBP + -0x38],0x0 JNZ 0x0013d1df MOV RAX,qword ptr [RBP + -0x48] MOV dword ptr [RAX],0x1b PUSH 0x1 POP RAX MOV qword ptr [RBP + -0x38],RAX JMP 0x0013d166 LAB_0013d1ca: ADD RBX,RCX LAB_0013d1cd: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013d1df: TEST R13B,0x6 JZ 0x0013d21d PUSH -0x1 POP RBX TEST R13B,0x1a JZ 0x0013d1cd AND R13D,0x440 OR R13,0x4 MOV EDI,R12D CALL 0x00188884 MOV R14,RAX CALL 0x00185d6a MOV ECX,dword ptr [RAX] PUSH 0x3 POP RDI MOV RSI,R13 MOV RDX,R14 XOR EAX,EAX CALL 0x00180bfb JMP 0x0013d1cd LAB_0013d21d: MOV RCX,R14 JMP 0x0013d0ae
long my_write(int param_1,void *param_2,size_t param_3,ulong param_4) { int iVar1; size_t sVar2; int *piVar3; int *piVar4; long lVar5; int8 uVar6; int4 *puVar7; size_t sVar8; long lVar9; ulong uVar10; ulong uVar11; int iVar12; lVar9 = 0; uVar10 = 0; if ((param_4 & 0x1a) == 0) { uVar10 = my_global_flags; } if (param_3 != 0) { uVar10 = uVar10 | param_4; sVar2 = write(param_1,param_2,param_3); if (sVar2 == param_3) { lVar9 = 0; } else { iVar12 = 0; piVar3 = __errno_location(); lVar9 = 0; uVar11 = uVar10; do { sVar8 = 0; if (sVar2 != 0xffffffffffffffff) { sVar8 = sVar2; } param_2 = (void *)((long)param_2 + sVar8); param_3 = param_3 - sVar8; lVar9 = sVar8 + lVar9; iVar1 = *piVar3; piVar4 = (int *)_my_thread_var(); *piVar4 = iVar1; lVar5 = _my_thread_var(); uVar10 = (ulong)((uint)uVar11 & 0xffffffdf); if (*(int *)(lVar5 + 0xe0) == 0) { uVar10 = uVar11; } piVar4 = (int *)_my_thread_var(); if (*piVar4 == 0x1c) { if ((uVar10 & 0x20) != 0) goto LAB_0013d18c; LAB_0013d152: if ((sVar2 + 1 < 2) && (piVar4 = (int *)_my_thread_var(), *piVar4 != 4)) { if ((sVar2 != 0) || (iVar12 != 0)) { param_3 = sVar2; if ((uVar10 & 6) != 0) { if ((uVar10 & 0x1a) == 0) { return -1; } uVar6 = my_filename(param_1); puVar7 = (int4 *)_my_thread_var(); my_error(3,(uint)uVar10 & 0x440 | 4,uVar6,*puVar7); return -1; } break; } *piVar3 = 0x1b; iVar12 = 1; } } else { piVar4 = (int *)_my_thread_var(); if ((*piVar4 != 0x7a) || ((uVar10 & 0x20) == 0)) goto LAB_0013d152; LAB_0013d18c: uVar6 = my_filename(param_1); wait_for_free_space(uVar6,iVar12); iVar12 = iVar12 + 1; } sVar2 = write(param_1,param_2,param_3); uVar11 = uVar10; } while (sVar2 != param_3); } if ((uVar10 & 6) == 0) { lVar9 = lVar9 + param_3; } else { lVar9 = 0; } } return lVar9; }
36,743
js_async_function_resolve_call
bluesky950520[P]quickjs/quickjs.c
static JSValue js_async_function_resolve_call(JSContext *ctx, JSValue func_obj, JSValue this_obj, int argc, JSValue *argv, int flags) { JSObject *p = JS_VALUE_GET_OBJ(func_obj); JSAsyncFunctionData *s = p->u.async_function_data; BOOL is_reject = p->class_id - JS_CLASS_ASYNC_FUNCTION_RESOLVE; JSValue arg; if (argc > 0) arg = argv[0]; else arg = JS_UNDEFINED; s->func_state.throw_flag = is_reject; if (is_reject) { JS_Throw(ctx, js_dup(arg)); } else { /* return value of await */ s->func_state.frame.cur_sp[-1] = js_dup(arg); } js_async_function_resume(ctx, s); return JS_UNDEFINED; }
O0
c
js_async_function_resolve_call: subq $0xb8, %rsp movl 0xc8(%rsp), %eax movq 0xc0(%rsp), %rax movq %rsi, 0x98(%rsp) movq %rdx, 0xa0(%rsp) movq %rcx, 0x88(%rsp) movq %r8, 0x90(%rsp) movq %rdi, 0x80(%rsp) movl %r9d, 0x7c(%rsp) movq 0x98(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x70(%rsp), %rax movq 0x30(%rax), %rax movq %rax, 0x68(%rsp) movq 0x70(%rsp), %rax movzwl 0x6(%rax), %eax subl $0x35, %eax movl %eax, 0x64(%rsp) cmpl $0x0, 0x7c(%rsp) jle 0x5a390 movq 0xc0(%rsp), %rax movq (%rax), %rcx movq %rcx, 0x50(%rsp) movq 0x8(%rax), %rax movq %rax, 0x58(%rsp) jmp 0x5a3b5 movl $0x0, 0x40(%rsp) movq $0x3, 0x48(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x58(%rsp) movl 0x64(%rsp), %ecx movq 0x68(%rsp), %rax movl %ecx, 0x54(%rax) cmpl $0x0, 0x64(%rsp) je 0x5a40e movq 0x80(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x50(%rsp), %rdi movq 0x58(%rsp), %rsi callq 0x279c0 movq 0x8(%rsp), %rdi movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx callq 0x331f0 movq %rax, 0x20(%rsp) movq %rdx, 0x28(%rsp) jmp 0x5a450 movq 0x68(%rsp), %rax movq 0xa0(%rax), %rax movq %rax, (%rsp) movq 0x50(%rsp), %rdi movq 0x58(%rsp), %rsi callq 0x279c0 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq 0x10(%rsp), %rcx movq %rcx, -0x10(%rax) movq 0x18(%rsp), %rcx movq %rcx, -0x8(%rax) movq 0x80(%rsp), %rdi movq 0x68(%rsp), %rsi callq 0x98910 movl $0x0, 0xa8(%rsp) movq $0x3, 0xb0(%rsp) movq 0xa8(%rsp), %rax movq 0xb0(%rsp), %rdx addq $0xb8, %rsp retq nopw %cs:(%rax,%rax)
js_async_function_resolve_call: sub rsp, 0B8h mov eax, [rsp+0B8h+arg_8] mov rax, [rsp+0B8h+arg_0] mov [rsp+0B8h+var_20], rsi mov [rsp+0B8h+var_18], rdx mov [rsp+0B8h+var_30], rcx mov [rsp+0B8h+var_28], r8 mov [rsp+0B8h+var_38], rdi mov [rsp+0B8h+var_3C], r9d mov rax, [rsp+0B8h+var_20] mov [rsp+0B8h+var_48], rax mov rax, [rsp+0B8h+var_48] mov rax, [rax+30h] mov [rsp+0B8h+var_50], rax mov rax, [rsp+0B8h+var_48] movzx eax, word ptr [rax+6] sub eax, 35h ; '5' mov [rsp+0B8h+var_54], eax cmp [rsp+0B8h+var_3C], 0 jle short loc_5A390 mov rax, [rsp+0B8h+arg_0] mov rcx, [rax] mov [rsp+0B8h+var_68], rcx mov rax, [rax+8] mov [rsp+0B8h+var_60], rax jmp short loc_5A3B5 loc_5A390: mov dword ptr [rsp+0B8h+var_78], 0 mov [rsp+0B8h+var_70], 3 mov rax, [rsp+0B8h+var_78] mov [rsp+0B8h+var_68], rax mov rax, [rsp+0B8h+var_70] mov [rsp+0B8h+var_60], rax loc_5A3B5: mov ecx, [rsp+0B8h+var_54] mov rax, [rsp+0B8h+var_50] mov [rax+54h], ecx cmp [rsp+0B8h+var_54], 0 jz short loc_5A40E mov rax, [rsp+0B8h+var_38] mov [rsp+0B8h+var_B0], rax mov rdi, [rsp+0B8h+var_68] mov rsi, [rsp+0B8h+var_60] call js_dup mov rdi, [rsp+0B8h+var_B0] mov [rsp+0B8h+var_88], rax mov [rsp+0B8h+var_80], rdx mov rsi, [rsp+0B8h+var_88] mov rdx, [rsp+0B8h+var_80] call JS_Throw mov [rsp+0B8h+var_98], rax mov [rsp+0B8h+var_90], rdx jmp short loc_5A450 loc_5A40E: mov rax, [rsp+0B8h+var_50] mov rax, [rax+0A0h] mov [rsp+0B8h+var_B8], rax mov rdi, [rsp+0B8h+var_68] mov rsi, [rsp+0B8h+var_60] call js_dup mov rcx, rax mov rax, [rsp+0B8h+var_B8] mov [rsp+0B8h+var_A8], rcx mov [rsp+0B8h+var_A0], rdx mov rcx, [rsp+0B8h+var_A8] mov [rax-10h], rcx mov rcx, [rsp+0B8h+var_A0] mov [rax-8], rcx loc_5A450: mov rdi, [rsp+0B8h+var_38] mov rsi, [rsp+0B8h+var_50] call js_async_function_resume mov dword ptr [rsp+0B8h+var_10], 0 mov [rsp+0B8h+var_8], 3 mov rax, [rsp+0B8h+var_10] mov rdx, [rsp+0B8h+var_8] add rsp, 0B8h retn
long long js_async_function_resolve_call( long long a1, long long a2, long long a3, long long a4, long long a5, int a6, long long a7) { long long v7; // rdx long long v8; // rdx long long v10; // [rsp+0h] [rbp-B8h] _DWORD *v11; // [rsp+30h] [rbp-88h] _DWORD *v12; // [rsp+40h] [rbp-78h] _DWORD *v13; // [rsp+50h] [rbp-68h] long long v14; // [rsp+58h] [rbp-60h] int v15; // [rsp+64h] [rbp-54h] long long v16; // [rsp+68h] [rbp-50h] long long v17; // [rsp+A8h] [rbp-10h] v16 = *(_QWORD *)(a2 + 48); v15 = *(unsigned __int16 *)(a2 + 6) - 53; if ( a6 <= 0 ) { LODWORD(v12) = 0; v13 = v12; LODWORD(v14) = 3; } else { v13 = *(_DWORD **)a7; v14 = *(_QWORD *)(a7 + 8); } *(_DWORD *)(v16 + 84) = v15; if ( v15 ) { v11 = js_dup(v13, v14); JS_Throw(a1, (long long)v11, v7); } else { v10 = *(_QWORD *)(v16 + 160); *(_QWORD *)(v10 - 16) = js_dup(v13, v14); *(_QWORD *)(v10 - 8) = v8; } js_async_function_resume(a1, v16); LODWORD(v17) = 0; return v17; }
js_async_function_resolve_call: SUB RSP,0xb8 MOV EAX,dword ptr [RSP + 0xc8] MOV RAX,qword ptr [RSP + 0xc0] MOV qword ptr [RSP + 0x98],RSI MOV qword ptr [RSP + 0xa0],RDX MOV qword ptr [RSP + 0x88],RCX MOV qword ptr [RSP + 0x90],R8 MOV qword ptr [RSP + 0x80],RDI MOV dword ptr [RSP + 0x7c],R9D MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x70],RAX MOV RAX,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP + 0x68],RAX MOV RAX,qword ptr [RSP + 0x70] MOVZX EAX,word ptr [RAX + 0x6] SUB EAX,0x35 MOV dword ptr [RSP + 0x64],EAX CMP dword ptr [RSP + 0x7c],0x0 JLE 0x0015a390 MOV RAX,qword ptr [RSP + 0xc0] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP + 0x50],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x58],RAX JMP 0x0015a3b5 LAB_0015a390: MOV dword ptr [RSP + 0x40],0x0 MOV qword ptr [RSP + 0x48],0x3 MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x58],RAX LAB_0015a3b5: MOV ECX,dword ptr [RSP + 0x64] MOV RAX,qword ptr [RSP + 0x68] MOV dword ptr [RAX + 0x54],ECX CMP dword ptr [RSP + 0x64],0x0 JZ 0x0015a40e MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x58] CALL 0x001279c0 MOV RDI,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] CALL 0x001331f0 MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RDX JMP 0x0015a450 LAB_0015a40e: MOV RAX,qword ptr [RSP + 0x68] MOV RAX,qword ptr [RAX + 0xa0] MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x58] CALL 0x001279c0 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x10],RCX MOV qword ptr [RSP + 0x18],RDX MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + -0x10],RCX MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + -0x8],RCX LAB_0015a450: MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x68] CALL 0x00198910 MOV dword ptr [RSP + 0xa8],0x0 MOV qword ptr [RSP + 0xb0],0x3 MOV RAX,qword ptr [RSP + 0xa8] MOV RDX,qword ptr [RSP + 0xb0] ADD RSP,0xb8 RET
int1 [16] js_async_function_resolve_call(int8 param_1,long param_2) { long lVar1; long lVar2; int iVar3; int in_R9D; int1 auVar4 [16]; long *in_stack_00000008; uint uStack_74; long local_68; long local_60; uint uStack_c; lVar1 = *(long *)(param_2 + 0x30); iVar3 = *(ushort *)(param_2 + 6) - 0x35; if (in_R9D < 1) { local_68 = (ulong)uStack_74 << 0x20; local_60 = 3; } else { local_68 = *in_stack_00000008; local_60 = in_stack_00000008[1]; } *(int *)(lVar1 + 0x54) = iVar3; if (iVar3 == 0) { lVar2 = *(long *)(lVar1 + 0xa0); auVar4 = js_dup(local_68,local_60); *(int1 (*) [16])(lVar2 + -0x10) = auVar4; } else { auVar4 = js_dup(local_68,local_60); JS_Throw(param_1,auVar4._0_8_,auVar4._8_8_); } js_async_function_resume(param_1,lVar1); auVar4._8_8_ = 3; auVar4._0_8_ = (ulong)uStack_c << 0x20; return auVar4; }
36,744
js_async_function_resolve_call
bluesky950520[P]quickjs/quickjs.c
static JSValue js_async_function_resolve_call(JSContext *ctx, JSValue func_obj, JSValue this_obj, int argc, JSValue *argv, int flags) { JSObject *p = JS_VALUE_GET_OBJ(func_obj); JSAsyncFunctionData *s = p->u.async_function_data; BOOL is_reject = p->class_id - JS_CLASS_ASYNC_FUNCTION_RESOLVE; JSValue arg; if (argc > 0) arg = argv[0]; else arg = JS_UNDEFINED; s->func_state.throw_flag = is_reject; if (is_reject) { JS_Throw(ctx, js_dup(arg)); } else { /* return value of await */ s->func_state.frame.cur_sp[-1] = js_dup(arg); } js_async_function_resume(ctx, s); return JS_UNDEFINED; }
O2
c
js_async_function_resolve_call: pushq %r14 pushq %rbx pushq %rax movq %rdi, %r14 movq 0x30(%rsi), %rbx movzwl 0x6(%rsi), %eax addl $-0x35, %eax testl %r9d, %r9d jle 0x339c6 movq 0x20(%rsp), %rcx movq (%rcx), %rdi movq 0x8(%rcx), %rdx movabsq $-0x100000000, %rsi # imm = 0xFFFFFFFF00000000 andq %rdi, %rsi movl %edi, %ecx jmp 0x339cd pushq $0x3 popq %rdx xorl %ecx, %ecx xorl %esi, %esi movl %eax, 0x54(%rbx) testl %eax, %eax je 0x339e8 orq %rcx, %rsi cmpl $-0x9, %edx jb 0x339de incl (%rsi) movq %r14, %rdi callq 0x1fff6 jmp 0x33a01 movq 0xa0(%rbx), %rax orq %rcx, %rsi cmpl $-0x9, %edx jb 0x339f9 incl (%rsi) movq %rsi, -0x10(%rax) movq %rdx, -0x8(%rax) movq %r14, %rdi movq %rbx, %rsi callq 0x4b01e pushq $0x3 popq %rdx xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
js_async_function_resolve_call: push r14 push rbx push rax mov r14, rdi mov rbx, [rsi+30h] movzx eax, word ptr [rsi+6] add eax, 0FFFFFFCBh test r9d, r9d jle short loc_339C6 mov rcx, [rsp+18h+arg_0] mov rdi, [rcx] mov rdx, [rcx+8] mov rsi, 0FFFFFFFF00000000h and rsi, rdi mov ecx, edi jmp short loc_339CD loc_339C6: push 3 pop rdx xor ecx, ecx xor esi, esi loc_339CD: mov [rbx+54h], eax test eax, eax jz short loc_339E8 or rsi, rcx cmp edx, 0FFFFFFF7h jb short loc_339DE inc dword ptr [rsi] loc_339DE: mov rdi, r14 call JS_Throw jmp short loc_33A01 loc_339E8: mov rax, [rbx+0A0h] or rsi, rcx cmp edx, 0FFFFFFF7h jb short loc_339F9 inc dword ptr [rsi] loc_339F9: mov [rax-10h], rsi mov [rax-8], rdx loc_33A01: mov rdi, r14 mov rsi, rbx call js_async_function_resume push 3 pop rdx xor eax, eax add rsp, 8 pop rbx pop r14 retn
long long js_async_function_resolve_call( long long a1, long long a2, long long a3, long long a4, long long a5, int a6, _QWORD *a7) { long long v7; // rbx int v8; // eax long long v9; // rdx unsigned long long v10; // rsi long long v11; // rcx _DWORD *v12; // rsi long long v13; // rax _DWORD *v14; // rsi v7 = *(_QWORD *)(a2 + 48); v8 = *(unsigned __int16 *)(a2 + 6) - 53; if ( a6 <= 0 ) { v9 = 3LL; v11 = 0LL; v10 = 0LL; } else { v9 = a7[1]; v10 = *a7 & 0xFFFFFFFF00000000LL; v11 = (unsigned int)*a7; } *(_DWORD *)(v7 + 84) = v8; if ( v8 ) { v12 = (_DWORD *)(v11 | v10); if ( (unsigned int)v9 >= 0xFFFFFFF7 ) ++*v12; JS_Throw(a1, (long long)v12, v9); } else { v13 = *(_QWORD *)(v7 + 160); v14 = (_DWORD *)(v11 | v10); if ( (unsigned int)v9 >= 0xFFFFFFF7 ) ++*v14; *(_QWORD *)(v13 - 16) = v14; *(_QWORD *)(v13 - 8) = v9; } js_async_function_resume(a1, v7, v9); return 0LL; }
js_async_function_resolve_call: PUSH R14 PUSH RBX PUSH RAX MOV R14,RDI MOV RBX,qword ptr [RSI + 0x30] MOVZX EAX,word ptr [RSI + 0x6] ADD EAX,-0x35 TEST R9D,R9D JLE 0x001339c6 MOV RCX,qword ptr [RSP + 0x20] MOV RDI,qword ptr [RCX] MOV RDX,qword ptr [RCX + 0x8] MOV RSI,-0x100000000 AND RSI,RDI MOV ECX,EDI JMP 0x001339cd LAB_001339c6: PUSH 0x3 POP RDX XOR ECX,ECX XOR ESI,ESI LAB_001339cd: MOV dword ptr [RBX + 0x54],EAX TEST EAX,EAX JZ 0x001339e8 OR RSI,RCX CMP EDX,-0x9 JC 0x001339de INC dword ptr [RSI] LAB_001339de: MOV RDI,R14 CALL 0x0011fff6 JMP 0x00133a01 LAB_001339e8: MOV RAX,qword ptr [RBX + 0xa0] OR RSI,RCX CMP EDX,-0x9 JC 0x001339f9 INC dword ptr [RSI] LAB_001339f9: MOV qword ptr [RAX + -0x10],RSI MOV qword ptr [RAX + -0x8],RDX LAB_00133a01: MOV RDI,R14 MOV RSI,RBX CALL 0x0014b01e PUSH 0x3 POP RDX XOR EAX,EAX ADD RSP,0x8 POP RBX POP R14 RET
int1 [16] js_async_function_resolve_call(int8 param_1,long param_2) { long lVar1; long lVar2; int iVar3; ulong uVar4; ulong uVar5; ulong uVar6; int *piVar7; int in_R9D; ulong *in_stack_00000008; lVar1 = *(long *)(param_2 + 0x30); iVar3 = *(ushort *)(param_2 + 6) - 0x35; if (in_R9D < 1) { uVar5 = 3; uVar4 = 0; uVar6 = 0; } else { uVar5 = in_stack_00000008[1]; uVar6 = *in_stack_00000008 & 0xffffffff00000000; uVar4 = *in_stack_00000008 & 0xffffffff; } *(int *)(lVar1 + 0x54) = iVar3; if (iVar3 == 0) { lVar2 = *(long *)(lVar1 + 0xa0); piVar7 = (int *)(uVar6 | uVar4); if (0xfffffff6 < (uint)uVar5) { *piVar7 = *piVar7 + 1; } *(int **)(lVar2 + -0x10) = piVar7; *(ulong *)(lVar2 + -8) = uVar5; } else { if (0xfffffff6 < (uint)uVar5) { *(int *)(uVar6 | uVar4) = *(int *)(uVar6 | uVar4) + 1; } JS_Throw(param_1); } js_async_function_resume(param_1,lVar1); return ZEXT816(3) << 0x40; }
36,745
mb_verify_signature_secp256k1
msxemulator/build_O3/_deps/picotool-src/bintool/mbedtls_wrapper.c
uint32_t mb_verify_signature_secp256k1( signature_t signature[1], const public_t public_key[1], const message_digest_t digest[1]) { int ret = 1; mbedtls_ecdsa_context ctx_verify; unsigned char hash[32]; memcpy(hash, digest, sizeof(hash)); if (signature->der_len == 0) { raw_to_der(signature); } mbedtls_ecdsa_init(&ctx_verify); mbedtls_ecp_group_load(&ctx_verify.grp, MBEDTLS_ECP_DP_SECP256K1); mbedtls_mpi_read_binary(&ctx_verify.Q.X, public_key->bytes, 32); mbedtls_mpi_read_binary(&ctx_verify.Q.Y, public_key->bytes + 32, 32); // Z must be 1 mbedtls_mpi_add_int(&ctx_verify.Q.Z, &ctx_verify.Q.Z, 1); /* * Verify signature */ DEBUG_LOG(" . Verifying signature..."); fflush(stdout); if ((ret = mbedtls_ecdsa_read_signature(&ctx_verify, hash, sizeof(hash), signature->der, signature->der_len)) != 0) { DEBUG_LOG(" failed\n ! mbedtls_ecdsa_read_signature returned -%x\n", -ret); return 1; } DEBUG_LOG(" ok\n"); return 0; }
O3
c
mb_verify_signature_secp256k1: pushq %r15 pushq %r14 pushq %rbx subq $0x180, %rsp # imm = 0x180 movq %rsi, %r15 movq %rdi, %rbx movups (%rdx), %xmm0 movups 0x10(%rdx), %xmm1 movaps %xmm1, 0x10(%rsp) movaps %xmm0, (%rsp) cmpq $0x0, 0xd0(%rdi) jne 0x79490 movq %rbx, %rdi callq 0x790da leaq 0x28(%rsp), %r14 movq %r14, %rdi callq 0x84116 movq %r14, %rdi movl $0xc, %esi callq 0x8769c leaq 0x138(%rsp), %rdi movl $0x20, %edx movq %r15, %rsi callq 0x7ec50 leaq 0x150(%rsp), %rdi addq $0x20, %r15 movl $0x20, %edx movq %r15, %rsi callq 0x7ec50 leaq 0x168(%rsp), %rdi movl $0x1, %edx movq %rdi, %rsi callq 0x7e6b0 movq 0x6ba8c(%rip), %rax # 0xe4f80 movq (%rax), %rdi callq 0xf530 movq 0xd0(%rbx), %r8 addq $0x40, %rbx movq %rsp, %rsi movl $0x20, %edx movq %r14, %rdi movq %rbx, %rcx callq 0x83f73 xorl %ecx, %ecx testl %eax, %eax setne %cl movl %ecx, %eax addq $0x180, %rsp # imm = 0x180 popq %rbx popq %r14 popq %r15 retq
mb_verify_signature_secp256k1: push r15 push r14 push rbx sub rsp, 180h mov r15, rsi mov rbx, rdi movups xmm0, xmmword ptr [rdx] movups xmm1, xmmword ptr [rdx+10h] movaps [rsp+198h+var_188], xmm1 movaps [rsp+198h+var_198], xmm0 cmp qword ptr [rdi+0D0h], 0 jnz short loc_79490 mov rdi, rbx call raw_to_der loc_79490: lea r14, [rsp+198h+var_170] mov rdi, r14 call mbedtls_ecdsa_init mov rdi, r14 mov esi, 0Ch call mbedtls_ecp_group_load lea rdi, [rsp+198h+var_60] mov edx, 20h ; ' ' mov rsi, r15 call mbedtls_mpi_read_binary lea rdi, [rsp+198h+var_48] add r15, 20h ; ' ' mov edx, 20h ; ' ' mov rsi, r15 call mbedtls_mpi_read_binary lea rdi, [rsp+198h+var_30] mov edx, 1 mov rsi, rdi call mbedtls_mpi_add_int mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov r8, [rbx+0D0h] add rbx, 40h ; '@' mov rsi, rsp mov edx, 20h ; ' ' mov rdi, r14 mov rcx, rbx call mbedtls_ecdsa_read_signature xor ecx, ecx test eax, eax setnz cl mov eax, ecx add rsp, 180h pop rbx pop r14 pop r15 retn
_BOOL8 mb_verify_signature_secp256k1(long long a1, long long a2, __int128 *a3) { __int128 v3; // xmm0 _OWORD v5[2]; // [rsp+0h] [rbp-198h] BYREF _BYTE v6[272]; // [rsp+28h] [rbp-170h] BYREF _BYTE v7[24]; // [rsp+138h] [rbp-60h] BYREF _BYTE v8[24]; // [rsp+150h] [rbp-48h] BYREF _BYTE v9[48]; // [rsp+168h] [rbp-30h] BYREF v3 = *a3; v5[1] = a3[1]; v5[0] = v3; if ( !*(_QWORD *)(a1 + 208) ) raw_to_der(a1); mbedtls_ecdsa_init(v6); mbedtls_ecp_group_load(v6, 12LL); mbedtls_mpi_read_binary(v7, a2, 32LL); mbedtls_mpi_read_binary(v8, a2 + 32, 32LL); mbedtls_mpi_add_int(v9, v9, 1LL); fflush(stdout); return (unsigned int)((long long ( *)(_BYTE *, _OWORD *, long long, long long, _QWORD))mbedtls_ecdsa_read_signature)( v6, v5, 32LL, a1 + 64, *(_QWORD *)(a1 + 208)) != 0; }
mb_verify_signature_secp256k1: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x180 MOV R15,RSI MOV RBX,RDI MOVUPS XMM0,xmmword ptr [RDX] MOVUPS XMM1,xmmword ptr [RDX + 0x10] MOVAPS xmmword ptr [RSP + 0x10],XMM1 MOVAPS xmmword ptr [RSP],XMM0 CMP qword ptr [RDI + 0xd0],0x0 JNZ 0x00179490 MOV RDI,RBX CALL 0x001790da LAB_00179490: LEA R14,[RSP + 0x28] MOV RDI,R14 CALL 0x00184116 MOV RDI,R14 MOV ESI,0xc CALL 0x0018769c LEA RDI,[RSP + 0x138] MOV EDX,0x20 MOV RSI,R15 CALL 0x0017ec50 LEA RDI,[RSP + 0x150] ADD R15,0x20 MOV EDX,0x20 MOV RSI,R15 CALL 0x0017ec50 LEA RDI,[RSP + 0x168] MOV EDX,0x1 MOV RSI,RDI CALL 0x0017e6b0 MOV RAX,qword ptr [0x001e4f80] MOV RDI,qword ptr [RAX] CALL 0x0010f530 MOV R8,qword ptr [RBX + 0xd0] ADD RBX,0x40 MOV RSI,RSP MOV EDX,0x20 MOV RDI,R14 MOV RCX,RBX CALL 0x00183f73 XOR ECX,ECX TEST EAX,EAX SETNZ CL MOV EAX,ECX ADD RSP,0x180 POP RBX POP R14 POP R15 RET
bool mb_verify_signature_secp256k1(long param_1,long param_2,int4 *param_3) { int iVar1; int4 local_198; int4 uStack_194; int4 uStack_190; int4 uStack_18c; int4 local_188; int4 uStack_184; int4 uStack_180; int4 uStack_17c; int1 local_170 [272]; int1 local_60 [24]; int1 local_48 [24]; int1 local_30 [24]; local_198 = *param_3; uStack_194 = param_3[1]; uStack_190 = param_3[2]; uStack_18c = param_3[3]; local_188 = param_3[4]; uStack_184 = param_3[5]; uStack_180 = param_3[6]; uStack_17c = param_3[7]; if (*(long *)(param_1 + 0xd0) == 0) { raw_to_der(param_1); } mbedtls_ecdsa_init(local_170); mbedtls_ecp_group_load(local_170,0xc); mbedtls_mpi_read_binary(local_60,param_2,0x20); mbedtls_mpi_read_binary(local_48,param_2 + 0x20,0x20); mbedtls_mpi_add_int(local_30,local_30,1); fflush(*(FILE **)PTR_stdout_001e4f80); iVar1 = mbedtls_ecdsa_read_signature (local_170,&local_198,0x20,param_1 + 0x40,*(int8 *)(param_1 + 0xd0)); return iVar1 != 0; }
36,746
my_casedn_utf8mb3
eloqsql/strings/ctype-utf8.c
static size_t my_casedn_utf8mb3(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen) { my_wc_t wc; int srcres, dstres; const char *srcend= src + srclen; char *dstend= dst + dstlen, *dst0= dst; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(src != dst || cs->casedn_multiply == 1); while ((src < srcend) && (srcres= my_utf8mb3_uni(cs, &wc, (uchar*) src, (uchar*)srcend)) > 0) { my_tolower_utf8mb3(uni_plane, &wc); if ((dstres= my_uni_utf8mb3(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0) break; src+= srcres; dst+= dstres; } return (size_t) (dst - dst0); }
O3
c
my_casedn_utf8mb3: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %r13 movq %rcx, -0x30(%rbp) testq %rdx, %rdx jle 0x6eb3e movq %r8, %r14 movq %rdx, %r15 movq %rsi, %r12 addq %rsi, %r15 movq -0x30(%rbp), %r13 addq %r13, %r14 movq 0x78(%rdi), %rax movq %rax, -0x40(%rbp) leaq -0x38(%rbp), %rsi movq %r12, %rdx movq %r15, %rcx callq 0x6e6d3 testl %eax, %eax jle 0x6eb3e movl %eax, %ebx movq -0x40(%rbp), %rax movq 0x8(%rax), %rcx movq -0x38(%rbp), %rax movzbl %ah, %edx movq (%rcx,%rdx,8), %rcx testq %rcx, %rcx je 0x6eb1d movzbl %al, %eax leaq (%rax,%rax,2), %rax movl 0x4(%rcx,%rax,4), %eax movq %rax, -0x38(%rbp) movq %rax, %rsi movq %r13, %rdx movq %r14, %rcx callq 0x6e798 testl %eax, %eax jle 0x6eb3e movl %ebx, %ecx addq %rcx, %r12 movl %eax, %eax addq %rax, %r13 cmpq %r15, %r12 jb 0x6eae1 subq -0x30(%rbp), %r13 movq %r13, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_casedn_utf8mb3: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r13, rcx mov [rbp+var_30], rcx test rdx, rdx jle short loc_6EB3E mov r14, r8 mov r15, rdx mov r12, rsi add r15, rsi mov r13, [rbp+var_30] add r14, r13 mov rax, [rdi+78h] mov [rbp+var_40], rax loc_6EAE1: lea rsi, [rbp+var_38] mov rdx, r12 mov rcx, r15 call my_utf8mb3_uni test eax, eax jle short loc_6EB3E mov ebx, eax mov rax, [rbp+var_40] mov rcx, [rax+8] mov rax, [rbp+var_38] movzx edx, ah mov rcx, [rcx+rdx*8] test rcx, rcx jz short loc_6EB1D movzx eax, al lea rax, [rax+rax*2] mov eax, [rcx+rax*4+4] mov [rbp+var_38], rax loc_6EB1D: mov rsi, rax mov rdx, r13 mov rcx, r14 call my_uni_utf8mb3 test eax, eax jle short loc_6EB3E mov ecx, ebx add r12, rcx mov eax, eax add r13, rax cmp r12, r15 jb short loc_6EAE1 loc_6EB3E: sub r13, [rbp+var_30] mov rax, r13 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_BYTE * my_casedn_utf8mb3(long long a1, unsigned __int8 *a2, long long a3, _BYTE *a4, long long a5) { _BYTE *v5; // r13 unsigned __int8 *v6; // r12 unsigned long long v7; // r15 unsigned long long v8; // r14 int v9; // eax unsigned int v10; // ebx unsigned long long v11; // rax long long v12; // rcx int v13; // eax long long v15; // [rsp+0h] [rbp-40h] unsigned long long v16; // [rsp+8h] [rbp-38h] BYREF _BYTE *v17; // [rsp+10h] [rbp-30h] v5 = a4; v17 = a4; if ( a3 > 0 ) { v6 = a2; v7 = (unsigned long long)&a2[a3]; v5 = v17; v8 = (unsigned long long)&v17[a5]; v15 = *(_QWORD *)(a1 + 120); do { v9 = my_utf8mb3_uni(a1, &v16, v6, v7); if ( v9 <= 0 ) break; v10 = v9; v11 = v16; v12 = *(_QWORD *)(*(_QWORD *)(v15 + 8) + 8LL * BYTE1(v16)); if ( v12 ) { v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v16 + 4); v16 = v11; } v13 = my_uni_utf8mb3(a1, v11, v5, v8); if ( v13 <= 0 ) break; v6 += v10; v5 += (unsigned int)v13; } while ( (unsigned long long)v6 < v7 ); } return (_BYTE *)(v5 - v17); }
my_casedn_utf8mb3: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R13,RCX MOV qword ptr [RBP + -0x30],RCX TEST RDX,RDX JLE 0x0016eb3e MOV R14,R8 MOV R15,RDX MOV R12,RSI ADD R15,RSI MOV R13,qword ptr [RBP + -0x30] ADD R14,R13 MOV RAX,qword ptr [RDI + 0x78] MOV qword ptr [RBP + -0x40],RAX LAB_0016eae1: LEA RSI,[RBP + -0x38] MOV RDX,R12 MOV RCX,R15 CALL 0x0016e6d3 TEST EAX,EAX JLE 0x0016eb3e MOV EBX,EAX MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x38] MOVZX EDX,AH MOV RCX,qword ptr [RCX + RDX*0x8] TEST RCX,RCX JZ 0x0016eb1d MOVZX EAX,AL LEA RAX,[RAX + RAX*0x2] MOV EAX,dword ptr [RCX + RAX*0x4 + 0x4] MOV qword ptr [RBP + -0x38],RAX LAB_0016eb1d: MOV RSI,RAX MOV RDX,R13 MOV RCX,R14 CALL 0x0016e798 TEST EAX,EAX JLE 0x0016eb3e MOV ECX,EBX ADD R12,RCX MOV EAX,EAX ADD R13,RAX CMP R12,R15 JC 0x0016eae1 LAB_0016eb3e: SUB R13,qword ptr [RBP + -0x30] MOV RAX,R13 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_casedn_utf8mb3(long param_1,ulong param_2,long param_3,long param_4) { long lVar1; long lVar2; uint uVar3; uint uVar4; long lVar5; ulong uVar6; int8 local_40; lVar5 = param_4; if (0 < param_3) { uVar6 = param_3 + param_2; lVar1 = *(long *)(param_1 + 0x78); do { uVar3 = my_utf8mb3_uni(); if ((int)uVar3 < 1) break; lVar2 = *(long *)(*(long *)(lVar1 + 8) + (local_40 >> 8 & 0xff) * 8); if (lVar2 != 0) { local_40 = (ulong)*(uint *)(lVar2 + 4 + (local_40 & 0xff) * 0xc); } uVar4 = my_uni_utf8mb3(); if ((int)uVar4 < 1) break; param_2 = param_2 + uVar3; lVar5 = lVar5 + (ulong)uVar4; } while (param_2 < uVar6); } return lVar5 - param_4; }
36,747
Catch::XmlReporter::listTags(std::vector<Catch::TagInfo, std::allocator<Catch::TagInfo>> const&)
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
void XmlReporter::listTags(std::vector<TagInfo> const& tags) { auto outerTag = m_xml.scopedElement("TagsFromMatchingTests"); for (auto const& tag : tags) { auto innerTag = m_xml.scopedElement("Tag"); m_xml.startElement("Count", XmlFormatting::Indent) .writeText(std::to_string(tag.count), XmlFormatting::None) .endElement(XmlFormatting::Newline); auto aliasTag = m_xml.scopedElement("Aliases"); for (auto const& alias : tag.spellings) { m_xml.startElement("Alias", XmlFormatting::Indent) .writeText(alias, XmlFormatting::None) .endElement(XmlFormatting::Newline); } } }
O3
cpp
Catch::XmlReporter::listTags(std::vector<Catch::TagInfo, std::allocator<Catch::TagInfo>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rsi, %r15 movq %rdi, %r14 leaq 0x18(%rsp), %rbx movq %rbx, -0x10(%rbx) leaq 0x6cf38(%rip), %rsi # 0xdea05 leaq 0x6cf46(%rip), %rdx # 0xdea1a leaq 0x8(%rsp), %rdi callq 0x37312 addq $0x98, %r14 leaq 0x78(%rsp), %rdi movq %r14, %rsi movl $0x3, %edx callq 0x642cc leaq 0x8(%rsp), %rsi movq %r14, %rdi movl $0x3, %edx callq 0x64692 movq 0x8(%rsp), %rdi cmpq %rbx, %rdi je 0x71b20 movq 0x18(%rsp), %rsi incq %rsi callq 0x17150 movq (%r15), %r12 movq 0x8(%r15), %rax movq %rax, 0x48(%rsp) cmpq %rax, %r12 je 0x71d7d leaq 0x8(%rsp), %rbp leaq 0x68(%rsp), %r15 movabsq $0x346dc5d63886594b, %r13 # imm = 0x346DC5D63886594B movq %rbx, 0x8(%rsp) movq %rbp, %rdi leaq 0x6cec3(%rip), %rsi # 0xdea1b leaq 0x6cebf(%rip), %rdx # 0xdea1e callq 0x37312 movq %r15, %rdi movq %r14, %rsi movl $0x3, %edx callq 0x642cc movq %r14, %rdi movq %rbp, %rsi movl $0x3, %edx callq 0x64692 movq 0x8(%rsp), %rdi cmpq %rbx, %rdi je 0x71b9b movq 0x18(%rsp), %rsi incq %rsi callq 0x17150 movq %rbx, 0x8(%rsp) movq %rbp, %rdi leaq 0x6ce75(%rip), %rsi # 0xdea1f leaq 0x6ce73(%rip), %rdx # 0xdea24 callq 0x37312 movq %r14, %rdi movq %rbp, %rsi movl $0x1, %edx callq 0x64692 movq 0x30(%r12), %r15 movl $0x1, %esi cmpq $0xa, %r15 jb 0x71c1b movl $0x4, %esi movq %r15, %rcx cmpq $0x63, %rcx jbe 0x71c14 cmpq $0x3e7, %rcx # imm = 0x3E7 jbe 0x71c19 cmpq $0x2710, %rcx # imm = 0x2710 jb 0x71c1b movq %rcx, %rax mulq %r13 shrq $0xb, %rdx addl $0x4, %esi cmpq $0x1869f, %rcx # imm = 0x1869F movq %rdx, %rcx ja 0x71bde addl $-0x3, %esi jmp 0x71c1b addl $-0x2, %esi jmp 0x71c1b decl %esi movl %esi, %esi leaq 0x38(%rsp), %rax movq %rax, 0x28(%rsp) leaq 0x28(%rsp), %rdi xorl %edx, %edx callq 0x49db0 movq 0x28(%rsp), %rdi movl 0x30(%rsp), %esi movq %r15, %rdx callq 0x49d2f movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx movq %r14, %rdi xorl %ecx, %ecx callq 0x6436c movq %r14, %rdi movl $0x2, %esi callq 0x18cd0 leaq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rsi movq %rbp, %rdx movq %rbx, %rcx callq 0x1920c movq %rbx, 0x8(%rsp) movq %rbp, %rdi leaq 0x6cd9c(%rip), %rsi # 0xdea25 leaq 0x6cd9c(%rip), %rdx # 0xdea2c callq 0x37312 leaq 0x58(%rsp), %rdi movq %r14, %rsi movl $0x3, %edx callq 0x642cc movq %r14, %rdi movq %rbp, %rsi movl $0x3, %edx callq 0x64692 movq 0x8(%rsp), %rdi cmpq %rbx, %rdi je 0x71cce movq 0x18(%rsp), %rsi incq %rsi callq 0x17150 movq 0x18(%r12), %r15 movq %r12, 0x50(%rsp) addq $0x8, %r12 cmpq %r12, %r15 je 0x71d52 movq %rbx, 0x8(%rsp) movq %rbp, %rdi leaq 0x6cd3d(%rip), %rsi # 0xdea2d leaq 0x6cd3b(%rip), %rdx # 0xdea32 callq 0x37312 movq %r14, %rdi movq %rbp, %rsi movl $0x1, %edx callq 0x64692 movq 0x20(%r15), %rsi movq 0x28(%r15), %rdx movq %r14, %rdi xorl %ecx, %ecx callq 0x6436c movq %r14, %rdi movl $0x2, %esi callq 0x18cd0 movq 0x8(%rsp), %rdi cmpq %rbx, %rdi je 0x71d42 movq 0x18(%rsp), %rsi incq %rsi callq 0x17150 movq %r15, %rdi callq 0x17ae0 movq %rax, %r15 cmpq %r12, %rax jne 0x71ce1 leaq 0x58(%rsp), %rdi callq 0x6433c leaq 0x68(%rsp), %r15 movq %r15, %rdi callq 0x6433c movq 0x50(%rsp), %r12 addq $0x38, %r12 cmpq 0x48(%rsp), %r12 jne 0x71b49 leaq 0x78(%rsp), %rdi callq 0x6433c addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 leaq 0x78(%rsp), %rdi callq 0x6433c jmp 0x71dab movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %rbx, %rdi je 0x71e9a movq 0x18(%rsp), %rsi incq %rsi callq 0x17150 jmp 0x71e9a movq %rax, %r14 jmp 0x71e9a movq %rax, %r14 leaq 0x58(%rsp), %rdi callq 0x6433c jmp 0x71e49 jmp 0x71de8 jmp 0x71ded jmp 0x71de8 movq %rax, %r14 jmp 0x71e49 movq %rax, %r14 jmp 0x71e86 movq %rax, %r14 leaq 0x68(%rsp), %rdi callq 0x6433c jmp 0x71e07 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %rbx, %rdi je 0x71e90 movq 0x18(%rsp), %rsi incq %rsi callq 0x17150 jmp 0x71e90 movq %rax, %r14 jmp 0x71e90 movq %rax, %r14 jmp 0x71e7c movq %rax, %r14 movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x71e49 movq 0x38(%rsp), %rsi incq %rsi callq 0x17150 movq 0x8(%rsp), %rdi cmpq %rbx, %rdi je 0x71e86 movq 0x18(%rsp), %rsi incq %rsi callq 0x17150 jmp 0x71e86 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %rbx, %rdi je 0x71e7c movq 0x18(%rsp), %rsi incq %rsi callq 0x17150 leaq 0x58(%rsp), %rdi callq 0x6433c leaq 0x68(%rsp), %rdi callq 0x6433c leaq 0x78(%rsp), %rdi callq 0x6433c movq %r14, %rdi callq 0x17740
_ZN5Catch11XmlReporter8listTagsERKSt6vectorINS_7TagInfoESaIS2_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov r15, rsi mov r14, rdi lea rbx, [rsp+0B8h+var_A0] mov [rbx-10h], rbx lea rsi, aTagsfrommatchi; "TagsFromMatchingTests" lea rdx, aTagsfrommatchi+15h; "" lea rdi, [rsp+0B8h+var_B0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) add r14, 98h lea rdi, [rsp+0B8h+var_40] mov rsi, r14 mov edx, 3 call _ZN5Catch9XmlWriter13ScopedElementC2EPS0_NS_13XmlFormattingE; Catch::XmlWriter::ScopedElement::ScopedElement(Catch::XmlWriter*,Catch::XmlFormatting) lea rsi, [rsp+0B8h+var_B0] mov rdi, r14; this mov edx, 3 call _ZN5Catch9XmlWriter12startElementERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13XmlFormattingE; Catch::XmlWriter::startElement(std::string const&,Catch::XmlFormatting) mov rdi, [rsp+0B8h+var_B0]; void * cmp rdi, rbx jz short loc_71B20 mov rsi, [rsp+0B8h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_71B20: mov r12, [r15] mov rax, [r15+8] mov [rsp+0B8h+var_70], rax cmp r12, rax jz loc_71D7D lea rbp, [rsp+0B8h+var_B0] lea r15, [rsp+0B8h+var_50] mov r13, 346DC5D63886594Bh loc_71B49: mov [rsp+0B8h+var_B0], rbx mov rdi, rbp lea rsi, aTag_0; "Tag" lea rdx, aTag_0+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 mov rsi, r14 mov edx, 3 call _ZN5Catch9XmlWriter13ScopedElementC2EPS0_NS_13XmlFormattingE; Catch::XmlWriter::ScopedElement::ScopedElement(Catch::XmlWriter*,Catch::XmlFormatting) mov rdi, r14; this mov rsi, rbp mov edx, 3 call _ZN5Catch9XmlWriter12startElementERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13XmlFormattingE; Catch::XmlWriter::startElement(std::string const&,Catch::XmlFormatting) mov rdi, [rsp+0B8h+var_B0]; void * cmp rdi, rbx jz short loc_71B9B mov rsi, [rsp+0B8h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_71B9B: mov [rsp+0B8h+var_B0], rbx mov rdi, rbp lea rsi, aCount; "Count" lea rdx, aCount+5; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdi, r14; this mov rsi, rbp mov edx, 1 call _ZN5Catch9XmlWriter12startElementERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13XmlFormattingE; Catch::XmlWriter::startElement(std::string const&,Catch::XmlFormatting) mov r15, [r12+30h] mov esi, 1 cmp r15, 0Ah jb short loc_71C1B mov esi, 4 mov rcx, r15 loc_71BDE: cmp rcx, 63h ; 'c' jbe short loc_71C14 cmp rcx, 3E7h jbe short loc_71C19 cmp rcx, 2710h jb short loc_71C1B mov rax, rcx mul r13 shr rdx, 0Bh add esi, 4 cmp rcx, 1869Fh mov rcx, rdx ja short loc_71BDE add esi, 0FFFFFFFDh jmp short loc_71C1B loc_71C14: add esi, 0FFFFFFFEh jmp short loc_71C1B loc_71C19: dec esi loc_71C1B: mov esi, esi lea rax, [rsp+0B8h+var_80] mov [rsp+0B8h+var_90], rax lea rdi, [rsp+0B8h+var_90] xor edx, edx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) mov rdi, [rsp+0B8h+var_90] mov esi, dword ptr [rsp+0B8h+var_88] mov rdx, r15 call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong) mov rsi, [rsp+0B8h+var_90] mov rdx, [rsp+0B8h+var_88] mov rdi, r14; this xor ecx, ecx call _ZN5Catch9XmlWriter9writeTextENS_9StringRefENS_13XmlFormattingE; Catch::XmlWriter::writeText(Catch::StringRef,Catch::XmlFormatting) mov rdi, r14; this mov esi, 2 call _ZN5Catch9XmlWriter10endElementENS_13XmlFormattingE; Catch::XmlWriter::endElement(Catch::XmlFormatting) lea rdi, [rsp+0B8h+var_90] lea rsi, [rsp+0B8h+var_80] mov rdx, rbp mov rcx, rbx call _ZN5Catch11XmlReporter8listTagsERKSt6vectorINS_7TagInfoESaIS2_EE_cold_1; Catch::XmlReporter::listTags(std::vector<Catch::TagInfo> const&) [clone] mov [rsp+0B8h+var_B0], rbx mov rdi, rbp lea rsi, aAliases; "Aliases" lea rdx, aAliases+7; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+0B8h+var_60] mov rsi, r14 mov edx, 3 call _ZN5Catch9XmlWriter13ScopedElementC2EPS0_NS_13XmlFormattingE; Catch::XmlWriter::ScopedElement::ScopedElement(Catch::XmlWriter*,Catch::XmlFormatting) mov rdi, r14; this mov rsi, rbp mov edx, 3 call _ZN5Catch9XmlWriter12startElementERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13XmlFormattingE; Catch::XmlWriter::startElement(std::string const&,Catch::XmlFormatting) mov rdi, [rsp+0B8h+var_B0]; void * cmp rdi, rbx jz short loc_71CCE mov rsi, [rsp+0B8h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_71CCE: mov r15, [r12+18h] mov [rsp+0B8h+var_68], r12 add r12, 8 cmp r15, r12 jz short loc_71D52 loc_71CE1: mov [rsp+0B8h+var_B0], rbx mov rdi, rbp lea rsi, aAlias; "Alias" lea rdx, aAlias+5; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdi, r14; this mov rsi, rbp mov edx, 1 call _ZN5Catch9XmlWriter12startElementERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13XmlFormattingE; Catch::XmlWriter::startElement(std::string const&,Catch::XmlFormatting) mov rsi, [r15+20h] mov rdx, [r15+28h] mov rdi, r14; this xor ecx, ecx call _ZN5Catch9XmlWriter9writeTextENS_9StringRefENS_13XmlFormattingE; Catch::XmlWriter::writeText(Catch::StringRef,Catch::XmlFormatting) mov rdi, r14; this mov esi, 2 call _ZN5Catch9XmlWriter10endElementENS_13XmlFormattingE; Catch::XmlWriter::endElement(Catch::XmlFormatting) mov rdi, [rsp+0B8h+var_B0]; void * cmp rdi, rbx jz short loc_71D42 mov rsi, [rsp+0B8h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_71D42: mov rdi, r15 call __ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base const*) mov r15, rax cmp rax, r12 jnz short loc_71CE1 loc_71D52: lea rdi, [rsp+0B8h+var_60]; this call _ZN5Catch9XmlWriter13ScopedElementD2Ev; Catch::XmlWriter::ScopedElement::~ScopedElement() lea r15, [rsp+0B8h+var_50] mov rdi, r15; this call _ZN5Catch9XmlWriter13ScopedElementD2Ev; Catch::XmlWriter::ScopedElement::~ScopedElement() mov r12, [rsp+0B8h+var_68] add r12, 38h ; '8' cmp r12, [rsp+0B8h+var_70] jnz loc_71B49 loc_71D7D: lea rdi, [rsp+0B8h+var_40]; this call _ZN5Catch9XmlWriter13ScopedElementD2Ev; Catch::XmlWriter::ScopedElement::~ScopedElement() add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax lea rdi, [rsp+arg_70]; this call _ZN5Catch9XmlWriter13ScopedElementD2Ev; Catch::XmlWriter::ScopedElement::~ScopedElement() jmp short loc_71DAB mov r14, rax loc_71DAB: mov rdi, [rsp+arg_0]; void * cmp rdi, rbx jz loc_71E9A mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp loc_71E9A mov r14, rax jmp loc_71E9A mov r14, rax lea rdi, [rsp+arg_50]; this call _ZN5Catch9XmlWriter13ScopedElementD2Ev; Catch::XmlWriter::ScopedElement::~ScopedElement() jmp short loc_71E49 jmp short loc_71DE8 jmp short loc_71DED jmp short $+2 loc_71DE8: mov r14, rax jmp short loc_71E49 loc_71DED: mov r14, rax jmp loc_71E86 mov r14, rax lea rdi, [rsp+arg_60]; this call _ZN5Catch9XmlWriter13ScopedElementD2Ev; Catch::XmlWriter::ScopedElement::~ScopedElement() jmp short loc_71E07 mov r14, rax loc_71E07: mov rdi, [rsp+arg_0]; void * cmp rdi, rbx jz short loc_71E90 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_71E90 mov r14, rax jmp short loc_71E90 mov r14, rax jmp short loc_71E7C mov r14, rax mov rdi, [rsp+arg_20]; void * lea rax, [rsp+arg_30] cmp rdi, rax jz short loc_71E49 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_71E49: mov rdi, [rsp+arg_0]; void * cmp rdi, rbx jz short loc_71E86 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_71E86 mov r14, rax mov rdi, [rsp+arg_0]; void * cmp rdi, rbx jz short loc_71E7C mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_71E7C: lea rdi, [rsp+arg_50]; this call _ZN5Catch9XmlWriter13ScopedElementD2Ev; Catch::XmlWriter::ScopedElement::~ScopedElement() loc_71E86: lea rdi, [rsp+arg_60]; this call _ZN5Catch9XmlWriter13ScopedElementD2Ev; Catch::XmlWriter::ScopedElement::~ScopedElement() loc_71E90: lea rdi, [rsp+arg_70]; this call _ZN5Catch9XmlWriter13ScopedElementD2Ev; Catch::XmlWriter::ScopedElement::~ScopedElement() loc_71E9A: mov rdi, r14 call __Unwind_Resume
void Catch::XmlReporter::listTags(long long a1, long long *a2, double a3) { Catch::XmlWriter *v3; // r14 long long v4; // r12 unsigned long long v5; // r15 unsigned int v6; // esi unsigned long long v7; // rcx bool v8; // cc long long v9; // r15 long long i; // r12 void *v11[2]; // [rsp+8h] [rbp-B0h] BYREF _QWORD v12[2]; // [rsp+18h] [rbp-A0h] BYREF char *v13; // [rsp+28h] [rbp-90h] BYREF long long v14; // [rsp+30h] [rbp-88h] _QWORD v15[2]; // [rsp+38h] [rbp-80h] BYREF long long v16; // [rsp+48h] [rbp-70h] long long v17; // [rsp+50h] [rbp-68h] Catch::XmlWriter *v18[2]; // [rsp+58h] [rbp-60h] BYREF Catch::XmlWriter *v19[2]; // [rsp+68h] [rbp-50h] BYREF Catch::XmlWriter *v20[8]; // [rsp+78h] [rbp-40h] BYREF v11[0] = v12; std::string::_M_construct<char const*>(v11, "TagsFromMatchingTests", (long long)""); v3 = (Catch::XmlWriter *)(a1 + 152); Catch::XmlWriter::ScopedElement::ScopedElement((long long)v20, a1 + 152, 3); Catch::XmlWriter::startElement((Catch::XmlWriter *)(a1 + 152), v11, 3); if ( v11[0] != v12 ) operator delete(v11[0], v12[0] + 1LL); v4 = *a2; v16 = a2[1]; if ( v4 != v16 ) { do { v11[0] = v12; std::string::_M_construct<char const*>(v11, "Tag", (long long)""); Catch::XmlWriter::ScopedElement::ScopedElement((long long)v19, (long long)v3, 3); Catch::XmlWriter::startElement(v3, v11, 3); if ( v11[0] != v12 ) operator delete(v11[0], v12[0] + 1LL); v11[0] = v12; std::string::_M_construct<char const*>(v11, "Count", (long long)""); Catch::XmlWriter::startElement(v3, v11, 1); v5 = *(_QWORD *)(v4 + 48); v6 = 1; if ( v5 >= 0xA ) { v6 = 4; v7 = *(_QWORD *)(v4 + 48); while ( 1 ) { if ( v7 <= 0x63 ) { v6 -= 2; goto LABEL_15; } if ( v7 <= 0x3E7 ) break; if ( v7 < 0x2710 ) goto LABEL_15; v6 += 4; v8 = v7 <= 0x1869F; v7 /= 0x2710uLL; if ( v8 ) { v6 -= 3; goto LABEL_15; } } --v6; } LABEL_15: v13 = (char *)v15; std::string::_M_construct((long long *)&v13, v6, 0); std::__detail::__to_chars_10_impl<unsigned long>(v13, v14, v5); Catch::XmlWriter::writeText(v3, (long long)v13, v14, 0, a3); Catch::XmlWriter::endElement(v3, 2); Catch::XmlReporter::listTags((void **)&v13, v15, v11, v12); v11[0] = v12; std::string::_M_construct<char const*>(v11, "Aliases", (long long)""); Catch::XmlWriter::ScopedElement::ScopedElement((long long)v18, (long long)v3, 3); Catch::XmlWriter::startElement(v3, v11, 3); if ( v11[0] != v12 ) operator delete(v11[0], v12[0] + 1LL); v9 = *(_QWORD *)(v4 + 24); v17 = v4; for ( i = v4 + 8; v9 != i; v9 = std::_Rb_tree_increment(v9) ) { v11[0] = v12; std::string::_M_construct<char const*>(v11, "Alias", (long long)""); Catch::XmlWriter::startElement(v3, v11, 1); Catch::XmlWriter::writeText(v3, *(_QWORD *)(v9 + 32), *(_QWORD *)(v9 + 40), 0, a3); Catch::XmlWriter::endElement(v3, 2); if ( v11[0] != v12 ) operator delete(v11[0], v12[0] + 1LL); } Catch::XmlWriter::ScopedElement::~ScopedElement(v18); Catch::XmlWriter::ScopedElement::~ScopedElement(v19); v4 = v17 + 56; } while ( v17 + 56 != v16 ); } Catch::XmlWriter::ScopedElement::~ScopedElement(v20); }
listTags: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV R15,RSI MOV R14,RDI LEA RBX,[RSP + 0x18] MOV qword ptr [RBX + -0x10],RBX LAB_00171ac6: LEA RSI,[0x1dea05] LEA RDX,[0x1dea1a] LEA RDI,[RSP + 0x8] CALL 0x00137312 ADD R14,0x98 LAB_00171ae5: LEA RDI,[RSP + 0x78] MOV RSI,R14 MOV EDX,0x3 CALL 0x001642cc LAB_00171af7: LEA RSI,[RSP + 0x8] MOV RDI,R14 MOV EDX,0x3 CALL 0x00164692 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,RBX JZ 0x00171b20 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00117150 LAB_00171b20: MOV R12,qword ptr [R15] MOV RAX,qword ptr [R15 + 0x8] MOV qword ptr [RSP + 0x48],RAX CMP R12,RAX JZ 0x00171d7d LEA RBP,[RSP + 0x8] LEA R15,[RSP + 0x68] MOV R13,0x346dc5d63886594b LAB_00171b49: MOV qword ptr [RSP + 0x8],RBX LAB_00171b4e: MOV RDI,RBP LEA RSI,[0x1dea1b] LEA RDX,[0x1dea1e] CALL 0x00137312 LAB_00171b64: MOV RDI,R15 MOV RSI,R14 MOV EDX,0x3 CALL 0x001642cc LAB_00171b74: MOV RDI,R14 MOV RSI,RBP MOV EDX,0x3 CALL 0x00164692 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,RBX JZ 0x00171b9b MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00117150 LAB_00171b9b: MOV qword ptr [RSP + 0x8],RBX LAB_00171ba0: MOV RDI,RBP LEA RSI,[0x1dea1f] LEA RDX,[0x1dea24] CALL 0x00137312 LAB_00171bb6: MOV RDI,R14 MOV RSI,RBP MOV EDX,0x1 CALL 0x00164692 MOV R15,qword ptr [R12 + 0x30] MOV ESI,0x1 CMP R15,0xa JC 0x00171c1b MOV ESI,0x4 MOV RCX,R15 LAB_00171bde: CMP RCX,0x63 JBE 0x00171c14 CMP RCX,0x3e7 JBE 0x00171c19 CMP RCX,0x2710 JC 0x00171c1b MOV RAX,RCX MUL R13 SHR RDX,0xb ADD ESI,0x4 CMP RCX,0x1869f MOV RCX,RDX JA 0x00171bde ADD ESI,-0x3 JMP 0x00171c1b LAB_00171c14: ADD ESI,-0x2 JMP 0x00171c1b LAB_00171c19: DEC ESI LAB_00171c1b: MOV ESI,ESI LEA RAX,[RSP + 0x38] MOV qword ptr [RSP + 0x28],RAX LAB_00171c27: LEA RDI,[RSP + 0x28] XOR EDX,EDX CALL 0x00149db0 MOV RDI,qword ptr [RSP + 0x28] MOV ESI,dword ptr [RSP + 0x30] MOV RDX,R15 CALL 0x00149d2f MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] LAB_00171c4e: MOV RDI,R14 XOR ECX,ECX CALL 0x0016436c MOV RDI,R14 MOV ESI,0x2 CALL 0x00118cd0 LAB_00171c65: LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x38] MOV RDX,RBP MOV RCX,RBX CALL 0x0011920c MOV qword ptr [RSP + 0x8],RBX LAB_00171c7f: MOV RDI,RBP LEA RSI,[0x1dea25] LEA RDX,[0x1dea2c] CALL 0x00137312 LAB_00171c95: LEA RDI,[RSP + 0x58] MOV RSI,R14 MOV EDX,0x3 CALL 0x001642cc LAB_00171ca7: MOV RDI,R14 MOV RSI,RBP MOV EDX,0x3 CALL 0x00164692 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,RBX JZ 0x00171cce MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00117150 LAB_00171cce: MOV R15,qword ptr [R12 + 0x18] MOV qword ptr [RSP + 0x50],R12 ADD R12,0x8 CMP R15,R12 JZ 0x00171d52 LAB_00171ce1: MOV qword ptr [RSP + 0x8],RBX LAB_00171ce6: MOV RDI,RBP LEA RSI,[0x1dea2d] LEA RDX,[0x1dea32] CALL 0x00137312 LAB_00171cfc: MOV RDI,R14 MOV RSI,RBP MOV EDX,0x1 CALL 0x00164692 MOV RSI,qword ptr [R15 + 0x20] MOV RDX,qword ptr [R15 + 0x28] MOV RDI,R14 XOR ECX,ECX CALL 0x0016436c MOV RDI,R14 MOV ESI,0x2 CALL 0x00118cd0 LAB_00171d2b: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,RBX JZ 0x00171d42 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00117150 LAB_00171d42: MOV RDI,R15 CALL 0x00117ae0 MOV R15,RAX CMP RAX,R12 JNZ 0x00171ce1 LAB_00171d52: LEA RDI,[RSP + 0x58] CALL 0x0016433c LEA R15,[RSP + 0x68] MOV RDI,R15 CALL 0x0016433c MOV R12,qword ptr [RSP + 0x50] ADD R12,0x38 CMP R12,qword ptr [RSP + 0x48] JNZ 0x00171b49 LAB_00171d7d: LEA RDI,[RSP + 0x78] CALL 0x0016433c ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* Catch::XmlReporter::listTags(std::vector<Catch::TagInfo, std::allocator<Catch::TagInfo> > const&) */ void __thiscall Catch::XmlReporter::listTags(XmlReporter *this,vector *param_1) { ulong uVar1; bool bVar2; uint uVar3; _Rb_tree_node_base *p_Var4; ulong uVar5; uint uVar6; long lVar7; XmlWriter *pXVar8; long *local_b0 [2]; long local_a0 [2]; char *local_90; uint local_88; int4 uStack_84; char local_80 [16]; long local_70; long local_68; ScopedElement local_60 [16]; ScopedElement local_50 [16]; ScopedElement local_40 [16]; /* try { // try from 00171ac6 to 00171add has its CatchHandler @ 00171dcb */ local_b0[0] = local_a0; std::__cxx11::string::_M_construct<char_const*>(local_b0,"TagsFromMatchingTests",""); pXVar8 = (XmlWriter *)(this + 0x98); /* try { // try from 00171ae5 to 00171af6 has its CatchHandler @ 00171da8 */ XmlWriter::ScopedElement::ScopedElement(local_40,pXVar8,3); /* try { // try from 00171af7 to 00171b08 has its CatchHandler @ 00171d99 */ XmlWriter::startElement(pXVar8,local_b0,3); if (local_b0[0] != local_a0) { operator_delete(local_b0[0],local_a0[0] + 1); } lVar7 = *(long *)param_1; local_70 = *(long *)(param_1 + 8); if (lVar7 != local_70) { do { local_b0[0] = local_a0; /* try { // try from 00171b4e to 00171b63 has its CatchHandler @ 00171e20 */ std::__cxx11::string::_M_construct<char_const*>(local_b0,&DAT_001dea1b,&DAT_001dea1e); /* try { // try from 00171b64 to 00171b73 has its CatchHandler @ 00171e04 */ XmlWriter::ScopedElement::ScopedElement(local_50,pXVar8,3); /* try { // try from 00171b74 to 00171b83 has its CatchHandler @ 00171df5 */ XmlWriter::startElement(pXVar8,local_b0,3); if (local_b0[0] != local_a0) { operator_delete(local_b0[0],local_a0[0] + 1); } local_b0[0] = local_a0; /* try { // try from 00171ba0 to 00171bb5 has its CatchHandler @ 00171ded */ std::__cxx11::string::_M_construct<char_const*>(local_b0,"Count",""); /* try { // try from 00171bb6 to 00171bc5 has its CatchHandler @ 00171de8 */ XmlWriter::startElement(pXVar8,local_b0,1); uVar1 = *(ulong *)(lVar7 + 0x30); uVar6 = 1; if (9 < uVar1) { uVar5 = uVar1; uVar3 = 4; do { uVar6 = uVar3; if (uVar5 < 100) { uVar6 = uVar6 - 2; goto LAB_00171c1b; } if (uVar5 < 1000) { uVar6 = uVar6 - 1; goto LAB_00171c1b; } if (uVar5 < 10000) goto LAB_00171c1b; bVar2 = 99999 < uVar5; uVar5 = uVar5 / 10000; uVar3 = uVar6 + 4; } while (bVar2); uVar6 = uVar6 + 1; } LAB_00171c1b: local_90 = local_80; /* try { // try from 00171c27 to 00171c32 has its CatchHandler @ 00171de6 */ std::__cxx11::string::_M_construct((string *)&local_90,(ulong)uVar6,'\0'); std::__detail::__to_chars_10_impl<unsigned_long>(local_90,local_88,uVar1); /* try { // try from 00171c4e to 00171c64 has its CatchHandler @ 00171e2a */ XmlWriter::writeText(pXVar8,local_90,CONCAT44(uStack_84,local_88),0); XmlWriter::endElement(pXVar8,2); listTags((vector *)&local_90); local_b0[0] = local_a0; /* try { // try from 00171c7f to 00171c94 has its CatchHandler @ 00171de4 */ std::__cxx11::string::_M_construct<char_const*>(local_b0,"Aliases",""); /* try { // try from 00171c95 to 00171ca6 has its CatchHandler @ 00171de2 */ XmlWriter::ScopedElement::ScopedElement(local_60,pXVar8,3); /* try { // try from 00171ca7 to 00171cb6 has its CatchHandler @ 00171dd3 */ XmlWriter::startElement(pXVar8,local_b0,3); if (local_b0[0] != local_a0) { operator_delete(local_b0[0],local_a0[0] + 1); } local_68 = lVar7; for (p_Var4 = *(_Rb_tree_node_base **)(lVar7 + 0x18); p_Var4 != (_Rb_tree_node_base *)(lVar7 + 8); p_Var4 = (_Rb_tree_node_base *)std::_Rb_tree_increment(p_Var4)) { local_b0[0] = local_a0; /* try { // try from 00171ce6 to 00171cfb has its CatchHandler @ 00171e25 */ std::__cxx11::string::_M_construct<char_const*>(local_b0,"Alias",""); /* try { // try from 00171cfc to 00171d2a has its CatchHandler @ 00171e62 */ XmlWriter::startElement(pXVar8,local_b0,1); XmlWriter::writeText(pXVar8,*(int8 *)(p_Var4 + 0x20),*(int8 *)(p_Var4 + 0x28),0) ; XmlWriter::endElement(pXVar8,2); if (local_b0[0] != local_a0) { operator_delete(local_b0[0],local_a0[0] + 1); } } XmlWriter::ScopedElement::~ScopedElement(local_60); XmlWriter::ScopedElement::~ScopedElement(local_50); lVar7 = local_68 + 0x38; } while (lVar7 != local_70); } XmlWriter::ScopedElement::~ScopedElement(local_40); return; }
36,748
common_log::common_log(unsigned long)
llama.cpp/common/log.cpp
common_log(size_t capacity) { file = nullptr; prefix = false; timestamps = false; running = false; t_start = t_us(); // initial message size - will be expanded if longer messages arrive entries.resize(capacity); for (auto & entry : entries) { entry.msg.resize(256); } head = 0; tail = 0; resume(); }
O3
cpp
common_log::common_log(unsigned long): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rsi, %r12 movq %rdi, %rbx leaq 0x30(%rdi), %r14 xorps %xmm0, %xmm0 movups %xmm0, 0x20(%rdi) movups %xmm0, 0x10(%rdi) movups %xmm0, (%rdi) movq %r14, %rdi callq 0x17980 leaq 0x78(%rbx), %r15 xorl %eax, %eax movq %rax, 0x88(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x78(%rbx) movups %xmm0, 0xb0(%rbx) movq %rax, 0xc0(%rbx) movq %rax, 0x60(%rbx) movl $0x0, 0x67(%rbx) callq 0x17800 movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF imulq %rcx movq %rdx, %rax shrq $0x3f, %rax sarq $0x7, %rdx addq %rax, %rdx movq %rdx, 0x70(%rbx) movq %r15, %rdi movq %r12, %rsi callq 0x5a3f2 movq 0x78(%rbx), %r12 movq 0x80(%rbx), %r13 cmpq %r13, %r12 je 0x5a38e leaq 0x10(%r12), %rdi movl $0x100, %esi # imm = 0x100 callq 0x5a434 addq $0x30, %r12 jmp 0x5a374 xorps %xmm0, %xmm0 movups %xmm0, 0x90(%rbx) movq %rbx, %rdi callq 0x59e10 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq jmp 0x5a3ac movq %rax, %r12 leaq 0xb0(%rbx), %rax movq (%rax), %rdi testq %rdi, %rdi je 0x5a3cd movq 0xc0(%rbx), %rsi subq %rdi, %rsi callq 0x17100 movq %r15, %rdi callq 0x5a460 movq %r14, %rdi callq 0x177a0 cmpq $0x0, 0x28(%rbx) jne 0x5a3ec movq %r12, %rdi callq 0x17710 callq 0x17c10 nop
_ZN10common_logC2Em: push r15 push r14 push r13 push r12 push rbx mov r12, rsi mov rbx, rdi lea r14, [rdi+30h] xorps xmm0, xmm0 movups xmmword ptr [rdi+20h], xmm0 movups xmmword ptr [rdi+10h], xmm0 movups xmmword ptr [rdi], xmm0 mov rdi, r14; this call __ZNSt18condition_variableC1Ev; std::condition_variable::condition_variable(void) lea r15, [rbx+78h] xor eax, eax mov [rbx+88h], rax xorps xmm0, xmm0 movups xmmword ptr [rbx+78h], xmm0 movups xmmword ptr [rbx+0B0h], xmm0 mov [rbx+0C0h], rax mov [rbx+60h], rax mov dword ptr [rbx+67h], 0 call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void) mov rcx, 20C49BA5E353F7CFh imul rcx mov rax, rdx shr rax, 3Fh sar rdx, 7 add rdx, rax mov [rbx+70h], rdx mov rdi, r15 mov rsi, r12 call _ZNSt6vectorI16common_log_entrySaIS0_EE6resizeEm; std::vector<common_log_entry>::resize(ulong) mov r12, [rbx+78h] mov r13, [rbx+80h] loc_5A374: cmp r12, r13 jz short loc_5A38E lea rdi, [r12+10h] mov esi, 100h call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong) add r12, 30h ; '0' jmp short loc_5A374 loc_5A38E: xorps xmm0, xmm0 movups xmmword ptr [rbx+90h], xmm0 mov rdi, rbx; this call _ZN10common_log6resumeEv; common_log::resume(void) pop rbx pop r12 pop r13 pop r14 pop r15 retn jmp short $+2 loc_5A3AC: mov r12, rax lea rax, [rbx+0B0h] mov rdi, [rax]; void * test rdi, rdi jz short loc_5A3CD mov rsi, [rbx+0C0h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5A3CD: mov rdi, r15 call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector() mov rdi, r14; this call __ZNSt18condition_variableD1Ev; std::condition_variable::~condition_variable() cmp qword ptr [rbx+28h], 0 jnz short loc_5A3EC mov rdi, r12 call __Unwind_Resume loc_5A3EC: call __ZSt9terminatev; std::terminate(void)
void common_log::common_log(common_log *this, long long a2) { std::condition_variable *v3; // rdi long long v4; // r12 long long v5; // r13 *((_OWORD *)this + 2) = 0LL; *((_OWORD *)this + 1) = 0LL; *(_OWORD *)this = 0LL; v3 = (common_log *)((char *)this + 48); std::condition_variable::condition_variable(v3); *((_QWORD *)this + 17) = 0LL; *(_OWORD *)((char *)this + 120) = 0LL; *((_OWORD *)this + 11) = 0LL; *((_QWORD *)this + 24) = 0LL; *((_QWORD *)this + 12) = 0LL; *(_DWORD *)((char *)this + 103) = 0; *((_QWORD *)this + 14) = std::chrono::_V2::system_clock::now(v3) / 1000LL; std::vector<common_log_entry>::resize((char *)this + 120, a2); v4 = *((_QWORD *)this + 15); v5 = *((_QWORD *)this + 16); while ( v4 != v5 ) { std::vector<char>::resize(v4 + 16, 256LL); v4 += 48LL; } *((_OWORD *)this + 9) = 0LL; common_log::resume(this); }
common_log: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R12,RSI MOV RBX,RDI LEA R14,[RDI + 0x30] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x20],XMM0 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV RDI,R14 CALL 0x00117980 LEA R15,[RBX + 0x78] XOR EAX,EAX MOV qword ptr [RBX + 0x88],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x78],XMM0 MOVUPS xmmword ptr [RBX + 0xb0],XMM0 MOV qword ptr [RBX + 0xc0],RAX MOV qword ptr [RBX + 0x60],RAX MOV dword ptr [RBX + 0x67],0x0 CALL 0x00117800 MOV RCX,0x20c49ba5e353f7cf IMUL RCX MOV RAX,RDX SHR RAX,0x3f SAR RDX,0x7 ADD RDX,RAX MOV qword ptr [RBX + 0x70],RDX LAB_0015a35e: MOV RDI,R15 MOV RSI,R12 CALL 0x0015a3f2 MOV R12,qword ptr [RBX + 0x78] MOV R13,qword ptr [RBX + 0x80] LAB_0015a374: CMP R12,R13 JZ 0x0015a38e LEA RDI,[R12 + 0x10] LAB_0015a37e: MOV ESI,0x100 CALL 0x0015a434 ADD R12,0x30 JMP 0x0015a374 LAB_0015a38e: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x90],XMM0 LAB_0015a398: MOV RDI,RBX CALL 0x00159e10 LAB_0015a3a0: POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* common_log::common_log(unsigned long) */ void __thiscall common_log::common_log(common_log *this,ulong param_1) { long lVar1; long lVar2; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; std::condition_variable::condition_variable((condition_variable *)(this + 0x30)); *(int8 *)(this + 0x88) = 0; *(int8 *)(this + 0x78) = 0; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0xb0) = 0; *(int8 *)(this + 0xb8) = 0; *(int8 *)(this + 0xc0) = 0; *(int8 *)(this + 0x60) = 0; *(int4 *)(this + 0x67) = 0; lVar2 = std::chrono::_V2::system_clock::now(); *(long *)(this + 0x70) = lVar2 / 1000; /* try { // try from 0015a35e to 0015a368 has its CatchHandler @ 0015a3aa */ std::vector<common_log_entry,std::allocator<common_log_entry>>::resize ((vector<common_log_entry,std::allocator<common_log_entry>> *)(this + 0x78),param_1); lVar1 = *(long *)(this + 0x80); for (lVar2 = *(long *)(this + 0x78); lVar2 != lVar1; lVar2 = lVar2 + 0x30) { /* try { // try from 0015a37e to 0015a387 has its CatchHandler @ 0015a3ac */ std::vector<char,std::allocator<char>>::resize ((vector<char,std::allocator<char>> *)(lVar2 + 0x10),0x100); } *(int8 *)(this + 0x90) = 0; *(int8 *)(this + 0x98) = 0; /* try { // try from 0015a398 to 0015a39f has its CatchHandler @ 0015a3aa */ resume(this); return; }
36,749
pagecache_delete
eloqsql/storage/maria/ma_pagecache.c
my_bool pagecache_delete(PAGECACHE *pagecache, PAGECACHE_FILE *file, pgcache_page_no_t pageno, enum pagecache_page_lock lock, my_bool flush) { my_bool error= 0; enum pagecache_page_pin pin= lock_to_pin_one_phase[lock]; DBUG_ENTER("pagecache_delete"); DBUG_PRINT("enter", ("fd: %u page: %lu %s %s", (uint) file->file, (ulong) pageno, page_cache_page_lock_str[lock], page_cache_page_pin_str[pin])); DBUG_ASSERT(lock == PAGECACHE_LOCK_WRITE || lock == PAGECACHE_LOCK_LEFT_WRITELOCKED); DBUG_ASSERT(pin == PAGECACHE_PIN || pin == PAGECACHE_PIN_LEFT_PINNED); restart: DBUG_ASSERT(pageno < ((1ULL) << 40)); if (pagecache->can_be_used) { /* Key cache is used */ reg1 PAGECACHE_BLOCK_LINK *block; PAGECACHE_HASH_LINK **unused_start, *page_link; pagecache_pthread_mutex_lock(&pagecache->cache_lock); if (!pagecache->can_be_used) goto end; inc_counter_for_resize_op(pagecache); page_link= get_present_hash_link(pagecache, file, pageno, &unused_start); if (!page_link) { DBUG_PRINT("info", ("There is no such page in the cache")); dec_counter_for_resize_op(pagecache); pagecache_pthread_mutex_unlock(&pagecache->cache_lock); DBUG_RETURN(0); } block= page_link->block; if (block->status & (PCBLOCK_REASSIGNED | PCBLOCK_IN_SWITCH)) { DBUG_PRINT("info", ("Block %p already is %s", block, ((block->status & PCBLOCK_REASSIGNED) ? "reassigned" : "in switch"))); PCBLOCK_INFO(block); page_link->requests--; dec_counter_for_resize_op(pagecache); goto end; } /* See NOTE for pagecache_unlock about registering requests. */ if (pin == PAGECACHE_PIN) reg_requests(pagecache, block, 1); if (make_lock_and_pin(pagecache, block, lock, pin, FALSE)) { /* We failed to writelock the block, cache is unlocked, and last write lock is released, we will try to get the block again. */ if (pin == PAGECACHE_PIN) unreg_request(pagecache, block, 1); dec_counter_for_resize_op(pagecache); pagecache_pthread_mutex_unlock(&pagecache->cache_lock); dec_counter_for_resize_op(pagecache); DBUG_PRINT("info", ("restarting...")); goto restart; } /* we can't delete with opened direct link for write */ DBUG_ASSERT((block->status & PCBLOCK_DIRECT_W) == 0); error= pagecache_delete_internal(pagecache, block, page_link, flush); end: pagecache_pthread_mutex_unlock(&pagecache->cache_lock); } DBUG_RETURN(error); }
O0
c
pagecache_delete: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movb %r8b, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movb %al, -0x25(%rbp) movb $0x0, -0x26(%rbp) movl -0x24(%rbp), %eax movl %eax, %ecx leaq 0x28e143(%rip), %rax # 0x2be1f0 movl (%rax,%rcx,4), %eax movl %eax, -0x2c(%rbp) jmp 0x300b5 jmp 0x300b7 jmp 0x300b9 jmp 0x300bb jmp 0x300bd jmp 0x300bf jmp 0x300c1 jmp 0x300c3 movq -0x10(%rbp), %rax cmpb $0x0, 0x1aa(%rax) je 0x3022f movq -0x10(%rbp), %rdi addq $0xc8, %rdi leaq 0x122626(%rip), %rsi # 0x15270c movl $0x107a, %edx # imm = 0x107A callq 0x2d850 movq -0x10(%rbp), %rax cmpb $0x0, 0x1aa(%rax) jne 0x30102 jmp 0x3021f movq -0x10(%rbp), %rdi callq 0x2dc00 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx leaq -0x40(%rbp), %rcx callq 0x30240 movq %rax, -0x48(%rbp) cmpq $0x0, -0x48(%rbp) jne 0x30151 jmp 0x3012d jmp 0x3012f movq -0x10(%rbp), %rdi callq 0x2e930 movq -0x10(%rbp), %rdi addq $0xc8, %rdi callq 0x2d8c0 movb $0x0, -0x1(%rbp) jmp 0x30237 movq -0x48(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movzwl 0x74(%rax), %eax andl $0xc, %eax cmpl $0x0, %eax je 0x30190 jmp 0x3016f jmp 0x30171 jmp 0x30173 jmp 0x30175 movq -0x48(%rbp), %rax movl 0x68(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x68(%rax) movq -0x10(%rbp), %rdi callq 0x2e930 jmp 0x3021f cmpl $0x2, -0x2c(%rbp) jne 0x301a8 movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rsi movl $0x1, %edx callq 0x30320 movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rsi movl -0x24(%rbp), %edx movl -0x2c(%rbp), %ecx xorl %r8d, %r8d callq 0x2e610 cmpb $0x0, %al je 0x30203 cmpl $0x2, -0x2c(%rbp) jne 0x301da movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rsi movl $0x1, %edx callq 0x2e7b0 movq -0x10(%rbp), %rdi callq 0x2e930 movq -0x10(%rbp), %rdi addq $0xc8, %rdi callq 0x2d8c0 movq -0x10(%rbp), %rdi callq 0x2e930 jmp 0x301fe jmp 0x300bf jmp 0x30205 jmp 0x30207 movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x48(%rbp), %rdx movsbl -0x25(%rbp), %ecx callq 0x2fdc0 movb %al, -0x26(%rbp) movq -0x10(%rbp), %rdi addq $0xc8, %rdi callq 0x2d8c0 jmp 0x30231 movb -0x26(%rbp), %al movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x50, %rsp popq %rbp retq
pagecache_delete: push rbp mov rbp, rsp sub rsp, 50h mov al, r8b mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_25], al mov [rbp+var_26], 0 mov eax, [rbp+var_24] mov ecx, eax lea rax, lock_to_pin_one_phase mov eax, [rax+rcx*4] mov [rbp+var_2C], eax jmp short $+2 loc_300B5: jmp short $+2 loc_300B7: jmp short $+2 loc_300B9: jmp short $+2 loc_300BB: jmp short $+2 loc_300BD: jmp short $+2 loc_300BF: jmp short $+2 loc_300C1: jmp short $+2 loc_300C3: mov rax, [rbp+var_10] cmp byte ptr [rax+1AAh], 0 jz loc_3022F mov rdi, [rbp+var_10] add rdi, 0C8h lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 107Ah call inline_mysql_mutex_lock mov rax, [rbp+var_10] cmp byte ptr [rax+1AAh], 0 jnz short loc_30102 jmp loc_3021F loc_30102: mov rdi, [rbp+var_10] call inc_counter_for_resize_op mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] lea rcx, [rbp+var_40] call get_present_hash_link mov [rbp+var_48], rax cmp [rbp+var_48], 0 jnz short loc_30151 jmp short $+2 loc_3012D: jmp short $+2 loc_3012F: mov rdi, [rbp+var_10] call dec_counter_for_resize_op mov rdi, [rbp+var_10] add rdi, 0C8h call inline_mysql_mutex_unlock mov [rbp+var_1], 0 jmp loc_30237 loc_30151: mov rax, [rbp+var_48] mov rax, [rax+10h] mov [rbp+var_38], rax mov rax, [rbp+var_38] movzx eax, word ptr [rax+74h] and eax, 0Ch cmp eax, 0 jz short loc_30190 jmp short $+2 loc_3016F: jmp short $+2 loc_30171: jmp short $+2 loc_30173: jmp short $+2 loc_30175: mov rax, [rbp+var_48] mov ecx, [rax+68h] add ecx, 0FFFFFFFFh mov [rax+68h], ecx mov rdi, [rbp+var_10] call dec_counter_for_resize_op jmp loc_3021F loc_30190: cmp [rbp+var_2C], 2 jnz short loc_301A8 mov rdi, [rbp+var_10] mov rsi, [rbp+var_38] mov edx, 1 call reg_requests loc_301A8: mov rdi, [rbp+var_10] mov rsi, [rbp+var_38] mov edx, [rbp+var_24] mov ecx, [rbp+var_2C] xor r8d, r8d call make_lock_and_pin cmp al, 0 jz short loc_30203 cmp [rbp+var_2C], 2 jnz short loc_301DA mov rdi, [rbp+var_10] mov rsi, [rbp+var_38] mov edx, 1 call unreg_request loc_301DA: mov rdi, [rbp+var_10] call dec_counter_for_resize_op mov rdi, [rbp+var_10] add rdi, 0C8h call inline_mysql_mutex_unlock mov rdi, [rbp+var_10] call dec_counter_for_resize_op jmp short $+2 loc_301FE: jmp loc_300BF loc_30203: jmp short $+2 loc_30205: jmp short $+2 loc_30207: mov rdi, [rbp+var_10] mov rsi, [rbp+var_38] mov rdx, [rbp+var_48] movsx ecx, [rbp+var_25] call pagecache_delete_internal mov [rbp+var_26], al loc_3021F: mov rdi, [rbp+var_10] add rdi, 0C8h call inline_mysql_mutex_unlock loc_3022F: jmp short $+2 loc_30231: mov al, [rbp+var_26] mov [rbp+var_1], al loc_30237: mov al, [rbp+var_1] add rsp, 50h pop rbp retn
char pagecache_delete(_QWORD *a1, long long a2, long long a3, unsigned int a4, bool a5) { long long present_hash_link; // [rsp+8h] [rbp-48h] _BYTE v7[8]; // [rsp+10h] [rbp-40h] BYREF long long v8; // [rsp+18h] [rbp-38h] int v9; // [rsp+24h] [rbp-2Ch] char v10; // [rsp+2Ah] [rbp-26h] bool v11; // [rsp+2Bh] [rbp-25h] unsigned int v12; // [rsp+2Ch] [rbp-24h] long long v13; // [rsp+30h] [rbp-20h] long long v14; // [rsp+38h] [rbp-18h] _QWORD *v15; // [rsp+40h] [rbp-10h] v15 = a1; v14 = a2; v13 = a3; v12 = a4; v11 = a5; v10 = 0; v9 = lock_to_pin_one_phase[a4]; while ( *((_BYTE *)v15 + 426) ) { inline_mysql_mutex_lock( (long long)(v15 + 25), (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x107Au); if ( !*((_BYTE *)v15 + 426) ) goto LABEL_15; inc_counter_for_resize_op((long long)v15); present_hash_link = get_present_hash_link(v15, v14, v13, v7); if ( !present_hash_link ) { dec_counter_for_resize_op((long long)v15); inline_mysql_mutex_unlock((long long)(v15 + 25)); return 0; } v8 = *(_QWORD *)(present_hash_link + 16); if ( (*(_WORD *)(v8 + 116) & 0xC) != 0 ) { --*(_DWORD *)(present_hash_link + 104); dec_counter_for_resize_op((long long)v15); LABEL_15: inline_mysql_mutex_unlock((long long)(v15 + 25)); return v10; } if ( v9 == 2 ) reg_requests(v15, v8, 1LL); if ( !make_lock_and_pin((long long)v15, v8, v12, v9, 0) ) { v10 = pagecache_delete_internal(v15, v8, present_hash_link, v11); goto LABEL_15; } if ( v9 == 2 ) unreg_request(v15, v8, 1); dec_counter_for_resize_op((long long)v15); inline_mysql_mutex_unlock((long long)(v15 + 25)); dec_counter_for_resize_op((long long)v15); } return v10; }
pagecache_delete: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV AL,R8B MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV byte ptr [RBP + -0x25],AL MOV byte ptr [RBP + -0x26],0x0 MOV EAX,dword ptr [RBP + -0x24] MOV ECX,EAX LEA RAX,[0x3be1f0] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RBP + -0x2c],EAX JMP 0x001300b5 LAB_001300b5: JMP 0x001300b7 LAB_001300b7: JMP 0x001300b9 LAB_001300b9: JMP 0x001300bb LAB_001300bb: JMP 0x001300bd LAB_001300bd: JMP 0x001300bf LAB_001300bf: JMP 0x001300c1 LAB_001300c1: JMP 0x001300c3 LAB_001300c3: MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x1aa],0x0 JZ 0x0013022f MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0xc8 LEA RSI,[0x25270c] MOV EDX,0x107a CALL 0x0012d850 MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x1aa],0x0 JNZ 0x00130102 JMP 0x0013021f LAB_00130102: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012dc00 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] LEA RCX,[RBP + -0x40] CALL 0x00130240 MOV qword ptr [RBP + -0x48],RAX CMP qword ptr [RBP + -0x48],0x0 JNZ 0x00130151 JMP 0x0013012d LAB_0013012d: JMP 0x0013012f LAB_0013012f: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012e930 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0xc8 CALL 0x0012d8c0 MOV byte ptr [RBP + -0x1],0x0 JMP 0x00130237 LAB_00130151: MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,word ptr [RAX + 0x74] AND EAX,0xc CMP EAX,0x0 JZ 0x00130190 JMP 0x0013016f LAB_0013016f: JMP 0x00130171 LAB_00130171: JMP 0x00130173 LAB_00130173: JMP 0x00130175 LAB_00130175: MOV RAX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RAX + 0x68] ADD ECX,-0x1 MOV dword ptr [RAX + 0x68],ECX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012e930 JMP 0x0013021f LAB_00130190: CMP dword ptr [RBP + -0x2c],0x2 JNZ 0x001301a8 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x38] MOV EDX,0x1 CALL 0x00130320 LAB_001301a8: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x38] MOV EDX,dword ptr [RBP + -0x24] MOV ECX,dword ptr [RBP + -0x2c] XOR R8D,R8D CALL 0x0012e610 CMP AL,0x0 JZ 0x00130203 CMP dword ptr [RBP + -0x2c],0x2 JNZ 0x001301da MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x38] MOV EDX,0x1 CALL 0x0012e7b0 LAB_001301da: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012e930 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0xc8 CALL 0x0012d8c0 MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012e930 JMP 0x001301fe LAB_001301fe: JMP 0x001300bf LAB_00130203: JMP 0x00130205 LAB_00130205: JMP 0x00130207 LAB_00130207: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x48] MOVSX ECX,byte ptr [RBP + -0x25] CALL 0x0012fdc0 MOV byte ptr [RBP + -0x26],AL LAB_0013021f: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0xc8 CALL 0x0012d8c0 LAB_0013022f: JMP 0x00130231 LAB_00130231: MOV AL,byte ptr [RBP + -0x26] MOV byte ptr [RBP + -0x1],AL LAB_00130237: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x50 POP RBP RET
int8 pagecache_delete(long param_1,int8 param_2,int8 param_3,uint param_4,char param_5) { char cVar1; long lVar2; int7 extraout_var; int7 uVar3; int1 local_48 [8]; long local_40; int local_34; int1 local_2e; char local_2d; uint local_2c; int8 local_28; int8 local_20; long local_18; int1 local_9; local_2e = 0; local_34 = *(int *)(lock_to_pin_one_phase + (ulong)param_4 * 4); local_2d = param_5; local_2c = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; do { if (*(char *)(local_18 + 0x1aa) == '\0') { LAB_0013022f: uVar3 = (int7)((ulong)local_18 >> 8); local_9 = local_2e; LAB_00130237: return CONCAT71(uVar3,local_9); } inline_mysql_mutex_lock (local_18 + 200, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",0x107a); if (*(char *)(local_18 + 0x1aa) == '\0') goto LAB_0013021f; inc_counter_for_resize_op(local_18); lVar2 = get_present_hash_link(local_18,local_20,local_28,local_48); if (lVar2 == 0) { dec_counter_for_resize_op(local_18); inline_mysql_mutex_unlock(local_18 + 200); local_9 = 0; uVar3 = extraout_var; goto LAB_00130237; } local_40 = *(long *)(lVar2 + 0x10); if ((*(ushort *)(local_40 + 0x74) & 0xc) != 0) { *(int *)(lVar2 + 0x68) = *(int *)(lVar2 + 0x68) + -1; dec_counter_for_resize_op(local_18); LAB_0013021f: local_18 = inline_mysql_mutex_unlock(local_18 + 200); goto LAB_0013022f; } if (local_34 == 2) { reg_requests(local_18,local_40,1); } cVar1 = make_lock_and_pin(local_18,local_40,local_2c,local_34,0); if (cVar1 == '\0') { local_2e = pagecache_delete_internal(local_18,local_40,lVar2,(int)local_2d); goto LAB_0013021f; } if (local_34 == 2) { unreg_request(local_18,local_40,1); } dec_counter_for_resize_op(local_18); inline_mysql_mutex_unlock(local_18 + 200); dec_counter_for_resize_op(local_18); } while( true ); }
36,750
escape_quotes_for_mysql
eloqsql/mysys/charset.c
size_t escape_quotes_for_mysql(CHARSET_INFO *charset_info, char *to, size_t to_length, const char *from, size_t length, my_bool *overflow) { const char *to_start= to; const char *end, *to_end=to_start + (to_length ? to_length-1 : 2*length); #ifdef USE_MB my_bool use_mb_flag= my_ci_use_mb(charset_info); #endif *overflow= FALSE; for (end= from + length; from < end; from++) { #ifdef USE_MB int tmp_length; if (use_mb_flag && (tmp_length= my_ismbchar(charset_info, from, end))) { if (to + tmp_length > to_end) { *overflow= TRUE; break; } while (tmp_length--) *to++= *from++; from--; continue; } /* We don't have the same issue here with a non-multi-byte character being turned into a multi-byte character by the addition of an escaping character, because we are only escaping the ' character with itself. */ #endif if (*from == '\'') { if (to + 2 > to_end) { *overflow= TRUE; break; } *to++= '\''; *to++= '\''; } else { if (to + 1 > to_end) { *overflow= TRUE; break; } *to++= *from; } } *to= 0; return (size_t) (to - to_start); }
O0
c
escape_quotes_for_mysql: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x58(%rbp) cmpq $0x0, -0x18(%rbp) je 0xdc8d5 movq -0x18(%rbp), %rax subq $0x1, %rax movq %rax, -0x60(%rbp) jmp 0xdc8e0 movq -0x28(%rbp), %rax shlq %rax movq %rax, -0x60(%rbp) movq -0x58(%rbp), %rax movq -0x60(%rbp), %rcx addq %rcx, %rax movq %rax, -0x48(%rbp) movq -0x8(%rbp), %rdi callq 0xdca50 movb %al, -0x49(%rbp) movq -0x30(%rbp), %rax movb $0x0, (%rax) movq -0x20(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x20(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0xdca29 movsbl -0x49(%rbp), %eax cmpl $0x0, %eax je 0xdc99f movq -0x8(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x40(%rbp), %rdx callq 0xdca80 movl %eax, -0x50(%rbp) cmpl $0x0, %eax je 0xdc99f movq -0x10(%rbp), %rax movslq -0x50(%rbp), %rcx addq %rcx, %rax cmpq -0x48(%rbp), %rax jbe 0xdc95b movq -0x30(%rbp), %rax movb $0x1, (%rax) jmp 0xdca29 jmp 0xdc95d movl -0x50(%rbp), %eax movl %eax, %ecx addl $-0x1, %ecx movl %ecx, -0x50(%rbp) cmpl $0x0, %eax je 0xdc991 movq -0x20(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x20(%rbp) movb (%rax), %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) jmp 0xdc95d movq -0x20(%rbp), %rax addq $-0x1, %rax movq %rax, -0x20(%rbp) jmp 0xdca18 movq -0x20(%rbp), %rax movsbl (%rax), %eax cmpl $0x27, %eax jne 0xdc9e8 movq -0x10(%rbp), %rax addq $0x2, %rax cmpq -0x48(%rbp), %rax jbe 0xdc9c2 movq -0x30(%rbp), %rax movb $0x1, (%rax) jmp 0xdca29 movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb $0x27, (%rax) movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb $0x27, (%rax) jmp 0xdca16 movq -0x10(%rbp), %rax addq $0x1, %rax cmpq -0x48(%rbp), %rax jbe 0xdc9ff movq -0x30(%rbp), %rax movb $0x1, (%rax) jmp 0xdca29 movq -0x20(%rbp), %rax movb (%rax), %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) jmp 0xdca18 movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) jmp 0xdc90e movq -0x10(%rbp), %rax movb $0x0, (%rax) movq -0x10(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
escape_quotes_for_mysql: 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_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_10] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_58], rax cmp [rbp+var_18], 0 jz short loc_DC8D5 mov rax, [rbp+var_18] sub rax, 1 mov [rbp+var_60], rax jmp short loc_DC8E0 loc_DC8D5: mov rax, [rbp+var_28] shl rax, 1 mov [rbp+var_60], rax loc_DC8E0: mov rax, [rbp+var_58] mov rcx, [rbp+var_60] add rax, rcx mov [rbp+var_48], rax mov rdi, [rbp+var_8] call my_ci_use_mb mov [rbp+var_49], al mov rax, [rbp+var_30] mov byte ptr [rax], 0 mov rax, [rbp+var_20] add rax, [rbp+var_28] mov [rbp+var_40], rax loc_DC90E: mov rax, [rbp+var_20] cmp rax, [rbp+var_40] jnb loc_DCA29 movsx eax, [rbp+var_49] cmp eax, 0 jz short loc_DC99F mov rdi, [rbp+var_8] mov rsi, [rbp+var_20] mov rdx, [rbp+var_40] call my_ismbchar mov [rbp+var_50], eax cmp eax, 0 jz short loc_DC99F mov rax, [rbp+var_10] movsxd rcx, [rbp+var_50] add rax, rcx cmp rax, [rbp+var_48] jbe short loc_DC95B mov rax, [rbp+var_30] mov byte ptr [rax], 1 jmp loc_DCA29 loc_DC95B: jmp short $+2 loc_DC95D: mov eax, [rbp+var_50] mov ecx, eax add ecx, 0FFFFFFFFh mov [rbp+var_50], ecx cmp eax, 0 jz short loc_DC991 mov rax, [rbp+var_20] mov rcx, rax add rcx, 1 mov [rbp+var_20], rcx mov cl, [rax] mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl jmp short loc_DC95D loc_DC991: mov rax, [rbp+var_20] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_20], rax jmp short loc_DCA18 loc_DC99F: mov rax, [rbp+var_20] movsx eax, byte ptr [rax] cmp eax, 27h ; ''' jnz short loc_DC9E8 mov rax, [rbp+var_10] add rax, 2 cmp rax, [rbp+var_48] jbe short loc_DC9C2 mov rax, [rbp+var_30] mov byte ptr [rax], 1 jmp short loc_DCA29 loc_DC9C2: mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov byte ptr [rax], 27h ; ''' mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov byte ptr [rax], 27h ; ''' jmp short loc_DCA16 loc_DC9E8: mov rax, [rbp+var_10] add rax, 1 cmp rax, [rbp+var_48] jbe short loc_DC9FF mov rax, [rbp+var_30] mov byte ptr [rax], 1 jmp short loc_DCA29 loc_DC9FF: mov rax, [rbp+var_20] mov cl, [rax] mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl loc_DCA16: jmp short $+2 loc_DCA18: mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax jmp loc_DC90E loc_DCA29: mov rax, [rbp+var_10] mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov rcx, [rbp+var_38] sub rax, rcx add rsp, 60h pop rbp retn
_BYTE * escape_quotes_for_mysql(long long a1, char *a2, long long a3, char *a4, long long a5, _BYTE *a6) { char *v7; // rax char v8; // cl char *v9; // rax _BYTE *v10; // rax char *v11; // rax long long v13; // [rsp+0h] [rbp-60h] int v14; // [rsp+10h] [rbp-50h] char v15; // [rsp+17h] [rbp-49h] unsigned long long v16; // [rsp+18h] [rbp-48h] char *v17; // [rsp+20h] [rbp-40h] char *v21; // [rsp+50h] [rbp-10h] v21 = a2; if ( a3 ) v13 = a3 - 1; else v13 = 2 * a5; v16 = (unsigned long long)&a2[v13]; v15 = my_ci_use_mb(a1); *a6 = 0; v17 = &a4[a5]; while ( a4 < v17 ) { if ( v15 && (v14 = my_ismbchar(a1, a4, v17)) != 0 ) { if ( (unsigned long long)&v21[v14] > v16 ) { *a6 = 1; break; } while ( v14-- ) { v7 = a4++; v8 = *v7; v9 = v21++; *v9 = v8; } --a4; } else if ( *a4 == 39 ) { if ( (unsigned long long)(v21 + 2) > v16 ) { *a6 = 1; break; } *v21 = 39; v10 = v21 + 1; v21 += 2; *v10 = 39; } else { if ( (unsigned long long)(v21 + 1) > v16 ) { *a6 = 1; break; } v11 = v21++; *v11 = *a4; } ++a4; } *v21 = 0; return (_BYTE *)(v21 - a2); }
escape_quotes_for_mysql: 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 qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x58],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x001dc8d5 MOV RAX,qword ptr [RBP + -0x18] SUB RAX,0x1 MOV qword ptr [RBP + -0x60],RAX JMP 0x001dc8e0 LAB_001dc8d5: MOV RAX,qword ptr [RBP + -0x28] SHL RAX,0x1 MOV qword ptr [RBP + -0x60],RAX LAB_001dc8e0: MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x60] ADD RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x001dca50 MOV byte ptr [RBP + -0x49],AL MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x40],RAX LAB_001dc90e: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x40] JNC 0x001dca29 MOVSX EAX,byte ptr [RBP + -0x49] CMP EAX,0x0 JZ 0x001dc99f MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x40] CALL 0x001dca80 MOV dword ptr [RBP + -0x50],EAX CMP EAX,0x0 JZ 0x001dc99f MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x50] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x48] JBE 0x001dc95b MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x1 JMP 0x001dca29 LAB_001dc95b: JMP 0x001dc95d LAB_001dc95d: MOV EAX,dword ptr [RBP + -0x50] MOV ECX,EAX ADD ECX,-0x1 MOV dword ptr [RBP + -0x50],ECX CMP EAX,0x0 JZ 0x001dc991 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x20],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL JMP 0x001dc95d LAB_001dc991: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,-0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x001dca18 LAB_001dc99f: MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,byte ptr [RAX] CMP EAX,0x27 JNZ 0x001dc9e8 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x48] JBE 0x001dc9c2 MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x1 JMP 0x001dca29 LAB_001dc9c2: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV byte ptr [RAX],0x27 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV byte ptr [RAX],0x27 JMP 0x001dca16 LAB_001dc9e8: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x48] JBE 0x001dc9ff MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x1 JMP 0x001dca29 LAB_001dc9ff: MOV RAX,qword ptr [RBP + -0x20] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL LAB_001dca16: JMP 0x001dca18 LAB_001dca18: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x001dc90e LAB_001dca29: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX ADD RSP,0x60 POP RBP RET
long escape_quotes_for_mysql (int8 param_1,char *param_2,long param_3,char *param_4,long param_5, int1 *param_6) { char cVar1; char *pcVar2; long local_68; int local_58; char *local_28; char *local_18; if (param_3 == 0) { local_68 = param_5 << 1; } else { local_68 = param_3 + -1; } pcVar2 = param_2 + local_68; cVar1 = my_ci_use_mb(param_1); *param_6 = 0; local_28 = param_4; local_18 = param_2; do { if (param_4 + param_5 <= local_28) { LAB_001dca29: *local_18 = '\0'; return (long)local_18 - (long)param_2; } if ((cVar1 == '\0') || (local_58 = my_ismbchar(param_1,local_28,param_4 + param_5), local_58 == 0)) { if (*local_28 == '\'') { if (pcVar2 < local_18 + 2) { *param_6 = 1; goto LAB_001dca29; } *local_18 = '\''; local_18[1] = '\''; local_18 = local_18 + 2; } else { if (pcVar2 < local_18 + 1) { *param_6 = 1; goto LAB_001dca29; } *local_18 = *local_28; local_18 = local_18 + 1; } } else { if (pcVar2 < local_18 + local_58) { *param_6 = 1; goto LAB_001dca29; } while (local_58 != 0) { *local_18 = *local_28; local_58 = local_58 + -1; local_28 = local_28 + 1; local_18 = local_18 + 1; } local_28 = local_28 + -1; } local_28 = local_28 + 1; } while( true ); }
36,751
resize_simple_key_cache
eloqsql/mysys/mf_keycache.c
static int resize_simple_key_cache(SIMPLE_KEY_CACHE_CB *keycache, uint key_cache_block_size, size_t use_mem, uint division_limit, uint age_threshold, uint changed_blocks_hash_size) { int blocks= 0; DBUG_ENTER("resize_simple_key_cache"); DBUG_ASSERT(keycache->key_cache_inited); /* Note that the cache_lock mutex and the resize_queue are left untouched. We do not lose the cache_lock and will release it only at the end of this function. */ if (prepare_resize_simple_key_cache(keycache, 0)) goto finish; /* The following will work even if use_mem is 0 */ blocks= init_simple_key_cache(keycache, key_cache_block_size, use_mem, division_limit, age_threshold, changed_blocks_hash_size); finish: finish_resize_simple_key_cache(keycache); DBUG_RETURN(blocks); }
O0
c
resize_simple_key_cache: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movl %r8d, -0x20(%rbp) movl %r9d, -0x24(%rbp) movl $0x0, -0x28(%rbp) jmp 0xea377 movq -0x8(%rbp), %rdi xorl %esi, %esi callq 0xeb0f0 cmpl $0x0, %eax je 0xea389 jmp 0xea3a7 movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x18(%rbp), %rdx movl -0x1c(%rbp), %ecx movl -0x20(%rbp), %r8d movl -0x24(%rbp), %r9d callq 0xe9d20 movl %eax, -0x28(%rbp) movq -0x8(%rbp), %rdi callq 0xeb210 movl -0x28(%rbp), %eax movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax addq $0x30, %rsp popq %rbp retq nop
resize_simple_key_cache: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_20], r8d mov [rbp+var_24], r9d mov [rbp+var_28], 0 jmp short $+2 loc_EA377: mov rdi, [rbp+var_8] xor esi, esi call prepare_resize_simple_key_cache cmp eax, 0 jz short loc_EA389 jmp short loc_EA3A7 loc_EA389: mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rdx, [rbp+var_18] mov ecx, [rbp+var_1C] mov r8d, [rbp+var_20] mov r9d, [rbp+var_24] call init_simple_key_cache mov [rbp+var_28], eax loc_EA3A7: mov rdi, [rbp+var_8] call finish_resize_simple_key_cache mov eax, [rbp+var_28] mov [rbp+var_2C], eax mov eax, [rbp+var_2C] add rsp, 30h pop rbp retn
long long resize_simple_key_cache( long long a1, unsigned int a2, unsigned long long a3, unsigned int a4, unsigned int a5, unsigned int a6) { unsigned int inited; // [rsp+8h] [rbp-28h] inited = 0; if ( !(unsigned int)prepare_resize_simple_key_cache(a1, 0LL) ) inited = init_simple_key_cache(a1, a2, a3, a4, a5, a6); finish_resize_simple_key_cache(a1); return inited; }
resize_simple_key_cache: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV dword ptr [RBP + -0x20],R8D MOV dword ptr [RBP + -0x24],R9D MOV dword ptr [RBP + -0x28],0x0 JMP 0x001ea377 LAB_001ea377: MOV RDI,qword ptr [RBP + -0x8] XOR ESI,ESI CALL 0x001eb0f0 CMP EAX,0x0 JZ 0x001ea389 JMP 0x001ea3a7 LAB_001ea389: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x1c] MOV R8D,dword ptr [RBP + -0x20] MOV R9D,dword ptr [RBP + -0x24] CALL 0x001e9d20 MOV dword ptr [RBP + -0x28],EAX LAB_001ea3a7: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001eb210 MOV EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x2c],EAX MOV EAX,dword ptr [RBP + -0x2c] ADD RSP,0x30 POP RBP RET
int4 resize_simple_key_cache (int8 param_1,int4 param_2,int8 param_3,int4 param_4, int4 param_5,int4 param_6) { int iVar1; int4 local_30; local_30 = 0; iVar1 = prepare_resize_simple_key_cache(param_1,0); if (iVar1 == 0) { local_30 = init_simple_key_cache(param_1,param_2,param_3,param_4,param_5,param_6); } finish_resize_simple_key_cache(param_1); return local_30; }
36,752
google::protobuf::MethodDescriptorProto::_InternalParse(char const*, google::protobuf::internal::ParseContext*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
const char* MethodDescriptorProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure _Internal::HasBits has_bits{}; while (!ctx->Done(&ptr)) { uint32_t tag; ptr = ::_pbi::ReadTag(ptr, &tag); switch (tag >> 3) { // optional string name = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { auto str = _internal_mutable_name(); ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); #ifndef NDEBUG ::_pbi::VerifyUTF8(str, "google.protobuf.MethodDescriptorProto.name"); #endif // !NDEBUG } else goto handle_unusual; continue; // optional string input_type = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { auto str = _internal_mutable_input_type(); ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); #ifndef NDEBUG ::_pbi::VerifyUTF8(str, "google.protobuf.MethodDescriptorProto.input_type"); #endif // !NDEBUG } else goto handle_unusual; continue; // optional string output_type = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { auto str = _internal_mutable_output_type(); ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); #ifndef NDEBUG ::_pbi::VerifyUTF8(str, "google.protobuf.MethodDescriptorProto.output_type"); #endif // !NDEBUG } else goto handle_unusual; continue; // optional .google.protobuf.MethodOptions options = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) { ptr = ctx->ParseMessage(_internal_mutable_options(), ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional bool client_streaming = 5 [default = false]; case 5: if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) { _Internal::set_has_client_streaming(&has_bits); _impl_.client_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional bool server_streaming = 6 [default = false]; case 6: if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) { _Internal::set_has_server_streaming(&has_bits); _impl_.server_streaming_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; default: goto handle_unusual; } // switch handle_unusual: if ((tag == 0) || ((tag & 7) == 4)) { CHK_(ptr); ctx->SetLastTag(tag); goto message_done; } ptr = UnknownFieldParse( tag, _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), ptr, ctx); CHK_(ptr != nullptr); } // while message_done: _impl_._has_bits_.Or(has_bits); return ptr; failure: ptr = nullptr; goto message_done; #undef CHK_ }
O0
cpp
google::protobuf::MethodDescriptorProto::_InternalParse(char const*, google::protobuf::internal::ParseContext*): subq $0x98, %rsp movq %rdi, 0x68(%rsp) movq %rsi, 0x60(%rsp) movq %rdx, 0x58(%rsp) movq 0x68(%rsp), %rax movq %rax, 0x20(%rsp) leaq 0x54(%rsp), %rax movq %rax, 0x88(%rsp) movq 0x88(%rsp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, 0x28(%rsp) movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax movq 0x28(%rsp), %rcx movl $0x0, (%rax) addq $0x4, %rax cmpq %rcx, %rax movq %rax, 0x30(%rsp) jne 0xbb3f6 jmp 0xbb416 movq 0x58(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0xd41f0 xorb $-0x1, %al testb $0x1, %al jne 0xbb430 jmp 0xbb75b movq 0x60(%rsp), %rdi leaq 0x50(%rsp), %rsi xorl %edx, %edx callq 0xd4220 movq %rax, 0x60(%rsp) movl 0x50(%rsp), %eax shrl $0x3, %eax decl %eax movl %eax, %ecx movq %rcx, 0x18(%rsp) subl $0x5, %eax ja 0xbb677 movq 0x18(%rsp), %rax leaq 0x134f35(%rip), %rcx # 0x1f03a0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl 0x50(%rsp), %eax movzbl %al, %eax cmpl $0xa, %eax jne 0xbb4c0 movq 0x20(%rsp), %rdi callq 0xd8f60 movq %rax, 0x48(%rsp) movq 0x48(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x58(%rsp), %rdx callq 0x1b4980 movq %rax, 0x60(%rsp) cmpq $0x0, 0x60(%rsp) setne %al xorb $-0x1, %al testb $0x1, %al jne 0xbb4b9 jmp 0xbb4be jmp 0xbb77d jmp 0xbb4c5 jmp 0xbb679 jmp 0xbb416 movl 0x50(%rsp), %eax movzbl %al, %eax cmpl $0x12, %eax jne 0xbb516 movq 0x20(%rsp), %rdi callq 0x81af0 movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x58(%rsp), %rdx callq 0x1b4980 movq %rax, 0x60(%rsp) cmpq $0x0, 0x60(%rsp) setne %al xorb $-0x1, %al testb $0x1, %al jne 0xbb50f jmp 0xbb514 jmp 0xbb77d jmp 0xbb51b jmp 0xbb679 jmp 0xbb416 movl 0x50(%rsp), %eax movzbl %al, %eax cmpl $0x1a, %eax jne 0xbb56c movq 0x20(%rsp), %rdi callq 0x81b50 movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x58(%rsp), %rdx callq 0x1b4980 movq %rax, 0x60(%rsp) cmpq $0x0, 0x60(%rsp) setne %al xorb $-0x1, %al testb $0x1, %al jne 0xbb565 jmp 0xbb56a jmp 0xbb77d jmp 0xbb571 jmp 0xbb679 jmp 0xbb416 movl 0x50(%rsp), %eax movzbl %al, %eax cmpl $0x22, %eax jne 0xbb5c5 movq 0x20(%rsp), %rdi movq 0x58(%rsp), %rax movq %rax, 0x10(%rsp) callq 0x81bc0 movq 0x10(%rsp), %rdi movq %rax, %rsi movq 0x60(%rsp), %rdx callq 0x1b4330 movq %rax, 0x60(%rsp) cmpq $0x0, 0x60(%rsp) setne %al xorb $-0x1, %al testb $0x1, %al jne 0xbb5be jmp 0xbb5c3 jmp 0xbb77d jmp 0xbb5ca jmp 0xbb679 jmp 0xbb416 movl 0x50(%rsp), %eax movzbl %al, %eax cmpl $0x28, %eax jne 0xbb61c leaq 0x54(%rsp), %rdi callq 0xd8fc0 leaq 0x60(%rsp), %rdi callq 0xd72e0 movq %rax, %rcx movq 0x20(%rsp), %rax cmpq $0x0, %rcx setne %cl andb $0x1, %cl movb %cl, 0x38(%rax) cmpq $0x0, 0x60(%rsp) setne %al xorb $-0x1, %al testb $0x1, %al jne 0xbb615 jmp 0xbb61a jmp 0xbb77d jmp 0xbb61e jmp 0xbb679 jmp 0xbb416 movl 0x50(%rsp), %eax movzbl %al, %eax cmpl $0x30, %eax jne 0xbb670 leaq 0x54(%rsp), %rdi callq 0xd8ff0 leaq 0x60(%rsp), %rdi callq 0xd72e0 movq %rax, %rcx movq 0x20(%rsp), %rax cmpq $0x0, %rcx setne %cl andb $0x1, %cl movb %cl, 0x39(%rax) cmpq $0x0, 0x60(%rsp) setne %al xorb $-0x1, %al testb $0x1, %al jne 0xbb669 jmp 0xbb66e jmp 0xbb77d jmp 0xbb672 jmp 0xbb679 jmp 0xbb416 jmp 0xbb679 cmpl $0x0, 0x50(%rsp) je 0xbb68c movl 0x50(%rsp), %eax andl $0x7, %eax cmpl $0x4, %eax jne 0xbb6b5 cmpq $0x0, 0x60(%rsp) setne %al xorb $-0x1, %al testb $0x1, %al jne 0xbb69d jmp 0xbb6a2 jmp 0xbb77d movq 0x58(%rsp), %rdi movl 0x50(%rsp), %esi callq 0xd4350 jmp 0xbb75d movq 0x20(%rsp), %rax movl 0x50(%rsp), %ecx movq %rcx, (%rsp) addq $0x8, %rax movq %rax, 0x70(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x8(%rsp) movq %rax, 0x80(%rsp) movq 0x80(%rsp), %rax movq %rax, 0x90(%rsp) movq 0x90(%rsp), %rax movq (%rax), %rax andq $0x1, %rax cmpq $0x0, %rax je 0xbb717 movq 0x8(%rsp), %rdi callq 0x9cd40 addq $0x8, %rax movq %rax, 0x78(%rsp) jmp 0xbb726 movq 0x8(%rsp), %rdi callq 0xdf250 movq %rax, 0x78(%rsp) movq (%rsp), %rdi movq 0x78(%rsp), %rsi movq 0x60(%rsp), %rdx movq 0x58(%rsp), %rcx callq 0x163b20 movq %rax, 0x60(%rsp) cmpq $0x0, 0x60(%rsp) setne %al xorb $-0x1, %al testb $0x1, %al jne 0xbb754 jmp 0xbb756 jmp 0xbb77d jmp 0xbb416 jmp 0xbb75d movq 0x20(%rsp), %rdi addq $0x10, %rdi leaq 0x54(%rsp), %rsi callq 0xd5090 movq 0x60(%rsp), %rax addq $0x98, %rsp retq movq $0x0, 0x60(%rsp) jmp 0xbb75d nopl (%rax,%rax)
_ZN6google8protobuf21MethodDescriptorProto14_InternalParseEPKcPNS0_8internal12ParseContextE: sub rsp, 98h mov qword ptr [rsp+98h+var_30], rdi; int mov [rsp+98h+var_38], rsi mov [rsp+98h+var_40], rdx; int mov rax, qword ptr [rsp+98h+var_30] mov [rsp+98h+var_78], rax; int lea rax, [rsp+98h+var_48+4] mov [rsp+98h+var_10], rax mov rax, [rsp+98h+var_10] mov rcx, rax add rcx, 4 mov qword ptr [rsp+98h+var_70], rcx; int mov qword ptr [rsp+98h+var_68], rax loc_BB3F6: mov rax, qword ptr [rsp+98h+var_68] mov rcx, qword ptr [rsp+98h+var_70] mov dword ptr [rax], 0 add rax, 4 cmp rax, rcx mov qword ptr [rsp+98h+var_68], rax; int jnz short loc_BB3F6 jmp short $+2 loc_BB416: mov rdi, [rsp+98h+var_40]; this lea rsi, [rsp+98h+var_38]; char ** call _ZN6google8protobuf8internal12ParseContext4DoneEPPKc; google::protobuf::internal::ParseContext::Done(char const**) xor al, 0FFh test al, 1 jnz short loc_BB430 jmp loc_BB75B loc_BB430: mov rdi, [rsp+98h+var_38]; this lea rsi, [rsp+98h+var_48]; char ** xor edx, edx; unsigned int * call _ZN6google8protobuf8internal7ReadTagEPKcPjj; google::protobuf::internal::ReadTag(char const*,uint *,uint) mov [rsp+98h+var_38], rax; int mov eax, dword ptr [rsp+98h+var_48] shr eax, 3 dec eax; switch 6 cases mov ecx, eax mov qword ptr [rsp+98h+var_80], rcx; int sub eax, 5 ja def_BB472; jumptable 00000000000BB472 default case mov rax, qword ptr [rsp+98h+var_80] lea rcx, jpt_BB472 movsxd rax, ds:(jpt_BB472 - 1F03A0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_BB474: mov eax, dword ptr [rsp+98h+var_48]; jumptable 00000000000BB472 case 1 movzx eax, al cmp eax, 0Ah jnz short loc_BB4C0 mov rdi, [rsp+98h+var_78] call _ZN6google8protobuf21MethodDescriptorProto22_internal_mutable_nameB5cxx11Ev; google::protobuf::MethodDescriptorProto::_internal_mutable_name(void) mov [rsp+98h+var_50], rax mov rdi, [rsp+98h+var_50] mov rsi, [rsp+98h+var_38] mov rdx, [rsp+98h+var_40] call _ZN6google8protobuf8internal24InlineGreedyStringParserEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcPNS1_12ParseContextE; google::protobuf::internal::InlineGreedyStringParser(std::string *,char const*,google::protobuf::internal::ParseContext *) mov [rsp+98h+var_38], rax cmp [rsp+98h+var_38], 0 setnz al xor al, 0FFh test al, 1 jnz short loc_BB4B9 jmp short loc_BB4BE loc_BB4B9: jmp loc_BB77D loc_BB4BE: jmp short loc_BB4C5 loc_BB4C0: jmp loc_BB679 loc_BB4C5: jmp loc_BB416 loc_BB4CA: mov eax, dword ptr [rsp+98h+var_48]; jumptable 00000000000BB472 case 2 movzx eax, al cmp eax, 12h jnz short loc_BB516 mov rdi, [rsp+98h+var_78] call _ZN6google8protobuf21MethodDescriptorProto28_internal_mutable_input_typeB5cxx11Ev; google::protobuf::MethodDescriptorProto::_internal_mutable_input_type(void) mov [rsp+98h+var_58], rax mov rdi, [rsp+98h+var_58] mov rsi, [rsp+98h+var_38] mov rdx, [rsp+98h+var_40] call _ZN6google8protobuf8internal24InlineGreedyStringParserEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcPNS1_12ParseContextE; google::protobuf::internal::InlineGreedyStringParser(std::string *,char const*,google::protobuf::internal::ParseContext *) mov [rsp+98h+var_38], rax cmp [rsp+98h+var_38], 0 setnz al xor al, 0FFh test al, 1 jnz short loc_BB50F jmp short loc_BB514 loc_BB50F: jmp loc_BB77D loc_BB514: jmp short loc_BB51B loc_BB516: jmp loc_BB679 loc_BB51B: jmp loc_BB416 loc_BB520: mov eax, dword ptr [rsp+98h+var_48]; jumptable 00000000000BB472 case 3 movzx eax, al cmp eax, 1Ah jnz short loc_BB56C mov rdi, [rsp+98h+var_78] call _ZN6google8protobuf21MethodDescriptorProto29_internal_mutable_output_typeB5cxx11Ev; google::protobuf::MethodDescriptorProto::_internal_mutable_output_type(void) mov [rsp+98h+var_60], rax mov rdi, [rsp+98h+var_60] mov rsi, [rsp+98h+var_38] mov rdx, [rsp+98h+var_40] call _ZN6google8protobuf8internal24InlineGreedyStringParserEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcPNS1_12ParseContextE; google::protobuf::internal::InlineGreedyStringParser(std::string *,char const*,google::protobuf::internal::ParseContext *) mov [rsp+98h+var_38], rax cmp [rsp+98h+var_38], 0 setnz al xor al, 0FFh test al, 1 jnz short loc_BB565 jmp short loc_BB56A loc_BB565: jmp loc_BB77D loc_BB56A: jmp short loc_BB571 loc_BB56C: jmp loc_BB679 loc_BB571: jmp loc_BB416 loc_BB576: mov eax, dword ptr [rsp+98h+var_48]; jumptable 00000000000BB472 case 4 movzx eax, al cmp eax, 22h ; '"' jnz short loc_BB5C5 mov rdi, [rsp+98h+var_78]; this mov rax, [rsp+98h+var_40] mov [rsp+98h+var_88], rax call _ZN6google8protobuf21MethodDescriptorProto25_internal_mutable_optionsEv; google::protobuf::MethodDescriptorProto::_internal_mutable_options(void) mov rdi, [rsp+98h+var_88]; this mov rsi, rax; google::protobuf::MessageLite * mov rdx, [rsp+98h+var_38]; char * call _ZN6google8protobuf8internal12ParseContext12ParseMessageEPNS0_11MessageLiteEPKc; google::protobuf::internal::ParseContext::ParseMessage(google::protobuf::MessageLite *,char const*) mov [rsp+98h+var_38], rax cmp [rsp+98h+var_38], 0 setnz al xor al, 0FFh test al, 1 jnz short loc_BB5BE jmp short loc_BB5C3 loc_BB5BE: jmp loc_BB77D loc_BB5C3: jmp short loc_BB5CA loc_BB5C5: jmp loc_BB679 loc_BB5CA: jmp loc_BB416 loc_BB5CF: mov eax, dword ptr [rsp+98h+var_48]; jumptable 00000000000BB472 case 5 movzx eax, al cmp eax, 28h ; '(' jnz short loc_BB61C lea rdi, [rsp+98h+var_48+4] call _ZN6google8protobuf21MethodDescriptorProto9_Internal24set_has_client_streamingEPNS0_8internal7HasBitsILm1EEE; google::protobuf::MethodDescriptorProto::_Internal::set_has_client_streaming(google::protobuf::internal::HasBits<1ul> *) lea rdi, [rsp+98h+var_38]; this call _ZN6google8protobuf8internal12ReadVarint64EPPKc; google::protobuf::internal::ReadVarint64(char const**) mov rcx, rax mov rax, [rsp+98h+var_78] cmp rcx, 0 setnz cl and cl, 1 mov [rax+38h], cl cmp [rsp+98h+var_38], 0 setnz al xor al, 0FFh test al, 1 jnz short loc_BB615 jmp short loc_BB61A loc_BB615: jmp loc_BB77D loc_BB61A: jmp short loc_BB61E loc_BB61C: jmp short loc_BB679 loc_BB61E: jmp loc_BB416 loc_BB623: mov eax, dword ptr [rsp+98h+var_48]; jumptable 00000000000BB472 case 6 movzx eax, al cmp eax, 30h ; '0' jnz short loc_BB670 lea rdi, [rsp+98h+var_48+4] call _ZN6google8protobuf21MethodDescriptorProto9_Internal24set_has_server_streamingEPNS0_8internal7HasBitsILm1EEE; google::protobuf::MethodDescriptorProto::_Internal::set_has_server_streaming(google::protobuf::internal::HasBits<1ul> *) lea rdi, [rsp+98h+var_38]; this call _ZN6google8protobuf8internal12ReadVarint64EPPKc; google::protobuf::internal::ReadVarint64(char const**) mov rcx, rax mov rax, [rsp+98h+var_78] cmp rcx, 0 setnz cl and cl, 1 mov [rax+39h], cl cmp [rsp+98h+var_38], 0 setnz al xor al, 0FFh test al, 1 jnz short loc_BB669 jmp short loc_BB66E loc_BB669: jmp loc_BB77D loc_BB66E: jmp short loc_BB672 loc_BB670: jmp short loc_BB679 loc_BB672: jmp loc_BB416 def_BB472: jmp short $+2; jumptable 00000000000BB472 default case loc_BB679: cmp dword ptr [rsp+98h+var_48], 0 jz short loc_BB68C mov eax, dword ptr [rsp+98h+var_48] and eax, 7 cmp eax, 4 jnz short loc_BB6B5 loc_BB68C: cmp [rsp+98h+var_38], 0 setnz al xor al, 0FFh test al, 1 jnz short loc_BB69D jmp short loc_BB6A2 loc_BB69D: jmp loc_BB77D loc_BB6A2: mov rdi, [rsp+98h+var_40]; this mov esi, dword ptr [rsp+98h+var_48]; unsigned int call _ZN6google8protobuf8internal18EpsCopyInputStream10SetLastTagEj; google::protobuf::internal::EpsCopyInputStream::SetLastTag(uint) jmp loc_BB75D loc_BB6B5: mov rax, [rsp+98h+var_78] mov ecx, dword ptr [rsp+98h+var_48]; int mov [rsp+98h+var_98], rcx; int add rax, 8 mov [rsp+98h+var_28], rax; int mov rax, [rsp+98h+var_28] mov qword ptr [rsp+98h+var_90], rax; int mov [rsp+98h+var_18], rax; __int64 mov rax, [rsp+98h+var_18] mov [rsp+98h+var_8], rax mov rax, [rsp+98h+var_8] mov rax, [rax] and rax, 1 cmp rax, 0 jz short loc_BB717 mov rdi, qword ptr [rsp+98h+var_90] call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS2_9ContainerINS0_15UnknownFieldSetEEEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(void) add rax, 8 mov [rsp+98h+var_20], rax jmp short loc_BB726 loc_BB717: mov rdi, qword ptr [rsp+98h+var_90]; int call _ZN6google8protobuf8internal16InternalMetadata27mutable_unknown_fields_slowINS0_15UnknownFieldSetEEEPT_v; google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(void) mov [rsp+98h+var_20], rax loc_BB726: mov rdi, [rsp+98h+var_98]; this mov rsi, [rsp+98h+var_20]; unsigned __int64 mov rdx, [rsp+98h+var_38]; google::protobuf::UnknownFieldSet * mov rcx, [rsp+98h+var_40]; char * call _ZN6google8protobuf8internal17UnknownFieldParseEmPNS0_15UnknownFieldSetEPKcPNS1_12ParseContextE; google::protobuf::internal::UnknownFieldParse(ulong,google::protobuf::UnknownFieldSet *,char const*,google::protobuf::internal::ParseContext *) mov [rsp+98h+var_38], rax cmp [rsp+98h+var_38], 0 setnz al xor al, 0FFh test al, 1 jnz short loc_BB754 jmp short loc_BB756 loc_BB754: jmp short loc_BB77D loc_BB756: jmp loc_BB416 loc_BB75B: jmp short $+2 loc_BB75D: mov rdi, [rsp+98h+var_78] add rdi, 10h lea rsi, [rsp+98h+var_48+4] call _ZN6google8protobuf8internal7HasBitsILm1EE2OrERKS3_; google::protobuf::internal::HasBits<1ul>::Or(google::protobuf::internal::HasBits<1ul> const&) mov rax, [rsp+98h+var_38] add rsp, 98h retn loc_BB77D: mov [rsp+98h+var_38], 0 jmp short loc_BB75D
google::protobuf::internal * google::protobuf::MethodDescriptorProto::_InternalParse( google::protobuf::MethodDescriptorProto *this, google::protobuf::internal *a2, google::protobuf::internal::ParseContext *a3) { unsigned int v3; // ecx int v4; // edx int v5; // r8d int v6; // r9d google::protobuf::MessageLite *v7; // rax google::protobuf::internal::ParseContext *v8; // r8 google::protobuf::internal *v10; // [rsp+0h] [rbp-98h] _QWORD *v11; // [rsp+8h] [rbp-90h] google::protobuf::internal::EpsCopyInputStream *v12; // [rsp+10h] [rbp-88h] google::protobuf::MethodDescriptorProto *v13; // [rsp+20h] [rbp-78h] google::protobuf::internal::EpsCopyInputStream **v14; // [rsp+28h] [rbp-70h] google::protobuf::internal::EpsCopyInputStream **v15; // [rsp+30h] [rbp-68h] long long v16; // [rsp+38h] [rbp-60h] long long v17; // [rsp+40h] [rbp-58h] long long v18; // [rsp+48h] [rbp-50h] char *v19; // [rsp+50h] [rbp-48h] BYREF google::protobuf::internal::EpsCopyInputStream *v20; // [rsp+58h] [rbp-40h] BYREF google::protobuf::internal *Tag; // [rsp+60h] [rbp-38h] BYREF int v22[2]; // [rsp+68h] [rbp-30h] long long v23; // [rsp+70h] [rbp-28h] unsigned long long v24; // [rsp+78h] [rbp-20h] long long v25; // [rsp+80h] [rbp-18h] char *v26; // [rsp+88h] [rbp-10h] char *v27; // [rsp+90h] [rbp-8h] *(_QWORD *)v22 = this; Tag = a2; v20 = a3; v13 = this; v26 = (char *)&v19 + 4; v14 = &v20; v15 = (google::protobuf::internal::EpsCopyInputStream **)((char *)&v19 + 4); do { *(_DWORD *)v15 = 0; v15 = (google::protobuf::internal::EpsCopyInputStream **)((char *)v15 + 4); } while ( v15 != &v20 ); while ( 2 ) { if ( (google::protobuf::internal::ParseContext::Done(v20, (const char **)&Tag) & 1) != 0 ) goto LABEL_37; Tag = (google::protobuf::internal *)google::protobuf::internal::ReadTag(Tag, (const char *)&v19, 0LL, v3); switch ( (unsigned int)v19 >> 3 ) { case 1u: if ( (unsigned __int8)v19 != 10 ) goto LABEL_28; v18 = google::protobuf::MethodDescriptorProto::_internal_mutable_name[abi:cxx11](v13); Tag = (google::protobuf::internal *)google::protobuf::internal::InlineGreedyStringParser(v18, Tag, v20); if ( Tag ) continue; goto LABEL_38; case 2u: if ( (unsigned __int8)v19 != 18 ) goto LABEL_28; v17 = google::protobuf::MethodDescriptorProto::_internal_mutable_input_type[abi:cxx11](v13); Tag = (google::protobuf::internal *)google::protobuf::internal::InlineGreedyStringParser(v17, Tag, v20); if ( Tag ) continue; goto LABEL_38; case 3u: if ( (unsigned __int8)v19 != 26 ) goto LABEL_28; v16 = google::protobuf::MethodDescriptorProto::_internal_mutable_output_type[abi:cxx11](v13); Tag = (google::protobuf::internal *)google::protobuf::internal::InlineGreedyStringParser(v16, Tag, v20); if ( Tag ) continue; goto LABEL_38; case 4u: if ( (unsigned __int8)v19 != 34 ) goto LABEL_28; v12 = v20; v7 = (google::protobuf::MessageLite *)google::protobuf::MethodDescriptorProto::_internal_mutable_options(v13); Tag = (google::protobuf::internal *)google::protobuf::internal::ParseContext::ParseMessage( v12, v7, (const char *)Tag); if ( Tag ) continue; goto LABEL_38; case 5u: if ( (unsigned __int8)v19 != 40 ) goto LABEL_28; google::protobuf::MethodDescriptorProto::_Internal::set_has_client_streaming((char *)&v19 + 4); *((_BYTE *)v13 + 56) = google::protobuf::internal::ReadVarint64( (google::protobuf::internal *)&Tag, (const char **)&v19) != 0; if ( Tag ) continue; goto LABEL_38; case 6u: if ( (unsigned __int8)v19 != 48 ) goto LABEL_28; google::protobuf::MethodDescriptorProto::_Internal::set_has_server_streaming((char *)&v19 + 4); *((_BYTE *)v13 + 57) = google::protobuf::internal::ReadVarint64( (google::protobuf::internal *)&Tag, (const char **)&v19) != 0; if ( Tag ) continue; goto LABEL_38; default: LABEL_28: if ( (_DWORD)v19 && ((unsigned __int8)v19 & 7) != 4 ) { v10 = (google::protobuf::internal *)(unsigned int)v19; v23 = (long long)v13 + 8; v11 = (_QWORD *)((char *)v13 + 8); v25 = (long long)v13 + 8; v27 = (char *)v13 + 8; if ( (*((_QWORD *)v13 + 1) & 1LL) != 0 ) v24 = google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(v11) + 8; else v24 = google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>( (int)v11, (int)&v19, v4, (int)v19, v5, v6, (int)v19, (int)v11, v12, ((unsigned int)v19 >> 3) - 1, (int)v13, (int)v14, (int)v15, v16, v17, v18, (int)v19, (int)v20, (int)Tag, v22[0], v23, v24, v25); Tag = (google::protobuf::internal *)google::protobuf::internal::UnknownFieldParse( v10, v24, Tag, (const char *)v20, v8); if ( !Tag ) goto LABEL_38; continue; } if ( Tag ) google::protobuf::internal::EpsCopyInputStream::SetLastTag(v20, (unsigned int)v19); else LABEL_38: Tag = 0LL; LABEL_37: google::protobuf::internal::HasBits<1ul>::Or((char *)v13 + 16, (char *)&v19 + 4); return Tag; } } }
_InternalParse: SUB RSP,0x98 MOV qword ptr [RSP + 0x68],RDI MOV qword ptr [RSP + 0x60],RSI MOV qword ptr [RSP + 0x58],RDX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x20],RAX LEA RAX,[RSP + 0x54] MOV qword ptr [RSP + 0x88],RAX MOV RAX,qword ptr [RSP + 0x88] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RSP + 0x28],RCX MOV qword ptr [RSP + 0x30],RAX LAB_001bb3f6: MOV RAX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x28] MOV dword ptr [RAX],0x0 ADD RAX,0x4 CMP RAX,RCX MOV qword ptr [RSP + 0x30],RAX JNZ 0x001bb3f6 JMP 0x001bb416 LAB_001bb416: MOV RDI,qword ptr [RSP + 0x58] LEA RSI,[RSP + 0x60] CALL 0x001d41f0 XOR AL,0xff TEST AL,0x1 JNZ 0x001bb430 JMP 0x001bb75b LAB_001bb430: MOV RDI,qword ptr [RSP + 0x60] LEA RSI,[RSP + 0x50] XOR EDX,EDX CALL 0x001d4220 MOV qword ptr [RSP + 0x60],RAX MOV EAX,dword ptr [RSP + 0x50] SHR EAX,0x3 DEC EAX MOV ECX,EAX MOV qword ptr [RSP + 0x18],RCX SUB EAX,0x5 JA 0x001bb677 MOV RAX,qword ptr [RSP + 0x18] LEA RCX,[0x2f03a0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV EAX,dword ptr [RSP + 0x50] MOVZX EAX,AL CMP EAX,0xa JNZ 0x001bb4c0 MOV RDI,qword ptr [RSP + 0x20] CALL 0x001d8f60 MOV qword ptr [RSP + 0x48],RAX MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x58] CALL 0x002b4980 MOV qword ptr [RSP + 0x60],RAX CMP qword ptr [RSP + 0x60],0x0 SETNZ AL XOR AL,0xff TEST AL,0x1 JNZ 0x001bb4b9 JMP 0x001bb4be LAB_001bb4b9: JMP 0x001bb77d LAB_001bb4be: JMP 0x001bb4c5 LAB_001bb4c0: JMP 0x001bb679 LAB_001bb4c5: JMP 0x001bb416 caseD_2: MOV EAX,dword ptr [RSP + 0x50] MOVZX EAX,AL CMP EAX,0x12 JNZ 0x001bb516 MOV RDI,qword ptr [RSP + 0x20] CALL 0x00181af0 MOV qword ptr [RSP + 0x40],RAX MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x58] CALL 0x002b4980 MOV qword ptr [RSP + 0x60],RAX CMP qword ptr [RSP + 0x60],0x0 SETNZ AL XOR AL,0xff TEST AL,0x1 JNZ 0x001bb50f JMP 0x001bb514 LAB_001bb50f: JMP 0x001bb77d LAB_001bb514: JMP 0x001bb51b LAB_001bb516: JMP 0x001bb679 LAB_001bb51b: JMP 0x001bb416 caseD_3: MOV EAX,dword ptr [RSP + 0x50] MOVZX EAX,AL CMP EAX,0x1a JNZ 0x001bb56c MOV RDI,qword ptr [RSP + 0x20] CALL 0x00181b50 MOV qword ptr [RSP + 0x38],RAX MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x58] CALL 0x002b4980 MOV qword ptr [RSP + 0x60],RAX CMP qword ptr [RSP + 0x60],0x0 SETNZ AL XOR AL,0xff TEST AL,0x1 JNZ 0x001bb565 JMP 0x001bb56a LAB_001bb565: JMP 0x001bb77d LAB_001bb56a: JMP 0x001bb571 LAB_001bb56c: JMP 0x001bb679 LAB_001bb571: JMP 0x001bb416 caseD_4: MOV EAX,dword ptr [RSP + 0x50] MOVZX EAX,AL CMP EAX,0x22 JNZ 0x001bb5c5 MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x10],RAX CALL 0x00181bc0 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,RAX MOV RDX,qword ptr [RSP + 0x60] CALL 0x002b4330 MOV qword ptr [RSP + 0x60],RAX CMP qword ptr [RSP + 0x60],0x0 SETNZ AL XOR AL,0xff TEST AL,0x1 JNZ 0x001bb5be JMP 0x001bb5c3 LAB_001bb5be: JMP 0x001bb77d LAB_001bb5c3: JMP 0x001bb5ca LAB_001bb5c5: JMP 0x001bb679 LAB_001bb5ca: JMP 0x001bb416 caseD_5: MOV EAX,dword ptr [RSP + 0x50] MOVZX EAX,AL CMP EAX,0x28 JNZ 0x001bb61c LEA RDI,[RSP + 0x54] CALL 0x001d8fc0 LEA RDI,[RSP + 0x60] CALL 0x001d72e0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x20] CMP RCX,0x0 SETNZ CL AND CL,0x1 MOV byte ptr [RAX + 0x38],CL CMP qword ptr [RSP + 0x60],0x0 SETNZ AL XOR AL,0xff TEST AL,0x1 JNZ 0x001bb615 JMP 0x001bb61a LAB_001bb615: JMP 0x001bb77d LAB_001bb61a: JMP 0x001bb61e LAB_001bb61c: JMP 0x001bb679 LAB_001bb61e: JMP 0x001bb416 caseD_6: MOV EAX,dword ptr [RSP + 0x50] MOVZX EAX,AL CMP EAX,0x30 JNZ 0x001bb670 LEA RDI,[RSP + 0x54] CALL 0x001d8ff0 LEA RDI,[RSP + 0x60] CALL 0x001d72e0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x20] CMP RCX,0x0 SETNZ CL AND CL,0x1 MOV byte ptr [RAX + 0x39],CL CMP qword ptr [RSP + 0x60],0x0 SETNZ AL XOR AL,0xff TEST AL,0x1 JNZ 0x001bb669 JMP 0x001bb66e LAB_001bb669: JMP 0x001bb77d LAB_001bb66e: JMP 0x001bb672 LAB_001bb670: JMP 0x001bb679 LAB_001bb672: JMP 0x001bb416 LAB_001bb677: JMP 0x001bb679 default: CMP dword ptr [RSP + 0x50],0x0 JZ 0x001bb68c MOV EAX,dword ptr [RSP + 0x50] AND EAX,0x7 CMP EAX,0x4 JNZ 0x001bb6b5 LAB_001bb68c: CMP qword ptr [RSP + 0x60],0x0 SETNZ AL XOR AL,0xff TEST AL,0x1 JNZ 0x001bb69d JMP 0x001bb6a2 LAB_001bb69d: JMP 0x001bb77d LAB_001bb6a2: MOV RDI,qword ptr [RSP + 0x58] MOV ESI,dword ptr [RSP + 0x50] CALL 0x001d4350 JMP 0x001bb75d LAB_001bb6b5: MOV RAX,qword ptr [RSP + 0x20] MOV ECX,dword ptr [RSP + 0x50] MOV qword ptr [RSP],RCX ADD RAX,0x8 MOV qword ptr [RSP + 0x70],RAX MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x90],RAX MOV RAX,qword ptr [RSP + 0x90] MOV RAX,qword ptr [RAX] AND RAX,0x1 CMP RAX,0x0 JZ 0x001bb717 MOV RDI,qword ptr [RSP + 0x8] CALL 0x0019cd40 ADD RAX,0x8 MOV qword ptr [RSP + 0x78],RAX JMP 0x001bb726 LAB_001bb717: MOV RDI,qword ptr [RSP + 0x8] CALL 0x001df250 MOV qword ptr [RSP + 0x78],RAX LAB_001bb726: MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x60] MOV RCX,qword ptr [RSP + 0x58] CALL 0x00263b20 MOV qword ptr [RSP + 0x60],RAX CMP qword ptr [RSP + 0x60],0x0 SETNZ AL XOR AL,0xff TEST AL,0x1 JNZ 0x001bb754 JMP 0x001bb756 LAB_001bb754: JMP 0x001bb77d LAB_001bb756: JMP 0x001bb416 LAB_001bb75b: JMP 0x001bb75d LAB_001bb75d: MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x10 LEA RSI,[RSP + 0x54] CALL 0x001d5090 MOV RAX,qword ptr [RSP + 0x60] ADD RSP,0x98 RET LAB_001bb77d: MOV qword ptr [RSP + 0x60],0x0 JMP 0x001bb75d
/* google::protobuf::MethodDescriptorProto::_InternalParse(char const*, google::protobuf::internal::ParseContext*) */ char * __thiscall google::protobuf::MethodDescriptorProto::_InternalParse (MethodDescriptorProto *this,char *param_1,ParseContext *param_2) { ParseContext *this_00; byte bVar1; string *psVar2; MessageLite *pMVar3; long lVar4; Container *pCVar5; ulong uVar6; HasBits *local_68; uint local_48; HasBits local_44 [4]; ParseContext *local_40; char *local_38; MethodDescriptorProto *local_30; InternalMetadata *local_28; UnknownFieldSet *local_20; InternalMetadata *local_18; HasBits *local_10; InternalMetadata *local_8; local_68 = local_44; local_40 = param_2; local_38 = param_1; local_30 = this; local_10 = local_68; do { *(int4 *)local_68 = 0; local_68 = local_68 + 4; } while (local_68 != (HasBits *)&local_40); do { bVar1 = internal::ParseContext::Done(local_40,&local_38); if (((bVar1 ^ 0xff) & 1) == 0) goto LAB_001bb75d; local_38 = (char *)internal::ReadTag(local_38,&local_48,0); this_00 = local_40; switch(local_48 >> 3) { case 1: if ((local_48 & 0xff) != 10) break; psVar2 = (string *)_internal_mutable_name_abi_cxx11_(this); local_38 = (char *)internal::InlineGreedyStringParser(psVar2,local_38,local_40); goto joined_r0x001bb50b; case 2: if ((local_48 & 0xff) == 0x12) { psVar2 = (string *)_internal_mutable_input_type_abi_cxx11_(this); local_38 = (char *)internal::InlineGreedyStringParser(psVar2,local_38,local_40); goto joined_r0x001bb50b; } break; case 3: if ((local_48 & 0xff) == 0x1a) { psVar2 = (string *)_internal_mutable_output_type_abi_cxx11_(this); local_38 = (char *)internal::InlineGreedyStringParser(psVar2,local_38,local_40); goto joined_r0x001bb50b; } break; case 4: if ((local_48 & 0xff) == 0x22) { pMVar3 = (MessageLite *)_internal_mutable_options(this); local_38 = (char *)internal::ParseContext::ParseMessage(this_00,pMVar3,local_38); goto joined_r0x001bb50b; } break; case 5: if ((local_48 & 0xff) == 0x28) { _Internal::set_has_client_streaming(local_44); lVar4 = internal::ReadVarint64(&local_38); this[0x38] = (MethodDescriptorProto)(lVar4 != 0); goto joined_r0x001bb50b; } break; case 6: if ((local_48 & 0xff) == 0x30) { _Internal::set_has_server_streaming(local_44); lVar4 = internal::ReadVarint64(&local_38); this[0x39] = (MethodDescriptorProto)(lVar4 != 0); goto joined_r0x001bb50b; } } if ((local_48 == 0) || ((local_48 & 7) == 4)) { if (local_38 != (char *)0x0) { internal::EpsCopyInputStream::SetLastTag((EpsCopyInputStream *)local_40,local_48); goto LAB_001bb75d; } goto LAB_001bb77d; } uVar6 = (ulong)local_48; local_28 = (InternalMetadata *)(this + 8); local_18 = local_28; local_8 = local_28; if ((*(ulong *)local_28 & 1) == 0) { local_20 = internal::InternalMetadata:: mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(local_28); } else { pCVar5 = internal::InternalMetadata:: PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>> (local_28); local_20 = (UnknownFieldSet *)(pCVar5 + 8); } local_38 = (char *)internal::UnknownFieldParse(uVar6,local_20,local_38,local_40); joined_r0x001bb50b: if (local_38 == (char *)0x0) { LAB_001bb77d: local_38 = (char *)0x0; LAB_001bb75d: internal::HasBits<1ul>::Or((HasBits<1ul> *)(this + 0x10),local_44); return local_38; } } while( true ); }
36,753
ma_tls_async_check_result
eloqsql/libmariadb/libmariadb/secure/openssl.c
static my_bool ma_tls_async_check_result(int res, struct mysql_async_context *b, SSL *ssl) { int ssl_err; b->events_to_wait_for= 0; if (res >= 0) return 1; ssl_err= SSL_get_error(ssl, res); if (ssl_err == SSL_ERROR_WANT_READ) b->events_to_wait_for|= MYSQL_WAIT_READ; else if (ssl_err == SSL_ERROR_WANT_WRITE) b->events_to_wait_for|= MYSQL_WAIT_WRITE; else return 1; if (b->suspend_resume_hook) (*b->suspend_resume_hook)(TRUE, b->suspend_resume_hook_user_data); my_context_yield(&b->async_context); if (b->suspend_resume_hook) (*b->suspend_resume_hook)(FALSE, b->suspend_resume_hook_user_data); return 0; }
O3
c
ma_tls_async_check_result: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %rbx movl $0x0, (%rsi) movb $0x1, %r14b testl %edi, %edi js 0x6c601 movl %r14d, %eax popq %rbx popq %r14 popq %rbp retq movl %edi, %esi movq %rdx, %rdi callq 0x3adc0 cmpl $0x2, %eax je 0x6c61c cmpl $0x3, %eax jne 0x6c5f9 movl $0x2, %eax jmp 0x6c621 movl $0x1, %eax orl %eax, (%rbx) movq 0x20(%rbx), %rax testq %rax, %rax je 0x6c637 movq 0x28(%rbx), %rsi movl $0x1, %edi callq *%rax leaq 0x38(%rbx), %rdi callq 0x71a29 movq 0x20(%rbx), %rax testq %rax, %rax je 0x6c656 movq 0x28(%rbx), %rsi xorl %r14d, %r14d xorl %edi, %edi callq *%rax jmp 0x6c5f9 xorl %r14d, %r14d jmp 0x6c5f9
ma_tls_async_check_result: push rbp mov rbp, rsp push r14 push rbx mov rbx, rsi mov dword ptr [rsi], 0 mov r14b, 1 test edi, edi js short loc_6C601 loc_6C5F9: mov eax, r14d pop rbx pop r14 pop rbp retn loc_6C601: mov esi, edi mov rdi, rdx call _SSL_get_error cmp eax, 2 jz short loc_6C61C cmp eax, 3 jnz short loc_6C5F9 mov eax, 2 jmp short loc_6C621 loc_6C61C: mov eax, 1 loc_6C621: or [rbx], eax mov rax, [rbx+20h] test rax, rax jz short loc_6C637 mov rsi, [rbx+28h] mov edi, 1 call rax loc_6C637: lea rdi, [rbx+38h] call my_context_yield mov rax, [rbx+20h] test rax, rax jz short loc_6C656 mov rsi, [rbx+28h] xor r14d, r14d xor edi, edi call rax jmp short loc_6C5F9 loc_6C656: xor r14d, r14d jmp short loc_6C5F9
long long ma_tls_async_check_result(int a1, long long a2, long long a3) { unsigned int v3; // r14d int error; // eax int v6; // eax void ( *v7)(long long, _QWORD); // rax void ( *v8)(_QWORD, _QWORD); // rax *(_DWORD *)a2 = 0; LOBYTE(v3) = 1; if ( a1 < 0 ) { error = SSL_get_error(a3, (unsigned int)a1); if ( error == 2 ) { v6 = 1; } else { if ( error != 3 ) return v3; v6 = 2; } *(_DWORD *)a2 |= v6; v7 = *(void ( **)(long long, _QWORD))(a2 + 32); if ( v7 ) v7(1LL, *(_QWORD *)(a2 + 40)); my_context_yield(a2 + 56); v8 = *(void ( **)(_QWORD, _QWORD))(a2 + 32); v3 = 0; if ( v8 ) v8(0LL, *(_QWORD *)(a2 + 40)); } return v3; }
ma_tls_async_check_result: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RSI MOV dword ptr [RSI],0x0 MOV R14B,0x1 TEST EDI,EDI JS 0x0016c601 LAB_0016c5f9: MOV EAX,R14D POP RBX POP R14 POP RBP RET LAB_0016c601: MOV ESI,EDI MOV RDI,RDX CALL 0x0013adc0 CMP EAX,0x2 JZ 0x0016c61c CMP EAX,0x3 JNZ 0x0016c5f9 MOV EAX,0x2 JMP 0x0016c621 LAB_0016c61c: MOV EAX,0x1 LAB_0016c621: OR dword ptr [RBX],EAX MOV RAX,qword ptr [RBX + 0x20] TEST RAX,RAX JZ 0x0016c637 MOV RSI,qword ptr [RBX + 0x28] MOV EDI,0x1 CALL RAX LAB_0016c637: LEA RDI,[RBX + 0x38] CALL 0x00171a29 MOV RAX,qword ptr [RBX + 0x20] TEST RAX,RAX JZ 0x0016c656 MOV RSI,qword ptr [RBX + 0x28] XOR R14D,R14D XOR EDI,EDI CALL RAX JMP 0x0016c5f9 LAB_0016c656: XOR R14D,R14D JMP 0x0016c5f9
ulong ma_tls_async_check_result(int param_1,uint *param_2,SSL *param_3) { int iVar1; uint uVar2; int8 unaff_R14; ulong uVar3; *param_2 = 0; uVar3 = CONCAT71((int7)((ulong)unaff_R14 >> 8),1); if (param_1 < 0) { iVar1 = SSL_get_error(param_3,param_1); if (iVar1 == 2) { uVar2 = 1; } else { if (iVar1 != 3) goto LAB_0016c5f9; uVar2 = 2; } *param_2 = *param_2 | uVar2; if (*(code **)(param_2 + 8) != (code *)0x0) { (**(code **)(param_2 + 8))(1,*(int8 *)(param_2 + 10)); } my_context_yield(param_2 + 0xe); if (*(code **)(param_2 + 8) == (code *)0x0) { uVar3 = 0; } else { uVar3 = 0; (**(code **)(param_2 + 8))(0,*(int8 *)(param_2 + 10)); } } LAB_0016c5f9: return uVar3 & 0xffffffff; }
36,754
LefDefParser::defiRegion::propNumber(int) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiRegion.cpp
double defiRegion::propNumber(int index) const { char msg[160]; if (index < 0 || index >= numProps_) { sprintf (msg, "ERROR (DEFPARS-6130): The index number %d specified for the REGION PROPERTY is invalide.\nValid index number is from 0 to %d. Specify a valid index number and then try again.", index, numProps_); defiError(0, 6130, msg, defData); return 0; } return propDValues_[index]; }
O3
cpp
LefDefParser::defiRegion::propNumber(int) const: pushq %r14 pushq %rbx subq $0xa8, %rsp movl %esi, %edx movq %rdi, %rbx testl %esi, %esi setns %al movl 0x38(%rdi), %ecx cmpl %esi, %ecx setg %sil testb %sil, %al je 0x12a7f movq 0x50(%rbx), %rax movl %edx, %ecx movsd (%rax,%rcx,8), %xmm0 jmp 0x12aa9 leaq 0x2d174(%rip), %rsi # 0x3fbfa movq %rsp, %r14 movq %r14, %rdi xorl %eax, %eax callq 0x6060 movq 0x68(%rbx), %rcx xorl %edi, %edi movl $0x17f2, %esi # imm = 0x17F2 movq %r14, %rdx callq 0x18f80 xorps %xmm0, %xmm0 addq $0xa8, %rsp popq %rbx popq %r14 retq
_ZNK12LefDefParser10defiRegion10propNumberEi: push r14 push rbx sub rsp, 0A8h mov edx, esi mov rbx, rdi test esi, esi setns al mov ecx, [rdi+38h] cmp ecx, esi setnle sil test al, sil jz short loc_12A7F mov rax, [rbx+50h] mov ecx, edx movsd xmm0, qword ptr [rax+rcx*8] jmp short loc_12AA9 loc_12A7F: lea rsi, aErrorDefpars61; "ERROR (DEFPARS-6130): The index number "... mov r14, rsp mov rdi, r14 xor eax, eax call _sprintf mov rcx, [rbx+68h]; LefDefParser::defrData * xor edi, edi; this mov esi, 17F2h; int mov rdx, r14; char * call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *) xorps xmm0, xmm0 loc_12AA9: add rsp, 0A8h pop rbx pop r14 retn
double LefDefParser::defiRegion::propNumber(LefDefParser::defiRegion *this, unsigned int a2) { LefDefParser::defrData *v3; // r8 char v4[184]; // [rsp+0h] [rbp-B8h] BYREF if ( *((_DWORD *)this + 14) > (int)a2 && (a2 & 0x80000000) == 0 ) return *(double *)(*((_QWORD *)this + 10) + 8LL * a2); sprintf( v4, "ERROR (DEFPARS-6130): The index number %d specified for the REGION PROPERTY is invalide.\n" "Valid index number is from 0 to %d. Specify a valid index number and then try again.", a2); LefDefParser::defiError(0LL, 6130, v4, *((LefDefParser::defrData **)this + 13), v3); return 0.0; }
propNumber: PUSH R14 PUSH RBX SUB RSP,0xa8 MOV EDX,ESI MOV RBX,RDI TEST ESI,ESI SETNS AL MOV ECX,dword ptr [RDI + 0x38] CMP ECX,ESI SETG SIL TEST AL,SIL JZ 0x00112a7f MOV RAX,qword ptr [RBX + 0x50] MOV ECX,EDX MOVSD XMM0,qword ptr [RAX + RCX*0x8] JMP 0x00112aa9 LAB_00112a7f: LEA RSI,[0x13fbfa] MOV R14,RSP MOV RDI,R14 XOR EAX,EAX CALL 0x00106060 MOV RCX,qword ptr [RBX + 0x68] XOR EDI,EDI MOV ESI,0x17f2 MOV RDX,R14 CALL 0x00118f80 XORPS XMM0,XMM0 LAB_00112aa9: ADD RSP,0xa8 POP RBX POP R14 RET
/* LefDefParser::defiRegion::propNumber(int) const */ int8 __thiscall LefDefParser::defiRegion::propNumber(defiRegion *this,int param_1) { int8 uVar1; char acStack_b8 [168]; if (param_1 < 0 || *(int *)(this + 0x38) <= param_1) { sprintf(acStack_b8, "ERROR (DEFPARS-6130): The index number %d specified for the REGION PROPERTY is invalide.\nValid index number is from 0 to %d. Specify a valid index number and then try again." ); defiError(0,0x17f2,acStack_b8,*(defrData **)(this + 0x68)); uVar1 = 0; } else { uVar1 = *(int8 *)(*(long *)(this + 0x50) + (ulong)(uint)param_1 * 8); } return uVar1; }
36,755
tree_walk_right_root_left
eloqsql/mysys/tree.c
static int tree_walk_right_root_left(TREE *tree, TREE_ELEMENT *element, tree_walk_action action, void *argument) { int error; if (element->right) /* Not null_element */ { if ((error=tree_walk_right_root_left(tree,element->right,action, argument)) == 0 && (error=(*action)(ELEMENT_KEY(tree,element), (element_count) element->count, argument)) == 0) error=tree_walk_right_root_left(tree,element->left,action,argument); return error; } return 0; }
O3
c
tree_walk_right_root_left: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r12 movq 0x8(%rsi), %rsi xorl %eax, %eax testq %rsi, %rsi je 0xafb8b movq %rcx, %r14 movq %rdx, %r15 movq %rdi, %r13 movl $0x7fffffff, %ebx # imm = 0x7FFFFFFF movq %r13, %rdi movq %r15, %rdx movq %r14, %rcx callq 0xafb18 testl %eax, %eax jne 0xafb8b movl 0x208(%r13), %edi testq %rdi, %rdi je 0xafb65 addq %r12, %rdi jmp 0xafb6a movq 0x18(%r12), %rdi movl 0x10(%r12), %esi andl %ebx, %esi movq %r14, %rdx callq *%r15 testl %eax, %eax jne 0xafb8b movq (%r12), %r12 movq 0x8(%r12), %rsi testq %rsi, %rsi jne 0xafb42 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
tree_walk_right_root_left: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r12, rsi mov rsi, [rsi+8] xor eax, eax test rsi, rsi jz short loc_AFB8B mov r14, rcx mov r15, rdx mov r13, rdi mov ebx, 7FFFFFFFh loc_AFB42: mov rdi, r13 mov rdx, r15 mov rcx, r14 call tree_walk_right_root_left test eax, eax jnz short loc_AFB8B mov edi, [r13+208h] test rdi, rdi jz short loc_AFB65 add rdi, r12 jmp short loc_AFB6A loc_AFB65: mov rdi, [r12+18h] loc_AFB6A: mov esi, [r12+10h] and esi, ebx mov rdx, r14 call r15 test eax, eax jnz short loc_AFB8B mov r12, [r12] mov rsi, [r12+8] test rsi, rsi jnz short loc_AFB42 xor eax, eax loc_AFB8B: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long tree_walk_right_root_left( long long a1, long long **a2, long long ( *a3)(long long, long long, long long), long long a4) { long long **v4; // r12 long long *v5; // rsi long long result; // rax long long v10; // rdi v4 = a2; v5 = a2[1]; result = 0LL; if ( v5 ) { while ( 1 ) { result = tree_walk_right_root_left(a1, v5, a3, a4); if ( (_DWORD)result ) break; v10 = *(_DWORD *)(a1 + 520) ? (long long)v4 + *(unsigned int *)(a1 + 520) : (long long)v4[3]; result = a3(v10, (_DWORD)v4[2] & 0x7FFFFFFF, a4); if ( (_DWORD)result ) break; v4 = (long long **)*v4; v5 = v4[1]; if ( !v5 ) return 0LL; } } return result; }
tree_walk_right_root_left: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12,RSI MOV RSI,qword ptr [RSI + 0x8] XOR EAX,EAX TEST RSI,RSI JZ 0x001afb8b MOV R14,RCX MOV R15,RDX MOV R13,RDI MOV EBX,0x7fffffff LAB_001afb42: MOV RDI,R13 MOV RDX,R15 MOV RCX,R14 CALL 0x001afb18 TEST EAX,EAX JNZ 0x001afb8b MOV EDI,dword ptr [R13 + 0x208] TEST RDI,RDI JZ 0x001afb65 ADD RDI,R12 JMP 0x001afb6a LAB_001afb65: MOV RDI,qword ptr [R12 + 0x18] LAB_001afb6a: MOV ESI,dword ptr [R12 + 0x10] AND ESI,EBX MOV RDX,R14 CALL R15 TEST EAX,EAX JNZ 0x001afb8b MOV R12,qword ptr [R12] MOV RSI,qword ptr [R12 + 0x8] TEST RSI,RSI JNZ 0x001afb42 XOR EAX,EAX LAB_001afb8b: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 tree_walk_right_root_left(long param_1,long *param_2,code *param_3,int8 param_4) { int8 uVar1; long lVar2; lVar2 = param_2[1]; while( true ) { if (lVar2 == 0) { return 0; } uVar1 = tree_walk_right_root_left(param_1,lVar2,param_3,param_4); if ((int)uVar1 != 0) break; if ((ulong)*(uint *)(param_1 + 0x208) == 0) { lVar2 = param_2[3]; } else { lVar2 = (ulong)*(uint *)(param_1 + 0x208) + (long)param_2; } uVar1 = (*param_3)(lVar2,*(uint *)(param_2 + 2) & 0x7fffffff,param_4); if ((int)uVar1 != 0) { return uVar1; } param_2 = (long *)*param_2; lVar2 = param_2[1]; } return uVar1; }
36,756
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_array()
monkey531[P]llama/common/json.hpp
bool end_array() { bool keep = true; if (ref_stack.back()) { keep = callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::array_end, *ref_stack.back()); if (keep) { ref_stack.back()->set_parents(); } else { // discard array *ref_stack.back() = discarded; } } JSON_ASSERT(!ref_stack.empty()); JSON_ASSERT(!keep_stack.empty()); ref_stack.pop_back(); keep_stack.pop_back(); // remove discarded value if (!keep && !ref_stack.empty() && ref_stack.back()->is_array()) { ref_stack.back()->m_data.m_value.array->pop_back(); } return true; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_array(): subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq 0x30(%rsp), %rdi movq %rdi, 0x10(%rsp) movb $0x1, 0x2f(%rsp) addq $0x8, %rdi callq 0xbc400 cmpq $0x0, (%rax) je 0xbb6c2 movq 0x10(%rsp), %rdi movq %rdi, %rax addq $0x80, %rax movq %rax, (%rsp) addq $0x8, %rdi callq 0xbbe10 movq 0x10(%rsp), %rdi subl $0x1, %eax movl %eax, 0xc(%rsp) addq $0x8, %rdi callq 0xbc400 movq (%rsp), %rdi movl 0xc(%rsp), %esi movq (%rax), %rcx movl $0x3, %edx callq 0xbbdb0 andb $0x1, %al movb %al, 0x2f(%rsp) testb $0x1, 0x2f(%rsp) je 0xbb685 movq 0x10(%rsp), %rdi addq $0x8, %rdi callq 0xbc400 movq (%rax), %rdi callq 0xbcb50 jmp 0xbb6c0 movq 0x10(%rsp), %rsi addq $0xa8, %rsi leaq 0x18(%rsp), %rdi callq 0xbdfb0 movq 0x10(%rsp), %rdi addq $0x8, %rdi callq 0xbc400 movq (%rax), %rdi leaq 0x18(%rsp), %rsi callq 0xb6830 leaq 0x18(%rsp), %rdi callq 0xadff0 jmp 0xbb6c2 movq 0x10(%rsp), %rdi addq $0x8, %rdi callq 0xbc850 testb $0x1, %al jne 0xbb6d6 jmp 0xbb6f7 leaq 0x15c2fb(%rip), %rdi # 0x2179d8 movl $0x1bf5, %esi # imm = 0x1BF5 leaq 0x1559e1(%rip), %rdx # 0x2110ca leaq 0x15d2ee(%rip), %rcx # 0x2189de movb $0x0, %al callq 0x5bf60 movq 0x10(%rsp), %rdi addq $0x20, %rdi callq 0xbbc90 testb $0x1, %al jne 0xbb70b jmp 0xbb72c leaq 0x15c2c6(%rip), %rdi # 0x2179d8 movl $0x1bf6, %esi # imm = 0x1BF6 leaq 0x1559ac(%rip), %rdx # 0x2110ca leaq 0x15d233(%rip), %rcx # 0x218958 movb $0x0, %al callq 0x5bf60 movq 0x10(%rsp), %rdi addq $0x8, %rdi callq 0xbe1a0 movq 0x10(%rsp), %rdi addq $0x20, %rdi callq 0xbbd90 testb $0x1, 0x2f(%rsp) jne 0xbb797 movq 0x10(%rsp), %rdi addq $0x8, %rdi callq 0xbc850 testb $0x1, %al jne 0xbb797 movq 0x10(%rsp), %rdi addq $0x8, %rdi callq 0xbc400 movq (%rax), %rdi callq 0xbc950 testb $0x1, %al jne 0xbb77d jmp 0xbb797 movq 0x10(%rsp), %rdi addq $0x8, %rdi callq 0xbc400 movq (%rax), %rax movq 0x8(%rax), %rdi callq 0xc2290 movb $0x1, %al andb $0x1, %al addq $0x38, %rsp retq
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9end_arrayEv: sub rsp, 38h mov [rsp+38h+var_8], rdi mov rdi, [rsp+38h+var_8] mov [rsp+38h+var_28], rdi mov [rsp+38h+var_9], 1 add rdi, 8 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::back(void) cmp qword ptr [rax], 0 jz loc_BB6C2 mov rdi, [rsp+38h+var_28] mov rax, rdi add rax, 80h mov [rsp+38h+var_38], rax add rdi, 8 call _ZNKSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4sizeEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::size(void) mov rdi, [rsp+38h+var_28] sub eax, 1 mov [rsp+38h+var_2C], eax add rdi, 8 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::back(void) mov rdi, [rsp+38h+var_38] mov esi, [rsp+38h+var_2C] mov rcx, [rax] mov edx, 3 call _ZNKSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEclEiS3_SH_; 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> &)>::operator()(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> &) and al, 1 mov [rsp+38h+var_9], al test [rsp+38h+var_9], 1 jz short loc_BB685 mov rdi, [rsp+38h+var_28] add rdi, 8 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::back(void) mov rdi, [rax] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE11set_parentsEv; 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>::set_parents(void) jmp short loc_BB6C0 loc_BB685: mov rsi, [rsp+38h+var_28] add rsi, 0A8h lea rdi, [rsp+38h+var_20] 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&) mov rdi, [rsp+38h+var_28] add rdi, 8 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::back(void) mov rdi, [rax] lea rsi, [rsp+38h+var_20] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>) lea rdi, [rsp+38h+var_20] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() loc_BB6C0: jmp short $+2 loc_BB6C2: mov rdi, [rsp+38h+var_28] add rdi, 8 call _ZNKSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE5emptyEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::empty(void) test al, 1 jnz short loc_BB6D6 jmp short loc_BB6F7 loc_BB6D6: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 1BF5h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRefStackEmpty; "!ref_stack.empty()" mov al, 0 call _ggml_abort loc_BB6F7: mov rdi, [rsp+38h+var_28] add rdi, 20h ; ' ' call _ZNKSt6vectorIbSaIbEE5emptyEv; std::vector<bool>::empty(void) test al, 1 jnz short loc_BB70B jmp short loc_BB72C loc_BB70B: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 1BF6h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKeepStackEmpty; "!keep_stack.empty()" mov al, 0 call _ggml_abort loc_BB72C: mov rdi, [rsp+38h+var_28] add rdi, 8 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE8pop_backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::pop_back(void) mov rdi, [rsp+38h+var_28] add rdi, 20h ; ' ' call _ZNSt6vectorIbSaIbEE8pop_backEv; std::vector<bool>::pop_back(void) test [rsp+38h+var_9], 1 jnz short loc_BB797 mov rdi, [rsp+38h+var_28] add rdi, 8 call _ZNKSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE5emptyEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::empty(void) test al, 1 jnz short loc_BB797 mov rdi, [rsp+38h+var_28] add rdi, 8 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::back(void) mov rdi, [rax] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8is_arrayEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_array(void) test al, 1 jnz short loc_BB77D jmp short loc_BB797 loc_BB77D: mov rdi, [rsp+38h+var_28] add rdi, 8 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::back(void) mov rax, [rax] mov rdi, [rax+8] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE8pop_backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::pop_back(void) loc_BB797: mov al, 1 and al, 1 add rsp, 38h retn
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::end_array( long long a1) { _QWORD *v1; // rax int v2; // edx int v3; // ecx int v4; // r8d int v5; // r9d _QWORD *v6; // rax long long *v7; // rax _QWORD *v8; // rax long long v9; // rax int v11; // [rsp+8h] [rbp-30h] unsigned int v12; // [rsp+Ch] [rbp-2Ch] long long v13; // [rsp+10h] [rbp-28h] _DWORD v14[5]; // [rsp+18h] [rbp-20h] BYREF char v15; // [rsp+2Fh] [rbp-9h] long long v16; // [rsp+30h] [rbp-8h] v16 = a1; v13 = a1; v15 = 1; if ( *(_QWORD *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::back(a1 + 8) ) { v12 = std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::size(a1 + 8) - 1; v1 = (_QWORD *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::back(a1 + 8); v15 = 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,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::operator()( a1 + 128, v12, 3LL, *v1) & 1; if ( v15 ) { v6 = (_QWORD *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::back(a1 + 8); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::set_parents(*v6); } 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( (unsigned int)v14, a1 + 168, v2, v3, v4, v5, a1 + 128, v11, a1, v14[0], v14[2]); v7 = (long long *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::back(v13 + 8); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=( *v7, (long long)v14); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v14); } } if ( (std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::empty(v13 + 8) & 1) != 0 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7157LL, "GGML_ASSERT(%s) failed", "!ref_stack.empty()"); if ( (std::vector<bool>::empty(v13 + 32) & 1) != 0 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7158LL, "GGML_ASSERT(%s) failed", "!keep_stack.empty()"); std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::pop_back(v13 + 8); std::vector<bool>::pop_back(v13 + 32); if ( (v15 & 1) == 0 && (std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::empty(v13 + 8) & 1) == 0 ) { v8 = (_QWORD *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::back(v13 + 8); if ( (nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::is_array(*v8) & 1) != 0 ) { v9 = std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::back(v13 + 8); std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::pop_back(*(_QWORD *)(*(_QWORD *)v9 + 8LL)); } } return 1; }
end_array: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV RDI,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x10],RDI MOV byte ptr [RSP + 0x2f],0x1 ADD RDI,0x8 CALL 0x001bc400 CMP qword ptr [RAX],0x0 JZ 0x001bb6c2 MOV RDI,qword ptr [RSP + 0x10] MOV RAX,RDI ADD RAX,0x80 MOV qword ptr [RSP],RAX ADD RDI,0x8 CALL 0x001bbe10 MOV RDI,qword ptr [RSP + 0x10] SUB EAX,0x1 MOV dword ptr [RSP + 0xc],EAX ADD RDI,0x8 CALL 0x001bc400 MOV RDI,qword ptr [RSP] MOV ESI,dword ptr [RSP + 0xc] MOV RCX,qword ptr [RAX] MOV EDX,0x3 CALL 0x001bbdb0 AND AL,0x1 MOV byte ptr [RSP + 0x2f],AL TEST byte ptr [RSP + 0x2f],0x1 JZ 0x001bb685 MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x8 CALL 0x001bc400 MOV RDI,qword ptr [RAX] CALL 0x001bcb50 JMP 0x001bb6c0 LAB_001bb685: MOV RSI,qword ptr [RSP + 0x10] ADD RSI,0xa8 LEA RDI,[RSP + 0x18] CALL 0x001bdfb0 MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x8 CALL 0x001bc400 MOV RDI,qword ptr [RAX] LEA RSI,[RSP + 0x18] CALL 0x001b6830 LEA RDI,[RSP + 0x18] CALL 0x001adff0 LAB_001bb6c0: JMP 0x001bb6c2 LAB_001bb6c2: MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x8 CALL 0x001bc850 TEST AL,0x1 JNZ 0x001bb6d6 JMP 0x001bb6f7 LAB_001bb6d6: LEA RDI,[0x3179d8] MOV ESI,0x1bf5 LEA RDX,[0x3110ca] LEA RCX,[0x3189de] MOV AL,0x0 CALL 0x0015bf60 LAB_001bb6f7: MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x20 CALL 0x001bbc90 TEST AL,0x1 JNZ 0x001bb70b JMP 0x001bb72c LAB_001bb70b: LEA RDI,[0x3179d8] MOV ESI,0x1bf6 LEA RDX,[0x3110ca] LEA RCX,[0x318958] MOV AL,0x0 CALL 0x0015bf60 LAB_001bb72c: MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x8 CALL 0x001be1a0 MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x20 CALL 0x001bbd90 TEST byte ptr [RSP + 0x2f],0x1 JNZ 0x001bb797 MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x8 CALL 0x001bc850 TEST AL,0x1 JNZ 0x001bb797 MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x8 CALL 0x001bc400 MOV RDI,qword ptr [RAX] CALL 0x001bc950 TEST AL,0x1 JNZ 0x001bb77d JMP 0x001bb797 LAB_001bb77d: MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x8 CALL 0x001bc400 MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + 0x8] CALL 0x001c2290 LAB_001bb797: MOV AL,0x1 AND AL,0x1 ADD RSP,0x38 RET
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::end_array() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::end_array(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this) { int iVar1; long *plVar2; int8 *puVar3; ulong uVar4; 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_20 [23]; byte local_9; json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *local_8; local_9 = 1; local_8 = this; plVar2 = (long *)std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); if (*plVar2 != 0) { iVar1 = std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::size((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); puVar3 = (int8 *) std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); local_9 = 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::__cxx11::string,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()((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::__cxx11::string,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 + 0x80),iVar1 + -1,3,*puVar3); local_9 = local_9 & 1; if (local_9 == 0) { basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_20,this + 0xa8); puVar3 = (int8 *) std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)*puVar3,local_20); 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_20); } else { std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); 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> ::set_parents(); } } uVar4 = std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::empty((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); if ((uVar4 & 1) != 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1bf5, "GGML_ASSERT(%s) failed","!ref_stack.empty()"); } uVar4 = std::vector<bool,std::allocator<bool>>::empty ((vector<bool,std::allocator<bool>> *)(this + 0x20)); if ((uVar4 & 1) != 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1bf6, "GGML_ASSERT(%s) failed","!keep_stack.empty()"); } std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::pop_back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); std::vector<bool,std::allocator<bool>>::pop_back ((vector<bool,std::allocator<bool>> *)(this + 0x20)); if (((local_9 & 1) == 0) && (uVar4 = std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::empty((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)), (uVar4 & 1) == 0)) { puVar3 = (int8 *) std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); uVar4 = 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> ::is_array((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> *)*puVar3); if ((uVar4 & 1) != 0) { plVar2 = (long *)std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::pop_back(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(*plVar2 + 8)); } } return 1; }
36,757
ftb_find_relevance_add_word
eloqsql/storage/myisam/ft_boolean_search.c
static int ftb_find_relevance_add_word(MYSQL_FTPARSER_PARAM *param, const char *word, int len, MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info __attribute__((unused))) { MY_FTB_FIND_PARAM *ftb_param= param->mysql_ftparam; FT_INFO *ftb= ftb_param->ftb; FTB_WORD *ftbw; int a, b, c; /* Find right-most element in the array of query words matching this word from a document. */ for (a= 0, b= ftb->queue.elements, c= (a+b)/2; b-a>1; c= (a+b)/2) { ftbw= ftb->list[c]; if (ha_compare_text(ftb->charset, (uchar*)word, len, (uchar*)ftbw->word+1, ftbw->len-1, (my_bool) (ftbw->flags & FTB_FLAG_TRUNC)) < 0) b= c; else a= c; } /* If there were no words with truncation operator, we iterate to the beginning of an array until array element is equal to the word from a document. This is done mainly because the same word may be mentioned twice (or more) in the query. In case query has words with truncation operator we must iterate to the beginning of the array. There may be non-matching query words between matching word with truncation operator and the right-most matching element. E.g., if we're looking for 'aaa15' in an array of 'aaa1* aaa14 aaa15 aaa16'. Worse of that there still may be match even if the binary search above didn't find matching element. E.g., if we're looking for 'aaa15' in an array of 'aaa1* aaa14 aaa16'. The binary search will stop at 'aaa16'. */ for (; c >= 0; c--) { ftbw= ftb->list[c]; if (ha_compare_text(ftb->charset, (uchar*)word, len, (uchar*)ftbw->word + 1,ftbw->len - 1, (my_bool)(ftbw->flags & FTB_FLAG_TRUNC))) { if (ftb->with_scan & FTB_FLAG_TRUNC) continue; else break; } if (ftbw->docid[1] == ftb->info->lastpos) continue; ftbw->docid[1]= ftb->info->lastpos; if (unlikely(_ftb_climb_the_tree(ftb, ftbw, ftb_param->ftsi))) return 1; } return(0); }
O0
c
ftb_find_relevance_add_word: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movl $0x0, -0x44(%rbp) movq -0x38(%rbp), %rax movl 0x80(%rax), %eax movl %eax, -0x48(%rbp) movl -0x44(%rbp), %eax addl -0x48(%rbp), %eax movl $0x2, %ecx cltd idivl %ecx movl %eax, -0x4c(%rbp) movl -0x48(%rbp), %eax subl -0x44(%rbp), %eax cmpl $0x1, %eax jle 0xa085b movq -0x38(%rbp), %rax movq 0x20(%rax), %rax movslq -0x4c(%rbp), %rcx movq (%rax,%rcx,8), %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rax movq 0x10(%rax), %rdi movq -0x18(%rbp), %rsi movslq -0x1c(%rbp), %rdx movq -0x40(%rbp), %rcx addq $0x4d, %rcx addq $0x1, %rcx movq -0x40(%rbp), %rax movl 0x48(%rax), %eax subl $0x1, %eax movl %eax, %eax movl %eax, %r8d movq -0x40(%rbp), %rax movl 0x8(%rax), %eax andl $0x1, %eax movsbl %al, %r9d callq 0xf17e0 cmpl $0x0, %eax jge 0xa083d movl -0x4c(%rbp), %eax movl %eax, -0x48(%rbp) jmp 0xa0843 movl -0x4c(%rbp), %eax movl %eax, -0x44(%rbp) jmp 0xa0845 movl -0x44(%rbp), %eax addl -0x48(%rbp), %eax movl $0x2, %ecx cltd idivl %ecx movl %eax, -0x4c(%rbp) jmp 0xa07d3 jmp 0xa085d cmpl $0x0, -0x4c(%rbp) jl 0xa0948 movq -0x38(%rbp), %rax movq 0x20(%rax), %rax movslq -0x4c(%rbp), %rcx movq (%rax,%rcx,8), %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rax movq 0x10(%rax), %rdi movq -0x18(%rbp), %rsi movslq -0x1c(%rbp), %rdx movq -0x40(%rbp), %rcx addq $0x4d, %rcx addq $0x1, %rcx movq -0x40(%rbp), %rax movl 0x48(%rax), %eax subl $0x1, %eax movl %eax, %eax movl %eax, %r8d movq -0x40(%rbp), %rax movl 0x8(%rax), %eax andl $0x1, %eax movsbl %al, %r9d callq 0xf17e0 cmpl $0x0, %eax je 0xa08d5 movq -0x38(%rbp), %rax movzbl 0x344(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax je 0xa08d3 jmp 0xa093a jmp 0xa0948 movq -0x40(%rbp), %rax movq 0x18(%rax), %rax movq -0x38(%rbp), %rcx movq 0x8(%rcx), %rcx cmpq 0x170(%rcx), %rax jne 0xa08f0 jmp 0xa093a movq -0x38(%rbp), %rax movq 0x8(%rax), %rax movq 0x170(%rax), %rcx movq -0x40(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x38(%rbp), %rdi movq -0x40(%rbp), %rsi movq -0x30(%rbp), %rax movq 0x8(%rax), %rdx callq 0x9ff80 cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xa0938 movl $0x1, -0x4(%rbp) jmp 0xa094f jmp 0xa093a movl -0x4c(%rbp), %eax addl $-0x1, %eax movl %eax, -0x4c(%rbp) jmp 0xa085d movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopl (%rax,%rax)
ftb_find_relevance_add_word: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], rcx mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_30], rax mov rax, [rbp+var_30] mov rax, [rax] mov [rbp+var_38], rax mov [rbp+var_44], 0 mov rax, [rbp+var_38] mov eax, [rax+80h] mov [rbp+var_48], eax mov eax, [rbp+var_44] add eax, [rbp+var_48] mov ecx, 2 cdq idiv ecx mov [rbp+var_4C], eax loc_A07D3: mov eax, [rbp+var_48] sub eax, [rbp+var_44] cmp eax, 1 jle short loc_A085B mov rax, [rbp+var_38] mov rax, [rax+20h] movsxd rcx, [rbp+var_4C] mov rax, [rax+rcx*8] mov [rbp+var_40], rax mov rax, [rbp+var_38] mov rdi, [rax+10h] mov rsi, [rbp+var_18] movsxd rdx, [rbp+var_1C] mov rcx, [rbp+var_40] add rcx, 4Dh ; 'M' add rcx, 1 mov rax, [rbp+var_40] mov eax, [rax+48h] sub eax, 1 mov eax, eax mov r8d, eax mov rax, [rbp+var_40] mov eax, [rax+8] and eax, 1 movsx r9d, al call ha_compare_text cmp eax, 0 jge short loc_A083D mov eax, [rbp+var_4C] mov [rbp+var_48], eax jmp short loc_A0843 loc_A083D: mov eax, [rbp+var_4C] mov [rbp+var_44], eax loc_A0843: jmp short $+2 loc_A0845: mov eax, [rbp+var_44] add eax, [rbp+var_48] mov ecx, 2 cdq idiv ecx mov [rbp+var_4C], eax jmp loc_A07D3 loc_A085B: jmp short $+2 loc_A085D: cmp [rbp+var_4C], 0 jl loc_A0948 mov rax, [rbp+var_38] mov rax, [rax+20h] movsxd rcx, [rbp+var_4C] mov rax, [rax+rcx*8] mov [rbp+var_40], rax mov rax, [rbp+var_38] mov rdi, [rax+10h] mov rsi, [rbp+var_18] movsxd rdx, [rbp+var_1C] mov rcx, [rbp+var_40] add rcx, 4Dh ; 'M' add rcx, 1 mov rax, [rbp+var_40] mov eax, [rax+48h] sub eax, 1 mov eax, eax mov r8d, eax mov rax, [rbp+var_40] mov eax, [rax+8] and eax, 1 movsx r9d, al call ha_compare_text cmp eax, 0 jz short loc_A08D5 mov rax, [rbp+var_38] movzx eax, byte ptr [rax+344h] and eax, 1 cmp eax, 0 jz short loc_A08D3 jmp short loc_A093A loc_A08D3: jmp short loc_A0948 loc_A08D5: mov rax, [rbp+var_40] mov rax, [rax+18h] mov rcx, [rbp+var_38] mov rcx, [rcx+8] cmp rax, [rcx+170h] jnz short loc_A08F0 jmp short loc_A093A loc_A08F0: mov rax, [rbp+var_38] mov rax, [rax+8] mov rcx, [rax+170h] mov rax, [rbp+var_40] mov [rax+18h], rcx mov rdi, [rbp+var_38] mov rsi, [rbp+var_40] mov rax, [rbp+var_30] mov rdx, [rax+8] call _ftb_climb_the_tree cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_A0938 mov [rbp+var_4], 1 jmp short loc_A094F loc_A0938: jmp short $+2 loc_A093A: mov eax, [rbp+var_4C] add eax, 0FFFFFFFFh mov [rbp+var_4C], eax jmp loc_A085D loc_A0948: mov [rbp+var_4], 0 loc_A094F: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long ftb_find_relevance_add_word(long long a1, long long a2, int a3) { int v4; // [rsp+4h] [rbp-4Ch] int v5; // [rsp+8h] [rbp-48h] int v6; // [rsp+Ch] [rbp-44h] long long v7; // [rsp+10h] [rbp-40h] long long v8; // [rsp+10h] [rbp-40h] long long v9; // [rsp+18h] [rbp-38h] long long *v10; // [rsp+20h] [rbp-30h] v10 = *(long long **)(a1 + 24); v9 = *v10; v6 = 0; v5 = *(_DWORD *)(*v10 + 128); v4 = v5 / 2; while ( v5 - v6 > 1 ) { v7 = *(_QWORD *)(*(_QWORD *)(v9 + 32) + 8LL * v4); if ( (int)ha_compare_text( *(_QWORD *)(v9 + 16), a2, a3, v7 + 78, (unsigned int)(*(_DWORD *)(v7 + 72) - 1), *(_BYTE *)(v7 + 8) & 1) >= 0 ) v6 = v4; else v5 = v4; v4 = (v5 + v6) / 2; } while ( v4 >= 0 ) { v8 = *(_QWORD *)(*(_QWORD *)(v9 + 32) + 8LL * v4); if ( (unsigned int)ha_compare_text( *(_QWORD *)(v9 + 16), a2, a3, v8 + 78, (unsigned int)(*(_DWORD *)(v8 + 72) - 1), *(_BYTE *)(v8 + 8) & 1) ) { if ( (*(_BYTE *)(v9 + 836) & 1) == 0 ) break; } else if ( *(_QWORD *)(v8 + 24) != *(_QWORD *)(*(_QWORD *)(v9 + 8) + 368LL) ) { *(_QWORD *)(v8 + 24) = *(_QWORD *)(*(_QWORD *)(v9 + 8) + 368LL); if ( (unsigned int)ftb_climb_the_tree(v9, v8, (_QWORD *)v10[1]) ) return 1; } --v4; } return 0; }
ftb_find_relevance_add_word: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV dword ptr [RBP + -0x44],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX + 0x80] MOV dword ptr [RBP + -0x48],EAX MOV EAX,dword ptr [RBP + -0x44] ADD EAX,dword ptr [RBP + -0x48] MOV ECX,0x2 CDQ IDIV ECX MOV dword ptr [RBP + -0x4c],EAX LAB_001a07d3: MOV EAX,dword ptr [RBP + -0x48] SUB EAX,dword ptr [RBP + -0x44] CMP EAX,0x1 JLE 0x001a085b MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x20] MOVSXD RCX,dword ptr [RBP + -0x4c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX + 0x10] MOV RSI,qword ptr [RBP + -0x18] MOVSXD RDX,dword ptr [RBP + -0x1c] MOV RCX,qword ptr [RBP + -0x40] ADD RCX,0x4d ADD RCX,0x1 MOV RAX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RAX + 0x48] SUB EAX,0x1 MOV EAX,EAX MOV R8D,EAX MOV RAX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RAX + 0x8] AND EAX,0x1 MOVSX R9D,AL CALL 0x001f17e0 CMP EAX,0x0 JGE 0x001a083d MOV EAX,dword ptr [RBP + -0x4c] MOV dword ptr [RBP + -0x48],EAX JMP 0x001a0843 LAB_001a083d: MOV EAX,dword ptr [RBP + -0x4c] MOV dword ptr [RBP + -0x44],EAX LAB_001a0843: JMP 0x001a0845 LAB_001a0845: MOV EAX,dword ptr [RBP + -0x44] ADD EAX,dword ptr [RBP + -0x48] MOV ECX,0x2 CDQ IDIV ECX MOV dword ptr [RBP + -0x4c],EAX JMP 0x001a07d3 LAB_001a085b: JMP 0x001a085d LAB_001a085d: CMP dword ptr [RBP + -0x4c],0x0 JL 0x001a0948 MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x20] MOVSXD RCX,dword ptr [RBP + -0x4c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX + 0x10] MOV RSI,qword ptr [RBP + -0x18] MOVSXD RDX,dword ptr [RBP + -0x1c] MOV RCX,qword ptr [RBP + -0x40] ADD RCX,0x4d ADD RCX,0x1 MOV RAX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RAX + 0x48] SUB EAX,0x1 MOV EAX,EAX MOV R8D,EAX MOV RAX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RAX + 0x8] AND EAX,0x1 MOVSX R9D,AL CALL 0x001f17e0 CMP EAX,0x0 JZ 0x001a08d5 MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,byte ptr [RAX + 0x344] AND EAX,0x1 CMP EAX,0x0 JZ 0x001a08d3 JMP 0x001a093a LAB_001a08d3: JMP 0x001a0948 LAB_001a08d5: MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RCX + 0x8] CMP RAX,qword ptr [RCX + 0x170] JNZ 0x001a08f0 JMP 0x001a093a LAB_001a08f0: MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RAX + 0x170] MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX + 0x18],RCX MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RAX + 0x8] CALL 0x0019ff80 CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001a0938 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001a094f LAB_001a0938: JMP 0x001a093a LAB_001a093a: MOV EAX,dword ptr [RBP + -0x4c] ADD EAX,-0x1 MOV dword ptr [RBP + -0x4c],EAX JMP 0x001a085d LAB_001a0948: MOV dword ptr [RBP + -0x4],0x0 LAB_001a094f: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 ftb_find_relevance_add_word(long param_1,int8 param_2,int param_3) { long *plVar1; long lVar2; long lVar3; int iVar4; int local_54; int local_50; int local_4c; plVar1 = *(long **)(param_1 + 0x18); lVar2 = *plVar1; local_4c = 0; local_50 = *(int *)(lVar2 + 0x80); local_54 = local_50; while (local_54 = local_54 / 2, 1 < local_50 - local_4c) { lVar3 = *(long *)(*(long *)(lVar2 + 0x20) + (long)local_54 * 8); iVar4 = ha_compare_text(*(int8 *)(lVar2 + 0x10),param_2,(long)param_3,lVar3 + 0x4e, *(int *)(lVar3 + 0x48) + -1,(byte)*(int4 *)(lVar3 + 8) & 1); if (iVar4 < 0) { local_50 = local_54; } else { local_4c = local_54; } local_54 = local_4c + local_50; } do { if (local_54 < 0) { return 0; } lVar3 = *(long *)(*(long *)(lVar2 + 0x20) + (long)local_54 * 8); iVar4 = ha_compare_text(*(int8 *)(lVar2 + 0x10),param_2,(long)param_3,lVar3 + 0x4e, *(int *)(lVar3 + 0x48) + -1,(byte)*(int4 *)(lVar3 + 8) & 1); if (iVar4 == 0) { if (*(long *)(lVar3 + 0x18) != *(long *)(*(long *)(lVar2 + 8) + 0x170)) { *(int8 *)(lVar3 + 0x18) = *(int8 *)(*(long *)(lVar2 + 8) + 0x170); iVar4 = _ftb_climb_the_tree(lVar2,lVar3,plVar1[1]); if (iVar4 != 0) { return 1; } } } else if ((*(byte *)(lVar2 + 0x344) & 1) == 0) { return 0; } local_54 = local_54 + -1; } while( true ); }
36,758
ftb_find_relevance_add_word
eloqsql/storage/myisam/ft_boolean_search.c
static int ftb_find_relevance_add_word(MYSQL_FTPARSER_PARAM *param, const char *word, int len, MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info __attribute__((unused))) { MY_FTB_FIND_PARAM *ftb_param= param->mysql_ftparam; FT_INFO *ftb= ftb_param->ftb; FTB_WORD *ftbw; int a, b, c; /* Find right-most element in the array of query words matching this word from a document. */ for (a= 0, b= ftb->queue.elements, c= (a+b)/2; b-a>1; c= (a+b)/2) { ftbw= ftb->list[c]; if (ha_compare_text(ftb->charset, (uchar*)word, len, (uchar*)ftbw->word+1, ftbw->len-1, (my_bool) (ftbw->flags & FTB_FLAG_TRUNC)) < 0) b= c; else a= c; } /* If there were no words with truncation operator, we iterate to the beginning of an array until array element is equal to the word from a document. This is done mainly because the same word may be mentioned twice (or more) in the query. In case query has words with truncation operator we must iterate to the beginning of the array. There may be non-matching query words between matching word with truncation operator and the right-most matching element. E.g., if we're looking for 'aaa15' in an array of 'aaa1* aaa14 aaa15 aaa16'. Worse of that there still may be match even if the binary search above didn't find matching element. E.g., if we're looking for 'aaa15' in an array of 'aaa1* aaa14 aaa16'. The binary search will stop at 'aaa16'. */ for (; c >= 0; c--) { ftbw= ftb->list[c]; if (ha_compare_text(ftb->charset, (uchar*)word, len, (uchar*)ftbw->word + 1,ftbw->len - 1, (my_bool)(ftbw->flags & FTB_FLAG_TRUNC))) { if (ftb->with_scan & FTB_FLAG_TRUNC) continue; else break; } if (ftbw->docid[1] == ftb->info->lastpos) continue; ftbw->docid[1]= ftb->info->lastpos; if (unlikely(_ftb_climb_the_tree(ftb, ftbw, ftb_param->ftsi))) return 1; } return(0); }
O3
c
ftb_find_relevance_add_word: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %edx, %ecx movq %rsi, -0x30(%rbp) movq 0x18(%rdi), %rax movq %rax, -0x38(%rbp) movq (%rax), %r14 movl 0x80(%r14), %r13d pushq $0x2 popq %rsi movl %r13d, %eax cltd idivl %esi movl %eax, %r12d movslq %ecx, %r15 cmpl $0x2, %r13d jl 0x2d742 xorl %ebx, %ebx movq 0x10(%r14), %rdi movq 0x20(%r14), %rax movslq %r12d, %rcx movq (%rax,%rcx,8), %rax leaq 0x4e(%rax), %rcx movl 0x8(%rax), %r9d movl 0x48(%rax), %r8d decl %r8d andl $0x1, %r9d movq -0x30(%rbp), %rsi movq %r15, %rdx callq 0x9f6dc testl %eax, %eax js 0x2d728 movl %r12d, %ebx jmp 0x2d72b movl %r12d, %r13d leal (%rbx,%r13), %eax cltd pushq $0x2 popq %rcx idivl %ecx movl %eax, %r12d movl %r13d, %eax subl %ebx, %eax cmpl $0x1, %eax jg 0x2d6f1 xorl %eax, %eax testl %r12d, %r12d js 0x2d7c2 movq -0x30(%rbp), %rbx movq 0x10(%r14), %rdi movq 0x20(%r14), %rax movl %r12d, %ecx movq (%rax,%rcx,8), %r13 leaq 0x4e(%r13), %rcx movl 0x8(%r13), %r9d movl 0x48(%r13), %r8d decl %r8d andl $0x1, %r9d movq %rbx, %rsi movq %r15, %rdx callq 0x9f6dc testl %eax, %eax je 0x2d78a testb $0x1, 0x344(%r14) jne 0x2d7b6 jmp 0x2d7c0 movq 0x8(%r14), %rax movq 0x170(%rax), %rax cmpq %rax, 0x18(%r13) je 0x2d7b6 movq %rax, 0x18(%r13) movq -0x38(%rbp), %rax movq 0x8(%rax), %rdx movq %r14, %rdi movq %r13, %rsi callq 0x72d68 testl %eax, %eax jne 0x2d7d1 testl %r12d, %r12d jle 0x2d7c0 decl %r12d jmp 0x2d74d xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x1 popq %rax jmp 0x2d7c2
ftb_find_relevance_add_word: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov ecx, edx mov [rbp+var_30], rsi mov rax, [rdi+18h] mov [rbp+var_38], rax mov r14, [rax] mov r13d, [r14+80h] push 2 pop rsi mov eax, r13d cdq idiv esi mov r12d, eax movsxd r15, ecx cmp r13d, 2 jl short loc_2D742 xor ebx, ebx loc_2D6F1: mov rdi, [r14+10h] mov rax, [r14+20h] movsxd rcx, r12d mov rax, [rax+rcx*8] lea rcx, [rax+4Eh] mov r9d, [rax+8] mov r8d, [rax+48h] dec r8d and r9d, 1 mov rsi, [rbp+var_30] mov rdx, r15 call ha_compare_text test eax, eax js short loc_2D728 mov ebx, r12d jmp short loc_2D72B loc_2D728: mov r13d, r12d loc_2D72B: lea eax, [rbx+r13] cdq push 2 pop rcx idiv ecx mov r12d, eax mov eax, r13d sub eax, ebx cmp eax, 1 jg short loc_2D6F1 loc_2D742: xor eax, eax test r12d, r12d js short loc_2D7C2 mov rbx, [rbp+var_30] loc_2D74D: mov rdi, [r14+10h] mov rax, [r14+20h] mov ecx, r12d mov r13, [rax+rcx*8] lea rcx, [r13+4Eh] mov r9d, [r13+8] mov r8d, [r13+48h] dec r8d and r9d, 1 mov rsi, rbx mov rdx, r15 call ha_compare_text test eax, eax jz short loc_2D78A test byte ptr [r14+344h], 1 jnz short loc_2D7B6 jmp short loc_2D7C0 loc_2D78A: mov rax, [r14+8] mov rax, [rax+170h] cmp [r13+18h], rax jz short loc_2D7B6 mov [r13+18h], rax mov rax, [rbp+var_38] mov rdx, [rax+8] mov rdi, r14 mov rsi, r13 call _ftb_climb_the_tree test eax, eax jnz short loc_2D7D1 loc_2D7B6: test r12d, r12d jle short loc_2D7C0 dec r12d jmp short loc_2D74D loc_2D7C0: xor eax, eax loc_2D7C2: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2D7D1: push 1 pop rax jmp short loc_2D7C2
long long ftb_find_relevance_add_word(long long a1, long long a2, int a3) { long long v3; // r14 int v4; // r13d int v5; // r12d long long v6; // r15 int v7; // ebx long long v8; // rax long long result; // rax long long v10; // r13 long long v11; // rax _QWORD *v12; // [rsp+8h] [rbp-38h] v12 = *(_QWORD **)(a1 + 24); v3 = *v12; v4 = *(_DWORD *)(*v12 + 128LL); v5 = v4 / 2; v6 = a3; if ( v4 >= 2 ) { v7 = 0; do { v8 = *(_QWORD *)(*(_QWORD *)(v3 + 32) + 8LL * v5); if ( (int)ha_compare_text( *(_QWORD *)(v3 + 16), a2, v6, v8 + 78, (unsigned int)(*(_DWORD *)(v8 + 72) - 1), *(_DWORD *)(v8 + 8) & 1) < 0 ) v4 = v5; else v7 = v5; v5 = (v7 + v4) / 2; } while ( v4 - v7 > 1 ); } result = 0LL; if ( v5 >= 0 ) { while ( 1 ) { v10 = *(_QWORD *)(*(_QWORD *)(v3 + 32) + 8LL * (unsigned int)v5); if ( (unsigned int)ha_compare_text( *(_QWORD *)(v3 + 16), a2, v6, v10 + 78, (unsigned int)(*(_DWORD *)(v10 + 72) - 1), *(_DWORD *)(v10 + 8) & 1) ) { if ( (*(_BYTE *)(v3 + 836) & 1) == 0 ) return 0LL; } else { v11 = *(_QWORD *)(*(_QWORD *)(v3 + 8) + 368LL); if ( *(_QWORD *)(v10 + 24) != v11 ) { *(_QWORD *)(v10 + 24) = v11; if ( (unsigned int)ftb_climb_the_tree(v3, v10, v12[1]) ) return 1LL; } } if ( v5 <= 0 ) return 0LL; --v5; } } return result; }
ftb_find_relevance_add_word: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV ECX,EDX MOV qword ptr [RBP + -0x30],RSI MOV RAX,qword ptr [RDI + 0x18] MOV qword ptr [RBP + -0x38],RAX MOV R14,qword ptr [RAX] MOV R13D,dword ptr [R14 + 0x80] PUSH 0x2 POP RSI MOV EAX,R13D CDQ IDIV ESI MOV R12D,EAX MOVSXD R15,ECX CMP R13D,0x2 JL 0x0012d742 XOR EBX,EBX LAB_0012d6f1: MOV RDI,qword ptr [R14 + 0x10] MOV RAX,qword ptr [R14 + 0x20] MOVSXD RCX,R12D MOV RAX,qword ptr [RAX + RCX*0x8] LEA RCX,[RAX + 0x4e] MOV R9D,dword ptr [RAX + 0x8] MOV R8D,dword ptr [RAX + 0x48] DEC R8D AND R9D,0x1 MOV RSI,qword ptr [RBP + -0x30] MOV RDX,R15 CALL 0x0019f6dc TEST EAX,EAX JS 0x0012d728 MOV EBX,R12D JMP 0x0012d72b LAB_0012d728: MOV R13D,R12D LAB_0012d72b: LEA EAX,[RBX + R13*0x1] CDQ PUSH 0x2 POP RCX IDIV ECX MOV R12D,EAX MOV EAX,R13D SUB EAX,EBX CMP EAX,0x1 JG 0x0012d6f1 LAB_0012d742: XOR EAX,EAX TEST R12D,R12D JS 0x0012d7c2 MOV RBX,qword ptr [RBP + -0x30] LAB_0012d74d: MOV RDI,qword ptr [R14 + 0x10] MOV RAX,qword ptr [R14 + 0x20] MOV ECX,R12D MOV R13,qword ptr [RAX + RCX*0x8] LEA RCX,[R13 + 0x4e] MOV R9D,dword ptr [R13 + 0x8] MOV R8D,dword ptr [R13 + 0x48] DEC R8D AND R9D,0x1 MOV RSI,RBX MOV RDX,R15 CALL 0x0019f6dc TEST EAX,EAX JZ 0x0012d78a TEST byte ptr [R14 + 0x344],0x1 JNZ 0x0012d7b6 JMP 0x0012d7c0 LAB_0012d78a: MOV RAX,qword ptr [R14 + 0x8] MOV RAX,qword ptr [RAX + 0x170] CMP qword ptr [R13 + 0x18],RAX JZ 0x0012d7b6 MOV qword ptr [R13 + 0x18],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RAX + 0x8] MOV RDI,R14 MOV RSI,R13 CALL 0x00172d68 TEST EAX,EAX JNZ 0x0012d7d1 LAB_0012d7b6: TEST R12D,R12D JLE 0x0012d7c0 DEC R12D JMP 0x0012d74d LAB_0012d7c0: XOR EAX,EAX LAB_0012d7c2: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012d7d1: PUSH 0x1 POP RAX JMP 0x0012d7c2
int8 ftb_find_relevance_add_word(long param_1,int8 param_2,int param_3) { long *plVar1; long lVar2; long lVar3; long lVar4; int iVar5; int iVar6; int iVar7; int iVar8; int iVar9; ulong uVar10; plVar1 = *(long **)(param_1 + 0x18); lVar2 = *plVar1; iVar7 = *(int *)(lVar2 + 0x80); uVar10 = (long)iVar7 / 2 & 0xffffffff; if (1 < iVar7) { iVar8 = 0; do { iVar9 = (int)uVar10; lVar3 = *(long *)(*(long *)(lVar2 + 0x20) + (long)iVar9 * 8); iVar6 = ha_compare_text(*(int8 *)(lVar2 + 0x10),param_2,(long)param_3,lVar3 + 0x4e, *(int *)(lVar3 + 0x48) + -1,*(uint *)(lVar3 + 8) & 1); iVar5 = iVar9; if (-1 < iVar6) { iVar5 = iVar7; iVar8 = iVar9; } iVar7 = iVar5; uVar10 = (long)(iVar8 + iVar7) / 2 & 0xffffffff; } while (1 < iVar7 - iVar8); } if (-1 < (int)uVar10) { while( true ) { lVar3 = *(long *)(*(long *)(lVar2 + 0x20) + uVar10 * 8); iVar7 = ha_compare_text(*(int8 *)(lVar2 + 0x10),param_2,(long)param_3,lVar3 + 0x4e, *(int *)(lVar3 + 0x48) + -1,*(uint *)(lVar3 + 8) & 1); if (iVar7 == 0) { lVar4 = *(long *)(*(long *)(lVar2 + 8) + 0x170); if (*(long *)(lVar3 + 0x18) != lVar4) { *(long *)(lVar3 + 0x18) = lVar4; iVar7 = _ftb_climb_the_tree(lVar2,lVar3,plVar1[1]); if (iVar7 != 0) { return 1; } } } else if ((*(byte *)(lVar2 + 0x344) & 1) == 0) { return 0; } if ((int)uVar10 < 1) break; uVar10 = (ulong)((int)uVar10 - 1); } return 0; } return 0; }
36,759
mi_mark_file_changed
eloqsql/storage/myisam/mi_locking.c
int _mi_mark_file_changed(MI_INFO *info) { uchar buff[3]; register MYISAM_SHARE *share=info->s; DBUG_ENTER("_mi_mark_file_changed"); if (!(share->state.changed & STATE_CHANGED) || ! share->global_changed) { share->state.changed|=(STATE_CHANGED | STATE_NOT_ANALYZED | STATE_NOT_OPTIMIZED_KEYS); if (!share->global_changed) { share->global_changed=1; share->state.open_count++; } if (!share->temporary) { mi_int2store(buff,share->state.open_count); buff[2]=1; /* Mark that it's changed */ DBUG_RETURN((int)mysql_file_pwrite(share->kfile, buff, sizeof(buff), sizeof(share->state.header), MYF(MY_NABP))); } } DBUG_RETURN(0); }
O0
c
mi_mark_file_changed: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movzbl 0xf0(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax je 0xb276b movq -0x20(%rbp), %rax cmpb $0x0, 0x380(%rax) jne 0xb2811 movq -0x20(%rbp), %rax movzbl 0xf0(%rax), %ecx orl $0x19, %ecx movb %cl, 0xf0(%rax) movq -0x20(%rbp), %rax cmpb $0x0, 0x380(%rax) jne 0xb27aa movq -0x20(%rbp), %rax movb $0x1, 0x380(%rax) movq -0x20(%rbp), %rax movl 0xec(%rax), %ecx addl $0x1, %ecx movl %ecx, 0xec(%rax) movq -0x20(%rbp), %rax cmpb $0x0, 0x382(%rax) jne 0xb280f movq -0x20(%rbp), %rax movl 0xec(%rax), %eax movl %eax, -0x24(%rbp) movl -0x24(%rbp), %eax movb %al, -0x12(%rbp) movl -0x24(%rbp), %eax shrl $0x8, %eax movb %al, -0x13(%rbp) movb $0x1, -0x11(%rbp) movq -0x20(%rbp), %rax movl 0x350(%rax), %edx leaq -0x13(%rbp), %rcx leaq 0xa25ef(%rip), %rdi # 0x154ddb movl $0x26f, %esi # imm = 0x26F movl $0x3, %r8d movl $0x18, %r9d movq $0x4, (%rsp) callq 0xb2830 movl %eax, -0x4(%rbp) jmp 0xb281a jmp 0xb2811 jmp 0xb2813 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_mi_mark_file_changed: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_20], rax mov rax, [rbp+var_20] movzx eax, byte ptr [rax+0F0h] and eax, 1 cmp eax, 0 jz short loc_B276B mov rax, [rbp+var_20] cmp byte ptr [rax+380h], 0 jnz loc_B2811 loc_B276B: mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+0F0h] or ecx, 19h mov [rax+0F0h], cl mov rax, [rbp+var_20] cmp byte ptr [rax+380h], 0 jnz short loc_B27AA mov rax, [rbp+var_20] mov byte ptr [rax+380h], 1 mov rax, [rbp+var_20] mov ecx, [rax+0ECh] add ecx, 1 mov [rax+0ECh], ecx loc_B27AA: mov rax, [rbp+var_20] cmp byte ptr [rax+382h], 0 jnz short loc_B280F mov rax, [rbp+var_20] mov eax, [rax+0ECh] mov [rbp+var_24], eax mov eax, [rbp+var_24] mov [rbp+var_12], al mov eax, [rbp+var_24] shr eax, 8 mov [rbp+var_13], al mov [rbp+var_11], 1 mov rax, [rbp+var_20] mov edx, [rax+350h] lea rcx, [rbp+var_13] lea rdi, aWorkspaceLlm4b_27; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 26Fh mov r8d, 3 mov r9d, 18h mov [rsp+30h+var_30], 4 call inline_mysql_file_pwrite_1 mov [rbp+var_4], eax jmp short loc_B281A loc_B280F: jmp short $+2 loc_B2811: jmp short $+2 loc_B2813: mov [rbp+var_4], 0 loc_B281A: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long mi_mark_file_changed(long long *a1) { __int16 v1; // kr00_2 long long v3; // [rsp+10h] [rbp-20h] _BYTE v4[3]; // [rsp+1Dh] [rbp-13h] BYREF long long *v5; // [rsp+20h] [rbp-10h] v5 = a1; v3 = *a1; if ( (*(_BYTE *)(*a1 + 240) & 1) != 0 && *(_BYTE *)(v3 + 896) ) return 0; *(_BYTE *)(v3 + 240) |= 0x19u; if ( !*(_BYTE *)(v3 + 896) ) { *(_BYTE *)(v3 + 896) = 1; ++*(_DWORD *)(v3 + 236); } if ( *(_BYTE *)(v3 + 898) ) { return 0; } else { v1 = *(_DWORD *)(v3 + 236); v4[0] = HIBYTE(v1); v4[1] = v1; v4[2] = 1; return (unsigned int)inline_mysql_file_pwrite_1( (unsigned int)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_locking.c", 623, *(_DWORD *)(v3 + 848), (unsigned int)v4, 3, 24, 4LL); } }
_mi_mark_file_changed: 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] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0xf0] AND EAX,0x1 CMP EAX,0x0 JZ 0x001b276b MOV RAX,qword ptr [RBP + -0x20] CMP byte ptr [RAX + 0x380],0x0 JNZ 0x001b2811 LAB_001b276b: MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0xf0] OR ECX,0x19 MOV byte ptr [RAX + 0xf0],CL MOV RAX,qword ptr [RBP + -0x20] CMP byte ptr [RAX + 0x380],0x0 JNZ 0x001b27aa MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x380],0x1 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0xec] ADD ECX,0x1 MOV dword ptr [RAX + 0xec],ECX LAB_001b27aa: MOV RAX,qword ptr [RBP + -0x20] CMP byte ptr [RAX + 0x382],0x0 JNZ 0x001b280f MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0xec] MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x24] MOV byte ptr [RBP + -0x12],AL MOV EAX,dword ptr [RBP + -0x24] SHR EAX,0x8 MOV byte ptr [RBP + -0x13],AL MOV byte ptr [RBP + -0x11],0x1 MOV RAX,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RAX + 0x350] LEA RCX,[RBP + -0x13] LEA RDI,[0x254ddb] MOV ESI,0x26f MOV R8D,0x3 MOV R9D,0x18 MOV qword ptr [RSP],0x4 CALL 0x001b2830 MOV dword ptr [RBP + -0x4],EAX JMP 0x001b281a LAB_001b280f: JMP 0x001b2811 LAB_001b2811: JMP 0x001b2813 LAB_001b2813: MOV dword ptr [RBP + -0x4],0x0 LAB_001b281a: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 _mi_mark_file_changed(long *param_1) { long lVar1; int4 uVar2; int1 local_1b; int1 local_1a; int1 local_19; long *local_18; lVar1 = *param_1; if (((*(byte *)(lVar1 + 0xf0) & 1) == 0) || (*(char *)(lVar1 + 0x380) == '\0')) { *(byte *)(lVar1 + 0xf0) = *(byte *)(lVar1 + 0xf0) | 0x19; if (*(char *)(lVar1 + 0x380) == '\0') { *(int1 *)(lVar1 + 0x380) = 1; *(int *)(lVar1 + 0xec) = *(int *)(lVar1 + 0xec) + 1; } if (*(char *)(lVar1 + 0x382) == '\0') { local_1a = (int1)*(int4 *)(lVar1 + 0xec); local_1b = (int1)((uint)*(int4 *)(lVar1 + 0xec) >> 8); local_19 = 1; local_18 = param_1; uVar2 = inline_mysql_file_pwrite ("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_locking.c", 0x26f,*(int4 *)(lVar1 + 0x350),&local_1b,3,0x18,4); return uVar2; } } return 0; }
36,760
my_casedn_utf8mb4
eloqsql/strings/ctype-utf8.c
static size_t my_casedn_utf8mb4(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen) { my_wc_t wc; int srcres, dstres; const char *srcend= src + srclen; char *dstend= dst + dstlen, *dst0= dst; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(src != dst || cs->casedn_multiply == 1); while ((src < srcend) && (srcres= my_mb_wc_utf8mb4(cs, &wc, (uchar*) src, (uchar*) srcend)) > 0) { my_tolower_utf8mb4(uni_plane, &wc); if ((dstres= my_wc_mb_utf8mb4(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0) break; src+= srcres; dst+= dstres; } return (size_t) (dst - dst0); }
O0
c
my_casedn_utf8mb4: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x20(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x58(%rbp) jmp 0x9ebca jmp 0x9ebcc movq -0x10(%rbp), %rcx xorl %eax, %eax cmpq -0x40(%rbp), %rcx movb %al, -0x59(%rbp) jae 0x9ebfc movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x40(%rbp), %rcx leaq -0x30(%rbp), %rsi callq 0x9e740 movl %eax, -0x34(%rbp) cmpl $0x0, %eax setg %al movb %al, -0x59(%rbp) movb -0x59(%rbp), %al testb $0x1, %al jne 0x9ec05 jmp 0x9ec58 movq -0x58(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0xa2ba0 movq -0x8(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x48(%rbp), %rcx callq 0x9e770 movl %eax, -0x38(%rbp) cmpl $0x0, %eax jg 0x9ec31 jmp 0x9ec58 movl -0x34(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) movl -0x38(%rbp), %ecx movq -0x20(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) jmp 0x9ebcc movq -0x20(%rbp), %rax movq -0x50(%rbp), %rcx subq %rcx, %rax addq $0x60, %rsp popq %rbp retq nopl (%rax)
my_casedn_utf8mb4: 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_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_20] add rax, [rbp+var_28] mov [rbp+var_48], rax mov rax, [rbp+var_20] mov [rbp+var_50], rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rbp+var_58], rax jmp short $+2 loc_9EBCA: jmp short $+2 loc_9EBCC: mov rcx, [rbp+var_10] xor eax, eax cmp rcx, [rbp+var_40] mov [rbp+var_59], al jnb short loc_9EBFC mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] mov rcx, [rbp+var_40] lea rsi, [rbp+var_30] call my_mb_wc_utf8mb4 mov [rbp+var_34], eax cmp eax, 0 setnle al mov [rbp+var_59], al loc_9EBFC: mov al, [rbp+var_59] test al, 1 jnz short loc_9EC05 jmp short loc_9EC58 loc_9EC05: mov rdi, [rbp+var_58] lea rsi, [rbp+var_30] call my_tolower_utf8mb4 mov rdi, [rbp+var_8] mov rsi, [rbp+var_30] mov rdx, [rbp+var_20] mov rcx, [rbp+var_48] call my_wc_mb_utf8mb4 mov [rbp+var_38], eax cmp eax, 0 jg short loc_9EC31 jmp short loc_9EC58 loc_9EC31: mov ecx, [rbp+var_34] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax mov ecx, [rbp+var_38] mov rax, [rbp+var_20] movsxd rcx, ecx add rax, rcx mov [rbp+var_20], rax jmp loc_9EBCC loc_9EC58: mov rax, [rbp+var_20] mov rcx, [rbp+var_50] sub rax, rcx add rsp, 60h pop rbp retn
_BYTE * my_casedn_utf8mb4(long long a1, unsigned long long a2, long long a3, _BYTE *a4, long long a5, long long a6) { bool v7; // [rsp+7h] [rbp-59h] long long v8; // [rsp+8h] [rbp-58h] unsigned long long v10; // [rsp+18h] [rbp-48h] unsigned long long v11; // [rsp+20h] [rbp-40h] int v12; // [rsp+28h] [rbp-38h] int v13; // [rsp+2Ch] [rbp-34h] unsigned long long v14[2]; // [rsp+30h] [rbp-30h] BYREF _BYTE *v15; // [rsp+40h] [rbp-20h] long long v16; // [rsp+48h] [rbp-18h] unsigned long long v17; // [rsp+50h] [rbp-10h] long long v18; // [rsp+58h] [rbp-8h] v18 = a1; v17 = a2; v16 = a3; v15 = a4; v14[1] = a5; v11 = a3 + a2; v10 = (unsigned long long)&a4[a5]; v8 = *(_QWORD *)(a1 + 120); while ( 1 ) { v7 = 0; if ( v17 < v11 ) { v13 = my_mb_wc_utf8mb4(v18, (long long)v14, v17, v11, a5, a6); v7 = v13 > 0; } if ( !v7 ) break; my_tolower_utf8mb4(v8, v14); v12 = my_wc_mb_utf8mb4(v18, v14[0], v15, v10); if ( v12 <= 0 ) break; v17 += v13; v15 += v12; } return (_BYTE *)(v15 - a4); }
my_casedn_utf8mb4: 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 qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x58],RAX JMP 0x0019ebca LAB_0019ebca: JMP 0x0019ebcc LAB_0019ebcc: MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x40] MOV byte ptr [RBP + -0x59],AL JNC 0x0019ebfc MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] LEA RSI,[RBP + -0x30] CALL 0x0019e740 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 SETG AL MOV byte ptr [RBP + -0x59],AL LAB_0019ebfc: MOV AL,byte ptr [RBP + -0x59] TEST AL,0x1 JNZ 0x0019ec05 JMP 0x0019ec58 LAB_0019ec05: MOV RDI,qword ptr [RBP + -0x58] LEA RSI,[RBP + -0x30] CALL 0x001a2ba0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x48] CALL 0x0019e770 MOV dword ptr [RBP + -0x38],EAX CMP EAX,0x0 JG 0x0019ec31 JMP 0x0019ec58 LAB_0019ec31: MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX MOV ECX,dword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x20] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX JMP 0x0019ebcc LAB_0019ec58: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x50] SUB RAX,RCX ADD RSP,0x60 POP RBP RET
long my_casedn_utf8mb4(long param_1,ulong param_2,long param_3,long param_4,long param_5) { int8 uVar1; bool bVar2; int iVar3; int local_3c; int8 local_38; long local_30; long local_28; long local_20; ulong local_18; long local_10; uVar1 = *(int8 *)(param_1 + 0x78); local_30 = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; while( true ) { bVar2 = false; if (local_18 < param_2 + param_3) { local_3c = my_mb_wc_utf8mb4(local_10,&local_38,local_18,param_2 + param_3); bVar2 = 0 < local_3c; } if (!bVar2) break; my_tolower_utf8mb4(uVar1,&local_38); iVar3 = my_wc_mb_utf8mb4(local_10,local_38,local_28,param_4 + param_5); if (iVar3 < 1) break; local_18 = local_18 + (long)local_3c; local_28 = local_28 + iVar3; } return local_28 - param_4; }
36,761
serial_cpp::Serial::flushInput()
ami-iit[P]serial_cpp/src/serial.cc
void Serial::flushInput () { ScopedReadLock lock(this->pimpl_); pimpl_->flushInput (); }
O1
cpp
serial_cpp::Serial::flushInput(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %r14 movq 0x8(%rdi), %rbx movq %rbx, %rdi callq 0x7bd6 movq 0x8(%r14), %rdi callq 0x6c9a movq %rbx, %rdi callq 0x7c90 addq $0x8, %rsp popq %rbx popq %r14 retq jmp 0x4e69 movq %rax, %r14 movq %rbx, %rdi callq 0x7c90 movq %r14, %rdi callq 0x34f0 movq %rax, %rdi callq 0x41cf nop
_ZN10serial_cpp6Serial10flushInputEv: push r14 push rbx push rax mov r14, rdi mov rbx, [rdi+8] mov rdi, rbx; this call _ZN10serial_cpp6Serial10SerialImpl8readLockEv; serial_cpp::Serial::SerialImpl::readLock(void) mov rdi, [r14+8]; this call _ZN10serial_cpp6Serial10SerialImpl10flushInputEv; serial_cpp::Serial::SerialImpl::flushInput(void) mov rdi, rbx; this call _ZN10serial_cpp6Serial10SerialImpl10readUnlockEv; serial_cpp::Serial::SerialImpl::readUnlock(void) add rsp, 8 pop rbx pop r14 retn jmp short loc_4E69 mov r14, rax mov rdi, rbx; this call _ZN10serial_cpp6Serial10SerialImpl10readUnlockEv; serial_cpp::Serial::SerialImpl::readUnlock(void) mov rdi, r14 call __Unwind_Resume loc_4E69: mov rdi, rax call __clang_call_terminate
long long serial_cpp::Serial::flushInput(serial_cpp::Serial *this) { serial_cpp::Serial::SerialImpl *v1; // rbx v1 = (serial_cpp::Serial::SerialImpl *)*((_QWORD *)this + 1); serial_cpp::Serial::SerialImpl::readLock(v1); serial_cpp::Serial::SerialImpl::flushInput(*((serial_cpp::Serial::SerialImpl **)this + 1)); return serial_cpp::Serial::SerialImpl::readUnlock(v1); }
flushInput: PUSH R14 PUSH RBX PUSH RAX MOV R14,RDI MOV RBX,qword ptr [RDI + 0x8] MOV RDI,RBX CALL 0x00107bd6 MOV RDI,qword ptr [R14 + 0x8] LAB_00104e3f: CALL 0x00106c9a LAB_00104e44: MOV RDI,RBX CALL 0x00107c90 ADD RSP,0x8 POP RBX POP R14 RET
/* serial_cpp::Serial::flushInput() */ void __thiscall serial_cpp::Serial::flushInput(Serial *this) { SerialImpl *this_00; this_00 = *(SerialImpl **)(this + 8); SerialImpl::readLock(this_00); /* try { // try from 00104e3f to 00104e43 has its CatchHandler @ 00104e56 */ SerialImpl::flushInput(*(SerialImpl **)(this + 8)); /* try { // try from 00104e44 to 00104e4b has its CatchHandler @ 00104e54 */ SerialImpl::readUnlock(this_00); return; }
36,762
testing::internal::String::FormatIntWidthN[abi:cxx11](int, int)
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc
std::string String::FormatIntWidthN(int value, int width) { std::stringstream ss; ss << std::setfill('0') << std::setw(width) << value; return ss.str(); }
O1
cpp
testing::internal::String::FormatIntWidthN[abi:cxx11](int, int): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x188, %rsp # imm = 0x188 movl %edx, %r14d movl %esi, %ebp movq %rdi, %rbx movq %rsp, %r15 movq %r15, %rdi callq 0x9330 movq 0x10(%r15), %rax movq -0x18(%rax), %rax leaq (%rsp,%rax), %r15 addq $0x10, %r15 cmpb $0x0, 0xe1(%r15) jne 0x238ba movq %r15, %rdi movl $0x20, %esi callq 0x9470 movb %al, 0xe0(%r15) movb $0x1, 0xe1(%r15) leaq 0x10(%rsp), %rdi movb $0x30, 0xe0(%r15) movq (%rdi), %rax movq -0x18(%rax), %rax movslq %r14d, %rcx movq %rcx, 0x20(%rsp,%rax) movl %ebp, %esi callq 0x9960 leaq 0x18(%rsp), %rsi movq %rbx, %rdi callq 0x98e0 movq 0x36697(%rip), %rsi # 0x59f88 movq %rsp, %rdi callq 0x9380 leaq 0x80(%rsp), %rdi callq 0x9190 movq %rbx, %rax addq $0x188, %rsp # imm = 0x188 popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x36667(%rip), %rsi # 0x59f88 movq %rsp, %rdi callq 0x9380 leaq 0x80(%rsp), %rdi callq 0x9190 movq %rbx, %rdi callq 0x99a0
_ZN7testing8internal6String15FormatIntWidthNB5cxx11Eii: push rbp push r15 push r14 push rbx sub rsp, 188h mov r14d, edx mov ebp, esi mov rbx, rdi mov r15, rsp mov rdi, r15 call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) mov rax, [r15+10h] mov rax, [rax-18h] lea r15, [rsp+rax+1A8h+var_1A8] add r15, 10h cmp byte ptr [r15+0E1h], 0 jnz short loc_238BA mov rdi, r15 mov esi, 20h ; ' ' call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) mov [r15+0E0h], al mov byte ptr [r15+0E1h], 1 loc_238BA: lea rdi, [rsp+1A8h+var_198] mov byte ptr [r15+0E0h], 30h ; '0' mov rax, [rdi] mov rax, [rax-18h] movsxd rcx, r14d mov [rsp+rax+1A8h+var_188], rcx mov esi, ebp call __ZNSolsEi; std::ostream::operator<<(int) lea rsi, [rsp+1A8h+var_190] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr mov rdi, rsp call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+1A8h+var_128]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rax, rbx add rsp, 188h pop rbx pop r14 pop r15 pop rbp retn mov rbx, rax mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr mov rdi, rsp call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+arg_78]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
long long testing::internal::String::FormatIntWidthN[abi:cxx11](long long a1, unsigned int a2, int a3) { long long v4; // rax _BYTE *v5; // r15 _BYTE v7[16]; // [rsp+0h] [rbp-1A8h] BYREF long long v8; // [rsp+10h] [rbp-198h] BYREF _BYTE v9[104]; // [rsp+18h] [rbp-190h] BYREF _BYTE v10[296]; // [rsp+80h] [rbp-128h] BYREF std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v7); v4 = *(_QWORD *)(v8 - 24); v5 = &v9[v4 - 8]; if ( !v10[v4 + 113] ) { v5[224] = std::ios::widen(&v9[v4 - 8], 32LL); v5[225] = 1; } v5[224] = 48; *(_QWORD *)&v9[*(_QWORD *)(v8 - 24) + 8] = a3; std::ostream::operator<<(&v8, a2); std::stringbuf::str(a1, v9); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream( v7, &`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>); std::ios_base::~ios_base((std::ios_base *)v10); return a1; }
FormatIntWidthN[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x188 MOV R14D,EDX MOV EBP,ESI MOV RBX,RDI MOV R15,RSP MOV RDI,R15 CALL 0x00109330 MOV RAX,qword ptr [R15 + 0x10] MOV RAX,qword ptr [RAX + -0x18] LEA R15,[RSP + RAX*0x1] ADD R15,0x10 CMP byte ptr [R15 + 0xe1],0x0 JNZ 0x001238ba LAB_0012389e: MOV RDI,R15 MOV ESI,0x20 CALL 0x00109470 MOV byte ptr [R15 + 0xe0],AL MOV byte ptr [R15 + 0xe1],0x1 LAB_001238ba: LEA RDI,[RSP + 0x10] MOV byte ptr [R15 + 0xe0],0x30 MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + -0x18] MOVSXD RCX,R14D MOV qword ptr [RSP + RAX*0x1 + 0x20],RCX MOV ESI,EBP CALL 0x00109960 LEA RSI,[RSP + 0x18] MOV RDI,RBX CALL 0x001098e0 LAB_001238ea: MOV RSI,qword ptr [0x00159f88] MOV RDI,RSP CALL 0x00109380 LEA RDI,[RSP + 0x80] CALL 0x00109190 MOV RAX,RBX ADD RSP,0x188 POP RBX POP R14 POP R15 POP RBP RET
/* testing::internal::String::FormatIntWidthN[abi:cxx11](int, int) */ String * __thiscall testing::internal::String::FormatIntWidthN_abi_cxx11_(String *this,int param_1,int param_2) { long lVar1; char cVar2; stringstream asStack_1a8 [16]; long local_198 [2]; long alStack_188 [12]; ios_base local_128 [112]; char acStack_b8 [152]; std::__cxx11::stringstream::stringstream(asStack_1a8); lVar1 = *(long *)(local_198[0] + -0x18); if (acStack_b8[lVar1 + 1] == '\0') { /* try { // try from 0012389e to 001238e9 has its CatchHandler @ 00123917 */ cVar2 = std::ios::widen((char)asStack_1a8 + (char)lVar1 + '\x10'); acStack_b8[lVar1] = cVar2; acStack_b8[lVar1 + 1] = '\x01'; } acStack_b8[lVar1] = '0'; *(long *)((long)alStack_188 + *(long *)(local_198[0] + -0x18)) = (long)param_2; std::ostream::operator<<((ostream *)local_198,param_1); std::__cxx11::stringbuf::str(); std::__cxx11::stringstream::~stringstream(asStack_1a8); std::ios_base::~ios_base(local_128); return this; }
36,763
ma_log_new
eloqsql/storage/maria/ma_write.c
my_bool _ma_log_new(MARIA_PAGE *ma_page, my_bool root_page) { LSN lsn; uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE * 2 + KEY_NR_STORE_SIZE +1]; uint page_length; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 2]; MARIA_HA *info= ma_page->info; MARIA_SHARE *share= info->s; my_off_t page= ma_page->pos / share->block_size; DBUG_ENTER("_ma_log_new"); DBUG_PRINT("enter", ("page: %lu", (ulong) page)); DBUG_ASSERT(share->now_transactional); /* Store address of new root page */ page_store(log_data + FILEID_STORE_SIZE, page); /* Store link to next unused page */ if (info->key_del_used == 2) page= 0; /* key_del not changed */ else page= ((share->key_del_current == HA_OFFSET_ERROR) ? IMPOSSIBLE_PAGE_NO : share->key_del_current / share->block_size); page_store(log_data + FILEID_STORE_SIZE + PAGE_STORE_SIZE, page); key_nr_store(log_data + FILEID_STORE_SIZE + PAGE_STORE_SIZE*2, ma_page->keyinfo->key_nr); log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE*2 + KEY_NR_STORE_SIZE]= (uchar) root_page; log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data); page_length= ma_page->size - LSN_STORE_SIZE; log_array[TRANSLOG_INTERNAL_PARTS + 1].str= ma_page->buff + LSN_STORE_SIZE; log_array[TRANSLOG_INTERNAL_PARTS + 1].length= page_length; /* Remember new page length for future log entires for same page */ ma_page->org_size= ma_page->size; if (translog_write_record(&lsn, LOGREC_REDO_INDEX_NEW_PAGE, info->trn, info, (translog_size_t) (sizeof(log_data) + page_length), TRANSLOG_INTERNAL_PARTS + 2, log_array, log_data, NULL)) DBUG_RETURN(1); DBUG_RETURN(0); }
O0
c
ma_log_new: pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp movb %sil, %al movq %fs:0x28, %rcx movq %rcx, -0x8(%rbp) movq %rdi, -0x20(%rbp) movb %al, -0x21(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x88(%rbp) movq -0x88(%rbp), %rax movq (%rax), %rax movq %rax, -0x90(%rbp) movq -0x20(%rbp), %rax movq 0x18(%rax), %rax movq -0x90(%rbp), %rcx movl 0x7bc(%rcx), %ecx xorl %edx, %edx divq %rcx movq %rax, -0x98(%rbp) jmp 0x68124 jmp 0x68126 jmp 0x68128 jmp 0x6812a leaq -0x16(%rbp), %rax addq $0x2, %rax movq %rax, -0xa0(%rbp) movq -0x98(%rbp), %rax movl %eax, %ecx movq -0xa0(%rbp), %rax movl %ecx, (%rax) movq -0x98(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0xa0(%rbp), %rax movb %cl, 0x4(%rax) movq -0x88(%rbp), %rax movzbl 0x67e(%rax), %eax cmpl $0x2, %eax jne 0x68182 movq $0x0, -0x98(%rbp) jmp 0x681db movq -0x90(%rbp), %rax cmpq $-0x1, 0x700(%rax) jne 0x681a6 movabsq $0xffffffffff, %rax # imm = 0xFFFFFFFFFF movq %rax, -0xb0(%rbp) jmp 0x681cd movq -0x90(%rbp), %rax movq 0x700(%rax), %rax movq -0x90(%rbp), %rcx movl 0x7bc(%rcx), %ecx xorl %edx, %edx divq %rcx movq %rax, -0xb0(%rbp) movq -0xb0(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0x681dd leaq -0x16(%rbp), %rax addq $0x2, %rax addq $0x5, %rax movq %rax, -0xa8(%rbp) movq -0x98(%rbp), %rax movl %eax, %ecx movq -0xa8(%rbp), %rax movl %ecx, (%rax) movq -0x98(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0xa8(%rbp), %rax movb %cl, 0x4(%rax) movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movb 0xa5(%rax), %al movb %al, -0xa(%rbp) movb -0x21(%rbp), %al movb %al, -0x9(%rbp) leaq -0x16(%rbp), %rax movq %rax, -0x60(%rbp) movq $0xe, -0x58(%rbp) movq -0x20(%rbp), %rax movl 0x20(%rax), %eax subl $0x7, %eax movl %eax, -0x34(%rbp) movq -0x20(%rbp), %rax movq 0x10(%rax), %rax addq $0x7, %rax movq %rax, -0x50(%rbp) movl -0x34(%rbp), %eax movq %rax, -0x48(%rbp) movq -0x20(%rbp), %rax movl 0x20(%rax), %ecx movq -0x20(%rbp), %rax movl %ecx, 0x24(%rax) movq -0x88(%rbp), %rax movq 0x8(%rax), %rdx movq -0x88(%rbp), %rcx movl -0x34(%rbp), %eax addq $0xe, %rax movl %eax, %r8d leaq -0x80(%rbp), %r10 leaq -0x16(%rbp), %rax leaq -0x30(%rbp), %rdi movl $0xd, %esi movl $0x4, %r9d xorl %r11d, %r11d movq %r10, (%rsp) movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) callq 0x31e50 cmpb $0x0, %al je 0x682cb jmp 0x682c5 movb $0x1, -0x17(%rbp) jmp 0x682d1 jmp 0x682cd movb $0x0, -0x17(%rbp) movb -0x17(%rbp), %al movb %al, -0xb1(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x682fb movb -0xb1(%rbp), %al addq $0xd0, %rsp popq %rbp retq callq 0x2a250
_ma_log_new: push rbp mov rbp, rsp sub rsp, 0D0h mov al, sil mov rcx, fs:28h mov [rbp+var_8], rcx mov [rbp+var_20], rdi mov [rbp+var_21], al mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_88], rax mov rax, [rbp+var_88] mov rax, [rax] mov [rbp+var_90], rax mov rax, [rbp+var_20] mov rax, [rax+18h] mov rcx, [rbp+var_90] mov ecx, [rcx+7BCh] xor edx, edx div rcx mov [rbp+var_98], rax jmp short $+2 loc_68124: jmp short $+2 loc_68126: jmp short $+2 loc_68128: jmp short $+2 loc_6812A: lea rax, [rbp+var_16] add rax, 2 mov [rbp+var_A0], rax mov rax, [rbp+var_98] mov ecx, eax mov rax, [rbp+var_A0] mov [rax], ecx mov rax, [rbp+var_98] shr rax, 20h mov cl, al mov rax, [rbp+var_A0] mov [rax+4], cl mov rax, [rbp+var_88] movzx eax, byte ptr [rax+67Eh] cmp eax, 2 jnz short loc_68182 mov [rbp+var_98], 0 jmp short loc_681DB loc_68182: mov rax, [rbp+var_90] cmp qword ptr [rax+700h], 0FFFFFFFFFFFFFFFFh jnz short loc_681A6 mov rax, 0FFFFFFFFFFh mov [rbp+var_B0], rax jmp short loc_681CD loc_681A6: mov rax, [rbp+var_90] mov rax, [rax+700h] mov rcx, [rbp+var_90] mov ecx, [rcx+7BCh] xor edx, edx div rcx mov [rbp+var_B0], rax loc_681CD: mov rax, [rbp+var_B0] mov [rbp+var_98], rax loc_681DB: jmp short $+2 loc_681DD: lea rax, [rbp+var_16] add rax, 2 add rax, 5 mov [rbp+var_A8], rax mov rax, [rbp+var_98] mov ecx, eax mov rax, [rbp+var_A8] mov [rax], ecx mov rax, [rbp+var_98] shr rax, 20h mov cl, al mov rax, [rbp+var_A8] mov [rax+4], cl mov rax, [rbp+var_20] mov rax, [rax+8] mov al, [rax+0A5h] mov [rbp+var_A], al mov al, [rbp+var_21] mov [rbp+var_9], al lea rax, [rbp+var_16] mov [rbp+var_60], rax mov [rbp+var_58], 0Eh mov rax, [rbp+var_20] mov eax, [rax+20h] sub eax, 7 mov [rbp+var_34], eax mov rax, [rbp+var_20] mov rax, [rax+10h] add rax, 7 mov [rbp+var_50], rax mov eax, [rbp+var_34] mov [rbp+var_48], rax mov rax, [rbp+var_20] mov ecx, [rax+20h] mov rax, [rbp+var_20] mov [rax+24h], ecx mov rax, [rbp+var_88] mov rdx, [rax+8] mov rcx, [rbp+var_88] mov eax, [rbp+var_34] add rax, 0Eh mov r8d, eax lea r10, [rbp+var_80] lea rax, [rbp+var_16] lea rdi, [rbp+var_30] mov esi, 0Dh mov r9d, 4 xor r11d, r11d mov [rsp+0D0h+var_D0], r10 mov [rsp+0D0h+var_C8], rax mov [rsp+0D0h+var_C0], 0 call translog_write_record cmp al, 0 jz short loc_682CB jmp short $+2 loc_682C5: mov [rbp+var_17], 1 jmp short loc_682D1 loc_682CB: jmp short $+2 loc_682CD: mov [rbp+var_17], 0 loc_682D1: mov al, [rbp+var_17] mov [rbp+var_B1], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_682FB mov al, [rbp+var_B1] add rsp, 0D0h pop rbp retn loc_682FB: call ___stack_chk_fail
bool ma_log_new(long long **a1, char a2) { unsigned long long v3; // [rsp+20h] [rbp-B0h] unsigned long long v4; // [rsp+38h] [rbp-98h] unsigned long long v5; // [rsp+38h] [rbp-98h] long long v6; // [rsp+40h] [rbp-90h] long long *v7; // [rsp+48h] [rbp-88h] _QWORD v8[9]; // [rsp+50h] [rbp-80h] BYREF unsigned int v9; // [rsp+9Ch] [rbp-34h] _BYTE v10[15]; // [rsp+A0h] [rbp-30h] BYREF char v11; // [rsp+AFh] [rbp-21h] long long **v12; // [rsp+B0h] [rbp-20h] __int16 v13; // [rsp+BAh] [rbp-16h] BYREF int v14; // [rsp+BCh] [rbp-14h] char v15; // [rsp+C0h] [rbp-10h] int v16; // [rsp+C1h] [rbp-Fh] char v17; // [rsp+C5h] [rbp-Bh] char v18; // [rsp+C6h] [rbp-Ah] char v19; // [rsp+C7h] [rbp-9h] unsigned long long v20; // [rsp+C8h] [rbp-8h] v20 = __readfsqword(0x28u); v12 = a1; v11 = a2; v7 = *a1; v6 = **a1; v4 = (unsigned long long)a1[3] / *(unsigned int *)(v6 + 1980); v14 = v4; v15 = BYTE4(v4); if ( *((_BYTE *)v7 + 1662) == 2 ) { v5 = 0LL; } else { if ( *(_QWORD *)(v6 + 1792) == -1LL ) v3 = 0xFFFFFFFFFFLL; else v3 = *(_QWORD *)(v6 + 1792) / (unsigned long long)*(unsigned int *)(v6 + 1980); v5 = v3; } v16 = v5; v17 = BYTE4(v5); v18 = *((_BYTE *)v12[1] + 165); v19 = v11; v8[4] = &v13; v8[5] = 14LL; v9 = *((_DWORD *)v12 + 8) - 7; v8[6] = (char *)v12[2] + 7; v8[7] = v9; *((_DWORD *)v12 + 9) = *((_DWORD *)v12 + 8); return translog_write_record((long long)v10, 0xDu, v7[1], v7, v9 + 14, 4u, v8, &v13, 0LL) != 0; }
_ma_log_new: PUSH RBP MOV RBP,RSP SUB RSP,0xd0 MOV AL,SIL MOV RCX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RCX MOV qword ptr [RBP + -0x20],RDI MOV byte ptr [RBP + -0x21],AL MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x88] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x90] MOV ECX,dword ptr [RCX + 0x7bc] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x98],RAX JMP 0x00168124 LAB_00168124: JMP 0x00168126 LAB_00168126: JMP 0x00168128 LAB_00168128: JMP 0x0016812a LAB_0016812a: LEA RAX,[RBP + -0x16] ADD RAX,0x2 MOV qword ptr [RBP + -0xa0],RAX MOV RAX,qword ptr [RBP + -0x98] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0xa0] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x98] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0xa0] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x88] MOVZX EAX,byte ptr [RAX + 0x67e] CMP EAX,0x2 JNZ 0x00168182 MOV qword ptr [RBP + -0x98],0x0 JMP 0x001681db LAB_00168182: MOV RAX,qword ptr [RBP + -0x90] CMP qword ptr [RAX + 0x700],-0x1 JNZ 0x001681a6 MOV RAX,0xffffffffff MOV qword ptr [RBP + -0xb0],RAX JMP 0x001681cd LAB_001681a6: MOV RAX,qword ptr [RBP + -0x90] MOV RAX,qword ptr [RAX + 0x700] MOV RCX,qword ptr [RBP + -0x90] MOV ECX,dword ptr [RCX + 0x7bc] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0xb0],RAX LAB_001681cd: MOV RAX,qword ptr [RBP + -0xb0] MOV qword ptr [RBP + -0x98],RAX LAB_001681db: JMP 0x001681dd LAB_001681dd: LEA RAX,[RBP + -0x16] ADD RAX,0x2 ADD RAX,0x5 MOV qword ptr [RBP + -0xa8],RAX MOV RAX,qword ptr [RBP + -0x98] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0xa8] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x98] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0xa8] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV AL,byte ptr [RAX + 0xa5] MOV byte ptr [RBP + -0xa],AL MOV AL,byte ptr [RBP + -0x21] MOV byte ptr [RBP + -0x9],AL LEA RAX,[RBP + -0x16] MOV qword ptr [RBP + -0x60],RAX MOV qword ptr [RBP + -0x58],0xe MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x20] SUB EAX,0x7 MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x10] ADD RAX,0x7 MOV qword ptr [RBP + -0x50],RAX MOV EAX,dword ptr [RBP + -0x34] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x20] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x24],ECX MOV RAX,qword ptr [RBP + -0x88] MOV RDX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x88] MOV EAX,dword ptr [RBP + -0x34] ADD RAX,0xe MOV R8D,EAX LEA R10,[RBP + -0x80] LEA RAX,[RBP + -0x16] LEA RDI,[RBP + -0x30] MOV ESI,0xd MOV R9D,0x4 XOR R11D,R11D MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 CALL 0x00131e50 CMP AL,0x0 JZ 0x001682cb JMP 0x001682c5 LAB_001682c5: MOV byte ptr [RBP + -0x17],0x1 JMP 0x001682d1 LAB_001682cb: JMP 0x001682cd LAB_001682cd: MOV byte ptr [RBP + -0x17],0x0 LAB_001682d1: MOV AL,byte ptr [RBP + -0x17] MOV byte ptr [RBP + -0xb1],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001682fb MOV AL,byte ptr [RBP + -0xb1] ADD RSP,0xd0 POP RBP RET LAB_001682fb: CALL 0x0012a250
int8 _ma_log_new(long *param_1,int1 param_2) { long *plVar1; long lVar2; char cVar3; ulong uVar4; long in_FS_OFFSET; ulong local_b8; ulong local_a0; int1 local_88 [32]; int1 *local_68; int8 local_60; long local_58; ulong local_50; uint local_3c; int1 local_38 [15]; int1 local_29; long *local_28; int1 local_1f; int1 local_1e [2]; int4 local_1c; int1 local_18; int4 local_17; int1 local_13; int1 local_12; int1 local_11; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); plVar1 = (long *)*param_1; lVar2 = *plVar1; uVar4 = (ulong)param_1[3] / (ulong)*(uint *)(lVar2 + 0x7bc); local_1c = (int4)uVar4; local_18 = (int1)(uVar4 >> 0x20); if (*(char *)((long)plVar1 + 0x67e) == '\x02') { local_a0 = 0; } else { if (*(long *)(lVar2 + 0x700) == -1) { local_b8 = 0xffffffffff; } else { local_b8 = *(ulong *)(lVar2 + 0x700) / (ulong)*(uint *)(lVar2 + 0x7bc); } local_a0 = local_b8; } local_17 = (int4)local_a0; local_13 = (int1)(local_a0 >> 0x20); local_12 = *(int1 *)(param_1[1] + 0xa5); local_68 = local_1e; local_60 = 0xe; local_3c = (int)param_1[4] - 7; local_58 = param_1[2] + 7; local_50 = (ulong)local_3c; *(int *)((long)param_1 + 0x24) = (int)param_1[4]; local_29 = param_2; local_28 = param_1; local_11 = param_2; cVar3 = translog_write_record (local_38,0xd,plVar1[1],plVar1,(int)param_1[4] + 7,4,local_88,local_1e,0); local_1f = cVar3 != '\0'; if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_1f); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
36,764
ggml_gallocr_allocate_node
monkey531[P]llama/ggml/src/ggml-alloc.c
static void ggml_gallocr_allocate_node(ggml_gallocr_t galloc, struct ggml_tensor * node, int buffer_id) { GGML_ASSERT(buffer_id >= 0); struct hash_node * hn = ggml_gallocr_hash_get(galloc, node); if (!ggml_gallocr_is_allocated(galloc, node) && !ggml_is_view(node)) { hn->allocated = true; assert(hn->offset == 0); // try to reuse a parent's buffer (inplace) if (ggml_op_can_inplace(node->op)) { for (int i = 0; i < GGML_MAX_SRC; i++) { struct ggml_tensor * parent = node->src[i]; if (parent == NULL) { continue; } // if the node's data is external, then we cannot re-use it if (!ggml_gallocr_is_own(galloc, parent)) { AT_PRINTF("not reusing parent %s for %s as %p is external\n", parent->name, node->name, parent->data); continue; } // outputs cannot be reused if (parent->flags & GGML_TENSOR_FLAG_OUTPUT || (parent->view_src != NULL && parent->view_src->flags & GGML_TENSOR_FLAG_OUTPUT)) { AT_PRINTF("not reusing parent %s for %s as it is an output\n", parent->name, node->name); continue; } if (!ggml_are_same_layout(node, parent)) { AT_PRINTF("not reusing parent %s for %s as layouts are different\n", parent->name, node->name); continue; } struct hash_node * p_hn = ggml_gallocr_hash_get(galloc, parent); if (p_hn->n_children == 1 && p_hn->n_views == 0) { if (ggml_is_view(parent)) { struct ggml_tensor * view_src = parent->view_src; struct hash_node * view_src_hn = ggml_gallocr_hash_get(galloc, view_src); if (view_src_hn->n_views == 1 && view_src_hn->n_children == 0 && view_src->data == parent->data) { AT_PRINTF("reusing view parent %s (%s) for %s\n", parent->name, view_src->name, node->name); assert(view_src_hn->offset == p_hn->offset); hn->buffer_id = p_hn->buffer_id; hn->offset = p_hn->offset; p_hn->allocated = false; // avoid freeing the parent view_src_hn->allocated = false; return; } } else { AT_PRINTF("reusing parent %s for %s\n", parent->name, node->name); hn->buffer_id = p_hn->buffer_id; hn->offset = p_hn->offset; p_hn->allocated = false; // avoid freeing the parent return; } } } } // allocate tensor from the buffer struct ggml_dyn_tallocr * alloc = galloc->buf_tallocs[buffer_id]; ggml_backend_buffer_type_t buft = galloc->bufts[buffer_id]; size_t size = ggml_backend_buft_get_alloc_size(buft, node); size_t offset = ggml_dyn_tallocr_alloc(alloc, size, node); hn->buffer_id = buffer_id; hn->offset = offset; } }
O3
c
ggml_gallocr_allocate_node: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp testl %edx, %edx js 0x24b7a movl %edx, %ebx movq %rsi, %r15 movq %rdi, %r12 callq 0x2421a cmpq $0x0, 0xf8(%r15) jne 0x24b2f movq %rax, %r14 movq %r12, %rdi movq %r15, %rsi callq 0x2421a cmpb $0x0, 0x18(%rax) jne 0x24b2f cmpq $0x0, 0xe8(%r15) jne 0x24b2f movb $0x1, 0x18(%r14) movl 0x50(%r15), %eax cmpq $0x2d, %rax ja 0x24b3e movabsq $0x3f0021a007ec, %rcx # imm = 0x3F0021A007EC btq %rax, %rcx jae 0x24b3e xorl %ebp, %ebp movq 0x98(%r15,%rbp,8), %r13 testq %r13, %r13 je 0x24a0c movq %r12, %rdi movq %r13, %rsi callq 0x2421a cmpb $0x1, 0x18(%rax) jne 0x24a0c testb $0x2, 0x94(%r13) jne 0x24a0c movq 0xe8(%r13), %rax testq %rax, %rax je 0x24979 testb $0x2, 0x94(%rax) jne 0x24a0c movl (%r15), %eax cmpl (%r13), %eax jne 0x24a0c movl $0x6, %eax movq -0x20(%r15,%rax,8), %rcx cmpq -0x20(%r13,%rax,8), %rcx jne 0x24a0c movq (%r15,%rax,8), %rcx cmpq (%r13,%rax,8), %rcx jne 0x24a0c incq %rax cmpq $0xa, %rax jne 0x2498b movq %r12, %rdi movq %r13, %rsi callq 0x2421a cmpl $0x1, (%rax) jne 0x24a0c cmpl $0x0, 0x4(%rax) jne 0x24a0c movq 0xe8(%r13), %rsi testq %rsi, %rsi je 0x24b4c movq %r12, %rdi movq %rsi, 0x8(%rsp) movq %rax, 0x10(%rsp) callq 0x2421a movq 0x10(%rsp), %rdx cmpl $0x1, 0x4(%rax) jne 0x24a0c cmpl $0x0, (%rax) jne 0x24a0c movq 0x8(%rsp), %rcx movq 0xf8(%rcx), %rcx cmpq 0xf8(%r13), %rcx je 0x24b61 incq %rbp cmpq $0xa, %rbp jne 0x2492c movq (%r12), %rax movq 0x10(%r12), %rcx movl %ebx, %edx movq (%rcx,%rdx,8), %r12 movq (%rax,%rdx,8), %rdi movq %r15, %rsi callq 0x16690 movq %rax, %rsi movq (%r12), %rcx xorl %edi, %edi xorl %edx, %edx divq %rcx movq %rcx, %rax subq %rdx, %rax xorl %edx, %edx divq %rcx movq %rdx, %rcx addq %rsi, %rcx movl 0x8(%r12), %edx leal -0x1(%rdx), %eax cmpl $0x2, %edx jl 0x24ab1 movl %eax, %esi leaq 0x18(%r12), %r8 movq $-0x1, %r9 movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %r10d, %r10d xorl %edi, %edi movq (%r8), %r11 cmpq %r11, %rdi cmovbeq %r11, %rdi cmpq %rcx, %r11 setb %bpl cmpq %r9, %r11 seta %r15b orb %bpl, %r15b cmoveq %r11, %r9 cmovel %r10d, %edx incq %r10 addq $0x10, %r8 cmpq %r10, %rsi jne 0x24a78 cmpl $-0x1, %edx je 0x24ab1 movslq %edx, %rsi jmp 0x24acb movslq %eax, %rsi movq %rsi, %rdx shlq $0x4, %rdx movq 0x18(%r12,%rdx), %r8 movl %eax, %edx cmpq %rcx, %r8 jb 0x24b9b movq %rsi, %r9 shlq $0x4, %r9 movq 0x10(%r12,%r9), %rdi leaq (%rdi,%rcx), %r8 movq %r8, 0x10(%r12,%r9) subq %rcx, 0x18(%r12,%r9) jne 0x24b10 movl %eax, 0x8(%r12) cmpl %eax, %edx jge 0x24b10 leaq (%r9,%r12), %rax addq $0x20, %rax incq %rsi movups (%rax), %xmm0 movups %xmm0, -0x10(%rax) movslq 0x8(%r12), %rcx addq $0x10, %rax cmpq %rcx, %rsi jl 0x24af8 movq 0x1010(%r12), %rax cmpq %r8, %rax cmovaq %rax, %r8 movq %r8, 0x1010(%r12) movl %ebx, 0x8(%r14) movq %rdi, 0x10(%r14) addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpl $0x47, %eax je 0x2492a jmp 0x24a19 movl 0x8(%rax), %ecx movl %ecx, 0x8(%r14) movq 0x10(%rax), %rcx movq %rcx, 0x10(%r14) movb $0x0, 0x18(%rax) jmp 0x24b2f movl 0x8(%rdx), %ecx movl %ecx, 0x8(%r14) movq 0x10(%rdx), %rcx movq %rcx, 0x10(%r14) xorl %ecx, %ecx movb %cl, 0x18(%rdx) movb %cl, 0x18(%rax) jmp 0x24b2f leaq 0x283e1(%rip), %rdi # 0x4cf62 leaq 0x25ad5(%rip), %rdx # 0x4a65d leaq 0x286e0(%rip), %rcx # 0x4d26f movl $0x1df, %esi # imm = 0x1DF xorl %eax, %eax callq 0x17c60 cmpq %r8, %rdi cmovaq %rdi, %r8 leaq 0x2860b(%rip), %rsi # 0x4d1b4 leaq 0x28661(%rip), %rdx # 0x4d211 movl $0x4, %edi xorl %eax, %eax callq 0x167f0 leaq 0x2839f(%rip), %rdi # 0x4cf62 leaq 0x283e8(%rip), %rdx # 0x4cfb2 movl $0xb6, %esi xorl %eax, %eax callq 0x17c60
ggml_gallocr_allocate_node: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h test edx, edx js loc_24B7A mov ebx, edx mov r15, rsi mov r12, rdi call ggml_gallocr_hash_get cmp qword ptr [r15+0F8h], 0 jnz loc_24B2F mov r14, rax mov rdi, r12 mov rsi, r15 call ggml_gallocr_hash_get cmp byte ptr [rax+18h], 0 jnz loc_24B2F cmp qword ptr [r15+0E8h], 0 jnz loc_24B2F mov byte ptr [r14+18h], 1 mov eax, [r15+50h] cmp rax, 2Dh ; '-' ja loc_24B3E mov rcx, 3F0021A007ECh bt rcx, rax jnb loc_24B3E loc_2492A: xor ebp, ebp loc_2492C: mov r13, [r15+rbp*8+98h] test r13, r13 jz loc_24A0C mov rdi, r12 mov rsi, r13 call ggml_gallocr_hash_get cmp byte ptr [rax+18h], 1 jnz loc_24A0C test byte ptr [r13+94h], 2 jnz loc_24A0C mov rax, [r13+0E8h] test rax, rax jz short loc_24979 test byte ptr [rax+94h], 2 jnz loc_24A0C loc_24979: mov eax, [r15] cmp eax, [r13+0] jnz loc_24A0C mov eax, 6 loc_2498B: mov rcx, [r15+rax*8-20h] cmp rcx, [r13+rax*8-20h] jnz short loc_24A0C mov rcx, [r15+rax*8] cmp rcx, [r13+rax*8+0] jnz short loc_24A0C inc rax cmp rax, 0Ah jnz short loc_2498B mov rdi, r12 mov rsi, r13 call ggml_gallocr_hash_get cmp dword ptr [rax], 1 jnz short loc_24A0C cmp dword ptr [rax+4], 0 jnz short loc_24A0C mov rsi, [r13+0E8h] test rsi, rsi jz loc_24B4C mov rdi, r12 mov [rsp+48h+var_40], rsi mov [rsp+48h+var_38], rax call ggml_gallocr_hash_get mov rdx, [rsp+48h+var_38] cmp dword ptr [rax+4], 1 jnz short loc_24A0C cmp dword ptr [rax], 0 jnz short loc_24A0C mov rcx, [rsp+48h+var_40] mov rcx, [rcx+0F8h] cmp rcx, [r13+0F8h] jz loc_24B61 loc_24A0C: inc rbp cmp rbp, 0Ah jnz loc_2492C loc_24A19: mov rax, [r12] mov rcx, [r12+10h] mov edx, ebx mov r12, [rcx+rdx*8] mov rdi, [rax+rdx*8] mov rsi, r15 call _ggml_backend_buft_get_alloc_size mov rsi, rax mov rcx, [r12] xor edi, edi xor edx, edx div rcx mov rax, rcx sub rax, rdx xor edx, edx div rcx mov rcx, rdx add rcx, rsi mov edx, [r12+8] lea eax, [rdx-1] cmp edx, 2 jl short loc_24AB1 mov esi, eax lea r8, [r12+18h] mov r9, 0FFFFFFFFFFFFFFFFh mov edx, 0FFFFFFFFh xor r10d, r10d xor edi, edi loc_24A78: mov r11, [r8] cmp rdi, r11 cmovbe rdi, r11 cmp r11, rcx setb bpl cmp r11, r9 setnbe r15b or r15b, bpl cmovz r9, r11 cmovz edx, r10d inc r10 add r8, 10h cmp rsi, r10 jnz short loc_24A78 cmp edx, 0FFFFFFFFh jz short loc_24AB1 movsxd rsi, edx jmp short loc_24ACB loc_24AB1: movsxd rsi, eax mov rdx, rsi shl rdx, 4 mov r8, [r12+rdx+18h] mov edx, eax cmp r8, rcx jb loc_24B9B loc_24ACB: mov r9, rsi shl r9, 4 mov rdi, [r12+r9+10h] lea r8, [rdi+rcx] mov [r12+r9+10h], r8 sub [r12+r9+18h], rcx jnz short loc_24B10 mov [r12+8], eax cmp edx, eax jge short loc_24B10 lea rax, [r9+r12] add rax, 20h ; ' ' loc_24AF8: inc rsi movups xmm0, xmmword ptr [rax] movups xmmword ptr [rax-10h], xmm0 movsxd rcx, dword ptr [r12+8] add rax, 10h cmp rsi, rcx jl short loc_24AF8 loc_24B10: mov rax, [r12+1010h] cmp rax, r8 cmova r8, rax mov [r12+1010h], r8 mov [r14+8], ebx mov [r14+10h], rdi loc_24B2F: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_24B3E: cmp eax, 47h ; 'G' jz loc_2492A jmp loc_24A19 loc_24B4C: mov ecx, [rax+8] mov [r14+8], ecx mov rcx, [rax+10h] mov [r14+10h], rcx mov byte ptr [rax+18h], 0 jmp short loc_24B2F loc_24B61: mov ecx, [rdx+8] mov [r14+8], ecx mov rcx, [rdx+10h] mov [r14+10h], rcx xor ecx, ecx mov [rdx+18h], cl mov [rax+18h], cl jmp short loc_24B2F loc_24B7A: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTallocBufferId+8; "buffer_id >= 0" mov esi, 1DFh xor eax, eax call _ggml_abort loc_24B9B: cmp rdi, r8 cmova r8, rdi lea rsi, aSNotEnoughSpac_1; "%s: not enough space in the buffer to a"... lea rdx, aGgmlDynTallocr; "ggml_dyn_tallocr_alloc" mov edi, 4 xor eax, eax call _ggml_log_internal lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aNotEnoughSpace; "not enough space in the buffer" mov esi, 0B6h xor eax, eax call _ggml_abort
unsigned long long ggml_gallocr_allocate_node( _QWORD *a1, unsigned long long a2, int a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11, long long a12, int a13, int a14) { unsigned long long result; // rax unsigned long long v17; // r14 unsigned long long v18; // rax long long v19; // rcx long long i; // rbp unsigned long long v21; // r13 long long v22; // rax long long v23; // rax unsigned long long v24; // rsi long long v25; // r12 unsigned long long alloc_size; // rax unsigned long long v27; // r9 __m128 v28; // xmm4 __m128 v29; // xmm5 unsigned long long v30; // rdi unsigned long long v31; // rcx int v32; // edx int v33; // eax unsigned long long *v34; // r8 int v35; // edx long long v36; // r10 long long v37; // rsi unsigned long long v38; // r8 long long v39; // r9 long long v40; // rdi unsigned long long v41; // r8 bool v42; // zf _OWORD *v43; // rax int v44; // ecx int v45; // r8d int v46; // r9d long long v47; // [rsp+8h] [rbp-40h] unsigned long long v48; // [rsp+10h] [rbp-38h] if ( a3 < 0 ) ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-alloc.c", 479, (unsigned int)"GGML_ASSERT(%s) failed", (unsigned int)"buffer_id >= 0", a13, a14); result = ggml_gallocr_hash_get(a1, a2); if ( !*(_QWORD *)(a2 + 248) ) { v17 = result; result = ggml_gallocr_hash_get(a1, a2); if ( !*(_BYTE *)(result + 24) && !*(_QWORD *)(a2 + 232) ) { *(_BYTE *)(v17 + 24) = 1; v18 = *(unsigned int *)(a2 + 80); if ( v18 <= 0x2D && (v19 = 0x3F0021A007ECLL, _bittest64(&v19, v18)) || (_DWORD)v18 == 71 ) { for ( i = 0LL; i != 10; ++i ) { v21 = *(_QWORD *)(a2 + 8 * i + 152); if ( v21 ) { if ( *(_BYTE *)(ggml_gallocr_hash_get(a1, *(_QWORD *)(a2 + 8 * i + 152)) + 24) == 1 && (*(_BYTE *)(v21 + 148) & 2) == 0 ) { v22 = *(_QWORD *)(v21 + 232); if ( (!v22 || (*(_BYTE *)(v22 + 148) & 2) == 0) && *(_DWORD *)a2 == *(_DWORD *)v21 ) { v23 = 6LL; while ( *(_QWORD *)(a2 + 8 * v23 - 32) == *(_QWORD *)(v21 + 8 * v23 - 32) && *(_QWORD *)(a2 + 8 * v23) == *(_QWORD *)(v21 + 8 * v23) ) { if ( ++v23 == 10 ) { result = ggml_gallocr_hash_get(a1, v21); if ( *(_DWORD *)result == 1 && !*(_DWORD *)(result + 4) ) { v24 = *(_QWORD *)(v21 + 232); if ( !v24 ) { *(_DWORD *)(v17 + 8) = *(_DWORD *)(result + 8); *(_QWORD *)(v17 + 16) = *(_QWORD *)(result + 16); *(_BYTE *)(result + 24) = 0; return result; } v47 = *(_QWORD *)(v21 + 232); v48 = result; result = ggml_gallocr_hash_get(a1, v24); if ( *(_DWORD *)(result + 4) == 1 && !*(_DWORD *)result && *(_QWORD *)(v47 + 248) == *(_QWORD *)(v21 + 248) ) { *(_DWORD *)(v17 + 8) = *(_DWORD *)(v48 + 8); *(_QWORD *)(v17 + 16) = *(_QWORD *)(v48 + 16); *(_BYTE *)(v48 + 24) = 0; *(_BYTE *)(result + 24) = 0; return result; } } break; } } } } } } } v25 = *(_QWORD *)(a1[2] + 8LL * (unsigned int)a3); alloc_size = ggml_backend_buft_get_alloc_size(*(_QWORD *)(*a1 + 8LL * (unsigned int)a3), a2); v30 = 0LL; v31 = alloc_size + (*(_QWORD *)v25 - alloc_size % *(_QWORD *)v25) % *(_QWORD *)v25; v32 = *(_DWORD *)(v25 + 8); v33 = v32 - 1; if ( v32 < 2 ) goto LABEL_34; v34 = (unsigned long long *)(v25 + 24); v27 = -1LL; v35 = -1; v36 = 0LL; v30 = 0LL; do { if ( v30 <= *v34 ) v30 = *v34; if ( *v34 >= v31 && *v34 <= v27 ) { v27 = *v34; v35 = v36; } ++v36; v34 += 2; } while ( v33 != v36 ); if ( v35 == -1 ) { LABEL_34: v37 = v33; v38 = *(_QWORD *)(v25 + 16LL * v33 + 24); v35 = v33; if ( v38 < v31 ) { if ( v30 > v38 ) v38 = v30; ggml_log_internal( 4u, (long long)"%s: not enough space in the buffer to allocate %zu bytes, largest block available %zu bytes\n", (long long)"ggml_dyn_tallocr_alloc", v31, v38, v27, a4, a5, a6, a7, v28, v29, a10, a11); ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-alloc.c", 182, (unsigned int)"not enough space in the buffer", v44, v45, v46); } } else { v37 = v35; } v39 = 16 * v37; v40 = *(_QWORD *)(v25 + 16 * v37 + 16); v41 = v40 + v31; *(_QWORD *)(v25 + v39 + 16) = v40 + v31; v42 = *(_QWORD *)(v25 + 16 * v37 + 24) == v31; *(_QWORD *)(v25 + v39 + 24) -= v31; if ( v42 ) { *(_DWORD *)(v25 + 8) = v33; if ( v35 < v33 ) { v43 = (_OWORD *)(v39 + v25 + 32); do { ++v37; *(v43 - 1) = *v43; ++v43; } while ( v37 < *(int *)(v25 + 8) ); } } result = *(_QWORD *)(v25 + 4112); if ( result > v41 ) v41 = *(_QWORD *)(v25 + 4112); *(_QWORD *)(v25 + 4112) = v41; *(_DWORD *)(v17 + 8) = a3; *(_QWORD *)(v17 + 16) = v40; } } return result; }
ggml_gallocr_allocate_node: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 TEST EDX,EDX JS 0x00124b7a MOV EBX,EDX MOV R15,RSI MOV R12,RDI CALL 0x0012421a CMP qword ptr [R15 + 0xf8],0x0 JNZ 0x00124b2f MOV R14,RAX MOV RDI,R12 MOV RSI,R15 CALL 0x0012421a CMP byte ptr [RAX + 0x18],0x0 JNZ 0x00124b2f CMP qword ptr [R15 + 0xe8],0x0 JNZ 0x00124b2f MOV byte ptr [R14 + 0x18],0x1 MOV EAX,dword ptr [R15 + 0x50] CMP RAX,0x2d JA 0x00124b3e MOV RCX,0x3f0021a007ec BT RCX,RAX JNC 0x00124b3e LAB_0012492a: XOR EBP,EBP LAB_0012492c: MOV R13,qword ptr [R15 + RBP*0x8 + 0x98] TEST R13,R13 JZ 0x00124a0c MOV RDI,R12 MOV RSI,R13 CALL 0x0012421a CMP byte ptr [RAX + 0x18],0x1 JNZ 0x00124a0c TEST byte ptr [R13 + 0x94],0x2 JNZ 0x00124a0c MOV RAX,qword ptr [R13 + 0xe8] TEST RAX,RAX JZ 0x00124979 TEST byte ptr [RAX + 0x94],0x2 JNZ 0x00124a0c LAB_00124979: MOV EAX,dword ptr [R15] CMP EAX,dword ptr [R13] JNZ 0x00124a0c MOV EAX,0x6 LAB_0012498b: MOV RCX,qword ptr [R15 + RAX*0x8 + -0x20] CMP RCX,qword ptr [R13 + RAX*0x8 + -0x20] JNZ 0x00124a0c MOV RCX,qword ptr [R15 + RAX*0x8] CMP RCX,qword ptr [R13 + RAX*0x8] JNZ 0x00124a0c INC RAX CMP RAX,0xa JNZ 0x0012498b MOV RDI,R12 MOV RSI,R13 CALL 0x0012421a CMP dword ptr [RAX],0x1 JNZ 0x00124a0c CMP dword ptr [RAX + 0x4],0x0 JNZ 0x00124a0c MOV RSI,qword ptr [R13 + 0xe8] TEST RSI,RSI JZ 0x00124b4c MOV RDI,R12 MOV qword ptr [RSP + 0x8],RSI MOV qword ptr [RSP + 0x10],RAX CALL 0x0012421a MOV RDX,qword ptr [RSP + 0x10] CMP dword ptr [RAX + 0x4],0x1 JNZ 0x00124a0c CMP dword ptr [RAX],0x0 JNZ 0x00124a0c MOV RCX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RCX + 0xf8] CMP RCX,qword ptr [R13 + 0xf8] JZ 0x00124b61 LAB_00124a0c: INC RBP CMP RBP,0xa JNZ 0x0012492c LAB_00124a19: MOV RAX,qword ptr [R12] MOV RCX,qword ptr [R12 + 0x10] MOV EDX,EBX MOV R12,qword ptr [RCX + RDX*0x8] MOV RDI,qword ptr [RAX + RDX*0x8] MOV RSI,R15 CALL 0x00116690 MOV RSI,RAX MOV RCX,qword ptr [R12] XOR EDI,EDI XOR EDX,EDX DIV RCX MOV RAX,RCX SUB RAX,RDX XOR EDX,EDX DIV RCX MOV RCX,RDX ADD RCX,RSI MOV EDX,dword ptr [R12 + 0x8] LEA EAX,[RDX + -0x1] CMP EDX,0x2 JL 0x00124ab1 MOV ESI,EAX LEA R8,[R12 + 0x18] MOV R9,-0x1 MOV EDX,0xffffffff XOR R10D,R10D XOR EDI,EDI LAB_00124a78: MOV R11,qword ptr [R8] CMP RDI,R11 CMOVBE RDI,R11 CMP R11,RCX SETC BPL CMP R11,R9 SETA R15B OR R15B,BPL CMOVZ R9,R11 CMOVZ EDX,R10D INC R10 ADD R8,0x10 CMP RSI,R10 JNZ 0x00124a78 CMP EDX,-0x1 JZ 0x00124ab1 MOVSXD RSI,EDX JMP 0x00124acb LAB_00124ab1: MOVSXD RSI,EAX MOV RDX,RSI SHL RDX,0x4 MOV R8,qword ptr [R12 + RDX*0x1 + 0x18] MOV EDX,EAX CMP R8,RCX JC 0x00124b9b LAB_00124acb: MOV R9,RSI SHL R9,0x4 MOV RDI,qword ptr [R12 + R9*0x1 + 0x10] LEA R8,[RDI + RCX*0x1] MOV qword ptr [R12 + R9*0x1 + 0x10],R8 SUB qword ptr [R12 + R9*0x1 + 0x18],RCX JNZ 0x00124b10 MOV dword ptr [R12 + 0x8],EAX CMP EDX,EAX JGE 0x00124b10 LEA RAX,[R9 + R12*0x1] ADD RAX,0x20 LAB_00124af8: INC RSI MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [RAX + -0x10],XMM0 MOVSXD RCX,dword ptr [R12 + 0x8] ADD RAX,0x10 CMP RSI,RCX JL 0x00124af8 LAB_00124b10: MOV RAX,qword ptr [R12 + 0x1010] CMP RAX,R8 CMOVA R8,RAX MOV qword ptr [R12 + 0x1010],R8 MOV dword ptr [R14 + 0x8],EBX MOV qword ptr [R14 + 0x10],RDI LAB_00124b2f: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00124b3e: CMP EAX,0x47 JZ 0x0012492a JMP 0x00124a19 LAB_00124b4c: MOV ECX,dword ptr [RAX + 0x8] MOV dword ptr [R14 + 0x8],ECX MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [R14 + 0x10],RCX MOV byte ptr [RAX + 0x18],0x0 JMP 0x00124b2f LAB_00124b61: MOV ECX,dword ptr [RDX + 0x8] MOV dword ptr [R14 + 0x8],ECX MOV RCX,qword ptr [RDX + 0x10] MOV qword ptr [R14 + 0x10],RCX XOR ECX,ECX MOV byte ptr [RDX + 0x18],CL MOV byte ptr [RAX + 0x18],CL JMP 0x00124b2f LAB_00124b7a: LEA RDI,[0x14cf62] LEA RDX,[0x14a65d] LEA RCX,[0x14d26f] MOV ESI,0x1df XOR EAX,EAX CALL 0x00117c60 LAB_00124b9b: CMP RDI,R8 CMOVA R8,RDI LEA RSI,[0x14d1b4] LEA RDX,[0x14d211] MOV EDI,0x4 XOR EAX,EAX CALL 0x001167f0 LEA RDI,[0x14cf62] LEA RDX,[0x14cfb2] MOV ESI,0xb6 XOR EAX,EAX CALL 0x00117c60
void ggml_gallocr_allocate_node(long *param_1,int *param_2,uint param_3) { uint uVar1; int *piVar2; ulong *puVar3; ulong uVar4; long lVar5; long lVar6; long lVar7; int *piVar8; int *piVar9; ulong uVar10; ulong *puVar11; uint uVar12; ulong uVar13; ulong uVar14; ulong uVar15; ulong uVar16; if ((int)param_3 < 0) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-alloc.c", 0x1df,"GGML_ASSERT(%s) failed","buffer_id >= 0"); } lVar5 = ggml_gallocr_hash_get(); if (*(long *)(param_2 + 0x3e) != 0) { return; } lVar6 = ggml_gallocr_hash_get(param_1,param_2); if (*(char *)(lVar6 + 0x18) != '\0') { return; } if (*(long *)(param_2 + 0x3a) != 0) { return; } *(int1 *)(lVar5 + 0x18) = 1; uVar1 = param_2[0x14]; if ((((ulong)uVar1 < 0x2e) && ((0x3f0021a007ecU >> ((ulong)uVar1 & 0x3f) & 1) != 0)) || (uVar1 == 0x47)) { lVar6 = 0; do { piVar2 = *(int **)(param_2 + lVar6 * 2 + 0x26); if ((((piVar2 != (int *)0x0) && (lVar7 = ggml_gallocr_hash_get(param_1,piVar2), *(char *)(lVar7 + 0x18) == '\x01')) && (((*(byte *)(piVar2 + 0x25) & 2) == 0 && ((*(long *)(piVar2 + 0x3a) == 0 || ((*(byte *)(*(long *)(piVar2 + 0x3a) + 0x94) & 2) == 0)))))) && (*param_2 == *piVar2)) { lVar7 = 6; do { if ((*(long *)(param_2 + lVar7 * 2 + -8) != *(long *)(piVar2 + lVar7 * 2 + -8)) || (*(long *)(param_2 + lVar7 * 2) != *(long *)(piVar2 + lVar7 * 2))) goto LAB_00124a0c; lVar7 = lVar7 + 1; } while (lVar7 != 10); piVar8 = (int *)ggml_gallocr_hash_get(param_1,piVar2); if ((*piVar8 == 1) && (piVar8[1] == 0)) { lVar7 = *(long *)(piVar2 + 0x3a); if (lVar7 == 0) { *(int *)(lVar5 + 8) = piVar8[2]; *(int8 *)(lVar5 + 0x10) = *(int8 *)(piVar8 + 4); *(int1 *)(piVar8 + 6) = 0; return; } piVar9 = (int *)ggml_gallocr_hash_get(param_1); if (((piVar9[1] == 1) && (*piVar9 == 0)) && (*(long *)(lVar7 + 0xf8) == *(long *)(piVar2 + 0x3e))) { *(int *)(lVar5 + 8) = piVar8[2]; *(int8 *)(lVar5 + 0x10) = *(int8 *)(piVar8 + 4); *(int1 *)(piVar8 + 6) = 0; *(int1 *)(piVar9 + 6) = 0; return; } } } LAB_00124a0c: lVar6 = lVar6 + 1; } while (lVar6 != 10); } puVar3 = *(ulong **)(param_1[2] + (ulong)param_3 * 8); uVar10 = ggml_backend_buft_get_alloc_size(*(int8 *)(*param_1 + (ulong)param_3 * 8),param_2); uVar15 = *puVar3; uVar14 = 0; uVar10 = (uVar15 - uVar10 % uVar15) % uVar15 + uVar10; uVar1 = (int)puVar3[1] - 1; if (1 < (int)puVar3[1]) { puVar11 = puVar3 + 3; uVar15 = 0xffffffffffffffff; uVar13 = 0xffffffff; uVar16 = 0; uVar14 = 0; do { uVar4 = *puVar11; if (uVar14 <= uVar4) { uVar14 = uVar4; } if (uVar4 <= uVar15 && uVar10 <= uVar4) { uVar13 = uVar16 & 0xffffffff; uVar15 = uVar4; } uVar12 = (uint)uVar13; uVar16 = uVar16 + 1; puVar11 = puVar11 + 2; } while (uVar1 != uVar16); if (uVar12 != 0xffffffff) { lVar6 = (long)(int)uVar12; goto LAB_00124acb; } } lVar6 = (long)(int)uVar1; uVar15 = puVar3[lVar6 * 2 + 3]; uVar12 = uVar1; if (uVar15 < uVar10) { if (uVar15 < uVar14) { uVar15 = uVar14; } ggml_log_internal(4, "%s: not enough space in the buffer to allocate %zu bytes, largest block available %zu bytes\n" ,"ggml_dyn_tallocr_alloc",uVar10,uVar15); /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-alloc.c", 0xb6,"not enough space in the buffer"); } LAB_00124acb: uVar14 = puVar3[lVar6 * 2 + 2]; uVar15 = uVar14 + uVar10; puVar3[lVar6 * 2 + 2] = uVar15; puVar11 = puVar3 + lVar6 * 2 + 3; *puVar11 = *puVar11 - uVar10; if ((*puVar11 == 0) && (*(uint *)(puVar3 + 1) = uVar1, (int)uVar12 < (int)uVar1)) { puVar11 = puVar3 + lVar6 * 2 + 4; do { lVar6 = lVar6 + 1; puVar11[-2] = *puVar11; puVar11[-1] = puVar11[1]; puVar11 = puVar11 + 2; } while (lVar6 < (int)puVar3[1]); } if (uVar15 < puVar3[0x202]) { uVar15 = puVar3[0x202]; } puVar3[0x202] = uVar15; *(uint *)(lVar5 + 8) = param_3; *(ulong *)(lVar5 + 0x10) = uVar14; return; }
36,765
linenoiseNoTTY()
ericcurtin[P]linenoise/linenoise.cpp
static char * linenoiseNoTTY(void) { char * line = NULL; size_t len = 0, maxlen = 0; while (1) { if (len == maxlen) { if (maxlen == 0) { maxlen = 16; } maxlen *= 2; char * oldval = line; line = (char *) realloc(line, maxlen); if (line == NULL) { if (oldval) { free(oldval); } return NULL; } } int c = fgetc(stdin); if (c == EOF || c == '\n') { if (c == EOF && len == 0) { free(line); return NULL; } else { line[len] = '\0'; return line; } } else { line[len] = c; len++; } } }
O0
cpp
linenoiseNoTTY(): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq $0x0, -0x10(%rbp) movq $0x0, -0x18(%rbp) movq $0x0, -0x20(%rbp) movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x4170 cmpq $0x0, -0x20(%rbp) jne 0x4129 movq $0x10, -0x20(%rbp) movq -0x20(%rbp), %rax shlq %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x23b0 movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) jne 0x416e cmpq $0x0, -0x28(%rbp) je 0x4164 movq -0x28(%rbp), %rdi callq 0x2478 movq $0x0, -0x8(%rbp) jmp 0x41e5 jmp 0x4170 movq 0xbe59(%rip), %rax # 0xffd0 movq (%rax), %rdi callq 0x2360 movl %eax, -0x2c(%rbp) cmpl $-0x1, -0x2c(%rbp) je 0x418e cmpl $0xa, -0x2c(%rbp) jne 0x41c4 cmpl $-0x1, -0x2c(%rbp) jne 0x41ae cmpq $0x0, -0x18(%rbp) jne 0x41ae movq -0x10(%rbp), %rdi callq 0x2478 movq $0x0, -0x8(%rbp) jmp 0x41e5 movq -0x10(%rbp), %rax movq -0x18(%rbp), %rcx movb $0x0, (%rax,%rcx) movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x41e5 movl -0x2c(%rbp), %eax movb %al, %dl movq -0x10(%rbp), %rax movq -0x18(%rbp), %rcx movb %dl, (%rax,%rcx) movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x4110 movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nop
_ZL14linenoiseNoTTYv: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], 0 mov [rbp+var_18], 0 mov [rbp+var_20], 0 loc_4110: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnz short loc_4170 cmp [rbp+var_20], 0 jnz short loc_4129 mov [rbp+var_20], 10h loc_4129: mov rax, [rbp+var_20] shl rax, 1 mov [rbp+var_20], rax mov rax, [rbp+var_10] mov [rbp+var_28], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] call _realloc mov [rbp+var_10], rax cmp [rbp+var_10], 0 jnz short loc_416E cmp [rbp+var_28], 0 jz short loc_4164 mov rdi, [rbp+var_28] call free loc_4164: mov [rbp+var_8], 0 jmp short loc_41E5 loc_416E: jmp short $+2 loc_4170: mov rax, cs:stdin_ptr mov rdi, [rax] call _fgetc mov [rbp+var_2C], eax cmp [rbp+var_2C], 0FFFFFFFFh jz short loc_418E cmp [rbp+var_2C], 0Ah jnz short loc_41C4 loc_418E: cmp [rbp+var_2C], 0FFFFFFFFh jnz short loc_41AE cmp [rbp+var_18], 0 jnz short loc_41AE mov rdi, [rbp+var_10] call free mov [rbp+var_8], 0 jmp short loc_41E5 loc_41AE: mov rax, [rbp+var_10] mov rcx, [rbp+var_18] mov byte ptr [rax+rcx], 0 mov rax, [rbp+var_10] mov [rbp+var_8], rax jmp short loc_41E5 loc_41C4: mov eax, [rbp+var_2C] mov dl, al mov rax, [rbp+var_10] mov rcx, [rbp+var_18] mov [rax+rcx], dl mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp loc_4110 loc_41E5: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long linenoiseNoTTY(void) { int v1; // [rsp+4h] [rbp-2Ch] long long v2; // [rsp+8h] [rbp-28h] long long v3; // [rsp+10h] [rbp-20h] long long v4; // [rsp+18h] [rbp-18h] long long v5; // [rsp+20h] [rbp-10h] v5 = 0LL; v4 = 0LL; v3 = 0LL; while ( 1 ) { if ( v4 == v3 ) { if ( !v3 ) v3 = 16LL; v3 *= 2LL; v2 = v5; v5 = realloc(v5, v3); if ( !v5 ) break; } v1 = fgetc(stdin); if ( v1 == -1 || v1 == 10 ) { if ( v1 != -1 || v4 ) { *(_BYTE *)(v5 + v4) = 0; return v5; } else { free(v5); return 0LL; } } *(_BYTE *)(v5 + v4++) = v1; } if ( v2 ) free(v2); return 0LL; }
linenoiseNoTTY: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],0x0 MOV qword ptr [RBP + -0x18],0x0 MOV qword ptr [RBP + -0x20],0x0 LAB_00104110: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00104170 CMP qword ptr [RBP + -0x20],0x0 JNZ 0x00104129 MOV qword ptr [RBP + -0x20],0x10 LAB_00104129: MOV RAX,qword ptr [RBP + -0x20] SHL RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001023b0 MOV qword ptr [RBP + -0x10],RAX CMP qword ptr [RBP + -0x10],0x0 JNZ 0x0010416e CMP qword ptr [RBP + -0x28],0x0 JZ 0x00104164 MOV RDI,qword ptr [RBP + -0x28] CALL 0x00102478 LAB_00104164: MOV qword ptr [RBP + -0x8],0x0 JMP 0x001041e5 LAB_0010416e: JMP 0x00104170 LAB_00104170: MOV RAX,qword ptr [0x0010ffd0] MOV RDI,qword ptr [RAX] CALL 0x00102360 MOV dword ptr [RBP + -0x2c],EAX CMP dword ptr [RBP + -0x2c],-0x1 JZ 0x0010418e CMP dword ptr [RBP + -0x2c],0xa JNZ 0x001041c4 LAB_0010418e: CMP dword ptr [RBP + -0x2c],-0x1 JNZ 0x001041ae CMP qword ptr [RBP + -0x18],0x0 JNZ 0x001041ae MOV RDI,qword ptr [RBP + -0x10] CALL 0x00102478 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001041e5 LAB_001041ae: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + RCX*0x1],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX JMP 0x001041e5 LAB_001041c4: MOV EAX,dword ptr [RBP + -0x2c] MOV DL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + RCX*0x1],DL MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x00104110 LAB_001041e5: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* linenoiseNoTTY() */ void * linenoiseNoTTY(void) { int iVar1; void *pvVar2; size_t local_28; size_t local_20; void *local_18; void *local_10; local_18 = (void *)0x0; local_20 = 0; local_28 = 0; do { pvVar2 = local_18; if (local_20 == local_28) { if (local_28 == 0) { local_28 = 0x10; } local_28 = local_28 << 1; pvVar2 = realloc(local_18,local_28); if (pvVar2 == (void *)0x0) { if (local_18 != (void *)0x0) { free(local_18); } return (void *)0x0; } } local_18 = pvVar2; iVar1 = fgetc(*(FILE **)PTR_stdin_0010ffd0); if ((iVar1 == -1) || (iVar1 == 10)) { if ((iVar1 == -1) && (local_20 == 0)) { free(local_18); local_10 = (void *)0x0; } else { *(int1 *)((long)local_18 + local_20) = 0; local_10 = local_18; } return local_10; } *(char *)((long)local_18 + local_20) = (char)iVar1; local_20 = local_20 + 1; } while( true ); }
36,766
my_suspend_hook
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static void my_suspend_hook(my_bool suspend, void *data) { struct my_hook_data *hook_data= (struct my_hook_data *)data; if (suspend) { hook_data->orig_pvio= hook_data->orig_mysql->net.pvio; hook_data->orig_mysql->net.pvio= hook_data->new_mysql->net.pvio; } else hook_data->orig_mysql->net.pvio= hook_data->orig_pvio; }
O3
c
my_suspend_hook: pushq %rbp movq %rsp, %rbp testb %dil, %dil je 0x1a7c7 movq (%rsi), %rax movq 0x8(%rsi), %rcx movq (%rax), %rdx movq %rdx, 0x10(%rsi) movq (%rcx), %rcx jmp 0x1a7ce movq (%rsi), %rax movq 0x10(%rsi), %rcx movq %rcx, (%rax) popq %rbp retq
my_suspend_hook: push rbp mov rbp, rsp test dil, dil jz short loc_1A7C7 mov rax, [rsi] mov rcx, [rsi+8] mov rdx, [rax] mov [rsi+10h], rdx mov rcx, [rcx] jmp short loc_1A7CE loc_1A7C7: mov rax, [rsi] mov rcx, [rsi+10h] loc_1A7CE: mov [rax], rcx pop rbp retn
_QWORD * my_suspend_hook(char a1, long long a2) { _QWORD *result; // rax long long *v3; // rcx long long v4; // rcx result = *(_QWORD **)a2; if ( a1 ) { v3 = *(long long **)(a2 + 8); *(_QWORD *)(a2 + 16) = **(_QWORD **)a2; v4 = *v3; } else { v4 = *(_QWORD *)(a2 + 16); } *result = v4; return result; }
my_suspend_hook: PUSH RBP MOV RBP,RSP TEST DIL,DIL JZ 0x0011a7c7 MOV RAX,qword ptr [RSI] MOV RCX,qword ptr [RSI + 0x8] MOV RDX,qword ptr [RAX] MOV qword ptr [RSI + 0x10],RDX MOV RCX,qword ptr [RCX] JMP 0x0011a7ce LAB_0011a7c7: MOV RAX,qword ptr [RSI] MOV RCX,qword ptr [RSI + 0x10] LAB_0011a7ce: MOV qword ptr [RAX],RCX POP RBP RET
void my_suspend_hook(char param_1,int8 *param_2) { int8 *puVar1; int8 uVar2; if (param_1 == '\0') { puVar1 = (int8 *)*param_2; uVar2 = param_2[2]; } else { puVar1 = (int8 *)*param_2; param_2[2] = *puVar1; uVar2 = *(int8 *)param_2[1]; } *puVar1 = uVar2; return; }
36,767
minja::Value& 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::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>, minja::Value, std::less<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>>, std::allocator<std::pair<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, minja::Value>>>::operator[]<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json.hpp
T & operator[](KeyType && key) { return emplace(std::forward<KeyType>(key), T{}).first->second; }
O3
cpp
minja::Value& 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::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>, minja::Value, std::less<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>>, std::allocator<std::pair<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, minja::Value>>>::operator[]<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %rbx subq $0x50, %rsp movq %rsi, %rbx movq %rdi, %r15 leaq 0x40(%rsp), %r14 movq $0x0, 0x8(%r14) xorps %xmm0, %xmm0 movaps %xmm0, -0x40(%r14) movaps %xmm0, -0x30(%r14) movaps %xmm0, -0x20(%r14) movaps %xmm0, -0x10(%r14) movb $0x0, (%r14) movq %r14, %rdi movl $0x1, %esi callq 0x58644 movq %r14, %rdi movl $0x1, %esi callq 0x58644 movq %rsp, %rdx movq %r15, %rdi movq %rbx, %rsi callq 0x8cf16 movq %rax, %rbx movq %r14, %rdi xorl %esi, %esi callq 0x58644 movq %r14, %rdi callq 0x5db32 movq 0x38(%rsp), %rdi testq %rdi, %rdi je 0x8c5fb callq 0x6d556 movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x8c60a callq 0x6d556 movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x8c619 callq 0x6d556 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x8c64f movq 0xa1956(%rip), %rax # 0x12df80 cmpb $0x0, (%rax) je 0x8c63a movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x8c644 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x8c64f movq (%rdi), %rax callq *0x18(%rax) addq $0x10, %rbx movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq %rsp, %rdi callq 0x86012 movq %rbx, %rdi callq 0x1bf70 nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_: push r15 push r14 push rbx sub rsp, 50h mov rbx, rsi mov r15, rdi lea r14, [rsp+68h+var_28] mov qword ptr [r14+8], 0 xorps xmm0, xmm0 movaps xmmword ptr [r14-40h], xmm0 movaps xmmword ptr [r14-30h], xmm0 movaps xmmword ptr [r14-20h], xmm0 movaps xmmword ptr [r14-10h], xmm0 mov byte ptr [r14], 0 mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdx, rsp mov rdi, r15 mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_ mov rbx, rax mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rsp+68h+var_30] test rdi, rdi jz short loc_8C5FB call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_8C5FB: mov rdi, [rsp+68h+var_40] test rdi, rdi jz short loc_8C60A call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_8C60A: mov rdi, [rsp+68h+var_50] test rdi, rdi jz short loc_8C619 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_8C619: mov rdi, [rsp+68h+var_60] test rdi, rdi jz short loc_8C64F mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_8C63A mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_8C644 loc_8C63A: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_8C644: cmp eax, 1 jnz short loc_8C64F mov rax, [rdi] call qword ptr [rax+18h] loc_8C64F: add rbx, 10h mov rax, rbx add rsp, 50h pop rbx pop r14 pop r15 retn mov rbx, rax mov rdi, rsp; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() mov rdi, rbx call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_( long long a1, long long a2) { long long v2; // rbx long long v3; // rdi signed __int32 v4; // eax __int128 v6; // [rsp+0h] [rbp-68h] BYREF __int128 v7; // [rsp+10h] [rbp-58h] __int128 v8; // [rsp+20h] [rbp-48h] __int128 v9; // [rsp+30h] [rbp-38h] char v10[8]; // [rsp+40h] [rbp-28h] BYREF long long v11; // [rsp+48h] [rbp-20h] v11 = 0LL; v6 = 0LL; v7 = 0LL; v8 = 0LL; v9 = 0LL; v10[0] = 0; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(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>::assert_invariant(v10); v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_( a1, a2, &v6); 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(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>::data::~data(v10); if ( *((_QWORD *)&v9 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v9 + 1)); if ( *((_QWORD *)&v8 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v8 + 1)); if ( *((_QWORD *)&v7 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v7 + 1)); v3 = *((_QWORD *)&v6 + 1); if ( *((_QWORD *)&v6 + 1) ) { if ( _libc_single_threaded ) { v4 = *(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL); *(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL) = v4 - 1; } else { v4 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v6 + 1) + 12LL), 0xFFFFFFFF); } if ( v4 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v3 + 24LL))(v3, 0LL); } return v2 + 16; }
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x50 MOV RBX,RSI MOV R15,RDI LEA R14,[RSP + 0x40] MOV qword ptr [R14 + 0x8],0x0 XORPS XMM0,XMM0 MOVAPS xmmword ptr [R14 + -0x40],XMM0 MOVAPS xmmword ptr [R14 + -0x30],XMM0 MOVAPS xmmword ptr [R14 + -0x20],XMM0 MOVAPS xmmword ptr [R14 + -0x10],XMM0 MOV byte ptr [R14],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x00158644 MOV RDI,R14 MOV ESI,0x1 CALL 0x00158644 LAB_0018c5c9: MOV RDX,RSP MOV RDI,R15 MOV RSI,RBX CALL 0x0018cf16 LAB_0018c5d7: MOV RBX,RAX MOV RDI,R14 XOR ESI,ESI CALL 0x00158644 MOV RDI,R14 CALL 0x0015db32 MOV RDI,qword ptr [RSP + 0x38] TEST RDI,RDI JZ 0x0018c5fb CALL 0x0016d556 LAB_0018c5fb: MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI JZ 0x0018c60a CALL 0x0016d556 LAB_0018c60a: MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x0018c619 CALL 0x0016d556 LAB_0018c619: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x0018c64f MOV RAX,qword ptr [0x0022df80] CMP byte ptr [RAX],0x0 JZ 0x0018c63a MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0018c644 LAB_0018c63a: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0018c644: CMP EAX,0x1 JNZ 0x0018c64f MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0018c64f: ADD RBX,0x10 MOV RAX,RBX ADD RSP,0x50 POP RBX POP R14 POP R15 RET
long _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_ (int8 param_1,int8 param_2) { int *piVar1; int iVar2; long lVar3; bool bVar4; int8 local_68; long *plStack_60; int8 local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_50; int8 local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_40; int8 local_38; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_30; data local_28 [8]; int8 local_20; local_20 = 0; local_68 = 0; plStack_60 = (long *)0x0; local_58 = 0; p_Stack_50 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; local_48 = 0; p_Stack_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; local_38 = 0; p_Stack_30 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; local_28[0] = (data)0x0; bVar4 = SUB81(local_28,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(bVar4); 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(bVar4); /* try { // try from 0018c5c9 to 0018c5d6 has its CatchHandler @ 0018c660 */ lVar3 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_ (param_1,param_2,&local_68); 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(bVar4); 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_28); if (p_Stack_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_30); } if (p_Stack_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_40); } if (p_Stack_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_50); } if (plStack_60 != (long *)0x0) { if (*PTR___libc_single_threaded_0022df80 == '\0') { LOCK(); piVar1 = (int *)((long)plStack_60 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)plStack_60 + 0xc); *(int *)((long)plStack_60 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*plStack_60 + 0x18))(); } } return lVar3 + 0x10; }
36,768
minja::Parser::parseMathMulDiv()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Expression> parseMathMulDiv() { auto left = parseMathUnaryPlusMinus(); if (!left) throw std::runtime_error("Expected left side of 'math mul/div' expression"); static std::regex mul_div_tok(R"(\*\*?|//?|%(?!\}))"); std::string op_str; while (!(op_str = consumeToken(mul_div_tok)).empty()) { auto right = parseMathUnaryPlusMinus(); if (!right) throw std::runtime_error("Expected right side of 'math mul/div' expression"); auto op = op_str == "*" ? BinaryOpExpr::Op::Mul : op_str == "**" ? BinaryOpExpr::Op::MulMul : op_str == "/" ? BinaryOpExpr::Op::Div : op_str == "//" ? BinaryOpExpr::Op::DivDiv : BinaryOpExpr::Op::Mod; left = std::make_shared<BinaryOpExpr>(get_location(), std::move(left), std::move(right), op); } if (!consumeToken("|").empty()) { auto expr = parseMathMulDiv(); if (auto filter = dynamic_cast<FilterExpr*>(expr.get())) { filter->prepend(std::move(left)); return expr; } else { std::vector<std::shared_ptr<Expression>> parts; parts.emplace_back(std::move(left)); parts.emplace_back(std::move(expr)); return std::make_shared<FilterExpr>(get_location(), std::move(parts)); } } return left; }
O2
cpp
minja::Parser::parseMathMulDiv(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %rsi, %r14 movq %rdi, 0x28(%rsp) leaq 0x10(%rsp), %rbx movq %rbx, %rdi callq 0x7058e cmpq $0x0, (%rbx) je 0x70454 leaq 0x9cfd7(%rip), %rax # 0x10d160 movb (%rax), %al testb %al, %al je 0x70484 leaq 0x98(%rsp), %rax movq %rax, -0x10(%rax) andq $0x0, -0x8(%rax) movb $0x0, (%rax) leaq 0x50(%rsp), %rbx leaq 0x88(%rsp), %r12 leaq 0x30(%rsp), %r13 movq %rsp, %rbp movq %rbp, %r15 movq %rbx, %rdi movq %r14, %rsi leaq 0x9cf74(%rip), %rdx # 0x10d140 pushq $0x1 popq %rcx callq 0x6c334 movq %r12, %rdi movq %rbx, %rsi callq 0x24ae0 movq 0x8(%rax), %rbp movq %rbx, %rdi callq 0x25298 testq %rbp, %rbp je 0x702bd movq %r13, %rdi movq %r14, %rsi callq 0x7058e cmpq $0x0, 0x30(%rsp) je 0x70422 movq %r15, %rbp movq %r12, %rdi leaq 0x566a4(%rip), %rsi # 0xc68bc callq 0x4550a pushq $0x3 popq %rcx testb %al, %al jne 0x70265 movq %r12, %rdi leaq 0x4fd5b(%rip), %rsi # 0xbff89 callq 0x4550a pushq $0x4 popq %rcx testb %al, %al jne 0x70265 movq %r12, %rdi leaq 0x54a78(%rip), %rsi # 0xc4cbc callq 0x4550a pushq $0x5 popq %rcx testb %al, %al jne 0x70265 movq %r12, %rdi leaq 0x54a5e(%rip), %rsi # 0xc4cb8 callq 0x4550a movzbl %al, %ecx xorl $0x7, %ecx movl %ecx, 0x70(%rsp) movq %rbx, %rdi movq %r14, %rsi callq 0x6bf10 movq %rbp, %rdi movq %rbx, %rsi leaq 0x10(%rsp), %r15 movq %r15, %rdx movq %r13, %rcx leaq 0x70(%rsp), %r8 callq 0x6fcd6 movq %r15, %rdi movq %rbp, %rsi callq 0x7cd18 leaq 0x8(%rsp), %rdi callq 0x5b5b4 leaq 0x58(%rsp), %rdi callq 0x5b5b4 leaq 0x38(%rsp), %rdi callq 0x5b5b4 jmp 0x701bc leaq 0x4d292(%rip), %rsi # 0xbd556 leaq 0x30(%rsp), %rdi movq %rsp, %rdx callq 0x30aea leaq 0x50(%rsp), %rdi leaq 0x30(%rsp), %rdx pushq $0x1 popq %rcx movq %r14, %rsi callq 0x6c940 leaq 0x50(%rsp), %rdi movq 0x8(%rdi), %rbx callq 0x25298 leaq 0x30(%rsp), %rdi callq 0x25298 testq %rbx, %rbx je 0x703dd movq %rsp, %rdi movq %r14, %rsi callq 0x70152 movq 0x28(%rsp), %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0x7035b leaq 0x9a069(%rip), %rsi # 0x10a390 leaq 0x9a0b2(%rip), %rdx # 0x10a3e0 xorl %ecx, %ecx callq 0x24a10 testq %rax, %rax je 0x7035b leaq 0x10(%rsp), %rsi movq %rax, %rdi callq 0x70756 movaps (%rsp), %xmm0 andq $0x0, 0x8(%rsp) movups %xmm0, (%rbx) andq $0x0, (%rsp) jmp 0x703d1 xorps %xmm0, %xmm0 leaq 0x50(%rsp), %rdi movaps %xmm0, (%rdi) andq $0x0, 0x10(%rdi) leaq 0x10(%rsp), %rsi callq 0x70766 leaq 0x50(%rsp), %rdi movq %rsp, %rsi callq 0x70766 leaq 0x30(%rsp), %rdi movq %r14, %rsi callq 0x6bf10 leaq 0x70(%rsp), %rdi leaq 0x30(%rsp), %rsi leaq 0x50(%rsp), %rdx callq 0x707aa leaq 0x78(%rsp), %rdi movaps -0x8(%rdi), %xmm0 andq $0x0, (%rdi) movups %xmm0, (%rbx) andq $0x0, -0x8(%rdi) callq 0x5b5b4 leaq 0x38(%rsp), %rdi callq 0x5b5b4 leaq 0x50(%rsp), %rdi callq 0x707cc leaq 0x8(%rsp), %rdi callq 0x5b5b4 jmp 0x703f6 movaps 0x10(%rsp), %xmm0 andq $0x0, 0x18(%rsp) movq 0x28(%rsp), %rbx movups %xmm0, (%rbx) andq $0x0, 0x10(%rsp) leaq 0x88(%rsp), %rdi callq 0x25298 leaq 0x18(%rsp), %rdi callq 0x5b5b4 movq %rbx, %rax addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x24470 movq %rax, %r14 leaq 0x4fc3e(%rip), %rsi # 0xc0072 movq %rax, %rdi callq 0x24330 movq 0x9bbad(%rip), %rsi # 0x10bff0 movq 0x9bb0e(%rip), %rdx # 0x10bf58 movq %r14, %rdi callq 0x24f80 jmp 0x70484 pushq $0x10 popq %rdi callq 0x24470 movq %rax, %r14 leaq 0x4fbca(%rip), %rsi # 0xc0030 movq %rax, %rdi callq 0x24330 movq 0x9bb7b(%rip), %rsi # 0x10bff0 movq 0x9badc(%rip), %rdx # 0x10bf58 movq %r14, %rdi callq 0x24f80 leaq 0x9ccd5(%rip), %rdi # 0x10d160 callq 0x25090 testl %eax, %eax je 0x70193 leaq 0x9cca1(%rip), %rdi # 0x10d140 leaq 0x4fbba(%rip), %rsi # 0xc0060 pushq $0x10 popq %rdx callq 0x52106 leaq -0x1e189(%rip), %rdi # 0x5232c leaq 0x9cc84(%rip), %rsi # 0x10d140 leaq 0x9c495(%rip), %rdx # 0x10c958 callq 0x247e0 leaq 0x9cc91(%rip), %rdi # 0x10d160 callq 0x245f0 jmp 0x70193 movq %rax, %rbx leaq 0x9cc7d(%rip), %rdi # 0x10d160 callq 0x245e0 jmp 0x7057b movq %rax, %rbx jmp 0x70524 movq %rax, %rbx leaq 0x38(%rsp), %rdi callq 0x5b5b4 jmp 0x7051a jmp 0x70517 movq %rax, %rbx jmp 0x7057b movq %rax, %rbx movq %r14, %rdi callq 0x246a0 jmp 0x7057b jmp 0x7056b movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0x707cc leaq 0x8(%rsp), %rdi jmp 0x70562 movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x25298 jmp 0x7056e jmp 0x7056b jmp 0x7054b movq %rax, %rbx movq %r14, %rdi callq 0x246a0 jmp 0x7055d movq %rax, %rbx jmp 0x7055d movq %rax, %rbx leaq 0x58(%rsp), %rdi callq 0x5b5b4 leaq 0x38(%rsp), %rdi callq 0x5b5b4 jmp 0x7056e jmp 0x7056b movq %rax, %rbx leaq 0x88(%rsp), %rdi callq 0x25298 leaq 0x18(%rsp), %rdi callq 0x5b5b4 movq %rbx, %rdi callq 0x25010 nop
_ZN5minja6Parser15parseMathMulDivEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov r14, rsi mov [rsp+0D8h+var_B0], rdi lea rbx, [rsp+0D8h+var_C8] mov rdi, rbx; this call _ZN5minja6Parser23parseMathUnaryPlusMinusEv; minja::Parser::parseMathUnaryPlusMinus(void) cmp qword ptr [rbx], 0 jz loc_70454 lea rax, _ZGVZN5minja6Parser15parseMathMulDivEvE11mul_div_tokB5cxx11; `guard variable for'minja::Parser::parseMathMulDiv(void)::mul_div_tok mov al, [rax] test al, al jz loc_70484 loc_70193: lea rax, [rsp+0D8h+var_40] mov [rax-10h], rax and qword ptr [rax-8], 0 mov byte ptr [rax], 0 lea rbx, [rsp+0D8h+var_88] lea r12, [rsp+0D8h+var_50] lea r13, [rsp+0D8h+var_A8] mov rbp, rsp loc_701BC: mov r15, rbp mov rdi, rbx mov rsi, r14 lea rdx, _ZZN5minja6Parser15parseMathMulDivEvE11mul_div_tokB5cxx11; minja::Parser::parseMathMulDiv(void)::mul_div_tok push 1 pop rcx call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) mov rdi, r12 mov rsi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rbp, [rax+8] mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test rbp, rbp jz loc_702BD mov rdi, r13; this mov rsi, r14 call _ZN5minja6Parser23parseMathUnaryPlusMinusEv; minja::Parser::parseMathUnaryPlusMinus(void) cmp [rsp+0D8h+var_A8], 0 jz loc_70422 mov rbp, r15 mov rdi, r12 lea rsi, asc_C68BB+1; "*" call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) push 3 pop rcx test al, al jnz short loc_70265 mov rdi, r12 lea rsi, asc_BFF89; "**" call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) push 4 pop rcx test al, al jnz short loc_70265 mov rdi, r12 lea rsi, asc_C4CBB+1; "/" call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) push 5 pop rcx test al, al jnz short loc_70265 mov rdi, r12 lea rsi, aHttps+6; "//" call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) movzx ecx, al xor ecx, 7 loc_70265: mov [rsp+0D8h+var_68], ecx mov rdi, rbx; this mov rsi, r14 call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void) mov rdi, rbp mov rsi, rbx lea r15, [rsp+0D8h+var_C8] mov rdx, r15 mov rcx, r13 lea r8, [rsp+0D8h+var_68] call _ZSt11make_sharedIN5minja12BinaryOpExprEJNS0_8LocationESt10shared_ptrINS0_10ExpressionEES5_RNS1_2OpEEES3_IT_EDpOT0_; std::make_shared<minja::BinaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op &>(minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op &) mov rdi, r15 mov rsi, rbp call _ZNSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEaSINS0_12BinaryOpExprEEENSt9enable_ifIXsr20__sp_compatible_withIPT_PS1_EE5valueERS4_E4typeEOS_IS8_LS3_2EE lea rdi, [rsp+0D8h+lpsrc+8] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+0D8h+var_80] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+0D8h+var_A0] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp loc_701BC loc_702BD: lea rsi, asc_BD549+0Dh; "|" lea rdi, [rsp+0D8h+var_A8] mov rdx, rsp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0D8h+var_88] lea rdx, [rsp+0D8h+var_A8] push 1 pop rcx mov rsi, r14 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) lea rdi, [rsp+0D8h+var_88]; void * mov rbx, [rdi+8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0D8h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test rbx, rbx jz loc_703DD mov rdi, rsp; this mov rsi, r14 call _ZN5minja6Parser15parseMathMulDivEv; minja::Parser::parseMathMulDiv(void) mov rbx, [rsp+0D8h+var_B0] mov rdi, [rsp+0D8h+lpsrc]; lpsrc test rdi, rdi jz short loc_7035B lea rsi, _ZTIN5minja10ExpressionE; lpstype lea rdx, _ZTIN5minja10FilterExprE; lpdtype xor ecx, ecx; s2d call ___dynamic_cast test rax, rax jz short loc_7035B lea rsi, [rsp+0D8h+var_C8] mov rdi, rax call _ZN5minja10FilterExpr7prependEOSt10shared_ptrINS_10ExpressionEE; minja::FilterExpr::prepend(std::shared_ptr<minja::Expression> &&) movaps xmm0, xmmword ptr [rsp+0D8h+lpsrc] and [rsp+0D8h+lpsrc+8], 0 movups xmmword ptr [rbx], xmm0 and [rsp+0D8h+lpsrc], 0 jmp short loc_703D1 loc_7035B: xorps xmm0, xmm0 lea rdi, [rsp+0D8h+var_88] movaps xmmword ptr [rdi], xmm0 and qword ptr [rdi+10h], 0 lea rsi, [rsp+0D8h+var_C8] call _ZNSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_; std::vector<std::shared_ptr<minja::Expression>>::emplace_back<std::shared_ptr<minja::Expression>>(std::shared_ptr<minja::Expression> &&) lea rdi, [rsp+0D8h+var_88] mov rsi, rsp call _ZNSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_; std::vector<std::shared_ptr<minja::Expression>>::emplace_back<std::shared_ptr<minja::Expression>>(std::shared_ptr<minja::Expression> &&) lea rdi, [rsp+0D8h+var_A8]; this mov rsi, r14 call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void) lea rdi, [rsp+0D8h+var_68] lea rsi, [rsp+0D8h+var_A8] lea rdx, [rsp+0D8h+var_88] call _ZSt11make_sharedIN5minja10FilterExprEJNS0_8LocationESt6vectorISt10shared_ptrINS0_10ExpressionEESaIS6_EEEES4_IT_EDpOT0_; std::make_shared<minja::FilterExpr,minja::Location,std::vector<std::shared_ptr<minja::Expression>>>(minja::Location,std::vector<std::shared_ptr<minja::Expression>> &&) lea rdi, [rsp+0D8h+var_60] movaps xmm0, xmmword ptr [rdi-8] and qword ptr [rdi], 0 movups xmmword ptr [rbx], xmm0 and qword ptr [rdi-8], 0 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+0D8h+var_A0] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+0D8h+var_88] call _ZNSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EED2Ev; std::vector<std::shared_ptr<minja::Expression>>::~vector() loc_703D1: lea rdi, [rsp+0D8h+lpsrc+8] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_703F6 loc_703DD: movaps xmm0, [rsp+0D8h+var_C8] and qword ptr [rsp+0D8h+var_C8+8], 0 mov rbx, [rsp+0D8h+var_B0] movups xmmword ptr [rbx], xmm0 and qword ptr [rsp+0D8h+var_C8], 0 loc_703F6: lea rdi, [rsp+0D8h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0D8h+var_C8+8] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rax, rbx add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_70422: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedRightS_5; "Expected right side of 'math mul/div' e"... 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 jmp short loc_70484 loc_70454: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedLeftSi_5; "Expected left side of 'math mul/div' ex"... 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_70484: lea rdi, _ZGVZN5minja6Parser15parseMathMulDivEvE11mul_div_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_70193 lea rdi, _ZZN5minja6Parser15parseMathMulDivEvE11mul_div_tokB5cxx11; minja::Parser::parseMathMulDiv(void)::mul_div_tok lea rsi, asc_C0060; "\\*\\*?|//?|%(?!\\})" push 10h pop rdx call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser15parseMathMulDivEvE11mul_div_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser15parseMathMulDivEvE11mul_div_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_70193 mov rbx, rax lea rdi, _ZGVZN5minja6Parser15parseMathMulDivEvE11mul_div_tokB5cxx11; __guard * call ___cxa_guard_abort jmp loc_7057B mov rbx, rax jmp short loc_70524 mov rbx, rax lea rdi, [rsp+arg_30] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_7051A jmp short loc_70517 mov rbx, rax jmp short loc_7057B mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_7057B jmp short loc_7056B loc_70517: mov rbx, rax loc_7051A: lea rdi, [rsp+arg_48] call _ZNSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EED2Ev; std::vector<std::shared_ptr<minja::Expression>>::~vector() loc_70524: lea rdi, [rsp+arg_0] jmp short loc_70562 mov rbx, rax lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_7056E jmp short loc_7056B jmp short loc_7054B mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_7055D loc_7054B: mov rbx, rax jmp short loc_7055D mov rbx, rax lea rdi, [rsp+arg_50] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() loc_7055D: lea rdi, [rsp+arg_30] loc_70562: call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_7056E jmp short $+2 loc_7056B: mov rbx, rax loc_7056E: lea rdi, [rsp+arg_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_7057B: lea rdi, [rsp+arg_10] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::parseMathMulDiv(minja::Parser *this, _QWORD *a2) { void **v2; // rbp long long v3; // r15 long long v4; // rbp bool v5; // al int v6; // ecx bool v7; // al bool v8; // al long long v9; // rbx minja::Parser *v10; // rbx void *v11; // rax __int128 v12; // xmm0 __int128 v13; // xmm0 __int128 v14; // xmm0 std::runtime_error *v16; // r14 std::runtime_error *exception; // r14 void *lpsrc[2]; // [rsp+0h] [rbp-D8h] BYREF __int128 v19; // [rsp+10h] [rbp-C8h] BYREF minja::Parser *v20; // [rsp+28h] [rbp-B0h] long long v21; // [rsp+30h] [rbp-A8h] BYREF _QWORD v22[3]; // [rsp+38h] [rbp-A0h] BYREF __int128 v23; // [rsp+50h] [rbp-88h] BYREF long long v24; // [rsp+60h] [rbp-78h] __int128 v25; // [rsp+70h] [rbp-68h] BYREF _QWORD v26[2]; // [rsp+88h] [rbp-50h] BYREF char v27; // [rsp+98h] [rbp-40h] BYREF v20 = this; minja::Parser::parseMathUnaryPlusMinus((minja::Parser *)&v19); if ( !(_QWORD)v19 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected left side of 'math mul/div' expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( !(_BYTE)`guard variable for'minja::Parser::parseMathMulDiv(void)::mul_div_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseMathMulDiv(void)::mul_div_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseMathMulDiv(void)::mul_div_tok[abi:cxx11], (long long)"\\*\\*?|//?|%(?!\\})", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseMathMulDiv(void)::mul_div_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseMathMulDiv(void)::mul_div_tok[abi:cxx11]); } v26[0] = &v27; v26[1] = 0LL; v27 = 0; v2 = lpsrc; while ( 1 ) { v3 = (long long)v2; minja::Parser::consumeToken( &v23, (long long)a2, (long long)&minja::Parser::parseMathMulDiv(void)::mul_div_tok[abi:cxx11], 1u); v4 = *(_QWORD *)(std::string::operator=(v26, &v23) + 8); std::string::~string(&v23); if ( !v4 ) break; minja::Parser::parseMathUnaryPlusMinus((minja::Parser *)&v21); if ( !v21 ) { v16 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v16, "Expected right side of 'math mul/div' expression"); __cxa_throw( v16, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v2 = (void **)v3; v5 = std::operator==<char>((long long)v26); v6 = 3; if ( !v5 ) { v7 = std::operator==<char>((long long)v26); v6 = 4; if ( !v7 ) { v8 = std::operator==<char>((long long)v26); v6 = 5; if ( !v8 ) v6 = std::operator==<char>((long long)v26) ^ 7; } } LODWORD(v25) = v6; minja::Parser::get_location((minja::Parser *)&v23, a2); std::make_shared<minja::BinaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op &>( v3, (long long)&v23, (long long)&v19, (long long)&v21, (long long)&v25); std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator=<minja::BinaryOpExpr>(&v19, v3); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&lpsrc[1]); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v23 + 1); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v22); } std::string::basic_string<std::allocator<char>>(&v21, (long long)"|"); minja::Parser::consumeToken(&v23, (long long)a2, &v21, 1u); v9 = *((_QWORD *)&v23 + 1); std::string::~string(&v23); std::string::~string(&v21); if ( v9 ) { minja::Parser::parseMathMulDiv((minja::Parser *)lpsrc); v10 = v20; if ( lpsrc[0] && (v11 = __dynamic_cast( lpsrc[0], (const struct __class_type_info *)&`typeinfo for'minja::Expression, (const struct __class_type_info *)&`typeinfo for'minja::FilterExpr, 0LL)) != 0LL ) { minja::FilterExpr::prepend(v11, &v19); v12 = *(_OWORD *)lpsrc; lpsrc[1] = 0LL; *(_OWORD *)v10 = v12; lpsrc[0] = 0LL; } else { v23 = 0LL; v24 = 0LL; std::vector<std::shared_ptr<minja::Expression>>::emplace_back<std::shared_ptr<minja::Expression>>(&v23, &v19); std::vector<std::shared_ptr<minja::Expression>>::emplace_back<std::shared_ptr<minja::Expression>>(&v23, lpsrc); minja::Parser::get_location((minja::Parser *)&v21, a2); std::make_shared<minja::FilterExpr,minja::Location,std::vector<std::shared_ptr<minja::Expression>>>( &v25, &v21, &v23); v13 = v25; *((_QWORD *)&v25 + 1) = 0LL; *(_OWORD *)v10 = v13; *(_QWORD *)&v25 = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v25 + 1); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v22); std::vector<std::shared_ptr<minja::Expression>>::~vector(&v23); } std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&lpsrc[1]); } else { v14 = v19; *((_QWORD *)&v19 + 1) = 0LL; v10 = v20; *(_OWORD *)v20 = v14; *(_QWORD *)&v19 = 0LL; } std::string::~string(v26); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v19 + 1); return v10; }
parseMathMulDiv: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV R14,RSI MOV qword ptr [RSP + 0x28],RDI LEA RBX,[RSP + 0x10] MOV RDI,RBX CALL 0x0017058e CMP qword ptr [RBX],0x0 JZ 0x00170454 LEA RAX,[0x20d160] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x00170484 LAB_00170193: LEA RAX,[RSP + 0x98] MOV qword ptr [RAX + -0x10],RAX AND qword ptr [RAX + -0x8],0x0 MOV byte ptr [RAX],0x0 LEA RBX,[RSP + 0x50] LEA R12,[RSP + 0x88] LEA R13,[RSP + 0x30] MOV RBP,RSP LAB_001701bc: MOV R15,RBP MOV RDI,RBX MOV RSI,R14 LEA RDX,[0x20d140] PUSH 0x1 POP RCX CALL 0x0016c334 MOV RDI,R12 MOV RSI,RBX CALL 0x00124ae0 MOV RBP,qword ptr [RAX + 0x8] MOV RDI,RBX CALL 0x00125298 TEST RBP,RBP JZ 0x001702bd LAB_001701f4: MOV RDI,R13 MOV RSI,R14 CALL 0x0017058e CMP qword ptr [RSP + 0x30],0x0 JZ 0x00170422 MOV RBP,R15 MOV RDI,R12 LEA RSI,[0x1c68bc] CALL 0x0014550a PUSH 0x3 POP RCX TEST AL,AL JNZ 0x00170265 MOV RDI,R12 LEA RSI,[0x1bff89] CALL 0x0014550a PUSH 0x4 POP RCX TEST AL,AL JNZ 0x00170265 MOV RDI,R12 LEA RSI,[0x1c4cbc] CALL 0x0014550a PUSH 0x5 POP RCX TEST AL,AL JNZ 0x00170265 MOV RDI,R12 LEA RSI,[0x1c4cb8] CALL 0x0014550a MOVZX ECX,AL XOR ECX,0x7 LAB_00170265: MOV dword ptr [RSP + 0x70],ECX LAB_00170269: MOV RDI,RBX MOV RSI,R14 CALL 0x0016bf10 LAB_00170274: MOV RDI,RBP MOV RSI,RBX LEA R15,[RSP + 0x10] MOV RDX,R15 MOV RCX,R13 LEA R8,[RSP + 0x70] CALL 0x0016fcd6 MOV RDI,R15 MOV RSI,RBP CALL 0x0017cd18 LEA RDI,[RSP + 0x8] CALL 0x0015b5b4 LEA RDI,[RSP + 0x58] CALL 0x0015b5b4 LEA RDI,[RSP + 0x38] CALL 0x0015b5b4 JMP 0x001701bc LAB_001702bd: LEA RSI,[0x1bd556] LEA RDI,[RSP + 0x30] MOV RDX,RSP CALL 0x00130aea LAB_001702d1: LEA RDI,[RSP + 0x50] LEA RDX,[RSP + 0x30] PUSH 0x1 POP RCX MOV RSI,R14 CALL 0x0016c940 LEA RDI,[RSP + 0x50] MOV RBX,qword ptr [RDI + 0x8] CALL 0x00125298 LEA RDI,[RSP + 0x30] CALL 0x00125298 TEST RBX,RBX JZ 0x001703dd LAB_00170307: MOV RDI,RSP MOV RSI,R14 CALL 0x00170152 MOV RBX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RSP] TEST RDI,RDI JZ 0x0017035b LEA RSI,[0x20a390] LEA RDX,[0x20a3e0] XOR ECX,ECX CALL 0x00124a10 TEST RAX,RAX JZ 0x0017035b LAB_0017033a: LEA RSI,[RSP + 0x10] MOV RDI,RAX CALL 0x00170756 MOVAPS XMM0,xmmword ptr [RSP] AND qword ptr [RSP + 0x8],0x0 MOVUPS xmmword ptr [RBX],XMM0 AND qword ptr [RSP],0x0 JMP 0x001703d1 LAB_0017035b: XORPS XMM0,XMM0 LEA RDI,[RSP + 0x50] MOVAPS xmmword ptr [RDI],XMM0 AND qword ptr [RDI + 0x10],0x0 LAB_0017036b: LEA RSI,[RSP + 0x10] CALL 0x00170766 LEA RDI,[RSP + 0x50] MOV RSI,RSP CALL 0x00170766 LAB_00170382: LEA RDI,[RSP + 0x30] MOV RSI,R14 CALL 0x0016bf10 LAB_0017038f: LEA RDI,[RSP + 0x70] LEA RSI,[RSP + 0x30] LEA RDX,[RSP + 0x50] CALL 0x001707aa LAB_001703a3: LEA RDI,[RSP + 0x78] MOVAPS XMM0,xmmword ptr [RDI + -0x8] AND qword ptr [RDI],0x0 MOVUPS xmmword ptr [RBX],XMM0 AND qword ptr [RDI + -0x8],0x0 CALL 0x0015b5b4 LEA RDI,[RSP + 0x38] CALL 0x0015b5b4 LEA RDI,[RSP + 0x50] CALL 0x001707cc LAB_001703d1: LEA RDI,[RSP + 0x8] CALL 0x0015b5b4 JMP 0x001703f6 LAB_001703dd: MOVAPS XMM0,xmmword ptr [RSP + 0x10] AND qword ptr [RSP + 0x18],0x0 MOV RBX,qword ptr [RSP + 0x28] MOVUPS xmmword ptr [RBX],XMM0 AND qword ptr [RSP + 0x10],0x0 LAB_001703f6: LEA RDI,[RSP + 0x88] CALL 0x00125298 LEA RDI,[RSP + 0x18] CALL 0x0015b5b4 MOV RAX,RBX ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00170422: PUSH 0x10 POP RDI CALL 0x00124470 MOV R14,RAX LAB_0017042d: LEA RSI,[0x1c0072] MOV RDI,RAX CALL 0x00124330 LAB_0017043c: MOV RSI,qword ptr [0x0020bff0] MOV RDX,qword ptr [0x0020bf58] MOV RDI,R14 CALL 0x00124f80 LAB_00170454: PUSH 0x10 POP RDI CALL 0x00124470 MOV R14,RAX LAB_0017045f: LEA RSI,[0x1c0030] MOV RDI,RAX CALL 0x00124330 LAB_0017046e: MOV RSI,qword ptr [0x0020bff0] MOV RDX,qword ptr [0x0020bf58] MOV RDI,R14 CALL 0x00124f80 LAB_00170484: LEA RDI,[0x20d160] CALL 0x00125090 TEST EAX,EAX JZ 0x00170193 LAB_00170498: LEA RDI,[0x20d140] LEA RSI,[0x1c0060] PUSH 0x10 POP RDX CALL 0x00152106 LAB_001704ae: LEA RDI,[0x15232c] LEA RSI,[0x20d140] LEA RDX,[0x20c958] CALL 0x001247e0 LEA RDI,[0x20d160] CALL 0x001245f0 JMP 0x00170193
/* minja::Parser::parseMathMulDiv() */ long * minja::Parser::parseMathMulDiv(void) { long lVar1; bool bVar2; int iVar3; long lVar4; FilterExpr *this; runtime_error *prVar5; uint uVar6; long *in_RDI; long local_d8; long lStack_d0; long local_c8; long alStack_c0 [2]; long *local_b0; long local_a8; __shared_count<(__gnu_cxx::_Lock_policy)2> local_a0 [24]; int8 local_88; long alStack_80 [3]; long local_68; long alStack_60 [2]; int1 *local_50; int8 local_48; int1 local_40 [16]; local_b0 = in_RDI; parseMathUnaryPlusMinus(); if (local_c8 == 0) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0017045f to 0017046d has its CatchHandler @ 00170508 */ std::runtime_error::runtime_error(prVar5,"Expected left side of \'math mul/div\' expression"); /* try { // try from 0017046e to 00170483 has its CatchHandler @ 00170503 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_0020bff0,PTR__runtime_error_0020bf58); } if (parseMathMulDiv()::mul_div_tok_abi_cxx11_ == '\0') { iVar3 = __cxa_guard_acquire(&parseMathMulDiv()::mul_div_tok_abi_cxx11_); if (iVar3 != 0) { /* try { // try from 00170498 to 001704ad has its CatchHandler @ 001704d9 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseMathMulDiv()::mul_div_tok_abi_cxx11_,"\\*\\*?|//?|%(?!\\})",0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseMathMulDiv()::mul_div_tok_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseMathMulDiv()::mul_div_tok_abi_cxx11_); } } local_50 = local_40; local_48 = 0; local_40[0] = 0; while( true ) { /* try { // try from 001701bc to 001701d3 has its CatchHandler @ 0017056b */ consumeToken((string *)&local_88); lVar4 = std::__cxx11::string::operator=((string *)&local_50,(string *)&local_88); lVar4 = *(long *)(lVar4 + 8); std::__cxx11::string::~string((string *)&local_88); if (lVar4 == 0) break; /* try { // try from 001701f4 to 001701fe has its CatchHandler @ 00170569 */ parseMathUnaryPlusMinus(); if (local_a8 == 0) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0017042d to 0017043b has its CatchHandler @ 0017053e */ std::runtime_error::runtime_error(prVar5,"Expected right side of \'math mul/div\' expression") ; /* try { // try from 0017043c to 00170451 has its CatchHandler @ 0017053c */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_0020bff0,PTR__runtime_error_0020bf58); } bVar2 = std::operator==((string *)&local_50,"*"); uVar6 = 3; if (!bVar2) { bVar2 = std::operator==((string *)&local_50,"**"); uVar6 = 4; if (!bVar2) { bVar2 = std::operator==((string *)&local_50,"/"); uVar6 = 5; if (!bVar2) { bVar2 = std::operator==((string *)&local_50,"//"); uVar6 = bVar2 ^ 7; } } } local_68 = CONCAT44(local_68._4_4_,uVar6); /* try { // try from 00170269 to 00170273 has its CatchHandler @ 0017054b */ get_location(); /* try { // try from 00170274 to 0017028e has its CatchHandler @ 00170550 */ std:: make_shared<minja::BinaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op&> ((Location *)&local_d8,(string *)&local_88, (__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2> *)&local_c8, (Op *)&local_a8); std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator= ((__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2> *)&local_c8, (__shared_ptr *)&local_d8); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&lStack_d0); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)alStack_80); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_a0); } /* try { // try from 001702bd to 001702d0 has its CatchHandler @ 0017053a */ std::__cxx11::string::string<std::allocator<char>>((string *)&local_a8,"|",(allocator *)&local_d8) ; /* try { // try from 001702d1 to 001702e5 has its CatchHandler @ 0017052b */ consumeToken(&local_88); lVar1 = alStack_80[0]; std::__cxx11::string::~string((string *)&local_88); std::__cxx11::string::~string((string *)&local_a8); lVar4 = alStack_c0[0]; if (lVar1 == 0) { alStack_c0[0] = 0; *local_b0 = local_c8; local_b0[1] = lVar4; local_c8 = 0; goto LAB_001703f6; } /* try { // try from 00170307 to 00170311 has its CatchHandler @ 00170515 */ parseMathMulDiv(); if (local_d8 == 0) { LAB_0017035b: local_88 = 0; alStack_80[0] = 0; alStack_80[1] = 0; /* try { // try from 0017036b to 00170381 has its CatchHandler @ 00170517 */ std:: vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>:: emplace_back<std::shared_ptr<minja::Expression>> ((vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>> *)&local_88,(shared_ptr *)&local_c8); std:: vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>:: emplace_back<std::shared_ptr<minja::Expression>> ((vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>> *)&local_88,(shared_ptr *)&local_d8); /* try { // try from 00170382 to 0017038e has its CatchHandler @ 00170501 */ get_location(); /* try { // try from 0017038f to 001703a2 has its CatchHandler @ 001704f2 */ std:: make_shared<minja::FilterExpr,minja::Location,std::vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>> ((Location *)&local_68,(vector *)&local_a8); lVar4 = alStack_60[0]; alStack_60[0] = 0; *local_b0 = local_68; local_b0[1] = lVar4; local_68 = 0; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)alStack_60); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_a0); std:: vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>:: ~vector((vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>> *)&local_88); } else { this = (FilterExpr *)__dynamic_cast(local_d8,&Expression::typeinfo,&FilterExpr::typeinfo,0); if (this == (FilterExpr *)0x0) goto LAB_0017035b; /* try { // try from 0017033a to 00170346 has its CatchHandler @ 001704ed */ FilterExpr::prepend(this,(shared_ptr *)&local_c8); lVar4 = lStack_d0; lStack_d0 = 0; *local_b0 = local_d8; local_b0[1] = lVar4; local_d8 = 0; } std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&lStack_d0); LAB_001703f6: std::__cxx11::string::~string((string *)&local_50); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)alStack_c0); return local_b0; }
36,769
make_quick_table
eloqsql/storage/myisam/mi_packrec.c
static void make_quick_table(uint16 *to_table, uint16 *decode_table, uint *next_free_offset, uint value, uint bits, uint max_bits) { DBUG_ENTER("make_quick_table"); /* When down the table to the requested maximum, copy the rest of the Huffman table. */ if (!bits--) { /* Remaining left Huffman tree segment starts behind quick table. Remaining right Huffman tree segment starts behind left segment. */ to_table[value]= (uint16) *next_free_offset; /* Re-construct the remaining Huffman tree segment at next_free_offset in to_table. */ *next_free_offset= copy_decode_table(to_table, *next_free_offset, decode_table); DBUG_VOID_RETURN; } /* Descent on the left side. Left side bits are clear (0). */ if (!(*decode_table & IS_CHAR)) { /* Not a leaf. Follow the pointer. */ make_quick_table(to_table, decode_table + *decode_table, next_free_offset, value, bits, max_bits); } else { /* A leaf. A Huffman code is complete. Fill the quick_table array for all possible bit strings starting with this Huffman code. */ fill_quick_table(to_table + value, bits, max_bits, (uint) *decode_table); } /* Descent on the right side. Right side bits are set (1). */ decode_table++; value|= (1 << bits); if (!(*decode_table & IS_CHAR)) { /* Not a leaf. Follow the pointer. */ make_quick_table(to_table, decode_table + *decode_table, next_free_offset, value, bits, max_bits); } else { /* A leaf. A Huffman code is complete. Fill the quick_table array for all possible bit strings starting with this Huffman code. */ fill_quick_table(to_table + value, bits, max_bits, (uint) *decode_table); } DBUG_VOID_RETURN; }
O0
c
make_quick_table: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movl %r8d, -0x20(%rbp) movl %r9d, -0x24(%rbp) movl -0x20(%rbp), %eax movl %eax, %ecx addl $-0x1, %ecx movl %ecx, -0x20(%rbp) cmpl $0x0, %eax jne 0xbe313 movq -0x18(%rbp), %rax movl (%rax), %eax movw %ax, %dx movq -0x8(%rbp), %rax movl -0x1c(%rbp), %ecx movw %dx, (%rax,%rcx,2) movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rax movl (%rax), %esi movq -0x10(%rbp), %rdx callq 0xbe400 movl %eax, %ecx movq -0x18(%rbp), %rax movl %ecx, (%rax) jmp 0xbe3ed movq -0x10(%rbp), %rax movzwl (%rax), %eax andl $0x8000, %eax # imm = 0x8000 cmpl $0x0, %eax jne 0xbe351 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x10(%rbp), %rax movzwl (%rax), %eax cltq shlq %rax addq %rax, %rsi movq -0x18(%rbp), %rdx movl -0x1c(%rbp), %ecx movl -0x20(%rbp), %r8d movl -0x24(%rbp), %r9d callq 0xbe2b0 jmp 0xbe370 movq -0x8(%rbp), %rdi movl -0x1c(%rbp), %eax shlq %rax addq %rax, %rdi movl -0x20(%rbp), %esi movl -0x24(%rbp), %edx movq -0x10(%rbp), %rax movzwl (%rax), %ecx callq 0xbe500 movq -0x10(%rbp), %rax addq $0x2, %rax movq %rax, -0x10(%rbp) movl -0x20(%rbp), %ecx movl $0x1, %eax shll %cl, %eax orl -0x1c(%rbp), %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movzwl (%rax), %eax andl $0x8000, %eax # imm = 0x8000 cmpl $0x0, %eax jne 0xbe3ca movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x10(%rbp), %rax movzwl (%rax), %eax cltq shlq %rax addq %rax, %rsi movq -0x18(%rbp), %rdx movl -0x1c(%rbp), %ecx movl -0x20(%rbp), %r8d movl -0x24(%rbp), %r9d callq 0xbe2b0 jmp 0xbe3e9 movq -0x8(%rbp), %rdi movl -0x1c(%rbp), %eax shlq %rax addq %rax, %rdi movl -0x20(%rbp), %esi movl -0x24(%rbp), %edx movq -0x10(%rbp), %rax movzwl (%rax), %ecx callq 0xbe500 jmp 0xbe3eb jmp 0xbe3ed addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
make_quick_table_0: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_20], r8d mov [rbp+var_24], r9d mov eax, [rbp+var_20] mov ecx, eax add ecx, 0FFFFFFFFh mov [rbp+var_20], ecx cmp eax, 0 jnz short loc_BE313 mov rax, [rbp+var_18] mov eax, [rax] mov dx, ax mov rax, [rbp+var_8] mov ecx, [rbp+var_1C] mov [rax+rcx*2], dx mov rdi, [rbp+var_8] mov rax, [rbp+var_18] mov esi, [rax] mov rdx, [rbp+var_10] call copy_decode_table_0 mov ecx, eax mov rax, [rbp+var_18] mov [rax], ecx jmp loc_BE3ED loc_BE313: mov rax, [rbp+var_10] movzx eax, word ptr [rax] and eax, 8000h cmp eax, 0 jnz short loc_BE351 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rax, [rbp+var_10] movzx eax, word ptr [rax] cdqe shl rax, 1 add rsi, rax mov rdx, [rbp+var_18] mov ecx, [rbp+var_1C] mov r8d, [rbp+var_20] mov r9d, [rbp+var_24] call make_quick_table_0 jmp short loc_BE370 loc_BE351: mov rdi, [rbp+var_8] mov eax, [rbp+var_1C] shl rax, 1 add rdi, rax mov esi, [rbp+var_20] mov edx, [rbp+var_24] mov rax, [rbp+var_10] movzx ecx, word ptr [rax] call fill_quick_table_0 loc_BE370: mov rax, [rbp+var_10] add rax, 2 mov [rbp+var_10], rax mov ecx, [rbp+var_20] mov eax, 1 shl eax, cl or eax, [rbp+var_1C] mov [rbp+var_1C], eax mov rax, [rbp+var_10] movzx eax, word ptr [rax] and eax, 8000h cmp eax, 0 jnz short loc_BE3CA mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rax, [rbp+var_10] movzx eax, word ptr [rax] cdqe shl rax, 1 add rsi, rax mov rdx, [rbp+var_18] mov ecx, [rbp+var_1C] mov r8d, [rbp+var_20] mov r9d, [rbp+var_24] call make_quick_table_0 jmp short loc_BE3E9 loc_BE3CA: mov rdi, [rbp+var_8] mov eax, [rbp+var_1C] shl rax, 1 add rdi, rax mov esi, [rbp+var_20] mov edx, [rbp+var_24] mov rax, [rbp+var_10] movzx ecx, word ptr [rax] call fill_quick_table_0 loc_BE3E9: jmp short $+2 loc_BE3EB: jmp short $+2 loc_BE3ED: add rsp, 30h pop rbp retn
long long make_quick_table_0( long long a1, unsigned __int16 *a2, _DWORD *a3, unsigned int a4, int a5, unsigned int a6) { int v6; // ecx long long result; // rax unsigned int v9; // [rsp+10h] [rbp-20h] unsigned int v11; // [rsp+14h] [rbp-1Ch] unsigned __int16 *v13; // [rsp+20h] [rbp-10h] v9 = a5 - 1; if ( a5 ) { if ( (*a2 & 0x8000) != 0 ) fill_quick_table_0(2LL * a4 + a1, v9, a6, *a2); else make_quick_table_0(a1, &a2[*a2], a3, a4, v9, a6); v13 = a2 + 1; v11 = a4 | (1 << v9); if ( (a2[1] & 0x8000) != 0 ) return fill_quick_table_0(2LL * v11 + a1, v9, a6, *v13); else return make_quick_table_0(a1, &v13[*v13], a3, v11, v9, a6); } else { *(_WORD *)(a1 + 2LL * a4) = *a3; v6 = copy_decode_table_0(a1, (unsigned int)*a3, a2); result = (long long)a3; *a3 = v6; } return result; }
make_quick_table: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV dword ptr [RBP + -0x20],R8D MOV dword ptr [RBP + -0x24],R9D MOV EAX,dword ptr [RBP + -0x20] MOV ECX,EAX ADD ECX,-0x1 MOV dword ptr [RBP + -0x20],ECX CMP EAX,0x0 JNZ 0x001be313 MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] MOV DX,AX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x1c] MOV word ptr [RAX + RCX*0x2],DX MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] CALL 0x001be400 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX],ECX JMP 0x001be3ed LAB_001be313: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX] AND EAX,0x8000 CMP EAX,0x0 JNZ 0x001be351 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX] CDQE SHL RAX,0x1 ADD RSI,RAX MOV RDX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x1c] MOV R8D,dword ptr [RBP + -0x20] MOV R9D,dword ptr [RBP + -0x24] CALL 0x001be2b0 JMP 0x001be370 LAB_001be351: MOV RDI,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RBP + -0x1c] SHL RAX,0x1 ADD RDI,RAX MOV ESI,dword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RAX] CALL 0x001be500 LAB_001be370: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 MOV qword ptr [RBP + -0x10],RAX MOV ECX,dword ptr [RBP + -0x20] MOV EAX,0x1 SHL EAX,CL OR EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX] AND EAX,0x8000 CMP EAX,0x0 JNZ 0x001be3ca MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX] CDQE SHL RAX,0x1 ADD RSI,RAX MOV RDX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x1c] MOV R8D,dword ptr [RBP + -0x20] MOV R9D,dword ptr [RBP + -0x24] CALL 0x001be2b0 JMP 0x001be3e9 LAB_001be3ca: MOV RDI,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RBP + -0x1c] SHL RAX,0x1 ADD RDI,RAX MOV ESI,dword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RAX] CALL 0x001be500 LAB_001be3e9: JMP 0x001be3eb LAB_001be3eb: JMP 0x001be3ed LAB_001be3ed: ADD RSP,0x30 POP RBP RET
void make_quick_table(long param_1,ushort *param_2,int4 *param_3,uint param_4,int param_5, int4 param_6) { int4 uVar1; int iVar2; iVar2 = param_5 + -1; if (param_5 == 0) { *(short *)(param_1 + (ulong)param_4 * 2) = (short)*param_3; uVar1 = copy_decode_table(param_1,*param_3,param_2); *param_3 = uVar1; } else { if ((*param_2 & 0x8000) == 0) { make_quick_table(param_1,param_2 + (int)(uint)*param_2,param_3,param_4,iVar2,param_6); } else { fill_quick_table(param_1 + (ulong)param_4 * 2,iVar2,param_6,*param_2); } param_2 = param_2 + 1; param_4 = 1 << ((byte)iVar2 & 0x1f) | param_4; if ((*param_2 & 0x8000) == 0) { make_quick_table(param_1,param_2 + (int)(uint)*param_2,param_3,param_4,iVar2,param_6); } else { fill_quick_table(param_1 + (ulong)param_4 * 2,iVar2,param_6,*param_2); } } return; }
36,770
emittra::Emittra::make_cv(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
angrymouse[P]emittra/src/emittra.cpp
std::shared_ptr<std::condition_variable_any> Emittra::make_cv(const std::vector<std::string>& event_names) { auto cv = std::make_shared<std::condition_variable_any>(); for (const auto& event_name : event_names) { auto event_data = get_or_create_event_data(event_name); std::unique_lock<std::shared_mutex> lock(event_data->mutex); event_data->associated_cvs.push_back(cv); } return cv; }
O0
cpp
emittra::Emittra::make_cv(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&): subq $0xa8, %rsp movq %rdi, 0x10(%rsp) movq %rdi, %rax movq %rax, 0x18(%rsp) movq %rdi, 0xa0(%rsp) movq %rsi, 0x98(%rsp) movq %rdx, 0x90(%rsp) movq 0x98(%rsp), %rax movq %rax, 0x20(%rsp) movb $0x0, 0x8f(%rsp) callq 0xea70 movq 0x90(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x80(%rsp), %rdi callq 0xe9a0 movq %rax, 0x78(%rsp) movq 0x80(%rsp), %rdi callq 0xe9d0 movq %rax, 0x70(%rsp) leaq 0x78(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0xea00 testb $0x1, %al jne 0xbb82 jmp 0xbc7a leaq 0x78(%rsp), %rdi callq 0xea40 movq 0x20(%rsp), %rsi movq %rax, 0x68(%rsp) movq 0x68(%rsp), %rdx leaq 0x58(%rsp), %rdi callq 0xa3d0 jmp 0xbba7 leaq 0x58(%rsp), %rdi callq 0xe160 movq %rax, %rsi addq $0x280, %rsi # imm = 0x280 leaq 0x38(%rsp), %rdi callq 0xe170 jmp 0xbbc7 leaq 0x58(%rsp), %rdi callq 0xe160 movq 0x10(%rsp), %rsi addq $0x2f8, %rax # imm = 0x2F8 movq %rax, (%rsp) leaq 0x28(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0xeb10 movq (%rsp), %rdi movq 0x8(%rsp), %rsi callq 0xeae0 jmp 0xbbff leaq 0x28(%rsp), %rdi callq 0xeb40 leaq 0x38(%rsp), %rdi callq 0xe1e0 leaq 0x58(%rsp), %rdi callq 0x6970 leaq 0x78(%rsp), %rdi callq 0xea50 jmp 0xbb6a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) jmp 0xbca3 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) jmp 0xbc6e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) leaq 0x28(%rsp), %rdi callq 0xeb40 leaq 0x38(%rsp), %rdi callq 0xe1e0 leaq 0x58(%rsp), %rdi callq 0x6970 jmp 0xbca3 movb $0x1, 0x8f(%rsp) testb $0x1, 0x8f(%rsp) jne 0xbc96 movq 0x10(%rsp), %rdi callq 0xeb50 movq 0x18(%rsp), %rax addq $0xa8, %rsp retq movq 0x10(%rsp), %rdi callq 0xeb50 movq 0x50(%rsp), %rdi callq 0x4490 nopw (%rax,%rax)
_ZN7emittra7Emittra7make_cvERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE: sub rsp, 0A8h mov [rsp+0A8h+var_98], rdi mov rax, rdi mov [rsp+0A8h+var_90], rax mov [rsp+0A8h+var_8], rdi mov [rsp+0A8h+var_10], rsi mov [rsp+0A8h+var_18], rdx mov rax, [rsp+0A8h+var_10] mov [rsp+0A8h+var_88], rax mov [rsp+0A8h+var_19], 0 call _ZSt11make_sharedINSt3_V222condition_variable_anyEJEESt10shared_ptrIT_EDpOT0_; std::make_shared<std::_V2::condition_variable_any>() mov rax, [rsp+0A8h+var_18] mov [rsp+0A8h+var_28], rax mov rdi, [rsp+0A8h+var_28] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void) mov [rsp+0A8h+var_30], rax mov rdi, [rsp+0A8h+var_28] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void) mov [rsp+0A8h+var_38], rax loc_BB6A: lea rdi, [rsp+0A8h+var_30] lea rsi, [rsp+0A8h+var_38] call _ZN9__gnu_cxxneIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_; __gnu_cxx::operator!=<std::string const*,std::vector<std::string>>(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>> const&,__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>> const&) test al, 1 jnz short loc_BB82 jmp loc_BC7A loc_BB82: lea rdi, [rsp+0A8h+var_30] call _ZNK9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEdeEv; __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator*(void) mov rsi, [rsp+0A8h+var_88] mov [rsp+0A8h+var_40], rax mov rdx, [rsp+0A8h+var_40] lea rdi, [rsp+0A8h+var_50] call _ZN7emittra7Emittra24get_or_create_event_dataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; emittra::Emittra::get_or_create_event_data(std::string const&) jmp short $+2 loc_BBA7: lea rdi, [rsp+0A8h+var_50] call _ZNKSt19__shared_ptr_accessIN7emittra7Emittra9EventDataELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rsi, rax add rsi, 280h lea rdi, [rsp+0A8h+var_70] call _ZNSt11unique_lockISt12shared_mutexEC2ERS0_; std::unique_lock<std::shared_mutex>::unique_lock(std::shared_mutex&) jmp short $+2 loc_BBC7: lea rdi, [rsp+0A8h+var_50] call _ZNKSt19__shared_ptr_accessIN7emittra7Emittra9EventDataELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rsi, [rsp+0A8h+var_98] add rax, 2F8h mov [rsp+0A8h+var_A8], rax lea rdi, [rsp+0A8h+var_80] mov [rsp+0A8h+var_A0], rdi call _ZNSt8weak_ptrINSt3_V222condition_variable_anyEEC2IS1_vEERKSt10shared_ptrIT_E; std::weak_ptr<std::_V2::condition_variable_any>::weak_ptr<std::_V2::condition_variable_any,void>(std::shared_ptr<std::_V2::condition_variable_any> const&) mov rdi, [rsp+0A8h+var_A8] mov rsi, [rsp+0A8h+var_A0] call _ZNSt6vectorISt8weak_ptrINSt3_V222condition_variable_anyEESaIS3_EE9push_backEOS3_; std::vector<std::weak_ptr<std::_V2::condition_variable_any>>::push_back(std::weak_ptr<std::_V2::condition_variable_any>&&) jmp short $+2 loc_BBFF: lea rdi, [rsp+0A8h+var_80] call _ZNSt8weak_ptrINSt3_V222condition_variable_anyEED2Ev; std::weak_ptr<std::_V2::condition_variable_any>::~weak_ptr() lea rdi, [rsp+0A8h+var_70] call _ZNSt11unique_lockISt12shared_mutexED2Ev; std::unique_lock<std::shared_mutex>::~unique_lock() lea rdi, [rsp+0A8h+var_50] call _ZNSt10shared_ptrIN7emittra7Emittra9EventDataEED2Ev; std::shared_ptr<emittra::Emittra::EventData>::~shared_ptr() lea rdi, [rsp+0A8h+var_30] call _ZN9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator++(void) jmp loc_BB6A mov rcx, rax mov eax, edx mov [rsp+arg_48], rcx mov [rsp+arg_44], eax jmp short loc_BCA3 mov rcx, rax mov eax, edx mov [rsp+arg_48], rcx mov [rsp+arg_44], eax jmp short loc_BC6E mov rcx, rax mov eax, edx mov [rsp+arg_48], rcx mov [rsp+arg_44], eax lea rdi, [rsp+arg_20] call _ZNSt8weak_ptrINSt3_V222condition_variable_anyEED2Ev; std::weak_ptr<std::_V2::condition_variable_any>::~weak_ptr() lea rdi, [rsp+arg_30] call _ZNSt11unique_lockISt12shared_mutexED2Ev; std::unique_lock<std::shared_mutex>::~unique_lock() loc_BC6E: lea rdi, [rsp+arg_50] call _ZNSt10shared_ptrIN7emittra7Emittra9EventDataEED2Ev; std::shared_ptr<emittra::Emittra::EventData>::~shared_ptr() jmp short loc_BCA3 loc_BC7A: mov [rsp+0A8h+var_19], 1 test [rsp+0A8h+var_19], 1 jnz short loc_BC96 mov rdi, [rsp+0A8h+var_98] call _ZNSt10shared_ptrINSt3_V222condition_variable_anyEED2Ev; std::shared_ptr<std::_V2::condition_variable_any>::~shared_ptr() loc_BC96: mov rax, [rsp+0A8h+var_90] add rsp, 0A8h retn loc_BCA3: mov rdi, [rsp+arg_8] call _ZNSt10shared_ptrINSt3_V222condition_variable_anyEED2Ev; std::shared_ptr<std::_V2::condition_variable_any>::~shared_ptr() mov rdi, [rsp+arg_48] call __Unwind_Resume
long long emittra::Emittra::make_cv(long long a1, long long a2, long long a3, int a4, int a5, int a6) { long long v6; // rax long long v8; // [rsp+0h] [rbp-A8h] _BYTE v9[16]; // [rsp+28h] [rbp-80h] BYREF _BYTE v10[32]; // [rsp+38h] [rbp-70h] BYREF _BYTE v11[16]; // [rsp+58h] [rbp-50h] BYREF long long v12; // [rsp+68h] [rbp-40h] long long v13; // [rsp+70h] [rbp-38h] BYREF _QWORD v14[2]; // [rsp+78h] [rbp-30h] BYREF char v15; // [rsp+8Fh] [rbp-19h] long long v16; // [rsp+90h] [rbp-18h] long long v17; // [rsp+98h] [rbp-10h] long long v18; // [rsp+A0h] [rbp-8h] v18 = a1; v17 = a2; v16 = a3; v15 = 0; std::make_shared<std::_V2::condition_variable_any>(a1, a2, a3, a4, a5, a6); v14[1] = v16; v14[0] = std::vector<std::string>::begin(v16); v13 = std::vector<std::string>::end(v16); while ( (__gnu_cxx::operator!=<std::string const*,std::vector<std::string>>(v14, &v13) & 1) != 0 ) { v12 = __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator*(v14); emittra::Emittra::get_or_create_event_data((long long)v11, a2, v12); v6 = std::__shared_ptr_access<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v11); std::unique_lock<std::shared_mutex>::unique_lock(v10, v6 + 640); v8 = std::__shared_ptr_access<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v11) + 760; std::weak_ptr<std::_V2::condition_variable_any>::weak_ptr<std::_V2::condition_variable_any,void>(v9, a1); std::vector<std::weak_ptr<std::_V2::condition_variable_any>>::push_back(v8, v9); std::weak_ptr<std::_V2::condition_variable_any>::~weak_ptr(v9); std::unique_lock<std::shared_mutex>::~unique_lock(v10); std::shared_ptr<emittra::Emittra::EventData>::~shared_ptr((long long)v11); __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator++(v14); } return a1; }
make_cv: SUB RSP,0xa8 MOV qword ptr [RSP + 0x10],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0xa0],RDI MOV qword ptr [RSP + 0x98],RSI MOV qword ptr [RSP + 0x90],RDX MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x20],RAX MOV byte ptr [RSP + 0x8f],0x0 CALL 0x0010ea70 MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x80],RAX MOV RDI,qword ptr [RSP + 0x80] CALL 0x0010e9a0 MOV qword ptr [RSP + 0x78],RAX MOV RDI,qword ptr [RSP + 0x80] CALL 0x0010e9d0 MOV qword ptr [RSP + 0x70],RAX LAB_0010bb6a: LEA RDI,[RSP + 0x78] LEA RSI,[RSP + 0x70] CALL 0x0010ea00 TEST AL,0x1 JNZ 0x0010bb82 JMP 0x0010bc7a LAB_0010bb82: LEA RDI,[RSP + 0x78] CALL 0x0010ea40 MOV RSI,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x68],RAX MOV RDX,qword ptr [RSP + 0x68] LAB_0010bb9b: LEA RDI,[RSP + 0x58] CALL 0x0010a3d0 JMP 0x0010bba7 LAB_0010bba7: LEA RDI,[RSP + 0x58] CALL 0x0010e160 MOV RSI,RAX ADD RSI,0x280 LAB_0010bbbb: LEA RDI,[RSP + 0x38] CALL 0x0010e170 JMP 0x0010bbc7 LAB_0010bbc7: LEA RDI,[RSP + 0x58] CALL 0x0010e160 MOV RSI,qword ptr [RSP + 0x10] ADD RAX,0x2f8 MOV qword ptr [RSP],RAX LEA RDI,[RSP + 0x28] MOV qword ptr [RSP + 0x8],RDI CALL 0x0010eb10 MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x8] LAB_0010bbf8: CALL 0x0010eae0 LAB_0010bbfd: JMP 0x0010bbff LAB_0010bbff: LEA RDI,[RSP + 0x28] CALL 0x0010eb40 LEA RDI,[RSP + 0x38] CALL 0x0010e1e0 LEA RDI,[RSP + 0x58] CALL 0x00106970 LEA RDI,[RSP + 0x78] CALL 0x0010ea50 JMP 0x0010bb6a LAB_0010bc7a: MOV byte ptr [RSP + 0x8f],0x1 TEST byte ptr [RSP + 0x8f],0x1 JNZ 0x0010bc96 MOV RDI,qword ptr [RSP + 0x10] CALL 0x0010eb50 LAB_0010bc96: MOV RAX,qword ptr [RSP + 0x18] ADD RSP,0xa8 RET
/* WARNING: Removing unreachable block (ram,0x0010bc8c) */ /* emittra::Emittra::make_cv(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&) */ vector * emittra::Emittra::make_cv(vector *param_1) { bool bVar1; long lVar2; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *in_RDX; weak_ptr<std::_V2::condition_variable_any> local_80 [16]; unique_lock<std::shared_mutex> local_70 [32]; string local_50 [16]; int8 local_40; int8 local_38; int8 local_30; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_28; int1 local_19; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_18; vector *local_8; local_19 = 0; local_18 = in_RDX; local_8 = param_1; std::make_shared<std::_V2::condition_variable_any>(); local_28 = local_18; local_30 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin(local_18) ; local_38 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end(local_28); while (bVar1 = __gnu_cxx::operator!= ((__normal_iterator *)&local_30,(__normal_iterator *)&local_38), bVar1) { local_40 = __gnu_cxx:: __normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator*((__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_30); /* try { // try from 0010bb9b to 0010bba4 has its CatchHandler @ 0010bc2c */ get_or_create_event_data(local_50); lVar2 = std:: __shared_ptr_access<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->((__shared_ptr_access<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2,false,false> *)local_50); /* try { // try from 0010bbbb to 0010bbc4 has its CatchHandler @ 0010bc3c */ std::unique_lock<std::shared_mutex>::unique_lock(local_70,(shared_mutex *)(lVar2 + 0x280)); lVar2 = std:: __shared_ptr_access<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->((__shared_ptr_access<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2,false,false> *)local_50); std::weak_ptr<std::_V2::condition_variable_any>::weak_ptr<std::_V2::condition_variable_any,void> (local_80,(shared_ptr *)param_1); /* try { // try from 0010bbf8 to 0010bbfc has its CatchHandler @ 0010bc4c */ std:: vector<std::weak_ptr<std::_V2::condition_variable_any>,std::allocator<std::weak_ptr<std::_V2::condition_variable_any>>> ::push_back((vector<std::weak_ptr<std::_V2::condition_variable_any>,std::allocator<std::weak_ptr<std::_V2::condition_variable_any>>> *)(lVar2 + 0x2f8),(weak_ptr *)local_80); std::weak_ptr<std::_V2::condition_variable_any>::~weak_ptr(local_80); std::unique_lock<std::shared_mutex>::~unique_lock(local_70); std::shared_ptr<emittra::Emittra::EventData>::~shared_ptr ((shared_ptr<emittra::Emittra::EventData> *)local_50); __gnu_cxx:: __normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator++((__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_30); } return param_1; }
36,771
emittra::Emittra::make_cv(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
angrymouse[P]emittra/src/emittra.cpp
std::shared_ptr<std::condition_variable_any> Emittra::make_cv(const std::vector<std::string>& event_names) { auto cv = std::make_shared<std::condition_variable_any>(); for (const auto& event_name : event_names) { auto event_data = get_or_create_event_data(event_name); std::unique_lock<std::shared_mutex> lock(event_data->mutex); event_data->associated_cvs.push_back(cv); } return cv; }
O1
cpp
emittra::Emittra::make_cv(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r14 movq $0x0, (%rdi) addq $0x8, %rdi leaq 0x20(%rsp), %rdx movq %rdi, 0x30(%rsp) movq %r14, %rsi callq 0x94c4 movq (%rbx), %r12 movq 0x8(%rbx), %rbx cmpq %rbx, %r12 je 0x5ce2 leaq 0x10(%rsp), %rbp leaq 0x20(%rsp), %rdi movq %r15, %rsi movq %r12, %rdx callq 0x4c50 movq 0x20(%rsp), %r13 leaq 0x280(%r13), %rax movq %rax, 0x10(%rsp) movb $0x0, 0x18(%rsp) movq %rbp, %rdi callq 0x78e6 movb $0x1, 0x18(%rsp) movq (%r14), %rax movq %rax, (%rsp) movq 0x8(%r14), %rax movq %rax, 0x8(%rsp) testq %rax, %rax je 0x5c76 movq 0xc350(%rip), %rcx # 0x11fb8 cmpb $0x0, (%rcx) je 0x5c72 incl 0xc(%rax) jmp 0x5c76 lock incl 0xc(%rax) addq $0x2f8, %r13 # imm = 0x2F8 movq %r13, %rdi movq %rsp, %rsi callq 0x95b2 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x5cbe movq 0xc31f(%rip), %rax # 0x11fb8 cmpb $0x0, (%rax) je 0x5ca9 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x5cb3 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x5cbe movq (%rdi), %rax callq *0x18(%rax) movq %rbp, %rdi callq 0x656c movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x5cd5 callq 0x4352 addq $0x20, %r12 cmpq %rbx, %r12 jne 0x5c19 movq %r14, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx jmp 0x5d29 movq %rax, %rbx jmp 0x5d1a movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x5d10 callq 0x34d4 leaq 0x10(%rsp), %rdi callq 0x656c movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x5d29 callq 0x4352 movq 0x30(%rsp), %rax movq (%rax), %rdi testq %rdi, %rdi je 0x5d3b callq 0x4352 movq %rbx, %rdi callq 0x3450 nop
_ZN7emittra7Emittra7make_cvERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbx, rdx mov r15, rsi mov r14, rdi mov qword ptr [rdi], 0 add rdi, 8 lea rdx, [rsp+68h+var_48] mov [rsp+68h+var_38], rdi mov rsi, r14 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2INSt3_V222condition_variable_anyESaIS5_EJEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<std::_V2::condition_variable_any,std::allocator<std::_V2::condition_variable_any>>(std::_V2::condition_variable_any *&,std::_Sp_alloc_shared_tag<std::allocator<std::_V2::condition_variable_any>>) mov r12, [rbx] mov rbx, [rbx+8] cmp r12, rbx jz loc_5CE2 lea rbp, [rsp+68h+var_58] loc_5C19: lea rdi, [rsp+68h+var_48] mov rsi, r15 mov rdx, r12 call _ZN7emittra7Emittra24get_or_create_event_dataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; emittra::Emittra::get_or_create_event_data(std::string const&) mov r13, [rsp+68h+var_48] lea rax, [r13+280h] mov [rsp+68h+var_58], rax mov [rsp+68h+var_50], 0 mov rdi, rbp call _ZNSt11unique_lockISt12shared_mutexE4lockEv; std::unique_lock<std::shared_mutex>::lock(void) mov [rsp+68h+var_50], 1 mov rax, [r14] mov [rsp+68h+var_68], rax mov rax, [r14+8] mov [rsp+68h+var_60], rax test rax, rax jz short loc_5C76 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_5C72 inc dword ptr [rax+0Ch] jmp short loc_5C76 loc_5C72: lock inc dword ptr [rax+0Ch] loc_5C76: add r13, 2F8h mov rdi, r13 mov rsi, rsp call _ZNSt6vectorISt8weak_ptrINSt3_V222condition_variable_anyEESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_; std::vector<std::weak_ptr<std::_V2::condition_variable_any>>::emplace_back<std::weak_ptr<std::_V2::condition_variable_any>>(std::weak_ptr<std::_V2::condition_variable_any> &&) mov rdi, [rsp+68h+var_60] test rdi, rdi jz short loc_5CBE mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_5CA9 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_5CB3 loc_5CA9: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_5CB3: cmp eax, 1 jnz short loc_5CBE mov rax, [rdi] call qword ptr [rax+18h] loc_5CBE: mov rdi, rbp call _ZNSt11unique_lockISt12shared_mutexED2Ev; std::unique_lock<std::shared_mutex>::~unique_lock() mov rdi, [rsp+68h+var_40] test rdi, rdi jz short loc_5CD5 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5CD5: add r12, 20h ; ' ' cmp r12, rbx jnz loc_5C19 loc_5CE2: mov rax, r14 add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax jmp short loc_5D29 mov rbx, rax jmp short loc_5D1A mov rbx, rax mov rdi, [rsp+arg_0] test rdi, rdi jz short loc_5D10 call _ZN7emittra7Emittra7make_cvERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE_cold_1; emittra::Emittra::make_cv(std::vector<std::string> const&) [clone] loc_5D10: lea rdi, [rsp+arg_8] call _ZNSt11unique_lockISt12shared_mutexED2Ev; std::unique_lock<std::shared_mutex>::~unique_lock() loc_5D1A: mov rdi, [rsp+arg_20] test rdi, rdi jz short loc_5D29 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5D29: mov rax, [rsp+arg_28] mov rdi, [rax] test rdi, rdi jz short loc_5D3B call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5D3B: mov rdi, rbx call __Unwind_Resume
long long * emittra::Emittra::make_cv(long long *a1, std::__shared_mutex_pthread *a2, long long *a3) { long long v5; // r12 long long i; // rbx long long v7; // r13 long long v8; // rax long long v9; // rdi signed __int32 v10; // eax long long v12; // [rsp+0h] [rbp-68h] BYREF long long v13; // [rsp+8h] [rbp-60h] long long v14; // [rsp+10h] [rbp-58h] BYREF char v15; // [rsp+18h] [rbp-50h] long long v16; // [rsp+20h] [rbp-48h] BYREF volatile signed __int32 *v17; // [rsp+28h] [rbp-40h] _QWORD *v18; // [rsp+30h] [rbp-38h] *a1 = 0LL; v18 = a1 + 1; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<std::_V2::condition_variable_any,std::allocator<std::_V2::condition_variable_any>>( a1 + 1, a1, &v16); v5 = *a3; for ( i = a3[1]; v5 != i; v5 += 32LL ) { emittra::Emittra::get_or_create_event_data(&v16, a2, v5); v7 = v16; v14 = v16 + 640; v15 = 0; std::unique_lock<std::shared_mutex>::lock(&v14); v15 = 1; v12 = *a1; v8 = a1[1]; v13 = v8; if ( v8 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v8 + 12); else _InterlockedIncrement((volatile signed __int32 *)(v8 + 12)); } std::vector<std::weak_ptr<std::_V2::condition_variable_any>>::emplace_back<std::weak_ptr<std::_V2::condition_variable_any>>( v7 + 760, &v12); v9 = v13; if ( v13 ) { if ( _libc_single_threaded ) { v10 = *(_DWORD *)(v13 + 12); *(_DWORD *)(v13 + 12) = v10 - 1; } else { v10 = _InterlockedExchangeAdd((volatile signed __int32 *)(v13 + 12), 0xFFFFFFFF); } if ( v10 == 1 ) (*(void ( **)(long long))(*(_QWORD *)v9 + 24LL))(v9); } std::unique_lock<std::shared_mutex>::~unique_lock(&v14); if ( v17 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v17); } return a1; }
make_cv: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,RDX MOV R15,RSI MOV R14,RDI MOV qword ptr [RDI],0x0 ADD RDI,0x8 LEA RDX,[RSP + 0x20] MOV qword ptr [RSP + 0x30],RDI MOV RSI,R14 CALL 0x001094c4 MOV R12,qword ptr [RBX] MOV RBX,qword ptr [RBX + 0x8] CMP R12,RBX JZ 0x00105ce2 LEA RBP,[RSP + 0x10] LAB_00105c19: LEA RDI,[RSP + 0x20] MOV RSI,R15 MOV RDX,R12 CALL 0x00104c50 MOV R13,qword ptr [RSP + 0x20] LEA RAX,[R13 + 0x280] MOV qword ptr [RSP + 0x10],RAX MOV byte ptr [RSP + 0x18],0x0 LAB_00105c3f: MOV RDI,RBP CALL 0x001078e6 MOV byte ptr [RSP + 0x18],0x1 MOV RAX,qword ptr [R14] MOV qword ptr [RSP],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x8],RAX TEST RAX,RAX JZ 0x00105c76 MOV RCX,qword ptr [0x00111fb8] CMP byte ptr [RCX],0x0 JZ 0x00105c72 INC dword ptr [RAX + 0xc] JMP 0x00105c76 LAB_00105c72: INC.LOCK dword ptr [RAX + 0xc] LAB_00105c76: ADD R13,0x2f8 LAB_00105c7d: MOV RDI,R13 MOV RSI,RSP CALL 0x001095b2 LAB_00105c88: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x00105cbe MOV RAX,qword ptr [0x00111fb8] CMP byte ptr [RAX],0x0 JZ 0x00105ca9 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x00105cb3 LAB_00105ca9: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_00105cb3: CMP EAX,0x1 JNZ 0x00105cbe MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_00105cbe: MOV RDI,RBP CALL 0x0010656c MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI JZ 0x00105cd5 CALL 0x00104352 LAB_00105cd5: ADD R12,0x20 CMP R12,RBX JNZ 0x00105c19 LAB_00105ce2: MOV RAX,R14 ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* emittra::Emittra::make_cv(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&) */ vector * emittra::Emittra::make_cv(vector *param_1) { int *piVar1; long lVar2; long lVar3; int iVar4; long *in_RDX; long lVar5; int8 local_68; long *local_60; long local_58; int1 local_50; long local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40; vector *local_38; *(int8 *)param_1 = 0; local_38 = param_1 + 8; std::__shared_count<(__gnu_cxx::_Lock_policy)2>:: __shared_count<std::_V2::condition_variable_any,std::allocator<std::_V2::condition_variable_any>> (local_38,param_1,&local_48); lVar5 = *in_RDX; lVar2 = in_RDX[1]; if (lVar5 != lVar2) { do { /* try { // try from 00105c19 to 00105c28 has its CatchHandler @ 00105cf4 */ get_or_create_event_data((string *)&local_48); lVar3 = local_48; local_58 = local_48 + 0x280; local_50 = 0; /* try { // try from 00105c3f to 00105c46 has its CatchHandler @ 00105cf9 */ std::unique_lock<std::shared_mutex>::lock((unique_lock<std::shared_mutex> *)&local_58); local_50 = 1; local_68 = *(int8 *)param_1; local_60 = *(long **)(param_1 + 8); if (local_60 != (long *)0x0) { if (*PTR___libc_single_threaded_00111fb8 == '\0') { LOCK(); *(int *)((long)local_60 + 0xc) = *(int *)((long)local_60 + 0xc) + 1; UNLOCK(); } else { *(int *)((long)local_60 + 0xc) = *(int *)((long)local_60 + 0xc) + 1; } } /* try { // try from 00105c7d to 00105c87 has its CatchHandler @ 00105cfe */ std:: vector<std::weak_ptr<std::_V2::condition_variable_any>,std::allocator<std::weak_ptr<std::_V2::condition_variable_any>>> ::emplace_back<std::weak_ptr<std::_V2::condition_variable_any>> ((vector<std::weak_ptr<std::_V2::condition_variable_any>,std::allocator<std::weak_ptr<std::_V2::condition_variable_any>>> *)(lVar3 + 0x2f8),(weak_ptr *)&local_68); if (local_60 != (long *)0x0) { if (*PTR___libc_single_threaded_00111fb8 == '\0') { LOCK(); piVar1 = (int *)((long)local_60 + 0xc); iVar4 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar4 = *(int *)((long)local_60 + 0xc); *(int *)((long)local_60 + 0xc) = iVar4 + -1; } if (iVar4 == 1) { (**(code **)(*local_60 + 0x18))(); } } std::unique_lock<std::shared_mutex>::~unique_lock((unique_lock<std::shared_mutex> *)&local_58) ; if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40); } lVar5 = lVar5 + 0x20; } while (lVar5 != lVar2); } return param_1; }
36,772
emittra::Emittra::make_cv(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
angrymouse[P]emittra/src/emittra.cpp
std::shared_ptr<std::condition_variable_any> Emittra::make_cv(const std::vector<std::string>& event_names) { auto cv = std::make_shared<std::condition_variable_any>(); for (const auto& event_name : event_names) { auto event_data = get_or_create_event_data(event_name); std::unique_lock<std::shared_mutex> lock(event_data->mutex); event_data->associated_cvs.push_back(cv); } return cv; }
O2
cpp
emittra::Emittra::make_cv(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, (%rsp) callq 0x5eeb movq (%r14), %r13 movq 0x8(%r14), %rbx leaq 0x28(%rsp), %r14 leaq 0x18(%rsp), %r12 cmpq %rbx, %r13 je 0x572e leaq 0x8(%rsp), %rdi movq %r15, %rsi movq %r13, %rdx callq 0x4932 movq 0x8(%rsp), %rsi movl $0x280, %eax # imm = 0x280 addq %rax, %rsi movq %r14, %rdi callq 0x5d80 movq 0x8(%rsp), %rbp movl $0x2f8, %eax # imm = 0x2F8 addq %rax, %rbp movq %r12, %rdi movq (%rsp), %rsi callq 0x8954 movq %rbp, %rdi movq %r12, %rsi callq 0x876a leaq 0x20(%rsp), %rdi callq 0x6812 movq %r14, %rdi callq 0x5d96 leaq 0x10(%rsp), %rdi callq 0x3f84 addq $0x20, %r13 jmp 0x56be movq (%rsp), %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 jmp 0x576c movq %rax, %r14 jmp 0x5762 movq %rax, %r14 leaq 0x20(%rsp), %rdi callq 0x6812 leaq 0x28(%rsp), %rdi callq 0x5d96 leaq 0x10(%rsp), %rdi callq 0x3f84 movq (%rsp), %rdi addq $0x8, %rdi callq 0x3f84 movq %r14, %rdi callq 0x3440 nop
_ZN7emittra7Emittra7make_cvERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r14, rdx mov r15, rsi mov [rsp+68h+var_68], rdi call _ZSt11make_sharedINSt3_V222condition_variable_anyEJEESt10shared_ptrIT_EDpOT0_; std::make_shared<std::_V2::condition_variable_any>() mov r13, [r14] mov rbx, [r14+8] lea r14, [rsp+68h+var_40] lea r12, [rsp+68h+var_50] loc_56BE: cmp r13, rbx jz short loc_572E lea rdi, [rsp+68h+var_60] mov rsi, r15 mov rdx, r13 call _ZN7emittra7Emittra24get_or_create_event_dataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; emittra::Emittra::get_or_create_event_data(std::string const&) mov rsi, [rsp+68h+var_60] mov eax, 280h add rsi, rax mov rdi, r14 call _ZNSt11unique_lockISt12shared_mutexEC2ERS0_; std::unique_lock<std::shared_mutex>::unique_lock(std::shared_mutex&) mov rbp, [rsp+68h+var_60] mov eax, 2F8h add rbp, rax mov rdi, r12 mov rsi, [rsp+68h+var_68] call _ZNSt10__weak_ptrINSt3_V222condition_variable_anyELN9__gnu_cxx12_Lock_policyE2EEC2IS1_vEERKSt12__shared_ptrIT_LS3_2EE; std::__weak_ptr<std::_V2::condition_variable_any,(__gnu_cxx::_Lock_policy)2>::__weak_ptr<std::_V2::condition_variable_any,void>(std::__shared_ptr<std::_V2::condition_variable_any,(__gnu_cxx::_Lock_policy)2> const&) mov rdi, rbp mov rsi, r12 call _ZNSt6vectorISt8weak_ptrINSt3_V222condition_variable_anyEESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_; std::vector<std::weak_ptr<std::_V2::condition_variable_any>>::emplace_back<std::weak_ptr<std::_V2::condition_variable_any>>(std::weak_ptr<std::_V2::condition_variable_any> &&) lea rdi, [rsp+68h+var_48] call _ZNSt12__weak_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__weak_count<(__gnu_cxx::_Lock_policy)2>::~__weak_count() mov rdi, r14 call _ZNSt11unique_lockISt12shared_mutexED2Ev; std::unique_lock<std::shared_mutex>::~unique_lock() lea rdi, [rsp+68h+var_58] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() add r13, 20h ; ' ' jmp short loc_56BE loc_572E: mov rax, [rsp+68h+var_68] add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax jmp short loc_576C mov r14, rax jmp short loc_5762 mov r14, rax lea rdi, [rsp+arg_18] call _ZNSt12__weak_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__weak_count<(__gnu_cxx::_Lock_policy)2>::~__weak_count() lea rdi, [rsp+arg_20] call _ZNSt11unique_lockISt12shared_mutexED2Ev; std::unique_lock<std::shared_mutex>::~unique_lock() loc_5762: lea rdi, [rsp+arg_8] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() loc_576C: mov rdi, [rsp+0] add rdi, 8 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, r14 call __Unwind_Resume
long long emittra::Emittra::make_cv(long long a1, std::__shared_mutex_pthread *a2, long long *a3) { long long v4; // r13 long long v5; // rbx long long v6; // rbp long long v8; // [rsp+8h] [rbp-60h] BYREF long long v9; // [rsp+10h] [rbp-58h] BYREF _BYTE v10[8]; // [rsp+18h] [rbp-50h] BYREF _BYTE v11[8]; // [rsp+20h] [rbp-48h] BYREF _BYTE v12[64]; // [rsp+28h] [rbp-40h] BYREF std::make_shared<std::_V2::condition_variable_any>(); v4 = *a3; v5 = a3[1]; while ( v4 != v5 ) { emittra::Emittra::get_or_create_event_data((long long)&v8, a2, v4); std::unique_lock<std::shared_mutex>::unique_lock(v12, v8 + 640); v6 = v8 + 760; std::__weak_ptr<std::_V2::condition_variable_any,(__gnu_cxx::_Lock_policy)2>::__weak_ptr<std::_V2::condition_variable_any,void>( v10, a1); std::vector<std::weak_ptr<std::_V2::condition_variable_any>>::emplace_back<std::weak_ptr<std::_V2::condition_variable_any>>( v6, v10); std::__weak_count<(__gnu_cxx::_Lock_policy)2>::~__weak_count(v11); std::unique_lock<std::shared_mutex>::~unique_lock(v12); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v9); v4 += 32LL; } return a1; }
make_cv: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,RDX MOV R15,RSI MOV qword ptr [RSP],RDI CALL 0x00105eeb MOV R13,qword ptr [R14] MOV RBX,qword ptr [R14 + 0x8] LEA R14,[RSP + 0x28] LEA R12,[RSP + 0x18] LAB_001056be: CMP R13,RBX JZ 0x0010572e LAB_001056c3: LEA RDI,[RSP + 0x8] MOV RSI,R15 MOV RDX,R13 CALL 0x00104932 MOV RSI,qword ptr [RSP + 0x8] MOV EAX,0x280 ADD RSI,RAX LAB_001056e0: MOV RDI,R14 CALL 0x00105d80 MOV RBP,qword ptr [RSP + 0x8] MOV EAX,0x2f8 ADD RBP,RAX MOV RDI,R12 MOV RSI,qword ptr [RSP] CALL 0x00108954 LAB_00105701: MOV RDI,RBP MOV RSI,R12 CALL 0x0010876a LAB_0010570c: LEA RDI,[RSP + 0x20] CALL 0x00106812 MOV RDI,R14 CALL 0x00105d96 LEA RDI,[RSP + 0x10] CALL 0x00103f84 ADD R13,0x20 JMP 0x001056be LAB_0010572e: MOV RAX,qword ptr [RSP] ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* emittra::Emittra::make_cv(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&) */ vector * emittra::Emittra::make_cv(vector *param_1) { long lVar1; long *in_RDX; vector<std::weak_ptr<std::_V2::condition_variable_any>,std::allocator<std::weak_ptr<std::_V2::condition_variable_any>>> *this; long lVar2; long local_60; __shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [8]; __weak_ptr<std::_V2::condition_variable_any,(__gnu_cxx::_Lock_policy)2> local_50 [8]; __weak_count<(__gnu_cxx::_Lock_policy)2> local_48 [8]; unique_lock<std::shared_mutex> local_40 [16]; std::make_shared<std::_V2::condition_variable_any>(); lVar1 = in_RDX[1]; for (lVar2 = *in_RDX; lVar2 != lVar1; lVar2 = lVar2 + 0x20) { /* try { // try from 001056c3 to 001056d2 has its CatchHandler @ 00105741 */ get_or_create_event_data((string *)&local_60); /* try { // try from 001056e0 to 001056e7 has its CatchHandler @ 00105746 */ std::unique_lock<std::shared_mutex>::unique_lock(local_40,(shared_mutex *)(local_60 + 0x280)); this = (vector<std::weak_ptr<std::_V2::condition_variable_any>,std::allocator<std::weak_ptr<std::_V2::condition_variable_any>>> *)(local_60 + 0x2f8); std::__weak_ptr<std::_V2::condition_variable_any,(__gnu_cxx::_Lock_policy)2>:: __weak_ptr<std::_V2::condition_variable_any,void>(local_50,(__shared_ptr *)param_1); /* try { // try from 00105701 to 0010570b has its CatchHandler @ 0010574b */ std:: vector<std::weak_ptr<std::_V2::condition_variable_any>,std::allocator<std::weak_ptr<std::_V2::condition_variable_any>>> ::emplace_back<std::weak_ptr<std::_V2::condition_variable_any>>(this,(weak_ptr *)local_50); std::__weak_count<(__gnu_cxx::_Lock_policy)2>::~__weak_count(local_48); std::unique_lock<std::shared_mutex>::~unique_lock(local_40); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58); } return param_1; }
36,773
common_arg::common_arg(std::initializer_list<char const*> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&))
monkey531[P]llama/common/arg.h
common_arg( const std::initializer_list<const char *> & args, const std::string & help, void (*handler)(common_params & params) ) : args(args), help(help), handler_void(handler) {}
O1
c
common_arg::common_arg(std::initializer_list<char const*> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&)): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r13 movq %rdi, %rbx leaq 0xc(%rsp), %rsi movl $0x0, (%rsi) leaq 0xb(%rsp), %rcx leaq 0xa(%rsp), %r8 movl $0x1, %edx callq 0x58380 leaq 0x38(%rbx), %rax xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rbx) movups %xmm0, 0x50(%rbx) movups %xmm0, 0x30(%rbx) movq %rax, 0x48(%rbx) movq %rax, 0x50(%rbx) movq $0x0, 0x58(%rbx) leaq 0x60(%rbx), %r12 movq (%r13), %rsi movq 0x8(%r13), %rdx leaq 0x9(%rsp), %rcx movq %r12, %rdi callq 0x58402 leaq 0x90(%rbx), %rdi leaq 0xa0(%rbx), %rax xorps %xmm0, %xmm0 movups %xmm0, 0x78(%rbx) movq $0x0, 0x88(%rbx) movq %rax, 0x90(%rbx) movq (%r15), %rsi movq 0x8(%r15), %rdx addq %rsi, %rdx callq 0x232a0 movb $0x0, 0xb0(%rbx) movq %r14, 0xb8(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0xc0(%rbx) movq $0x0, 0xd0(%rbx) addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq (%r12), %rdi testq %rdi, %rdi je 0x54e80 movq 0x70(%rbx), %rsi subq %rdi, %rsi callq 0x1b8e0 jmp 0x54e80 movq %rax, %r14 leaq 0x30(%rbx), %rdi callq 0x58448 movq %rbx, %rdi callq 0x58448 movq %r14, %rdi callq 0x1bf90 nop
_ZN10common_argC2ERKSt16initializer_listIPKcERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsE: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov r14, rcx mov r15, rdx mov r13, rsi mov rbx, rdi lea rsi, [rsp+38h+var_2C] mov dword ptr [rsi], 0 lea rcx, [rsp+38h+var_2D] lea r8, [rsp+38h+var_2E] mov edx, 1 call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2ESt16initializer_listIS0_ERKS2_RKS3_; std::set<llama_example>::set(std::initializer_list<llama_example>,std::less<llama_example> const&,std::allocator<llama_example> const&) lea rax, [rbx+38h] xorps xmm0, xmm0 movups xmmword ptr [rbx+40h], xmm0 movups xmmword ptr [rbx+50h], xmm0 movups xmmword ptr [rbx+30h], xmm0 mov [rbx+48h], rax mov [rbx+50h], rax mov qword ptr [rbx+58h], 0 lea r12, [rbx+60h] mov rsi, [r13+0] mov rdx, [r13+8] lea rcx, [rsp+38h+var_2F] mov rdi, r12 call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&) lea rdi, [rbx+90h] lea rax, [rbx+0A0h] xorps xmm0, xmm0 movups xmmword ptr [rbx+78h], xmm0 mov qword ptr [rbx+88h], 0 mov [rbx+90h], rax mov rsi, [r15] mov rdx, [r15+8] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov byte ptr [rbx+0B0h], 0 mov [rbx+0B8h], r14 xorps xmm0, xmm0 movups xmmword ptr [rbx+0C0h], xmm0 mov qword ptr [rbx+0D0h], 0 add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, [r12]; void * test rdi, rdi jz short loc_54E80 mov rsi, [rbx+70h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_54E80 mov r14, rax loc_54E80: lea rdi, [rbx+30h] call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, rbx call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, r14 call __Unwind_Resume
long long common_arg::common_arg(long long a1, _QWORD *a2, long long a3, long long a4) { long long result; // rax char v7; // [rsp+9h] [rbp-2Fh] BYREF char v8; // [rsp+Ah] [rbp-2Eh] BYREF char v9; // [rsp+Bh] [rbp-2Dh] BYREF _DWORD v10[11]; // [rsp+Ch] [rbp-2Ch] BYREF v10[0] = 0; std::set<llama_example>::set(a1, v10, 1LL, &v9, &v8); *(_OWORD *)(a1 + 64) = 0LL; *(_OWORD *)(a1 + 80) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_QWORD *)(a1 + 72) = a1 + 56; *(_QWORD *)(a1 + 80) = a1 + 56; *(_QWORD *)(a1 + 88) = 0LL; std::vector<char const*>::vector(a1 + 96, *a2, a2[1], &v7); *(_OWORD *)(a1 + 120) = 0LL; *(_QWORD *)(a1 + 136) = 0LL; *(_QWORD *)(a1 + 144) = a1 + 160; result = std::string::_M_construct<char *>((_QWORD *)(a1 + 144), *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8)); *(_BYTE *)(a1 + 176) = 0; *(_QWORD *)(a1 + 184) = a4; *(_OWORD *)(a1 + 192) = 0LL; *(_QWORD *)(a1 + 208) = 0LL; return result; }
common_arg: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R14,RCX MOV R15,RDX MOV R13,RSI MOV RBX,RDI LEA RSI,[RSP + 0xc] MOV dword ptr [RSI],0x0 LEA RCX,[RSP + 0xb] LEA R8,[RSP + 0xa] MOV EDX,0x1 CALL 0x00158380 LEA RAX,[RBX + 0x38] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x40],XMM0 MOVUPS xmmword ptr [RBX + 0x50],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV qword ptr [RBX + 0x48],RAX MOV qword ptr [RBX + 0x50],RAX MOV qword ptr [RBX + 0x58],0x0 LEA R12,[RBX + 0x60] MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] LAB_00154def: LEA RCX,[RSP + 0x9] MOV RDI,R12 CALL 0x00158402 LEA RDI,[RBX + 0x90] LEA RAX,[RBX + 0xa0] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x78],XMM0 MOV qword ptr [RBX + 0x88],0x0 MOV qword ptr [RBX + 0x90],RAX MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] ADD RDX,RSI LAB_00154e2d: CALL 0x001232a0 LAB_00154e32: MOV byte ptr [RBX + 0xb0],0x0 MOV qword ptr [RBX + 0xb8],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0xc0],XMM0 MOV qword ptr [RBX + 0xd0],0x0 ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* common_arg::common_arg(std::initializer_list<char const*> const&, std::__cxx11::string const&, void (*)(common_params&)) */ void __thiscall common_arg::common_arg (common_arg *this,initializer_list *param_1,string *param_2, _func_void_common_params_ptr *param_3) { int1 local_2f; int1 local_2e; int1 local_2d; int4 local_2c; local_2c = 0; std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set (this,&local_2c,1,&local_2d,&local_2e); *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x50) = 0; *(int8 *)(this + 0x58) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(common_arg **)(this + 0x48) = this + 0x38; *(common_arg **)(this + 0x50) = this + 0x38; *(int8 *)(this + 0x58) = 0; /* try { // try from 00154def to 00154dfb has its CatchHandler @ 00154e7d */ std::vector<char_const*,std::allocator<char_const*>>::vector ((vector<char_const*,std::allocator<char_const*>> *)(this + 0x60),*(int8 *)param_1 ,*(int8 *)(param_1 + 8),&local_2f); *(int8 *)(this + 0x78) = 0; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0; *(common_arg **)(this + 0x90) = this + 0xa0; /* try { // try from 00154e2d to 00154e31 has its CatchHandler @ 00154e63 */ std::__cxx11::string::_M_construct<char*> (this + 0x90,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2); this[0xb0] = (common_arg)0x0; *(_func_void_common_params_ptr **)(this + 0xb8) = param_3; *(int8 *)(this + 0xc0) = 0; *(int8 *)(this + 200) = 0; *(int8 *)(this + 0xd0) = 0; return; }
36,774
minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, bool)
monkey531[P]llama/common/minja.hpp
ForTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, const std::vector<std::string> & vns, std::shared_ptr<Expression> && iter, std::shared_ptr<Expression> && c, bool r) : TemplateToken(Type::For, location, pre, post), var_names(vns), iterable(std::move(iter)), condition(std::move(c)), recursive(r) {}
O1
cpp
minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, bool): pushq %r15 pushq %r14 pushq %rbx movq %r9, %r14 movq %rdi, %rbx leaq 0x84dc6(%rip), %r15 # 0xe41c8 addq $0x10, %r15 movq %r15, (%rdi) movl $0x6, 0x8(%rdi) movq (%rsi), %rax movq %rax, 0x10(%rdi) movq 0x8(%rsi), %rax movq %rax, 0x18(%rdi) testq %rax, %rax je 0x5f439 movq 0x86b6d(%rip), %rdi # 0xe5f98 cmpb $0x0, (%rdi) je 0x5f435 incl 0x8(%rax) jmp 0x5f439 lock incl 0x8(%rax) movq 0x10(%rsi), %rax movq %rax, 0x20(%rbx) movl %edx, 0x28(%rbx) movl %ecx, 0x2c(%rbx) leaq 0x857e2(%rip), %rax # 0xe4c30 addq $0x10, %rax movq %rax, (%rbx) leaq 0x30(%rbx), %rdi movq %r8, %rsi callq 0x3c336 movb 0x28(%rsp), %al movq 0x20(%rsp), %rcx xorl %edx, %edx movq %rdx, 0x50(%rbx) movups (%r14), %xmm0 movq %rdx, 0x8(%r14) movups %xmm0, 0x48(%rbx) movq %rdx, (%r14) movq %rdx, 0x60(%rbx) movups (%rcx), %xmm0 movq %rdx, 0x8(%rcx) movups %xmm0, 0x58(%rbx) movq %rdx, (%rcx) movb %al, 0x68(%rbx) popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq %r15, (%rbx) movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x5f4ae callq 0x35448 movq %r14, %rdi callq 0x1ad30
_ZN5minja16ForTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EEOSt10shared_ptrINS_10ExpressionEESJ_b: push r15 push r14 push rbx mov r14, r9 mov rbx, rdi lea r15, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken add r15, 10h mov [rdi], r15 mov dword ptr [rdi+8], 6 mov rax, [rsi] mov [rdi+10h], rax mov rax, [rsi+8] mov [rdi+18h], rax test rax, rax jz short loc_5F439 mov rdi, cs:__libc_single_threaded_ptr cmp byte ptr [rdi], 0 jz short loc_5F435 inc dword ptr [rax+8] jmp short loc_5F439 loc_5F435: lock inc dword ptr [rax+8] loc_5F439: mov rax, [rsi+10h] mov [rbx+20h], rax mov [rbx+28h], edx mov [rbx+2Ch], ecx lea rax, _ZTVN5minja16ForTemplateTokenE; `vtable for'minja::ForTemplateToken add rax, 10h mov [rbx], rax lea rdi, [rbx+30h] mov rsi, r8 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) mov al, [rsp+18h+arg_8] mov rcx, [rsp+18h+arg_0] xor edx, edx mov [rbx+50h], rdx movups xmm0, xmmword ptr [r14] mov [r14+8], rdx movups xmmword ptr [rbx+48h], xmm0 mov [r14], rdx mov [rbx+60h], rdx movups xmm0, xmmword ptr [rcx] mov [rcx+8], rdx movups xmmword ptr [rbx+58h], xmm0 mov [rcx], rdx mov [rbx+68h], al pop rbx pop r14 pop r15 retn mov r14, rax mov [rbx], r15 mov rdi, [rbx+18h] test rdi, rdi jz short loc_5F4AE call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5F4AE: mov rdi, r14 call __Unwind_Resume
char minja::ForTemplateToken::ForTemplateToken( long long a1, _QWORD *a2, int a3, int a4, _QWORD *a5, __int128 *a6, __int128 *a7, char a8) { long long v9; // rax char result; // al __int128 v11; // xmm0 __int128 v12; // xmm0 *(_QWORD *)a1 = &`vtable for'minja::TemplateToken + 2; *(_DWORD *)(a1 + 8) = 6; *(_QWORD *)(a1 + 16) = *a2; v9 = a2[1]; *(_QWORD *)(a1 + 24) = v9; if ( v9 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v9 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v9 + 8)); } *(_QWORD *)(a1 + 32) = a2[2]; *(_DWORD *)(a1 + 40) = a3; *(_DWORD *)(a1 + 44) = a4; *(_QWORD *)a1 = &`vtable for'minja::ForTemplateToken + 2; std::vector<std::string>::vector(a1 + 48, a5); result = a8; *(_QWORD *)(a1 + 80) = 0LL; v11 = *a6; *((_QWORD *)a6 + 1) = 0LL; *(_OWORD *)(a1 + 72) = v11; *(_QWORD *)a6 = 0LL; *(_QWORD *)(a1 + 96) = 0LL; v12 = *a7; *((_QWORD *)a7 + 1) = 0LL; *(_OWORD *)(a1 + 88) = v12; *(_QWORD *)a7 = 0LL; *(_BYTE *)(a1 + 104) = a8; return result; }
ForTemplateToken: PUSH R15 PUSH R14 PUSH RBX MOV R14,R9 MOV RBX,RDI LEA R15,[0x1e41c8] ADD R15,0x10 MOV qword ptr [RDI],R15 MOV dword ptr [RDI + 0x8],0x6 MOV RAX,qword ptr [RSI] MOV qword ptr [RDI + 0x10],RAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x18],RAX TEST RAX,RAX JZ 0x0015f439 MOV RDI,qword ptr [0x001e5f98] CMP byte ptr [RDI],0x0 JZ 0x0015f435 INC dword ptr [RAX + 0x8] JMP 0x0015f439 LAB_0015f435: INC.LOCK dword ptr [RAX + 0x8] LAB_0015f439: MOV RAX,qword ptr [RSI + 0x10] MOV qword ptr [RBX + 0x20],RAX MOV dword ptr [RBX + 0x28],EDX MOV dword ptr [RBX + 0x2c],ECX LEA RAX,[0x1e4c30] ADD RAX,0x10 MOV qword ptr [RBX],RAX LEA RDI,[RBX + 0x30] LAB_0015f459: MOV RSI,R8 CALL 0x0013c336 LAB_0015f461: MOV AL,byte ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] XOR EDX,EDX MOV qword ptr [RBX + 0x50],RDX MOVUPS XMM0,xmmword ptr [R14] MOV qword ptr [R14 + 0x8],RDX MOVUPS xmmword ptr [RBX + 0x48],XMM0 MOV qword ptr [R14],RDX MOV qword ptr [RBX + 0x60],RDX MOVUPS XMM0,xmmword ptr [RCX] MOV qword ptr [RCX + 0x8],RDX MOVUPS xmmword ptr [RBX + 0x58],XMM0 MOV qword ptr [RCX],RDX MOV byte ptr [RBX + 0x68],AL POP RBX POP R14 POP R15 RET
/* minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, bool) */ void __thiscall minja::ForTemplateToken::ForTemplateToken (ForTemplateToken *this,int8 *param_1,int4 param_3,int4 param_4, vector *param_5,int8 *param_6,int8 *param_7,ForTemplateToken param_8) { long lVar1; int8 uVar2; *(int ***)this = &PTR__TemplateToken_001e41d8; *(int4 *)(this + 8) = 6; *(int8 *)(this + 0x10) = *param_1; lVar1 = param_1[1]; *(long *)(this + 0x18) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_001e5f98 == '\0') { LOCK(); *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; UNLOCK(); } else { *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; } } *(int8 *)(this + 0x20) = param_1[2]; *(int4 *)(this + 0x28) = param_3; *(int4 *)(this + 0x2c) = param_4; *(int ***)this = &PTR__ForTemplateToken_001e4c40; /* try { // try from 0015f459 to 0015f460 has its CatchHandler @ 0015f49a */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x30), param_5); *(int8 *)(this + 0x50) = 0; uVar2 = param_6[1]; param_6[1] = 0; *(int8 *)(this + 0x48) = *param_6; *(int8 *)(this + 0x50) = uVar2; *param_6 = 0; *(int8 *)(this + 0x60) = 0; uVar2 = param_7[1]; param_7[1] = 0; *(int8 *)(this + 0x58) = *param_7; *(int8 *)(this + 0x60) = uVar2; *param_7 = 0; this[0x68] = param_8; return; }
36,775
my_wc_mb_gb2312
eloqsql/strings/ctype-gb2312.c
static int my_wc_mb_gb2312(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; if (s >= e) return MY_CS_TOOSMALL; if ((uint) wc < 0x80) { s[0]= (uchar) wc; return 1; } if (!(code=func_uni_gb2312_onechar(wc))) return MY_CS_ILUNI; if (s+2>e) return MY_CS_TOOSMALL2; code|=0x8080; s[0]=code>>8; s[1]=code&0xFF; return 2; }
O3
c
my_wc_mb_gb2312: movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0xb78b4 cmpl $0x7f, %esi ja 0xb78b5 movb %sil, (%rdx) movl $0x1, %eax retq leal -0xa4(%rsi), %eax cmpl $0x138, %eax # imm = 0x138 ja 0xb78d0 movl %eax, %eax leaq 0x1423f5(%rip), %rsi # 0x1f9cc0 jmp 0xb79ab leal -0x2c7(%rsi), %eax cmpl $0x18a, %eax # imm = 0x18A ja 0xb78eb movl %eax, %eax leaq 0x14265a(%rip), %rsi # 0x1f9f40 jmp 0xb79ab leal -0x2015(%rsi), %eax cmpl $0x2fd, %eax # imm = 0x2FD ja 0xb7906 movl %eax, %eax leaq 0x14295f(%rip), %rsi # 0x1fa260 jmp 0xb79ab leal -0x2460(%rsi), %eax cmpl $0x1e2, %eax # imm = 0x1E2 ja 0xb7921 movl %eax, %eax leaq 0x142f44(%rip), %rsi # 0x1fa860 jmp 0xb79ab leal -0x3000(%rsi), %eax cmpl $0x129, %eax # imm = 0x129 ja 0xb7939 movl %eax, %eax leaq 0x1432f9(%rip), %rsi # 0x1fac30 jmp 0xb79ab leal -0x3220(%rsi), %eax cmpl $0x9, %eax ja 0xb794f movl %eax, %eax leaq 0x143543(%rip), %rsi # 0x1fae90 jmp 0xb79ab leal -0x4e00(%rsi), %eax cmpl $0x4d54, %eax # imm = 0x4D54 ja 0xb7967 movl %eax, %eax leaq 0x14354b(%rip), %rsi # 0x1faeb0 jmp 0xb79ab leal -0x9c7c(%rsi), %eax cmpl $0x66, %eax ja 0xb797d movl %eax, %eax leaq 0x14cfe5(%rip), %rsi # 0x204960 jmp 0xb79ab leal -0x9e1f(%rsi), %eax cmpl $0x181, %eax # imm = 0x181 ja 0xb7995 movl %eax, %eax leaq 0x14d09d(%rip), %rsi # 0x204a30 jmp 0xb79ab leal -0xff01(%rsi), %eax cmpl $0xe4, %eax ja 0xb79e1 movl %eax, %eax leaq 0x14d395(%rip), %rsi # 0x204d40 leaq (%rsi,%rax,2), %rax pushq %rbp movq %rsp, %rbp movzwl (%rax), %esi testw %si, %si je 0xb79dd leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0xb79df orl $0x8080, %esi # imm = 0x8080 rolw $0x8, %si movw %si, (%rdx) movl $0x2, %eax jmp 0xb79df xorl %eax, %eax popq %rbp retq xorl %eax, %eax retq
my_wc_mb_gb2312: mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short locret_B78B4 cmp esi, 7Fh ja short loc_B78B5 mov [rdx], sil mov eax, 1 locret_B78B4: retn loc_B78B5: lea eax, [rsi-0A4h] cmp eax, 138h ja short loc_B78D0 mov eax, eax lea rsi, tab_uni_gb23120 jmp loc_B79AB loc_B78D0: lea eax, [rsi-2C7h] cmp eax, 18Ah ja short loc_B78EB mov eax, eax lea rsi, tab_uni_gb23121 jmp loc_B79AB loc_B78EB: lea eax, [rsi-2015h] cmp eax, 2FDh ja short loc_B7906 mov eax, eax lea rsi, tab_uni_gb23122; "*!,!" jmp loc_B79AB loc_B7906: lea eax, [rsi-2460h] cmp eax, 1E2h ja short loc_B7921 mov eax, eax lea rsi, tab_uni_gb23123; "Y\"Z\"[\"\\\"]\"^\"_\"`\"a\"b\"" jmp loc_B79AB loc_B7921: lea eax, [rsi-3000h] cmp eax, 129h ja short loc_B7939 mov eax, eax lea rsi, tab_uni_gb23124; "!!\"!#!(!" jmp short loc_B79AB loc_B7939: lea eax, [rsi-3220h] cmp eax, 9 ja short loc_B794F mov eax, eax lea rsi, tab_uni_gb23125; "e\"f\"g\"h\"i\"j\"k\"l\"m\"n\"" jmp short loc_B79AB loc_B794F: lea eax, [rsi-4E00h] cmp eax, 4D54h ja short loc_B7967 mov eax, eax lea rsi, tab_uni_gb23126; ";R!6" jmp short loc_B79AB loc_B7967: lea eax, [rsi-9C7Ch] cmp eax, 66h ; 'f' ja short loc_B797D mov eax, eax lea rsi, tab_uni_gb23127 jmp short loc_B79AB loc_B797D: lea eax, [rsi-9E1Fh] cmp eax, 181h ja short loc_B7995 mov eax, eax lea rsi, tab_uni_gb23128; "qD/p&<0pyC" jmp short loc_B79AB loc_B7995: lea eax, [rsi-0FF01h] cmp eax, 0E4h ja short loc_B79E1 mov eax, eax lea rsi, tab_uni_gb23129; "!#\"###g!%#&#'#(#)#*#+#,#-#.#/#0#1#2#3#"... loc_B79AB: lea rax, [rsi+rax*2] push rbp mov rbp, rsp movzx esi, word ptr [rax] test si, si jz short loc_B79DD lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_B79DF or esi, 8080h rol si, 8 mov [rdx], si mov eax, 2 jmp short loc_B79DF loc_B79DD: xor eax, eax loc_B79DF: pop rbp retn loc_B79E1: xor eax, eax retn
long long my_wc_mb_gb2312(long long a1, unsigned int a2, _WORD *a3, unsigned long long a4) { long long result; // rax long long v5; // rax const char *v6; // rsi __int16 v7; // si result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { if ( a2 > 0x7F ) { LODWORD(v5) = a2 - 164; if ( a2 - 164 > 0x138 ) { LODWORD(v5) = a2 - 711; if ( a2 - 711 > 0x18A ) { LODWORD(v5) = a2 - 8213; if ( a2 - 8213 > 0x2FD ) { LODWORD(v5) = a2 - 9312; if ( a2 - 9312 > 0x1E2 ) { LODWORD(v5) = a2 - 12288; if ( a2 - 12288 > 0x129 ) { LODWORD(v5) = a2 - 12832; if ( a2 - 12832 > 9 ) { LODWORD(v5) = a2 - 19968; if ( a2 - 19968 > 0x4D54 ) { LODWORD(v5) = a2 - 40060; if ( a2 - 40060 > 0x66 ) { LODWORD(v5) = a2 - 40479; if ( a2 - 40479 > 0x181 ) { LODWORD(v5) = a2 - 65281; if ( a2 - 65281 > 0xE4 ) return 0LL; v5 = (unsigned int)v5; v6 = "!#\"###g!%#&#'#(#)#*#+#,#-#.#/#0#1#2#3#4#5#6#7#8#9#:#;#<#=#>#?#@#A#B#C#D#E#F#G#H#I#J#K#L#M#" "N#O#P#Q#R#S#T#U#V#W#X#Y#Z#[#\\#]#^#_#`#a#b#c#d#e#f#g#h#i#j#k#l#m#n#o#p#q#r#s#t#u#v#w#x#y#z#{#|#}#+!"; } else { v5 = (unsigned int)v5; v6 = "qD/p&<0pyC"; } } else { v5 = (unsigned int)v5; v6 = (const char *)&tab_uni_gb23127; } } else { v5 = (unsigned int)v5; v6 = ";R!6"; } } else { v5 = (unsigned int)v5; v6 = "e\"f\"g\"h\"i\"j\"k\"l\"m\"n\""; } } else { v5 = (unsigned int)v5; v6 = "!!\"!#!(!"; } } else { v5 = (unsigned int)v5; v6 = "Y\"Z\"[\"\\\"]\"^\"_\"`\"a\"b\""; } } else { v5 = (unsigned int)v5; v6 = "*!,!"; } } else { v5 = (unsigned int)v5; v6 = (const char *)&tab_uni_gb23121; } } else { v5 = (unsigned int)v5; v6 = (const char *)&tab_uni_gb23120; } v7 = *(_WORD *)&v6[2 * v5]; if ( v7 ) { result = 4294967194LL; if ( (unsigned long long)(a3 + 1) <= a4 ) { *a3 = __ROL2__(v7 | 0x8080, 8); return 2LL; } } else { return 0LL; } } else { *(_BYTE *)a3 = a2; return 1LL; } } return result; }
my_wc_mb_gb2312: MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x001b78b4 CMP ESI,0x7f JA 0x001b78b5 MOV byte ptr [RDX],SIL MOV EAX,0x1 LAB_001b78b4: RET LAB_001b78b5: LEA EAX,[RSI + -0xa4] CMP EAX,0x138 JA 0x001b78d0 MOV EAX,EAX LEA RSI,[0x2f9cc0] JMP 0x001b79ab LAB_001b78d0: LEA EAX,[RSI + -0x2c7] CMP EAX,0x18a JA 0x001b78eb MOV EAX,EAX LEA RSI,[0x2f9f40] JMP 0x001b79ab LAB_001b78eb: LEA EAX,[RSI + -0x2015] CMP EAX,0x2fd JA 0x001b7906 MOV EAX,EAX LEA RSI,[0x2fa260] JMP 0x001b79ab LAB_001b7906: LEA EAX,[RSI + -0x2460] CMP EAX,0x1e2 JA 0x001b7921 MOV EAX,EAX LEA RSI,[0x2fa860] JMP 0x001b79ab LAB_001b7921: LEA EAX,[RSI + -0x3000] CMP EAX,0x129 JA 0x001b7939 MOV EAX,EAX LEA RSI,[0x2fac30] JMP 0x001b79ab LAB_001b7939: LEA EAX,[RSI + -0x3220] CMP EAX,0x9 JA 0x001b794f MOV EAX,EAX LEA RSI,[0x2fae90] JMP 0x001b79ab LAB_001b794f: LEA EAX,[RSI + -0x4e00] CMP EAX,0x4d54 JA 0x001b7967 MOV EAX,EAX LEA RSI,[0x2faeb0] JMP 0x001b79ab LAB_001b7967: LEA EAX,[RSI + -0x9c7c] CMP EAX,0x66 JA 0x001b797d MOV EAX,EAX LEA RSI,[0x304960] JMP 0x001b79ab LAB_001b797d: LEA EAX,[RSI + -0x9e1f] CMP EAX,0x181 JA 0x001b7995 MOV EAX,EAX LEA RSI,[0x304a30] JMP 0x001b79ab LAB_001b7995: LEA EAX,[RSI + -0xff01] CMP EAX,0xe4 JA 0x001b79e1 MOV EAX,EAX LEA RSI,[0x304d40] LAB_001b79ab: LEA RAX,[RSI + RAX*0x2] PUSH RBP MOV RBP,RSP MOVZX ESI,word ptr [RAX] TEST SI,SI JZ 0x001b79dd LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x001b79df OR ESI,0x8080 ROL SI,0x8 MOV word ptr [RDX],SI MOV EAX,0x2 JMP 0x001b79df LAB_001b79dd: XOR EAX,EAX LAB_001b79df: POP RBP RET LAB_001b79e1: XOR EAX,EAX RET
int8 my_wc_mb_gb2312(int8 param_1,uint param_2,ushort *param_3,ushort *param_4) { int8 uVar1; ulong uVar2; ushort uVar3; int1 *puVar4; uVar1 = 0xffffff9b; if (param_3 < param_4) { if (0x7f < param_2) { if (param_2 - 0xa4 < 0x139) { uVar2 = (ulong)(param_2 - 0xa4); puVar4 = tab_uni_gb23120; } else if (param_2 - 0x2c7 < 0x18b) { uVar2 = (ulong)(param_2 - 0x2c7); puVar4 = tab_uni_gb23121; } else if (param_2 - 0x2015 < 0x2fe) { uVar2 = (ulong)(param_2 - 0x2015); puVar4 = tab_uni_gb23122; } else if (param_2 - 0x2460 < 0x1e3) { uVar2 = (ulong)(param_2 - 0x2460); puVar4 = tab_uni_gb23123; } else if (param_2 - 0x3000 < 0x12a) { uVar2 = (ulong)(param_2 - 0x3000); puVar4 = tab_uni_gb23124; } else if (param_2 - 0x3220 < 10) { uVar2 = (ulong)(param_2 - 0x3220); puVar4 = tab_uni_gb23125; } else if (param_2 - 0x4e00 < 0x4d55) { uVar2 = (ulong)(param_2 - 0x4e00); puVar4 = &tab_uni_gb23126; } else if (param_2 - 0x9c7c < 0x67) { uVar2 = (ulong)(param_2 - 0x9c7c); puVar4 = tab_uni_gb23127; } else if (param_2 - 0x9e1f < 0x182) { uVar2 = (ulong)(param_2 - 0x9e1f); puVar4 = tab_uni_gb23128; } else { uVar2 = (ulong)(param_2 - 0xff01); if (0xe4 < param_2 - 0xff01) { return 0; } puVar4 = tab_uni_gb23129; } if (*(ushort *)(puVar4 + uVar2 * 2) == 0) { uVar1 = 0; } else { uVar1 = 0xffffff9a; if (param_3 + 1 <= param_4) { uVar3 = *(ushort *)(puVar4 + uVar2 * 2) | 0x8080; *param_3 = uVar3 << 8 | uVar3 >> 8; uVar1 = 2; } } return uVar1; } *(char *)param_3 = (char)param_2; uVar1 = 1; } return uVar1; }
36,776
alaya::SQ4Space<float, float, unsigned int, alaya::SequentialStorage<unsigned char, unsigned int>>::save(std::basic_string_view<char, std::char_traits<char>>&)
AlayaLite/include/space/sq4_space.hpp
auto save(std::string_view &filename) -> void { std::ofstream writer(std::string(filename), std::ios::binary); if (!writer.is_open()) { throw std::runtime_error("Cannot open file " + std::string(filename)); } writer.write(reinterpret_cast<char *>(&metric_), sizeof(metric_)); writer.write(reinterpret_cast<char *>(&data_size_), sizeof(data_size_)); writer.write(reinterpret_cast<char *>(&dim_), sizeof(dim_)); writer.write(reinterpret_cast<char *>(&item_cnt_), sizeof(item_cnt_)); writer.write(reinterpret_cast<char *>(&delete_cnt_), sizeof(delete_cnt_)); writer.write(reinterpret_cast<char *>(&capacity_), sizeof(capacity_)); data_storage_.save(writer); quantizer_.save(writer); LOG_INFO("SQ4Space is saved to {}", filename); }
O0
cpp
alaya::SQ4Space<float, float, unsigned int, alaya::SequentialStorage<unsigned char, unsigned int>>::save(std::basic_string_view<char, std::char_traits<char>>&): subq $0x358, %rsp # imm = 0x358 movq %rdi, 0x350(%rsp) movq %rsi, 0x348(%rsp) movq 0x350(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x348(%rsp), %rax movq %rax, 0x38(%rsp) leaq 0x127(%rsp), %rdi movq %rdi, 0x40(%rsp) callq 0x16d00 movq 0x38(%rsp), %rsi movq 0x40(%rsp), %rdx leaq 0x128(%rsp), %rdi callq 0x2a8f0 jmp 0x2d02c leaq 0x148(%rsp), %rdi leaq 0x128(%rsp), %rsi movl $0x4, %edx callq 0x16e40 jmp 0x2d048 leaq 0x128(%rsp), %rdi callq 0x1dfd0 leaq 0x127(%rsp), %rdi callq 0x16790 leaq 0x148(%rsp), %rdi callq 0x16530 movb %al, 0x2f(%rsp) jmp 0x2d075 movb 0x2f(%rsp), %al testb $0x1, %al jne 0x2d20d jmp 0x2d083 movb $0x1, 0xce(%rsp) movl $0x10, %edi callq 0x16310 movq %rax, 0x10(%rsp) movq 0x348(%rsp), %rax movq %rax, 0x18(%rsp) leaq 0xcf(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0x16d00 movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx leaq 0xd0(%rsp), %rdi callq 0x2a8f0 jmp 0x2d0d2 leaq 0xe91a9(%rip), %rsi # 0x116282 leaq 0xf0(%rsp), %rdi leaq 0xd0(%rsp), %rdx callq 0x32c30 jmp 0x2d0f0 movq 0x10(%rsp), %rdi leaq 0xf0(%rsp), %rsi callq 0x16c00 jmp 0x2d104 movq 0x10(%rsp), %rdi movb $0x0, 0xce(%rsp) movq 0x157ed8(%rip), %rsi # 0x184ff0 movq 0x157e31(%rip), %rdx # 0x184f50 callq 0x16ca0 jmp 0x2d48a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x118(%rsp) movl %eax, 0x114(%rsp) jmp 0x2d160 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x118(%rsp) movl %eax, 0x114(%rsp) leaq 0x128(%rsp), %rdi callq 0x1dfd0 leaq 0x127(%rsp), %rdi callq 0x16790 jmp 0x2d47d movq %rax, %rcx movl %edx, %eax movq %rcx, 0x118(%rsp) movl %eax, 0x114(%rsp) jmp 0x2d470 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x118(%rsp) movl %eax, 0x114(%rsp) jmp 0x2d1e5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x118(%rsp) movl %eax, 0x114(%rsp) jmp 0x2d1d8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x118(%rsp) movl %eax, 0x114(%rsp) leaq 0xf0(%rsp), %rdi callq 0x1dfd0 leaq 0xd0(%rsp), %rdi callq 0x1dfd0 leaq 0xcf(%rsp), %rdi callq 0x16790 testb $0x1, 0xce(%rsp) jne 0x2d1fe jmp 0x2d208 movq 0x10(%rsp), %rdi callq 0x164c0 jmp 0x2d470 movq 0x30(%rsp), %rsi leaq 0x148(%rsp), %rdi movl $0x4, %edx callq 0x169a0 jmp 0x2d226 movq 0x30(%rsp), %rsi addq $0x10, %rsi leaq 0x148(%rsp), %rdi movl $0x4, %edx callq 0x169a0 jmp 0x2d243 movq 0x30(%rsp), %rsi addq $0x14, %rsi leaq 0x148(%rsp), %rdi movl $0x4, %edx callq 0x169a0 jmp 0x2d260 movq 0x30(%rsp), %rsi addq $0x18, %rsi leaq 0x148(%rsp), %rdi movl $0x4, %edx callq 0x169a0 jmp 0x2d27d movq 0x30(%rsp), %rsi addq $0x1c, %rsi leaq 0x148(%rsp), %rdi movl $0x4, %edx callq 0x169a0 jmp 0x2d29a movq 0x30(%rsp), %rsi addq $0x20, %rsi leaq 0x148(%rsp), %rdi movl $0x4, %edx callq 0x169a0 jmp 0x2d2b7 movq 0x30(%rsp), %rdi addq $0x28, %rdi leaq 0x148(%rsp), %rsi callq 0x32c80 jmp 0x2d2cf movq 0x30(%rsp), %rdi addq $0x60, %rdi leaq 0x148(%rsp), %rsi callq 0x32d40 jmp 0x2d2e7 leaq 0xe8fa6(%rip), %rax # 0x116294 movq %rax, 0xb8(%rsp) movq $0x27, 0xc0(%rsp) leaq 0x77(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x16d00 movq 0x8(%rsp), %rdx leaq 0xe8f9f(%rip), %rsi # 0x1162bc leaq 0x78(%rsp), %rdi callq 0x1dbb0 jmp 0x2d329 leaq 0x4f(%rsp), %rdi movq %rdi, (%rsp) callq 0x16d00 movq (%rsp), %rdx leaq 0xe87c5(%rip), %rsi # 0x115b07 leaq 0x50(%rsp), %rdi callq 0x1dbb0 jmp 0x2d34e leaq 0x98(%rsp), %rdi leaq 0x78(%rsp), %rsi leaq 0x50(%rsp), %rdx callq 0x28ab0 jmp 0x2d367 movl $0xf3, 0x48(%rsp) movq 0x348(%rsp), %r8 movq 0xb8(%rsp), %rdi movq 0xc0(%rsp), %rsi leaq 0x98(%rsp), %rdx leaq 0x48(%rsp), %rcx callq 0x32dd0 jmp 0x2d39b leaq 0x98(%rsp), %rdi callq 0x1dfd0 leaq 0x50(%rsp), %rdi callq 0x1dfd0 leaq 0x4f(%rsp), %rdi callq 0x16790 leaq 0x78(%rsp), %rdi callq 0x1dfd0 leaq 0x77(%rsp), %rdi callq 0x16790 leaq 0x148(%rsp), %rdi callq 0x16b20 addq $0x358, %rsp # imm = 0x358 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x118(%rsp) movl %eax, 0x114(%rsp) jmp 0x2d466 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x118(%rsp) movl %eax, 0x114(%rsp) jmp 0x2d452 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x118(%rsp) movl %eax, 0x114(%rsp) jmp 0x2d448 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x118(%rsp) movl %eax, 0x114(%rsp) leaq 0x98(%rsp), %rdi callq 0x1dfd0 leaq 0x50(%rsp), %rdi callq 0x1dfd0 leaq 0x4f(%rsp), %rdi callq 0x16790 leaq 0x78(%rsp), %rdi callq 0x1dfd0 leaq 0x77(%rsp), %rdi callq 0x16790 leaq 0x148(%rsp), %rdi callq 0x16b20 movq 0x118(%rsp), %rdi callq 0x16cf0 nopw (%rax,%rax)
_ZN5alaya8SQ4SpaceIffjNS_17SequentialStorageIhjEEE4saveERSt17basic_string_viewIcSt11char_traitsIcEE: sub rsp, 358h mov qword ptr [rsp+358h+var_8], rdi mov qword ptr [rsp+358h+var_10], rsi mov rax, qword ptr [rsp+358h+var_8] mov [rsp+358h+var_328], rax; int mov rax, qword ptr [rsp+358h+var_10] mov qword ptr [rsp+358h+var_320], rax; int lea rdi, [rsp+358h+var_231] mov [rsp+358h+var_318], rdi; __int64 call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, qword ptr [rsp+358h+var_320] mov rdx, [rsp+358h+var_318] lea rdi, [rsp+358h+var_231+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ISt17basic_string_viewIcS2_EvEERKT_RKS3_; std::string::basic_string<std::string_view,void>(std::string_view const&,std::allocator<char> const&) jmp short $+2 loc_2D02C: lea rdi, [rsp+358h+var_210] lea rsi, [rsp+358h+var_231+1] mov edx, 4 call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ofstream::basic_ofstream(std::string const&,std::_Ios_Openmode) jmp short $+2 loc_2D048: lea rdi, [rsp+358h+var_231+1]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+358h+var_231] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+358h+var_210] call __ZNSt14basic_ofstreamIcSt11char_traitsIcEE7is_openEv; std::ofstream::is_open(void) mov [rsp+358h+var_329], al jmp short $+2 loc_2D075: mov al, [rsp+358h+var_329] test al, 1 jnz loc_2D20D jmp short $+2 loc_2D083: mov [rsp+358h+var_28A], 1 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov [rsp+358h+var_348], rax mov rax, qword ptr [rsp+358h+var_10] mov [rsp+358h+var_340], rax lea rdi, [rsp+358h+var_289] mov [rsp+358h+var_338], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rsp+358h+var_340] mov rdx, [rsp+358h+var_338] lea rdi, [rsp+358h+var_288] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ISt17basic_string_viewIcS2_EvEERKT_RKS3_; std::string::basic_string<std::string_view,void>(std::string_view const&,std::allocator<char> const&) jmp short $+2 loc_2D0D2: lea rsi, aCannotOpenFile; "Cannot open file " lea rdi, [rsp+358h+var_268] lea rdx, [rsp+358h+var_288] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) jmp short $+2 loc_2D0F0: mov rdi, [rsp+358h+var_348] lea rsi, [rsp+358h+var_268] call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) jmp short $+2 loc_2D104: mov rdi, [rsp+358h+var_348]; void * mov [rsp+358h+var_28A], 0 mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp loc_2D48A mov rcx, rax mov eax, edx mov [rsp+arg_110], rcx mov [rsp+arg_10C], eax jmp short loc_2D160 mov rcx, rax mov eax, edx mov [rsp+arg_110], rcx mov [rsp+arg_10C], eax lea rdi, [rsp+arg_120]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_2D160: lea rdi, [rsp+arg_11F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_2D47D mov rcx, rax mov eax, edx mov [rsp+arg_110], rcx mov [rsp+arg_10C], eax jmp loc_2D470 mov rcx, rax mov eax, edx mov [rsp+arg_110], rcx mov [rsp+arg_10C], eax jmp short loc_2D1E5 mov rcx, rax mov eax, edx mov [rsp+arg_110], rcx mov [rsp+arg_10C], eax jmp short loc_2D1D8 mov rcx, rax mov eax, edx mov [rsp+arg_110], rcx mov [rsp+arg_10C], eax lea rdi, [rsp+arg_E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_2D1D8: lea rdi, [rsp+arg_C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_2D1E5: lea rdi, [rsp+arg_C7] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() test [rsp+arg_C6], 1 jnz short loc_2D1FE jmp short loc_2D208 loc_2D1FE: mov rdi, [rsp+arg_8]; void * call ___cxa_free_exception loc_2D208: jmp loc_2D470 loc_2D20D: mov rsi, [rsp+358h+var_328]; char * lea rdi, [rsp+358h+var_210]; this mov edx, 4; __int64 call __ZNSo5writeEPKcl; std::ostream::write(char const*,long) jmp short $+2 loc_2D226: mov rsi, [rsp+358h+var_328] add rsi, 10h; char * lea rdi, [rsp+358h+var_210]; this mov edx, 4; __int64 call __ZNSo5writeEPKcl; std::ostream::write(char const*,long) jmp short $+2 loc_2D243: mov rsi, [rsp+358h+var_328] add rsi, 14h; char * lea rdi, [rsp+358h+var_210]; this mov edx, 4; __int64 call __ZNSo5writeEPKcl; std::ostream::write(char const*,long) jmp short $+2 loc_2D260: mov rsi, [rsp+358h+var_328] add rsi, 18h; char * lea rdi, [rsp+358h+var_210]; this mov edx, 4; __int64 call __ZNSo5writeEPKcl; std::ostream::write(char const*,long) jmp short $+2 loc_2D27D: mov rsi, [rsp+358h+var_328] add rsi, 1Ch; char * lea rdi, [rsp+358h+var_210]; this mov edx, 4; __int64 call __ZNSo5writeEPKcl; std::ostream::write(char const*,long) jmp short $+2 loc_2D29A: mov rsi, [rsp+358h+var_328] add rsi, 20h ; ' '; char * lea rdi, [rsp+358h+var_210]; this mov edx, 4; __int64 call __ZNSo5writeEPKcl; std::ostream::write(char const*,long) jmp short $+2 loc_2D2B7: mov rdi, [rsp+358h+var_328] add rdi, 28h ; '(' lea rsi, [rsp+358h+var_210] call _ZNK5alaya17SequentialStorageIhjE4saveERSt14basic_ofstreamIcSt11char_traitsIcEE; alaya::SequentialStorage<uchar,uint>::save(std::ofstream &) jmp short $+2 loc_2D2CF: mov rdi, [rsp+358h+var_328] add rdi, 60h ; '`' lea rsi, [rsp+358h+var_210] call _ZNK5alaya12SQ4QuantizerIfE4saveERSt14basic_ofstreamIcSt11char_traitsIcEE; alaya::SQ4Quantizer<float>::save(std::ofstream &) jmp short $+2 loc_2D2E7: lea rax, aAlayaSq4spaceI; "[Alaya] [{}:{}] SQ4Space is saved to {}" mov [rsp+358h+var_2A0], rax mov [rsp+358h+var_298], 27h ; ''' lea rdi, [rsp+358h+var_2E1] mov qword ptr [rsp+358h+var_350], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, qword ptr [rsp+358h+var_350] lea rsi, aWorkspaceLlm4b_7; "/workspace/llm4binary/github2025/AlayaL"... lea rdi, [rsp+358h+var_2E1+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_2D329: lea rdi, [rsp+358h+var_309] mov qword ptr [rsp+358h+var_358], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, qword ptr [rsp+358h+var_358] lea rsi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github2025/AlayaL"... lea rdi, [rsp+358h+var_309+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_2D34E: lea rdi, [rsp+358h+var_2C0]; std::filesystem::__cxx11::path::_List * lea rsi, [rsp+358h+var_2E1+1] lea rdx, [rsp+358h+var_309+1] call _Z17get_relative_pathRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_; get_relative_path(std::string const&,std::string const&) jmp short $+2 loc_2D367: mov [rsp+358h+var_310], 0F3h mov r8, qword ptr [rsp+358h+var_10] mov rdi, [rsp+358h+var_2A0] mov rsi, [rsp+358h+var_298] lea rdx, [rsp+358h+var_2C0] lea rcx, [rsp+358h+var_310] call _ZN6spdlog4infoIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiRSt17basic_string_viewIcS4_EEEEvN3fmt3v1019basic_format_stringIcJDpNSB_13type_identityIT_E4typeEEEEDpOSE_; spdlog::info<std::string,int,std::string_view &>(fmt::v10::basic_format_string<char,fmt::v10::type_identity<std::string,int,std::string_view &>::type>,std::string,int,std::string_view &&&) jmp short $+2 loc_2D39B: lea rdi, [rsp+358h+var_2C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+358h+var_309+1]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+358h+var_309] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+358h+var_2E1+1]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+358h+var_2E1] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+358h+var_210] call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream() add rsp, 358h retn mov rcx, rax mov eax, edx mov [rsp+arg_110], rcx mov [rsp+arg_10C], eax jmp short loc_2D466 mov rcx, rax mov eax, edx mov [rsp+arg_110], rcx mov [rsp+arg_10C], eax jmp short loc_2D452 mov rcx, rax mov eax, edx mov [rsp+arg_110], rcx mov [rsp+arg_10C], eax jmp short loc_2D448 mov rcx, rax mov eax, edx mov [rsp+arg_110], rcx mov [rsp+arg_10C], eax lea rdi, [rsp+arg_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_2D448: lea rdi, [rsp+arg_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_2D452: lea rdi, [rsp+arg_47] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+arg_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_2D466: lea rdi, [rsp+arg_6F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() loc_2D470: lea rdi, [rsp+arg_140] call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream() loc_2D47D: mov rdi, [rsp+arg_110] call __Unwind_Resume loc_2D48A: nop word ptr [rax+rax+00h]
long long alaya::SQ4Space<float,float,unsigned int,alaya::SequentialStorage<unsigned char,unsigned int>>::save( const char *a1, _QWORD *a2) { int v2; // ecx int v3; // r8d int v4; // r9d long long v5; // rsi void *exception; // [rsp+10h] [rbp-348h] _QWORD *v8; // [rsp+18h] [rbp-340h] int v9; // [rsp+48h] [rbp-310h] BYREF int v10[10]; // [rsp+4Fh] [rbp-309h] BYREF int v11[8]; // [rsp+77h] [rbp-2E1h] BYREF _BYTE v12[32]; // [rsp+98h] [rbp-2C0h] BYREF const char *v13; // [rsp+B8h] [rbp-2A0h] long long v14; // [rsp+C0h] [rbp-298h] char v15; // [rsp+CEh] [rbp-28Ah] char v16; // [rsp+CFh] [rbp-289h] BYREF _BYTE v17[32]; // [rsp+D0h] [rbp-288h] BYREF _BYTE v18[55]; // [rsp+F0h] [rbp-268h] BYREF long long v19[4]; // [rsp+127h] [rbp-231h] BYREF _BYTE v20[512]; // [rsp+148h] [rbp-210h] BYREF int v21[2]; // [rsp+348h] [rbp-10h] int v22[2]; // [rsp+350h] [rbp-8h] *(_QWORD *)v22 = a1; *(_QWORD *)v21 = a2; std::allocator<char>::allocator(); std::string::basic_string<std::string_view,void>((long long)v19 + 1, a2, (long long)v19); std::ofstream::basic_ofstream(v20, (char *)v19 + 1, 4LL); std::string::~string((char *)v19 + 1); std::allocator<char>::~allocator(v19, (char *)v19 + 1); if ( (std::ofstream::is_open(v20) & 1) == 0 ) { exception = __cxa_allocate_exception(0x10uLL); v8 = *(_QWORD **)v21; std::allocator<char>::allocator(); std::string::basic_string<std::string_view,void>((long long)v17, v8, (long long)&v16); std::operator+<char>(v18, "Cannot open file ", v17); std::runtime_error::runtime_error(exception, v18); v15 = 0; __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } std::ostream::write((std::ostream *)v20, a1, 4LL); std::ostream::write((std::ostream *)v20, a1 + 16, 4LL); std::ostream::write((std::ostream *)v20, a1 + 20, 4LL); std::ostream::write((std::ostream *)v20, a1 + 24, 4LL); std::ostream::write((std::ostream *)v20, a1 + 28, 4LL); std::ostream::write((std::ostream *)v20, a1 + 32, 4LL); alaya::SequentialStorage<unsigned char,unsigned int>::save(a1 + 40, v20); alaya::SQ4Quantizer<float>::save(a1 + 96, v20); v13 = "[Alaya] [{}:{}] SQ4Space is saved to {}"; v14 = 39LL; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>( (long long)v11 + 1, (long long)"/workspace/llm4binary/github2025/AlayaLite/include/space/sq4_space.hpp", (long long)v11); std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>( (long long)v10 + 1, (long long)"/workspace/llm4binary/github2025/AlayaLite", (long long)v10); get_relative_path((std::filesystem::__cxx11::path::_List *)v12, (long long)v11 + 1, (long long)v10 + 1, v2, v3, v4); v9 = 243; v5 = v14; spdlog::info<std::string,int,std::string_view &>(v13, v14, v12, &v9, *(_QWORD *)v21); std::string::~string(v12); std::string::~string((char *)v10 + 1); std::allocator<char>::~allocator(v10, v5); std::string::~string((char *)v11 + 1); std::allocator<char>::~allocator(v11, v5); return std::ofstream::~ofstream(v20); }
save: SUB RSP,0x358 MOV qword ptr [RSP + 0x350],RDI MOV qword ptr [RSP + 0x348],RSI MOV RAX,qword ptr [RSP + 0x350] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x348] MOV qword ptr [RSP + 0x38],RAX LEA RDI,[RSP + 0x127] MOV qword ptr [RSP + 0x40],RDI CALL 0x00116d00 MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] LAB_0012d01d: LEA RDI,[RSP + 0x128] CALL 0x0012a8f0 JMP 0x0012d02c LAB_0012d02c: LEA RDI,[RSP + 0x148] LEA RSI,[RSP + 0x128] MOV EDX,0x4 CALL 0x00116e40 JMP 0x0012d048 LAB_0012d048: LEA RDI,[RSP + 0x128] CALL 0x0011dfd0 LEA RDI,[RSP + 0x127] CALL 0x00116790 LAB_0012d062: LEA RDI,[RSP + 0x148] CALL 0x00116530 LAB_0012d06f: MOV byte ptr [RSP + 0x2f],AL JMP 0x0012d075 LAB_0012d075: MOV AL,byte ptr [RSP + 0x2f] TEST AL,0x1 JNZ 0x0012d20d JMP 0x0012d083 LAB_0012d083: MOV byte ptr [RSP + 0xce],0x1 MOV EDI,0x10 CALL 0x00116310 MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x348] MOV qword ptr [RSP + 0x18],RAX LEA RDI,[RSP + 0xcf] MOV qword ptr [RSP + 0x20],RDI CALL 0x00116d00 MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] LAB_0012d0c3: LEA RDI,[RSP + 0xd0] CALL 0x0012a8f0 JMP 0x0012d0d2 LAB_0012d0d2: LEA RSI,[0x216282] LEA RDI,[RSP + 0xf0] LEA RDX,[RSP + 0xd0] CALL 0x00132c30 JMP 0x0012d0f0 LAB_0012d0f0: MOV RDI,qword ptr [RSP + 0x10] LEA RSI,[RSP + 0xf0] CALL 0x00116c00 JMP 0x0012d104 LAB_0012d104: MOV RDI,qword ptr [RSP + 0x10] MOV byte ptr [RSP + 0xce],0x0 MOV RSI,qword ptr [0x00284ff0] MOV RDX,qword ptr [0x00284f50] CALL 0x00116ca0 LAB_0012d20d: MOV RSI,qword ptr [RSP + 0x30] LEA RDI,[RSP + 0x148] MOV EDX,0x4 CALL 0x001169a0 JMP 0x0012d226 LAB_0012d226: MOV RSI,qword ptr [RSP + 0x30] ADD RSI,0x10 LEA RDI,[RSP + 0x148] MOV EDX,0x4 CALL 0x001169a0 JMP 0x0012d243 LAB_0012d243: MOV RSI,qword ptr [RSP + 0x30] ADD RSI,0x14 LEA RDI,[RSP + 0x148] MOV EDX,0x4 CALL 0x001169a0 JMP 0x0012d260 LAB_0012d260: MOV RSI,qword ptr [RSP + 0x30] ADD RSI,0x18 LEA RDI,[RSP + 0x148] MOV EDX,0x4 CALL 0x001169a0 JMP 0x0012d27d LAB_0012d27d: MOV RSI,qword ptr [RSP + 0x30] ADD RSI,0x1c LEA RDI,[RSP + 0x148] MOV EDX,0x4 CALL 0x001169a0 JMP 0x0012d29a LAB_0012d29a: MOV RSI,qword ptr [RSP + 0x30] ADD RSI,0x20 LEA RDI,[RSP + 0x148] MOV EDX,0x4 CALL 0x001169a0 JMP 0x0012d2b7 LAB_0012d2b7: MOV RDI,qword ptr [RSP + 0x30] ADD RDI,0x28 LEA RSI,[RSP + 0x148] CALL 0x00132c80 JMP 0x0012d2cf LAB_0012d2cf: MOV RDI,qword ptr [RSP + 0x30] ADD RDI,0x60 LEA RSI,[RSP + 0x148] CALL 0x00132d40 JMP 0x0012d2e7 LAB_0012d2e7: LEA RAX,[0x216294] MOV qword ptr [RSP + 0xb8],RAX MOV qword ptr [RSP + 0xc0],0x27 LEA RDI,[RSP + 0x77] MOV qword ptr [RSP + 0x8],RDI CALL 0x00116d00 MOV RDX,qword ptr [RSP + 0x8] LAB_0012d316: LEA RSI,[0x2162bc] LEA RDI,[RSP + 0x78] CALL 0x0011dbb0 JMP 0x0012d329 LAB_0012d329: LEA RDI,[RSP + 0x4f] MOV qword ptr [RSP],RDI CALL 0x00116d00 MOV RDX,qword ptr [RSP] LAB_0012d33b: LEA RSI,[0x215b07] LEA RDI,[RSP + 0x50] CALL 0x0011dbb0 JMP 0x0012d34e LAB_0012d34e: LEA RDI,[RSP + 0x98] LEA RSI,[RSP + 0x78] LEA RDX,[RSP + 0x50] CALL 0x00128ab0 JMP 0x0012d367 LAB_0012d367: MOV dword ptr [RSP + 0x48],0xf3 MOV R8,qword ptr [RSP + 0x348] MOV RDI,qword ptr [RSP + 0xb8] MOV RSI,qword ptr [RSP + 0xc0] LAB_0012d387: LEA RDX,[RSP + 0x98] LEA RCX,[RSP + 0x48] CALL 0x00132dd0 LAB_0012d399: JMP 0x0012d39b LAB_0012d39b: LEA RDI,[RSP + 0x98] CALL 0x0011dfd0 LEA RDI,[RSP + 0x50] CALL 0x0011dfd0 LEA RDI,[RSP + 0x4f] CALL 0x00116790 LEA RDI,[RSP + 0x78] CALL 0x0011dfd0 LEA RDI,[RSP + 0x77] CALL 0x00116790 LEA RDI,[RSP + 0x148] CALL 0x00116b20 ADD RSP,0x358 RET
/* alaya::SQ4Space<float, float, unsigned int, alaya::SequentialStorage<unsigned char, unsigned int> >::save(std::basic_string_view<char, std::char_traits<char> >&) */ void __thiscall alaya::SQ4Space<float,float,unsigned_int,alaya::SequentialStorage<unsigned_char,unsigned_int>>::save (SQ4Space<float,float,unsigned_int,alaya::SequentialStorage<unsigned_char,unsigned_int>> *this,basic_string_view *param_1) { basic_string_view *pbVar1; byte bVar2; runtime_error *this_00; int4 local_310; allocator local_309; string local_308 [39]; allocator local_2e1; string local_2e0 [32]; string local_2c0 [32]; spdlog *local_2a0; int8 local_298; int1 local_28a; allocator local_289; string local_288 [32]; string local_268 [55]; allocator local_231; string local_230 [32]; ofstream local_210 [512]; basic_string_view *local_10; SQ4Space<float,float,unsigned_int,alaya::SequentialStorage<unsigned_char,unsigned_int>> *local_8; local_10 = param_1; local_8 = this; std::allocator<char>::allocator(); /* try { // try from 0012d01d to 0012d029 has its CatchHandler @ 0012d129 */ std::__cxx11::string::string<std::basic_string_view<char,std::char_traits<char>>,void> (local_230,param_1,&local_231); /* try { // try from 0012d02c to 0012d045 has its CatchHandler @ 0012d13f */ std::ofstream::ofstream(local_210,local_230,4); std::__cxx11::string::~string(local_230); std::allocator<char>::~allocator((allocator<char> *)&local_231); /* try { // try from 0012d062 to 0012d06e has its CatchHandler @ 0012d172 */ bVar2 = std::ofstream::is_open(); if ((bVar2 & 1) == 0) { local_28a = 1; this_00 = (runtime_error *)__cxa_allocate_exception(0x10); pbVar1 = local_10; std::allocator<char>::allocator(); /* try { // try from 0012d0c3 to 0012d0cf has its CatchHandler @ 0012d18b */ std::__cxx11::string::string<std::basic_string_view<char,std::char_traits<char>>,void> (local_288,pbVar1,&local_289); /* try { // try from 0012d0d2 to 0012d0ed has its CatchHandler @ 0012d1a1 */ std::operator+((char *)local_268,(string *)"Cannot open file "); /* try { // try from 0012d0f0 to 0012d123 has its CatchHandler @ 0012d1b7 */ std::runtime_error::runtime_error(this_00,local_268); local_28a = 0; /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_00284ff0,PTR__runtime_error_00284f50); } /* try { // try from 0012d20d to 0012d2e4 has its CatchHandler @ 0012d172 */ std::ostream::write((char *)local_210,(long)this); std::ostream::write((char *)local_210,(long)(this + 0x10)); std::ostream::write((char *)local_210,(long)(this + 0x14)); std::ostream::write((char *)local_210,(long)(this + 0x18)); std::ostream::write((char *)local_210,(long)(this + 0x1c)); std::ostream::write((char *)local_210,(long)(this + 0x20)); SequentialStorage<unsigned_char,unsigned_int>::save ((SequentialStorage<unsigned_char,unsigned_int> *)(this + 0x28),local_210); SQ4Quantizer<float>::save((SQ4Quantizer<float> *)(this + 0x60),local_210); local_2a0 = (spdlog *)0x216294; local_298 = 0x27; std::allocator<char>::allocator(); /* try { // try from 0012d316 to 0012d326 has its CatchHandler @ 0012d3e5 */ std::__cxx11::string::string<std::allocator<char>> (local_2e0,"/workspace/llm4binary/github2025/AlayaLite/include/space/sq4_space.hpp", &local_2e1); std::allocator<char>::allocator(); /* try { // try from 0012d33b to 0012d34b has its CatchHandler @ 0012d3fb */ std::__cxx11::string::string<std::allocator<char>> (local_308,"/workspace/llm4binary/github2025/AlayaLite",&local_309); /* try { // try from 0012d34e to 0012d364 has its CatchHandler @ 0012d411 */ get_relative_path(local_2c0,local_2e0); local_310 = 0xf3; /* try { // try from 0012d387 to 0012d398 has its CatchHandler @ 0012d427 */ spdlog::info<std::__cxx11::string,int,std::basic_string_view<char,std::char_traits<char>>&> (local_2a0,local_298,local_2c0,&local_310,local_10); std::__cxx11::string::~string(local_2c0); std::__cxx11::string::~string(local_308); std::allocator<char>::~allocator((allocator<char> *)&local_309); std::__cxx11::string::~string(local_2e0); std::allocator<char>::~allocator((allocator<char> *)&local_2e1); std::ofstream::~ofstream(local_210); return; }
36,777
ma_hashtbl_search
eloqsql/libmariadb/libmariadb/ma_hashtbl.c
void* ma_hashtbl_search(MA_HASHTBL *hash,const uchar *key,uint length) { MA_HASHTBL_LINK *pos; uint flag,idx; flag=1; if (hash->records) { idx=hash_mask((*hash->calc_hashnr)(key,length ? length : hash->key_length), hash->blength,hash->records); do { pos= dynamic_element(&hash->array,idx,MA_HASHTBL_LINK*); if (!hashcmp(hash,pos,key,length)) { hash->current_record= idx; return (pos->data); } if (flag) { flag=0; /* Reset flag */ if (hash_rec_mask(hash,pos,hash->blength,hash->records) != idx) break; /* Wrong link */ } } while ((idx=pos->next) != NO_RECORD); } hash->current_record= NO_RECORD; return(0); }
O3
c
ma_hashtbl_search: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, -0x30(%rbp) movq %rdi, %rbx cmpl $0x0, 0x8(%rdi) je 0x3585c movl %edx, %r14d movq 0x40(%rbx), %rax movl %edx, %esi testl %edx, %edx jne 0x357e7 movl 0x4(%rbx), %esi movq -0x30(%rbp), %rdi callq *%rax movl 0xc(%rbx), %r12d leal -0x1(%r12), %ecx andl %eax, %ecx shrl %r12d decl %r12d andl %eax, %r12d cmpl 0x8(%rbx), %ecx cmovbl %ecx, %r12d xorl %r15d, %r15d movq 0x18(%rbx), %rax movl %r12d, %ecx shlq $0x4, %rcx leaq (%rax,%rcx), %r13 movq 0x8(%rax,%rcx), %rsi movq %rbx, %rdi movq -0x30(%rbp), %rdx movl %r14d, %ecx callq 0x3587e testl %eax, %eax je 0x35867 testb $0x1, %r15b jne 0x3584f movl 0x8(%rbx), %ecx movl 0xc(%rbx), %edx movq 0x8(%r13), %rsi movq %rbx, %rdi callq 0x358f4 cmpl %r12d, %eax jne 0x3585c movl (%r13), %r12d movb $0x1, %r15b cmpl $-0x1, %r12d jne 0x3580b movl $0xffffffff, 0x10(%rbx) # imm = 0xFFFFFFFF xorl %eax, %eax jmp 0x3586f movl %r12d, 0x10(%rbx) movq 0x8(%r13), %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ma_hashtbl_search: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov [rbp+var_30], rsi mov rbx, rdi cmp dword ptr [rdi+8], 0 jz loc_3585C mov r14d, edx mov rax, [rbx+40h] mov esi, edx test edx, edx jnz short loc_357E7 mov esi, [rbx+4] loc_357E7: mov rdi, [rbp+var_30] call rax mov r12d, [rbx+0Ch] lea ecx, [r12-1] and ecx, eax shr r12d, 1 dec r12d and r12d, eax cmp ecx, [rbx+8] cmovb r12d, ecx xor r15d, r15d loc_3580B: mov rax, [rbx+18h] mov ecx, r12d shl rcx, 4 lea r13, [rax+rcx] mov rsi, [rax+rcx+8] mov rdi, rbx mov rdx, [rbp+var_30] mov ecx, r14d call hashcmp test eax, eax jz short loc_35867 test r15b, 1 jnz short loc_3584F mov ecx, [rbx+8] mov edx, [rbx+0Ch] mov rsi, [r13+8] mov rdi, rbx call hash_rec_mask cmp eax, r12d jnz short loc_3585C loc_3584F: mov r12d, [r13+0] mov r15b, 1 cmp r12d, 0FFFFFFFFh jnz short loc_3580B loc_3585C: mov dword ptr [rbx+10h], 0FFFFFFFFh xor eax, eax jmp short loc_3586F loc_35867: mov [rbx+10h], r12d mov rax, [r13+8] loc_3586F: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_hashtbl_search(long long a1, long long a2, unsigned int a3) { long long v4; // rsi int v5; // eax unsigned int v6; // r12d unsigned int v7; // ecx unsigned int v8; // r12d char v9; // r15 long long v10; // r13 if ( *(_DWORD *)(a1 + 8) ) { v4 = a3; if ( !a3 ) v4 = *(unsigned int *)(a1 + 4); v5 = (*(long long ( **)(long long, long long))(a1 + 64))(a2, v4); v6 = *(_DWORD *)(a1 + 12); v7 = v5 & (v6 - 1); v8 = v5 & ((v6 >> 1) - 1); if ( v7 < *(_DWORD *)(a1 + 8) ) v8 = v7; v9 = 0; while ( 1 ) { v10 = *(_QWORD *)(a1 + 24) + 16LL * v8; if ( !(unsigned int)hashcmp(a1, *(_QWORD *)(v10 + 8), a2, a3) ) break; if ( (v9 & 1) != 0 || (unsigned int)hash_rec_mask(a1, *(_QWORD *)(v10 + 8), *(unsigned int *)(a1 + 12), *(unsigned int *)(a1 + 8)) == v8 ) { v8 = *(_DWORD *)v10; v9 = 1; if ( *(_DWORD *)v10 != -1 ) continue; } goto LABEL_11; } *(_DWORD *)(a1 + 16) = v8; return *(_QWORD *)(v10 + 8); } else { LABEL_11: *(_DWORD *)(a1 + 16) = -1; return 0LL; } }
ma_hashtbl_search: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV qword ptr [RBP + -0x30],RSI MOV RBX,RDI CMP dword ptr [RDI + 0x8],0x0 JZ 0x0013585c MOV R14D,EDX MOV RAX,qword ptr [RBX + 0x40] MOV ESI,EDX TEST EDX,EDX JNZ 0x001357e7 MOV ESI,dword ptr [RBX + 0x4] LAB_001357e7: MOV RDI,qword ptr [RBP + -0x30] CALL RAX MOV R12D,dword ptr [RBX + 0xc] LEA ECX,[R12 + -0x1] AND ECX,EAX SHR R12D,0x1 DEC R12D AND R12D,EAX CMP ECX,dword ptr [RBX + 0x8] CMOVC R12D,ECX XOR R15D,R15D LAB_0013580b: MOV RAX,qword ptr [RBX + 0x18] MOV ECX,R12D SHL RCX,0x4 LEA R13,[RAX + RCX*0x1] MOV RSI,qword ptr [RAX + RCX*0x1 + 0x8] MOV RDI,RBX MOV RDX,qword ptr [RBP + -0x30] MOV ECX,R14D CALL 0x0013587e TEST EAX,EAX JZ 0x00135867 TEST R15B,0x1 JNZ 0x0013584f MOV ECX,dword ptr [RBX + 0x8] MOV EDX,dword ptr [RBX + 0xc] MOV RSI,qword ptr [R13 + 0x8] MOV RDI,RBX CALL 0x001358f4 CMP EAX,R12D JNZ 0x0013585c LAB_0013584f: MOV R12D,dword ptr [R13] MOV R15B,0x1 CMP R12D,-0x1 JNZ 0x0013580b LAB_0013585c: MOV dword ptr [RBX + 0x10],0xffffffff XOR EAX,EAX JMP 0x0013586f LAB_00135867: MOV dword ptr [RBX + 0x10],R12D MOV RAX,qword ptr [R13 + 0x8] LAB_0013586f: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 ma_hashtbl_search(long param_1,int8 param_2,int param_3) { uint *puVar1; uint uVar2; int iVar3; uint uVar4; bool bVar5; if (*(int *)(param_1 + 8) != 0) { iVar3 = param_3; if (param_3 == 0) { iVar3 = *(int *)(param_1 + 4); } uVar2 = (**(code **)(param_1 + 0x40))(param_2,iVar3); uVar4 = *(uint *)(param_1 + 0xc) - 1 & uVar2; uVar2 = (*(uint *)(param_1 + 0xc) >> 1) - 1 & uVar2; if (uVar4 < *(uint *)(param_1 + 8)) { uVar2 = uVar4; } bVar5 = false; do { puVar1 = (uint *)(*(long *)(param_1 + 0x18) + (ulong)uVar2 * 0x10); iVar3 = hashcmp(param_1,*(int8 *)(*(long *)(param_1 + 0x18) + 8 + (ulong)uVar2 * 0x10), param_2,param_3); if (iVar3 == 0) { *(uint *)(param_1 + 0x10) = uVar2; return *(int8 *)(puVar1 + 2); } if ((!bVar5) && (uVar4 = hash_rec_mask(param_1,*(int8 *)(puVar1 + 2),*(int4 *)(param_1 + 0xc), *(int4 *)(param_1 + 8)), uVar4 != uVar2)) break; uVar2 = *puVar1; bVar5 = true; } while (uVar2 != 0xffffffff); } *(int4 *)(param_1 + 0x10) = 0xffffffff; return 0; }
36,778
ma_dynstr_realloc
eloqsql/libmariadb/libmariadb/ma_string.c
my_bool ma_dynstr_realloc(DYNAMIC_STRING *str, size_t additional_size) { if (!additional_size) return(FALSE); if (str->length + additional_size > str->max_length) { str->max_length=((str->length + additional_size+str->alloc_increment-1)/ str->alloc_increment)*str->alloc_increment; if (!(str->str=(char*) realloc(str->str,str->max_length))) return(TRUE); } return(FALSE); }
O0
c
ma_dynstr_realloc: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) jne 0x367bd movb $0x0, -0x1(%rbp) jmp 0x36836 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax addq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx cmpq 0x10(%rcx), %rax jbe 0x36832 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax addq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx addq 0x18(%rcx), %rax subq $0x1, %rax movq -0x10(%rbp), %rcx xorl %edx, %edx divq 0x18(%rcx) movq %rax, %rcx movq -0x10(%rbp), %rax imulq 0x18(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movq 0x10(%rax), %rsi callq 0x13700 movq -0x10(%rbp), %rcx movq %rax, (%rcx) cmpq $0x0, %rax jne 0x36830 movb $0x1, -0x1(%rbp) jmp 0x36836 jmp 0x36832 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nop
ma_dynstr_realloc: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi cmp [rbp+var_18], 0 jnz short loc_367BD mov [rbp+var_1], 0 jmp short loc_36836 loc_367BD: mov rax, [rbp+var_10] mov rax, [rax+8] add rax, [rbp+var_18] mov rcx, [rbp+var_10] cmp rax, [rcx+10h] jbe short loc_36832 mov rax, [rbp+var_10] mov rax, [rax+8] add rax, [rbp+var_18] mov rcx, [rbp+var_10] add rax, [rcx+18h] sub rax, 1 mov rcx, [rbp+var_10] xor edx, edx div qword ptr [rcx+18h] mov rcx, rax mov rax, [rbp+var_10] imul rcx, [rax+18h] mov rax, [rbp+var_10] mov [rax+10h], rcx mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_10] mov rsi, [rax+10h] call _realloc mov rcx, [rbp+var_10] mov [rcx], rax cmp rax, 0 jnz short loc_36830 mov [rbp+var_1], 1 jmp short loc_36836 loc_36830: jmp short $+2 loc_36832: mov [rbp+var_1], 0 loc_36836: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
bool ma_dynstr_realloc(long long *a1, long long a2) { long long v2; // rax char v4; // [rsp+1Fh] [rbp-1h] if ( a2 ) { v4 = 0; if ( a2 + a1[1] > (unsigned long long)a1[2] ) { a1[2] = a1[3] * ((a1[3] + a2 + a1[1] - 1) / (unsigned long long)a1[3]); v2 = realloc(*a1, a1[2]); *a1 = v2; if ( !v2 ) return 1; } } else { return 0; } return v4; }
ma_dynstr_realloc: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI CMP qword ptr [RBP + -0x18],0x0 JNZ 0x001367bd MOV byte ptr [RBP + -0x1],0x0 JMP 0x00136836 LAB_001367bd: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] ADD RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x10] JBE 0x00136832 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] ADD RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RCX + 0x18] SUB RAX,0x1 MOV RCX,qword ptr [RBP + -0x10] XOR EDX,EDX DIV qword ptr [RCX + 0x18] MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] IMUL RCX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x10] CALL 0x00113700 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX],RAX CMP RAX,0x0 JNZ 0x00136830 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00136836 LAB_00136830: JMP 0x00136832 LAB_00136832: MOV byte ptr [RBP + -0x1],0x0 LAB_00136836: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 ma_dynstr_realloc(int8 *param_1,long param_2) { void *pvVar1; if ((param_2 != 0) && ((ulong)param_1[2] < (ulong)(param_1[1] + param_2))) { param_1[2] = (((param_1[1] + param_2 + param_1[3]) - 1U) / (ulong)param_1[3]) * param_1[3]; pvVar1 = realloc((void *)*param_1,param_1[2]); *param_1 = pvVar1; if (pvVar1 == (void *)0x0) { return 1; } } return 0; }
36,779
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::key() const
monkey531[P]llama/common/json.hpp
const string_type& key() const { JSON_ASSERT(anchor.m_object != nullptr); switch (anchor.m_object->type()) { // use integer array index as key case value_t::array: { if (array_index != array_index_last) { int_to_string( array_index_str, array_index ); array_index_last = array_index; } return array_index_str; } // use key from the object case value_t::object: return anchor.key(); // use an empty key for all primitive types case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: return empty_str; } }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::key() const: pushq %rbx movq (%rdi), %rax testq %rax, %rax je 0x71954 movq %rdi, %rbx movzbl (%rax), %eax cmpl $0x1, %eax je 0x71942 cmpl $0x2, %eax jne 0x7194b movq 0x20(%rbx), %rsi cmpq 0x28(%rbx), %rsi je 0x7193c leaq 0x30(%rbx), %rdi callq 0x71a09 movq 0x20(%rbx), %rax movq %rax, 0x28(%rbx) addq $0x30, %rbx jmp 0x7194f movq %rbx, %rdi popq %rbx jmp 0x71aca addq $0x50, %rbx movq %rbx, %rax popq %rbx retq leaq 0x3adac(%rip), %rdi # 0xac707 leaq 0x3955f(%rip), %rdx # 0xaaec1 leaq 0x3d515(%rip), %rcx # 0xaee7e movl $0x1491, %esi # imm = 0x1491 xorl %eax, %eax callq 0x18ad0 nop
_ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv: push rbx mov rax, [rdi] test rax, rax jz short loc_71954 mov rbx, rdi movzx eax, byte ptr [rax] cmp eax, 1 jz short loc_71942 cmp eax, 2 jnz short loc_7194B mov rsi, [rbx+20h] cmp rsi, [rbx+28h] jz short loc_7193C lea rdi, [rbx+30h] call _ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m; nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(std::string &,ulong) mov rax, [rbx+20h] mov [rbx+28h], rax loc_7193C: add rbx, 30h ; '0' jmp short loc_7194F loc_71942: mov rdi, rbx pop rbx jmp _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv; 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>>::key(void) loc_7194B: add rbx, 50h ; 'P' loc_7194F: mov rax, rbx pop rbx retn loc_71954: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN; "anchor.m_object != nullptr" mov esi, 1491h xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::key( unsigned __int8 **a1) { int v1; // eax if ( *a1 ) { v1 = **a1; if ( v1 == 1 ) { return 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>>::key(a1); } else { if ( v1 != 2 ) return (long long)(a1 + 10); if ( a1[4] != a1[5] ) { nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(a1 + 6); a1[5] = a1[4]; } return (long long)(a1 + 6); } } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 5265LL, "GGML_ASSERT(%s) failed", "anchor.m_object != nullptr"); return nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::~iteration_proxy_value("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"); } }
key: PUSH RBX MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x00171954 MOV RBX,RDI MOVZX EAX,byte ptr [RAX] CMP EAX,0x1 JZ 0x00171942 CMP EAX,0x2 JNZ 0x0017194b MOV RSI,qword ptr [RBX + 0x20] CMP RSI,qword ptr [RBX + 0x28] JZ 0x0017193c LEA RDI,[RBX + 0x30] CALL 0x00171a09 MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [RBX + 0x28],RAX LAB_0017193c: ADD RBX,0x30 JMP 0x0017194f LAB_00171942: MOV RDI,RBX POP RBX JMP 0x00171aca LAB_0017194b: ADD RBX,0x50 LAB_0017194f: MOV RAX,RBX POP RBX RET LAB_00171954: LEA RDI,[0x1ac707] LEA RDX,[0x1aaec1] LEA RCX,[0x1aee7e] MOV ESI,0x1491 XOR EAX,EAX CALL 0x00118ad0
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > >::key() const */ iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> * __thiscall nlohmann::json_abi_v3_11_3::detail:: iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::key(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *this) { char cVar1; iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *piVar2; if (*(char **)this == (char *)0x0) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1491, "GGML_ASSERT(%s) failed","anchor.m_object != nullptr"); } cVar1 = **(char **)this; if (cVar1 != '\x01') { if (cVar1 == '\x02') { if (*(ulong *)(this + 0x20) != *(ulong *)(this + 0x28)) { int_to_string<std::__cxx11::string>((string *)(this + 0x30),*(ulong *)(this + 0x20)); *(int8 *)(this + 0x28) = *(int8 *)(this + 0x20); } piVar2 = this + 0x30; } else { piVar2 = this + 0x50; } return piVar2; } piVar2 = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *)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>> ::key((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)this); return piVar2; }
36,780
my_wc_mb_tis620
eloqsql/strings/ctype-tis620.c
static int my_wc_mb_tis620(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *str, uchar *end __attribute__((unused))) { const uchar *pl; if (str >= end) return MY_CS_TOOSMALL; pl= uni_to_cs[(wc>>8) & 0xFF]; str[0]= pl ? pl[wc & 0xFF] : '\0'; return (!str[0] && wc) ? MY_CS_ILUNI : 1; }
O3
c
my_wc_mb_tis620: movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x39d8e pushq %rbp movq %rsp, %rbp pushq %rbx movq %rsi, %rbx movzbl %bh, %eax leaq 0x2af429(%rip), %rcx # 0x2e9190 movq (%rcx,%rax,8), %rax testq %rax, %rax je 0x39d78 movzbl %bl, %ecx movb (%rax,%rcx), %al jmp 0x39d7a xorl %eax, %eax movb %al, (%rdx) testb %al, %al setne %al testq %rbx, %rbx sete %cl orb %al, %cl movzbl %cl, %eax popq %rbx popq %rbp retq
my_wc_mb_tis620: mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short locret_39D8E push rbp mov rbp, rsp push rbx mov rbx, rsi movzx eax, bh lea rcx, uni_to_cs_0 mov rax, [rcx+rax*8] test rax, rax jz short loc_39D78 movzx ecx, bl mov al, [rax+rcx] jmp short loc_39D7A loc_39D78: xor eax, eax loc_39D7A: mov [rdx], al test al, al setnz al test rbx, rbx setz cl or cl, al movzx eax, cl pop rbx pop rbp locret_39D8E: retn
long long my_wc_mb_tis620(long long a1, long long a2, _BYTE *a3, unsigned long long a4) { long long result; // rax long long v5; // rax char v6; // al result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { v5 = (long long)*(&uni_to_cs_0 + BYTE1(a2)); if ( v5 ) v6 = *(_BYTE *)(v5 + (unsigned __int8)a2); else v6 = 0; *a3 = v6; return (v6 != 0) | (unsigned __int8)(a2 == 0); } return result; }
my_wc_mb_tis620: MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x00139d8e PUSH RBP MOV RBP,RSP PUSH RBX MOV RBX,RSI MOVZX EAX,BH LEA RCX,[0x3e9190] MOV RAX,qword ptr [RCX + RAX*0x8] TEST RAX,RAX JZ 0x00139d78 MOVZX ECX,BL MOV AL,byte ptr [RAX + RCX*0x1] JMP 0x00139d7a LAB_00139d78: XOR EAX,EAX LAB_00139d7a: MOV byte ptr [RDX],AL TEST AL,AL SETNZ AL TEST RBX,RBX SETZ CL OR CL,AL MOVZX EAX,CL POP RBX POP RBP LAB_00139d8e: RET
ulong my_wc_mb_tis620(int8 param_1,ulong param_2,char *param_3,char *param_4) { char cVar1; ulong uVar2; uVar2 = 0xffffff9b; if (param_3 < param_4) { if (*(long *)(uni_to_cs + (param_2 >> 8 & 0xff) * 8) == 0) { cVar1 = '\0'; } else { cVar1 = *(char *)(*(long *)(uni_to_cs + (param_2 >> 8 & 0xff) * 8) + (param_2 & 0xff)); } *param_3 = cVar1; uVar2 = (ulong)(param_2 == 0 || cVar1 != '\0'); } return uVar2; }
36,781
hex_to_bytes
corpus-core[P]colibri-stateless/src/util/bytes.c
int hex_to_bytes(const char* hexstring, int len, bytes_t buffer) { size_t hex_len = len == -1 ? strlen(hexstring) : (size_t) len; if (!hexstring || !buffer.data) return -1; int dst_offset = hex_len % 2; int src_offset = (hexstring[0] == '0' && hexstring[1] == 'x') ? 2 : 0; if (dst_offset) buffer.data[0] = hexchar_to_int(hexstring[src_offset++]); if ((hex_len - src_offset) % 2 || (buffer.len - dst_offset) < (hex_len - src_offset) / 2) return -1; for (size_t i = src_offset; i < hex_len; i += 2) { int high = hexchar_to_int(hexstring[i]); int low = hexchar_to_int(hexstring[i + 1]); if (high == -1 || low == -1) return -1; buffer.data[dst_offset++] = (high << 4) | low; } return dst_offset; }
O0
c
hex_to_bytes: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movl %edx, -0x18(%rbp) movq %rcx, -0x10(%rbp) movq %rdi, -0x20(%rbp) movl %esi, -0x24(%rbp) cmpl $-0x1, -0x24(%rbp) jne 0x9e3bb movq -0x20(%rbp), %rdi callq 0x23220 movq %rax, -0x50(%rbp) jmp 0x9e3c3 movslq -0x24(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x30(%rbp) cmpq $0x0, -0x20(%rbp) je 0x9e3d9 cmpq $0x0, -0x10(%rbp) jne 0x9e3e5 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x9e50e movq -0x30(%rbp), %rax andq $0x1, %rax movl %eax, -0x34(%rbp) movq -0x20(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x30, %ecx movb %al, -0x51(%rbp) jne 0x9e412 movq -0x20(%rbp), %rax movsbl 0x1(%rax), %eax cmpl $0x78, %eax sete %al movb %al, -0x51(%rbp) movb -0x51(%rbp), %dl xorl %eax, %eax movl $0x2, %ecx testb $0x1, %dl cmovnel %ecx, %eax movl %eax, -0x38(%rbp) cmpl $0x0, -0x34(%rbp) je 0x9e44e movq -0x20(%rbp), %rax movl -0x38(%rbp), %ecx movl %ecx, %edx addl $0x1, %edx movl %edx, -0x38(%rbp) movslq %ecx, %rcx movsbl (%rax,%rcx), %edi callq 0x9e520 movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) movq -0x30(%rbp), %rax movslq -0x38(%rbp), %rcx subq %rcx, %rax andq $0x1, %rax cmpq $0x0, %rax jne 0x9e47e movl -0x18(%rbp), %eax subl -0x34(%rbp), %eax movl %eax, %eax movq -0x30(%rbp), %rcx movslq -0x38(%rbp), %rdx subq %rdx, %rcx shrq %rcx cmpq %rcx, %rax jae 0x9e48a movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x9e50e movslq -0x38(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x9e508 movq -0x20(%rbp), %rax movq -0x40(%rbp), %rcx movsbl (%rax,%rcx), %edi callq 0x9e520 movl %eax, -0x44(%rbp) movq -0x20(%rbp), %rax movq -0x40(%rbp), %rcx movsbl 0x1(%rax,%rcx), %edi callq 0x9e520 movl %eax, -0x48(%rbp) cmpl $-0x1, -0x44(%rbp) je 0x9e4d1 cmpl $-0x1, -0x48(%rbp) jne 0x9e4da movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x9e50e movl -0x44(%rbp), %eax shll $0x4, %eax orl -0x48(%rbp), %eax movb %al, %dl movq -0x10(%rbp), %rax movl -0x34(%rbp), %ecx movl %ecx, %esi addl $0x1, %esi movl %esi, -0x34(%rbp) movslq %ecx, %rcx movb %dl, (%rax,%rcx) movq -0x40(%rbp), %rax addq $0x2, %rax movq %rax, -0x40(%rbp) jmp 0x9e492 movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw (%rax,%rax)
hex_to_bytes: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_18], edx mov [rbp+var_10], rcx mov [rbp+var_20], rdi mov [rbp+var_24], esi cmp [rbp+var_24], 0FFFFFFFFh jnz short loc_9E3BB mov rdi, [rbp+var_20] call _strlen mov [rbp+var_50], rax jmp short loc_9E3C3 loc_9E3BB: movsxd rax, [rbp+var_24] mov [rbp+var_50], rax loc_9E3C3: mov rax, [rbp+var_50] mov [rbp+var_30], rax cmp [rbp+var_20], 0 jz short loc_9E3D9 cmp [rbp+var_10], 0 jnz short loc_9E3E5 loc_9E3D9: mov [rbp+var_4], 0FFFFFFFFh jmp loc_9E50E loc_9E3E5: mov rax, [rbp+var_30] and rax, 1 mov [rbp+var_34], eax mov rax, [rbp+var_20] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 30h ; '0' mov [rbp+var_51], al jnz short loc_9E412 mov rax, [rbp+var_20] movsx eax, byte ptr [rax+1] cmp eax, 78h ; 'x' setz al mov [rbp+var_51], al loc_9E412: mov dl, [rbp+var_51] xor eax, eax mov ecx, 2 test dl, 1 cmovnz eax, ecx mov [rbp+var_38], eax cmp [rbp+var_34], 0 jz short loc_9E44E mov rax, [rbp+var_20] mov ecx, [rbp+var_38] mov edx, ecx add edx, 1 mov [rbp+var_38], edx movsxd rcx, ecx movsx edi, byte ptr [rax+rcx] call hexchar_to_int mov cl, al mov rax, [rbp+var_10] mov [rax], cl loc_9E44E: mov rax, [rbp+var_30] movsxd rcx, [rbp+var_38] sub rax, rcx and rax, 1 cmp rax, 0 jnz short loc_9E47E mov eax, [rbp+var_18] sub eax, [rbp+var_34] mov eax, eax mov rcx, [rbp+var_30] movsxd rdx, [rbp+var_38] sub rcx, rdx shr rcx, 1 cmp rax, rcx jnb short loc_9E48A loc_9E47E: mov [rbp+var_4], 0FFFFFFFFh jmp loc_9E50E loc_9E48A: movsxd rax, [rbp+var_38] mov [rbp+var_40], rax loc_9E492: mov rax, [rbp+var_40] cmp rax, [rbp+var_30] jnb short loc_9E508 mov rax, [rbp+var_20] mov rcx, [rbp+var_40] movsx edi, byte ptr [rax+rcx] call hexchar_to_int mov [rbp+var_44], eax mov rax, [rbp+var_20] mov rcx, [rbp+var_40] movsx edi, byte ptr [rax+rcx+1] call hexchar_to_int mov [rbp+var_48], eax cmp [rbp+var_44], 0FFFFFFFFh jz short loc_9E4D1 cmp [rbp+var_48], 0FFFFFFFFh jnz short loc_9E4DA loc_9E4D1: mov [rbp+var_4], 0FFFFFFFFh jmp short loc_9E50E loc_9E4DA: mov eax, [rbp+var_44] shl eax, 4 or eax, [rbp+var_48] mov dl, al mov rax, [rbp+var_10] mov ecx, [rbp+var_34] mov esi, ecx add esi, 1 mov [rbp+var_34], esi movsxd rcx, ecx mov [rax+rcx], dl mov rax, [rbp+var_40] add rax, 2 mov [rbp+var_40], rax jmp short loc_9E492 loc_9E508: mov eax, [rbp+var_34] mov [rbp+var_4], eax loc_9E50E: mov eax, [rbp+var_4] add rsp, 60h pop rbp retn
long long hex_to_bytes(_BYTE *a1, int a2, int a3, _BYTE *a4) { int v4; // eax int v5; // ecx bool v7; // [rsp+Fh] [rbp-51h] unsigned long long v8; // [rsp+10h] [rbp-50h] int v9; // [rsp+18h] [rbp-48h] int v10; // [rsp+1Ch] [rbp-44h] unsigned long long i; // [rsp+20h] [rbp-40h] int v12; // [rsp+28h] [rbp-38h] unsigned int v13; // [rsp+2Ch] [rbp-34h] if ( a2 == -1 ) v8 = strlen(a1); else v8 = a2; if ( a1 && a4 ) { v13 = v8 & 1; v7 = 0; if ( *a1 == 48 ) v7 = a1[1] == 120; v4 = 0; if ( v7 ) v4 = 2; v12 = v4; if ( (v8 & 1) != 0 ) { v12 = v4 + 1; *a4 = hexchar_to_int((unsigned int)(char)a1[v4]); } if ( (((_BYTE)v8 - (_BYTE)v12) & 1) != 0 || a3 - v13 < (v8 - v12) >> 1 ) { return (unsigned int)-1; } else { for ( i = v12; i < v8; i += 2LL ) { v10 = hexchar_to_int((unsigned int)(char)a1[i]); v9 = hexchar_to_int((unsigned int)(char)a1[i + 1]); if ( v10 == -1 || v9 == -1 ) return (unsigned int)-1; v5 = v13++; a4[v5] = v9 | (16 * v10); } return v13; } } else { return (unsigned int)-1; } }
hex_to_bytes: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x10],RCX MOV qword ptr [RBP + -0x20],RDI MOV dword ptr [RBP + -0x24],ESI CMP dword ptr [RBP + -0x24],-0x1 JNZ 0x0019e3bb MOV RDI,qword ptr [RBP + -0x20] CALL 0x00123220 MOV qword ptr [RBP + -0x50],RAX JMP 0x0019e3c3 LAB_0019e3bb: MOVSXD RAX,dword ptr [RBP + -0x24] MOV qword ptr [RBP + -0x50],RAX LAB_0019e3c3: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x20],0x0 JZ 0x0019e3d9 CMP qword ptr [RBP + -0x10],0x0 JNZ 0x0019e3e5 LAB_0019e3d9: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0019e50e LAB_0019e3e5: MOV RAX,qword ptr [RBP + -0x30] AND RAX,0x1 MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr [RBP + -0x20] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x30 MOV byte ptr [RBP + -0x51],AL JNZ 0x0019e412 MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,byte ptr [RAX + 0x1] CMP EAX,0x78 SETZ AL MOV byte ptr [RBP + -0x51],AL LAB_0019e412: MOV DL,byte ptr [RBP + -0x51] XOR EAX,EAX MOV ECX,0x2 TEST DL,0x1 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x38],EAX CMP dword ptr [RBP + -0x34],0x0 JZ 0x0019e44e MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x38] MOV EDX,ECX ADD EDX,0x1 MOV dword ptr [RBP + -0x38],EDX MOVSXD RCX,ECX MOVSX EDI,byte ptr [RAX + RCX*0x1] CALL 0x0019e520 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL LAB_0019e44e: MOV RAX,qword ptr [RBP + -0x30] MOVSXD RCX,dword ptr [RBP + -0x38] SUB RAX,RCX AND RAX,0x1 CMP RAX,0x0 JNZ 0x0019e47e MOV EAX,dword ptr [RBP + -0x18] SUB EAX,dword ptr [RBP + -0x34] MOV EAX,EAX MOV RCX,qword ptr [RBP + -0x30] MOVSXD RDX,dword ptr [RBP + -0x38] SUB RCX,RDX SHR RCX,0x1 CMP RAX,RCX JNC 0x0019e48a LAB_0019e47e: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0019e50e LAB_0019e48a: MOVSXD RAX,dword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x40],RAX LAB_0019e492: MOV RAX,qword ptr [RBP + -0x40] CMP RAX,qword ptr [RBP + -0x30] JNC 0x0019e508 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x40] MOVSX EDI,byte ptr [RAX + RCX*0x1] CALL 0x0019e520 MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x40] MOVSX EDI,byte ptr [RAX + RCX*0x1 + 0x1] CALL 0x0019e520 MOV dword ptr [RBP + -0x48],EAX CMP dword ptr [RBP + -0x44],-0x1 JZ 0x0019e4d1 CMP dword ptr [RBP + -0x48],-0x1 JNZ 0x0019e4da LAB_0019e4d1: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0019e50e LAB_0019e4da: MOV EAX,dword ptr [RBP + -0x44] SHL EAX,0x4 OR EAX,dword ptr [RBP + -0x48] MOV DL,AL MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x34] MOV ESI,ECX ADD ESI,0x1 MOV dword ptr [RBP + -0x34],ESI MOVSXD RCX,ECX MOV byte ptr [RAX + RCX*0x1],DL MOV RAX,qword ptr [RBP + -0x40] ADD RAX,0x2 MOV qword ptr [RBP + -0x40],RAX JMP 0x0019e492 LAB_0019e508: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX LAB_0019e50e: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x60 POP RBP RET
uint hex_to_bytes(char *param_1,int param_2,int param_3,int1 *param_4) { int1 uVar1; int iVar2; int iVar3; bool bVar4; ulong local_58; ulong local_48; int local_40; uint local_3c; uint local_c; if (param_2 == -1) { local_58 = strlen(param_1); } else { local_58 = (ulong)param_2; } if ((param_1 == (char *)0x0) || (param_4 == (int1 *)0x0)) { local_c = 0xffffffff; } else { local_3c = (uint)local_58 & 1; bVar4 = false; if (*param_1 == '0') { bVar4 = param_1[1] == 'x'; } iVar2 = 0; if (bVar4) { iVar2 = 2; } local_40 = iVar2; if ((local_58 & 1) != 0) { local_40 = iVar2 + 1; uVar1 = hexchar_to_int((int)param_1[iVar2]); *param_4 = uVar1; } if (((local_58 - (long)local_40 & 1) == 0) && (local_58 - (long)local_40 >> 1 <= (ulong)(param_3 - local_3c))) { for (local_48 = (ulong)local_40; local_48 < local_58; local_48 = local_48 + 2) { iVar2 = hexchar_to_int((int)param_1[local_48]); iVar3 = hexchar_to_int((int)param_1[local_48 + 1]); if ((iVar2 == -1) || (iVar3 == -1)) { return 0xffffffff; } param_4[(int)local_3c] = (byte)(iVar2 << 4) | (byte)iVar3; local_3c = local_3c + 1; } local_c = local_3c; } else { local_c = 0xffffffff; } } return local_c; }
36,782
hex_to_bytes
corpus-core[P]colibri-stateless/src/util/bytes.c
int hex_to_bytes(const char* hexstring, int len, bytes_t buffer) { size_t hex_len = len == -1 ? strlen(hexstring) : (size_t) len; if (!hexstring || !buffer.data) return -1; int dst_offset = hex_len % 2; int src_offset = (hexstring[0] == '0' && hexstring[1] == 'x') ? 2 : 0; if (dst_offset) buffer.data[0] = hexchar_to_int(hexstring[src_offset++]); if ((hex_len - src_offset) % 2 || (buffer.len - dst_offset) < (hex_len - src_offset) / 2) return -1; for (size_t i = src_offset; i < hex_len; i += 2) { int high = hexchar_to_int(hexstring[i]); int low = hexchar_to_int(hexstring[i + 1]); if (high == -1 || low == -1) return -1; buffer.data[dst_offset++] = (high << 4) | low; } return dst_offset; }
O1
c
hex_to_bytes: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %rbx movl %edx, %r12d movq %rdi, %r14 cmpl $-0x1, %esi je 0x571f7 movslq %esi, %rdx jmp 0x57202 movq %r14, %rdi callq 0x22200 movq %rax, %rdx testq %r14, %r14 setne %al testq %rbx, %rbx setne %cl andb %al, %cl cmpb $0x1, %cl jne 0x572ad movq %rbx, 0x10(%rsp) movl %edx, %ebp andl $0x1, %ebp xorl %r13d, %r13d cmpb $0x30, (%r14) jne 0x5723b xorl %r13d, %r13d cmpb $0x78, 0x1(%r14) sete %r13b addl %r13d, %r13d testl %ebp, %ebp movq %rdx, (%rsp) je 0x57295 movl %r13d, %eax movsbq (%r14,%rax), %rbx callq 0x220e0 movq (%rax), %rax movzwl (%rax,%rbx,2), %ecx btl $0xb, %ecx jb 0x57280 movl $0xffffffff, %eax # imm = 0xFFFFFFFF btl $0xc, %ecx movq (%rsp), %rdx jae 0x5728a callq 0x22210 movq (%rsp), %rdx movq (%rax), %rax movl (%rax,%rbx,4), %eax addl $-0x57, %eax jmp 0x5728a movzbl %bl, %eax addl $-0x30, %eax movq (%rsp), %rdx orl $0x1, %r13d movq 0x10(%rsp), %rcx movb %al, (%rcx) movl %r13d, %r13d movq %rdx, %rax subq %r13, %rax testb $0x1, %al jne 0x572ad subl %ebp, %r12d shrq %rax cmpq %r12, %rax jbe 0x572c3 movl $0xffffffff, %ebp # imm = 0xFFFFFFFF movl %ebp, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpq %r13, %rdx jbe 0x572b2 callq 0x220e0 movq (%rsp), %rdi movq %rax, %r8 movq %rax, 0x8(%rsp) movsbq (%r14,%r13), %r15 movq (%r8), %rbx movzwl (%rbx,%r15,2), %eax btl $0xb, %eax jb 0x57313 movl $0xffffffff, %r12d # imm = 0xFFFFFFFF btl $0xc, %eax jae 0x5731a callq 0x22210 movq 0x8(%rsp), %r8 movq (%rsp), %rdi movq (%rax), %rax movl (%rax,%r15,4), %r12d addl $-0x57, %r12d jmp 0x5731a addl $-0x30, %r15d movl %r15d, %r12d movsbq 0x1(%r14,%r13), %r15 movzwl (%rbx,%r15,2), %ecx btl $0xb, %ecx jb 0x57350 movl $0xffffffff, %eax # imm = 0xFFFFFFFF btl $0xc, %ecx jae 0x57357 callq 0x22210 movq 0x8(%rsp), %r8 movq (%rsp), %rdi movq (%rax), %rax movl (%rax,%r15,4), %eax addl $-0x57, %eax jmp 0x57357 addl $-0x30, %r15d movl %r15d, %eax cmpl $-0x1, %r12d setne %dl cmpl $-0x1, %eax setne %cl andb %dl, %cl cmpb $0x1, %cl jne 0x5737f shll $0x4, %r12d orl %r12d, %eax movslq %ebp, %rdx incl %ebp movq 0x10(%rsp), %rsi movb %al, (%rsi,%rdx) testb %cl, %cl je 0x572ad addq $0x2, %r13 cmpq %rdi, %r13 jb 0x572d9 jmp 0x572b2
hex_to_bytes: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rcx mov r12d, edx mov r14, rdi cmp esi, 0FFFFFFFFh jz short loc_571F7 movsxd rdx, esi jmp short loc_57202 loc_571F7: mov rdi, r14 call _strlen mov rdx, rax loc_57202: test r14, r14 setnz al test rbx, rbx setnz cl and cl, al cmp cl, 1 jnz loc_572AD mov [rsp+48h+var_38], rbx mov ebp, edx and ebp, 1 xor r13d, r13d cmp byte ptr [r14], 30h ; '0' jnz short loc_5723B xor r13d, r13d cmp byte ptr [r14+1], 78h ; 'x' setz r13b add r13d, r13d loc_5723B: test ebp, ebp mov [rsp+48h+var_48], rdx jz short loc_57295 mov eax, r13d movsx rbx, byte ptr [r14+rax] call ___ctype_b_loc mov rax, [rax] movzx ecx, word ptr [rax+rbx*2] bt ecx, 0Bh jb short loc_57280 mov eax, 0FFFFFFFFh bt ecx, 0Ch mov rdx, [rsp+48h+var_48] jnb short loc_5728A call ___ctype_tolower_loc mov rdx, [rsp+48h+var_48] mov rax, [rax] mov eax, [rax+rbx*4] add eax, 0FFFFFFA9h jmp short loc_5728A loc_57280: movzx eax, bl add eax, 0FFFFFFD0h mov rdx, [rsp+48h+var_48] loc_5728A: or r13d, 1 mov rcx, [rsp+48h+var_38] mov [rcx], al loc_57295: mov r13d, r13d mov rax, rdx sub rax, r13 test al, 1 jnz short loc_572AD sub r12d, ebp shr rax, 1 cmp rax, r12 jbe short loc_572C3 loc_572AD: mov ebp, 0FFFFFFFFh loc_572B2: mov eax, ebp add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_572C3: cmp rdx, r13 jbe short loc_572B2 call ___ctype_b_loc mov rdi, [rsp+48h+var_48] mov r8, rax mov [rsp+48h+var_40], rax loc_572D9: movsx r15, byte ptr [r14+r13] mov rbx, [r8] movzx eax, word ptr [rbx+r15*2] bt eax, 0Bh jb short loc_57313 mov r12d, 0FFFFFFFFh bt eax, 0Ch jnb short loc_5731A call ___ctype_tolower_loc mov r8, [rsp+48h+var_40] mov rdi, [rsp+48h+var_48] mov rax, [rax] mov r12d, [rax+r15*4] add r12d, 0FFFFFFA9h jmp short loc_5731A loc_57313: add r15d, 0FFFFFFD0h mov r12d, r15d loc_5731A: movsx r15, byte ptr [r14+r13+1] movzx ecx, word ptr [rbx+r15*2] bt ecx, 0Bh jb short loc_57350 mov eax, 0FFFFFFFFh bt ecx, 0Ch jnb short loc_57357 call ___ctype_tolower_loc mov r8, [rsp+48h+var_40] mov rdi, [rsp+48h+var_48] mov rax, [rax] mov eax, [rax+r15*4] add eax, 0FFFFFFA9h jmp short loc_57357 loc_57350: add r15d, 0FFFFFFD0h mov eax, r15d loc_57357: cmp r12d, 0FFFFFFFFh setnz dl cmp eax, 0FFFFFFFFh setnz cl and cl, dl cmp cl, 1 jnz short loc_5737F shl r12d, 4 or eax, r12d movsxd rdx, ebp inc ebp mov rsi, [rsp+48h+var_38] mov [rsi+rdx], al loc_5737F: test cl, cl jz loc_572AD add r13, 2 cmp r13, rdi jb loc_572D9 jmp loc_572B2
long long hex_to_bytes(_BYTE *a1, char *a2, int a3, char *a4) { unsigned long long v7; // rdx unsigned int v8; // ebp unsigned long long v9; // r13 long long v10; // rbx __int16 v11; // cx char v12; // al _QWORD *v13; // rax unsigned long long v14; // rax unsigned long long v16; // rdi long long v17; // rdx _QWORD *v18; // r8 long long v19; // r15 long long v20; // rbx int v21; // r12d _QWORD *v22; // rax long long v23; // r15 int v24; // eax _QWORD *v25; // rax char v26; // cl unsigned long long v27; // [rsp+0h] [rbp-48h] _QWORD *v28; // [rsp+8h] [rbp-40h] char *v29; // [rsp+10h] [rbp-38h] if ( (_DWORD)a2 == -1 ) v7 = strlen(a1); else v7 = (int)a2; if ( a1 != 0LL && a4 != 0LL ) { v29 = a4; v8 = v7 & 1; LODWORD(v9) = 0; if ( *a1 == 48 ) LODWORD(v9) = 2 * (a1[1] == 120); v27 = v7; if ( (v7 & 1) != 0 ) { v10 = (char)a1[(unsigned int)v9]; v11 = *(_WORD *)(*(_QWORD *)__ctype_b_loc() + 2 * v10); if ( (v11 & 0x800) != 0 ) { v12 = v10 - 48; v7 = v27; } else { v12 = -1; v7 = v27; if ( (v11 & 0x1000) != 0 ) { v13 = (_QWORD *)__ctype_tolower_loc(a1, a2, v27); v7 = v27; v12 = *(_DWORD *)(*v13 + 4 * v10) - 87; } } LODWORD(v9) = v9 | 1; *v29 = v12; } v9 = (unsigned int)v9; v14 = v7 - (unsigned int)v9; if ( (v14 & 1) == 0 && v14 >> 1 <= a3 - v8 ) { if ( v7 <= (unsigned int)v9 ) return v8; v16 = v27; v18 = (_QWORD *)__ctype_b_loc(); v28 = v18; while ( 1 ) { v19 = (char)a1[v9]; v20 = *v18; if ( (*(_WORD *)(*v18 + 2 * v19) & 0x800) != 0 ) { v21 = v19 - 48; } else { v21 = -1; if ( (*(_WORD *)(*v18 + 2 * v19) & 0x1000) != 0 ) { v22 = (_QWORD *)__ctype_tolower_loc(v16, a2, v17); v18 = v28; v16 = v27; v21 = *(_DWORD *)(*v22 + 4 * v19) - 87; } } v23 = (char)a1[v9 + 1]; if ( (*(_WORD *)(v20 + 2 * v23) & 0x800) != 0 ) { v24 = v23 - 48; } else { v24 = -1; if ( (*(_WORD *)(v20 + 2 * v23) & 0x1000) != 0 ) { v25 = (_QWORD *)__ctype_tolower_loc(v16, a2, v17); v18 = v28; v16 = v27; v24 = *(_DWORD *)(*v25 + 4 * v23) - 87; } } LOBYTE(v17) = v21 != -1; v26 = v17 & (v24 != -1); if ( v26 == 1 ) { v17 = (int)v8++; a2 = v29; v29[v17] = (16 * v21) | v24; } if ( !v26 ) break; v9 += 2LL; if ( v9 >= v16 ) return v8; } } } return (unsigned int)-1; }
hex_to_bytes: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RCX MOV R12D,EDX MOV R14,RDI CMP ESI,-0x1 JZ 0x001571f7 MOVSXD RDX,ESI JMP 0x00157202 LAB_001571f7: MOV RDI,R14 CALL 0x00122200 MOV RDX,RAX LAB_00157202: TEST R14,R14 SETNZ AL TEST RBX,RBX SETNZ CL AND CL,AL CMP CL,0x1 JNZ 0x001572ad MOV qword ptr [RSP + 0x10],RBX MOV EBP,EDX AND EBP,0x1 XOR R13D,R13D CMP byte ptr [R14],0x30 JNZ 0x0015723b XOR R13D,R13D CMP byte ptr [R14 + 0x1],0x78 SETZ R13B ADD R13D,R13D LAB_0015723b: TEST EBP,EBP MOV qword ptr [RSP],RDX JZ 0x00157295 MOV EAX,R13D MOVSX RBX,byte ptr [R14 + RAX*0x1] CALL 0x001220e0 MOV RAX,qword ptr [RAX] MOVZX ECX,word ptr [RAX + RBX*0x2] BT ECX,0xb JC 0x00157280 MOV EAX,0xffffffff BT ECX,0xc MOV RDX,qword ptr [RSP] JNC 0x0015728a CALL 0x00122210 MOV RDX,qword ptr [RSP] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + RBX*0x4] ADD EAX,-0x57 JMP 0x0015728a LAB_00157280: MOVZX EAX,BL ADD EAX,-0x30 MOV RDX,qword ptr [RSP] LAB_0015728a: OR R13D,0x1 MOV RCX,qword ptr [RSP + 0x10] MOV byte ptr [RCX],AL LAB_00157295: MOV R13D,R13D MOV RAX,RDX SUB RAX,R13 TEST AL,0x1 JNZ 0x001572ad SUB R12D,EBP SHR RAX,0x1 CMP RAX,R12 JBE 0x001572c3 LAB_001572ad: MOV EBP,0xffffffff LAB_001572b2: MOV EAX,EBP ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001572c3: CMP RDX,R13 JBE 0x001572b2 CALL 0x001220e0 MOV RDI,qword ptr [RSP] MOV R8,RAX MOV qword ptr [RSP + 0x8],RAX LAB_001572d9: MOVSX R15,byte ptr [R14 + R13*0x1] MOV RBX,qword ptr [R8] MOVZX EAX,word ptr [RBX + R15*0x2] BT EAX,0xb JC 0x00157313 MOV R12D,0xffffffff BT EAX,0xc JNC 0x0015731a CALL 0x00122210 MOV R8,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP] MOV RAX,qword ptr [RAX] MOV R12D,dword ptr [RAX + R15*0x4] ADD R12D,-0x57 JMP 0x0015731a LAB_00157313: ADD R15D,-0x30 MOV R12D,R15D LAB_0015731a: MOVSX R15,byte ptr [R14 + R13*0x1 + 0x1] MOVZX ECX,word ptr [RBX + R15*0x2] BT ECX,0xb JC 0x00157350 MOV EAX,0xffffffff BT ECX,0xc JNC 0x00157357 CALL 0x00122210 MOV R8,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + R15*0x4] ADD EAX,-0x57 JMP 0x00157357 LAB_00157350: ADD R15D,-0x30 MOV EAX,R15D LAB_00157357: CMP R12D,-0x1 SETNZ DL CMP EAX,-0x1 SETNZ CL AND CL,DL CMP CL,0x1 JNZ 0x0015737f SHL R12D,0x4 OR EAX,R12D MOVSXD RDX,EBP INC EBP MOV RSI,qword ptr [RSP + 0x10] MOV byte ptr [RSI + RDX*0x1],AL LAB_0015737f: TEST CL,CL JZ 0x001572ad ADD R13,0x2 CMP R13,RDI JC 0x001572d9 JMP 0x001572b2
uint hex_to_bytes(char *param_1,int param_2,int param_3,char *param_4) { char cVar1; ushort uVar2; ushort *puVar3; char cVar4; int iVar5; ushort **ppuVar6; __int32_t **pp_Var7; size_t sVar8; long lVar9; uint uVar10; int iVar11; uint uVar12; ulong uVar13; if (param_2 == -1) { sVar8 = strlen(param_1); } else { sVar8 = (size_t)param_2; } if (param_4 != (char *)0x0 && param_1 != (char *)0x0) { uVar10 = (uint)sVar8 & 1; uVar12 = 0; if (*param_1 == '0') { uVar12 = (uint)(param_1[1] == 'x') * 2; } if ((sVar8 & 1) != 0) { cVar1 = param_1[uVar12]; ppuVar6 = __ctype_b_loc(); if (((*ppuVar6)[cVar1] >> 0xb & 1) == 0) { cVar4 = -1; if (((*ppuVar6)[cVar1] >> 0xc & 1) != 0) { pp_Var7 = __ctype_tolower_loc(); cVar4 = (char)(*pp_Var7)[cVar1] + -0x57; } } else { cVar4 = cVar1 + -0x30; } uVar12 = uVar12 | 1; *param_4 = cVar4; } uVar13 = (ulong)uVar12; if (((sVar8 - uVar13 & 1) == 0) && (sVar8 - uVar13 >> 1 <= (ulong)(param_3 - uVar10))) { if (sVar8 <= uVar13) { return uVar10; } ppuVar6 = __ctype_b_loc(); while( true ) { cVar1 = param_1[uVar13]; puVar3 = *ppuVar6; uVar2 = puVar3[cVar1]; if ((uVar2 >> 0xb & 1) == 0) { iVar11 = -1; if ((uVar2 >> 0xc & 1) != 0) { pp_Var7 = __ctype_tolower_loc(); iVar11 = (*pp_Var7)[cVar1] + -0x57; } } else { iVar11 = cVar1 + -0x30; } cVar1 = param_1[uVar13 + 1]; uVar2 = puVar3[cVar1]; if ((uVar2 >> 0xb & 1) == 0) { iVar5 = -1; if ((uVar2 >> 0xc & 1) != 0) { pp_Var7 = __ctype_tolower_loc(); iVar5 = (*pp_Var7)[cVar1] + -0x57; } } else { iVar5 = cVar1 + -0x30; } if (iVar5 == -1 || iVar11 == -1) break; lVar9 = (long)(int)uVar10; uVar10 = uVar10 + 1; param_4[lVar9] = (byte)iVar5 | (byte)(iVar11 << 4); uVar13 = uVar13 + 2; if (sVar8 <= uVar13) { return uVar10; } } } } return 0xffffffff; }
36,783
hex_to_bytes
corpus-core[P]colibri-stateless/src/util/bytes.c
int hex_to_bytes(const char* hexstring, int len, bytes_t buffer) { size_t hex_len = len == -1 ? strlen(hexstring) : (size_t) len; if (!hexstring || !buffer.data) return -1; int dst_offset = hex_len % 2; int src_offset = (hexstring[0] == '0' && hexstring[1] == 'x') ? 2 : 0; if (dst_offset) buffer.data[0] = hexchar_to_int(hexstring[src_offset++]); if ((hex_len - src_offset) % 2 || (buffer.len - dst_offset) < (hex_len - src_offset) / 2) return -1; for (size_t i = src_offset; i < hex_len; i += 2) { int high = hexchar_to_int(hexstring[i]); int low = hexchar_to_int(hexstring[i + 1]); if (high == -1 || low == -1) return -1; buffer.data[dst_offset++] = (high << 4) | low; } return dst_offset; }
O2
c
hex_to_bytes: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %rbx movl %edx, %r12d movq %rdi, %r14 cmpl $-0x1, %esi je 0x4b248 movslq %esi, %r15 jmp 0x4b253 movq %r14, %rdi callq 0x22210 movq %rax, %r15 testq %r14, %r14 setne %al testq %rbx, %rbx setne %cl andb %al, %cl pushq $-0x1 popq %rax cmpb $0x1, %cl jne 0x4b2b9 movl %r15d, %ebp andl $0x1, %ebp xorl %r13d, %r13d cmpb $0x30, (%r14) jne 0x4b287 xorl %r13d, %r13d cmpb $0x78, 0x1(%r14) sete %r13b addl %r13d, %r13d testl %ebp, %ebp je 0x4b29e movl %r13d, %eax orl $0x1, %r13d movsbl (%r14,%rax), %edi callq 0x4b30d movb %al, (%rbx) movl %r13d, %r13d movq %r15, %rax subq %r13, %rax testb $0x1, %al jne 0x4b2b6 subl %ebp, %r12d shrq %rax cmpq %r12, %rax jbe 0x4b2c8 pushq $-0x1 popq %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %r15d, %ebp andl $0x1, %ebp cmpq %r15, %r13 jae 0x4b309 movsbl (%r14,%r13), %edi callq 0x4b30d movl %eax, %r12d movsbl 0x1(%r14,%r13), %edi callq 0x4b30d cmpl $-0x1, %r12d je 0x4b2b6 cmpl $-0x1, %eax je 0x4b2b6 shll $0x4, %r12d orl %r12d, %eax movb %al, (%rbx,%rbp) incq %rbp addq $0x2, %r13 jmp 0x4b2ce movl %ebp, %eax jmp 0x4b2b9
hex_to_bytes: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rcx mov r12d, edx mov r14, rdi cmp esi, 0FFFFFFFFh jz short loc_4B248 movsxd r15, esi jmp short loc_4B253 loc_4B248: mov rdi, r14 call _strlen mov r15, rax loc_4B253: test r14, r14 setnz al test rbx, rbx setnz cl and cl, al push 0FFFFFFFFFFFFFFFFh pop rax cmp cl, 1 jnz short loc_4B2B9 mov ebp, r15d and ebp, 1 xor r13d, r13d cmp byte ptr [r14], 30h ; '0' jnz short loc_4B287 xor r13d, r13d cmp byte ptr [r14+1], 78h ; 'x' setz r13b add r13d, r13d loc_4B287: test ebp, ebp jz short loc_4B29E mov eax, r13d or r13d, 1 movsx edi, byte ptr [r14+rax] call hexchar_to_int mov [rbx], al loc_4B29E: mov r13d, r13d mov rax, r15 sub rax, r13 test al, 1 jnz short loc_4B2B6 sub r12d, ebp shr rax, 1 cmp rax, r12 jbe short loc_4B2C8 loc_4B2B6: push 0FFFFFFFFFFFFFFFFh pop rax loc_4B2B9: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4B2C8: mov ebp, r15d and ebp, 1 loc_4B2CE: cmp r13, r15 jnb short loc_4B309 movsx edi, byte ptr [r14+r13] call hexchar_to_int mov r12d, eax movsx edi, byte ptr [r14+r13+1] call hexchar_to_int cmp r12d, 0FFFFFFFFh jz short loc_4B2B6 cmp eax, 0FFFFFFFFh jz short loc_4B2B6 shl r12d, 4 or eax, r12d mov [rbx+rbp], al inc rbp add r13, 2 jmp short loc_4B2CE loc_4B309: mov eax, ebp jmp short loc_4B2B9
long long hex_to_bytes(_BYTE *a1, int a2, int a3, _BYTE *a4) { unsigned long long v6; // r15 long long result; // rax unsigned long long v8; // r13 long long v9; // rax unsigned long long v10; // rax unsigned long long v11; // rbp int v12; // r12d int v13; // eax if ( a2 == -1 ) v6 = strlen(a1); else v6 = a2; result = -1LL; if ( a1 != 0LL && a4 != 0LL ) { LODWORD(v8) = 0; if ( *a1 == 48 ) LODWORD(v8) = 2 * (a1[1] == 120); if ( (v6 & 1) != 0 ) { v9 = (unsigned int)v8; LODWORD(v8) = v8 | 1; *a4 = hexchar_to_int((unsigned int)(char)a1[v9]); } v8 = (unsigned int)v8; v10 = v6 - (unsigned int)v8; if ( (v10 & 1) != 0 || v10 >> 1 > a3 - (v6 & 1) ) { return -1LL; } else { v11 = v6 & 1; while ( v8 < v6 ) { v12 = hexchar_to_int((unsigned int)(char)a1[v8]); v13 = hexchar_to_int((unsigned int)(char)a1[v8 + 1]); if ( v12 == -1 || v13 == -1 ) return -1LL; a4[v11++] = (16 * v12) | v13; v8 += 2LL; } return (unsigned int)v11; } } return result; }
hex_to_bytes: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RCX MOV R12D,EDX MOV R14,RDI CMP ESI,-0x1 JZ 0x0014b248 MOVSXD R15,ESI JMP 0x0014b253 LAB_0014b248: MOV RDI,R14 CALL 0x00122210 MOV R15,RAX LAB_0014b253: TEST R14,R14 SETNZ AL TEST RBX,RBX SETNZ CL AND CL,AL PUSH -0x1 POP RAX CMP CL,0x1 JNZ 0x0014b2b9 MOV EBP,R15D AND EBP,0x1 XOR R13D,R13D CMP byte ptr [R14],0x30 JNZ 0x0014b287 XOR R13D,R13D CMP byte ptr [R14 + 0x1],0x78 SETZ R13B ADD R13D,R13D LAB_0014b287: TEST EBP,EBP JZ 0x0014b29e MOV EAX,R13D OR R13D,0x1 MOVSX EDI,byte ptr [R14 + RAX*0x1] CALL 0x0014b30d MOV byte ptr [RBX],AL LAB_0014b29e: MOV R13D,R13D MOV RAX,R15 SUB RAX,R13 TEST AL,0x1 JNZ 0x0014b2b6 SUB R12D,EBP SHR RAX,0x1 CMP RAX,R12 JBE 0x0014b2c8 LAB_0014b2b6: PUSH -0x1 POP RAX LAB_0014b2b9: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014b2c8: MOV EBP,R15D AND EBP,0x1 LAB_0014b2ce: CMP R13,R15 JNC 0x0014b309 MOVSX EDI,byte ptr [R14 + R13*0x1] CALL 0x0014b30d MOV R12D,EAX MOVSX EDI,byte ptr [R14 + R13*0x1 + 0x1] CALL 0x0014b30d CMP R12D,-0x1 JZ 0x0014b2b6 CMP EAX,-0x1 JZ 0x0014b2b6 SHL R12D,0x4 OR EAX,R12D MOV byte ptr [RBX + RBP*0x1],AL INC RBP ADD R13,0x2 JMP 0x0014b2ce LAB_0014b309: MOV EAX,EBP JMP 0x0014b2b9
ulong hex_to_bytes(char *param_1,int param_2,int param_3,int1 *param_4) { int1 uVar1; int iVar2; int iVar3; ulong uVar4; uint uVar5; ulong uVar6; size_t sVar7; if (param_2 == -1) { sVar7 = strlen(param_1); } else { sVar7 = (size_t)param_2; } uVar4 = 0xffffffffffffffff; if (param_4 != (int1 *)0x0 && param_1 != (char *)0x0) { uVar5 = 0; if (*param_1 == '0') { uVar5 = (uint)(param_1[1] == 'x') * 2; } if ((sVar7 & 1) != 0) { uVar4 = (ulong)uVar5; uVar5 = uVar5 | 1; uVar1 = hexchar_to_int((int)param_1[uVar4]); *param_4 = uVar1; } uVar6 = (ulong)uVar5; if (((sVar7 - uVar6 & 1) == 0) && (sVar7 - uVar6 >> 1 <= (ulong)(param_3 - ((uint)sVar7 & 1)))) { uVar4 = (ulong)((uint)sVar7 & 1); for (; uVar6 < sVar7; uVar6 = uVar6 + 2) { iVar2 = hexchar_to_int((int)param_1[uVar6]); iVar3 = hexchar_to_int((int)param_1[uVar6 + 1]); if ((iVar2 == -1) || (iVar3 == -1)) goto LAB_0014b2b6; param_4[uVar4] = (byte)iVar3 | (byte)(iVar2 << 4); uVar4 = uVar4 + 1; } uVar4 = uVar4 & 0xffffffff; } else { LAB_0014b2b6: uVar4 = 0xffffffffffffffff; } } return uVar4; }
36,784
ma_scramble_323
eloqsql/libmariadb/libmariadb/ma_password.c
char *ma_scramble_323(char *to, const char *message, const char *password) { struct rand_struct rand_st; ulong hash_pass[2], hash_message[2]; if (password && password[0]) { char extra, *to_start=to; const char *end_scramble323= message + SCRAMBLE_LENGTH_323; ma_hash_password(hash_pass,password, (uint) strlen(password)); /* Don't use strlen, could be > SCRAMBLE_LENGTH_323 ! */ ma_hash_password(hash_message, message, SCRAMBLE_LENGTH_323); ma_randominit(&rand_st, hash_pass[0] ^ hash_message[0], hash_pass[1] ^ hash_message[1]); for (; message < end_scramble323; message++) *to++= (char) (floor(rnd(&rand_st) * 31) + 64); extra=(char) (floor(rnd(&rand_st) * 31)); while (to_start != to) *(to_start++)^= extra; } *to= 0; return to; }
O0
c
ma_scramble_323: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x79f5f movq -0x18(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0x79f5f movq -0x8(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x10(%rbp), %rax addq $0x8, %rax movq %rax, -0x78(%rbp) leaq -0x50(%rbp), %rax movq %rax, -0x88(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x18(%rbp), %rdi callq 0x38410 movq -0x88(%rbp), %rdi movq -0x80(%rbp), %rsi movl %eax, %eax movl %eax, %edx callq 0x79b10 leaq -0x60(%rbp), %rdi movq -0x10(%rbp), %rsi movl $0x8, %edx callq 0x79b10 movq -0x50(%rbp), %rsi xorq -0x60(%rbp), %rsi movq -0x48(%rbp), %rdx xorq -0x58(%rbp), %rdx leaq -0x38(%rbp), %rdi callq 0x799f0 movq -0x10(%rbp), %rax cmpq -0x78(%rbp), %rax jae 0x79f16 leaq -0x38(%rbp), %rdi callq 0x79a70 movsd 0x6c764(%rip), %xmm1 # 0xe6640 mulsd %xmm1, %xmm0 callq 0x38110 movsd 0x6c75b(%rip), %xmm1 # 0xe6648 addsd %xmm1, %xmm0 cvttsd2si %xmm0, %eax movb %al, %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x79ec1 leaq -0x38(%rbp), %rdi callq 0x79a70 movsd 0x6c719(%rip), %xmm1 # 0xe6640 mulsd %xmm1, %xmm0 callq 0x38110 cvttsd2si %xmm0, %eax movb %al, -0x61(%rbp) movq -0x70(%rbp), %rax cmpq -0x8(%rbp), %rax je 0x79f5d movsbl -0x61(%rbp), %edx movq -0x70(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x70(%rbp) movsbl (%rax), %ecx xorl %edx, %ecx movb %cl, (%rax) jmp 0x79f37 jmp 0x79f5f movq -0x8(%rbp), %rax movb $0x0, (%rax) movq -0x8(%rbp), %rax addq $0x90, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
ma_scramble_323: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx cmp [rbp+var_18], 0 jz loc_79F5F mov rax, [rbp+var_18] movsx eax, byte ptr [rax] cmp eax, 0 jz loc_79F5F mov rax, [rbp+var_8] mov [rbp+var_70], rax mov rax, [rbp+var_10] add rax, 8 mov [rbp+var_78], rax lea rax, [rbp+var_50] mov [rbp+var_88], rax mov rax, [rbp+var_18] mov [rbp+var_80], rax mov rdi, [rbp+var_18] call _strlen mov rdi, [rbp+var_88] mov rsi, [rbp+var_80] mov eax, eax mov edx, eax call ma_hash_password lea rdi, [rbp+var_60] mov rsi, [rbp+var_10] mov edx, 8 call ma_hash_password mov rsi, [rbp+var_50] xor rsi, [rbp+var_60] mov rdx, [rbp+var_48] xor rdx, [rbp+var_58] lea rdi, [rbp+var_38] call ma_randominit loc_79EC1: mov rax, [rbp+var_10] cmp rax, [rbp+var_78] jnb short loc_79F16 lea rdi, [rbp+var_38] call rnd movsd xmm1, cs:qword_E6640 mulsd xmm0, xmm1 call _floor movsd xmm1, cs:qword_E6648 addsd xmm0, xmm1 cvttsd2si eax, xmm0 mov cl, al mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_79EC1 loc_79F16: lea rdi, [rbp+var_38] call rnd movsd xmm1, cs:qword_E6640 mulsd xmm0, xmm1 call _floor cvttsd2si eax, xmm0 mov [rbp+var_61], al loc_79F37: mov rax, [rbp+var_70] cmp rax, [rbp+var_8] jz short loc_79F5D movsx edx, [rbp+var_61] mov rax, [rbp+var_70] mov rcx, rax add rcx, 1 mov [rbp+var_70], rcx movsx ecx, byte ptr [rax] xor ecx, edx mov [rax], cl jmp short loc_79F37 loc_79F5D: jmp short $+2 loc_79F5F: mov rax, [rbp+var_8] mov byte ptr [rax], 0 mov rax, [rbp+var_8] add rsp, 90h pop rbp retn
_BYTE * ma_scramble_323(_BYTE *a1, _BYTE *a2, _BYTE *a3) { unsigned int v3; // eax double v4; // xmm0_8 double v5; // xmm0_8 _BYTE *v6; // rax double v7; // xmm0_8 _BYTE *v8; // rax _BYTE *v10; // [rsp+10h] [rbp-80h] _BYTE *v11; // [rsp+18h] [rbp-78h] _BYTE *v12; // [rsp+20h] [rbp-70h] char v13; // [rsp+2Fh] [rbp-61h] _QWORD v14[2]; // [rsp+30h] [rbp-60h] BYREF _QWORD v15[3]; // [rsp+40h] [rbp-50h] BYREF _BYTE v16[32]; // [rsp+58h] [rbp-38h] BYREF _BYTE *v17; // [rsp+78h] [rbp-18h] _BYTE *v18; // [rsp+80h] [rbp-10h] _BYTE *v19; // [rsp+88h] [rbp-8h] v19 = a1; v18 = a2; v17 = a3; if ( a3 && *v17 ) { v12 = v19; v11 = v18 + 8; v10 = v17; v3 = strlen(v17); ma_hash_password(v15, v10, v3); ma_hash_password(v14, v18, 8LL); ma_randominit((long long)v16, v14[0] ^ v15[0], v14[1] ^ v15[1]); while ( v18 < v11 ) { v4 = rnd((long long)v16); v5 = floor(v4 * 31.0); v6 = v19++; *v6 = (int)(v5 + 64.0); ++v18; } v7 = rnd((long long)v16); v13 = (int)floor(v7 * 31.0); while ( v12 != v19 ) { v8 = v12++; *v8 ^= v13; } } *v19 = 0; return v19; }
ma_scramble_323: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX CMP qword ptr [RBP + -0x18],0x0 JZ 0x00179f5f MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x00179f5f MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x8 MOV qword ptr [RBP + -0x78],RAX LEA RAX,[RBP + -0x50] MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x80],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x00138410 MOV RDI,qword ptr [RBP + -0x88] MOV RSI,qword ptr [RBP + -0x80] MOV EAX,EAX MOV EDX,EAX CALL 0x00179b10 LEA RDI,[RBP + -0x60] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,0x8 CALL 0x00179b10 MOV RSI,qword ptr [RBP + -0x50] XOR RSI,qword ptr [RBP + -0x60] MOV RDX,qword ptr [RBP + -0x48] XOR RDX,qword ptr [RBP + -0x58] LEA RDI,[RBP + -0x38] CALL 0x001799f0 LAB_00179ec1: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x78] JNC 0x00179f16 LEA RDI,[RBP + -0x38] CALL 0x00179a70 MOVSD XMM1,qword ptr [0x001e6640] MULSD XMM0,XMM1 CALL 0x00138110 MOVSD XMM1,qword ptr [0x001e6648] ADDSD XMM0,XMM1 CVTTSD2SI EAX,XMM0 MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x00179ec1 LAB_00179f16: LEA RDI,[RBP + -0x38] CALL 0x00179a70 MOVSD XMM1,qword ptr [0x001e6640] MULSD XMM0,XMM1 CALL 0x00138110 CVTTSD2SI EAX,XMM0 MOV byte ptr [RBP + -0x61],AL LAB_00179f37: MOV RAX,qword ptr [RBP + -0x70] CMP RAX,qword ptr [RBP + -0x8] JZ 0x00179f5d MOVSX EDX,byte ptr [RBP + -0x61] MOV RAX,qword ptr [RBP + -0x70] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x70],RCX MOVSX ECX,byte ptr [RAX] XOR ECX,EDX MOV byte ptr [RAX],CL JMP 0x00179f37 LAB_00179f5d: JMP 0x00179f5f LAB_00179f5f: MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x90 POP RBP RET
byte * ma_scramble_323(byte *param_1,ulong param_2,char *param_3) { size_t sVar1; double dVar2; byte *local_78; ulong local_68; ulong local_60; ulong local_58; ulong local_50; int1 local_40 [32]; char *local_20; ulong local_18; byte *local_10; local_10 = param_1; if ((param_3 != (char *)0x0) && (*param_3 != '\0')) { local_20 = param_3; local_18 = param_2; sVar1 = strlen(param_3); ma_hash_password(&local_58,param_3,sVar1 & 0xffffffff); ma_hash_password(&local_68,local_18,8); ma_randominit(local_40,local_58 ^ local_68,local_50 ^ local_60); for (; local_18 < param_2 + 8; local_18 = local_18 + 1) { dVar2 = (double)rnd(local_40); dVar2 = floor(dVar2 * DAT_001e6640); *local_10 = (byte)(int)(dVar2 + DAT_001e6648); local_10 = local_10 + 1; } dVar2 = (double)rnd(local_40); dVar2 = floor(dVar2 * DAT_001e6640); local_78 = param_1; while (local_78 != local_10) { *local_78 = *local_78 ^ (byte)(int)dVar2; local_78 = local_78 + 1; } } *local_10 = 0; return local_10; }
36,785
BAIL_OUT
eloqsql/unittest/mytap/tap.c
void BAIL_OUT(char const *fmt, ...) { va_list ap; va_start(ap, fmt); fprintf(tapout, "Bail out! "); vfprintf(tapout, fmt, ap); diag("%d tests planned, %d failed, %d was last executed", g_test.plan, g_test.failed, g_test.last); emit_endl(); va_end(ap); exit(255); }
O3
c
BAIL_OUT: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0xc8, %rsp movq %rdi, %rbx leaq -0xe0(%rbp), %rdi movq %rsi, 0x8(%rdi) movq %rdx, 0x10(%rdi) movq %rcx, 0x18(%rdi) movq %r8, 0x20(%rdi) movq %r9, 0x28(%rdi) testb %al, %al je 0x91f97 movaps %xmm0, -0xb0(%rbp) movaps %xmm1, -0xa0(%rbp) movaps %xmm2, -0x90(%rbp) movaps %xmm3, -0x80(%rbp) movaps %xmm4, -0x70(%rbp) movaps %xmm5, -0x60(%rbp) movaps %xmm6, -0x50(%rbp) movaps %xmm7, -0x40(%rbp) leaq -0x30(%rbp), %r14 movq %rdi, 0x10(%r14) leaq 0x10(%rbp), %rax movq %rax, 0x8(%r14) movabsq $0x3000000008, %rax # imm = 0x3000000008 movq %rax, (%r14) movq 0x2f3fed(%rip), %r15 # 0x385fa8 movq (%r15), %rdi leaq 0x4b21e(%rip), %rdx # 0xdd1e3 movl $0x1, %esi xorl %eax, %eax callq 0x29200 movq (%r15), %rdi movl $0x1, %esi movq %rbx, %rdx movq %r14, %rcx callq 0x29750 movl 0xb6fcd6(%rip), %esi # 0xc01cc0 movl 0xb6fcd8(%rip), %edx # 0xc01cc8 movl 0xb6fcce(%rip), %ecx # 0xc01cc4 leaq 0x4b1f1(%rip), %rdi # 0xdd1ee xorl %eax, %eax callq 0x92013 callq 0x92a0d movl $0xff, %edi callq 0x29540
BAIL_OUT: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 0C8h mov rbx, rdi lea rdi, [rbp+var_E0] mov [rdi+8], rsi mov [rdi+10h], rdx mov [rdi+18h], rcx mov [rdi+20h], r8 mov [rdi+28h], r9 test al, al jz short loc_91F97 movaps [rbp+var_B0], xmm0 movaps [rbp+var_A0], xmm1 movaps [rbp+var_90], xmm2 movaps [rbp+var_80], xmm3 movaps [rbp+var_70], xmm4 movaps [rbp+var_60], xmm5 movaps [rbp+var_50], xmm6 movaps [rbp+var_40], xmm7 loc_91F97: lea r14, [rbp+var_30] mov [r14+10h], rdi lea rax, [rbp+arg_0] mov [r14+8], rax mov rax, 3000000008h mov [r14], rax mov r15, cs:stdout_ptr mov rdi, [r15] lea rdx, aBailOut; "Bail out! " mov esi, 1 xor eax, eax call ___fprintf_chk mov rdi, [r15] mov esi, 1 mov rdx, rbx mov rcx, r14 call ___vfprintf_chk mov esi, cs:g_test mov edx, cs:dword_C01CC8 mov ecx, cs:dword_C01CC4 lea rdi, aDTestsPlannedD; "%d tests planned, %d failed, %d was l"... xor eax, eax call diag call emit_endl mov edi, 0FFh call _exit
void __noreturn BAIL_OUT( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { int v15; // r8d int v16; // r9d char v17; // [rsp+0h] [rbp-E0h] BYREF long long v18; // [rsp+8h] [rbp-D8h] long long v19; // [rsp+10h] [rbp-D0h] long long v20; // [rsp+18h] [rbp-C8h] long long v21; // [rsp+20h] [rbp-C0h] long long v22; // [rsp+28h] [rbp-B8h] __m128 v23; // [rsp+30h] [rbp-B0h] __m128 v24; // [rsp+40h] [rbp-A0h] __m128 v25; // [rsp+50h] [rbp-90h] __m128 v26; // [rsp+60h] [rbp-80h] __m128 v27; // [rsp+70h] [rbp-70h] __m128 v28; // [rsp+80h] [rbp-60h] __m128 v29; // [rsp+90h] [rbp-50h] __m128 v30; // [rsp+A0h] [rbp-40h] _QWORD v31[6]; // [rsp+B0h] [rbp-30h] BYREF v23 = a7; v24 = a8; v25 = a9; v26 = a10; v27 = a11; v28 = a12; v29 = a13; v30 = a14; v18 = a2; v19 = a3; v20 = a4; v21 = a5; v22 = a6; v31[2] = &v17; v31[1] = &a15; v31[0] = 0x3000000008LL; __fprintf_chk(stdout, 1LL, "Bail out! "); __vfprintf_chk(stdout, 1LL, a1, v31); diag( (unsigned int)"%d tests planned, %d failed, %d was last executed", g_test, dword_C01CC8, dword_C01CC4, v15, v16); emit_endl(); exit(255LL); }
BAIL_OUT: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xc8 MOV RBX,RDI LEA RDI,[RBP + -0xe0] MOV qword ptr [RDI + 0x8],RSI MOV qword ptr [RDI + 0x10],RDX MOV qword ptr [RDI + 0x18],RCX MOV qword ptr [RDI + 0x20],R8 MOV qword ptr [RDI + 0x28],R9 TEST AL,AL JZ 0x00191f97 MOVAPS xmmword ptr [RBP + -0xb0],XMM0 MOVAPS xmmword ptr [RBP + -0xa0],XMM1 MOVAPS xmmword ptr [RBP + -0x90],XMM2 MOVAPS xmmword ptr [RBP + -0x80],XMM3 MOVAPS xmmword ptr [RBP + -0x70],XMM4 MOVAPS xmmword ptr [RBP + -0x60],XMM5 MOVAPS xmmword ptr [RBP + -0x50],XMM6 MOVAPS xmmword ptr [RBP + -0x40],XMM7 LAB_00191f97: LEA R14,[RBP + -0x30] MOV qword ptr [R14 + 0x10],RDI LEA RAX,[RBP + 0x10] MOV qword ptr [R14 + 0x8],RAX MOV RAX,0x3000000008 MOV qword ptr [R14],RAX MOV R15,qword ptr [0x00485fa8] MOV RDI,qword ptr [R15] LEA RDX,[0x1dd1e3] MOV ESI,0x1 XOR EAX,EAX CALL 0x00129200 MOV RDI,qword ptr [R15] MOV ESI,0x1 MOV RDX,RBX MOV RCX,R14 CALL 0x00129750 MOV ESI,dword ptr [0x00d01cc0] MOV EDX,dword ptr [0x00d01cc8] MOV ECX,dword ptr [0x00d01cc4] LEA RDI,[0x1dd1ee] XOR EAX,EAX CALL 0x00192013 CALL 0x00192a0d MOV EDI,0xff CALL 0x00129540
void BAIL_OUT(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { int *puVar1; char in_AL; int1 local_e8 [8]; int8 local_e0; int8 local_d8; int8 local_d0; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; int1 *local_30; int1 *local_28; puVar1 = PTR_stdout_00485fa8; local_28 = local_e8; if (in_AL != '\0') { local_b8 = param_1; local_a8 = param_2; local_98 = param_3; local_88 = param_4; local_78 = param_5; local_68 = param_6; local_58 = param_7; local_48 = param_8; } local_30 = &stack0x00000008; local_38 = 0x3000000008; local_e0 = param_10; local_d8 = param_11; local_d0 = param_12; local_c8 = param_13; local_c0 = param_14; __fprintf_chk(*(int8 *)PTR_stdout_00485fa8,1,"Bail out! "); __vfprintf_chk(*(int8 *)puVar1,1,param_9,&local_38); diag("%d tests planned, %d failed, %d was last executed",g_test,DAT_00d01cc8,DAT_00d01cc4); emit_endl(); /* WARNING: Subroutine does not return */ exit(0xff); }
36,786
js_realloc
bluesky950520[P]quickjs/quickjs.c
void *js_realloc(JSContext *ctx, void *ptr, size_t size) { void *ret; ret = js_realloc_rt(ctx->rt, ptr, size); if (unlikely(!ret && size != 0)) { JS_ThrowOutOfMemory(ctx); return NULL; } return ret; }
O0
c
js_realloc: subq $0x48, %rsp movq %rdi, 0x38(%rsp) movq %rsi, 0x30(%rsp) movq %rdx, 0x28(%rsp) movq 0x38(%rsp), %rax movq 0x18(%rax), %rdi movq 0x30(%rsp), %rsi movq 0x28(%rsp), %rdx callq 0x20720 movq %rax, 0x20(%rsp) xorl %eax, %eax cmpq $0x0, 0x20(%rsp) movb %al, 0xf(%rsp) jne 0x20b6b cmpq $0x0, 0x28(%rsp) setne %al movb %al, 0xf(%rsp) movb 0xf(%rsp), %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x20b9f movq 0x38(%rsp), %rdi callq 0x20950 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq $0x0, 0x40(%rsp) jmp 0x20ba9 movq 0x20(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rax addq $0x48, %rsp retq nopw %cs:(%rax,%rax)
js_realloc: sub rsp, 48h mov [rsp+48h+var_10], rdi mov [rsp+48h+var_18], rsi mov [rsp+48h+var_20], rdx mov rax, [rsp+48h+var_10] mov rdi, [rax+18h] mov rsi, [rsp+48h+var_18] mov rdx, [rsp+48h+var_20] call js_realloc_rt mov [rsp+48h+var_28], rax xor eax, eax cmp [rsp+48h+var_28], 0 mov [rsp+48h+var_39], al jnz short loc_20B6B cmp [rsp+48h+var_20], 0 setnz al mov [rsp+48h+var_39], al loc_20B6B: mov al, [rsp+48h+var_39] xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_20B9F mov rdi, [rsp+48h+var_10] call JS_ThrowOutOfMemory mov [rsp+48h+var_38], rax mov [rsp+48h+var_30], rdx mov [rsp+48h+var_8], 0 jmp short loc_20BA9 loc_20B9F: mov rax, [rsp+48h+var_28] mov [rsp+48h+var_8], rax loc_20BA9: mov rax, [rsp+48h+var_8] add rsp, 48h retn
long long js_realloc(long long a1, long long a2, long long a3) { int v3; // edx long long v4; // rcx int v5; // r8d int v6; // r9d bool v8; // [rsp+Fh] [rbp-39h] long long v9; // [rsp+20h] [rbp-28h] v9 = js_realloc_rt(*(_QWORD *)(a1 + 24), a2, a3); v8 = 0; if ( !v9 ) v8 = a3 != 0; if ( !v8 ) return v9; JS_ThrowOutOfMemory(a1, a2, v3, v4, v5, v6); return 0LL; }
js_realloc: SUB RSP,0x48 MOV qword ptr [RSP + 0x38],RDI MOV qword ptr [RSP + 0x30],RSI MOV qword ptr [RSP + 0x28],RDX MOV RAX,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x28] CALL 0x00120720 MOV qword ptr [RSP + 0x20],RAX XOR EAX,EAX CMP qword ptr [RSP + 0x20],0x0 MOV byte ptr [RSP + 0xf],AL JNZ 0x00120b6b CMP qword ptr [RSP + 0x28],0x0 SETNZ AL MOV byte ptr [RSP + 0xf],AL LAB_00120b6b: MOV AL,byte ptr [RSP + 0xf] XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00120b9f MOV RDI,qword ptr [RSP + 0x38] CALL 0x00120950 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX MOV qword ptr [RSP + 0x40],0x0 JMP 0x00120ba9 LAB_00120b9f: MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x40],RAX LAB_00120ba9: MOV RAX,qword ptr [RSP + 0x40] ADD RSP,0x48 RET
long js_realloc(long param_1,int8 param_2,long param_3) { long local_8; local_8 = js_realloc_rt(*(int8 *)(param_1 + 0x18),param_2,param_3); if (local_8 == 0 && param_3 != 0) { JS_ThrowOutOfMemory(param_1); local_8 = 0; } return local_8; }
36,787
js_realloc
bluesky950520[P]quickjs/quickjs.c
void *js_realloc(JSContext *ctx, void *ptr, size_t size) { void *ret; ret = js_realloc_rt(ctx->rt, ptr, size); if (unlikely(!ret && size != 0)) { JS_ThrowOutOfMemory(ctx); return NULL; } return ret; }
O1
c
js_realloc: pushq %r14 pushq %rbx pushq %rax movq %rdx, %r14 movq %rdi, %rbx movq 0x18(%rdi), %rdi callq 0x1beae testq %rax, %rax setne %cl testq %r14, %r14 sete %dl orb %cl, %dl je 0x1bfef addq $0x8, %rsp popq %rbx popq %r14 retq movq %rbx, %rdi callq 0x1bf4f xorl %eax, %eax jmp 0x1bfe7
js_realloc: push r14 push rbx push rax mov r14, rdx mov rbx, rdi mov rdi, [rdi+18h] call js_realloc_rt test rax, rax setnz cl test r14, r14 setz dl or dl, cl jz short loc_1BFEF loc_1BFE7: add rsp, 8 pop rbx pop r14 retn loc_1BFEF: mov rdi, rbx call JS_ThrowOutOfMemory xor eax, eax jmp short loc_1BFE7
long long js_realloc(long long a1, long long a2, long long a3) { long long result; // rax int v5; // ecx int v6; // r8d int v7; // r9d int v8; // edx result = js_realloc_rt(*(_QWORD *)(a1 + 24), a2, a3); LOBYTE(v8) = result != 0 || a3 == 0; if ( !(_BYTE)v8 ) { LOBYTE(v5) = result != 0; JS_ThrowOutOfMemory(a1, a2, v8, v5, v6, v7); return 0LL; } return result; }
js_realloc: PUSH R14 PUSH RBX PUSH RAX MOV R14,RDX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x18] CALL 0x0011beae TEST RAX,RAX SETNZ CL TEST R14,R14 SETZ DL OR DL,CL JZ 0x0011bfef LAB_0011bfe7: ADD RSP,0x8 POP RBX POP R14 RET LAB_0011bfef: MOV RDI,RBX CALL 0x0011bf4f XOR EAX,EAX JMP 0x0011bfe7
long js_realloc(long param_1,int8 param_2,long param_3) { long lVar1; lVar1 = js_realloc_rt(*(int8 *)(param_1 + 0x18)); if (param_3 != 0 && lVar1 == 0) { JS_ThrowOutOfMemory(param_1); lVar1 = 0; } return lVar1; }
36,788
js_realloc
bluesky950520[P]quickjs/quickjs.c
void *js_realloc(JSContext *ctx, void *ptr, size_t size) { void *ret; ret = js_realloc_rt(ctx->rt, ptr, size); if (unlikely(!ret && size != 0)) { JS_ThrowOutOfMemory(ctx); return NULL; } return ret; }
O3
c
js_realloc: pushq %r15 pushq %r14 pushq %rbx movq %rdx, %r15 movq %rdi, %rbx movq 0x18(%rdi), %rdi callq 0x1c76e movq %rax, %r14 testq %rax, %rax setne %al testq %r15, %r15 sete %cl orb %al, %cl je 0x1c8b4 movq %r14, %rax popq %rbx popq %r14 popq %r15 retq movq %rbx, %rdi callq 0x1c80f jmp 0x1c8ab
js_realloc: push r15 push r14 push rbx mov r15, rdx mov rbx, rdi mov rdi, [rdi+18h] call js_realloc_rt mov r14, rax test rax, rax setnz al test r15, r15 setz cl or cl, al jz short loc_1C8B4 loc_1C8AB: mov rax, r14 pop rbx pop r14 pop r15 retn loc_1C8B4: mov rdi, rbx call JS_ThrowOutOfMemory jmp short loc_1C8AB
long long js_realloc(long long a1, long long a2, long long a3) { int v4; // edx int v5; // r8d int v6; // r9d long long v7; // r14 int v8; // ecx v7 = js_realloc_rt(*(_QWORD *)(a1 + 24), a2, a3); LOBYTE(v8) = v7 != 0 || a3 == 0; if ( !(_BYTE)v8 ) JS_ThrowOutOfMemory(a1, a2, v4, v8, v5, v6); return v7; }
js_realloc: PUSH R15 PUSH R14 PUSH RBX MOV R15,RDX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x18] CALL 0x0011c76e MOV R14,RAX TEST RAX,RAX SETNZ AL TEST R15,R15 SETZ CL OR CL,AL JZ 0x0011c8b4 LAB_0011c8ab: MOV RAX,R14 POP RBX POP R14 POP R15 RET LAB_0011c8b4: MOV RDI,RBX CALL 0x0011c80f JMP 0x0011c8ab
long js_realloc(long param_1,int8 param_2,long param_3) { long lVar1; lVar1 = js_realloc_rt(*(int8 *)(param_1 + 0x18)); if (param_3 != 0 && lVar1 == 0) { JS_ThrowOutOfMemory(param_1); } return lVar1; }
36,789
yoyo::Logger::createlogDir()
isyoCode[P]yoyologger/test/./../src/logger.hpp
void createlogDir() { std::string logdir = getLogDirName(); std::filesystem::path dir(logdir); if (!std::filesystem::exists(dir)) { std::filesystem::create_directories(dir); } }
O3
cpp
yoyo::Logger::createlogDir(): pushq %rbx subq $0x50, %rsp movq %rdi, %rsi leaq 0x8(%rsp), %rbx movq %rbx, %rdi callq 0x5384 leaq 0x28(%rsp), %rdi movq %rbx, %rsi movl $0x2, %edx callq 0x5440 leaq 0x28(%rsp), %rdi callq 0x30c0 cmpb $-0x1, %al je 0x4b60 movzbl %al, %eax testl %eax, %eax jne 0x4b6a leaq 0x28(%rsp), %rdi callq 0x3190 leaq 0x28(%rsp), %rdi callq 0x54c0 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x4b8f movq 0x18(%rsp), %rsi incq %rsi callq 0x32e0 addq $0x50, %rsp popq %rbx retq movq %rax, %rbx jmp 0x4ba7 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x54c0 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x4bc2 movq 0x18(%rsp), %rsi incq %rsi callq 0x32e0 movq %rbx, %rdi callq 0x3420
_ZN4yoyo6Logger12createlogDirEv: push rbx sub rsp, 50h mov rsi, rdi lea rbx, [rsp+58h+var_50] mov rdi, rbx call _ZNK4yoyo6Logger13getLogDirNameB5cxx11Ev; yoyo::Logger::getLogDirName(void) lea rdi, [rsp+58h+var_30]; this mov rsi, rbx; std::filesystem::__cxx11::path * mov edx, 2 call _ZNSt10filesystem7__cxx114pathC2INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES1_EERKT_NS1_6formatE; std::filesystem::__cxx11::path::path<std::string,std::filesystem::__cxx11::path>(std::string const&,std::filesystem::__cxx11::path::format) lea rdi, [rsp+58h+var_30]; this call __ZNSt10filesystem6statusERKNS_7__cxx114pathE; std::filesystem::status(std::filesystem::__cxx11::path const&) cmp al, 0FFh jz short loc_4B60 movzx eax, al test eax, eax jnz short loc_4B6A loc_4B60: lea rdi, [rsp+58h+var_30]; this call __ZNSt10filesystem18create_directoriesERKNS_7__cxx114pathE; std::filesystem::create_directories(std::filesystem::__cxx11::path const&) loc_4B6A: lea rdi, [rsp+58h+var_30]; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() lea rax, [rsp+58h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_4B8F mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4B8F: add rsp, 50h pop rbx retn mov rbx, rax jmp short loc_4BA7 mov rbx, rax lea rdi, [rsp+arg_20]; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() loc_4BA7: lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_4BC2 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4BC2: mov rdi, rbx call __Unwind_Resume
void yoyo::Logger::createlogDir(yoyo::Logger *this, long long a2, int a3, int a4, int a5, int a6) { char v6; // al void *v7[2]; // [rsp+8h] [rbp-50h] BYREF long long v8; // [rsp+18h] [rbp-40h] BYREF _BYTE v9[48]; // [rsp+28h] [rbp-30h] BYREF yoyo::Logger::getLogDirName[abi:cxx11]((unsigned int)v7, (_DWORD)this, a3, a4, a5, a6); std::filesystem::__cxx11::path::path<std::string,std::filesystem::__cxx11::path>((std::filesystem::__cxx11::path *)v9); v6 = std::filesystem::status((std::filesystem *)v9, (const std::filesystem::__cxx11::path *)v7); if ( v6 == -1 || !v6 ) std::filesystem::create_directories((std::filesystem *)v9, (const std::filesystem::__cxx11::path *)v7); std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)v9); if ( v7[0] != &v8 ) operator delete(v7[0], v8 + 1); }
createlogDir: PUSH RBX SUB RSP,0x50 MOV RSI,RDI LEA RBX,[RSP + 0x8] MOV RDI,RBX CALL 0x00105384 LAB_00104b39: LEA RDI,[RSP + 0x28] MOV RSI,RBX MOV EDX,0x2 CALL 0x00105440 LAB_00104b4b: LEA RDI,[RSP + 0x28] CALL 0x001030c0 CMP AL,0xff JZ 0x00104b60 MOVZX EAX,AL TEST EAX,EAX JNZ 0x00104b6a LAB_00104b60: LEA RDI,[RSP + 0x28] CALL 0x00103190 LAB_00104b6a: LEA RDI,[RSP + 0x28] CALL 0x001054c0 LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00104b8f MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001032e0 LAB_00104b8f: ADD RSP,0x50 POP RBX RET
/* yoyo::Logger::createlogDir() */ void yoyo::Logger::createlogDir(void) { char cVar1; long *local_50 [2]; long local_40 [2]; path local_30 [40]; getLogDirName_abi_cxx11_(); /* try { // try from 00104b39 to 00104b4a has its CatchHandler @ 00104b95 */ std::filesystem::__cxx11::path::path<std::__cxx11::string,std::filesystem::__cxx11::path> (local_30,local_50,2); /* try { // try from 00104b4b to 00104b69 has its CatchHandler @ 00104b9a */ cVar1 = std::filesystem::status(local_30); if ((cVar1 == -1) || (cVar1 == '\0')) { std::filesystem::create_directories(local_30); } std::filesystem::__cxx11::path::~path(local_30); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } return; }
36,790
void mcp::logger::log<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [2], int const&, char const (&) [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12], int&>(mcp::log_level, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [2], int const&, char const (&) [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12], int&)
hkr04[P]cpp-mcp/include/mcp_logger.h
void log(log_level level, Args&&... args) { if (level < level_) { return; } std::stringstream ss; // Add timestamp auto now = std::chrono::system_clock::now(); auto now_c = std::chrono::system_clock::to_time_t(now); auto now_tm = std::localtime(&now_c); ss << std::put_time(now_tm, "%Y-%m-%d %H:%M:%S") << " "; // Add log level and color switch (level) { case log_level::debug: ss << "\033[36m[DEBUG]\033[0m "; // Cyan break; case log_level::info: ss << "\033[32m[INFO]\033[0m "; // Green break; case log_level::warning: ss << "\033[33m[WARNING]\033[0m "; // Yellow break; case log_level::error: ss << "\033[31m[ERROR]\033[0m "; // Red break; } // Add log content log_impl(ss, std::forward<Args>(args)...); // Output log std::lock_guard<std::mutex> lock(mutex_); std::cerr << ss.str() << std::endl; }
O0
c
void mcp::logger::log<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [2], int const&, char const (&) [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12], int&>(mcp::log_level, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [2], int const&, char const (&) [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12], int&): subq $0x238, %rsp # imm = 0x238 movq %rdi, 0x230(%rsp) movl %esi, 0x22c(%rsp) movq %rdx, 0x220(%rsp) movq %rcx, 0x218(%rsp) movq 0x230(%rsp), %rcx movq %rcx, 0x28(%rsp) movl 0x22c(%rsp), %eax cmpl (%rcx), %eax jge 0xdcef3 jmp 0xdd0c1 leaq 0x90(%rsp), %rdi callq 0xc620 callq 0xc090 movq %rax, 0x88(%rsp) leaq 0x88(%rsp), %rdi callq 0x125f0 movq %rax, 0x80(%rsp) leaq 0x80(%rsp), %rdi callq 0xc6b0 movq %rax, 0x78(%rsp) leaq 0xa0(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x78(%rsp), %rdi leaq 0xd0d2(%rip), %rsi # 0xea01f callq 0xaa5c0 movq 0x18(%rsp), %rdi movq %rax, 0x68(%rsp) movq %rdx, 0x70(%rsp) movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx callq 0xaa250 movq %rax, 0x20(%rsp) jmp 0xdcf77 movq 0x20(%rsp), %rdi leaq 0xd11e(%rip), %rsi # 0xea0a1 callq 0xc890 jmp 0xdcf8a movl 0x22c(%rsp), %eax movq %rax, 0x10(%rsp) subq $0x3, %rax ja 0xdd028 movq 0x10(%rsp), %rax leaq 0xc840(%rip), %rcx # 0xe97ec movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x5c(%rsp) jmp 0xdd0fb leaq 0xa0(%rsp), %rdi leaq 0xd05a(%rip), %rsi # 0xea031 callq 0xc890 jmp 0xdcfde jmp 0xdd028 leaq 0xa0(%rsp), %rdi leaq 0xd054(%rip), %rsi # 0xea043 callq 0xc890 jmp 0xdcff6 jmp 0xdd028 leaq 0xa0(%rsp), %rdi leaq 0xd04d(%rip), %rsi # 0xea054 callq 0xc890 jmp 0xdd00e jmp 0xdd028 leaq 0xa0(%rsp), %rdi leaq 0xd049(%rip), %rsi # 0xea068 callq 0xc890 jmp 0xdd026 jmp 0xdd028 movq 0x28(%rsp), %rdi movq 0x220(%rsp), %rdx movq 0x218(%rsp), %rcx leaq 0x90(%rsp), %rsi callq 0xdd120 jmp 0xdd04c movq 0x28(%rsp), %rsi addq $0x8, %rsi leaq 0x50(%rsp), %rdi callq 0x12370 jmp 0xdd061 leaq 0x30(%rsp), %rdi leaq 0x90(%rsp), %rsi callq 0xc880 jmp 0xdd075 movq 0x60f6c(%rip), %rdi # 0x13dfe8 leaq 0x30(%rsp), %rsi callq 0xc7c0 movq %rax, 0x8(%rsp) jmp 0xdd08d movq 0x8(%rsp), %rdi movq 0x60e7f(%rip), %rsi # 0x13df18 callq 0xc910 jmp 0xdd0a0 leaq 0x30(%rsp), %rdi callq 0xcfd0 leaq 0x50(%rsp), %rdi callq 0x12420 leaq 0x90(%rsp), %rdi callq 0xc6c0 addq $0x238, %rsp # imm = 0x238 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x5c(%rsp) jmp 0xdd0f1 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x5c(%rsp) leaq 0x30(%rsp), %rdi callq 0xcfd0 leaq 0x50(%rsp), %rdi callq 0x12420 leaq 0x90(%rsp), %rdi callq 0xc6c0 movq 0x60(%rsp), %rdi callq 0xce40 nopw %cs:(%rax,%rax) nopl (%rax)
_ZN3mcp6logger3logIJRA47_KcPS2_EEEvNS_9log_levelEDpOT_: sub rsp, 238h mov [rsp+238h+var_8], rdi mov [rsp+238h+var_C], esi mov [rsp+238h+var_18], rdx mov [rsp+238h+var_20], rcx mov rcx, [rsp+238h+var_8] mov [rsp+238h+var_210], rcx mov eax, [rsp+238h+var_C] cmp eax, [rcx] jge short loc_DCEF3 jmp loc_DD0C1 loc_DCEF3: lea rdi, [rsp+238h+var_1A8]; this call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void) mov [rsp+238h+var_1B0], rax lea rdi, [rsp+238h+var_1B0] call _ZNSt6chrono3_V212system_clock9to_time_tERKNS_10time_pointIS1_NS_8durationIlSt5ratioILl1ELl1000000000EEEEEE; std::chrono::_V2::system_clock::to_time_t(std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&) mov [rsp+238h+var_1B8], rax lea rdi, [rsp+238h+var_1B8] call _localtime mov [rsp+238h+var_1C0], rax lea rax, [rsp+238h+var_198] mov [rsp+238h+var_220], rax mov rdi, [rsp+238h+var_1C0] lea rsi, aYMDHMS; "%Y-%m-%d %H:%M:%S" call _ZSt8put_timeIcESt9_Put_timeIT_EPK2tmPKS1_; std::put_time<char>(tm const*,char const*) mov rdi, [rsp+238h+var_220] mov [rsp+238h+var_1D0], rax mov [rsp+238h+var_1C8], rdx mov rsi, [rsp+238h+var_1D0] mov rdx, [rsp+238h+var_1C8] call _ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St9_Put_timeIS3_E; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Put_time<char>) mov [rsp+238h+var_218], rax jmp short $+2 loc_DCF77: mov rdi, [rsp+238h+var_218] lea rsi, aHttp11_1+0Ah; " " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_DCF8A: mov eax, [rsp+238h+var_C] mov [rsp+238h+var_228], rax sub rax, 3; switch 4 cases ja def_DCFB3; jumptable 00000000000DCFB3 default case mov rax, [rsp+238h+var_228] lea rcx, jpt_DCFB3 movsxd rax, ds:(jpt_DCFB3 - 0E97ECh)[rcx+rax*4] add rax, rcx jmp rax; switch jump mov rcx, rax mov eax, edx mov [rsp+arg_58], rcx mov [rsp+arg_54], eax jmp loc_DD0FB loc_DCFC8: lea rdi, [rsp+238h+var_198]; jumptable 00000000000DCFB3 case 0 lea rsi, a36mDebug0m; "\x1B[36m[DEBUG]\x1B[0m " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_DCFDE: jmp short def_DCFB3; jumptable 00000000000DCFB3 default case loc_DCFE0: lea rdi, [rsp+238h+var_198]; jumptable 00000000000DCFB3 case 1 lea rsi, a32mInfo0m; "\x1B[32m[INFO]\x1B[0m " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_DCFF6: jmp short def_DCFB3; jumptable 00000000000DCFB3 default case loc_DCFF8: lea rdi, [rsp+238h+var_198]; jumptable 00000000000DCFB3 case 2 lea rsi, a33mWarning0m; "\x1B[33m[WARNING]\x1B[0m " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_DD00E: jmp short def_DCFB3; jumptable 00000000000DCFB3 default case loc_DD010: lea rdi, [rsp+238h+var_198]; jumptable 00000000000DCFB3 case 3 lea rsi, a31mError0m; "\x1B[31m[ERROR]\x1B[0m " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_DD026: jmp short $+2; jumptable 00000000000DCFB3 default case def_DCFB3: mov rdi, [rsp+238h+var_210]; jumptable 00000000000DCFB3 default case mov rdx, [rsp+238h+var_18] mov rcx, [rsp+238h+var_20] lea rsi, [rsp+238h+var_1A8] call _ZN3mcp6logger8log_implIRA47_KcJPS2_EEEvRNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEEOT_DpOT0_; mcp::logger::log_impl<char const(&)[47],char const*>(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> &,char const(&)[47] &&,char const* &&) jmp short $+2 loc_DD04C: mov rsi, [rsp+238h+var_210] add rsi, 8 lea rdi, [rsp+238h+var_1E8] call _ZNSt10lock_guardISt5mutexEC2ERS0_; std::lock_guard<std::mutex>::lock_guard(std::mutex&) jmp short $+2 loc_DD061: lea rdi, [rsp+238h+var_208] lea rsi, [rsp+238h+var_1A8] call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void) jmp short $+2 loc_DD075: mov rdi, cs:_ZSt4cerr_ptr lea rsi, [rsp+238h+var_208] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rsp+238h+var_230], rax jmp short $+2 loc_DD08D: mov rdi, [rsp+238h+var_230] mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) jmp short $+2 loc_DD0A0: lea rdi, [rsp+238h+var_208]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+238h+var_1E8] call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard() lea rdi, [rsp+238h+var_1A8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() loc_DD0C1: add rsp, 238h retn mov rcx, rax mov eax, edx mov [rsp+arg_58], rcx mov [rsp+arg_54], eax jmp short loc_DD0F1 mov rcx, rax mov eax, edx mov [rsp+arg_58], rcx mov [rsp+arg_54], eax lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_DD0F1: lea rdi, [rsp+arg_48] call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard() loc_DD0FB: lea rdi, [rsp+arg_88] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rdi, [rsp+arg_58] call __Unwind_Resume
long long mcp::logger::log<char const(&)[47],char const*>(_DWORD *a1, unsigned int a2, long long a3, long long a4) { long long result; // rax long long v5; // rdx long long v6; // [rsp+8h] [rbp-230h] std::ostream *v7; // [rsp+20h] [rbp-218h] _BYTE v8[32]; // [rsp+30h] [rbp-208h] BYREF std::mutex *v9[3]; // [rsp+50h] [rbp-1E8h] BYREF long long v10; // [rsp+68h] [rbp-1D0h] long long v11; // [rsp+70h] [rbp-1C8h] long long v12; // [rsp+78h] [rbp-1C0h] long long v13; // [rsp+80h] [rbp-1B8h] BYREF long long v14; // [rsp+88h] [rbp-1B0h] BYREF _BYTE v15[16]; // [rsp+90h] [rbp-1A8h] BYREF _BYTE v16[376]; // [rsp+A0h] [rbp-198h] BYREF long long v17; // [rsp+218h] [rbp-20h] long long v18; // [rsp+220h] [rbp-18h] unsigned int v19; // [rsp+22Ch] [rbp-Ch] _DWORD *v20; // [rsp+230h] [rbp-8h] v20 = a1; v19 = a2; v18 = a3; v17 = a4; result = a2; if ( (signed int)a2 >= *a1 ) { std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v15); v14 = std::chrono::_V2::system_clock::now((std::chrono::_V2::system_clock *)v15); v13 = std::chrono::_V2::system_clock::to_time_t((long long)&v14); v12 = localtime(&v13); v10 = std::put_time<char>(v12, "%Y-%m-%d %H:%M:%S"); v11 = v5; v7 = std::operator<<<char,std::char_traits<char>>((std::ostream *)v16, v10, v5); std::operator<<<std::char_traits<char>>(v7, " "); switch ( v19 ) { case 0u: std::operator<<<std::char_traits<char>>(v16, "\x1B[36m[DEBUG]\x1B[0m "); break; case 1u: std::operator<<<std::char_traits<char>>(v16, "\x1B[32m[INFO]\x1B[0m "); break; case 2u: std::operator<<<std::char_traits<char>>(v16, "\x1B[33m[WARNING]\x1B[0m "); break; case 3u: std::operator<<<std::char_traits<char>>(v16, "\x1B[31m[ERROR]\x1B[0m "); break; default: break; } mcp::logger::log_impl<char const(&)[47],char const*>(a1, v15, v18, v17); std::lock_guard<std::mutex>::lock_guard(v9, (std::mutex *)(a1 + 2)); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(v8, v15); v6 = std::operator<<<char>(&std::cerr, v8); std::ostream::operator<<(v6, &std::endl<char,std::char_traits<char>>); std::string::~string(v8); std::lock_guard<std::mutex>::~lock_guard(v9); return std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v15); } return result; }
log<char_const(&)[47],char_const*>: SUB RSP,0x238 MOV qword ptr [RSP + 0x230],RDI MOV dword ptr [RSP + 0x22c],ESI MOV qword ptr [RSP + 0x220],RDX MOV qword ptr [RSP + 0x218],RCX MOV RCX,qword ptr [RSP + 0x230] MOV qword ptr [RSP + 0x28],RCX MOV EAX,dword ptr [RSP + 0x22c] CMP EAX,dword ptr [RCX] JGE 0x001dcef3 JMP 0x001dd0c1 LAB_001dcef3: LEA RDI,[RSP + 0x90] CALL 0x0010c620 CALL 0x0010c090 MOV qword ptr [RSP + 0x88],RAX LEA RDI,[RSP + 0x88] CALL 0x001125f0 MOV qword ptr [RSP + 0x80],RAX LEA RDI,[RSP + 0x80] CALL 0x0010c6b0 MOV qword ptr [RSP + 0x78],RAX LEA RAX,[RSP + 0xa0] MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x78] LEA RSI,[0x1ea01f] CALL 0x001aa5c0 MOV RDI,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x68],RAX MOV qword ptr [RSP + 0x70],RDX MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] LAB_001dcf6b: CALL 0x001aa250 MOV qword ptr [RSP + 0x20],RAX JMP 0x001dcf77 LAB_001dcf77: MOV RDI,qword ptr [RSP + 0x20] LEA RSI,[0x1ea0a1] CALL 0x0010c890 JMP 0x001dcf8a LAB_001dcf8a: MOV EAX,dword ptr [RSP + 0x22c] MOV qword ptr [RSP + 0x10],RAX SUB RAX,0x3 JA 0x001dd028 MOV RAX,qword ptr [RSP + 0x10] LEA RCX,[0x1e97ec] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: LEA RDI,[RSP + 0xa0] LEA RSI,[0x1ea031] CALL 0x0010c890 JMP 0x001dcfde LAB_001dcfde: JMP 0x001dd028 caseD_1: LEA RDI,[RSP + 0xa0] LEA RSI,[0x1ea043] CALL 0x0010c890 JMP 0x001dcff6 LAB_001dcff6: JMP 0x001dd028 caseD_2: LEA RDI,[RSP + 0xa0] LEA RSI,[0x1ea054] CALL 0x0010c890 JMP 0x001dd00e LAB_001dd00e: JMP 0x001dd028 caseD_3: LEA RDI,[RSP + 0xa0] LEA RSI,[0x1ea068] CALL 0x0010c890 JMP 0x001dd026 LAB_001dd026: JMP 0x001dd028 default: MOV RDI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x220] MOV RCX,qword ptr [RSP + 0x218] LEA RSI,[RSP + 0x90] CALL 0x001dd120 JMP 0x001dd04c LAB_001dd04c: MOV RSI,qword ptr [RSP + 0x28] ADD RSI,0x8 LEA RDI,[RSP + 0x50] CALL 0x00112370 JMP 0x001dd061 LAB_001dd061: LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x90] CALL 0x0010c880 JMP 0x001dd075 LAB_001dd075: MOV RDI,qword ptr [0x0023dfe8] LEA RSI,[RSP + 0x30] CALL 0x0010c7c0 MOV qword ptr [RSP + 0x8],RAX JMP 0x001dd08d LAB_001dd08d: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [0x0023df18] CALL 0x0010c910 LAB_001dd09e: JMP 0x001dd0a0 LAB_001dd0a0: LEA RDI,[RSP + 0x30] CALL 0x0010cfd0 LEA RDI,[RSP + 0x50] CALL 0x00112420 LEA RDI,[RSP + 0x90] CALL 0x0010c6c0 LAB_001dd0c1: ADD RSP,0x238 RET
/* void mcp::logger::log<char const (&) [47], char const*>(mcp::log_level, char const (&) [47], char const*&&) */ void __thiscall mcp::logger::log<char_const(&)[47],char_const*> (logger *this,int param_2,char *param_3,char **param_4) { ostream *poVar1; string local_208 [32]; lock_guard<std::mutex> local_1e8 [24]; int1 local_1d0 [16]; tm *local_1c0; time_t local_1b8; int8 local_1b0; stringstream local_1a8 [16]; ostream local_198 [376]; char **local_20; char *local_18; int local_c; logger *local_8; if (*(int *)this <= param_2) { local_20 = param_4; local_18 = param_3; local_c = param_2; local_8 = this; std::__cxx11::stringstream::stringstream(local_1a8); local_1b0 = std::chrono::_V2::system_clock::now(); local_1b8 = std::chrono::_V2::system_clock::to_time_t((time_point *)&local_1b0); local_1c0 = localtime(&local_1b8); local_1d0 = std::put_time<char>(local_1c0,"%Y-%m-%d %H:%M:%S"); /* try { // try from 001dcf6b to 001dd05e has its CatchHandler @ 001dcfb5 */ poVar1 = std::operator<<(local_198,local_1d0._0_8_,local_1d0._8_8_); std::operator<<(poVar1," "); switch(local_c) { case 0: std::operator<<(local_198,"\x1b[36m[DEBUG]\x1b[0m "); break; case 1: std::operator<<(local_198,"\x1b[32m[INFO]\x1b[0m "); break; case 2: std::operator<<(local_198,"\x1b[33m[WARNING]\x1b[0m "); break; case 3: std::operator<<(local_198,"\x1b[31m[ERROR]\x1b[0m "); } log_impl<char_const(&)[47],char_const*>(this,local_1a8,local_18,local_20); std::lock_guard<std::mutex>::lock_guard(local_1e8,(mutex *)(this + 8)); /* try { // try from 001dd061 to 001dd072 has its CatchHandler @ 001dd0c9 */ std::__cxx11::stringstream::str(); /* try { // try from 001dd075 to 001dd09d has its CatchHandler @ 001dd0d9 */ poVar1 = std::operator<<((ostream *)PTR_cerr_0023dfe8,local_208); std::ostream::operator<< (poVar1,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_0023df18 ); std::__cxx11::string::~string(local_208); std::lock_guard<std::mutex>::~lock_guard(local_1e8); std::__cxx11::stringstream::~stringstream(local_1a8); } return; }
36,791
void mcp::logger::log<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [2], int const&, char const (&) [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12], int&>(mcp::log_level, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [2], int const&, char const (&) [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12], int&)
hkr04[P]cpp-mcp/include/mcp_logger.h
void log(log_level level, Args&&... args) { if (level < level_) { return; } std::stringstream ss; // Add timestamp auto now = std::chrono::system_clock::now(); auto now_c = std::chrono::system_clock::to_time_t(now); auto now_tm = std::localtime(&now_c); ss << std::put_time(now_tm, "%Y-%m-%d %H:%M:%S") << " "; // Add log level and color switch (level) { case log_level::debug: ss << "\033[36m[DEBUG]\033[0m "; // Cyan break; case log_level::info: ss << "\033[32m[INFO]\033[0m "; // Green break; case log_level::warning: ss << "\033[33m[WARNING]\033[0m "; // Yellow break; case log_level::error: ss << "\033[31m[ERROR]\033[0m "; // Red break; } // Add log content log_impl(ss, std::forward<Args>(args)...); // Output log std::lock_guard<std::mutex> lock(mutex_); std::cerr << ss.str() << std::endl; }
O1
c
void mcp::logger::log<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [2], int const&, char const (&) [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12], int&>(mcp::log_level, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [2], int const&, char const (&) [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12], int&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x1b0, %rsp # imm = 0x1B0 cmpl %esi, (%rdi) jg 0x5597b movq %rcx, %r14 movq %rdx, %r15 movl %esi, %ebp movq %rdi, %rbx leaq 0x28(%rsp), %rdi callq 0xa440 callq 0xa070 movabsq $0x112e0be826d694b3, %rcx # imm = 0x112E0BE826D694B3 imulq %rcx movq %rdx, %rax shrq $0x3f, %rax sarq $0x1a, %rdx addq %rax, %rdx leaq 0x20(%rsp), %rdi movq %rdx, (%rdi) callq 0xa4d0 leaq 0x38(%rsp), %r12 leaq 0x5565(%rip), %rdx # 0x5ade8 movq %r12, %rdi movq %rax, %rsi callq 0x42d9c leaq 0x55d5(%rip), %rsi # 0x5ae6a movl $0x1, %edx movq %rax, %rdi callq 0xa6f0 cmpl $0x4, %ebp jae 0x558c7 movl %ebp, %eax leaq 0x266d8(%rip), %rcx # 0x7bf88 movq (%rcx,%rax,8), %rsi leaq 0x99fd(%rip), %rcx # 0x5f2b8 movq (%rcx,%rax,8), %rdx movq %r12, %rdi callq 0xa6f0 leaq 0x28(%rsp), %rsi movq %rbx, %rdi movq %r15, %rdx movq %r14, %rcx callq 0x559ea addq $0x8, %rbx movq %rbx, %rdi callq 0xa8d0 testl %eax, %eax jne 0x5598b leaq 0x40(%rsp), %rsi movq %rsp, %rdi callq 0xa920 movq (%rsp), %rsi movq 0x8(%rsp), %rdx movq 0x276dd(%rip), %rdi # 0x7cfe8 callq 0xa6f0 movq %rax, %r14 movq (%rax), %rax movq -0x18(%rax), %rdi addq %r14, %rdi movl $0xa, %esi callq 0xa610 movsbl %al, %esi movq %r14, %rdi callq 0xa040 movq %rax, %rdi callq 0xa420 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x55955 movq 0x10(%rsp), %rsi incq %rsi callq 0xa630 movq %rbx, %rdi callq 0xa4f0 movq 0x275b4(%rip), %rsi # 0x7cf18 leaq 0x28(%rsp), %rdi callq 0xa4c0 leaq 0xa8(%rsp), %rdi callq 0xa200 addq $0x1b0, %rsp # imm = 0x1B0 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl %eax, %edi callq 0xa410 movq %rax, %r14 jmp 0x559bc jmp 0x55999 movq %rax, %r14 jmp 0x559c4 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x559bc movq 0x10(%rsp), %rsi incq %rsi callq 0xa630 movq %rbx, %rdi callq 0xa4f0 movq 0x2754d(%rip), %rsi # 0x7cf18 leaq 0x28(%rsp), %rdi callq 0xa4c0 leaq 0xa8(%rsp), %rdi callq 0xa200 movq %r14, %rdi callq 0xaa60
_ZN3mcp6logger3logIJRA56_KcRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvNS_9log_levelEDpOT_: push rbp push r15 push r14 push r12 push rbx sub rsp, 1B0h cmp [rdi], esi jg loc_5597B mov r14, rcx mov r15, rdx mov ebp, esi mov rbx, rdi lea rdi, [rsp+1D8h+var_1B0]; this call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void) mov rcx, 112E0BE826D694B3h imul rcx mov rax, rdx shr rax, 3Fh sar rdx, 1Ah add rdx, rax lea rdi, [rsp+1D8h+var_1B8] mov [rdi], rdx call _localtime lea r12, [rsp+1D8h+var_1A0] lea rdx, aYMDHMS; "%Y-%m-%d %H:%M:%S" mov rdi, r12; std::ostream * mov rsi, rax call _ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St9_Put_timeIS3_E; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Put_time<char>) lea rsi, aHttp11+0Ah; " " mov edx, 1 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) cmp ebp, 4 jnb short loc_558C7 mov eax, ebp lea rcx, off_7BF88; "\x1B[36m[DEBUG]\x1B[0m " mov rsi, [rcx+rax*8] lea rcx, qword_5F2B8 mov rdx, [rcx+rax*8] mov rdi, r12 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_558C7: lea rsi, [rsp+1D8h+var_1B0] mov rdi, rbx mov rdx, r15 mov rcx, r14 call _ZN3mcp6logger8log_implIRA56_KcJRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvRNS5_18basic_stringstreamIcS8_S9_EEOT_DpOT0_; mcp::logger::log_impl<char const(&)[56],std::string const&>(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> &,char const(&)[56] &&,std::string const&) add rbx, 8 mov rdi, rbx call _pthread_mutex_lock test eax, eax jnz loc_5598B lea rsi, [rsp+1D8h+var_198] mov rdi, rsp call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, [rsp+1D8h+var_1D8] mov rdx, [rsp+1D8h+var_1D0] mov rdi, cs:_ZSt4cerr_ptr call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov r14, rax mov rax, [rax] mov rdi, [rax-18h] add rdi, r14 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, r14; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) lea rax, [rsp+1D8h+var_1C8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_55955 mov rsi, [rsp+1D8h+var_1C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_55955: mov rdi, rbx call _pthread_mutex_unlock mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+1D8h+var_1B0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+1D8h+var_130]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_5597B: add rsp, 1B0h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_5598B: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) mov r14, rax jmp short loc_559BC jmp short $+2 loc_55999: mov r14, rax jmp short loc_559C4 mov r14, rax lea rax, [rsp+1D8h+var_1C8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_559BC mov rsi, [rsp+1D8h+var_1C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_559BC: mov rdi, rbx call _pthread_mutex_unlock loc_559C4: mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+1D8h+var_1B0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+1D8h+var_130]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, r14 call __Unwind_Resume
void mcp::logger::log<char const(&)[56],std::string const&>( _DWORD *a1, unsigned int a2, long long a3, long long a4) { long long v6; // rax std::ostream *v7; // rax int v8; // eax std::ostream *v9; // r14 char v10; // al std::ostream *v11; // rax void *v12[2]; // [rsp+0h] [rbp-1D8h] BYREF _QWORD v13[3]; // [rsp+10h] [rbp-1C8h] BYREF _BYTE v14[16]; // [rsp+28h] [rbp-1B0h] BYREF _BYTE v15[8]; // [rsp+38h] [rbp-1A0h] BYREF _BYTE v16[104]; // [rsp+40h] [rbp-198h] BYREF _BYTE v17[304]; // [rsp+A8h] [rbp-130h] BYREF if ( *a1 <= (signed int)a2 ) { std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v14); v13[2] = std::chrono::_V2::system_clock::now((std::chrono::_V2::system_clock *)v14) / 1000000000LL; v6 = localtime(); v7 = std::operator<<<char,std::char_traits<char>>((std::ostream *)v15, v6, (long long)"%Y-%m-%d %H:%M:%S"); std::__ostream_insert<char,std::char_traits<char>>(v7, " ", 1LL); if ( a2 < 4 ) std::__ostream_insert<char,std::char_traits<char>>(v15, off_7BF88[a2], qword_5F2B8[a2]); mcp::logger::log_impl<char const(&)[56],std::string const&>(a1, v14, a3, a4); v8 = pthread_mutex_lock(a1 + 2); if ( v8 ) std::__throw_system_error(v8); std::stringbuf::str(v12, v16); v9 = (std::ostream *)std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, v12[0], v12[1]); v10 = std::ios::widen((char *)v9 + *(_QWORD *)(*(_QWORD *)v9 - 24LL), 10LL); v11 = (std::ostream *)std::ostream::put(v9, v10); std::ostream::flush(v11); if ( v12[0] != v13 ) operator delete(v12[0], v13[0] + 1LL); pthread_mutex_unlock(a1 + 2); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream( v14, &`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>); std::ios_base::~ios_base((std::ios_base *)v17); } }
log<char_const(&)[56],std::__cxx11::string_const&>: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x1b0 CMP dword ptr [RDI],ESI JG 0x0015597b MOV R14,RCX MOV R15,RDX MOV EBP,ESI MOV RBX,RDI LEA RDI,[RSP + 0x28] CALL 0x0010a440 CALL 0x0010a070 MOV RCX,0x112e0be826d694b3 IMUL RCX MOV RAX,RDX SHR RAX,0x3f SAR RDX,0x1a ADD RDX,RAX LEA RDI,[RSP + 0x20] MOV qword ptr [RDI],RDX CALL 0x0010a4d0 LEA R12,[RSP + 0x38] LAB_0015587c: LEA RDX,[0x15ade8] MOV RDI,R12 MOV RSI,RAX CALL 0x00142d9c LEA RSI,[0x15ae6a] MOV EDX,0x1 MOV RDI,RAX CALL 0x0010a6f0 CMP EBP,0x4 JNC 0x001558c7 MOV EAX,EBP LEA RCX,[0x17bf88] MOV RSI,qword ptr [RCX + RAX*0x8] LEA RCX,[0x15f2b8] MOV RDX,qword ptr [RCX + RAX*0x8] MOV RDI,R12 CALL 0x0010a6f0 LAB_001558c7: LEA RSI,[RSP + 0x28] MOV RDI,RBX MOV RDX,R15 MOV RCX,R14 CALL 0x001559ea ADD RBX,0x8 MOV RDI,RBX CALL 0x0010a8d0 TEST EAX,EAX JNZ 0x0015598b LEA RSI,[RSP + 0x40] LAB_001558f3: MOV RDI,RSP CALL 0x0010a920 MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] LAB_00155904: MOV RDI,qword ptr [0x0017cfe8] CALL 0x0010a6f0 MOV R14,RAX MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + -0x18] ADD RDI,R14 MOV ESI,0xa CALL 0x0010a610 MOVSX ESI,AL MOV RDI,R14 CALL 0x0010a040 MOV RDI,RAX CALL 0x0010a420 LEA RAX,[RSP + 0x10] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00155955 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x0010a630 LAB_00155955: MOV RDI,RBX CALL 0x0010a4f0 MOV RSI,qword ptr [0x0017cf18] LEA RDI,[RSP + 0x28] CALL 0x0010a4c0 LEA RDI,[RSP + 0xa8] CALL 0x0010a200 LAB_0015597b: ADD RSP,0x1b0 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0015598b: MOV EDI,EAX CALL 0x0010a410
/* void mcp::logger::log<char const (&) [56], std::__cxx11::string const&>(mcp::log_level, char const (&) [56], std::__cxx11::string const&) */ void __thiscall mcp::logger::log<char_const(&)[56],std::__cxx11::string_const&> (logger *this,uint param_2,char *param_3,string *param_4) { int iVar1; tm *ptVar2; ostream *poVar3; long *local_1d8; long local_1d0; long local_1c8 [2]; long local_1b8; stringstream local_1b0 [16]; ostream local_1a0 [112]; ios_base local_130 [264]; if (*(int *)this <= (int)param_2) { std::__cxx11::stringstream::stringstream(local_1b0); local_1b8 = std::chrono::_V2::system_clock::now(); local_1b8 = local_1b8 / 1000000000; ptVar2 = localtime(&local_1b8); /* try { // try from 0015587c to 001558d9 has its CatchHandler @ 00155999 */ poVar3 = std::operator<<(local_1a0,ptVar2,"%Y-%m-%d %H:%M:%S"); std::__ostream_insert<char,std::char_traits<char>>(poVar3," ",1); if (param_2 < 4) { std::__ostream_insert<char,std::char_traits<char>> (local_1a0,(&PTR_DAT_0017bf88)[param_2], *(long *)(&DAT_0015f2b8 + (ulong)param_2 * 8)); } log_impl<char_const(&)[56],std::__cxx11::string_const&>(this,local_1b0,param_3,param_4); iVar1 = pthread_mutex_lock((pthread_mutex_t *)(this + 8)); if (iVar1 != 0) { /* try { // try from 0015598b to 00155991 has its CatchHandler @ 00155997 */ /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar1); } /* try { // try from 001558f3 to 001558fa has its CatchHandler @ 00155992 */ std::__cxx11::stringbuf::str(); /* try { // try from 00155904 to 00155939 has its CatchHandler @ 0015599e */ poVar3 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cerr_0017cfe8,(char *)local_1d8,local_1d0); std::ios::widen((char)*(int8 *)(*(long *)poVar3 + -0x18) + (char)poVar3); std::ostream::put((char)poVar3); std::ostream::flush(); if (local_1d8 != local_1c8) { operator_delete(local_1d8,local_1c8[0] + 1); } pthread_mutex_unlock((pthread_mutex_t *)(this + 8)); std::__cxx11::stringstream::~stringstream(local_1b0); std::ios_base::~ios_base(local_130); } return; }
36,792
void mcp::logger::log<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [2], int const&, char const (&) [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12], int&>(mcp::log_level, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [2], int const&, char const (&) [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12], int&)
hkr04[P]cpp-mcp/include/mcp_logger.h
void log(log_level level, Args&&... args) { if (level < level_) { return; } std::stringstream ss; // Add timestamp auto now = std::chrono::system_clock::now(); auto now_c = std::chrono::system_clock::to_time_t(now); auto now_tm = std::localtime(&now_c); ss << std::put_time(now_tm, "%Y-%m-%d %H:%M:%S") << " "; // Add log level and color switch (level) { case log_level::debug: ss << "\033[36m[DEBUG]\033[0m "; // Cyan break; case log_level::info: ss << "\033[32m[INFO]\033[0m "; // Green break; case log_level::warning: ss << "\033[33m[WARNING]\033[0m "; // Yellow break; case log_level::error: ss << "\033[31m[ERROR]\033[0m "; // Red break; } // Add log content log_impl(ss, std::forward<Args>(args)...); // Output log std::lock_guard<std::mutex> lock(mutex_); std::cerr << ss.str() << std::endl; }
O2
c
void mcp::logger::log<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [2], int const&, char const (&) [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12], int&>(mcp::log_level, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [2], int const&, char const (&) [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12], int&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x1b0, %rsp # imm = 0x1B0 cmpl %esi, (%rdi) jg 0x4722b movq %rcx, %r14 movq %rdx, %r15 movl %esi, %ebp movq %rdi, %rbx leaq 0x28(%rsp), %rdi callq 0xa4a0 callq 0xa060 movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00 cqto idivq %rcx leaq 0x20(%rsp), %rdi movq %rax, (%rdi) callq 0xa520 leaq 0x38(%rsp), %r12 leaq 0x5b8f(%rip), %rdx # 0x4cd29 movq %r12, %rdi movq %rax, %rsi callq 0x36a7b leaq 0x5bff(%rip), %rsi # 0x4cdab movq %rax, %rdi callq 0xa680 cmpl $0x4, %ebp jae 0x471ce movl %ebp, %eax leaq 0x2fe16(%rip), %rcx # 0x76fd8 movq (%rcx,%rax,8), %rsi movq %r12, %rdi callq 0xa680 leaq 0x28(%rsp), %rsi movq %rbx, %rdi movq %r15, %rdx movq %r14, %rcx callq 0x4726c addq $0x8, %rbx movq %rbx, %rdi callq 0x19f50 leaq 0x40(%rsp), %rsi movq %rsp, %rdi callq 0xa980 movq 0x30ddf(%rip), %rdi # 0x77fe0 movq %rsp, %rsi callq 0xa5e0 movq %rax, %rdi callq 0xa330 movq %rsp, %rdi callq 0xac20 movq %rbx, %rdi callq 0xa550 leaq 0x28(%rsp), %rdi callq 0xa530 addq $0x1b0, %rsp # imm = 0x1B0 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 jmp 0x4724d jmp 0x47257 movq %rax, %r14 movq %rsp, %rdi callq 0xac20 movq %rbx, %rdi callq 0xa550 jmp 0x4725a movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0xa530 movq %r14, %rdi callq 0xaac0
_ZN3mcp6logger3logIJRA56_KcRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvNS_9log_levelEDpOT_: push rbp push r15 push r14 push r12 push rbx sub rsp, 1B0h cmp [rdi], esi jg loc_4722B mov r14, rcx mov r15, rdx mov ebp, esi mov rbx, rdi lea rdi, [rsp+1D8h+var_1B0]; this call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void) mov ecx, 3B9ACA00h cqo idiv rcx lea rdi, [rsp+1D8h+var_1B8] mov [rdi], rax call _localtime lea r12, [rsp+1D8h+var_1A0] lea rdx, aYMDHMS; "%Y-%m-%d %H:%M:%S" mov rdi, r12 mov rsi, rax call _ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St9_Put_timeIS3_E; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Put_time<char>) lea rsi, aHttp11+0Ah; " " mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) cmp ebp, 4 jnb short loc_471CE mov eax, ebp lea rcx, off_76FD8; "\x1B[36m[DEBUG]\x1B[0m " mov rsi, [rcx+rax*8] mov rdi, r12 call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) loc_471CE: lea rsi, [rsp+1D8h+var_1B0] mov rdi, rbx mov rdx, r15 mov rcx, r14 call _ZN3mcp6logger8log_implIRA56_KcJRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvRNS5_18basic_stringstreamIcS8_S9_EEOT_DpOT0_; mcp::logger::log_impl<char const(&)[56],std::string const&>(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> &,char const(&)[56] &&,std::string const&) add rbx, 8 mov rdi, rbx; this call _ZNSt5mutex4lockEv; std::mutex::lock(void) lea rsi, [rsp+1D8h+var_198] mov rdi, rsp call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rdi, cs:_ZSt4cerr_ptr mov rsi, rsp call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call _pthread_mutex_unlock lea rdi, [rsp+1D8h+var_1B0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() loc_4722B: add rsp, 1B0h pop rbx pop r12 pop r14 pop r15 pop rbp retn mov r14, rax jmp short loc_4724D jmp short loc_47257 mov r14, rax mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_4724D: mov rdi, rbx call _pthread_mutex_unlock jmp short loc_4725A loc_47257: mov r14, rax loc_4725A: lea rdi, [rsp+arg_20] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rdi, r14 call __Unwind_Resume
void mcp::logger::log<char const(&)[56],std::string const&>(_DWORD *a1, long long a2, long long a3, long long a4) { long long v6; // rax long long v7; // rax _QWORD *v8; // rax long long v9; // rax _BYTE v10[32]; // [rsp+0h] [rbp-1D8h] BYREF long long v11; // [rsp+20h] [rbp-1B8h] BYREF _BYTE v12[16]; // [rsp+28h] [rbp-1B0h] BYREF long long v13; // [rsp+38h] [rbp-1A0h] BYREF _BYTE v14[408]; // [rsp+40h] [rbp-198h] BYREF if ( *a1 <= (int)a2 ) { std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v12); v6 = std::chrono::_V2::system_clock::now((std::chrono::_V2::system_clock *)v12); v11 = v6 / 1000000000; v7 = localtime(&v11, a2, v6 % 1000000000); v8 = std::operator<<<char,std::char_traits<char>>(&v13, v7, "%Y-%m-%d %H:%M:%S"); std::operator<<<std::char_traits<char>>(v8, " "); if ( (unsigned int)a2 < 4 ) std::operator<<<std::char_traits<char>>(&v13, off_76FD8[(unsigned int)a2]); mcp::logger::log_impl<char const(&)[56],std::string const&>(a1, v12, a3, a4); std::mutex::lock((std::mutex *)(a1 + 2)); std::stringbuf::str(v10, v14); v9 = std::operator<<<char>(&std::cerr, v10); std::endl<char,std::char_traits<char>>(v9); std::string::~string(v10); pthread_mutex_unlock(a1 + 2); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v12); } }
log<char_const(&)[56],std::__cxx11::string_const&>: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x1b0 CMP dword ptr [RDI],ESI JG 0x0014722b MOV R14,RCX MOV R15,RDX MOV EBP,ESI MOV RBX,RDI LEA RDI,[RSP + 0x28] CALL 0x0010a4a0 CALL 0x0010a060 MOV ECX,0x3b9aca00 CQO IDIV RCX LEA RDI,[RSP + 0x20] MOV qword ptr [RDI],RAX CALL 0x0010a520 LEA R12,[RSP + 0x38] LAB_00147193: LEA RDX,[0x14cd29] MOV RDI,R12 MOV RSI,RAX CALL 0x00136a7b LEA RSI,[0x14cdab] MOV RDI,RAX CALL 0x0010a680 CMP EBP,0x4 JNC 0x001471ce MOV EAX,EBP LEA RCX,[0x176fd8] MOV RSI,qword ptr [RCX + RAX*0x8] MOV RDI,R12 CALL 0x0010a680 LAB_001471ce: LEA RSI,[RSP + 0x28] MOV RDI,RBX MOV RDX,R15 MOV RCX,R14 CALL 0x0014726c ADD RBX,0x8 LAB_001471e5: MOV RDI,RBX CALL 0x00119f50 LEA RSI,[RSP + 0x40] LAB_001471f2: MOV RDI,RSP CALL 0x0010a980 LAB_001471fa: MOV RDI,qword ptr [0x00177fe0] MOV RSI,RSP CALL 0x0010a5e0 MOV RDI,RAX CALL 0x0010a330 LAB_00147211: MOV RDI,RSP CALL 0x0010ac20 MOV RDI,RBX CALL 0x0010a550 LEA RDI,[RSP + 0x28] CALL 0x0010a530 LAB_0014722b: ADD RSP,0x1b0 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* void mcp::logger::log<char const (&) [56], std::__cxx11::string const&>(mcp::log_level, char const (&) [56], std::__cxx11::string const&) */ void __thiscall mcp::logger::log<char_const(&)[56],std::__cxx11::string_const&> (logger *this,uint param_2,char *param_3,string *param_4) { tm *ptVar1; ostream *poVar2; string asStack_1d8 [32]; long local_1b8; stringstream local_1b0 [16]; ostream local_1a0 [376]; if (*(int *)this <= (int)param_2) { std::__cxx11::stringstream::stringstream(local_1b0); local_1b8 = std::chrono::_V2::system_clock::now(); local_1b8 = local_1b8 / 1000000000; ptVar1 = localtime(&local_1b8); /* try { // try from 00147193 to 001471e0 has its CatchHandler @ 00147257 */ poVar2 = std::operator<<(local_1a0,ptVar1,"%Y-%m-%d %H:%M:%S"); std::operator<<(poVar2," "); if (param_2 < 4) { std::operator<<(local_1a0,(&PTR_DAT_00176fd8)[param_2]); } log_impl<char_const(&)[56],std::__cxx11::string_const&>(this,local_1b0,param_3,param_4); /* try { // try from 001471e5 to 001471ec has its CatchHandler @ 00147240 */ std::mutex::lock((mutex *)&((pthread_mutex_t *)(this + 8))->__data); /* try { // try from 001471f2 to 001471f9 has its CatchHandler @ 0014723b */ std::__cxx11::stringbuf::str(); /* try { // try from 001471fa to 00147210 has its CatchHandler @ 00147242 */ poVar2 = std::operator<<((ostream *)PTR_cerr_00177fe0,asStack_1d8); std::endl<char,std::char_traits<char>>(poVar2); std::__cxx11::string::~string(asStack_1d8); pthread_mutex_unlock((pthread_mutex_t *)(this + 8)); std::__cxx11::stringstream::~stringstream(local_1b0); } return; }
36,793
void mcp::logger::log<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [2], int const&, char const (&) [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12], int&>(mcp::log_level, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [2], int const&, char const (&) [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12], int&)
hkr04[P]cpp-mcp/include/mcp_logger.h
void log(log_level level, Args&&... args) { if (level < level_) { return; } std::stringstream ss; // Add timestamp auto now = std::chrono::system_clock::now(); auto now_c = std::chrono::system_clock::to_time_t(now); auto now_tm = std::localtime(&now_c); ss << std::put_time(now_tm, "%Y-%m-%d %H:%M:%S") << " "; // Add log level and color switch (level) { case log_level::debug: ss << "\033[36m[DEBUG]\033[0m "; // Cyan break; case log_level::info: ss << "\033[32m[INFO]\033[0m "; // Green break; case log_level::warning: ss << "\033[33m[WARNING]\033[0m "; // Yellow break; case log_level::error: ss << "\033[31m[ERROR]\033[0m "; // Red break; } // Add log content log_impl(ss, std::forward<Args>(args)...); // Output log std::lock_guard<std::mutex> lock(mutex_); std::cerr << ss.str() << std::endl; }
O3
c
void mcp::logger::log<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [2], int const&, char const (&) [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12], int&>(mcp::log_level, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [2], int const&, char const (&) [10], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12], int&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x1b0, %rsp # imm = 0x1B0 cmpl %esi, (%rdi) jg 0x52d45 movq %rcx, %r14 movq %rdx, %r15 movl %esi, %ebp movq %rdi, %rbx leaq 0x28(%rsp), %rdi callq 0xa440 callq 0xa070 movabsq $0x112e0be826d694b3, %rcx # imm = 0x112E0BE826D694B3 imulq %rcx movq %rdx, %rax shrq $0x3f, %rax sarq $0x1a, %rdx addq %rax, %rdx leaq 0x20(%rsp), %rdi movq %rdx, (%rdi) callq 0xa4d0 leaq 0x38(%rsp), %r12 leaq 0x7100(%rip), %rdx # 0x59d4d movq %r12, %rdi movq %rax, %rsi callq 0x41d04 leaq 0x7170(%rip), %rsi # 0x59dcf movl $0x1, %edx movq %rax, %rdi callq 0xa6f0 cmpl $0x4, %ebp jae 0x52c91 movl %ebp, %eax leaq 0x2836e(%rip), %rcx # 0x7afe8 movq (%rcx,%rax,8), %rsi leaq 0xb42b(%rip), %rcx # 0x5e0b0 movq (%rcx,%rax,8), %rdx movq %r12, %rdi callq 0xa6f0 leaq 0x28(%rsp), %rsi movq %rbx, %rdi movq %r15, %rdx movq %r14, %rcx callq 0x52db4 addq $0x8, %rbx movq %rbx, %rdi callq 0xa8d0 testl %eax, %eax jne 0x52d55 leaq 0x40(%rsp), %rsi movq %rsp, %rdi callq 0xa910 movq (%rsp), %rsi movq 0x8(%rsp), %rdx movq 0x29313(%rip), %rdi # 0x7bfe8 callq 0xa6f0 movq %rax, %r14 movq (%rax), %rax movq -0x18(%rax), %rdi addq %r14, %rdi movl $0xa, %esi callq 0xa610 movsbl %al, %esi movq %r14, %rdi callq 0xa040 movq %rax, %rdi callq 0xa420 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x52d1f movq 0x10(%rsp), %rsi incq %rsi callq 0xa630 movq %rbx, %rdi callq 0xa4f0 movq 0x291ea(%rip), %rsi # 0x7bf18 leaq 0x28(%rsp), %rdi callq 0xa4c0 leaq 0xa8(%rsp), %rdi callq 0xa200 addq $0x1b0, %rsp # imm = 0x1B0 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl %eax, %edi callq 0xa410 movq %rax, %r14 jmp 0x52d86 jmp 0x52d63 movq %rax, %r14 jmp 0x52d8e movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x52d86 movq 0x10(%rsp), %rsi incq %rsi callq 0xa630 movq %rbx, %rdi callq 0xa4f0 movq 0x29183(%rip), %rsi # 0x7bf18 leaq 0x28(%rsp), %rdi callq 0xa4c0 leaq 0xa8(%rsp), %rdi callq 0xa200 movq %r14, %rdi callq 0xaa50
_ZN3mcp6logger3logIJRA32_KcRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvNS_9log_levelEDpOT_: push rbp push r15 push r14 push r12 push rbx sub rsp, 1B0h cmp [rdi], esi jg loc_52D45 mov r14, rcx mov r15, rdx mov ebp, esi mov rbx, rdi lea rdi, [rsp+1D8h+var_1B0]; this call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void) mov rcx, 112E0BE826D694B3h imul rcx mov rax, rdx shr rax, 3Fh sar rdx, 1Ah add rdx, rax lea rdi, [rsp+1D8h+var_1B8] mov [rdi], rdx call _localtime lea r12, [rsp+1D8h+var_1A0] lea rdx, aYMDHMS; "%Y-%m-%d %H:%M:%S" mov rdi, r12; std::ostream * mov rsi, rax call _ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St9_Put_timeIS3_E; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Put_time<char>) lea rsi, aHttp11+0Ah; " " mov edx, 1 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) cmp ebp, 4 jnb short loc_52C91 mov eax, ebp lea rcx, off_7AFE8; "\x1B[36m[DEBUG]\x1B[0m " mov rsi, [rcx+rax*8] lea rcx, qword_5E0B0 mov rdx, [rcx+rax*8] mov rdi, r12 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_52C91: lea rsi, [rsp+1D8h+var_1B0] mov rdi, rbx mov rdx, r15 mov rcx, r14 call _ZN3mcp6logger8log_implIRA32_KcJRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvRNS5_18basic_stringstreamIcS8_S9_EEOT_DpOT0_; mcp::logger::log_impl<char const(&)[32],std::string const&>(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> &,char const(&)[32] &&,std::string const&) add rbx, 8 mov rdi, rbx call _pthread_mutex_lock test eax, eax jnz loc_52D55 lea rsi, [rsp+1D8h+var_198] mov rdi, rsp call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, [rsp+1D8h+var_1D8] mov rdx, [rsp+1D8h+var_1D0] mov rdi, cs:_ZSt4cerr_ptr call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov r14, rax mov rax, [rax] mov rdi, [rax-18h] add rdi, r14 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, r14; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) lea rax, [rsp+1D8h+var_1C8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_52D1F mov rsi, [rsp+1D8h+var_1C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_52D1F: mov rdi, rbx call _pthread_mutex_unlock mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+1D8h+var_1B0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+1D8h+var_130]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_52D45: add rsp, 1B0h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_52D55: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) mov r14, rax jmp short loc_52D86 jmp short $+2 loc_52D63: mov r14, rax jmp short loc_52D8E mov r14, rax lea rax, [rsp+1D8h+var_1C8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_52D86 mov rsi, [rsp+1D8h+var_1C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_52D86: mov rdi, rbx call _pthread_mutex_unlock loc_52D8E: mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+1D8h+var_1B0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+1D8h+var_130]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, r14 call __Unwind_Resume
void mcp::logger::log<char const(&)[32],std::string const&>( _DWORD *a1, unsigned int a2, long long a3, long long a4) { long long v6; // rax std::ostream *v7; // rax int v8; // eax std::ostream *v9; // r14 char v10; // al std::ostream *v11; // rax void *v12[2]; // [rsp+0h] [rbp-1D8h] BYREF _QWORD v13[3]; // [rsp+10h] [rbp-1C8h] BYREF _BYTE v14[16]; // [rsp+28h] [rbp-1B0h] BYREF _BYTE v15[8]; // [rsp+38h] [rbp-1A0h] BYREF _BYTE v16[104]; // [rsp+40h] [rbp-198h] BYREF _BYTE v17[304]; // [rsp+A8h] [rbp-130h] BYREF if ( *a1 <= (signed int)a2 ) { std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v14); v13[2] = std::chrono::_V2::system_clock::now((std::chrono::_V2::system_clock *)v14) / 1000000000LL; v6 = localtime(); v7 = std::operator<<<char,std::char_traits<char>>((std::ostream *)v15, v6, (long long)"%Y-%m-%d %H:%M:%S"); std::__ostream_insert<char,std::char_traits<char>>(v7, " ", 1LL); if ( a2 < 4 ) std::__ostream_insert<char,std::char_traits<char>>(v15, off_7AFE8[a2], qword_5E0B0[a2]); mcp::logger::log_impl<char const(&)[32],std::string const&>(a1, v14, a3, a4); v8 = pthread_mutex_lock(a1 + 2); if ( v8 ) std::__throw_system_error(v8); std::stringbuf::str(v12, v16); v9 = (std::ostream *)std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, v12[0], v12[1]); v10 = std::ios::widen((char *)v9 + *(_QWORD *)(*(_QWORD *)v9 - 24LL), 10LL); v11 = (std::ostream *)std::ostream::put(v9, v10); std::ostream::flush(v11); if ( v12[0] != v13 ) operator delete(v12[0], v13[0] + 1LL); pthread_mutex_unlock(a1 + 2); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream( v14, &`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>); std::ios_base::~ios_base((std::ios_base *)v17); } }
log<char_const(&)[32],std::__cxx11::string_const&>: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x1b0 CMP dword ptr [RDI],ESI JG 0x00152d45 MOV R14,RCX MOV R15,RDX MOV EBP,ESI MOV RBX,RDI LEA RDI,[RSP + 0x28] CALL 0x0010a440 CALL 0x0010a070 MOV RCX,0x112e0be826d694b3 IMUL RCX MOV RAX,RDX SHR RAX,0x3f SAR RDX,0x1a ADD RDX,RAX LEA RDI,[RSP + 0x20] MOV qword ptr [RDI],RDX CALL 0x0010a4d0 LEA R12,[RSP + 0x38] LAB_00152c46: LEA RDX,[0x159d4d] MOV RDI,R12 MOV RSI,RAX CALL 0x00141d04 LEA RSI,[0x159dcf] MOV EDX,0x1 MOV RDI,RAX CALL 0x0010a6f0 CMP EBP,0x4 JNC 0x00152c91 MOV EAX,EBP LEA RCX,[0x17afe8] MOV RSI,qword ptr [RCX + RAX*0x8] LEA RCX,[0x15e0b0] MOV RDX,qword ptr [RCX + RAX*0x8] MOV RDI,R12 CALL 0x0010a6f0 LAB_00152c91: LEA RSI,[RSP + 0x28] MOV RDI,RBX MOV RDX,R15 MOV RCX,R14 CALL 0x00152db4 ADD RBX,0x8 MOV RDI,RBX CALL 0x0010a8d0 TEST EAX,EAX JNZ 0x00152d55 LEA RSI,[RSP + 0x40] LAB_00152cbd: MOV RDI,RSP CALL 0x0010a910 MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] LAB_00152cce: MOV RDI,qword ptr [0x0017bfe8] CALL 0x0010a6f0 MOV R14,RAX MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + -0x18] ADD RDI,R14 MOV ESI,0xa CALL 0x0010a610 MOVSX ESI,AL MOV RDI,R14 CALL 0x0010a040 MOV RDI,RAX CALL 0x0010a420 LEA RAX,[RSP + 0x10] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00152d1f MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x0010a630 LAB_00152d1f: MOV RDI,RBX CALL 0x0010a4f0 MOV RSI,qword ptr [0x0017bf18] LEA RDI,[RSP + 0x28] CALL 0x0010a4c0 LEA RDI,[RSP + 0xa8] CALL 0x0010a200 LAB_00152d45: ADD RSP,0x1b0 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00152d55: MOV EDI,EAX CALL 0x0010a410
/* void mcp::logger::log<char const (&) [32], std::__cxx11::string const&>(mcp::log_level, char const (&) [32], std::__cxx11::string const&) */ void __thiscall mcp::logger::log<char_const(&)[32],std::__cxx11::string_const&> (logger *this,uint param_2,char *param_3,string *param_4) { int iVar1; tm *ptVar2; ostream *poVar3; long *local_1d8; long local_1d0; long local_1c8 [2]; long local_1b8; stringstream local_1b0 [16]; ostream local_1a0 [112]; ios_base local_130 [264]; if (*(int *)this <= (int)param_2) { std::__cxx11::stringstream::stringstream(local_1b0); local_1b8 = std::chrono::_V2::system_clock::now(); local_1b8 = local_1b8 / 1000000000; ptVar2 = localtime(&local_1b8); /* try { // try from 00152c46 to 00152ca3 has its CatchHandler @ 00152d63 */ poVar3 = std::operator<<(local_1a0,ptVar2,"%Y-%m-%d %H:%M:%S"); std::__ostream_insert<char,std::char_traits<char>>(poVar3," ",1); if (param_2 < 4) { std::__ostream_insert<char,std::char_traits<char>> (local_1a0,(&PTR_DAT_0017afe8)[param_2], *(long *)(&DAT_0015e0b0 + (ulong)param_2 * 8)); } log_impl<char_const(&)[32],std::__cxx11::string_const&>(this,local_1b0,param_3,param_4); iVar1 = pthread_mutex_lock((pthread_mutex_t *)(this + 8)); if (iVar1 != 0) { /* try { // try from 00152d55 to 00152d5b has its CatchHandler @ 00152d61 */ /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar1); } /* try { // try from 00152cbd to 00152cc4 has its CatchHandler @ 00152d5c */ std::__cxx11::stringbuf::str(); /* try { // try from 00152cce to 00152d03 has its CatchHandler @ 00152d68 */ poVar3 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cerr_0017bfe8,(char *)local_1d8,local_1d0); std::ios::widen((char)*(int8 *)(*(long *)poVar3 + -0x18) + (char)poVar3); std::ostream::put((char)poVar3); std::ostream::flush(); if (local_1d8 != local_1c8) { operator_delete(local_1d8,local_1c8[0] + 1); } pthread_mutex_unlock((pthread_mutex_t *)(this + 8)); std::__cxx11::stringstream::~stringstream(local_1b0); std::ios_base::~ios_base(local_130); } return; }
36,794
mysql_close_memory
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static void mysql_close_memory(MYSQL *mysql) { ma_clear_session_state(mysql); free(mysql->host_info); free(mysql->host); free(mysql->user); free(mysql->passwd); free(mysql->db); free(mysql->unix_socket); free(mysql->server_version); mysql->host_info= mysql->host= mysql->unix_socket= mysql->server_version=mysql->user=mysql->passwd=mysql->db=0; }
O0
c
mysql_close_memory: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x23d00 movq -0x8(%rbp), %rax movq 0x2d8(%rax), %rdi callq 0x13520 movq -0x8(%rbp), %rax movq 0x2b0(%rax), %rdi callq 0x13520 movq -0x8(%rbp), %rax movq 0x2b8(%rax), %rdi callq 0x13520 movq -0x8(%rbp), %rax movq 0x2c0(%rax), %rdi callq 0x13520 movq -0x8(%rbp), %rax movq 0x2e8(%rax), %rdi callq 0x13520 movq -0x8(%rbp), %rax movq 0x2c8(%rax), %rdi callq 0x13520 movq -0x8(%rbp), %rax movq 0x2d0(%rax), %rdi callq 0x13520 movq -0x8(%rbp), %rax movq $0x0, 0x2e8(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x2c0(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x2b8(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x2d0(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x2c8(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x2b0(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x2d8(%rax) addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_close_memory: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] call ma_clear_session_state mov rax, [rbp+var_8] mov rdi, [rax+2D8h] call _free mov rax, [rbp+var_8] mov rdi, [rax+2B0h] call _free mov rax, [rbp+var_8] mov rdi, [rax+2B8h] call _free mov rax, [rbp+var_8] mov rdi, [rax+2C0h] call _free mov rax, [rbp+var_8] mov rdi, [rax+2E8h] call _free mov rax, [rbp+var_8] mov rdi, [rax+2C8h] call _free mov rax, [rbp+var_8] mov rdi, [rax+2D0h] call _free mov rax, [rbp+var_8] mov qword ptr [rax+2E8h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+2C0h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+2B8h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+2D0h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+2C8h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+2B0h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+2D8h], 0 add rsp, 10h pop rbp retn
_QWORD * mysql_close_memory(_QWORD *a1) { _QWORD *result; // rax ma_clear_session_state(a1); free(a1[91]); free(a1[86]); free(a1[87]); free(a1[88]); free(a1[93]); free(a1[89]); free(a1[90]); a1[93] = 0LL; a1[88] = 0LL; a1[87] = 0LL; a1[90] = 0LL; a1[89] = 0LL; a1[86] = 0LL; result = a1; a1[91] = 0LL; return result; }
mysql_close_memory: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x00123d00 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x2d8] CALL 0x00113520 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x2b0] CALL 0x00113520 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x2b8] CALL 0x00113520 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x2c0] CALL 0x00113520 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x2e8] CALL 0x00113520 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x2c8] CALL 0x00113520 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x2d0] CALL 0x00113520 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2e8],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2c0],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2b8],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2d0],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2c8],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2b0],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2d8],0x0 ADD RSP,0x10 POP RBP RET
void mysql_close_memory(long param_1) { ma_clear_session_state(param_1); free(*(void **)(param_1 + 0x2d8)); free(*(void **)(param_1 + 0x2b0)); free(*(void **)(param_1 + 0x2b8)); free(*(void **)(param_1 + 0x2c0)); free(*(void **)(param_1 + 0x2e8)); free(*(void **)(param_1 + 0x2c8)); free(*(void **)(param_1 + 0x2d0)); *(int8 *)(param_1 + 0x2e8) = 0; *(int8 *)(param_1 + 0x2c0) = 0; *(int8 *)(param_1 + 0x2b8) = 0; *(int8 *)(param_1 + 0x2d0) = 0; *(int8 *)(param_1 + 0x2c8) = 0; *(int8 *)(param_1 + 0x2b0) = 0; *(int8 *)(param_1 + 0x2d8) = 0; return; }
36,795
mysql_close_memory
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static void mysql_close_memory(MYSQL *mysql) { ma_clear_session_state(mysql); free(mysql->host_info); free(mysql->host); free(mysql->user); free(mysql->passwd); free(mysql->db); free(mysql->unix_socket); free(mysql->server_version); mysql->host_info= mysql->host= mysql->unix_socket= mysql->server_version=mysql->user=mysql->passwd=mysql->db=0; }
O3
c
mysql_close_memory: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx callq 0x1de7f movq 0x2d8(%rbx), %rdi callq 0x13570 movq 0x2b0(%rbx), %rdi callq 0x13570 movq 0x2b8(%rbx), %rdi callq 0x13570 movq 0x2c0(%rbx), %rdi callq 0x13570 movq 0x2e8(%rbx), %rdi callq 0x13570 movq 0x2c8(%rbx), %rdi callq 0x13570 movq 0x2d0(%rbx), %rdi callq 0x13570 movq $0x0, 0x2e8(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x2b0(%rbx) movups %xmm0, 0x2c0(%rbx) movups %xmm0, 0x2d0(%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_close_memory: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi call ma_clear_session_state mov rdi, [rbx+2D8h] call _free mov rdi, [rbx+2B0h] call _free mov rdi, [rbx+2B8h] call _free mov rdi, [rbx+2C0h] call _free mov rdi, [rbx+2E8h] call _free mov rdi, [rbx+2C8h] call _free mov rdi, [rbx+2D0h] call _free mov qword ptr [rbx+2E8h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx+2B0h], xmm0 movups xmmword ptr [rbx+2C0h], xmm0 movups xmmword ptr [rbx+2D0h], xmm0 add rsp, 8 pop rbx pop rbp retn
long long mysql_close_memory(_QWORD *a1) { long long result; // rax ma_clear_session_state(a1); free(a1[91]); free(a1[86]); free(a1[87]); free(a1[88]); free(a1[93]); free(a1[89]); result = free(a1[90]); a1[93] = 0LL; *((_OWORD *)a1 + 43) = 0LL; *((_OWORD *)a1 + 44) = 0LL; *((_OWORD *)a1 + 45) = 0LL; return result; }
mysql_close_memory: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x0011de7f MOV RDI,qword ptr [RBX + 0x2d8] CALL 0x00113570 MOV RDI,qword ptr [RBX + 0x2b0] CALL 0x00113570 MOV RDI,qword ptr [RBX + 0x2b8] CALL 0x00113570 MOV RDI,qword ptr [RBX + 0x2c0] CALL 0x00113570 MOV RDI,qword ptr [RBX + 0x2e8] CALL 0x00113570 MOV RDI,qword ptr [RBX + 0x2c8] CALL 0x00113570 MOV RDI,qword ptr [RBX + 0x2d0] CALL 0x00113570 MOV qword ptr [RBX + 0x2e8],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x2b0],XMM0 MOVUPS xmmword ptr [RBX + 0x2c0],XMM0 MOVUPS xmmword ptr [RBX + 0x2d0],XMM0 ADD RSP,0x8 POP RBX POP RBP RET
void mysql_close_memory(long param_1) { ma_clear_session_state(); free(*(void **)(param_1 + 0x2d8)); free(*(void **)(param_1 + 0x2b0)); free(*(void **)(param_1 + 0x2b8)); free(*(void **)(param_1 + 0x2c0)); free(*(void **)(param_1 + 0x2e8)); free(*(void **)(param_1 + 0x2c8)); free(*(void **)(param_1 + 0x2d0)); *(int8 *)(param_1 + 0x2e8) = 0; *(int8 *)(param_1 + 0x2b0) = 0; *(int8 *)(param_1 + 0x2b8) = 0; *(int8 *)(param_1 + 0x2c0) = 0; *(int8 *)(param_1 + 0x2c8) = 0; *(int8 *)(param_1 + 0x2d0) = 0; *(int8 *)(param_1 + 0x2d8) = 0; return; }
36,796
mysql_stmt_prepare_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_prepare_start(int *ret, MYSQL_STMT *stmt, const char *query, unsigned long length) { MK_ASYNC_START_BODY( mysql_stmt_prepare, stmt->mysql, { WIN_SET_NONBLOCKING(stmt->mysql) parms.stmt= stmt; parms.query= query; parms.length= length; }, 1, r_int, /* If stmt->mysql==NULL then we will not block so can call directly. */ if (!stmt->mysql) { *ret= mysql_stmt_prepare(stmt, query, length); return 0; }) }
O0
c
mysql_stmt_prepare_start: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x18(%rbp), %rax cmpq $0x0, 0x38(%rax) jne 0x3c918 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x2a990 movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) jmp 0x3ca39 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rax movb $0x1, 0x14(%rax) movq -0x38(%rbp), %rdi addq $0x38, %rdi leaq 0xf2(%rip), %rsi # 0x3ca50 leaq -0x50(%rbp), %rdx callq 0x3f430 movl %eax, -0x2c(%rbp) movq -0x38(%rbp), %rax movb $0x0, 0x15(%rax) movq -0x38(%rbp), %rax movb $0x0, 0x14(%rax) cmpl $0x0, -0x2c(%rbp) jle 0x3c996 movq -0x38(%rbp), %rax movb $0x1, 0x15(%rax) movq -0x38(%rbp), %rax movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x3ca39 cmpl $0x0, -0x2c(%rbp) jge 0x3ca25 jmp 0x3c9a2 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 0x23546(%rip), %rax # 0x5ff10 movq (%rax), %rsi movl $0x5, %edx callq 0x13210 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x29c(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x97, %rdi leaq 0x23524(%rip), %rax # 0x5ff20 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13210 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x296(%rax) movq -0x10(%rbp), %rax movl $0x1, (%rax) jmp 0x3ca32 movq -0x38(%rbp), %rax movl 0x8(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_stmt_prepare_start: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_18] cmp qword ptr [rax+38h], 0 jnz short loc_3C918 mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] call mysql_stmt_prepare mov ecx, eax mov rax, [rbp+var_10] mov [rax], ecx mov [rbp+var_4], 0 jmp loc_3CA39 loc_3C918: mov rax, [rbp+var_18] mov rax, [rax+38h] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_38], rax mov rax, [rbp+var_18] mov [rbp+var_50], rax mov rax, [rbp+var_20] mov [rbp+var_48], rax mov rax, [rbp+var_28] mov [rbp+var_40], rax mov rax, [rbp+var_38] mov byte ptr [rax+14h], 1 mov rdi, [rbp+var_38] add rdi, 38h ; '8' lea rsi, mysql_stmt_prepare_start_internal lea rdx, [rbp+var_50] call my_context_spawn mov [rbp+var_2C], eax mov rax, [rbp+var_38] mov byte ptr [rax+15h], 0 mov rax, [rbp+var_38] mov byte ptr [rax+14h], 0 cmp [rbp+var_2C], 0 jle short loc_3C996 mov rax, [rbp+var_38] mov byte ptr [rax+15h], 1 mov rax, [rbp+var_38] mov eax, [rax] mov [rbp+var_4], eax jmp loc_3CA39 loc_3C996: cmp [rbp+var_2C], 0 jge loc_3CA25 jmp short $+2 loc_3C9A2: 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_3CA32 loc_3CA25: mov rax, [rbp+var_38] mov ecx, [rax+8] mov rax, [rbp+var_10] mov [rax], ecx loc_3CA32: mov [rbp+var_4], 0 loc_3CA39: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long mysql_stmt_prepare_start(_DWORD *a1, long long a2, long long a3, long long a4) { _QWORD v5[3]; // [rsp+0h] [rbp-50h] BYREF unsigned int *v6; // [rsp+18h] [rbp-38h] int v7; // [rsp+24h] [rbp-2Ch] long long v8; // [rsp+28h] [rbp-28h] long long v9; // [rsp+30h] [rbp-20h] long long v10; // [rsp+38h] [rbp-18h] _DWORD *v11; // [rsp+40h] [rbp-10h] v11 = a1; v10 = a2; v9 = a3; v8 = a4; if ( *(_QWORD *)(a2 + 56) ) { v6 = *(unsigned int **)(*(_QWORD *)(*(_QWORD *)(v10 + 56) + 1152LL) + 40LL); v5[0] = v10; v5[1] = v9; v5[2] = v8; *((_BYTE *)v6 + 20) = 1; v7 = my_context_spawn(v6 + 14, mysql_stmt_prepare_start_internal, v5); *((_BYTE *)v6 + 21) = 0; *((_BYTE *)v6 + 20) = 0; if ( v7 <= 0 ) { if ( v7 >= 0 ) { *v11 = v6[2]; } else { *(_DWORD *)(*(_QWORD *)(v10 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(v10 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(v10 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(v10 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(v10 + 56) + 662LL) = 0; *v11 = 1; } return 0; } else { *((_BYTE *)v6 + 21) = 1; return *v6; } } else { *v11 = mysql_stmt_prepare(v10, v9, v8); return 0; } }
mysql_stmt_prepare_start: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x38],0x0 JNZ 0x0013c918 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] CALL 0x0012a990 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x0 JMP 0x0013ca39 LAB_0013c918: 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 + -0x38],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x14],0x1 MOV RDI,qword ptr [RBP + -0x38] ADD RDI,0x38 LEA RSI,[0x13ca50] LEA RDX,[RBP + -0x50] CALL 0x0013f430 MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x15],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x14],0x0 CMP dword ptr [RBP + -0x2c],0x0 JLE 0x0013c996 MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x15],0x1 MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x0013ca39 LAB_0013c996: CMP dword ptr [RBP + -0x2c],0x0 JGE 0x0013ca25 JMP 0x0013c9a2 LAB_0013c9a2: 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,[0x15ff10] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113210 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,[0x15ff20] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00113210 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 0x0013ca32 LAB_0013ca25: MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX LAB_0013ca32: MOV dword ptr [RBP + -0x4],0x0 LAB_0013ca39: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 mysql_stmt_prepare_start(int4 *param_1,long param_2,int8 param_3,int8 param_4) { int4 uVar1; long local_58; int8 local_50; int8 local_48; int4 *local_40; int local_34; int8 local_30; int8 local_28; long local_20; int4 *local_18; int4 local_c; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; if (*(long *)(param_2 + 0x38) == 0) { uVar1 = mysql_stmt_prepare(param_2,param_3,param_4); *local_18 = uVar1; local_c = 0; } else { local_40 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); *(int1 *)(local_40 + 5) = 1; local_58 = param_2; local_50 = param_3; local_48 = param_4; local_34 = my_context_spawn(local_40 + 0xe,mysql_stmt_prepare_start_internal,&local_58); *(int1 *)((long)local_40 + 0x15) = 0; *(int1 *)(local_40 + 5) = 0; if (local_34 < 1) { if (local_34 < 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_0015ff60, 0x1ff); *(int1 *)(*(long *)(local_20 + 0x38) + 0x296) = 0; *local_18 = 1; } else { *local_18 = local_40[2]; } local_c = 0; } else { *(int1 *)((long)local_40 + 0x15) = 1; local_c = *local_40; } } return local_c; }
36,797
my_is_symlink
eloqsql/mysys/my_symlink.c
int my_is_symlink(const char *filename __attribute__((unused))) { #if defined (HAVE_LSTAT) && defined (S_ISLNK) struct stat stat_buff; if (lstat(filename, &stat_buff)) return 0; MSAN_STAT_WORKAROUND(&stat_buff); return !!S_ISLNK(stat_buff.st_mode); #elif defined (_WIN32) DWORD dwAttr = GetFileAttributes(filename); return (dwAttr != INVALID_FILE_ATTRIBUTES) && (dwAttr & FILE_ATTRIBUTE_REPARSE_POINT); #else /* No symlinks */ return 0; #endif }
O3
c
my_is_symlink: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x98, %rsp leaq -0x98(%rbp), %rbx movq %rbx, %rsi callq 0x25420 movl 0x18(%rbx), %edx andl $0xf000, %edx # imm = 0xF000 xorl $0xa000, %edx # imm = 0xA000 xorl %ecx, %ecx orl %eax, %edx sete %cl movl %ecx, %eax addq $0x98, %rsp popq %rbx popq %rbp retq
my_is_symlink: push rbp mov rbp, rsp push rbx sub rsp, 98h lea rbx, [rbp+var_98] mov rsi, rbx call _lstat64 mov edx, [rbx+18h] and edx, 0F000h xor edx, 0A000h xor ecx, ecx or edx, eax setz cl mov eax, ecx add rsp, 98h pop rbx pop rbp retn
_BOOL8 my_is_symlink(long long a1) { int v1; // eax _BYTE v3[24]; // [rsp+8h] [rbp-98h] BYREF __int16 v4; // [rsp+20h] [rbp-80h] v1 = lstat64(a1, v3); return (v1 | v4 & 0xF000 ^ 0xA000) == 0; }
my_is_symlink: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x98 LEA RBX,[RBP + -0x98] MOV RSI,RBX CALL 0x00125420 MOV EDX,dword ptr [RBX + 0x18] AND EDX,0xf000 XOR EDX,0xa000 XOR ECX,ECX OR EDX,EAX SETZ CL MOV EAX,ECX ADD RSP,0x98 POP RBX POP RBP RET
bool my_is_symlink(char *param_1) { int iVar1; stat64 local_a0; iVar1 = lstat64(param_1,&local_a0); return (local_a0.st_mode & 0xf000) == 0xa000 && iVar1 == 0; }
36,798
set_dynamic
eloqsql/mysys/array.c
my_bool set_dynamic(DYNAMIC_ARRAY *array, const void *element, uint idx) { if (idx >= array->elements) { if (idx >= array->max_element && allocate_dynamic(array, idx)) return TRUE; bzero((uchar*) (array->buffer+array->elements*array->size_of_element), (idx - array->elements)*array->size_of_element); array->elements=idx+1; } memcpy(array->buffer+(idx * array->size_of_element),element, (size_t) array->size_of_element); return FALSE; }
O3
c
set_dynamic: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edx, %r14d movq %rsi, %rbx movq %rdi, %r15 movl 0x8(%rdi), %eax cmpl %edx, %eax ja 0x94a8e cmpl %r14d, 0xc(%r15) ja 0x94a6b movq %r15, %rdi movl %r14d, %esi callq 0x94ab1 movl %eax, %ecx movb $0x1, %al testb %cl, %cl jne 0x94aa6 movl 0x8(%r15), %eax movl 0x14(%r15), %ecx movl %r14d, %edx subl %eax, %edx imull %ecx, %edx movl %ecx, %edi imull %eax, %edi addq (%r15), %rdi xorl %esi, %esi callq 0x2a2c0 leal 0x1(%r14), %eax movl %eax, 0x8(%r15) movl 0x14(%r15), %edx imull %edx, %r14d addq (%r15), %r14 movq %r14, %rdi movq %rbx, %rsi callq 0x2a0a0 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
set_dynamic: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14d, edx mov rbx, rsi mov r15, rdi mov eax, [rdi+8] cmp eax, edx ja short loc_94A8E cmp [r15+0Ch], r14d ja short loc_94A6B mov rdi, r15 mov esi, r14d call allocate_dynamic mov ecx, eax mov al, 1 test cl, cl jnz short loc_94AA6 mov eax, [r15+8] loc_94A6B: mov ecx, [r15+14h] mov edx, r14d sub edx, eax imul edx, ecx mov edi, ecx imul edi, eax add rdi, [r15] xor esi, esi call _memset lea eax, [r14+1] mov [r15+8], eax loc_94A8E: mov edx, [r15+14h] imul r14d, edx add r14, [r15] mov rdi, r14 mov rsi, rbx call _memcpy xor eax, eax loc_94AA6: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
char set_dynamic(long long a1, long long a2, unsigned int a3) { unsigned int v4; // eax char dynamic; // cl char result; // al v4 = *(_DWORD *)(a1 + 8); if ( v4 <= a3 ) { if ( *(_DWORD *)(a1 + 12) <= a3 ) { dynamic = allocate_dynamic(a1, a3); result = 1; if ( dynamic ) return result; v4 = *(_DWORD *)(a1 + 8); } memset(*(_QWORD *)a1 + v4 * *(_DWORD *)(a1 + 20), 0LL, *(_DWORD *)(a1 + 20) * (a3 - v4)); *(_DWORD *)(a1 + 8) = a3 + 1; } memcpy(*(_QWORD *)a1 + *(_DWORD *)(a1 + 20) * a3, a2, *(unsigned int *)(a1 + 20)); return 0; }
set_dynamic: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14D,EDX MOV RBX,RSI MOV R15,RDI MOV EAX,dword ptr [RDI + 0x8] CMP EAX,EDX JA 0x00194a8e CMP dword ptr [R15 + 0xc],R14D JA 0x00194a6b MOV RDI,R15 MOV ESI,R14D CALL 0x00194ab1 MOV ECX,EAX MOV AL,0x1 TEST CL,CL JNZ 0x00194aa6 MOV EAX,dword ptr [R15 + 0x8] LAB_00194a6b: MOV ECX,dword ptr [R15 + 0x14] MOV EDX,R14D SUB EDX,EAX IMUL EDX,ECX MOV EDI,ECX IMUL EDI,EAX ADD RDI,qword ptr [R15] XOR ESI,ESI CALL 0x0012a2c0 LEA EAX,[R14 + 0x1] MOV dword ptr [R15 + 0x8],EAX LAB_00194a8e: MOV EDX,dword ptr [R15 + 0x14] IMUL R14D,EDX ADD R14,qword ptr [R15] MOV RDI,R14 MOV RSI,RBX CALL 0x0012a0a0 XOR EAX,EAX LAB_00194aa6: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int8 set_dynamic(long *param_1,void *param_2,uint param_3) { char cVar1; uint uVar2; uVar2 = *(uint *)(param_1 + 1); if (uVar2 <= param_3) { if (*(uint *)((long)param_1 + 0xc) <= param_3) { cVar1 = allocate_dynamic(param_1); if (cVar1 != '\0') { return 1; } uVar2 = *(uint *)(param_1 + 1); } memset((void *)((ulong)(*(int *)((long)param_1 + 0x14) * uVar2) + *param_1),0, (ulong)((param_3 - uVar2) * *(int *)((long)param_1 + 0x14))); *(uint *)(param_1 + 1) = param_3 + 1; } memcpy((void *)((ulong)(param_3 * *(uint *)((long)param_1 + 0x14)) + *param_1),param_2, (ulong)*(uint *)((long)param_1 + 0x14)); return 0; }
36,799
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>::size() const
monkey531[P]llama/common/json.hpp
size_type size() const noexcept { switch (m_data.m_type) { case value_t::null: { // null values are empty return 0; } case value_t::array: { // delegate call to array_t::size() return m_data.m_value.array->size(); } case value_t::object: { // delegate call to object_t::size() return m_data.m_value.object->size(); } case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: { // all other types have size 1 return 1; } } }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::size() const: movzbl (%rdi), %eax testl %eax, %eax je 0x48b44 cmpl $0x1, %eax je 0x48b21 cmpl $0x2, %eax jne 0x48b3f movq 0x8(%rdi), %rcx movq 0x8(%rcx), %rax subq (%rcx), %rax sarq $0x4, %rax retq movq 0x8(%rdi), %rax movq 0x8(%rax), %rcx subq (%rax), %rcx sarq $0x4, %rcx movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB imulq %rcx, %rax retq movl $0x1, %eax retq nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv: movzx eax, byte ptr [rdi] test eax, eax jz short locret_48B44 cmp eax, 1 jz short loc_48B21 cmp eax, 2 jnz short loc_48B3F mov rcx, [rdi+8] mov rax, [rcx+8] sub rax, [rcx] sar rax, 4 retn loc_48B21: mov rax, [rdi+8] mov rcx, [rax+8] sub rcx, [rax] sar rcx, 4 mov rax, 0AAAAAAAAAAAAAAABh imul rax, rcx retn loc_48B3F: mov eax, 1 locret_48B44: retn
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::size( unsigned __int8 *a1) { long long result; // rax result = *a1; if ( *a1 ) { if ( (_DWORD)result == 1 ) { return 0xAAAAAAAAAAAAAAABLL * ((long long)(*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL) - **((_QWORD **)a1 + 1)) >> 4); } else if ( (_DWORD)result == 2 ) { return (long long)(*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL) - **((_QWORD **)a1 + 1)) >> 4; } else { return 1LL; } } return result; }
size: MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JZ 0x00148b44 CMP EAX,0x1 JZ 0x00148b21 CMP EAX,0x2 JNZ 0x00148b3f MOV RCX,qword ptr [RDI + 0x8] MOV RAX,qword ptr [RCX + 0x8] SUB RAX,qword ptr [RCX] SAR RAX,0x4 RET LAB_00148b21: MOV RAX,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RAX + 0x8] SUB RCX,qword ptr [RAX] SAR RCX,0x4 MOV RAX,-0x5555555555555555 IMUL RAX,RCX RET LAB_00148b3f: MOV EAX,0x1 LAB_00148b44: RET
/* 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>::size() const */ ulong __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::size(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this) { basic_json<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; ulong uVar2; bVar1 = *this; uVar2 = (ulong)(byte)bVar1; if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { 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> )0x1) { return ((*(long **)(this + 8))[1] - **(long **)(this + 8) >> 4) * -0x5555555555555555; } if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { return (*(long **)(this + 8))[1] - **(long **)(this + 8) >> 4; } uVar2 = 1; } return uVar2; }