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
21,700
js_parse_expr2
bluesky950520[P]quickjs/quickjs.c
static __exception int js_parse_expr2(JSParseState *s, int parse_flags) { BOOL comma = FALSE; for(;;) { if (js_parse_assign_expr2(s, parse_flags)) return -1; if (comma) { /* prevent get_lvalue from using the last expression as an lvalue. This also prevents the conversion of of get_var to get_ref for method lookup in function call inside `with` statement. */ s->cur_func->last_opcode_pos = -1; } if (s->token.val != ',') break; comma = TRUE; if (next_token(s)) return -1; emit_op(s, OP_drop); } return 0; }
O2
c
js_parse_expr2: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %esi, %ebp movq %rdi, %r14 movb $0x1, %r12b pushq $-0x1 popq %rbx pushq $0xe popq %r15 movq %r14, %rdi movl %ebp, %esi callq 0x5a457 testl %eax, %eax jne 0x5a44c testb $0x1, %r12b jne 0x5a427 movq 0x90(%r14), %rax orl $-0x1, 0x168(%rax) cmpl $0x2c, 0x20(%r14) jne 0x5a44a movq %r14, %rdi callq 0x4fa4e testl %eax, %eax jne 0x5a44c movq %r14, %rdi movl %r15d, %esi callq 0x4fa1b xorl %r12d, %r12d jmp 0x5a405 xorl %ebx, %ebx movl %ebx, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
js_parse_expr2: push rbp push r15 push r14 push r12 push rbx mov ebp, esi mov r14, rdi mov r12b, 1 push 0FFFFFFFFFFFFFFFFh pop rbx push 0Eh pop r15 loc_5A405: mov rdi, r14 mov esi, ebp call js_parse_assign_expr2 test eax, eax jnz short loc_5A44C test r12b, 1 jnz short loc_5A427 mov rax, [r14+90h] or dword ptr [rax+168h], 0FFFFFFFFh loc_5A427: cmp dword ptr [r14+20h], 2Ch ; ',' jnz short loc_5A44A mov rdi, r14 call next_token test eax, eax jnz short loc_5A44C mov rdi, r14 mov esi, r15d call emit_op xor r12d, r12d jmp short loc_5A405 loc_5A44A: xor ebx, ebx loc_5A44C: mov eax, ebx pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long js_parse_expr2( long long a1, unsigned int a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { char v10; // r12 unsigned int v11; // ebx long long v12; // rdx long long v13; // rcx long long v14; // r8 long long v15; // r9 __m128 v16; // xmm4 __m128 v17; // xmm5 v10 = 1; v11 = -1; while ( !(unsigned int)js_parse_assign_expr2(a1, a2) ) { if ( (v10 & 1) == 0 ) *(_DWORD *)(*(_QWORD *)(a1 + 144) + 360LL) = -1; if ( *(_DWORD *)(a1 + 32) != 44 ) return 0; if ( (unsigned int)next_token(a1, a2, v12, a3, a4, a5, a6, v16, v17, a9, a10, v13, v14, v15) ) return v11; emit_op(a1, 14); v10 = 0; } return v11; }
js_parse_expr2: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV EBP,ESI MOV R14,RDI MOV R12B,0x1 PUSH -0x1 POP RBX PUSH 0xe POP R15 LAB_0015a405: MOV RDI,R14 MOV ESI,EBP CALL 0x0015a457 TEST EAX,EAX JNZ 0x0015a44c TEST R12B,0x1 JNZ 0x0015a427 MOV RAX,qword ptr [R14 + 0x90] OR dword ptr [RAX + 0x168],0xffffffff LAB_0015a427: CMP dword ptr [R14 + 0x20],0x2c JNZ 0x0015a44a MOV RDI,R14 CALL 0x0014fa4e TEST EAX,EAX JNZ 0x0015a44c MOV RDI,R14 MOV ESI,R15D CALL 0x0014fa1b XOR R12D,R12D JMP 0x0015a405 LAB_0015a44a: XOR EBX,EBX LAB_0015a44c: MOV EAX,EBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
int4 js_parse_expr2(long param_1,int4 param_2) { int iVar1; bool bVar2; bVar2 = true; while( true ) { iVar1 = js_parse_assign_expr2(param_1,param_2); if (iVar1 != 0) { return 0xffffffff; } if (!bVar2) { *(int4 *)(*(long *)(param_1 + 0x90) + 0x168) = 0xffffffff; } if (*(int *)(param_1 + 0x20) != 0x2c) break; iVar1 = next_token(param_1); if (iVar1 != 0) { return 0xffffffff; } emit_op(param_1,0xe); bVar2 = false; } return 0; }
21,701
StartTree::NJMatrix<double>::getRowMinima() const
iqtree3/utils/bionj2.cpp
virtual void getRowMinima() const { // //Note: Rather than multiplying distances by (n-2) // repeatedly, it is cheaper to work with row // totals multiplied by (1/(T)(n-2)). // Better n multiplications than n*(n-1)/2. // T nless2 = ( n - 2 ); T tMultiplier = ( n <= 2 ) ? 0 : (1 / nless2); calculateScaledRowTotals(); T* tot = scaledRowTotals.data(); for (size_t r=0; r<n; ++r) { tot[r] = rowTotals[r] * tMultiplier; } rowMinima.resize(n); rowMinima[0].value = infiniteDistance; #pragma omp parallel for schedule(dynamic) for (size_t row=1; row<n; ++row) { float bestVrc = infiniteDistance; size_t bestColumn = 0; const T* rowData = rows[row]; for (size_t col=0; col<row; ++col) { T v = rowData[col] - tot[col]; bool better = ( v < bestVrc ); if (better) { bestColumn = col; bestVrc = v; } } bestVrc -= tot [row]; rowMinima[row] = Position<T>(row, bestColumn, bestVrc , getImbalance(row, bestColumn)); } }
O0
cpp
StartTree::NJMatrix<double>::getRowMinima() const: subq $0xa8, %rsp movq %rdi, 0xa0(%rsp) movq 0xa0(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x8(%rax), %rcx addq $-0x2, %rcx movq %rcx, %xmm0 movaps 0xe920(%rip), %xmm1 # 0x69690 punpckldq %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1] movapd 0xe924(%rip), %xmm1 # 0x696a0 subpd %xmm1, %xmm0 movaps %xmm0, %xmm1 unpckhpd %xmm0, %xmm0 # xmm0 = xmm0[1,1] addsd %xmm1, %xmm0 movsd %xmm0, 0x98(%rsp) cmpq $0x2, 0x8(%rax) ja 0x5ada6 xorps %xmm0, %xmm0 movsd %xmm0, 0x18(%rsp) jmp 0x5adbd movsd 0xe73a(%rip), %xmm0 # 0x694e8 divsd 0x98(%rsp), %xmm0 movsd %xmm0, 0x18(%rsp) movq 0x20(%rsp), %rdi movsd 0x18(%rsp), %xmm0 movsd %xmm0, 0x90(%rsp) movq (%rdi), %rax callq *0x50(%rax) movq 0x20(%rsp), %rdi addq $0x80, %rdi callq 0x5ff00 movq %rax, 0x88(%rsp) movq $0x0, 0x80(%rsp) movq 0x20(%rsp), %rcx movq 0x80(%rsp), %rax cmpq 0x8(%rcx), %rax jae 0x5ae59 movq 0x20(%rsp), %rax movq 0x28(%rax), %rax movq 0x80(%rsp), %rcx movsd (%rax,%rcx,8), %xmm0 mulsd 0x90(%rsp), %xmm0 movq 0x88(%rsp), %rax movq 0x80(%rsp), %rcx movsd %xmm0, (%rax,%rcx,8) movq 0x80(%rsp), %rax addq $0x1, %rax movq %rax, 0x80(%rsp) jmp 0x5adfc movq 0x20(%rsp), %rax movq %rax, %rdi addq $0x60, %rdi movq 0x8(%rax), %rsi callq 0x5d000 movq 0x20(%rsp), %rdi addq $0x60, %rdi xorl %eax, %eax movl %eax, %esi callq 0x5d0a0 movsd 0xe838(%rip), %xmm0 # 0x696c0 movsd %xmm0, 0x10(%rax) movq $0x1, 0x78(%rsp) movq 0x20(%rsp), %rcx movq 0x78(%rsp), %rax cmpq 0x8(%rcx), %rax jae 0x5b017 movq 0x20(%rsp), %rax movss 0xe811(%rip), %xmm0 # 0x696c8 movss %xmm0, 0x74(%rsp) movq $0x0, 0x68(%rsp) movq 0x20(%rax), %rax movq 0x78(%rsp), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x60(%rsp) movq $0x0, 0x58(%rsp) movq 0x58(%rsp), %rax cmpq 0x78(%rsp), %rax jae 0x5af67 movq 0x60(%rsp), %rax movq 0x58(%rsp), %rcx movsd (%rax,%rcx,8), %xmm0 movq 0x88(%rsp), %rax movq 0x58(%rsp), %rcx subsd (%rax,%rcx,8), %xmm0 movsd %xmm0, 0x50(%rsp) movsd 0x50(%rsp), %xmm1 movss 0x74(%rsp), %xmm0 cvtss2sd %xmm0, %xmm0 ucomisd %xmm1, %xmm0 seta %al andb $0x1, %al movb %al, 0x4f(%rsp) testb $0x1, 0x4f(%rsp) je 0x5af52 movq 0x58(%rsp), %rax movq %rax, 0x68(%rsp) movsd 0x50(%rsp), %xmm0 cvtsd2ss %xmm0, %xmm0 movss %xmm0, 0x74(%rsp) jmp 0x5af54 movq 0x58(%rsp), %rax addq $0x1, %rax movq %rax, 0x58(%rsp) jmp 0x5aee1 movq 0x20(%rsp), %rdi movq 0x88(%rsp), %rax movq 0x78(%rsp), %rcx movsd (%rax,%rcx,8), %xmm1 movss 0x74(%rsp), %xmm0 cvtss2sd %xmm0, %xmm0 subsd %xmm1, %xmm0 cvtsd2ss %xmm0, %xmm0 movss %xmm0, 0x74(%rsp) movq 0x78(%rsp), %rax movq %rax, (%rsp) movq 0x68(%rsp), %rax movq %rax, 0x8(%rsp) movss 0x74(%rsp), %xmm0 cvtss2sd %xmm0, %xmm0 movsd %xmm0, 0x10(%rsp) movq 0x78(%rsp), %rsi movq 0x68(%rsp), %rdx callq 0x5d0c0 movq (%rsp), %rsi movq 0x8(%rsp), %rdx movsd 0x10(%rsp), %xmm0 movq %rax, %rcx leaq 0x28(%rsp), %rdi callq 0x5d180 movq 0x20(%rsp), %rdi addq $0x60, %rdi movq 0x78(%rsp), %rsi callq 0x5d0a0 movq %rax, %rdi leaq 0x28(%rsp), %rsi callq 0x5d1c0 movq 0x78(%rsp), %rax addq $0x1, %rax movq %rax, 0x78(%rsp) jmp 0x5ae96 addq $0xa8, %rsp retq nop
_ZNK9StartTree8NJMatrixIdE12getRowMinimaEv: sub rsp, 0A8h mov [rsp+0A8h+var_8], rdi mov rax, [rsp+0A8h+var_8] mov [rsp+0A8h+var_88], rax mov rcx, [rax+8] add rcx, 0FFFFFFFFFFFFFFFEh movq xmm0, rcx movaps xmm1, cs:xmmword_69690 punpckldq xmm0, xmm1 movapd xmm1, cs:xmmword_696A0 subpd xmm0, xmm1 movaps xmm1, xmm0 unpckhpd xmm0, xmm0 addsd xmm0, xmm1 movsd [rsp+0A8h+var_10], xmm0 cmp qword ptr [rax+8], 2 ja short loc_5ADA6 xorps xmm0, xmm0 movsd [rsp+0A8h+var_90], xmm0 jmp short loc_5ADBD loc_5ADA6: movsd xmm0, cs:qword_694E8 divsd xmm0, [rsp+0A8h+var_10] movsd [rsp+0A8h+var_90], xmm0 loc_5ADBD: mov rdi, [rsp+0A8h+var_88] movsd xmm0, [rsp+0A8h+var_90] movsd [rsp+0A8h+var_18], xmm0 mov rax, [rdi] call qword ptr [rax+50h] mov rdi, [rsp+0A8h+var_88] add rdi, 80h call _ZNSt6vectorIdSaIdEE4dataEv; std::vector<double>::data(void) mov [rsp+0A8h+var_20], rax mov [rsp+0A8h+var_28], 0 loc_5ADFC: mov rcx, [rsp+0A8h+var_88] mov rax, [rsp+0A8h+var_28] cmp rax, [rcx+8] jnb short loc_5AE59 mov rax, [rsp+0A8h+var_88] mov rax, [rax+28h] mov rcx, [rsp+0A8h+var_28] movsd xmm0, qword ptr [rax+rcx*8] mulsd xmm0, [rsp+0A8h+var_18] mov rax, [rsp+0A8h+var_20] mov rcx, [rsp+0A8h+var_28] movsd qword ptr [rax+rcx*8], xmm0 mov rax, [rsp+0A8h+var_28] add rax, 1 mov [rsp+0A8h+var_28], rax jmp short loc_5ADFC loc_5AE59: mov rax, [rsp+0A8h+var_88] mov rdi, rax add rdi, 60h ; '`' mov rsi, [rax+8] call _ZNSt6vectorIN9StartTree8PositionIdEESaIS2_EE6resizeEm; std::vector<StartTree::Position<double>>::resize(ulong) mov rdi, [rsp+0A8h+var_88] add rdi, 60h ; '`' xor eax, eax mov esi, eax call _ZNSt6vectorIN9StartTree8PositionIdEESaIS2_EEixEm; std::vector<StartTree::Position<double>>::operator[](ulong) movsd xmm0, cs:qword_696C0 movsd qword ptr [rax+10h], xmm0 mov [rsp+0A8h+var_30], 1 loc_5AE96: mov rcx, [rsp+0A8h+var_88] mov rax, [rsp+0A8h+var_30] cmp rax, [rcx+8] jnb loc_5B017 mov rax, [rsp+0A8h+var_88] movss xmm0, cs:flt_696C8 movss [rsp+0A8h+var_34], xmm0 mov [rsp+0A8h+var_40], 0 mov rax, [rax+20h] mov rcx, [rsp+0A8h+var_30] mov rax, [rax+rcx*8] mov [rsp+0A8h+var_48], rax mov [rsp+0A8h+var_50], 0 loc_5AEE1: mov rax, [rsp+0A8h+var_50] cmp rax, [rsp+0A8h+var_30] jnb short loc_5AF67 mov rax, [rsp+0A8h+var_48] mov rcx, [rsp+0A8h+var_50] movsd xmm0, qword ptr [rax+rcx*8] mov rax, [rsp+0A8h+var_20] mov rcx, [rsp+0A8h+var_50] subsd xmm0, qword ptr [rax+rcx*8] movsd [rsp+0A8h+var_58], xmm0 movsd xmm1, [rsp+0A8h+var_58] movss xmm0, [rsp+0A8h+var_34] cvtss2sd xmm0, xmm0 ucomisd xmm0, xmm1 setnbe al and al, 1 mov [rsp+0A8h+var_59], al test [rsp+0A8h+var_59], 1 jz short loc_5AF52 mov rax, [rsp+0A8h+var_50] mov [rsp+0A8h+var_40], rax movsd xmm0, [rsp+0A8h+var_58] cvtsd2ss xmm0, xmm0 movss [rsp+0A8h+var_34], xmm0 loc_5AF52: jmp short $+2 loc_5AF54: mov rax, [rsp+0A8h+var_50] add rax, 1 mov [rsp+0A8h+var_50], rax jmp loc_5AEE1 loc_5AF67: mov rdi, [rsp+0A8h+var_88] mov rax, [rsp+0A8h+var_20] mov rcx, [rsp+0A8h+var_30] movsd xmm1, qword ptr [rax+rcx*8] movss xmm0, [rsp+0A8h+var_34] cvtss2sd xmm0, xmm0 subsd xmm0, xmm1 cvtsd2ss xmm0, xmm0 movss [rsp+0A8h+var_34], xmm0 mov rax, [rsp+0A8h+var_30] mov [rsp+0A8h+var_A8], rax mov rax, [rsp+0A8h+var_40] mov [rsp+0A8h+var_A0], rax movss xmm0, [rsp+0A8h+var_34] cvtss2sd xmm0, xmm0 movsd [rsp+0A8h+var_98], xmm0 mov rsi, [rsp+0A8h+var_30] mov rdx, [rsp+0A8h+var_40] call _ZNK9StartTree12UPGMA_MatrixIdE12getImbalanceEmm; StartTree::UPGMA_Matrix<double>::getImbalance(ulong,ulong) mov rsi, [rsp+0A8h+var_A8] mov rdx, [rsp+0A8h+var_A0] movsd xmm0, [rsp+0A8h+var_98] mov rcx, rax lea rdi, [rsp+0A8h+var_80] call _ZN9StartTree8PositionIdEC2Emmdm; StartTree::Position<double>::Position(ulong,ulong,double,ulong) mov rdi, [rsp+0A8h+var_88] add rdi, 60h ; '`' mov rsi, [rsp+0A8h+var_30] call _ZNSt6vectorIN9StartTree8PositionIdEESaIS2_EEixEm; std::vector<StartTree::Position<double>>::operator[](ulong) mov rdi, rax lea rsi, [rsp+0A8h+var_80] call _ZN9StartTree8PositionIdEaSERKS1_; StartTree::Position<double>::operator=(StartTree::Position<double> const&) mov rax, [rsp+0A8h+var_30] add rax, 1 mov [rsp+0A8h+var_30], rax jmp loc_5AE96 loc_5B017: add rsp, 0A8h retn
unsigned long long StartTree::NJMatrix<double>::getRowMinima(_QWORD *a1) { __m128d v1; // xmm1 unsigned long long result; // rax float v3; // xmm0_4 float v4; // xmm0_4 long long Imbalance; // rax long long v6; // rax unsigned long long v7; // [rsp+0h] [rbp-A8h] unsigned long long v8; // [rsp+8h] [rbp-A0h] double v9; // [rsp+18h] [rbp-90h] _BYTE v10[40]; // [rsp+28h] [rbp-80h] BYREF double v11; // [rsp+50h] [rbp-58h] unsigned long long k; // [rsp+58h] [rbp-50h] long long v13; // [rsp+60h] [rbp-48h] unsigned long long v14; // [rsp+68h] [rbp-40h] float v15; // [rsp+74h] [rbp-34h] unsigned long long j; // [rsp+78h] [rbp-30h] unsigned long long i; // [rsp+80h] [rbp-28h] long long v18; // [rsp+88h] [rbp-20h] double v19; // [rsp+90h] [rbp-18h] double v20; // [rsp+98h] [rbp-10h] _QWORD *v21; // [rsp+A0h] [rbp-8h] v21 = a1; v1 = _mm_sub_pd( (__m128d)_mm_unpacklo_epi32((__m128i)(unsigned long long)(a1[1] - 2LL), (__m128i)xmmword_69690), (__m128d)xmmword_696A0); v20 = _mm_unpackhi_pd(v1, v1).m128d_f64[0] + v1.m128d_f64[0]; if ( a1[1] > 2uLL ) v9 = 1.0 / v20; else v9 = 0.0; v19 = v9; (*(void ( **)(_QWORD *))(*a1 + 80LL))(a1); v18 = std::vector<double>::data(a1 + 16); for ( i = 0LL; i < a1[1]; ++i ) *(double *)(v18 + 8 * i) = *(double *)(a1[5] + 8 * i) * v19; std::vector<StartTree::Position<double>>::resize(a1 + 12, a1[1]); *(_QWORD *)(std::vector<StartTree::Position<double>>::operator[](a1 + 12, 0LL) + 16) = 0x476812F9C0000000LL; for ( j = 1LL; ; ++j ) { result = j; if ( j >= a1[1] ) break; v15 = 9.9999996e35; v14 = 0LL; v13 = *(_QWORD *)(a1[4] + 8 * j); for ( k = 0LL; k < j; ++k ) { v11 = *(double *)(v13 + 8 * k) - *(double *)(v18 + 8 * k); v10[39] = v15 > v11; if ( v15 > v11 ) { v14 = k; v3 = v11; v15 = v3; } } v4 = v15 - *(double *)(v18 + 8 * j); v15 = v4; v7 = j; v8 = v14; Imbalance = StartTree::UPGMA_Matrix<double>::getImbalance(a1, j, v14); StartTree::Position<double>::Position(v10, v7, v8, Imbalance, v4); v6 = std::vector<StartTree::Position<double>>::operator[](a1 + 12, j); StartTree::Position<double>::operator=(v6, v10); } return result; }
getRowMinima: SUB RSP,0xa8 MOV qword ptr [RSP + 0xa0],RDI MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x20],RAX MOV RCX,qword ptr [RAX + 0x8] ADD RCX,-0x2 MOVQ XMM0,RCX MOVAPS XMM1,xmmword ptr [0x00169690] PUNPCKLDQ XMM0,XMM1 MOVAPD XMM1,xmmword ptr [0x001696a0] SUBPD XMM0,XMM1 MOVAPS XMM1,XMM0 UNPCKHPD XMM0,XMM0 ADDSD XMM0,XMM1 MOVSD qword ptr [RSP + 0x98],XMM0 CMP qword ptr [RAX + 0x8],0x2 JA 0x0015ada6 XORPS XMM0,XMM0 MOVSD qword ptr [RSP + 0x18],XMM0 JMP 0x0015adbd LAB_0015ada6: MOVSD XMM0,qword ptr [0x001694e8] DIVSD XMM0,qword ptr [RSP + 0x98] MOVSD qword ptr [RSP + 0x18],XMM0 LAB_0015adbd: MOV RDI,qword ptr [RSP + 0x20] MOVSD XMM0,qword ptr [RSP + 0x18] MOVSD qword ptr [RSP + 0x90],XMM0 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x50] MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x80 CALL 0x0015ff00 MOV qword ptr [RSP + 0x88],RAX MOV qword ptr [RSP + 0x80],0x0 LAB_0015adfc: MOV RCX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x80] CMP RAX,qword ptr [RCX + 0x8] JNC 0x0015ae59 MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RSP + 0x80] MOVSD XMM0,qword ptr [RAX + RCX*0x8] MULSD XMM0,qword ptr [RSP + 0x90] MOV RAX,qword ptr [RSP + 0x88] MOV RCX,qword ptr [RSP + 0x80] MOVSD qword ptr [RAX + RCX*0x8],XMM0 MOV RAX,qword ptr [RSP + 0x80] ADD RAX,0x1 MOV qword ptr [RSP + 0x80],RAX JMP 0x0015adfc LAB_0015ae59: MOV RAX,qword ptr [RSP + 0x20] MOV RDI,RAX ADD RDI,0x60 MOV RSI,qword ptr [RAX + 0x8] CALL 0x0015d000 MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x60 XOR EAX,EAX MOV ESI,EAX CALL 0x0015d0a0 MOVSD XMM0,qword ptr [0x001696c0] MOVSD qword ptr [RAX + 0x10],XMM0 MOV qword ptr [RSP + 0x78],0x1 LAB_0015ae96: MOV RCX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x78] CMP RAX,qword ptr [RCX + 0x8] JNC 0x0015b017 MOV RAX,qword ptr [RSP + 0x20] MOVSS XMM0,dword ptr [0x001696c8] MOVSS dword ptr [RSP + 0x74],XMM0 MOV qword ptr [RSP + 0x68],0x0 MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x60],RAX MOV qword ptr [RSP + 0x58],0x0 LAB_0015aee1: MOV RAX,qword ptr [RSP + 0x58] CMP RAX,qword ptr [RSP + 0x78] JNC 0x0015af67 MOV RAX,qword ptr [RSP + 0x60] MOV RCX,qword ptr [RSP + 0x58] MOVSD XMM0,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RSP + 0x88] MOV RCX,qword ptr [RSP + 0x58] SUBSD XMM0,qword ptr [RAX + RCX*0x8] MOVSD qword ptr [RSP + 0x50],XMM0 MOVSD XMM1,qword ptr [RSP + 0x50] MOVSS XMM0,dword ptr [RSP + 0x74] CVTSS2SD XMM0,XMM0 UCOMISD XMM0,XMM1 SETA AL AND AL,0x1 MOV byte ptr [RSP + 0x4f],AL TEST byte ptr [RSP + 0x4f],0x1 JZ 0x0015af52 MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x68],RAX MOVSD XMM0,qword ptr [RSP + 0x50] CVTSD2SS XMM0,XMM0 MOVSS dword ptr [RSP + 0x74],XMM0 LAB_0015af52: JMP 0x0015af54 LAB_0015af54: MOV RAX,qword ptr [RSP + 0x58] ADD RAX,0x1 MOV qword ptr [RSP + 0x58],RAX JMP 0x0015aee1 LAB_0015af67: MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x88] MOV RCX,qword ptr [RSP + 0x78] MOVSD XMM1,qword ptr [RAX + RCX*0x8] MOVSS XMM0,dword ptr [RSP + 0x74] CVTSS2SD XMM0,XMM0 SUBSD XMM0,XMM1 CVTSD2SS XMM0,XMM0 MOVSS dword ptr [RSP + 0x74],XMM0 MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP],RAX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x8],RAX MOVSS XMM0,dword ptr [RSP + 0x74] CVTSS2SD XMM0,XMM0 MOVSD qword ptr [RSP + 0x10],XMM0 MOV RSI,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x68] CALL 0x0015d0c0 MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] MOVSD XMM0,qword ptr [RSP + 0x10] MOV RCX,RAX LEA RDI,[RSP + 0x28] CALL 0x0015d180 MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x60 MOV RSI,qword ptr [RSP + 0x78] CALL 0x0015d0a0 MOV RDI,RAX LEA RSI,[RSP + 0x28] CALL 0x0015d1c0 MOV RAX,qword ptr [RSP + 0x78] ADD RAX,0x1 MOV qword ptr [RSP + 0x78],RAX JMP 0x0015ae96 LAB_0015b017: ADD RSP,0xa8 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* StartTree::NJMatrix<double>::getRowMinima() const */ void __thiscall StartTree::NJMatrix<double>::getRowMinima(NJMatrix<double> *this) { ulong uVar1; ulong uVar2; Position<double> *this_00; long lVar3; double dVar4; int1 auVar5 [16]; double local_90; Position local_80 [39]; int1 local_59; double local_58; ulong local_50; long local_48; ulong local_40; float local_34; ulong local_30; ulong local_28; long local_20; double local_18; double local_10; NJMatrix<double> *local_8; lVar3 = *(long *)(this + 8) + -2; auVar5._8_4_ = (int)((ulong)lVar3 >> 0x20); auVar5._0_8_ = lVar3; auVar5._12_4_ = _UNK_00169694; local_10 = (auVar5._8_8_ - _UNK_001696a8) + ((double)CONCAT44(_DAT_00169690,(int)lVar3) - _DAT_001696a0); if (*(ulong *)(this + 8) < 3) { local_90 = 0.0; } else { local_90 = DAT_001694e8 / local_10; } local_18 = local_90; local_8 = this; (**(code **)(*(long *)this + 0x50))(); local_20 = std::vector<double,std::allocator<double>>::data ((vector<double,std::allocator<double>> *)(this + 0x80)); for (local_28 = 0; local_28 < *(ulong *)(this + 8); local_28 = local_28 + 1) { *(double *)(local_20 + local_28 * 8) = *(double *)(*(long *)(this + 0x28) + local_28 * 8) * local_18; } std::vector<StartTree::Position<double>,std::allocator<StartTree::Position<double>>>::resize ((vector<StartTree::Position<double>,std::allocator<StartTree::Position<double>>> *) (this + 0x60),*(ulong *)(this + 8)); lVar3 = std::vector<StartTree::Position<double>,std::allocator<StartTree::Position<double>>>:: operator[]((vector<StartTree::Position<double>,std::allocator<StartTree::Position<double>>> *)(this + 0x60),0); *(int8 *)(lVar3 + 0x10) = DAT_001696c0; for (local_30 = 1; uVar2 = local_30, local_30 < *(ulong *)(this + 8); local_30 = local_30 + 1) { local_34 = DAT_001696c8; local_40 = 0; local_48 = *(long *)(*(long *)(this + 0x20) + local_30 * 8); for (local_50 = 0; uVar1 = local_40, local_50 < local_30; local_50 = local_50 + 1) { local_58 = *(double *)(local_48 + local_50 * 8) - *(double *)(local_20 + local_50 * 8); local_59 = local_58 < (double)local_34; if ((bool)local_59) { local_40 = local_50; local_34 = (float)local_58; } } local_34 = (float)((double)local_34 - *(double *)(local_20 + local_30 * 8)); dVar4 = (double)local_34; UPGMA_Matrix<double>::getImbalance((UPGMA_Matrix<double> *)this,local_30,local_40); Position<double>::Position((ulong)local_80,uVar2,dVar4,uVar1); this_00 = (Position<double> *) std::vector<StartTree::Position<double>,std::allocator<StartTree::Position<double>>>:: operator[]((vector<StartTree::Position<double>,std::allocator<StartTree::Position<double>>> *)(this + 0x60),local_30); Position<double>::operator=(this_00,local_80); } return; }
21,702
gguf_bwrite_str
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
static void gguf_bwrite_str(struct gguf_buf * buf, const struct gguf_str * val) { gguf_buf_grow(buf, sizeof(val->n) + val->n); if (buf->data) { memcpy((char *) buf->data + buf->offset, &val->n, sizeof(val->n)); } buf->offset += sizeof(val->n); if (buf->data) { memcpy((char *) buf->data + buf->offset, val->data, val->n); } buf->offset += val->n; }
O0
c
gguf_bwrite_str: subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq %rsi, 0x8(%rsp) movq 0x10(%rsp), %rdi movq 0x8(%rsp), %rax movq (%rax), %rsi addq $0x8, %rsi callq 0x1645e0 movq 0x10(%rsp), %rax cmpq $0x0, (%rax) je 0x16457c movq 0x10(%rsp), %rax movq (%rax), %rax movq 0x10(%rsp), %rcx movq 0x10(%rcx), %rcx movq 0x8(%rsp), %rdx movq (%rdx), %rdx movq %rdx, (%rax,%rcx) movq 0x10(%rsp), %rax movq 0x10(%rax), %rcx addq $0x8, %rcx movq %rcx, 0x10(%rax) movq 0x10(%rsp), %rax cmpq $0x0, (%rax) je 0x1645bf movq 0x10(%rsp), %rax movq (%rax), %rdi movq 0x10(%rsp), %rax addq 0x10(%rax), %rdi movq 0x8(%rsp), %rax movq 0x8(%rax), %rsi movq 0x8(%rsp), %rax movq (%rax), %rdx callq 0xb600 movq 0x8(%rsp), %rax movq (%rax), %rcx movq 0x10(%rsp), %rax addq 0x10(%rax), %rcx movq %rcx, 0x10(%rax) addq $0x18, %rsp retq nopl (%rax)
gguf_bwrite_str: sub rsp, 18h mov [rsp+18h+var_8], rdi mov [rsp+18h+var_10], rsi mov rdi, [rsp+18h+var_8] mov rax, [rsp+18h+var_10] mov rsi, [rax] add rsi, 8 call gguf_buf_grow mov rax, [rsp+18h+var_8] cmp qword ptr [rax], 0 jz short loc_16457C mov rax, [rsp+18h+var_8] mov rax, [rax] mov rcx, [rsp+18h+var_8] mov rcx, [rcx+10h] mov rdx, [rsp+18h+var_10] mov rdx, [rdx] mov [rax+rcx], rdx loc_16457C: mov rax, [rsp+18h+var_8] mov rcx, [rax+10h] add rcx, 8 mov [rax+10h], rcx mov rax, [rsp+18h+var_8] cmp qword ptr [rax], 0 jz short loc_1645BF mov rax, [rsp+18h+var_8] mov rdi, [rax] mov rax, [rsp+18h+var_8] add rdi, [rax+10h] mov rax, [rsp+18h+var_10] mov rsi, [rax+8] mov rax, [rsp+18h+var_10] mov rdx, [rax] call _memcpy loc_1645BF: mov rax, [rsp+18h+var_10] mov rcx, [rax] mov rax, [rsp+18h+var_8] add rcx, [rax+10h] mov [rax+10h], rcx add rsp, 18h retn
_QWORD * gguf_bwrite_str(_QWORD *a1, _QWORD *a2) { _QWORD *result; // rax gguf_buf_grow(a1, *a2 + 8LL); if ( *a1 ) *(_QWORD *)(*a1 + a1[2]) = *a2; a1[2] += 8LL; if ( *a1 ) memcpy(a1[2] + *a1, a2[1], *a2); result = a1; a1[2] += *a2; return result; }
21,703
gguf_bwrite_str
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
static void gguf_bwrite_str(struct gguf_buf * buf, const struct gguf_str * val) { gguf_buf_grow(buf, sizeof(val->n) + val->n); if (buf->data) { memcpy((char *) buf->data + buf->offset, &val->n, sizeof(val->n)); } buf->offset += sizeof(val->n); if (buf->data) { memcpy((char *) buf->data + buf->offset, val->data, val->n); } buf->offset += val->n; }
O1
c
gguf_bwrite_str: pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq (%rsi), %rsi addq $0x8, %rsi callq 0xb2de5 movq (%rbx), %rax testq %rax, %rax je 0xb2db3 movq 0x10(%rbx), %rcx movq (%r14), %rdx movq %rdx, (%rax,%rcx) movq (%rbx), %rdi movq 0x10(%rbx), %rax addq $0x8, %rax movq %rax, 0x10(%rbx) testq %rdi, %rdi je 0xb2dd6 addq %rax, %rdi movq (%r14), %rdx movq 0x8(%r14), %rsi callq 0xa4c0 movq (%r14), %rax addq %rax, 0x10(%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq
gguf_bwrite_str: push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rsi, [rsi] add rsi, 8 call gguf_buf_grow mov rax, [rbx] test rax, rax jz short loc_B2DB3 mov rcx, [rbx+10h] mov rdx, [r14] mov [rax+rcx], rdx loc_B2DB3: mov rdi, [rbx] mov rax, [rbx+10h] add rax, 8 mov [rbx+10h], rax test rdi, rdi jz short loc_B2DD6 add rdi, rax mov rdx, [r14] mov rsi, [r14+8] call _memcpy loc_B2DD6: mov rax, [r14] add [rbx+10h], rax add rsp, 8 pop rbx pop r14 retn
long long gguf_bwrite_str(long long *a1, _QWORD *a2) { long long v3; // rdi long long v4; // rax long long result; // rax gguf_buf_grow(a1, *a2 + 8LL); if ( *a1 ) *(_QWORD *)(*a1 + a1[2]) = *a2; v3 = *a1; v4 = a1[2] + 8; a1[2] = v4; if ( v3 ) memcpy(v4 + v3, a2[1], *a2); result = *a2; a1[2] += *a2; return result; }
21,704
gguf_bwrite_str
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
static void gguf_bwrite_str(struct gguf_buf * buf, const struct gguf_str * val) { gguf_buf_grow(buf, sizeof(val->n) + val->n); if (buf->data) { memcpy((char *) buf->data + buf->offset, &val->n, sizeof(val->n)); } buf->offset += sizeof(val->n); if (buf->data) { memcpy((char *) buf->data + buf->offset, val->data, val->n); } buf->offset += val->n; }
O2
c
gguf_bwrite_str: pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq (%rsi), %rsi addq $0x8, %rsi callq 0x8ec22 movq (%rbx), %rax testq %rax, %rax je 0x8ebed movq 0x10(%rbx), %rcx movq (%r14), %rdx movq %rdx, (%rax,%rcx) movq (%rbx), %rdi jmp 0x8ebef xorl %edi, %edi movq 0x10(%rbx), %rax addq $0x8, %rax movq %rax, 0x10(%rbx) testq %rdi, %rdi je 0x8ec13 addq %rax, %rdi movq (%r14), %rdx movq 0x8(%r14), %rsi callq 0xa4c0 movq 0x10(%rbx), %rax addq (%r14), %rax movq %rax, 0x10(%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq
gguf_bwrite_str: push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rsi, [rsi] add rsi, 8 call gguf_buf_grow mov rax, [rbx] test rax, rax jz short loc_8EBED mov rcx, [rbx+10h] mov rdx, [r14] mov [rax+rcx], rdx mov rdi, [rbx] jmp short loc_8EBEF loc_8EBED: xor edi, edi loc_8EBEF: mov rax, [rbx+10h] add rax, 8 mov [rbx+10h], rax test rdi, rdi jz short loc_8EC13 add rdi, rax mov rdx, [r14] mov rsi, [r14+8] call _memcpy mov rax, [rbx+10h] loc_8EC13: add rax, [r14] mov [rbx+10h], rax add rsp, 8 pop rbx pop r14 retn
long long gguf_bwrite_str(long long *a1, _QWORD *a2) { long long v3; // rdi long long v4; // rax long long result; // rax gguf_buf_grow(a1, *a2 + 8LL); if ( *a1 ) { *(_QWORD *)(*a1 + a1[2]) = *a2; v3 = *a1; } else { v3 = 0LL; } v4 = a1[2] + 8; a1[2] = v4; if ( v3 ) { memcpy(v4 + v3, a2[1], *a2); v4 = a1[2]; } result = *a2 + v4; a1[2] = result; return result; }
gguf_bwrite_str: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RSI,qword ptr [RSI] ADD RSI,0x8 CALL 0x0018ec22 MOV RAX,qword ptr [RBX] TEST RAX,RAX JZ 0x0018ebed MOV RCX,qword ptr [RBX + 0x10] MOV RDX,qword ptr [R14] MOV qword ptr [RAX + RCX*0x1],RDX MOV RDI,qword ptr [RBX] JMP 0x0018ebef LAB_0018ebed: XOR EDI,EDI LAB_0018ebef: MOV RAX,qword ptr [RBX + 0x10] ADD RAX,0x8 MOV qword ptr [RBX + 0x10],RAX TEST RDI,RDI JZ 0x0018ec13 ADD RDI,RAX MOV RDX,qword ptr [R14] MOV RSI,qword ptr [R14 + 0x8] CALL 0x0010a4c0 MOV RAX,qword ptr [RBX + 0x10] LAB_0018ec13: ADD RAX,qword ptr [R14] MOV qword ptr [RBX + 0x10],RAX ADD RSP,0x8 POP RBX POP R14 RET
void gguf_bwrite_str(long *param_1,size_t *param_2) { long lVar1; long lVar2; gguf_buf_grow(param_1,*param_2 + 8); if (*param_1 == 0) { lVar2 = 0; } else { *(size_t *)(*param_1 + param_1[2]) = *param_2; lVar2 = *param_1; } lVar1 = param_1[2] + 8; param_1[2] = lVar1; if (lVar2 != 0) { memcpy((void *)(lVar2 + lVar1),(void *)param_2[1],*param_2); lVar1 = param_1[2]; } param_1[2] = lVar1 + *param_2; return; }
21,705
ttt::game::State::process_move(ttt::game::Sign, int, int)
vsennov[P]tictactoe-course/src/core/state.cpp
MoveResult State::process_move(Sign player, int x, int y) { if (m_status == Status::ENDED) { return MoveResult::ENDED; } if (player == Sign::NONE) { return MoveResult::ERROR; } if (player != m_player) { return MoveResult::DQ_OUT_OF_ORDER; } if (!_valid_coords(x, y)) { return MoveResult::DQ_OUT_OF_FIELD; } if (get_value(x, y) != Sign::NONE) { return MoveResult::DQ_PLACE_OCCUPIED; } _set_value(x, y, player); ++m_move_no; m_player = _opp_sign(player); const bool winning = _is_winning(x, y); if (m_status == Status::LAST_MOVE) { m_status = Status::ENDED; if (winning) { return MoveResult::DRAW; } else { m_winner = m_player; return MoveResult::WIN; } } m_status = Status::ACTIVE; if (winning) { if (m_move_no % 2 == 0) { m_status = Status::ENDED; m_winner = _opp_sign(m_player); return MoveResult::WIN; } else if (m_move_no >= m_opts.max_moves) { m_winner = _opp_sign(m_player); m_status = Status::ENDED; return MoveResult::WIN; } else { m_status = Status::LAST_MOVE; return MoveResult::OK; } } if (m_move_no >= m_opts.max_moves) { m_status = Status::ENDED; return MoveResult::DRAW; } return MoveResult::OK; }
O0
cpp
ttt::game::State::process_move(ttt::game::Sign, int, int): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) cmpl $0x3, 0x24(%rax) jne 0x3d6f movl $0x3, -0x4(%rbp) jmp 0x3f0c cmpl $0x2, -0x14(%rbp) jne 0x3d81 movl $0x7, -0x4(%rbp) jmp 0x3f0c movq -0x28(%rbp), %rcx movl -0x14(%rbp), %eax cmpl 0x28(%rcx), %eax je 0x3d99 movl $0x5, -0x4(%rbp) jmp 0x3f0c movq -0x28(%rbp), %rdi movl -0x18(%rbp), %esi movl -0x1c(%rbp), %edx callq 0x3f20 testb $0x1, %al jne 0x3db8 movl $0x4, -0x4(%rbp) jmp 0x3f0c movq -0x28(%rbp), %rdi movl -0x18(%rbp), %esi movl -0x1c(%rbp), %edx callq 0x3f50 cmpl $0x2, %eax je 0x3dd8 movl $0x6, -0x4(%rbp) jmp 0x3f0c movq -0x28(%rbp), %rdi movl -0x18(%rbp), %esi movl -0x1c(%rbp), %edx movl -0x14(%rbp), %ecx callq 0x3f80 movq -0x28(%rbp), %rdi movl 0x20(%rdi), %eax addl $0x1, %eax movl %eax, 0x20(%rdi) movl -0x14(%rbp), %esi callq 0x3fc0 movq -0x28(%rbp), %rdi movl %eax, 0x28(%rdi) movl -0x18(%rbp), %esi movl -0x1c(%rbp), %edx callq 0x4000 movb %al, %cl movq -0x28(%rbp), %rax andb $0x1, %cl movb %cl, -0x1d(%rbp) cmpl $0x2, 0x24(%rax) jne 0x3e56 movq -0x28(%rbp), %rax movl $0x3, 0x24(%rax) testb $0x1, -0x1d(%rbp) je 0x3e40 movl $0x1, -0x4(%rbp) jmp 0x3f0c movq -0x28(%rbp), %rax movl 0x28(%rax), %ecx movl %ecx, 0x2c(%rax) movl $0x2, -0x4(%rbp) jmp 0x3f0c movq -0x28(%rbp), %rax movl $0x1, 0x24(%rax) testb $0x1, -0x1d(%rbp) je 0x3ee5 movq -0x28(%rbp), %rax movl 0x20(%rax), %eax movl $0x2, %ecx cltd idivl %ecx cmpl $0x0, %edx jne 0x3ea0 movq -0x28(%rbp), %rdi movl $0x3, 0x24(%rdi) movl 0x28(%rdi), %esi callq 0x3fc0 movl %eax, %ecx movq -0x28(%rbp), %rax movl %ecx, 0x2c(%rax) movl $0x2, -0x4(%rbp) jmp 0x3f0c movq -0x28(%rbp), %rcx movl 0x20(%rcx), %eax cmpl 0xc(%rcx), %eax jl 0x3ed1 movq -0x28(%rbp), %rdi movl 0x28(%rdi), %esi callq 0x3fc0 movl %eax, %ecx movq -0x28(%rbp), %rax movl %ecx, 0x2c(%rax) movl $0x3, 0x24(%rax) movl $0x2, -0x4(%rbp) jmp 0x3f0c movq -0x28(%rbp), %rax movl $0x2, 0x24(%rax) movl $0x0, -0x4(%rbp) jmp 0x3f0c movq -0x28(%rbp), %rcx movl 0x20(%rcx), %eax cmpl 0xc(%rcx), %eax jl 0x3f05 movq -0x28(%rbp), %rax movl $0x3, 0x24(%rax) movl $0x1, -0x4(%rbp) jmp 0x3f0c movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN3ttt4game5State12process_moveENS0_4SignEii: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_1C], ecx mov rax, [rbp+var_10] mov [rbp+var_28], rax cmp dword ptr [rax+24h], 3 jnz short loc_3D6F mov [rbp+var_4], 3 jmp loc_3F0C loc_3D6F: cmp [rbp+var_14], 2 jnz short loc_3D81 mov [rbp+var_4], 7 jmp loc_3F0C loc_3D81: mov rcx, [rbp+var_28] mov eax, [rbp+var_14] cmp eax, [rcx+28h] jz short loc_3D99 mov [rbp+var_4], 5 jmp loc_3F0C loc_3D99: mov rdi, [rbp+var_28]; this mov esi, [rbp+var_18]; int mov edx, [rbp+var_1C]; int call _ZNK3ttt4game5State13_valid_coordsEii; ttt::game::State::_valid_coords(int,int) test al, 1 jnz short loc_3DB8 mov [rbp+var_4], 4 jmp loc_3F0C loc_3DB8: mov rdi, [rbp+var_28]; this mov esi, [rbp+var_18]; int mov edx, [rbp+var_1C]; int call _ZNK3ttt4game5State9get_valueEii; ttt::game::State::get_value(int,int) cmp eax, 2 jz short loc_3DD8 mov [rbp+var_4], 6 jmp loc_3F0C loc_3DD8: mov rdi, [rbp+var_28] mov esi, [rbp+var_18] mov edx, [rbp+var_1C] mov ecx, [rbp+var_14] call _ZN3ttt4game5State10_set_valueEiiNS0_4SignE; ttt::game::State::_set_value(int,int,ttt::game::Sign) mov rdi, [rbp+var_28] mov eax, [rdi+20h] add eax, 1 mov [rdi+20h], eax mov esi, [rbp+var_14] call _ZN3ttt4game5State9_opp_signENS0_4SignE; ttt::game::State::_opp_sign(ttt::game::Sign) mov rdi, [rbp+var_28]; this mov [rdi+28h], eax mov esi, [rbp+var_18]; int mov edx, [rbp+var_1C]; int call _ZN3ttt4game5State11_is_winningEii; ttt::game::State::_is_winning(int,int) mov cl, al mov rax, [rbp+var_28] and cl, 1 mov [rbp+var_1D], cl cmp dword ptr [rax+24h], 2 jnz short loc_3E56 mov rax, [rbp+var_28] mov dword ptr [rax+24h], 3 test [rbp+var_1D], 1 jz short loc_3E40 mov [rbp+var_4], 1 jmp loc_3F0C loc_3E40: mov rax, [rbp+var_28] mov ecx, [rax+28h] mov [rax+2Ch], ecx mov [rbp+var_4], 2 jmp loc_3F0C loc_3E56: mov rax, [rbp+var_28] mov dword ptr [rax+24h], 1 test [rbp+var_1D], 1 jz short loc_3EE5 mov rax, [rbp+var_28] mov eax, [rax+20h] mov ecx, 2 cdq idiv ecx cmp edx, 0 jnz short loc_3EA0 mov rdi, [rbp+var_28] mov dword ptr [rdi+24h], 3 mov esi, [rdi+28h] call _ZN3ttt4game5State9_opp_signENS0_4SignE; ttt::game::State::_opp_sign(ttt::game::Sign) mov ecx, eax mov rax, [rbp+var_28] mov [rax+2Ch], ecx mov [rbp+var_4], 2 jmp short loc_3F0C loc_3EA0: mov rcx, [rbp+var_28] mov eax, [rcx+20h] cmp eax, [rcx+0Ch] jl short loc_3ED1 mov rdi, [rbp+var_28] mov esi, [rdi+28h] call _ZN3ttt4game5State9_opp_signENS0_4SignE; ttt::game::State::_opp_sign(ttt::game::Sign) mov ecx, eax mov rax, [rbp+var_28] mov [rax+2Ch], ecx mov dword ptr [rax+24h], 3 mov [rbp+var_4], 2 jmp short loc_3F0C loc_3ED1: mov rax, [rbp+var_28] mov dword ptr [rax+24h], 2 mov [rbp+var_4], 0 jmp short loc_3F0C loc_3EE5: mov rcx, [rbp+var_28] mov eax, [rcx+20h] cmp eax, [rcx+0Ch] jl short loc_3F05 mov rax, [rbp+var_28] mov dword ptr [rax+24h], 3 mov [rbp+var_4], 1 jmp short loc_3F0C loc_3F05: mov [rbp+var_4], 0 loc_3F0C: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long ttt::game::State::process_move( ttt::game::State *a1, unsigned int a2, unsigned int a3, unsigned int a4) { char v5; // [rsp+13h] [rbp-1Dh] if ( *((_DWORD *)a1 + 9) == 3 ) { return 3; } else if ( a2 == 2 ) { return 7; } else if ( a2 == *((_DWORD *)a1 + 10) ) { if ( (ttt::game::State::_valid_coords(a1, a3, a4) & 1) != 0 ) { if ( (unsigned int)ttt::game::State::get_value(a1, a3, a4) == 2 ) { ttt::game::State::_set_value(a1, a3, a4, a2); ++*((_DWORD *)a1 + 8); *((_DWORD *)a1 + 10) = ttt::game::State::_opp_sign(a1, a2); v5 = ttt::game::State::_is_winning(a1, a3, a4) & 1; if ( *((_DWORD *)a1 + 9) == 2 ) { *((_DWORD *)a1 + 9) = 3; if ( (v5 & 1) != 0 ) { return 1; } else { *((_DWORD *)a1 + 11) = *((_DWORD *)a1 + 10); return 2; } } else { *((_DWORD *)a1 + 9) = 1; if ( (v5 & 1) != 0 ) { if ( *((_DWORD *)a1 + 8) % 2 ) { if ( *((_DWORD *)a1 + 8) < *((_DWORD *)a1 + 3) ) { *((_DWORD *)a1 + 9) = 2; return 0; } else { *((_DWORD *)a1 + 11) = ttt::game::State::_opp_sign(a1, *((unsigned int *)a1 + 10)); *((_DWORD *)a1 + 9) = 3; return 2; } } else { *((_DWORD *)a1 + 9) = 3; *((_DWORD *)a1 + 11) = ttt::game::State::_opp_sign(a1, *((unsigned int *)a1 + 10)); return 2; } } else if ( *((_DWORD *)a1 + 8) < *((_DWORD *)a1 + 3) ) { return 0; } else { *((_DWORD *)a1 + 9) = 3; return 1; } } } else { return 6; } } else { return 4; } } else { return 5; } }
process_move: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV dword ptr [RBP + -0x1c],ECX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX CMP dword ptr [RAX + 0x24],0x3 JNZ 0x00103d6f MOV dword ptr [RBP + -0x4],0x3 JMP 0x00103f0c LAB_00103d6f: CMP dword ptr [RBP + -0x14],0x2 JNZ 0x00103d81 MOV dword ptr [RBP + -0x4],0x7 JMP 0x00103f0c LAB_00103d81: MOV RCX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RBP + -0x14] CMP EAX,dword ptr [RCX + 0x28] JZ 0x00103d99 MOV dword ptr [RBP + -0x4],0x5 JMP 0x00103f0c LAB_00103d99: MOV RDI,qword ptr [RBP + -0x28] MOV ESI,dword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] CALL 0x00103f20 TEST AL,0x1 JNZ 0x00103db8 MOV dword ptr [RBP + -0x4],0x4 JMP 0x00103f0c LAB_00103db8: MOV RDI,qword ptr [RBP + -0x28] MOV ESI,dword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] CALL 0x00103f50 CMP EAX,0x2 JZ 0x00103dd8 MOV dword ptr [RBP + -0x4],0x6 JMP 0x00103f0c LAB_00103dd8: MOV RDI,qword ptr [RBP + -0x28] MOV ESI,dword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] MOV ECX,dword ptr [RBP + -0x14] CALL 0x00103f80 MOV RDI,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RDI + 0x20] ADD EAX,0x1 MOV dword ptr [RDI + 0x20],EAX MOV ESI,dword ptr [RBP + -0x14] CALL 0x00103fc0 MOV RDI,qword ptr [RBP + -0x28] MOV dword ptr [RDI + 0x28],EAX MOV ESI,dword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] CALL 0x00104000 MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] AND CL,0x1 MOV byte ptr [RBP + -0x1d],CL CMP dword ptr [RAX + 0x24],0x2 JNZ 0x00103e56 MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x24],0x3 TEST byte ptr [RBP + -0x1d],0x1 JZ 0x00103e40 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00103f0c LAB_00103e40: MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x28] MOV dword ptr [RAX + 0x2c],ECX MOV dword ptr [RBP + -0x4],0x2 JMP 0x00103f0c LAB_00103e56: MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x24],0x1 TEST byte ptr [RBP + -0x1d],0x1 JZ 0x00103ee5 MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x20] MOV ECX,0x2 CDQ IDIV ECX CMP EDX,0x0 JNZ 0x00103ea0 MOV RDI,qword ptr [RBP + -0x28] MOV dword ptr [RDI + 0x24],0x3 MOV ESI,dword ptr [RDI + 0x28] CALL 0x00103fc0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x2c],ECX MOV dword ptr [RBP + -0x4],0x2 JMP 0x00103f0c LAB_00103ea0: MOV RCX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RCX + 0x20] CMP EAX,dword ptr [RCX + 0xc] JL 0x00103ed1 MOV RDI,qword ptr [RBP + -0x28] MOV ESI,dword ptr [RDI + 0x28] CALL 0x00103fc0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x2c],ECX MOV dword ptr [RAX + 0x24],0x3 MOV dword ptr [RBP + -0x4],0x2 JMP 0x00103f0c LAB_00103ed1: MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x24],0x2 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00103f0c LAB_00103ee5: MOV RCX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RCX + 0x20] CMP EAX,dword ptr [RCX + 0xc] JL 0x00103f05 MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x24],0x3 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00103f0c LAB_00103f05: MOV dword ptr [RBP + -0x4],0x0 LAB_00103f0c: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
/* ttt::game::State::process_move(ttt::game::Sign, int, int) */ int4 __thiscall ttt::game::State::process_move(State *this,int param_2,int param_3,int param_4) { byte bVar1; int iVar2; int4 uVar3; ulong uVar4; int4 local_c; if (*(int *)(this + 0x24) == 3) { local_c = 3; } else if (param_2 == 2) { local_c = 7; } else if (param_2 == *(int *)(this + 0x28)) { uVar4 = _valid_coords(this,param_3,param_4); if ((uVar4 & 1) == 0) { local_c = 4; } else { iVar2 = get_value(this,param_3,param_4); if (iVar2 == 2) { _set_value(this,param_3,param_4,param_2); *(int *)(this + 0x20) = *(int *)(this + 0x20) + 1; uVar3 = _opp_sign(this,param_2); *(int4 *)(this + 0x28) = uVar3; bVar1 = _is_winning(this,param_3,param_4); if (*(int *)(this + 0x24) == 2) { *(int4 *)(this + 0x24) = 3; if ((bVar1 & 1) == 0) { *(int4 *)(this + 0x2c) = *(int4 *)(this + 0x28); local_c = 2; } else { local_c = 1; } } else { *(int4 *)(this + 0x24) = 1; if ((bVar1 & 1) == 0) { if (*(int *)(this + 0x20) < *(int *)(this + 0xc)) { local_c = 0; } else { *(int4 *)(this + 0x24) = 3; local_c = 1; } } else if (*(int *)(this + 0x20) % 2 == 0) { *(int4 *)(this + 0x24) = 3; uVar3 = _opp_sign(this,*(int4 *)(this + 0x28)); *(int4 *)(this + 0x2c) = uVar3; local_c = 2; } else if (*(int *)(this + 0x20) < *(int *)(this + 0xc)) { *(int4 *)(this + 0x24) = 2; local_c = 0; } else { uVar3 = _opp_sign(this,*(int4 *)(this + 0x28)); *(int4 *)(this + 0x2c) = uVar3; *(int4 *)(this + 0x24) = 3; local_c = 2; } } } else { local_c = 6; } } } else { local_c = 5; } return local_c; }
21,706
ttt::game::State::process_move(ttt::game::Sign, int, int)
vsennov[P]tictactoe-course/src/core/state.cpp
MoveResult State::process_move(Sign player, int x, int y) { if (m_status == Status::ENDED) { return MoveResult::ENDED; } if (player == Sign::NONE) { return MoveResult::ERROR; } if (player != m_player) { return MoveResult::DQ_OUT_OF_ORDER; } if (!_valid_coords(x, y)) { return MoveResult::DQ_OUT_OF_FIELD; } if (get_value(x, y) != Sign::NONE) { return MoveResult::DQ_PLACE_OCCUPIED; } _set_value(x, y, player); ++m_move_no; m_player = _opp_sign(player); const bool winning = _is_winning(x, y); if (m_status == Status::LAST_MOVE) { m_status = Status::ENDED; if (winning) { return MoveResult::DRAW; } else { m_winner = m_player; return MoveResult::WIN; } } m_status = Status::ACTIVE; if (winning) { if (m_move_no % 2 == 0) { m_status = Status::ENDED; m_winner = _opp_sign(m_player); return MoveResult::WIN; } else if (m_move_no >= m_opts.max_moves) { m_winner = _opp_sign(m_player); m_status = Status::ENDED; return MoveResult::WIN; } else { m_status = Status::LAST_MOVE; return MoveResult::OK; } } if (m_move_no >= m_opts.max_moves) { m_status = Status::ENDED; return MoveResult::DRAW; } return MoveResult::OK; }
O2
cpp
ttt::game::State::process_move(ttt::game::Sign, int, int): cmpl $0x3, 0x24(%rdi) jne 0x1f0a pushq $0x3 popq %rax retq pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %esi, %ebp cmpl $0x2, %esi jne 0x1f23 pushq $0x7 jmp 0x1fdc movq %rdi, %rbx cmpl %ebp, 0x28(%rdi) jne 0x1fda movl %edx, %r15d pushq $0x4 popq %rax testl %edx, %edx js 0x1fdd movl %ecx, %r14d testl %ecx, %ecx js 0x1fdd cmpl %r15d, 0x1c(%rbx) jle 0x1fdd cmpl %r14d, 0x18(%rbx) jle 0x1fdd leaq 0x10(%rbx), %r12 movq %r12, %rdi movl %r15d, %esi movl %r14d, %edx callq 0x1df6 cmpl $0x2, %eax jne 0x1fec movq %r12, %rdi movl %r15d, %esi movl %r14d, %edx movl %ebp, %ecx callq 0x1e58 xorl %r13d, %r13d cmpl $0x1, %ebp setne %r13b movl 0x20(%rbx), %r12d leal 0x1(%r12), %eax movl %eax, 0x4(%rsp) movl %eax, 0x20(%rbx) addl %r13d, %r13d testl %ebp, %ebp pushq $0x1 popq %rax cmovel %eax, %r13d movl %r13d, 0x28(%rbx) movq %rbx, %rdi movl %r15d, %esi movl %r14d, %edx callq 0x20a8 movl %eax, %ecx cmpl $0x2, 0x24(%rbx) jne 0x1ff0 movl $0x3, 0x24(%rbx) pushq $0x1 popq %rax testb %cl, %cl jne 0x1fdd movl %r13d, 0x2c(%rbx) jmp 0x2062 pushq $0x5 popq %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x6 jmp 0x1fdc pushq $0x1 popq %rdx movl $0x1, 0x24(%rbx) testb %cl, %cl je 0x2018 testb $0x1, %r12b jne 0x202e movl 0x4(%rsp), %eax cmpl 0xc(%rbx), %eax jge 0x2049 movl $0x2, 0x24(%rbx) xorl %eax, %eax jmp 0x1fdd xorl %eax, %eax movl 0x4(%rsp), %ecx cmpl 0xc(%rbx), %ecx jl 0x1fdd movl $0x3, 0x24(%rbx) movl %edx, %eax jmp 0x1fdd xorl %eax, %eax testl %ebp, %ebp setne %al addl %eax, %eax cmpl $0x1, %ebp movl $0x3, 0x24(%rbx) cmovel %ebp, %eax movl %eax, 0x2c(%rbx) jmp 0x2062 xorl %eax, %eax testl %ebp, %ebp setne %al addl %eax, %eax cmpl $0x1, %ebp cmovel %ebp, %eax movl %eax, 0x2c(%rbx) movl $0x3, 0x24(%rbx) pushq $0x2 jmp 0x1fdc nop
_ZN3ttt4game5State12process_moveENS0_4SignEii: cmp dword ptr [rdi+24h], 3 jnz short loc_1F0A push 3 pop rax retn loc_1F0A: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebp, esi cmp esi, 2 jnz short loc_1F23 push 7 jmp loc_1FDC loc_1F23: mov rbx, rdi cmp [rdi+28h], ebp jnz loc_1FDA mov r15d, edx push 4 pop rax test edx, edx js loc_1FDD mov r14d, ecx test ecx, ecx js loc_1FDD cmp [rbx+1Ch], r15d jle loc_1FDD cmp [rbx+18h], r14d jle loc_1FDD lea r12, [rbx+10h] mov rdi, r12; this mov esi, r15d; int mov edx, r14d; int call _ZNK3ttt4game11FieldBitmap3getEii; ttt::game::FieldBitmap::get(int,int) cmp eax, 2 jnz short loc_1FEC mov rdi, r12 mov esi, r15d mov edx, r14d mov ecx, ebp call _ZN3ttt4game11FieldBitmap3setEiiNS0_4SignE; ttt::game::FieldBitmap::set(int,int,ttt::game::Sign) xor r13d, r13d cmp ebp, 1 setnz r13b mov r12d, [rbx+20h] lea eax, [r12+1] mov [rsp+38h+var_34], eax mov [rbx+20h], eax add r13d, r13d test ebp, ebp push 1 pop rax cmovz r13d, eax mov [rbx+28h], r13d mov rdi, rbx; this mov esi, r15d; int mov edx, r14d; int call _ZN3ttt4game5State11_is_winningEii; ttt::game::State::_is_winning(int,int) mov ecx, eax cmp dword ptr [rbx+24h], 2 jnz short loc_1FF0 mov dword ptr [rbx+24h], 3 push 1 pop rax test cl, cl jnz short loc_1FDD mov [rbx+2Ch], r13d jmp loc_2062 loc_1FDA: push 5 loc_1FDC: pop rax loc_1FDD: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1FEC: push 6 jmp short loc_1FDC loc_1FF0: push 1 pop rdx mov dword ptr [rbx+24h], 1 test cl, cl jz short loc_2018 test r12b, 1 jnz short loc_202E mov eax, [rsp+38h+var_34] cmp eax, [rbx+0Ch] jge short loc_2049 mov dword ptr [rbx+24h], 2 xor eax, eax jmp short loc_1FDD loc_2018: xor eax, eax mov ecx, [rsp+38h+var_34] cmp ecx, [rbx+0Ch] jl short loc_1FDD mov dword ptr [rbx+24h], 3 mov eax, edx jmp short loc_1FDD loc_202E: xor eax, eax test ebp, ebp setnz al add eax, eax cmp ebp, 1 mov dword ptr [rbx+24h], 3 cmovz eax, ebp mov [rbx+2Ch], eax jmp short loc_2062 loc_2049: xor eax, eax test ebp, ebp setnz al add eax, eax cmp ebp, 1 cmovz eax, ebp mov [rbx+2Ch], eax mov dword ptr [rbx+24h], 3 loc_2062: push 2 jmp loc_1FDC
long long ttt::game::State::process_move(ttt::game::State *this, int a2, int a3, int a4) { long long result; // rax int v7; // r12d int v8; // r13d char is_winning; // cl int v10; // eax int v11; // eax int v13; // [rsp+0h] [rbp-34h] if ( *((_DWORD *)this + 9) == 3 ) return 3LL; if ( a2 == 2 ) return 7LL; if ( *((_DWORD *)this + 10) != a2 ) return 5LL; result = 4LL; if ( a3 >= 0 && a4 >= 0 && *((_DWORD *)this + 7) > a3 && *((_DWORD *)this + 6) > a4 ) { if ( (unsigned int)ttt::game::FieldBitmap::get((ttt::game::State *)((char *)this + 16), a3, a4) != 2 ) return 6LL; ttt::game::FieldBitmap::set((long long *)this + 2, a3, a4, a2); v7 = *((_DWORD *)this + 8); v13 = v7 + 1; *((_DWORD *)this + 8) = v7 + 1; v8 = 2 * (a2 != 1); if ( !a2 ) v8 = 1; *((_DWORD *)this + 10) = v8; is_winning = ttt::game::State::_is_winning(this, a3, a4); if ( *((_DWORD *)this + 9) == 2 ) { *((_DWORD *)this + 9) = 3; result = 1LL; if ( is_winning ) return result; *((_DWORD *)this + 11) = v8; return 2LL; } *((_DWORD *)this + 9) = 1; if ( is_winning ) { if ( (v7 & 1) != 0 ) { v10 = 2 * (a2 != 0); *((_DWORD *)this + 9) = 3; if ( a2 == 1 ) v10 = 1; *((_DWORD *)this + 11) = v10; } else { if ( v13 < *((_DWORD *)this + 3) ) { *((_DWORD *)this + 9) = 2; return 0LL; } v11 = 2 * (a2 != 0); if ( a2 == 1 ) v11 = 1; *((_DWORD *)this + 11) = v11; *((_DWORD *)this + 9) = 3; } return 2LL; } result = 0LL; if ( v13 >= *((_DWORD *)this + 3) ) { *((_DWORD *)this + 9) = 3; return 1LL; } } return result; }
process_move: CMP dword ptr [RDI + 0x24],0x3 JNZ 0x00101f0a PUSH 0x3 POP RAX RET LAB_00101f0a: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBP,ESI CMP ESI,0x2 JNZ 0x00101f23 PUSH 0x7 JMP 0x00101fdc LAB_00101f23: MOV RBX,RDI CMP dword ptr [RDI + 0x28],EBP JNZ 0x00101fda MOV R15D,EDX PUSH 0x4 POP RAX TEST EDX,EDX JS 0x00101fdd MOV R14D,ECX TEST ECX,ECX JS 0x00101fdd CMP dword ptr [RBX + 0x1c],R15D JLE 0x00101fdd CMP dword ptr [RBX + 0x18],R14D JLE 0x00101fdd LEA R12,[RBX + 0x10] MOV RDI,R12 MOV ESI,R15D MOV EDX,R14D CALL 0x00101df6 CMP EAX,0x2 JNZ 0x00101fec MOV RDI,R12 MOV ESI,R15D MOV EDX,R14D MOV ECX,EBP CALL 0x00101e58 XOR R13D,R13D CMP EBP,0x1 SETNZ R13B MOV R12D,dword ptr [RBX + 0x20] LEA EAX,[R12 + 0x1] MOV dword ptr [RSP + 0x4],EAX MOV dword ptr [RBX + 0x20],EAX ADD R13D,R13D TEST EBP,EBP PUSH 0x1 POP RAX CMOVZ R13D,EAX MOV dword ptr [RBX + 0x28],R13D MOV RDI,RBX MOV ESI,R15D MOV EDX,R14D CALL 0x001020a8 MOV ECX,EAX CMP dword ptr [RBX + 0x24],0x2 JNZ 0x00101ff0 MOV dword ptr [RBX + 0x24],0x3 PUSH 0x1 POP RAX TEST CL,CL JNZ 0x00101fdd MOV dword ptr [RBX + 0x2c],R13D JMP 0x00102062 LAB_00101fda: PUSH 0x5 LAB_00101fdc: POP RAX LAB_00101fdd: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00101fec: PUSH 0x6 JMP 0x00101fdc LAB_00101ff0: PUSH 0x1 POP RDX MOV dword ptr [RBX + 0x24],0x1 TEST CL,CL JZ 0x00102018 TEST R12B,0x1 JNZ 0x0010202e MOV EAX,dword ptr [RSP + 0x4] CMP EAX,dword ptr [RBX + 0xc] JGE 0x00102049 MOV dword ptr [RBX + 0x24],0x2 XOR EAX,EAX JMP 0x00101fdd LAB_00102018: XOR EAX,EAX MOV ECX,dword ptr [RSP + 0x4] CMP ECX,dword ptr [RBX + 0xc] JL 0x00101fdd MOV dword ptr [RBX + 0x24],0x3 MOV EAX,EDX JMP 0x00101fdd LAB_0010202e: XOR EAX,EAX TEST EBP,EBP SETNZ AL ADD EAX,EAX CMP EBP,0x1 MOV dword ptr [RBX + 0x24],0x3 CMOVZ EAX,EBP MOV dword ptr [RBX + 0x2c],EAX JMP 0x00102062 LAB_00102049: XOR EAX,EAX TEST EBP,EBP SETNZ AL ADD EAX,EAX CMP EBP,0x1 CMOVZ EAX,EBP MOV dword ptr [RBX + 0x2c],EAX MOV dword ptr [RBX + 0x24],0x3 LAB_00102062: PUSH 0x2 JMP 0x00101fdc
/* ttt::game::State::process_move(ttt::game::Sign, int, int) */ int8 __thiscall ttt::game::State::process_move(State *this,int param_2,int param_3,int param_4) { uint uVar1; char cVar2; int iVar3; int iVar4; int8 uStack_40; if (*(int *)(this + 0x24) == 3) { return 3; } if (param_2 == 2) { uStack_40 = 7; } else if (*(int *)(this + 0x28) == param_2) { uStack_40 = 4; if ((((-1 < param_3) && (-1 < param_4)) && (param_3 < *(int *)(this + 0x1c))) && (param_4 < *(int *)(this + 0x18))) { iVar3 = FieldBitmap::get((FieldBitmap *)(this + 0x10),param_3,param_4); if (iVar3 == 2) { FieldBitmap::set((FieldBitmap *)(this + 0x10),param_3,param_4,param_2); uVar1 = *(uint *)(this + 0x20); iVar3 = uVar1 + 1; *(int *)(this + 0x20) = iVar3; iVar4 = (uint)(param_2 != 1) * 2; if (param_2 == 0) { iVar4 = 1; } *(int *)(this + 0x28) = iVar4; cVar2 = _is_winning(this,param_3,param_4); if (*(int *)(this + 0x24) == 2) { *(int4 *)(this + 0x24) = 3; if (cVar2 != '\0') { return 1; } *(int *)(this + 0x2c) = iVar4; } else { *(int4 *)(this + 0x24) = 1; if (cVar2 == '\0') { if (iVar3 < *(int *)(this + 0xc)) { return 0; } *(int4 *)(this + 0x24) = 3; return 1; } if ((uVar1 & 1) == 0) { if (iVar3 < *(int *)(this + 0xc)) { *(int4 *)(this + 0x24) = 2; return 0; } iVar3 = (uint)(param_2 != 0) * 2; if (param_2 == 1) { iVar3 = 1; } *(int *)(this + 0x2c) = iVar3; *(int4 *)(this + 0x24) = 3; } else { iVar3 = (uint)(param_2 != 0) * 2; *(int4 *)(this + 0x24) = 3; if (param_2 == 1) { iVar3 = 1; } *(int *)(this + 0x2c) = iVar3; } } uStack_40 = 2; } else { uStack_40 = 6; } } } else { uStack_40 = 5; } return uStack_40; }
21,707
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::decode(unsigned char&, unsigned int&, unsigned char)
monkey531[P]llama/common/./json.hpp
static std::uint8_t decode(std::uint8_t& state, std::uint32_t& codep, const std::uint8_t byte) noexcept { static const std::array<std::uint8_t, 400> utf8d = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 00..1F 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20..3F 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 40..5F 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 60..7F 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, // 80..9F 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // A0..BF 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // C0..DF 0xA, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x3, // E0..EF 0xB, 0x6, 0x6, 0x6, 0x5, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, // F0..FF 0x0, 0x1, 0x2, 0x3, 0x5, 0x8, 0x7, 0x1, 0x1, 0x1, 0x4, 0x6, 0x1, 0x1, 0x1, 0x1, // s0..s0 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, // s1..s2 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, // s3..s4 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, // s5..s6 1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // s7..s8 } }; JSON_ASSERT(byte < utf8d.size()); const std::uint8_t type = utf8d[byte]; codep = (state != UTF8_ACCEPT) ? (byte & 0x3fu) | (codep << 6u) : (0xFFu >> type) & (byte); const std::size_t index = 256u + static_cast<size_t>(state) * 16u + static_cast<size_t>(type); JSON_ASSERT(index < utf8d.size()); state = utf8d[index]; return state; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::decode(unsigned char&, unsigned int&, unsigned char): movl %edx, %ecx leaq 0x581df(%rip), %rax # 0xbf192 movzbl (%rcx,%rax), %ecx cmpb $0x0, (%rdi) je 0x66fcd andb $0x3f, %dl movzbl %dl, %r8d movl (%rsi), %edx shll $0x6, %edx orl %r8d, %edx jmp 0x66fdc movl $0xff, %r8d shrl %cl, %r8d movzbl %dl, %edx andl %r8d, %edx movl %edx, (%rsi) movzbl (%rdi), %edx shll $0x4, %edx movl %ecx, %ecx addq %rdx, %rcx addq $0x100, %rcx # imm = 0x100 cmpq $0x190, %rcx # imm = 0x190 jae 0x66fff movb (%rcx,%rax), %al movb %al, (%rdi) retq pushq %rax leaq 0x54dd0(%rip), %rdi # 0xbbdd7 leaq 0x4fc98(%rip), %rsi # 0xb6ca6 leaq 0x54ce9(%rip), %rcx # 0xbbcfe movl $0x49fb, %edx # imm = 0x49FB callq 0x18470
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE6decodeERhRjh: mov ecx, edx lea rax, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE6decodeERhRjhE5utf8d; nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::decode(uchar &,uint &,uchar)::utf8d movzx ecx, byte ptr [rcx+rax] cmp byte ptr [rdi], 0 jz short loc_66FCD and dl, 3Fh movzx r8d, dl mov edx, [rsi] shl edx, 6 or edx, r8d jmp short loc_66FDC loc_66FCD: mov r8d, 0FFh shr r8d, cl movzx edx, dl and edx, r8d loc_66FDC: mov [rsi], edx movzx edx, byte ptr [rdi] shl edx, 4 mov ecx, ecx add rcx, rdx add rcx, 100h cmp rcx, 190h jnb short loc_66FFF mov al, [rcx+rax] mov [rdi], al retn loc_66FFF: push rax lea rdi, aIndexUtf8dSize; "index < utf8d.size()" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aStaticStdUint8; "static std::uint8_t nlohmann::detail::s"... mov edx, 49FBh call ___assert_fail
unsigned __int8 nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::decode( unsigned __int8 *a1, unsigned int *a2, int a3) { unsigned int v3; // ecx unsigned int v4; // edx unsigned long long v5; // rcx unsigned __int8 result; // al v3 = nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::decode(unsigned char &,unsigned int &,unsigned char)::utf8d[a3]; if ( *a1 ) v4 = a3 & 0x3F | (*a2 << 6); else v4 = (0xFFu >> v3) & (unsigned __int8)a3; *a2 = v4; v5 = 16 * (unsigned int)*a1 + (unsigned long long)v3 + 256; if ( v5 >= 0x190 ) __assert_fail( "index < utf8d.size()", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", "__gmon_start__", "static std::uint8_t nlohmann::detail::serializer<nlohmann::basic_json<nlohmann::ordered_map>>::decode(std::uint8_t" " &, std::uint32_t &, const std::uint8_t) [BasicJsonType = nlohmann::basic_json<nlohmann::ordered_map>]"); result = nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::decode(unsigned char &,unsigned int &,unsigned char)::utf8d[v5]; *a1 = result; return result; }
decode: MOV ECX,EDX LEA RAX,[0x1bf192] MOVZX ECX,byte ptr [RCX + RAX*0x1] CMP byte ptr [RDI],0x0 JZ 0x00166fcd AND DL,0x3f MOVZX R8D,DL MOV EDX,dword ptr [RSI] SHL EDX,0x6 OR EDX,R8D JMP 0x00166fdc LAB_00166fcd: MOV R8D,0xff SHR R8D,CL MOVZX EDX,DL AND EDX,R8D LAB_00166fdc: MOV dword ptr [RSI],EDX MOVZX EDX,byte ptr [RDI] SHL EDX,0x4 MOV ECX,ECX ADD RCX,RDX ADD RCX,0x100 CMP RCX,0x190 JNC 0x00166fff MOV AL,byte ptr [RCX + RAX*0x1] MOV byte ptr [RDI],AL RET LAB_00166fff: PUSH RAX LEA RDI,[0x1bbdd7] LEA RSI,[0x1b6ca6] LEA RCX,[0x1bbcfe] MOV EDX,0x49fb CALL 0x00118470
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::decode(unsigned char&, unsigned int&, unsigned char) */ void nlohmann::json_abi_v3_11_3::detail:: serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::decode(uchar *param_1,uint *param_2,uchar param_3) { byte bVar1; long lVar2; uint uVar3; int7 in_register_00000011; bVar1 = decode(unsigned_char&,unsigned_int&,unsigned_char)::utf8d [CONCAT71(in_register_00000011,param_3) & 0xffffffff]; if (*param_1 == '\0') { uVar3 = (uint)param_3 & 0xffU >> (bVar1 & 0x1f); } else { uVar3 = *param_2 << 6 | (uint)(param_3 & 0x3f); } *param_2 = uVar3; lVar2 = (ulong)bVar1 + (ulong)*param_1 * 0x10; if (lVar2 + 0x100U < 400) { *param_1 = decode(unsigned_char&,unsigned_int&,unsigned_char)::utf8d[lVar2 + 0x100]; return; } /* WARNING: Subroutine does not return */ __assert_fail("index < utf8d.size()", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",0x49fb , "static std::uint8_t nlohmann::detail::serializer<nlohmann::basic_json<nlohmann::ordered_map>>::decode(std::uint8_t &, std::uint32_t &, const std::uint8_t) [BasicJsonType = nlohmann::basic_json<nlohmann::ordered_map>]" ); }
21,708
my_charlen_utf8mb4
eloqsql/strings/ctype-utf8.c
static int my_charlen_utf8mb4(CHARSET_INFO *cs __attribute__((unused)), const uchar *s, const uchar *e) { uchar c; if (s >= e) return MY_CS_TOOSMALL; c= s[0]; if (c < 0xf0) return my_valid_mbcharlen_utf8mb3(s, e); if (c < 0xf5) { if (s + 4 > e) /* We need 4 characters */ return MY_CS_TOOSMALL4; if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3])) return MY_CS_ILSEQ; return 4; } return MY_CS_ILSEQ; }
O3
c
my_charlen_utf8mb4: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rdx, %rsi jae 0x5470e movb (%rsi), %cl cmpb $-0x11, %cl ja 0x5467a movl $0x1, %eax testb %cl, %cl jns 0x5470e cmpb $-0x3e, %cl jb 0x5470c cmpb $-0x21, %cl ja 0x546d3 leaq 0x2(%rsi), %rcx movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rdx, %rcx ja 0x5470e xorl %eax, %eax cmpb $-0x40, 0x1(%rsi) setl %al addl %eax, %eax jmp 0x5470e cmpb $-0xc, %cl ja 0x5470c leaq 0x4(%rsi), %rdi movl $0xffffff98, %eax # imm = 0xFFFFFF98 cmpq %rdx, %rdi ja 0x5470e movb 0x1(%rsi), %dl cmpb $-0x41, %dl jg 0x5470c cmpb $-0x41, 0x2(%rsi) jg 0x5470c cmpb $-0x41, 0x3(%rsi) jg 0x5470c cmpb $-0x10, %cl sete %sil cmpb $-0x70, %dl setb %dil movl $0x0, %eax testb %dil, %sil jne 0x5470e cmpb $-0xc, %cl setne %al cmpb $-0x70, %dl setb %cl orb %al, %cl movzbl %cl, %eax shll $0x2, %eax jmp 0x5470e leaq 0x3(%rsi), %rdi movl $0xffffff99, %eax # imm = 0xFFFFFF99 cmpq %rdx, %rdi ja 0x5470e movb 0x1(%rsi), %dl cmpb $-0x41, %dl jg 0x5470c cmpb $-0x41, 0x2(%rsi) movl $0x0, %eax jg 0x5470e xorl %eax, %eax cmpb $-0x60, %dl setae %al cmpb $-0x20, %cl leal (%rax,%rax,2), %ecx movl $0x3, %eax cmovel %ecx, %eax jmp 0x5470e xorl %eax, %eax popq %rbp retq
my_charlen_utf8mb4: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rsi, rdx jnb loc_5470E mov cl, [rsi] cmp cl, 0EFh ja short loc_5467A mov eax, 1 test cl, cl jns loc_5470E cmp cl, 0C2h jb loc_5470C cmp cl, 0DFh ja short loc_546D3 lea rcx, [rsi+2] mov eax, 0FFFFFF9Ah cmp rcx, rdx ja loc_5470E xor eax, eax cmp byte ptr [rsi+1], 0C0h setl al add eax, eax jmp loc_5470E loc_5467A: cmp cl, 0F4h ja loc_5470C lea rdi, [rsi+4] mov eax, 0FFFFFF98h cmp rdi, rdx ja short loc_5470E mov dl, [rsi+1] cmp dl, 0BFh jg short loc_5470C cmp byte ptr [rsi+2], 0BFh jg short loc_5470C cmp byte ptr [rsi+3], 0BFh jg short loc_5470C cmp cl, 0F0h setz sil cmp dl, 90h setb dil mov eax, 0 test sil, dil jnz short loc_5470E cmp cl, 0F4h setnz al cmp dl, 90h setb cl or cl, al movzx eax, cl shl eax, 2 jmp short loc_5470E loc_546D3: lea rdi, [rsi+3] mov eax, 0FFFFFF99h cmp rdi, rdx ja short loc_5470E mov dl, [rsi+1] cmp dl, 0BFh jg short loc_5470C cmp byte ptr [rsi+2], 0BFh mov eax, 0 jg short loc_5470E xor eax, eax cmp dl, 0A0h setnb al cmp cl, 0E0h lea ecx, [rax+rax*2] mov eax, 3 cmovz eax, ecx jmp short loc_5470E loc_5470C: xor eax, eax loc_5470E: pop rbp retn
long long my_charlen_utf8mb4(long long a1, char *a2, unsigned long long a3) { long long result; // rax char v4; // cl char v5; // dl char v6; // dl result = 4294967195LL; if ( (unsigned long long)a2 >= a3 ) return result; v4 = *a2; if ( (unsigned __int8)*a2 <= 0xEFu ) { result = 1LL; if ( v4 >= 0 ) return result; if ( (unsigned __int8)v4 >= 0xC2u ) { if ( (unsigned __int8)v4 <= 0xDFu ) { result = 4294967194LL; if ( (unsigned long long)(a2 + 2) <= a3 ) return 2 * (unsigned int)(a2[1] < -64); return result; } result = 4294967193LL; if ( (unsigned long long)(a2 + 3) > a3 ) return result; v6 = a2[1]; if ( v6 <= -65 ) { result = 0LL; if ( a2[2] <= -65 ) { result = 3LL; if ( v4 == -32 ) return 3 * (unsigned int)((unsigned __int8)v6 >= 0xA0u); } return result; } } return 0LL; } if ( (unsigned __int8)v4 > 0xF4u ) return 0LL; result = 4294967192LL; if ( (unsigned long long)(a2 + 4) > a3 ) return result; v5 = a2[1]; if ( v5 > -65 || a2[2] > -65 || a2[3] > -65 ) return 0LL; result = 0LL; if ( (unsigned __int8)v5 >= 0x90u || v4 != -16 ) return 4 * (unsigned int)(v4 != -12 || (unsigned __int8)v5 < 0x90u); return result; }
my_charlen_utf8mb4: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RSI,RDX JNC 0x0015470e MOV CL,byte ptr [RSI] CMP CL,0xef JA 0x0015467a MOV EAX,0x1 TEST CL,CL JNS 0x0015470e CMP CL,0xc2 JC 0x0015470c CMP CL,0xdf JA 0x001546d3 LEA RCX,[RSI + 0x2] MOV EAX,0xffffff9a CMP RCX,RDX JA 0x0015470e XOR EAX,EAX CMP byte ptr [RSI + 0x1],0xc0 SETL AL ADD EAX,EAX JMP 0x0015470e LAB_0015467a: CMP CL,0xf4 JA 0x0015470c LEA RDI,[RSI + 0x4] MOV EAX,0xffffff98 CMP RDI,RDX JA 0x0015470e MOV DL,byte ptr [RSI + 0x1] CMP DL,0xbf JG 0x0015470c CMP byte ptr [RSI + 0x2],0xbf JG 0x0015470c CMP byte ptr [RSI + 0x3],0xbf JG 0x0015470c CMP CL,0xf0 SETZ SIL CMP DL,0x90 SETC DIL MOV EAX,0x0 TEST SIL,DIL JNZ 0x0015470e CMP CL,0xf4 SETNZ AL CMP DL,0x90 SETC CL OR CL,AL MOVZX EAX,CL SHL EAX,0x2 JMP 0x0015470e LAB_001546d3: LEA RDI,[RSI + 0x3] MOV EAX,0xffffff99 CMP RDI,RDX JA 0x0015470e MOV DL,byte ptr [RSI + 0x1] CMP DL,0xbf JG 0x0015470c CMP byte ptr [RSI + 0x2],0xbf MOV EAX,0x0 JG 0x0015470e XOR EAX,EAX CMP DL,0xa0 SETNC AL CMP CL,0xe0 LEA ECX,[RAX + RAX*0x2] MOV EAX,0x3 CMOVZ EAX,ECX JMP 0x0015470e LAB_0015470c: XOR EAX,EAX LAB_0015470e: POP RBP RET
ulong my_charlen_utf8mb4(int8 param_1,byte *param_2,byte *param_3) { byte bVar1; byte bVar2; if (param_3 <= param_2) { return 0xffffff9b; } bVar1 = *param_2; if (bVar1 < 0xf0) { if (-1 < (char)bVar1) { return 1; } if (0xc1 < bVar1) { if (bVar1 < 0xe0) { if (param_3 < param_2 + 2) { return 0xffffff9a; } return (ulong)((uint)((char)param_2[1] < -0x40) * 2); } if (param_3 < param_2 + 3) { return 0xffffff99; } if ((char)param_2[1] < -0x40) { if (-0x41 < (char)param_2[2]) { return 0; } if (bVar1 != 0xe0) { return 3; } return (ulong)((uint)(0x9f < param_2[1]) * 3); } } } else if (bVar1 < 0xf5) { if (param_3 < param_2 + 4) { return 0xffffff98; } bVar2 = param_2[1]; if ((((char)bVar2 < -0x40) && ((char)param_2[2] < -0x40)) && ((char)param_2[3] < -0x40)) { if (bVar1 == 0xf0 && bVar2 < 0x90) { return 0; } return (ulong)(bVar2 < 0x90 || bVar1 != 0xf4) << 2; } } return 0; }
21,709
PAIRING_Aggregate_PK_in_G2
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/aggregate.c
static BLST_ERROR PAIRING_Aggregate_PK_in_G2(PAIRING *ctx, const POINTonE2_affine *PK, size_t pk_groupcheck, const POINTonE1_affine *sig, size_t sig_groupcheck, const byte *scalar, size_t nbits, const void *msg, size_t msg_len, const void *aug, size_t aug_len) { if (ctx->ctrl & AGGR_MIN_PK) return BLST_AGGR_TYPE_MISMATCH; ctx->ctrl |= AGGR_MIN_SIG; /* * Since we don't know if the signature is individual or aggregated, * the only sensible thing to do is to skip over infinite one and * count on the corresponding infinite public key to be rejected, * in case the signature is non-aggregated that is. */ if (sig != NULL && !vec_is_zero(sig, sizeof(*sig))) { POINTonE1 *S = &ctx->AggrSign.e1; POINTonE1 P[1]; FROM_AFFINE(P, sig); if (sig_groupcheck && !POINTonE1_in_G1(P)) return BLST_POINT_NOT_IN_GROUP; if (ctx->ctrl & AGGR_SIGN_SET) { if (nbits != 0 && scalar != NULL) { POINTonE1_mult_w5(P, P, scalar, nbits); POINTonE1_dadd(S, S, P, NULL); } else { POINTonE1_dadd_affine(S, S, sig); } } else { ctx->ctrl |= AGGR_SIGN_SET; if (nbits != 0 && scalar != NULL) POINTonE1_mult_w5(S, P, scalar, nbits); else vec_copy(S, P, sizeof(P)); } } if (PK != NULL) { unsigned int n; POINTonE1 H[1]; const void *DST = pairing_get_dst(ctx); /* * Reject infinite public keys. */ if (vec_is_zero(PK, sizeof(*PK))) return BLST_PK_IS_INFINITY; if (pk_groupcheck) { POINTonE2 P[1]; FROM_AFFINE(P, PK); if (!POINTonE2_in_G2(P)) return BLST_POINT_NOT_IN_GROUP; } if (ctx->ctrl & AGGR_HASH_OR_ENCODE) Hash_to_G1(H, msg, msg_len, DST, ctx->DST_len, aug, aug_len); else Encode_to_G1(H, msg, msg_len, DST, ctx->DST_len, aug, aug_len); if (nbits != 0 && scalar != NULL) POINTonE1_mult_w5(H, H, scalar, nbits); POINTonE1_from_Jacobian(H, H); n = ctx->nelems; vec_copy(ctx->Q + n, PK, sizeof(POINTonE2_affine)); vec_copy(ctx->P + n, H, sizeof(POINTonE1_affine)); if (++n == N_MAX) { if (ctx->ctrl & AGGR_GT_SET) { vec384fp12 GT; miller_loop_n(GT, ctx->Q, ctx->P, n); mul_fp12(ctx->GT, ctx->GT, GT); } else { miller_loop_n(ctx->GT, ctx->Q, ctx->P, n); ctx->ctrl |= AGGR_GT_SET; } n = 0; } ctx->nelems = n; } return BLST_SUCCESS; }
O1
c
PAIRING_Aggregate_PK_in_G2: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x2d8, %rsp # imm = 0x2D8 movq %r9, -0x30(%rbp) movq %rcx, %r12 movl (%rdi), %ecx movl $0x4, %eax testb $0x2, %cl jne 0x21431 movq %rdx, %r13 movq %rsi, %r14 movq %rdi, %rbx orl $0x1, %ecx movl %ecx, (%rdi) testq %r12, %r12 je 0x21131 movq %r8, %r15 movl $0x60, %esi movq %r12, %rdi callq 0x30680 testq %rax, %rax je 0x2116f testq %r14, %r14 je 0x2142f movq 0x8(%rbx), %rax leaq 0xc78(%rbx), %r12 cmpq $0x2a, %rax cmovneq %rax, %r12 movl $0xc0, %esi movq %r14, %rdi callq 0x30680 testq %rax, %rax je 0x21209 movl $0x6, %eax xorl %ecx, %ecx jmp 0x2142b leaq -0x300(%rbp), %rdi movl $0xc, %ecx movq %r12, %rsi rep movsq (%rsi), %es:(%rdi) movl $0x60, %esi movq %r12, %rdi callq 0x30680 leaq 0x1e9c3(%rip), %rdx # 0x3fb58 leaq -0x2a0(%rbp), %rdi movq %r12, %rsi movq %rax, %rcx callq 0x2ffe0 testq %r15, %r15 je 0x211c1 leaq -0x300(%rbp), %rdi callq 0x1bed0 testq %rax, %rax je 0x213c0 leaq 0x258(%rbx), %r15 movl (%rbx), %eax testb $0x10, %al jne 0x212a1 orl $0x10, %eax movl %eax, (%rbx) movq 0x10(%rbp), %rcx testq %rcx, %rcx sete %al movq -0x30(%rbp), %rdx testq %rdx, %rdx sete %sil orb %al, %sil jne 0x213d0 leaq -0x300(%rbp), %rsi movq %r15, %rdi callq 0x1b770 jmp 0x21131 testq %r13, %r13 je 0x2125f leaq -0x300(%rbp), %r15 movl $0xc0, %edx movq %r15, %rdi movq %r14, %rsi callq 0x5060 leaq -0x240(%rbp), %r13 movl $0xc0, %esi movq %r14, %rdi callq 0x30680 leaq 0x1e918(%rip), %rdx # 0x3fb58 movq %r13, %rdi movq %r14, %rsi movq %rax, %rcx callq 0x30060 movq %r15, %rdi callq 0x1f18b testq %rax, %rax je 0x213c7 movq 0x30(%rbp), %rcx movq 0x28(%rbp), %rdx movq 0x20(%rbp), %r9 movq 0x18(%rbp), %r8 testb $0x40, (%rbx) movq 0x10(%rbx), %rax leaq -0x300(%rbp), %r15 jne 0x212e6 movl $0x1, %esi movq %r15, %rdi pushq %rax pushq %r12 callq 0x26dc2 addq $0x10, %rsp leaq -0xc0(%rbp), %rdi movq %r15, %rsi xorl %edx, %edx jmp 0x2130b movq 0x10(%rbp), %rcx testq %rcx, %rcx sete %al movq -0x30(%rbp), %rdx testq %rdx, %rdx sete %sil orb %al, %sil jne 0x213e9 leaq -0x300(%rbp), %r12 movq %r12, %rdi movq %r12, %rsi callq 0x1b770 movq %r15, %rdi movq %r15, %rsi movq %r12, %rdx xorl %ecx, %ecx callq 0x1a05e jmp 0x21131 movl $0x2, %esi movq %r15, %rdi pushq %rax pushq %r12 callq 0x26dc2 addq $0x10, %rsp leaq -0x2d0(%rbp), %rdx leaq -0xc0(%rbp), %rdi movq %r15, %rsi callq 0x1b9f5 movq 0x10(%rbp), %rcx testq %rcx, %rcx sete %al movq -0x30(%rbp), %rdx testq %rdx, %rdx sete %sil orb %al, %sil jne 0x21339 leaq -0xc0(%rbp), %rdi movq %rdi, %rsi callq 0x1b770 leaq -0xc0(%rbp), %r15 movq %r15, %rdi movq %r15, %rsi callq 0x192c4 movl 0x4(%rbx), %r12d leaq (%r12,%r12,2), %r13 movq %r13, %rax shlq $0x6, %rax leaq (%rbx,%rax), %rdi addq $0x378, %rdi # imm = 0x378 movl $0xc0, %edx movq %r14, %rsi callq 0x5060 shlq $0x5, %r13 leaq (%rbx,%r13), %rdi addq $0x978, %rdi # imm = 0x978 movl $0xc, %ecx movq %r15, %rsi rep movsq (%rsi), %es:(%rdi) leal 0x1(%r12), %eax cmpl $0x8, %eax jne 0x21421 leaq 0x378(%rbx), %rsi leaq 0x978(%rbx), %rdx testb $0x20, (%rbx) jne 0x213fc leaq 0x18(%rbx), %rdi movl $0x8, %ecx callq 0x2043d orb $0x20, (%rbx) jmp 0x2141f movl $0x3, %eax jmp 0x21431 xorl %ecx, %ecx movl $0x3, %eax jmp 0x2142b leaq -0x300(%rbp), %rsi movl $0x90, %edx movq %r15, %rdi callq 0x5060 jmp 0x21131 movq %r15, %rdi movq %r15, %rsi movq %r12, %rdx callq 0x1a723 jmp 0x21131 leaq -0x300(%rbp), %r14 movl $0x8, %ecx movq %r14, %rdi callq 0x2043d leaq 0x18(%rbx), %rdi movq %rdi, %rsi movq %r14, %rdx callq 0x1f662 xorl %eax, %eax movl %eax, 0x4(%rbx) movl $0x3, %eax movb $0x1, %cl testb %cl, %cl je 0x21431 xorl %eax, %eax addq $0x2d8, %rsp # imm = 0x2D8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
PAIRING_Aggregate_PK_in_G2: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 2D8h mov [rbp+var_30], r9 mov r12, rcx mov ecx, [rdi] mov eax, 4 test cl, 2 jnz loc_21431 mov r13, rdx mov r14, rsi mov rbx, rdi or ecx, 1 mov [rdi], ecx test r12, r12 jz short loc_21131 mov r15, r8 mov esi, 60h ; '`' mov rdi, r12 call vec_is_zero_16x test rax, rax jz short loc_2116F loc_21131: test r14, r14 jz loc_2142F mov rax, [rbx+8] lea r12, [rbx+0C78h] cmp rax, 2Ah ; '*' cmovnz r12, rax mov esi, 0C0h mov rdi, r14 call vec_is_zero_16x test rax, rax jz loc_21209 mov eax, 6 xor ecx, ecx jmp loc_2142B loc_2116F: lea rdi, [rbp+var_300] mov ecx, 0Ch mov rsi, r12 rep movsq mov esi, 60h ; '`' mov rdi, r12 call vec_is_zero_16x lea rdx, BLS12_381_Rx lea rdi, [rbp+var_2A0] mov rsi, r12 mov rcx, rax call vec_select_48 test r15, r15 jz short loc_211C1 lea rdi, [rbp+var_300] call POINTonE1_in_G1 test rax, rax jz loc_213C0 loc_211C1: lea r15, [rbx+258h] mov eax, [rbx] test al, 10h jnz loc_212A1 or eax, 10h mov [rbx], eax mov rcx, [rbp+arg_0] test rcx, rcx setz al mov rdx, [rbp+var_30] test rdx, rdx setz sil or sil, al jnz loc_213D0 lea rsi, [rbp+var_300] mov rdi, r15 call POINTonE1_mult_w5 jmp loc_21131 loc_21209: test r13, r13 jz short loc_2125F lea r15, [rbp+var_300] mov edx, 0C0h mov rdi, r15 mov rsi, r14 call _memcpy lea r13, [rbp+var_240] mov esi, 0C0h mov rdi, r14 call vec_is_zero_16x lea rdx, BLS12_381_Rx mov rdi, r13 mov rsi, r14 mov rcx, rax call vec_select_96 mov rdi, r15 call POINTonE2_in_G2 test rax, rax jz loc_213C7 loc_2125F: mov rcx, [rbp+arg_20] mov rdx, [rbp+arg_18] mov r9, [rbp+arg_10] mov r8, [rbp+arg_8] test byte ptr [rbx], 40h mov rax, [rbx+10h] lea r15, [rbp+var_300] jnz short loc_212E6 mov esi, 1 mov rdi, r15 push rax push r12 call hash_to_field add rsp, 10h lea rdi, [rbp+var_C0] mov rsi, r15 xor edx, edx jmp short loc_2130B loc_212A1: mov rcx, [rbp+arg_0] test rcx, rcx setz al mov rdx, [rbp+var_30] test rdx, rdx setz sil or sil, al jnz loc_213E9 lea r12, [rbp+var_300] mov rdi, r12 mov rsi, r12 call POINTonE1_mult_w5 mov rdi, r15 mov rsi, r15 mov rdx, r12 xor ecx, ecx call POINTonE1_dadd jmp loc_21131 loc_212E6: mov esi, 2 mov rdi, r15 push rax push r12 call hash_to_field add rsp, 10h lea rdx, [rbp+var_2D0] lea rdi, [rbp+var_C0] mov rsi, r15 loc_2130B: call map_to_g1 mov rcx, [rbp+arg_0] test rcx, rcx setz al mov rdx, [rbp+var_30] test rdx, rdx setz sil or sil, al jnz short loc_21339 lea rdi, [rbp+var_C0] mov rsi, rdi call POINTonE1_mult_w5 loc_21339: lea r15, [rbp+var_C0] mov rdi, r15 mov rsi, r15 call POINTonE1_from_Jacobian mov r12d, [rbx+4] lea r13, [r12+r12*2] mov rax, r13 shl rax, 6 lea rdi, [rbx+rax] add rdi, 378h mov edx, 0C0h mov rsi, r14 call _memcpy shl r13, 5 lea rdi, [rbx+r13] add rdi, 978h mov ecx, 0Ch mov rsi, r15 rep movsq lea eax, [r12+1] cmp eax, 8 jnz loc_21421 lea rsi, [rbx+378h] lea rdx, [rbx+978h] test byte ptr [rbx], 20h jnz short loc_213FC lea rdi, [rbx+18h] mov ecx, 8 call miller_loop_n or byte ptr [rbx], 20h jmp short loc_2141F loc_213C0: mov eax, 3 jmp short loc_21431 loc_213C7: xor ecx, ecx mov eax, 3 jmp short loc_2142B loc_213D0: lea rsi, [rbp+var_300] mov edx, 90h mov rdi, r15 call _memcpy jmp loc_21131 loc_213E9: mov rdi, r15 mov rsi, r15 mov rdx, r12 call POINTonE1_dadd_affine jmp loc_21131 loc_213FC: lea r14, [rbp+var_300] mov ecx, 8 mov rdi, r14 call miller_loop_n lea rdi, [rbx+18h] mov rsi, rdi mov rdx, r14 call mul_fp12 loc_2141F: xor eax, eax loc_21421: mov [rbx+4], eax mov eax, 3 mov cl, 1 loc_2142B: test cl, cl jz short loc_21431 loc_2142F: xor eax, eax loc_21431: add rsp, 2D8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long PAIRING_Aggregate_PK_in_G2( long long a1, long long a2, long long a3, const void *a4, long long a5, unsigned __int8 *a6, unsigned long long a7, long long a8, long long a9, long long a10, long long a11) { long long result; // rax long long v15; // r12 char v16; // cl long long is_zero_16x; // rax long long v18; // rax char *v19; // rdx long long v20; // r12 int v21; // eax long long v22; // rsi long long v23; // rdx char v24[96]; // [rsp+0h] [rbp-300h] BYREF _BYTE v25[96]; // [rsp+60h] [rbp-2A0h] BYREF _BYTE v26[384]; // [rsp+C0h] [rbp-240h] BYREF _BYTE v27[144]; // [rsp+240h] [rbp-C0h] BYREF unsigned __int8 *v28; // [rsp+2D0h] [rbp-30h] v28 = a6; result = 4LL; if ( (*(_DWORD *)a1 & 2) == 0 ) { *(_DWORD *)a1 |= 1u; if ( a4 && !vec_is_zero_16x(a4, 96LL) ) { qmemcpy(v24, a4, sizeof(v24)); is_zero_16x = vec_is_zero_16x(a4, 96LL); vec_select_48(v25, a4, &BLS12_381_Rx, is_zero_16x); if ( a5 && !POINTonE1_in_G1(v24) ) return 3LL; if ( (*(_DWORD *)a1 & 0x10) != 0 ) { if ( a7 == 0 || v28 == 0LL ) { POINTonE1_dadd_affine(a1 + 600, a1 + 600, (long long)a4); } else { POINTonE1_mult_w5((long long)v24, (long long)v24, v28, a7); POINTonE1_dadd(a1 + 600, a1 + 600, (long long)v24, 0LL); } } else { *(_DWORD *)a1 |= 0x10u; if ( a7 == 0 || v28 == 0LL ) memcpy(a1 + 600, v24, 144LL); else POINTonE1_mult_w5(a1 + 600, (long long)v24, v28, a7); } } if ( !a2 ) return 0LL; v15 = a1 + 3192; if ( *(_QWORD *)(a1 + 8) != 42LL ) v15 = *(_QWORD *)(a1 + 8); if ( vec_is_zero_16x(a2, 192LL) ) { result = 6LL; v16 = 0; } else if ( a3 && (memcpy(v24, a2, 192LL), v18 = vec_is_zero_16x(a2, 192LL), vec_select_96(v26, a2, &BLS12_381_Rx, v18), !POINTonE2_in_G2((long long)v24)) ) { v16 = 0; result = 3LL; } else { if ( (*(_BYTE *)a1 & 0x40) != 0 ) { hash_to_field((unsigned int)v24, 2, a10, a11, a8, a9, v15, *(_QWORD *)(a1 + 16)); v19 = &v24[48]; } else { hash_to_field((unsigned int)v24, 1, a10, a11, a8, a9, v15, *(_QWORD *)(a1 + 16)); v19 = 0LL; } map_to_g1((long long)v27, (long long)v24, (long long)v19); if ( a7 != 0 && v28 != 0LL ) POINTonE1_mult_w5((long long)v27, (long long)v27, v28, a7); POINTonE1_from_Jacobian((long long)v27, (long long)v27); v20 = *(unsigned int *)(a1 + 4); memcpy(a1 + 192 * v20 + 888, a2, 192LL); qmemcpy((void *)(a1 + 96 * v20 + 2424), v27, 0x60uLL); v21 = v20 + 1; if ( (_DWORD)v20 == 7 ) { v22 = a1 + 888; v23 = a1 + 2424; if ( (*(_BYTE *)a1 & 0x20) != 0 ) { miller_loop_n((long long)v24, v22, v23, 8LL); mul_fp12(a1 + 24, a1 + 24, (long long)v24); } else { miller_loop_n(a1 + 24, v22, v23, 8LL); *(_BYTE *)a1 |= 0x20u; } v21 = 0; } *(_DWORD *)(a1 + 4) = v21; result = 3LL; v16 = 1; } if ( v16 ) return 0LL; } return result; }
PAIRING_Aggregate_PK_in_G2: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x2d8 MOV qword ptr [RBP + -0x30],R9 MOV R12,RCX MOV ECX,dword ptr [RDI] MOV EAX,0x4 TEST CL,0x2 JNZ 0x00121431 MOV R13,RDX MOV R14,RSI MOV RBX,RDI OR ECX,0x1 MOV dword ptr [RDI],ECX TEST R12,R12 JZ 0x00121131 MOV R15,R8 MOV ESI,0x60 MOV RDI,R12 CALL 0x00130680 TEST RAX,RAX JZ 0x0012116f LAB_00121131: TEST R14,R14 JZ 0x0012142f MOV RAX,qword ptr [RBX + 0x8] LEA R12,[RBX + 0xc78] CMP RAX,0x2a CMOVNZ R12,RAX MOV ESI,0xc0 MOV RDI,R14 CALL 0x00130680 TEST RAX,RAX JZ 0x00121209 MOV EAX,0x6 XOR ECX,ECX JMP 0x0012142b LAB_0012116f: LEA RDI,[RBP + -0x300] MOV ECX,0xc MOV RSI,R12 MOVSQ.REP RDI,RSI MOV ESI,0x60 MOV RDI,R12 CALL 0x00130680 LEA RDX,[0x13fb58] LEA RDI,[RBP + -0x2a0] MOV RSI,R12 MOV RCX,RAX CALL 0x0012ffe0 TEST R15,R15 JZ 0x001211c1 LEA RDI,[RBP + -0x300] CALL 0x0011bed0 TEST RAX,RAX JZ 0x001213c0 LAB_001211c1: LEA R15,[RBX + 0x258] MOV EAX,dword ptr [RBX] TEST AL,0x10 JNZ 0x001212a1 OR EAX,0x10 MOV dword ptr [RBX],EAX MOV RCX,qword ptr [RBP + 0x10] TEST RCX,RCX SETZ AL MOV RDX,qword ptr [RBP + -0x30] TEST RDX,RDX SETZ SIL OR SIL,AL JNZ 0x001213d0 LEA RSI,[RBP + -0x300] MOV RDI,R15 CALL 0x0011b770 JMP 0x00121131 LAB_00121209: TEST R13,R13 JZ 0x0012125f LEA R15,[RBP + -0x300] MOV EDX,0xc0 MOV RDI,R15 MOV RSI,R14 CALL 0x00105060 LEA R13,[RBP + -0x240] MOV ESI,0xc0 MOV RDI,R14 CALL 0x00130680 LEA RDX,[0x13fb58] MOV RDI,R13 MOV RSI,R14 MOV RCX,RAX CALL 0x00130060 MOV RDI,R15 CALL 0x0011f18b TEST RAX,RAX JZ 0x001213c7 LAB_0012125f: MOV RCX,qword ptr [RBP + 0x30] MOV RDX,qword ptr [RBP + 0x28] MOV R9,qword ptr [RBP + 0x20] MOV R8,qword ptr [RBP + 0x18] TEST byte ptr [RBX],0x40 MOV RAX,qword ptr [RBX + 0x10] LEA R15,[RBP + -0x300] JNZ 0x001212e6 MOV ESI,0x1 MOV RDI,R15 PUSH RAX PUSH R12 CALL 0x00126dc2 ADD RSP,0x10 LEA RDI,[RBP + -0xc0] MOV RSI,R15 XOR EDX,EDX JMP 0x0012130b LAB_001212a1: MOV RCX,qword ptr [RBP + 0x10] TEST RCX,RCX SETZ AL MOV RDX,qword ptr [RBP + -0x30] TEST RDX,RDX SETZ SIL OR SIL,AL JNZ 0x001213e9 LEA R12,[RBP + -0x300] MOV RDI,R12 MOV RSI,R12 CALL 0x0011b770 MOV RDI,R15 MOV RSI,R15 MOV RDX,R12 XOR ECX,ECX CALL 0x0011a05e JMP 0x00121131 LAB_001212e6: MOV ESI,0x2 MOV RDI,R15 PUSH RAX PUSH R12 CALL 0x00126dc2 ADD RSP,0x10 LEA RDX,[RBP + -0x2d0] LEA RDI,[RBP + -0xc0] MOV RSI,R15 LAB_0012130b: CALL 0x0011b9f5 MOV RCX,qword ptr [RBP + 0x10] TEST RCX,RCX SETZ AL MOV RDX,qword ptr [RBP + -0x30] TEST RDX,RDX SETZ SIL OR SIL,AL JNZ 0x00121339 LEA RDI,[RBP + -0xc0] MOV RSI,RDI CALL 0x0011b770 LAB_00121339: LEA R15,[RBP + -0xc0] MOV RDI,R15 MOV RSI,R15 CALL 0x001192c4 MOV R12D,dword ptr [RBX + 0x4] LEA R13,[R12 + R12*0x2] MOV RAX,R13 SHL RAX,0x6 LEA RDI,[RBX + RAX*0x1] ADD RDI,0x378 MOV EDX,0xc0 MOV RSI,R14 CALL 0x00105060 SHL R13,0x5 LEA RDI,[RBX + R13*0x1] ADD RDI,0x978 MOV ECX,0xc MOV RSI,R15 MOVSQ.REP RDI,RSI LEA EAX,[R12 + 0x1] CMP EAX,0x8 JNZ 0x00121421 LEA RSI,[RBX + 0x378] LEA RDX,[RBX + 0x978] TEST byte ptr [RBX],0x20 JNZ 0x001213fc LEA RDI,[RBX + 0x18] MOV ECX,0x8 CALL 0x0012043d OR byte ptr [RBX],0x20 JMP 0x0012141f LAB_001213c0: MOV EAX,0x3 JMP 0x00121431 LAB_001213c7: XOR ECX,ECX MOV EAX,0x3 JMP 0x0012142b LAB_001213d0: LEA RSI,[RBP + -0x300] MOV EDX,0x90 MOV RDI,R15 CALL 0x00105060 JMP 0x00121131 LAB_001213e9: MOV RDI,R15 MOV RSI,R15 MOV RDX,R12 CALL 0x0011a723 JMP 0x00121131 LAB_001213fc: LEA R14,[RBP + -0x300] MOV ECX,0x8 MOV RDI,R14 CALL 0x0012043d LEA RDI,[RBX + 0x18] MOV RSI,RDI MOV RDX,R14 CALL 0x0011f662 LAB_0012141f: XOR EAX,EAX LAB_00121421: MOV dword ptr [RBX + 0x4],EAX MOV EAX,0x3 MOV CL,0x1 LAB_0012142b: TEST CL,CL JZ 0x00121431 LAB_0012142f: XOR EAX,EAX LAB_00121431: ADD RSP,0x2d8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 PAIRING_Aggregate_PK_in_G2 (uint *param_1,void *param_2,long param_3,int8 *param_4,long param_5,long param_6, long param_7,int8 param_8,int8 param_9,int8 param_10,int8 param_11 ) { bool bVar1; uint uVar2; long lVar3; int8 uVar4; int1 *puVar5; int8 *puVar6; int8 *puVar7; uint *puVar8; byte bVar9; int8 local_308 [6]; int1 local_2d8 [48]; int1 local_2a8 [96]; int1 local_248 [384]; int8 local_c8 [18]; long local_38; bVar9 = 0; if ((*param_1 & 2) != 0) { return 4; } *param_1 = *param_1 | 1; local_38 = param_6; if ((param_4 != (int8 *)0x0) && (lVar3 = vec_is_zero_16x(param_4,0x60), lVar3 == 0)) { puVar6 = param_4; puVar7 = local_308; for (lVar3 = 0xc; lVar3 != 0; lVar3 = lVar3 + -1) { *puVar7 = *puVar6; puVar6 = puVar6 + (ulong)bVar9 * -2 + 1; puVar7 = puVar7 + (ulong)bVar9 * -2 + 1; } uVar4 = vec_is_zero_16x(param_4,0x60); vec_select_48(local_2a8,param_4,&BLS12_381_Rx,uVar4); if ((param_5 != 0) && (lVar3 = POINTonE1_in_G1(local_308), lVar3 == 0)) { return 3; } puVar8 = param_1 + 0x96; if ((*param_1 & 0x10) == 0) { *param_1 = *param_1 | 0x10; if (local_38 == 0 || param_7 == 0) { memcpy(puVar8,local_308,0x90); } else { POINTonE1_mult_w5(puVar8,local_308); } } else if (local_38 == 0 || param_7 == 0) { POINTonE1_dadd_affine(puVar8,puVar8,param_4); } else { POINTonE1_mult_w5(local_308,local_308); POINTonE1_dadd(puVar8,puVar8,local_308); } } if (param_2 == (void *)0x0) { return 0; } puVar8 = param_1 + 0x31e; if (*(uint **)(param_1 + 2) != (uint *)0x2a) { puVar8 = *(uint **)(param_1 + 2); } lVar3 = vec_is_zero_16x(param_2,0xc0); if (lVar3 == 0) { if (param_3 != 0) { memcpy(local_308,param_2,0xc0); vec_is_zero_16x(param_2,0xc0); vec_select_96(local_248,param_2,&BLS12_381_Rx); lVar3 = POINTonE2_in_G2(local_308); if (lVar3 == 0) { bVar1 = false; uVar4 = 3; goto LAB_0012142b; } } if ((*param_1 & 0x40) == 0) { hash_to_field(local_308,1,param_10,param_11,param_8,param_9,puVar8, *(int8 *)(param_1 + 4)); puVar5 = (int1 *)0x0; } else { hash_to_field(local_308,2,param_10,param_11,param_8,param_9,puVar8, *(int8 *)(param_1 + 4)); puVar5 = local_2d8; } map_to_g1(local_c8,local_308,puVar5); if (local_38 != 0 && param_7 != 0) { POINTonE1_mult_w5(local_c8,local_c8); } POINTonE1_from_Jacobian(local_c8,local_c8); uVar2 = param_1[1]; memcpy(param_1 + (ulong)uVar2 * 0x30 + 0xde,param_2,0xc0); puVar6 = local_c8; puVar8 = param_1 + (ulong)uVar2 * 0x18 + 0x25e; for (lVar3 = 0xc; lVar3 != 0; lVar3 = lVar3 + -1) { *(int8 *)puVar8 = *puVar6; puVar6 = puVar6 + (ulong)bVar9 * -2 + 1; puVar8 = puVar8 + (ulong)bVar9 * -4 + 2; } uVar2 = uVar2 + 1; if (uVar2 == 8) { if ((*param_1 & 0x20) == 0) { miller_loop_n(param_1 + 6,param_1 + 0xde,param_1 + 0x25e,8); *(byte *)param_1 = (byte)*param_1 | 0x20; } else { miller_loop_n(local_308,param_1 + 0xde,param_1 + 0x25e,8); mul_fp12(param_1 + 6,param_1 + 6,local_308); } uVar2 = 0; } param_1[1] = uVar2; uVar4 = 3; bVar1 = true; } else { uVar4 = 6; bVar1 = false; } LAB_0012142b: if (bVar1) { return 0; } return uVar4; }
21,710
ma_keydef_read
eloqsql/storage/maria/ma_open.c
uchar *_ma_keydef_read(uchar *ptr, MARIA_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->version = 0; /* Not saved */ keydef->parser = &ft_default_parser; keydef->ftkey_nr = 0; return ptr; }
O3
c
ma_keydef_read: pushq %rbp movq %rsp, %rbp movzbl (%rdi), %eax movw %ax, 0xa0(%rsi) movb 0x1(%rdi), %al movb %al, 0xa4(%rsi) movzwl 0x2(%rdi), %eax rolw $0x8, %ax movw %ax, 0xa2(%rsi) movzwl 0x4(%rdi), %eax rolw $0x8, %ax movw %ax, 0xa6(%rsi) movzwl 0x6(%rdi), %eax rolw $0x8, %ax movw %ax, 0xaa(%rsi) movzwl 0x8(%rdi), %eax rolw $0x8, %ax movw %ax, 0xac(%rsi) movzwl 0xa(%rdi), %eax rolw $0x8, %ax movw %ax, 0xae(%rsi) leaq 0xc(%rdi), %rax movq $0x0, 0xb8(%rsi) leaq 0x354007(%rip), %rcx # 0x3adc70 movq %rcx, 0xd0(%rsi) popq %rbp retq
_ma_keydef_read: push rbp mov rbp, rsp movzx eax, byte ptr [rdi] mov [rsi+0A0h], ax mov al, [rdi+1] mov [rsi+0A4h], al movzx eax, word ptr [rdi+2] rol ax, 8 mov [rsi+0A2h], ax movzx eax, word ptr [rdi+4] rol ax, 8 mov [rsi+0A6h], ax movzx eax, word ptr [rdi+6] rol ax, 8 mov [rsi+0AAh], ax movzx eax, word ptr [rdi+8] rol ax, 8 mov [rsi+0ACh], ax movzx eax, word ptr [rdi+0Ah] rol ax, 8 mov [rsi+0AEh], ax lea rax, [rdi+0Ch] mov qword ptr [rsi+0B8h], 0 lea rcx, ft_default_parser mov [rsi+0D0h], rcx pop rbp retn
unsigned __int8 * ma_keydef_read(unsigned __int8 *a1, long long a2) { unsigned __int8 *result; // rax *(_WORD *)(a2 + 160) = *a1; *(_BYTE *)(a2 + 164) = a1[1]; *(_WORD *)(a2 + 162) = __ROL2__(*((_WORD *)a1 + 1), 8); *(_WORD *)(a2 + 166) = __ROL2__(*((_WORD *)a1 + 2), 8); *(_WORD *)(a2 + 170) = __ROL2__(*((_WORD *)a1 + 3), 8); *(_WORD *)(a2 + 172) = __ROL2__(*((_WORD *)a1 + 4), 8); *(_WORD *)(a2 + 174) = __ROL2__(*((_WORD *)a1 + 5), 8); result = a1 + 12; *(_QWORD *)(a2 + 184) = 0LL; *(_QWORD *)(a2 + 208) = &ft_default_parser; return result; }
_ma_keydef_read: PUSH RBP MOV RBP,RSP MOVZX EAX,byte ptr [RDI] MOV word ptr [RSI + 0xa0],AX MOV AL,byte ptr [RDI + 0x1] MOV byte ptr [RSI + 0xa4],AL MOVZX EAX,word ptr [RDI + 0x2] ROL AX,0x8 MOV word ptr [RSI + 0xa2],AX MOVZX EAX,word ptr [RDI + 0x4] ROL AX,0x8 MOV word ptr [RSI + 0xa6],AX MOVZX EAX,word ptr [RDI + 0x6] ROL AX,0x8 MOV word ptr [RSI + 0xaa],AX MOVZX EAX,word ptr [RDI + 0x8] ROL AX,0x8 MOV word ptr [RSI + 0xac],AX MOVZX EAX,word ptr [RDI + 0xa] ROL AX,0x8 MOV word ptr [RSI + 0xae],AX LEA RAX,[RDI + 0xc] MOV qword ptr [RSI + 0xb8],0x0 LEA RCX,[0x4adc70] MOV qword ptr [RSI + 0xd0],RCX POP RBP RET
byte * _ma_keydef_read(byte *param_1,long param_2) { *(ushort *)(param_2 + 0xa0) = (ushort)*param_1; *(byte *)(param_2 + 0xa4) = param_1[1]; *(ushort *)(param_2 + 0xa2) = *(ushort *)(param_1 + 2) << 8 | *(ushort *)(param_1 + 2) >> 8; *(ushort *)(param_2 + 0xa6) = *(ushort *)(param_1 + 4) << 8 | *(ushort *)(param_1 + 4) >> 8; *(ushort *)(param_2 + 0xaa) = *(ushort *)(param_1 + 6) << 8 | *(ushort *)(param_1 + 6) >> 8; *(ushort *)(param_2 + 0xac) = *(ushort *)(param_1 + 8) << 8 | *(ushort *)(param_1 + 8) >> 8; *(ushort *)(param_2 + 0xae) = *(ushort *)(param_1 + 10) << 8 | *(ushort *)(param_1 + 10) >> 8; *(int8 *)(param_2 + 0xb8) = 0; *(int1 **)(param_2 + 0xd0) = ft_default_parser; return param_1 + 0xc; }
21,711
ma_alloc_root
eloqsql/libmariadb/libmariadb/ma_alloc.c
void * ma_alloc_root(MA_MEM_ROOT *mem_root, size_t Size) { #if defined(HAVE_purify) && defined(EXTRA_DEBUG) reg1 MA_USED_MEM *next; Size+=ALIGN_SIZE(sizeof(MA_USED_MEM)); if (!(next = (MA_USED_MEM*) malloc(Size))) { if (mem_root->error_handler) (*mem_root->error_handler)(); return((void *) 0); /* purecov: inspected */ } next->next=mem_root->used; mem_root->used=next; return (void *) (((char*) next)+ALIGN_SIZE(sizeof(MA_USED_MEM))); #else size_t get_size; void * point; reg1 MA_USED_MEM *next= 0; reg2 MA_USED_MEM **prev; Size= ALIGN_SIZE(Size); if ((*(prev= &mem_root->free))) { if ((*prev)->left < Size && mem_root->first_block_usage++ >= 16 && (*prev)->left < 4096) { next= *prev; *prev= next->next; next->next= mem_root->used; mem_root->used= next; mem_root->first_block_usage= 0; } for (next= *prev; next && next->left < Size; next= next->next) prev= &next->next; } if (! next) { /* Time to alloc new block */ get_size= MAX(Size+ALIGN_SIZE(sizeof(MA_USED_MEM)), (mem_root->block_size & ~1) * (mem_root->block_num >> 2)); if (!(next = (MA_USED_MEM*) malloc(get_size))) { if (mem_root->error_handler) (*mem_root->error_handler)(); return((void *) 0); /* purecov: inspected */ } mem_root->block_num++; next->next= *prev; next->size= get_size; next->left= get_size-ALIGN_SIZE(sizeof(MA_USED_MEM)); *prev=next; } point= (void *) ((char*) next+ (next->size-next->left)); if ((next->left-= Size) < mem_root->min_malloc) { /* Full block */ *prev=next->next; /* Remove block from list */ next->next=mem_root->used; mem_root->used=next; mem_root->first_block_usage= 0; } return(point); #endif }
O0
c
ma_alloc_root: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq $0x0, -0x30(%rbp) movq -0x18(%rbp), %rax addq $0x8, %rax subq $0x1, %rax andq $-0x8, %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) cmpq $0x0, (%rax) je 0x8952c movq -0x38(%rbp), %rax movq (%rax), %rax movq 0x8(%rax), %rax cmpq -0x18(%rbp), %rax jae 0x894e3 movq -0x10(%rbp), %rcx movl 0x2c(%rcx), %eax movl %eax, %edx addl $0x1, %edx movl %edx, 0x2c(%rcx) cmpl $0x10, %eax jb 0x894e3 movq -0x38(%rbp), %rax movq (%rax), %rax cmpq $0x1000, 0x8(%rax) # imm = 0x1000 jae 0x894e3 movq -0x38(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq (%rax), %rcx movq -0x38(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq -0x30(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x2c(%rax) movq -0x38(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) xorl %eax, %eax cmpq $0x0, -0x30(%rbp) movb %al, -0x39(%rbp) je 0x8950c movq -0x30(%rbp), %rax movq 0x8(%rax), %rax cmpq -0x18(%rbp), %rax setb %al movb %al, -0x39(%rbp) movb -0x39(%rbp), %al testb $0x1, %al jne 0x89515 jmp 0x8952a movq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) jmp 0x894ee jmp 0x8952c cmpq $0x0, -0x30(%rbp) jne 0x8960a movq -0x18(%rbp), %rax addq $0x18, %rax movq -0x10(%rbp), %rcx movq 0x20(%rcx), %rcx andq $-0x2, %rcx movq -0x10(%rbp), %rdx movl 0x28(%rdx), %edx shrl $0x2, %edx movl %edx, %edx imulq %rdx, %rcx cmpq %rcx, %rax jbe 0x8956e movq -0x18(%rbp), %rax addq $0x18, %rax movq %rax, -0x48(%rbp) jmp 0x8958e movq -0x10(%rbp), %rax movq 0x20(%rax), %rax andq $-0x2, %rax movq -0x10(%rbp), %rcx movl 0x28(%rcx), %ecx shrl $0x2, %ecx movl %ecx, %ecx imulq %rcx, %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rdi callq 0x60aa0 movq %rax, -0x30(%rbp) cmpq $0x0, %rax jne 0x895c8 movq -0x10(%rbp), %rax cmpq $0x0, 0x30(%rax) je 0x895bb movq -0x10(%rbp), %rax callq *0x30(%rax) movq $0x0, -0x8(%rbp) jmp 0x8967e movq -0x10(%rbp), %rax movl 0x28(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x28(%rax) movq -0x38(%rbp), %rax movq (%rax), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq -0x20(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x20(%rbp), %rcx subq $0x18, %rcx movq -0x30(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x30(%rbp), %rcx movq -0x38(%rbp), %rax movq %rcx, (%rax) movq -0x30(%rbp), %rax movq -0x30(%rbp), %rcx movq 0x10(%rcx), %rcx movq -0x30(%rbp), %rdx subq 0x8(%rdx), %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rdx movq -0x30(%rbp), %rcx movq 0x8(%rcx), %rax subq %rdx, %rax movq %rax, 0x8(%rcx) movq -0x10(%rbp), %rcx cmpq 0x18(%rcx), %rax jae 0x89676 movq -0x30(%rbp), %rax movq (%rax), %rcx movq -0x38(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq -0x30(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x2c(%rax) movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopl (%rax,%rax)
ma_alloc_root: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_30], 0 mov rax, [rbp+var_18] add rax, 8 sub rax, 1 and rax, 0FFFFFFFFFFFFFFF8h mov [rbp+var_18], rax mov rax, [rbp+var_10] mov [rbp+var_38], rax cmp qword ptr [rax], 0 jz loc_8952C mov rax, [rbp+var_38] mov rax, [rax] mov rax, [rax+8] cmp rax, [rbp+var_18] jnb short loc_894E3 mov rcx, [rbp+var_10] mov eax, [rcx+2Ch] mov edx, eax add edx, 1 mov [rcx+2Ch], edx cmp eax, 10h jb short loc_894E3 mov rax, [rbp+var_38] mov rax, [rax] cmp qword ptr [rax+8], 1000h jnb short loc_894E3 mov rax, [rbp+var_38] mov rax, [rax] mov [rbp+var_30], rax mov rax, [rbp+var_30] mov rcx, [rax] mov rax, [rbp+var_38] mov [rax], rcx mov rax, [rbp+var_10] mov rcx, [rax+8] mov rax, [rbp+var_30] mov [rax], rcx mov rcx, [rbp+var_30] mov rax, [rbp+var_10] mov [rax+8], rcx mov rax, [rbp+var_10] mov dword ptr [rax+2Ch], 0 loc_894E3: mov rax, [rbp+var_38] mov rax, [rax] mov [rbp+var_30], rax loc_894EE: xor eax, eax cmp [rbp+var_30], 0 mov [rbp+var_39], al jz short loc_8950C mov rax, [rbp+var_30] mov rax, [rax+8] cmp rax, [rbp+var_18] setb al mov [rbp+var_39], al loc_8950C: mov al, [rbp+var_39] test al, 1 jnz short loc_89515 jmp short loc_8952A loc_89515: mov rax, [rbp+var_30] mov [rbp+var_38], rax mov rax, [rbp+var_30] mov rax, [rax] mov [rbp+var_30], rax jmp short loc_894EE loc_8952A: jmp short $+2 loc_8952C: cmp [rbp+var_30], 0 jnz loc_8960A mov rax, [rbp+var_18] add rax, 18h mov rcx, [rbp+var_10] mov rcx, [rcx+20h] and rcx, 0FFFFFFFFFFFFFFFEh mov rdx, [rbp+var_10] mov edx, [rdx+28h] shr edx, 2 mov edx, edx imul rcx, rdx cmp rax, rcx jbe short loc_8956E mov rax, [rbp+var_18] add rax, 18h mov [rbp+var_48], rax jmp short loc_8958E loc_8956E: mov rax, [rbp+var_10] mov rax, [rax+20h] and rax, 0FFFFFFFFFFFFFFFEh mov rcx, [rbp+var_10] mov ecx, [rcx+28h] shr ecx, 2 mov ecx, ecx imul rax, rcx mov [rbp+var_48], rax loc_8958E: mov rax, [rbp+var_48] mov [rbp+var_20], rax mov rdi, [rbp+var_20] call _malloc mov [rbp+var_30], rax cmp rax, 0 jnz short loc_895C8 mov rax, [rbp+var_10] cmp qword ptr [rax+30h], 0 jz short loc_895BB mov rax, [rbp+var_10] call qword ptr [rax+30h] loc_895BB: mov [rbp+var_8], 0 jmp loc_8967E loc_895C8: mov rax, [rbp+var_10] mov ecx, [rax+28h] add ecx, 1 mov [rax+28h], ecx mov rax, [rbp+var_38] mov rcx, [rax] mov rax, [rbp+var_30] mov [rax], rcx mov rcx, [rbp+var_20] mov rax, [rbp+var_30] mov [rax+10h], rcx mov rcx, [rbp+var_20] sub rcx, 18h mov rax, [rbp+var_30] mov [rax+8], rcx mov rcx, [rbp+var_30] mov rax, [rbp+var_38] mov [rax], rcx loc_8960A: mov rax, [rbp+var_30] mov rcx, [rbp+var_30] mov rcx, [rcx+10h] mov rdx, [rbp+var_30] sub rcx, [rdx+8] add rax, rcx mov [rbp+var_28], rax mov rdx, [rbp+var_18] mov rcx, [rbp+var_30] mov rax, [rcx+8] sub rax, rdx mov [rcx+8], rax mov rcx, [rbp+var_10] cmp rax, [rcx+18h] jnb short loc_89676 mov rax, [rbp+var_30] mov rcx, [rax] mov rax, [rbp+var_38] mov [rax], rcx mov rax, [rbp+var_10] mov rcx, [rax+8] mov rax, [rbp+var_30] mov [rax], rcx mov rcx, [rbp+var_30] mov rax, [rbp+var_10] mov [rax+8], rcx mov rax, [rbp+var_10] mov dword ptr [rax+2Ch], 0 loc_89676: mov rax, [rbp+var_28] mov [rbp+var_8], rax loc_8967E: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
char * ma_alloc_root(_QWORD **a1, long long a2) { unsigned int v2; // eax unsigned long long v3; // rax unsigned long long v5; // [rsp+8h] [rbp-48h] bool v6; // [rsp+17h] [rbp-39h] _QWORD *v7; // [rsp+18h] [rbp-38h] _QWORD *i; // [rsp+20h] [rbp-30h] _QWORD *v9; // [rsp+20h] [rbp-30h] char *v10; // [rsp+28h] [rbp-28h] unsigned long long v11; // [rsp+38h] [rbp-18h] i = 0LL; v11 = (a2 + 7) & 0xFFFFFFFFFFFFFFF8LL; v7 = a1; if ( *a1 ) { if ( (*a1)[1] < v11 ) { v2 = *((_DWORD *)a1 + 11); *((_DWORD *)a1 + 11) = v2 + 1; if ( v2 >= 0x10 && (*a1)[1] < 0x1000uLL ) { v9 = *a1; *a1 = (_QWORD *)**a1; *v9 = a1[1]; a1[1] = v9; *((_DWORD *)a1 + 11) = 0; } } for ( i = *a1; ; i = (_QWORD *)*i ) { v6 = 0; if ( i ) v6 = i[1] < v11; if ( !v6 ) break; v7 = i; } } if ( !i ) { if ( v11 + 24 <= (*((_DWORD *)a1 + 10) >> 2) * ((unsigned long long)a1[4] & 0xFFFFFFFFFFFFFFFELL) ) v5 = (*((_DWORD *)a1 + 10) >> 2) * ((unsigned long long)a1[4] & 0xFFFFFFFFFFFFFFFELL); else v5 = v11 + 24; i = (_QWORD *)malloc(v5); if ( !i ) { if ( a1[6] ) ((void (*)(void))a1[6])(); return 0LL; } ++*((_DWORD *)a1 + 10); *i = *v7; i[2] = v5; i[1] = v5 - 24; *v7 = i; } v10 = (char *)i + i[2] - i[1]; v3 = i[1] - v11; i[1] = v3; if ( v3 < (unsigned long long)a1[3] ) { *v7 = *i; *i = a1[1]; a1[1] = i; *((_DWORD *)a1 + 11) = 0; } return v10; }
ma_alloc_root: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x30],0x0 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x8 SUB RAX,0x1 AND RAX,-0x8 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RAX],0x0 JZ 0x0018952c MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x18] JNC 0x001894e3 MOV RCX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RCX + 0x2c] MOV EDX,EAX ADD EDX,0x1 MOV dword ptr [RCX + 0x2c],EDX CMP EAX,0x10 JC 0x001894e3 MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x8],0x1000 JNC 0x001894e3 MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x2c],0x0 LAB_001894e3: MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX LAB_001894ee: XOR EAX,EAX CMP qword ptr [RBP + -0x30],0x0 MOV byte ptr [RBP + -0x39],AL JZ 0x0018950c MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x18] SETC AL MOV byte ptr [RBP + -0x39],AL LAB_0018950c: MOV AL,byte ptr [RBP + -0x39] TEST AL,0x1 JNZ 0x00189515 JMP 0x0018952a LAB_00189515: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX JMP 0x001894ee LAB_0018952a: JMP 0x0018952c LAB_0018952c: CMP qword ptr [RBP + -0x30],0x0 JNZ 0x0018960a MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x18 MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x20] AND RCX,-0x2 MOV RDX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RDX + 0x28] SHR EDX,0x2 MOV EDX,EDX IMUL RCX,RDX CMP RAX,RCX JBE 0x0018956e MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x18 MOV qword ptr [RBP + -0x48],RAX JMP 0x0018958e LAB_0018956e: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] AND RAX,-0x2 MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x28] SHR ECX,0x2 MOV ECX,ECX IMUL RAX,RCX MOV qword ptr [RBP + -0x48],RAX LAB_0018958e: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x00160aa0 MOV qword ptr [RBP + -0x30],RAX CMP RAX,0x0 JNZ 0x001895c8 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x30],0x0 JZ 0x001895bb MOV RAX,qword ptr [RBP + -0x10] CALL qword ptr [RAX + 0x30] LAB_001895bb: MOV qword ptr [RBP + -0x8],0x0 JMP 0x0018967e LAB_001895c8: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x28] ADD ECX,0x1 MOV dword ptr [RAX + 0x28],ECX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x20] SUB RCX,0x18 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],RCX LAB_0018960a: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RCX + 0x10] MOV RDX,qword ptr [RBP + -0x30] SUB RCX,qword ptr [RDX + 0x8] ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RCX + 0x8] SUB RAX,RDX MOV qword ptr [RCX + 0x8],RAX MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x18] JNC 0x00189676 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x2c],0x0 LAB_00189676: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX LAB_0018967e: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
long ma_alloc_root(long *param_1,long param_2) { uint uVar1; long *plVar2; long lVar3; long lVar4; long lVar5; ulong uVar6; bool bVar7; size_t local_50; long *local_40; long *local_38; local_38 = (long *)0x0; uVar6 = param_2 + 7U & 0xfffffffffffffff8; local_40 = param_1; if (*param_1 != 0) { if (((*(ulong *)(*param_1 + 8) < uVar6) && (uVar1 = *(uint *)((long)param_1 + 0x2c), *(uint *)((long)param_1 + 0x2c) = uVar1 + 1, 0xf < uVar1)) && (*(ulong *)(*param_1 + 8) < 0x1000)) { plVar2 = (long *)*param_1; *param_1 = *plVar2; *plVar2 = param_1[1]; param_1[1] = (long)plVar2; *(int4 *)((long)param_1 + 0x2c) = 0; } local_38 = (long *)*param_1; while( true ) { bVar7 = false; if (local_38 != (long *)0x0) { bVar7 = (ulong)local_38[1] < uVar6; } if (!bVar7) break; local_40 = local_38; local_38 = (long *)*local_38; } } if (local_38 == (long *)0x0) { if ((param_1[4] & 0xfffffffffffffffeU) * (ulong)(*(uint *)(param_1 + 5) >> 2) < uVar6 + 0x18) { local_50 = uVar6 + 0x18; } else { local_50 = (param_1[4] & 0xfffffffffffffffeU) * (ulong)(*(uint *)(param_1 + 5) >> 2); } local_38 = (long *)malloc(local_50); if (local_38 == (long *)0x0) { if (param_1[6] != 0) { (*(code *)param_1[6])(); } return 0; } *(int *)(param_1 + 5) = (int)param_1[5] + 1; *local_38 = *local_40; local_38[2] = local_50; local_38[1] = local_50 - 0x18; *local_40 = (long)local_38; } lVar3 = local_38[2]; lVar4 = local_38[1]; lVar5 = local_38[1]; local_38[1] = lVar5 - uVar6; if (lVar5 - uVar6 < (ulong)param_1[3]) { *local_40 = *local_38; *local_38 = param_1[1]; param_1[1] = (long)local_38; *(int4 *)((long)param_1 + 0x2c) = 0; } return (long)local_38 + (lVar3 - lVar4); }
21,712
my_uuid
eloqsql/mysys/my_uuid.c
void my_uuid(uchar *to) { ulonglong tv; uint32 time_low; uint16 time_mid, time_hi_and_version; DBUG_ASSERT(my_uuid_inited); mysql_mutex_lock(&LOCK_uuid_generator); tv= my_interval_timer()/100 + interval_timer_offset + nanoseq; if (likely(tv > uuid_time)) { /* Current time is ahead of last timestamp, as it should be. If we "borrowed time", give it back, just as long as we stay ahead of the previous timestamp. */ if (nanoseq) { ulong delta; DBUG_ASSERT((tv > uuid_time) && (nanoseq > 0)); /* -1 so we won't make tv= uuid_time for nanoseq >= (tv - uuid_time) */ delta= MY_MIN(nanoseq, (ulong)(tv - uuid_time -1)); tv-= delta; nanoseq-= delta; } } else { if (unlikely(tv == uuid_time)) { /* For low-res system clocks. If several requests for UUIDs end up on the same tick, we add a nano-second to make them different. ( current_timestamp + nanoseq * calls_in_this_period ) may end up > next_timestamp; this is OK. Nonetheless, we'll try to unwind nanoseq when we get a chance to. If nanoseq overflows, we'll start over with a new numberspace (so the if() below is needed so we can avoid the ++tv and thus match the follow-up if() if nanoseq overflows!). */ if (likely(++nanoseq)) ++tv; } if (unlikely(tv <= uuid_time)) { /* If the admin changes the system clock (or due to Daylight Saving Time), the system clock may be turned *back* so we go through a period once more for which we already gave out UUIDs. To avoid duplicate UUIDs despite potentially identical times, we make a new random component. We also come here if the nanoseq "borrowing" overflows. In either case, we throw away any nanoseq borrowing since it's irrelevant in the new numberspace. */ set_clock_seq(); tv= my_interval_timer()/100 + interval_timer_offset; nanoseq= 0; DBUG_PRINT("uuid",("making new numberspace")); } } uuid_time=tv; mysql_mutex_unlock(&LOCK_uuid_generator); time_low= (uint32) (tv & 0xFFFFFFFF); time_mid= (uint16) ((tv >> 32) & 0xFFFF); time_hi_and_version= (uint16) ((tv >> 48) | UUID_VERSION); /* Note, that the standard does NOT specify byte ordering in multi-byte fields. it's implementation defined (but must be the same for all fields). We use big-endian, so we can use memcmp() to compare UUIDs and for straightforward UUID to string conversion. */ mi_int4store(to, time_low); mi_int2store(to+4, time_mid); mi_int2store(to+6, time_hi_and_version); bmove(to+8, uuid_suffix, sizeof(uuid_suffix)); }
O3
c
my_uuid: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx cmpq $0x0, 0xb62703(%rip) # 0xc08ab8 jne 0xa64a0 leaq 0xb626b6(%rip), %rdi # 0xc08a78 callq 0x29220 callq 0x9e534 shrq $0x2, %rax movabsq $0x28f5c28f5c28f5c3, %r15 # imm = 0x28F5C28F5C28F5C3 mulq %r15 movq %rdx, %r14 shrq $0x2, %r14 addq 0xb6265d(%rip), %r14 # 0xc08a48 movl 0xb6265f(%rip), %eax # 0xc08a50 addq %rax, %r14 movq 0xb626c5(%rip), %rcx # 0xc08ac0 cmpq %rcx, %r14 jbe 0xa64aa testq %rax, %rax je 0xa6421 notq %rcx addq %r14, %rcx cmpq %rax, %rcx cmovaeq %rax, %rcx subq %rcx, %r14 subl %ecx, %eax movl %eax, 0xb6262f(%rip) # 0xc08a50 movq %r14, 0xb62698(%rip) # 0xc08ac0 movq 0xb62689(%rip), %rdi # 0xc08ab8 testq %rdi, %rdi jne 0xa64db leaq 0xb62639(%rip), %rdi # 0xc08a78 callq 0x291e0 movq %r14, %rax shrq $0x20, %rax movq %r14, %rcx shrq $0x30, %rcx movl %r14d, %edx rolw $0x8, %dx movw %dx, 0x2(%rbx) movl %r14d, %edx shrl $0x10, %edx movb %dl, 0x1(%rbx) movl %r14d, %edx shrl $0x18, %edx movb %dl, (%rbx) movb %al, 0x5(%rbx) movq %r14, %rax shrq $0x28, %rax movb %al, 0x4(%rbx) movb %cl, 0x7(%rbx) shrq $0x38, %r14 orb $0x10, %r14b movb %r14b, 0x6(%rbx) movq 0xb625a7(%rip), %rax # 0xc08a38 movq %rax, 0x8(%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x2fca9 jmp 0xa63c7 je 0xa64f0 cmpq %rcx, %r14 ja 0xa6421 callq 0xa65cc callq 0x9e534 shrq $0x2, %rax mulq %r15 movq %rdx, %r14 shrq $0x2, %r14 addq 0xb62574(%rip), %r14 # 0xc08a48 xorl %eax, %eax jmp 0xa641b leaq 0x2dfb2e(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0xa6438 xorl %edx, %edx incl %eax movl %eax, 0xb62556(%rip) # 0xc08a50 setne %dl addq %rdx, %r14 jmp 0xa64ac
my_uuid: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi cmp cs:qword_C08AB8, 0 jnz loc_A64A0 lea rdi, LOCK_uuid_generator call _pthread_mutex_lock loc_A63C7: call my_interval_timer shr rax, 2 mov r15, 28F5C28F5C28F5C3h mul r15 mov r14, rdx shr r14, 2 add r14, cs:interval_timer_offset mov eax, cs:nanoseq add r14, rax mov rcx, cs:uuid_time cmp r14, rcx jbe loc_A64AA test rax, rax jz short loc_A6421 not rcx add rcx, r14 cmp rcx, rax cmovnb rcx, rax sub r14, rcx sub eax, ecx loc_A641B: mov cs:nanoseq, eax loc_A6421: mov cs:uuid_time, r14 mov rdi, cs:qword_C08AB8 test rdi, rdi jnz loc_A64DB loc_A6438: lea rdi, LOCK_uuid_generator call _pthread_mutex_unlock mov rax, r14 shr rax, 20h mov rcx, r14 shr rcx, 30h mov edx, r14d rol dx, 8 mov [rbx+2], dx mov edx, r14d shr edx, 10h mov [rbx+1], dl mov edx, r14d shr edx, 18h mov [rbx], dl mov [rbx+5], al mov rax, r14 shr rax, 28h mov [rbx+4], al mov [rbx+7], cl shr r14, 38h or r14b, 10h mov [rbx+6], r14b mov rax, cs:uuid_suffix mov [rbx+8], rax add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_A64A0: call my_uuid_cold_1 jmp loc_A63C7 loc_A64AA: jz short loc_A64F0 loc_A64AC: cmp r14, rcx ja loc_A6421 call set_clock_seq call my_interval_timer shr rax, 2 mul r15 mov r14, rdx shr r14, 2 add r14, cs:interval_timer_offset xor eax, eax jmp loc_A641B loc_A64DB: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_A6438 loc_A64F0: xor edx, edx inc eax mov cs:nanoseq, eax setnz dl add r14, rdx jmp short loc_A64AC
long long my_uuid(_WORD *a1) { _WORD *v1; // rbx unsigned long long v2; // r14 int v3; // eax unsigned long long v4; // r14 unsigned long long v5; // rcx int v6; // eax long long result; // rax v1 = a1; if ( qword_C08AB8 ) { my_uuid_cold_1(a1); } else { a1 = &LOCK_uuid_generator; pthread_mutex_lock(&LOCK_uuid_generator); } v2 = interval_timer_offset + my_interval_timer() / 0x64uLL; v3 = nanoseq; v4 = (unsigned int)nanoseq + v2; if ( v4 > uuid_time ) { if ( !nanoseq ) goto LABEL_9; v5 = v4 + ~uuid_time; if ( v5 >= (unsigned int)nanoseq ) v5 = (unsigned int)nanoseq; v4 -= v5; v6 = nanoseq - v5; goto LABEL_8; } if ( v4 == uuid_time ) { ++nanoseq; v4 += v3 != -1; } if ( v4 <= uuid_time ) { set_clock_seq(a1); v4 = interval_timer_offset + my_interval_timer() / 0x64uLL; v6 = 0; LABEL_8: nanoseq = v6; } LABEL_9: uuid_time = v4; if ( qword_C08AB8 ) ((void ( *)(long long))PSI_server[44])(qword_C08AB8); pthread_mutex_unlock(&LOCK_uuid_generator); v1[1] = __ROL2__(v4, 8); *((_BYTE *)v1 + 1) = BYTE2(v4); *(_BYTE *)v1 = BYTE3(v4); *((_BYTE *)v1 + 5) = BYTE4(v4); *((_BYTE *)v1 + 4) = BYTE5(v4); *((_BYTE *)v1 + 7) = BYTE6(v4); *((_BYTE *)v1 + 6) = HIBYTE(v4) | 0x10; result = uuid_suffix; *((_QWORD *)v1 + 1) = uuid_suffix; return result; }
my_uuid: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI CMP qword ptr [0x00d08ab8],0x0 JNZ 0x001a64a0 LEA RDI,[0xd08a78] CALL 0x00129220 LAB_001a63c7: CALL 0x0019e534 SHR RAX,0x2 MOV R15,0x28f5c28f5c28f5c3 MUL R15 MOV R14,RDX SHR R14,0x2 ADD R14,qword ptr [0x00d08a48] MOV EAX,dword ptr [0x00d08a50] ADD R14,RAX MOV RCX,qword ptr [0x00d08ac0] CMP R14,RCX JBE 0x001a64aa TEST RAX,RAX JZ 0x001a6421 NOT RCX ADD RCX,R14 CMP RCX,RAX CMOVNC RCX,RAX SUB R14,RCX SUB EAX,ECX LAB_001a641b: MOV dword ptr [0x00d08a50],EAX LAB_001a6421: MOV qword ptr [0x00d08ac0],R14 MOV RDI,qword ptr [0x00d08ab8] TEST RDI,RDI JNZ 0x001a64db LAB_001a6438: LEA RDI,[0xd08a78] CALL 0x001291e0 MOV RAX,R14 SHR RAX,0x20 MOV RCX,R14 SHR RCX,0x30 MOV EDX,R14D ROL DX,0x8 MOV word ptr [RBX + 0x2],DX MOV EDX,R14D SHR EDX,0x10 MOV byte ptr [RBX + 0x1],DL MOV EDX,R14D SHR EDX,0x18 MOV byte ptr [RBX],DL MOV byte ptr [RBX + 0x5],AL MOV RAX,R14 SHR RAX,0x28 MOV byte ptr [RBX + 0x4],AL MOV byte ptr [RBX + 0x7],CL SHR R14,0x38 OR R14B,0x10 MOV byte ptr [RBX + 0x6],R14B MOV RAX,qword ptr [0x00d08a38] MOV qword ptr [RBX + 0x8],RAX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_001a64a0: CALL 0x0012fca9 JMP 0x001a63c7 LAB_001a64aa: JZ 0x001a64f0 LAB_001a64ac: CMP R14,RCX JA 0x001a6421 CALL 0x001a65cc CALL 0x0019e534 SHR RAX,0x2 MUL R15 MOV R14,RDX SHR R14,0x2 ADD R14,qword ptr [0x00d08a48] XOR EAX,EAX JMP 0x001a641b LAB_001a64db: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001a6438 LAB_001a64f0: XOR EDX,EDX INC EAX MOV dword ptr [0x00d08a50],EAX SETNZ DL ADD R14,RDX JMP 0x001a64ac
void my_uuid(int1 *param_1) { ulong uVar1; ulong uVar2; ulong uVar3; if (LOCK_uuid_generator._64_8_ == 0) { pthread_mutex_lock((pthread_mutex_t *)LOCK_uuid_generator); } else { my_uuid_cold_1(); } uVar1 = my_interval_timer(); uVar2 = (ulong)nanoseq; uVar1 = uVar1 / 100 + interval_timer_offset + uVar2; if (uuid_time < uVar1) { if (uVar2 != 0) { uVar3 = ~uuid_time + uVar1; if (uVar2 <= ~uuid_time + uVar1) { uVar3 = uVar2; } uVar1 = uVar1 - uVar3; nanoseq = nanoseq - (int)uVar3; } } else { if (uVar1 == uuid_time) { nanoseq = nanoseq + 1; uVar1 = uVar1 + (nanoseq != 0); } if (uVar1 <= uuid_time) { set_clock_seq(); uVar1 = my_interval_timer(); uVar1 = uVar1 / 100 + interval_timer_offset; nanoseq = 0; } } uuid_time = uVar1; if (LOCK_uuid_generator._64_8_ != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)LOCK_uuid_generator); *(ushort *)(param_1 + 2) = (ushort)uVar1 << 8 | (ushort)uVar1 >> 8; param_1[1] = (char)(uVar1 >> 0x10); *param_1 = (char)(uVar1 >> 0x18); param_1[5] = (char)(uVar1 >> 0x20); param_1[4] = (char)(uVar1 >> 0x28); param_1[7] = (char)(uVar1 >> 0x30); param_1[6] = (byte)(uVar1 >> 0x38) | 0x10; *(int8 *)(param_1 + 8) = uuid_suffix; return; }
21,713
gindex_indexOf
corpus-core[P]colibri-stateless/src/util/ssz_merkle.c
static int gindex_indexOf(buffer_t* index_list, gindex_t index) { int len = index_list->data.len / sizeof(gindex_t); gindex_t* index_list_array = (gindex_t*) index_list->data.data; for (int i = 0; i < len; i++) { if (index_list_array[i] == index) return i; } return -1; }
O0
c
gindex_indexOf: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movl (%rax), %eax shrq $0x3, %rax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x28(%rbp) movl $0x0, -0x2c(%rbp) movl -0x2c(%rbp), %eax cmpl -0x1c(%rbp), %eax jge 0x1de2b movq -0x28(%rbp), %rax movslq -0x2c(%rbp), %rcx movq (%rax,%rcx,8), %rax cmpq -0x18(%rbp), %rax jne 0x1de1e movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1de32 jmp 0x1de20 movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0x1ddfc movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
gindex_indexOf: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov eax, [rax] shr rax, 3 mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_28], rax mov [rbp+var_2C], 0 loc_1DDFC: mov eax, [rbp+var_2C] cmp eax, [rbp+var_1C] jge short loc_1DE2B mov rax, [rbp+var_28] movsxd rcx, [rbp+var_2C] mov rax, [rax+rcx*8] cmp rax, [rbp+var_18] jnz short loc_1DE1E mov eax, [rbp+var_2C] mov [rbp+var_4], eax jmp short loc_1DE32 loc_1DE1E: jmp short $+2 loc_1DE20: mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax jmp short loc_1DDFC loc_1DE2B: mov [rbp+var_4], 0FFFFFFFFh loc_1DE32: mov eax, [rbp+var_4] pop rbp retn
long long gindex_indexOf(long long a1, long long a2) { unsigned int i; // [rsp+0h] [rbp-2Ch] for ( i = 0; (signed int)i < *(_DWORD *)a1 >> 3; ++i ) { if ( *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL * (int)i) == a2 ) return i; } return (unsigned int)-1; }
gindex_indexOf: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] SHR RAX,0x3 MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x28],RAX MOV dword ptr [RBP + -0x2c],0x0 LAB_0011ddfc: MOV EAX,dword ptr [RBP + -0x2c] CMP EAX,dword ptr [RBP + -0x1c] JGE 0x0011de2b MOV RAX,qword ptr [RBP + -0x28] MOVSXD RCX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RAX + RCX*0x8] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x0011de1e MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x4],EAX JMP 0x0011de32 LAB_0011de1e: JMP 0x0011de20 LAB_0011de20: MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x0011ddfc LAB_0011de2b: MOV dword ptr [RBP + -0x4],0xffffffff LAB_0011de32: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int gindex_indexOf(uint *param_1,long param_2) { int local_34; local_34 = 0; while( true ) { if ((int)(*param_1 >> 3) <= local_34) { return -1; } if (*(long *)(*(long *)(param_1 + 2) + (long)local_34 * 8) == param_2) break; local_34 = local_34 + 1; } return local_34; }
21,714
PycInt::isEqual(PycRef<PycObject>) const
Pyarmor-Static-Unpack-1shot/pyc_object.h
int type() const { return m_type; }
O3
c
PycInt::isEqual(PycRef<PycObject>) const: movl 0xc(%rdi), %eax movq (%rsi), %rcx testq %rcx, %rcx je 0x3288e movl 0xc(%rcx), %ecx jmp 0x32893 movl $0x30, %ecx pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x18, %rsp cmpl %ecx, %eax jne 0x328d9 movsd 0x10(%rdi), %xmm0 movsd %xmm0, -0x10(%rbp) leaq -0x18(%rbp), %rbx movq %rbx, %rdi callq 0xbe38 movq (%rbx), %rdi movsd -0x10(%rbp), %xmm0 cmpeqsd 0x10(%rdi), %xmm0 movq %xmm0, %rbx andl $0x1, %ebx decl 0x8(%rdi) jne 0x328db movq (%rdi), %rax callq *0x8(%rax) jmp 0x328db xorl %ebx, %ebx movl %ebx, %eax addq $0x18, %rsp popq %rbx popq %rbp retq
_ZNK9PycCFloat7isEqualE6PycRefI9PycObjectE: mov eax, [rdi+0Ch] mov rcx, [rsi] test rcx, rcx jz short loc_3288E mov ecx, [rcx+0Ch] jmp short loc_32893 loc_3288E: mov ecx, 30h ; '0' loc_32893: push rbp mov rbp, rsp push rbx sub rsp, 18h cmp eax, ecx jnz short loc_328D9 movsd xmm0, qword ptr [rdi+10h] movsd qword ptr [rbp-10h], xmm0 lea rbx, [rbp-18h] mov rdi, rbx call _ZNK6PycRefI9PycObjectE4castI9PycCFloatEES_IT_Ev; PycRef<PycObject>::cast<PycCFloat>(void) mov rdi, [rbx] movsd xmm0, qword ptr [rbp-10h] cmpeqsd xmm0, qword ptr [rdi+10h] movq rbx, xmm0 and ebx, 1 dec dword ptr [rdi+8] jnz short loc_328DB mov rax, [rdi] call qword ptr [rax+8] jmp short loc_328DB loc_328D9: xor ebx, ebx loc_328DB: mov eax, ebx add rsp, 18h pop rbx pop rbp retn
long long PycCFloat::isEqual(long long a1, const void **a2) { int v2; // ecx long long v3; // rdi __m128d v4; // rt1 unsigned int v5; // ebx long long v8; // [rsp-20h] [rbp-20h] BYREF unsigned long long v9; // [rsp-18h] [rbp-18h] if ( *a2 ) v2 = *((_DWORD *)*a2 + 3); else v2 = 48; if ( *(_DWORD *)(a1 + 12) == v2 ) { v9 = *(_QWORD *)(a1 + 16); PycRef<PycObject>::cast<PycCFloat>(&v8, a2); v3 = v8; v4.m128d_f64[0] = *(double *)(v8 + 16); v5 = *(_OWORD *)&_mm_cmpeq_sd((__m128d)v9, v4) & 1; if ( (*(_DWORD *)(v8 + 8))-- == 1 ) (*(void ( **)(long long))(*(_QWORD *)v3 + 8LL))(v3); } else { return 0; } return v5; }
isEqual: MOV EAX,dword ptr [RDI + 0xc] MOV RCX,qword ptr [RSI] TEST RCX,RCX JZ 0x0013288e MOV ECX,dword ptr [RCX + 0xc] JMP 0x00132893 LAB_0013288e: MOV ECX,0x30 LAB_00132893: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x18 CMP EAX,ECX JNZ 0x001328d9 MOVSD XMM0,qword ptr [RDI + 0x10] MOVSD qword ptr [RBP + -0x10],XMM0 LEA RBX,[RBP + -0x18] MOV RDI,RBX CALL 0x0010be38 MOV RDI,qword ptr [RBX] MOVSD XMM0,qword ptr [RBP + -0x10] CMPEQSD XMM0,qword ptr [RDI + 0x10] MOVQ RBX,XMM0 AND EBX,0x1 DEC dword ptr [RDI + 0x8] JNZ 0x001328db MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] JMP 0x001328db LAB_001328d9: XOR EBX,EBX LAB_001328db: MOV EAX,EBX ADD RSP,0x18 POP RBX POP RBP RET
/* PycCFloat::isEqual(PycRef<PycObject>) const */ byte __thiscall PycCFloat::isEqual(PycCFloat *this,long *param_2) { long *plVar1; double dVar2; int iVar3; byte bVar4; long *local_20; if (*param_2 == 0) { iVar3 = 0x30; } else { iVar3 = *(int *)(*param_2 + 0xc); } if (*(int *)(this + 0xc) == iVar3) { dVar2 = *(double *)(this + 0x10); PycRef<PycObject>::cast<PycCFloat>(); bVar4 = -(dVar2 == (double)local_20[2]) & 1; plVar1 = local_20 + 1; *(int *)plVar1 = (int)*plVar1 + -1; if ((int)*plVar1 == 0) { (**(code **)(*local_20 + 8))(); } } else { bVar4 = 0; } return bVar4; }
21,715
stbi__tga_test
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h
static int stbi__tga_test(stbi__context *s) { int res = 0; int sz, tga_color_type; stbi__get8(s); // discard Offset tga_color_type = stbi__get8(s); // color type if ( tga_color_type > 1 ) goto errorEnd; // only RGB or indexed allowed sz = stbi__get8(s); // image type if ( tga_color_type == 1 ) { // colormapped (paletted) image if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9 stbi__skip(s,4); // skip index of first colormap entry and number of entries sz = stbi__get8(s); // check bits per palette color entry if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) goto errorEnd; stbi__skip(s,4); // skip image x and y origin } else { // "normal" image w/o colormap if ( (sz != 2) && (sz != 3) && (sz != 10) && (sz != 11) ) goto errorEnd; // only RGB or grey allowed, +/- RLE stbi__skip(s,9); // skip colormap specification and image x/y origin } if ( stbi__get16le(s) < 1 ) goto errorEnd; // test width if ( stbi__get16le(s) < 1 ) goto errorEnd; // test height sz = stbi__get8(s); // bits per pixel if ( (tga_color_type == 1) && (sz != 8) && (sz != 16) ) goto errorEnd; // for colormapped images, bpp is size of an index if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) goto errorEnd; res = 1; // if we got this far, everything's good and we can return 1 instead of 0 errorEnd: stbi__rewind(s); return res; }
O0
c
stbi__tga_test: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl $0x0, -0xc(%rbp) movq -0x8(%rbp), %rdi callq 0x6a1b0 movq -0x8(%rbp), %rdi callq 0x6a1b0 movzbl %al, %eax movl %eax, -0x14(%rbp) cmpl $0x1, -0x14(%rbp) jle 0x696e6 jmp 0x697ee movq -0x8(%rbp), %rdi callq 0x6a1b0 movzbl %al, %eax movl %eax, -0x10(%rbp) cmpl $0x1, -0x14(%rbp) jne 0x6975c cmpl $0x1, -0x10(%rbp) je 0x6970c cmpl $0x9, -0x10(%rbp) je 0x6970c jmp 0x697ee movq -0x8(%rbp), %rdi movl $0x4, %esi callq 0x6be10 movq -0x8(%rbp), %rdi callq 0x6a1b0 movzbl %al, %eax movl %eax, -0x10(%rbp) cmpl $0x8, -0x10(%rbp) je 0x6974c cmpl $0xf, -0x10(%rbp) je 0x6974c cmpl $0x10, -0x10(%rbp) je 0x6974c cmpl $0x18, -0x10(%rbp) je 0x6974c cmpl $0x20, -0x10(%rbp) je 0x6974c jmp 0x697ee movq -0x8(%rbp), %rdi movl $0x4, %esi callq 0x6be10 jmp 0x69784 cmpl $0x2, -0x10(%rbp) je 0x69776 cmpl $0x3, -0x10(%rbp) je 0x69776 cmpl $0xa, -0x10(%rbp) je 0x69776 cmpl $0xb, -0x10(%rbp) je 0x69776 jmp 0x697ee movq -0x8(%rbp), %rdi movl $0x9, %esi callq 0x6be10 movq -0x8(%rbp), %rdi callq 0x6ee40 cmpl $0x1, %eax jge 0x69794 jmp 0x697ee movq -0x8(%rbp), %rdi callq 0x6ee40 cmpl $0x1, %eax jge 0x697a4 jmp 0x697ee movq -0x8(%rbp), %rdi callq 0x6a1b0 movzbl %al, %eax movl %eax, -0x10(%rbp) cmpl $0x1, -0x14(%rbp) jne 0x697c7 cmpl $0x8, -0x10(%rbp) je 0x697c7 cmpl $0x10, -0x10(%rbp) je 0x697c7 jmp 0x697ee cmpl $0x8, -0x10(%rbp) je 0x697e7 cmpl $0xf, -0x10(%rbp) je 0x697e7 cmpl $0x10, -0x10(%rbp) je 0x697e7 cmpl $0x18, -0x10(%rbp) je 0x697e7 cmpl $0x20, -0x10(%rbp) je 0x697e7 jmp 0x697ee movl $0x1, -0xc(%rbp) movq -0x8(%rbp), %rdi callq 0x6a170 movl -0xc(%rbp), %eax addq $0x20, %rsp popq %rbp retq
stbi__tga_test: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], 0 mov rdi, [rbp+var_8] call stbi__get8 mov rdi, [rbp+var_8] call stbi__get8 movzx eax, al mov [rbp+var_14], eax cmp [rbp+var_14], 1 jle short loc_696E6 jmp loc_697EE loc_696E6: mov rdi, [rbp+var_8] call stbi__get8 movzx eax, al mov [rbp+var_10], eax cmp [rbp+var_14], 1 jnz short loc_6975C cmp [rbp+var_10], 1 jz short loc_6970C cmp [rbp+var_10], 9 jz short loc_6970C jmp loc_697EE loc_6970C: mov rdi, [rbp+var_8] mov esi, 4 call stbi__skip mov rdi, [rbp+var_8] call stbi__get8 movzx eax, al mov [rbp+var_10], eax cmp [rbp+var_10], 8 jz short loc_6974C cmp [rbp+var_10], 0Fh jz short loc_6974C cmp [rbp+var_10], 10h jz short loc_6974C cmp [rbp+var_10], 18h jz short loc_6974C cmp [rbp+var_10], 20h ; ' ' jz short loc_6974C jmp loc_697EE loc_6974C: mov rdi, [rbp+var_8] mov esi, 4 call stbi__skip jmp short loc_69784 loc_6975C: cmp [rbp+var_10], 2 jz short loc_69776 cmp [rbp+var_10], 3 jz short loc_69776 cmp [rbp+var_10], 0Ah jz short loc_69776 cmp [rbp+var_10], 0Bh jz short loc_69776 jmp short loc_697EE loc_69776: mov rdi, [rbp+var_8] mov esi, 9 call stbi__skip loc_69784: mov rdi, [rbp+var_8] call stbi__get16le cmp eax, 1 jge short loc_69794 jmp short loc_697EE loc_69794: mov rdi, [rbp+var_8] call stbi__get16le cmp eax, 1 jge short loc_697A4 jmp short loc_697EE loc_697A4: mov rdi, [rbp+var_8] call stbi__get8 movzx eax, al mov [rbp+var_10], eax cmp [rbp+var_14], 1 jnz short loc_697C7 cmp [rbp+var_10], 8 jz short loc_697C7 cmp [rbp+var_10], 10h jz short loc_697C7 jmp short loc_697EE loc_697C7: cmp [rbp+var_10], 8 jz short loc_697E7 cmp [rbp+var_10], 0Fh jz short loc_697E7 cmp [rbp+var_10], 10h jz short loc_697E7 cmp [rbp+var_10], 18h jz short loc_697E7 cmp [rbp+var_10], 20h ; ' ' jz short loc_697E7 jmp short loc_697EE loc_697E7: mov [rbp+var_C], 1 loc_697EE: mov rdi, [rbp+var_8] call stbi__rewind mov eax, [rbp+var_C] add rsp, 20h pop rbp retn
long long stbi__tga_test(long long a1) { unsigned int v2; // [rsp+Ch] [rbp-14h] int v3; // [rsp+10h] [rbp-10h] int v4; // [rsp+10h] [rbp-10h] int v5; // [rsp+10h] [rbp-10h] unsigned int v6; // [rsp+14h] [rbp-Ch] v6 = 0; stbi__get8(a1); v2 = (unsigned __int8)stbi__get8(a1); if ( v2 > 1 ) goto LABEL_27; v3 = (unsigned __int8)stbi__get8(a1); if ( v2 == 1 ) { if ( v3 != 1 && v3 != 9 ) goto LABEL_27; stbi__skip(a1, 4LL); v4 = (unsigned __int8)stbi__get8(a1); if ( v4 != 8 && v4 != 15 && v4 != 16 && v4 != 24 && v4 != 32 ) goto LABEL_27; stbi__skip(a1, 4LL); } else { if ( v3 != 2 && v3 != 3 && v3 != 10 && v3 != 11 ) goto LABEL_27; stbi__skip(a1, 9LL); } if ( (int)stbi__get16le(a1) >= 1 && (int)stbi__get16le(a1) >= 1 ) { v5 = (unsigned __int8)stbi__get8(a1); if ( (v2 != 1 || v5 == 8 || v5 == 16) && (v5 == 8 || v5 == 15 || v5 == 16 || v5 == 24 || v5 == 32) ) v6 = 1; } LABEL_27: stbi__rewind(a1); return v6; }
stbi__tga_test: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],0x0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0016a1b0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0016a1b0 MOVZX EAX,AL MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x1 JLE 0x001696e6 JMP 0x001697ee LAB_001696e6: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0016a1b0 MOVZX EAX,AL MOV dword ptr [RBP + -0x10],EAX CMP dword ptr [RBP + -0x14],0x1 JNZ 0x0016975c CMP dword ptr [RBP + -0x10],0x1 JZ 0x0016970c CMP dword ptr [RBP + -0x10],0x9 JZ 0x0016970c JMP 0x001697ee LAB_0016970c: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x4 CALL 0x0016be10 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0016a1b0 MOVZX EAX,AL MOV dword ptr [RBP + -0x10],EAX CMP dword ptr [RBP + -0x10],0x8 JZ 0x0016974c CMP dword ptr [RBP + -0x10],0xf JZ 0x0016974c CMP dword ptr [RBP + -0x10],0x10 JZ 0x0016974c CMP dword ptr [RBP + -0x10],0x18 JZ 0x0016974c CMP dword ptr [RBP + -0x10],0x20 JZ 0x0016974c JMP 0x001697ee LAB_0016974c: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x4 CALL 0x0016be10 JMP 0x00169784 LAB_0016975c: CMP dword ptr [RBP + -0x10],0x2 JZ 0x00169776 CMP dword ptr [RBP + -0x10],0x3 JZ 0x00169776 CMP dword ptr [RBP + -0x10],0xa JZ 0x00169776 CMP dword ptr [RBP + -0x10],0xb JZ 0x00169776 JMP 0x001697ee LAB_00169776: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x9 CALL 0x0016be10 LAB_00169784: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0016ee40 CMP EAX,0x1 JGE 0x00169794 JMP 0x001697ee LAB_00169794: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0016ee40 CMP EAX,0x1 JGE 0x001697a4 JMP 0x001697ee LAB_001697a4: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0016a1b0 MOVZX EAX,AL MOV dword ptr [RBP + -0x10],EAX CMP dword ptr [RBP + -0x14],0x1 JNZ 0x001697c7 CMP dword ptr [RBP + -0x10],0x8 JZ 0x001697c7 CMP dword ptr [RBP + -0x10],0x10 JZ 0x001697c7 JMP 0x001697ee LAB_001697c7: CMP dword ptr [RBP + -0x10],0x8 JZ 0x001697e7 CMP dword ptr [RBP + -0x10],0xf JZ 0x001697e7 CMP dword ptr [RBP + -0x10],0x10 JZ 0x001697e7 CMP dword ptr [RBP + -0x10],0x18 JZ 0x001697e7 CMP dword ptr [RBP + -0x10],0x20 JZ 0x001697e7 JMP 0x001697ee LAB_001697e7: MOV dword ptr [RBP + -0xc],0x1 LAB_001697ee: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0016a170 MOV EAX,dword ptr [RBP + -0xc] ADD RSP,0x20 POP RBP RET
int4 stbi__tga_test(int8 param_1) { byte bVar1; char cVar2; int iVar3; int4 local_14; local_14 = 0; stbi__get8(param_1); bVar1 = stbi__get8(param_1); if (1 < bVar1) goto LAB_001697ee; cVar2 = stbi__get8(param_1); if (bVar1 == 1) { if ((cVar2 != '\x01') && (cVar2 != '\t')) goto LAB_001697ee; stbi__skip(param_1,4); cVar2 = stbi__get8(param_1); if (((cVar2 != '\b') && ((cVar2 != '\x0f' && (cVar2 != '\x10')))) && ((cVar2 != '\x18' && (cVar2 != ' ')))) goto LAB_001697ee; stbi__skip(param_1,4); } else { if ((((cVar2 != '\x02') && (cVar2 != '\x03')) && (cVar2 != '\n')) && (cVar2 != '\v')) goto LAB_001697ee; stbi__skip(param_1,9); } iVar3 = stbi__get16le(param_1); if ((((0 < iVar3) && (iVar3 = stbi__get16le(param_1), 0 < iVar3)) && ((cVar2 = stbi__get8(param_1), bVar1 != 1 || ((cVar2 == '\b' || (cVar2 == '\x10')))))) && ((cVar2 == '\b' || ((((cVar2 == '\x0f' || (cVar2 == '\x10')) || (cVar2 == '\x18')) || (cVar2 == ' ')))))) { local_14 = 1; } LAB_001697ee: stbi__rewind(param_1); return local_14; }
21,716
stbi__tga_test
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h
static int stbi__tga_test(stbi__context *s) { int res = 0; int sz, tga_color_type; stbi__get8(s); // discard Offset tga_color_type = stbi__get8(s); // color type if ( tga_color_type > 1 ) goto errorEnd; // only RGB or indexed allowed sz = stbi__get8(s); // image type if ( tga_color_type == 1 ) { // colormapped (paletted) image if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9 stbi__skip(s,4); // skip index of first colormap entry and number of entries sz = stbi__get8(s); // check bits per palette color entry if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) goto errorEnd; stbi__skip(s,4); // skip image x and y origin } else { // "normal" image w/o colormap if ( (sz != 2) && (sz != 3) && (sz != 10) && (sz != 11) ) goto errorEnd; // only RGB or grey allowed, +/- RLE stbi__skip(s,9); // skip colormap specification and image x/y origin } if ( stbi__get16le(s) < 1 ) goto errorEnd; // test width if ( stbi__get16le(s) < 1 ) goto errorEnd; // test height sz = stbi__get8(s); // bits per pixel if ( (tga_color_type == 1) && (sz != 8) && (sz != 16) ) goto errorEnd; // for colormapped images, bpp is size of an index if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) goto errorEnd; res = 1; // if we got this far, everything's good and we can return 1 instead of 0 errorEnd: stbi__rewind(s); return res; }
O1
c
stbi__tga_test: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx callq 0x35662 movq %rbx, %rdi callq 0x35662 xorl %ebp, %ebp cmpb $0x1, %al jbe 0x34e41 movups 0xd0(%rbx), %xmm0 movups %xmm0, 0xc0(%rbx) movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl %eax, %r14d movq %rbx, %rdi callq 0x35662 cmpb $0x1, %r14b jne 0x34e8c andb $-0x9, %al cmpb $0x1, %al jne 0x34e26 cmpq $0x0, 0x10(%rbx) je 0x34ec5 movq 0xc8(%rbx), %rcx movl 0xc0(%rbx), %edx movl %ecx, %eax subl %edx, %eax cmpl $0x3, %eax jg 0x34ec5 movq %rcx, 0xc0(%rbx) movq 0x28(%rbx), %rdi movl $0x4, %esi subl %eax, %esi callq *0x18(%rbx) jmp 0x34ecd andb $-0xa, %al cmpb $0x2, %al jne 0x34e26 cmpq $0x0, 0x10(%rbx) je 0x34f28 movq 0xc8(%rbx), %rcx movl 0xc0(%rbx), %edx movl %ecx, %eax subl %edx, %eax cmpl $0x8, %eax jg 0x34f28 movq %rcx, 0xc0(%rbx) movq 0x28(%rbx), %rdi movl $0x9, %esi jmp 0x34f21 addq $0x4, 0xc0(%rbx) movq %rbx, %rdi callq 0x35662 cmpb $0x20, %al ja 0x34e26 movzbl %al, %eax movabsq $0x101018100, %rcx # imm = 0x101018100 btq %rax, %rcx jae 0x34e26 cmpq $0x0, 0x10(%rbx) je 0x34f32 movq 0xc8(%rbx), %rcx movl 0xc0(%rbx), %edx movl %ecx, %eax subl %edx, %eax cmpl $0x3, %eax jg 0x34f32 movq %rcx, 0xc0(%rbx) movq 0x28(%rbx), %rdi movl $0x4, %esi subl %eax, %esi callq *0x18(%rbx) jmp 0x34f3a addq $0x9, 0xc0(%rbx) jmp 0x34f3a addq $0x4, 0xc0(%rbx) movq %rbx, %rdi callq 0x35662 movzbl %al, %r15d movq %rbx, %rdi callq 0x35662 movzbl %al, %eax shll $0x8, %eax orl %r15d, %eax je 0x34e26 movq %rbx, %rdi callq 0x35662 movzbl %al, %r15d movq %rbx, %rdi callq 0x35662 movzbl %al, %eax shll $0x8, %eax orl %r15d, %eax je 0x34e26 movq %rbx, %rdi callq 0x35662 cmpb $0x1, %r14b jne 0x34f9d addb $-0x8, %al xorl %ebp, %ebp testb $-0x9, %al sete %bpl jmp 0x34e26 cmpb $0x20, %al ja 0x34e26 movzbl %al, %eax movabsq $0x101018100, %rcx # imm = 0x101018100 btq %rax, %rcx jae 0x34e26 movl $0x1, %ebp jmp 0x34e26
stbi__tga_test: push rbp push r15 push r14 push rbx push rax mov rbx, rdi call stbi__get8 mov rdi, rbx call stbi__get8 xor ebp, ebp cmp al, 1 jbe short loc_34E41 loc_34E26: movups xmm0, xmmword ptr [rbx+0D0h] movups xmmword ptr [rbx+0C0h], xmm0 mov eax, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_34E41: mov r14d, eax mov rdi, rbx call stbi__get8 cmp r14b, 1 jnz short loc_34E8C and al, 0F7h cmp al, 1 jnz short loc_34E26 cmp qword ptr [rbx+10h], 0 jz short loc_34EC5 mov rcx, [rbx+0C8h] mov edx, [rbx+0C0h] mov eax, ecx sub eax, edx cmp eax, 3 jg short loc_34EC5 mov [rbx+0C0h], rcx mov rdi, [rbx+28h] mov esi, 4 sub esi, eax call qword ptr [rbx+18h] jmp short loc_34ECD loc_34E8C: and al, 0F6h cmp al, 2 jnz short loc_34E26 cmp qword ptr [rbx+10h], 0 jz loc_34F28 mov rcx, [rbx+0C8h] mov edx, [rbx+0C0h] mov eax, ecx sub eax, edx cmp eax, 8 jg short loc_34F28 mov [rbx+0C0h], rcx mov rdi, [rbx+28h] mov esi, 9 jmp short loc_34F21 loc_34EC5: add qword ptr [rbx+0C0h], 4 loc_34ECD: mov rdi, rbx call stbi__get8 cmp al, 20h ; ' ' ja loc_34E26 movzx eax, al mov rcx, 101018100h bt rcx, rax jnb loc_34E26 cmp qword ptr [rbx+10h], 0 jz short loc_34F32 mov rcx, [rbx+0C8h] mov edx, [rbx+0C0h] mov eax, ecx sub eax, edx cmp eax, 3 jg short loc_34F32 mov [rbx+0C0h], rcx mov rdi, [rbx+28h] mov esi, 4 loc_34F21: sub esi, eax call qword ptr [rbx+18h] jmp short loc_34F3A loc_34F28: add qword ptr [rbx+0C0h], 9 jmp short loc_34F3A loc_34F32: add qword ptr [rbx+0C0h], 4 loc_34F3A: mov rdi, rbx call stbi__get8 movzx r15d, al mov rdi, rbx call stbi__get8 movzx eax, al shl eax, 8 or eax, r15d jz loc_34E26 mov rdi, rbx call stbi__get8 movzx r15d, al mov rdi, rbx call stbi__get8 movzx eax, al shl eax, 8 or eax, r15d jz loc_34E26 mov rdi, rbx call stbi__get8 cmp r14b, 1 jnz short loc_34F9D add al, 0F8h xor ebp, ebp test al, 0F7h setz bpl jmp loc_34E26 loc_34F9D: cmp al, 20h ; ' ' ja loc_34E26 movzx eax, al mov rcx, 101018100h bt rcx, rax jnb loc_34E26 mov ebp, 1 jmp loc_34E26
_BOOL8 stbi__tga_test(long long a1) { unsigned __int8 v2; // al BOOL v3; // ebp unsigned __int8 v5; // r14 char v6; // al int v7; // eax int v8; // eax long long v9; // rdi int v10; // esi unsigned __int8 v11; // al long long v12; // rcx int v13; // r15d int v14; // r15d unsigned __int8 v15; // al long long v16; // rcx stbi__get8(a1); v2 = stbi__get8(a1); v3 = 0; if ( v2 > 1u ) goto LABEL_2; v5 = v2; v6 = stbi__get8(a1); if ( v5 != 1 ) { if ( (v6 & 0xF6) != 2 ) goto LABEL_2; if ( !*(_QWORD *)(a1 + 16) || (v8 = *(_QWORD *)(a1 + 200) - *(_DWORD *)(a1 + 192), v8 > 8) ) { *(_QWORD *)(a1 + 192) += 9LL; goto LABEL_21; } *(_QWORD *)(a1 + 192) = *(_QWORD *)(a1 + 200); v9 = *(_QWORD *)(a1 + 40); v10 = 9; LABEL_18: (*(void ( **)(long long, _QWORD))(a1 + 24))(v9, (unsigned int)(v10 - v8)); LABEL_21: v13 = (unsigned __int8)stbi__get8(a1); if ( v13 | ((unsigned __int8)stbi__get8(a1) << 8) ) { v14 = (unsigned __int8)stbi__get8(a1); if ( v14 | ((unsigned __int8)stbi__get8(a1) << 8) ) { v15 = stbi__get8(a1); if ( v5 == 1 ) { v3 = ((v15 - 8) & 0xF7) == 0; } else if ( v15 <= 0x20u ) { v16 = 0x101018100LL; if ( _bittest64(&v16, v15) ) v3 = 1; } } } goto LABEL_2; } if ( (v6 & 0xF7) == 1 ) { if ( *(_QWORD *)(a1 + 16) && (v7 = *(_QWORD *)(a1 + 200) - *(_DWORD *)(a1 + 192), v7 <= 3) ) { *(_QWORD *)(a1 + 192) = *(_QWORD *)(a1 + 200); (*(void ( **)(_QWORD, _QWORD))(a1 + 24))(*(_QWORD *)(a1 + 40), (unsigned int)(4 - v7)); } else { *(_QWORD *)(a1 + 192) += 4LL; } v11 = stbi__get8(a1); if ( v11 <= 0x20u ) { v12 = 0x101018100LL; if ( _bittest64(&v12, v11) ) { if ( !*(_QWORD *)(a1 + 16) || (v8 = *(_QWORD *)(a1 + 200) - *(_DWORD *)(a1 + 192), v8 > 3) ) { *(_QWORD *)(a1 + 192) += 4LL; goto LABEL_21; } *(_QWORD *)(a1 + 192) = *(_QWORD *)(a1 + 200); v9 = *(_QWORD *)(a1 + 40); v10 = 4; goto LABEL_18; } } } LABEL_2: *(_OWORD *)(a1 + 192) = *(_OWORD *)(a1 + 208); return v3; }
stbi__tga_test: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x00135662 MOV RDI,RBX CALL 0x00135662 XOR EBP,EBP CMP AL,0x1 JBE 0x00134e41 LAB_00134e26: MOVUPS XMM0,xmmword ptr [RBX + 0xd0] MOVUPS xmmword ptr [RBX + 0xc0],XMM0 MOV EAX,EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_00134e41: MOV R14D,EAX MOV RDI,RBX CALL 0x00135662 CMP R14B,0x1 JNZ 0x00134e8c AND AL,0xf7 CMP AL,0x1 JNZ 0x00134e26 CMP qword ptr [RBX + 0x10],0x0 JZ 0x00134ec5 MOV RCX,qword ptr [RBX + 0xc8] MOV EDX,dword ptr [RBX + 0xc0] MOV EAX,ECX SUB EAX,EDX CMP EAX,0x3 JG 0x00134ec5 MOV qword ptr [RBX + 0xc0],RCX MOV RDI,qword ptr [RBX + 0x28] MOV ESI,0x4 SUB ESI,EAX CALL qword ptr [RBX + 0x18] JMP 0x00134ecd LAB_00134e8c: AND AL,0xf6 CMP AL,0x2 JNZ 0x00134e26 CMP qword ptr [RBX + 0x10],0x0 JZ 0x00134f28 MOV RCX,qword ptr [RBX + 0xc8] MOV EDX,dword ptr [RBX + 0xc0] MOV EAX,ECX SUB EAX,EDX CMP EAX,0x8 JG 0x00134f28 MOV qword ptr [RBX + 0xc0],RCX MOV RDI,qword ptr [RBX + 0x28] MOV ESI,0x9 JMP 0x00134f21 LAB_00134ec5: ADD qword ptr [RBX + 0xc0],0x4 LAB_00134ecd: MOV RDI,RBX CALL 0x00135662 CMP AL,0x20 JA 0x00134e26 MOVZX EAX,AL MOV RCX,0x101018100 BT RCX,RAX JNC 0x00134e26 CMP qword ptr [RBX + 0x10],0x0 JZ 0x00134f32 MOV RCX,qword ptr [RBX + 0xc8] MOV EDX,dword ptr [RBX + 0xc0] MOV EAX,ECX SUB EAX,EDX CMP EAX,0x3 JG 0x00134f32 MOV qword ptr [RBX + 0xc0],RCX MOV RDI,qword ptr [RBX + 0x28] MOV ESI,0x4 LAB_00134f21: SUB ESI,EAX CALL qword ptr [RBX + 0x18] JMP 0x00134f3a LAB_00134f28: ADD qword ptr [RBX + 0xc0],0x9 JMP 0x00134f3a LAB_00134f32: ADD qword ptr [RBX + 0xc0],0x4 LAB_00134f3a: MOV RDI,RBX CALL 0x00135662 MOVZX R15D,AL MOV RDI,RBX CALL 0x00135662 MOVZX EAX,AL SHL EAX,0x8 OR EAX,R15D JZ 0x00134e26 MOV RDI,RBX CALL 0x00135662 MOVZX R15D,AL MOV RDI,RBX CALL 0x00135662 MOVZX EAX,AL SHL EAX,0x8 OR EAX,R15D JZ 0x00134e26 MOV RDI,RBX CALL 0x00135662 CMP R14B,0x1 JNZ 0x00134f9d ADD AL,0xf8 XOR EBP,EBP TEST AL,0xf7 SETZ BPL JMP 0x00134e26 LAB_00134f9d: CMP AL,0x20 JA 0x00134e26 MOVZX EAX,AL MOV RCX,0x101018100 BT RCX,RAX JNC 0x00134e26 MOV EBP,0x1 JMP 0x00134e26
bool stbi__tga_test(long param_1) { byte bVar1; byte bVar2; int1 uVar3; int1 uVar4; int iVar5; ulong uVar6; bool bVar7; bool bVar8; int iVar9; int8 uVar10; stbi__get8(); bVar1 = stbi__get8(param_1); bVar8 = false; bVar7 = false; if (1 < bVar1) goto LAB_00134e26; bVar2 = stbi__get8(param_1); if (bVar1 == 1) { if ((bVar2 & 0xf7) != 1) goto LAB_00134e26; if (*(long *)(param_1 + 0x10) == 0) { LAB_00134ec5: *(long *)(param_1 + 0xc0) = *(long *)(param_1 + 0xc0) + 4; } else { iVar5 = (int)*(int8 *)(param_1 + 200) - *(int *)(param_1 + 0xc0); if (3 < iVar5) goto LAB_00134ec5; *(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 200); (**(code **)(param_1 + 0x18))(*(int8 *)(param_1 + 0x28),4 - iVar5); } bVar2 = stbi__get8(param_1); if ((0x20 < bVar2) || (bVar8 = bVar7, (0x101018100U >> ((ulong)bVar2 & 0x3f) & 1) == 0)) goto LAB_00134e26; if (*(long *)(param_1 + 0x10) != 0) { iVar5 = (int)*(int8 *)(param_1 + 200) - *(int *)(param_1 + 0xc0); if (iVar5 < 4) { *(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 200); uVar10 = *(int8 *)(param_1 + 0x28); iVar9 = 4; goto LAB_00134f21; } } *(long *)(param_1 + 0xc0) = *(long *)(param_1 + 0xc0) + 4; } else { bVar8 = bVar7; if ((bVar2 & 0xf6) != 2) goto LAB_00134e26; if (*(long *)(param_1 + 0x10) == 0) { LAB_00134f28: *(long *)(param_1 + 0xc0) = *(long *)(param_1 + 0xc0) + 9; } else { iVar5 = (int)*(int8 *)(param_1 + 200) - *(int *)(param_1 + 0xc0); if (8 < iVar5) goto LAB_00134f28; *(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 200); uVar10 = *(int8 *)(param_1 + 0x28); iVar9 = 9; LAB_00134f21: (**(code **)(param_1 + 0x18))(uVar10,iVar9 - iVar5); } } uVar3 = stbi__get8(param_1); uVar4 = stbi__get8(param_1); bVar8 = bVar7; if (CONCAT11(uVar4,uVar3) != 0) { uVar3 = stbi__get8(param_1); uVar4 = stbi__get8(param_1); if (CONCAT11(uVar4,uVar3) != 0) { uVar6 = stbi__get8(param_1); if (bVar1 == 1) { bVar8 = ((byte)uVar6 - 8 & 0xf7) == 0; } else if (((byte)uVar6 < 0x21) && ((0x101018100U >> (uVar6 & 0x3f) & 1) != 0)) { bVar8 = true; } } } LAB_00134e26: *(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 0xd0); *(int8 *)(param_1 + 200) = *(int8 *)(param_1 + 0xd8); return bVar8; }
21,717
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&)
llama.cpp/common/json-schema-to-grammar.cpp
std::string build_grammar(const std::function<void(const common_grammar_builder &)> & cb, const common_grammar_options & options) { SchemaConverter converter([&](const std::string &) { return json(); }, options.dotall); common_grammar_builder builder { /* .add_rule = */ [&](const std::string & name, const std::string & rule) { return converter._add_rule(name, rule); }, /* .add_schema = */ [&](const std::string & name, const nlohmann::ordered_json & schema) { return converter.visit(schema, name == "root" ? "" : name); }, /* .resolve_refs = */ [&](nlohmann::ordered_json & schema) { converter.resolve_refs(schema, ""); } }; cb(builder); converter.check_errors(); return converter.format_grammar(); }
O3
cpp
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&): pushq %r15 pushq %r14 pushq %rbx subq $0x160, %rsp # imm = 0x160 movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movq %rsp, %rsi movaps %xmm0, (%rsi) leaq 0x2ee(%rip), %rax # 0xfd0e6 movq %rax, 0x18(%rsi) leaq 0x30f(%rip), %rax # 0xfd112 movq %rax, 0x10(%rsi) movzbl (%rdx), %edx leaq 0x68(%rsp), %r15 movq %r15, %rdi callq 0xffdf2 movq 0x10(%rsp), %rax testq %rax, %rax je 0xfce2e movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax xorl %eax, %eax movq %rax, 0x8(%rsp) movq %r15, (%rsp) leaq 0x2ea(%rip), %rcx # 0xfd12a movq %rcx, 0x18(%rsp) leaq 0x2f0(%rip), %rcx # 0xfd13c movq %rcx, 0x10(%rsp) movq %rax, 0x28(%rsp) movq %r15, 0x20(%rsp) leaq 0x300(%rip), %rcx # 0xfd162 movq %rcx, 0x38(%rsp) leaq 0x3a6(%rip), %rcx # 0xfd214 movq %rcx, 0x30(%rsp) movq %rax, 0x48(%rsp) movq %r15, 0x40(%rsp) leaq 0x2dcc(%rip), %rcx # 0xffc50 movq %rcx, 0x58(%rsp) leaq 0x2e2a(%rip), %rcx # 0xffcba movq %rcx, 0x50(%rsp) cmpq %rax, 0x10(%r14) je 0xfcf75 movq %rsp, %rsi movq %r14, %rdi callq *0x18(%r14) leaq 0x68(%rsp), %rdi callq 0xfff7e leaq 0x68(%rsp), %rsi movq %rbx, %rdi callq 0x100146 movq 0x50(%rsp), %rax testq %rax, %rax je 0xfced9 leaq 0x40(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x30(%rsp), %rax testq %rax, %rax je 0xfcef2 leaq 0x20(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x10(%rsp), %rax testq %rax, %rax je 0xfcf09 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x148(%rsp), %rdi callq 0x278c6 leaq 0x130(%rsp), %rdi callq 0x278c6 leaq 0xf8(%rsp), %rdi callq 0xfb132 leaq 0xc0(%rsp), %rdi callq 0x100972 leaq 0x90(%rsp), %r14 movq %r14, %rdi callq 0x100a54 movq -0x18(%r14), %rax testq %rax, %rax je 0xfcf65 leaq 0x68(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rax addq $0x160, %rsp # imm = 0x160 popq %rbx popq %r14 popq %r15 retq callq 0x212a0 jmp 0xfcfa0 jmp 0xfcfa0 jmp 0xfcfa0 jmp 0xfcfa0 jmp 0xfcfa0 movq %rax, %rbx movq 0x10(%rsp), %rax testq %rax, %rax je 0xfcfbd movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0xfcfbd movq %rax, %rdi callq 0x2868d movq %rax, %rbx movq %rsp, %rdi callq 0x100252 leaq 0x68(%rsp), %rdi callq 0x1002a8 movq %rbx, %rdi callq 0x20ae0 nop
_Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options: push r15 push r14 push rbx sub rsp, 160h mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 mov rsi, rsp; int movaps xmmword ptr [rsi], xmm0 lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E9_M_invokeERKSt9_Any_dataSG_; std::_Function_handler<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::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke(std::_Any_data const&,std::string const&) mov [rsi+18h], rax lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E10_M_managerERSt9_Any_dataRKSV_St18_Manager_operation; std::_Function_handler<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::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsi+10h], rax movzx edx, byte ptr [rdx]; int lea r15, [rsp+178h+var_110] mov rdi, r15; int call _ZN15SchemaConverterC2ERKSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERKSB_EEb; SchemaConverter::SchemaConverter(std::function<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::string const&)> const&,bool) mov rax, [rsp+178h+var_168] test rax, rax jz short loc_FCE2E mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_FCE2E: xor eax, eax mov [rsp+178h+var_170], rax mov [rsp+178h+var_178], r15 lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E9_M_invokeERKSt9_Any_dataS7_S7_; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke(std::_Any_data const&,std::string const&,std::string const&) mov [rsp+178h+var_160], rcx lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E10_M_managerERSt9_Any_dataRKSM_St18_Manager_operation; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsp+178h+var_168], rcx mov [rsp+178h+var_150], rax mov [rsp+178h+var_158], r15 lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E9_M_invokeERKSt9_Any_dataS7_SI_; std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke(std::_Any_data const&,std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov [rsp+178h+var_140], rcx lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E10_M_managerERSt9_Any_dataRKSX_St18_Manager_operation; std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsp+178h+var_148], rcx mov [rsp+178h+var_130], rax mov [rsp+178h+var_138], r15 lea rcx, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E9_M_invokeERKSt9_Any_dataSF_; std::_Function_handler<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> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke(std::_Any_data 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> &) mov [rsp+178h+var_120], rcx lea rcx, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E10_M_managerERSt9_Any_dataRKSU_St18_Manager_operation; std::_Function_handler<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> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsp+178h+var_128], rcx cmp [r14+10h], rax jz loc_FCF75 mov rsi, rsp mov rdi, r14 call qword ptr [r14+18h] lea rdi, [rsp+178h+var_110]; this call _ZN15SchemaConverter12check_errorsEv; SchemaConverter::check_errors(void) lea rsi, [rsp+178h+var_110] mov rdi, rbx call _ZN15SchemaConverter14format_grammarB5cxx11Ev; SchemaConverter::format_grammar(void) mov rax, [rsp+178h+var_128] test rax, rax jz short loc_FCED9 lea rdi, [rsp+178h+var_138] mov rsi, rdi mov edx, 3 call rax loc_FCED9: mov rax, [rsp+178h+var_148] test rax, rax jz short loc_FCEF2 lea rdi, [rsp+178h+var_158] mov rsi, rdi mov edx, 3 call rax loc_FCEF2: mov rax, [rsp+178h+var_168] test rax, rax jz short loc_FCF09 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_FCF09: lea rdi, [rsp+178h+var_30] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+178h+var_48] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+178h+var_80] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable() lea rdi, [rsp+178h+var_B8] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEESaISH_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSJ_18_Mod_range_hashingENSJ_20_Default_ranged_hashENSJ_20_Prime_rehash_policyENSJ_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::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>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable() lea r14, [rsp+178h+var_E8] mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree() mov rax, [r14-18h] test rax, rax jz short loc_FCF65 lea rdi, [rsp+178h+var_110] mov rsi, rdi mov edx, 3 call rax loc_FCF65: mov rax, rbx add rsp, 160h pop rbx pop r14 pop r15 retn loc_FCF75: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) jmp short loc_FCFA0 jmp short loc_FCFA0 jmp short loc_FCFA0 jmp short loc_FCFA0 jmp short loc_FCFA0 mov rbx, rax mov rax, [rsp+178h+var_168] test rax, rax jz short loc_FCFBD mov rdi, rsp mov rsi, rdi mov edx, 3 call rax jmp short loc_FCFBD loc_FCFA0: mov rdi, rax call __clang_call_terminate mov rbx, rax mov rdi, rsp; this call _ZN22common_grammar_builderD2Ev; common_grammar_builder::~common_grammar_builder() lea rdi, [rsp+178h+var_110]; this call _ZN15SchemaConverterD2Ev; SchemaConverter::~SchemaConverter() loc_FCFBD: mov rdi, rbx call __Unwind_Resume
long long build_grammar[abi:cxx11](long long a1, long long a2, unsigned __int8 *a3, int a4, int a5, int a6) { int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d int *v11; // [rsp+0h] [rbp-178h] BYREF long long v12; // [rsp+8h] [rbp-170h] long long ( *v13)(); // [rsp+10h] [rbp-168h] long long ( *v14)(); // [rsp+18h] [rbp-160h] int *v15; // [rsp+20h] [rbp-158h] BYREF long long v16; // [rsp+28h] [rbp-150h] long long ( *v17)(); // [rsp+30h] [rbp-148h] long long ( *v18)(int, int, int, int, int, int, int, long long); // [rsp+38h] [rbp-140h] int *v19; // [rsp+40h] [rbp-138h] BYREF long long v20; // [rsp+48h] [rbp-130h] long long ( *v21)(); // [rsp+50h] [rbp-128h] long long ( *v22)(int, int, int, int, int, int, void *, int, long long); // [rsp+58h] [rbp-120h] int v23; // [rsp+60h] [rbp-118h] int v24[4]; // [rsp+68h] [rbp-110h] BYREF void ( *v25)(int *, int *, long long); // [rsp+78h] [rbp-100h] _BYTE v26[48]; // [rsp+90h] [rbp-E8h] BYREF _BYTE v27[56]; // [rsp+C0h] [rbp-B8h] BYREF _BYTE v28[56]; // [rsp+F8h] [rbp-80h] BYREF _BYTE v29[24]; // [rsp+130h] [rbp-48h] BYREF _BYTE v30[48]; // [rsp+148h] [rbp-30h] BYREF v14 = std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke; SchemaConverter::SchemaConverter( (int)v24, (int)&v11, *a3, a4, a5, a6, 0LL, 0, (long long)std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager); if ( v13 ) ((void ( *)(int **, int **, long long))v13)(&v11, &v11, 3LL); v12 = 0LL; v11 = v24; v14 = std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke; v13 = std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager; v16 = 0LL; v15 = v24; v18 = std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke; v17 = std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager; v20 = 0LL; v19 = v24; v22 = std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke; v21 = std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager; if ( !*(_QWORD *)(a2 + 16) ) std::__throw_bad_function_call(); (*(void ( **)(long long, int **))(a2 + 24))(a2, &v11); SchemaConverter::check_errors((SchemaConverter *)v24); SchemaConverter::format_grammar[abi:cxx11]( a1, (unsigned int)v24, v6, v7, v8, v9, (_DWORD)v11, v12, (_DWORD)v13, (_DWORD)v14, (_DWORD)v15, v16, (_DWORD)v17, (_DWORD)v18, (_DWORD)v19, v20, (_DWORD)v21, (_DWORD)v22, v23, v24[0], v24[2], (char)v25); if ( v21 ) ((void ( *)(int **, int **, long long))v21)(&v19, &v19, 3LL); if ( v17 ) ((void ( *)(int **, int **, long long))v17)(&v15, &v15, 3LL); if ( v13 ) ((void ( *)(int **, int **, long long))v13)(&v11, &v11, 3LL); std::vector<std::string>::~vector((long long)v30); std::vector<std::string>::~vector((long long)v29); std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable((long long)v28); std::_Hashtable<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::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,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(v27); std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree(v26); if ( v25 ) v25(v24, v24, 3LL); return a1; }
build_grammar[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x160 MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOV RSI,RSP MOVAPS xmmword ptr [RSI],XMM0 LEA RAX,[0x1fd0e6] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x1fd112] MOV qword ptr [RSI + 0x10],RAX MOVZX EDX,byte ptr [RDX] LAB_001fce0a: LEA R15,[RSP + 0x68] MOV RDI,R15 CALL 0x001ffdf2 MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x001fce2e LAB_001fce21: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001fce2e: XOR EAX,EAX MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP],R15 LEA RCX,[0x1fd12a] MOV qword ptr [RSP + 0x18],RCX LEA RCX,[0x1fd13c] MOV qword ptr [RSP + 0x10],RCX MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x20],R15 LEA RCX,[0x1fd162] MOV qword ptr [RSP + 0x38],RCX LEA RCX,[0x1fd214] MOV qword ptr [RSP + 0x30],RCX MOV qword ptr [RSP + 0x48],RAX MOV qword ptr [RSP + 0x40],R15 LEA RCX,[0x1ffc50] MOV qword ptr [RSP + 0x58],RCX LEA RCX,[0x1ffcba] MOV qword ptr [RSP + 0x50],RCX CMP qword ptr [R14 + 0x10],RAX JZ 0x001fcf75 LAB_001fce9f: MOV RSI,RSP MOV RDI,R14 CALL qword ptr [R14 + 0x18] LEA RDI,[RSP + 0x68] CALL 0x001fff7e LEA RSI,[RSP + 0x68] MOV RDI,RBX CALL 0x00200146 MOV RAX,qword ptr [RSP + 0x50] TEST RAX,RAX JZ 0x001fced9 LEA RDI,[RSP + 0x40] LAB_001fcecf: MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001fced9: MOV RAX,qword ptr [RSP + 0x30] TEST RAX,RAX JZ 0x001fcef2 LEA RDI,[RSP + 0x20] LAB_001fcee8: MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001fcef2: MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x001fcf09 LAB_001fcefc: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001fcf09: LEA RDI,[RSP + 0x148] CALL 0x001278c6 LEA RDI,[RSP + 0x130] CALL 0x001278c6 LEA RDI,[RSP + 0xf8] CALL 0x001fb132 LEA RDI,[RSP + 0xc0] CALL 0x00200972 LEA R14,[RSP + 0x90] MOV RDI,R14 CALL 0x00200a54 MOV RAX,qword ptr [R14 + -0x18] TEST RAX,RAX JZ 0x001fcf65 LAB_001fcf56: LEA RDI,[RSP + 0x68] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001fcf65: MOV RAX,RBX ADD RSP,0x160 POP RBX POP R14 POP R15 RET LAB_001fcf75: CALL 0x001212a0
/* build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&) */ function * build_grammar_abi_cxx11_(function *param_1,common_grammar_options *param_2) { int8 in_RDX; SchemaConverter *local_178; int8 uStack_170; code *local_168; code *local_160; SchemaConverter *local_158; int8 local_150; code *local_148; code *local_140; SchemaConverter *local_138; int8 local_130; code *local_128; code *local_120; SchemaConverter local_110 [16]; code *local_100; _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> local_e8 [48]; _Hashtable<std::__cxx11::string,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>>,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>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> local_b8 [56]; _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> local_80 [56]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_48 [24]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_30 [24]; local_178 = (SchemaConverter *)0x0; uStack_170 = 0; local_160 = std:: _Function_handler<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::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0> ::_M_invoke; local_168 = std:: _Function_handler<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::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0> ::_M_manager; /* try { // try from 001fce0a to 001fce16 has its CatchHandler @ 001fcf84 */ SchemaConverter::SchemaConverter(local_110,(function *)&local_178,*(bool *)in_RDX); if (local_168 != (code *)0x0) { /* try { // try from 001fce21 to 001fce2d has its CatchHandler @ 001fcf82 */ (*local_168)(&local_178,&local_178,3); } uStack_170 = 0; local_160 = std:: _Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1> ::_M_invoke; local_168 = std:: _Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1> ::_M_manager; local_150 = 0; local_140 = std:: _Function_handler<std::__cxx11::string(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>const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2> ::_M_invoke; local_148 = std:: _Function_handler<std::__cxx11::string(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>const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2> ::_M_manager; local_130 = 0; local_120 = std:: _Function_handler<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>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3> ::_M_invoke; local_128 = std:: _Function_handler<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>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3> ::_M_manager; local_178 = local_110; local_158 = local_110; local_138 = local_110; if (*(long *)(param_2 + 0x10) != 0) { /* try { // try from 001fce9f to 001fcebf has its CatchHandler @ 001fcfa8 */ (**(code **)(param_2 + 0x18))(param_2,&local_178); SchemaConverter::check_errors(local_110); SchemaConverter::format_grammar_abi_cxx11_(); if (local_128 != (code *)0x0) { /* try { // try from 001fcecf to 001fced8 has its CatchHandler @ 001fcf80 */ (*local_128)(&local_138,&local_138,3); } if (local_148 != (code *)0x0) { /* try { // try from 001fcee8 to 001fcef1 has its CatchHandler @ 001fcf7e */ (*local_148)(&local_158,&local_158,3); } if (local_168 != (code *)0x0) { /* try { // try from 001fcefc to 001fcf08 has its CatchHandler @ 001fcf7c */ (*local_168)(&local_178,&local_178,3); } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_30); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_48); std:: _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> ::~_Hashtable(local_80); std:: _Hashtable<std::__cxx11::string,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>>,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>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::~_Hashtable(local_b8); std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::~_Rb_tree(local_e8); if (local_100 != (code *)0x0) { /* try { // try from 001fcf56 to 001fcf64 has its CatchHandler @ 001fcf7a */ (*local_100)(local_110,local_110,3); } return param_1; } /* WARNING: Subroutine does not return */ /* try { // try from 001fcf75 to 001fcf79 has its CatchHandler @ 001fcfa8 */ std::__throw_bad_function_call(); }
21,718
translog_lock
eloqsql/storage/maria/ma_loghandler.c
void translog_lock() { uint8 current_buffer; DBUG_ENTER("translog_lock"); /* Locking the loghandler mean locking current buffer, but it can change during locking, so we should check it */ for (;;) { /* log_descriptor.bc.buffer_no is only one byte so its reading is an atomic operation */ current_buffer= log_descriptor.bc.buffer_no; translog_buffer_lock(log_descriptor.buffers + current_buffer); if (log_descriptor.bc.buffer_no == current_buffer) break; translog_buffer_unlock(log_descriptor.buffers + current_buffer); } DBUG_VOID_RETURN; }
O3
c
translog_lock: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movzbl 0xbcc610(%rip), %r15d # 0xbfeb76 leaq 0x3cb983(%rip), %r14 # 0x3fdef0 imulq $0x100120, %r15, %rax # imm = 0x100120 leaq (%rax,%r14), %rbx addq $0x2f8, %rbx # imm = 0x2F8 movq %rbx, %rdi callq 0x325f3 cmpb %r15b, 0xbcc5e8(%rip) # 0xbfeb76 jne 0x32599 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x353a70(%rip), %r15 # 0x386010 movq 0x1000d0(%rbx), %rdi testq %rdi, %rdi jne 0x325e8 addq $0x100090, %rbx # imm = 0x100090 movq %rbx, %rdi callq 0x291c0 movzbl 0xbcc5b3(%rip), %r12d # 0xbfeb76 imulq $0x100120, %r12, %rax # imm = 0x100120 leaq (%rax,%r14), %rbx addq $0x2f8, %rbx # imm = 0x2F8 movq %rbx, %rdi callq 0x325f3 cmpb %r12b, 0xbcc592(%rip) # 0xbfeb76 jne 0x325a0 jmp 0x32590 movq (%r15), %rax callq *0x160(%rax) jmp 0x325ac
translog_lock: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx movzx r15d, byte ptr cs:xmmword_BFEB70+6 lea r14, log_descriptor imul rax, r15, 100120h lea rbx, [rax+r14] add rbx, 2F8h mov rdi, rbx call translog_buffer_lock cmp byte ptr cs:xmmword_BFEB70+6, r15b jnz short loc_32599 loc_32590: pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_32599: lea r15, PSI_server loc_325A0: mov rdi, ds:qword_1000D0[rbx] test rdi, rdi jnz short loc_325E8 loc_325AC: add rbx, 100090h mov rdi, rbx call _pthread_mutex_unlock movzx r12d, byte ptr cs:xmmword_BFEB70+6 imul rax, r12, 100120h lea rbx, [rax+r14] add rbx, 2F8h mov rdi, rbx call translog_buffer_lock cmp byte ptr cs:xmmword_BFEB70+6, r12b jnz short loc_325A0 jmp short loc_32590 loc_325E8: mov rax, [r15] call qword ptr [rax+160h] jmp short loc_325AC
long long translog_lock() { char v0; // r15 long long *v1; // rbx long long result; // rax char v3; // r12 v0 = BYTE6(xmmword_BFEB70); v1 = &log_descriptor[131108 * BYTE6(xmmword_BFEB70) + 95]; result = translog_buffer_lock(v1); if ( BYTE6(xmmword_BFEB70) != v0 ) { do { if ( *(long long *)((char *)&qword_1000D0 + (_QWORD)v1) ) PSI_server[44](); pthread_mutex_unlock(v1 + 131090); v3 = BYTE6(xmmword_BFEB70); v1 = &log_descriptor[131108 * BYTE6(xmmword_BFEB70) + 95]; result = translog_buffer_lock(v1); } while ( BYTE6(xmmword_BFEB70) != v3 ); } return result; }
translog_lock: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOVZX R15D,byte ptr [0x00cfeb76] LEA R14,[0x4fdef0] IMUL RAX,R15,0x100120 LEA RBX,[RAX + R14*0x1] ADD RBX,0x2f8 MOV RDI,RBX CALL 0x001325f3 CMP byte ptr [0x00cfeb76],R15B JNZ 0x00132599 LAB_00132590: POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00132599: LEA R15,[0x486010] LAB_001325a0: MOV RDI,qword ptr [RBX + 0x1000d0] TEST RDI,RDI JNZ 0x001325e8 LAB_001325ac: ADD RBX,0x100090 MOV RDI,RBX CALL 0x001291c0 MOVZX R12D,byte ptr [0x00cfeb76] IMUL RAX,R12,0x100120 LEA RBX,[RAX + R14*0x1] ADD RBX,0x2f8 MOV RDI,RBX CALL 0x001325f3 CMP byte ptr [0x00cfeb76],R12B JNZ 0x001325a0 JMP 0x00132590 LAB_001325e8: MOV RAX,qword ptr [R15] CALL qword ptr [RAX + 0x160] JMP 0x001325ac
void translog_lock(void) { byte bVar1; int *puVar2; bVar1 = DAT_00cfeb76; puVar2 = &DAT_004fe1e8 + (ulong)DAT_00cfeb76 * 0x100120; translog_buffer_lock(puVar2); if (DAT_00cfeb76 != bVar1) { do { if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + (long)puVar2) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock ((pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + (long)puVar2)); bVar1 = DAT_00cfeb76; puVar2 = &DAT_004fe1e8 + (ulong)DAT_00cfeb76 * 0x100120; translog_buffer_lock(puVar2); } while (DAT_00cfeb76 != bVar1); } return; }
21,719
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::hex_bytes(unsigned char)
monkey531[P]llama/common/json.hpp
static std::string hex_bytes(std::uint8_t byte) { std::string result = "FF"; constexpr const char* nibble_to_hex = "0123456789ABCDEF"; result[0] = nibble_to_hex[byte / 16]; result[1] = nibble_to_hex[byte % 16]; return result; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::hex_bytes(unsigned char): pushq %r14 pushq %rbx pushq %rax movl %esi, %ebx movq %rdi, %r14 leaq 0x10(%rdi), %rax movq %rax, (%rdi) leaq 0x34176(%rip), %rsi # 0xec475 leaq 0x34171(%rip), %rdx # 0xec477 callq 0x229de movl %ebx, %eax shrl $0x4, %eax leaq 0x39466(%rip), %rcx # 0xf177d movb (%rax,%rcx), %al movq (%r14), %rdx movb %al, (%rdx) andl $0xf, %ebx movb (%rbx,%rcx), %al movq (%r14), %rcx movb %al, 0x1(%rcx) movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9hex_bytesEh: push r14 push rbx push rax mov ebx, esi mov r14, rdi lea rax, [rdi+10h] mov [rdi], rax lea rsi, aInvalidStringS_0+41h; "FF" lea rdx, aInvalidStringS_0+43h; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov eax, ebx shr eax, 4 lea rcx, a0123456789abcd; "0123456789ABCDEF" mov al, [rax+rcx] mov rdx, [r14] mov [rdx], al and ebx, 0Fh mov al, [rbx+rcx] mov rcx, [r14] mov [rcx+1], al mov rax, r14 add rsp, 8 pop rbx pop r14 retn
long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::hex_bytes( long long a1, unsigned int a2) { *(_QWORD *)a1 = a1 + 16; std::string::_M_construct<char const*>(a1, "FF", (long long)""); **(_BYTE **)a1 = a0123456789abcd[a2 >> 4]; *(_BYTE *)(*(_QWORD *)a1 + 1LL) = a0123456789abcd[a2 & 0xF]; return a1; }
hex_bytes: PUSH R14 PUSH RBX PUSH RAX MOV EBX,ESI MOV R14,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX LEA RSI,[0x1ec475] LEA RDX,[0x1ec477] CALL 0x001229de MOV EAX,EBX SHR EAX,0x4 LEA RCX,[0x1f177d] MOV AL,byte ptr [RAX + RCX*0x1] MOV RDX,qword ptr [R14] MOV byte ptr [RDX],AL AND EBX,0xf MOV AL,byte ptr [RBX + RCX*0x1] MOV RCX,qword ptr [R14] MOV byte ptr [RCX + 0x1],AL MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 RET
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::hex_bytes(unsigned char) */ serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> * __thiscall nlohmann::json_abi_v3_11_3::detail:: serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::hex_bytes(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,uchar param_1) { int7 in_register_00000031; *(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> **)this = this + 0x10; std::__cxx11::string::_M_construct<char_const*>(this,"FF",""); **(char **)this = "0123456789ABCDEF"[(CONCAT71(in_register_00000031,param_1) & 0xffffffff) >> 4]; *(char *)(*(long *)this + 1) = "0123456789ABCDEF"[(uint)CONCAT71(in_register_00000031,param_1) & 0xf]; return this; }
21,720
my_bitmap_init
eloqsql/mysys/my_bitmap.c
my_bool my_bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits, my_bool thread_safe) { DBUG_ENTER("my_bitmap_init"); map->mutex= 0; if (!buf) { uint size_in_bytes= bitmap_buffer_size(n_bits); uint extra= 0; if (thread_safe) { size_in_bytes= ALIGN_SIZE(size_in_bytes); extra= sizeof(mysql_mutex_t); } if (!(buf= (my_bitmap_map*) my_malloc(key_memory_MY_BITMAP_bitmap, size_in_bytes+extra, MYF(MY_WME)))) DBUG_RETURN(1); if (thread_safe) { map->mutex= (mysql_mutex_t *) ((char*) buf + size_in_bytes); mysql_mutex_init(key_BITMAP_mutex, map->mutex, MY_MUTEX_INIT_FAST); } } else { DBUG_ASSERT(thread_safe == 0); } map->bitmap= buf; map->n_bits= n_bits; create_last_word_mask(map); bitmap_clear_all(map); DBUG_RETURN(0); }
O0
c
my_bitmap_init: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb %cl, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movb %al, -0x1d(%rbp) movq -0x10(%rbp), %rax movq $0x0, 0x10(%rax) cmpq $0x0, -0x18(%rbp) jne 0xb353d movl -0x1c(%rbp), %eax addl $0x1f, %eax shrl $0x5, %eax shll $0x2, %eax movl %eax, -0x24(%rbp) movl $0x0, -0x28(%rbp) cmpb $0x0, -0x1d(%rbp) je 0xb34d4 movl -0x24(%rbp), %eax addq $0x8, %rax subq $0x1, %rax andq $-0x8, %rax movl %eax, -0x24(%rbp) movl $0x48, -0x28(%rbp) leaq 0x39d1a5(%rip), %rax # 0x450680 movl (%rax), %edi movl -0x24(%rbp), %eax addl -0x28(%rbp), %eax movl %eax, %eax movl %eax, %esi movl $0x10, %edx callq 0xba940 movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0xb3506 jmp 0xb34fd movb $0x1, -0x1(%rbp) jmp 0xb3587 cmpb $0x0, -0x1d(%rbp) je 0xb353b movq -0x18(%rbp), %rcx movl -0x24(%rbp), %eax addq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) leaq 0x39c7ab(%rip), %rax # 0x44fcd0 movl (%rax), %edi movq -0x10(%rbp), %rax movq 0x10(%rax), %rsi leaq 0x39d48a(%rip), %rdx # 0x4509c0 callq 0xb3590 jmp 0xb3543 jmp 0xb353f jmp 0xb3541 jmp 0xb3543 movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl -0x1c(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x1c(%rax) movq -0x10(%rbp), %rdi callq 0xb3360 movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movl 0x1c(%rax), %eax addl $0x1f, %eax shrl $0x5, %eax shll $0x2, %eax movl %eax, %eax movl %eax, %edx xorl %esi, %esi callq 0x3b390 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq
my_bitmap_init: push rbp mov rbp, rsp sub rsp, 30h mov al, cl mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_1D], al mov rax, [rbp+var_10] mov qword ptr [rax+10h], 0 cmp [rbp+var_18], 0 jnz loc_B353D mov eax, [rbp+var_1C] add eax, 1Fh shr eax, 5 shl eax, 2 mov [rbp+var_24], eax mov [rbp+var_28], 0 cmp [rbp+var_1D], 0 jz short loc_B34D4 mov eax, [rbp+var_24] add rax, 8 sub rax, 1 and rax, 0FFFFFFFFFFFFFFF8h mov [rbp+var_24], eax mov [rbp+var_28], 48h ; 'H' loc_B34D4: lea rax, key_memory_MY_BITMAP_bitmap mov edi, [rax] mov eax, [rbp+var_24] add eax, [rbp+var_28] mov eax, eax mov esi, eax mov edx, 10h call my_malloc mov [rbp+var_18], rax cmp rax, 0 jnz short loc_B3506 jmp short $+2 loc_B34FD: mov [rbp+var_1], 1 jmp loc_B3587 loc_B3506: cmp [rbp+var_1D], 0 jz short loc_B353B mov rcx, [rbp+var_18] mov eax, [rbp+var_24] add rcx, rax mov rax, [rbp+var_10] mov [rax+10h], rcx lea rax, key_BITMAP_mutex mov edi, [rax] mov rax, [rbp+var_10] mov rsi, [rax+10h] lea rdx, my_fast_mutexattr call inline_mysql_mutex_init_1 loc_B353B: jmp short loc_B3543 loc_B353D: jmp short $+2 loc_B353F: jmp short $+2 loc_B3541: jmp short $+2 loc_B3543: mov rcx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax], rcx mov ecx, [rbp+var_1C] mov rax, [rbp+var_10] mov [rax+1Ch], ecx mov rdi, [rbp+var_10] call create_last_word_mask mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_10] mov eax, [rax+1Ch] add eax, 1Fh shr eax, 5 shl eax, 2 mov eax, eax mov edx, eax xor esi, esi call _memset mov [rbp+var_1], 0 loc_B3587: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char my_bitmap_init(long long a1, long long a2, int a3, char a4) { int v5; // [rsp+8h] [rbp-28h] unsigned int v6; // [rsp+Ch] [rbp-24h] long long v9; // [rsp+18h] [rbp-18h] v9 = a2; *(_QWORD *)(a1 + 16) = 0LL; if ( a2 ) { LABEL_8: *(_QWORD *)a1 = v9; *(_DWORD *)(a1 + 28) = a3; create_last_word_mask(a1); memset(*(_QWORD *)a1, 0LL, 4 * ((unsigned int)(*(_DWORD *)(a1 + 28) + 31) >> 5)); return 0; } v6 = 4 * ((unsigned int)(a3 + 31) >> 5); v5 = 0; if ( a4 ) { v6 = (v6 + 7) & 0xFFFFFFF8; v5 = 72; } v9 = my_malloc(key_memory_MY_BITMAP_bitmap, v5 + v6, 16LL); if ( v9 ) { if ( a4 ) { *(_QWORD *)(a1 + 16) = v6 + v9; inline_mysql_mutex_init_1(key_BITMAP_mutex, *(_QWORD *)(a1 + 16), &my_fast_mutexattr); } goto LABEL_8; } return 1; }
my_bitmap_init: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV AL,CL MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV byte ptr [RBP + -0x1d],AL MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],0x0 CMP qword ptr [RBP + -0x18],0x0 JNZ 0x001b353d MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1f SHR EAX,0x5 SHL EAX,0x2 MOV dword ptr [RBP + -0x24],EAX MOV dword ptr [RBP + -0x28],0x0 CMP byte ptr [RBP + -0x1d],0x0 JZ 0x001b34d4 MOV EAX,dword ptr [RBP + -0x24] ADD RAX,0x8 SUB RAX,0x1 AND RAX,-0x8 MOV dword ptr [RBP + -0x24],EAX MOV dword ptr [RBP + -0x28],0x48 LAB_001b34d4: LEA RAX,[0x550680] MOV EDI,dword ptr [RAX] MOV EAX,dword ptr [RBP + -0x24] ADD EAX,dword ptr [RBP + -0x28] MOV EAX,EAX MOV ESI,EAX MOV EDX,0x10 CALL 0x001ba940 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x001b3506 JMP 0x001b34fd LAB_001b34fd: MOV byte ptr [RBP + -0x1],0x1 JMP 0x001b3587 LAB_001b3506: CMP byte ptr [RBP + -0x1d],0x0 JZ 0x001b353b MOV RCX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x24] ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX LEA RAX,[0x54fcd0] MOV EDI,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x10] LEA RDX,[0x5509c0] CALL 0x001b3590 LAB_001b353b: JMP 0x001b3543 LAB_001b353d: JMP 0x001b353f LAB_001b353f: JMP 0x001b3541 LAB_001b3541: JMP 0x001b3543 LAB_001b3543: MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x1c],ECX MOV RDI,qword ptr [RBP + -0x10] CALL 0x001b3360 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x1c] ADD EAX,0x1f SHR EAX,0x5 SHL EAX,0x2 MOV EAX,EAX MOV EDX,EAX XOR ESI,ESI CALL 0x0013b390 MOV byte ptr [RBP + -0x1],0x0 LAB_001b3587: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 my_bitmap_init(long *param_1,long param_2,int param_3,char param_4) { int local_30; uint local_2c; long local_20; param_1[2] = 0; local_20 = param_2; if (param_2 == 0) { local_2c = (param_3 + 0x1fU >> 5) * 4; local_30 = 0; if (param_4 != '\0') { local_2c = local_2c + 7 & 0xfffffff8; local_30 = 0x48; } local_20 = my_malloc(key_memory_MY_BITMAP_bitmap,local_2c + local_30,0x10); if (local_20 == 0) { return 1; } if (param_4 != '\0') { param_1[2] = local_20 + (ulong)local_2c; inline_mysql_mutex_init(key_BITMAP_mutex,param_1[2],&my_fast_mutexattr); } } *param_1 = local_20; *(int *)((long)param_1 + 0x1c) = param_3; create_last_word_mask(param_1); memset((void *)*param_1,0,(ulong)((*(int *)((long)param_1 + 0x1c) + 0x1fU >> 5) << 2)); return 0; }
21,721
translog_write_variable_record_1group_header
eloqsql/storage/maria/ma_loghandler.c
static void translog_write_variable_record_1group_header(struct st_translog_parts *parts, enum translog_record_type type, SHORT_TRANSACTION_ID short_trid, uint16 header_length, uchar *chunk0_header) { LEX_CUSTRING *part; DBUG_ASSERT(parts->current != 0); /* first part is left for header */ part= parts->parts + (--parts->current); parts->total_record_length+= (translog_size_t) (part->length= header_length); part->str= chunk0_header; /* puts chunk type */ *chunk0_header= (uchar) (type | TRANSLOG_CHUNK_LSN); int2store(chunk0_header + 1, short_trid); /* puts record length */ translog_write_variable_record_1group_code_len(chunk0_header + 3, parts->record_length, header_length); /* puts 0 as chunk length which indicate 1 group record */ int2store(chunk0_header + header_length - 2, 0); }
O0
c
translog_write_variable_record_1group_header: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movw %cx, %ax movw %dx, %cx movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movw %cx, -0xe(%rbp) movw %ax, -0x10(%rbp) movq %r8, -0x18(%rbp) jmp 0x5b343 movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq -0x8(%rbp), %rdx movl 0x8(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x8(%rdx) movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movzwl -0x10(%rbp), %eax movq -0x20(%rbp), %rcx movq %rax, 0x8(%rcx) movl %eax, %ecx movq -0x8(%rbp), %rax addl 0x4(%rax), %ecx movl %ecx, 0x4(%rax) movq -0x18(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movl -0xc(%rbp), %eax orl $0x0, %eax movb %al, %cl movq -0x18(%rbp), %rax movb %cl, (%rax) movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movw -0xe(%rbp), %cx movq -0x28(%rbp), %rax movw %cx, (%rax) movq -0x18(%rbp), %rdi addq $0x3, %rdi movq -0x8(%rbp), %rax movl (%rax), %esi movzwl -0x10(%rbp), %edx callq 0x5b740 movq -0x18(%rbp), %rax movzwl -0x10(%rbp), %ecx movslq %ecx, %rcx addq %rcx, %rax addq $-0x2, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movw $0x0, (%rax) addq $0x30, %rsp popq %rbp retq nopl (%rax)
translog_write_variable_record_1group_header: push rbp mov rbp, rsp sub rsp, 30h mov ax, cx mov cx, dx mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_E], cx mov [rbp+var_10], ax mov [rbp+var_18], r8 jmp short $+2 loc_5B343: mov rax, [rbp+var_8] mov rax, [rax+10h] mov rdx, [rbp+var_8] mov ecx, [rdx+8] add ecx, 0FFFFFFFFh mov [rdx+8], ecx mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_20], rax movzx eax, [rbp+var_10] mov rcx, [rbp+var_20] mov [rcx+8], rax mov ecx, eax mov rax, [rbp+var_8] add ecx, [rax+4] mov [rax+4], ecx mov rcx, [rbp+var_18] mov rax, [rbp+var_20] mov [rax], rcx mov eax, [rbp+var_C] or eax, 0 mov cl, al mov rax, [rbp+var_18] mov [rax], cl mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_28], rax mov cx, [rbp+var_E] mov rax, [rbp+var_28] mov [rax], cx mov rdi, [rbp+var_18] add rdi, 3 mov rax, [rbp+var_8] mov esi, [rax] movzx edx, [rbp+var_10] call translog_write_variable_record_1group_code_len mov rax, [rbp+var_18] movzx ecx, [rbp+var_10] movsxd rcx, ecx add rax, rcx add rax, 0FFFFFFFFFFFFFFFEh mov [rbp+var_30], rax mov rax, [rbp+var_30] mov word ptr [rax], 0 add rsp, 30h pop rbp retn
_WORD * translog_write_variable_record_1group_header( unsigned int *a1, char a2, __int16 a3, unsigned __int16 a4, long long a5) { long long v5; // rax unsigned int v6; // ecx _WORD *result; // rax _QWORD *v8; // [rsp+10h] [rbp-20h] v5 = *((_QWORD *)a1 + 2); v6 = a1[2] - 1; a1[2] = v6; v8 = (_QWORD *)(16LL * v6 + v5); v8[1] = a4; a1[1] += a4; *v8 = a5; *(_BYTE *)a5 = a2; *(_WORD *)(a5 + 1) = a3; translog_write_variable_record_1group_code_len(a5 + 3, *a1, a4); result = (_WORD *)(a4 + a5 - 2); *result = 0; return result; }
translog_write_variable_record_1group_header: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV AX,CX MOV CX,DX MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV word ptr [RBP + -0xe],CX MOV word ptr [RBP + -0x10],AX MOV qword ptr [RBP + -0x18],R8 JMP 0x0015b343 LAB_0015b343: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RDX + 0x8] ADD ECX,-0x1 MOV dword ptr [RDX + 0x8],ECX MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOVZX EAX,word ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x20] MOV qword ptr [RCX + 0x8],RAX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] ADD ECX,dword ptr [RAX + 0x4] MOV dword ptr [RAX + 0x4],ECX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV EAX,dword ptr [RBP + -0xc] OR EAX,0x0 MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX MOV CX,word ptr [RBP + -0xe] MOV RAX,qword ptr [RBP + -0x28] MOV word ptr [RAX],CX MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x3 MOV RAX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RAX] MOVZX EDX,word ptr [RBP + -0x10] CALL 0x0015b740 MOV RAX,qword ptr [RBP + -0x18] MOVZX ECX,word ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX ADD RAX,-0x2 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV word ptr [RAX],0x0 ADD RSP,0x30 POP RBP RET
void translog_write_variable_record_1group_header (int4 *param_1,int1 param_2,int2 param_3,ushort param_4, int1 *param_5) { int iVar1; int8 *puVar2; iVar1 = param_1[2]; param_1[2] = iVar1 - 1U; puVar2 = (int8 *)(*(long *)(param_1 + 4) + (ulong)(iVar1 - 1U) * 0x10); puVar2[1] = (ulong)param_4; param_1[1] = (uint)param_4 + param_1[1]; *puVar2 = param_5; *param_5 = param_2; *(int2 *)(param_5 + 1) = param_3; translog_write_variable_record_1group_code_len(param_5 + 3,*param_1,param_4); *(int2 *)(param_5 + (long)(int)(uint)param_4 + -2) = 0; return; }
21,722
csv_printer::print_header(cmd_params const&)
monkey531[P]llama/examples/llama-bench/llama-bench.cpp
void print_header(const cmd_params & params) override { std::vector<std::string> fields = test::get_fields(); fprintf(fout, "%s\n", join(fields, ",").c_str()); (void) params; }
O2
cpp
csv_printer::print_header(cmd_params const&): pushq %r14 pushq %rbx subq $0x68, %rsp movq %rdi, %rbx callq 0x38df6 leaq 0x10(%rsp), %rdi movq %rax, %rsi callq 0x30dfe movq 0x8(%rbx), %rbx leaq 0x62b39(%rip), %rsi # 0x9b7e8 leaq 0x28(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x29014 leaq 0x48(%rsp), %rdi leaq 0x10(%rsp), %rsi leaq 0x28(%rsp), %rdx callq 0x27c81 leaq 0x48(%rsp), %r14 movq (%r14), %rdx leaq 0x646de(%rip), %rsi # 0x9d3bf movq %rbx, %rdi xorl %eax, %eax callq 0x22b40 movq %r14, %rdi callq 0x22f98 leaq 0x28(%rsp), %rdi callq 0x22f98 leaq 0x10(%rsp), %rdi callq 0x2922e addq $0x68, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x22f98 jmp 0x38d21 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x2922e movq %rbx, %rdi callq 0x22da0 nop
_ZN11csv_printer12print_headerERK10cmd_params: push r14 push rbx sub rsp, 68h mov rbx, rdi call _ZN4test10get_fieldsB5cxx11Ev; test::get_fields(void) lea rdi, [rsp+78h+var_68] mov rsi, rax call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) mov rbx, [rbx+8] lea rsi, aSamplesNsS_0+14h; "," lea rdi, [rsp+78h+var_50] lea rdx, [rsp+78h+var_69] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+78h+var_30] lea rsi, [rsp+78h+var_68] lea rdx, [rsp+78h+var_50] call _ZL4joinINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEES5_RKSt6vectorIT_SaIS7_EERKS5_; join<std::string>(std::vector<std::string> const&,std::string const&) lea r14, [rsp+78h+var_30] mov rdx, [r14] lea rsi, aSFailedToApply_0+1Eh; "%s\n" mov rdi, rbx xor eax, eax call _fprintf mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+78h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+78h+var_68]; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() add rsp, 68h pop rbx pop r14 retn mov rbx, rax lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_38D21 mov rbx, rax loc_38D21: lea rdi, [rsp+arg_8]; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, rbx call __Unwind_Resume
void csv_printer::print_header(csv_printer *this, const cmd_params *a2) { _QWORD *v2; // rax long long v3; // rbx void *v4[3]; // [rsp+10h] [rbp-68h] BYREF _QWORD v5[4]; // [rsp+28h] [rbp-50h] BYREF const char *v6[6]; // [rsp+48h] [rbp-30h] BYREF v2 = (_QWORD *)test::get_fields[abi:cxx11](this, a2); std::vector<std::string>::vector(v4, v2); v3 = *((_QWORD *)this + 1); std::string::basic_string<std::allocator<char>>(v5, (long long)","); join<std::string>((long long)v6, v4, (long long)v5); fprintf(v3, "%s\n", v6[0]); std::string::~string(v6); std::string::~string(v5); std::vector<std::string>::~vector(v4); }
print_header: PUSH R14 PUSH RBX SUB RSP,0x68 MOV RBX,RDI CALL 0x00138df6 LEA RDI,[RSP + 0x10] MOV RSI,RAX CALL 0x00130dfe MOV RBX,qword ptr [RBX + 0x8] LAB_00138ca8: LEA RSI,[0x19b7e8] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0xf] CALL 0x00129014 LAB_00138cbe: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x10] LEA RDX,[RSP + 0x28] CALL 0x00127c81 LAB_00138cd2: LEA R14,[RSP + 0x48] MOV RDX,qword ptr [R14] LEA RSI,[0x19d3bf] MOV RDI,RBX XOR EAX,EAX CALL 0x00122b40 MOV RDI,R14 CALL 0x00122f98 LEA RDI,[RSP + 0x28] CALL 0x00122f98 LEA RDI,[RSP + 0x10] CALL 0x0012922e ADD RSP,0x68 POP RBX POP R14 RET
/* csv_printer::print_header(cmd_params const&) */ void csv_printer::print_header(cmd_params *param_1) { FILE *__stream; vector *pvVar1; allocator local_69; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_68 [24]; string local_50 [32]; int8 local_30 [4]; pvVar1 = (vector *)test::get_fields_abi_cxx11_(); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector(local_68,pvVar1); __stream = *(FILE **)(param_1 + 8); /* try { // try from 00138ca8 to 00138cbd has its CatchHandler @ 00138d1e */ std::__cxx11::string::string<std::allocator<char>>(local_50,",",&local_69); /* try { // try from 00138cbe to 00138cd1 has its CatchHandler @ 00138d0f */ join<std::__cxx11::string>((vector *)local_30,(string *)local_68); fprintf(__stream,"%s\n",local_30[0]); std::__cxx11::string::~string((string *)local_30); std::__cxx11::string::~string(local_50); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_68); return; }
21,723
queue_replace
eloqsql/mysys/queues.c
void queue_replace(QUEUE *queue, uint idx) { uchar *element= queue->root[idx]; uint next_index, elements= queue->elements, half_queue= elements>>1, offset_to_key= queue->offset_to_key, offset_to_queue_pos= queue->offset_to_queue_pos; my_bool first= TRUE; while (idx <= half_queue) { next_index= idx + idx; if (next_index < elements && queue->compare(queue->first_cmp_arg, queue->root[next_index]+offset_to_key, queue->root[next_index+1]+offset_to_key) * queue->max_at_top > 0) next_index++; if (first && queue->compare(queue->first_cmp_arg, queue->root[next_index]+offset_to_key, element+offset_to_key) * queue->max_at_top >= 0) { queue->root[idx]= element; if (offset_to_queue_pos) (*(uint*) (element + offset_to_queue_pos-1))= idx; break; } first= FALSE; queue->root[idx]= queue->root[next_index]; if (offset_to_queue_pos) (*(uint*) (queue->root[idx] + offset_to_queue_pos-1))= idx; idx=next_index; } insert_at(queue, element, idx); }
O3
c
queue_replace: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %esi, %r15d movq %rdi, %rbx movq (%rdi), %rax movl %esi, %ecx movq (%rax,%rcx,8), %rax movl 0x10(%rdi), %ecx movl %ecx, -0x38(%rbp) shrl %ecx movl %ecx, -0x34(%rbp) cmpl %esi, %ecx movq %rax, -0x40(%rbp) jae 0xa31ea movl %r15d, %r13d jmp 0xa329e movl 0x18(%rbx), %ecx movl 0x1c(%rbx), %esi movq %rcx, -0x48(%rbp) addq %rcx, %rax movq %rax, -0x50(%rbp) xorl %r14d, %r14d movq %rsi, -0x30(%rbp) leal (%r15,%r15), %r13d movq (%rbx), %rcx cmpl -0x38(%rbp), %r13d jae 0xa3247 movq 0x8(%rbx), %rdi movl %r13d, %eax movq (%rcx,%rax,8), %rsi movq -0x48(%rbp), %rax addq %rax, %rsi movl %r13d, %r12d orl $0x1, %r12d movq (%rcx,%r12,8), %rdx addq %rax, %rdx callq *0x28(%rbx) imull 0x24(%rbx), %eax testl %eax, %eax jg 0xa323d movl %r13d, %r12d movq (%rbx), %rcx movl %r12d, %r13d movq -0x30(%rbp), %rsi movl %r13d, %r12d testb $0x1, %r14b jne 0xa3272 movq 0x8(%rbx), %rdi movq (%rcx,%r12,8), %rsi addq -0x48(%rbp), %rsi movq -0x50(%rbp), %rdx callq *0x28(%rbx) imull 0x24(%rbx), %eax movq (%rbx), %rcx testl %eax, %eax jns 0xa32bb movq -0x30(%rbp), %rsi movq (%rcx,%r12,8), %rdx movl %r15d, %eax movq %rdx, (%rcx,%rax,8) testq %rsi, %rsi je 0xa328e movq (%rbx), %rcx movq (%rcx,%rax,8), %rax movl %r15d, -0x1(%rax,%rsi) movb $0x1, %r14b movl %r13d, %r15d cmpl -0x34(%rbp), %r13d jbe 0xa3202 movq %rbx, %rdi movq -0x40(%rbp), %rsi movl %r13d, %edx addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xa3082 movl %r15d, %eax movq -0x40(%rbp), %rdx movq %rdx, (%rcx,%rax,8) movq -0x30(%rbp), %rcx testq %rcx, %rcx je 0xa31e2 movl %r15d, -0x1(%rdx,%rcx) jmp 0xa31e2
queue_replace: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r15d, esi mov rbx, rdi mov rax, [rdi] mov ecx, esi mov rax, [rax+rcx*8] mov ecx, [rdi+10h] mov [rbp+var_38], ecx shr ecx, 1 mov [rbp+var_34], ecx cmp ecx, esi mov [rbp+var_40], rax jnb short loc_A31EA loc_A31E2: mov r13d, r15d jmp loc_A329E loc_A31EA: mov ecx, [rbx+18h] mov esi, [rbx+1Ch] mov [rbp+var_48], rcx add rax, rcx mov [rbp+var_50], rax xor r14d, r14d mov [rbp+var_30], rsi loc_A3202: lea r13d, [r15+r15] mov rcx, [rbx] cmp r13d, [rbp+var_38] jnb short loc_A3247 mov rdi, [rbx+8] mov eax, r13d mov rsi, [rcx+rax*8] mov rax, [rbp+var_48] add rsi, rax mov r12d, r13d or r12d, 1 mov rdx, [rcx+r12*8] add rdx, rax call qword ptr [rbx+28h] imul eax, [rbx+24h] test eax, eax jg short loc_A323D mov r12d, r13d loc_A323D: mov rcx, [rbx] mov r13d, r12d mov rsi, [rbp+var_30] loc_A3247: mov r12d, r13d test r14b, 1 jnz short loc_A3272 mov rdi, [rbx+8] mov rsi, [rcx+r12*8] add rsi, [rbp+var_48] mov rdx, [rbp+var_50] call qword ptr [rbx+28h] imul eax, [rbx+24h] mov rcx, [rbx] test eax, eax jns short loc_A32BB mov rsi, [rbp+var_30] loc_A3272: mov rdx, [rcx+r12*8] mov eax, r15d mov [rcx+rax*8], rdx test rsi, rsi jz short loc_A328E mov rcx, [rbx] mov rax, [rcx+rax*8] mov [rax+rsi-1], r15d loc_A328E: mov r14b, 1 mov r15d, r13d cmp r13d, [rbp+var_34] jbe loc_A3202 loc_A329E: mov rdi, rbx mov rsi, [rbp+var_40] mov edx, r13d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp insert_at loc_A32BB: mov eax, r15d mov rdx, [rbp+var_40] mov [rcx+rax*8], rdx mov rcx, [rbp+var_30] test rcx, rcx jz loc_A31E2 mov [rdx+rcx-1], r15d jmp loc_A31E2
long long queue_replace(long long *a1, unsigned int a2) { unsigned int v2; // r15d long long v3; // rax unsigned int v4; // r13d long long v5; // rsi char v6; // r14 long long v7; // rcx long long v8; // r12 int v9; // eax long long v11; // [rsp+0h] [rbp-50h] long long v12; // [rsp+8h] [rbp-48h] long long v13; // [rsp+10h] [rbp-40h] unsigned int v14; // [rsp+18h] [rbp-38h] long long v15; // [rsp+20h] [rbp-30h] v2 = a2; v3 = *(_QWORD *)(*a1 + 8LL * a2); v14 = *((_DWORD *)a1 + 4); v13 = v3; if ( v14 >> 1 >= a2 ) { v5 = *((unsigned int *)a1 + 7); v12 = *((unsigned int *)a1 + 6); v11 = v12 + v3; v6 = 0; v15 = v5; while ( 1 ) { v4 = 2 * v2; v7 = *a1; if ( 2 * v2 < v14 ) { v8 = v4 | 1; if ( (int)(*((_DWORD *)a1 + 9) * ((long long ( *)(long long, long long, long long))a1[5])( a1[1], v12 + *(_QWORD *)(v7 + 8LL * v4), v12 + *(_QWORD *)(v7 + 8 * v8))) <= 0 ) LODWORD(v8) = 2 * v2; v7 = *a1; v4 = v8; v5 = v15; } if ( (v6 & 1) == 0 ) { v9 = ((long long ( *)(long long, long long, long long))a1[5])(a1[1], v12 + *(_QWORD *)(v7 + 8LL * v4), v11); v7 = *a1; if ( *((_DWORD *)a1 + 9) * v9 >= 0 ) { *(_QWORD *)(v7 + 8LL * v2) = v13; if ( v15 ) *(_DWORD *)(v13 + v15 - 1) = v2; break; } v5 = v15; } *(_QWORD *)(v7 + 8LL * v2) = *(_QWORD *)(v7 + 8LL * v4); if ( v5 ) *(_DWORD *)(*(_QWORD *)(*a1 + 8LL * v2) + v5 - 1) = v2; v6 = 1; v2 = v4; if ( v4 > v14 >> 1 ) return insert_at(a1, v13, v4); } } v4 = v2; return insert_at(a1, v13, v4); }
queue_replace: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15D,ESI MOV RBX,RDI MOV RAX,qword ptr [RDI] MOV ECX,ESI MOV RAX,qword ptr [RAX + RCX*0x8] MOV ECX,dword ptr [RDI + 0x10] MOV dword ptr [RBP + -0x38],ECX SHR ECX,0x1 MOV dword ptr [RBP + -0x34],ECX CMP ECX,ESI MOV qword ptr [RBP + -0x40],RAX JNC 0x001a31ea LAB_001a31e2: MOV R13D,R15D JMP 0x001a329e LAB_001a31ea: MOV ECX,dword ptr [RBX + 0x18] MOV ESI,dword ptr [RBX + 0x1c] MOV qword ptr [RBP + -0x48],RCX ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX XOR R14D,R14D MOV qword ptr [RBP + -0x30],RSI LAB_001a3202: LEA R13D,[R15 + R15*0x1] MOV RCX,qword ptr [RBX] CMP R13D,dword ptr [RBP + -0x38] JNC 0x001a3247 MOV RDI,qword ptr [RBX + 0x8] MOV EAX,R13D MOV RSI,qword ptr [RCX + RAX*0x8] MOV RAX,qword ptr [RBP + -0x48] ADD RSI,RAX MOV R12D,R13D OR R12D,0x1 MOV RDX,qword ptr [RCX + R12*0x8] ADD RDX,RAX CALL qword ptr [RBX + 0x28] IMUL EAX,dword ptr [RBX + 0x24] TEST EAX,EAX JG 0x001a323d MOV R12D,R13D LAB_001a323d: MOV RCX,qword ptr [RBX] MOV R13D,R12D MOV RSI,qword ptr [RBP + -0x30] LAB_001a3247: MOV R12D,R13D TEST R14B,0x1 JNZ 0x001a3272 MOV RDI,qword ptr [RBX + 0x8] MOV RSI,qword ptr [RCX + R12*0x8] ADD RSI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x50] CALL qword ptr [RBX + 0x28] IMUL EAX,dword ptr [RBX + 0x24] MOV RCX,qword ptr [RBX] TEST EAX,EAX JNS 0x001a32bb MOV RSI,qword ptr [RBP + -0x30] LAB_001a3272: MOV RDX,qword ptr [RCX + R12*0x8] MOV EAX,R15D MOV qword ptr [RCX + RAX*0x8],RDX TEST RSI,RSI JZ 0x001a328e MOV RCX,qword ptr [RBX] MOV RAX,qword ptr [RCX + RAX*0x8] MOV dword ptr [RAX + RSI*0x1 + -0x1],R15D LAB_001a328e: MOV R14B,0x1 MOV R15D,R13D CMP R13D,dword ptr [RBP + -0x34] JBE 0x001a3202 LAB_001a329e: MOV RDI,RBX MOV RSI,qword ptr [RBP + -0x40] MOV EDX,R13D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001a3082 LAB_001a32bb: MOV EAX,R15D MOV RDX,qword ptr [RBP + -0x40] MOV qword ptr [RCX + RAX*0x8],RDX MOV RCX,qword ptr [RBP + -0x30] TEST RCX,RCX JZ 0x001a31e2 MOV dword ptr [RDX + RCX*0x1 + -0x1],R15D JMP 0x001a31e2
void queue_replace(long *param_1,uint param_2) { uint uVar1; long lVar2; int iVar3; uint uVar4; int iVar5; uint uVar6; ulong uVar7; long lVar8; ulong uVar9; uint uVar10; ulong uVar11; ulong uVar12; bool bVar13; uVar12 = (ulong)param_2; lVar2 = *(long *)(*param_1 + (ulong)param_2 * 8); uVar1 = *(uint *)(param_1 + 2); uVar6 = uVar1 >> 1; if (param_2 <= uVar6) { uVar7 = (ulong)*(uint *)(param_1 + 3); uVar9 = (ulong)*(uint *)((long)param_1 + 0x1c); bVar13 = false; do { iVar3 = (int)uVar12; uVar4 = iVar3 * 2; lVar8 = *param_1; uVar10 = uVar4; if (uVar4 < uVar1) { iVar5 = (*(code *)param_1[5]) (param_1[1],*(long *)(lVar8 + (ulong)uVar4 * 8) + uVar7, *(long *)(lVar8 + (ulong)(uVar4 | 1) * 8) + uVar7); uVar10 = uVar4 | 1; if (iVar5 * *(int *)((long)param_1 + 0x24) < 1) { uVar10 = uVar4; } lVar8 = *param_1; } uVar11 = (ulong)uVar10; if (!bVar13) { iVar5 = (*(code *)param_1[5]) (param_1[1],*(long *)(lVar8 + uVar11 * 8) + uVar7,lVar2 + uVar7); lVar8 = *param_1; if (-1 < iVar5 * *(int *)((long)param_1 + 0x24)) { *(long *)(lVar8 + uVar12 * 8) = lVar2; if (uVar9 != 0) { *(int *)(lVar2 + -1 + uVar9) = iVar3; } break; } } *(int8 *)(lVar8 + uVar12 * 8) = *(int8 *)(lVar8 + uVar11 * 8); if (uVar9 != 0) { *(int *)(*(long *)(*param_1 + uVar12 * 8) + -1 + uVar9) = iVar3; } bVar13 = true; uVar12 = uVar11; } while (uVar10 <= uVar6); } insert_at(param_1,lVar2,uVar12); return; }
21,724
dequantize_row_q2_K
ngxson[P]ggml-easy/ggml/src/ggml-quants.c
void dequantize_row_q2_K(const block_q2_K * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k) { assert(k % QK_K == 0); const int nb = k / QK_K; for (int i = 0; i < nb; i++) { const float d = GGML_FP16_TO_FP32(x[i].d); const float min = GGML_FP16_TO_FP32(x[i].dmin); const uint8_t * q = x[i].qs; int is = 0; float dl, ml; for (int n = 0; n < QK_K; n += 128) { int shift = 0; for (int j = 0; j < 4; ++j) { uint8_t sc = x[i].scales[is++]; dl = d * (sc & 0xF); ml = min * (sc >> 4); for (int l = 0; l < 16; ++l) *y++ = dl * ((int8_t)((q[l] >> shift) & 3)) - ml; sc = x[i].scales[is++]; dl = d * (sc & 0xF); ml = min * (sc >> 4); for (int l = 0; l < 16; ++l) *y++ = dl * ((int8_t)((q[l+16] >> shift) & 3)) - ml; shift += 2; } q += 32; } } }
O2
c
dequantize_row_q2_K: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %rax movl $0x100, %ecx # imm = 0x100 cqto idivq %rcx xorl %edx, %edx testl %eax, %eax cmovlel %edx, %eax leaq 0x20(%rdi), %r8 movq 0x3b407(%rip), %r9 # 0x6cfa8 movaps 0x1d8f8(%rip), %xmm0 # 0x4f4a0 cmpq %rax, %rdx je 0x31ccd imulq $0x54, %rdx, %rcx leaq (%rdi,%rcx), %r10 leaq (%rdi,%rcx), %r11 addq $0x10, %r11 movzwl 0x40(%r11), %ecx movss (%r9,%rcx,4), %xmm1 movzwl 0x42(%r11), %ecx movss (%r9,%rcx,4), %xmm2 xorps %xmm0, %xmm2 xorl %ebx, %ebx movq %r8, %r14 xorl %ebp, %ebp cmpl $0xff, %ebp ja 0x31cc1 movslq %ebx, %rbx xorl %ecx, %ecx xorl %r15d, %r15d cmpl $0x4, %r15d je 0x31cb1 movzbl (%r10,%rbx), %r12d movl %r12d, %r13d andl $0xf, %r13d cvtsi2ss %r13d, %xmm3 shrl $0x4, %r12d cvtsi2ss %r12d, %xmm4 mulss %xmm1, %xmm3 mulss %xmm2, %xmm4 xorl %r12d, %r12d cmpq $0x10, %r12 je 0x31c50 movzbl (%r11,%r12), %r13d shrl %cl, %r13d andl $0x3, %r13d cvtsi2ss %r13d, %xmm5 mulss %xmm3, %xmm5 addss %xmm4, %xmm5 movss %xmm5, (%rsi) addq $0x4, %rsi incq %r12 jmp 0x31c24 movzbl 0x1(%rbx,%r10), %r12d movl %r12d, %r13d andl $0xf, %r13d cvtsi2ss %r13d, %xmm3 shrl $0x4, %r12d cvtsi2ss %r12d, %xmm4 mulss %xmm1, %xmm3 mulss %xmm2, %xmm4 xorl %r12d, %r12d cmpq $0x10, %r12 je 0x31ca2 movzbl (%r14,%r12), %r13d shrl %cl, %r13d andl $0x3, %r13d cvtsi2ss %r13d, %xmm5 mulss %xmm3, %xmm5 addss %xmm4, %xmm5 movss %xmm5, (%rsi) addq $0x4, %rsi incq %r12 jmp 0x31c76 addq $0x2, %rbx addl $0x2, %ecx incl %r15d jmp 0x31bf5 addq $0x20, %r11 subl $-0x80, %ebp addq $0x20, %r14 jmp 0x31be1 incq %rdx addq $0x54, %r8 jmp 0x31ba8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
dequantize_row_q2_K: push rbp push r15 push r14 push r13 push r12 push rbx mov rax, rdx mov ecx, 100h cqo idiv rcx xor edx, edx test eax, eax cmovle eax, edx lea r8, [rdi+20h] mov r9, cs:ggml_table_f32_f16_ptr movaps xmm0, cs:xmmword_4F4A0 loc_31BA8: cmp rdx, rax jz loc_31CCD imul rcx, rdx, 54h ; 'T' lea r10, [rdi+rcx] lea r11, [rdi+rcx] add r11, 10h movzx ecx, word ptr [r11+40h] movss xmm1, dword ptr [r9+rcx*4] movzx ecx, word ptr [r11+42h] movss xmm2, dword ptr [r9+rcx*4] xorps xmm2, xmm0 xor ebx, ebx mov r14, r8 xor ebp, ebp loc_31BE1: cmp ebp, 0FFh ja loc_31CC1 movsxd rbx, ebx xor ecx, ecx xor r15d, r15d loc_31BF5: cmp r15d, 4 jz loc_31CB1 movzx r12d, byte ptr [r10+rbx] mov r13d, r12d and r13d, 0Fh cvtsi2ss xmm3, r13d shr r12d, 4 cvtsi2ss xmm4, r12d mulss xmm3, xmm1 mulss xmm4, xmm2 xor r12d, r12d loc_31C24: cmp r12, 10h jz short loc_31C50 movzx r13d, byte ptr [r11+r12] shr r13d, cl and r13d, 3 cvtsi2ss xmm5, r13d mulss xmm5, xmm3 addss xmm5, xmm4 movss dword ptr [rsi], xmm5 add rsi, 4 inc r12 jmp short loc_31C24 loc_31C50: movzx r12d, byte ptr [rbx+r10+1] mov r13d, r12d and r13d, 0Fh cvtsi2ss xmm3, r13d shr r12d, 4 cvtsi2ss xmm4, r12d mulss xmm3, xmm1 mulss xmm4, xmm2 xor r12d, r12d loc_31C76: cmp r12, 10h jz short loc_31CA2 movzx r13d, byte ptr [r14+r12] shr r13d, cl and r13d, 3 cvtsi2ss xmm5, r13d mulss xmm5, xmm3 addss xmm5, xmm4 movss dword ptr [rsi], xmm5 add rsi, 4 inc r12 jmp short loc_31C76 loc_31CA2: add rbx, 2 add ecx, 2 inc r15d jmp loc_31BF5 loc_31CB1: add r11, 20h ; ' ' sub ebp, 0FFFFFF80h add r14, 20h ; ' ' jmp loc_31BE1 loc_31CC1: inc rdx add r8, 54h ; 'T' jmp loc_31BA8 loc_31CCD: pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long dequantize_row_q2_K(long long a1, float *a2, long long a3) { long long result; // rax long long v4; // rdx long long v5; // r8 long long v6; // r10 long long v7; // r11 float v8; // xmm1_4 float v9; // xmm2_4 long long v10; // rbx long long v11; // r14 unsigned int i; // ebp char v13; // cl int j; // r15d float v15; // xmm3_4 float v16; // xmm4_4 long long k; // r12 float v18; // xmm3_4 float v19; // xmm4_4 long long m; // r12 result = a3 / 256; v4 = 0LL; if ( (int)result <= 0 ) result = 0LL; v5 = a1 + 32; while ( v4 != result ) { v6 = a1 + 84 * v4; v7 = v6 + 16; v8 = ggml_table_f32_f16[*(unsigned __int16 *)(v6 + 80)]; v9 = -ggml_table_f32_f16[*(unsigned __int16 *)(v6 + 82)]; LODWORD(v10) = 0; v11 = v5; for ( i = 0; i <= 0xFF; i += 128 ) { v10 = (int)v10; v13 = 0; for ( j = 0; j != 4; ++j ) { v15 = (float)(*(_BYTE *)(v6 + v10) & 0xF) * v8; v16 = (float)(*(unsigned __int8 *)(v6 + v10) >> 4) * v9; for ( k = 0LL; k != 16; ++k ) *a2++ = (float)((float)((*(unsigned __int8 *)(v7 + k) >> v13) & 3) * v15) + v16; v18 = (float)(*(_BYTE *)(v10 + v6 + 1) & 0xF) * v8; v19 = (float)(*(unsigned __int8 *)(v10 + v6 + 1) >> 4) * v9; for ( m = 0LL; m != 16; ++m ) *a2++ = (float)((float)((*(unsigned __int8 *)(v11 + m) >> v13) & 3) * v18) + v19; v10 += 2LL; v13 += 2; } v7 += 32LL; v11 += 32LL; } ++v4; v5 += 84LL; } return result; }
dequantize_row_q2_K: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RAX,RDX MOV ECX,0x100 CQO IDIV RCX XOR EDX,EDX TEST EAX,EAX CMOVLE EAX,EDX LEA R8,[RDI + 0x20] MOV R9,qword ptr [0x0016cfa8] MOVAPS XMM0,xmmword ptr [0x0014f4a0] LAB_00131ba8: CMP RDX,RAX JZ 0x00131ccd IMUL RCX,RDX,0x54 LEA R10,[RDI + RCX*0x1] LEA R11,[RDI + RCX*0x1] ADD R11,0x10 MOVZX ECX,word ptr [R11 + 0x40] MOVSS XMM1,dword ptr [R9 + RCX*0x4] MOVZX ECX,word ptr [R11 + 0x42] MOVSS XMM2,dword ptr [R9 + RCX*0x4] XORPS XMM2,XMM0 XOR EBX,EBX MOV R14,R8 XOR EBP,EBP LAB_00131be1: CMP EBP,0xff JA 0x00131cc1 MOVSXD RBX,EBX XOR ECX,ECX XOR R15D,R15D LAB_00131bf5: CMP R15D,0x4 JZ 0x00131cb1 MOVZX R12D,byte ptr [R10 + RBX*0x1] MOV R13D,R12D AND R13D,0xf CVTSI2SS XMM3,R13D SHR R12D,0x4 CVTSI2SS XMM4,R12D MULSS XMM3,XMM1 MULSS XMM4,XMM2 XOR R12D,R12D LAB_00131c24: CMP R12,0x10 JZ 0x00131c50 MOVZX R13D,byte ptr [R11 + R12*0x1] SHR R13D,CL AND R13D,0x3 CVTSI2SS XMM5,R13D MULSS XMM5,XMM3 ADDSS XMM5,XMM4 MOVSS dword ptr [RSI],XMM5 ADD RSI,0x4 INC R12 JMP 0x00131c24 LAB_00131c50: MOVZX R12D,byte ptr [RBX + R10*0x1 + 0x1] MOV R13D,R12D AND R13D,0xf CVTSI2SS XMM3,R13D SHR R12D,0x4 CVTSI2SS XMM4,R12D MULSS XMM3,XMM1 MULSS XMM4,XMM2 XOR R12D,R12D LAB_00131c76: CMP R12,0x10 JZ 0x00131ca2 MOVZX R13D,byte ptr [R14 + R12*0x1] SHR R13D,CL AND R13D,0x3 CVTSI2SS XMM5,R13D MULSS XMM5,XMM3 ADDSS XMM5,XMM4 MOVSS dword ptr [RSI],XMM5 ADD RSI,0x4 INC R12 JMP 0x00131c76 LAB_00131ca2: ADD RBX,0x2 ADD ECX,0x2 INC R15D JMP 0x00131bf5 LAB_00131cb1: ADD R11,0x20 SUB EBP,-0x80 ADD R14,0x20 JMP 0x00131be1 LAB_00131cc1: INC RDX ADD R8,0x54 JMP 0x00131ba8 LAB_00131ccd: POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void dequantize_row_q2_K(long param_1,float *param_2,long param_3) { long lVar1; float fVar2; byte bVar3; uint uVar4; int *puVar5; ulong uVar6; byte bVar7; ulong uVar8; long lVar9; uint uVar10; long lVar11; long lVar12; long lVar13; long lVar14; int iVar15; float fVar16; puVar5 = PTR_ggml_table_f32_f16_0016cfa8; uVar4 = _DAT_0014f4a0; uVar8 = 0; uVar6 = param_3 / 0x100 & 0xffffffff; if ((int)(param_3 / 0x100) < 1) { uVar6 = uVar8; } lVar11 = param_1 + 0x20; for (; uVar8 != uVar6; uVar8 = uVar8 + 1) { lVar1 = param_1 + uVar8 * 0x54; lVar14 = param_1 + uVar8 * 0x54; lVar12 = lVar14 + 0x10; fVar2 = *(float *)(puVar5 + (ulong)*(ushort *)(lVar14 + 0x50) * 4); fVar16 = (float)(*(uint *)(puVar5 + (ulong)*(ushort *)(lVar14 + 0x52) * 4) ^ uVar4); lVar9 = 0; lVar14 = lVar11; for (uVar10 = 0; uVar10 < 0x100; uVar10 = uVar10 + 0x80) { lVar9 = (long)(int)lVar9; bVar7 = 0; for (iVar15 = 0; iVar15 != 4; iVar15 = iVar15 + 1) { bVar3 = *(byte *)(lVar1 + lVar9); for (lVar13 = 0; lVar13 != 0x10; lVar13 = lVar13 + 1) { *param_2 = (float)(*(byte *)(lVar12 + lVar13) >> (bVar7 & 0x1f) & 3) * (float)(bVar3 & 0xf) * fVar2 + (float)(bVar3 >> 4) * fVar16; param_2 = param_2 + 1; } bVar3 = *(byte *)(lVar9 + 1 + lVar1); for (lVar13 = 0; lVar13 != 0x10; lVar13 = lVar13 + 1) { *param_2 = (float)(*(byte *)(lVar14 + lVar13) >> (bVar7 & 0x1f) & 3) * (float)(bVar3 & 0xf) * fVar2 + (float)(bVar3 >> 4) * fVar16; param_2 = param_2 + 1; } lVar9 = lVar9 + 2; bVar7 = bVar7 + 2; } lVar12 = lVar12 + 0x20; lVar14 = lVar14 + 0x20; } lVar11 = lVar11 + 0x54; } return; }
21,725
fabe13_sincos
farukalpay[P]FABE/fabe13/fabe13.c
void fabe13_sincos(const double * in, double * sin_out, double * cos_out, int n) { if (n <= 0) return; // 1. Handle Small N case separately if (n < SMALL_N_THRESHOLD) { fabe13_sincos_scalar_unrolled(in, sin_out, cos_out, n); return; } // 2. Check alignment for larger N (only matters for x86 paths now) bool aligned = (((uintptr_t)in & (FABE13_ALIGNMENT - 1)) == 0) && (((uintptr_t)sin_out & (FABE13_ALIGNMENT - 1)) == 0) && (((uintptr_t)cos_out & (FABE13_ALIGNMENT - 1)) == 0); // 3. Direct dispatch based on detected type and alignment switch (active_impl_type) { #if FABE13_PLATFORM_ARM case IMPL_NEON: fabe13_sincos_neon(in, sin_out, cos_out, n); // NEON path ignores 'aligned' internally break; #endif #if FABE13_PLATFORM_X86 case IMPL_AVX2: fabe13_sincos_avx2(in, sin_out, cos_out, n, aligned); break; #if defined(__AVX512F__) case IMPL_AVX512: fabe13_sincos_avx512(in, sin_out, cos_out, n, aligned); break; #endif // __AVX512F__ #endif // FABE13_PLATFORM_X86 case IMPL_SCALAR: default: // Use non-unrolled scalar for larger N if SIMD failed or wasn't available fabe13_sincos_scalar_simple(in, sin_out, cos_out, n); break; } }
O0
c
fabe13_sincos: subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq %rdx, 0x10(%rsp) movl %ecx, 0xc(%rsp) cmpl $0x0, 0xc(%rsp) jg 0x3393 jmp 0x3458 cmpl $0x20, 0xc(%rsp) jge 0x33b7 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdx movl 0xc(%rsp), %ecx callq 0x3460 jmp 0x3458 movq 0x20(%rsp), %rcx andq $0x3f, %rcx xorl %eax, %eax cmpq $0x0, %rcx movb %al, 0xa(%rsp) jne 0x33f5 movq 0x18(%rsp), %rcx andq $0x3f, %rcx xorl %eax, %eax cmpq $0x0, %rcx movb %al, 0xa(%rsp) jne 0x33f5 movq 0x10(%rsp), %rax andq $0x3f, %rax cmpq $0x0, %rax sete %al movb %al, 0xa(%rsp) movb 0xa(%rsp), %al andb $0x1, %al movb %al, 0xb(%rsp) movl 0x5ceb(%rip), %eax # 0x90f0 movl %eax, 0x4(%rsp) testl %eax, %eax je 0x343e jmp 0x340f movl 0x4(%rsp), %eax subl $0x2, %eax jne 0x3440 jmp 0x341a movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdx movl 0xc(%rsp), %ecx movb 0xb(%rsp), %al andb $0x1, %al movzbl %al, %r8d callq 0x3610 jmp 0x3458 jmp 0x3440 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdx movl 0xc(%rsp), %ecx callq 0x4b00 addq $0x28, %rsp retq nopl (%rax)
fabe13_sincos: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov [rsp+28h+var_18], rdx mov [rsp+28h+var_1C], ecx cmp [rsp+28h+var_1C], 0 jg short loc_3393 jmp loc_3458 loc_3393: cmp [rsp+28h+var_1C], 20h ; ' ' jge short loc_33B7 mov rdi, [rsp+28h+var_8] mov rsi, [rsp+28h+var_10] mov rdx, [rsp+28h+var_18] mov ecx, [rsp+28h+var_1C] call fabe13_sincos_scalar_unrolled jmp loc_3458 loc_33B7: mov rcx, [rsp+28h+var_8] and rcx, 3Fh xor eax, eax cmp rcx, 0 mov [rsp+28h+var_1E], al jnz short loc_33F5 mov rcx, [rsp+28h+var_10] and rcx, 3Fh xor eax, eax cmp rcx, 0 mov [rsp+28h+var_1E], al jnz short loc_33F5 mov rax, [rsp+28h+var_18] and rax, 3Fh cmp rax, 0 setz al mov [rsp+28h+var_1E], al loc_33F5: mov al, [rsp+28h+var_1E] and al, 1 mov [rsp+28h+var_1D], al mov eax, cs:active_impl_type mov [rsp+28h+var_24], eax test eax, eax jz short loc_343E jmp short $+2 loc_340F: mov eax, [rsp+28h+var_24] sub eax, 2 jnz short loc_3440 jmp short $+2 loc_341A: mov rdi, [rsp+28h+var_8] mov rsi, [rsp+28h+var_10] mov rdx, [rsp+28h+var_18] mov ecx, [rsp+28h+var_1C] mov al, [rsp+28h+var_1D] and al, 1 movzx r8d, al call fabe13_sincos_avx2 jmp short loc_3458 loc_343E: jmp short $+2 loc_3440: mov rdi, [rsp+28h+var_8] mov rsi, [rsp+28h+var_10] mov rdx, [rsp+28h+var_18] mov ecx, [rsp+28h+var_1C] call fabe13_sincos_scalar_simple loc_3458: add rsp, 28h retn
long long fabe13_sincos(long long a1, long long a2, long long a3, int a4) { long long result; // rax bool v5; // [rsp+Ah] [rbp-1Eh] if ( a4 > 0 ) { if ( a4 >= 32 ) { v5 = 0; if ( (a1 & 0x3F) == 0 ) { v5 = 0; if ( (a2 & 0x3F) == 0 ) v5 = (a3 & 0x3F) == 0; } if ( active_impl_type == 2 ) return fabe13_sincos_avx2(a1, a2, a3, (unsigned int)a4, v5); else return fabe13_sincos_scalar_simple(a1, a2, a3, (unsigned int)a4); } else { return fabe13_sincos_scalar_unrolled(a1, a2, a3, (unsigned int)a4); } } return result; }
fabe13_sincos: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x10],RDX MOV dword ptr [RSP + 0xc],ECX CMP dword ptr [RSP + 0xc],0x0 JG 0x00103393 JMP 0x00103458 LAB_00103393: CMP dword ptr [RSP + 0xc],0x20 JGE 0x001033b7 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RSP + 0xc] CALL 0x00103460 JMP 0x00103458 LAB_001033b7: MOV RCX,qword ptr [RSP + 0x20] AND RCX,0x3f XOR EAX,EAX CMP RCX,0x0 MOV byte ptr [RSP + 0xa],AL JNZ 0x001033f5 MOV RCX,qword ptr [RSP + 0x18] AND RCX,0x3f XOR EAX,EAX CMP RCX,0x0 MOV byte ptr [RSP + 0xa],AL JNZ 0x001033f5 MOV RAX,qword ptr [RSP + 0x10] AND RAX,0x3f CMP RAX,0x0 SETZ AL MOV byte ptr [RSP + 0xa],AL LAB_001033f5: MOV AL,byte ptr [RSP + 0xa] AND AL,0x1 MOV byte ptr [RSP + 0xb],AL MOV EAX,dword ptr [0x001090f0] MOV dword ptr [RSP + 0x4],EAX TEST EAX,EAX JZ 0x0010343e JMP 0x0010340f LAB_0010340f: MOV EAX,dword ptr [RSP + 0x4] SUB EAX,0x2 JNZ 0x00103440 JMP 0x0010341a LAB_0010341a: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RSP + 0xc] MOV AL,byte ptr [RSP + 0xb] AND AL,0x1 MOVZX R8D,AL CALL 0x00103610 JMP 0x00103458 LAB_0010343e: JMP 0x00103440 LAB_00103440: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RSP + 0xc] CALL 0x00104b00 LAB_00103458: ADD RSP,0x28 RET
void fabe13_sincos(ulong param_1,ulong param_2,ulong param_3,int param_4) { bool local_1e; if (0 < param_4) { if (param_4 < 0x20) { fabe13_sincos_scalar_unrolled(param_1,param_2,param_3,param_4); } else { local_1e = false; if (((param_1 & 0x3f) == 0) && (local_1e = false, (param_2 & 0x3f) == 0)) { local_1e = (param_3 & 0x3f) == 0; } if ((active_impl_type == 0) || (active_impl_type != 2)) { fabe13_sincos_scalar_simple(param_1,param_2,param_3,param_4); } else { fabe13_sincos_avx2(param_1,param_2,param_3,param_4,local_1e); } } } return; }
21,726
emit_label
bluesky950520[P]quickjs/quickjs.c
static int emit_label(JSParseState *s, int label) { if (label >= 0) { emit_op(s, OP_label); emit_u32(s, label); s->cur_func->label_slots[label].pos = s->cur_func->byte_code.size; return s->cur_func->byte_code.size - 4; } else { return -1; } }
O1
c
emit_label: testl %esi, %esi js 0x64f6c pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movl %esi, %ebx movq %rdi, %r14 movq 0x90(%rdi), %rax movl $0x138, %r15d # imm = 0x138 leaq (%rax,%r15), %rdi movl 0x140(%rax), %ecx movl %ecx, 0x168(%rax) movl $0xb5, %esi callq 0x1b4d0 addq 0x90(%r14), %r15 leaq 0xc(%rsp), %rsi movl %ebx, (%rsi) movl $0x4, %edx movq %r15, %rdi callq 0x1b422 movq 0x90(%r14), %rax movl 0x140(%rax), %ecx movq 0x170(%rax), %rax movl %ebx, %edx leaq (%rdx,%rdx,2), %rdx movl %ecx, 0x4(%rax,%rdx,8) addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq
emit_label: test esi, esi js short locret_64F6C push r15 push r14 push rbx sub rsp, 10h mov ebx, esi mov r14, rdi mov rax, [rdi+90h] mov r15d, 138h lea rdi, [rax+r15] mov ecx, [rax+140h] mov [rax+168h], ecx mov esi, 0B5h call dbuf_putc add r15, [r14+90h] lea rsi, [rsp+28h+var_1C] mov [rsi], ebx mov edx, 4 mov rdi, r15 call dbuf_put mov rax, [r14+90h] mov ecx, [rax+140h] mov rax, [rax+170h] mov edx, ebx lea rdx, [rdx+rdx*2] mov [rax+rdx*8+4], ecx add rsp, 10h pop rbx pop r14 pop r15 locret_64F6C: retn
long long emit_label(long long a1, int a2) { long long v2; // rax _QWORD *v3; // r15 long long v4; // rax int v5; // ecx long long result; // rax int v7[7]; // [rsp+0h] [rbp-1Ch] BYREF if ( a2 >= 0 ) { v2 = *(_QWORD *)(a1 + 144); *(_DWORD *)(v2 + 360) = *(_DWORD *)(v2 + 320); dbuf_putc((_QWORD *)(v2 + 312), 181); v3 = (_QWORD *)(*(_QWORD *)(a1 + 144) + 312LL); v7[0] = a2; dbuf_put(v3, (long long)v7, 4LL); v4 = *(_QWORD *)(a1 + 144); v5 = *(_DWORD *)(v4 + 320); result = *(_QWORD *)(v4 + 368); *(_DWORD *)(result + 24LL * (unsigned int)a2 + 4) = v5; } return result; }
emit_label: TEST ESI,ESI JS 0x00164f6c PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV EBX,ESI MOV R14,RDI MOV RAX,qword ptr [RDI + 0x90] MOV R15D,0x138 LEA RDI,[RAX + R15*0x1] MOV ECX,dword ptr [RAX + 0x140] MOV dword ptr [RAX + 0x168],ECX MOV ESI,0xb5 CALL 0x0011b4d0 ADD R15,qword ptr [R14 + 0x90] LEA RSI,[RSP + 0xc] MOV dword ptr [RSI],EBX MOV EDX,0x4 MOV RDI,R15 CALL 0x0011b422 MOV RAX,qword ptr [R14 + 0x90] MOV ECX,dword ptr [RAX + 0x140] MOV RAX,qword ptr [RAX + 0x170] MOV EDX,EBX LEA RDX,[RDX + RDX*0x2] MOV dword ptr [RAX + RDX*0x8 + 0x4],ECX ADD RSP,0x10 POP RBX POP R14 POP R15 LAB_00164f6c: RET
void emit_label(long param_1,uint param_2) { long lVar1; uint local_1c; if (-1 < (int)param_2) { lVar1 = *(long *)(param_1 + 0x90); *(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140); dbuf_putc(lVar1 + 0x138,0xb5); local_1c = param_2; dbuf_put(*(long *)(param_1 + 0x90) + 0x138,&local_1c,4); *(int4 *)(*(long *)(*(long *)(param_1 + 0x90) + 0x170) + 4 + (ulong)param_2 * 0x18) = *(int4 *)(*(long *)(param_1 + 0x90) + 0x140); } return; }
21,727
nglog::tools::AlsoErrorWrite(nglog::LogSeverity, char const*, char const*)
ng-log[P]ng-log/src/utilities.cc
void AlsoErrorWrite(LogSeverity severity, const char* tag, const char* message) noexcept { #if defined(NGLOG_OS_WINDOWS) (void)severity; (void)tag; // On Windows, also output to the debugger ::OutputDebugStringA(message); #elif defined(NGLOG_OS_ANDROID) constexpr int android_log_levels[] = { ANDROID_LOG_INFO, ANDROID_LOG_WARN, ANDROID_LOG_ERROR, ANDROID_LOG_FATAL, }; __android_log_write(android_log_levels[severity], tag, message); #else (void)severity; (void)tag; (void)message; #endif }
O3
cpp
nglog::tools::AlsoErrorWrite(nglog::LogSeverity, char const*, char const*): retq
_ZN5nglog5tools14AlsoErrorWriteENS_11LogSeverityEPKcS3_: retn
void nglog::tools::AlsoErrorWrite() { ; }
AlsoErrorWrite: RET
/* nglog::tools::AlsoErrorWrite(nglog::LogSeverity, char const*, char const*) */ void nglog::tools::AlsoErrorWrite(void) { return; }
21,728
ma_bitmap_flush_all
eloqsql/storage/maria/ma_bitmap.c
my_bool _ma_bitmap_flush_all(MARIA_SHARE *share) { my_bool res= 0; uint send_signal= 0; MARIA_FILE_BITMAP *bitmap= &share->bitmap; DBUG_ENTER("_ma_bitmap_flush_all"); #ifdef EXTRA_DEBUG_BITMAP { char buff[160]; uint len= my_sprintf(buff, (buff, "bitmap_flush: fd: %d id: %u " "changed: %d changed_not_flushed: %d " "flush_all_requested: %d", share->bitmap.file.file, share->id, bitmap->changed, bitmap->changed_not_flushed, bitmap->flush_all_requested)); (void) translog_log_debug_info(0, LOGREC_DEBUG_INFO_QUERY, (uchar*) buff, len); } #endif mysql_mutex_lock(&bitmap->bitmap_lock); if (!bitmap->changed && !bitmap->changed_not_flushed) { mysql_mutex_unlock(&bitmap->bitmap_lock); DBUG_RETURN(0); } _ma_bitmap_mark_file_changed(share, 0); /* The following should be true as it was tested above. We have to test this again as _ma_bitmap_mark_file_changed() did temporarly release the bitmap mutex. */ if (bitmap->changed || bitmap->changed_not_flushed) { bitmap->flush_all_requested++; bitmap->waiting_for_non_flushable++; #if !WRONG_BITMAP_FLUSH while (bitmap->non_flushable > 0) { DBUG_PRINT("info", ("waiting for bitmap to be flushable")); mysql_cond_wait(&bitmap->bitmap_cond, &bitmap->bitmap_lock); } #endif bitmap->waiting_for_non_flushable--; #ifdef EXTRA_DEBUG_BITMAP { char tmp[MAX_BITMAP_INFO_LENGTH]; size_t len; len= _ma_get_bitmap_description(bitmap, bitmap->map, bitmap->page, tmp); (void) translog_log_debug_info(0, LOGREC_DEBUG_INFO_QUERY, (uchar*) tmp, len); } #endif DBUG_ASSERT(bitmap->flush_all_requested == 1); /* Bitmap is in a flushable state: its contents in memory are reflected by log records (complete REDO-UNDO groups) and all bitmap pages are unpinned. We keep the mutex to preserve this situation, and flush to the file. */ if (bitmap->changed) { bitmap->changed= FALSE; res= write_changed_bitmap(share, bitmap); } /* We do NOT use FLUSH_KEEP_LAZY because we must be sure that bitmap pages have been flushed. That's a condition of correctness of Recovery: data pages may have been all flushed, if we write the checkpoint record Recovery will start from after their REDOs. If bitmap page was not flushed, as the REDOs about it will be skipped, it will wrongly not be recovered. If bitmap pages had a rec_lsn it would be different. There should be no pinned pages as bitmap->non_flushable==0. */ if (flush_pagecache_blocks_with_filter(share->pagecache, &bitmap->file, FLUSH_KEEP, filter_flush_bitmap_pages, &bitmap->pages_covered) & PCFLUSH_PINNED_AND_ERROR) res= TRUE; bitmap->changed_not_flushed= FALSE; bitmap->flush_all_requested--; /* Some well-behaved threads may be waiting for flush_all_requested to become false, wake them up. */ DBUG_PRINT("info", ("bitmap flusher waking up others")); send_signal= (bitmap->waiting_for_flush_all_requested | bitmap->waiting_for_non_flushable); } mysql_mutex_unlock(&bitmap->bitmap_lock); if (send_signal) mysql_cond_broadcast(&bitmap->bitmap_cond); DBUG_RETURN(res); }
O0
c
ma_bitmap_flush_all: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movb $0x0, -0x11(%rbp) movl $0x0, -0x18(%rbp) movq -0x10(%rbp), %rax addq $0xa10, %rax # imm = 0xA10 movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rdi addq $0x88, %rdi leaq 0x11b780(%rip), %rsi # 0x15a367 movl $0x1ee, %edx # imm = 0x1EE callq 0x3e8a0 movq -0x20(%rbp), %rax cmpb $0x0, 0x20(%rax) jne 0x3ec1e movq -0x20(%rbp), %rax cmpb $0x0, 0x21(%rax) jne 0x3ec1e movq -0x20(%rbp), %rdi addq $0x88, %rdi callq 0x3eb50 movb $0x0, -0x1(%rbp) jmp 0x3ed57 movq -0x10(%rbp), %rdi xorl %esi, %esi callq 0x3e910 movq -0x20(%rbp), %rax movsbl 0x20(%rax), %eax cmpl $0x0, %eax jne 0x3ec47 movq -0x20(%rbp), %rax movsbl 0x21(%rax), %eax cmpl $0x0, %eax je 0x3ed29 movq -0x20(%rbp), %rax movl 0x30(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x30(%rax) movq -0x20(%rbp), %rax movl 0x3c(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x3c(%rax) movq -0x20(%rbp), %rax cmpl $0x0, 0x38(%rax) jbe 0x3ec98 jmp 0x3ec6d jmp 0x3ec6f movq -0x20(%rbp), %rdi addq $0xd0, %rdi movq -0x20(%rbp), %rsi addq $0x88, %rsi leaq 0x11b6db(%rip), %rdx # 0x15a367 movl $0x204, %ecx # imm = 0x204 callq 0x3ed60 jmp 0x3ec61 movq -0x20(%rbp), %rax movl 0x3c(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x3c(%rax) jmp 0x3eca7 movq -0x20(%rbp), %rax cmpb $0x0, 0x20(%rax) je 0x3ecc9 movq -0x20(%rbp), %rax movb $0x0, 0x20(%rax) movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x3e9e0 movb %al, -0x11(%rbp) movq -0x10(%rbp), %rax movq 0x600(%rax), %rdi movq -0x20(%rbp), %rsi addq $0x40, %rsi movq -0x20(%rbp), %r8 addq $0x138, %r8 # imm = 0x138 xorl %edx, %edx leaq 0xe0(%rip), %rcx # 0x3edd0 callq 0x5c4e0 andl $0x3, %eax cmpl $0x0, %eax je 0x3ed01 movb $0x1, -0x11(%rbp) movq -0x20(%rbp), %rax movb $0x0, 0x21(%rax) movq -0x20(%rbp), %rax movl 0x30(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x30(%rax) jmp 0x3ed18 movq -0x20(%rbp), %rax movl 0x34(%rax), %eax movq -0x20(%rbp), %rcx orl 0x3c(%rcx), %eax movl %eax, -0x18(%rbp) movq -0x20(%rbp), %rdi addq $0x88, %rdi callq 0x3eb50 cmpl $0x0, -0x18(%rbp) je 0x3ed4f movq -0x20(%rbp), %rdi addq $0xd0, %rdi callq 0x3ee00 jmp 0x3ed51 movb -0x11(%rbp), %al movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq
_ma_bitmap_flush_all: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_11], 0 mov [rbp+var_18], 0 mov rax, [rbp+var_10] add rax, 0A10h mov [rbp+var_20], rax mov rdi, [rbp+var_20] add rdi, 88h lea rsi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 1EEh call inline_mysql_mutex_lock_3 mov rax, [rbp+var_20] cmp byte ptr [rax+20h], 0 jnz short loc_3EC1E mov rax, [rbp+var_20] cmp byte ptr [rax+21h], 0 jnz short loc_3EC1E mov rdi, [rbp+var_20] add rdi, 88h call inline_mysql_mutex_unlock_3 mov [rbp+var_1], 0 jmp loc_3ED57 loc_3EC1E: mov rdi, [rbp+var_10] xor esi, esi call _ma_bitmap_mark_file_changed mov rax, [rbp+var_20] movsx eax, byte ptr [rax+20h] cmp eax, 0 jnz short loc_3EC47 mov rax, [rbp+var_20] movsx eax, byte ptr [rax+21h] cmp eax, 0 jz loc_3ED29 loc_3EC47: mov rax, [rbp+var_20] mov ecx, [rax+30h] add ecx, 1 mov [rax+30h], ecx mov rax, [rbp+var_20] mov ecx, [rax+3Ch] add ecx, 1 mov [rax+3Ch], ecx loc_3EC61: mov rax, [rbp+var_20] cmp dword ptr [rax+38h], 0 jbe short loc_3EC98 jmp short $+2 loc_3EC6D: jmp short $+2 loc_3EC6F: mov rdi, [rbp+var_20] add rdi, 0D0h mov rsi, [rbp+var_20] add rsi, 88h lea rdx, aWorkspaceLlm4b_6; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 204h call inline_mysql_cond_wait jmp short loc_3EC61 loc_3EC98: mov rax, [rbp+var_20] mov ecx, [rax+3Ch] add ecx, 0FFFFFFFFh mov [rax+3Ch], ecx jmp short $+2 loc_3ECA7: mov rax, [rbp+var_20] cmp byte ptr [rax+20h], 0 jz short loc_3ECC9 mov rax, [rbp+var_20] mov byte ptr [rax+20h], 0 mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] call write_changed_bitmap mov [rbp+var_11], al loc_3ECC9: mov rax, [rbp+var_10] mov rdi, [rax+600h] mov rsi, [rbp+var_20] add rsi, 40h ; '@' mov r8, [rbp+var_20] add r8, 138h xor edx, edx lea rcx, filter_flush_bitmap_pages call flush_pagecache_blocks_with_filter and eax, 3 cmp eax, 0 jz short loc_3ED01 mov [rbp+var_11], 1 loc_3ED01: mov rax, [rbp+var_20] mov byte ptr [rax+21h], 0 mov rax, [rbp+var_20] mov ecx, [rax+30h] add ecx, 0FFFFFFFFh mov [rax+30h], ecx jmp short $+2 loc_3ED18: mov rax, [rbp+var_20] mov eax, [rax+34h] mov rcx, [rbp+var_20] or eax, [rcx+3Ch] mov [rbp+var_18], eax loc_3ED29: mov rdi, [rbp+var_20] add rdi, 88h call inline_mysql_mutex_unlock_3 cmp [rbp+var_18], 0 jz short loc_3ED4F mov rdi, [rbp+var_20] add rdi, 0D0h call inline_mysql_cond_broadcast loc_3ED4F: jmp short $+2 loc_3ED51: mov al, [rbp+var_11] mov [rbp+var_1], al loc_3ED57: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char ma_bitmap_flush_all(long long a1) { int v2; // [rsp+8h] [rbp-18h] char v3; // [rsp+Fh] [rbp-11h] v3 = 0; v2 = 0; inline_mysql_mutex_lock_3( a1 + 2712, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0x1EEu); if ( *(_BYTE *)(a1 + 2608) || *(_BYTE *)(a1 + 2609) ) { ma_bitmap_mark_file_changed(a1, 0); if ( *(_BYTE *)(a1 + 2608) || *(_BYTE *)(a1 + 2609) ) { ++*(_DWORD *)(a1 + 2624); ++*(_DWORD *)(a1 + 2636); while ( *(_DWORD *)(a1 + 2632) ) inline_mysql_cond_wait( a1 + 2784, a1 + 2712, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 516LL); --*(_DWORD *)(a1 + 2636); if ( *(_BYTE *)(a1 + 2608) ) { *(_BYTE *)(a1 + 2608) = 0; v3 = write_changed_bitmap(a1, a1 + 2576); } if ( (flush_pagecache_blocks_with_filter(*(_QWORD *)(a1 + 1536), a1 + 2640, 0LL, filter_flush_bitmap_pages) & 3) != 0 ) v3 = 1; *(_BYTE *)(a1 + 2609) = 0; --*(_DWORD *)(a1 + 2624); v2 = *(_DWORD *)(a1 + 2636) | *(_DWORD *)(a1 + 2628); } inline_mysql_mutex_unlock_3(a1 + 2712); if ( v2 ) inline_mysql_cond_broadcast(a1 + 2784); return v3; } else { inline_mysql_mutex_unlock_3(a1 + 2712); return 0; } }
_ma_bitmap_flush_all: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV byte ptr [RBP + -0x11],0x0 MOV dword ptr [RBP + -0x18],0x0 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0xa10 MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x88 LEA RSI,[0x25a367] MOV EDX,0x1ee CALL 0x0013e8a0 MOV RAX,qword ptr [RBP + -0x20] CMP byte ptr [RAX + 0x20],0x0 JNZ 0x0013ec1e MOV RAX,qword ptr [RBP + -0x20] CMP byte ptr [RAX + 0x21],0x0 JNZ 0x0013ec1e MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x88 CALL 0x0013eb50 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0013ed57 LAB_0013ec1e: MOV RDI,qword ptr [RBP + -0x10] XOR ESI,ESI CALL 0x0013e910 MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,byte ptr [RAX + 0x20] CMP EAX,0x0 JNZ 0x0013ec47 MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,byte ptr [RAX + 0x21] CMP EAX,0x0 JZ 0x0013ed29 LAB_0013ec47: MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x30] ADD ECX,0x1 MOV dword ptr [RAX + 0x30],ECX MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x3c] ADD ECX,0x1 MOV dword ptr [RAX + 0x3c],ECX LAB_0013ec61: MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x38],0x0 JBE 0x0013ec98 JMP 0x0013ec6d LAB_0013ec6d: JMP 0x0013ec6f LAB_0013ec6f: MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0xd0 MOV RSI,qword ptr [RBP + -0x20] ADD RSI,0x88 LEA RDX,[0x25a367] MOV ECX,0x204 CALL 0x0013ed60 JMP 0x0013ec61 LAB_0013ec98: MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x3c] ADD ECX,-0x1 MOV dword ptr [RAX + 0x3c],ECX JMP 0x0013eca7 LAB_0013eca7: MOV RAX,qword ptr [RBP + -0x20] CMP byte ptr [RAX + 0x20],0x0 JZ 0x0013ecc9 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x20],0x0 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] CALL 0x0013e9e0 MOV byte ptr [RBP + -0x11],AL LAB_0013ecc9: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x600] MOV RSI,qword ptr [RBP + -0x20] ADD RSI,0x40 MOV R8,qword ptr [RBP + -0x20] ADD R8,0x138 XOR EDX,EDX LEA RCX,[0x13edd0] CALL 0x0015c4e0 AND EAX,0x3 CMP EAX,0x0 JZ 0x0013ed01 MOV byte ptr [RBP + -0x11],0x1 LAB_0013ed01: MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x21],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x30] ADD ECX,-0x1 MOV dword ptr [RAX + 0x30],ECX JMP 0x0013ed18 LAB_0013ed18: MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x34] MOV RCX,qword ptr [RBP + -0x20] OR EAX,dword ptr [RCX + 0x3c] MOV dword ptr [RBP + -0x18],EAX LAB_0013ed29: MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x88 CALL 0x0013eb50 CMP dword ptr [RBP + -0x18],0x0 JZ 0x0013ed4f MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0xd0 CALL 0x0013ee00 LAB_0013ed4f: JMP 0x0013ed51 LAB_0013ed51: MOV AL,byte ptr [RBP + -0x11] MOV byte ptr [RBP + -0x1],AL LAB_0013ed57: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int8 _ma_bitmap_flush_all(long param_1) { uint uVar1; int7 extraout_var; int8 uVar2; int7 uVar3; uint local_20; int1 local_19; int1 local_9; local_19 = 0; local_20 = 0; inline_mysql_mutex_lock (param_1 + 0xa98,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0x1ee); if ((*(char *)(param_1 + 0xa30) == '\0') && (*(char *)(param_1 + 0xa31) == '\0')) { inline_mysql_mutex_unlock(param_1 + 0xa98); local_9 = 0; uVar3 = extraout_var; } else { _ma_bitmap_mark_file_changed(param_1,0); if ((*(char *)(param_1 + 0xa30) != '\0') || (*(char *)(param_1 + 0xa31) != '\0')) { *(int *)(param_1 + 0xa40) = *(int *)(param_1 + 0xa40) + 1; *(int *)(param_1 + 0xa4c) = *(int *)(param_1 + 0xa4c) + 1; while (*(int *)(param_1 + 0xa48) != 0) { inline_mysql_cond_wait (param_1 + 0xae0,param_1 + 0xa98, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c",0x204); } *(int *)(param_1 + 0xa4c) = *(int *)(param_1 + 0xa4c) + -1; if (*(char *)(param_1 + 0xa30) != '\0') { *(int1 *)(param_1 + 0xa30) = 0; local_19 = write_changed_bitmap(param_1,param_1 + 0xa10); } uVar1 = flush_pagecache_blocks_with_filter (*(int8 *)(param_1 + 0x600),param_1 + 0xa50,0, filter_flush_bitmap_pages,param_1 + 0xb48); if ((uVar1 & 3) != 0) { local_19 = 1; } *(int1 *)(param_1 + 0xa31) = 0; *(int *)(param_1 + 0xa40) = *(int *)(param_1 + 0xa40) + -1; local_20 = *(uint *)(param_1 + 0xa44) | *(uint *)(param_1 + 0xa4c); } uVar2 = inline_mysql_mutex_unlock(param_1 + 0xa98); if (local_20 != 0) { uVar2 = inline_mysql_cond_broadcast(param_1 + 0xae0); } uVar3 = (int7)((ulong)uVar2 >> 8); local_9 = local_19; } return CONCAT71(uVar3,local_9); }
21,729
my_coll_parser_scan_character_list
eloqsql/strings/ctype-uca.c
static int my_coll_parser_scan_character_list(MY_COLL_RULE_PARSER *p, my_wc_t *pwc, size_t limit, const char *name) { if (my_coll_parser_curr(p)->term != MY_COLL_LEXEM_CHAR) return my_coll_parser_expected_error(p, MY_COLL_LEXEM_CHAR); if (!my_coll_rule_expand(pwc, limit, my_coll_parser_curr(p)->code)) return my_coll_parser_too_long_error(p, name); if (!my_coll_parser_scan_term(p, MY_COLL_LEXEM_CHAR)) return 0; while (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_CHAR) { if (!my_coll_rule_expand(pwc, limit, my_coll_parser_curr(p)->code)) return my_coll_parser_too_long_error(p, name); my_coll_parser_scan(p); } return 1; }
O3
c
my_coll_parser_scan_character_list: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx cmpl $0x5, (%rdi) jne 0xbcf6d movq %rcx, %r14 movq %rdx, %r12 testq %rdx, %rdx je 0xbcf4f movq %rsi, %r13 movslq 0x24(%rbx), %rax xorl %ecx, %ecx cmpq $0x0, (%r13,%rcx,8) je 0xbcfa6 incq %rcx cmpq %rcx, %r12 jne 0xbcf3f addq $0xf8, %rbx leaq 0x21b33(%rip), %rdx # 0xdea90 xorl %r15d, %r15d movl $0x80, %esi movq %rbx, %rdi movq %r14, %rcx jmp 0xbcf8d addq $0xf8, %rbx leaq 0x21b24(%rip), %rdx # 0xdea9f leaq 0x21b33(%rip), %rcx # 0xdeab5 xorl %r15d, %r15d movl $0x80, %esi movq %rbx, %rdi xorl %eax, %eax callq 0xd69d2 movl %r15d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, (%r13,%rcx,8) movq %rbx, %rdi movl $0x5, %esi callq 0xbcc79 testl %eax, %eax je 0xbd01c movl $0x1, %r15d cmpl $0x5, (%rbx) jne 0xbcf94 leaq 0x28(%rbx), %rdx movslq 0x24(%rbx), %rax xorl %ecx, %ecx cmpq $0x0, (%r13,%rcx,8) je 0xbcfe6 incq %rcx cmpq %rcx, %r12 jne 0xbcfd1 jmp 0xbcf4f movq %rax, (%r13,%rcx,8) movq 0x20(%rdx), %rax movq %rax, 0x20(%rbx) movups (%rdx), %xmm0 movups 0x10(%rdx), %xmm1 movups %xmm1, 0x10(%rbx) movups %xmm0, (%rbx) movq %rdx, -0x30(%rbp) movq -0x30(%rbp), %rdi callq 0xbca1b movq -0x30(%rbp), %rdx cmpl $0x5, (%rbx) je 0xbcfcb jmp 0xbcf94 xorl %r15d, %r15d jmp 0xbcf94
my_coll_parser_scan_character_list: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi cmp dword ptr [rdi], 5 jnz short loc_BCF6D mov r14, rcx mov r12, rdx test rdx, rdx jz short loc_BCF4F mov r13, rsi movsxd rax, dword ptr [rbx+24h] xor ecx, ecx loc_BCF3F: cmp qword ptr [r13+rcx*8+0], 0 jz short loc_BCFA6 inc rcx cmp r12, rcx jnz short loc_BCF3F loc_BCF4F: add rbx, 0F8h lea rdx, aSIsTooLong; "%s is too long" xor r15d, r15d mov esi, 80h mov rdi, rbx mov rcx, r14 jmp short loc_BCF8D loc_BCF6D: add rbx, 0F8h lea rdx, aSExpected; "%s expected" lea rcx, aCharacter; "Character" xor r15d, r15d mov esi, 80h mov rdi, rbx loc_BCF8D: xor eax, eax call my_snprintf loc_BCF94: mov eax, r15d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_BCFA6: mov [r13+rcx*8+0], rax mov rdi, rbx mov esi, 5 call my_coll_parser_scan_term test eax, eax jz short loc_BD01C mov r15d, 1 cmp dword ptr [rbx], 5 jnz short loc_BCF94 lea rdx, [rbx+28h] loc_BCFCB: movsxd rax, dword ptr [rbx+24h] xor ecx, ecx loc_BCFD1: cmp qword ptr [r13+rcx*8+0], 0 jz short loc_BCFE6 inc rcx cmp r12, rcx jnz short loc_BCFD1 jmp loc_BCF4F loc_BCFE6: mov [r13+rcx*8+0], rax mov rax, [rdx+20h] mov [rbx+20h], rax movups xmm0, xmmword ptr [rdx] movups xmm1, xmmword ptr [rdx+10h] movups xmmword ptr [rbx+10h], xmm1 movups xmmword ptr [rbx], xmm0 mov [rbp+var_30], rdx mov rdi, [rbp+var_30] call my_coll_lexem_next mov rdx, [rbp+var_30] cmp dword ptr [rbx], 5 jz short loc_BCFCB jmp loc_BCF94 loc_BD01C: xor r15d, r15d jmp loc_BCF94
long long my_coll_parser_scan_character_list(long long a1, long long a2, long long a3, int a4, int a5, int a6) { long long v8; // rcx const char *v9; // rdx unsigned int v10; // r15d int v11; // edi const char *v12; // rcx long long v14; // rdx long long v15; // rcx __int128 v16; // xmm0 long long v17; // [rsp+0h] [rbp-30h] if ( *(_DWORD *)a1 != 5 ) { v9 = "%s expected"; v12 = "Character"; v10 = 0; v11 = a1 + 248; goto LABEL_8; } if ( !a3 ) { LABEL_6: v9 = "%s is too long"; v10 = 0; v11 = a1 + 248; LODWORD(v12) = a4; LABEL_8: my_snprintf(v11, 128, (_DWORD)v9, (_DWORD)v12, a5, a6); return v10; } v8 = 0LL; while ( *(_QWORD *)(a2 + 8 * v8) ) { if ( a3 == ++v8 ) goto LABEL_6; } *(_QWORD *)(a2 + 8 * v8) = *(int *)(a1 + 36); if ( (unsigned int)my_coll_parser_scan_term(a1, 5) ) { v10 = 1; if ( *(_DWORD *)a1 == 5 ) { v14 = a1 + 40; do { v15 = 0LL; while ( *(_QWORD *)(a2 + 8 * v15) ) { if ( a3 == ++v15 ) goto LABEL_6; } *(_QWORD *)(a2 + 8 * v15) = *(int *)(a1 + 36); *(_QWORD *)(a1 + 32) = *(_QWORD *)(v14 + 32); v16 = *(_OWORD *)v14; *(_OWORD *)(a1 + 16) = *(_OWORD *)(v14 + 16); *(_OWORD *)a1 = v16; v17 = v14; my_coll_lexem_next(v14); v14 = v17; } while ( *(_DWORD *)a1 == 5 ); } } else { return 0; } return v10; }
my_coll_parser_scan_character_list: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI CMP dword ptr [RDI],0x5 JNZ 0x001bcf6d MOV R14,RCX MOV R12,RDX TEST RDX,RDX JZ 0x001bcf4f MOV R13,RSI MOVSXD RAX,dword ptr [RBX + 0x24] XOR ECX,ECX LAB_001bcf3f: CMP qword ptr [R13 + RCX*0x8],0x0 JZ 0x001bcfa6 INC RCX CMP R12,RCX JNZ 0x001bcf3f LAB_001bcf4f: ADD RBX,0xf8 LEA RDX,[0x1dea90] XOR R15D,R15D MOV ESI,0x80 MOV RDI,RBX MOV RCX,R14 JMP 0x001bcf8d LAB_001bcf6d: ADD RBX,0xf8 LEA RDX,[0x1dea9f] LEA RCX,[0x1deab5] XOR R15D,R15D MOV ESI,0x80 MOV RDI,RBX LAB_001bcf8d: XOR EAX,EAX CALL 0x001d69d2 LAB_001bcf94: MOV EAX,R15D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001bcfa6: MOV qword ptr [R13 + RCX*0x8],RAX MOV RDI,RBX MOV ESI,0x5 CALL 0x001bcc79 TEST EAX,EAX JZ 0x001bd01c MOV R15D,0x1 CMP dword ptr [RBX],0x5 JNZ 0x001bcf94 LEA RDX,[RBX + 0x28] LAB_001bcfcb: MOVSXD RAX,dword ptr [RBX + 0x24] XOR ECX,ECX LAB_001bcfd1: CMP qword ptr [R13 + RCX*0x8],0x0 JZ 0x001bcfe6 INC RCX CMP R12,RCX JNZ 0x001bcfd1 JMP 0x001bcf4f LAB_001bcfe6: MOV qword ptr [R13 + RCX*0x8],RAX MOV RAX,qword ptr [RDX + 0x20] MOV qword ptr [RBX + 0x20],RAX MOVUPS XMM0,xmmword ptr [RDX] MOVUPS XMM1,xmmword ptr [RDX + 0x10] MOVUPS xmmword ptr [RBX + 0x10],XMM1 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBP + -0x30],RDX MOV RDI,qword ptr [RBP + -0x30] CALL 0x001bca1b MOV RDX,qword ptr [RBP + -0x30] CMP dword ptr [RBX],0x5 JZ 0x001bcfcb JMP 0x001bcf94 LAB_001bd01c: XOR R15D,R15D JMP 0x001bcf94
int8 my_coll_parser_scan_character_list(int *param_1,long param_2,long param_3,char *param_4) { int iVar1; long lVar2; char *pcVar3; if (*param_1 == 5) { if (param_3 != 0) { lVar2 = 0; do { if (*(long *)(param_2 + lVar2 * 8) == 0) { *(long *)(param_2 + lVar2 * 8) = (long)param_1[9]; iVar1 = my_coll_parser_scan_term(param_1,5); if (iVar1 == 0) { return 0; } if (*param_1 != 5) { return 1; } do { lVar2 = 0; while (*(long *)(param_2 + lVar2 * 8) != 0) { lVar2 = lVar2 + 1; if (param_3 == lVar2) goto LAB_001bcf4f; } *(long *)(param_2 + lVar2 * 8) = (long)param_1[9]; *(int8 *)(param_1 + 8) = *(int8 *)(param_1 + 0x12); param_1[4] = param_1[0xe]; param_1[5] = param_1[0xf]; param_1[6] = param_1[0x10]; param_1[7] = param_1[0x11]; *param_1 = param_1[10]; param_1[1] = param_1[0xb]; param_1[2] = param_1[0xc]; param_1[3] = param_1[0xd]; my_coll_lexem_next(param_1 + 10); if (*param_1 != 5) { return 1; } } while( true ); } lVar2 = lVar2 + 1; } while (param_3 != lVar2); } LAB_001bcf4f: pcVar3 = "%s is too long"; } else { pcVar3 = "%s expected"; param_4 = "Character"; } my_snprintf(param_1 + 0x3e,0x80,pcVar3,param_4); return 0; }
21,730
my_stat
eloqsql/mysys/my_lib.c
MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags) { int m_used; DBUG_ENTER("my_stat"); DBUG_PRINT("my", ("path: '%s' stat_area: %p MyFlags: %lu", path, stat_area, my_flags)); if ((m_used= (stat_area == NULL))) if (!(stat_area= (MY_STAT *) my_malloc(key_memory_MY_STAT, sizeof(MY_STAT), my_flags))) goto error; #ifndef _WIN32 if (!stat((char *) path, (struct stat *) stat_area)) { MSAN_STAT_WORKAROUND(stat_area); DBUG_RETURN(stat_area); } #else if (!my_win_stat(path, stat_area)) DBUG_RETURN(stat_area); #endif DBUG_PRINT("error",("Got errno: %d from stat", errno)); my_errno= errno; if (m_used) /* Free if new area */ my_free(stat_area); error: if (my_flags & (MY_FAE+MY_WME)) { my_error(EE_STAT, MYF(ME_BELL), path, my_errno); DBUG_RETURN((MY_STAT *) NULL); } DBUG_RETURN((MY_STAT *) NULL); }
O3
c
my_stat: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx movq %rsi, %r14 testq %rsi, %rsi jne 0xa6104 leaq 0xb6b7eb(%rip), %rax # 0xc118d8 movl (%rax), %edi movl $0x90, %esi movq %r15, %rdx callq 0xa63e5 movq %rax, %r14 testq %rax, %rax je 0xa6130 movq %rbx, %rdi movq %r14, %rsi callq 0x2a8a0 testl %eax, %eax je 0xa6159 callq 0x2a820 movl (%rax), %r13d callq 0xa8156 movl %r13d, (%rax) testq %r12, %r12 jne 0xa6130 movq %r14, %rdi callq 0xa6612 testb $0x18, %r15b je 0xa6156 callq 0xa8156 movl (%rax), %ecx xorl %r14d, %r14d movl $0x4, %esi movl $0xd, %edi movq %rbx, %rdx xorl %eax, %eax callq 0xa1c9b jmp 0xa6159 xorl %r14d, %r14d movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_stat: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r15, rdx mov r12, rsi mov rbx, rdi mov r14, rsi test rsi, rsi jnz short loc_A6104 lea rax, key_memory_MY_STAT mov edi, [rax] mov esi, 90h mov rdx, r15 call my_malloc mov r14, rax test rax, rax jz short loc_A6130 loc_A6104: mov rdi, rbx mov rsi, r14 call _stat64 test eax, eax jz short loc_A6159 call ___errno_location mov r13d, [rax] call _my_thread_var mov [rax], r13d test r12, r12 jnz short loc_A6130 mov rdi, r14 call my_free loc_A6130: test r15b, 18h jz short loc_A6156 call _my_thread_var mov ecx, [rax] xor r14d, r14d mov esi, 4 mov edi, 0Dh mov rdx, rbx xor eax, eax call my_error jmp short loc_A6159 loc_A6156: xor r14d, r14d loc_A6159: mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_stat(long long a1, long long a2, long long a3) { char v3; // r15 long long v5; // r14 long long v6; // rdi int v7; // r13d unsigned int *v8; // rax v3 = a3; v5 = a2; if ( a2 || (v6 = key_memory_MY_STAT, (v5 = my_malloc(key_memory_MY_STAT, 144LL, a3)) != 0) ) { v6 = a1; if ( !(unsigned int)stat64(a1, v5) ) return v5; v7 = *(_DWORD *)__errno_location(a1); *(_DWORD *)my_thread_var(a1) = v7; if ( !a2 ) { v6 = v5; my_free(v5); } } if ( (v3 & 0x18) == 0 ) return 0LL; v8 = (unsigned int *)my_thread_var(v6); v5 = 0LL; my_error(0xDu, 4LL, a1, *v8); return v5; }
my_stat: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,RDX MOV R12,RSI MOV RBX,RDI MOV R14,RSI TEST RSI,RSI JNZ 0x001a6104 LEA RAX,[0xd118d8] MOV EDI,dword ptr [RAX] MOV ESI,0x90 MOV RDX,R15 CALL 0x001a63e5 MOV R14,RAX TEST RAX,RAX JZ 0x001a6130 LAB_001a6104: MOV RDI,RBX MOV RSI,R14 CALL 0x0012a8a0 TEST EAX,EAX JZ 0x001a6159 CALL 0x0012a820 MOV R13D,dword ptr [RAX] CALL 0x001a8156 MOV dword ptr [RAX],R13D TEST R12,R12 JNZ 0x001a6130 MOV RDI,R14 CALL 0x001a6612 LAB_001a6130: TEST R15B,0x18 JZ 0x001a6156 CALL 0x001a8156 MOV ECX,dword ptr [RAX] XOR R14D,R14D MOV ESI,0x4 MOV EDI,0xd MOV RDX,RBX XOR EAX,EAX CALL 0x001a1c9b JMP 0x001a6159 LAB_001a6156: XOR R14D,R14D LAB_001a6159: MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
stat64 * my_stat(char *param_1,stat64 *param_2,ulong param_3) { int iVar1; stat64 *__buf; int *piVar2; int4 *puVar3; __buf = param_2; if ((param_2 != (stat64 *)0x0) || (__buf = (stat64 *)my_malloc(key_memory_MY_STAT,0x90,param_3), __buf != (stat64 *)0x0)) { iVar1 = stat64(param_1,__buf); if (iVar1 == 0) { return __buf; } piVar2 = __errno_location(); iVar1 = *piVar2; piVar2 = (int *)_my_thread_var(); *piVar2 = iVar1; if (param_2 == (stat64 *)0x0) { my_free(__buf); } } if ((param_3 & 0x18) != 0) { puVar3 = (int4 *)_my_thread_var(); my_error(0xd,4,param_1,*puVar3); } return (stat64 *)0x0; }
21,731
action_html_ready
navaro[P]qoraal-tictactoe/src/services/www/parts/html.c
int32_t action_html_ready (PENGINE_T instance, uint32_t parm, uint32_t flags) { if (flags & (PART_ACTION_FLAG_VALIDATE)) { return EOK ; } MUTEX_LOCK () ; uint32_t mask = engine_get_mask (instance) ; _html_event_mask |= mask ; if (_html_emit && _html_emit->complete) { os_event_signal (&_html_emit->complete, mask) ; } MUTEX_UNLOCK () ; return EOK ; }
O3
c
action_html_ready: testb $0x1, %dl jne 0x13ce1 pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x2cc9a(%rip), %rdi # 0x40938 callq 0x14ff0 movq %rbx, %rdi callq 0xfd2b orl %eax, 0x2cc7f(%rip) # 0x40930 movq 0x2cc88(%rip), %rdi # 0x40940 testq %rdi, %rdi je 0x13ccf cmpq $0x0, 0x18(%rdi) je 0x13ccf addq $0x18, %rdi movl %eax, %esi callq 0x153ee leaq 0x2cc62(%rip), %rdi # 0x40938 callq 0x15015 addq $0x8, %rsp popq %rbx popq %rbp xorl %eax, %eax retq
action_html_ready: test dl, 1 jnz short loc_13CE1 push rbp mov rbp, rsp push rbx push rax mov rbx, rdi lea rdi, _html_mutex call os_mutex_lock mov rdi, rbx call engine_get_mask or cs:_html_event_mask, eax mov rdi, cs:_html_emit test rdi, rdi jz short loc_13CCF cmp qword ptr [rdi+18h], 0 jz short loc_13CCF add rdi, 18h mov esi, eax call os_event_signal loc_13CCF: lea rdi, _html_mutex call os_mutex_unlock add rsp, 8 pop rbx pop rbp loc_13CE1: xor eax, eax retn
long long action_html_ready(_BYTE *a1, long long a2, char a3) { unsigned int mask; // eax if ( (a3 & 1) == 0 ) { os_mutex_lock(&html_mutex); mask = engine_get_mask(a1); html_event_mask |= mask; if ( html_emit && *(_QWORD *)(html_emit + 24) ) os_event_signal(html_emit + 24, mask); os_mutex_unlock(&html_mutex); } return 0LL; }
action_html_ready: TEST DL,0x1 JNZ 0x00113ce1 PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI LEA RDI,[0x140938] CALL 0x00114ff0 MOV RDI,RBX CALL 0x0010fd2b OR dword ptr [0x00140930],EAX MOV RDI,qword ptr [0x00140940] TEST RDI,RDI JZ 0x00113ccf CMP qword ptr [RDI + 0x18],0x0 JZ 0x00113ccf ADD RDI,0x18 MOV ESI,EAX CALL 0x001153ee LAB_00113ccf: LEA RDI,[0x140938] CALL 0x00115015 ADD RSP,0x8 POP RBX POP RBP LAB_00113ce1: XOR EAX,EAX RET
int8 action_html_ready(int8 param_1,int8 param_2,byte param_3) { uint uVar1; if ((param_3 & 1) == 0) { os_mutex_lock(&_html_mutex); uVar1 = engine_get_mask(param_1); _html_event_mask = _html_event_mask | uVar1; if ((_html_emit != 0) && (*(long *)(_html_emit + 0x18) != 0)) { os_event_signal(_html_emit + 0x18,uVar1); } os_mutex_unlock(&_html_mutex); } return 0; }
21,732
ggml_argmax
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
struct ggml_tensor * ggml_argmax( struct ggml_context * ctx, struct ggml_tensor * a) { GGML_ASSERT(ggml_is_matrix(a)); GGML_ASSERT(a->ne[0] <= INT32_MAX); struct ggml_tensor * result = ggml_new_tensor_1d(ctx, GGML_TYPE_I32, a->ne[1]); result->op = GGML_OP_ARGMAX; result->src[0] = a; return result; }
O3
c
ggml_argmax: pushq %rbx subq $0x10, %rsp cmpq $0x1, 0x20(%rsi) jne 0x1b480 movq %rsi, %rbx cmpq $0x1, 0x28(%rsi) jne 0x1b480 movl $0x80000000, %eax # imm = 0x80000000 cmpq %rax, 0x10(%rbx) jge 0x1b49c movq 0x18(%rbx), %rax leaq 0x8(%rsp), %rcx movq %rax, (%rcx) movl $0x1a, %esi movl $0x1, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x1a57f movl $0x10, 0x50(%rax) movq %rbx, 0x98(%rax) addq $0x10, %rsp popq %rbx retq leaq 0x3118c(%rip), %rdi # 0x4c613 leaq 0x311d7(%rip), %rdx # 0x4c665 leaq 0x31397(%rip), %rcx # 0x4c82c movl $0x8d3, %esi # imm = 0x8D3 jmp 0x1b4b6 leaq 0x31170(%rip), %rdi # 0x4c613 leaq 0x311bb(%rip), %rdx # 0x4c665 leaq 0x3138d(%rip), %rcx # 0x4c83e movl $0x8d4, %esi # imm = 0x8D4 xorl %eax, %eax callq 0x17cd0
ggml_argmax: push rbx sub rsp, 10h cmp qword ptr [rsi+20h], 1 jnz short loc_1B480 mov rbx, rsi cmp qword ptr [rsi+28h], 1 jnz short loc_1B480 mov eax, 80000000h cmp [rbx+10h], rax jge short loc_1B49C mov rax, [rbx+18h] lea rcx, [rsp+18h+var_10] mov [rcx], rax mov esi, 1Ah mov edx, 1 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl mov dword ptr [rax+50h], 10h mov [rax+98h], rbx add rsp, 10h pop rbx retn loc_1B480: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsMatrixA; "ggml_is_matrix(a)" mov esi, 8D3h jmp short loc_1B4B6 loc_1B49C: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aANe0Int32Max; "a->ne[0] <= INT32_MAX" mov esi, 8D4h loc_1B4B6: xor eax, eax call _ggml_abort
long long ggml_argmax(long long a1, long long *a2, double a3, long long a4, long long a5, int a6, int a7) { long long result; // rax const char *v8; // rcx int v9; // esi long long v10; // [rsp+8h] [rbp-10h] BYREF if ( a2[4] != 1 || a2[5] != 1 ) { v8 = "ggml_is_matrix(a)"; v9 = 2259; goto LABEL_7; } if ( a2[2] >= 0x80000000LL ) { v8 = "a->ne[0] <= INT32_MAX"; v9 = 2260; LABEL_7: ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", v9, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v8, a6, a7); } v10 = a2[3]; result = ggml_new_tensor_impl(a1, 0x1Au, 1u, &v10, 0LL, 0LL, a3); *(_DWORD *)(result + 80) = 16; *(_QWORD *)(result + 152) = a2; return result; }
ggml_argmax: PUSH RBX SUB RSP,0x10 CMP qword ptr [RSI + 0x20],0x1 JNZ 0x0011b480 MOV RBX,RSI CMP qword ptr [RSI + 0x28],0x1 JNZ 0x0011b480 MOV EAX,0x80000000 CMP qword ptr [RBX + 0x10],RAX JGE 0x0011b49c MOV RAX,qword ptr [RBX + 0x18] LEA RCX,[RSP + 0x8] MOV qword ptr [RCX],RAX MOV ESI,0x1a MOV EDX,0x1 XOR R8D,R8D XOR R9D,R9D CALL 0x0011a57f MOV dword ptr [RAX + 0x50],0x10 MOV qword ptr [RAX + 0x98],RBX ADD RSP,0x10 POP RBX RET LAB_0011b480: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14c82c] MOV ESI,0x8d3 JMP 0x0011b4b6 LAB_0011b49c: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14c83e] MOV ESI,0x8d4 LAB_0011b4b6: XOR EAX,EAX CALL 0x00117cd0
void ggml_argmax(int8 param_1,long param_2) { long lVar1; char *pcVar2; int8 uVar3; int8 local_10; if ((*(long *)(param_2 + 0x20) == 1) && (*(long *)(param_2 + 0x28) == 1)) { if (*(long *)(param_2 + 0x10) < 0x80000000) { local_10 = *(int8 *)(param_2 + 0x18); lVar1 = ggml_new_tensor_impl(param_1,0x1a,1,&local_10,0,0); *(int4 *)(lVar1 + 0x50) = 0x10; *(long *)(lVar1 + 0x98) = param_2; return; } pcVar2 = "a->ne[0] <= INT32_MAX"; uVar3 = 0x8d4; } else { pcVar2 = "ggml_is_matrix(a)"; uVar3 = 0x8d3; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", uVar3,"GGML_ASSERT(%s) failed",pcVar2); }
21,733
minja::Parser::parseMathUnaryPlusMinus()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Expression> parseMathUnaryPlusMinus() { static std::regex unary_plus_minus_tok(R"(\+|-(?![}%#]\}))"); auto op_str = consumeToken(unary_plus_minus_tok); auto expr = parseExpansion(); if (!expr) throw std::runtime_error("Expected expr of 'unary plus/minus/expansion' expression"); if (!op_str.empty()) { auto op = op_str == "+" ? UnaryOpExpr::Op::Plus : UnaryOpExpr::Op::Minus; return std::make_shared<UnaryOpExpr>(get_location(), std::move(expr), op); } return expr; }
O1
cpp
minja::Parser::parseMathUnaryPlusMinus(): pushq %r14 pushq %rbx subq $0x68, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x81bc0(%rip), %rax # 0xf00a8 movb (%rax), %al testb %al, %al je 0x6e626 leaq 0x81b8f(%rip), %rdx # 0xf0088 leaq 0x30(%rsp), %rdi movq %r14, %rsi movl $0x1, %ecx callq 0x69d80 leaq 0x8(%rsp), %rdi movq %r14, %rsi callq 0x6e7a4 movq 0x8(%rsp), %rax testq %rax, %rax je 0x6e67d cmpq $0x0, 0x38(%rsp) je 0x6e571 leaq 0x48e96(%rip), %rsi # 0xb73cb leaq 0x30(%rsp), %rdi callq 0x19190 xorl %ecx, %ecx testl %eax, %eax setne %cl movl %ecx, 0x1c(%rsp) movq (%r14), %rax movq %rax, 0x50(%rsp) movq 0x8(%r14), %rax movq %rax, 0x58(%rsp) testq %rax, %rax je 0x6e593 movq 0x80a29(%rip), %rcx # 0xeef90 cmpb $0x0, (%rcx) je 0x6e58f incl 0x8(%rax) jmp 0x6e593 movq %rax, (%rbx) xorl %eax, %eax movq %rax, 0x8(%rbx) movq 0x10(%rsp), %rcx movq %rax, 0x10(%rsp) movq %rcx, 0x8(%rbx) movq %rax, 0x8(%rsp) jmp 0x6e5f1 lock incl 0x8(%rax) movq 0x20(%r14), %rax subq 0x10(%r14), %rax leaq 0x50(%rsp), %rcx movq %rax, 0x10(%rcx) leaq 0x28(%rsp), %rdi movq $0x0, -0x8(%rdi) leaq 0x20(%rsp), %rsi leaq 0x7(%rsp), %rdx leaq 0x8(%rsp), %r8 leaq 0x1c(%rsp), %r9 callq 0x7a706 xorl %eax, %eax movq %rax, 0x8(%rbx) movaps 0x20(%rsp), %xmm0 movq %rax, 0x28(%rsp) movups %xmm0, (%rbx) movq %rax, 0x20(%rsp) movq 0x58(%rsp), %rdi testq %rdi, %rdi je 0x6e5f1 callq 0x42d00 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x6e600 callq 0x42d00 leaq 0x40(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x6e61b movq 0x40(%rsp), %rsi incq %rsi callq 0x196b0 movq %rbx, %rax addq $0x68, %rsp popq %rbx popq %r14 retq leaq 0x81a7b(%rip), %rdi # 0xf00a8 callq 0x19c30 testl %eax, %eax je 0x6e4f2 leaq 0x81a47(%rip), %rdi # 0xf0088 leaq 0x4faa1(%rip), %rsi # 0xbe0e9 movl $0x10, %edx callq 0x36850 leaq -0x37da1(%rip), %rdi # 0x368b8 leaq 0x81a28(%rip), %rsi # 0xf0088 leaq 0x81061(%rip), %rdx # 0xef6c8 callq 0x195e0 leaq 0x81a35(%rip), %rdi # 0xf00a8 callq 0x19460 jmp 0x6e4f2 movl $0x10, %edi callq 0x19370 movq %rax, %r14 leaq 0x4fb42(%rip), %rsi # 0xbe1d3 movq %rax, %rdi callq 0x19270 movq 0x80948(%rip), %rsi # 0xeefe8 movq 0x808c1(%rip), %rdx # 0xeef68 movq %r14, %rdi callq 0x19b70 movq %rax, %rbx leaq 0x819ef(%rip), %rdi # 0xf00a8 callq 0x19450 jmp 0x6e713 movq %rax, %rbx jmp 0x6e6e4 movq %rax, %rbx movq %r14, %rdi callq 0x19510 jmp 0x6e6e4 movq %rax, %rbx movq 0x58(%rsp), %rdi testq %rdi, %rdi je 0x6e6e4 callq 0x42d00 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x6e6f8 callq 0x42d00 jmp 0x6e6f8 movq %rax, %rbx leaq 0x40(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x6e713 movq 0x40(%rsp), %rsi incq %rsi callq 0x196b0 movq %rbx, %rdi callq 0x19be0 nop
_ZN5minja6Parser23parseMathUnaryPlusMinusEv: push r14 push rbx sub rsp, 68h mov r14, rsi mov rbx, rdi lea rax, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; `guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok mov al, [rax] test al, al jz loc_6E626 loc_6E4F2: lea rdx, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok lea rdi, [rsp+78h+var_48] mov rsi, r14 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) lea rdi, [rsp+78h+var_70]; this mov rsi, r14 call _ZN5minja6Parser14parseExpansionEv; minja::Parser::parseExpansion(void) mov rax, [rsp+78h+var_70] test rax, rax jz loc_6E67D cmp [rsp+78h+var_40], 0 jz short loc_6E571 lea rsi, asc_B73C9+2; "+" lea rdi, [rsp+78h+var_48] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) xor ecx, ecx test eax, eax setnz cl mov [rsp+78h+var_5C], ecx mov rax, [r14] mov [rsp+78h+var_28], rax mov rax, [r14+8] mov [rsp+78h+var_20], rax test rax, rax jz short loc_6E593 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_6E58F inc dword ptr [rax+8] jmp short loc_6E593 loc_6E571: mov [rbx], rax xor eax, eax mov [rbx+8], rax mov rcx, [rsp+78h+var_68] mov [rsp+78h+var_68], rax mov [rbx+8], rcx mov [rsp+78h+var_70], rax jmp short loc_6E5F1 loc_6E58F: lock inc dword ptr [rax+8] loc_6E593: mov rax, [r14+20h] sub rax, [r14+10h] lea rcx, [rsp+78h+var_28] mov [rcx+10h], rax lea rdi, [rsp+78h+var_58+8] mov qword ptr [rdi-8], 0 lea rsi, [rsp+78h+var_58] lea rdx, [rsp+78h+var_71] lea r8, [rsp+78h+var_70] lea r9, [rsp+78h+var_5C] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja11UnaryOpExprESaIS5_EJNS4_8LocationESt10shared_ptrINS4_10ExpressionEERNS5_2OpEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &>(minja::UnaryOpExpr *&,std::_Sp_alloc_shared_tag<std::allocator<minja::UnaryOpExpr>>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &) xor eax, eax mov [rbx+8], rax movaps xmm0, [rsp+78h+var_58] mov qword ptr [rsp+78h+var_58+8], rax movups xmmword ptr [rbx], xmm0 mov qword ptr [rsp+78h+var_58], rax mov rdi, [rsp+78h+var_20] test rdi, rdi jz short loc_6E5F1 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6E5F1: mov rdi, [rsp+78h+var_68] test rdi, rdi jz short loc_6E600 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6E600: lea rax, [rsp+78h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_6E61B mov rsi, [rsp+78h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6E61B: mov rax, rbx add rsp, 68h pop rbx pop r14 retn loc_6E626: lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_6E4F2 lea rdi, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok lea rsi, asc_BE0E9; "\\+|-(?![}%#]\\})" mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_6E4F2 loc_6E67D: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedExprOf; "Expected expr of 'unary plus/minus/expa"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_6E713 mov rbx, rax jmp short loc_6E6E4 mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_6E6E4 mov rbx, rax mov rdi, [rsp+78h+var_20] test rdi, rdi jz short loc_6E6E4 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6E6E4: mov rdi, [rsp+78h+var_68] test rdi, rdi jz short loc_6E6F8 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp short loc_6E6F8 mov rbx, rax loc_6E6F8: lea rax, [rsp+78h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_6E713 mov rsi, [rsp+78h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6E713: mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::parseMathUnaryPlusMinus(minja::Parser *this, long long *a2) { volatile signed __int32 *v2; // rax volatile signed __int32 *v3; // rcx __int128 v4; // xmm0 std::runtime_error *exception; // r14 char v7; // [rsp+7h] [rbp-71h] BYREF long long v8; // [rsp+8h] [rbp-70h] BYREF volatile signed __int32 *v9; // [rsp+10h] [rbp-68h] BOOL v10; // [rsp+1Ch] [rbp-5Ch] BYREF __int128 v11; // [rsp+20h] [rbp-58h] BYREF void *v12[2]; // [rsp+30h] [rbp-48h] BYREF long long v13; // [rsp+40h] [rbp-38h] BYREF long long v14; // [rsp+50h] [rbp-28h] BYREF volatile signed __int32 *v15; // [rsp+58h] [rbp-20h] long long v16; // [rsp+60h] [rbp-18h] if ( !(_BYTE)`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11], (long long)"\\+|-(?![}%#]\\})", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11]); } minja::Parser::consumeToken( (long long)v12, (long long)a2, (long long)&minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11], 1u); minja::Parser::parseExpansion((minja::Parser *)&v8); if ( !v8 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected expr of 'unary plus/minus/expansion' expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( v12[1] ) { v10 = std::string::compare(v12, "+") != 0; v14 = *a2; v2 = (volatile signed __int32 *)a2[1]; v15 = v2; if ( v2 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v2 + 2); else _InterlockedIncrement(v2 + 2); } v16 = a2[4] - a2[2]; *(_QWORD *)&v11 = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &>( (char *)&v11 + 8, &v11, &v7, &v14, &v8, &v10); *((_QWORD *)this + 1) = 0LL; v4 = v11; *((_QWORD *)&v11 + 1) = 0LL; *(_OWORD *)this = v4; *(_QWORD *)&v11 = 0LL; if ( v15 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15); } else { *(_QWORD *)this = v8; *((_QWORD *)this + 1) = 0LL; v3 = v9; v9 = 0LL; *((_QWORD *)this + 1) = v3; v8 = 0LL; } if ( v9 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v9); if ( v12[0] != &v13 ) operator delete(v12[0], v13 + 1); return this; }
parseMathUnaryPlusMinus: PUSH R14 PUSH RBX SUB RSP,0x68 MOV R14,RSI MOV RBX,RDI LEA RAX,[0x1f00a8] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x0016e626 LAB_0016e4f2: LEA RDX,[0x1f0088] LEA RDI,[RSP + 0x30] MOV RSI,R14 MOV ECX,0x1 CALL 0x00169d80 LAB_0016e50b: LEA RDI,[RSP + 0x8] MOV RSI,R14 CALL 0x0016e7a4 MOV RAX,qword ptr [RSP + 0x8] TEST RAX,RAX JZ 0x0016e67d CMP qword ptr [RSP + 0x38],0x0 JZ 0x0016e571 LEA RSI,[0x1b73cb] LEA RDI,[RSP + 0x30] CALL 0x00119190 XOR ECX,ECX TEST EAX,EAX SETNZ CL MOV dword ptr [RSP + 0x1c],ECX MOV RAX,qword ptr [R14] MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x58],RAX TEST RAX,RAX JZ 0x0016e593 MOV RCX,qword ptr [0x001eef90] CMP byte ptr [RCX],0x0 JZ 0x0016e58f INC dword ptr [RAX + 0x8] JMP 0x0016e593 LAB_0016e571: MOV qword ptr [RBX],RAX XOR EAX,EAX MOV qword ptr [RBX + 0x8],RAX MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RBX + 0x8],RCX MOV qword ptr [RSP + 0x8],RAX JMP 0x0016e5f1 LAB_0016e58f: INC.LOCK dword ptr [RAX + 0x8] LAB_0016e593: MOV RAX,qword ptr [R14 + 0x20] SUB RAX,qword ptr [R14 + 0x10] LEA RCX,[RSP + 0x50] MOV qword ptr [RCX + 0x10],RAX LEA RDI,[RSP + 0x28] MOV qword ptr [RDI + -0x8],0x0 LAB_0016e5b1: LEA RSI,[RSP + 0x20] LEA RDX,[RSP + 0x7] LEA R8,[RSP + 0x8] LEA R9,[RSP + 0x1c] CALL 0x0017a706 XOR EAX,EAX MOV qword ptr [RBX + 0x8],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x28],RAX MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0x58] TEST RDI,RDI JZ 0x0016e5f1 CALL 0x00142d00 LAB_0016e5f1: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x0016e600 CALL 0x00142d00 LAB_0016e600: LEA RAX,[RSP + 0x40] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0016e61b MOV RSI,qword ptr [RSP + 0x40] INC RSI CALL 0x001196b0 LAB_0016e61b: MOV RAX,RBX ADD RSP,0x68 POP RBX POP R14 RET LAB_0016e626: LEA RDI,[0x1f00a8] CALL 0x00119c30 TEST EAX,EAX JZ 0x0016e4f2 LAB_0016e63a: LEA RDI,[0x1f0088] LEA RSI,[0x1be0e9] MOV EDX,0x10 CALL 0x00136850 LAB_0016e652: LEA RDI,[0x1368b8] LEA RSI,[0x1f0088] LEA RDX,[0x1ef6c8] CALL 0x001195e0 LEA RDI,[0x1f00a8] CALL 0x00119460 JMP 0x0016e4f2 LAB_0016e67d: MOV EDI,0x10 CALL 0x00119370 MOV R14,RAX LAB_0016e68a: LEA RSI,[0x1be1d3] MOV RDI,RAX CALL 0x00119270 LAB_0016e699: MOV RSI,qword ptr [0x001eefe8] MOV RDX,qword ptr [0x001eef68] MOV RDI,R14 CALL 0x00119b70
/* minja::Parser::parseMathUnaryPlusMinus() */ void minja::Parser::parseMathUnaryPlusMinus(void) { _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1; long lVar2; int iVar3; runtime_error *this; int8 *in_RSI; long *in_RDI; int1 local_71; long local_70; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68; uint local_5c; long local_58; long lStack_50; long *local_48; long local_40; long local_38 [2]; int8 local_28; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_20; long local_18; if (parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_ == '\0') { iVar3 = __cxa_guard_acquire(&parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_); if (iVar3 != 0) { /* try { // try from 0016e63a to 0016e651 has its CatchHandler @ 0016e6af */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_,"\\+|-(?![}%#]\\})",0x10 ); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_); } } consumeToken(&local_48); /* try { // try from 0016e50b to 0016e517 has its CatchHandler @ 0016e6f5 */ parseExpansion(); p_Var1 = local_68; if (local_70 != 0) { if (local_40 == 0) { *in_RDI = local_70; in_RDI[1] = 0; local_68 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; in_RDI[1] = (long)p_Var1; local_70 = 0; } else { iVar3 = std::__cxx11::string::compare((char *)&local_48); local_5c = (uint)(iVar3 != 0); local_28 = *in_RSI; local_20 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1]; if (local_20 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_001eef90 == '\0') { LOCK(); *(int *)(local_20 + 8) = *(int *)(local_20 + 8) + 1; UNLOCK(); } else { *(int *)(local_20 + 8) = *(int *)(local_20 + 8) + 1; } } local_18 = in_RSI[4] - in_RSI[2]; local_58 = 0; /* try { // try from 0016e5b1 to 0016e5c9 has its CatchHandler @ 0016e6d2 */ std::__shared_count<(__gnu_cxx::_Lock_policy)2>:: __shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op&> ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&lStack_50,&local_58,&local_71, &local_28,&local_70,&local_5c); lVar2 = lStack_50; in_RDI[1] = 0; lStack_50 = 0; *in_RDI = local_58; in_RDI[1] = lVar2; local_58 = 0; if (local_20 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_20); } } if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68); } if (local_48 != local_38) { operator_delete(local_48,local_38[0] + 1); } return; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016e68a to 0016e698 has its CatchHandler @ 0016e6c5 */ std::runtime_error::runtime_error (this,"Expected expr of \'unary plus/minus/expansion\' expression"); /* try { // try from 0016e699 to 0016e6ae has its CatchHandler @ 0016e6c0 */ /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001eefe8,PTR__runtime_error_001eef68); }
21,734
google::protobuf::OneofOptions::Clear()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
void OneofOptions::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.OneofOptions) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_._extensions_.Clear(); _impl_.uninterpreted_option_.Clear(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); }
O0
cpp
google::protobuf::OneofOptions::Clear(): subq $0x38, %rsp movq %rdi, 0x18(%rsp) movq 0x18(%rsp), %rdi movq %rdi, (%rsp) movl $0x0, 0x14(%rsp) addq $0x10, %rdi callq 0x1984c0 movq (%rsp), %rdi addq $0x10, %rdi addq $0x18, %rdi callq 0xd6c10 movq (%rsp), %rax addq $0x8, %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x8(%rsp) movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax movq (%rax), %rax andq $0x1, %rax cmpq $0x0, %rax je 0xb4e36 movq 0x8(%rsp), %rdi callq 0xe0a90 addq $0x38, %rsp retq nopl (%rax,%rax)
_ZN6google8protobuf12OneofOptions5ClearEv: sub rsp, 38h mov [rsp+38h+var_20], rdi mov rdi, [rsp+38h+var_20] mov [rsp+38h+var_38], rdi mov [rsp+38h+var_24], 0 add rdi, 10h; this call _ZN6google8protobuf8internal12ExtensionSet5ClearEv; google::protobuf::internal::ExtensionSet::Clear(void) mov rdi, [rsp+38h+var_38] add rdi, 10h add rdi, 18h call _ZN6google8protobuf16RepeatedPtrFieldINS0_19UninterpretedOptionEE5ClearEv; google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::Clear(void) mov rax, [rsp+38h+var_38] add rax, 8 mov [rsp+38h+var_18], rax mov rax, [rsp+38h+var_18] mov [rsp+38h+var_30], rax mov [rsp+38h+var_10], rax mov rax, [rsp+38h+var_10] mov [rsp+38h+var_8], rax mov rax, [rsp+38h+var_8] mov rax, [rax] and rax, 1 cmp rax, 0 jz short loc_B4E36 mov rdi, [rsp+38h+var_30]; void * call _ZN6google8protobuf8internal16InternalMetadata7DoClearINS0_15UnknownFieldSetEEEvv; google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>(void) loc_B4E36: add rsp, 38h retn
long long google::protobuf::OneofOptions::Clear(google::protobuf::OneofOptions *this) { long long result; // rax google::protobuf::internal::ExtensionSet::Clear((google::protobuf::OneofOptions *)((char *)this + 16)); google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::Clear((char *)this + 40); result = *((_QWORD *)this + 1) & 1LL; if ( result ) return google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>((char *)this + 8); return result; }
Clear: SUB RSP,0x38 MOV qword ptr [RSP + 0x18],RDI MOV RDI,qword ptr [RSP + 0x18] MOV qword ptr [RSP],RDI MOV dword ptr [RSP + 0x14],0x0 ADD RDI,0x10 CALL 0x002984c0 MOV RDI,qword ptr [RSP] ADD RDI,0x10 ADD RDI,0x18 CALL 0x001d6c10 MOV RAX,qword ptr [RSP] ADD RAX,0x8 MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX] AND RAX,0x1 CMP RAX,0x0 JZ 0x001b4e36 MOV RDI,qword ptr [RSP + 0x8] CALL 0x001e0a90 LAB_001b4e36: ADD RSP,0x38 RET
/* google::protobuf::OneofOptions::Clear() */ void __thiscall google::protobuf::OneofOptions::Clear(OneofOptions *this) { internal::ExtensionSet::Clear((ExtensionSet *)(this + 0x10)); RepeatedPtrField<google::protobuf::UninterpretedOption>::Clear ((RepeatedPtrField<google::protobuf::UninterpretedOption> *)(this + 0x28)); if ((*(ulong *)(this + 8) & 1) != 0) { internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet> ((InternalMetadata *)(this + 8)); } return; }
21,735
rope_yarn(float, float, float*, long, float, float, float*, float*)
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp
static void rope_yarn( float theta_extrap, float freq_scale, float corr_dims[2], int64_t i0, float ext_factor, float mscale, float * cos_theta, float * sin_theta) { // Get n-d rotational scaling corrected for extrapolation float theta_interp = freq_scale * theta_extrap; float theta = theta_interp; if (ext_factor != 0.0f) { float ramp_mix = rope_yarn_ramp(corr_dims[0], corr_dims[1], i0) * ext_factor; theta = theta_interp * (1 - ramp_mix) + theta_extrap * ramp_mix; // Get n-d magnitude scaling corrected for interpolation mscale *= 1.0f + 0.1f * logf(1.0f / freq_scale); } *cos_theta = cosf(theta) * mscale; *sin_theta = sinf(theta) * mscale; }
O1
cpp
rope_yarn(float, float, float*, long, float, float, float*, float*): pushq %r14 pushq %rbx pushq %rax movq %rcx, %rbx movq %rdx, %r14 vmulss %xmm1, %xmm0, %xmm8 vxorps %xmm7, %xmm7, %xmm7 vucomiss %xmm7, %xmm2 vmovss %xmm3, (%rsp) jne 0x481ab jnp 0x48232 vmovss (%rdi), %xmm4 vmovss 0x4(%rdi), %xmm5 movl %esi, %eax shrl $0x1f, %eax addl %esi, %eax sarl %eax vcvtsi2ss %eax, %xmm6, %xmm6 vsubss %xmm4, %xmm6, %xmm6 vsubss %xmm4, %xmm5, %xmm4 vmovss 0xb3b3(%rip), %xmm5 # 0x53584 vmaxss %xmm4, %xmm5, %xmm4 vdivss %xmm4, %xmm6, %xmm4 vmaxss %xmm4, %xmm7, %xmm3 vmovss 0xebb(%rip), %xmm4 # 0x490a0 vminss %xmm3, %xmm4, %xmm3 vsubss %xmm3, %xmm4, %xmm3 vmulss %xmm2, %xmm3, %xmm2 vsubss %xmm2, %xmm4, %xmm3 vmulss %xmm0, %xmm2, %xmm0 vfmadd231ss %xmm3, %xmm8, %xmm0 # xmm0 = (xmm8 * xmm3) + xmm0 vmovss %xmm0, 0x4(%rsp) vdivss %xmm1, %xmm4, %xmm0 callq 0xb150 vmovss 0xe8b(%rip), %xmm1 # 0x490a0 vfmadd132ss 0xb36a(%rip), %xmm1, %xmm0 # xmm0 = (xmm0 * mem) + xmm1 vmovss (%rsp), %xmm1 vmulss %xmm1, %xmm0, %xmm1 vmovss %xmm1, (%rsp) vmovss 0x4(%rsp), %xmm8 vmovss %xmm8, 0x4(%rsp) vmovaps %xmm8, %xmm0 callq 0xa600 vmulss (%rsp), %xmm0, %xmm0 vmovss %xmm0, (%r14) vmovss 0x4(%rsp), %xmm0 callq 0xa720 vmulss (%rsp), %xmm0, %xmm0 vmovss %xmm0, (%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq
_ZL9rope_yarnffPflffS_S_: push r14 push rbx push rax mov rbx, rcx mov r14, rdx vmulss xmm8, xmm0, xmm1 vxorps xmm7, xmm7, xmm7 vucomiss xmm2, xmm7 vmovss [rsp+18h+var_18], xmm3 jnz short loc_481AB jnp loc_48232 loc_481AB: vmovss xmm4, dword ptr [rdi] vmovss xmm5, dword ptr [rdi+4] mov eax, esi shr eax, 1Fh add eax, esi sar eax, 1 vcvtsi2ss xmm6, xmm6, eax vsubss xmm6, xmm6, xmm4 vsubss xmm4, xmm5, xmm4 vmovss xmm5, cs:dword_53584 vmaxss xmm4, xmm5, xmm4 vdivss xmm4, xmm6, xmm4 vmaxss xmm3, xmm7, xmm4 vmovss xmm4, cs:dword_490A0 vminss xmm3, xmm4, xmm3 vsubss xmm3, xmm4, xmm3 vmulss xmm2, xmm3, xmm2 vsubss xmm3, xmm4, xmm2 vmulss xmm0, xmm2, xmm0 vfmadd231ss xmm0, xmm8, xmm3 vmovss [rsp+18h+var_14], xmm0 vdivss xmm0, xmm4, xmm1 call _logf vmovss xmm1, cs:dword_490A0 vfmadd132ss xmm0, xmm1, cs:dword_53588 vmovss xmm1, [rsp+18h+var_18] vmulss xmm1, xmm0, xmm1 vmovss [rsp+18h+var_18], xmm1 vmovss xmm8, [rsp+18h+var_14] loc_48232: vmovss [rsp+18h+var_14], xmm8 vmovaps xmm0, xmm8 call _cosf vmulss xmm0, xmm0, [rsp+18h+var_18] vmovss dword ptr [r14], xmm0 vmovss xmm0, [rsp+18h+var_14] call _sinf vmulss xmm0, xmm0, [rsp+18h+var_18] vmovss dword ptr [rbx], xmm0 add rsp, 8 pop rbx pop r14 retn
void rope_yarn( __m128 _XMM0, float a2, float *_RDI, long long a4, __m128 _XMM2, __m128 _XMM3, float *a7, float *a8, double a9, double a10, __m128 _XMM6, __m128 _XMM7) { char v12; // zf char v13; // pf _RBX = a8; _R14 = a7; __asm { vmulss xmm8, xmm0, xmm1 vxorps xmm7, xmm7, xmm7 vucomiss xmm2, xmm7 vmovss [rsp+18h+var_18], xmm3 } if ( !v12 || v13 ) { __asm { vmovss xmm4, dword ptr [rdi] vmovss xmm5, dword ptr [rdi+4] vcvtsi2ss xmm6, xmm6, eax vsubss xmm6, xmm6, xmm4 vsubss xmm4, xmm5, xmm4 vmovss xmm5, cs:dword_53584 vmaxss xmm4, xmm5, xmm4 vdivss xmm4, xmm6, xmm4 vmaxss xmm3, xmm7, xmm4 vmovss xmm4, cs:dword_490A0 vminss xmm3, xmm4, xmm3 vsubss xmm3, xmm4, xmm3 vmulss xmm2, xmm3, xmm2 vsubss xmm3, xmm4, xmm2 vmulss xmm0, xmm2, xmm0 vfmadd231ss xmm0, xmm8, xmm3 vmovss [rsp+18h+var_14], xmm0 vdivss xmm0, xmm4, xmm1 } *(double *)&_XMM0 = logf(*(double *)&_XMM0); __asm { vmovss xmm1, cs:dword_490A0 vfmadd132ss xmm0, xmm1, cs:dword_53588 vmovss xmm1, [rsp+18h+var_18] vmulss xmm1, xmm0, xmm1 vmovss [rsp+18h+var_18], xmm1 vmovss xmm8, [rsp+18h+var_14] } } __asm { vmovss [rsp+18h+var_14], xmm8 vmovaps xmm0, xmm8 } *(double *)&_XMM0 = cosf(*(double *)&_XMM0); __asm { vmulss xmm0, xmm0, [rsp+18h+var_18] vmovss dword ptr [r14], xmm0 vmovss xmm0, [rsp+18h+var_14] } *(double *)&_XMM0 = sinf(*(double *)&_XMM0); __asm { vmulss xmm0, xmm0, [rsp+18h+var_18] vmovss dword ptr [rbx], xmm0 } }
rope_yarn: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RCX MOV R14,RDX VMULSS XMM8,XMM0,XMM1 VXORPS XMM7,XMM7,XMM7 VUCOMISS XMM2,XMM7 VMOVSS dword ptr [RSP],XMM3 JNZ 0x001481ab JNP 0x00148232 LAB_001481ab: VMOVSS XMM4,dword ptr [RDI] VMOVSS XMM5,dword ptr [RDI + 0x4] MOV EAX,ESI SHR EAX,0x1f ADD EAX,ESI SAR EAX,0x1 VCVTSI2SS XMM6,XMM6,EAX VSUBSS XMM6,XMM6,XMM4 VSUBSS XMM4,XMM5,XMM4 VMOVSS XMM5,dword ptr [0x00153584] VMAXSS XMM4,XMM5,XMM4 VDIVSS XMM4,XMM6,XMM4 VMAXSS XMM3,XMM7,XMM4 VMOVSS XMM4,dword ptr [0x001490a0] VMINSS XMM3,XMM4,XMM3 VSUBSS XMM3,XMM4,XMM3 VMULSS XMM2,XMM3,XMM2 VSUBSS XMM3,XMM4,XMM2 VMULSS XMM0,XMM2,XMM0 VFMADD231SS XMM0,XMM8,XMM3 VMOVSS dword ptr [RSP + 0x4],XMM0 VDIVSS XMM0,XMM4,XMM1 CALL 0x0010b150 VMOVSS XMM1,dword ptr [0x001490a0] VFMADD132SS XMM0,XMM1,dword ptr [0x00153588] VMOVSS XMM1,dword ptr [RSP] VMULSS XMM1,XMM0,XMM1 VMOVSS dword ptr [RSP],XMM1 VMOVSS XMM8,dword ptr [RSP + 0x4] LAB_00148232: VMOVSS dword ptr [RSP + 0x4],XMM8 VMOVAPS XMM0,XMM8 CALL 0x0010a600 VMULSS XMM0,XMM0,dword ptr [RSP] VMOVSS dword ptr [R14],XMM0 VMOVSS XMM0,dword ptr [RSP + 0x4] CALL 0x0010a720 VMULSS XMM0,XMM0,dword ptr [RSP] VMOVSS dword ptr [RBX],XMM0 ADD RSP,0x8 POP RBX POP R14 RET
/* rope_yarn(float, float, float*, long, float, float, float*, float*) */ void rope_yarn(float param_1,float param_2,float *param_3,long param_4,float param_5,float param_6, float *param_7,float *param_8) { int1 auVar1 [16]; float fVar2; float fVar3; int1 auVar4 [64]; int1 extraout_var [60]; fVar3 = param_1 * param_2; if ((param_5 != 0.0) || (NAN(param_5))) { auVar1 = vmaxss_avx(ZEXT416(DAT_00153584),ZEXT416((uint)(param_3[1] - *param_3))); auVar1 = vmaxss_avx(ZEXT816(0) << 0x40, ZEXT416((uint)(((float)((int)(((uint)((ulong)param_4 >> 0x1f) & 1) + (int)param_4) >> 1) - *param_3) / auVar1._0_4_) )); auVar1 = vminss_avx(ZEXT416((uint)DAT_001490a0),auVar1); fVar2 = (DAT_001490a0 - auVar1._0_4_) * param_5; auVar1 = vfmadd231ss_fma(ZEXT416((uint)(fVar2 * param_1)),ZEXT416((uint)fVar3), ZEXT416((uint)(DAT_001490a0 - fVar2))); fVar3 = auVar1._0_4_; auVar4._0_4_ = logf(DAT_001490a0 / param_2); auVar4._4_60_ = extraout_var; auVar1 = vfmadd132ss_fma(auVar4._0_16_,ZEXT416((uint)DAT_001490a0),ZEXT416(DAT_00153588)); param_6 = auVar1._0_4_ * param_6; } fVar2 = cosf(fVar3); *param_7 = fVar2 * param_6; fVar3 = sinf(fVar3); *param_8 = fVar3 * param_6; return; }
21,736
LefDefParser::defiNet::cutMaskNum(int) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNet.cpp
const int defiNet::cutMaskNum(int index) const { char errMsg[128]; if (index < 0 || index > numPts_) { sprintf (errMsg, "ERROR (DEFPARS-6085): The index number %d specified for the NET POLYGON is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again.", index, numPts_); defiError(0, 6085, errMsg, defData); return 0; } return viaMasks_[index] / 10 % 10; }
O3
cpp
LefDefParser::defiNet::cutMaskNum(int) const: pushq %r15 pushq %r14 pushq %rbx subq $0x80, %rsp movl %esi, %edx movq %rdi, %r14 testl %esi, %esi sets %al movl 0x210(%rdi), %ecx cmpl %esi, %ecx setl %sil orb %al, %sil cmpb $0x1, %sil jne 0x24c0b leaq 0x1e19a(%rip), %rsi # 0x42d7e xorl %ebx, %ebx movq %rsp, %r15 movq %r15, %rdi xorl %eax, %eax callq 0x6060 movq 0x240(%r14), %rcx xorl %edi, %edi movl $0x17c5, %esi # imm = 0x17C5 movq %r15, %rdx callq 0x18f80 jmp 0x24c4a movq 0x220(%r14), %rax movl %edx, %ecx movslq (%rax,%rcx,4), %rax imulq $0x66666667, %rax, %rax # imm = 0x66666667 movq %rax, %rcx shrq $0x3f, %rcx sarq $0x22, %rax addl %ecx, %eax movslq %eax, %rbx imulq $0x66666667, %rbx, %rax # imm = 0x66666667 movq %rax, %rcx shrq $0x3f, %rcx sarq $0x22, %rax addl %ecx, %eax addl %eax, %eax leal (%rax,%rax,4), %eax subl %eax, %ebx movl %ebx, %eax addq $0x80, %rsp popq %rbx popq %r14 popq %r15 retq nop
_ZNK12LefDefParser7defiNet10cutMaskNumEi: push r15 push r14 push rbx sub rsp, 80h mov edx, esi mov r14, rdi test esi, esi sets al mov ecx, [rdi+210h] cmp ecx, esi setl sil or sil, al cmp sil, 1 jnz short loc_24C0B lea rsi, aErrorDefpars60_6; "ERROR (DEFPARS-6085): The index number "... xor ebx, ebx mov r15, rsp mov rdi, r15 xor eax, eax call _sprintf mov rcx, [r14+240h]; LefDefParser::defrData * xor edi, edi; this mov esi, 17C5h; int mov rdx, r15; char * call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *) jmp short loc_24C4A loc_24C0B: mov rax, [r14+220h] mov ecx, edx movsxd rax, dword ptr [rax+rcx*4] imul rax, 66666667h mov rcx, rax shr rcx, 3Fh sar rax, 22h add eax, ecx movsxd rbx, eax imul rax, rbx, 66666667h mov rcx, rax shr rcx, 3Fh sar rax, 22h add eax, ecx add eax, eax lea eax, [rax+rax*4] sub ebx, eax loc_24C4A: mov eax, ebx add rsp, 80h pop rbx pop r14 pop r15 retn
long long LefDefParser::defiNet::cutMaskNum(LefDefParser::defiNet *this, int a2) { int v2; // ecx unsigned int v3; // ebx LefDefParser::defrData *v4; // r8 char v6[152]; // [rsp+0h] [rbp-98h] BYREF v2 = *((_DWORD *)this + 132); if ( a2 < 0 || v2 < a2 ) { v3 = 0; sprintf( v6, "ERROR (DEFPARS-6085): The index number %d specified for the NET POLYGON is invalid.\n" "Valid index is from 0 to %d. Specify a valid index number and then try again.", a2, v2); LefDefParser::defiError(0LL, 6085, v6, *((LefDefParser::defrData **)this + 72), v4); } else { return (unsigned int)(*(_DWORD *)(*((_QWORD *)this + 68) + 4LL * (unsigned int)a2) / 10 % 10); } return v3; }
cutMaskNum: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x80 MOV EDX,ESI MOV R14,RDI TEST ESI,ESI SETS AL MOV ECX,dword ptr [RDI + 0x210] CMP ECX,ESI SETL SIL OR SIL,AL CMP SIL,0x1 JNZ 0x00124c0b LEA RSI,[0x142d7e] XOR EBX,EBX MOV R15,RSP MOV RDI,R15 XOR EAX,EAX CALL 0x00106060 MOV RCX,qword ptr [R14 + 0x240] XOR EDI,EDI MOV ESI,0x17c5 MOV RDX,R15 CALL 0x00118f80 JMP 0x00124c4a LAB_00124c0b: MOV RAX,qword ptr [R14 + 0x220] MOV ECX,EDX MOVSXD RAX,dword ptr [RAX + RCX*0x4] IMUL RAX,RAX,0x66666667 MOV RCX,RAX SHR RCX,0x3f SAR RAX,0x22 ADD EAX,ECX MOVSXD RBX,EAX IMUL RAX,RBX,0x66666667 MOV RCX,RAX SHR RCX,0x3f SAR RAX,0x22 ADD EAX,ECX ADD EAX,EAX LEA EAX,[RAX + RAX*0x4] SUB EBX,EAX LAB_00124c4a: MOV EAX,EBX ADD RSP,0x80 POP RBX POP R14 POP R15 RET
/* LefDefParser::defiNet::cutMaskNum(int) const */ int __thiscall LefDefParser::defiNet::cutMaskNum(defiNet *this,int param_1) { int iVar1; char acStack_98 [128]; if (*(int *)(this + 0x210) < param_1 || param_1 < 0) { iVar1 = 0; sprintf(acStack_98, "ERROR (DEFPARS-6085): The index number %d specified for the NET POLYGON is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again." ); defiError(0,0x17c5,acStack_98,*(defrData **)(this + 0x240)); } else { iVar1 = (*(int *)(*(long *)(this + 0x220) + (ulong)(uint)param_1 * 4) / 10) % 10; } return iVar1; }
21,737
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 0x911fc movups (%r14), %xmm0 movups %xmm0, (%rbx) movq %r14, %rdi xorl %esi, %esi callq 0x851c0 movb $0x0, (%r14) movq $0x0, 0x8(%r14) movq %rbx, %rdi movl $0x1, %esi callq 0x851c0 movq %r14, %rdi xorl %esi, %esi callq 0x851c0 movq %r14, %rdi callq 0x89fae 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 0x001911fc MOVUPS XMM0,xmmword ptr [R14] MOVUPS xmmword ptr [RBX],XMM0 MOV RDI,R14 XOR ESI,ESI CALL 0x001851c0 MOV byte ptr [R14],0x0 MOV qword ptr [R14 + 0x8],0x0 MOV RDI,RBX MOV ESI,0x1 CALL 0x001851c0 MOV RDI,R14 XOR ESI,ESI CALL 0x001851c0 MOV RDI,R14 CALL 0x00189fae 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; }
21,738
composition_source_atop
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-blend.c
static void composition_source_atop(uint32_t* dest, int length, const uint32_t* src, uint32_t const_alpha) { if(const_alpha == 255) { for(int i = 0; i < length; i++) { uint32_t s = src[i]; uint32_t d = dest[i]; dest[i] = INTERPOLATE_PIXEL(s, plutovg_alpha(d), d, plutovg_alpha(~s)); } } else { for(int i = 0; i < length; i++) { uint32_t s = BYTE_MUL(src[i], const_alpha); uint32_t d = dest[i]; dest[i] = INTERPOLATE_PIXEL(s, plutovg_alpha(d), d, plutovg_alpha(~s)); } } }
O0
c
composition_source_atop: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) cmpl $0xff, -0x1c(%rbp) jne 0x8955a movl $0x0, -0x20(%rbp) movl -0x20(%rbp), %eax cmpl -0xc(%rbp), %eax jge 0x89558 movq -0x18(%rbp), %rax movslq -0x20(%rbp), %rcx movl (%rax,%rcx,4), %eax movl %eax, -0x24(%rbp) movq -0x8(%rbp), %rax movslq -0x20(%rbp), %rcx movl (%rax,%rcx,4), %eax movl %eax, -0x28(%rbp) movl -0x24(%rbp), %edi movl -0x28(%rbp), %esi shrl $0x18, %esi andl $0xff, %esi movl -0x28(%rbp), %edx movl -0x24(%rbp), %ecx xorl $-0x1, %ecx shrl $0x18, %ecx andl $0xff, %ecx callq 0x884a0 movl %eax, %edx movq -0x8(%rbp), %rax movslq -0x20(%rbp), %rcx movl %edx, (%rax,%rcx,4) movl -0x20(%rbp), %eax addl $0x1, %eax movl %eax, -0x20(%rbp) jmp 0x894f6 jmp 0x895cd movl $0x0, -0x2c(%rbp) movl -0x2c(%rbp), %eax cmpl -0xc(%rbp), %eax jge 0x895cb movq -0x18(%rbp), %rax movslq -0x2c(%rbp), %rcx movl (%rax,%rcx,4), %edi movl -0x1c(%rbp), %esi callq 0x88410 movl %eax, -0x30(%rbp) movq -0x8(%rbp), %rax movslq -0x2c(%rbp), %rcx movl (%rax,%rcx,4), %eax movl %eax, -0x34(%rbp) movl -0x30(%rbp), %edi movl -0x34(%rbp), %esi shrl $0x18, %esi andl $0xff, %esi movl -0x34(%rbp), %edx movl -0x30(%rbp), %ecx xorl $-0x1, %ecx shrl $0x18, %ecx andl $0xff, %ecx callq 0x884a0 movl %eax, %edx movq -0x8(%rbp), %rax movslq -0x2c(%rbp), %rcx movl %edx, (%rax,%rcx,4) movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0x89561 jmp 0x895cd addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
composition_source_atop: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx cmp [rbp+var_1C], 0FFh jnz short loc_8955A mov [rbp+var_20], 0 loc_894F6: mov eax, [rbp+var_20] cmp eax, [rbp+var_C] jge short loc_89558 mov rax, [rbp+var_18] movsxd rcx, [rbp+var_20] mov eax, [rax+rcx*4] mov [rbp+var_24], eax mov rax, [rbp+var_8] movsxd rcx, [rbp+var_20] mov eax, [rax+rcx*4] mov [rbp+var_28], eax mov edi, [rbp+var_24] mov esi, [rbp+var_28] shr esi, 18h and esi, 0FFh mov edx, [rbp+var_28] mov ecx, [rbp+var_24] xor ecx, 0FFFFFFFFh shr ecx, 18h and ecx, 0FFh call INTERPOLATE_PIXEL mov edx, eax mov rax, [rbp+var_8] movsxd rcx, [rbp+var_20] mov [rax+rcx*4], edx mov eax, [rbp+var_20] add eax, 1 mov [rbp+var_20], eax jmp short loc_894F6 loc_89558: jmp short loc_895CD loc_8955A: mov [rbp+var_2C], 0 loc_89561: mov eax, [rbp+var_2C] cmp eax, [rbp+var_C] jge short loc_895CB mov rax, [rbp+var_18] movsxd rcx, [rbp+var_2C] mov edi, [rax+rcx*4] mov esi, [rbp+var_1C] call BYTE_MUL mov [rbp+var_30], eax mov rax, [rbp+var_8] movsxd rcx, [rbp+var_2C] mov eax, [rax+rcx*4] mov [rbp+var_34], eax mov edi, [rbp+var_30] mov esi, [rbp+var_34] shr esi, 18h and esi, 0FFh mov edx, [rbp+var_34] mov ecx, [rbp+var_30] xor ecx, 0FFFFFFFFh shr ecx, 18h and ecx, 0FFh call INTERPOLATE_PIXEL mov edx, eax mov rax, [rbp+var_8] movsxd rcx, [rbp+var_2C] mov [rax+rcx*4], edx mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax jmp short loc_89561 loc_895CB: jmp short $+2 loc_895CD: add rsp, 40h pop rbp retn
long long composition_source_atop(long long a1, int a2, long long a3, int a4) { long long result; // rax unsigned int v5; // [rsp+10h] [rbp-30h] unsigned int j; // [rsp+14h] [rbp-2Ch] unsigned int i; // [rsp+20h] [rbp-20h] if ( a4 == 255 ) { for ( i = 0; ; ++i ) { result = i; if ( (int)i >= a2 ) break; *(_DWORD *)(a1 + 4LL * (int)i) = INTERPOLATE_PIXEL( *(_DWORD *)(a3 + 4LL * (int)i), (unsigned __int8)HIBYTE(*(_DWORD *)(a1 + 4LL * (int)i)), *(_DWORD *)(a1 + 4LL * (int)i), (unsigned int)~*(_DWORD *)(a3 + 4LL * (int)i) >> 24); } } else { for ( j = 0; ; ++j ) { result = j; if ( (int)j >= a2 ) break; v5 = BYTE_MUL(*(_DWORD *)(a3 + 4LL * (int)j), a4); *(_DWORD *)(a1 + 4LL * (int)j) = INTERPOLATE_PIXEL( v5, (unsigned __int8)HIBYTE(*(_DWORD *)(a1 + 4LL * (int)j)), *(_DWORD *)(a1 + 4LL * (int)j), ~v5 >> 24); } } return result; }
composition_source_atop: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX CMP dword ptr [RBP + -0x1c],0xff JNZ 0x0018955a MOV dword ptr [RBP + -0x20],0x0 LAB_001894f6: MOV EAX,dword ptr [RBP + -0x20] CMP EAX,dword ptr [RBP + -0xc] JGE 0x00189558 MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,dword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RBP + -0x28],EAX MOV EDI,dword ptr [RBP + -0x24] MOV ESI,dword ptr [RBP + -0x28] SHR ESI,0x18 AND ESI,0xff MOV EDX,dword ptr [RBP + -0x28] MOV ECX,dword ptr [RBP + -0x24] XOR ECX,0xffffffff SHR ECX,0x18 AND ECX,0xff CALL 0x001884a0 MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x20] MOV dword ptr [RAX + RCX*0x4],EDX MOV EAX,dword ptr [RBP + -0x20] ADD EAX,0x1 MOV dword ptr [RBP + -0x20],EAX JMP 0x001894f6 LAB_00189558: JMP 0x001895cd LAB_0018955a: MOV dword ptr [RBP + -0x2c],0x0 LAB_00189561: MOV EAX,dword ptr [RBP + -0x2c] CMP EAX,dword ptr [RBP + -0xc] JGE 0x001895cb MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,dword ptr [RBP + -0x2c] MOV EDI,dword ptr [RAX + RCX*0x4] MOV ESI,dword ptr [RBP + -0x1c] CALL 0x00188410 MOV dword ptr [RBP + -0x30],EAX MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x2c] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RBP + -0x34],EAX MOV EDI,dword ptr [RBP + -0x30] MOV ESI,dword ptr [RBP + -0x34] SHR ESI,0x18 AND ESI,0xff MOV EDX,dword ptr [RBP + -0x34] MOV ECX,dword ptr [RBP + -0x30] XOR ECX,0xffffffff SHR ECX,0x18 AND ECX,0xff CALL 0x001884a0 MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x2c] MOV dword ptr [RAX + RCX*0x4],EDX MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x00189561 LAB_001895cb: JMP 0x001895cd LAB_001895cd: ADD RSP,0x40 POP RBP RET
void composition_source_atop(long param_1,int param_2,long param_3,int param_4) { uint uVar1; int4 uVar2; uint uVar3; int4 local_34; int4 local_28; if (param_4 == 0xff) { for (local_28 = 0; local_28 < param_2; local_28 = local_28 + 1) { uVar1 = *(uint *)(param_3 + (long)local_28 * 4); uVar3 = *(uint *)(param_1 + (long)local_28 * 4); uVar2 = INTERPOLATE_PIXEL(uVar1,uVar3 >> 0x18,uVar3,(uVar1 ^ 0xffffffff) >> 0x18); *(int4 *)(param_1 + (long)local_28 * 4) = uVar2; } } else { for (local_34 = 0; local_34 < param_2; local_34 = local_34 + 1) { uVar3 = BYTE_MUL(*(int4 *)(param_3 + (long)local_34 * 4),param_4); uVar1 = *(uint *)(param_1 + (long)local_34 * 4); uVar2 = INTERPOLATE_PIXEL(uVar3,uVar1 >> 0x18,uVar1,(uVar3 ^ 0xffffffff) >> 0x18); *(int4 *)(param_1 + (long)local_34 * 4) = uVar2; } } return; }
21,739
composition_source_atop
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-blend.c
static void composition_source_atop(uint32_t* dest, int length, const uint32_t* src, uint32_t const_alpha) { if(const_alpha == 255) { for(int i = 0; i < length; i++) { uint32_t s = src[i]; uint32_t d = dest[i]; dest[i] = INTERPOLATE_PIXEL(s, plutovg_alpha(d), d, plutovg_alpha(~s)); } } else { for(int i = 0; i < length; i++) { uint32_t s = BYTE_MUL(src[i], const_alpha); uint32_t d = dest[i]; dest[i] = INTERPOLATE_PIXEL(s, plutovg_alpha(d), d, plutovg_alpha(~s)); } } }
O1
c
composition_source_atop: pushq %rbp pushq %r15 pushq %r14 pushq %rbx cmpl $0xff, %ecx jne 0x41d0c testl %esi, %esi jle 0x41ddd movl %esi, %eax xorl %ecx, %ecx movl $0xff00ff, %esi # imm = 0xFF00FF movl $0x800080, %r8d # imm = 0x800080 movl (%rdx,%rcx,4), %r11d movl (%rdi,%rcx,4), %r9d movl %r9d, %ebp shrl $0x18, %ebp movl %r11d, %ebx notl %ebx shrl $0x18, %ebx movl %r11d, %r14d andl %esi, %r14d imull %ebp, %r14d movl %r9d, %r10d andl %esi, %r10d imull %ebx, %r10d addl %r14d, %r10d movl %r10d, %r14d shrl $0x8, %r14d andl %esi, %r14d addl %r8d, %r10d addl %r14d, %r10d shrl $0x8, %r10d andl %esi, %r10d shrl $0x8, %r11d andl %esi, %r11d imull %ebp, %r11d shrl $0x8, %r9d andl %esi, %r9d imull %ebx, %r9d addl %r11d, %r9d movl %r9d, %r11d shrl $0x8, %r11d andl %esi, %r11d addl %r8d, %r9d addl %r11d, %r9d andl $0xff00ff00, %r9d # imm = 0xFF00FF00 orl %r10d, %r9d movl %r9d, (%rdi,%rcx,4) incq %rcx cmpq %rcx, %rax jne 0x41c80 jmp 0x41ddd testl %esi, %esi jle 0x41ddd movl %esi, %eax xorl %esi, %esi movl $0xff00ff, %r8d # imm = 0xFF00FF movl $0x800080, %r9d # imm = 0x800080 movl (%rdx,%rsi,4), %r10d movl %r10d, %ebx andl %r8d, %ebx imull %ecx, %ebx movl %ebx, %r11d shrl $0x8, %r11d andl %r8d, %r11d addl %r9d, %ebx addl %r11d, %ebx shrl $0x8, %ebx andl %r8d, %ebx shrl $0x8, %r10d andl %r8d, %r10d imull %ecx, %r10d movl %r10d, %r11d shrl $0x8, %r11d andl %r8d, %r11d addl %r9d, %r10d addl %r11d, %r10d movl (%rdi,%rsi,4), %r11d movl %r11d, %r15d shrl $0x18, %r15d movl %r10d, %r14d notl %r14d shrl $0x18, %r14d imull %r15d, %ebx movl %r11d, %ebp andl %r8d, %ebp imull %r14d, %ebp addl %ebx, %ebp movl %ebp, %ebx shrl $0x8, %ebx andl %r8d, %ebx addl %r9d, %ebp addl %ebx, %ebp shrl $0x8, %ebp andl %r8d, %ebp shrl $0x8, %r10d andl %r8d, %r10d imull %r15d, %r10d shrl $0x8, %r11d andl %r8d, %r11d imull %r14d, %r11d addl %r10d, %r11d movl %r11d, %r10d shrl $0x8, %r10d andl %r8d, %r10d addl %r9d, %r11d addl %r10d, %r11d andl $0xff00ff00, %r11d # imm = 0xFF00FF00 orl %ebp, %r11d movl %r11d, (%rdi,%rsi,4) incq %rsi cmpq %rsi, %rax jne 0x41d24 popq %rbx popq %r14 popq %r15 popq %rbp retq
composition_source_atop: push rbp push r15 push r14 push rbx cmp ecx, 0FFh jnz loc_41D0C test esi, esi jle loc_41DDD mov eax, esi xor ecx, ecx mov esi, 0FF00FFh mov r8d, 800080h loc_41C80: mov r11d, [rdx+rcx*4] mov r9d, [rdi+rcx*4] mov ebp, r9d shr ebp, 18h mov ebx, r11d not ebx shr ebx, 18h mov r14d, r11d and r14d, esi imul r14d, ebp mov r10d, r9d and r10d, esi imul r10d, ebx add r10d, r14d mov r14d, r10d shr r14d, 8 and r14d, esi add r10d, r8d add r10d, r14d shr r10d, 8 and r10d, esi shr r11d, 8 and r11d, esi imul r11d, ebp shr r9d, 8 and r9d, esi imul r9d, ebx add r9d, r11d mov r11d, r9d shr r11d, 8 and r11d, esi add r9d, r8d add r9d, r11d and r9d, 0FF00FF00h or r9d, r10d mov [rdi+rcx*4], r9d inc rcx cmp rax, rcx jnz loc_41C80 jmp loc_41DDD loc_41D0C: test esi, esi jle loc_41DDD mov eax, esi xor esi, esi mov r8d, 0FF00FFh mov r9d, 800080h loc_41D24: mov r10d, [rdx+rsi*4] mov ebx, r10d and ebx, r8d imul ebx, ecx mov r11d, ebx shr r11d, 8 and r11d, r8d add ebx, r9d add ebx, r11d shr ebx, 8 and ebx, r8d shr r10d, 8 and r10d, r8d imul r10d, ecx mov r11d, r10d shr r11d, 8 and r11d, r8d add r10d, r9d add r10d, r11d mov r11d, [rdi+rsi*4] mov r15d, r11d shr r15d, 18h mov r14d, r10d not r14d shr r14d, 18h imul ebx, r15d mov ebp, r11d and ebp, r8d imul ebp, r14d add ebp, ebx mov ebx, ebp shr ebx, 8 and ebx, r8d add ebp, r9d add ebp, ebx shr ebp, 8 and ebp, r8d shr r10d, 8 and r10d, r8d imul r10d, r15d shr r11d, 8 and r11d, r8d imul r11d, r14d add r11d, r10d mov r10d, r11d shr r10d, 8 and r10d, r8d add r11d, r9d add r11d, r10d and r11d, 0FF00FF00h or r11d, ebp mov [rdi+rsi*4], r11d inc rsi cmp rax, rsi jnz loc_41D24 loc_41DDD: pop rbx pop r14 pop r15 pop rbp retn
void composition_source_atop(long long a1, int a2, long long a3, int a4) { long long i; // rcx int v5; // ebp unsigned int v6; // ebx long long v7; // rax long long j; // rsi int v9; // r15d unsigned int v10; // r14d if ( a4 == 255 ) { if ( a2 > 0 ) { for ( i = 0LL; i != a2; ++i ) { v5 = HIBYTE(*(_DWORD *)(a1 + 4 * i)); v6 = (unsigned int)~*(_DWORD *)(a3 + 4 * i) >> 24; *(_DWORD *)(a1 + 4 * i) = (((((v5 * (*(_DWORD *)(a3 + 4 * i) & 0xFF00FF) + v6 * (*(_DWORD *)(a1 + 4 * i) & 0xFF00FF)) >> 8) & 0xFF00FF) + v5 * (*(_DWORD *)(a3 + 4 * i) & 0xFF00FF) + v6 * (*(_DWORD *)(a1 + 4 * i) & 0xFF00FF) + 8388736) >> 8) & 0xFF00FF | ((((v5 * ((*(_DWORD *)(a3 + 4 * i) >> 8) & 0xFF00FF) + v6 * ((*(_DWORD *)(a1 + 4 * i) >> 8) & 0xFF00FF)) >> 8) & 0xFF00FF) + v5 * ((*(_DWORD *)(a3 + 4 * i) >> 8) & 0xFF00FF) + v6 * ((*(_DWORD *)(a1 + 4 * i) >> 8) & 0xFF00FF) + 8388736) & 0xFF00FF00; } } } else if ( a2 > 0 ) { v7 = (unsigned int)a2; for ( j = 0LL; j != v7; ++j ) { v9 = HIBYTE(*(_DWORD *)(a1 + 4 * j)); v10 = ~((((a4 * ((*(_DWORD *)(a3 + 4 * j) >> 8) & 0xFF00FFu)) >> 8) & 0xFF00FF) + a4 * ((*(_DWORD *)(a3 + 4 * j) >> 8) & 0xFF00FF) + 8388736) >> 24; *(_DWORD *)(a1 + 4 * j) = (((((v9 * ((((((a4 * (*(_DWORD *)(a3 + 4 * j) & 0xFF00FFu)) >> 8) & 0xFF00FF) + a4 * (*(_DWORD *)(a3 + 4 * j) & 0xFF00FF) + 8388736) >> 8) & 0xFF00FF) + v10 * (*(_DWORD *)(a1 + 4 * j) & 0xFF00FF)) >> 8) & 0xFF00FF) + v9 * ((((((a4 * (*(_DWORD *)(a3 + 4 * j) & 0xFF00FFu)) >> 8) & 0xFF00FF) + a4 * (*(_DWORD *)(a3 + 4 * j) & 0xFF00FF) + 8388736) >> 8) & 0xFF00FF) + v10 * (*(_DWORD *)(a1 + 4 * j) & 0xFF00FF) + 8388736) >> 8) & 0xFF00FF | ((((v9 * ((((((a4 * ((*(_DWORD *)(a3 + 4 * j) >> 8) & 0xFF00FFu)) >> 8) & 0xFF00FF) + a4 * ((*(_DWORD *)(a3 + 4 * j) >> 8) & 0xFF00FF) + 8388736) >> 8) & 0xFF00FF) + v10 * ((*(_DWORD *)(a1 + 4 * j) >> 8) & 0xFF00FF)) >> 8) & 0xFF00FF) + v9 * ((((((a4 * ((*(_DWORD *)(a3 + 4 * j) >> 8) & 0xFF00FFu)) >> 8) & 0xFF00FF) + a4 * ((*(_DWORD *)(a3 + 4 * j) >> 8) & 0xFF00FF) + 8388736) >> 8) & 0xFF00FF) + v10 * ((*(_DWORD *)(a1 + 4 * j) >> 8) & 0xFF00FF) + 8388736) & 0xFF00FF00; } } }
composition_source_atop: PUSH RBP PUSH R15 PUSH R14 PUSH RBX CMP ECX,0xff JNZ 0x00141d0c TEST ESI,ESI JLE 0x00141ddd MOV EAX,ESI XOR ECX,ECX MOV ESI,0xff00ff MOV R8D,0x800080 LAB_00141c80: MOV R11D,dword ptr [RDX + RCX*0x4] MOV R9D,dword ptr [RDI + RCX*0x4] MOV EBP,R9D SHR EBP,0x18 MOV EBX,R11D NOT EBX SHR EBX,0x18 MOV R14D,R11D AND R14D,ESI IMUL R14D,EBP MOV R10D,R9D AND R10D,ESI IMUL R10D,EBX ADD R10D,R14D MOV R14D,R10D SHR R14D,0x8 AND R14D,ESI ADD R10D,R8D ADD R10D,R14D SHR R10D,0x8 AND R10D,ESI SHR R11D,0x8 AND R11D,ESI IMUL R11D,EBP SHR R9D,0x8 AND R9D,ESI IMUL R9D,EBX ADD R9D,R11D MOV R11D,R9D SHR R11D,0x8 AND R11D,ESI ADD R9D,R8D ADD R9D,R11D AND R9D,0xff00ff00 OR R9D,R10D MOV dword ptr [RDI + RCX*0x4],R9D INC RCX CMP RAX,RCX JNZ 0x00141c80 JMP 0x00141ddd LAB_00141d0c: TEST ESI,ESI JLE 0x00141ddd MOV EAX,ESI XOR ESI,ESI MOV R8D,0xff00ff MOV R9D,0x800080 LAB_00141d24: MOV R10D,dword ptr [RDX + RSI*0x4] MOV EBX,R10D AND EBX,R8D IMUL EBX,ECX MOV R11D,EBX SHR R11D,0x8 AND R11D,R8D ADD EBX,R9D ADD EBX,R11D SHR EBX,0x8 AND EBX,R8D SHR R10D,0x8 AND R10D,R8D IMUL R10D,ECX MOV R11D,R10D SHR R11D,0x8 AND R11D,R8D ADD R10D,R9D ADD R10D,R11D MOV R11D,dword ptr [RDI + RSI*0x4] MOV R15D,R11D SHR R15D,0x18 MOV R14D,R10D NOT R14D SHR R14D,0x18 IMUL EBX,R15D MOV EBP,R11D AND EBP,R8D IMUL EBP,R14D ADD EBP,EBX MOV EBX,EBP SHR EBX,0x8 AND EBX,R8D ADD EBP,R9D ADD EBP,EBX SHR EBP,0x8 AND EBP,R8D SHR R10D,0x8 AND R10D,R8D IMUL R10D,R15D SHR R11D,0x8 AND R11D,R8D IMUL R11D,R14D ADD R11D,R10D MOV R10D,R11D SHR R10D,0x8 AND R10D,R8D ADD R11D,R9D ADD R11D,R10D AND R11D,0xff00ff00 OR R11D,EBP MOV dword ptr [RDI + RSI*0x4],R11D INC RSI CMP RAX,RSI JNZ 0x00141d24 LAB_00141ddd: POP RBX POP R14 POP R15 POP RBP RET
void composition_source_atop(long param_1,uint param_2,long param_3,int param_4) { ulong uVar1; uint uVar2; uint uVar3; uint uVar4; uint uVar5; if (param_4 == 0xff) { if (0 < (int)param_2) { uVar1 = 0; do { uVar3 = *(uint *)(param_3 + uVar1 * 4); uVar2 = *(uint *)(param_1 + uVar1 * 4); uVar4 = (uVar2 & 0xff00ff) * (~uVar3 >> 0x18) + (uVar3 & 0xff00ff) * (uVar2 >> 0x18); uVar3 = (uVar2 >> 8 & 0xff00ff) * (~uVar3 >> 0x18) + (uVar3 >> 8 & 0xff00ff) * (uVar2 >> 0x18); *(uint *)(param_1 + uVar1 * 4) = uVar3 + 0x800080 + (uVar3 >> 8 & 0xff00ff) & 0xff00ff00 | uVar4 + 0x800080 + (uVar4 >> 8 & 0xff00ff) >> 8 & 0xff00ff; uVar1 = uVar1 + 1; } while (param_2 != uVar1); } } else if (0 < (int)param_2) { uVar1 = 0; do { uVar3 = *(uint *)(param_3 + uVar1 * 4); uVar2 = (uVar3 & 0xff00ff) * param_4; uVar3 = (uVar3 >> 8 & 0xff00ff) * param_4; uVar4 = uVar3 + 0x800080 + (uVar3 >> 8 & 0xff00ff); uVar3 = *(uint *)(param_1 + uVar1 * 4); uVar5 = ~uVar4 >> 0x18; uVar2 = (uVar3 & 0xff00ff) * uVar5 + (uVar2 + 0x800080 + (uVar2 >> 8 & 0xff00ff) >> 8 & 0xff00ff) * (uVar3 >> 0x18); uVar3 = (uVar3 >> 8 & 0xff00ff) * uVar5 + (uVar4 >> 8 & 0xff00ff) * (uVar3 >> 0x18); *(uint *)(param_1 + uVar1 * 4) = uVar3 + 0x800080 + (uVar3 >> 8 & 0xff00ff) & 0xff00ff00 | uVar2 + 0x800080 + (uVar2 >> 8 & 0xff00ff) >> 8 & 0xff00ff; uVar1 = uVar1 + 1; } while (param_2 != uVar1); } return; }
21,740
binding_system_get_binding_env_index
tsotchke[P]eshkol/src/frontend/binding/lambda/binding_lambda.c
int binding_system_get_binding_env_index(BindingSystem* system, uint64_t binding_id) { assert(system != NULL); // Check if environment_indices array exists if (!system->binding_table.environment_indices) { return -1; } // Find the binding for (size_t i = 0; i < system->binding_table.count; i++) { if (system->binding_table.binding_ids[i] == binding_id) { return (int)system->binding_table.environment_indices[i]; } } return -1; }
O0
c
binding_system_get_binding_env_index: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) cmpq $0x0, -0x10(%rbp) je 0x12429 jmp 0x12448 leaq 0x499f(%rip), %rdi # 0x16dcf leaq 0x98aa(%rip), %rsi # 0x1bce1 movl $0xb4, %edx leaq 0x99d2(%rip), %rcx # 0x1be15 callq 0x1120 movq -0x10(%rbp), %rax cmpq $0x0, 0x40(%rax) jne 0x1245c movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x124b4 movq $0x0, -0x20(%rbp) movq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx cmpq 0x48(%rcx), %rax jae 0x124ad movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq -0x20(%rbp), %rcx movq (%rax,%rcx,8), %rax cmpq -0x18(%rbp), %rax jne 0x1249d movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq -0x20(%rbp), %rcx movq (%rax,%rcx,8), %rax movl %eax, -0x4(%rbp) jmp 0x124b4 jmp 0x1249f movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) jmp 0x12464 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax)
binding_system_get_binding_env_index: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi cmp [rbp+var_10], 0 jz short loc_12429 jmp short loc_12448 loc_12429: lea rdi, aSystemNull; "system != NULL" lea rsi, aWorkspaceLlm4b_21; "/workspace/llm4binary/github/2025_star3"... mov edx, 0B4h lea rcx, aIntBindingSyst; "int binding_system_get_binding_env_inde"... call ___assert_fail loc_12448: mov rax, [rbp+var_10] cmp qword ptr [rax+40h], 0 jnz short loc_1245C mov [rbp+var_4], 0FFFFFFFFh jmp short loc_124B4 loc_1245C: mov [rbp+var_20], 0 loc_12464: mov rax, [rbp+var_20] mov rcx, [rbp+var_10] cmp rax, [rcx+48h] jnb short loc_124AD mov rax, [rbp+var_10] mov rax, [rax+18h] mov rcx, [rbp+var_20] mov rax, [rax+rcx*8] cmp rax, [rbp+var_18] jnz short loc_1249D mov rax, [rbp+var_10] mov rax, [rax+40h] mov rcx, [rbp+var_20] mov rax, [rax+rcx*8] mov [rbp+var_4], eax jmp short loc_124B4 loc_1249D: jmp short $+2 loc_1249F: mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax jmp short loc_12464 loc_124AD: mov [rbp+var_4], 0FFFFFFFFh loc_124B4: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long binding_system_get_binding_env_index(_QWORD *a1, long long a2) { unsigned long long i; // [rsp+0h] [rbp-20h] if ( !a1 ) __assert_fail( "system != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/lambda/binding_lambda.c", 180LL, "int binding_system_get_binding_env_index(BindingSystem *, uint64_t)"); if ( a1[8] ) { for ( i = 0LL; i < a1[9]; ++i ) { if ( *(_QWORD *)(a1[3] + 8 * i) == a2 ) return (unsigned int)*(_QWORD *)(a1[8] + 8 * i); } return (unsigned int)-1; } else { return (unsigned int)-1; } }
binding_system_get_binding_env_index: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI CMP qword ptr [RBP + -0x10],0x0 JZ 0x00112429 JMP 0x00112448 LAB_00112429: LEA RDI,[0x116dcf] LEA RSI,[0x11bce1] MOV EDX,0xb4 LEA RCX,[0x11be15] CALL 0x00101120 LAB_00112448: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x40],0x0 JNZ 0x0011245c MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001124b4 LAB_0011245c: MOV qword ptr [RBP + -0x20],0x0 LAB_00112464: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x48] JNC 0x001124ad MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + RCX*0x8] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x0011249d MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + RCX*0x8] MOV dword ptr [RBP + -0x4],EAX JMP 0x001124b4 LAB_0011249d: JMP 0x0011249f LAB_0011249f: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x00112464 LAB_001124ad: MOV dword ptr [RBP + -0x4],0xffffffff LAB_001124b4: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 binding_system_get_binding_env_index(long param_1,long param_2) { ulong local_28; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("system != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/lambda/binding_lambda.c" ,0xb4,"int binding_system_get_binding_env_index(BindingSystem *, uint64_t)"); } if (*(long *)(param_1 + 0x40) != 0) { for (local_28 = 0; local_28 < *(ulong *)(param_1 + 0x48); local_28 = local_28 + 1) { if (*(long *)(*(long *)(param_1 + 0x18) + local_28 * 8) == param_2) { return (int)*(int8 *)(*(long *)(param_1 + 0x40) + local_28 * 8); } } } return 0xffffffff; }
21,741
ma_tls_write
eloqsql/libmariadb/libmariadb/secure/openssl.c
ssize_t ma_tls_write(MARIADB_TLS *ctls, const uchar* buffer, size_t length) { int rc; MARIADB_PVIO *pvio= ctls->pvio; while ((rc= SSL_write((SSL *)ctls->ssl, (void *)buffer, (int)length)) <= 0) { int error= SSL_get_error((SSL *)ctls->ssl, rc); if (error != SSL_ERROR_WANT_WRITE) break; if (pvio->methods->wait_io_or_timeout(pvio, TRUE, pvio->mysql->options.write_timeout) < 1) break; } if (rc <= 0) { MYSQL *mysql= SSL_get_app_data(ctls->ssl); ma_tls_set_error(mysql); } return rc; }
O3
c
ma_tls_write: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r12 movq %rdi, %r15 movq 0x8(%rdi), %r13 movq 0x10(%r15), %rdi movq %r12, %rsi movl %ebx, %edx callq 0x13880 movl %eax, %r14d testl %eax, %eax jg 0x2f463 movq 0x10(%r15), %rdi movl %r14d, %esi callq 0x13050 cmpl $0x3, %eax jne 0x2f450 movq 0x40(%r13), %rax movq 0x48(%r13), %rcx movl 0x398(%rax), %edx movq %r13, %rdi movl $0x1, %esi callq *0x30(%rcx) testl %eax, %eax jg 0x2f40d movq 0x10(%r15), %rdi xorl %esi, %esi callq 0x13160 movq %rax, %rdi callq 0x2f160 movslq %r14d, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ma_tls_write: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r12, rsi mov r15, rdi mov r13, [rdi+8] loc_2F40D: mov rdi, [r15+10h] mov rsi, r12 mov edx, ebx call _SSL_write mov r14d, eax test eax, eax jg short loc_2F463 mov rdi, [r15+10h] mov esi, r14d call _SSL_get_error cmp eax, 3 jnz short loc_2F450 mov rax, [r13+40h] mov rcx, [r13+48h] mov edx, [rax+398h] mov rdi, r13 mov esi, 1 call qword ptr [rcx+30h] test eax, eax jg short loc_2F40D loc_2F450: mov rdi, [r15+10h] xor esi, esi call _SSL_get_ex_data mov rdi, rax call ma_tls_set_error loc_2F463: movsxd rax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_tls_write(long long a1, long long a2, unsigned int a3) { long long v4; // r13 int v5; // eax int v6; // r14d long long *v7; // rax v4 = *(_QWORD *)(a1 + 8); while ( 1 ) { v5 = SSL_write(*(_QWORD *)(a1 + 16), a2, a3); v6 = v5; if ( v5 > 0 ) break; if ( (unsigned int)SSL_get_error(*(_QWORD *)(a1 + 16), (unsigned int)v5) != 3 || (*(int ( **)(long long, long long, _QWORD))(*(_QWORD *)(v4 + 72) + 48LL))( v4, 1LL, *(unsigned int *)(*(_QWORD *)(v4 + 64) + 920LL)) <= 0 ) { v7 = (long long *)SSL_get_ex_data(*(_QWORD *)(a1 + 16), 0LL); ma_tls_set_error(v7); return v6; } } return v6; }
ma_tls_write: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R12,RSI MOV R15,RDI MOV R13,qword ptr [RDI + 0x8] LAB_0012f40d: MOV RDI,qword ptr [R15 + 0x10] MOV RSI,R12 MOV EDX,EBX CALL 0x00113880 MOV R14D,EAX TEST EAX,EAX JG 0x0012f463 MOV RDI,qword ptr [R15 + 0x10] MOV ESI,R14D CALL 0x00113050 CMP EAX,0x3 JNZ 0x0012f450 MOV RAX,qword ptr [R13 + 0x40] MOV RCX,qword ptr [R13 + 0x48] MOV EDX,dword ptr [RAX + 0x398] MOV RDI,R13 MOV ESI,0x1 CALL qword ptr [RCX + 0x30] TEST EAX,EAX JG 0x0012f40d LAB_0012f450: MOV RDI,qword ptr [R15 + 0x10] XOR ESI,ESI CALL 0x00113160 MOV RDI,RAX CALL 0x0012f160 LAB_0012f463: MOVSXD RAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long ma_tls_write(long param_1,void *param_2,int param_3) { long lVar1; int ret_code; int iVar2; void *pvVar3; lVar1 = *(long *)(param_1 + 8); do { ret_code = SSL_write(*(SSL **)(param_1 + 0x10),param_2,param_3); if (0 < ret_code) goto LAB_0012f463; iVar2 = SSL_get_error(*(SSL **)(param_1 + 0x10),ret_code); if (iVar2 != 3) break; iVar2 = (**(code **)(*(long *)(lVar1 + 0x48) + 0x30)) (lVar1,1,*(int4 *)(*(long *)(lVar1 + 0x40) + 0x398)); } while (0 < iVar2); pvVar3 = SSL_get_ex_data(*(SSL **)(param_1 + 0x10),0); ma_tls_set_error(pvVar3); LAB_0012f463: return (long)ret_code; }
21,742
ma_free_root
eloqsql/libmariadb/libmariadb/ma_alloc.c
void ma_free_root(MA_MEM_ROOT *root, myf MyFlags) { reg1 MA_USED_MEM *next,*old; if (!root) return; /* purecov: inspected */ if (!(MyFlags & MY_KEEP_PREALLOC)) root->pre_alloc=0; for ( next=root->used; next ;) { old=next; next= next->next ; if (old != root->pre_alloc) free(old); } for (next= root->free ; next ; ) { old=next; next= next->next ; if (old != root->pre_alloc) free(old); } root->used=root->free=0; if (root->pre_alloc) { root->free=root->pre_alloc; root->free->left=root->pre_alloc->size-ALIGN_SIZE(sizeof(MA_USED_MEM)); root->free->next=0; } }
O0
c
ma_free_root: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) cmpq $0x0, -0x8(%rbp) jne 0x896ab jmp 0x89799 movl -0xc(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0x896c2 movq -0x8(%rbp), %rax movq $0x0, 0x10(%rax) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x89701 movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x20(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x10(%rcx), %rax je 0x896ff movq -0x20(%rbp), %rdi callq 0x601e0 jmp 0x896ce movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x8973f movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x20(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x10(%rcx), %rax je 0x8973d movq -0x20(%rbp), %rdi callq 0x601e0 jmp 0x8970c movq -0x8(%rbp), %rax movq $0x0, (%rax) movq -0x8(%rbp), %rax movq $0x0, 0x8(%rax) movq -0x8(%rbp), %rax cmpq $0x0, 0x10(%rax) je 0x89799 movq -0x8(%rbp), %rax movq 0x10(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq 0x10(%rax), %rcx subq $0x18, %rcx movq -0x8(%rbp), %rax movq (%rax), %rax movq %rcx, 0x8(%rax) movq -0x8(%rbp), %rax movq (%rax), %rax movq $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nop
ma_free_root: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], esi cmp [rbp+var_8], 0 jnz short loc_896AB jmp loc_89799 loc_896AB: mov eax, [rbp+var_C] and eax, 1 cmp eax, 0 jnz short loc_896C2 mov rax, [rbp+var_8] mov qword ptr [rax+10h], 0 loc_896C2: mov rax, [rbp+var_8] mov rax, [rax+8] mov [rbp+var_18], rax loc_896CE: cmp [rbp+var_18], 0 jz short loc_89701 mov rax, [rbp+var_18] mov [rbp+var_20], rax mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_20] mov rcx, [rbp+var_8] cmp rax, [rcx+10h] jz short loc_896FF mov rdi, [rbp+var_20] call _free loc_896FF: jmp short loc_896CE loc_89701: mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax loc_8970C: cmp [rbp+var_18], 0 jz short loc_8973F mov rax, [rbp+var_18] mov [rbp+var_20], rax mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_20] mov rcx, [rbp+var_8] cmp rax, [rcx+10h] jz short loc_8973D mov rdi, [rbp+var_20] call _free loc_8973D: jmp short loc_8970C loc_8973F: mov rax, [rbp+var_8] mov qword ptr [rax], 0 mov rax, [rbp+var_8] mov qword ptr [rax+8], 0 mov rax, [rbp+var_8] cmp qword ptr [rax+10h], 0 jz short loc_89799 mov rax, [rbp+var_8] mov rcx, [rax+10h] mov rax, [rbp+var_8] mov [rax], rcx mov rax, [rbp+var_8] mov rax, [rax+10h] mov rcx, [rax+10h] sub rcx, 18h mov rax, [rbp+var_8] mov rax, [rax] mov [rax+8], rcx mov rax, [rbp+var_8] mov rax, [rax] mov qword ptr [rax], 0 loc_89799: add rsp, 20h pop rbp retn
_QWORD * ma_free_root(_QWORD *a1, char a2) { _QWORD *result; // rax _QWORD *v3; // [rsp+0h] [rbp-20h] _QWORD *v4; // [rsp+0h] [rbp-20h] _QWORD *v5; // [rsp+8h] [rbp-18h] _QWORD *v6; // [rsp+8h] [rbp-18h] if ( a1 ) { if ( (a2 & 1) == 0 ) a1[2] = 0LL; v5 = (_QWORD *)a1[1]; while ( v5 ) { v3 = v5; v5 = (_QWORD *)*v5; if ( v3 != (_QWORD *)a1[2] ) free(v3); } v6 = (_QWORD *)*a1; while ( v6 ) { v4 = v6; v6 = (_QWORD *)*v6; if ( v4 != (_QWORD *)a1[2] ) free(v4); } *a1 = 0LL; a1[1] = 0LL; result = a1; if ( a1[2] ) { *a1 = a1[2]; *(_QWORD *)(*a1 + 8LL) = *(_QWORD *)(a1[2] + 16LL) - 24LL; result = (_QWORD *)*a1; *(_QWORD *)*a1 = 0LL; } } return result; }
ma_free_root: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI CMP qword ptr [RBP + -0x8],0x0 JNZ 0x001896ab JMP 0x00189799 LAB_001896ab: MOV EAX,dword ptr [RBP + -0xc] AND EAX,0x1 CMP EAX,0x0 JNZ 0x001896c2 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],0x0 LAB_001896c2: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x18],RAX LAB_001896ce: CMP qword ptr [RBP + -0x18],0x0 JZ 0x00189701 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x10] JZ 0x001896ff MOV RDI,qword ptr [RBP + -0x20] CALL 0x001601e0 LAB_001896ff: JMP 0x001896ce LAB_00189701: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX LAB_0018970c: CMP qword ptr [RBP + -0x18],0x0 JZ 0x0018973f MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x10] JZ 0x0018973d MOV RDI,qword ptr [RBP + -0x20] CALL 0x001601e0 LAB_0018973d: JMP 0x0018970c LAB_0018973f: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x10],0x0 JZ 0x00189799 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RAX + 0x10] SUB RCX,0x18 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX],0x0 LAB_00189799: ADD RSP,0x20 POP RBP RET
void ma_free_root(long *param_1,uint param_2) { int8 *puVar1; int8 *local_20; if (param_1 != (long *)0x0) { if ((param_2 & 1) == 0) { param_1[2] = 0; } puVar1 = (int8 *)param_1[1]; while (local_20 = puVar1, local_20 != (int8 *)0x0) { puVar1 = (int8 *)*local_20; if (local_20 != (int8 *)param_1[2]) { free(local_20); } } puVar1 = (int8 *)*param_1; while (local_20 = puVar1, local_20 != (int8 *)0x0) { puVar1 = (int8 *)*local_20; if (local_20 != (int8 *)param_1[2]) { free(local_20); } } *param_1 = 0; param_1[1] = 0; if (param_1[2] != 0) { *param_1 = param_1[2]; *(long *)(*param_1 + 8) = *(long *)(param_1[2] + 0x10) + -0x18; *(int8 *)*param_1 = 0; } } return; }
21,743
httplib::detail::MultipartFormDataParser::MultipartFormDataParser()
hkr04[P]cpp-mcp/common/httplib.h
MultipartFormDataParser() = default;
O1
c
httplib::detail::MultipartFormDataParser::MultipartFormDataParser(): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx leaq 0x10(%rdi), %r15 movq %r15, (%rdi) leaq 0x1f867(%rip), %rsi # 0x5a6cf leaq 0x1f862(%rip), %rdx # 0x5a6d1 callq 0xfaac leaq 0x20(%rbx), %rdi leaq 0x30(%rbx), %rax movq %rax, 0x20(%rbx) leaq 0x1ec6f(%rip), %rsi # 0x59af6 leaq 0x1ec6a(%rip), %rdx # 0x59af8 callq 0xfaac leaq 0x50(%rbx), %rax movq %rax, 0x40(%rbx) xorl %eax, %eax movq %rax, 0x48(%rbx) movb %al, 0x50(%rbx) leaq 0x70(%rbx), %rcx movq %rcx, 0x60(%rbx) movq %rax, 0x68(%rbx) movb %al, 0x70(%rbx) leaq 0x90(%rbx), %rcx movq %rcx, 0x80(%rbx) movq %rax, 0x88(%rbx) movb %al, 0x90(%rbx) movq %rax, 0xa0(%rbx) movb %al, 0xa8(%rbx) leaq 0xc0(%rbx), %rcx movq %rcx, 0xb0(%rbx) movq %rax, 0xb8(%rbx) movb %al, 0xc0(%rbx) leaq 0xe0(%rbx), %rcx movq %rcx, 0xd0(%rbx) movq %rax, 0xd8(%rbx) movb %al, 0xe0(%rbx) leaq 0x100(%rbx), %rcx movq %rcx, 0xf0(%rbx) movq %rax, 0xf8(%rbx) movb %al, 0x100(%rbx) leaq 0x120(%rbx), %rcx movq %rcx, 0x110(%rbx) movq %rax, 0x118(%rbx) movb %al, 0x120(%rbx) leaq 0x140(%rbx), %rcx movq %rcx, 0x130(%rbx) movq %rax, 0x138(%rbx) movb %al, 0x140(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x150(%rbx) popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r15, %rdi je 0x3af88 movq (%r15), %rsi incq %rsi callq 0xa630 movq %r14, %rdi callq 0xaa60
_ZN7httplib6detail23MultipartFormDataParserC2Ev: push r15 push r14 push rbx mov rbx, rdi lea r15, [rdi+10h] mov [rdi], r15 lea rsi, asc_5A6CF; "--" lea rdx, asc_5A6CF+2; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rbx+20h] lea rax, [rbx+30h] mov [rbx+20h], rax lea rsi, asc_59AF4+2; "\r\n" lea rdx, asc_59AF4+4; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rax, [rbx+50h] mov [rbx+40h], rax xor eax, eax mov [rbx+48h], rax mov [rbx+50h], al lea rcx, [rbx+70h] mov [rbx+60h], rcx mov [rbx+68h], rax mov [rbx+70h], al lea rcx, [rbx+90h] mov [rbx+80h], rcx mov [rbx+88h], rax mov [rbx+90h], al mov [rbx+0A0h], rax mov [rbx+0A8h], al lea rcx, [rbx+0C0h] mov [rbx+0B0h], rcx mov [rbx+0B8h], rax mov [rbx+0C0h], al lea rcx, [rbx+0E0h] mov [rbx+0D0h], rcx mov [rbx+0D8h], rax mov [rbx+0E0h], al lea rcx, [rbx+100h] mov [rbx+0F0h], rcx mov [rbx+0F8h], rax mov [rbx+100h], al lea rcx, [rbx+120h] mov [rbx+110h], rcx mov [rbx+118h], rax mov [rbx+120h], al lea rcx, [rbx+140h] mov [rbx+130h], rcx mov [rbx+138h], rax mov [rbx+140h], al xorps xmm0, xmm0 movups xmmword ptr [rbx+150h], xmm0 pop rbx pop r14 pop r15 retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, r15 jz short loc_3AF88 mov rsi, [r15] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3AF88: mov rdi, r14 call __Unwind_Resume
long long httplib::detail::MultipartFormDataParser::MultipartFormDataParser( httplib::detail::MultipartFormDataParser *this) { long long result; // rax *(_QWORD *)this = (char *)this + 16; std::string::_M_construct<char const*>(this, "--", (long long)""); *((_QWORD *)this + 4) = (char *)this + 48; std::string::_M_construct<char const*>((_QWORD *)this + 4, "\r\n", (long long)""); *((_QWORD *)this + 8) = (char *)this + 80; result = 0LL; *((_QWORD *)this + 9) = 0LL; *((_BYTE *)this + 80) = 0; *((_QWORD *)this + 12) = (char *)this + 112; *((_QWORD *)this + 13) = 0LL; *((_BYTE *)this + 112) = 0; *((_QWORD *)this + 16) = (char *)this + 144; *((_QWORD *)this + 17) = 0LL; *((_BYTE *)this + 144) = 0; *((_QWORD *)this + 20) = 0LL; *((_BYTE *)this + 168) = 0; *((_QWORD *)this + 22) = (char *)this + 192; *((_QWORD *)this + 23) = 0LL; *((_BYTE *)this + 192) = 0; *((_QWORD *)this + 26) = (char *)this + 224; *((_QWORD *)this + 27) = 0LL; *((_BYTE *)this + 224) = 0; *((_QWORD *)this + 30) = (char *)this + 256; *((_QWORD *)this + 31) = 0LL; *((_BYTE *)this + 256) = 0; *((_QWORD *)this + 34) = (char *)this + 288; *((_QWORD *)this + 35) = 0LL; *((_BYTE *)this + 288) = 0; *((_QWORD *)this + 38) = (char *)this + 320; *((_QWORD *)this + 39) = 0LL; *((_BYTE *)this + 320) = 0; *((_OWORD *)this + 21) = 0LL; return result; }
MultipartFormDataParser: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDI LEA R15,[RDI + 0x10] MOV qword ptr [RDI],R15 LEA RSI,[0x15a6cf] LEA RDX,[0x15a6d1] CALL 0x0010faac LEA RDI,[RBX + 0x20] LEA RAX,[RBX + 0x30] MOV qword ptr [RBX + 0x20],RAX LAB_0013ae80: LEA RSI,[0x159af6] LEA RDX,[0x159af8] CALL 0x0010faac LAB_0013ae93: LEA RAX,[RBX + 0x50] MOV qword ptr [RBX + 0x40],RAX XOR EAX,EAX MOV qword ptr [RBX + 0x48],RAX MOV byte ptr [RBX + 0x50],AL LEA RCX,[RBX + 0x70] MOV qword ptr [RBX + 0x60],RCX MOV qword ptr [RBX + 0x68],RAX MOV byte ptr [RBX + 0x70],AL LEA RCX,[RBX + 0x90] MOV qword ptr [RBX + 0x80],RCX MOV qword ptr [RBX + 0x88],RAX MOV byte ptr [RBX + 0x90],AL MOV qword ptr [RBX + 0xa0],RAX MOV byte ptr [RBX + 0xa8],AL LEA RCX,[RBX + 0xc0] MOV qword ptr [RBX + 0xb0],RCX MOV qword ptr [RBX + 0xb8],RAX MOV byte ptr [RBX + 0xc0],AL LEA RCX,[RBX + 0xe0] MOV qword ptr [RBX + 0xd0],RCX MOV qword ptr [RBX + 0xd8],RAX MOV byte ptr [RBX + 0xe0],AL LEA RCX,[RBX + 0x100] MOV qword ptr [RBX + 0xf0],RCX MOV qword ptr [RBX + 0xf8],RAX MOV byte ptr [RBX + 0x100],AL LEA RCX,[RBX + 0x120] MOV qword ptr [RBX + 0x110],RCX MOV qword ptr [RBX + 0x118],RAX MOV byte ptr [RBX + 0x120],AL LEA RCX,[RBX + 0x140] MOV qword ptr [RBX + 0x130],RCX MOV qword ptr [RBX + 0x138],RAX MOV byte ptr [RBX + 0x140],AL XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x150],XMM0 POP RBX POP R14 POP R15 RET
/* httplib::detail::MultipartFormDataParser::MultipartFormDataParser() */ void __thiscall httplib::detail::MultipartFormDataParser::MultipartFormDataParser(MultipartFormDataParser *this) { *(MultipartFormDataParser **)this = this + 0x10; std::__cxx11::string::_M_construct<char_const*>(this,&DAT_0015a6cf,&DAT_0015a6d1); *(MultipartFormDataParser **)(this + 0x20) = this + 0x30; /* try { // try from 0013ae80 to 0013ae92 has its CatchHandler @ 0013af72 */ std::__cxx11::string::_M_construct<char_const*>(this + 0x20,&DAT_00159af6,&DAT_00159af8); *(MultipartFormDataParser **)(this + 0x40) = this + 0x50; *(int8 *)(this + 0x48) = 0; this[0x50] = (MultipartFormDataParser)0x0; *(MultipartFormDataParser **)(this + 0x60) = this + 0x70; *(int8 *)(this + 0x68) = 0; this[0x70] = (MultipartFormDataParser)0x0; *(MultipartFormDataParser **)(this + 0x80) = this + 0x90; *(int8 *)(this + 0x88) = 0; this[0x90] = (MultipartFormDataParser)0x0; *(int8 *)(this + 0xa0) = 0; this[0xa8] = (MultipartFormDataParser)0x0; *(MultipartFormDataParser **)(this + 0xb0) = this + 0xc0; *(int8 *)(this + 0xb8) = 0; this[0xc0] = (MultipartFormDataParser)0x0; *(MultipartFormDataParser **)(this + 0xd0) = this + 0xe0; *(int8 *)(this + 0xd8) = 0; this[0xe0] = (MultipartFormDataParser)0x0; *(MultipartFormDataParser **)(this + 0xf0) = this + 0x100; *(int8 *)(this + 0xf8) = 0; this[0x100] = (MultipartFormDataParser)0x0; *(MultipartFormDataParser **)(this + 0x110) = this + 0x120; *(int8 *)(this + 0x118) = 0; this[0x120] = (MultipartFormDataParser)0x0; *(MultipartFormDataParser **)(this + 0x130) = this + 0x140; *(int8 *)(this + 0x138) = 0; this[0x140] = (MultipartFormDataParser)0x0; *(int8 *)(this + 0x150) = 0; *(int8 *)(this + 0x158) = 0; return; }
21,744
httplib::detail::MultipartFormDataParser::MultipartFormDataParser()
hkr04[P]cpp-mcp/common/httplib.h
MultipartFormDataParser() = default;
O3
c
httplib::detail::MultipartFormDataParser::MultipartFormDataParser(): pushq %rbx movq %rdi, %rbx movq 0x130(%rdi), %rdi leaq 0x140(%rbx), %rax cmpq %rax, %rdi je 0x3ab36 movq (%rax), %rsi incq %rsi callq 0xa630 movq 0x110(%rbx), %rdi leaq 0x120(%rbx), %rax cmpq %rax, %rdi je 0x3ab54 movq (%rax), %rsi incq %rsi callq 0xa630 movq 0xf0(%rbx), %rdi leaq 0x100(%rbx), %rax cmpq %rax, %rdi je 0x3ab72 movq (%rax), %rsi incq %rsi callq 0xa630 movq 0xd0(%rbx), %rdi leaq 0xe0(%rbx), %rax cmpq %rax, %rdi je 0x3ab90 movq (%rax), %rsi incq %rsi callq 0xa630 movq 0xb0(%rbx), %rdi leaq 0xc0(%rbx), %rax cmpq %rax, %rdi je 0x3abae movq (%rax), %rsi incq %rsi callq 0xa630 movq 0x80(%rbx), %rdi leaq 0x90(%rbx), %rax cmpq %rax, %rdi je 0x3abcc movq (%rax), %rsi incq %rsi callq 0xa630 movq 0x60(%rbx), %rdi leaq 0x70(%rbx), %rax cmpq %rax, %rdi je 0x3abe4 movq (%rax), %rsi incq %rsi callq 0xa630 movq 0x40(%rbx), %rdi leaq 0x50(%rbx), %rax cmpq %rax, %rdi je 0x3abfc movq (%rax), %rsi incq %rsi callq 0xa630 movq 0x20(%rbx), %rdi leaq 0x30(%rbx), %rax cmpq %rax, %rdi je 0x3ac14 movq (%rax), %rsi incq %rsi callq 0xa630 movq (%rbx), %rdi addq $0x10, %rbx cmpq %rbx, %rdi je 0x3ac2c movq (%rbx), %rsi incq %rsi popq %rbx jmp 0xa630 popq %rbx retq
_ZN7httplib6detail23MultipartFormDataParserD2Ev: push rbx mov rbx, rdi mov rdi, [rdi+130h]; void * lea rax, [rbx+140h] cmp rdi, rax jz short loc_3AB36 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3AB36: mov rdi, [rbx+110h]; void * lea rax, [rbx+120h] cmp rdi, rax jz short loc_3AB54 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3AB54: mov rdi, [rbx+0F0h]; void * lea rax, [rbx+100h] cmp rdi, rax jz short loc_3AB72 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3AB72: mov rdi, [rbx+0D0h]; void * lea rax, [rbx+0E0h] cmp rdi, rax jz short loc_3AB90 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3AB90: mov rdi, [rbx+0B0h]; void * lea rax, [rbx+0C0h] cmp rdi, rax jz short loc_3ABAE mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3ABAE: mov rdi, [rbx+80h]; void * lea rax, [rbx+90h] cmp rdi, rax jz short loc_3ABCC mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3ABCC: mov rdi, [rbx+60h]; void * lea rax, [rbx+70h] cmp rdi, rax jz short loc_3ABE4 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3ABE4: mov rdi, [rbx+40h]; void * lea rax, [rbx+50h] cmp rdi, rax jz short loc_3ABFC mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3ABFC: mov rdi, [rbx+20h]; void * lea rax, [rbx+30h] cmp rdi, rax jz short loc_3AC14 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3AC14: mov rdi, [rbx]; void * add rbx, 10h cmp rdi, rbx jz short loc_3AC2C mov rsi, [rbx] inc rsi; unsigned __int64 pop rbx jmp __ZdlPvm; operator delete(void *,ulong) loc_3AC2C: pop rbx retn
void httplib::detail::MultipartFormDataParser::~MultipartFormDataParser( httplib::detail::MultipartFormDataParser *this) { char *v2; // rdi char *v3; // rdi char *v4; // rdi char *v5; // rdi char *v6; // rdi char *v7; // rdi char *v8; // rdi char *v9; // rdi char *v10; // rdi _QWORD *v11; // rdi _QWORD *v12; // rbx v2 = (char *)*((_QWORD *)this + 38); if ( v2 != (char *)this + 320 ) operator delete(v2, *((_QWORD *)this + 40) + 1LL); v3 = (char *)*((_QWORD *)this + 34); if ( v3 != (char *)this + 288 ) operator delete(v3, *((_QWORD *)this + 36) + 1LL); v4 = (char *)*((_QWORD *)this + 30); if ( v4 != (char *)this + 256 ) operator delete(v4, *((_QWORD *)this + 32) + 1LL); v5 = (char *)*((_QWORD *)this + 26); if ( v5 != (char *)this + 224 ) operator delete(v5, *((_QWORD *)this + 28) + 1LL); v6 = (char *)*((_QWORD *)this + 22); if ( v6 != (char *)this + 192 ) operator delete(v6, *((_QWORD *)this + 24) + 1LL); v7 = (char *)*((_QWORD *)this + 16); if ( v7 != (char *)this + 144 ) operator delete(v7, *((_QWORD *)this + 18) + 1LL); v8 = (char *)*((_QWORD *)this + 12); if ( v8 != (char *)this + 112 ) operator delete(v8, *((_QWORD *)this + 14) + 1LL); v9 = (char *)*((_QWORD *)this + 8); if ( v9 != (char *)this + 80 ) operator delete(v9, *((_QWORD *)this + 10) + 1LL); v10 = (char *)*((_QWORD *)this + 4); if ( v10 != (char *)this + 48 ) operator delete(v10, *((_QWORD *)this + 6) + 1LL); v11 = *(_QWORD **)this; v12 = (_QWORD *)((char *)this + 16); if ( v11 != v12 ) operator delete(v11, *v12 + 1LL); }
~MultipartFormDataParser: PUSH RBX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x130] LEA RAX,[RBX + 0x140] CMP RDI,RAX JZ 0x0013ab36 MOV RSI,qword ptr [RAX] INC RSI CALL 0x0010a630 LAB_0013ab36: MOV RDI,qword ptr [RBX + 0x110] LEA RAX,[RBX + 0x120] CMP RDI,RAX JZ 0x0013ab54 MOV RSI,qword ptr [RAX] INC RSI CALL 0x0010a630 LAB_0013ab54: MOV RDI,qword ptr [RBX + 0xf0] LEA RAX,[RBX + 0x100] CMP RDI,RAX JZ 0x0013ab72 MOV RSI,qword ptr [RAX] INC RSI CALL 0x0010a630 LAB_0013ab72: MOV RDI,qword ptr [RBX + 0xd0] LEA RAX,[RBX + 0xe0] CMP RDI,RAX JZ 0x0013ab90 MOV RSI,qword ptr [RAX] INC RSI CALL 0x0010a630 LAB_0013ab90: MOV RDI,qword ptr [RBX + 0xb0] LEA RAX,[RBX + 0xc0] CMP RDI,RAX JZ 0x0013abae MOV RSI,qword ptr [RAX] INC RSI CALL 0x0010a630 LAB_0013abae: MOV RDI,qword ptr [RBX + 0x80] LEA RAX,[RBX + 0x90] CMP RDI,RAX JZ 0x0013abcc MOV RSI,qword ptr [RAX] INC RSI CALL 0x0010a630 LAB_0013abcc: MOV RDI,qword ptr [RBX + 0x60] LEA RAX,[RBX + 0x70] CMP RDI,RAX JZ 0x0013abe4 MOV RSI,qword ptr [RAX] INC RSI CALL 0x0010a630 LAB_0013abe4: MOV RDI,qword ptr [RBX + 0x40] LEA RAX,[RBX + 0x50] CMP RDI,RAX JZ 0x0013abfc MOV RSI,qword ptr [RAX] INC RSI CALL 0x0010a630 LAB_0013abfc: MOV RDI,qword ptr [RBX + 0x20] LEA RAX,[RBX + 0x30] CMP RDI,RAX JZ 0x0013ac14 MOV RSI,qword ptr [RAX] INC RSI CALL 0x0010a630 LAB_0013ac14: MOV RDI,qword ptr [RBX] ADD RBX,0x10 CMP RDI,RBX JZ 0x0013ac2c MOV RSI,qword ptr [RBX] INC RSI POP RBX JMP 0x0010a630 LAB_0013ac2c: POP RBX RET
/* httplib::detail::MultipartFormDataParser::~MultipartFormDataParser() */ void __thiscall httplib::detail::MultipartFormDataParser::~MultipartFormDataParser(MultipartFormDataParser *this) { if (*(MultipartFormDataParser **)(this + 0x130) != this + 0x140) { operator_delete(*(MultipartFormDataParser **)(this + 0x130),*(long *)(this + 0x140) + 1); } if (*(MultipartFormDataParser **)(this + 0x110) != this + 0x120) { operator_delete(*(MultipartFormDataParser **)(this + 0x110),*(long *)(this + 0x120) + 1); } if (*(MultipartFormDataParser **)(this + 0xf0) != this + 0x100) { operator_delete(*(MultipartFormDataParser **)(this + 0xf0),*(long *)(this + 0x100) + 1); } if (*(MultipartFormDataParser **)(this + 0xd0) != this + 0xe0) { operator_delete(*(MultipartFormDataParser **)(this + 0xd0),*(long *)(this + 0xe0) + 1); } if (*(MultipartFormDataParser **)(this + 0xb0) != this + 0xc0) { operator_delete(*(MultipartFormDataParser **)(this + 0xb0),*(long *)(this + 0xc0) + 1); } if (*(MultipartFormDataParser **)(this + 0x80) != this + 0x90) { operator_delete(*(MultipartFormDataParser **)(this + 0x80),*(long *)(this + 0x90) + 1); } if (*(MultipartFormDataParser **)(this + 0x60) != this + 0x70) { operator_delete(*(MultipartFormDataParser **)(this + 0x60),*(long *)(this + 0x70) + 1); } if (*(MultipartFormDataParser **)(this + 0x40) != this + 0x50) { operator_delete(*(MultipartFormDataParser **)(this + 0x40),*(long *)(this + 0x50) + 1); } if (*(MultipartFormDataParser **)(this + 0x20) != this + 0x30) { operator_delete(*(MultipartFormDataParser **)(this + 0x20),*(long *)(this + 0x30) + 1); } if (*(MultipartFormDataParser **)this != this + 0x10) { operator_delete(*(MultipartFormDataParser **)this,*(long *)(this + 0x10) + 1); return; } return; }
21,745
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>>>>>::scan()
monkey531[P]llama/common/json.hpp
token_type scan() { // initially, skip the BOM if (position.chars_read_total == 0 && !skip_bom()) { error_message = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; return token_type::parse_error; } // read next character and ignore whitespace skip_whitespace(); // ignore comments while (ignore_comments && current == '/') { if (!scan_comment()) { return token_type::parse_error; } // skip following whitespace skip_whitespace(); } switch (current) { // structural characters case '[': return token_type::begin_array; case ']': return token_type::end_array; case '{': return token_type::begin_object; case '}': return token_type::end_object; case ':': return token_type::name_separator; case ',': return token_type::value_separator; // literals case 't': { std::array<char_type, 4> true_literal = {{static_cast<char_type>('t'), static_cast<char_type>('r'), static_cast<char_type>('u'), static_cast<char_type>('e')}}; return scan_literal(true_literal.data(), true_literal.size(), token_type::literal_true); } case 'f': { std::array<char_type, 5> false_literal = {{static_cast<char_type>('f'), static_cast<char_type>('a'), static_cast<char_type>('l'), static_cast<char_type>('s'), static_cast<char_type>('e')}}; return scan_literal(false_literal.data(), false_literal.size(), token_type::literal_false); } case 'n': { std::array<char_type, 4> null_literal = {{static_cast<char_type>('n'), static_cast<char_type>('u'), static_cast<char_type>('l'), static_cast<char_type>('l')}}; return scan_literal(null_literal.data(), null_literal.size(), token_type::literal_null); } // string case '\"': return scan_string(); // number case '-': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': return scan_number(); // end of input (the null byte is needed when parsing from // string literals) case '\0': case char_traits<char_type>::eof(): return token_type::end_of_input; // error default: error_message = "invalid literal"; return token_type::parse_error; } }
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>>>>>::scan(): pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx cmpq $0x0, 0x20(%rdi) jne 0x59a3d movq %rbx, %rdi callq 0x59be6 testb %al, %al je 0x59b11 movabsq $0x100002600, %r14 # imm = 0x100002600 movq %rbx, %rdi callq 0x1c238 movl 0x14(%rbx), %eax cmpq $0x20, %rax ja 0x59a5e btq %rax, %r14 jb 0x59a47 movl 0x14(%rbx), %eax cmpl $0x2f, %eax sete %cl andb 0x10(%rbx), %cl cmpb $0x1, %cl jne 0x59aa4 movq %rbx, %rdi callq 0x59c28 testb %al, %al je 0x59b1c movq %rbx, %rdi callq 0x1c238 movl 0x14(%rbx), %eax cmpq $0x20, %rax ja 0x59a96 btq %rax, %r14 jb 0x59a7f movl 0x14(%rbx), %eax cmpb $0x1, 0x10(%rbx) jne 0x59aa4 cmpl $0x2f, %eax je 0x59a6f cmpl $0x5a, %eax jg 0x59ad4 leal -0x22(%rax), %ecx cmpl $0x18, %ecx ja 0x59b5e leaq 0x8fc78(%rip), %rax # 0xe9734 movslq (%rax,%rcx,4), %rcx addq %rax, %rcx jmpq *%rcx movq %rbx, %rdi addq $0x18, %rsp popq %rbx popq %r14 jmp 0x5a1f8 cmpl $0x6d, %eax jle 0x59b29 cmpl $0x7a, %eax jg 0x59b6c cmpl $0x6e, %eax je 0x59ba6 cmpl $0x74, %eax jne 0x59b7d leaq 0xc(%rsp), %rsi movl $0x65757274, (%rsi) # imm = 0x65757274 movl $0x4, %edx movq %rbx, %rdi movl $0x1, %ecx jmp 0x59bbe leaq 0x955ed(%rip), %rax # 0xef105 movq %rax, 0x70(%rbx) movl $0xe, %eax addq $0x18, %rsp popq %rbx popq %r14 retq cmpl $0x5b, %eax je 0x59bd2 cmpl $0x5d, %eax je 0x59bdc cmpl $0x66, %eax jne 0x59b7d leaq 0x10(%rsp), %rsi movb $0x65, 0x4(%rsi) movl $0x736c6166, (%rsi) # imm = 0x736C6166 movl $0x5, %edx movq %rbx, %rdi movl $0x2, %ecx jmp 0x59bbe incl %eax cmpl $0x2, %eax jae 0x59b7d movl $0xf, %eax jmp 0x59b21 cmpl $0x7b, %eax je 0x59bc8 cmpl $0x7d, %eax jne 0x59b7d movl $0xb, %eax jmp 0x59b21 leaq 0x955ae(%rip), %rax # 0xef132 jmp 0x59b18 movl $0xc, %eax jmp 0x59b21 movq %rbx, %rdi addq $0x18, %rsp popq %rbx popq %r14 jmp 0x59d20 movl $0xd, %eax jmp 0x59b21 leaq 0x8(%rsp), %rsi movl $0x6c6c756e, (%rsi) # imm = 0x6C6C756E movl $0x4, %edx movq %rbx, %rdi movl $0x3, %ecx callq 0x59ca4 jmp 0x59b21 movl $0x9, %eax jmp 0x59b21 movl $0x8, %eax jmp 0x59b21 movl $0xa, %eax jmp 0x59b21
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE4scanEv: push r14 push rbx sub rsp, 18h mov rbx, rdi cmp qword ptr [rdi+20h], 0 jnz short loc_59A3D 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_EEEEE8skip_bomEv; 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>>>::skip_bom(void) test al, al jz loc_59B11 loc_59A3D: mov r14, 100002600h loc_59A47: 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 rax, 20h ; ' ' ja short loc_59A5E bt r14, rax jb short loc_59A47 loc_59A5E: mov eax, [rbx+14h] cmp eax, 2Fh ; '/' setz cl and cl, [rbx+10h] cmp cl, 1 jnz short loc_59AA4 loc_59A6F: 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_EEEEE12scan_commentEv; 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>>>::scan_comment(void) test al, al jz loc_59B1C loc_59A7F: 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 rax, 20h ; ' ' ja short loc_59A96 bt r14, rax jb short loc_59A7F loc_59A96: mov eax, [rbx+14h] cmp byte ptr [rbx+10h], 1 jnz short loc_59AA4 cmp eax, 2Fh ; '/' jz short loc_59A6F loc_59AA4: cmp eax, 5Ah ; 'Z' jg short loc_59AD4 lea ecx, [rax-22h]; switch 25 cases cmp ecx, 18h ja def_59AC3; jumptable 0000000000059AC3 default case lea rax, jpt_59AC3 movsxd rcx, ds:(jpt_59AC3 - 0E9734h)[rax+rcx*4] add rcx, rax jmp rcx; switch jump loc_59AC5: mov rdi, rbx; jumptable 0000000000059AC3 cases 45,48-57 add rsp, 18h pop rbx pop r14 jmp _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_numberEv; 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>>>::scan_number(void) loc_59AD4: cmp eax, 6Dh ; 'm' jle short loc_59B29 cmp eax, 7Ah ; 'z' jg loc_59B6C cmp eax, 6Eh ; 'n' jz loc_59BA6 cmp eax, 74h ; 't' jnz loc_59B7D; jumptable 0000000000059AC3 cases 35-43,46,47 lea rsi, [rsp+28h+var_1C] mov dword ptr [rsi], 65757274h mov edx, 4 mov rdi, rbx mov ecx, 1 jmp loc_59BBE loc_59B11: lea rax, aInvalidBomMust; "invalid BOM; must be 0xEF 0xBB 0xBF if "... loc_59B18: mov [rbx+70h], rax loc_59B1C: mov eax, 0Eh loc_59B21: add rsp, 18h pop rbx pop r14 retn loc_59B29: cmp eax, 5Bh ; '[' jz loc_59BD2 cmp eax, 5Dh ; ']' jz loc_59BDC cmp eax, 66h ; 'f' jnz short loc_59B7D; jumptable 0000000000059AC3 cases 35-43,46,47 lea rsi, [rsp+28h+var_18] mov byte ptr [rsi+4], 65h ; 'e' mov dword ptr [rsi], 736C6166h mov edx, 5 mov rdi, rbx mov ecx, 2 jmp short loc_59BBE def_59AC3: inc eax; jumptable 0000000000059AC3 default case cmp eax, 2 jnb short loc_59B7D; jumptable 0000000000059AC3 cases 35-43,46,47 mov eax, 0Fh jmp short loc_59B21 loc_59B6C: cmp eax, 7Bh ; '{' jz short loc_59BC8 cmp eax, 7Dh ; '}' jnz short loc_59B7D; jumptable 0000000000059AC3 cases 35-43,46,47 mov eax, 0Bh jmp short loc_59B21 loc_59B7D: lea rax, aInvalidLiteral; jumptable 0000000000059AC3 cases 35-43,46,47 jmp short loc_59B18 loc_59B86: mov eax, 0Ch; jumptable 0000000000059AC3 case 58 jmp short loc_59B21 loc_59B8D: mov rdi, rbx; jumptable 0000000000059AC3 case 34 add rsp, 18h pop rbx pop r14 jmp _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_stringEv; 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>>>::scan_string(void) loc_59B9C: mov eax, 0Dh; jumptable 0000000000059AC3 case 44 jmp loc_59B21 loc_59BA6: lea rsi, [rsp+28h+var_20] mov dword ptr [rsi], 6C6C756Eh mov edx, 4 mov rdi, rbx mov ecx, 3 loc_59BBE: call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_literalESK_mNS1_10lexer_baseISF_E10token_typeE; 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>>>::scan_literal(char const*,ulong,nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type) jmp loc_59B21 loc_59BC8: mov eax, 9 jmp loc_59B21 loc_59BD2: mov eax, 8 jmp loc_59B21 loc_59BDC: mov eax, 0Ah jmp loc_59B21
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>>>::scan( __m128i *a1) { long long v1; // r14 unsigned long long v2; // rax int v3; // eax unsigned long long v4; // rax long long result; // rax int *v6; // rsi long long v7; // rdx long long v8; // rcx const char *v9; // rax int v10; // [rsp+8h] [rbp-20h] BYREF int v11; // [rsp+Ch] [rbp-1Ch] BYREF _BYTE v12[24]; // [rsp+10h] [rbp-18h] BYREF if ( !a1[2].m128i_i64[0] && !(unsigned __int8)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>>>::skip_bom(a1) ) { v9 = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; goto LABEL_21; } v1 = 0x100002600LL; do { 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); v2 = a1[1].m128i_u32[1]; } while ( v2 <= 0x20 && _bittest64(&v1, v2) ); v3 = a1[1].m128i_i32[1]; if ( (a1[1].m128i_i8[0] & (v3 == 47)) == 1 ) { while ( (unsigned __int8)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>>>::scan_comment(a1) ) { do { 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); v4 = a1[1].m128i_u32[1]; } while ( v4 <= 0x20 && _bittest64(&v1, v4) ); v3 = a1[1].m128i_i32[1]; if ( a1[1].m128i_i8[0] != 1 || v3 != 47 ) goto LABEL_12; } return 14LL; } LABEL_12: if ( v3 > 90 ) { if ( v3 <= 109 ) { switch ( v3 ) { case '[': return 8LL; case ']': return 10LL; case 'f': v6 = (int *)v12; qmemcpy(v12, "false", 5); v7 = 5LL; v8 = 2LL; return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_literal( a1, v6, v7, v8); } } else if ( v3 > 122 ) { if ( v3 == 123 ) return 9LL; if ( v3 == 125 ) return 11LL; } else { if ( v3 == 110 ) { v6 = &v10; v10 = 1819047278; v7 = 4LL; v8 = 3LL; return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_literal( a1, v6, v7, v8); } if ( v3 == 116 ) { v6 = &v11; v11 = 1702195828; v7 = 4LL; v8 = 1LL; return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_literal( a1, v6, v7, v8); } } LABEL_33: v9 = "invalid literal"; LABEL_21: a1[7].m128i_i64[0] = (long long)v9; return 14LL; } switch ( v3 ) { case '"': result = 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>>>::scan_string(a1); break; case '#': case '$': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case '.': case '/': goto LABEL_33; case ',': result = 13LL; break; case '-': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': result = 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>>>::scan_number(a1); break; case ':': result = 12LL; break; default: if ( (unsigned int)(v3 + 1) >= 2 ) goto LABEL_33; result = 15LL; break; } return result; }
scan: PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RDI CMP qword ptr [RDI + 0x20],0x0 JNZ 0x00159a3d MOV RDI,RBX CALL 0x00159be6 TEST AL,AL JZ 0x00159b11 LAB_00159a3d: MOV R14,0x100002600 LAB_00159a47: MOV RDI,RBX CALL 0x0011c238 MOV EAX,dword ptr [RBX + 0x14] CMP RAX,0x20 JA 0x00159a5e BT R14,RAX JC 0x00159a47 LAB_00159a5e: MOV EAX,dword ptr [RBX + 0x14] CMP EAX,0x2f SETZ CL AND CL,byte ptr [RBX + 0x10] CMP CL,0x1 JNZ 0x00159aa4 LAB_00159a6f: MOV RDI,RBX CALL 0x00159c28 TEST AL,AL JZ 0x00159b1c LAB_00159a7f: MOV RDI,RBX CALL 0x0011c238 MOV EAX,dword ptr [RBX + 0x14] CMP RAX,0x20 JA 0x00159a96 BT R14,RAX JC 0x00159a7f LAB_00159a96: MOV EAX,dword ptr [RBX + 0x14] CMP byte ptr [RBX + 0x10],0x1 JNZ 0x00159aa4 CMP EAX,0x2f JZ 0x00159a6f LAB_00159aa4: CMP EAX,0x5a JG 0x00159ad4 LEA ECX,[RAX + -0x22] CMP ECX,0x18 JA 0x00159b5e LEA RAX,[0x1e9734] MOVSXD RCX,dword ptr [RAX + RCX*0x4] ADD RCX,RAX switchD: JMP RCX caseD_2d: MOV RDI,RBX ADD RSP,0x18 POP RBX POP R14 JMP 0x0015a1f8 LAB_00159ad4: CMP EAX,0x6d JLE 0x00159b29 CMP EAX,0x7a JG 0x00159b6c CMP EAX,0x6e JZ 0x00159ba6 CMP EAX,0x74 JNZ 0x00159b7d LEA RSI,[RSP + 0xc] MOV dword ptr [RSI],0x65757274 MOV EDX,0x4 MOV RDI,RBX MOV ECX,0x1 JMP 0x00159bbe LAB_00159b11: LEA RAX,[0x1ef105] LAB_00159b18: MOV qword ptr [RBX + 0x70],RAX LAB_00159b1c: MOV EAX,0xe LAB_00159b21: ADD RSP,0x18 POP RBX POP R14 RET LAB_00159b29: CMP EAX,0x5b JZ 0x00159bd2 CMP EAX,0x5d JZ 0x00159bdc CMP EAX,0x66 JNZ 0x00159b7d LEA RSI,[RSP + 0x10] MOV byte ptr [RSI + 0x4],0x65 MOV dword ptr [RSI],0x736c6166 MOV EDX,0x5 MOV RDI,RBX MOV ECX,0x2 JMP 0x00159bbe default: INC EAX CMP EAX,0x2 JNC 0x00159b7d MOV EAX,0xf JMP 0x00159b21 LAB_00159b6c: CMP EAX,0x7b JZ 0x00159bc8 CMP EAX,0x7d JNZ 0x00159b7d MOV EAX,0xb JMP 0x00159b21 caseD_23: LEA RAX,[0x1ef132] JMP 0x00159b18 caseD_3a: MOV EAX,0xc JMP 0x00159b21 caseD_22: MOV RDI,RBX ADD RSP,0x18 POP RBX POP R14 JMP 0x00159d20 caseD_2c: MOV EAX,0xd JMP 0x00159b21 LAB_00159ba6: LEA RSI,[RSP + 0x8] MOV dword ptr [RSI],0x6c6c756e MOV EDX,0x4 MOV RDI,RBX MOV ECX,0x3 LAB_00159bbe: CALL 0x00159ca4 JMP 0x00159b21 LAB_00159bc8: MOV EAX,0x9 JMP 0x00159b21 LAB_00159bd2: MOV EAX,0x8 JMP 0x00159b21 LAB_00159bdc: MOV EAX,0xa JMP 0x00159b21
/* 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 > > >::scan() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::scan(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { char cVar1; int iVar2; int8 uVar3; char *pcVar4; int8 uVar5; int4 *puVar6; int4 local_20; int4 local_1c; int4 local_18; int1 local_14; if ((*(long *)(this + 0x20) == 0) && (cVar1 = skip_bom(this), cVar1 == '\0')) { pcVar4 = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; goto LAB_00159b18; } do { get(this); if (0x20 < (ulong)*(uint *)(this + 0x14)) break; } while ((0x100002600U >> ((ulong)*(uint *)(this + 0x14) & 0x3f) & 1) != 0); iVar2 = *(int *)(this + 0x14); if ((iVar2 == 0x2f & (byte)this[0x10]) == 1) { do { cVar1 = scan_comment(this); if (cVar1 == '\0') goto LAB_00159b1c; do { get(this); if (0x20 < (ulong)*(uint *)(this + 0x14)) break; } while ((0x100002600U >> ((ulong)*(uint *)(this + 0x14) & 0x3f) & 1) != 0); iVar2 = *(int *)(this + 0x14); } while ((this[0x10] == (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> )0x1) && (iVar2 == 0x2f)); } if (0x5a < iVar2) { if (iVar2 < 0x6e) { if (iVar2 == 0x5b) { return 8; } if (iVar2 == 0x5d) { return 10; } if (iVar2 == 0x66) { puVar6 = &local_18; local_14 = 0x65; local_18 = 0x736c6166; uVar5 = 5; uVar3 = 2; goto LAB_00159bbe; } } else if (iVar2 < 0x7b) { if (iVar2 == 0x6e) { puVar6 = &local_20; local_20 = 0x6c6c756e; uVar5 = 4; uVar3 = 3; LAB_00159bbe: uVar3 = scan_literal(this,puVar6,uVar5,uVar3); return uVar3; } if (iVar2 == 0x74) { puVar6 = &local_1c; local_1c = 0x65757274; uVar5 = 4; uVar3 = 1; goto LAB_00159bbe; } } else { if (iVar2 == 0x7b) { return 9; } if (iVar2 == 0x7d) { return 0xb; } } goto switchD_00159ac3_caseD_23; } switch(iVar2) { case 0x22: uVar3 = scan_string(this); return uVar3; case 0x2c: uVar3 = 0xd; break; case 0x2d: case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: uVar3 = scan_number(this); return uVar3; case 0x3a: uVar3 = 0xc; break; default: if (iVar2 + 1U < 2) { return 0xf; } case 0x23: case 0x24: case 0x25: case 0x26: case 0x27: case 0x28: case 0x29: case 0x2a: case 0x2b: case 0x2e: case 0x2f: switchD_00159ac3_caseD_23: pcVar4 = "invalid literal"; LAB_00159b18: *(char **)(this + 0x70) = pcVar4; LAB_00159b1c: uVar3 = 0xe; } return uVar3; }
21,746
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 0x91988 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 0x00191988 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; }
21,747
madb_reset_stmt
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
static my_bool madb_reset_stmt(MYSQL_STMT *stmt, unsigned int flags) { MYSQL *mysql= stmt->mysql; my_bool ret= 0; if (!stmt->mysql) { SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); return(1); } /* clear error */ if (flags & MADB_RESET_ERROR) { CLEAR_CLIENT_ERROR(stmt->mysql); CLEAR_CLIENT_STMT_ERROR(stmt); } if (stmt->stmt_id) { /* free buffered resultset, previously allocated * by mysql_stmt_store_result */ if (flags & MADB_RESET_STORED && stmt->result_cursor) { ma_free_root(&stmt->result.alloc, MYF(MY_KEEP_PREALLOC)); stmt->result.data= NULL; stmt->result.rows= 0; stmt->result_cursor= NULL; stmt->mysql->status= MYSQL_STATUS_READY; stmt->state= MYSQL_STMT_FETCH_DONE; } /* if there is a pending result set, we will flush it */ if (flags & MADB_RESET_BUFFER) { if (stmt->state == MYSQL_STMT_WAITING_USE_OR_STORE) { stmt->default_rset_handler(stmt); stmt->state = MYSQL_STMT_USER_FETCHING; } if (stmt->mysql->status!= MYSQL_STATUS_READY && stmt->field_count) { mysql->methods->db_stmt_flush_unbuffered(stmt); mysql->status= MYSQL_STATUS_READY; } } if (flags & MADB_RESET_SERVER) { /* reset statement on server side */ if (stmt->mysql && stmt->mysql->status == MYSQL_STATUS_READY && stmt->mysql->net.pvio) { unsigned char cmd_buf[STMT_ID_LENGTH]; int4store(cmd_buf, stmt->stmt_id); if ((ret= stmt->mysql->methods->db_command(mysql,COM_STMT_RESET, (char *)cmd_buf, sizeof(cmd_buf), 0, stmt))) { UPDATE_STMT_ERROR(stmt); return(ret); } } } if (flags & MADB_RESET_LONGDATA) { if (stmt->params) { ulonglong i; for (i=0; i < stmt->param_count; i++) if (stmt->params[i].long_data_used) stmt->params[i].long_data_used= 0; } } } return(ret); }
O0
c
madb_reset_stmt: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x18(%rbp) movl %esi, -0x1c(%rbp) movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x28(%rbp) movb $0x0, -0x29(%rbp) movq -0x18(%rbp), %rax cmpq $0x0, 0x38(%rax) jne 0x44585 jmp 0x44519 movq -0x18(%rbp), %rax movl $0x7dd, 0x108(%rax) # imm = 0x7DD movq -0x18(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x3c967(%rip), %rax # 0x80ea0 movq (%rax), %rsi movl $0x5, %edx callq 0x14220 movq -0x18(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x18(%rbp), %rdi addq $0x10c, %rdi # imm = 0x10C leaq 0x3c94d(%rip), %rax # 0x80eb0 movq 0x68(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x14220 movq -0x18(%rbp), %rax movb $0x0, 0x30b(%rax) movb $0x1, -0xd(%rbp) jmp 0x44926 movl -0x1c(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x44630 jmp 0x44596 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movl $0x0, 0x90(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x265f1(%rip), %rsi # 0x6abaf callq 0x143d0 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x97(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rax cmpq $0x0, 0x2a0(%rax) je 0x445fa movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq 0x2a0(%rax), %rax movl $0x0, 0x4(%rax) jmp 0x445fc jmp 0x445fe movq -0x18(%rbp), %rax movl $0x0, 0x108(%rax) movq -0x18(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x26591(%rip), %rsi # 0x6abaf callq 0x143d0 movq -0x18(%rbp), %rax movb $0x0, 0x10c(%rax) jmp 0x44630 movq -0x18(%rbp), %rax cmpq $0x0, 0x40(%rax) je 0x44920 movl -0x1c(%rbp), %eax andl $0x10, %eax cmpl $0x0, %eax je 0x446bb movq -0x18(%rbp), %rax cmpq $0x0, 0xe0(%rax) je 0x446bb movq -0x18(%rbp), %rdi addq $0x80, %rdi addq $0x10, %rdi movl $0x1, %esi callq 0x3f420 movq -0x18(%rbp), %rax movq $0x0, 0x80(%rax) movq -0x18(%rbp), %rax movq $0x0, 0xc8(%rax) movq -0x18(%rbp), %rax movq $0x0, 0xe0(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movl $0x0, 0x488(%rax) movq -0x18(%rbp), %rax movl $0x6, 0x50(%rax) movl -0x1c(%rbp), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x4472c movq -0x18(%rbp), %rax cmpl $0x3, 0x50(%rax) jne 0x446ec movq -0x18(%rbp), %rax movq 0x358(%rax), %rax movq -0x18(%rbp), %rdi callq *%rax movq -0x18(%rbp), %rax movl $0x5, 0x50(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rax cmpl $0x0, 0x488(%rax) je 0x4472a movq -0x18(%rbp), %rax cmpl $0x0, 0x60(%rax) je 0x4472a movq -0x28(%rbp), %rax movq 0x4d0(%rax), %rax movq 0x78(%rax), %rax movq -0x18(%rbp), %rdi callq *%rax movq -0x28(%rbp), %rax movl $0x0, 0x488(%rax) jmp 0x4472c movl -0x1c(%rbp), %eax andl $0x4, %eax cmpl $0x0, %eax je 0x448b2 movq -0x18(%rbp), %rax cmpq $0x0, 0x38(%rax) je 0x448b0 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax cmpl $0x0, 0x488(%rax) jne 0x448b0 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax cmpq $0x0, (%rax) je 0x448b0 jmp 0x44773 movq -0x18(%rbp), %rax movq 0x40(%rax), %rax movb %al, -0xc(%rbp) movq -0x18(%rbp), %rax movq 0x40(%rax), %rax shrq $0x8, %rax movb %al, -0xb(%rbp) movq -0x18(%rbp), %rax movq 0x40(%rax), %rax shrq $0x10, %rax movb %al, -0xa(%rbp) movq -0x18(%rbp), %rax movq 0x40(%rax), %rax shrq $0x18, %rax movb %al, -0x9(%rbp) movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq 0x4d0(%rax), %rax movq 0x10(%rax), %rax movq -0x28(%rbp), %rdi leaq -0xc(%rbp), %rdx movq -0x18(%rbp), %r9 movl $0x1a, %esi movl $0x4, %ecx xorl %r8d, %r8d callq *%rax movb %al, -0x29(%rbp) cmpb $0x0, %al je 0x448ae jmp 0x447e6 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movl 0x90(%rax), %ecx movq -0x18(%rbp), %rax movl %ecx, 0x108(%rax) movq -0x18(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D movq -0x18(%rbp), %rax movq 0x38(%rax), %rsi addq $0x297, %rsi # imm = 0x297 movl $0x5, %edx callq 0x14220 movq -0x18(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x18(%rbp), %rax addq $0x10c, %rax # imm = 0x10C movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax movq 0x38(%rax), %rax addq $0x97, %rax cmpq $0x0, %rax je 0x44863 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax addq $0x97, %rax movq %rax, -0x48(%rbp) jmp 0x44889 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movl 0x90(%rax), %eax subl $0x7d0, %eax # imm = 0x7D0 movl %eax, %eax movl %eax, %ecx leaq 0x3c62f(%rip), %rax # 0x80eb0 movq (%rax,%rcx,8), %rax movq %rax, -0x48(%rbp) movq -0x40(%rbp), %rdi movq -0x48(%rbp), %rsi movl $0x200, %edx # imm = 0x200 callq 0x14220 movq -0x18(%rbp), %rax movb $0x0, 0x30b(%rax) movb -0x29(%rbp), %al movb %al, -0xd(%rbp) jmp 0x44926 jmp 0x448b0 jmp 0x448b2 movl -0x1c(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax je 0x4491e movq -0x18(%rbp), %rax cmpq $0x0, 0x70(%rax) je 0x4491c movq $0x0, -0x38(%rbp) movq -0x38(%rbp), %rax movq -0x18(%rbp), %rcx movl 0x64(%rcx), %ecx cmpq %rcx, %rax jae 0x4491a movq -0x18(%rbp), %rax movq 0x70(%rax), %rax imulq $0x70, -0x38(%rbp), %rcx addq %rcx, %rax cmpb $0x0, 0x66(%rax) je 0x4490a movq -0x18(%rbp), %rax movq 0x70(%rax), %rax imulq $0x70, -0x38(%rbp), %rcx addq %rcx, %rax movb $0x0, 0x66(%rax) jmp 0x4490c movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) jmp 0x448d0 jmp 0x4491c jmp 0x4491e jmp 0x44920 movb -0x29(%rbp), %al movb %al, -0xd(%rbp) movb -0xd(%rbp), %al movb %al, -0x49(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x44947 movb -0x49(%rbp), %al addq $0x50, %rsp popq %rbp retq callq 0x144c0 nopl (%rax)
madb_reset_stmt: push rbp mov rbp, rsp sub rsp, 50h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov rax, [rbp+var_18] mov rax, [rax+38h] mov [rbp+var_28], rax mov [rbp+var_29], 0 mov rax, [rbp+var_18] cmp qword ptr [rax+38h], 0 jnz short loc_44585 jmp short $+2 loc_44519: mov rax, [rbp+var_18] mov dword ptr [rax+108h], 7DDh mov rdi, [rbp+var_18] add rdi, 30Dh lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_18] mov byte ptr [rax+312h], 0 mov rdi, [rbp+var_18] add rdi, 10Ch lea rax, client_errors mov rsi, [rax+68h] mov edx, 200h call _strncpy mov rax, [rbp+var_18] mov byte ptr [rax+30Bh], 0 mov [rbp+var_D], 1 jmp loc_44926 loc_44585: mov eax, [rbp+var_1C] and eax, 1 cmp eax, 0 jz loc_44630 jmp short $+2 loc_44596: mov rax, [rbp+var_18] mov rax, [rax+38h] mov dword ptr [rax+90h], 0 mov rax, [rbp+var_18] mov rdi, [rax+38h] add rdi, 297h lea rsi, a00000; "00000" call _strcpy mov rax, [rbp+var_18] mov rax, [rax+38h] mov byte ptr [rax+97h], 0 mov rax, [rbp+var_18] mov rax, [rax+38h] cmp qword ptr [rax+2A0h], 0 jz short loc_445FA mov rax, [rbp+var_18] mov rax, [rax+38h] mov rax, [rax+2A0h] mov dword ptr [rax+4], 0 loc_445FA: jmp short $+2 loc_445FC: jmp short $+2 loc_445FE: mov rax, [rbp+var_18] mov dword ptr [rax+108h], 0 mov rdi, [rbp+var_18] add rdi, 30Dh lea rsi, a00000; "00000" call _strcpy mov rax, [rbp+var_18] mov byte ptr [rax+10Ch], 0 jmp short $+2 loc_44630: mov rax, [rbp+var_18] cmp qword ptr [rax+40h], 0 jz loc_44920 mov eax, [rbp+var_1C] and eax, 10h cmp eax, 0 jz short loc_446BB mov rax, [rbp+var_18] cmp qword ptr [rax+0E0h], 0 jz short loc_446BB mov rdi, [rbp+var_18] add rdi, 80h add rdi, 10h mov esi, 1 call ma_free_root mov rax, [rbp+var_18] mov qword ptr [rax+80h], 0 mov rax, [rbp+var_18] mov qword ptr [rax+0C8h], 0 mov rax, [rbp+var_18] mov qword ptr [rax+0E0h], 0 mov rax, [rbp+var_18] mov rax, [rax+38h] mov dword ptr [rax+488h], 0 mov rax, [rbp+var_18] mov dword ptr [rax+50h], 6 loc_446BB: mov eax, [rbp+var_1C] and eax, 8 cmp eax, 0 jz short loc_4472C mov rax, [rbp+var_18] cmp dword ptr [rax+50h], 3 jnz short loc_446EC mov rax, [rbp+var_18] mov rax, [rax+358h] mov rdi, [rbp+var_18] call rax mov rax, [rbp+var_18] mov dword ptr [rax+50h], 5 loc_446EC: mov rax, [rbp+var_18] mov rax, [rax+38h] cmp dword ptr [rax+488h], 0 jz short loc_4472A mov rax, [rbp+var_18] cmp dword ptr [rax+60h], 0 jz short loc_4472A mov rax, [rbp+var_28] mov rax, [rax+4D0h] mov rax, [rax+78h] mov rdi, [rbp+var_18] call rax mov rax, [rbp+var_28] mov dword ptr [rax+488h], 0 loc_4472A: jmp short $+2 loc_4472C: mov eax, [rbp+var_1C] and eax, 4 cmp eax, 0 jz loc_448B2 mov rax, [rbp+var_18] cmp qword ptr [rax+38h], 0 jz loc_448B0 mov rax, [rbp+var_18] mov rax, [rax+38h] cmp dword ptr [rax+488h], 0 jnz loc_448B0 mov rax, [rbp+var_18] mov rax, [rax+38h] cmp qword ptr [rax], 0 jz loc_448B0 jmp short $+2 loc_44773: mov rax, [rbp+var_18] mov rax, [rax+40h] mov [rbp+var_C], al mov rax, [rbp+var_18] mov rax, [rax+40h] shr rax, 8 mov [rbp+var_B], al mov rax, [rbp+var_18] mov rax, [rax+40h] shr rax, 10h mov [rbp+var_A], al mov rax, [rbp+var_18] mov rax, [rax+40h] shr rax, 18h mov [rbp+var_9], al mov rax, [rbp+var_18] mov rax, [rax+38h] mov rax, [rax+4D0h] mov rax, [rax+10h] mov rdi, [rbp+var_28] lea rdx, [rbp+var_C] mov r9, [rbp+var_18] mov esi, 1Ah mov ecx, 4 xor r8d, r8d call rax mov [rbp+var_29], al cmp al, 0 jz loc_448AE jmp short $+2 loc_447E6: mov rax, [rbp+var_18] mov rax, [rax+38h] mov ecx, [rax+90h] mov rax, [rbp+var_18] mov [rax+108h], ecx mov rdi, [rbp+var_18] add rdi, 30Dh mov rax, [rbp+var_18] mov rsi, [rax+38h] add rsi, 297h mov edx, 5 call _strncpy mov rax, [rbp+var_18] mov byte ptr [rax+312h], 0 mov rax, [rbp+var_18] add rax, 10Ch mov [rbp+var_40], rax mov rax, [rbp+var_18] mov rax, [rax+38h] add rax, 97h cmp rax, 0 jz short loc_44863 mov rax, [rbp+var_18] mov rax, [rax+38h] add rax, 97h mov [rbp+var_48], rax jmp short loc_44889 loc_44863: mov rax, [rbp+var_18] mov rax, [rax+38h] mov eax, [rax+90h] sub eax, 7D0h mov eax, eax mov ecx, eax lea rax, client_errors mov rax, [rax+rcx*8] mov [rbp+var_48], rax loc_44889: mov rdi, [rbp+var_40] mov rsi, [rbp+var_48] mov edx, 200h call _strncpy mov rax, [rbp+var_18] mov byte ptr [rax+30Bh], 0 mov al, [rbp+var_29] mov [rbp+var_D], al jmp short loc_44926 loc_448AE: jmp short $+2 loc_448B0: jmp short $+2 loc_448B2: mov eax, [rbp+var_1C] and eax, 2 cmp eax, 0 jz short loc_4491E mov rax, [rbp+var_18] cmp qword ptr [rax+70h], 0 jz short loc_4491C mov [rbp+var_38], 0 loc_448D0: mov rax, [rbp+var_38] mov rcx, [rbp+var_18] mov ecx, [rcx+64h] cmp rax, rcx jnb short loc_4491A mov rax, [rbp+var_18] mov rax, [rax+70h] imul rcx, [rbp+var_38], 70h ; 'p' add rax, rcx cmp byte ptr [rax+66h], 0 jz short loc_4490A mov rax, [rbp+var_18] mov rax, [rax+70h] imul rcx, [rbp+var_38], 70h ; 'p' add rax, rcx mov byte ptr [rax+66h], 0 loc_4490A: jmp short $+2 loc_4490C: mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax jmp short loc_448D0 loc_4491A: jmp short $+2 loc_4491C: jmp short $+2 loc_4491E: jmp short $+2 loc_44920: mov al, [rbp+var_29] mov [rbp+var_D], al loc_44926: mov al, [rbp+var_D] mov [rbp+var_49], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_44947 mov al, [rbp+var_49] add rsp, 50h pop rbp retn loc_44947: call ___stack_chk_fail
char madb_reset_stmt(long long a1, char a2) { char *v2; // rax unsigned long long i; // [rsp+18h] [rbp-38h] char v5; // [rsp+27h] [rbp-29h] long long v6; // [rsp+28h] [rbp-28h] _BYTE v8[4]; // [rsp+44h] [rbp-Ch] BYREF unsigned long long v9; // [rsp+48h] [rbp-8h] v9 = __readfsqword(0x28u); v6 = *(_QWORD *)(a1 + 56); if ( !v6 ) { *(_DWORD *)(a1 + 264) = 2013; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, client_errors[13], 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; } if ( (a2 & 1) != 0 ) { *(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) = 0; strcpy(*(_QWORD *)(a1 + 56) + 663LL, "00000"); *(_BYTE *)(*(_QWORD *)(a1 + 56) + 151LL) = 0; if ( *(_QWORD *)(*(_QWORD *)(a1 + 56) + 672LL) ) *(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 672LL) + 4LL) = 0; *(_DWORD *)(a1 + 264) = 0; strcpy(a1 + 781, "00000"); *(_BYTE *)(a1 + 268) = 0; } if ( !*(_QWORD *)(a1 + 64) ) return 0; if ( (a2 & 0x10) != 0 && *(_QWORD *)(a1 + 224) ) { ma_free_root((_QWORD *)(a1 + 144), 1); *(_QWORD *)(a1 + 128) = 0LL; *(_QWORD *)(a1 + 200) = 0LL; *(_QWORD *)(a1 + 224) = 0LL; *(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) = 0; *(_DWORD *)(a1 + 80) = 6; } if ( (a2 & 8) != 0 ) { if ( *(_DWORD *)(a1 + 80) == 3 ) { (*(void ( **)(long long))(a1 + 856))(a1); *(_DWORD *)(a1 + 80) = 5; } if ( *(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) && *(_DWORD *)(a1 + 96) ) { (*(void ( **)(long long))(*(_QWORD *)(v6 + 1232) + 120LL))(a1); *(_DWORD *)(v6 + 1160) = 0; } } if ( (a2 & 4) == 0 || !*(_QWORD *)(a1 + 56) || *(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) || !**(_QWORD **)(a1 + 56) || (v8[0] = *(_QWORD *)(a1 + 64), v8[1] = BYTE1(*(_QWORD *)(a1 + 64)), v8[2] = BYTE2(*(_QWORD *)(a1 + 64)), v8[3] = BYTE3(*(_QWORD *)(a1 + 64)), (v5 = (*(long long ( **)(long long, long long, _BYTE *, long long, _QWORD, long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 16LL))( v6, 26LL, v8, 4LL, 0LL, a1)) == 0) ) { if ( (a2 & 2) != 0 && *(_QWORD *)(a1 + 112) ) { for ( i = 0LL; i < *(unsigned int *)(a1 + 100); ++i ) { if ( *(_BYTE *)(112 * i + *(_QWORD *)(a1 + 112) + 102) ) *(_BYTE *)(112 * i + *(_QWORD *)(a1 + 112) + 102) = 0; } } return 0; } *(_DWORD *)(a1 + 264) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL); strncpy(a1 + 781, *(_QWORD *)(a1 + 56) + 663LL, 5LL); *(_BYTE *)(a1 + 786) = 0; if ( *(_QWORD *)(a1 + 56) == -151LL ) v2 = client_errors[*(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) - 2000]; else v2 = (char *)(*(_QWORD *)(a1 + 56) + 151LL); strncpy(a1 + 268, v2, 512LL); *(_BYTE *)(a1 + 779) = 0; return v5; }
madb_reset_stmt: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x28],RAX MOV byte ptr [RBP + -0x29],0x0 MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x38],0x0 JNZ 0x00144585 JMP 0x00144519 LAB_00144519: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x108],0x7dd MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x30d LEA RAX,[0x180ea0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00114220 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x312],0x0 MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x10c LEA RAX,[0x180eb0] MOV RSI,qword ptr [RAX + 0x68] MOV EDX,0x200 CALL 0x00114220 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x30b],0x0 MOV byte ptr [RBP + -0xd],0x1 JMP 0x00144926 LAB_00144585: MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x1 CMP EAX,0x0 JZ 0x00144630 JMP 0x00144596 LAB_00144596: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x90],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x297 LEA RSI,[0x16abaf] CALL 0x001143d0 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x97],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] CMP qword ptr [RAX + 0x2a0],0x0 JZ 0x001445fa MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x2a0] MOV dword ptr [RAX + 0x4],0x0 LAB_001445fa: JMP 0x001445fc LAB_001445fc: JMP 0x001445fe LAB_001445fe: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x108],0x0 MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x30d LEA RSI,[0x16abaf] CALL 0x001143d0 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x10c],0x0 JMP 0x00144630 LAB_00144630: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x40],0x0 JZ 0x00144920 MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x10 CMP EAX,0x0 JZ 0x001446bb MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0xe0],0x0 JZ 0x001446bb MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x80 ADD RDI,0x10 MOV ESI,0x1 CALL 0x0013f420 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x80],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0xc8],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0xe0],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x488],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x50],0x6 LAB_001446bb: MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x8 CMP EAX,0x0 JZ 0x0014472c MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x50],0x3 JNZ 0x001446ec MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x358] MOV RDI,qword ptr [RBP + -0x18] CALL RAX MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x50],0x5 LAB_001446ec: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] CMP dword ptr [RAX + 0x488],0x0 JZ 0x0014472a MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x60],0x0 JZ 0x0014472a MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x78] MOV RDI,qword ptr [RBP + -0x18] CALL RAX MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x488],0x0 LAB_0014472a: JMP 0x0014472c LAB_0014472c: MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x4 CMP EAX,0x0 JZ 0x001448b2 MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x38],0x0 JZ 0x001448b0 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] CMP dword ptr [RAX + 0x488],0x0 JNZ 0x001448b0 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] CMP qword ptr [RAX],0x0 JZ 0x001448b0 JMP 0x00144773 LAB_00144773: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x40] MOV byte ptr [RBP + -0xc],AL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x8 MOV byte ptr [RBP + -0xb],AL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x10 MOV byte ptr [RBP + -0xa],AL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x18 MOV byte ptr [RBP + -0x9],AL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x10] MOV RDI,qword ptr [RBP + -0x28] LEA RDX,[RBP + -0xc] MOV R9,qword ptr [RBP + -0x18] MOV ESI,0x1a MOV ECX,0x4 XOR R8D,R8D CALL RAX MOV byte ptr [RBP + -0x29],AL CMP AL,0x0 JZ 0x001448ae JMP 0x001447e6 LAB_001447e6: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV ECX,dword ptr [RAX + 0x90] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x108],ECX MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x30d MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x38] ADD RSI,0x297 MOV EDX,0x5 CALL 0x00114220 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x312],0x0 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x10c MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] ADD RAX,0x97 CMP RAX,0x0 JZ 0x00144863 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] ADD RAX,0x97 MOV qword ptr [RBP + -0x48],RAX JMP 0x00144889 LAB_00144863: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV EAX,dword ptr [RAX + 0x90] SUB EAX,0x7d0 MOV EAX,EAX MOV ECX,EAX LEA RAX,[0x180eb0] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x48],RAX LAB_00144889: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x48] MOV EDX,0x200 CALL 0x00114220 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x30b],0x0 MOV AL,byte ptr [RBP + -0x29] MOV byte ptr [RBP + -0xd],AL JMP 0x00144926 LAB_001448ae: JMP 0x001448b0 LAB_001448b0: JMP 0x001448b2 LAB_001448b2: MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x2 CMP EAX,0x0 JZ 0x0014491e MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x70],0x0 JZ 0x0014491c MOV qword ptr [RBP + -0x38],0x0 LAB_001448d0: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RCX + 0x64] CMP RAX,RCX JNC 0x0014491a MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x70] IMUL RCX,qword ptr [RBP + -0x38],0x70 ADD RAX,RCX CMP byte ptr [RAX + 0x66],0x0 JZ 0x0014490a MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x70] IMUL RCX,qword ptr [RBP + -0x38],0x70 ADD RAX,RCX MOV byte ptr [RAX + 0x66],0x0 LAB_0014490a: JMP 0x0014490c LAB_0014490c: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX JMP 0x001448d0 LAB_0014491a: JMP 0x0014491c LAB_0014491c: JMP 0x0014491e LAB_0014491e: JMP 0x00144920 LAB_00144920: MOV AL,byte ptr [RBP + -0x29] MOV byte ptr [RBP + -0xd],AL LAB_00144926: MOV AL,byte ptr [RBP + -0xd] MOV byte ptr [RBP + -0x49],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00144947 MOV AL,byte ptr [RBP + -0x49] ADD RSP,0x50 POP RBP RET LAB_00144947: CALL 0x001144c0
int8 madb_reset_stmt(long param_1,uint param_2) { long lVar1; long in_FS_OFFSET; char *local_50; ulong local_40; char local_31; char local_15; int1 local_14; int1 local_13; int1 local_12; int1 local_11; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); lVar1 = *(long *)(param_1 + 0x38); local_31 = '\0'; if (*(long *)(param_1 + 0x38) == 0) { *(int4 *)(param_1 + 0x108) = 0x7dd; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s_Lost_connection_to_server_during_00180f18,0x200); *(int1 *)(param_1 + 0x30b) = 0; local_15 = '\x01'; } else { if ((param_2 & 1) != 0) { *(int4 *)(*(long *)(param_1 + 0x38) + 0x90) = 0; strcpy((char *)(*(long *)(param_1 + 0x38) + 0x297),"00000"); *(int1 *)(*(long *)(param_1 + 0x38) + 0x97) = 0; if (*(long *)(*(long *)(param_1 + 0x38) + 0x2a0) != 0) { *(int4 *)(*(long *)(*(long *)(param_1 + 0x38) + 0x2a0) + 4) = 0; } *(int4 *)(param_1 + 0x108) = 0; strcpy((char *)(param_1 + 0x30d),"00000"); *(int1 *)(param_1 + 0x10c) = 0; } if (*(long *)(param_1 + 0x40) != 0) { if (((param_2 & 0x10) != 0) && (*(long *)(param_1 + 0xe0) != 0)) { ma_free_root(param_1 + 0x90,1); *(int8 *)(param_1 + 0x80) = 0; *(int8 *)(param_1 + 200) = 0; *(int8 *)(param_1 + 0xe0) = 0; *(int4 *)(*(long *)(param_1 + 0x38) + 0x488) = 0; *(int4 *)(param_1 + 0x50) = 6; } if ((param_2 & 8) != 0) { if (*(int *)(param_1 + 0x50) == 3) { (**(code **)(param_1 + 0x358))(param_1); *(int4 *)(param_1 + 0x50) = 5; } if ((*(int *)(*(long *)(param_1 + 0x38) + 0x488) != 0) && (*(int *)(param_1 + 0x60) != 0)) { (**(code **)(*(long *)(lVar1 + 0x4d0) + 0x78))(param_1); *(int4 *)(lVar1 + 0x488) = 0; } } if (((((param_2 & 4) != 0) && (*(long *)(param_1 + 0x38) != 0)) && (*(int *)(*(long *)(param_1 + 0x38) + 0x488) == 0)) && (**(long **)(param_1 + 0x38) != 0)) { local_14 = (int1)*(int8 *)(param_1 + 0x40); local_13 = (int1)((ulong)*(int8 *)(param_1 + 0x40) >> 8); local_12 = (int1)((ulong)*(int8 *)(param_1 + 0x40) >> 0x10); local_11 = (int1)((ulong)*(int8 *)(param_1 + 0x40) >> 0x18); local_31 = (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x10)) (lVar1,0x1a,&local_14,4,0,param_1); if (local_31 != '\0') { *(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90); strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5); *(int1 *)(param_1 + 0x312) = 0; if (*(long *)(param_1 + 0x38) == -0x97) { local_50 = (&client_errors)[*(int *)(*(long *)(param_1 + 0x38) + 0x90) - 2000]; } else { local_50 = (char *)(*(long *)(param_1 + 0x38) + 0x97); } strncpy((char *)(param_1 + 0x10c),local_50,0x200); *(int1 *)(param_1 + 0x30b) = 0; local_15 = local_31; goto LAB_00144926; } } if (((param_2 & 2) != 0) && (*(long *)(param_1 + 0x70) != 0)) { for (local_40 = 0; local_40 < *(uint *)(param_1 + 100); local_40 = local_40 + 1) { if (*(char *)(*(long *)(param_1 + 0x70) + local_40 * 0x70 + 0x66) != '\0') { *(int1 *)(*(long *)(param_1 + 0x70) + local_40 * 0x70 + 0x66) = 0; } } } } local_15 = local_31; } LAB_00144926: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_15); }
21,748
my_strntol_8bit
eloqsql/strings/ctype-simple.c
long my_strntol_8bit(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative; register uint32 cutoff; register uint cutlim; register uint32 i; register const char *s; register uchar c; const char *save, *e; int overflow; *err= 0; /* Initialize error indicator */ s = nptr; e = nptr+l; for ( ; s<e && my_isspace(cs, *s) ; s++); if (s == e) { goto noconv; } /* Check for a sign. */ if (*s == '-') { negative = 1; ++s; } else if (*s == '+') { negative = 0; ++s; } else negative = 0; save = s; cutoff = ((uint32)~0L) / (uint32) base; cutlim = (uint) (((uint32)~0L) % (uint32) base); overflow = 0; i = 0; for (c = *s; s != e; c = *++s) { if (c>='0' && c<='9') c -= '0'; else if (c>='A' && c<='Z') c = c - 'A' + 10; else if (c>='a' && c<='z') c = c - 'a' + 10; else break; if (c >= base) break; if (i > cutoff || (i == cutoff && c > cutlim)) overflow = 1; else { i *= (uint32) base; i += c; } } if (s == save) goto noconv; if (endptr != NULL) *endptr = (char *) s; if (negative) { if (i > (uint32) INT_MIN32) overflow = 1; } else if (i > INT_MAX32) overflow = 1; if (overflow) { err[0]= ERANGE; return negative ? INT_MIN32 : INT_MAX32; } return (negative ? -((long) i) : (long) i); noconv: err[0]= EDOM; if (endptr != NULL) *endptr = (char *) nptr; return 0L; }
O3
c
my_strntol_8bit: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl $0x0, (%r9) leaq (%rsi,%rdx), %r11 movq %rsi, %r10 testq %rdx, %rdx jle 0xb61cf movq 0x40(%rdi), %rax movq %rsi, %r10 movzbl (%r10), %edx testb $0x8, 0x1(%rax,%rdx) je 0xb61cf incq %r10 cmpq %r11, %r10 jb 0xb61bc cmpq %r11, %r10 je 0xb62d4 movb (%r10), %dil leal -0x2b(%rdi), %eax andb $-0x3, %al cmpb $0x1, %al adcq $0x0, %r10 movl $0xffffffff, %eax # imm = 0xFFFFFFFF xorl %edx, %edx divl %ecx xorl %ebx, %ebx cmpq %r11, %r10 je 0xb6280 movq %rdi, -0x30(%rbp) xorl %r12d, %r12d movq %r10, %r14 xorl %r13d, %r13d movl %r13d, %ebx movl %r12d, %r15d movb (%r14), %r12b leal -0x30(%r12), %edi cmpb $0xa, %dil jb 0xb623e leal -0x41(%r12), %edi cmpb $0x19, %dil ja 0xb622c addb $-0x37, %r12b jmp 0xb623b leal -0x61(%r12), %edi cmpb $0x19, %dil ja 0xb627a addb $-0x57, %r12b movl %r12d, %edi movzbl %dil, %edi cmpl %ecx, %edi jge 0xb627a movl $0x1, %r12d cmpl %eax, %ebx jbe 0xb6255 movl %ebx, %r13d jmp 0xb6269 jne 0xb625e movl %eax, %r13d cmpl %edi, %edx jb 0xb6269 imull %ecx, %ebx addl %edi, %ebx movl %ebx, %r13d movl %r15d, %r12d incq %r14 cmpq %r11, %r14 jne 0xb6207 movl %r13d, %ebx movq %r11, %r14 movl %r12d, %r15d movq -0x30(%rbp), %rdi jmp 0xb6286 movq %r11, %r14 xorl %r15d, %r15d cmpq %r10, %r14 je 0xb62d4 testq %r8, %r8 je 0xb6293 movq %r14, (%r8) cmpl $0x80000001, %ebx # imm = 0x80000001 movl $0x1, %eax movl %r15d, %ecx cmovael %eax, %ecx testl %ebx, %ebx cmovsl %eax, %r15d cmpb $0x2d, %dil cmovel %ecx, %r15d testl %r15d, %r15d je 0xb62f0 cmpb $0x2d, %dil movl $0x22, (%r9) movq $-0x80000000, %rcx # imm = 0x80000000 movl $0x7fffffff, %eax # imm = 0x7FFFFFFF cmoveq %rcx, %rax jmp 0xb62e5 movl $0x21, (%r9) testq %r8, %r8 je 0xb62e3 movq %rsi, (%r8) xorl %eax, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %ebx, %ecx movq %rcx, %rax negq %rax cmpb $0x2d, %dil cmovneq %rcx, %rax jmp 0xb62e5
my_strntol_8bit: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx mov dword ptr [r9], 0 lea r11, [rsi+rdx] mov r10, rsi test rdx, rdx jle short loc_B61CF mov rax, [rdi+40h] mov r10, rsi loc_B61BC: movzx edx, byte ptr [r10] test byte ptr [rax+rdx+1], 8 jz short loc_B61CF inc r10 cmp r10, r11 jb short loc_B61BC loc_B61CF: cmp r10, r11 jz loc_B62D4 mov dil, [r10] lea eax, [rdi-2Bh] and al, 0FDh cmp al, 1 adc r10, 0 mov eax, 0FFFFFFFFh xor edx, edx div ecx xor ebx, ebx cmp r10, r11 jz loc_B6280 mov [rbp+var_30], rdi xor r12d, r12d mov r14, r10 xor r13d, r13d loc_B6207: mov ebx, r13d mov r15d, r12d mov r12b, [r14] lea edi, [r12-30h] cmp dil, 0Ah jb short loc_B623E lea edi, [r12-41h] cmp dil, 19h ja short loc_B622C add r12b, 0C9h jmp short loc_B623B loc_B622C: lea edi, [r12-61h] cmp dil, 19h ja short loc_B627A add r12b, 0A9h loc_B623B: mov edi, r12d loc_B623E: movzx edi, dil cmp edi, ecx jge short loc_B627A mov r12d, 1 cmp ebx, eax jbe short loc_B6255 mov r13d, ebx jmp short loc_B6269 loc_B6255: jnz short loc_B625E mov r13d, eax cmp edx, edi jb short loc_B6269 loc_B625E: imul ebx, ecx add ebx, edi mov r13d, ebx mov r12d, r15d loc_B6269: inc r14 cmp r14, r11 jnz short loc_B6207 mov ebx, r13d mov r14, r11 mov r15d, r12d loc_B627A: mov rdi, [rbp+var_30] jmp short loc_B6286 loc_B6280: mov r14, r11 xor r15d, r15d loc_B6286: cmp r14, r10 jz short loc_B62D4 test r8, r8 jz short loc_B6293 mov [r8], r14 loc_B6293: cmp ebx, 80000001h mov eax, 1 mov ecx, r15d cmovnb ecx, eax test ebx, ebx cmovs r15d, eax cmp dil, 2Dh ; '-' cmovz r15d, ecx test r15d, r15d jz short loc_B62F0 cmp dil, 2Dh ; '-' mov dword ptr [r9], 22h ; '"' mov rcx, 0FFFFFFFF80000000h mov eax, 7FFFFFFFh cmovz rax, rcx jmp short loc_B62E5 loc_B62D4: mov dword ptr [r9], 21h ; '!' test r8, r8 jz short loc_B62E3 mov [r8], rsi loc_B62E3: xor eax, eax loc_B62E5: pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_B62F0: mov ecx, ebx mov rax, rcx neg rax cmp dil, 2Dh ; '-' cmovnz rax, rcx jmp short loc_B62E5
long long my_strntol_8bit( long long a1, unsigned __int8 *a2, long long a3, unsigned int a4, unsigned __int8 **a5, _DWORD *a6) { unsigned __int8 *v6; // r11 unsigned __int8 *v7; // r10 unsigned __int8 v8; // di unsigned __int8 *v9; // r10 unsigned int v10; // eax unsigned int v11; // ebx int v12; // r12d unsigned __int8 *v13; // r14 unsigned int v14; // r13d int v15; // r15d unsigned __int8 v16; // r12 unsigned __int8 v17; // di unsigned __int8 v18; // r12 int v19; // ecx long long result; // rax unsigned __int8 v21; // [rsp+0h] [rbp-30h] *a6 = 0; v6 = &a2[a3]; v7 = a2; if ( a3 > 0 ) { v7 = a2; do { if ( (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v7 + 1LL) & 8) == 0 ) break; ++v7; } while ( v7 < v6 ); } if ( v7 == v6 ) goto LABEL_36; v8 = *v7; v9 = &v7[((*v7 - 43) & 0xFD) == 0]; v10 = 0xFFFFFFFF / a4; v11 = 0; if ( v9 == v6 ) { v13 = &a2[a3]; v15 = 0; } else { v21 = v8; v12 = 0; v13 = v9; v14 = 0; while ( 1 ) { v11 = v14; v15 = v12; v16 = *v13; v17 = *v13 - 48; if ( v17 >= 0xAu ) { if ( (unsigned __int8)(v16 - 65) > 0x19u ) { if ( (unsigned __int8)(v16 - 97) > 0x19u ) break; v18 = v16 - 87; } else { v18 = v16 - 55; } v17 = v18; } if ( v17 >= (int)a4 ) break; v12 = 1; if ( v14 <= v10 ) { if ( v14 != v10 || (v14 = 0xFFFFFFFF / a4, 0xFFFFFFFF % a4 >= v17) ) { v14 = v17 + a4 * v11; v12 = v15; } } if ( ++v13 == v6 ) { v11 = v14; v13 = &a2[a3]; v15 = v12; break; } } v8 = v21; } if ( v13 == v9 ) { LABEL_36: *a6 = 33; if ( a5 ) *a5 = a2; return 0LL; } else { if ( a5 ) *a5 = v13; v19 = v15; if ( v11 >= 0x80000001 ) v19 = 1; if ( (v11 & 0x80000000) != 0 ) v15 = 1; if ( v8 == 45 ) v15 = v19; if ( v15 ) { *a6 = 34; result = 0x7FFFFFFFLL; if ( v8 == 45 ) return 0xFFFFFFFF80000000LL; } else { result = -(long long)v11; if ( v8 != 45 ) return v11; } } return result; }
my_strntol_8bit: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV dword ptr [R9],0x0 LEA R11,[RSI + RDX*0x1] MOV R10,RSI TEST RDX,RDX JLE 0x001b61cf MOV RAX,qword ptr [RDI + 0x40] MOV R10,RSI LAB_001b61bc: MOVZX EDX,byte ptr [R10] TEST byte ptr [RAX + RDX*0x1 + 0x1],0x8 JZ 0x001b61cf INC R10 CMP R10,R11 JC 0x001b61bc LAB_001b61cf: CMP R10,R11 JZ 0x001b62d4 MOV DIL,byte ptr [R10] LEA EAX,[RDI + -0x2b] AND AL,0xfd CMP AL,0x1 ADC R10,0x0 MOV EAX,0xffffffff XOR EDX,EDX DIV ECX XOR EBX,EBX CMP R10,R11 JZ 0x001b6280 MOV qword ptr [RBP + -0x30],RDI XOR R12D,R12D MOV R14,R10 XOR R13D,R13D LAB_001b6207: MOV EBX,R13D MOV R15D,R12D MOV R12B,byte ptr [R14] LEA EDI,[R12 + -0x30] CMP DIL,0xa JC 0x001b623e LEA EDI,[R12 + -0x41] CMP DIL,0x19 JA 0x001b622c ADD R12B,0xc9 JMP 0x001b623b LAB_001b622c: LEA EDI,[R12 + -0x61] CMP DIL,0x19 JA 0x001b627a ADD R12B,0xa9 LAB_001b623b: MOV EDI,R12D LAB_001b623e: MOVZX EDI,DIL CMP EDI,ECX JGE 0x001b627a MOV R12D,0x1 CMP EBX,EAX JBE 0x001b6255 MOV R13D,EBX JMP 0x001b6269 LAB_001b6255: JNZ 0x001b625e MOV R13D,EAX CMP EDX,EDI JC 0x001b6269 LAB_001b625e: IMUL EBX,ECX ADD EBX,EDI MOV R13D,EBX MOV R12D,R15D LAB_001b6269: INC R14 CMP R14,R11 JNZ 0x001b6207 MOV EBX,R13D MOV R14,R11 MOV R15D,R12D LAB_001b627a: MOV RDI,qword ptr [RBP + -0x30] JMP 0x001b6286 LAB_001b6280: MOV R14,R11 XOR R15D,R15D LAB_001b6286: CMP R14,R10 JZ 0x001b62d4 TEST R8,R8 JZ 0x001b6293 MOV qword ptr [R8],R14 LAB_001b6293: CMP EBX,0x80000001 MOV EAX,0x1 MOV ECX,R15D CMOVNC ECX,EAX TEST EBX,EBX CMOVS R15D,EAX CMP DIL,0x2d CMOVZ R15D,ECX TEST R15D,R15D JZ 0x001b62f0 CMP DIL,0x2d MOV dword ptr [R9],0x22 MOV RCX,-0x80000000 MOV EAX,0x7fffffff CMOVZ RAX,RCX JMP 0x001b62e5 LAB_001b62d4: MOV dword ptr [R9],0x21 TEST R8,R8 JZ 0x001b62e3 MOV qword ptr [R8],RSI LAB_001b62e3: XOR EAX,EAX LAB_001b62e5: POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001b62f0: MOV ECX,EBX MOV RAX,RCX NEG RAX CMP DIL,0x2d CMOVNZ RAX,RCX JMP 0x001b62e5
ulong my_strntol_8bit(long param_1,byte *param_2,long param_3,uint param_4,ulong *param_5, int4 *param_6) { byte *pbVar1; byte bVar2; byte bVar3; bool bVar4; bool bVar5; uint uVar6; uint uVar7; byte *pbVar8; byte bVar9; uint uVar10; byte *pbVar11; byte *pbVar12; *param_6 = 0; pbVar1 = param_2 + param_3; pbVar8 = param_2; if (0 < param_3) { do { if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*pbVar8) & 8) == 0) break; pbVar8 = pbVar8 + 1; } while (pbVar8 < pbVar1); } if (pbVar8 != pbVar1) { bVar2 = *pbVar8; pbVar8 = pbVar8 + ((bVar2 - 0x2b & 0xfd) == 0); uVar10 = 0; if (pbVar8 == pbVar1) { bVar4 = false; pbVar12 = pbVar1; } else { bVar4 = false; uVar10 = 0; pbVar11 = pbVar8; do { bVar3 = *pbVar11; bVar9 = bVar3 - 0x30; pbVar12 = pbVar11; if (9 < bVar9) { if ((byte)(bVar3 + 0xbf) < 0x1a) { bVar9 = bVar3 - 0x37; } else { if (0x19 < (byte)(bVar3 + 0x9f)) break; bVar9 = bVar3 + 0xa9; } } if ((int)param_4 <= (int)(uint)bVar9) break; uVar7 = (uint)(0xffffffff / (ulong)param_4); uVar6 = uVar10; bVar5 = true; if ((uVar10 <= uVar7) && ((uVar10 != uVar7 || (uVar6 = uVar7, (uint)bVar9 <= (uint)(0xffffffff % (ulong)param_4))) )) { uVar6 = uVar10 * param_4 + (uint)bVar9; bVar5 = bVar4; } bVar4 = bVar5; uVar10 = uVar6; pbVar11 = pbVar11 + 1; pbVar12 = pbVar1; } while (pbVar11 != pbVar1); } if (pbVar12 != pbVar8) { if (param_5 != (ulong *)0x0) { *param_5 = (ulong)pbVar12; } bVar5 = bVar4; if (0x80000000 < uVar10) { bVar5 = true; } if ((int)uVar10 < 0) { bVar4 = true; } if (bVar2 == 0x2d) { bVar4 = bVar5; } if (bVar4) { *param_6 = 0x22; if (bVar2 != 0x2d) { return 0x7fffffff; } return 0xffffffff80000000; } if (bVar2 == 0x2d) { return -(ulong)uVar10; } return (ulong)uVar10; } } *param_6 = 0x21; if (param_5 != (ulong *)0x0) { *param_5 = (ulong)param_2; } return 0; }
21,749
list_del
bluesky950520[P]quickjs/list.h
static inline void list_del(struct list_head *el) { struct list_head *prev, *next; prev = el->prev; next = el->next; prev->next = next; next->prev = prev; el->prev = NULL; /* fail safe */ el->next = NULL; /* fail safe */ }
O0
c
list_del: movq %rdi, -0x8(%rsp) movq -0x8(%rsp), %rax movq (%rax), %rax movq %rax, -0x10(%rsp) movq -0x8(%rsp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rsp) movq -0x18(%rsp), %rcx movq -0x10(%rsp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rsp), %rcx movq -0x18(%rsp), %rax movq %rcx, (%rax) movq -0x8(%rsp), %rax movq $0x0, (%rax) movq -0x8(%rsp), %rax movq $0x0, 0x8(%rax) retq nopw %cs:(%rax,%rax)
list_del_0: mov [rsp+var_8], rdi mov rax, [rsp+var_8] mov rax, [rax] mov [rsp+var_10], rax mov rax, [rsp+var_8] mov rax, [rax+8] mov [rsp+var_18], rax mov rcx, [rsp+var_18] mov rax, [rsp+var_10] mov [rax+8], rcx mov rcx, [rsp+var_10] mov rax, [rsp+var_18] mov [rax], rcx mov rax, [rsp+var_8] mov qword ptr [rax], 0 mov rax, [rsp+var_8] mov qword ptr [rax+8], 0 retn
_QWORD * list_del_0(_QWORD *a1) { _QWORD *result; // rax _QWORD *v2; // [rsp+0h] [rbp-18h] long long v3; // [rsp+8h] [rbp-10h] v3 = *a1; v2 = (_QWORD *)a1[1]; *(_QWORD *)(v3 + 8) = v2; *v2 = v3; *a1 = 0LL; result = a1; a1[1] = 0LL; return result; }
list_del: MOV qword ptr [RSP + -0x8],RDI MOV RAX,qword ptr [RSP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + -0x10],RAX MOV RAX,qword ptr [RSP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + -0x18],RAX MOV RCX,qword ptr [RSP + -0x18] MOV RAX,qword ptr [RSP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RSP + -0x10] MOV RAX,qword ptr [RSP + -0x18] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RSP + -0x8] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RSP + -0x8] MOV qword ptr [RAX + 0x8],0x0 RET
void list_del(long *param_1) { long lVar1; long *plVar2; lVar1 = *param_1; plVar2 = (long *)param_1[1]; *(long **)(lVar1 + 8) = plVar2; *plVar2 = lVar1; *param_1 = 0; param_1[1] = 0; return; }
21,750
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 0xd2f00 movups (%r14), %xmm0 movups %xmm0, (%rbx) movq %r14, %rdi xorl %esi, %esi callq 0x875ae movb $0x0, (%r14) movq $0x0, 0x8(%r14) movq %rbx, %rdi movl $0x1, %esi callq 0x875ae movq %r14, %rdi xorl %esi, %esi callq 0x875ae movq %r14, %rdi callq 0x8bcc8 addq $0x18, %rsp popq %rbx popq %r14 retq nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__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_jsonINS0_11ordered_mapESt6vectorNSt7__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<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>>::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_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 byte ptr [r14], 0 mov qword ptr [r14+8], 0 mov rdi, rbx mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 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() add rsp, 18h pop rbx pop r14 retn
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__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<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>>::moved_or_copied( (unsigned __int8 *)v3, a2); *(_OWORD *)a1 = v3[0]; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v3); LOBYTE(v3[0]) = 0; *((_QWORD *)&v3[0] + 1) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(a1); 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 *)v3); return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v3); }
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__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 0x001d2f00 MOVUPS XMM0,xmmword ptr [R14] MOVUPS xmmword ptr [RBX],XMM0 MOV RDI,R14 XOR ESI,ESI CALL 0x001875ae MOV byte ptr [R14],0x0 MOV qword ptr [R14 + 0x8],0x0 MOV RDI,RBX MOV ESI,0x1 CALL 0x001875ae MOV RDI,R14 XOR ESI,ESI CALL 0x001875ae MOV RDI,R14 CALL 0x0018bcc8 ADD RSP,0x18 POP RBX POP R14 RET
void _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__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<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>> ::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<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(bVar1); local_20 = (data)0x0; uStack_18 = 0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(param_1,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar1); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(&local_20); return; }
21,751
my_strxfrm_desc_and_reverse
eloqsql/strings/ctype-simple.c
void my_strxfrm_desc_and_reverse(uchar *str, uchar *strend, uint flags, uint level) { if (flags & (MY_STRXFRM_DESC_LEVEL1 << level)) { if (flags & (MY_STRXFRM_REVERSE_LEVEL1 << level)) { for (strend--; str <= strend;) { uchar tmp= *str; *str++= ~*strend; *strend--= ~tmp; } } else { for (; str < strend; str++) *str= ~*str; } } else if (flags & (MY_STRXFRM_REVERSE_LEVEL1 << level)) { for (strend--; str < strend;) { uchar tmp= *str; *str++= *strend; *strend--= tmp; } } }
O3
c
my_strxfrm_desc_and_reverse: pushq %rbp movq %rsp, %rbp movl %edx, %r8d shrl %cl, %r8d movl $0x10000, %eax # imm = 0x10000 shll %cl, %eax btl $0x8, %r8d jae 0xbd294 testl %edx, %eax je 0xbd2c7 decq %rsi cmpq %rdi, %rsi jb 0xbd2d6 incq %rdi movb -0x1(%rdi), %al movb (%rsi), %cl notb %cl movb %cl, -0x1(%rdi) notb %al movb %al, (%rsi) decq %rsi leaq 0x1(%rdi), %rax cmpq %rsi, %rdi movq %rax, %rdi jbe 0xbd275 jmp 0xbd2d6 testl %edx, %eax setne %al decq %rsi cmpq %rdi, %rsi seta %cl andb %al, %cl cmpb $0x1, %cl jne 0xbd2d6 incq %rdi movb -0x1(%rdi), %al movb (%rsi), %cl movb %cl, -0x1(%rdi) movb %al, (%rsi) decq %rsi leaq 0x1(%rdi), %rax cmpq %rsi, %rdi movq %rax, %rdi jb 0xbd2ac jmp 0xbd2d6 cmpq %rsi, %rdi jae 0xbd2d6 notb (%rdi) incq %rdi cmpq %rsi, %rdi jne 0xbd2cc popq %rbp retq
my_strxfrm_desc_and_reverse: push rbp mov rbp, rsp mov r8d, edx shr r8d, cl mov eax, offset stru_10000 shl eax, cl bt r8d, 8 jnb short loc_BD294 test eax, edx jz short loc_BD2C7 dec rsi cmp rsi, rdi jb short loc_BD2D6 inc rdi loc_BD275: mov al, [rdi-1] mov cl, [rsi] not cl mov [rdi-1], cl not al mov [rsi], al dec rsi lea rax, [rdi+1] cmp rdi, rsi mov rdi, rax jbe short loc_BD275 jmp short loc_BD2D6 loc_BD294: test eax, edx setnz al dec rsi cmp rsi, rdi setnbe cl and cl, al cmp cl, 1 jnz short loc_BD2D6 inc rdi loc_BD2AC: mov al, [rdi-1] mov cl, [rsi] mov [rdi-1], cl mov [rsi], al dec rsi lea rax, [rdi+1] cmp rdi, rsi mov rdi, rax jb short loc_BD2AC jmp short loc_BD2D6 loc_BD2C7: cmp rdi, rsi jnb short loc_BD2D6 loc_BD2CC: not byte ptr [rdi] inc rdi cmp rdi, rsi jnz short loc_BD2CC loc_BD2D6: pop rbp retn
char my_strxfrm_desc_and_reverse(_BYTE *a1, _BYTE *a2, unsigned int a3, char a4) { int v4; // eax _BYTE *v5; // rsi _BYTE *v6; // rdi char v7; // al _BYTE *v9; // rsi _BYTE *v10; // rdi char v11; // al v4 = (_DWORD)&stru_10000 << a4; if ( ((a3 >> a4) & 0x100) != 0 ) { if ( (a3 & v4) != 0 ) { v5 = a2 - 1; if ( v5 >= a1 ) { v6 = a1 + 1; do { v7 = *(v6 - 1); *(v6 - 1) = ~*v5; *v5-- = ~v7; LOBYTE(v4) = (_BYTE)v6 + 1; } while ( v6++ <= v5 ); } } else if ( a1 < a2 ) { do { *a1 = ~*a1; ++a1; } while ( a1 != a2 ); } } else { LOBYTE(v4) = (a3 & v4) != 0; v9 = a2 - 1; if ( ((unsigned __int8)v4 & (v9 > a1)) == 1 ) { v10 = a1 + 1; do { v11 = *(v10 - 1); *(v10 - 1) = *v9; *v9-- = v11; LOBYTE(v4) = (_BYTE)v10 + 1; } while ( v10++ < v9 ); } } return v4; }
my_strxfrm_desc_and_reverse: PUSH RBP MOV RBP,RSP MOV R8D,EDX SHR R8D,CL MOV EAX,0x10000 SHL EAX,CL BT R8D,0x8 JNC 0x001bd294 TEST EAX,EDX JZ 0x001bd2c7 DEC RSI CMP RSI,RDI JC 0x001bd2d6 INC RDI LAB_001bd275: MOV AL,byte ptr [RDI + -0x1] MOV CL,byte ptr [RSI] NOT CL MOV byte ptr [RDI + -0x1],CL NOT AL MOV byte ptr [RSI],AL DEC RSI LEA RAX,[RDI + 0x1] CMP RDI,RSI MOV RDI,RAX JBE 0x001bd275 JMP 0x001bd2d6 LAB_001bd294: TEST EAX,EDX SETNZ AL DEC RSI CMP RSI,RDI SETA CL AND CL,AL CMP CL,0x1 JNZ 0x001bd2d6 INC RDI LAB_001bd2ac: MOV AL,byte ptr [RDI + -0x1] MOV CL,byte ptr [RSI] MOV byte ptr [RDI + -0x1],CL MOV byte ptr [RSI],AL DEC RSI LEA RAX,[RDI + 0x1] CMP RDI,RSI MOV RDI,RAX JC 0x001bd2ac JMP 0x001bd2d6 LAB_001bd2c7: CMP RDI,RSI JNC 0x001bd2d6 LAB_001bd2cc: NOT byte ptr [RDI] INC RDI CMP RDI,RSI JNZ 0x001bd2cc LAB_001bd2d6: POP RBP RET
void my_strxfrm_desc_and_reverse(byte *param_1,byte *param_2,uint param_3,byte param_4) { byte bVar1; uint uVar2; byte *pbVar3; bool bVar4; uVar2 = 0x10000 << (param_4 & 0x1f); if (((param_3 >> (param_4 & 0x1f)) >> 8 & 1) == 0) { param_2 = param_2 + -1; if (param_1 < param_2 && (uVar2 & param_3) != 0) { pbVar3 = param_1 + 1; do { bVar1 = pbVar3[-1]; pbVar3[-1] = *param_2; *param_2 = bVar1; param_2 = param_2 + -1; bVar4 = pbVar3 < param_2; pbVar3 = pbVar3 + 1; } while (bVar4); } } else if ((uVar2 & param_3) == 0) { if (param_1 < param_2) { do { *param_1 = ~*param_1; param_1 = param_1 + 1; } while (param_1 != param_2); } } else { param_2 = param_2 + -1; if (param_1 <= param_2) { pbVar3 = param_1 + 1; do { bVar1 = pbVar3[-1]; pbVar3[-1] = ~*param_2; *param_2 = ~bVar1; param_2 = param_2 + -1; bVar4 = pbVar3 <= param_2; pbVar3 = pbVar3 + 1; } while (bVar4); } } return; }
21,752
OpenSubdiv::v3_6_0::Far::StencilTableReal<float>::StencilTableReal(int, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::vector<float, std::allocator<float>> const&, bool, unsigned long)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/stencilTable.cpp
StencilTableReal<REAL>::StencilTableReal(int numControlVerts, std::vector<int> const& offsets, std::vector<int> const& sizes, std::vector<int> const& sources, std::vector<REAL> const& weights, bool includeCoarseVerts, size_t firstOffset) : _numControlVertices(numControlVerts) { copyStencilData(numControlVerts, includeCoarseVerts, firstOffset, &offsets, &_offsets, &sizes, &_sizes, &sources, &_indices, &weights, &_weights); }
O0
cpp
OpenSubdiv::v3_6_0::Far::StencilTableReal<float>::StencilTableReal(int, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::vector<float, std::allocator<float>> const&, bool, unsigned long): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0xe8, %rsp movq 0x18(%rbp), %rax movb 0x10(%rbp), %al movq %rdi, -0x20(%rbp) movl %esi, -0x24(%rbp) movq %rdx, -0x30(%rbp) movq %rcx, -0x38(%rbp) movq %r8, -0x40(%rbp) movq %r9, -0x48(%rbp) andb $0x1, %al movb %al, -0x49(%rbp) movq -0x20(%rbp), %r15 movq 0xec0c2(%rip), %rax # 0x240e70 addq $0x10, %rax movq %rax, (%r15) movl -0x24(%rbp), %eax movl %eax, 0x8(%r15) movq %r15, %rdi addq $0x10, %rdi movq %rdi, -0x78(%rbp) callq 0xd2780 movq %r15, %rdi addq $0x28, %rdi movq %rdi, -0x70(%rbp) callq 0xd2780 movq %r15, %rbx addq $0x40, %rbx movq %rbx, -0x88(%rbp) movq %rbx, %rdi callq 0xd2780 addq $0x58, %r15 movq %r15, -0x80(%rbp) movq %r15, %rdi callq 0xcd580 movq -0x78(%rbp), %r10 movq -0x70(%rbp), %r8 movl -0x24(%rbp), %edi movq 0x18(%rbp), %rdx movq -0x30(%rbp), %rcx movq -0x38(%rbp), %r9 movq -0x40(%rbp), %r11 movq -0x48(%rbp), %r14 movzbl -0x49(%rbp), %esi movq %rsp, %rax movq %rax, -0x68(%rbp) movq %r15, 0x20(%rax) movq %r14, 0x18(%rax) movq %rbx, 0x10(%rax) movq %r11, 0x8(%rax) movq %r10, (%rax) movq $0x0, 0x70(%rax) movq $0x0, 0x68(%rax) movq $0x0, 0x60(%rax) movq $0x0, 0x58(%rax) movq $0x0, 0x50(%rax) movq $0x0, 0x48(%rax) movq $0x0, 0x40(%rax) movq $0x0, 0x38(%rax) movq $0x0, 0x30(%rax) movq $0x0, 0x28(%rax) andl $0x1, %esi callq 0x153b30 jmp 0x154e99 addq $0xe8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq -0x80(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) callq 0xc3ab0 movq -0x88(%rbp), %rdi callq 0xca800 movq -0x70(%rbp), %rdi callq 0xca800 movq -0x78(%rbp), %rdi callq 0xca800 movq -0x58(%rbp), %rdi callq 0xd58b0 nopw %cs:(%rax,%rax) nopl (%rax)
_ZN10OpenSubdiv6v3_6_03Far16StencilTableRealIfEC2EiRKSt6vectorIiSaIiEES8_S8_RKS4_IfSaIfEEbm: push rbp; Alternative name is 'OpenSubdiv::v3_6_0::Far::StencilTableReal<float>::StencilTableReal(int, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::vector const&<float, std::allocator<float>>, bool, unsigned long)' mov rbp, rsp push r15 push r14 push rbx sub rsp, 0E8h mov rax, [rbp+arg_8] mov al, [rbp+arg_0] mov [rbp+var_20], rdi mov [rbp+var_24], esi mov [rbp+var_30], rdx mov [rbp+var_38], rcx mov [rbp+var_40], r8 mov [rbp+var_48], r9 and al, 1 mov [rbp+var_49], al mov r15, [rbp+var_20] mov rax, cs:_ZTVN10OpenSubdiv6v3_6_03Far16StencilTableRealIfEE_ptr add rax, 10h mov [r15], rax mov eax, [rbp+var_24] mov [r15+8], eax mov rdi, r15 add rdi, 10h mov [rbp+var_78], rdi call __ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void) mov rdi, r15 add rdi, 28h ; '(' mov [rbp+var_70], rdi call __ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void) mov rbx, r15 add rbx, 40h ; '@' mov [rbp+var_88], rbx mov rdi, rbx call __ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void) add r15, 58h ; 'X' mov [rbp+var_80], r15 mov rdi, r15 call __ZNSt6vectorIfSaIfEEC2Ev; std::vector<float>::vector(void) mov r10, [rbp+var_78] mov r8, [rbp+var_70] mov edi, [rbp+var_24] mov rdx, [rbp+arg_8] mov rcx, [rbp+var_30] mov r9, [rbp+var_38] mov r11, [rbp+var_40] mov r14, [rbp+var_48] movzx esi, [rbp+var_49] mov rax, rsp mov [rbp+var_68], rax mov [rax+20h], r15 mov [rax+18h], r14 mov [rax+10h], rbx mov [rax+8], r11 mov [rax], r10 mov qword ptr [rax+70h], 0 mov qword ptr [rax+68h], 0 mov qword ptr [rax+60h], 0 mov qword ptr [rax+58h], 0 mov qword ptr [rax+50h], 0 mov qword ptr [rax+48h], 0 mov qword ptr [rax+40h], 0 mov qword ptr [rax+38h], 0 mov qword ptr [rax+30h], 0 mov qword ptr [rax+28h], 0 and esi, 1 call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115copyStencilDataIfEEvibmPKSt6vectorIiSaIiEEPS6_S8_S9_S8_S9_PKS4_IT_SaISA_EEPSC_SE_SF_SE_SF_SE_SF_SE_SF_SE_SF_; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::copyStencilData<float>(int,bool,ulong,std::vector<int> const*,std::vector<int>*,std::vector<int> const*,std::vector<int>*,std::vector<int> const*,std::vector<int>*,std::vector const*<float,std::allocator<std::vector const>>,float*,std::vector const*<float,std::allocator<std::vector const>>,float*,std::vector const*<float,std::allocator<std::vector const>>,float*,std::vector const*<float,std::allocator<std::vector const>>,float*,std::vector const*<float,std::allocator<std::vector const>>,float*,std::vector const*<float,std::allocator<std::vector const>>,float*) jmp short $+2 loc_154E99: add rsp, 0E8h pop rbx pop r14 pop r15 pop rbp retn mov rdi, [rbp+var_80] mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax call __ZNSt6vectorIfSaIfEED2Ev; std::vector<float>::~vector() mov rdi, [rbp+var_88] call __ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector() mov rdi, [rbp+var_70] call __ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector() mov rdi, [rbp+var_78] call __ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector() mov rdi, [rbp+var_58] call __Unwind_Resume
long long OpenSubdiv::v3_6_0::Far::StencilTableReal<float>::StencilTableReal( long long a1, int a2, long long a3, long long a4, long long a5, long long a6, char a7, unsigned long long a8) { _QWORD v9[20]; // [rsp+0h] [rbp-100h] BYREF char v10; // [rsp+B7h] [rbp-49h] long long v11; // [rsp+B8h] [rbp-48h] long long v12; // [rsp+C0h] [rbp-40h] long long v13; // [rsp+C8h] [rbp-38h] long long v14; // [rsp+D0h] [rbp-30h] int v15; // [rsp+DCh] [rbp-24h] long long v16; // [rsp+E0h] [rbp-20h] v16 = a1; v15 = a2; v14 = a3; v13 = a4; v12 = a5; v11 = a6; v10 = a7 & 1; *(_QWORD *)a1 = &`vtable for'OpenSubdiv::v3_6_0::Far::StencilTableReal<float> + 2; *(_DWORD *)(a1 + 8) = v15; std::vector<int>::vector(a1 + 16); std::vector<int>::vector(a1 + 40); std::vector<int>::vector(a1 + 64); std::vector<float>::vector(a1 + 88); v9[19] = v9; return OpenSubdiv::v3_6_0::Far::`anonymous namespace'::copyStencilData<float>( v15, v10 & 1, a8, v14, a1 + 40, v13, a1 + 16, v12, a1 + 64, v11, a1 + 88, 0LL, 0LL, 0LL, 0LL, 0LL, 0LL, 0LL, 0LL, 0LL, 0LL); }
21,753
OpenSubdiv::v3_6_0::Far::StencilTableReal<float>::StencilTableReal(int, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::vector<float, std::allocator<float>> const&, bool, unsigned long)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/stencilTable.cpp
StencilTableReal<REAL>::StencilTableReal(int numControlVerts, std::vector<int> const& offsets, std::vector<int> const& sizes, std::vector<int> const& sources, std::vector<REAL> const& weights, bool includeCoarseVerts, size_t firstOffset) : _numControlVertices(numControlVerts) { copyStencilData(numControlVerts, includeCoarseVerts, firstOffset, &offsets, &_offsets, &sizes, &_sizes, &sources, &_indices, &weights, &_weights); }
O1
cpp
OpenSubdiv::v3_6_0::Far::StencilTableReal<float>::StencilTableReal(int, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::vector<float, std::allocator<float>> const&, bool, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rcx, %rax movq %rdx, %rcx movl %esi, %r10d movq %rdi, %rbx movq 0xb8(%rsp), %rdx movb 0xb0(%rsp), %sil movq 0x6c277(%rip), %rdi # 0xdde90 addq $0x10, %rdi movq %rdi, (%rbx) movl %r10d, 0x8(%rbx) leaq 0x10(%rbx), %r14 leaq 0x28(%rbx), %r15 leaq 0x40(%rbx), %r12 leaq 0x58(%rbx), %rbp xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x30(%rbx) movups %xmm0, 0x40(%rbx) movups %xmm0, 0x50(%rbx) movups %xmm0, 0x60(%rbx) movups %xmm0, 0x68(%rsp) movups %xmm0, 0x58(%rsp) movups %xmm0, 0x48(%rsp) movups %xmm0, 0x38(%rsp) movups %xmm0, 0x28(%rsp) movq %rbp, 0x20(%rsp) movq %r9, 0x18(%rsp) movq %r12, 0x10(%rsp) movq %r8, 0x8(%rsp) movq %r14, (%rsp) movzbl %sil, %esi movl %r10d, %edi movq %r15, %r8 movq %rax, %r9 callq 0x710cd addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r13 movq (%rbp), %rdi testq %rdi, %rdi je 0x71cb9 movq 0x68(%rbx), %rsi subq %rdi, %rsi callq 0x3a2d0 movq %r12, %rdi movq %r15, %rsi movq %r14, %rdx movq %rbx, %rcx callq 0x3cb5d movq %r13, %rdi callq 0x3bd70
_ZN10OpenSubdiv6v3_6_03Far16StencilTableRealIdEC2EiRKSt6vectorIiSaIiEES8_S8_RKS4_IdSaIdEEbm: push rbp; Alternative name is 'OpenSubdiv::v3_6_0::Far::StencilTableReal<double>::StencilTableReal(int, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::vector const&<double, std::allocator<double>>, bool, unsigned long)' push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov rax, rcx mov rcx, rdx mov r10d, esi mov rbx, rdi mov rdx, [rsp+0A8h+arg_8] mov sil, [rsp+0A8h+arg_0] mov rdi, cs:_ZTVN10OpenSubdiv6v3_6_03Far16StencilTableRealIdEE_ptr add rdi, 10h mov [rbx], rdi mov [rbx+8], r10d lea r14, [rbx+10h] lea r15, [rbx+28h] lea r12, [rbx+40h] lea rbp, [rbx+58h] xorps xmm0, xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+30h], xmm0 movups xmmword ptr [rbx+40h], xmm0 movups xmmword ptr [rbx+50h], xmm0 movups xmmword ptr [rbx+60h], xmm0 movups [rsp+0A8h+var_40], xmm0 movups [rsp+0A8h+var_50], xmm0 movups [rsp+0A8h+var_60], xmm0 movups [rsp+0A8h+var_70], xmm0 movups [rsp+0A8h+var_80], xmm0 mov [rsp+0A8h+var_88], rbp mov [rsp+0A8h+var_90], r9 mov [rsp+0A8h+var_98], r12 mov [rsp+0A8h+var_A0], r8 mov [rsp+0A8h+var_A8], r14 movzx esi, sil mov edi, r10d mov r8, r15 mov r9, rax call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115copyStencilDataIdEEvibmPKSt6vectorIiSaIiEEPS6_S8_S9_S8_S9_PKS4_IT_SaISA_EEPSC_SE_SF_SE_SF_SE_SF_SE_SF_SE_SF_; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::copyStencilData<double>(int,bool,ulong,std::vector<int> const*,std::vector<int>*,std::vector<int> const*,std::vector<int>*,std::vector<int> const*,std::vector<int>*,std::vector const*<double,std::allocator<std::vector const>>,double*,std::vector const*<double,std::allocator<std::vector const>>,double*,std::vector const*<double,std::allocator<std::vector const>>,double*,std::vector const*<double,std::allocator<std::vector const>>,double*,std::vector const*<double,std::allocator<std::vector const>>,double*,std::vector const*<double,std::allocator<std::vector const>>,double*) add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r13, rax mov rdi, [rbp+0]; void * test rdi, rdi jz short loc_71CB9 mov rsi, [rbx+68h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_71CB9: mov rdi, r12 mov rsi, r15 mov rdx, r14 mov rcx, rbx call _ZN10OpenSubdiv6v3_6_03Far16StencilTableRealIdEC2EiRKSt6vectorIiSaIiEES8_S8_RKS4_IdSaIdEEbm_cold_1; OpenSubdiv::v3_6_0::Far::StencilTableReal<double>::StencilTableReal(int,std::vector<int> const&,std::vector<int> const&,std::vector<int> const&,std::vector const&<double,std::allocator<double>>,bool,ulong) [clone] mov rdi, r13 call __Unwind_Resume
long long OpenSubdiv::v3_6_0::Far::StencilTableReal<double>::StencilTableReal( long long a1, int a2, long long *a3, long long *a4, _QWORD *a5, _QWORD *a6, unsigned __int8 a7, unsigned long long a8) { *(_QWORD *)a1 = &`vtable for'OpenSubdiv::v3_6_0::Far::StencilTableReal<double> + 2; *(_DWORD *)(a1 + 8) = a2; *(_OWORD *)(a1 + 16) = 0LL; *(_OWORD *)(a1 + 32) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_OWORD *)(a1 + 64) = 0LL; *(_OWORD *)(a1 + 80) = 0LL; *(_OWORD *)(a1 + 96) = 0LL; return OpenSubdiv::v3_6_0::Far::`anonymous namespace'::copyStencilData<double>( a2, a7, a8, a3, (_QWORD *)(a1 + 40), a4, (_QWORD *)(a1 + 16), a5, (_QWORD *)(a1 + 64), a6, (_QWORD *)(a1 + 88), 0LL, 0LL, 0LL, 0LL, 0LL, 0LL, 0LL, 0LL, 0LL, 0LL); }
StencilTableReal: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV RAX,RCX MOV RCX,RDX MOV R10D,ESI MOV RBX,RDI MOV RDX,qword ptr [RSP + 0xb8] MOV SIL,byte ptr [RSP + 0xb0] MOV RDI,qword ptr [0x001dde90] ADD RDI,0x10 MOV qword ptr [RBX],RDI MOV dword ptr [RBX + 0x8],R10D LEA R14,[RBX + 0x10] LEA R15,[RBX + 0x28] LEA R12,[RBX + 0x40] LEA RBP,[RBX + 0x58] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOVUPS xmmword ptr [RBX + 0x40],XMM0 MOVUPS xmmword ptr [RBX + 0x50],XMM0 MOVUPS xmmword ptr [RBX + 0x60],XMM0 LAB_00171c4f: MOVUPS xmmword ptr [RSP + 0x68],XMM0 MOVUPS xmmword ptr [RSP + 0x58],XMM0 MOVUPS xmmword ptr [RSP + 0x48],XMM0 MOVUPS xmmword ptr [RSP + 0x38],XMM0 MOVUPS xmmword ptr [RSP + 0x28],XMM0 MOV qword ptr [RSP + 0x20],RBP MOV qword ptr [RSP + 0x18],R9 MOV qword ptr [RSP + 0x10],R12 MOV qword ptr [RSP + 0x8],R8 MOV qword ptr [RSP],R14 MOVZX ESI,SIL MOV EDI,R10D MOV R8,R15 MOV R9,RAX CALL 0x001710cd LAB_00171c92: ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Far::StencilTableReal<double>::StencilTableReal(int, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, bool, unsigned long) */ void __thiscall OpenSubdiv::v3_6_0::Far::StencilTableReal<double>::StencilTableReal (StencilTableReal<double> *this,int param_1,vector *param_2,vector *param_3, vector *param_4,vector *param_5,bool param_6,ulong param_7) { *(int **)this = PTR_vtable_001dde90 + 0x10; *(int *)(this + 8) = param_1; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x50) = 0; *(int8 *)(this + 0x58) = 0; *(int8 *)(this + 0x60) = 0; *(int8 *)(this + 0x68) = 0; /* try { // try from 00171c4f to 00171c91 has its CatchHandler @ 00171ca1 */ (anonymous_namespace)::copyStencilData<double> (param_1,param_6,param_7,param_2,(vector *)(this + 0x28),param_3,(vector *)(this + 0x10) ,param_4,(vector *)(this + 0x40),param_5,(vector *)(this + 0x58),(vector *)0x0, (vector *)0x0,(vector *)0x0,(vector *)0x0,(vector *)0x0,(vector *)0x0,(vector *)0x0, (vector *)0x0,(vector *)0x0,(vector *)0x0); return; }
21,754
OpenSubdiv::v3_6_0::Far::StencilTableReal<float>::StencilTableReal(int, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::vector<float, std::allocator<float>> const&, bool, unsigned long)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/stencilTable.cpp
StencilTableReal<REAL>::StencilTableReal(int numControlVerts, std::vector<int> const& offsets, std::vector<int> const& sizes, std::vector<int> const& sources, std::vector<REAL> const& weights, bool includeCoarseVerts, size_t firstOffset) : _numControlVertices(numControlVerts) { copyStencilData(numControlVerts, includeCoarseVerts, firstOffset, &offsets, &_offsets, &sizes, &_sizes, &sources, &_indices, &weights, &_weights); }
O2
cpp
OpenSubdiv::v3_6_0::Far::StencilTableReal<float>::StencilTableReal(int, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::vector<float, std::allocator<float>> const&, bool, unsigned long): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x80, %rsp movq %rcx, %rax movq %rdx, %rcx movl %esi, %r10d movq 0xb8(%rsp), %rdx movb 0xb0(%rsp), %sil movq 0x6d98c(%rip), %r11 # 0xf0e98 addq $0x10, %r11 movq %r11, (%rdi) movl %r10d, 0x8(%rdi) leaq 0x10(%rdi), %rbx leaq 0x28(%rdi), %r14 leaq 0x40(%rdi), %r15 leaq 0x58(%rdi), %r12 xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rdi) movups %xmm0, 0x20(%rdi) movups %xmm0, 0x30(%rdi) movups %xmm0, 0x40(%rdi) movups %xmm0, 0x50(%rdi) movups %xmm0, 0x60(%rdi) movups %xmm0, 0x68(%rsp) movups %xmm0, 0x58(%rsp) movups %xmm0, 0x48(%rsp) movups %xmm0, 0x38(%rsp) movups %xmm0, 0x28(%rsp) movq %r12, 0x20(%rsp) movq %r9, 0x18(%rsp) movq %r15, 0x10(%rsp) movq %r8, 0x8(%rsp) movq %rbx, (%rsp) movzbl %sil, %esi movl %r10d, %edi movq %r14, %r8 movq %rax, %r9 callq 0x82b75 addq $0x80, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r13 movq %r12, %rdi callq 0x55000 movq %r15, %rdi callq 0x52f00 movq %r14, %rdi callq 0x52f00 movq %rbx, %rdi callq 0x52f00 movq %r13, %rdi callq 0x55300 nop
_ZN10OpenSubdiv6v3_6_03Far16StencilTableRealIdEC2EiRKSt6vectorIiSaIiEES8_S8_RKS4_IdSaIdEEbm: push r15; Alternative name is 'OpenSubdiv::v3_6_0::Far::StencilTableReal<double>::StencilTableReal(int, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::vector const&<double, std::allocator<double>>, bool, unsigned long)' push r14 push r13 push r12 push rbx sub rsp, 80h mov rax, rcx mov rcx, rdx mov r10d, esi mov rdx, [rsp+0A8h+arg_8] mov sil, [rsp+0A8h+arg_0] mov r11, cs:_ZTVN10OpenSubdiv6v3_6_03Far16StencilTableRealIdEE_ptr add r11, 10h mov [rdi], r11 mov [rdi+8], r10d lea rbx, [rdi+10h] lea r14, [rdi+28h] lea r15, [rdi+40h] lea r12, [rdi+58h] xorps xmm0, xmm0 movups xmmword ptr [rdi+10h], xmm0 movups xmmword ptr [rdi+20h], xmm0 movups xmmword ptr [rdi+30h], xmm0 movups xmmword ptr [rdi+40h], xmm0 movups xmmword ptr [rdi+50h], xmm0 movups xmmword ptr [rdi+60h], xmm0 movups [rsp+0A8h+var_40], xmm0 movups [rsp+0A8h+var_50], xmm0 movups [rsp+0A8h+var_60], xmm0 movups [rsp+0A8h+var_70], xmm0 movups [rsp+0A8h+var_80], xmm0 mov [rsp+0A8h+var_88], r12 mov [rsp+0A8h+var_90], r9 mov [rsp+0A8h+var_98], r15 mov [rsp+0A8h+var_A0], r8 mov [rsp+0A8h+var_A8], rbx movzx esi, sil mov edi, r10d mov r8, r14 mov r9, rax call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115copyStencilDataIdEEvibmPKSt6vectorIiSaIiEEPS6_S8_S9_S8_S9_PKS4_IT_SaISA_EEPSC_SE_SF_SE_SF_SE_SF_SE_SF_SE_SF_; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::copyStencilData<double>(int,bool,ulong,std::vector<int> const*,std::vector<int>*,std::vector<int> const*,std::vector<int>*,std::vector<int> const*,std::vector<int>*,std::vector const*<double,std::allocator<std::vector const>>,double*,std::vector const*<double,std::allocator<std::vector const>>,double*,std::vector const*<double,std::allocator<std::vector const>>,double*,std::vector const*<double,std::allocator<std::vector const>>,double*,std::vector const*<double,std::allocator<std::vector const>>,double*,std::vector const*<double,std::allocator<std::vector const>>,double*) add rsp, 80h pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r13, rax mov rdi, r12 call __ZNSt12_Vector_baseIdSaIdEED2Ev; std::_Vector_base<double>::~_Vector_base() mov rdi, r15 call __ZNSt12_Vector_baseIiSaIiEED2Ev; std::_Vector_base<int>::~_Vector_base() mov rdi, r14 call __ZNSt12_Vector_baseIiSaIiEED2Ev; std::_Vector_base<int>::~_Vector_base() mov rdi, rbx call __ZNSt12_Vector_baseIiSaIiEED2Ev; std::_Vector_base<int>::~_Vector_base() mov rdi, r13 call __Unwind_Resume
long long OpenSubdiv::v3_6_0::Far::StencilTableReal<double>::StencilTableReal( long long a1, int a2, _QWORD *a3, long long *a4, _QWORD *a5, _QWORD *a6, unsigned __int8 a7, unsigned long long a8) { *(_QWORD *)a1 = &`vtable for'OpenSubdiv::v3_6_0::Far::StencilTableReal<double> + 2; *(_DWORD *)(a1 + 8) = a2; *(_OWORD *)(a1 + 16) = 0LL; *(_OWORD *)(a1 + 32) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_OWORD *)(a1 + 64) = 0LL; *(_OWORD *)(a1 + 80) = 0LL; *(_OWORD *)(a1 + 96) = 0LL; return OpenSubdiv::v3_6_0::Far::`anonymous namespace'::copyStencilData<double>( a2, a7, a8, a3, (_QWORD *)(a1 + 40), a4, (_QWORD *)(a1 + 16), a5, (_QWORD *)(a1 + 64), a6, (_QWORD *)(a1 + 88), 0LL, 0LL, 0LL, 0LL, 0LL, 0LL, 0LL, 0LL, 0LL, 0LL); }
StencilTableReal: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x80 MOV RAX,RCX MOV RCX,RDX MOV R10D,ESI MOV RDX,qword ptr [RSP + 0xb8] MOV SIL,byte ptr [RSP + 0xb0] MOV R11,qword ptr [0x001f0e98] ADD R11,0x10 MOV qword ptr [RDI],R11 MOV dword ptr [RDI + 0x8],R10D LEA RBX,[RDI + 0x10] LEA R14,[RDI + 0x28] LEA R15,[RDI + 0x40] LEA R12,[RDI + 0x58] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOVUPS xmmword ptr [RDI + 0x20],XMM0 MOVUPS xmmword ptr [RDI + 0x30],XMM0 MOVUPS xmmword ptr [RDI + 0x40],XMM0 MOVUPS xmmword ptr [RDI + 0x50],XMM0 MOVUPS xmmword ptr [RDI + 0x60],XMM0 LAB_00183542: MOVUPS xmmword ptr [RSP + 0x68],XMM0 MOVUPS xmmword ptr [RSP + 0x58],XMM0 MOVUPS xmmword ptr [RSP + 0x48],XMM0 MOVUPS xmmword ptr [RSP + 0x38],XMM0 MOVUPS xmmword ptr [RSP + 0x28],XMM0 MOV qword ptr [RSP + 0x20],R12 MOV qword ptr [RSP + 0x18],R9 MOV qword ptr [RSP + 0x10],R15 MOV qword ptr [RSP + 0x8],R8 MOV qword ptr [RSP],RBX MOVZX ESI,SIL MOV EDI,R10D MOV R8,R14 MOV R9,RAX CALL 0x00182b75 LAB_00183585: ADD RSP,0x80 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* OpenSubdiv::v3_6_0::Far::StencilTableReal<double>::StencilTableReal(int, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, bool, unsigned long) */ void __thiscall OpenSubdiv::v3_6_0::Far::StencilTableReal<double>::StencilTableReal (StencilTableReal<double> *this,int param_1,vector *param_2,vector *param_3, vector *param_4,vector *param_5,bool param_6,ulong param_7) { *(int **)this = PTR_vtable_001f0e98 + 0x10; *(int *)(this + 8) = param_1; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x50) = 0; *(int8 *)(this + 0x58) = 0; *(int8 *)(this + 0x60) = 0; *(int8 *)(this + 0x68) = 0; /* try { // try from 00183542 to 00183584 has its CatchHandler @ 00183596 */ (anonymous_namespace)::copyStencilData<double> (param_1,param_6,param_7,param_2,(vector *)(this + 0x28),param_3,(vector *)(this + 0x10) ,param_4,(vector *)(this + 0x40),param_5,(vector *)(this + 0x58),(vector *)0x0, (vector *)0x0,(vector *)0x0,(vector *)0x0,(vector *)0x0,(vector *)0x0,(vector *)0x0, (vector *)0x0,(vector *)0x0,(vector *)0x0); return; }
21,755
OpenSubdiv::v3_6_0::Far::StencilTableReal<float>::StencilTableReal(int, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::vector<float, std::allocator<float>> const&, bool, unsigned long)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/stencilTable.cpp
StencilTableReal<REAL>::StencilTableReal(int numControlVerts, std::vector<int> const& offsets, std::vector<int> const& sizes, std::vector<int> const& sources, std::vector<REAL> const& weights, bool includeCoarseVerts, size_t firstOffset) : _numControlVertices(numControlVerts) { copyStencilData(numControlVerts, includeCoarseVerts, firstOffset, &offsets, &_offsets, &sizes, &_sizes, &sources, &_indices, &weights, &_weights); }
O3
cpp
OpenSubdiv::v3_6_0::Far::StencilTableReal<float>::StencilTableReal(int, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::vector<float, std::allocator<float>> const&, bool, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rcx, %rax movq %rdx, %rcx movl %esi, %r10d movq %rdi, %rbx movq 0xb8(%rsp), %rdx movb 0xb0(%rsp), %sil movq 0x6ec8f(%rip), %rdi # 0xe1e98 addq $0x10, %rdi movq %rdi, (%rbx) movl %r10d, 0x8(%rbx) leaq 0x10(%rbx), %r14 leaq 0x28(%rbx), %r15 leaq 0x40(%rbx), %r12 leaq 0x58(%rbx), %rbp xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x30(%rbx) movups %xmm0, 0x40(%rbx) movups %xmm0, 0x50(%rbx) movups %xmm0, 0x60(%rbx) movups %xmm0, 0x68(%rsp) movups %xmm0, 0x58(%rsp) movups %xmm0, 0x48(%rsp) movups %xmm0, 0x38(%rsp) movups %xmm0, 0x28(%rsp) movq %rbp, 0x20(%rsp) movq %r9, 0x18(%rsp) movq %r12, 0x10(%rsp) movq %r8, 0x8(%rsp) movq %r14, (%rsp) movzbl %sil, %esi movl %r10d, %edi movq %r15, %r8 movq %rax, %r9 callq 0x726cd addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r13 movq (%rbp), %rdi testq %rdi, %rdi je 0x732a9 movq 0x68(%rbx), %rsi subq %rdi, %rsi callq 0x3a2b0 movq %r12, %rdi movq %r15, %rsi movq %r14, %rdx movq %rbx, %rcx callq 0x3cb0d movq %r13, %rdi callq 0x3bd30
_ZN10OpenSubdiv6v3_6_03Far16StencilTableRealIdEC2EiRKSt6vectorIiSaIiEES8_S8_RKS4_IdSaIdEEbm: push rbp; Alternative name is 'OpenSubdiv::v3_6_0::Far::StencilTableReal<double>::StencilTableReal(int, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::vector const&<double, std::allocator<double>>, bool, unsigned long)' push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov rax, rcx mov rcx, rdx mov r10d, esi mov rbx, rdi mov rdx, [rsp+0A8h+arg_8] mov sil, [rsp+0A8h+arg_0] mov rdi, cs:_ZTVN10OpenSubdiv6v3_6_03Far16StencilTableRealIdEE_ptr add rdi, 10h mov [rbx], rdi mov [rbx+8], r10d lea r14, [rbx+10h] lea r15, [rbx+28h] lea r12, [rbx+40h] lea rbp, [rbx+58h] xorps xmm0, xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+30h], xmm0 movups xmmword ptr [rbx+40h], xmm0 movups xmmword ptr [rbx+50h], xmm0 movups xmmword ptr [rbx+60h], xmm0 movups [rsp+0A8h+var_40], xmm0 movups [rsp+0A8h+var_50], xmm0 movups [rsp+0A8h+var_60], xmm0 movups [rsp+0A8h+var_70], xmm0 movups [rsp+0A8h+var_80], xmm0 mov [rsp+0A8h+var_88], rbp mov [rsp+0A8h+var_90], r9 mov [rsp+0A8h+var_98], r12 mov [rsp+0A8h+var_A0], r8 mov [rsp+0A8h+var_A8], r14 movzx esi, sil mov edi, r10d mov r8, r15 mov r9, rax call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115copyStencilDataIdEEvibmPKSt6vectorIiSaIiEEPS6_S8_S9_S8_S9_PKS4_IT_SaISA_EEPSC_SE_SF_SE_SF_SE_SF_SE_SF_SE_SF_; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::copyStencilData<double>(int,bool,ulong,std::vector<int> const*,std::vector<int>*,std::vector<int> const*,std::vector<int>*,std::vector<int> const*,std::vector<int>*,std::vector const*<double,std::allocator<std::vector const>>,double*,std::vector const*<double,std::allocator<std::vector const>>,double*,std::vector const*<double,std::allocator<std::vector const>>,double*,std::vector const*<double,std::allocator<std::vector const>>,double*,std::vector const*<double,std::allocator<std::vector const>>,double*,std::vector const*<double,std::allocator<std::vector const>>,double*) add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r13, rax mov rdi, [rbp+0]; void * test rdi, rdi jz short loc_732A9 mov rsi, [rbx+68h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_732A9: mov rdi, r12 mov rsi, r15 mov rdx, r14 mov rcx, rbx call _ZN10OpenSubdiv6v3_6_03Far16StencilTableRealIdEC2EiRKSt6vectorIiSaIiEES8_S8_RKS4_IdSaIdEEbm_cold_1; OpenSubdiv::v3_6_0::Far::StencilTableReal<double>::StencilTableReal(int,std::vector<int> const&,std::vector<int> const&,std::vector<int> const&,std::vector const&<double,std::allocator<double>>,bool,ulong) [clone] mov rdi, r13 call __Unwind_Resume
long long OpenSubdiv::v3_6_0::Far::StencilTableReal<double>::StencilTableReal( long long a1, int a2, long long *a3, long long *a4, _QWORD *a5, _QWORD *a6, unsigned __int8 a7, unsigned long long a8) { *(_QWORD *)a1 = &`vtable for'OpenSubdiv::v3_6_0::Far::StencilTableReal<double> + 2; *(_DWORD *)(a1 + 8) = a2; *(_OWORD *)(a1 + 16) = 0LL; *(_OWORD *)(a1 + 32) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_OWORD *)(a1 + 64) = 0LL; *(_OWORD *)(a1 + 80) = 0LL; *(_OWORD *)(a1 + 96) = 0LL; return OpenSubdiv::v3_6_0::Far::`anonymous namespace'::copyStencilData<double>( a2, a7, a8, a3, (_QWORD *)(a1 + 40), a4, (_QWORD *)(a1 + 16), a5, (_QWORD *)(a1 + 64), a6, (_QWORD *)(a1 + 88), 0LL, 0LL, 0LL, 0LL, 0LL, 0LL, 0LL, 0LL, 0LL, 0LL); }
StencilTableReal: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV RAX,RCX MOV RCX,RDX MOV R10D,ESI MOV RBX,RDI MOV RDX,qword ptr [RSP + 0xb8] MOV SIL,byte ptr [RSP + 0xb0] MOV RDI,qword ptr [0x001e1e98] ADD RDI,0x10 MOV qword ptr [RBX],RDI MOV dword ptr [RBX + 0x8],R10D LEA R14,[RBX + 0x10] LEA R15,[RBX + 0x28] LEA R12,[RBX + 0x40] LEA RBP,[RBX + 0x58] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOVUPS xmmword ptr [RBX + 0x40],XMM0 MOVUPS xmmword ptr [RBX + 0x50],XMM0 MOVUPS xmmword ptr [RBX + 0x60],XMM0 LAB_0017323f: MOVUPS xmmword ptr [RSP + 0x68],XMM0 MOVUPS xmmword ptr [RSP + 0x58],XMM0 MOVUPS xmmword ptr [RSP + 0x48],XMM0 MOVUPS xmmword ptr [RSP + 0x38],XMM0 MOVUPS xmmword ptr [RSP + 0x28],XMM0 MOV qword ptr [RSP + 0x20],RBP MOV qword ptr [RSP + 0x18],R9 MOV qword ptr [RSP + 0x10],R12 MOV qword ptr [RSP + 0x8],R8 MOV qword ptr [RSP],R14 MOVZX ESI,SIL MOV EDI,R10D MOV R8,R15 MOV R9,RAX CALL 0x001726cd LAB_00173282: ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Far::StencilTableReal<double>::StencilTableReal(int, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, bool, unsigned long) */ void __thiscall OpenSubdiv::v3_6_0::Far::StencilTableReal<double>::StencilTableReal (StencilTableReal<double> *this,int param_1,vector *param_2,vector *param_3, vector *param_4,vector *param_5,bool param_6,ulong param_7) { *(int **)this = PTR_vtable_001e1e98 + 0x10; *(int *)(this + 8) = param_1; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x50) = 0; *(int8 *)(this + 0x58) = 0; *(int8 *)(this + 0x60) = 0; *(int8 *)(this + 0x68) = 0; /* try { // try from 0017323f to 00173281 has its CatchHandler @ 00173291 */ (anonymous_namespace)::copyStencilData<double> (param_1,param_6,param_7,param_2,(vector *)(this + 0x28),param_3,(vector *)(this + 0x10) ,param_4,(vector *)(this + 0x40),param_5,(vector *)(this + 0x58),(vector *)0x0, (vector *)0x0,(vector *)0x0,(vector *)0x0,(vector *)0x0,(vector *)0x0,(vector *)0x0, (vector *)0x0,(vector *)0x0,(vector *)0x0); return; }
21,756
my_thread_end
eloqsql/mysys/my_thr_init.c
void my_thread_end(void) { struct st_my_thread_var *tmp; tmp= my_thread_var; #ifdef EXTRA_DEBUG_THREADS fprintf(stderr,"my_thread_end(): tmp: %p pthread_self: %p thread_id: %ld\n", tmp, pthread_self(), tmp ? (long) tmp->id : 0L); #endif /* Remove the instrumentation for this thread. This must be done before trashing st_my_thread_var, because the LF_HASH depends on it. */ PSI_CALL_delete_current_thread(); /* We need to disable DBUG early for this thread to ensure that the the mutex calls doesn't enable it again To this we have to both do DBUG_POP() and also reset THR_KEY_mysys as the key is used by DBUG. */ DBUG_POP(); set_mysys_var(NULL); if (tmp && tmp->init) { #if !defined(DBUG_OFF) /* tmp->dbug is allocated inside DBUG library */ if (tmp->dbug) { free(tmp->dbug); tmp->dbug=0; } #endif my_thread_destory_thr_mutex(tmp); /* Decrement counter for number of running threads. We are using this in my_thread_global_end() to wait until all threads have called my_thread_end and thus freed all memory they have allocated in my_thread_init() and DBUG_xxxx */ mysql_mutex_lock(&THR_LOCK_threads); DBUG_ASSERT(THR_thread_count != 0); if (--THR_thread_count == 0) mysql_cond_signal(&THR_COND_threads); mysql_mutex_unlock(&THR_LOCK_threads); /* Trash variable so that we can detect false accesses to my_thread_var */ tmp->init= 2; free(tmp); } }
O3
c
my_thread_end: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax leaq 0xb66f83(%rip), %r15 # 0xc089f4 movl (%r15), %edi callq 0x29860 movq %rax, %rbx leaq 0x2e458d(%rip), %r14 # 0x386010 movq (%r14), %rax callq *0x138(%rax) movl (%r15), %edi xorl %esi, %esi callq 0x29310 testq %rbx, %rbx je 0xa1b14 cmpb $0x0, 0xe8(%rbx) je 0xa1b14 movq %rbx, %rdi callq 0xa1685 leaq 0xb66e75(%rip), %r15 # 0xc08928 cmpq $0x0, 0x40(%r15) jne 0xa1b1f leaq 0xb66e67(%rip), %rdi # 0xc08928 callq 0x29220 leaq 0xb66c5b(%rip), %rax # 0xc08728 decl (%rax) jne 0xa1aed leaq 0xb66ee0(%rip), %rax # 0xc089b8 movq 0x30(%rax), %rdi testq %rdi, %rdi jne 0xa1b31 leaq 0xb66ed0(%rip), %rdi # 0xc089b8 callq 0x295c0 movq 0x40(%r15), %rdi testq %rdi, %rdi jne 0xa1b26 leaq 0xb66e2b(%rip), %rdi # 0xc08928 callq 0x291e0 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x29160 addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x2efe7 jmp 0xa1ac6 movq (%r14), %rax callq *0x160(%rax) jmp 0xa1af6 movq (%r14), %rax callq *0x170(%rax) jmp 0xa1ae1
my_thread_end: push rbp mov rbp, rsp push r15 push r14 push rbx push rax lea r15, THR_KEY_mysys mov edi, [r15] call _pthread_getspecific mov rbx, rax lea r14, PSI_server mov rax, [r14] call qword ptr [rax+138h] mov edi, [r15] xor esi, esi call _pthread_setspecific test rbx, rbx jz short loc_A1B14 cmp byte ptr [rbx+0E8h], 0 jz short loc_A1B14 mov rdi, rbx call my_thread_destory_thr_mutex lea r15, THR_LOCK_threads cmp qword ptr [r15+40h], 0 jnz short loc_A1B1F lea rdi, THR_LOCK_threads call _pthread_mutex_lock loc_A1AC6: lea rax, THR_thread_count dec dword ptr [rax] jnz short loc_A1AED lea rax, THR_COND_threads mov rdi, [rax+30h] test rdi, rdi jnz short loc_A1B31 loc_A1AE1: lea rdi, THR_COND_threads call _pthread_cond_signal loc_A1AED: mov rdi, [r15+40h] test rdi, rdi jnz short loc_A1B26 loc_A1AF6: lea rdi, THR_LOCK_threads call _pthread_mutex_unlock mov rdi, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _free loc_A1B14: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_A1B1F: call my_thread_end_cold_1 jmp short loc_A1AC6 loc_A1B26: mov rax, [r14] call qword ptr [rax+160h] jmp short loc_A1AF6 loc_A1B31: mov rax, [r14] call qword ptr [rax+170h] jmp short loc_A1AE1
long long my_thread_end() { long long v0; // rdi long long v1; // rbx long long result; // rax long long v3; // rdi long long v4; // rdi v0 = THR_KEY_mysys; v1 = pthread_getspecific(THR_KEY_mysys); ((void ( *)(long long))PSI_server[39])(v0); result = pthread_setspecific(THR_KEY_mysys, 0LL); if ( v1 && *(_BYTE *)(v1 + 232) ) { my_thread_destory_thr_mutex(v1); if ( THR_LOCK_threads[8] ) my_thread_end_cold_1(v1); else pthread_mutex_lock(THR_LOCK_threads); if ( !--THR_thread_count ) { v3 = THR_COND_threads[6]; if ( v3 ) ((void ( *)(long long))PSI_server[46])(v3); pthread_cond_signal(THR_COND_threads); } v4 = THR_LOCK_threads[8]; if ( v4 ) ((void ( *)(long long))PSI_server[44])(v4); pthread_mutex_unlock(THR_LOCK_threads); return free(v1); } return result; }
my_thread_end: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX LEA R15,[0xd089f4] MOV EDI,dword ptr [R15] CALL 0x00129860 MOV RBX,RAX LEA R14,[0x486010] MOV RAX,qword ptr [R14] CALL qword ptr [RAX + 0x138] MOV EDI,dword ptr [R15] XOR ESI,ESI CALL 0x00129310 TEST RBX,RBX JZ 0x001a1b14 CMP byte ptr [RBX + 0xe8],0x0 JZ 0x001a1b14 MOV RDI,RBX CALL 0x001a1685 LEA R15,[0xd08928] CMP qword ptr [R15 + 0x40],0x0 JNZ 0x001a1b1f LEA RDI,[0xd08928] CALL 0x00129220 LAB_001a1ac6: LEA RAX,[0xd08728] DEC dword ptr [RAX] JNZ 0x001a1aed LEA RAX,[0xd089b8] MOV RDI,qword ptr [RAX + 0x30] TEST RDI,RDI JNZ 0x001a1b31 LAB_001a1ae1: LEA RDI,[0xd089b8] CALL 0x001295c0 LAB_001a1aed: MOV RDI,qword ptr [R15 + 0x40] TEST RDI,RDI JNZ 0x001a1b26 LAB_001a1af6: LEA RDI,[0xd08928] CALL 0x001291e0 MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x00129160 LAB_001a1b14: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_001a1b1f: CALL 0x0012efe7 JMP 0x001a1ac6 LAB_001a1b26: MOV RAX,qword ptr [R14] CALL qword ptr [RAX + 0x160] JMP 0x001a1af6 LAB_001a1b31: MOV RAX,qword ptr [R14] CALL qword ptr [RAX + 0x170] JMP 0x001a1ae1
void my_thread_end(void) { void *__ptr; __ptr = pthread_getspecific(THR_KEY_mysys); (**(code **)(PSI_server + 0x138))(); pthread_setspecific(THR_KEY_mysys,(void *)0x0); if ((__ptr != (void *)0x0) && (*(char *)((long)__ptr + 0xe8) != '\0')) { my_thread_destory_thr_mutex(__ptr); if (THR_LOCK_threads._64_8_ == 0) { pthread_mutex_lock((pthread_mutex_t *)THR_LOCK_threads); } else { my_thread_end_cold_1(); } THR_thread_count = THR_thread_count + -1; if (THR_thread_count == 0) { if (THR_COND_threads._48_8_ != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal((pthread_cond_t *)THR_COND_threads); } if (THR_LOCK_threads._64_8_ != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)THR_LOCK_threads); free(__ptr); return; } return; }
21,757
stbi__resample_row_hv_2_simd
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h
static stbi_uc *stbi__resample_row_hv_2_simd(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) { // need to generate 2x2 samples for every one in input int i=0,t0,t1; if (w == 1) { out[0] = out[1] = stbi__div4(3*in_near[0] + in_far[0] + 2); return out; } t1 = 3*in_near[0] + in_far[0]; // process groups of 8 pixels for as long as we can. // note we can't handle the last pixel in a row in this loop // because we need to handle the filter boundary conditions. for (; i < ((w-1) & ~7); i += 8) { #if defined(STBI_SSE2) // load and perform the vertical filtering pass // this uses 3*x + y = 4*x + (y - x) __m128i zero = _mm_setzero_si128(); __m128i farb = _mm_loadl_epi64((__m128i *) (in_far + i)); __m128i nearb = _mm_loadl_epi64((__m128i *) (in_near + i)); __m128i farw = _mm_unpacklo_epi8(farb, zero); __m128i nearw = _mm_unpacklo_epi8(nearb, zero); __m128i diff = _mm_sub_epi16(farw, nearw); __m128i nears = _mm_slli_epi16(nearw, 2); __m128i curr = _mm_add_epi16(nears, diff); // current row // horizontal filter works the same based on shifted vers of current // row. "prev" is current row shifted right by 1 pixel; we need to // insert the previous pixel value (from t1). // "next" is current row shifted left by 1 pixel, with first pixel // of next block of 8 pixels added in. __m128i prv0 = _mm_slli_si128(curr, 2); __m128i nxt0 = _mm_srli_si128(curr, 2); __m128i prev = _mm_insert_epi16(prv0, t1, 0); __m128i next = _mm_insert_epi16(nxt0, 3*in_near[i+8] + in_far[i+8], 7); // horizontal filter, polyphase implementation since it's convenient: // even pixels = 3*cur + prev = cur*4 + (prev - cur) // odd pixels = 3*cur + next = cur*4 + (next - cur) // note the shared term. __m128i bias = _mm_set1_epi16(8); __m128i curs = _mm_slli_epi16(curr, 2); __m128i prvd = _mm_sub_epi16(prev, curr); __m128i nxtd = _mm_sub_epi16(next, curr); __m128i curb = _mm_add_epi16(curs, bias); __m128i even = _mm_add_epi16(prvd, curb); __m128i odd = _mm_add_epi16(nxtd, curb); // interleave even and odd pixels, then undo scaling. __m128i int0 = _mm_unpacklo_epi16(even, odd); __m128i int1 = _mm_unpackhi_epi16(even, odd); __m128i de0 = _mm_srli_epi16(int0, 4); __m128i de1 = _mm_srli_epi16(int1, 4); // pack and write output __m128i outv = _mm_packus_epi16(de0, de1); _mm_storeu_si128((__m128i *) (out + i*2), outv); #elif defined(STBI_NEON) // load and perform the vertical filtering pass // this uses 3*x + y = 4*x + (y - x) uint8x8_t farb = vld1_u8(in_far + i); uint8x8_t nearb = vld1_u8(in_near + i); int16x8_t diff = vreinterpretq_s16_u16(vsubl_u8(farb, nearb)); int16x8_t nears = vreinterpretq_s16_u16(vshll_n_u8(nearb, 2)); int16x8_t curr = vaddq_s16(nears, diff); // current row // horizontal filter works the same based on shifted vers of current // row. "prev" is current row shifted right by 1 pixel; we need to // insert the previous pixel value (from t1). // "next" is current row shifted left by 1 pixel, with first pixel // of next block of 8 pixels added in. int16x8_t prv0 = vextq_s16(curr, curr, 7); int16x8_t nxt0 = vextq_s16(curr, curr, 1); int16x8_t prev = vsetq_lane_s16(t1, prv0, 0); int16x8_t next = vsetq_lane_s16(3*in_near[i+8] + in_far[i+8], nxt0, 7); // horizontal filter, polyphase implementation since it's convenient: // even pixels = 3*cur + prev = cur*4 + (prev - cur) // odd pixels = 3*cur + next = cur*4 + (next - cur) // note the shared term. int16x8_t curs = vshlq_n_s16(curr, 2); int16x8_t prvd = vsubq_s16(prev, curr); int16x8_t nxtd = vsubq_s16(next, curr); int16x8_t even = vaddq_s16(curs, prvd); int16x8_t odd = vaddq_s16(curs, nxtd); // undo scaling and round, then store with even/odd phases interleaved uint8x8x2_t o; o.val[0] = vqrshrun_n_s16(even, 4); o.val[1] = vqrshrun_n_s16(odd, 4); vst2_u8(out + i*2, o); #endif // "previous" value for next iter t1 = 3*in_near[i+7] + in_far[i+7]; } t0 = t1; t1 = 3*in_near[i] + in_far[i]; out[i*2] = stbi__div16(3*t1 + t0 + 8); for (++i; i < w; ++i) { t0 = t1; t1 = 3*in_near[i]+in_far[i]; out[i*2-1] = stbi__div16(3*t0 + t1 + 8); out[i*2 ] = stbi__div16(3*t1 + t0 + 8); } out[w*2-1] = stbi__div4(t1+2); STBI_NOTUSED(hs); return out; }
O1
c
stbi__resample_row_hv_2_simd: movq %rdi, %rax movzbl (%rsi), %r8d movzbl (%rdx), %edi cmpl $0x1, %ecx jne 0x17e52 movzwl %r8w, %ecx leal (%rcx,%rcx,2), %ecx movzwl %di, %edx addl %edx, %ecx addl $0x2, %ecx shrl $0x2, %ecx movb %cl, 0x1(%rax) movb %cl, (%rax) retq movzwl %r8w, %r8d leal (%r8,%r8,2), %r9d movzwl %di, %r8d addl %r9d, %r8d leal -0x1(%rcx), %edi andl $-0x8, %edi jle 0x17f2e movl %edi, %edi xorl %r10d, %r10d pxor %xmm0, %xmm0 movdqa 0xc252(%rip), %xmm1 # 0x240d0 movq %r10, %r9 movq (%rdx,%r10), %xmm2 movq (%rsi,%r10), %xmm3 punpcklbw %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3],xmm2[4],xmm0[4],xmm2[5],xmm0[5],xmm2[6],xmm0[6],xmm2[7],xmm0[7] punpcklbw %xmm0, %xmm3 # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1],xmm3[2],xmm0[2],xmm3[3],xmm0[3],xmm3[4],xmm0[4],xmm3[5],xmm0[5],xmm3[6],xmm0[6],xmm3[7],xmm0[7] psubw %xmm3, %xmm2 psllw $0x2, %xmm3 paddw %xmm2, %xmm3 movdqa %xmm3, %xmm2 pslldq $0x2, %xmm2 # xmm2 = zero,zero,xmm2[0,1,2,3,4,5,6,7,8,9,10,11,12,13] pinsrw $0x0, %r8d, %xmm2 movdqa %xmm3, %xmm4 psrldq $0x2, %xmm4 # xmm4 = xmm4[2,3,4,5,6,7,8,9,10,11,12,13,14,15],zero,zero movzbl 0x8(%rsi,%r10), %r8d leal (%r8,%r8,2), %r8d movzbl 0x8(%rdx,%r10), %r10d addl %r8d, %r10d pinsrw $0x7, %r10d, %xmm4 psubw %xmm3, %xmm2 psubw %xmm3, %xmm4 psllw $0x2, %xmm3 paddw %xmm1, %xmm3 paddw %xmm3, %xmm2 paddw %xmm3, %xmm4 movdqa %xmm2, %xmm3 punpcklwd %xmm4, %xmm3 # xmm3 = xmm3[0],xmm4[0],xmm3[1],xmm4[1],xmm3[2],xmm4[2],xmm3[3],xmm4[3] punpckhwd %xmm4, %xmm2 # xmm2 = xmm2[4],xmm4[4],xmm2[5],xmm4[5],xmm2[6],xmm4[6],xmm2[7],xmm4[7] psrlw $0x4, %xmm3 psrlw $0x4, %xmm2 packuswb %xmm2, %xmm3 movdqu %xmm3, (%rax,%r9,2) movzbl 0x7(%rsi,%r9), %r11d movzbl 0x7(%rdx,%r9), %r8d leaq 0x8(%r9), %r10 leal (%r11,%r11,2), %r9d addl %r9d, %r8d cmpq %rdi, %r10 jb 0x17e7e jmp 0x17f31 xorl %r10d, %r10d movl %r10d, %edi movzbl (%rsi,%rdi), %r9d leal (%r9,%r9,2), %r11d movzbl (%rdx,%rdi), %r9d addl %r11d, %r9d leal (%r9,%r9,2), %r11d addl %r11d, %r8d addl $0x8, %r8d shrl $0x4, %r8d movb %r8b, (%rax,%rdi,2) orl $0x1, %r10d cmpl %ecx, %r10d jge 0x17fac incq %rdi movl %ecx, %r8d movzbl (%rsi,%rdi), %r10d leal (%r10,%r10,2), %r11d movzbl (%rdx,%rdi), %r10d addl %r11d, %r10d leal (%r9,%r9,2), %r11d addl %r10d, %r11d addl $0x8, %r11d shrl $0x4, %r11d movb %r11b, -0x1(%rax,%rdi,2) leal (%r10,%r10,2), %r11d addl %r11d, %r9d addl $0x8, %r9d shrl $0x4, %r9d movb %r9b, (%rax,%rdi,2) incq %rdi movl %r10d, %r9d cmpq %rdi, %r8 jne 0x17f67 jmp 0x17faf movl %r9d, %r10d addl $0x2, %r10d shrl $0x2, %r10d movslq %ecx, %rcx movb %r10b, -0x1(%rax,%rcx,2) retq
stbi__resample_row_hv_2_simd: mov rax, rdi movzx r8d, byte ptr [rsi] movzx edi, byte ptr [rdx] cmp ecx, 1 jnz short loc_17E52 movzx ecx, r8w lea ecx, [rcx+rcx*2] movzx edx, di add ecx, edx add ecx, 2 shr ecx, 2 mov [rax+1], cl mov [rax], cl retn loc_17E52: movzx r8d, r8w lea r9d, [r8+r8*2] movzx r8d, di add r8d, r9d lea edi, [rcx-1] and edi, 0FFFFFFF8h jle loc_17F2E mov edi, edi xor r10d, r10d pxor xmm0, xmm0 movdqa xmm1, cs:xmmword_240D0 loc_17E7E: mov r9, r10 movq xmm2, qword ptr [rdx+r10] movq xmm3, qword ptr [rsi+r10] punpcklbw xmm2, xmm0 punpcklbw xmm3, xmm0 psubw xmm2, xmm3 psllw xmm3, 2 paddw xmm3, xmm2 movdqa xmm2, xmm3 pslldq xmm2, 2 pinsrw xmm2, r8d, 0 movdqa xmm4, xmm3 psrldq xmm4, 2 movzx r8d, byte ptr [rsi+r10+8] lea r8d, [r8+r8*2] movzx r10d, byte ptr [rdx+r10+8] add r10d, r8d pinsrw xmm4, r10d, 7 psubw xmm2, xmm3 psubw xmm4, xmm3 psllw xmm3, 2 paddw xmm3, xmm1 paddw xmm2, xmm3 paddw xmm4, xmm3 movdqa xmm3, xmm2 punpcklwd xmm3, xmm4 punpckhwd xmm2, xmm4 psrlw xmm3, 4 psrlw xmm2, 4 packuswb xmm3, xmm2 movdqu xmmword ptr [rax+r9*2], xmm3 movzx r11d, byte ptr [rsi+r9+7] movzx r8d, byte ptr [rdx+r9+7] lea r10, [r9+8] lea r9d, [r11+r11*2] add r8d, r9d cmp r10, rdi jb loc_17E7E jmp short loc_17F31 loc_17F2E: xor r10d, r10d loc_17F31: mov edi, r10d movzx r9d, byte ptr [rsi+rdi] lea r11d, [r9+r9*2] movzx r9d, byte ptr [rdx+rdi] add r9d, r11d lea r11d, [r9+r9*2] add r8d, r11d add r8d, 8 shr r8d, 4 mov [rax+rdi*2], r8b or r10d, 1 cmp r10d, ecx jge short loc_17FAC inc rdi mov r8d, ecx loc_17F67: movzx r10d, byte ptr [rsi+rdi] lea r11d, [r10+r10*2] movzx r10d, byte ptr [rdx+rdi] add r10d, r11d lea r11d, [r9+r9*2] add r11d, r10d add r11d, 8 shr r11d, 4 mov [rax+rdi*2-1], r11b lea r11d, [r10+r10*2] add r9d, r11d add r9d, 8 shr r9d, 4 mov [rax+rdi*2], r9b inc rdi mov r9d, r10d cmp r8, rdi jnz short loc_17F67 jmp short loc_17FAF loc_17FAC: mov r10d, r9d loc_17FAF: add r10d, 2 shr r10d, 2 movsxd rcx, ecx mov [rax+rcx*2-1], r10b retn
_BYTE * stbi__resample_row_hv_2_simd(_BYTE *a1, unsigned __int8 *a2, unsigned __int8 *a3, signed int a4) { _BYTE *result; // rax unsigned int v5; // ecx unsigned int v6; // r8d unsigned long long v7; // r10 __m128i si128; // xmm1 __m128i v9; // xmm3 __m128i v10; // xmm3 __m128i v11; // xmm2 __m128i v12; // xmm4 __m128i v13; // xmm3 __m128i v14; // xmm2 __m128i v15; // xmm4 int v16; // r11d int v17; // r8d int v18; // r9d long long v19; // rdi int v20; // r10d result = a1; if ( a4 == 1 ) { v5 = (*a3 + 3 * (unsigned int)*a2 + 2) >> 2; a1[1] = v5; *a1 = v5; } else { v6 = 3 * *a2 + *a3; if ( a4 - 1 < 0 || ((a4 - 1) & 0xFFFFFFF8) == 0 ) { LODWORD(v7) = 0; } else { v7 = 0LL; si128 = _mm_load_si128((const __m128i *)&xmmword_240D0); do { v9 = _mm_unpacklo_epi8(_mm_loadl_epi64((const __m128i *)&a2[v7]), (__m128i)0LL); v10 = _mm_add_epi16( _mm_slli_epi16(v9, 2u), _mm_sub_epi16(_mm_unpacklo_epi8(_mm_loadl_epi64((const __m128i *)&a3[v7]), (__m128i)0LL), v9)); v11 = _mm_sub_epi16(_mm_insert_epi16(_mm_slli_si128(v10, 2), v6, 0), v10); v12 = _mm_sub_epi16(_mm_insert_epi16(_mm_srli_si128(v10, 2), 3 * a2[v7 + 8] + (unsigned int)a3[v7 + 8], 7), v10); v13 = _mm_add_epi16(_mm_slli_epi16(v10, 2u), si128); v14 = _mm_add_epi16(v11, v13); v15 = _mm_add_epi16(v12, v13); *(__m128i *)&a1[2 * v7] = _mm_packus_epi16( _mm_srli_epi16(_mm_unpacklo_epi16(v14, v15), 4u), _mm_srli_epi16(_mm_unpackhi_epi16(v14, v15), 4u)); v16 = a2[v7 + 7]; v17 = a3[v7 + 7]; v7 += 8LL; v6 = 3 * v16 + v17; } while ( v7 < ((a4 - 1) & 0xFFFFFFF8) ); } v18 = 3 * a2[(unsigned int)v7] + a3[(unsigned int)v7]; a1[2 * (unsigned int)v7] = (3 * v18 + v6 + 8) >> 4; if ( (int)(v7 | 1) >= a4 ) { v20 = v18; } else { v19 = (unsigned int)v7 + 1LL; do { v20 = 3 * a2[v19] + a3[v19]; result[2 * v19 - 1] = (unsigned int)(v20 + 3 * v18 + 8) >> 4; result[2 * v19++] = (unsigned int)(3 * v20 + v18 + 8) >> 4; v18 = v20; } while ( a4 != v19 ); } result[2 * a4 - 1] = (unsigned int)(v20 + 2) >> 2; } return result; }
stbi__resample_row_hv_2_simd: MOV RAX,RDI MOVZX R8D,byte ptr [RSI] MOVZX EDI,byte ptr [RDX] CMP ECX,0x1 JNZ 0x00117e52 MOVZX ECX,R8W LEA ECX,[RCX + RCX*0x2] MOVZX EDX,DI ADD ECX,EDX ADD ECX,0x2 SHR ECX,0x2 MOV byte ptr [RAX + 0x1],CL MOV byte ptr [RAX],CL RET LAB_00117e52: MOVZX R8D,R8W LEA R9D,[R8 + R8*0x2] MOVZX R8D,DI ADD R8D,R9D LEA EDI,[RCX + -0x1] AND EDI,0xfffffff8 JLE 0x00117f2e MOV EDI,EDI XOR R10D,R10D PXOR XMM0,XMM0 MOVDQA XMM1,xmmword ptr [0x001240d0] LAB_00117e7e: MOV R9,R10 MOVQ XMM2,qword ptr [RDX + R10*0x1] MOVQ XMM3,qword ptr [RSI + R10*0x1] PUNPCKLBW XMM2,XMM0 PUNPCKLBW XMM3,XMM0 PSUBW XMM2,XMM3 PSLLW XMM3,0x2 PADDW XMM3,XMM2 MOVDQA XMM2,XMM3 PSLLDQ XMM2,0x2 PINSRW XMM2,R8D,0x0 MOVDQA XMM4,XMM3 PSRLDQ XMM4,0x2 MOVZX R8D,byte ptr [RSI + R10*0x1 + 0x8] LEA R8D,[R8 + R8*0x2] MOVZX R10D,byte ptr [RDX + R10*0x1 + 0x8] ADD R10D,R8D PINSRW XMM4,R10D,0x7 PSUBW XMM2,XMM3 PSUBW XMM4,XMM3 PSLLW XMM3,0x2 PADDW XMM3,XMM1 PADDW XMM2,XMM3 PADDW XMM4,XMM3 MOVDQA XMM3,XMM2 PUNPCKLWD XMM3,XMM4 PUNPCKHWD XMM2,XMM4 PSRLW XMM3,0x4 PSRLW XMM2,0x4 PACKUSWB XMM3,XMM2 MOVDQU xmmword ptr [RAX + R9*0x2],XMM3 MOVZX R11D,byte ptr [RSI + R9*0x1 + 0x7] MOVZX R8D,byte ptr [RDX + R9*0x1 + 0x7] LEA R10,[R9 + 0x8] LEA R9D,[R11 + R11*0x2] ADD R8D,R9D CMP R10,RDI JC 0x00117e7e JMP 0x00117f31 LAB_00117f2e: XOR R10D,R10D LAB_00117f31: MOV EDI,R10D MOVZX R9D,byte ptr [RSI + RDI*0x1] LEA R11D,[R9 + R9*0x2] MOVZX R9D,byte ptr [RDX + RDI*0x1] ADD R9D,R11D LEA R11D,[R9 + R9*0x2] ADD R8D,R11D ADD R8D,0x8 SHR R8D,0x4 MOV byte ptr [RAX + RDI*0x2],R8B OR R10D,0x1 CMP R10D,ECX JGE 0x00117fac INC RDI MOV R8D,ECX LAB_00117f67: MOVZX R10D,byte ptr [RSI + RDI*0x1] LEA R11D,[R10 + R10*0x2] MOVZX R10D,byte ptr [RDX + RDI*0x1] ADD R10D,R11D LEA R11D,[R9 + R9*0x2] ADD R11D,R10D ADD R11D,0x8 SHR R11D,0x4 MOV byte ptr [RAX + RDI*0x2 + -0x1],R11B LEA R11D,[R10 + R10*0x2] ADD R9D,R11D ADD R9D,0x8 SHR R9D,0x4 MOV byte ptr [RAX + RDI*0x2],R9B INC RDI MOV R9D,R10D CMP R8,RDI JNZ 0x00117f67 JMP 0x00117faf LAB_00117fac: MOV R10D,R9D LAB_00117faf: ADD R10D,0x2 SHR R10D,0x2 MOVSXD RCX,ECX MOV byte ptr [RAX + RCX*0x2 + -0x1],R10B RET
/* WARNING: Removing unreachable block (ram,0x00117ea6) */ /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void stbi__resample_row_hv_2_simd(int1 *param_1,byte *param_2,byte *param_3,uint param_4) { char *pcVar1; ulong uVar2; byte bVar3; int1 auVar4 [15]; int1 auVar5 [15]; int1 auVar6 [15]; int1 auVar7 [15]; int1 auVar8 [15]; int1 auVar9 [15]; int1 auVar10 [15]; int1 auVar11 [15]; int1 auVar12 [15]; int1 auVar13 [15]; int1 auVar14 [15]; int1 auVar15 [15]; int1 auVar16 [15]; int1 auVar17 [15]; int1 auVar18 [15]; unkuint9 Var19; int1 auVar20 [11]; int1 auVar21 [15]; unkuint9 Var22; int1 auVar23 [11]; int1 auVar24 [15]; int1 auVar25 [15]; int1 auVar26 [15]; int1 auVar27 [15]; long lVar28; long lVar29; short sVar30; short sVar31; short sVar32; short sVar33; short sVar34; short sVar35; short sVar36; short sVar37; int1 uVar38; uint uVar39; ulong uVar40; int iVar41; int iVar42; ulong uVar43; ushort uVar44; ushort uVar45; ushort uVar46; ushort uVar47; ushort uVar48; ushort uVar49; ushort uVar50; ushort uVar51; short sVar52; ushort uVar53; short sVar57; ushort uVar58; short sVar59; ushort uVar60; short sVar61; ushort uVar62; short sVar63; ushort uVar64; short sVar65; ushort uVar66; short sVar67; ushort uVar68; int1 auVar54 [16]; int1 auVar55 [16]; int1 auVar56 [16]; short sVar69; ushort uVar70; sVar37 = _UNK_001240de; sVar36 = _UNK_001240dc; sVar35 = _UNK_001240da; sVar34 = _UNK_001240d8; sVar33 = _UNK_001240d6; sVar32 = _UNK_001240d4; sVar31 = _UNK_001240d2; sVar30 = _DAT_001240d0; bVar3 = *param_2; if (param_4 == 1) { uVar38 = (int1)((uint)bVar3 + (uint)bVar3 * 2 + (uint)*param_3 + 2 >> 2); param_1[1] = uVar38; *param_1 = uVar38; return; } iVar41 = (uint)*param_3 + (uint)bVar3 + (uint)bVar3 * 2; uVar39 = param_4 - 1 & 0xfffffff8; if ((int)uVar39 < 1) { uVar43 = 0; } else { uVar43 = 0; do { uVar40 = *(ulong *)(param_3 + uVar43); uVar2 = *(ulong *)(param_2 + uVar43); auVar4._8_6_ = 0; auVar4._0_8_ = uVar40; auVar4[0xe] = (char)(uVar40 >> 0x38); auVar6._8_4_ = 0; auVar6._0_8_ = uVar40; auVar6[0xc] = (char)(uVar40 >> 0x30); auVar6._13_2_ = auVar4._13_2_; auVar8._8_4_ = 0; auVar8._0_8_ = uVar40; auVar8._12_3_ = auVar6._12_3_; auVar10._8_2_ = 0; auVar10._0_8_ = uVar40; auVar10[10] = (char)(uVar40 >> 0x28); auVar10._11_4_ = auVar8._11_4_; auVar12._8_2_ = 0; auVar12._0_8_ = uVar40; auVar12._10_5_ = auVar10._10_5_; auVar14[8] = (char)(uVar40 >> 0x20); auVar14._0_8_ = uVar40; auVar14._9_6_ = auVar12._9_6_; auVar18._7_8_ = 0; auVar18._0_7_ = auVar14._8_7_; Var19 = CONCAT81(SUB158(auVar18 << 0x40,7),(char)(uVar40 >> 0x18)); auVar24._9_6_ = 0; auVar24._0_9_ = Var19; auVar20._1_10_ = SUB1510(auVar24 << 0x30,5); auVar20[0] = (char)(uVar40 >> 0x10); auVar25._11_4_ = 0; auVar25._0_11_ = auVar20; auVar16[2] = (char)(uVar40 >> 8); auVar16._0_2_ = (ushort)uVar40; auVar16._3_12_ = SUB1512(auVar25 << 0x20,3); auVar5._8_6_ = 0; auVar5._0_8_ = uVar2; auVar5[0xe] = (char)(uVar2 >> 0x38); auVar7._8_4_ = 0; auVar7._0_8_ = uVar2; auVar7[0xc] = (char)(uVar2 >> 0x30); auVar7._13_2_ = auVar5._13_2_; auVar9._8_4_ = 0; auVar9._0_8_ = uVar2; auVar9._12_3_ = auVar7._12_3_; auVar11._8_2_ = 0; auVar11._0_8_ = uVar2; auVar11[10] = (char)(uVar2 >> 0x28); auVar11._11_4_ = auVar9._11_4_; auVar13._8_2_ = 0; auVar13._0_8_ = uVar2; auVar13._10_5_ = auVar11._10_5_; auVar15[8] = (char)(uVar2 >> 0x20); auVar15._0_8_ = uVar2; auVar15._9_6_ = auVar13._9_6_; auVar21._7_8_ = 0; auVar21._0_7_ = auVar15._8_7_; Var22 = CONCAT81(SUB158(auVar21 << 0x40,7),(char)(uVar2 >> 0x18)); auVar26._9_6_ = 0; auVar26._0_9_ = Var22; auVar23._1_10_ = SUB1510(auVar26 << 0x30,5); auVar23[0] = (char)(uVar2 >> 0x10); auVar27._11_4_ = 0; auVar27._0_11_ = auVar23; auVar17[2] = (char)(uVar2 >> 8); auVar17._0_2_ = (ushort)uVar2; auVar17._3_12_ = SUB1512(auVar27 << 0x20,3); auVar56._0_2_ = (ushort)uVar2 & 0xff; auVar56._2_13_ = auVar17._2_13_; auVar56[0xf] = 0; auVar54 = psllw(auVar56,2); auVar55._0_2_ = auVar54._0_2_ + (((ushort)uVar40 & 0xff) - auVar56._0_2_); auVar55._2_2_ = auVar54._2_2_ + (auVar16._2_2_ - auVar17._2_2_); auVar55._4_2_ = auVar54._4_2_ + (auVar20._0_2_ - auVar23._0_2_); auVar55._6_2_ = auVar54._6_2_ + ((short)Var19 - (short)Var22); auVar55._8_2_ = auVar54._8_2_ + (auVar14._8_2_ - auVar15._8_2_); auVar55._10_2_ = auVar54._10_2_ + (auVar10._10_2_ - auVar11._10_2_); auVar55._12_2_ = auVar54._12_2_ + (auVar6._12_2_ - auVar7._12_2_); auVar55._14_2_ = auVar54._14_2_ + ((auVar4._13_2_ >> 8) - (auVar5._13_2_ >> 8)); auVar56 = psllw(auVar55,2); sVar52 = auVar56._0_2_ + sVar30; sVar57 = auVar56._2_2_ + sVar31; sVar59 = auVar56._4_2_ + sVar32; sVar61 = auVar56._6_2_ + sVar33; sVar63 = auVar56._8_2_ + sVar34; sVar65 = auVar56._10_2_ + sVar35; sVar67 = auVar56._12_2_ + sVar36; sVar69 = auVar56._14_2_ + sVar37; uVar53 = (ushort)(((short)iVar41 - auVar55._0_2_) + sVar52) >> 4; uVar58 = (ushort)((auVar55._2_2_ - auVar55._0_2_) + sVar52) >> 4; uVar60 = (ushort)((auVar55._0_2_ - auVar55._2_2_) + sVar57) >> 4; uVar62 = (ushort)((auVar55._4_2_ - auVar55._2_2_) + sVar57) >> 4; uVar64 = (ushort)((auVar55._2_2_ - auVar55._4_2_) + sVar59) >> 4; uVar66 = (ushort)((auVar55._6_2_ - auVar55._4_2_) + sVar59) >> 4; uVar68 = (ushort)((auVar55._4_2_ - auVar55._6_2_) + sVar61) >> 4; uVar70 = (ushort)((auVar55._8_2_ - auVar55._6_2_) + sVar61) >> 4; uVar44 = (ushort)((auVar55._6_2_ - auVar55._8_2_) + sVar63) >> 4; uVar45 = (ushort)((auVar55._10_2_ - auVar55._8_2_) + sVar63) >> 4; uVar46 = (ushort)((auVar55._8_2_ - auVar55._10_2_) + sVar65) >> 4; uVar47 = (ushort)((auVar55._12_2_ - auVar55._10_2_) + sVar65) >> 4; uVar48 = (ushort)((auVar55._10_2_ - auVar55._12_2_) + sVar67) >> 4; uVar49 = (ushort)((auVar55._14_2_ - auVar55._12_2_) + sVar67) >> 4; uVar50 = (ushort)((auVar55._12_2_ - auVar55._14_2_) + sVar69) >> 4; uVar51 = (ushort)((((ushort)param_3[uVar43 + 8] + (ushort)param_2[uVar43 + 8] + (ushort)param_2[uVar43 + 8] * 2) - auVar55._14_2_) + sVar69) >> 4; pcVar1 = param_1 + uVar43 * 2; *pcVar1 = (uVar53 != 0) * (uVar53 < 0x100) * (char)uVar53 - (0xff < uVar53); pcVar1[1] = (uVar58 != 0) * (uVar58 < 0x100) * (char)uVar58 - (0xff < uVar58); pcVar1[2] = (uVar60 != 0) * (uVar60 < 0x100) * (char)uVar60 - (0xff < uVar60); pcVar1[3] = (uVar62 != 0) * (uVar62 < 0x100) * (char)uVar62 - (0xff < uVar62); pcVar1[4] = (uVar64 != 0) * (uVar64 < 0x100) * (char)uVar64 - (0xff < uVar64); pcVar1[5] = (uVar66 != 0) * (uVar66 < 0x100) * (char)uVar66 - (0xff < uVar66); pcVar1[6] = (uVar68 != 0) * (uVar68 < 0x100) * (char)uVar68 - (0xff < uVar68); pcVar1[7] = (uVar70 != 0) * (uVar70 < 0x100) * (char)uVar70 - (0xff < uVar70); pcVar1[8] = (uVar44 != 0) * (uVar44 < 0x100) * (char)uVar44 - (0xff < uVar44); pcVar1[9] = (uVar45 != 0) * (uVar45 < 0x100) * (char)uVar45 - (0xff < uVar45); pcVar1[10] = (uVar46 != 0) * (uVar46 < 0x100) * (char)uVar46 - (0xff < uVar46); pcVar1[0xb] = (uVar47 != 0) * (uVar47 < 0x100) * (char)uVar47 - (0xff < uVar47); pcVar1[0xc] = (uVar48 != 0) * (uVar48 < 0x100) * (char)uVar48 - (0xff < uVar48); pcVar1[0xd] = (uVar49 != 0) * (uVar49 < 0x100) * (char)uVar49 - (0xff < uVar49); pcVar1[0xe] = (uVar50 != 0) * (uVar50 < 0x100) * (char)uVar50 - (0xff < uVar50); pcVar1[0xf] = (uVar51 != 0) * (uVar51 < 0x100) * (char)uVar51 - (0xff < uVar51); lVar28 = uVar43 + 7; lVar29 = uVar43 + 7; uVar43 = uVar43 + 8; iVar41 = (uint)param_3[lVar29] + (uint)param_2[lVar28] + (uint)param_2[lVar28] * 2; } while (uVar43 < uVar39); } uVar40 = uVar43 & 0xffffffff; iVar42 = (uint)param_3[uVar40] + (uint)param_2[uVar40] + (uint)param_2[uVar40] * 2; param_1[uVar40 * 2] = (char)(iVar41 + iVar42 * 3 + 8U >> 4); if ((int)((uint)uVar43 | 1) < (int)param_4) { uVar40 = uVar40 + 1; iVar41 = iVar42; do { iVar42 = (uint)param_3[uVar40] + (uint)param_2[uVar40] + (uint)param_2[uVar40] * 2; param_1[uVar40 * 2 + -1] = (char)(iVar41 * 3 + iVar42 + 8U >> 4); param_1[uVar40 * 2] = (char)(iVar41 + iVar42 * 3 + 8U >> 4); uVar40 = uVar40 + 1; iVar41 = iVar42; } while (param_4 != uVar40); } param_1[(long)(int)param_4 * 2 + -1] = (char)(iVar42 + 2U >> 2); return; }
21,758
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10(unsigned int, unsigned int&)
hkr04[P]cpp-mcp/common/json.hpp
inline int find_largest_pow10(const std::uint32_t n, std::uint32_t& pow10) { // LCOV_EXCL_START if (n >= 1000000000) { pow10 = 1000000000; return 10; } // LCOV_EXCL_STOP if (n >= 100000000) { pow10 = 100000000; return 9; } if (n >= 10000000) { pow10 = 10000000; return 8; } if (n >= 1000000) { pow10 = 1000000; return 7; } if (n >= 100000) { pow10 = 100000; return 6; } if (n >= 10000) { pow10 = 10000; return 5; } if (n >= 1000) { pow10 = 1000; return 4; } if (n >= 100) { pow10 = 100; return 3; } if (n >= 10) { pow10 = 10; return 2; } pow10 = 1; return 1; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10(unsigned int, unsigned int&): movl %edi, -0x8(%rsp) movq %rsi, -0x10(%rsp) cmpl $0x3b9aca00, -0x8(%rsp) # imm = 0x3B9ACA00 jb 0xd73ab movq -0x10(%rsp), %rax movl $0x3b9aca00, (%rax) # imm = 0x3B9ACA00 movl $0xa, -0x4(%rsp) jmp 0xd74bc cmpl $0x5f5e100, -0x8(%rsp) # imm = 0x5F5E100 jb 0xd73cd movq -0x10(%rsp), %rax movl $0x5f5e100, (%rax) # imm = 0x5F5E100 movl $0x9, -0x4(%rsp) jmp 0xd74bc cmpl $0x989680, -0x8(%rsp) # imm = 0x989680 jb 0xd73ef movq -0x10(%rsp), %rax movl $0x989680, (%rax) # imm = 0x989680 movl $0x8, -0x4(%rsp) jmp 0xd74bc cmpl $0xf4240, -0x8(%rsp) # imm = 0xF4240 jb 0xd7411 movq -0x10(%rsp), %rax movl $0xf4240, (%rax) # imm = 0xF4240 movl $0x7, -0x4(%rsp) jmp 0xd74bc cmpl $0x186a0, -0x8(%rsp) # imm = 0x186A0 jb 0xd7433 movq -0x10(%rsp), %rax movl $0x186a0, (%rax) # imm = 0x186A0 movl $0x6, -0x4(%rsp) jmp 0xd74bc cmpl $0x2710, -0x8(%rsp) # imm = 0x2710 jb 0xd7452 movq -0x10(%rsp), %rax movl $0x2710, (%rax) # imm = 0x2710 movl $0x5, -0x4(%rsp) jmp 0xd74bc cmpl $0x3e8, -0x8(%rsp) # imm = 0x3E8 jb 0xd7471 movq -0x10(%rsp), %rax movl $0x3e8, (%rax) # imm = 0x3E8 movl $0x4, -0x4(%rsp) jmp 0xd74bc cmpl $0x64, -0x8(%rsp) jb 0xd748d movq -0x10(%rsp), %rax movl $0x64, (%rax) movl $0x3, -0x4(%rsp) jmp 0xd74bc cmpl $0xa, -0x8(%rsp) jb 0xd74a9 movq -0x10(%rsp), %rax movl $0xa, (%rax) movl $0x2, -0x4(%rsp) jmp 0xd74bc movq -0x10(%rsp), %rax movl $0x1, (%rax) movl $0x1, -0x4(%rsp) movl -0x4(%rsp), %eax retq nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl18find_largest_pow10EjRj: mov [rsp+var_8], edi mov [rsp+var_10], rsi cmp [rsp+var_8], 3B9ACA00h jb short loc_D73AB mov rax, [rsp+var_10] mov dword ptr [rax], 3B9ACA00h mov [rsp+var_4], 0Ah jmp loc_D74BC loc_D73AB: cmp [rsp+var_8], 5F5E100h jb short loc_D73CD mov rax, [rsp+var_10] mov dword ptr [rax], 5F5E100h mov [rsp+var_4], 9 jmp loc_D74BC loc_D73CD: cmp [rsp+var_8], 989680h jb short loc_D73EF mov rax, [rsp+var_10] mov dword ptr [rax], 989680h mov [rsp+var_4], 8 jmp loc_D74BC loc_D73EF: cmp [rsp+var_8], offset unk_F4240 jb short loc_D7411 mov rax, [rsp+var_10] mov dword ptr [rax], offset unk_F4240 mov [rsp+var_4], 7 jmp loc_D74BC loc_D7411: cmp [rsp+var_8], 186A0h jb short loc_D7433 mov rax, [rsp+var_10] mov dword ptr [rax], 186A0h mov [rsp+var_4], 6 jmp loc_D74BC loc_D7433: cmp [rsp+var_8], 2710h jb short loc_D7452 mov rax, [rsp+var_10] mov dword ptr [rax], 2710h mov [rsp+var_4], 5 jmp short loc_D74BC loc_D7452: cmp [rsp+var_8], 3E8h jb short loc_D7471 mov rax, [rsp+var_10] mov dword ptr [rax], 3E8h mov [rsp+var_4], 4 jmp short loc_D74BC loc_D7471: cmp [rsp+var_8], 64h ; 'd' jb short loc_D748D mov rax, [rsp+var_10] mov dword ptr [rax], 64h ; 'd' mov [rsp+var_4], 3 jmp short loc_D74BC loc_D748D: cmp [rsp+var_8], 0Ah jb short loc_D74A9 mov rax, [rsp+var_10] mov dword ptr [rax], 0Ah mov [rsp+var_4], 2 jmp short loc_D74BC loc_D74A9: mov rax, [rsp+var_10] mov dword ptr [rax], 1 mov [rsp+var_4], 1 loc_D74BC: mov eax, [rsp+var_4] retn
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10( nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this, _DWORD *a2, unsigned int *a3) { if ( (unsigned int)this < 0x3B9ACA00 ) { if ( (unsigned int)this < 0x5F5E100 ) { if ( (unsigned int)this < 0x989680 ) { if ( (unsigned int)this < (unsigned int)&unk_F4240 ) { if ( (unsigned int)this < 0x186A0 ) { if ( (unsigned int)this < 0x2710 ) { if ( (unsigned int)this < 0x3E8 ) { if ( (unsigned int)this < 0x64 ) { if ( (unsigned int)this < 0xA ) { *a2 = 1; return 1; } else { *a2 = 10; return 2; } } else { *a2 = 100; return 3; } } else { *a2 = 1000; return 4; } } else { *a2 = 10000; return 5; } } else { *a2 = 100000; return 6; } } else { *a2 = (_DWORD)&unk_F4240; return 7; } } else { *a2 = 10000000; return 8; } } else { *a2 = 100000000; return 9; } } else { *a2 = 1000000000; return 10; } }
find_largest_pow10: MOV dword ptr [RSP + -0x8],EDI MOV qword ptr [RSP + -0x10],RSI CMP dword ptr [RSP + -0x8],0x3b9aca00 JC 0x001d73ab MOV RAX,qword ptr [RSP + -0x10] MOV dword ptr [RAX],0x3b9aca00 MOV dword ptr [RSP + -0x4],0xa JMP 0x001d74bc LAB_001d73ab: CMP dword ptr [RSP + -0x8],0x5f5e100 JC 0x001d73cd MOV RAX,qword ptr [RSP + -0x10] MOV dword ptr [RAX],0x5f5e100 MOV dword ptr [RSP + -0x4],0x9 JMP 0x001d74bc LAB_001d73cd: CMP dword ptr [RSP + -0x8],0x989680 JC 0x001d73ef MOV RAX,qword ptr [RSP + -0x10] MOV dword ptr [RAX],0x989680 MOV dword ptr [RSP + -0x4],0x8 JMP 0x001d74bc LAB_001d73ef: CMP dword ptr [RSP + -0x8],0xf4240 JC 0x001d7411 MOV RAX,qword ptr [RSP + -0x10] MOV dword ptr [RAX],0xf4240 MOV dword ptr [RSP + -0x4],0x7 JMP 0x001d74bc LAB_001d7411: CMP dword ptr [RSP + -0x8],0x186a0 JC 0x001d7433 MOV RAX,qword ptr [RSP + -0x10] MOV dword ptr [RAX],0x186a0 MOV dword ptr [RSP + -0x4],0x6 JMP 0x001d74bc LAB_001d7433: CMP dword ptr [RSP + -0x8],0x2710 JC 0x001d7452 MOV RAX,qword ptr [RSP + -0x10] MOV dword ptr [RAX],0x2710 MOV dword ptr [RSP + -0x4],0x5 JMP 0x001d74bc LAB_001d7452: CMP dword ptr [RSP + -0x8],0x3e8 JC 0x001d7471 MOV RAX,qword ptr [RSP + -0x10] MOV dword ptr [RAX],0x3e8 MOV dword ptr [RSP + -0x4],0x4 JMP 0x001d74bc LAB_001d7471: CMP dword ptr [RSP + -0x8],0x64 JC 0x001d748d MOV RAX,qword ptr [RSP + -0x10] MOV dword ptr [RAX],0x64 MOV dword ptr [RSP + -0x4],0x3 JMP 0x001d74bc LAB_001d748d: CMP dword ptr [RSP + -0x8],0xa JC 0x001d74a9 MOV RAX,qword ptr [RSP + -0x10] MOV dword ptr [RAX],0xa MOV dword ptr [RSP + -0x4],0x2 JMP 0x001d74bc LAB_001d74a9: MOV RAX,qword ptr [RSP + -0x10] MOV dword ptr [RAX],0x1 MOV dword ptr [RSP + -0x4],0x1 LAB_001d74bc: MOV EAX,dword ptr [RSP + -0x4] RET
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10(unsigned int, unsigned int&) */ int4 nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10(uint param_1,uint *param_2) { int4 local_4; if (param_1 < 1000000000) { if (param_1 < 100000000) { if (param_1 < 10000000) { if (param_1 < 1000000) { if (param_1 < 100000) { if (param_1 < 10000) { if (param_1 < 1000) { if (param_1 < 100) { if (param_1 < 10) { *param_2 = 1; local_4 = 1; } else { *param_2 = 10; local_4 = 2; } } else { *param_2 = 100; local_4 = 3; } } else { *param_2 = 1000; local_4 = 4; } } else { *param_2 = 10000; local_4 = 5; } } else { *param_2 = 100000; local_4 = 6; } } else { *param_2 = 1000000; local_4 = 7; } } else { *param_2 = 10000000; local_4 = 8; } } else { *param_2 = 100000000; local_4 = 9; } } else { *param_2 = 1000000000; local_4 = 10; } return local_4; }
21,759
translog_first_file
eloqsql/storage/maria/ma_loghandler.c
static uint32 translog_first_file(TRANSLOG_ADDRESS horizon, int is_protected) { uint min_file= 0, max_file; DBUG_ENTER("translog_first_file"); if (!is_protected) mysql_mutex_lock(&log_descriptor.purger_lock); if (log_descriptor.min_file_number && translog_is_file(log_descriptor.min_file_number)) { DBUG_PRINT("info", ("cached %lu", (ulong) log_descriptor.min_file_number)); if (!is_protected) mysql_mutex_unlock(&log_descriptor.purger_lock); DBUG_RETURN(log_descriptor.min_file_number); } max_file= LSN_FILE_NO(horizon); /* binary search for last file */ while (min_file != max_file && min_file != (max_file - 1)) { uint test= (min_file + max_file) / 2; DBUG_PRINT("info", ("min_file: %u test: %u max_file: %u", min_file, test, max_file)); if (test == max_file) test--; if (translog_is_file(test)) max_file= test; else min_file= test; } log_descriptor.min_file_number= max_file; if (!is_protected) mysql_mutex_unlock(&log_descriptor.purger_lock); DBUG_PRINT("info", ("first file :%lu", (ulong) max_file)); DBUG_ASSERT(max_file >= 1); DBUG_RETURN(max_file); }
O0
c
translog_first_file: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl $0x0, -0x18(%rbp) cmpl $0x0, -0x14(%rbp) jne 0x31dcb leaq 0x45219d(%rip), %rdi # 0x483f50 addq $0x800e80, %rdi # imm = 0x800E80 leaq 0x12919e(%rip), %rsi # 0x15af5f movl $0x20f1, %edx # imm = 0x20F1 callq 0x2fbb0 cmpl $0x0, 0xc52ffa(%rip) # 0xc84dcc je 0x31e14 movl 0xc52ff2(%rip), %edi # 0xc84dcc callq 0x36d90 movsbl %al, %eax cmpl $0x0, %eax je 0x31e14 jmp 0x31de9 jmp 0x31deb cmpl $0x0, -0x14(%rbp) jne 0x31e04 leaq 0x452158(%rip), %rdi # 0x483f50 addq $0x800e80, %rdi # imm = 0x800E80 callq 0x2fc20 jmp 0x31e06 movl 0xc52fc0(%rip), %eax # 0xc84dcc movl %eax, -0x4(%rbp) jmp 0x31eb2 movq -0x10(%rbp), %rax sarq $0x20, %rax movl %eax, -0x1c(%rbp) movl -0x18(%rbp), %ecx xorl %eax, %eax cmpl -0x1c(%rbp), %ecx movb %al, -0x21(%rbp) je 0x31e3d movl -0x18(%rbp), %eax movl -0x1c(%rbp), %ecx subl $0x1, %ecx cmpl %ecx, %eax setne %al movb %al, -0x21(%rbp) movb -0x21(%rbp), %al testb $0x1, %al jne 0x31e46 jmp 0x31e80 movl -0x18(%rbp), %eax addl -0x1c(%rbp), %eax shrl %eax movl %eax, -0x20(%rbp) jmp 0x31e53 movl -0x20(%rbp), %eax cmpl -0x1c(%rbp), %eax jne 0x31e64 movl -0x20(%rbp), %eax addl $-0x1, %eax movl %eax, -0x20(%rbp) movl -0x20(%rbp), %edi callq 0x36d90 cmpb $0x0, %al je 0x31e78 movl -0x20(%rbp), %eax movl %eax, -0x1c(%rbp) jmp 0x31e7e movl -0x20(%rbp), %eax movl %eax, -0x18(%rbp) jmp 0x31e1f movl -0x1c(%rbp), %eax movl %eax, 0xc52f43(%rip) # 0xc84dcc cmpl $0x0, -0x14(%rbp) jne 0x31ea2 leaq 0x4520ba(%rip), %rdi # 0x483f50 addq $0x800e80, %rdi # imm = 0x800E80 callq 0x2fc20 jmp 0x31ea4 jmp 0x31ea6 jmp 0x31ea8 jmp 0x31eaa jmp 0x31eac movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
translog_first_file: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], 0 cmp [rbp+var_14], 0 jnz short loc_31DCB lea rdi, log_descriptor add rdi, 800E80h lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 20F1h call inline_mysql_mutex_lock loc_31DCB: cmp cs:dword_C84DCC, 0 jz short loc_31E14 mov edi, cs:dword_C84DCC call translog_is_file movsx eax, al cmp eax, 0 jz short loc_31E14 jmp short $+2 loc_31DE9: jmp short $+2 loc_31DEB: cmp [rbp+var_14], 0 jnz short loc_31E04 lea rdi, log_descriptor add rdi, 800E80h call inline_mysql_mutex_unlock loc_31E04: jmp short $+2 loc_31E06: mov eax, cs:dword_C84DCC mov [rbp+var_4], eax jmp loc_31EB2 loc_31E14: mov rax, [rbp+var_10] sar rax, 20h mov [rbp+var_1C], eax loc_31E1F: mov ecx, [rbp+var_18] xor eax, eax cmp ecx, [rbp+var_1C] mov [rbp+var_21], al jz short loc_31E3D mov eax, [rbp+var_18] mov ecx, [rbp+var_1C] sub ecx, 1 cmp eax, ecx setnz al mov [rbp+var_21], al loc_31E3D: mov al, [rbp+var_21] test al, 1 jnz short loc_31E46 jmp short loc_31E80 loc_31E46: mov eax, [rbp+var_18] add eax, [rbp+var_1C] shr eax, 1 mov [rbp+var_20], eax jmp short $+2 loc_31E53: mov eax, [rbp+var_20] cmp eax, [rbp+var_1C] jnz short loc_31E64 mov eax, [rbp+var_20] add eax, 0FFFFFFFFh mov [rbp+var_20], eax loc_31E64: mov edi, [rbp+var_20] call translog_is_file cmp al, 0 jz short loc_31E78 mov eax, [rbp+var_20] mov [rbp+var_1C], eax jmp short loc_31E7E loc_31E78: mov eax, [rbp+var_20] mov [rbp+var_18], eax loc_31E7E: jmp short loc_31E1F loc_31E80: mov eax, [rbp+var_1C] mov cs:dword_C84DCC, eax cmp [rbp+var_14], 0 jnz short loc_31EA2 lea rdi, log_descriptor add rdi, 800E80h call inline_mysql_mutex_unlock loc_31EA2: jmp short $+2 loc_31EA4: jmp short $+2 loc_31EA6: jmp short $+2 loc_31EA8: jmp short $+2 loc_31EAA: jmp short $+2 loc_31EAC: mov eax, [rbp+var_1C] mov [rbp+var_4], eax loc_31EB2: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long translog_first_file(long long a1, int a2) { bool v3; // [rsp+Fh] [rbp-21h] unsigned int v4; // [rsp+10h] [rbp-20h] unsigned int v5; // [rsp+14h] [rbp-1Ch] unsigned int v6; // [rsp+18h] [rbp-18h] v6 = 0; if ( !a2 ) inline_mysql_mutex_lock( (long long)&log_descriptor[1049040], (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x20F1u); if ( dword_C84DCC && (unsigned __int8)translog_is_file((unsigned int)dword_C84DCC) ) { if ( !a2 ) inline_mysql_mutex_unlock((long long)&log_descriptor[1049040]); return (unsigned int)dword_C84DCC; } else { v5 = HIDWORD(a1); while ( 1 ) { v3 = 0; if ( v6 != v5 ) v3 = v6 != v5 - 1; if ( !v3 ) break; v4 = (v5 + v6) >> 1; if ( v4 == v5 ) --v4; if ( (unsigned __int8)translog_is_file(v4) ) v5 = v4; else v6 = v4; } dword_C84DCC = v5; if ( !a2 ) inline_mysql_mutex_unlock((long long)&log_descriptor[1049040]); return v5; } }
translog_first_file: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],0x0 CMP dword ptr [RBP + -0x14],0x0 JNZ 0x00131dcb LEA RDI,[0x583f50] ADD RDI,0x800e80 LEA RSI,[0x25af5f] MOV EDX,0x20f1 CALL 0x0012fbb0 LAB_00131dcb: CMP dword ptr [0x00d84dcc],0x0 JZ 0x00131e14 MOV EDI,dword ptr [0x00d84dcc] CALL 0x00136d90 MOVSX EAX,AL CMP EAX,0x0 JZ 0x00131e14 JMP 0x00131de9 LAB_00131de9: JMP 0x00131deb LAB_00131deb: CMP dword ptr [RBP + -0x14],0x0 JNZ 0x00131e04 LEA RDI,[0x583f50] ADD RDI,0x800e80 CALL 0x0012fc20 LAB_00131e04: JMP 0x00131e06 LAB_00131e06: MOV EAX,dword ptr [0x00d84dcc] MOV dword ptr [RBP + -0x4],EAX JMP 0x00131eb2 LAB_00131e14: MOV RAX,qword ptr [RBP + -0x10] SAR RAX,0x20 MOV dword ptr [RBP + -0x1c],EAX LAB_00131e1f: MOV ECX,dword ptr [RBP + -0x18] XOR EAX,EAX CMP ECX,dword ptr [RBP + -0x1c] MOV byte ptr [RBP + -0x21],AL JZ 0x00131e3d MOV EAX,dword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x1c] SUB ECX,0x1 CMP EAX,ECX SETNZ AL MOV byte ptr [RBP + -0x21],AL LAB_00131e3d: MOV AL,byte ptr [RBP + -0x21] TEST AL,0x1 JNZ 0x00131e46 JMP 0x00131e80 LAB_00131e46: MOV EAX,dword ptr [RBP + -0x18] ADD EAX,dword ptr [RBP + -0x1c] SHR EAX,0x1 MOV dword ptr [RBP + -0x20],EAX JMP 0x00131e53 LAB_00131e53: MOV EAX,dword ptr [RBP + -0x20] CMP EAX,dword ptr [RBP + -0x1c] JNZ 0x00131e64 MOV EAX,dword ptr [RBP + -0x20] ADD EAX,-0x1 MOV dword ptr [RBP + -0x20],EAX LAB_00131e64: MOV EDI,dword ptr [RBP + -0x20] CALL 0x00136d90 CMP AL,0x0 JZ 0x00131e78 MOV EAX,dword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x1c],EAX JMP 0x00131e7e LAB_00131e78: MOV EAX,dword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x18],EAX LAB_00131e7e: JMP 0x00131e1f LAB_00131e80: MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [0x00d84dcc],EAX CMP dword ptr [RBP + -0x14],0x0 JNZ 0x00131ea2 LEA RDI,[0x583f50] ADD RDI,0x800e80 CALL 0x0012fc20 LAB_00131ea2: JMP 0x00131ea4 LAB_00131ea4: JMP 0x00131ea6 LAB_00131ea6: JMP 0x00131ea8 LAB_00131ea8: JMP 0x00131eaa LAB_00131eaa: JMP 0x00131eac LAB_00131eac: MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x4],EAX LAB_00131eb2: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
uint translog_first_file(int8 param_1,int param_2) { char cVar1; uint local_28; uint local_24; uint local_20; uint local_c; local_20 = 0; if (param_2 == 0) { inline_mysql_mutex_lock (&DAT_00d84dd0, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x20f1); } if ((DAT_00d84dcc == 0) || (cVar1 = translog_is_file(DAT_00d84dcc), cVar1 == '\0')) { local_24 = (uint)((ulong)param_1 >> 0x20); while (local_20 != local_24 && local_20 != local_24 - 1) { local_28 = local_20 + local_24 >> 1; if (local_28 == local_24) { local_28 = local_28 - 1; } cVar1 = translog_is_file(local_28); if (cVar1 == '\0') { local_20 = local_28; } else { local_24 = local_28; } } DAT_00d84dcc = local_24; if (param_2 == 0) { inline_mysql_mutex_unlock(&DAT_00d84dd0); } local_c = local_24; } else { if (param_2 == 0) { inline_mysql_mutex_unlock(&DAT_00d84dd0); } local_c = DAT_00d84dcc; } return local_c; }
21,760
find_binary_info(memory_access&, binary_info_header&)
msxemulator/build_O0/_deps/picotool-src/main.cpp
bool find_binary_info(memory_access& access, binary_info_header &hdr) { uint32_t base = access.get_binary_start(); model_t model = get_model(access); if (!base) { fail(ERROR_FORMAT, "UF2 file does not contain a valid RP2 executable image"); } uint32_t max_dist = 256; if (model == rp2040) { max_dist = 64; if (base == FLASH_START) base += 0x100; // skip the boot2 } vector<uint32_t> buffer = access.read_vector<uint32_t>(base, max_dist, true); for(unsigned int i=0;i<buffer.size();i++) { if (buffer[i] == BINARY_INFO_MARKER_START) { if (i + 4 < max_dist && buffer[i+4] == BINARY_INFO_MARKER_END) { uint32_t from = buffer[i+1]; uint32_t to = buffer[i+2]; enum memory_type from_type = get_memory_type(from, model); enum memory_type to_type = get_memory_type(to, model); if (to > from && from_type == to_type && is_size_aligned(from, 4) && is_size_aligned(to, 4)) { access.read_into_vector(from, (to - from) / 4, hdr.bi_addr); uint32_t cpy_table = buffer[i+3]; vector<uint32_t> mapping; do { mapping = access.read_vector<uint32_t>(cpy_table, 3); if (!mapping[0]) break; // from, to_start, to_end hdr.reverse_copy_mapping.insert(range(mapping[1], mapping[2]), mapping[0]); cpy_table += 12; } while (hdr.reverse_copy_mapping.size() < 10); // arbitrary max return true; } } } } return false; }
O0
cpp
find_binary_info(memory_access&, binary_info_header&): subq $0xe8, %rsp movq %rdi, 0xd8(%rsp) movq %rsi, 0xd0(%rsp) movq 0xd8(%rsp), %rdi movq (%rdi), %rax callq *0x20(%rax) movl %eax, 0xcc(%rsp) movq 0xd8(%rsp), %rdi callq 0x33130 movl %eax, 0xc8(%rsp) cmpl $0x0, 0xcc(%rsp) jne 0x3339d movl $0xfffffffe, %edi # imm = 0xFFFFFFFE leaq 0x13cbac(%rip), %rsi # 0x16ff42 movb $0x0, %al callq 0x118b80 movl $0x100, 0xc4(%rsp) # imm = 0x100 cmpl $0x0, 0xc8(%rsp) jne 0x333df movl $0x40, 0xc4(%rsp) cmpl $0x10000000, 0xcc(%rsp) # imm = 0x10000000 jne 0x333dd movl 0xcc(%rsp), %eax addl $0x100, %eax # imm = 0x100 movl %eax, 0xcc(%rsp) jmp 0x333df movq 0xd8(%rsp), %rsi movl 0xcc(%rsp), %edx movl 0xc4(%rsp), %ecx leaq 0xa8(%rsp), %rdi movl $0x1, %r8d callq 0x5ad10 movl $0x0, 0xa4(%rsp) movl 0xa4(%rsp), %eax movq %rax, 0x38(%rsp) leaq 0xa8(%rsp), %rdi callq 0x5aef0 movq %rax, %rcx movq 0x38(%rsp), %rax cmpq %rcx, %rax jae 0x33760 movl 0xa4(%rsp), %eax movl %eax, %esi leaq 0xa8(%rsp), %rdi callq 0x5af10 cmpl $0x7188ebf2, (%rax) # imm = 0x7188EBF2 jne 0x33748 movl 0xa4(%rsp), %eax addl $0x4, %eax cmpl 0xc4(%rsp), %eax jae 0x33746 movl 0xa4(%rsp), %eax addl $0x4, %eax movl %eax, %eax movl %eax, %esi leaq 0xa8(%rsp), %rdi callq 0x5af10 cmpl $0xe71aa390, (%rax) # imm = 0xE71AA390 jne 0x33746 movl 0xa4(%rsp), %eax incl %eax movl %eax, %esi leaq 0xa8(%rsp), %rdi movq %rdi, 0x28(%rsp) callq 0x5af10 movq 0x28(%rsp), %rdi movl (%rax), %eax movl %eax, 0xa0(%rsp) movl 0xa4(%rsp), %eax addl $0x2, %eax movl %eax, %esi callq 0x5af10 movl (%rax), %eax movl %eax, 0x9c(%rsp) movl 0xa0(%rsp), %edi movl 0xc8(%rsp), %esi callq 0x337b0 movl %eax, 0x34(%rsp) jmp 0x334fb movl 0x34(%rsp), %eax movl %eax, 0x98(%rsp) movl 0x9c(%rsp), %edi movl 0xc8(%rsp), %esi callq 0x337b0 movl %eax, 0x24(%rsp) jmp 0x3351f movl 0x24(%rsp), %eax movl %eax, 0x88(%rsp) movl 0x9c(%rsp), %eax cmpl 0xa0(%rsp), %eax jbe 0x33744 movl 0x98(%rsp), %eax cmpl 0x88(%rsp), %eax jne 0x33744 movl 0xa0(%rsp), %edi movl $0x4, %esi callq 0x33900 movb %al, 0x23(%rsp) jmp 0x33569 movb 0x23(%rsp), %al testb $0x1, %al jne 0x33576 jmp 0x33744 movl 0x9c(%rsp), %edi movl $0x4, %esi callq 0x33900 movb %al, 0x22(%rsp) jmp 0x3358d movb 0x22(%rsp), %al testb $0x1, %al jne 0x3359a jmp 0x33744 movq 0xd8(%rsp), %rdi movl 0xa0(%rsp), %esi movl 0x9c(%rsp), %edx subl %esi, %edx shrl $0x2, %edx movq 0xd0(%rsp), %rcx xorl %r8d, %r8d callq 0x5af30 jmp 0x335c7 movl 0xa4(%rsp), %eax addl $0x3, %eax movl %eax, %eax movl %eax, %esi leaq 0xa8(%rsp), %rdi callq 0x5af10 movl (%rax), %eax movl %eax, 0x84(%rsp) leaq 0x68(%rsp), %rdi callq 0x5b0e0 movq 0xd8(%rsp), %rsi movl 0x84(%rsp), %edx leaq 0x50(%rsp), %rdi movl $0x3, %ecx xorl %r8d, %r8d callq 0x5ad10 jmp 0x33618 leaq 0x68(%rsp), %rdi leaq 0x50(%rsp), %rsi callq 0x5b0f0 leaq 0x50(%rsp), %rdi callq 0x5b130 leaq 0x68(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x5af10 cmpl $0x0, (%rax) jne 0x33685 jmp 0x33728 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) jmp 0x3378e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) leaq 0x68(%rsp), %rdi callq 0x5b130 jmp 0x3378e movq 0xd0(%rsp), %rax addq $0x18, %rax movq %rax, 0x8(%rsp) leaq 0x68(%rsp), %rdi movq %rdi, 0x10(%rsp) movl $0x1, %esi callq 0x5af10 movq 0x10(%rsp), %rdi movl (%rax), %eax movl %eax, 0x1c(%rsp) movl $0x2, %esi callq 0x5af10 movl 0x1c(%rsp), %esi movl (%rax), %edx leaq 0x48(%rsp), %rdi callq 0x5b3a0 jmp 0x336d1 xorl %eax, %eax movl %eax, %esi leaq 0x68(%rsp), %rdi callq 0x5af10 movq 0x8(%rsp), %rdi movl (%rax), %edx leaq 0x48(%rsp), %rsi callq 0x5b190 jmp 0x336f2 movl 0x84(%rsp), %eax addl $0xc, %eax movl %eax, 0x84(%rsp) movq 0xd0(%rsp), %rdi addq $0x18, %rdi callq 0x5b3c0 movq %rax, (%rsp) jmp 0x3371a movq (%rsp), %rax cmpq $0xa, %rax jb 0x335f5 movb $0x1, 0xe7(%rsp) movl $0x1, 0x44(%rsp) leaq 0x68(%rsp), %rdi callq 0x5b130 jmp 0x33770 jmp 0x33746 jmp 0x33748 jmp 0x3374a movl 0xa4(%rsp), %eax addl $0x1, %eax movl %eax, 0xa4(%rsp) jmp 0x33413 movb $0x0, 0xe7(%rsp) movl $0x1, 0x44(%rsp) leaq 0xa8(%rsp), %rdi callq 0x5b130 movb 0xe7(%rsp), %al andb $0x1, %al addq $0xe8, %rsp retq leaq 0xa8(%rsp), %rdi callq 0x5b130 movq 0x90(%rsp), %rdi callq 0xf9e0 nopl (%rax,%rax)
_Z16find_binary_infoR13memory_accessR18binary_info_header: sub rsp, 0E8h mov [rsp+0E8h+var_10], rdi mov [rsp+0E8h+var_18], rsi mov rdi, [rsp+0E8h+var_10] mov rax, [rdi] call qword ptr [rax+20h] mov [rsp+0E8h+var_1C], eax mov rdi, [rsp+0E8h+var_10]; memory_access * call _ZL9get_modelR13memory_access; get_model(memory_access &) mov [rsp+0E8h+var_20], eax cmp [rsp+0E8h+var_1C], 0 jnz short loc_3339D mov edi, 0FFFFFFFEh; int lea rsi, aUf2FileDoesNot; "UF2 file does not contain a valid RP2 e"... mov al, 0 call _Z4failiPKcz; fail(int,char const*,...) loc_3339D: mov [rsp+0E8h+var_24], 100h cmp [rsp+0E8h+var_20], 0 jnz short loc_333DF mov [rsp+0E8h+var_24], 40h ; '@' cmp [rsp+0E8h+var_1C], 10000000h jnz short loc_333DD mov eax, [rsp+0E8h+var_1C] add eax, 100h mov [rsp+0E8h+var_1C], eax loc_333DD: jmp short $+2 loc_333DF: mov rsi, [rsp+0E8h+var_10] mov edx, [rsp+0E8h+var_1C] mov ecx, [rsp+0E8h+var_24] lea rdi, [rsp+0E8h+var_40] mov r8d, 1 call _ZN13memory_access11read_vectorIjEESt6vectorIT_SaIS2_EEjjb; memory_access::read_vector<uint>(uint,uint,bool) mov [rsp+0E8h+var_44], 0 loc_33413: mov eax, [rsp+0E8h+var_44] mov [rsp+0E8h+var_B0], rax lea rdi, [rsp+0E8h+var_40] call _ZNKSt6vectorIjSaIjEE4sizeEv; std::vector<uint>::size(void) mov rcx, rax mov rax, [rsp+0E8h+var_B0] cmp rax, rcx jnb loc_33760 mov eax, [rsp+0E8h+var_44] mov esi, eax lea rdi, [rsp+0E8h+var_40] call _ZNSt6vectorIjSaIjEEixEm; std::vector<uint>::operator[](ulong) cmp dword ptr [rax], 7188EBF2h jnz loc_33748 mov eax, [rsp+0E8h+var_44] add eax, 4 cmp eax, [rsp+0E8h+var_24] jnb loc_33746 mov eax, [rsp+0E8h+var_44] add eax, 4 mov eax, eax mov esi, eax lea rdi, [rsp+0E8h+var_40] call _ZNSt6vectorIjSaIjEEixEm; std::vector<uint>::operator[](ulong) cmp dword ptr [rax], 0E71AA390h jnz loc_33746 mov eax, [rsp+0E8h+var_44] inc eax mov esi, eax lea rdi, [rsp+0E8h+var_40] mov [rsp+0E8h+var_C0], rdi call _ZNSt6vectorIjSaIjEEixEm; std::vector<uint>::operator[](ulong) mov rdi, [rsp+0E8h+var_C0] mov eax, [rax] mov [rsp+0E8h+var_48], eax mov eax, [rsp+0E8h+var_44] add eax, 2 mov esi, eax call _ZNSt6vectorIjSaIjEEixEm; std::vector<uint>::operator[](ulong) mov eax, [rax] mov [rsp+0E8h+var_4C], eax mov edi, [rsp+0E8h+var_48] mov esi, [rsp+0E8h+var_20] call _ZL15get_memory_typej7model_t; get_memory_type(uint,model_t) mov [rsp+0E8h+var_B4], eax jmp short $+2 loc_334FB: mov eax, [rsp+0E8h+var_B4] mov [rsp+0E8h+var_50], eax mov edi, [rsp+0E8h+var_4C] mov esi, [rsp+0E8h+var_20] call _ZL15get_memory_typej7model_t; get_memory_type(uint,model_t) mov [rsp+0E8h+var_C4], eax jmp short $+2 loc_3351F: mov eax, [rsp+0E8h+var_C4] mov [rsp+0E8h+var_60], eax mov eax, [rsp+0E8h+var_4C] cmp eax, [rsp+0E8h+var_48] jbe loc_33744 mov eax, [rsp+0E8h+var_50] cmp eax, [rsp+0E8h+var_60] jnz loc_33744 mov edi, [rsp+0E8h+var_48]; unsigned int mov esi, 4; int call _ZL15is_size_alignedji; is_size_aligned(uint,int) mov [rsp+0E8h+var_C5], al jmp short $+2 loc_33569: mov al, [rsp+0E8h+var_C5] test al, 1 jnz short loc_33576 jmp loc_33744 loc_33576: mov edi, [rsp+0E8h+var_4C]; unsigned int mov esi, 4; int call _ZL15is_size_alignedji; is_size_aligned(uint,int) mov [rsp+0E8h+var_C6], al jmp short $+2 loc_3358D: mov al, [rsp+0E8h+var_C6] test al, 1 jnz short loc_3359A jmp loc_33744 loc_3359A: mov rdi, [rsp+0E8h+var_10] mov esi, [rsp+0E8h+var_48] mov edx, [rsp+0E8h+var_4C] sub edx, esi shr edx, 2 mov rcx, [rsp+0E8h+var_18] xor r8d, r8d call _ZN13memory_access16read_into_vectorIjEEvjjRSt6vectorIT_SaIS2_EEb; memory_access::read_into_vector<uint>(uint,uint,std::vector<uint> &,bool) jmp short $+2 loc_335C7: mov eax, [rsp+0E8h+var_44] add eax, 3 mov eax, eax mov esi, eax lea rdi, [rsp+0E8h+var_40] call _ZNSt6vectorIjSaIjEEixEm; std::vector<uint>::operator[](ulong) mov eax, [rax] mov [rsp+0E8h+var_64], eax lea rdi, [rsp+0E8h+var_80] call _ZNSt6vectorIjSaIjEEC2Ev; std::vector<uint>::vector(void) loc_335F5: mov rsi, [rsp+0E8h+var_10] mov edx, [rsp+0E8h+var_64] lea rdi, [rsp+0E8h+var_98] mov ecx, 3 xor r8d, r8d call _ZN13memory_access11read_vectorIjEESt6vectorIT_SaIS2_EEjjb; memory_access::read_vector<uint>(uint,uint,bool) jmp short $+2 loc_33618: lea rdi, [rsp+0E8h+var_80] lea rsi, [rsp+0E8h+var_98] call _ZNSt6vectorIjSaIjEEaSEOS1_; std::vector<uint>::operator=(std::vector<uint>&&) lea rdi, [rsp+0E8h+var_98] call _ZNSt6vectorIjSaIjEED2Ev; std::vector<uint>::~vector() lea rdi, [rsp+0E8h+var_80] xor eax, eax mov esi, eax call _ZNSt6vectorIjSaIjEEixEm; std::vector<uint>::operator[](ulong) cmp dword ptr [rax], 0 jnz short loc_33685 jmp loc_33728 mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax jmp loc_3378E mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax lea rdi, [rsp+arg_60] call _ZNSt6vectorIjSaIjEED2Ev; std::vector<uint>::~vector() jmp loc_3378E loc_33685: mov rax, [rsp+0E8h+var_18] add rax, 18h mov [rsp+0E8h+var_E0], rax lea rdi, [rsp+0E8h+var_80] mov [rsp+0E8h+var_D8], rdi mov esi, 1 call _ZNSt6vectorIjSaIjEEixEm; std::vector<uint>::operator[](ulong) mov rdi, [rsp+0E8h+var_D8] mov eax, [rax] mov [rsp+0E8h+var_CC], eax mov esi, 2 call _ZNSt6vectorIjSaIjEEixEm; std::vector<uint>::operator[](ulong) mov esi, [rsp+0E8h+var_CC]; unsigned int mov edx, [rax]; unsigned int lea rdi, [rsp+0E8h+var_A0]; this call _ZN5rangeC2Ejj; range::range(uint,uint) jmp short $+2 loc_336D1: xor eax, eax mov esi, eax lea rdi, [rsp+0E8h+var_80] call _ZNSt6vectorIjSaIjEEixEm; std::vector<uint>::operator[](ulong) mov rdi, [rsp+0E8h+var_E0] mov edx, [rax] lea rsi, [rsp+0E8h+var_A0] call _ZN9range_mapIjE6insertERK5rangej; range_map<uint>::insert(range const&,uint) jmp short $+2 loc_336F2: mov eax, [rsp+0E8h+var_64] add eax, 0Ch mov [rsp+0E8h+var_64], eax mov rdi, [rsp+0E8h+var_18] add rdi, 18h call _ZNK9range_mapIjE4sizeEv; range_map<uint>::size(void) mov [rsp+0E8h+var_E8], rax jmp short $+2 loc_3371A: mov rax, [rsp+0E8h+var_E8] cmp rax, 0Ah jb loc_335F5 loc_33728: mov [rsp+0E8h+var_1], 1 mov [rsp+0E8h+var_A4], 1 lea rdi, [rsp+0E8h+var_80] call _ZNSt6vectorIjSaIjEED2Ev; std::vector<uint>::~vector() jmp short loc_33770 loc_33744: jmp short $+2 loc_33746: jmp short $+2 loc_33748: jmp short $+2 loc_3374A: mov eax, [rsp+0E8h+var_44] add eax, 1 mov [rsp+0E8h+var_44], eax jmp loc_33413 loc_33760: mov [rsp+0E8h+var_1], 0 mov [rsp+0E8h+var_A4], 1 loc_33770: lea rdi, [rsp+0E8h+var_40] call _ZNSt6vectorIjSaIjEED2Ev; std::vector<uint>::~vector() mov al, [rsp+0E8h+var_1] and al, 1 add rsp, 0E8h retn loc_3378E: lea rdi, [rsp+arg_A0] call _ZNSt6vectorIjSaIjEED2Ev; std::vector<uint>::~vector() mov rdi, [rsp+arg_88] call __Unwind_Resume
char find_binary_info(memory_access *a1, binary_info_header *a2) { int v2; // r9d int v3; // r9d int v4; // r9d unsigned int *v5; // rax unsigned int *v6; // rax char *v8; // [rsp+8h] [rbp-E0h] unsigned int v9; // [rsp+1Ch] [rbp-CCh] _BYTE v10[8]; // [rsp+48h] [rbp-A0h] BYREF _BYTE v11[24]; // [rsp+50h] [rbp-98h] BYREF _BYTE v12[28]; // [rsp+68h] [rbp-80h] BYREF int v13; // [rsp+84h] [rbp-64h] int v14; // [rsp+88h] [rbp-60h] int memory_type; // [rsp+98h] [rbp-50h] unsigned int v16; // [rsp+9Ch] [rbp-4Ch] unsigned int v17; // [rsp+A0h] [rbp-48h] unsigned int i; // [rsp+A4h] [rbp-44h] _BYTE v19[28]; // [rsp+A8h] [rbp-40h] BYREF unsigned int v20; // [rsp+C4h] [rbp-24h] unsigned int model; // [rsp+C8h] [rbp-20h] int v22; // [rsp+CCh] [rbp-1Ch] binary_info_header *v23; // [rsp+D0h] [rbp-18h] memory_access *v24; // [rsp+D8h] [rbp-10h] char v25; // [rsp+E7h] [rbp-1h] v24 = a1; v23 = a2; v22 = (*(long long ( **)(memory_access *))(*(_QWORD *)a1 + 32LL))(a1); model = get_model(a1); if ( !v22 ) fail(-2, "UF2 file does not contain a valid RP2 executable image"); v20 = 256; if ( !model ) { v20 = 64; if ( v22 == 0x10000000 ) v22 = 268435712; } memory_access::read_vector<unsigned int>((unsigned int)v19, (_DWORD)v24, v22, v20, 1, v2); for ( i = 0; ; ++i ) { if ( i >= (unsigned long long)std::vector<unsigned int>::size(v19) ) { v25 = 0; goto LABEL_21; } if ( *(_DWORD *)std::vector<unsigned int>::operator[](v19, i) == 1904798706 && i + 4 < v20 && *(_DWORD *)std::vector<unsigned int>::operator[](v19, i + 4) == -417684592 ) { v17 = *(_DWORD *)std::vector<unsigned int>::operator[](v19, i + 1); v16 = *(_DWORD *)std::vector<unsigned int>::operator[](v19, i + 2); memory_type = get_memory_type(v17, model); v14 = get_memory_type(v16, model); if ( v16 > v17 && memory_type == v14 && (is_size_aligned(v17, 4) & 1) != 0 && (is_size_aligned(v16, 4) & 1) != 0 ) break; } } memory_access::read_into_vector<unsigned int>((_DWORD)v24, v17, (v16 - v17) >> 2, (_DWORD)v23, 0, v3); v13 = *(_DWORD *)std::vector<unsigned int>::operator[](v19, i + 3); std::vector<unsigned int>::vector(v12); do { memory_access::read_vector<unsigned int>((unsigned int)v11, (_DWORD)v24, v13, 3, 0, v4); std::vector<unsigned int>::operator=(v12, v11); std::vector<unsigned int>::~vector(v11); if ( !*(_DWORD *)std::vector<unsigned int>::operator[](v12, 0LL) ) break; v8 = (char *)v23 + 24; v9 = *(_DWORD *)std::vector<unsigned int>::operator[](v12, 1LL); v5 = (unsigned int *)std::vector<unsigned int>::operator[](v12, 2LL); range::range((range *)v10, v9, *v5); v6 = (unsigned int *)std::vector<unsigned int>::operator[](v12, 0LL); range_map<unsigned int>::insert(v8, v10, *v6); v13 += 12; } while ( (unsigned long long)range_map<unsigned int>::size((char *)v23 + 24) < 0xA ); v25 = 1; std::vector<unsigned int>::~vector(v12); LABEL_21: std::vector<unsigned int>::~vector(v19); return v25 & 1; }
find_binary_info: SUB RSP,0xe8 MOV qword ptr [RSP + 0xd8],RDI MOV qword ptr [RSP + 0xd0],RSI MOV RDI,qword ptr [RSP + 0xd8] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x20] MOV dword ptr [RSP + 0xcc],EAX MOV RDI,qword ptr [RSP + 0xd8] CALL 0x00133130 MOV dword ptr [RSP + 0xc8],EAX CMP dword ptr [RSP + 0xcc],0x0 JNZ 0x0013339d MOV EDI,0xfffffffe LEA RSI,[0x26ff42] MOV AL,0x0 CALL 0x00218b80 LAB_0013339d: MOV dword ptr [RSP + 0xc4],0x100 CMP dword ptr [RSP + 0xc8],0x0 JNZ 0x001333df MOV dword ptr [RSP + 0xc4],0x40 CMP dword ptr [RSP + 0xcc],0x10000000 JNZ 0x001333dd MOV EAX,dword ptr [RSP + 0xcc] ADD EAX,0x100 MOV dword ptr [RSP + 0xcc],EAX LAB_001333dd: JMP 0x001333df LAB_001333df: MOV RSI,qword ptr [RSP + 0xd8] MOV EDX,dword ptr [RSP + 0xcc] MOV ECX,dword ptr [RSP + 0xc4] LEA RDI,[RSP + 0xa8] MOV R8D,0x1 CALL 0x0015ad10 MOV dword ptr [RSP + 0xa4],0x0 LAB_00133413: MOV EAX,dword ptr [RSP + 0xa4] MOV qword ptr [RSP + 0x38],RAX LEA RDI,[RSP + 0xa8] CALL 0x0015aef0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x38] CMP RAX,RCX JNC 0x00133760 MOV EAX,dword ptr [RSP + 0xa4] MOV ESI,EAX LEA RDI,[RSP + 0xa8] CALL 0x0015af10 CMP dword ptr [RAX],0x7188ebf2 JNZ 0x00133748 MOV EAX,dword ptr [RSP + 0xa4] ADD EAX,0x4 CMP EAX,dword ptr [RSP + 0xc4] JNC 0x00133746 MOV EAX,dword ptr [RSP + 0xa4] ADD EAX,0x4 MOV EAX,EAX MOV ESI,EAX LEA RDI,[RSP + 0xa8] CALL 0x0015af10 CMP dword ptr [RAX],0xe71aa390 JNZ 0x00133746 MOV EAX,dword ptr [RSP + 0xa4] INC EAX MOV ESI,EAX LEA RDI,[RSP + 0xa8] MOV qword ptr [RSP + 0x28],RDI CALL 0x0015af10 MOV RDI,qword ptr [RSP + 0x28] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0xa0],EAX MOV EAX,dword ptr [RSP + 0xa4] ADD EAX,0x2 MOV ESI,EAX CALL 0x0015af10 MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x9c],EAX MOV EDI,dword ptr [RSP + 0xa0] MOV ESI,dword ptr [RSP + 0xc8] LAB_001334f0: CALL 0x001337b0 MOV dword ptr [RSP + 0x34],EAX JMP 0x001334fb LAB_001334fb: MOV EAX,dword ptr [RSP + 0x34] MOV dword ptr [RSP + 0x98],EAX MOV EDI,dword ptr [RSP + 0x9c] MOV ESI,dword ptr [RSP + 0xc8] CALL 0x001337b0 MOV dword ptr [RSP + 0x24],EAX JMP 0x0013351f LAB_0013351f: MOV EAX,dword ptr [RSP + 0x24] MOV dword ptr [RSP + 0x88],EAX MOV EAX,dword ptr [RSP + 0x9c] CMP EAX,dword ptr [RSP + 0xa0] JBE 0x00133744 MOV EAX,dword ptr [RSP + 0x98] CMP EAX,dword ptr [RSP + 0x88] JNZ 0x00133744 MOV EDI,dword ptr [RSP + 0xa0] MOV ESI,0x4 CALL 0x00133900 MOV byte ptr [RSP + 0x23],AL JMP 0x00133569 LAB_00133569: MOV AL,byte ptr [RSP + 0x23] TEST AL,0x1 JNZ 0x00133576 JMP 0x00133744 LAB_00133576: MOV EDI,dword ptr [RSP + 0x9c] MOV ESI,0x4 CALL 0x00133900 MOV byte ptr [RSP + 0x22],AL JMP 0x0013358d LAB_0013358d: MOV AL,byte ptr [RSP + 0x22] TEST AL,0x1 JNZ 0x0013359a JMP 0x00133744 LAB_0013359a: MOV RDI,qword ptr [RSP + 0xd8] MOV ESI,dword ptr [RSP + 0xa0] MOV EDX,dword ptr [RSP + 0x9c] SUB EDX,ESI SHR EDX,0x2 MOV RCX,qword ptr [RSP + 0xd0] XOR R8D,R8D CALL 0x0015af30 JMP 0x001335c7 LAB_001335c7: MOV EAX,dword ptr [RSP + 0xa4] ADD EAX,0x3 MOV EAX,EAX MOV ESI,EAX LEA RDI,[RSP + 0xa8] CALL 0x0015af10 MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x84],EAX LEA RDI,[RSP + 0x68] CALL 0x0015b0e0 LAB_001335f5: MOV RSI,qword ptr [RSP + 0xd8] MOV EDX,dword ptr [RSP + 0x84] LAB_00133604: LEA RDI,[RSP + 0x50] MOV ECX,0x3 XOR R8D,R8D CALL 0x0015ad10 JMP 0x00133618 LAB_00133618: LEA RDI,[RSP + 0x68] LEA RSI,[RSP + 0x50] CALL 0x0015b0f0 LEA RDI,[RSP + 0x50] CALL 0x0015b130 LEA RDI,[RSP + 0x68] XOR EAX,EAX MOV ESI,EAX CALL 0x0015af10 CMP dword ptr [RAX],0x0 JNZ 0x00133685 JMP 0x00133728 LAB_00133685: MOV RAX,qword ptr [RSP + 0xd0] ADD RAX,0x18 MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0x68] MOV qword ptr [RSP + 0x10],RDI MOV ESI,0x1 CALL 0x0015af10 MOV RDI,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x1c],EAX MOV ESI,0x2 CALL 0x0015af10 MOV ESI,dword ptr [RSP + 0x1c] MOV EDX,dword ptr [RAX] LEA RDI,[RSP + 0x48] CALL 0x0015b3a0 JMP 0x001336d1 LAB_001336d1: XOR EAX,EAX MOV ESI,EAX LEA RDI,[RSP + 0x68] CALL 0x0015af10 MOV RDI,qword ptr [RSP + 0x8] MOV EDX,dword ptr [RAX] LEA RSI,[RSP + 0x48] CALL 0x0015b190 JMP 0x001336f2 LAB_001336f2: MOV EAX,dword ptr [RSP + 0x84] ADD EAX,0xc MOV dword ptr [RSP + 0x84],EAX MOV RDI,qword ptr [RSP + 0xd0] ADD RDI,0x18 CALL 0x0015b3c0 LAB_00133714: MOV qword ptr [RSP],RAX JMP 0x0013371a LAB_0013371a: MOV RAX,qword ptr [RSP] CMP RAX,0xa JC 0x001335f5 LAB_00133728: MOV byte ptr [RSP + 0xe7],0x1 MOV dword ptr [RSP + 0x44],0x1 LEA RDI,[RSP + 0x68] CALL 0x0015b130 JMP 0x00133770 LAB_00133744: JMP 0x00133746 LAB_00133746: JMP 0x00133748 LAB_00133748: JMP 0x0013374a LAB_0013374a: MOV EAX,dword ptr [RSP + 0xa4] ADD EAX,0x1 MOV dword ptr [RSP + 0xa4],EAX JMP 0x00133413 LAB_00133760: MOV byte ptr [RSP + 0xe7],0x0 MOV dword ptr [RSP + 0x44],0x1 LAB_00133770: LEA RDI,[RSP + 0xa8] CALL 0x0015b130 MOV AL,byte ptr [RSP + 0xe7] AND AL,0x1 ADD RSP,0xe8 RET
/* find_binary_info(memory_access&, binary_info_header&) */ ulong find_binary_info(memory_access *param_1,binary_info_header *param_2) { uint uVar1; byte bVar2; ulong uVar3; int *piVar4; uint *puVar5; range_map<unsigned_int> *this; ulong uVar6; int8 uVar7; range local_a0 [8]; vector<unsigned_int,std::allocator<unsigned_int>> local_98 [24]; vector<unsigned_int,std::allocator<unsigned_int>> local_80 [28]; int local_64; int local_60; int local_50; uint local_4c; uint local_48; uint local_44; vector<unsigned_int,std::allocator<unsigned_int>> local_40 [28]; uint local_24; int local_20; int local_1c; binary_info_header *local_18; memory_access *local_10; int1 local_1; local_18 = param_2; local_10 = param_1; local_1c = (**(code **)(*(long *)param_1 + 0x20))(); local_20 = get_model(local_10); if (local_1c == 0) { fail(-2,"UF2 file does not contain a valid RP2 executable image"); } local_24 = 0x100; if ((local_20 == 0) && (local_24 = 0x40, local_1c == 0x10000000)) { local_1c = 0x10000100; } memory_access::read_vector<unsigned_int>((uint)local_40,(uint)local_10,SUB41(local_1c,0)); for (local_44 = 0; uVar6 = (ulong)local_44, uVar3 = std::vector<unsigned_int,std::allocator<unsigned_int>>::size(local_40), uVar6 < uVar3; local_44 = local_44 + 1) { piVar4 = (int *)std::vector<unsigned_int,std::allocator<unsigned_int>>::operator[] (local_40,(ulong)local_44); if (((*piVar4 == 0x7188ebf2) && (local_44 + 4 < local_24)) && (piVar4 = (int *)std::vector<unsigned_int,std::allocator<unsigned_int>>::operator[] (local_40,(ulong)(local_44 + 4)), *piVar4 == -0x18e55c70)) { puVar5 = (uint *)std::vector<unsigned_int,std::allocator<unsigned_int>>::operator[] (local_40,(ulong)(local_44 + 1)); local_48 = *puVar5; puVar5 = (uint *)std::vector<unsigned_int,std::allocator<unsigned_int>>::operator[] (local_40,(ulong)(local_44 + 2)); local_4c = *puVar5; /* try { // try from 001334f0 to 001335c4 has its CatchHandler @ 00133649 */ local_50 = get_memory_type(local_48,local_20); local_60 = get_memory_type(local_4c,local_20); if (((local_48 < local_4c) && (local_50 == local_60)) && ((bVar2 = is_size_aligned(local_48,4), (bVar2 & 1) != 0 && (bVar2 = is_size_aligned(local_4c,4), (bVar2 & 1) != 0)))) { memory_access::read_into_vector<unsigned_int> (local_10,local_48,local_4c - local_48 >> 2,local_18,false); piVar4 = (int *)std::vector<unsigned_int,std::allocator<unsigned_int>>::operator[] (local_40,(ulong)(local_44 + 3)); local_64 = *piVar4; std::vector<unsigned_int,std::allocator<unsigned_int>>::vector(local_80); goto LAB_001335f5; } } } local_1 = 0; goto LAB_00133770; while( true ) { this = (range_map<unsigned_int> *)(local_18 + 0x18); puVar5 = (uint *)std::vector<unsigned_int,std::allocator<unsigned_int>>::operator[](local_80,1); uVar1 = *puVar5; puVar5 = (uint *)std::vector<unsigned_int,std::allocator<unsigned_int>>::operator[](local_80,2); range::range(local_a0,uVar1,*puVar5); puVar5 = (uint *)std::vector<unsigned_int,std::allocator<unsigned_int>>::operator[](local_80,0); range_map<unsigned_int>::insert(this,local_a0,*puVar5); local_64 = local_64 + 0xc; uVar6 = range_map<unsigned_int>::size((range_map<unsigned_int> *)(local_18 + 0x18)); if (9 < uVar6) break; LAB_001335f5: /* try { // try from 00133604 to 00133713 has its CatchHandler @ 00133662 */ memory_access::read_vector<unsigned_int>((uint)local_98,(uint)local_10,SUB41(local_64,0)); std::vector<unsigned_int,std::allocator<unsigned_int>>::operator=(local_80,local_98); std::vector<unsigned_int,std::allocator<unsigned_int>>::~vector(local_98); piVar4 = (int *)std::vector<unsigned_int,std::allocator<unsigned_int>>::operator[](local_80,0); if (*piVar4 == 0) break; } local_1 = 1; std::vector<unsigned_int,std::allocator<unsigned_int>>::~vector(local_80); LAB_00133770: uVar7 = std::vector<unsigned_int,std::allocator<unsigned_int>>::~vector(local_40); return CONCAT71((int7)((ulong)uVar7 >> 8),local_1) & 0xffffffffffffff01; }
21,761
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&)
monkey531[P]llama/common/json.hpp
static diyfp mul(const diyfp& x, const diyfp& y) noexcept { static_assert(kPrecision == 64, "internal error"); // Computes: // f = round((x.f * y.f) / 2^q) // e = x.e + y.e + q // Emulate the 64-bit * 64-bit multiplication: // // p = u * v // = (u_lo + 2^32 u_hi) (v_lo + 2^32 v_hi) // = (u_lo v_lo ) + 2^32 ((u_lo v_hi ) + (u_hi v_lo )) + 2^64 (u_hi v_hi ) // = (p0 ) + 2^32 ((p1 ) + (p2 )) + 2^64 (p3 ) // = (p0_lo + 2^32 p0_hi) + 2^32 ((p1_lo + 2^32 p1_hi) + (p2_lo + 2^32 p2_hi)) + 2^64 (p3 ) // = (p0_lo ) + 2^32 (p0_hi + p1_lo + p2_lo ) + 2^64 (p1_hi + p2_hi + p3) // = (p0_lo ) + 2^32 (Q ) + 2^64 (H ) // = (p0_lo ) + 2^32 (Q_lo + 2^32 Q_hi ) + 2^64 (H ) // // (Since Q might be larger than 2^32 - 1) // // = (p0_lo + 2^32 Q_lo) + 2^64 (Q_hi + H) // // (Q_hi + H does not overflow a 64-bit int) // // = p_lo + 2^64 p_hi const std::uint64_t u_lo = x.f & 0xFFFFFFFFu; const std::uint64_t u_hi = x.f >> 32u; const std::uint64_t v_lo = y.f & 0xFFFFFFFFu; const std::uint64_t v_hi = y.f >> 32u; const std::uint64_t p0 = u_lo * v_lo; const std::uint64_t p1 = u_lo * v_hi; const std::uint64_t p2 = u_hi * v_lo; const std::uint64_t p3 = u_hi * v_hi; const std::uint64_t p0_hi = p0 >> 32u; const std::uint64_t p1_lo = p1 & 0xFFFFFFFFu; const std::uint64_t p1_hi = p1 >> 32u; const std::uint64_t p2_lo = p2 & 0xFFFFFFFFu; const std::uint64_t p2_hi = p2 >> 32u; std::uint64_t Q = p0_hi + p1_lo + p2_lo; // The full product might now be computed as // // p_hi = p3 + p2_hi + p1_hi + (Q >> 32) // p_lo = p0_lo + (Q << 32) // // But in this particular case here, the full p_lo is not required. // Effectively we only need to add the highest bit in p_lo to p_hi (and // Q_hi + 1 does not overflow). Q += std::uint64_t{1} << (64u - 32u - 1u); // round, ties up const std::uint64_t h = p3 + p2_hi + p1_hi + (Q >> 32u); return {h, x.e + y.e + 64}; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&): movq (%rdi), %rax movl %eax, %ecx shrq $0x20, %rax movq (%rsi), %r8 movl %r8d, %edx shrq $0x20, %r8 movq %rdx, %r9 imulq %rcx, %r9 imulq %r8, %rcx imulq %rax, %rdx imulq %rax, %r8 shrq $0x20, %r9 movl %ecx, %r10d addq %r9, %r10 shrq $0x20, %rcx movl %edx, %eax addq %r10, %rax shrq $0x20, %rdx addq %r8, %rdx addq %rcx, %rdx subq $-0x80000000, %rax # imm = 0x80000000 shrq $0x20, %rax addq %rdx, %rax movl 0x8(%rdi), %ecx movl 0x8(%rsi), %edx addl %ecx, %edx addl $0x40, %edx retq
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_: mov rax, [rdi] mov ecx, eax shr rax, 20h mov r8, [rsi] mov edx, r8d shr r8, 20h mov r9, rdx imul r9, rcx imul rcx, r8 imul rdx, rax imul r8, rax shr r9, 20h mov r10d, ecx add r10, r9 shr rcx, 20h mov eax, edx add rax, r10 shr rdx, 20h add rdx, r8 add rdx, rcx sub rax, 0FFFFFFFF80000000h shr rax, 20h add rax, rdx mov ecx, [rdi+8] mov edx, [rsi+8] add edx, ecx add edx, 40h ; '@' retn
unsigned long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(_QWORD *a1, _QWORD *a2) { long long v2; // rcx v2 = (unsigned int)*a1; return ((unsigned long long)(HIDWORD(*a2) * v2) >> 32) + HIDWORD(*a1) * HIDWORD(*a2) + ((HIDWORD(*a1) * (unsigned long long)(unsigned int)*a2) >> 32) + ((((v2 * (unsigned long long)(unsigned int)*a2) >> 32) + (unsigned int)(HIDWORD(*a2) * v2) + (unsigned int)(HIDWORD(*a1) * *a2) + 0x80000000) >> 32); }
mul: MOV RAX,qword ptr [RDI] MOV ECX,EAX SHR RAX,0x20 MOV R8,qword ptr [RSI] MOV EDX,R8D SHR R8,0x20 MOV R9,RDX IMUL R9,RCX IMUL RCX,R8 IMUL RDX,RAX IMUL R8,RAX SHR R9,0x20 MOV R10D,ECX ADD R10,R9 SHR RCX,0x20 MOV EAX,EDX ADD RAX,R10 SHR RDX,0x20 ADD RDX,R8 ADD RDX,RCX SUB RAX,-0x80000000 SHR RAX,0x20 ADD RAX,RDX MOV ECX,dword ptr [RDI + 0x8] MOV EDX,dword ptr [RSI + 0x8] ADD EDX,ECX ADD EDX,0x40 RET
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) */ int1 [16] nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(diyfp *param_1,diyfp *param_2) { ulong uVar1; ulong uVar2; ulong uVar3; ulong uVar4; ulong uVar5; ulong uVar6; int1 auVar7 [16]; uVar2 = *(ulong *)param_1 & 0xffffffff; uVar1 = *(ulong *)param_1 >> 0x20; uVar4 = *(ulong *)param_2 & 0xffffffff; uVar6 = *(ulong *)param_2 >> 0x20; uVar3 = uVar2 * uVar6; uVar5 = uVar4 * uVar1; auVar7._0_8_ = ((uVar5 & 0xffffffff) + (uVar3 & 0xffffffff) + (uVar4 * uVar2 >> 0x20) + 0x80000000 >> 0x20) + (uVar5 >> 0x20) + uVar6 * uVar1 + (uVar3 >> 0x20); auVar7._8_4_ = *(int *)(param_2 + 8) + *(int *)(param_1 + 8) + 0x40; auVar7._12_4_ = 0; return auVar7; }
21,762
ggml_argsort
monkey531[P]llama/ggml/src/ggml.c
struct ggml_tensor * ggml_argsort( struct ggml_context * ctx, struct ggml_tensor * a, enum ggml_sort_order order) { GGML_ASSERT(a->ne[0] <= INT32_MAX); struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_I32, GGML_MAX_DIMS, a->ne); ggml_set_op_params_i32(result, 0, (int32_t) order); result->op = GGML_OP_ARGSORT; result->src[0] = a; return result; }
O0
c
ggml_argsort: subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movl %edx, 0x14(%rsp) movq 0x18(%rsp), %rax cmpq $0x7fffffff, 0x10(%rax) # imm = 0x7FFFFFFF jle 0x51622 leaq 0x62faf(%rip), %rdi # 0xb45b7 movl $0x10b3, %esi # imm = 0x10B3 leaq 0x62fed(%rip), %rdx # 0xb4601 leaq 0x6311f(%rip), %rcx # 0xb473a movb $0x0, %al callq 0x46770 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rcx addq $0x10, %rcx movl $0x1a, %esi movl $0x4, %edx callq 0x40500 movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rdi movl 0x14(%rsp), %edx xorl %esi, %esi callq 0x4c020 movq 0x8(%rsp), %rax movl $0x3b, 0x50(%rax) movq 0x18(%rsp), %rcx movq 0x8(%rsp), %rax movq %rcx, 0x98(%rax) movq 0x8(%rsp), %rax addq $0x28, %rsp retq nopl (%rax,%rax)
ggml_argsort: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov [rsp+28h+var_14], edx mov rax, [rsp+28h+var_10] cmp qword ptr [rax+10h], 7FFFFFFFh jle short loc_51622 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 10B3h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aANe0Int32Max; "a->ne[0] <= INT32_MAX" mov al, 0 call _ggml_abort loc_51622: mov rdi, [rsp+28h+var_8] mov rcx, [rsp+28h+var_10] add rcx, 10h mov esi, 1Ah mov edx, 4 call _ggml_new_tensor mov [rsp+28h+var_20], rax mov rdi, [rsp+28h+var_20] mov edx, [rsp+28h+var_14] xor esi, esi call ggml_set_op_params_i32 mov rax, [rsp+28h+var_20] mov dword ptr [rax+50h], 3Bh ; ';' mov rcx, [rsp+28h+var_10] mov rax, [rsp+28h+var_20] mov [rax+98h], rcx mov rax, [rsp+28h+var_20] add rsp, 28h retn
long long ggml_argsort(long long a1, long long a2, int a3) { long long v4; // [rsp+8h] [rbp-20h] if ( *(long long *)(a2 + 16) > 0x7FFFFFFF ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c", 4275, (long long)"GGML_ASSERT(%s) failed", "a->ne[0] <= INT32_MAX"); v4 = ggml_new_tensor(a1, 0x1Au, 4u, a2 + 16); ggml_set_op_params_i32(v4, 0, a3); *(_DWORD *)(v4 + 80) = 59; *(_QWORD *)(v4 + 152) = a2; return v4; }
ggml_argsort: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV dword ptr [RSP + 0x14],EDX MOV RAX,qword ptr [RSP + 0x18] CMP qword ptr [RAX + 0x10],0x7fffffff JLE 0x00151622 LEA RDI,[0x1b45b7] MOV ESI,0x10b3 LEA RDX,[0x1b4601] LEA RCX,[0x1b473a] MOV AL,0x0 CALL 0x00146770 LAB_00151622: MOV RDI,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x18] ADD RCX,0x10 MOV ESI,0x1a MOV EDX,0x4 CALL 0x00140500 MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x8] MOV EDX,dword ptr [RSP + 0x14] XOR ESI,ESI CALL 0x0014c020 MOV RAX,qword ptr [RSP + 0x8] MOV dword ptr [RAX + 0x50],0x3b MOV RCX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x98],RCX MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x28 RET
long ggml_argsort(int8 param_1,long param_2,int4 param_3) { long lVar1; if (0x7fffffff < *(long *)(param_2 + 0x10)) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0x10b3, "GGML_ASSERT(%s) failed","a->ne[0] <= INT32_MAX"); } lVar1 = ggml_new_tensor(param_1,0x1a,4,param_2 + 0x10); ggml_set_op_params_i32(lVar1,0,param_3); *(int4 *)(lVar1 + 0x50) = 0x3b; *(long *)(lVar1 + 0x98) = param_2; return lVar1; }
21,763
ma_store_length
eloqsql/storage/maria/ma_blockrec.c
uchar *ma_store_length(uchar *to, ulong nr) { if (nr < 251) { *to=(uchar) nr; return to+1; } if (nr < 65536) { if (nr <= 255) { to[0]= (uchar) 251; to[1]= (uchar) nr; return to+2; } to[0]= (uchar) 252; int2store(to+1, nr); return to+3; } if (nr < 16777216) { *to++= (uchar) 253; int3store(to, nr); return to+3; } *to++= (uchar) 254; int4store(to, nr); return to+4; }
O0
c
ma_store_length: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) cmpq $0xfb, -0x18(%rbp) jae 0x78a73 movq -0x18(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x8(%rbp) jmp 0x78b67 cmpq $0x10000, -0x18(%rbp) # imm = 0x10000 jae 0x78ade cmpq $0xff, -0x18(%rbp) ja 0x78aac movq -0x10(%rbp), %rax movb $-0x5, (%rax) movq -0x18(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x10(%rbp), %rax addq $0x2, %rax movq %rax, -0x8(%rbp) jmp 0x78b67 movq -0x10(%rbp), %rax movb $-0x4, (%rax) movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movw %ax, %cx movq -0x20(%rbp), %rax movw %cx, (%rax) movq -0x10(%rbp), %rax addq $0x3, %rax movq %rax, -0x8(%rbp) jmp 0x78b67 cmpq $0x1000000, -0x18(%rbp) # imm = 0x1000000 jae 0x78b35 movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb $-0x3, (%rax) movq -0x18(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) movq -0x18(%rbp), %rax shrl $0x8, %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x18(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x10(%rbp), %rax addq $0x3, %rax movq %rax, -0x8(%rbp) jmp 0x78b67 movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb $-0x2, (%rax) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movl %eax, %ecx movq -0x28(%rbp), %rax movl %ecx, (%rax) movq -0x10(%rbp), %rax addq $0x4, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopl (%rax)
ma_store_length: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi cmp [rbp+var_18], 0FBh jnb short loc_78A73 mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_10] mov [rax], cl mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_8], rax jmp loc_78B67 loc_78A73: cmp [rbp+var_18], offset stru_10000 jnb short loc_78ADE cmp [rbp+var_18], 0FFh ja short loc_78AAC mov rax, [rbp+var_10] mov byte ptr [rax], 0FBh mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_10] add rax, 2 mov [rbp+var_8], rax jmp loc_78B67 loc_78AAC: mov rax, [rbp+var_10] mov byte ptr [rax], 0FCh mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_20], rax mov rax, [rbp+var_18] mov cx, ax mov rax, [rbp+var_20] mov [rax], cx mov rax, [rbp+var_10] add rax, 3 mov [rbp+var_8], rax jmp loc_78B67 loc_78ADE: cmp [rbp+var_18], 1000000h jnb short loc_78B35 mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov byte ptr [rax], 0FDh mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_10] mov [rax], cl mov rax, [rbp+var_18] shr eax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_18] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_10] add rax, 3 mov [rbp+var_8], rax jmp short loc_78B67 loc_78B35: mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov byte ptr [rax], 0FEh mov rax, [rbp+var_10] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov ecx, eax mov rax, [rbp+var_28] mov [rax], ecx mov rax, [rbp+var_10] add rax, 4 mov [rbp+var_8], rax loc_78B67: mov rax, [rbp+var_8] pop rbp retn
long long ma_store_length(long long a1, unsigned long long a2) { if ( a2 >= 0xFB ) { if ( a2 >= (unsigned long long)&stru_10000 ) { if ( a2 >= 0x1000000 ) { *(_BYTE *)a1 = -2; *(_DWORD *)(a1 + 1) = a2; return a1 + 5; } else { *(_BYTE *)a1 = -3; *(_WORD *)(a1 + 1) = a2; *(_BYTE *)(a1 + 3) = BYTE2(a2); return a1 + 4; } } else if ( a2 > 0xFF ) { *(_BYTE *)a1 = -4; *(_WORD *)(a1 + 1) = a2; return a1 + 3; } else { *(_BYTE *)a1 = -5; *(_BYTE *)(a1 + 1) = a2; return a1 + 2; } } else { *(_BYTE *)a1 = a2; return a1 + 1; } }
ma_store_length: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI CMP qword ptr [RBP + -0x18],0xfb JNC 0x00178a73 MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x8],RAX JMP 0x00178b67 LAB_00178a73: CMP qword ptr [RBP + -0x18],0x10000 JNC 0x00178ade CMP qword ptr [RBP + -0x18],0xff JA 0x00178aac MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0xfb MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 MOV qword ptr [RBP + -0x8],RAX JMP 0x00178b67 LAB_00178aac: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0xfc MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV CX,AX MOV RAX,qword ptr [RBP + -0x20] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x3 MOV qword ptr [RBP + -0x8],RAX JMP 0x00178b67 LAB_00178ade: CMP qword ptr [RBP + -0x18],0x1000000 JNC 0x00178b35 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV byte ptr [RAX],0xfd MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x3 MOV qword ptr [RBP + -0x8],RAX JMP 0x00178b67 LAB_00178b35: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV byte ptr [RAX],0xfe MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x4 MOV qword ptr [RBP + -0x8],RAX LAB_00178b67: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
int1 * ma_store_length(int1 *param_1,ulong param_2) { int1 uVar1; int1 *local_10; uVar1 = (int1)param_2; if (param_2 < 0xfb) { *param_1 = uVar1; local_10 = param_1 + 1; } else if (param_2 < 0x10000) { if (param_2 < 0x100) { *param_1 = 0xfb; param_1[1] = uVar1; local_10 = param_1 + 2; } else { *param_1 = 0xfc; *(short *)(param_1 + 1) = (short)param_2; local_10 = param_1 + 3; } } else if (param_2 < 0x1000000) { *param_1 = 0xfd; param_1[1] = uVar1; param_1[2] = (char)(param_2 >> 8); param_1[3] = (char)(param_2 >> 0x10); local_10 = param_1 + 4; } else { *param_1 = 0xfe; *(int *)(param_1 + 1) = (int)param_2; local_10 = param_1 + 5; } return local_10; }
21,764
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> CLI::detail::join<std::vector<CLI::App*, std::allocator<CLI::App*>>, CLI::App::_process_requirements()::'lambda'(CLI::App const*), void>(std::vector<CLI::App*, std::allocator<CLI::App*>> const&, CLI::App::_process_requirements()::'lambda'(CLI::App const*), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
MikePodsytnik[P]TCRtrie/build_O1/_deps/cli11-src/include/CLI/StringTools.hpp
std::string join(const T &v, Callable func, std::string delim = ",") { std::ostringstream s; auto beg = std::begin(v); auto end = std::end(v); auto loc = s.tellp(); while(beg != end) { auto nloc = s.tellp(); if(nloc > loc) { s << delim; loc = nloc; } s << func(*beg++); } return s.str(); }
O1
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> CLI::detail::join<std::vector<CLI::App*, std::allocator<CLI::App*>>, CLI::App::_process_requirements()::'lambda'(CLI::App const*), void>(std::vector<CLI::App*, std::allocator<CLI::App*>> const&, CLI::App::_process_requirements()::'lambda'(CLI::App const*), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1a8, %rsp # imm = 0x1A8 movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbp leaq 0x30(%rsp), %r13 movq %r13, %rdi callq 0x7580 movq (%r15), %rbx movq 0x8(%r15), %r12 movq %r13, %rdi callq 0x7380 movq %rbp, 0x28(%rsp) cmpq %r12, %rbx je 0x25bb6 movq %rax, %r13 leaq 0x30(%rsp), %r15 movq %r15, %rdi callq 0x7380 movq %rax, %rbp cmpq %r13, %rax jle 0x25b70 movq (%r14), %rsi movq 0x8(%r14), %rdx movq %r15, %rdi callq 0x74b0 movq %rbp, %r13 movq (%rbx), %rsi leaq 0x8(%rsp), %rdi xorl %edx, %edx callq 0x2518a movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %r15, %rdi callq 0x74b0 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x25bad movq 0x18(%rsp), %rsi incq %rsi callq 0x7430 addq $0x8, %rbx cmpq %r12, %rbx jne 0x25b4e leaq 0x38(%rsp), %rsi movq 0x28(%rsp), %rbx movq %rbx, %rdi callq 0x7680 movq 0x243c1(%rip), %rsi # 0x49f90 leaq 0x30(%rsp), %rdi callq 0x7200 leaq 0xa0(%rsp), %rdi callq 0x7150 movq %rbx, %rax addq $0x1a8, %rsp # imm = 0x1A8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x25c20 jmp 0x25c20 movq %rax, %rbx movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x25c23 movq 0x18(%rsp), %rsi incq %rsi callq 0x7430 jmp 0x25c23 movq %rax, %rbx movq 0x24366(%rip), %rsi # 0x49f90 leaq 0x30(%rsp), %rdi callq 0x7200 leaq 0xa0(%rsp), %rdi callq 0x7150 movq %rbx, %rdi callq 0x7780 nop
_ZN3CLI6detail4joinISt6vectorIPNS_3AppESaIS4_EEZNS3_21_process_requirementsEvEUlPKS3_E_vEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_T0_SF_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1A8h mov r14, rdx mov r15, rsi mov rbp, rdi lea r13, [rsp+1D8h+var_1A8] mov rdi, r13 call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) mov rbx, [r15] mov r12, [r15+8] mov rdi, r13; this call __ZNSo5tellpEv; std::ostream::tellp(void) mov [rsp+1D8h+var_1B0], rbp cmp rbx, r12 jz short loc_25BB6 mov r13, rax lea r15, [rsp+1D8h+var_1A8] loc_25B4E: mov rdi, r15; this call __ZNSo5tellpEv; std::ostream::tellp(void) mov rbp, rax cmp rax, r13 jle short loc_25B70 mov rsi, [r14] mov rdx, [r14+8] 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) mov r13, rbp loc_25B70: mov rsi, [rbx] lea rdi, [rsp+1D8h+var_1D0] xor edx, edx call _ZNK3CLI3App16get_display_nameB5cxx11Eb; CLI::App::get_display_name(bool) mov rsi, [rsp+1D8h+var_1D0] mov rdx, [rsp+1D8h+var_1C8] 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) mov rdi, [rsp+1D8h+var_1D0]; void * lea rax, [rsp+1D8h+var_1C0] cmp rdi, rax jz short loc_25BAD mov rsi, [rsp+1D8h+var_1C0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_25BAD: add rbx, 8 cmp rbx, r12 jnz short loc_25B4E loc_25BB6: lea rsi, [rsp+1D8h+var_1A0] mov rbx, [rsp+1D8h+var_1B0] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+1D8h+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+1D8h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rax, rbx add rsp, 1A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_25C20 jmp short loc_25C20 mov rbx, rax mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] cmp rdi, rax jz short loc_25C23 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_25C23 loc_25C20: mov rbx, rax loc_25C23: mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_28] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+arg_98]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
long long CLI::detail::join<std::vector<CLI::App *>,CLI::App::_process_requirements(void)::{lambda(CLI::App const*)#1},void>( long long a1, long long **a2, _QWORD *a3) { long long *v4; // rbx long long *v5; // r12 long long v6; // rax long long v7; // r13 long long v8; // rbp long long v9; // rbx void *v11[2]; // [rsp+8h] [rbp-1D0h] BYREF long long v12; // [rsp+18h] [rbp-1C0h] BYREF long long v13; // [rsp+28h] [rbp-1B0h] char v14[8]; // [rsp+30h] [rbp-1A8h] BYREF char v15[104]; // [rsp+38h] [rbp-1A0h] BYREF char v16[312]; // [rsp+A0h] [rbp-138h] BYREF std::ostringstream::basic_ostringstream(v14); v4 = *a2; v5 = a2[1]; v6 = std::ostream::tellp((std::ostream *)v14); v13 = a1; if ( v4 != v5 ) { v7 = v6; do { v8 = std::ostream::tellp((std::ostream *)v14); if ( v8 > v7 ) { std::__ostream_insert<char,std::char_traits<char>>(v14, *a3, a3[1]); v7 = v8; } CLI::App::get_display_name[abi:cxx11]((long long)v11, *v4, 0); std::__ostream_insert<char,std::char_traits<char>>(v14, v11[0], v11[1]); if ( v11[0] != &v12 ) operator delete(v11[0], v12 + 1); ++v4; } while ( v4 != v5 ); } v9 = v13; std::stringbuf::str(v13, v15); std::ostringstream::~ostringstream(v14, &`VTT for'std::ostringstream); std::ios_base::~ios_base((std::ios_base *)v16); return v9; }
join<std::vector<CLI::App*,std::allocator<CLI::App*>>,CLI::App::_process_requirements()::{lambda(CLI::App_const*)#1},void>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1a8 MOV R14,RDX MOV R15,RSI MOV RBP,RDI LEA R13,[RSP + 0x30] MOV RDI,R13 CALL 0x00107580 MOV RBX,qword ptr [R15] MOV R12,qword ptr [R15 + 0x8] LAB_00125b34: MOV RDI,R13 CALL 0x00107380 MOV qword ptr [RSP + 0x28],RBP CMP RBX,R12 JZ 0x00125bb6 MOV R13,RAX LEA R15,[RSP + 0x30] LAB_00125b4e: MOV RDI,R15 CALL 0x00107380 MOV RBP,RAX CMP RAX,R13 JLE 0x00125b70 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] MOV RDI,R15 CALL 0x001074b0 MOV R13,RBP LAB_00125b70: MOV RSI,qword ptr [RBX] LAB_00125b73: LEA RDI,[RSP + 0x8] XOR EDX,EDX CALL 0x0012518a MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_00125b89: MOV RDI,R15 CALL 0x001074b0 MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x00125bad MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00107430 LAB_00125bad: ADD RBX,0x8 CMP RBX,R12 JNZ 0x00125b4e LAB_00125bb6: LEA RSI,[RSP + 0x38] LAB_00125bbb: MOV RBX,qword ptr [RSP + 0x28] MOV RDI,RBX CALL 0x00107680 LAB_00125bc8: MOV RSI,qword ptr [0x00149f90] LEA RDI,[RSP + 0x30] CALL 0x00107200 LEA RDI,[RSP + 0xa0] CALL 0x00107150 MOV RAX,RBX ADD RSP,0x1a8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* std::__cxx11::string CLI::detail::join<std::vector<CLI::App*, std::allocator<CLI::App*> >, CLI::App::_process_requirements()::{lambda(CLI::App const*)#1}, void>(std::vector<CLI::App*, std::allocator<CLI::App*> > const&, CLI::App::_process_requirements()::{lambda(CLI::App const*)#1}, std::__cxx11::string) */ int8 CLI::detail:: join<std::vector<CLI::App*,std::allocator<CLI::App*>>,CLI::App::_process_requirements()::_lambda(CLI::App_const*)_1_,void> (int8 param_1,long *param_2,int8 *param_3) { long lVar1; int8 uVar2; long lVar3; long lVar4; long lVar5; long *local_1d0; long local_1c8; long local_1c0 [2]; int8 local_1b0; ostringstream local_1a8 [112]; ios_base local_138 [264]; std::__cxx11::ostringstream::ostringstream(local_1a8); lVar5 = *param_2; lVar1 = param_2[1]; /* try { // try from 00125b34 to 00125b3b has its CatchHandler @ 00125bfb */ lVar3 = std::ostream::tellp(); local_1b0 = param_1; if (lVar5 != lVar1) { do { /* try { // try from 00125b4e to 00125b6c has its CatchHandler @ 00125c20 */ lVar4 = std::ostream::tellp(); if (lVar3 < lVar4) { std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_1a8,(char *)*param_3,param_3[1]); lVar3 = lVar4; } /* try { // try from 00125b73 to 00125b7e has its CatchHandler @ 00125bfd */ App::get_display_name_abi_cxx11_(SUB81(&local_1d0,0)); /* try { // try from 00125b89 to 00125b90 has its CatchHandler @ 00125bff */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_1a8,(char *)local_1d0,local_1c8); if (local_1d0 != local_1c0) { operator_delete(local_1d0,local_1c0[0] + 1); } lVar5 = lVar5 + 8; } while (lVar5 != lVar1); } uVar2 = local_1b0; /* try { // try from 00125bbb to 00125bc7 has its CatchHandler @ 00125bfb */ std::__cxx11::stringbuf::str(); std::__cxx11::ostringstream::~ostringstream(local_1a8); std::ios_base::~ios_base(local_138); return uVar2; }
21,765
test_mean::build_graph(ggml_context*)
monkey531[P]llama/tests/test-backend-ops.cpp
ggml_tensor * build_graph(ggml_context * ctx) override { ggml_tensor * a = ggml_new_tensor(ctx, type, 4, ne.data()); ggml_set_param(ctx, a); ggml_set_name(a, "a"); ggml_tensor * out = ggml_mean(ctx, a); ggml_set_name(out, "out"); return out; }
O2
cpp
test_mean::build_graph(ggml_context*): pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movl 0x38(%rdi), %edx leaq 0x40(%rdi), %r8 pushq $0x4 popq %rcx callq 0x1d200 movq %rax, %r14 movq %rbx, %rdi movq %rax, %rsi callq 0xfac0 leaq 0x5a1c(%rip), %rsi # 0x30d8b movq %r14, %rdi callq 0xfb40 movq %rbx, %rdi movq %r14, %rsi callq 0xf730 movq %rax, %rbx leaq 0x5fa6(%rip), %rsi # 0x31332 movq %rax, %rdi callq 0xfb40 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN9test_mean11build_graphEP12ggml_context: push r14 push rbx push rax mov rbx, rsi mov edx, [rdi+38h] lea r8, [rdi+40h] push 4 pop rcx call _ZN9test_case15ggml_new_tensorEP12ggml_context9ggml_typeiPKl; test_case::ggml_new_tensor(ggml_context *,ggml_type,int,long const*) mov r14, rax mov rdi, rbx mov rsi, rax call _ggml_set_param lea rsi, aViewOfA+8; "a" mov rdi, r14 call _ggml_set_name mov rdi, rbx mov rsi, r14 call _ggml_mean mov rbx, rax lea rsi, aSumOfOut+7; "out" mov rdi, rax call _ggml_set_name mov rax, rbx add rsp, 8 pop rbx pop r14 retn
long long test_mean::build_graph(long long a1, long long a2) { long long v2; // r14 long long v3; // rbx v2 = test_case::ggml_new_tensor(a1, a2, *(_DWORD *)(a1 + 56), 4u, a1 + 64); ggml_set_param(a2, v2); ggml_set_name(v2, "a"); v3 = ggml_mean(a2, v2); ggml_set_name(v3, "out"); return v3; }
build_graph: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV EDX,dword ptr [RDI + 0x38] LEA R8,[RDI + 0x40] PUSH 0x4 POP RCX CALL 0x0011d200 MOV R14,RAX MOV RDI,RBX MOV RSI,RAX CALL 0x0010fac0 LEA RSI,[0x130d8b] MOV RDI,R14 CALL 0x0010fb40 MOV RDI,RBX MOV RSI,R14 CALL 0x0010f730 MOV RBX,RAX LEA RSI,[0x131332] MOV RDI,RAX CALL 0x0010fb40 MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* test_mean::build_graph(ggml_context*) */ int8 __thiscall test_mean::build_graph(test_mean *this,ggml_context *param_1) { int8 uVar1; uVar1 = test_case::ggml_new_tensor ((test_case *)this,param_1,*(int4 *)(this + 0x38),4,this + 0x40); ggml_set_param(param_1,uVar1); ggml_set_name(uVar1,"a"); uVar1 = ggml_mean(param_1,uVar1); ggml_set_name(uVar1,"out"); return uVar1; }
21,766
pvio_socket_blocking
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
int pvio_socket_blocking(MARIADB_PVIO *pvio, my_bool block, my_bool *previous_mode) { my_bool is_blocking; struct st_pvio_socket *csock; int new_fcntl_mode; if (!pvio || !pvio->data) return 1; csock = (struct st_pvio_socket *)pvio->data; is_blocking = !(csock->fcntl_mode & O_NONBLOCK); if (previous_mode) *previous_mode = is_blocking; if (is_blocking == block) return 0; if (block) new_fcntl_mode = csock->fcntl_mode & ~O_NONBLOCK; else new_fcntl_mode = csock->fcntl_mode | O_NONBLOCK; #ifdef _WIN32 { ulong arg = block ? 0 : 1; if (ioctlsocket(csock->socket, FIONBIO, (void *)&arg)) { return(WSAGetLastError()); } } #else if (fcntl(csock->socket, F_SETFL, new_fcntl_mode) == -1) { return errno; } #endif csock->fcntl_mode = new_fcntl_mode; return 0; }
O0
c
pvio_socket_blocking: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movb %sil, %al movq %rdi, -0x10(%rbp) movb %al, -0x11(%rbp) movq %rdx, -0x20(%rbp) cmpq $0x0, -0x10(%rbp) je 0x19af7 movq -0x10(%rbp), %rax cmpq $0x0, (%rax) jne 0x19b03 movl $0x1, -0x4(%rbp) jmp 0x19bac movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movl 0x4(%rax), %eax andl $0x800, %eax # imm = 0x800 cmpl $0x0, %eax setne %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax movb %al, -0x21(%rbp) cmpq $0x0, -0x20(%rbp) je 0x19b3a movb -0x21(%rbp), %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movsbl -0x21(%rbp), %eax movsbl -0x11(%rbp), %ecx cmpl %ecx, %eax jne 0x19b4f movl $0x0, -0x4(%rbp) jmp 0x19bac cmpb $0x0, -0x11(%rbp) je 0x19b66 movq -0x30(%rbp), %rax movl 0x4(%rax), %eax andl $0xfffff7ff, %eax # imm = 0xFFFFF7FF movl %eax, -0x34(%rbp) jmp 0x19b75 movq -0x30(%rbp), %rax movl 0x4(%rax), %eax orl $0x800, %eax # imm = 0x800 movl %eax, -0x34(%rbp) movq -0x30(%rbp), %rax movl (%rax), %edi movl -0x34(%rbp), %edx movl $0x4, %esi movb $0x0, %al callq 0x17960 cmpl $-0x1, %eax jne 0x19b9b callq 0x17050 movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x19bac movl -0x34(%rbp), %ecx movq -0x30(%rbp), %rax movl %ecx, 0x4(%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
pvio_socket_blocking: push rbp mov rbp, rsp sub rsp, 40h mov al, sil mov [rbp+var_10], rdi mov [rbp+var_11], al mov [rbp+var_20], rdx cmp [rbp+var_10], 0 jz short loc_19AF7 mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jnz short loc_19B03 loc_19AF7: mov [rbp+var_4], 1 jmp loc_19BAC loc_19B03: mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_30], rax mov rax, [rbp+var_30] mov eax, [rax+4] and eax, 800h cmp eax, 0 setnz al xor al, 0FFh and al, 1 movzx eax, al mov [rbp+var_21], al cmp [rbp+var_20], 0 jz short loc_19B3A mov cl, [rbp+var_21] mov rax, [rbp+var_20] mov [rax], cl loc_19B3A: movsx eax, [rbp+var_21] movsx ecx, [rbp+var_11] cmp eax, ecx jnz short loc_19B4F mov [rbp+var_4], 0 jmp short loc_19BAC loc_19B4F: cmp [rbp+var_11], 0 jz short loc_19B66 mov rax, [rbp+var_30] mov eax, [rax+4] and eax, 0FFFFF7FFh mov [rbp+var_34], eax jmp short loc_19B75 loc_19B66: mov rax, [rbp+var_30] mov eax, [rax+4] or eax, 800h mov [rbp+var_34], eax loc_19B75: mov rax, [rbp+var_30] mov edi, [rax] mov edx, [rbp+var_34] mov esi, 4 mov al, 0 call _fcntl64 cmp eax, 0FFFFFFFFh jnz short loc_19B9B call ___errno_location mov eax, [rax] mov [rbp+var_4], eax jmp short loc_19BAC loc_19B9B: mov ecx, [rbp+var_34] mov rax, [rbp+var_30] mov [rax+4], ecx mov [rbp+var_4], 0 loc_19BAC: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long pvio_socket_blocking(unsigned int **a1, char a2, _BYTE *a3) { long long v3; // rdi unsigned int v5; // [rsp+Ch] [rbp-34h] unsigned int *v6; // [rsp+10h] [rbp-30h] char v7; // [rsp+1Fh] [rbp-21h] if ( a1 && *a1 ) { v6 = *a1; v7 = ((*a1)[1] & 0x800) == 0; if ( a3 ) *a3 = v7; if ( v7 == a2 ) { return 0; } else { if ( a2 ) v5 = v6[1] & 0xFFFFF7FF; else v5 = v6[1] | 0x800; v3 = *v6; if ( (unsigned int)fcntl64(v3, 4LL, v5) == -1 ) { return *(unsigned int *)__errno_location(v3); } else { v6[1] = v5; return 0; } } } else { return 1; } }
pvio_socket_blocking: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV AL,SIL MOV qword ptr [RBP + -0x10],RDI MOV byte ptr [RBP + -0x11],AL MOV qword ptr [RBP + -0x20],RDX CMP qword ptr [RBP + -0x10],0x0 JZ 0x00119af7 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JNZ 0x00119b03 LAB_00119af7: MOV dword ptr [RBP + -0x4],0x1 JMP 0x00119bac LAB_00119b03: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX + 0x4] AND EAX,0x800 CMP EAX,0x0 SETNZ AL XOR AL,0xff AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x21],AL CMP qword ptr [RBP + -0x20],0x0 JZ 0x00119b3a MOV CL,byte ptr [RBP + -0x21] MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL LAB_00119b3a: MOVSX EAX,byte ptr [RBP + -0x21] MOVSX ECX,byte ptr [RBP + -0x11] CMP EAX,ECX JNZ 0x00119b4f MOV dword ptr [RBP + -0x4],0x0 JMP 0x00119bac LAB_00119b4f: CMP byte ptr [RBP + -0x11],0x0 JZ 0x00119b66 MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX + 0x4] AND EAX,0xfffff7ff MOV dword ptr [RBP + -0x34],EAX JMP 0x00119b75 LAB_00119b66: MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX + 0x4] OR EAX,0x800 MOV dword ptr [RBP + -0x34],EAX LAB_00119b75: MOV RAX,qword ptr [RBP + -0x30] MOV EDI,dword ptr [RAX] MOV EDX,dword ptr [RBP + -0x34] MOV ESI,0x4 MOV AL,0x0 CALL 0x00117960 CMP EAX,-0x1 JNZ 0x00119b9b CALL 0x00117050 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x00119bac LAB_00119b9b: MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x4],ECX MOV dword ptr [RBP + -0x4],0x0 LAB_00119bac: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int pvio_socket_blocking(long *param_1,byte param_2,byte *param_3) { int4 *puVar1; byte bVar2; int iVar3; int *piVar4; uint local_3c; int local_c; if ((param_1 == (long *)0x0) || (*param_1 == 0)) { local_c = 1; } else { puVar1 = (int4 *)*param_1; bVar2 = ((puVar1[1] & 0x800) != 0 ^ 0xffU) & 1; if (param_3 != (byte *)0x0) { *param_3 = bVar2; } if (bVar2 == param_2) { local_c = 0; } else { if (param_2 == 0) { local_3c = puVar1[1] | 0x800; } else { local_3c = puVar1[1] & 0xfffff7ff; } iVar3 = fcntl64(*puVar1,4,local_3c); if (iVar3 == -1) { piVar4 = __errno_location(); local_c = *piVar4; } else { puVar1[1] = local_3c; local_c = 0; } } } return local_c; }
21,767
testing::internal::String::CaseInsensitiveWideCStringEquals(wchar_t const*, wchar_t const*)
seiftnesse[P]memoryallocator/build_O0/_deps/googletest-src/googletest/src/gtest.cc
bool String::CaseInsensitiveWideCStringEquals(const wchar_t* lhs, const wchar_t* rhs) { if (lhs == nullptr) return rhs == nullptr; if (rhs == nullptr) return false; #if GTEST_OS_WINDOWS return _wcsicmp(lhs, rhs) == 0; #elif GTEST_OS_LINUX && !GTEST_OS_LINUX_ANDROID return wcscasecmp(lhs, rhs) == 0; #else // Android, Mac OS X and Cygwin don't define wcscasecmp. // Other unknown OSes may not define it either. wint_t left, right; do { left = towlower(static_cast<wint_t>(*lhs++)); right = towlower(static_cast<wint_t>(*rhs++)); } while (left && left == right); return left == right; #endif // OS selector }
O0
cpp
testing::internal::String::CaseInsensitiveWideCStringEquals(wchar_t const*, wchar_t const*): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) cmpq $0x0, -0x10(%rbp) jne 0x31a46 cmpq $0x0, -0x18(%rbp) sete %al andb $0x1, %al movb %al, -0x1(%rbp) jmp 0x31a6b cmpq $0x0, -0x18(%rbp) jne 0x31a53 movb $0x0, -0x1(%rbp) jmp 0x31a6b movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0xbda0 cmpl $0x0, %eax sete %al andb $0x1, %al movb %al, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN7testing8internal6String32CaseInsensitiveWideCStringEqualsEPKwS3_: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi cmp [rbp+var_10], 0 jnz short loc_31A46 cmp [rbp+var_18], 0 setz al and al, 1 mov [rbp+var_1], al jmp short loc_31A6B loc_31A46: cmp [rbp+var_18], 0 jnz short loc_31A53 mov [rbp+var_1], 0 jmp short loc_31A6B loc_31A53: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call _wcscasecmp cmp eax, 0 setz al and al, 1 mov [rbp+var_1], al loc_31A6B: mov al, [rbp+var_1] and al, 1 add rsp, 20h pop rbp retn
bool testing::internal::String::CaseInsensitiveWideCStringEquals(long long a1, long long a2) { if ( a1 ) return a2 && (unsigned int)wcscasecmp(a1, a2) == 0; else return a2 == 0; }
CaseInsensitiveWideCStringEquals: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI CMP qword ptr [RBP + -0x10],0x0 JNZ 0x00131a46 CMP qword ptr [RBP + -0x18],0x0 SETZ AL AND AL,0x1 MOV byte ptr [RBP + -0x1],AL JMP 0x00131a6b LAB_00131a46: CMP qword ptr [RBP + -0x18],0x0 JNZ 0x00131a53 MOV byte ptr [RBP + -0x1],0x0 JMP 0x00131a6b LAB_00131a53: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0010bda0 CMP EAX,0x0 SETZ AL AND AL,0x1 MOV byte ptr [RBP + -0x1],AL LAB_00131a6b: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x20 POP RBP RET
/* testing::internal::String::CaseInsensitiveWideCStringEquals(wchar_t const*, wchar_t const*) */ bool testing::internal::String::CaseInsensitiveWideCStringEquals(wchar_t *param_1,wchar_t *param_2) { int iVar1; int1 local_9; if (param_1 == (wchar_t *)0x0) { local_9 = param_2 == (wchar_t *)0x0; } else if (param_2 == (wchar_t *)0x0) { local_9 = false; } else { iVar1 = wcscasecmp(param_1,param_2); local_9 = iVar1 == 0; } return local_9; }
21,768
js_bjson_read
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_bjson_read(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { uint8_t *buf; uint64_t pos, len; JSValue obj; size_t size; int flags; if (JS_ToIndex(ctx, &pos, argv[1])) return JS_EXCEPTION; if (JS_ToIndex(ctx, &len, argv[2])) return JS_EXCEPTION; if (JS_ToInt32(ctx, &flags, argv[3])) return JS_EXCEPTION; buf = JS_GetArrayBuffer(ctx, &size, argv[0]); if (!buf) return JS_EXCEPTION; if (pos + len > size) return JS_ThrowRangeError(ctx, "array buffer overflow"); obj = JS_ReadObject(ctx, buf + pos, len, flags); return obj; }
O1
c
js_bjson_read: pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %r8, %r15 movq %rdi, %r14 movq 0x10(%r8), %rdx movq 0x18(%r8), %rcx leaq 0x18(%rsp), %rsi callq 0x27a6f movl $0x6, %ebx testl %eax, %eax jne 0x1b117 movq 0x20(%r15), %rdx movq 0x28(%r15), %rcx leaq 0x10(%rsp), %rsi movq %r14, %rdi callq 0x27a6f testl %eax, %eax jne 0x1b117 movq 0x30(%r15), %rdx movq 0x38(%r15), %rcx leaq 0x4(%rsp), %rsi movq %r14, %rdi callq 0x279b0 testl %eax, %eax je 0x1b12e xorl %eax, %eax xorl %r15d, %r15d movl %eax, %eax orq %r15, %rax movq %rbx, %rdx addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq movq (%r15), %rdx movq 0x8(%r15), %rcx leaq 0x8(%rsp), %rsi movq %r14, %rdi callq 0x38f81 testq %rax, %rax je 0x1b117 movabsq $-0x100000000, %r15 # imm = 0xFFFFFFFF00000000 movq 0x18(%rsp), %rcx movq 0x10(%rsp), %rdx leaq (%rdx,%rcx), %rsi cmpq 0x8(%rsp), %rsi jbe 0x1b179 leaq 0x80a25(%rip), %rsi # 0x9bb92 movq %r14, %rdi xorl %eax, %eax callq 0x20add jmp 0x1b18b addq %rcx, %rax movl 0x4(%rsp), %ecx movq %r14, %rdi movq %rax, %rsi callq 0x32c5f movq %rdx, %rbx andq %rax, %r15 jmp 0x1b11c
js_bjson_read: push r15 push r14 push rbx sub rsp, 20h mov r15, r8 mov r14, rdi mov rdx, [r8+10h] mov rcx, [r8+18h] lea rsi, [rsp+38h+var_20] call JS_ToIndex mov ebx, 6 test eax, eax jnz short loc_1B117 mov rdx, [r15+20h] mov rcx, [r15+28h] lea rsi, [rsp+38h+var_28] mov rdi, r14 call JS_ToIndex test eax, eax jnz short loc_1B117 mov rdx, [r15+30h] mov rcx, [r15+38h] lea rsi, [rsp+38h+var_34] mov rdi, r14 call JS_ToInt32 test eax, eax jz short loc_1B12E loc_1B117: xor eax, eax xor r15d, r15d loc_1B11C: mov eax, eax or rax, r15 mov rdx, rbx add rsp, 20h pop rbx pop r14 pop r15 retn loc_1B12E: mov rdx, [r15] mov rcx, [r15+8] lea rsi, [rsp+38h+var_30] mov rdi, r14 call JS_GetArrayBuffer test rax, rax jz short loc_1B117 mov r15, 0FFFFFFFF00000000h mov rcx, [rsp+38h+var_20] mov rdx, [rsp+38h+var_28] lea rsi, [rdx+rcx] cmp rsi, [rsp+38h+var_30] jbe short loc_1B179 lea rsi, aReadWriteArray+0Bh; "array buffer overflow" mov rdi, r14 xor eax, eax call JS_ThrowRangeError jmp short loc_1B18B loc_1B179: add rax, rcx mov ecx, [rsp+38h+var_34] mov rdi, r14 mov rsi, rax call JS_ReadObject loc_1B18B: mov rbx, rdx and r15, rax jmp short loc_1B11C
unsigned long long js_bjson_read(long long a1, long long a2, long long a3, long long a4, _QWORD *a5) { long long Object; // rax unsigned long long v7; // r15 long long ArrayBuffer; // rax int v10; // r8d int v11; // r9d unsigned int v12; // [rsp+4h] [rbp-34h] BYREF unsigned long long v13; // [rsp+8h] [rbp-30h] BYREF long long v14; // [rsp+10h] [rbp-28h] BYREF _QWORD v15[4]; // [rsp+18h] [rbp-20h] BYREF if ( (unsigned int)JS_ToIndex(a1, v15, a5[2], a5[3]) || (unsigned int)JS_ToIndex(a1, &v14, a5[4], a5[5]) || (unsigned int)JS_ToInt32(a1, &v12, a5[6], a5[7]) || (ArrayBuffer = JS_GetArrayBuffer(a1, &v13, *a5, a5[1])) == 0 ) { LODWORD(Object) = 0; v7 = 0LL; } else { if ( v14 + v15[0] <= v13 ) Object = JS_ReadObject(a1, v15[0] + ArrayBuffer, v14, v12); else Object = JS_ThrowRangeError(a1, (unsigned int)"array buffer overflow", v14, v15[0], v10, v11); v7 = Object & 0xFFFFFFFF00000000LL; } return v7 | (unsigned int)Object; }
21,769
js_bjson_read
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_bjson_read(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { uint8_t *buf; uint64_t pos, len; JSValue obj; size_t size; int flags; if (JS_ToIndex(ctx, &pos, argv[1])) return JS_EXCEPTION; if (JS_ToIndex(ctx, &len, argv[2])) return JS_EXCEPTION; if (JS_ToInt32(ctx, &flags, argv[3])) return JS_EXCEPTION; buf = JS_GetArrayBuffer(ctx, &size, argv[0]); if (!buf) return JS_EXCEPTION; if (pos + len > size) return JS_ThrowRangeError(ctx, "array buffer overflow"); obj = JS_ReadObject(ctx, buf + pos, len, flags); return obj; }
O2
c
js_bjson_read: pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %r8, %r15 movq %rdi, %r14 movq 0x10(%r8), %rdx movq 0x18(%r8), %rcx leaq 0x18(%rsp), %rsi callq 0x21680 pushq $0x6 popq %rbx testl %eax, %eax jne 0x159cd movq 0x20(%r15), %rdx movq 0x28(%r15), %rcx leaq 0x10(%rsp), %rsi movq %r14, %rdi callq 0x21680 testl %eax, %eax jne 0x159cd movq 0x30(%r15), %rdx movq 0x38(%r15), %rcx leaq 0x4(%rsp), %rsi movq %r14, %rdi callq 0x215d7 testl %eax, %eax je 0x159e4 xorl %eax, %eax xorl %r15d, %r15d movl %eax, %eax orq %r15, %rax movq %rbx, %rdx addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq movq (%r15), %rdx movq 0x8(%r15), %rcx leaq 0x8(%rsp), %rsi movq %r14, %rdi callq 0x320b8 testq %rax, %rax je 0x159cd movabsq $-0x100000000, %r15 # imm = 0xFFFFFFFF00000000 movq 0x18(%rsp), %rcx movq 0x10(%rsp), %rdx leaq (%rdx,%rcx), %rsi cmpq 0x8(%rsp), %rsi jbe 0x15a2f leaq 0x6d11b(%rip), %rsi # 0x82b3e movq %r14, %rdi xorl %eax, %eax callq 0x1acb3 jmp 0x15a41 addq %rcx, %rax movl 0x4(%rsp), %ecx movq %r14, %rdi movq %rax, %rsi callq 0x2c3f7 movq %rdx, %rbx andq %rax, %r15 jmp 0x159d2
js_bjson_read: push r15 push r14 push rbx sub rsp, 20h mov r15, r8 mov r14, rdi mov rdx, [r8+10h] mov rcx, [r8+18h] lea rsi, [rsp+38h+var_20] call JS_ToIndex push 6 pop rbx test eax, eax jnz short loc_159CD mov rdx, [r15+20h] mov rcx, [r15+28h] lea rsi, [rsp+38h+var_28] mov rdi, r14 call JS_ToIndex test eax, eax jnz short loc_159CD mov rdx, [r15+30h] mov rcx, [r15+38h] lea rsi, [rsp+38h+var_34] mov rdi, r14 call JS_ToInt32 test eax, eax jz short loc_159E4 loc_159CD: xor eax, eax xor r15d, r15d loc_159D2: mov eax, eax or rax, r15 mov rdx, rbx add rsp, 20h pop rbx pop r14 pop r15 retn loc_159E4: mov rdx, [r15] mov rcx, [r15+8] lea rsi, [rsp+38h+var_30] mov rdi, r14 call JS_GetArrayBuffer test rax, rax jz short loc_159CD mov r15, 0FFFFFFFF00000000h mov rcx, [rsp+38h+var_20] mov rdx, [rsp+38h+var_28] lea rsi, [rdx+rcx] cmp rsi, [rsp+38h+var_30] jbe short loc_15A2F lea rsi, aReadWriteArray+0Bh; "array buffer overflow" mov rdi, r14 xor eax, eax call JS_ThrowRangeError jmp short loc_15A41 loc_15A2F: add rax, rcx mov ecx, [rsp+38h+var_34] mov rdi, r14 mov rsi, rax call JS_ReadObject loc_15A41: mov rbx, rdx and r15, rax jmp short loc_159D2
unsigned long long js_bjson_read(long long a1, long long a2, long long a3, long long a4, _QWORD *a5) { long long Object; // rax unsigned long long v7; // r15 long long ArrayBuffer; // rax int v10; // r8d int v11; // r9d unsigned int v12; // [rsp+4h] [rbp-34h] BYREF unsigned long long v13; // [rsp+8h] [rbp-30h] BYREF long long v14; // [rsp+10h] [rbp-28h] BYREF _QWORD v15[4]; // [rsp+18h] [rbp-20h] BYREF if ( (unsigned int)JS_ToIndex(a1, v15, a5[2], a5[3]) || (unsigned int)JS_ToIndex(a1, &v14, a5[4], a5[5]) || (unsigned int)JS_ToInt32(a1, &v12, a5[6], a5[7]) || (ArrayBuffer = JS_GetArrayBuffer(a1, &v13, *a5, a5[1])) == 0 ) { LODWORD(Object) = 0; v7 = 0LL; } else { if ( v14 + v15[0] <= v13 ) Object = JS_ReadObject(a1, v15[0] + ArrayBuffer, v14, v12); else Object = JS_ThrowRangeError(a1, (unsigned int)"array buffer overflow", v14, v15[0], v10, v11); v7 = Object & 0xFFFFFFFF00000000LL; } return v7 | (unsigned int)Object; }
js_bjson_read: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV R15,R8 MOV R14,RDI MOV RDX,qword ptr [R8 + 0x10] MOV RCX,qword ptr [R8 + 0x18] LEA RSI,[RSP + 0x18] CALL 0x00121680 PUSH 0x6 POP RBX TEST EAX,EAX JNZ 0x001159cd MOV RDX,qword ptr [R15 + 0x20] MOV RCX,qword ptr [R15 + 0x28] LEA RSI,[RSP + 0x10] MOV RDI,R14 CALL 0x00121680 TEST EAX,EAX JNZ 0x001159cd MOV RDX,qword ptr [R15 + 0x30] MOV RCX,qword ptr [R15 + 0x38] LEA RSI,[RSP + 0x4] MOV RDI,R14 CALL 0x001215d7 TEST EAX,EAX JZ 0x001159e4 LAB_001159cd: XOR EAX,EAX XOR R15D,R15D LAB_001159d2: MOV EAX,EAX OR RAX,R15 MOV RDX,RBX ADD RSP,0x20 POP RBX POP R14 POP R15 RET LAB_001159e4: MOV RDX,qword ptr [R15] MOV RCX,qword ptr [R15 + 0x8] LEA RSI,[RSP + 0x8] MOV RDI,R14 CALL 0x001320b8 TEST RAX,RAX JZ 0x001159cd MOV R15,-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 0x00115a2f LEA RSI,[0x182b3e] MOV RDI,R14 XOR EAX,EAX CALL 0x0011acb3 JMP 0x00115a41 LAB_00115a2f: ADD RAX,RCX MOV ECX,dword ptr [RSP + 0x4] MOV RDI,R14 MOV RSI,RAX CALL 0x0012c3f7 LAB_00115a41: MOV RBX,RDX AND R15,RAX JMP 0x001159d2
int1 [16] js_bjson_read(int8 param_1) { int iVar1; long lVar2; int8 *in_R8; ulong uVar3; int1 auVar4 [16]; int1 auVar5 [16]; int4 local_34; ulong local_30; long local_28; long local_20; iVar1 = JS_ToIndex(param_1,&local_20,in_R8[2],in_R8[3]); if (iVar1 == 0) { iVar1 = JS_ToIndex(param_1,&local_28,in_R8[4],in_R8[5]); if (iVar1 == 0) { iVar1 = JS_ToInt32(param_1,&local_34,in_R8[6],in_R8[7]); if (iVar1 == 0) { lVar2 = JS_GetArrayBuffer(param_1,&local_30,*in_R8,in_R8[1]); if (lVar2 != 0) { if (local_30 < (ulong)(local_28 + local_20)) { auVar5 = JS_ThrowRangeError(param_1,"array buffer overflow"); } else { auVar5 = JS_ReadObject(param_1,lVar2 + local_20,local_28,local_34); } uVar3 = auVar5._0_8_ & 0xffffffff00000000; goto LAB_001159d2; } } } } auVar5 = ZEXT816(6) << 0x40; uVar3 = 0; LAB_001159d2: auVar4._0_8_ = auVar5._0_8_ & 0xffffffff | uVar3; auVar4._8_8_ = auVar5._8_8_; return auVar4; }
21,770
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 0x5b1bb movq -0x28(%rbp), %rax leaq 0xfcb91(%rip), %rcx # 0x157cb4 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax jmp 0x5b12e jmp 0x5b130 movl -0xc(%rbp), %eax movb %al, %cl movq -0x8(%rbp), %rax movb %cl, (%rax) jmp 0x5b1c3 jmp 0x5b142 jmp 0x5b144 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 0x5b1c3 jmp 0x5b168 jmp 0x5b16a 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 0x5b1c3 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 0x5b1c3 jmp 0x5b1bd jmp 0x5b1bf jmp 0x5b1c1 jmp 0x5b1c3 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_5B12A; jumptable 000000000005B12A default case, case 7 mov rax, [rbp+var_28] lea rcx, jpt_5B12A movsxd rax, ds:(jpt_5B12A - 157CB4h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_5B12C: jmp short $+2; jumptable 000000000005B12A case 6 loc_5B12E: jmp short $+2 loc_5B130: mov eax, [rbp+var_C] mov cl, al mov rax, [rbp+var_8] mov [rax], cl jmp loc_5B1C3 loc_5B140: jmp short $+2; jumptable 000000000005B12A case 8 loc_5B142: jmp short $+2 loc_5B144: 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_5B1C3 loc_5B166: jmp short $+2; jumptable 000000000005B12A case 9 loc_5B168: jmp short $+2 loc_5B16A: 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_5B1C3 loc_5B19D: mov rax, [rbp+var_8]; jumptable 000000000005B12A 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_5B1C3 def_5B12A: jmp short $+2; jumptable 000000000005B12A default case, case 7 loc_5B1BD: jmp short $+2 loc_5B1BF: jmp short $+2 loc_5B1C1: jmp short $+2 loc_5B1C3: 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 0x0015b1bb MOV RAX,qword ptr [RBP + -0x28] LEA RCX,[0x257cb4] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_6: JMP 0x0015b12e LAB_0015b12e: JMP 0x0015b130 LAB_0015b130: MOV EAX,dword ptr [RBP + -0xc] MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX],CL JMP 0x0015b1c3 caseD_8: JMP 0x0015b142 LAB_0015b142: JMP 0x0015b144 LAB_0015b144: 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 0x0015b1c3 caseD_9: JMP 0x0015b168 LAB_0015b168: JMP 0x0015b16a LAB_0015b16a: 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 0x0015b1c3 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 0x0015b1c3 caseD_7: JMP 0x0015b1bd LAB_0015b1bd: JMP 0x0015b1bf LAB_0015b1bf: JMP 0x0015b1c1 LAB_0015b1c1: JMP 0x0015b1c3 LAB_0015b1c3: 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; }
21,771
Field_long::store(long long, bool)
eloqsql/sql/field.cc
int Field_long::store(longlong nr, bool unsigned_val) { DBUG_ASSERT(marked_for_write_or_computed()); int error= 0; int32 res; if (unsigned_flag) { if (nr < 0 && !unsigned_val) { res=0; error= 1; } else if ((ulonglong) nr >= (1LL << 32)) { res=(int32) (uint32) ~0L; error= 1; } else res=(int32) (uint32) nr; } else { if (nr < 0 && unsigned_val) nr= ((longlong) INT_MAX32) + 1; // Generate overflow if (nr < (longlong) INT_MIN32) { res=(int32) INT_MIN32; error= 1; } else if (nr > (longlong) INT_MAX32) { res=(int32) INT_MAX32; error= 1; } else res=(int32) nr; } if (unlikely(error)) set_warning(ER_WARN_DATA_OUT_OF_RANGE, 1); int4store(ptr,res); return error; }
O0
cpp
Field_long::store(long long, bool): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb %dl, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) andb $0x1, %al movb %al, -0x11(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0xcdfa81 movq -0x30(%rbp), %rax movl $0x0, -0x18(%rbp) testb $0x1, 0xcb(%rax) je 0xcdfadd cmpq $0x0, -0x10(%rbp) jge 0xcdfab2 testb $0x1, -0x11(%rbp) jne 0xcdfab2 movl $0x0, -0x1c(%rbp) movl $0x1, -0x18(%rbp) jmp 0xcdfadb movabsq $0x100000000, %rax # imm = 0x100000000 cmpq %rax, -0x10(%rbp) jb 0xcdfad2 movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF movl $0x1, -0x18(%rbp) jmp 0xcdfad9 movq -0x10(%rbp), %rax movl %eax, -0x1c(%rbp) jmp 0xcdfadb jmp 0xcdfb32 cmpq $0x0, -0x10(%rbp) jge 0xcdfaf3 testb $0x1, -0x11(%rbp) je 0xcdfaf3 movl $0x80000000, %eax # imm = 0x80000000 movq %rax, -0x10(%rbp) cmpq $-0x80000000, -0x10(%rbp) # imm = 0x80000000 jge 0xcdfb0d movl $0x80000000, -0x1c(%rbp) # imm = 0x80000000 movl $0x1, -0x18(%rbp) jmp 0xcdfb30 cmpq $0x7fffffff, -0x10(%rbp) # imm = 0x7FFFFFFF jle 0xcdfb27 movl $0x7fffffff, -0x1c(%rbp) # imm = 0x7FFFFFFF movl $0x1, -0x18(%rbp) jmp 0xcdfb2e movq -0x10(%rbp), %rax movl %eax, -0x1c(%rbp) jmp 0xcdfb30 jmp 0xcdfb32 cmpl $0x0, -0x18(%rbp) je 0xcdfb4b movq -0x30(%rbp), %rdi movl $0x4f0, %esi # imm = 0x4F0 movl $0x1, %edx callq 0xcf6030 jmp 0xcdfb4d movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x28(%rbp) movl -0x1c(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, (%rax) movl -0x18(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN10Field_long5storeExb: push rbp mov rbp, rsp sub rsp, 30h mov al, dl mov [rbp+var_8], rdi mov [rbp+var_10], rsi and al, 1 mov [rbp+var_11], al mov rax, [rbp+var_8] mov [rbp+var_30], rax jmp short $+2 loc_CDFA81: mov rax, [rbp+var_30] mov [rbp+var_18], 0 test byte ptr [rax+0CBh], 1 jz short loc_CDFADD cmp [rbp+var_10], 0 jge short loc_CDFAB2 test [rbp+var_11], 1 jnz short loc_CDFAB2 mov [rbp+var_1C], 0 mov [rbp+var_18], 1 jmp short loc_CDFADB loc_CDFAB2: mov rax, 100000000h cmp [rbp+var_10], rax jb short loc_CDFAD2 mov [rbp+var_1C], 0FFFFFFFFh mov [rbp+var_18], 1 jmp short loc_CDFAD9 loc_CDFAD2: mov rax, [rbp+var_10] mov [rbp+var_1C], eax loc_CDFAD9: jmp short $+2 loc_CDFADB: jmp short loc_CDFB32 loc_CDFADD: cmp [rbp+var_10], 0 jge short loc_CDFAF3 test [rbp+var_11], 1 jz short loc_CDFAF3 mov eax, 80000000h mov [rbp+var_10], rax loc_CDFAF3: cmp [rbp+var_10], 0FFFFFFFF80000000h jge short loc_CDFB0D mov [rbp+var_1C], 80000000h mov [rbp+var_18], 1 jmp short loc_CDFB30 loc_CDFB0D: cmp [rbp+var_10], 7FFFFFFFh jle short loc_CDFB27 mov [rbp+var_1C], 7FFFFFFFh mov [rbp+var_18], 1 jmp short loc_CDFB2E loc_CDFB27: mov rax, [rbp+var_10] mov [rbp+var_1C], eax loc_CDFB2E: jmp short $+2 loc_CDFB30: jmp short $+2 loc_CDFB32: cmp [rbp+var_18], 0 jz short loc_CDFB4B mov rdi, [rbp+var_30]; this mov esi, 4F0h; unsigned int mov edx, 1; int call _ZNK5Field11set_warningEji; Field::set_warning(uint,int) loc_CDFB4B: jmp short $+2 loc_CDFB4D: mov rax, [rbp+var_30] mov rax, [rax+8] mov [rbp+var_28], rax mov ecx, [rbp+var_1C] mov rax, [rbp+var_28] mov [rax], ecx mov eax, [rbp+var_18] add rsp, 30h pop rbp retn
long long Field_long::store(Field_long *this, long long a2, char a3) { unsigned int v4; // [rsp+14h] [rbp-1Ch] unsigned int v5; // [rsp+18h] [rbp-18h] long long v6; // [rsp+20h] [rbp-10h] v6 = a2; v5 = 0; if ( (*((_BYTE *)this + 203) & 1) != 0 ) { if ( a2 >= 0 || (a3 & 1) != 0 ) { if ( (unsigned long long)a2 < 0x100000000LL ) { v4 = a2; } else { v4 = -1; v5 = 1; } } else { v4 = 0; v5 = 1; } } else { if ( a2 < 0 && (a3 & 1) != 0 ) v6 = 0x80000000LL; if ( v6 >= (long long)0xFFFFFFFF80000000LL ) { if ( v6 <= 0x7FFFFFFF ) { v4 = v6; } else { v4 = 0x7FFFFFFF; v5 = 1; } } else { v4 = 0x80000000; v5 = 1; } } if ( v5 ) Field::set_warning(this, 0x4F0u, 1); **((_DWORD **)this + 1) = v4; return v5; }
sock_fd: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x20] POP RBP RET
/* Slave::sock_fd() const */ int4 __thiscall Slave::sock_fd(Slave *this) { return *(int4 *)(this + 0x20); }
21,772
Field_long::store(long long, bool)
eloqsql/sql/field.cc
int Field_long::store(longlong nr, bool unsigned_val) { DBUG_ASSERT(marked_for_write_or_computed()); int error= 0; int32 res; if (unsigned_flag) { if (nr < 0 && !unsigned_val) { res=0; error= 1; } else if ((ulonglong) nr >= (1LL << 32)) { res=(int32) (uint32) ~0L; error= 1; } else res=(int32) (uint32) nr; } else { if (nr < 0 && unsigned_val) nr= ((longlong) INT_MAX32) + 1; // Generate overflow if (nr < (longlong) INT_MIN32) { res=(int32) INT_MIN32; error= 1; } else if (nr > (longlong) INT_MAX32) { res=(int32) INT_MAX32; error= 1; } else res=(int32) nr; } if (unlikely(error)) set_warning(ER_WARN_DATA_OUT_OF_RANGE, 1); int4store(ptr,res); return error; }
O3
cpp
Field_long::store(long long, bool): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx cmpb $0x1, 0xcb(%rdi) jne 0x97ae5a testq %r14, %r14 sets %al xorb $0x1, %dl testb %dl, %al jne 0x97ae97 movq %r14, %rax shrq $0x20, %rax jne 0x97aea4 xorl %r15d, %r15d jmp 0x97ae82 testb %dl, %dl movl $0x80000000, %eax # imm = 0x80000000 cmoveq %r14, %rax testq %r14, %r14 cmovnsq %r14, %rax cmpq $-0x80000000, %rax # imm = 0x80000000 jl 0x97ae9c cmpq $0x7fffffff, %rax # imm = 0x7FFFFFFF jg 0x97aeac xorl %r15d, %r15d movl %eax, %r14d movq 0x8(%rbx), %rax movl %r14d, (%rax) movl %r15d, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq xorl %r14d, %r14d jmp 0x97aeb2 movl $0x80000000, %r14d # imm = 0x80000000 jmp 0x97aeb2 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF jmp 0x97aeb2 movl $0x7fffffff, %r14d # imm = 0x7FFFFFFF movl $0x1, %r15d movq %rbx, %rdi movl $0x1, %esi movl $0x4f0, %edx # imm = 0x4F0 movl $0x1, %ecx xorl %r8d, %r8d callq 0x9761dc jmp 0x97ae82
_ZN10Field_long5storeExb: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rsi mov rbx, rdi cmp byte ptr [rdi+0CBh], 1 jnz short loc_97AE5A test r14, r14 sets al xor dl, 1 test al, dl jnz short loc_97AE97 mov rax, r14 shr rax, 20h jnz short loc_97AEA4 xor r15d, r15d jmp short loc_97AE82 loc_97AE5A: test dl, dl mov eax, 80000000h cmovz rax, r14 test r14, r14 cmovns rax, r14 cmp rax, 0FFFFFFFF80000000h jl short loc_97AE9C cmp rax, 7FFFFFFFh jg short loc_97AEAC xor r15d, r15d mov r14d, eax loc_97AE82: mov rax, [rbx+8] mov [rax], r14d mov eax, r15d add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_97AE97: xor r14d, r14d jmp short loc_97AEB2 loc_97AE9C: mov r14d, 80000000h jmp short loc_97AEB2 loc_97AEA4: mov r14d, 0FFFFFFFFh jmp short loc_97AEB2 loc_97AEAC: mov r14d, 7FFFFFFFh loc_97AEB2: mov r15d, 1 mov rdi, rbx mov esi, 1 mov edx, 4F0h mov ecx, 1 xor r8d, r8d call _ZNK5Field11set_warningEN21Sql_state_errno_level18enum_warning_levelEjim; Field::set_warning(Sql_state_errno_level::enum_warning_level,uint,int,ulong) jmp short loc_97AE82
long long Field_long::store( Field_long *this, long long a2, unsigned __int8 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11) { unsigned int v11; // r14d unsigned int v12; // r15d long long v13; // rax v11 = a2; if ( *((_BYTE *)this + 203) != 1 ) { v13 = 0x80000000LL; if ( !a3 ) v13 = a2; if ( a2 >= 0 ) v13 = a2; if ( v13 < (long long)0xFFFFFFFF80000000LL ) { v11 = 0x80000000; } else { if ( v13 <= 0x7FFFFFFF ) { v12 = 0; v11 = v13; goto LABEL_12; } v11 = 0x7FFFFFFF; } LABEL_17: v12 = 1; Field::set_warning((long long)this, 1, 0x4F0u, 1, 0LL, a4, a5, a6, a7, a8, a9, a10, a11); goto LABEL_12; } if ( ((a3 ^ 1) & (a2 < 0)) != 0 ) { v11 = 0; goto LABEL_17; } if ( HIDWORD(a2) ) { v11 = -1; goto LABEL_17; } v12 = 0; LABEL_12: **((_DWORD **)this + 1) = v11; return v12; }
21,773
ftxui::dbox(std::vector<std::shared_ptr<ftxui::Node>, std::allocator<std::shared_ptr<ftxui::Node>>>)
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/dom/dbox.cpp
Element dbox(Elements children_) { return std::make_shared<DBox>(std::move(children_)); }
O1
cpp
ftxui::dbox(std::vector<std::shared_ptr<ftxui::Node>, std::allocator<std::shared_ptr<ftxui::Node>>>): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rsi, %r12 movq %rdi, %r14 movl $0x70, %edi callq 0xb3e0 movq %rax, %rbx movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x8(%rbx) leaq 0x216b1(%rip), %rax # 0x59820 movq %rax, (%rbx) movq %rbx, %r15 addq $0x10, %r15 movq (%r12), %rax movq %rax, (%rsp) movq 0x8(%r12), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%r12), %rdx movq %rdx, 0x10(%rsp) xorl %edi, %edi movq %rdi, 0x10(%r12) xorps %xmm0, %xmm0 movups %xmm0, (%r12) leaq 0x20(%rsp), %rsi movq %rax, (%rsi) movq %rcx, 0x8(%rsi) movq %rdx, 0x10(%rsi) movaps %xmm0, (%rsp) movq %rdi, 0x10(%rsp) movq %r15, %rdi callq 0x240f2 leaq 0x20(%rsp), %rdi callq 0x151c0 leaq 0x2169a(%rip), %rax # 0x59870 movq %rax, 0x10(%rbx) movq %rsp, %rdi callq 0x151c0 movq %r15, (%r14) movq %rbx, 0x8(%r14) movq %r14, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %r14 leaq 0x20(%rsp), %rdi callq 0x151c0 movq %rsp, %rdi callq 0x151c0 movl $0x70, %esi movq %rbx, %rdi callq 0xb400 movq %r14, %rdi callq 0xb780
_ZN5ftxui4dboxESt6vectorISt10shared_ptrINS_4NodeEESaIS3_EE: push r15 push r14 push r12 push rbx sub rsp, 38h mov r12, rsi mov r14, rdi mov edi, 70h ; 'p'; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax mov rax, 100000001h mov [rbx+8], rax lea rax, off_59820 mov [rbx], rax mov r15, rbx add r15, 10h mov rax, [r12] mov qword ptr [rsp+58h+var_58], rax mov rcx, [r12+8] mov qword ptr [rsp+58h+var_58+8], rcx mov rdx, [r12+10h] mov [rsp+58h+var_48], rdx xor edi, edi mov [r12+10h], rdi xorps xmm0, xmm0 movups xmmword ptr [r12], xmm0 lea rsi, [rsp+58h+var_38] mov [rsi], rax mov [rsi+8], rcx mov [rsi+10h], rdx movaps [rsp+58h+var_58], xmm0 mov [rsp+58h+var_48], rdi mov rdi, r15 call _ZN5ftxui4NodeC2ESt6vectorISt10shared_ptrIS0_ESaIS3_EE; ftxui::Node::Node(std::vector<std::shared_ptr<ftxui::Node>>) lea rdi, [rsp+58h+var_38] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() lea rax, off_59870 mov [rbx+10h], rax mov rdi, rsp call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov [r14], r15 mov [r14+8], rbx mov rax, r14 add rsp, 38h pop rbx pop r12 pop r14 pop r15 retn mov r14, rax lea rdi, [rsp+arg_18] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov rdi, rsp call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov esi, 70h ; 'p'; unsigned __int64 mov rdi, rbx; void * call __ZdlPvm; operator delete(void *,ulong) mov rdi, r14 call __Unwind_Resume
_QWORD * ftxui::dbox(_QWORD *a1, __int128 *a2) { _QWORD *v2; // rbx __int128 v3; // kr00_16 long long v4; // rdx __int128 v6; // [rsp+0h] [rbp-58h] BYREF long long v7; // [rsp+10h] [rbp-48h] __int128 v8; // [rsp+20h] [rbp-38h] BYREF long long v9; // [rsp+30h] [rbp-28h] v2 = (_QWORD *)operator new(0x70uLL); v2[1] = 0x100000001LL; *v2 = off_59820; v6 = *a2; v3 = v6; v4 = *((_QWORD *)a2 + 2); *((_QWORD *)a2 + 2) = 0LL; *a2 = 0LL; v8 = v3; v9 = v4; v6 = 0LL; v7 = 0LL; ftxui::Node::Node((long long)(v2 + 2), &v8); std::vector<std::shared_ptr<ftxui::Node>>::~vector((void **)&v8); v2[2] = off_59870; std::vector<std::shared_ptr<ftxui::Node>>::~vector((void **)&v6); *a1 = v2 + 2; a1[1] = v2; return a1; }
dbox: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R12,RSI MOV R14,RDI MOV EDI,0x70 CALL 0x0010b3e0 MOV RBX,RAX MOV RAX,0x100000001 MOV qword ptr [RBX + 0x8],RAX LEA RAX,[0x159820] MOV qword ptr [RBX],RAX MOV R15,RBX ADD R15,0x10 MOV RAX,qword ptr [R12] MOV qword ptr [RSP],RAX MOV RCX,qword ptr [R12 + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RDX,qword ptr [R12 + 0x10] MOV qword ptr [RSP + 0x10],RDX XOR EDI,EDI MOV qword ptr [R12 + 0x10],RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [R12],XMM0 LEA RSI,[RSP + 0x20] MOV qword ptr [RSI],RAX MOV qword ptr [RSI + 0x8],RCX MOV qword ptr [RSI + 0x10],RDX MOVAPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],RDI LAB_001381bd: MOV RDI,R15 CALL 0x001240f2 LAB_001381c5: LEA RDI,[RSP + 0x20] CALL 0x001151c0 LEA RAX,[0x159870] MOV qword ptr [RBX + 0x10],RAX MOV RDI,RSP CALL 0x001151c0 MOV qword ptr [R14],R15 MOV qword ptr [R14 + 0x8],RBX MOV RAX,R14 ADD RSP,0x38 POP RBX POP R12 POP R14 POP R15 RET
/* ftxui::dbox(std::vector<std::shared_ptr<ftxui::Node>, std::allocator<std::shared_ptr<ftxui::Node> > >) */ ftxui * __thiscall ftxui::dbox(ftxui *this,int8 *param_2) { int8 *puVar1; int8 local_58; int8 uStack_50; int8 local_48; int8 local_38; int8 local_30; int8 local_28; puVar1 = (int8 *)operator_new(0x70); puVar1[1] = 0x100000001; *puVar1 = &PTR___Sp_counted_ptr_inplace_00159820; local_38 = *param_2; local_30 = param_2[1]; local_28 = param_2[2]; param_2[2] = 0; *param_2 = 0; param_2[1] = 0; local_58 = 0; uStack_50 = 0; local_48 = 0; /* try { // try from 001381bd to 001381c4 has its CatchHandler @ 001381f8 */ Node::Node((Node *)(puVar1 + 2)); 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); puVar1[2] = &PTR__Node_00159870; std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector ((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *) &local_58); *(Node **)this = (Node *)(puVar1 + 2); *(int8 **)(this + 8) = puVar1; return this; }
21,774
stbi__get_marker(stbi__jpeg*)
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
static stbi_uc stbi__get_marker(stbi__jpeg *j) { stbi_uc x; if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; } x = stbi__get8(j->s); if (x != 0xff) return STBI__MARKER_none; while (x == 0xff) x = stbi__get8(j->s); // consume repeated 0xff fill bytes return x; }
O0
c
stbi__get_marker(stbi__jpeg*): subq $0x18, %rsp movq %rdi, 0x8(%rsp) movq 0x8(%rsp), %rax movzbl 0x4828(%rax), %eax cmpl $0xff, %eax je 0x25a11 movq 0x8(%rsp), %rax movb 0x4828(%rax), %al movb %al, 0x7(%rsp) movq 0x8(%rsp), %rax movb $-0x1, 0x4828(%rax) movb 0x7(%rsp), %al movb %al, 0x17(%rsp) jmp 0x25a5e movq 0x8(%rsp), %rax movq (%rax), %rdi callq 0x17f50 movb %al, 0x7(%rsp) movzbl 0x7(%rsp), %eax cmpl $0xff, %eax je 0x25a35 movb $-0x1, 0x17(%rsp) jmp 0x25a5e jmp 0x25a37 movzbl 0x7(%rsp), %eax cmpl $0xff, %eax jne 0x25a56 movq 0x8(%rsp), %rax movq (%rax), %rdi callq 0x17f50 movb %al, 0x7(%rsp) jmp 0x25a37 movb 0x7(%rsp), %al movb %al, 0x17(%rsp) movb 0x17(%rsp), %al addq $0x18, %rsp retq nopw (%rax,%rax)
_ZL16stbi__get_markerP10stbi__jpeg: sub rsp, 18h mov [rsp+18h+var_10], rdi mov rax, [rsp+18h+var_10] movzx eax, byte ptr [rax+4828h] cmp eax, 0FFh jz short loc_25A11 mov rax, [rsp+18h+var_10] mov al, [rax+4828h] mov [rsp+18h+var_11], al mov rax, [rsp+18h+var_10] mov byte ptr [rax+4828h], 0FFh mov al, [rsp+18h+var_11] mov [rsp+18h+var_1], al jmp short loc_25A5E loc_25A11: mov rax, [rsp+18h+var_10] mov rdi, [rax] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) mov [rsp+18h+var_11], al movzx eax, [rsp+18h+var_11] cmp eax, 0FFh jz short loc_25A35 mov [rsp+18h+var_1], 0FFh jmp short loc_25A5E loc_25A35: jmp short $+2 loc_25A37: movzx eax, [rsp+18h+var_11] cmp eax, 0FFh jnz short loc_25A56 mov rax, [rsp+18h+var_10] mov rdi, [rax] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) mov [rsp+18h+var_11], al jmp short loc_25A37 loc_25A56: mov al, [rsp+18h+var_11] mov [rsp+18h+var_1], al loc_25A5E: mov al, [rsp+18h+var_1] add rsp, 18h retn
char stbi__get_marker(long long a1) { char v2; // [rsp+7h] [rbp-11h] unsigned __int8 v3; // [rsp+7h] [rbp-11h] if ( *(unsigned __int8 *)(a1 + 18472) == 255 ) { v3 = stbi__get8(*(_QWORD *)a1); if ( v3 == 255 ) { while ( v3 == 255 ) v3 = stbi__get8(*(_QWORD *)a1); return v3; } else { return -1; } } else { v2 = *(_BYTE *)(a1 + 18472); *(_BYTE *)(a1 + 18472) = -1; return v2; } }
stbi__get_marker: SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RDI MOV RAX,qword ptr [RSP + 0x8] MOVZX EAX,byte ptr [RAX + 0x4828] CMP EAX,0xff JZ 0x00125a11 MOV RAX,qword ptr [RSP + 0x8] MOV AL,byte ptr [RAX + 0x4828] MOV byte ptr [RSP + 0x7],AL MOV RAX,qword ptr [RSP + 0x8] MOV byte ptr [RAX + 0x4828],0xff MOV AL,byte ptr [RSP + 0x7] MOV byte ptr [RSP + 0x17],AL JMP 0x00125a5e LAB_00125a11: MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX] CALL 0x00117f50 MOV byte ptr [RSP + 0x7],AL MOVZX EAX,byte ptr [RSP + 0x7] CMP EAX,0xff JZ 0x00125a35 MOV byte ptr [RSP + 0x17],0xff JMP 0x00125a5e LAB_00125a35: JMP 0x00125a37 LAB_00125a37: MOVZX EAX,byte ptr [RSP + 0x7] CMP EAX,0xff JNZ 0x00125a56 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX] CALL 0x00117f50 MOV byte ptr [RSP + 0x7],AL JMP 0x00125a37 LAB_00125a56: MOV AL,byte ptr [RSP + 0x7] MOV byte ptr [RSP + 0x17],AL LAB_00125a5e: MOV AL,byte ptr [RSP + 0x17] ADD RSP,0x18 RET
/* stbi__get_marker(stbi__jpeg*) */ int8 stbi__get_marker(stbi__jpeg *param_1) { char cVar1; int7 uVar2; stbi__jpeg local_11; stbi__jpeg local_1; if (param_1[0x4828] == (stbi__jpeg)0xff) { cVar1 = stbi__get8(*(stbi__context **)param_1); uVar2 = 0; if (cVar1 == -1) { local_11 = (stbi__jpeg)0xff; while (local_11 == (stbi__jpeg)0xff) { local_11 = (stbi__jpeg)stbi__get8(*(stbi__context **)param_1); } uVar2 = 0; local_1 = local_11; } else { local_1 = (stbi__jpeg)0xff; } } else { local_1 = param_1[0x4828]; param_1[0x4828] = (stbi__jpeg)0xff; uVar2 = (int7)((ulong)param_1 >> 8); } return CONCAT71(uVar2,local_1); }
21,775
my_casedn_8bit
eloqsql/strings/ctype-simple.c
size_t my_casedn_8bit(CHARSET_INFO * cs, const char *src, size_t srclen, char *dst, size_t dstlen __attribute__((unused))) { const char *end= src + srclen; register const uchar *map=cs->to_lower; DBUG_ASSERT(srclen <= dstlen); for ( ; src != end ; src++) *dst++= (char) map[(uchar) *src]; return srclen; }
O3
c
my_casedn_8bit: movq %rdx, %rax testq %rdx, %rdx je 0xb5ef0 pushq %rbp movq %rsp, %rbp movq 0x48(%rdi), %rdx xorl %edi, %edi movzbl (%rsi,%rdi), %r8d movb (%rdx,%r8), %r8b movb %r8b, (%rcx,%rdi) incq %rdi cmpq %rdi, %rax jne 0xb5eda popq %rbp retq
my_casedn_8bit: mov rax, rdx test rdx, rdx jz short locret_B5EF0 push rbp mov rbp, rsp mov rdx, [rdi+48h] xor edi, edi loc_B5EDA: movzx r8d, byte ptr [rsi+rdi] mov r8b, [rdx+r8] mov [rcx+rdi], r8b inc rdi cmp rax, rdi jnz short loc_B5EDA pop rbp locret_B5EF0: retn
long long my_casedn_8bit(long long a1, long long a2, long long a3, long long a4) { long long result; // rax long long v5; // rdx long long v6; // rdi result = a3; if ( a3 ) { v5 = *(_QWORD *)(a1 + 72); v6 = 0LL; do { *(_BYTE *)(a4 + v6) = *(_BYTE *)(v5 + *(unsigned __int8 *)(a2 + v6)); ++v6; } while ( result != v6 ); } return result; }
my_casedn_8bit: MOV RAX,RDX TEST RDX,RDX JZ 0x001b5ef0 PUSH RBP MOV RBP,RSP MOV RDX,qword ptr [RDI + 0x48] XOR EDI,EDI LAB_001b5eda: MOVZX R8D,byte ptr [RSI + RDI*0x1] MOV R8B,byte ptr [RDX + R8*0x1] MOV byte ptr [RCX + RDI*0x1],R8B INC RDI CMP RAX,RDI JNZ 0x001b5eda POP RBP LAB_001b5ef0: RET
void my_casedn_8bit(long param_1,long param_2,long param_3,long param_4) { long lVar1; long lVar2; if (param_3 != 0) { lVar1 = *(long *)(param_1 + 0x48); lVar2 = 0; do { *(int1 *)(param_4 + lVar2) = *(int1 *)(lVar1 + (ulong)*(byte *)(param_2 + lVar2)); lVar2 = lVar2 + 1; } while (param_3 != lVar2); } return; }
21,776
stbi__malloc_mad2(int, int, int)
monkey531[P]llama/examples/llava/../../common/stb_image.h
static void *stbi__malloc_mad2(int a, int b, int add) { if (!stbi__mad2sizes_valid(a, b, add)) return NULL; return stbi__malloc(a*b + add); }
O1
c
stbi__malloc_mad2(int, int, int): movl %edx, %ecx movl %esi, %eax orl %edi, %eax js 0x3ef68 testl %esi, %esi je 0x3ef6c movl $0x7fffffff, %eax # imm = 0x7FFFFFFF xorl %edx, %edx divl %esi cmpl %edi, %eax setl %al jmp 0x3ef6e movb $0x1, %al jmp 0x3ef6e xorl %eax, %eax imull %edi, %esi movl %ecx, %edx xorl $0x7fffffff, %edx # imm = 0x7FFFFFFF cmpl %esi, %edx setl %dl orb %al, %dl je 0x3ef85 xorl %eax, %eax retq addl %ecx, %esi movslq %esi, %rdi jmp 0x1e000
_ZL17stbi__malloc_mad2iii: mov ecx, edx mov eax, esi or eax, edi js short loc_3EF68 test esi, esi jz short loc_3EF6C mov eax, 7FFFFFFFh xor edx, edx div esi cmp eax, edi setl al jmp short loc_3EF6E loc_3EF68: mov al, 1 jmp short loc_3EF6E loc_3EF6C: xor eax, eax loc_3EF6E: imul esi, edi mov edx, ecx xor edx, 7FFFFFFFh cmp edx, esi setl dl or dl, al jz short loc_3EF85 xor eax, eax retn loc_3EF85: add esi, ecx movsxd rdi, esi jmp _malloc
long long stbi__malloc_mad2(int a1, unsigned int a2, int a3) { bool v3; // al int v4; // esi if ( ((a1 | a2) & 0x80000000) != 0 ) { v3 = 1; } else if ( a2 ) { v3 = (int)(0x7FFFFFFF / a2) < a1; } else { v3 = 0; } v4 = a1 * a2; if ( v3 || (a3 ^ 0x7FFFFFFF) < v4 ) return 0LL; else return malloc(a3 + v4); }
stbi__malloc_mad2: MOV ECX,EDX MOV EAX,ESI OR EAX,EDI JS 0x0013ef68 TEST ESI,ESI JZ 0x0013ef6c MOV EAX,0x7fffffff XOR EDX,EDX DIV ESI CMP EAX,EDI SETL AL JMP 0x0013ef6e LAB_0013ef68: MOV AL,0x1 JMP 0x0013ef6e LAB_0013ef6c: XOR EAX,EAX LAB_0013ef6e: IMUL ESI,EDI MOV EDX,ECX XOR EDX,0x7fffffff CMP EDX,ESI SETL DL OR DL,AL JZ 0x0013ef85 XOR EAX,EAX RET LAB_0013ef85: ADD ESI,ECX MOVSXD RDI,ESI JMP 0x0011e000
/* stbi__malloc_mad2(int, int, int) */ void * stbi__malloc_mad2(int param_1,int param_2,int param_3) { bool bVar1; void *pvVar2; if ((param_2 | param_1) < 0) { bVar1 = true; } else if (param_2 == 0) { bVar1 = false; } else { bVar1 = (int)(0x7fffffffU / (uint)param_2) < param_1; } if ((int)(param_3 ^ 0x7fffffffU) < param_2 * param_1 || bVar1) { return (void *)0x0; } pvVar2 = malloc((long)(param_2 * param_1 + param_3)); return pvVar2; }
21,777
stbi_load_gif_from_memory
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
STBIDEF stbi_uc *stbi_load_gif_from_memory(stbi_uc const *buffer, int len, int **delays, int *x, int *y, int *z, int *comp, int req_comp) { unsigned char *result; stbi__context s; stbi__start_mem(&s,buffer,len); result = (unsigned char*) stbi__load_gif_main(&s, delays, x, y, z, comp, req_comp); if (stbi__vertically_flip_on_load) { stbi__vertical_flip_slices( result, *x, *y, *z, *comp ); } return result; }
O1
c
stbi_load_gif_from_memory: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x8998, %rsp # imm = 0x8998 movq %r9, %rbx movq %r8, 0x40(%rsp) movq %rcx, 0x38(%rsp) movq %rdx, %r12 movq 0x89d0(%rsp), %r15 leaq 0x48(%rsp), %rcx movq $0x0, 0x10(%rcx) xorl %eax, %eax movl %eax, 0x30(%rcx) movl %eax, 0xb8(%rcx) movq %rdi, 0xd0(%rcx) movq %rdi, 0xc0(%rcx) movslq %esi, %rax addq %rdi, %rax movq %rax, 0xd8(%rcx) movq %rax, 0xc8(%rcx) movq %rcx, %rdi callq 0x229e6 testl %eax, %eax je 0x1a810 movq %rbx, 0x28(%rsp) leaq 0x128(%rsp), %rdi movl $0x8870, %edx # imm = 0x8870 xorl %esi, %esi callq 0xa300 testq %r12, %r12 je 0x1a5cb movq $0x0, (%r12) movq $0x0, 0x18(%rsp) xorl %ebp, %ebp movq $0x0, 0x20(%rsp) movq %r12, 0x8(%rsp) leaq 0x48(%rsp), %rbx movq %rbx, %rdi leaq 0x128(%rsp), %rsi movq %r15, %rdx movq %rbp, %rcx callq 0x298ae movq %rax, %r14 cmpq %rbx, %rax sete %al testq %r14, %r14 sete %r13b orb %al, %r13b jne 0x1a7a3 movl 0x128(%rsp), %eax movq 0x38(%rsp), %rcx movl %eax, (%rcx) movl 0x12c(%rsp), %r12d movq 0x40(%rsp), %rcx movl %r12d, (%rcx) movq 0x20(%rsp), %rcx incl %ecx imull %eax, %r12d leal (,%r12,4), %ebx movl %ebx, %eax movl %ecx, 0x14(%rsp) imull %ecx, %eax movslq %eax, %rsi movq 0x18(%rsp), %rdi testq %rdi, %rdi movq %rbp, 0x30(%rsp) je 0x1a6a8 movq %rdi, %rbp callq 0xaa40 testq %rax, %rax je 0x1a6ee movq %rax, %r15 cmpq $0x0, 0x8(%rsp) je 0x1a724 movq 0x8(%rsp), %rax movq (%rax), %rdi movslq 0x14(%rsp), %rsi shlq $0x2, %rsi callq 0xaa40 movq %rax, %rbp testq %rax, %rax je 0x1a70a movq 0x8(%rsp), %rax movq %rbp, (%rax) jmp 0x1a71f movq %rsi, %rdi callq 0xa7c0 testq %rax, %rax je 0x1a83f movq 0x8(%rsp), %rbp testq %rbp, %rbp je 0x1a73d movq %rax, %r15 movslq 0x14(%rsp), %rdi shlq $0x2, %rdi callq 0xa7c0 movq %rax, (%rbp) testq %rax, %rax je 0x1a8e3 movq %r15, %rax movq 0x89d0(%rsp), %r15 jmp 0x1a73d leaq 0x128(%rsp), %rdi movq %rbp, %rsi movq 0x8(%rsp), %rdx callq 0x2e212 xorl %ecx, %ecx movq %rbp, %r15 jmp 0x1a72a leaq 0x128(%rsp), %rdi movq %r15, %rsi movq 0x8(%rsp), %rdx callq 0x2e212 testq %rbp, %rbp je 0x1a728 movb $0x1, %cl jmp 0x1a72a xorl %ecx, %ecx movq %r15, %rax testb %cl, %cl movq 0x89d0(%rsp), %r15 je 0x1a853 movslq %ebx, %rdx movq 0x20(%rsp), %rbp imull %ebp, %ebx movslq %ebx, %rdi addq %rax, %rdi movq %r14, %rsi movq %rax, %rbx callq 0xa4c0 shll $0x3, %r12d movslq %r12d, %rax movq %rbx, %rcx movq %rbx, 0x18(%rsp) subq %rax, %rcx testl %ebp, %ebp movq 0x30(%rsp), %rax cmovgq %rcx, %rax movq %rax, 0x30(%rsp) movq 0x8(%rsp), %r12 testq %r12, %r12 je 0x1a795 movl 0x8990(%rsp), %eax movq (%r12), %rcx movl %ebp, %edx movl %eax, (%rcx,%rdx,4) movl 0x14(%rsp), %eax movq %rax, 0x20(%rsp) movq 0x30(%rsp), %rbp testb %r13b, %r13b je 0x1a5e4 movq 0x130(%rsp), %rdi callq 0xa700 movq 0x140(%rsp), %rdi callq 0xa700 movq 0x138(%rsp), %rdi callq 0xa700 movl 0x89d8(%rsp), %edx testl $0xfffffffb, %edx # imm = 0xFFFFFFFB je 0x1a82b movl 0x128(%rsp), %ecx movq 0x20(%rsp), %r14 imull %r14d, %ecx movl 0x12c(%rsp), %r8d movq 0x18(%rsp), %rdi movl $0x4, %esi callq 0x27aa8 movq 0x28(%rsp), %rbx jmp 0x1a83a leaq 0xa20bd(%rip), %rax # 0xbc8d4 movq %rax, %fs:-0x20 movq $0x0, 0x18(%rsp) jmp 0x1a85f movq 0x28(%rsp), %rbx movq 0x18(%rsp), %rax movq 0x20(%rsp), %r14 movl %r14d, (%rbx) jmp 0x1a85a leaq 0x128(%rsp), %rdi xorl %esi, %esi movq 0x8(%rsp), %rdx callq 0x2e212 xorl %eax, %eax movq 0x28(%rsp), %rbx movq %rax, 0x18(%rsp) cmpl $0x0, %fs:-0x14 movq %fs:0x0, %rax leaq -0x18(%rax), %rax leaq 0x15d5c9(%rip), %rcx # 0x177e48 cmovneq %rax, %rcx cmpl $0x0, (%rcx) je 0x1a8cc movl (%rbx), %r13d testl %r13d, %r13d jle 0x1a8cc movq 0x38(%rsp), %rax movl (%rax), %ebx movq 0x40(%rsp), %rax movl (%rax), %r14d movl (%r15), %r15d movl %r14d, %eax imull %ebx, %eax imull %r15d, %eax movslq %eax, %rbp movq 0x18(%rsp), %r12 movq %r12, %rdi movl %ebx, %esi movl %r14d, %edx movl %r15d, %ecx callq 0x228f9 addq %rbp, %r12 decl %r13d jne 0x1a8b4 movq 0x18(%rsp), %rax addq $0x8998, %rsp # imm = 0x8998 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x128(%rsp), %rdi movq %r15, %rsi movq 0x8(%rsp), %rdx callq 0x2e212 xorl %eax, %eax movq 0x28(%rsp), %rbx movq 0x89d0(%rsp), %r15 jmp 0x1a85a
stbi_load_gif_from_memory: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 8998h mov rbx, r9 mov [rsp+89C8h+var_8988], r8 mov [rsp+89C8h+var_8990], rcx mov r12, rdx mov r15, [rsp+89C8h+arg_0] lea rcx, [rsp+89C8h+var_8980] mov qword ptr [rcx+10h], 0 xor eax, eax mov [rcx+30h], eax mov [rcx+0B8h], eax mov [rcx+0D0h], rdi mov [rcx+0C0h], rdi movsxd rax, esi add rax, rdi mov [rcx+0D8h], rax mov [rcx+0C8h], rax mov rdi, rcx call _ZL14stbi__gif_testP13stbi__context; stbi__gif_test(stbi__context *) test eax, eax jz loc_1A810 mov [rsp+89C8h+var_89A0], rbx lea rdi, [rsp+89C8h+var_88A0] mov edx, 8870h xor esi, esi call _memset test r12, r12 jz short loc_1A5CB mov qword ptr [r12], 0 loc_1A5CB: mov [rsp+89C8h+var_89B0], 0 xor ebp, ebp mov [rsp+89C8h+var_89A8], 0 mov [rsp+89C8h+var_89C0], r12 loc_1A5E4: lea rbx, [rsp+89C8h+var_8980] mov rdi, rbx lea rsi, [rsp+89C8h+var_88A0] mov rdx, r15 mov rcx, rbp call _ZL19stbi__gif_load_nextP13stbi__contextP9stbi__gifPiiPh; stbi__gif_load_next(stbi__context *,stbi__gif *,int *,int,uchar *) mov r14, rax cmp rax, rbx setz al test r14, r14 setz r13b or r13b, al jnz loc_1A7A3 mov eax, [rsp+89C8h+var_88A0] mov rcx, [rsp+89C8h+var_8990] mov [rcx], eax mov r12d, [rsp+89C8h+var_889C] mov rcx, [rsp+89C8h+var_8988] mov [rcx], r12d mov rcx, [rsp+89C8h+var_89A8] inc ecx imul r12d, eax lea ebx, ds:0[r12*4] mov eax, ebx mov [rsp+89C8h+var_89B4], ecx imul eax, ecx movsxd rsi, eax mov rdi, [rsp+89C8h+var_89B0] test rdi, rdi mov [rsp+89C8h+var_8998], rbp jz short loc_1A6A8 mov rbp, rdi call _realloc test rax, rax jz short loc_1A6EE mov r15, rax cmp [rsp+89C8h+var_89C0], 0 jz loc_1A724 mov rax, [rsp+89C8h+var_89C0] mov rdi, [rax] movsxd rsi, [rsp+89C8h+var_89B4] shl rsi, 2 call _realloc mov rbp, rax test rax, rax jz short loc_1A70A mov rax, [rsp+89C8h+var_89C0] mov [rax], rbp jmp short loc_1A71F loc_1A6A8: mov rdi, rsi call _malloc test rax, rax jz loc_1A83F mov rbp, [rsp+89C8h+var_89C0] test rbp, rbp jz short loc_1A73D mov r15, rax movsxd rdi, [rsp+89C8h+var_89B4] shl rdi, 2 call _malloc mov [rbp+0], rax test rax, rax jz loc_1A8E3 mov rax, r15 mov r15, [rsp+89C8h+arg_0] jmp short loc_1A73D loc_1A6EE: lea rdi, [rsp+89C8h+var_88A0] mov rsi, rbp mov rdx, [rsp+89C8h+var_89C0] call _ZL28stbi__load_gif_main_outofmemP9stbi__gifPhPPi; stbi__load_gif_main_outofmem(stbi__gif *,uchar *,int **) xor ecx, ecx mov r15, rbp jmp short loc_1A72A loc_1A70A: lea rdi, [rsp+89C8h+var_88A0] mov rsi, r15 mov rdx, [rsp+89C8h+var_89C0] call _ZL28stbi__load_gif_main_outofmemP9stbi__gifPhPPi; stbi__load_gif_main_outofmem(stbi__gif *,uchar *,int **) loc_1A71F: test rbp, rbp jz short loc_1A728 loc_1A724: mov cl, 1 jmp short loc_1A72A loc_1A728: xor ecx, ecx loc_1A72A: mov rax, r15 test cl, cl mov r15, [rsp+89C8h+arg_0] jz loc_1A853 loc_1A73D: movsxd rdx, ebx mov rbp, [rsp+89C8h+var_89A8] imul ebx, ebp movsxd rdi, ebx add rdi, rax mov rsi, r14 mov rbx, rax call _memcpy shl r12d, 3 movsxd rax, r12d mov rcx, rbx mov [rsp+89C8h+var_89B0], rbx sub rcx, rax test ebp, ebp mov rax, [rsp+89C8h+var_8998] cmovg rax, rcx mov [rsp+89C8h+var_8998], rax mov r12, [rsp+89C8h+var_89C0] test r12, r12 jz short loc_1A795 mov eax, [rsp+89C8h+var_38] mov rcx, [r12] mov edx, ebp mov [rcx+rdx*4], eax loc_1A795: mov eax, [rsp+89C8h+var_89B4] mov [rsp+89C8h+var_89A8], rax mov rbp, [rsp+89C8h+var_8998] loc_1A7A3: test r13b, r13b jz loc_1A5E4 mov rdi, [rsp+89C8h+var_8898] call _free mov rdi, [rsp+89C8h+var_8888] call _free mov rdi, [rsp+89C8h+var_8890] call _free mov edx, [rsp+89C8h+arg_8]; int test edx, 0FFFFFFFBh jz short loc_1A82B mov ecx, [rsp+89C8h+var_88A0] mov r14, [rsp+89C8h+var_89A8] imul ecx, r14d; unsigned int mov r8d, [rsp+89C8h+var_889C]; unsigned int mov rdi, [rsp+89C8h+var_89B0]; unsigned __int8 * mov esi, 4; int call _ZL20stbi__convert_formatPhiijj; stbi__convert_format(uchar *,int,int,uint,uint) mov rbx, [rsp+89C8h+var_89A0] jmp short loc_1A83A loc_1A810: lea rax, aNotGif; "not GIF" mov fs:0FFFFFFFFFFFFFFE0h, rax mov [rsp+89C8h+var_89B0], 0 jmp short loc_1A85F loc_1A82B: mov rbx, [rsp+89C8h+var_89A0] mov rax, [rsp+89C8h+var_89B0] mov r14, [rsp+89C8h+var_89A8] loc_1A83A: mov [rbx], r14d jmp short loc_1A85A loc_1A83F: lea rdi, [rsp+89C8h+var_88A0] xor esi, esi mov rdx, [rsp+89C8h+var_89C0] call _ZL28stbi__load_gif_main_outofmemP9stbi__gifPhPPi; stbi__load_gif_main_outofmem(stbi__gif *,uchar *,int **) loc_1A853: xor eax, eax mov rbx, [rsp+89C8h+var_89A0] loc_1A85A: mov [rsp+89C8h+var_89B0], rax loc_1A85F: cmp dword ptr fs:0FFFFFFFFFFFFFFECh, 0 mov rax, fs:0 lea rax, [rax-18h] lea rcx, _ZL36stbi__vertically_flip_on_load_global; stbi__vertically_flip_on_load_global cmovnz rcx, rax cmp dword ptr [rcx], 0 jz short loc_1A8CC mov r13d, [rbx] test r13d, r13d jle short loc_1A8CC mov rax, [rsp+89C8h+var_8990] mov ebx, [rax] mov rax, [rsp+89C8h+var_8988] mov r14d, [rax] mov r15d, [r15] mov eax, r14d imul eax, ebx imul eax, r15d movsxd rbp, eax mov r12, [rsp+89C8h+var_89B0] loc_1A8B4: mov rdi, r12; void * mov esi, ebx; int mov edx, r14d; int mov ecx, r15d; int call _ZL19stbi__vertical_flipPviii; stbi__vertical_flip(void *,int,int,int) add r12, rbp dec r13d jnz short loc_1A8B4 loc_1A8CC: mov rax, [rsp+89C8h+var_89B0] add rsp, 8998h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1A8E3: lea rdi, [rsp+89C8h+var_88A0] mov rsi, r15 mov rdx, [rsp+89C8h+var_89C0] call _ZL28stbi__load_gif_main_outofmemP9stbi__gifPhPPi; stbi__load_gif_main_outofmem(stbi__gif *,uchar *,int **) xor eax, eax mov rbx, [rsp+89C8h+var_89A0] mov r15, [rsp+89C8h+arg_0] jmp loc_1A85A
unsigned __int8 * stbi_load_gif_from_memory( long long a1, int a2, long long *a3, int *a4, int *a5, int *a6, int *a7, int a8) { int *v10; // r15 unsigned __int8 *v11; // rbp _BYTE *v12; // r14 bool v13; // r13 int v14; // eax unsigned int v15; // r12d int v16; // r12d int v17; // ebx int v18; // eax long long v19; // rax long long v20; // r15 long long v21; // rbp long long v22; // rax long long v23; // r15 long long v24; // rax char v25; // cl long long v26; // rdx long long v27; // rdi unsigned __int8 *v28; // rbx int v29; // r12d unsigned __int8 *v30; // rax int v31; // r14d unsigned __int8 *v32; // rax unsigned long long v33; // rax int *v34; // rcx int v35; // r13d int v36; // ebx int v37; // r14d int v38; // r15d long long v39; // rbp unsigned __int8 *v40; // r12 long long *v42; // [rsp+8h] [rbp-89C0h] int v43; // [rsp+14h] [rbp-89B4h] unsigned __int8 *v44; // [rsp+18h] [rbp-89B0h] unsigned __int8 *v45; // [rsp+18h] [rbp-89B0h] int v46; // [rsp+20h] [rbp-89A8h] int *v47; // [rsp+28h] [rbp-89A0h] unsigned __int8 *v48; // [rsp+30h] [rbp-8998h] _BYTE v51[16]; // [rsp+48h] [rbp-8980h] BYREF long long v52; // [rsp+58h] [rbp-8970h] int v53; // [rsp+78h] [rbp-8950h] int v54; // [rsp+100h] [rbp-88C8h] long long v55; // [rsp+108h] [rbp-88C0h] long long v56; // [rsp+110h] [rbp-88B8h] long long v57; // [rsp+118h] [rbp-88B0h] long long v58; // [rsp+120h] [rbp-88A8h] int v59; // [rsp+128h] [rbp-88A0h] BYREF unsigned int v60; // [rsp+12Ch] [rbp-889Ch] long long v61; // [rsp+130h] [rbp-8898h] long long v62; // [rsp+138h] [rbp-8890h] long long v63; // [rsp+140h] [rbp-8888h] int v64; // [rsp+8990h] [rbp-38h] v10 = a7; v52 = 0LL; v53 = 0; v54 = 0; v57 = a1; v55 = a1; v58 = a1 + a2; v56 = v58; if ( (unsigned int)stbi__gif_test(v51) ) { v47 = a6; memset(&v59, 0LL, 34928LL); if ( a3 ) *a3 = 0LL; v44 = 0LL; v11 = 0LL; v46 = 0; v42 = a3; do { v12 = (_BYTE *)stbi__gif_load_next(v51, &v59, v10, v11); v13 = v12 == v51 || v12 == 0LL; if ( !v13 ) { v14 = v59; *a4 = v59; v15 = v60; *a5 = v60; v16 = v14 * v15; v17 = 4 * v16; v43 = v46 + 1; v18 = (v46 + 1) * 4 * v16; v48 = v11; if ( v44 ) { v19 = realloc(v44, v18); if ( v19 ) { v20 = v19; if ( !v42 ) goto LABEL_18; v21 = realloc(*v42, 4LL * v43); if ( v21 ) *v42 = v21; else stbi__load_gif_main_outofmem(&v59, v20, v42); if ( !v21 ) v25 = 0; else LABEL_18: v25 = 1; } else { stbi__load_gif_main_outofmem(&v59, v44, v42); v25 = 0; v20 = (long long)v44; } v22 = v20; v10 = a7; if ( !v25 ) goto LABEL_33; } else { v22 = malloc(v18); if ( !v22 ) { stbi__load_gif_main_outofmem(&v59, 0LL, v42); LABEL_33: v32 = 0LL; a6 = v47; goto LABEL_34; } if ( v42 ) { v23 = v22; v24 = malloc(4LL * v43); *v42 = v24; if ( !v24 ) { stbi__load_gif_main_outofmem(&v59, v23, v42); v32 = 0LL; a6 = v47; v10 = a7; goto LABEL_34; } v22 = v23; v10 = a7; } } v26 = v17; v27 = v22 + v46 * v17; v28 = (unsigned __int8 *)v22; memcpy(v27, v12, v26); v29 = 8 * v16; v44 = v28; v30 = v48; if ( v46 > 0 ) v30 = &v28[-v29]; if ( v42 ) *(_DWORD *)(*v42 + 4LL * (unsigned int)v46) = v64; ++v46; v11 = v30; } } while ( !v13 ); free(v61); free(v63); free(v62); if ( (a8 & 0xFFFFFFFB) != 0 ) { v31 = v46; v32 = (unsigned __int8 *)stbi__convert_format(v44, 4, a8, v46 * v59, v60); a6 = v47; } else { a6 = v47; v32 = v44; v31 = v46; } *a6 = v31; LABEL_34: v45 = v32; } else { __writefsqword(0xFFFFFFE0, (unsigned long long)"not GIF"); v45 = 0LL; } v33 = __readfsqword(0) - 24; v34 = &stbi__vertically_flip_on_load_global; if ( __readfsdword(0xFFFFFFEC) ) v34 = (int *)v33; if ( *v34 ) { v35 = *a6; if ( *a6 > 0 ) { v36 = *a4; v37 = *a5; v38 = *v10; v39 = v38 * *a4 * *a5; v40 = v45; do { stbi__vertical_flip(v40, v36, v37, v38); v40 += v39; --v35; } while ( v35 ); } } return v45; }
21,778
stbi_load_gif_from_memory
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
STBIDEF stbi_uc *stbi_load_gif_from_memory(stbi_uc const *buffer, int len, int **delays, int *x, int *y, int *z, int *comp, int req_comp) { unsigned char *result; stbi__context s; stbi__start_mem(&s,buffer,len); result = (unsigned char*) stbi__load_gif_main(&s, delays, x, y, z, comp, req_comp); if (stbi__vertically_flip_on_load) { stbi__vertical_flip_slices( result, *x, *y, *z, *comp ); } return result; }
O2
c
stbi_load_gif_from_memory: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x8988, %rsp # imm = 0x8988 movq %r9, %r14 movq %r8, 0x30(%rsp) movq %rcx, 0x28(%rsp) leaq 0x38(%rsp), %rcx andq $0x0, 0x10(%rcx) movq %rdx, %rbx andl $0x0, 0x30(%rcx) andl $0x0, 0xb8(%rcx) movq %rdi, 0xd0(%rcx) movq %rdi, 0xc0(%rcx) movslq %esi, %rax addq %rdi, %rax movq %rax, 0xd8(%rcx) movq %rax, 0xc8(%rcx) movq %rcx, %rdi callq 0x13daa testl %eax, %eax je 0xc349 leaq 0x118(%rsp), %rdi movl $0x8870, %edx # imm = 0x8870 xorl %esi, %esi callq 0xa2f0 testq %rbx, %rbx je 0xc200 andq $0x0, (%rbx) movq %r14, 0x10(%rsp) movq %rbx, 0x18(%rsp) pushq $0x4 popq %rax movq %rax, 0x20(%rsp) xorl %ebx, %ebx xorl %r13d, %r13d xorl %ebp, %ebp leaq 0x38(%rsp), %r14 movq %r14, %rdi leaq 0x118(%rsp), %rsi movq 0x89c0(%rsp), %rdx movq %rbp, %rcx callq 0x16970 cmpq %r14, %rax je 0xc367 movq %rax, %r15 testq %rax, %rax je 0xc367 movq %rbp, 0x8(%rsp) movl 0x118(%rsp), %eax movq 0x28(%rsp), %rcx movl %eax, (%rcx) movl 0x11c(%rsp), %ebp movq 0x30(%rsp), %rcx movl %ebp, (%rcx) imull %eax, %ebp leal (,%rbp,4), %r14d leal 0x1(%rbx), %eax imull %r14d, %eax movslq %eax, %rsi testq %r13, %r13 je 0xc2c4 movq %r13, %rdi callq 0xaa20 testq %rax, %rax je 0xc3cc movq %rax, %r13 movq 0x18(%rsp), %r12 testq %r12, %r12 je 0xc2f9 movq (%r12), %rdi movq 0x20(%rsp), %rsi callq 0xaa20 testq %rax, %rax je 0xc3de movq %rax, (%r12) jmp 0xc2f9 movq %rsi, %rdi callq 0xa7e0 testq %rax, %rax je 0xc3fc movq %rax, %r13 movq 0x18(%rsp), %r12 testq %r12, %r12 je 0xc2f9 movq 0x20(%rsp), %rdi callq 0xa7e0 movq %rax, (%r12) testq %rax, %rax je 0xc3de movslq %r14d, %rdx movl %ebx, %eax imull %r14d, %eax movslq %eax, %rdi addq %r13, %rdi movq %r15, %rsi callq 0xa4c0 shll $0x3, %ebp movslq %ebp, %rax movq %r13, %rcx subq %rax, %rcx testq %rbx, %rbx movq 0x8(%rsp), %rbp cmovneq %rcx, %rbp testq %r12, %r12 je 0xc33b movl 0x8980(%rsp), %eax movq (%r12), %rcx movl %eax, (%rcx,%rbx,4) addq $0x4, 0x20(%rsp) incq %rbx jmp 0xc219 leaq 0x8c4c4(%rip), %rax # 0x98814 movq %rax, %fs:-0x20 movq $0x0, 0x8(%rsp) jmp 0xc41e movq 0x120(%rsp), %rdi callq 0xa710 movq 0x130(%rsp), %rdi callq 0xa710 movq 0x128(%rsp), %rdi callq 0xa710 movl 0x89c8(%rsp), %edx testl $0xfffffffb, %edx # imm = 0xFFFFFFFB je 0xc3bd movl 0x118(%rsp), %ecx imull %ebx, %ecx movl 0x11c(%rsp), %r8d pushq $0x4 popq %rsi movq %r13, %rdi callq 0x1504d movq %rax, %r13 movq 0x10(%rsp), %r14 movq %r13, 0x8(%rsp) movl %ebx, (%r14) jmp 0xc41e movq %r13, %rsi leaq 0x118(%rsp), %rdi movq 0x18(%rsp), %rdx jmp 0xc3ec leaq 0x118(%rsp), %rdi movq %r13, %rsi movq %r12, %rdx callq 0x19971 movq $0x0, 0x8(%rsp) jmp 0xc419 movq $0x0, 0x8(%rsp) leaq 0x118(%rsp), %rdi xorl %esi, %esi movq 0x18(%rsp), %rdx callq 0x19971 movq 0x10(%rsp), %r14 cmpl $0x0, %fs:-0x14 movq %fs:0x0, %rax leaq -0x18(%rax), %rax leaq 0x14aa1a(%rip), %rcx # 0x156e58 cmovneq %rax, %rcx cmpl $0x0, (%rcx) je 0xc497 movq 0x28(%rsp), %rax movl (%rax), %ebx movq 0x30(%rsp), %rax movl (%rax), %ebp movl (%r14), %eax movq 0x89c0(%rsp), %rcx movl (%rcx), %r14d movl %ebp, %ecx imull %ebx, %ecx imull %r14d, %ecx movslq %ecx, %r13 xorl %r12d, %r12d testl %eax, %eax cmovgl %eax, %r12d movq 0x8(%rsp), %r15 subl $0x1, %r12d jb 0xc497 movq %r15, %rdi movl %ebx, %esi movl %ebp, %edx movl %r14d, %ecx callq 0x13cd0 addq %r13, %r15 jmp 0xc47d movq 0x8(%rsp), %rax addq $0x8988, %rsp # imm = 0x8988 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
stbi_load_gif_from_memory: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 8988h mov r14, r9 mov [rsp+89B8h+var_8988], r8 mov [rsp+89B8h+var_8990], rcx lea rcx, [rsp+89B8h+var_8980] and qword ptr [rcx+10h], 0 mov rbx, rdx and dword ptr [rcx+30h], 0 and dword ptr [rcx+0B8h], 0 mov [rcx+0D0h], rdi mov [rcx+0C0h], rdi movsxd rax, esi add rax, rdi mov [rcx+0D8h], rax mov [rcx+0C8h], rax mov rdi, rcx call _ZL14stbi__gif_testP13stbi__context; stbi__gif_test(stbi__context *) test eax, eax jz loc_C349 lea rdi, [rsp+89B8h+var_88A0] mov edx, 8870h xor esi, esi call _memset test rbx, rbx jz short loc_C200 and qword ptr [rbx], 0 loc_C200: mov [rsp+89B8h+var_89A8], r14 mov [rsp+89B8h+var_89A0], rbx push 4 pop rax mov [rsp+89B8h+var_8998], rax xor ebx, ebx xor r13d, r13d xor ebp, ebp loc_C219: lea r14, [rsp+89B8h+var_8980] mov rdi, r14 lea rsi, [rsp+89B8h+var_88A0] mov rdx, [rsp+89B8h+arg_0] mov rcx, rbp call _ZL19stbi__gif_load_nextP13stbi__contextP9stbi__gifPiiPh; stbi__gif_load_next(stbi__context *,stbi__gif *,int *,int,uchar *) cmp rax, r14 jz loc_C367 mov r15, rax test rax, rax jz loc_C367 mov [rsp+89B8h+var_89B0], rbp mov eax, [rsp+89B8h+var_88A0] mov rcx, [rsp+89B8h+var_8990] mov [rcx], eax mov ebp, [rsp+89B8h+var_889C] mov rcx, [rsp+89B8h+var_8988] mov [rcx], ebp imul ebp, eax lea r14d, ds:0[rbp*4] lea eax, [rbx+1] imul eax, r14d movsxd rsi, eax test r13, r13 jz short loc_C2C4 mov rdi, r13 call _realloc test rax, rax jz loc_C3CC mov r13, rax mov r12, [rsp+89B8h+var_89A0] test r12, r12 jz short loc_C2F9 mov rdi, [r12] mov rsi, [rsp+89B8h+var_8998] call _realloc test rax, rax jz loc_C3DE mov [r12], rax jmp short loc_C2F9 loc_C2C4: mov rdi, rsi call _malloc test rax, rax jz loc_C3FC mov r13, rax mov r12, [rsp+89B8h+var_89A0] test r12, r12 jz short loc_C2F9 mov rdi, [rsp+89B8h+var_8998] call _malloc mov [r12], rax test rax, rax jz loc_C3DE loc_C2F9: movsxd rdx, r14d mov eax, ebx imul eax, r14d movsxd rdi, eax add rdi, r13 mov rsi, r15 call _memcpy shl ebp, 3 movsxd rax, ebp mov rcx, r13 sub rcx, rax test rbx, rbx mov rbp, [rsp+89B8h+var_89B0] cmovnz rbp, rcx test r12, r12 jz short loc_C33B mov eax, [rsp+89B8h+var_38] mov rcx, [r12] mov [rcx+rbx*4], eax loc_C33B: add [rsp+89B8h+var_8998], 4 inc rbx jmp loc_C219 loc_C349: lea rax, aNotGif; "not GIF" mov fs:0FFFFFFFFFFFFFFE0h, rax mov [rsp+89B8h+var_89B0], 0 jmp loc_C41E loc_C367: mov rdi, [rsp+89B8h+var_8898] call _free mov rdi, [rsp+89B8h+var_8888] call _free mov rdi, [rsp+89B8h+var_8890] call _free mov edx, [rsp+89B8h+arg_8]; int test edx, 0FFFFFFFBh jz short loc_C3BD mov ecx, [rsp+89B8h+var_88A0] imul ecx, ebx; unsigned int mov r8d, [rsp+89B8h+var_889C]; unsigned int push 4 pop rsi; int mov rdi, r13; unsigned __int8 * call _ZL20stbi__convert_formatPhiijj; stbi__convert_format(uchar *,int,int,uint,uint) mov r13, rax loc_C3BD: mov r14, [rsp+89B8h+var_89A8] mov [rsp+89B8h+var_89B0], r13 mov [r14], ebx jmp short loc_C41E loc_C3CC: mov rsi, r13 lea rdi, [rsp+89B8h+var_88A0] mov rdx, [rsp+89B8h+var_89A0] jmp short loc_C3EC loc_C3DE: lea rdi, [rsp+89B8h+var_88A0] mov rsi, r13 mov rdx, r12 loc_C3EC: call _ZL28stbi__load_gif_main_outofmemP9stbi__gifPhPPi; stbi__load_gif_main_outofmem(stbi__gif *,uchar *,int **) mov [rsp+89B8h+var_89B0], 0 jmp short loc_C419 loc_C3FC: mov [rsp+89B8h+var_89B0], 0 lea rdi, [rsp+89B8h+var_88A0] xor esi, esi mov rdx, [rsp+89B8h+var_89A0] call _ZL28stbi__load_gif_main_outofmemP9stbi__gifPhPPi; stbi__load_gif_main_outofmem(stbi__gif *,uchar *,int **) loc_C419: mov r14, [rsp+89B8h+var_89A8] loc_C41E: cmp dword ptr fs:0FFFFFFFFFFFFFFECh, 0 mov rax, fs:0 lea rax, [rax-18h] lea rcx, _ZL36stbi__vertically_flip_on_load_global; stbi__vertically_flip_on_load_global cmovnz rcx, rax cmp dword ptr [rcx], 0 jz short loc_C497 mov rax, [rsp+89B8h+var_8990] mov ebx, [rax] mov rax, [rsp+89B8h+var_8988] mov ebp, [rax] mov eax, [r14] mov rcx, [rsp+89B8h+arg_0] mov r14d, [rcx] mov ecx, ebp imul ecx, ebx imul ecx, r14d movsxd r13, ecx xor r12d, r12d test eax, eax cmovg r12d, eax mov r15, [rsp+89B8h+var_89B0] loc_C47D: sub r12d, 1 jb short loc_C497 mov rdi, r15; void * mov esi, ebx; int mov edx, ebp; int mov ecx, r14d; int call _ZL19stbi__vertical_flipPviii; stbi__vertical_flip(void *,int,int,int) add r15, r13 jmp short loc_C47D loc_C497: mov rax, [rsp+89B8h+var_89B0] add rsp, 8988h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned __int8 * stbi_load_gif_from_memory( long long a1, int a2, long long *a3, int *a4, int *a5, int *a6, int *a7, int a8) { long long v10; // rbx unsigned __int8 *v11; // r13 unsigned __int8 *v12; // rbp _BYTE *v13; // rax _BYTE *v14; // r15 int v15; // eax unsigned int v16; // ebp int v17; // ebp int v18; // eax long long v19; // rax long long *v20; // r12 long long v21; // rax long long v22; // rax long long v23; // rax long long v24; // rax unsigned __int8 *v25; // rsi long long *v26; // rdx unsigned long long v27; // rax int *v28; // rcx int v29; // ebx int v30; // ebp int v31; // eax int v32; // r14d long long v33; // r13 int v34; // r12d unsigned __int8 *i; // r15 unsigned __int8 *v38; // [rsp+8h] [rbp-89B0h] unsigned __int8 *v39; // [rsp+8h] [rbp-89B0h] long long *v40; // [rsp+18h] [rbp-89A0h] long long v41; // [rsp+20h] [rbp-8998h] _BYTE v44[16]; // [rsp+38h] [rbp-8980h] BYREF long long v45; // [rsp+48h] [rbp-8970h] int v46; // [rsp+68h] [rbp-8950h] int v47; // [rsp+F0h] [rbp-88C8h] long long v48; // [rsp+F8h] [rbp-88C0h] long long v49; // [rsp+100h] [rbp-88B8h] long long v50; // [rsp+108h] [rbp-88B0h] long long v51; // [rsp+110h] [rbp-88A8h] int v52; // [rsp+118h] [rbp-88A0h] BYREF unsigned int v53; // [rsp+11Ch] [rbp-889Ch] long long v54; // [rsp+120h] [rbp-8898h] long long v55; // [rsp+128h] [rbp-8890h] long long v56; // [rsp+130h] [rbp-8888h] int v57; // [rsp+8980h] [rbp-38h] v45 = 0LL; v46 = 0; v47 = 0; v50 = a1; v48 = a1; v51 = a1 + a2; v49 = v51; if ( (unsigned int)stbi__gif_test(v44) ) { memset(&v52, 0LL, 34928LL); if ( a3 ) *a3 = 0LL; v40 = a3; v41 = 4LL; v10 = 0LL; v11 = 0LL; v12 = 0LL; while ( 1 ) { v13 = (_BYTE *)stbi__gif_load_next(v44, &v52, a7, v12); if ( v13 == v44 ) break; v14 = v13; if ( !v13 ) break; v38 = v12; v15 = v52; *a4 = v52; v16 = v53; *a5 = v53; v17 = v15 * v16; v18 = 4 * v17 * (v10 + 1); if ( v11 ) { v19 = realloc(v11, v18); if ( !v19 ) { v25 = v11; v26 = v40; LABEL_26: stbi__load_gif_main_outofmem(&v52, v25, v26); v39 = 0LL; goto LABEL_28; } v11 = (unsigned __int8 *)v19; v20 = v40; if ( v40 ) { v21 = realloc(*v40, v41); if ( !v21 ) goto LABEL_25; *v40 = v21; } } else { v22 = malloc(v18); if ( !v22 ) { v39 = 0LL; stbi__load_gif_main_outofmem(&v52, 0LL, v40); goto LABEL_28; } v11 = (unsigned __int8 *)v22; v20 = v40; if ( v40 ) { v23 = malloc(v41); *v40 = v23; if ( !v23 ) { LABEL_25: v25 = v11; v26 = v20; goto LABEL_26; } } } memcpy(&v11[4 * v17 * (int)v10], v14, 4 * v17); v24 = 8 * v17; v12 = v38; if ( v10 ) v12 = &v11[-v24]; if ( v20 ) *(_DWORD *)(*v20 + 4 * v10) = v57; v41 += 4LL; ++v10; } free(v54); free(v56); free(v55); if ( (a8 & 0xFFFFFFFB) != 0 ) v11 = (unsigned __int8 *)stbi__convert_format(v11, 4, a8, (int)v10 * v52, v53); v39 = v11; *a6 = v10; } else { __writefsqword(0xFFFFFFE0, (unsigned long long)"not GIF"); v39 = 0LL; } LABEL_28: v27 = __readfsqword(0) - 24; v28 = &stbi__vertically_flip_on_load_global; if ( __readfsdword(0xFFFFFFEC) ) v28 = (int *)v27; if ( *v28 ) { v29 = *a4; v30 = *a5; v31 = *a6; v32 = *a7; v33 = *a7 * *a4 * *a5; v34 = 0; if ( v31 > 0 ) v34 = v31; for ( i = v39; v34-- != 0; i += v33 ) stbi__vertical_flip(i, v29, v30, v32); } return v39; }
stbi_load_gif_from_memory: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x8988 MOV R14,R9 MOV qword ptr [RSP + 0x30],R8 MOV qword ptr [RSP + 0x28],RCX LEA RCX,[RSP + 0x38] AND qword ptr [RCX + 0x10],0x0 MOV RBX,RDX AND dword ptr [RCX + 0x30],0x0 AND dword ptr [RCX + 0xb8],0x0 MOV qword ptr [RCX + 0xd0],RDI MOV qword ptr [RCX + 0xc0],RDI MOVSXD RAX,ESI ADD RAX,RDI MOV qword ptr [RCX + 0xd8],RAX MOV qword ptr [RCX + 0xc8],RAX MOV RDI,RCX CALL 0x00113daa TEST EAX,EAX JZ 0x0010c349 LEA RDI,[RSP + 0x118] MOV EDX,0x8870 XOR ESI,ESI CALL 0x0010a2f0 TEST RBX,RBX JZ 0x0010c200 AND qword ptr [RBX],0x0 LAB_0010c200: MOV qword ptr [RSP + 0x10],R14 MOV qword ptr [RSP + 0x18],RBX PUSH 0x4 POP RAX MOV qword ptr [RSP + 0x20],RAX XOR EBX,EBX XOR R13D,R13D XOR EBP,EBP LAB_0010c219: LEA R14,[RSP + 0x38] MOV RDI,R14 LEA RSI,[RSP + 0x118] MOV RDX,qword ptr [RSP + 0x89c0] MOV RCX,RBP CALL 0x00116970 CMP RAX,R14 JZ 0x0010c367 MOV R15,RAX TEST RAX,RAX JZ 0x0010c367 MOV qword ptr [RSP + 0x8],RBP MOV EAX,dword ptr [RSP + 0x118] MOV RCX,qword ptr [RSP + 0x28] MOV dword ptr [RCX],EAX MOV EBP,dword ptr [RSP + 0x11c] MOV RCX,qword ptr [RSP + 0x30] MOV dword ptr [RCX],EBP IMUL EBP,EAX LEA R14D,[RBP*0x4] LEA EAX,[RBX + 0x1] IMUL EAX,R14D MOVSXD RSI,EAX TEST R13,R13 JZ 0x0010c2c4 MOV RDI,R13 CALL 0x0010aa20 TEST RAX,RAX JZ 0x0010c3cc MOV R13,RAX MOV R12,qword ptr [RSP + 0x18] TEST R12,R12 JZ 0x0010c2f9 MOV RDI,qword ptr [R12] MOV RSI,qword ptr [RSP + 0x20] CALL 0x0010aa20 TEST RAX,RAX JZ 0x0010c3de MOV qword ptr [R12],RAX JMP 0x0010c2f9 LAB_0010c2c4: MOV RDI,RSI CALL 0x0010a7e0 TEST RAX,RAX JZ 0x0010c3fc MOV R13,RAX MOV R12,qword ptr [RSP + 0x18] TEST R12,R12 JZ 0x0010c2f9 MOV RDI,qword ptr [RSP + 0x20] CALL 0x0010a7e0 MOV qword ptr [R12],RAX TEST RAX,RAX JZ 0x0010c3de LAB_0010c2f9: MOVSXD RDX,R14D MOV EAX,EBX IMUL EAX,R14D MOVSXD RDI,EAX ADD RDI,R13 MOV RSI,R15 CALL 0x0010a4c0 SHL EBP,0x3 MOVSXD RAX,EBP MOV RCX,R13 SUB RCX,RAX TEST RBX,RBX MOV RBP,qword ptr [RSP + 0x8] CMOVNZ RBP,RCX TEST R12,R12 JZ 0x0010c33b MOV EAX,dword ptr [RSP + 0x8980] MOV RCX,qword ptr [R12] MOV dword ptr [RCX + RBX*0x4],EAX LAB_0010c33b: ADD qword ptr [RSP + 0x20],0x4 INC RBX JMP 0x0010c219 LAB_0010c349: LEA RAX,[0x198814] MOV qword ptr FS:[-0x20],RAX MOV qword ptr [RSP + 0x8],0x0 JMP 0x0010c41e LAB_0010c367: MOV RDI,qword ptr [RSP + 0x120] CALL 0x0010a710 MOV RDI,qword ptr [RSP + 0x130] CALL 0x0010a710 MOV RDI,qword ptr [RSP + 0x128] CALL 0x0010a710 MOV EDX,dword ptr [RSP + 0x89c8] TEST EDX,0xfffffffb JZ 0x0010c3bd MOV ECX,dword ptr [RSP + 0x118] IMUL ECX,EBX MOV R8D,dword ptr [RSP + 0x11c] PUSH 0x4 POP RSI MOV RDI,R13 CALL 0x0011504d MOV R13,RAX LAB_0010c3bd: MOV R14,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],R13 MOV dword ptr [R14],EBX JMP 0x0010c41e LAB_0010c3cc: MOV RSI,R13 LEA RDI,[RSP + 0x118] MOV RDX,qword ptr [RSP + 0x18] JMP 0x0010c3ec LAB_0010c3de: LEA RDI,[RSP + 0x118] MOV RSI,R13 MOV RDX,R12 LAB_0010c3ec: CALL 0x00119971 MOV qword ptr [RSP + 0x8],0x0 JMP 0x0010c419 LAB_0010c3fc: MOV qword ptr [RSP + 0x8],0x0 LEA RDI,[RSP + 0x118] XOR ESI,ESI MOV RDX,qword ptr [RSP + 0x18] CALL 0x00119971 LAB_0010c419: MOV R14,qword ptr [RSP + 0x10] LAB_0010c41e: CMP dword ptr FS:[-0x14],0x0 MOV RAX,qword ptr FS:[0x0] LEA RAX,[RAX + -0x18] LEA RCX,[0x256e58] CMOVNZ RCX,RAX CMP dword ptr [RCX],0x0 JZ 0x0010c497 MOV RAX,qword ptr [RSP + 0x28] MOV EBX,dword ptr [RAX] MOV RAX,qword ptr [RSP + 0x30] MOV EBP,dword ptr [RAX] MOV EAX,dword ptr [R14] MOV RCX,qword ptr [RSP + 0x89c0] MOV R14D,dword ptr [RCX] MOV ECX,EBP IMUL ECX,EBX IMUL ECX,R14D MOVSXD R13,ECX XOR R12D,R12D TEST EAX,EAX CMOVG R12D,EAX MOV R15,qword ptr [RSP + 0x8] LAB_0010c47d: SUB R12D,0x1 JC 0x0010c497 MOV RDI,R15 MOV ESI,EBX MOV EDX,EBP MOV ECX,R14D CALL 0x00113cd0 ADD R15,R13 JMP 0x0010c47d LAB_0010c497: MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x8988 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
uchar * stbi_load_gif_from_memory (long param_1,int param_2,int **param_3,int *param_4,uint *param_5,int *param_6, int *param_7,uint param_8) { uint uVar1; int iVar2; int iVar3; stbi__context *__src; uchar *puVar4; int *piVar5; long lVar6; int iVar7; long lVar8; size_t __size; uint *puVar9; long *in_FS_OFFSET; uchar *local_89b0; size_t local_8998; stbi__context local_8980 [16]; int8 local_8970; int4 local_8950; int4 local_88c8; long local_88c0; long local_88b8; long local_88b0; long local_88a8; int local_88a0; uint local_889c; void *local_8898; void *local_8890; void *local_8888; int local_38; local_8970 = 0; local_8950 = 0; local_88c8 = 0; local_88b8 = param_2 + param_1; puVar9 = param_5; local_88c0 = param_1; local_88b0 = param_1; local_88a8 = local_88b8; iVar3 = stbi__gif_test(local_8980); if (iVar3 == 0) { in_FS_OFFSET[-4] = (long)"not GIF"; local_89b0 = (uchar *)0x0; } else { memset(&local_88a0,0,0x8870); if (param_3 != (int **)0x0) { *param_3 = (int *)0x0; } local_8998 = 4; lVar6 = 0; local_89b0 = (uchar *)0x0; lVar8 = 0; while( true ) { __src = (stbi__context *) stbi__gif_load_next(local_8980,(stbi__gif *)&local_88a0,param_7,(int)lVar8, (uchar *)puVar9); iVar3 = (int)lVar6; if ((__src == local_8980) || (__src == (stbi__context *)0x0)) break; *param_4 = local_88a0; *param_5 = local_889c; iVar7 = local_889c * local_88a0; iVar2 = iVar7 * 4; __size = (size_t)((iVar3 + 1) * iVar2); if (local_89b0 == (uchar *)0x0) { local_89b0 = (uchar *)malloc(__size); if (local_89b0 != (uchar *)0x0) { if (param_3 != (int **)0x0) { piVar5 = (int *)malloc(local_8998); *param_3 = piVar5; if (piVar5 == (int *)0x0) goto LAB_0010c3ec; } goto LAB_0010c2f9; } stbi__load_gif_main_outofmem((stbi__gif *)&local_88a0,(uchar *)0x0,param_3); LAB_0010c419: local_89b0 = (uchar *)0x0; goto LAB_0010c41e; } puVar4 = (uchar *)realloc(local_89b0,__size); if (puVar4 == (uchar *)0x0) { LAB_0010c3ec: stbi__load_gif_main_outofmem((stbi__gif *)&local_88a0,local_89b0,param_3); goto LAB_0010c419; } local_89b0 = puVar4; if (param_3 != (int **)0x0) { piVar5 = (int *)realloc(*param_3,local_8998); if (piVar5 == (int *)0x0) goto LAB_0010c3ec; *param_3 = piVar5; } LAB_0010c2f9: memcpy(local_89b0 + iVar3 * iVar2,__src,(long)iVar2); if (lVar6 != 0) { lVar8 = (long)local_89b0 - (long)(iVar7 * 8); } if (param_3 != (int **)0x0) { (*param_3)[lVar6] = local_38; } local_8998 = local_8998 + 4; lVar6 = lVar6 + 1; } free(local_8898); free(local_8888); free(local_8890); if ((param_8 & 0xfffffffb) != 0) { local_89b0 = (uchar *)stbi__convert_format(local_89b0,4,param_8,local_88a0 * iVar3,local_889c) ; } *param_6 = iVar3; } LAB_0010c41e: piVar5 = &stbi__vertically_flip_on_load_global; if (*(int *)((long)in_FS_OFFSET + -0x14) != 0) { piVar5 = (int *)(*in_FS_OFFSET + -0x18); } if (*piVar5 != 0) { iVar3 = *param_4; uVar1 = *param_5; iVar2 = *param_7; puVar4 = local_89b0; iVar7 = 0; if (0 < *param_6) { iVar7 = *param_6; } while (iVar7 != 0) { stbi__vertical_flip(puVar4,iVar3,uVar1,iVar2); puVar4 = puVar4 + (int)(uVar1 * iVar3 * iVar2); iVar7 = iVar7 + -1; } } return local_89b0; }
21,779
stbi_load_gif_from_memory
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
STBIDEF stbi_uc *stbi_load_gif_from_memory(stbi_uc const *buffer, int len, int **delays, int *x, int *y, int *z, int *comp, int req_comp) { unsigned char *result; stbi__context s; stbi__start_mem(&s,buffer,len); result = (unsigned char*) stbi__load_gif_main(&s, delays, x, y, z, comp, req_comp); if (stbi__vertically_flip_on_load) { stbi__vertical_flip_slices( result, *x, *y, *z, *comp ); } return result; }
O3
c
stbi_load_gif_from_memory: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x8988, %rsp # imm = 0x8988 movq %r9, %r15 movq %r8, 0x20(%rsp) movq %rcx, 0x30(%rsp) movq %rdx, %rbx leaq 0x38(%rsp), %rcx movq $0x0, 0x10(%rcx) xorl %eax, %eax movl %eax, 0x30(%rcx) movl %eax, 0xb8(%rcx) movq %rdi, 0xd0(%rcx) movq %rdi, 0xc0(%rcx) movslq %esi, %rax addq %rdi, %rax movq %rax, 0xd8(%rcx) movq %rax, 0xc8(%rcx) movq %rcx, %rdi callq 0x22447 testl %eax, %eax je 0x1a2d2 leaq 0x118(%rsp), %rdi xorl %ebp, %ebp movl $0x8870, %edx # imm = 0x8870 xorl %esi, %esi callq 0xa2f0 testq %rbx, %rbx je 0x1a0e1 movq $0x0, (%rbx) movq %rbx, 0x18(%rsp) leaq 0x118(%rsp), %rsi leaq 0x38(%rsp), %rbx movq %rbx, %rdi movq 0x89c0(%rsp), %rdx xorl %ecx, %ecx callq 0x28e0d movq %rax, %r14 cmpq %rbx, %rax sete %al testq %r14, %r14 sete %cl orb %al, %cl movl $0x0, %r13d jne 0x1a26a movq %r15, 0x10(%rsp) movl $0x4, %eax movq %rax, 0x28(%rsp) xorl %ebp, %ebp xorl %r12d, %r12d xorl %r13d, %r13d movq 0x20(%rsp), %r15 movq %r12, 0x8(%rsp) movl 0x118(%rsp), %eax movq 0x30(%rsp), %rcx movl %eax, (%rcx) movl 0x11c(%rsp), %ebx movl %ebx, (%r15) imull %eax, %ebx leal (,%rbx,4), %r12d leal 0x1(%rbp), %eax imull %r12d, %eax movslq %eax, %rsi testq %r13, %r13 je 0x1a1b1 movq %r13, %rdi movq %r13, %r15 callq 0xaa30 testq %rax, %rax je 0x1a2ed movq %rax, %r13 movq 0x18(%rsp), %r15 testq %r15, %r15 je 0x1a1e5 movq (%r15), %rdi movq 0x28(%rsp), %rsi callq 0xaa30 testq %rax, %rax je 0x1a2ff movq %rax, (%r15) jmp 0x1a1e5 movq %rsi, %rdi callq 0xa7b0 testq %rax, %rax je 0x1a31d movq %rax, %r13 movq 0x18(%rsp), %r15 testq %r15, %r15 je 0x1a1e5 movq 0x28(%rsp), %rdi callq 0xa7b0 movq %rax, (%r15) testq %rax, %rax je 0x1a2ff movslq %r12d, %rdx movl %ebp, %ecx imull %r12d, %ecx movslq %ecx, %rdi addq %r13, %rdi movq %r14, %rsi callq 0xa4b0 shll $0x3, %ebx movslq %ebx, %rax movq %r13, %rcx subq %rax, %rcx testq %rbp, %rbp movq 0x8(%rsp), %r12 cmovneq %rcx, %r12 testq %r15, %r15 je 0x1a226 movl 0x8980(%rsp), %eax movq (%r15), %rcx movl %eax, (%rcx,%rbp,4) leaq 0x38(%rsp), %rbx movq %rbx, %rdi leaq 0x118(%rsp), %rsi movq 0x89c0(%rsp), %rdx movq %r12, %rcx callq 0x28e0d incq %rbp cmpq %rbx, %rax movq 0x20(%rsp), %r15 je 0x1a265 movq %rax, %r14 addq $0x4, 0x28(%rsp) testq %rax, %rax jne 0x1a13e movq 0x10(%rsp), %r15 movq %r13, 0x8(%rsp) movl 0x89c8(%rsp), %ebx movq 0x120(%rsp), %rdi callq 0xa6f0 movq 0x130(%rsp), %rdi callq 0xa6f0 movq 0x128(%rsp), %rdi callq 0xa6f0 testl $0xfffffffb, %ebx # imm = 0xFFFFFFFB je 0x1a2cd movl 0x118(%rsp), %ecx imull %ebp, %ecx movl 0x11c(%rsp), %r8d movq 0x8(%rsp), %rdi movl $0x4, %esi movl %ebx, %edx callq 0x2701a movq %rax, 0x8(%rsp) movl %ebp, (%r15) jmp 0x1a33f leaq 0xa160b(%rip), %rax # 0xbb8e4 movq %rax, %fs:-0x20 movq $0x0, 0x8(%rsp) jmp 0x1a33f leaq 0x118(%rsp), %rdi movq %r15, %rsi movq 0x18(%rsp), %rdx jmp 0x1a30d leaq 0x118(%rsp), %rdi movq %r13, %rsi movq %r15, %rdx callq 0x2d470 movq $0x0, 0x8(%rsp) jmp 0x1a33a movq $0x0, 0x8(%rsp) leaq 0x118(%rsp), %rdi xorl %esi, %esi movq 0x18(%rsp), %rdx callq 0x2d470 movq 0x10(%rsp), %r15 cmpl $0x0, %fs:-0x14 movq %fs:0x0, %rax leaq -0x18(%rax), %rax leaq 0x15bae9(%rip), %rcx # 0x175e48 cmovneq %rax, %rcx cmpl $0x0, (%rcx) je 0x1a3b1 movl (%r15), %r12d testl %r12d, %r12d jle 0x1a3b1 movq 0x30(%rsp), %rax movl (%rax), %ebx movq 0x20(%rsp), %rax movl (%rax), %ebp movq 0x89c0(%rsp), %rax movl (%rax), %r14d movl %ebp, %eax imull %ebx, %eax imull %r14d, %eax movslq %eax, %r13 movq 0x8(%rsp), %r15 movq %r15, %rdi movl %ebx, %esi movl %ebp, %edx movl %r14d, %ecx callq 0x2235a addq %r13, %r15 decl %r12d jne 0x1a39a movq 0x8(%rsp), %rax addq $0x8988, %rsp # imm = 0x8988 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
stbi_load_gif_from_memory: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 8988h mov r15, r9 mov [rsp+89B8h+var_8998], r8 mov [rsp+89B8h+var_8988], rcx mov rbx, rdx lea rcx, [rsp+89B8h+var_8980] mov qword ptr [rcx+10h], 0 xor eax, eax mov [rcx+30h], eax mov [rcx+0B8h], eax mov [rcx+0D0h], rdi mov [rcx+0C0h], rdi movsxd rax, esi add rax, rdi mov [rcx+0D8h], rax mov [rcx+0C8h], rax mov rdi, rcx call _ZL14stbi__gif_testP13stbi__context; stbi__gif_test(stbi__context *) test eax, eax jz loc_1A2D2 lea rdi, [rsp+89B8h+var_88A0] xor ebp, ebp mov edx, 8870h xor esi, esi call _memset test rbx, rbx jz short loc_1A0E1 mov qword ptr [rbx], 0 loc_1A0E1: mov [rsp+89B8h+var_89A0], rbx lea rsi, [rsp+89B8h+var_88A0] lea rbx, [rsp+89B8h+var_8980] mov rdi, rbx mov rdx, [rsp+89B8h+arg_0] xor ecx, ecx call _ZL19stbi__gif_load_nextP13stbi__contextP9stbi__gifPiiPh; stbi__gif_load_next(stbi__context *,stbi__gif *,int *,int,uchar *) mov r14, rax cmp rax, rbx setz al test r14, r14 setz cl or cl, al mov r13d, 0 jnz loc_1A26A mov [rsp+89B8h+var_89A8], r15 mov eax, 4 mov [rsp+89B8h+var_8990], rax xor ebp, ebp xor r12d, r12d xor r13d, r13d mov r15, [rsp+89B8h+var_8998] loc_1A13E: mov [rsp+89B8h+var_89B0], r12 mov eax, [rsp+89B8h+var_88A0] mov rcx, [rsp+89B8h+var_8988] mov [rcx], eax mov ebx, [rsp+89B8h+var_889C] mov [r15], ebx imul ebx, eax lea r12d, ds:0[rbx*4] lea eax, [rbp+1] imul eax, r12d movsxd rsi, eax test r13, r13 jz short loc_1A1B1 mov rdi, r13 mov r15, r13 call _realloc test rax, rax jz loc_1A2ED mov r13, rax mov r15, [rsp+89B8h+var_89A0] test r15, r15 jz short loc_1A1E5 mov rdi, [r15] mov rsi, [rsp+89B8h+var_8990] call _realloc test rax, rax jz loc_1A2FF mov [r15], rax jmp short loc_1A1E5 loc_1A1B1: mov rdi, rsi call _malloc test rax, rax jz loc_1A31D mov r13, rax mov r15, [rsp+89B8h+var_89A0] test r15, r15 jz short loc_1A1E5 mov rdi, [rsp+89B8h+var_8990] call _malloc mov [r15], rax test rax, rax jz loc_1A2FF loc_1A1E5: movsxd rdx, r12d mov ecx, ebp imul ecx, r12d movsxd rdi, ecx add rdi, r13 mov rsi, r14 call _memcpy shl ebx, 3 movsxd rax, ebx mov rcx, r13 sub rcx, rax test rbp, rbp mov r12, [rsp+89B8h+var_89B0] cmovnz r12, rcx test r15, r15 jz short loc_1A226 mov eax, [rsp+89B8h+var_38] mov rcx, [r15] mov [rcx+rbp*4], eax loc_1A226: lea rbx, [rsp+89B8h+var_8980] mov rdi, rbx lea rsi, [rsp+89B8h+var_88A0] mov rdx, [rsp+89B8h+arg_0] mov rcx, r12 call _ZL19stbi__gif_load_nextP13stbi__contextP9stbi__gifPiiPh; stbi__gif_load_next(stbi__context *,stbi__gif *,int *,int,uchar *) inc rbp cmp rax, rbx mov r15, [rsp+89B8h+var_8998] jz short loc_1A265 mov r14, rax add [rsp+89B8h+var_8990], 4 test rax, rax jnz loc_1A13E loc_1A265: mov r15, [rsp+89B8h+var_89A8] loc_1A26A: mov [rsp+89B8h+var_89B0], r13 mov ebx, [rsp+89B8h+arg_8] mov rdi, [rsp+89B8h+var_8898] call _free mov rdi, [rsp+89B8h+var_8888] call _free mov rdi, [rsp+89B8h+var_8890] call _free test ebx, 0FFFFFFFBh jz short loc_1A2CD mov ecx, [rsp+89B8h+var_88A0] imul ecx, ebp; unsigned int mov r8d, [rsp+89B8h+var_889C]; unsigned int mov rdi, [rsp+89B8h+var_89B0]; unsigned __int8 * mov esi, 4; int mov edx, ebx; int call _ZL20stbi__convert_formatPhiijj; stbi__convert_format(uchar *,int,int,uint,uint) mov [rsp+89B8h+var_89B0], rax loc_1A2CD: mov [r15], ebp jmp short loc_1A33F loc_1A2D2: lea rax, aNotGif; "not GIF" mov fs:0FFFFFFFFFFFFFFE0h, rax mov [rsp+89B8h+var_89B0], 0 jmp short loc_1A33F loc_1A2ED: lea rdi, [rsp+89B8h+var_88A0] mov rsi, r15 mov rdx, [rsp+89B8h+var_89A0] jmp short loc_1A30D loc_1A2FF: lea rdi, [rsp+89B8h+var_88A0] mov rsi, r13 mov rdx, r15 loc_1A30D: call _ZL28stbi__load_gif_main_outofmemP9stbi__gifPhPPi; stbi__load_gif_main_outofmem(stbi__gif *,uchar *,int **) mov [rsp+89B8h+var_89B0], 0 jmp short loc_1A33A loc_1A31D: mov [rsp+89B8h+var_89B0], 0 lea rdi, [rsp+89B8h+var_88A0] xor esi, esi mov rdx, [rsp+89B8h+var_89A0] call _ZL28stbi__load_gif_main_outofmemP9stbi__gifPhPPi; stbi__load_gif_main_outofmem(stbi__gif *,uchar *,int **) loc_1A33A: mov r15, [rsp+89B8h+var_89A8] loc_1A33F: cmp dword ptr fs:0FFFFFFFFFFFFFFECh, 0 mov rax, fs:0 lea rax, [rax-18h] lea rcx, _ZL36stbi__vertically_flip_on_load_global; stbi__vertically_flip_on_load_global cmovnz rcx, rax cmp dword ptr [rcx], 0 jz short loc_1A3B1 mov r12d, [r15] test r12d, r12d jle short loc_1A3B1 mov rax, [rsp+89B8h+var_8988] mov ebx, [rax] mov rax, [rsp+89B8h+var_8998] mov ebp, [rax] mov rax, [rsp+89B8h+arg_0] mov r14d, [rax] mov eax, ebp imul eax, ebx imul eax, r14d movsxd r13, eax mov r15, [rsp+89B8h+var_89B0] loc_1A39A: mov rdi, r15; void * mov esi, ebx; int mov edx, ebp; int mov ecx, r14d; int call _ZL19stbi__vertical_flipPviii; stbi__vertical_flip(void *,int,int,int) add r15, r13 dec r12d jnz short loc_1A39A loc_1A3B1: mov rax, [rsp+89B8h+var_89B0] add rsp, 8988h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned __int8 * stbi_load_gif_from_memory( long long a1, int a2, long long *a3, int *a4, int *a5, _DWORD *a6, int *a7, int a8) { long long v10; // rbp _BYTE *v11; // r14 unsigned __int8 *v12; // r13 unsigned __int8 *v13; // r12 _DWORD *v14; // r15 int v15; // eax unsigned int v16; // ebx int v17; // ebx int v18; // eax long long v19; // rax long long *v20; // r15 long long v21; // rax long long v22; // rax long long v23; // rax int v24; // ebx _BYTE *v25; // rax unsigned __int8 *v26; // rsi long long *v27; // rdx unsigned long long v28; // rax int *v29; // rcx int v30; // r12d int v31; // ebx int v32; // ebp int v33; // r14d long long v34; // r13 unsigned __int8 *v35; // r15 unsigned __int8 *v37; // [rsp+8h] [rbp-89B0h] _DWORD *v38; // [rsp+10h] [rbp-89A8h] long long *v39; // [rsp+18h] [rbp-89A0h] long long v41; // [rsp+28h] [rbp-8990h] _BYTE v43[16]; // [rsp+38h] [rbp-8980h] BYREF long long v44; // [rsp+48h] [rbp-8970h] int v45; // [rsp+68h] [rbp-8950h] int v46; // [rsp+F0h] [rbp-88C8h] long long v47; // [rsp+F8h] [rbp-88C0h] long long v48; // [rsp+100h] [rbp-88B8h] long long v49; // [rsp+108h] [rbp-88B0h] long long v50; // [rsp+110h] [rbp-88A8h] int v51; // [rsp+118h] [rbp-88A0h] BYREF unsigned int v52; // [rsp+11Ch] [rbp-889Ch] long long v53; // [rsp+120h] [rbp-8898h] long long v54; // [rsp+128h] [rbp-8890h] long long v55; // [rsp+130h] [rbp-8888h] int v56; // [rsp+8980h] [rbp-38h] v44 = 0LL; v45 = 0; v46 = 0; v49 = a1; v47 = a1; v50 = a1 + a2; v48 = v50; if ( !(unsigned int)stbi__gif_test(v43) ) { __writefsqword(0xFFFFFFE0, (unsigned long long)"not GIF"); v37 = 0LL; goto LABEL_30; } LODWORD(v10) = 0; memset(&v51, 0LL, 34928LL); if ( a3 ) *a3 = 0LL; v39 = a3; v11 = (_BYTE *)stbi__gif_load_next(v43, &v51, a7, 0LL); v12 = 0LL; if ( v11 == v43 || v11 == 0LL ) { LABEL_21: v37 = v12; free(v53); free(v55); free(v54); if ( (a8 & 0xFFFFFFFB) != 0 ) v37 = (unsigned __int8 *)stbi__convert_format(v12, 4, a8, (int)v10 * v51, v52); *a6 = v10; goto LABEL_30; } v38 = a6; v41 = 4LL; v10 = 0LL; v13 = 0LL; v12 = 0LL; v14 = a5; while ( 1 ) { v15 = v51; *a4 = v51; v16 = v52; *v14 = v52; v17 = v15 * v16; v18 = 4 * v17 * (v10 + 1); if ( v12 ) { v19 = realloc(v12, v18); if ( !v19 ) { v26 = v12; v27 = v39; LABEL_27: stbi__load_gif_main_outofmem(&v51, v26, v27); v37 = 0LL; goto LABEL_29; } v12 = (unsigned __int8 *)v19; v20 = v39; if ( v39 ) { v21 = realloc(*v39, v41); if ( !v21 ) goto LABEL_26; *v39 = v21; } goto LABEL_14; } v22 = malloc(v18); if ( !v22 ) break; v12 = (unsigned __int8 *)v22; v20 = v39; if ( v39 ) { v23 = malloc(v41); *v39 = v23; if ( !v23 ) { LABEL_26: v26 = v12; v27 = v20; goto LABEL_27; } } LABEL_14: memcpy(&v12[4 * v17 * (int)v10], v11, 4 * v17); v24 = 8 * v17; if ( v10 ) v13 = &v12[-v24]; if ( v20 ) *(_DWORD *)(*v20 + 4 * v10) = v56; v25 = (_BYTE *)stbi__gif_load_next(v43, &v51, a7, v13); ++v10; v14 = a5; if ( v25 != v43 ) { v11 = v25; v41 += 4LL; if ( v25 ) continue; } a6 = v38; goto LABEL_21; } v37 = 0LL; stbi__load_gif_main_outofmem(&v51, 0LL, v39); LABEL_29: a6 = v38; LABEL_30: v28 = __readfsqword(0) - 24; v29 = &stbi__vertically_flip_on_load_global; if ( __readfsdword(0xFFFFFFEC) ) v29 = (int *)v28; if ( *v29 ) { v30 = *a6; if ( (int)*a6 > 0 ) { v31 = *a4; v32 = *a5; v33 = *a7; v34 = *a7 * *a4 * *a5; v35 = v37; do { stbi__vertical_flip(v35, v31, v32, v33); v35 += v34; --v30; } while ( v30 ); } } return v37; }
21,780
ma_check_index
eloqsql/storage/maria/ma_search.c
int _ma_check_index(MARIA_HA *info, int inx) { if (inx < 0 || ! maria_is_key_active(info->s->state.key_map, inx)) { my_errno=HA_ERR_WRONG_INDEX; return -1; } if (info->lastinx != inx) /* Index changed */ { info->lastinx = inx; info->last_key.keyinfo= info->s->keyinfo + inx; info->last_key.flag= 0; info->page_changed=1; info->update= ((info->update & (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED)) | HA_STATE_NEXT_FOUND | HA_STATE_PREV_FOUND); } if ((info->opt_flag & WRITE_CACHE_USED) && flush_io_cache(&info->rec_cache)) { if (unlikely(!my_errno)) my_errno= HA_ERR_INTERNAL_ERROR; /* Impossible */ return(-1); } if (unlikely(maria_is_crashed(info))) { my_errno= HA_ERR_CRASHED; return(-1); } return(inx); }
O3
c
ma_check_index: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl $0x7c, %r15d testl %esi, %esi js 0x3ddfd movl %esi, %ebx movq %rdi, %r14 movq (%rdi), %rax movq 0x140(%rax), %rcx btq %rbx, %rcx jae 0x3ddfd cmpl %ebx, 0x62c(%r14) je 0x3ddb5 movl %ebx, %ecx movl %ebx, 0x62c(%r14) imulq $0x118, %rcx, %rcx # imm = 0x118 addq 0x570(%rax), %rcx movq %rcx, 0x208(%r14) movl $0x0, 0x218(%r14) movb $0x1, 0x684(%r14) movl $0x401, %ecx # imm = 0x401 andl 0x624(%r14), %ecx orl $0x30, %ecx movl %ecx, 0x624(%r14) testb $0x10, 0x61c(%r14) je 0x3ddee leaq 0x4b8(%r14), %rdi movl $0x1, %esi callq 0xb55e9 testl %eax, %eax je 0x3ddeb callq 0xc5c9a movl $0xffffffff, %ebx # imm = 0xFFFFFFFF cmpl $0x0, (%rax) jne 0x3de0a movl $0x7a, %r15d jmp 0x3ddfd movq (%r14), %rax testb $0x2, 0x170(%rax) je 0x3de0a movl $0x7e, %r15d callq 0xc5c9a movl %r15d, (%rax) movl $0xffffffff, %ebx # imm = 0xFFFFFFFF movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_ma_check_index: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r15d, 7Ch ; '|' test esi, esi js loc_3DDFD mov ebx, esi mov r14, rdi mov rax, [rdi] mov rcx, [rax+140h] bt rcx, rbx jnb loc_3DDFD cmp [r14+62Ch], ebx jz short loc_3DDB5 mov ecx, ebx mov [r14+62Ch], ebx imul rcx, 118h add rcx, [rax+570h] mov [r14+208h], rcx mov dword ptr [r14+218h], 0 mov byte ptr [r14+684h], 1 mov ecx, 401h and ecx, [r14+624h] or ecx, 30h mov [r14+624h], ecx loc_3DDB5: test byte ptr [r14+61Ch], 10h jz short loc_3DDEE lea rdi, [r14+4B8h] mov esi, 1 call my_b_flush_io_cache test eax, eax jz short loc_3DDEB call _my_thread_var mov ebx, 0FFFFFFFFh cmp dword ptr [rax], 0 jnz short loc_3DE0A mov r15d, 7Ah ; 'z' jmp short loc_3DDFD loc_3DDEB: mov rax, [r14] loc_3DDEE: test byte ptr [rax+170h], 2 jz short loc_3DE0A mov r15d, 7Eh ; '~' loc_3DDFD: call _my_thread_var mov [rax], r15d mov ebx, 0FFFFFFFFh loc_3DE0A: mov eax, ebx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long ma_check_index(long long *a1, int a2) { int v2; // r15d unsigned int v3; // ebx long long *v4; // r14 long long v5; // rax long long v6; // rcx v2 = 124; if ( a2 < 0 ) goto LABEL_12; v3 = a2; v4 = a1; v5 = *a1; v6 = *(_QWORD *)(*a1 + 320); if ( !_bittest64(&v6, (unsigned int)a2) ) goto LABEL_12; if ( *((_DWORD *)a1 + 395) != a2 ) { *((_DWORD *)a1 + 395) = a2; a1[65] = *(_QWORD *)(v5 + 1392) + 280LL * (unsigned int)a2; *((_DWORD *)a1 + 134) = 0; *((_BYTE *)a1 + 1668) = 1; *((_DWORD *)a1 + 393) = *((_DWORD *)a1 + 393) & 0x401 | 0x30; } if ( (*((_BYTE *)a1 + 1564) & 0x10) != 0 ) { a1 += 151; if ( (unsigned int)my_b_flush_io_cache(a1, 1LL) ) { v3 = -1; if ( !*(_DWORD *)my_thread_var(a1) ) { v2 = 122; LABEL_12: *(_DWORD *)my_thread_var(a1) = v2; return (unsigned int)-1; } return v3; } v5 = *v4; } if ( (*(_BYTE *)(v5 + 368) & 2) != 0 ) { v2 = 126; goto LABEL_12; } return v3; }
_ma_check_index: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R15D,0x7c TEST ESI,ESI JS 0x0013ddfd MOV EBX,ESI MOV R14,RDI MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RAX + 0x140] BT RCX,RBX JNC 0x0013ddfd CMP dword ptr [R14 + 0x62c],EBX JZ 0x0013ddb5 MOV ECX,EBX MOV dword ptr [R14 + 0x62c],EBX IMUL RCX,RCX,0x118 ADD RCX,qword ptr [RAX + 0x570] MOV qword ptr [R14 + 0x208],RCX MOV dword ptr [R14 + 0x218],0x0 MOV byte ptr [R14 + 0x684],0x1 MOV ECX,0x401 AND ECX,dword ptr [R14 + 0x624] OR ECX,0x30 MOV dword ptr [R14 + 0x624],ECX LAB_0013ddb5: TEST byte ptr [R14 + 0x61c],0x10 JZ 0x0013ddee LEA RDI,[R14 + 0x4b8] MOV ESI,0x1 CALL 0x001b55e9 TEST EAX,EAX JZ 0x0013ddeb CALL 0x001c5c9a MOV EBX,0xffffffff CMP dword ptr [RAX],0x0 JNZ 0x0013de0a MOV R15D,0x7a JMP 0x0013ddfd LAB_0013ddeb: MOV RAX,qword ptr [R14] LAB_0013ddee: TEST byte ptr [RAX + 0x170],0x2 JZ 0x0013de0a MOV R15D,0x7e LAB_0013ddfd: CALL 0x001c5c9a MOV dword ptr [RAX],R15D MOV EBX,0xffffffff LAB_0013de0a: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
ulong _ma_check_index(long *param_1,uint param_2) { int iVar1; int *piVar2; long lVar3; int4 *puVar4; int4 uVar5; uVar5 = 0x7c; if (-1 < (int)param_2) { lVar3 = *param_1; if ((*(ulong *)(lVar3 + 0x140) >> ((ulong)param_2 & 0x3f) & 1) != 0) { if (*(uint *)((long)param_1 + 0x62c) != param_2) { *(uint *)((long)param_1 + 0x62c) = param_2; param_1[0x41] = (ulong)param_2 * 0x118 + *(long *)(lVar3 + 0x570); *(int4 *)(param_1 + 0x43) = 0; *(int1 *)((long)param_1 + 0x684) = 1; *(uint *)((long)param_1 + 0x624) = *(uint *)((long)param_1 + 0x624) & 0x401 | 0x30; } if ((*(byte *)((long)param_1 + 0x61c) & 0x10) != 0) { iVar1 = my_b_flush_io_cache(param_1 + 0x97,1); if (iVar1 != 0) { piVar2 = (int *)_my_thread_var(); if (*piVar2 != 0) { return 0xffffffff; } uVar5 = 0x7a; goto LAB_0013ddfd; } lVar3 = *param_1; } if ((*(byte *)(lVar3 + 0x170) & 2) == 0) { return (ulong)param_2; } uVar5 = 0x7e; } } LAB_0013ddfd: puVar4 = (int4 *)_my_thread_var(); *puVar4 = uVar5; return 0xffffffff; }
21,781
inline_mysql_cond_init
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_cond_init( #ifdef HAVE_PSI_COND_INTERFACE PSI_cond_key key, #endif mysql_cond_t *that, const pthread_condattr_t *attr) { #ifdef HAVE_PSI_COND_INTERFACE that->m_psi= PSI_COND_CALL(init_cond)(key, &that->m_cond); #else that->m_psi= NULL; #endif return pthread_cond_init(&that->m_cond, attr); }
O0
c
inline_mysql_cond_init: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) leaq 0x1a804e(%rip), %rax # 0x1e1bb8 movq (%rax), %rax movq 0x60(%rax), %rax movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi callq *%rax movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x30(%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x25400 addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
inline_mysql_cond_init_0: 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+60h] mov edi, [rbp+var_4] mov rsi, [rbp+var_10] call rax mov rcx, rax mov rax, [rbp+var_10] mov [rax+30h], rcx mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call _pthread_cond_init add rsp, 20h pop rbp retn
long long inline_mysql_cond_init_0(unsigned int a1, long long a2, long long a3) { *(_QWORD *)(a2 + 48) = (*((long long ( **)(_QWORD, long long))PSI_server + 12))(a1, a2); return pthread_cond_init(a2, a3); }
inline_mysql_cond_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,[0x2e1bb8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x60] 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 + 0x30],RCX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00125400 ADD RSP,0x20 POP RBP RET
void inline_mysql_cond_init(int4 param_1,pthread_cond_t *param_2,pthread_condattr_t *param_3) { longlong lVar1; lVar1 = (**(code **)(PSI_server + 0x60))(param_1,param_2); param_2[1].__align = lVar1; pthread_cond_init(param_2,param_3); return; }
21,782
my_context_yield
eloqsql/libmariadb/libmariadb/ma_context.c
int my_context_yield(struct my_context *c) { uint64_t *save= &c->save[0]; __asm__ __volatile__ ( "movq (%[save]), %%rax\n\t" "movq %%rsp, (%[save])\n\t" "movq %%rax, %%rsp\n\t" "movq 8(%[save]), %%rax\n\t" "movq %%rbp, 8(%[save])\n\t" "movq %%rax, %%rbp\n\t" "movq 16(%[save]), %%rax\n\t" "movq %%rbx, 16(%[save])\n\t" "movq %%rax, %%rbx\n\t" "movq 24(%[save]), %%rax\n\t" "movq %%r12, 24(%[save])\n\t" "movq %%rax, %%r12\n\t" "movq 32(%[save]), %%rax\n\t" "movq %%r13, 32(%[save])\n\t" "movq %%rax, %%r13\n\t" "movq 40(%[save]), %%rax\n\t" "movq %%r14, 40(%[save])\n\t" "movq %%rax, %%r14\n\t" "movq 48(%[save]), %%rax\n\t" "movq %%r15, 48(%[save])\n\t" "movq %%rax, %%r15\n\t" "movq 64(%[save]), %%rax\n\t" "leaq 1f(%%rip), %%rcx\n\t" "movq %%rcx, 64(%[save])\n\t" "jmpq *%%rax\n" "1:\n" : [save] "+D" (save) : : "rax", "rcx", "rdx", "rsi", "r8", "r9", "r10", "r11", "memory", "cc" ); return 0; }
O3
c
my_context_yield: pushq %rbp movq %rsp, %rbp movq (%rdi), %rax movq %rsp, (%rdi) movq %rax, %rsp movq 0x8(%rdi), %rax movq %rbp, 0x8(%rdi) movq %rax, %rbp movq 0x10(%rdi), %rax movq %rbx, 0x10(%rdi) movq %rax, %rbx movq 0x18(%rdi), %rax movq %r12, 0x18(%rdi) movq %rax, %r12 movq 0x20(%rdi), %rax movq %r13, 0x20(%rdi) movq %rax, %r13 movq 0x28(%rdi), %rax movq %r14, 0x28(%rdi) movq %rax, %r14 movq 0x30(%rdi), %rax movq %r15, 0x30(%rdi) movq %rax, %r15 movq 0x40(%rdi), %rax leaq 0x6(%rip), %rcx # 0x2e381 movq %rcx, 0x40(%rdi) jmpq *%rax xorl %eax, %eax popq %rbp retq
my_context_yield: push rbp mov rbp, rsp mov rax, [rdi] mov [rdi], rsp mov rsp, rax mov rax, [rdi+8] mov [rdi+8], rbp mov rbp, rax mov rax, [rdi+10h] mov [rdi+10h], rbx mov rbx, rax mov rax, [rdi+18h] mov [rdi+18h], r12 mov r12, rax mov rax, [rdi+20h] mov [rdi+20h], r13 mov r13, rax mov rax, [rdi+28h] mov [rdi+28h], r14 mov r14, rax mov rax, [rdi+30h] mov [rdi+30h], r15 mov r15, rax mov rax, [rdi+40h] lea rcx, sub_2E381 mov [rdi+40h], rcx jmp rax
long long my_context_yield(_QWORD *a1) { long long v1; // rbx long long v2; // r12 long long v3; // r13 long long v4; // r14 long long v5; // r15 long long (*v6)(void); // rax long long savedregs; // [rsp+0h] [rbp+0h] BYREF *a1 = &savedregs; a1[1] = &savedregs; a1[2] = v1; a1[3] = v2; a1[4] = v3; a1[5] = v4; a1[6] = v5; v6 = (long long (*)(void))a1[8]; a1[8] = sub_2E381; return v6(); }
my_context_yield: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI] MOV qword ptr [RDI],RSP MOV RSP,RAX MOV RAX,qword ptr [RDI + 0x8] MOV qword ptr [RDI + 0x8],RBP MOV RBP,RAX MOV RAX,qword ptr [RDI + 0x10] MOV qword ptr [RDI + 0x10],RBX MOV RBX,RAX MOV RAX,qword ptr [RDI + 0x18] MOV qword ptr [RDI + 0x18],R12 MOV R12,RAX MOV RAX,qword ptr [RDI + 0x20] MOV qword ptr [RDI + 0x20],R13 MOV R13,RAX MOV RAX,qword ptr [RDI + 0x28] MOV qword ptr [RDI + 0x28],R14 MOV R14,RAX MOV RAX,qword ptr [RDI + 0x30] MOV qword ptr [RDI + 0x30],R15 MOV R15,RAX MOV RAX,qword ptr [RDI + 0x40] LEA RCX,[0x12e381] MOV qword ptr [RDI + 0x40],RCX JMP RAX
void my_context_yield(long param_1) { code *UNRECOVERED_JUMPTABLE; int8 unaff_RBX; int8 unaff_R12; int8 unaff_R13; int8 unaff_R14; int8 unaff_R15; *(int1 **)param_1 = &stack0xfffffffffffffff8; *(int1 **)(param_1 + 8) = &stack0xfffffffffffffff8; *(int8 *)(param_1 + 0x10) = unaff_RBX; *(int8 *)(param_1 + 0x18) = unaff_R12; *(int8 *)(param_1 + 0x20) = unaff_R13; *(int8 *)(param_1 + 0x28) = unaff_R14; *(int8 *)(param_1 + 0x30) = unaff_R15; UNRECOVERED_JUMPTABLE = *(code **)(param_1 + 0x40); *(int1 **)(param_1 + 0x40) = &LAB_0012e381; /* WARNING: Could not recover jumptable at 0x0012e37f. Too many branches */ /* WARNING: Treating indirect jump as call */ (*UNRECOVERED_JUMPTABLE)(); return; }
21,783
my_get_err_msg
eloqsql/mysys/my_error.c
const char *my_get_err_msg(uint nr) { const char *format; struct my_err_head *meh_p; /* Search for the range this error is in. */ for (meh_p= my_errmsgs_list; meh_p; meh_p= meh_p->meh_next) if (nr <= meh_p->meh_last) break; /* If we found the range this error number is in, get the format string. If the string is empty, or a NULL pointer, or if we're out of return, we return NULL. */ if (!(format= (meh_p && (nr >= meh_p->meh_first)) ? meh_p->get_errmsgs(nr)[nr - meh_p->meh_first] : NULL) || !*format) return NULL; return format; }
O3
c
my_get_err_msg: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movl %edi, %ebx leaq 0x2eb3b8(%rip), %r14 # 0x3348c8 xorl %eax, %eax movq (%r14), %r14 testq %r14, %r14 je 0x49546 cmpl %ebx, 0x14(%r14) jb 0x49512 cmpl %ebx, 0x10(%r14) ja 0x49544 movl %ebx, %edi callq *0x8(%r14) subl 0x10(%r14), %ebx movq (%rax,%rbx,8), %rcx testq %rcx, %rcx je 0x49544 xorl %eax, %eax cmpb $0x0, (%rcx) cmovneq %rcx, %rax jmp 0x49546 xorl %eax, %eax popq %rbx popq %r14 popq %rbp retq
my_get_err_msg: push rbp mov rbp, rsp push r14 push rbx mov ebx, edi lea r14, my_errmsgs_list xor eax, eax loc_49512: mov r14, [r14] test r14, r14 jz short loc_49546 cmp [r14+14h], ebx jb short loc_49512 cmp [r14+10h], ebx ja short loc_49544 mov edi, ebx call qword ptr [r14+8] sub ebx, [r14+10h] mov rcx, [rax+rbx*8] test rcx, rcx jz short loc_49544 xor eax, eax cmp byte ptr [rcx], 0 cmovnz rax, rcx jmp short loc_49546 loc_49544: xor eax, eax loc_49546: pop rbx pop r14 pop rbp retn
_BYTE * my_get_err_msg(unsigned int a1) { long long **v1; // r14 _BYTE *result; // rax _BYTE *v3; // rcx v1 = &my_errmsgs_list; result = 0LL; while ( 1 ) { v1 = (long long **)*v1; if ( !v1 ) break; if ( *((_DWORD *)v1 + 5) >= a1 ) { if ( *((_DWORD *)v1 + 4) > a1 ) return 0LL; v3 = *(_BYTE **)(((long long ( *)(_QWORD))v1[1])(a1) + 8LL * (a1 - *((_DWORD *)v1 + 4))); if ( !v3 ) return 0LL; result = 0LL; if ( *v3 ) return v3; return result; } } return result; }
my_get_err_msg: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV EBX,EDI LEA R14,[0x4348c8] XOR EAX,EAX LAB_00149512: MOV R14,qword ptr [R14] TEST R14,R14 JZ 0x00149546 CMP dword ptr [R14 + 0x14],EBX JC 0x00149512 CMP dword ptr [R14 + 0x10],EBX JA 0x00149544 MOV EDI,EBX CALL qword ptr [R14 + 0x8] SUB EBX,dword ptr [R14 + 0x10] MOV RCX,qword ptr [RAX + RBX*0x8] TEST RCX,RCX JZ 0x00149544 XOR EAX,EAX CMP byte ptr [RCX],0x0 CMOVNZ RAX,RCX JMP 0x00149546 LAB_00149544: XOR EAX,EAX LAB_00149546: POP RBX POP R14 POP RBP RET
char * my_get_err_msg(uint param_1) { char *pcVar1; long lVar2; int **ppuVar3; ppuVar3 = &my_errmsgs_list; do { ppuVar3 = (int **)*ppuVar3; if (ppuVar3 == (int **)0x0) { return (char *)0x0; } } while (*(uint *)((long)ppuVar3 + 0x14) < param_1); if (*(uint *)(ppuVar3 + 2) <= param_1) { lVar2 = (*(code *)ppuVar3[1])(param_1); pcVar1 = *(char **)(lVar2 + (ulong)(param_1 - *(int *)(ppuVar3 + 2)) * 8); if (pcVar1 != (char *)0x0) { if (*pcVar1 == '\0') { return (char *)0x0; } return pcVar1; } } return (char *)0x0; }
21,784
ImPlot3D::ShowAxisContextMenu(ImPlot3DAxis&)
zkingston[P]unknot/build_O1/_deps/implot3d-src/implot3d.cpp
void ShowAxisContextMenu(ImPlot3DAxis& axis) { ImGui::PushItemWidth(75); bool always_locked = axis.IsRangeLocked() || axis.IsAutoFitting(); bool label = axis.HasLabel(); bool grid = axis.HasGridLines(); bool ticks = axis.HasTickMarks(); bool labels = axis.HasTickLabels(); double drag_speed = (axis.Range.Size() <= FLT_EPSILON) ? FLT_EPSILON * 1.0e+13 : 0.01 * axis.Range.Size(); // recover from almost equal axis limits. ImGui::BeginDisabled(always_locked); ImGui::CheckboxFlags("##LockMin", (unsigned int*)&axis.Flags, ImPlot3DAxisFlags_LockMin); ImGui::EndDisabled(); ImGui::SameLine(); ImGui::BeginDisabled(axis.IsLockedMin() || always_locked); float temp_min = axis.Range.Min; if (ImGui::DragFloat("Min", &temp_min, (float)drag_speed, -HUGE_VAL, axis.Range.Max - FLT_EPSILON)) { axis.SetMin(temp_min, true); } ImGui::EndDisabled(); ImGui::BeginDisabled(always_locked); ImGui::CheckboxFlags("##LockMax", (unsigned int*)&axis.Flags, ImPlot3DAxisFlags_LockMax); ImGui::EndDisabled(); ImGui::SameLine(); ImGui::BeginDisabled(axis.IsLockedMax() || always_locked); float temp_max = axis.Range.Max; if (ImGui::DragFloat("Max", &temp_max, (float)drag_speed, axis.Range.Min + FLT_EPSILON, HUGE_VAL)) { axis.SetMax(temp_max, true); } ImGui::EndDisabled(); ImGui::Separator(); // Flags ImGui::CheckboxFlags("Auto-Fit", (unsigned int*)&axis.Flags, ImPlot3DAxisFlags_AutoFit); ImGui::Separator(); bool inverted = ImPlot3D::ImHasFlag(axis.Flags, ImPlot3DAxisFlags_Invert); if (ImGui::Checkbox("Invert", &inverted)) ImFlipFlag(axis.Flags, ImPlot3DAxisFlags_Invert); ImGui::Separator(); ImGui::BeginDisabled(axis.Label.empty()); if (ImGui::Checkbox("Label", &label)) ImFlipFlag(axis.Flags, ImPlot3DAxisFlags_NoLabel); ImGui::EndDisabled(); if (ImGui::Checkbox("Grid Lines", &grid)) ImFlipFlag(axis.Flags, ImPlot3DAxisFlags_NoGridLines); if (ImGui::Checkbox("Tick Marks", &ticks)) ImFlipFlag(axis.Flags, ImPlot3DAxisFlags_NoTickMarks); if (ImGui::Checkbox("Tick Labels", &labels)) ImFlipFlag(axis.Flags, ImPlot3DAxisFlags_NoTickLabels); }
O1
cpp
ImPlot3D::ShowAxisContextMenu(ImPlot3DAxis&): pushq %rbp pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movss 0x244ce7(%rip), %xmm0 # 0x2943b0 callq 0x22c177 movl (%rbx), %eax cmpl $0x1, 0x10(%rbx) sete %cl andl $0x40, %eax shrl $0x6, %eax orb %cl, %al cmpl $0x2, 0x18(%rbx) setge %cl movdqu (%rbx), %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] pand 0x244e29(%rip), %xmm0 # 0x294520 pxor %xmm1, %xmm1 pcmpeqd %xmm0, %xmm1 movmskps %xmm1, %edx movl %edx, %esi andb $0x2, %sil shrb %sil movl %edx, %edi andb $0x4, %dil shrb $0x2, %dil movl %edx, %r8d andb $0x8, %r8b shrb $0x3, %r8b andb %cl, %r8b movb %r8b, 0x6(%rsp) movb %dil, 0x5(%rsp) movb %sil, 0x4(%rsp) andb $0x1, %dl movb %dl, 0x3(%rsp) movss 0xc(%rbx), %xmm2 subss 0x8(%rbx), %xmm2 xorps %xmm0, %xmm0 cvtss2sd %xmm2, %xmm0 mulsd 0x245006(%rip), %xmm0 # 0x294758 cvtsd2ss %xmm0, %xmm0 cmpnless 0x244c55(%rip), %xmm2 # 0x2943b4 andps %xmm2, %xmm0 movss 0x244c4e(%rip), %xmm1 # 0x2943b8 andnps %xmm1, %xmm2 orps %xmm0, %xmm2 movaps %xmm2, 0x10(%rsp) movzbl %al, %ebp movl %ebp, %edi callq 0x22902b leaq 0x2455b5(%rip), %rdi # 0x294d3b movq %rbx, %rsi movl $0x10, %edx callq 0x25966f callq 0x229131 movss 0x23f864(%rip), %xmm1 # 0x28f004 xorps %xmm0, %xmm0 callq 0x22beb1 movl (%rbx), %eax cmpl $0x1, 0x10(%rbx) sete %cl andl $0x10, %eax shrl $0x4, %eax orb %cl, %al orb %bpl, %al movzbl %al, %edi callq 0x22902b movss 0x8(%rbx), %xmm0 leaq 0xc(%rsp), %rsi movss %xmm0, (%rsi) movss 0xc(%rbx), %xmm2 addss 0x244bdd(%rip), %xmm2 # 0x2943bc leaq 0x24555b(%rip), %rdi # 0x294d41 leaq 0x2603a7(%rip), %rdx # 0x2afb94 movss 0x244bcb(%rip), %xmm1 # 0x2943c0 movaps 0x10(%rsp), %xmm0 xorl %ecx, %ecx callq 0x25d8cc testb %al, %al je 0x4f859 movss 0xc(%rsp), %xmm1 movss 0x244bb1(%rip), %xmm2 # 0x2943c4 maxss %xmm1, %xmm2 movss 0x23f81d(%rip), %xmm3 # 0x28f03c movaps %xmm3, %xmm0 cmpnless %xmm1, %xmm0 andps %xmm0, %xmm2 andnps %xmm3, %xmm0 orps %xmm2, %xmm0 ucomiss %xmm0, %xmm0 xorps %xmm1, %xmm1 jp 0x4f83f xorps %xmm1, %xmm1 cvtss2sd %xmm0, %xmm1 xorps %xmm0, %xmm0 cvtss2sd 0xc(%rbx), %xmm0 ucomisd %xmm0, %xmm1 jae 0x4f859 xorps %xmm0, %xmm0 cvtsd2ss %xmm1, %xmm0 movss %xmm0, 0x8(%rbx) callq 0x229131 movl %ebp, %edi callq 0x22902b leaq 0x2454d9(%rip), %rdi # 0x294d45 movq %rbx, %rsi movl $0x20, %edx callq 0x25966f callq 0x229131 movss 0x23f77e(%rip), %xmm1 # 0x28f004 xorps %xmm0, %xmm0 callq 0x22beb1 movl (%rbx), %eax cmpl $0x1, 0x10(%rbx) sete %cl andl $0x20, %eax shrl $0x5, %eax orb %cl, %al orb %al, %bpl movzbl %bpl, %edi callq 0x22902b movss 0xc(%rbx), %xmm0 leaq 0x8(%rsp), %rsi movss %xmm0, (%rsi) movss 0x8(%rbx), %xmm1 addss 0x244aee(%rip), %xmm1 # 0x2943b4 leaq 0x24547e(%rip), %rdi # 0x294d4b leaq 0x2602c0(%rip), %rdx # 0x2afb94 movss 0x244aec(%rip), %xmm2 # 0x2943c8 movaps 0x10(%rsp), %xmm0 xorl %ecx, %ecx callq 0x25d8cc testb %al, %al je 0x4f940 movss 0x8(%rsp), %xmm1 movss 0x244aca(%rip), %xmm2 # 0x2943c4 maxss %xmm1, %xmm2 movss 0x23f736(%rip), %xmm3 # 0x28f03c movaps %xmm3, %xmm0 cmpnless %xmm1, %xmm0 andps %xmm0, %xmm2 andnps %xmm3, %xmm0 orps %xmm2, %xmm0 ucomiss %xmm0, %xmm0 xorps %xmm1, %xmm1 jp 0x4f926 xorps %xmm1, %xmm1 cvtss2sd %xmm0, %xmm1 xorps %xmm0, %xmm0 cvtss2sd 0x8(%rbx), %xmm0 ucomisd %xmm1, %xmm0 jae 0x4f940 xorps %xmm0, %xmm0 cvtsd2ss %xmm1, %xmm0 movss %xmm0, 0xc(%rbx) callq 0x229131 callq 0x25a664 leaq 0x2453fe(%rip), %rdi # 0x294d4f movq %rbx, %rsi movl $0x40, %edx callq 0x25966f callq 0x25a664 movb (%rbx), %al shrb $0x7, %al leaq 0x7(%rsp), %rsi movb %al, (%rsi) leaq 0x2453e2(%rip), %rdi # 0x294d58 callq 0x258ade testb %al, %al je 0x4f982 xorb $-0x80, (%rbx) callq 0x25a664 xorl %edi, %edi cmpl $0x2, 0x18(%rbx) setl %dil callq 0x22902b leaq 0x283455(%rip), %rdi # 0x2d2df2 leaq 0x6(%rsp), %rsi callq 0x258ade testb %al, %al je 0x4f9ae xorb $0x1, (%rbx) callq 0x229131 leaq 0x2453a5(%rip), %rdi # 0x294d5f leaq 0x5(%rsp), %rsi callq 0x258ade testb %al, %al je 0x4f9cb xorb $0x2, (%rbx) leaq 0x245398(%rip), %rdi # 0x294d6a leaq 0x4(%rsp), %rsi callq 0x258ade testb %al, %al je 0x4f9e3 xorb $0x4, (%rbx) leaq 0x24538b(%rip), %rdi # 0x294d75 leaq 0x3(%rsp), %rsi callq 0x258ade testb %al, %al je 0x4f9fb xorb $0x8, (%rbx) addq $0x28, %rsp popq %rbx popq %rbp retq
_ZN8ImPlot3D19ShowAxisContextMenuER12ImPlot3DAxis: push rbp push rbx sub rsp, 28h mov rbx, rdi movss xmm0, cs:flt_2943B0; float call _ZN5ImGui13PushItemWidthEf; ImGui::PushItemWidth(float) mov eax, [rbx] cmp dword ptr [rbx+10h], 1 setz cl and eax, 40h shr eax, 6 or al, cl cmp dword ptr [rbx+18h], 2 setnl cl movdqu xmm0, xmmword ptr [rbx] pshufd xmm0, xmm0, 0 pand xmm0, cs:xmmword_294520 pxor xmm1, xmm1 pcmpeqd xmm1, xmm0 movmskps edx, xmm1 mov esi, edx and sil, 2 shr sil, 1; bool mov edi, edx and dil, 4 shr dil, 2 mov r8d, edx and r8b, 8 shr r8b, 3 and r8b, cl mov [rsp+38h+var_32], r8b mov [rsp+38h+var_33], dil mov [rsp+38h+var_34], sil and dl, 1 mov [rsp+38h+var_35], dl movss xmm2, dword ptr [rbx+0Ch] subss xmm2, dword ptr [rbx+8] xorps xmm0, xmm0 cvtss2sd xmm0, xmm2 mulsd xmm0, cs:qword_294758 cvtsd2ss xmm0, xmm0 cmpnless xmm2, cs:dword_2943B4 andps xmm0, xmm2 movss xmm1, cs:dword_2943B8 andnps xmm2, xmm1 orps xmm2, xmm0 movaps xmmword ptr [rsp+38h+var_28], xmm2 movzx ebp, al mov edi, ebp; this call _ZN5ImGui13BeginDisabledEb; ImGui::BeginDisabled(bool) lea rdi, aLockmin; "##LockMin" mov rsi, rbx; bool mov edx, offset word_10; unsigned int * call _ZN5ImGui13CheckboxFlagsEPKcPjj; ImGui::CheckboxFlags(char const*,uint *,uint) call _ZN5ImGui11EndDisabledEv; ImGui::EndDisabled(void) movss xmm1, cs:flt_28F004; float xorps xmm0, xmm0; float call _ZN5ImGui8SameLineEff; ImGui::SameLine(float,float) mov eax, [rbx] cmp dword ptr [rbx+10h], 1 setz cl and eax, 10h shr eax, 4 or al, cl or al, bpl movzx edi, al; this call _ZN5ImGui13BeginDisabledEb; ImGui::BeginDisabled(bool) movss xmm0, dword ptr [rbx+8] lea rsi, [rsp+38h+var_2C]; bool movss dword ptr [rsi], xmm0 movss xmm2, dword ptr [rbx+0Ch] addss xmm2, cs:dword_2943BC; float lea rdi, aLockmin+6; this lea rdx, aH3fS3fV3fA3f+1Eh; float * movss xmm1, cs:flt_2943C0; float movaps xmm0, xmmword ptr [rsp+38h+var_28]; float xor ecx, ecx; char * call _ZN5ImGui9DragFloatEPKcPffffS1_i; ImGui::DragFloat(char const*,float *,float,float,float,char const*,int) test al, al jz short loc_4F859 movss xmm1, dword ptr [rsp+38h+var_2C] movss xmm2, cs:dword_2943C4 maxss xmm2, xmm1 movss xmm3, dword ptr cs:xmmword_28F034+8 movaps xmm0, xmm3 cmpnless xmm0, xmm1 andps xmm2, xmm0 andnps xmm0, xmm3 orps xmm0, xmm2 ucomiss xmm0, xmm0 xorps xmm1, xmm1 jp short loc_4F83F xorps xmm1, xmm1 cvtss2sd xmm1, xmm0 loc_4F83F: xorps xmm0, xmm0 cvtss2sd xmm0, dword ptr [rbx+0Ch] ucomisd xmm1, xmm0 jnb short loc_4F859 xorps xmm0, xmm0 cvtsd2ss xmm0, xmm1 movss dword ptr [rbx+8], xmm0 loc_4F859: call _ZN5ImGui11EndDisabledEv; ImGui::EndDisabled(void) mov edi, ebp; this call _ZN5ImGui13BeginDisabledEb; ImGui::BeginDisabled(bool) lea rdi, aLockmax; "##LockMax" mov rsi, rbx; bool mov edx, offset qword_20; unsigned int * call _ZN5ImGui13CheckboxFlagsEPKcPjj; ImGui::CheckboxFlags(char const*,uint *,uint) call _ZN5ImGui11EndDisabledEv; ImGui::EndDisabled(void) movss xmm1, cs:flt_28F004; float xorps xmm0, xmm0; float call _ZN5ImGui8SameLineEff; ImGui::SameLine(float,float) mov eax, [rbx] cmp dword ptr [rbx+10h], 1 setz cl and eax, 20h shr eax, 5 or al, cl or bpl, al movzx edi, bpl; this call _ZN5ImGui13BeginDisabledEb; ImGui::BeginDisabled(bool) movss xmm0, dword ptr [rbx+0Ch] lea rsi, [rsp+38h+var_30]; char * movss dword ptr [rsi], xmm0 movss xmm1, dword ptr [rbx+8] addss xmm1, cs:dword_2943B4; float lea rdi, aLockmax+6; this lea rdx, aH3fS3fV3fA3f+1Eh; float * movss xmm2, cs:flt_2943C8; float movaps xmm0, xmmword ptr [rsp+38h+var_28]; float xor ecx, ecx; char * call _ZN5ImGui9DragFloatEPKcPffffS1_i; ImGui::DragFloat(char const*,float *,float,float,float,char const*,int) test al, al jz short loc_4F940 movss xmm1, dword ptr [rsp+38h+var_30] movss xmm2, cs:dword_2943C4 maxss xmm2, xmm1 movss xmm3, dword ptr cs:xmmword_28F034+8 movaps xmm0, xmm3 cmpnless xmm0, xmm1 andps xmm2, xmm0 andnps xmm0, xmm3 orps xmm0, xmm2 ucomiss xmm0, xmm0 xorps xmm1, xmm1 jp short loc_4F926 xorps xmm1, xmm1 cvtss2sd xmm1, xmm0 loc_4F926: xorps xmm0, xmm0 cvtss2sd xmm0, dword ptr [rbx+8] ucomisd xmm0, xmm1 jnb short loc_4F940 xorps xmm0, xmm0 cvtsd2ss xmm0, xmm1 movss dword ptr [rbx+0Ch], xmm0 loc_4F940: call _ZN5ImGui11EndDisabledEv; ImGui::EndDisabled(void) call _ZN5ImGui9SeparatorEv; ImGui::Separator(void) lea rdi, aAutoFit; "Auto-Fit" mov rsi, rbx; char * mov edx, offset dword_40; unsigned int * call _ZN5ImGui13CheckboxFlagsEPKcPjj; ImGui::CheckboxFlags(char const*,uint *,uint) call _ZN5ImGui9SeparatorEv; ImGui::Separator(void) mov al, [rbx] shr al, 7 lea rsi, [rsp+38h+var_31]; bool mov [rsi], al lea rdi, aInvert; "Invert" call _ZN5ImGui8CheckboxEPKcPb; ImGui::Checkbox(char const*,bool *) test al, al jz short loc_4F982 xor byte ptr [rbx], 80h loc_4F982: call _ZN5ImGui9SeparatorEv; ImGui::Separator(void) xor edi, edi cmp dword ptr [rbx+18h], 2 setl dil; this call _ZN5ImGui13BeginDisabledEb; ImGui::BeginDisabled(bool) lea rdi, aGlobjectptrlab+0Bh; this lea rsi, [rsp+38h+var_32]; char * call _ZN5ImGui8CheckboxEPKcPb; ImGui::Checkbox(char const*,bool *) test al, al jz short loc_4F9AE xor byte ptr [rbx], 1 loc_4F9AE: call _ZN5ImGui11EndDisabledEv; ImGui::EndDisabled(void) lea rdi, aGridLines; "Grid Lines" lea rsi, [rsp+38h+var_33]; char * call _ZN5ImGui8CheckboxEPKcPb; ImGui::Checkbox(char const*,bool *) test al, al jz short loc_4F9CB xor byte ptr [rbx], 2 loc_4F9CB: lea rdi, aTickMarks; "Tick Marks" lea rsi, [rsp+38h+var_34]; char * call _ZN5ImGui8CheckboxEPKcPb; ImGui::Checkbox(char const*,bool *) test al, al jz short loc_4F9E3 xor byte ptr [rbx], 4 loc_4F9E3: lea rdi, aTickLabels; "Tick Labels" lea rsi, [rsp+38h+var_35]; char * call _ZN5ImGui8CheckboxEPKcPb; ImGui::Checkbox(char const*,bool *) test al, al jz short loc_4F9FB xor byte ptr [rbx], 8 loc_4F9FB: add rsp, 28h pop rbx pop rbp retn
long long ImPlot3D::ShowAxisContextMenu(ImPlot3D *this, ImPlot3DAxis *a2) { unsigned __int8 v2; // al char v3; // dl __m128 v4; // xmm2 __m128 v5; // xmm0 __m128 v6; // rt1 __m128 v7; // xmm2 unsigned int v8; // ebp unsigned int v9; // ecx int v10; // r8d __m128 v11; // xmm1 __m128 v12; // xmm0 double v13; // xmm1_8 float v14; // xmm0_4 unsigned int v15; // ecx int v16; // r8d __m128 v17; // xmm1 __m128 v18; // xmm0 double v19; // xmm1_8 float v20; // xmm0_4 unsigned int v21; // ecx bool *v22; // rdx bool *v23; // rdx bool *v24; // rdx bool *v25; // rdx bool *v26; // rdx long long result; // rax char v28; // [rsp+3h] [rbp-35h] BYREF char v29; // [rsp+4h] [rbp-34h] BYREF char v30; // [rsp+5h] [rbp-33h] BYREF char v31; // [rsp+6h] [rbp-32h] BYREF bool v32; // [rsp+7h] [rbp-31h] BYREF char v33[4]; // [rsp+8h] [rbp-30h] BYREF bool v34[4]; // [rsp+Ch] [rbp-2Ch] BYREF __m128 v35; // [rsp+10h] [rbp-28h] ImGui::PushItemWidth(this, 75.0); v2 = (*((_DWORD *)this + 4) == 1) | ((*(_DWORD *)this & 0x40u) >> 6); v3 = _mm_movemask_ps((__m128)_mm_cmpeq_epi32( (__m128i)0LL, _mm_and_si128( _mm_shuffle_epi32(_mm_loadu_si128((const __m128i *)this), 0), (__m128i)xmmword_294520))); v31 = (*((_DWORD *)this + 6) >= 2) & ((unsigned __int8)(v3 & 8) >> 3); v30 = (unsigned __int8)(v3 & 4) >> 2; v29 = (unsigned __int8)(v3 & 2) >> 1; v28 = v3 & 1; v4 = (__m128)*((unsigned int *)this + 3); v4.m128_f32[0] = v4.m128_f32[0] - *((float *)this + 2); v5 = 0LL; *(double *)v5.m128_u64 = v4.m128_f32[0] * 0.01; v5.m128_f32[0] = *(double *)v5.m128_u64; v6.m128_i32[0] = 872415232; v7 = _mm_cmpgt_ss(v4, v6); v35 = _mm_or_ps(_mm_andnot_ps(v7, (__m128)0x499184E7u), _mm_and_ps(v5, v7)); v8 = v2; ImGui::BeginDisabled((ImGui *)v2, v29); ImGui::CheckboxFlags((ImGui *)"##LockMin", (const char *)this, (unsigned int *)&word_10, v9); ImGui::EndDisabled((ImGui *)"##LockMin"); ImGui::SameLine((ImGui *)"##LockMin", 0.0, -1.0); ImGui::BeginDisabled( (ImGui *)(unsigned __int8)(v8 | (*((_DWORD *)this + 4) == 1) | ((*(_DWORD *)this & 0x10u) >> 4)), (bool)this); *(_DWORD *)v34 = *((_DWORD *)this + 2); if ( (unsigned __int8)ImGui::DragFloat( (ImGui *)"Min", (const char *)v34, (float *)"%.3f", v35.m128_f32[0], -INFINITY, *((float *)this + 3) + -0.00000011920929, 0LL, v10) ) { v11.m128_i32[0] = *(_DWORD *)v34; v12 = _mm_cmpgt_ss((__m128)0x7F7FFFFFu, v11); v13 = COERCE_FLOAT(_mm_andnot_ps(v12, (__m128)0x7F7FFFFFu).m128_u32[0] | COERCE_UNSIGNED_INT(fmaxf(-3.4028235e38, *(float *)v34)) & v12.m128_i32[0]); if ( v13 < *((float *)this + 3) ) { v14 = v13; *((float *)this + 2) = v14; } } ImGui::EndDisabled((ImGui *)"Min"); ImGui::BeginDisabled((ImGui *)v8, (bool)v34); ImGui::CheckboxFlags((ImGui *)"##LockMax", (const char *)this, (unsigned int *)&qword_20, v15); ImGui::EndDisabled((ImGui *)"##LockMax"); ImGui::SameLine((ImGui *)"##LockMax", 0.0, -1.0); ImGui::BeginDisabled( (ImGui *)((*((_DWORD *)this + 4) == 1) | ((*(_DWORD *)this & 0x20u) >> 5) | (unsigned __int8)v8), (bool)this); *(_DWORD *)v33 = *((_DWORD *)this + 3); if ( (unsigned __int8)ImGui::DragFloat( (ImGui *)"Max", v33, (float *)"%.3f", v35.m128_f32[0], *((float *)this + 2) + 0.00000011920929, INFINITY, 0LL, v16) ) { v17.m128_i32[0] = *(_DWORD *)v33; v18 = _mm_cmpgt_ss((__m128)0x7F7FFFFFu, v17); v19 = COERCE_FLOAT(_mm_andnot_ps(v18, (__m128)0x7F7FFFFFu).m128_u32[0] | COERCE_UNSIGNED_INT(fmaxf(-3.4028235e38, *(float *)v33)) & v18.m128_i32[0]); if ( *((float *)this + 2) < v19 ) { v20 = v19; *((float *)this + 3) = v20; } } ImGui::EndDisabled((ImGui *)"Max"); ImGui::Separator((ImGui *)"Max"); ImGui::CheckboxFlags((ImGui *)"Auto-Fit", (const char *)this, (unsigned int *)&dword_40, v21); ImGui::Separator((ImGui *)"Auto-Fit"); v32 = *(_BYTE *)this >> 7; if ( (unsigned __int8)ImGui::Checkbox((ImGui *)"Invert", (const char *)&v32, v22) ) *(_BYTE *)this ^= 0x80u; ImGui::Separator((ImGui *)"Invert"); ImGui::BeginDisabled((ImGui *)(*((_DWORD *)this + 6) < 2), (bool)&v32); if ( (unsigned __int8)ImGui::Checkbox((ImGui *)"Label", &v31, v23) ) *(_BYTE *)this ^= 1u; ImGui::EndDisabled((ImGui *)"Label"); if ( (unsigned __int8)ImGui::Checkbox((ImGui *)"Grid Lines", &v30, v24) ) *(_BYTE *)this ^= 2u; if ( (unsigned __int8)ImGui::Checkbox((ImGui *)"Tick Marks", &v29, v25) ) *(_BYTE *)this ^= 4u; result = ImGui::Checkbox((ImGui *)"Tick Labels", &v28, v26); if ( (_BYTE)result ) *(_BYTE *)this ^= 8u; return result; }
ShowAxisContextMenu: PUSH RBP PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOVSS XMM0,dword ptr [0x003943b0] CALL 0x0032c177 MOV EAX,dword ptr [RBX] CMP dword ptr [RBX + 0x10],0x1 SETZ CL AND EAX,0x40 SHR EAX,0x6 OR AL,CL CMP dword ptr [RBX + 0x18],0x2 SETGE CL MOVDQU XMM0,xmmword ptr [RBX] PSHUFD XMM0,XMM0,0x0 PAND XMM0,xmmword ptr [0x00394520] PXOR XMM1,XMM1 PCMPEQD XMM1,XMM0 MOVMSKPS EDX,XMM1 MOV ESI,EDX AND SIL,0x2 SHR SIL,0x1 MOV EDI,EDX AND DIL,0x4 SHR DIL,0x2 MOV R8D,EDX AND R8B,0x8 SHR R8B,0x3 AND R8B,CL MOV byte ptr [RSP + 0x6],R8B MOV byte ptr [RSP + 0x5],DIL MOV byte ptr [RSP + 0x4],SIL AND DL,0x1 MOV byte ptr [RSP + 0x3],DL MOVSS XMM2,dword ptr [RBX + 0xc] SUBSS XMM2,dword ptr [RBX + 0x8] XORPS XMM0,XMM0 CVTSS2SD XMM0,XMM2 MULSD XMM0,qword ptr [0x00394758] CVTSD2SS XMM0,XMM0 CMPNLESS XMM2,dword ptr [0x003943b4] ANDPS XMM0,XMM2 MOVSS XMM1,dword ptr [0x003943b8] ANDNPS XMM2,XMM1 ORPS XMM2,XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM2 MOVZX EBP,AL MOV EDI,EBP CALL 0x0032902b LEA RDI,[0x394d3b] MOV RSI,RBX MOV EDX,0x10 CALL 0x0035966f CALL 0x00329131 MOVSS XMM1,dword ptr [0x0038f004] XORPS XMM0,XMM0 CALL 0x0032beb1 MOV EAX,dword ptr [RBX] CMP dword ptr [RBX + 0x10],0x1 SETZ CL AND EAX,0x10 SHR EAX,0x4 OR AL,CL OR AL,BPL MOVZX EDI,AL CALL 0x0032902b MOVSS XMM0,dword ptr [RBX + 0x8] LEA RSI,[RSP + 0xc] MOVSS dword ptr [RSI],XMM0 MOVSS XMM2,dword ptr [RBX + 0xc] ADDSS XMM2,dword ptr [0x003943bc] LEA RDI,[0x394d41] LEA RDX,[0x3afb94] MOVSS XMM1,dword ptr [0x003943c0] MOVAPS XMM0,xmmword ptr [RSP + 0x10] XOR ECX,ECX CALL 0x0035d8cc TEST AL,AL JZ 0x0014f859 MOVSS XMM1,dword ptr [RSP + 0xc] MOVSS XMM2,dword ptr [0x003943c4] MAXSS XMM2,XMM1 MOVSS XMM3,dword ptr [0x0038f03c] MOVAPS XMM0,XMM3 CMPNLESS XMM0,XMM1 ANDPS XMM2,XMM0 ANDNPS XMM0,XMM3 ORPS XMM0,XMM2 UCOMISS XMM0,XMM0 XORPS XMM1,XMM1 JP 0x0014f83f XORPS XMM1,XMM1 CVTSS2SD XMM1,XMM0 LAB_0014f83f: XORPS XMM0,XMM0 CVTSS2SD XMM0,dword ptr [RBX + 0xc] UCOMISD XMM1,XMM0 JNC 0x0014f859 XORPS XMM0,XMM0 CVTSD2SS XMM0,XMM1 MOVSS dword ptr [RBX + 0x8],XMM0 LAB_0014f859: CALL 0x00329131 MOV EDI,EBP CALL 0x0032902b LEA RDI,[0x394d45] MOV RSI,RBX MOV EDX,0x20 CALL 0x0035966f CALL 0x00329131 MOVSS XMM1,dword ptr [0x0038f004] XORPS XMM0,XMM0 CALL 0x0032beb1 MOV EAX,dword ptr [RBX] CMP dword ptr [RBX + 0x10],0x1 SETZ CL AND EAX,0x20 SHR EAX,0x5 OR AL,CL OR BPL,AL MOVZX EDI,BPL CALL 0x0032902b MOVSS XMM0,dword ptr [RBX + 0xc] LEA RSI,[RSP + 0x8] MOVSS dword ptr [RSI],XMM0 MOVSS XMM1,dword ptr [RBX + 0x8] ADDSS XMM1,dword ptr [0x003943b4] LEA RDI,[0x394d4b] LEA RDX,[0x3afb94] MOVSS XMM2,dword ptr [0x003943c8] MOVAPS XMM0,xmmword ptr [RSP + 0x10] XOR ECX,ECX CALL 0x0035d8cc TEST AL,AL JZ 0x0014f940 MOVSS XMM1,dword ptr [RSP + 0x8] MOVSS XMM2,dword ptr [0x003943c4] MAXSS XMM2,XMM1 MOVSS XMM3,dword ptr [0x0038f03c] MOVAPS XMM0,XMM3 CMPNLESS XMM0,XMM1 ANDPS XMM2,XMM0 ANDNPS XMM0,XMM3 ORPS XMM0,XMM2 UCOMISS XMM0,XMM0 XORPS XMM1,XMM1 JP 0x0014f926 XORPS XMM1,XMM1 CVTSS2SD XMM1,XMM0 LAB_0014f926: XORPS XMM0,XMM0 CVTSS2SD XMM0,dword ptr [RBX + 0x8] UCOMISD XMM0,XMM1 JNC 0x0014f940 XORPS XMM0,XMM0 CVTSD2SS XMM0,XMM1 MOVSS dword ptr [RBX + 0xc],XMM0 LAB_0014f940: CALL 0x00329131 CALL 0x0035a664 LEA RDI,[0x394d4f] MOV RSI,RBX MOV EDX,0x40 CALL 0x0035966f CALL 0x0035a664 MOV AL,byte ptr [RBX] SHR AL,0x7 LEA RSI,[RSP + 0x7] MOV byte ptr [RSI],AL LEA RDI,[0x394d58] CALL 0x00358ade TEST AL,AL JZ 0x0014f982 XOR byte ptr [RBX],0x80 LAB_0014f982: CALL 0x0035a664 XOR EDI,EDI CMP dword ptr [RBX + 0x18],0x2 SETL DIL CALL 0x0032902b LEA RDI,[0x3d2df2] LEA RSI,[RSP + 0x6] CALL 0x00358ade TEST AL,AL JZ 0x0014f9ae XOR byte ptr [RBX],0x1 LAB_0014f9ae: CALL 0x00329131 LEA RDI,[0x394d5f] LEA RSI,[RSP + 0x5] CALL 0x00358ade TEST AL,AL JZ 0x0014f9cb XOR byte ptr [RBX],0x2 LAB_0014f9cb: LEA RDI,[0x394d6a] LEA RSI,[RSP + 0x4] CALL 0x00358ade TEST AL,AL JZ 0x0014f9e3 XOR byte ptr [RBX],0x4 LAB_0014f9e3: LEA RDI,[0x394d75] LEA RSI,[RSP + 0x3] CALL 0x00358ade TEST AL,AL JZ 0x0014f9fb XOR byte ptr [RBX],0x8 LAB_0014f9fb: ADD RSP,0x28 POP RBX POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* ImPlot3D::ShowAxisContextMenu(ImPlot3DAxis&) */ void ImPlot3D::ShowAxisContextMenu(ImPlot3DAxis *param_1) { float fVar1; bool bVar2; char cVar3; int4 extraout_EDX; int4 uVar4; byte bVar5; uint uVar6; float fVar7; int1 auVar8 [16]; bool local_35; bool local_34; bool local_33; bool local_32; bool local_31; float local_30; float local_2c; ulong local_28; int8 uStack_20; ImGui::PushItemWidth(DAT_003943b0); bVar2 = (bool)((byte)((*(uint *)param_1 & 0x40) >> 6) | *(int *)(param_1 + 0x10) == 1); uVar6 = *(uint *)param_1; auVar8._0_4_ = -(uint)((uVar6 & _DAT_00394520) == 0); auVar8._4_4_ = -(uint)((uVar6 & _UNK_00394524) == 0); auVar8._8_4_ = -(uint)((uVar6 & _UNK_00394528) == 0); auVar8._12_4_ = -(uint)((uVar6 & _UNK_0039452c) == 0); uVar4 = movmskps(extraout_EDX,auVar8); bVar5 = (byte)uVar4; local_34 = (bool)((bVar5 & 2) >> 1); local_33 = (bool)((bVar5 & 4) >> 2); local_32 = (bool)((bVar5 & 8) >> 3 & 1 < *(int *)(param_1 + 0x18)); local_35 = (bool)(bVar5 & 1); uVar6 = -(uint)(DAT_003943b4 < *(float *)(param_1 + 0xc) - *(float *)(param_1 + 8)); local_28 = (ulong)(~uVar6 & DAT_003943b8 | (uint)(float)((double)(*(float *)(param_1 + 0xc) - *(float *)(param_1 + 8)) * _DAT_00394758) & uVar6); uStack_20 = 0; ImGui::BeginDisabled(bVar2); ImGui::CheckboxFlags("##LockMin",(uint *)param_1,0x10); ImGui::EndDisabled(); ImGui::SameLine(0.0,DAT_0038f004); ImGui::BeginDisabled ((bool)((byte)((*(uint *)param_1 & 0x10) >> 4) | *(int *)(param_1 + 0x10) == 1 | bVar2)) ; local_2c = *(float *)(param_1 + 8); cVar3 = ImGui::DragFloat("Min",&local_2c,(float)local_28,DAT_003943c0, *(float *)(param_1 + 0xc) + _DAT_003943bc,"%.3f",0); if (cVar3 != '\0') { fVar1 = DAT_003943c4; if (DAT_003943c4 <= local_2c) { fVar1 = local_2c; } fVar7 = (float)(~-(uint)(local_2c < DAT_0038f03c) & (uint)DAT_0038f03c | (uint)fVar1 & -(uint)(local_2c < DAT_0038f03c)); fVar1 = 0.0; if (!NAN(fVar7)) { fVar1 = fVar7; } if (fVar1 < *(float *)(param_1 + 0xc)) { *(float *)(param_1 + 8) = fVar1; } } ImGui::EndDisabled(); ImGui::BeginDisabled(bVar2); ImGui::CheckboxFlags("##LockMax",(uint *)param_1,0x20); ImGui::EndDisabled(); ImGui::SameLine(0.0,DAT_0038f004); ImGui::BeginDisabled ((bool)(bVar2 | (byte)((*(uint *)param_1 & 0x20) >> 5) | *(int *)(param_1 + 0x10) == 1)) ; local_30 = *(float *)(param_1 + 0xc); cVar3 = ImGui::DragFloat("Max",&local_30,(float)local_28,*(float *)(param_1 + 8) + DAT_003943b4, DAT_003943c8,"%.3f",0); if (cVar3 != '\0') { fVar1 = DAT_003943c4; if (DAT_003943c4 <= local_30) { fVar1 = local_30; } fVar7 = (float)(~-(uint)(local_30 < DAT_0038f03c) & (uint)DAT_0038f03c | (uint)fVar1 & -(uint)(local_30 < DAT_0038f03c)); fVar1 = 0.0; if (!NAN(fVar7)) { fVar1 = fVar7; } if (*(float *)(param_1 + 8) < fVar1) { *(float *)(param_1 + 0xc) = fVar1; } } ImGui::EndDisabled(); ImGui::Separator(); ImGui::CheckboxFlags("Auto-Fit",(uint *)param_1,0x40); ImGui::Separator(); local_31 = (bool)((byte)*param_1 >> 7); cVar3 = ImGui::Checkbox("Invert",&local_31); if (cVar3 != '\0') { *param_1 = (ImPlot3DAxis)((byte)*param_1 ^ 0x80); } ImGui::Separator(); ImGui::BeginDisabled(*(int *)(param_1 + 0x18) < 2); cVar3 = ImGui::Checkbox("Label",&local_32); if (cVar3 != '\0') { *param_1 = (ImPlot3DAxis)((byte)*param_1 ^ 1); } ImGui::EndDisabled(); cVar3 = ImGui::Checkbox("Grid Lines",&local_33); if (cVar3 != '\0') { *param_1 = (ImPlot3DAxis)((byte)*param_1 ^ 2); } cVar3 = ImGui::Checkbox("Tick Marks",&local_34); if (cVar3 != '\0') { *param_1 = (ImPlot3DAxis)((byte)*param_1 ^ 4); } cVar3 = ImGui::Checkbox("Tick Labels",&local_35); if (cVar3 != '\0') { *param_1 = (ImPlot3DAxis)((byte)*param_1 ^ 8); } return; }
21,785
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>::operator[]<char const>(char const*)
monkey531[P]llama/common/json.hpp
reference operator[](T* key) { return operator[](typename object_t::key_type(key)); }
O1
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>& 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[]<char const>(char const*): pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx leaq 0x8(%rsp), %r14 leaq 0x7(%rsp), %rdx movq %r14, %rdi callq 0x562da movq %rbx, %rdi movq %r14, %rsi callq 0xaf8e4 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa8d9f movq 0x18(%rsp), %rsi incq %rsi callq 0x1ba60 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa8dc8 movq 0x18(%rsp), %rsi incq %rsi callq 0x1ba60 movq %rbx, %rdi callq 0x1c250
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERSD_PT_: push r14 push rbx sub rsp, 28h mov rbx, rdi lea r14, [rsp+38h+var_30] lea rdx, [rsp+38h+var_31] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, rbx mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixES9_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[](std::string) mov rbx, rax lea rax, [rsp+38h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A8D9F mov rsi, [rsp+38h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A8D9F: mov rax, rbx add rsp, 28h pop rbx pop r14 retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A8DC8 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A8DC8: mov rdi, rbx call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>( long long a1, _BYTE *a2) { long long v2; // rbx void *v4[2]; // [rsp+8h] [rbp-30h] BYREF long long v5; // [rsp+18h] [rbp-20h] BYREF std::string::basic_string<std::allocator<char>>(v4, a2); v2 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( a1, v4); if ( v4[0] != &v5 ) operator delete(v4[0], v5 + 1); return v2; }
operator[]<char_const>: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI LEA R14,[RSP + 0x8] LEA RDX,[RSP + 0x7] MOV RDI,R14 CALL 0x001562da LAB_001a8d76: MOV RDI,RBX MOV RSI,R14 CALL 0x001af8e4 LAB_001a8d81: MOV RBX,RAX LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001a8d9f MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011ba60 LAB_001a8d9f: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R14 RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::operator[]<char const>(char const*) */ basic_json * __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[]<char_const> (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,char *param_1) { basic_json *pbVar1; allocator local_31; long *local_30 [2]; long local_20 [2]; std::__cxx11::string::string<std::allocator<char>>((string *)local_30,param_1,&local_31); /* try { // try from 001a8d76 to 001a8d80 has its CatchHandler @ 001a8daa */ pbVar1 = (basic_json *)operator[](this,(string *)local_30); if (local_30[0] != local_20) { operator_delete(local_30[0],local_20[0] + 1); } return pbVar1; }
21,786
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>::operator[]<char const>(char const*)
monkey531[P]llama/common/json.hpp
reference operator[](T* key) { return operator[](typename object_t::key_type(key)); }
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>& 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[]<char const>(char const*): pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx leaq 0x8(%rsp), %r14 leaq 0x7(%rsp), %rdx movq %r14, %rdi callq 0x56c92 movq %rbx, %rdi movq %r14, %rsi callq 0xaf00a movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa85ad movq 0x18(%rsp), %rsi incq %rsi callq 0x1ba60 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa85d6 movq 0x18(%rsp), %rsi incq %rsi callq 0x1ba60 movq %rbx, %rdi callq 0x1c250
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERSD_PT_: push r14 push rbx sub rsp, 28h mov rbx, rdi lea r14, [rsp+38h+var_30] lea rdx, [rsp+38h+var_31] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, rbx mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixES9_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[](std::string) mov rbx, rax lea rax, [rsp+38h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A85AD mov rsi, [rsp+38h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A85AD: mov rax, rbx add rsp, 28h pop rbx pop r14 retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A85D6 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A85D6: mov rdi, rbx call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>( long long a1, _BYTE *a2) { long long v2; // rbx void *v4[2]; // [rsp+8h] [rbp-30h] BYREF long long v5; // [rsp+18h] [rbp-20h] BYREF std::string::basic_string<std::allocator<char>>(v4, a2); v2 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( a1, v4); if ( v4[0] != &v5 ) operator delete(v4[0], v5 + 1); return v2; }
operator[]<char_const>: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI LEA R14,[RSP + 0x8] LEA RDX,[RSP + 0x7] MOV RDI,R14 CALL 0x00156c92 LAB_001a8584: MOV RDI,RBX MOV RSI,R14 CALL 0x001af00a LAB_001a858f: MOV RBX,RAX LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001a85ad MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011ba60 LAB_001a85ad: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R14 RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::operator[]<char const>(char const*) */ basic_json * __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[]<char_const> (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,char *param_1) { basic_json *pbVar1; allocator local_31; long *local_30 [2]; long local_20 [2]; std::__cxx11::string::string<std::allocator<char>>((string *)local_30,param_1,&local_31); /* try { // try from 001a8584 to 001a858e has its CatchHandler @ 001a85b8 */ pbVar1 = (basic_json *)operator[](this,(string *)local_30); if (local_30[0] != local_20) { operator_delete(local_30[0],local_20[0] + 1); } return pbVar1; }
21,787
mysql_store_result_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_store_result_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_store_result, (parms->mysql), parms->mysql, MYSQL_RES *, r_ptr) }
O3
c
mysql_store_result_start_internal: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rdi movq 0x480(%rdi), %rax movq 0x28(%rax), %rbx callq 0x1df3d movq %rax, 0x8(%rbx) movl $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_store_result_start_internal: push rbp mov rbp, rsp push rbx push rax mov rdi, [rdi] mov rax, [rdi+480h] mov rbx, [rax+28h] call mysql_store_result mov [rbx+8], rax mov dword ptr [rbx], 0 add rsp, 8 pop rbx pop rbp retn
long long mysql_store_result_start_internal(long long *a1) { long long v1; // rdi long long v2; // rbx long long result; // rax v1 = *a1; v2 = *(_QWORD *)(*(_QWORD *)(v1 + 1152) + 40LL); result = mysql_store_result(v1); *(_QWORD *)(v2 + 8) = result; *(_DWORD *)v2 = 0; return result; }
mysql_store_result_start_internal: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RDI,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x480] MOV RBX,qword ptr [RAX + 0x28] CALL 0x0011df3d MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP RBP RET
void mysql_store_result_start_internal(long *param_1) { int4 *puVar1; int8 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_store_result(); *(int8 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
21,788
YAML::detail::node_data::get(YAML::detail::node&, std::shared_ptr<YAML::detail::memory_holder> const&) const
aimrt_mujoco_sim/_deps/yaml-cpp-src/src/node_data.cpp
node* node_data::get(node& key, const shared_memory_holder& /* pMemory */) const { if (m_type != NodeType::Map) { return nullptr; } for (const auto& it : m_map) { if (it.first->is(key)) return it.second; } return nullptr; }
O0
cpp
YAML::detail::node_data::get(YAML::detail::node&, std::shared_ptr<YAML::detail::memory_holder> const&) const: subq $0x48, %rsp movq %rdi, 0x38(%rsp) movq %rsi, 0x30(%rsp) movq %rdx, 0x28(%rsp) movq 0x38(%rsp), %rax movq %rax, (%rsp) cmpl $0x4, 0x10(%rax) je 0x129230 movq $0x0, 0x40(%rsp) jmp 0x1292c2 movq (%rsp), %rax addq $0x80, %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rdi callq 0xe4d00 movq %rax, 0x18(%rsp) movq 0x20(%rsp), %rdi callq 0xe4d30 movq %rax, 0x10(%rsp) leaq 0x18(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0xe4d60 xorb $-0x1, %al testb $0x1, %al jne 0x129274 jmp 0x1292b9 leaq 0x18(%rsp), %rdi callq 0xe52d0 movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax movq (%rax), %rdi movq 0x30(%rsp), %rsi callq 0xe95e0 testb $0x1, %al jne 0x12929b jmp 0x1292ab movq 0x8(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x40(%rsp) jmp 0x1292c2 jmp 0x1292ad leaq 0x18(%rsp), %rdi callq 0xe5210 jmp 0x12925d movq $0x0, 0x40(%rsp) movq 0x40(%rsp), %rax addq $0x48, %rsp retq nopl (%rax)
_ZNK4YAML6detail9node_data3getERNS0_4nodeERKSt10shared_ptrINS0_13memory_holderEE: sub rsp, 48h mov [rsp+48h+var_10], rdi mov [rsp+48h+var_18], rsi mov [rsp+48h+var_20], rdx mov rax, [rsp+48h+var_10] mov [rsp+48h+var_48], rax cmp dword ptr [rax+10h], 4 jz short loc_129230 mov [rsp+48h+var_8], 0 jmp loc_1292C2 loc_129230: mov rax, [rsp+48h+var_48] add rax, 80h mov [rsp+48h+var_28], rax mov rdi, [rsp+48h+var_28] call _ZNKSt6vectorISt4pairIPN4YAML6detail4nodeES4_ESaIS5_EE5beginEv; std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::begin(void) mov [rsp+48h+var_30], rax mov rdi, [rsp+48h+var_28] call _ZNKSt6vectorISt4pairIPN4YAML6detail4nodeES4_ESaIS5_EE3endEv; std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::end(void) mov [rsp+48h+var_38], rax loc_12925D: lea rdi, [rsp+48h+var_30] lea rsi, [rsp+48h+var_38] call _ZN9__gnu_cxxeqIPKSt4pairIPN4YAML6detail4nodeES5_ESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE xor al, 0FFh test al, 1 jnz short loc_129274 jmp short loc_1292B9 loc_129274: lea rdi, [rsp+48h+var_30] call _ZNK9__gnu_cxx17__normal_iteratorIPKSt4pairIPN4YAML6detail4nodeES5_ESt6vectorIS6_SaIS6_EEEdeEv; __gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> const*,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>::operator*(void) mov [rsp+48h+var_40], rax mov rax, [rsp+48h+var_40] mov rdi, [rax] mov rsi, [rsp+48h+var_18] call _ZNK4YAML6detail4node2isERKS1_; YAML::detail::node::is(YAML::detail::node const&) test al, 1 jnz short loc_12929B jmp short loc_1292AB loc_12929B: mov rax, [rsp+48h+var_40] mov rax, [rax+8] mov [rsp+48h+var_8], rax jmp short loc_1292C2 loc_1292AB: jmp short $+2 loc_1292AD: lea rdi, [rsp+48h+var_30] call _ZN9__gnu_cxx17__normal_iteratorIPKSt4pairIPN4YAML6detail4nodeES5_ESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> const*,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>::operator++(void) jmp short loc_12925D loc_1292B9: mov [rsp+48h+var_8], 0 loc_1292C2: mov rax, [rsp+48h+var_8] add rsp, 48h retn
long long YAML::detail::node_data::get(long long a1, const YAML::detail::node *a2, long long a3) { long long v4; // [rsp+8h] [rbp-40h] long long v5; // [rsp+10h] [rbp-38h] BYREF _QWORD v6[3]; // [rsp+18h] [rbp-30h] BYREF const YAML::detail::node *v7; // [rsp+30h] [rbp-18h] long long v8; // [rsp+38h] [rbp-10h] v8 = a1; v7 = a2; v6[2] = a3; if ( *(_DWORD *)(a1 + 16) != 4 ) return 0LL; v6[1] = a1 + 128; v6[0] = std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::begin(a1 + 128); v5 = std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::end(a1 + 128); while ( !__gnu_cxx::operator==<std::pair<YAML::detail::node *,YAML::detail::node *> const*,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>( (long long)v6, (long long)&v5) ) { v4 = __gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> const*,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>::operator*((long long)v6); if ( (YAML::detail::node::is(*(YAML::detail::node **)v4, v7) & 1) != 0 ) return *(_QWORD *)(v4 + 8); __gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> const*,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>::operator++(v6); } return 0LL; }
21,789
YAML::detail::node_data::get(YAML::detail::node&, std::shared_ptr<YAML::detail::memory_holder> const&) const
aimrt_mujoco_sim/_deps/yaml-cpp-src/src/node_data.cpp
node* node_data::get(node& key, const shared_memory_holder& /* pMemory */) const { if (m_type != NodeType::Map) { return nullptr; } for (const auto& it : m_map) { if (it.first->is(key)) return it.second; } return nullptr; }
O3
cpp
YAML::detail::node_data::get(YAML::detail::node&, std::shared_ptr<YAML::detail::memory_holder> const&) const: cmpl $0x4, 0x10(%rdi) jne 0x61692 movq 0x80(%rdi), %rcx movq 0x88(%rdi), %rdx cmpq %rdx, %rcx je 0x61692 movq (%rsi), %rsi xorl %eax, %eax movq (%rcx), %rdi cmpq %rsi, (%rdi) je 0x61695 addq $0x10, %rcx cmpq %rdx, %rcx jne 0x61680 retq xorl %eax, %eax retq movq 0x8(%rcx), %rax retq
_ZNK4YAML6detail9node_data3getERNS0_4nodeERKSt10shared_ptrINS0_13memory_holderEE: cmp dword ptr [rdi+10h], 4 jnz short loc_61692 mov rcx, [rdi+80h] mov rdx, [rdi+88h] cmp rcx, rdx jz short loc_61692 mov rsi, [rsi] xor eax, eax loc_61680: mov rdi, [rcx] cmp [rdi], rsi jz short loc_61695 add rcx, 10h cmp rcx, rdx jnz short loc_61680 retn loc_61692: xor eax, eax retn loc_61695: mov rax, [rcx+8] retn
long long YAML::detail::node_data::get(long long a1, long long *a2) { long long v2; // rcx long long v3; // rdx long long v4; // rsi long long result; // rax if ( *(_DWORD *)(a1 + 16) != 4 ) return 0LL; v2 = *(_QWORD *)(a1 + 128); v3 = *(_QWORD *)(a1 + 136); if ( v2 == v3 ) return 0LL; v4 = *a2; result = 0LL; while ( **(_QWORD **)v2 != v4 ) { v2 += 16LL; if ( v2 == v3 ) return result; } return *(_QWORD *)(v2 + 8); }
get: CMP dword ptr [RDI + 0x10],0x4 JNZ 0x00161692 MOV RCX,qword ptr [RDI + 0x80] MOV RDX,qword ptr [RDI + 0x88] CMP RCX,RDX JZ 0x00161692 MOV RSI,qword ptr [RSI] XOR EAX,EAX LAB_00161680: MOV RDI,qword ptr [RCX] CMP qword ptr [RDI],RSI JZ 0x00161695 ADD RCX,0x10 CMP RCX,RDX JNZ 0x00161680 RET LAB_00161692: XOR EAX,EAX RET LAB_00161695: MOV RAX,qword ptr [RCX + 0x8] RET
/* YAML::detail::node_data::get(YAML::detail::node&, std::shared_ptr<YAML::detail::memory_holder> const&) const */ int8 YAML::detail::node_data::get(node *param_1,shared_ptr *param_2) { int8 *puVar1; if (*(int *)(param_1 + 0x10) == 4) { puVar1 = *(int8 **)(param_1 + 0x80); if (puVar1 != *(int8 **)(param_1 + 0x88)) { do { if (*(long *)*puVar1 == *(long *)param_2) { return puVar1[1]; } puVar1 = puVar1 + 2; } while (puVar1 != *(int8 **)(param_1 + 0x88)); return 0; } } return 0; }
21,790
void OpenSubdiv::v3_6_0::Far::PatchParam::UnnormalizeTriangle<double>(double&, double&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/../far/../far/patchParam.h
constexpr void PatchParam::UnnormalizeTriangle( REAL & u, REAL & v ) const { if (IsTriangleRotated()) { REAL frac = GetParamFraction(); int depthFactor = 1 << GetDepth(); u = ((REAL)(depthFactor - GetU()) - u) * frac; v = ((REAL)(depthFactor - GetV()) - v) * frac; } else { Unnormalize(u, v); } }
O2
c
void OpenSubdiv::v3_6_0::Far::PatchParam::UnnormalizeTriangle<double>(double&, double&) const: pushq %r15 pushq %r14 pushq %rbx movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 callq 0x51390 testb %al, %al je 0x7b0f7 movq %r15, %rdi callq 0x54af0 movq (%r15), %rax movq %rax, %rcx shrq $0x20, %rcx andb $0xf, %cl pushq $0x1 popq %rdx shll %cl, %edx cvtss2sd %xmm0, %xmm0 shrq $0x36, %rax movl %edx, %ecx subl %eax, %ecx cvtsi2sd %ecx, %xmm1 subsd (%r14), %xmm1 mulsd %xmm0, %xmm1 movsd %xmm1, (%r14) movq (%r15), %rax shrq $0x2c, %rax andl $0x3ff, %eax # imm = 0x3FF subl %eax, %edx cvtsi2sd %edx, %xmm1 subsd (%rbx), %xmm1 mulsd %xmm0, %xmm1 movsd %xmm1, (%rbx) popq %rbx popq %r14 popq %r15 retq movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx popq %rbx popq %r14 popq %r15 jmp 0x50530
_ZNK10OpenSubdiv6v3_6_03Far10PatchParam19UnnormalizeTriangleIdEEvRT_S5_: push r15 push r14 push rbx mov rbx, rdx mov r14, rsi mov r15, rdi call __ZNK10OpenSubdiv6v3_6_03Far10PatchParam17IsTriangleRotatedEv; OpenSubdiv::v3_6_0::Far::PatchParam::IsTriangleRotated(void) test al, al jz short loc_7B0F7 mov rdi, r15; this call __ZNK10OpenSubdiv6v3_6_03Far10PatchParam16GetParamFractionEv; OpenSubdiv::v3_6_0::Far::PatchParam::GetParamFraction(void) mov rax, [r15] mov rcx, rax shr rcx, 20h and cl, 0Fh push 1 pop rdx shl edx, cl cvtss2sd xmm0, xmm0 shr rax, 36h mov ecx, edx sub ecx, eax cvtsi2sd xmm1, ecx subsd xmm1, qword ptr [r14] mulsd xmm1, xmm0 movsd qword ptr [r14], xmm1 mov rax, [r15] shr rax, 2Ch and eax, 3FFh sub edx, eax cvtsi2sd xmm1, edx subsd xmm1, qword ptr [rbx] mulsd xmm1, xmm0 movsd qword ptr [rbx], xmm1 pop rbx pop r14 pop r15 retn loc_7B0F7: mov rdi, r15 mov rsi, r14 mov rdx, rbx pop rbx pop r14 pop r15 jmp __ZNK10OpenSubdiv6v3_6_03Far10PatchParam11UnnormalizeIdEEvRT_S5_; OpenSubdiv::v3_6_0::Far::PatchParam::Unnormalize<double>(double &,double &)
long long OpenSubdiv::v3_6_0::Far::PatchParam::UnnormalizeTriangle<double>( OpenSubdiv::v3_6_0::Far::PatchParam *this, double *a2, double *a3, float a4) { int v5; // edx double v6; // xmm0_8 long long result; // rax if ( !(unsigned __int8)OpenSubdiv::v3_6_0::Far::PatchParam::IsTriangleRotated(this) ) return OpenSubdiv::v3_6_0::Far::PatchParam::Unnormalize<double>(this, a2, a3); OpenSubdiv::v3_6_0::Far::PatchParam::GetParamFraction(this); v5 = 1 << (HIDWORD(*(_QWORD *)this) & 0xF); v6 = a4; *a2 = ((double)(int)(v5 - (*(_QWORD *)this >> 54)) - *a2) * v6; result = (*(_QWORD *)this >> 44) & 0x3FFLL; *a3 = ((double)(v5 - (int)result) - *a3) * v6; return result; }
UnnormalizeTriangle<double>: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDX MOV R14,RSI MOV R15,RDI CALL 0x00151390 TEST AL,AL JZ 0x0017b0f7 MOV RDI,R15 CALL 0x00154af0 MOV RAX,qword ptr [R15] MOV RCX,RAX SHR RCX,0x20 AND CL,0xf PUSH 0x1 POP RDX SHL EDX,CL CVTSS2SD XMM0,XMM0 SHR RAX,0x36 MOV ECX,EDX SUB ECX,EAX CVTSI2SD XMM1,ECX SUBSD XMM1,qword ptr [R14] MULSD XMM1,XMM0 MOVSD qword ptr [R14],XMM1 MOV RAX,qword ptr [R15] SHR RAX,0x2c AND EAX,0x3ff SUB EDX,EAX CVTSI2SD XMM1,EDX SUBSD XMM1,qword ptr [RBX] MULSD XMM1,XMM0 MOVSD qword ptr [RBX],XMM1 POP RBX POP R14 POP R15 RET LAB_0017b0f7: MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX POP RBX POP R14 POP R15 JMP 0x00150530
/* void OpenSubdiv::v3_6_0::Far::PatchParam::UnnormalizeTriangle<double>(double&, double&) const */ void __thiscall OpenSubdiv::v3_6_0::Far::PatchParam::UnnormalizeTriangle<double> (PatchParam *this,double *param_1,double *param_2) { char cVar1; int iVar2; float fVar3; cVar1 = IsTriangleRotated(this); if (cVar1 != '\0') { fVar3 = (float)GetParamFraction(this); iVar2 = 1 << ((byte)((ulong)*(int8 *)this >> 0x20) & 0xf); *param_1 = ((double)(int)(iVar2 - (uint)((ulong)*(int8 *)this >> 0x36)) - *param_1) * (double)fVar3; *param_2 = ((double)(int)(iVar2 - ((uint)((ulong)*(int8 *)this >> 0x2c) & 0x3ff)) - *param_2) * (double)fVar3; return; } Unnormalize<double>(this,param_1,param_2); return; }
21,791
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>&)>, bool)
monkey531[P]llama/common/json.hpp
json_sax_dom_callback_parser(BasicJsonType& r, const parser_callback_t cb, const bool allow_exceptions_ = true) : root(r), callback(cb), allow_exceptions(allow_exceptions_) { keep_stack.push_back(true); }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>&)>, bool): subq $0x88, %rsp movq %rdx, 0x48(%rsp) movb %cl, %al movq %rdi, 0x80(%rsp) movq %rsi, 0x78(%rsp) movq %rdx, 0x70(%rsp) andb $0x1, %al movb %al, 0x6f(%rsp) movq 0x80(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x78(%rsp), %rcx movq %rcx, (%rax) movq %rax, %rdi addq $0x8, %rdi movq %rdi, 0x10(%rsp) xorps %xmm0, %xmm0 movaps %xmm0, 0x20(%rsp) movups %xmm0, 0x8(%rax) movq $0x0, 0x18(%rax) callq 0xacdf0 movaps 0x20(%rsp), %xmm0 movq 0x40(%rsp), %rax movq %rax, %rdi addq $0x20, %rdi movq %rdi, 0x18(%rsp) movups %xmm0, 0x30(%rax) movups %xmm0, 0x20(%rax) movq $0x0, 0x40(%rax) callq 0xace00 movaps 0x20(%rsp), %xmm0 movq 0x40(%rsp), %rax movq %rax, %rdi addq $0x48, %rdi movq %rdi, 0x38(%rsp) movups %xmm0, 0x58(%rax) movups %xmm0, 0x48(%rax) movq $0x0, 0x68(%rax) callq 0xace00 movq 0x40(%rsp), %rdi movq 0x48(%rsp), %rsi movq $0x0, 0x70(%rdi) movb $0x0, 0x78(%rdi) subq $-0x80, %rdi movq %rdi, 0x50(%rsp) callq 0xa1b30 jmp 0xa82dc movq 0x40(%rsp), %rdi movb 0x6f(%rsp), %al andb $0x1, %al movb %al, 0xa0(%rdi) addq $0xa8, %rdi movq %rdi, 0x8(%rsp) movl $0x9, %esi callq 0xaaba0 jmp 0xa8305 movq 0x40(%rsp), %rdi addq $0x20, %rdi movl $0x1, %esi callq 0xace10 jmp 0xa831a addq $0x88, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x5c(%rsp) jmp 0xa8364 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x5c(%rsp) jmp 0xa835a movq 0x8(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x5c(%rsp) callq 0xa19a0 movq 0x50(%rsp), %rdi callq 0xa19d0 movq 0x38(%rsp), %rdi callq 0xacef0 movq 0x18(%rsp), %rdi callq 0xacef0 movq 0x10(%rsp), %rdi callq 0xacf00 movq 0x60(%rsp), %rdi callq 0x59b90 nopl (%rax)
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ERSF_St8functionIFbiNS1_13parse_event_tESH_EEb: sub rsp, 88h mov [rsp+88h+var_40], rdx mov al, cl mov [rsp+88h+var_8], rdi mov [rsp+88h+var_10], rsi mov [rsp+88h+var_18], rdx and al, 1 mov [rsp+88h+var_19], al mov rax, [rsp+88h+var_8] mov [rsp+88h+var_48], rax mov rcx, [rsp+88h+var_10] mov [rax], rcx mov rdi, rax add rdi, 8 mov [rsp+88h+var_78], rdi xorps xmm0, xmm0 movaps [rsp+88h+var_68], xmm0 movups xmmword ptr [rax+8], xmm0 mov qword ptr [rax+18h], 0 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EEC2Ev; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::vector(void) movaps xmm0, [rsp+88h+var_68] mov rax, [rsp+88h+var_48] mov rdi, rax add rdi, 20h ; ' ' mov [rsp+88h+var_70], rdi movups xmmword ptr [rax+30h], xmm0 movups xmmword ptr [rax+20h], xmm0 mov qword ptr [rax+40h], 0 call _ZNSt6vectorIbSaIbEEC2Ev; std::vector<bool>::vector(void) movaps xmm0, [rsp+88h+var_68] mov rax, [rsp+88h+var_48] mov rdi, rax add rdi, 48h ; 'H' mov [rsp+88h+var_50], rdi movups xmmword ptr [rax+58h], xmm0 movups xmmword ptr [rax+48h], xmm0 mov qword ptr [rax+68h], 0 call _ZNSt6vectorIbSaIbEEC2Ev; std::vector<bool>::vector(void) mov rdi, [rsp+88h+var_48] mov rsi, [rsp+88h+var_40] mov qword ptr [rdi+70h], 0 mov byte ptr [rdi+78h], 0 sub rdi, 0FFFFFFFFFFFFFF80h mov [rsp+88h+var_38], rdi call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&) jmp short $+2 loc_A82DC: mov rdi, [rsp+88h+var_48] mov al, [rsp+88h+var_19] and al, 1 mov [rdi+0A0h], al add rdi, 0A8h mov [rsp+88h+var_80], rdi mov esi, 9 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ENS0_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>::basic_json(nlohmann::json_abi_v3_11_3::detail::value_t) jmp short $+2 loc_A8305: mov rdi, [rsp+88h+var_48] add rdi, 20h ; ' ' mov esi, 1 call _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool) jmp short $+2 loc_A831A: add rsp, 88h retn mov rcx, rax mov eax, edx mov [rsp+arg_58], rcx mov [rsp+arg_54], eax jmp short loc_A8364 mov rcx, rax mov eax, edx mov [rsp+arg_58], rcx mov [rsp+arg_54], eax jmp short loc_A835A mov rdi, [rsp+arg_0] mov rcx, rax mov eax, edx mov [rsp+arg_58], rcx mov [rsp+arg_54], eax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() loc_A835A: mov rdi, [rsp+arg_48] call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEED2Ev; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::~function() loc_A8364: mov rdi, [rsp+arg_30] call _ZNSt6vectorIbSaIbEED2Ev; std::vector<bool>::~vector() mov rdi, [rsp+arg_10] call _ZNSt6vectorIbSaIbEED2Ev; std::vector<bool>::~vector() mov rdi, [rsp+arg_8] call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EED2Ev; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::~vector() mov rdi, [rsp+arg_58] call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_sax_dom_callback_parser( long long a1, long long a2, long long a3, char a4) { char v6; // [rsp+6Fh] [rbp-19h] v6 = a4 & 1; *(_QWORD *)a1 = a2; *(_OWORD *)(a1 + 8) = 0LL; *(_QWORD *)(a1 + 24) = 0LL; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::vector(); *(_OWORD *)(a1 + 48) = 0LL; *(_OWORD *)(a1 + 32) = 0LL; *(_QWORD *)(a1 + 64) = 0LL; std::vector<bool>::vector(); *(_OWORD *)(a1 + 88) = 0LL; *(_OWORD *)(a1 + 72) = 0LL; *(_QWORD *)(a1 + 104) = 0LL; std::vector<bool>::vector(); *(_QWORD *)(a1 + 112) = 0LL; *(_BYTE *)(a1 + 120) = 0; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function( (std::_Function_base *)(a1 + 128), a3); *(_BYTE *)(a1 + 160) = v6 & 1; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( a1 + 168, 9LL); return std::vector<bool>::push_back(a1 + 32, 1LL); }
json_sax_dom_callback_parser: SUB RSP,0x88 MOV qword ptr [RSP + 0x48],RDX MOV AL,CL MOV qword ptr [RSP + 0x80],RDI MOV qword ptr [RSP + 0x78],RSI MOV qword ptr [RSP + 0x70],RDX AND AL,0x1 MOV byte ptr [RSP + 0x6f],AL MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x40],RAX MOV RCX,qword ptr [RSP + 0x78] MOV qword ptr [RAX],RCX MOV RDI,RAX ADD RDI,0x8 MOV qword ptr [RSP + 0x10],RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOVUPS xmmword ptr [RAX + 0x8],XMM0 MOV qword ptr [RAX + 0x18],0x0 CALL 0x001acdf0 MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x40] MOV RDI,RAX ADD RDI,0x20 MOV qword ptr [RSP + 0x18],RDI MOVUPS xmmword ptr [RAX + 0x30],XMM0 MOVUPS xmmword ptr [RAX + 0x20],XMM0 MOV qword ptr [RAX + 0x40],0x0 CALL 0x001ace00 MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x40] MOV RDI,RAX ADD RDI,0x48 MOV qword ptr [RSP + 0x38],RDI MOVUPS xmmword ptr [RAX + 0x58],XMM0 MOVUPS xmmword ptr [RAX + 0x48],XMM0 MOV qword ptr [RAX + 0x68],0x0 CALL 0x001ace00 MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x48] MOV qword ptr [RDI + 0x70],0x0 MOV byte ptr [RDI + 0x78],0x0 SUB RDI,-0x80 MOV qword ptr [RSP + 0x50],RDI LAB_001a82d5: CALL 0x001a1b30 JMP 0x001a82dc LAB_001a82dc: MOV RDI,qword ptr [RSP + 0x40] MOV AL,byte ptr [RSP + 0x6f] AND AL,0x1 MOV byte ptr [RDI + 0xa0],AL ADD RDI,0xa8 MOV qword ptr [RSP + 0x8],RDI LAB_001a82f9: MOV ESI,0x9 CALL 0x001aaba0 JMP 0x001a8305 LAB_001a8305: MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0x20 LAB_001a830e: MOV ESI,0x1 CALL 0x001ace10 LAB_001a8318: JMP 0x001a831a LAB_001a831a: ADD RSP,0x88 RET
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::json_sax_dom_callback_parser(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::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&)>, bool) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::json_sax_dom_callback_parser (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,int8 param_1,function *param_3,byte param_4) { *(int8 *)this = param_1; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::vector((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x40) = 0; std::vector<bool,std::allocator<bool>>::vector((vector<bool,std::allocator<bool>> *)(this + 0x20)) ; *(int8 *)(this + 0x58) = 0; *(int8 *)(this + 0x60) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x50) = 0; *(int8 *)(this + 0x68) = 0; std::vector<bool,std::allocator<bool>>::vector((vector<bool,std::allocator<bool>> *)(this + 0x48)) ; *(int8 *)(this + 0x70) = 0; this[0x78] = (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> )0x0; /* try { // try from 001a82d5 to 001a82d9 has its CatchHandler @ 001a8322 */ std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> ::function((function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> *)(this + 0x80),param_3); this[0xa0] = (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> )(param_4 & 1); /* try { // try from 001a82f9 to 001a8302 has its CatchHandler @ 001a8332 */ basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)(this + 0xa8),9); /* try { // try from 001a830e to 001a8317 has its CatchHandler @ 001a8342 */ std::vector<bool,std::allocator<bool>>::push_back ((vector<bool,std::allocator<bool>> *)(this + 0x20),true); return; }
21,792
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>&)>, bool)
monkey531[P]llama/common/json.hpp
json_sax_dom_callback_parser(BasicJsonType& r, const parser_callback_t cb, const bool allow_exceptions_ = true) : root(r), callback(cb), allow_exceptions(allow_exceptions_) { keep_stack.push_back(true); }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>&)>, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %ecx, %ebp movq %rdi, %rbx movq %rsi, (%rdi) leaq 0x20(%rdi), %r14 leaq 0x80(%rdi), %r12 xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rdi) movups %xmm0, 0x18(%rdi) movups %xmm0, 0x28(%rdi) movups %xmm0, 0x38(%rdi) movups %xmm0, 0x48(%rdi) movups %xmm0, 0x58(%rdi) movups %xmm0, 0x68(%rdi) movb $0x0, 0x78(%rdi) movq %r12, %rdi movq %rdx, %rsi callq 0x58f4c movb %bpl, 0xa0(%rbx) leaq 0xa8(%rbx), %r13 movb $0x9, 0xa8(%rbx) movq $0x0, 0xb0(%rbx) movq %r13, %rdi movl $0x1, %esi callq 0x595aa movq %r14, %rdi movl $0x1, %esi callq 0x5cc36 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 movq %r13, %rdi xorl %esi, %esi callq 0x595aa movq %r13, %rdi callq 0x5ea98 movq 0x90(%rbx), %rax testq %rax, %rax je 0x5a944 movq %r12, %rdi movq %r12, %rsi movl $0x3, %edx callq *%rax jmp 0x5a944 jmp 0x5a96b movq %rax, %r15 leaq 0x48(%rbx), %rdi callq 0x5ce3e movq %r14, %rdi callq 0x5ce3e leaq 0x8(%rbx), %rdi movq %rbx, %rsi callq 0x1b705 movq %r15, %rdi callq 0x1af20 jmp 0x5a96b movq %rax, %rdi callq 0x2160f nop
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ERSF_St8functionIFbiNS1_13parse_event_tESH_EEb: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebp, ecx mov rbx, rdi mov [rdi], rsi lea r14, [rdi+20h] lea r12, [rdi+80h] xorps xmm0, xmm0 movups xmmword ptr [rdi+8], xmm0 movups xmmword ptr [rdi+18h], xmm0 movups xmmword ptr [rdi+28h], xmm0 movups xmmword ptr [rdi+38h], xmm0 movups xmmword ptr [rdi+48h], xmm0 movups xmmword ptr [rdi+58h], xmm0 movups xmmword ptr [rdi+68h], xmm0 mov byte ptr [rdi+78h], 0 mov rdi, r12 mov rsi, rdx call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&) mov [rbx+0A0h], bpl lea r13, [rbx+0A8h] mov byte ptr [rbx+0A8h], 9 mov qword ptr [rbx+0B0h], 0 mov rdi, r13 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 mov esi, 1 call _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool) add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r15, rax mov rdi, r13 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, r13 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rax, [rbx+90h] test rax, rax jz short loc_5A944 mov rdi, r12 mov rsi, r12 mov edx, 3 call rax jmp short loc_5A944 jmp short loc_5A96B mov r15, rax loc_5A944: lea rdi, [rbx+48h] call _ZNSt13_Bvector_baseISaIbEE13_M_deallocateEv; std::_Bvector_base<std::allocator<bool>>::_M_deallocate(void) mov rdi, r14 call _ZNSt13_Bvector_baseISaIbEE13_M_deallocateEv; std::_Bvector_base<std::allocator<bool>>::_M_deallocate(void) lea rdi, [rbx+8] mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ERSF_St8functionIFbiNS1_13parse_event_tESH_EEb_cold_1; 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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool) [clone] mov rdi, r15 call __Unwind_Resume jmp short $+2 loc_5A96B: mov rdi, rax call __clang_call_terminate
long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_sax_dom_callback_parser( long long a1, long long a2, long long a3, char a4) { *(_QWORD *)a1 = a2; *(_OWORD *)(a1 + 8) = 0LL; *(_OWORD *)(a1 + 24) = 0LL; *(_OWORD *)(a1 + 40) = 0LL; *(_OWORD *)(a1 + 56) = 0LL; *(_OWORD *)(a1 + 72) = 0LL; *(_OWORD *)(a1 + 88) = 0LL; *(_OWORD *)(a1 + 104) = 0LL; *(_BYTE *)(a1 + 120) = 0; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function( (_OWORD *)(a1 + 128), a3); *(_BYTE *)(a1 + 160) = a4; *(_BYTE *)(a1 + 168) = 9; *(_QWORD *)(a1 + 176) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 168)); return std::vector<bool>::push_back(a1 + 32, 1LL); }
json_sax_dom_callback_parser: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBP,ECX MOV RBX,RDI MOV qword ptr [RDI],RSI LEA R14,[RDI + 0x20] LEA R12,[RDI + 0x80] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x8],XMM0 MOVUPS xmmword ptr [RDI + 0x18],XMM0 MOVUPS xmmword ptr [RDI + 0x28],XMM0 MOVUPS xmmword ptr [RDI + 0x38],XMM0 MOVUPS xmmword ptr [RDI + 0x48],XMM0 MOVUPS xmmword ptr [RDI + 0x58],XMM0 MOVUPS xmmword ptr [RDI + 0x68],XMM0 MOV byte ptr [RDI + 0x78],0x0 LAB_0015a8bb: MOV RDI,R12 MOV RSI,RDX CALL 0x00158f4c MOV byte ptr [RBX + 0xa0],BPL LEA R13,[RBX + 0xa8] MOV byte ptr [RBX + 0xa8],0x9 MOV qword ptr [RBX + 0xb0],0x0 MOV RDI,R13 MOV ESI,0x1 CALL 0x001595aa LAB_0015a8f3: MOV RDI,R14 MOV ESI,0x1 CALL 0x0015cc36 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::json_sax_dom_callback_parser(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::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&)>, bool) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::json_sax_dom_callback_parser (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,int8 param_1,function *param_3, json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> param_4) { *(int8 *)this = param_1; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x50) = 0; *(int8 *)(this + 0x58) = 0; *(int8 *)(this + 0x60) = 0; *(int8 *)(this + 0x68) = 0; *(int8 *)(this + 0x70) = 0; this[0x78] = (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> )0x0; /* try { // try from 0015a8bb to 0015a8c5 has its CatchHandler @ 0015a941 */ std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> ::function((function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> *)(this + 0x80),param_3); this[0xa0] = param_4; this[0xa8] = (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> )0x9; *(int8 *)(this + 0xb0) = 0; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant((bool)((char)this + -0x58)); /* try { // try from 0015a8f3 to 0015a8ff has its CatchHandler @ 0015a90f */ std::vector<bool,std::allocator<bool>>::push_back ((vector<bool,std::allocator<bool>> *)(this + 0x20),true); return; }
21,793
bitmap_union
eloqsql/mysys/my_bitmap.c
void bitmap_union(MY_BITMAP *map, const MY_BITMAP *map2) { my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end; DBUG_ASSERT(map->bitmap); DBUG_ASSERT(map2->bitmap); DBUG_ASSERT(map->n_bits == map2->n_bits); end= map->last_word_ptr; while (to <= end) *to++ |= *from++; }
O0
c
bitmap_union: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) jmp 0xf93b4 jmp 0xf93b6 jmp 0xf93b8 jmp 0xf93ba jmp 0xf93bc movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax cmpq -0x28(%rbp), %rax ja 0xf93f8 movq -0x20(%rbp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, -0x20(%rbp) movl (%rax), %ecx movq -0x18(%rbp), %rax movq %rax, %rdx addq $0x4, %rdx movq %rdx, -0x18(%rbp) orl (%rax), %ecx movl %ecx, (%rax) jmp 0xf93c8 popq %rbp retq nopw (%rax,%rax)
bitmap_union: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_20], rax jmp short $+2 loc_F93B4: jmp short $+2 loc_F93B6: jmp short $+2 loc_F93B8: jmp short $+2 loc_F93BA: jmp short $+2 loc_F93BC: mov rax, [rbp+var_8] mov rax, [rax+8] mov [rbp+var_28], rax loc_F93C8: mov rax, [rbp+var_18] cmp rax, [rbp+var_28] ja short loc_F93F8 mov rax, [rbp+var_20] mov rcx, rax add rcx, 4 mov [rbp+var_20], rcx mov ecx, [rax] mov rax, [rbp+var_18] mov rdx, rax add rdx, 4 mov [rbp+var_18], rdx or ecx, [rax] mov [rax], ecx jmp short loc_F93C8 loc_F93F8: pop rbp retn
_DWORD * bitmap_union(_QWORD *a1, int **a2) { _DWORD *result; // rax int *v3; // rax int v4; // ecx _DWORD *v5; // rax unsigned long long v6; // [rsp+0h] [rbp-28h] int *v7; // [rsp+8h] [rbp-20h] _DWORD *v8; // [rsp+10h] [rbp-18h] v8 = (_DWORD *)*a1; v7 = *a2; v6 = a1[1]; while ( 1 ) { result = v8; if ( (unsigned long long)v8 > v6 ) break; v3 = v7++; v4 = *v3; v5 = v8++; *v5 |= v4; } return result; }
bitmap_union: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX JMP 0x001f93b4 LAB_001f93b4: JMP 0x001f93b6 LAB_001f93b6: JMP 0x001f93b8 LAB_001f93b8: JMP 0x001f93ba LAB_001f93ba: JMP 0x001f93bc LAB_001f93bc: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x28],RAX LAB_001f93c8: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x28] JA 0x001f93f8 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RBP + -0x20],RCX MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] MOV RDX,RAX ADD RDX,0x4 MOV qword ptr [RBP + -0x18],RDX OR ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX JMP 0x001f93c8 LAB_001f93f8: POP RBP RET
void bitmap_union(int8 *param_1,int8 *param_2) { uint *puVar1; uint *local_28; uint *local_20; puVar1 = (uint *)param_1[1]; local_28 = (uint *)*param_2; local_20 = (uint *)*param_1; while (local_20 <= puVar1) { *local_20 = *local_28 | *local_20; local_28 = local_28 + 1; local_20 = local_20 + 1; } return; }
21,794
testing::internal::FilePath::RemoveFileName() const
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest-filepath.cc
FilePath FilePath::RemoveFileName() const { const char* const last_sep = FindLastPathSeparator(); std::string dir; if (last_sep) { dir = std::string(c_str(), static_cast<size_t>(last_sep + 1 - c_str())); } else { dir = kCurrentDirectoryString; } return FilePath(dir); }
O1
cpp
testing::internal::FilePath::RemoveFileName() const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdi, %rbx movq (%rsi), %r14 movq %r14, %rdi movl $0x2f, %esi callq 0x8560 leaq 0x38(%rsp), %r15 movq %r15, -0x10(%r15) movq $0x0, -0x8(%r15) movb $0x0, (%r15) testq %rax, %rax je 0x15162 incq %rax leaq 0x58(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x48(%rsp), %rdi movq %r14, %rsi movq %rax, %rdx callq 0x39504 leaq 0x28(%rsp), %rdi leaq 0x48(%rsp), %r14 movq %r14, %rsi callq 0x8670 movq (%r14), %rdi cmpq %r12, %rdi je 0x1517d movq 0x58(%rsp), %rsi incq %rsi callq 0x84e0 jmp 0x1517d leaq 0x2bc5c(%rip), %rcx # 0x40dc5 leaq 0x28(%rsp), %rdi movl $0x2, %r8d xorl %esi, %esi xorl %edx, %edx callq 0x88a0 leaq 0x18(%rsp), %r14 movq %r14, -0x10(%r14) movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx addq %rsi, %rdx leaq 0x8(%rsp), %rdi callq 0x39594 leaq 0x10(%rbx), %rax movq %rax, (%rbx) movq 0x8(%rsp), %rcx cmpq %r14, %rcx je 0x151bc movq %rcx, (%rbx) movq 0x18(%rsp), %rax movq %rax, 0x10(%rbx) jmp 0x151c3 movups (%r14), %xmm0 movups %xmm0, (%rax) movq 0x10(%rsp), %rax movq %rax, 0x8(%rbx) movq %r14, 0x8(%rsp) movq $0x0, 0x10(%rsp) movb $0x0, 0x18(%rsp) movq %rbx, %rdi callq 0x15dde movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0x151fe movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 movq 0x28(%rsp), %rdi cmpq %r15, %rdi je 0x15215 movq 0x38(%rsp), %rsi incq %rsi callq 0x84e0 movq %rbx, %rax addq $0x68, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq jmp 0x15226 movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r15, %rdi je 0x15240 movq 0x38(%rsp), %rsi incq %rsi callq 0x84e0 movq %rbx, %rdi callq 0x8990
_ZNK7testing8internal8FilePath14RemoveFileNameEv: push r15 push r14 push r12 push rbx sub rsp, 68h mov rbx, rdi mov r14, [rsi] mov rdi, r14 mov esi, 2Fh ; '/' call _strrchr lea r15, [rsp+88h+var_50] mov [r15-10h], r15 mov qword ptr [r15-8], 0 mov byte ptr [r15], 0 test rax, rax jz short loc_15162 inc rax lea r12, [rsp+88h+var_30] mov [r12-10h], r12 lea rdi, [rsp+88h+var_40] mov rsi, r14 mov rdx, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+88h+var_60] lea r14, [rsp+88h+var_40] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r14]; void * cmp rdi, r12 jz short loc_1517D mov rsi, [rsp+88h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_1517D loc_15162: lea rcx, _ZN7testing8internalL23kCurrentDirectoryStringE; "./" lea rdi, [rsp+88h+var_60] mov r8d, 2 xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) loc_1517D: lea r14, [rsp+88h+var_70] mov [r14-10h], r14 mov rsi, [rsp+88h+var_60] mov rdx, [rsp+88h+var_58] add rdx, rsi lea rdi, [rsp+88h+var_80] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rax, [rbx+10h] mov [rbx], rax mov rcx, [rsp+88h+var_80] cmp rcx, r14 jz short loc_151BC mov [rbx], rcx mov rax, [rsp+88h+var_70] mov [rbx+10h], rax jmp short loc_151C3 loc_151BC: movups xmm0, xmmword ptr [r14] movups xmmword ptr [rax], xmm0 loc_151C3: mov rax, [rsp+88h+var_78] mov [rbx+8], rax mov [rsp+88h+var_80], r14 mov [rsp+88h+var_78], 0 mov byte ptr [rsp+88h+var_70], 0 mov rdi, rbx; this call _ZN7testing8internal8FilePath9NormalizeEv; testing::internal::FilePath::Normalize(void) mov rdi, [rsp+88h+var_80]; void * cmp rdi, r14 jz short loc_151FE mov rsi, [rsp+88h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_151FE: mov rdi, [rsp+88h+var_60]; void * cmp rdi, r15 jz short loc_15215 mov rsi, [rsp+88h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_15215: mov rax, rbx add rsp, 68h pop rbx pop r12 pop r14 pop r15 retn jmp short $+2 loc_15226: mov rbx, rax mov rdi, [rsp+arg_20]; void * cmp rdi, r15 jz short loc_15240 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_15240: mov rdi, rbx call __Unwind_Resume
testing::internal::FilePath * testing::internal::FilePath::RemoveFileName( testing::internal::FilePath *this, _QWORD *a2) { long long v2; // r14 long long v3; // rax void *v5; // [rsp+8h] [rbp-80h] BYREF long long v6; // [rsp+10h] [rbp-78h] __int128 v7; // [rsp+18h] [rbp-70h] BYREF void *v8; // [rsp+28h] [rbp-60h] BYREF long long v9; // [rsp+30h] [rbp-58h] _QWORD v10[2]; // [rsp+38h] [rbp-50h] BYREF void *v11[2]; // [rsp+48h] [rbp-40h] BYREF _QWORD v12[6]; // [rsp+58h] [rbp-30h] BYREF v2 = *a2; v3 = strrchr(*a2, 47LL); v8 = v10; v9 = 0LL; LOBYTE(v10[0]) = 0; if ( v3 ) { v11[0] = v12; std::string::_M_construct<char const*>(v11, v2, v3 + 1); std::string::operator=(&v8, v11); if ( v11[0] != v12 ) operator delete(v11[0], v12[0] + 1LL); } else { std::string::_M_replace(&v8, 0LL, 0LL, "./", 2LL); } v5 = &v7; std::string::_M_construct<char *>(&v5, v8, (char *)v8 + v9); *(_QWORD *)this = (char *)this + 16; if ( v5 == &v7 ) { *((_OWORD *)this + 1) = v7; } else { *(_QWORD *)this = v5; *((_QWORD *)this + 2) = v7; } *((_QWORD *)this + 1) = v6; v5 = &v7; v6 = 0LL; LOBYTE(v7) = 0; testing::internal::FilePath::Normalize(this); if ( v5 != &v7 ) operator delete(v5, v7 + 1); if ( v8 != v10 ) operator delete(v8, v10[0] + 1LL); return this; }
RemoveFileName: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x68 MOV RBX,RDI MOV R14,qword ptr [RSI] MOV RDI,R14 MOV ESI,0x2f CALL 0x00108560 LEA R15,[RSP + 0x38] MOV qword ptr [R15 + -0x10],R15 MOV qword ptr [R15 + -0x8],0x0 MOV byte ptr [R15],0x0 TEST RAX,RAX JZ 0x00115162 INC RAX LEA R12,[RSP + 0x58] MOV qword ptr [R12 + -0x10],R12 LAB_00115129: LEA RDI,[RSP + 0x48] MOV RSI,R14 MOV RDX,RAX CALL 0x00139504 LEA RDI,[RSP + 0x28] LEA R14,[RSP + 0x48] MOV RSI,R14 CALL 0x00108670 MOV RDI,qword ptr [R14] CMP RDI,R12 JZ 0x0011517d MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x001084e0 JMP 0x0011517d LAB_00115162: LEA RCX,[0x140dc5] LEA RDI,[RSP + 0x28] MOV R8D,0x2 XOR ESI,ESI XOR EDX,EDX CALL 0x001088a0 LAB_0011517d: LEA R14,[RSP + 0x18] MOV qword ptr [R14 + -0x10],R14 MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] ADD RDX,RSI LEA RDI,[RSP + 0x8] CALL 0x00139594 LAB_0011519d: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX MOV RCX,qword ptr [RSP + 0x8] CMP RCX,R14 JZ 0x001151bc MOV qword ptr [RBX],RCX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RBX + 0x10],RAX JMP 0x001151c3 LAB_001151bc: MOVUPS XMM0,xmmword ptr [R14] MOVUPS xmmword ptr [RAX],XMM0 LAB_001151c3: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RBX + 0x8],RAX MOV qword ptr [RSP + 0x8],R14 MOV qword ptr [RSP + 0x10],0x0 MOV byte ptr [RSP + 0x18],0x0 MOV RDI,RBX CALL 0x00115dde MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R14 JZ 0x001151fe MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001084e0 LAB_001151fe: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R15 JZ 0x00115215 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001084e0 LAB_00115215: MOV RAX,RBX ADD RSP,0x68 POP RBX POP R12 POP R14 POP R15 RET
/* testing::internal::FilePath::RemoveFileName() const */ void testing::internal::FilePath::RemoveFileName(void) { char *__s; char *pcVar1; int8 *in_RSI; FilePath *in_RDI; int1 *local_80; int8 local_78; int1 local_70; int7 uStack_6f; int8 uStack_68; int1 *local_60; long local_58; int1 local_50; int7 uStack_4f; long *local_40 [2]; long local_30 [2]; __s = (char *)*in_RSI; pcVar1 = strrchr(__s,0x2f); local_58 = 0; local_50 = 0; local_60 = &local_50; if (pcVar1 == (char *)0x0) { /* try { // try from 00115162 to 0011519c has its CatchHandler @ 00115226 */ std::__cxx11::string::_M_replace((ulong)&local_60,0,(char *)0x0,0x140dc5); } else { /* try { // try from 00115129 to 00115138 has its CatchHandler @ 00115224 */ local_40[0] = local_30; std::__cxx11::string::_M_construct<char_const*>(local_40,__s,pcVar1 + 1); std::__cxx11::string::operator=((string *)&local_60,(string *)local_40); if (local_40[0] != local_30) { operator_delete(local_40[0],local_30[0] + 1); } } local_80 = &local_70; std::__cxx11::string::_M_construct<char*>(&local_80,local_60,local_60 + local_58); *(FilePath **)in_RDI = in_RDI + 0x10; if (local_80 == &local_70) { *(ulong *)(in_RDI + 0x10) = CONCAT71(uStack_6f,local_70); *(int8 *)(in_RDI + 0x18) = uStack_68; } else { *(int1 **)in_RDI = local_80; *(ulong *)(in_RDI + 0x10) = CONCAT71(uStack_6f,local_70); } *(int8 *)(in_RDI + 8) = local_78; local_78 = 0; local_70 = 0; local_80 = &local_70; Normalize(in_RDI); if (local_80 != &local_70) { operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1); } if (local_60 != &local_50) { operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1); } return; }
21,795
minja::Parser::unterminated(minja::TemplateToken const&) const
monkey531[P]llama/common/minja.hpp
std::runtime_error unterminated(const TemplateToken & token) const { return std::runtime_error("Unterminated " + TemplateToken::typeToString(token.type) + error_location_suffix(*template_str, token.location.pos)); }
O2
cpp
minja::Parser::unterminated(minja::TemplateToken const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movl 0x8(%rdx), %esi leaq 0x68(%rsp), %r12 movq %r12, %rdi callq 0x75580 leaq 0x420e0(%rip), %rsi # 0xb6cd2 leaq 0x28(%rsp), %rdi movq %r12, %rdx callq 0x5b1b2 movq (%r15), %rsi movq 0x20(%r14), %rdx leaq 0x8(%rsp), %rdi callq 0x5a6e6 leaq 0x48(%rsp), %rdi leaq 0x28(%rsp), %rsi leaq 0x8(%rsp), %rdx callq 0x3bf63 leaq 0x48(%rsp), %rsi movq %rbx, %rdi callq 0x25050 leaq 0x48(%rsp), %rdi callq 0x25478 leaq 0x8(%rsp), %rdi callq 0x25478 leaq 0x28(%rsp), %rdi callq 0x25478 leaq 0x68(%rsp), %rdi callq 0x25478 movq %rbx, %rax addq $0x88, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x25478 jmp 0x74c7d movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x25478 jmp 0x74c8c movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x25478 jmp 0x74c9b movq %rax, %rbx leaq 0x68(%rsp), %rdi callq 0x25478 movq %rbx, %rdi callq 0x251e0 nop
_ZNK5minja6Parser12unterminatedERKNS_13TemplateTokenE: push r15 push r14 push r12 push rbx sub rsp, 88h mov r14, rdx mov r15, rsi mov rbx, rdi mov esi, [rdx+8] lea r12, [rsp+0A8h+var_40] mov rdi, r12 call _ZN5minja13TemplateToken12typeToStringB5cxx11ENS0_4TypeE; minja::TemplateToken::typeToString(minja::TemplateToken::Type) lea rsi, aUnterminated; "Unterminated " lea rdi, [rsp+0A8h+var_80] mov rdx, r12 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov rsi, [r15] mov rdx, [r14+20h] lea rdi, [rsp+0A8h+var_A0] call _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; minja::error_location_suffix(std::string const&,ulong) lea rdi, [rsp+0A8h+var_60] lea rsi, [rsp+0A8h+var_80] lea rdx, [rsp+0A8h+var_A0] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rsi, [rsp+0A8h+var_60] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) lea rdi, [rsp+0A8h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 88h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_74C7D mov rbx, rax loc_74C7D: lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_74C8C mov rbx, rax loc_74C8C: lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_74C9B mov rbx, rax loc_74C9B: lea rdi, [rsp+arg_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::unterminated(minja::Parser *this, const minja::TemplateToken *a2, long long a3) { _QWORD v5[4]; // [rsp+8h] [rbp-A0h] BYREF _QWORD v6[4]; // [rsp+28h] [rbp-80h] BYREF _BYTE v7[32]; // [rsp+48h] [rbp-60h] BYREF _BYTE v8[64]; // [rsp+68h] [rbp-40h] BYREF minja::TemplateToken::typeToString[abi:cxx11](v8, *(unsigned int *)(a3 + 8)); std::operator+<char>((long long)v6, (long long)"Unterminated ", (long long)v8); minja::error_location_suffix((long long)v5, *(_QWORD *)a2, *(_QWORD *)(a3 + 32)); std::operator+<char>((long long)v7, v6, v5); std::runtime_error::runtime_error(this, v7); std::string::~string(v7); std::string::~string(v5); std::string::~string(v6); std::string::~string(v8); return this; }
unterminated: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x88 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV ESI,dword ptr [RDX + 0x8] LEA R12,[RSP + 0x68] MOV RDI,R12 CALL 0x00175580 LAB_00174beb: LEA RSI,[0x1b6cd2] LEA RDI,[RSP + 0x28] MOV RDX,R12 CALL 0x0015b1b2 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R14 + 0x20] LAB_00174c06: LEA RDI,[RSP + 0x8] CALL 0x0015a6e6 LAB_00174c10: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x0013bf63 LAB_00174c24: LEA RSI,[RSP + 0x48] MOV RDI,RBX CALL 0x00125050 LAB_00174c31: LEA RDI,[RSP + 0x48] CALL 0x00125478 LEA RDI,[RSP + 0x8] CALL 0x00125478 LEA RDI,[RSP + 0x28] CALL 0x00125478 LEA RDI,[RSP + 0x68] CALL 0x00125478 MOV RAX,RBX ADD RSP,0x88 POP RBX POP R12 POP R14 POP R15 RET
/* minja::Parser::unterminated(minja::TemplateToken const&) const */ TemplateToken * minja::Parser::unterminated(TemplateToken *param_1) { long in_RDX; int8 *in_RSI; minja local_a0 [32]; string local_80 [32]; string local_60 [32]; TemplateToken local_40 [32]; TemplateToken::typeToString_abi_cxx11_(local_40,*(int4 *)(in_RDX + 8)); /* try { // try from 00174beb to 00174bfe has its CatchHandler @ 00174c98 */ std::operator+((char *)local_80,(string *)"Unterminated "); /* try { // try from 00174c06 to 00174c0f has its CatchHandler @ 00174c89 */ error_location_suffix(local_a0,(string *)*in_RSI,*(ulong *)(in_RDX + 0x20)); /* try { // try from 00174c10 to 00174c23 has its CatchHandler @ 00174c7a */ std::operator+(local_60,local_80); /* try { // try from 00174c24 to 00174c30 has its CatchHandler @ 00174c6b */ std::runtime_error::runtime_error((runtime_error *)param_1,local_60); std::__cxx11::string::~string(local_60); std::__cxx11::string::~string((string *)local_a0); std::__cxx11::string::~string(local_80); std::__cxx11::string::~string((string *)local_40); return param_1; }
21,796
js_parse_logical_and_or
bluesky950520[P]quickjs/quickjs.c
static __exception int js_parse_logical_and_or(JSParseState *s, int op, int parse_flags) { int label1; if (op == TOK_LAND) { if (js_parse_expr_binary(s, 8, parse_flags)) return -1; } else { if (js_parse_logical_and_or(s, TOK_LAND, parse_flags)) return -1; } if (s->token.val == op) { label1 = new_label(s); for(;;) { if (next_token(s)) return -1; emit_op(s, OP_dup); emit_goto(s, op == TOK_LAND ? OP_if_false : OP_if_true, label1); emit_op(s, OP_drop); if (op == TOK_LAND) { if (js_parse_expr_binary(s, 8, parse_flags)) return -1; } else { if (js_parse_logical_and_or(s, TOK_LAND, parse_flags)) return -1; } if (s->token.val != op) { if (s->token.val == TOK_DOUBLE_QUESTION_MARK) return js_parse_error(s, "cannot mix ?? with && or ||"); break; } } emit_label(s, label1); } return 0; }
O1
c
js_parse_logical_and_or: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %edx, %r14d movl %esi, %r15d movq %rdi, %rbx cmpl $-0x5f, %esi jne 0x6bb89 movl $0x8, %esi movl %r14d, %edx callq 0x6bca7 jmp 0x6bb96 movl $0xffffffa1, %esi # imm = 0xFFFFFFA1 movl %r14d, %edx callq 0x6bb61 movl $0xffffffff, %ecx # imm = 0xFFFFFFFF testl %eax, %eax jne 0x6bc87 xorl %ecx, %ecx cmpl %r15d, 0x20(%rbx) jne 0x6bc87 movq 0x90(%rbx), %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF callq 0x6c7b9 movl %eax, %r12d xorl %r13d, %r13d cmpl $-0x5f, %r15d setne %r13b addl $0x69, %r13d movl $0x138, %ebp # imm = 0x138 movq %rbx, %rdi callq 0x5d1cf testl %eax, %eax jne 0x6bc82 movq 0x90(%rbx), %rax leaq (%rax,%rbp), %rdi movl 0x140(%rax), %ecx movl %ecx, 0x168(%rax) movl $0x11, %esi callq 0x1b4d0 movq %rbx, %rdi movl %r13d, %esi movl %r12d, %edx callq 0x64d83 movq 0x90(%rbx), %rax leaq (%rax,%rbp), %rdi movl 0x140(%rax), %ecx movl %ecx, 0x168(%rax) movl $0xe, %esi callq 0x1b4d0 movq %rbx, %rdi cmpl $-0x5f, %r15d jne 0x6bc4f movl $0x8, %esi movl %r14d, %edx callq 0x6bca7 jmp 0x6bc5c movl $0xffffffa1, %esi # imm = 0xFFFFFFA1 movl %r14d, %edx callq 0x6bb61 testl %eax, %eax jne 0x6bc82 movl 0x20(%rbx), %eax cmpl %r15d, %eax je 0x6bbd7 cmpl $-0x5a, %eax jne 0x6bc98 leaq 0x3535d(%rip), %rsi # 0xa0fd5 movq %rbx, %rdi xorl %eax, %eax callq 0x2fce9 movl $0xffffffff, %ecx # imm = 0xFFFFFFFF movl %ecx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rbx, %rdi movl %r12d, %esi callq 0x64ef1 xorl %ecx, %ecx jmp 0x6bc87
js_parse_logical_and_or: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14d, edx mov r15d, esi mov rbx, rdi cmp esi, 0FFFFFFA1h jnz short loc_6BB89 mov esi, 8 mov edx, r14d call js_parse_expr_binary jmp short loc_6BB96 loc_6BB89: mov esi, 0FFFFFFA1h mov edx, r14d call js_parse_logical_and_or loc_6BB96: mov ecx, 0FFFFFFFFh test eax, eax jnz loc_6BC87 xor ecx, ecx cmp [rbx+20h], r15d jnz loc_6BC87 mov rdi, [rbx+90h] mov esi, 0FFFFFFFFh call new_label_fd mov r12d, eax xor r13d, r13d cmp r15d, 0FFFFFFA1h setnz r13b add r13d, 69h ; 'i' mov ebp, 138h loc_6BBD7: mov rdi, rbx call next_token test eax, eax jnz loc_6BC82 mov rax, [rbx+90h] lea rdi, [rax+rbp] mov ecx, [rax+140h] mov [rax+168h], ecx mov esi, 11h call dbuf_putc mov rdi, rbx mov esi, r13d mov edx, r12d call emit_goto mov rax, [rbx+90h] lea rdi, [rax+rbp] mov ecx, [rax+140h] mov [rax+168h], ecx mov esi, 0Eh call dbuf_putc mov rdi, rbx cmp r15d, 0FFFFFFA1h jnz short loc_6BC4F mov esi, 8 mov edx, r14d call js_parse_expr_binary jmp short loc_6BC5C loc_6BC4F: mov esi, 0FFFFFFA1h mov edx, r14d call js_parse_logical_and_or loc_6BC5C: test eax, eax jnz short loc_6BC82 mov eax, [rbx+20h] cmp eax, r15d jz loc_6BBD7 cmp eax, 0FFFFFFA6h jnz short loc_6BC98 lea rsi, aCannotMixWithO; "cannot mix ?? with && or ||" mov rdi, rbx xor eax, eax call js_parse_error loc_6BC82: mov ecx, 0FFFFFFFFh loc_6BC87: mov eax, ecx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6BC98: mov rdi, rbx mov esi, r12d call emit_label xor ecx, ecx jmp short loc_6BC87
long long js_parse_logical_and_or( long long a1, int a2, unsigned int a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { char v11; // al int v14; // eax unsigned int v15; // ecx long long v16; // rsi long long v17; // rdx long long v18; // rcx long long v19; // r8 long long v20; // r9 int v21; // r12d __m128 v22; // xmm4 __m128 v23; // xmm5 long long v24; // rax long long v25; // rax int v26; // eax int v27; // eax char v29; // [rsp-8h] [rbp-38h] v29 = v11; if ( a2 == -95 ) v14 = js_parse_expr_binary(a1, 8LL, a3); else v14 = js_parse_logical_and_or(a1, 4294967201LL, a3); v15 = -1; if ( !v14 ) { v15 = 0; if ( *(_DWORD *)(a1 + 32) == a2 ) { v16 = 0xFFFFFFFFLL; v21 = new_label_fd(*(_QWORD *)(a1 + 144), 0xFFFFFFFFLL); do { if ( (unsigned int)next_token(a1, a4, a5, a6, a7, v22, v23, a10, a11, v16, v17, v18, v19, v20) ) return (unsigned int)-1; v24 = *(_QWORD *)(a1 + 144); *(_DWORD *)(v24 + 360) = *(_DWORD *)(v24 + 320); dbuf_putc((_QWORD *)(v24 + 312), 17); emit_goto(a1, (a2 != -95) + 105, v21); v25 = *(_QWORD *)(a1 + 144); *(_DWORD *)(v25 + 360) = *(_DWORD *)(v25 + 320); dbuf_putc((_QWORD *)(v25 + 312), 14); if ( a2 == -95 ) { v16 = 8LL; v26 = js_parse_expr_binary(a1, 8LL, a3); } else { v16 = 4294967201LL; v26 = js_parse_logical_and_or(a1, 4294967201LL, a3); } if ( v26 ) return (unsigned int)-1; v27 = *(_DWORD *)(a1 + 32); } while ( v27 == a2 ); if ( v27 == -90 ) { js_parse_error( (long long *)a1, (long long)"cannot mix ?? with && or ||", v17, v18, v19, v20, a4, a5, a6, a7, v22, v23, a10, a11, v29); return (unsigned int)-1; } emit_label(a1, v21); return 0; } } return v15; }
21,797
js_parse_logical_and_or
bluesky950520[P]quickjs/quickjs.c
static __exception int js_parse_logical_and_or(JSParseState *s, int op, int parse_flags) { int label1; if (op == TOK_LAND) { if (js_parse_expr_binary(s, 8, parse_flags)) return -1; } else { if (js_parse_logical_and_or(s, TOK_LAND, parse_flags)) return -1; } if (s->token.val == op) { label1 = new_label(s); for(;;) { if (next_token(s)) return -1; emit_op(s, OP_dup); emit_goto(s, op == TOK_LAND ? OP_if_false : OP_if_true, label1); emit_op(s, OP_drop); if (op == TOK_LAND) { if (js_parse_expr_binary(s, 8, parse_flags)) return -1; } else { if (js_parse_logical_and_or(s, TOK_LAND, parse_flags)) return -1; } if (s->token.val != op) { if (s->token.val == TOK_DOUBLE_QUESTION_MARK) return js_parse_error(s, "cannot mix ?? with && or ||"); break; } } emit_label(s, label1); } return 0; }
O2
c
js_parse_logical_and_or: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %edx, %ebp movl %esi, %r15d movq %rdi, %r14 pushq $-0x1 popq %rbx cmpl $-0x5f, %esi jne 0x5afbb pushq $0x8 popq %rsi movq %r14, %rdi movl %ebp, %edx callq 0x5b086 jmp 0x5afc8 pushq $-0x5f popq %rsi movq %r14, %rdi movl %ebp, %edx callq 0x5af91 testl %eax, %eax jne 0x5b075 cmpl %r15d, 0x20(%r14) jne 0x5b073 movq %r14, %rdi callq 0x5604b movl %eax, %r12d xorl %r13d, %r13d cmpl $-0x5f, %r15d setne %r13b addl $0x69, %r13d movq %r14, %rdi callq 0x4fa4e testl %eax, %eax jne 0x5b075 movq %r14, %rdi pushq $0x11 popq %rsi callq 0x4fa1b movq %r14, %rdi movl %r13d, %esi movl %r12d, %edx callq 0x5605a movq %r14, %rdi pushq $0xe popq %rsi callq 0x4fa1b movq %r14, %rdi cmpl $-0x5f, %r15d jne 0x5b039 pushq $0x8 popq %rsi movl %ebp, %edx callq 0x5b086 jmp 0x5b043 pushq $-0x5f popq %rsi movl %ebp, %edx callq 0x5af91 testl %eax, %eax jne 0x5b075 movl 0x20(%r14), %eax cmpl %r15d, %eax je 0x5aff4 cmpl $-0x5a, %eax jne 0x5b068 leaq 0x2ceb3(%rip), %rsi # 0x87f0f movq %r14, %rdi xorl %eax, %eax callq 0x28457 jmp 0x5b075 movq %r14, %rdi movl %r12d, %esi callq 0x5617c xorl %ebx, %ebx movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_parse_logical_and_or: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebp, edx mov r15d, esi mov r14, rdi push 0FFFFFFFFFFFFFFFFh pop rbx cmp esi, 0FFFFFFA1h jnz short loc_5AFBB push 8 pop rsi mov rdi, r14 mov edx, ebp call js_parse_expr_binary jmp short loc_5AFC8 loc_5AFBB: push 0FFFFFFFFFFFFFFA1h pop rsi mov rdi, r14 mov edx, ebp call js_parse_logical_and_or loc_5AFC8: test eax, eax jnz loc_5B075 cmp [r14+20h], r15d jnz loc_5B073 mov rdi, r14 call new_label mov r12d, eax xor r13d, r13d cmp r15d, 0FFFFFFA1h setnz r13b add r13d, 69h ; 'i' loc_5AFF4: mov rdi, r14 call next_token test eax, eax jnz short loc_5B075 mov rdi, r14 push 11h pop rsi call emit_op mov rdi, r14 mov esi, r13d mov edx, r12d call emit_goto mov rdi, r14 push 0Eh pop rsi call emit_op mov rdi, r14 cmp r15d, 0FFFFFFA1h jnz short loc_5B039 push 8 pop rsi mov edx, ebp call js_parse_expr_binary jmp short loc_5B043 loc_5B039: push 0FFFFFFFFFFFFFFA1h pop rsi mov edx, ebp call js_parse_logical_and_or loc_5B043: test eax, eax jnz short loc_5B075 mov eax, [r14+20h] cmp eax, r15d jz short loc_5AFF4 cmp eax, 0FFFFFFA6h jnz short loc_5B068 lea rsi, aCannotMixWithO; "cannot mix ?? with && or ||" mov rdi, r14 xor eax, eax call js_parse_error jmp short loc_5B075 loc_5B068: mov rdi, r14 mov esi, r12d call emit_label loc_5B073: xor ebx, ebx loc_5B075: mov eax, ebx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_parse_logical_and_or( long long a1, int a2, unsigned int a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { char v11; // al unsigned int v14; // ebx long long v15; // rsi int v16; // eax long long v17; // rdx long long v18; // rcx long long v19; // r8 long long v20; // r9 int v21; // r12d __m128 v22; // xmm4 __m128 v23; // xmm5 int v24; // eax int v25; // eax char v27; // [rsp-8h] [rbp-38h] v27 = v11; v14 = -1; if ( a2 == -95 ) { v15 = 8LL; v16 = js_parse_expr_binary(a1, 8LL, a3); } else { v15 = -95LL; v16 = js_parse_logical_and_or(a1, -95LL, a3); } if ( !v16 ) { if ( *(_DWORD *)(a1 + 32) == a2 ) { v21 = new_label(a1); while ( !(unsigned int)next_token(a1, v15, v17, a4, a5, a6, a7, v22, v23, a10, a11, v18, v19, v20) ) { emit_op(a1, 17); emit_goto(a1, (a2 != -95) + 105, v21); emit_op(a1, 14); if ( a2 == -95 ) { v15 = 8LL; v24 = js_parse_expr_binary(a1, 8LL, a3); } else { v15 = -95LL; v24 = js_parse_logical_and_or(a1, -95LL, a3); } if ( v24 ) break; v25 = *(_DWORD *)(a1 + 32); if ( v25 != a2 ) { if ( v25 == -90 ) { js_parse_error( (long long *)a1, (long long)"cannot mix ?? with && or ||", v17, v18, v19, v20, a4, a5, a6, a7, v22, v23, a10, a11, v27); return v14; } emit_label(a1, v21); return 0; } } } else { return 0; } } return v14; }
js_parse_logical_and_or: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBP,EDX MOV R15D,ESI MOV R14,RDI PUSH -0x1 POP RBX CMP ESI,-0x5f JNZ 0x0015afbb PUSH 0x8 POP RSI MOV RDI,R14 MOV EDX,EBP CALL 0x0015b086 JMP 0x0015afc8 LAB_0015afbb: PUSH -0x5f POP RSI MOV RDI,R14 MOV EDX,EBP CALL 0x0015af91 LAB_0015afc8: TEST EAX,EAX JNZ 0x0015b075 CMP dword ptr [R14 + 0x20],R15D JNZ 0x0015b073 MOV RDI,R14 CALL 0x0015604b MOV R12D,EAX XOR R13D,R13D CMP R15D,-0x5f SETNZ R13B ADD R13D,0x69 LAB_0015aff4: MOV RDI,R14 CALL 0x0014fa4e TEST EAX,EAX JNZ 0x0015b075 MOV RDI,R14 PUSH 0x11 POP RSI CALL 0x0014fa1b MOV RDI,R14 MOV ESI,R13D MOV EDX,R12D CALL 0x0015605a MOV RDI,R14 PUSH 0xe POP RSI CALL 0x0014fa1b MOV RDI,R14 CMP R15D,-0x5f JNZ 0x0015b039 PUSH 0x8 POP RSI MOV EDX,EBP CALL 0x0015b086 JMP 0x0015b043 LAB_0015b039: PUSH -0x5f POP RSI MOV EDX,EBP CALL 0x0015af91 LAB_0015b043: TEST EAX,EAX JNZ 0x0015b075 MOV EAX,dword ptr [R14 + 0x20] CMP EAX,R15D JZ 0x0015aff4 CMP EAX,-0x5a JNZ 0x0015b068 LEA RSI,[0x187f0f] MOV RDI,R14 XOR EAX,EAX CALL 0x00128457 JMP 0x0015b075 LAB_0015b068: MOV RDI,R14 MOV ESI,R12D CALL 0x0015617c LAB_0015b073: XOR EBX,EBX LAB_0015b075: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 js_parse_logical_and_or(long param_1,int param_2,int4 param_3) { int iVar1; int4 uVar2; uVar2 = 0xffffffff; if (param_2 == -0x5f) { iVar1 = js_parse_expr_binary(param_1,8,param_3); } else { iVar1 = js_parse_logical_and_or(param_1,0xffffffffffffffa1,param_3); } if (iVar1 == 0) { if (*(int *)(param_1 + 0x20) == param_2) { uVar2 = new_label(param_1); do { iVar1 = next_token(param_1); if (iVar1 != 0) { return 0xffffffff; } emit_op(param_1,0x11); emit_goto(param_1,(param_2 != -0x5f) + 'i',uVar2); emit_op(param_1,0xe); if (param_2 == -0x5f) { iVar1 = js_parse_expr_binary(param_1,8,param_3); } else { iVar1 = js_parse_logical_and_or(param_1,0xffffffffffffffa1,param_3); } if (iVar1 != 0) { return 0xffffffff; } } while (*(int *)(param_1 + 0x20) == param_2); if (*(int *)(param_1 + 0x20) == -0x5a) { js_parse_error(param_1,"cannot mix ?? with && or ||"); return 0xffffffff; } emit_label(param_1,uVar2); } uVar2 = 0; } return uVar2; }
21,798
inline_mysql_file_write
eloqsql/include/mysql/psi/mysql_file.h
static inline size_t inline_mysql_file_write( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, const uchar *buffer, size_t count, myf flags) { size_t result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; size_t bytes_written; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_WRITE); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); result= my_write(file, buffer, count, flags); if (flags & (MY_NABP | MY_FNABP)) bytes_written= (result == 0) ? count : 0; else bytes_written= (result != MY_FILE_ERROR) ? result : 0; PSI_FILE_CALL(end_file_wait)(locker, bytes_written); return result; } #endif result= my_write(file, buffer, count, flags); return result; }
O0
c
inline_mysql_file_write: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) leaq 0x207590(%rip), %rax # 0x2c00b8 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x88(%rbp), %rdi movl $0x7, %edx callq *%rax movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xb8c37 leaq 0x207546(%rip), %rax # 0x2c00b8 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x40(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx callq 0xf6d60 movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0xb8be2 cmpq $0x0, -0x38(%rbp) jne 0xb8bc7 movq -0x28(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0xb8bd2 xorl %eax, %eax movq %rax, -0x98(%rbp) jmp 0xb8bd2 movq -0x98(%rbp), %rax movq %rax, -0x90(%rbp) jmp 0xb8c0f cmpq $-0x1, -0x38(%rbp) je 0xb8bf6 movq -0x38(%rbp), %rax movq %rax, -0xa0(%rbp) jmp 0xb8c01 xorl %eax, %eax movq %rax, -0xa0(%rbp) jmp 0xb8c01 movq -0xa0(%rbp), %rax movq %rax, -0x90(%rbp) leaq 0x2074a2(%rip), %rax # 0x2c00b8 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x40(%rbp), %rdi movq -0x90(%rbp), %rsi callq *%rax movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xb8c57 movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx callq 0xf6d60 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_file_write_2: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_88] mov edx, 7 call rax mov [rbp+var_40], rax cmp [rbp+var_40], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz loc_B8C37 lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_28] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] call my_write mov [rbp+var_38], rax mov rax, [rbp+var_30] and rax, 6 cmp rax, 0 jz short loc_B8BE2 cmp [rbp+var_38], 0 jnz short loc_B8BC7 mov rax, [rbp+var_28] mov [rbp+var_98], rax jmp short loc_B8BD2 loc_B8BC7: xor eax, eax mov [rbp+var_98], rax jmp short $+2 loc_B8BD2: mov rax, [rbp+var_98] mov [rbp+var_90], rax jmp short loc_B8C0F loc_B8BE2: cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh jz short loc_B8BF6 mov rax, [rbp+var_38] mov [rbp+var_A0], rax jmp short loc_B8C01 loc_B8BF6: xor eax, eax mov [rbp+var_A0], rax jmp short $+2 loc_B8C01: mov rax, [rbp+var_A0] mov [rbp+var_90], rax loc_B8C0F: lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_90] call rax mov rax, [rbp+var_38] mov [rbp+var_8], rax jmp short loc_B8C57 loc_B8C37: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] call my_write mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_B8C57: mov rax, [rbp+var_8] add rsp, 0A0h pop rbp retn
long long inline_mysql_file_write_2( long long a1, unsigned int a2, unsigned int a3, long long a4, long long a5, long long a6) { long long v7; // [rsp+0h] [rbp-A0h] long long v8; // [rsp+8h] [rbp-98h] _BYTE v9[72]; // [rsp+18h] [rbp-88h] BYREF long long v10; // [rsp+60h] [rbp-40h] long long v11; // [rsp+68h] [rbp-38h] long long v12; // [rsp+70h] [rbp-30h] long long v13; // [rsp+78h] [rbp-28h] long long v14; // [rsp+80h] [rbp-20h] unsigned int v15; // [rsp+88h] [rbp-18h] unsigned int v16; // [rsp+8Ch] [rbp-14h] long long v17; // [rsp+90h] [rbp-10h] v17 = a1; v16 = a2; v15 = a3; v14 = a4; v13 = a5; v12 = a6; v10 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v9, a3, 7LL); if ( v10 ) { ((void ( *)(long long, long long, long long, _QWORD))PSI_server[66])(v10, v13, v17, v16); v11 = my_write(v15, v14, v13, v12); if ( (v12 & 6) != 0 ) { if ( v11 ) v8 = 0LL; else v8 = v13; ((void ( *)(long long, long long))PSI_server[67])(v10, v8); } else { if ( v11 == -1 ) v7 = 0LL; else v7 = v11; ((void ( *)(long long, long long))PSI_server[67])(v10, v7); } return v11; } else { return my_write(v15, v14, v13, v12); } }
inline_mysql_file_write: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x3c00b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x88] MOV EDX,0x7 CALL RAX MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001b8c37 LEA RAX,[0x3c00b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001f6d60 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] AND RAX,0x6 CMP RAX,0x0 JZ 0x001b8be2 CMP qword ptr [RBP + -0x38],0x0 JNZ 0x001b8bc7 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x98],RAX JMP 0x001b8bd2 LAB_001b8bc7: XOR EAX,EAX MOV qword ptr [RBP + -0x98],RAX JMP 0x001b8bd2 LAB_001b8bd2: MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x90],RAX JMP 0x001b8c0f LAB_001b8be2: CMP qword ptr [RBP + -0x38],-0x1 JZ 0x001b8bf6 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0xa0],RAX JMP 0x001b8c01 LAB_001b8bf6: XOR EAX,EAX MOV qword ptr [RBP + -0xa0],RAX JMP 0x001b8c01 LAB_001b8c01: MOV RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0x90],RAX LAB_001b8c0f: LEA RAX,[0x3c00b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x90] CALL RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX JMP 0x001b8c57 LAB_001b8c37: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001f6d60 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_001b8c57: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xa0 POP RBP RET
long inline_mysql_file_write (int8 param_1,int4 param_2,int4 param_3,int8 param_4, long param_5,ulong param_6) { long local_a8; long local_a0; long local_98; int1 local_90 [72]; long local_48; long local_40; ulong local_38; long local_30; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; long local_10; local_38 = param_6; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,7); if (local_48 == 0) { local_10 = my_write(local_20,local_28,local_30,local_38); } else { (**(code **)(PSI_server + 0x210))(local_48,local_30,local_18,local_1c); local_40 = my_write(local_20,local_28,local_30,local_38); if ((local_38 & 6) == 0) { local_a8 = local_40; if (local_40 == -1) { local_a8 = 0; } local_98 = local_a8; } else { if (local_40 == 0) { local_a0 = local_30; } else { local_a0 = 0; } local_98 = local_a0; } (**(code **)(PSI_server + 0x218))(local_48,local_98); local_10 = local_40; } return local_10; }
21,799
ma_once_end_block_record
eloqsql/storage/maria/ma_blockrec.c
my_bool _ma_once_end_block_record(MARIA_SHARE *share) { int res= _ma_bitmap_end(share); if (share->bitmap.file.file >= 0) { if (flush_pagecache_blocks(share->pagecache, &share->bitmap.file, share->deleting ? FLUSH_IGNORE_CHANGED : FLUSH_RELEASE)) res= 1; /* File must be synced as it is going out of the maria_open_list and so becoming unknown to Checkpoint. */ if (!share->s3_path) { if (share->now_transactional && mysql_file_sync(share->bitmap.file.file, MYF(MY_WME))) res= 1; if (mysql_file_close(share->bitmap.file.file, MYF(MY_WME))) res= 1; } /* Trivial assignment to guard against multiple invocations (May happen if file are closed but we want to keep the maria object around a bit longer) */ share->bitmap.file.file= -1; } if (share->id != 0) { /* We de-assign the id even though index has not been flushed, this is ok as close_lock serializes us with a Checkpoint looking at our share. */ translog_deassign_id_from_share(share); } return res; }
O3
c
ma_once_end_block_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x50, %rsp movq %rdi, %rbx callq 0x526bb movl %eax, %r14d cmpl $0x0, 0xa60(%rbx) js 0x4a3bb leaq 0xa50(%rbx), %rsi cmpb $0x1, 0x7ea(%rbx) movq 0x600(%rbx), %rdi movl $0x2, %edx sbbl $0x0, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x3cd7c testl %eax, %eax movzbl %r14b, %eax movl $0x1, %r14d cmovel %eax, %r14d cmpq $0x0, 0x798(%rbx) jne 0x4a3b1 cmpb $0x0, 0x7e7(%rbx) je 0x4a36c movl 0xa60(%rbx), %r15d leaq 0x33bcdf(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x70(%rbp), %rdi movl %r15d, %esi movl $0x10, %edx callq *0x158(%rax) testq %rax, %rax jne 0x4a3f5 movl $0x10, %esi movl %r15d, %edi callq 0xa15b4 testl %eax, %eax movzbl %r14b, %eax movl $0x1, %r14d cmovel %eax, %r14d movl 0xa60(%rbx), %r15d leaq 0x33bc96(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x70(%rbp), %rdi movl %r15d, %esi movl $0x4, %edx callq *0x158(%rax) testq %rax, %rax jne 0x4a3dd movl $0x10, %esi movl %r15d, %edi callq 0xa0695 testl %eax, %eax movzbl %r14b, %eax movl $0x1, %r14d cmovel %eax, %r14d movl $0xffffffff, 0xa60(%rbx) # imm = 0xFFFFFFFF cmpw $0x0, 0x620(%rbx) je 0x4a3cd movq %rbx, %rdi callq 0x36def movl %r14d, %eax addq $0x50, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq -0x24(%rbp), %r12 movq %rax, %rdi movl %r15d, %esi movq %r12, %rdx callq 0x2c634 movl (%r12), %eax jmp 0x4a3a1 leaq -0x24(%rbp), %r12 movq %rax, %rdi movl %r15d, %esi movq %r12, %rdx callq 0x2c5db movl (%r12), %eax jmp 0x4a35c
_ma_once_end_block_record: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 50h mov rbx, rdi call _ma_bitmap_end mov r14d, eax cmp dword ptr [rbx+0A60h], 0 js loc_4A3BB lea rsi, [rbx+0A50h] cmp byte ptr [rbx+7EAh], 1 mov rdi, [rbx+600h] mov edx, 2 sbb edx, 0 xor ecx, ecx xor r8d, r8d call flush_pagecache_blocks_with_filter test eax, eax movzx eax, r14b mov r14d, 1 cmovz r14d, eax cmp qword ptr [rbx+798h], 0 jnz loc_4A3B1 cmp byte ptr [rbx+7E7h], 0 jz short loc_4A36C mov r15d, [rbx+0A60h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_70] mov esi, r15d mov edx, 10h call qword ptr [rax+158h] test rax, rax jnz loc_4A3F5 mov esi, 10h mov edi, r15d call my_sync loc_4A35C: test eax, eax movzx eax, r14b mov r14d, 1 cmovz r14d, eax loc_4A36C: mov r15d, [rbx+0A60h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_70] mov esi, r15d mov edx, 4 call qword ptr [rax+158h] test rax, rax jnz short loc_4A3DD mov esi, 10h mov edi, r15d call my_close loc_4A3A1: test eax, eax movzx eax, r14b mov r14d, 1 cmovz r14d, eax loc_4A3B1: mov dword ptr [rbx+0A60h], 0FFFFFFFFh loc_4A3BB: cmp word ptr [rbx+620h], 0 jz short loc_4A3CD mov rdi, rbx call translog_deassign_id_from_share loc_4A3CD: mov eax, r14d add rsp, 50h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_4A3DD: lea r12, [rbp+var_24] mov rdi, rax mov esi, r15d mov rdx, r12 call _ma_once_end_block_record_cold_2 mov eax, [r12] jmp short loc_4A3A1 loc_4A3F5: lea r12, [rbp+var_24] mov rdi, rax mov esi, r15d mov rdx, r12 call _ma_once_end_block_record_cold_1 mov eax, [r12] jmp loc_4A35C
long long ma_once_end_block_record(long long a1) { unsigned int v1; // r14d bool v2; // zf unsigned int v3; // eax unsigned int v4; // r15d long long v5; // rax unsigned int v6; // eax char v7; // al unsigned int v8; // r15d long long v9; // rax unsigned int v10; // eax unsigned int v11; // eax _BYTE v13[76]; // [rsp+0h] [rbp-70h] BYREF unsigned int v14[9]; // [rsp+4Ch] [rbp-24h] BYREF v1 = ma_bitmap_end(); if ( *(int *)(a1 + 2656) >= 0 ) { v2 = (unsigned int)flush_pagecache_blocks_with_filter( *(_QWORD *)(a1 + 1536), a1 + 2640, 2 - (unsigned int)(*(_BYTE *)(a1 + 2026) == 0), 0LL, 0LL) == 0; v3 = (unsigned __int8)v1; v1 = 1; if ( v2 ) v1 = v3; if ( !*(_QWORD *)(a1 + 1944) ) { if ( *(_BYTE *)(a1 + 2023) ) { v4 = *(_DWORD *)(a1 + 2656); v5 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v13, v4, 16LL); if ( v5 ) { ma_once_end_block_record_cold_1(v5, v4, v14); v6 = v14[0]; } else { v6 = my_sync(v4, 16LL); } v2 = v6 == 0; v7 = v1; LOBYTE(v1) = 1; if ( v2 ) LOBYTE(v1) = v7; } v8 = *(_DWORD *)(a1 + 2656); v9 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v13, v8, 4LL); if ( v9 ) { ma_once_end_block_record_cold_2(v9, v8, v14); v10 = v14[0]; } else { v10 = my_close(v8, 16LL); } v2 = v10 == 0; v11 = (unsigned __int8)v1; v1 = 1; if ( v2 ) v1 = v11; } *(_DWORD *)(a1 + 2656) = -1; } if ( *(_WORD *)(a1 + 1568) ) translog_deassign_id_from_share(a1); return v1; }
_ma_once_end_block_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x50 MOV RBX,RDI CALL 0x001526bb MOV R14D,EAX CMP dword ptr [RBX + 0xa60],0x0 JS 0x0014a3bb LEA RSI,[RBX + 0xa50] CMP byte ptr [RBX + 0x7ea],0x1 MOV RDI,qword ptr [RBX + 0x600] MOV EDX,0x2 SBB EDX,0x0 XOR ECX,ECX XOR R8D,R8D CALL 0x0013cd7c TEST EAX,EAX MOVZX EAX,R14B MOV R14D,0x1 CMOVZ R14D,EAX CMP qword ptr [RBX + 0x798],0x0 JNZ 0x0014a3b1 CMP byte ptr [RBX + 0x7e7],0x0 JZ 0x0014a36c MOV R15D,dword ptr [RBX + 0xa60] LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x70] MOV ESI,R15D MOV EDX,0x10 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0014a3f5 MOV ESI,0x10 MOV EDI,R15D CALL 0x001a15b4 LAB_0014a35c: TEST EAX,EAX MOVZX EAX,R14B MOV R14D,0x1 CMOVZ R14D,EAX LAB_0014a36c: MOV R15D,dword ptr [RBX + 0xa60] LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x70] MOV ESI,R15D MOV EDX,0x4 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0014a3dd MOV ESI,0x10 MOV EDI,R15D CALL 0x001a0695 LAB_0014a3a1: TEST EAX,EAX MOVZX EAX,R14B MOV R14D,0x1 CMOVZ R14D,EAX LAB_0014a3b1: MOV dword ptr [RBX + 0xa60],0xffffffff LAB_0014a3bb: CMP word ptr [RBX + 0x620],0x0 JZ 0x0014a3cd MOV RDI,RBX CALL 0x00136def LAB_0014a3cd: MOV EAX,R14D ADD RSP,0x50 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0014a3dd: LEA R12,[RBP + -0x24] MOV RDI,RAX MOV ESI,R15D MOV RDX,R12 CALL 0x0012c634 MOV EAX,dword ptr [R12] JMP 0x0014a3a1 LAB_0014a3f5: LEA R12,[RBP + -0x24] MOV RDI,RAX MOV ESI,R15D MOV RDX,R12 CALL 0x0012c5db MOV EAX,dword ptr [R12] JMP 0x0014a35c
uint _ma_once_end_block_record(long param_1) { int4 uVar1; uint uVar2; int iVar3; long lVar4; uint uVar5; uint uVar6; int1 local_78 [76]; int local_2c; uVar2 = _ma_bitmap_end(); if (-1 < *(int *)(param_1 + 0xa60)) { iVar3 = flush_pagecache_blocks_with_filter (*(int8 *)(param_1 + 0x600),param_1 + 0xa50, 2 - (uint)(*(char *)(param_1 + 0x7ea) == '\0'),0,0); uVar5 = 1; if (iVar3 == 0) { uVar5 = uVar2 & 0xff; } uVar2 = uVar5; if (*(long *)(param_1 + 0x798) == 0) { uVar6 = uVar5; if (*(char *)(param_1 + 0x7e7) != '\0') { uVar1 = *(int4 *)(param_1 + 0xa60); lVar4 = (**(code **)(PSI_server + 0x158))(local_78,uVar1,0x10); if (lVar4 == 0) { iVar3 = my_sync(uVar1,0x10); } else { _ma_once_end_block_record_cold_1(lVar4,uVar1,&local_2c); iVar3 = local_2c; } uVar6 = 1; if (iVar3 == 0) { uVar6 = uVar5; } } uVar1 = *(int4 *)(param_1 + 0xa60); lVar4 = (**(code **)(PSI_server + 0x158))(local_78,uVar1,4); if (lVar4 == 0) { local_2c = my_close(uVar1,0x10); } else { _ma_once_end_block_record_cold_2(lVar4,uVar1,&local_2c); } uVar2 = 1; if (local_2c == 0) { uVar2 = uVar6; } } *(int4 *)(param_1 + 0xa60) = 0xffffffff; } if (*(short *)(param_1 + 0x620) != 0) { translog_deassign_id_from_share(param_1); } return uVar2; }