index
int64
0
66.5k
func_name
stringlengths
2
5.36k
func_dep
stringlengths
16
2.19k
func
stringlengths
8
55.3k
test
stringlengths
0
7.07k
opt
stringclasses
4 values
language
stringclasses
2 values
asm
stringlengths
0
45.4k
ida_asm
stringlengths
0
44.7k
ida_pseudo
stringlengths
0
44.3k
ghidra_asm
stringlengths
0
49.1k
ghidra_pseudo
stringlengths
0
64.7k
13,100
ma_init_block_record_data
eloqsql/storage/maria/ma_blockrec.c
void _ma_init_block_record_data(void) { uint i; bzero(total_header_size, sizeof(total_header_size)); total_header_size[0]= FLAG_SIZE; /* Flag uchar */ for (i= 1; i < array_elements(total_header_size); i++) { uint size= FLAG_SIZE, j, bit; for (j= 0; (bit= (1 << j)) <= i; j++) { if (i & bit) size+= header_sizes[j]; } total_header_size[i]= size; } }
O0
c
ma_init_block_record_data: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp leaq 0xbc48a1(%rip), %rdi # 0xc43000 xorl %esi, %esi movl $0x10, %edx callq 0x27310 movb $0x1, 0xbc488e(%rip) # 0xc43000 movl $0x1, -0x4(%rbp) cmpl $0x10, -0x4(%rbp) jae 0x7e7ec movl $0x1, -0x8(%rbp) movl $0x0, -0xc(%rbp) movl -0xc(%rbp), %ecx movl $0x1, %eax shll %cl, %eax movl %eax, -0x10(%rbp) cmpl -0x4(%rbp), %eax ja 0x7e7cd movl -0x4(%rbp), %eax andl -0x10(%rbp), %eax cmpl $0x0, %eax je 0x7e7c0 movl -0xc(%rbp), %eax movl %eax, %ecx leaq 0x20a1ea(%rip), %rax # 0x2889a0 movzbl (%rax,%rcx), %eax addl -0x8(%rbp), %eax movl %eax, -0x8(%rbp) jmp 0x7e7c2 movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) jmp 0x7e78d movl -0x8(%rbp), %eax movb %al, %dl movl -0x4(%rbp), %eax movl %eax, %ecx leaq 0xbc4822(%rip), %rax # 0xc43000 movb %dl, (%rax,%rcx) movl -0x4(%rbp), %eax addl $0x1, %eax movl %eax, -0x4(%rbp) jmp 0x7e779 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_init_block_record_data: push rbp mov rbp, rsp sub rsp, 10h lea rdi, total_header_size xor esi, esi mov edx, 10h call _memset mov cs:total_header_size, 1 mov [rbp+var_4], 1 loc_7E779: cmp [rbp+var_4], 10h jnb short loc_7E7EC mov [rbp+var_8], 1 mov [rbp+var_C], 0 loc_7E78D: mov ecx, [rbp+var_C] mov eax, 1 shl eax, cl mov [rbp+var_10], eax cmp eax, [rbp+var_4] ja short loc_7E7CD mov eax, [rbp+var_4] and eax, [rbp+var_10] cmp eax, 0 jz short loc_7E7C0 mov eax, [rbp+var_C] mov ecx, eax lea rax, header_sizes movzx eax, byte ptr [rax+rcx] add eax, [rbp+var_8] mov [rbp+var_8], eax loc_7E7C0: jmp short $+2 loc_7E7C2: mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax jmp short loc_7E78D loc_7E7CD: mov eax, [rbp+var_8] mov dl, al mov eax, [rbp+var_4] mov ecx, eax lea rax, total_header_size mov [rax+rcx], dl mov eax, [rbp+var_4] add eax, 1 mov [rbp+var_4], eax jmp short loc_7E779 loc_7E7EC: add rsp, 10h pop rbp retn
long long ma_init_block_record_data() { long long result; // rax int j; // [rsp+4h] [rbp-Ch] char v2; // [rsp+8h] [rbp-8h] unsigned int i; // [rsp+Ch] [rbp-4h] result = memset(total_header_size, 0LL, 16LL); total_header_size[0] = 1; for ( i = 1; i < 0x10; ++i ) { v2 = 1; for ( j = 0; 1 << j <= i; ++j ) { if ( ((1 << j) & i) != 0 ) v2 += header_sizes[j]; } total_header_size[i] = v2; result = i + 1; } return result; }
_ma_init_block_record_data: PUSH RBP MOV RBP,RSP SUB RSP,0x10 LEA RDI,[0xd43000] XOR ESI,ESI MOV EDX,0x10 CALL 0x00127310 MOV byte ptr [0x00d43000],0x1 MOV dword ptr [RBP + -0x4],0x1 LAB_0017e779: CMP dword ptr [RBP + -0x4],0x10 JNC 0x0017e7ec MOV dword ptr [RBP + -0x8],0x1 MOV dword ptr [RBP + -0xc],0x0 LAB_0017e78d: MOV ECX,dword ptr [RBP + -0xc] MOV EAX,0x1 SHL EAX,CL MOV dword ptr [RBP + -0x10],EAX CMP EAX,dword ptr [RBP + -0x4] JA 0x0017e7cd MOV EAX,dword ptr [RBP + -0x4] AND EAX,dword ptr [RBP + -0x10] CMP EAX,0x0 JZ 0x0017e7c0 MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX LEA RAX,[0x3889a0] MOVZX EAX,byte ptr [RAX + RCX*0x1] ADD EAX,dword ptr [RBP + -0x8] MOV dword ptr [RBP + -0x8],EAX LAB_0017e7c0: JMP 0x0017e7c2 LAB_0017e7c2: MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x1 MOV dword ptr [RBP + -0xc],EAX JMP 0x0017e78d LAB_0017e7cd: MOV EAX,dword ptr [RBP + -0x8] MOV DL,AL MOV EAX,dword ptr [RBP + -0x4] MOV ECX,EAX LEA RAX,[0xd43000] MOV byte ptr [RAX + RCX*0x1],DL MOV EAX,dword ptr [RBP + -0x4] ADD EAX,0x1 MOV dword ptr [RBP + -0x4],EAX JMP 0x0017e779 LAB_0017e7ec: ADD RSP,0x10 POP RBP RET
void _ma_init_block_record_data(void) { char cVar1; uint uVar2; uint local_14; uint local_c; memset(total_header_size,0,0x10); total_header_size[0] = 1; for (local_c = 1; local_c < 0x10; local_c = local_c + 1) { cVar1 = '\x01'; for (local_14 = 0; uVar2 = 1 << ((byte)local_14 & 0x1f), uVar2 <= local_c; local_14 = local_14 + 1) { if ((local_c & uVar2) != 0) { cVar1 = *(char *)((long)&header_sizes + (ulong)local_14) + cVar1; } } total_header_size[local_c] = cVar1; } return; }
13,101
ft_boolean_read_next
eloqsql/storage/myisam/ft_boolean_search.c
int ft_boolean_read_next(FT_INFO *ftb, char *record) { FTB_EXPR *ftbe; FTB_WORD *ftbw; MI_INFO *info=ftb->info; my_off_t curdoc; if (ftb->state != INDEX_SEARCH && ftb->state != INDEX_DONE) return -1; /* black magic ON */ if ((int) _mi_check_index(info, ftb->keynr) < 0) return my_errno; if (_mi_readinfo(info, F_RDLCK, 1)) return my_errno; /* black magic OFF */ if (!ftb->queue.elements) return my_errno=HA_ERR_END_OF_FILE; /* Attention!!! Address of a local variable is used here! See err: label */ ftb->queue.first_cmp_arg=(void *)&curdoc; while (ftb->state == INDEX_SEARCH && (curdoc=((FTB_WORD *)queue_top(& ftb->queue))->docid[0]) != HA_OFFSET_ERROR) { while (curdoc == (ftbw=(FTB_WORD *)queue_top(& ftb->queue))->docid[0]) { if (unlikely(_ftb_climb_the_tree(ftb, ftbw, 0))) { my_errno= HA_ERR_OUT_OF_MEM; goto err; } /* update queue */ _ft2_search(ftb, ftbw, 0); queue_replace_top(&ftb->queue); } ftbe=ftb->root; if (ftbe->docid[0]==curdoc && ftbe->cur_weight>0 && ftbe->yesses>=(ftbe->ythresh-ftbe->yweaks) && !ftbe->nos) { /* curdoc matched ! */ if (is_tree_inited(&ftb->no_dupes) && tree_insert(&ftb->no_dupes, &curdoc, 0, ftb->no_dupes.custom_arg)->count >1) /* but it managed already to get past this line once */ continue; info->lastpos=curdoc; /* Clear all states, except that the table was updated */ info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED); if (!(*info->read_record)(info,curdoc, (uchar*) record)) { info->update|= HA_STATE_AKTIV; /* Record is read */ if (ftb->with_scan && ft_boolean_find_relevance(ftb,(uchar*) record,0)==0) continue; /* no match */ my_errno=0; goto err; } goto err; } } ftb->state=INDEX_DONE; my_errno=HA_ERR_END_OF_FILE; err: ftb->queue.first_cmp_arg=(void *)0; return my_errno; }
O3
c
ft_boolean_read_next: movl 0x348(%rdi), %ecx andl $-0x2, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpl $0x2, %ecx jne 0x730fc pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %r14 movq %rdi, %rbx movq 0x8(%rdi), %r15 movl 0x340(%rdi), %esi movq %r15, %rdi callq 0x852b8 testl %eax, %eax js 0x730e7 movq %r15, %rdi xorl %esi, %esi movl $0x1, %edx callq 0x7dab3 testl %eax, %eax jne 0x730e7 cmpl $0x0, 0x80(%rbx) je 0x730fd leaq -0x30(%rbp), %rax movq %rax, 0x78(%rbx) cmpl $0x2, 0x348(%rbx) jne 0x730c7 leaq 0x70(%rbx), %r12 leaq 0xa0(%rbx), %rax movq %rax, -0x38(%rbp) movq (%r12), %rax movq 0x8(%rax), %r13 movq 0x10(%r13), %rax movq %rax, -0x30(%rbp) cmpq $-0x1, %rax je 0x730c7 movq %rbx, %rdi movq %r13, %rsi xorl %edx, %edx callq 0x7311c testl %eax, %eax jne 0x7310f movq %rbx, %rdi movq %r13, %rsi xorl %edx, %edx callq 0x733d8 movq %r12, %rdi movl $0x1, %esi callq 0xa3835 movq -0x30(%rbp), %rsi movq 0x70(%rbx), %rax movq 0x8(%rax), %r13 cmpq 0x10(%r13), %rsi je 0x72fc9 movq 0x18(%rbx), %rax cmpq %rsi, 0x10(%rax) jne 0x73033 movss 0x2c(%rax), %xmm0 ucomiss 0x66fe8(%rip), %xmm0 # 0xda008 jbe 0x73033 movl 0x48(%rax), %ecx subl 0x4c(%rax), %ecx cmpl %ecx, 0x40(%rax) jb 0x73033 cmpl $0x0, 0x44(%rax) je 0x73045 cmpl $0x2, 0x348(%rbx) je 0x72faf jmp 0x730c7 movq -0x38(%rbp), %rax cmpq $0x0, (%rax) je 0x73072 movq 0x2d0(%rbx), %rcx movq -0x38(%rbp), %rdi leaq -0x30(%rbp), %rsi xorl %edx, %edx callq 0xa5c86 testl $0x7ffffffe, 0x10(%rax) # imm = 0x7FFFFFFE jne 0x73033 movq -0x30(%rbp), %rsi movq %rsi, 0x170(%r15) andl $0x401, 0x1d0(%r15) # imm = 0x401 movq %r15, %rdi movq %r14, %rdx callq *0x140(%r15) testl %eax, %eax jne 0x730df orb $0x2, 0x1d0(%r15) cmpb $0x0, 0x344(%rbx) je 0x73117 xorl %r13d, %r13d movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x2d4d8 ucomiss 0x66f4b(%rip), %xmm0 # 0xda008 jne 0x730d7 jnp 0x73033 jmp 0x730d7 movl $0x3, 0x348(%rbx) movl $0x89, %r13d callq 0xa2f56 movl %r13d, (%rax) movq $0x0, 0x78(%rbx) callq 0xa2f56 movl (%rax), %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0xa2f56 movl $0x89, (%rax) movl $0x89, %eax jmp 0x730ee movl $0x80, %r13d jmp 0x730d7 xorl %r13d, %r13d jmp 0x730d7
ft_boolean_read_next: mov ecx, [rdi+348h] and ecx, 0FFFFFFFEh mov eax, 0FFFFFFFFh cmp ecx, 2 jnz locret_730FC push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rsi mov rbx, rdi mov r15, [rdi+8] mov esi, [rdi+340h] mov rdi, r15 call _mi_check_index test eax, eax js loc_730E7 mov rdi, r15 xor esi, esi mov edx, 1 call _mi_readinfo test eax, eax jnz loc_730E7 cmp dword ptr [rbx+80h], 0 jz loc_730FD lea rax, [rbp-30h] mov [rbx+78h], rax cmp dword ptr [rbx+348h], 2 jnz loc_730C7 lea r12, [rbx+70h] lea rax, [rbx+0A0h] mov [rbp-38h], rax loc_72FAF: mov rax, [r12] mov r13, [rax+8] mov rax, [r13+10h] mov [rbp-30h], rax cmp rax, 0FFFFFFFFFFFFFFFFh jz loc_730C7 loc_72FC9: mov rdi, rbx mov rsi, r13 xor edx, edx call _ftb_climb_the_tree test eax, eax jnz loc_7310F mov rdi, rbx mov rsi, r13 xor edx, edx call _ft2_search mov rdi, r12 mov esi, 1 call _downheap mov rsi, [rbp-30h] mov rax, [rbx+70h] mov r13, [rax+8] cmp rsi, [r13+10h] jz short loc_72FC9 mov rax, [rbx+18h] cmp [rax+10h], rsi jnz short loc_73033 movss xmm0, dword ptr [rax+2Ch] ucomiss xmm0, cs:dword_DA008 jbe short loc_73033 mov ecx, [rax+48h] sub ecx, [rax+4Ch] cmp [rax+40h], ecx jb short loc_73033 cmp dword ptr [rax+44h], 0 jz short loc_73045 loc_73033: cmp dword ptr [rbx+348h], 2 jz loc_72FAF jmp loc_730C7 loc_73045: mov rax, [rbp-38h] cmp qword ptr [rax], 0 jz short loc_73072 mov rcx, [rbx+2D0h] mov rdi, [rbp-38h] lea rsi, [rbp-30h] xor edx, edx call tree_insert test dword ptr [rax+10h], 7FFFFFFEh jnz short loc_73033 mov rsi, [rbp-30h] loc_73072: mov [r15+170h], rsi and dword ptr [r15+1D0h], 401h mov rdi, r15 mov rdx, r14 call qword ptr [r15+140h] test eax, eax jnz short loc_730DF or byte ptr [r15+1D0h], 2 cmp byte ptr [rbx+344h], 0 jz short loc_73117 xor r13d, r13d mov rdi, rbx mov rsi, r14 xor edx, edx call ft_boolean_find_relevance ucomiss xmm0, cs:dword_DA008 jnz short loc_730D7 jnp loc_73033 jmp short loc_730D7 loc_730C7: mov dword ptr [rbx+348h], 3 mov r13d, 89h loc_730D7: call _my_thread_var mov [rax], r13d loc_730DF: mov qword ptr [rbx+78h], 0 loc_730E7: call _my_thread_var mov eax, [rax] loc_730EE: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp locret_730FC: retn loc_730FD: call _my_thread_var mov dword ptr [rax], 89h mov eax, 89h jmp short loc_730EE loc_7310F: mov r13d, 80h jmp short loc_730D7 loc_73117: xor r13d, r13d jmp short loc_730D7
long long ft_boolean_read_next(long long a1, long long a2) { long long result; // rax long long v5; // r15 long long v6; // rsi long long v7; // rdi long long v8; // r13 long long v9; // rsi long long v10; // rax int v11; // r13d double relevance; // xmm0_8 _QWORD *v13; // [rsp-40h] [rbp-40h] _QWORD v14[7]; // [rsp-38h] [rbp-38h] BYREF result = 0xFFFFFFFFLL; if ( (*(_DWORD *)(a1 + 840) & 0xFFFFFFFE) == 2 ) { v5 = *(_QWORD *)(a1 + 8); v6 = *(unsigned int *)(a1 + 832); v7 = v5; if ( (int)mi_check_index(v5, v6) < 0 ) return *(unsigned int *)my_thread_var(v7); v7 = v5; if ( (unsigned int)mi_readinfo(v5, 0LL, 1LL) ) return *(unsigned int *)my_thread_var(v7); if ( !*(_DWORD *)(a1 + 128) ) { *(_DWORD *)my_thread_var(v5) = 137; return 137LL; } *(_QWORD *)(a1 + 120) = v14; if ( *(_DWORD *)(a1 + 840) != 2 ) goto LABEL_23; v13 = (_QWORD *)(a1 + 160); while ( 2 ) { v8 = *(_QWORD *)(*(_QWORD *)(a1 + 112) + 8LL); v14[0] = *(_QWORD *)(v8 + 16); if ( v14[0] == -1LL ) goto LABEL_23; do { v7 = a1; if ( (unsigned int)ftb_climb_the_tree(a1, v8, 0LL) ) { v11 = 128; goto LABEL_24; } ft2_search(a1, v8, 0LL); v7 = a1 + 112; downheap(a1 + 112, 1LL); v9 = v14[0]; v8 = *(_QWORD *)(*(_QWORD *)(a1 + 112) + 8LL); } while ( v14[0] == *(_QWORD *)(v8 + 16) ); v10 = *(_QWORD *)(a1 + 24); if ( *(_QWORD *)(v10 + 16) != v14[0] || *(float *)(v10 + 44) <= 0.0 || *(_DWORD *)(v10 + 64) < (unsigned int)(*(_DWORD *)(v10 + 72) - *(_DWORD *)(v10 + 76)) || *(_DWORD *)(v10 + 68) ) { LABEL_14: if ( *(_DWORD *)(a1 + 840) == 2 ) continue; LABEL_23: *(_DWORD *)(a1 + 840) = 3; v11 = 137; goto LABEL_24; } break; } if ( *v13 ) { v7 = a1 + 160; if ( (*(_DWORD *)(tree_insert(v13, v14, 0LL, *(_QWORD *)(a1 + 720)) + 16) & 0x7FFFFFFE) != 0 ) goto LABEL_14; v9 = v14[0]; } *(_QWORD *)(v5 + 368) = v9; *(_DWORD *)(v5 + 464) &= 0x401u; v7 = v5; if ( (*(unsigned int ( **)(long long, long long, long long))(v5 + 320))(v5, v9, a2) ) goto LABEL_25; *(_BYTE *)(v5 + 464) |= 2u; if ( !*(_BYTE *)(a1 + 836) ) { v11 = 0; LABEL_24: *(_DWORD *)my_thread_var(v7) = v11; LABEL_25: *(_QWORD *)(a1 + 120) = 0LL; return *(unsigned int *)my_thread_var(v7); } v11 = 0; v7 = a1; relevance = ft_boolean_find_relevance(a1, a2, 0); if ( *(float *)&relevance != 0.0 ) goto LABEL_24; goto LABEL_14; } return result; }
ft_boolean_read_next: MOV ECX,dword ptr [RDI + 0x348] AND ECX,0xfffffffe MOV EAX,0xffffffff CMP ECX,0x2 JNZ 0x001730fc PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RSI MOV RBX,RDI MOV R15,qword ptr [RDI + 0x8] MOV ESI,dword ptr [RDI + 0x340] MOV RDI,R15 CALL 0x001852b8 TEST EAX,EAX JS 0x001730e7 MOV RDI,R15 XOR ESI,ESI MOV EDX,0x1 CALL 0x0017dab3 TEST EAX,EAX JNZ 0x001730e7 CMP dword ptr [RBX + 0x80],0x0 JZ 0x001730fd LEA RAX,[RBP + -0x30] MOV qword ptr [RBX + 0x78],RAX CMP dword ptr [RBX + 0x348],0x2 JNZ 0x001730c7 LEA R12,[RBX + 0x70] LEA RAX,[RBX + 0xa0] MOV qword ptr [RBP + -0x38],RAX LAB_00172faf: MOV RAX,qword ptr [R12] MOV R13,qword ptr [RAX + 0x8] MOV RAX,qword ptr [R13 + 0x10] MOV qword ptr [RBP + -0x30],RAX CMP RAX,-0x1 JZ 0x001730c7 LAB_00172fc9: MOV RDI,RBX MOV RSI,R13 XOR EDX,EDX CALL 0x0017311c TEST EAX,EAX JNZ 0x0017310f MOV RDI,RBX MOV RSI,R13 XOR EDX,EDX CALL 0x001733d8 MOV RDI,R12 MOV ESI,0x1 CALL 0x001a3835 MOV RSI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBX + 0x70] MOV R13,qword ptr [RAX + 0x8] CMP RSI,qword ptr [R13 + 0x10] JZ 0x00172fc9 MOV RAX,qword ptr [RBX + 0x18] CMP qword ptr [RAX + 0x10],RSI JNZ 0x00173033 MOVSS XMM0,dword ptr [RAX + 0x2c] UCOMISS XMM0,dword ptr [0x001da008] JBE 0x00173033 MOV ECX,dword ptr [RAX + 0x48] SUB ECX,dword ptr [RAX + 0x4c] CMP dword ptr [RAX + 0x40],ECX JC 0x00173033 CMP dword ptr [RAX + 0x44],0x0 JZ 0x00173045 LAB_00173033: CMP dword ptr [RBX + 0x348],0x2 JZ 0x00172faf JMP 0x001730c7 LAB_00173045: MOV RAX,qword ptr [RBP + -0x38] CMP qword ptr [RAX],0x0 JZ 0x00173072 MOV RCX,qword ptr [RBX + 0x2d0] MOV RDI,qword ptr [RBP + -0x38] LEA RSI,[RBP + -0x30] XOR EDX,EDX CALL 0x001a5c86 TEST dword ptr [RAX + 0x10],0x7ffffffe JNZ 0x00173033 MOV RSI,qword ptr [RBP + -0x30] LAB_00173072: MOV qword ptr [R15 + 0x170],RSI AND dword ptr [R15 + 0x1d0],0x401 MOV RDI,R15 MOV RDX,R14 CALL qword ptr [R15 + 0x140] TEST EAX,EAX JNZ 0x001730df OR byte ptr [R15 + 0x1d0],0x2 CMP byte ptr [RBX + 0x344],0x0 JZ 0x00173117 XOR R13D,R13D MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX CALL 0x0012d4d8 UCOMISS XMM0,dword ptr [0x001da008] JNZ 0x001730d7 JNP 0x00173033 JMP 0x001730d7 LAB_001730c7: MOV dword ptr [RBX + 0x348],0x3 MOV R13D,0x89 LAB_001730d7: CALL 0x001a2f56 MOV dword ptr [RAX],R13D LAB_001730df: MOV qword ptr [RBX + 0x78],0x0 LAB_001730e7: CALL 0x001a2f56 MOV EAX,dword ptr [RAX] LAB_001730ee: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP LAB_001730fc: RET LAB_001730fd: CALL 0x001a2f56 MOV dword ptr [RAX],0x89 MOV EAX,0x89 JMP 0x001730ee LAB_0017310f: MOV R13D,0x80 JMP 0x001730d7 LAB_00173117: XOR R13D,R13D JMP 0x001730d7
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int4 ft_boolean_read_next(long param_1,int8 param_2) { long lVar1; int iVar2; long lVar3; int4 *puVar4; int4 uVar5; float fVar6; long local_38; uVar5 = 0xffffffff; if ((*(uint *)(param_1 + 0x348) & 0xfffffffe) == 2) { lVar1 = *(long *)(param_1 + 8); iVar2 = _mi_check_index(lVar1,*(int4 *)(param_1 + 0x340)); if ((-1 < iVar2) && (iVar2 = _mi_readinfo(lVar1,0,1), iVar2 == 0)) { if (*(int *)(param_1 + 0x80) == 0) { puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0x89; return 0x89; } *(long **)(param_1 + 0x78) = &local_38; if (*(int *)(param_1 + 0x348) == 2) { do { lVar3 = *(long *)(*(long *)(param_1 + 0x70) + 8); local_38 = *(long *)(lVar3 + 0x10); if (local_38 == -1) break; do { iVar2 = _ftb_climb_the_tree(param_1,lVar3,0); if (iVar2 != 0) { uVar5 = 0x80; goto LAB_001730d7; } _ft2_search(param_1,lVar3,0); _downheap((long *)(param_1 + 0x70),1); lVar3 = *(long *)(*(long *)(param_1 + 0x70) + 8); } while (local_38 == *(long *)(lVar3 + 0x10)); lVar3 = *(long *)(param_1 + 0x18); if (((((*(long *)(lVar3 + 0x10) == local_38) && (_DAT_001da008 < *(float *)(lVar3 + 0x2c)) ) && ((uint)(*(int *)(lVar3 + 0x48) - *(int *)(lVar3 + 0x4c)) <= *(uint *)(lVar3 + 0x40))) && (*(int *)(lVar3 + 0x44) == 0)) && ((*(long *)(param_1 + 0xa0) == 0 || (lVar3 = tree_insert((long *)(param_1 + 0xa0),&local_38,0, *(int8 *)(param_1 + 0x2d0)), (*(uint *)(lVar3 + 0x10) & 0x7ffffffe) == 0)))) { *(long *)(lVar1 + 0x170) = local_38; *(uint *)(lVar1 + 0x1d0) = *(uint *)(lVar1 + 0x1d0) & 0x401; iVar2 = (**(code **)(lVar1 + 0x140))(lVar1,local_38,param_2); if (iVar2 != 0) goto LAB_001730df; *(byte *)(lVar1 + 0x1d0) = *(byte *)(lVar1 + 0x1d0) | 2; if (*(char *)(param_1 + 0x344) == '\0') { uVar5 = 0; goto LAB_001730d7; } fVar6 = (float)ft_boolean_find_relevance(param_1,param_2,0); uVar5 = 0; if ((fVar6 != _DAT_001da008) || (uVar5 = 0, NAN(fVar6) || NAN(_DAT_001da008))) goto LAB_001730d7; } } while (*(int *)(param_1 + 0x348) == 2); } *(int4 *)(param_1 + 0x348) = 3; uVar5 = 0x89; LAB_001730d7: puVar4 = (int4 *)_my_thread_var(); *puVar4 = uVar5; LAB_001730df: *(int8 *)(param_1 + 0x78) = 0; } puVar4 = (int4 *)_my_thread_var(); uVar5 = *puVar4; } return uVar5; }
13,102
mi_keydef_read
eloqsql/storage/myisam/mi_open.c
uchar *mi_keydef_read(uchar *ptr, MI_KEYDEF *keydef) { keydef->keysegs = (uint) *ptr++; keydef->key_alg = *ptr++; /* Rtree or Btree */ keydef->flag = mi_uint2korr(ptr); ptr +=2; keydef->block_length = mi_uint2korr(ptr); ptr +=2; keydef->keylength = mi_uint2korr(ptr); ptr +=2; keydef->minlength = mi_uint2korr(ptr); ptr +=2; keydef->maxlength = mi_uint2korr(ptr); ptr +=2; keydef->block_size_index= keydef->block_length/MI_MIN_KEY_BLOCK_LENGTH-1; keydef->underflow_block_length=keydef->block_length/3; keydef->version = 0; /* Not saved */ keydef->parser = &ft_default_parser; keydef->ftkey_nr = 0; return ptr; }
O0
c
mi_keydef_read: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movzbl (%rax), %eax movw %ax, %cx movq -0x10(%rbp), %rax movw %cx, 0x8(%rax) movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movb (%rax), %cl movq -0x10(%rbp), %rax movb %cl, 0xc(%rax) movq -0x8(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x8(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movw %ax, %cx movq -0x10(%rbp), %rax movw %cx, 0xa(%rax) movq -0x8(%rbp), %rax addq $0x2, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x8(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movw %ax, %cx movq -0x10(%rbp), %rax movw %cx, 0xe(%rax) movq -0x8(%rbp), %rax addq $0x2, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x8(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movw %ax, %cx movq -0x10(%rbp), %rax movw %cx, 0x12(%rax) movq -0x8(%rbp), %rax addq $0x2, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x8(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movw %ax, %cx movq -0x10(%rbp), %rax movw %cx, 0x14(%rax) movq -0x8(%rbp), %rax addq $0x2, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x8(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movw %ax, %cx movq -0x10(%rbp), %rax movw %cx, 0x16(%rax) movq -0x8(%rbp), %rax addq $0x2, %rax movq %rax, -0x8(%rbp) movq -0x10(%rbp), %rax movzwl 0xe(%rax), %eax movl $0x400, %ecx # imm = 0x400 cltd idivl %ecx subl $0x1, %eax movw %ax, %cx movq -0x10(%rbp), %rax movw %cx, 0x18(%rax) movq -0x10(%rbp), %rax movzwl 0xe(%rax), %eax movl $0x3, %ecx cltd idivl %ecx movw %ax, %cx movq -0x10(%rbp), %rax movw %cx, 0x10(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x1c(%rax) movq -0x10(%rbp), %rax leaq 0x22064b(%rip), %rcx # 0x300e80 movq %rcx, 0x38(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x20(%rax) movq -0x8(%rbp), %rax popq %rbp retq nopw (%rax,%rax)
mi_keydef_read: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx movzx eax, byte ptr [rax] mov cx, ax mov rax, [rbp+var_10] mov [rax+8], cx mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx mov cl, [rax] mov rax, [rbp+var_10] mov [rax+0Ch], cl mov rax, [rbp+var_8] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx mov cx, ax mov rax, [rbp+var_10] mov [rax+0Ah], cx mov rax, [rbp+var_8] add rax, 2 mov [rbp+var_8], rax mov rax, [rbp+var_8] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx mov cx, ax mov rax, [rbp+var_10] mov [rax+0Eh], cx mov rax, [rbp+var_8] add rax, 2 mov [rbp+var_8], rax mov rax, [rbp+var_8] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx mov cx, ax mov rax, [rbp+var_10] mov [rax+12h], cx mov rax, [rbp+var_8] add rax, 2 mov [rbp+var_8], rax mov rax, [rbp+var_8] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx mov cx, ax mov rax, [rbp+var_10] mov [rax+14h], cx mov rax, [rbp+var_8] add rax, 2 mov [rbp+var_8], rax mov rax, [rbp+var_8] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx mov cx, ax mov rax, [rbp+var_10] mov [rax+16h], cx mov rax, [rbp+var_8] add rax, 2 mov [rbp+var_8], rax mov rax, [rbp+var_10] movzx eax, word ptr [rax+0Eh] mov ecx, 400h cdq idiv ecx sub eax, 1 mov cx, ax mov rax, [rbp+var_10] mov [rax+18h], cx mov rax, [rbp+var_10] movzx eax, word ptr [rax+0Eh] mov ecx, 3 cdq idiv ecx mov cx, ax mov rax, [rbp+var_10] mov [rax+10h], cx mov rax, [rbp+var_10] mov dword ptr [rax+1Ch], 0 mov rax, [rbp+var_10] lea rcx, ft_default_parser mov [rax+38h], rcx mov rax, [rbp+var_10] mov dword ptr [rax+20h], 0 mov rax, [rbp+var_8] pop rbp retn
unsigned __int8 * mi_keydef_read(unsigned __int8 *a1, long long a2) { *(_WORD *)(a2 + 8) = *a1; *(_BYTE *)(a2 + 12) = a1[1]; *(_WORD *)(a2 + 10) = _byteswap_ushort(*((_WORD *)a1 + 1)); *(_WORD *)(a2 + 14) = _byteswap_ushort(*((_WORD *)a1 + 2)); *(_WORD *)(a2 + 18) = _byteswap_ushort(*((_WORD *)a1 + 3)); *(_WORD *)(a2 + 20) = _byteswap_ushort(*((_WORD *)a1 + 4)); *(_WORD *)(a2 + 22) = _byteswap_ushort(*((_WORD *)a1 + 5)); *(_WORD *)(a2 + 24) = *(unsigned __int16 *)(a2 + 14) / 1024 - 1; *(_WORD *)(a2 + 16) = *(unsigned __int16 *)(a2 + 14) / 3; *(_DWORD *)(a2 + 28) = 0; *(_QWORD *)(a2 + 56) = &ft_default_parser; *(_DWORD *)(a2 + 32) = 0; return a1 + 12; }
mi_keydef_read: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOVZX EAX,byte ptr [RAX] MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0x8],CX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0xc],CL MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0xa],CX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x2 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0xe],CX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x2 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0x12],CX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x2 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0x14],CX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x2 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0x16],CX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x2 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0xe] MOV ECX,0x400 CDQ IDIV ECX SUB EAX,0x1 MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0x18],CX MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0xe] MOV ECX,0x3 CDQ IDIV ECX MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0x10],CX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x1c],0x0 MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x400e80] MOV qword ptr [RAX + 0x38],RCX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x20],0x0 MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
int1 [16] mi_keydef_read(byte *param_1,long param_2) { int1 auVar1 [16]; *(ushort *)(param_2 + 8) = (ushort)*param_1; *(byte *)(param_2 + 0xc) = param_1[1]; *(ushort *)(param_2 + 10) = CONCAT11(param_1[2],param_1[3]); *(ushort *)(param_2 + 0xe) = CONCAT11(param_1[4],param_1[5]); *(ushort *)(param_2 + 0x12) = CONCAT11(param_1[6],param_1[7]); *(ushort *)(param_2 + 0x14) = CONCAT11(param_1[8],param_1[9]); *(ushort *)(param_2 + 0x16) = CONCAT11(param_1[10],param_1[0xb]); auVar1._0_8_ = param_1 + 0xc; *(ushort *)(param_2 + 0x18) = *(ushort *)(param_2 + 0xe) / 0x400 - 1; *(ushort *)(param_2 + 0x10) = *(ushort *)(param_2 + 0xe) / 3; *(int4 *)(param_2 + 0x1c) = 0; *(int1 **)(param_2 + 0x38) = ft_default_parser; *(int4 *)(param_2 + 0x20) = 0; auVar1._8_8_ = (ulong)*(ushort *)(param_2 + 0xe) % 3; return auVar1; }
13,103
Item_sum_avg::val_decimal(my_decimal*)
eloqsql/sql/item_sum.cc
my_decimal *Item_sum_avg::val_decimal(my_decimal *val) { my_decimal cnt; const my_decimal *sum_dec; DBUG_ASSERT(fixed()); if (aggr) aggr->endup(); if (!count) { null_value=1; return NULL; } /* For non-DECIMAL result_type() the division will be done in Item_sum_avg::val_real(). */ if (result_type() != DECIMAL_RESULT) return val_decimal_from_real(val); sum_dec= dec_buffs + curr_dec_buff; int2my_decimal(E_DEC_FATAL_ERROR, count, 0, &cnt); my_decimal_div(E_DEC_FATAL_ERROR, val, sum_dec, &cnt, prec_increment); return val; }
O0
cpp
Item_sum_avg::val_decimal(my_decimal*): pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x58(%rbp) movq %rsi, -0x60(%rbp) movq -0x58(%rbp), %rax movq %rax, -0x80(%rbp) leaq -0x48(%rbp), %rdi callq 0x7dba00 jmp 0xd039b3 jmp 0xd039b5 movq -0x80(%rbp), %rax cmpq $0x0, 0xa0(%rax) je 0xd039f5 movq -0x80(%rbp), %rax movq 0xa0(%rax), %rdi movq (%rdi), %rax movq 0x30(%rax), %rax callq *%rax jmp 0xd039d9 jmp 0xd039f5 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x70(%rbp) movl %eax, -0x74(%rbp) leaq -0x48(%rbp), %rdi callq 0x7dba20 jmp 0xd03b00 movq -0x80(%rbp), %rax cmpq $0x0, 0x1f8(%rax) jne 0xd03a1f movq -0x80(%rbp), %rax movb $0x1, 0x64(%rax) movq $0x0, -0x50(%rbp) movl $0x1, -0x78(%rbp) jmp 0xd03aca movq -0x80(%rbp), %rdi callq 0x7fb480 movl %eax, -0x84(%rbp) jmp 0xd03a30 movl -0x84(%rbp), %eax cmpl $0x4, %eax je 0xd03a65 movq -0x80(%rbp), %rdi movq -0x60(%rbp), %rsi callq 0xc30310 movq %rax, -0x90(%rbp) jmp 0xd03a51 movq -0x90(%rbp), %rax movq %rax, -0x50(%rbp) movl $0x1, -0x78(%rbp) jmp 0xd03aca movq -0x80(%rbp), %rax movl 0x1e8(%rax), %ecx shlq $0x6, %rcx leaq 0x168(%rax,%rcx), %rcx movq %rcx, -0x68(%rbp) movq 0x1f8(%rax), %rsi movl $0x1e, %edi xorl %edx, %edx leaq -0x48(%rbp), %rcx callq 0xacf860 jmp 0xd03a98 movq -0x80(%rbp), %rax movq -0x60(%rbp), %rsi movq -0x68(%rbp), %rdx movl 0x200(%rax), %r8d movl $0x1e, %edi leaq -0x48(%rbp), %rcx callq 0xca7000 jmp 0xd03abb movq -0x60(%rbp), %rax movq %rax, -0x50(%rbp) movl $0x1, -0x78(%rbp) leaq -0x48(%rbp), %rdi callq 0x7dba20 movq -0x50(%rbp), %rax movq %rax, -0x98(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xd03b29 movq -0x98(%rbp), %rax addq $0xa0, %rsp popq %rbp retq movq -0x70(%rbp), %rax movq %rax, -0xa0(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xd03b29 movq -0xa0(%rbp), %rdi callq 0x7589b0 callq 0x758480 nop
_ZN12Item_sum_avg11val_decimalEP10my_decimal: push rbp mov rbp, rsp sub rsp, 0A0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_58], rdi mov [rbp+var_60], rsi mov rax, [rbp+var_58] mov [rbp+var_80], rax lea rdi, [rbp+var_48]; this call _ZN10my_decimalC2Ev; my_decimal::my_decimal(void) jmp short $+2 loc_D039B3: jmp short $+2 loc_D039B5: mov rax, [rbp+var_80] cmp qword ptr [rax+0A0h], 0 jz short loc_D039F5 mov rax, [rbp+var_80] mov rdi, [rax+0A0h] mov rax, [rdi] mov rax, [rax+30h] call rax jmp short $+2 loc_D039D9: jmp short loc_D039F5 mov rcx, rax mov eax, edx mov [rbp+var_70], rcx mov [rbp+var_74], eax lea rdi, [rbp+var_48]; void * call _ZN10my_decimalD2Ev; my_decimal::~my_decimal() jmp loc_D03B00 loc_D039F5: mov rax, [rbp+var_80] cmp qword ptr [rax+1F8h], 0 jnz short loc_D03A1F mov rax, [rbp+var_80] mov byte ptr [rax+64h], 1 mov [rbp+var_50], 0 mov [rbp+var_78], 1 jmp loc_D03ACA loc_D03A1F: mov rdi, [rbp+var_80]; this call _ZNK4Item11result_typeEv; Item::result_type(void) mov [rbp+var_84], eax jmp short $+2 loc_D03A30: mov eax, [rbp+var_84] cmp eax, 4 jz short loc_D03A65 mov rdi, [rbp+var_80]; this mov rsi, [rbp+var_60]; my_decimal * call _ZN4Item21val_decimal_from_realEP10my_decimal; Item::val_decimal_from_real(my_decimal *) mov [rbp+var_90], rax jmp short $+2 loc_D03A51: mov rax, [rbp+var_90] mov [rbp+var_50], rax mov [rbp+var_78], 1 jmp short loc_D03ACA loc_D03A65: mov rax, [rbp+var_80] mov ecx, [rax+1E8h] shl rcx, 6 lea rcx, [rax+rcx+168h] mov [rbp+var_68], rcx mov rsi, [rax+1F8h]; __int64 mov edi, 1Eh; unsigned int xor edx, edx; char lea rcx, [rbp+var_48]; my_decimal * call _Z14int2my_decimaljxcP10my_decimal; int2my_decimal(uint,long long,char,my_decimal *) jmp short $+2 loc_D03A98: mov rax, [rbp+var_80] mov rsi, [rbp+var_60]; my_decimal * mov rdx, [rbp+var_68]; my_decimal * mov r8d, [rax+200h]; int mov edi, 1Eh; unsigned int lea rcx, [rbp+var_48]; my_decimal * call _Z14my_decimal_divjP10my_decimalPKS_S2_i; my_decimal_div(uint,my_decimal *,my_decimal const*,my_decimal const*,int) jmp short $+2 loc_D03ABB: mov rax, [rbp+var_60] mov [rbp+var_50], rax mov [rbp+var_78], 1 loc_D03ACA: lea rdi, [rbp+var_48]; void * call _ZN10my_decimalD2Ev; my_decimal::~my_decimal() mov rax, [rbp+var_50] mov [rbp+var_98], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_D03B29 mov rax, [rbp+var_98] add rsp, 0A0h pop rbp retn loc_D03B00: mov rax, [rbp+var_70] mov [rbp+var_A0], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_D03B29 mov rdi, [rbp+var_A0] call __Unwind_Resume loc_D03B29: call ___stack_chk_fail
my_decimal * Item_sum_avg::val_decimal(Item_sum_avg *this, my_decimal *a2) { my_decimal *v3; // [rsp+38h] [rbp-68h] my_decimal *v4; // [rsp+50h] [rbp-50h] _BYTE v5[64]; // [rsp+58h] [rbp-48h] BYREF unsigned long long v6; // [rsp+98h] [rbp-8h] v6 = __readfsqword(0x28u); my_decimal::my_decimal((my_decimal *)v5); if ( *((_QWORD *)this + 20) ) (*(void ( **)(_QWORD))(**((_QWORD **)this + 20) + 48LL))(*((_QWORD *)this + 20)); if ( *((_QWORD *)this + 63) ) { if ( (unsigned int)Item::result_type(this) == 4 ) { v3 = (Item_sum_avg *)((char *)this + 64 * (unsigned long long)*((unsigned int *)this + 122) + 360); int2my_decimal(30, *((_QWORD *)this + 63), 0, (my_decimal *)v5); my_decimal_div(30, a2, v3, (const my_decimal *)v5, *((_DWORD *)this + 128)); v4 = a2; } else { v4 = Item::val_decimal_from_real(this, a2); } } else { *((_BYTE *)this + 100) = 1; v4 = 0LL; } my_decimal::~my_decimal((my_decimal *)v5); return v4; }
fix_attributes_real: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RAX + 0x8],0x0 JNZ 0x00d039ba MOV RAX,qword ptr [RBP + -0x20] CMP word ptr [RAX + 0x28],0x0 JNZ 0x00d039ba MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] MOV qword ptr [RAX + 0x8],RCX MOV word ptr [RAX + 0x28],0x27 LAB_00d039ba: MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RCX + 0x8] MOVZX ECX,word ptr [RCX + 0x28] CMP RAX,RCX JNC 0x00d039f6 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX + 0x28] CMP EAX,0x27 JZ 0x00d039f6 MOV RAX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RAX + 0x38] MOV EDI,0x593 XOR EAX,EAX MOV ESI,EAX MOV AL,0x0 CALL 0x013bf0d0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00d03a52 LAB_00d039f6: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX + 0x28] CMP EAX,0x27 JZ 0x00d03a3a MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX + 0x28] CMP EAX,0x1f JL 0x00d03a3a MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,word ptr [RAX + 0x28] MOV EDX,ECX MOV RCX,qword ptr [RAX + 0x38] MOV EDI,0x591 XOR EAX,EAX MOV ESI,EAX MOV R8D,0x1e MOV AL,0x0 CALL 0x013bf0d0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00d03a52 LAB_00d03a3a: MOV RDI,qword ptr [RBP + -0x20] MOV ESI,0x59f MOV EDX,0xff CALL 0x00d038c0 AND AL,0x1 MOV byte ptr [RBP + -0x1],AL LAB_00d03a52: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x20 POP RBP RET
/* Column_definition::fix_attributes_real(unsigned int) */ byte __thiscall Column_definition::fix_attributes_real(Column_definition *this,uint param_1) { byte local_9; if ((*(long *)(this + 8) == 0) && (*(short *)(this + 0x28) == 0)) { *(ulong *)(this + 8) = (ulong)param_1; *(int2 *)(this + 0x28) = 0x27; } if ((*(ulong *)(this + 8) < (ulong)*(ushort *)(this + 0x28)) && (*(short *)(this + 0x28) != 0x27)) { my_error(0x593,0,*(int8 *)(this + 0x38)); local_9 = 1; } else if ((*(short *)(this + 0x28) == 0x27) || (*(ushort *)(this + 0x28) < 0x1f)) { local_9 = check_length(this,0x59f,0xff); local_9 = local_9 & 1; } else { my_error(0x591,0,*(int2 *)(this + 0x28),*(int8 *)(this + 0x38),0x1e); local_9 = 1; } return local_9; }
13,104
IpLocationStore::GetLocationRecord(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
SylCore-WoTLK/src/common/IPLocation/IPLocation.cpp
IpLocationRecord const* IpLocationStore::GetLocationRecord(std::string const& ipAddress) const { uint32 ip = Acore::Net::address_to_uint(Acore::Net::make_address_v4(ipAddress)); auto itr = std::upper_bound(_ipLocationStore.begin(), _ipLocationStore.end(), ip, [](uint32 ip, IpLocationRecord const& loc) { return ip < loc.IpTo; }); if (itr == _ipLocationStore.end()) { return nullptr; } if (ip < itr->IpFrom) { return nullptr; } return &(*itr); }
O3
cpp
IpLocationStore::GetLocationRecord(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const: pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq (%rsi), %rsi leaq 0x4(%rsp), %r14 movq %r14, %rdi callq 0xb2793 movl (%r14), %ecx bswapl %ecx movq (%rbx), %rdx movq 0x8(%rbx), %rax movq %rax, %rdi subq %rdx, %rdi testq %rdi, %rdi jle 0xb1716 shrq $0x3, %rdi movabsq $-0x71c71c71c71c71c7, %rsi # imm = 0x8E38E38E38E38E39 imulq %rdi, %rsi movq %rsi, %rdi shrq %rdi leaq (%rdi,%rdi,8), %r8 movq %rdi, %r9 notq %r9 addq %rsi, %r9 leaq (%rdx,%r8,8), %rsi addq $0x48, %rsi cmpl %ecx, -0x44(%rsi) cmovbeq %rsi, %rdx cmovaq %rdi, %r9 movq %r9, %rsi testq %r9, %r9 jg 0xb16e8 cmpq %rax, %rdx je 0xb1725 xorl %eax, %eax cmpl (%rdx), %ecx cmovaeq %rdx, %rax jmp 0xb1727 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZNK15IpLocationStore17GetLocationRecordERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r14 push rbx push rax mov rbx, rdi mov rsi, [rsi]; char * lea r14, [rsp+18h+var_14] mov rdi, r14; this call _ZN5boost4asio2ip15make_address_v4EPKc; boost::asio::ip::make_address_v4(char const*) mov ecx, [r14] bswap ecx mov rdx, [rbx] mov rax, [rbx+8] mov rdi, rax sub rdi, rdx test rdi, rdi jle short loc_B1716 shr rdi, 3 mov rsi, 8E38E38E38E38E39h imul rsi, rdi loc_B16E8: mov rdi, rsi shr rdi, 1 lea r8, [rdi+rdi*8] mov r9, rdi not r9 add r9, rsi lea rsi, [rdx+r8*8] add rsi, 48h ; 'H' cmp [rsi-44h], ecx cmovbe rdx, rsi cmova r9, rdi mov rsi, r9 test r9, r9 jg short loc_B16E8 loc_B1716: cmp rdx, rax jz short loc_B1725 xor eax, eax cmp ecx, [rdx] cmovnb rax, rdx jmp short loc_B1727 loc_B1725: xor eax, eax loc_B1727: add rsp, 8 pop rbx pop r14 retn
unsigned __int32 * IpLocationStore::GetLocationRecord(unsigned __int32 **a1, const char **a2) { long long v2; // rax unsigned __int32 v3; // ecx unsigned __int32 *v4; // rdx unsigned __int32 *v5; // rax long long v6; // rdi unsigned long long v7; // rsi unsigned long long v8; // rdi long long v9; // r9 long long v10; // rsi unsigned __int32 *result; // rax unsigned int v12[5]; // [rsp+0h] [rbp-14h] BYREF v12[0] = HIDWORD(v2); boost::asio::ip::make_address_v4((boost::asio::ip *)v12, *a2); v3 = _byteswap_ulong(v12[0]); v4 = *a1; v5 = a1[1]; v6 = (char *)v5 - (char *)*a1; if ( v6 > 0 ) { v7 = 0x8E38E38E38E38E39LL * ((unsigned long long)v6 >> 3); do { v8 = v7 >> 1; v9 = v7 + ~(v7 >> 1); v10 = (long long)&v4[18 * (v7 >> 1) + 18]; if ( *(_DWORD *)(v10 - 68) > v3 ) v9 = v8; else v4 = (unsigned __int32 *)v10; v7 = v9; } while ( v9 > 0 ); } if ( v4 == v5 ) return 0LL; result = 0LL; if ( v3 >= *v4 ) return v4; return result; }
GetLocationRecord: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV RSI,qword ptr [RSI] LEA R14,[RSP + 0x4] MOV RDI,R14 CALL 0x001b2793 MOV ECX,dword ptr [R14] BSWAP ECX MOV RDX,qword ptr [RBX] MOV RAX,qword ptr [RBX + 0x8] MOV RDI,RAX SUB RDI,RDX TEST RDI,RDI JLE 0x001b1716 SHR RDI,0x3 MOV RSI,-0x71c71c71c71c71c7 IMUL RSI,RDI LAB_001b16e8: MOV RDI,RSI SHR RDI,0x1 LEA R8,[RDI + RDI*0x8] MOV R9,RDI NOT R9 ADD R9,RSI LEA RSI,[RDX + R8*0x8] ADD RSI,0x48 CMP dword ptr [RSI + -0x44],ECX CMOVBE RDX,RSI CMOVA R9,RDI MOV RSI,R9 TEST R9,R9 JG 0x001b16e8 LAB_001b1716: CMP RDX,RAX JZ 0x001b1725 XOR EAX,EAX CMP ECX,dword ptr [RDX] CMOVNC RAX,RDX JMP 0x001b1727 LAB_001b1725: XOR EAX,EAX LAB_001b1727: ADD RSP,0x8 POP RBX POP R14 RET
/* IpLocationStore::GetLocationRecord(std::__cxx11::string const&) const */ uint * __thiscall IpLocationStore::GetLocationRecord(IpLocationStore *this,string *param_1) { int8 in_RAX; uint *puVar1; uint uVar2; uint *puVar3; ulong uVar4; ulong uVar5; uint local_14; local_14 = (uint)((ulong)in_RAX >> 0x20); boost::asio::ip::make_address_v4((ip *)&local_14,*(char **)param_1); uVar2 = local_14 >> 0x18 | (local_14 & 0xff0000) >> 8 | (local_14 & 0xff00) << 8 | local_14 << 0x18; puVar3 = *(uint **)this; uVar4 = (long)*(uint **)(this + 8) - (long)puVar3; if (0 < (long)uVar4) { uVar4 = (uVar4 >> 3) * -0x71c71c71c71c71c7; do { uVar5 = uVar4 >> 1; uVar4 = ~uVar5 + uVar4; puVar1 = puVar3 + uVar5 * 0x12 + 0x12; if (uVar2 < puVar3[uVar5 * 0x12 + 1]) { uVar4 = uVar5; puVar1 = puVar3; } puVar3 = puVar1; } while (0 < (long)uVar4); } if (puVar3 == *(uint **)(this + 8)) { puVar1 = (uint *)0x0; } else { puVar1 = (uint *)0x0; if (*puVar3 <= uVar2) { puVar1 = puVar3; } } return puVar1; }
13,105
my_strnncoll_simple
eloqsql/strings/ctype-simple.c
int my_strnncoll_simple(CHARSET_INFO * cs, const uchar *s, size_t slen, const uchar *t, size_t tlen, my_bool t_is_prefix) { size_t len = ( slen > tlen ) ? tlen : slen; const uchar *map= cs->sort_order; if (t_is_prefix && slen > tlen) slen=tlen; while (len--) { if (map[*s++] != map[*t++]) return ((int) map[s[-1]] - (int) map[t[-1]]); } /* We can't use (slen - tlen) here as the result may be outside of the precision of a signed int */ return slen > tlen ? 1 : slen < tlen ? -1 : 0 ; }
O0
c
my_strnncoll_simple: pushq %rbp movq %rsp, %rbp movb %r9b, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movb %al, -0x31(%rbp) movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax jbe 0x57722 movq -0x30(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x5772a movq -0x20(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movq %rax, -0x48(%rbp) movsbl -0x31(%rbp), %eax cmpl $0x0, %eax je 0x57759 movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax jbe 0x57759 movq -0x30(%rbp), %rax movq %rax, -0x20(%rbp) jmp 0x5775b movq -0x40(%rbp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x40(%rbp) cmpq $0x0, %rax je 0x577d1 movq -0x48(%rbp), %rax movq -0x18(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x18(%rbp) movzbl (%rcx), %ecx movzbl (%rax,%rcx), %eax movq -0x48(%rbp), %rcx movq -0x28(%rbp), %rdx movq %rdx, %rsi addq $0x1, %rsi movq %rsi, -0x28(%rbp) movzbl (%rdx), %edx movzbl (%rcx,%rdx), %ecx cmpl %ecx, %eax je 0x577cf movq -0x48(%rbp), %rax movq -0x18(%rbp), %rcx movzbl -0x1(%rcx), %ecx movzbl (%rax,%rcx), %eax movq -0x48(%rbp), %rcx movq -0x28(%rbp), %rdx movzbl -0x1(%rdx), %edx movzbl (%rcx,%rdx), %ecx subl %ecx, %eax movl %eax, -0x4(%rbp) jmp 0x57803 jmp 0x5775b movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax jbe 0x577e5 movl $0x1, %eax movl %eax, -0x54(%rbp) jmp 0x577fd movq -0x20(%rbp), %rdx movq -0x30(%rbp), %rsi xorl %eax, %eax movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rsi, %rdx cmovbl %ecx, %eax movl %eax, -0x54(%rbp) movl -0x54(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
my_strnncoll_simple: push rbp mov rbp, rsp mov al, r9b mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_31], al mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jbe short loc_57722 mov rax, [rbp+var_30] mov [rbp+var_50], rax jmp short loc_5772A loc_57722: mov rax, [rbp+var_20] mov [rbp+var_50], rax loc_5772A: mov rax, [rbp+var_50] mov [rbp+var_40], rax mov rax, [rbp+var_10] mov rax, [rax+58h] mov [rbp+var_48], rax movsx eax, [rbp+var_31] cmp eax, 0 jz short loc_57759 mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jbe short loc_57759 mov rax, [rbp+var_30] mov [rbp+var_20], rax loc_57759: jmp short $+2 loc_5775B: mov rax, [rbp+var_40] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_40], rcx cmp rax, 0 jz short loc_577D1 mov rax, [rbp+var_48] mov rcx, [rbp+var_18] mov rdx, rcx add rdx, 1 mov [rbp+var_18], rdx movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_48] mov rdx, [rbp+var_28] mov rsi, rdx add rsi, 1 mov [rbp+var_28], rsi movzx edx, byte ptr [rdx] movzx ecx, byte ptr [rcx+rdx] cmp eax, ecx jz short loc_577CF mov rax, [rbp+var_48] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx-1] movzx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_48] mov rdx, [rbp+var_28] movzx edx, byte ptr [rdx-1] movzx ecx, byte ptr [rcx+rdx] sub eax, ecx mov [rbp+var_4], eax jmp short loc_57803 loc_577CF: jmp short loc_5775B loc_577D1: mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jbe short loc_577E5 mov eax, 1 mov [rbp+var_54], eax jmp short loc_577FD loc_577E5: mov rdx, [rbp+var_20] mov rsi, [rbp+var_30] xor eax, eax mov ecx, 0FFFFFFFFh cmp rdx, rsi cmovb eax, ecx mov [rbp+var_54], eax loc_577FD: mov eax, [rbp+var_54] mov [rbp+var_4], eax loc_57803: mov eax, [rbp+var_4] pop rbp retn
long long my_strnncoll_simple( long long a1, unsigned __int8 *a2, unsigned long long a3, unsigned __int8 *a4, unsigned long long a5, char a6) { unsigned __int8 *v7; // rcx unsigned __int8 *v8; // rdx unsigned int v9; // eax unsigned long long v12; // [rsp+4h] [rbp-50h] long long v13; // [rsp+Ch] [rbp-48h] unsigned long long v14; // [rsp+14h] [rbp-40h] unsigned long long v16; // [rsp+34h] [rbp-20h] v16 = a3; if ( a3 <= a5 ) v12 = a3; else v12 = a5; v14 = v12; v13 = *(_QWORD *)(a1 + 88); if ( a6 && a3 > a5 ) v16 = a5; while ( v14-- ) { v7 = a2++; v8 = a4++; if ( *(unsigned __int8 *)(v13 + *v7) != *(unsigned __int8 *)(v13 + *v8) ) return (unsigned int)(*(unsigned __int8 *)(v13 + *(a2 - 1)) - *(unsigned __int8 *)(v13 + *(a4 - 1))); } if ( v16 <= a5 ) { v9 = 0; if ( v16 < a5 ) v9 = -1; return v9; } else { return 1; } }
my_strnncoll_simple: PUSH RBP MOV RBP,RSP MOV AL,R9B MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV byte ptr [RBP + -0x31],AL MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x30] JBE 0x00157722 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x50],RAX JMP 0x0015772a LAB_00157722: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x50],RAX LAB_0015772a: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RBP + -0x48],RAX MOVSX EAX,byte ptr [RBP + -0x31] CMP EAX,0x0 JZ 0x00157759 MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x30] JBE 0x00157759 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x20],RAX LAB_00157759: JMP 0x0015775b LAB_0015775b: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RBP + -0x40],RCX CMP RAX,0x0 JZ 0x001577d1 MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x18] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x18],RDX MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x28] MOV RSI,RDX ADD RSI,0x1 MOV qword ptr [RBP + -0x28],RSI MOVZX EDX,byte ptr [RDX] MOVZX ECX,byte ptr [RCX + RDX*0x1] CMP EAX,ECX JZ 0x001577cf MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + -0x1] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x28] MOVZX EDX,byte ptr [RDX + -0x1] MOVZX ECX,byte ptr [RCX + RDX*0x1] SUB EAX,ECX MOV dword ptr [RBP + -0x4],EAX JMP 0x00157803 LAB_001577cf: JMP 0x0015775b LAB_001577d1: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x30] JBE 0x001577e5 MOV EAX,0x1 MOV dword ptr [RBP + -0x54],EAX JMP 0x001577fd LAB_001577e5: MOV RDX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x30] XOR EAX,EAX MOV ECX,0xffffffff CMP RDX,RSI CMOVC EAX,ECX MOV dword ptr [RBP + -0x54],EAX LAB_001577fd: MOV EAX,dword ptr [RBP + -0x54] MOV dword ptr [RBP + -0x4],EAX LAB_00157803: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int my_strnncoll_simple(long param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5, char param_6) { long lVar1; byte *pbVar2; byte *pbVar3; int local_5c; ulong local_58; ulong local_48; byte *local_30; ulong local_28; byte *local_20; local_58 = param_3; if (param_5 < param_3) { local_58 = param_5; } local_48 = local_58; lVar1 = *(long *)(param_1 + 0x58); pbVar2 = param_4; pbVar3 = param_2; local_28 = param_3; if ((param_6 != '\0') && (pbVar2 = param_4, pbVar3 = param_2, param_5 < param_3)) { pbVar2 = param_4; pbVar3 = param_2; local_28 = param_5; } do { local_20 = pbVar3; local_30 = pbVar2; if (local_48 == 0) { if (param_5 < local_28) { local_5c = 1; } else { local_5c = 0; if (local_28 < param_5) { local_5c = -1; } } return local_5c; } local_48 = local_48 - 1; pbVar2 = local_30 + 1; pbVar3 = local_20 + 1; } while (*(char *)(lVar1 + (ulong)*local_20) == *(char *)(lVar1 + (ulong)*local_30)); return (uint)*(byte *)(lVar1 + (ulong)*local_20) - (uint)*(byte *)(lVar1 + (ulong)*local_30); }
13,106
ma_pvio_wait_async
eloqsql/libmariadb/libmariadb/ma_pvio.c
static my_bool ma_pvio_wait_async(struct mysql_async_context *b, enum enum_pvio_io_event event, int timeout) { switch (event) { case VIO_IO_EVENT_READ: b->events_to_wait_for = MYSQL_WAIT_READ; break; case VIO_IO_EVENT_WRITE: b->events_to_wait_for = MYSQL_WAIT_WRITE; break; case VIO_IO_EVENT_CONNECT: b->events_to_wait_for = MYSQL_WAIT_WRITE | IF_WIN(0, MYSQL_WAIT_EXCEPT); break; } if (timeout >= 0) { b->events_to_wait_for |= MYSQL_WAIT_TIMEOUT; b->timeout_value= timeout; } 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 (b->events_occurred & MYSQL_WAIT_TIMEOUT) ? 0 : 1; }
O0
c
ma_pvio_wait_async: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movl -0xc(%rbp), %eax movl %eax, -0x14(%rbp) testl %eax, %eax je 0x28a22 jmp 0x28a0e movl -0x14(%rbp), %eax subl $0x1, %eax je 0x28a2e jmp 0x28a18 movl -0x14(%rbp), %eax subl $0x2, %eax je 0x28a3a jmp 0x28a44 movq -0x8(%rbp), %rax movl $0x1, (%rax) jmp 0x28a44 movq -0x8(%rbp), %rax movl $0x2, (%rax) jmp 0x28a44 movq -0x8(%rbp), %rax movl $0x6, (%rax) cmpl $0x0, -0x10(%rbp) jl 0x28a5f movq -0x8(%rbp), %rax movl (%rax), %ecx orl $0x8, %ecx movl %ecx, (%rax) movl -0x10(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x10(%rax) movq -0x8(%rbp), %rax cmpq $0x0, 0x20(%rax) je 0x28a81 movq -0x8(%rbp), %rax movq 0x20(%rax), %rax movq -0x8(%rbp), %rcx movq 0x28(%rcx), %rsi movl $0x1, %edi callq *%rax movq -0x8(%rbp), %rdi addq $0x38, %rdi callq 0x440e0 movq -0x8(%rbp), %rax cmpq $0x0, 0x20(%rax) je 0x28aad movq -0x8(%rbp), %rax movq 0x20(%rax), %rax movq -0x8(%rbp), %rcx movq 0x28(%rcx), %rsi xorl %edi, %edi callq *%rax movq -0x8(%rbp), %rax movl 0x4(%rax), %edx andl $0x8, %edx movl $0x1, %eax xorl %ecx, %ecx cmpl $0x0, %edx cmovnel %ecx, %eax addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
ma_pvio_wait_async: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov eax, [rbp+var_C] mov [rbp+var_14], eax test eax, eax jz short loc_28A22 jmp short $+2 loc_28A0E: mov eax, [rbp+var_14] sub eax, 1 jz short loc_28A2E jmp short $+2 loc_28A18: mov eax, [rbp+var_14] sub eax, 2 jz short loc_28A3A jmp short loc_28A44 loc_28A22: mov rax, [rbp+var_8] mov dword ptr [rax], 1 jmp short loc_28A44 loc_28A2E: mov rax, [rbp+var_8] mov dword ptr [rax], 2 jmp short loc_28A44 loc_28A3A: mov rax, [rbp+var_8] mov dword ptr [rax], 6 loc_28A44: cmp [rbp+var_10], 0 jl short loc_28A5F mov rax, [rbp+var_8] mov ecx, [rax] or ecx, 8 mov [rax], ecx mov ecx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax+10h], ecx loc_28A5F: mov rax, [rbp+var_8] cmp qword ptr [rax+20h], 0 jz short loc_28A81 mov rax, [rbp+var_8] mov rax, [rax+20h] mov rcx, [rbp+var_8] mov rsi, [rcx+28h] mov edi, 1 call rax loc_28A81: mov rdi, [rbp+var_8] add rdi, 38h ; '8' call my_context_yield mov rax, [rbp+var_8] cmp qword ptr [rax+20h], 0 jz short loc_28AAD mov rax, [rbp+var_8] mov rax, [rax+20h] mov rcx, [rbp+var_8] mov rsi, [rcx+28h] xor edi, edi call rax loc_28AAD: mov rax, [rbp+var_8] mov edx, [rax+4] and edx, 8 mov eax, 1 xor ecx, ecx cmp edx, 0 cmovnz eax, ecx add rsp, 20h pop rbp retn
_BOOL8 ma_pvio_wait_async(long long a1, int a2, int a3) { if ( a2 ) { if ( a2 == 1 ) { *(_DWORD *)a1 = 2; } else if ( a2 == 2 ) { *(_DWORD *)a1 = 6; } } else { *(_DWORD *)a1 = 1; } if ( a3 >= 0 ) { *(_DWORD *)a1 |= 8u; *(_DWORD *)(a1 + 16) = a3; } if ( *(_QWORD *)(a1 + 32) ) (*(void ( **)(long long, _QWORD))(a1 + 32))(1LL, *(_QWORD *)(a1 + 40)); my_context_yield(a1 + 56); if ( *(_QWORD *)(a1 + 32) ) (*(void ( **)(_QWORD, _QWORD))(a1 + 32))(0LL, *(_QWORD *)(a1 + 40)); return (*(_DWORD *)(a1 + 4) & 8) == 0; }
ma_pvio_wait_async: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x14],EAX TEST EAX,EAX JZ 0x00128a22 JMP 0x00128a0e LAB_00128a0e: MOV EAX,dword ptr [RBP + -0x14] SUB EAX,0x1 JZ 0x00128a2e JMP 0x00128a18 LAB_00128a18: MOV EAX,dword ptr [RBP + -0x14] SUB EAX,0x2 JZ 0x00128a3a JMP 0x00128a44 LAB_00128a22: MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX],0x1 JMP 0x00128a44 LAB_00128a2e: MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX],0x2 JMP 0x00128a44 LAB_00128a3a: MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX],0x6 LAB_00128a44: CMP dword ptr [RBP + -0x10],0x0 JL 0x00128a5f MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX] OR ECX,0x8 MOV dword ptr [RAX],ECX MOV ECX,dword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x10],ECX LAB_00128a5f: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x20],0x0 JZ 0x00128a81 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RCX + 0x28] MOV EDI,0x1 CALL RAX LAB_00128a81: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x38 CALL 0x001440e0 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x20],0x0 JZ 0x00128aad MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RCX + 0x28] XOR EDI,EDI CALL RAX LAB_00128aad: MOV RAX,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RAX + 0x4] AND EDX,0x8 MOV EAX,0x1 XOR ECX,ECX CMP EDX,0x0 CMOVNZ EAX,ECX ADD RSP,0x20 POP RBP RET
bool ma_pvio_wait_async(uint *param_1,int param_2,uint param_3) { if (param_2 == 0) { *param_1 = 1; } else if (param_2 == 1) { *param_1 = 2; } else if (param_2 == 2) { *param_1 = 6; } if (-1 < (int)param_3) { *param_1 = *param_1 | 8; param_1[4] = param_3; } if (*(long *)(param_1 + 8) != 0) { (**(code **)(param_1 + 8))(1,*(int8 *)(param_1 + 10)); } my_context_yield(param_1 + 0xe); if (*(long *)(param_1 + 8) != 0) { (**(code **)(param_1 + 8))(0,*(int8 *)(param_1 + 10)); } return (param_1[1] & 8) == 0; }
13,107
Config::Location::operator<(Config::Location const&) const
Dolphin-anty/Source/Core/Common/Config/ConfigInfo.cpp
bool Location::operator<(const Location& other) const { if (system != other.system) return system < other.system; const int section_compare = strcasecmp(section.c_str(), other.section.c_str()); if (section_compare != 0) return section_compare < 0; const int key_compare = strcasecmp(key.c_str(), other.key.c_str()); return key_compare < 0; }
O3
cpp
Config::Location::operator<(Config::Location const&) const: movl (%rsi), %eax cmpl %eax, (%rdi) jne 0x196a7 pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq 0x8(%rdi), %rdi movq 0x8(%rsi), %rsi callq 0x7410 testl %eax, %eax jne 0x1969c movq 0x28(%r14), %rdi movq 0x28(%rbx), %rsi callq 0x7410 shrl $0x1f, %eax addq $0x8, %rsp popq %rbx popq %r14 retq setl %al retq nop
_ZNK6Config8LocationltERKS0_: mov eax, [rsi] cmp [rdi], eax jnz short loc_196A7 push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov rdi, [rdi+8] mov rsi, [rsi+8] call _strcasecmp test eax, eax jnz short loc_1969C mov rdi, [r14+28h] mov rsi, [rbx+28h] call _strcasecmp loc_1969C: shr eax, 1Fh add rsp, 8 pop rbx pop r14 retn loc_196A7: setl al retn
char Config::Location::operator<(long long a1, long long a2, long long a3, long long a4) { unsigned int v4; // eax long long v5; // rdx long long v6; // rcx int v7; // eax if ( *(_DWORD *)a1 == *(_DWORD *)a2 ) { v4 = strcasecmp(*(_QWORD *)(a1 + 8), *(_QWORD *)(a2 + 8), a3, a4); if ( !v4 ) v4 = strcasecmp(*(_QWORD *)(a1 + 40), *(_QWORD *)(a2 + 40), v5, v6); return v4 >> 31; } else { LOBYTE(v7) = *(_DWORD *)a1 < *(_DWORD *)a2; } return v7; }
operator<: MOV EAX,dword ptr [RSI] CMP dword ptr [RDI],EAX JNZ 0x001196a7 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV RDI,qword ptr [RDI + 0x8] MOV RSI,qword ptr [RSI + 0x8] CALL 0x00107410 TEST EAX,EAX JNZ 0x0011969c MOV RDI,qword ptr [R14 + 0x28] MOV RSI,qword ptr [RBX + 0x28] CALL 0x00107410 LAB_0011969c: SHR EAX,0x1f ADD RSP,0x8 POP RBX POP R14 RET LAB_001196a7: SETL AL RET
/* Config::Location::TEMPNAMEPLACEHOLDERVALUE(Config::Location const&) const */ uint __thiscall Config::Location::operator<(Location *this,Location *param_1) { int iVar1; uint uVar2; iVar1 = *(int *)param_1; if (*(int *)this == iVar1) { uVar2 = strcasecmp(*(char **)(this + 8),*(char **)(param_1 + 8)); if (uVar2 == 0) { uVar2 = strcasecmp(*(char **)(this + 0x28),*(char **)(param_1 + 0x28)); } return uVar2 >> 0x1f; } return CONCAT31((int3)((uint)iVar1 >> 8),*(int *)this < iVar1); }
13,108
ModbusTcpPortPrivate::~ModbusTcpPortPrivate()
serhmarch[P]ModbusBridge/modbus/src/unix/../ModbusTcpPort_p.h
ModbusTcpPortPrivate(bool blocking) : ModbusPortPrivate(blocking) { const ModbusTcpPort::Defaults &d = ModbusTcpPort::Defaults::instance(); settings.host = d.host ; settings.port = d.port ; settingsBase.timeout = d.timeout; autoIncrement = true; transaction = 0; sz = 0; }
O0
c
ModbusTcpPortPrivate::~ModbusTcpPortPrivate(): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x10(%rbp) leaq 0x14c75(%rip), %rax # 0x37bd0 addq $0x10, %rax movq %rax, (%rdi) addq $0x40, %rdi callq 0x22f20 movq -0x10(%rbp), %rdi callq 0x22fb0 addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
_ZN20ModbusTcpPortPrivateD2Ev: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] mov [rbp+var_10], rdi lea rax, _ZTV20ModbusTcpPortPrivate; `vtable for'ModbusTcpPortPrivate add rax, 10h mov [rdi], rax add rdi, 40h ; '@' call _ZN20ModbusTcpPortPrivateUt_D2Ev; ModbusTcpPortPrivate::{unnamed type#1}::~ModbusTcpPortPrivate() mov rdi, [rbp+var_10]; this call _ZN17ModbusPortPrivateD2Ev; ModbusPortPrivate::~ModbusPortPrivate() add rsp, 10h pop rbp retn
void ModbusTcpPortPrivate::~ModbusTcpPortPrivate(ModbusTcpPortPrivate *this) { *(_QWORD *)this = &`vtable for'ModbusTcpPortPrivate + 2; ModbusTcpPortPrivate::{unnamed type#1}::~ModbusTcpPortPrivate((long long)this + 64); ModbusPortPrivate::~ModbusPortPrivate(this); }
~ModbusTcpPortPrivate: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RDI LEA RAX,[0x137bd0] ADD RAX,0x10 MOV qword ptr [RDI],RAX ADD RDI,0x40 CALL 0x00122f20 MOV RDI,qword ptr [RBP + -0x10] CALL 0x00122fb0 ADD RSP,0x10 POP RBP RET
/* ModbusTcpPortPrivate::~ModbusTcpPortPrivate() */ void __thiscall ModbusTcpPortPrivate::~ModbusTcpPortPrivate(ModbusTcpPortPrivate *this) { *(int ***)this = &PTR__ModbusTcpPortPrivate_00137be0; {unnamed_type#1}::~ModbusTcpPortPrivate((_unnamed_type_1_ *)(this + 0x40)); ModbusPortPrivate::~ModbusPortPrivate((ModbusPortPrivate *)this); return; }
13,109
ModbusTcpPortPrivate::~ModbusTcpPortPrivate()
serhmarch[P]ModbusBridge/modbus/src/unix/../ModbusTcpPort_p.h
ModbusTcpPortPrivate(bool blocking) : ModbusPortPrivate(blocking) { const ModbusTcpPort::Defaults &d = ModbusTcpPort::Defaults::instance(); settings.host = d.host ; settings.port = d.port ; settingsBase.timeout = d.timeout; autoIncrement = true; transaction = 0; sz = 0; }
O2
c
ModbusTcpPortPrivate::~ModbusTcpPortPrivate(): pushq %rbx movq %rdi, %rbx callq 0xfb36 movl $0x180, %esi # imm = 0x180 movq %rbx, %rdi popq %rbx jmp 0x5330 nop
_ZN20ModbusTcpPortPrivateD0Ev: push rbx mov rbx, rdi call _ZN20ModbusTcpPortPrivateD2Ev; ModbusTcpPortPrivate::~ModbusTcpPortPrivate() mov esi, 180h; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void ModbusTcpPortPrivate::~ModbusTcpPortPrivate(ModbusTcpPortPrivate *this) { ModbusTcpPortPrivate::~ModbusTcpPortPrivate(this); operator delete(this, 0x180uLL); }
~ModbusTcpPortPrivate: PUSH RBX MOV RBX,RDI CALL 0x0010fb36 MOV ESI,0x180 MOV RDI,RBX POP RBX JMP 0x00105330
/* ModbusTcpPortPrivate::~ModbusTcpPortPrivate() */ void __thiscall ModbusTcpPortPrivate::~ModbusTcpPortPrivate(ModbusTcpPortPrivate *this) { ~ModbusTcpPortPrivate(this); operator_delete(this,0x180); return; }
13,110
ModbusTcpPortPrivate::~ModbusTcpPortPrivate()
serhmarch[P]ModbusBridge/modbus/src/unix/../ModbusTcpPort_p.h
ModbusTcpPortPrivate(bool blocking) : ModbusPortPrivate(blocking) { const ModbusTcpPort::Defaults &d = ModbusTcpPort::Defaults::instance(); settings.host = d.host ; settings.port = d.port ; settingsBase.timeout = d.timeout; autoIncrement = true; transaction = 0; sz = 0; }
O3
c
ModbusTcpPortPrivate::~ModbusTcpPortPrivate(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x28(%rdi), %rax movq %rax, (%rsp) movq %rax, 0x18(%rdi) xorl %eax, %eax movq %rax, 0x20(%rdi) movb %al, 0x28(%rdi) movl $0x0, 0x8(%rdi) movb %sil, 0xe(%rdi) movw $0x0, 0xc(%rdi) leaq 0xe815(%rip), %rcx # 0x21be8 movq %rcx, (%rdi) leaq 0x40(%rdi), %r14 leaq 0x50(%rdi), %rbp movq %rbp, 0x40(%rdi) movq %rax, 0x48(%rdi) movb %al, 0x50(%rdi) callq 0x9d74 movq %rax, %r15 movq (%rax), %r12 movq 0x48(%rbx), %r13 movq %r12, %rdi callq 0x5180 movq %r14, %rdi xorl %esi, %esi movq %r13, %rdx movq %r12, %rcx movq %rax, %r8 callq 0x54b0 movzwl 0x8(%r15), %eax movw %ax, 0x60(%rbx) movl 0xc(%r15), %eax movl %eax, 0x38(%rbx) movb $0x1, 0x68(%rbx) xorl %eax, %eax movw %ax, 0x6a(%rbx) movw %ax, 0x178(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 movq (%r14), %rdi cmpq %rbp, %rdi je 0x1345a movq (%rbp), %rsi incq %rsi callq 0x5310 leaq 0xe7a7(%rip), %rax # 0x21c08 movq %rax, (%rbx) movq 0x18(%rbx), %rdi cmpq (%rsp), %rdi je 0x1347d movq (%rsp), %rax movq (%rax), %rsi incq %rsi callq 0x5310 movq %r15, %rdi callq 0x5550 nop
_ZN20ModbusTcpPortPrivateC2Eb: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi lea rax, [rdi+28h] mov [rsp+38h+var_38], rax mov [rdi+18h], rax xor eax, eax mov [rdi+20h], rax mov [rdi+28h], al mov dword ptr [rdi+8], 0 mov [rdi+0Eh], sil mov word ptr [rdi+0Ch], 0 lea rcx, off_21BE8 mov [rdi], rcx lea r14, [rdi+40h] lea rbp, [rdi+50h] mov [rdi+40h], rbp mov [rdi+48h], rax mov [rdi+50h], al call _ZN13ModbusTcpPort8Defaults8instanceEv; ModbusTcpPort::Defaults::instance(void) mov r15, rax mov r12, [rax] mov r13, [rbx+48h] mov rdi, r12 call _strlen mov rdi, r14 xor esi, esi mov rdx, r13 mov rcx, r12 mov r8, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) movzx eax, word ptr [r15+8] mov [rbx+60h], ax mov eax, [r15+0Ch] mov [rbx+38h], eax mov byte ptr [rbx+68h], 1 xor eax, eax mov [rbx+6Ah], ax mov [rbx+178h], ax add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r15, rax mov rdi, [r14]; void * cmp rdi, rbp jz short loc_1345A mov rsi, [rbp+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1345A: lea rax, off_21C08 mov [rbx], rax mov rdi, [rbx+18h]; void * cmp rdi, [rsp+0] jz short loc_1347D mov rax, [rsp+0] mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1347D: mov rdi, r15 call __Unwind_Resume
void ModbusTcpPortPrivate::ModbusTcpPortPrivate(ModbusTcpPortPrivate *this, char a2) { long long *v2; // r15 long long v3; // r12 long long v4; // r13 long long v5; // rax *((_QWORD *)this + 3) = (char *)this + 40; *((_QWORD *)this + 4) = 0LL; *((_BYTE *)this + 40) = 0; *((_DWORD *)this + 2) = 0; *((_BYTE *)this + 14) = a2; *((_WORD *)this + 6) = 0; *(_QWORD *)this = off_21BE8; *((_QWORD *)this + 8) = (char *)this + 80; *((_QWORD *)this + 9) = 0LL; *((_BYTE *)this + 80) = 0; v2 = ModbusTcpPort::Defaults::instance(this); v3 = *v2; v4 = *((_QWORD *)this + 9); v5 = strlen(*v2); std::string::_M_replace((char *)this + 64, 0LL, v4, v3, v5); *((_WORD *)this + 48) = *((_WORD *)v2 + 4); *((_DWORD *)this + 14) = *((_DWORD *)v2 + 3); *((_BYTE *)this + 104) = 1; *((_WORD *)this + 53) = 0; *((_WORD *)this + 188) = 0; }
ModbusTcpPortPrivate: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI LEA RAX,[RDI + 0x28] MOV qword ptr [RSP],RAX MOV qword ptr [RDI + 0x18],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x20],RAX MOV byte ptr [RDI + 0x28],AL MOV dword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0xe],SIL MOV word ptr [RDI + 0xc],0x0 LEA RCX,[0x121be8] MOV qword ptr [RDI],RCX LEA R14,[RDI + 0x40] LEA RBP,[RDI + 0x50] MOV qword ptr [RDI + 0x40],RBP MOV qword ptr [RDI + 0x48],RAX MOV byte ptr [RDI + 0x50],AL LAB_001133e9: CALL 0x00109d74 MOV R15,RAX MOV R12,qword ptr [RAX] MOV R13,qword ptr [RBX + 0x48] MOV RDI,R12 CALL 0x00105180 MOV RDI,R14 XOR ESI,ESI MOV RDX,R13 MOV RCX,R12 MOV R8,RAX CALL 0x001054b0 LAB_00113413: MOVZX EAX,word ptr [R15 + 0x8] MOV word ptr [RBX + 0x60],AX MOV EAX,dword ptr [R15 + 0xc] MOV dword ptr [RBX + 0x38],EAX MOV byte ptr [RBX + 0x68],0x1 XOR EAX,EAX MOV word ptr [RBX + 0x6a],AX MOV word ptr [RBX + 0x178],AX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* ModbusTcpPortPrivate::ModbusTcpPortPrivate(bool) */ void __thiscall ModbusTcpPortPrivate::ModbusTcpPortPrivate(ModbusTcpPortPrivate *this,bool param_1) { char *__s; char *pcVar1; int8 *puVar2; *(ModbusTcpPortPrivate **)(this + 0x18) = this + 0x28; *(int8 *)(this + 0x20) = 0; this[0x28] = (ModbusTcpPortPrivate)0x0; *(int4 *)(this + 8) = 0; this[0xe] = (ModbusTcpPortPrivate)param_1; *(int2 *)(this + 0xc) = 0; *(int ***)this = &PTR__ModbusTcpPortPrivate_00121be8; *(ModbusTcpPortPrivate **)(this + 0x40) = this + 0x50; *(int8 *)(this + 0x48) = 0; this[0x50] = (ModbusTcpPortPrivate)0x0; /* try { // try from 001133e9 to 00113412 has its CatchHandler @ 00113443 */ puVar2 = (int8 *)ModbusTcpPort::Defaults::instance(); __s = (char *)*puVar2; pcVar1 = *(char **)(this + 0x48); strlen(__s); std::__cxx11::string::_M_replace((ulong)(this + 0x40),0,pcVar1,(ulong)__s); *(int2 *)(this + 0x60) = *(int2 *)(puVar2 + 1); *(int4 *)(this + 0x38) = *(int4 *)((long)puVar2 + 0xc); this[0x68] = (ModbusTcpPortPrivate)0x1; *(int2 *)(this + 0x6a) = 0; *(int2 *)(this + 0x178) = 0; return; }
13,111
my_load_path
eloqsql/mysys/mf_loadpath.c
char * my_load_path(char * to, const char *path, const char *own_path_prefix) { char buff[FN_REFLEN+1]; const char *from= buff; int is_cur; DBUG_ENTER("my_load_path"); DBUG_PRINT("enter",("path: %s prefix: %s",path, own_path_prefix ? own_path_prefix : "")); if ((path[0] == FN_HOMELIB && path[1] == FN_LIBCHAR) || test_if_hard_path(path)) from= path; else if ((is_cur=(path[0] == FN_CURLIB && path[1] == FN_LIBCHAR)) || (is_prefix(path,FN_PARENTDIR)) || ! own_path_prefix) { if (is_cur) is_cur=2; /* Remove current dir */ if (! my_getwd(buff,(uint) (FN_REFLEN-strlen(path)+is_cur),MYF(0))) { size_t length= strlen(buff); (void) strmake(buff + length, path+is_cur, FN_REFLEN - length); } else from= path; /* Return org file name */ } else (void) strxnmov(buff, FN_REFLEN, own_path_prefix, path, NullS); strmake(to, from, FN_REFLEN-1); DBUG_PRINT("exit",("to: %s",to)); DBUG_RETURN(to); }
O3
c
my_load_path: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x218, %rsp # imm = 0x218 movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) cmpb $0x7e, (%rsi) jne 0xa8c3e cmpb $0x2f, 0x1(%r14) je 0xa8c4a movq %r14, %rdi callq 0x9e7b6 testl %eax, %eax je 0xa8c85 movq %r14, %r12 movl $0x1ff, %edx # imm = 0x1FF movq %rbx, %rdi movq %r12, %rsi callq 0xd71d8 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0xa8d2c movq %rbx, %rax addq $0x218, %rsp # imm = 0x218 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpb $0x2e, (%r14) jne 0xa8c98 movl $0x2, %r13d cmpb $0x2f, 0x1(%r14) je 0xa8cd7 leaq 0x33709(%rip), %rsi # 0xdc3a8 movq %r14, %rdi callq 0xd58b8 xorl %r13d, %r13d testq %r15, %r15 je 0xa8cd7 testl %eax, %eax jne 0xa8cd7 leaq -0x240(%rbp), %r12 movl $0x200, %esi # imm = 0x200 movq %r12, %rdi movq %r15, %rdx movq %r14, %rcx xorl %r8d, %r8d xorl %eax, %eax callq 0xd72f8 jmp 0xa8c4d movq %r14, %rdi callq 0x29350 leal 0x200(%r13), %esi subl %eax, %esi leaq -0x240(%rbp), %r12 movq %r12, %rdi xorl %edx, %edx callq 0x9e620 testl %eax, %eax jne 0xa8c4a movq %r12, %rdi callq 0x29350 leaq (%rax,%rbp), %rdi addq $-0x240, %rdi # imm = 0xFDC0 addq %r13, %r14 movl $0x200, %edx # imm = 0x200 subq %rax, %rdx movq %r14, %rsi callq 0xd71d8 jmp 0xa8c4d callq 0x29270 nopl (%rax)
my_load_path: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 218h mov r15, rdx mov r14, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax cmp byte ptr [rsi], 7Eh ; '~' jnz short loc_A8C3E cmp byte ptr [r14+1], 2Fh ; '/' jz short loc_A8C4A loc_A8C3E: mov rdi, r14 call test_if_hard_path test eax, eax jz short loc_A8C85 loc_A8C4A: mov r12, r14 loc_A8C4D: mov edx, 1FFh mov rdi, rbx mov rsi, r12 call strmake mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_A8D2C mov rax, rbx add rsp, 218h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A8C85: cmp byte ptr [r14], 2Eh ; '.' jnz short loc_A8C98 mov r13d, 2 cmp byte ptr [r14+1], 2Fh ; '/' jz short loc_A8CD7 loc_A8C98: lea rsi, asc_DC3A8; ".." mov rdi, r14 call is_prefix xor r13d, r13d test r15, r15 jz short loc_A8CD7 test eax, eax jnz short loc_A8CD7 lea r12, [rbp+var_240] mov esi, 200h mov rdi, r12 mov rdx, r15 mov rcx, r14 xor r8d, r8d xor eax, eax call strxnmov jmp loc_A8C4D loc_A8CD7: mov rdi, r14 call _strlen lea esi, [r13+200h] sub esi, eax lea r12, [rbp+var_240] mov rdi, r12 xor edx, edx call my_getwd test eax, eax jnz loc_A8C4A mov rdi, r12 call _strlen lea rdi, [rax+rbp] add rdi, 0FFFFFFFFFFFFFDC0h add r14, r13 mov edx, 200h sub rdx, rax mov rsi, r14 call strmake jmp loc_A8C4D loc_A8D2C: call ___stack_chk_fail
long long my_load_path(long long a1, char *a2, long long a3) { char *v4; // r12 long long v6; // r13 int v7; // eax int v8; // r9d int v9; // eax long long v10; // rax char v11[528]; // [rsp+0h] [rbp-240h] BYREF unsigned long long v12; // [rsp+210h] [rbp-30h] v12 = __readfsqword(0x28u); if ( (*a2 != 126 || a2[1] != 47) && !test_if_hard_path(a2) ) { if ( *a2 != 46 || (v6 = 2LL, a2[1] != 47) ) { v7 = is_prefix(a2, ".."); v6 = 0LL; if ( a3 ) { if ( !v7 ) { v4 = v11; strxnmov((unsigned int)v11, 512, a3, (_DWORD)a2, 0, v8, v11[0]); goto LABEL_5; } } } v9 = strlen(a2); v4 = v11; if ( !(unsigned int)my_getwd(v11, (unsigned int)(v6 + 512 - v9), 0) ) { v10 = strlen(v11); strmake(&v11[v10], &a2[v6], 512 - v10); goto LABEL_5; } } v4 = a2; LABEL_5: strmake(a1, v4, 511LL); return a1; }
my_load_path: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x218 MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX CMP byte ptr [RSI],0x7e JNZ 0x001a8c3e CMP byte ptr [R14 + 0x1],0x2f JZ 0x001a8c4a LAB_001a8c3e: MOV RDI,R14 CALL 0x0019e7b6 TEST EAX,EAX JZ 0x001a8c85 LAB_001a8c4a: MOV R12,R14 LAB_001a8c4d: MOV EDX,0x1ff MOV RDI,RBX MOV RSI,R12 CALL 0x001d71d8 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001a8d2c MOV RAX,RBX ADD RSP,0x218 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001a8c85: CMP byte ptr [R14],0x2e JNZ 0x001a8c98 MOV R13D,0x2 CMP byte ptr [R14 + 0x1],0x2f JZ 0x001a8cd7 LAB_001a8c98: LEA RSI,[0x1dc3a8] MOV RDI,R14 CALL 0x001d58b8 XOR R13D,R13D TEST R15,R15 JZ 0x001a8cd7 TEST EAX,EAX JNZ 0x001a8cd7 LEA R12,[RBP + -0x240] MOV ESI,0x200 MOV RDI,R12 MOV RDX,R15 MOV RCX,R14 XOR R8D,R8D XOR EAX,EAX CALL 0x001d72f8 JMP 0x001a8c4d LAB_001a8cd7: MOV RDI,R14 CALL 0x00129350 LEA ESI,[R13 + 0x200] SUB ESI,EAX LEA R12,[RBP + -0x240] MOV RDI,R12 XOR EDX,EDX CALL 0x0019e620 TEST EAX,EAX JNZ 0x001a8c4a MOV RDI,R12 CALL 0x00129350 LEA RDI,[RAX + RBP*0x1] ADD RDI,-0x240 ADD R14,R13 MOV EDX,0x200 SUB RDX,RAX MOV RSI,R14 CALL 0x001d71d8 JMP 0x001a8c4d LAB_001a8d2c: CALL 0x00129270
int8 my_load_path(int8 param_1,char *param_2,long param_3) { int iVar1; size_t sVar2; long lVar3; long in_FS_OFFSET; char local_248 [528]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); if (((*param_2 != '~') || (param_2[1] != '/')) && (iVar1 = test_if_hard_path(param_2), iVar1 == 0) ) { if ((*param_2 != '.') || (lVar3 = 2, param_2[1] != '/')) { iVar1 = is_prefix(param_2,&DAT_001dc3a8); lVar3 = 0; if ((param_3 != 0) && (iVar1 == 0)) { strxnmov(local_248,0x200,param_3,param_2,0); param_2 = local_248; goto LAB_001a8c4d; } } sVar2 = strlen(param_2); iVar1 = my_getwd(local_248,((int)lVar3 + 0x200) - (int)sVar2,0); if (iVar1 == 0) { sVar2 = strlen(local_248); strmake(local_248 + sVar2,param_2 + lVar3,0x200 - sVar2); param_2 = local_248; } } LAB_001a8c4d: strmake(param_1,param_2,0x1ff); if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return param_1; }
13,112
bf_to_digit
bluesky950520[P]quickjs/libbf.c
static inline int bf_to_digit(int c) { if (c >= '0' && c <= '9') return c - '0'; else if (c >= 'A' && c <= 'Z') return c - 'A' + 10; else if (c >= 'a' && c <= 'z') return c - 'a' + 10; else return 36; }
O0
c
bf_to_digit: movl %edi, -0x8(%rsp) cmpl $0x30, -0x8(%rsp) jl 0xf721f cmpl $0x39, -0x8(%rsp) jg 0xf721f movl -0x8(%rsp), %eax subl $0x30, %eax movl %eax, -0x4(%rsp) jmp 0xf7263 cmpl $0x41, -0x8(%rsp) jl 0xf723d cmpl $0x5a, -0x8(%rsp) jg 0xf723d movl -0x8(%rsp), %eax subl $0x41, %eax addl $0xa, %eax movl %eax, -0x4(%rsp) jmp 0xf7263 cmpl $0x61, -0x8(%rsp) jl 0xf725b cmpl $0x7a, -0x8(%rsp) jg 0xf725b movl -0x8(%rsp), %eax subl $0x61, %eax addl $0xa, %eax movl %eax, -0x4(%rsp) jmp 0xf7263 movl $0x24, -0x4(%rsp) movl -0x4(%rsp), %eax retq nopl (%rax,%rax)
bf_to_digit: mov [rsp+var_8], edi cmp [rsp+var_8], 30h ; '0' jl short loc_F721F cmp [rsp+var_8], 39h ; '9' jg short loc_F721F mov eax, [rsp+var_8] sub eax, 30h ; '0' mov [rsp+var_4], eax jmp short loc_F7263 loc_F721F: cmp [rsp+var_8], 41h ; 'A' jl short loc_F723D cmp [rsp+var_8], 5Ah ; 'Z' jg short loc_F723D mov eax, [rsp+var_8] sub eax, 41h ; 'A' add eax, 0Ah mov [rsp+var_4], eax jmp short loc_F7263 loc_F723D: cmp [rsp+var_8], 61h ; 'a' jl short loc_F725B cmp [rsp+var_8], 7Ah ; 'z' jg short loc_F725B mov eax, [rsp+var_8] sub eax, 61h ; 'a' add eax, 0Ah mov [rsp+var_4], eax jmp short loc_F7263 loc_F725B: mov [rsp+var_4], 24h ; '$' loc_F7263: mov eax, [rsp+var_4] retn
long long bf_to_digit(int a1) { if ( a1 < 48 || a1 > 57 ) { if ( a1 < 65 || a1 > 90 ) { if ( a1 < 97 || a1 > 122 ) return 36; else return (unsigned int)(a1 - 97 + 10); } else { return (unsigned int)(a1 - 65 + 10); } } else { return (unsigned int)(a1 - 48); } }
bf_to_digit: MOV dword ptr [RSP + -0x8],EDI CMP dword ptr [RSP + -0x8],0x30 JL 0x001f721f CMP dword ptr [RSP + -0x8],0x39 JG 0x001f721f MOV EAX,dword ptr [RSP + -0x8] SUB EAX,0x30 MOV dword ptr [RSP + -0x4],EAX JMP 0x001f7263 LAB_001f721f: CMP dword ptr [RSP + -0x8],0x41 JL 0x001f723d CMP dword ptr [RSP + -0x8],0x5a JG 0x001f723d MOV EAX,dword ptr [RSP + -0x8] SUB EAX,0x41 ADD EAX,0xa MOV dword ptr [RSP + -0x4],EAX JMP 0x001f7263 LAB_001f723d: CMP dword ptr [RSP + -0x8],0x61 JL 0x001f725b CMP dword ptr [RSP + -0x8],0x7a JG 0x001f725b MOV EAX,dword ptr [RSP + -0x8] SUB EAX,0x61 ADD EAX,0xa MOV dword ptr [RSP + -0x4],EAX JMP 0x001f7263 LAB_001f725b: MOV dword ptr [RSP + -0x4],0x24 LAB_001f7263: MOV EAX,dword ptr [RSP + -0x4] RET
int bf_to_digit(int param_1) { int4 local_4; if ((param_1 < 0x30) || (0x39 < param_1)) { if ((param_1 < 0x41) || (0x5a < param_1)) { if ((param_1 < 0x61) || (0x7a < param_1)) { local_4 = 0x24; } else { local_4 = param_1 + -0x57; } } else { local_4 = param_1 + -0x37; } } else { local_4 = param_1 + -0x30; } return local_4; }
13,113
bf_to_digit
bluesky950520[P]quickjs/libbf.c
static inline int bf_to_digit(int c) { if (c >= '0' && c <= '9') return c - '0'; else if (c >= 'A' && c <= 'Z') return c - 'A' + 10; else if (c >= 'a' && c <= 'z') return c - 'a' + 10; else return 36; }
O2
c
bf_to_digit: leal -0x30(%rdi), %eax cmpl $0xa, %eax jb 0x78b68 leal -0x41(%rdi), %eax cmpl $0x19, %eax ja 0x78b59 addl $-0x37, %edi movl %edi, %eax retq leal -0x61(%rdi), %eax addl $-0x57, %edi cmpl $0x1a, %eax pushq $0x24 popq %rax cmovbl %edi, %eax retq
bf_to_digit: lea eax, [rdi-30h] cmp eax, 0Ah jb short locret_78B68 lea eax, [rdi-41h] cmp eax, 19h ja short loc_78B59 add edi, 0FFFFFFC9h mov eax, edi retn loc_78B59: lea eax, [rdi-61h] add edi, 0FFFFFFA9h cmp eax, 1Ah push 24h ; '$' pop rax cmovb eax, edi locret_78B68: retn
long long bf_to_digit(int a1) { long long result; // rax unsigned int v2; // eax unsigned int v3; // edi bool v4; // cf result = (unsigned int)(a1 - 48); if ( (unsigned int)result >= 0xA ) { if ( (unsigned int)(a1 - 65) > 0x19 ) { v2 = a1 - 97; v3 = a1 - 87; v4 = v2 < 0x1A; result = 36LL; if ( v4 ) return v3; } else { return (unsigned int)(a1 - 55); } } return result; }
bf_to_digit: LEA EAX,[RDI + -0x30] CMP EAX,0xa JC 0x00178b68 LEA EAX,[RDI + -0x41] CMP EAX,0x19 JA 0x00178b59 ADD EDI,-0x37 MOV EAX,EDI RET LAB_00178b59: LEA EAX,[RDI + -0x61] ADD EDI,-0x57 CMP EAX,0x1a PUSH 0x24 POP RAX CMOVC EAX,EDI LAB_00178b68: RET
uint bf_to_digit(int param_1) { uint uVar1; uVar1 = param_1 - 0x30U; if (9 < param_1 - 0x30U) { if (param_1 - 0x41U < 0x1a) { return param_1 - 0x37; } uVar1 = 0x24; if (param_1 - 0x61U < 0x1a) { uVar1 = param_1 - 0x57; } } return uVar1; }
13,114
my_mb_wc_gbk
eloqsql/strings/ctype-gbk.c
static int my_mb_wc_gbk(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { int hi; if (s >= e) return MY_CS_TOOSMALL; hi=s[0]; if (hi<0x80) { pwc[0]=hi; return 1; } if (s+2>e) return MY_CS_TOOSMALL2; if (!IS_MB2_CHAR(hi, s[1])) return MY_CS_ILSEQ; if (!(pwc[0]=func_gbk_uni_onechar( (hi<<8) + s[1]))) return -2; return 2; }
O0
c
my_mb_wc_gbk: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0xbcc5e movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0xbcd39 movq -0x20(%rbp), %rax movzbl (%rax), %eax movl %eax, -0x2c(%rbp) cmpl $0x80, -0x2c(%rbp) jge 0xbcc88 movslq -0x2c(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0xbcd39 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0xbcca2 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0xbcd39 movl -0x2c(%rbp), %eax movzbl %al, %ecx movl $0x81, %eax cmpl %ecx, %eax jg 0xbccfc movl -0x2c(%rbp), %eax movzbl %al, %eax cmpl $0xfe, %eax jg 0xbccfc movq -0x20(%rbp), %rax movzbl 0x1(%rax), %ecx movl $0x40, %eax cmpl %ecx, %eax jg 0xbccdc movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x7e, %eax jle 0xbcd05 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %ecx movl $0x80, %eax cmpl %ecx, %eax jg 0xbccfc movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xfe, %eax jle 0xbcd05 movl $0x0, -0x4(%rbp) jmp 0xbcd39 movl -0x2c(%rbp), %edi shll $0x8, %edi movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax addl %eax, %edi callq 0xbd080 cltq movq -0x18(%rbp), %rcx movq %rax, (%rcx) cmpq $0x0, %rax jne 0xbcd32 movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE jmp 0xbcd39 movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_mb_wc_gbk: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_BCC5E mov [rbp+var_4], 0FFFFFF9Bh jmp loc_BCD39 loc_BCC5E: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] mov [rbp+var_2C], eax cmp [rbp+var_2C], 80h jge short loc_BCC88 movsxd rcx, [rbp+var_2C] mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_BCD39 loc_BCC88: mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_BCCA2 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_BCD39 loc_BCCA2: mov eax, [rbp+var_2C] movzx ecx, al mov eax, 81h cmp eax, ecx jg short loc_BCCFC mov eax, [rbp+var_2C] movzx eax, al cmp eax, 0FEh jg short loc_BCCFC mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+1] mov eax, 40h ; '@' cmp eax, ecx jg short loc_BCCDC mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 7Eh ; '~' jle short loc_BCD05 loc_BCCDC: mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+1] mov eax, 80h cmp eax, ecx jg short loc_BCCFC mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0FEh jle short loc_BCD05 loc_BCCFC: mov [rbp+var_4], 0 jmp short loc_BCD39 loc_BCD05: mov edi, [rbp+var_2C] shl edi, 8 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] add edi, eax call func_gbk_uni_onechar cdqe mov rcx, [rbp+var_18] mov [rcx], rax cmp rax, 0 jnz short loc_BCD32 mov [rbp+var_4], 0FFFFFFFEh jmp short loc_BCD39 loc_BCD32: mov [rbp+var_4], 2 loc_BCD39: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_mb_wc_gbk(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { int v4; // eax unsigned int v6; // [rsp+4h] [rbp-2Ch] if ( (unsigned long long)a3 < a4 ) { v6 = *a3; if ( v6 >= 0x80 ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { if ( (unsigned __int8)v6 < 0x81u || (unsigned __int8)v6 == 255 || (a3[1] < 0x40u || a3[1] > 0x7Eu) && (a3[1] < 0x80u || a3[1] == 255) ) { return 0; } else { v4 = func_gbk_uni_onechar(a3[1] + (v6 << 8)); *a2 = v4; if ( v4 ) return 2; else return (unsigned int)-2; } } else { return (unsigned int)-102; } } else { *a2 = *a3; return 1; } } else { return (unsigned int)-101; } }
my_mb_wc_gbk: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x001bcc5e MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x001bcd39 LAB_001bcc5e: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX CMP dword ptr [RBP + -0x2c],0x80 JGE 0x001bcc88 MOVSXD RCX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x001bcd39 LAB_001bcc88: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x001bcca2 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x001bcd39 LAB_001bcca2: MOV EAX,dword ptr [RBP + -0x2c] MOVZX ECX,AL MOV EAX,0x81 CMP EAX,ECX JG 0x001bccfc MOV EAX,dword ptr [RBP + -0x2c] MOVZX EAX,AL CMP EAX,0xfe JG 0x001bccfc MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x1] MOV EAX,0x40 CMP EAX,ECX JG 0x001bccdc MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x7e JLE 0x001bcd05 LAB_001bccdc: MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x1] MOV EAX,0x80 CMP EAX,ECX JG 0x001bccfc MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xfe JLE 0x001bcd05 LAB_001bccfc: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001bcd39 LAB_001bcd05: MOV EDI,dword ptr [RBP + -0x2c] SHL EDI,0x8 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] ADD EDI,EAX CALL 0x001bd080 CDQE MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RCX],RAX CMP RAX,0x0 JNZ 0x001bcd32 MOV dword ptr [RBP + -0x4],0xfffffffe JMP 0x001bcd39 LAB_001bcd32: MOV dword ptr [RBP + -0x4],0x2 LAB_001bcd39: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 my_mb_wc_gbk(int8 param_1,long *param_2,byte *param_3,byte *param_4) { uint uVar1; int iVar2; int4 local_c; if (param_3 < param_4) { uVar1 = (uint)*param_3; if (uVar1 < 0x80) { *param_2 = (long)(int)uVar1; local_c = 1; } else if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else if (((uVar1 < 0x81) || (0xfe < uVar1)) || (((param_3[1] < 0x40 || (0x7e < param_3[1])) && ((param_3[1] < 0x80 || (param_3[1] == 0xff)))))) { local_c = 0; } else { iVar2 = func_gbk_uni_onechar(uVar1 * 0x100 + (uint)param_3[1]); *param_2 = (long)iVar2; if ((long)iVar2 == 0) { local_c = 0xfffffffe; } else { local_c = 2; } } } else { local_c = 0xffffff9b; } return local_c; }
13,115
my_scan_utf32
eloqsql/strings/ctype-ucs2.c
static size_t my_scan_utf32(CHARSET_INFO *cs, const char *str, const char *end, int sequence_type) { const char *str0= str; switch (sequence_type) { case MY_SEQ_SPACES: for ( ; str < end; ) { my_wc_t wc; int res= my_utf32_uni(cs, &wc, (uchar*) str, (uchar*) end); if (res < 0 || wc != ' ') break; str+= res; } return (size_t) (str - str0); case MY_SEQ_NONSPACES: DBUG_ASSERT(0); /* Not implemented */ /* pass through */ default: return 0; } }
O0
c
my_scan_utf32: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x40(%rbp) subl $0x2, %eax je 0x650b6 jmp 0x650ac movl -0x40(%rbp), %eax subl $0x3, %eax je 0x6510d jmp 0x65113 jmp 0x650b8 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x650fc movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx leaq -0x38(%rbp), %rsi callq 0x64520 movl %eax, -0x3c(%rbp) cmpl $0x0, -0x3c(%rbp) jl 0x650e7 cmpq $0x20, -0x38(%rbp) je 0x650e9 jmp 0x650fc movl -0x3c(%rbp), %ecx movq -0x18(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x18(%rbp) jmp 0x650b8 movq -0x18(%rbp), %rax movq -0x30(%rbp), %rcx subq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0x6511b jmp 0x6510f jmp 0x65111 jmp 0x65113 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_scan_utf32: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov rax, [rbp+var_18] mov [rbp+var_30], rax mov eax, [rbp+var_24] mov [rbp+var_40], eax sub eax, 2 jz short loc_650B6 jmp short $+2 loc_650AC: mov eax, [rbp+var_40] sub eax, 3 jz short loc_6510D jmp short loc_65113 loc_650B6: jmp short $+2 loc_650B8: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnb short loc_650FC mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] lea rsi, [rbp+var_38] call my_utf32_uni mov [rbp+var_3C], eax cmp [rbp+var_3C], 0 jl short loc_650E7 cmp [rbp+var_38], 20h ; ' ' jz short loc_650E9 loc_650E7: jmp short loc_650FC loc_650E9: mov ecx, [rbp+var_3C] mov rax, [rbp+var_18] movsxd rcx, ecx add rax, rcx mov [rbp+var_18], rax jmp short loc_650B8 loc_650FC: mov rax, [rbp+var_18] mov rcx, [rbp+var_30] sub rax, rcx mov [rbp+var_8], rax jmp short loc_6511B loc_6510D: jmp short $+2 loc_6510F: jmp short $+2 loc_65111: jmp short $+2 loc_65113: mov [rbp+var_8], 0 loc_6511B: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
unsigned long long my_scan_utf32( long long a1, unsigned long long a2, unsigned long long a3, int a4, long long a5, long long a6) { int v7; // [rsp+4h] [rbp-3Ch] long long v8; // [rsp+8h] [rbp-38h] BYREF unsigned long long v9; // [rsp+10h] [rbp-30h] int v10; // [rsp+1Ch] [rbp-24h] unsigned long long v11; // [rsp+20h] [rbp-20h] unsigned long long v12; // [rsp+28h] [rbp-18h] long long v13; // [rsp+30h] [rbp-10h] v13 = a1; v12 = a2; v11 = a3; v10 = a4; v9 = a2; if ( a4 != 2 ) return 0LL; while ( v12 < v11 ) { v7 = my_utf32_uni(v13, (long long)&v8, v12, v11, a5, a6); if ( v7 < 0 || v8 != 32 ) break; v12 += v7; } return v12 - v9; }
my_scan_utf32: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x40],EAX SUB EAX,0x2 JZ 0x001650b6 JMP 0x001650ac LAB_001650ac: MOV EAX,dword ptr [RBP + -0x40] SUB EAX,0x3 JZ 0x0016510d JMP 0x00165113 LAB_001650b6: JMP 0x001650b8 LAB_001650b8: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNC 0x001650fc MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0x38] CALL 0x00164520 MOV dword ptr [RBP + -0x3c],EAX CMP dword ptr [RBP + -0x3c],0x0 JL 0x001650e7 CMP qword ptr [RBP + -0x38],0x20 JZ 0x001650e9 LAB_001650e7: JMP 0x001650fc LAB_001650e9: MOV ECX,dword ptr [RBP + -0x3c] MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX JMP 0x001650b8 LAB_001650fc: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x30] SUB RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x0016511b LAB_0016510d: JMP 0x0016510f LAB_0016510f: JMP 0x00165111 LAB_00165111: JMP 0x00165113 LAB_00165113: MOV qword ptr [RBP + -0x8],0x0 LAB_0016511b: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
long my_scan_utf32(int8 param_1,ulong param_2,ulong param_3,int param_4) { int iVar1; long local_40; ulong local_38; int4 local_2c; ulong local_28; ulong local_20; int8 local_18; long local_10; if (param_4 == 2) { local_2c = 2; local_38 = param_2; local_28 = param_3; local_20 = param_2; local_18 = param_1; while (((local_20 < local_28 && (iVar1 = my_utf32_uni(local_18,&local_40,local_20,local_28), -1 < iVar1)) && (local_40 == 0x20))) { local_20 = local_20 + (long)iVar1; } local_10 = local_20 - local_38; } else { local_10 = 0; } return local_10; }
13,116
get_logfile_by_number
eloqsql/storage/maria/ma_loghandler.c
static TRANSLOG_FILE *get_logfile_by_number(uint32 file_no) { TRANSLOG_FILE *file; DBUG_ENTER("get_logfile_by_number"); mysql_rwlock_rdlock(&log_descriptor.open_files_lock); if (log_descriptor.max_file - file_no >= log_descriptor.open_files.elements) { DBUG_PRINT("info", ("File #%u is not opened", file_no)); mysql_rwlock_unlock(&log_descriptor.open_files_lock); DBUG_RETURN(NULL); } DBUG_ASSERT(log_descriptor.max_file - log_descriptor.min_file + 1 == log_descriptor.open_files.elements); DBUG_ASSERT(log_descriptor.max_file >= file_no); DBUG_ASSERT(log_descriptor.min_file <= file_no); file= *dynamic_element(&log_descriptor.open_files, log_descriptor.max_file - file_no, TRANSLOG_FILE **); mysql_rwlock_unlock(&log_descriptor.open_files_lock); DBUG_PRINT("info", ("File %p File no: %u, File handler: %d", file, file_no, (file ? file->handler.file : -1))); DBUG_ASSERT(!file || file->number == file_no); DBUG_RETURN(file); }
O0
c
get_logfile_by_number: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0xc(%rbp) leaq 0x44243e(%rip), %rdi # 0x478c70 addq $0x258, %rdi # imm = 0x258 leaq 0x11ae42(%rip), %rsi # 0x151682 movl $0x41d, %edx # imm = 0x41D callq 0x368d0 movl 0x442670(%rip), %eax # 0x478ec0 subl -0xc(%rbp), %eax cmpl 0x442647(%rip), %eax # 0x478ea0 jb 0x3687c jmp 0x3685d jmp 0x3685f leaq 0x44240a(%rip), %rdi # 0x478c70 addq $0x258, %rdi # imm = 0x258 callq 0x35760 movq $0x0, -0x8(%rbp) jmp 0x368c5 jmp 0x3687e jmp 0x36880 jmp 0x36882 jmp 0x36884 jmp 0x36886 jmp 0x36888 movq 0x442609(%rip), %rax # 0x478e98 movl 0x44262b(%rip), %ecx # 0x478ec0 subl -0xc(%rbp), %ecx movl %ecx, %ecx movq (%rax,%rcx,8), %rax movq %rax, -0x18(%rbp) leaq 0x4423c7(%rip), %rdi # 0x478c70 addq $0x258, %rdi # imm = 0x258 callq 0x35760 jmp 0x368b7 jmp 0x368b9 jmp 0x368bb jmp 0x368bd movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nop
get_logfile_by_number: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_C], edi lea rdi, log_descriptor add rdi, 258h lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 41Dh call inline_mysql_rwlock_rdlock mov eax, cs:dword_478EC0 sub eax, [rbp+var_C] cmp eax, cs:dword_478EA0 jb short loc_3687C jmp short $+2 loc_3685D: jmp short $+2 loc_3685F: lea rdi, log_descriptor add rdi, 258h call inline_mysql_rwlock_unlock mov [rbp+var_8], 0 jmp short loc_368C5 loc_3687C: jmp short $+2 loc_3687E: jmp short $+2 loc_36880: jmp short $+2 loc_36882: jmp short $+2 loc_36884: jmp short $+2 loc_36886: jmp short $+2 loc_36888: mov rax, cs:qword_478E98 mov ecx, cs:dword_478EC0 sub ecx, [rbp+var_C] mov ecx, ecx mov rax, [rax+rcx*8] mov [rbp+var_18], rax lea rdi, log_descriptor add rdi, 258h call inline_mysql_rwlock_unlock jmp short $+2 loc_368B7: jmp short $+2 loc_368B9: jmp short $+2 loc_368BB: jmp short $+2 loc_368BD: mov rax, [rbp+var_18] mov [rbp+var_8], rax loc_368C5: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
long long get_logfile_by_number(int a1) { long long v2; // [rsp+8h] [rbp-18h] inline_mysql_rwlock_rdlock( &log_descriptor[75], "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 1053LL); if ( dword_478EC0 - a1 < (unsigned int)dword_478EA0 ) { v2 = *(_QWORD *)(qword_478E98 + 8LL * (unsigned int)(dword_478EC0 - a1)); inline_mysql_rwlock_unlock((long long)&log_descriptor[75]); return v2; } else { inline_mysql_rwlock_unlock((long long)&log_descriptor[75]); return 0LL; } }
get_logfile_by_number: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0xc],EDI LEA RDI,[0x578c70] ADD RDI,0x258 LEA RSI,[0x251682] MOV EDX,0x41d CALL 0x001368d0 MOV EAX,dword ptr [0x00578ec0] SUB EAX,dword ptr [RBP + -0xc] CMP EAX,dword ptr [0x00578ea0] JC 0x0013687c JMP 0x0013685d LAB_0013685d: JMP 0x0013685f LAB_0013685f: LEA RDI,[0x578c70] ADD RDI,0x258 CALL 0x00135760 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001368c5 LAB_0013687c: JMP 0x0013687e LAB_0013687e: JMP 0x00136880 LAB_00136880: JMP 0x00136882 LAB_00136882: JMP 0x00136884 LAB_00136884: JMP 0x00136886 LAB_00136886: JMP 0x00136888 LAB_00136888: MOV RAX,qword ptr [0x00578e98] MOV ECX,dword ptr [0x00578ec0] SUB ECX,dword ptr [RBP + -0xc] MOV ECX,ECX MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x18],RAX LEA RDI,[0x578c70] ADD RDI,0x258 CALL 0x00135760 JMP 0x001368b7 LAB_001368b7: JMP 0x001368b9 LAB_001368b9: JMP 0x001368bb LAB_001368bb: JMP 0x001368bd LAB_001368bd: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX LAB_001368c5: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
int8 get_logfile_by_number(int param_1) { int8 local_10; inline_mysql_rwlock_rdlock (&DAT_00578ec8,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x41d); if ((uint)(DAT_00578ec0 - param_1) < DAT_00578ea0) { local_10 = *(int8 *)(DAT_00578e98 + (ulong)(uint)(DAT_00578ec0 - param_1) * 8); inline_mysql_rwlock_unlock(&DAT_00578ec8); } else { inline_mysql_rwlock_unlock(&DAT_00578ec8); local_10 = 0; } return local_10; }
13,117
translog_write_variable_record_1group_code_len
eloqsql/storage/maria/ma_loghandler.c
static void translog_write_variable_record_1group_code_len(uchar *dst, translog_size_t length, uint16 header_len) { switch (header_len) { case 6: /* (5 + 1) */ DBUG_ASSERT(length <= 250); *dst= (uint8) length; return; case 8: /* (5 + 3) */ DBUG_ASSERT(length <= 0xFFFF); *dst= 251; int2store(dst + 1, length); return; case 9: /* (5 + 4) */ DBUG_ASSERT(length <= (ulong) 0xFFFFFF); *dst= 252; int3store(dst + 1, length); return; case 10: /* (5 + 5) */ *dst= 253; int4store(dst + 1, length); return; default: DBUG_ASSERT(0); } return; }
O0
c
translog_write_variable_record_1group_code_len: pushq %rbp movq %rsp, %rbp movw %dx, %ax movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movw %ax, -0xe(%rbp) movzwl -0xe(%rbp), %eax addl $-0x6, %eax movl %eax, %ecx movq %rcx, -0x28(%rbp) subl $0x4, %eax ja 0x5b7db movq -0x28(%rbp), %rax leaq 0xfd6e9(%rip), %rcx # 0x158e2c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax jmp 0x5b74e jmp 0x5b750 movl -0xc(%rbp), %eax movb %al, %cl movq -0x8(%rbp), %rax movb %cl, (%rax) jmp 0x5b7e3 jmp 0x5b762 jmp 0x5b764 movq -0x8(%rbp), %rax movb $-0x5, (%rax) movq -0x8(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) movl -0xc(%rbp), %eax movw %ax, %cx movq -0x18(%rbp), %rax movw %cx, (%rax) jmp 0x5b7e3 jmp 0x5b788 jmp 0x5b78a movq -0x8(%rbp), %rax movb $-0x4, (%rax) movl -0xc(%rbp), %eax movb %al, %cl movq -0x8(%rbp), %rax movb %cl, 0x1(%rax) movl -0xc(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x8(%rbp), %rax movb %cl, 0x2(%rax) movl -0xc(%rbp), %eax shrl $0x10, %eax movb %al, %cl movq -0x8(%rbp), %rax movb %cl, 0x3(%rax) jmp 0x5b7e3 movq -0x8(%rbp), %rax movb $-0x3, (%rax) movq -0x8(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) movl -0xc(%rbp), %ecx movq -0x20(%rbp), %rax movl %ecx, (%rax) jmp 0x5b7e3 jmp 0x5b7dd jmp 0x5b7df jmp 0x5b7e1 jmp 0x5b7e3 popq %rbp retq nopw %cs:(%rax,%rax)
translog_write_variable_record_1group_code_len: push rbp mov rbp, rsp mov ax, dx mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_E], ax movzx eax, [rbp+var_E] add eax, 0FFFFFFFAh; switch 5 cases mov ecx, eax mov [rbp+var_28], rcx sub eax, 4 ja def_5B74A; jumptable 000000000005B74A default case, case 7 mov rax, [rbp+var_28] lea rcx, jpt_5B74A movsxd rax, ds:(jpt_5B74A - 158E2Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_5B74C: jmp short $+2; jumptable 000000000005B74A case 6 loc_5B74E: jmp short $+2 loc_5B750: mov eax, [rbp+var_C] mov cl, al mov rax, [rbp+var_8] mov [rax], cl jmp loc_5B7E3 loc_5B760: jmp short $+2; jumptable 000000000005B74A case 8 loc_5B762: jmp short $+2 loc_5B764: mov rax, [rbp+var_8] mov byte ptr [rax], 0FBh mov rax, [rbp+var_8] add rax, 1 mov [rbp+var_18], rax mov eax, [rbp+var_C] mov cx, ax mov rax, [rbp+var_18] mov [rax], cx jmp short loc_5B7E3 loc_5B786: jmp short $+2; jumptable 000000000005B74A case 9 loc_5B788: jmp short $+2 loc_5B78A: mov rax, [rbp+var_8] mov byte ptr [rax], 0FCh mov eax, [rbp+var_C] mov cl, al mov rax, [rbp+var_8] mov [rax+1], cl mov eax, [rbp+var_C] shr eax, 8 mov cl, al mov rax, [rbp+var_8] mov [rax+2], cl mov eax, [rbp+var_C] shr eax, 10h mov cl, al mov rax, [rbp+var_8] mov [rax+3], cl jmp short loc_5B7E3 loc_5B7BD: mov rax, [rbp+var_8]; jumptable 000000000005B74A case 10 mov byte ptr [rax], 0FDh mov rax, [rbp+var_8] add rax, 1 mov [rbp+var_20], rax mov ecx, [rbp+var_C] mov rax, [rbp+var_20] mov [rax], ecx jmp short loc_5B7E3 def_5B74A: jmp short $+2; jumptable 000000000005B74A default case, case 7 loc_5B7DD: jmp short $+2 loc_5B7DF: jmp short $+2 loc_5B7E1: jmp short $+2 loc_5B7E3: pop rbp retn
long long translog_write_variable_record_1group_code_len(long long a1, int a2, unsigned __int16 a3) { long long result; // rax result = (unsigned int)a3 - 6; switch ( a3 ) { case 6u: result = a1; *(_BYTE *)a1 = a2; break; case 8u: *(_BYTE *)a1 = -5; result = a1 + 1; *(_WORD *)(a1 + 1) = a2; break; case 9u: *(_BYTE *)a1 = -4; *(_WORD *)(a1 + 1) = a2; result = a1; *(_BYTE *)(a1 + 3) = BYTE2(a2); break; case 0xAu: *(_BYTE *)a1 = -3; result = a1 + 1; *(_DWORD *)(a1 + 1) = a2; break; default: return result; } return result; }
translog_write_variable_record_1group_code_len: PUSH RBP MOV RBP,RSP MOV AX,DX MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV word ptr [RBP + -0xe],AX MOVZX EAX,word ptr [RBP + -0xe] ADD EAX,-0x6 MOV ECX,EAX MOV qword ptr [RBP + -0x28],RCX SUB EAX,0x4 JA 0x0015b7db MOV RAX,qword ptr [RBP + -0x28] LEA RCX,[0x258e2c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_6: JMP 0x0015b74e LAB_0015b74e: JMP 0x0015b750 LAB_0015b750: MOV EAX,dword ptr [RBP + -0xc] MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX],CL JMP 0x0015b7e3 caseD_8: JMP 0x0015b762 LAB_0015b762: JMP 0x0015b764 LAB_0015b764: MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX],0xfb MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX MOV EAX,dword ptr [RBP + -0xc] MOV CX,AX MOV RAX,qword ptr [RBP + -0x18] MOV word ptr [RAX],CX JMP 0x0015b7e3 caseD_9: JMP 0x0015b788 LAB_0015b788: JMP 0x0015b78a LAB_0015b78a: MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX],0xfc MOV EAX,dword ptr [RBP + -0xc] MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RBP + -0xc] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x2],CL MOV EAX,dword ptr [RBP + -0xc] SHR EAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x3],CL JMP 0x0015b7e3 caseD_a: MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX],0xfd MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],ECX JMP 0x0015b7e3 caseD_7: JMP 0x0015b7dd LAB_0015b7dd: JMP 0x0015b7df LAB_0015b7df: JMP 0x0015b7e1 LAB_0015b7e1: JMP 0x0015b7e3 LAB_0015b7e3: POP RBP RET
void translog_write_variable_record_1group_code_len (int1 *param_1,int4 param_2,int2 param_3) { switch(param_3) { case 6: *param_1 = (char)param_2; break; default: break; case 8: *param_1 = 0xfb; *(short *)(param_1 + 1) = (short)param_2; break; case 9: *param_1 = 0xfc; param_1[1] = (char)param_2; param_1[2] = (char)((uint)param_2 >> 8); param_1[3] = (char)((uint)param_2 >> 0x10); break; case 10: *param_1 = 0xfd; *(int4 *)(param_1 + 1) = param_2; } return; }
13,118
my_rw_wrlock
eloqsql/mysys/thr_rwlock.c
int my_rw_wrlock(my_rw_lock_t *rwp) { pthread_mutex_lock(&rwp->lock); rwp->waiters++; /* another writer queued */ my_rw_lock_assert_not_write_owner(rwp); while (rwp->state) pthread_cond_wait(&rwp->writers, &rwp->lock); rwp->state = -1; rwp->waiters--; #ifdef SAFE_MUTEX rwp->write_thread= pthread_self(); #endif pthread_mutex_unlock(&rwp->lock); return(0); }
O3
c
my_rw_wrlock: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx callq 0x29200 movl 0x8c(%rbx), %eax leal 0x1(%rax), %ecx movl %ecx, 0x8c(%rbx) cmpl $0x0, 0x88(%rbx) je 0xa58c0 leaq 0x58(%rbx), %r14 movq %r14, %rdi movq %rbx, %rsi callq 0x29420 cmpl $0x0, 0x88(%rbx) jne 0xa58a4 movl 0x8c(%rbx), %eax decl %eax movl $0xffffffff, 0x88(%rbx) # imm = 0xFFFFFFFF movl %eax, 0x8c(%rbx) movq %rbx, %rdi callq 0x291c0 xorl %eax, %eax popq %rbx popq %r14 popq %rbp retq
my_rw_wrlock: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi call _pthread_mutex_lock mov eax, [rbx+8Ch] lea ecx, [rax+1] mov [rbx+8Ch], ecx cmp dword ptr [rbx+88h], 0 jz short loc_A58C0 lea r14, [rbx+58h] loc_A58A4: mov rdi, r14 mov rsi, rbx call _pthread_cond_wait cmp dword ptr [rbx+88h], 0 jnz short loc_A58A4 mov eax, [rbx+8Ch] dec eax loc_A58C0: mov dword ptr [rbx+88h], 0FFFFFFFFh mov [rbx+8Ch], eax mov rdi, rbx call _pthread_mutex_unlock xor eax, eax pop rbx pop r14 pop rbp retn
long long my_rw_wrlock(long long a1) { int v1; // eax pthread_mutex_lock(a1); v1 = *(_DWORD *)(a1 + 140); *(_DWORD *)(a1 + 140) = v1 + 1; if ( *(_DWORD *)(a1 + 136) ) { do pthread_cond_wait(a1 + 88, a1); while ( *(_DWORD *)(a1 + 136) ); v1 = *(_DWORD *)(a1 + 140) - 1; } *(_DWORD *)(a1 + 136) = -1; *(_DWORD *)(a1 + 140) = v1; pthread_mutex_unlock(a1); return 0LL; }
my_rw_wrlock: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI CALL 0x00129200 MOV EAX,dword ptr [RBX + 0x8c] LEA ECX,[RAX + 0x1] MOV dword ptr [RBX + 0x8c],ECX CMP dword ptr [RBX + 0x88],0x0 JZ 0x001a58c0 LEA R14,[RBX + 0x58] LAB_001a58a4: MOV RDI,R14 MOV RSI,RBX CALL 0x00129420 CMP dword ptr [RBX + 0x88],0x0 JNZ 0x001a58a4 MOV EAX,dword ptr [RBX + 0x8c] DEC EAX LAB_001a58c0: MOV dword ptr [RBX + 0x88],0xffffffff MOV dword ptr [RBX + 0x8c],EAX MOV RDI,RBX CALL 0x001291c0 XOR EAX,EAX POP RBX POP R14 POP RBP RET
int8 my_rw_wrlock(pthread_mutex_t *param_1) { int iVar1; pthread_mutex_lock(param_1); iVar1 = *(int *)((long)param_1 + 0x8c); *(int *)((long)param_1 + 0x8c) = iVar1 + 1; if (*(int *)((long)param_1 + 0x88) != 0) { do { pthread_cond_wait((pthread_cond_t *)((long)param_1 + 0x58),param_1); } while (*(int *)((long)param_1 + 0x88) != 0); iVar1 = *(int *)((long)param_1 + 0x8c) + -1; } *(int4 *)((long)param_1 + 0x88) = 0xffffffff; *(int *)((long)param_1 + 0x8c) = iVar1; pthread_mutex_unlock(param_1); return 0; }
13,119
Test_CleanImmediatelyWithAbsolutePrefix_logging::RunTest()
ng-log[P]ng-log/src/cleanup_with_absolute_prefix_unittest.cc
TEST(CleanImmediatelyWithAbsolutePrefix, logging) { using namespace std::chrono_literals; nglog::EnableLogCleaner(0h); nglog::SetLogFilenameExtension(".barfoo"); nglog::SetLogDestination(NGLOG_INFO, "test_cleanup_"); for (unsigned i = 0; i < 1000; ++i) { LOG(INFO) << "cleanup test"; } for (unsigned i = 0; i < 10; ++i) { LOG(ERROR) << "cleanup test"; } nglog::DisableLogCleaner(); }
O3
cpp
Test_CleanImmediatelyWithAbsolutePrefix_logging::RunTest(): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x68, %rsp leaq 0x8(%rsp), %rbx movq $0x0, (%rbx) movq %rbx, %rdi callq 0xf270 leaq 0x1a10b(%rip), %rdi # 0x2303c callq 0xc930 leaq 0x1a107(%rip), %rsi # 0x23044 xorl %edi, %edi callq 0xc444 movl $0x3e8, %ebp # imm = 0x3E8 leaq 0x1a102(%rip), %r14 # 0x23052 leaq 0x1a160(%rip), %r15 # 0x230b7 movq %rbx, %rdi movq %r14, %rsi movl $0x40, %edx callq 0xb5bc movq %rbx, %rdi callq 0xb5b2 movl $0xc, %edx movq %rax, %rdi movq %r15, %rsi callq 0x7600 movq %rbx, %rdi callq 0xb9ee decl %ebp jne 0x8f57 movl $0xa, %ebp leaq 0x1a0bb(%rip), %rbx # 0x23052 leaq 0x8(%rsp), %r14 leaq 0x1a114(%rip), %r15 # 0x230b7 movq %r14, %rdi movq %rbx, %rsi movl $0x44, %edx movl $0x2, %ecx callq 0xb5f8 movq %r14, %rdi callq 0xb5b2 movl $0xc, %edx movq %rax, %rdi movq %r15, %rsi callq 0x7600 movq %r14, %rdi callq 0xb9ee decl %ebp jne 0x8fa3 callq 0xf282 addq $0x68, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0xb9ee jmp 0x9008 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0xb9ee movq %rbx, %rdi callq 0x79b0 movq %rax, %rdi callq 0x9777
_ZN47Test_CleanImmediatelyWithAbsolutePrefix_logging7RunTestEv: push rbp push r15 push r14 push rbx sub rsp, 68h lea rbx, [rsp+88h+var_80] mov qword ptr [rbx], 0 mov rdi, rbx call _ZN5nglog16EnableLogCleanerERKNSt6chrono8durationIlSt5ratioILl60ELl1EEEE; nglog::EnableLogCleaner(std::chrono::duration<long,std::ratio<60l,1l>> const&) lea rdi, aBarfoo; ".barfoo" call _ZN5nglog23SetLogFilenameExtensionEPKc; nglog::SetLogFilenameExtension(char const*) lea rsi, aTestCleanup; "test_cleanup_" xor edi, edi call _ZN5nglog17SetLogDestinationENS_11LogSeverityEPKc; nglog::SetLogDestination(nglog::LogSeverity,char const*) mov ebp, 3E8h lea r14, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea r15, aCleanupTest; "cleanup test" loc_8F57: mov rdi, rbx; this mov rsi, r14; char * mov edx, 40h ; '@'; int call _ZN5nglog10LogMessageC2EPKci; nglog::LogMessage::LogMessage(char const*,int) mov rdi, rbx; this call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) mov edx, 0Ch mov rdi, rax mov rsi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, rbx; this call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage() dec ebp jnz short loc_8F57 mov ebp, 0Ah lea rbx, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea r14, [rsp+88h+var_80] lea r15, aCleanupTest; "cleanup test" loc_8FA3: mov rdi, r14 mov rsi, rbx mov edx, 44h ; 'D' mov ecx, 2 call _ZN5nglog10LogMessageC2EPKciNS_11LogSeverityE; nglog::LogMessage::LogMessage(char const*,int,nglog::LogSeverity) mov rdi, r14; this call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) mov edx, 0Ch mov rdi, rax mov rsi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, r14; this call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage() dec ebp jnz short loc_8FA3 call _ZN5nglog17DisableLogCleanerEv; nglog::DisableLogCleaner(void) add rsp, 68h pop rbx pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_0]; this call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage() jmp short loc_9008 mov rbx, rax lea rdi, [rsp+arg_0]; this call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage() loc_9008: mov rdi, rbx call __Unwind_Resume mov rdi, rax call __clang_call_terminate
long long Test_CleanImmediatelyWithAbsolutePrefix_logging::RunTest( Test_CleanImmediatelyWithAbsolutePrefix_logging *this, const char *a2) { int v2; // ebp long long v3; // rax int v4; // ebp long long v5; // rax _QWORD v7[16]; // [rsp+8h] [rbp-80h] BYREF v7[0] = 0LL; nglog::EnableLogCleaner(v7); nglog::SetLogFilenameExtension((nglog *)".barfoo", a2); nglog::SetLogDestination(0LL, "test_cleanup_"); v2 = 1000; do { nglog::LogMessage::LogMessage( (nglog::LogMessage *)v7, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/cleanup_with_absolute_prefix_unittest.cc", 64); v3 = nglog::LogMessage::stream((nglog::LogMessage *)v7); std::__ostream_insert<char,std::char_traits<char>>(v3, "cleanup test", 12LL); nglog::LogMessage::~LogMessage((nglog::LogMessage *)v7); --v2; } while ( v2 ); v4 = 10; do { nglog::LogMessage::LogMessage( v7, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/cleanup_with_absolute_prefix_unittest.cc", 68LL, 2LL); v5 = nglog::LogMessage::stream((nglog::LogMessage *)v7); std::__ostream_insert<char,std::char_traits<char>>(v5, "cleanup test", 12LL); nglog::LogMessage::~LogMessage((nglog::LogMessage *)v7); --v4; } while ( v4 ); return nglog::DisableLogCleaner((nglog *)v7); }
RunTest: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x68 LEA RBX,[RSP + 0x8] MOV qword ptr [RBX],0x0 MOV RDI,RBX CALL 0x0010f270 LEA RDI,[0x12303c] CALL 0x0010c930 LEA RSI,[0x123044] XOR EDI,EDI CALL 0x0010c444 MOV EBP,0x3e8 LEA R14,[0x123052] LEA R15,[0x1230b7] LAB_00108f57: MOV RDI,RBX MOV RSI,R14 MOV EDX,0x40 CALL 0x0010b5bc LAB_00108f67: MOV RDI,RBX CALL 0x0010b5b2 MOV EDX,0xc MOV RDI,RAX MOV RSI,R15 CALL 0x00107600 LAB_00108f7f: MOV RDI,RBX CALL 0x0010b9ee DEC EBP JNZ 0x00108f57 MOV EBP,0xa LEA RBX,[0x123052] LEA R14,[RSP + 0x8] LEA R15,[0x1230b7] LAB_00108fa3: MOV RDI,R14 MOV RSI,RBX MOV EDX,0x44 MOV ECX,0x2 CALL 0x0010b5f8 LAB_00108fb8: MOV RDI,R14 CALL 0x0010b5b2 MOV EDX,0xc MOV RDI,RAX MOV RSI,R15 CALL 0x00107600 LAB_00108fd0: MOV RDI,R14 CALL 0x0010b9ee DEC EBP JNZ 0x00108fa3 CALL 0x0010f282 ADD RSP,0x68 POP RBX POP R14 POP R15 POP RBP RET
/* Test_CleanImmediatelyWithAbsolutePrefix_logging::RunTest() */ void Test_CleanImmediatelyWithAbsolutePrefix_logging::RunTest(void) { ostream *poVar1; int iVar2; int8 local_80 [12]; local_80[0] = 0; nglog::EnableLogCleaner((duration *)local_80); nglog::SetLogFilenameExtension(".barfoo"); nglog::SetLogDestination(0,"test_cleanup_"); iVar2 = 1000; do { nglog::LogMessage::LogMessage ((LogMessage *)local_80, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/cleanup_with_absolute_prefix_unittest.cc" ,0x40); /* try { // try from 00108f67 to 00108f7e has its CatchHandler @ 00108ffb */ poVar1 = (ostream *)nglog::LogMessage::stream((LogMessage *)local_80); std::__ostream_insert<char,std::char_traits<char>>(poVar1,"cleanup test",0xc); nglog::LogMessage::~LogMessage((LogMessage *)local_80); iVar2 = iVar2 + -1; } while (iVar2 != 0); iVar2 = 10; do { nglog::LogMessage::LogMessage ((LogMessage *)local_80, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/cleanup_with_absolute_prefix_unittest.cc" ,0x44,2); /* try { // try from 00108fb8 to 00108fcf has its CatchHandler @ 00108fec */ poVar1 = (ostream *)nglog::LogMessage::stream((LogMessage *)local_80); std::__ostream_insert<char,std::char_traits<char>>(poVar1,"cleanup test",0xc); nglog::LogMessage::~LogMessage((LogMessage *)local_80); iVar2 = iVar2 + -1; } while (iVar2 != 0); nglog::DisableLogCleaner(); return; }
13,120
fmt::v10::detail::dragonbox::decimal_fp<double> fmt::v10::detail::dragonbox::to_decimal<double>(double)
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format-inl.h
auto to_decimal(T x) noexcept -> decimal_fp<T> { // Step 1: integer promotion & Schubfach multiplier calculation. using carrier_uint = typename float_info<T>::carrier_uint; using cache_entry_type = typename cache_accessor<T>::cache_entry_type; auto br = bit_cast<carrier_uint>(x); // Extract significand bits and exponent bits. const carrier_uint significand_mask = (static_cast<carrier_uint>(1) << num_significand_bits<T>()) - 1; carrier_uint significand = (br & significand_mask); int exponent = static_cast<int>((br & exponent_mask<T>()) >> num_significand_bits<T>()); if (exponent != 0) { // Check if normal. exponent -= exponent_bias<T>() + num_significand_bits<T>(); // Shorter interval case; proceed like Schubfach. // In fact, when exponent == 1 and significand == 0, the interval is // regular. However, it can be shown that the end-results are anyway same. if (significand == 0) return shorter_interval_case<T>(exponent); significand |= (static_cast<carrier_uint>(1) << num_significand_bits<T>()); } else { // Subnormal case; the interval is always regular. if (significand == 0) return {0, 0}; exponent = std::numeric_limits<T>::min_exponent - num_significand_bits<T>() - 1; } const bool include_left_endpoint = (significand % 2 == 0); const bool include_right_endpoint = include_left_endpoint; // Compute k and beta. const int minus_k = floor_log10_pow2(exponent) - float_info<T>::kappa; const cache_entry_type cache = cache_accessor<T>::get_cached_power(-minus_k); const int beta = exponent + floor_log2_pow10(-minus_k); // Compute zi and deltai. // 10^kappa <= deltai < 10^(kappa + 1) const uint32_t deltai = cache_accessor<T>::compute_delta(cache, beta); const carrier_uint two_fc = significand << 1; // For the case of binary32, the result of integer check is not correct for // 29711844 * 2^-82 // = 6.1442653300000000008655037797566933477355632930994033813476... * 10^-18 // and 29711844 * 2^-81 // = 1.2288530660000000001731007559513386695471126586198806762695... * 10^-17, // and they are the unique counterexamples. However, since 29711844 is even, // this does not cause any problem for the endpoints calculations; it can only // cause a problem when we need to perform integer check for the center. // Fortunately, with these inputs, that branch is never executed, so we are // fine. const typename cache_accessor<T>::compute_mul_result z_mul = cache_accessor<T>::compute_mul((two_fc | 1) << beta, cache); // Step 2: Try larger divisor; remove trailing zeros if necessary. // Using an upper bound on zi, we might be able to optimize the division // better than the compiler; we are computing zi / big_divisor here. decimal_fp<T> ret_value; ret_value.significand = divide_by_10_to_kappa_plus_1(z_mul.result); uint32_t r = static_cast<uint32_t>(z_mul.result - float_info<T>::big_divisor * ret_value.significand); if (r < deltai) { // Exclude the right endpoint if necessary. if (r == 0 && (z_mul.is_integer & !include_right_endpoint)) { --ret_value.significand; r = float_info<T>::big_divisor; goto small_divisor_case_label; } } else if (r > deltai) { goto small_divisor_case_label; } else { // r == deltai; compare fractional parts. const typename cache_accessor<T>::compute_mul_parity_result x_mul = cache_accessor<T>::compute_mul_parity(two_fc - 1, cache, beta); if (!(x_mul.parity | (x_mul.is_integer & include_left_endpoint))) goto small_divisor_case_label; } ret_value.exponent = minus_k + float_info<T>::kappa + 1; // We may need to remove trailing zeros. ret_value.exponent += remove_trailing_zeros(ret_value.significand); return ret_value; // Step 3: Find the significand with the smaller divisor. small_divisor_case_label: ret_value.significand *= 10; ret_value.exponent = minus_k + float_info<T>::kappa; uint32_t dist = r - (deltai / 2) + (float_info<T>::small_divisor / 2); const bool approx_y_parity = ((dist ^ (float_info<T>::small_divisor / 2)) & 1) != 0; // Is dist divisible by 10^kappa? const bool divisible_by_small_divisor = check_divisibility_and_divide_by_pow10<float_info<T>::kappa>(dist); // Add dist / 10^kappa to the significand. ret_value.significand += dist; if (!divisible_by_small_divisor) return ret_value; // Check z^(f) >= epsilon^(f). // We have either yi == zi - epsiloni or yi == (zi - epsiloni) - 1, // where yi == zi - epsiloni if and only if z^(f) >= epsilon^(f). // Since there are only 2 possibilities, we only need to care about the // parity. Also, zi and r should have the same parity since the divisor // is an even number. const auto y_mul = cache_accessor<T>::compute_mul_parity(two_fc, cache, beta); // If z^(f) >= epsilon^(f), we might have a tie when z^(f) == epsilon^(f), // or equivalently, when y is an integer. if (y_mul.parity != approx_y_parity) --ret_value.significand; else if (y_mul.is_integer & (ret_value.significand % 2 != 0)) --ret_value.significand; return ret_value; }
O3
c
fmt::v10::detail::dragonbox::decimal_fp<double> fmt::v10::detail::dragonbox::to_decimal<double>(double): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movabsq $0xfffffffffffff, %rax # imm = 0xFFFFFFFFFFFFF movq %xmm0, %r15 movq %r15, %r14 andq %rax, %r14 shrq $0x34, %r15 andl $0x7ff, %r15d # imm = 0x7FF je 0x8f8d6 addl $0xfffffbcd, %r15d # imm = 0xFFFFFBCD testq %r14, %r14 je 0x8fa80 addq %rax, %r14 incq %r14 jmp 0x8f8e5 movl $0xfffffbce, %r15d # imm = 0xFFFFFBCE testq %r14, %r14 je 0x8fb6f imull $0x4d105, %r15d, %ebx # imm = 0x4D105 sarl $0x14, %ebx movl $0x2, %ebp subl %ebx, %ebp movl %ebp, %edi callq 0x8fc58 movq %rdx, %r8 imull $0x1a934f, %ebp, %edi # imm = 0x1A934F sarl $0x13, %edi addl %r15d, %edi movl %edi, %ecx notb %cl movq %rdx, %r12 shrq %cl, %r12 movq %rax, %r9 leaq (%r14,%r14), %r15 leaq 0x1(,%r14,2), %rsi movl %edi, %ecx shlq %cl, %rsi movq %rsi, %rax mulq %rdx movq %rdx, %r10 movq %rax, %r11 movq %rsi, %rax mulq %r9 movq %rdx, %rcx addq %r11, %rcx adcq $0x0, %r10 movabsq $0x20c49ba5e353f7cf, %rdx # imm = 0x20C49BA5E353F7CF movq %r10, %rax mulq %rdx movq %rdx, %rsi shrq $0x7, %rsi imull $0xfffffc18, %esi, %eax # imm = 0xFFFFFC18 addl %eax, %r10d cmpl %r10d, %r12d jbe 0x8f989 testl %r10d, %r10d jne 0x8f9cf testq %rcx, %rcx jne 0x8f9cf andl $0x1, %r14d je 0x8f9cf decq %rsi movl $0x3e8, %r10d # imm = 0x3E8 jmp 0x8fa1e jb 0x8fa1e leaq -0x1(%r15), %rcx movq %r8, %r11 imulq %rcx, %r11 movq %r9, %rax mulq %rcx addq %r11, %rdx movb $0x40, %cl subb %dil, %cl movzbl %cl, %ecx xorl %r11d, %r11d btq %rcx, %rdx setb %r11b movl %edi, %ecx shldq %cl, %rax, %rdx xorl %eax, %eax testq %rdx, %rdx sete %al notl %r14d andl %r14d, %eax orl %r11d, %eax je 0x8fa1e movabsq $-0x543388ee7b9e3103, %rcx # imm = 0xABCC77118461CEFD movq %rsi, %rax mulq %rcx incl %ebx testl $0x3ffffff, %edx # imm = 0x3FFFFFF sete %dil cmpq %rcx, %rax setb %al testb %dil, %al je 0x8fb1c shrq $0x1a, %rdx movl $0x6, %eax movl %edx, %ecx imull $0xc28f5c29, %edx, %edx # imm = 0xC28F5C29 roll $0x1e, %edx addl $0x2, %eax cmpl $0x28f5c29, %edx # imm = 0x28F5C29 jb 0x8fa03 jmp 0x8fbbb leaq (%rsi,%rsi,4), %rax shrl %r12d subl %r12d, %r10d imull $0x290, %r10d, %r11d # imm = 0x290 addl $0x8020, %r11d # imm = 0x8020 movzwl %r11w, %ecx shrl $0x10, %r11d leaq (%r11,%rax,2), %rsi cmpl $0x28f, %ecx # imm = 0x28F ja 0x8fbd1 imulq %r15, %r8 movq %r9, %rax mulq %r15 addq %r8, %rdx movl $0x40, %r8d subl %edi, %r8d btq %r8, %rdx setb %cl andb $0x1, %r10b cmpb %r10b, %cl je 0x8fbdf decq %rsi jmp 0x8fbd1 imull $0x9a209, %r15d, %ebx # imm = 0x9A209 addl $0xfffc01e1, %ebx # imm = 0xFFFC01E1 sarl $0x15, %ebx movl %ebx, %edi negl %edi imull $0xffe56cb1, %ebx, %ebp # imm = 0xFFE56CB1 sarl $0x13, %ebp addl %r15d, %ebp callq 0x8fc58 movq %rdx, %rdi movq %rdx, %rax shrq $0x36, %rax subq %rax, %rdx movb $0xb, %cl subb %bpl, %cl shrq %cl, %rdx movq %rdi, %rax shrq $0x35, %rax addq %rdi, %rax shrq %cl, %rax movl %r15d, %ecx andl $-0x2, %ecx xorl %r8d, %r8d cmpl $0x2, %ecx setne %r8b addq %rdx, %r8 movabsq $-0x3333333333333333, %rsi # imm = 0xCCCCCCCCCCCCCCCD mulq %rsi movq %rdx, %rcx shrq $0x3, %rcx leaq (%rcx,%rcx), %rax leaq (%rax,%rax,4), %rax cmpq %r8, %rax jae 0x8fb75 movb $0xa, %cl subb %bpl, %cl shrq %cl, %rdi incq %rdi shrq %rdi cmpl $-0x4d, %r15d jne 0x8fc00 andq $-0x2, %rdi jmp 0x8fc07 movabsq $-0x70a3d70a3d70a3d7, %rdx # imm = 0x8F5C28F5C28F5C29 movl $0xfffffffe, %eax # imm = 0xFFFFFFFE movabsq $0x28f5c28f5c28f5c, %rdi # imm = 0x28F5C28F5C28F5C movq %rsi, %rcx imulq %rdx, %rsi shrdq $0x2, %rcx, %rsi addl $0x2, %eax cmpq %rdi, %rsi jbe 0x8fb35 movabsq $-0x3333333333333333, %rsi # imm = 0xCCCCCCCCCCCCCCCD imulq %rcx, %rsi shrdq $0x1, %rcx, %rsi movabsq $0x199999999999999a, %rdx # imm = 0x199999999999999A cmpq %rdx, %rsi cmovaeq %rcx, %rsi jmp 0x8fbcc xorl %ebx, %ebx xorl %esi, %esi jmp 0x8fbd1 movabsq $-0x543388ee7b9e3103, %rdi # imm = 0xABCC77118461CEFD movq %rcx, %rax mulq %rdi incl %ebx testl $0x3ffffff, %edx # imm = 0x3FFFFFF sete %r8b cmpq %rdi, %rax setb %al testb %r8b, %al je 0x8fc0c shrq $0x1a, %rdx movl $0x6, %eax movl %edx, %ecx imull $0xc28f5c29, %edx, %edx # imm = 0xC28F5C29 roll $0x1e, %edx addl $0x2, %eax cmpl $0x28f5c29, %edx # imm = 0x28F5C29 jb 0x8fba5 imull $0xcccccccd, %ecx, %esi # imm = 0xCCCCCCCD rorl %esi cmpl $0x1999999a, %esi # imm = 0x1999999A cmovael %ecx, %esi adcl $0x0, %eax addl %eax, %ebx movq %rsi, %rax movl %ebx, %edx popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl %edi, %ecx shlq %cl, %rdx movl %r8d, %ecx shrq %cl, %rax orq %rdx, %rax sete %al andl $0x1, %r11d andb %al, %r11b movzbl %r11b, %eax subq %rax, %rsi jmp 0x8fbd1 cmpq %r8, %rdi adcq $0x0, %rdi movq %rdi, %rsi jmp 0x8fbd1 movabsq $-0x70a3d70a3d70a3d7, %rdi # imm = 0x8F5C28F5C28F5C29 movl $0xfffffffe, %eax # imm = 0xFFFFFFFE movabsq $0x28f5c28f5c28f5c, %r8 # imm = 0x28F5C28F5C28F5C movq %rcx, %rdx imulq %rdi, %rcx shrdq $0x2, %rdx, %rcx addl $0x2, %eax cmpq %r8, %rcx jbe 0x8fc25 imulq %rdx, %rsi shrdq $0x1, %rdx, %rsi movabsq $0x199999999999999a, %rcx # imm = 0x199999999999999A cmpq %rcx, %rsi cmovaeq %rdx, %rsi jmp 0x8fbcc
_ZN3fmt3v106detail9dragonbox10to_decimalIdEENS2_10decimal_fpIT_EES5_: push rbp push r15 push r14 push r12 push rbx mov rax, 0FFFFFFFFFFFFFh movq r15, xmm0 mov r14, r15 and r14, rax shr r15, 34h and r15d, 7FFh jz short loc_8F8D6 add r15d, 0FFFFFBCDh test r14, r14 jz loc_8FA80 add r14, rax inc r14 jmp short loc_8F8E5 loc_8F8D6: mov r15d, 0FFFFFBCEh test r14, r14 jz loc_8FB6F loc_8F8E5: imul ebx, r15d, 4D105h sar ebx, 14h mov ebp, 2 sub ebp, ebx mov edi, ebp call _ZN3fmt3v106detail9dragonbox14cache_accessorIdE16get_cached_powerEi; fmt::v10::detail::dragonbox::cache_accessor<double>::get_cached_power(int) mov r8, rdx imul edi, ebp, 1A934Fh sar edi, 13h add edi, r15d mov ecx, edi not cl mov r12, rdx shr r12, cl mov r9, rax lea r15, [r14+r14] lea rsi, ds:1[r14*2] mov ecx, edi shl rsi, cl mov rax, rsi mul rdx mov r10, rdx mov r11, rax mov rax, rsi mul r9 mov rcx, rdx add rcx, r11 adc r10, 0 mov rdx, 20C49BA5E353F7CFh mov rax, r10 mul rdx mov rsi, rdx shr rsi, 7 imul eax, esi, 0FFFFFC18h add r10d, eax cmp r12d, r10d jbe short loc_8F989 test r10d, r10d jnz short loc_8F9CF test rcx, rcx jnz short loc_8F9CF and r14d, 1 jz short loc_8F9CF dec rsi mov r10d, 3E8h jmp loc_8FA1E loc_8F989: jb loc_8FA1E lea rcx, [r15-1] mov r11, r8 imul r11, rcx mov rax, r9 mul rcx add rdx, r11 mov cl, 40h ; '@' sub cl, dil movzx ecx, cl xor r11d, r11d bt rdx, rcx setb r11b mov ecx, edi shld rdx, rax, cl xor eax, eax test rdx, rdx setz al not r14d and eax, r14d or eax, r11d jz short loc_8FA1E loc_8F9CF: mov rcx, 0ABCC77118461CEFDh mov rax, rsi mul rcx inc ebx test edx, 3FFFFFFh setz dil cmp rax, rcx setb al test al, dil jz loc_8FB1C shr rdx, 1Ah mov eax, 6 loc_8FA03: mov ecx, edx imul edx, 0C28F5C29h rol edx, 1Eh add eax, 2 cmp edx, 28F5C29h jb short loc_8FA03 jmp loc_8FBBB loc_8FA1E: lea rax, [rsi+rsi*4] shr r12d, 1 sub r10d, r12d imul r11d, r10d, 290h add r11d, 8020h movzx ecx, r11w shr r11d, 10h lea rsi, [r11+rax*2] cmp ecx, 28Fh ja loc_8FBD1 imul r8, r15 mov rax, r9 mul r15 add rdx, r8 mov r8d, 40h ; '@' sub r8d, edi bt rdx, r8 setb cl and r10b, 1 cmp cl, r10b jz loc_8FBDF dec rsi jmp loc_8FBD1 loc_8FA80: imul ebx, r15d, 9A209h add ebx, 0FFFC01E1h sar ebx, 15h mov edi, ebx neg edi imul ebp, ebx, 0FFE56CB1h sar ebp, 13h add ebp, r15d call _ZN3fmt3v106detail9dragonbox14cache_accessorIdE16get_cached_powerEi; fmt::v10::detail::dragonbox::cache_accessor<double>::get_cached_power(int) mov rdi, rdx mov rax, rdx shr rax, 36h sub rdx, rax mov cl, 0Bh sub cl, bpl shr rdx, cl mov rax, rdi shr rax, 35h add rax, rdi shr rax, cl mov ecx, r15d and ecx, 0FFFFFFFEh xor r8d, r8d cmp ecx, 2 setnz r8b add r8, rdx mov rsi, 0CCCCCCCCCCCCCCCDh mul rsi mov rcx, rdx shr rcx, 3 lea rax, [rcx+rcx] lea rax, [rax+rax*4] cmp rax, r8 jnb short loc_8FB75 mov cl, 0Ah sub cl, bpl shr rdi, cl inc rdi shr rdi, 1 cmp r15d, 0FFFFFFB3h jnz loc_8FC00 and rdi, 0FFFFFFFFFFFFFFFEh jmp loc_8FC07 loc_8FB1C: mov rdx, 8F5C28F5C28F5C29h mov eax, 0FFFFFFFEh mov rdi, 28F5C28F5C28F5Ch loc_8FB35: mov rcx, rsi imul rsi, rdx shrd rsi, rcx, 2 add eax, 2 cmp rsi, rdi jbe short loc_8FB35 mov rsi, 0CCCCCCCCCCCCCCCDh imul rsi, rcx shrd rsi, rcx, 1 mov rdx, 199999999999999Ah cmp rsi, rdx cmovnb rsi, rcx jmp short loc_8FBCC loc_8FB6F: xor ebx, ebx xor esi, esi jmp short loc_8FBD1 loc_8FB75: mov rdi, 0ABCC77118461CEFDh mov rax, rcx mul rdi inc ebx test edx, 3FFFFFFh setz r8b cmp rax, rdi setb al test al, r8b jz short loc_8FC0C shr rdx, 1Ah mov eax, 6 loc_8FBA5: mov ecx, edx imul edx, 0C28F5C29h rol edx, 1Eh add eax, 2 cmp edx, 28F5C29h jb short loc_8FBA5 loc_8FBBB: imul esi, ecx, 0CCCCCCCDh ror esi, 1 cmp esi, 1999999Ah cmovnb esi, ecx loc_8FBCC: adc eax, 0 add ebx, eax loc_8FBD1: mov rax, rsi mov edx, ebx pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_8FBDF: mov ecx, edi shl rdx, cl mov ecx, r8d shr rax, cl or rax, rdx setz al and r11d, 1 and r11b, al movzx eax, r11b sub rsi, rax jmp short loc_8FBD1 loc_8FC00: cmp rdi, r8 adc rdi, 0 loc_8FC07: mov rsi, rdi jmp short loc_8FBD1 loc_8FC0C: mov rdi, 8F5C28F5C28F5C29h mov eax, 0FFFFFFFEh mov r8, 28F5C28F5C28F5Ch loc_8FC25: mov rdx, rcx imul rcx, rdi shrd rcx, rdx, 2 add eax, 2 cmp rcx, r8 jbe short loc_8FC25 imul rsi, rdx shrd rsi, rdx, 1 mov rcx, 199999999999999Ah cmp rsi, rcx cmovnb rsi, rdx jmp loc_8FBCC
unsigned long long fmt::v10::detail::dragonbox::to_decimal<double>(double a1) { long long v1; // r14 int v2; // r15d int v3; // ebx __int128 v4; // rax unsigned long long v5; // r8 int v6; // edi long long v7; // r12 unsigned long long v8; // r9 long long v9; // r15 unsigned long long v10; // r10 unsigned long long v11; // rsi unsigned int v12; // r10d __int128 v13; // rax unsigned long long v14; // rdx int v15; // eax unsigned int v16; // ecx unsigned int v17; // r10d unsigned long long v18; // rsi unsigned __int128 v19; // rax int v20; // ebx unsigned long long v21; // rdx unsigned long long v22; // r8 unsigned long long v23; // rcx unsigned long long v24; // rdi int v26; // eax unsigned long long v27; // rcx __int128 v28; // rt0 __int128 v29; // rt0 unsigned long long v30; // rdx int v31; // eax int v33; // eax unsigned long long v34; // rdx __int128 v35; // rt0 __int128 v36; // rt0 v1 = *(_QWORD *)&a1 & 0xFFFFFFFFFFFFFLL; if ( ((*(_QWORD *)&a1 >> 52) & 0x7FF) == 0 ) { v2 = -1074; if ( !v1 ) return 0LL; goto LABEL_5; } v2 = ((*(_QWORD *)&a1 >> 52) & 0x7FF) - 1075; if ( v1 ) { v1 += 0x10000000000000LL; LABEL_5: v3 = (315653 * v2) >> 20; *(_QWORD *)&v4 = fmt::v10::detail::dragonbox::cache_accessor<double>::get_cached_power((unsigned int)(2 - v3)); v5 = *((_QWORD *)&v4 + 1); v6 = v2 + ((1741647 * (2 - v3)) >> 19); v7 = *((_QWORD *)&v4 + 1) >> ~((unsigned __int8)v2 + (unsigned __int8)((1741647 * (2 - v3)) >> 19)); v8 = v4; v9 = 2 * v1; v10 = (*((unsigned long long *)&v4 + 1) * (unsigned __int128)(unsigned long long)((2 * v1 + 1) << v6) + (((unsigned long long)v4 * (unsigned __int128)(unsigned long long)((2 * v1 + 1) << v6)) >> 64)) >> 64; v11 = (unsigned long long)((0x20C49BA5E353F7CFLL * (unsigned __int128)v10) >> 64) >> 7; v12 = -1000 * v11 + v10; if ( (unsigned int)v7 <= v12 ) { if ( (unsigned int)v7 < v12 || (v13 = v4 * (unsigned long long)(v9 - 1), !(_bittest64((_QWORD *)&v13 + 1, (unsigned __int8)(64 - v6)) | ~(_DWORD)v1 & (((unsigned long long)((__PAIR128__(v5, v8) * (unsigned long long)(v9 - 1)) >> 64 << v6) | ((v8 * (v9 - 1)) >> (64 - (unsigned __int8)v6))) == 0))) ) { LABEL_16: v17 = v12 - ((unsigned int)v7 >> 1); v18 = ((656 * v17 + 32800) >> 16) + 10 * v11; if ( (unsigned __int16)(656 * v17 - 32736) <= 0x28Fu ) { v19 = __PAIR128__(v5, v8) * (unsigned long long)v9; if ( _bittest64((_QWORD *)&v19 + 1, (unsigned int)(64 - v6)) == (v17 & 1) ) v18 -= (((*((_QWORD *)&v19 + 1) << v6) | ((unsigned long long)v19 >> (64 - (unsigned __int8)v6))) == 0) & (unsigned __int8)(((656 * v17 + 32800) >> 16) & 1); else --v18; } return v18; } } else if ( !v12 && is_mul_ok(v4, (2 * v1 + 1) << v6) && (v1 & 1) != 0 ) { --v11; v12 = 1000; goto LABEL_16; } if ( (((0xABCC77118461CEFDLL * (unsigned __int128)v11) >> 64) & 0x3FFFFFF) == 0 && 0xABCC77118461CEFDLL * v11 < 0xABCC77118461CEFDLL ) { v14 = v11 / 0x5F5E100; v15 = 6; do { v16 = v14; LODWORD(v14) = __ROL4__(-1030792151 * v14, 30); v15 += 2; } while ( (unsigned int)v14 < 0x28F5C29 ); goto LABEL_31; } v26 = -2; do { v27 = v11; *(_QWORD *)&v28 = 0x8F5C28F5C28F5C29LL * v11; *((_QWORD *)&v28 + 1) = v11; v11 = v28 >> 2; v26 += 2; } while ( v11 <= 0x28F5C28F5C28F5CLL ); *(_QWORD *)&v29 = 0xCCCCCCCCCCCCCCCDLL * v27; *((_QWORD *)&v29 + 1) = v27; v18 = v29 >> 1; if ( v18 >= 0x199999999999999ALL ) return v27; return v18; } v20 = (631305 * v2 - 261663) >> 21; fmt::v10::detail::dragonbox::cache_accessor<double>::get_cached_power((unsigned int)-v20); v22 = ((v21 - (v21 >> 54)) >> (11 - ((unsigned __int8)(*(_QWORD *)&a1 >> 52) - 51 + ((-1741647 * v20) >> 19)))) + (((((*(_QWORD *)&a1 >> 52) & 0x7FF) - 1075) & 0xFFFFFFFE) != 2); v23 = ((v21 + (v21 >> 53)) >> (11 - ((unsigned __int8)(*(_QWORD *)&a1 >> 52) - 51 + ((-1741647 * v20) >> 19)))) / 0xA; if ( 10 * v23 < v22 ) { v24 = ((v21 >> (10 - ((unsigned __int8)(*(_QWORD *)&a1 >> 52) - 51 + ((-1741647 * v20) >> 19)))) + 1) >> 1; if ( ((*(_QWORD *)&a1 >> 52) & 0x7FF) == 0x3E6 ) return v24 & 0xFFFFFFFFFFFFFFFELL; else return (v24 < v22) + v24; } if ( (((0xABCC77118461CEFDLL * (unsigned __int128)v23) >> 64) & 0x3FFFFFF) == 0 && 0xABCC77118461CEFDLL * v23 < 0xABCC77118461CEFDLL ) { v30 = v23 / 0x5F5E100; v31 = 6; do { v16 = v30; LODWORD(v30) = __ROL4__(-1030792151 * v30, 30); v31 += 2; } while ( (unsigned int)v30 < 0x28F5C29 ); LABEL_31: v18 = (unsigned int)__ROR4__(-858993459 * v16, 1); if ( (unsigned int)v18 >= 0x1999999A ) return v16; return v18; } v33 = -2; do { v34 = v23; *(_QWORD *)&v35 = 0x8F5C28F5C28F5C29LL * v23; *((_QWORD *)&v35 + 1) = v23; v23 = v35 >> 2; v33 += 2; } while ( v23 <= 0x28F5C28F5C28F5CLL ); *(_QWORD *)&v36 = 0xCCCCCCCCCCCCCCCDLL * v34; *((_QWORD *)&v36 + 1) = v34; v18 = v36 >> 1; if ( v18 >= 0x199999999999999ALL ) return v34; return v18; }
to_decimal<double>: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RAX,0xfffffffffffff MOVQ R15,XMM0 MOV R14,R15 AND R14,RAX SHR R15,0x34 AND R15D,0x7ff JZ 0x0018f8d6 ADD R15D,0xfffffbcd TEST R14,R14 JZ 0x0018fa80 ADD R14,RAX INC R14 JMP 0x0018f8e5 LAB_0018f8d6: MOV R15D,0xfffffbce TEST R14,R14 JZ 0x0018fb6f LAB_0018f8e5: IMUL EBX,R15D,0x4d105 SAR EBX,0x14 MOV EBP,0x2 SUB EBP,EBX MOV EDI,EBP CALL 0x0018fc58 MOV R8,RDX IMUL EDI,EBP,0x1a934f SAR EDI,0x13 ADD EDI,R15D MOV ECX,EDI NOT CL MOV R12,RDX SHR R12,CL MOV R9,RAX LEA R15,[R14 + R14*0x1] LEA RSI,[0x1 + R14*0x2] MOV ECX,EDI SHL RSI,CL MOV RAX,RSI MUL RDX MOV R10,RDX MOV R11,RAX MOV RAX,RSI MUL R9 MOV RCX,RDX ADD RCX,R11 ADC R10,0x0 MOV RDX,0x20c49ba5e353f7cf MOV RAX,R10 MUL RDX MOV RSI,RDX SHR RSI,0x7 IMUL EAX,ESI,-0x3e8 ADD R10D,EAX CMP R12D,R10D JBE 0x0018f989 TEST R10D,R10D JNZ 0x0018f9cf TEST RCX,RCX JNZ 0x0018f9cf AND R14D,0x1 JZ 0x0018f9cf DEC RSI MOV R10D,0x3e8 JMP 0x0018fa1e LAB_0018f989: JC 0x0018fa1e LEA RCX,[R15 + -0x1] MOV R11,R8 IMUL R11,RCX MOV RAX,R9 MUL RCX ADD RDX,R11 MOV CL,0x40 SUB CL,DIL MOVZX ECX,CL XOR R11D,R11D BT RDX,RCX SETC R11B MOV ECX,EDI SHLD RDX,RAX,CL XOR EAX,EAX TEST RDX,RDX SETZ AL NOT R14D AND EAX,R14D OR EAX,R11D JZ 0x0018fa1e LAB_0018f9cf: MOV RCX,-0x543388ee7b9e3103 MOV RAX,RSI MUL RCX INC EBX TEST EDX,0x3ffffff SETZ DIL CMP RAX,RCX SETC AL TEST AL,DIL JZ 0x0018fb1c SHR RDX,0x1a MOV EAX,0x6 LAB_0018fa03: MOV ECX,EDX IMUL EDX,EDX,-0x3d70a3d7 ROL EDX,0x1e ADD EAX,0x2 CMP EDX,0x28f5c29 JC 0x0018fa03 JMP 0x0018fbbb LAB_0018fa1e: LEA RAX,[RSI + RSI*0x4] SHR R12D,0x1 SUB R10D,R12D IMUL R11D,R10D,0x290 ADD R11D,0x8020 MOVZX ECX,R11W SHR R11D,0x10 LEA RSI,[R11 + RAX*0x2] CMP ECX,0x28f JA 0x0018fbd1 IMUL R8,R15 MOV RAX,R9 MUL R15 ADD RDX,R8 MOV R8D,0x40 SUB R8D,EDI BT RDX,R8 SETC CL AND R10B,0x1 CMP CL,R10B JZ 0x0018fbdf DEC RSI JMP 0x0018fbd1 LAB_0018fa80: IMUL EBX,R15D,0x9a209 ADD EBX,0xfffc01e1 SAR EBX,0x15 MOV EDI,EBX NEG EDI IMUL EBP,EBX,-0x1a934f SAR EBP,0x13 ADD EBP,R15D CALL 0x0018fc58 MOV RDI,RDX MOV RAX,RDX SHR RAX,0x36 SUB RDX,RAX MOV CL,0xb SUB CL,BPL SHR RDX,CL MOV RAX,RDI SHR RAX,0x35 ADD RAX,RDI SHR RAX,CL MOV ECX,R15D AND ECX,0xfffffffe XOR R8D,R8D CMP ECX,0x2 SETNZ R8B ADD R8,RDX MOV RSI,-0x3333333333333333 MUL RSI MOV RCX,RDX SHR RCX,0x3 LEA RAX,[RCX + RCX*0x1] LEA RAX,[RAX + RAX*0x4] CMP RAX,R8 JNC 0x0018fb75 MOV CL,0xa SUB CL,BPL SHR RDI,CL INC RDI SHR RDI,0x1 CMP R15D,-0x4d JNZ 0x0018fc00 AND RDI,-0x2 JMP 0x0018fc07 LAB_0018fb1c: MOV RDX,-0x70a3d70a3d70a3d7 MOV EAX,0xfffffffe MOV RDI,0x28f5c28f5c28f5c LAB_0018fb35: MOV RCX,RSI IMUL RSI,RDX SHRD RSI,RCX,0x2 ADD EAX,0x2 CMP RSI,RDI JBE 0x0018fb35 MOV RSI,-0x3333333333333333 IMUL RSI,RCX SHRD RSI,RCX,0x1 MOV RDX,0x199999999999999a CMP RSI,RDX CMOVNC RSI,RCX JMP 0x0018fbcc LAB_0018fb6f: XOR EBX,EBX XOR ESI,ESI JMP 0x0018fbd1 LAB_0018fb75: MOV RDI,-0x543388ee7b9e3103 MOV RAX,RCX MUL RDI INC EBX TEST EDX,0x3ffffff SETZ R8B CMP RAX,RDI SETC AL TEST AL,R8B JZ 0x0018fc0c SHR RDX,0x1a MOV EAX,0x6 LAB_0018fba5: MOV ECX,EDX IMUL EDX,EDX,-0x3d70a3d7 ROL EDX,0x1e ADD EAX,0x2 CMP EDX,0x28f5c29 JC 0x0018fba5 LAB_0018fbbb: IMUL ESI,ECX,-0x33333333 ROR ESI,0x1 CMP ESI,0x1999999a CMOVNC ESI,ECX LAB_0018fbcc: ADC EAX,0x0 ADD EBX,EAX LAB_0018fbd1: MOV RAX,RSI MOV EDX,EBX POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0018fbdf: MOV ECX,EDI SHL RDX,CL MOV ECX,R8D SHR RAX,CL OR RAX,RDX SETZ AL AND R11D,0x1 AND R11B,AL MOVZX EAX,R11B SUB RSI,RAX JMP 0x0018fbd1 LAB_0018fc00: CMP RDI,R8 ADC RDI,0x0 LAB_0018fc07: MOV RSI,RDI JMP 0x0018fbd1 LAB_0018fc0c: MOV RDI,-0x70a3d70a3d70a3d7 MOV EAX,0xfffffffe MOV R8,0x28f5c28f5c28f5c LAB_0018fc25: MOV RDX,RCX IMUL RCX,RDI SHRD RCX,RDX,0x2 ADD EAX,0x2 CMP RCX,R8 JBE 0x0018fc25 IMUL RSI,RDX SHRD RSI,RDX,0x1 MOV RCX,0x199999999999999a CMP RSI,RCX CMOVNC RSI,RDX JMP 0x0018fbcc
/* fmt::v10::detail::dragonbox::decimal_fp<double> fmt::v10::detail::dragonbox::to_decimal<double>(double) */ int1 [16] fmt::v10::detail::dragonbox::to_decimal<double>(double param_1) { int1 auVar1 [16]; int1 auVar2 [16]; int1 auVar3 [16]; int1 auVar4 [16]; int1 auVar5 [16]; int1 auVar6 [16]; int1 auVar7 [16]; int1 auVar8 [16]; int1 auVar9 [16]; int1 auVar10 [16]; int1 auVar11 [16]; byte bVar13; ulong uVar15; ulong uVar16; ulong extraout_RDX; int iVar17; char cVar18; ulong uVar19; int iVar20; uint uVar21; int iVar22; ulong uVar23; uint uVar24; bool bVar25; int1 auVar26 [16]; int1 auVar27 [16]; ulong uVar12; ulong uVar14; uVar23 = (ulong)param_1 & 0xfffffffffffff; uVar24 = (uint)((ulong)param_1 >> 0x34) & 0x7ff; if (uVar24 == 0) { uVar24 = 0xfffffbce; if (uVar23 == 0) { iVar17 = 0; uVar23 = 0; goto LAB_0018fbd1; } LAB_0018f8e5: iVar17 = (int)(uVar24 * 0x4d105) >> 0x14; auVar26 = cache_accessor<double>::get_cached_power(2 - iVar17); uVar14 = auVar26._8_8_; uVar12 = auVar26._0_8_; iVar20 = ((2 - iVar17) * 0x1a934f >> 0x13) + uVar24; bVar13 = (byte)iVar20; uVar16 = uVar23 * 2; uVar19 = uVar23 * 2 + 1 << (bVar13 & 0x3f); auVar26._8_8_ = 0; auVar26._0_8_ = uVar19; auVar7._8_8_ = 0; auVar7._0_8_ = uVar14; auVar1._8_8_ = 0; auVar1._0_8_ = uVar19; auVar8._8_8_ = 0; auVar8._0_8_ = uVar12; auVar11._8_8_ = 0; auVar11._0_8_ = SUB168(auVar1 * auVar8,8); auVar11 = auVar26 * auVar7 + auVar11; auVar2._8_8_ = 0; auVar2._0_8_ = auVar11._8_8_; uVar19 = SUB168(auVar2 * ZEXT816(0x20c49ba5e353f7cf),8) >> 7; uVar24 = auVar11._8_4_ + (int)uVar19 * -1000; uVar21 = (uint)(uVar14 >> (~bVar13 & 0x3f)); if (uVar24 < uVar21) { if ((uVar24 != 0) || ((auVar11._0_8_ != 0 || ((uVar23 & 1) == 0)))) { LAB_0018f9cf: auVar4._8_8_ = 0; auVar4._0_8_ = uVar19; iVar17 = iVar17 + 1; if (SUB168(auVar4 * ZEXT816(0xabcc77118461cefd),0) < 0xabcc77118461cefd && (auVar4 * ZEXT816(0xabcc77118461cefd) & (int1 [16])0x3ffffff) == (int1 [16])0x0) { uVar19 = uVar19 / 100000000; iVar20 = 6; do { uVar24 = (uint)uVar19; uVar21 = uVar24 * 0x40000000 | uVar24 * -0x3d70a3d7 >> 2; uVar19 = (ulong)uVar21; iVar20 = iVar20 + 2; } while (uVar21 < 0x28f5c29); goto LAB_0018fbbb; } iVar20 = -2; do { uVar16 = uVar19; uVar19 = uVar16 * -0x70a3d70a3d70a3d7 >> 2 | uVar16 << 0x3e; iVar20 = iVar20 + 2; } while (uVar19 < 0x28f5c28f5c28f5d); uVar23 = uVar16 * -0x3333333333333333 >> 1 | uVar16 << 0x3f; bVar25 = uVar23 < 0x199999999999999a; if (!bVar25) { uVar23 = uVar16; } goto LAB_0018fbcc; } uVar19 = uVar19 - 1; uVar24 = 1000; } else if ((uVar24 <= uVar21) && (auVar3._8_8_ = 0, auVar3._0_8_ = uVar12, auVar9._8_8_ = 0, auVar9._0_8_ = uVar16 - 1, uVar15 = SUB168(auVar3 * auVar9,8) + uVar14 * (uVar16 - 1), ((uint)(uVar15 << (bVar13 & 0x3f) == 0 && SUB168(auVar3 * auVar9,0) >> 0x40 - (bVar13 & 0x3f) == 0) & ~(uint)uVar23) != 0 || (uVar15 >> ((ulong)(byte)(0x40 - bVar13) & 0x3f) & 1) != 0)) goto LAB_0018f9cf; iVar22 = uVar24 - (uVar21 >> 1); uVar24 = iVar22 * 0x290 + 0x8020; uVar23 = (ulong)(uVar24 >> 0x10) + uVar19 * 10; if ((uVar24 & 0xffff) < 0x290) { auVar5._8_8_ = 0; auVar5._0_8_ = uVar12; auVar10._8_8_ = 0; auVar10._0_8_ = uVar16; uVar16 = SUB168(auVar5 * auVar10,8) + uVar14 * uVar16; uVar21 = 0x40 - iVar20; if (((uVar16 >> ((ulong)uVar21 & 0x3f) & 1) != 0) == (bool)((byte)iVar22 & 1)) { uVar23 = uVar23 - ((byte)(uVar24 >> 0x10) & 1 & (SUB168(auVar5 * auVar10,0) >> ((byte)uVar21 & 0x3f) == 0 && uVar16 << (bVar13 & 0x3f) == 0)); } else { uVar23 = uVar23 - 1; } } } else { uVar24 = uVar24 - 0x433; if (uVar23 != 0) { uVar23 = uVar23 + 0x10000000000000; goto LAB_0018f8e5; } iVar17 = (int)(uVar24 * 0x9a209 + -0x3fe1f) >> 0x15; cVar18 = (char)(iVar17 * -0x1a934f >> 0x13) + (char)uVar24; cache_accessor<double>::get_cached_power(-iVar17); bVar13 = 0xb - cVar18; uVar16 = (ulong)((uVar24 & 0xfffffffe) != 2) + (extraout_RDX - (extraout_RDX >> 0x36) >> (bVar13 & 0x3f)); uVar23 = ((extraout_RDX >> 0x35) + extraout_RDX >> (bVar13 & 0x3f)) / 10; if (uVar23 * 10 < uVar16) { uVar23 = (extraout_RDX >> (10U - cVar18 & 0x3f)) + 1 >> 1; if (uVar24 == 0xffffffb3) { uVar23 = uVar23 & 0xfffffffffffffffe; } else { uVar23 = uVar23 + (uVar23 < uVar16); } goto LAB_0018fbd1; } auVar6._8_8_ = 0; auVar6._0_8_ = uVar23; iVar17 = iVar17 + 1; if (SUB168(auVar6 * ZEXT816(0xabcc77118461cefd),0) < 0xabcc77118461cefd && (auVar6 * ZEXT816(0xabcc77118461cefd) & (int1 [16])0x3ffffff) == (int1 [16])0x0) { uVar23 = uVar23 / 100000000; iVar20 = 6; do { uVar24 = (uint)uVar23; uVar21 = uVar24 * 0x40000000 | uVar24 * -0x3d70a3d7 >> 2; uVar23 = (ulong)uVar21; iVar20 = iVar20 + 2; } while (uVar21 < 0x28f5c29); LAB_0018fbbb: uVar21 = uVar24 * -0x33333333 >> 1 | (uint)((uVar24 * -0x33333333 & 1) != 0) << 0x1f; bVar25 = uVar21 < 0x1999999a; uVar23 = (ulong)uVar21; if (!bVar25) { uVar23 = (ulong)uVar24; } } else { iVar20 = -2; do { uVar16 = uVar23; uVar23 = uVar16 * -0x70a3d70a3d70a3d7 >> 2 | uVar16 << 0x3e; iVar20 = iVar20 + 2; } while (uVar23 < 0x28f5c28f5c28f5d); uVar23 = uVar16 * -0x3333333333333333 >> 1 | uVar16 << 0x3f; bVar25 = uVar23 < 0x199999999999999a; if (!bVar25) { uVar23 = uVar16; } } LAB_0018fbcc: iVar17 = iVar17 + iVar20 + (uint)bVar25; } LAB_0018fbd1: auVar27._8_4_ = iVar17; auVar27._0_8_ = uVar23; auVar27._12_4_ = 0; return auVar27; }
13,121
mi_split_page
eloqsql/storage/myisam/mi_write.c
int _mi_split_page(register MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *key, uchar *buff, uchar *key_buff, my_bool insert_last_key) { uint length,a_length,key_ref_length,t_length,nod_flag,key_length; uchar *key_pos,*pos, *UNINIT_VAR(after_key); my_off_t new_pos; MI_KEY_PARAM s_temp; DBUG_ENTER("mi_split_page"); DBUG_DUMP("buff",(uchar*) buff,mi_getint(buff)); if (info->s->keyinfo+info->lastinx == keyinfo) info->page_changed=1; /* Info->buff is used */ info->buff_used=1; nod_flag=mi_test_if_nod(buff); key_ref_length=2+nod_flag; if (insert_last_key) key_pos=_mi_find_last_pos(keyinfo,buff,key_buff, &key_length, &after_key); else key_pos=_mi_find_half_pos(nod_flag,keyinfo,buff,key_buff, &key_length, &after_key); if (!key_pos) DBUG_RETURN(-1); length=(uint) (key_pos-buff); a_length=mi_getint(buff); mi_putint(buff,length,nod_flag); key_pos=after_key; if (nod_flag) { DBUG_PRINT("test",("Splitting nod")); pos=key_pos-nod_flag; memcpy((uchar*) info->buff+2,(uchar*) pos,(size_t) nod_flag); } /* Move middle item to key and pointer to new page */ if ((new_pos=_mi_new(info,keyinfo,DFLT_INIT_HITS)) == HA_OFFSET_ERROR) DBUG_RETURN(-1); _mi_kpointer(info,_mi_move_key(keyinfo,key,key_buff),new_pos); /* Store new page */ if (!(*keyinfo->get_key)(keyinfo,nod_flag,&key_pos,key_buff)) DBUG_RETURN(-1); t_length=(*keyinfo->pack_key)(keyinfo,nod_flag,(uchar *) 0, (uchar*) 0, (uchar*) 0, key_buff, &s_temp); length=(uint) ((buff+a_length)-key_pos); memcpy((uchar*) info->buff+key_ref_length+t_length,(uchar*) key_pos, (size_t) length); (*keyinfo->store_key)(keyinfo,info->buff+key_ref_length,&s_temp); mi_putint(info->buff,length+t_length+key_ref_length,nod_flag); if (_mi_write_keypage(info,keyinfo,new_pos,DFLT_INIT_HITS,info->buff)) DBUG_RETURN(-1); DBUG_DUMP("key",(uchar*) key,_mi_keylength(keyinfo,key)); DBUG_RETURN(2); /* Middle key up */ }
O0
c
mi_split_page: pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp movb %r9b, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movb %al, -0x31(%rbp) movq -0x68(%rbp), %rax movq %rax, -0x68(%rbp) jmp 0xc768f movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x218(%rax), %rax movq -0x10(%rbp), %rcx movslq 0x1d4(%rcx), %rcx imulq $0x70, %rcx, %rcx addq %rcx, %rax cmpq -0x18(%rbp), %rax jne 0xc76c0 movq -0x10(%rbp), %rax movb $0x1, 0x33c(%rax) movq -0x10(%rbp), %rax movb $0x1, 0x33d(%rax) movq -0x28(%rbp), %rax movzbl (%rax), %eax andl $0x80, %eax cmpl $0x0, %eax je 0xc76f1 movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x17c(%rax), %eax movl %eax, -0xc4(%rbp) jmp 0xc76fb xorl %eax, %eax movl %eax, -0xc4(%rbp) jmp 0xc76fb movl -0xc4(%rbp), %eax movl %eax, -0x48(%rbp) movl -0x48(%rbp), %eax addl $0x2, %eax movl %eax, -0x40(%rbp) cmpb $0x0, -0x31(%rbp) je 0xc7732 movq -0x18(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x30(%rbp), %rdx leaq -0x4c(%rbp), %rcx leaq -0x68(%rbp), %r8 callq 0xc79f0 movq %rax, -0x58(%rbp) jmp 0xc7752 movl -0x48(%rbp), %edi movq -0x18(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx leaq -0x4c(%rbp), %r8 leaq -0x68(%rbp), %r9 callq 0xc7cc0 movq %rax, -0x58(%rbp) cmpq $0x0, -0x58(%rbp) jne 0xc7767 jmp 0xc775b movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xc79da movq -0x58(%rbp), %rax movq -0x28(%rbp), %rcx subq %rcx, %rax movl %eax, -0x38(%rbp) movq -0x28(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x28(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax andl $0x7fff, %eax # imm = 0x7FFF movl %eax, -0x3c(%rbp) movl -0x48(%rbp), %edx xorl %eax, %eax movl $0x8000, %ecx # imm = 0x8000 cmpl $0x0, %edx cmovnel %ecx, %eax movl -0x38(%rbp), %ecx movzwl %cx, %ecx addl %ecx, %eax movw %ax, -0xb2(%rbp) movzwl -0xb2(%rbp), %eax movl %eax, -0xb8(%rbp) movl -0xb8(%rbp), %eax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, 0x1(%rax) movl -0xb8(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, (%rax) movq -0x68(%rbp), %rax movq %rax, -0x58(%rbp) cmpl $0x0, -0x48(%rbp) je 0xc782a jmp 0xc77f6 jmp 0xc77f8 movq -0x58(%rbp), %rax movl -0x48(%rbp), %ecx movl %ecx, %edx xorl %ecx, %ecx subq %rdx, %rcx addq %rcx, %rax movq %rax, -0x60(%rbp) movq -0x10(%rbp), %rax movq 0x100(%rax), %rdi addq $0x2, %rdi movq -0x60(%rbp), %rsi movl -0x48(%rbp), %eax movl %eax, %edx callq 0x2a090 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl $0x3, %edx callq 0xbe220 movq %rax, -0x70(%rbp) cmpq $-0x1, %rax jne 0xc7854 jmp 0xc7848 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xc79da movq -0x10(%rbp), %rax movq %rax, -0xd0(%rbp) movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x30(%rbp), %rdx callq 0xc1ac0 movq -0xd0(%rbp), %rdi movq %rax, %rsi movq -0x70(%rbp), %rdx callq 0xc0350 movq -0x18(%rbp), %rax movq 0x48(%rax), %rax movq -0x18(%rbp), %rdi movl -0x48(%rbp), %esi movq -0x30(%rbp), %rcx leaq -0x58(%rbp), %rdx callq *%rax cmpl $0x0, %eax jne 0xc78af jmp 0xc78a3 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xc79da movq -0x18(%rbp), %rax movq 0x50(%rax), %rax movq -0x18(%rbp), %rdi movl -0x48(%rbp), %esi movq -0x30(%rbp), %r9 xorl %ecx, %ecx movl %ecx, %r8d leaq -0xb0(%rbp), %r10 movq %r8, %rdx movq %r8, %rcx movq %r10, (%rsp) callq *%rax movl %eax, -0x44(%rbp) movq -0x28(%rbp), %rax movl -0x3c(%rbp), %ecx addq %rcx, %rax movq -0x58(%rbp), %rcx subq %rcx, %rax movl %eax, -0x38(%rbp) movq -0x10(%rbp), %rax movq 0x100(%rax), %rdi movl -0x40(%rbp), %eax addq %rax, %rdi movl -0x44(%rbp), %eax addq %rax, %rdi movq -0x58(%rbp), %rsi movl -0x38(%rbp), %eax movl %eax, %edx callq 0x2a090 movq -0x18(%rbp), %rax movq 0x58(%rax), %rax movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rcx movq 0x100(%rcx), %rsi movl -0x40(%rbp), %ecx addq %rcx, %rsi leaq -0xb0(%rbp), %rdx callq *%rax movl -0x48(%rbp), %edx xorl %eax, %eax movl $0x8000, %ecx # imm = 0x8000 cmpl $0x0, %edx cmovnel %ecx, %eax movl -0x38(%rbp), %ecx addl -0x44(%rbp), %ecx addl -0x40(%rbp), %ecx movzwl %cx, %ecx addl %ecx, %eax movw %ax, -0xba(%rbp) movzwl -0xba(%rbp), %eax movl %eax, -0xc0(%rbp) movl -0xc0(%rbp), %eax movb %al, %cl movq -0x10(%rbp), %rax movq 0x100(%rax), %rax movb %cl, 0x1(%rax) movl -0xc0(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x10(%rbp), %rax movq 0x100(%rax), %rax movb %cl, (%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x70(%rbp), %rdx movq -0x10(%rbp), %rax movq 0x100(%rax), %r8 movl $0x3, %ecx callq 0xbdef0 cmpl $0x0, %eax je 0xc79cd jmp 0xc79c4 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xc79da jmp 0xc79cf jmp 0xc79d1 jmp 0xc79d3 movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0xe0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_mi_split_page: push rbp mov rbp, rsp sub rsp, 0E0h mov al, r9b mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_31], al mov rax, [rbp+var_68] mov [rbp+var_68], rax jmp short $+2 loc_C768F: mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+218h] mov rcx, [rbp+var_10] movsxd rcx, dword ptr [rcx+1D4h] imul rcx, 70h ; 'p' add rax, rcx cmp rax, [rbp+var_18] jnz short loc_C76C0 mov rax, [rbp+var_10] mov byte ptr [rax+33Ch], 1 loc_C76C0: mov rax, [rbp+var_10] mov byte ptr [rax+33Dh], 1 mov rax, [rbp+var_28] movzx eax, byte ptr [rax] and eax, 80h cmp eax, 0 jz short loc_C76F1 mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax+17Ch] mov [rbp+var_C4], eax jmp short loc_C76FB loc_C76F1: xor eax, eax mov [rbp+var_C4], eax jmp short $+2 loc_C76FB: mov eax, [rbp+var_C4] mov [rbp+var_48], eax mov eax, [rbp+var_48] add eax, 2 mov [rbp+var_40], eax cmp [rbp+var_31], 0 jz short loc_C7732 mov rdi, [rbp+var_18] mov rsi, [rbp+var_28] mov rdx, [rbp+var_30] lea rcx, [rbp+var_4C] lea r8, [rbp+var_68] call _mi_find_last_pos mov [rbp+var_58], rax jmp short loc_C7752 loc_C7732: mov edi, [rbp+var_48] mov rsi, [rbp+var_18] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] lea r8, [rbp+var_4C] lea r9, [rbp+var_68] call _mi_find_half_pos mov [rbp+var_58], rax loc_C7752: cmp [rbp+var_58], 0 jnz short loc_C7767 jmp short $+2 loc_C775B: mov [rbp+var_4], 0FFFFFFFFh jmp loc_C79DA loc_C7767: mov rax, [rbp+var_58] mov rcx, [rbp+var_28] sub rax, rcx mov [rbp+var_38], eax mov rax, [rbp+var_28] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_28] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax and eax, 7FFFh mov [rbp+var_3C], eax mov edx, [rbp+var_48] xor eax, eax mov ecx, 8000h cmp edx, 0 cmovnz eax, ecx mov ecx, [rbp+var_38] movzx ecx, cx add eax, ecx mov [rbp+var_B2], ax movzx eax, [rbp+var_B2] mov [rbp+var_B8], eax mov eax, [rbp+var_B8] mov cl, al mov rax, [rbp+var_28] mov [rax+1], cl mov eax, [rbp+var_B8] shr eax, 8 mov cl, al mov rax, [rbp+var_28] mov [rax], cl mov rax, [rbp+var_68] mov [rbp+var_58], rax cmp [rbp+var_48], 0 jz short loc_C782A jmp short $+2 loc_C77F6: jmp short $+2 loc_C77F8: mov rax, [rbp+var_58] mov ecx, [rbp+var_48] mov edx, ecx xor ecx, ecx sub rcx, rdx add rax, rcx mov [rbp+var_60], rax mov rax, [rbp+var_10] mov rdi, [rax+100h] add rdi, 2 mov rsi, [rbp+var_60] mov eax, [rbp+var_48] mov edx, eax call _memcpy loc_C782A: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov edx, 3 call _mi_new mov [rbp+var_70], rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_C7854 jmp short $+2 loc_C7848: mov [rbp+var_4], 0FFFFFFFFh jmp loc_C79DA loc_C7854: mov rax, [rbp+var_10] mov [rbp+var_D0], rax mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_30] call _mi_move_key mov rdi, [rbp+var_D0] mov rsi, rax mov rdx, [rbp+var_70] call _mi_kpointer mov rax, [rbp+var_18] mov rax, [rax+48h] mov rdi, [rbp+var_18] mov esi, [rbp+var_48] mov rcx, [rbp+var_30] lea rdx, [rbp+var_58] call rax cmp eax, 0 jnz short loc_C78AF jmp short $+2 loc_C78A3: mov [rbp+var_4], 0FFFFFFFFh jmp loc_C79DA loc_C78AF: mov rax, [rbp+var_18] mov rax, [rax+50h] mov rdi, [rbp+var_18] mov esi, [rbp+var_48] mov r9, [rbp+var_30] xor ecx, ecx mov r8d, ecx lea r10, [rbp+var_B0] mov rdx, r8 mov rcx, r8 mov [rsp+0E0h+var_E0], r10 call rax mov [rbp+var_44], eax mov rax, [rbp+var_28] mov ecx, [rbp+var_3C] add rax, rcx mov rcx, [rbp+var_58] sub rax, rcx mov [rbp+var_38], eax mov rax, [rbp+var_10] mov rdi, [rax+100h] mov eax, [rbp+var_40] add rdi, rax mov eax, [rbp+var_44] add rdi, rax mov rsi, [rbp+var_58] mov eax, [rbp+var_38] mov edx, eax call _memcpy mov rax, [rbp+var_18] mov rax, [rax+58h] mov rdi, [rbp+var_18] mov rcx, [rbp+var_10] mov rsi, [rcx+100h] mov ecx, [rbp+var_40] add rsi, rcx lea rdx, [rbp+var_B0] call rax mov edx, [rbp+var_48] xor eax, eax mov ecx, 8000h cmp edx, 0 cmovnz eax, ecx mov ecx, [rbp+var_38] add ecx, [rbp+var_44] add ecx, [rbp+var_40] movzx ecx, cx add eax, ecx mov [rbp+var_BA], ax movzx eax, [rbp+var_BA] mov [rbp+var_C0], eax mov eax, [rbp+var_C0] mov cl, al mov rax, [rbp+var_10] mov rax, [rax+100h] mov [rax+1], cl mov eax, [rbp+var_C0] shr eax, 8 mov cl, al mov rax, [rbp+var_10] mov rax, [rax+100h] mov [rax], cl mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_70] mov rax, [rbp+var_10] mov r8, [rax+100h] mov ecx, 3 call _mi_write_keypage cmp eax, 0 jz short loc_C79CD jmp short $+2 loc_C79C4: mov [rbp+var_4], 0FFFFFFFFh jmp short loc_C79DA loc_C79CD: jmp short $+2 loc_C79CF: jmp short $+2 loc_C79D1: jmp short $+2 loc_C79D3: mov [rbp+var_4], 2 loc_C79DA: mov eax, [rbp+var_4] add rsp, 0E0h pop rbp retn
long long mi_split_page(_QWORD *a1, long long a2, long long a3, long long a4, unsigned __int8 *a5, char a6) { __int16 v6; // ax _BYTE *v7; // rax __int16 v8; // ax _QWORD *v10; // [rsp+10h] [rbp-D0h] unsigned int v11; // [rsp+1Ch] [rbp-C4h] __int16 v12; // [rsp+26h] [rbp-BAh] __int16 v13; // [rsp+28h] [rbp-B8h] _BYTE v14[64]; // [rsp+30h] [rbp-B0h] BYREF unsigned long long v15; // [rsp+70h] [rbp-70h] long long v16; // [rsp+78h] [rbp-68h] BYREF long long v17; // [rsp+80h] [rbp-60h] long long last_pos; // [rsp+88h] [rbp-58h] BYREF _BYTE v19[4]; // [rsp+94h] [rbp-4Ch] BYREF unsigned int v20; // [rsp+98h] [rbp-48h] unsigned int v21; // [rsp+9Ch] [rbp-44h] unsigned int v22; // [rsp+A0h] [rbp-40h] int v23; // [rsp+A4h] [rbp-3Ch] unsigned int v24; // [rsp+A8h] [rbp-38h] char v25; // [rsp+AFh] [rbp-31h] unsigned __int8 *v26; // [rsp+B0h] [rbp-30h] long long v27; // [rsp+B8h] [rbp-28h] long long v28; // [rsp+C0h] [rbp-20h] long long v29; // [rsp+C8h] [rbp-18h] _QWORD *v30; // [rsp+D0h] [rbp-10h] v30 = a1; v29 = a2; v28 = a3; v27 = a4; v26 = a5; v25 = a6; if ( 112LL * *((int *)v30 + 117) + *(_QWORD *)(*v30 + 536LL) == a2 ) *((_BYTE *)v30 + 828) = 1; *((_BYTE *)v30 + 829) = 1; if ( (*(_BYTE *)v27 & 0x80) != 0 ) v11 = *(_DWORD *)(*v30 + 380LL); else v11 = 0; v20 = v11; v22 = v11 + 2; if ( v25 ) last_pos = mi_find_last_pos(v29, v27, v26, v19, &v16); else last_pos = mi_find_half_pos(v20, v29, v27, v26, v19, &v16); if ( last_pos ) { v24 = last_pos - v27; v23 = _byteswap_ushort(*(_WORD *)v27) & 0x7FFF; v6 = 0; if ( v20 ) v6 = 0x8000; v13 = v24 + v6; *(_BYTE *)(v27 + 1) = v24 + v6; *(_BYTE *)v27 = HIBYTE(v13); last_pos = v16; if ( v20 ) { v17 = last_pos - v20; memcpy(v30[32] + 2LL, v17, v20); } v15 = mi_new(v30, v29, 3); if ( v15 == -1LL ) { return (unsigned int)-1; } else { v10 = v30; v7 = (_BYTE *)mi_move_key(v29, v28, v26); mi_kpointer((long long)v10, v7, v15); if ( (*(unsigned int ( **)(long long, _QWORD, long long *, unsigned __int8 *))(v29 + 72))( v29, v20, &last_pos, v26) ) { v21 = (*(long long ( **)(long long, _QWORD, _QWORD, _QWORD, _QWORD, unsigned __int8 *, _BYTE *))(v29 + 80))( v29, v20, 0LL, 0LL, 0LL, v26, v14); v24 = v23 + v27 - last_pos; memcpy(v21 + v22 + v30[32], last_pos, v24); (*(void ( **)(long long, _QWORD, _BYTE *))(v29 + 88))(v29, v22 + v30[32], v14); v8 = 0; if ( v20 ) v8 = 0x8000; v12 = v22 + v21 + v24 + v8; *(_BYTE *)(v30[32] + 1LL) = v22 + v21 + v24 + v8; *(_BYTE *)v30[32] = HIBYTE(v12); if ( (unsigned int)mi_write_keypage(v30, v29, v15, 3, (unsigned __int16 *)v30[32]) ) return (unsigned int)-1; else return 2; } else { return (unsigned int)-1; } } } else { return (unsigned int)-1; } }
_mi_split_page: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 MOV AL,R9B MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV byte ptr [RBP + -0x31],AL MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x68],RAX JMP 0x001c768f LAB_001c768f: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RCX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RCX + 0x1d4] IMUL RCX,RCX,0x70 ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x18] JNZ 0x001c76c0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x33c],0x1 LAB_001c76c0: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x33d],0x1 MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX] AND EAX,0x80 CMP EAX,0x0 JZ 0x001c76f1 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x17c] MOV dword ptr [RBP + -0xc4],EAX JMP 0x001c76fb LAB_001c76f1: XOR EAX,EAX MOV dword ptr [RBP + -0xc4],EAX JMP 0x001c76fb LAB_001c76fb: MOV EAX,dword ptr [RBP + -0xc4] MOV dword ptr [RBP + -0x48],EAX MOV EAX,dword ptr [RBP + -0x48] ADD EAX,0x2 MOV dword ptr [RBP + -0x40],EAX CMP byte ptr [RBP + -0x31],0x0 JZ 0x001c7732 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x30] LEA RCX,[RBP + -0x4c] LEA R8,[RBP + -0x68] CALL 0x001c79f0 MOV qword ptr [RBP + -0x58],RAX JMP 0x001c7752 LAB_001c7732: MOV EDI,dword ptr [RBP + -0x48] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] LEA R8,[RBP + -0x4c] LEA R9,[RBP + -0x68] CALL 0x001c7cc0 MOV qword ptr [RBP + -0x58],RAX LAB_001c7752: CMP qword ptr [RBP + -0x58],0x0 JNZ 0x001c7767 JMP 0x001c775b LAB_001c775b: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001c79da LAB_001c7767: MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x28] SUB RAX,RCX MOV dword ptr [RBP + -0x38],EAX MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x28] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX AND EAX,0x7fff MOV dword ptr [RBP + -0x3c],EAX MOV EDX,dword ptr [RBP + -0x48] XOR EAX,EAX MOV ECX,0x8000 CMP EDX,0x0 CMOVNZ EAX,ECX MOV ECX,dword ptr [RBP + -0x38] MOVZX ECX,CX ADD EAX,ECX MOV word ptr [RBP + -0xb2],AX MOVZX EAX,word ptr [RBP + -0xb2] MOV dword ptr [RBP + -0xb8],EAX MOV EAX,dword ptr [RBP + -0xb8] MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RBP + -0xb8] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x58],RAX CMP dword ptr [RBP + -0x48],0x0 JZ 0x001c782a JMP 0x001c77f6 LAB_001c77f6: JMP 0x001c77f8 LAB_001c77f8: MOV RAX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RBP + -0x48] MOV EDX,ECX XOR ECX,ECX SUB RCX,RDX ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x100] ADD RDI,0x2 MOV RSI,qword ptr [RBP + -0x60] MOV EAX,dword ptr [RBP + -0x48] MOV EDX,EAX CALL 0x0012a090 LAB_001c782a: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,0x3 CALL 0x001be220 MOV qword ptr [RBP + -0x70],RAX CMP RAX,-0x1 JNZ 0x001c7854 JMP 0x001c7848 LAB_001c7848: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001c79da LAB_001c7854: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0xd0],RAX MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x30] CALL 0x001c1ac0 MOV RDI,qword ptr [RBP + -0xd0] MOV RSI,RAX MOV RDX,qword ptr [RBP + -0x70] CALL 0x001c0350 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x48] MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x30] LEA RDX,[RBP + -0x58] CALL RAX CMP EAX,0x0 JNZ 0x001c78af JMP 0x001c78a3 LAB_001c78a3: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001c79da LAB_001c78af: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x50] MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x48] MOV R9,qword ptr [RBP + -0x30] XOR ECX,ECX MOV R8D,ECX LEA R10,[RBP + -0xb0] MOV RDX,R8 MOV RCX,R8 MOV qword ptr [RSP],R10 CALL RAX MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RBP + -0x3c] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x58] SUB RAX,RCX MOV dword ptr [RBP + -0x38],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x100] MOV EAX,dword ptr [RBP + -0x40] ADD RDI,RAX MOV EAX,dword ptr [RBP + -0x44] ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x58] MOV EAX,dword ptr [RBP + -0x38] MOV EDX,EAX CALL 0x0012a090 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x58] MOV RDI,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RCX + 0x100] MOV ECX,dword ptr [RBP + -0x40] ADD RSI,RCX LEA RDX,[RBP + -0xb0] CALL RAX MOV EDX,dword ptr [RBP + -0x48] XOR EAX,EAX MOV ECX,0x8000 CMP EDX,0x0 CMOVNZ EAX,ECX MOV ECX,dword ptr [RBP + -0x38] ADD ECX,dword ptr [RBP + -0x44] ADD ECX,dword ptr [RBP + -0x40] MOVZX ECX,CX ADD EAX,ECX MOV word ptr [RBP + -0xba],AX MOVZX EAX,word ptr [RBP + -0xba] MOV dword ptr [RBP + -0xc0],EAX MOV EAX,dword ptr [RBP + -0xc0] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x100] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RBP + -0xc0] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x100] MOV byte ptr [RAX],CL MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RBP + -0x10] MOV R8,qword ptr [RAX + 0x100] MOV ECX,0x3 CALL 0x001bdef0 CMP EAX,0x0 JZ 0x001c79cd JMP 0x001c79c4 LAB_001c79c4: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001c79da LAB_001c79cd: JMP 0x001c79cf LAB_001c79cf: JMP 0x001c79d1 LAB_001c79d1: JMP 0x001c79d3 LAB_001c79d3: MOV dword ptr [RBP + -0x4],0x2 LAB_001c79da: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0xe0 POP RBP RET
int4 _mi_split_page(long *param_1,long param_2,int8 param_3,byte *param_4,int8 param_5, char param_6) { long *plVar1; short sVar2; int iVar3; int8 uVar4; uint local_cc; int1 local_b8 [64]; long local_78; void *local_70; void *local_68; void *local_60; int1 local_54 [4]; uint local_50; uint local_4c; uint local_48; uint local_44; uint local_40; char local_39; int8 local_38; byte *local_30; int8 local_28; long local_20; long *local_18; int4 local_c; if (*(long *)(*param_1 + 0x218) + (long)*(int *)((long)param_1 + 0x1d4) * 0x70 == param_2) { *(int1 *)((long)param_1 + 0x33c) = 1; } *(int1 *)((long)param_1 + 0x33d) = 1; if ((*param_4 & 0x80) == 0) { local_cc = 0; } else { local_cc = *(uint *)(*param_1 + 0x17c); } local_50 = local_cc; local_48 = local_cc + 2; local_39 = param_6; local_38 = param_5; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; if (param_6 == '\0') { local_60 = (void *)_mi_find_half_pos(local_cc,param_2,param_4,param_5,local_54,&local_70); } else { local_60 = (void *)_mi_find_last_pos(param_2,param_4,param_5,local_54,&local_70); } if (local_60 == (void *)0x0) { local_c = 0xffffffff; } else { local_40 = (int)local_60 - (int)local_30; local_44 = (uint)local_30[1] | (*local_30 & 0x7f) << 8; sVar2 = 0; if (local_50 != 0) { sVar2 = -0x8000; } sVar2 = sVar2 + (short)local_40; local_30[1] = (byte)sVar2; *local_30 = (byte)((ushort)sVar2 >> 8); local_60 = local_70; if (local_50 != 0) { local_68 = (void *)((long)local_70 - (ulong)local_50); memcpy((void *)(local_18[0x20] + 2),local_68,(ulong)local_50); } local_78 = _mi_new(local_18,local_20,3); plVar1 = local_18; if (local_78 == -1) { local_c = 0xffffffff; } else { uVar4 = _mi_move_key(local_20,local_28,local_38); _mi_kpointer(plVar1,uVar4,local_78); iVar3 = (**(code **)(local_20 + 0x48))(local_20,local_50,&local_60,local_38); if (iVar3 == 0) { local_c = 0xffffffff; } else { local_4c = (**(code **)(local_20 + 0x50))(local_20,local_50,0,0,0,local_38,local_b8); local_40 = ((int)local_30 + local_44) - (int)local_60; memcpy((void *)(local_18[0x20] + (ulong)local_48 + (ulong)local_4c),local_60,(ulong)local_40 ); (**(code **)(local_20 + 0x58))(local_20,local_18[0x20] + (ulong)local_48,local_b8); sVar2 = 0; if (local_50 != 0) { sVar2 = -0x8000; } sVar2 = sVar2 + (short)local_40 + (short)local_4c + (short)local_48; *(char *)(local_18[0x20] + 1) = (char)sVar2; *(char *)local_18[0x20] = (char)((ushort)sVar2 >> 8); iVar3 = _mi_write_keypage(local_18,local_20,local_78,3,local_18[0x20]); if (iVar3 == 0) { local_c = 2; } else { local_c = 0xffffffff; } } } } return local_c; }
13,122
mi_split_page
eloqsql/storage/myisam/mi_write.c
int _mi_split_page(register MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *key, uchar *buff, uchar *key_buff, my_bool insert_last_key) { uint length,a_length,key_ref_length,t_length,nod_flag,key_length; uchar *key_pos,*pos, *UNINIT_VAR(after_key); my_off_t new_pos; MI_KEY_PARAM s_temp; DBUG_ENTER("mi_split_page"); DBUG_DUMP("buff",(uchar*) buff,mi_getint(buff)); if (info->s->keyinfo+info->lastinx == keyinfo) info->page_changed=1; /* Info->buff is used */ info->buff_used=1; nod_flag=mi_test_if_nod(buff); key_ref_length=2+nod_flag; if (insert_last_key) key_pos=_mi_find_last_pos(keyinfo,buff,key_buff, &key_length, &after_key); else key_pos=_mi_find_half_pos(nod_flag,keyinfo,buff,key_buff, &key_length, &after_key); if (!key_pos) DBUG_RETURN(-1); length=(uint) (key_pos-buff); a_length=mi_getint(buff); mi_putint(buff,length,nod_flag); key_pos=after_key; if (nod_flag) { DBUG_PRINT("test",("Splitting nod")); pos=key_pos-nod_flag; memcpy((uchar*) info->buff+2,(uchar*) pos,(size_t) nod_flag); } /* Move middle item to key and pointer to new page */ if ((new_pos=_mi_new(info,keyinfo,DFLT_INIT_HITS)) == HA_OFFSET_ERROR) DBUG_RETURN(-1); _mi_kpointer(info,_mi_move_key(keyinfo,key,key_buff),new_pos); /* Store new page */ if (!(*keyinfo->get_key)(keyinfo,nod_flag,&key_pos,key_buff)) DBUG_RETURN(-1); t_length=(*keyinfo->pack_key)(keyinfo,nod_flag,(uchar *) 0, (uchar*) 0, (uchar*) 0, key_buff, &s_temp); length=(uint) ((buff+a_length)-key_pos); memcpy((uchar*) info->buff+key_ref_length+t_length,(uchar*) key_pos, (size_t) length); (*keyinfo->store_key)(keyinfo,info->buff+key_ref_length,&s_temp); mi_putint(info->buff,length+t_length+key_ref_length,nod_flag); if (_mi_write_keypage(info,keyinfo,new_pos,DFLT_INIT_HITS,info->buff)) DBUG_RETURN(-1); DBUG_DUMP("key",(uchar*) key,_mi_keylength(keyinfo,key)); DBUG_RETURN(2); /* Middle key up */ }
O3
c
mi_split_page: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x518, %rsp # imm = 0x518 movq %r8, %r13 movq %rdx, %r15 movq %rdi, %r12 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq (%rdi), %rdx movslq 0x1d4(%rdi), %rax imulq $0x70, %rax, %rax addq 0x218(%rdx), %rax cmpq %rsi, %rax jne 0x8905b movb $0x1, 0x33c(%r12) movb $0x1, 0x33d(%r12) movzbl (%rcx), %eax xorl %edi, %edi testb %al, %al jns 0x89073 movl 0x17c(%rdx), %edi testb %r9b, %r9b movq %rsi, -0x518(%rbp) movq %rdi, -0x530(%rbp) movq %rcx, -0x528(%rbp) je 0x8912b movq %r12, -0x508(%rbp) movzbl 0x1(%rcx), %edx andl $0x7f, %eax shll $0x8, %eax addl %edx, %eax addl $-0x2, %eax leaq 0x2(%rcx), %r12 movq %r12, -0x510(%rbp) testb $0x2e, 0xa(%rsi) je 0x89149 movq %r15, -0x4f8(%rbp) movl %eax, %eax leaq (%r12,%rax), %r15 addq $-0x2, %r15 movq %r13, -0x500(%rbp) movb $0x0, (%r13) xorl %eax, %eax leaq -0x4f0(%rbp), %r14 movq %r12, %r13 movq %r13, %rbx movq %r12, %r13 movl %eax, %edx movq -0x500(%rbp), %rdi movq %r14, %rsi callq 0x29080 movq -0x518(%rbp), %rdi xorl %esi, %esi leaq -0x510(%rbp), %rdx movq %r14, %rcx callq *0x48(%rdi) testl %eax, %eax je 0x8917f movq -0x510(%rbp), %r12 cmpq %r15, %r12 jb 0x890e5 movq %r13, -0x520(%rbp) jmp 0x891a7 leaq -0x534(%rbp), %r8 leaq -0x520(%rbp), %r9 movq %rcx, %rdx movq %r13, %rcx callq 0x893a0 movq %rax, %rbx jmp 0x891bc movzwl 0x12(%rsi), %ecx xorl %edx, %edx divl %ecx addl $-0x2, %eax imull %ecx, %eax addq %rax, %r12 leaq (%r12,%rcx), %rax movq %rax, -0x520(%rbp) movq %r13, %rdi movq %r12, %rsi movq %rcx, %rdx callq 0x29080 movq %r12, %rbx movq -0x508(%rbp), %r12 jmp 0x891bc movq -0x518(%rbp), %rax movq (%rax), %rax movq 0x268(%rax), %rsi movl $0x7e, %edi callq 0x7ad4a callq 0xa1ac2 movl $0x7e, (%rax) xorl %ebx, %ebx movq -0x508(%rbp), %r12 movq -0x500(%rbp), %r13 movq -0x4f8(%rbp), %r15 movl $0xffffffff, %ecx # imm = 0xFFFFFFFF testq %rbx, %rbx je 0x89378 movq -0x528(%rbp), %rcx subq %rcx, %rbx movzbl 0x1(%rcx), %eax movq %rax, -0x4f8(%rbp) movzbl (%rcx), %r14d xorl %eax, %eax movq -0x530(%rbp), %rdx testl %edx, %edx setne %al shll $0xf, %eax movq %rax, -0x508(%rbp) addl %ebx, %eax movb %bl, 0x1(%rcx) movb %ah, (%rcx) movq -0x520(%rbp), %rsi movq %rsi, -0x510(%rbp) testl %edx, %edx je 0x8922a movl %edx, %edx subq %rdx, %rsi movq 0x100(%r12), %rdi addq $0x2, %rdi callq 0x29080 movq %r12, %rdi movq -0x518(%rbp), %rbx movq %rbx, %rsi movl $0x3, %edx callq 0x83d32 movq %rax, -0x500(%rbp) cmpq $-0x1, %rax je 0x89373 movq %rbx, %rdi movq %r15, %rsi movq %r13, %rdx callq 0x85b13 movq %r12, %rdi movq %rax, %rsi movq -0x500(%rbp), %rdx callq 0x84fb9 leaq -0x510(%rbp), %rdx movq %rbx, %rdi movq -0x530(%rbp), %r15 movl %r15d, %esi movq %r13, %rcx callq *0x48(%rbx) testl %eax, %eax movl $0xffffffff, %ecx # imm = 0xFFFFFFFF je 0x89378 andl $0x7f, %r14d shll $0x8, %r14d addq -0x4f8(%rbp), %r14 leal 0x2(%r15), %eax movl %eax, -0x4f8(%rbp) leaq -0x4f0(%rbp), %rax movq %rax, (%rsp) movq %rbx, %rdi movl %r15d, %esi xorl %edx, %edx xorl %ecx, %ecx xorl %r8d, %r8d movq %r13, %r9 callq *0x50(%rbx) movl %eax, %r15d movq -0x528(%rbp), %r13 addq %r14, %r13 movq -0x510(%rbp), %rsi subq %rsi, %r13 movl -0x4f8(%rbp), %r14d movq 0x100(%r12), %rax addq %r14, %rax movl %r15d, %edi addq %rax, %rdi movl %r13d, %edx callq 0x29080 addq 0x100(%r12), %r14 movq %rbx, %rdi movq %r14, %rsi leaq -0x4f0(%rbp), %rdx callq *0x58(%rbx) addl -0x4f8(%rbp), %r15d addl %r13d, %r15d movq -0x508(%rbp), %rcx addl %r15d, %ecx movq 0x100(%r12), %rax movb %r15b, 0x1(%rax) movq 0x100(%r12), %rax movb %ch, (%rax) movq 0x100(%r12), %r8 movq %r12, %rdi movq %rbx, %rsi movq -0x500(%rbp), %rdx movl $0x3, %ecx callq 0x83b80 xorl %ecx, %ecx negl %eax sbbl %ecx, %ecx orl $0x2, %ecx jmp 0x89378 movl $0xffffffff, %ecx # imm = 0xFFFFFFFF movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x8939b movl %ecx, %eax addq $0x518, %rsp # imm = 0x518 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29250
_mi_split_page: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 518h mov r13, r8 mov r15, rdx mov r12, rdi mov rax, fs:28h mov [rbp+var_30], rax mov rdx, [rdi] movsxd rax, dword ptr [rdi+1D4h] imul rax, 70h ; 'p' add rax, [rdx+218h] cmp rax, rsi jnz short loc_8905B mov byte ptr [r12+33Ch], 1 loc_8905B: mov byte ptr [r12+33Dh], 1 movzx eax, byte ptr [rcx] xor edi, edi test al, al jns short loc_89073 mov edi, [rdx+17Ch] loc_89073: test r9b, r9b mov [rbp+var_518], rsi mov [rbp+var_530], rdi mov [rbp+var_528], rcx jz loc_8912B mov [rbp+var_508], r12 movzx edx, byte ptr [rcx+1] and eax, 7Fh shl eax, 8 add eax, edx add eax, 0FFFFFFFEh lea r12, [rcx+2] mov [rbp+var_510], r12 test byte ptr [rsi+0Ah], 2Eh jz loc_89149 mov [rbp+var_4F8], r15 mov eax, eax lea r15, [r12+rax] add r15, 0FFFFFFFFFFFFFFFEh mov [rbp+var_500], r13 mov byte ptr [r13+0], 0 xor eax, eax lea r14, [rbp+var_4F0] mov r13, r12 loc_890E5: mov rbx, r13 mov r13, r12 mov edx, eax mov rdi, [rbp+var_500] mov rsi, r14 call _memcpy mov rdi, [rbp+var_518] xor esi, esi lea rdx, [rbp+var_510] mov rcx, r14 call qword ptr [rdi+48h] test eax, eax jz short loc_8917F mov r12, [rbp+var_510] cmp r12, r15 jb short loc_890E5 mov [rbp+var_520], r13 jmp short loc_891A7 loc_8912B: lea r8, [rbp+var_534] lea r9, [rbp+var_520] mov rdx, rcx mov rcx, r13 call _mi_find_half_pos mov rbx, rax jmp short loc_891BC loc_89149: movzx ecx, word ptr [rsi+12h] xor edx, edx div ecx add eax, 0FFFFFFFEh imul eax, ecx add r12, rax lea rax, [r12+rcx] mov [rbp+var_520], rax mov rdi, r13 mov rsi, r12 mov rdx, rcx call _memcpy mov rbx, r12 mov r12, [rbp+var_508] jmp short loc_891BC loc_8917F: mov rax, [rbp+var_518] mov rax, [rax] mov rsi, [rax+268h] mov edi, 7Eh ; '~' call mi_report_error call _my_thread_var mov dword ptr [rax], 7Eh ; '~' xor ebx, ebx loc_891A7: mov r12, [rbp+var_508] mov r13, [rbp+var_500] mov r15, [rbp+var_4F8] loc_891BC: mov ecx, 0FFFFFFFFh test rbx, rbx jz loc_89378 mov rcx, [rbp+var_528] sub rbx, rcx movzx eax, byte ptr [rcx+1] mov [rbp+var_4F8], rax movzx r14d, byte ptr [rcx] xor eax, eax mov rdx, [rbp+var_530] test edx, edx setnz al shl eax, 0Fh mov [rbp+var_508], rax add eax, ebx mov [rcx+1], bl mov [rcx], ah mov rsi, [rbp+var_520] mov [rbp+var_510], rsi test edx, edx jz short loc_8922A mov edx, edx sub rsi, rdx mov rdi, [r12+100h] add rdi, 2 call _memcpy loc_8922A: mov rdi, r12 mov rbx, [rbp+var_518] mov rsi, rbx mov edx, 3 call _mi_new mov [rbp+var_500], rax cmp rax, 0FFFFFFFFFFFFFFFFh jz loc_89373 mov rdi, rbx mov rsi, r15 mov rdx, r13 call _mi_move_key mov rdi, r12 mov rsi, rax mov rdx, [rbp+var_500] call _mi_kpointer lea rdx, [rbp+var_510] mov rdi, rbx mov r15, [rbp+var_530] mov esi, r15d mov rcx, r13 call qword ptr [rbx+48h] test eax, eax mov ecx, 0FFFFFFFFh jz loc_89378 and r14d, 7Fh shl r14d, 8 add r14, [rbp+var_4F8] lea eax, [r15+2] mov dword ptr [rbp+var_4F8], eax lea rax, [rbp+var_4F0] mov [rsp+540h+var_540], rax mov rdi, rbx mov esi, r15d xor edx, edx xor ecx, ecx xor r8d, r8d mov r9, r13 call qword ptr [rbx+50h] mov r15d, eax mov r13, [rbp+var_528] add r13, r14 mov rsi, [rbp+var_510] sub r13, rsi mov r14d, dword ptr [rbp+var_4F8] mov rax, [r12+100h] add rax, r14 mov edi, r15d add rdi, rax mov edx, r13d call _memcpy add r14, [r12+100h] mov rdi, rbx mov rsi, r14 lea rdx, [rbp+var_4F0] call qword ptr [rbx+58h] add r15d, dword ptr [rbp+var_4F8] add r15d, r13d mov rcx, [rbp+var_508] add ecx, r15d mov rax, [r12+100h] mov [rax+1], r15b mov rax, [r12+100h] mov [rax], ch mov r8, [r12+100h] mov rdi, r12 mov rsi, rbx mov rdx, [rbp+var_500] mov ecx, 3 call _mi_write_keypage xor ecx, ecx neg eax sbb ecx, ecx or ecx, 2 jmp short loc_89378 loc_89373: mov ecx, 0FFFFFFFFh loc_89378: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_8939B mov eax, ecx add rsp, 518h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8939B: call ___stack_chk_fail
long long mi_split_page(long long a1, unsigned __int16 *a2, long long a3, char *a4, unsigned __int8 *a5, char a6) { unsigned __int8 *v6; // r13 long long *v8; // r12 long long v9; // rdx char v10; // al long long v11; // rdi unsigned int v12; // eax char *v13; // r12 char *v14; // r15 unsigned int v15; // eax char *v16; // r13 long long half_pos; // rbx long long v18; // rcx long long v19; // r12 unsigned int v20; // ecx char *v21; // rcx __int16 v22; // bx char v23; // r14 unsigned int v24; // edx bool v25; // zf __int16 v26; // ax unsigned __int16 *v27; // rbx _BYTE *v28; // rax unsigned int v29; // r15d int v30; // eax int v31; // r14d long long v32; // r15 unsigned int v33; // r13d long long v34; // r14 __int16 v35; // cx char v37[4]; // [rsp+Ch] [rbp-534h] BYREF long long v38; // [rsp+10h] [rbp-530h] char *v39; // [rsp+18h] [rbp-528h] char *v40; // [rsp+20h] [rbp-520h] BYREF unsigned __int16 *v41; // [rsp+28h] [rbp-518h] char *v42; // [rsp+30h] [rbp-510h] BYREF long long *v43; // [rsp+38h] [rbp-508h] unsigned __int8 *v44; // [rsp+40h] [rbp-500h] long long v45; // [rsp+48h] [rbp-4F8h] _BYTE v46[1216]; // [rsp+50h] [rbp-4F0h] BYREF unsigned long long v47; // [rsp+510h] [rbp-30h] v6 = a5; v8 = (long long *)a1; v47 = __readfsqword(0x28u); v9 = *(_QWORD *)a1; if ( (unsigned __int16 *)(*(_QWORD *)(*(_QWORD *)a1 + 536LL) + 112LL * *(int *)(a1 + 468)) == a2 ) *(_BYTE *)(a1 + 828) = 1; *(_BYTE *)(a1 + 829) = 1; v10 = *a4; v11 = 0LL; if ( *a4 < 0 ) v11 = *(unsigned int *)(v9 + 380); v41 = a2; v38 = v11; v39 = a4; if ( a6 ) { v43 = v8; v12 = (unsigned __int8)a4[1] + ((v10 & 0x7F) << 8) - 2; v13 = a4 + 2; v42 = a4 + 2; if ( (a2[5] & 0x2E) != 0 ) { v45 = a3; v14 = &a4[v12]; v44 = a5; *a5 = 0; v15 = 0; v16 = a4 + 2; while ( 1 ) { half_pos = (long long)v16; v16 = v13; memcpy(v44, v46, v15); v15 = (*((long long ( **)(unsigned __int16 *, _QWORD, char **, _BYTE *))v41 + 9))(v41, 0LL, &v42, v46); if ( !v15 ) break; v13 = v42; if ( v42 >= v14 ) { v40 = v16; goto LABEL_14; } } mi_report_error(126, *(_QWORD *)(*(_QWORD *)v41 + 616LL)); *(_DWORD *)my_thread_var(126LL) = 126; half_pos = 0LL; LABEL_14: v8 = v43; v6 = v44; a3 = v45; } else { v18 = a2[9]; v19 = (long long)&v13[(unsigned int)v18 * (v12 / a2[9] - 2)]; v40 = (char *)(v19 + v18); memcpy(a5, v19, v18); half_pos = v19; v8 = v43; } } else { half_pos = mi_find_half_pos(v11, a2, a4, a5, v37, &v40); } v20 = -1; if ( half_pos ) { v21 = v39; v22 = half_pos - (_WORD)v39; v45 = (unsigned __int8)v39[1]; v23 = *v39; v24 = v38; v25 = (_DWORD)v38 == 0; v43 = (long long *)((unsigned __int8)((_DWORD)v38 != 0) << 15); v26 = v22 + (((_DWORD)v38 != 0) << 15); v39[1] = v22; *v21 = HIBYTE(v26); v42 = v40; if ( !v25 ) memcpy(v8[32] + 2, &v40[-v24], v24); v27 = v41; v44 = (unsigned __int8 *)mi_new(v8, (long long)v41); if ( v44 == (unsigned __int8 *)-1LL ) { return (unsigned int)-1; } else { v28 = (_BYTE *)mi_move_key((long long)v27, a3, v6); mi_kpointer((long long)v8, v28, (unsigned long long)v44); v29 = v38; v30 = (*((long long ( **)(unsigned __int16 *, _QWORD, char **, unsigned __int8 *))v27 + 9))( v27, (unsigned int)v38, &v42, v6); v20 = -1; if ( v30 ) { v31 = v45 + ((v23 & 0x7F) << 8); LODWORD(v45) = v29 + 2; v32 = (*((unsigned int ( **)(unsigned __int16 *, _QWORD, _QWORD, _QWORD, _QWORD, unsigned __int8 *, _BYTE *))v27 + 10))( v27, v29, 0LL, 0LL, 0LL, v6, v46); v33 = v31 + (_DWORD)v39 - (_DWORD)v42; v34 = (unsigned int)v45; memcpy((unsigned int)v45 + v8[32] + v32, v42, v33); (*((void ( **)(unsigned __int16 *, long long, _BYTE *))v27 + 11))(v27, v8[32] + v34, v46); LOWORD(v32) = v33 + v45 + v32; v35 = v32 + (_WORD)v43; *(_BYTE *)(v8[32] + 1) = v32; *(_BYTE *)v8[32] = HIBYTE(v35); return (unsigned int)mi_write_keypage(v8, (long long)v27, (unsigned long long)v44, 3u, (_BYTE *)v8[32]) != 0 ? -1 : 2; } } } return v20; }
_mi_split_page: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x518 MOV R13,R8 MOV R15,RDX MOV R12,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RDX,qword ptr [RDI] MOVSXD RAX,dword ptr [RDI + 0x1d4] IMUL RAX,RAX,0x70 ADD RAX,qword ptr [RDX + 0x218] CMP RAX,RSI JNZ 0x0018905b MOV byte ptr [R12 + 0x33c],0x1 LAB_0018905b: MOV byte ptr [R12 + 0x33d],0x1 MOVZX EAX,byte ptr [RCX] XOR EDI,EDI TEST AL,AL JNS 0x00189073 MOV EDI,dword ptr [RDX + 0x17c] LAB_00189073: TEST R9B,R9B MOV qword ptr [RBP + -0x518],RSI MOV qword ptr [RBP + -0x530],RDI MOV qword ptr [RBP + -0x528],RCX JZ 0x0018912b MOV qword ptr [RBP + -0x508],R12 MOVZX EDX,byte ptr [RCX + 0x1] AND EAX,0x7f SHL EAX,0x8 ADD EAX,EDX ADD EAX,-0x2 LEA R12,[RCX + 0x2] MOV qword ptr [RBP + -0x510],R12 TEST byte ptr [RSI + 0xa],0x2e JZ 0x00189149 MOV qword ptr [RBP + -0x4f8],R15 MOV EAX,EAX LEA R15,[R12 + RAX*0x1] ADD R15,-0x2 MOV qword ptr [RBP + -0x500],R13 MOV byte ptr [R13],0x0 XOR EAX,EAX LEA R14,[RBP + -0x4f0] MOV R13,R12 LAB_001890e5: MOV RBX,R13 MOV R13,R12 MOV EDX,EAX MOV RDI,qword ptr [RBP + -0x500] MOV RSI,R14 CALL 0x00129080 MOV RDI,qword ptr [RBP + -0x518] XOR ESI,ESI LEA RDX,[RBP + -0x510] MOV RCX,R14 CALL qword ptr [RDI + 0x48] TEST EAX,EAX JZ 0x0018917f MOV R12,qword ptr [RBP + -0x510] CMP R12,R15 JC 0x001890e5 MOV qword ptr [RBP + -0x520],R13 JMP 0x001891a7 LAB_0018912b: LEA R8,[RBP + -0x534] LEA R9,[RBP + -0x520] MOV RDX,RCX MOV RCX,R13 CALL 0x001893a0 MOV RBX,RAX JMP 0x001891bc LAB_00189149: MOVZX ECX,word ptr [RSI + 0x12] XOR EDX,EDX DIV ECX ADD EAX,-0x2 IMUL EAX,ECX ADD R12,RAX LEA RAX,[R12 + RCX*0x1] MOV qword ptr [RBP + -0x520],RAX MOV RDI,R13 MOV RSI,R12 MOV RDX,RCX CALL 0x00129080 MOV RBX,R12 MOV R12,qword ptr [RBP + -0x508] JMP 0x001891bc LAB_0018917f: MOV RAX,qword ptr [RBP + -0x518] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x268] MOV EDI,0x7e CALL 0x0017ad4a CALL 0x001a1ac2 MOV dword ptr [RAX],0x7e XOR EBX,EBX LAB_001891a7: MOV R12,qword ptr [RBP + -0x508] MOV R13,qword ptr [RBP + -0x500] MOV R15,qword ptr [RBP + -0x4f8] LAB_001891bc: MOV ECX,0xffffffff TEST RBX,RBX JZ 0x00189378 MOV RCX,qword ptr [RBP + -0x528] SUB RBX,RCX MOVZX EAX,byte ptr [RCX + 0x1] MOV qword ptr [RBP + -0x4f8],RAX MOVZX R14D,byte ptr [RCX] XOR EAX,EAX MOV RDX,qword ptr [RBP + -0x530] TEST EDX,EDX SETNZ AL SHL EAX,0xf MOV qword ptr [RBP + -0x508],RAX ADD EAX,EBX MOV byte ptr [RCX + 0x1],BL MOV byte ptr [RCX],AH MOV RSI,qword ptr [RBP + -0x520] MOV qword ptr [RBP + -0x510],RSI TEST EDX,EDX JZ 0x0018922a MOV EDX,EDX SUB RSI,RDX MOV RDI,qword ptr [R12 + 0x100] ADD RDI,0x2 CALL 0x00129080 LAB_0018922a: MOV RDI,R12 MOV RBX,qword ptr [RBP + -0x518] MOV RSI,RBX MOV EDX,0x3 CALL 0x00183d32 MOV qword ptr [RBP + -0x500],RAX CMP RAX,-0x1 JZ 0x00189373 MOV RDI,RBX MOV RSI,R15 MOV RDX,R13 CALL 0x00185b13 MOV RDI,R12 MOV RSI,RAX MOV RDX,qword ptr [RBP + -0x500] CALL 0x00184fb9 LEA RDX,[RBP + -0x510] MOV RDI,RBX MOV R15,qword ptr [RBP + -0x530] MOV ESI,R15D MOV RCX,R13 CALL qword ptr [RBX + 0x48] TEST EAX,EAX MOV ECX,0xffffffff JZ 0x00189378 AND R14D,0x7f SHL R14D,0x8 ADD R14,qword ptr [RBP + -0x4f8] LEA EAX,[R15 + 0x2] MOV dword ptr [RBP + -0x4f8],EAX LEA RAX,[RBP + -0x4f0] MOV qword ptr [RSP],RAX MOV RDI,RBX MOV ESI,R15D XOR EDX,EDX XOR ECX,ECX XOR R8D,R8D MOV R9,R13 CALL qword ptr [RBX + 0x50] MOV R15D,EAX MOV R13,qword ptr [RBP + -0x528] ADD R13,R14 MOV RSI,qword ptr [RBP + -0x510] SUB R13,RSI MOV R14D,dword ptr [RBP + -0x4f8] MOV RAX,qword ptr [R12 + 0x100] ADD RAX,R14 MOV EDI,R15D ADD RDI,RAX MOV EDX,R13D CALL 0x00129080 ADD R14,qword ptr [R12 + 0x100] MOV RDI,RBX MOV RSI,R14 LEA RDX,[RBP + -0x4f0] CALL qword ptr [RBX + 0x58] ADD R15D,dword ptr [RBP + -0x4f8] ADD R15D,R13D MOV RCX,qword ptr [RBP + -0x508] ADD ECX,R15D MOV RAX,qword ptr [R12 + 0x100] MOV byte ptr [RAX + 0x1],R15B MOV RAX,qword ptr [R12 + 0x100] MOV byte ptr [RAX],CH MOV R8,qword ptr [R12 + 0x100] MOV RDI,R12 MOV RSI,RBX MOV RDX,qword ptr [RBP + -0x500] MOV ECX,0x3 CALL 0x00183b80 XOR ECX,ECX NEG EAX SBB ECX,ECX OR ECX,0x2 JMP 0x00189378 LAB_00189373: MOV ECX,0xffffffff LAB_00189378: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0018939b MOV EAX,ECX ADD RSP,0x518 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018939b: CALL 0x00129250
uint _mi_split_page(long *param_1,long *param_2,ulong param_3,byte *param_4,int1 *param_5, char param_6) { byte bVar1; ushort uVar2; long *plVar3; uint uVar4; int iVar5; int4 *puVar6; int8 uVar7; byte *__src; long *plVar8; byte *pbVar9; long lVar10; ulong uVar11; byte *pbVar12; long in_FS_OFFSET; int1 local_53c [4]; ulong local_538; byte *local_530; byte *local_528; long *local_520; byte *local_518; long *local_510; int1 *local_508; ulong local_500; int1 local_4f8 [1216]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); if ((long *)((long)*(int *)((long)param_1 + 0x1d4) * 0x70 + *(long *)(*param_1 + 0x218)) == param_2) { *(int1 *)((long)param_1 + 0x33c) = 1; } *(int1 *)((long)param_1 + 0x33d) = 1; local_538 = 0; if ((char)*param_4 < '\0') { local_538 = (ulong)*(uint *)(*param_1 + 0x17c); } local_530 = param_4; local_520 = param_2; if (param_6 == '\0') { __src = (byte *)_mi_find_half_pos(local_538,param_2,param_4,param_5,local_53c,&local_528); plVar8 = param_1; pbVar9 = local_528; } else { uVar4 = ((*param_4 & 0x7f) * 0x100 + (uint)param_4[1]) - 2; local_518 = param_4 + 2; local_510 = param_1; if ((*(byte *)((long)param_2 + 10) & 0x2e) == 0) { uVar2 = *(ushort *)((long)param_2 + 0x12); __src = local_518 + (uVar4 / uVar2 - 2) * (uint)uVar2; local_528 = __src + uVar2; memcpy(param_5,__src,(ulong)uVar2); plVar8 = local_510; pbVar9 = local_528; } else { pbVar12 = local_518 + ((ulong)uVar4 - 2); *param_5 = 0; uVar4 = 0; pbVar9 = local_518; local_508 = param_5; local_500 = param_3; do { __src = pbVar9; pbVar9 = local_518; memcpy(local_508,local_4f8,(ulong)uVar4); uVar4 = (*(code *)local_520[9])(local_520,0,&local_518,local_4f8); if (uVar4 == 0) { mi_report_error(0x7e,*(int8 *)(*local_520 + 0x268)); puVar6 = (int4 *)_my_thread_var(); *puVar6 = 0x7e; __src = (byte *)0x0; plVar8 = local_510; param_5 = local_508; param_3 = local_500; pbVar9 = local_528; break; } plVar8 = local_510; param_5 = local_508; param_3 = local_500; } while (local_518 < pbVar12); } } local_528 = pbVar9; uVar4 = 0xffffffff; if (__src != (byte *)0x0) { local_500 = (ulong)local_530[1]; bVar1 = *local_530; iVar5 = (int)local_538; local_510 = (long *)((ulong)(iVar5 != 0) << 0xf); local_530[1] = (byte)((long)__src - (long)local_530); *local_530 = (byte)((uint)(iVar5 != 0) * 0x8000 + (int)((long)__src - (long)local_530) >> 8); local_518 = local_528; if (iVar5 != 0) { memcpy((void *)(plVar8[0x20] + 2),local_528 + -(local_538 & 0xffffffff),local_538 & 0xffffffff ); } plVar3 = local_520; local_508 = (int1 *)_mi_new(plVar8,local_520,3); if (local_508 == (int1 *)0xffffffffffffffff) { uVar4 = 0xffffffff; } else { uVar7 = _mi_move_key(plVar3,param_3,param_5); _mi_kpointer(plVar8,uVar7,local_508); uVar11 = local_538; iVar5 = (*(code *)plVar3[9])(plVar3,local_538 & 0xffffffff,&local_518,param_5); uVar4 = 0xffffffff; if (iVar5 != 0) { lVar10 = ((bVar1 & 0x7f) << 8) + local_500; local_500 = CONCAT44(local_500._4_4_,(int)uVar11 + 2); uVar4 = (*(code *)plVar3[10])(plVar3,uVar11 & 0xffffffff,0,0,0,param_5,local_4f8); pbVar9 = local_530 + (lVar10 - (long)local_518); uVar11 = local_500 & 0xffffffff; memcpy((void *)((ulong)uVar4 + plVar8[0x20] + uVar11),local_518,(ulong)pbVar9 & 0xffffffff); (*(code *)plVar3[0xb])(plVar3,uVar11 + plVar8[0x20],local_4f8); iVar5 = uVar4 + (int)local_500 + (int)pbVar9; *(char *)(plVar8[0x20] + 1) = (char)iVar5; *(char *)plVar8[0x20] = (char)((uint)((int)local_510 + iVar5) >> 8); iVar5 = _mi_write_keypage(plVar8,plVar3,local_508,3,plVar8[0x20]); uVar4 = -(uint)(iVar5 != 0) | 2; } } } if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar4; }
13,123
testing::internal::ParseFlag(char const*, char const*, bool*)
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
static bool ParseFlag(const char* str, const char* flag_name, bool* value) { // Gets the value of the flag as a string. const char* const value_str = ParseFlagValue(str, flag_name, true); // Aborts if the parsing failed. if (value_str == nullptr) return false; // Converts the string value to a bool. *value = !(*value_str == '0' || *value_str == 'f' || *value_str == 'F'); return true; }
O0
cpp
testing::internal::ParseFlag(char const*, char const*, bool*): subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq %rdx, 0x18(%rsp) movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rsi movl $0x1, %edx callq 0xe46c0 movq %rax, 0x10(%rsp) cmpq $0x0, 0x10(%rsp) jne 0xeacdb movb $0x0, 0x37(%rsp) jmp 0xead29 movq 0x10(%rsp), %rax movsbl (%rax), %ecx movb $0x1, %al cmpl $0x30, %ecx movb %al, 0xf(%rsp) je 0xead13 movq 0x10(%rsp), %rax movsbl (%rax), %ecx movb $0x1, %al cmpl $0x66, %ecx movb %al, 0xf(%rsp) je 0xead13 movq 0x10(%rsp), %rax movsbl (%rax), %eax cmpl $0x46, %eax sete %al movb %al, 0xf(%rsp) movb 0xf(%rsp), %cl xorb $-0x1, %cl movq 0x18(%rsp), %rax andb $0x1, %cl movb %cl, (%rax) movb $0x1, 0x37(%rsp) movb 0x37(%rsp), %al andb $0x1, %al addq $0x38, %rsp retq nopw %cs:(%rax,%rax) nop
_ZN7testing8internalL9ParseFlagEPKcS2_Pb: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov [rsp+38h+var_20], rdx mov rdi, [rsp+38h+var_10]; this mov rsi, [rsp+38h+var_18]; char * mov edx, (offset dword_0+1); char * call _ZN7testing8internalL14ParseFlagValueEPKcS2_b; testing::internal::ParseFlagValue(char const*,char const*,bool) mov [rsp+38h+var_28], rax cmp [rsp+38h+var_28], 0 jnz short loc_EACDB mov [rsp+38h+var_1], 0 jmp short loc_EAD29 loc_EACDB: mov rax, [rsp+38h+var_28] movsx ecx, byte ptr [rax] mov al, 1 cmp ecx, 30h ; '0' mov [rsp+38h+var_29], al jz short loc_EAD13 mov rax, [rsp+38h+var_28] movsx ecx, byte ptr [rax] mov al, 1 cmp ecx, 66h ; 'f' mov [rsp+38h+var_29], al jz short loc_EAD13 mov rax, [rsp+38h+var_28] movsx eax, byte ptr [rax] cmp eax, 46h ; 'F' setz al mov [rsp+38h+var_29], al loc_EAD13: mov cl, [rsp+38h+var_29] xor cl, 0FFh mov rax, [rsp+38h+var_20] and cl, 1 mov [rax], cl mov [rsp+38h+var_1], 1 loc_EAD29: mov al, [rsp+38h+var_1] and al, 1 add rsp, 38h retn
char testing::internal::ParseFlag(testing::internal *this, const char *a2, bool *a3, bool *a4) { bool v5; // [rsp+Fh] [rbp-29h] _BYTE *v6; // [rsp+10h] [rbp-28h] v6 = testing::internal::ParseFlagValue(this, a2, (const char *)&dword_0 + 1); if ( !v6 ) return 0; v5 = 1; if ( *v6 != 48 ) { v5 = 1; if ( *v6 != 102 ) v5 = *v6 == 70; } *a3 = !v5; return 1; }
ParseFlag: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV qword ptr [RSP + 0x18],RDX MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x20] MOV EDX,0x1 CALL 0x001e46c0 MOV qword ptr [RSP + 0x10],RAX CMP qword ptr [RSP + 0x10],0x0 JNZ 0x001eacdb MOV byte ptr [RSP + 0x37],0x0 JMP 0x001ead29 LAB_001eacdb: MOV RAX,qword ptr [RSP + 0x10] MOVSX ECX,byte ptr [RAX] MOV AL,0x1 CMP ECX,0x30 MOV byte ptr [RSP + 0xf],AL JZ 0x001ead13 MOV RAX,qword ptr [RSP + 0x10] MOVSX ECX,byte ptr [RAX] MOV AL,0x1 CMP ECX,0x66 MOV byte ptr [RSP + 0xf],AL JZ 0x001ead13 MOV RAX,qword ptr [RSP + 0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x46 SETZ AL MOV byte ptr [RSP + 0xf],AL LAB_001ead13: MOV CL,byte ptr [RSP + 0xf] XOR CL,0xff MOV RAX,qword ptr [RSP + 0x18] AND CL,0x1 MOV byte ptr [RAX],CL MOV byte ptr [RSP + 0x37],0x1 LAB_001ead29: MOV AL,byte ptr [RSP + 0x37] AND AL,0x1 ADD RSP,0x38 RET
/* testing::internal::ParseFlag(char const*, char const*, bool*) */ int1 testing::internal::ParseFlag(char *param_1,char *param_2,bool *param_3) { char *pcVar1; int1 local_29; int1 local_1; pcVar1 = (char *)ParseFlagValue(param_1,param_2,true); if (pcVar1 == (char *)0x0) { local_1 = 0; } else { local_29 = true; if ((*pcVar1 != '0') && (local_29 = true, *pcVar1 != 'f')) { local_29 = *pcVar1 == 'F'; } *param_3 = (bool)((local_29 ^ 0xffU) & 1); local_1 = 1; } return local_1; }
13,124
my_uni_ucs2
eloqsql/strings/ctype-ucs2.c
static int my_uni_ucs2(CHARSET_INFO *cs __attribute__((unused)) , my_wc_t wc, uchar *r, uchar *e) { if ( r+2 > e ) return MY_CS_TOOSMALL2; if (wc > 0xFFFF) /* UCS2 does not support characters outside BMP */ return MY_CS_ILUNI; r[0]= (uchar) (wc >> 8); r[1]= (uchar) (wc & 0xFF); return 2; }
O3
c
my_uni_ucs2: pushq %rbp movq %rsp, %rbp leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0xcfff4 xorl %eax, %eax cmpq $0xffff, %rsi # imm = 0xFFFF ja 0xcfff4 rolw $0x8, %si movw %si, (%rdx) movl $0x2, %eax popq %rbp retq
my_uni_ucs2: push rbp mov rbp, rsp lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_CFFF4 xor eax, eax cmp rsi, 0FFFFh ja short loc_CFFF4 rol si, 8 mov [rdx], si mov eax, 2 loc_CFFF4: pop rbp retn
long long my_uni_ucs2(long long a1, unsigned long long a2, _WORD *a3, unsigned long long a4) { long long result; // rax result = 4294967194LL; if ( (unsigned long long)(a3 + 1) <= a4 ) { result = 0LL; if ( a2 <= 0xFFFF ) { *a3 = __ROL2__(a2, 8); return 2LL; } } return result; }
my_uni_ucs2: PUSH RBP MOV RBP,RSP LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x001cfff4 XOR EAX,EAX CMP RSI,0xffff JA 0x001cfff4 ROL SI,0x8 MOV word ptr [RDX],SI MOV EAX,0x2 LAB_001cfff4: POP RBP RET
int8 my_uni_ucs2(int8 param_1,ulong param_2,ushort *param_3,ushort *param_4) { int8 uVar1; uVar1 = 0xffffff9a; if ((param_3 + 1 <= param_4) && (uVar1 = 0, param_2 < 0x10000)) { *param_3 = (ushort)param_2 << 8 | (ushort)param_2 >> 8; uVar1 = 2; } return uVar1; }
13,125
mysql_real_query
eloqsql/libmariadb/libmariadb/mariadb_lib.c
int STDCALL mysql_real_query(MYSQL *mysql, const char *query, unsigned long length) { my_bool skip_result= OPT_EXT_VAL(mysql, multi_command); if (length == (unsigned long)-1) length= (unsigned long)strlen(query); free_old_query(mysql); if (ma_simple_command(mysql, COM_QUERY,query,length,1,0)) return(-1); if (!skip_result && !mysql->options.extension->skip_read_response) return(mysql->methods->db_read_query_result(mysql)); return(0); }
O0
c
mysql_real_query: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x480(%rax) je 0x42360 movq -0x10(%rbp), %rax movq 0x480(%rax), %rax movsbl 0xa8(%rax), %eax cmpl $0x0, %eax je 0x42360 movq -0x10(%rbp), %rax movq 0x480(%rax), %rax movsbl 0xa8(%rax), %eax movl %eax, -0x28(%rbp) jmp 0x42367 xorl %eax, %eax movl %eax, -0x28(%rbp) jmp 0x42367 movl -0x28(%rbp), %eax movb %al, -0x21(%rbp) cmpq $-0x1, -0x20(%rbp) jne 0x42381 movq -0x18(%rbp), %rdi callq 0x36400 movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rdi callq 0x43490 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx movl $0x3, %esi movl $0x1, %r8d xorl %eax, %eax movl %eax, %r9d callq 0x3c140 cmpl $0x0, %eax je 0x423b9 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x423f4 cmpb $0x0, -0x21(%rbp) jne 0x423ed movq -0x10(%rbp), %rax movq 0x480(%rax), %rax cmpb $0x0, 0x148(%rax) jne 0x423ed movq -0x10(%rbp), %rax movq 0x4d0(%rax), %rax movq 0x20(%rax), %rax movq -0x10(%rbp), %rdi callq *%rax movl %eax, -0x4(%rbp) jmp 0x423f4 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
mysql_real_query: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] cmp qword ptr [rax+480h], 0 jz short loc_42360 mov rax, [rbp+var_10] mov rax, [rax+480h] movsx eax, byte ptr [rax+0A8h] cmp eax, 0 jz short loc_42360 mov rax, [rbp+var_10] mov rax, [rax+480h] movsx eax, byte ptr [rax+0A8h] mov [rbp+var_28], eax jmp short loc_42367 loc_42360: xor eax, eax mov [rbp+var_28], eax jmp short $+2 loc_42367: mov eax, [rbp+var_28] mov [rbp+var_21], al cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh jnz short loc_42381 mov rdi, [rbp+var_18] call _strlen mov [rbp+var_20], rax loc_42381: mov rdi, [rbp+var_10] call free_old_query mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] mov esi, 3 mov r8d, 1 xor eax, eax mov r9d, eax call ma_simple_command cmp eax, 0 jz short loc_423B9 mov [rbp+var_4], 0FFFFFFFFh jmp short loc_423F4 loc_423B9: cmp [rbp+var_21], 0 jnz short loc_423ED mov rax, [rbp+var_10] mov rax, [rax+480h] cmp byte ptr [rax+148h], 0 jnz short loc_423ED mov rax, [rbp+var_10] mov rax, [rax+4D0h] mov rax, [rax+20h] mov rdi, [rbp+var_10] call rax mov [rbp+var_4], eax jmp short loc_423F4 loc_423ED: mov [rbp+var_4], 0 loc_423F4: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long mysql_real_query(long long a1, long long a2, long long a3) { char v4; // [rsp+8h] [rbp-28h] long long v5; // [rsp+10h] [rbp-20h] v5 = a3; if ( *(_QWORD *)(a1 + 1152) && *(_BYTE *)(*(_QWORD *)(a1 + 1152) + 168LL) ) v4 = *(_BYTE *)(*(_QWORD *)(a1 + 1152) + 168LL); else v4 = 0; if ( a3 == -1 ) v5 = strlen(a2); free_old_query(a1); if ( (unsigned int)ma_simple_command(a1, 3u, a2, v5, 1, 0LL) ) { return (unsigned int)-1; } else if ( v4 || *(_BYTE *)(*(_QWORD *)(a1 + 1152) + 328LL) ) { return 0; } else { return (unsigned int)(*(long long ( **)(long long))(*(_QWORD *)(a1 + 1232) + 32LL))(a1); } }
mysql_real_query: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x480],0x0 JZ 0x00142360 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] MOVSX EAX,byte ptr [RAX + 0xa8] CMP EAX,0x0 JZ 0x00142360 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] MOVSX EAX,byte ptr [RAX + 0xa8] MOV dword ptr [RBP + -0x28],EAX JMP 0x00142367 LAB_00142360: XOR EAX,EAX MOV dword ptr [RBP + -0x28],EAX JMP 0x00142367 LAB_00142367: MOV EAX,dword ptr [RBP + -0x28] MOV byte ptr [RBP + -0x21],AL CMP qword ptr [RBP + -0x20],-0x1 JNZ 0x00142381 MOV RDI,qword ptr [RBP + -0x18] CALL 0x00136400 MOV qword ptr [RBP + -0x20],RAX LAB_00142381: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00143490 MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] MOV ESI,0x3 MOV R8D,0x1 XOR EAX,EAX MOV R9D,EAX CALL 0x0013c140 CMP EAX,0x0 JZ 0x001423b9 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001423f4 LAB_001423b9: CMP byte ptr [RBP + -0x21],0x0 JNZ 0x001423ed MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] CMP byte ptr [RAX + 0x148],0x0 JNZ 0x001423ed MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x20] MOV RDI,qword ptr [RBP + -0x10] CALL RAX MOV dword ptr [RBP + -0x4],EAX JMP 0x001423f4 LAB_001423ed: MOV dword ptr [RBP + -0x4],0x0 LAB_001423f4: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 mysql_real_query(long param_1,char *param_2,size_t param_3) { char cVar1; int iVar2; int8 local_28; int4 local_c; if ((*(long *)(param_1 + 0x480) == 0) || (*(char *)(*(long *)(param_1 + 0x480) + 0xa8) == '\0')) { cVar1 = '\0'; } else { cVar1 = *(char *)(*(long *)(param_1 + 0x480) + 0xa8); } local_28 = param_3; if (param_3 == 0xffffffffffffffff) { local_28 = strlen(param_2); } free_old_query(param_1); iVar2 = ma_simple_command(param_1,3,param_2,local_28,1,0); if (iVar2 == 0) { if ((cVar1 == '\0') && (*(char *)(*(long *)(param_1 + 0x480) + 0x148) == '\0')) { local_c = (**(code **)(*(long *)(param_1 + 0x4d0) + 0x20))(param_1); } else { local_c = 0; } } else { local_c = 0xffffffff; } return local_c; }
13,126
testing::internal::JsonUnitTestResultPrinter::OutputJsonKey(std::ostream*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
void JsonUnitTestResultPrinter::OutputJsonKey(std::ostream* stream, const std::string& element_name, const std::string& name, const std::string& value, const std::string& indent, bool comma) { const std::vector<std::string>& allowed_names = GetReservedOutputAttributesForElement(element_name); GTEST_CHECK_(std::find(allowed_names.begin(), allowed_names.end(), name) != allowed_names.end()) << "Key \"" << name << "\" is not allowed for value \"" << element_name << "\"."; *stream << indent << "\"" << name << "\": \"" << EscapeJson(value) << "\""; if (comma) *stream << ",\n"; }
O1
cpp
testing::internal::JsonUnitTestResultPrinter::OutputJsonKey(std::ostream*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %r9d, 0xc(%rsp) movq %r8, %r12 movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r13 movq %rdi, %rbx leaq 0x30(%rsp), %rbp movq %rbp, %rdi callq 0x26444 movq (%rbp), %rdi movq 0x8(%rbp), %rsi movq %r15, %rdx callq 0x3b4aa cmpq 0x38(%rsp), %rax jne 0x293d7 leaq 0x193d2(%rip), %rdx # 0x4270d leaq 0x10(%rsp), %rdi movl $0x3, %esi movl $0x122d, %ecx # imm = 0x122D callq 0x16e72 movq 0x2fc92(%rip), %rdi # 0x58fe8 leaq 0x1a0a3(%rip), %rsi # 0x43400 movl $0x65, %edx callq 0x85b0 movq 0x2fc7a(%rip), %rdi # 0x58fe8 leaq 0x1a2d8(%rip), %rsi # 0x4364d movl $0x5, %edx callq 0x85b0 movq (%r15), %rsi movq 0x8(%r15), %rdx movq 0x2fc5b(%rip), %rdi # 0x58fe8 callq 0x85b0 movq %rax, %rbp leaq 0x1a2b7(%rip), %rsi # 0x43653 movl $0x1c, %edx movq %rax, %rdi callq 0x85b0 movq (%r13), %rsi movq 0x8(%r13), %rdx movq %rbp, %rdi callq 0x85b0 leaq 0x1a2b0(%rip), %rsi # 0x43670 movl $0x2, %edx movq %rax, %rdi callq 0x85b0 leaq 0x10(%rsp), %rdi callq 0x16fb4 movq (%r12), %rsi movq 0x8(%r12), %rdx movq %rbx, %rdi callq 0x85b0 movq %rax, %r12 leaq 0x1a2f9(%rip), %rsi # 0x436eb movl $0x1, %edx movq %rax, %rdi callq 0x85b0 movq (%r15), %rsi movq 0x8(%r15), %rdx movq %r12, %rdi callq 0x85b0 movq %rax, %r15 leaq 0x1a2d0(%rip), %rsi # 0x436e8 movl $0x4, %edx movq %rax, %rdi callq 0x85b0 leaq 0x10(%rsp), %rdi movq %r14, %rsi callq 0x29118 movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx movq %r15, %rdi callq 0x85b0 leaq 0x1a2a0(%rip), %rsi # 0x436eb movl $0x1, %edx movq %rax, %rdi callq 0x85b0 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x29473 movq 0x20(%rsp), %rsi incq %rsi callq 0x84e0 cmpb $0x0, 0xc(%rsp) je 0x2948e leaq 0x1a244(%rip), %rsi # 0x436c5 movl $0x2, %edx movq %rbx, %rdi callq 0x85b0 leaq 0x30(%rsp), %rdi callq 0x3244c addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x294dc jmp 0x294dc jmp 0x294dc movq %rax, %rbx leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x294df movq 0x20(%rsp), %rsi incq %rsi callq 0x84e0 jmp 0x294df movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x16fb4 jmp 0x294df movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x3244c movq %rbx, %rdi callq 0x8990 nop
_ZN7testing8internal25JsonUnitTestResultPrinter13OutputJsonKeyEPSoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_SA_SA_b: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov [rsp+78h+var_6C], r9d mov r12, r8 mov r14, rcx mov r15, rdx mov r13, rsi mov rbx, rdi lea rbp, [rsp+78h+var_48] mov rdi, rbp call _ZN7testingL37GetReservedOutputAttributesForElementERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::GetReservedOutputAttributesForElement(std::string const&) mov rdi, [rbp+0] mov rsi, [rbp+8] mov rdx, r15 call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEENS0_5__ops16_Iter_equals_valIS8_EEET_SH_SH_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,__gnu_cxx::__ops::_Iter_equals_val<std::string const>>(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,__gnu_cxx::__ops::_Iter_equals_val<std::string const>,std::random_access_iterator_tag) cmp rax, [rsp+78h+var_40] jnz loc_293D7 lea rdx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rsp+78h+var_68] mov esi, 3 mov ecx, 122Dh call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int) mov rdi, cs:_ZSt4cerr_ptr lea rsi, aConditionStdFi; "Condition std::find(allowed_names.begin"... mov edx, 65h ; 'e' call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, cs:_ZSt4cerr_ptr lea rsi, aKey; "Key \"" mov edx, 5 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rsi, [r15] mov rdx, [r15+8] 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 rbp, rax lea rsi, aIsNotAllowedFo_0; "\" is not allowed for value \"" mov edx, 1Ch 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) mov rsi, [r13+0] mov rdx, [r13+8] mov rdi, rbp call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, asc_43670; "\"." mov edx, 2 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) lea rdi, [rsp+78h+var_68]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() loc_293D7: mov rsi, [r12] mov rdx, [r12+8] mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov r12, rax lea rsi, aMessage+0Fh; "\"" 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) mov rsi, [r15] mov rdx, [r15+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) mov r15, rax lea rsi, aMessage+0Ch; "\": \"" mov edx, 4 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) lea rdi, [rsp+78h+var_68]; int mov rsi, r14; int call _ZN7testing8internal25JsonUnitTestResultPrinter10EscapeJsonERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::JsonUnitTestResultPrinter::EscapeJson(std::string const&) mov rsi, qword ptr [rsp+78h+var_68] mov rdx, [rsp+78h+var_60] mov rdi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, aMessage+0Fh; "\"" 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) lea rax, [rsp+78h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_29473 mov rsi, [rsp+78h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_29473: cmp byte ptr [rsp+78h+var_6C], 0 jz short loc_2948E lea rsi, asc_436C4+1; ",\n" mov edx, 2 mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_2948E: lea rdi, [rsp+78h+var_48]; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_294DC jmp short loc_294DC jmp short loc_294DC mov rbx, rax lea rax, [rsp+arg_18] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_294DF mov rsi, [rsp+arg_18] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_294DF mov rbx, rax lea rdi, [rsp+arg_8]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() jmp short loc_294DF loc_294DC: mov rbx, rax loc_294DF: lea rdi, [rsp+arg_28]; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, rbx call __Unwind_Resume
void testing::internal::JsonUnitTestResultPrinter::OutputJsonKey( long long a1, long long *a2, _QWORD *a3, _QWORD *a4, _QWORD *a5, char a6) { long long v9; // rax long long v10; // rbp long long v11; // rax long long v12; // rdx long long v13; // rcx long long v14; // r12 long long v15; // r15 long long v16; // rax int v18[2]; // [rsp+10h] [rbp-68h] BYREF long long v19; // [rsp+18h] [rbp-60h] long long v20; // [rsp+20h] [rbp-58h] BYREF long long v21; // [rsp+30h] [rbp-48h] BYREF long long v22; // [rsp+38h] [rbp-40h] testing::GetReservedOutputAttributesForElement((long long)&v21, a2); v9 = std::__find_if<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,__gnu_cxx::__ops::_Iter_equals_val<std::string const>>( v21, v22, a3); if ( v9 == v22 ) { testing::internal::GTestLog::GTestLog( v18, 3, "/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc", 4653); std::__ostream_insert<char,std::char_traits<char>>( &std::cerr, "Condition std::find(allowed_names.begin(), allowed_names.end(), name) != allowed_names.end() failed. ", 101LL); std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "Key \"", 5LL); v10 = std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, *a3, a3[1]); std::__ostream_insert<char,std::char_traits<char>>(v10, "\" is not allowed for value \"", 28LL); v11 = std::__ostream_insert<char,std::char_traits<char>>(v10, *a2, a2[1]); std::__ostream_insert<char,std::char_traits<char>>(v11, "\".", 2LL); testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)v18, (long long)"\".", v12, v13); } v14 = std::__ostream_insert<char,std::char_traits<char>>(a1, *a5, a5[1]); std::__ostream_insert<char,std::char_traits<char>>(v14, "\"", 1LL); v15 = std::__ostream_insert<char,std::char_traits<char>>(v14, *a3, a3[1]); std::__ostream_insert<char,std::char_traits<char>>(v15, "\": \"", 4LL); testing::internal::JsonUnitTestResultPrinter::EscapeJson((long long)v18, a4); v16 = std::__ostream_insert<char,std::char_traits<char>>(v15, *(_QWORD *)v18, v19); std::__ostream_insert<char,std::char_traits<char>>(v16, "\"", 1LL); if ( *(long long **)v18 != &v20 ) operator delete(*(void **)v18, v20 + 1); if ( a6 ) std::__ostream_insert<char,std::char_traits<char>>(a1, ",\n", 2LL); std::vector<std::string>::~vector(&v21); }
OutputJsonKey: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV dword ptr [RSP + 0xc],R9D MOV R12,R8 MOV R14,RCX MOV R15,RDX MOV R13,RSI MOV RBX,RDI LEA RBP,[RSP + 0x30] MOV RDI,RBP CALL 0x00126444 MOV RDI,qword ptr [RBP] MOV RSI,qword ptr [RBP + 0x8] LAB_00129321: MOV RDX,R15 CALL 0x0013b4aa CMP RAX,qword ptr [RSP + 0x38] JNZ 0x001293d7 LAB_00129334: LEA RDX,[0x14270d] LEA RDI,[RSP + 0x10] MOV ESI,0x3 MOV ECX,0x122d CALL 0x00116e72 LAB_0012934f: MOV RDI,qword ptr [0x00158fe8] LEA RSI,[0x143400] MOV EDX,0x65 CALL 0x001085b0 MOV RDI,qword ptr [0x00158fe8] LEA RSI,[0x14364d] MOV EDX,0x5 CALL 0x001085b0 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] MOV RDI,qword ptr [0x00158fe8] CALL 0x001085b0 MOV RBP,RAX LEA RSI,[0x143653] MOV EDX,0x1c MOV RDI,RAX CALL 0x001085b0 MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] MOV RDI,RBP CALL 0x001085b0 LEA RSI,[0x143670] MOV EDX,0x2 MOV RDI,RAX CALL 0x001085b0 LEA RDI,[RSP + 0x10] CALL 0x00116fb4 LAB_001293d7: MOV RSI,qword ptr [R12] MOV RDX,qword ptr [R12 + 0x8] LAB_001293e0: MOV RDI,RBX CALL 0x001085b0 MOV R12,RAX LEA RSI,[0x1436eb] MOV EDX,0x1 MOV RDI,RAX CALL 0x001085b0 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] MOV RDI,R12 CALL 0x001085b0 MOV R15,RAX LEA RSI,[0x1436e8] MOV EDX,0x4 MOV RDI,RAX CALL 0x001085b0 LAB_00129425: LEA RDI,[RSP + 0x10] MOV RSI,R14 CALL 0x00129118 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] LAB_0012943c: MOV RDI,R15 CALL 0x001085b0 LEA RSI,[0x1436eb] MOV EDX,0x1 MOV RDI,RAX CALL 0x001085b0 LEA RAX,[RSP + 0x20] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00129473 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x001084e0 LAB_00129473: CMP byte ptr [RSP + 0xc],0x0 JZ 0x0012948e LAB_0012947a: LEA RSI,[0x1436c5] MOV EDX,0x2 MOV RDI,RBX CALL 0x001085b0 LAB_0012948e: LEA RDI,[RSP + 0x30] CALL 0x0013244c ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* testing::internal::JsonUnitTestResultPrinter::OutputJsonKey(std::ostream*, std::__cxx11::string const&, std::__cxx11::string const&, std::__cxx11::string const&, std::__cxx11::string const&, bool) */ void testing::internal::JsonUnitTestResultPrinter::OutputJsonKey (ostream *param_1,string *param_2,string *param_3,string *param_4,string *param_5, bool param_6) { long lVar1; ostream *poVar2; long *local_68; long local_60; long local_58 [2]; int8 local_48; long local_40; GetReservedOutputAttributesForElement((testing *)&local_48,param_2); /* try { // try from 00129321 to 00129328 has its CatchHandler @ 001294ab */ lVar1 = std:: __find_if<__gnu_cxx::__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,__gnu_cxx::__ops::_Iter_equals_val<std::__cxx11::string_const>> (local_48,local_40,param_3); if (lVar1 == local_40) { /* try { // try from 00129334 to 0012934e has its CatchHandler @ 001294a7 */ GTestLog::GTestLog((GTestLog *)&local_68,3, "/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc" ,0x122d); /* try { // try from 0012934f to 001293cc has its CatchHandler @ 001294cd */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cerr_00158fe8, "Condition std::find(allowed_names.begin(), allowed_names.end(), name) != allowed_names.end() failed. " ,0x65); std::__ostream_insert<char,std::char_traits<char>>((ostream *)PTR_cerr_00158fe8,"Key \"",5); poVar2 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cerr_00158fe8,*(char **)param_3,*(long *)(param_3 + 8)); std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\" is not allowed for value \"",0x1c) ; poVar2 = std::__ostream_insert<char,std::char_traits<char>> (poVar2,*(char **)param_2,*(long *)(param_2 + 8)); std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\".",2); GTestLog::~GTestLog((GTestLog *)&local_68); } /* try { // try from 001293e0 to 00129424 has its CatchHandler @ 001294dc */ poVar2 = std::__ostream_insert<char,std::char_traits<char>> (param_1,*(char **)param_5,*(long *)(param_5 + 8)); std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\"",1); poVar2 = std::__ostream_insert<char,std::char_traits<char>> (poVar2,*(char **)param_3,*(long *)(param_3 + 8)); std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\": \"",4); /* try { // try from 00129425 to 00129431 has its CatchHandler @ 001294a9 */ EscapeJson((JsonUnitTestResultPrinter *)&local_68,param_4); /* try { // try from 0012943c to 00129457 has its CatchHandler @ 001294ad */ poVar2 = std::__ostream_insert<char,std::char_traits<char>>(poVar2,(char *)local_68,local_60); std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\"",1); if (local_68 != local_58) { operator_delete(local_68,local_58[0] + 1); } if (param_6) { /* try { // try from 0012947a to 0012948d has its CatchHandler @ 001294dc */ std::__ostream_insert<char,std::char_traits<char>>(param_1,",\n",2); } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_48); return; }
13,127
void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, 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>::array_t&&)
monkey531[P]llama/common/json.hpp
static void construct(BasicJsonType& j, typename BasicJsonType::array_t&& arr) { j.m_data.m_value.destroy(j.m_data.m_type); j.m_data.m_type = value_t::array; j.m_data.m_value = std::move(arr); j.set_parents(); j.assert_invariant(); }
O1
cpp
void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, 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>::array_t&&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 addq $0x8, %rdi movzbl (%r14), %esi callq 0x5d8c0 movb $0x2, (%r14) movl $0x18, %edi callq 0x1b890 movups (%rbx), %xmm0 movups %xmm0, (%rax) movq 0x10(%rbx), %rcx movq %rcx, 0x10(%rax) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq $0x0, 0x10(%rbx) movq %rax, 0x8(%r14) movq %r14, %rdi movl $0x1, %esi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x57bfe nop
_ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE2EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_ONSJ_7array_tE: push r14 push rbx push rax mov rbx, rsi mov r14, rdi add rdi, 8 movzx esi, byte ptr [r14] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_value7destroyENS0_6detail7value_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::json_value::destroy(nlohmann::json_abi_v3_11_3::detail::value_t) mov byte ptr [r14], 2 mov edi, 18h; unsigned __int64 call __Znwm; operator new(ulong) movups xmm0, xmmword ptr [rbx] movups xmmword ptr [rax], xmm0 mov rcx, [rbx+10h] mov [rax+10h], rcx xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov qword ptr [rbx+10h], 0 mov [r14+8], rax mov rdi, r14 mov esi, 1 add rsp, 8 pop rbx pop r14 jmp _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)
long long nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<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>>( unsigned __int8 *a1, long long a2) { long long result; // rax nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::json_value::destroy( (long long **)a1 + 1, *a1); *a1 = 2; result = operator new(0x18uLL); *(_OWORD *)result = *(_OWORD *)a2; *(_QWORD *)(result + 16) = *(_QWORD *)(a2 + 16); *(_OWORD *)a2 = 0LL; *(_QWORD *)(a2 + 16) = 0LL; *((_QWORD *)a1 + 1) = result; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); return result; }
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI ADD RDI,0x8 MOVZX ESI,byte ptr [R14] CALL 0x0015d8c0 MOV byte ptr [R14],0x2 MOV EDI,0x18 CALL 0x0011b890 MOVUPS XMM0,xmmword ptr [RBX] MOVUPS xmmword ptr [RAX],XMM0 MOV RCX,qword ptr [RBX + 0x10] MOV qword ptr [RAX + 0x10],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBX + 0x10],0x0 MOV qword ptr [R14 + 0x8],RAX MOV RDI,R14 MOV ESI,0x1 ADD RSP,0x8 POP RBX POP R14 JMP 0x00157bfe
/* void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, 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>::array_t&&) */ void nlohmann::json_abi_v3_11_3::detail:: external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>:: construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (basic_json *param_1,array_t *param_2) { int8 uVar1; int8 *puVar2; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::json_value::destroy((json_value *)(param_1 + 8),*param_1); *param_1 = (basic_json)0x2; puVar2 = (int8 *)operator_new(0x18); uVar1 = *(int8 *)(param_2 + 8); *puVar2 = *(int8 *)param_2; puVar2[1] = uVar1; puVar2[2] = *(int8 *)(param_2 + 0x10); *(int8 *)param_2 = 0; *(int8 *)(param_2 + 8) = 0; *(int8 *)(param_2 + 0x10) = 0; *(int8 **)(param_1 + 8) = puVar2; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(param_1,0)); return; }
13,128
void cxxopts::values::integer_parser<unsigned long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long&)
zkingston[P]unknot/build_O0/_deps/cxxopts-src/include/cxxopts.hpp
void integer_parser(const std::string& text, T& value) { parser_tool::IntegerDesc int_desc = parser_tool::SplitInteger(text); using US = typename std::make_unsigned<T>::type; constexpr bool is_signed = std::numeric_limits<T>::is_signed; const bool negative = int_desc.negative.length() > 0; const uint8_t base = int_desc.base.length() > 0 ? 16 : 10; const std::string & value_match = int_desc.value; US result = 0; for (char ch : value_match) { US digit = 0; if (ch >= '0' && ch <= '9') { digit = static_cast<US>(ch - '0'); } else if (base == 16 && ch >= 'a' && ch <= 'f') { digit = static_cast<US>(ch - 'a' + 10); } else if (base == 16 && ch >= 'A' && ch <= 'F') { digit = static_cast<US>(ch - 'A' + 10); } else { throw_or_mimic<exceptions::incorrect_argument_type>(text); } US limit = 0; if (negative) { limit = static_cast<US>(std::abs(static_cast<intmax_t>(std::numeric_limits<T>::min()))); } else { limit = std::numeric_limits<T>::max(); } if (base != 0 && result > limit / base) { throw_or_mimic<exceptions::incorrect_argument_type>(text); } if (result * base > limit - digit) { throw_or_mimic<exceptions::incorrect_argument_type>(text); } result = static_cast<US>(result * base + digit); } detail::check_signed_range<T>(negative, result, text); if (negative) { checked_negate<T>(value, result, text, std::integral_constant<bool, is_signed>()); } else { value = static_cast<T>(result); } }
O0
cpp
void cxxopts::values::integer_parser<unsigned long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long&): subq $0xe8, %rsp movq %rdi, 0xe0(%rsp) movq %rsi, 0xd8(%rsp) movq 0xe0(%rsp), %rsi leaq 0x78(%rsp), %rdi callq 0x72970 movb $0x0, 0x77(%rsp) leaq 0x78(%rsp), %rdi callq 0x13200 cmpq $0x0, %rax seta %al andb $0x1, %al movb %al, 0x76(%rsp) leaq 0x78(%rsp), %rdi addq $0x20, %rdi callq 0x13200 movq %rax, %rdx movl $0xa, %eax movl $0x10, %ecx cmpq $0x0, %rdx cmoval %ecx, %eax movb %al, 0x75(%rsp) leaq 0x78(%rsp), %rax addq $0x40, %rax movq %rax, 0x68(%rsp) movq $0x0, 0x60(%rsp) movq 0x68(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x58(%rsp), %rdi callq 0x12bd0 movq %rax, 0x50(%rsp) movq 0x58(%rsp), %rdi callq 0x13620 movq %rax, 0x48(%rsp) leaq 0x50(%rsp), %rdi leaq 0x48(%rsp), %rsi callq 0x46730 testb $0x1, %al jne 0x72752 jmp 0x728f9 leaq 0x50(%rsp), %rdi callq 0x4a520 movb (%rax), %al movb %al, 0x47(%rsp) movq $0x0, 0x38(%rsp) movsbl 0x47(%rsp), %eax cmpl $0x30, %eax jl 0x72793 movsbl 0x47(%rsp), %eax cmpl $0x39, %eax jg 0x72793 movsbl 0x47(%rsp), %eax subl $0x30, %eax cltq movq %rax, 0x38(%rsp) jmp 0x72829 movzbl 0x75(%rsp), %eax cmpl $0x10, %eax jne 0x727c5 movsbl 0x47(%rsp), %eax cmpl $0x61, %eax jl 0x727c5 movsbl 0x47(%rsp), %eax cmpl $0x66, %eax jg 0x727c5 movsbl 0x47(%rsp), %eax subl $0x61, %eax addl $0xa, %eax cltq movq %rax, 0x38(%rsp) jmp 0x72827 movzbl 0x75(%rsp), %eax cmpl $0x10, %eax jne 0x727f7 movsbl 0x47(%rsp), %eax cmpl $0x41, %eax jl 0x727f7 movsbl 0x47(%rsp), %eax cmpl $0x46, %eax jg 0x727f7 movsbl 0x47(%rsp), %eax subl $0x41, %eax addl $0xa, %eax cltq movq %rax, 0x38(%rsp) jmp 0x72825 movq 0xe0(%rsp), %rdi callq 0x6fd30 jmp 0x72806 jmp 0x72825 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) leaq 0x78(%rsp), %rdi callq 0x72d60 jmp 0x7295c jmp 0x72827 jmp 0x72829 movq $0x0, 0x20(%rsp) testb $0x1, 0x76(%rsp) je 0x72859 callq 0x72cd0 movq %rax, %rdi callq 0x72cb0 movq %rax, 0x10(%rsp) jmp 0x7284d movq 0x10(%rsp), %rax movq %rax, 0x20(%rsp) jmp 0x72863 callq 0x72ce0 movq %rax, 0x20(%rsp) movzbl 0x75(%rsp), %eax cmpl $0x0, %eax je 0x728a4 movq 0x60(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x20(%rsp), %rax movzbl 0x75(%rsp), %ecx xorl %edx, %edx divq %rcx movq %rax, %rcx movq 0x8(%rsp), %rax cmpq %rcx, %rax jbe 0x728a4 movq 0xe0(%rsp), %rdi callq 0x6fd30 jmp 0x728a2 jmp 0x728a4 movq 0x60(%rsp), %rax movzbl 0x75(%rsp), %ecx imulq %rcx, %rax movq 0x20(%rsp), %rcx subq 0x38(%rsp), %rcx cmpq %rcx, %rax jbe 0x728d2 movq 0xe0(%rsp), %rdi callq 0x6fd30 jmp 0x728d0 jmp 0x728d2 movq 0x60(%rsp), %rax movzbl 0x75(%rsp), %ecx imulq %rcx, %rax addq 0x38(%rsp), %rax movq %rax, 0x60(%rsp) leaq 0x50(%rsp), %rdi callq 0x48050 jmp 0x7273a movq 0x60(%rsp), %rsi movq 0xe0(%rsp), %rdx movzbl 0x76(%rsp), %edi andl $0x1, %edi callq 0x72cf0 jmp 0x72915 testb $0x1, 0x76(%rsp) je 0x7293a movq 0xd8(%rsp), %rdi movq 0xe0(%rsp), %rdx leaq 0x60(%rsp), %rsi callq 0x72d30 jmp 0x72938 jmp 0x7294a movq 0x60(%rsp), %rcx movq 0xd8(%rsp), %rax movq %rcx, (%rax) leaq 0x78(%rsp), %rdi callq 0x72d60 addq $0xe8, %rsp retq movq 0x30(%rsp), %rdi callq 0x13540 nopw %cs:(%rax,%rax)
_ZN7cxxopts6values14integer_parserImEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERT_: sub rsp, 0E8h mov qword ptr [rsp+0E8h+var_8], rdi; int mov qword ptr [rsp+0E8h+var_10], rsi; int mov rsi, qword ptr [rsp+0E8h+var_8]; int lea rdi, [rsp+0E8h+var_70]; int call _ZN7cxxopts6values11parser_tool12SplitIntegerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; cxxopts::values::parser_tool::SplitInteger(std::string const&) mov [rsp+0E8h+var_71], 0 lea rdi, [rsp+0E8h+var_70] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void) cmp rax, 0 setnbe al and al, 1 mov [rsp+0E8h+var_72], al lea rdi, [rsp+0E8h+var_70] add rdi, 20h ; ' ' call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void) mov rdx, rax mov eax, 0Ah mov ecx, 10h cmp rdx, 0 cmova eax, ecx mov [rsp+0E8h+var_73], al lea rax, [rsp+0E8h+var_70] add rax, 40h ; '@' mov [rsp+0E8h+var_80], rax mov [rsp+0E8h+var_88], 0 mov rax, [rsp+0E8h+var_80] mov [rsp+0E8h+var_90], rax mov rdi, [rsp+0E8h+var_90] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void) mov [rsp+0E8h+var_98], rax mov rdi, [rsp+0E8h+var_90] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void) mov [rsp+0E8h+var_A0], rax loc_7273A: lea rdi, [rsp+0E8h+var_98] lea rsi, [rsp+0E8h+var_A0] call _ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_; __gnu_cxx::operator!=<char const*,std::string>(__gnu_cxx::__normal_iterator<char const*,std::string> const&,__gnu_cxx::__normal_iterator<char const*,std::string> const&) test al, 1 jnz short loc_72752 jmp loc_728F9 loc_72752: lea rdi, [rsp+0E8h+var_98] call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void) mov al, [rax] mov [rsp+0E8h+var_A1], al mov [rsp+0E8h+var_B0], 0 movsx eax, [rsp+0E8h+var_A1] cmp eax, 30h ; '0' jl short loc_72793 movsx eax, [rsp+0E8h+var_A1] cmp eax, 39h ; '9' jg short loc_72793 movsx eax, [rsp+0E8h+var_A1] sub eax, 30h ; '0' cdqe mov [rsp+0E8h+var_B0], rax jmp loc_72829 loc_72793: movzx eax, [rsp+0E8h+var_73] cmp eax, 10h jnz short loc_727C5 movsx eax, [rsp+0E8h+var_A1] cmp eax, 61h ; 'a' jl short loc_727C5 movsx eax, [rsp+0E8h+var_A1] cmp eax, 66h ; 'f' jg short loc_727C5 movsx eax, [rsp+0E8h+var_A1] sub eax, 61h ; 'a' add eax, 0Ah cdqe mov [rsp+0E8h+var_B0], rax jmp short loc_72827 loc_727C5: movzx eax, [rsp+0E8h+var_73] cmp eax, 10h jnz short loc_727F7 movsx eax, [rsp+0E8h+var_A1] cmp eax, 41h ; 'A' jl short loc_727F7 movsx eax, [rsp+0E8h+var_A1] cmp eax, 46h ; 'F' jg short loc_727F7 movsx eax, [rsp+0E8h+var_A1] sub eax, 41h ; 'A' add eax, 0Ah cdqe mov [rsp+0E8h+var_B0], rax jmp short loc_72825 loc_727F7: mov rdi, qword ptr [rsp+0E8h+var_8] call _ZN7cxxopts14throw_or_mimicINS_10exceptions23incorrect_argument_typeEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; cxxopts::throw_or_mimic<cxxopts::exceptions::incorrect_argument_type>(std::string const&) jmp short $+2 loc_72806: jmp short loc_72825 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax lea rdi, [rsp+arg_70]; this call _ZN7cxxopts6values11parser_tool11IntegerDescD2Ev; cxxopts::values::parser_tool::IntegerDesc::~IntegerDesc() jmp loc_7295C loc_72825: jmp short $+2 loc_72827: jmp short $+2 loc_72829: mov [rsp+0E8h+var_C8], 0 test [rsp+0E8h+var_72], 1 jz short loc_72859 call _ZNSt14numeric_limitsImE3minEv; std::numeric_limits<ulong>::min(void) mov rdi, rax; __int64 call _ZSt3absl; std::abs(long) mov [rsp+0E8h+var_D8], rax jmp short $+2 loc_7284D: mov rax, [rsp+0E8h+var_D8] mov [rsp+0E8h+var_C8], rax jmp short loc_72863 loc_72859: call _ZNSt14numeric_limitsImE3maxEv; std::numeric_limits<ulong>::max(void) mov [rsp+0E8h+var_C8], rax loc_72863: movzx eax, [rsp+0E8h+var_73] cmp eax, 0 jz short loc_728A4 mov rax, [rsp+0E8h+var_88] mov [rsp+0E8h+var_E0], rax mov rax, [rsp+0E8h+var_C8] movzx ecx, [rsp+0E8h+var_73] xor edx, edx div rcx mov rcx, rax mov rax, [rsp+0E8h+var_E0] cmp rax, rcx jbe short loc_728A4 mov rdi, qword ptr [rsp+0E8h+var_8] call _ZN7cxxopts14throw_or_mimicINS_10exceptions23incorrect_argument_typeEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; cxxopts::throw_or_mimic<cxxopts::exceptions::incorrect_argument_type>(std::string const&) jmp short $+2 loc_728A2: jmp short $+2 loc_728A4: mov rax, [rsp+0E8h+var_88] movzx ecx, [rsp+0E8h+var_73] imul rax, rcx mov rcx, [rsp+0E8h+var_C8] sub rcx, [rsp+0E8h+var_B0] cmp rax, rcx jbe short loc_728D2 mov rdi, qword ptr [rsp+0E8h+var_8] call _ZN7cxxopts14throw_or_mimicINS_10exceptions23incorrect_argument_typeEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; cxxopts::throw_or_mimic<cxxopts::exceptions::incorrect_argument_type>(std::string const&) jmp short $+2 loc_728D0: jmp short $+2 loc_728D2: mov rax, [rsp+0E8h+var_88] movzx ecx, [rsp+0E8h+var_73] imul rax, rcx add rax, [rsp+0E8h+var_B0] mov [rsp+0E8h+var_88], rax lea rdi, [rsp+0E8h+var_98] call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(void) jmp loc_7273A loc_728F9: mov rsi, [rsp+0E8h+var_88] mov rdx, qword ptr [rsp+0E8h+var_8] movzx edi, [rsp+0E8h+var_72] and edi, 1 call _ZN7cxxopts6values6detail18check_signed_rangeImmEEvbT0_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; cxxopts::values::detail::check_signed_range<ulong,ulong>(bool,ulong,std::string const&) jmp short $+2 loc_72915: test [rsp+0E8h+var_72], 1 jz short loc_7293A mov rdi, qword ptr [rsp+0E8h+var_10] mov rdx, qword ptr [rsp+0E8h+var_8] lea rsi, [rsp+0E8h+var_88] call _ZN7cxxopts6values14checked_negateImRmEEvRT_OT0_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt17integral_constantIbLb0EE; cxxopts::values::checked_negate<ulong,ulong &>(ulong &,ulong &,std::string const&,std::integral_constant<bool,false>) jmp short $+2 loc_72938: jmp short loc_7294A loc_7293A: mov rcx, [rsp+0E8h+var_88] mov rax, qword ptr [rsp+0E8h+var_10] mov [rax], rcx loc_7294A: lea rdi, [rsp+0E8h+var_70]; this call _ZN7cxxopts6values11parser_tool11IntegerDescD2Ev; cxxopts::values::parser_tool::IntegerDesc::~IntegerDesc() add rsp, 0E8h retn loc_7295C: mov rdi, [rsp+arg_28] call __Unwind_Resume
integer_parser<unsigned_long>: SUB RSP,0xe8 MOV qword ptr [RSP + 0xe0],RDI MOV qword ptr [RSP + 0xd8],RSI MOV RSI,qword ptr [RSP + 0xe0] LEA RDI,[RSP + 0x78] CALL 0x00172970 MOV byte ptr [RSP + 0x77],0x0 LEA RDI,[RSP + 0x78] CALL 0x00113200 CMP RAX,0x0 SETA AL AND AL,0x1 MOV byte ptr [RSP + 0x76],AL LEA RDI,[RSP + 0x78] ADD RDI,0x20 CALL 0x00113200 MOV RDX,RAX MOV EAX,0xa MOV ECX,0x10 CMP RDX,0x0 CMOVA EAX,ECX MOV byte ptr [RSP + 0x75],AL LEA RAX,[RSP + 0x78] ADD RAX,0x40 MOV qword ptr [RSP + 0x68],RAX MOV qword ptr [RSP + 0x60],0x0 MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x58],RAX MOV RDI,qword ptr [RSP + 0x58] CALL 0x00112bd0 MOV qword ptr [RSP + 0x50],RAX MOV RDI,qword ptr [RSP + 0x58] CALL 0x00113620 MOV qword ptr [RSP + 0x48],RAX LAB_0017273a: LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0x48] CALL 0x00146730 TEST AL,0x1 JNZ 0x00172752 JMP 0x001728f9 LAB_00172752: LEA RDI,[RSP + 0x50] CALL 0x0014a520 MOV AL,byte ptr [RAX] MOV byte ptr [RSP + 0x47],AL MOV qword ptr [RSP + 0x38],0x0 MOVSX EAX,byte ptr [RSP + 0x47] CMP EAX,0x30 JL 0x00172793 MOVSX EAX,byte ptr [RSP + 0x47] CMP EAX,0x39 JG 0x00172793 MOVSX EAX,byte ptr [RSP + 0x47] SUB EAX,0x30 CDQE MOV qword ptr [RSP + 0x38],RAX JMP 0x00172829 LAB_00172793: MOVZX EAX,byte ptr [RSP + 0x75] CMP EAX,0x10 JNZ 0x001727c5 MOVSX EAX,byte ptr [RSP + 0x47] CMP EAX,0x61 JL 0x001727c5 MOVSX EAX,byte ptr [RSP + 0x47] CMP EAX,0x66 JG 0x001727c5 MOVSX EAX,byte ptr [RSP + 0x47] SUB EAX,0x61 ADD EAX,0xa CDQE MOV qword ptr [RSP + 0x38],RAX JMP 0x00172827 LAB_001727c5: MOVZX EAX,byte ptr [RSP + 0x75] CMP EAX,0x10 JNZ 0x001727f7 MOVSX EAX,byte ptr [RSP + 0x47] CMP EAX,0x41 JL 0x001727f7 MOVSX EAX,byte ptr [RSP + 0x47] CMP EAX,0x46 JG 0x001727f7 MOVSX EAX,byte ptr [RSP + 0x47] SUB EAX,0x41 ADD EAX,0xa CDQE MOV qword ptr [RSP + 0x38],RAX JMP 0x00172825 LAB_001727f7: MOV RDI,qword ptr [RSP + 0xe0] LAB_001727ff: CALL 0x0016fd30 JMP 0x00172806 LAB_00172806: JMP 0x00172825 LAB_00172825: JMP 0x00172827 LAB_00172827: JMP 0x00172829 LAB_00172829: MOV qword ptr [RSP + 0x20],0x0 TEST byte ptr [RSP + 0x76],0x1 JZ 0x00172859 CALL 0x00172cd0 MOV RDI,RAX CALL 0x00172cb0 MOV qword ptr [RSP + 0x10],RAX JMP 0x0017284d LAB_0017284d: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x20],RAX JMP 0x00172863 LAB_00172859: CALL 0x00172ce0 MOV qword ptr [RSP + 0x20],RAX LAB_00172863: MOVZX EAX,byte ptr [RSP + 0x75] CMP EAX,0x0 JZ 0x001728a4 MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x20] MOVZX ECX,byte ptr [RSP + 0x75] XOR EDX,EDX DIV RCX MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] CMP RAX,RCX JBE 0x001728a4 MOV RDI,qword ptr [RSP + 0xe0] CALL 0x0016fd30 JMP 0x001728a2 LAB_001728a2: JMP 0x001728a4 LAB_001728a4: MOV RAX,qword ptr [RSP + 0x60] MOVZX ECX,byte ptr [RSP + 0x75] IMUL RAX,RCX MOV RCX,qword ptr [RSP + 0x20] SUB RCX,qword ptr [RSP + 0x38] CMP RAX,RCX JBE 0x001728d2 MOV RDI,qword ptr [RSP + 0xe0] CALL 0x0016fd30 JMP 0x001728d0 LAB_001728d0: JMP 0x001728d2 LAB_001728d2: MOV RAX,qword ptr [RSP + 0x60] MOVZX ECX,byte ptr [RSP + 0x75] IMUL RAX,RCX ADD RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x60],RAX LEA RDI,[RSP + 0x50] CALL 0x00148050 JMP 0x0017273a LAB_001728f9: MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0xe0] MOVZX EDI,byte ptr [RSP + 0x76] AND EDI,0x1 CALL 0x00172cf0 JMP 0x00172915 LAB_00172915: TEST byte ptr [RSP + 0x76],0x1 JZ 0x0017293a MOV RDI,qword ptr [RSP + 0xd8] MOV RDX,qword ptr [RSP + 0xe0] LEA RSI,[RSP + 0x60] CALL 0x00172d30 LAB_00172936: JMP 0x00172938 LAB_00172938: JMP 0x0017294a LAB_0017293a: MOV RCX,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RSP + 0xd8] MOV qword ptr [RAX],RCX LAB_0017294a: LEA RDI,[RSP + 0x78] CALL 0x00172d60 ADD RSP,0xe8 RET
/* void cxxopts::values::integer_parser<unsigned long>(std::__cxx11::string const&, unsigned long&) */ void cxxopts::values::integer_parser<unsigned_long>(string *param_1,ulong *param_2) { char cVar1; bool bVar2; long lVar3; char *pcVar4; ulong local_c8; long local_b0; int8 local_a0; int8 local_98; int1 *local_90; ulong local_88; int1 *local_80; byte local_73; byte local_72; int1 local_71; parser_tool local_70 [64]; int1 auStack_30 [32]; ulong *local_10; string *local_8; local_10 = param_2; local_8 = param_1; parser_tool::SplitInteger(local_70,param_1); local_71 = 0; lVar3 = std::__cxx11::string::length(); local_72 = lVar3 != 0; lVar3 = std::__cxx11::string::length(); local_73 = 10; if (lVar3 != 0) { local_73 = 0x10; } local_90 = auStack_30; local_88 = 0; local_80 = local_90; local_98 = std::__cxx11::string::begin(); local_a0 = std::__cxx11::string::end(); while (bVar2 = __gnu_cxx::operator!= ((__normal_iterator *)&local_98,(__normal_iterator *)&local_a0), bVar2) { pcVar4 = (char *)__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator* ((__normal_iterator<char_const*,std::__cxx11::string> *)&local_98); cVar1 = *pcVar4; local_b0 = 0; if ((cVar1 < '0') || ('9' < cVar1)) { if ((local_73 == 0x10) && (('`' < cVar1 && (cVar1 < 'g')))) { local_b0 = (long)(cVar1 + -0x57); } else if ((local_73 == 0x10) && (('@' < cVar1 && (cVar1 < 'G')))) { local_b0 = (long)(cVar1 + -0x37); } else { /* try { // try from 001727ff to 00172935 has its CatchHandler @ 00172808 */ throw_or_mimic<cxxopts::exceptions::incorrect_argument_type>(local_8); } } else { local_b0 = (long)(cVar1 + -0x30); } if ((local_72 & 1) == 0) { local_c8 = std::numeric_limits<unsigned_long>::max(); } else { lVar3 = std::numeric_limits<unsigned_long>::min(); local_c8 = std::abs(lVar3); } if ((local_73 != 0) && (local_c8 / local_73 < local_88)) { throw_or_mimic<cxxopts::exceptions::incorrect_argument_type>(local_8); } if (local_c8 - local_b0 <= local_88 * local_73 && local_88 * local_73 - (local_c8 - local_b0) != 0) { throw_or_mimic<cxxopts::exceptions::incorrect_argument_type>(local_8); } local_88 = local_88 * local_73 + local_b0; __gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator++ ((__normal_iterator<char_const*,std::__cxx11::string> *)&local_98); } detail::check_signed_range<unsigned_long,unsigned_long>((bool)(local_72 & 1),local_88,local_8); if ((local_72 & 1) == 0) { *local_10 = local_88; } else { checked_negate<unsigned_long,unsigned_long&>(local_10,&local_88,local_8); } parser_tool::IntegerDesc::~IntegerDesc((IntegerDesc *)local_70); return; }
13,129
my_strnxfrm_tis620
eloqsql/strings/ctype-tis620.c
static size_t my_strnxfrm_tis620(CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { size_t len, dstlen0= dstlen; len= MY_MIN(dstlen, srclen); memcpy(dst, src, len); len= thai2sortable(dst, len); set_if_smaller(dstlen, nweights); set_if_smaller(len, dstlen); len= my_strxfrm_pad_desc_and_reverse(cs, dst, dst + len, dst + dstlen, (uint)(dstlen - len), flags, 0); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len < dstlen0) { size_t fill_length= dstlen0 - len; my_ci_fill(cs, (char*) dst + len, fill_length, cs->pad_char); len= dstlen0; } return len; }
O3
c
my_strnxfrm_tis620: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %r13 movl %ecx, %r12d movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 cmpq %r9, %rdx cmovbq %rdx, %r13 movq %rsi, %rdi movq %r8, %rsi movq %r13, %rdx callq 0x24290 movq %r14, %rdi movq %r13, %rsi callq 0x3b45b movl %r12d, %r8d cmpq %rbx, %r8 cmovaeq %rbx, %r8 cmpq %r8, %r13 cmovaeq %r8, %r13 leaq (%r14,%r13), %rdx leaq (%r14,%r8), %rcx subl %r13d, %r8d movl $0x0, (%rsp) movq %r15, %rdi movq %r14, %rsi movl 0x10(%rbp), %r12d movl %r12d, %r9d callq 0x381c4 testb %r12b, %r12b jns 0x3b44c movq %rbx, %rdx subq %rax, %rdx jbe 0x3b44c addq %rax, %r14 movzbl 0xb0(%r15), %ecx movq 0xb8(%r15), %rax movq %r15, %rdi movq %r14, %rsi callq *0x78(%rax) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strnxfrm_tis620: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r13, r9 mov r12d, ecx mov rbx, rdx mov r14, rsi mov r15, rdi cmp rdx, r9 cmovb r13, rdx mov rdi, rsi mov rsi, r8 mov rdx, r13 call _memcpy mov rdi, r14 mov rsi, r13 call thai2sortable mov r8d, r12d cmp r8, rbx cmovnb r8, rbx cmp r13, r8 cmovnb r13, r8 lea rdx, [r14+r13] lea rcx, [r14+r8] sub r8d, r13d mov [rsp+30h+var_30], 0 mov rdi, r15 mov rsi, r14 mov r12d, [rbp+arg_0] mov r9d, r12d call my_strxfrm_pad_desc_and_reverse test r12b, r12b jns short loc_3B44C mov rdx, rbx sub rdx, rax jbe short loc_3B44C add r14, rax movzx ecx, byte ptr [r15+0B0h] mov rax, [r15+0B8h] mov rdi, r15 mov rsi, r14 call qword ptr [rax+78h] mov rax, rbx loc_3B44C: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long my_strnxfrm_tis620( long long a1, long long a2, unsigned long long a3, unsigned int a4, long long a5, unsigned long long a6, unsigned int a7) { unsigned long long v7; // r13 unsigned long long v10; // r8 unsigned long long result; // rax v7 = a6; if ( a3 < a6 ) v7 = a3; memcpy(a2, a5, v7); thai2sortable(a2, v7); v10 = a4; if ( a4 >= a3 ) v10 = a3; if ( v7 >= v10 ) v7 = v10; result = my_strxfrm_pad_desc_and_reverse(a1, a2, a2 + v7, a2 + v10, (int)v10 - (int)v7, a7, 0); if ( (a7 & 0x80u) != 0 && a3 > result ) { (*(void ( **)(long long, unsigned long long, unsigned long long, _QWORD))(*(_QWORD *)(a1 + 184) + 120LL))( a1, result + a2, a3 - result, *(unsigned __int8 *)(a1 + 176)); return a3; } return result; }
my_strnxfrm_tis620: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R13,R9 MOV R12D,ECX MOV RBX,RDX MOV R14,RSI MOV R15,RDI CMP RDX,R9 CMOVC R13,RDX MOV RDI,RSI MOV RSI,R8 MOV RDX,R13 CALL 0x00124290 MOV RDI,R14 MOV RSI,R13 CALL 0x0013b45b MOV R8D,R12D CMP R8,RBX CMOVNC R8,RBX CMP R13,R8 CMOVNC R13,R8 LEA RDX,[R14 + R13*0x1] LEA RCX,[R14 + R8*0x1] SUB R8D,R13D MOV dword ptr [RSP],0x0 MOV RDI,R15 MOV RSI,R14 MOV R12D,dword ptr [RBP + 0x10] MOV R9D,R12D CALL 0x001381c4 TEST R12B,R12B JNS 0x0013b44c MOV RDX,RBX SUB RDX,RAX JBE 0x0013b44c ADD R14,RAX MOVZX ECX,byte ptr [R15 + 0xb0] MOV RAX,qword ptr [R15 + 0xb8] MOV RDI,R15 MOV RSI,R14 CALL qword ptr [RAX + 0x78] MOV RAX,RBX LAB_0013b44c: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong my_strnxfrm_tis620(long param_1,void *param_2,ulong param_3,uint param_4,void *param_5, ulong param_6,int4 param_7) { int8 in_RAX; ulong uVar1; uint uVar2; uVar2 = (uint)((ulong)in_RAX >> 0x20); if (param_3 < param_6) { param_6 = param_3; } memcpy(param_2,param_5,param_6); thai2sortable(param_2,param_6); uVar1 = (ulong)param_4; if (param_3 <= param_4) { uVar1 = param_3; } if (uVar1 <= param_6) { param_6 = uVar1; } uVar1 = my_strxfrm_pad_desc_and_reverse (param_1,param_2,(long)param_2 + param_6,(long)param_2 + uVar1, (int)uVar1 - (int)param_6,param_7,(ulong)uVar2 << 0x20); if (((char)param_7 < '\0') && (uVar1 <= param_3 && param_3 - uVar1 != 0)) { (**(code **)(*(long *)(param_1 + 0xb8) + 0x78)) (param_1,(long)param_2 + uVar1,param_3 - uVar1,*(int1 *)(param_1 + 0xb0)); uVar1 = param_3; } return uVar1; }
13,130
testing::AssertionResult testing::internal::FloatingPointLE<float>(char const*, char const*, float, float)
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest.cc
AssertionResult FloatingPointLE(const char* expr1, const char* expr2, RawType val1, RawType val2) { // Returns success if val1 is less than val2, if (val1 < val2) { return AssertionSuccess(); } // or if val1 is almost equal to val2. const FloatingPoint<RawType> lhs(val1), rhs(val2); if (lhs.AlmostEquals(rhs)) { return AssertionSuccess(); } // Note that the above two checks will both fail if either val1 or // val2 is NaN, as the IEEE floating-point standard requires that // any predicate involving a NaN must return false. ::std::stringstream val1_ss; val1_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2) << val1; ::std::stringstream val2_ss; val2_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2) << val2; return AssertionFailure() << "Expected: (" << expr1 << ") <= (" << expr2 << ")\n" << " Actual: " << StringStreamToString(&val1_ss) << " vs " << StringStreamToString(&val2_ss); }
O3
cpp
testing::AssertionResult testing::internal::FloatingPointLE<float>(char const*, char const*, float, float): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x380, %rsp # imm = 0x380 movq %rdi, %rbx movq %rsi, 0x20(%rsp) movq %rdx, 0x18(%rsp) ucomiss %xmm0, %xmm1 ja 0x33316 leaq 0x2c(%rsp), %rdi movss %xmm0, 0x4(%rsp) movss %xmm0, (%rdi) leaq 0x28(%rsp), %rsi movss %xmm1, (%rsp) movss %xmm1, (%rsi) callq 0x3aa7c testb %al, %al je 0x33326 movb $0x1, (%rbx) movq $0x0, 0x8(%rbx) jmp 0x334d9 leaq 0x1f8(%rsp), %rdi callq 0x8340 leaq 0x208(%rsp), %rdi movq (%rdi), %rax movq -0x18(%rax), %rax movq $0x8, 0x210(%rsp,%rax) xorps %xmm0, %xmm0 cvtss2sd 0x4(%rsp), %xmm0 callq 0x88f0 leaq 0x70(%rsp), %rdi callq 0x8340 leaq 0x80(%rsp), %rdi movq (%rdi), %rax movq -0x18(%rax), %rax movq $0x8, 0x88(%rsp,%rax) xorps %xmm0, %xmm0 cvtss2sd (%rsp), %xmm0 callq 0x88f0 leaq 0x10(%rsp), %r14 movb $0x0, -0x8(%r14) movq $0x0, (%r14) leaq 0xd293(%rip), %rsi # 0x40639 leaq 0x8(%rsp), %rdi callq 0xe358 leaq 0x20(%rsp), %rsi movq %rax, %rdi callq 0xe3d6 leaq 0x113b8(%rip), %rsi # 0x4477c movq %rax, %rdi callq 0x331d2 leaq 0x18(%rsp), %rsi movq %rax, %rdi callq 0xe3d6 leaq 0xff81(%rip), %rsi # 0x43361 movq %rax, %rdi callq 0xe466 leaq 0xf830(%rip), %rsi # 0x42c1f movq %rax, %rdi callq 0x36b88 movq %rax, %r12 leaq 0x50(%rsp), %rdi leaq 0x1f8(%rsp), %r15 movq %r15, %rsi callq 0x1cbbf leaq 0x50(%rsp), %rsi movq %r12, %rdi callq 0xe4e4 leaq 0xd231(%rip), %rsi # 0x40654 movq %rax, %rdi callq 0xe558 movq %rax, %r13 leaq 0x30(%rsp), %rdi leaq 0x70(%rsp), %r12 movq %r12, %rsi callq 0x1cbbf leaq 0x30(%rsp), %rsi movq %r13, %rdi callq 0xe4e4 movq %rbx, %rdi movq %rax, %rsi callq 0xece8 leaq 0x40(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x33473 movq 0x40(%rsp), %rsi incq %rsi callq 0x84e0 leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3348e movq 0x60(%rsp), %rsi incq %rsi callq 0x84e0 movq 0x10(%rsp), %rsi testq %rsi, %rsi je 0x334a0 movq %r14, %rdi callq 0xdb84 movq 0x25ae9(%rip), %r14 # 0x58f90 movq %r12, %rdi movq %r14, %rsi callq 0x8390 movl $0x80, %r13d addq %r13, %r12 movq %r12, %rdi callq 0x8190 movq %r15, %rdi movq %r14, %rsi callq 0x8390 addq %r13, %r15 movq %r15, %rdi callq 0x8190 movq %rbx, %rax addq $0x380, %rsp # imm = 0x380 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq jmp 0x3351d jmp 0x3353d movq %rax, %rbx jmp 0x33552 jmp 0x334f8 movq %rax, %rbx jmp 0x33570 movq %rax, %rbx leaq 0x40(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x33520 movq 0x40(%rsp), %rsi incq %rsi callq 0x84e0 jmp 0x33520 movq %rax, %rbx leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x33540 movq 0x60(%rsp), %rsi incq %rsi callq 0x84e0 jmp 0x33540 movq %rax, %rbx movq 0x10(%rsp), %rsi testq %rsi, %rsi je 0x33552 movq %r14, %rdi callq 0xdb84 movq 0x25a37(%rip), %rsi # 0x58f90 leaq 0x70(%rsp), %rdi callq 0x8390 leaq 0xf0(%rsp), %rdi callq 0x8190 movq 0x25a19(%rip), %rsi # 0x58f90 leaq 0x1f8(%rsp), %rdi callq 0x8390 leaq 0x278(%rsp), %rdi callq 0x8190 movq %rbx, %rdi callq 0x8990
_ZN7testing8internal15FloatingPointLEIfEENS_15AssertionResultEPKcS4_T_S5_: push r15 push r14 push r13 push r12 push rbx sub rsp, 380h mov rbx, rdi mov [rsp+3A8h+var_388], rsi mov [rsp+3A8h+var_390], rdx ucomiss xmm1, xmm0 ja short loc_33316 lea rdi, [rsp+3A8h+var_37C] movss dword ptr [rsp+3A8h+var_3A8+4], xmm0 movss dword ptr [rdi], xmm0 lea rsi, [rsp+3A8h+var_380] movss dword ptr [rsp+3A8h+var_3A8], xmm1; __int64 movss dword ptr [rsi], xmm1 call _ZNK7testing8internal13FloatingPointIfE12AlmostEqualsERKS2_; testing::internal::FloatingPoint<float>::AlmostEquals(testing::internal::FloatingPoint<float> const&) test al, al jz short loc_33326 loc_33316: mov byte ptr [rbx], 1 mov qword ptr [rbx+8], 0 jmp loc_334D9 loc_33326: lea rdi, [rsp+3A8h+var_1B0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea rdi, [rsp+3A8h+var_1A0] mov rax, [rdi] mov rax, [rax-18h] mov [rsp+rax+3A8h+var_198], 8 xorps xmm0, xmm0 cvtss2sd xmm0, dword ptr [rsp+3A8h+var_3A8+4] call __ZNSo9_M_insertIdEERSoT_; std::ostream::_M_insert<double>(double) lea rdi, [rsp+3A8h+var_338] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea rdi, [rsp+3A8h+var_328] mov rax, [rdi] mov rax, [rax-18h] mov [rsp+rax+3A8h+var_320], 8 xorps xmm0, xmm0 cvtss2sd xmm0, dword ptr [rsp+3A8h+var_3A8] call __ZNSo9_M_insertIdEERSoT_; std::ostream::_M_insert<double>(double) lea r14, [rsp+3A8h+var_398] mov byte ptr [r14-8], 0 mov qword ptr [r14], 0 lea rsi, aExpected; "Expected: (" lea rdi, [rsp+3A8h+var_3A0]; this call _ZN7testing15AssertionResultlsIA12_cEERS0_RKT_; testing::AssertionResult::operator<<<char [12]>(char [12] const&) lea rsi, [rsp+3A8h+var_388] mov rdi, rax; this call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&) lea rsi, asc_4477C; ") <= (" mov rdi, rax; this call _ZN7testing15AssertionResultlsIA7_cEERS0_RKT_; testing::AssertionResult::operator<<<char [7]>(char [7] const&) lea rsi, [rsp+3A8h+var_390] mov rdi, rax; this call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&) lea rsi, aSMs+7; ")\n" mov rdi, rax; this call _ZN7testing15AssertionResultlsIA3_cEERS0_RKT_; testing::AssertionResult::operator<<<char [3]>(char [3] const&) lea rsi, aActual_0+1; " Actual: " mov rdi, rax; this call _ZN7testing15AssertionResultlsIA11_cEERS0_RKT_; testing::AssertionResult::operator<<<char [11]>(char [11] const&) mov r12, rax lea rdi, [rsp+3A8h+var_358] lea r15, [rsp+3A8h+var_1B0] mov rsi, r15 call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *) lea rsi, [rsp+3A8h+var_358] mov rdi, r12; this call _ZN7testing15AssertionResultlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::AssertionResult::operator<<<std::string>(std::string const&) lea rsi, aVs; " vs " mov rdi, rax; this call _ZN7testing15AssertionResultlsIA5_cEERS0_RKT_; testing::AssertionResult::operator<<<char [5]>(char [5] const&) mov r13, rax lea rdi, [rsp+3A8h+var_378] lea r12, [rsp+3A8h+var_338] mov rsi, r12 call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *) lea rsi, [rsp+3A8h+var_378] mov rdi, r13; this call _ZN7testing15AssertionResultlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::AssertionResult::operator<<<std::string>(std::string const&) mov rdi, rbx mov rsi, rax call _ZN7testing15AssertionResultC2ERKS0_; testing::AssertionResult::AssertionResult(testing::AssertionResult const&) lea rax, [rsp+3A8h+var_368] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_33473 mov rsi, [rsp+3A8h+var_368] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_33473: lea rax, [rsp+3A8h+var_348] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_3348E mov rsi, [rsp+3A8h+var_348] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3348E: mov rsi, [rsp+3A8h+var_398] test rsi, rsi jz short loc_334A0 mov rdi, r14 call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) loc_334A0: mov r14, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr mov rdi, r12 mov rsi, r14 call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov r13d, 80h add r12, r13 mov rdi, r12; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, r15 mov rsi, r14 call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() add r15, r13 mov rdi, r15; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_334D9: mov rax, rbx add rsp, 380h pop rbx pop r12 pop r13 pop r14 pop r15 retn jmp short loc_3351D jmp short loc_3353D mov rbx, rax jmp short loc_33552 jmp short $+2 loc_334F8: mov rbx, rax jmp short loc_33570 mov rbx, rax lea rax, [rsp+arg_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_33520 mov rsi, [rsp+arg_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_33520 loc_3351D: mov rbx, rax loc_33520: lea rax, [rsp+arg_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_33540 mov rsi, [rsp+arg_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_33540 loc_3353D: mov rbx, rax loc_33540: mov rsi, [rsp+arg_8] test rsi, rsi jz short loc_33552 mov rdi, r14 call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) loc_33552: mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_68] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+arg_E8]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_33570: mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_1F0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+arg_270]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
testing::AssertionResult * testing::internal::FloatingPointLE<float>( testing::AssertionResult *a1, const char *a2, const char *a3, float a4, float a5) { testing::AssertionResult *v5; // rax testing::AssertionResult *v6; // rax testing::AssertionResult *v7; // rax testing::AssertionResult *v8; // rax testing::AssertionResult *v9; // rax testing::AssertionResult *v10; // r12 testing::AssertionResult *v11; // rax testing::AssertionResult *v12; // r13 testing::AssertionResult *v13; // rax _BYTE v15[8]; // [rsp+8h] [rbp-3A0h] BYREF long long v16; // [rsp+10h] [rbp-398h] BYREF const char *v17; // [rsp+18h] [rbp-390h] BYREF const char *v18; // [rsp+20h] [rbp-388h] BYREF float v19; // [rsp+28h] [rbp-380h] float v20; // [rsp+2Ch] [rbp-37Ch] void *v21[2]; // [rsp+30h] [rbp-378h] BYREF long long v22; // [rsp+40h] [rbp-368h] BYREF void *v23[2]; // [rsp+50h] [rbp-358h] BYREF long long v24; // [rsp+60h] [rbp-348h] BYREF _BYTE v25[16]; // [rsp+70h] [rbp-338h] BYREF _QWORD v26[14]; // [rsp+80h] [rbp-328h] BYREF long long v27; // [rsp+F0h] [rbp-2B8h] BYREF _BYTE v28[16]; // [rsp+1F8h] [rbp-1B0h] BYREF _QWORD v29[14]; // [rsp+208h] [rbp-1A0h] BYREF long long v30; // [rsp+278h] [rbp-130h] BYREF v18 = a2; v17 = a3; if ( a5 > a4 || (v20 = a4, v19 = a5, (unsigned __int8)testing::internal::FloatingPoint<float>::AlmostEquals()) ) { *(_BYTE *)a1 = 1; *((_QWORD *)a1 + 1) = 0LL; } else { std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v28); *(_QWORD *)((char *)&v29[1] + *(_QWORD *)(v29[0] - 24LL)) = 8LL; std::ostream::_M_insert<double>(v29, a4); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v25); *(_QWORD *)((char *)&v26[1] + *(_QWORD *)(v26[0] - 24LL)) = 8LL; std::ostream::_M_insert<double>(v26, a5); v15[0] = 0; v16 = 0LL; v5 = testing::AssertionResult::operator<<<char [12]>((testing::AssertionResult *)v15, (long long)"Expected: ("); v6 = testing::AssertionResult::operator<<<char const*>(v5, &v18); v7 = testing::AssertionResult::operator<<<char [7]>(v6, (long long)") <= ("); v8 = testing::AssertionResult::operator<<<char const*>(v7, &v17); v9 = testing::AssertionResult::operator<<<char [3]>(v8, (long long)")\n"); v10 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [11]>( v9, __SPAIR64__(LODWORD(a4), LODWORD(a5))); testing::internal::StringStreamToString((long long)v23, (long long)v28); v11 = testing::AssertionResult::operator<<<std::string>(v10, v23); v12 = testing::AssertionResult::operator<<<char [5]>(v11, (long long)" vs "); testing::internal::StringStreamToString((long long)v21, (long long)v25); v13 = testing::AssertionResult::operator<<<std::string>(v12, v21); testing::AssertionResult::AssertionResult(a1, v13); if ( v21[0] != &v22 ) operator delete(v21[0], v22 + 1); if ( v23[0] != &v24 ) operator delete(v23[0], v24 + 1); if ( v16 ) std::default_delete<std::string>::operator()((long long)&v16, v16); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream( v25, &`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>); std::ios_base::~ios_base((std::ios_base *)&v27); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream( v28, &`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>); std::ios_base::~ios_base((std::ios_base *)&v30); } return a1; }
FloatingPointLE<float>: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x380 MOV RBX,RDI MOV qword ptr [RSP + 0x20],RSI MOV qword ptr [RSP + 0x18],RDX UCOMISS XMM1,XMM0 JA 0x00133316 LEA RDI,[RSP + 0x2c] MOVSS dword ptr [RSP + 0x4],XMM0 MOVSS dword ptr [RDI],XMM0 LEA RSI,[RSP + 0x28] MOVSS dword ptr [RSP],XMM1 MOVSS dword ptr [RSI],XMM1 CALL 0x0013aa7c TEST AL,AL JZ 0x00133326 LAB_00133316: MOV byte ptr [RBX],0x1 MOV qword ptr [RBX + 0x8],0x0 JMP 0x001334d9 LAB_00133326: LEA RDI,[RSP + 0x1f8] CALL 0x00108340 LEA RDI,[RSP + 0x208] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + -0x18] MOV qword ptr [RSP + RAX*0x1 + 0x210],0x8 XORPS XMM0,XMM0 CVTSS2SD XMM0,dword ptr [RSP + 0x4] LAB_00133357: CALL 0x001088f0 LAB_0013335c: LEA RDI,[RSP + 0x70] CALL 0x00108340 LEA RDI,[RSP + 0x80] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + -0x18] MOV qword ptr [RSP + RAX*0x1 + 0x88],0x8 XORPS XMM0,XMM0 CVTSS2SD XMM0,dword ptr [RSP] LAB_00133389: CALL 0x001088f0 LEA R14,[RSP + 0x10] MOV byte ptr [R14 + -0x8],0x0 MOV qword ptr [R14],0x0 LAB_0013339f: LEA RSI,[0x140639] LEA RDI,[RSP + 0x8] CALL 0x0010e358 LEA RSI,[RSP + 0x20] MOV RDI,RAX CALL 0x0010e3d6 LEA RSI,[0x14477c] MOV RDI,RAX CALL 0x001331d2 LEA RSI,[RSP + 0x18] MOV RDI,RAX CALL 0x0010e3d6 LEA RSI,[0x143361] MOV RDI,RAX CALL 0x0010e466 LEA RSI,[0x142c1f] MOV RDI,RAX CALL 0x00136b88 LAB_001333f7: MOV R12,RAX LEA RDI,[RSP + 0x50] LEA R15,[RSP + 0x1f8] MOV RSI,R15 CALL 0x0011cbbf LAB_0013340f: LEA RSI,[RSP + 0x50] MOV RDI,R12 CALL 0x0010e4e4 LEA RSI,[0x140654] MOV RDI,RAX CALL 0x0010e558 LAB_0013342b: MOV R13,RAX LEA RDI,[RSP + 0x30] LEA R12,[RSP + 0x70] MOV RSI,R12 CALL 0x0011cbbf LAB_00133440: LEA RSI,[RSP + 0x30] MOV RDI,R13 CALL 0x0010e4e4 MOV RDI,RBX MOV RSI,RAX CALL 0x0010ece8 LAB_00133458: LEA RAX,[RSP + 0x40] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00133473 MOV RSI,qword ptr [RSP + 0x40] INC RSI CALL 0x001084e0 LAB_00133473: LEA RAX,[RSP + 0x60] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0013348e MOV RSI,qword ptr [RSP + 0x60] INC RSI CALL 0x001084e0 LAB_0013348e: MOV RSI,qword ptr [RSP + 0x10] TEST RSI,RSI JZ 0x001334a0 MOV RDI,R14 CALL 0x0010db84 LAB_001334a0: MOV R14,qword ptr [0x00158f90] MOV RDI,R12 MOV RSI,R14 CALL 0x00108390 MOV R13D,0x80 ADD R12,R13 MOV RDI,R12 CALL 0x00108190 MOV RDI,R15 MOV RSI,R14 CALL 0x00108390 ADD R15,R13 MOV RDI,R15 CALL 0x00108190 LAB_001334d9: MOV RAX,RBX ADD RSP,0x380 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* testing::AssertionResult testing::internal::FloatingPointLE<float>(char const*, char const*, float, float) */ internal * __thiscall testing::internal::FloatingPointLE<float> (internal *this,char *param_1,char *param_2,float param_3,float param_4) { char cVar1; AssertionResult *pAVar2; AssertionResult local_3a0 [8]; string *local_398; char *local_390; char *local_388; float local_380; float local_37c; long *local_378 [2]; long local_368 [2]; long *local_358 [2]; long local_348 [2]; stringstream local_338 [16]; long local_328; int8 auStack_320 [13]; ios_base aiStack_2b8 [264]; stringstream local_1b0 [16]; long local_1a0; int8 auStack_198 [13]; ios_base aiStack_130 [264]; if ((param_4 <= param_3) && (local_390 = param_2, local_388 = param_1, local_380 = param_4, local_37c = param_3, cVar1 = FloatingPoint<float>::AlmostEquals ((FloatingPoint<float> *)&local_37c,(FloatingPoint *)&local_380), cVar1 == '\0')) { std::__cxx11::stringstream::stringstream(local_1b0); *(int8 *)((long)auStack_198 + *(long *)(local_1a0 + -0x18)) = 8; /* try { // try from 00133357 to 0013335b has its CatchHandler @ 001334f8 */ std::ostream::_M_insert<double>((double)param_3); /* try { // try from 0013335c to 00133365 has its CatchHandler @ 001334f6 */ std::__cxx11::stringstream::stringstream(local_338); *(int8 *)((long)auStack_320 + *(long *)(local_328 + -0x18)) = 8; /* try { // try from 00133389 to 0013338d has its CatchHandler @ 001334f1 */ std::ostream::_M_insert<double>((double)param_4); local_3a0[0] = (AssertionResult)0x0; local_398 = (string *)0x0; /* try { // try from 0013339f to 001333f6 has its CatchHandler @ 0013353d */ pAVar2 = (AssertionResult *)AssertionResult::operator<<(local_3a0,"Expected: ("); pAVar2 = AssertionResult::operator<<(pAVar2,&local_388); pAVar2 = AssertionResult::operator<<(pAVar2,") <= ("); pAVar2 = AssertionResult::operator<<(pAVar2,&local_390); pAVar2 = AssertionResult::operator<<(pAVar2,")\n"); pAVar2 = AssertionResult::operator<<(pAVar2," Actual: "); /* try { // try from 001333f7 to 0013340e has its CatchHandler @ 001334ef */ StringStreamToString((stringstream *)local_358); /* try { // try from 0013340f to 0013342a has its CatchHandler @ 0013351d */ pAVar2 = AssertionResult::operator<<(pAVar2,(string *)local_358); pAVar2 = AssertionResult::operator<<(pAVar2," vs "); /* try { // try from 0013342b to 0013343f has its CatchHandler @ 001334ed */ StringStreamToString((stringstream *)local_378); /* try { // try from 00133440 to 00133457 has its CatchHandler @ 001334fd */ pAVar2 = AssertionResult::operator<<(pAVar2,(string *)local_378); AssertionResult::AssertionResult((AssertionResult *)this,pAVar2); if (local_378[0] != local_368) { operator_delete(local_378[0],local_368[0] + 1); } if (local_358[0] != local_348) { operator_delete(local_358[0],local_348[0] + 1); } if (local_398 != (string *)0x0) { std::default_delete<std::__cxx11::string>::operator() ((default_delete<std::__cxx11::string> *)&local_398,local_398); } std::__cxx11::stringstream::~stringstream(local_338); std::ios_base::~ios_base(aiStack_2b8); std::__cxx11::stringstream::~stringstream(local_1b0); std::ios_base::~ios_base(aiStack_130); return this; } *this = (internal)0x1; *(int8 *)(this + 8) = 0; return this; }
13,131
linenoiseEditDelete(linenoiseState*)
ericcurtin[P]linenoise/linenoise.cpp
static void linenoiseEditDelete(struct linenoiseState * l) { if (l->len > 0 && l->pos < l->len) { int chlen = nextCharLen(l->buf, l->len, l->pos, NULL); memmove(l->buf + l->pos, l->buf + l->pos + chlen, l->len - l->pos - chlen); l->len -= chlen; l->buf[l->len] = '\0'; refreshLine(l); } }
O0
cpp
linenoiseEditDelete(linenoiseState*): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x48(%rax) jbe 0x674a movq -0x8(%rbp), %rax movq 0x38(%rax), %rax movq -0x8(%rbp), %rcx cmpq 0x48(%rcx), %rax jae 0x674a movq 0x9ba8(%rip), %rax # 0x10260 movq -0x8(%rbp), %rcx movq 0x18(%rcx), %rdi movq -0x8(%rbp), %rcx movq 0x48(%rcx), %rsi movq -0x8(%rbp), %rcx movq 0x38(%rcx), %rdx xorl %ecx, %ecx callq *%rax movl %eax, -0xc(%rbp) movq -0x8(%rbp), %rax movq 0x18(%rax), %rdi movq -0x8(%rbp), %rax addq 0x38(%rax), %rdi movq -0x8(%rbp), %rax movq 0x18(%rax), %rsi movq -0x8(%rbp), %rax addq 0x38(%rax), %rsi movslq -0xc(%rbp), %rax addq %rax, %rsi movq -0x8(%rbp), %rax movq 0x48(%rax), %rdx movq -0x8(%rbp), %rax subq 0x38(%rax), %rdx movslq -0xc(%rbp), %rax subq %rax, %rdx callq 0x2390 movslq -0xc(%rbp), %rdx movq -0x8(%rbp), %rax movq 0x48(%rax), %rcx subq %rdx, %rcx movq %rcx, 0x48(%rax) movq -0x8(%rbp), %rax movq 0x18(%rax), %rax movq -0x8(%rbp), %rcx movq 0x48(%rcx), %rcx movb $0x0, (%rax,%rcx) movq -0x8(%rbp), %rdi callq 0x5bb0 addq $0x10, %rsp popq %rbp retq
_ZL19linenoiseEditDeleteP14linenoiseState: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+48h], 0 jbe loc_674A mov rax, [rbp+var_8] mov rax, [rax+38h] mov rcx, [rbp+var_8] cmp rax, [rcx+48h] jnb loc_674A mov rax, cs:_ZL11nextCharLen; nextCharLen mov rcx, [rbp+var_8] mov rdi, [rcx+18h]; char * mov rcx, [rbp+var_8] mov rsi, [rcx+48h]; unsigned __int64 mov rcx, [rbp+var_8] mov rdx, [rcx+38h]; unsigned __int64 xor ecx, ecx; unsigned __int64 * call rax ; defaultNextCharLen(char const*,ulong,ulong,ulong *); defaultNextCharLen(char const*,ulong,ulong,ulong *) mov [rbp+var_C], eax mov rax, [rbp+var_8] mov rdi, [rax+18h] mov rax, [rbp+var_8] add rdi, [rax+38h] mov rax, [rbp+var_8] mov rsi, [rax+18h] mov rax, [rbp+var_8] add rsi, [rax+38h] movsxd rax, [rbp+var_C] add rsi, rax mov rax, [rbp+var_8] mov rdx, [rax+48h] mov rax, [rbp+var_8] sub rdx, [rax+38h] movsxd rax, [rbp+var_C] sub rdx, rax call _memmove movsxd rdx, [rbp+var_C] mov rax, [rbp+var_8] mov rcx, [rax+48h] sub rcx, rdx mov [rax+48h], rcx mov rax, [rbp+var_8] mov rax, [rax+18h] mov rcx, [rbp+var_8] mov rcx, [rcx+48h] mov byte ptr [rax+rcx], 0 mov rdi, [rbp+var_8] call _ZL11refreshLineP14linenoiseState; refreshLine(linenoiseState *) loc_674A: add rsp, 10h pop rbp retn
unsigned long long linenoiseEditDelete(long long a1) { unsigned long long result; // rax int CharLen; // [rsp+4h] [rbp-Ch] result = a1; if ( *(_QWORD *)(a1 + 72) ) { result = *(_QWORD *)(a1 + 56); if ( result < *(_QWORD *)(a1 + 72) ) { CharLen = nextCharLen(*(const char **)(a1 + 24), *(_QWORD *)(a1 + 72), *(_QWORD *)(a1 + 56), 0LL); memmove( *(_QWORD *)(a1 + 56) + *(_QWORD *)(a1 + 24), CharLen + *(_QWORD *)(a1 + 56) + *(_QWORD *)(a1 + 24), *(_QWORD *)(a1 + 72) - *(_QWORD *)(a1 + 56) - CharLen); *(_QWORD *)(a1 + 72) -= CharLen; *(_BYTE *)(*(_QWORD *)(a1 + 24) + *(_QWORD *)(a1 + 72)) = 0; return refreshLine(a1); } } return result; }
linenoiseEditDelete: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x48],0x0 JBE 0x0010674a MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x38] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x48] JNC 0x0010674a MOV RAX,qword ptr [0x00110260] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x18] MOV RCX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RCX + 0x48] MOV RCX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RCX + 0x38] XOR ECX,ECX CALL RAX MOV dword ptr [RBP + -0xc],EAX MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x8] ADD RDI,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x8] ADD RSI,qword ptr [RAX + 0x38] MOVSXD RAX,dword ptr [RBP + -0xc] ADD RSI,RAX MOV RAX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RAX + 0x48] MOV RAX,qword ptr [RBP + -0x8] SUB RDX,qword ptr [RAX + 0x38] MOVSXD RAX,dword ptr [RBP + -0xc] SUB RDX,RAX CALL 0x00102390 MOVSXD RDX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x48] SUB RCX,RDX MOV qword ptr [RAX + 0x48],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x48] MOV byte ptr [RAX + RCX*0x1],0x0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00105bb0 LAB_0010674a: ADD RSP,0x10 POP RBP RET
/* linenoiseEditDelete(linenoiseState*) */ void linenoiseEditDelete(linenoiseState *param_1) { int iVar1; if ((*(long *)(param_1 + 0x48) != 0) && (*(ulong *)(param_1 + 0x38) < *(ulong *)(param_1 + 0x48))) { iVar1 = (*(code *)nextCharLen) (*(int8 *)(param_1 + 0x18),*(int8 *)(param_1 + 0x48), *(int8 *)(param_1 + 0x38),0); memmove((void *)(*(long *)(param_1 + 0x18) + *(long *)(param_1 + 0x38)), (void *)(*(long *)(param_1 + 0x18) + *(long *)(param_1 + 0x38) + (long)iVar1), (*(long *)(param_1 + 0x48) - *(long *)(param_1 + 0x38)) - (long)iVar1); *(long *)(param_1 + 0x48) = *(long *)(param_1 + 0x48) - (long)iVar1; *(int1 *)(*(long *)(param_1 + 0x18) + *(long *)(param_1 + 0x48)) = 0; refreshLine(param_1); } return; }
13,132
linenoiseEditDelete(linenoiseState*)
ericcurtin[P]linenoise/linenoise.cpp
static void linenoiseEditDelete(struct linenoiseState * l) { if (l->len > 0 && l->pos < l->len) { int chlen = nextCharLen(l->buf, l->len, l->pos, NULL); memmove(l->buf + l->pos, l->buf + l->pos + chlen, l->len - l->pos - chlen); l->len -= chlen; l->buf[l->len] = '\0'; refreshLine(l); } }
O2
cpp
linenoiseEditDelete(linenoiseState*): pushq %r14 pushq %rbx pushq %rax movq 0x48(%rdi), %rsi testq %rsi, %rsi je 0x4533 movq %rdi, %rbx movq 0x38(%rdi), %rdx cmpq %rsi, %rdx jae 0x4533 movq 0x18(%rbx), %rdi xorl %ecx, %ecx callq *0x7d00(%rip) # 0xc1f0 movq 0x38(%rbx), %rcx movq 0x48(%rbx), %rdx movq 0x18(%rbx), %rdi addq %rcx, %rdi movslq %eax, %r14 leaq (%rdi,%r14), %rsi addq %r14, %rcx subq %rcx, %rdx callq 0x2300 movq 0x18(%rbx), %rax movq 0x48(%rbx), %rcx subq %r14, %rcx movq %rcx, 0x48(%rbx) movb $0x0, (%rax,%rcx) movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x4380 addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZL19linenoiseEditDeleteP14linenoiseState: push r14 push rbx push rax mov rsi, [rdi+48h]; unsigned __int64 test rsi, rsi jz short loc_4533 mov rbx, rdi mov rdx, [rdi+38h]; unsigned __int64 cmp rdx, rsi jnb short loc_4533 mov rdi, [rbx+18h]; char * xor ecx, ecx; unsigned __int64 * call cs:_ZL11nextCharLen; defaultNextCharLen(char const*,ulong,ulong,ulong *) mov rcx, [rbx+38h] mov rdx, [rbx+48h] mov rdi, [rbx+18h] add rdi, rcx movsxd r14, eax lea rsi, [rdi+r14] add rcx, r14 sub rdx, rcx call _memmove mov rax, [rbx+18h] mov rcx, [rbx+48h] sub rcx, r14 mov [rbx+48h], rcx mov byte ptr [rax+rcx], 0 mov rdi, rbx add rsp, 8 pop rbx pop r14 jmp _ZL11refreshLineP14linenoiseState; refreshLine(linenoiseState *) loc_4533: add rsp, 8 pop rbx pop r14 retn
long long linenoiseEditDelete(long long a1) { unsigned long long v1; // rsi unsigned long long v2; // rdx long long CharLen; // r14 long long v4; // rax long long v5; // rcx long long result; // rax v1 = *(_QWORD *)(a1 + 72); if ( v1 ) { v2 = *(_QWORD *)(a1 + 56); if ( v2 < v1 ) { CharLen = (int)nextCharLen(*(const char **)(a1 + 24), v1, v2, 0LL); memmove( *(_QWORD *)(a1 + 56) + *(_QWORD *)(a1 + 24), *(_QWORD *)(a1 + 56) + *(_QWORD *)(a1 + 24) + CharLen, *(_QWORD *)(a1 + 72) - (CharLen + *(_QWORD *)(a1 + 56))); v4 = *(_QWORD *)(a1 + 24); v5 = *(_QWORD *)(a1 + 72) - CharLen; *(_QWORD *)(a1 + 72) = v5; *(_BYTE *)(v4 + v5) = 0; return refreshLine(a1); } } return result; }
linenoiseEditDelete: PUSH R14 PUSH RBX PUSH RAX MOV RSI,qword ptr [RDI + 0x48] TEST RSI,RSI JZ 0x00104533 MOV RBX,RDI MOV RDX,qword ptr [RDI + 0x38] CMP RDX,RSI JNC 0x00104533 MOV RDI,qword ptr [RBX + 0x18] XOR ECX,ECX CALL qword ptr [0x0010c1f0] MOV RCX,qword ptr [RBX + 0x38] MOV RDX,qword ptr [RBX + 0x48] MOV RDI,qword ptr [RBX + 0x18] ADD RDI,RCX MOVSXD R14,EAX LEA RSI,[RDI + R14*0x1] ADD RCX,R14 SUB RDX,RCX CALL 0x00102300 MOV RAX,qword ptr [RBX + 0x18] MOV RCX,qword ptr [RBX + 0x48] SUB RCX,R14 MOV qword ptr [RBX + 0x48],RCX MOV byte ptr [RAX + RCX*0x1],0x0 MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x00104380 LAB_00104533: ADD RSP,0x8 POP RBX POP R14 RET
/* linenoiseEditDelete(linenoiseState*) */ void linenoiseEditDelete(linenoiseState *param_1) { ulong uVar1; long lVar2; int iVar3; void *__dest; long lVar4; uVar1 = *(ulong *)(param_1 + 0x48); if ((uVar1 != 0) && (*(ulong *)(param_1 + 0x38) < uVar1)) { iVar3 = (*(code *)nextCharLen) (*(int8 *)(param_1 + 0x18),uVar1,*(ulong *)(param_1 + 0x38),0); __dest = (void *)(*(long *)(param_1 + 0x18) + *(long *)(param_1 + 0x38)); lVar4 = (long)iVar3; memmove(__dest,(void *)((long)__dest + lVar4), *(long *)(param_1 + 0x48) - (*(long *)(param_1 + 0x38) + lVar4)); lVar2 = *(long *)(param_1 + 0x48); *(long *)(param_1 + 0x48) = lVar2 - lVar4; *(int1 *)(*(long *)(param_1 + 0x18) + (lVar2 - lVar4)) = 0; refreshLine(param_1); return; } return; }
13,133
ggml_add_rel_pos_impl
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
static struct ggml_tensor * ggml_add_rel_pos_impl( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * pw, struct ggml_tensor * ph, bool inplace) { GGML_ASSERT(ggml_are_same_shape(pw, ph)); GGML_ASSERT(ggml_is_contiguous(a)); GGML_ASSERT(ggml_is_contiguous(pw)); GGML_ASSERT(ggml_is_contiguous(ph)); GGML_ASSERT(ph->type == GGML_TYPE_F32); GGML_ASSERT(pw->type == GGML_TYPE_F32); GGML_ASSERT(pw->ne[3] == a->ne[2]); GGML_ASSERT(pw->ne[0]*pw->ne[0] == a->ne[0]); GGML_ASSERT(pw->ne[1]*pw->ne[2] == a->ne[1]); struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a); ggml_set_op_params_i32(result, 0, inplace ? 1 : 0); result->op = GGML_OP_ADD_REL_POS; result->src[0] = a; result->src[1] = pw; result->src[2] = ph; return result; }
O0
c
ggml_add_rel_pos_impl: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movb %r8b, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) andb $0x1, %al movb %al, -0x21(%rbp) movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x489b0 testb $0x1, %al jne 0x53e02 leaq 0x5d7cf(%rip), %rdi # 0xb15b7 movl $0x11e3, %esi # imm = 0x11E3 leaq 0x5d815(%rip), %rdx # 0xb1609 leaq 0x5fe2f(%rip), %rcx # 0xb3c2a movb $0x0, %al callq 0x48a00 movq -0x10(%rbp), %rdi callq 0x42ff0 testb $0x1, %al jne 0x53e30 leaq 0x5d7a1(%rip), %rdi # 0xb15b7 movl $0x11e4, %esi # imm = 0x11E4 leaq 0x5d7e7(%rip), %rdx # 0xb1609 leaq 0x5db9f(%rip), %rcx # 0xb19c8 movb $0x0, %al callq 0x48a00 movq -0x18(%rbp), %rdi callq 0x42ff0 testb $0x1, %al jne 0x53e5e leaq 0x5d773(%rip), %rdi # 0xb15b7 movl $0x11e5, %esi # imm = 0x11E5 leaq 0x5d7b9(%rip), %rdx # 0xb1609 leaq 0x5fdef(%rip), %rcx # 0xb3c46 movb $0x0, %al callq 0x48a00 movq -0x20(%rbp), %rdi callq 0x42ff0 testb $0x1, %al jne 0x53e8c leaq 0x5d745(%rip), %rdi # 0xb15b7 movl $0x11e6, %esi # imm = 0x11E6 leaq 0x5d78b(%rip), %rdx # 0xb1609 leaq 0x5fdd8(%rip), %rcx # 0xb3c5d movb $0x0, %al callq 0x48a00 movq -0x20(%rbp), %rax cmpl $0x0, (%rax) je 0x53eb6 leaq 0x5d71b(%rip), %rdi # 0xb15b7 movl $0x11e7, %esi # imm = 0x11E7 leaq 0x5d761(%rip), %rdx # 0xb1609 leaq 0x5fdc5(%rip), %rcx # 0xb3c74 movb $0x0, %al callq 0x48a00 movq -0x18(%rbp), %rax cmpl $0x0, (%rax) je 0x53ee0 leaq 0x5d6f1(%rip), %rdi # 0xb15b7 movl $0x11e8, %esi # imm = 0x11E8 leaq 0x5d737(%rip), %rdx # 0xb1609 leaq 0x5fdb5(%rip), %rcx # 0xb3c8e movb $0x0, %al callq 0x48a00 movq -0x18(%rbp), %rax movq 0x28(%rax), %rax movq -0x10(%rbp), %rcx cmpq 0x20(%rcx), %rax je 0x53f13 leaq 0x5d6be(%rip), %rdi # 0xb15b7 movl $0x11e9, %esi # imm = 0x11E9 leaq 0x5d704(%rip), %rdx # 0xb1609 leaq 0x5fd9c(%rip), %rcx # 0xb3ca8 movb $0x0, %al callq 0x48a00 movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq -0x18(%rbp), %rcx imulq 0x10(%rcx), %rax movq -0x10(%rbp), %rcx cmpq 0x10(%rcx), %rax je 0x53f4f leaq 0x5d682(%rip), %rdi # 0xb15b7 movl $0x11ea, %esi # imm = 0x11EA leaq 0x5d6c8(%rip), %rdx # 0xb1609 leaq 0x5fd76(%rip), %rcx # 0xb3cbe movb $0x0, %al callq 0x48a00 movq -0x18(%rbp), %rax movq 0x18(%rax), %rax movq -0x18(%rbp), %rcx imulq 0x20(%rcx), %rax movq -0x10(%rbp), %rcx cmpq 0x18(%rcx), %rax je 0x53f8b leaq 0x5d646(%rip), %rdi # 0xb15b7 movl $0x11eb, %esi # imm = 0x11EB leaq 0x5d68c(%rip), %rdx # 0xb1609 leaq 0x5fd5a(%rip), %rcx # 0xb3cde movb $0x0, %al callq 0x48a00 testb $0x1, -0x21(%rbp) je 0x53fa4 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x428f0 movq %rax, -0x38(%rbp) jmp 0x53fb5 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x45d90 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rdi movb -0x21(%rbp), %cl xorl %edx, %edx movl $0x1, %eax testb $0x1, %cl cmovnel %eax, %edx xorl %esi, %esi callq 0x4df90 movq -0x30(%rbp), %rax movl $0x44, 0x50(%rax) movq -0x10(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x18(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, 0xa0(%rax) movq -0x20(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, 0xa8(%rax) movq -0x30(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw (%rax,%rax)
ggml_add_rel_pos_impl: push rbp mov rbp, rsp sub rsp, 40h mov al, r8b mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx and al, 1 mov [rbp+var_21], al mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] call _ggml_are_same_shape test al, 1 jnz short loc_53E02 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 11E3h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlAreSameSha_3; "ggml_are_same_shape(pw, ph)" mov al, 0 call _ggml_abort loc_53E02: mov rdi, [rbp+var_10] call _ggml_is_contiguous test al, 1 jnz short loc_53E30 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 11E4h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsContiguo_3; "ggml_is_contiguous(a)" mov al, 0 call _ggml_abort loc_53E30: mov rdi, [rbp+var_18] call _ggml_is_contiguous test al, 1 jnz short loc_53E5E lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 11E5h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsContiguo_9; "ggml_is_contiguous(pw)" mov al, 0 call _ggml_abort loc_53E5E: mov rdi, [rbp+var_20] call _ggml_is_contiguous test al, 1 jnz short loc_53E8C lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 11E6h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsContiguo_10; "ggml_is_contiguous(ph)" mov al, 0 call _ggml_abort loc_53E8C: mov rax, [rbp+var_20] cmp dword ptr [rax], 0 jz short loc_53EB6 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 11E7h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aPhTypeGgmlType; "ph->type == GGML_TYPE_F32" mov al, 0 call _ggml_abort loc_53EB6: mov rax, [rbp+var_18] cmp dword ptr [rax], 0 jz short loc_53EE0 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 11E8h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aPwTypeGgmlType; "pw->type == GGML_TYPE_F32" mov al, 0 call _ggml_abort loc_53EE0: mov rax, [rbp+var_18] mov rax, [rax+28h] mov rcx, [rbp+var_10] cmp rax, [rcx+20h] jz short loc_53F13 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 11E9h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aPwNe3ANe2; "pw->ne[3] == a->ne[2]" mov al, 0 call _ggml_abort loc_53F13: mov rax, [rbp+var_18] mov rax, [rax+10h] mov rcx, [rbp+var_18] imul rax, [rcx+10h] mov rcx, [rbp+var_10] cmp rax, [rcx+10h] jz short loc_53F4F lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 11EAh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aPwNe0PwNe0ANe0; "pw->ne[0]*pw->ne[0] == a->ne[0]" mov al, 0 call _ggml_abort loc_53F4F: mov rax, [rbp+var_18] mov rax, [rax+18h] mov rcx, [rbp+var_18] imul rax, [rcx+20h] mov rcx, [rbp+var_10] cmp rax, [rcx+18h] jz short loc_53F8B lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 11EBh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aPwNe1PwNe2ANe1; "pw->ne[1]*pw->ne[2] == a->ne[1]" mov al, 0 call _ggml_abort loc_53F8B: test [rbp+var_21], 1 jz short loc_53FA4 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call _ggml_view_tensor mov [rbp+var_38], rax jmp short loc_53FB5 loc_53FA4: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call _ggml_dup_tensor mov [rbp+var_38], rax loc_53FB5: mov rax, [rbp+var_38] mov [rbp+var_30], rax mov rdi, [rbp+var_30] mov cl, [rbp+var_21] xor edx, edx mov eax, 1 test cl, 1 cmovnz edx, eax xor esi, esi call ggml_set_op_params_i32 mov rax, [rbp+var_30] mov dword ptr [rax+50h], 44h ; 'D' mov rcx, [rbp+var_10] mov rax, [rbp+var_30] mov [rax+98h], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_30] mov [rax+0A0h], rcx mov rcx, [rbp+var_20] mov rax, [rbp+var_30] mov [rax+0A8h], rcx mov rax, [rbp+var_30] add rsp, 40h pop rbp retn
long long ggml_add_rel_pos_impl( long long a1, long long a2, _QWORD *a3, _QWORD *a4, char a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { double v13; // xmm4_8 double v14; // xmm5_8 long long v16; // [rsp+8h] [rbp-38h] char v17; // [rsp+1Fh] [rbp-21h] v17 = a5 & 1; if ( !ggml_are_same_shape(a3, a4) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 4579, (long long)"GGML_ASSERT(%s) failed", "ggml_are_same_shape(pw, ph)"); if ( (ggml_is_contiguous(a2) & 1) == 0 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 4580, (long long)"GGML_ASSERT(%s) failed", "ggml_is_contiguous(a)"); if ( (ggml_is_contiguous((long long)a3) & 1) == 0 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 4581, (long long)"GGML_ASSERT(%s) failed", "ggml_is_contiguous(pw)"); if ( (ggml_is_contiguous((long long)a4) & 1) == 0 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 4582, (long long)"GGML_ASSERT(%s) failed", "ggml_is_contiguous(ph)"); if ( *(_DWORD *)a4 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 4583, (long long)"GGML_ASSERT(%s) failed", "ph->type == GGML_TYPE_F32"); if ( *(_DWORD *)a3 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 4584, (long long)"GGML_ASSERT(%s) failed", "pw->type == GGML_TYPE_F32"); if ( a3[5] != *(_QWORD *)(a2 + 32) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 4585, (long long)"GGML_ASSERT(%s) failed", "pw->ne[3] == a->ne[2]"); if ( a3[2] * a3[2] != *(_QWORD *)(a2 + 16) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 4586, (long long)"GGML_ASSERT(%s) failed", "pw->ne[0]*pw->ne[0] == a->ne[0]"); if ( a3[4] * a3[3] != *(_QWORD *)(a2 + 24) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 4587, (long long)"GGML_ASSERT(%s) failed", "pw->ne[1]*pw->ne[2] == a->ne[1]"); if ( (v17 & 1) != 0 ) v16 = (long long)ggml_view_tensor(a1, a2, a6, a7, a8, a9, v13, v14, a12, a13); else v16 = ggml_dup_tensor(a1, (unsigned int *)a2); ggml_set_op_params_i32(v16, 0, (v17 & 1) != 0); *(_DWORD *)(v16 + 80) = 68; *(_QWORD *)(v16 + 152) = a2; *(_QWORD *)(v16 + 160) = a3; *(_QWORD *)(v16 + 168) = a4; return v16; }
ggml_add_rel_pos_impl: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV AL,R8B MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX AND AL,0x1 MOV byte ptr [RBP + -0x21],AL MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001489b0 TEST AL,0x1 JNZ 0x00153e02 LEA RDI,[0x1b15b7] MOV ESI,0x11e3 LEA RDX,[0x1b1609] LEA RCX,[0x1b3c2a] MOV AL,0x0 CALL 0x00148a00 LAB_00153e02: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00142ff0 TEST AL,0x1 JNZ 0x00153e30 LEA RDI,[0x1b15b7] MOV ESI,0x11e4 LEA RDX,[0x1b1609] LEA RCX,[0x1b19c8] MOV AL,0x0 CALL 0x00148a00 LAB_00153e30: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00142ff0 TEST AL,0x1 JNZ 0x00153e5e LEA RDI,[0x1b15b7] MOV ESI,0x11e5 LEA RDX,[0x1b1609] LEA RCX,[0x1b3c46] MOV AL,0x0 CALL 0x00148a00 LAB_00153e5e: MOV RDI,qword ptr [RBP + -0x20] CALL 0x00142ff0 TEST AL,0x1 JNZ 0x00153e8c LEA RDI,[0x1b15b7] MOV ESI,0x11e6 LEA RDX,[0x1b1609] LEA RCX,[0x1b3c5d] MOV AL,0x0 CALL 0x00148a00 LAB_00153e8c: MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX],0x0 JZ 0x00153eb6 LEA RDI,[0x1b15b7] MOV ESI,0x11e7 LEA RDX,[0x1b1609] LEA RCX,[0x1b3c74] MOV AL,0x0 CALL 0x00148a00 LAB_00153eb6: MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0x0 JZ 0x00153ee0 LEA RDI,[0x1b15b7] MOV ESI,0x11e8 LEA RDX,[0x1b1609] LEA RCX,[0x1b3c8e] MOV AL,0x0 CALL 0x00148a00 LAB_00153ee0: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x20] JZ 0x00153f13 LEA RDI,[0x1b15b7] MOV ESI,0x11e9 LEA RDX,[0x1b1609] LEA RCX,[0x1b3ca8] MOV AL,0x0 CALL 0x00148a00 LAB_00153f13: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x18] IMUL RAX,qword ptr [RCX + 0x10] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x10] JZ 0x00153f4f LEA RDI,[0x1b15b7] MOV ESI,0x11ea LEA RDX,[0x1b1609] LEA RCX,[0x1b3cbe] MOV AL,0x0 CALL 0x00148a00 LAB_00153f4f: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x18] IMUL RAX,qword ptr [RCX + 0x20] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x18] JZ 0x00153f8b LEA RDI,[0x1b15b7] MOV ESI,0x11eb LEA RDX,[0x1b1609] LEA RCX,[0x1b3cde] MOV AL,0x0 CALL 0x00148a00 LAB_00153f8b: TEST byte ptr [RBP + -0x21],0x1 JZ 0x00153fa4 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x001428f0 MOV qword ptr [RBP + -0x38],RAX JMP 0x00153fb5 LAB_00153fa4: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x00145d90 MOV qword ptr [RBP + -0x38],RAX LAB_00153fb5: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x30] MOV CL,byte ptr [RBP + -0x21] XOR EDX,EDX MOV EAX,0x1 TEST CL,0x1 CMOVNZ EDX,EAX XOR ESI,ESI CALL 0x0014df90 MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x50],0x44 MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x98],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0xa0],RCX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0xa8],RCX MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x40 POP RBP RET
long ggml_add_rel_pos_impl(int8 param_1,long param_2,int *param_3,int *param_4,byte param_5) { ulong uVar1; long local_40; uVar1 = ggml_are_same_shape(param_3,param_4); if ((uVar1 & 1) == 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 0x11e3,"GGML_ASSERT(%s) failed","ggml_are_same_shape(pw, ph)"); } uVar1 = ggml_is_contiguous(param_2); if ((uVar1 & 1) == 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 0x11e4,"GGML_ASSERT(%s) failed","ggml_is_contiguous(a)"); } uVar1 = ggml_is_contiguous(param_3); if ((uVar1 & 1) == 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 0x11e5,"GGML_ASSERT(%s) failed","ggml_is_contiguous(pw)"); } uVar1 = ggml_is_contiguous(param_4); if ((uVar1 & 1) == 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 0x11e6,"GGML_ASSERT(%s) failed","ggml_is_contiguous(ph)"); } if (*param_4 != 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 0x11e7,"GGML_ASSERT(%s) failed","ph->type == GGML_TYPE_F32"); } if (*param_3 != 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 0x11e8,"GGML_ASSERT(%s) failed","pw->type == GGML_TYPE_F32"); } if (*(long *)(param_3 + 10) != *(long *)(param_2 + 0x20)) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 0x11e9,"GGML_ASSERT(%s) failed","pw->ne[3] == a->ne[2]"); } if (*(long *)(param_3 + 4) * *(long *)(param_3 + 4) - *(long *)(param_2 + 0x10) != 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 0x11ea,"GGML_ASSERT(%s) failed","pw->ne[0]*pw->ne[0] == a->ne[0]"); } if (*(long *)(param_3 + 6) * *(long *)(param_3 + 8) - *(long *)(param_2 + 0x18) != 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 0x11eb,"GGML_ASSERT(%s) failed","pw->ne[1]*pw->ne[2] == a->ne[1]"); } if ((param_5 & 1) == 0) { local_40 = ggml_dup_tensor(param_1,param_2); } else { local_40 = ggml_view_tensor(param_1,param_2); } ggml_set_op_params_i32(local_40,0,(param_5 & 1) != 0); *(int4 *)(local_40 + 0x50) = 0x44; *(long *)(local_40 + 0x98) = param_2; *(int **)(local_40 + 0xa0) = param_3; *(int **)(local_40 + 0xa8) = param_4; return local_40; }
13,134
ggml_add_rel_pos_impl
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
static struct ggml_tensor * ggml_add_rel_pos_impl( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * pw, struct ggml_tensor * ph, bool inplace) { GGML_ASSERT(ggml_are_same_shape(pw, ph)); GGML_ASSERT(ggml_is_contiguous(a)); GGML_ASSERT(ggml_is_contiguous(pw)); GGML_ASSERT(ggml_is_contiguous(ph)); GGML_ASSERT(ph->type == GGML_TYPE_F32); GGML_ASSERT(pw->type == GGML_TYPE_F32); GGML_ASSERT(pw->ne[3] == a->ne[2]); GGML_ASSERT(pw->ne[0]*pw->ne[0] == a->ne[0]); GGML_ASSERT(pw->ne[1]*pw->ne[2] == a->ne[1]); struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a); ggml_set_op_params_i32(result, 0, inplace ? 1 : 0); result->op = GGML_OP_ADD_REL_POS; result->src[0] = a; result->src[1] = pw; result->src[2] = ph; return result; }
O1
c
ggml_add_rel_pos_impl: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq 0x10(%rdx), %r13 cmpq 0x10(%rcx), %r13 jne 0x2085f movq %rcx, %rbx movq %rdx, %r14 movq 0x18(%rdx), %rax cmpq 0x18(%rcx), %rax jne 0x2085f movq 0x20(%r14), %rax cmpq 0x20(%rbx), %rax jne 0x2085f movq 0x28(%r14), %rax cmpq 0x28(%rbx), %rax jne 0x2085f movl %r8d, %ebp movq %rsi, %r15 movq %rdi, %r12 movq %rsi, %rdi xorl %esi, %esi callq 0x1b410 testb %al, %al je 0x20880 movq %r14, %rdi xorl %esi, %esi callq 0x1b410 testb %al, %al je 0x2089c movq %rbx, %rdi xorl %esi, %esi callq 0x1b410 testb %al, %al je 0x208b8 cmpl $0x0, (%rbx) jne 0x208d4 cmpl $0x0, (%r14) jne 0x208f0 movq 0x28(%r14), %rax cmpq 0x20(%r15), %rax jne 0x2090f imulq %r13, %r13 cmpq 0x10(%r15), %r13 jne 0x2092e movq 0x20(%r14), %rax imulq 0x18(%r14), %rax cmpq 0x18(%r15), %rax jne 0x2094d testb %bpl, %bpl je 0x20813 movq %r12, %rdi movq %r15, %rsi callq 0x17260 jmp 0x2082d leaq 0x10(%r15), %rcx movl (%r15), %esi movq %r12, %rdi movl $0x4, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x1b871 movzbl %bpl, %ecx movl %ecx, 0x54(%rax) movl $0x44, 0x50(%rax) movq %r15, 0x98(%rax) movq %r14, 0xa0(%rax) movq %rbx, 0xa8(%rax) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x2bd09(%rip), %rdi # 0x4c56f leaq 0x2bd54(%rip), %rdx # 0x4c5c1 leaq 0x2e09f(%rip), %rcx # 0x4e913 movl $0x11e3, %esi # imm = 0x11E3 xorl %eax, %eax callq 0x18ce0 leaq 0x2bce8(%rip), %rdi # 0x4c56f leaq 0x2bd33(%rip), %rdx # 0x4c5c1 leaq 0x2c0eb(%rip), %rcx # 0x4c980 movl $0x11e4, %esi # imm = 0x11E4 jmp 0x20879 leaq 0x2bccc(%rip), %rdi # 0x4c56f leaq 0x2bd17(%rip), %rdx # 0x4c5c1 leaq 0x2e07e(%rip), %rcx # 0x4e92f movl $0x11e5, %esi # imm = 0x11E5 jmp 0x20879 leaq 0x2bcb0(%rip), %rdi # 0x4c56f leaq 0x2bcfb(%rip), %rdx # 0x4c5c1 leaq 0x2e079(%rip), %rcx # 0x4e946 movl $0x11e6, %esi # imm = 0x11E6 jmp 0x20879 leaq 0x2bc94(%rip), %rdi # 0x4c56f leaq 0x2bcdf(%rip), %rdx # 0x4c5c1 leaq 0x2e074(%rip), %rcx # 0x4e95d movl $0x11e7, %esi # imm = 0x11E7 jmp 0x20879 leaq 0x2bc78(%rip), %rdi # 0x4c56f leaq 0x2bcc3(%rip), %rdx # 0x4c5c1 leaq 0x2e072(%rip), %rcx # 0x4e977 movl $0x11e8, %esi # imm = 0x11E8 jmp 0x20879 leaq 0x2bc59(%rip), %rdi # 0x4c56f leaq 0x2bca4(%rip), %rdx # 0x4c5c1 leaq 0x2e06d(%rip), %rcx # 0x4e991 movl $0x11e9, %esi # imm = 0x11E9 jmp 0x20879 leaq 0x2bc3a(%rip), %rdi # 0x4c56f leaq 0x2bc85(%rip), %rdx # 0x4c5c1 leaq 0x2e064(%rip), %rcx # 0x4e9a7 movl $0x11ea, %esi # imm = 0x11EA jmp 0x20879 leaq 0x2bc1b(%rip), %rdi # 0x4c56f leaq 0x2bc66(%rip), %rdx # 0x4c5c1 leaq 0x2e065(%rip), %rcx # 0x4e9c7 movl $0x11eb, %esi # imm = 0x11EB jmp 0x20879
ggml_add_rel_pos_impl: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r13, [rdx+10h] cmp r13, [rcx+10h] jnz loc_2085F mov rbx, rcx mov r14, rdx mov rax, [rdx+18h] cmp rax, [rcx+18h] jnz loc_2085F mov rax, [r14+20h] cmp rax, [rbx+20h] jnz loc_2085F mov rax, [r14+28h] cmp rax, [rbx+28h] jnz loc_2085F mov ebp, r8d mov r15, rsi mov r12, rdi mov rdi, rsi xor esi, esi call ggml_is_contiguous_n test al, al jz loc_20880 mov rdi, r14 xor esi, esi call ggml_is_contiguous_n test al, al jz loc_2089C mov rdi, rbx xor esi, esi call ggml_is_contiguous_n test al, al jz loc_208B8 cmp dword ptr [rbx], 0 jnz loc_208D4 cmp dword ptr [r14], 0 jnz loc_208F0 mov rax, [r14+28h] cmp rax, [r15+20h] jnz loc_2090F imul r13, r13 cmp r13, [r15+10h] jnz loc_2092E mov rax, [r14+20h] imul rax, [r14+18h] cmp rax, [r15+18h] jnz loc_2094D test bpl, bpl jz short loc_20813 mov rdi, r12 mov rsi, r15 call _ggml_view_tensor jmp short loc_2082D loc_20813: lea rcx, [r15+10h] mov esi, [r15] mov rdi, r12 mov edx, 4 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl loc_2082D: movzx ecx, bpl mov [rax+54h], ecx mov dword ptr [rax+50h], 44h ; 'D' mov [rax+98h], r15 mov [rax+0A0h], r14 mov [rax+0A8h], rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2085F: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlAreSameSha_3; "ggml_are_same_shape(pw, ph)" mov esi, 11E3h loc_20879: xor eax, eax call _ggml_abort loc_20880: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsContiguo_3; "ggml_is_contiguous(a)" mov esi, 11E4h jmp short loc_20879 loc_2089C: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsContiguo_9; "ggml_is_contiguous(pw)" mov esi, 11E5h jmp short loc_20879 loc_208B8: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsContiguo_10; "ggml_is_contiguous(ph)" mov esi, 11E6h jmp short loc_20879 loc_208D4: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aPhTypeGgmlType; "ph->type == GGML_TYPE_F32" mov esi, 11E7h jmp short loc_20879 loc_208F0: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aPwTypeGgmlType; "pw->type == GGML_TYPE_F32" mov esi, 11E8h jmp loc_20879 loc_2090F: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aPwNe3ANe2; "pw->ne[3] == a->ne[2]" mov esi, 11E9h jmp loc_20879 loc_2092E: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aPwNe0PwNe0ANe0; "pw->ne[0]*pw->ne[0] == a->ne[0]" mov esi, 11EAh jmp loc_20879 loc_2094D: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aPwNe1PwNe2ANe1; "pw->ne[1]*pw->ne[2] == a->ne[1]" mov esi, 11EBh jmp loc_20879
long long ggml_add_rel_pos_impl( long long a1, long long a2, long long a3, long long a4, unsigned __int8 a5, int a6, double a7) { long long v7; // r13 long long result; // rax const char *v12; // rcx int v13; // esi v7 = *(_QWORD *)(a3 + 16); if ( v7 != *(_QWORD *)(a4 + 16) || *(_QWORD *)(a3 + 24) != *(_QWORD *)(a4 + 24) || *(_QWORD *)(a3 + 32) != *(_QWORD *)(a4 + 32) || *(_QWORD *)(a3 + 40) != *(_QWORD *)(a4 + 40) ) { v12 = "ggml_are_same_shape(pw, ph)"; v13 = 4579; goto LABEL_18; } if ( !(unsigned __int8)ggml_is_contiguous_n((unsigned int *)a2, 0) ) { v12 = "ggml_is_contiguous(a)"; v13 = 4580; goto LABEL_18; } if ( !(unsigned __int8)ggml_is_contiguous_n((unsigned int *)a3, 0) ) { v12 = "ggml_is_contiguous(pw)"; v13 = 4581; goto LABEL_18; } if ( !(unsigned __int8)ggml_is_contiguous_n((unsigned int *)a4, 0) ) { v12 = "ggml_is_contiguous(ph)"; v13 = 4582; goto LABEL_18; } if ( *(_DWORD *)a4 ) { v12 = "ph->type == GGML_TYPE_F32"; v13 = 4583; goto LABEL_18; } if ( *(_DWORD *)a3 ) { v12 = "pw->type == GGML_TYPE_F32"; v13 = 4584; goto LABEL_18; } if ( *(_QWORD *)(a3 + 40) != *(_QWORD *)(a2 + 32) ) { v12 = "pw->ne[3] == a->ne[2]"; v13 = 4585; goto LABEL_18; } if ( v7 * v7 != *(_QWORD *)(a2 + 16) ) { v12 = "pw->ne[0]*pw->ne[0] == a->ne[0]"; v13 = 4586; goto LABEL_18; } if ( *(_QWORD *)(a3 + 24) * *(_QWORD *)(a3 + 32) != *(_QWORD *)(a2 + 24) ) { v12 = "pw->ne[1]*pw->ne[2] == a->ne[1]"; v13 = 4587; LABEL_18: ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", v13, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v12, a5, a6); } if ( a5 ) result = ggml_view_tensor(a1, a2, a7); else result = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 4, (long long *)(a2 + 16), 0LL, 0LL, a7); *(_DWORD *)(result + 84) = a5; *(_DWORD *)(result + 80) = 68; *(_QWORD *)(result + 152) = a2; *(_QWORD *)(result + 160) = a3; *(_QWORD *)(result + 168) = a4; return result; }
ggml_add_rel_pos_impl: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R13,qword ptr [RDX + 0x10] CMP R13,qword ptr [RCX + 0x10] JNZ 0x0012085f MOV RBX,RCX MOV R14,RDX MOV RAX,qword ptr [RDX + 0x18] CMP RAX,qword ptr [RCX + 0x18] JNZ 0x0012085f MOV RAX,qword ptr [R14 + 0x20] CMP RAX,qword ptr [RBX + 0x20] JNZ 0x0012085f MOV RAX,qword ptr [R14 + 0x28] CMP RAX,qword ptr [RBX + 0x28] JNZ 0x0012085f MOV EBP,R8D MOV R15,RSI MOV R12,RDI MOV RDI,RSI XOR ESI,ESI CALL 0x0011b410 TEST AL,AL JZ 0x00120880 MOV RDI,R14 XOR ESI,ESI CALL 0x0011b410 TEST AL,AL JZ 0x0012089c MOV RDI,RBX XOR ESI,ESI CALL 0x0011b410 TEST AL,AL JZ 0x001208b8 CMP dword ptr [RBX],0x0 JNZ 0x001208d4 CMP dword ptr [R14],0x0 JNZ 0x001208f0 MOV RAX,qword ptr [R14 + 0x28] CMP RAX,qword ptr [R15 + 0x20] JNZ 0x0012090f IMUL R13,R13 CMP R13,qword ptr [R15 + 0x10] JNZ 0x0012092e MOV RAX,qword ptr [R14 + 0x20] IMUL RAX,qword ptr [R14 + 0x18] CMP RAX,qword ptr [R15 + 0x18] JNZ 0x0012094d TEST BPL,BPL JZ 0x00120813 MOV RDI,R12 MOV RSI,R15 CALL 0x00117260 JMP 0x0012082d LAB_00120813: LEA RCX,[R15 + 0x10] MOV ESI,dword ptr [R15] MOV RDI,R12 MOV EDX,0x4 XOR R8D,R8D XOR R9D,R9D CALL 0x0011b871 LAB_0012082d: MOVZX ECX,BPL MOV dword ptr [RAX + 0x54],ECX MOV dword ptr [RAX + 0x50],0x44 MOV qword ptr [RAX + 0x98],R15 MOV qword ptr [RAX + 0xa0],R14 MOV qword ptr [RAX + 0xa8],RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012085f: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14e913] MOV ESI,0x11e3 LAB_00120879: XOR EAX,EAX CALL 0x00118ce0 LAB_00120880: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14c980] MOV ESI,0x11e4 JMP 0x00120879 LAB_0012089c: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14e92f] MOV ESI,0x11e5 JMP 0x00120879 LAB_001208b8: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14e946] MOV ESI,0x11e6 JMP 0x00120879 LAB_001208d4: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14e95d] MOV ESI,0x11e7 JMP 0x00120879 LAB_001208f0: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14e977] MOV ESI,0x11e8 JMP 0x00120879 LAB_0012090f: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14e991] MOV ESI,0x11e9 JMP 0x00120879 LAB_0012092e: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14e9a7] MOV ESI,0x11ea JMP 0x00120879 LAB_0012094d: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14e9c7] MOV ESI,0x11eb JMP 0x00120879
void ggml_add_rel_pos_impl (int8 param_1,int4 *param_2,int *param_3,int *param_4,byte param_5) { char cVar1; long lVar2; char *pcVar3; int8 uVar4; lVar2 = *(long *)(param_3 + 4); if ((((lVar2 == *(long *)(param_4 + 4)) && (*(long *)(param_3 + 6) == *(long *)(param_4 + 6))) && (*(long *)(param_3 + 8) == *(long *)(param_4 + 8))) && (*(long *)(param_3 + 10) == *(long *)(param_4 + 10))) { cVar1 = ggml_is_contiguous_n(param_2,0); if (cVar1 == '\0') { pcVar3 = "ggml_is_contiguous(a)"; uVar4 = 0x11e4; } else { cVar1 = ggml_is_contiguous_n(param_3,0); if (cVar1 == '\0') { pcVar3 = "ggml_is_contiguous(pw)"; uVar4 = 0x11e5; } else { cVar1 = ggml_is_contiguous_n(param_4,0); if (cVar1 == '\0') { pcVar3 = "ggml_is_contiguous(ph)"; uVar4 = 0x11e6; } else if (*param_4 == 0) { if (*param_3 == 0) { if (*(long *)(param_3 + 10) == *(long *)(param_2 + 8)) { if (lVar2 * lVar2 - *(long *)(param_2 + 4) == 0) { if (*(long *)(param_3 + 8) * *(long *)(param_3 + 6) - *(long *)(param_2 + 6) == 0) { if (param_5 == 0) { lVar2 = ggml_new_tensor_impl(param_1,*param_2,4,param_2 + 4,0,0); } else { lVar2 = ggml_view_tensor(param_1,param_2); } *(uint *)(lVar2 + 0x54) = (uint)param_5; *(int4 *)(lVar2 + 0x50) = 0x44; *(int4 **)(lVar2 + 0x98) = param_2; *(int **)(lVar2 + 0xa0) = param_3; *(int **)(lVar2 + 0xa8) = param_4; return; } pcVar3 = "pw->ne[1]*pw->ne[2] == a->ne[1]"; uVar4 = 0x11eb; } else { pcVar3 = "pw->ne[0]*pw->ne[0] == a->ne[0]"; uVar4 = 0x11ea; } } else { pcVar3 = "pw->ne[3] == a->ne[2]"; uVar4 = 0x11e9; } } else { pcVar3 = "pw->type == GGML_TYPE_F32"; uVar4 = 0x11e8; } } else { pcVar3 = "ph->type == GGML_TYPE_F32"; uVar4 = 0x11e7; } } } } else { pcVar3 = "ggml_are_same_shape(pw, ph)"; uVar4 = 0x11e3; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", uVar4,"GGML_ASSERT(%s) failed",pcVar3); }
13,135
build_update_string
eloqsql/client/mysqlslap.c
static statement * build_update_string(void) { char buf[HUGE_STRING_LENGTH]; unsigned int col_count; statement *ptr; DYNAMIC_STRING update_string; DBUG_ENTER("build_update_string"); init_dynamic_string(&update_string, "", 1024, 1024); dynstr_append(&update_string, "UPDATE t1 SET "); if (num_int_cols) for (col_count= 1; col_count <= num_int_cols; col_count++) { if (snprintf(buf, HUGE_STRING_LENGTH, "intcol%d = %ld", col_count, random()) > HUGE_STRING_LENGTH) { fprintf(stderr, "Memory Allocation error in creating update\n"); exit(1); } dynstr_append(&update_string, buf); if (col_count < num_int_cols || num_char_cols > 0) dynstr_append_mem(&update_string, ",", 1); } if (num_char_cols) for (col_count= 1; col_count <= num_char_cols; col_count++) { char rand_buffer[RAND_STRING_SIZE]; int buf_len= get_random_string(rand_buffer); if (snprintf(buf, HUGE_STRING_LENGTH, "charcol%d = '%.*s'", col_count, buf_len, rand_buffer) > HUGE_STRING_LENGTH) { fprintf(stderr, "Memory Allocation error in creating update\n"); exit(1); } dynstr_append(&update_string, buf); if (col_count < num_char_cols) dynstr_append_mem(&update_string, ",", 1); } if (auto_generate_sql_autoincrement || auto_generate_sql_guid_primary) dynstr_append(&update_string, " WHERE id = "); ptr= (statement *)my_malloc(PSI_NOT_INSTRUMENTED, sizeof(statement), MYF(MY_ZEROFILL|MY_FAE|MY_WME)); ptr->string= (char *)my_malloc(PSI_NOT_INSTRUMENTED, update_string.length + 1, MYF(MY_ZEROFILL|MY_FAE|MY_WME)); ptr->length= update_string.length+1; if (auto_generate_sql_autoincrement || auto_generate_sql_guid_primary) ptr->type= UPDATE_TYPE_REQUIRES_PREFIX ; else ptr->type= UPDATE_TYPE; strmov(ptr->string, update_string.str); dynstr_free(&update_string); DBUG_RETURN(ptr); }
O0
c
build_update_string: pushq %rbp movq %rsp, %rbp subq $0x20e0, %rsp # imm = 0x20E0 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) leaq -0x20c0(%rbp), %rdi leaq 0x98650(%rip), %rsi # 0xd4ca6 movl $0x400, %ecx # imm = 0x400 movq %rcx, %rdx callq 0x82510 leaq -0x20c0(%rbp), %rdi leaq 0x9232a(%rip), %rsi # 0xce99b callq 0x827e0 cmpl $0x0, 0x1f9303(%rip) # 0x235980 je 0x3c764 movl $0x1, -0x2094(%rbp) movl -0x2094(%rbp), %eax cmpl 0x1f92e7(%rip), %eax # 0x235980 ja 0x3c762 leaq -0x2010(%rbp), %rax movq %rax, -0x20d0(%rbp) movl -0x2094(%rbp), %eax movl %eax, -0x20c8(%rbp) callq 0x37b90 movq -0x20d0(%rbp), %rdi movl -0x20c8(%rbp), %ecx movq %rax, %r8 movl $0x2004, %esi # imm = 0x2004 leaq 0x922d0(%rip), %rdx # 0xce9aa movb $0x0, %al callq 0x374d0 cmpl $0x2004, %eax # imm = 0x2004 jle 0x3c70a movq 0x1f78e9(%rip), %rax # 0x233fd8 movq (%rax), %rdi leaq 0x922c0(%rip), %rsi # 0xce9b9 movb $0x0, %al callq 0x371e0 movl $0x1, %edi callq 0x37670 leaq -0x2010(%rbp), %rsi leaq -0x20c0(%rbp), %rdi callq 0x827e0 movl -0x2094(%rbp), %eax cmpl 0x1f9257(%rip), %eax # 0x235980 jb 0x3c734 cmpl $0x0, 0x1f9252(%rip) # 0x235984 jbe 0x3c74c leaq -0x20c0(%rbp), %rdi leaq 0x96205(%rip), %rsi # 0xd2947 movl $0x1, %edx callq 0x82820 jmp 0x3c74e movl -0x2094(%rbp), %eax addl $0x1, %eax movl %eax, -0x2094(%rbp) jmp 0x3c68d jmp 0x3c764 cmpl $0x0, 0x1f9219(%rip) # 0x235984 je 0x3c847 movl $0x1, -0x2094(%rbp) movl -0x2094(%rbp), %eax cmpl 0x1f91fd(%rip), %eax # 0x235984 ja 0x3c845 leaq -0x2090(%rbp), %rdi callq 0x3a7a0 movl %eax, -0x20c4(%rbp) leaq -0x2010(%rbp), %rdi movl -0x2094(%rbp), %ecx movl -0x20c4(%rbp), %r8d leaq -0x2090(%rbp), %r9 movl $0x2004, %esi # imm = 0x2004 leaq 0x9221f(%rip), %rdx # 0xce9e5 movb $0x0, %al callq 0x374d0 cmpl $0x2004, %eax # imm = 0x2004 jle 0x3c7f6 movq 0x1f77fd(%rip), %rax # 0x233fd8 movq (%rax), %rdi leaq 0x921d4(%rip), %rsi # 0xce9b9 movb $0x0, %al callq 0x371e0 movl $0x1, %edi callq 0x37670 leaq -0x2010(%rbp), %rsi leaq -0x20c0(%rbp), %rdi callq 0x827e0 movl -0x2094(%rbp), %eax cmpl 0x1f916f(%rip), %eax # 0x235984 jae 0x3c82f leaq -0x20c0(%rbp), %rdi leaq 0x96122(%rip), %rsi # 0xd2947 movl $0x1, %edx callq 0x82820 jmp 0x3c831 movl -0x2094(%rbp), %eax addl $0x1, %eax movl %eax, -0x2094(%rbp) jmp 0x3c77b jmp 0x3c847 movsbl 0x3b2b92(%rip), %eax # 0x3ef3e0 cmpl $0x0, %eax jne 0x3c85f movsbl 0x3b2b87(%rip), %eax # 0x3ef3e1 cmpl $0x0, %eax je 0x3c872 leaq -0x20c0(%rbp), %rdi leaq 0x92121(%rip), %rsi # 0xce98e callq 0x827e0 xorl %edi, %edi movl $0x30, %esi movl $0x38, %edx callq 0x7fad0 movq %rax, -0x20a0(%rbp) movq -0x20b8(%rbp), %rsi addq $0x1, %rsi xorl %edi, %edi movl $0x38, %edx callq 0x7fad0 movq %rax, %rcx movq -0x20a0(%rbp), %rax movq %rcx, (%rax) movq -0x20b8(%rbp), %rcx addq $0x1, %rcx movq -0x20a0(%rbp), %rax movq %rcx, 0x8(%rax) movsbl 0x3b2b15(%rip), %eax # 0x3ef3e0 cmpl $0x0, %eax jne 0x3c8dc movsbl 0x3b2b0a(%rip), %eax # 0x3ef3e1 cmpl $0x0, %eax je 0x3c8e9 movq -0x20a0(%rbp), %rax movb $0x3, 0x10(%rax) jmp 0x3c8f4 movq -0x20a0(%rbp), %rax movb $0x1, 0x10(%rax) movq -0x20a0(%rbp), %rax movq (%rax), %rdi movq -0x20c0(%rbp), %rsi callq 0x379c0 leaq -0x20c0(%rbp), %rdi callq 0x82cf0 movq -0x20a0(%rbp), %rax movq %rax, -0x20d8(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x3c946 movq -0x20d8(%rbp), %rax addq $0x20e0, %rsp # imm = 0x20E0 popq %rbp retq callq 0x372c0 nopl (%rax,%rax)
build_update_string: push rbp mov rbp, rsp sub rsp, 20E0h mov rax, fs:28h mov [rbp+var_8], rax lea rdi, [rbp+var_20C0] lea rsi, asc_D4CA2+4; "" mov ecx, 400h mov rdx, rcx call init_dynamic_string lea rdi, [rbp+var_20C0] lea rsi, aUpdateT1Set; "UPDATE t1 SET " call dynstr_append cmp cs:num_int_cols, 0 jz loc_3C764 mov [rbp+var_2094], 1 loc_3C68D: mov eax, [rbp+var_2094] cmp eax, cs:num_int_cols ja loc_3C762 lea rax, [rbp+var_2010] mov [rbp+var_20D0], rax mov eax, [rbp+var_2094] mov [rbp+var_20C8], eax call _random mov rdi, [rbp+var_20D0] mov ecx, [rbp+var_20C8] mov r8, rax mov esi, 2004h lea rdx, aIntcolDLd; "intcol%d = %ld" mov al, 0 call _snprintf cmp eax, 2004h jle short loc_3C70A mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aMemoryAllocati_3; "Memory Allocation error in creating upd"... mov al, 0 call _fprintf mov edi, 1 call _exit loc_3C70A: lea rsi, [rbp+var_2010] lea rdi, [rbp+var_20C0] call dynstr_append mov eax, [rbp+var_2094] cmp eax, cs:num_int_cols jb short loc_3C734 cmp cs:num_char_cols, 0 jbe short loc_3C74C loc_3C734: lea rdi, [rbp+var_20C0] lea rsi, aS_0+2; "," mov edx, 1 call dynstr_append_mem loc_3C74C: jmp short $+2 loc_3C74E: mov eax, [rbp+var_2094] add eax, 1 mov [rbp+var_2094], eax jmp loc_3C68D loc_3C762: jmp short $+2 loc_3C764: cmp cs:num_char_cols, 0 jz loc_3C847 mov [rbp+var_2094], 1 loc_3C77B: mov eax, [rbp+var_2094] cmp eax, cs:num_char_cols ja loc_3C845 lea rdi, [rbp+var_2090] call get_random_string mov [rbp+var_20C4], eax lea rdi, [rbp+var_2010] mov ecx, [rbp+var_2094] mov r8d, [rbp+var_20C4] lea r9, [rbp+var_2090] mov esi, 2004h lea rdx, aCharcolDS; "charcol%d = '%.*s'" mov al, 0 call _snprintf cmp eax, 2004h jle short loc_3C7F6 mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aMemoryAllocati_3; "Memory Allocation error in creating upd"... mov al, 0 call _fprintf mov edi, 1 call _exit loc_3C7F6: lea rsi, [rbp+var_2010] lea rdi, [rbp+var_20C0] call dynstr_append mov eax, [rbp+var_2094] cmp eax, cs:num_char_cols jnb short loc_3C82F lea rdi, [rbp+var_20C0] lea rsi, aS_0+2; "," mov edx, 1 call dynstr_append_mem loc_3C82F: jmp short $+2 loc_3C831: mov eax, [rbp+var_2094] add eax, 1 mov [rbp+var_2094], eax jmp loc_3C77B loc_3C845: jmp short $+2 loc_3C847: movsx eax, cs:auto_generate_sql_autoincrement cmp eax, 0 jnz short loc_3C85F movsx eax, cs:auto_generate_sql_guid_primary cmp eax, 0 jz short loc_3C872 loc_3C85F: lea rdi, [rbp+var_20C0] lea rsi, aWhereId; " WHERE id = " call dynstr_append loc_3C872: xor edi, edi mov esi, 30h ; '0' mov edx, 38h ; '8' call my_malloc mov [rbp+var_20A0], rax mov rsi, [rbp+var_20B8] add rsi, 1 xor edi, edi mov edx, 38h ; '8' call my_malloc mov rcx, rax mov rax, [rbp+var_20A0] mov [rax], rcx mov rcx, [rbp+var_20B8] add rcx, 1 mov rax, [rbp+var_20A0] mov [rax+8], rcx movsx eax, cs:auto_generate_sql_autoincrement cmp eax, 0 jnz short loc_3C8DC movsx eax, cs:auto_generate_sql_guid_primary cmp eax, 0 jz short loc_3C8E9 loc_3C8DC: mov rax, [rbp+var_20A0] mov byte ptr [rax+10h], 3 jmp short loc_3C8F4 loc_3C8E9: mov rax, [rbp+var_20A0] mov byte ptr [rax+10h], 1 loc_3C8F4: mov rax, [rbp+var_20A0] mov rdi, [rax] mov rsi, [rbp+var_20C0] call _stpcpy lea rdi, [rbp+var_20C0] call dynstr_free mov rax, [rbp+var_20A0] mov [rbp+var_20D8], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_3C946 mov rax, [rbp+var_20D8] add rsp, 20E0h pop rbp retn loc_3C946: call ___stack_chk_fail
long long build_update_string() { long long v0; // rax long long v1; // rax unsigned int v3; // [rsp+18h] [rbp-20C8h] int random_string; // [rsp+1Ch] [rbp-20C4h] long long v5; // [rsp+20h] [rbp-20C0h] BYREF long long v6; // [rsp+28h] [rbp-20B8h] long long v7; // [rsp+40h] [rbp-20A0h] unsigned int i; // [rsp+4Ch] [rbp-2094h] char v9[128]; // [rsp+50h] [rbp-2090h] BYREF _BYTE v10[8200]; // [rsp+D0h] [rbp-2010h] BYREF unsigned long long v11; // [rsp+20D8h] [rbp-8h] v11 = __readfsqword(0x28u); init_dynamic_string(&v5, "", 1024LL); dynstr_append(&v5, "UPDATE t1 SET "); if ( num_int_cols ) { for ( i = 1; i <= num_int_cols; ++i ) { v3 = i; v0 = random(); if ( (int)snprintf(v10, "getlogin", "intcol%d = %ld", v3, v0) > 8196 ) { fprintf(stderr, "Memory Allocation error in creating update\n"); exit(1LL); } dynstr_append(&v5, v10); if ( i < num_int_cols || num_char_cols ) dynstr_append_mem(&v5, ",", 1LL); } } if ( num_char_cols ) { for ( i = 1; i <= num_char_cols; ++i ) { random_string = get_random_string(v9); if ( (int)snprintf(v10, "getlogin", "charcol%d = '%.*s'", i, random_string, v9) > 8196 ) { fprintf(stderr, "Memory Allocation error in creating update\n"); exit(1LL); } dynstr_append(&v5, v10); if ( i < num_char_cols ) dynstr_append_mem(&v5, ",", 1LL); } } if ( auto_generate_sql_autoincrement || auto_generate_sql_guid_primary ) dynstr_append(&v5, " WHERE id = "); v7 = my_malloc(0LL, 48LL, 56LL); v1 = my_malloc(0LL, v6 + 1, 56LL); *(_QWORD *)v7 = v1; *(_QWORD *)(v7 + 8) = v6 + 1; if ( auto_generate_sql_autoincrement || auto_generate_sql_guid_primary ) *(_BYTE *)(v7 + 16) = 3; else *(_BYTE *)(v7 + 16) = 1; stpcpy(*(_QWORD *)v7, v5); dynstr_free(&v5); return v7; }
build_update_string: PUSH RBP MOV RBP,RSP SUB RSP,0x20e0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX LEA RDI,[RBP + -0x20c0] LEA RSI,[0x1d4ca6] MOV ECX,0x400 MOV RDX,RCX CALL 0x00182510 LEA RDI,[RBP + -0x20c0] LEA RSI,[0x1ce99b] CALL 0x001827e0 CMP dword ptr [0x00335980],0x0 JZ 0x0013c764 MOV dword ptr [RBP + -0x2094],0x1 LAB_0013c68d: MOV EAX,dword ptr [RBP + -0x2094] CMP EAX,dword ptr [0x00335980] JA 0x0013c762 LEA RAX,[RBP + -0x2010] MOV qword ptr [RBP + -0x20d0],RAX MOV EAX,dword ptr [RBP + -0x2094] MOV dword ptr [RBP + -0x20c8],EAX CALL 0x00137b90 MOV RDI,qword ptr [RBP + -0x20d0] MOV ECX,dword ptr [RBP + -0x20c8] MOV R8,RAX MOV ESI,0x2004 LEA RDX,[0x1ce9aa] MOV AL,0x0 CALL 0x001374d0 CMP EAX,0x2004 JLE 0x0013c70a MOV RAX,qword ptr [0x00333fd8] MOV RDI,qword ptr [RAX] LEA RSI,[0x1ce9b9] MOV AL,0x0 CALL 0x001371e0 MOV EDI,0x1 CALL 0x00137670 LAB_0013c70a: LEA RSI,[RBP + -0x2010] LEA RDI,[RBP + -0x20c0] CALL 0x001827e0 MOV EAX,dword ptr [RBP + -0x2094] CMP EAX,dword ptr [0x00335980] JC 0x0013c734 CMP dword ptr [0x00335984],0x0 JBE 0x0013c74c LAB_0013c734: LEA RDI,[RBP + -0x20c0] LEA RSI,[0x1d2947] MOV EDX,0x1 CALL 0x00182820 LAB_0013c74c: JMP 0x0013c74e LAB_0013c74e: MOV EAX,dword ptr [RBP + -0x2094] ADD EAX,0x1 MOV dword ptr [RBP + -0x2094],EAX JMP 0x0013c68d LAB_0013c762: JMP 0x0013c764 LAB_0013c764: CMP dword ptr [0x00335984],0x0 JZ 0x0013c847 MOV dword ptr [RBP + -0x2094],0x1 LAB_0013c77b: MOV EAX,dword ptr [RBP + -0x2094] CMP EAX,dword ptr [0x00335984] JA 0x0013c845 LEA RDI,[RBP + -0x2090] CALL 0x0013a7a0 MOV dword ptr [RBP + -0x20c4],EAX LEA RDI,[RBP + -0x2010] MOV ECX,dword ptr [RBP + -0x2094] MOV R8D,dword ptr [RBP + -0x20c4] LEA R9,[RBP + -0x2090] MOV ESI,0x2004 LEA RDX,[0x1ce9e5] MOV AL,0x0 CALL 0x001374d0 CMP EAX,0x2004 JLE 0x0013c7f6 MOV RAX,qword ptr [0x00333fd8] MOV RDI,qword ptr [RAX] LEA RSI,[0x1ce9b9] MOV AL,0x0 CALL 0x001371e0 MOV EDI,0x1 CALL 0x00137670 LAB_0013c7f6: LEA RSI,[RBP + -0x2010] LEA RDI,[RBP + -0x20c0] CALL 0x001827e0 MOV EAX,dword ptr [RBP + -0x2094] CMP EAX,dword ptr [0x00335984] JNC 0x0013c82f LEA RDI,[RBP + -0x20c0] LEA RSI,[0x1d2947] MOV EDX,0x1 CALL 0x00182820 LAB_0013c82f: JMP 0x0013c831 LAB_0013c831: MOV EAX,dword ptr [RBP + -0x2094] ADD EAX,0x1 MOV dword ptr [RBP + -0x2094],EAX JMP 0x0013c77b LAB_0013c845: JMP 0x0013c847 LAB_0013c847: MOVSX EAX,byte ptr [0x004ef3e0] CMP EAX,0x0 JNZ 0x0013c85f MOVSX EAX,byte ptr [0x004ef3e1] CMP EAX,0x0 JZ 0x0013c872 LAB_0013c85f: LEA RDI,[RBP + -0x20c0] LEA RSI,[0x1ce98e] CALL 0x001827e0 LAB_0013c872: XOR EDI,EDI MOV ESI,0x30 MOV EDX,0x38 CALL 0x0017fad0 MOV qword ptr [RBP + -0x20a0],RAX MOV RSI,qword ptr [RBP + -0x20b8] ADD RSI,0x1 XOR EDI,EDI MOV EDX,0x38 CALL 0x0017fad0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x20a0] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x20b8] ADD RCX,0x1 MOV RAX,qword ptr [RBP + -0x20a0] MOV qword ptr [RAX + 0x8],RCX MOVSX EAX,byte ptr [0x004ef3e0] CMP EAX,0x0 JNZ 0x0013c8dc MOVSX EAX,byte ptr [0x004ef3e1] CMP EAX,0x0 JZ 0x0013c8e9 LAB_0013c8dc: MOV RAX,qword ptr [RBP + -0x20a0] MOV byte ptr [RAX + 0x10],0x3 JMP 0x0013c8f4 LAB_0013c8e9: MOV RAX,qword ptr [RBP + -0x20a0] MOV byte ptr [RAX + 0x10],0x1 LAB_0013c8f4: MOV RAX,qword ptr [RBP + -0x20a0] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x20c0] CALL 0x001379c0 LEA RDI,[RBP + -0x20c0] CALL 0x00182cf0 MOV RAX,qword ptr [RBP + -0x20a0] MOV qword ptr [RBP + -0x20d8],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0013c946 MOV RAX,qword ptr [RBP + -0x20d8] ADD RSP,0x20e0 POP RBP RET LAB_0013c946: CALL 0x001372c0
int8 * build_update_string(void) { int iVar1; uint uVar2; long lVar3; int8 uVar4; long in_FS_OFFSET; char *local_20c8; long local_20c0; int8 *local_20a8; uint local_209c; int1 local_2098 [128]; char local_2018 [8200]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); init_dynamic_string(&local_20c8,&DAT_001d4ca6,0x400); dynstr_append(&local_20c8,"UPDATE t1 SET "); if (num_int_cols != 0) { for (local_209c = 1; uVar2 = local_209c, local_209c <= num_int_cols; local_209c = local_209c + 1 ) { lVar3 = random(); iVar1 = snprintf(local_2018,0x2004,"intcol%d = %ld",(ulong)uVar2,lVar3); if (0x2004 < iVar1) { fprintf(*(FILE **)PTR_stderr_00333fd8,"Memory Allocation error in creating update\n"); /* WARNING: Subroutine does not return */ exit(1); } dynstr_append(&local_20c8,local_2018); if ((local_209c < num_int_cols) || (num_char_cols != 0)) { dynstr_append_mem(&local_20c8,&DAT_001d2947,1); } } } if (num_char_cols != 0) { for (local_209c = 1; local_209c <= num_char_cols; local_209c = local_209c + 1) { uVar2 = get_random_string(local_2098); iVar1 = snprintf(local_2018,0x2004,"charcol%d = \'%.*s\'",(ulong)local_209c,(ulong)uVar2, local_2098); if (0x2004 < iVar1) { fprintf(*(FILE **)PTR_stderr_00333fd8,"Memory Allocation error in creating update\n"); /* WARNING: Subroutine does not return */ exit(1); } dynstr_append(&local_20c8,local_2018); if (local_209c < num_char_cols) { dynstr_append_mem(&local_20c8,&DAT_001d2947,1); } } } if ((auto_generate_sql_autoincrement != '\0') || (auto_generate_sql_guid_primary != '\0')) { dynstr_append(&local_20c8," WHERE id = "); } local_20a8 = (int8 *)my_malloc(0,0x30,0x38); uVar4 = my_malloc(0,local_20c0 + 1,0x38); *local_20a8 = uVar4; local_20a8[1] = local_20c0 + 1; if ((auto_generate_sql_autoincrement == '\0') && (auto_generate_sql_guid_primary == '\0')) { *(int1 *)(local_20a8 + 2) = 1; } else { *(int1 *)(local_20a8 + 2) = 3; } stpcpy((char *)*local_20a8,local_20c8); dynstr_free(&local_20c8); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_20a8; }
13,136
my_strntoull10rnd_8bit
eloqsql/strings/ctype-simple.c
ulonglong my_strntoull10rnd_8bit(CHARSET_INFO *cs __attribute__((unused)), const char *str, size_t length, int unsigned_flag, char **endptr, int *error) { const char *dot, *end9, *beg, *end= str + length; ulonglong ull; ulong ul; uchar ch; int shift= 0, digits= 0, negative, addon; /* Skip leading spaces and tabs */ for ( ; str < end && my_isspace(&my_charset_latin1, *str) ; ) str++; if (str >= end) goto ret_edom; if ((negative= (*str == '-')) || *str=='+') /* optional sign */ { if (++str == end) goto ret_edom; } beg= str; end9= (str + 9) > end ? end : (str + 9); /* Accumulate small number into ulong, for performance purposes */ for (ul= 0 ; str < end9 && (ch= (uchar) (*str - '0')) < 10; str++) { ul= ul * 10 + ch; } if (str >= end) /* Small number without dots and expanents */ { *endptr= (char*) str; if (negative) { if (unsigned_flag) { *error= ul ? MY_ERRNO_ERANGE : 0; return 0; } else { *error= 0; return (ulonglong) (longlong) -(long) ul; } } else { *error=0; return (ulonglong) ul; } } digits= (int) (str - beg); /* Continue to accumulate into ulonglong */ for (dot= NULL, ull= ul; str < end; str++) { if ((ch= (uchar) (*str - '0')) < 10) { if (ull < CUTOFF || (ull == CUTOFF && ch <= CUTLIM)) { ull= ull * 10 + ch; digits++; continue; } /* Adding the next digit would overflow. Remember the next digit in "addon", for rounding. Scan all digits with an optional single dot. */ if (ull == CUTOFF) { ull= ULONGLONG_MAX; addon= 1; str++; } else addon= (*str >= '5'); if (!dot) { for ( ; str < end && (ch= (uchar) (*str - '0')) < 10; shift++, str++); if (str < end && *str == '.') { str++; for ( ; str < end && (ch= (uchar) (*str - '0')) < 10; str++); } } else { shift= (int) (dot - str); for ( ; str < end && (ch= (uchar) (*str - '0')) < 10; str++); } goto exp; } if (*str == '.') { if (dot) { /* The second dot character */ addon= 0; goto exp; } else { dot= str + 1; } continue; } /* Unknown character, exit the loop */ break; } shift= dot ? (int)(dot - str) : 0; /* Right shift */ addon= 0; exp: /* [ E [ <sign> ] <unsigned integer> ] */ if (!digits) { str= beg; goto ret_edom; } if (str < end && (*str == 'e' || *str == 'E')) { str++; if (str < end) { int negative_exp, exponent; if ((negative_exp= (*str == '-')) || *str=='+') { if (++str == end) { str-= 2; /* 'e-' or 'e+' not followed by digits */ goto ret_sign; } } if (shift > 0 && !negative_exp) goto ret_too_big; for (exponent= 0 ; str < end && (ch= (uchar) (*str - '0')) < 10; str++) { if (negative_exp) { if (exponent - shift > DIGITS_IN_ULONGLONG) goto ret_zero; } else { if (exponent + shift > DIGITS_IN_ULONGLONG) goto ret_too_big; } exponent= exponent * 10 + ch; } shift+= negative_exp ? -exponent : exponent; } else str--; /* 'e' not followed by digits */ } if (shift == 0) /* No shift, check addon digit */ { if (addon) { if (ull == ULONGLONG_MAX) goto ret_too_big; ull++; } goto ret_sign; } if (shift < 0) /* Right shift */ { ulonglong d, r; if (-shift >= DIGITS_IN_ULONGLONG) goto ret_zero; /* Exponent is a big negative number, return 0 */ d= d10[-shift]; r= (ull % d) * 2; ull /= d; if (r >= d) ull++; goto ret_sign; } if (shift > DIGITS_IN_ULONGLONG) /* Huge left shift */ { if (!ull) goto ret_sign; goto ret_too_big; } for ( ; shift > 0; shift--, ull*= 10) /* Left shift */ { if (ull > CUTOFF) goto ret_too_big; /* Overflow, number too big */ } ret_sign: *endptr= (char*) str; if (!unsigned_flag) { if (negative) { if (ull >= (ulonglong) LONGLONG_MIN) { if (ull != (ulonglong) LONGLONG_MIN) *error= MY_ERRNO_ERANGE; return (ulonglong) LONGLONG_MIN; } *error= 0; return (ulonglong) -(longlong) ull; } else { if (ull > (ulonglong) LONGLONG_MAX) { *error= MY_ERRNO_ERANGE; return (ulonglong) LONGLONG_MAX; } *error= 0; return ull; } } /* Unsigned number */ if (negative && ull) { *error= MY_ERRNO_ERANGE; return 0; } *error= 0; return ull; ret_zero: *endptr= (char*) str; *error= 0; return 0; ret_edom: *endptr= (char*) str; *error= MY_ERRNO_EDOM; return 0; ret_too_big: *endptr= (char*) str; *error= MY_ERRNO_ERANGE; return unsigned_flag ? ULONGLONG_MAX : negative ? (ulonglong) LONGLONG_MIN : (ulonglong) LONGLONG_MAX; }
O3
c
my_strntoull10rnd_8bit: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx testq %rdx, %rdx jle 0x4c22b leaq (%rsi,%rdx), %r11 leaq 0x2fdd8f(%rip), %rax # 0x349d00 movq 0x40(%rax), %rax decq %rdx movzbl (%rsi), %r10d testb $0x8, 0x1(%rax,%r10) je 0x4bf94 incq %rsi decq %rdx cmpq %r11, %rsi jb 0x4bf78 jmp 0x4c22b cmpl $0x2b, %r10d je 0x4bfa0 cmpl $0x2d, %r10d jne 0x4bfac testq %rdx, %rdx je 0x4c083 incq %rsi leaq 0x9(%rsi), %rax cmpq %r11, %rax cmovaq %r11, %rax xorl %edi, %edi movq %rsi, %r14 cmpq %rax, %rsi jae 0x4bfdf movb (%r14), %dl addb $-0x30, %dl cmpb $0x9, %dl ja 0x4bfdf leaq (%rdi,%rdi,4), %rdi movzbl %dl, %edx leaq (%rdx,%rdi,2), %rdi incq %r14 cmpq %rax, %r14 jb 0x4bfc1 cmpq %r11, %r14 jae 0x4c059 movabsq $0x1999999999999999, %r15 # imm = 0x1999999999999999 movl %r14d, %r12d subl %esi, %r12d xorl %ebx, %ebx movl %r14d, %r13d movb (%r14), %al leal -0x30(%rax), %edx cmpb $0x9, %dl ja 0x4c028 cmpq %r15, %rdi jb 0x4c018 jne 0x4c098 cmpb $0x5, %dl ja 0x4c098 leaq (%rdi,%rdi,4), %rax movzbl %dl, %edx leaq (%rdx,%rax,2), %rdi incl %r12d jmp 0x4c035 cmpb $0x2e, %al jne 0x4c040 testq %rbx, %rbx jne 0x4c08b leaq 0x1(%r14), %rbx incq %r14 incl %r13d cmpq %r11, %r14 jb 0x4bff9 movl %ebx, %eax subl %r14d, %eax xorl %r13d, %r13d testq %rbx, %rbx cmovel %r13d, %eax movl %eax, %ebx movq %rdi, %rax jmp 0x4c156 movq %r14, (%r8) cmpl $0x2d, %r10d jne 0x4c30e testl %ecx, %ecx je 0x4c2fa xorl %eax, %eax testq %rdi, %rdi movl $0x22, %ecx cmovel %eax, %ecx movl %ecx, (%r9) jmp 0x4c235 movq %r11, %rsi jmp 0x4c22b xorl %ebx, %ebx movq %rdi, %rax xorl %r13d, %r13d jmp 0x4c156 movl %ecx, -0x30(%rbp) cmpb $0x35, %al setae %al movl %eax, -0x2c(%rbp) xorl %ecx, %ecx cmpq %r15, %rdi movq $-0x1, %rax cmovneq %rdi, %rax sete %cl movl -0x2c(%rbp), %edx orb %cl, %dl movl %edx, -0x2c(%rbp) movq %rcx, %rdx movq %r15, %rcx leaq (%r14,%rdx), %r15 testq %rbx, %rbx je 0x4c108 xorl %edx, %edx cmpq %rcx, %rdi sete %dl subl %edx, %ebx subl %r13d, %ebx cmpq %r11, %r15 movl -0x30(%rbp), %ecx jae 0x4c145 movl -0x2c(%rbp), %r13d movb (%r15), %dl addb $-0x30, %dl cmpb $0x9, %dl ja 0x4c0f9 incq %r15 cmpq %r11, %r15 jb 0x4c0e6 movq %r15, %r14 movabsq $0x1999999999999999, %r15 # imm = 0x1999999999999999 jmp 0x4c156 xorl %ebx, %ebx cmpq %r11, %r15 movl -0x30(%rbp), %ecx jae 0x4c145 leaq (%r14,%rdx), %rdi xorl %ebx, %ebx leaq (%rdx,%rbx), %r15 movb (%r14,%r15), %r15b leal -0x30(%r15), %r13d cmpb $0x9, %r13b ja 0x4c351 leaq (%rbx,%rdi), %r15 incq %r15 incq %rbx cmpq %r11, %r15 jb 0x4c118 addq %rbx, %rdi movq %rdi, %r14 jmp 0x4c148 movq %r15, %r14 movabsq $0x1999999999999999, %r15 # imm = 0x1999999999999999 movl -0x2c(%rbp), %r13d testl %r12d, %r12d je 0x4c22b cmpq %r11, %r14 jae 0x4c214 movzbl (%r14), %edx orl $0x20, %edx cmpl $0x65, %edx jne 0x4c214 leaq 0x1(%r14), %rsi cmpq %r11, %rsi jae 0x4c214 movzbl (%rsi), %edi cmpl $0x2d, %edi je 0x4c192 cmpl $0x2b, %edi jne 0x4c19f leaq 0x2(%r14), %rsi cmpq %r11, %rsi je 0x4c27e testl %ebx, %ebx jle 0x4c1ad cmpb $0x2d, %dil jne 0x4c286 xorl %r14d, %r14d cmpq %r11, %rsi jae 0x4c200 xorl %r14d, %r14d movb (%rsi), %dl addb $-0x30, %dl cmpb $0x9, %dl ja 0x4c200 movq %r15, %r12 cmpb $0x2d, %dil jne 0x4c1dc movl %r14d, %r15d subl %ebx, %r15d cmpl $0x14, %r15d jle 0x4c1ea jmp 0x4c25d leal (%r14,%rbx), %r15d cmpl $0x14, %r15d jg 0x4c286 movzbl %dl, %edx leal (%r14,%r14,4), %r14d leal (%rdx,%r14,2), %r14d incq %rsi cmpq %r11, %rsi movq %r12, %r15 jb 0x4c1b8 movl %r14d, %edx negl %edx cmpb $0x2d, %dil cmovnel %r14d, %edx addl %ebx, %edx movl %edx, %ebx movq %rsi, %r14 testl %ebx, %ebx je 0x4c245 js 0x4c255 cmpl $0x14, %ebx jbe 0x4c269 testq %rax, %rax jne 0x4c283 xorl %edi, %edi jmp 0x4c2d1 movq %rsi, (%r8) movl $0x21, (%r9) xorl %edi, %edi movq %rdi, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testb %r13b, %r13b je 0x4c27e cmpq $-0x1, %rax je 0x4c283 incq %rax jmp 0x4c27e cmpl $-0x13, %ebx jae 0x4c2b2 movq %r14, %rsi movq %rsi, (%r8) movl $0x0, (%r9) jmp 0x4c235 incl %ebx cmpq %r15, %rax ja 0x4c283 addq %rax, %rax leaq (%rax,%rax,4), %rax decl %ebx cmpl $0x1, %ebx jg 0x4c26b movq %rax, %rdi jmp 0x4c2d1 movq %r14, %rsi movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 leaq -0x1(%rax), %rdx cmpl $0x2d, %r10d movq %rsi, (%r8) movl $0x22, (%r9) cmoveq %rax, %rdx xorl %edi, %edi negl %ecx sbbq %rdi, %rdi orq %rdx, %rdi jmp 0x4c237 negl %ebx leaq 0x183d95(%rip), %rdx # 0x1d0050 movq (%rdx,%rbx,8), %rsi xorl %edx, %edx divq %rsi movq %rax, %rdi addq %rdx, %rdx cmpq %rsi, %rdx sbbq $-0x1, %rdi movq %r14, (%r8) testl %ecx, %ecx je 0x4c2ef cmpl $0x2d, %r10d jne 0x4c30e testq %rdi, %rdi je 0x4c30e movl $0x22, (%r9) jmp 0x4c235 cmpl $0x2d, %r10d jne 0x4c309 testq %rdi, %rdi js 0x4c31a movl $0x0, (%r9) negq %rdi jmp 0x4c237 testq %rdi, %rdi js 0x4c338 movl $0x0, (%r9) jmp 0x4c237 movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 negq %rdi jo 0x4c330 movl $0x22, (%r9) movq %rax, %rdi jmp 0x4c237 movl $0x22, (%r9) movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000 decq %rdi jmp 0x4c237 cmpb $0x2e, %r15b movl -0x2c(%rbp), %r13d jne 0x4c38e leaq (%rbx,%rdi), %rdx incq %rdx movabsq $0x1999999999999999, %r15 # imm = 0x1999999999999999 movq %rdx, %r14 cmpq %r11, %rdx jae 0x4c156 movb (%r14), %dil addb $-0x30, %dil leaq 0x1(%r14), %rdx cmpb $0xa, %dil jb 0x4c36c jmp 0x4c156 addq %rbx, %rdi movq %rdi, %r14 jmp 0x4c0fc
my_strntoull10rnd_8bit: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx test rdx, rdx jle loc_4C22B lea r11, [rsi+rdx] lea rax, my_charset_latin1 mov rax, [rax+40h] dec rdx loc_4BF78: movzx r10d, byte ptr [rsi] test byte ptr [rax+r10+1], 8 jz short loc_4BF94 inc rsi dec rdx cmp rsi, r11 jb short loc_4BF78 jmp loc_4C22B loc_4BF94: cmp r10d, 2Bh ; '+' jz short loc_4BFA0 cmp r10d, 2Dh ; '-' jnz short loc_4BFAC loc_4BFA0: test rdx, rdx jz loc_4C083 inc rsi loc_4BFAC: lea rax, [rsi+9] cmp rax, r11 cmova rax, r11 xor edi, edi mov r14, rsi cmp rsi, rax jnb short loc_4BFDF loc_4BFC1: mov dl, [r14] add dl, 0D0h cmp dl, 9 ja short loc_4BFDF lea rdi, [rdi+rdi*4] movzx edx, dl lea rdi, [rdx+rdi*2] inc r14 cmp r14, rax jb short loc_4BFC1 loc_4BFDF: cmp r14, r11 jnb short loc_4C059 mov r15, 1999999999999999h mov r12d, r14d sub r12d, esi xor ebx, ebx mov r13d, r14d loc_4BFF9: mov al, [r14] lea edx, [rax-30h] cmp dl, 9 ja short loc_4C028 cmp rdi, r15 jb short loc_4C018 jnz loc_4C098 cmp dl, 5 ja loc_4C098 loc_4C018: lea rax, [rdi+rdi*4] movzx edx, dl lea rdi, [rdx+rax*2] inc r12d jmp short loc_4C035 loc_4C028: cmp al, 2Eh ; '.' jnz short loc_4C040 test rbx, rbx jnz short loc_4C08B lea rbx, [r14+1] loc_4C035: inc r14 inc r13d cmp r14, r11 jb short loc_4BFF9 loc_4C040: mov eax, ebx sub eax, r14d xor r13d, r13d test rbx, rbx cmovz eax, r13d mov ebx, eax mov rax, rdi jmp loc_4C156 loc_4C059: mov [r8], r14 cmp r10d, 2Dh ; '-' jnz loc_4C30E test ecx, ecx jz loc_4C2FA xor eax, eax test rdi, rdi mov ecx, 22h ; '"' cmovz ecx, eax mov [r9], ecx jmp loc_4C235 loc_4C083: mov rsi, r11 jmp loc_4C22B loc_4C08B: xor ebx, ebx mov rax, rdi xor r13d, r13d jmp loc_4C156 loc_4C098: mov [rbp+var_30], ecx cmp al, 35h ; '5' setnb al mov [rbp+var_2C], eax xor ecx, ecx cmp rdi, r15 mov rax, 0FFFFFFFFFFFFFFFFh cmovnz rax, rdi setz cl mov edx, [rbp+var_2C] or dl, cl mov [rbp+var_2C], edx mov rdx, rcx mov rcx, r15 lea r15, [r14+rdx] test rbx, rbx jz short loc_4C108 xor edx, edx cmp rdi, rcx setz dl sub ebx, edx sub ebx, r13d cmp r15, r11 mov ecx, [rbp+var_30] jnb short loc_4C145 mov r13d, [rbp+var_2C] loc_4C0E6: mov dl, [r15] add dl, 0D0h cmp dl, 9 ja short loc_4C0F9 inc r15 cmp r15, r11 jb short loc_4C0E6 loc_4C0F9: mov r14, r15 loc_4C0FC: mov r15, 1999999999999999h jmp short loc_4C156 loc_4C108: xor ebx, ebx cmp r15, r11 mov ecx, [rbp+var_30] jnb short loc_4C145 lea rdi, [r14+rdx] xor ebx, ebx loc_4C118: lea r15, [rdx+rbx] mov r15b, [r14+r15] lea r13d, [r15-30h] cmp r13b, 9 ja loc_4C351 lea r15, [rbx+rdi] inc r15 inc rbx cmp r15, r11 jb short loc_4C118 add rdi, rbx mov r14, rdi jmp short loc_4C148 loc_4C145: mov r14, r15 loc_4C148: mov r15, 1999999999999999h mov r13d, [rbp+var_2C] loc_4C156: test r12d, r12d jz loc_4C22B cmp r14, r11 jnb loc_4C214 movzx edx, byte ptr [r14] or edx, 20h cmp edx, 65h ; 'e' jnz loc_4C214 lea rsi, [r14+1] cmp rsi, r11 jnb loc_4C214 movzx edi, byte ptr [rsi] cmp edi, 2Dh ; '-' jz short loc_4C192 cmp edi, 2Bh ; '+' jnz short loc_4C19F loc_4C192: lea rsi, [r14+2] cmp rsi, r11 jz loc_4C27E loc_4C19F: test ebx, ebx jle short loc_4C1AD cmp dil, 2Dh ; '-' jnz loc_4C286 loc_4C1AD: xor r14d, r14d cmp rsi, r11 jnb short loc_4C200 xor r14d, r14d loc_4C1B8: mov dl, [rsi] add dl, 0D0h cmp dl, 9 ja short loc_4C200 mov r12, r15 cmp dil, 2Dh ; '-' jnz short loc_4C1DC mov r15d, r14d sub r15d, ebx cmp r15d, 14h jle short loc_4C1EA jmp loc_4C25D loc_4C1DC: lea r15d, [r14+rbx] cmp r15d, 14h jg loc_4C286 loc_4C1EA: movzx edx, dl lea r14d, [r14+r14*4] lea r14d, [rdx+r14*2] inc rsi cmp rsi, r11 mov r15, r12 jb short loc_4C1B8 loc_4C200: mov edx, r14d neg edx cmp dil, 2Dh ; '-' cmovnz edx, r14d add edx, ebx mov ebx, edx mov r14, rsi loc_4C214: test ebx, ebx jz short loc_4C245 js short loc_4C255 cmp ebx, 14h jbe short loc_4C269 test rax, rax jnz short loc_4C283 xor edi, edi jmp loc_4C2D1 loc_4C22B: mov [r8], rsi mov dword ptr [r9], 21h ; '!' loc_4C235: xor edi, edi loc_4C237: mov rax, rdi pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4C245: test r13b, r13b jz short loc_4C27E cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_4C283 inc rax jmp short loc_4C27E loc_4C255: cmp ebx, 0FFFFFFEDh jnb short loc_4C2B2 mov rsi, r14 loc_4C25D: mov [r8], rsi mov dword ptr [r9], 0 jmp short loc_4C235 loc_4C269: inc ebx loc_4C26B: cmp rax, r15 ja short loc_4C283 add rax, rax lea rax, [rax+rax*4] dec ebx cmp ebx, 1 jg short loc_4C26B loc_4C27E: mov rdi, rax jmp short loc_4C2D1 loc_4C283: mov rsi, r14 loc_4C286: mov rax, 8000000000000000h lea rdx, [rax-1] cmp r10d, 2Dh ; '-' mov [r8], rsi mov dword ptr [r9], 22h ; '"' cmovz rdx, rax xor edi, edi neg ecx sbb rdi, rdi or rdi, rdx jmp short loc_4C237 loc_4C2B2: neg ebx lea rdx, d10 mov rsi, [rdx+rbx*8] xor edx, edx div rsi mov rdi, rax add rdx, rdx cmp rdx, rsi sbb rdi, 0FFFFFFFFFFFFFFFFh loc_4C2D1: mov [r8], r14 test ecx, ecx jz short loc_4C2EF cmp r10d, 2Dh ; '-' jnz short loc_4C30E test rdi, rdi jz short loc_4C30E mov dword ptr [r9], 22h ; '"' jmp loc_4C235 loc_4C2EF: cmp r10d, 2Dh ; '-' jnz short loc_4C309 test rdi, rdi js short loc_4C31A loc_4C2FA: mov dword ptr [r9], 0 neg rdi jmp loc_4C237 loc_4C309: test rdi, rdi js short loc_4C338 loc_4C30E: mov dword ptr [r9], 0 jmp loc_4C237 loc_4C31A: mov rax, 8000000000000000h neg rdi jo short loc_4C330 mov dword ptr [r9], 22h ; '"' loc_4C330: mov rdi, rax jmp loc_4C237 loc_4C338: mov dword ptr [r9], 22h ; '"' mov rdi, 8000000000000000h dec rdi jmp loc_4C237 loc_4C351: cmp r15b, 2Eh ; '.' mov r13d, [rbp+var_2C] jnz short loc_4C38E lea rdx, [rbx+rdi] inc rdx mov r15, 1999999999999999h loc_4C36C: mov r14, rdx cmp rdx, r11 jnb loc_4C156 mov dil, [r14] add dil, 0D0h lea rdx, [r14+1] cmp dil, 0Ah jb short loc_4C36C jmp loc_4C156 loc_4C38E: add rdi, rbx mov r14, rdi jmp loc_4C0FC
long long my_strntoull10rnd_8bit( long long a1, unsigned __int8 *a2, long long a3, int a4, unsigned __int8 **a5, int *a6) { unsigned long long v6; // r11 long long v7; // rdx long long v8; // r10 unsigned __int8 *v9; // rax long long v10; // rdi unsigned __int8 *i; // r14 unsigned __int8 v12; // dl int v13; // r12d _BYTE *v14; // rbx int v15; // r13d unsigned __int8 v16; // al unsigned __int8 v17; // dl int v18; // eax bool v19; // r13 unsigned long long v20; // rax int v21; // ecx long long v22; // rcx long long v23; // rdx unsigned __int8 *v24; // r15 unsigned __int8 *v25; // rdi char v26; // r15 unsigned long long v27; // r15 unsigned __int8 *v28; // rsi int v29; // edi int v30; // r14d unsigned __int8 v31; // dl int v32; // edx int v34; // ebx unsigned long long v35; // rdx unsigned long long v36; // rsi unsigned __int8 *v37; // rdx unsigned __int8 v38; // di int v39; // [rsp+0h] [rbp-30h] bool v40; // [rsp+4h] [rbp-2Ch] bool v41; // [rsp+4h] [rbp-2Ch] if ( a3 <= 0 ) goto LABEL_76; v6 = (unsigned long long)&a2[a3]; v7 = a3 - 1; while ( 1 ) { v8 = *a2; if ( (*(_BYTE *)(*(_QWORD *)&my_charset_latin1[16] + v8 + 1) & 8) == 0 ) break; ++a2; --v7; if ( (unsigned long long)a2 >= v6 ) goto LABEL_76; } if ( (_DWORD)v8 == 43 || (_DWORD)v8 == 45 ) { if ( !v7 ) { a2 = (unsigned __int8 *)v6; goto LABEL_76; } ++a2; } v9 = a2 + 9; if ( (unsigned long long)(a2 + 9) > v6 ) v9 = (unsigned __int8 *)v6; v10 = 0LL; for ( i = a2; i < v9; ++i ) { v12 = *i - 48; if ( v12 > 9u ) break; v10 = v12 + 10 * v10; } if ( (unsigned long long)i >= v6 ) { *a5 = i; if ( (_DWORD)v8 != 45 ) goto LABEL_102; if ( a4 ) { v21 = 34; if ( !v10 ) v21 = 0; *a6 = v21; return 0LL; } goto LABEL_100; } v13 = (_DWORD)i - (_DWORD)a2; v14 = 0LL; v15 = (int)i; while ( 1 ) { v16 = *i; v17 = *i - 48; if ( v17 <= 9u ) break; if ( v16 != 46 ) goto LABEL_26; if ( v14 ) { LODWORD(v14) = 0; v20 = v10; v19 = 0; goto LABEL_51; } v14 = i + 1; LABEL_25: ++i; ++v15; if ( (unsigned long long)i >= v6 ) { LABEL_26: v18 = (_DWORD)v14 - (_DWORD)i; v19 = 0; if ( !v14 ) v18 = 0; LODWORD(v14) = v18; v20 = v10; goto LABEL_51; } } if ( (unsigned long long)v10 < 0x1999999999999999LL || v10 == 0x1999999999999999LL && v17 <= 5u ) { v10 = v17 + 10 * v10; ++v13; goto LABEL_25; } v39 = a4; v40 = v16 >= 0x35u; v22 = 0LL; v20 = -1LL; if ( v10 != 0x1999999999999999LL ) v20 = v10; LOBYTE(v22) = v10 == 0x1999999999999999LL; v41 = v10 == 0x1999999999999999LL || v40; v23 = v22; v24 = &i[v22]; if ( v14 ) { LODWORD(v14) = (_DWORD)v14 - (v10 == 0x1999999999999999LL) - v15; a4 = v39; if ( (unsigned long long)v24 < v6 ) { v19 = v41; do { if ( (unsigned __int8)(*v24 - 48) > 9u ) break; ++v24; } while ( (unsigned long long)v24 < v6 ); i = v24; goto LABEL_51; } LABEL_49: i = v24; LABEL_50: v19 = v41; } else { LODWORD(v14) = 0; a4 = v39; if ( (unsigned long long)v24 >= v6 ) goto LABEL_49; v25 = &i[v23]; v14 = 0LL; while ( 1 ) { v26 = v14[v23 + (_QWORD)i]; if ( (unsigned __int8)(v26 - 48) > 9u ) break; v27 = (unsigned long long)&v25[(_QWORD)v14++ + 1]; if ( v27 >= v6 ) { i = &v25[(_QWORD)v14]; goto LABEL_50; } } v19 = v41; if ( v26 == 46 ) { v37 = &v25[(_QWORD)v14 + 1]; do { i = v37; if ( (unsigned long long)v37 >= v6 ) break; v38 = *v37++ - 48; } while ( v38 < 0xAu ); } else { i = &v25[(_QWORD)v14]; } } LABEL_51: if ( !v13 ) { LABEL_76: *a5 = a2; *a6 = 33; return 0LL; } if ( (unsigned long long)i >= v6 ) goto LABEL_71; if ( (*i | 0x20) != 0x65 ) goto LABEL_71; v28 = i + 1; if ( (unsigned long long)(i + 1) >= v6 ) goto LABEL_71; v29 = *v28; if ( v29 == 45 || v29 == 43 ) { v28 = i + 2; if ( i + 2 == (unsigned __int8 *)v6 ) { LABEL_88: v10 = v20; LABEL_94: *a5 = i; if ( a4 ) { if ( (_DWORD)v8 == 45 && v10 ) { *a6 = 34; return 0LL; } LABEL_102: *a6 = 0; return v10; } if ( (_DWORD)v8 != 45 ) { if ( v10 < 0 ) { *a6 = 34; return 0x7FFFFFFFFFFFFFFFLL; } goto LABEL_102; } if ( v10 < 0 ) { if ( !__OFSUB__(-v10, 1LL) ) *a6 = 34; return 0x8000000000000000LL; } LABEL_100: *a6 = 0; return -v10; } } if ( (int)v14 > 0 && (_BYTE)v29 != 45 ) goto LABEL_90; v30 = 0; if ( (unsigned long long)v28 < v6 ) { v30 = 0; do { v31 = *v28 - 48; if ( v31 > 9u ) break; if ( (_BYTE)v29 == 45 ) { if ( v30 - (int)v14 > 20 ) goto LABEL_84; } else if ( v30 + (int)v14 > 20 ) { goto LABEL_90; } v30 = v31 + 10 * v30; ++v28; } while ( (unsigned long long)v28 < v6 ); } v32 = -v30; if ( (_BYTE)v29 != 45 ) v32 = v30; LODWORD(v14) = (_DWORD)v14 + v32; i = v28; LABEL_71: if ( !(_DWORD)v14 ) { if ( v19 ) { if ( v20 == -1LL ) goto LABEL_89; ++v20; } goto LABEL_88; } if ( (int)v14 < 0 ) { if ( (unsigned int)v14 < 0xFFFFFFED ) { v28 = i; LABEL_84: *a5 = v28; *a6 = 0; return 0LL; } v36 = d10[-(int)v14]; v10 = v20 / v36 - ((2 * (v20 % v36) < v36) - 1LL); goto LABEL_94; } if ( (unsigned int)v14 <= 0x14 ) { v34 = (_DWORD)v14 + 1; while ( v20 <= 0x1999999999999999LL ) { v20 *= 10LL; if ( --v34 <= 1 ) goto LABEL_88; } } else if ( !v20 ) { v10 = 0LL; goto LABEL_94; } LABEL_89: v28 = i; LABEL_90: v35 = 0x7FFFFFFFFFFFFFFFLL; *a5 = v28; *a6 = 34; if ( (_DWORD)v8 == 45 ) v35 = 0x8000000000000000LL; return v35 | -(long long)(a4 != 0); }
my_strntoull10rnd_8bit: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX TEST RDX,RDX JLE 0x0014c22b LEA R11,[RSI + RDX*0x1] LEA RAX,[0x449d00] MOV RAX,qword ptr [RAX + 0x40] DEC RDX LAB_0014bf78: MOVZX R10D,byte ptr [RSI] TEST byte ptr [RAX + R10*0x1 + 0x1],0x8 JZ 0x0014bf94 INC RSI DEC RDX CMP RSI,R11 JC 0x0014bf78 JMP 0x0014c22b LAB_0014bf94: CMP R10D,0x2b JZ 0x0014bfa0 CMP R10D,0x2d JNZ 0x0014bfac LAB_0014bfa0: TEST RDX,RDX JZ 0x0014c083 INC RSI LAB_0014bfac: LEA RAX,[RSI + 0x9] CMP RAX,R11 CMOVA RAX,R11 XOR EDI,EDI MOV R14,RSI CMP RSI,RAX JNC 0x0014bfdf LAB_0014bfc1: MOV DL,byte ptr [R14] ADD DL,0xd0 CMP DL,0x9 JA 0x0014bfdf LEA RDI,[RDI + RDI*0x4] MOVZX EDX,DL LEA RDI,[RDX + RDI*0x2] INC R14 CMP R14,RAX JC 0x0014bfc1 LAB_0014bfdf: CMP R14,R11 JNC 0x0014c059 MOV R15,0x1999999999999999 MOV R12D,R14D SUB R12D,ESI XOR EBX,EBX MOV R13D,R14D LAB_0014bff9: MOV AL,byte ptr [R14] LEA EDX,[RAX + -0x30] CMP DL,0x9 JA 0x0014c028 CMP RDI,R15 JC 0x0014c018 JNZ 0x0014c098 CMP DL,0x5 JA 0x0014c098 LAB_0014c018: LEA RAX,[RDI + RDI*0x4] MOVZX EDX,DL LEA RDI,[RDX + RAX*0x2] INC R12D JMP 0x0014c035 LAB_0014c028: CMP AL,0x2e JNZ 0x0014c040 TEST RBX,RBX JNZ 0x0014c08b LEA RBX,[R14 + 0x1] LAB_0014c035: INC R14 INC R13D CMP R14,R11 JC 0x0014bff9 LAB_0014c040: MOV EAX,EBX SUB EAX,R14D XOR R13D,R13D TEST RBX,RBX CMOVZ EAX,R13D MOV EBX,EAX MOV RAX,RDI JMP 0x0014c156 LAB_0014c059: MOV qword ptr [R8],R14 CMP R10D,0x2d JNZ 0x0014c30e TEST ECX,ECX JZ 0x0014c2fa XOR EAX,EAX TEST RDI,RDI MOV ECX,0x22 CMOVZ ECX,EAX MOV dword ptr [R9],ECX JMP 0x0014c235 LAB_0014c083: MOV RSI,R11 JMP 0x0014c22b LAB_0014c08b: XOR EBX,EBX MOV RAX,RDI XOR R13D,R13D JMP 0x0014c156 LAB_0014c098: MOV dword ptr [RBP + -0x30],ECX CMP AL,0x35 SETNC AL MOV dword ptr [RBP + -0x2c],EAX XOR ECX,ECX CMP RDI,R15 MOV RAX,-0x1 CMOVNZ RAX,RDI SETZ CL MOV EDX,dword ptr [RBP + -0x2c] OR DL,CL MOV dword ptr [RBP + -0x2c],EDX MOV RDX,RCX MOV RCX,R15 LEA R15,[R14 + RDX*0x1] TEST RBX,RBX JZ 0x0014c108 XOR EDX,EDX CMP RDI,RCX SETZ DL SUB EBX,EDX SUB EBX,R13D CMP R15,R11 MOV ECX,dword ptr [RBP + -0x30] JNC 0x0014c145 MOV R13D,dword ptr [RBP + -0x2c] LAB_0014c0e6: MOV DL,byte ptr [R15] ADD DL,0xd0 CMP DL,0x9 JA 0x0014c0f9 INC R15 CMP R15,R11 JC 0x0014c0e6 LAB_0014c0f9: MOV R14,R15 LAB_0014c0fc: MOV R15,0x1999999999999999 JMP 0x0014c156 LAB_0014c108: XOR EBX,EBX CMP R15,R11 MOV ECX,dword ptr [RBP + -0x30] JNC 0x0014c145 LEA RDI,[R14 + RDX*0x1] XOR EBX,EBX LAB_0014c118: LEA R15,[RDX + RBX*0x1] MOV R15B,byte ptr [R14 + R15*0x1] LEA R13D,[R15 + -0x30] CMP R13B,0x9 JA 0x0014c351 LEA R15,[RBX + RDI*0x1] INC R15 INC RBX CMP R15,R11 JC 0x0014c118 ADD RDI,RBX MOV R14,RDI JMP 0x0014c148 LAB_0014c145: MOV R14,R15 LAB_0014c148: MOV R15,0x1999999999999999 MOV R13D,dword ptr [RBP + -0x2c] LAB_0014c156: TEST R12D,R12D JZ 0x0014c22b CMP R14,R11 JNC 0x0014c214 MOVZX EDX,byte ptr [R14] OR EDX,0x20 CMP EDX,0x65 JNZ 0x0014c214 LEA RSI,[R14 + 0x1] CMP RSI,R11 JNC 0x0014c214 MOVZX EDI,byte ptr [RSI] CMP EDI,0x2d JZ 0x0014c192 CMP EDI,0x2b JNZ 0x0014c19f LAB_0014c192: LEA RSI,[R14 + 0x2] CMP RSI,R11 JZ 0x0014c27e LAB_0014c19f: TEST EBX,EBX JLE 0x0014c1ad CMP DIL,0x2d JNZ 0x0014c286 LAB_0014c1ad: XOR R14D,R14D CMP RSI,R11 JNC 0x0014c200 XOR R14D,R14D LAB_0014c1b8: MOV DL,byte ptr [RSI] ADD DL,0xd0 CMP DL,0x9 JA 0x0014c200 MOV R12,R15 CMP DIL,0x2d JNZ 0x0014c1dc MOV R15D,R14D SUB R15D,EBX CMP R15D,0x14 JLE 0x0014c1ea JMP 0x0014c25d LAB_0014c1dc: LEA R15D,[R14 + RBX*0x1] CMP R15D,0x14 JG 0x0014c286 LAB_0014c1ea: MOVZX EDX,DL LEA R14D,[R14 + R14*0x4] LEA R14D,[RDX + R14*0x2] INC RSI CMP RSI,R11 MOV R15,R12 JC 0x0014c1b8 LAB_0014c200: MOV EDX,R14D NEG EDX CMP DIL,0x2d CMOVNZ EDX,R14D ADD EDX,EBX MOV EBX,EDX MOV R14,RSI LAB_0014c214: TEST EBX,EBX JZ 0x0014c245 JS 0x0014c255 CMP EBX,0x14 JBE 0x0014c269 TEST RAX,RAX JNZ 0x0014c283 XOR EDI,EDI JMP 0x0014c2d1 LAB_0014c22b: MOV qword ptr [R8],RSI MOV dword ptr [R9],0x21 LAB_0014c235: XOR EDI,EDI LAB_0014c237: MOV RAX,RDI POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014c245: TEST R13B,R13B JZ 0x0014c27e CMP RAX,-0x1 JZ 0x0014c283 INC RAX JMP 0x0014c27e LAB_0014c255: CMP EBX,-0x13 JNC 0x0014c2b2 MOV RSI,R14 LAB_0014c25d: MOV qword ptr [R8],RSI MOV dword ptr [R9],0x0 JMP 0x0014c235 LAB_0014c269: INC EBX LAB_0014c26b: CMP RAX,R15 JA 0x0014c283 ADD RAX,RAX LEA RAX,[RAX + RAX*0x4] DEC EBX CMP EBX,0x1 JG 0x0014c26b LAB_0014c27e: MOV RDI,RAX JMP 0x0014c2d1 LAB_0014c283: MOV RSI,R14 LAB_0014c286: MOV RAX,-0x8000000000000000 LEA RDX,[RAX + -0x1] CMP R10D,0x2d MOV qword ptr [R8],RSI MOV dword ptr [R9],0x22 CMOVZ RDX,RAX XOR EDI,EDI NEG ECX SBB RDI,RDI OR RDI,RDX JMP 0x0014c237 LAB_0014c2b2: NEG EBX LEA RDX,[0x2d0050] MOV RSI,qword ptr [RDX + RBX*0x8] XOR EDX,EDX DIV RSI MOV RDI,RAX ADD RDX,RDX CMP RDX,RSI SBB RDI,-0x1 LAB_0014c2d1: MOV qword ptr [R8],R14 TEST ECX,ECX JZ 0x0014c2ef CMP R10D,0x2d JNZ 0x0014c30e TEST RDI,RDI JZ 0x0014c30e MOV dword ptr [R9],0x22 JMP 0x0014c235 LAB_0014c2ef: CMP R10D,0x2d JNZ 0x0014c309 TEST RDI,RDI JS 0x0014c31a LAB_0014c2fa: MOV dword ptr [R9],0x0 NEG RDI JMP 0x0014c237 LAB_0014c309: TEST RDI,RDI JS 0x0014c338 LAB_0014c30e: MOV dword ptr [R9],0x0 JMP 0x0014c237 LAB_0014c31a: MOV RAX,-0x8000000000000000 NEG RDI JO 0x0014c330 MOV dword ptr [R9],0x22 LAB_0014c330: MOV RDI,RAX JMP 0x0014c237 LAB_0014c338: MOV dword ptr [R9],0x22 MOV RDI,-0x8000000000000000 DEC RDI JMP 0x0014c237 LAB_0014c351: CMP R15B,0x2e MOV R13D,dword ptr [RBP + -0x2c] JNZ 0x0014c38e LEA RDX,[RBX + RDI*0x1] INC RDX MOV R15,0x1999999999999999 LAB_0014c36c: MOV R14,RDX CMP RDX,R11 JNC 0x0014c156 MOV DIL,byte ptr [R14] ADD DIL,0xd0 LEA RDX,[R14 + 0x1] CMP DIL,0xa JC 0x0014c36c JMP 0x0014c156 LAB_0014c38e: ADD RDI,RBX MOV R14,RDI JMP 0x0014c0fc
ulong my_strntoull10rnd_8bit (int8 param_1,byte *param_2,long param_3,int param_4,ulong *param_5, int4 *param_6) { byte *pbVar1; byte bVar2; byte bVar3; long lVar4; uint uVar5; byte *pbVar6; int4 uVar7; ulong uVar8; byte bVar9; int iVar10; ulong uVar11; ulong uVar12; byte *pbVar13; ulong uVar14; int iVar15; byte *pbVar16; byte *pbVar17; bool bVar18; if (param_3 < 1) { LAB_0014c22b: *param_5 = (ulong)param_2; *param_6 = 0x21; return 0; } pbVar1 = param_2 + param_3; param_3 = param_3 + -1; pbVar13 = param_2; while (bVar3 = *pbVar13, (PTR_ctype_latin1_00449d40[(ulong)bVar3 + 1] & 8) != 0) { param_2 = pbVar13 + 1; param_3 = param_3 + -1; pbVar13 = param_2; if (pbVar1 <= param_2) goto LAB_0014c22b; } if ((bVar3 == 0x2b) || (bVar3 == 0x2d)) { param_2 = pbVar1; if (param_3 == 0) goto LAB_0014c22b; pbVar13 = pbVar13 + 1; } pbVar6 = pbVar13 + 9; if (pbVar1 < pbVar13 + 9) { pbVar6 = pbVar1; } uVar11 = 0; for (pbVar16 = pbVar13; (pbVar16 < pbVar6 && ((byte)(*pbVar16 - 0x30) < 10)); pbVar16 = pbVar16 + 1) { uVar11 = (ulong)(byte)(*pbVar16 - 0x30) + uVar11 * 10; } if (pbVar1 <= pbVar16) { *param_5 = (ulong)pbVar16; if (bVar3 == 0x2d) { if (param_4 != 0) { uVar7 = 0x22; if (uVar11 == 0) { uVar7 = 0; } *param_6 = uVar7; return 0; } goto LAB_0014c2fa; } goto LAB_0014c30e; } iVar15 = (int)pbVar16 - (int)pbVar13; pbVar6 = (byte *)0x0; uVar12 = (ulong)pbVar16 & 0xffffffff; uVar14 = uVar11; LAB_0014bff9: bVar2 = *pbVar16; bVar9 = bVar2 - 0x30; if (9 < bVar9) { if (bVar2 != 0x2e) goto LAB_0014c040; if (pbVar6 == (byte *)0x0) { pbVar6 = pbVar16 + 1; goto LAB_0014c035; } uVar12 = 0; bVar18 = false; uVar11 = uVar14; pbVar17 = pbVar16; goto LAB_0014c156; } if ((uVar14 < 0x1999999999999999) || ((uVar14 == 0x1999999999999999 && (bVar9 < 6)))) goto LAB_0014c018; bVar18 = uVar14 == 0x1999999999999999; uVar11 = 0xffffffffffffffff; if (!bVar18) { uVar11 = uVar14; } uVar8 = (ulong)bVar18; bVar18 = 0x34 < bVar2 || bVar18; pbVar17 = pbVar16 + uVar8; if (pbVar6 != (byte *)0x0) { uVar12 = (ulong)(((int)pbVar6 - (uint)(uVar14 == 0x1999999999999999)) - (int)uVar12); for (; (pbVar17 < pbVar1 && ((byte)(*pbVar17 - 0x30) < 10)); pbVar17 = pbVar17 + 1) { } goto LAB_0014c156; } uVar12 = 0; if (pbVar1 <= pbVar17) goto LAB_0014c156; uVar12 = 0; goto LAB_0014c118; while (lVar4 = uVar12 + uVar8, uVar12 = uVar12 + 1, pbVar16 + lVar4 + 1 < pbVar1) { LAB_0014c118: if (9 < (byte)(pbVar16[uVar8 + uVar12] - 0x30)) { if (pbVar16[uVar8 + uVar12] != 0x2e) { pbVar17 = pbVar16 + uVar12 + uVar8; goto LAB_0014c156; } pbVar17 = pbVar16 + uVar12 + uVar8; goto LAB_0014c36c; } } pbVar17 = pbVar16 + uVar12 + uVar8; goto LAB_0014c156; LAB_0014c018: uVar14 = (ulong)bVar9 + uVar14 * 10; iVar15 = iVar15 + 1; LAB_0014c035: pbVar16 = pbVar16 + 1; uVar12 = (ulong)((int)uVar12 + 1); if (pbVar1 <= pbVar16) goto LAB_0014c040; goto LAB_0014bff9; LAB_0014c040: uVar5 = (int)pbVar6 - (int)pbVar16; bVar18 = false; if (pbVar6 == (byte *)0x0) { uVar5 = 0; } uVar12 = (ulong)uVar5; uVar11 = uVar14; pbVar17 = pbVar16; goto LAB_0014c156; while ((byte)(*pbVar17 - 0x30) < 10) { LAB_0014c36c: pbVar17 = pbVar17 + 1; if (pbVar1 <= pbVar17) break; } LAB_0014c156: uVar5 = (uint)uVar12; param_2 = pbVar13; if (iVar15 == 0) goto LAB_0014c22b; if (((pbVar17 < pbVar1) && ((*pbVar17 | 0x20) == 0x65)) && (pbVar13 = pbVar17 + 1, pbVar13 < pbVar1)) { bVar2 = *pbVar13; if (((bVar2 != 0x2d) && (bVar2 != 0x2b)) || (pbVar13 = pbVar17 + 2, pbVar13 != pbVar1)) { if ((0 < (int)uVar5) && (bVar2 != 0x2d)) goto LAB_0014c286; iVar15 = 0; if (pbVar13 < pbVar1) { iVar15 = 0; do { if (9 < (byte)(*pbVar13 - 0x30)) break; if (bVar2 == 0x2d) { if (0x14 < (int)(iVar15 - uVar5)) goto LAB_0014c25d; } else if (0x14 < (int)(iVar15 + uVar5)) goto LAB_0014c286; iVar15 = (uint)(byte)(*pbVar13 - 0x30) + iVar15 * 10; pbVar13 = pbVar13 + 1; } while (pbVar13 < pbVar1); } iVar10 = -iVar15; if (bVar2 != 0x2d) { iVar10 = iVar15; } uVar5 = iVar10 + uVar5; pbVar17 = pbVar13; goto LAB_0014c214; } } else { LAB_0014c214: pbVar13 = pbVar17; pbVar17 = pbVar13; if (uVar5 == 0) { if (bVar18) { if (uVar11 == 0xffffffffffffffff) goto LAB_0014c286; uVar11 = uVar11 + 1; } } else if ((int)uVar5 < 0) { if (uVar5 < 0xffffffed) { LAB_0014c25d: *param_5 = (ulong)pbVar13; *param_6 = 0; return 0; } uVar14 = *(ulong *)(d10 + (ulong)-uVar5 * 8); uVar11 = (uVar11 / uVar14 + 1) - (ulong)((uVar11 % uVar14) * 2 < uVar14); } else if (uVar5 < 0x15) { iVar15 = uVar5 + 1; do { if (0x1999999999999999 < uVar11) goto LAB_0014c286; uVar11 = uVar11 * 10; iVar15 = iVar15 + -1; } while (1 < iVar15); } else { if (uVar11 != 0) { LAB_0014c286: uVar11 = 0x7fffffffffffffff; *param_5 = (ulong)pbVar13; *param_6 = 0x22; if (bVar3 == 0x2d) { uVar11 = 0x8000000000000000; } return -(ulong)(param_4 != 0) | uVar11; } uVar11 = 0; } } *param_5 = (ulong)pbVar17; if (param_4 == 0) { if (bVar3 == 0x2d) { if ((long)uVar11 < 0) { *param_6 = 0x22; return 0x8000000000000000; } LAB_0014c2fa: *param_6 = 0; return -uVar11; } if ((long)uVar11 < 0) { *param_6 = 0x22; return 0x7fffffffffffffff; } } else if ((bVar3 == 0x2d) && (uVar11 != 0)) { *param_6 = 0x22; return 0; } LAB_0014c30e: *param_6 = 0; return uVar11; }
13,137
get_charset_by_name
eloqsql/mysys/charset.c
CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags) { MY_CHARSET_LOADER loader; my_charset_loader_init_mysys(&loader); return my_collation_get_by_name(&loader, cs_name, flags); }
O3
c
get_charset_by_name: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %rsi, %rdx movq %rdi, %rsi movq %fs:0x28, %rax movq %rax, -0x8(%rbp) leaq -0xb8(%rbp), %rdi movb $0x0, (%rdi) leaq -0x10d0(%rip), %rax # 0x276ea movq %rax, 0x80(%rdi) leaq -0x10cf(%rip), %rax # 0x276f9 movq %rax, 0x88(%rdi) leaq -0x10c2(%rip), %rax # 0x27714 movq %rax, 0x90(%rdi) leaq 0x51be(%rip), %rax # 0x2d9a2 movq %rax, 0x98(%rdi) leaq 0x2d0dae(%rip), %rax # 0x2f95a0 movq (%rax), %rax movq %rax, 0xa0(%rdi) leaq -0x10d1(%rip), %rax # 0x27732 movq %rax, 0xa8(%rdi) callq 0x28664 movq %fs:0x28, %rcx cmpq -0x8(%rbp), %rcx jne 0x28827 addq $0xc0, %rsp popq %rbp retq callq 0x24390
get_charset_by_name: push rbp mov rbp, rsp sub rsp, 0C0h mov rdx, rsi mov rsi, rdi mov rax, fs:28h mov [rbp+var_8], rax lea rdi, [rbp+var_B8] mov byte ptr [rdi], 0 lea rax, my_once_alloc_c mov [rdi+80h], rax lea rax, my_malloc_c mov [rdi+88h], rax lea rax, my_realloc_c mov [rdi+90h], rax lea rax, my_free mov [rdi+98h], rax lea rax, my_charset_error_reporter mov rax, [rax] mov [rdi+0A0h], rax lea rax, add_collation mov [rdi+0A8h], rax call my_collation_get_by_name mov rcx, fs:28h cmp rcx, [rbp+var_8] jnz short loc_28827 add rsp, 0C0h pop rbp retn loc_28827: call ___stack_chk_fail
long long get_charset_by_name(long long a1, long long a2) { _BYTE v3[128]; // [rsp+8h] [rbp-B8h] BYREF long long ( *v4)(long long); // [rsp+88h] [rbp-38h] long long ( *v5)(long long); // [rsp+90h] [rbp-30h] long long ( *v6)(long long, long long); // [rsp+98h] [rbp-28h] long long ( *v7)(_QWORD); // [rsp+A0h] [rbp-20h] long long ( *v8)(); // [rsp+A8h] [rbp-18h] long long ( *v9)(unsigned int *); // [rsp+B0h] [rbp-10h] unsigned long long v10; // [rsp+B8h] [rbp-8h] v10 = __readfsqword(0x28u); v3[0] = 0; v4 = my_once_alloc_c; v5 = my_malloc_c; v6 = my_realloc_c; v7 = my_free; v8 = my_charset_error_reporter; v9 = add_collation; return my_collation_get_by_name((long long)v3, a1, a2); }
get_charset_by_name: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV RDX,RSI MOV RSI,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX LEA RDI,[RBP + -0xb8] MOV byte ptr [RDI],0x0 LEA RAX,[0x1276ea] MOV qword ptr [RDI + 0x80],RAX LEA RAX,[0x1276f9] MOV qword ptr [RDI + 0x88],RAX LEA RAX,[0x127714] MOV qword ptr [RDI + 0x90],RAX LEA RAX,[0x12d9a2] MOV qword ptr [RDI + 0x98],RAX LEA RAX,[0x3f95a0] MOV RAX,qword ptr [RAX] MOV qword ptr [RDI + 0xa0],RAX LEA RAX,[0x127732] MOV qword ptr [RDI + 0xa8],RAX CALL 0x00128664 MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x8] JNZ 0x00128827 ADD RSP,0xc0 POP RBP RET LAB_00128827: CALL 0x00124390
void get_charset_by_name(int8 param_1,int8 param_2) { long in_FS_OFFSET; int1 local_c0 [128]; code *local_40; code *local_38; code *local_30; code *local_28; int *local_20; code *local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_c0[0] = 0; local_40 = my_once_alloc_c; local_38 = my_malloc_c; local_30 = my_realloc_c; local_28 = my_free; local_20 = my_charset_error_reporter; local_18 = add_collation; my_collation_get_by_name(local_c0,param_1,param_2); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
13,138
apply_one_rule
eloqsql/strings/ctype-uca.c
static my_bool apply_one_rule(MY_CHARSET_LOADER *loader, MY_COLL_RULES *rules, MY_COLL_RULE *r, MY_UCA_WEIGHT_LEVEL *dst) { size_t nweights; size_t nreset= my_coll_rule_reset_length(r); /* Length of reset sequence */ size_t nshift= my_coll_rule_shift_length(r); /* Length of shift sequence */ uint16 *to; my_bool rc; if ((rules->shift_after_method == my_shift_method_expand && r->diff[0]) || r->before_level == 1) { /* Suppose we have this rule: &B[before primary] < C i.e. we need to put C before B, but after A, so the result order is: A < C < B. Let primary weight of B be [BBBB]. We cannot just use [BBBB-1] as weight for C: DUCET does not have enough unused weights between any two characters, so using [BBBB-1] will likely make C equal to the previous character, which is A, so we'll get this order instead of the desired: A = C < B. To guarantee that that C is sorted after A, we'll use expansion with a kind of "biggest possible character". As "biggest possible character" we'll use "last_non_ignorable": We'll compose weight for C as: [BBBB-1][MMMM+1] where [MMMM] is weight for "last_non_ignorable". We also do the same trick for "reset after" if the collation option says so. E.g. for the rules "&B < C", weight for C will be calculated as: [BBBB][MMMM+1] At this point we only need to store codepoints 'B' and 'last_non_ignorable'. Actual weights for 'C' will be calculated according to the above formula later, in create_tailoring(). */ if (!my_coll_rule_expand(r->base, MY_UCA_MAX_EXPANSION, rules->uca->last_non_ignorable)) { my_charset_loader_error_for_rule(loader, r, "Expansion", r->base, nreset); return TRUE; } nreset= my_coll_rule_reset_length(r); } if (nshift >= 2) /* Contraction */ { MY_CONTRACTIONS *contractions= &dst->contractions; to= my_uca_init_one_contraction(contractions, r->curr, (uint)nshift, r->with_context); /* Store weights of the "reset to" character */ dst->contractions.nitems--; /* Temporarily hide - it's incomplete */ rc= my_char_weight_put(dst, to, MY_UCA_CONTRACTION_MAX_WEIGHT_SIZE, &nweights, r->base, nreset); dst->contractions.nitems++; /* Activate, now it's complete */ } else { my_wc_t pagec= (r->curr[0] >> 8); DBUG_ASSERT(dst->weights[pagec]); to= my_char_weight_addr(dst, r->curr[0]); /* Store weights of the "reset to" character */ rc= my_char_weight_put(dst, to, dst->lengths[pagec], &nweights, r->base, nreset); } if (rc) { my_charset_loader_error_for_rule(loader, r, "Expansion", r->base, nreset); return rc; } /* Apply level difference. */ return apply_shift(loader, rules, r, dst->levelno, to, nweights); }
O0
c
apply_one_rule: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rdi callq 0xa1bc0 movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rdi callq 0xa1be0 movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax cmpl $0x1, 0x30(%rax) jne 0xa1599 movq -0x20(%rbp), %rax cmpl $0x0, 0x80(%rax) jne 0xa15a7 movq -0x20(%rbp), %rax cmpq $0x1, 0x90(%rax) jne 0xa15f8 movq -0x20(%rbp), %rdi movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq 0x78(%rax), %rdx movl $0xa, %esi callq 0xa0fa0 cmpl $0x0, %eax jne 0xa15eb movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x20(%rbp), %rcx movq -0x38(%rbp), %r8 leaq 0x30a4b(%rip), %rdx # 0xd2028 callq 0xa1c10 movb $0x1, -0x1(%rbp) jmp 0xa1718 movq -0x20(%rbp), %rdi callq 0xa1bc0 movq %rax, -0x38(%rbp) cmpq $0x2, -0x40(%rbp) jb 0xa1674 movq -0x28(%rbp), %rax addq $0x18, %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rdi movq -0x20(%rbp), %rsi addq $0x50, %rsi movq -0x40(%rbp), %rax movl %eax, %edx movq -0x20(%rbp), %rax movsbl 0x98(%rax), %ecx callq 0xa1730 movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rax movq 0x18(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x18(%rax) movq -0x28(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x20(%rbp), %r8 movq -0x38(%rbp), %r9 movl $0x11, %edx leaq -0x30(%rbp), %rcx callq 0xa1cd0 movb %al, -0x49(%rbp) movq -0x28(%rbp), %rax movq 0x18(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x18(%rax) jmp 0xa16cb movq -0x20(%rbp), %rax movq 0x50(%rax), %rax shrq $0x8, %rax movq %rax, -0x60(%rbp) jmp 0xa1686 movq -0x28(%rbp), %rdi movq -0x20(%rbp), %rax movq 0x50(%rax), %rax movl %eax, %esi callq 0x9f490 movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq -0x60(%rbp), %rcx movzbl (%rax,%rcx), %eax movl %eax, %edx movq -0x20(%rbp), %r8 movq -0x38(%rbp), %r9 leaq -0x30(%rbp), %rcx callq 0xa1cd0 movb %al, -0x49(%rbp) cmpb $0x0, -0x49(%rbp) je 0xa16f5 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x20(%rbp), %rcx movq -0x38(%rbp), %r8 leaq 0x30940(%rip), %rdx # 0xd2028 callq 0xa1c10 movb -0x49(%rbp), %al movb %al, -0x1(%rbp) jmp 0xa1718 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rax movl 0x30(%rax), %ecx movq -0x48(%rbp), %r8 movq -0x30(%rbp), %r9 callq 0xa1ed0 movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
apply_one_rule: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rdi, [rbp+var_20] call my_coll_rule_reset_length mov [rbp+var_38], rax mov rdi, [rbp+var_20] call my_coll_rule_shift_length mov [rbp+var_40], rax mov rax, [rbp+var_18] cmp dword ptr [rax+30h], 1 jnz short loc_A1599 mov rax, [rbp+var_20] cmp dword ptr [rax+80h], 0 jnz short loc_A15A7 loc_A1599: mov rax, [rbp+var_20] cmp qword ptr [rax+90h], 1 jnz short loc_A15F8 loc_A15A7: mov rdi, [rbp+var_20] mov rax, [rbp+var_18] mov rax, [rax+8] mov rdx, [rax+78h] mov esi, 0Ah call my_coll_rule_expand cmp eax, 0 jnz short loc_A15EB mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rcx, [rbp+var_20] mov r8, [rbp+var_38] lea rdx, aExpansion; "Expansion" call my_charset_loader_error_for_rule mov [rbp+var_1], 1 jmp loc_A1718 loc_A15EB: mov rdi, [rbp+var_20] call my_coll_rule_reset_length mov [rbp+var_38], rax loc_A15F8: cmp [rbp+var_40], 2 jb short loc_A1674 mov rax, [rbp+var_28] add rax, 18h mov [rbp+var_58], rax mov rdi, [rbp+var_58] mov rsi, [rbp+var_20] add rsi, 50h ; 'P' mov rax, [rbp+var_40] mov edx, eax mov rax, [rbp+var_20] movsx ecx, byte ptr [rax+98h] call my_uca_init_one_contraction mov [rbp+var_48], rax mov rax, [rbp+var_28] mov rcx, [rax+18h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+18h], rcx mov rdi, [rbp+var_28] mov rsi, [rbp+var_48] mov r8, [rbp+var_20] mov r9, [rbp+var_38] mov edx, 11h lea rcx, [rbp+var_30] call my_char_weight_put mov [rbp+var_49], al mov rax, [rbp+var_28] mov rcx, [rax+18h] add rcx, 1 mov [rax+18h], rcx jmp short loc_A16CB loc_A1674: mov rax, [rbp+var_20] mov rax, [rax+50h] shr rax, 8 mov [rbp+var_60], rax jmp short $+2 loc_A1686: mov rdi, [rbp+var_28] mov rax, [rbp+var_20] mov rax, [rax+50h] mov esi, eax call my_char_weight_addr mov [rbp+var_48], rax mov rdi, [rbp+var_28] mov rsi, [rbp+var_48] mov rax, [rbp+var_28] mov rax, [rax+8] mov rcx, [rbp+var_60] movzx eax, byte ptr [rax+rcx] mov edx, eax mov r8, [rbp+var_20] mov r9, [rbp+var_38] lea rcx, [rbp+var_30] call my_char_weight_put mov [rbp+var_49], al loc_A16CB: cmp [rbp+var_49], 0 jz short loc_A16F5 mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rcx, [rbp+var_20] mov r8, [rbp+var_38] lea rdx, aExpansion; "Expansion" call my_charset_loader_error_for_rule mov al, [rbp+var_49] mov [rbp+var_1], al jmp short loc_A1718 loc_A16F5: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov rax, [rbp+var_28] mov ecx, [rax+30h] mov r8, [rbp+var_48] mov r9, [rbp+var_30] call apply_shift mov [rbp+var_1], al loc_A1718: mov al, [rbp+var_1] add rsp, 60h pop rbp retn
char apply_one_rule(long long a1, long long a2, long long a3, _QWORD *a4) { long long v5; // [rsp+0h] [rbp-60h] char v6; // [rsp+17h] [rbp-49h] long long inited; // [rsp+18h] [rbp-48h] unsigned long long v8; // [rsp+20h] [rbp-40h] long long v9; // [rsp+28h] [rbp-38h] long long v10; // [rsp+30h] [rbp-30h] BYREF _QWORD *v11; // [rsp+38h] [rbp-28h] long long v12; // [rsp+40h] [rbp-20h] long long v13; // [rsp+48h] [rbp-18h] long long v14; // [rsp+50h] [rbp-10h] v14 = a1; v13 = a2; v12 = a3; v11 = a4; v9 = my_coll_rule_reset_length(a3); v8 = my_coll_rule_shift_length(v12); if ( *(_DWORD *)(a2 + 48) == 1 && *(_DWORD *)(v12 + 128) || *(_QWORD *)(v12 + 144) == 1LL ) { if ( !(unsigned int)my_coll_rule_expand(v12, 0xAuLL, *(_QWORD *)(*(_QWORD *)(v13 + 8) + 120LL)) ) { my_charset_loader_error_for_rule(v14, v12, "Expansion", v12, v9); return 1; } v9 = my_coll_rule_reset_length(v12); } if ( v8 < 2 ) { v5 = *(_QWORD *)(v12 + 80) >> 8; inited = my_char_weight_addr(v11, *(_QWORD *)(v12 + 80)); v6 = my_char_weight_put(v11, inited, *(unsigned __int8 *)(v11[1] + v5), &v10, v12, v9); } else { inited = my_uca_init_one_contraction(v11 + 3, v12 + 80, (unsigned int)v8, (unsigned int)*(char *)(v12 + 152)); --v11[3]; v6 = my_char_weight_put(v11, inited, 17LL, &v10, v12, v9); ++v11[3]; } if ( !v6 ) return apply_shift(v14, v13, v12, *((unsigned int *)v11 + 12), inited, v10); my_charset_loader_error_for_rule(v14, v12, "Expansion", v12, v9); return v6; }
apply_one_rule: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RDI,qword ptr [RBP + -0x20] CALL 0x001a1bc0 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x001a1be0 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x30],0x1 JNZ 0x001a1599 MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x80],0x0 JNZ 0x001a15a7 LAB_001a1599: MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x90],0x1 JNZ 0x001a15f8 LAB_001a15a7: MOV RDI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RAX + 0x78] MOV ESI,0xa CALL 0x001a0fa0 CMP EAX,0x0 JNZ 0x001a15eb MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x38] LEA RDX,[0x1d2028] CALL 0x001a1c10 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001a1718 LAB_001a15eb: MOV RDI,qword ptr [RBP + -0x20] CALL 0x001a1bc0 MOV qword ptr [RBP + -0x38],RAX LAB_001a15f8: CMP qword ptr [RBP + -0x40],0x2 JC 0x001a1674 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x18 MOV qword ptr [RBP + -0x58],RAX MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x20] ADD RSI,0x50 MOV RAX,qword ptr [RBP + -0x40] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x20] MOVSX ECX,byte ptr [RAX + 0x98] CALL 0x001a1730 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX + 0x18] ADD RCX,-0x1 MOV qword ptr [RAX + 0x18],RCX MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x48] MOV R8,qword ptr [RBP + -0x20] MOV R9,qword ptr [RBP + -0x38] MOV EDX,0x11 LEA RCX,[RBP + -0x30] CALL 0x001a1cd0 MOV byte ptr [RBP + -0x49],AL MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX + 0x18] ADD RCX,0x1 MOV qword ptr [RAX + 0x18],RCX JMP 0x001a16cb LAB_001a1674: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x50] SHR RAX,0x8 MOV qword ptr [RBP + -0x60],RAX JMP 0x001a1686 LAB_001a1686: MOV RDI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x50] MOV ESI,EAX CALL 0x0019f490 MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x60] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV EDX,EAX MOV R8,qword ptr [RBP + -0x20] MOV R9,qword ptr [RBP + -0x38] LEA RCX,[RBP + -0x30] CALL 0x001a1cd0 MOV byte ptr [RBP + -0x49],AL LAB_001a16cb: CMP byte ptr [RBP + -0x49],0x0 JZ 0x001a16f5 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x38] LEA RDX,[0x1d2028] CALL 0x001a1c10 MOV AL,byte ptr [RBP + -0x49] MOV byte ptr [RBP + -0x1],AL JMP 0x001a1718 LAB_001a16f5: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x30] MOV R8,qword ptr [RBP + -0x48] MOV R9,qword ptr [RBP + -0x30] CALL 0x001a1ed0 MOV byte ptr [RBP + -0x1],AL LAB_001a1718: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x60 POP RBP RET
int8 apply_one_rule(int8 param_1,long param_2,long param_3,long param_4) { char extraout_AL; int iVar1; ulong uVar2; int7 extraout_var; int8 uVar3; int7 uVar4; int7 extraout_var_00; char local_51; int8 local_50; int8 local_40; int8 local_38; long local_30; long local_28; long local_20; int8 local_18; char local_9; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; local_40 = my_coll_rule_reset_length(param_3); uVar2 = my_coll_rule_shift_length(local_28); if (((*(int *)(local_20 + 0x30) == 1) && (*(int *)(local_28 + 0x80) != 0)) || (*(long *)(local_28 + 0x90) == 1)) { iVar1 = my_coll_rule_expand(local_28,10,*(int8 *)(*(long *)(local_20 + 8) + 0x78)); if (iVar1 == 0) { my_charset_loader_error_for_rule(local_18,local_28,"Expansion",local_28,local_40); local_9 = '\x01'; uVar4 = extraout_var; goto LAB_001a1718; } local_40 = my_coll_rule_reset_length(local_28); } if (uVar2 < 2) { uVar2 = *(ulong *)(local_28 + 0x50); local_50 = my_char_weight_addr(local_30,*(ulong *)(local_28 + 0x50) & 0xffffffff); local_51 = my_char_weight_put(local_30,local_50, *(int1 *)(*(long *)(local_30 + 8) + (uVar2 >> 8)),&local_38, local_28,local_40); } else { local_50 = my_uca_init_one_contraction (local_30 + 0x18,local_28 + 0x50,uVar2 & 0xffffffff, (int)*(char *)(local_28 + 0x98)); *(long *)(local_30 + 0x18) = *(long *)(local_30 + 0x18) + -1; local_51 = my_char_weight_put(local_30,local_50,0x11,&local_38,local_28,local_40); *(long *)(local_30 + 0x18) = *(long *)(local_30 + 0x18) + 1; } if (local_51 == '\0') { apply_shift(local_18,local_20,local_28,*(int4 *)(local_30 + 0x30),local_50,local_38); uVar4 = extraout_var_00; local_9 = extraout_AL; } else { uVar3 = my_charset_loader_error_for_rule(local_18,local_28,"Expansion",local_28,local_40); uVar4 = (int7)((ulong)uVar3 >> 8); local_9 = local_51; } LAB_001a1718: return CONCAT71(uVar4,local_9); }
13,139
ulp
eloqsql/strings/dtoa.c
static double ulp(U *x) { register Long L; U u; L= (word0(x) & Exp_mask) - (P - 1)*Exp_msk1; word0(&u) = L; word1(&u) = 0; return dval(&u); }
O0
c
ulp: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movl 0x4(%rax), %eax andl $0x7ff00000, %eax # imm = 0x7FF00000 subl $0x3400000, %eax # imm = 0x3400000 movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax movl %eax, -0x14(%rbp) movl $0x0, -0x18(%rbp) movsd -0x18(%rbp), %xmm0 popq %rbp retq
ulp: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov eax, [rax+4] and eax, 7FF00000h sub eax, 3400000h mov [rbp+var_C], eax mov eax, [rbp+var_C] mov dword ptr [rbp+var_18+4], eax mov dword ptr [rbp+var_18], 0 movsd xmm0, [rbp+var_18] pop rbp retn
double ulp(long long a1) { double v2; // [rsp+0h] [rbp-18h] HIDWORD(v2) = (*(_DWORD *)(a1 + 4) & 0x7FF00000) - 54525952; LODWORD(v2) = 0; return v2; }
ulp: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x4] AND EAX,0x7ff00000 SUB EAX,0x3400000 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x14],EAX MOV dword ptr [RBP + -0x18],0x0 MOVSD XMM0,qword ptr [RBP + -0x18] POP RBP RET
long ulp(long param_1) { return (ulong)((*(uint *)(param_1 + 4) & 0x7ff00000) + 0xfcc00000) << 0x20; }
13,140
my_snprintf_utf32
eloqsql/strings/ctype-ucs2.c
static size_t my_snprintf_utf32(CHARSET_INFO *cs __attribute__((unused)), char* to, size_t n, const char* fmt, ...) { size_t ret; va_list args; va_start(args,fmt); ret= my_vsnprintf_utf32(to, n, fmt, args); va_end(args); return ret; }
O3
c
my_snprintf_utf32: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movq %rcx, %r15 movq %rdx, %rbx movq %rsi, %r12 leaq -0x120(%rbp), %rcx movq %r8, 0x20(%rcx) movq %r9, 0x28(%rcx) testb %al, %al je 0x6789f movaps %xmm0, -0xf0(%rbp) movaps %xmm1, -0xe0(%rbp) movaps %xmm2, -0xd0(%rbp) movaps %xmm3, -0xc0(%rbp) movaps %xmm4, -0xb0(%rbp) movaps %xmm5, -0xa0(%rbp) movaps %xmm6, -0x90(%rbp) movaps %xmm7, -0x80(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq %rcx, -0x50(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x58(%rbp) movabsq $0x3000000020, %rax # imm = 0x3000000020 movq %rax, -0x60(%rbp) addq %rsi, %rbx leaq -0x40(%rbp), %r14 movq %rsi, -0x68(%rbp) movzbl (%r15), %eax cmpl $0x25, %eax je 0x67909 testl %eax, %eax je 0x67a8a cmpq %rbx, %r12 jae 0x67a8a movw $0x0, (%r12) movb $0x0, 0x2(%r12) movb (%r15), %al movb %al, 0x3(%r12) addq $0x4, %r12 incq %r15 jmp 0x678d1 addq $0x2, %r15 movb -0x1(%r15), %al leal -0x30(%rax), %ecx cmpb $0xa, %cl jb 0x67924 movzbl %al, %ecx leal -0x2d(%rcx), %edx cmpl $0x2, %edx jae 0x67929 incq %r15 jmp 0x6790d cmpl $0x6c, %ecx jne 0x67933 movb (%r15), %al jmp 0x67936 decq %r15 cmpb $0x64, %al je 0x67966 movzbl %al, %eax cmpl $0x75, %eax je 0x67966 cmpl $0x73, %eax jne 0x6798e movl -0x60(%rbp), %ecx cmpq $0x28, %rcx ja 0x67a07 movq %rcx, %rax addq -0x50(%rbp), %rax addl $0x8, %ecx movl %ecx, -0x60(%rbp) jmp 0x67a13 movq %rbx, %rax subq %r12, %rax cmpq $0x3f, %rax jbe 0x67a8a movl -0x60(%rbp), %ecx cmpq $0x28, %rcx ja 0x679a4 movq %rcx, %rax addq -0x50(%rbp), %rax addl $0x8, %ecx movl %ecx, -0x60(%rbp) jmp 0x679b0 cmpq %rbx, %r12 je 0x67a87 movl $0x25000000, (%r12) # imm = 0x25000000 jmp 0x67900 movq -0x58(%rbp), %rax leaq 0x8(%rax), %rcx movq %rcx, -0x58(%rbp) movslq (%rax), %rdi cmpb $0x64, (%r15) jne 0x679c3 movq %r14, %rsi movl $0xfffffff6, %edx # imm = 0xFFFFFFF6 jmp 0x679cd movl %edi, %edi movq %r14, %rsi movl $0xa, %edx callq 0x785ce cmpb $0x0, -0x40(%rbp) je 0x67904 leaq -0x3f(%rbp), %rax movw $0x0, (%r12) movb $0x0, 0x2(%r12) movb -0x1(%rax), %cl movb %cl, 0x3(%r12) addq $0x4, %r12 cmpb $0x0, (%rax) leaq 0x1(%rax), %rax jne 0x679e0 jmp 0x67904 movq -0x58(%rbp), %rax leaq 0x8(%rax), %rcx movq %rcx, -0x58(%rbp) movq (%rax), %r13 movq %rbx, %r14 subq %r12, %r14 testq %r13, %r13 leaq 0x174c8(%rip), %rax # 0x7eeee cmoveq %rax, %r13 movq %r13, %rdi callq 0x26150 leaq (,%rax,4), %rdx movq %r14, %rcx shrq $0x2, %rcx decq %rcx cmpq %rdx, %r14 cmovaq %rax, %rcx testq %rcx, %rcx je 0x67a7e xorl %eax, %eax leaq -0x40(%rbp), %r14 movw $0x0, (%r12) movb $0x0, 0x2(%r12) movb (%r13,%rax), %dl movb %dl, 0x3(%r12) addq $0x4, %r12 incq %rax cmpq %rax, %rcx jne 0x67a56 jmp 0x67904 leaq -0x40(%rbp), %r14 jmp 0x67904 movq %rbx, %r12 movl $0x0, (%r12) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x67aba subq -0x68(%rbp), %r12 movq %r12, %rax addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x263a0
my_snprintf_utf32: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0F8h mov r15, rcx mov rbx, rdx mov r12, rsi lea rcx, [rbp+var_120] mov [rcx+20h], r8 mov [rcx+28h], r9 test al, al jz short loc_6789F movaps [rbp+var_F0], xmm0 movaps [rbp+var_E0], xmm1 movaps [rbp+var_D0], xmm2 movaps [rbp+var_C0], xmm3 movaps [rbp+var_B0], xmm4 movaps [rbp+var_A0], xmm5 movaps [rbp+var_90], xmm6 movaps [rbp+var_80], xmm7 loc_6789F: mov rax, fs:28h mov [rbp+var_30], rax mov [rbp+var_50], rcx lea rax, [rbp+arg_0] mov [rbp+var_58], rax mov rax, 3000000020h mov [rbp+var_60], rax add rbx, rsi lea r14, [rbp+var_40] mov [rbp+var_68], rsi loc_678D1: movzx eax, byte ptr [r15] cmp eax, 25h ; '%' jz short loc_67909 test eax, eax jz loc_67A8A cmp r12, rbx jnb loc_67A8A mov word ptr [r12], 0 mov byte ptr [r12+2], 0 mov al, [r15] mov [r12+3], al loc_67900: add r12, 4 loc_67904: inc r15 jmp short loc_678D1 loc_67909: add r15, 2 loc_6790D: mov al, [r15-1] lea ecx, [rax-30h] cmp cl, 0Ah jb short loc_67924 movzx ecx, al lea edx, [rcx-2Dh] cmp edx, 2 jnb short loc_67929 loc_67924: inc r15 jmp short loc_6790D loc_67929: cmp ecx, 6Ch ; 'l' jnz short loc_67933 mov al, [r15] jmp short loc_67936 loc_67933: dec r15 loc_67936: cmp al, 64h ; 'd' jz short loc_67966 movzx eax, al cmp eax, 75h ; 'u' jz short loc_67966 cmp eax, 73h ; 's' jnz short loc_6798E mov ecx, dword ptr [rbp+var_60] cmp rcx, 28h ; '(' ja loc_67A07 mov rax, rcx add rax, [rbp+var_50] add ecx, 8 mov dword ptr [rbp+var_60], ecx jmp loc_67A13 loc_67966: mov rax, rbx sub rax, r12 cmp rax, 3Fh ; '?' jbe loc_67A8A mov ecx, dword ptr [rbp+var_60] cmp rcx, 28h ; '(' ja short loc_679A4 mov rax, rcx add rax, [rbp+var_50] add ecx, 8 mov dword ptr [rbp+var_60], ecx jmp short loc_679B0 loc_6798E: cmp r12, rbx jz loc_67A87 mov dword ptr [r12], 25000000h jmp loc_67900 loc_679A4: mov rax, [rbp+var_58] lea rcx, [rax+8] mov [rbp+var_58], rcx loc_679B0: movsxd rdi, dword ptr [rax] cmp byte ptr [r15], 64h ; 'd' jnz short loc_679C3 mov rsi, r14 mov edx, 0FFFFFFF6h jmp short loc_679CD loc_679C3: mov edi, edi mov rsi, r14 mov edx, 0Ah loc_679CD: call int10_to_str cmp [rbp+var_40], 0 jz loc_67904 lea rax, [rbp+var_3F] loc_679E0: mov word ptr [r12], 0 mov byte ptr [r12+2], 0 mov cl, [rax-1] mov [r12+3], cl add r12, 4 cmp byte ptr [rax], 0 lea rax, [rax+1] jnz short loc_679E0 jmp loc_67904 loc_67A07: mov rax, [rbp+var_58] lea rcx, [rax+8] mov [rbp+var_58], rcx loc_67A13: mov r13, [rax] mov r14, rbx sub r14, r12 test r13, r13 lea rax, aNull; "(null)" cmovz r13, rax mov rdi, r13 call _strlen lea rdx, ds:0[rax*4] mov rcx, r14 shr rcx, 2 dec rcx cmp r14, rdx cmova rcx, rax test rcx, rcx jz short loc_67A7E xor eax, eax lea r14, [rbp+var_40] loc_67A56: mov word ptr [r12], 0 mov byte ptr [r12+2], 0 mov dl, [r13+rax+0] mov [r12+3], dl add r12, 4 inc rax cmp rcx, rax jnz short loc_67A56 jmp loc_67904 loc_67A7E: lea r14, [rbp+var_40] jmp loc_67904 loc_67A87: mov r12, rbx loc_67A8A: mov dword ptr [r12], 0 mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_67ABA sub r12, [rbp+var_68] mov rax, r12 add rsp, 0F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_67ABA: call ___stack_chk_fail
unsigned long long my_snprintf_utf32( __m128 a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, long long a9, unsigned long long a10, long long a11, unsigned __int8 *a12, long long a13, long long a14, char a15) { unsigned long long v16; // r12 unsigned long long v17; // rbx unsigned __int8 v18; // al const char **v19; // rax char *v20; // rax long long v21; // rdi long long v22; // rdx char *v23; // rax const char *v25; // r13 unsigned long long v26; // r14 long long v27; // rax long long v28; // rcx long long i; // rax char v31; // [rsp+0h] [rbp-120h] BYREF long long v32; // [rsp+20h] [rbp-100h] long long v33; // [rsp+28h] [rbp-F8h] __m128 v34; // [rsp+30h] [rbp-F0h] __m128 v35; // [rsp+40h] [rbp-E0h] __m128 v36; // [rsp+50h] [rbp-D0h] __m128 v37; // [rsp+60h] [rbp-C0h] __m128 v38; // [rsp+70h] [rbp-B0h] __m128 v39; // [rsp+80h] [rbp-A0h] __m128 v40; // [rsp+90h] [rbp-90h] __m128 v41; // [rsp+A0h] [rbp-80h] unsigned long long v42; // [rsp+B8h] [rbp-68h] long long v43; // [rsp+C0h] [rbp-60h] char *v44; // [rsp+C8h] [rbp-58h] char *v45; // [rsp+D0h] [rbp-50h] char v46; // [rsp+E0h] [rbp-40h] BYREF char v47; // [rsp+E1h] [rbp-3Fh] BYREF unsigned long long v48; // [rsp+F0h] [rbp-30h] v34 = a1; v35 = a2; v36 = a3; v37 = a4; v38 = a5; v39 = a6; v40 = a7; v41 = a8; v16 = a10; v32 = a13; v33 = a14; v48 = __readfsqword(0x28u); v45 = &v31; v44 = &a15; v43 = 0x3000000020LL; v17 = a10 + a11; v42 = a10; while ( 1 ) { if ( *a12 != 37 ) { if ( !*a12 || v16 >= v17 ) goto LABEL_44; *(_WORD *)v16 = 0; *(_BYTE *)(v16 + 2) = 0; *(_BYTE *)(v16 + 3) = *a12; goto LABEL_6; } for ( a12 += 2; ; ++a12 ) { v18 = *(a12 - 1); if ( (unsigned __int8)(v18 - 48) >= 0xAu && (unsigned int)v18 - 45 >= 2 ) break; } if ( v18 == 108 ) v18 = *a12; else --a12; if ( v18 != 100 && v18 != 117 ) break; if ( v17 - v16 <= 0x3F ) goto LABEL_44; if ( (unsigned int)v43 > 0x28uLL ) { v20 = v44; v44 += 8; } else { v20 = &v45[(unsigned int)v43]; LODWORD(v43) = v43 + 8; } v21 = *(int *)v20; if ( *a12 == 100 ) { v22 = 4294967286LL; } else { v21 = (unsigned int)v21; v22 = 10LL; } int10_to_str(v21, &v46, v22); if ( v46 ) { v23 = &v47; do { *(_WORD *)v16 = 0; *(_BYTE *)(v16 + 2) = 0; *(_BYTE *)(v16 + 3) = *(v23 - 1); v16 += 4LL; } while ( *v23++ != 0 ); } LABEL_7: ++a12; } if ( v18 == 115 ) { if ( (unsigned int)v43 > 0x28uLL ) { v19 = (const char **)v44; v44 += 8; } else { v19 = (const char **)&v45[(unsigned int)v43]; LODWORD(v43) = v43 + 8; } v25 = *v19; v26 = v17 - v16; if ( !*v19 ) v25 = "(null)"; v27 = strlen(v25); v28 = (v26 >> 2) - 1; if ( v26 > 4 * v27 ) v28 = v27; if ( v28 ) { for ( i = 0LL; i != v28; ++i ) { *(_WORD *)v16 = 0; *(_BYTE *)(v16 + 2) = 0; *(_BYTE *)(v16 + 3) = v25[i]; v16 += 4LL; } } goto LABEL_7; } if ( v16 != v17 ) { *(_DWORD *)v16 = 620756992; LABEL_6: v16 += 4LL; goto LABEL_7; } v16 = v17; LABEL_44: *(_DWORD *)v16 = 0; return v16 - v42; }
my_snprintf_utf32: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xf8 MOV R15,RCX MOV RBX,RDX MOV R12,RSI LEA RCX,[RBP + -0x120] MOV qword ptr [RCX + 0x20],R8 MOV qword ptr [RCX + 0x28],R9 TEST AL,AL JZ 0x0016789f MOVAPS xmmword ptr [RBP + -0xf0],XMM0 MOVAPS xmmword ptr [RBP + -0xe0],XMM1 MOVAPS xmmword ptr [RBP + -0xd0],XMM2 MOVAPS xmmword ptr [RBP + -0xc0],XMM3 MOVAPS xmmword ptr [RBP + -0xb0],XMM4 MOVAPS xmmword ptr [RBP + -0xa0],XMM5 MOVAPS xmmword ptr [RBP + -0x90],XMM6 MOVAPS xmmword ptr [RBP + -0x80],XMM7 LAB_0016789f: MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x50],RCX LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x58],RAX MOV RAX,0x3000000020 MOV qword ptr [RBP + -0x60],RAX ADD RBX,RSI LEA R14,[RBP + -0x40] MOV qword ptr [RBP + -0x68],RSI LAB_001678d1: MOVZX EAX,byte ptr [R15] CMP EAX,0x25 JZ 0x00167909 TEST EAX,EAX JZ 0x00167a8a CMP R12,RBX JNC 0x00167a8a MOV word ptr [R12],0x0 MOV byte ptr [R12 + 0x2],0x0 MOV AL,byte ptr [R15] MOV byte ptr [R12 + 0x3],AL LAB_00167900: ADD R12,0x4 LAB_00167904: INC R15 JMP 0x001678d1 LAB_00167909: ADD R15,0x2 LAB_0016790d: MOV AL,byte ptr [R15 + -0x1] LEA ECX,[RAX + -0x30] CMP CL,0xa JC 0x00167924 MOVZX ECX,AL LEA EDX,[RCX + -0x2d] CMP EDX,0x2 JNC 0x00167929 LAB_00167924: INC R15 JMP 0x0016790d LAB_00167929: CMP ECX,0x6c JNZ 0x00167933 MOV AL,byte ptr [R15] JMP 0x00167936 LAB_00167933: DEC R15 LAB_00167936: CMP AL,0x64 JZ 0x00167966 MOVZX EAX,AL CMP EAX,0x75 JZ 0x00167966 CMP EAX,0x73 JNZ 0x0016798e MOV ECX,dword ptr [RBP + -0x60] CMP RCX,0x28 JA 0x00167a07 MOV RAX,RCX ADD RAX,qword ptr [RBP + -0x50] ADD ECX,0x8 MOV dword ptr [RBP + -0x60],ECX JMP 0x00167a13 LAB_00167966: MOV RAX,RBX SUB RAX,R12 CMP RAX,0x3f JBE 0x00167a8a MOV ECX,dword ptr [RBP + -0x60] CMP RCX,0x28 JA 0x001679a4 MOV RAX,RCX ADD RAX,qword ptr [RBP + -0x50] ADD ECX,0x8 MOV dword ptr [RBP + -0x60],ECX JMP 0x001679b0 LAB_0016798e: CMP R12,RBX JZ 0x00167a87 MOV dword ptr [R12],0x25000000 JMP 0x00167900 LAB_001679a4: MOV RAX,qword ptr [RBP + -0x58] LEA RCX,[RAX + 0x8] MOV qword ptr [RBP + -0x58],RCX LAB_001679b0: MOVSXD RDI,dword ptr [RAX] CMP byte ptr [R15],0x64 JNZ 0x001679c3 MOV RSI,R14 MOV EDX,0xfffffff6 JMP 0x001679cd LAB_001679c3: MOV EDI,EDI MOV RSI,R14 MOV EDX,0xa LAB_001679cd: CALL 0x001785ce CMP byte ptr [RBP + -0x40],0x0 JZ 0x00167904 LEA RAX,[RBP + -0x3f] LAB_001679e0: MOV word ptr [R12],0x0 MOV byte ptr [R12 + 0x2],0x0 MOV CL,byte ptr [RAX + -0x1] MOV byte ptr [R12 + 0x3],CL ADD R12,0x4 CMP byte ptr [RAX],0x0 LEA RAX,[RAX + 0x1] JNZ 0x001679e0 JMP 0x00167904 LAB_00167a07: MOV RAX,qword ptr [RBP + -0x58] LEA RCX,[RAX + 0x8] MOV qword ptr [RBP + -0x58],RCX LAB_00167a13: MOV R13,qword ptr [RAX] MOV R14,RBX SUB R14,R12 TEST R13,R13 LEA RAX,[0x17eeee] CMOVZ R13,RAX MOV RDI,R13 CALL 0x00126150 LEA RDX,[RAX*0x4] MOV RCX,R14 SHR RCX,0x2 DEC RCX CMP R14,RDX CMOVA RCX,RAX TEST RCX,RCX JZ 0x00167a7e XOR EAX,EAX LEA R14,[RBP + -0x40] LAB_00167a56: MOV word ptr [R12],0x0 MOV byte ptr [R12 + 0x2],0x0 MOV DL,byte ptr [R13 + RAX*0x1] MOV byte ptr [R12 + 0x3],DL ADD R12,0x4 INC RAX CMP RCX,RAX JNZ 0x00167a56 JMP 0x00167904 LAB_00167a7e: LEA R14,[RBP + -0x40] JMP 0x00167904 LAB_00167a87: MOV R12,RBX LAB_00167a8a: MOV dword ptr [R12],0x0 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00167aba SUB R12,qword ptr [RBP + -0x68] MOV RAX,R12 ADD RSP,0xf8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00167aba: CALL 0x001263a0
long my_snprintf_utf32(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,int4 *param_10,long param_11,byte *param_12, int8 param_13,int8 param_14) { char in_AL; byte bVar1; uint *puVar2; size_t sVar3; size_t sVar4; int8 uVar5; int4 *puVar6; ulong uVar7; int4 *puVar8; char *pcVar9; long in_FS_OFFSET; int1 local_128 [32]; int8 local_108; int8 local_100; int8 local_f8; int8 local_e8; int8 local_d8; int8 local_c8; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int4 *local_70; ulong local_68; uint *local_60; int1 *local_58; char local_48 [16]; long local_38; local_58 = local_128; if (in_AL != '\0') { local_f8 = param_1; local_e8 = param_2; local_d8 = param_3; local_c8 = param_4; local_b8 = param_5; local_a8 = param_6; local_98 = param_7; local_88 = param_8; } local_38 = *(long *)(in_FS_OFFSET + 0x28); local_60 = (uint *)&stack0x00000008; local_68 = 0x3000000020; puVar6 = (int4 *)(param_11 + (long)param_10); local_108 = param_13; local_100 = param_14; local_70 = param_10; do { puVar8 = param_10; if (*param_12 == 0x25) { param_12 = param_12 + 2; while ((bVar1 = param_12[-1], (byte)(bVar1 - 0x30) < 10 || (bVar1 - 0x2d < 2))) { param_12 = param_12 + 1; } if (bVar1 == 0x6c) { bVar1 = *param_12; } else { param_12 = param_12 + -1; } if ((bVar1 == 100) || (bVar1 == 0x75)) { if ((ulong)((long)puVar6 - (long)param_10) < 0x40) { LAB_00167a8a: *puVar8 = 0; if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return (long)puVar8 - (long)local_70; } uVar7 = local_68 & 0xffffffff; if (uVar7 < 0x29) { local_68 = CONCAT44(local_68._4_4_,(int)local_68 + 8); puVar2 = (uint *)(local_58 + uVar7); } else { puVar2 = local_60; local_60 = local_60 + 2; } uVar7 = (ulong)(int)*puVar2; if (*param_12 == 100) { uVar5 = 0xfffffff6; } else { uVar7 = (ulong)*puVar2; uVar5 = 10; } int10_to_str(uVar7,local_48,uVar5); if (local_48[0] != '\0') { pcVar9 = local_48; do { pcVar9 = pcVar9 + 1; *(int2 *)param_10 = 0; *(int1 *)((long)param_10 + 2) = 0; *(char *)((long)param_10 + 3) = pcVar9[-1]; param_10 = param_10 + 1; } while (*pcVar9 != '\0'); } } else { if (bVar1 != 0x73) { puVar8 = puVar6; if (param_10 != puVar6) { *param_10 = 0x25000000; goto LAB_00167900; } goto LAB_00167a8a; } uVar7 = local_68 & 0xffffffff; if (uVar7 < 0x29) { local_68 = CONCAT44(local_68._4_4_,(int)local_68 + 8); puVar2 = (uint *)(local_58 + uVar7); } else { puVar2 = local_60; local_60 = local_60 + 2; } pcVar9 = *(char **)puVar2; if (pcVar9 == (char *)0x0) { pcVar9 = "(null)"; } sVar3 = strlen(pcVar9); sVar4 = ((ulong)((long)puVar6 - (long)param_10) >> 2) - 1; if (sVar3 * 4 < (ulong)((long)puVar6 - (long)param_10)) { sVar4 = sVar3; } if (sVar4 != 0) { sVar3 = 0; do { *(int2 *)param_10 = 0; *(int1 *)((long)param_10 + 2) = 0; *(char *)((long)param_10 + 3) = pcVar9[sVar3]; param_10 = param_10 + 1; sVar3 = sVar3 + 1; } while (sVar4 != sVar3); } } } else { if ((*param_12 == 0) || (puVar6 <= param_10)) goto LAB_00167a8a; *(int2 *)param_10 = 0; *(int1 *)((long)param_10 + 2) = 0; *(byte *)((long)param_10 + 3) = *param_12; LAB_00167900: param_10 = param_10 + 1; } param_12 = param_12 + 1; } while( true ); }
13,141
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>::basic_json<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
hkr04[P]cpp-mcp/common/json.hpp
basic_json(CompatibleType && val) noexcept(noexcept( // NOLINT(bugprone-forwarding-reference-overload,bugprone-exception-escape) JSONSerializer<U>::to_json(std::declval<basic_json_t&>(), std::forward<CompatibleType>(val)))) { JSONSerializer<U>::to_json(*this, std::forward<CompatibleType>(val)); set_parents(); assert_invariant(); }
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>::basic_json<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r15 movq %rdi, %rbx leaq 0x8(%rdi), %r14 xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq %r14, %rdi xorl %esi, %esi callq 0xf9b0 movb $0x3, (%rbx) movq %r15, %rdi callq 0x103fc movq %rax, (%r14) popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq %rbx, %rdi callq 0xf998 movq %r14, %rdi callq 0xaa50
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_: push r15 push r14 push rbx mov r15, rsi mov rbx, rdi lea r14, [rdi+8] xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov rdi, r14 xor esi, esi call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_value7destroyENS0_6detail7value_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::json_value::destroy(nlohmann::json_abi_v3_11_3::detail::value_t) mov byte ptr [rbx], 3 mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS9_JRKS9_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::string,std::string const&>(std::string const&) mov [r14], rax pop rbx pop r14 pop r15 retn mov r14, rax mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, r14 call __Unwind_Resume
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_: PUSH R15 PUSH R14 PUSH RBX MOV R15,RSI MOV RBX,RDI LEA R14,[RDI + 0x8] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 LAB_0010eb55: MOV RDI,R14 XOR ESI,ESI CALL 0x0010f9b0 MOV byte ptr [RBX],0x3 MOV RDI,R15 CALL 0x001103fc LAB_0010eb6a: MOV qword ptr [R14],RAX POP RBX POP R14 POP R15 RET
void _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_ (int8 *param_1,string *param_2) { string *psVar1; *param_1 = 0; param_1[1] = 0; /* try { // try from 0010eb55 to 0010eb69 has its CatchHandler @ 0010eb73 */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::json_value::destroy((json_value *)(param_1 + 1),0); *(int1 *)param_1 = 3; psVar1 = 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> ::create<std::__cxx11::string,std::__cxx11::string_const&>(param_2); *(string **)(param_1 + 1) = psVar1; return; }
13,142
testing::internal::UnitTestOptions::GetOutputFormat[abi:cxx11]()
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
std::string UnitTestOptions::GetOutputFormat() { std::string s = GTEST_FLAG_GET(output); const char* const gtest_output_flag = s.c_str(); const char* const colon = strchr(gtest_output_flag, ':'); return (colon == nullptr) ? std::string(gtest_output_flag) : std::string(gtest_output_flag, static_cast<size_t>(colon - gtest_output_flag)); }
O1
cpp
testing::internal::UnitTestOptions::GetOutputFormat[abi:cxx11](): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) movq 0x3e9f9(%rip), %rsi # 0x596d0 movq 0x3e9fa(%rip), %rdx # 0x596d8 addq %rsi, %rdx leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x39594 movq (%r14), %r15 movq %r15, %rdi movl $0x3a, %esi callq 0x81d0 movq %rax, %r14 testq %rax, %rax je 0x1ad1d leaq 0x10(%rbx), %rax movq %rax, (%rbx) movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x39504 jmp 0x1ad2d leaq 0x7(%rsp), %rdx movq %rbx, %rdi movq %r15, %rsi callq 0x81e0 testq %r14, %r14 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x1ad47 movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq jmp 0x1ad58 movq %rax, %rbx testq %r14, %r14 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x1ad75 movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 movq %rbx, %rdi callq 0x8990 nop
_ZN7testing8internal15UnitTestOptions15GetOutputFormatB5cxx11Ev: push r15 push r14 push r12 push rbx sub rsp, 28h mov rbx, rdi lea r12, [rsp+48h+var_30] mov [r12-10h], r12 mov rsi, cs:_ZN7testing18FLAGS_gtest_outputB5cxx11E; testing::FLAGS_gtest_output mov rdx, cs:qword_596D8 add rdx, rsi lea r14, [rsp+48h+var_40] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov r15, [r14] mov rdi, r15 mov esi, 3Ah ; ':' call _strchr mov r14, rax test rax, rax jz short loc_1AD1D lea rax, [rbx+10h] mov [rbx], rax mov rdi, rbx mov rsi, r15 mov rdx, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) jmp short loc_1AD2D loc_1AD1D: lea rdx, [rsp+48h+var_41] mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) loc_1AD2D: test r14, r14 mov rdi, [rsp+48h+var_40]; void * cmp rdi, r12 jz short loc_1AD47 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1AD47: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r14 pop r15 retn jmp short $+2 loc_1AD58: mov rbx, rax test r14, r14 mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_1AD75 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1AD75: mov rdi, rbx call __Unwind_Resume
_QWORD * testing::internal::UnitTestOptions::GetOutputFormat[abi:cxx11](_QWORD *a1) { void *v1; // r15 long long v2; // r14 char v4; // [rsp+7h] [rbp-41h] BYREF void *v5; // [rsp+8h] [rbp-40h] BYREF _QWORD v6[6]; // [rsp+18h] [rbp-30h] BYREF v5 = v6; std::string::_M_construct<char *>( &v5, testing::FLAGS_gtest_output[abi:cxx11], testing::FLAGS_gtest_output[abi:cxx11] + qword_596D8); v1 = v5; v2 = strchr(v5, 58LL); if ( v2 ) { *a1 = a1 + 2; std::string::_M_construct<char const*>(a1, v1, v2); } else { std::string::basic_string(a1, v1, &v4); } if ( v5 != v6 ) operator delete(v5, v6[0] + 1LL); return a1; }
GetOutputFormat[abi:cxx11]: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDI LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 MOV RSI,qword ptr [0x001596d0] MOV RDX,qword ptr [0x001596d8] ADD RDX,RSI LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x00139594 MOV R15,qword ptr [R14] MOV RDI,R15 MOV ESI,0x3a CALL 0x001081d0 MOV R14,RAX TEST RAX,RAX JZ 0x0011ad1d LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LAB_0011ad0d: MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x00139504 JMP 0x0011ad2d LAB_0011ad1d: LEA RDX,[RSP + 0x7] MOV RDI,RBX MOV RSI,R15 CALL 0x001081e0 LAB_0011ad2d: TEST R14,R14 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x0011ad47 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001084e0 LAB_0011ad47: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R14 POP R15 RET
/* testing::internal::UnitTestOptions::GetOutputFormat[abi:cxx11]() */ UnitTestOptions * __thiscall testing::internal::UnitTestOptions::GetOutputFormat_abi_cxx11_(UnitTestOptions *this) { long *plVar1; char *pcVar2; allocator local_41; long *local_40 [2]; long local_30 [2]; local_40[0] = local_30; std::__cxx11::string::_M_construct<char*> (local_40,FLAGS_gtest_output_abi_cxx11_,DAT_001596d8 + FLAGS_gtest_output_abi_cxx11_); plVar1 = local_40[0]; pcVar2 = strchr((char *)local_40[0],0x3a); if (pcVar2 == (char *)0x0) { /* try { // try from 0011ad1d to 0011ad2c has its CatchHandler @ 0011ad56 */ std::__cxx11::string::string((string *)this,(char *)plVar1,&local_41); } else { *(UnitTestOptions **)this = this + 0x10; /* try { // try from 0011ad0d to 0011ad1a has its CatchHandler @ 0011ad58 */ std::__cxx11::string::_M_construct<char_const*>(this,plVar1,pcVar2); } if (local_40[0] != local_30) { operator_delete(local_40[0],local_30[0] + 1); } return this; }
13,143
dump_trigger_old
eloqsql/client/mysqldump.c
static void dump_trigger_old(FILE *sql_file, MYSQL_RES *show_triggers_rs, MYSQL_ROW *show_trigger_row, const char *table_name) { char quoted_table_name_buf[NAME_LEN * 2 + 3]; char *quoted_table_name= quote_name(table_name, quoted_table_name_buf, 1); char name_buff[NAME_LEN * 4 + 3]; const char *xml_msg= "\nWarning! mysqldump being run against old server " "that does not\nsupport 'SHOW CREATE TRIGGER' " "statement. Skipping..\n"; DBUG_ENTER("dump_trigger_old"); if (opt_xml) { print_xml_comment(sql_file, strlen(xml_msg), xml_msg); check_io(sql_file); DBUG_VOID_RETURN; } fprintf(sql_file, "--\n" "-- WARNING: old server version. " "The following dump may be incomplete.\n" "--\n"); if (opt_compact) fprintf(sql_file, "/*!50003 SET @OLD_SQL_MODE=@@SQL_MODE*/;\n"); if (opt_drop_trigger) fprintf(sql_file, "/*!50032 DROP TRIGGER IF EXISTS %s */;\n", (*show_trigger_row)[0]); fprintf(sql_file, "DELIMITER ;;\n" "/*!50003 SET SESSION SQL_MODE=\"%s\" */;;\n" "/*!50003 CREATE */ ", (*show_trigger_row)[6]); if (mysql_num_fields(show_triggers_rs) > 7) { /* mysqldump can be run against the server, that does not support definer in triggers (there is no DEFINER column in SHOW TRIGGERS output). So, we should check if we have this column before accessing it. */ size_t user_name_len; char user_name_str[USERNAME_LENGTH + 1]; char quoted_user_name_str[USERNAME_LENGTH * 2 + 3]; size_t host_name_len; char host_name_str[HOSTNAME_LENGTH + 1]; char quoted_host_name_str[HOSTNAME_LENGTH * 2 + 3]; parse_user((*show_trigger_row)[7], strlen((*show_trigger_row)[7]), user_name_str, &user_name_len, host_name_str, &host_name_len); fprintf(sql_file, "/*!50017 DEFINER=%s@%s */ ", quote_name(user_name_str, quoted_user_name_str, FALSE), quote_name(host_name_str, quoted_host_name_str, FALSE)); } fprintf(sql_file, "/*!50003 TRIGGER %s %s %s ON %s FOR EACH ROW%s%s */;;\n" "DELIMITER ;\n", quote_name((*show_trigger_row)[0], name_buff, 0), /* Trigger */ (*show_trigger_row)[4], /* Timing */ (*show_trigger_row)[1], /* Event */ quoted_table_name, (strchr(" \t\n\r", *((*show_trigger_row)[3]))) ? "" : " ", (*show_trigger_row)[3] /* Statement */); if (opt_compact) fprintf(sql_file, "/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE */;\n"); DBUG_VOID_RETURN; }
O0
c
dump_trigger_old: pushq %rbp movq %rsp, %rbp subq $0xff0, %rsp # imm = 0xFF0 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0xf58(%rbp) movq %rsi, -0xf60(%rbp) movq %rdx, -0xf68(%rbp) movq %rcx, -0xf70(%rbp) movq -0xf70(%rbp), %rdi leaq -0x210(%rbp), %rsi movl $0x1, %edx callq 0x3fd90 movq %rax, -0xf78(%rbp) leaq 0x98509(%rip), %rax # 0xdd133 movq %rax, -0xf80(%rbp) cmpb $0x0, 0x3bc9b0(%rip) # 0x4015e8 je 0x44c7b movq -0xf58(%rbp), %rax movq %rax, -0xf98(%rbp) movq -0xf80(%rbp), %rdi callq 0x38410 movq -0xf98(%rbp), %rdi movq %rax, %rsi movq -0xf80(%rbp), %rdx callq 0x3de50 movq -0xf58(%rbp), %rdi callq 0x38d60 jmp 0x44eca movq -0xf58(%rbp), %rdi leaq 0x9851e(%rip), %rsi # 0xdd1a7 movb $0x0, %al callq 0x381d0 cmpb $0x0, 0x3bcb99(%rip) # 0x401830 je 0x44cae movq -0xf58(%rbp), %rdi leaq 0x9854d(%rip), %rsi # 0xdd1f4 movb $0x0, %al callq 0x381d0 cmpb $0x0, 0x3bcb6d(%rip) # 0x401822 je 0x44cd9 movq -0xf58(%rbp), %rdi movq -0xf68(%rbp), %rax movq (%rax), %rax movq (%rax), %rdx leaq 0x980a6(%rip), %rsi # 0xdcd78 movb $0x0, %al callq 0x381d0 movq -0xf58(%rbp), %rdi movq -0xf68(%rbp), %rax movq (%rax), %rax movq 0x30(%rax), %rdx leaq 0x98529(%rip), %rsi # 0xdd21e movb $0x0, %al callq 0x381d0 movq -0xf60(%rbp), %rdi callq 0x53600 cmpl $0x7, %eax jbe 0x44dc2 movq -0xf68(%rbp), %rax movq (%rax), %rax movq 0x38(%rax), %rax movq %rax, -0xfb0(%rbp) movq -0xf68(%rbp), %rax movq (%rax), %rax movq 0x38(%rax), %rdi callq 0x38410 movq -0xfb0(%rbp), %rdi movq %rax, %rsi leaq -0x830(%rbp), %rdx leaq -0xd40(%rbp), %r8 leaq -0xf88(%rbp), %rcx leaq -0xf90(%rbp), %r9 callq 0x47690 movq -0xf58(%rbp), %rax movq %rax, -0xfa8(%rbp) leaq -0x830(%rbp), %rdi leaq -0xc40(%rbp), %rsi xorl %edx, %edx callq 0x3fd90 movq %rax, -0xfa0(%rbp) leaq -0xd40(%rbp), %rdi leaq -0xf50(%rbp), %rsi xorl %edx, %edx callq 0x3fd90 movq -0xfa8(%rbp), %rdi movq -0xfa0(%rbp), %rdx movq %rax, %rcx leaq 0x984ac(%rip), %rsi # 0xdd267 movb $0x0, %al callq 0x381d0 movq -0xf58(%rbp), %rax movq %rax, -0xfd8(%rbp) movq -0xf68(%rbp), %rax movq (%rax), %rax movq (%rax), %rdi leaq -0x620(%rbp), %rsi xorl %edx, %edx callq 0x3fd90 movq %rax, -0xfd0(%rbp) movq -0xf68(%rbp), %rax movq (%rax), %rax movq 0x20(%rax), %rax movq %rax, -0xfc8(%rbp) movq -0xf68(%rbp), %rax movq (%rax), %rax movq 0x8(%rax), %rax movq %rax, -0xfc0(%rbp) movq -0xf78(%rbp), %rax movq %rax, -0xfb8(%rbp) movq -0xf68(%rbp), %rax movq (%rax), %rax movq 0x18(%rax), %rax movsbl (%rax), %esi leaq 0x98483(%rip), %rdi # 0xdd2c5 callq 0x38500 movq -0xfd8(%rbp), %rdi movq -0xfd0(%rbp), %rdx movq -0xfc8(%rbp), %rcx movq -0xfc0(%rbp), %r8 movq -0xfb8(%rbp), %r9 movq %rax, %rsi leaq 0x966aa(%rip), %r10 # 0xdb51e leaq 0x97cd1(%rip), %rax # 0xdcb4c cmpq $0x0, %rsi cmovneq %rax, %r10 movq -0xf68(%rbp), %rax movq (%rax), %rax movq 0x18(%rax), %rax leaq 0x983ea(%rip), %rsi # 0xdd282 movq %r10, (%rsp) movq %rax, 0x8(%rsp) movb $0x0, %al callq 0x381d0 cmpb $0x0, 0x3bc981(%rip) # 0x401830 je 0x44ec6 movq -0xf58(%rbp), %rdi leaq 0x9840b(%rip), %rsi # 0xdd2ca movb $0x0, %al callq 0x381d0 jmp 0x44ec8 jmp 0x44eca movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x44ee5 addq $0xff0, %rsp # imm = 0xFF0 popq %rbp retq callq 0x382c0 nopw (%rax,%rax)
dump_trigger_old: push rbp mov rbp, rsp sub rsp, 0FF0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_F58], rdi mov [rbp+var_F60], rsi mov [rbp+var_F68], rdx mov [rbp+var_F70], rcx mov rdi, [rbp+var_F70] lea rsi, [rbp+var_210] mov edx, 1 call quote_name mov [rbp+var_F78], rax lea rax, aWarningMysqldu; "\nWarning! mysqldump being run against "... mov [rbp+var_F80], rax cmp cs:opt_xml, 0 jz short loc_44C7B mov rax, [rbp+var_F58] mov [rbp+var_F98], rax mov rdi, [rbp+var_F80] call _strlen mov rdi, [rbp+var_F98] mov rsi, rax mov rdx, [rbp+var_F80] call print_xml_comment mov rdi, [rbp+var_F58] call check_io jmp loc_44ECA loc_44C7B: mov rdi, [rbp+var_F58] lea rsi, aWarningOldServ; "--\n-- WARNING: old server version. The"... mov al, 0 call _fprintf cmp cs:opt_compact, 0 jz short loc_44CAE mov rdi, [rbp+var_F58] lea rsi, a50003SetOldSql; "/*!50003 SET @OLD_SQL_MODE=@@SQL_MODE*/"... mov al, 0 call _fprintf loc_44CAE: cmp cs:opt_drop_trigger, 0 jz short loc_44CD9 mov rdi, [rbp+var_F58] mov rax, [rbp+var_F68] mov rax, [rax] mov rdx, [rax] lea rsi, a50032DropTrigg; "/*!50032 DROP TRIGGER IF EXISTS %s */;"... mov al, 0 call _fprintf loc_44CD9: mov rdi, [rbp+var_F58] mov rax, [rbp+var_F68] mov rax, [rax] mov rdx, [rax+30h] lea rsi, aDelimiter50003_0; "DELIMITER ;;\n/*!50003 SET SESSION SQL_"... mov al, 0 call _fprintf mov rdi, [rbp+var_F60] call mysql_num_fields cmp eax, 7 jbe loc_44DC2 mov rax, [rbp+var_F68] mov rax, [rax] mov rax, [rax+38h] mov [rbp+var_FB0], rax mov rax, [rbp+var_F68] mov rax, [rax] mov rdi, [rax+38h] call _strlen mov rdi, [rbp+var_FB0] mov rsi, rax lea rdx, [rbp+var_830] lea r8, [rbp+var_D40] lea rcx, [rbp+var_F88] lea r9, [rbp+var_F90] call parse_user mov rax, [rbp+var_F58] mov [rbp+var_FA8], rax lea rdi, [rbp+var_830] lea rsi, [rbp+var_C40] xor edx, edx call quote_name mov [rbp+var_FA0], rax lea rdi, [rbp+var_D40] lea rsi, [rbp+var_F50] xor edx, edx call quote_name mov rdi, [rbp+var_FA8] mov rdx, [rbp+var_FA0] mov rcx, rax lea rsi, a50017DefinerSS; "/*!50017 DEFINER=%s@%s */ " mov al, 0 call _fprintf loc_44DC2: mov rax, [rbp+var_F58] mov [rbp+var_FD8], rax mov rax, [rbp+var_F68] mov rax, [rax] mov rdi, [rax] lea rsi, [rbp+var_620] xor edx, edx call quote_name mov [rbp+var_FD0], rax mov rax, [rbp+var_F68] mov rax, [rax] mov rax, [rax+20h] mov [rbp+var_FC8], rax mov rax, [rbp+var_F68] mov rax, [rax] mov rax, [rax+8] mov [rbp+var_FC0], rax mov rax, [rbp+var_F78] mov [rbp+var_FB8], rax mov rax, [rbp+var_F68] mov rax, [rax] mov rax, [rax+18h] movsx esi, byte ptr [rax] lea rdi, asc_DD2C5; " \t\n\r" call _strchr mov rdi, [rbp+var_FD8] mov rdx, [rbp+var_FD0] mov rcx, [rbp+var_FC8] mov r8, [rbp+var_FC0] mov r9, [rbp+var_FB8] mov rsi, rax lea r10, aHostS+0Eh; " " lea rax, asc_DCB4A+2; "" cmp rsi, 0 cmovnz r10, rax mov rax, [rbp+var_F68] mov rax, [rax] mov rax, [rax+18h] lea rsi, a50003TriggerSS; "/*!50003 TRIGGER %s %s %s ON %s FOR EAC"... mov [rsp+0FF0h+var_FF0], r10 mov [rsp+0FF0h+var_FE8], rax mov al, 0 call _fprintf cmp cs:opt_compact, 0 jz short loc_44EC6 mov rdi, [rbp+var_F58] lea rsi, a50003SetSessio; "/*!50003 SET SESSION SQL_MODE=@OLD_SQL_"... mov al, 0 call _fprintf loc_44EC6: jmp short $+2 loc_44EC8: jmp short $+2 loc_44ECA: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_44EE5 add rsp, 0FF0h pop rbp retn loc_44EE5: call ___stack_chk_fail
unsigned long long dump_trigger_old(long long a1, long long a2, char ***a3, char *a4) { long long v4; // rax long long v5; // rax char *v6; // rax long long v7; // rax const char *v8; // r10 long long v10; // [rsp+18h] [rbp-FD8h] char *v11; // [rsp+20h] [rbp-FD0h] const char *v12; // [rsp+28h] [rbp-FC8h] const char *v13; // [rsp+30h] [rbp-FC0h] const char *v14; // [rsp+38h] [rbp-FB8h] char *v15; // [rsp+40h] [rbp-FB0h] long long v16; // [rsp+48h] [rbp-FA8h] char *v17; // [rsp+50h] [rbp-FA0h] _BYTE v18[8]; // [rsp+60h] [rbp-F90h] BYREF _BYTE v19[8]; // [rsp+68h] [rbp-F88h] BYREF char *v20; // [rsp+70h] [rbp-F80h] char *v21; // [rsp+78h] [rbp-F78h] char *v22; // [rsp+80h] [rbp-F70h] char ***v23; // [rsp+88h] [rbp-F68h] long long v24; // [rsp+90h] [rbp-F60h] long long v25; // [rsp+98h] [rbp-F58h] char v26[528]; // [rsp+A0h] [rbp-F50h] BYREF char v27[256]; // [rsp+2B0h] [rbp-D40h] BYREF char v28[1040]; // [rsp+3B0h] [rbp-C40h] BYREF char v29[528]; // [rsp+7C0h] [rbp-830h] BYREF char v30[1040]; // [rsp+9D0h] [rbp-620h] BYREF char v31[520]; // [rsp+DE0h] [rbp-210h] BYREF unsigned long long v32; // [rsp+FE8h] [rbp-8h] v32 = __readfsqword(0x28u); v25 = a1; v24 = a2; v23 = a3; v22 = a4; v21 = quote_name(a4, v31, 1); v20 = "\n" "Warning! mysqldump being run against old server that does not\n" "support 'SHOW CREATE TRIGGER' statement. Skipping..\n"; if ( opt_xml ) { v4 = strlen(v20); print_xml_comment(v25, v4, v20); check_io(v25); } else { fprintf(v25, "--\n-- WARNING: old server version. The following dump may be incomplete.\n--\n"); if ( opt_compact ) fprintf(v25, "/*!50003 SET @OLD_SQL_MODE=@@SQL_MODE*/;\n"); if ( opt_drop_trigger ) fprintf(v25, "/*!50032 DROP TRIGGER IF EXISTS %s */;\n", **v23); fprintf(v25, "DELIMITER ;;\n/*!50003 SET SESSION SQL_MODE=\"%s\" */;;\n/*!50003 CREATE */ ", (*v23)[6]); if ( (unsigned int)mysql_num_fields(v24) > 7 ) { v15 = (*v23)[7]; v5 = strlen(v15); parse_user(v15, v5, v29, v19, v27, v18); v16 = v25; v17 = quote_name(v29, v28, 0); v6 = quote_name(v27, v26, 0); fprintf(v16, "/*!50017 DEFINER=%s@%s */ ", v17, v6); } v10 = v25; v11 = quote_name(**v23, v30, 0); v12 = (*v23)[4]; v13 = (*v23)[1]; v14 = v21; v7 = strchr(" \t\n\r", (unsigned int)*(*v23)[3]); v8 = " "; if ( v7 ) v8 = ""; fprintf( v10, "/*!50003 TRIGGER %s %s %s ON %s FOR EACH ROW%s%s */;;\nDELIMITER ;\n", v11, v12, v13, v14, v8, (*v23)[3]); if ( opt_compact ) fprintf(v25, "/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE */;\n"); } return __readfsqword(0x28u); }
dump_trigger_old: PUSH RBP MOV RBP,RSP SUB RSP,0xff0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0xf58],RDI MOV qword ptr [RBP + -0xf60],RSI MOV qword ptr [RBP + -0xf68],RDX MOV qword ptr [RBP + -0xf70],RCX MOV RDI,qword ptr [RBP + -0xf70] LEA RSI,[RBP + -0x210] MOV EDX,0x1 CALL 0x0013fd90 MOV qword ptr [RBP + -0xf78],RAX LEA RAX,[0x1dd133] MOV qword ptr [RBP + -0xf80],RAX CMP byte ptr [0x005015e8],0x0 JZ 0x00144c7b MOV RAX,qword ptr [RBP + -0xf58] MOV qword ptr [RBP + -0xf98],RAX MOV RDI,qword ptr [RBP + -0xf80] CALL 0x00138410 MOV RDI,qword ptr [RBP + -0xf98] MOV RSI,RAX MOV RDX,qword ptr [RBP + -0xf80] CALL 0x0013de50 MOV RDI,qword ptr [RBP + -0xf58] CALL 0x00138d60 JMP 0x00144eca LAB_00144c7b: MOV RDI,qword ptr [RBP + -0xf58] LEA RSI,[0x1dd1a7] MOV AL,0x0 CALL 0x001381d0 CMP byte ptr [0x00501830],0x0 JZ 0x00144cae MOV RDI,qword ptr [RBP + -0xf58] LEA RSI,[0x1dd1f4] MOV AL,0x0 CALL 0x001381d0 LAB_00144cae: CMP byte ptr [0x00501822],0x0 JZ 0x00144cd9 MOV RDI,qword ptr [RBP + -0xf58] MOV RAX,qword ptr [RBP + -0xf68] MOV RAX,qword ptr [RAX] MOV RDX,qword ptr [RAX] LEA RSI,[0x1dcd78] MOV AL,0x0 CALL 0x001381d0 LAB_00144cd9: MOV RDI,qword ptr [RBP + -0xf58] MOV RAX,qword ptr [RBP + -0xf68] MOV RAX,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x30] LEA RSI,[0x1dd21e] MOV AL,0x0 CALL 0x001381d0 MOV RDI,qword ptr [RBP + -0xf60] CALL 0x00153600 CMP EAX,0x7 JBE 0x00144dc2 MOV RAX,qword ptr [RBP + -0xf68] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0xfb0],RAX MOV RAX,qword ptr [RBP + -0xf68] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + 0x38] CALL 0x00138410 MOV RDI,qword ptr [RBP + -0xfb0] MOV RSI,RAX LEA RDX,[RBP + -0x830] LEA R8,[RBP + -0xd40] LEA RCX,[RBP + -0xf88] LEA R9,[RBP + -0xf90] CALL 0x00147690 MOV RAX,qword ptr [RBP + -0xf58] MOV qword ptr [RBP + -0xfa8],RAX LEA RDI,[RBP + -0x830] LEA RSI,[RBP + -0xc40] XOR EDX,EDX CALL 0x0013fd90 MOV qword ptr [RBP + -0xfa0],RAX LEA RDI,[RBP + -0xd40] LEA RSI,[RBP + -0xf50] XOR EDX,EDX CALL 0x0013fd90 MOV RDI,qword ptr [RBP + -0xfa8] MOV RDX,qword ptr [RBP + -0xfa0] MOV RCX,RAX LEA RSI,[0x1dd267] MOV AL,0x0 CALL 0x001381d0 LAB_00144dc2: MOV RAX,qword ptr [RBP + -0xf58] MOV qword ptr [RBP + -0xfd8],RAX MOV RAX,qword ptr [RBP + -0xf68] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX] LEA RSI,[RBP + -0x620] XOR EDX,EDX CALL 0x0013fd90 MOV qword ptr [RBP + -0xfd0],RAX MOV RAX,qword ptr [RBP + -0xf68] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0xfc8],RAX MOV RAX,qword ptr [RBP + -0xf68] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0xfc0],RAX MOV RAX,qword ptr [RBP + -0xf78] MOV qword ptr [RBP + -0xfb8],RAX MOV RAX,qword ptr [RBP + -0xf68] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x18] MOVSX ESI,byte ptr [RAX] LEA RDI,[0x1dd2c5] CALL 0x00138500 MOV RDI,qword ptr [RBP + -0xfd8] MOV RDX,qword ptr [RBP + -0xfd0] MOV RCX,qword ptr [RBP + -0xfc8] MOV R8,qword ptr [RBP + -0xfc0] MOV R9,qword ptr [RBP + -0xfb8] MOV RSI,RAX LEA R10,[0x1db51e] LEA RAX,[0x1dcb4c] CMP RSI,0x0 CMOVNZ R10,RAX MOV RAX,qword ptr [RBP + -0xf68] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x18] LEA RSI,[0x1dd282] MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX MOV AL,0x0 CALL 0x001381d0 CMP byte ptr [0x00501830],0x0 JZ 0x00144ec6 MOV RDI,qword ptr [RBP + -0xf58] LEA RSI,[0x1dd2ca] MOV AL,0x0 CALL 0x001381d0 LAB_00144ec6: JMP 0x00144ec8 LAB_00144ec8: JMP 0x00144eca LAB_00144eca: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00144ee5 ADD RSP,0xff0 POP RBP RET LAB_00144ee5: CALL 0x001382c0
void dump_trigger_old(FILE *param_1,int8 param_2,long *param_3,int8 param_4) { int8 uVar1; FILE *pFVar2; uint uVar3; size_t sVar4; int8 uVar5; int8 uVar6; int8 uVar7; char *pcVar8; char *pcVar9; long in_FS_OFFSET; int1 local_f98 [8]; int1 local_f90 [8]; char *local_f88; int8 local_f80; int8 local_f78; long *local_f70; int8 local_f68; FILE *local_f60; int1 local_f58 [528]; int1 local_d48 [256]; int1 local_c48 [1040]; int1 local_838 [528]; int1 local_628 [1040]; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_f78 = param_4; local_f70 = param_3; local_f68 = param_2; local_f60 = param_1; local_f80 = quote_name(param_4,local_218,1); pFVar2 = local_f60; local_f88 = "\nWarning! mysqldump being run against old server that does not\nsupport \'SHOW CREATE TRIGGER\' statement. Skipping..\n" ; if (opt_xml == '\0') { fprintf(local_f60, "--\n-- WARNING: old server version. The following dump may be incomplete.\n--\n"); if (opt_compact != '\0') { fprintf(local_f60,"/*!50003 SET @OLD_SQL_MODE=@@SQL_MODE*/;\n"); } if (opt_drop_trigger != '\0') { fprintf(local_f60,"/*!50032 DROP TRIGGER IF EXISTS %s */;\n",*(int8 *)*local_f70); } fprintf(local_f60,"DELIMITER ;;\n/*!50003 SET SESSION SQL_MODE=\"%s\" */;;\n/*!50003 CREATE */ " ,*(int8 *)(*local_f70 + 0x30)); uVar3 = mysql_num_fields(local_f68); if (7 < uVar3) { uVar5 = *(int8 *)(*local_f70 + 0x38); sVar4 = strlen(*(char **)(*local_f70 + 0x38)); parse_user(uVar5,sVar4,local_838,local_f90,local_d48,local_f98); pFVar2 = local_f60; uVar5 = quote_name(local_838,local_c48,0); uVar6 = quote_name(local_d48,local_f58,0); fprintf(pFVar2,"/*!50017 DEFINER=%s@%s */ ",uVar5,uVar6); } pFVar2 = local_f60; uVar7 = quote_name(*(int8 *)*local_f70,local_628,0); uVar1 = local_f80; uVar5 = *(int8 *)(*local_f70 + 0x20); uVar6 = *(int8 *)(*local_f70 + 8); pcVar8 = strchr(" \t\n\r",(int)**(char **)(*local_f70 + 0x18)); pcVar9 = " "; if (pcVar8 != (char *)0x0) { pcVar9 = &DAT_001dcb4c; } fprintf(pFVar2,"/*!50003 TRIGGER %s %s %s ON %s FOR EACH ROW%s%s */;;\nDELIMITER ;\n",uVar7, uVar5,uVar6,uVar1,pcVar9,*(int8 *)(*local_f70 + 0x18)); if (opt_compact != '\0') { fprintf(local_f60,"/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE */;\n"); } } else { sVar4 = strlen( "\nWarning! mysqldump being run against old server that does not\nsupport \'SHOW CREATE TRIGGER\' statement. Skipping..\n" ); print_xml_comment(pFVar2,sVar4,local_f88); check_io(local_f60); } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return; }
13,144
js_regexp_toString
bluesky950520[P]quickjs/quickjs.c
static JSValue js_regexp_toString(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue pattern, flags; StringBuffer b_s, *b = &b_s; if (!JS_IsObject(this_val)) return JS_ThrowTypeErrorNotAnObject(ctx); string_buffer_init(ctx, b, 0); string_buffer_putc8(b, '/'); pattern = JS_GetProperty(ctx, this_val, JS_ATOM_source); if (string_buffer_concat_value_free(b, pattern)) goto fail; string_buffer_putc8(b, '/'); flags = JS_GetProperty(ctx, this_val, JS_ATOM_flags); if (string_buffer_concat_value_free(b, flags)) goto fail; return string_buffer_end(b); fail: string_buffer_free(b); return JS_EXCEPTION; }
O1
c
js_regexp_toString: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %rbx movq %rdi, %r14 cmpl $-0x1, %ebx jne 0x484a6 movq %rsi, %r15 movq %r14, 0x8(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rsp) movq %r14, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x1ff5f movq %rax, 0x10(%rsp) testq %rax, %rax je 0x484ed leaq 0x8(%rsp), %r12 movq %r12, %rdi movl $0x2f, %esi callq 0x4ac4d movq %r14, %rdi movq %r15, %rsi movq %rbx, %rdx movl $0x6d, %ecx movq %r15, %r8 movq %rbx, %r9 pushq $0x0 pushq $0x0 callq 0x2238f addq $0x10, %rsp movq %r12, %rdi movq %rax, %rsi callq 0x4aca2 testl %eax, %eax jne 0x48485 leaq 0x8(%rsp), %r12 movq %r12, %rdi movl $0x2f, %esi callq 0x4ac4d movq %r14, %rdi movq %r15, %rsi movq %rbx, %rdx movl $0x6e, %ecx movq %r15, %r8 movq %rbx, %r9 pushq $0x0 pushq $0x0 callq 0x2238f addq $0x10, %rsp movq %r12, %rdi movq %rax, %rsi callq 0x4aca2 testl %eax, %eax je 0x484d2 movq 0x8(%rsp), %rdi movq 0x10(%rsp), %rsi callq 0x1bf85 movq $0x0, 0x10(%rsp) movl $0x6, %edx xorl %ebx, %ebx jmp 0x484be leaq 0x55470(%rip), %rsi # 0x9d91d xorl %ebx, %ebx movq %r14, %rdi xorl %eax, %eax callq 0x21953 movl $0x6, %edx xorl %ecx, %ecx orq %rcx, %rbx movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq leaq 0x8(%rsp), %rdi callq 0x32830 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movl %eax, %ebx jmp 0x484c0 movl $0x0, 0x1c(%rsp) movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF jmp 0x48401
js_regexp_toString: push r15 push r14 push r12 push rbx sub rsp, 28h mov rbx, rdx mov r14, rdi cmp ebx, 0FFFFFFFFh jnz loc_484A6 mov r15, rsi mov [rsp+48h+var_40], r14 xorps xmm0, xmm0 movups [rsp+48h+var_30], xmm0 mov rdi, r14 xor esi, esi xor edx, edx call js_alloc_string mov [rsp+48h+var_38], rax test rax, rax jz loc_484ED loc_48401: lea r12, [rsp+48h+var_40] mov rdi, r12 mov esi, 2Fh ; '/' call string_buffer_putc8 mov rdi, r14 mov rsi, r15 mov rdx, rbx mov ecx, 6Dh ; 'm' mov r8, r15 mov r9, rbx push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov rdi, r12 mov rsi, rax call string_buffer_concat_value_free test eax, eax jnz short loc_48485 lea r12, [rsp+48h+var_40] mov rdi, r12 mov esi, 2Fh ; '/' call string_buffer_putc8 mov rdi, r14 mov rsi, r15 mov rdx, rbx mov ecx, 6Eh ; 'n' mov r8, r15 mov r9, rbx push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov rdi, r12 mov rsi, rax call string_buffer_concat_value_free test eax, eax jz short loc_484D2 loc_48485: mov rdi, [rsp+48h+var_40] mov rsi, [rsp+48h+var_38] call js_free mov [rsp+48h+var_38], 0 mov edx, 6 xor ebx, ebx jmp short loc_484BE loc_484A6: lea rsi, aOperandPrototy+20h; "not an object" xor ebx, ebx mov rdi, r14 xor eax, eax call JS_ThrowTypeError mov edx, 6 loc_484BE: xor ecx, ecx loc_484C0: or rbx, rcx mov rax, rbx add rsp, 28h pop rbx pop r12 pop r14 pop r15 retn loc_484D2: lea rdi, [rsp+48h+var_40] call string_buffer_end mov rcx, 0FFFFFFFF00000000h and rcx, rax mov ebx, eax jmp short loc_484C0 loc_484ED: mov dword ptr [rsp+48h+var_30+4], 0 mov dword ptr [rsp+48h+var_30+0Ch], 0FFFFFFFFh jmp loc_48401
unsigned long long js_regexp_toString( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { unsigned long long PropertyInternal2; // rax long long v16; // rdx unsigned long long v17; // rax long long v18; // rdx long long v19; // rbx unsigned long long v20; // rcx unsigned long long v22; // rax char v23; // [rsp+0h] [rbp-48h] long long v24; // [rsp+8h] [rbp-40h] BYREF long long v25; // [rsp+10h] [rbp-38h] __int128 v26; // [rsp+18h] [rbp-30h] if ( (_DWORD)a3 == -1 ) { v24 = a1; v26 = 0LL; v25 = js_alloc_string(a1, 0LL, 0); if ( !v25 ) { DWORD1(v26) = 0; HIDWORD(v26) = -1; } string_buffer_putc8(&v24, 47LL); PropertyInternal2 = JS_GetPropertyInternal2(a1, a2, a3, 0x6Du, a2, a3, 0LL, 0); if ( !(unsigned int)string_buffer_concat_value_free(&v24, PropertyInternal2, v16) ) { string_buffer_putc8(&v24, 47LL); v17 = JS_GetPropertyInternal2(a1, a2, a3, 0x6Eu, a2, a3, 0LL, 0); if ( !(unsigned int)string_buffer_concat_value_free(&v24, v17, v18) ) { v22 = (unsigned long long)string_buffer_end((long long)&v24); v20 = v22 & 0xFFFFFFFF00000000LL; v19 = (unsigned int)v22; return v20 | v19; } } js_free(v24, v25); v25 = 0LL; v19 = 0LL; } else { v19 = 0LL; JS_ThrowTypeError(a1, (long long)"not an object", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v23); } v20 = 0LL; return v20 | v19; }
js_regexp_toString: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDX MOV R14,RDI CMP EBX,-0x1 JNZ 0x001484a6 MOV R15,RSI MOV qword ptr [RSP + 0x8],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOV RDI,R14 XOR ESI,ESI XOR EDX,EDX CALL 0x0011ff5f MOV qword ptr [RSP + 0x10],RAX TEST RAX,RAX JZ 0x001484ed LAB_00148401: LEA R12,[RSP + 0x8] MOV RDI,R12 MOV ESI,0x2f CALL 0x0014ac4d MOV RDI,R14 MOV RSI,R15 MOV RDX,RBX MOV ECX,0x6d MOV R8,R15 MOV R9,RBX PUSH 0x0 PUSH 0x0 CALL 0x0012238f ADD RSP,0x10 MOV RDI,R12 MOV RSI,RAX CALL 0x0014aca2 TEST EAX,EAX JNZ 0x00148485 LEA R12,[RSP + 0x8] MOV RDI,R12 MOV ESI,0x2f CALL 0x0014ac4d MOV RDI,R14 MOV RSI,R15 MOV RDX,RBX MOV ECX,0x6e MOV R8,R15 MOV R9,RBX PUSH 0x0 PUSH 0x0 CALL 0x0012238f ADD RSP,0x10 MOV RDI,R12 MOV RSI,RAX CALL 0x0014aca2 TEST EAX,EAX JZ 0x001484d2 LAB_00148485: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x10] CALL 0x0011bf85 MOV qword ptr [RSP + 0x10],0x0 MOV EDX,0x6 XOR EBX,EBX JMP 0x001484be LAB_001484a6: LEA RSI,[0x19d91d] XOR EBX,EBX MOV RDI,R14 XOR EAX,EAX CALL 0x00121953 MOV EDX,0x6 LAB_001484be: XOR ECX,ECX LAB_001484c0: OR RBX,RCX MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R14 POP R15 RET LAB_001484d2: LEA RDI,[RSP + 0x8] CALL 0x00132830 MOV RCX,-0x100000000 AND RCX,RAX MOV EBX,EAX JMP 0x001484c0 LAB_001484ed: MOV dword ptr [RSP + 0x1c],0x0 MOV dword ptr [RSP + 0x24],0xffffffff JMP 0x00148401
ulong js_regexp_toString(int8 param_1,int8 param_2,int8 param_3) { int iVar1; int8 uVar2; ulong uVar3; ulong uVar4; int8 local_40; long local_38; ulong local_30; int8 uStack_28; if ((int)param_3 == -1) { local_30 = 0; uStack_28 = 0; local_40 = param_1; local_38 = js_alloc_string(param_1,0,0); if (local_38 == 0) { local_30 = local_30 & 0xffffffff; uStack_28 = CONCAT44(0xffffffff,(int4)uStack_28); } string_buffer_putc8(&local_40,0x2f); uVar2 = JS_GetPropertyInternal2(param_1,param_2,param_3,0x6d,param_2,param_3,0,0); iVar1 = string_buffer_concat_value_free(&local_40,uVar2); if (iVar1 == 0) { string_buffer_putc8(&local_40,0x2f); uVar2 = JS_GetPropertyInternal2(param_1,param_2,param_3,0x6e,param_2,param_3,0,0); iVar1 = string_buffer_concat_value_free(&local_40,uVar2); if (iVar1 == 0) { uVar3 = string_buffer_end(&local_40); uVar4 = uVar3 & 0xffffffff00000000; uVar3 = uVar3 & 0xffffffff; goto LAB_001484c0; } } js_free(local_40,local_38); } else { JS_ThrowTypeError(param_1,"not an object"); } uVar3 = 0; uVar4 = 0; LAB_001484c0: return uVar3 | uVar4; }
13,145
js_regexp_toString
bluesky950520[P]quickjs/quickjs.c
static JSValue js_regexp_toString(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue pattern, flags; StringBuffer b_s, *b = &b_s; if (!JS_IsObject(this_val)) return JS_ThrowTypeErrorNotAnObject(ctx); string_buffer_init(ctx, b, 0); string_buffer_putc8(b, '/'); pattern = JS_GetProperty(ctx, this_val, JS_ATOM_source); if (string_buffer_concat_value_free(b, pattern)) goto fail; string_buffer_putc8(b, '/'); flags = JS_GetProperty(ctx, this_val, JS_ATOM_flags); if (string_buffer_concat_value_free(b, flags)) goto fail; return string_buffer_end(b); fail: string_buffer_free(b); return JS_EXCEPTION; }
O2
c
js_regexp_toString: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %rbx movq %rdi, %r14 cmpl $-0x1, %ebx jne 0x3e4d0 movq %rsi, %r15 leaq 0x8(%rsp), %r12 movq %r14, %rdi movq %r12, %rsi xorl %edx, %edx callq 0x2d4c6 pushq $0x2f popq %rsi movq %r12, %rdi callq 0x408a9 pushq $0x6d popq %rcx movq %r14, %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x1a4c7 movq %r12, %rdi movq %rax, %rsi callq 0x408fa testl %eax, %eax jne 0x3e4c4 leaq 0x8(%rsp), %r12 pushq $0x2f popq %rsi movq %r12, %rdi callq 0x408a9 pushq $0x6e popq %rcx movq %r14, %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x1a4c7 movq %r12, %rdi movq %rax, %rsi callq 0x408fa testl %eax, %eax je 0x3e4ee leaq 0x8(%rsp), %rdi callq 0x2e385 jmp 0x3e4d8 movq %r14, %rdi callq 0x1ca65 pushq $0x6 popq %rdx xorl %eax, %eax xorl %ecx, %ecx orq %rcx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq leaq 0x8(%rsp), %rdi callq 0x2bf58 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movl %eax, %eax jmp 0x3e4df
js_regexp_toString: push r15 push r14 push r12 push rbx sub rsp, 28h mov rbx, rdx mov r14, rdi cmp ebx, 0FFFFFFFFh jnz short loc_3E4D0 mov r15, rsi lea r12, [rsp+48h+var_40] mov rdi, r14 mov rsi, r12 xor edx, edx call string_buffer_init push 2Fh ; '/' pop rsi mov rdi, r12 call string_buffer_putc8 push 6Dh ; 'm' pop rcx mov rdi, r14 mov rsi, r15 mov rdx, rbx call JS_GetProperty mov rdi, r12 mov rsi, rax call string_buffer_concat_value_free test eax, eax jnz short loc_3E4C4 lea r12, [rsp+48h+var_40] push 2Fh ; '/' pop rsi mov rdi, r12 call string_buffer_putc8 push 6Eh ; 'n' pop rcx mov rdi, r14 mov rsi, r15 mov rdx, rbx call JS_GetProperty mov rdi, r12 mov rsi, rax call string_buffer_concat_value_free test eax, eax jz short loc_3E4EE loc_3E4C4: lea rdi, [rsp+48h+var_40] call string_buffer_free jmp short loc_3E4D8 loc_3E4D0: mov rdi, r14 call JS_ThrowTypeErrorNotAnObject loc_3E4D8: push 6 pop rdx xor eax, eax xor ecx, ecx loc_3E4DF: or rax, rcx add rsp, 28h pop rbx pop r12 pop r14 pop r15 retn loc_3E4EE: lea rdi, [rsp+48h+var_40] call string_buffer_end mov rcx, 0FFFFFFFF00000000h and rcx, rax mov eax, eax jmp short loc_3E4DF
unsigned long long js_regexp_toString( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long Property; // rax long long v15; // rdx long long v16; // rax long long v17; // rdx long long v18; // rax unsigned long long v19; // rcx char v21; // [rsp+0h] [rbp-48h] long long v22[8]; // [rsp+8h] [rbp-40h] BYREF if ( (_DWORD)a3 == -1 ) { string_buffer_init(a1, (long long)v22, 0); string_buffer_putc8(v22, 47LL); Property = JS_GetProperty(a1, a2, -1, 109); if ( !(unsigned int)string_buffer_concat_value_free(v22, Property, v15) ) { string_buffer_putc8(v22, 47LL); v16 = JS_GetProperty(a1, a2, -1, 110); if ( !(unsigned int)string_buffer_concat_value_free(v22, v16, v17) ) { v18 = string_buffer_end(v22); v19 = v18 & 0xFFFFFFFF00000000LL; v18 = (unsigned int)v18; return v19 | v18; } } string_buffer_free(v22); } else { JS_ThrowTypeErrorNotAnObject(a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, a5, a6, v21); } v18 = 0LL; v19 = 0LL; return v19 | v18; }
js_regexp_toString: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDX MOV R14,RDI CMP EBX,-0x1 JNZ 0x0013e4d0 MOV R15,RSI LEA R12,[RSP + 0x8] MOV RDI,R14 MOV RSI,R12 XOR EDX,EDX CALL 0x0012d4c6 PUSH 0x2f POP RSI MOV RDI,R12 CALL 0x001408a9 PUSH 0x6d POP RCX MOV RDI,R14 MOV RSI,R15 MOV RDX,RBX CALL 0x0011a4c7 MOV RDI,R12 MOV RSI,RAX CALL 0x001408fa TEST EAX,EAX JNZ 0x0013e4c4 LEA R12,[RSP + 0x8] PUSH 0x2f POP RSI MOV RDI,R12 CALL 0x001408a9 PUSH 0x6e POP RCX MOV RDI,R14 MOV RSI,R15 MOV RDX,RBX CALL 0x0011a4c7 MOV RDI,R12 MOV RSI,RAX CALL 0x001408fa TEST EAX,EAX JZ 0x0013e4ee LAB_0013e4c4: LEA RDI,[RSP + 0x8] CALL 0x0012e385 JMP 0x0013e4d8 LAB_0013e4d0: MOV RDI,R14 CALL 0x0011ca65 LAB_0013e4d8: PUSH 0x6 POP RDX XOR EAX,EAX XOR ECX,ECX LAB_0013e4df: OR RAX,RCX ADD RSP,0x28 POP RBX POP R12 POP R14 POP R15 RET LAB_0013e4ee: LEA RDI,[RSP + 0x8] CALL 0x0012bf58 MOV RCX,-0x100000000 AND RCX,RAX MOV EAX,EAX JMP 0x0013e4df
ulong js_regexp_toString(int8 param_1,int8 param_2,int8 param_3) { int iVar1; int8 uVar2; ulong uVar3; ulong uVar4; int1 local_40 [32]; if ((int)param_3 == -1) { string_buffer_init(param_1,local_40,0); string_buffer_putc8(local_40,0x2f); uVar2 = JS_GetProperty(param_1,param_2,param_3,0x6d); iVar1 = string_buffer_concat_value_free(local_40,uVar2); if (iVar1 == 0) { string_buffer_putc8(local_40,0x2f); uVar2 = JS_GetProperty(param_1,param_2,param_3,0x6e); iVar1 = string_buffer_concat_value_free(local_40,uVar2); if (iVar1 == 0) { uVar3 = string_buffer_end(local_40); uVar4 = uVar3 & 0xffffffff00000000; uVar3 = uVar3 & 0xffffffff; goto LAB_0013e4df; } } string_buffer_free(local_40); } else { JS_ThrowTypeErrorNotAnObject(param_1); } uVar3 = 0; uVar4 = 0; LAB_0013e4df: return uVar3 | uVar4; }
13,146
js_regexp_toString
bluesky950520[P]quickjs/quickjs.c
static JSValue js_regexp_toString(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue pattern, flags; StringBuffer b_s, *b = &b_s; if (!JS_IsObject(this_val)) return JS_ThrowTypeErrorNotAnObject(ctx); string_buffer_init(ctx, b, 0); string_buffer_putc8(b, '/'); pattern = JS_GetProperty(ctx, this_val, JS_ATOM_source); if (string_buffer_concat_value_free(b, pattern)) goto fail; string_buffer_putc8(b, '/'); flags = JS_GetProperty(ctx, this_val, JS_ATOM_flags); if (string_buffer_concat_value_free(b, flags)) goto fail; return string_buffer_end(b); fail: string_buffer_free(b); return JS_EXCEPTION; }
O3
c
js_regexp_toString: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %rbx movq %rdi, %r14 cmpl $-0x1, %ebx jne 0x4a1a8 movq %rsi, %r15 movq %r14, 0x8(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rsp) movq %r14, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x20686 movq %rax, 0x10(%rsp) testq %rax, %rax je 0x4a1ef leaq 0x8(%rsp), %r12 movq %r12, %rdi movl $0x2f, %esi callq 0x4cb90 movq %r14, %rdi movq %r15, %rsi movq %rbx, %rdx movl $0x6d, %ecx movq %r15, %r8 movq %rbx, %r9 pushq $0x0 pushq $0x0 callq 0x22c0f addq $0x10, %rsp movq %r12, %rdi movq %rax, %rsi callq 0x4cbe5 testl %eax, %eax jne 0x4a190 leaq 0x8(%rsp), %r12 movq %r12, %rdi movl $0x2f, %esi callq 0x4cb90 movq %r14, %rdi movq %r15, %rsi movq %rbx, %rdx movl $0x6e, %ecx movq %r15, %r8 movq %rbx, %r9 pushq $0x0 pushq $0x0 callq 0x22c0f addq $0x10, %rsp movq %r12, %rdi movq %rax, %rsi callq 0x4cbe5 testl %eax, %eax je 0x4a1d4 movq 0x8(%rsp), %rdi movq 0x10(%rsp), %rsi callq 0x1c845 movl $0x6, %edx xorl %ebx, %ebx jmp 0x4a1c0 leaq 0x5673e(%rip), %rsi # 0xa08ed xorl %ebx, %ebx movq %r14, %rdi xorl %eax, %eax callq 0x2214f movl $0x6, %edx xorl %ecx, %ecx orq %rcx, %rbx movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq leaq 0x8(%rsp), %rdi callq 0x33675 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movl %eax, %ebx jmp 0x4a1c2 movl $0x0, 0x1c(%rsp) movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF jmp 0x4a10c
js_regexp_toString: push r15 push r14 push r12 push rbx sub rsp, 28h mov rbx, rdx mov r14, rdi cmp ebx, 0FFFFFFFFh jnz loc_4A1A8 mov r15, rsi mov [rsp+48h+var_40], r14 xorps xmm0, xmm0 movups [rsp+48h+var_30], xmm0 mov rdi, r14 xor esi, esi xor edx, edx call js_alloc_string mov [rsp+48h+var_38], rax test rax, rax jz loc_4A1EF loc_4A10C: lea r12, [rsp+48h+var_40] mov rdi, r12 mov esi, 2Fh ; '/' call string_buffer_putc8 mov rdi, r14 mov rsi, r15 mov rdx, rbx mov ecx, 6Dh ; 'm' mov r8, r15 mov r9, rbx push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov rdi, r12 mov rsi, rax call string_buffer_concat_value_free test eax, eax jnz short loc_4A190 lea r12, [rsp+48h+var_40] mov rdi, r12 mov esi, 2Fh ; '/' call string_buffer_putc8 mov rdi, r14 mov rsi, r15 mov rdx, rbx mov ecx, 6Eh ; 'n' mov r8, r15 mov r9, rbx push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov rdi, r12 mov rsi, rax call string_buffer_concat_value_free test eax, eax jz short loc_4A1D4 loc_4A190: mov rdi, [rsp+48h+var_40] mov rsi, [rsp+48h+var_38] call js_free mov edx, 6 xor ebx, ebx jmp short loc_4A1C0 loc_4A1A8: lea rsi, aOperandPrototy+20h; "not an object" xor ebx, ebx mov rdi, r14 xor eax, eax call JS_ThrowTypeError mov edx, 6 loc_4A1C0: xor ecx, ecx loc_4A1C2: or rbx, rcx mov rax, rbx add rsp, 28h pop rbx pop r12 pop r14 pop r15 retn loc_4A1D4: lea rdi, [rsp+48h+var_40] call string_buffer_end mov rcx, 0FFFFFFFF00000000h and rcx, rax mov ebx, eax jmp short loc_4A1C2 loc_4A1EF: mov dword ptr [rsp+48h+var_30+4], 0 mov dword ptr [rsp+48h+var_30+0Ch], 0FFFFFFFFh jmp loc_4A10C
unsigned long long js_regexp_toString( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { unsigned long long PropertyInternal2; // rax long long v16; // rdx unsigned long long v17; // rax long long v18; // rdx long long v19; // rbx unsigned long long v20; // rcx long long v22; // rax char v23; // [rsp+0h] [rbp-48h] long long v24; // [rsp+8h] [rbp-40h] BYREF long long v25; // [rsp+10h] [rbp-38h] __int128 v26; // [rsp+18h] [rbp-30h] if ( (_DWORD)a3 == -1 ) { v24 = a1; v26 = 0LL; v25 = js_alloc_string(a1, 0LL, 0); if ( !v25 ) { DWORD1(v26) = 0; HIDWORD(v26) = -1; } string_buffer_putc8(&v24, 47LL); PropertyInternal2 = JS_GetPropertyInternal2(a1, a2, a3, 0x6Du, a2, a3, 0LL, 0); if ( !(unsigned int)string_buffer_concat_value_free(&v24, PropertyInternal2, v16) ) { string_buffer_putc8(&v24, 47LL); v17 = JS_GetPropertyInternal2(a1, a2, a3, 0x6Eu, a2, a3, 0LL, 0); if ( !(unsigned int)string_buffer_concat_value_free(&v24, v17, v18) ) { v22 = string_buffer_end(&v24); v20 = v22 & 0xFFFFFFFF00000000LL; v19 = (unsigned int)v22; return v20 | v19; } } js_free(v24, v25); v19 = 0LL; } else { v19 = 0LL; JS_ThrowTypeError(a1, (long long)"not an object", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v23); } v20 = 0LL; return v20 | v19; }
js_regexp_toString: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDX MOV R14,RDI CMP EBX,-0x1 JNZ 0x0014a1a8 MOV R15,RSI MOV qword ptr [RSP + 0x8],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOV RDI,R14 XOR ESI,ESI XOR EDX,EDX CALL 0x00120686 MOV qword ptr [RSP + 0x10],RAX TEST RAX,RAX JZ 0x0014a1ef LAB_0014a10c: LEA R12,[RSP + 0x8] MOV RDI,R12 MOV ESI,0x2f CALL 0x0014cb90 MOV RDI,R14 MOV RSI,R15 MOV RDX,RBX MOV ECX,0x6d MOV R8,R15 MOV R9,RBX PUSH 0x0 PUSH 0x0 CALL 0x00122c0f ADD RSP,0x10 MOV RDI,R12 MOV RSI,RAX CALL 0x0014cbe5 TEST EAX,EAX JNZ 0x0014a190 LEA R12,[RSP + 0x8] MOV RDI,R12 MOV ESI,0x2f CALL 0x0014cb90 MOV RDI,R14 MOV RSI,R15 MOV RDX,RBX MOV ECX,0x6e MOV R8,R15 MOV R9,RBX PUSH 0x0 PUSH 0x0 CALL 0x00122c0f ADD RSP,0x10 MOV RDI,R12 MOV RSI,RAX CALL 0x0014cbe5 TEST EAX,EAX JZ 0x0014a1d4 LAB_0014a190: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x10] CALL 0x0011c845 MOV EDX,0x6 XOR EBX,EBX JMP 0x0014a1c0 LAB_0014a1a8: LEA RSI,[0x1a08ed] XOR EBX,EBX MOV RDI,R14 XOR EAX,EAX CALL 0x0012214f MOV EDX,0x6 LAB_0014a1c0: XOR ECX,ECX LAB_0014a1c2: OR RBX,RCX MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R14 POP R15 RET LAB_0014a1d4: LEA RDI,[RSP + 0x8] CALL 0x00133675 MOV RCX,-0x100000000 AND RCX,RAX MOV EBX,EAX JMP 0x0014a1c2 LAB_0014a1ef: MOV dword ptr [RSP + 0x1c],0x0 MOV dword ptr [RSP + 0x24],0xffffffff JMP 0x0014a10c
ulong js_regexp_toString(int8 param_1,int8 param_2,int8 param_3) { int iVar1; int8 uVar2; ulong uVar3; ulong uVar4; int8 local_40; long local_38; ulong local_30; int8 uStack_28; if ((int)param_3 == -1) { local_30 = 0; uStack_28 = 0; local_40 = param_1; local_38 = js_alloc_string(param_1,0,0); if (local_38 == 0) { local_30 = local_30 & 0xffffffff; uStack_28 = CONCAT44(0xffffffff,(int4)uStack_28); } string_buffer_putc8(&local_40,0x2f); uVar2 = JS_GetPropertyInternal2(param_1,param_2,param_3,0x6d,param_2,param_3,0,0); iVar1 = string_buffer_concat_value_free(&local_40,uVar2); if (iVar1 == 0) { string_buffer_putc8(&local_40,0x2f); uVar2 = JS_GetPropertyInternal2(param_1,param_2,param_3,0x6e,param_2,param_3,0,0); iVar1 = string_buffer_concat_value_free(&local_40,uVar2); if (iVar1 == 0) { uVar3 = string_buffer_end(&local_40); uVar4 = uVar3 & 0xffffffff00000000; uVar3 = uVar3 & 0xffffffff; goto LAB_0014a1c2; } } js_free(local_40,local_38); } else { JS_ThrowTypeError(param_1,"not an object"); } uVar3 = 0; uVar4 = 0; LAB_0014a1c2: return uVar3 | uVar4; }
13,147
ma_pack_get_block_info
eloqsql/storage/maria/ma_packrec.c
uint _ma_pack_get_block_info(MARIA_HA *maria, MARIA_BIT_BUFF *bit_buff, MARIA_BLOCK_INFO *info, uchar **rec_buff_p, size_t *rec_buff_size_p, File file, my_off_t filepos) { uchar *header= info->header; uint head_length,UNINIT_VAR(ref_length); MARIA_SHARE *share= maria->s; myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0); if (file >= 0) { ref_length=share->pack.ref_length; /* We can't use my_pread() here because _ma_read_rnd_pack_record assumes position is ok */ mysql_file_seek(file,filepos,MY_SEEK_SET,MYF(0)); if (mysql_file_read(file, header,ref_length,MYF(MY_NABP))) return BLOCK_FATAL_ERROR; DBUG_DUMP("header", header, ref_length); } head_length= read_pack_length((uint) share->pack.version, header, &info->rec_len); if (share->base.blobs) { head_length+= read_pack_length((uint) share->pack.version, header + head_length, &info->blob_len); /* Ensure that the record buffer is big enough for the compressed record plus all expanded blobs. [We do not have an extra buffer for the resulting blobs. Sigh.] */ if (_ma_alloc_buffer(rec_buff_p, rec_buff_size_p, info->rec_len + info->blob_len + share->base.extra_rec_buff_size, flag)) return BLOCK_FATAL_ERROR; /* not enough memory */ bit_buff->blob_pos= *rec_buff_p + info->rec_len; bit_buff->blob_end= bit_buff->blob_pos + info->blob_len; maria->blob_length=info->blob_len; } info->filepos=filepos+head_length; if (file >= 0) { info->offset=MY_MIN(info->rec_len, ref_length - head_length); memcpy(*rec_buff_p, header + head_length, info->offset); } return 0; }
O0
c
ma_pack_get_block_info: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq 0x10(%rbp), %rax movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movl %r9d, -0x34(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) movl -0x48(%rbp), %eax movl %eax, -0x48(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movsbl 0x7d9(%rax), %edx xorl %eax, %eax movl $0x10000, %ecx # imm = 0x10000 cmpl $0x0, %edx cmovnel %ecx, %eax orl $0x10, %eax movl %eax, %eax movq %rax, -0x58(%rbp) cmpl $0x0, -0x34(%rbp) jl 0x4b01d movq -0x50(%rbp), %rax movl 0x598(%rax), %eax movl %eax, -0x48(%rbp) movl -0x34(%rbp), %edx movq 0x10(%rbp), %rcx leaq 0x1073cc(%rip), %rdi # 0x15239b movl $0x595, %esi # imm = 0x595 xorl %r8d, %r8d xorl %eax, %eax movl %eax, %r9d callq 0x4b770 movl -0x34(%rbp), %edx movq -0x40(%rbp), %rcx movl -0x48(%rbp), %eax movl %eax, %r8d leaq 0x1073a6(%rip), %rdi # 0x15239b movl $0x596, %esi # imm = 0x596 movl $0x4, %r9d callq 0x4b180 cmpq $0x0, %rax je 0x4b017 movl $0x20, -0x4(%rbp) jmp 0x4b16f jmp 0x4b019 jmp 0x4b01b jmp 0x4b01d movq -0x50(%rbp), %rax movzbl 0x59c(%rax), %edi movq -0x40(%rbp), %rsi movq -0x20(%rbp), %rdx addq $0x18, %rdx callq 0x4b860 movl %eax, -0x44(%rbp) movq -0x50(%rbp), %rax cmpl $0x0, 0x3f0(%rax) je 0x4b0f5 movq -0x50(%rbp), %rax movzbl 0x59c(%rax), %edi movq -0x40(%rbp), %rsi movl -0x44(%rbp), %eax addq %rax, %rsi movq -0x20(%rbp), %rdx addq $0x30, %rdx callq 0x4b860 addl -0x44(%rbp), %eax movl %eax, -0x44(%rbp) movq -0x28(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x20(%rbp), %rax movq 0x18(%rax), %rdx movq -0x20(%rbp), %rax addq 0x30(%rax), %rdx movq -0x50(%rbp), %rax movl 0x424(%rax), %eax addq %rax, %rdx movq -0x58(%rbp), %rcx callq 0x8fd90 cmpb $0x0, %al je 0x4b0b3 movl $0x20, -0x4(%rbp) jmp 0x4b16f movq -0x28(%rbp), %rax movq (%rax), %rcx movq -0x20(%rbp), %rax addq 0x18(%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x18(%rbp), %rax movq 0x18(%rax), %rcx movq -0x20(%rbp), %rax addq 0x30(%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x20(%rbp), %rax movq 0x30(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x458(%rax) movq 0x10(%rbp), %rcx movl -0x44(%rbp), %eax addq %rax, %rcx movq -0x20(%rbp), %rax movq %rcx, 0x38(%rax) cmpl $0x0, -0x34(%rbp) jl 0x4b168 movq -0x20(%rbp), %rax movq 0x18(%rax), %rax movl -0x48(%rbp), %ecx subl -0x44(%rbp), %ecx movl %ecx, %ecx cmpq %rcx, %rax jae 0x4b130 movq -0x20(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x60(%rbp) jmp 0x4b13c movl -0x48(%rbp), %eax subl -0x44(%rbp), %eax movl %eax, %eax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movl %eax, %ecx movq -0x20(%rbp), %rax movl %ecx, 0x54(%rax) movq -0x28(%rbp), %rax movq (%rax), %rdi movq -0x40(%rbp), %rsi movl -0x44(%rbp), %eax addq %rax, %rsi movq -0x20(%rbp), %rax movl 0x54(%rax), %eax movl %eax, %edx callq 0x2a090 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopl (%rax,%rax)
_ma_pack_get_block_info: push rbp mov rbp, rsp sub rsp, 60h mov rax, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_34], r9d mov rax, [rbp+var_20] mov [rbp+var_40], rax mov eax, [rbp+var_48] mov [rbp+var_48], eax mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_50], rax mov rax, [rbp+var_50] movsx edx, byte ptr [rax+7D9h] xor eax, eax mov ecx, 10000h cmp edx, 0 cmovnz eax, ecx or eax, 10h mov eax, eax mov [rbp+var_58], rax cmp [rbp+var_34], 0 jl short loc_4B01D mov rax, [rbp+var_50] mov eax, [rax+598h] mov [rbp+var_48], eax mov edx, [rbp+var_34] mov rcx, [rbp+arg_0] lea rdi, aWorkspaceLlm4b_8; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 595h xor r8d, r8d xor eax, eax mov r9d, eax call inline_mysql_file_seek_1 mov edx, [rbp+var_34] mov rcx, [rbp+var_40] mov eax, [rbp+var_48] mov r8d, eax lea rdi, aWorkspaceLlm4b_8; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 596h mov r9d, 4 call inline_mysql_file_read cmp rax, 0 jz short loc_4B017 mov [rbp+var_4], 20h ; ' ' jmp loc_4B16F loc_4B017: jmp short $+2 loc_4B019: jmp short $+2 loc_4B01B: jmp short $+2 loc_4B01D: mov rax, [rbp+var_50] movzx edi, byte ptr [rax+59Ch] mov rsi, [rbp+var_40] mov rdx, [rbp+var_20] add rdx, 18h call read_pack_length mov [rbp+var_44], eax mov rax, [rbp+var_50] cmp dword ptr [rax+3F0h], 0 jz loc_4B0F5 mov rax, [rbp+var_50] movzx edi, byte ptr [rax+59Ch] mov rsi, [rbp+var_40] mov eax, [rbp+var_44] add rsi, rax mov rdx, [rbp+var_20] add rdx, 30h ; '0' call read_pack_length add eax, [rbp+var_44] mov [rbp+var_44], eax mov rdi, [rbp+var_28] mov rsi, [rbp+var_30] mov rax, [rbp+var_20] mov rdx, [rax+18h] mov rax, [rbp+var_20] add rdx, [rax+30h] mov rax, [rbp+var_50] mov eax, [rax+424h] add rdx, rax mov rcx, [rbp+var_58] call _ma_alloc_buffer cmp al, 0 jz short loc_4B0B3 mov [rbp+var_4], 20h ; ' ' jmp loc_4B16F loc_4B0B3: mov rax, [rbp+var_28] mov rcx, [rax] mov rax, [rbp+var_20] add rcx, [rax+18h] mov rax, [rbp+var_18] mov [rax+18h], rcx mov rax, [rbp+var_18] mov rcx, [rax+18h] mov rax, [rbp+var_20] add rcx, [rax+30h] mov rax, [rbp+var_18] mov [rax+20h], rcx mov rax, [rbp+var_20] mov rcx, [rax+30h] mov rax, [rbp+var_10] mov [rax+458h], rcx loc_4B0F5: mov rcx, [rbp+arg_0] mov eax, [rbp+var_44] add rcx, rax mov rax, [rbp+var_20] mov [rax+38h], rcx cmp [rbp+var_34], 0 jl short loc_4B168 mov rax, [rbp+var_20] mov rax, [rax+18h] mov ecx, [rbp+var_48] sub ecx, [rbp+var_44] mov ecx, ecx cmp rax, rcx jnb short loc_4B130 mov rax, [rbp+var_20] mov rax, [rax+18h] mov [rbp+var_60], rax jmp short loc_4B13C loc_4B130: mov eax, [rbp+var_48] sub eax, [rbp+var_44] mov eax, eax mov [rbp+var_60], rax loc_4B13C: mov rax, [rbp+var_60] mov ecx, eax mov rax, [rbp+var_20] mov [rax+54h], ecx mov rax, [rbp+var_28] mov rdi, [rax] mov rsi, [rbp+var_40] mov eax, [rbp+var_44] add rsi, rax mov rax, [rbp+var_20] mov eax, [rax+54h] mov edx, eax call _memcpy loc_4B168: mov [rbp+var_4], 0 loc_4B16F: mov eax, [rbp+var_4] add rsp, 60h pop rbp retn
long long ma_pack_get_block_info( _QWORD *a1, long long a2, long long a3, _QWORD *a4, long long a5, int a6, long long a7) { int v7; // eax long long v9; // [rsp+0h] [rbp-60h] long long v10; // [rsp+8h] [rbp-58h] long long v11; // [rsp+10h] [rbp-50h] unsigned int v12; // [rsp+18h] [rbp-48h] unsigned int pack_length; // [rsp+1Ch] [rbp-44h] v11 = *a1; v7 = 0; if ( *(_BYTE *)(*a1 + 2009LL) ) v7 = 0x10000; v10 = v7 | 0x10u; if ( a6 >= 0 && (v12 = *(_DWORD *)(v11 + 1432), inline_mysql_file_seek_1( "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_packrec.c", 1429LL, (unsigned int)a6, a7, 0LL, 0LL), inline_mysql_file_read( "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_packrec.c", 1430LL, (unsigned int)a6, a3, v12, 4LL)) ) { return 32; } else { pack_length = read_pack_length(*(unsigned __int8 *)(v11 + 1436), a3, a3 + 24); if ( *(_DWORD *)(v11 + 1008) ) { pack_length += read_pack_length(*(unsigned __int8 *)(v11 + 1436), pack_length + a3, a3 + 48); if ( (unsigned __int8)ma_alloc_buffer( a4, a5, *(unsigned int *)(v11 + 1060) + *(_QWORD *)(a3 + 48) + *(_QWORD *)(a3 + 24), v10) ) return 32; *(_QWORD *)(a2 + 24) = *(_QWORD *)(a3 + 24) + *a4; *(_QWORD *)(a2 + 32) = *(_QWORD *)(a3 + 48) + *(_QWORD *)(a2 + 24); a1[139] = *(_QWORD *)(a3 + 48); } *(_QWORD *)(a3 + 56) = pack_length + a7; if ( a6 >= 0 ) { if ( *(_QWORD *)(a3 + 24) >= (unsigned long long)(v12 - pack_length) ) LODWORD(v9) = v12 - pack_length; else v9 = *(_QWORD *)(a3 + 24); *(_DWORD *)(a3 + 84) = v9; memcpy(*a4, pack_length + a3, *(unsigned int *)(a3 + 84)); } return 0; } }
_ma_pack_get_block_info: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV dword ptr [RBP + -0x34],R9D MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x40],RAX MOV EAX,dword ptr [RBP + -0x48] MOV dword ptr [RBP + -0x48],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] MOVSX EDX,byte ptr [RAX + 0x7d9] XOR EAX,EAX MOV ECX,0x10000 CMP EDX,0x0 CMOVNZ EAX,ECX OR EAX,0x10 MOV EAX,EAX MOV qword ptr [RBP + -0x58],RAX CMP dword ptr [RBP + -0x34],0x0 JL 0x0014b01d MOV RAX,qword ptr [RBP + -0x50] MOV EAX,dword ptr [RAX + 0x598] MOV dword ptr [RBP + -0x48],EAX MOV EDX,dword ptr [RBP + -0x34] MOV RCX,qword ptr [RBP + 0x10] LEA RDI,[0x25239b] MOV ESI,0x595 XOR R8D,R8D XOR EAX,EAX MOV R9D,EAX CALL 0x0014b770 MOV EDX,dword ptr [RBP + -0x34] MOV RCX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + -0x48] MOV R8D,EAX LEA RDI,[0x25239b] MOV ESI,0x596 MOV R9D,0x4 CALL 0x0014b180 CMP RAX,0x0 JZ 0x0014b017 MOV dword ptr [RBP + -0x4],0x20 JMP 0x0014b16f LAB_0014b017: JMP 0x0014b019 LAB_0014b019: JMP 0x0014b01b LAB_0014b01b: JMP 0x0014b01d LAB_0014b01d: MOV RAX,qword ptr [RBP + -0x50] MOVZX EDI,byte ptr [RAX + 0x59c] MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x20] ADD RDX,0x18 CALL 0x0014b860 MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x50] CMP dword ptr [RAX + 0x3f0],0x0 JZ 0x0014b0f5 MOV RAX,qword ptr [RBP + -0x50] MOVZX EDI,byte ptr [RAX + 0x59c] MOV RSI,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + -0x44] ADD RSI,RAX MOV RDX,qword ptr [RBP + -0x20] ADD RDX,0x30 CALL 0x0014b860 ADD EAX,dword ptr [RBP + -0x44] MOV dword ptr [RBP + -0x44],EAX MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x20] ADD RDX,qword ptr [RAX + 0x30] MOV RAX,qword ptr [RBP + -0x50] MOV EAX,dword ptr [RAX + 0x424] ADD RDX,RAX MOV RCX,qword ptr [RBP + -0x58] CALL 0x0018fd90 CMP AL,0x0 JZ 0x0014b0b3 MOV dword ptr [RBP + -0x4],0x20 JMP 0x0014b16f LAB_0014b0b3: MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x20] ADD RCX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x20] ADD RCX,qword ptr [RAX + 0x30] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX + 0x30] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x458],RCX LAB_0014b0f5: MOV RCX,qword ptr [RBP + 0x10] MOV EAX,dword ptr [RBP + -0x44] ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x38],RCX CMP dword ptr [RBP + -0x34],0x0 JL 0x0014b168 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x18] MOV ECX,dword ptr [RBP + -0x48] SUB ECX,dword ptr [RBP + -0x44] MOV ECX,ECX CMP RAX,RCX JNC 0x0014b130 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x60],RAX JMP 0x0014b13c LAB_0014b130: MOV EAX,dword ptr [RBP + -0x48] SUB EAX,dword ptr [RBP + -0x44] MOV EAX,EAX MOV qword ptr [RBP + -0x60],RAX LAB_0014b13c: MOV RAX,qword ptr [RBP + -0x60] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x54],ECX MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + -0x44] ADD RSI,RAX MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x54] MOV EDX,EAX CALL 0x0012a090 LAB_0014b168: MOV dword ptr [RBP + -0x4],0x0 LAB_0014b16f: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x60 POP RBP RET
int4 _ma_pack_get_block_info (long *param_1,long param_2,long param_3,long *param_4,int8 param_5,int param_6, long param_7) { long lVar1; char cVar2; uint uVar3; int iVar4; long lVar5; int local_68; int local_50; uint local_4c; lVar1 = *param_1; uVar3 = 0; if (*(char *)(lVar1 + 0x7d9) != '\0') { uVar3 = 0x10000; } if (-1 < param_6) { local_50 = *(int *)(lVar1 + 0x598); inline_mysql_file_seek ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_packrec.c",0x595,param_6, param_7,0,0); lVar5 = inline_mysql_file_read ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_packrec.c",0x596, param_6,param_3,local_50,4); if (lVar5 != 0) { return 0x20; } } local_4c = read_pack_length(*(int1 *)(lVar1 + 0x59c),param_3,param_3 + 0x18); if (*(int *)(lVar1 + 0x3f0) != 0) { iVar4 = read_pack_length(*(int1 *)(lVar1 + 0x59c),param_3 + (ulong)local_4c,param_3 + 0x30 ); local_4c = iVar4 + local_4c; cVar2 = _ma_alloc_buffer(param_4,param_5, *(long *)(param_3 + 0x18) + *(long *)(param_3 + 0x30) + (ulong)*(uint *)(lVar1 + 0x424),uVar3 | 0x10); if (cVar2 != '\0') { return 0x20; } *(long *)(param_2 + 0x18) = *param_4 + *(long *)(param_3 + 0x18); *(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x18) + *(long *)(param_3 + 0x30); param_1[0x8b] = *(long *)(param_3 + 0x30); } *(ulong *)(param_3 + 0x38) = param_7 + (ulong)local_4c; if (-1 < param_6) { if (*(ulong *)(param_3 + 0x18) < (ulong)(local_50 - local_4c)) { local_68 = (int)*(int8 *)(param_3 + 0x18); } else { local_68 = local_50 - local_4c; } *(int *)(param_3 + 0x54) = local_68; memcpy((void *)*param_4,(void *)(param_3 + (ulong)local_4c),(ulong)*(uint *)(param_3 + 0x54)); } return 0; }
13,148
translog_stop_writing
eloqsql/storage/maria/ma_loghandler.c
void translog_stop_writing() { DBUG_ENTER("translog_stop_writing"); DBUG_PRINT("error", ("errno: %d my_errno: %d", errno, my_errno)); translog_status= (translog_status == TRANSLOG_SHUTDOWN ? TRANSLOG_UNINITED : TRANSLOG_READONLY); log_descriptor.is_everything_flushed= 1; log_descriptor.open_flags= O_BINARY | O_RDONLY; DBUG_ASSERT(0); DBUG_VOID_RETURN; }
O0
c
translog_stop_writing: pushq %rbp movq %rsp, %rbp jmp 0x2bab6 jmp 0x2bab8 movl 0x4530c2(%rip), %edx # 0x47eb80 movl $0x2, %eax xorl %ecx, %ecx cmpl $0x3, %edx cmovel %ecx, %eax movl %eax, 0x4530af(%rip) # 0x47eb80 movb $0x1, 0xc55188(%rip) # 0xc80c60 movl $0x0, 0x4542ba(%rip) # 0x47fd9c jmp 0x2bae4 jmp 0x2bae6 jmp 0x2bae8 popq %rbp retq nopw (%rax,%rax)
translog_stop_writing: push rbp mov rbp, rsp jmp short $+2 loc_2BAB6: jmp short $+2 loc_2BAB8: mov edx, cs:translog_status mov eax, 2 xor ecx, ecx cmp edx, 3 cmovz eax, ecx mov cs:translog_status, eax mov cs:byte_C80C60, 1 mov cs:dword_47FD9C, 0 jmp short $+2 loc_2BAE4: jmp short $+2 loc_2BAE6: jmp short $+2 loc_2BAE8: pop rbp retn
long long translog_stop_writing() { long long result; // rax result = 2LL; if ( translog_status == 3 ) result = 0LL; translog_status = result; byte_C80C60 = 1; dword_47FD9C = 0; return result; }
translog_stop_writing: PUSH RBP MOV RBP,RSP JMP 0x0012bab6 LAB_0012bab6: JMP 0x0012bab8 LAB_0012bab8: MOV EDX,dword ptr [0x0057eb80] MOV EAX,0x2 XOR ECX,ECX CMP EDX,0x3 CMOVZ EAX,ECX MOV dword ptr [0x0057eb80],EAX MOV byte ptr [0x00d80c60],0x1 MOV dword ptr [0x0057fd9c],0x0 JMP 0x0012bae4 LAB_0012bae4: JMP 0x0012bae6 LAB_0012bae6: JMP 0x0012bae8 LAB_0012bae8: POP RBP RET
void translog_stop_writing(void) { int4 uVar1; uVar1 = 2; if (translog_status == 3) { uVar1 = 0; } translog_status = uVar1; DAT_00d80c60 = 1; DAT_0057fd9c = 0; return; }
13,149
find_type_eol
eloqsql/mysys/typelib.c
static int find_type_eol(const char **x, const TYPELIB *typelib, uint flags, const char *eol) { int find,pos; int UNINIT_VAR(findpos); /* guarded by find */ const char *UNINIT_VAR(termptr); const char *i; const char *j; CHARSET_INFO *cs= &my_charset_latin1; DBUG_ENTER("find_type_eol"); DBUG_PRINT("enter",("x: '%s' lib: %p", *x, typelib)); DBUG_ASSERT(!(flags & ~(FIND_TYPE_NO_PREFIX | FIND_TYPE_COMMA_TERM))); if (!typelib->count) { DBUG_PRINT("exit",("no count")); DBUG_RETURN(0); } find=0; for (pos=0 ; (j=typelib->type_names[pos]) ; pos++) { for (i=*x ; i < eol && !is_field_separator(flags, *i) && my_toupper(cs, *i) == my_toupper(cs, *j) ; i++, j++) ; if (! *j) { while (i < eol && *i == ' ') i++; /* skip_end_space */ if (i >= eol || is_field_separator(flags, *i)) { *x= i; DBUG_RETURN(pos+1); } } if ((i >= eol && !is_field_separator(flags, *i)) && (!*j || !(flags & FIND_TYPE_NO_PREFIX))) { find++; findpos=pos; termptr=i; } } if (find == 0 || *x == eol) { DBUG_PRINT("exit",("Couldn't find type")); DBUG_RETURN(0); } else if (find != 1 || (flags & FIND_TYPE_NO_PREFIX)) { DBUG_PRINT("exit",("Too many possibilities")); DBUG_RETURN(-1); } *x= termptr; DBUG_RETURN(findpos+1); }
O0
c
find_type_eol: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x34(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x40(%rbp) leaq 0x254c18(%rip), %rax # 0x289dc0 movq %rax, -0x58(%rbp) jmp 0x351ae jmp 0x351b0 jmp 0x351b2 movq -0x18(%rbp), %rax cmpl $0x0, (%rax) jne 0x351cd jmp 0x351bd jmp 0x351bf jmp 0x351c1 movl $0x0, -0x4(%rbp) jmp 0x353e3 movl $0x0, -0x2c(%rbp) movl $0x0, -0x30(%rbp) movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movslq -0x30(%rbp), %rcx movq (%rax,%rcx,8), %rax movq %rax, -0x50(%rbp) cmpq $0x0, %rax je 0x3538b movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rcx xorl %eax, %eax cmpq -0x28(%rbp), %rcx movb %al, -0x59(%rbp) jae 0x3526e movl -0x1c(%rbp), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x35240 movq -0x48(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x2c, %ecx movb %al, -0x59(%rbp) je 0x3526e movq -0x48(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x3d, %ecx movb %al, -0x59(%rbp) je 0x3526e movq -0x58(%rbp), %rax movq 0x50(%rax), %rax movq -0x48(%rbp), %rcx movzbl (%rcx), %ecx movsbl (%rax,%rcx), %eax movq -0x58(%rbp), %rcx movq 0x50(%rcx), %rcx movq -0x50(%rbp), %rdx movzbl (%rdx), %edx movsbl (%rcx,%rdx), %ecx cmpl %ecx, %eax sete %al movb %al, -0x59(%rbp) movb -0x59(%rbp), %al testb $0x1, %al jne 0x35277 jmp 0x35296 jmp 0x35279 movq -0x48(%rbp), %rax addq $0x1, %rax movq %rax, -0x48(%rbp) movq -0x50(%rbp), %rax addq $0x1, %rax movq %rax, -0x50(%rbp) jmp 0x35204 movq -0x50(%rbp), %rax cmpb $0x0, (%rax) jne 0x35323 jmp 0x352a5 movq -0x48(%rbp), %rcx xorl %eax, %eax cmpq -0x28(%rbp), %rcx movb %al, -0x5a(%rbp) jae 0x352c4 movq -0x48(%rbp), %rax movsbl (%rax), %eax cmpl $0x20, %eax sete %al movb %al, -0x5a(%rbp) movb -0x5a(%rbp), %al testb $0x1, %al jne 0x352cd jmp 0x352db movq -0x48(%rbp), %rax addq $0x1, %rax movq %rax, -0x48(%rbp) jmp 0x352a5 movq -0x48(%rbp), %rax cmpq -0x28(%rbp), %rax jae 0x35308 movl -0x1c(%rbp), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x35321 movq -0x48(%rbp), %rax movsbl (%rax), %eax cmpl $0x2c, %eax je 0x35308 movq -0x48(%rbp), %rax movsbl (%rax), %eax cmpl $0x3d, %eax jne 0x35321 movq -0x48(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl -0x30(%rbp), %eax addl $0x1, %eax movl %eax, -0x4(%rbp) jmp 0x353e3 jmp 0x35323 movq -0x48(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x3537b movl -0x1c(%rbp), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x35350 movq -0x48(%rbp), %rax movsbl (%rax), %eax cmpl $0x2c, %eax je 0x3537b movq -0x48(%rbp), %rax movsbl (%rax), %eax cmpl $0x3d, %eax je 0x3537b movq -0x50(%rbp), %rax cmpb $0x0, (%rax) je 0x35364 movl -0x1c(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0x3537b movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) movl -0x30(%rbp), %eax movl %eax, -0x34(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0x3537d movl -0x30(%rbp), %eax addl $0x1, %eax movl %eax, -0x30(%rbp) jmp 0x351db cmpl $0x0, -0x2c(%rbp) je 0x3539e movq -0x10(%rbp), %rax movq (%rax), %rax cmpq -0x28(%rbp), %rax jne 0x353ad jmp 0x353a0 jmp 0x353a2 jmp 0x353a4 movl $0x0, -0x4(%rbp) jmp 0x353e3 cmpl $0x1, -0x2c(%rbp) jne 0x353be movl -0x1c(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x353cd jmp 0x353c0 jmp 0x353c2 jmp 0x353c4 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x353e3 jmp 0x353cf movq -0x40(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl -0x34(%rbp), %eax addl $0x1, %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
find_type_eol: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], rcx mov eax, [rbp+var_34] mov [rbp+var_34], eax mov rax, [rbp+var_40] mov [rbp+var_40], rax lea rax, my_charset_latin1 mov [rbp+var_58], rax jmp short $+2 loc_351AE: jmp short $+2 loc_351B0: jmp short $+2 loc_351B2: mov rax, [rbp+var_18] cmp dword ptr [rax], 0 jnz short loc_351CD jmp short $+2 loc_351BD: jmp short $+2 loc_351BF: jmp short $+2 loc_351C1: mov [rbp+var_4], 0 jmp loc_353E3 loc_351CD: mov [rbp+var_2C], 0 mov [rbp+var_30], 0 loc_351DB: mov rax, [rbp+var_18] mov rax, [rax+10h] movsxd rcx, [rbp+var_30] mov rax, [rax+rcx*8] mov [rbp+var_50], rax cmp rax, 0 jz loc_3538B mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_48], rax loc_35204: mov rcx, [rbp+var_48] xor eax, eax cmp rcx, [rbp+var_28] mov [rbp+var_59], al jnb short loc_3526E mov eax, [rbp+var_1C] and eax, 8 cmp eax, 0 jz short loc_35240 mov rax, [rbp+var_48] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 2Ch ; ',' mov [rbp+var_59], al jz short loc_3526E mov rax, [rbp+var_48] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 3Dh ; '=' mov [rbp+var_59], al jz short loc_3526E loc_35240: mov rax, [rbp+var_58] mov rax, [rax+50h] mov rcx, [rbp+var_48] movzx ecx, byte ptr [rcx] movsx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_58] mov rcx, [rcx+50h] mov rdx, [rbp+var_50] movzx edx, byte ptr [rdx] movsx ecx, byte ptr [rcx+rdx] cmp eax, ecx setz al mov [rbp+var_59], al loc_3526E: mov al, [rbp+var_59] test al, 1 jnz short loc_35277 jmp short loc_35296 loc_35277: jmp short $+2 loc_35279: mov rax, [rbp+var_48] add rax, 1 mov [rbp+var_48], rax mov rax, [rbp+var_50] add rax, 1 mov [rbp+var_50], rax jmp loc_35204 loc_35296: mov rax, [rbp+var_50] cmp byte ptr [rax], 0 jnz loc_35323 jmp short $+2 loc_352A5: mov rcx, [rbp+var_48] xor eax, eax cmp rcx, [rbp+var_28] mov [rbp+var_5A], al jnb short loc_352C4 mov rax, [rbp+var_48] movsx eax, byte ptr [rax] cmp eax, 20h ; ' ' setz al mov [rbp+var_5A], al loc_352C4: mov al, [rbp+var_5A] test al, 1 jnz short loc_352CD jmp short loc_352DB loc_352CD: mov rax, [rbp+var_48] add rax, 1 mov [rbp+var_48], rax jmp short loc_352A5 loc_352DB: mov rax, [rbp+var_48] cmp rax, [rbp+var_28] jnb short loc_35308 mov eax, [rbp+var_1C] and eax, 8 cmp eax, 0 jz short loc_35321 mov rax, [rbp+var_48] movsx eax, byte ptr [rax] cmp eax, 2Ch ; ',' jz short loc_35308 mov rax, [rbp+var_48] movsx eax, byte ptr [rax] cmp eax, 3Dh ; '=' jnz short loc_35321 loc_35308: mov rcx, [rbp+var_48] mov rax, [rbp+var_10] mov [rax], rcx mov eax, [rbp+var_30] add eax, 1 mov [rbp+var_4], eax jmp loc_353E3 loc_35321: jmp short $+2 loc_35323: mov rax, [rbp+var_48] cmp rax, [rbp+var_28] jb short loc_3537B mov eax, [rbp+var_1C] and eax, 8 cmp eax, 0 jz short loc_35350 mov rax, [rbp+var_48] movsx eax, byte ptr [rax] cmp eax, 2Ch ; ',' jz short loc_3537B mov rax, [rbp+var_48] movsx eax, byte ptr [rax] cmp eax, 3Dh ; '=' jz short loc_3537B loc_35350: mov rax, [rbp+var_50] cmp byte ptr [rax], 0 jz short loc_35364 mov eax, [rbp+var_1C] and eax, 1 cmp eax, 0 jnz short loc_3537B loc_35364: mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax mov eax, [rbp+var_30] mov [rbp+var_34], eax mov rax, [rbp+var_48] mov [rbp+var_40], rax loc_3537B: jmp short $+2 loc_3537D: mov eax, [rbp+var_30] add eax, 1 mov [rbp+var_30], eax jmp loc_351DB loc_3538B: cmp [rbp+var_2C], 0 jz short loc_3539E mov rax, [rbp+var_10] mov rax, [rax] cmp rax, [rbp+var_28] jnz short loc_353AD loc_3539E: jmp short $+2 loc_353A0: jmp short $+2 loc_353A2: jmp short $+2 loc_353A4: mov [rbp+var_4], 0 jmp short loc_353E3 loc_353AD: cmp [rbp+var_2C], 1 jnz short loc_353BE mov eax, [rbp+var_1C] and eax, 1 cmp eax, 0 jz short loc_353CD loc_353BE: jmp short $+2 loc_353C0: jmp short $+2 loc_353C2: jmp short $+2 loc_353C4: mov [rbp+var_4], 0FFFFFFFFh jmp short loc_353E3 loc_353CD: jmp short $+2 loc_353CF: mov rcx, [rbp+var_40] mov rax, [rbp+var_10] mov [rax], rcx mov eax, [rbp+var_34] add eax, 1 mov [rbp+var_4], eax loc_353E3: mov eax, [rbp+var_4] pop rbp retn
long long find_type_eol(_BYTE **a1, long long a2, char a3, _BYTE *a4) { bool v5; // [rsp+0h] [rbp-5Ah] bool v6; // [rsp+1h] [rbp-59h] _BYTE *v7; // [rsp+Ah] [rbp-50h] _BYTE *j; // [rsp+12h] [rbp-48h] _BYTE *v9; // [rsp+1Ah] [rbp-40h] int v10; // [rsp+26h] [rbp-34h] int i; // [rsp+2Ah] [rbp-30h] int v12; // [rsp+2Eh] [rbp-2Ch] if ( *(_DWORD *)a2 ) { v12 = 0; for ( i = 0; ; ++i ) { v7 = *(_BYTE **)(*(_QWORD *)(a2 + 16) + 8LL * i); if ( !v7 ) break; for ( j = *a1; ; ++j ) { v6 = 0; if ( j < a4 ) { if ( (a3 & 8) == 0 || (v6 = 0, *j != 44) && (v6 = 0, *j != 61) ) v6 = *(char *)(*((_QWORD *)&my_charset_latin1 + 10) + (unsigned __int8)*j) == *(char *)(*((_QWORD *)&my_charset_latin1 + 10) + (unsigned __int8)*v7); } if ( !v6 ) break; ++v7; } if ( !*v7 ) { while ( 1 ) { v5 = 0; if ( j < a4 ) v5 = *j == 32; if ( !v5 ) break; ++j; } if ( j >= a4 || (a3 & 8) != 0 && (*j == 44 || *j == 61) ) { *a1 = j; return (unsigned int)(i + 1); } } if ( j >= a4 && ((a3 & 8) == 0 || *j != 44 && *j != 61) && (!*v7 || (a3 & 1) == 0) ) { ++v12; v10 = i; v9 = j; } } if ( v12 && *a1 != a4 ) { if ( v12 == 1 && (a3 & 1) == 0 ) { *a1 = v9; return (unsigned int)(v10 + 1); } else { return (unsigned int)-1; } } else { return 0; } } else { return 0; } }
find_type_eol: PUSH RBP MOV RBP,RSP 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 EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x40],RAX LEA RAX,[0x389dc0] MOV qword ptr [RBP + -0x58],RAX JMP 0x001351ae LAB_001351ae: JMP 0x001351b0 LAB_001351b0: JMP 0x001351b2 LAB_001351b2: MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0x0 JNZ 0x001351cd JMP 0x001351bd LAB_001351bd: JMP 0x001351bf LAB_001351bf: JMP 0x001351c1 LAB_001351c1: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001353e3 LAB_001351cd: MOV dword ptr [RBP + -0x2c],0x0 MOV dword ptr [RBP + -0x30],0x0 LAB_001351db: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x50],RAX CMP RAX,0x0 JZ 0x0013538b MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x48],RAX LAB_00135204: MOV RCX,qword ptr [RBP + -0x48] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x28] MOV byte ptr [RBP + -0x59],AL JNC 0x0013526e MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x8 CMP EAX,0x0 JZ 0x00135240 MOV RAX,qword ptr [RBP + -0x48] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x2c MOV byte ptr [RBP + -0x59],AL JZ 0x0013526e MOV RAX,qword ptr [RBP + -0x48] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x3d MOV byte ptr [RBP + -0x59],AL JZ 0x0013526e LAB_00135240: MOV RAX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RAX + 0x50] MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,byte ptr [RCX] MOVSX EAX,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RCX + 0x50] MOV RDX,qword ptr [RBP + -0x50] MOVZX EDX,byte ptr [RDX] MOVSX ECX,byte ptr [RCX + RDX*0x1] CMP EAX,ECX SETZ AL MOV byte ptr [RBP + -0x59],AL LAB_0013526e: MOV AL,byte ptr [RBP + -0x59] TEST AL,0x1 JNZ 0x00135277 JMP 0x00135296 LAB_00135277: JMP 0x00135279 LAB_00135279: MOV RAX,qword ptr [RBP + -0x48] ADD RAX,0x1 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x1 MOV qword ptr [RBP + -0x50],RAX JMP 0x00135204 LAB_00135296: MOV RAX,qword ptr [RBP + -0x50] CMP byte ptr [RAX],0x0 JNZ 0x00135323 JMP 0x001352a5 LAB_001352a5: MOV RCX,qword ptr [RBP + -0x48] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x28] MOV byte ptr [RBP + -0x5a],AL JNC 0x001352c4 MOV RAX,qword ptr [RBP + -0x48] MOVSX EAX,byte ptr [RAX] CMP EAX,0x20 SETZ AL MOV byte ptr [RBP + -0x5a],AL LAB_001352c4: MOV AL,byte ptr [RBP + -0x5a] TEST AL,0x1 JNZ 0x001352cd JMP 0x001352db LAB_001352cd: MOV RAX,qword ptr [RBP + -0x48] ADD RAX,0x1 MOV qword ptr [RBP + -0x48],RAX JMP 0x001352a5 LAB_001352db: MOV RAX,qword ptr [RBP + -0x48] CMP RAX,qword ptr [RBP + -0x28] JNC 0x00135308 MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x8 CMP EAX,0x0 JZ 0x00135321 MOV RAX,qword ptr [RBP + -0x48] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2c JZ 0x00135308 MOV RAX,qword ptr [RBP + -0x48] MOVSX EAX,byte ptr [RAX] CMP EAX,0x3d JNZ 0x00135321 LAB_00135308: MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV EAX,dword ptr [RBP + -0x30] ADD EAX,0x1 MOV dword ptr [RBP + -0x4],EAX JMP 0x001353e3 LAB_00135321: JMP 0x00135323 LAB_00135323: MOV RAX,qword ptr [RBP + -0x48] CMP RAX,qword ptr [RBP + -0x28] JC 0x0013537b MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x8 CMP EAX,0x0 JZ 0x00135350 MOV RAX,qword ptr [RBP + -0x48] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2c JZ 0x0013537b MOV RAX,qword ptr [RBP + -0x48] MOVSX EAX,byte ptr [RAX] CMP EAX,0x3d JZ 0x0013537b LAB_00135350: MOV RAX,qword ptr [RBP + -0x50] CMP byte ptr [RAX],0x0 JZ 0x00135364 MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x1 CMP EAX,0x0 JNZ 0x0013537b LAB_00135364: MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x40],RAX LAB_0013537b: JMP 0x0013537d LAB_0013537d: MOV EAX,dword ptr [RBP + -0x30] ADD EAX,0x1 MOV dword ptr [RBP + -0x30],EAX JMP 0x001351db LAB_0013538b: CMP dword ptr [RBP + -0x2c],0x0 JZ 0x0013539e MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP RAX,qword ptr [RBP + -0x28] JNZ 0x001353ad LAB_0013539e: JMP 0x001353a0 LAB_001353a0: JMP 0x001353a2 LAB_001353a2: JMP 0x001353a4 LAB_001353a4: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001353e3 LAB_001353ad: CMP dword ptr [RBP + -0x2c],0x1 JNZ 0x001353be MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x1 CMP EAX,0x0 JZ 0x001353cd LAB_001353be: JMP 0x001353c0 LAB_001353c0: JMP 0x001353c2 LAB_001353c2: JMP 0x001353c4 LAB_001353c4: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001353e3 LAB_001353cd: JMP 0x001353cf LAB_001353cf: MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV EAX,dword ptr [RBP + -0x34] ADD EAX,0x1 MOV dword ptr [RBP + -0x4],EAX LAB_001353e3: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int find_type_eol(int8 *param_1,int *param_2,uint param_3,byte *param_4) { bool bVar1; byte *local_58; byte *local_50; byte *local_48; int local_3c; int local_38; int local_34; int local_c; if (*param_2 == 0) { local_c = 0; } else { local_34 = 0; local_38 = 0; while (local_58 = *(byte **)(*(long *)(param_2 + 4) + (long)local_38 * 8), local_58 != (byte *)0x0) { local_50 = (byte *)*param_1; while( true ) { bVar1 = false; if ((local_50 < param_4) && (((param_3 & 8) == 0 || ((bVar1 = false, *local_50 != 0x2c && (bVar1 = false, *local_50 != 0x3d)))))) { bVar1 = PTR_to_upper_latin1_00389e10[*local_50] == PTR_to_upper_latin1_00389e10[*local_58] ; } if (!bVar1) break; local_50 = local_50 + 1; local_58 = local_58 + 1; } if (*local_58 == 0) { while( true ) { bVar1 = false; if (local_50 < param_4) { bVar1 = *local_50 == 0x20; } if (!bVar1) break; local_50 = local_50 + 1; } if ((param_4 <= local_50) || (((param_3 & 8) != 0 && ((*local_50 == 0x2c || (*local_50 == 0x3d)))))) { *param_1 = local_50; return local_38 + 1; } } if (((param_4 <= local_50) && (((param_3 & 8) == 0 || ((*local_50 != 0x2c && (*local_50 != 0x3d)))))) && ((*local_58 == 0 || ((param_3 & 1) == 0)))) { local_34 = local_34 + 1; local_3c = local_38; local_48 = local_50; } local_38 = local_38 + 1; } if ((local_34 == 0) || ((byte *)*param_1 == param_4)) { local_c = 0; } else if ((local_34 == 1) && ((param_3 & 1) == 0)) { *param_1 = local_48; local_c = local_3c + 1; } else { local_c = -1; } } return local_c; }
13,150
find_type_eol
eloqsql/mysys/typelib.c
static int find_type_eol(const char **x, const TYPELIB *typelib, uint flags, const char *eol) { int find,pos; int UNINIT_VAR(findpos); /* guarded by find */ const char *UNINIT_VAR(termptr); const char *i; const char *j; CHARSET_INFO *cs= &my_charset_latin1; DBUG_ENTER("find_type_eol"); DBUG_PRINT("enter",("x: '%s' lib: %p", *x, typelib)); DBUG_ASSERT(!(flags & ~(FIND_TYPE_NO_PREFIX | FIND_TYPE_COMMA_TERM))); if (!typelib->count) { DBUG_PRINT("exit",("no count")); DBUG_RETURN(0); } find=0; for (pos=0 ; (j=typelib->type_names[pos]) ; pos++) { for (i=*x ; i < eol && !is_field_separator(flags, *i) && my_toupper(cs, *i) == my_toupper(cs, *j) ; i++, j++) ; if (! *j) { while (i < eol && *i == ' ') i++; /* skip_end_space */ if (i >= eol || is_field_separator(flags, *i)) { *x= i; DBUG_RETURN(pos+1); } } if ((i >= eol && !is_field_separator(flags, *i)) && (!*j || !(flags & FIND_TYPE_NO_PREFIX))) { find++; findpos=pos; termptr=i; } } if (find == 0 || *x == eol) { DBUG_PRINT("exit",("Couldn't find type")); DBUG_RETURN(0); } else if (find != 1 || (flags & FIND_TYPE_NO_PREFIX)) { DBUG_PRINT("exit",("Too many possibilities")); DBUG_RETURN(-1); } *x= termptr; DBUG_RETURN(findpos+1); }
O3
c
find_type_eol: xorl %eax, %eax cmpl $0x0, (%rsi) je 0x2f765 pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq 0x10(%rsi), %r8 movq (%r8), %r13 testq %r13, %r13 je 0x2f75b movq (%rdi), %r10 leaq 0x2f0729(%rip), %rax # 0x31fd70 movq 0x50(%rax), %rbx movq %rcx, %r14 subq %r10, %r14 xorl %eax, %eax xorl %r11d, %r11d cmpq %rcx, %r10 jae 0x2f699 leaq (%r14,%r13), %r9 movq %r10, %r15 movzbl (%r15), %r12d testb $0x8, %dl je 0x2f677 cmpq $0x2c, %r12 je 0x2f69c cmpl $0x3d, %r12d je 0x2f69c movb (%rbx,%r12), %sil movzbl (%r13), %r12d cmpb (%rbx,%r12), %sil jne 0x2f6a0 incq %r15 incq %r13 cmpq %rcx, %r15 jne 0x2f662 movq %rcx, %r15 movq %r9, %r13 jmp 0x2f69c movq %r10, %r15 movb (%r13), %r12b testb %r12b, %r12b je 0x2f6b1 cmpq %rcx, %r15 jb 0x2f715 testb $0x8, %dl jne 0x2f6f1 jmp 0x2f701 cmpq %rcx, %r15 jae 0x2f756 movq %rcx, %r9 subq %r15, %r9 movzbl (%r15), %r13d cmpl $0x20, %r13d jne 0x2f6d4 incq %r15 decq %r9 jne 0x2f6c0 jmp 0x2f753 testb $0x8, %dl jne 0x2f6e0 cmpq %rcx, %r15 jae 0x2f701 jmp 0x2f715 cmpl $0x3d, %r13d je 0x2f756 cmpl $0x2c, %r13d je 0x2f756 cmpq %rcx, %r15 jb 0x2f715 movzbl (%r15), %r9d cmpl $0x2c, %r9d je 0x2f715 cmpl $0x3d, %r9d je 0x2f715 testb $0x1, %dl je 0x2f70b testb %r12b, %r12b jne 0x2f715 incl %r11d movl %eax, -0x2c(%rbp) movq %r15, -0x38(%rbp) movq 0x8(%r8,%rax,8), %r13 incq %rax testq %r13, %r13 jne 0x2f656 xorl %eax, %eax testl %r11d, %r11d je 0x2f75b cmpq %rcx, (%rdi) je 0x2f75b cmpl $0x1, %r11d setne %cl movl $0xffffffff, %eax # imm = 0xFFFFFFFF orb %cl, %dl testb $0x1, %dl jne 0x2f75b movl -0x2c(%rbp), %eax incl %eax movq -0x38(%rbp), %rcx movq %rcx, (%rdi) jmp 0x2f75b movq %rcx, %r15 movq %r15, (%rdi) incl %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
find_type_eol: xor eax, eax cmp dword ptr [rsi], 0 jz locret_2F765 push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx mov r8, [rsi+10h] mov r13, [r8] test r13, r13 jz loc_2F75B mov r10, [rdi] lea rax, my_charset_latin1 mov rbx, [rax+50h] mov r14, rcx sub r14, r10 xor eax, eax xor r11d, r11d loc_2F656: cmp r10, rcx jnb short loc_2F699 lea r9, [r14+r13] mov r15, r10 loc_2F662: movzx r12d, byte ptr [r15] test dl, 8 jz short loc_2F677 cmp r12, 2Ch ; ',' jz short loc_2F69C cmp r12d, 3Dh ; '=' jz short loc_2F69C loc_2F677: mov sil, [rbx+r12] movzx r12d, byte ptr [r13+0] cmp sil, [rbx+r12] jnz short loc_2F6A0 inc r15 inc r13 cmp r15, rcx jnz short loc_2F662 mov r15, rcx mov r13, r9 jmp short loc_2F69C loc_2F699: mov r15, r10 loc_2F69C: mov r12b, [r13+0] loc_2F6A0: test r12b, r12b jz short loc_2F6B1 cmp r15, rcx jb short loc_2F715 test dl, 8 jnz short loc_2F6F1 jmp short loc_2F701 loc_2F6B1: cmp r15, rcx jnb loc_2F756 mov r9, rcx sub r9, r15 loc_2F6C0: movzx r13d, byte ptr [r15] cmp r13d, 20h ; ' ' jnz short loc_2F6D4 inc r15 dec r9 jnz short loc_2F6C0 jmp short loc_2F753 loc_2F6D4: test dl, 8 jnz short loc_2F6E0 cmp r15, rcx jnb short loc_2F701 jmp short loc_2F715 loc_2F6E0: cmp r13d, 3Dh ; '=' jz short loc_2F756 cmp r13d, 2Ch ; ',' jz short loc_2F756 cmp r15, rcx jb short loc_2F715 loc_2F6F1: movzx r9d, byte ptr [r15] cmp r9d, 2Ch ; ',' jz short loc_2F715 cmp r9d, 3Dh ; '=' jz short loc_2F715 loc_2F701: test dl, 1 jz short loc_2F70B test r12b, r12b jnz short loc_2F715 loc_2F70B: inc r11d mov [rbp-2Ch], eax mov [rbp-38h], r15 loc_2F715: mov r13, [r8+rax*8+8] inc rax test r13, r13 jnz loc_2F656 xor eax, eax test r11d, r11d jz short loc_2F75B cmp [rdi], rcx jz short loc_2F75B cmp r11d, 1 setnz cl mov eax, 0FFFFFFFFh or dl, cl test dl, 1 jnz short loc_2F75B mov eax, [rbp-2Ch] inc eax mov rcx, [rbp-38h] mov [rdi], rcx jmp short loc_2F75B loc_2F753: mov r15, rcx loc_2F756: mov [rdi], r15 inc eax loc_2F75B: pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp locret_2F765: retn
long long find_type_eol(_QWORD *a1, long long a2, char a3, unsigned __int8 *a4) { long long result; // rax _BYTE **v5; // r8 _BYTE *v6; // r13 unsigned __int8 *v7; // r10 long long v8; // rbx unsigned __int8 *v9; // r14 long long v10; // rax int v11; // r11d _BYTE *v12; // r9 unsigned __int8 *v13; // r15 long long v14; // r12 char v15; // si long long v16; // r12 signed long long v17; // r9 int v18; // r13d int v19; // r9d long long v20; // [rsp-8h] [rbp-8h] result = 0LL; if ( !*(_DWORD *)a2 ) return result; v5 = *(_BYTE ***)(a2 + 16); v6 = *v5; if ( !*v5 ) return result; v7 = (unsigned __int8 *)*a1; v8 = *((_QWORD *)&my_charset_latin1 + 10); v9 = &a4[-*a1]; v10 = 0LL; v11 = 0; do { if ( v7 >= a4 ) { v13 = v7; } else { v12 = &v6[(_QWORD)v9]; v13 = v7; while ( 1 ) { v14 = *v13; if ( (a3 & 8) != 0 && (v14 == 44 || (_DWORD)v14 == 61) ) break; v15 = *(_BYTE *)(v8 + v14); v16 = (unsigned __int8)*v6; if ( v15 != *(_BYTE *)(v8 + v16) ) goto LABEL_14; ++v13; ++v6; if ( v13 == a4 ) { v13 = a4; v6 = v12; break; } } } LOBYTE(v16) = *v6; LABEL_14: if ( (_BYTE)v16 ) { if ( v13 < a4 ) goto LABEL_34; if ( (a3 & 8) != 0 ) { LABEL_29: v19 = *v13; if ( v19 == 44 || v19 == 61 ) goto LABEL_34; } LABEL_31: if ( (a3 & 1) == 0 || !(_BYTE)v16 ) { ++v11; *((_DWORD *)&v20 - 11) = v10; *(&v20 - 7) = (long long)v13; } goto LABEL_34; } if ( v13 >= a4 ) goto LABEL_39; v17 = a4 - v13; while ( 1 ) { v18 = *v13; if ( v18 != 32 ) break; ++v13; if ( !--v17 ) { v13 = a4; goto LABEL_39; } } if ( (a3 & 8) == 0 ) { if ( v13 < a4 ) goto LABEL_34; goto LABEL_31; } if ( v18 == 61 || v18 == 44 ) { LABEL_39: *a1 = v13; return (unsigned int)(v10 + 1); } if ( v13 >= a4 ) goto LABEL_29; LABEL_34: v6 = v5[++v10]; } while ( v6 ); result = 0LL; if ( v11 && (unsigned __int8 *)*a1 != a4 ) { result = 0xFFFFFFFFLL; if ( !((v11 != 1) | a3 & 1) ) { result = (unsigned int)(*((_DWORD *)&v20 - 11) + 1); *a1 = *(&v20 - 7); } } return result; }
find_type_eol: XOR EAX,EAX CMP dword ptr [RSI],0x0 JZ 0x0012f765 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R8,qword ptr [RSI + 0x10] MOV R13,qword ptr [R8] TEST R13,R13 JZ 0x0012f75b MOV R10,qword ptr [RDI] LEA RAX,[0x41fd70] MOV RBX,qword ptr [RAX + 0x50] MOV R14,RCX SUB R14,R10 XOR EAX,EAX XOR R11D,R11D LAB_0012f656: CMP R10,RCX JNC 0x0012f699 LEA R9,[R14 + R13*0x1] MOV R15,R10 LAB_0012f662: MOVZX R12D,byte ptr [R15] TEST DL,0x8 JZ 0x0012f677 CMP R12,0x2c JZ 0x0012f69c CMP R12D,0x3d JZ 0x0012f69c LAB_0012f677: MOV SIL,byte ptr [RBX + R12*0x1] MOVZX R12D,byte ptr [R13] CMP SIL,byte ptr [RBX + R12*0x1] JNZ 0x0012f6a0 INC R15 INC R13 CMP R15,RCX JNZ 0x0012f662 MOV R15,RCX MOV R13,R9 JMP 0x0012f69c LAB_0012f699: MOV R15,R10 LAB_0012f69c: MOV R12B,byte ptr [R13] LAB_0012f6a0: TEST R12B,R12B JZ 0x0012f6b1 CMP R15,RCX JC 0x0012f715 TEST DL,0x8 JNZ 0x0012f6f1 JMP 0x0012f701 LAB_0012f6b1: CMP R15,RCX JNC 0x0012f756 MOV R9,RCX SUB R9,R15 LAB_0012f6c0: MOVZX R13D,byte ptr [R15] CMP R13D,0x20 JNZ 0x0012f6d4 INC R15 DEC R9 JNZ 0x0012f6c0 JMP 0x0012f753 LAB_0012f6d4: TEST DL,0x8 JNZ 0x0012f6e0 CMP R15,RCX JNC 0x0012f701 JMP 0x0012f715 LAB_0012f6e0: CMP R13D,0x3d JZ 0x0012f756 CMP R13D,0x2c JZ 0x0012f756 CMP R15,RCX JC 0x0012f715 LAB_0012f6f1: MOVZX R9D,byte ptr [R15] CMP R9D,0x2c JZ 0x0012f715 CMP R9D,0x3d JZ 0x0012f715 LAB_0012f701: TEST DL,0x1 JZ 0x0012f70b TEST R12B,R12B JNZ 0x0012f715 LAB_0012f70b: INC R11D MOV dword ptr [RBP + -0x2c],EAX MOV qword ptr [RBP + -0x38],R15 LAB_0012f715: MOV R13,qword ptr [R8 + RAX*0x8 + 0x8] INC RAX TEST R13,R13 JNZ 0x0012f656 XOR EAX,EAX TEST R11D,R11D JZ 0x0012f75b CMP qword ptr [RDI],RCX JZ 0x0012f75b CMP R11D,0x1 SETNZ CL MOV EAX,0xffffffff OR DL,CL TEST DL,0x1 JNZ 0x0012f75b MOV EAX,dword ptr [RBP + -0x2c] INC EAX MOV RCX,qword ptr [RBP + -0x38] MOV qword ptr [RDI],RCX JMP 0x0012f75b LAB_0012f753: MOV R15,RCX LAB_0012f756: MOV qword ptr [RDI],R15 INC EAX LAB_0012f75b: POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP LAB_0012f765: RET
int find_type_eol(int8 *param_1,int *param_2,byte param_3,byte *param_4) { byte *pbVar1; byte bVar2; byte *pbVar3; int iVar4; long lVar5; long lVar6; int iVar7; byte bVar8; byte *pbVar9; byte *pbVar10; byte *pbVar11; byte *pbVar12; byte *local_40; int local_34; iVar4 = 0; if (*param_2 != 0) { pbVar9 = (byte *)**(int8 **)(param_2 + 4); if (pbVar9 != (byte *)0x0) { pbVar3 = (byte *)*param_1; lVar5 = 0; iVar7 = 0; do { pbVar10 = pbVar9; pbVar12 = pbVar3; if (pbVar3 < param_4) { pbVar1 = pbVar9 + ((long)param_4 - (long)pbVar3); pbVar11 = pbVar3; do { bVar2 = *pbVar11; pbVar12 = pbVar11; if (((param_3 & 8) != 0) && ((pbVar10 = pbVar9, (ulong)bVar2 == 0x2c || (bVar2 == 0x3d)))) break; bVar8 = *pbVar9; if (PTR_to_upper_latin1_0041fdc0[bVar2] != PTR_to_upper_latin1_0041fdc0[bVar8]) goto LAB_0012f6a0; pbVar11 = pbVar11 + 1; pbVar9 = pbVar9 + 1; pbVar10 = pbVar1; pbVar12 = param_4; } while (pbVar11 != param_4); } bVar8 = *pbVar10; LAB_0012f6a0: if (bVar8 == 0) { pbVar9 = pbVar12; if (param_4 <= pbVar12) { LAB_0012f756: *param_1 = pbVar9; return (int)lVar5 + 1; } lVar6 = (long)param_4 - (long)pbVar12; while (bVar2 = *pbVar12, bVar2 == 0x20) { pbVar12 = pbVar12 + 1; lVar6 = lVar6 + -1; pbVar9 = param_4; if (lVar6 == 0) goto LAB_0012f756; } if ((param_3 & 8) == 0) { if (param_4 <= pbVar12) goto LAB_0012f701; } else { pbVar9 = pbVar12; if ((bVar2 == 0x3d) || (bVar2 == 0x2c)) goto LAB_0012f756; if (param_4 <= pbVar12) goto LAB_0012f6f1; } } else if (param_4 <= pbVar12) { if ((param_3 & 8) != 0) { LAB_0012f6f1: if ((*pbVar12 == 0x2c) || (*pbVar12 == 0x3d)) goto LAB_0012f715; } LAB_0012f701: if (((param_3 & 1) == 0) || (bVar8 == 0)) { iVar7 = iVar7 + 1; local_40 = pbVar12; local_34 = (int)lVar5; } } LAB_0012f715: pbVar9 = (byte *)(*(int8 **)(param_2 + 4))[lVar5 + 1]; lVar5 = lVar5 + 1; } while (pbVar9 != (byte *)0x0); iVar4 = 0; if (((iVar7 != 0) && ((byte *)*param_1 != param_4)) && (iVar4 = -1, (param_3 & 1) == 0 && iVar7 == 1)) { iVar4 = local_34 + 1; *param_1 = local_40; } } } return iVar4; }
13,151
my_end
eloqsql/mysys/my_init.c
void my_end(int infoflag) { /* this code is suboptimal to workaround a bug in Sun CC: Sun C++ 5.6 2004/06/02 for x86, and should not be optimized until this compiler is not in use anymore */ FILE *info_file= DBUG_FILE; my_bool print_info= (info_file != stderr); if (!my_init_done) return; /* We do not use DBUG_ENTER here, as after cleanup DBUG is no longer operational, so we cannot use DBUG_RETURN. */ DBUG_PRINT("info",("Shutting down: infoflag: %d print_info: %d", infoflag, print_info)); if (!info_file) { info_file= stderr; print_info= 0; } if ((infoflag & MY_CHECK_ERROR) || print_info) { /* Test if some file is left open */ char ebuff[512]; uint i, open_files, open_streams; for (open_streams= open_files= i= 0 ; i < my_file_limit ; i++) { if (my_file_info[i].type == UNOPEN) continue; if (my_file_info[i].type == STREAM_BY_FOPEN || my_file_info[i].type == STREAM_BY_FDOPEN) open_streams++; else open_files++; #ifdef EXTRA_DEBUG fprintf(stderr, EE(EE_FILE_NOT_CLOSED), my_file_info[i].name, i); fputc('\n', stderr); #endif } if (open_files || open_streams) { my_snprintf(ebuff, sizeof(ebuff), EE(EE_OPEN_WARNING), open_files, open_streams); my_message_stderr(EE_OPEN_WARNING, ebuff, ME_BELL); DBUG_PRINT("error", ("%s", ebuff)); } #ifdef CHECK_UNLIKELY end_my_likely(info_file); #endif } free_charsets(); my_error_unregister_all(); my_once_free(); if ((infoflag & MY_GIVE_INFO) || print_info) { #ifdef HAVE_GETRUSAGE struct rusage rus; #ifdef HAVE_valgrind /* Purify assumes that rus is uninitialized after getrusage call */ bzero((char*) &rus, sizeof(rus)); #endif if (!getrusage(RUSAGE_SELF, &rus)) fprintf(info_file,"\n\ User time %.2f, System time %.2f\n\ Maximum resident set size %ld, Integral resident set size %ld\n\ Non-physical pagefaults %ld, Physical pagefaults %ld, Swaps %ld\n\ Blocks in %ld out %ld, Messages in %ld out %ld, Signals %ld\n\ Voluntary context switches %ld, Involuntary context switches %ld\n", (rus.ru_utime.tv_sec * SCALE_SEC + rus.ru_utime.tv_usec / SCALE_USEC) / 100.0, (rus.ru_stime.tv_sec * SCALE_SEC + rus.ru_stime.tv_usec / SCALE_USEC) / 100.0, rus.ru_maxrss, rus.ru_idrss, rus.ru_minflt, rus.ru_majflt, rus.ru_nswap, rus.ru_inblock, rus.ru_oublock, rus.ru_msgsnd, rus.ru_msgrcv, rus.ru_nsignals, rus.ru_nvcsw, rus.ru_nivcsw); #endif #if defined(_MSC_VER) _CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_WARN, _CRTDBG_FILE_STDERR ); _CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_ERROR, _CRTDBG_FILE_STDERR ); _CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDERR ); _CrtCheckMemory(); #endif } my_thread_end(); my_thread_global_end(); if (!(infoflag & MY_DONT_FREE_DBUG)) DBUG_END(); /* Must be done as late as possible */ my_mutex_end(); #if defined(SAFE_MUTEX) /* Check on destroying of mutexes. A few may be left that will get cleaned up by C++ destructors */ safe_mutex_end((infoflag & (MY_GIVE_INFO | MY_CHECK_ERROR)) ? stderr : (FILE *) 0); #endif /* defined(SAFE_MUTEX) */ #ifdef _WIN32 WSACleanup(); #endif /* At very last, delete mysys key, it is used everywhere including DBUG */ pthread_key_delete(THR_KEY_mysys); my_init_done= my_thr_key_mysys_exists= 0; }
O0
c
my_end: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x308, %rsp # imm = 0x308 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movl %edi, -0x234(%rbp) movq 0x1b4d72(%rip), %rax # 0x231fe0 movq (%rax), %rax movq %rax, -0x240(%rbp) movq -0x240(%rbp), %rax movq 0x1b4d5a(%rip), %rcx # 0x231fe0 cmpq (%rcx), %rax setne %al andb $0x1, %al movzbl %al, %eax movb %al, -0x241(%rbp) leaq 0x3c84a2(%rip), %rax # 0x445740 cmpb $0x0, (%rax) jne 0x7d2a8 jmp 0x7d5a1 jmp 0x7d2aa jmp 0x7d2ac cmpq $0x0, -0x240(%rbp) jne 0x7d2ce movq 0x1b4d23(%rip), %rax # 0x231fe0 movq (%rax), %rax movq %rax, -0x240(%rbp) movb $0x0, -0x241(%rbp) movl -0x234(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0x7d2ec movsbl -0x241(%rbp), %eax cmpl $0x0, %eax je 0x7d40a movl $0x0, -0x248(%rbp) movl $0x0, -0x24c(%rbp) movl $0x0, -0x250(%rbp) movl -0x248(%rbp), %eax leaq 0x1b8479(%rip), %rcx # 0x235790 cmpl (%rcx), %eax jae 0x7d3ae leaq 0x1b8472(%rip), %rax # 0x235798 movq (%rax), %rax movl -0x248(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax cmpl $0x0, 0x8(%rax) jne 0x7d33e jmp 0x7d39a leaq 0x1b8453(%rip), %rax # 0x235798 movq (%rax), %rax movl -0x248(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax cmpl $0x3, 0x8(%rax) je 0x7d378 leaq 0x1b8436(%rip), %rax # 0x235798 movq (%rax), %rax movl -0x248(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax cmpl $0x4, 0x8(%rax) jne 0x7d389 movl -0x250(%rbp), %eax addl $0x1, %eax movl %eax, -0x250(%rbp) jmp 0x7d398 movl -0x24c(%rbp), %eax addl $0x1, %eax movl %eax, -0x24c(%rbp) jmp 0x7d39a movl -0x248(%rbp), %eax addl $0x1, %eax movl %eax, -0x248(%rbp) jmp 0x7d30a cmpl $0x0, -0x24c(%rbp) jne 0x7d3c0 cmpl $0x0, -0x250(%rbp) je 0x7d408 leaq -0x230(%rbp), %rdi leaq 0x1b88e2(%rip), %rax # 0x235cb0 movq 0x90(%rax), %rdx movl -0x24c(%rbp), %ecx movl -0x250(%rbp), %r8d movl $0x200, %esi # imm = 0x200 movb $0x0, %al callq 0xc7b80 leaq -0x230(%rbp), %rsi movl $0x13, %edi movl $0x4, %edx callq 0x7e3a0 jmp 0x7d406 jmp 0x7d408 jmp 0x7d40a callq 0x70250 callq 0x78b20 callq 0x7e710 movl -0x234(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax jne 0x7d437 movsbl -0x241(%rbp), %eax cmpl $0x0, %eax je 0x7d55c xorl %edi, %edi leaq -0x2e0(%rbp), %rsi callq 0x36b10 cmpl $0x0, %eax jne 0x7d55a movq -0x240(%rbp), %rdi imulq $0x64, -0x2e0(%rbp), %rax movq %rax, -0x2f0(%rbp) movq -0x2d8(%rbp), %rax movl $0x2710, %ecx # imm = 0x2710 cqto idivq %rcx movq %rax, %rcx movq -0x2f0(%rbp), %rax addq %rcx, %rax cvtsi2sd %rax, %xmm0 movsd 0x56af1(%rip), %xmm1 # 0xd3f80 divsd %xmm1, %xmm0 imulq $0x64, -0x2d0(%rbp), %rax movq %rax, -0x2e8(%rbp) movq -0x2c8(%rbp), %rax movl $0x2710, %ecx # imm = 0x2710 cqto idivq %rcx movq %rax, %rcx movq -0x2e8(%rbp), %rax addq %rcx, %rax cvtsi2sd %rax, %xmm1 movsd 0x56ab3(%rip), %xmm2 # 0xd3f80 divsd %xmm2, %xmm1 movq -0x2c0(%rbp), %rdx movq -0x2b0(%rbp), %rcx movq -0x2a0(%rbp), %r8 movq -0x298(%rbp), %r9 movq -0x290(%rbp), %r13 movq -0x288(%rbp), %r12 movq -0x280(%rbp), %r15 movq -0x278(%rbp), %r14 movq -0x270(%rbp), %rbx movq -0x268(%rbp), %r11 movq -0x260(%rbp), %r10 movq -0x258(%rbp), %rax leaq 0x53a6d(%rip), %rsi # 0xd0f99 movq %r13, (%rsp) movq %r12, 0x8(%rsp) movq %r15, 0x10(%rsp) movq %r14, 0x18(%rsp) movq %rbx, 0x20(%rsp) movq %r11, 0x28(%rsp) movq %r10, 0x30(%rsp) movq %rax, 0x38(%rsp) movb $0x2, %al callq 0x361c0 jmp 0x7d55c callq 0x7fe40 callq 0x7fbb0 movl -0x234(%rbp), %eax andl $0x4, %eax cmpl $0x0, %eax jne 0x7d57a jmp 0x7d576 jmp 0x7d578 jmp 0x7d57a callq 0x80640 leaq 0x3c8ebe(%rip), %rax # 0x446444 movl (%rax), %edi callq 0x36930 leaq 0x3c8be8(%rip), %rax # 0x44617c movb $0x0, (%rax) leaq 0x3c81a2(%rip), %rax # 0x445740 movb $0x0, (%rax) movq %fs:0x28, %rax movq -0x30(%rbp), %rcx cmpq %rcx, %rax jne 0x7d5c5 addq $0x308, %rsp # imm = 0x308 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x362a0 nopw (%rax,%rax)
my_end: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 308h mov rax, fs:28h mov [rbp+var_30], rax mov [rbp+var_234], edi mov rax, cs:stderr_ptr mov rax, [rax] mov [rbp+var_240], rax mov rax, [rbp+var_240] mov rcx, cs:stderr_ptr cmp rax, [rcx] setnz al and al, 1 movzx eax, al mov [rbp+var_241], al lea rax, my_init_done cmp byte ptr [rax], 0 jnz short loc_7D2A8 jmp loc_7D5A1 loc_7D2A8: jmp short $+2 loc_7D2AA: jmp short $+2 loc_7D2AC: cmp [rbp+var_240], 0 jnz short loc_7D2CE mov rax, cs:stderr_ptr mov rax, [rax] mov [rbp+var_240], rax mov [rbp+var_241], 0 loc_7D2CE: mov eax, [rbp+var_234] and eax, 1 cmp eax, 0 jnz short loc_7D2EC movsx eax, [rbp+var_241] cmp eax, 0 jz loc_7D40A loc_7D2EC: mov [rbp+var_248], 0 mov [rbp+var_24C], 0 mov [rbp+var_250], 0 loc_7D30A: mov eax, [rbp+var_248] lea rcx, my_file_limit cmp eax, [rcx] jnb loc_7D3AE lea rax, my_file_info mov rax, [rax] mov ecx, [rbp+var_248] shl rcx, 4 add rax, rcx cmp dword ptr [rax+8], 0 jnz short loc_7D33E jmp short loc_7D39A loc_7D33E: lea rax, my_file_info mov rax, [rax] mov ecx, [rbp+var_248] shl rcx, 4 add rax, rcx cmp dword ptr [rax+8], 3 jz short loc_7D378 lea rax, my_file_info mov rax, [rax] mov ecx, [rbp+var_248] shl rcx, 4 add rax, rcx cmp dword ptr [rax+8], 4 jnz short loc_7D389 loc_7D378: mov eax, [rbp+var_250] add eax, 1 mov [rbp+var_250], eax jmp short loc_7D398 loc_7D389: mov eax, [rbp+var_24C] add eax, 1 mov [rbp+var_24C], eax loc_7D398: jmp short $+2 loc_7D39A: mov eax, [rbp+var_248] add eax, 1 mov [rbp+var_248], eax jmp loc_7D30A loc_7D3AE: cmp [rbp+var_24C], 0 jnz short loc_7D3C0 cmp [rbp+var_250], 0 jz short loc_7D408 loc_7D3C0: lea rdi, [rbp+var_230] lea rax, globerrs mov rdx, [rax+90h] mov ecx, [rbp+var_24C] mov r8d, [rbp+var_250] mov esi, 200h mov al, 0 call my_snprintf lea rsi, [rbp+var_230] mov edi, 13h mov edx, 4 call my_message_stderr jmp short $+2 loc_7D406: jmp short $+2 loc_7D408: jmp short $+2 loc_7D40A: call free_charsets call my_error_unregister_all call my_once_free mov eax, [rbp+var_234] and eax, 2 cmp eax, 0 jnz short loc_7D437 movsx eax, [rbp+var_241] cmp eax, 0 jz loc_7D55C loc_7D437: xor edi, edi lea rsi, [rbp+var_2E0] call _getrusage cmp eax, 0 jnz loc_7D55A mov rdi, [rbp+var_240] imul rax, [rbp+var_2E0], 64h ; 'd' mov [rbp+var_2F0], rax mov rax, [rbp+var_2D8] mov ecx, 2710h cqo idiv rcx mov rcx, rax mov rax, [rbp+var_2F0] add rax, rcx cvtsi2sd xmm0, rax movsd xmm1, cs:qword_D3F80 divsd xmm0, xmm1 imul rax, [rbp+var_2D0], 64h ; 'd' mov [rbp+var_2E8], rax mov rax, [rbp+var_2C8] mov ecx, 2710h cqo idiv rcx mov rcx, rax mov rax, [rbp+var_2E8] add rax, rcx cvtsi2sd xmm1, rax movsd xmm2, cs:qword_D3F80 divsd xmm1, xmm2 mov rdx, [rbp+var_2C0] mov rcx, [rbp+var_2B0] mov r8, [rbp+var_2A0] mov r9, [rbp+var_298] mov r13, [rbp+var_290] mov r12, [rbp+var_288] mov r15, [rbp+var_280] mov r14, [rbp+var_278] mov rbx, [rbp+var_270] mov r11, [rbp+var_268] mov r10, [rbp+var_260] mov rax, [rbp+var_258] lea rsi, aUserTime2fSyst; "\nUser time %.2f, System time %.2f\nMax"... mov [rsp+330h+var_330], r13 mov [rsp+330h+var_328], r12 mov [rsp+330h+var_320], r15 mov [rsp+330h+var_318], r14 mov [rsp+330h+var_310], rbx mov [rsp+330h+var_308], r11 mov [rsp+330h+var_300], r10 mov [rsp+330h+var_2F8], rax mov al, 2 call _fprintf loc_7D55A: jmp short $+2 loc_7D55C: call my_thread_end call my_thread_global_end mov eax, [rbp+var_234] and eax, 4 cmp eax, 0 jnz short loc_7D57A jmp short $+2 loc_7D576: jmp short $+2 loc_7D578: jmp short $+2 loc_7D57A: call my_mutex_end lea rax, THR_KEY_mysys mov edi, [rax] call _pthread_key_delete lea rax, my_thr_key_mysys_exists mov byte ptr [rax], 0 lea rax, my_init_done mov byte ptr [rax], 0 loc_7D5A1: mov rax, fs:28h mov rcx, [rbp+var_30] cmp rax, rcx jnz short loc_7D5C5 add rsp, 308h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7D5C5: call ___stack_chk_fail
unsigned long long my_end(int a1, long long a2, long long a3, long long a4, long long a5, int a6) { _QWORD v7[2]; // [rsp+50h] [rbp-2E0h] BYREF long long v8; // [rsp+60h] [rbp-2D0h] long long v9; // [rsp+68h] [rbp-2C8h] long long v10; // [rsp+70h] [rbp-2C0h] long long v11; // [rsp+80h] [rbp-2B0h] long long v12; // [rsp+90h] [rbp-2A0h] long long v13; // [rsp+98h] [rbp-298h] long long v14; // [rsp+A0h] [rbp-290h] long long v15; // [rsp+A8h] [rbp-288h] long long v16; // [rsp+B0h] [rbp-280h] long long v17; // [rsp+B8h] [rbp-278h] long long v18; // [rsp+C0h] [rbp-270h] long long v19; // [rsp+C8h] [rbp-268h] long long v20; // [rsp+D0h] [rbp-260h] long long v21; // [rsp+D8h] [rbp-258h] int v22; // [rsp+E0h] [rbp-250h] int v23; // [rsp+E4h] [rbp-24Ch] unsigned int v24; // [rsp+E8h] [rbp-248h] char v25; // [rsp+EFh] [rbp-241h] long long v26; // [rsp+F0h] [rbp-240h] int v27; // [rsp+FCh] [rbp-234h] _BYTE v28[512]; // [rsp+100h] [rbp-230h] BYREF unsigned long long v29; // [rsp+300h] [rbp-30h] v29 = __readfsqword(0x28u); v27 = a1; v26 = stderr; v25 = 0; if ( my_init_done ) { if ( !v26 ) { v26 = stderr; v25 = 0; } if ( (v27 & 1) != 0 ) { v24 = 0; v23 = 0; v22 = 0; while ( v24 < my_file_limit ) { if ( *((_DWORD *)my_file_info + 4 * v24 + 2) ) { if ( *((_DWORD *)my_file_info + 4 * v24 + 2) == 3 || *((_DWORD *)my_file_info + 4 * v24 + 2) == 4 ) ++v22; else ++v23; } ++v24; } if ( v23 || v22 ) { my_snprintf((unsigned int)v28, 512, (unsigned int)globerrs[18], v23, v22, a6); my_message_stderr(19LL, v28, 4LL); } } free_charsets(); my_error_unregister_all(); my_once_free(); if ( (v27 & 2) != 0 && !(unsigned int)getrusage(0LL, v7) ) fprintf( v26, "\n" "User time %.2f, System time %.2f\n" "Maximum resident set size %ld, Integral resident set size %ld\n" "Non-physical pagefaults %ld, Physical pagefaults %ld, Swaps %ld\n" "Blocks in %ld out %ld, Messages in %ld out %ld, Signals %ld\n" "Voluntary context switches %ld, Involuntary context switches %ld\n", (double)(int)(v7[1] / 10000LL + 100 * LODWORD(v7[0])) / 100.0, (double)(int)(v9 / 10000 + 100 * v8) / 100.0, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21); my_thread_end(); my_thread_global_end(); my_mutex_end(); pthread_key_delete(THR_KEY_mysys); my_thr_key_mysys_exists = 0; my_init_done = 0; } return __readfsqword(0x28u); }
my_end: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x308 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV dword ptr [RBP + -0x234],EDI MOV RAX,qword ptr [0x00331fe0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x240],RAX MOV RAX,qword ptr [RBP + -0x240] MOV RCX,qword ptr [0x00331fe0] CMP RAX,qword ptr [RCX] SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x241],AL LEA RAX,[0x545740] CMP byte ptr [RAX],0x0 JNZ 0x0017d2a8 JMP 0x0017d5a1 LAB_0017d2a8: JMP 0x0017d2aa LAB_0017d2aa: JMP 0x0017d2ac LAB_0017d2ac: CMP qword ptr [RBP + -0x240],0x0 JNZ 0x0017d2ce MOV RAX,qword ptr [0x00331fe0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x240],RAX MOV byte ptr [RBP + -0x241],0x0 LAB_0017d2ce: MOV EAX,dword ptr [RBP + -0x234] AND EAX,0x1 CMP EAX,0x0 JNZ 0x0017d2ec MOVSX EAX,byte ptr [RBP + -0x241] CMP EAX,0x0 JZ 0x0017d40a LAB_0017d2ec: MOV dword ptr [RBP + -0x248],0x0 MOV dword ptr [RBP + -0x24c],0x0 MOV dword ptr [RBP + -0x250],0x0 LAB_0017d30a: MOV EAX,dword ptr [RBP + -0x248] LEA RCX,[0x335790] CMP EAX,dword ptr [RCX] JNC 0x0017d3ae LEA RAX,[0x335798] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x248] SHL RCX,0x4 ADD RAX,RCX CMP dword ptr [RAX + 0x8],0x0 JNZ 0x0017d33e JMP 0x0017d39a LAB_0017d33e: LEA RAX,[0x335798] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x248] SHL RCX,0x4 ADD RAX,RCX CMP dword ptr [RAX + 0x8],0x3 JZ 0x0017d378 LEA RAX,[0x335798] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x248] SHL RCX,0x4 ADD RAX,RCX CMP dword ptr [RAX + 0x8],0x4 JNZ 0x0017d389 LAB_0017d378: MOV EAX,dword ptr [RBP + -0x250] ADD EAX,0x1 MOV dword ptr [RBP + -0x250],EAX JMP 0x0017d398 LAB_0017d389: MOV EAX,dword ptr [RBP + -0x24c] ADD EAX,0x1 MOV dword ptr [RBP + -0x24c],EAX LAB_0017d398: JMP 0x0017d39a LAB_0017d39a: MOV EAX,dword ptr [RBP + -0x248] ADD EAX,0x1 MOV dword ptr [RBP + -0x248],EAX JMP 0x0017d30a LAB_0017d3ae: CMP dword ptr [RBP + -0x24c],0x0 JNZ 0x0017d3c0 CMP dword ptr [RBP + -0x250],0x0 JZ 0x0017d408 LAB_0017d3c0: LEA RDI,[RBP + -0x230] LEA RAX,[0x335cb0] MOV RDX,qword ptr [RAX + 0x90] MOV ECX,dword ptr [RBP + -0x24c] MOV R8D,dword ptr [RBP + -0x250] MOV ESI,0x200 MOV AL,0x0 CALL 0x001c7b80 LEA RSI,[RBP + -0x230] MOV EDI,0x13 MOV EDX,0x4 CALL 0x0017e3a0 JMP 0x0017d406 LAB_0017d406: JMP 0x0017d408 LAB_0017d408: JMP 0x0017d40a LAB_0017d40a: CALL 0x00170250 CALL 0x00178b20 CALL 0x0017e710 MOV EAX,dword ptr [RBP + -0x234] AND EAX,0x2 CMP EAX,0x0 JNZ 0x0017d437 MOVSX EAX,byte ptr [RBP + -0x241] CMP EAX,0x0 JZ 0x0017d55c LAB_0017d437: XOR EDI,EDI LEA RSI,[RBP + -0x2e0] CALL 0x00136b10 CMP EAX,0x0 JNZ 0x0017d55a MOV RDI,qword ptr [RBP + -0x240] IMUL RAX,qword ptr [RBP + -0x2e0],0x64 MOV qword ptr [RBP + -0x2f0],RAX MOV RAX,qword ptr [RBP + -0x2d8] MOV ECX,0x2710 CQO IDIV RCX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x2f0] ADD RAX,RCX CVTSI2SD XMM0,RAX MOVSD XMM1,qword ptr [0x001d3f80] DIVSD XMM0,XMM1 IMUL RAX,qword ptr [RBP + -0x2d0],0x64 MOV qword ptr [RBP + -0x2e8],RAX MOV RAX,qword ptr [RBP + -0x2c8] MOV ECX,0x2710 CQO IDIV RCX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x2e8] ADD RAX,RCX CVTSI2SD XMM1,RAX MOVSD XMM2,qword ptr [0x001d3f80] DIVSD XMM1,XMM2 MOV RDX,qword ptr [RBP + -0x2c0] MOV RCX,qword ptr [RBP + -0x2b0] MOV R8,qword ptr [RBP + -0x2a0] MOV R9,qword ptr [RBP + -0x298] MOV R13,qword ptr [RBP + -0x290] MOV R12,qword ptr [RBP + -0x288] MOV R15,qword ptr [RBP + -0x280] MOV R14,qword ptr [RBP + -0x278] MOV RBX,qword ptr [RBP + -0x270] MOV R11,qword ptr [RBP + -0x268] MOV R10,qword ptr [RBP + -0x260] MOV RAX,qword ptr [RBP + -0x258] LEA RSI,[0x1d0f99] MOV qword ptr [RSP],R13 MOV qword ptr [RSP + 0x8],R12 MOV qword ptr [RSP + 0x10],R15 MOV qword ptr [RSP + 0x18],R14 MOV qword ptr [RSP + 0x20],RBX MOV qword ptr [RSP + 0x28],R11 MOV qword ptr [RSP + 0x30],R10 MOV qword ptr [RSP + 0x38],RAX MOV AL,0x2 CALL 0x001361c0 LAB_0017d55a: JMP 0x0017d55c LAB_0017d55c: CALL 0x0017fe40 CALL 0x0017fbb0 MOV EAX,dword ptr [RBP + -0x234] AND EAX,0x4 CMP EAX,0x0 JNZ 0x0017d57a JMP 0x0017d576 LAB_0017d576: JMP 0x0017d578 LAB_0017d578: JMP 0x0017d57a LAB_0017d57a: CALL 0x00180640 LEA RAX,[0x546444] MOV EDI,dword ptr [RAX] CALL 0x00136930 LEA RAX,[0x54617c] MOV byte ptr [RAX],0x0 LEA RAX,[0x545740] MOV byte ptr [RAX],0x0 LAB_0017d5a1: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x30] CMP RAX,RCX JNZ 0x0017d5c5 ADD RSP,0x308 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017d5c5: CALL 0x001362a0
void my_end(uint param_1) { int iVar1; long in_FS_OFFSET; bool bVar2; bool bVar3; rusage local_2e8; int local_258; int local_254; uint local_250; bool local_249; FILE *local_248; uint local_23c; int1 local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_248 = *(FILE **)PTR_stderr_00331fe0; bVar2 = local_248 != *(FILE **)PTR_stderr_00331fe0; local_249 = bVar2; local_23c = param_1; if (my_init_done != '\0') { bVar3 = local_248 == (FILE *)0x0; if (bVar3) { local_248 = *(FILE **)PTR_stderr_00331fe0; } bVar3 = !bVar3; local_249 = bVar3 && bVar2; if (((param_1 & 1) != 0) || (bVar3 && bVar2)) { local_254 = 0; local_258 = 0; for (local_250 = 0; local_250 < my_file_limit; local_250 = local_250 + 1) { if (*(int *)(my_file_info + (ulong)local_250 * 0x10 + 8) != 0) { if ((*(int *)(my_file_info + (ulong)local_250 * 0x10 + 8) == 3) || (*(int *)(my_file_info + (ulong)local_250 * 0x10 + 8) == 4)) { local_258 = local_258 + 1; } else { local_254 = local_254 + 1; } } } if ((local_254 != 0) || (local_258 != 0)) { my_snprintf(local_238,0x200,globerrs._144_8_,local_254,local_258); my_message_stderr(0x13,local_238,4); } } free_charsets(); my_error_unregister_all(); my_once_free(); if ((((local_23c & 2) != 0) || (local_249 != false)) && (iVar1 = getrusage(RUSAGE_SELF,&local_2e8), iVar1 == 0)) { fprintf(local_248, "\nUser time %.2f, System time %.2f\nMaximum resident set size %ld, Integral resident set size %ld\nNon-physical pagefaults %ld, Physical pagefaults %ld, Swaps %ld\nBlocks in %ld out %ld, Messages in %ld out %ld, Signals %ld\nVoluntary context switches %ld, Involuntary context switches %ld\n" ,(double)(local_2e8.ru_utime.tv_sec * 100 + local_2e8.ru_utime.tv_usec / 10000) / DAT_001d3f80, (double)(local_2e8.ru_stime.tv_sec * 100 + local_2e8.ru_stime.tv_usec / 10000) / DAT_001d3f80,local_2e8.ru_maxrss,local_2e8.ru_idrss,local_2e8.ru_minflt, local_2e8.ru_majflt,local_2e8.ru_nswap,local_2e8.ru_inblock,local_2e8.ru_oublock, local_2e8.ru_msgsnd,local_2e8.ru_msgrcv,local_2e8.ru_nsignals,local_2e8.ru_nvcsw, local_2e8.ru_nivcsw); } my_thread_end(); my_thread_global_end(); my_mutex_end(); pthread_key_delete(THR_KEY_mysys); my_thr_key_mysys_exists = 0; my_init_done = '\0'; } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
13,152
mi_get_binary_pack_key
eloqsql/storage/myisam/mi_search.c
uint _mi_get_binary_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag, register uchar **page_pos, register uchar *key) { reg1 HA_KEYSEG *keyseg; uchar *start_key,*page,*page_end,*from,*from_end; uint length,tmp; DBUG_ENTER("_mi_get_binary_pack_key"); page= *page_pos; page_end=page+HA_MAX_KEY_BUFF+1; start_key=key; /* Keys are compressed the following way: prefix length Packed length of prefix common with prev key (1 or 3 bytes) for each key segment: [is null] Null indicator if can be null (1 byte, zero means null) [length] Packed length if varlength (1 or 3 bytes) key segment 'length' bytes of key segment value pointer Reference to the data file (last_keyseg->length). get_key_length() is a macro. It gets the prefix length from 'page' and puts it into 'length'. It increments 'page' by 1 or 3, depending on the packed length of the prefix length. */ get_key_length(length,page); if (length) { if (length > keyinfo->maxlength) { DBUG_PRINT("error", ("Found too long binary packed key: %u of %u at %p", length, keyinfo->maxlength, *page_pos)); DBUG_DUMP("key", *page_pos, 16); goto crashed; /* Wrong key */ } /* Key is packed against prev key, take prefix from prev key. */ from= key; from_end= key + length; } else { /* Key is not packed against prev key, take all from page buffer. */ from= page; from_end= page_end; } /* The trouble is that key can be split in two parts: The first part (prefix) is in from .. from_end - 1. The second part starts at page. The split can be at every byte position. So we need to check for the end of the first part before using every byte. */ for (keyseg=keyinfo->seg ; keyseg->type ;keyseg++) { if (keyseg->flag & HA_NULL_PART) { /* If prefix is used up, switch to rest. */ if (from == from_end) { from=page; from_end=page_end; } if (!(*key++ = *from++)) continue; /* Null part */ } if (keyseg->flag & (HA_VAR_LENGTH_PART | HA_BLOB_PART | HA_SPACE_PACK)) { /* If prefix is used up, switch to rest. */ if (from == from_end) { from=page; from_end=page_end; } /* Get length of dynamic length key part */ if ((length= (*key++ = *from++)) == 255) { /* If prefix is used up, switch to rest. */ if (from == from_end) { from=page; from_end=page_end; } length= (uint) ((*key++ = *from++)) << 8; /* If prefix is used up, switch to rest. */ if (from == from_end) { from=page; from_end=page_end; } length+= (uint) ((*key++ = *from++)); } if (length > keyseg->length) goto crashed; } else length=keyseg->length; if ((tmp=(uint) (from_end-from)) <= length) { key+=tmp; /* Use old key */ length-=tmp; from=page; from_end=page_end; } DBUG_PRINT("info",("key: %p from: %p length: %u", key, from, length)); memmove((uchar*) key, (uchar*) from, (size_t) length); key+=length; from+=length; } /* Last segment (type == 0) contains length of data pointer. If we have mixed key blocks with data pointer and key block pointer, we have to copy both. */ length=keyseg->length+nod_flag; if ((tmp=(uint) (from_end-from)) <= length) { /* Remaining length is less or equal max possible length. */ memcpy(key+tmp,page,length-tmp); /* Get last part of key */ *page_pos= page+length-tmp; } else { /* Remaining length is greater than max possible length. This can happen only if we switched to the new key bytes already. 'page_end' is calculated with MI_MAX_KEY_BUFF. So it can be far behind the real end of the key. */ if (from_end != page_end) { DBUG_PRINT("error",("Error when unpacking key")); goto crashed; /* Error */ } /* Copy data pointer and, if appropriate, key block pointer. */ memcpy((uchar*) key,(uchar*) from,(size_t) length); *page_pos= from+length; } DBUG_RETURN((uint) (key-start_key)+keyseg->length); crashed: mi_print_error(keyinfo->share, HA_ERR_CRASHED); my_errno= HA_ERR_CRASHED; DBUG_RETURN(0); }
O3
c
mi_get_binary_pack_key: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movl %esi, -0x2c(%rbp) movq %rdx, -0x50(%rbp) movq (%rdx), %rax movzbl (%rax), %r8d cmpl $0xff, %r8d je 0xa071d movl $0x1, %esi jmp 0xa072e movzwl 0x1(%rax), %edx rolw $0x8, %dx movzwl %dx, %r8d movl $0x3, %esi leaq 0x4b9(%rax), %r9 addq %rax, %rsi movq %rsi, %r12 movq %r9, %rax testl %r8d, %r8d movq %rcx, -0x38(%rbp) movq %rdi, -0x40(%rbp) je 0xa0769 movzwl 0x16(%rdi), %eax cmpl %eax, %r8d ja 0xa08b1 movl %r8d, %eax movq -0x38(%rbp), %rcx addq %rcx, %rax movq %rcx, %r12 movq -0x40(%rbp), %rdi movq 0x28(%rdi), %r15 cmpb $0x0, 0x18(%r15) movq %rsi, -0x48(%rbp) je 0xa088d movq %rcx, %rbx movq %r9, -0x58(%rbp) movzwl 0x12(%r15), %ecx testb $0x10, %cl jne 0xa0792 movq %rax, %r14 jmp 0xa07bd movq %rsi, %rcx movq %r9, %r14 cmpq %rax, %r12 je 0xa07a3 movq %r12, %rcx movq %rax, %r14 movb (%rcx), %al movq %rcx, %r12 incq %r12 movb %al, (%rbx) incq %rbx testb %al, %al je 0xa0876 movzwl 0x12(%r15), %ecx testb $0x29, %cl je 0xa07e7 movq %rsi, %rcx movq %r9, %rdx cmpq %r14, %r12 je 0xa07d3 movq %r12, %rcx movq %r14, %rdx movzbl (%rcx), %eax incq %rcx movb %al, (%rbx) cmpl $0xff, %eax je 0xa07ee incq %rbx jmp 0xa082d movzwl 0x14(%r15), %eax jmp 0xa083c movq %rsi, %r8 movq %r9, %rdi cmpq %rdx, %rcx je 0xa07ff movq %rcx, %r8 movq %rdx, %rdi movzbl (%r8), %eax incq %r8 movb %al, 0x1(%rbx) movq %rsi, %rcx movq %r9, %rdx cmpq %rdi, %r8 je 0xa081a movq %r8, %rcx movq %rdi, %rdx shll $0x8, %eax movzbl (%rcx), %edi incq %rcx movb %dil, 0x2(%rbx) addq $0x3, %rbx orl %edi, %eax movzwl 0x14(%r15), %edi movq %rcx, %r12 movq %rdx, %r14 cmpl %edi, %eax ja 0xa08b1 movq %r14, %rdx subq %r12, %rdx movl %eax, %ecx subl %edx, %ecx jae 0xa084c movl %eax, %ecx jmp 0xa0857 movl %edx, %eax addq %rax, %rbx movq %rsi, %r12 movq %r9, %r14 movl %ecx, %r13d movq %rbx, %rdi movq %r12, %rsi movq %r13, %rdx callq 0x2a150 addq %r13, %rbx addq %r13, %r12 movq -0x48(%rbp), %rsi movq -0x58(%rbp), %r9 leaq 0x20(%r15), %r13 cmpb $0x0, 0x38(%r15) movq %r14, %rax movq %r13, %r15 jne 0xa0783 jmp 0xa0896 movq %r15, %r13 movq %rcx, %rbx movq %rax, %r14 movzwl 0x14(%r13), %r15d addl -0x2c(%rbp), %r15d movq %r14, %rax subq %r12, %rax movl %r15d, %edx subl %eax, %edx jae 0xa08d8 cmpq %r9, %r14 je 0xa08f0 movq -0x40(%rbp), %rax movq (%rax), %rax movq 0x268(%rax), %rsi movl $0x7e, %edi callq 0x95dfa callq 0xc14ee movl $0x7e, (%rax) xorl %eax, %eax jmp 0xa0915 movl %eax, %r14d leaq (%rbx,%r14), %rdi callq 0x2a0b0 movl %r15d, %r12d addq -0x48(%rbp), %r12 subq %r14, %r12 jmp 0xa0904 movl %r15d, %r14d movq %rbx, %rdi movq %r12, %rsi movq %r14, %rdx callq 0x2a0b0 addq %r14, %r12 movq -0x50(%rbp), %rax movq %r12, (%rax) subl -0x38(%rbp), %ebx movzwl 0x14(%r13), %eax addl %ebx, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_mi_get_binary_pack_key: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov [rbp+var_2C], esi mov [rbp+var_50], rdx mov rax, [rdx] movzx r8d, byte ptr [rax] cmp r8d, 0FFh jz short loc_A071D mov esi, 1 jmp short loc_A072E loc_A071D: movzx edx, word ptr [rax+1] rol dx, 8 movzx r8d, dx mov esi, 3 loc_A072E: lea r9, [rax+4B9h] add rsi, rax mov r12, rsi mov rax, r9 test r8d, r8d mov [rbp+var_38], rcx mov [rbp+var_40], rdi jz short loc_A0769 movzx eax, word ptr [rdi+16h] cmp r8d, eax ja loc_A08B1 mov eax, r8d mov rcx, [rbp+var_38] add rax, rcx mov r12, rcx mov rdi, [rbp+var_40] loc_A0769: mov r15, [rdi+28h] cmp byte ptr [r15+18h], 0 mov [rbp+var_48], rsi jz loc_A088D mov rbx, rcx mov [rbp+var_58], r9 loc_A0783: movzx ecx, word ptr [r15+12h] test cl, 10h jnz short loc_A0792 mov r14, rax jmp short loc_A07BD loc_A0792: mov rcx, rsi mov r14, r9 cmp r12, rax jz short loc_A07A3 mov rcx, r12 mov r14, rax loc_A07A3: mov al, [rcx] mov r12, rcx inc r12 mov [rbx], al inc rbx test al, al jz loc_A0876 movzx ecx, word ptr [r15+12h] loc_A07BD: test cl, 29h jz short loc_A07E7 mov rcx, rsi mov rdx, r9 cmp r12, r14 jz short loc_A07D3 mov rcx, r12 mov rdx, r14 loc_A07D3: movzx eax, byte ptr [rcx] inc rcx mov [rbx], al cmp eax, 0FFh jz short loc_A07EE inc rbx jmp short loc_A082D loc_A07E7: movzx eax, word ptr [r15+14h] jmp short loc_A083C loc_A07EE: mov r8, rsi mov rdi, r9 cmp rcx, rdx jz short loc_A07FF mov r8, rcx mov rdi, rdx loc_A07FF: movzx eax, byte ptr [r8] inc r8 mov [rbx+1], al mov rcx, rsi mov rdx, r9 cmp r8, rdi jz short loc_A081A mov rcx, r8 mov rdx, rdi loc_A081A: shl eax, 8 movzx edi, byte ptr [rcx] inc rcx mov [rbx+2], dil add rbx, 3 or eax, edi loc_A082D: movzx edi, word ptr [r15+14h] mov r12, rcx mov r14, rdx cmp eax, edi ja short loc_A08B1 loc_A083C: mov rdx, r14 sub rdx, r12 mov ecx, eax sub ecx, edx jnb short loc_A084C mov ecx, eax jmp short loc_A0857 loc_A084C: mov eax, edx add rbx, rax mov r12, rsi mov r14, r9 loc_A0857: mov r13d, ecx mov rdi, rbx mov rsi, r12 mov rdx, r13 call _memmove add rbx, r13 add r12, r13 mov rsi, [rbp+var_48] mov r9, [rbp+var_58] loc_A0876: lea r13, [r15+20h] cmp byte ptr [r15+38h], 0 mov rax, r14 mov r15, r13 jnz loc_A0783 jmp short loc_A0896 loc_A088D: mov r13, r15 mov rbx, rcx mov r14, rax loc_A0896: movzx r15d, word ptr [r13+14h] add r15d, [rbp+var_2C] mov rax, r14 sub rax, r12 mov edx, r15d sub edx, eax jnb short loc_A08D8 cmp r14, r9 jz short loc_A08F0 loc_A08B1: mov rax, [rbp+var_40] mov rax, [rax] mov rsi, [rax+268h] mov edi, 7Eh ; '~' call mi_report_error call _my_thread_var mov dword ptr [rax], 7Eh ; '~' xor eax, eax jmp short loc_A0915 loc_A08D8: mov r14d, eax lea rdi, [rbx+r14] call _memcpy mov r12d, r15d add r12, [rbp+var_48] sub r12, r14 jmp short loc_A0904 loc_A08F0: mov r14d, r15d mov rdi, rbx mov rsi, r12 mov rdx, r14 call _memcpy add r12, r14 loc_A0904: mov rax, [rbp+var_50] mov [rax], r12 sub ebx, dword ptr [rbp+var_38] movzx eax, word ptr [r13+14h] add eax, ebx loc_A0915: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mi_get_binary_pack_key(long long a1, int a2, unsigned __int8 **a3, unsigned __int8 *a4) { long long v4; // rax unsigned int v5; // r8d long long v6; // rsi unsigned __int8 *v7; // r9 unsigned __int8 *v8; // rsi unsigned __int8 *v9; // r12 unsigned __int8 *v10; // rax long long v11; // r15 unsigned __int8 *v12; // rbx __int16 v13; // cx unsigned __int8 *v14; // r14 unsigned __int8 *v15; // rcx unsigned __int8 v16; // al unsigned __int8 *v17; // rcx unsigned __int8 *v18; // rdx unsigned int v19; // eax unsigned __int8 *v20; // rcx unsigned __int8 *v21; // r8 unsigned __int8 *v22; // rdi int v23; // eax unsigned __int8 *v24; // r8 unsigned __int8 *v25; // rcx int v26; // edi unsigned int v27; // ecx long long v28; // r13 long long v29; // r13 bool v30; // zf unsigned int v31; // r15d unsigned int v32; // eax long long v33; // rdx long long v35; // r14 unsigned __int8 *v36; // r12 unsigned __int8 *v37; // [rsp+8h] [rbp-58h] unsigned __int8 *v39; // [rsp+18h] [rbp-48h] int v41; // [rsp+28h] [rbp-38h] v4 = (long long)*a3; v5 = **a3; if ( v5 == 255 ) { v5 = (unsigned __int16)__ROL2__(*(_WORD *)(v4 + 1), 8); v6 = 3LL; } else { v6 = 1LL; } v7 = (unsigned __int8 *)(v4 + 1209); v8 = (unsigned __int8 *)(v4 + v6); v9 = v8; v10 = (unsigned __int8 *)(v4 + 1209); v41 = (int)a4; if ( v5 ) { if ( v5 > *(unsigned __int16 *)(a1 + 22) ) { LABEL_36: mi_report_error(126, *(_QWORD *)(*(_QWORD *)a1 + 616LL)); *(_DWORD *)my_thread_var(126LL) = 126; return 0LL; } v10 = &a4[v5]; v9 = a4; } v11 = *(_QWORD *)(a1 + 40); v39 = v8; if ( *(_BYTE *)(v11 + 24) ) { v12 = a4; v37 = v7; while ( 1 ) { v13 = *(_WORD *)(v11 + 18); if ( (v13 & 0x10) != 0 ) { v15 = v8; v14 = v7; if ( v9 != v10 ) { v15 = v9; v14 = v10; } v16 = *v15; v9 = v15 + 1; *v12++ = *v15; if ( !v16 ) goto LABEL_31; v13 = *(_WORD *)(v11 + 18); } else { v14 = v10; } if ( (v13 & 0x29) != 0 ) { v17 = v8; v18 = v7; if ( v9 != v14 ) { v17 = v9; v18 = v14; } v19 = *v17; v20 = v17 + 1; *v12 = v19; if ( v19 == 255 ) { v21 = v8; v22 = v7; if ( v20 != v18 ) { v21 = v20; v22 = v18; } v23 = *v21; v24 = v21 + 1; v12[1] = v23; v25 = v8; v18 = v7; if ( v24 != v22 ) { v25 = v24; v18 = v22; } v26 = *v25; v20 = v25 + 1; v12[2] = v26; v12 += 3; v19 = v26 | (v23 << 8); } else { ++v12; } v9 = v20; v14 = v18; if ( v19 > *(unsigned __int16 *)(v11 + 20) ) goto LABEL_36; } else { v19 = *(unsigned __int16 *)(v11 + 20); } v27 = v19 - ((_DWORD)v14 - (_DWORD)v9); if ( v19 >= (int)v14 - (int)v9 ) { v12 += (unsigned int)((_DWORD)v14 - (_DWORD)v9); v9 = v8; v14 = v7; } else { v27 = v19; } v28 = v27; memmove(v12, v9, v27); v12 += v28; v9 += v28; v8 = v39; v7 = v37; LABEL_31: v29 = v11 + 32; v30 = *(_BYTE *)(v11 + 56) == 0; v10 = v14; v11 += 32LL; if ( v30 ) goto LABEL_34; } } v29 = *(_QWORD *)(a1 + 40); v12 = a4; v14 = v10; LABEL_34: v31 = a2 + *(unsigned __int16 *)(v29 + 20); v32 = (_DWORD)v14 - (_DWORD)v9; v33 = v31 - ((_DWORD)v14 - (_DWORD)v9); if ( v31 >= (int)v14 - (int)v9 ) { v35 = v32; memcpy(&v12[v32], v8, v33); v36 = &v39[v31 - v35]; } else { if ( v14 != v7 ) goto LABEL_36; memcpy(v12, v9, v31); v36 = &v9[v31]; } *a3 = v36; return (_DWORD)v12 - v41 + (unsigned int)*(unsigned __int16 *)(v29 + 20); }
_mi_get_binary_pack_key: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV dword ptr [RBP + -0x2c],ESI MOV qword ptr [RBP + -0x50],RDX MOV RAX,qword ptr [RDX] MOVZX R8D,byte ptr [RAX] CMP R8D,0xff JZ 0x001a071d MOV ESI,0x1 JMP 0x001a072e LAB_001a071d: MOVZX EDX,word ptr [RAX + 0x1] ROL DX,0x8 MOVZX R8D,DX MOV ESI,0x3 LAB_001a072e: LEA R9,[RAX + 0x4b9] ADD RSI,RAX MOV R12,RSI MOV RAX,R9 TEST R8D,R8D MOV qword ptr [RBP + -0x38],RCX MOV qword ptr [RBP + -0x40],RDI JZ 0x001a0769 MOVZX EAX,word ptr [RDI + 0x16] CMP R8D,EAX JA 0x001a08b1 MOV EAX,R8D MOV RCX,qword ptr [RBP + -0x38] ADD RAX,RCX MOV R12,RCX MOV RDI,qword ptr [RBP + -0x40] LAB_001a0769: MOV R15,qword ptr [RDI + 0x28] CMP byte ptr [R15 + 0x18],0x0 MOV qword ptr [RBP + -0x48],RSI JZ 0x001a088d MOV RBX,RCX MOV qword ptr [RBP + -0x58],R9 LAB_001a0783: MOVZX ECX,word ptr [R15 + 0x12] TEST CL,0x10 JNZ 0x001a0792 MOV R14,RAX JMP 0x001a07bd LAB_001a0792: MOV RCX,RSI MOV R14,R9 CMP R12,RAX JZ 0x001a07a3 MOV RCX,R12 MOV R14,RAX LAB_001a07a3: MOV AL,byte ptr [RCX] MOV R12,RCX INC R12 MOV byte ptr [RBX],AL INC RBX TEST AL,AL JZ 0x001a0876 MOVZX ECX,word ptr [R15 + 0x12] LAB_001a07bd: TEST CL,0x29 JZ 0x001a07e7 MOV RCX,RSI MOV RDX,R9 CMP R12,R14 JZ 0x001a07d3 MOV RCX,R12 MOV RDX,R14 LAB_001a07d3: MOVZX EAX,byte ptr [RCX] INC RCX MOV byte ptr [RBX],AL CMP EAX,0xff JZ 0x001a07ee INC RBX JMP 0x001a082d LAB_001a07e7: MOVZX EAX,word ptr [R15 + 0x14] JMP 0x001a083c LAB_001a07ee: MOV R8,RSI MOV RDI,R9 CMP RCX,RDX JZ 0x001a07ff MOV R8,RCX MOV RDI,RDX LAB_001a07ff: MOVZX EAX,byte ptr [R8] INC R8 MOV byte ptr [RBX + 0x1],AL MOV RCX,RSI MOV RDX,R9 CMP R8,RDI JZ 0x001a081a MOV RCX,R8 MOV RDX,RDI LAB_001a081a: SHL EAX,0x8 MOVZX EDI,byte ptr [RCX] INC RCX MOV byte ptr [RBX + 0x2],DIL ADD RBX,0x3 OR EAX,EDI LAB_001a082d: MOVZX EDI,word ptr [R15 + 0x14] MOV R12,RCX MOV R14,RDX CMP EAX,EDI JA 0x001a08b1 LAB_001a083c: MOV RDX,R14 SUB RDX,R12 MOV ECX,EAX SUB ECX,EDX JNC 0x001a084c MOV ECX,EAX JMP 0x001a0857 LAB_001a084c: MOV EAX,EDX ADD RBX,RAX MOV R12,RSI MOV R14,R9 LAB_001a0857: MOV R13D,ECX MOV RDI,RBX MOV RSI,R12 MOV RDX,R13 CALL 0x0012a150 ADD RBX,R13 ADD R12,R13 MOV RSI,qword ptr [RBP + -0x48] MOV R9,qword ptr [RBP + -0x58] LAB_001a0876: LEA R13,[R15 + 0x20] CMP byte ptr [R15 + 0x38],0x0 MOV RAX,R14 MOV R15,R13 JNZ 0x001a0783 JMP 0x001a0896 LAB_001a088d: MOV R13,R15 MOV RBX,RCX MOV R14,RAX LAB_001a0896: MOVZX R15D,word ptr [R13 + 0x14] ADD R15D,dword ptr [RBP + -0x2c] MOV RAX,R14 SUB RAX,R12 MOV EDX,R15D SUB EDX,EAX JNC 0x001a08d8 CMP R14,R9 JZ 0x001a08f0 LAB_001a08b1: MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x268] MOV EDI,0x7e CALL 0x00195dfa CALL 0x001c14ee MOV dword ptr [RAX],0x7e XOR EAX,EAX JMP 0x001a0915 LAB_001a08d8: MOV R14D,EAX LEA RDI,[RBX + R14*0x1] CALL 0x0012a0b0 MOV R12D,R15D ADD R12,qword ptr [RBP + -0x48] SUB R12,R14 JMP 0x001a0904 LAB_001a08f0: MOV R14D,R15D MOV RDI,RBX MOV RSI,R12 MOV RDX,R14 CALL 0x0012a0b0 ADD R12,R14 LAB_001a0904: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RAX],R12 SUB EBX,dword ptr [RBP + -0x38] MOVZX EAX,word ptr [R13 + 0x14] ADD EAX,EBX LAB_001a0915: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int _mi_get_binary_pack_key(long *param_1,int param_2,int8 *param_3,byte *param_4) { byte *pbVar1; char cVar2; byte bVar3; byte bVar4; uint uVar5; int iVar6; byte *pbVar7; int4 *puVar8; ushort uVar9; byte *pbVar10; byte *pbVar11; byte *__dest; long lVar12; byte *pbVar13; byte *pbVar14; ulong uVar15; uint uVar16; int local_40; pbVar13 = (byte *)*param_3; uVar5 = (uint)*pbVar13; if (*pbVar13 == 0xff) { uVar5 = (uint)(ushort)(*(ushort *)(pbVar13 + 1) << 8 | *(ushort *)(pbVar13 + 1) >> 8); lVar12 = 3; } else { lVar12 = 1; } pbVar1 = pbVar13 + 0x4b9; pbVar13 = pbVar13 + lVar12; pbVar7 = pbVar1; pbVar11 = pbVar13; if (uVar5 == 0) { LAB_001a0769: cVar2 = *(char *)(param_1[5] + 0x18); lVar12 = param_1[5]; __dest = param_4; while (cVar2 != '\0') { uVar9 = *(ushort *)(lVar12 + 0x12); pbVar14 = pbVar7; if ((uVar9 & 0x10) == 0) { LAB_001a07bd: if ((uVar9 & 0x29) == 0) { uVar5 = (uint)*(ushort *)(lVar12 + 0x14); } else { pbVar7 = pbVar13; pbVar10 = pbVar1; if (pbVar11 != pbVar14) { pbVar7 = pbVar11; pbVar10 = pbVar14; } bVar3 = *pbVar7; uVar5 = (uint)bVar3; pbVar11 = pbVar7 + 1; *__dest = bVar3; if (bVar3 == 0xff) { pbVar7 = pbVar1; pbVar14 = pbVar13; if (pbVar11 != pbVar10) { pbVar7 = pbVar10; pbVar14 = pbVar11; } bVar3 = *pbVar14; __dest[1] = bVar3; pbVar11 = pbVar13; pbVar10 = pbVar1; if (pbVar14 + 1 != pbVar7) { pbVar11 = pbVar14 + 1; pbVar10 = pbVar7; } bVar4 = *pbVar11; pbVar11 = pbVar11 + 1; __dest[2] = bVar4; __dest = __dest + 3; uVar5 = (uint)CONCAT11(bVar3,bVar4); } else { __dest = __dest + 1; } pbVar14 = pbVar10; if (*(ushort *)(lVar12 + 0x14) < uVar5) goto LAB_001a08b1; } uVar16 = (uint)((long)pbVar14 - (long)pbVar11); if (uVar16 <= uVar5) { __dest = __dest + ((long)pbVar14 - (long)pbVar11 & 0xffffffff); pbVar11 = pbVar13; pbVar14 = pbVar1; uVar5 = uVar5 - uVar16; } uVar15 = (ulong)uVar5; memmove(__dest,pbVar11,uVar15); __dest = __dest + uVar15; pbVar11 = pbVar11 + uVar15; } else { pbVar10 = pbVar13; pbVar14 = pbVar1; if (pbVar11 != pbVar7) { pbVar10 = pbVar11; pbVar14 = pbVar7; } bVar3 = *pbVar10; pbVar11 = pbVar10 + 1; *__dest = bVar3; __dest = __dest + 1; if (bVar3 != 0) { uVar9 = *(ushort *)(lVar12 + 0x12); goto LAB_001a07bd; } } cVar2 = *(char *)(lVar12 + 0x38); lVar12 = lVar12 + 0x20; pbVar7 = pbVar14; } uVar16 = (uint)*(ushort *)(lVar12 + 0x14) + param_2; uVar5 = (uint)((long)pbVar7 - (long)pbVar11); if (uVar16 < uVar5) { if (pbVar7 != pbVar1) goto LAB_001a08b1; memcpy(__dest,pbVar11,(ulong)uVar16); pbVar11 = pbVar11 + uVar16; } else { uVar15 = (long)pbVar7 - (long)pbVar11 & 0xffffffff; memcpy(__dest + uVar15,pbVar13,(ulong)(uVar16 - uVar5)); pbVar11 = pbVar13 + (uVar16 - uVar15); } *param_3 = pbVar11; local_40 = (int)param_4; iVar6 = (uint)*(ushort *)(lVar12 + 0x14) + ((int)__dest - local_40); } else { if (uVar5 <= *(ushort *)((long)param_1 + 0x16)) { pbVar7 = param_4 + uVar5; pbVar11 = param_4; goto LAB_001a0769; } LAB_001a08b1: mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268)); puVar8 = (int4 *)_my_thread_var(); *puVar8 = 0x7e; iVar6 = 0; } return iVar6; }
13,153
ankerl::nanobench::detail::fmt::Number::write(std::ostream&) const
BadAccessGuards/build_O0/_deps/nanobench-src/src/include/nanobench.h
std::ostream& Number::write(std::ostream& os) const { StreamStateRestorer const restorer(os); os.imbue(std::locale(os.getloc(), new NumSep(','))); os << std::setw(mWidth) << std::setprecision(mPrecision) << std::fixed << mValue; return os; }
O0
c
ankerl::nanobench::detail::fmt::Number::write(std::ostream&) const: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x10(%rbp), %rsi leaq -0x38(%rbp), %rdi callq 0x15f70 movq -0x10(%rbp), %rsi movq (%rsi), %rax movq -0x18(%rax), %rax addq %rax, %rsi movq %rsi, -0x70(%rbp) leaq -0x50(%rbp), %rdi callq 0x1d630 jmp 0x16235 movl $0x20, %edi callq 0x4440 movq %rax, -0x80(%rbp) jmp 0x16245 movq -0x80(%rbp), %rdi movl $0x2c, %esi callq 0x15e90 jmp 0x16255 movq -0x80(%rbp), %rdx leaq -0x48(%rbp), %rdi leaq -0x50(%rbp), %rsi callq 0x1d720 jmp 0x16268 movq -0x70(%rbp), %rsi leaq -0x40(%rbp), %rdi leaq -0x48(%rbp), %rdx callq 0x4110 jmp 0x1627b leaq -0x40(%rbp), %rdi callq 0x4650 leaq -0x48(%rbp), %rdi callq 0x4650 leaq -0x50(%rbp), %rdi callq 0x4650 movq -0x78(%rbp), %rax movq -0x10(%rbp), %rcx movq %rcx, -0x90(%rbp) movl (%rax), %edi callq 0x1d830 movl %eax, -0x84(%rbp) jmp 0x162b4 movq -0x90(%rbp), %rdi movl -0x84(%rbp), %eax movl %eax, -0x60(%rbp) movl -0x60(%rbp), %esi callq 0x4520 movq %rax, -0x98(%rbp) jmp 0x162d5 movq -0x78(%rbp), %rax movl 0x4(%rax), %edi callq 0x1d850 movl %eax, -0x9c(%rbp) jmp 0x162e9 movq -0x98(%rbp), %rdi movl -0x9c(%rbp), %eax movl %eax, -0x64(%rbp) movl -0x64(%rbp), %esi callq 0x46d0 movq %rax, -0xa8(%rbp) jmp 0x1630a movq -0xa8(%rbp), %rdi leaq 0x7558(%rip), %rsi # 0x1d870 callq 0x4140 movq %rax, -0xb0(%rbp) jmp 0x16326 movq -0xb0(%rbp), %rdi movq -0x78(%rbp), %rax movsd 0x8(%rax), %xmm0 callq 0x4810 jmp 0x1633d movq -0x10(%rbp), %rax movq %rax, -0xb8(%rbp) leaq -0x38(%rbp), %rdi callq 0x16090 movq -0xb8(%rbp), %rax addq $0xc0, %rsp popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0x163b7 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0x163ae movq -0x80(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) movl $0x20, %esi callq 0x4460 jmp 0x163ae movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) leaq -0x48(%rbp), %rdi callq 0x4650 leaq -0x50(%rbp), %rdi callq 0x4650 leaq -0x38(%rbp), %rdi callq 0x16090 movq -0x58(%rbp), %rdi callq 0x47a0 nopl (%rax)
_ZNK6ankerl9nanobench6detail3fmt6Number5writeERSo: push rbp mov rbp, rsp sub rsp, 0C0h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_78], rax mov rsi, [rbp+var_10]; std::ostream * lea rdi, [rbp+var_38]; this call _ZN6ankerl9nanobench6detail3fmt19StreamStateRestorerC2ERSo; ankerl::nanobench::detail::fmt::StreamStateRestorer::StreamStateRestorer(std::ostream &) mov rsi, [rbp+var_10] mov rax, [rsi] mov rax, [rax-18h] add rsi, rax mov [rbp+var_70], rsi lea rdi, [rbp+var_50]; this call _ZNKSt8ios_base6getlocEv; std::ios_base::getloc(void) jmp short $+2 loc_16235: mov edi, 20h ; ' '; unsigned __int64 call __Znwm; operator new(ulong) mov [rbp+var_80], rax jmp short $+2 loc_16245: mov rdi, [rbp+var_80]; this mov esi, 2Ch ; ','; char call _ZN6ankerl9nanobench6detail3fmt6NumSepC2Ec; ankerl::nanobench::detail::fmt::NumSep::NumSep(char) jmp short $+2 loc_16255: mov rdx, [rbp+var_80] lea rdi, [rbp+var_48] lea rsi, [rbp+var_50] call _ZNSt6localeC2IN6ankerl9nanobench6detail3fmt6NumSepEEERKS_PT_; std::locale::locale<ankerl::nanobench::detail::fmt::NumSep>(std::locale const&,ankerl::nanobench::detail::fmt::NumSep *) jmp short $+2 loc_16268: mov rsi, [rbp+var_70] lea rdi, [rbp+var_40] lea rdx, [rbp+var_48] call __ZNSt9basic_iosIcSt11char_traitsIcEE5imbueERKSt6locale; std::ios::imbue(std::locale const&) jmp short $+2 loc_1627B: lea rdi, [rbp+var_40]; this call __ZNSt6localeD1Ev; std::locale::~locale() lea rdi, [rbp+var_48]; this call __ZNSt6localeD1Ev; std::locale::~locale() lea rdi, [rbp+var_50]; this call __ZNSt6localeD1Ev; std::locale::~locale() mov rax, [rbp+var_78] mov rcx, [rbp+var_10] mov [rbp+var_90], rcx mov edi, [rax]; int call _ZSt4setwi; std::setw(int) mov [rbp+var_84], eax jmp short $+2 loc_162B4: mov rdi, [rbp+var_90] mov eax, [rbp+var_84] mov [rbp+var_60], eax mov esi, [rbp+var_60] call __ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Setw) mov [rbp+var_98], rax jmp short $+2 loc_162D5: mov rax, [rbp+var_78] mov edi, [rax+4]; int call _ZSt12setprecisioni; std::setprecision(int) mov [rbp+var_9C], eax jmp short $+2 loc_162E9: mov rdi, [rbp+var_98] mov eax, [rbp+var_9C] mov [rbp+var_64], eax mov esi, [rbp+var_64] call __ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Setprecision) mov [rbp+var_A8], rax jmp short $+2 loc_1630A: mov rdi, [rbp+var_A8] lea rsi, _ZSt5fixedRSt8ios_base; std::fixed(std::ios_base &) call __ZNSolsEPFRSt8ios_baseS0_E; std::ostream::operator<<(std::ios_base & (*)(std::ios_base &)) mov [rbp+var_B0], rax jmp short $+2 loc_16326: mov rdi, [rbp+var_B0] mov rax, [rbp+var_78] movsd xmm0, qword ptr [rax+8] call __ZNSolsEd; std::ostream::operator<<(double) jmp short $+2 loc_1633D: mov rax, [rbp+var_10] mov [rbp+var_B8], rax lea rdi, [rbp+var_38]; this call _ZN6ankerl9nanobench6detail3fmt19StreamStateRestorerD2Ev; ankerl::nanobench::detail::fmt::StreamStateRestorer::~StreamStateRestorer() mov rax, [rbp+var_B8] add rsp, 0C0h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp short loc_163B7 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp short loc_163AE mov rdi, [rbp+var_80]; void * mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax mov esi, 20h ; ' '; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_163AE mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax lea rdi, [rbp+var_48]; this call __ZNSt6localeD1Ev; std::locale::~locale() loc_163AE: lea rdi, [rbp+var_50]; this call __ZNSt6localeD1Ev; std::locale::~locale() loc_163B7: lea rdi, [rbp+var_38]; this call _ZN6ankerl9nanobench6detail3fmt19StreamStateRestorerD2Ev; ankerl::nanobench::detail::fmt::StreamStateRestorer::~StreamStateRestorer() mov rdi, [rbp+var_58] call __Unwind_Resume
std::ostream * ankerl::nanobench::detail::fmt::Number::write( ankerl::nanobench::detail::fmt::Number *this, std::ostream *a2) { std::ostream *v3; // [rsp+8h] [rbp-B8h] long long v4; // [rsp+10h] [rbp-B0h] long long v5; // [rsp+18h] [rbp-A8h] long long v6; // [rsp+28h] [rbp-98h] std::ostream *v7; // [rsp+30h] [rbp-90h] ankerl::nanobench::detail::fmt::NumSep *v8; // [rsp+40h] [rbp-80h] char *v9; // [rsp+50h] [rbp-70h] unsigned int v10; // [rsp+5Ch] [rbp-64h] unsigned int v11; // [rsp+60h] [rbp-60h] _BYTE v12[8]; // [rsp+70h] [rbp-50h] BYREF _BYTE v13[8]; // [rsp+78h] [rbp-48h] BYREF _BYTE v14[8]; // [rsp+80h] [rbp-40h] BYREF _BYTE v15[40]; // [rsp+88h] [rbp-38h] BYREF std::ostream *v16; // [rsp+B0h] [rbp-10h] ankerl::nanobench::detail::fmt::Number *v17; // [rsp+B8h] [rbp-8h] v17 = this; v16 = a2; ankerl::nanobench::detail::fmt::StreamStateRestorer::StreamStateRestorer( (ankerl::nanobench::detail::fmt::StreamStateRestorer *)v15, a2); v9 = (char *)v16 + *(_QWORD *)(*(_QWORD *)v16 - 24LL); std::ios_base::getloc((std::ios_base *)v12); v8 = (ankerl::nanobench::detail::fmt::NumSep *)operator new(0x20uLL); ankerl::nanobench::detail::fmt::NumSep::NumSep(v8, 44); std::locale::locale<ankerl::nanobench::detail::fmt::NumSep>(v13, v12, v8); std::ios::imbue(v14, v9, v13); std::locale::~locale((std::locale *)v14); std::locale::~locale((std::locale *)v13); std::locale::~locale((std::locale *)v12); v7 = v16; v11 = std::setw(*(_DWORD *)this); v6 = std::operator<<<char,std::char_traits<char>>(v7, v11); v10 = std::setprecision(*((_DWORD *)this + 1)); v5 = std::operator<<<char,std::char_traits<char>>(v6, v10); v4 = std::ostream::operator<<(v5, std::fixed); std::ostream::operator<<(v4); v3 = v16; ankerl::nanobench::detail::fmt::StreamStateRestorer::~StreamStateRestorer((ankerl::nanobench::detail::fmt::StreamStateRestorer *)v15); return v3; }
write: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x78],RAX MOV RSI,qword ptr [RBP + -0x10] LEA RDI,[RBP + -0x38] CALL 0x00115f70 MOV RSI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RSI] MOV RAX,qword ptr [RAX + -0x18] ADD RSI,RAX MOV qword ptr [RBP + -0x70],RSI LAB_0011622a: LEA RDI,[RBP + -0x50] CALL 0x0011d630 JMP 0x00116235 LAB_00116235: MOV EDI,0x20 CALL 0x00104440 MOV qword ptr [RBP + -0x80],RAX JMP 0x00116245 LAB_00116245: MOV RDI,qword ptr [RBP + -0x80] MOV ESI,0x2c CALL 0x00115e90 JMP 0x00116255 LAB_00116255: MOV RDX,qword ptr [RBP + -0x80] LEA RDI,[RBP + -0x48] LEA RSI,[RBP + -0x50] CALL 0x0011d720 JMP 0x00116268 LAB_00116268: MOV RSI,qword ptr [RBP + -0x70] LEA RDI,[RBP + -0x40] LEA RDX,[RBP + -0x48] CALL 0x00104110 JMP 0x0011627b LAB_0011627b: LEA RDI,[RBP + -0x40] CALL 0x00104650 LEA RDI,[RBP + -0x48] CALL 0x00104650 LEA RDI,[RBP + -0x50] CALL 0x00104650 MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x90],RCX MOV EDI,dword ptr [RAX] LAB_001162a7: CALL 0x0011d830 MOV dword ptr [RBP + -0x84],EAX JMP 0x001162b4 LAB_001162b4: MOV RDI,qword ptr [RBP + -0x90] MOV EAX,dword ptr [RBP + -0x84] MOV dword ptr [RBP + -0x60],EAX MOV ESI,dword ptr [RBP + -0x60] CALL 0x00104520 MOV qword ptr [RBP + -0x98],RAX JMP 0x001162d5 LAB_001162d5: MOV RAX,qword ptr [RBP + -0x78] MOV EDI,dword ptr [RAX + 0x4] CALL 0x0011d850 MOV dword ptr [RBP + -0x9c],EAX JMP 0x001162e9 LAB_001162e9: MOV RDI,qword ptr [RBP + -0x98] MOV EAX,dword ptr [RBP + -0x9c] MOV dword ptr [RBP + -0x64],EAX MOV ESI,dword ptr [RBP + -0x64] CALL 0x001046d0 MOV qword ptr [RBP + -0xa8],RAX JMP 0x0011630a LAB_0011630a: MOV RDI,qword ptr [RBP + -0xa8] LEA RSI,[0x11d870] CALL 0x00104140 MOV qword ptr [RBP + -0xb0],RAX JMP 0x00116326 LAB_00116326: MOV RDI,qword ptr [RBP + -0xb0] MOV RAX,qword ptr [RBP + -0x78] MOVSD XMM0,qword ptr [RAX + 0x8] CALL 0x00104810 LAB_0011633b: JMP 0x0011633d LAB_0011633d: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0xb8],RAX LEA RDI,[RBP + -0x38] CALL 0x00116090 MOV RAX,qword ptr [RBP + -0xb8] ADD RSP,0xc0 POP RBP RET
/* ankerl::nanobench::detail::fmt::Number::write(std::ostream&) const */ ostream * __thiscall ankerl::nanobench::detail::fmt::Number::write(Number *this,ostream *param_1) { int4 uVar1; NumSep *this_00; ostream *poVar2; locale local_58 [8]; locale local_50 [8]; locale local_48 [8]; StreamStateRestorer local_40 [40]; ostream *local_18; Number *local_10; local_18 = param_1; local_10 = this; StreamStateRestorer::StreamStateRestorer(local_40,param_1); /* try { // try from 0011622a to 00116232 has its CatchHandler @ 00116361 */ std::ios_base::getloc(); /* try { // try from 00116235 to 0011623e has its CatchHandler @ 0011636f */ this_00 = (NumSep *)operator_new(0x20); /* try { // try from 00116245 to 00116252 has its CatchHandler @ 0011637d */ NumSep::NumSep(this_00,','); /* try { // try from 00116255 to 00116265 has its CatchHandler @ 0011636f */ std::locale::locale<ankerl::nanobench::detail::fmt::NumSep>(local_50,local_58,this_00); /* try { // try from 00116268 to 00116278 has its CatchHandler @ 00116399 */ std::ios::imbue(local_48); std::locale::~locale(local_48); std::locale::~locale(local_50); std::locale::~locale(local_58); poVar2 = local_18; /* try { // try from 001162a7 to 0011633a has its CatchHandler @ 00116361 */ uVar1 = std::setw(*(int *)this); poVar2 = std::operator<<(poVar2,uVar1); uVar1 = std::setprecision(*(int *)(this + 4)); poVar2 = std::operator<<(poVar2,uVar1); poVar2 = (ostream *)std::ostream::operator<<(poVar2,std::fixed); std::ostream::operator<<(poVar2,*(double *)(this + 8)); poVar2 = local_18; StreamStateRestorer::~StreamStateRestorer(local_40); return poVar2; }
13,154
Catch::Session::useConfigData(Catch::ConfigData const&)
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
void Session::useConfigData( ConfigData const& configData ) { m_configData = configData; m_config.reset(); }
O3
cpp
Catch::Session::useConfigData(Catch::ConfigData const&): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx addq $0x60, %rdi movl $0xc, %ecx rep movsq (%rsi), %es:(%rdi) movl 0x60(%r14), %eax movl %eax, 0xc0(%rbx) movl $0xc8, %r15d leaq (%rbx,%r15), %rdi leaq 0x68(%r14), %rsi callq 0x81d42 leaq 0xe8(%rbx), %rdi leaq 0x88(%r14), %rsi callq 0x81d42 leaq 0x108(%rbx), %rdi leaq 0xa8(%r14), %rsi callq 0x81d42 leaq 0x128(%rbx), %rdi addq %r14, %r15 movq %r15, %rsi callq 0x7bd94 leaq 0x140(%rbx), %rdi leaq 0xe0(%r14), %rsi callq 0x7be6a leaq 0x158(%rbx), %rdi addq $0xf8, %r14 movq %r14, %rsi callq 0x7be6a movq 0x170(%rbx), %rdi testq %rdi, %rdi je 0x55657 movq (%rdi), %rax callq *0x8(%rax) movq $0x0, 0x170(%rbx) popq %rbx popq %r14 popq %r15 retq
_ZN5Catch7Session13useConfigDataERKNS_10ConfigDataE: push r15 push r14 push rbx mov r14, rsi mov rbx, rdi add rdi, 60h ; '`' mov ecx, 0Ch rep movsq mov eax, [r14+60h] mov [rbx+0C0h], eax mov r15d, 0C8h lea rdi, [rbx+r15] lea rsi, [r14+68h] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) lea rdi, [rbx+0E8h] lea rsi, [r14+88h] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) lea rdi, [rbx+108h] lea rsi, [r14+0A8h] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) lea rdi, [rbx+128h] add r15, r14 mov rsi, r15 call _ZNSt6vectorIN5Catch12ReporterSpecESaIS1_EEaSERKS3_; std::vector<Catch::ReporterSpec>::operator=(std::vector<Catch::ReporterSpec> const&) lea rdi, [rbx+140h] lea rsi, [r14+0E0h] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEaSERKS7_; std::vector<std::string>::operator=(std::vector<std::string> const&) lea rdi, [rbx+158h] add r14, 0F8h mov rsi, r14 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEaSERKS7_; std::vector<std::string>::operator=(std::vector<std::string> const&) mov rdi, [rbx+170h] test rdi, rdi jz short loc_55657 mov rax, [rdi] call qword ptr [rax+8] loc_55657: mov qword ptr [rbx+170h], 0 pop rbx pop r14 pop r15 retn
long long Catch::Session::useConfigData(Catch::Session *this, const Catch::ConfigData *a2) { long long result; // rax long long v4; // rdi qmemcpy((char *)this + 96, a2, 0x64uLL); std::string::_M_assign((char *)this + 200, (char *)a2 + 104); std::string::_M_assign((char *)this + 232, (char *)a2 + 136); std::string::_M_assign((char *)this + 264, (char *)a2 + 168); std::vector<Catch::ReporterSpec>::operator=((char *)this + 296, (char *)a2 + 200); std::vector<std::string>::operator=((char *)this + 320, (char *)a2 + 224); result = std::vector<std::string>::operator=((char *)this + 344, (char *)a2 + 248); v4 = *((_QWORD *)this + 46); if ( v4 ) result = (*(long long ( **)(long long))(*(_QWORD *)v4 + 8LL))(v4); *((_QWORD *)this + 46) = 0LL; return result; }
useConfigData: PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI ADD RDI,0x60 MOV ECX,0xc MOVSQ.REP RDI,RSI MOV EAX,dword ptr [R14 + 0x60] MOV dword ptr [RBX + 0xc0],EAX MOV R15D,0xc8 LEA RDI,[RBX + R15*0x1] LEA RSI,[R14 + 0x68] CALL 0x00181d42 LEA RDI,[RBX + 0xe8] LEA RSI,[R14 + 0x88] CALL 0x00181d42 LEA RDI,[RBX + 0x108] LEA RSI,[R14 + 0xa8] CALL 0x00181d42 LEA RDI,[RBX + 0x128] ADD R15,R14 MOV RSI,R15 CALL 0x0017bd94 LEA RDI,[RBX + 0x140] LEA RSI,[R14 + 0xe0] CALL 0x0017be6a LEA RDI,[RBX + 0x158] ADD R14,0xf8 MOV RSI,R14 CALL 0x0017be6a MOV RDI,qword ptr [RBX + 0x170] TEST RDI,RDI JZ 0x00155657 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_00155657: MOV qword ptr [RBX + 0x170],0x0 POP RBX POP R14 POP R15 RET
/* Catch::Session::useConfigData(Catch::ConfigData const&) */ void __thiscall Catch::Session::useConfigData(Session *this,ConfigData *param_1) { long lVar1; ConfigData *pCVar2; Session *pSVar3; pCVar2 = param_1; pSVar3 = this + 0x60; for (lVar1 = 0xc; lVar1 != 0; lVar1 = lVar1 + -1) { *(int8 *)pSVar3 = *(int8 *)pCVar2; pCVar2 = pCVar2 + 8; pSVar3 = pSVar3 + 8; } *(int4 *)(this + 0xc0) = *(int4 *)(param_1 + 0x60); std::__cxx11::string::_M_assign((string *)(this + 200),(string *)(param_1 + 0x68)); std::__cxx11::string::_M_assign((string *)(this + 0xe8),(string *)(param_1 + 0x88)); std::__cxx11::string::_M_assign((string *)(this + 0x108),(string *)(param_1 + 0xa8)); std::vector<Catch::ReporterSpec,std::allocator<Catch::ReporterSpec>>::operator= ((vector<Catch::ReporterSpec,std::allocator<Catch::ReporterSpec>> *)(this + 0x128), (vector *)(param_1 + 200)); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator= ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x140), (vector *)(param_1 + 0xe0)); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator= ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x158), (vector *)(param_1 + 0xf8)); if (*(long **)(this + 0x170) != (long *)0x0) { (**(code **)(**(long **)(this + 0x170) + 8))(); } *(int8 *)(this + 0x170) = 0; return; }
13,155
u32toa_radix_reverse
bluesky950520[P]quickjs/tests/test_conv.c
size_t u32toa_radix_reverse(char buf[minimum_length(33)], uint32_t n, unsigned base) { #ifdef USE_SPECIAL_RADIX_10 if (likely(base == 10)) return u32toa_reverse(buf, n); #endif #ifdef USE_SINGLE_CASE if (n < base) { buf[0] = digits36[n]; buf[1] = '\0'; return 1; } #endif char *end; size_t len = 0; while (n >= base) { uint32_t quo = n % base; n /= base; buf[len++] = digits36[quo]; } buf[len++] = digits36[n]; buf[len] = '\0'; for (end = buf + len - 1; buf < end;) { char c = *buf; *buf++ = *end; *end-- = c; } return len; }
O0
c
u32toa_radix_reverse: subq $0x38, %rsp movq %rdi, 0x28(%rsp) movl %esi, 0x24(%rsp) movl %edx, 0x20(%rsp) cmpl $0xa, 0x20(%rsp) sete %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x45f2 movq 0x28(%rsp), %rdi movl 0x24(%rsp), %esi callq 0x3bc0 movq %rax, 0x30(%rsp) jmp 0x46ec movq $0x0, 0x10(%rsp) movl 0x24(%rsp), %eax cmpl 0x20(%rsp), %eax jb 0x464e movl 0x24(%rsp), %eax xorl %edx, %edx divl 0x20(%rsp) movl %edx, 0xc(%rsp) movl 0x20(%rsp), %ecx movl 0x24(%rsp), %eax xorl %edx, %edx divl %ecx movl %eax, 0x24(%rsp) movl 0xc(%rsp), %eax movl %eax, %ecx leaq 0x89f0(%rip), %rax # 0xd020 movb (%rax,%rcx), %dl movq 0x28(%rsp), %rax movq 0x10(%rsp), %rcx movq %rcx, %rsi addq $0x1, %rsi movq %rsi, 0x10(%rsp) movb %dl, (%rax,%rcx) jmp 0x45fb movl 0x24(%rsp), %eax movl %eax, %ecx leaq 0x89c5(%rip), %rax # 0xd020 movb (%rax,%rcx), %dl movq 0x28(%rsp), %rax movq 0x10(%rsp), %rcx movq %rcx, %rsi addq $0x1, %rsi movq %rsi, 0x10(%rsp) movb %dl, (%rax,%rcx) movq 0x28(%rsp), %rax movq 0x10(%rsp), %rcx movb $0x0, (%rax,%rcx) movq 0x28(%rsp), %rax addq 0x10(%rsp), %rax addq $-0x1, %rax movq %rax, 0x18(%rsp) movq 0x28(%rsp), %rax cmpq 0x18(%rsp), %rax jae 0x46e2 movq 0x28(%rsp), %rax movb (%rax), %al movb %al, 0xb(%rsp) movq 0x18(%rsp), %rax movb (%rax), %cl movq 0x28(%rsp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x28(%rsp) movb %cl, (%rax) movb 0xb(%rsp), %cl movq 0x18(%rsp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, 0x18(%rsp) movb %cl, (%rax) jmp 0x4698 movq 0x10(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
u32toa_radix_reverse: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_14], esi mov [rsp+38h+var_18], edx cmp [rsp+38h+var_18], 0Ah setz al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_45F2 mov rdi, [rsp+38h+var_10] mov esi, [rsp+38h+var_14] call u32toa_reverse mov [rsp+38h+var_8], rax jmp loc_46EC loc_45F2: mov [rsp+38h+var_28], 0 loc_45FB: mov eax, [rsp+38h+var_14] cmp eax, [rsp+38h+var_18] jb short loc_464E mov eax, [rsp+38h+var_14] xor edx, edx div [rsp+38h+var_18] mov [rsp+38h+var_2C], edx mov ecx, [rsp+38h+var_18] mov eax, [rsp+38h+var_14] xor edx, edx div ecx mov [rsp+38h+var_14], eax mov eax, [rsp+38h+var_2C] mov ecx, eax lea rax, digits36; "0123456789abcdefghijklmnopqrstuvwxyz" mov dl, [rax+rcx] mov rax, [rsp+38h+var_10] mov rcx, [rsp+38h+var_28] mov rsi, rcx add rsi, 1 mov [rsp+38h+var_28], rsi mov [rax+rcx], dl jmp short loc_45FB loc_464E: mov eax, [rsp+38h+var_14] mov ecx, eax lea rax, digits36; "0123456789abcdefghijklmnopqrstuvwxyz" mov dl, [rax+rcx] mov rax, [rsp+38h+var_10] mov rcx, [rsp+38h+var_28] mov rsi, rcx add rsi, 1 mov [rsp+38h+var_28], rsi mov [rax+rcx], dl mov rax, [rsp+38h+var_10] mov rcx, [rsp+38h+var_28] mov byte ptr [rax+rcx], 0 mov rax, [rsp+38h+var_10] add rax, [rsp+38h+var_28] add rax, 0FFFFFFFFFFFFFFFFh mov [rsp+38h+var_20], rax loc_4698: mov rax, [rsp+38h+var_10] cmp rax, [rsp+38h+var_20] jnb short loc_46E2 mov rax, [rsp+38h+var_10] mov al, [rax] mov [rsp+38h+var_2D], al mov rax, [rsp+38h+var_20] mov cl, [rax] mov rax, [rsp+38h+var_10] mov rdx, rax add rdx, 1 mov [rsp+38h+var_10], rdx mov [rax], cl mov cl, [rsp+38h+var_2D] mov rax, [rsp+38h+var_20] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rsp+38h+var_20], rdx mov [rax], cl jmp short loc_4698 loc_46E2: mov rax, [rsp+38h+var_28] mov [rsp+38h+var_8], rax loc_46EC: mov rax, [rsp+38h+var_8] add rsp, 38h retn
long long u32toa_radix_reverse(char *a1, unsigned int a2, unsigned int a3) { long long v3; // rcx long long v4; // rcx char *v5; // rax char *v6; // rax char v8; // [rsp+Bh] [rbp-2Dh] int v9; // [rsp+Ch] [rbp-2Ch] long long v10; // [rsp+10h] [rbp-28h] long long v11; // [rsp+10h] [rbp-28h] char *i; // [rsp+18h] [rbp-20h] unsigned int v13; // [rsp+24h] [rbp-14h] char *v14; // [rsp+28h] [rbp-10h] v14 = a1; v13 = a2; if ( a3 == 10 ) return u32toa_reverse(a1, a2); v10 = 0LL; while ( v13 >= a3 ) { v9 = v13 % a3; v13 /= a3; v3 = v10++; a1[v3] = digits36[v9]; } v4 = v10; v11 = v10 + 1; a1[v4] = digits36[v13]; a1[v11] = 0; for ( i = &a1[v11 - 1]; v14 < i; --i ) { v8 = *v14; v5 = v14++; *v5 = *i; v6 = i; *v6 = v8; } return v11; }
u32toa_radix_reverse: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV dword ptr [RSP + 0x24],ESI MOV dword ptr [RSP + 0x20],EDX CMP dword ptr [RSP + 0x20],0xa SETZ AL XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001045f2 MOV RDI,qword ptr [RSP + 0x28] MOV ESI,dword ptr [RSP + 0x24] CALL 0x00103bc0 MOV qword ptr [RSP + 0x30],RAX JMP 0x001046ec LAB_001045f2: MOV qword ptr [RSP + 0x10],0x0 LAB_001045fb: MOV EAX,dword ptr [RSP + 0x24] CMP EAX,dword ptr [RSP + 0x20] JC 0x0010464e MOV EAX,dword ptr [RSP + 0x24] XOR EDX,EDX DIV dword ptr [RSP + 0x20] MOV dword ptr [RSP + 0xc],EDX MOV ECX,dword ptr [RSP + 0x20] MOV EAX,dword ptr [RSP + 0x24] XOR EDX,EDX DIV ECX MOV dword ptr [RSP + 0x24],EAX MOV EAX,dword ptr [RSP + 0xc] MOV ECX,EAX LEA RAX,[0x10d020] MOV DL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x10] MOV RSI,RCX ADD RSI,0x1 MOV qword ptr [RSP + 0x10],RSI MOV byte ptr [RAX + RCX*0x1],DL JMP 0x001045fb LAB_0010464e: MOV EAX,dword ptr [RSP + 0x24] MOV ECX,EAX LEA RAX,[0x10d020] MOV DL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x10] MOV RSI,RCX ADD RSI,0x1 MOV qword ptr [RSP + 0x10],RSI MOV byte ptr [RAX + RCX*0x1],DL MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x10] MOV byte ptr [RAX + RCX*0x1],0x0 MOV RAX,qword ptr [RSP + 0x28] ADD RAX,qword ptr [RSP + 0x10] ADD RAX,-0x1 MOV qword ptr [RSP + 0x18],RAX LAB_00104698: MOV RAX,qword ptr [RSP + 0x28] CMP RAX,qword ptr [RSP + 0x18] JNC 0x001046e2 MOV RAX,qword ptr [RSP + 0x28] MOV AL,byte ptr [RAX] MOV byte ptr [RSP + 0xb],AL MOV RAX,qword ptr [RSP + 0x18] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RSP + 0x28] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RSP + 0x28],RDX MOV byte ptr [RAX],CL MOV CL,byte ptr [RSP + 0xb] MOV RAX,qword ptr [RSP + 0x18] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RSP + 0x18],RDX MOV byte ptr [RAX],CL JMP 0x00104698 LAB_001046e2: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x30],RAX LAB_001046ec: MOV RAX,qword ptr [RSP + 0x30] ADD RSP,0x38 RET
long u32toa_radix_reverse(int1 *param_1,uint param_2,uint param_3) { int1 uVar1; uint uVar2; long local_28; int1 *local_20; uint local_14; int1 *local_10; long local_8; if (param_3 == 10) { local_8 = u32toa_reverse(param_1,param_2); } else { local_28 = 0; local_14 = param_2; while (param_3 <= local_14) { uVar2 = local_14 % param_3; local_14 = local_14 / param_3; param_1[local_28] = "?0123456789abcdefghijklmnopqrstuvwxyz"[(ulong)uVar2 + 1]; local_28 = local_28 + 1; } local_8 = local_28 + 1; param_1[local_28] = "?0123456789abcdefghijklmnopqrstuvwxyz"[(ulong)local_14 + 1]; param_1[local_8] = 0; local_20 = param_1 + local_8; local_10 = param_1; while (local_20 = local_20 + -1, local_10 < local_20) { uVar1 = *local_10; *local_10 = *local_20; *local_20 = uVar1; local_10 = local_10 + 1; } } return local_8; }
13,156
u32toa_radix_reverse
bluesky950520[P]quickjs/tests/test_conv.c
size_t u32toa_radix_reverse(char buf[minimum_length(33)], uint32_t n, unsigned base) { #ifdef USE_SPECIAL_RADIX_10 if (likely(base == 10)) return u32toa_reverse(buf, n); #endif #ifdef USE_SINGLE_CASE if (n < base) { buf[0] = digits36[n]; buf[1] = '\0'; return 1; } #endif char *end; size_t len = 0; while (n >= base) { uint32_t quo = n % base; n /= base; buf[len++] = digits36[quo]; } buf[len++] = digits36[n]; buf[len] = '\0'; for (end = buf + len - 1; buf < end;) { char c = *buf; *buf++ = *end; *end-- = c; } return len; }
O2
c
u32toa_radix_reverse: cmpl $0xa, %edx je 0x2a0c movl %edx, %r8d pushq $0x1 popq %rcx leaq 0x3357(%rip), %r10 # 0x6050 movq %rdi, %r9 cmpl %r8d, %esi jb 0x2d19 movl %esi, %eax xorl %edx, %edx divl %r8d movb (%rdx,%r10), %dl movb %dl, (%r9) incq %r9 incq %rcx movl %eax, %esi jmp 0x2cfc movl %esi, %eax movb (%rax,%r10), %al movb %al, (%r9) movb $0x0, 0x1(%r9) cmpq %r9, %rdi jae 0x2d3e movb (%rdi), %al movb (%r9), %dl movb %dl, (%rdi) incq %rdi movb %al, (%r9) decq %r9 jmp 0x2d27 movq %rcx, %rax retq
u32toa_radix_reverse: cmp edx, 0Ah jz u32toa_reverse mov r8d, edx push 1 pop rcx lea r10, digits36; "0123456789abcdefghijklmnopqrstuvwxyz" mov r9, rdi loc_2CFC: cmp esi, r8d jb short loc_2D19 mov eax, esi xor edx, edx div r8d mov dl, [rdx+r10] mov [r9], dl inc r9 inc rcx mov esi, eax jmp short loc_2CFC loc_2D19: mov eax, esi mov al, [rax+r10] mov [r9], al mov byte ptr [r9+1], 0 loc_2D27: cmp rdi, r9 jnb short loc_2D3E mov al, [rdi] mov dl, [r9] mov [rdi], dl inc rdi mov [r9], al dec r9 jmp short loc_2D27 loc_2D3E: mov rax, rcx retn
long long u32toa_radix_reverse(_BYTE *a1, unsigned int a2, unsigned int a3) { long long v3; // rcx _BYTE *v4; // r9 char v5; // al if ( a3 == 10 ) return u32toa_reverse(a1, a2); v3 = 1LL; v4 = a1; while ( a2 >= a3 ) { *v4++ = digits36[a2 % a3]; ++v3; a2 /= a3; } *v4 = digits36[a2]; v4[1] = 0; while ( a1 < v4 ) { v5 = *a1; *a1++ = *v4; *v4-- = v5; } return v3; }
u32toa_radix_reverse: CMP EDX,0xa JZ 0x00102a0c MOV R8D,EDX PUSH 0x1 POP RCX LEA R10,[0x106050] MOV R9,RDI LAB_00102cfc: CMP ESI,R8D JC 0x00102d19 MOV EAX,ESI XOR EDX,EDX DIV R8D MOV DL,byte ptr [RDX + R10*0x1] MOV byte ptr [R9],DL INC R9 INC RCX MOV ESI,EAX JMP 0x00102cfc LAB_00102d19: MOV EAX,ESI MOV AL,byte ptr [RAX + R10*0x1] MOV byte ptr [R9],AL MOV byte ptr [R9 + 0x1],0x0 LAB_00102d27: CMP RDI,R9 JNC 0x00102d3e MOV AL,byte ptr [RDI] MOV DL,byte ptr [R9] MOV byte ptr [RDI],DL INC RDI MOV byte ptr [R9],AL DEC R9 JMP 0x00102d27 LAB_00102d3e: MOV RAX,RCX RET
long u32toa_radix_reverse(byte *param_1,uint param_2,uint param_3) { byte bVar1; long lVar2; byte *pbVar3; if (param_3 != 10) { lVar2 = 1; pbVar3 = param_1; for (; param_3 <= param_2; param_2 = param_2 / param_3) { *pbVar3 = "0123456789abcdefghijklmnopqrstuvwxyz"[(ulong)param_2 % (ulong)param_3]; pbVar3 = pbVar3 + 1; lVar2 = lVar2 + 1; } *pbVar3 = "0123456789abcdefghijklmnopqrstuvwxyz"[param_2]; pbVar3[1] = 0; for (; param_1 < pbVar3; param_1 = param_1 + 1) { bVar1 = *param_1; *param_1 = *pbVar3; *pbVar3 = bVar1; pbVar3 = pbVar3 + -1; } return lVar2; } lVar2 = 1; pbVar3 = param_1; for (; 9 < param_2; param_2 = param_2 / 10) { *pbVar3 = (byte)((ulong)param_2 % 10) | 0x30; pbVar3 = pbVar3 + 1; lVar2 = lVar2 + 1; } *pbVar3 = (byte)param_2 | 0x30; pbVar3[1] = 0; for (; param_1 < pbVar3; param_1 = param_1 + 1) { bVar1 = *param_1; *param_1 = *pbVar3; *pbVar3 = bVar1; pbVar3 = pbVar3 + -1; } return lVar2; }
13,157
my_default_csname
eloqsql/mysys/charset.c
const char* my_default_csname() { const char* csname = NULL; #ifdef _WIN32 char cpbuf[64]; int cp = GetConsoleCP(); if (cp == 0) cp = GetACP(); snprintf(cpbuf, sizeof(cpbuf), "cp%d", (int)cp); csname = my_os_charset_to_mysql_charset(cpbuf); #elif defined(HAVE_SETLOCALE) && defined(HAVE_NL_LANGINFO) if (setlocale(LC_CTYPE, "") && (csname = nl_langinfo(CODESET))) csname = my_os_charset_to_mysql_charset(csname); #endif return csname ? csname : MYSQL_DEFAULT_CHARSET_NAME; }
O0
c
my_default_csname: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq $0x0, -0x8(%rbp) xorl %edi, %edi leaq 0x520f3(%rip), %rsi # 0x7ed9c callq 0x24270 cmpq $0x0, %rax je 0x2ccd5 movl $0xe, %edi callq 0x242a0 movq %rax, -0x8(%rbp) cmpq $0x0, %rax je 0x2ccd5 movq -0x8(%rbp), %rdi callq 0x2cd00 movq %rax, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0x2cce6 movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0x2ccf3 leaq 0x4eb24(%rip), %rax # 0x7b811 movq %rax, -0x10(%rbp) jmp 0x2ccf3 movq -0x10(%rbp), %rax addq $0x10, %rsp popq %rbp retq nopl (%rax)
my_default_csname: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], 0 xor edi, edi lea rsi, asc_7ED98+4; "" call _setlocale cmp rax, 0 jz short loc_2CCD5 mov edi, 0Eh call _nl_langinfo mov [rbp+var_8], rax cmp rax, 0 jz short loc_2CCD5 mov rdi, [rbp+var_8] call my_os_charset_to_mysql_charset mov [rbp+var_8], rax loc_2CCD5: cmp [rbp+var_8], 0 jz short loc_2CCE6 mov rax, [rbp+var_8] mov [rbp+var_10], rax jmp short loc_2CCF3 loc_2CCE6: lea rax, aLatin1; "latin1" mov [rbp+var_10], rax jmp short $+2 loc_2CCF3: mov rax, [rbp+var_10] add rsp, 10h pop rbp retn
const char *my_default_csname() { long long v2; // [rsp+8h] [rbp-8h] v2 = 0LL; if ( setlocale(0LL, "") ) { v2 = nl_langinfo(14LL); if ( v2 ) v2 = my_os_charset_to_mysql_charset(v2); } if ( v2 ) return (const char *)v2; else return "latin1"; }
my_default_csname: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],0x0 XOR EDI,EDI LEA RSI,[0x17ed9c] CALL 0x00124270 CMP RAX,0x0 JZ 0x0012ccd5 MOV EDI,0xe CALL 0x001242a0 MOV qword ptr [RBP + -0x8],RAX CMP RAX,0x0 JZ 0x0012ccd5 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012cd00 MOV qword ptr [RBP + -0x8],RAX LAB_0012ccd5: CMP qword ptr [RBP + -0x8],0x0 JZ 0x0012cce6 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX JMP 0x0012ccf3 LAB_0012cce6: LEA RAX,[0x17b811] MOV qword ptr [RBP + -0x10],RAX JMP 0x0012ccf3 LAB_0012ccf3: MOV RAX,qword ptr [RBP + -0x10] ADD RSP,0x10 POP RBP RET
char * my_default_csname(void) { char *pcVar1; char *local_18; char *local_10; local_10 = (char *)0x0; pcVar1 = setlocale(0,""); if (pcVar1 != (char *)0x0) { local_10 = nl_langinfo(0xe); if (local_10 != (char *)0x0) { local_10 = (char *)my_os_charset_to_mysql_charset(local_10); } } if (local_10 == (char *)0x0) { local_18 = "latin1"; } else { local_18 = local_10; } return local_18; }
13,158
my_fill_mb2
eloqsql/strings/ctype-ucs2.c
static void my_fill_mb2(CHARSET_INFO *cs, char *s, size_t slen, int fill) { char buf[10], *last; size_t buflen, remainder; DBUG_ASSERT((slen % 2) == 0); buflen= my_ci_wc_mb(cs, (my_wc_t) fill, (uchar*) buf, (uchar*) buf + sizeof(buf)); DBUG_ASSERT(buflen > 0); /* "last" in the last position where a sequence of "buflen" bytes can start. */ for (last= s + slen - buflen; s <= last; s+= buflen) { /* Enough space for the character */ memcpy(s, buf, buflen); } /* If there are some more space which is not enough for the whole multibyte character, then add trailing zeros. */ if ((remainder= last + buflen - s) > 0) bzero(s, (size_t) remainder); }
O3
c
my_fill_mb2: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq 0xb8(%rdi), %rax movslq %ecx, %rsi leaq -0x30(%rbp), %rcx leaq -0x3a(%rbp), %rdx callq *0x30(%rax) movslq %eax, %r15 addq %r14, %rbx movq %rbx, %r13 subq %r15, %r13 cmpq %r14, %r13 jb 0x4e8e3 leaq -0x3a(%rbp), %r12 movq %r14, %rdi movq %r12, %rsi movq %r15, %rdx callq 0x24210 addq %r15, %r14 cmpq %r13, %r14 jbe 0x4e8cd subq %r14, %rbx je 0x4e8f5 movq %r14, %rdi xorl %esi, %esi movq %rbx, %rdx callq 0x24170 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x4e913 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x24300
my_fill_mb2: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdx mov r14, rsi mov rax, fs:28h mov [rbp+var_30], rax mov rax, [rdi+0B8h] movsxd rsi, ecx lea rcx, [rbp+var_30] lea rdx, [rbp+var_3A] call qword ptr [rax+30h] movsxd r15, eax add rbx, r14 mov r13, rbx sub r13, r15 cmp r13, r14 jb short loc_4E8E3 lea r12, [rbp+var_3A] loc_4E8CD: mov rdi, r14 mov rsi, r12 mov rdx, r15 call _memcpy add r14, r15 cmp r14, r13 jbe short loc_4E8CD loc_4E8E3: sub rbx, r14 jz short loc_4E8F5 mov rdi, r14 xor esi, esi mov rdx, rbx call _memset loc_4E8F5: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_4E913 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4E913: call ___stack_chk_fail
unsigned long long my_fill_mb2(long long a1, unsigned long long a2, long long a3, int a4) { unsigned long long v5; // r14 long long v6; // r15 long long v7; // rbx long long v8; // rbx _BYTE v10[10]; // [rsp+6h] [rbp-3Ah] BYREF unsigned long long v11[6]; // [rsp+10h] [rbp-30h] BYREF v5 = a2; v11[0] = __readfsqword(0x28u); v6 = (*(int ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 48LL))( a1, a4, v10, v11); v7 = a2 + a3; if ( v7 - v6 >= a2 ) { do { memcpy(v5, v10, v6); v5 += v6; } while ( v5 <= v7 - v6 ); } v8 = v7 - v5; if ( v8 ) memset(v5, 0LL, v8); return __readfsqword(0x28u); }
my_fill_mb2: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDX MOV R14,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RDI + 0xb8] MOVSXD RSI,ECX LEA RCX,[RBP + -0x30] LEA RDX,[RBP + -0x3a] CALL qword ptr [RAX + 0x30] MOVSXD R15,EAX ADD RBX,R14 MOV R13,RBX SUB R13,R15 CMP R13,R14 JC 0x0014e8e3 LEA R12,[RBP + -0x3a] LAB_0014e8cd: MOV RDI,R14 MOV RSI,R12 MOV RDX,R15 CALL 0x00124210 ADD R14,R15 CMP R14,R13 JBE 0x0014e8cd LAB_0014e8e3: SUB RBX,R14 JZ 0x0014e8f5 MOV RDI,R14 XOR ESI,ESI MOV RDX,RBX CALL 0x00124170 LAB_0014e8f5: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0014e913 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014e913: CALL 0x00124300
void my_fill_mb2(long param_1,void *param_2,long param_3,int param_4) { int iVar1; void *pvVar2; void *__dest; size_t sVar3; long in_FS_OFFSET; int1 local_42 [10]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))(param_1,(long)param_4,local_42,&local_38); sVar3 = (size_t)iVar1; pvVar2 = (void *)((long)param_2 + (param_3 - sVar3)); __dest = param_2; if (param_2 <= pvVar2) { do { memcpy(__dest,local_42,sVar3); __dest = (void *)((long)__dest + sVar3); } while (__dest <= pvVar2); } sVar3 = (long)param_2 + (param_3 - (long)__dest); if (sVar3 != 0) { memset(__dest,0,sVar3); } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
13,159
ftxui::border(std::shared_ptr<ftxui::Node>)
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/dom/border.cpp
Element border(Element child) { return std::make_shared<Border>(unpack(std::move(child)), ROUNDED); }
O3
cpp
ftxui::border(std::shared_ptr<ftxui::Node>): pushq %r15 pushq %r14 pushq %rbx subq $0x50, %rsp movq %rdi, %rbx movups (%rsi), %xmm0 xorl %ecx, %ecx movq %rcx, 0x8(%rsi) leaq 0x20(%rsp), %rax movaps %xmm0, (%rax) movq %rcx, (%rsi) movq %rsp, %rdi movq %rax, %rsi callq 0x22adb movl $0x80, %edi callq 0xb3e0 movq %rax, %r14 movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x8(%r14) leaq 0x35e4f(%rip), %rax # 0x570d8 movq %rax, (%r14) movq %r14, %r15 addq $0x10, %r15 movaps (%rsp), %xmm0 leaq 0x30(%rsp), %rsi movaps %xmm0, (%rsi) movq 0x10(%rsp), %rax movq %rax, 0x10(%rsi) xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movq $0x0, 0x10(%rsp) movq %r15, %rdi movl $0x4, %edx xorl %ecx, %ecx callq 0x21c4a leaq 0x30(%rsp), %rdi callq 0x1503a movq %r15, (%rbx) movq %r14, 0x8(%rbx) movq %rsp, %rdi callq 0x1503a movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x212ef callq 0x14af8 movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x1503a movl $0x80, %esi movq %r14, %rdi callq 0xb400 jmp 0x2131b movq %rax, %rbx movq %rsp, %rdi callq 0x1503a jmp 0x21328 movq %rax, %rbx movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x21337 callq 0x14af8 movq %rbx, %rdi callq 0xb780
_ZN5ftxui6borderESt10shared_ptrINS_4NodeEE: push r15 push r14 push rbx sub rsp, 50h mov rbx, rdi movups xmm0, xmmword ptr [rsi] xor ecx, ecx mov [rsi+8], rcx lea rax, [rsp+68h+var_48] movaps xmmword ptr [rax], xmm0 mov [rsi], rcx mov rdi, rsp mov rsi, rax call _ZN5ftxui6unpackIJSt10shared_ptrINS_4NodeEEEEESt6vectorIS3_SaIS3_EEDpT_; ftxui::unpack<std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node>) mov edi, 80h; unsigned __int64 call __Znwm; operator new(ulong) mov r14, rax mov rax, 100000001h mov [r14+8], rax lea rax, off_570D8 mov [r14], rax mov r15, r14 add r15, 10h movaps xmm0, [rsp+68h+var_68] lea rsi, [rsp+68h+var_38] movaps xmmword ptr [rsi], xmm0 mov rax, [rsp+68h+var_58] mov [rsi+10h], rax xorps xmm0, xmm0 movaps [rsp+68h+var_68], xmm0 mov [rsp+68h+var_58], 0 mov rdi, r15 mov edx, 4 xor ecx, ecx call _ZN5ftxui12_GLOBAL__N_16BorderC2ESt6vectorISt10shared_ptrINS_4NodeEESaIS5_EENS_11BorderStyleESt8optionalINS_5ColorEE; ftxui::`anonymous namespace'::Border::Border(std::vector<std::shared_ptr<ftxui::Node>>,ftxui::BorderStyle,std::optional<ftxui::Color>) lea rdi, [rsp+68h+var_38] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov [rbx], r15 mov [rbx+8], r14 mov rdi, rsp call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov rdi, [rsp+68h+var_40] test rdi, rdi jz short loc_212EF call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_212EF: mov rax, rbx add rsp, 50h pop rbx pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_28] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov esi, 80h; unsigned __int64 mov rdi, r14; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_2131B mov rbx, rax loc_2131B: mov rdi, rsp call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() jmp short loc_21328 mov rbx, rax loc_21328: mov rdi, [rsp+arg_20] test rdi, rdi jz short loc_21337 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_21337: mov rdi, rbx call __Unwind_Resume
_QWORD * ftxui::border(_QWORD *a1, __int128 *a2, int a3, long long a4, int a5, int a6) { __int128 v6; // xmm0 _QWORD *v7; // r14 long long v8; // r8 long long v9; // r9 __int128 v11; // [rsp+0h] [rbp-68h] BYREF long long v12; // [rsp+10h] [rbp-58h] __int128 v13; // [rsp+20h] [rbp-48h] BYREF __int128 v14; // [rsp+30h] [rbp-38h] BYREF long long v15; // [rsp+40h] [rbp-28h] v6 = *a2; *((_QWORD *)a2 + 1) = 0LL; v13 = v6; *(_QWORD *)a2 = 0LL; ftxui::unpack<std::shared_ptr<ftxui::Node>>((unsigned int)&v11, (unsigned int)&v13, a3, 0, a5, a6, v11); v7 = (_QWORD *)operator new(0x80uLL); v7[1] = 0x100000001LL; *v7 = off_570D8; v14 = v11; v15 = v12; ftxui::`anonymous namespace'::Border::Border(v7 + 2, &v14, 4LL, 0LL, v8, v9, 0LL, 0LL, 0LL); std::vector<std::shared_ptr<ftxui::Node>>::~vector((long long)&v14); *a1 = v7 + 2; a1[1] = v7; std::vector<std::shared_ptr<ftxui::Node>>::~vector((long long)&v11); if ( *((_QWORD *)&v13 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v13 + 1)); return a1; }
border: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x50 MOV RBX,RDI MOVUPS XMM0,xmmword ptr [RSI] XOR ECX,ECX MOV qword ptr [RSI + 0x8],RCX LEA RAX,[RSP + 0x20] MOVAPS xmmword ptr [RAX],XMM0 MOV qword ptr [RSI],RCX LAB_0012125c: MOV RDI,RSP MOV RSI,RAX CALL 0x00122adb LAB_00121267: MOV EDI,0x80 CALL 0x0010b3e0 MOV R14,RAX MOV RAX,0x100000001 MOV qword ptr [R14 + 0x8],RAX LEA RAX,[0x1570d8] MOV qword ptr [R14],RAX MOV R15,R14 ADD R15,0x10 MOVAPS XMM0,xmmword ptr [RSP] LEA RSI,[RSP + 0x30] MOVAPS xmmword ptr [RSI],XMM0 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSI + 0x10],RAX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],0x0 LAB_001212b8: MOV RDI,R15 MOV EDX,0x4 XOR ECX,ECX CALL 0x00121c4a LAB_001212c7: LEA RDI,[RSP + 0x30] CALL 0x0011503a MOV qword ptr [RBX],R15 MOV qword ptr [RBX + 0x8],R14 MOV RDI,RSP CALL 0x0011503a MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI JZ 0x001212ef CALL 0x00114af8 LAB_001212ef: MOV RAX,RBX ADD RSP,0x50 POP RBX POP R14 POP R15 RET
/* ftxui::border(std::shared_ptr<ftxui::Node>) */ ftxui * __thiscall ftxui::border(ftxui *this,int8 *param_2) { int8 *puVar1; int8 local_68; int8 uStack_60; int8 local_58; int4 local_48; int4 uStack_44; int4 uStack_40; int4 uStack_3c; int8 local_38; int8 uStack_30; int8 local_28; local_48 = *(int4 *)param_2; uStack_44 = *(int4 *)((long)param_2 + 4); uStack_40 = *(int4 *)(param_2 + 1); uStack_3c = *(int4 *)((long)param_2 + 0xc); param_2[1] = 0; *param_2 = 0; /* try { // try from 0012125c to 00121266 has its CatchHandler @ 00121325 */ unpack<std::shared_ptr<ftxui::Node>>((ftxui *)&local_68,&local_48); /* try { // try from 00121267 to 00121270 has its CatchHandler @ 00121318 */ puVar1 = (int8 *)operator_new(0x80); puVar1[1] = 0x100000001; *puVar1 = &PTR___Sp_counted_ptr_inplace_001570d8; local_38 = local_68; uStack_30 = uStack_60; local_28 = local_58; local_68 = 0; uStack_60 = 0; local_58 = 0; /* try { // try from 001212b8 to 001212c6 has its CatchHandler @ 001212fc */ (anonymous_namespace)::Border::Border((Border *)(puVar1 + 2),&local_38,4,0); std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector ((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *) &local_38); *(Border **)this = (Border *)(puVar1 + 2); *(int8 **)(this + 8) = puVar1; std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector ((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *) &local_68); if ((_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)CONCAT44(uStack_3c,uStack_40) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release ((_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)CONCAT44(uStack_3c,uStack_40)); } return this; }
13,160
ImPlot3D::PushStyleColor(int, unsigned int)
zkingston[P]unknot/build_O0/_deps/implot3d-src/implot3d.cpp
void PushStyleColor(ImPlot3DCol idx, ImU32 col) { ImPlot3DContext& gp = *GImPlot3D; ImGuiColorMod backup; backup.Col = (ImGuiCol)idx; backup.BackupValue = gp.Style.Colors[idx]; gp.ColorModifiers.push_back(backup); gp.Style.Colors[idx] = ImGui::ColorConvertU32ToFloat4(col); }
O0
cpp
ImPlot3D::PushStyleColor(int, unsigned int): subq $0x48, %rsp movl %edi, 0x44(%rsp) movl %esi, 0x40(%rsp) movq 0x5b9545(%rip), %rax # 0x68f638 movq %rax, 0x38(%rsp) leaq 0x24(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0xd9a90 movq 0x8(%rsp), %rsi movl 0x44(%rsp), %eax movl %eax, 0x24(%rsp) movq 0x38(%rsp), %rax movslq 0x44(%rsp), %rcx shlq $0x4, %rcx movups 0xe0(%rax,%rcx), %xmm0 movups %xmm0, 0x28(%rsp) movq 0x38(%rsp), %rdi addq $0x1d8, %rdi # imm = 0x1D8 callq 0xd9ab0 movl 0x40(%rsp), %edi callq 0x4f42b0 movlpd %xmm0, 0x14(%rsp) movlpd %xmm1, 0x1c(%rsp) movq 0x38(%rsp), %rax addq $0x94, %rax addq $0x4c, %rax movslq 0x44(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq 0x14(%rsp), %rcx movq %rcx, (%rax) movq 0x1c(%rsp), %rcx movq %rcx, 0x8(%rax) addq $0x48, %rsp retq nopw %cs:(%rax,%rax)
_ZN8ImPlot3D14PushStyleColorEij: sub rsp, 48h mov dword ptr [rsp+48h+var_8+4], edi mov dword ptr [rsp+48h+var_8], esi mov rax, cs:_ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D mov [rsp+48h+var_10], rax lea rdi, [rsp+48h+var_24]; this mov qword ptr [rsp+48h+var_40], rdi call _ZN13ImGuiColorModC2Ev; ImGuiColorMod::ImGuiColorMod(void) mov rsi, qword ptr [rsp+48h+var_40]; unsigned int mov eax, dword ptr [rsp+48h+var_8+4] mov [rsp+48h+var_24], eax mov rax, [rsp+48h+var_10] movsxd rcx, dword ptr [rsp+48h+var_8+4] shl rcx, 4 movups xmm0, xmmword ptr [rax+rcx+0E0h] movups [rsp+48h+var_20], xmm0 mov rdi, [rsp+48h+var_10] add rdi, 1D8h call _ZN8ImVectorI13ImGuiColorModE9push_backERKS0_; ImVector<ImGuiColorMod>::push_back(ImGuiColorMod const&) mov edi, dword ptr [rsp+48h+var_8]; this call _ZN5ImGui23ColorConvertU32ToFloat4Ej; ImGui::ColorConvertU32ToFloat4(uint) movlpd [rsp+48h+var_34], xmm0 movlpd [rsp+48h+var_2C], xmm1 mov rax, [rsp+48h+var_10] add rax, 94h add rax, 4Ch ; 'L' movsxd rcx, dword ptr [rsp+48h+var_8+4] shl rcx, 4 add rax, rcx mov rcx, [rsp+48h+var_34] mov [rax], rcx mov rcx, [rsp+48h+var_2C] mov [rax+8], rcx add rsp, 48h retn
long long ImPlot3D::PushStyleColor(ImPlot3D *this, unsigned int a2, double a3, double a4) { long long v4; // xmm0_8 long long result; // rax int v6; // [rsp+24h] [rbp-24h] BYREF __int128 v7; // [rsp+28h] [rbp-20h] long long v8; // [rsp+38h] [rbp-10h] unsigned int v9; // [rsp+40h] [rbp-8h] int v10; // [rsp+44h] [rbp-4h] v10 = (int)this; v9 = a2; v8 = ImPlot3D::GImPlot3D; ImGuiColorMod::ImGuiColorMod((ImGuiColorMod *)&v6); v6 = v10; v7 = *(_OWORD *)(v8 + 16LL * v10 + 224); v4 = v7; ImVector<ImGuiColorMod>::push_back(v8 + 472, &v6); ImGui::ColorConvertU32ToFloat4((ImGui *)v9, (unsigned int)&v6); result = 16LL * v10 + v8 + 224; *(_QWORD *)result = v4; *(double *)(result + 8) = a4; return result; }
PushStyleColor: SUB RSP,0x48 MOV dword ptr [RSP + 0x44],EDI MOV dword ptr [RSP + 0x40],ESI MOV RAX,qword ptr [0x0078f638] MOV qword ptr [RSP + 0x38],RAX LEA RDI,[RSP + 0x24] MOV qword ptr [RSP + 0x8],RDI CALL 0x001d9a90 MOV RSI,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSP + 0x44] MOV dword ptr [RSP + 0x24],EAX MOV RAX,qword ptr [RSP + 0x38] MOVSXD RCX,dword ptr [RSP + 0x44] SHL RCX,0x4 MOVUPS XMM0,xmmword ptr [RAX + RCX*0x1 + 0xe0] MOVUPS xmmword ptr [RSP + 0x28],XMM0 MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x1d8 CALL 0x001d9ab0 MOV EDI,dword ptr [RSP + 0x40] CALL 0x005f42b0 MOVLPD qword ptr [RSP + 0x14],XMM0 MOVLPD qword ptr [RSP + 0x1c],XMM1 MOV RAX,qword ptr [RSP + 0x38] ADD RAX,0x94 ADD RAX,0x4c MOVSXD RCX,dword ptr [RSP + 0x44] SHL RCX,0x4 ADD RAX,RCX MOV RCX,qword ptr [RSP + 0x14] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x1c] MOV qword ptr [RAX + 0x8],RCX ADD RSP,0x48 RET
/* ImPlot3D::PushStyleColor(int, unsigned int) */ void ImPlot3D::PushStyleColor(int param_1,uint param_2) { int8 uVar1; int8 *puVar2; int8 in_XMM1_Qa; int local_24; int8 local_20; int8 uStack_18; long local_10; uint local_8; int local_4; local_10 = GImPlot3D; local_8 = param_2; local_4 = param_1; ImGuiColorMod::ImGuiColorMod((ImGuiColorMod *)&local_24); local_24 = local_4; puVar2 = (int8 *)(local_10 + 0xe0 + (long)local_4 * 0x10); local_20 = *puVar2; uStack_18 = puVar2[1]; ImVector<ImGuiColorMod>::push_back ((ImVector<ImGuiColorMod> *)(local_10 + 0x1d8),(ImGuiColorMod *)&local_24); uVar1 = ImGui::ColorConvertU32ToFloat4(local_8); puVar2 = (int8 *)(local_10 + 0xe0 + (long)local_4 * 0x10); *puVar2 = uVar1; puVar2[1] = in_XMM1_Qa; return; }
13,161
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[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
llama.cpp/common/json.hpp
const_reference operator[](const typename object_t::key_type& key) const { // const operator[] only works for objects if (JSON_HEDLEY_LIKELY(is_object())) { auto it = m_data.m_value.object->find(key); JSON_ASSERT(it != m_data.m_value.object->end()); return it->second; } JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this)); }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const: pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0xbb41c movq 0x8(%r14), %rdi callq 0xbb4d4 movq 0x8(%r14), %rcx cmpq 0x8(%rcx), %rax je 0xbb47a addq $0x20, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x20, %edi callq 0x20630 movq %rax, %rbx movq %r14, %rdi callq 0x89b04 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x63415(%rip), %rsi # 0x11e855 leaq 0x10(%rsp), %rdi callq 0xbb704 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x131, %esi # imm = 0x131 movq %r14, %rcx callq 0xbb52c xorl %ebp, %ebp leaq 0xa3bd5(%rip), %rsi # 0x15f040 leaq -0x45a9e(%rip), %rdx # 0x759d4 movq %rbx, %rdi callq 0x20a30 leaq 0x5d391(%rip), %rdi # 0x118812 leaq 0x5d3c5(%rip), %rdx # 0x11884d leaq 0x633a3(%rip), %rcx # 0x11e832 movl $0x53ca, %esi # imm = 0x53CA xorl %eax, %eax callq 0x20e40 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xbb4b9 movq 0x20(%rsp), %rsi incq %rsi callq 0x20170 testb %bpl, %bpl jne 0xbb4c3 jmp 0xbb4cb movq %rax, %r14 movq %rbx, %rdi callq 0x20ed0 movq %r14, %rdi callq 0x20ad0 nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixERKS9_: push rbp; void * push r14; int push rbx; __int64 sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_BB41C mov rdi, [r14+8] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findERSH_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,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::less<void>,std::allocator<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>>>>::find(std::string const&) mov rcx, [r14+8] cmp rax, [rcx+8] jz short loc_BB47A add rax, 20h ; ' ' add rsp, 30h pop rbx pop r14 pop rbp retn loc_BB41C: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUseOpera_0; "cannot use operator[] with a string arg"... lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA51_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>(char const(&)[51],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 131h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_BB47A: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aItMDataMValueO; "it != m_data.m_value.object->end()" mov esi, 53CAh xor eax, eax call _ggml_abort mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_BB4B9 mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BB4B9: test bpl, bpl jnz short loc_BB4C3 jmp short loc_BB4CB mov r14, rax loc_BB4C3: mov rdi, rbx; void * call ___cxa_free_exception loc_BB4CB: mov rdi, r14 call __Unwind_Resume
operator[]: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x001bb41c MOV RDI,qword ptr [R14 + 0x8] CALL 0x001bb4d4 MOV RCX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RCX + 0x8] JZ 0x001bb47a ADD RAX,0x20 ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_001bb41c: MOV EDI,0x20 CALL 0x00120630 MOV RBX,RAX MOV RDI,R14 CALL 0x00189b04 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_001bb439: LEA RSI,[0x21e855] LEA RDI,[RSP + 0x10] CALL 0x001bb704 MOV BPL,0x1 LAB_001bb44d: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x131 MOV RCX,R14 CALL 0x001bb52c XOR EBP,EBP LEA RSI,[0x25f040] LEA RDX,[0x1759d4] MOV RDI,RBX CALL 0x00120a30 LAB_001bb47a: LEA RDI,[0x218812] LEA RDX,[0x21884d] LEA RCX,[0x21e832] MOV ESI,0x53ca XOR EAX,EAX CALL 0x00120e40
/* 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[](std::__cxx11::string const&) const */ long __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,string *param_1) { long lVar1; int8 uVar2; char *local_40; detail local_38 [32]; if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar2 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 001bb439 to 001bb449 has its CatchHandler @ 001bb4c0 */ detail::concat<std::__cxx11::string,char_const(&)[51],char_const*> (local_38,"cannot use operator[] with a string argument with ",&local_40); /* try { // try from 001bb44d to 001bb479 has its CatchHandler @ 001bb49b */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar2,0x131,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception); } lVar1 = ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::find(*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(this + 8),param_1); if (lVar1 != *(long *)(*(long *)(this + 8) + 8)) { return lVar1 + 0x20; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x53ca, "GGML_ASSERT(%s) failed","it != m_data.m_value.object->end()"); }
13,162
fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format-inl.h
FMT_FUNC detail::utf8_to_utf16::utf8_to_utf16(string_view s) { for_each_codepoint(s, [this](uint32_t cp, string_view) { if (cp == invalid_code_point) FMT_THROW(std::runtime_error("invalid utf8")); if (cp <= 0xFFFF) { buffer_.push_back(static_cast<wchar_t>(cp)); } else { cp -= 0x10000; buffer_.push_back(static_cast<wchar_t>(0xD800 + (cp >> 10))); buffer_.push_back(static_cast<wchar_t>(0xDC00 + (cp & 0x3FF))); } return true; }); buffer_.push_back(0); }
O0
c
fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>): subq $0x78, %rsp movq %rsi, 0x68(%rsp) movq %rdx, 0x70(%rsp) movq %rdi, 0x60(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x10(%rsp) movq %rax, 0x8(%rsp) leaq 0x5f(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x15330 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0xc8700 jmp 0xc6ec2 leaq 0x5f(%rsp), %rdi callq 0x15e00 movq 0x8(%rsp), %rax movups 0x68(%rsp), %xmm0 movaps %xmm0, 0x30(%rsp) movq %rax, 0x28(%rsp) movq 0x30(%rsp), %rdi movq 0x38(%rsp), %rsi movq 0x28(%rsp), %rdx callq 0xc6f50 jmp 0xc6ef6 movq 0x8(%rsp), %rdi movl $0x0, 0x24(%rsp) leaq 0x24(%rsp), %rsi callq 0xc8760 jmp 0xc6f0f addq $0x78, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) leaq 0x5f(%rsp), %rdi callq 0x15e00 jmp 0xc6f46 movq 0x10(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) callq 0xc87b0 movq 0x50(%rsp), %rdi callq 0x15dd0
_ZN3fmt3v106detail13utf8_to_utf16C2ENS0_17basic_string_viewIcEE: sub rsp, 78h mov qword ptr [rsp+78h+var_10], rsi mov qword ptr [rsp+78h+var_10+8], rdx mov [rsp+78h+var_18], rdi mov rax, [rsp+78h+var_18] mov [rsp+78h+var_68], rax mov [rsp+78h+var_70], rax lea rdi, [rsp+78h+var_19] mov [rsp+78h+var_60], rdi call __ZNSaIwEC1Ev; std::allocator<wchar_t>::allocator(void) mov rdi, [rsp+78h+var_68] mov rsi, [rsp+78h+var_60] call _ZN3fmt3v1019basic_memory_bufferIwLm500ESaIwEEC2ERKS2_; fmt::v10::basic_memory_buffer<wchar_t,500ul,std::allocator<wchar_t>>::basic_memory_buffer(std::allocator<wchar_t> const&) jmp short $+2 loc_C6EC2: lea rdi, [rsp+78h+var_19] call __ZNSaIwED1Ev; std::allocator<wchar_t>::~allocator() mov rax, [rsp+78h+var_70] movups xmm0, [rsp+78h+var_10] movaps [rsp+78h+var_48], xmm0 mov [rsp+78h+var_50], rax mov rdi, qword ptr [rsp+78h+var_48] mov rsi, qword ptr [rsp+78h+var_48+8] mov rdx, [rsp+78h+var_50] call _ZN3fmt3v106detail18for_each_codepointIZNS1_13utf8_to_utf16C1ENS0_17basic_string_viewIcEEE3$_0EEvS5_T_; fmt::v10::detail::for_each_codepoint<fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)::$_0>(fmt::v10::basic_string_view<char>,fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)::$_0) jmp short $+2 loc_C6EF6: mov rdi, [rsp+78h+var_70] mov [rsp+78h+var_54], 0 lea rsi, [rsp+78h+var_54] call _ZN3fmt3v106detail6bufferIwE9push_backERKw; fmt::v10::detail::buffer<wchar_t>::push_back(wchar_t const&) jmp short $+2 loc_C6F0F: add rsp, 78h retn mov rcx, rax mov eax, edx mov [rsp+arg_48], rcx mov [rsp+arg_44], eax lea rdi, [rsp+arg_57] call __ZNSaIwED1Ev; std::allocator<wchar_t>::~allocator() jmp short loc_C6F46 mov rdi, [rsp+arg_8] mov rcx, rax mov eax, edx mov [rsp+arg_48], rcx mov [rsp+arg_44], eax call _ZN3fmt3v1019basic_memory_bufferIwLm500ESaIwEED2Ev; fmt::v10::basic_memory_buffer<wchar_t,500ul,std::allocator<wchar_t>>::~basic_memory_buffer() loc_C6F46: mov rdi, [rsp+arg_48] call __Unwind_Resume
long long fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(long long a1, long long a2, long long a3) { int v4; // [rsp+24h] [rbp-54h] BYREF long long v5; // [rsp+28h] [rbp-50h] __int128 v6; // [rsp+30h] [rbp-48h] char v7; // [rsp+5Fh] [rbp-19h] BYREF long long v8; // [rsp+60h] [rbp-18h] __int128 v9; // [rsp+68h] [rbp-10h] *(_QWORD *)&v9 = a2; *((_QWORD *)&v9 + 1) = a3; v8 = a1; std::allocator<wchar_t>::allocator(); fmt::v10::basic_memory_buffer<wchar_t,500ul,std::allocator<wchar_t>>::basic_memory_buffer(a1, &v7); std::allocator<wchar_t>::~allocator(&v7); v6 = v9; v5 = a1; fmt::v10::detail::for_each_codepoint<fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)::$_0>( v9, *((_QWORD *)&v9 + 1), a1); v4 = 0; return fmt::v10::detail::buffer<wchar_t>::push_back(a1, &v4); }
utf8_to_utf16: SUB RSP,0x78 MOV qword ptr [RSP + 0x68],RSI MOV qword ptr [RSP + 0x70],RDX MOV qword ptr [RSP + 0x60],RDI MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0x5f] MOV qword ptr [RSP + 0x18],RDI CALL 0x00115330 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x18] LAB_001c6ebb: CALL 0x001c8700 JMP 0x001c6ec2 LAB_001c6ec2: LEA RDI,[RSP + 0x5f] CALL 0x00115e00 MOV RAX,qword ptr [RSP + 0x8] MOVUPS XMM0,xmmword ptr [RSP + 0x68] MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x28] LAB_001c6eef: CALL 0x001c6f50 JMP 0x001c6ef6 LAB_001c6ef6: MOV RDI,qword ptr [RSP + 0x8] MOV dword ptr [RSP + 0x24],0x0 LEA RSI,[RSP + 0x24] CALL 0x001c8760 LAB_001c6f0d: JMP 0x001c6f0f LAB_001c6f0f: ADD RSP,0x78 RET
/* fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>) */ void __thiscall fmt::v10::detail::utf8_to_utf16::utf8_to_utf16 (utf8_to_utf16 *this,detail *param_2,int8 param_3) { wchar_t local_54; utf8_to_utf16 *local_50; int4 local_48; int4 uStack_44; int4 uStack_40; int4 uStack_3c; allocator<wchar_t> local_19; utf8_to_utf16 *local_18; int8 local_10; int8 uStack_8; local_18 = this; local_10 = param_2; uStack_8 = param_3; std::allocator<wchar_t>::allocator(); /* try { // try from 001c6ebb to 001c6ebf has its CatchHandler @ 001c6f14 */ basic_memory_buffer<wchar_t,500ul,std::allocator<wchar_t>>::basic_memory_buffer((allocator *)this) ; std::allocator<wchar_t>::~allocator(&local_19); local_48 = (int4)local_10; uStack_44 = local_10._4_4_; uStack_40 = (int4)uStack_8; uStack_3c = uStack_8._4_4_; local_50 = this; /* try { // try from 001c6eef to 001c6f0c has its CatchHandler @ 001c6f2e */ for_each_codepoint<fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)::__0> (local_10,uStack_8,this); local_54 = L'\0'; buffer<wchar_t>::push_back((buffer<wchar_t> *)this,&local_54); return; }
13,163
nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, 0>(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&)
llama.cpp/common/json.hpp
basic_json(const JsonRef& ref) : basic_json(ref.moved_or_copied()) {}
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, 0>(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&): pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x80640 movups (%r14), %xmm0 movups %xmm0, (%rbx) movq %r14, %rdi xorl %esi, %esi callq 0x72f4a movb $0x0, (%r14) movq $0x0, 0x8(%r14) movq %rbx, %rdi movl $0x1, %esi callq 0x72f4a movq %r14, %rdi xorl %esi, %esi callq 0x72f4a movq %r14, %rdi callq 0x78a98 addq $0x18, %rsp popq %rbx popq %r14 retq nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2INS0_6detail8json_refISD_EETnNSt9enable_ifIXsr6detail11conjunctionINSF_11is_json_refIT_EESt7is_sameINSK_10value_typeESD_EEE5valueEiE4typeELi0EEERKSK_: push r14 push rbx sub rsp, 18h mov rbx, rdi lea r14, [rsp+28h+var_20] mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15moved_or_copiedEv; nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::moved_or_copied(void) movups xmm0, xmmword ptr [r14] movups xmmword ptr [rbx], xmm0 mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov byte ptr [r14], 0 mov qword ptr [r14+8], 0 mov rdi, rbx mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() add rsp, 18h pop rbx pop r14 retn
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2INS0_6detail8json_refISD_EETnNSt9enable_ifIXsr6detail11conjunctionINSF_11is_json_refIT_EESt7is_sameINSK_10value_typeESD_EEE5valueEiE4typeELi0EEERKSK_( char *a1, long long a2) { _OWORD v3[2]; // [rsp+8h] [rbp-20h] BYREF nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::moved_or_copied( (unsigned __int8 *)v3, a2); *(_OWORD *)a1 = v3[0]; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v3); LOBYTE(v3[0]) = 0; *((_QWORD *)&v3[0] + 1) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(a1); nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v3); return nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v3); }
_ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2INS0_6detail8json_refISD_EETnNSt9enable_ifIXsr6detail11conjunctionINSF_11is_json_refIT_EESt7is_sameINSK_10value_typeESD_EEE5valueEiE4typeELi0EEERKSK_: PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RDI LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x00180640 MOVUPS XMM0,xmmword ptr [R14] MOVUPS xmmword ptr [RBX],XMM0 MOV RDI,R14 XOR ESI,ESI CALL 0x00172f4a MOV byte ptr [R14],0x0 MOV qword ptr [R14 + 0x8],0x0 MOV RDI,RBX MOV ESI,0x1 CALL 0x00172f4a MOV RDI,R14 XOR ESI,ESI CALL 0x00172f4a MOV RDI,R14 CALL 0x00178a98 ADD RSP,0x18 POP RBX POP R14 RET
void _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2INS0_6detail8json_refISD_EETnNSt9enable_ifIXsr6detail11conjunctionINSF_11is_json_refIT_EESt7is_sameINSK_10value_typeESD_EEE5valueEiE4typeELi0EEERKSK_ (int8 *param_1) { bool bVar1; data local_20; int7 uStack_1f; int8 uStack_18; nlohmann::json_abi_v3_11_3::detail:: json_ref<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::moved_or_copied(); *param_1 = CONCAT71(uStack_1f,local_20); param_1[1] = uStack_18; bVar1 = SUB81(&local_20,0); nlohmann::json_abi_v3_11_3:: basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar1); local_20 = (data)0x0; uStack_18 = 0; nlohmann::json_abi_v3_11_3:: basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(param_1,0)); nlohmann::json_abi_v3_11_3:: basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar1); nlohmann::json_abi_v3_11_3:: basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(&local_20); return; }
13,164
sp_get_linestring_mbr
eloqsql/storage/maria/ma_sp_key.c
static int sp_get_linestring_mbr(uchar *(*wkb), uchar *end, uint n_dims, uchar byte_order, double *mbr) { uint n_points; n_points = uint4korr(*wkb); (*wkb) += 4; for (; n_points > 0; --n_points) { /* Add next point to mbr */ if (sp_add_point_to_mbr(wkb, end, n_dims, byte_order, mbr)) return -1; } return 0; }
O3
c
sp_get_linestring_mbr: pushq %rbp movq %rsp, %rbp movq (%rdi), %rax movl (%rax), %ecx addq $0x4, %rax movq %rax, (%rdi) testl %ecx, %ecx je 0x723ea addq $-0x8, %rsi movb $0x1, %r8b xorl %r9d, %r9d movq (%rdi), %rax cmpq %rsi, %rax ja 0x723e3 movsd (%rax), %xmm0 addq $0x8, %rax movq %rax, (%rdi) movsd (%rdx,%r9), %xmm1 ucomisd %xmm0, %xmm1 jbe 0x723b6 movsd %xmm0, (%rdx,%r9) ucomisd 0x8(%rdx,%r9), %xmm0 jbe 0x723c9 orq $0x8, %r9 movsd %xmm0, (%rdx,%r9) movl $0x10, %r9d xorl %eax, %eax testb $0x1, %r8b movl $0x0, %r8d jne 0x72391 decl %ecx jne 0x7238b jmp 0x723ec movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x723ec xorl %eax, %eax popq %rbp retq
sp_get_linestring_mbr: push rbp mov rbp, rsp mov rax, [rdi] mov ecx, [rax] add rax, 4 mov [rdi], rax test ecx, ecx jz short loc_723EA add rsi, 0FFFFFFFFFFFFFFF8h loc_7238B: mov r8b, 1 xor r9d, r9d loc_72391: mov rax, [rdi] cmp rax, rsi ja short loc_723E3 movsd xmm0, qword ptr [rax] add rax, 8 mov [rdi], rax movsd xmm1, qword ptr [rdx+r9] ucomisd xmm1, xmm0 jbe short loc_723B6 movsd qword ptr [rdx+r9], xmm0 loc_723B6: ucomisd xmm0, qword ptr [rdx+r9+8] jbe short loc_723C9 or r9, 8 movsd qword ptr [rdx+r9], xmm0 loc_723C9: mov r9d, 10h xor eax, eax test r8b, 1 mov r8d, 0 jnz short loc_72391 dec ecx jnz short loc_7238B jmp short loc_723EC loc_723E3: mov eax, 0FFFFFFFFh jmp short loc_723EC loc_723EA: xor eax, eax loc_723EC: pop rbp retn
long long sp_get_linestring_mbr(double **a1, long long a2, long long a3) { int v3; // ecx unsigned long long v4; // rsi char v5; // r8 long long v6; // r9 double *v7; // rax double v8; // xmm0_8 long long result; // rax bool v10; // zf v3 = *(_DWORD *)*a1; *a1 = (double *)((char *)*a1 + 4); if ( !v3 ) return 0LL; v4 = a2 - 8; while ( 2 ) { v5 = 1; v6 = 0LL; do { v7 = *a1; if ( (unsigned long long)*a1 > v4 ) return 0xFFFFFFFFLL; v8 = *v7; *a1 = v7 + 1; if ( *(double *)(a3 + v6) > v8 ) *(double *)(a3 + v6) = v8; if ( v8 > *(double *)(a3 + v6 + 8) ) *(double *)(a3 + (v6 | 8)) = v8; v6 = 16LL; result = 0LL; v10 = (v5 & 1) == 0; v5 = 0; } while ( !v10 ); if ( --v3 ) continue; break; } return result; }
sp_get_linestring_mbr: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI] MOV ECX,dword ptr [RAX] ADD RAX,0x4 MOV qword ptr [RDI],RAX TEST ECX,ECX JZ 0x001723ea ADD RSI,-0x8 LAB_0017238b: MOV R8B,0x1 XOR R9D,R9D LAB_00172391: MOV RAX,qword ptr [RDI] CMP RAX,RSI JA 0x001723e3 MOVSD XMM0,qword ptr [RAX] ADD RAX,0x8 MOV qword ptr [RDI],RAX MOVSD XMM1,qword ptr [RDX + R9*0x1] UCOMISD XMM1,XMM0 JBE 0x001723b6 MOVSD qword ptr [RDX + R9*0x1],XMM0 LAB_001723b6: UCOMISD XMM0,qword ptr [RDX + R9*0x1 + 0x8] JBE 0x001723c9 OR R9,0x8 MOVSD qword ptr [RDX + R9*0x1],XMM0 LAB_001723c9: MOV R9D,0x10 XOR EAX,EAX TEST R8B,0x1 MOV R8D,0x0 JNZ 0x00172391 DEC ECX JNZ 0x0017238b JMP 0x001723ec LAB_001723e3: MOV EAX,0xffffffff JMP 0x001723ec LAB_001723ea: XOR EAX,EAX LAB_001723ec: POP RBP RET
int8 sp_get_linestring_mbr(int8 *param_1,long param_2,long param_3) { double dVar1; double *pdVar2; bool bVar3; int iVar4; bool bVar5; ulong uVar6; iVar4 = *(int *)*param_1; *param_1 = (int *)*param_1 + 1; if (iVar4 != 0) { do { uVar6 = 0; bVar3 = true; do { bVar5 = bVar3; pdVar2 = (double *)*param_1; if ((double *)(param_2 + -8) < pdVar2) { return 0xffffffff; } dVar1 = *pdVar2; *param_1 = pdVar2 + 1; if (dVar1 < *(double *)(param_3 + uVar6)) { *(double *)(param_3 + uVar6) = dVar1; } pdVar2 = (double *)(param_3 + 8 + uVar6); if (*pdVar2 <= dVar1 && dVar1 != *pdVar2) { *(double *)(param_3 + (uVar6 | 8)) = dVar1; } uVar6 = 0x10; bVar3 = false; } while (bVar5); iVar4 = iVar4 + -1; } while (iVar4 != 0); } return 0; }
13,165
google::protobuf::FileDescriptorTables::AddAliasUnderParent(void const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::Symbol)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
bool FileDescriptorTables::AddAliasUnderParent(const void* parent, const std::string& name, Symbol symbol) { GOOGLE_DCHECK_EQ(name, symbol.parent_name_key().second); GOOGLE_DCHECK_EQ(parent, symbol.parent_name_key().first); return symbols_by_parent_.insert(symbol).second; }
O0
cpp
google::protobuf::FileDescriptorTables::AddAliasUnderParent(void const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::Symbol): subq $0x158, %rsp # imm = 0x158 movq %rcx, 0x150(%rsp) movq %rdi, 0x148(%rsp) movq %rsi, 0x140(%rsp) movq %rdx, 0x138(%rsp) movq 0x148(%rsp), %rax movq %rax, 0x30(%rsp) xorl %eax, %eax testb $0x1, %al jne 0x33c6f jmp 0x33d97 movq 0x138(%rsp), %rsi leaq 0x128(%rsp), %rdi callq 0x30550 leaq 0x100(%rsp), %rdi leaq 0x150(%rsp), %rsi callq 0x73940 movq 0x108(%rsp), %rax movq %rax, 0x118(%rsp) movq 0x110(%rsp), %rax movq %rax, 0x120(%rsp) movq 0x128(%rsp), %rdi movq 0x130(%rsp), %rsi movq 0x118(%rsp), %rdx movq 0x120(%rsp), %rcx callq 0x73550 movb $0x0, 0xc7(%rsp) testb $0x1, %al jne 0x33cec jmp 0x33cee jmp 0x33d47 leaq 0x1b97df(%rip), %rdx # 0x1ed4d4 leaq 0xc8(%rsp), %rdi movq %rdi, 0x20(%rsp) movl $0x3, %esi movl $0x6da, %ecx # imm = 0x6DA callq 0x237e0 movq 0x20(%rsp), %rdi movb $0x1, 0xc7(%rsp) leaq 0x1b9a45(%rip), %rsi # 0x1ed76a callq 0x230a0 movq %rax, 0x28(%rsp) jmp 0x33d31 movq 0x28(%rsp), %rsi leaq 0xb3(%rsp), %rdi callq 0x23250 jmp 0x33d45 jmp 0x33d47 testb $0x1, 0xc7(%rsp) jne 0x33d53 jmp 0x33d60 leaq 0xc8(%rsp), %rdi callq 0x23820 jmp 0x33c64 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb8(%rsp) movl %eax, 0xb4(%rsp) testb $0x1, 0xc7(%rsp) jne 0x33d85 jmp 0x33d92 leaq 0xc8(%rsp), %rdi callq 0x23820 jmp 0x33eab jmp 0x33d99 xorl %eax, %eax testb $0x1, %al jne 0x33da4 jmp 0x33e70 movq 0x140(%rsp), %rax movq %rax, 0x18(%rsp) leaq 0x98(%rsp), %rdi leaq 0x150(%rsp), %rsi callq 0x73940 movq 0x18(%rsp), %rax movq 0x98(%rsp), %rcx movb $0x0, 0x5f(%rsp) cmpq %rcx, %rax jne 0x33ddf jmp 0x33e2f leaq 0x1b96ee(%rip), %rdx # 0x1ed4d4 leaq 0x60(%rsp), %rdi movq %rdi, 0x8(%rsp) movl $0x3, %esi movl $0x6db, %ecx # imm = 0x6DB callq 0x237e0 movq 0x8(%rsp), %rdi movb $0x1, 0x5f(%rsp) leaq 0x1b9996(%rip), %rsi # 0x1ed7a6 callq 0x230a0 movq %rax, 0x10(%rsp) jmp 0x33e1c movq 0x10(%rsp), %rsi leaq 0x5e(%rsp), %rdi callq 0x23250 jmp 0x33e2d jmp 0x33e2f testb $0x1, 0x5f(%rsp) jne 0x33e38 jmp 0x33e42 leaq 0x60(%rsp), %rdi callq 0x23820 jmp 0x33d99 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb8(%rsp) movl %eax, 0xb4(%rsp) testb $0x1, 0x5f(%rsp) jne 0x33e64 jmp 0x33e6e leaq 0x60(%rsp), %rdi callq 0x23820 jmp 0x33eab movq 0x30(%rsp), %rdi leaq 0x150(%rsp), %rsi callq 0x33ec0 movb %dl, 0x40(%rsp) movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x48(%rsp) movb 0x40(%rsp), %al movb %al, 0x50(%rsp) movb 0x50(%rsp), %al andb $0x1, %al addq $0x158, %rsp # imm = 0x158 retq movq 0xb8(%rsp), %rdi callq 0x13750 nopl (%rax,%rax)
_ZN6google8protobuf20FileDescriptorTables19AddAliasUnderParentEPKvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_6SymbolE: sub rsp, 158h mov [rsp+158h+var_8], rcx mov [rsp+158h+var_10], rdi mov [rsp+158h+var_18], rsi mov [rsp+158h+var_20], rdx mov rax, [rsp+158h+var_10] mov [rsp+158h+var_128], rax loc_33C64: xor eax, eax test al, 1 jnz short loc_33C6F jmp loc_33D97 loc_33C6F: mov rsi, [rsp+158h+var_20] lea rdi, [rsp+158h+var_30] call _ZN6google8protobuf20stringpiece_internal11StringPieceC2ISaIcEEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcET_EE; google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(std::string const&) lea rdi, [rsp+158h+var_58]; this lea rsi, [rsp+158h+var_8] call _ZNK6google8protobuf6Symbol15parent_name_keyEv; google::protobuf::Symbol::parent_name_key(void) mov rax, [rsp+158h+var_50] mov [rsp+158h+var_40], rax mov rax, [rsp+158h+var_48] mov [rsp+158h+var_38], rax mov rdi, [rsp+158h+var_30] mov rsi, [rsp+158h+var_28] mov rdx, [rsp+158h+var_40] mov rcx, [rsp+158h+var_38] call _ZN6google8protobuf20stringpiece_internaleqENS1_11StringPieceES2_; google::protobuf::stringpiece_internal::operator==(google::protobuf::stringpiece_internal::StringPiece,google::protobuf::stringpiece_internal::StringPiece) mov [rsp+158h+var_91], 0 test al, 1 jnz short loc_33CEC jmp short loc_33CEE loc_33CEC: jmp short loc_33D47 loc_33CEE: lea rdx, aWorkspaceLlm4b_4; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+158h+var_90] mov [rsp+158h+var_138], rdi mov esi, 3 mov ecx, 6DAh call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+158h+var_138] mov [rsp+158h+var_91], 1 lea rsi, aCheckFailedNam; "CHECK failed: (name) == (symbol.parent_"... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+158h+var_130], rax jmp short $+2 loc_33D31: mov rsi, [rsp+158h+var_130] lea rdi, [rsp+158h+var_A5] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_33D45: jmp short $+2 loc_33D47: test [rsp+158h+var_91], 1 jnz short loc_33D53 jmp short loc_33D60 loc_33D53: lea rdi, [rsp+158h+var_90]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_33D60: jmp loc_33C64 mov rcx, rax mov eax, edx mov [rsp+arg_B0], rcx mov [rsp+arg_AC], eax test [rsp+arg_BF], 1 jnz short loc_33D85 jmp short loc_33D92 loc_33D85: lea rdi, [rsp+arg_C0]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_33D92: jmp loc_33EAB loc_33D97: jmp short $+2 loc_33D99: xor eax, eax test al, 1 jnz short loc_33DA4 jmp loc_33E70 loc_33DA4: mov rax, [rsp+158h+var_18] mov [rsp+158h+var_140], rax lea rdi, [rsp+158h+var_C0]; this lea rsi, [rsp+158h+var_8] call _ZNK6google8protobuf6Symbol15parent_name_keyEv; google::protobuf::Symbol::parent_name_key(void) mov rax, [rsp+158h+var_140] mov rcx, [rsp+158h+var_C0] mov [rsp+158h+var_F9], 0 cmp rax, rcx jnz short loc_33DDF jmp short loc_33E2F loc_33DDF: lea rdx, aWorkspaceLlm4b_4; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+158h+var_F8] mov [rsp+158h+var_150], rdi mov esi, 3 mov ecx, 6DBh call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+158h+var_150] mov [rsp+158h+var_F9], 1 lea rsi, aCheckFailedPar; "CHECK failed: (parent) == (symbol.paren"... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+158h+var_148], rax jmp short $+2 loc_33E1C: mov rsi, [rsp+158h+var_148] lea rdi, [rsp+158h+var_FA] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_33E2D: jmp short $+2 loc_33E2F: test [rsp+158h+var_F9], 1 jnz short loc_33E38 jmp short loc_33E42 loc_33E38: lea rdi, [rsp+158h+var_F8]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_33E42: jmp loc_33D99 mov rcx, rax mov eax, edx mov [rsp+arg_B0], rcx mov [rsp+arg_AC], eax test [rsp+arg_57], 1 jnz short loc_33E64 jmp short loc_33E6E loc_33E64: lea rdi, [rsp+arg_58]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_33E6E: jmp short loc_33EAB loc_33E70: mov rdi, [rsp+158h+var_128] lea rsi, [rsp+158h+var_8] call _ZNSt13unordered_setIN6google8protobuf6SymbolENS1_12_GLOBAL__N_118SymbolByParentHashENS3_16SymbolByParentEqESaIS2_EE6insertERKS2_; std::unordered_set<google::protobuf::Symbol,google::protobuf::`anonymous namespace'::SymbolByParentHash,google::protobuf::`anonymous namespace'::SymbolByParentEq,std::allocator<google::protobuf::Symbol>>::insert(google::protobuf::Symbol const&) mov [rsp+158h+var_118], dl mov [rsp+158h+var_120], rax mov rax, [rsp+158h+var_120] mov [rsp+158h+var_110], rax mov al, [rsp+158h+var_118] mov [rsp+158h+var_108], al mov al, [rsp+158h+var_108] and al, 1 add rsp, 158h retn loc_33EAB: mov rdi, [rsp+arg_B0] call __Unwind_Resume
char google::protobuf::FileDescriptorTables::AddAliasUnderParent( long long a1, long long a2, long long a3, long long a4) { char v4; // dl long long v6; // [rsp+150h] [rbp-8h] BYREF v6 = a4; std::unordered_set<google::protobuf::Symbol,google::protobuf::`anonymous namespace'::SymbolByParentHash,google::protobuf::`anonymous namespace'::SymbolByParentEq,std::allocator<google::protobuf::Symbol>>::insert( a1, &v6); return v4 & 1; }
AddAliasUnderParent: SUB RSP,0x158 MOV qword ptr [RSP + 0x150],RCX MOV qword ptr [RSP + 0x148],RDI MOV qword ptr [RSP + 0x140],RSI MOV qword ptr [RSP + 0x138],RDX MOV RAX,qword ptr [RSP + 0x148] MOV qword ptr [RSP + 0x30],RAX LAB_00133c64: XOR EAX,EAX TEST AL,0x1 JNZ 0x00133c6f JMP 0x00133d97 LAB_00133c6f: MOV RSI,qword ptr [RSP + 0x138] LEA RDI,[RSP + 0x128] CALL 0x00130550 LEA RDI,[RSP + 0x100] LEA RSI,[RSP + 0x150] CALL 0x00173940 MOV RAX,qword ptr [RSP + 0x108] MOV qword ptr [RSP + 0x118],RAX MOV RAX,qword ptr [RSP + 0x110] MOV qword ptr [RSP + 0x120],RAX MOV RDI,qword ptr [RSP + 0x128] MOV RSI,qword ptr [RSP + 0x130] MOV RDX,qword ptr [RSP + 0x118] MOV RCX,qword ptr [RSP + 0x120] CALL 0x00173550 MOV byte ptr [RSP + 0xc7],0x0 TEST AL,0x1 JNZ 0x00133cec JMP 0x00133cee LAB_00133cec: JMP 0x00133d47 LAB_00133cee: LEA RDX,[0x2ed4d4] LEA RDI,[RSP + 0xc8] MOV qword ptr [RSP + 0x20],RDI MOV ESI,0x3 MOV ECX,0x6da CALL 0x001237e0 MOV RDI,qword ptr [RSP + 0x20] MOV byte ptr [RSP + 0xc7],0x1 LAB_00133d1e: LEA RSI,[0x2ed76a] CALL 0x001230a0 MOV qword ptr [RSP + 0x28],RAX JMP 0x00133d31 LAB_00133d31: MOV RSI,qword ptr [RSP + 0x28] LEA RDI,[RSP + 0xb3] CALL 0x00123250 LAB_00133d43: JMP 0x00133d45 LAB_00133d45: JMP 0x00133d47 LAB_00133d47: TEST byte ptr [RSP + 0xc7],0x1 JNZ 0x00133d53 JMP 0x00133d60 LAB_00133d53: LEA RDI,[RSP + 0xc8] CALL 0x00123820 LAB_00133d60: JMP 0x00133c64 LAB_00133d97: JMP 0x00133d99 LAB_00133d99: XOR EAX,EAX TEST AL,0x1 JNZ 0x00133da4 JMP 0x00133e70 LAB_00133da4: MOV RAX,qword ptr [RSP + 0x140] MOV qword ptr [RSP + 0x18],RAX LEA RDI,[RSP + 0x98] LEA RSI,[RSP + 0x150] CALL 0x00173940 MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x98] MOV byte ptr [RSP + 0x5f],0x0 CMP RAX,RCX JNZ 0x00133ddf JMP 0x00133e2f LAB_00133ddf: LEA RDX,[0x2ed4d4] LEA RDI,[RSP + 0x60] MOV qword ptr [RSP + 0x8],RDI MOV ESI,0x3 MOV ECX,0x6db CALL 0x001237e0 MOV RDI,qword ptr [RSP + 0x8] MOV byte ptr [RSP + 0x5f],0x1 LAB_00133e09: LEA RSI,[0x2ed7a6] CALL 0x001230a0 MOV qword ptr [RSP + 0x10],RAX JMP 0x00133e1c LAB_00133e1c: MOV RSI,qword ptr [RSP + 0x10] LEA RDI,[RSP + 0x5e] CALL 0x00123250 LAB_00133e2b: JMP 0x00133e2d LAB_00133e2d: JMP 0x00133e2f LAB_00133e2f: TEST byte ptr [RSP + 0x5f],0x1 JNZ 0x00133e38 JMP 0x00133e42 LAB_00133e38: LEA RDI,[RSP + 0x60] CALL 0x00123820 LAB_00133e42: JMP 0x00133d99 LAB_00133e70: MOV RDI,qword ptr [RSP + 0x30] LEA RSI,[RSP + 0x150] CALL 0x00133ec0 MOV byte ptr [RSP + 0x40],DL MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x48],RAX MOV AL,byte ptr [RSP + 0x40] MOV byte ptr [RSP + 0x50],AL MOV AL,byte ptr [RSP + 0x50] AND AL,0x1 ADD RSP,0x158 RET
/* WARNING: Removing unreachable block (ram,0x00133c6f) */ /* WARNING: Removing unreachable block (ram,0x00133cec) */ /* WARNING: Removing unreachable block (ram,0x00133cea) */ /* WARNING: Removing unreachable block (ram,0x00133d47) */ /* WARNING: Removing unreachable block (ram,0x00133d53) */ /* WARNING: Removing unreachable block (ram,0x00133d51) */ /* WARNING: Removing unreachable block (ram,0x00133d60) */ /* WARNING: Removing unreachable block (ram,0x00133da4) */ /* WARNING: Removing unreachable block (ram,0x00133ddf) */ /* WARNING: Removing unreachable block (ram,0x00133ddd) */ /* WARNING: Removing unreachable block (ram,0x00133e2f) */ /* WARNING: Removing unreachable block (ram,0x00133e38) */ /* WARNING: Removing unreachable block (ram,0x00133e36) */ /* WARNING: Removing unreachable block (ram,0x00133e42) */ /* google::protobuf::FileDescriptorTables::AddAliasUnderParent(void const*, std::__cxx11::string const&, google::protobuf::Symbol) */ ulong __thiscall google::protobuf::FileDescriptorTables::AddAliasUnderParent (FileDescriptorTables *this,int8 param_2,int8 param_3,int8 param_4) { int8 uVar1; int1 extraout_DL; int8 local_8; local_8 = param_4; uVar1 = std:: unordered_set<google::protobuf::Symbol,google::protobuf::(anonymous_namespace)::SymbolByParentHash,google::protobuf::(anonymous_namespace)::SymbolByParentEq,std::allocator<google::protobuf::Symbol>> ::insert((unordered_set<google::protobuf::Symbol,google::protobuf::(anonymous_namespace)::SymbolByParentHash,google::protobuf::(anonymous_namespace)::SymbolByParentEq,std::allocator<google::protobuf::Symbol>> *)this,(Symbol *)&local_8); return CONCAT71((int7)((ulong)uVar1 >> 8),extraout_DL) & 0xffffffffffffff01; }
13,166
bf_add_si
bluesky950520[P]quickjs/libbf.c
int bf_add_si(bf_t *r, const bf_t *a, int64_t b1, limb_t prec, bf_flags_t flags) { bf_t b; int ret; bf_init(r->ctx, &b); ret = bf_set_si(&b, b1); ret |= bf_add(r, a, &b, prec, flags); bf_delete(&b); return ret; }
O0
c
bf_add_si: subq $0x58, %rsp movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movq %rdx, 0x40(%rsp) movq %rcx, 0x38(%rsp) movl %r8d, 0x34(%rsp) movq 0x50(%rsp), %rax movq (%rax), %rdi leaq 0x8(%rsp), %rsi callq 0xe5f70 movq 0x40(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0xe61e0 movl %eax, 0x4(%rsp) movq 0x50(%rsp), %rdi movq 0x48(%rsp), %rsi movq 0x38(%rsp), %rcx movl 0x34(%rsp), %r8d leaq 0x8(%rsp), %rdx callq 0xea170 orl 0x4(%rsp), %eax movl %eax, 0x4(%rsp) leaq 0x8(%rsp), %rdi callq 0xe93d0 movl 0x4(%rsp), %eax addq $0x58, %rsp retq nopl (%rax,%rax)
bf_add_si: sub rsp, 58h mov [rsp+58h+var_8], rdi mov [rsp+58h+var_10], rsi mov [rsp+58h+var_18], rdx mov [rsp+58h+var_20], rcx mov [rsp+58h+var_24], r8d mov rax, [rsp+58h+var_8] mov rdi, [rax] lea rsi, [rsp+58h+var_50] call bf_init mov rsi, [rsp+58h+var_18] lea rdi, [rsp+58h+var_50] call bf_set_si mov [rsp+58h+var_54], eax mov rdi, [rsp+58h+var_8] mov rsi, [rsp+58h+var_10] mov rcx, [rsp+58h+var_20] mov r8d, [rsp+58h+var_24] lea rdx, [rsp+58h+var_50] call bf_add or eax, [rsp+58h+var_54] mov [rsp+58h+var_54], eax lea rdi, [rsp+58h+var_50] call bf_delete_0 mov eax, [rsp+58h+var_54] add rsp, 58h retn
long long bf_add_si(long long *a1, long long a2, long long a3, long long a4, unsigned int a5) { int v6; // [rsp+4h] [rbp-54h] unsigned int v7; // [rsp+4h] [rbp-54h] _BYTE v8[44]; // [rsp+8h] [rbp-50h] BYREF unsigned int v9; // [rsp+34h] [rbp-24h] long long v10; // [rsp+38h] [rbp-20h] long long v11; // [rsp+40h] [rbp-18h] long long v12; // [rsp+48h] [rbp-10h] long long *v13; // [rsp+50h] [rbp-8h] v13 = a1; v12 = a2; v11 = a3; v10 = a4; v9 = a5; bf_init(*a1, (long long)v8); v6 = bf_set_si((long long)v8, v11); v7 = v6 | bf_add(v13, v12, v8, v10, v9); bf_delete_0(v8); return v7; }
put_u64: MOV qword ptr [RSP + -0x8],RDI MOV qword ptr [RSP + -0x10],RSI MOV RAX,qword ptr [RSP + -0x8] MOV RCX,qword ptr [RSP + -0x10] MOV qword ptr [RAX],RCX RET
void put_u64(int8 *param_1,int8 param_2) { *param_1 = param_2; return; }
13,167
bf_add_si
bluesky950520[P]quickjs/libbf.c
int bf_add_si(bf_t *r, const bf_t *a, int64_t b1, limb_t prec, bf_flags_t flags) { bf_t b; int ret; bf_init(r->ctx, &b); ret = bf_set_si(&b, b1); ret |= bf_add(r, a, &b, prec, flags); bf_delete(&b); return ret; }
O2
c
bf_add_si: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %r8d, %ebx movq %rcx, %r14 movq %rsi, %r15 movq %rdi, %r12 movq (%rdi), %rax movq %rsp, %r13 movq %rax, (%r13) andl $0x0, 0x8(%r13) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, 0x10(%r13) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%r13) movq %r13, %rdi movq %rdx, %rsi callq 0x6f5ec movl %eax, %ebp movq %r12, %rdi movq %r15, %rsi movq %r13, %rdx movq %r14, %rcx movl %ebx, %r8d callq 0x71c49 movl %eax, %ebx orl %ebp, %ebx movq %r13, %rdi callq 0x7145e movl %ebx, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
bf_add_si: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov ebx, r8d mov r14, rcx mov r15, rsi mov r12, rdi mov rax, [rdi] mov r13, rsp mov [r13+0], rax and dword ptr [r13+8], 0 mov rax, 8000000000000000h mov [r13+10h], rax xorps xmm0, xmm0 movups xmmword ptr [r13+18h], xmm0 mov rdi, r13 mov rsi, rdx call bf_set_si mov ebp, eax mov rdi, r12 mov rsi, r15 mov rdx, r13 mov rcx, r14 mov r8d, ebx call bf_add mov ebx, eax or ebx, ebp mov rdi, r13 call bf_delete_0 mov eax, ebx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long bf_add_si(long long *a1, long long a2, signed long long a3, long long a4, unsigned int a5) { int v7; // ebp unsigned int v8; // ebx long long v10; // [rsp+0h] [rbp-58h] BYREF int v11; // [rsp+8h] [rbp-50h] unsigned long long v12; // [rsp+10h] [rbp-48h] __int128 v13; // [rsp+18h] [rbp-40h] v10 = *a1; v11 = 0; v12 = 0x8000000000000000LL; v13 = 0LL; v7 = bf_set_si((long long)&v10, a3); v8 = v7 | bf_add(a1, a2, &v10, a4, a5); bf_delete_0(&v10); return v8; }
bf_add_si: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBX,R8D MOV R14,RCX MOV R15,RSI MOV R12,RDI MOV RAX,qword ptr [RDI] MOV R13,RSP MOV qword ptr [R13],RAX AND dword ptr [R13 + 0x8],0x0 MOV RAX,-0x8000000000000000 MOV qword ptr [R13 + 0x10],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R13 + 0x18],XMM0 MOV RDI,R13 MOV RSI,RDX CALL 0x0016f5ec MOV EBP,EAX MOV RDI,R12 MOV RSI,R15 MOV RDX,R13 MOV RCX,R14 MOV R8D,EBX CALL 0x00171c49 MOV EBX,EAX OR EBX,EBP MOV RDI,R13 CALL 0x0017145e MOV EAX,EBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
uint bf_add_si(int8 *param_1,int8 param_2,int8 param_3,int8 param_4, int4 param_5) { uint uVar1; uint uVar2; int8 local_58; int4 local_50; int8 local_48; int8 local_40; int8 uStack_38; local_58 = *param_1; local_50 = 0; local_48 = 0x8000000000000000; local_40 = 0; uStack_38 = 0; uVar1 = bf_set_si(&local_58,param_3); uVar2 = bf_add(param_1,param_2,&local_58,param_4,param_5); bf_delete(&local_58); return uVar2 | uVar1; }
13,168
ma_alloc_buffer
eloqsql/storage/maria/ma_open.c
my_bool _ma_alloc_buffer(uchar **old_addr, size_t *old_size, size_t new_size, myf flag) { if (*old_size < new_size) { uchar *addr; if (!(addr= (uchar*) my_realloc(PSI_INSTRUMENT_ME, *old_addr, new_size, MYF(MY_ALLOW_ZERO_PTR | flag)))) return 1; *old_addr= addr; *old_size= new_size; } return 0; }
O3
c
ma_alloc_buffer: cmpq %rdx, (%rsi) jae 0x6e0a0 pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq (%rdi), %rsi orq $0x40, %rcx xorl %edi, %edi callq 0xa6508 testq %rax, %rax je 0x6e0a3 movq %rax, (%r15) movq %rbx, (%r14) xorl %eax, %eax jmp 0x6e0a5 xorl %eax, %eax retq movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_ma_alloc_buffer: cmp [rsi], rdx jnb short loc_6E0A0 push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdx mov r14, rsi mov r15, rdi mov rsi, [rdi] or rcx, 40h xor edi, edi call my_realloc test rax, rax jz short loc_6E0A3 mov [r15], rax mov [r14], rbx xor eax, eax jmp short loc_6E0A5 loc_6E0A0: xor eax, eax retn loc_6E0A3: mov al, 1 loc_6E0A5: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long ma_alloc_buffer( long long *a1, unsigned long long *a2, unsigned long long a3, long long a4, long long a5, long long a6) { long long v7; // rax if ( *a2 >= a3 ) return 0LL; v7 = my_realloc(0LL, *a1, a3, a4 | 0x40, a5, a6); if ( !v7 ) return 1LL; *a1 = v7; *a2 = a3; return 0LL; }
_ma_alloc_buffer: CMP qword ptr [RSI],RDX JNC 0x0016e0a0 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV RSI,qword ptr [RDI] OR RCX,0x40 XOR EDI,EDI CALL 0x001a6508 TEST RAX,RAX JZ 0x0016e0a3 MOV qword ptr [R15],RAX MOV qword ptr [R14],RBX XOR EAX,EAX JMP 0x0016e0a5 LAB_0016e0a0: XOR EAX,EAX RET LAB_0016e0a3: MOV AL,0x1 LAB_0016e0a5: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
bool _ma_alloc_buffer(long *param_1,ulong *param_2,ulong param_3,ulong param_4) { long lVar1; if (param_3 <= *param_2) { return false; } lVar1 = my_realloc(0,*param_1,param_3,param_4 | 0x40); if (lVar1 != 0) { *param_1 = lVar1; *param_2 = param_3; } return lVar1 == 0; }
13,169
allocate_dynamic
eloqsql/mysys/array.c
my_bool allocate_dynamic(DYNAMIC_ARRAY *array, uint max_elements) { DBUG_ENTER("allocate_dynamic"); if (max_elements >= array->max_element) { uint size; uchar *new_ptr; size= (max_elements + array->alloc_increment)/array->alloc_increment; size*= array->alloc_increment; if (array->malloc_flags & MY_INIT_BUFFER_USED) { /* In this senerio, the buffer is statically preallocated, so we have to create an all-new malloc since we overflowed */ if (!(new_ptr= (uchar *) my_malloc(array->m_psi_key, size * array->size_of_element, MYF(array->malloc_flags | MY_WME)))) DBUG_RETURN(0); memcpy(new_ptr, array->buffer, array->elements * array->size_of_element); array->malloc_flags&= ~MY_INIT_BUFFER_USED; } else if (!(new_ptr= (uchar*) my_realloc(array->m_psi_key, array->buffer,size * array->size_of_element, MYF(MY_WME | MY_ALLOW_ZERO_PTR | array->malloc_flags)))) DBUG_RETURN(TRUE); array->buffer= new_ptr; array->max_element= size; } DBUG_RETURN(FALSE); }
O3
c
allocate_dynamic: cmpl %esi, 0xc(%rdi) jbe 0x303e9 xorl %eax, %eax retq pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %esi, %ebx movq %rdi, %r14 movl 0x10(%rdi), %ecx movl 0x18(%rdi), %edi addl %ecx, %ebx movl %ebx, %eax xorl %edx, %edx divl %ecx subl %edx, %ebx movq 0x20(%r14), %rcx btl $0x8, %ecx jb 0x30431 movq (%r14), %rsi movl 0x14(%r14), %edx imull %ebx, %edx orq $0x50, %rcx callq 0x283ac movq %rax, %r15 testq %rax, %rax jne 0x30469 movb $0x1, %al jmp 0x30472 movl 0x14(%r14), %esi imull %ebx, %esi orq $0x10, %rcx movq %rcx, %rdx callq 0x28289 testq %rax, %rax je 0x30470 movq %rax, %r15 movq (%r14), %rsi movl 0x14(%r14), %edx imull 0x8(%r14), %edx movq %rax, %rdi callq 0x24240 movl $0xfffffeff, %eax # imm = 0xFFFFFEFF andq %rax, 0x20(%r14) movq %r15, (%r14) movl %ebx, 0xc(%r14) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
allocate_dynamic: cmp [rdi+0Ch], esi jbe short loc_303E9 xor eax, eax retn loc_303E9: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov ebx, esi mov r14, rdi mov ecx, [rdi+10h] mov edi, [rdi+18h] add ebx, ecx mov eax, ebx xor edx, edx div ecx sub ebx, edx mov rcx, [r14+20h] bt ecx, 8 jb short loc_30431 mov rsi, [r14] mov edx, [r14+14h] imul edx, ebx or rcx, 50h call my_realloc mov r15, rax test rax, rax jnz short loc_30469 mov al, 1 jmp short loc_30472 loc_30431: mov esi, [r14+14h] imul esi, ebx or rcx, 10h mov rdx, rcx call my_malloc test rax, rax jz short loc_30470 mov r15, rax mov rsi, [r14] mov edx, [r14+14h] imul edx, [r14+8] mov rdi, rax call _memcpy mov eax, 0FFFFFEFFh and [r14+20h], rax loc_30469: mov [r14], r15 mov [r14+0Ch], ebx loc_30470: xor eax, eax loc_30472: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long allocate_dynamic(long long *a1, unsigned int a2) { unsigned int v4; // ecx unsigned int v5; // edi unsigned int v6; // ebx long long v7; // rcx long long v8; // r15 long long v9; // rax if ( *((_DWORD *)a1 + 3) > a2 ) return 0LL; v4 = *((_DWORD *)a1 + 4); v5 = *((_DWORD *)a1 + 6); v6 = v4 + a2 - (v4 + a2) % v4; v7 = a1[4]; if ( (v7 & 0x100) == 0 ) { v8 = my_realloc(v5, *a1, v6 * *((_DWORD *)a1 + 5), (unsigned __int8)v7 | 0x50u); if ( !v8 ) return 1LL; goto LABEL_8; } v9 = my_malloc(v5, v6 * *((_DWORD *)a1 + 5), (unsigned int)v7 | 0x10); if ( v9 ) { v8 = v9; memcpy(v9, *a1, (unsigned int)(*((_DWORD *)a1 + 2) * *((_DWORD *)a1 + 5))); a1[4] &= 0xFFFFFEFFuLL; LABEL_8: *a1 = v8; *((_DWORD *)a1 + 3) = v6; } return 0LL; }
allocate_dynamic: CMP dword ptr [RDI + 0xc],ESI JBE 0x001303e9 XOR EAX,EAX RET LAB_001303e9: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBX,ESI MOV R14,RDI MOV ECX,dword ptr [RDI + 0x10] MOV EDI,dword ptr [RDI + 0x18] ADD EBX,ECX MOV EAX,EBX XOR EDX,EDX DIV ECX SUB EBX,EDX MOV RCX,qword ptr [R14 + 0x20] BT ECX,0x8 JC 0x00130431 MOV RSI,qword ptr [R14] MOV EDX,dword ptr [R14 + 0x14] IMUL EDX,EBX OR RCX,0x50 CALL 0x001283ac MOV R15,RAX TEST RAX,RAX JNZ 0x00130469 MOV AL,0x1 JMP 0x00130472 LAB_00130431: MOV ESI,dword ptr [R14 + 0x14] IMUL ESI,EBX OR RCX,0x10 MOV RDX,RCX CALL 0x00128289 TEST RAX,RAX JZ 0x00130470 MOV R15,RAX MOV RSI,qword ptr [R14] MOV EDX,dword ptr [R14 + 0x14] IMUL EDX,dword ptr [R14 + 0x8] MOV RDI,RAX CALL 0x00124240 MOV EAX,0xfffffeff AND qword ptr [R14 + 0x20],RAX LAB_00130469: MOV qword ptr [R14],R15 MOV dword ptr [R14 + 0xc],EBX LAB_00130470: XOR EAX,EAX LAB_00130472: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int8 allocate_dynamic(long *param_1,uint param_2) { ulong uVar1; void *__dest; int iVar2; if (param_2 < *(uint *)((long)param_1 + 0xc)) { return 0; } param_2 = param_2 + *(uint *)(param_1 + 2); iVar2 = param_2 - param_2 % *(uint *)(param_1 + 2); uVar1 = param_1[4]; if (((uint)uVar1 >> 8 & 1) == 0) { __dest = (void *)my_realloc((int)param_1[3],*param_1,*(int *)((long)param_1 + 0x14) * iVar2, uVar1 | 0x50); if (__dest == (void *)0x0) { return 1; } } else { __dest = (void *)my_malloc((int)param_1[3],*(int *)((long)param_1 + 0x14) * iVar2,uVar1 | 0x10); if (__dest == (void *)0x0) { return 0; } memcpy(__dest,(void *)*param_1,(ulong)(uint)(*(int *)((long)param_1 + 0x14) * (int)param_1[1])); param_1[4] = param_1[4] & 0xfffffeff; } *param_1 = (long)__dest; *(int *)((long)param_1 + 0xc) = iVar2; return 0; }
13,170
init_functions
eloqsql/mysys/mf_iocache.c
static void init_functions(IO_CACHE* info) { enum cache_type type= info->type; info->read_function = 0; /* Force a core if used */ info->write_function = 0; /* Force a core if used */ switch (type) { case READ_NET: /* Must be initialized by the caller. The problem is that _my_b_net_read has to be defined in sql directory because of the dependency on THD, and therefore cannot be visible to programs that link against mysys but know nothing about THD, such as myisamchk */ DBUG_ASSERT(!(info->myflags & MY_ENCRYPT)); break; case SEQ_READ_APPEND: info->read_function = _my_b_seq_read; DBUG_ASSERT(!(info->myflags & MY_ENCRYPT)); break; case READ_CACHE: if (info->myflags & MY_ENCRYPT) { DBUG_ASSERT(info->share == 0); info->read_function = _my_b_encr_read; break; } /* fall through */ case WRITE_CACHE: if (info->myflags & MY_ENCRYPT) { info->write_function = _my_b_encr_write; break; } /* fall through */ case READ_FIFO: DBUG_ASSERT(!(info->myflags & MY_ENCRYPT)); info->read_function = info->share ? _my_b_cache_read_r : _my_b_cache_read; info->write_function = info->share ? _my_b_cache_write_r : _my_b_cache_write; break; case TYPE_NOT_SET: DBUG_ASSERT(0); break; } if (type == READ_CACHE || type == WRITE_CACHE || type == SEQ_READ_APPEND) info->myflags|= MY_FULL_IO; else info->myflags&= ~MY_FULL_IO; }
O0
c
init_functions: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movl 0xb0(%rax), %eax movl %eax, -0xc(%rbp) movq -0x8(%rbp), %rax movq $0x0, 0xa0(%rax) movq -0x8(%rbp), %rax movq $0x0, 0xa8(%rax) movl -0xc(%rbp), %eax movq %rax, -0x18(%rbp) subq $0x5, %rax ja 0xe04d1 movq -0x18(%rbp), %rax leaq 0x793c9(%rip), %rcx # 0x1597a8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax jmp 0xe03ea jmp 0xe03ec jmp 0xe04d1 movq -0x8(%rbp), %rax leaq 0x1e94(%rip), %rcx # 0xe2290 movq %rcx, 0xa0(%rax) jmp 0xe0405 jmp 0xe04d1 movq -0x8(%rbp), %rax movq 0xf8(%rax), %rax andq $0x40, %rax cmpq $0x0, %rax je 0xe043d jmp 0xe0421 jmp 0xe0423 leaq 0xba230e(%rip), %rax # 0xc82738 movq (%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xa0(%rax) jmp 0xe04d1 jmp 0xe043f movq -0x8(%rbp), %rax movq 0xf8(%rax), %rax andq $0x40, %rax cmpq $0x0, %rax je 0xe046b leaq 0xba22e5(%rip), %rax # 0xc82740 movq (%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xa8(%rax) jmp 0xe04d1 jmp 0xe046d jmp 0xe046f jmp 0xe0471 movq -0x8(%rbp), %rax movq 0x98(%rax), %rdx leaq 0x224d(%rip), %rcx # 0xe26d0 leaq 0xd46(%rip), %rax # 0xe11d0 cmpq $0x0, %rdx cmovneq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0xa0(%rax) movq -0x8(%rbp), %rax movq 0x98(%rax), %rdx leaq 0x2661(%rip), %rcx # 0xe2b10 leaq 0x114a(%rip), %rax # 0xe1600 cmpq $0x0, %rdx cmovneq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0xa8(%rax) jmp 0xe04d1 jmp 0xe04cd jmp 0xe04cf jmp 0xe04d1 cmpl $0x1, -0xc(%rbp) je 0xe04e3 cmpl $0x2, -0xc(%rbp) je 0xe04e3 cmpl $0x3, -0xc(%rbp) jne 0xe04fe movq -0x8(%rbp), %rax movq 0xf8(%rax), %rcx orq $0x200, %rcx # imm = 0x200 movq %rcx, 0xf8(%rax) jmp 0xe051a movq -0x8(%rbp), %rax movabsq $0xfffffdff, %rcx # imm = 0xFFFFFDFF andq 0xf8(%rax), %rcx movq %rcx, 0xf8(%rax) popq %rbp retq nopl (%rax)
init_functions: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov eax, [rax+0B0h] mov [rbp+var_C], eax mov rax, [rbp+var_8] mov qword ptr [rax+0A0h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+0A8h], 0 mov eax, [rbp+var_C] mov [rbp+var_18], rax sub rax, 5; switch 6 cases ja def_E03E6; jumptable 00000000000E03E6 default case mov rax, [rbp+var_18] lea rcx, jpt_E03E6 movsxd rax, ds:(jpt_E03E6 - 1597A8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_E03E8: jmp short $+2; jumptable 00000000000E03E6 case 5 loc_E03EA: jmp short $+2 loc_E03EC: jmp def_E03E6; jumptable 00000000000E03E6 default case loc_E03F1: mov rax, [rbp+var_8]; jumptable 00000000000E03E6 case 3 lea rcx, _my_b_seq_read mov [rax+0A0h], rcx jmp short $+2 loc_E0405: jmp def_E03E6; jumptable 00000000000E03E6 default case loc_E040A: mov rax, [rbp+var_8]; jumptable 00000000000E03E6 case 1 mov rax, [rax+0F8h] and rax, 40h cmp rax, 0 jz short loc_E043D jmp short $+2 loc_E0421: jmp short $+2 loc_E0423: lea rax, _my_b_encr_read mov rcx, [rax] mov rax, [rbp+var_8] mov [rax+0A0h], rcx jmp def_E03E6; jumptable 00000000000E03E6 default case loc_E043D: jmp short $+2; jumptable 00000000000E03E6 case 2 loc_E043F: mov rax, [rbp+var_8]; jumptable 00000000000E03E6 case 2 mov rax, [rax+0F8h] and rax, 40h cmp rax, 0 jz short loc_E046B lea rax, _my_b_encr_write mov rcx, [rax] mov rax, [rbp+var_8] mov [rax+0A8h], rcx jmp short def_E03E6; jumptable 00000000000E03E6 default case loc_E046B: jmp short $+2; jumptable 00000000000E03E6 case 4 loc_E046D: jmp short $+2; jumptable 00000000000E03E6 case 4 loc_E046F: jmp short $+2 loc_E0471: mov rax, [rbp+var_8] mov rdx, [rax+98h] lea rcx, _my_b_cache_read lea rax, _my_b_cache_read_r cmp rdx, 0 cmovnz rcx, rax mov rax, [rbp+var_8] mov [rax+0A0h], rcx mov rax, [rbp+var_8] mov rdx, [rax+98h] lea rcx, _my_b_cache_write lea rax, _my_b_cache_write_r cmp rdx, 0 cmovnz rcx, rax mov rax, [rbp+var_8] mov [rax+0A8h], rcx jmp short def_E03E6; jumptable 00000000000E03E6 default case loc_E04CB: jmp short $+2; jumptable 00000000000E03E6 case 0 loc_E04CD: jmp short $+2 loc_E04CF: jmp short $+2; jumptable 00000000000E03E6 default case def_E03E6: cmp [rbp+var_C], 1; jumptable 00000000000E03E6 default case jz short loc_E04E3 cmp [rbp+var_C], 2 jz short loc_E04E3 cmp [rbp+var_C], 3 jnz short loc_E04FE loc_E04E3: mov rax, [rbp+var_8] mov rcx, [rax+0F8h] or rcx, 200h mov [rax+0F8h], rcx jmp short loc_E051A loc_E04FE: mov rax, [rbp+var_8] mov rcx, 0FFFFFDFFh and rcx, [rax+0F8h] mov [rax+0F8h], rcx loc_E051A: pop rbp retn
long long init_functions(long long a1) { long long ( *v1)(); // rcx long long ( *v2)(); // rcx long long result; // rax int v4; // [rsp+Ch] [rbp-Ch] v4 = *(_DWORD *)(a1 + 176); *(_QWORD *)(a1 + 160) = 0LL; *(_QWORD *)(a1 + 168) = 0LL; switch ( v4 ) { case 1: if ( (*(_QWORD *)(a1 + 248) & 0x40LL) == 0 ) goto LABEL_5; *(_QWORD *)(a1 + 160) = my_b_encr_read; break; case 2: LABEL_5: if ( (*(_QWORD *)(a1 + 248) & 0x40LL) == 0 ) goto LABEL_7; *(_QWORD *)(a1 + 168) = my_b_encr_write; break; case 3: *(_QWORD *)(a1 + 160) = my_b_seq_read; break; case 4: LABEL_7: v1 = my_b_cache_read; if ( *(_QWORD *)(a1 + 152) ) v1 = my_b_cache_read_r; *(_QWORD *)(a1 + 160) = v1; v2 = my_b_cache_write; if ( *(_QWORD *)(a1 + 152) ) v2 = my_b_cache_write_r; *(_QWORD *)(a1 + 168) = v2; break; default: break; } if ( v4 == 1 || v4 == 2 || v4 == 3 ) { result = a1; *(_QWORD *)(a1 + 248) |= 0x200uLL; } else { result = a1; *(_QWORD *)(a1 + 248) &= 0xFFFFFDFFuLL; } return result; }
init_functions: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0xb0] MOV dword ptr [RBP + -0xc],EAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa0],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa8],0x0 MOV EAX,dword ptr [RBP + -0xc] MOV qword ptr [RBP + -0x18],RAX SUB RAX,0x5 JA 0x001e04d1 MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[0x2597a8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_5: JMP 0x001e03ea LAB_001e03ea: JMP 0x001e03ec LAB_001e03ec: JMP 0x001e04d1 caseD_3: MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x1e2290] MOV qword ptr [RAX + 0xa0],RCX JMP 0x001e0405 LAB_001e0405: JMP 0x001e04d1 caseD_1: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xf8] AND RAX,0x40 CMP RAX,0x0 JZ 0x001e043d JMP 0x001e0421 LAB_001e0421: JMP 0x001e0423 LAB_001e0423: LEA RAX,[0xd82738] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa0],RCX JMP 0x001e04d1 LAB_001e043d: JMP 0x001e043f caseD_2: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xf8] AND RAX,0x40 CMP RAX,0x0 JZ 0x001e046b LEA RAX,[0xd82740] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa8],RCX JMP 0x001e04d1 LAB_001e046b: JMP 0x001e046d caseD_4: JMP 0x001e046f LAB_001e046f: JMP 0x001e0471 LAB_001e0471: MOV RAX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RAX + 0x98] LEA RCX,[0x1e26d0] LEA RAX,[0x1e11d0] CMP RDX,0x0 CMOVNZ RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa0],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RAX + 0x98] LEA RCX,[0x1e2b10] LEA RAX,[0x1e1600] CMP RDX,0x0 CMOVNZ RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa8],RCX JMP 0x001e04d1 caseD_0: JMP 0x001e04cd LAB_001e04cd: JMP 0x001e04cf LAB_001e04cf: JMP 0x001e04d1 default: CMP dword ptr [RBP + -0xc],0x1 JZ 0x001e04e3 CMP dword ptr [RBP + -0xc],0x2 JZ 0x001e04e3 CMP dword ptr [RBP + -0xc],0x3 JNZ 0x001e04fe LAB_001e04e3: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0xf8] OR RCX,0x200 MOV qword ptr [RAX + 0xf8],RCX JMP 0x001e051a LAB_001e04fe: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,0xfffffdff AND RCX,qword ptr [RAX + 0xf8] MOV qword ptr [RAX + 0xf8],RCX LAB_001e051a: POP RBP RET
void init_functions(long param_1) { int iVar1; code *pcVar2; iVar1 = *(int *)(param_1 + 0xb0); *(int8 *)(param_1 + 0xa0) = 0; *(int8 *)(param_1 + 0xa8) = 0; switch(iVar1) { case 0: break; case 1: if ((*(ulong *)(param_1 + 0xf8) & 0x40) != 0) { *(int8 *)(param_1 + 0xa0) = _my_b_encr_read; break; } case 2: if ((*(ulong *)(param_1 + 0xf8) & 0x40) == 0) { LAB_001e0471: pcVar2 = _my_b_cache_read; if (*(long *)(param_1 + 0x98) != 0) { pcVar2 = _my_b_cache_read_r; } *(code **)(param_1 + 0xa0) = pcVar2; pcVar2 = _my_b_cache_write; if (*(long *)(param_1 + 0x98) != 0) { pcVar2 = _my_b_cache_write_r; } *(code **)(param_1 + 0xa8) = pcVar2; } else { *(int8 *)(param_1 + 0xa8) = _my_b_encr_write; } break; case 3: *(code **)(param_1 + 0xa0) = _my_b_seq_read; break; case 4: goto LAB_001e0471; case 5: } if (((iVar1 == 1) || (iVar1 == 2)) || (iVar1 == 3)) { *(ulong *)(param_1 + 0xf8) = *(ulong *)(param_1 + 0xf8) | 0x200; } else { *(ulong *)(param_1 + 0xf8) = *(ulong *)(param_1 + 0xf8) & 0xfffffdff; } return; }
13,171
r3d_shader_load_screen_tonemap
r3d/src/r3d_state.c
void r3d_shader_load_screen_tonemap(void) { R3D.shader.screen.tonemap.id = rlLoadShaderCode( VS_COMMON_SCREEN, FS_SCREEN_TONEMAP ); r3d_shader_get_location(screen.tonemap, uTexColor); r3d_shader_get_location(screen.tonemap, uTonemapMode); r3d_shader_get_location(screen.tonemap, uTonemapExposure); r3d_shader_get_location(screen.tonemap, uTonemapWhite); r3d_shader_enable(screen.tonemap); r3d_shader_set_sampler2D_slot(screen.tonemap, uTexColor, 0); r3d_shader_disable(); }
O3
c
r3d_shader_load_screen_tonemap: pushq %rbp movq %rsp, %rbp leaq 0x55e2f(%rip), %rdi # 0x118db0 leaq 0x5e5d8(%rip), %rsi # 0x121560 callq 0x1e60d movl %eax, 0xee431(%rip) # 0x1b13c4 leaq 0x4e3ed(%rip), %rsi # 0x111387 movl %eax, %edi callq 0x1ea66 movl %eax, 0xee425(%rip) # 0x1b13cc movl 0xee417(%rip), %edi # 0x1b13c4 leaq 0x4e437(%rip), %rsi # 0x1113eb callq 0x1ea66 movl %eax, 0xee415(%rip) # 0x1b13d4 movl 0xee3ff(%rip), %edi # 0x1b13c4 leaq 0x4e42c(%rip), %rsi # 0x1113f8 callq 0x1ea66 movl %eax, 0xee405(%rip) # 0x1b13dc movl 0xee3e7(%rip), %edi # 0x1b13c4 leaq 0x4e425(%rip), %rsi # 0x111409 callq 0x1ea66 movl %eax, 0xee3f5(%rip) # 0x1b13e4 movl 0xee3cf(%rip), %edi # 0x1b13c4 callq 0x1be92 cmpl $0x0, 0xee3c7(%rip) # 0x1b13c8 je 0xc3029 movl $0x0, 0xee3bb(%rip) # 0x1b13c8 leaq 0xee3b4(%rip), %rsi # 0x1b13c8 movl 0xee3b2(%rip), %edi # 0x1b13cc movl $0x4, %edx movl $0x1, %ecx callq 0x1ea82 popq %rbp jmp 0x1be9d
r3d_shader_load_screen_tonemap: push rbp mov rbp, rsp lea rdi, VS_COMMON_SCREEN; "#version 330 core\nconst vec2 a[3]=vec2"... lea rsi, FS_SCREEN_TONEMAP; "#version 330 core\n#define TONEMAP_LINE"... call rlLoadShaderCode mov cs:dword_1B13C4, eax lea rsi, aUtexcolor; "uTexColor" mov edi, eax call rlGetLocationUniform mov cs:dword_1B13CC, eax mov edi, cs:dword_1B13C4 lea rsi, aUtonemapmode; "uTonemapMode" call rlGetLocationUniform mov cs:dword_1B13D4, eax mov edi, cs:dword_1B13C4 lea rsi, aUtonemapexposu; "uTonemapExposure" call rlGetLocationUniform mov cs:dword_1B13DC, eax mov edi, cs:dword_1B13C4 lea rsi, aUtonemapwhite; "uTonemapWhite" call rlGetLocationUniform mov cs:dword_1B13E4, eax mov edi, cs:dword_1B13C4 call rlEnableShader cmp cs:dword_1B13C8, 0 jz short loc_C3029 mov cs:dword_1B13C8, 0 lea rsi, dword_1B13C8 mov edi, cs:dword_1B13CC mov edx, 4 mov ecx, 1 call rlSetUniform loc_C3029: pop rbp jmp rlDisableShader
long long r3d_shader_load_screen_tonemap() { int v0; // r8d int v1; // r9d dword_1B13C4 = rlLoadShaderCode( (long long)"#version 330 core\n" "const vec2 a[3]=vec2[](vec2(-1.0,-1.0),vec2(3.0,-1.0),vec2(-1.0,3.0));noperspective out vec2" " vTexCoord;void main(){gl_Position=vec4(a[gl_VertexID],0.0,1.0);vTexCoord=(gl_Position.xy*0.5)+0.5;}", (long long)"#version 330 core\n" "#define TONEMAP_LINEAR 0\n" "#define TONEMAP_REINHARD 1\n" "#define TONEMAP_FILMIC 2\n" "#define TONEMAP_ACES 3\n" "#define TONEMAP_AGX 4\n" "noperspective in vec2 vTexCoord;uniform sampler2D uTexColor;uniform lowp int uTonemapMode;un" "iform float uTonemapExposure;uniform float uTonemapWhite;out vec4 a;vec3 TonemapReinhard(vec" "3 c,float pWhite){float l=pWhite*pWhite;vec3 m=l*c;return(m+c*c)/(m+l);}vec3 TonemapFilmic(v" "ec3 c,float pWhite){const float e=2.0f;const float A=0.22f*e*e;const float B=0.30f*e;const f" "loat C=0.10f;const float D=0.20f;const float E=0.01f;const float F=0.30f;vec3 d=((c*(A*c+C*B" ")+D*E)/(c*(A*c+B)+D*F))-E/F;float pWhiteTonemapped=((pWhite*(A*pWhite+C*B)+D*E)/(pWhite*(A*p" "White+B)+D*F))-E/F;return d/pWhiteTonemapped;}vec3 TonemapACES(vec3 c,float pWhite){const fl" "oat e=1.8f;const float A=0.0245786f;const float B=0.000090537f;const float C=0.983729f;const" " float D=0.432951f;const float E=0.238081f;const mat3 j=mat3(vec3(0.59719f*e,0.35458f*e,0.04" "823f*e),vec3(0.07600f*e,0.90834f*e,0.01566f*e),vec3(0.02840f*e,0.13383f*e,0.83777f*e));const" " mat3 h=mat3(vec3(1.60475f,-0.53108f,-0.07367f),vec3(-0.10208f,1.10813f,-0.00605f),vec3(-0.0" "0327f,-0.07276f,1.07602f));c*=j;vec3 d=(c*(c+A)-B)/(c*(C*c+D)+E);d*=h;pWhite*=e;float pWhite" "Tonemapped=(pWhite*(pWhite+A)-B)/(pWhite*(C*pWhite+D)+E);return d/pWhiteTonemapped;}vec3 AgX" "ContrastApprox(vec3 n){vec3 o=n*n;vec3 p=o*o;return 0.021*n+4.0111*o-25.682*o*n+70.359*p-74." "778*p*n+27.069*p*o;}vec3 TonemapAgX(vec3 c){const mat3 k=mat3(0.54490813676363087053,0.14044" "005884001287035,0.088827411851915368603,0.37377945959812267119,0.75410959864013760045,0.1788" "7712465043811023,0.081384976686407536266,0.10543358536857773485,0.73224999956948382528);cons" "t mat3 b=mat3(1.9645509602733325934,-0.29932243390911083839,-0.16436833806080403409,-0.85585" "845117807513559,1.3264510741502356555,-0.23822464068860595117,-0.10886710826831608324,-0.027" "084020983874825605,1.402665347143271889);const float g=-12.4739311883324;const float f=4.026" "06881166759;c=max(c,2e-10);c=k*c;c=clamp(log2(c),g,f);c=(c-g)/(f-g);c=AgXContrastApprox(c);c" "=pow(c,vec3(2.4));c=b*c;return c;}vec3 Tonemapping(vec3 c,float pWhite){if(uTonemapMode==TON" "EMAP_REINHARD)return TonemapReinhard(max(vec3(0.0f),c),pWhite);if(uTonemapMode==TONEMAP_FILM" "IC)return TonemapFilmic(max(vec3(0.0f),c),pWhite);if(uTonemapMode==TONEMAP_ACES)return Tonem" "apACES(max(vec3(0.0f),c),pWhite);if(uTonemapMode==TONEMAP_AGX)return TonemapAgX(c);return c;" "}void main(){vec3 i=texture(uTexColor,vTexCoord).rgb;i*=uTonemapExposure;i=Tonemapping(i,uTo" "nemapWhite);a=vec4(i,1.0);}"); dword_1B13CC = rlGetLocationUniform((unsigned int)dword_1B13C4, (long long)"uTexColor"); dword_1B13D4 = rlGetLocationUniform((unsigned int)dword_1B13C4, (long long)"uTonemapMode"); dword_1B13DC = rlGetLocationUniform((unsigned int)dword_1B13C4, (long long)"uTonemapExposure"); dword_1B13E4 = rlGetLocationUniform((unsigned int)dword_1B13C4, (long long)"uTonemapWhite"); rlEnableShader((unsigned int)dword_1B13C4); if ( dword_1B13C8 ) { dword_1B13C8 = 0; rlSetUniform((unsigned int)dword_1B13CC, (long long)&dword_1B13C8, 4, 1u, v0, v1); } return rlDisableShader(); }
r3d_shader_load_screen_tonemap: PUSH RBP MOV RBP,RSP LEA RDI,[0x218db0] LEA RSI,[0x221560] CALL 0x0011e60d MOV dword ptr [0x002b13c4],EAX LEA RSI,[0x211387] MOV EDI,EAX CALL 0x0011ea66 MOV dword ptr [0x002b13cc],EAX MOV EDI,dword ptr [0x002b13c4] LEA RSI,[0x2113eb] CALL 0x0011ea66 MOV dword ptr [0x002b13d4],EAX MOV EDI,dword ptr [0x002b13c4] LEA RSI,[0x2113f8] CALL 0x0011ea66 MOV dword ptr [0x002b13dc],EAX MOV EDI,dword ptr [0x002b13c4] LEA RSI,[0x211409] CALL 0x0011ea66 MOV dword ptr [0x002b13e4],EAX MOV EDI,dword ptr [0x002b13c4] CALL 0x0011be92 CMP dword ptr [0x002b13c8],0x0 JZ 0x001c3029 MOV dword ptr [0x002b13c8],0x0 LEA RSI,[0x2b13c8] MOV EDI,dword ptr [0x002b13cc] MOV EDX,0x4 MOV ECX,0x1 CALL 0x0011ea82 LAB_001c3029: POP RBP JMP 0x0011be9d
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void r3d_shader_load_screen_tonemap(void) { DAT_002b13c4 = rlLoadShaderCode("#version 330 core\nconst vec2 a[3]=vec2[](vec2(-1.0,-1.0),vec2(3.0,-1.0),vec2(-1.0,3.0));noperspective out vec2 vTexCoord;void main(){gl_Position=vec4(a[gl_VertexID],0.0,1.0);vTexCoord=(gl_Position.xy*0.5)+0.5;}" , "#version 330 core\n#define TONEMAP_LINEAR 0\n#define TONEMAP_REINHARD 1\n#define TONEMAP_FILMIC 2\n#define TONEMAP_ACES 3\n#define TONEMAP_AGX 4\nnoperspective in vec2 vTexCoord;uniform sampler2D uTexColor;uniform lowp int uTonemapMode;uniform float uTonemapExposure;uniform float uTonemapWhite;out vec4 a;vec3 TonemapReinhard(vec3 c,float pWhite){float l=pWhite*pWhite;vec3 m=l*c;return(m+c*c)/(m+l);}vec3 TonemapFilmic(vec3 c,float pWhite){const float e=2.0f;const float A=0.22f*e*e;const float B=0.30f*e;const float C=0.10f;const float D=0.20f;const float E=0.01f;const float F=0.30f;vec3 d=((c*(A*c+C*B)+D*E)/(c*(A*c+B)+D*F))-E/F;float pWhiteTonemapped=((pWhite*(A*pWhite+C*B)+D*E)/(pWhite*(A*pWhite+B)+D*F))-E/F;return d/pWhiteTonemapped;}vec3 TonemapACES(vec3 c,float pWhite){const float e=1.8f;const float A=0.0245786f;const float B=0.000090537f;const float C=0.983729f;const float D=0.432951f;const float E=0.238081f;const mat3 j=mat3(vec3(0.59719f*e,0.35458f*e,0.04823f*e),vec3(0.07600f*e,0.90834f*e,0.01566f*e),vec3(0.02840f*e,0.13383f*e,0.83777f*e));const mat3 h=mat3(vec3(1.60475f,-0.53108f,-0.07367f),vec3(-0.10208f,1.10813f,-0.00605f),vec3(-0.00327f,-0.07276f,1.07602f));c*=j;vec3 d=(c*(c+A)-B)/(c*(C*c+D)+E);d*=h;pWhite*=e;float pWhiteTonemapped=(pWhite*(pWhite+A)-B)/(pWhite*(C*pWhite+D)+E);return d/pWhiteTonemapped;}vec3 AgXContrastApprox(vec3 n){vec3 o=n*n;vec3 p=o*o;return 0.021*n+4.0111*o-25.682*o*n+70.359*p-74.778*p*n+27.069*p*o;}vec3 TonemapAgX(vec3 c){const mat3 k=mat3(0.54490813676363087053,0.14044005884001287035,0.088827411851915368603,0.37377945959812267119,0.75410959864013760045,0.17887712465043811023,0.081384976686407536266,0.10543358536857773485,0.73224999956948382528);const mat3 b=mat3(1.9645509602733325934,-0.29932243390911083839,-0.16436833806080403409,-0.85585845117807513559,1.3264510741502356555,-0.23822464068860595117,-0.10886710826831608324,-0.027084020983874825605,1.402665347143271889);const float g=-12.4739311883324;const float f=4.02606881166759;c=max(c,2e-10);c=k*c;c=clamp(log2(c),g,f);c=(c-g)/(f-g);..." /* TRUNCATED STRING LITERAL */ ); _DAT_002b13cc = rlGetLocationUniform(DAT_002b13c4,"uTexColor"); _DAT_002b13d4 = rlGetLocationUniform(DAT_002b13c4,"uTonemapMode"); _DAT_002b13dc = rlGetLocationUniform(DAT_002b13c4,"uTonemapExposure"); _DAT_002b13e4 = rlGetLocationUniform(DAT_002b13c4,"uTonemapWhite"); rlEnableShader(DAT_002b13c4); if (_DAT_002b13c8 != 0) { _DAT_002b13c8 = 0; rlSetUniform(_DAT_002b13cc,&DAT_002b13c8,4,1); } rlDisableShader(); return; }
13,172
mysql_free_result_cont
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_free_result_cont(MYSQL_RES *result, int ready_status) { MK_ASYNC_CONT_BODY_VOID_RETURN(result->handle) }
O3
c
mysql_free_result_cont: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx movq 0x78(%rdi), %rax movq 0x480(%rax), %rcx movq 0x28(%rcx), %r14 cmpb $0x0, 0x15(%r14) je 0x5891b movb $0x1, 0x14(%r14) movl %esi, 0x4(%r14) leaq 0x38(%r14), %rdi callq 0x5c6c7 movb $0x0, 0x14(%r14) testl %eax, %eax jle 0x5897b movl (%r14), %r14d jmp 0x58987 movl $0x7de, 0x90(%rax) # imm = 0x7DE movl $0x297, %edi # imm = 0x297 addq 0x78(%rbx), %rdi leaq 0x2f4c4b(%rip), %rax # 0x34d580 movq (%rax), %rsi movl $0x5, %edx callq 0x37130 movq 0x78(%rbx), %rax xorl %r14d, %r14d movb %r14b, 0x29c(%rax) movl $0x97, %edi addq 0x78(%rbx), %rdi leaq 0x2f4c30(%rip), %rax # 0x34d590 movq 0x70(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x37130 movq 0x78(%rbx), %rax movb %r14b, 0x296(%rax) jmp 0x58987 movb $0x0, 0x15(%r14) xorl %r14d, %r14d testl %eax, %eax js 0x5898f movl %r14d, %eax popq %rbx popq %r14 popq %rbp retq movq 0x78(%rbx), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movl $0x297, %edi # imm = 0x297 addq 0x78(%rbx), %rdi leaq 0x2f4bd3(%rip), %rax # 0x34d580 movq (%rax), %rsi movl $0x5, %edx callq 0x37130 movq 0x78(%rbx), %rax xorl %r14d, %r14d movb %r14b, 0x29c(%rax) movl $0x97, %edi addq 0x78(%rbx), %rdi leaq 0x2f4bb8(%rip), %rax # 0x34d590 movq 0x40(%rax), %rsi jmp 0x58964
mysql_free_result_cont: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi mov rax, [rdi+78h] mov rcx, [rax+480h] mov r14, [rcx+28h] cmp byte ptr [r14+15h], 0 jz short loc_5891B mov byte ptr [r14+14h], 1 mov [r14+4], esi lea rdi, [r14+38h] call my_context_continue mov byte ptr [r14+14h], 0 test eax, eax jle short loc_5897B mov r14d, [r14] jmp short loc_58987 loc_5891B: mov dword ptr [rax+90h], 7DEh mov edi, 297h add rdi, [rbx+78h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbx+78h] xor r14d, r14d mov [rax+29Ch], r14b mov edi, 97h add rdi, [rbx+78h] lea rax, client_errors mov rsi, [rax+70h] loc_58964: mov edx, 1FFh call _strncpy mov rax, [rbx+78h] mov [rax+296h], r14b jmp short loc_58987 loc_5897B: mov byte ptr [r14+15h], 0 xor r14d, r14d test eax, eax js short loc_5898F loc_58987: mov eax, r14d pop rbx pop r14 pop rbp retn loc_5898F: mov rax, [rbx+78h] mov dword ptr [rax+90h], 7D8h mov edi, 297h add rdi, [rbx+78h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbx+78h] xor r14d, r14d mov [rax+29Ch], r14b mov edi, 97h add rdi, [rbx+78h] lea rax, client_errors mov rsi, [rax+40h] jmp short loc_58964
long long mysql_free_result_cont(long long a1, unsigned int a2) { long long v3; // rax unsigned int *v4; // r14 int v5; // eax unsigned int v6; // r14d long long v7; // rdi char *v8; // rsi v3 = *(_QWORD *)(a1 + 120); v4 = *(unsigned int **)(*(_QWORD *)(v3 + 1152) + 40LL); if ( !*((_BYTE *)v4 + 21) ) { *(_DWORD *)(v3 + 144) = 2014; strncpy(*(_QWORD *)(a1 + 120) + 663LL, SQLSTATE_UNKNOWN, 5LL); v6 = 0; *(_BYTE *)(*(_QWORD *)(a1 + 120) + 668LL) = 0; v7 = *(_QWORD *)(a1 + 120) + 151LL; v8 = client_errors[14]; LABEL_5: strncpy(v7, v8, 511LL); *(_BYTE *)(*(_QWORD *)(a1 + 120) + 662LL) = 0; return v6; } *((_BYTE *)v4 + 20) = 1; v4[1] = a2; v5 = my_context_continue(v4 + 14); *((_BYTE *)v4 + 20) = 0; if ( v5 <= 0 ) { *((_BYTE *)v4 + 21) = 0; v6 = 0; if ( v5 >= 0 ) return v6; *(_DWORD *)(*(_QWORD *)(a1 + 120) + 144LL) = 2008; strncpy(*(_QWORD *)(a1 + 120) + 663LL, SQLSTATE_UNKNOWN, 5LL); v6 = 0; *(_BYTE *)(*(_QWORD *)(a1 + 120) + 668LL) = 0; v7 = *(_QWORD *)(a1 + 120) + 151LL; v8 = client_errors[8]; goto LABEL_5; } return *v4; }
mysql_free_result_cont: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x78] MOV RCX,qword ptr [RAX + 0x480] MOV R14,qword ptr [RCX + 0x28] CMP byte ptr [R14 + 0x15],0x0 JZ 0x0015891b MOV byte ptr [R14 + 0x14],0x1 MOV dword ptr [R14 + 0x4],ESI LEA RDI,[R14 + 0x38] CALL 0x0015c6c7 MOV byte ptr [R14 + 0x14],0x0 TEST EAX,EAX JLE 0x0015897b MOV R14D,dword ptr [R14] JMP 0x00158987 LAB_0015891b: MOV dword ptr [RAX + 0x90],0x7de MOV EDI,0x297 ADD RDI,qword ptr [RBX + 0x78] LEA RAX,[0x44d580] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00137130 MOV RAX,qword ptr [RBX + 0x78] XOR R14D,R14D MOV byte ptr [RAX + 0x29c],R14B MOV EDI,0x97 ADD RDI,qword ptr [RBX + 0x78] LEA RAX,[0x44d590] MOV RSI,qword ptr [RAX + 0x70] LAB_00158964: MOV EDX,0x1ff CALL 0x00137130 MOV RAX,qword ptr [RBX + 0x78] MOV byte ptr [RAX + 0x296],R14B JMP 0x00158987 LAB_0015897b: MOV byte ptr [R14 + 0x15],0x0 XOR R14D,R14D TEST EAX,EAX JS 0x0015898f LAB_00158987: MOV EAX,R14D POP RBX POP R14 POP RBP RET LAB_0015898f: MOV RAX,qword ptr [RBX + 0x78] MOV dword ptr [RAX + 0x90],0x7d8 MOV EDI,0x297 ADD RDI,qword ptr [RBX + 0x78] LEA RAX,[0x44d580] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00137130 MOV RAX,qword ptr [RBX + 0x78] XOR R14D,R14D MOV byte ptr [RAX + 0x29c],R14B MOV EDI,0x97 ADD RDI,qword ptr [RBX + 0x78] LEA RAX,[0x44d590] MOV RSI,qword ptr [RAX + 0x40] JMP 0x00158964
int4 mysql_free_result_cont(long param_1,int4 param_2) { int4 *puVar1; long lVar2; int iVar3; char *__src; puVar1 = *(int4 **)(*(long *)(*(long *)(param_1 + 0x78) + 0x480) + 0x28); if (*(char *)((long)puVar1 + 0x15) == '\0') { *(int4 *)(*(long *)(param_1 + 0x78) + 0x90) = 0x7de; strncpy((char *)(*(long *)(param_1 + 0x78) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(param_1 + 0x78) + 0x29c) = 0; lVar2 = *(long *)(param_1 + 0x78); __src = PTR_s_Commands_out_of_sync__you_can_t_r_0044d600; } else { *(int1 *)(puVar1 + 5) = 1; puVar1[1] = param_2; iVar3 = my_context_continue(puVar1 + 0xe); *(int1 *)(puVar1 + 5) = 0; if (0 < iVar3) { return *puVar1; } *(int1 *)((long)puVar1 + 0x15) = 0; if (-1 < iVar3) { return 0; } *(int4 *)(*(long *)(param_1 + 0x78) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(param_1 + 0x78) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(param_1 + 0x78) + 0x29c) = 0; lVar2 = *(long *)(param_1 + 0x78); __src = PTR_s_Client_run_out_of_memory_0044d5d0; } strncpy((char *)(lVar2 + 0x97),__src,0x1ff); *(int1 *)(*(long *)(param_1 + 0x78) + 0x296) = 0; return 0; }
13,173
std::hash<minja::Value>::operator()(minja::Value const&) const
monkey531[P]llama/common/minja.hpp
size_t operator()(const minja::Value & v) const { if (!v.is_hashable()) throw std::runtime_error("Unsupported type for hashing: " + v.dump()); return std::hash<json>()(v.get<json>()); }
O3
cpp
std::hash<minja::Value>::operator()(minja::Value const&) const: pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rsi, %r14 cmpq $0x0, 0x10(%rsi) jne 0xb1b9e cmpq $0x0, 0x20(%r14) jne 0xb1b9e cmpq $0x0, 0x30(%r14) jne 0xb1b9e movq %rsp, %rbx movq %rbx, %rdi movq %r14, %rsi callq 0xb1c86 movq %rbx, %rdi callq 0xb21a3 movq %rax, %rbx movq %rsp, %r14 movq %r14, %rdi xorl %esi, %esi callq 0x590b4 movq %r14, %rdi callq 0x5e5a2 movq %rbx, %rax addq $0x40, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x10, %edi callq 0x1b440 movq %rax, %rbx leaq 0x20(%rsp), %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x86c84 leaq 0x4142f(%rip), %rsi # 0xf2ff5 movq %rsp, %rdi leaq 0x20(%rsp), %rdx callq 0x79419 movb $0x1, %bpl movq %rsp, %rsi movq %rbx, %rdi callq 0x1be10 xorl %ebp, %ebp movq 0x7c3fe(%rip), %rsi # 0x12dfe8 movq 0x7c35f(%rip), %rdx # 0x12df50 movq %rbx, %rdi callq 0x1bf00 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb1c17 movq 0x10(%rsp), %rsi incq %rsi callq 0x1b8c0 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb1c32 movq 0x30(%rsp), %rsi incq %rsi callq 0x1b8c0 testb %bpl, %bpl jne 0xb1c5c jmp 0xb1c7e movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb1c5c movq 0x30(%rsp), %rsi incq %rsi callq 0x1b8c0 jmp 0xb1c5c movq %rax, %r14 movq %rbx, %rdi callq 0x1b660 jmp 0xb1c7e movq %rax, %r14 movq %rsp, %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x590b4 movq %rbx, %rdi callq 0x5e5a2 movq %r14, %rdi callq 0x1bf90
_ZNKSt4hashIN5minja5ValueEEclERKS1_: push rbp push r14 push rbx sub rsp, 40h mov r14, rsi cmp qword ptr [rsi+10h], 0 jnz short loc_B1B9E cmp qword ptr [r14+20h], 0 jnz short loc_B1B9E cmp qword ptr [r14+30h], 0 jnz short loc_B1B9E mov rbx, rsp mov rdi, rbx mov rsi, r14 call _ZNK5minja5Value3getIN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEEET_v; minja::Value::get<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>>(void) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail4hashINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEmRKT_; nlohmann::json_abi_v3_11_3::detail::hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rbx, rax mov r14, rsp mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rax, rbx add rsp, 40h pop rbx pop r14 pop rbp retn loc_B1B9E: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+58h+var_38] mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUnsupportedTyp; "Unsupported type for hashing: " mov rdi, rsp lea rdx, [rsp+58h+var_38] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 mov rsi, rsp mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B1C17 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B1C17: lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B1C32 mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B1C32: test bpl, bpl jnz short loc_B1C5C jmp short loc_B1C7E mov r14, rax lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B1C5C mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_B1C5C mov r14, rax loc_B1C5C: mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_B1C7E mov r14, rax mov rbx, rsp mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() loc_B1C7E: mov rdi, r14 call __Unwind_Resume
long long std::hash<minja::Value>::operator()(long long a1, _QWORD *a2) { long long v2; // rbx void *exception; // rbx char v5[16]; // [rsp+0h] [rbp-58h] BYREF _BYTE v6[16]; // [rsp+20h] [rbp-38h] BYREF if ( a2[2] || a2[4] || a2[6] ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v6, (long long)a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v5, (long long)"Unsupported type for hashing: ", (long long)v6); std::runtime_error::runtime_error(exception, v5); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Value::get<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>>( v5, a2); v2 = nlohmann::json_abi_v3_11_3::detail::hash<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>>(v5); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v5); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v5); return v2; }
operator(): PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RSI CMP qword ptr [RSI + 0x10],0x0 JNZ 0x001b1b9e CMP qword ptr [R14 + 0x20],0x0 JNZ 0x001b1b9e CMP qword ptr [R14 + 0x30],0x0 JNZ 0x001b1b9e MOV RBX,RSP MOV RDI,RBX MOV RSI,R14 CALL 0x001b1c86 LAB_001b1b72: MOV RDI,RBX CALL 0x001b21a3 LAB_001b1b7a: MOV RBX,RAX MOV R14,RSP MOV RDI,R14 XOR ESI,ESI CALL 0x001590b4 MOV RDI,R14 CALL 0x0015e5a2 MOV RAX,RBX ADD RSP,0x40 POP RBX POP R14 POP RBP RET LAB_001b1b9e: MOV EDI,0x10 CALL 0x0011b440 MOV RBX,RAX LAB_001b1bab: LEA RDI,[RSP + 0x20] MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x00186c84 LAB_001b1bbf: LEA RSI,[0x1f2ff5] MOV RDI,RSP LEA RDX,[RSP + 0x20] CALL 0x00179419 MOV BPL,0x1 LAB_001b1bd6: MOV RSI,RSP MOV RDI,RBX CALL 0x0011be10 XOR EBP,EBP MOV RSI,qword ptr [0x0022dfe8] MOV RDX,qword ptr [0x0022df50] MOV RDI,RBX CALL 0x0011bf00
/* std::hash<minja::Value>::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */ ulong __thiscall std::hash<minja::Value>::operator()(hash<minja::Value> *this,Value *param_1) { ulong uVar1; runtime_error *this_00; basic_json abStack_58 [32]; int1 local_38 [32]; if (((*(long *)(param_1 + 0x10) == 0) && (*(long *)(param_1 + 0x20) == 0)) && (*(long *)(param_1 + 0x30) == 0)) { minja::Value:: get<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>> (); /* try { // try from 001b1b72 to 001b1b79 has its CatchHandler @ 001b1c66 */ uVar1 = nlohmann::json_abi_v3_11_3::detail:: hash<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>> (abStack_58); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(abStack_58,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)abStack_58); return uVar1; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001b1bab to 001b1bbe has its CatchHandler @ 001b1c59 */ minja::Value::dump_abi_cxx11_((int)local_38,SUB81(param_1,0)); /* try { // try from 001b1bbf to 001b1bd2 has its CatchHandler @ 001b1c39 */ operator+((char *)abStack_58,(string *)"Unsupported type for hashing: "); /* try { // try from 001b1bd6 to 001b1bf8 has its CatchHandler @ 001b1bf9 */ std::runtime_error::runtime_error(this_00,(string *)abStack_58); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_0022dfe8,PTR__runtime_error_0022df50); }
13,174
array_append_string_unique
eloqsql/mysys/mf_arr_appstr.c
my_bool array_append_string_unique(const char *str, const char **array, size_t size) { const char **p; /* end points at the terminating NULL element */ const char **end= array + size - 1; DBUG_ASSERT(*end == NULL); for (p= array; *p; ++p) { if (strcmp(*p, str) == 0) break; } if (p >= end) return TRUE; /* Array is full */ DBUG_ASSERT(*p == NULL || strcmp(*p, str) == 0); while (*(p + 1)) { *p= *(p + 1); ++p; } DBUG_ASSERT(p < end); *p= str; return FALSE; /* Success */ }
O3
c
array_append_string_unique: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 leaq (%rsi,%rdx,8), %r15 addq $-0x8, %r15 movq (%rsi), %rdi testq %rdi, %rdi je 0x35d7e movq %r14, %rsi callq 0x244d0 testl %eax, %eax je 0x35d7e movq 0x8(%rbx), %rdi addq $0x8, %rbx jmp 0x35d63 movb $0x1, %al cmpq %r15, %rbx jae 0x35da0 movq 0x8(%rbx), %rax testq %rax, %rax je 0x35d9b movq %rax, (%rbx) movq 0x10(%rbx), %rax addq $0x8, %rbx jmp 0x35d89 movq %r14, (%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq nop
array_append_string_unique: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rsi mov r14, rdi lea r15, [rsi+rdx*8] add r15, 0FFFFFFFFFFFFFFF8h mov rdi, [rsi] loc_35D63: test rdi, rdi jz short loc_35D7E mov rsi, r14 call _strcmp test eax, eax jz short loc_35D7E mov rdi, [rbx+8] add rbx, 8 jmp short loc_35D63 loc_35D7E: mov al, 1 cmp rbx, r15 jnb short loc_35DA0 mov rax, [rbx+8] loc_35D89: test rax, rax jz short loc_35D9B mov [rbx], rax mov rax, [rbx+10h] add rbx, 8 jmp short loc_35D89 loc_35D9B: mov [rbx], r14 xor eax, eax loc_35DA0: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
char array_append_string_unique(long long a1, _QWORD *a2, long long a3) { _QWORD *v3; // rbx unsigned long long v5; // r15 long long v6; // rdi char result; // al long long v8; // rax v3 = a2; v5 = (unsigned long long)&a2[a3 - 1]; v6 = *a2; while ( v6 && (unsigned int)strcmp(v6, a1) ) { v6 = v3[1]; ++v3; } result = 1; if ( (unsigned long long)v3 < v5 ) { v8 = v3[1]; while ( v8 ) { *v3 = v8; v8 = v3[2]; ++v3; } *v3 = a1; return 0; } return result; }
array_append_string_unique: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI LEA R15,[RSI + RDX*0x8] ADD R15,-0x8 MOV RDI,qword ptr [RSI] LAB_00135d63: TEST RDI,RDI JZ 0x00135d7e MOV RSI,R14 CALL 0x001244d0 TEST EAX,EAX JZ 0x00135d7e MOV RDI,qword ptr [RBX + 0x8] ADD RBX,0x8 JMP 0x00135d63 LAB_00135d7e: MOV AL,0x1 CMP RBX,R15 JNC 0x00135da0 MOV RAX,qword ptr [RBX + 0x8] LAB_00135d89: TEST RAX,RAX JZ 0x00135d9b MOV qword ptr [RBX],RAX MOV RAX,qword ptr [RBX + 0x10] ADD RBX,0x8 JMP 0x00135d89 LAB_00135d9b: MOV qword ptr [RBX],R14 XOR EAX,EAX LAB_00135da0: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int8 array_append_string_unique(char *param_1,long *param_2,long param_3) { long *plVar1; int iVar2; int8 uVar3; long lVar4; char *__s1; long *plVar5; plVar5 = param_2 + param_3 + -1; __s1 = (char *)*param_2; while (__s1 != (char *)0x0) { iVar2 = strcmp(__s1,param_1); if (iVar2 == 0) break; plVar1 = param_2 + 1; param_2 = param_2 + 1; __s1 = (char *)*plVar1; } uVar3 = 1; if (param_2 < plVar5) { lVar4 = param_2[1]; while (lVar4 != 0) { *param_2 = lVar4; plVar5 = param_2 + 2; param_2 = param_2 + 1; lVar4 = *plVar5; } *param_2 = (long)param_1; uVar3 = 0; } return uVar3; }
13,175
ma_crypt_create
eloqsql/storage/maria/ma_crypt.c
int ma_crypt_create(MARIA_SHARE* share) { MARIA_CRYPT_DATA *crypt_data= (MARIA_CRYPT_DATA*)my_malloc(PSI_INSTRUMENT_ME, sizeof(MARIA_CRYPT_DATA), MYF(MY_ZEROFILL)); crypt_data->scheme.type= CRYPT_SCHEME_1; crypt_data->scheme.locker= crypt_data_scheme_locker; mysql_mutex_init(key_CRYPT_DATA_lock, &crypt_data->lock, MY_MUTEX_INIT_FAST); crypt_data->scheme.key_id= get_encryption_key_id(share); my_random_bytes(crypt_data->scheme.iv, sizeof(crypt_data->scheme.iv)); my_random_bytes((uchar*)&crypt_data->space, sizeof(crypt_data->space)); share->crypt_data= crypt_data; share->crypt_page_header_space= CRYPT_SCHEME_1_KEY_VERSION_SIZE; return 0; }
O3
c
ma_crypt_create: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl $0xb0, %esi movl $0x20, %edx xorl %edi, %edi callq 0xa11e5 movq %rax, %r14 movl $0x1, 0x54(%rax) leaq 0xae(%rip), %rax # 0x68355 movq %rax, 0x58(%r14) movl 0xb990a7(%rip), %edi # 0xc01358 leaq 0x68(%r14), %r15 leaq 0x31fd54(%rip), %rax # 0x388010 movq (%rax), %rax movq %r15, %rsi callq *0x40(%rax) movq %rax, 0xa8(%r14) movq %r15, 0xa0(%r14) xorps %xmm0, %xmm0 movups %xmm0, 0x90(%r14) leaq 0xba228b(%rip), %rsi # 0xc0a570 movq %r15, %rdi callq 0x29320 testb $0x10, 0x720(%rbx) je 0x6830f leaq 0x31dd13(%rip), %rax # 0x386010 movl $0x2, %r15d movl $0x2, %edi callq *(%rax) cmpl $-0x1, %eax jne 0x68315 movl $0x1, %r15d movl %r15d, 0x50(%r14) movq %r14, %rdi movl $0x10, %esi callq 0xd96d0 movq %r14, %rdi addq $0x60, %rdi movl $0x4, %esi callq 0xd96d0 movq %r14, 0xc20(%rbx) movl $0x4, 0xc18(%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
ma_crypt_create: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov esi, 0B0h mov edx, 20h ; ' ' xor edi, edi call my_malloc mov r14, rax mov dword ptr [rax+54h], 1 lea rax, crypt_data_scheme_locker mov [r14+58h], rax mov edi, cs:key_CRYPT_DATA_lock lea r15, [r14+68h] lea rax, PSI_server mov rax, [rax] mov rsi, r15 call qword ptr [rax+40h] mov [r14+0A8h], rax mov [r14+0A0h], r15 xorps xmm0, xmm0 movups xmmword ptr [r14+90h], xmm0 lea rsi, my_fast_mutexattr mov rdi, r15 call _pthread_mutex_init test byte ptr [rbx+720h], 10h jz short loc_6830F lea rax, encryption_handler mov r15d, 2 mov edi, 2 call qword ptr [rax] cmp eax, 0FFFFFFFFh jnz short loc_68315 loc_6830F: mov r15d, 1 loc_68315: mov [r14+50h], r15d mov rdi, r14 mov esi, 10h call my_random_bytes mov rdi, r14 add rdi, 60h ; '`' mov esi, 4 call my_random_bytes mov [rbx+0C20h], r14 mov dword ptr [rbx+0C18h], 4 xor eax, eax add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long ma_crypt_create(long long a1) { long long v1; // r14 int v2; // r15d v1 = my_malloc(0LL, 176LL, 32LL); *(_DWORD *)(v1 + 84) = 1; *(_QWORD *)(v1 + 88) = crypt_data_scheme_locker; *(_QWORD *)(v1 + 168) = ((long long ( *)(_QWORD, long long))PSI_server[8])( (unsigned int)key_CRYPT_DATA_lock, v1 + 104); *(_QWORD *)(v1 + 160) = v1 + 104; *(_OWORD *)(v1 + 144) = 0LL; pthread_mutex_init(v1 + 104, &my_fast_mutexattr); if ( (*(_BYTE *)(a1 + 1824) & 0x10) == 0 || (v2 = 2, (unsigned int)encryption_handler() == -1) ) v2 = 1; *(_DWORD *)(v1 + 80) = v2; my_random_bytes(v1, 16LL); my_random_bytes(v1 + 96, 4LL); *(_QWORD *)(a1 + 3104) = v1; *(_DWORD *)(a1 + 3096) = 4; return 0LL; }
ma_crypt_create: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV ESI,0xb0 MOV EDX,0x20 XOR EDI,EDI CALL 0x001a11e5 MOV R14,RAX MOV dword ptr [RAX + 0x54],0x1 LEA RAX,[0x168355] MOV qword ptr [R14 + 0x58],RAX MOV EDI,dword ptr [0x00d01358] LEA R15,[R14 + 0x68] LEA RAX,[0x488010] MOV RAX,qword ptr [RAX] MOV RSI,R15 CALL qword ptr [RAX + 0x40] MOV qword ptr [R14 + 0xa8],RAX MOV qword ptr [R14 + 0xa0],R15 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x90],XMM0 LEA RSI,[0xd0a570] MOV RDI,R15 CALL 0x00129320 TEST byte ptr [RBX + 0x720],0x10 JZ 0x0016830f LEA RAX,[0x486010] MOV R15D,0x2 MOV EDI,0x2 CALL qword ptr [RAX] CMP EAX,-0x1 JNZ 0x00168315 LAB_0016830f: MOV R15D,0x1 LAB_00168315: MOV dword ptr [R14 + 0x50],R15D MOV RDI,R14 MOV ESI,0x10 CALL 0x001d96d0 MOV RDI,R14 ADD RDI,0x60 MOV ESI,0x4 CALL 0x001d96d0 MOV qword ptr [RBX + 0xc20],R14 MOV dword ptr [RBX + 0xc18],0x4 XOR EAX,EAX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int8 ma_crypt_create(long param_1) { pthread_mutex_t *__mutex; int iVar1; long lVar2; int8 uVar3; int4 uVar4; lVar2 = my_malloc(0,0xb0,0x20); *(int4 *)(lVar2 + 0x54) = 1; *(code **)(lVar2 + 0x58) = crypt_data_scheme_locker; __mutex = (pthread_mutex_t *)(lVar2 + 0x68); uVar3 = (**(code **)(PSI_server + 0x40))(key_CRYPT_DATA_lock,__mutex); *(int8 *)(lVar2 + 0xa8) = uVar3; *(pthread_mutex_t **)(lVar2 + 0xa0) = __mutex; *(int8 *)(lVar2 + 0x90) = 0; *(int8 *)(lVar2 + 0x98) = 0; pthread_mutex_init(__mutex,(pthread_mutexattr_t *)&my_fast_mutexattr); if ((*(byte *)(param_1 + 0x720) & 0x10) != 0) { uVar4 = 2; iVar1 = (*(code *)encryption_handler)(2); if (iVar1 != -1) goto LAB_00168315; } uVar4 = 1; LAB_00168315: *(int4 *)(lVar2 + 0x50) = uVar4; my_random_bytes(lVar2,0x10); my_random_bytes(lVar2 + 0x60,4); *(long *)(param_1 + 0xc20) = lVar2; *(int4 *)(param_1 + 0xc18) = 4; return 0; }
13,176
link_changed
eloqsql/mysys/mf_keycache.c
static inline void link_changed(BLOCK_LINK *block, BLOCK_LINK **phead) { DBUG_ASSERT(!block->next_changed); DBUG_ASSERT(!block->prev_changed); block->prev_changed= phead; if ((block->next_changed= *phead)) (*phead)->prev_changed= &block->next_changed; *phead= block; }
O0
c
link_changed: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) jmp 0xe518e jmp 0xe5190 jmp 0xe5192 movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x8(%rbp), %rcx movq %rax, 0x10(%rcx) cmpq $0x0, %rax je 0xe51c6 movq -0x8(%rbp), %rcx addq $0x10, %rcx movq -0x10(%rbp), %rax movq (%rax), %rax movq %rcx, 0x18(%rax) movq -0x8(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) popq %rbp retq nopw %cs:(%rax,%rax)
link_changed_0: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi jmp short $+2 loc_E518E: jmp short $+2 loc_E5190: jmp short $+2 loc_E5192: mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax+18h], rcx mov rax, [rbp+var_10] mov rax, [rax] mov rcx, [rbp+var_8] mov [rcx+10h], rax cmp rax, 0 jz short loc_E51C6 mov rcx, [rbp+var_8] add rcx, 10h mov rax, [rbp+var_10] mov rax, [rax] mov [rax+18h], rcx loc_E51C6: mov rcx, [rbp+var_8] mov rax, [rbp+var_10] mov [rax], rcx pop rbp retn
long long * link_changed_0(long long a1, long long *a2) { long long v2; // rax long long *result; // rax *(_QWORD *)(a1 + 24) = a2; v2 = *a2; *(_QWORD *)(a1 + 16) = *a2; if ( v2 ) *(_QWORD *)(*a2 + 24) = a1 + 16; result = a2; *a2 = a1; return result; }
link_changed: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI JMP 0x001e518e LAB_001e518e: JMP 0x001e5190 LAB_001e5190: JMP 0x001e5192 LAB_001e5192: MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV qword ptr [RCX + 0x10],RAX CMP RAX,0x0 JZ 0x001e51c6 MOV RCX,qword ptr [RBP + -0x8] ADD RCX,0x10 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x18],RCX LAB_001e51c6: MOV RCX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX POP RBP RET
void link_changed(long param_1,long *param_2) { long lVar1; *(long **)(param_1 + 0x18) = param_2; lVar1 = *param_2; *(long *)(param_1 + 0x10) = lVar1; if (lVar1 != 0) { *(long *)(*param_2 + 0x18) = param_1 + 0x10; } *param_2 = param_1; return; }
13,177
ma_tls_close
eloqsql/libmariadb/libmariadb/secure/openssl.c
my_bool ma_tls_close(MARIADB_TLS *ctls) { int i, rc; SSL *ssl; SSL_CTX *ctx= NULL; if (!ctls || !ctls->ssl) return 1; ssl= (SSL *)ctls->ssl; ctx= SSL_get_SSL_CTX(ssl); if (ctx) SSL_CTX_free(ctx); SSL_set_quiet_shutdown(ssl, 1); /* 2 x pending + 2 * data = 4 */ for (i=0; i < 4; i++) if ((rc= SSL_shutdown(ssl))) break; /* Since we transferred ownership of BIO to ssl, BIO will automatically freed - no need for an explicit BIO_free_all */ SSL_free(ssl); ctls->ssl= NULL; return rc; }
O0
c
ma_tls_close: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq $0x0, -0x28(%rbp) cmpq $0x0, -0x10(%rbp) je 0x3aa66 movq -0x10(%rbp), %rax cmpq $0x0, 0x10(%rax) jne 0x3aa6c movb $0x1, -0x1(%rbp) jmp 0x3aaeb movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rdi callq 0x130e0 movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) je 0x3aa95 movq -0x28(%rbp), %rdi callq 0x13090 movq -0x20(%rbp), %rdi movl $0x1, %esi callq 0x13450 movl $0x0, -0x14(%rbp) cmpl $0x4, -0x14(%rbp) jge 0x3aad0 movq -0x20(%rbp), %rdi callq 0x134c0 movl %eax, -0x18(%rbp) cmpl $0x0, %eax je 0x3aac3 jmp 0x3aad0 jmp 0x3aac5 movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0x3aaaa movq -0x20(%rbp), %rdi callq 0x13270 movq -0x10(%rbp), %rax movq $0x0, 0x10(%rax) movl -0x18(%rbp), %eax movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_tls_close: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_28], 0 cmp [rbp+var_10], 0 jz short loc_3AA66 mov rax, [rbp+var_10] cmp qword ptr [rax+10h], 0 jnz short loc_3AA6C loc_3AA66: mov [rbp+var_1], 1 jmp short loc_3AAEB loc_3AA6C: mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_20], rax mov rdi, [rbp+var_20] call _SSL_get_SSL_CTX mov [rbp+var_28], rax cmp [rbp+var_28], 0 jz short loc_3AA95 mov rdi, [rbp+var_28] call _SSL_CTX_free loc_3AA95: mov rdi, [rbp+var_20] mov esi, 1 call _SSL_set_quiet_shutdown mov [rbp+var_14], 0 loc_3AAAA: cmp [rbp+var_14], 4 jge short loc_3AAD0 mov rdi, [rbp+var_20] call _SSL_shutdown mov [rbp+var_18], eax cmp eax, 0 jz short loc_3AAC3 jmp short loc_3AAD0 loc_3AAC3: jmp short $+2 loc_3AAC5: mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax jmp short loc_3AAAA loc_3AAD0: mov rdi, [rbp+var_20] call _SSL_free mov rax, [rbp+var_10] mov qword ptr [rax+10h], 0 mov eax, [rbp+var_18] mov [rbp+var_1], al loc_3AAEB: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char ma_tls_close(long long a1) { long long SSL_CTX; // [rsp+8h] [rbp-28h] long long v3; // [rsp+10h] [rbp-20h] int v4; // [rsp+18h] [rbp-18h] int i; // [rsp+1Ch] [rbp-14h] if ( !a1 || !*(_QWORD *)(a1 + 16) ) return 1; v3 = *(_QWORD *)(a1 + 16); SSL_CTX = SSL_get_SSL_CTX(v3); if ( SSL_CTX ) SSL_CTX_free(SSL_CTX); SSL_set_quiet_shutdown(v3, 1LL); for ( i = 0; i < 4; ++i ) { v4 = SSL_shutdown(v3); if ( v4 ) break; } SSL_free(v3); *(_QWORD *)(a1 + 16) = 0LL; return v4; }
ma_tls_close: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x28],0x0 CMP qword ptr [RBP + -0x10],0x0 JZ 0x0013aa66 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x10],0x0 JNZ 0x0013aa6c LAB_0013aa66: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0013aaeb LAB_0013aa6c: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x001130e0 MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],0x0 JZ 0x0013aa95 MOV RDI,qword ptr [RBP + -0x28] CALL 0x00113090 LAB_0013aa95: MOV RDI,qword ptr [RBP + -0x20] MOV ESI,0x1 CALL 0x00113450 MOV dword ptr [RBP + -0x14],0x0 LAB_0013aaaa: CMP dword ptr [RBP + -0x14],0x4 JGE 0x0013aad0 MOV RDI,qword ptr [RBP + -0x20] CALL 0x001134c0 MOV dword ptr [RBP + -0x18],EAX CMP EAX,0x0 JZ 0x0013aac3 JMP 0x0013aad0 LAB_0013aac3: JMP 0x0013aac5 LAB_0013aac5: MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x0013aaaa LAB_0013aad0: MOV RDI,qword ptr [RBP + -0x20] CALL 0x00113270 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],0x0 MOV EAX,dword ptr [RBP + -0x18] MOV byte ptr [RBP + -0x1],AL LAB_0013aaeb: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 ma_tls_close(long param_1) { SSL *ssl; SSL_CTX *pSVar1; int local_20; int local_1c; int1 local_9; if ((param_1 == 0) || (*(long *)(param_1 + 0x10) == 0)) { local_9 = 1; } else { ssl = *(SSL **)(param_1 + 0x10); pSVar1 = SSL_get_SSL_CTX(ssl); if (pSVar1 != (SSL_CTX *)0x0) { SSL_CTX_free(pSVar1); } SSL_set_quiet_shutdown(ssl,1); local_1c = 0; while ((local_1c < 4 && (local_20 = SSL_shutdown(ssl), local_20 == 0))) { local_1c = local_1c + 1; } SSL_free(ssl); *(int8 *)(param_1 + 0x10) = 0; local_9 = (int1)local_20; } return local_9; }
13,178
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::next_byte_in_range(std::initializer_list<int>)
monkey531[P]llama/common/json.hpp
bool next_byte_in_range(std::initializer_list<char_int_type> ranges) { JSON_ASSERT(ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6); add(current); for (auto range = ranges.begin(); range != ranges.end(); ++range) { get(); if (JSON_HEDLEY_LIKELY(*range <= current && current <= *(++range))) // NOLINT(bugprone-inc-dec-in-conditions) { add(current); } else { error_message = "invalid string: ill-formed UTF-8 byte"; return false; } } return true; }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::next_byte_in_range(std::initializer_list<int>): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx cmpq $0x6, %rdx ja 0x45e94 movq %rdx, %r12 movl $0x54, %eax btq %rdx, %rax jae 0x45e94 movq %rsi, %r14 movq %rdi, %rbx movsbl 0x14(%rdi), %esi leaq 0x50(%rdi), %r15 movq %r15, %rdi callq 0x18590 testq %r12, %r12 sete %bpl je 0x45e85 leaq (%r14,%r12,4), %r12 movq %rbx, %rdi callq 0x18f1e movl 0x14(%rbx), %eax cmpl %eax, (%r14) jg 0x45e76 cmpl 0x4(%r14), %eax leaq 0x4(%r14), %r14 setle %cl testb %cl, %cl je 0x45e7a movsbl %al, %esi movq %r15, %rdi callq 0x18590 addq $0x4, %r14 cmpq %r12, %r14 sete %bpl jne 0x45e3d jmp 0x45e85 xorl %ecx, %ecx jmp 0x45e58 leaq 0x67a9f(%rip), %rax # 0xad920 movq %rax, 0x70(%rbx) andb $0x1, %bpl movl %ebp, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x6686c(%rip), %rdi # 0xac707 leaq 0x6501f(%rip), %rdx # 0xaaec1 leaq 0x67ad7(%rip), %rcx # 0xad980 movl $0x1da8, %esi # imm = 0x1DA8 xorl %eax, %eax callq 0x18ad0 nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE18next_byte_in_rangeESt16initializer_listIiE: push rbp push r15 push r14 push r12 push rbx cmp rdx, 6 ja loc_45E94 mov r12, rdx mov eax, 54h ; 'T' bt rax, rdx jnb short loc_45E94 mov r14, rsi mov rbx, rdi movsx esi, byte ptr [rdi+14h] lea r15, [rdi+50h] mov rdi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) test r12, r12 setz bpl jz short loc_45E85 lea r12, [r14+r12*4] loc_45E3D: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) mov eax, [rbx+14h] cmp [r14], eax jg short loc_45E76 cmp eax, [r14+4] lea r14, [r14+4] setle cl loc_45E58: test cl, cl jz short loc_45E7A movsx esi, al mov rdi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) add r14, 4 cmp r14, r12 setz bpl jnz short loc_45E3D jmp short loc_45E85 loc_45E76: xor ecx, ecx jmp short loc_45E58 loc_45E7A: lea rax, aInvalidStringI; "invalid string: ill-formed UTF-8 byte" mov [rbx+70h], rax loc_45E85: and bpl, 1 mov eax, ebp pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_45E94: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRangesSize2Ran; "ranges.size() == 2 || ranges.size() == "... mov esi, 1DA8h xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::next_byte_in_range( __m128i *a1, __int32 *a2, unsigned long long a3) { unsigned int v3; // ebp long long v5; // rax __int32 *v6; // r14 __int32 *v7; // r12 __int32 v8; // eax bool v9; // zf bool v10; // sf bool v11; // of char v12; // cl long long v14; // rdx long long v15; // rcx if ( a3 <= 6 && (v5 = 84LL, _bittest64(&v5, a3)) ) { v6 = a2; std::string::push_back(&a1[5], (unsigned int)a1[1].m128i_i8[4]); LOBYTE(v3) = a3 == 0; if ( a3 ) { v7 = &a2[a3]; while ( 1 ) { nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1); v8 = a1[1].m128i_i32[1]; if ( *v6 > v8 ) { v12 = 0; } else { v11 = __OFSUB__(v8, v6[1]); v9 = v8 == v6[1]; v10 = v8 - v6[1] < 0; ++v6; v12 = v10 ^ v11 | v9; } if ( !v12 ) break; std::string::push_back(&a1[5], (unsigned int)(char)v8); LOBYTE(v3) = ++v6 == v7; if ( v6 == v7 ) goto LABEL_12; } a1[7].m128i_i64[0] = (long long)"invalid string: ill-formed UTF-8 byte"; } LABEL_12: LOBYTE(v3) = v3 & 1; return v3; } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7592LL, "GGML_ASSERT(%s) failed", "ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6"); return nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_sax_dom_callback_parser( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7592LL, v14, v15); } }
next_byte_in_range: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX CMP RDX,0x6 JA 0x00145e94 MOV R12,RDX MOV EAX,0x54 BT RAX,RDX JNC 0x00145e94 MOV R14,RSI MOV RBX,RDI MOVSX ESI,byte ptr [RDI + 0x14] LEA R15,[RDI + 0x50] MOV RDI,R15 CALL 0x00118590 TEST R12,R12 SETZ BPL JZ 0x00145e85 LEA R12,[R14 + R12*0x4] LAB_00145e3d: MOV RDI,RBX CALL 0x00118f1e MOV EAX,dword ptr [RBX + 0x14] CMP dword ptr [R14],EAX JG 0x00145e76 CMP EAX,dword ptr [R14 + 0x4] LEA R14,[R14 + 0x4] SETLE CL LAB_00145e58: TEST CL,CL JZ 0x00145e7a MOVSX ESI,AL MOV RDI,R15 CALL 0x00118590 ADD R14,0x4 CMP R14,R12 SETZ BPL JNZ 0x00145e3d JMP 0x00145e85 LAB_00145e76: XOR ECX,ECX JMP 0x00145e58 LAB_00145e7a: LEA RAX,[0x1ad920] MOV qword ptr [RBX + 0x70],RAX LAB_00145e85: AND BPL,0x1 MOV EAX,EBP POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00145e94: LEA RDI,[0x1ac707] LEA RDX,[0x1aaec1] LEA RCX,[0x1ad980] MOV ESI,0x1da8 XOR EAX,EAX CALL 0x00118ad0
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::next_byte_in_range(std::initializer_list<int>) */ ulong nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::next_byte_in_range (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *param_1,int *param_2,ulong param_3) { int *piVar1; int *piVar2; bool bVar3; int8 unaff_RBP; char cVar4; bool bVar5; if ((6 < param_3) || ((0x54UL >> (param_3 & 0x3f) & 1) == 0)) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1da8, "GGML_ASSERT(%s) failed", "ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6"); } cVar4 = (char)param_1 + 'P'; std::__cxx11::string::push_back(cVar4); bVar5 = param_3 == 0; if (!bVar5) { piVar2 = param_2 + param_3; do { get(param_1); if (*(int *)(param_1 + 0x14) < *param_2) { bVar3 = false; } else { piVar1 = param_2 + 1; param_2 = param_2 + 1; bVar3 = *(int *)(param_1 + 0x14) <= *piVar1; } if (!bVar3) { *(char **)(param_1 + 0x70) = "invalid string: ill-formed UTF-8 byte"; break; } std::__cxx11::string::push_back(cVar4); param_2 = param_2 + 1; bVar5 = param_2 == piVar2; } while (!bVar5); } return CONCAT71((int7)((ulong)unaff_RBP >> 8),bVar5) & 0xffffffff; }
13,179
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::next_byte_in_range(std::initializer_list<int>)
monkey531[P]llama/common/json.hpp
bool next_byte_in_range(std::initializer_list<char_int_type> ranges) { JSON_ASSERT(ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6); add(current); for (auto range = ranges.begin(); range != ranges.end(); ++range) { get(); if (JSON_HEDLEY_LIKELY(*range <= current && current <= *(++range))) // NOLINT(bugprone-inc-dec-in-conditions) { add(current); } else { error_message = "invalid string: ill-formed UTF-8 byte"; return false; } } return true; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::next_byte_in_range(std::initializer_list<int>): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax cmpq $0x6, %rdx ja 0x42d26 movq %rdx, %rbx pushq $0x54 popq %rax btq %rdx, %rax jae 0x42d26 movq %rsi, %r15 movq %rdi, %r14 movsbl 0x14(%rdi), %esi leaq 0x50(%rdi), %r12 movq %r12, %rdi callq 0x205b0 shlq $0x2, %rbx testq %rbx, %rbx je 0x42d14 movq %r14, %rdi callq 0x42ac8 movl 0x14(%r14), %eax cmpl %eax, (%r15) jg 0x42d09 cmpl 0x4(%r15), %eax jg 0x42d09 movsbl %al, %esi movq %r12, %rdi callq 0x205b0 addq $0x8, %r15 addq $-0x8, %rbx jmp 0x42cd8 leaq 0x4cbd0(%rip), %rax # 0x8f8e0 movq %rax, 0x70(%r14) testq %rbx, %rbx sete %al addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq leaq 0x4b99a(%rip), %rdi # 0x8e6c7 leaq 0x4a14d(%rip), %rdx # 0x8ce81 leaq 0x4cc05(%rip), %rcx # 0x8f940 movl $0x1da8, %esi # imm = 0x1DA8 xorl %eax, %eax callq 0x20af0 nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE18next_byte_in_rangeESt16initializer_listIiE: push r15 push r14 push r12 push rbx push rax cmp rdx, 6 ja short loc_42D26 mov rbx, rdx push 54h ; 'T' pop rax bt rax, rdx jnb short loc_42D26 mov r15, rsi mov r14, rdi movsx esi, byte ptr [rdi+14h] lea r12, [rdi+50h] mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) shl rbx, 2 loc_42CD8: test rbx, rbx jz short loc_42D14 mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) mov eax, [r14+14h] cmp [r15], eax jg short loc_42D09 cmp eax, [r15+4] jg short loc_42D09 movsx esi, al mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) add r15, 8 add rbx, 0FFFFFFFFFFFFFFF8h jmp short loc_42CD8 loc_42D09: lea rax, aInvalidStringI; "invalid string: ill-formed UTF-8 byte" mov [r14+70h], rax loc_42D14: test rbx, rbx setz al add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn loc_42D26: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRangesSize2Ran; "ranges.size() == 2 || ranges.size() == "... mov esi, 1DA8h xor eax, eax call _ggml_abort nop
char nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::next_byte_in_range( __m128i *a1, __int32 *a2, unsigned long long a3) { long long v4; // rax long long i; // rbx __int32 v7; // eax long long v9; // rdx long long v10; // rcx if ( a3 <= 6 && (v4 = 84LL, _bittest64(&v4, a3)) ) { std::string::push_back(&a1[5], (unsigned int)a1[1].m128i_i8[4]); for ( i = 4 * a3; i; i -= 8LL ) { nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1); v7 = a1[1].m128i_i32[1]; if ( *a2 > v7 || v7 > a2[1] ) { a1[7].m128i_i64[0] = (long long)"invalid string: ill-formed UTF-8 byte"; return i == 0; } std::string::push_back(&a1[5], (unsigned int)(char)v7); a2 += 2; } return i == 0; } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7592LL, "GGML_ASSERT(%s) failed", "ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6"); return nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_sax_dom_callback_parser( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7592LL, v9, v10); } }
next_byte_in_range: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX CMP RDX,0x6 JA 0x00142d26 MOV RBX,RDX PUSH 0x54 POP RAX BT RAX,RDX JNC 0x00142d26 MOV R15,RSI MOV R14,RDI MOVSX ESI,byte ptr [RDI + 0x14] LEA R12,[RDI + 0x50] MOV RDI,R12 CALL 0x001205b0 SHL RBX,0x2 LAB_00142cd8: TEST RBX,RBX JZ 0x00142d14 MOV RDI,R14 CALL 0x00142ac8 MOV EAX,dword ptr [R14 + 0x14] CMP dword ptr [R15],EAX JG 0x00142d09 CMP EAX,dword ptr [R15 + 0x4] JG 0x00142d09 MOVSX ESI,AL MOV RDI,R12 CALL 0x001205b0 ADD R15,0x8 ADD RBX,-0x8 JMP 0x00142cd8 LAB_00142d09: LEA RAX,[0x18f8e0] MOV qword ptr [R14 + 0x70],RAX LAB_00142d14: TEST RBX,RBX SETZ AL ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET LAB_00142d26: LEA RDI,[0x18e6c7] LEA RDX,[0x18ce81] LEA RCX,[0x18f940] MOV ESI,0x1da8 XOR EAX,EAX CALL 0x00120af0
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::next_byte_in_range(std::initializer_list<int>) */ bool nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::next_byte_in_range (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *param_1,int *param_2,ulong param_3) { long lVar1; char cVar2; if ((6 < param_3) || ((0x54UL >> (param_3 & 0x3f) & 1) == 0)) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1da8, "GGML_ASSERT(%s) failed", "ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6"); } cVar2 = (char)param_1 + 'P'; std::__cxx11::string::push_back(cVar2); lVar1 = param_3 << 2; do { if (lVar1 == 0) { LAB_00142d14: return lVar1 == 0; } get(param_1); if ((*(int *)(param_1 + 0x14) < *param_2) || (param_2[1] < *(int *)(param_1 + 0x14))) { *(char **)(param_1 + 0x70) = "invalid string: ill-formed UTF-8 byte"; goto LAB_00142d14; } std::__cxx11::string::push_back(cVar2); param_2 = param_2 + 2; lVar1 = lVar1 + -8; } while( true ); }
13,180
testing::internal::DeathTest::DeathTest()
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest-death-test.cc
DeathTest::DeathTest() { TestInfo* const info = GetUnitTestImpl()->current_test_info(); if (info == nullptr) { DeathTestAbort( "Cannot run a death test outside of a TEST or " "TEST_F construct"); } }
O1
cpp
testing::internal::DeathTest::DeathTest(): pushq %r14 pushq %rbx subq $0x28, %rsp leaq 0x48c4a(%rip), %rax # 0x57ed8 movq %rax, (%rdi) callq 0x19012 movq 0x4a513(%rip), %rax # 0x597b0 cmpq $0x0, 0x1e0(%rax) je 0xf2af addq $0x28, %rsp popq %rbx popq %r14 retq leaq 0x18(%rsp), %r14 movq %r14, -0x10(%r14) leaq 0x32c89(%rip), %rsi # 0x41f48 leaq 0x32cbf(%rip), %rdx # 0x41f85 leaq 0x8(%rsp), %rbx movq %rbx, %rdi callq 0x39504 movq %rbx, %rdi callq 0xf2fd movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0xf2f5 movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 movq %rbx, %rdi callq 0x8990
_ZN7testing8internal9DeathTestC2Ev: push r14 push rbx sub rsp, 28h lea rax, off_57ED8 mov [rdi], rax call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) mov rax, cs:qword_597B0 cmp qword ptr [rax+1E0h], 0 jz short loc_F2AF add rsp, 28h pop rbx pop r14 retn loc_F2AF: lea r14, [rsp+38h+var_20] mov [r14-10h], r14 lea rsi, aCannotRunADeat; "Cannot run a death test outside of a TE"... lea rdx, aCannotRunADeat+3Dh; "" lea rbx, [rsp+38h+var_30] mov rdi, rbx 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, rbx call _ZN7testing8internalL14DeathTestAbortERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::DeathTestAbort(std::string const&) mov rbx, rax mov rdi, [rsp+38h+var_30]; void * cmp rdi, r14 jz short loc_F2F5 mov rsi, [rsp+38h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F2F5: mov rdi, rbx call __Unwind_Resume
testing::internal::UnitTestImpl * testing::internal::DeathTest::DeathTest(testing::internal::DeathTest *this) { testing::internal::UnitTestImpl *result; // rax long long v2; // rbx void *v3[2]; // [rsp+8h] [rbp-30h] BYREF _QWORD v4[4]; // [rsp+18h] [rbp-20h] BYREF *(_QWORD *)this = &off_57ED8; testing::UnitTest::GetInstance(this); result = qword_597B0; if ( !*((_QWORD *)qword_597B0 + 60) ) { v3[0] = v4; std::string::_M_construct<char const*>(v3, "Cannot run a death test outside of a TEST or TEST_F construct", ""); v2 = testing::internal::DeathTestAbort(v3); if ( v3[0] != v4 ) operator delete(v3[0], v4[0] + 1LL); _Unwind_Resume(v2); } return result; }
DeathTest: PUSH R14 PUSH RBX SUB RSP,0x28 LEA RAX,[0x157ed8] MOV qword ptr [RDI],RAX CALL 0x00119012 MOV RAX,qword ptr [0x001597b0] CMP qword ptr [RAX + 0x1e0],0x0 JZ 0x0010f2af ADD RSP,0x28 POP RBX POP R14 RET LAB_0010f2af: LEA R14,[RSP + 0x18] MOV qword ptr [R14 + -0x10],R14 LEA RSI,[0x141f48] LEA RDX,[0x141f85] LEA RBX,[RSP + 0x8] MOV RDI,RBX CALL 0x00139504 LAB_0010f2d3: MOV RDI,RBX CALL 0x0010f2fd LAB_0010f2db: MOV RBX,RAX MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R14 JZ 0x0010f2f5 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001084e0 LAB_0010f2f5: MOV RDI,RBX CALL 0x00108990
/* testing::internal::DeathTest::DeathTest() */ void __thiscall testing::internal::DeathTest::DeathTest(DeathTest *this) { int8 uVar1; long *local_30 [2]; long local_20 [2]; *(int ***)this = &PTR__DeathTest_00157ed8; UnitTest::GetInstance(); if (*(long *)(UnitTest::GetInstance()::instance._64_8_ + 0x1e0) != 0) { return; } local_30[0] = local_20; std::__cxx11::string::_M_construct<char_const*> ((string *)local_30,"Cannot run a death test outside of a TEST or TEST_F construct",""); /* try { // try from 0010f2d3 to 0010f2da has its CatchHandler @ 0010f2db */ uVar1 = DeathTestAbort((string *)local_30); /* catch() { ... } // from try @ 0010f2d3 with catch @ 0010f2db */ if (local_30[0] != local_20) { operator_delete(local_30[0],local_20[0] + 1); } /* WARNING: Subroutine does not return */ _Unwind_Resume(uVar1); }
13,181
common_params_sampling::print[abi:cxx11]() const
monkey531[P]llama/common/sampling.cpp
std::string common_params_sampling::print() const { char result[1024]; snprintf(result, sizeof(result), "\trepeat_last_n = %d, repeat_penalty = %.3f, frequency_penalty = %.3f, presence_penalty = %.3f\n" "\tdry_multiplier = %.3f, dry_base = %.3f, dry_allowed_length = %d, dry_penalty_last_n = %d\n" "\ttop_k = %d, top_p = %.3f, min_p = %.3f, xtc_probability = %.3f, xtc_threshold = %.3f, typical_p = %.3f, temp = %.3f\n" "\tmirostat = %d, mirostat_lr = %.3f, mirostat_ent = %.3f", penalty_last_n, penalty_repeat, penalty_freq, penalty_present, dry_multiplier, dry_base, dry_allowed_length, dry_penalty_last_n, top_k, top_p, min_p, xtc_probability, xtc_threshold, typ_p, temp, mirostat, mirostat_eta, mirostat_tau); return std::string(result); }
O0
cpp
common_params_sampling::print[abi:cxx11]() const: subq $0x498, %rsp # imm = 0x498 movq %rdi, 0x50(%rsp) movq %rdi, %rax movq %rax, 0x40(%rsp) movq %rdi, 0x490(%rsp) movq %rsi, 0x488(%rsp) movq 0x488(%rsp), %rax movq %rax, 0x48(%rsp) movl 0x34(%rax), %ecx movss 0x38(%rax), %xmm0 cvtss2sd %xmm0, %xmm0 movss 0x3c(%rax), %xmm1 cvtss2sd %xmm1, %xmm1 movss 0x40(%rax), %xmm2 cvtss2sd %xmm2, %xmm2 movss 0x44(%rax), %xmm3 cvtss2sd %xmm3, %xmm3 movss 0x48(%rax), %xmm4 cvtss2sd %xmm4, %xmm4 movl 0x4c(%rax), %r8d movl 0x50(%rax), %r9d movl 0x10(%rax), %edx movss 0x14(%rax), %xmm5 cvtss2sd %xmm5, %xmm5 movss 0x18(%rax), %xmm6 cvtss2sd %xmm6, %xmm6 movss 0x1c(%rax), %xmm7 cvtss2sd %xmm7, %xmm7 movss 0x20(%rax), %xmm8 cvtss2sd %xmm8, %xmm8 movss 0x24(%rax), %xmm9 cvtss2sd %xmm9, %xmm9 movss 0x28(%rax), %xmm10 cvtss2sd %xmm10, %xmm10 movl 0x54(%rax), %esi movss 0x5c(%rax), %xmm11 cvtss2sd %xmm11, %xmm11 movss 0x58(%rax), %xmm12 cvtss2sd %xmm12, %xmm12 movq %rsp, %rax movsd %xmm12, 0x30(%rax) movsd %xmm11, 0x28(%rax) movl %esi, 0x20(%rax) movsd %xmm10, 0x18(%rax) movsd %xmm9, 0x10(%rax) movsd %xmm8, 0x8(%rax) movl %edx, (%rax) leaq 0x5555a(%rip), %rdx # 0x224c48 leaq 0x80(%rsp), %rdi movq %rdi, 0x58(%rsp) movl $0x400, %esi # imm = 0x400 movb $0x8, %al callq 0x5e930 leaq 0x7f(%rsp), %rdi movq %rdi, 0x60(%rsp) callq 0x5f150 movq 0x50(%rsp), %rdi movq 0x58(%rsp), %rsi movq 0x60(%rsp), %rdx callq 0x6b630 jmp 0x1cf72c leaq 0x7f(%rsp), %rdi callq 0x5f5b0 movq 0x40(%rsp), %rax addq $0x498, %rsp # imm = 0x498 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x70(%rsp) movl %eax, 0x6c(%rsp) leaq 0x7f(%rsp), %rdi callq 0x5f5b0 movq 0x70(%rsp), %rdi callq 0x5ebf0 nopw %cs:(%rax,%rax)
_ZNK22common_params_sampling5printB5cxx11Ev: sub rsp, 498h mov [rsp+498h+var_448], rdi mov rax, rdi mov [rsp+498h+var_458], rax mov [rsp+498h+var_8], rdi mov [rsp+498h+var_10], rsi mov rax, [rsp+498h+var_10] mov [rsp+498h+var_450], rax mov ecx, [rax+34h] movss xmm0, dword ptr [rax+38h] cvtss2sd xmm0, xmm0 movss xmm1, dword ptr [rax+3Ch] cvtss2sd xmm1, xmm1 movss xmm2, dword ptr [rax+40h] cvtss2sd xmm2, xmm2 movss xmm3, dword ptr [rax+44h] cvtss2sd xmm3, xmm3 movss xmm4, dword ptr [rax+48h] cvtss2sd xmm4, xmm4 mov r8d, [rax+4Ch] mov r9d, [rax+50h] mov edx, [rax+10h] movss xmm5, dword ptr [rax+14h] cvtss2sd xmm5, xmm5 movss xmm6, dword ptr [rax+18h] cvtss2sd xmm6, xmm6 movss xmm7, dword ptr [rax+1Ch] cvtss2sd xmm7, xmm7 movss xmm8, dword ptr [rax+20h] cvtss2sd xmm8, xmm8 movss xmm9, dword ptr [rax+24h] cvtss2sd xmm9, xmm9 movss xmm10, dword ptr [rax+28h] cvtss2sd xmm10, xmm10 mov esi, [rax+54h] movss xmm11, dword ptr [rax+5Ch] cvtss2sd xmm11, xmm11 movss xmm12, dword ptr [rax+58h] cvtss2sd xmm12, xmm12 mov rax, rsp movsd qword ptr [rax+30h], xmm12 movsd qword ptr [rax+28h], xmm11 mov [rax+20h], esi movsd qword ptr [rax+18h], xmm10 movsd qword ptr [rax+10h], xmm9 movsd qword ptr [rax+8], xmm8 mov [rax], edx lea rdx, aRepeatLastNDRe; "\trepeat_last_n = %d, repeat_penalty = "... lea rdi, [rsp+498h+var_418] mov [rsp+498h+var_440], rdi mov esi, 400h mov al, 8 call _snprintf lea rdi, [rsp+498h+var_419] mov [rsp+498h+var_438], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rsp+498h+var_448] mov rsi, [rsp+498h+var_440] mov rdx, [rsp+498h+var_438] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_1CF72C: lea rdi, [rsp+498h+var_419] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rax, [rsp+498h+var_458] add rsp, 498h retn mov rcx, rax mov eax, edx mov [rsp+arg_68], rcx mov [rsp+arg_64], eax lea rdi, [rsp+arg_77] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rsp+arg_68] call __Unwind_Resume
long long common_params_sampling::print[abi:cxx11](long long a1, long long a2) { int v2; // ecx double v3; // xmm0_8 double v4; // xmm1_8 double v5; // xmm2_8 double v6; // xmm3_8 double v7; // xmm4_8 int v8; // r8d int v9; // r9d int v10; // edx double v11; // xmm5_8 double v12; // xmm6_8 double v13; // xmm7_8 double v14; // xmm8_8 double v15; // xmm9_8 double v16; // xmm10_8 int v17; // esi double v18; // xmm11_8 double v20; // [rsp+30h] [rbp-468h] long long v21; // [rsp+40h] [rbp-458h] long long v22; // [rsp+48h] [rbp-450h] long long v23; // [rsp+50h] [rbp-448h] _BYTE *v24; // [rsp+58h] [rbp-440h] char *v25; // [rsp+60h] [rbp-438h] char v26; // [rsp+7Fh] [rbp-419h] BYREF _BYTE v27[1032]; // [rsp+80h] [rbp-418h] BYREF long long v28; // [rsp+488h] [rbp-10h] long long v29; // [rsp+490h] [rbp-8h] v23 = a1; v21 = a1; v29 = a1; v28 = a2; v22 = a2; v2 = *(_DWORD *)(a2 + 52); v3 = *(float *)(a2 + 56); v4 = *(float *)(a2 + 60); v5 = *(float *)(a2 + 64); v6 = *(float *)(a2 + 68); v7 = *(float *)(a2 + 72); v8 = *(_DWORD *)(a2 + 76); v9 = *(_DWORD *)(a2 + 80); v10 = *(_DWORD *)(a2 + 16); v11 = *(float *)(a2 + 20); v12 = *(float *)(a2 + 24); v13 = *(float *)(a2 + 28); v14 = *(float *)(a2 + 32); v15 = *(float *)(a2 + 36); v16 = *(float *)(a2 + 40); v17 = *(_DWORD *)(a2 + 84); v18 = *(float *)(v22 + 92); v20 = *(float *)(v22 + 88); v24 = v27; snprintf( v27, 1024LL, "\trepeat_last_n = %d, repeat_penalty = %.3f, frequency_penalty = %.3f, presence_penalty = %.3f\n" "\tdry_multiplier = %.3f, dry_base = %.3f, dry_allowed_length = %d, dry_penalty_last_n = %d\n" "\ttop_k = %d, top_p = %.3f, min_p = %.3f, xtc_probability = %.3f, xtc_threshold = %.3f, typical_p = %.3f, temp = %.3" "f\n" "\tmirostat = %d, mirostat_lr = %.3f, mirostat_ent = %.3f", v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v20); v25 = &v26; std::allocator<char>::allocator(&v26, 1024LL); std::string::basic_string<std::allocator<char>>(v23, (long long)v24, (long long)v25); std::allocator<char>::~allocator(&v26); return v21; }
13,182
common_params_sampling::print[abi:cxx11]() const
monkey531[P]llama/common/sampling.cpp
std::string common_params_sampling::print() const { char result[1024]; snprintf(result, sizeof(result), "\trepeat_last_n = %d, repeat_penalty = %.3f, frequency_penalty = %.3f, presence_penalty = %.3f\n" "\tdry_multiplier = %.3f, dry_base = %.3f, dry_allowed_length = %d, dry_penalty_last_n = %d\n" "\ttop_k = %d, top_p = %.3f, min_p = %.3f, xtc_probability = %.3f, xtc_threshold = %.3f, typical_p = %.3f, temp = %.3f\n" "\tmirostat = %d, mirostat_lr = %.3f, mirostat_ent = %.3f", penalty_last_n, penalty_repeat, penalty_freq, penalty_present, dry_multiplier, dry_base, dry_allowed_length, dry_penalty_last_n, top_k, top_p, min_p, xtc_probability, xtc_threshold, typ_p, temp, mirostat, mirostat_eta, mirostat_tau); return std::string(result); }
O1
cpp
common_params_sampling::print[abi:cxx11]() const: pushq %r14 pushq %rbx subq $0x448, %rsp # imm = 0x448 movq %rdi, %rbx movl 0x10(%rsi), %eax cvtss2sd 0x38(%rsi), %xmm0 cvtss2sd 0x3c(%rsi), %xmm1 cvtss2sd 0x40(%rsi), %xmm2 cvtss2sd 0x44(%rsi), %xmm3 cvtss2sd 0x48(%rsi), %xmm4 movl 0x34(%rsi), %ecx movl 0x4c(%rsi), %r8d cvtss2sd 0x14(%rsi), %xmm5 cvtss2sd 0x18(%rsi), %xmm6 cvtss2sd 0x1c(%rsi), %xmm7 cvtss2sd 0x20(%rsi), %xmm8 cvtss2sd 0x24(%rsi), %xmm9 movl 0x50(%rsi), %r9d cvtss2sd 0x28(%rsi), %xmm10 movl 0x54(%rsi), %edx cvtss2sd 0x5c(%rsi), %xmm11 cvtss2sd 0x58(%rsi), %xmm12 movsd %xmm12, 0x30(%rsp) movsd %xmm11, 0x28(%rsp) movl %edx, 0x20(%rsp) movsd %xmm10, 0x18(%rsp) movsd %xmm9, 0x10(%rsp) movsd %xmm8, 0x8(%rsp) movl %eax, (%rsp) leaq 0x2aacb(%rip), %rdx # 0xfd234 leaq 0x40(%rsp), %r14 movl $0x400, %esi # imm = 0x400 movq %r14, %rdi movb $0x8, %al callq 0x1be30 leaq 0x10(%rbx), %rax movq %rax, (%rbx) movq %r14, %rdi callq 0x1b3f0 leaq (%rsp,%rax), %rdx addq $0x40, %rdx movq %rbx, %rdi movq %r14, %rsi callq 0x28a68 movq %rbx, %rax addq $0x448, %rsp # imm = 0x448 popq %rbx popq %r14 retq
_ZNK22common_params_sampling5printB5cxx11Ev: push r14 push rbx sub rsp, 448h mov rbx, rdi mov eax, [rsi+10h] cvtss2sd xmm0, dword ptr [rsi+38h] cvtss2sd xmm1, dword ptr [rsi+3Ch] cvtss2sd xmm2, dword ptr [rsi+40h] cvtss2sd xmm3, dword ptr [rsi+44h] cvtss2sd xmm4, dword ptr [rsi+48h] mov ecx, [rsi+34h] mov r8d, [rsi+4Ch] cvtss2sd xmm5, dword ptr [rsi+14h] cvtss2sd xmm6, dword ptr [rsi+18h] cvtss2sd xmm7, dword ptr [rsi+1Ch] cvtss2sd xmm8, dword ptr [rsi+20h] cvtss2sd xmm9, dword ptr [rsi+24h] mov r9d, [rsi+50h] cvtss2sd xmm10, dword ptr [rsi+28h] mov edx, [rsi+54h] cvtss2sd xmm11, dword ptr [rsi+5Ch] cvtss2sd xmm12, dword ptr [rsi+58h] movsd [rsp+458h+var_428], xmm12 movsd [rsp+458h+var_430], xmm11 mov [rsp+458h+var_438], edx movsd [rsp+458h+var_440], xmm10 movsd [rsp+458h+var_448], xmm9 movsd [rsp+458h+var_450], xmm8 mov [rsp+458h+var_458], eax lea rdx, aRepeatLastNDRe; "\trepeat_last_n = %d, repeat_penalty = "... lea r14, [rsp+458h+var_418] mov esi, 400h mov rdi, r14 mov al, 8 call _snprintf lea rax, [rbx+10h] mov [rbx], rax mov rdi, r14 call _strlen lea rdx, [rsp+rax+458h+var_458] add rdx, 40h ; '@' mov rdi, rbx mov rsi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rax, rbx add rsp, 448h pop rbx pop r14 retn
_QWORD * common_params_sampling::print[abi:cxx11](_QWORD *a1, long long a2) { long long v2; // rax _BYTE v4[1048]; // [rsp+40h] [rbp-418h] BYREF snprintf( v4, 1024LL, "\trepeat_last_n = %d, repeat_penalty = %.3f, frequency_penalty = %.3f, presence_penalty = %.3f\n" "\tdry_multiplier = %.3f, dry_base = %.3f, dry_allowed_length = %d, dry_penalty_last_n = %d\n" "\ttop_k = %d, top_p = %.3f, min_p = %.3f, xtc_probability = %.3f, xtc_threshold = %.3f, typical_p = %.3f, temp = %.3" "f\n" "\tmirostat = %d, mirostat_lr = %.3f, mirostat_ent = %.3f", *(_DWORD *)(a2 + 52), *(float *)(a2 + 56), *(float *)(a2 + 60), *(float *)(a2 + 64), *(float *)(a2 + 68), *(float *)(a2 + 72), *(_DWORD *)(a2 + 76), *(_DWORD *)(a2 + 80), *(_DWORD *)(a2 + 16), *(float *)(a2 + 20), *(float *)(a2 + 24), *(float *)(a2 + 28), *(float *)(a2 + 32), *(float *)(a2 + 36), *(float *)(a2 + 40), *(_DWORD *)(a2 + 84), *(float *)(a2 + 92), *(float *)(a2 + 88)); *a1 = a1 + 2; v2 = strlen(v4); std::string::_M_construct<char const*>(a1, v4, (long long)&v4[v2]); return a1; }
print[abi:cxx11]: PUSH R14 PUSH RBX SUB RSP,0x448 MOV RBX,RDI MOV EAX,dword ptr [RSI + 0x10] CVTSS2SD XMM0,dword ptr [RSI + 0x38] CVTSS2SD XMM1,dword ptr [RSI + 0x3c] CVTSS2SD XMM2,dword ptr [RSI + 0x40] CVTSS2SD XMM3,dword ptr [RSI + 0x44] CVTSS2SD XMM4,dword ptr [RSI + 0x48] MOV ECX,dword ptr [RSI + 0x34] MOV R8D,dword ptr [RSI + 0x4c] CVTSS2SD XMM5,dword ptr [RSI + 0x14] CVTSS2SD XMM6,dword ptr [RSI + 0x18] CVTSS2SD XMM7,dword ptr [RSI + 0x1c] CVTSS2SD XMM8,dword ptr [RSI + 0x20] CVTSS2SD XMM9,dword ptr [RSI + 0x24] MOV R9D,dword ptr [RSI + 0x50] CVTSS2SD XMM10,dword ptr [RSI + 0x28] MOV EDX,dword ptr [RSI + 0x54] CVTSS2SD XMM11,dword ptr [RSI + 0x5c] CVTSS2SD XMM12,dword ptr [RSI + 0x58] MOVSD qword ptr [RSP + 0x30],XMM12 MOVSD qword ptr [RSP + 0x28],XMM11 MOV dword ptr [RSP + 0x20],EDX MOVSD qword ptr [RSP + 0x18],XMM10 MOVSD qword ptr [RSP + 0x10],XMM9 MOVSD qword ptr [RSP + 0x8],XMM8 MOV dword ptr [RSP],EAX LEA RDX,[0x1fd234] LEA R14,[RSP + 0x40] MOV ESI,0x400 MOV RDI,R14 MOV AL,0x8 CALL 0x0011be30 LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX MOV RDI,R14 CALL 0x0011b3f0 LEA RDX,[RSP + RAX*0x1] ADD RDX,0x40 MOV RDI,RBX MOV RSI,R14 CALL 0x00128a68 MOV RAX,RBX ADD RSP,0x448 POP RBX POP R14 RET
/* common_params_sampling::print[abi:cxx11]() const */ void common_params_sampling::print_abi_cxx11_(void) { long in_RSI; long *in_RDI; char local_418 [1032]; snprintf(local_418,0x400, "\trepeat_last_n = %d, repeat_penalty = %.3f, frequency_penalty = %.3f, presence_penalty = %.3f\n\tdry_multiplier = %.3f, dry_base = %.3f, dry_allowed_length = %d, dry_penalty_last_n = %d\n\ttop_k = %d, top_p = %.3f, min_p = %.3f, xtc_probability = %.3f, xtc_threshold = %.3f, typical_p = %.3f, temp = %.3f\n\tmirostat = %d, mirostat_lr = %.3f, mirostat_ent = %.3f" ,(double)*(float *)(in_RSI + 0x38),(double)*(float *)(in_RSI + 0x3c), (double)*(float *)(in_RSI + 0x40),(double)*(float *)(in_RSI + 0x44), (double)*(float *)(in_RSI + 0x48),(double)*(float *)(in_RSI + 0x14), (double)*(float *)(in_RSI + 0x18),(double)*(float *)(in_RSI + 0x1c), (ulong)*(uint *)(in_RSI + 0x34),(ulong)*(uint *)(in_RSI + 0x4c), (ulong)*(uint *)(in_RSI + 0x50),*(int4 *)(in_RSI + 0x10), (double)*(float *)(in_RSI + 0x20),(double)*(float *)(in_RSI + 0x24), (double)*(float *)(in_RSI + 0x28),*(int4 *)(in_RSI + 0x54), (double)*(float *)(in_RSI + 0x5c),(double)*(float *)(in_RSI + 0x58)); *in_RDI = (long)(in_RDI + 2); strlen(local_418); std::__cxx11::string::_M_construct<char_const*>(); return; }
13,183
my_interval_timer
eloqsql/mysys/my_getsystime.c
ulonglong my_interval_timer() { #ifdef HAVE_CLOCK_GETTIME struct timespec tp; clock_gettime(CLOCK_MONOTONIC, &tp); return tp.tv_sec*1000000000ULL+tp.tv_nsec; #elif defined(HAVE_GETHRTIME) return gethrtime(); #elif defined(_WIN32) DBUG_ASSERT(query_performance_frequency); LARGE_INTEGER t_cnt; QueryPerformanceCounter(&t_cnt); return (t_cnt.QuadPart / query_performance_frequency * 1000000000ULL) + ((t_cnt.QuadPart % query_performance_frequency) * 1000000000ULL / query_performance_frequency); #else /* TODO: check for other possibilities for hi-res timestamping */ struct timeval tv; gettimeofday(&tv,NULL); return tv.tv_sec*1000000000ULL+tv.tv_usec*1000ULL; #endif }
O0
c
my_interval_timer: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movl $0x1, %edi leaq -0x10(%rbp), %rsi callq 0x2a2f0 imulq $0x3b9aca00, -0x10(%rbp), %rax # imm = 0x3B9ACA00 addq -0x8(%rbp), %rax addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
my_interval_timer: push rbp mov rbp, rsp sub rsp, 10h mov edi, 1 lea rsi, [rbp+var_10] call _clock_gettime imul rax, [rbp+var_10], 3B9ACA00h add rax, [rbp+var_8] add rsp, 10h pop rbp retn
long long my_interval_timer() { _QWORD v1[2]; // [rsp+0h] [rbp-10h] BYREF clock_gettime(1LL, v1); return v1[1] + 1000000000LL * v1[0]; }
my_interval_timer: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV EDI,0x1 LEA RSI,[RBP + -0x10] CALL 0x0012a2f0 IMUL RAX,qword ptr [RBP + -0x10],0x3b9aca00 ADD RAX,qword ptr [RBP + -0x8] ADD RSP,0x10 POP RBP RET
long my_interval_timer(void) { timespec local_18; clock_gettime(1,&local_18); return local_18.tv_sec * 1000000000 + local_18.tv_nsec; }
13,184
compile_break_stmt
fabiosvm[P]rak/src/compiler.c
static inline void compile_break_stmt(RakCompiler *comp, RakError *err) { next(comp, err); consume(comp, RAK_TOKEN_KIND_SEMICOLON, err); RakLoop *loop = comp->loop; if (!loop) { rak_error_set(err, "break statement not in loop"); return; } uint16_t jump = emit_instr(comp, rak_nop_instr(), err); if (!rak_is_ok(err)) return; if (rak_slice_is_full(&loop->jumps)) { rak_error_set(err, "too many break statements in loop"); return; } rak_slice_append(&loop->jumps, jump); }
O0
c
compile_break_stmt: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdi addq $0x27f8, %rdi # imm = 0x27F8 movq -0x10(%rbp), %rsi callq 0x86c0 movq -0x10(%rbp), %rax testb $0x1, (%rax) jne 0x5a42 jmp 0x5b45 jmp 0x5a44 jmp 0x5a46 movq -0x8(%rbp), %rax cmpl $0x3, 0x2810(%rax) je 0x5a8d movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax addq $0x27f8, %rax # imm = 0x27F8 addq $0x18, %rax movl $0x3, %esi movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0x5df0 jmp 0x5b45 jmp 0x5a8f movq -0x8(%rbp), %rdi addq $0x27f8, %rdi # imm = 0x27F8 movq -0x10(%rbp), %rsi callq 0x86c0 movq -0x10(%rbp), %rax testb $0x1, (%rax) jne 0x5ab1 jmp 0x5b45 jmp 0x5ab3 jmp 0x5ab5 movq -0x8(%rbp), %rax movq 0x2830(%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) jne 0x5adf movq -0x10(%rbp), %rdi leaq 0x8ac7(%rip), %rsi # 0xe59d movb $0x0, %al callq 0x8220 jmp 0x5b45 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx xorl %esi, %esi callq 0x4700 movw %ax, -0x1a(%rbp) movq -0x10(%rbp), %rax testb $0x1, (%rax) jne 0x5afd jmp 0x5b45 movq -0x18(%rbp), %rax movl 0x10(%rax), %eax movq -0x18(%rbp), %rcx cmpl 0xc(%rcx), %eax jne 0x5b21 movq -0x10(%rbp), %rdi leaq 0x8aa1(%rip), %rsi # 0xe5b9 movb $0x0, %al callq 0x8220 jmp 0x5b45 jmp 0x5b23 movw -0x1a(%rbp), %dx movq -0x18(%rbp), %rax movq -0x18(%rbp), %rcx movslq 0x10(%rcx), %rcx movw %dx, 0x14(%rax,%rcx,2) movq -0x18(%rbp), %rax movl 0x10(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x10(%rax) addq $0x40, %rsp popq %rbp retq nopl (%rax,%rax)
compile_break_stmt: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_8] add rdi, 27F8h mov rsi, [rbp+var_10] call rak_lexer_next mov rax, [rbp+var_10] test byte ptr [rax], 1 jnz short loc_5A42 jmp loc_5B45 loc_5A42: jmp short $+2 loc_5A44: jmp short $+2 loc_5A46: mov rax, [rbp+var_8] cmp dword ptr [rax+2810h], 3 jz short loc_5A8D mov rdi, [rbp+var_10] mov rax, [rbp+var_8] add rax, 27F8h add rax, 18h mov esi, 3 mov rcx, [rax] mov [rsp+40h+var_40], rcx mov rcx, [rax+8] mov [rsp+40h+var_38], rcx mov rax, [rax+10h] mov [rsp+40h+var_30], rax call expected_token_error jmp loc_5B45 loc_5A8D: jmp short $+2 loc_5A8F: mov rdi, [rbp+var_8] add rdi, 27F8h mov rsi, [rbp+var_10] call rak_lexer_next mov rax, [rbp+var_10] test byte ptr [rax], 1 jnz short loc_5AB1 jmp loc_5B45 loc_5AB1: jmp short $+2 loc_5AB3: jmp short $+2 loc_5AB5: mov rax, [rbp+var_8] mov rax, [rax+2830h] mov [rbp+var_18], rax cmp [rbp+var_18], 0 jnz short loc_5ADF mov rdi, [rbp+var_10] lea rsi, aBreakStatement; "break statement not in loop" mov al, 0 call rak_error_set jmp short loc_5B45 loc_5ADF: mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] xor esi, esi call rak_chunk_append_instr mov [rbp+var_1A], ax mov rax, [rbp+var_10] test byte ptr [rax], 1 jnz short loc_5AFD jmp short loc_5B45 loc_5AFD: mov rax, [rbp+var_18] mov eax, [rax+10h] mov rcx, [rbp+var_18] cmp eax, [rcx+0Ch] jnz short loc_5B21 mov rdi, [rbp+var_10] lea rsi, aTooManyBreakSt; "too many break statements in loop" mov al, 0 call rak_error_set jmp short loc_5B45 loc_5B21: jmp short $+2 loc_5B23: mov dx, [rbp+var_1A] mov rax, [rbp+var_18] mov rcx, [rbp+var_18] movsxd rcx, dword ptr [rcx+10h] mov [rax+rcx*2+14h], dx mov rax, [rbp+var_18] mov ecx, [rax+10h] add ecx, 1 mov [rax+10h], ecx loc_5B45: add rsp, 40h pop rbp retn
long long compile_break_stmt(_QWORD *a1, _BYTE *a2) { int v2; // edx int v3; // r8d int v4; // r9d long long result; // rax int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d int v10; // edx int v11; // r8d int v12; // r9d __int16 appended; // [rsp+26h] [rbp-1Ah] long long v14; // [rsp+28h] [rbp-18h] rak_lexer_next(a1 + 1279, a2); result = (long long)a2; if ( (*a2 & 1) != 0 ) { if ( *((_DWORD *)a1 + 2564) == 3 ) { rak_lexer_next(a1 + 1279, a2); result = (long long)a2; if ( (*a2 & 1) != 0 ) { v14 = a1[1286]; if ( v14 ) { appended = rak_chunk_append_instr((long long)a1, 0, a2, v7, v8, v9); result = (long long)a2; if ( (*a2 & 1) != 0 ) { if ( *(_DWORD *)(v14 + 16) == *(_DWORD *)(v14 + 12) ) { return rak_error_set((_DWORD)a2, (unsigned int)"too many break statements in loop", v10, v14, v11, v12); } else { *(_WORD *)(v14 + 2LL * *(int *)(v14 + 16) + 20) = appended; result = v14; ++*(_DWORD *)(v14 + 16); } } } else { return rak_error_set((_DWORD)a2, (unsigned int)"break statement not in loop", v6, v7, v8, v9); } } } else { return expected_token_error((_DWORD)a2, 3, v2, a1[1283], v3, v4, a1[1282], a1[1283], a1[1284]); } } return result; }
compile_break_stmt: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x27f8 MOV RSI,qword ptr [RBP + -0x10] CALL 0x001086c0 MOV RAX,qword ptr [RBP + -0x10] TEST byte ptr [RAX],0x1 JNZ 0x00105a42 JMP 0x00105b45 LAB_00105a42: JMP 0x00105a44 LAB_00105a44: JMP 0x00105a46 LAB_00105a46: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x2810],0x3 JZ 0x00105a8d MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x27f8 ADD RAX,0x18 MOV ESI,0x3 MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x00105df0 JMP 0x00105b45 LAB_00105a8d: JMP 0x00105a8f LAB_00105a8f: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x27f8 MOV RSI,qword ptr [RBP + -0x10] CALL 0x001086c0 MOV RAX,qword ptr [RBP + -0x10] TEST byte ptr [RAX],0x1 JNZ 0x00105ab1 JMP 0x00105b45 LAB_00105ab1: JMP 0x00105ab3 LAB_00105ab3: JMP 0x00105ab5 LAB_00105ab5: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x2830] MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JNZ 0x00105adf MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x10e59d] MOV AL,0x0 CALL 0x00108220 JMP 0x00105b45 LAB_00105adf: MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] XOR ESI,ESI CALL 0x00104700 MOV word ptr [RBP + -0x1a],AX MOV RAX,qword ptr [RBP + -0x10] TEST byte ptr [RAX],0x1 JNZ 0x00105afd JMP 0x00105b45 LAB_00105afd: MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x18] CMP EAX,dword ptr [RCX + 0xc] JNZ 0x00105b21 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x10e5b9] MOV AL,0x0 CALL 0x00108220 JMP 0x00105b45 LAB_00105b21: JMP 0x00105b23 LAB_00105b23: MOV DX,word ptr [RBP + -0x1a] MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x18] MOVSXD RCX,dword ptr [RCX + 0x10] MOV word ptr [RAX + RCX*0x2 + 0x14],DX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX + 0x10] ADD ECX,0x1 MOV dword ptr [RAX + 0x10],ECX LAB_00105b45: ADD RSP,0x40 POP RBP RET
void compile_break_stmt(long param_1,byte *param_2) { long lVar1; int2 uVar2; rak_lexer_next(param_1 + 0x27f8,param_2); if ((*param_2 & 1) != 0) { if (*(int *)(param_1 + 0x2810) == 3) { rak_lexer_next(param_1 + 0x27f8,param_2); if ((*param_2 & 1) != 0) { lVar1 = *(long *)(param_1 + 0x2830); if (lVar1 == 0) { rak_error_set(param_2,"break statement not in loop"); } else { uVar2 = rak_chunk_append_instr(param_1,0,param_2); if ((*param_2 & 1) != 0) { if (*(int *)(lVar1 + 0x10) == *(int *)(lVar1 + 0xc)) { rak_error_set(param_2,"too many break statements in loop"); } else { *(int2 *)(lVar1 + 0x14 + (long)*(int *)(lVar1 + 0x10) * 2) = uVar2; *(int *)(lVar1 + 0x10) = *(int *)(lVar1 + 0x10) + 1; } } } } } else { expected_token_error(param_2,3); } } return; }
13,185
tree_walk
eloqsql/mysys/tree.c
int tree_walk(TREE *tree, tree_walk_action action, void *argument, TREE_WALK visit) { switch (visit) { case left_root_right: return tree_walk_left_root_right(tree,tree->root,action,argument); case right_root_left: return tree_walk_right_root_left(tree,tree->root,action,argument); } return 0; /* Keep gcc happy */ }
O0
c
tree_walk: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x28(%rbp) testl %eax, %eax je 0xc624d jmp 0xc6243 movl -0x28(%rbp), %eax subl $0x1, %eax je 0xc626a jmp 0xc6287 movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rax movq (%rax), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0xc62a0 movl %eax, -0x4(%rbp) jmp 0xc628e movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rax movq (%rax), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0xc6380 movl %eax, -0x4(%rbp) jmp 0xc628e movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
tree_walk: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov eax, [rbp+var_24] mov [rbp+var_28], eax test eax, eax jz short loc_C624D jmp short $+2 loc_C6243: mov eax, [rbp+var_28] sub eax, 1 jz short loc_C626A jmp short loc_C6287 loc_C624D: mov rdi, [rbp+var_10] mov rax, [rbp+var_10] mov rsi, [rax] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call tree_walk_left_root_right mov [rbp+var_4], eax jmp short loc_C628E loc_C626A: mov rdi, [rbp+var_10] mov rax, [rbp+var_10] mov rsi, [rax] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call tree_walk_right_root_left mov [rbp+var_4], eax jmp short loc_C628E loc_C6287: mov [rbp+var_4], 0 loc_C628E: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long tree_walk(_QWORD *a1, long long a2, long long a3, int a4) { if ( a4 ) { if ( a4 == 1 ) return (unsigned int)tree_walk_right_root_left(a1, *a1, a2, a3); else return 0; } else { return (unsigned int)tree_walk_left_root_right(a1, *a1, a2, a3); } }
tree_walk: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x28],EAX TEST EAX,EAX JZ 0x001c624d JMP 0x001c6243 LAB_001c6243: MOV EAX,dword ptr [RBP + -0x28] SUB EAX,0x1 JZ 0x001c626a JMP 0x001c6287 LAB_001c624d: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x001c62a0 MOV dword ptr [RBP + -0x4],EAX JMP 0x001c628e LAB_001c626a: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x001c6380 MOV dword ptr [RBP + -0x4],EAX JMP 0x001c628e LAB_001c6287: MOV dword ptr [RBP + -0x4],0x0 LAB_001c628e: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 tree_walk(int8 *param_1,int8 param_2,int8 param_3,int param_4) { int4 local_c; if (param_4 == 0) { local_c = tree_walk_left_root_right(param_1,*param_1,param_2,param_3); } else if (param_4 == 1) { local_c = tree_walk_right_root_left(param_1,*param_1,param_2,param_3); } else { local_c = 0; } return local_c; }
13,186
js_std_file_read_write
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_std_file_read_write(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { FILE *f = js_std_file_get(ctx, this_val); uint64_t pos, len; size_t size, ret; uint8_t *buf; if (!f) return JS_EXCEPTION; if (JS_ToIndex(ctx, &pos, argv[1])) return JS_EXCEPTION; if (JS_ToIndex(ctx, &len, argv[2])) return JS_EXCEPTION; buf = JS_GetArrayBuffer(ctx, &size, argv[0]); if (!buf) return JS_EXCEPTION; if (pos + len > size) return JS_ThrowRangeError(ctx, "read/write array buffer overflow"); if (magic) ret = fwrite(buf + pos, 1, len, f); else ret = fread(buf + pos, 1, len, f); return JS_NewInt64(ctx, ret); }
O0
c
js_std_file_read_write: subq $0xf8, %rsp movq %rsi, 0x58(%rsp) movq %rdx, 0x60(%rsp) movq %rdi, 0x50(%rsp) movl %ecx, 0x4c(%rsp) movq %r8, 0x40(%rsp) movl %r9d, 0x3c(%rsp) movq 0x50(%rsp), %rdi movq 0x58(%rsp), %rsi movq 0x60(%rsp), %rdx callq 0x13a80 movq %rax, 0x30(%rsp) cmpq $0x0, 0x30(%rsp) jne 0x1328b movl $0x0, 0x68(%rsp) movq $0x6, 0x70(%rsp) jmp 0x13502 movq 0x50(%rsp), %rdi movq 0x40(%rsp), %rax movq 0x10(%rax), %rdx movq 0x18(%rax), %rcx leaq 0x28(%rsp), %rsi callq 0x39140 cmpl $0x0, %eax je 0x132c2 movl $0x0, 0x68(%rsp) movq $0x6, 0x70(%rsp) jmp 0x13502 movq 0x50(%rsp), %rdi movq 0x40(%rsp), %rax movq 0x20(%rax), %rdx movq 0x28(%rax), %rcx leaq 0x20(%rsp), %rsi callq 0x39140 cmpl $0x0, %eax je 0x132f9 movl $0x0, 0x68(%rsp) movq $0x6, 0x70(%rsp) jmp 0x13502 movq 0x50(%rsp), %rdi movq 0x40(%rsp), %rax movq (%rax), %rdx movq 0x8(%rax), %rcx leaq 0x18(%rsp), %rsi callq 0x58010 movq %rax, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) jne 0x13337 movl $0x0, 0x68(%rsp) movq $0x6, 0x70(%rsp) jmp 0x13502 movq 0x28(%rsp), %rax addq 0x20(%rsp), %rax cmpq 0x18(%rsp), %rax jbe 0x1336a movq 0x50(%rsp), %rdi leaq 0xf694b(%rip), %rsi # 0x109c9f movb $0x0, %al callq 0x29670 movq %rax, 0x68(%rsp) movq %rdx, 0x70(%rsp) jmp 0x13502 cmpl $0x0, 0x3c(%rsp) je 0x13396 movq 0x8(%rsp), %rdi addq 0x28(%rsp), %rdi movq 0x20(%rsp), %rdx movq 0x30(%rsp), %rcx movl $0x1, %esi callq 0xe8c0 movq %rax, 0x10(%rsp) jmp 0x133b9 movq 0x8(%rsp), %rdi addq 0x28(%rsp), %rdi movq 0x20(%rsp), %rdx movq 0x30(%rsp), %rcx movl $0x1, %esi callq 0xe170 movq %rax, 0x10(%rsp) movq 0x50(%rsp), %rcx movq 0x10(%rsp), %rax movq %rcx, 0xa0(%rsp) movq %rax, 0x98(%rsp) cmpq $-0x80000000, 0x98(%rsp) # imm = 0x80000000 jl 0x1346d cmpq $0x7fffffff, 0x98(%rsp) # imm = 0x7FFFFFFF jg 0x1346d movq 0xa0(%rsp), %rcx movl 0x98(%rsp), %eax movq %rcx, 0xc0(%rsp) movl %eax, 0xbc(%rsp) movl 0xbc(%rsp), %eax movl %eax, 0xc8(%rsp) movq $0x0, 0xd0(%rsp) movq 0xc8(%rsp), %rcx movq 0xd0(%rsp), %rax movq %rcx, 0x88(%rsp) movq %rax, 0x90(%rsp) movq 0x88(%rsp), %rax movq %rax, 0xa8(%rsp) movq 0x90(%rsp), %rax movq %rax, 0xb0(%rsp) jmp 0x134e8 movq 0xa0(%rsp), %rax cvtsi2sdq 0x98(%rsp), %xmm0 movq %rax, 0xe0(%rsp) movsd %xmm0, 0xd8(%rsp) movsd 0xd8(%rsp), %xmm0 callq 0x14820 movq %rax, 0xe8(%rsp) movq %rdx, 0xf0(%rsp) movq 0xe8(%rsp), %rcx movq 0xf0(%rsp), %rax movq %rcx, 0x78(%rsp) movq %rax, 0x80(%rsp) movq 0x78(%rsp), %rax movq %rax, 0xa8(%rsp) movq 0x80(%rsp), %rax movq %rax, 0xb0(%rsp) movq 0xa8(%rsp), %rcx movq 0xb0(%rsp), %rax movq %rcx, 0x68(%rsp) movq %rax, 0x70(%rsp) movq 0x68(%rsp), %rax movq 0x70(%rsp), %rdx addq $0xf8, %rsp retq nopw %cs:(%rax,%rax)
js_std_file_read_write: sub rsp, 0F8h mov [rsp+0F8h+var_A0], rsi mov [rsp+0F8h+var_98], rdx mov [rsp+0F8h+var_A8], rdi mov [rsp+0F8h+var_AC], ecx mov [rsp+0F8h+var_B8], r8 mov [rsp+0F8h+var_BC], r9d mov rdi, [rsp+0F8h+var_A8] mov rsi, [rsp+0F8h+var_A0] mov rdx, [rsp+0F8h+var_98] call js_std_file_get mov [rsp+0F8h+var_C8], rax cmp [rsp+0F8h+var_C8], 0 jnz short loc_1328B mov dword ptr [rsp+0F8h+var_90], 0 mov [rsp+0F8h+var_88], 6 jmp loc_13502 loc_1328B: mov rdi, [rsp+0F8h+var_A8] mov rax, [rsp+0F8h+var_B8] mov rdx, [rax+10h] mov rcx, [rax+18h] lea rsi, [rsp+0F8h+var_D0] call JS_ToIndex cmp eax, 0 jz short loc_132C2 mov dword ptr [rsp+0F8h+var_90], 0 mov [rsp+0F8h+var_88], 6 jmp loc_13502 loc_132C2: mov rdi, [rsp+0F8h+var_A8] mov rax, [rsp+0F8h+var_B8] mov rdx, [rax+20h] mov rcx, [rax+28h] lea rsi, [rsp+0F8h+var_D8] call JS_ToIndex cmp eax, 0 jz short loc_132F9 mov dword ptr [rsp+0F8h+var_90], 0 mov [rsp+0F8h+var_88], 6 jmp loc_13502 loc_132F9: mov rdi, [rsp+0F8h+var_A8] mov rax, [rsp+0F8h+var_B8] mov rdx, [rax] mov rcx, [rax+8] lea rsi, [rsp+0F8h+var_E0] call JS_GetArrayBuffer mov [rsp+0F8h+var_F0], rax cmp [rsp+0F8h+var_F0], 0 jnz short loc_13337 mov dword ptr [rsp+0F8h+var_90], 0 mov [rsp+0F8h+var_88], 6 jmp loc_13502 loc_13337: mov rax, [rsp+0F8h+var_D0] add rax, [rsp+0F8h+var_D8] cmp rax, [rsp+0F8h+var_E0] jbe short loc_1336A mov rdi, [rsp+0F8h+var_A8] lea rsi, aReadWriteArray; "read/write array buffer overflow" mov al, 0 call JS_ThrowRangeError mov [rsp+0F8h+var_90], rax mov [rsp+0F8h+var_88], rdx jmp loc_13502 loc_1336A: cmp [rsp+0F8h+var_BC], 0 jz short loc_13396 mov rdi, [rsp+0F8h+var_F0] add rdi, [rsp+0F8h+var_D0] mov rdx, [rsp+0F8h+var_D8] mov rcx, [rsp+0F8h+var_C8] mov esi, 1 call _fwrite mov [rsp+0F8h+var_E8], rax jmp short loc_133B9 loc_13396: mov rdi, [rsp+0F8h+var_F0] add rdi, [rsp+0F8h+var_D0] mov rdx, [rsp+0F8h+var_D8] mov rcx, [rsp+0F8h+var_C8] mov esi, 1 call _fread mov [rsp+0F8h+var_E8], rax loc_133B9: mov rcx, [rsp+0F8h+var_A8] mov rax, [rsp+0F8h+var_E8] mov [rsp+0F8h+var_58], rcx mov [rsp+0F8h+var_60], rax cmp [rsp+0F8h+var_60], 0FFFFFFFF80000000h jl loc_1346D cmp [rsp+0F8h+var_60], 7FFFFFFFh jg short loc_1346D mov rcx, [rsp+0F8h+var_58] mov eax, dword ptr [rsp+0F8h+var_60] mov [rsp+0F8h+var_38], rcx mov [rsp+0F8h+var_3C], eax mov eax, [rsp+0F8h+var_3C] mov dword ptr [rsp+0F8h+var_30], eax mov [rsp+0F8h+var_28], 0 mov rcx, [rsp+0F8h+var_30] mov rax, [rsp+0F8h+var_28] mov [rsp+0F8h+var_70], rcx mov [rsp+0F8h+var_68], rax mov rax, [rsp+0F8h+var_70] mov [rsp+0F8h+var_50], rax mov rax, [rsp+0F8h+var_68] mov [rsp+0F8h+var_48], rax jmp short loc_134E8 loc_1346D: mov rax, [rsp+0F8h+var_58] cvtsi2sd xmm0, [rsp+0F8h+var_60] mov [rsp+0F8h+var_18], rax movsd [rsp+0F8h+var_20], xmm0 movsd xmm0, [rsp+0F8h+var_20] call __JS_NewFloat64 mov [rsp+0F8h+var_10], rax mov [rsp+0F8h+var_8], rdx mov rcx, [rsp+0F8h+var_10] mov rax, [rsp+0F8h+var_8] mov [rsp+0F8h+var_80], rcx mov [rsp+0F8h+var_78], rax mov rax, [rsp+0F8h+var_80] mov [rsp+0F8h+var_50], rax mov rax, [rsp+0F8h+var_78] mov [rsp+0F8h+var_48], rax loc_134E8: mov rcx, [rsp+0F8h+var_50] mov rax, [rsp+0F8h+var_48] mov [rsp+0F8h+var_90], rcx mov [rsp+0F8h+var_88], rax loc_13502: mov rax, [rsp+0F8h+var_90] mov rdx, [rsp+0F8h+var_88] add rsp, 0F8h retn
long long js_std_file_read_write(long long a1, long long a2, long long a3, int a4, _QWORD *a5, int a6) { int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d long long v10; // rdx long long v11; // rdx long long ArrayBuffer; // [rsp+8h] [rbp-F0h] signed long long v14; // [rsp+10h] [rbp-E8h] unsigned long long v15; // [rsp+18h] [rbp-E0h] BYREF long long v16; // [rsp+20h] [rbp-D8h] BYREF long long v17; // [rsp+28h] [rbp-D0h] BYREF long long v18; // [rsp+30h] [rbp-C8h] int v19; // [rsp+3Ch] [rbp-BCh] _QWORD *v20; // [rsp+40h] [rbp-B8h] int v21; // [rsp+4Ch] [rbp-ACh] long long v22; // [rsp+50h] [rbp-A8h] long long v23; // [rsp+58h] [rbp-A0h] long long v24; // [rsp+60h] [rbp-98h] long long v25; // [rsp+68h] [rbp-90h] long long v26; // [rsp+70h] [rbp-88h] long long v27; // [rsp+78h] [rbp-80h] long long v28; // [rsp+80h] [rbp-78h] long long v29; // [rsp+88h] [rbp-70h] long long v30; // [rsp+90h] [rbp-68h] long long v31; // [rsp+98h] [rbp-60h] long long v32; // [rsp+A0h] [rbp-58h] long long v33; // [rsp+A8h] [rbp-50h] long long v34; // [rsp+B0h] [rbp-48h] int v35; // [rsp+BCh] [rbp-3Ch] long long v36; // [rsp+C0h] [rbp-38h] long long v37; // [rsp+C8h] [rbp-30h] long long v38; // [rsp+D0h] [rbp-28h] double v39; // [rsp+D8h] [rbp-20h] long long v40; // [rsp+E0h] [rbp-18h] long long v41; // [rsp+E8h] [rbp-10h] long long v42; // [rsp+F0h] [rbp-8h] v23 = a2; v24 = a3; v22 = a1; v21 = a4; v20 = a5; v19 = a6; v18 = js_std_file_get(a1, a2, a3); if ( v18 ) { if ( (unsigned int)JS_ToIndex(v22, &v17, v20[2], v20[3]) ) { LODWORD(v25) = 0; v26 = 6LL; } else if ( (unsigned int)JS_ToIndex(v22, &v16, v20[4], v20[5]) ) { LODWORD(v25) = 0; v26 = 6LL; } else { ArrayBuffer = JS_GetArrayBuffer(v22, &v15, *v20, v20[1]); if ( ArrayBuffer ) { if ( v16 + v17 <= v15 ) { if ( v19 ) v14 = fwrite(v17 + ArrayBuffer, 1LL, v16, v18); else v14 = fread(v17 + ArrayBuffer, 1LL, v16, v18); v32 = v22; v31 = v14; if ( v14 < (long long)0xFFFFFFFF80000000LL || v31 > 0x7FFFFFFF ) { v40 = v32; v39 = (double)(int)v31; v41 = _JS_NewFloat64((double)(int)v31); v42 = v11; v27 = v41; v28 = v11; v33 = v41; v34 = v11; } else { v36 = v32; v35 = v31; LODWORD(v37) = v31; v38 = 0LL; v29 = v37; v30 = 0LL; v33 = v37; v34 = 0LL; } v25 = v33; v26 = v34; } else { v25 = JS_ThrowRangeError(v22, (unsigned int)"read/write array buffer overflow", v6, v7, v8, v9); v26 = v10; } } else { LODWORD(v25) = 0; v26 = 6LL; } } } else { LODWORD(v25) = 0; v26 = 6LL; } return v25; }
js_std_file_read_write: SUB RSP,0xf8 MOV qword ptr [RSP + 0x58],RSI MOV qword ptr [RSP + 0x60],RDX MOV qword ptr [RSP + 0x50],RDI MOV dword ptr [RSP + 0x4c],ECX MOV qword ptr [RSP + 0x40],R8 MOV dword ptr [RSP + 0x3c],R9D MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x58] MOV RDX,qword ptr [RSP + 0x60] CALL 0x00113a80 MOV qword ptr [RSP + 0x30],RAX CMP qword ptr [RSP + 0x30],0x0 JNZ 0x0011328b MOV dword ptr [RSP + 0x68],0x0 MOV qword ptr [RSP + 0x70],0x6 JMP 0x00113502 LAB_0011328b: MOV RDI,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RAX + 0x18] LEA RSI,[RSP + 0x28] CALL 0x00139140 CMP EAX,0x0 JZ 0x001132c2 MOV dword ptr [RSP + 0x68],0x0 MOV qword ptr [RSP + 0x70],0x6 JMP 0x00113502 LAB_001132c2: MOV RDI,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RAX + 0x28] LEA RSI,[RSP + 0x20] CALL 0x00139140 CMP EAX,0x0 JZ 0x001132f9 MOV dword ptr [RSP + 0x68],0x0 MOV qword ptr [RSP + 0x70],0x6 JMP 0x00113502 LAB_001132f9: MOV RDI,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x18] CALL 0x00158010 MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x8],0x0 JNZ 0x00113337 MOV dword ptr [RSP + 0x68],0x0 MOV qword ptr [RSP + 0x70],0x6 JMP 0x00113502 LAB_00113337: MOV RAX,qword ptr [RSP + 0x28] ADD RAX,qword ptr [RSP + 0x20] CMP RAX,qword ptr [RSP + 0x18] JBE 0x0011336a MOV RDI,qword ptr [RSP + 0x50] LEA RSI,[0x209c9f] MOV AL,0x0 CALL 0x00129670 MOV qword ptr [RSP + 0x68],RAX MOV qword ptr [RSP + 0x70],RDX JMP 0x00113502 LAB_0011336a: CMP dword ptr [RSP + 0x3c],0x0 JZ 0x00113396 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x30] MOV ESI,0x1 CALL 0x0010e8c0 MOV qword ptr [RSP + 0x10],RAX JMP 0x001133b9 LAB_00113396: MOV RDI,qword ptr [RSP + 0x8] ADD RDI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x30] MOV ESI,0x1 CALL 0x0010e170 MOV qword ptr [RSP + 0x10],RAX LAB_001133b9: MOV RCX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0xa0],RCX MOV qword ptr [RSP + 0x98],RAX CMP qword ptr [RSP + 0x98],-0x80000000 JL 0x0011346d CMP qword ptr [RSP + 0x98],0x7fffffff JG 0x0011346d MOV RCX,qword ptr [RSP + 0xa0] MOV EAX,dword ptr [RSP + 0x98] MOV qword ptr [RSP + 0xc0],RCX MOV dword ptr [RSP + 0xbc],EAX MOV EAX,dword ptr [RSP + 0xbc] MOV dword ptr [RSP + 0xc8],EAX MOV qword ptr [RSP + 0xd0],0x0 MOV RCX,qword ptr [RSP + 0xc8] MOV RAX,qword ptr [RSP + 0xd0] MOV qword ptr [RSP + 0x88],RCX MOV qword ptr [RSP + 0x90],RAX MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0xa8],RAX MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0xb0],RAX JMP 0x001134e8 LAB_0011346d: MOV RAX,qword ptr [RSP + 0xa0] CVTSI2SD XMM0,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0xe0],RAX MOVSD qword ptr [RSP + 0xd8],XMM0 MOVSD XMM0,qword ptr [RSP + 0xd8] CALL 0x00114820 MOV qword ptr [RSP + 0xe8],RAX MOV qword ptr [RSP + 0xf0],RDX MOV RCX,qword ptr [RSP + 0xe8] MOV RAX,qword ptr [RSP + 0xf0] MOV qword ptr [RSP + 0x78],RCX MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0xa8],RAX MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0xb0],RAX LAB_001134e8: MOV RCX,qword ptr [RSP + 0xa8] MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0x68],RCX MOV qword ptr [RSP + 0x70],RAX LAB_00113502: MOV RAX,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] ADD RSP,0xf8 RET
int1 [16] js_std_file_read_write (int8 param_1,int8 param_2,int8 param_3,int4 param_4, int8 *param_5,int param_6) { int iVar1; int4 extraout_EAX; long lVar2; int4 extraout_var; int8 extraout_RDX; int1 auVar3 [16]; size_t local_e8; ulong local_e0; size_t local_d8; long local_d0; FILE *local_c8; int local_bc; int8 *local_b8; int4 local_ac; int8 local_a8; int8 local_a0; int8 local_98; int4 local_90; int4 uStack_8c; int8 local_88; size_t local_60; int8 local_58; int4 local_50; int4 uStack_4c; int8 local_48; int4 uStack_2c; double local_20; int8 local_18; local_bc = param_6; local_b8 = param_5; local_ac = param_4; local_a8 = param_1; local_a0 = param_2; local_98 = param_3; local_c8 = (FILE *)js_std_file_get(param_1,param_2,param_3); if (local_c8 == (FILE *)0x0) { local_90 = 0; local_88 = 6; } else { iVar1 = JS_ToIndex(local_a8,&local_d0,local_b8[2],local_b8[3]); if (iVar1 == 0) { iVar1 = JS_ToIndex(local_a8,&local_d8,local_b8[4],local_b8[5]); if (iVar1 == 0) { lVar2 = JS_GetArrayBuffer(local_a8,&local_e0,*local_b8,local_b8[1]); if (lVar2 == 0) { local_90 = 0; local_88 = 6; } else if (local_e0 < local_d0 + local_d8) { auVar3 = JS_ThrowRangeError(local_a8,"read/write array buffer overflow"); local_88 = auVar3._8_8_; local_90 = auVar3._0_4_; uStack_8c = auVar3._4_4_; } else { if (local_bc == 0) { local_e8 = fread((void *)(lVar2 + local_d0),1,local_d8,local_c8); } else { local_e8 = fwrite((void *)(lVar2 + local_d0),1,local_d8,local_c8); } local_58 = local_a8; local_60 = local_e8; if (((long)local_e8 < -0x80000000) || (0x7fffffff < (long)local_e8)) { local_20 = (double)(long)local_e8; local_18 = local_a8; __JS_NewFloat64(local_20); local_48 = extraout_RDX; local_50 = extraout_EAX; uStack_4c = extraout_var; } else { local_60._0_4_ = (int4)local_e8; local_50 = (int4)local_60; uStack_4c = uStack_2c; local_48 = 0; } local_90 = local_50; uStack_8c = uStack_4c; local_88 = local_48; } } else { local_90 = 0; local_88 = 6; } } else { local_90 = 0; local_88 = 6; } } auVar3._4_4_ = uStack_8c; auVar3._0_4_ = local_90; auVar3._8_8_ = local_88; return auVar3; }
13,187
js_std_file_read_write
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_std_file_read_write(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { FILE *f = js_std_file_get(ctx, this_val); uint64_t pos, len; size_t size, ret; uint8_t *buf; if (!f) return JS_EXCEPTION; if (JS_ToIndex(ctx, &pos, argv[1])) return JS_EXCEPTION; if (JS_ToIndex(ctx, &len, argv[2])) return JS_EXCEPTION; buf = JS_GetArrayBuffer(ctx, &size, argv[0]); if (!buf) return JS_EXCEPTION; if (pos + len > size) return JS_ThrowRangeError(ctx, "read/write array buffer overflow"); if (magic) ret = fwrite(buf + pos, 1, len, f); else ret = fread(buf + pos, 1, len, f); return JS_NewInt64(ctx, ret); }
O1
c
js_std_file_read_write: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movl %r9d, %ebp movq %r8, %r12 movq %rdi, %r15 callq 0x16588 movl $0x6, %ebx testq %rax, %rax je 0x16272 movq %rax, %r14 movq 0x10(%r12), %rdx movq 0x18(%r12), %rcx leaq 0x18(%rsp), %rsi movq %r15, %rdi callq 0x27a6f testl %eax, %eax jne 0x16272 movq 0x20(%r12), %rdx movq 0x28(%r12), %rcx leaq 0x10(%rsp), %rsi movq %r15, %rdi callq 0x27a6f testl %eax, %eax je 0x1628c xorl %eax, %eax xorl %r12d, %r12d movl %eax, %eax orq %r12, %rax movq %rbx, %rdx addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq (%r12), %rdx movq 0x8(%r12), %rcx leaq 0x8(%rsp), %rsi movq %r15, %rdi callq 0x38f81 testq %rax, %rax je 0x16272 movabsq $-0x100000000, %r12 # imm = 0xFFFFFFFF00000000 movq 0x18(%rsp), %rcx movq 0x10(%rsp), %rdx leaq (%rdx,%rcx), %rsi cmpq 0x8(%rsp), %rsi jbe 0x162dc leaq 0x858ba(%rip), %rsi # 0x9bb87 movq %r15, %rdi xorl %eax, %eax callq 0x20add movq %rdx, %rbx jmp 0x1631b addq %rcx, %rax movl $0x1, %esi movq %rax, %rdi movq %r14, %rcx testl %ebp, %ebp je 0x162f5 callq 0xe8d0 jmp 0x162fa callq 0xe170 movslq %eax, %rcx xorl %edx, %edx cmpq %rax, %rcx cvtsi2sd %rax, %xmm0 movl %ecx, %ecx movq %xmm0, %rax cmoveq %rcx, %rax movl $0x7, %ebx cmoveq %rdx, %rbx andq %rax, %r12 jmp 0x16277
js_std_file_read_write: push rbp push r15 push r14 push r12 push rbx sub rsp, 20h mov ebp, r9d mov r12, r8 mov r15, rdi call js_std_file_get mov ebx, 6 test rax, rax jz short loc_16272 mov r14, rax mov rdx, [r12+10h] mov rcx, [r12+18h] lea rsi, [rsp+48h+var_30] mov rdi, r15 call JS_ToIndex test eax, eax jnz short loc_16272 mov rdx, [r12+20h] mov rcx, [r12+28h] lea rsi, [rsp+48h+var_38] mov rdi, r15 call JS_ToIndex test eax, eax jz short loc_1628C loc_16272: xor eax, eax xor r12d, r12d loc_16277: mov eax, eax or rax, r12 mov rdx, rbx add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_1628C: mov rdx, [r12] mov rcx, [r12+8] lea rsi, [rsp+48h+var_40] mov rdi, r15 call JS_GetArrayBuffer test rax, rax jz short loc_16272 mov r12, 0FFFFFFFF00000000h mov rcx, [rsp+48h+var_30] mov rdx, [rsp+48h+var_38] lea rsi, [rdx+rcx] cmp rsi, [rsp+48h+var_40] jbe short loc_162DC lea rsi, aReadWriteArray; "read/write array buffer overflow" mov rdi, r15 xor eax, eax call JS_ThrowRangeError mov rbx, rdx jmp short loc_1631B loc_162DC: add rax, rcx mov esi, 1 mov rdi, rax mov rcx, r14 test ebp, ebp jz short loc_162F5 call _fwrite jmp short loc_162FA loc_162F5: call _fread loc_162FA: movsxd rcx, eax xor edx, edx cmp rcx, rax cvtsi2sd xmm0, rax mov ecx, ecx movq rax, xmm0 cmovz rax, rcx mov ebx, 7 cmovz rbx, rdx loc_1631B: and r12, rax jmp loc_16277
unsigned long long js_std_file_read_write(long long a1, long long a2, long long a3, long long a4, _QWORD *a5, int a6) { long long v8; // rax long long v9; // r14 double v10; // rax unsigned long long v11; // r12 long long ArrayBuffer; // rax int v14; // r8d int v15; // r9d long long v16; // rdi long long v17; // rax bool v18; // zf double v19; // rcx unsigned long long v20; // [rsp+8h] [rbp-40h] BYREF long long v21; // [rsp+10h] [rbp-38h] BYREF _QWORD v22[6]; // [rsp+18h] [rbp-30h] BYREF v8 = js_std_file_get(a1); if ( !v8 || (v9 = v8, (unsigned int)JS_ToIndex(a1, v22, a5[2], a5[3])) || (unsigned int)JS_ToIndex(a1, &v21, a5[4], a5[5]) || (ArrayBuffer = JS_GetArrayBuffer(a1, &v20, *a5, a5[1])) == 0 ) { LODWORD(v10) = 0; v11 = 0LL; } else { if ( v21 + v22[0] <= v20 ) { v16 = v22[0] + ArrayBuffer; if ( a6 ) v17 = fwrite(v16, 1LL, v21, v9); else v17 = fread(v16, 1LL, v21, v9); v18 = (int)v17 == v17; *(_QWORD *)&v19 = (unsigned int)v17; v10 = (double)(int)v17; if ( v18 ) v10 = v19; } else { v10 = COERCE_DOUBLE(JS_ThrowRangeError(a1, (unsigned int)"read/write array buffer overflow", v21, v22[0], v14, v15)); } v11 = *(_QWORD *)&v10 & 0xFFFFFFFF00000000LL; } return v11 | LODWORD(v10); }
js_std_file_read_write: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV EBP,R9D MOV R12,R8 MOV R15,RDI CALL 0x00116588 MOV EBX,0x6 TEST RAX,RAX JZ 0x00116272 MOV R14,RAX MOV RDX,qword ptr [R12 + 0x10] MOV RCX,qword ptr [R12 + 0x18] LEA RSI,[RSP + 0x18] MOV RDI,R15 CALL 0x00127a6f TEST EAX,EAX JNZ 0x00116272 MOV RDX,qword ptr [R12 + 0x20] MOV RCX,qword ptr [R12 + 0x28] LEA RSI,[RSP + 0x10] MOV RDI,R15 CALL 0x00127a6f TEST EAX,EAX JZ 0x0011628c LAB_00116272: XOR EAX,EAX XOR R12D,R12D LAB_00116277: MOV EAX,EAX OR RAX,R12 MOV RDX,RBX ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0011628c: MOV RDX,qword ptr [R12] MOV RCX,qword ptr [R12 + 0x8] LEA RSI,[RSP + 0x8] MOV RDI,R15 CALL 0x00138f81 TEST RAX,RAX JZ 0x00116272 MOV R12,-0x100000000 MOV RCX,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x10] LEA RSI,[RDX + RCX*0x1] CMP RSI,qword ptr [RSP + 0x8] JBE 0x001162dc LEA RSI,[0x19bb87] MOV RDI,R15 XOR EAX,EAX CALL 0x00120add MOV RBX,RDX JMP 0x0011631b LAB_001162dc: ADD RAX,RCX MOV ESI,0x1 MOV RDI,RAX MOV RCX,R14 TEST EBP,EBP JZ 0x001162f5 CALL 0x0010e8d0 JMP 0x001162fa LAB_001162f5: CALL 0x0010e170 LAB_001162fa: MOVSXD RCX,EAX XOR EDX,EDX CMP RCX,RAX CVTSI2SD XMM0,RAX MOV ECX,ECX MOVQ RAX,XMM0 CMOVZ RAX,RCX MOV EBX,0x7 CMOVZ RBX,RDX LAB_0011631b: AND R12,RAX JMP 0x00116277
int1 [16] js_std_file_read_write(int8 param_1) { int1 auVar1 [16]; int iVar2; FILE *__stream; long lVar3; double dVar4; int8 *in_R8; int in_R9D; ulong uVar5; bool bVar6; int1 auVar7 [16]; int1 auVar8 [16]; ulong local_40; size_t local_38; long local_30; __stream = (FILE *)js_std_file_get(); if (__stream != (FILE *)0x0) { iVar2 = JS_ToIndex(param_1,&local_30,in_R8[2],in_R8[3]); if (iVar2 == 0) { iVar2 = JS_ToIndex(param_1,&local_38,in_R8[4],in_R8[5]); if (iVar2 == 0) { lVar3 = JS_GetArrayBuffer(param_1,&local_40,*in_R8,in_R8[1]); if (lVar3 != 0) { if (local_40 < local_38 + local_30) { auVar8 = JS_ThrowRangeError(param_1,"read/write array buffer overflow"); } else { if (in_R9D == 0) { uVar5 = fread((void *)(lVar3 + local_30),1,local_38,__stream); } else { uVar5 = fwrite((void *)(lVar3 + local_30),1,local_38,__stream); } bVar6 = (long)(int)uVar5 == uVar5; dVar4 = (double)(long)uVar5; if (bVar6) { dVar4 = (double)(uVar5 & 0xffffffff); } auVar1._8_8_ = 0; auVar1._0_8_ = dVar4; auVar8._8_8_ = 7; auVar8._0_8_ = dVar4; if (bVar6) { auVar8 = auVar1; } } uVar5 = auVar8._0_8_ & 0xffffffff00000000; goto LAB_00116277; } } } } auVar8 = ZEXT816(6) << 0x40; uVar5 = 0; LAB_00116277: auVar7._0_8_ = auVar8._0_8_ & 0xffffffff | uVar5; auVar7._8_8_ = auVar8._8_8_; return auVar7; }
13,188
js_std_file_read_write
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_std_file_read_write(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { FILE *f = js_std_file_get(ctx, this_val); uint64_t pos, len; size_t size, ret; uint8_t *buf; if (!f) return JS_EXCEPTION; if (JS_ToIndex(ctx, &pos, argv[1])) return JS_EXCEPTION; if (JS_ToIndex(ctx, &len, argv[2])) return JS_EXCEPTION; buf = JS_GetArrayBuffer(ctx, &size, argv[0]); if (!buf) return JS_EXCEPTION; if (pos + len > size) return JS_ThrowRangeError(ctx, "read/write array buffer overflow"); if (magic) ret = fwrite(buf + pos, 1, len, f); else ret = fread(buf + pos, 1, len, f); return JS_NewInt64(ctx, ret); }
O2
c
js_std_file_read_write: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movl %r9d, %ebp movq %r8, %r12 movq %rdi, %r15 callq 0x113c6 pushq $0x6 popq %rbx testq %rax, %rax je 0x110db movq %rax, %r14 movq 0x10(%r12), %rdx movq 0x18(%r12), %rcx leaq 0x18(%rsp), %rsi movq %r15, %rdi callq 0x21680 testl %eax, %eax jne 0x110db movq 0x20(%r12), %rdx movq 0x28(%r12), %rcx leaq 0x10(%rsp), %rsi movq %r15, %rdi callq 0x21680 testl %eax, %eax je 0x110f5 xorl %eax, %eax xorl %r12d, %r12d movl %eax, %eax orq %r12, %rax movq %rbx, %rdx addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq (%r12), %rdx movq 0x8(%r12), %rcx leaq 0x8(%rsp), %rsi movq %r15, %rdi callq 0x320b8 testq %rax, %rax je 0x110db movabsq $-0x100000000, %r12 # imm = 0xFFFFFFFF00000000 movq 0x18(%rsp), %rcx movq 0x10(%rsp), %rdx leaq (%rdx,%rcx), %rsi cmpq 0x8(%rsp), %rsi jbe 0x11145 leaq 0x719fd(%rip), %rsi # 0x82b33 movq %r15, %rdi xorl %eax, %eax callq 0x1acb3 movq %rdx, %rbx jmp 0x11180 addq %rcx, %rax pushq $0x1 popq %rsi movq %rax, %rdi movq %r14, %rcx testl %ebp, %ebp je 0x1115c callq 0xe8f0 jmp 0x11161 callq 0xe180 movslq %eax, %rcx xorl %edx, %edx cmpq %rax, %rcx cvtsi2sd %rax, %xmm0 movl %ecx, %ecx movq %xmm0, %rax cmoveq %rcx, %rax pushq $0x7 popq %rbx cmoveq %rdx, %rbx andq %rax, %r12 jmp 0x110e0
js_std_file_read_write: push rbp push r15 push r14 push r12 push rbx sub rsp, 20h mov ebp, r9d mov r12, r8 mov r15, rdi call js_std_file_get push 6 pop rbx test rax, rax jz short loc_110DB mov r14, rax mov rdx, [r12+10h] mov rcx, [r12+18h] lea rsi, [rsp+48h+var_30] mov rdi, r15 call JS_ToIndex test eax, eax jnz short loc_110DB mov rdx, [r12+20h] mov rcx, [r12+28h] lea rsi, [rsp+48h+var_38] mov rdi, r15 call JS_ToIndex test eax, eax jz short loc_110F5 loc_110DB: xor eax, eax xor r12d, r12d loc_110E0: mov eax, eax or rax, r12 mov rdx, rbx add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_110F5: mov rdx, [r12] mov rcx, [r12+8] lea rsi, [rsp+48h+var_40] mov rdi, r15 call JS_GetArrayBuffer test rax, rax jz short loc_110DB mov r12, 0FFFFFFFF00000000h mov rcx, [rsp+48h+var_30] mov rdx, [rsp+48h+var_38] lea rsi, [rdx+rcx] cmp rsi, [rsp+48h+var_40] jbe short loc_11145 lea rsi, aReadWriteArray; "read/write array buffer overflow" mov rdi, r15 xor eax, eax call JS_ThrowRangeError mov rbx, rdx jmp short loc_11180 loc_11145: add rax, rcx push 1 pop rsi mov rdi, rax mov rcx, r14 test ebp, ebp jz short loc_1115C call _fwrite jmp short loc_11161 loc_1115C: call _fread loc_11161: movsxd rcx, eax xor edx, edx cmp rcx, rax cvtsi2sd xmm0, rax mov ecx, ecx movq rax, xmm0 cmovz rax, rcx push 7 pop rbx cmovz rbx, rdx loc_11180: and r12, rax jmp loc_110E0
unsigned long long js_std_file_read_write(long long a1, long long a2, long long a3, long long a4, _QWORD *a5, int a6) { long long v8; // rax long long v9; // r14 double v10; // rax unsigned long long v11; // r12 long long ArrayBuffer; // rax int v14; // r8d int v15; // r9d long long v16; // rdi long long v17; // rax bool v18; // zf double v19; // rcx unsigned long long v20; // [rsp+8h] [rbp-40h] BYREF long long v21; // [rsp+10h] [rbp-38h] BYREF _QWORD v22[6]; // [rsp+18h] [rbp-30h] BYREF v8 = js_std_file_get(a1); if ( !v8 || (v9 = v8, (unsigned int)JS_ToIndex(a1, v22, a5[2], a5[3])) || (unsigned int)JS_ToIndex(a1, &v21, a5[4], a5[5]) || (ArrayBuffer = JS_GetArrayBuffer(a1, &v20, *a5, a5[1])) == 0 ) { LODWORD(v10) = 0; v11 = 0LL; } else { if ( v21 + v22[0] <= v20 ) { v16 = v22[0] + ArrayBuffer; if ( a6 ) v17 = fwrite(v16, 1LL, v21, v9); else v17 = fread(v16, 1LL, v21, v9); v18 = (int)v17 == v17; *(_QWORD *)&v19 = (unsigned int)v17; v10 = (double)(int)v17; if ( v18 ) v10 = v19; } else { v10 = COERCE_DOUBLE(JS_ThrowRangeError(a1, (unsigned int)"read/write array buffer overflow", v21, v22[0], v14, v15)); } v11 = *(_QWORD *)&v10 & 0xFFFFFFFF00000000LL; } return v11 | LODWORD(v10); }
js_std_file_read_write: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV EBP,R9D MOV R12,R8 MOV R15,RDI CALL 0x001113c6 PUSH 0x6 POP RBX TEST RAX,RAX JZ 0x001110db MOV R14,RAX MOV RDX,qword ptr [R12 + 0x10] MOV RCX,qword ptr [R12 + 0x18] LEA RSI,[RSP + 0x18] MOV RDI,R15 CALL 0x00121680 TEST EAX,EAX JNZ 0x001110db MOV RDX,qword ptr [R12 + 0x20] MOV RCX,qword ptr [R12 + 0x28] LEA RSI,[RSP + 0x10] MOV RDI,R15 CALL 0x00121680 TEST EAX,EAX JZ 0x001110f5 LAB_001110db: XOR EAX,EAX XOR R12D,R12D LAB_001110e0: MOV EAX,EAX OR RAX,R12 MOV RDX,RBX ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001110f5: MOV RDX,qword ptr [R12] MOV RCX,qword ptr [R12 + 0x8] LEA RSI,[RSP + 0x8] MOV RDI,R15 CALL 0x001320b8 TEST RAX,RAX JZ 0x001110db MOV R12,-0x100000000 MOV RCX,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x10] LEA RSI,[RDX + RCX*0x1] CMP RSI,qword ptr [RSP + 0x8] JBE 0x00111145 LEA RSI,[0x182b33] MOV RDI,R15 XOR EAX,EAX CALL 0x0011acb3 MOV RBX,RDX JMP 0x00111180 LAB_00111145: ADD RAX,RCX PUSH 0x1 POP RSI MOV RDI,RAX MOV RCX,R14 TEST EBP,EBP JZ 0x0011115c CALL 0x0010e8f0 JMP 0x00111161 LAB_0011115c: CALL 0x0010e180 LAB_00111161: MOVSXD RCX,EAX XOR EDX,EDX CMP RCX,RAX CVTSI2SD XMM0,RAX MOV ECX,ECX MOVQ RAX,XMM0 CMOVZ RAX,RCX PUSH 0x7 POP RBX CMOVZ RBX,RDX LAB_00111180: AND R12,RAX JMP 0x001110e0
int1 [16] js_std_file_read_write(int8 param_1) { int iVar1; FILE *__stream; long lVar2; double dVar3; int8 *in_R8; int in_R9D; ulong uVar4; bool bVar5; int1 auVar6 [16]; int1 auVar7 [16]; ulong local_40; size_t local_38; long local_30; __stream = (FILE *)js_std_file_get(); if (__stream != (FILE *)0x0) { iVar1 = JS_ToIndex(param_1,&local_30,in_R8[2],in_R8[3]); if (iVar1 == 0) { iVar1 = JS_ToIndex(param_1,&local_38,in_R8[4],in_R8[5]); if (iVar1 == 0) { lVar2 = JS_GetArrayBuffer(param_1,&local_40,*in_R8,in_R8[1]); if (lVar2 != 0) { if (local_40 < local_38 + local_30) { auVar7 = JS_ThrowRangeError(param_1,"read/write array buffer overflow"); } else { if (in_R9D == 0) { uVar4 = fread((void *)(lVar2 + local_30),1,local_38,__stream); } else { uVar4 = fwrite((void *)(lVar2 + local_30),1,local_38,__stream); } bVar5 = (long)(int)uVar4 == uVar4; dVar3 = (double)(long)uVar4; if (bVar5) { dVar3 = (double)(uVar4 & 0xffffffff); } auVar7._8_8_ = 7; auVar7._0_8_ = dVar3; if (bVar5) { auVar7._8_8_ = 0; } } uVar4 = auVar7._0_8_ & 0xffffffff00000000; goto LAB_001110e0; } } } } auVar7 = ZEXT816(6) << 0x40; uVar4 = 0; LAB_001110e0: auVar6._0_8_ = auVar7._0_8_ & 0xffffffff | uVar4; auVar6._8_8_ = auVar7._8_8_; return auVar6; }
13,189
mujoco::plugin::elasticity::Membrane::Create(mjModel_ const*, mjData_*, int)
aimrt_mujoco_sim/_deps/mujoco-src/plugin/elasticity/membrane.cc
std::optional<Membrane> Membrane::Create(const mjModel* m, mjData* d, int instance) { if (CheckAttr("face", m, instance) && CheckAttr("poisson", m, instance) && CheckAttr("young", m, instance) && CheckAttr("thickness", m, instance)) { mjtNum nu = strtod(mj_getPluginConfig(m, instance, "poisson"), nullptr); mjtNum E = strtod(mj_getPluginConfig(m, instance, "young"), nullptr); mjtNum thick = strtod(mj_getPluginConfig(m, instance, "thickness"), nullptr); mjtNum damp = strtod(mj_getPluginConfig(m, instance, "damping"), nullptr); std::vector<int> face, edge; String2Vector(mj_getPluginConfig(m, instance, "face"), face); String2Vector(mj_getPluginConfig(m, instance, "edge"), edge); return Membrane(m, d, instance, nu, E, thick, damp, face, edge); } else { mju_warning("Invalid parameter specification in shell plugin"); return std::nullopt; } }
O0
cpp
mujoco::plugin::elasticity::Membrane::Create(mjModel_ const*, mjData_*, int): subq $0x1f8, %rsp # imm = 0x1F8 movq %rdi, 0x30(%rsp) movq %rdi, %rax movq %rax, 0x38(%rsp) movq %rdi, 0x1f0(%rsp) movq %rsi, 0x1e8(%rsp) movq %rdx, 0x1e0(%rsp) movl %ecx, 0x1dc(%rsp) movq 0x1e8(%rsp), %rsi movl 0x1dc(%rsp), %edx leaq 0x8b1d(%rip), %rdi # 0x17cf6 callq 0xb510 testb $0x1, %al jne 0xf1e7 jmp 0xf57f movq 0x1e8(%rsp), %rsi movl 0x1dc(%rsp), %edx leaq 0x8afe(%rip), %rdi # 0x17cfb callq 0xb510 testb $0x1, %al jne 0xf20b jmp 0xf57f movq 0x1e8(%rsp), %rsi movl 0x1dc(%rsp), %edx leaq 0x8ae2(%rip), %rdi # 0x17d03 callq 0xb510 testb $0x1, %al jne 0xf22f jmp 0xf57f movq 0x1e8(%rsp), %rsi movl 0x1dc(%rsp), %edx leaq 0x8ac4(%rip), %rdi # 0x17d09 callq 0xb510 testb $0x1, %al jne 0xf253 jmp 0xf57f movq 0x1e8(%rsp), %rdi movl 0x1dc(%rsp), %esi leaq 0x8a92(%rip), %rdx # 0x17cfb callq 0x50c0 movq %rax, %rdi xorl %eax, %eax movl %eax, %esi movq %rsi, 0x20(%rsp) callq 0x5140 vmovsd %xmm0, 0x1d0(%rsp) movq 0x1e8(%rsp), %rdi movl 0x1dc(%rsp), %esi leaq 0x8a65(%rip), %rdx # 0x17d03 callq 0x50c0 movq 0x20(%rsp), %rsi movq %rax, %rdi callq 0x5140 vmovsd %xmm0, 0x1c8(%rsp) movq 0x1e8(%rsp), %rdi movl 0x1dc(%rsp), %esi leaq 0x8a3a(%rip), %rdx # 0x17d09 callq 0x50c0 movq 0x20(%rsp), %rsi movq %rax, %rdi callq 0x5140 vmovsd %xmm0, 0x1c0(%rsp) movq 0x1e8(%rsp), %rdi movl 0x1dc(%rsp), %esi leaq 0x8a13(%rip), %rdx # 0x17d13 callq 0x50c0 movq 0x20(%rsp), %rsi movq %rax, %rdi callq 0x5140 vmovsd %xmm0, 0x1b8(%rsp) leaq 0x1a0(%rsp), %rdi callq 0x6be0 leaq 0x188(%rsp), %rdi callq 0x6be0 movq 0x1e8(%rsp), %rdi movl 0x1dc(%rsp), %esi leaq 0x89ab(%rip), %rdx # 0x17cf6 callq 0x50c0 movq %rax, 0x28(%rsp) jmp 0xf357 leaq 0x15b(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x50d0 movq 0x28(%rsp), %rsi movq 0x18(%rsp), %rdx leaq 0x168(%rsp), %rdi callq 0x6c00 jmp 0xf382 leaq 0x168(%rsp), %rdi leaq 0x1a0(%rsp), %rsi callq 0xb360 jmp 0xf399 leaq 0x168(%rsp), %rdi callq 0x5170 leaq 0x15b(%rsp), %rdi callq 0x50e0 movq 0x1e8(%rsp), %rdi movl 0x1dc(%rsp), %esi leaq 0x8952(%rip), %rdx # 0x17d1b callq 0x50c0 movq %rax, 0x10(%rsp) jmp 0xf3d5 leaq 0x137(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x50d0 movq 0x10(%rsp), %rsi movq 0x8(%rsp), %rdx leaq 0x138(%rsp), %rdi callq 0x6c00 jmp 0xf400 leaq 0x138(%rsp), %rdi leaq 0x188(%rsp), %rsi callq 0xb360 jmp 0xf417 leaq 0x138(%rsp), %rdi callq 0x5170 leaq 0x137(%rsp), %rdi callq 0x50e0 movq 0x1e8(%rsp), %rsi movq 0x1e0(%rsp), %rdx movl 0x1dc(%rsp), %ecx vmovsd 0x1d0(%rsp), %xmm0 vmovsd 0x1c8(%rsp), %xmm1 vmovsd 0x1c0(%rsp), %xmm2 vmovsd 0x1b8(%rsp), %xmm3 leaq 0x48(%rsp), %rdi leaq 0x1a0(%rsp), %r8 leaq 0x188(%rsp), %r9 callq 0xf6a0 jmp 0xf488 movq 0x30(%rsp), %rdi leaq 0x48(%rsp), %rsi callq 0xf5c0 leaq 0x48(%rsp), %rdi callq 0xf5f0 leaq 0x188(%rsp), %rdi callq 0x6ec0 leaq 0x1a0(%rsp), %rdi callq 0x6ec0 jmp 0xf597 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x160(%rsp) movl %eax, 0x15c(%rsp) jmp 0xf563 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x160(%rsp) movl %eax, 0x15c(%rsp) jmp 0xf510 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x160(%rsp) movl %eax, 0x15c(%rsp) leaq 0x168(%rsp), %rdi callq 0x5170 leaq 0x15b(%rsp), %rdi callq 0x50e0 jmp 0xf563 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x160(%rsp) movl %eax, 0x15c(%rsp) jmp 0xf556 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x160(%rsp) movl %eax, 0x15c(%rsp) leaq 0x138(%rsp), %rdi callq 0x5170 leaq 0x137(%rsp), %rdi callq 0x50e0 leaq 0x188(%rsp), %rdi callq 0x6ec0 leaq 0x1a0(%rsp), %rdi callq 0x6ec0 jmp 0xf5a4 leaq 0x879a(%rip), %rdi # 0x17d20 movb $0x0, %al callq 0x50b0 movq 0x30(%rsp), %rdi callq 0xf680 movq 0x38(%rsp), %rax addq $0x1f8, %rsp # imm = 0x1F8 retq movq 0x160(%rsp), %rdi callq 0x5180 nopw %cs:(%rax,%rax)
_ZN6mujoco6plugin10elasticity8Membrane6CreateEPK8mjModel_P7mjData_i: sub rsp, 1F8h mov [rsp+1F8h+var_1C8], rdi mov rax, rdi mov [rsp+1F8h+var_1C0], rax mov [rsp+1F8h+var_8], rdi mov [rsp+1F8h+var_10], rsi mov [rsp+1F8h+var_18], rdx mov [rsp+1F8h+var_1C], ecx mov rsi, [rsp+1F8h+var_10] mov edx, [rsp+1F8h+var_1C] lea rdi, aFace; "face" call _ZN6mujoco6plugin10elasticity9CheckAttrEPKcPK8mjModel_i; mujoco::plugin::elasticity::CheckAttr(char const*,mjModel_ const*,int) test al, 1 jnz short loc_F1E7 jmp loc_F57F loc_F1E7: mov rsi, [rsp+1F8h+var_10] mov edx, [rsp+1F8h+var_1C] lea rdi, aPoisson; "poisson" call _ZN6mujoco6plugin10elasticity9CheckAttrEPKcPK8mjModel_i; mujoco::plugin::elasticity::CheckAttr(char const*,mjModel_ const*,int) test al, 1 jnz short loc_F20B jmp loc_F57F loc_F20B: mov rsi, [rsp+1F8h+var_10] mov edx, [rsp+1F8h+var_1C] lea rdi, aYoung; "young" call _ZN6mujoco6plugin10elasticity9CheckAttrEPKcPK8mjModel_i; mujoco::plugin::elasticity::CheckAttr(char const*,mjModel_ const*,int) test al, 1 jnz short loc_F22F jmp loc_F57F loc_F22F: mov rsi, [rsp+1F8h+var_10] mov edx, [rsp+1F8h+var_1C] lea rdi, aThickness; "thickness" call _ZN6mujoco6plugin10elasticity9CheckAttrEPKcPK8mjModel_i; mujoco::plugin::elasticity::CheckAttr(char const*,mjModel_ const*,int) test al, 1 jnz short loc_F253 jmp loc_F57F loc_F253: mov rdi, [rsp+1F8h+var_10] mov esi, [rsp+1F8h+var_1C] lea rdx, aPoisson; "poisson" call _mj_getPluginConfig mov rdi, rax xor eax, eax mov esi, eax mov [rsp+1F8h+var_1D8], rsi call _strtod vmovsd [rsp+1F8h+var_28], xmm0 mov rdi, [rsp+1F8h+var_10] mov esi, [rsp+1F8h+var_1C] lea rdx, aYoung; "young" call _mj_getPluginConfig mov rsi, [rsp+1F8h+var_1D8] mov rdi, rax call _strtod vmovsd [rsp+1F8h+var_30], xmm0 mov rdi, [rsp+1F8h+var_10] mov esi, [rsp+1F8h+var_1C] lea rdx, aThickness; "thickness" call _mj_getPluginConfig mov rsi, [rsp+1F8h+var_1D8] mov rdi, rax call _strtod vmovsd [rsp+1F8h+var_38], xmm0 mov rdi, [rsp+1F8h+var_10] mov esi, [rsp+1F8h+var_1C] lea rdx, aDamping; "damping" call _mj_getPluginConfig mov rsi, [rsp+1F8h+var_1D8] mov rdi, rax call _strtod vmovsd [rsp+1F8h+var_40], xmm0 lea rdi, [rsp+1F8h+var_58] call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void) lea rdi, [rsp+1F8h+var_70] call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void) mov rdi, [rsp+1F8h+var_10] mov esi, [rsp+1F8h+var_1C] lea rdx, aFace; "face" call _mj_getPluginConfig mov [rsp+1F8h+var_1D0], rax jmp short $+2 loc_F357: lea rdi, [rsp+1F8h+var_9D] mov [rsp+1F8h+var_1E0], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rsp+1F8h+var_1D0] mov rdx, [rsp+1F8h+var_1E0] lea rdi, [rsp+1F8h+var_90] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_F382: lea rdi, [rsp+1F8h+var_90] lea rsi, [rsp+1F8h+var_58] call _ZN6mujoco6plugin10elasticity13String2VectorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIiSaIiEE; mujoco::plugin::elasticity::String2Vector(std::string const&,std::vector<int> &) jmp short $+2 loc_F399: lea rdi, [rsp+1F8h+var_90] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+1F8h+var_9D] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rsp+1F8h+var_10] mov esi, [rsp+1F8h+var_1C] lea rdx, aEdge; "edge" call _mj_getPluginConfig mov [rsp+1F8h+var_1E8], rax jmp short $+2 loc_F3D5: lea rdi, [rsp+1F8h+var_C1] mov [rsp+1F8h+var_1F0], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rsp+1F8h+var_1E8] mov rdx, [rsp+1F8h+var_1F0] lea rdi, [rsp+1F8h+var_C0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_F400: lea rdi, [rsp+1F8h+var_C0] lea rsi, [rsp+1F8h+var_70] call _ZN6mujoco6plugin10elasticity13String2VectorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIiSaIiEE; mujoco::plugin::elasticity::String2Vector(std::string const&,std::vector<int> &) jmp short $+2 loc_F417: lea rdi, [rsp+1F8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+1F8h+var_C1] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rsi, [rsp+1F8h+var_10] mov rdx, [rsp+1F8h+var_18] mov ecx, [rsp+1F8h+var_1C] vmovsd xmm0, [rsp+1F8h+var_28] vmovsd xmm1, [rsp+1F8h+var_30] vmovsd xmm2, [rsp+1F8h+var_38] vmovsd xmm3, [rsp+1F8h+var_40] lea rdi, [rsp+1F8h+var_1B0] lea r8, [rsp+1F8h+var_58] lea r9, [rsp+1F8h+var_70] call _ZN6mujoco6plugin10elasticity8MembraneC2EPK8mjModel_P7mjData_iddddRKSt6vectorIiSaIiEESC_; mujoco::plugin::elasticity::Membrane::Membrane(mjModel_ const*,mjData_ *,int,double,double,double,double,std::vector<int> const&,std::vector<int> const&) jmp short $+2 loc_F488: mov rdi, [rsp+1F8h+var_1C8] lea rsi, [rsp+1F8h+var_1B0] call _ZNSt8optionalIN6mujoco6plugin10elasticity8MembraneEEC2IS3_TnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS4_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES7_IS8_ISt10in_place_tSF_EESt16is_constructibleIS3_JSB_EESt14is_convertibleISB_S3_EEEbE4typeELb1EEEOSB_ lea rdi, [rsp+1F8h+var_1B0]; this call _ZN6mujoco6plugin10elasticity8MembraneD2Ev; mujoco::plugin::elasticity::Membrane::~Membrane() lea rdi, [rsp+1F8h+var_70] call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector() lea rdi, [rsp+1F8h+var_58] call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector() jmp loc_F597 mov rcx, rax mov eax, edx mov [rsp+arg_158], rcx mov [rsp+arg_154], eax jmp loc_F563 mov rcx, rax mov eax, edx mov [rsp+arg_158], rcx mov [rsp+arg_154], eax jmp short loc_F510 mov rcx, rax mov eax, edx mov [rsp+arg_158], rcx mov [rsp+arg_154], eax lea rdi, [rsp+arg_160] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_F510: lea rdi, [rsp+arg_153] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_F563 mov rcx, rax mov eax, edx mov [rsp+arg_158], rcx mov [rsp+arg_154], eax jmp short loc_F556 mov rcx, rax mov eax, edx mov [rsp+arg_158], rcx mov [rsp+arg_154], eax lea rdi, [rsp+arg_130] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_F556: lea rdi, [rsp+arg_12F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() loc_F563: lea rdi, [rsp+arg_180] call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector() lea rdi, [rsp+arg_198] call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector() jmp short loc_F5A4 loc_F57F: lea rdi, aInvalidParamet_0; "Invalid parameter specification in shel"... mov al, 0 call _mju_warning mov rdi, [rsp+1F8h+var_1C8] call _ZNSt8optionalIN6mujoco6plugin10elasticity8MembraneEEC2ESt9nullopt_t; std::optional<mujoco::plugin::elasticity::Membrane>::optional(std::nullopt_t) loc_F597: mov rax, [rsp+1F8h+var_1C0] add rsp, 1F8h retn loc_F5A4: mov rdi, [rsp+arg_158] call __Unwind_Resume
long long mujoco::plugin::elasticity::Membrane::Create( long long a1, long long a2, long long a3, unsigned int a4, __m128 _XMM0) { long long PluginConfig; // rax long long v6; // rax long long v7; // rax long long v8; // rax long long v14; // [rsp+10h] [rbp-1E8h] long long v15; // [rsp+28h] [rbp-1D0h] _BYTE v16[239]; // [rsp+48h] [rbp-1B0h] BYREF char v17; // [rsp+137h] [rbp-C1h] BYREF _BYTE v18[35]; // [rsp+138h] [rbp-C0h] BYREF _BYTE v19[13]; // [rsp+15Bh] [rbp-9Dh] BYREF _BYTE v20[32]; // [rsp+168h] [rbp-90h] BYREF long long v21[3]; // [rsp+188h] [rbp-70h] BYREF long long v22[3]; // [rsp+1A0h] [rbp-58h] BYREF unsigned int v27; // [rsp+1DCh] [rbp-1Ch] long long v28; // [rsp+1E0h] [rbp-18h] long long v29; // [rsp+1E8h] [rbp-10h] long long v30; // [rsp+1F0h] [rbp-8h] v30 = a1; v29 = a2; v28 = a3; v27 = a4; if ( mujoco::plugin::elasticity::CheckAttr((long long)"face", a2, a4) && mujoco::plugin::elasticity::CheckAttr((long long)"poisson", v29, v27) && mujoco::plugin::elasticity::CheckAttr((long long)"young", v29, v27) && mujoco::plugin::elasticity::CheckAttr((long long)"thickness", v29, v27) ) { PluginConfig = mj_getPluginConfig(v29, v27, "poisson"); *(double *)_XMM0.m128_u64 = strtod(PluginConfig, 0LL); __asm { vmovsd [rsp+1F8h+var_28], xmm0 } v6 = mj_getPluginConfig(v29, v27, "young"); *(double *)_XMM0.m128_u64 = strtod(v6, 0LL); __asm { vmovsd [rsp+1F8h+var_30], xmm0 } v7 = mj_getPluginConfig(v29, v27, "thickness"); *(double *)_XMM0.m128_u64 = strtod(v7, 0LL); __asm { vmovsd [rsp+1F8h+var_38], xmm0 } v8 = mj_getPluginConfig(v29, v27, "damping"); *(double *)_XMM0.m128_u64 = strtod(v8, 0LL); __asm { vmovsd [rsp+1F8h+var_40], xmm0 } std::vector<int>::vector((long long)v22); std::vector<int>::vector((long long)v21); v15 = mj_getPluginConfig(v29, v27, "face"); std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v20, v15, (long long)v19); mujoco::plugin::elasticity::String2Vector((long long)v20, (long long)v22); std::string::~string(v20); std::allocator<char>::~allocator(v19); v14 = mj_getPluginConfig(v29, v27, "edge"); std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v18, v14, (long long)&v17); mujoco::plugin::elasticity::String2Vector((long long)v18, (long long)v21); std::string::~string(v18); std::allocator<char>::~allocator(&v17); __asm { vmovsd xmm0, [rsp+1F8h+var_28] vmovsd xmm1, [rsp+1F8h+var_30] vmovsd xmm2, [rsp+1F8h+var_38] vmovsd xmm3, [rsp+1F8h+var_40] } mujoco::plugin::elasticity::Membrane::Membrane( (unsigned int)v16, v29, v28, v27, (unsigned int)v22, (unsigned int)v21); ZNSt8optionalIN6mujoco6plugin10elasticity8MembraneEEC2IS3_TnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS4_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES7_IS8_ISt10in_place_tSF_EESt16is_constructibleIS3_JSB_EESt14is_convertibleISB_S3_EEEbE4typeELb1EEEOSB_( a1, v16, *(double *)&_XMM0, *(double *)&_XMM1, *(double *)&_XMM2, *(double *)&_XMM3); mujoco::plugin::elasticity::Membrane::~Membrane((mujoco::plugin::elasticity::Membrane *)v16); std::vector<int>::~vector(v21); std::vector<int>::~vector(v22); } else { mju_warning("Invalid parameter specification in shell plugin"); std::optional<mujoco::plugin::elasticity::Membrane>::optional(a1); } return a1; }
Create: SUB RSP,0x1f8 MOV qword ptr [RSP + 0x30],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x1f0],RDI MOV qword ptr [RSP + 0x1e8],RSI MOV qword ptr [RSP + 0x1e0],RDX MOV dword ptr [RSP + 0x1dc],ECX MOV RSI,qword ptr [RSP + 0x1e8] MOV EDX,dword ptr [RSP + 0x1dc] LEA RDI,[0x117cf6] CALL 0x0010b510 TEST AL,0x1 JNZ 0x0010f1e7 JMP 0x0010f57f LAB_0010f1e7: MOV RSI,qword ptr [RSP + 0x1e8] MOV EDX,dword ptr [RSP + 0x1dc] LEA RDI,[0x117cfb] CALL 0x0010b510 TEST AL,0x1 JNZ 0x0010f20b JMP 0x0010f57f LAB_0010f20b: MOV RSI,qword ptr [RSP + 0x1e8] MOV EDX,dword ptr [RSP + 0x1dc] LEA RDI,[0x117d03] CALL 0x0010b510 TEST AL,0x1 JNZ 0x0010f22f JMP 0x0010f57f LAB_0010f22f: MOV RSI,qword ptr [RSP + 0x1e8] MOV EDX,dword ptr [RSP + 0x1dc] LEA RDI,[0x117d09] CALL 0x0010b510 TEST AL,0x1 JNZ 0x0010f253 JMP 0x0010f57f LAB_0010f253: MOV RDI,qword ptr [RSP + 0x1e8] MOV ESI,dword ptr [RSP + 0x1dc] LEA RDX,[0x117cfb] CALL 0x001050c0 MOV RDI,RAX XOR EAX,EAX MOV ESI,EAX MOV qword ptr [RSP + 0x20],RSI CALL 0x00105140 VMOVSD qword ptr [RSP + 0x1d0],XMM0 MOV RDI,qword ptr [RSP + 0x1e8] MOV ESI,dword ptr [RSP + 0x1dc] LEA RDX,[0x117d03] CALL 0x001050c0 MOV RSI,qword ptr [RSP + 0x20] MOV RDI,RAX CALL 0x00105140 VMOVSD qword ptr [RSP + 0x1c8],XMM0 MOV RDI,qword ptr [RSP + 0x1e8] MOV ESI,dword ptr [RSP + 0x1dc] LEA RDX,[0x117d09] CALL 0x001050c0 MOV RSI,qword ptr [RSP + 0x20] MOV RDI,RAX CALL 0x00105140 VMOVSD qword ptr [RSP + 0x1c0],XMM0 MOV RDI,qword ptr [RSP + 0x1e8] MOV ESI,dword ptr [RSP + 0x1dc] LEA RDX,[0x117d13] CALL 0x001050c0 MOV RSI,qword ptr [RSP + 0x20] MOV RDI,RAX CALL 0x00105140 VMOVSD qword ptr [RSP + 0x1b8],XMM0 LEA RDI,[RSP + 0x1a0] CALL 0x00106be0 LEA RDI,[RSP + 0x188] CALL 0x00106be0 MOV RDI,qword ptr [RSP + 0x1e8] MOV ESI,dword ptr [RSP + 0x1dc] LAB_0010f344: LEA RDX,[0x117cf6] CALL 0x001050c0 MOV qword ptr [RSP + 0x28],RAX JMP 0x0010f357 LAB_0010f357: LEA RDI,[RSP + 0x15b] MOV qword ptr [RSP + 0x18],RDI CALL 0x001050d0 MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x18] LAB_0010f373: LEA RDI,[RSP + 0x168] CALL 0x00106c00 JMP 0x0010f382 LAB_0010f382: LEA RDI,[RSP + 0x168] LEA RSI,[RSP + 0x1a0] CALL 0x0010b360 JMP 0x0010f399 LAB_0010f399: LEA RDI,[RSP + 0x168] CALL 0x00105170 LEA RDI,[RSP + 0x15b] CALL 0x001050e0 MOV RDI,qword ptr [RSP + 0x1e8] MOV ESI,dword ptr [RSP + 0x1dc] LAB_0010f3c2: LEA RDX,[0x117d1b] CALL 0x001050c0 MOV qword ptr [RSP + 0x10],RAX JMP 0x0010f3d5 LAB_0010f3d5: LEA RDI,[RSP + 0x137] MOV qword ptr [RSP + 0x8],RDI CALL 0x001050d0 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x8] LAB_0010f3f1: LEA RDI,[RSP + 0x138] CALL 0x00106c00 JMP 0x0010f400 LAB_0010f400: LEA RDI,[RSP + 0x138] LEA RSI,[RSP + 0x188] CALL 0x0010b360 JMP 0x0010f417 LAB_0010f417: LEA RDI,[RSP + 0x138] CALL 0x00105170 LEA RDI,[RSP + 0x137] CALL 0x001050e0 MOV RSI,qword ptr [RSP + 0x1e8] MOV RDX,qword ptr [RSP + 0x1e0] MOV ECX,dword ptr [RSP + 0x1dc] VMOVSD XMM0,qword ptr [RSP + 0x1d0] VMOVSD XMM1,qword ptr [RSP + 0x1c8] VMOVSD XMM2,qword ptr [RSP + 0x1c0] VMOVSD XMM3,qword ptr [RSP + 0x1b8] LAB_0010f46c: LEA RDI,[RSP + 0x48] LEA R8,[RSP + 0x1a0] LEA R9,[RSP + 0x188] CALL 0x0010f6a0 LAB_0010f486: JMP 0x0010f488 LAB_0010f488: MOV RDI,qword ptr [RSP + 0x30] LEA RSI,[RSP + 0x48] CALL 0x0010f5c0 LEA RDI,[RSP + 0x48] CALL 0x0010f5f0 LEA RDI,[RSP + 0x188] CALL 0x00106ec0 LEA RDI,[RSP + 0x1a0] CALL 0x00106ec0 JMP 0x0010f597 LAB_0010f57f: LEA RDI,[0x117d20] MOV AL,0x0 CALL 0x001050b0 MOV RDI,qword ptr [RSP + 0x30] CALL 0x0010f680 LAB_0010f597: MOV RAX,qword ptr [RSP + 0x38] ADD RSP,0x1f8 RET
/* mujoco::plugin::elasticity::Membrane::Create(mjModel_ const*, mjData_*, int) */ Membrane * __thiscall mujoco::plugin::elasticity::Membrane::Create (Membrane *this,mjModel_ *param_1,mjData_ *param_2,int param_3) { ulong uVar1; char *pcVar2; Membrane local_1b0 [239]; allocator local_c1; string local_c0 [35]; allocator local_9d [13]; string local_90 [32]; vector<int,std::allocator<int>> local_70 [24]; vector<int,std::allocator<int>> local_58 [24]; double local_40; double local_38; double local_30; double local_28; int local_1c; mjData_ *local_18; mjModel_ *local_10; Membrane *local_8; local_1c = param_3; local_18 = param_2; local_10 = param_1; local_8 = this; uVar1 = CheckAttr("face",param_1,param_3); if (((((uVar1 & 1) == 0) || (uVar1 = CheckAttr("poisson",local_10,local_1c), (uVar1 & 1) == 0)) || (uVar1 = CheckAttr("young",local_10,local_1c), (uVar1 & 1) == 0)) || (uVar1 = CheckAttr("thickness",local_10,local_1c), (uVar1 & 1) == 0)) { mju_warning("Invalid parameter specification in shell plugin"); std::optional<mujoco::plugin::elasticity::Membrane>::optional(this); } else { pcVar2 = (char *)mj_getPluginConfig(local_10,local_1c,"poisson"); local_28 = strtod(pcVar2,(char **)0x0); pcVar2 = (char *)mj_getPluginConfig(local_10,local_1c,"young"); local_30 = strtod(pcVar2,(char **)0x0); pcVar2 = (char *)mj_getPluginConfig(local_10,local_1c,"thickness"); local_38 = strtod(pcVar2,(char **)0x0); pcVar2 = (char *)mj_getPluginConfig(local_10,local_1c,"damping"); local_40 = strtod(pcVar2,(char **)0x0); std::vector<int,std::allocator<int>>::vector(local_58); std::vector<int,std::allocator<int>>::vector(local_70); /* try { // try from 0010f344 to 0010f34f has its CatchHandler @ 0010f4c0 */ pcVar2 = (char *)mj_getPluginConfig(local_10,local_1c,&DAT_00117cf6); std::allocator<char>::allocator(); /* try { // try from 0010f373 to 0010f37f has its CatchHandler @ 0010f4d9 */ std::__cxx11::string::string<std::allocator<char>>(local_90,pcVar2,local_9d); /* try { // try from 0010f382 to 0010f396 has its CatchHandler @ 0010f4ef */ String2Vector(local_90,(vector *)local_58); std::__cxx11::string::~string(local_90); std::allocator<char>::~allocator((allocator<char> *)local_9d); /* try { // try from 0010f3c2 to 0010f3cd has its CatchHandler @ 0010f4c0 */ pcVar2 = (char *)mj_getPluginConfig(local_10,local_1c,&DAT_00117d1b); std::allocator<char>::allocator(); /* try { // try from 0010f3f1 to 0010f3fd has its CatchHandler @ 0010f51f */ std::__cxx11::string::string<std::allocator<char>>(local_c0,pcVar2,&local_c1); /* try { // try from 0010f400 to 0010f414 has its CatchHandler @ 0010f535 */ String2Vector(local_c0,(vector *)local_70); std::__cxx11::string::~string(local_c0); std::allocator<char>::~allocator((allocator<char> *)&local_c1); /* try { // try from 0010f46c to 0010f485 has its CatchHandler @ 0010f4c0 */ Membrane(local_1b0,local_10,local_18,local_1c,local_28,local_30,local_38,local_40, (vector *)local_58,(vector *)local_70); _ZNSt8optionalIN6mujoco6plugin10elasticity8MembraneEEC2IS3_TnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS4_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES7_IS8_ISt10in_place_tSF_EESt16is_constructibleIS3_JSB_EESt14is_convertibleISB_S3_EEEbE4typeELb1EEEOSB_ (this,local_1b0); ~Membrane(local_1b0); std::vector<int,std::allocator<int>>::~vector(local_70); std::vector<int,std::allocator<int>>::~vector(local_58); } return this; }
13,190
google::protobuf::ExtensionRangeOptions::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
uint8_t* ExtensionRangeOptions::_InternalSerialize( uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ExtensionRangeOptions) uint32_t cached_has_bits = 0; (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; for (unsigned i = 0, n = static_cast<unsigned>(this->_internal_uninterpreted_option_size()); i < n; i++) { const auto& repfield = this->_internal_uninterpreted_option(i); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessage(999, repfield, repfield.GetCachedSize(), target, stream); } // Extension range [1000, 536870912) target = _impl_._extensions_._InternalSerialize( internal_default_instance(), 1000, 536870912, target, stream); if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ExtensionRangeOptions) return target; }
O3
cpp
google::protobuf::ExtensionRangeOptions::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %rax movq %rdi, %r14 movl 0x30(%rdi), %ebp testl %ebp, %ebp je 0xeddfb xorl %r15d, %r15d movq 0x38(%r14), %rcx movslq %r15d, %r15 movq 0x8(%rcx,%r15,8), %rsi movl 0x14(%rsi), %edx movl $0x3e7, %edi # imm = 0x3E7 movq %rax, %rcx movq %rbx, %r8 callq 0x8cace incl %r15d cmpl %r15d, %ebp jne 0xeddd4 cmpw $0x0, 0x1a(%r14) je 0xede23 leaq 0x10(%r14), %rdi leaq 0x123ed2(%rip), %rsi # 0x211ce0 movl $0x3e8, %edx # imm = 0x3E8 movl $0x20000000, %ecx # imm = 0x20000000 movq %rax, %r8 movq %rbx, %r9 callq 0xb6dc6 movq 0x8(%r14), %rdi testb $0x1, %dil jne 0xede38 addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq andq $-0x4, %rdi addq $0x8, %rdi movq %rax, %rsi movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0xa6e1e nop
_ZNK6google8protobuf21ExtensionRangeOptions18_InternalSerializeEPhPNS0_2io19EpsCopyOutputStreamE: push rbp push r15 push r14 push rbx push rax mov rbx, rdx mov rax, rsi mov r14, rdi mov ebp, [rdi+30h] test ebp, ebp jz short loc_EDDFB xor r15d, r15d loc_EDDD4: mov rcx, [r14+38h] movsxd r15, r15d mov rsi, [rcx+r15*8+8]; int mov edx, [rsi+14h]; google::protobuf::MessageLite * mov edi, (offset elf_gnu_hash_bucket+9Fh); this mov rcx, rax; int mov r8, rbx; unsigned __int8 * call _ZN6google8protobuf8internal14WireFormatLite20InternalWriteMessageEiRKNS0_11MessageLiteEiPhPNS0_2io19EpsCopyOutputStreamE; google::protobuf::internal::WireFormatLite::InternalWriteMessage(int,google::protobuf::MessageLite const&,int,uchar *,google::protobuf::io::EpsCopyOutputStream *) inc r15d cmp ebp, r15d jnz short loc_EDDD4 loc_EDDFB: cmp word ptr [r14+1Ah], 0 jz short loc_EDE23 lea rdi, [r14+10h]; this lea rsi, _ZN6google8protobuf40_ExtensionRangeOptions_default_instance_E; google::protobuf::MessageLite * mov edx, 3E8h; int mov ecx, 20000000h; int mov r8, rax; unsigned __int8 * mov r9, rbx; google::protobuf::io::EpsCopyOutputStream * call _ZNK6google8protobuf8internal12ExtensionSet22_InternalSerializeImplEPKNS0_11MessageLiteEiiPhPNS0_2io19EpsCopyOutputStreamE; google::protobuf::internal::ExtensionSet::_InternalSerializeImpl(google::protobuf::MessageLite const*,int,int,uchar *,google::protobuf::io::EpsCopyOutputStream *) loc_EDE23: mov rdi, [r14+8] test dil, 1 jnz short loc_EDE38 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_EDE38: and rdi, 0FFFFFFFFFFFFFFFCh add rdi, 8; this mov rsi, rax; google::protobuf::UnknownFieldSet * mov rdx, rbx; unsigned __int8 * add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _ZN6google8protobuf8internal10WireFormat37InternalSerializeUnknownFieldsToArrayERKNS0_15UnknownFieldSetEPhPNS0_2io19EpsCopyOutputStreamE; google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&,uchar *,google::protobuf::io::EpsCopyOutputStream *)
unsigned __int8 * google::protobuf::ExtensionRangeOptions::_InternalSerialize( google::protobuf::ExtensionRangeOptions *this, unsigned __int8 *a2, google::protobuf::io::EpsCopyOutputStream *a3, google::protobuf::io::EpsCopyOutputStream *a4, long long a5, google::protobuf::io::EpsCopyOutputStream *a6) { unsigned __int8 *result; // rax int v8; // ebp int i; // r15d long long v10; // rsi long long v11; // rdi result = a2; v8 = *((_DWORD *)this + 12); if ( v8 ) { for ( i = 0; i != v8; ++i ) { v10 = *(_QWORD *)(*((_QWORD *)this + 7) + 8LL * i + 8); result = (unsigned __int8 *)google::protobuf::internal::WireFormatLite::InternalWriteMessage( (google::protobuf::internal::WireFormatLite *)((char *)&elf_gnu_hash_bucket[39] + 3), v10, (const google::protobuf::MessageLite *)*(unsigned int *)(v10 + 20), (unsigned long long)result, a3, a6); } } if ( *((_WORD *)this + 13) ) result = google::protobuf::internal::ExtensionSet::_InternalSerializeImpl( (google::protobuf::ExtensionRangeOptions *)((char *)this + 16), (const google::protobuf::MessageLite *)&google::protobuf::_ExtensionRangeOptions_default_instance_, (const google::protobuf::internal::ExtensionSet *)&elf_gnu_hash_bucket[40], 0x20000000, result, a3); v11 = *((_QWORD *)this + 1); if ( (v11 & 1) != 0 ) return google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray( (google::protobuf::internal::WireFormat *)((v11 & 0xFFFFFFFFFFFFFFFCLL) + 8), (const google::protobuf::UnknownFieldSet *)result, a3, a4); return result; }
_InternalSerialize: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDX MOV RAX,RSI MOV R14,RDI MOV EBP,dword ptr [RDI + 0x30] TEST EBP,EBP JZ 0x001eddfb XOR R15D,R15D LAB_001eddd4: MOV RCX,qword ptr [R14 + 0x38] MOVSXD R15,R15D MOV RSI,qword ptr [RCX + R15*0x8 + 0x8] MOV EDX,dword ptr [RSI + 0x14] MOV EDI,0x3e7 MOV RCX,RAX MOV R8,RBX CALL 0x0018cace INC R15D CMP EBP,R15D JNZ 0x001eddd4 LAB_001eddfb: CMP word ptr [R14 + 0x1a],0x0 JZ 0x001ede23 LEA RDI,[R14 + 0x10] LEA RSI,[0x311ce0] MOV EDX,0x3e8 MOV ECX,0x20000000 MOV R8,RAX MOV R9,RBX CALL 0x001b6dc6 LAB_001ede23: MOV RDI,qword ptr [R14 + 0x8] TEST DIL,0x1 JNZ 0x001ede38 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_001ede38: AND RDI,-0x4 ADD RDI,0x8 MOV RSI,RAX MOV RDX,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x001a6e1e
/* google::protobuf::ExtensionRangeOptions::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const */ void __thiscall google::protobuf::ExtensionRangeOptions::_InternalSerialize (ExtensionRangeOptions *this,uchar *param_1,EpsCopyOutputStream *param_2) { int iVar1; MessageLite *pMVar2; int iVar3; iVar1 = *(int *)(this + 0x30); if (iVar1 != 0) { iVar3 = 0; do { pMVar2 = *(MessageLite **)(*(long *)(this + 0x38) + 8 + (long)iVar3 * 8); param_1 = (uchar *)internal::WireFormatLite::InternalWriteMessage (999,pMVar2,*(int *)(pMVar2 + 0x14),param_1,param_2); iVar3 = iVar3 + 1; } while (iVar1 != iVar3); } if (*(short *)(this + 0x1a) != 0) { param_1 = (uchar *)internal::ExtensionSet::_InternalSerializeImpl ((ExtensionSet *)(this + 0x10), (MessageLite *)_ExtensionRangeOptions_default_instance_,1000, 0x20000000,param_1,param_2); } if ((*(ulong *)(this + 8) & 1) == 0) { return; } internal::WireFormat::InternalSerializeUnknownFieldsToArray ((UnknownFieldSet *)((*(ulong *)(this + 8) & 0xfffffffffffffffc) + 8),param_1,param_2); return; }
13,191
common_log::resume()
monkey531[P]llama/common/log.cpp
void resume() { std::lock_guard<std::mutex> lock(mtx); if (running) { return; } running = true; thrd = std::thread([this]() { while (true) { { std::unique_lock<std::mutex> lock(mtx); cv.wait(lock, [this]() { return head != tail; }); cur = entries[head]; head = (head + 1) % entries.size(); } if (cur.is_end) { break; } cur.print(); // stdout and stderr if (file) { cur.print(file); } } }); }
O2
cpp
common_log::resume(): pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx callq 0x7eb74 cmpb $0x0, 0x6a(%rbx) jne 0x7e3d2 movb $0x1, 0x6a(%rbx) leaq 0x10(%rsp), %rsi movq %rbx, (%rsi) leaq 0x8(%rsp), %rdi callq 0x7eb88 leaq 0x28(%rbx), %rdi leaq 0x8(%rsp), %r14 movq %r14, %rsi callq 0x7ebf4 movq %r14, %rdi callq 0x7e8a2 movq %rbx, %rdi callq 0x225f0 addq $0x18, %rsp popq %rbx popq %r14 retq movq %rax, %r14 movq %rbx, %rdi callq 0x225f0 movq %r14, %rdi callq 0x22da0 nop
_ZN10common_log6resumeEv: push r14 push rbx sub rsp, 18h mov rbx, rdi call _ZNSt5mutex4lockEv; std::mutex::lock(void) cmp byte ptr [rbx+6Ah], 0 jnz short loc_7E3D2 mov byte ptr [rbx+6Ah], 1 lea rsi, [rsp+28h+var_18] mov [rsi], rbx lea rdi, [rsp+28h+var_20] call _ZNSt6threadC2IZN10common_log6resumeEvEUlvE_JEvEEOT_DpOT0_ lea rdi, [rbx+28h] lea r14, [rsp+28h+var_20] mov rsi, r14 call _ZNSt6threadaSEOS_; std::thread::operator=(std::thread&&) mov rdi, r14; this call _ZNSt6threadD2Ev; std::thread::~thread() loc_7E3D2: mov rdi, rbx call _pthread_mutex_unlock add rsp, 18h pop rbx pop r14 retn mov r14, rax mov rdi, rbx call _pthread_mutex_unlock mov rdi, r14 call __Unwind_Resume
long long common_log::resume(common_log *this) { _BYTE v2[8]; // [rsp+8h] [rbp-20h] BYREF common_log *v3; // [rsp+10h] [rbp-18h] std::mutex::lock(this); if ( !*((_BYTE *)this + 106) ) { *((_BYTE *)this + 106) = 1; v3 = this; ZNSt6threadC2IZN10common_log6resumeEvEUlvE_JEvEEOT_DpOT0_(v2); std::thread::operator=((char *)this + 40, v2); std::thread::~thread((std::thread *)v2); } return pthread_mutex_unlock(this); }
resume: PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RDI CALL 0x0017eb74 CMP byte ptr [RBX + 0x6a],0x0 JNZ 0x0017e3d2 MOV byte ptr [RBX + 0x6a],0x1 LEA RSI,[RSP + 0x10] MOV qword ptr [RSI],RBX LAB_0017e3af: LEA RDI,[RSP + 0x8] CALL 0x0017eb88 LAB_0017e3b9: LEA RDI,[RBX + 0x28] LEA R14,[RSP + 0x8] MOV RSI,R14 CALL 0x0017ebf4 MOV RDI,R14 CALL 0x0017e8a2 LAB_0017e3d2: MOV RDI,RBX CALL 0x001225f0 ADD RSP,0x18 POP RBX POP R14 RET
/* common_log::resume() */ void __thiscall common_log::resume(common_log *this) { thread local_20 [8]; common_log *local_18; std::mutex::lock((mutex *)this); if (this[0x6a] == (common_log)0x0) { this[0x6a] = (common_log)0x1; /* try { // try from 0017e3af to 0017e3b8 has its CatchHandler @ 0017e3e2 */ local_18 = this; std::thread::thread<common_log::resume()::_lambda()_1_,,void> (local_20,(_lambda___1_ *)&local_18); std::thread::operator=((thread *)(this + 0x28),local_20); std::thread::~thread(local_20); } pthread_mutex_unlock((pthread_mutex_t *)this); return; }
13,192
wt_thd_lazy_init
eloqsql/mysys/waiting_threads.c
void wt_thd_lazy_init(WT_THD *thd, const ulong *ds, const ulong *ts, const ulong *dl, const ulong *tl) { DBUG_ENTER("wt_thd_lazy_init"); thd->waiting_for= 0; thd->weight= 0; thd->deadlock_search_depth_short= ds; thd->timeout_short= ts; thd->deadlock_search_depth_long= dl; thd->timeout_long= tl; /* dynamic array is also initialized lazily - without memory allocations */ my_init_dynamic_array(PSI_INSTRUMENT_ME, &thd->my_resources, sizeof(WT_RESOURCE *), 0, 5, MYF(0)); #ifndef DBUG_OFF thd->name= my_thread_name(); #endif DBUG_VOID_RETURN; }
O0
c
wt_thd_lazy_init: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x8(%rbp), %rax movq $0x0, 0x28(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x58(%rax) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x40(%rax) movq -0x18(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x38(%rax) movq -0x20(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x50(%rax) movq -0x28(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x48(%rax) movq -0x8(%rbp), %rsi xorl %r8d, %r8d movl $0x8, %edx xorl %eax, %eax movl %eax, %ecx movl $0x5, %r9d movl %r8d, %edi movq $0x0, (%rsp) callq 0xda7e0 jmp 0xffd2c addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
wt_thd_lazy_init: 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_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_8] mov qword ptr [rax+28h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+58h], 0 mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax+40h], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_8] mov [rax+38h], rcx mov rcx, [rbp+var_20] mov rax, [rbp+var_8] mov [rax+50h], rcx mov rcx, [rbp+var_28] mov rax, [rbp+var_8] mov [rax+48h], rcx mov rsi, [rbp+var_8] xor r8d, r8d mov edx, 8 xor eax, eax mov ecx, eax mov r9d, 5 mov edi, r8d mov [rsp+30h+var_30], 0 call init_dynamic_array2 jmp short $+2 loc_FFD2C: add rsp, 30h pop rbp retn
char wt_thd_lazy_init(_QWORD *a1, long long a2, long long a3, long long a4, long long a5) { a1[5] = 0LL; a1[11] = 0LL; a1[8] = a2; a1[7] = a3; a1[10] = a4; a1[9] = a5; return init_dynamic_array2(0, (long long)a1, 8u, 0LL, 0, 5, 0LL); }
wt_thd_lazy_init: 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 qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x28],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x58],0x0 MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x40],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x38],RCX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x50],RCX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x48],RCX MOV RSI,qword ptr [RBP + -0x8] XOR R8D,R8D MOV EDX,0x8 XOR EAX,EAX MOV ECX,EAX MOV R9D,0x5 MOV EDI,R8D MOV qword ptr [RSP],0x0 CALL 0x001da7e0 JMP 0x001ffd2c LAB_001ffd2c: ADD RSP,0x30 POP RBP RET
void wt_thd_lazy_init(long param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { *(int8 *)(param_1 + 0x28) = 0; *(int8 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 0x40) = param_2; *(int8 *)(param_1 + 0x38) = param_3; *(int8 *)(param_1 + 0x50) = param_4; *(int8 *)(param_1 + 0x48) = param_5; init_dynamic_array2(0,param_1,8,0,0,5,0); return; }
13,193
wt_thd_lazy_init
eloqsql/mysys/waiting_threads.c
void wt_thd_lazy_init(WT_THD *thd, const ulong *ds, const ulong *ts, const ulong *dl, const ulong *tl) { DBUG_ENTER("wt_thd_lazy_init"); thd->waiting_for= 0; thd->weight= 0; thd->deadlock_search_depth_short= ds; thd->timeout_short= ts; thd->deadlock_search_depth_long= dl; thd->timeout_long= tl; /* dynamic array is also initialized lazily - without memory allocations */ my_init_dynamic_array(PSI_INSTRUMENT_ME, &thd->my_resources, sizeof(WT_RESOURCE *), 0, 5, MYF(0)); #ifndef DBUG_OFF thd->name= my_thread_name(); #endif DBUG_VOID_RETURN; }
O3
c
wt_thd_lazy_init: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, %rax xorl %edi, %edi movq %rdi, 0x28(%rax) movq %rdi, 0x58(%rax) movq %rsi, 0x40(%rax) movq %rdx, 0x38(%rax) movq %rcx, 0x50(%rax) movq %r8, 0x48(%rax) movq %rdi, (%rsp) xorl %edi, %edi movq %rax, %rsi movl $0x8, %edx xorl %ecx, %ecx xorl %r8d, %r8d movl $0x5, %r9d callq 0x91a0c addq $0x10, %rsp popq %rbp retq
wt_thd_lazy_init: push rbp mov rbp, rsp sub rsp, 10h mov rax, rdi xor edi, edi mov [rax+28h], rdi mov [rax+58h], rdi mov [rax+40h], rsi mov [rax+38h], rdx mov [rax+50h], rcx mov [rax+48h], r8 mov [rsp+10h+var_10], rdi xor edi, edi mov rsi, rax mov edx, 8 xor ecx, ecx xor r8d, r8d mov r9d, 5 call init_dynamic_array2 add rsp, 10h pop rbp retn
long long wt_thd_lazy_init(_QWORD *a1, long long a2, long long a3, long long a4, long long a5) { a1[5] = 0LL; a1[11] = 0LL; a1[8] = a2; a1[7] = a3; a1[10] = a4; a1[9] = a5; return init_dynamic_array2(0LL, (long long)a1, 8u, 0LL, 0, 5u, 0LL); }
wt_thd_lazy_init: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV RAX,RDI XOR EDI,EDI MOV qword ptr [RAX + 0x28],RDI MOV qword ptr [RAX + 0x58],RDI MOV qword ptr [RAX + 0x40],RSI MOV qword ptr [RAX + 0x38],RDX MOV qword ptr [RAX + 0x50],RCX MOV qword ptr [RAX + 0x48],R8 MOV qword ptr [RSP],RDI XOR EDI,EDI MOV RSI,RAX MOV EDX,0x8 XOR ECX,ECX XOR R8D,R8D MOV R9D,0x5 CALL 0x00191a0c ADD RSP,0x10 POP RBP RET
void wt_thd_lazy_init(long param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { *(int8 *)(param_1 + 0x28) = 0; *(int8 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 0x40) = param_2; *(int8 *)(param_1 + 0x38) = param_3; *(int8 *)(param_1 + 0x50) = param_4; *(int8 *)(param_1 + 0x48) = param_5; init_dynamic_array2(0,param_1,8,0,0,5,0); return; }
13,194
my_thread_destroy_internal_mutex
eloqsql/mysys/my_thr_init.c
void my_thread_destroy_internal_mutex(void) { mysql_mutex_destroy(&THR_LOCK_threads); mysql_mutex_destroy(&THR_LOCK_malloc); mysql_cond_destroy(&THR_COND_threads); }
O3
c
my_thread_destroy_internal_mutex: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax leaq 0x34d47c(%rip), %rbx # 0x37bda8 movq 0x40(%rbx), %rdi testq %rdi, %rdi je 0x2e94a leaq 0x2cb51c(%rip), %rax # 0x2f9e58 movq (%rax), %rax callq *0x48(%rax) movq $0x0, 0x40(%rbx) leaq 0x34d457(%rip), %rdi # 0x37bda8 callq 0x243d0 leaq 0x34d493(%rip), %rbx # 0x37bdf0 movq 0x40(%rbx), %rdi testq %rdi, %rdi je 0x2e97b leaq 0x2cb4eb(%rip), %rax # 0x2f9e58 movq (%rax), %rax callq *0x48(%rax) movq $0x0, 0x40(%rbx) leaq 0x34d46e(%rip), %rdi # 0x37bdf0 callq 0x243d0 leaq 0x34d4aa(%rip), %rax # 0x37be38 movq 0x30(%rax), %rdi testq %rdi, %rdi jne 0x2e9a9 leaq 0x34d49a(%rip), %rdi # 0x37be38 addq $0x8, %rsp popq %rbx popq %rbp jmp 0x24670 callq 0x24b59 jmp 0x2e997
my_thread_destroy_internal_mutex: push rbp mov rbp, rsp push rbx push rax lea rbx, THR_LOCK_threads mov rdi, [rbx+40h] test rdi, rdi jz short loc_2E94A lea rax, PSI_server mov rax, [rax] call qword ptr [rax+48h] mov qword ptr [rbx+40h], 0 loc_2E94A: lea rdi, THR_LOCK_threads call _pthread_mutex_destroy lea rbx, THR_LOCK_malloc mov rdi, [rbx+40h] test rdi, rdi jz short loc_2E97B lea rax, PSI_server mov rax, [rax] call qword ptr [rax+48h] mov qword ptr [rbx+40h], 0 loc_2E97B: lea rdi, THR_LOCK_malloc call _pthread_mutex_destroy lea rax, THR_COND_threads mov rdi, [rax+30h] test rdi, rdi jnz short loc_2E9A9 loc_2E997: lea rdi, THR_COND_threads add rsp, 8 pop rbx pop rbp jmp _pthread_cond_destroy loc_2E9A9: call my_thread_destroy_internal_mutex_cold_1 jmp short loc_2E997
long long my_thread_destroy_internal_mutex() { long long v0; // rdi long long v1; // rdi v0 = THR_LOCK_threads[8]; if ( v0 ) { (*((void ( **)(long long))PSI_server + 9))(v0); THR_LOCK_threads[8] = 0LL; } pthread_mutex_destroy(THR_LOCK_threads); v1 = THR_LOCK_malloc[8]; if ( v1 ) { (*((void ( **)(long long))PSI_server + 9))(v1); THR_LOCK_malloc[8] = 0LL; } pthread_mutex_destroy(THR_LOCK_malloc); if ( THR_COND_threads[6] ) my_thread_destroy_internal_mutex_cold_1(); return pthread_cond_destroy(THR_COND_threads); }
my_thread_destroy_internal_mutex: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX LEA RBX,[0x47bda8] MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JZ 0x0012e94a LEA RAX,[0x3f9e58] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0x40],0x0 LAB_0012e94a: LEA RDI,[0x47bda8] CALL 0x001243d0 LEA RBX,[0x47bdf0] MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JZ 0x0012e97b LEA RAX,[0x3f9e58] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0x40],0x0 LAB_0012e97b: LEA RDI,[0x47bdf0] CALL 0x001243d0 LEA RAX,[0x47be38] MOV RDI,qword ptr [RAX + 0x30] TEST RDI,RDI JNZ 0x0012e9a9 LAB_0012e997: LEA RDI,[0x47be38] ADD RSP,0x8 POP RBX POP RBP JMP 0x00124670 LAB_0012e9a9: CALL 0x00124b59 JMP 0x0012e997
void my_thread_destroy_internal_mutex(void) { if (THR_LOCK_threads._64_8_ != 0) { (**(code **)(PSI_server + 0x48))(); THR_LOCK_threads._64_8_ = 0; } pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_threads); if (THR_LOCK_malloc._64_8_ != 0) { (**(code **)(PSI_server + 0x48))(); THR_LOCK_malloc._64_8_ = 0; } pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_malloc); if (THR_COND_threads._48_8_ != 0) { my_thread_destroy_internal_mutex_cold_1(); } pthread_cond_destroy((pthread_cond_t *)THR_COND_threads); return; }
13,195
inline_mysql_mutex_init
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_mutex_init( #ifdef HAVE_PSI_MUTEX_INTERFACE PSI_mutex_key key, #endif mysql_mutex_t *that, const pthread_mutexattr_t *attr #ifdef SAFE_MUTEX , const char *src_name, const char *src_file, uint src_line #endif ) { #ifdef HAVE_PSI_MUTEX_INTERFACE that->m_psi= PSI_MUTEX_CALL(init_mutex)(key, &that->m_mutex); #else that->m_psi= NULL; #endif #ifdef COROUTINE_ENABLED that->l.data= that; that->l.prev= that->l.next= NULL; #endif #ifdef SAFE_MUTEX return safe_mutex_init(&that->m_mutex, attr, src_name, src_file, src_line); #else return pthread_mutex_init(&that->m_mutex, attr); #endif }
O0
c
inline_mysql_mutex_init: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) leaq 0x26f096(%rip), %rax # 0x2ceb20 movq (%rax), %rax movq 0x40(%rax), %rax movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi callq *%rax movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x40(%rax) movq -0x10(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x38(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x30(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x28(%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x2a320 addq $0x20, %rsp popq %rbp retq nopl (%rax)
inline_mysql_mutex_init_1: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx lea rax, PSI_server mov rax, [rax] mov rax, [rax+40h] mov edi, [rbp+var_4] mov rsi, [rbp+var_10] call rax mov rcx, rax mov rax, [rbp+var_10] mov [rax+40h], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_10] mov [rax+38h], rcx mov rax, [rbp+var_10] mov qword ptr [rax+30h], 0 mov rax, [rbp+var_10] mov qword ptr [rax+28h], 0 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call _pthread_mutex_init add rsp, 20h pop rbp retn
long long inline_mysql_mutex_init_1(unsigned int a1, _QWORD *a2, long long a3) { a2[8] = ((long long ( *)(_QWORD, _QWORD *))PSI_server[8])(a1, a2); a2[7] = a2; a2[6] = 0LL; a2[5] = 0LL; return pthread_mutex_init(a2, a3); }
inline_mysql_mutex_init: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX LEA RAX,[0x3ceb20] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x40] MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] CALL RAX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x40],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x38],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x30],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x28],0x0 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0012a320 ADD RSP,0x20 POP RBP RET
void inline_mysql_mutex_init (int4 param_1,pthread_mutex_t *param_2,pthread_mutexattr_t *param_3) { int8 uVar1; uVar1 = (**(code **)(PSI_server + 0x40))(param_1,param_2); *(int8 *)((long)param_2 + 0x40) = uVar1; *(pthread_mutex_t **)((long)param_2 + 0x38) = param_2; *(int8 *)((long)param_2 + 0x30) = 0; param_2[1].__align = 0; pthread_mutex_init(param_2,param_3); return; }
13,196
stbi__extend_receive
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h
stbi_inline static int stbi__extend_receive(stbi__jpeg *j, int n) { unsigned int k; int sgn; if (j->code_bits < n) stbi__grow_buffer_unsafe(j); if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative) k = stbi_lrot(j->code_buffer, n); j->code_buffer = k & ~stbi__bmask[n]; k &= stbi__bmask[n]; j->code_bits -= n; return k + (stbi__jbias[n] & (sgn - 1)); }
O1
c
stbi__extend_receive: pushq %rbp pushq %rbx pushq %rax movl %esi, %ebp movq %rdi, %rbx cmpl %esi, 0x4824(%rdi) jge 0x38dc5 movq %rbx, %rdi callq 0x38a73 movl 0x4824(%rbx), %esi xorl %eax, %eax subl %ebp, %esi jl 0x38e13 movl 0x4820(%rbx), %edi movl %edi, %edx movl %ebp, %ecx roll %cl, %edx movl %ebp, %ecx leaq 0xd18a(%rip), %rax # 0x45f70 movl (%rax,%rcx,4), %eax movl %eax, %r8d notl %r8d andl %edx, %r8d movl %r8d, 0x4820(%rbx) andl %eax, %edx movl %esi, 0x4824(%rbx) xorl %eax, %eax testl %edi, %edi js 0x38e11 leaq 0xd1b2(%rip), %rax # 0x45fc0 movl (%rax,%rcx,4), %eax addl %edx, %eax addq $0x8, %rsp popq %rbx popq %rbp retq
stbi__extend_receive: push rbp push rbx push rax mov ebp, esi mov rbx, rdi cmp [rdi+4824h], esi jge short loc_38DC5 mov rdi, rbx call stbi__grow_buffer_unsafe loc_38DC5: mov esi, [rbx+4824h] xor eax, eax sub esi, ebp jl short loc_38E13 mov edi, [rbx+4820h] mov edx, edi mov ecx, ebp rol edx, cl mov ecx, ebp lea rax, stbi__bmask mov eax, [rax+rcx*4] mov r8d, eax not r8d and r8d, edx mov [rbx+4820h], r8d and edx, eax mov [rbx+4824h], esi xor eax, eax test edi, edi js short loc_38E11 lea rax, stbi__jbias mov eax, [rax+rcx*4] loc_38E11: add eax, edx loc_38E13: add rsp, 8 pop rbx pop rbp retn
long long stbi__extend_receive(long long a1, int a2) { int v4; // esi long long result; // rax bool v6; // cc int v7; // esi int v8; // edi int v9; // edx int v10; // eax int v11; // edx int v12; // eax if ( *(_DWORD *)(a1 + 18468) < a2 ) stbi__grow_buffer_unsafe(a1); v4 = *(_DWORD *)(a1 + 18468); result = 0LL; v6 = v4 < a2; v7 = v4 - a2; if ( !v6 ) { v8 = *(_DWORD *)(a1 + 18464); v9 = __ROL4__(*(_DWORD *)(a1 + 18464), a2); v10 = stbi__bmask[a2]; *(_DWORD *)(a1 + 18464) = v9 & ~v10; v11 = v10 & v9; *(_DWORD *)(a1 + 18468) = v7; v12 = 0; if ( v8 >= 0 ) v12 = stbi__jbias[a2]; return (unsigned int)(v11 + v12); } return result; }
stbi__extend_receive: PUSH RBP PUSH RBX PUSH RAX MOV EBP,ESI MOV RBX,RDI CMP dword ptr [RDI + 0x4824],ESI JGE 0x00138dc5 MOV RDI,RBX CALL 0x00138a73 LAB_00138dc5: MOV ESI,dword ptr [RBX + 0x4824] XOR EAX,EAX SUB ESI,EBP JL 0x00138e13 MOV EDI,dword ptr [RBX + 0x4820] MOV EDX,EDI MOV ECX,EBP ROL EDX,CL MOV ECX,EBP LEA RAX,[0x145f70] MOV EAX,dword ptr [RAX + RCX*0x4] MOV R8D,EAX NOT R8D AND R8D,EDX MOV dword ptr [RBX + 0x4820],R8D AND EDX,EAX MOV dword ptr [RBX + 0x4824],ESI XOR EAX,EAX TEST EDI,EDI JS 0x00138e11 LEA RAX,[0x145fc0] MOV EAX,dword ptr [RAX + RCX*0x4] LAB_00138e11: ADD EAX,EDX LAB_00138e13: ADD RSP,0x8 POP RBX POP RBP RET
int stbi__extend_receive(long param_1,uint param_2) { uint uVar1; uint uVar2; byte bVar3; int iVar4; uint uVar5; if (*(int *)(param_1 + 0x4824) < (int)param_2) { stbi__grow_buffer_unsafe(param_1); } iVar4 = 0; if ((int)param_2 <= *(int *)(param_1 + 0x4824)) { uVar1 = *(uint *)(param_1 + 0x4820); bVar3 = (byte)param_2 & 0x1f; uVar5 = uVar1 << bVar3 | uVar1 >> 0x20 - bVar3; uVar2 = *(uint *)(stbi__bmask + (ulong)param_2 * 4); *(uint *)(param_1 + 0x4820) = ~uVar2 & uVar5; *(uint *)(param_1 + 0x4824) = *(int *)(param_1 + 0x4824) - param_2; iVar4 = 0; if (-1 < (int)uVar1) { iVar4 = *(int *)(stbi__jbias + (ulong)param_2 * 4); } iVar4 = iVar4 + (uVar5 & uVar2); } return iVar4; }
13,197
my_block_write
eloqsql/mysys/mf_iocache.c
int my_block_write(IO_CACHE *info, const uchar *Buffer, size_t Count, my_off_t pos) { size_t length; int error=0; /* Assert that we cannot come here with a shared cache. If we do one day, we might need to add a call to copy_to_read_buffer(). */ DBUG_ASSERT(!info->share); DBUG_ASSERT(!(info->myflags & MY_ENCRYPT)); if (pos < info->pos_in_file) { /* Of no overlap, write everything without buffering */ if (pos + Count <= info->pos_in_file) return (int)mysql_file_pwrite(info->file, Buffer, Count, pos, info->myflags | MY_NABP); /* Write the part of the block that is before buffer */ length= (uint) (info->pos_in_file - pos); if (mysql_file_pwrite(info->file, Buffer, length, pos, info->myflags | MY_NABP)) info->error= error= -1; Buffer+=length; pos+= length; Count-= length; } /* Check if we want to write inside the used part of the buffer.*/ length= (size_t) (info->write_end - info->buffer); if (pos < info->pos_in_file + length) { size_t offset= (size_t) (pos - info->pos_in_file); length-=offset; if (length > Count) length=Count; memcpy(info->buffer+offset, Buffer, length); Buffer+=length; Count-= length; /* Fix length of buffer if the new data was larger */ if (info->buffer+length > info->write_pos) info->write_pos=info->buffer+length; if (!Count) return (error); } /* Write at the end of the current buffer; This is the normal case */ if (_my_b_write(info, Buffer, Count)) error= -1; return error; }
O0
c
my_block_write: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movl $0x0, -0x34(%rbp) jmp 0xe6211 jmp 0xe6213 jmp 0xe6215 movq -0x28(%rbp), %rax movq -0x10(%rbp), %rcx cmpq (%rcx), %rax jae 0xe6306 movq -0x28(%rbp), %rax addq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx cmpq (%rcx), %rax ja 0xe6279 movq -0x10(%rbp), %rax movl 0xd4(%rax), %edx movq -0x18(%rbp), %rcx movq -0x20(%rbp), %r8 movq -0x28(%rbp), %r9 movq -0x10(%rbp), %rax movq 0xf8(%rax), %rax orq $0x4, %rax leaq 0x77bbf(%rip), %rdi # 0x15de22 movl $0x673, %esi # imm = 0x673 movq %rax, (%rsp) callq 0xe6400 movl %eax, -0x4(%rbp) jmp 0xe63f7 movq -0x10(%rbp), %rax movq (%rax), %rax subq -0x28(%rbp), %rax movl %eax, %eax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movl 0xd4(%rax), %edx movq -0x18(%rbp), %rcx movq -0x30(%rbp), %r8 movq -0x28(%rbp), %r9 movq -0x10(%rbp), %rax movq 0xf8(%rax), %rax orq $0x4, %rax leaq 0x77b6c(%rip), %rdi # 0x15de22 movl $0x676, %esi # imm = 0x676 movq %rax, (%rsp) callq 0xe6400 cmpq $0x0, %rax je 0xe62df movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF movq -0x10(%rbp), %rax movl $0xffffffff, 0xe4(%rax) # imm = 0xFFFFFFFF movq -0x30(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x30(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x30(%rbp), %rcx movq -0x20(%rbp), %rax subq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x48(%rax), %rax movq -0x10(%rbp), %rcx movq 0x20(%rcx), %rcx subq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movq -0x10(%rbp), %rcx movq (%rcx), %rcx addq -0x30(%rbp), %rcx cmpq %rcx, %rax jae 0xe63d4 movq -0x28(%rbp), %rax movq -0x10(%rbp), %rcx subq (%rcx), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rcx movq -0x30(%rbp), %rax subq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq -0x20(%rbp), %rax jbe 0xe6365 movq -0x20(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x20(%rax), %rdi addq -0x40(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x30(%rbp), %rdx callq 0x2a0b0 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) movq -0x10(%rbp), %rax movq 0x20(%rax), %rax addq -0x30(%rbp), %rax movq -0x10(%rbp), %rcx cmpq 0x40(%rcx), %rax jbe 0xe63c3 movq -0x10(%rbp), %rax movq 0x20(%rax), %rcx addq -0x30(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x40(%rax) cmpq $0x0, -0x20(%rbp) jne 0xe63d2 movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xe63f7 jmp 0xe63d4 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0xe5290 cmpl $0x0, %eax je 0xe63f1 movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq
my_block_write: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_34], 0 jmp short $+2 loc_E6211: jmp short $+2 loc_E6213: jmp short $+2 loc_E6215: mov rax, [rbp+var_28] mov rcx, [rbp+var_10] cmp rax, [rcx] jnb loc_E6306 mov rax, [rbp+var_28] add rax, [rbp+var_20] mov rcx, [rbp+var_10] cmp rax, [rcx] ja short loc_E6279 mov rax, [rbp+var_10] mov edx, [rax+0D4h] mov rcx, [rbp+var_18] mov r8, [rbp+var_20] mov r9, [rbp+var_28] mov rax, [rbp+var_10] mov rax, [rax+0F8h] or rax, 4 lea rdi, aWorkspaceLlm4b_36; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 673h mov [rsp+50h+var_50], rax call inline_mysql_file_pwrite_3 mov [rbp+var_4], eax jmp loc_E63F7 loc_E6279: mov rax, [rbp+var_10] mov rax, [rax] sub rax, [rbp+var_28] mov eax, eax mov [rbp+var_30], rax mov rax, [rbp+var_10] mov edx, [rax+0D4h] mov rcx, [rbp+var_18] mov r8, [rbp+var_30] mov r9, [rbp+var_28] mov rax, [rbp+var_10] mov rax, [rax+0F8h] or rax, 4 lea rdi, aWorkspaceLlm4b_36; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 676h mov [rsp+50h+var_50], rax call inline_mysql_file_pwrite_3 cmp rax, 0 jz short loc_E62DF mov [rbp+var_34], 0FFFFFFFFh mov rax, [rbp+var_10] mov dword ptr [rax+0E4h], 0FFFFFFFFh loc_E62DF: mov rax, [rbp+var_30] add rax, [rbp+var_18] mov [rbp+var_18], rax mov rax, [rbp+var_30] add rax, [rbp+var_28] mov [rbp+var_28], rax mov rcx, [rbp+var_30] mov rax, [rbp+var_20] sub rax, rcx mov [rbp+var_20], rax loc_E6306: mov rax, [rbp+var_10] mov rax, [rax+48h] mov rcx, [rbp+var_10] mov rcx, [rcx+20h] sub rax, rcx mov [rbp+var_30], rax mov rax, [rbp+var_28] mov rcx, [rbp+var_10] mov rcx, [rcx] add rcx, [rbp+var_30] cmp rax, rcx jnb loc_E63D4 mov rax, [rbp+var_28] mov rcx, [rbp+var_10] sub rax, [rcx] mov [rbp+var_40], rax mov rcx, [rbp+var_40] mov rax, [rbp+var_30] sub rax, rcx mov [rbp+var_30], rax mov rax, [rbp+var_30] cmp rax, [rbp+var_20] jbe short loc_E6365 mov rax, [rbp+var_20] mov [rbp+var_30], rax loc_E6365: mov rax, [rbp+var_10] mov rdi, [rax+20h] add rdi, [rbp+var_40] mov rsi, [rbp+var_18] mov rdx, [rbp+var_30] call _memcpy 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 mov rax, [rbp+var_10] mov rax, [rax+20h] add rax, [rbp+var_30] mov rcx, [rbp+var_10] cmp rax, [rcx+40h] jbe short loc_E63C3 mov rax, [rbp+var_10] mov rcx, [rax+20h] add rcx, [rbp+var_30] mov rax, [rbp+var_10] mov [rax+40h], rcx loc_E63C3: cmp [rbp+var_20], 0 jnz short loc_E63D2 mov eax, [rbp+var_34] mov [rbp+var_4], eax jmp short loc_E63F7 loc_E63D2: jmp short $+2 loc_E63D4: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _my_b_write cmp eax, 0 jz short loc_E63F1 mov [rbp+var_34], 0FFFFFFFFh loc_E63F1: mov eax, [rbp+var_34] mov [rbp+var_4], eax loc_E63F7: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long my_block_write(long long a1, const char *a2, unsigned long long a3, unsigned long long a4) { unsigned long long v5; // [rsp+10h] [rbp-40h] unsigned int v6; // [rsp+1Ch] [rbp-34h] long long v7; // [rsp+20h] [rbp-30h] long long v8; // [rsp+20h] [rbp-30h] unsigned long long v9; // [rsp+20h] [rbp-30h] unsigned long long v10; // [rsp+28h] [rbp-28h] unsigned long long v11; // [rsp+30h] [rbp-20h] const char *v12; // [rsp+38h] [rbp-18h] v12 = a2; v11 = a3; v10 = a4; v6 = 0; if ( a4 < *(_QWORD *)a1 ) { if ( a3 + a4 <= *(_QWORD *)a1 ) return (unsigned int)inline_mysql_file_pwrite_3( (unsigned int)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 1651, *(_DWORD *)(a1 + 212), (_DWORD)a2, a3, a4, *(_QWORD *)(a1 + 248) | 4LL); v7 = (unsigned int)*(_QWORD *)a1 - (unsigned int)a4; if ( inline_mysql_file_pwrite_3( (unsigned int)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 1654, *(_DWORD *)(a1 + 212), (_DWORD)a2, (unsigned int)*(_QWORD *)a1 - (unsigned int)a4, a4, *(_QWORD *)(a1 + 248) | 4LL) ) { v6 = -1; *(_DWORD *)(a1 + 228) = -1; } v12 = &a2[v7]; v10 += v7; v11 -= v7; } v8 = *(_QWORD *)(a1 + 72) - *(_QWORD *)(a1 + 32); if ( v10 >= v8 + *(_QWORD *)a1 ) goto LABEL_20; v5 = v10 - *(_QWORD *)a1; v9 = v8 - v5; if ( v9 > v11 ) v9 = v11; memcpy(v5 + *(_QWORD *)(a1 + 32), v12, v9); v12 += v9; v11 -= v9; if ( v9 + *(_QWORD *)(a1 + 32) > *(_QWORD *)(a1 + 64) ) *(_QWORD *)(a1 + 64) = v9 + *(_QWORD *)(a1 + 32); if ( v11 ) { LABEL_20: if ( (unsigned int)my_b_write(a1, v12, v11) ) return (unsigned int)-1; return v6; } else { return v6; } }
my_block_write: 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 dword ptr [RBP + -0x34],0x0 JMP 0x001e6211 LAB_001e6211: JMP 0x001e6213 LAB_001e6213: JMP 0x001e6215 LAB_001e6215: MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX] JNC 0x001e6306 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX] JA 0x001e6279 MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0xd4] MOV RCX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x20] MOV R9,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xf8] OR RAX,0x4 LEA RDI,[0x25de22] MOV ESI,0x673 MOV qword ptr [RSP],RAX CALL 0x001e6400 MOV dword ptr [RBP + -0x4],EAX JMP 0x001e63f7 LAB_001e6279: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] SUB RAX,qword ptr [RBP + -0x28] MOV EAX,EAX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0xd4] MOV RCX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x30] MOV R9,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xf8] OR RAX,0x4 LEA RDI,[0x25de22] MOV ESI,0x676 MOV qword ptr [RSP],RAX CALL 0x001e6400 CMP RAX,0x0 JZ 0x001e62df MOV dword ptr [RBP + -0x34],0xffffffff MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xe4],0xffffffff LAB_001e62df: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x28],RAX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x20] SUB RAX,RCX MOV qword ptr [RBP + -0x20],RAX LAB_001e6306: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x48] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x20] SUB RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] ADD RCX,qword ptr [RBP + -0x30] CMP RAX,RCX JNC 0x001e63d4 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,qword ptr [RCX] MOV qword ptr [RBP + -0x40],RAX MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x30] SUB RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x20] JBE 0x001e6365 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x30],RAX LAB_001e6365: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x20] ADD RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x30] CALL 0x0012a0b0 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 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] ADD RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x40] JBE 0x001e63c3 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x20] ADD RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x40],RCX LAB_001e63c3: CMP qword ptr [RBP + -0x20],0x0 JNZ 0x001e63d2 MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX JMP 0x001e63f7 LAB_001e63d2: JMP 0x001e63d4 LAB_001e63d4: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001e5290 CMP EAX,0x0 JZ 0x001e63f1 MOV dword ptr [RBP + -0x34],0xffffffff LAB_001e63f1: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX LAB_001e63f7: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 my_block_write(ulong *param_1,void *param_2,ulong param_3,ulong param_4) { int4 uVar1; int iVar2; long lVar3; int4 local_3c; size_t local_38; ulong local_30; ulong local_28; void *local_20; local_3c = 0; local_30 = param_4; local_28 = param_3; local_20 = param_2; if (param_4 < *param_1) { if (param_4 + param_3 <= *param_1) { uVar1 = inline_mysql_file_pwrite ("/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x673, *(int4 *)((long)param_1 + 0xd4),param_2,param_3,param_4, param_1[0x1f] | 4); return uVar1; } local_28 = (ulong)(uint)((int)*param_1 - (int)param_4); lVar3 = inline_mysql_file_pwrite ("/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x676, *(int4 *)((long)param_1 + 0xd4),param_2,local_28,param_4, param_1[0x1f] | 4); if (lVar3 != 0) { local_3c = 0xffffffff; *(int4 *)((long)param_1 + 0xe4) = 0xffffffff; } local_20 = (void *)(local_28 + (long)param_2); local_30 = local_28 + param_4; local_28 = param_3 - local_28; } if (local_30 < *param_1 + (param_1[9] - param_1[4])) { local_38 = (param_1[9] - param_1[4]) - (local_30 - *param_1); if (local_28 < local_38) { local_38 = local_28; } memcpy((void *)(param_1[4] + (local_30 - *param_1)),local_20,local_38); local_20 = (void *)(local_38 + (long)local_20); local_28 = local_28 - local_38; if (param_1[8] < param_1[4] + local_38) { param_1[8] = param_1[4] + local_38; } if (local_28 == 0) { return local_3c; } } iVar2 = _my_b_write(param_1,local_20,local_28); if (iVar2 != 0) { local_3c = 0xffffffff; } return local_3c; }
13,198
mz_zip_writer_end_internal
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
static mz_bool mz_zip_writer_end_internal(mz_zip_archive *pZip, mz_bool set_last_error) { mz_zip_internal_state *pState; mz_bool status = MZ_TRUE; if ((!pZip) || (!pZip->m_pState) || (!pZip->m_pAlloc) || (!pZip->m_pFree) || ((pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) && (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED))) { if (set_last_error) mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); return MZ_FALSE; } pState = pZip->m_pState; pZip->m_pState = NULL; mz_zip_array_clear(pZip, &pState->m_central_dir); mz_zip_array_clear(pZip, &pState->m_central_dir_offsets); mz_zip_array_clear(pZip, &pState->m_sorted_central_dir_offsets); #ifndef MINIZ_NO_STDIO if (pState->m_pFile) { if (pZip->m_zip_type == MZ_ZIP_TYPE_FILE) { if (MZ_FCLOSE(pState->m_pFile) == EOF) { if (set_last_error) mz_zip_set_error(pZip, MZ_ZIP_FILE_CLOSE_FAILED); status = MZ_FALSE; } } pState->m_pFile = NULL; } #endif /* #ifndef MINIZ_NO_STDIO */ if ((pZip->m_pWrite == mz_zip_heap_write_func) && (pState->m_pMem)) { pZip->m_pFree(pZip->m_pAlloc_opaque, pState->m_pMem); pState->m_pMem = NULL; } pZip->m_pFree(pZip->m_pAlloc_opaque, pState); pZip->m_zip_mode = MZ_ZIP_MODE_INVALID; return status; }
O0
c
mz_zip_writer_end_internal: subq $0x78, %rsp movq %rdi, 0x20(%rsp) movl %esi, 0x1c(%rsp) movl $0x1, 0xc(%rsp) cmpq $0x0, 0x20(%rsp) je 0x105fb7 movq 0x20(%rsp), %rax cmpq $0x0, 0x68(%rax) je 0x105fb7 movq 0x20(%rsp), %rax cmpq $0x0, 0x28(%rax) je 0x105fb7 movq 0x20(%rsp), %rax cmpq $0x0, 0x30(%rax) je 0x105fb7 movq 0x20(%rsp), %rax cmpl $0x2, 0x14(%rax) je 0x105ff3 movq 0x20(%rsp), %rax cmpl $0x3, 0x14(%rax) je 0x105ff3 cmpl $0x0, 0x1c(%rsp) je 0x105fe6 movq 0x20(%rsp), %rax movq %rax, 0x40(%rsp) movl $0x18, 0x3c(%rsp) cmpq $0x0, 0x40(%rsp) je 0x105fe4 movl 0x3c(%rsp), %ecx movq 0x40(%rsp), %rax movl %ecx, 0x1c(%rax) jmp 0x105fe6 movl $0x0, 0x28(%rsp) jmp 0x1061c7 movq 0x20(%rsp), %rax movq 0x68(%rax), %rax movq %rax, 0x10(%rsp) movq 0x20(%rsp), %rax movq $0x0, 0x68(%rax) movq 0x20(%rsp), %rcx movq 0x10(%rsp), %rax movq %rcx, 0x70(%rsp) movq %rax, 0x68(%rsp) movq 0x70(%rsp), %rax movq 0x30(%rax), %rax movq 0x70(%rsp), %rcx movq 0x40(%rcx), %rdi movq 0x68(%rsp), %rcx movq (%rcx), %rsi callq *%rax movq 0x68(%rsp), %rdi xorl %esi, %esi movl $0x20, %edx callq 0xb390 movq 0x20(%rsp), %rcx movq 0x10(%rsp), %rax addq $0x20, %rax movq %rcx, 0x60(%rsp) movq %rax, 0x58(%rsp) movq 0x60(%rsp), %rax movq 0x30(%rax), %rax movq 0x60(%rsp), %rcx movq 0x40(%rcx), %rdi movq 0x58(%rsp), %rcx movq (%rcx), %rsi callq *%rax movq 0x58(%rsp), %rdi xorl %esi, %esi movl $0x20, %edx callq 0xb390 movq 0x20(%rsp), %rcx movq 0x10(%rsp), %rax addq $0x40, %rax movq %rcx, 0x50(%rsp) movq %rax, 0x48(%rsp) movq 0x50(%rsp), %rax movq 0x30(%rax), %rax movq 0x50(%rsp), %rcx movq 0x40(%rcx), %rdi movq 0x48(%rsp), %rcx movq (%rcx), %rsi callq *%rax movq 0x48(%rsp), %rdi xorl %esi, %esi movl $0x20, %edx callq 0xb390 movq 0x10(%rsp), %rax cmpq $0x0, 0x70(%rax) je 0x106149 movq 0x20(%rsp), %rax cmpl $0x4, 0x18(%rax) jne 0x10613c movq 0x10(%rsp), %rax movq 0x70(%rax), %rdi callq 0xb770 cmpl $-0x1, %eax jne 0x10613a cmpl $0x0, 0x1c(%rsp) je 0x106132 movq 0x20(%rsp), %rax movq %rax, 0x30(%rsp) movl $0x15, 0x2c(%rsp) cmpq $0x0, 0x30(%rsp) je 0x106130 movl 0x2c(%rsp), %ecx movq 0x30(%rsp), %rax movl %ecx, 0x1c(%rax) jmp 0x106132 movl $0x0, 0xc(%rsp) jmp 0x10613c movq 0x10(%rsp), %rax movq $0x0, 0x70(%rax) movq 0x20(%rsp), %rax leaq -0x3c5(%rip), %rcx # 0x105d90 cmpq %rcx, 0x50(%rax) jne 0x10619a movq 0x10(%rsp), %rax cmpq $0x0, 0x80(%rax) je 0x10619a movq 0x20(%rsp), %rax movq 0x30(%rax), %rax movq 0x20(%rsp), %rcx movq 0x40(%rcx), %rdi movq 0x10(%rsp), %rcx movq 0x80(%rcx), %rsi callq *%rax movq 0x10(%rsp), %rax movq $0x0, 0x80(%rax) movq 0x20(%rsp), %rax movq 0x30(%rax), %rax movq 0x20(%rsp), %rcx movq 0x40(%rcx), %rdi movq 0x10(%rsp), %rsi callq *%rax movq 0x20(%rsp), %rax movl $0x0, 0x14(%rax) movl 0xc(%rsp), %eax movl %eax, 0x28(%rsp) movl 0x28(%rsp), %eax addq $0x78, %rsp retq
mz_zip_writer_end_internal: sub rsp, 78h mov [rsp+78h+var_58], rdi mov [rsp+78h+var_5C], esi mov [rsp+78h+var_6C], 1 cmp [rsp+78h+var_58], 0 jz short loc_105FB7 mov rax, [rsp+78h+var_58] cmp qword ptr [rax+68h], 0 jz short loc_105FB7 mov rax, [rsp+78h+var_58] cmp qword ptr [rax+28h], 0 jz short loc_105FB7 mov rax, [rsp+78h+var_58] cmp qword ptr [rax+30h], 0 jz short loc_105FB7 mov rax, [rsp+78h+var_58] cmp dword ptr [rax+14h], 2 jz short loc_105FF3 mov rax, [rsp+78h+var_58] cmp dword ptr [rax+14h], 3 jz short loc_105FF3 loc_105FB7: cmp [rsp+78h+var_5C], 0 jz short loc_105FE6 mov rax, [rsp+78h+var_58] mov [rsp+78h+var_38], rax mov [rsp+78h+var_3C], 18h cmp [rsp+78h+var_38], 0 jz short loc_105FE4 mov ecx, [rsp+78h+var_3C] mov rax, [rsp+78h+var_38] mov [rax+1Ch], ecx loc_105FE4: jmp short $+2 loc_105FE6: mov [rsp+78h+var_50], 0 jmp loc_1061C7 loc_105FF3: mov rax, [rsp+78h+var_58] mov rax, [rax+68h] mov [rsp+78h+var_68], rax mov rax, [rsp+78h+var_58] mov qword ptr [rax+68h], 0 mov rcx, [rsp+78h+var_58] mov rax, [rsp+78h+var_68] mov [rsp+78h+var_8], rcx mov [rsp+78h+var_10], rax mov rax, [rsp+78h+var_8] mov rax, [rax+30h] mov rcx, [rsp+78h+var_8] mov rdi, [rcx+40h] mov rcx, [rsp+78h+var_10] mov rsi, [rcx] call rax mov rdi, [rsp+78h+var_10] xor esi, esi mov edx, 20h ; ' ' call _memset mov rcx, [rsp+78h+var_58] mov rax, [rsp+78h+var_68] add rax, 20h ; ' ' mov [rsp+78h+var_18], rcx mov [rsp+78h+var_20], rax mov rax, [rsp+78h+var_18] mov rax, [rax+30h] mov rcx, [rsp+78h+var_18] mov rdi, [rcx+40h] mov rcx, [rsp+78h+var_20] mov rsi, [rcx] call rax mov rdi, [rsp+78h+var_20] xor esi, esi mov edx, 20h ; ' ' call _memset mov rcx, [rsp+78h+var_58] mov rax, [rsp+78h+var_68] add rax, 40h ; '@' mov [rsp+78h+var_28], rcx mov [rsp+78h+var_30], rax mov rax, [rsp+78h+var_28] mov rax, [rax+30h] mov rcx, [rsp+78h+var_28] mov rdi, [rcx+40h] mov rcx, [rsp+78h+var_30] mov rsi, [rcx] call rax mov rdi, [rsp+78h+var_30] xor esi, esi mov edx, 20h ; ' ' call _memset mov rax, [rsp+78h+var_68] cmp qword ptr [rax+70h], 0 jz short loc_106149 mov rax, [rsp+78h+var_58] cmp dword ptr [rax+18h], 4 jnz short loc_10613C mov rax, [rsp+78h+var_68] mov rdi, [rax+70h] call _fclose cmp eax, 0FFFFFFFFh jnz short loc_10613A cmp [rsp+78h+var_5C], 0 jz short loc_106132 mov rax, [rsp+78h+var_58] mov [rsp+78h+var_48], rax mov [rsp+78h+var_4C], 15h cmp [rsp+78h+var_48], 0 jz short loc_106130 mov ecx, [rsp+78h+var_4C] mov rax, [rsp+78h+var_48] mov [rax+1Ch], ecx loc_106130: jmp short $+2 loc_106132: mov [rsp+78h+var_6C], 0 loc_10613A: jmp short $+2 loc_10613C: mov rax, [rsp+78h+var_68] mov qword ptr [rax+70h], 0 loc_106149: mov rax, [rsp+78h+var_58] lea rcx, mz_zip_heap_write_func cmp [rax+50h], rcx jnz short loc_10619A mov rax, [rsp+78h+var_68] cmp qword ptr [rax+80h], 0 jz short loc_10619A mov rax, [rsp+78h+var_58] mov rax, [rax+30h] mov rcx, [rsp+78h+var_58] mov rdi, [rcx+40h] mov rcx, [rsp+78h+var_68] mov rsi, [rcx+80h] call rax mov rax, [rsp+78h+var_68] mov qword ptr [rax+80h], 0 loc_10619A: mov rax, [rsp+78h+var_58] mov rax, [rax+30h] mov rcx, [rsp+78h+var_58] mov rdi, [rcx+40h] mov rsi, [rsp+78h+var_68] call rax mov rax, [rsp+78h+var_58] mov dword ptr [rax+14h], 0 mov eax, [rsp+78h+var_6C] mov [rsp+78h+var_50], eax loc_1061C7: mov eax, [rsp+78h+var_50] add rsp, 78h retn
long long mz_zip_writer_end_internal(long long a1, int a2) { unsigned int v3; // [rsp+Ch] [rbp-6Ch] _QWORD *v4; // [rsp+10h] [rbp-68h] v3 = 1; if ( a1 && *(_QWORD *)(a1 + 104) && *(_QWORD *)(a1 + 40) && *(_QWORD *)(a1 + 48) && (*(_DWORD *)(a1 + 20) == 2 || *(_DWORD *)(a1 + 20) == 3) ) { v4 = *(_QWORD **)(a1 + 104); *(_QWORD *)(a1 + 104) = 0LL; (*(void ( **)(_QWORD, _QWORD))(a1 + 48))(*(_QWORD *)(a1 + 64), *v4); memset(v4, 0LL, 32LL); (*(void ( **)(_QWORD, _QWORD))(a1 + 48))(*(_QWORD *)(a1 + 64), v4[4]); memset(v4 + 4, 0LL, 32LL); (*(void ( **)(_QWORD, _QWORD))(a1 + 48))(*(_QWORD *)(a1 + 64), v4[8]); memset(v4 + 8, 0LL, 32LL); if ( v4[14] ) { if ( *(_DWORD *)(a1 + 24) == 4 && (unsigned int)fclose(v4[14]) == -1 ) { if ( a2 ) *(_DWORD *)(a1 + 28) = 21; v3 = 0; } v4[14] = 0LL; } if ( *(long long ( **)(long long, long long, long long, long long))(a1 + 80) == mz_zip_heap_write_func && v4[16] ) { (*(void ( **)(_QWORD, _QWORD))(a1 + 48))(*(_QWORD *)(a1 + 64), v4[16]); v4[16] = 0LL; } (*(void ( **)(_QWORD, _QWORD *))(a1 + 48))(*(_QWORD *)(a1 + 64), v4); *(_DWORD *)(a1 + 20) = 0; return v3; } else { if ( a2 && a1 ) *(_DWORD *)(a1 + 28) = 24; return 0; } }
13,199
mz_zip_writer_end_internal
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
static mz_bool mz_zip_writer_end_internal(mz_zip_archive *pZip, mz_bool set_last_error) { mz_zip_internal_state *pState; mz_bool status = MZ_TRUE; if ((!pZip) || (!pZip->m_pState) || (!pZip->m_pAlloc) || (!pZip->m_pFree) || ((pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) && (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED))) { if (set_last_error) mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); return MZ_FALSE; } pState = pZip->m_pState; pZip->m_pState = NULL; mz_zip_array_clear(pZip, &pState->m_central_dir); mz_zip_array_clear(pZip, &pState->m_central_dir_offsets); mz_zip_array_clear(pZip, &pState->m_sorted_central_dir_offsets); #ifndef MINIZ_NO_STDIO if (pState->m_pFile) { if (pZip->m_zip_type == MZ_ZIP_TYPE_FILE) { if (MZ_FCLOSE(pState->m_pFile) == EOF) { if (set_last_error) mz_zip_set_error(pZip, MZ_ZIP_FILE_CLOSE_FAILED); status = MZ_FALSE; } } pState->m_pFile = NULL; } #endif /* #ifndef MINIZ_NO_STDIO */ if ((pZip->m_pWrite == mz_zip_heap_write_func) && (pState->m_pMem)) { pZip->m_pFree(pZip->m_pAlloc_opaque, pState->m_pMem); pState->m_pMem = NULL; } pZip->m_pFree(pZip->m_pAlloc_opaque, pState); pZip->m_zip_mode = MZ_ZIP_MODE_INVALID; return status; }
O2
c
mz_zip_writer_end_internal: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax xorl %ebp, %ebp testq %rdi, %rdi je 0x61018 movl %esi, %r15d movq %rdi, %rbx movq 0x68(%rdi), %r14 testq %r14, %r14 je 0x6100c cmpq $0x0, 0x28(%rbx) je 0x6100c movq 0x30(%rbx), %rax testq %rax, %rax je 0x6100c movl 0x14(%rbx), %ecx andl $-0x2, %ecx cmpl $0x2, %ecx jne 0x6100c andq $0x0, 0x68(%rbx) movq 0x40(%rbx), %rdi movq (%r14), %rsi callq *%rax xorps %xmm0, %xmm0 movups %xmm0, 0x10(%r14) movups %xmm0, (%r14) movq 0x40(%rbx), %rdi movq 0x20(%r14), %rsi callq *0x30(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x30(%r14) movups %xmm0, 0x20(%r14) movq 0x40(%rbx), %rdi movq 0x40(%r14), %rsi callq *0x30(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x50(%r14) movups %xmm0, 0x40(%r14) movq 0x70(%r14), %rdi pushq $0x1 popq %rbp testq %rdi, %rdi je 0x60fd4 cmpl $0x4, 0x18(%rbx) jne 0x60fcf callq 0xa5e0 cmpl $-0x1, %eax jne 0x60fcf xorl %ebp, %ebp testl %r15d, %r15d je 0x60fcf movl $0x15, 0x1c(%rbx) andq $0x0, 0x70(%r14) leaq -0x193(%rip), %rax # 0x60e48 cmpq %rax, 0x50(%rbx) jne 0x60ffc movq 0x80(%r14), %rsi testq %rsi, %rsi je 0x60ffc movq 0x40(%rbx), %rdi callq *0x30(%rbx) andq $0x0, 0x80(%r14) movq 0x40(%rbx), %rdi movq %r14, %rsi callq *0x30(%rbx) andl $0x0, 0x14(%rbx) jmp 0x61018 testl %r15d, %r15d je 0x61018 movl $0x18, 0x1c(%rbx) movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mz_zip_writer_end_internal: push rbp push r15 push r14 push rbx push rax xor ebp, ebp test rdi, rdi jz loc_61018 mov r15d, esi mov rbx, rdi mov r14, [rdi+68h] test r14, r14 jz loc_6100C cmp qword ptr [rbx+28h], 0 jz loc_6100C mov rax, [rbx+30h] test rax, rax jz loc_6100C mov ecx, [rbx+14h] and ecx, 0FFFFFFFEh cmp ecx, 2 jnz loc_6100C and qword ptr [rbx+68h], 0 mov rdi, [rbx+40h] mov rsi, [r14] call rax xorps xmm0, xmm0 movups xmmword ptr [r14+10h], xmm0 movups xmmword ptr [r14], xmm0 mov rdi, [rbx+40h] mov rsi, [r14+20h] call qword ptr [rbx+30h] xorps xmm0, xmm0 movups xmmword ptr [r14+30h], xmm0 movups xmmword ptr [r14+20h], xmm0 mov rdi, [rbx+40h] mov rsi, [r14+40h] call qword ptr [rbx+30h] xorps xmm0, xmm0 movups xmmword ptr [r14+50h], xmm0 movups xmmword ptr [r14+40h], xmm0 mov rdi, [r14+70h] push 1 pop rbp test rdi, rdi jz short loc_60FD4 cmp dword ptr [rbx+18h], 4 jnz short loc_60FCF call _fclose cmp eax, 0FFFFFFFFh jnz short loc_60FCF xor ebp, ebp test r15d, r15d jz short loc_60FCF mov dword ptr [rbx+1Ch], 15h loc_60FCF: and qword ptr [r14+70h], 0 loc_60FD4: lea rax, mz_zip_heap_write_func cmp [rbx+50h], rax jnz short loc_60FFC mov rsi, [r14+80h] test rsi, rsi jz short loc_60FFC mov rdi, [rbx+40h] call qword ptr [rbx+30h] and qword ptr [r14+80h], 0 loc_60FFC: mov rdi, [rbx+40h] mov rsi, r14 call qword ptr [rbx+30h] and dword ptr [rbx+14h], 0 jmp short loc_61018 loc_6100C: test r15d, r15d jz short loc_61018 mov dword ptr [rbx+1Ch], 18h loc_61018: mov eax, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mz_zip_writer_end_internal(long long a1, int a2) { unsigned int v2; // ebp long long v4; // r14 void ( *v5)(_QWORD, _QWORD); // rax long long v6; // rdi v2 = 0; if ( a1 ) { v4 = *(_QWORD *)(a1 + 104); if ( v4 && *(_QWORD *)(a1 + 40) && (v5 = *(void ( **)(_QWORD, _QWORD))(a1 + 48)) != 0LL && (*(_DWORD *)(a1 + 20) & 0xFFFFFFFE) == 2 ) { *(_QWORD *)(a1 + 104) = 0LL; v5(*(_QWORD *)(a1 + 64), *(_QWORD *)v4); *(_OWORD *)(v4 + 16) = 0LL; *(_OWORD *)v4 = 0LL; (*(void ( **)(_QWORD, _QWORD))(a1 + 48))(*(_QWORD *)(a1 + 64), *(_QWORD *)(v4 + 32)); *(_OWORD *)(v4 + 48) = 0LL; *(_OWORD *)(v4 + 32) = 0LL; (*(void ( **)(_QWORD, _QWORD))(a1 + 48))(*(_QWORD *)(a1 + 64), *(_QWORD *)(v4 + 64)); *(_OWORD *)(v4 + 80) = 0LL; *(_OWORD *)(v4 + 64) = 0LL; v6 = *(_QWORD *)(v4 + 112); v2 = 1; if ( v6 ) { if ( *(_DWORD *)(a1 + 24) == 4 && (unsigned int)fclose(v6) == -1 ) { v2 = 0; if ( a2 ) *(_DWORD *)(a1 + 28) = 21; } *(_QWORD *)(v4 + 112) = 0LL; } if ( *(long long ( **)(long long, long long, long long, long long))(a1 + 80) == mz_zip_heap_write_func && *(_QWORD *)(v4 + 128) ) { (*(void ( **)(_QWORD))(a1 + 48))(*(_QWORD *)(a1 + 64)); *(_QWORD *)(v4 + 128) = 0LL; } (*(void ( **)(_QWORD, long long))(a1 + 48))(*(_QWORD *)(a1 + 64), v4); *(_DWORD *)(a1 + 20) = 0; } else if ( a2 ) { *(_DWORD *)(a1 + 28) = 24; } } return v2; }
mz_zip_writer_end_internal: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX XOR EBP,EBP TEST RDI,RDI JZ 0x00161018 MOV R15D,ESI MOV RBX,RDI MOV R14,qword ptr [RDI + 0x68] TEST R14,R14 JZ 0x0016100c CMP qword ptr [RBX + 0x28],0x0 JZ 0x0016100c MOV RAX,qword ptr [RBX + 0x30] TEST RAX,RAX JZ 0x0016100c MOV ECX,dword ptr [RBX + 0x14] AND ECX,0xfffffffe CMP ECX,0x2 JNZ 0x0016100c AND qword ptr [RBX + 0x68],0x0 MOV RDI,qword ptr [RBX + 0x40] MOV RSI,qword ptr [R14] CALL RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x10],XMM0 MOVUPS xmmword ptr [R14],XMM0 MOV RDI,qword ptr [RBX + 0x40] MOV RSI,qword ptr [R14 + 0x20] CALL qword ptr [RBX + 0x30] XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x30],XMM0 MOVUPS xmmword ptr [R14 + 0x20],XMM0 MOV RDI,qword ptr [RBX + 0x40] MOV RSI,qword ptr [R14 + 0x40] CALL qword ptr [RBX + 0x30] XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x50],XMM0 MOVUPS xmmword ptr [R14 + 0x40],XMM0 MOV RDI,qword ptr [R14 + 0x70] PUSH 0x1 POP RBP TEST RDI,RDI JZ 0x00160fd4 CMP dword ptr [RBX + 0x18],0x4 JNZ 0x00160fcf CALL 0x0010a5e0 CMP EAX,-0x1 JNZ 0x00160fcf XOR EBP,EBP TEST R15D,R15D JZ 0x00160fcf MOV dword ptr [RBX + 0x1c],0x15 LAB_00160fcf: AND qword ptr [R14 + 0x70],0x0 LAB_00160fd4: LEA RAX,[0x160e48] CMP qword ptr [RBX + 0x50],RAX JNZ 0x00160ffc MOV RSI,qword ptr [R14 + 0x80] TEST RSI,RSI JZ 0x00160ffc MOV RDI,qword ptr [RBX + 0x40] CALL qword ptr [RBX + 0x30] AND qword ptr [R14 + 0x80],0x0 LAB_00160ffc: MOV RDI,qword ptr [RBX + 0x40] MOV RSI,R14 CALL qword ptr [RBX + 0x30] AND dword ptr [RBX + 0x14],0x0 JMP 0x00161018 LAB_0016100c: TEST R15D,R15D JZ 0x00161018 MOV dword ptr [RBX + 0x1c],0x18 LAB_00161018: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int8 mz_zip_writer_end_internal(long param_1,int param_2) { int8 *puVar1; int iVar2; int8 uVar3; uVar3 = 0; if (param_1 != 0) { puVar1 = *(int8 **)(param_1 + 0x68); if ((((puVar1 == (int8 *)0x0) || (*(long *)(param_1 + 0x28) == 0)) || (*(code **)(param_1 + 0x30) == (code *)0x0)) || ((*(uint *)(param_1 + 0x14) & 0xfffffffe) != 2)) { if (param_2 != 0) { *(int4 *)(param_1 + 0x1c) = 0x18; } } else { *(int8 *)(param_1 + 0x68) = 0; (**(code **)(param_1 + 0x30))(*(int8 *)(param_1 + 0x40),*puVar1); puVar1[2] = 0; puVar1[3] = 0; *puVar1 = 0; puVar1[1] = 0; (**(code **)(param_1 + 0x30))(*(int8 *)(param_1 + 0x40),puVar1[4]); puVar1[6] = 0; puVar1[7] = 0; puVar1[4] = 0; puVar1[5] = 0; (**(code **)(param_1 + 0x30))(*(int8 *)(param_1 + 0x40),puVar1[8]); puVar1[10] = 0; puVar1[0xb] = 0; puVar1[8] = 0; puVar1[9] = 0; uVar3 = 1; if ((FILE *)puVar1[0xe] != (FILE *)0x0) { if (*(int *)(param_1 + 0x18) == 4) { iVar2 = fclose((FILE *)puVar1[0xe]); if (iVar2 == -1) { uVar3 = 0; if (param_2 != 0) { *(int4 *)(param_1 + 0x1c) = 0x15; uVar3 = 0; } } } puVar1[0xe] = 0; } if ((*(code **)(param_1 + 0x50) == mz_zip_heap_write_func) && (puVar1[0x10] != 0)) { (**(code **)(param_1 + 0x30))(*(int8 *)(param_1 + 0x40)); puVar1[0x10] = 0; } (**(code **)(param_1 + 0x30))(*(int8 *)(param_1 + 0x40),puVar1); *(int4 *)(param_1 + 0x14) = 0; } } return uVar3; }